>} */
+
+ wrapper._handlers = {};
+ /**
+ * Register a handler for one or multiple events
+ * @param {String} events A space separated string with events
+ * @param {function} handler A callback function, called as handler(event)
+ * @returns {Hammer.Manager} Returns the hammer instance
+ */
+
+ wrapper.on = function (events, handler) {
+ // register the handler
+ split(events).forEach(function (event) {
+ var _handlers = wrapper._handlers[event];
+
+ if (!_handlers) {
+ wrapper._handlers[event] = _handlers = []; // register the static, propagated handler
+
+ hammer.on(event, propagatedHandler);
+ }
+
+ _handlers.push(handler);
+ });
+ return wrapper;
+ };
+ /**
+ * Unregister a handler for one or multiple events
+ * @param {String} events A space separated string with events
+ * @param {function} [handler] Optional. The registered handler. If not
+ * provided, all handlers for given events
+ * are removed.
+ * @returns {Hammer.Manager} Returns the hammer instance
+ */
+
+
+ wrapper.off = function (events, handler) {
+ // unregister the handler
+ split(events).forEach(function (event) {
+ var _handlers = wrapper._handlers[event];
+
+ if (_handlers) {
+ _handlers = handler ? _handlers.filter(function (h) {
+ return h !== handler;
+ }) : [];
+
+ if (_handlers.length > 0) {
+ wrapper._handlers[event] = _handlers;
+ } else {
+ // remove static, propagated handler
+ hammer.off(event, propagatedHandler);
+ delete wrapper._handlers[event];
+ }
+ }
+ });
+ return wrapper;
+ };
+ /**
+ * Emit to the event listeners
+ * @param {string} eventType
+ * @param {Event} event
+ */
+
+
+ wrapper.emit = function (eventType, event) {
+ _firstTarget = event.target;
+ hammer.emit(eventType, event);
+ };
+
+ wrapper.destroy = function () {
+ // Detach from DOM element
+ var hammers = hammer.element.hammer;
+ var idx = hammers.indexOf(wrapper);
+ if (idx !== -1) hammers.splice(idx, 1);
+ if (!hammers.length) delete hammer.element.hammer; // clear all handlers
+
+ wrapper._handlers = {}; // call original hammer destroy
+
+ hammer.destroy();
+ }; // split a string with space separated words
+
+
+ function split(events) {
+ return events.match(/[^ ]+/g);
+ }
+ /**
+ * A static event handler, applying event propagation.
+ * @param {Object} event
+ */
+
+
+ function propagatedHandler(event) {
+ // let only a single hammer instance handle this event
+ if (event.type !== 'hammer.input') {
+ // it is possible that the same srcEvent is used with multiple hammer events,
+ // we keep track on which events are handled in an object _handled
+ if (!event.srcEvent._handled) {
+ event.srcEvent._handled = {};
+ }
+
+ if (event.srcEvent._handled[event.type]) {
+ return;
+ } else {
+ event.srcEvent._handled[event.type] = true;
+ }
+ } // attach a stopPropagation function to the event
+
+
+ var stopped = false;
+
+ event.stopPropagation = function () {
+ stopped = true;
+ }; //wrap the srcEvent's stopPropagation to also stop hammer propagation:
+
+
+ var srcStop = event.srcEvent.stopPropagation.bind(event.srcEvent);
+
+ if (typeof srcStop == "function") {
+ event.srcEvent.stopPropagation = function () {
+ srcStop();
+ event.stopPropagation();
+ };
+ } // attach firstTarget property to the event
+
+
+ event.firstTarget = _firstTarget; // propagate over all elements (until stopped)
+
+ var elem = _firstTarget;
+
+ while (elem && !stopped) {
+ var elemHammer = elem.hammer;
+
+ if (elemHammer) {
+ var _handlers;
+
+ for (var k = 0; k < elemHammer.length; k++) {
+ _handlers = elemHammer[k]._handlers[event.type];
+ if (_handlers) for (var i = 0; i < _handlers.length && !stopped; i++) {
+ _handlers[i](event);
+ }
+ }
+ }
+
+ elem = elem.parentNode;
+ }
+ }
+
+ return wrapper;
+ }
+
/**
* Setup a mock hammer.js object, for unit testing.
*
@@ -21061,7 +29026,7 @@
var modifiedHammer;
if (typeof window !== 'undefined') {
- var OurHammer = window['Hammer'] || Hammer;
+ var OurHammer = window['Hammer'] || Hammer$3;
modifiedHammer = propagating(OurHammer, {
preventDefault: 'mouse'
});
@@ -21073,7 +29038,7 @@
};
}
- var Hammer$1 = modifiedHammer;
+ var Hammer = modifiedHammer;
/**
* Register a touch event, taking place before a gesture
@@ -21159,9 +29124,9 @@
* @constructor TimeStep
*/
function TimeStep(start, end, minimumStep, hiddenDates, options) {
- classCallCheck(this, TimeStep);
+ _classCallCheck(this, TimeStep);
- this.moment = options && options.moment || moment$1;
+ this.moment = options && options.moment || moment$2;
this.options = options ? options : {}; // variables
this.current = this.moment();
@@ -21177,7 +29142,7 @@
this.switchedMonth = false;
this.switchedYear = false;
- if (isArray$5(hiddenDates)) {
+ if (_Array$isArray(hiddenDates)) {
this.hiddenDates = hiddenDates;
} else if (hiddenDates != undefined) {
this.hiddenDates = [hiddenDates];
@@ -21194,7 +29159,7 @@
*/
- createClass(TimeStep, [{
+ _createClass(TimeStep, [{
key: "setMoment",
value: function setMoment(moment) {
this.moment = moment; // update the date properties, can have a new utcOffset
@@ -21213,8 +29178,8 @@
}, {
key: "setFormat",
value: function setFormat(format) {
- var defaultFormat = util$1.deepExtend({}, TimeStep.FORMAT);
- this.format = util$1.deepExtend(defaultFormat, format);
+ var defaultFormat = availableUtils.deepExtend({}, TimeStep.FORMAT);
+ this.format = availableUtils.deepExtend(defaultFormat, format);
}
/**
* Set a new range
@@ -21234,8 +29199,8 @@
throw "No legal start or end date in method setRange";
}
- this._start = start != undefined ? this.moment(start.valueOf()) : now$2();
- this._end = end != undefined ? this.moment(end.valueOf()) : now$2();
+ this._start = start != undefined ? this.moment(start.valueOf()) : _Date$now();
+ this._end = end != undefined ? this.moment(end.valueOf()) : _Date$now();
if (this.autoScale) {
this.setMinimumStep(minimumStep);
@@ -21271,6 +29236,7 @@
case 'year':
this.current.year(this.step * Math.floor(this.current.year() / this.step));
this.current.month(0);
+ // eslint-disable-line no-fallthrough
case 'month':
this.current.date(1);
@@ -21697,13 +29663,13 @@
}, {
key: "isMajor",
-
+ value:
/**
* Check if the current value is a major value (for example when the step
* is DAY, a major value is each first day of the MONTH)
* @return {boolean} true if current date is major, else false.
*/
- value: function isMajor() {
+ function isMajor() {
if (this.switchedYear == true) {
switch (this.scale) {
case 'year':
@@ -21765,7 +29731,7 @@
case 'weekday': // intentional fall through
case 'day':
- return date.date() == 1;
+ return this.options.showWeekScale ? date.isoWeekday() == 1 : date.date() == 1;
case 'week':
return date.date() == 1;
@@ -21877,7 +29843,7 @@
function today(date) {
- if (date.isSame(now$2(), 'day')) {
+ if (date.isSame(_Date$now(), 'day')) {
return ' vis-today';
}
@@ -21899,7 +29865,7 @@
function currentWeek(date) {
- return date.isSame(now$2(), 'week') ? ' vis-current-week' : '';
+ return date.isSame(_Date$now(), 'week') ? ' vis-current-week' : '';
}
/**
*
@@ -21909,7 +29875,7 @@
function currentMonth(date) {
- return date.isSame(now$2(), 'month') ? ' vis-current-month' : '';
+ return date.isSame(_Date$now(), 'month') ? ' vis-current-month' : '';
}
/**
*
@@ -21919,7 +29885,7 @@
function currentYear(date) {
- return date.isSame(now$2(), 'year') ? ' vis-current-year' : '';
+ return date.isSame(_Date$now(), 'year') ? ' vis-current-year' : '';
}
switch (this.scale) {
@@ -21939,7 +29905,7 @@
break;
case 'hour':
- classNames.push(concat$2(_context = "vis-h".concat(current.hours())).call(_context, this.step == 4 ? '-h' + (current.hours() + 4) : ''));
+ classNames.push(_concatInstanceProperty(_context = "vis-h".concat(current.hours())).call(_context, this.step == 4 ? '-h' + (current.hours() + 4) : ''));
classNames.push(today(current));
classNames.push(even(current.hours()));
break;
@@ -21980,12 +29946,12 @@
break;
}
- return filter$2(classNames).call(classNames, String).join(" ");
+ return _filterInstanceProperty(classNames).call(classNames, String).join(" ");
}
}], [{
key: "snap",
value: function snap(date, scale, step) {
- var clone = moment$1(date);
+ var clone = moment$2(date);
if (scale == 'year') {
var year = clone.year() + Math.round(clone.month() / 12);
@@ -22170,13 +30136,18 @@
}
}
- var css_248z = ".vis-time-axis {\n position: relative;\n overflow: hidden;\n}\n\n.vis-time-axis.vis-foreground {\n top: 0;\n left: 0;\n width: 100%;\n}\n\n.vis-time-axis.vis-background {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.vis-time-axis .vis-text {\n position: absolute;\n color: #4d4d4d;\n padding: 3px;\n overflow: hidden;\n box-sizing: border-box;\n\n white-space: nowrap;\n}\n\n.vis-time-axis .vis-text.vis-measure {\n position: absolute;\n padding-left: 0;\n padding-right: 0;\n margin-left: 0;\n margin-right: 0;\n visibility: hidden;\n}\n\n.vis-time-axis .vis-grid.vis-vertical {\n position: absolute;\n border-left: 1px solid;\n}\n\n.vis-time-axis .vis-grid.vis-vertical-rtl {\n position: absolute;\n border-right: 1px solid;\n}\n\n.vis-time-axis .vis-grid.vis-minor {\n border-color: #e5e5e5;\n}\n\n.vis-time-axis .vis-grid.vis-major {\n border-color: #bfbfbf;\n}\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRpbWVheGlzLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGtCQUFrQjtFQUNsQixnQkFBZ0I7QUFDbEI7O0FBRUE7RUFDRSxNQUFNO0VBQ04sT0FBTztFQUNQLFdBQVc7QUFDYjs7QUFFQTtFQUNFLGtCQUFrQjtFQUNsQixNQUFNO0VBQ04sT0FBTztFQUNQLFdBQVc7RUFDWCxZQUFZO0FBQ2Q7O0FBRUE7RUFDRSxrQkFBa0I7RUFDbEIsY0FBYztFQUNkLFlBQVk7RUFDWixnQkFBZ0I7RUFDaEIsc0JBQXNCOztFQUV0QixtQkFBbUI7QUFDckI7O0FBRUE7RUFDRSxrQkFBa0I7RUFDbEIsZUFBZTtFQUNmLGdCQUFnQjtFQUNoQixjQUFjO0VBQ2QsZUFBZTtFQUNmLGtCQUFrQjtBQUNwQjs7QUFFQTtFQUNFLGtCQUFrQjtFQUNsQixzQkFBc0I7QUFDeEI7O0FBRUE7RUFDRSxrQkFBa0I7RUFDbEIsdUJBQXVCO0FBQ3pCOztBQUVBO0VBQ0UscUJBQXFCO0FBQ3ZCOztBQUVBO0VBQ0UscUJBQXFCO0FBQ3ZCIiwiZmlsZSI6InRpbWVheGlzLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi52aXMtdGltZS1heGlzIHtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuICBvdmVyZmxvdzogaGlkZGVuO1xufVxuXG4udmlzLXRpbWUtYXhpcy52aXMtZm9yZW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ZXItY29sb3I6ICNiZmJmYmY7XG59XG4iXX0= */";
- styleInject(css_248z);
+ var css_248z$e = ".vis-time-axis {\n position: relative;\n overflow: hidden;\n}\n\n.vis-time-axis.vis-foreground {\n top: 0;\n left: 0;\n width: 100%;\n}\n\n.vis-time-axis.vis-background {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.vis-time-axis .vis-text {\n position: absolute;\n color: #4d4d4d;\n padding: 3px;\n overflow: hidden;\n box-sizing: border-box;\n\n white-space: nowrap;\n}\n\n.vis-time-axis .vis-text.vis-measure {\n position: absolute;\n padding-left: 0;\n padding-right: 0;\n margin-left: 0;\n margin-right: 0;\n visibility: hidden;\n}\n\n.vis-time-axis .vis-grid.vis-vertical {\n position: absolute;\n border-left: 1px solid;\n}\n\n.vis-time-axis .vis-grid.vis-vertical-rtl {\n position: absolute;\n border-right: 1px solid;\n}\n\n.vis-time-axis .vis-grid.vis-minor {\n border-color: #e5e5e5;\n}\n\n.vis-time-axis .vis-grid.vis-major {\n border-color: #bfbfbf;\n}\n";
+ styleInject(css_248z$e);
+ function _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
+
+ function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/** A horizontal time axis */
var TimeAxis = /*#__PURE__*/function (_Component) {
- inherits(TimeAxis, _Component);
+ _inherits(TimeAxis, _Component);
+
+ var _super = _createSuper$b(TimeAxis);
/**
* @param {{dom: Object, domProps: Object, emitter: Emitter, range: Range}} body
@@ -22188,9 +30159,9 @@
function TimeAxis(body, options) {
var _this;
- classCallCheck(this, TimeAxis);
+ _classCallCheck(this, TimeAxis);
- _this = possibleConstructorReturn(this, getPrototypeOf$5(TimeAxis).call(this));
+ _this = _super.call(this);
_this.dom = {
foreground: null,
lines: [],
@@ -22219,11 +30190,11 @@
showMajorLabels: true,
showWeekScale: false,
maxMinorChars: 7,
- format: TimeStep.FORMAT,
- moment: moment$1,
+ format: availableUtils.extend({}, TimeStep.FORMAT),
+ moment: moment$2,
timeAxis: null
};
- _this.options = util$1.extend({}, _this.defaultOptions);
+ _this.options = availableUtils.extend({}, _this.defaultOptions);
_this.body = body; // create the HTML DOM
_this._create();
@@ -22243,19 +30214,19 @@
*/
- createClass(TimeAxis, [{
+ _createClass(TimeAxis, [{
key: "setOptions",
value: function setOptions(options) {
if (options) {
// copy all options that we know
- util$1.selectiveExtend(['showMinorLabels', 'showMajorLabels', 'showWeekScale', 'maxMinorChars', 'hiddenDates', 'timeAxis', 'moment', 'rtl'], this.options, options); // deep copy the format options
+ availableUtils.selectiveExtend(['showMinorLabels', 'showMajorLabels', 'showWeekScale', 'maxMinorChars', 'hiddenDates', 'timeAxis', 'moment', 'rtl'], this.options, options); // deep copy the format options
- util$1.selectiveDeepExtend(['format'], this.options, options);
+ availableUtils.selectiveDeepExtend(['format'], this.options, options);
if ('orientation' in options) {
if (typeof options.orientation === 'string') {
this.options.orientation.axis = options.orientation;
- } else if (_typeof_1(options.orientation) === 'object' && 'axis' in options.orientation) {
+ } else if (_typeof$1(options.orientation) === 'object' && 'axis' in options.orientation) {
this.options.orientation.axis = options.orientation.axis;
}
} // apply locale to moment.js
@@ -22263,11 +30234,11 @@
if ('locale' in options) {
- if (typeof moment$1.locale === 'function') {
+ if (typeof moment$2.locale === 'function') {
// moment.js 2.8.1+
- moment$1.locale(options.locale);
+ moment$2.locale(options.locale);
} else {
- moment$1.lang(options.locale);
+ moment$2.lang(options.locale);
}
}
}
@@ -22367,8 +30338,8 @@
value: function _repaintLabels() {
var orientation = this.options.orientation.axis; // calculate range and step (step such that we have space for 7 characters per label)
- var start = util$1.convert(this.body.range.start, 'Number');
- var end = util$1.convert(this.body.range.end, 'Number');
+ var start = availableUtils.convert(this.body.range.start, 'Number');
+ var end = availableUtils.convert(this.body.range.end, 'Number');
var timeLabelsize = this.body.util.toTime((this.props.minorCharWidth || 10) * this.options.maxMinorChars).valueOf();
var minimumStep = timeLabelsize - getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this.body.range, timeLabelsize);
minimumStep -= this.body.util.toTime(0).valueOf();
@@ -22457,7 +30428,7 @@
} else {
if (line) {
// adjust the width of the previous grid
- line.style.width = "".concat(_parseInt$2(line.style.width) + width, "px");
+ line.style.width = "".concat(_parseInt(line.style.width) + width, "px");
}
}
}
@@ -22481,7 +30452,7 @@
} // Cleanup leftover DOM elements from the redundant list
- forEach$2(util$1).call(util$1, this.dom.redundant, function (arr) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.dom.redundant, function (arr) {
while (arr.length) {
var elem = arr.pop();
@@ -22516,7 +30487,7 @@
}
this.dom.minorTexts.push(label);
- label.innerHTML = text;
+ label.innerHTML = availableUtils.xss(text);
var y = orientation == 'top' ? this.props.majorLabelHeight : 0;
this._setXY(label, x, y);
@@ -22549,7 +30520,7 @@
this.dom.foreground.appendChild(label);
}
- label.childNodes[0].innerHTML = text;
+ label.childNodes[0].innerHTML = availableUtils.xss(text);
label.className = "vis-text vis-major ".concat(className); //label.title = title; // TODO: this is a heavy operation
var y = orientation == 'top' ? 0 : this.props.minorLabelHeight;
@@ -22574,7 +30545,7 @@
// If rtl is true, inverse x.
var directionX = this.options.rtl ? x * -1 : x;
- label.style.transform = concat$2(_context = "translate(".concat(directionX, "px, ")).call(_context, y, "px)");
+ label.style.transform = _concatInstanceProperty(_context = "translate(".concat(directionX, "px, ")).call(_context, y, "px)");
}
/**
* Create a minor line for the axis at position x
@@ -22609,7 +30580,7 @@
this._setXY(line, x, y);
- line.className = concat$2(_context2 = "vis-grid ".concat(this.options.rtl ? 'vis-vertical-rtl' : 'vis-vertical', " vis-minor ")).call(_context2, className);
+ line.className = _concatInstanceProperty(_context2 = "vis-grid ".concat(this.options.rtl ? 'vis-vertical-rtl' : 'vis-vertical', " vis-minor ")).call(_context2, className);
return line;
}
/**
@@ -22645,7 +30616,7 @@
this._setXY(line, x, y);
- line.className = concat$2(_context3 = "vis-grid ".concat(this.options.rtl ? 'vis-vertical-rtl' : 'vis-vertical', " vis-major ")).call(_context3, className);
+ line.className = _concatInstanceProperty(_context3 = "vis-grid ".concat(this.options.rtl ? 'vis-vertical-rtl' : 'vis-vertical', " vis-major ")).call(_context3, className);
return line;
}
/**
@@ -22689,310 +30660,294 @@
var warnedForOverflow = false;
- var keycharm = createCommonjsModule(function (module, exports) {
- /**
- * Created by Alex on 11/6/2014.
- */
- // https://github.com/umdjs/umd/blob/master/returnExports.js#L40-L60
- // if the module has no dependencies, the above pattern can be simplified to
+ /**
+ * Created by Alex on 11/6/2014.
+ */
+ function keycharm(options) {
+ var preventDefault = options && options.preventDefault || false;
+ var container = options && options.container || window;
+ var _exportFunctions = {};
+ var _bound = {
+ keydown: {},
+ keyup: {}
+ };
+ var _keys = {};
+ var i; // a - z
- (function (root, factory) {
- {
- // Node. Does not work with strict CommonJS, but
- // only CommonJS-like environments that support module.exports,
- // like Node.
- module.exports = factory();
+ for (i = 97; i <= 122; i++) {
+ _keys[String.fromCharCode(i)] = {
+ code: 65 + (i - 97),
+ shift: false
+ };
+ } // A - Z
+
+
+ for (i = 65; i <= 90; i++) {
+ _keys[String.fromCharCode(i)] = {
+ code: i,
+ shift: true
+ };
+ } // 0 - 9
+
+
+ for (i = 0; i <= 9; i++) {
+ _keys['' + i] = {
+ code: 48 + i,
+ shift: false
+ };
+ } // F1 - F12
+
+
+ for (i = 1; i <= 12; i++) {
+ _keys['F' + i] = {
+ code: 111 + i,
+ shift: false
+ };
+ } // num0 - num9
+
+
+ for (i = 0; i <= 9; i++) {
+ _keys['num' + i] = {
+ code: 96 + i,
+ shift: false
+ };
+ } // numpad misc
+
+
+ _keys['num*'] = {
+ code: 106,
+ shift: false
+ };
+ _keys['num+'] = {
+ code: 107,
+ shift: false
+ };
+ _keys['num-'] = {
+ code: 109,
+ shift: false
+ };
+ _keys['num/'] = {
+ code: 111,
+ shift: false
+ };
+ _keys['num.'] = {
+ code: 110,
+ shift: false
+ }; // arrows
+
+ _keys['left'] = {
+ code: 37,
+ shift: false
+ };
+ _keys['up'] = {
+ code: 38,
+ shift: false
+ };
+ _keys['right'] = {
+ code: 39,
+ shift: false
+ };
+ _keys['down'] = {
+ code: 40,
+ shift: false
+ }; // extra keys
+
+ _keys['space'] = {
+ code: 32,
+ shift: false
+ };
+ _keys['enter'] = {
+ code: 13,
+ shift: false
+ };
+ _keys['shift'] = {
+ code: 16,
+ shift: undefined
+ };
+ _keys['esc'] = {
+ code: 27,
+ shift: false
+ };
+ _keys['backspace'] = {
+ code: 8,
+ shift: false
+ };
+ _keys['tab'] = {
+ code: 9,
+ shift: false
+ };
+ _keys['ctrl'] = {
+ code: 17,
+ shift: false
+ };
+ _keys['alt'] = {
+ code: 18,
+ shift: false
+ };
+ _keys['delete'] = {
+ code: 46,
+ shift: false
+ };
+ _keys['pageup'] = {
+ code: 33,
+ shift: false
+ };
+ _keys['pagedown'] = {
+ code: 34,
+ shift: false
+ }; // symbols
+
+ _keys['='] = {
+ code: 187,
+ shift: false
+ };
+ _keys['-'] = {
+ code: 189,
+ shift: false
+ };
+ _keys[']'] = {
+ code: 221,
+ shift: false
+ };
+ _keys['['] = {
+ code: 219,
+ shift: false
+ };
+
+ var down = function (event) {
+ handleEvent(event, 'keydown');
+ };
+
+ var up = function (event) {
+ handleEvent(event, 'keyup');
+ }; // handle the actualy bound key with the event
+
+
+ var handleEvent = function (event, type) {
+ if (_bound[type][event.keyCode] !== undefined) {
+ var bound = _bound[type][event.keyCode];
+
+ for (var i = 0; i < bound.length; i++) {
+ if (bound[i].shift === undefined) {
+ bound[i].fn(event);
+ } else if (bound[i].shift == true && event.shiftKey == true) {
+ bound[i].fn(event);
+ } else if (bound[i].shift == false && event.shiftKey == false) {
+ bound[i].fn(event);
+ }
+ }
+
+ if (preventDefault == true) {
+ event.preventDefault();
+ }
}
- })(commonjsGlobal, function () {
- function keycharm(options) {
- var preventDefault = options && options.preventDefault || false;
- var container = options && options.container || window;
- var _exportFunctions = {};
- var _bound = {
- keydown: {},
- keyup: {}
- };
- var _keys = {};
- var i; // a - z
-
- for (i = 97; i <= 122; i++) {
- _keys[String.fromCharCode(i)] = {
- code: 65 + (i - 97),
- shift: false
- };
- } // A - Z
+ }; // bind a key to a callback
- for (i = 65; i <= 90; i++) {
- _keys[String.fromCharCode(i)] = {
- code: i,
- shift: true
- };
- } // 0 - 9
-
-
- for (i = 0; i <= 9; i++) {
- _keys['' + i] = {
- code: 48 + i,
- shift: false
- };
- } // F1 - F12
-
-
- for (i = 1; i <= 12; i++) {
- _keys['F' + i] = {
- code: 111 + i,
- shift: false
- };
- } // num0 - num9
-
-
- for (i = 0; i <= 9; i++) {
- _keys['num' + i] = {
- code: 96 + i,
- shift: false
- };
- } // numpad misc
-
-
- _keys['num*'] = {
- code: 106,
- shift: false
- };
- _keys['num+'] = {
- code: 107,
- shift: false
- };
- _keys['num-'] = {
- code: 109,
- shift: false
- };
- _keys['num/'] = {
- code: 111,
- shift: false
- };
- _keys['num.'] = {
- code: 110,
- shift: false
- }; // arrows
-
- _keys['left'] = {
- code: 37,
- shift: false
- };
- _keys['up'] = {
- code: 38,
- shift: false
- };
- _keys['right'] = {
- code: 39,
- shift: false
- };
- _keys['down'] = {
- code: 40,
- shift: false
- }; // extra keys
-
- _keys['space'] = {
- code: 32,
- shift: false
- };
- _keys['enter'] = {
- code: 13,
- shift: false
- };
- _keys['shift'] = {
- code: 16,
- shift: undefined
- };
- _keys['esc'] = {
- code: 27,
- shift: false
- };
- _keys['backspace'] = {
- code: 8,
- shift: false
- };
- _keys['tab'] = {
- code: 9,
- shift: false
- };
- _keys['ctrl'] = {
- code: 17,
- shift: false
- };
- _keys['alt'] = {
- code: 18,
- shift: false
- };
- _keys['delete'] = {
- code: 46,
- shift: false
- };
- _keys['pageup'] = {
- code: 33,
- shift: false
- };
- _keys['pagedown'] = {
- code: 34,
- shift: false
- }; // symbols
-
- _keys['='] = {
- code: 187,
- shift: false
- };
- _keys['-'] = {
- code: 189,
- shift: false
- };
- _keys[']'] = {
- code: 221,
- shift: false
- };
- _keys['['] = {
- code: 219,
- shift: false
- };
-
- var down = function (event) {
- handleEvent(event, 'keydown');
- };
-
- var up = function (event) {
- handleEvent(event, 'keyup');
- }; // handle the actualy bound key with the event
-
-
- var handleEvent = function (event, type) {
- if (_bound[type][event.keyCode] !== undefined) {
- var bound = _bound[type][event.keyCode];
-
- for (var i = 0; i < bound.length; i++) {
- if (bound[i].shift === undefined) {
- bound[i].fn(event);
- } else if (bound[i].shift == true && event.shiftKey == true) {
- bound[i].fn(event);
- } else if (bound[i].shift == false && event.shiftKey == false) {
- bound[i].fn(event);
- }
- }
-
- if (preventDefault == true) {
- event.preventDefault();
- }
- }
- }; // bind a key to a callback
-
-
- _exportFunctions.bind = function (key, callback, type) {
- if (type === undefined) {
- type = 'keydown';
- }
-
- if (_keys[key] === undefined) {
- throw new Error("unsupported key: " + key);
- }
-
- if (_bound[type][_keys[key].code] === undefined) {
- _bound[type][_keys[key].code] = [];
- }
-
- _bound[type][_keys[key].code].push({
- fn: callback,
- shift: _keys[key].shift
- });
- }; // bind all keys to a call back (demo purposes)
-
-
- _exportFunctions.bindAll = function (callback, type) {
- if (type === undefined) {
- type = 'keydown';
- }
-
- for (var key in _keys) {
- if (_keys.hasOwnProperty(key)) {
- _exportFunctions.bind(key, callback, type);
- }
- }
- }; // get the key label from an event
-
-
- _exportFunctions.getKey = function (event) {
- for (var key in _keys) {
- if (_keys.hasOwnProperty(key)) {
- if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) {
- return key;
- } else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) {
- return key;
- } else if (event.keyCode == _keys[key].code && key == 'shift') {
- return key;
- }
- }
- }
-
- return "unknown key, currently not supported";
- }; // unbind either a specific callback from a key or all of them (by leaving callback undefined)
-
-
- _exportFunctions.unbind = function (key, callback, type) {
- if (type === undefined) {
- type = 'keydown';
- }
-
- if (_keys[key] === undefined) {
- throw new Error("unsupported key: " + key);
- }
-
- if (callback !== undefined) {
- var newBindings = [];
- var bound = _bound[type][_keys[key].code];
-
- if (bound !== undefined) {
- for (var i = 0; i < bound.length; i++) {
- if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) {
- newBindings.push(_bound[type][_keys[key].code][i]);
- }
- }
- }
-
- _bound[type][_keys[key].code] = newBindings;
- } else {
- _bound[type][_keys[key].code] = [];
- }
- }; // reset all bound variables.
-
-
- _exportFunctions.reset = function () {
- _bound = {
- keydown: {},
- keyup: {}
- };
- }; // unbind all listeners and reset all variables.
-
-
- _exportFunctions.destroy = function () {
- _bound = {
- keydown: {},
- keyup: {}
- };
- container.removeEventListener('keydown', down, true);
- container.removeEventListener('keyup', up, true);
- }; // create listeners.
-
-
- container.addEventListener('keydown', down, true);
- container.addEventListener('keyup', up, true); // return the public functions.
-
- return _exportFunctions;
+ _exportFunctions.bind = function (key, callback, type) {
+ if (type === undefined) {
+ type = 'keydown';
}
- return keycharm;
- });
- });
+ if (_keys[key] === undefined) {
+ throw new Error("unsupported key: " + key);
+ }
- var css_248z$1 = ".vis .overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n /* Must be displayed above for example selected Timeline items */\n z-index: 10;\n}\n\n.vis-active {\n box-shadow: 0 0 10px #86d5f8;\n}\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFjdGl2YXRvci5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxrQkFBa0I7RUFDbEIsTUFBTTtFQUNOLE9BQU87RUFDUCxXQUFXO0VBQ1gsWUFBWTs7RUFFWixnRUFBZ0U7RUFDaEUsV0FBVztBQUNiOztBQUVBO0VBQ0UsNEJBQTRCO0FBQzlCIiwiZmlsZSI6ImFjdGl2YXRvci5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIudmlzIC5vdmVybGF5IHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICB0b3A6IDA7XG4gIGxlZnQ6IDA7XG4gIHdpZHRoOiAxMDAlO1xuICBoZWlnaHQ6IDEwMCU7XG5cbiAgLyogTXVzdCBiZSBkaXNwbGF5ZWQgYWJvdmUgZm9yIGV4YW1wbGUgc2VsZWN0ZWQgVGltZWxpbmUgaXRlbXMgKi9cbiAgei1pbmRleDogMTA7XG59XG5cbi52aXMtYWN0aXZlIHtcbiAgYm94LXNoYWRvdzogMCAwIDEwcHggIzg2ZDVmODtcbn1cbiJdfQ== */";
- styleInject(css_248z$1);
+ if (_bound[type][_keys[key].code] === undefined) {
+ _bound[type][_keys[key].code] = [];
+ }
+
+ _bound[type][_keys[key].code].push({
+ fn: callback,
+ shift: _keys[key].shift
+ });
+ }; // bind all keys to a call back (demo purposes)
+
+
+ _exportFunctions.bindAll = function (callback, type) {
+ if (type === undefined) {
+ type = 'keydown';
+ }
+
+ for (var key in _keys) {
+ if (_keys.hasOwnProperty(key)) {
+ _exportFunctions.bind(key, callback, type);
+ }
+ }
+ }; // get the key label from an event
+
+
+ _exportFunctions.getKey = function (event) {
+ for (var key in _keys) {
+ if (_keys.hasOwnProperty(key)) {
+ if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) {
+ return key;
+ } else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) {
+ return key;
+ } else if (event.keyCode == _keys[key].code && key == 'shift') {
+ return key;
+ }
+ }
+ }
+
+ return "unknown key, currently not supported";
+ }; // unbind either a specific callback from a key or all of them (by leaving callback undefined)
+
+
+ _exportFunctions.unbind = function (key, callback, type) {
+ if (type === undefined) {
+ type = 'keydown';
+ }
+
+ if (_keys[key] === undefined) {
+ throw new Error("unsupported key: " + key);
+ }
+
+ if (callback !== undefined) {
+ var newBindings = [];
+ var bound = _bound[type][_keys[key].code];
+
+ if (bound !== undefined) {
+ for (var i = 0; i < bound.length; i++) {
+ if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) {
+ newBindings.push(_bound[type][_keys[key].code][i]);
+ }
+ }
+ }
+
+ _bound[type][_keys[key].code] = newBindings;
+ } else {
+ _bound[type][_keys[key].code] = [];
+ }
+ }; // reset all bound variables.
+
+
+ _exportFunctions.reset = function () {
+ _bound = {
+ keydown: {},
+ keyup: {}
+ };
+ }; // unbind all listeners and reset all variables.
+
+
+ _exportFunctions.destroy = function () {
+ _bound = {
+ keydown: {},
+ keyup: {}
+ };
+ container.removeEventListener('keydown', down, true);
+ container.removeEventListener('keyup', up, true);
+ }; // create listeners.
+
+
+ container.addEventListener('keydown', down, true);
+ container.addEventListener('keyup', up, true); // return the public functions.
+
+ return _exportFunctions;
+ }
+
+ var css_248z$d = ".vis .overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n /* Must be displayed above for example selected Timeline items */\n z-index: 10;\n}\n\n.vis-active {\n box-shadow: 0 0 10px #86d5f8;\n}\n";
+ styleInject(css_248z$d);
/**
* Turn an element into an clickToUse element.
@@ -23015,13 +30970,13 @@
this.dom.overlay = document.createElement('div');
this.dom.overlay.className = 'vis-overlay';
this.dom.container.appendChild(this.dom.overlay);
- this.hammer = Hammer$1(this.dom.overlay);
- this.hammer.on('tap', bind$2(_context = this._onTapOverlay).call(_context, this)); // block all touch events (except tap)
+ this.hammer = Hammer(this.dom.overlay);
+ this.hammer.on('tap', _bindInstanceProperty$1(_context = this._onTapOverlay).call(_context, this)); // block all touch events (except tap)
var me = this;
var events = ['tap', 'doubletap', 'press', 'pinch', 'pan', 'panstart', 'panmove', 'panend'];
- forEach$2(events).call(events, function (event) {
+ _forEachInstanceProperty(events).call(events, function (event) {
me.hammer.on(event, function (event) {
event.stopPropagation();
});
@@ -23044,11 +30999,11 @@
this.keycharm = keycharm(); // keycharm listener only bounded when active)
- this.escListener = bind$2(_context2 = this.deactivate).call(_context2, this);
+ this.escListener = _bindInstanceProperty$1(_context2 = this.deactivate).call(_context2, this);
} // turn into an event emitter
- componentEmitter(Activator.prototype); // The currently active activator
+ Emitter(Activator.prototype); // The currently active activator
Activator.current = null;
/**
@@ -23091,12 +31046,12 @@
Activator.current = this;
this.active = true;
this.dom.overlay.style.display = 'none';
- util$1.addClassName(this.dom.container, 'vis-active');
+ availableUtils.addClassName(this.dom.container, 'vis-active');
this.emit('change');
this.emit('activate'); // ugly hack: bind ESC after emitting the events, as the Network rebinds all
// keyboard events on a 'change' event
- bind$2(_context3 = this.keycharm).call(_context3, 'esc', this.escListener);
+ _bindInstanceProperty$1(_context3 = this.keycharm).call(_context3, 'esc', this.escListener);
};
/**
* Deactivate the element
@@ -23111,7 +31066,7 @@
this.active = false;
this.dom.overlay.style.display = '';
- util$1.removeClassName(this.dom.container, 'vis-active');
+ availableUtils.removeClassName(this.dom.container, 'vis-active');
this.keycharm.unbind('esc', this.escListener);
this.emit('change');
this.emit('deactivate');
@@ -23164,107 +31119,154 @@
var en_EN = en;
var en_US = en; // Italiano
- var it$1 = {
+ var it = {
current: 'attuale',
time: 'tempo',
deleteSelected: 'Cancella la selezione'
};
- var it_IT = it$1;
- var it_CH = it$1; // Dutch
+ var it_IT = it;
+ var it_CH = it; // Dutch
- var nl$1 = {
+ var nl = {
current: 'huidige',
time: 'tijd',
deleteSelected: 'Selectie verwijderen'
};
- var nl_NL = nl$1;
- var nl_BE = nl$1; // German
+ var nl_NL = nl;
+ var nl_BE = nl; // German
- var de$1 = {
+ var de = {
current: 'Aktuelle',
time: 'Zeit',
deleteSelected: "L\xF6sche Auswahl"
};
- var de_DE = de$1; // French
+ var de_DE = de; // French
- var fr$1 = {
+ var fr = {
current: 'actuel',
time: 'heure',
deleteSelected: 'Effacer la selection'
};
- var fr_FR = fr$1;
- var fr_CA = fr$1;
- var fr_BE = fr$1; // Espanol
+ var fr_FR = fr;
+ var fr_CA = fr;
+ var fr_BE = fr; // Espanol
- var es$1 = {
+ var es = {
current: 'corriente',
time: 'hora',
deleteSelected: "Eliminar selecci\xF3n"
};
- var es_ES = es$1; // Ukrainian
+ var es_ES = es; // Ukrainian
- var uk$1 = {
+ var uk = {
current: 'поточний',
time: 'час',
deleteSelected: 'Видалити обране'
};
- var uk_UA = uk$1; // Russian
+ var uk_UA = uk; // Russian
- var ru$1 = {
+ var ru = {
current: 'текущее',
time: 'время',
deleteSelected: 'Удалить выбранное'
};
- var ru_RU = ru$1; // Polish
+ var ru_RU = ru; // Polish
- var pl$1 = {
+ var pl = {
current: 'aktualny',
time: 'czas',
deleteSelected: 'Usuń wybrane'
};
- var pl_PL = pl$1; // Japanese
+ var pl_PL = pl; // Portuguese
- var ja$1 = {
+ var pt = {
+ current: 'atual',
+ time: 'data',
+ deleteSelected: 'Apagar selecionado'
+ };
+ var pt_BR = pt;
+ var pt_PT = pt; // Japanese
+
+ var ja = {
current: '現在',
time: '時刻',
deleteSelected: '選択されたものを削除'
};
- var ja_JP = ja$1;
+ var ja_JP = ja; // Swedish
+
+ var sv = {
+ current: 'nuvarande',
+ time: 'tid',
+ deleteSelected: 'Radera valda'
+ };
+ var sv_SE = sv; // Norwegian
+
+ var nb = {
+ current: 'nåværende',
+ time: 'tid',
+ deleteSelected: 'Slett valgte'
+ };
+ var nb_NO = nb;
+ var nn = nb;
+ var nn_NO = nb; // Lithuanian
+
+ var lt = {
+ current: 'einamas',
+ time: 'laikas',
+ deleteSelected: 'Pašalinti pasirinktą'
+ };
+ var lt_LT = lt;
var locales = {
en: en,
en_EN: en_EN,
en_US: en_US,
- it: it$1,
+ it: it,
it_IT: it_IT,
it_CH: it_CH,
- nl: nl$1,
+ nl: nl,
nl_NL: nl_NL,
nl_BE: nl_BE,
- de: de$1,
+ de: de,
de_DE: de_DE,
- fr: fr$1,
+ fr: fr,
fr_FR: fr_FR,
fr_CA: fr_CA,
fr_BE: fr_BE,
- es: es$1,
+ es: es,
es_ES: es_ES,
- uk: uk$1,
+ uk: uk,
uk_UA: uk_UA,
- ru: ru$1,
+ ru: ru,
ru_RU: ru_RU,
- pl: pl$1,
+ pl: pl,
pl_PL: pl_PL,
- ja: ja$1,
- ja_JP: ja_JP
+ pt: pt,
+ pt_BR: pt_BR,
+ pt_PT: pt_PT,
+ ja: ja,
+ ja_JP: ja_JP,
+ lt: lt,
+ lt_LT: lt_LT,
+ sv: sv,
+ sv_SE: sv_SE,
+ nb: nb,
+ nn: nn,
+ nb_NO: nb_NO,
+ nn_NO: nn_NO
};
- var css_248z$2 = ".vis-custom-time {\n background-color: #6E94FF;\n width: 2px;\n cursor: move;\n z-index: 1;\n}\n\n.vis-custom-time > .vis-custom-time-marker {\n background-color: inherit;\n color: white;\n font-size: 12px;\n white-space: nowrap;\n padding: 3px 5px;\n top: 0px;\n cursor: initial;\n z-index: inherit;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbXRpbWUuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UseUJBQXlCO0VBQ3pCLFVBQVU7RUFDVixZQUFZO0VBQ1osVUFBVTtBQUNaOztBQUVBO0VBQ0UseUJBQXlCO0VBQ3pCLFlBQVk7RUFDWixlQUFlO0VBQ2YsbUJBQW1CO0VBQ25CLGdCQUFnQjtFQUNoQixRQUFRO0VBQ1IsZUFBZTtFQUNmLGdCQUFnQjtBQUNsQiIsImZpbGUiOiJjdXN0b210aW1lLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi52aXMtY3VzdG9tLXRpbWUge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjNkU5NEZGO1xuICB3aWR0aDogMnB4O1xuICBjdXJzb3I6IG1vdmU7XG4gIHotaW5kZXg6IDE7XG59XG5cbi52aXMtY3VzdG9tLXRpbWUgPiAudmlzLWN1c3RvbS10aW1lLW1hcmtlciB7XG4gIGJhY2tncm91bmQtY29sb3I6IGluaGVyaXQ7XG4gIGNvbG9yOiB3aGl0ZTtcbiAgZm9udC1zaXplOiAxMnB4O1xuICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICBwYWRkaW5nOiAzcHggNXB4O1xuICB0b3A6IDBweDtcbiAgY3Vyc29yOiBpbml0aWFsO1xuICB6LWluZGV4OiBpbmhlcml0O1xufSJdfQ== */";
- styleInject(css_248z$2);
+ var css_248z$c = ".vis-custom-time {\n background-color: #6E94FF;\n width: 2px;\n cursor: move;\n z-index: 1;\n}\n\n.vis-custom-time > .vis-custom-time-marker {\n background-color: inherit;\n color: white;\n font-size: 12px;\n white-space: nowrap;\n padding: 3px 5px;\n top: 0px;\n cursor: initial;\n z-index: inherit;\n}";
+ styleInject(css_248z$c);
+ function _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
+
+ function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/** A custom time bar */
var CustomTime = /*#__PURE__*/function (_Component) {
- inherits(CustomTime, _Component);
+ _inherits(CustomTime, _Component);
+
+ var _super = _createSuper$a(CustomTime);
/**
* @param {{range: Range, dom: Object}} body
@@ -23280,27 +31282,27 @@
var _this;
- classCallCheck(this, CustomTime);
+ _classCallCheck(this, CustomTime);
- _this = possibleConstructorReturn(this, getPrototypeOf$5(CustomTime).call(this));
+ _this = _super.call(this);
_this.body = body; // default options
_this.defaultOptions = {
- moment: moment$1,
+ moment: moment$2,
locales: locales,
locale: 'en',
id: undefined,
title: undefined
};
- _this.options = util$1.extend({}, _this.defaultOptions);
+ _this.options = availableUtils.extend({}, _this.defaultOptions);
_this.setOptions(options);
- _this.options.locales = util$1.extend({}, locales, _this.options.locales);
+ _this.options.locales = availableUtils.extend({}, locales, _this.options.locales);
var defaultLocales = _this.defaultOptions.locales[_this.defaultOptions.locale];
- forEach$2(_context = keys$3(_this.options.locales)).call(_context, function (locale) {
- _this.options.locales[locale] = util$1.extend({}, defaultLocales, _this.options.locales[locale]);
+ _forEachInstanceProperty(_context = _Object$keys(_this.options.locales)).call(_context, function (locale) {
+ _this.options.locales[locale] = availableUtils.extend({}, defaultLocales, _this.options.locales[locale]);
});
if (options && options.time != null) {
@@ -23325,12 +31327,12 @@
*/
- createClass(CustomTime, [{
+ _createClass(CustomTime, [{
key: "setOptions",
value: function setOptions(options) {
if (options) {
// copy all options that we know
- util$1.selectiveExtend(['moment', 'locale', 'locales', 'id', 'title', 'rtl', 'snap'], this.options, options);
+ availableUtils.selectiveExtend(['moment', 'locale', 'locales', 'id', 'title', 'rtl', 'snap'], this.options, options);
}
}
/**
@@ -23373,23 +31375,27 @@
if (drag.addEventListener) {
// IE9, Chrome, Safari, Opera
- drag.addEventListener("mousewheel", bind$2(onMouseWheel).call(onMouseWheel, this), false); // Firefox
+ drag.addEventListener("mousewheel", _bindInstanceProperty$1(onMouseWheel).call(onMouseWheel, this), false); // Firefox
- drag.addEventListener("DOMMouseScroll", bind$2(onMouseWheel).call(onMouseWheel, this), false);
+ drag.addEventListener("DOMMouseScroll", _bindInstanceProperty$1(onMouseWheel).call(onMouseWheel, this), false);
} else {
// IE 6/7/8
- drag.attachEvent("onmousewheel", bind$2(onMouseWheel).call(onMouseWheel, this));
+ drag.attachEvent("onmousewheel", _bindInstanceProperty$1(onMouseWheel).call(onMouseWheel, this));
}
bar.appendChild(drag); // attach event listeners
- this.hammer = new Hammer$1(drag);
- this.hammer.on('panstart', bind$2(_context2 = this._onDragStart).call(_context2, this));
- this.hammer.on('panmove', bind$2(_context3 = this._onDrag).call(_context3, this));
- this.hammer.on('panend', bind$2(_context4 = this._onDragEnd).call(_context4, this));
+ this.hammer = new Hammer(drag);
+ this.hammer.on('panstart', _bindInstanceProperty$1(_context2 = this._onDragStart).call(_context2, this));
+ this.hammer.on('panmove', _bindInstanceProperty$1(_context3 = this._onDrag).call(_context3, this));
+ this.hammer.on('panend', _bindInstanceProperty$1(_context4 = this._onDragEnd).call(_context4, this));
this.hammer.get('pan').set({
threshold: 5,
- direction: Hammer$1.DIRECTION_ALL
+ direction: Hammer.DIRECTION_ALL
+ }); // delay addition on item click for trackpads...
+
+ this.hammer.get('press').set({
+ time: 10000
});
}
/**
@@ -23440,7 +31446,7 @@
if (title === undefined) {
var _context5;
- title = concat$2(_context5 = "".concat(locale.time, ": ")).call(_context5, this.options.moment(this.customTime).format('dddd, MMMM Do YYYY, H:mm:ss'));
+ title = _concatInstanceProperty(_context5 = "".concat(locale.time, ": ")).call(_context5, this.options.moment(this.customTime).format('dddd, MMMM Do YYYY, H:mm:ss'));
title = title.charAt(0).toUpperCase() + title.substring(1);
} else if (typeof title === "function") {
title = title.call(this, this.customTime);
@@ -23470,7 +31476,7 @@
}, {
key: "setCustomTime",
value: function setCustomTime(time) {
- this.customTime = util$1.convert(time, 'Date');
+ this.customTime = availableUtils.convert(time, 'Date');
this.redraw();
}
/**
@@ -23494,7 +31500,7 @@
value: function setCustomMarker(title, editable) {
var marker = document.createElement('div');
marker.className = "vis-custom-time-marker";
- marker.innerHTML = title;
+ marker.innerHTML = availableUtils.xss(title);
marker.style.position = 'absolute';
if (editable) {
@@ -23504,10 +31510,10 @@
marker.addEventListener('pointerdown', function () {
marker.focus();
});
- marker.addEventListener('input', bind$2(_context6 = this._onMarkerChange).call(_context6, this)); // The editable div element has no change event, so here emulates the change event.
+ marker.addEventListener('input', _bindInstanceProperty$1(_context6 = this._onMarkerChange).call(_context6, this)); // The editable div element has no change event, so here emulates the change event.
marker.title = title;
- marker.addEventListener('blur', bind$2(_context7 = function _context7(event) {
+ marker.addEventListener('blur', _bindInstanceProperty$1(_context7 = function _context7(event) {
if (this.title != event.target.innerHTML) {
this._onMarkerChanged(event);
@@ -23644,23 +31650,23 @@
return CustomTime;
}(Component);
- var css_248z$3 = ".vis-timeline {\n /*\n -webkit-transition: height .4s ease-in-out;\n transition: height .4s ease-in-out;\n */\n}\n\n.vis-panel {\n /*\n -webkit-transition: height .4s ease-in-out, top .4s ease-in-out;\n transition: height .4s ease-in-out, top .4s ease-in-out;\n */\n}\n\n.vis-axis {\n /*\n -webkit-transition: top .4s ease-in-out;\n transition: top .4s ease-in-out;\n */\n}\n\n/* TODO: get animation working nicely\n\n.vis-item {\n -webkit-transition: top .4s ease-in-out;\n transition: top .4s ease-in-out;\n}\n\n.vis-item.line {\n -webkit-transition: height .4s ease-in-out, top .4s ease-in-out;\n transition: height .4s ease-in-out, top .4s ease-in-out;\n}\n/**/\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFuaW1hdGlvbi5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRTs7O0dBR0M7QUFDSDs7QUFFQTtFQUNFOzs7R0FHQztBQUNIOztBQUVBO0VBQ0U7OztHQUdDO0FBQ0g7O0FBRUE7Ozs7Ozs7Ozs7O0dBV0ciLCJmaWxlIjoiYW5pbWF0aW9uLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi52aXMtdGltZWxpbmUge1xuICAvKlxuICAtd2Via2l0LXRyYW5zaXRpb246IGhlaWdodCAuNHMgZWFzZS1pbi1vdXQ7XG4gIHRyYW5zaXRpb246ICAgICAgICAgaGVpZ2h0IC40cyBlYXNlLWluLW91dDtcbiAgKi9cbn1cblxuLnZpcy1wYW5lbCB7XG4gIC8qXG4gIC13ZWJraXQtdHJhbnNpdGlvbjogaGVpZ2h0IC40cyBlYXNlLWluLW91dCwgdG9wIC40cyBlYXNlLWluLW91dDtcbiAgdHJhbnNpdGlvbjogICAgICAgICBoZWlnaHQgLjRzIGVhc2UtaW4tb3V0LCB0b3AgLjRzIGVhc2UtaW4tb3V0O1xuICAqL1xufVxuXG4udmlzLWF4aXMge1xuICAvKlxuICAtd2Via2l0LXRyYW5zaXRpb246IHRvcCAuNHMgZWFzZS1pbi1vdXQ7XG4gIHRyYW5zaXRpb246ICAgICAgICAgdG9wIC40cyBlYXNlLWluLW91dDtcbiAgKi9cbn1cblxuLyogVE9ETzogZ2V0IGFuaW1hdGlvbiB3b3JraW5nIG5pY2VseVxuXG4udmlzLWl0ZW0ge1xuICAtd2Via2l0LXRyYW5zaXRpb246IHRvcCAuNHMgZWFzZS1pbi1vdXQ7XG4gIHRyYW5zaXRpb246ICAgICAgICAgdG9wIC40cyBlYXNlLWluLW91dDtcbn1cblxuLnZpcy1pdGVtLmxpbmUge1xuICAtd2Via2l0LXRyYW5zaXRpb246IGhlaWdodCAuNHMgZWFzZS1pbi1vdXQsIHRvcCAuNHMgZWFzZS1pbi1vdXQ7XG4gIHRyYW5zaXRpb246ICAgICAgICAgaGVpZ2h0IC40cyBlYXNlLWluLW91dCwgdG9wIC40cyBlYXNlLWluLW91dDtcbn1cbi8qKi8iXX0= */";
- styleInject(css_248z$3);
+ var css_248z$b = ".vis-timeline {\n /*\n -webkit-transition: height .4s ease-in-out;\n transition: height .4s ease-in-out;\n */\n}\n\n.vis-panel {\n /*\n -webkit-transition: height .4s ease-in-out, top .4s ease-in-out;\n transition: height .4s ease-in-out, top .4s ease-in-out;\n */\n}\n\n.vis-axis {\n /*\n -webkit-transition: top .4s ease-in-out;\n transition: top .4s ease-in-out;\n */\n}\n\n/* TODO: get animation working nicely\n\n.vis-item {\n -webkit-transition: top .4s ease-in-out;\n transition: top .4s ease-in-out;\n}\n\n.vis-item.line {\n -webkit-transition: height .4s ease-in-out, top .4s ease-in-out;\n transition: height .4s ease-in-out, top .4s ease-in-out;\n}\n/**/";
+ styleInject(css_248z$b);
- var css_248z$4 = ".vis-current-time {\n background-color: #FF7F6E;\n width: 2px;\n z-index: 1;\n pointer-events: none;\n}\n\n.vis-rolling-mode-btn {\n height: 40px;\n width: 40px;\n position: absolute;\n top: 7px;\n right: 20px;\n border-radius: 50%;\n font-size: 28px;\n cursor: pointer;\n opacity: 0.8;\n color: white;\n font-weight: bold;\n text-align: center;\n background: #3876c2;\n}\n.vis-rolling-mode-btn:before {\n content: \"\\26F6\";\n}\n\n.vis-rolling-mode-btn:hover {\n opacity: 1;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1cnJlbnR0aW1lLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLHlCQUF5QjtFQUN6QixVQUFVO0VBQ1YsVUFBVTtFQUNWLG9CQUFvQjtBQUN0Qjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsa0JBQWtCO0VBQ2xCLFFBQVE7RUFDUixXQUFXO0VBQ1gsa0JBQWtCO0VBQ2xCLGVBQWU7RUFDZixlQUFlO0VBQ2YsWUFBWTtFQUNaLFlBQVk7RUFDWixpQkFBaUI7RUFDakIsa0JBQWtCO0VBQ2xCLG1CQUFtQjtBQUNyQjtBQUNBO0VBQ0UsZ0JBQWdCO0FBQ2xCOztBQUVBO0VBQ0UsVUFBVTtBQUNaIiwiZmlsZSI6ImN1cnJlbnR0aW1lLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi52aXMtY3VycmVudC10aW1lIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogI0ZGN0Y2RTtcbiAgd2lkdGg6IDJweDtcbiAgei1pbmRleDogMTtcbiAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG59XG5cbi52aXMtcm9sbGluZy1tb2RlLWJ0biB7XG4gIGhlaWdodDogNDBweDtcbiAgd2lkdGg6IDQwcHg7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgdG9wOiA3cHg7XG4gIHJpZ2h0OiAyMHB4O1xuICBib3JkZXItcmFkaXVzOiA1MCU7XG4gIGZvbnQtc2l6ZTogMjhweDtcbiAgY3Vyc29yOiBwb2ludGVyO1xuICBvcGFjaXR5OiAwLjg7XG4gIGNvbG9yOiB3aGl0ZTtcbiAgZm9udC13ZWlnaHQ6IGJvbGQ7XG4gIHRleHQtYWxpZ246IGNlbnRlcjtcbiAgYmFja2dyb3VuZDogIzM4NzZjMjtcbn1cbi52aXMtcm9sbGluZy1tb2RlLWJ0bjpiZWZvcmUge1xuICBjb250ZW50OiBcIlxcMjZGNlwiO1xufVxuXG4udmlzLXJvbGxpbmctbW9kZS1idG46aG92ZXIge1xuICBvcGFjaXR5OiAxO1xufSJdfQ== */";
- styleInject(css_248z$4);
+ var css_248z$a = ".vis-current-time {\n background-color: #FF7F6E;\n width: 2px;\n z-index: 1;\n pointer-events: none;\n}\n\n.vis-rolling-mode-btn {\n height: 40px;\n width: 40px;\n position: absolute;\n top: 7px;\n right: 20px;\n border-radius: 50%;\n font-size: 28px;\n cursor: pointer;\n opacity: 0.8;\n color: white;\n font-weight: bold;\n text-align: center;\n background: #3876c2;\n}\n.vis-rolling-mode-btn:before {\n content: \"\\26F6\";\n}\n\n.vis-rolling-mode-btn:hover {\n opacity: 1;\n}";
+ styleInject(css_248z$a);
- var css_248z$5 = ".vis-panel {\n position: absolute;\n\n padding: 0;\n margin: 0;\n\n box-sizing: border-box;\n}\n\n.vis-panel.vis-center,\n.vis-panel.vis-left,\n.vis-panel.vis-right,\n.vis-panel.vis-top,\n.vis-panel.vis-bottom {\n border: 1px #bfbfbf;\n}\n\n.vis-panel.vis-center,\n.vis-panel.vis-left,\n.vis-panel.vis-right {\n border-top-style: solid;\n border-bottom-style: solid;\n overflow: hidden;\n}\n\n.vis-left.vis-panel.vis-vertical-scroll, .vis-right.vis-panel.vis-vertical-scroll {\n height: 100%;\n overflow-x: hidden;\n overflow-y: scroll;\n} \n\n.vis-left.vis-panel.vis-vertical-scroll {\n direction: rtl;\n}\n\n.vis-left.vis-panel.vis-vertical-scroll .vis-content {\n direction: ltr;\n}\n\n.vis-right.vis-panel.vis-vertical-scroll {\n direction: ltr;\n}\n\n.vis-right.vis-panel.vis-vertical-scroll .vis-content {\n direction: rtl;\n}\n\n.vis-panel.vis-center,\n.vis-panel.vis-top,\n.vis-panel.vis-bottom {\n border-left-style: solid;\n border-right-style: solid;\n}\n\n.vis-background {\n overflow: hidden;\n}\n\n.vis-panel > .vis-content {\n position: relative;\n}\n\n.vis-panel .vis-shadow {\n position: absolute;\n width: 100%;\n height: 1px;\n box-shadow: 0 0 10px rgba(0,0,0,0.8);\n /* TODO: find a nice way to ensure vis-shadows are drawn on top of items\n z-index: 1;\n */\n}\n\n.vis-panel .vis-shadow.vis-top {\n top: -1px;\n left: 0;\n}\n\n.vis-panel .vis-shadow.vis-bottom {\n bottom: -1px;\n left: 0;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhbmVsLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGtCQUFrQjs7RUFFbEIsVUFBVTtFQUNWLFNBQVM7O0VBRVQsc0JBQXNCO0FBQ3hCOztBQUVBOzs7OztFQUtFLG1CQUFtQjtBQUNyQjs7QUFFQTs7O0VBR0UsdUJBQXVCO0VBQ3ZCLDBCQUEwQjtFQUMxQixnQkFBZ0I7QUFDbEI7O0FBRUE7RUFDRSxZQUFZO0VBQ1osa0JBQWtCO0VBQ2xCLGtCQUFrQjtBQUNwQjs7QUFFQTtFQUNFLGNBQWM7QUFDaEI7O0FBRUE7RUFDRSxjQUFjO0FBQ2hCOztBQUVBO0VBQ0UsY0FBYztBQUNoQjs7QUFFQTtFQUNFLGNBQWM7QUFDaEI7O0FBRUE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cbn1cblxuLnZpcy1wYW5lbCAudmlzLXNoYWRvdy52aXMtYm90dG9tIHtcbiAgYm90dG9tOiAtMXB4O1xuICBsZWZ0OiAwO1xufSJdfQ== */";
- styleInject(css_248z$5);
+ var css_248z$9 = ".vis-panel {\n position: absolute;\n\n padding: 0;\n margin: 0;\n\n box-sizing: border-box;\n}\n\n.vis-panel.vis-center,\n.vis-panel.vis-left,\n.vis-panel.vis-right,\n.vis-panel.vis-top,\n.vis-panel.vis-bottom {\n border: 1px #bfbfbf;\n}\n\n.vis-panel.vis-center,\n.vis-panel.vis-left,\n.vis-panel.vis-right {\n border-top-style: solid;\n border-bottom-style: solid;\n overflow: hidden;\n}\n\n.vis-left.vis-panel.vis-vertical-scroll, .vis-right.vis-panel.vis-vertical-scroll {\n height: 100%;\n overflow-x: hidden;\n overflow-y: scroll;\n} \n\n.vis-left.vis-panel.vis-vertical-scroll {\n direction: rtl;\n}\n\n.vis-left.vis-panel.vis-vertical-scroll .vis-content {\n direction: ltr;\n}\n\n.vis-right.vis-panel.vis-vertical-scroll {\n direction: ltr;\n}\n\n.vis-right.vis-panel.vis-vertical-scroll .vis-content {\n direction: rtl;\n}\n\n.vis-panel.vis-center,\n.vis-panel.vis-top,\n.vis-panel.vis-bottom {\n border-left-style: solid;\n border-right-style: solid;\n}\n\n.vis-background {\n overflow: hidden;\n}\n\n.vis-panel > .vis-content {\n position: relative;\n}\n\n.vis-panel .vis-shadow {\n position: absolute;\n width: 100%;\n height: 1px;\n box-shadow: 0 0 10px rgba(0,0,0,0.8);\n /* TODO: find a nice way to ensure vis-shadows are drawn on top of items\n z-index: 1;\n */\n}\n\n.vis-panel .vis-shadow.vis-top {\n top: -1px;\n left: 0;\n}\n\n.vis-panel .vis-shadow.vis-bottom {\n bottom: -1px;\n left: 0;\n}";
+ styleInject(css_248z$9);
- var css_248z$6 = ".vis-graph-group0 {\n fill:#4f81bd;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #4f81bd;\n}\n\n.vis-graph-group1 {\n fill:#f79646;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #f79646;\n}\n\n.vis-graph-group2 {\n fill: #8c51cf;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #8c51cf;\n}\n\n.vis-graph-group3 {\n fill: #75c841;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #75c841;\n}\n\n.vis-graph-group4 {\n fill: #ff0100;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #ff0100;\n}\n\n.vis-graph-group5 {\n fill: #37d8e6;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #37d8e6;\n}\n\n.vis-graph-group6 {\n fill: #042662;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #042662;\n}\n\n.vis-graph-group7 {\n fill:#00ff26;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #00ff26;\n}\n\n.vis-graph-group8 {\n fill:#ff00ff;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #ff00ff;\n}\n\n.vis-graph-group9 {\n fill: #8f3938;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #8f3938;\n}\n\n.vis-timeline .vis-fill {\n fill-opacity:0.1;\n stroke: none;\n}\n\n\n.vis-timeline .vis-bar {\n fill-opacity:0.5;\n stroke-width:1px;\n}\n\n.vis-timeline .vis-point {\n stroke-width:2px;\n fill-opacity:1.0;\n}\n\n\n.vis-timeline .vis-legend-background {\n stroke-width:1px;\n fill-opacity:0.9;\n fill: #ffffff;\n stroke: #c2c2c2;\n}\n\n\n.vis-timeline .vis-outline {\n stroke-width:1px;\n fill-opacity:1;\n fill: #ffffff;\n stroke: #e5e5e5;\n}\n\n.vis-timeline .vis-icon-fill {\n fill-opacity:0.3;\n stroke: none;\n}\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhdGhTdHlsZXMuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQ0ksWUFBWTtJQUNaLGNBQWM7S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sbDogI2ZmZmZmZjtcbiAgICBzdHJva2U6ICNlNWU1ZTU7XG59XG5cbi52aXMtdGltZWxpbmUgLnZpcy1pY29uLWZpbGwge1xuICAgIGZpbGwtb3BhY2l0eTowLjM7XG4gICAgc3Ryb2tlOiBub25lO1xufVxuIl19 */";
- styleInject(css_248z$6);
+ var css_248z$8 = ".vis-graph-group0 {\n fill:#4f81bd;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #4f81bd;\n}\n\n.vis-graph-group1 {\n fill:#f79646;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #f79646;\n}\n\n.vis-graph-group2 {\n fill: #8c51cf;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #8c51cf;\n}\n\n.vis-graph-group3 {\n fill: #75c841;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #75c841;\n}\n\n.vis-graph-group4 {\n fill: #ff0100;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #ff0100;\n}\n\n.vis-graph-group5 {\n fill: #37d8e6;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #37d8e6;\n}\n\n.vis-graph-group6 {\n fill: #042662;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #042662;\n}\n\n.vis-graph-group7 {\n fill:#00ff26;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #00ff26;\n}\n\n.vis-graph-group8 {\n fill:#ff00ff;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #ff00ff;\n}\n\n.vis-graph-group9 {\n fill: #8f3938;\n fill-opacity:0;\n stroke-width:2px;\n stroke: #8f3938;\n}\n\n.vis-timeline .vis-fill {\n fill-opacity:0.1;\n stroke: none;\n}\n\n\n.vis-timeline .vis-bar {\n fill-opacity:0.5;\n stroke-width:1px;\n}\n\n.vis-timeline .vis-point {\n stroke-width:2px;\n fill-opacity:1.0;\n}\n\n\n.vis-timeline .vis-legend-background {\n stroke-width:1px;\n fill-opacity:0.9;\n fill: #ffffff;\n stroke: #c2c2c2;\n}\n\n\n.vis-timeline .vis-outline {\n stroke-width:1px;\n fill-opacity:1;\n fill: #ffffff;\n stroke: #e5e5e5;\n}\n\n.vis-timeline .vis-icon-fill {\n fill-opacity:0.3;\n stroke: none;\n}\n";
+ styleInject(css_248z$8);
- var css_248z$7 = "\n.vis-timeline {\n position: relative;\n border: 1px solid #bfbfbf;\n overflow: hidden;\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.vis-loading-screen {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRpbWVsaW5lLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0E7RUFDRSxrQkFBa0I7RUFDbEIseUJBQXlCO0VBQ3pCLGdCQUFnQjtFQUNoQixVQUFVO0VBQ1YsU0FBUztFQUNULHNCQUFzQjtBQUN4Qjs7QUFFQTtFQUNFLFdBQVc7RUFDWCxZQUFZO0VBQ1osa0JBQWtCO0VBQ2xCLE1BQU07RUFDTixPQUFPO0FBQ1QiLCJmaWxlIjoidGltZWxpbmUuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiXG4udmlzLXRpbWVsaW5lIHtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuICBib3JkZXI6IDFweCBzb2xpZCAjYmZiZmJmO1xuICBvdmVyZmxvdzogaGlkZGVuO1xuICBwYWRkaW5nOiAwO1xuICBtYXJnaW46IDA7XG4gIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG59XG5cbi52aXMtbG9hZGluZy1zY3JlZW4ge1xuICB3aWR0aDogMTAwJTtcbiAgaGVpZ2h0OiAxMDAlO1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHRvcDogMDtcbiAgbGVmdDogMDtcbn0iXX0= */";
+ var css_248z$7 = "\n.vis-timeline {\n position: relative;\n border: 1px solid #bfbfbf;\n overflow: hidden;\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.vis-loading-screen {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n}";
styleInject(css_248z$7);
- var css_248z$8 = "/* override some bootstrap styles screwing up the timelines css */\n\n.vis [class*=\"span\"] {\n min-height: 0;\n width: auto;\n}\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJvb3RzdHJhcC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsaUVBQWlFOztBQUVqRTtFQUNFLGFBQWE7RUFDYixXQUFXO0FBQ2IiLCJmaWxlIjoiYm9vdHN0cmFwLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi8qIG92ZXJyaWRlIHNvbWUgYm9vdHN0cmFwIHN0eWxlcyBzY3Jld2luZyB1cCB0aGUgdGltZWxpbmVzIGNzcyAqL1xuXG4udmlzIFtjbGFzcyo9XCJzcGFuXCJdIHtcbiAgbWluLWhlaWdodDogMDtcbiAgd2lkdGg6IGF1dG87XG59XG4iXX0= */";
- styleInject(css_248z$8);
+ var css_248z$6 = "/* override some bootstrap styles screwing up the timelines css */\n\n.vis [class*=\"span\"] {\n min-height: 0;\n width: auto;\n}\n";
+ styleInject(css_248z$6);
/**
* Create a timeline visualization
@@ -23669,12 +31675,12 @@
var Core = /*#__PURE__*/function () {
function Core() {
- classCallCheck(this, Core);
+ _classCallCheck(this, Core);
}
- createClass(Core, [{
+ _createClass(Core, [{
key: "_create",
-
+ value:
/**
* Create the main DOM for the Core: a root panel containing left, right,
* top, bottom, content, and background panel.
@@ -23682,7 +31688,7 @@
* be attached.
* @protected
*/
- value: function _create(container) {
+ function _create(container) {
var _this = this,
_context,
_context2,
@@ -23775,11 +31781,11 @@
_this.initialRangeChangeDone = true;
}
});
- this.on('touch', bind$2(_context = this._onTouch).call(_context, this));
- this.on('panmove', bind$2(_context2 = this._onDrag).call(_context2, this));
+ this.on('touch', _bindInstanceProperty$1(_context = this._onTouch).call(_context, this));
+ this.on('panmove', _bindInstanceProperty$1(_context2 = this._onDrag).call(_context2, this));
var me = this;
- this._origRedraw = bind$2(_context3 = this._redraw).call(_context3, this);
- this._redraw = util$1.throttle(this._origRedraw);
+ this._origRedraw = _bindInstanceProperty$1(_context3 = this._redraw).call(_context3, this);
+ this._redraw = availableUtils.throttle(this._origRedraw);
this.on('_change', function (properties) {
if (me.itemSet && me.itemSet.initialItemSetDrawn && properties && properties.queue == true) {
me._redraw();
@@ -23789,16 +31795,16 @@
}); // create event listeners for all interesting events, these events will be
// emitted via emitter
- this.hammer = new Hammer$1(this.dom.root);
+ this.hammer = new Hammer(this.dom.root);
var pinchRecognizer = this.hammer.get('pinch').set({
enable: true
});
pinchRecognizer && disablePreventDefaultVertically(pinchRecognizer);
this.hammer.get('pan').set({
threshold: 5,
- direction: Hammer$1.DIRECTION_ALL
+ direction: Hammer.DIRECTION_ALL
});
- this.listeners = {};
+ this.timelineListeners = {};
var events = ['tap', 'doubletap', 'press', 'pinch', 'pan', 'panstart', 'panmove', 'panend' // TODO: cleanup
//'touch', 'pinch',
//'tap', 'doubletap', 'hold',
@@ -23806,7 +31812,7 @@
//'mousewheel', 'DOMMouseScroll' // DOMMouseScroll is needed for Firefox
];
- forEach$2(events).call(events, function (type) {
+ _forEachInstanceProperty(events).call(events, function (type) {
var listener = function listener(event) {
if (me.isActive()) {
me.emit(type, event);
@@ -23814,7 +31820,7 @@
};
me.hammer.on(type, listener);
- me.listeners[type] = listener;
+ me.timelineListeners[type] = listener;
}); // emulate a touch event (emitted before the start of a pan, pinch, tap, or press)
@@ -23938,9 +31944,9 @@
this.dom.centerContainer.addEventListener ? "DOMMouseScroll" : "onmousewheel";
this.dom.top.addEventListener ? "DOMMouseScroll" : "onmousewheel";
this.dom.bottom.addEventListener ? "DOMMouseScroll" : "onmousewheel";
- this.dom.centerContainer.addEventListener(wheelType, bind$2(onMouseWheel).call(onMouseWheel, this), false);
- this.dom.top.addEventListener(wheelType, bind$2(onMouseWheel).call(onMouseWheel, this), false);
- this.dom.bottom.addEventListener(wheelType, bind$2(onMouseWheel).call(onMouseWheel, this), false);
+ this.dom.centerContainer.addEventListener(wheelType, _bindInstanceProperty$1(onMouseWheel).call(onMouseWheel, this), false);
+ this.dom.top.addEventListener(wheelType, _bindInstanceProperty$1(onMouseWheel).call(onMouseWheel, this), false);
+ this.dom.bottom.addEventListener(wheelType, _bindInstanceProperty$1(onMouseWheel).call(onMouseWheel, this), false);
/**
*
* @param {scroll} event
@@ -23948,12 +31954,6 @@
function onMouseScrollSide(event) {
if (!me.options.verticalScroll) return;
-
- if (me._isProgramaticallyScrolled) {
- me._isProgramaticallyScrolled = false;
- return;
- }
-
event.preventDefault();
if (me.isActive()) {
@@ -23967,8 +31967,8 @@
}
}
- this.dom.left.parentNode.addEventListener('scroll', bind$2(onMouseScrollSide).call(onMouseScrollSide, this));
- this.dom.right.parentNode.addEventListener('scroll', bind$2(onMouseScrollSide).call(onMouseScrollSide, this));
+ this.dom.left.parentNode.addEventListener('scroll', _bindInstanceProperty$1(onMouseScrollSide).call(onMouseScrollSide, this));
+ this.dom.right.parentNode.addEventListener('scroll', _bindInstanceProperty$1(onMouseScrollSide).call(onMouseScrollSide, this));
var itemAddedToTimeline = false;
/**
*
@@ -23985,7 +31985,7 @@
} // make sure your target is a timeline element
- if (!(indexOf$3(_context4 = event.target.className).call(_context4, "timeline") > -1)) return; // make sure only one item is added every time you're over the timeline
+ if (!(_indexOfInstanceProperty(_context4 = event.target.className).call(_context4, "timeline") > -1)) return; // make sure only one item is added every time you're over the timeline
if (itemAddedToTimeline) return;
event.dataTransfer.dropEffect = 'move';
@@ -24033,8 +32033,8 @@
return false;
}
- this.dom.center.addEventListener('dragover', bind$2(handleDragOver).call(handleDragOver, this), false);
- this.dom.center.addEventListener('drop', bind$2(handleDrop).call(handleDrop, this), false);
+ this.dom.center.addEventListener('dragover', _bindInstanceProperty$1(handleDragOver).call(handleDragOver, this), false);
+ this.dom.center.addEventListener('drop', _bindInstanceProperty$1(handleDrop).call(handleDrop, this), false);
this.customTimes = []; // store state information needed for touch events
this.touch = {};
@@ -24079,8 +32079,8 @@
if (options) {
// copy the known options
- var fields = ['width', 'height', 'minHeight', 'maxHeight', 'autoResize', 'start', 'end', 'clickToUse', 'dataAttributes', 'hiddenDates', 'locale', 'locales', 'moment', 'preferZoom', 'rtl', 'zoomKey', 'horizontalScroll', 'verticalScroll', 'longSelectPressTime'];
- util$1.selectiveExtend(fields, this.options, options);
+ var fields = ['width', 'height', 'minHeight', 'maxHeight', 'autoResize', 'start', 'end', 'clickToUse', 'dataAttributes', 'hiddenDates', 'locale', 'locales', 'moment', 'preferZoom', 'rtl', 'zoomKey', 'horizontalScroll', 'verticalScroll', 'longSelectPressTime', 'snap'];
+ availableUtils.selectiveExtend(fields, this.options, options);
this.dom.rollingModeBtn.style.visibility = 'hidden';
if (this.options.rtl) {
@@ -24096,7 +32096,7 @@
}
}
- if (_typeof_1(this.options.orientation) !== 'object') {
+ if (_typeof$1(this.options.orientation) !== 'object') {
this.options.orientation = {
item: undefined,
axis: undefined
@@ -24109,7 +32109,7 @@
item: options.orientation,
axis: options.orientation
};
- } else if (_typeof_1(options.orientation) === 'object') {
+ } else if (_typeof$1(options.orientation) === 'object') {
if ('item' in options.orientation) {
this.options.orientation.item = options.orientation.item;
}
@@ -24125,7 +32125,7 @@
var timeAxis2 = this.timeAxis2 = new TimeAxis(this.body);
timeAxis2.setOptions = function (options) {
- var _options = options ? util$1.extend({}, options) : {};
+ var _options = options ? availableUtils.extend({}, options) : {};
_options.orientation = 'top'; // override the orientation option, always top
@@ -24138,12 +32138,12 @@
if (this.timeAxis2) {
var _context5;
- var index = indexOf$3(_context5 = this.components).call(_context5, this.timeAxis2);
+ var index = _indexOfInstanceProperty(_context5 = this.components).call(_context5, this.timeAxis2);
if (index !== -1) {
var _context6;
- splice$2(_context6 = this.components).call(_context6, index, 1);
+ _spliceInstanceProperty(_context6 = this.components).call(_context6, index, 1);
}
this.timeAxis2.destroy();
@@ -24180,7 +32180,7 @@
} // propagate options to all components
- forEach$2(_context7 = this.components).call(_context7, function (component) {
+ _forEachInstanceProperty(_context7 = this.components).call(_context7, function (component) {
return component.setOptions(options);
}); // enable/disable configure
@@ -24194,10 +32194,10 @@
this.configurator.setOptions(options.configure); // collect the settings of all components, and pass them to the configuration system
- var appliedOptions = util$1.deepExtend({}, this.options);
+ var appliedOptions = availableUtils.deepExtend({}, this.options);
- forEach$2(_context8 = this.components).call(_context8, function (component) {
- util$1.deepExtend(appliedOptions, component.options);
+ _forEachInstanceProperty(_context8 = this.components).call(_context8, function (component) {
+ availableUtils.deepExtend(appliedOptions, component.options);
});
this.configurator.setModuleOptions({
@@ -24247,17 +32247,17 @@
} // cleanup hammer touch events
- for (var event in this.listeners) {
- if (this.listeners.hasOwnProperty(event)) {
- delete this.listeners[event];
+ for (var event in this.timelineListeners) {
+ if (this.timelineListeners.hasOwnProperty(event)) {
+ delete this.timelineListeners[event];
}
}
- this.listeners = null;
+ this.timelineListeners = null;
this.hammer && this.hammer.destroy();
this.hammer = null; // give all components the opportunity to cleanup
- forEach$2(_context9 = this.components).call(_context9, function (component) {
+ _forEachInstanceProperty(_context9 = this.components).call(_context9, function (component) {
return component.destroy();
});
@@ -24274,12 +32274,12 @@
value: function setCustomTime(time, id) {
var _context10;
- var customTimes = filter$2(_context10 = this.customTimes).call(_context10, function (component) {
+ var customTimes = _filterInstanceProperty(_context10 = this.customTimes).call(_context10, function (component) {
return id === component.options.id;
});
if (customTimes.length === 0) {
- throw new Error("No custom time bar found with id ".concat(stringify$2(id)));
+ throw new Error("No custom time bar found with id ".concat(_JSON$stringify(id)));
}
if (customTimes.length > 0) {
@@ -24297,12 +32297,12 @@
value: function getCustomTime(id) {
var _context11;
- var customTimes = filter$2(_context11 = this.customTimes).call(_context11, function (component) {
+ var customTimes = _filterInstanceProperty(_context11 = this.customTimes).call(_context11, function (component) {
return component.options.id === id;
});
if (customTimes.length === 0) {
- throw new Error("No custom time bar found with id ".concat(stringify$2(id)));
+ throw new Error("No custom time bar found with id ".concat(_JSON$stringify(id)));
}
return customTimes[0].getCustomTime();
@@ -24319,12 +32319,12 @@
value: function setCustomTimeMarker(title, id, editable) {
var _context12;
- var customTimes = filter$2(_context12 = this.customTimes).call(_context12, function (component) {
+ var customTimes = _filterInstanceProperty(_context12 = this.customTimes).call(_context12, function (component) {
return component.options.id === id;
});
if (customTimes.length === 0) {
- throw new Error("No custom time bar found with id ".concat(stringify$2(id)));
+ throw new Error("No custom time bar found with id ".concat(_JSON$stringify(id)));
}
if (customTimes.length > 0) {
@@ -24343,12 +32343,12 @@
value: function setCustomTimeTitle(title, id) {
var _context13;
- var customTimes = filter$2(_context13 = this.customTimes).call(_context13, function (component) {
+ var customTimes = _filterInstanceProperty(_context13 = this.customTimes).call(_context13, function (component) {
return component.options.id === id;
});
if (customTimes.length === 0) {
- throw new Error("No custom time bar found with id ".concat(stringify$2(id)));
+ throw new Error("No custom time bar found with id ".concat(_JSON$stringify(id)));
}
if (customTimes.length > 0) {
@@ -24385,20 +32385,20 @@
value: function addCustomTime(time, id) {
var _context14;
- var timestamp = time !== undefined ? util$1.convert(time, 'Date') : new Date();
+ var timestamp = time !== undefined ? availableUtils.convert(time, 'Date') : new Date();
- var exists = some$2(_context14 = this.customTimes).call(_context14, function (customTime) {
+ var exists = _someInstanceProperty(_context14 = this.customTimes).call(_context14, function (customTime) {
return customTime.options.id === id;
});
if (exists) {
- throw new Error("A custom time with id ".concat(stringify$2(id), " already exists"));
+ throw new Error("A custom time with id ".concat(_JSON$stringify(id), " already exists"));
}
- var customTime = new CustomTime(this.body, util$1.extend({}, this.options, {
+ var customTime = new CustomTime(this.body, availableUtils.extend({}, this.options, {
time: timestamp,
id: id,
- snap: this.itemSet.options.snap
+ snap: this.itemSet ? this.itemSet.options.snap : this.options.snap
}));
this.customTimes.push(customTime);
this.components.push(customTime);
@@ -24419,20 +32419,20 @@
var _context15,
_this2 = this;
- var customTimes = filter$2(_context15 = this.customTimes).call(_context15, function (bar) {
+ var customTimes = _filterInstanceProperty(_context15 = this.customTimes).call(_context15, function (bar) {
return bar.options.id === id;
});
if (customTimes.length === 0) {
- throw new Error("No custom time bar found with id ".concat(stringify$2(id)));
+ throw new Error("No custom time bar found with id ".concat(_JSON$stringify(id)));
}
- forEach$2(customTimes).call(customTimes, function (customTime) {
+ _forEachInstanceProperty(customTimes).call(customTimes, function (customTime) {
var _context16, _context17, _context18, _context19;
- splice$2(_context16 = _this2.customTimes).call(_context16, indexOf$3(_context17 = _this2.customTimes).call(_context17, customTime), 1);
+ _spliceInstanceProperty(_context16 = _this2.customTimes).call(_context16, _indexOfInstanceProperty(_context17 = _this2.customTimes).call(_context17, customTime), 1);
- splice$2(_context18 = _this2.components).call(_context18, indexOf$3(_context19 = _this2.components).call(_context19, customTime), 1);
+ _spliceInstanceProperty(_context18 = _this2.components).call(_context18, _indexOfInstanceProperty(_context19 = _this2.components).call(_context19, customTime), 1);
customTime.destroy();
});
@@ -24447,6 +32447,17 @@
value: function getVisibleItems() {
return this.itemSet && this.itemSet.getVisibleItems() || [];
}
+ /**
+ * Get the id's of the items at specific time, where a click takes place on the timeline.
+ * @returns {Array} The ids of all items in existence at the time of event.
+ */
+
+ }, {
+ key: "getItemsAtCurrentTime",
+ value: function getItemsAtCurrentTime(timeOfEvent) {
+ this.time = timeOfEvent;
+ return this.itemSet && this.itemSet.getItemsAtCurrentTime(this.time) || [];
+ }
/**
* Get the id's of the currently visible groups.
* @returns {Array} The ids of the visible groups
@@ -24575,7 +32586,7 @@
}
var interval = this.range.end - this.range.start;
- var t = util$1.convert(time, 'Date').valueOf();
+ var t = availableUtils.convert(time, 'Date').valueOf();
var start = t - interval / 2;
var end = t + interval / 2;
var animation = options && options.animation !== undefined ? options.animation : true;
@@ -24693,25 +32704,25 @@
updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates); // update class names
if (options.orientation == 'top') {
- util$1.addClassName(dom.root, 'vis-top');
- util$1.removeClassName(dom.root, 'vis-bottom');
+ availableUtils.addClassName(dom.root, 'vis-top');
+ availableUtils.removeClassName(dom.root, 'vis-bottom');
} else {
- util$1.removeClassName(dom.root, 'vis-top');
- util$1.addClassName(dom.root, 'vis-bottom');
+ availableUtils.removeClassName(dom.root, 'vis-top');
+ availableUtils.addClassName(dom.root, 'vis-bottom');
}
if (options.rtl) {
- util$1.addClassName(dom.root, 'vis-rtl');
- util$1.removeClassName(dom.root, 'vis-ltr');
+ availableUtils.addClassName(dom.root, 'vis-rtl');
+ availableUtils.removeClassName(dom.root, 'vis-ltr');
} else {
- util$1.addClassName(dom.root, 'vis-ltr');
- util$1.removeClassName(dom.root, 'vis-rtl');
+ availableUtils.addClassName(dom.root, 'vis-ltr');
+ availableUtils.removeClassName(dom.root, 'vis-rtl');
} // update root width and height options
- dom.root.style.maxHeight = util$1.option.asSize(options.maxHeight, '');
- dom.root.style.minHeight = util$1.option.asSize(options.minHeight, '');
- dom.root.style.width = util$1.option.asSize(options.width, '');
+ dom.root.style.maxHeight = availableUtils.option.asSize(options.maxHeight, '');
+ dom.root.style.minHeight = availableUtils.option.asSize(options.minHeight, '');
+ dom.root.style.width = availableUtils.option.asSize(options.width, '');
var rootOffsetWidth = dom.root.offsetWidth; // calculate border widths
props.border.left = 1;
@@ -24724,13 +32735,13 @@
props.left.height = dom.left.offsetHeight;
props.right.height = dom.right.offsetHeight;
props.top.height = dom.top.clientHeight || -props.border.top;
- props.bottom.height = dom.bottom.clientHeight || -props.border.bottom; // TODO: compensate borders when any of the panels is empty.
+ props.bottom.height = Math.round(dom.bottom.getBoundingClientRect().height) || dom.bottom.clientHeight || -props.border.bottom; // TODO: compensate borders when any of the panels is empty.
// apply auto height
// TODO: only calculate autoHeight when needed (else we cause an extra reflow/repaint of the DOM)
var contentHeight = Math.max(props.left.height, props.center.height, props.right.height);
var autoHeight = props.top.height + contentHeight + props.bottom.height + props.border.top + props.border.bottom;
- dom.root.style.height = util$1.option.asSize(options.height, "".concat(autoHeight, "px")); // calculate heights of the content panels
+ dom.root.style.height = availableUtils.option.asSize(options.height, "".concat(autoHeight, "px")); // calculate heights of the content panels
props.root.height = dom.root.offsetHeight;
props.background.height = props.root.height;
@@ -24743,7 +32754,7 @@
props.background.width = props.root.width;
if (!this.initialDrawDone) {
- props.scrollbarWidth = util$1.getScrollBarWidth();
+ props.scrollbarWidth = availableUtils.getScrollBarWidth();
}
var leftContainerClientWidth = dom.leftContainer.clientWidth;
@@ -24809,14 +32820,14 @@
var contentsOverflow = props.center.height > props.centerContainer.height;
this.hammer.get('pan').set({
- direction: contentsOverflow ? Hammer$1.DIRECTION_ALL : Hammer$1.DIRECTION_HORIZONTAL
+ direction: contentsOverflow ? Hammer.DIRECTION_ALL : Hammer.DIRECTION_HORIZONTAL
}); // set the long press time
this.hammer.get('press').set({
time: this.options.longSelectPressTime
}); // redraw all components
- forEach$2(_context20 = this.components).call(_context20, function (component) {
+ _forEachInstanceProperty(_context20 = this.components).call(_context20, function (component) {
resized = component.redraw() || resized;
});
@@ -25020,21 +33031,21 @@
if (rootOffsetWidth != me.props.lastWidth || rootOffsetHeight != me.props.lastHeight) {
me.props.lastWidth = rootOffsetWidth;
me.props.lastHeight = rootOffsetHeight;
- me.props.scrollbarWidth = util$1.getScrollBarWidth();
+ me.props.scrollbarWidth = availableUtils.getScrollBarWidth();
me.body.emitter.emit('_change');
}
}
}; // add event listener to window resize
- util$1.addEventListener(window, 'resize', this._onResize); //Prevent initial unnecessary redraw
+ availableUtils.addEventListener(window, 'resize', this._onResize); //Prevent initial unnecessary redraw
if (me.dom.root) {
me.props.lastWidth = me.dom.root.offsetWidth;
me.props.lastHeight = me.dom.root.offsetHeight;
}
- this.watchTimer = setInterval$1(this._onResize, 1000);
+ this.watchTimer = _setInterval(this._onResize, 1000);
}
/**
* Stop watching for a resize of the frame.
@@ -25051,7 +33062,7 @@
if (this._onResize) {
- util$1.removeEventListener(window, 'resize', this._onResize);
+ availableUtils.removeEventListener(window, 'resize', this._onResize);
this._onResize = null;
}
}
@@ -25134,7 +33145,7 @@
key: "_updateScrollTop",
value: function _updateScrollTop() {
// recalculate the scrollTopMin
- var scrollTopMin = Math.min(this.props.centerContainer.height - this.props.center.height, 0); // is negative or zero
+ var scrollTopMin = Math.min(this.props.centerContainer.height - this.props.border.top - this.props.border.bottom - this.props.center.height, 0); // is negative or zero
if (scrollTopMin != this.props.scrollTopMin) {
// in case of bottom orientation, change the scrollTop such that the contents
@@ -25155,7 +33166,6 @@
this.dom.right.parentNode.scrollTop = -this.props.scrollTop;
}
- this._isProgramaticallyScrolled = true;
return this.props.scrollTop;
}
/**
@@ -25186,14 +33196,19 @@
}(); // turn Core into an event emitter
- componentEmitter(Core.prototype);
+ Emitter(Core.prototype);
+ function _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
+
+ function _isNativeReflectConstruct$9() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/**
* A current time bar
*/
var CurrentTime = /*#__PURE__*/function (_Component) {
- inherits(CurrentTime, _Component);
+ _inherits(CurrentTime, _Component);
+
+ var _super = _createSuper$9(CurrentTime);
/**
* @param {{range: Range, dom: Object, domProps: Object}} body
@@ -25208,28 +33223,28 @@
var _this;
- classCallCheck(this, CurrentTime);
+ _classCallCheck(this, CurrentTime);
- _this = possibleConstructorReturn(this, getPrototypeOf$5(CurrentTime).call(this));
+ _this = _super.call(this);
_this.body = body; // default options
_this.defaultOptions = {
rtl: false,
showCurrentTime: true,
alignCurrentTime: undefined,
- moment: moment$1,
+ moment: moment$2,
locales: locales,
locale: 'en'
};
- _this.options = util$1.extend({}, _this.defaultOptions);
+ _this.options = availableUtils.extend({}, _this.defaultOptions);
_this.setOptions(options);
- _this.options.locales = util$1.extend({}, locales, _this.options.locales);
+ _this.options.locales = availableUtils.extend({}, locales, _this.options.locales);
var defaultLocales = _this.defaultOptions.locales[_this.defaultOptions.locale];
- forEach$2(_context = keys$3(_this.options.locales)).call(_context, function (locale) {
- _this.options.locales[locale] = util$1.extend({}, defaultLocales, _this.options.locales[locale]);
+ _forEachInstanceProperty(_context = _Object$keys(_this.options.locales)).call(_context, function (locale) {
+ _this.options.locales[locale] = availableUtils.extend({}, defaultLocales, _this.options.locales[locale]);
});
_this.offset = 0;
@@ -25244,7 +33259,7 @@
*/
- createClass(CurrentTime, [{
+ _createClass(CurrentTime, [{
key: "_create",
value: function _create() {
var bar = document.createElement('div');
@@ -25278,7 +33293,7 @@
value: function setOptions(options) {
if (options) {
// copy all options that we know
- util$1.selectiveExtend(['rtl', 'showCurrentTime', 'alignCurrentTime', 'moment', 'locale', 'locales'], this.options, options);
+ availableUtils.selectiveExtend(['rtl', 'showCurrentTime', 'alignCurrentTime', 'moment', 'locale', 'locales'], this.options, options);
}
}
/**
@@ -25304,7 +33319,7 @@
this.start();
}
- var now = this.options.moment(now$2() + this.offset);
+ var now = this.options.moment(_Date$now() + this.offset);
if (this.options.alignCurrentTime) {
now = now.startOf(this.options.alignCurrentTime);
@@ -25322,7 +33337,7 @@
locale = this.options.locales['en']; // fall back on english when not available
}
- var title = concat$2(_context2 = concat$2(_context3 = "".concat(locale.current, " ")).call(_context3, locale.time, ": ")).call(_context2, now.format('dddd, MMMM Do YYYY, H:mm:ss'));
+ var title = _concatInstanceProperty(_context2 = _concatInstanceProperty(_context3 = "".concat(locale.current, " ")).call(_context3, locale.time, ": ")).call(_context2, now.format('dddd, MMMM Do YYYY, H:mm:ss'));
title = title.charAt(0).toUpperCase() + title.substring(1);
@@ -25366,7 +33381,7 @@
me.redraw();
me.body.emitter.emit('currentTimeTick'); // start a renderTimer to adjust for the new time
- me.currentTimeTimer = setTimeout$2(update, interval);
+ me.currentTimeTimer = _setTimeout(update, interval);
}
update();
@@ -25393,9 +33408,9 @@
}, {
key: "setCurrentTime",
value: function setCurrentTime(time) {
- var t = util$1.convert(time, 'Date').valueOf();
+ var t = availableUtils.convert(time, 'Date').valueOf();
- var now = now$2();
+ var now = _Date$now();
this.offset = t - now;
this.redraw();
@@ -25408,195 +33423,108 @@
}, {
key: "getCurrentTime",
value: function getCurrentTime() {
- return new Date(now$2() + this.offset);
+ return new Date(_Date$now() + this.offset);
}
}]);
return CurrentTime;
}(Component);
+ var find$3 = {exports: {}};
+
+ var $$2 = _export;
var $find = arrayIteration.find;
var FIND = 'find';
- var SKIPS_HOLES = true;
- var USES_TO_LENGTH$8 = arrayMethodUsesToLength(FIND); // Shouldn't skip holes
+ var SKIPS_HOLES$1 = true; // Shouldn't skip holes
if (FIND in []) Array(1)[FIND](function () {
- SKIPS_HOLES = false;
+ SKIPS_HOLES$1 = false;
}); // `Array.prototype.find` method
- // https://tc39.github.io/ecma262/#sec-array.prototype.find
+ // https://tc39.es/ecma262/#sec-array.prototype.find
- _export({
+ $$2({
target: 'Array',
proto: true,
- forced: SKIPS_HOLES || !USES_TO_LENGTH$8
+ forced: SKIPS_HOLES$1
}, {
find: function find(callbackfn
/* , that = undefined */
) {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
- }); // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
+ }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
- var find = entryVirtual('Array').find;
+ var entryVirtual$2 = entryVirtual$o;
+ var find$2 = entryVirtual$2('Array').find;
- var ArrayPrototype$f = Array.prototype;
+ var isPrototypeOf$2 = objectIsPrototypeOf;
+ var method$2 = find$2;
+ var ArrayPrototype$2 = Array.prototype;
- var find_1 = function (it) {
+ var find$1 = function (it) {
var own = it.find;
- return it === ArrayPrototype$f || it instanceof Array && own === ArrayPrototype$f.find ? find : own;
+ return it === ArrayPrototype$2 || isPrototypeOf$2(ArrayPrototype$2, it) && own === ArrayPrototype$2.find ? method$2 : own;
};
- var find$1 = find_1;
+ var parent$2 = find$1;
+ var find = parent$2;
- var find$2 = find$1;
+ (function (module) {
+ module.exports = find;
+ })(find$3);
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
- // require the crypto API and do not support built-in fallback to lower quality random number
- // generators (like Math.random()).
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
- // find the complete implementation of crypto (msCrypto) on IE11.
- var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);
- var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
+ var _findInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(find$3.exports);
- function rng() {
- if (!getRandomValues) {
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
- }
+ var findIndex$3 = {exports: {}};
- return getRandomValues(rnds8);
- }
+ var $$1 = _export;
+ var $findIndex = arrayIteration.findIndex;
+ var FIND_INDEX = 'findIndex';
+ var SKIPS_HOLES = true; // Shouldn't skip holes
- /**
- * Convert array of 16 byte values to UUID string format of the form:
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
- */
- var byteToHex$1 = [];
+ if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () {
+ SKIPS_HOLES = false;
+ }); // `Array.prototype.findIndex` method
+ // https://tc39.es/ecma262/#sec-array.prototype.findindex
- for (var i$1 = 0; i$1 < 256; ++i$1) {
- byteToHex$1[i$1] = (i$1 + 0x100).toString(16).substr(1);
- }
-
- function bytesToUuid$1(buf, offset) {
- var i = offset || 0;
- var bth = byteToHex$1; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
-
- return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join('');
- }
-
- function v4$1(options, buf, offset) {
- var i = buf && offset || 0;
-
- if (typeof options == 'string') {
- buf = options === 'binary' ? new Array(16) : null;
- options = null;
- }
-
- options = options || {};
- var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
-
- rnds[6] = rnds[6] & 0x0f | 0x40;
- rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
-
- if (buf) {
- for (var ii = 0; ii < 16; ++ii) {
- buf[i + ii] = rnds[ii];
- }
- }
-
- return buf || bytesToUuid$1(rnds);
- }
-
- var $includes = arrayIncludes.includes;
- var USES_TO_LENGTH$9 = arrayMethodUsesToLength('indexOf', {
- ACCESSORS: true,
- 1: 0
- }); // `Array.prototype.includes` method
- // https://tc39.github.io/ecma262/#sec-array.prototype.includes
-
- _export({
+ $$1({
target: 'Array',
proto: true,
- forced: !USES_TO_LENGTH$9
+ forced: SKIPS_HOLES
}, {
- includes: function includes(el
- /* , fromIndex = 0 */
+ findIndex: function findIndex(callbackfn
+ /* , that = undefined */
) {
- return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
+ return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
- }); // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
+ }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
- var includes = entryVirtual('Array').includes;
+ var entryVirtual$1 = entryVirtual$o;
+ var findIndex$2 = entryVirtual$1('Array').findIndex;
- var MATCH = wellKnownSymbol('match'); // `IsRegExp` abstract operation
- // https://tc39.github.io/ecma262/#sec-isregexp
+ var isPrototypeOf$1 = objectIsPrototypeOf;
+ var method$1 = findIndex$2;
+ var ArrayPrototype$1 = Array.prototype;
- var isRegexp = function (it) {
- var isRegExp;
- return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
+ var findIndex$1 = function (it) {
+ var own = it.findIndex;
+ return it === ArrayPrototype$1 || isPrototypeOf$1(ArrayPrototype$1, it) && own === ArrayPrototype$1.findIndex ? method$1 : own;
};
- var notARegexp = function (it) {
- if (isRegexp(it)) {
- throw TypeError("The method doesn't accept regular expressions");
- }
+ var parent$1 = findIndex$1;
+ var findIndex = parent$1;
- return it;
- };
+ (function (module) {
+ module.exports = findIndex;
+ })(findIndex$3);
- var MATCH$1 = wellKnownSymbol('match');
+ var _findIndexInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(findIndex$3.exports);
- var correctIsRegexpLogic = function (METHOD_NAME) {
- var regexp = /./;
+ function _createForOfIteratorHelper$5(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray$5(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
- try {
- '/./'[METHOD_NAME](regexp);
- } catch (e) {
- try {
- regexp[MATCH$1] = false;
- return '/./'[METHOD_NAME](regexp);
- } catch (f) {
- /* empty */
- }
- }
-
- return false;
- };
-
- // https://tc39.github.io/ecma262/#sec-string.prototype.includes
-
-
- _export({
- target: 'String',
- proto: true,
- forced: !correctIsRegexpLogic('includes')
- }, {
- includes: function includes(searchString
- /* , position = 0 */
- ) {
- return !!~String(requireObjectCoercible(this)).indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);
- }
- });
-
- var includes$1 = entryVirtual('String').includes;
-
- var ArrayPrototype$g = Array.prototype;
- var StringPrototype$2 = String.prototype;
-
- var includes$2 = function (it) {
- var own = it.includes;
- if (it === ArrayPrototype$g || it instanceof Array && own === ArrayPrototype$g.includes) return includes;
-
- if (typeof it === 'string' || it === StringPrototype$2 || it instanceof String && own === StringPrototype$2.includes) {
- return includes$1;
- }
-
- return own;
- };
-
- var includes$3 = includes$2;
-
- var includes$4 = includes$3;
+ function _unsupportedIterableToArray$5(o, minLen) { var _context5; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$5(o, minLen); var n = _sliceInstanceProperty(_context5 = Object.prototype.toString.call(o)).call(_context5, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from$1(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$5(o, minLen); }
+ function _arrayLikeToArray$5(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
// Utility functions for ordering and stacking of items
var EPSILON = 0.001; // used when checking collisions, to prevent round-off errors
@@ -25606,7 +33534,7 @@
*/
function orderByStart(items) {
- sort$2(items).call(items, function (a, b) {
+ _sortInstanceProperty(items).call(items, function (a, b) {
return a.data.start - b.data.start;
});
}
@@ -25617,7 +33545,7 @@
*/
function orderByEnd(items) {
- sort$2(items).call(items, function (a, b) {
+ _sortInstanceProperty(items).call(items, function (a, b) {
var aTime = 'end' in a.data ? a.data.end : a.data.start;
var bTime = 'end' in b.data ? b.data.end : b.data.start;
return aTime - bTime;
@@ -25639,51 +33567,15 @@
*/
function stack(items, margin, force, shouldBailItemsRedrawFunction) {
- if (force) {
- // reset top position of all items
- for (var i = 0; i < items.length; i++) {
- items[i].top = null;
- }
- } // calculate new, non-overlapping positions
+ var stackingResult = performStacking(items, margin.item, false, function (item) {
+ return item.stack && (force || item.top === null);
+ }, function (item) {
+ return item.stack;
+ }, function (item) {
+ return margin.axis;
+ }, shouldBailItemsRedrawFunction); // If shouldBail function returned true during stacking calculation
-
- for (var i = 0; i < items.length; i++) {
- // eslint-disable-line no-redeclare
- var item = items[i];
-
- if (item.stack && item.top === null) {
- // initialize top position
- item.top = margin.axis;
- var shouldBail = false;
-
- do {
- // TODO: optimize checking for overlap. when there is a gap without items,
- // you only need to check for items from the next item on, not from zero
- var collidingItem = null;
-
- for (var j = 0, jj = items.length; j < jj; j++) {
- var other = items[j];
- shouldBail = shouldBailItemsRedrawFunction() || false;
-
- if (shouldBail) {
- return true;
- }
-
- if (other.top !== null && other !== item && other.stack && collision(item, other, margin.item, other.options.rtl)) {
- collidingItem = other;
- break;
- }
- }
-
- if (collidingItem != null) {
- // There is a collision. Reposition the items above the colliding element
- item.top = collidingItem.top + collidingItem.height + margin.item.vertical;
- }
- } while (collidingItem);
- }
- }
-
- return shouldBail;
+ return stackingResult === null;
}
/**
* Adjust vertical positions of the items within a single subgroup such that they
@@ -25697,49 +33589,13 @@
*/
function substack(items, margin, subgroup) {
- for (var i = 0; i < items.length; i++) {
- items[i].top = null;
- } // Set the initial height
-
-
- var subgroupHeight = subgroup.height; // calculate new, non-overlapping positions
-
- for (i = 0; i < items.length; i++) {
- var item = items[i];
-
- if (item.stack && item.top === null) {
- // initialize top position
- item.top = item.baseTop; //margin.axis + item.baseTop;
-
- do {
- // TODO: optimize checking for overlap. when there is a gap without items,
- // you only need to check for items from the next item on, not from zero
- var collidingItem = null;
-
- for (var j = 0, jj = items.length; j < jj; j++) {
- var other = items[j];
-
- if (other.top !== null && other !== item
- /*&& other.stack*/
- && collision(item, other, margin.item, other.options.rtl)) {
- collidingItem = other;
- break;
- }
- }
-
- if (collidingItem != null) {
- // There is a collision. Reposition the items above the colliding element
- item.top = collidingItem.top + collidingItem.height + margin.item.vertical; // + item.baseTop;
- }
-
- if (item.top + item.height > subgroupHeight) {
- subgroupHeight = item.top + item.height;
- }
- } while (collidingItem);
- }
- } // Set the new height
-
-
+ var subgroupHeight = performStacking(items, margin.item, false, function (item) {
+ return item.stack;
+ }, function (item) {
+ return true;
+ }, function (item) {
+ return item.baseTop;
+ });
subgroup.height = subgroupHeight - subgroup.top + 0.5 * margin.item.vertical;
}
/**
@@ -25754,22 +33610,22 @@
*/
function nostack(items, margin, subgroups, isStackSubgroups) {
- for (var i = 0; i < items.length; i++) {
- if (items[i].data.subgroup == undefined) {
- items[i].top = margin.item.vertical;
- } else if (items[i].data.subgroup !== undefined && isStackSubgroups) {
+ for (var _i = 0; _i < items.length; _i++) {
+ if (items[_i].data.subgroup == undefined) {
+ items[_i].top = margin.item.vertical;
+ } else if (items[_i].data.subgroup !== undefined && isStackSubgroups) {
var newTop = 0;
for (var subgroup in subgroups) {
if (subgroups.hasOwnProperty(subgroup)) {
- if (subgroups[subgroup].visible == true && subgroups[subgroup].index < subgroups[items[i].data.subgroup].index) {
+ if (subgroups[subgroup].visible == true && subgroups[subgroup].index < subgroups[items[_i].data.subgroup].index) {
newTop += subgroups[subgroup].height;
- subgroups[items[i].data.subgroup].top = newTop;
+ subgroups[items[_i].data.subgroup].top = newTop;
}
}
}
- items[i].top = newTop + 0.5 * margin.item.vertical;
+ items[_i].top = newTop + 0.5 * margin.item.vertical;
}
}
@@ -25787,33 +33643,25 @@
*/
function stackSubgroups(items, margin, subgroups) {
- for (var subgroup in subgroups) {
- if (subgroups.hasOwnProperty(subgroup)) {
- subgroups[subgroup].top = 0;
+ var _context;
- do {
- // TODO: optimize checking for overlap. when there is a gap without items,
- // you only need to check for items from the next item on, not from zero
- var collidingItem = null;
+ performStacking(_sortInstanceProperty(_context = _Object$values2(subgroups)).call(_context, function (a, b) {
+ if (a.index > b.index) return 1;
+ if (a.index < b.index) return -1;
+ return 0;
+ }), {
+ vertical: 0
+ }, true, function (item) {
+ return true;
+ }, function (item) {
+ return true;
+ }, function (item) {
+ return 0;
+ });
- for (var otherSubgroup in subgroups) {
- if (subgroups[otherSubgroup].top !== null && otherSubgroup !== subgroup && subgroups[subgroup].index > subgroups[otherSubgroup].index && collisionByTimes(subgroups[subgroup], subgroups[otherSubgroup])) {
- collidingItem = subgroups[otherSubgroup];
- break;
- }
- }
-
- if (collidingItem != null) {
- // There is a collision. Reposition the subgroups above the colliding element
- subgroups[subgroup].top = collidingItem.top + collidingItem.height;
- }
- } while (collidingItem);
- }
- }
-
- for (var i = 0; i < items.length; i++) {
- if (items[i].data.subgroup !== undefined) {
- items[i].top = subgroups[items[i].data.subgroup].top + 0.5 * margin.item.vertical;
+ for (var _i2 = 0; _i2 < items.length; _i2++) {
+ if (items[_i2].data.subgroup !== undefined) {
+ items[_i2].top = subgroups[items[_i2].data.subgroup].top + 0.5 * margin.item.vertical;
}
}
}
@@ -25856,12 +33704,12 @@
var items = subgroupItems[subgroup];
- for (var i = 0; i < items.length; i++) {
- if (items[i].data.subgroup !== undefined) {
- items[i].top = subgroups[items[i].data.subgroup].top + 0.5 * margin.item.vertical;
+ for (var _i3 = 0; _i3 < items.length; _i3++) {
+ if (items[_i3].data.subgroup !== undefined) {
+ items[_i3].top = subgroups[items[_i3].data.subgroup].top + 0.5 * margin.item.vertical;
if (subgroups[subgroup].stack) {
- items[i].baseTop = items[i].top;
+ items[_i3].baseTop = items[_i3].top;
}
}
}
@@ -25872,39 +33720,278 @@
}
}
}
+ /**
+ * Reusable stacking function
+ *
+ * @param {Item[]} items
+ * An array of items to consider during stacking.
+ * @param {{horizontal: number, vertical: number}} margins
+ * Margins to be used for collision checking and placement of items.
+ * @param {boolean} compareTimes
+ * By default, horizontal collision is checked based on the spatial position of the items (left/right and width).
+ * If this argument is true, horizontal collision will instead be checked based on the start/end times of each item.
+ * Vertical collision is always checked spatially.
+ * @param {(Item) => number | null} shouldStack
+ * A callback function which is called before we start to process an item. The return value indicates whether the item will be processed.
+ * @param {(Item) => boolean} shouldOthersStack
+ * A callback function which indicates whether other items should consider this item when being stacked.
+ * @param {(Item) => number} getInitialHeight
+ * A callback function which determines the height items are initially placed at
+ * @param {() => boolean} shouldBail
+ * A callback function which should indicate if the stacking process should be aborted.
+ *
+ * @returns {null|number}
+ * if shouldBail was triggered, returns null
+ * otherwise, returns the maximum height
+ */
+
+ function performStacking(items, margins, compareTimes, shouldStack, shouldOthersStack, getInitialHeight, shouldBail) {
+ // Time-based horizontal comparison
+ var getItemStart = function getItemStart(item) {
+ return item.start;
+ };
+
+ var getItemEnd = function getItemEnd(item) {
+ return item.end;
+ };
+
+ if (!compareTimes) {
+ // Spatial horizontal comparisons
+ var rtl = !!(items[0] && items[0].options.rtl);
+
+ if (rtl) {
+ getItemStart = function getItemStart(item) {
+ return item.right;
+ };
+ } else {
+ getItemStart = function getItemStart(item) {
+ return item.left;
+ };
+ }
+
+ getItemEnd = function getItemEnd(item) {
+ return getItemStart(item) + item.width + margins.horizontal;
+ };
+ }
+
+ var itemsToPosition = [];
+ var itemsAlreadyPositioned = []; // It's vital that this array is kept sorted based on the start of each item
+ // If the order we needed to place items was based purely on the start of each item, we could calculate stacking very efficiently.
+ // Unfortunately for us, this is not guaranteed. But the order is often based on the start of items at least to some degree, and
+ // we can use this to make some optimisations. While items are proceeding in order of start, we can keep moving our search indexes
+ // forwards. Then if we encounter an item that's out of order, we reset our indexes and search from the beginning of the array again.
+
+ var previousStart = null;
+ var insertionIndex = 0; // First let's handle any immoveable items
+
+ var _iterator = _createForOfIteratorHelper$5(items),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ var item = _step.value;
+
+ if (shouldStack(item)) {
+ itemsToPosition.push(item);
+ } else {
+ if (shouldOthersStack(item)) {
+ (function () {
+ var itemStart = getItemStart(item); // We need to put immoveable items into itemsAlreadyPositioned and ensure that this array is sorted.
+ // We could simply insert them, and then use JavaScript's sort function to sort them afterwards.
+ // This would achieve an average complexity of O(n log n).
+ //
+ // Instead, I'm gambling that the start of each item will usually be the same or later than the
+ // start of the previous item. While this holds (best case), we can insert items in O(n).
+ // In the worst case (where each item starts before the previous item) this grows to O(n^2).
+ //
+ // I am making the assumption that for most datasets, the "order" function will have relatively low cardinality,
+ // and therefore this tradeoff should be easily worth it.
+
+ if (previousStart !== null && itemStart < previousStart - EPSILON) {
+ insertionIndex = 0;
+ }
+
+ previousStart = itemStart;
+ insertionIndex = findIndexFrom(itemsAlreadyPositioned, function (i) {
+ return getItemStart(i) - EPSILON > itemStart;
+ }, insertionIndex);
+
+ _spliceInstanceProperty(itemsAlreadyPositioned).call(itemsAlreadyPositioned, insertionIndex, 0, item);
+
+ insertionIndex++;
+ })();
+ }
+ }
+ } // Now we can loop through each item (in order) and find a position for them
+
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ previousStart = null;
+ var previousEnd = null;
+ insertionIndex = 0;
+ var horizontalOverlapStartIndex = 0;
+ var horizontalOverlapEndIndex = 0;
+ var maxHeight = 0;
+
+ var _loop = function _loop() {
+ var _context2, _context3;
+
+ var item = itemsToPosition.shift();
+ item.top = getInitialHeight(item);
+ var itemStart = getItemStart(item);
+ var itemEnd = getItemEnd(item);
+
+ if (previousStart !== null && itemStart < previousStart - EPSILON) {
+ horizontalOverlapStartIndex = 0;
+ horizontalOverlapEndIndex = 0;
+ insertionIndex = 0;
+ previousEnd = null;
+ }
+
+ previousStart = itemStart; // Take advantage of the sorted itemsAlreadyPositioned array to narrow down the search
+
+ horizontalOverlapStartIndex = findIndexFrom(itemsAlreadyPositioned, function (i) {
+ return itemStart < getItemEnd(i) - EPSILON;
+ }, horizontalOverlapStartIndex); // Since items aren't sorted by end time, it might increase or decrease from one item to the next. In order to keep an efficient search area, we will seek forwards/backwards accordingly.
+
+ if (previousEnd === null || previousEnd < itemEnd - EPSILON) {
+ horizontalOverlapEndIndex = findIndexFrom(itemsAlreadyPositioned, function (i) {
+ return itemEnd < getItemStart(i) - EPSILON;
+ }, Math.max(horizontalOverlapStartIndex, horizontalOverlapEndIndex));
+ }
+
+ if (previousEnd !== null && previousEnd - EPSILON > itemEnd) {
+ horizontalOverlapEndIndex = findLastIndexBetween(itemsAlreadyPositioned, function (i) {
+ return itemEnd + EPSILON >= getItemStart(i);
+ }, horizontalOverlapStartIndex, horizontalOVerlapEndIndex) + 1;
+ } // Sort by vertical position so we don't have to reconsider past items if we move an item
+
+
+ var horizontallyCollidingItems = _sortInstanceProperty(_context2 = _filterInstanceProperty(_context3 = _sliceInstanceProperty(itemsAlreadyPositioned).call(itemsAlreadyPositioned, horizontalOverlapStartIndex, horizontalOverlapEndIndex)).call(_context3, function (i) {
+ return itemStart < getItemEnd(i) - EPSILON && itemEnd - EPSILON > getItemStart(i);
+ })).call(_context2, function (a, b) {
+ return a.top - b.top;
+ }); // Keep moving the item down until it stops colliding with any other items
+
+
+ for (var i2 = 0; i2 < horizontallyCollidingItems.length; i2++) {
+ var otherItem = horizontallyCollidingItems[i2];
+
+ if (checkVerticalSpatialCollision(item, otherItem, margins)) {
+ item.top = otherItem.top + otherItem.height + margins.vertical;
+ }
+ }
+
+ if (shouldOthersStack(item)) {
+ // Insert the item into itemsAlreadyPositioned, ensuring itemsAlreadyPositioned remains sorted.
+ // In the best case, we can insert an item in constant time O(1). In the worst case, we insert an item in linear time O(n).
+ // In both cases, this is better than doing a naive insert and then sort, which would cost on average O(n log n).
+ insertionIndex = findIndexFrom(itemsAlreadyPositioned, function (i) {
+ return getItemStart(i) - EPSILON > itemStart;
+ }, insertionIndex);
+
+ _spliceInstanceProperty(itemsAlreadyPositioned).call(itemsAlreadyPositioned, insertionIndex, 0, item);
+
+ insertionIndex++;
+ } // Keep track of the tallest item we've seen before
+
+
+ var currentHeight = item.top + item.height;
+
+ if (currentHeight > maxHeight) {
+ maxHeight = currentHeight;
+ }
+
+ if (shouldBail && shouldBail()) {
+ return {
+ v: null
+ };
+ }
+ };
+
+ while (itemsToPosition.length > 0) {
+ var _ret = _loop();
+
+ if (_typeof$1(_ret) === "object") return _ret.v;
+ }
+
+ return maxHeight;
+ }
/**
* Test if the two provided items collide
* The items must have parameters left, width, top, and height.
* @param {Item} a The first item
* @param {Item} b The second item
- * @param {{horizontal: number, vertical: number}} margin
+ * @param {{vertical: number}} margin
* An object containing a horizontal and vertical
* minimum required margin.
- * @param {boolean} rtl
* @return {boolean} true if a and b collide, else false
*/
- function collision(a, b, margin, rtl) {
- if (rtl) {
- return a.right - margin.horizontal + EPSILON < b.right + b.width && a.right + a.width + margin.horizontal - EPSILON > b.right && a.top - margin.vertical + EPSILON < b.top + b.height && a.top + a.height + margin.vertical - EPSILON > b.top;
- } else {
- return a.left - margin.horizontal + EPSILON < b.left + b.width && a.left + a.width + margin.horizontal - EPSILON > b.left && a.top - margin.vertical + EPSILON < b.top + b.height && a.top + a.height + margin.vertical - EPSILON > b.top;
- }
+
+ function checkVerticalSpatialCollision(a, b, margin) {
+ return a.top - margin.vertical + EPSILON < b.top + b.height && a.top + a.height + margin.vertical - EPSILON > b.top;
}
/**
- * Test if the two provided objects collide
- * The objects must have parameters start, end, top, and height.
- * @param {Object} a The first Object
- * @param {Object} b The second Object
- * @return {boolean} true if a and b collide, else false
+ * Find index of first item to meet predicate after a certain index.
+ * If no such item is found, returns the length of the array.
+ *
+ * @param {any[]} arr The array
+ * @param {(item) => boolean} predicate A function that should return true when a suitable item is found
+ * @param {number|undefined} startIndex The index to start search from (inclusive). Optional, if not provided will search from the beginning of the array.
+ *
+ * @return {number}
*/
- function collisionByTimes(a, b) {
- // Check for overlap by time and height. Abutting is OK and
- // not considered a collision while overlap is considered a collision.
- var timeOverlap = a.start < b.end && a.end > b.start;
- var heightOverlap = a.top < b.top + b.height && a.top + a.height > b.top;
- return timeOverlap && heightOverlap;
+
+ function findIndexFrom(arr, predicate, startIndex) {
+ var _context4;
+
+ if (!startIndex) {
+ startIndex = 0;
+ }
+
+ var matchIndex = _findIndexInstanceProperty(_context4 = _sliceInstanceProperty(arr).call(arr, startIndex)).call(_context4, predicate);
+
+ if (matchIndex === -1) {
+ return arr.length;
+ }
+
+ return matchIndex + startIndex;
+ }
+ /**
+ * Find index of last item to meet predicate within a given range.
+ * If no such item is found, returns the index prior to the start of the range.
+ *
+ * @param {any[]} arr The array
+ * @param {(item) => boolean} predicate A function that should return true when a suitable item is found
+ * @param {number|undefined} startIndex The earliest index to search to (inclusive). Optional, if not provided will continue until the start of the array.
+ * @param {number|undefined} endIndex The end of the search range (exclusive). The search will begin on the index prior to this value. Optional, defaults to the end of array.
+ *
+ * @return {number}
+ */
+
+
+ function findLastIndexBetween(arr, predicate, startIndex, endIndex) {
+ if (!startIndex) {
+ startIndex = 0;
+ }
+
+ if (!endIndex) {
+ endIndex = arr.length;
+ }
+
+ for (i = endIndex - 1; i >= startIndex; i--) {
+ if (predicate(arr[i])) {
+ return i;
+ }
+ }
+
+ return startIndex - 1;
}
var stack$1 = /*#__PURE__*/Object.freeze({
@@ -25915,18 +34002,16 @@
substack: substack,
nostack: nostack,
stackSubgroups: stackSubgroups,
- stackSubgroupsWithInnerStack: stackSubgroupsWithInnerStack,
- collision: collision,
- collisionByTimes: collisionByTimes
+ stackSubgroupsWithInnerStack: stackSubgroupsWithInnerStack
});
- var UNGROUPED = '__ungrouped__'; // reserved group id for ungrouped items
+ var UNGROUPED$3 = '__ungrouped__'; // reserved group id for ungrouped items
- var BACKGROUND = '__background__'; // reserved group id for background items without group
+ var BACKGROUND$2 = '__background__'; // reserved group id for background items without group
- var ReservedGroupIds = {
- UNGROUPED: UNGROUPED,
- BACKGROUND: BACKGROUND
+ var ReservedGroupIds$1 = {
+ UNGROUPED: UNGROUPED$3,
+ BACKGROUND: BACKGROUND$2
};
/**
* @constructor Group
@@ -25942,7 +34027,7 @@
function Group(groupId, data, itemSet) {
var _this = this;
- classCallCheck(this, Group);
+ _classCallCheck(this, Group);
this.groupId = groupId;
this.subgroups = {};
@@ -26034,7 +34119,7 @@
*/
- createClass(Group, [{
+ _createClass(Group, [{
key: "_create",
value: function _create() {
var label = document.createElement('div');
@@ -26089,7 +34174,7 @@
if (this.itemSet.options && this.itemSet.options.groupTemplate) {
var _context;
- templateFunction = bind$2(_context = this.itemSet.options.groupTemplate).call(_context, this);
+ templateFunction = _bindInstanceProperty$1(_context = this.itemSet.options.groupTemplate).call(_context, this);
content = templateFunction(data, this.dom.inner);
} else {
content = data && data.content;
@@ -26104,18 +34189,18 @@
} else if (content instanceof Object && content.isReactComponent) ; else if (content instanceof Object) {
templateFunction(data, this.dom.inner);
} else if (content !== undefined && content !== null) {
- this.dom.inner.innerHTML = content;
+ this.dom.inner.innerHTML = availableUtils.xss(content);
} else {
- this.dom.inner.innerHTML = this.groupId || ''; // groupId can be null
+ this.dom.inner.innerHTML = availableUtils.xss(this.groupId || ''); // groupId can be null
} // update title
this.dom.label.title = data && data.title || '';
if (!this.dom.inner.firstChild) {
- util$1.addClassName(this.dom.inner, 'vis-hidden');
+ availableUtils.addClassName(this.dom.inner, 'vis-hidden');
} else {
- util$1.removeClassName(this.dom.inner, 'vis-hidden');
+ availableUtils.removeClassName(this.dom.inner, 'vis-hidden');
}
if (data && data.nestedGroups) {
@@ -26131,33 +34216,33 @@
}
}
- util$1.addClassName(this.dom.label, 'vis-nesting-group');
+ availableUtils.addClassName(this.dom.label, 'vis-nesting-group');
if (this.showNested) {
- util$1.removeClassName(this.dom.label, 'collapsed');
- util$1.addClassName(this.dom.label, 'expanded');
+ availableUtils.removeClassName(this.dom.label, 'collapsed');
+ availableUtils.addClassName(this.dom.label, 'expanded');
} else {
- util$1.removeClassName(this.dom.label, 'expanded');
- util$1.addClassName(this.dom.label, 'collapsed');
+ availableUtils.removeClassName(this.dom.label, 'expanded');
+ availableUtils.addClassName(this.dom.label, 'collapsed');
}
} else if (this.nestedGroups) {
this.nestedGroups = null;
- util$1.removeClassName(this.dom.label, 'collapsed');
- util$1.removeClassName(this.dom.label, 'expanded');
- util$1.removeClassName(this.dom.label, 'vis-nesting-group');
+ availableUtils.removeClassName(this.dom.label, 'collapsed');
+ availableUtils.removeClassName(this.dom.label, 'expanded');
+ availableUtils.removeClassName(this.dom.label, 'vis-nesting-group');
}
if (data && (data.treeLevel || data.nestedInGroup)) {
- util$1.addClassName(this.dom.label, 'vis-nested-group');
+ availableUtils.addClassName(this.dom.label, 'vis-nested-group');
if (data.treeLevel) {
- util$1.addClassName(this.dom.label, 'vis-group-level-' + data.treeLevel);
+ availableUtils.addClassName(this.dom.label, 'vis-group-level-' + data.treeLevel);
} else {
// Nesting level is unknown, but we're sure it's at least 1
- util$1.addClassName(this.dom.label, 'vis-group-level-unknown-but-gte1');
+ availableUtils.addClassName(this.dom.label, 'vis-group-level-unknown-but-gte1');
}
} else {
- util$1.addClassName(this.dom.label, 'vis-group-level-0');
+ availableUtils.addClassName(this.dom.label, 'vis-group-level-0');
} // update className
@@ -26165,27 +34250,27 @@
if (className != this.className) {
if (this.className) {
- util$1.removeClassName(this.dom.label, this.className);
- util$1.removeClassName(this.dom.foreground, this.className);
- util$1.removeClassName(this.dom.background, this.className);
- util$1.removeClassName(this.dom.axis, this.className);
+ availableUtils.removeClassName(this.dom.label, this.className);
+ availableUtils.removeClassName(this.dom.foreground, this.className);
+ availableUtils.removeClassName(this.dom.background, this.className);
+ availableUtils.removeClassName(this.dom.axis, this.className);
}
- util$1.addClassName(this.dom.label, className);
- util$1.addClassName(this.dom.foreground, className);
- util$1.addClassName(this.dom.background, className);
- util$1.addClassName(this.dom.axis, className);
+ availableUtils.addClassName(this.dom.label, className);
+ availableUtils.addClassName(this.dom.foreground, className);
+ availableUtils.addClassName(this.dom.background, className);
+ availableUtils.addClassName(this.dom.axis, className);
this.className = className;
} // update style
if (this.style) {
- util$1.removeCssText(this.dom.label, this.style);
+ availableUtils.removeCssText(this.dom.label, this.style);
this.style = null;
}
if (data && data.style) {
- util$1.addCssText(this.dom.label, data.style);
+ availableUtils.addCssText(this.dom.label, data.style);
this.style = data.style;
}
}
@@ -26214,7 +34299,7 @@
var redrawQueue = {};
var redrawQueueLength = 0;
- forEach$2(util$1).call(util$1, this.items, function (item, key) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.items, function (item, key) {
item.dirty = true;
if (item.displayed) {
@@ -26228,7 +34313,7 @@
if (needRedraw) {
var _loop = function _loop(i) {
- forEach$2(util$1).call(util$1, redrawQueue, function (fns) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, redrawQueue, function (fns) {
fns[i]();
});
};
@@ -26283,7 +34368,7 @@
return true;
}
- if (Math.abs(now$2() - new Date(bailOptions.relativeBailingTime)) > bailOptions.bailTimeMs) {
+ if (Math.abs(_Date$now() - new Date(bailOptions.relativeBailingTime)) > bailOptions.bailTimeMs) {
if (bailOptions.userBailFunction && this.itemSet.userContinueNotBail == null) {
bailOptions.userBailFunction(function (didUserContinue) {
me.itemSet.userContinueNotBail = didUserContinue;
@@ -26319,20 +34404,20 @@
var _context2, _context3, _context4, _context5, _context6, _context7;
var orderedItems = {
- byEnd: filter$2(_context2 = this.orderedItems.byEnd).call(_context2, function (item) {
+ byEnd: _filterInstanceProperty(_context2 = this.orderedItems.byEnd).call(_context2, function (item) {
return !item.isCluster;
}),
- byStart: filter$2(_context3 = this.orderedItems.byStart).call(_context3, function (item) {
+ byStart: _filterInstanceProperty(_context3 = this.orderedItems.byStart).call(_context3, function (item) {
return !item.isCluster;
})
};
var orderedClusters = {
- byEnd: toConsumableArray(new set$3(filter$2(_context4 = map$2(_context5 = this.orderedItems.byEnd).call(_context5, function (item) {
+ byEnd: _toConsumableArray(new _Set(_filterInstanceProperty(_context4 = _mapInstanceProperty(_context5 = this.orderedItems.byEnd).call(_context5, function (item) {
return item.cluster;
})).call(_context4, function (item) {
return !!item;
}))),
- byStart: toConsumableArray(new set$3(filter$2(_context6 = map$2(_context7 = this.orderedItems.byStart).call(_context7, function (item) {
+ byStart: _toConsumableArray(new _Set(_filterInstanceProperty(_context6 = _mapInstanceProperty(_context7 = this.orderedItems.byStart).call(_context7, function (item) {
return item.cluster;
})).call(_context6, function (item) {
return !!item;
@@ -26346,15 +34431,15 @@
var getVisibleItems = function getVisibleItems() {
var _context8, _context9, _context10;
- var visibleItems = _this2._updateItemsInRange(orderedItems, filter$2(_context8 = _this2.visibleItems).call(_context8, function (item) {
+ var visibleItems = _this2._updateItemsInRange(orderedItems, _filterInstanceProperty(_context8 = _this2.visibleItems).call(_context8, function (item) {
return !item.isCluster;
}), range);
- var visibleClusters = _this2._updateClustersInRange(orderedClusters, filter$2(_context9 = _this2.visibleItems).call(_context9, function (item) {
+ var visibleClusters = _this2._updateClustersInRange(orderedClusters, _filterInstanceProperty(_context9 = _this2.visibleItems).call(_context9, function (item) {
return item.isCluster;
}), range);
- return concat$2(_context10 = []).call(_context10, toConsumableArray(visibleItems), toConsumableArray(visibleClusters));
+ return _concatInstanceProperty(_context10 = []).call(_context10, _toConsumableArray(visibleItems), _toConsumableArray(visibleClusters));
};
/**
* Get visible items grouped by subgroup
@@ -26369,11 +34454,11 @@
var _loop2 = function _loop2(subgroup) {
var _context11;
- var items = filter$2(_context11 = _this2.visibleItems).call(_context11, function (item) {
+ var items = _filterInstanceProperty(_context11 = _this2.visibleItems).call(_context11, function (item) {
return item.data.subgroup === subgroup;
});
- visibleSubgroupsItems[subgroup] = orderFn ? sort$2(items).call(items, function (a, b) {
+ visibleSubgroupsItems[subgroup] = orderFn ? _sortInstanceProperty(items).call(items, function (a, b) {
return orderFn(a.data, b.data);
}) : items;
};
@@ -26406,13 +34491,13 @@
// order all items outside clusters and force a restacking
- var customOrderedItems = sort$2(_context12 = filter$2(_context13 = slice$2(_context14 = this.visibleItems).call(_context14)).call(_context13, function (item) {
+ var customOrderedItems = _sortInstanceProperty(_context12 = _filterInstanceProperty(_context13 = _sliceInstanceProperty(_context14 = this.visibleItems).call(_context14)).call(_context13, function (item) {
return item.isCluster || !item.isCluster && !item.cluster;
})).call(_context12, function (a, b) {
return me.itemSet.options.order(a.data, b.data);
});
- this.shouldBailStackItems = stack(customOrderedItems, margin, true, bind$2(_context15 = this._shouldBailItemsRedraw).call(_context15, this));
+ this.shouldBailStackItems = stack(customOrderedItems, margin, true, _bindInstanceProperty$1(_context15 = this._shouldBailItemsRedraw).call(_context15, this));
}
} else {
// no custom order function, lazy stacking
@@ -26429,7 +34514,7 @@
var _context16;
// TODO: ugly way to access options...
- this.shouldBailStackItems = stack(this.visibleItems, margin, true, bind$2(_context16 = this._shouldBailItemsRedraw).call(_context16, this));
+ this.shouldBailStackItems = stack(this.visibleItems, margin, true, _bindInstanceProperty$1(_context16 = this._shouldBailItemsRedraw).call(_context16, this));
}
} else {
// no stacking
@@ -26448,7 +34533,7 @@
}
if (this.itemSet.options.cluster) {
- forEach$2(util$1).call(util$1, this.items, function (item) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.items, function (item) {
if (item.cluster && item.displayed) {
item.hide();
}
@@ -26472,12 +34557,12 @@
}, {
key: "_didResize",
value: function _didResize(resized, height) {
- resized = util$1.updateProperty(this, 'height', height) || resized; // recalculate size of label
+ resized = availableUtils.updateProperty(this, 'height', height) || resized; // recalculate size of label
var labelWidth = this.dom.inner.clientWidth;
var labelHeight = this.dom.inner.clientHeight;
- resized = util$1.updateProperty(this.props.label, 'width', labelWidth) || resized;
- resized = util$1.updateProperty(this.props.label, 'height', labelHeight) || resized;
+ resized = availableUtils.updateProperty(this.props.label, 'width', labelWidth) || resized;
+ resized = availableUtils.updateProperty(this.props.label, 'height', labelHeight) || resized;
return resized;
}
/**
@@ -26501,12 +34586,11 @@
key: "_updateItemsVerticalPosition",
value: function _updateItemsVerticalPosition(margin) {
for (var i = 0, ii = this.visibleItems.length; i < ii; i++) {
- var _item = this.visibleItems[i];
+ var item = this.visibleItems[i];
+ item.repositionY(margin);
- _item.repositionY(margin);
-
- if (!this.isVisible && this.groupId != ReservedGroupIds.BACKGROUND) {
- if (_item.displayed) _item.hide();
+ if (!this.isVisible && this.groupId != ReservedGroupIds$1.BACKGROUND) {
+ if (item.displayed) item.hide();
}
}
}
@@ -26535,34 +34619,34 @@
var queue = [function () {
forceRestack = _this3._didMarkerHeightChange.call(_this3) || forceRestack;
}, // recalculate the height of the subgroups
- bind$2(_context17 = this._updateSubGroupHeights).call(_context17, this, margin), // calculate actual size and position
- bind$2(_context18 = this._calculateGroupSizeAndPosition).call(_context18, this), function () {
+ _bindInstanceProperty$1(_context17 = this._updateSubGroupHeights).call(_context17, this, margin), // calculate actual size and position
+ _bindInstanceProperty$1(_context18 = this._calculateGroupSizeAndPosition).call(_context18, this), function () {
var _context19;
- _this3.isVisible = bind$2(_context19 = _this3._isGroupVisible).call(_context19, _this3)(range, margin);
+ _this3.isVisible = _bindInstanceProperty$1(_context19 = _this3._isGroupVisible).call(_context19, _this3)(range, margin);
}, function () {
var _context20;
- bind$2(_context20 = _this3._redrawItems).call(_context20, _this3)(forceRestack, lastIsVisible, margin, range);
+ _bindInstanceProperty$1(_context20 = _this3._redrawItems).call(_context20, _this3)(forceRestack, lastIsVisible, margin, range);
}, // update subgroups
- bind$2(_context21 = this._updateSubgroupsSizes).call(_context21, this), function () {
+ _bindInstanceProperty$1(_context21 = this._updateSubgroupsSizes).call(_context21, this), function () {
var _context22;
- height = bind$2(_context22 = _this3._calculateHeight).call(_context22, _this3)(margin);
+ height = _bindInstanceProperty$1(_context22 = _this3._calculateHeight).call(_context22, _this3)(margin);
}, // calculate actual size and position again
- bind$2(_context23 = this._calculateGroupSizeAndPosition).call(_context23, this), function () {
+ _bindInstanceProperty$1(_context23 = this._calculateGroupSizeAndPosition).call(_context23, this), function () {
var _context24;
- resized = bind$2(_context24 = _this3._didResize).call(_context24, _this3)(resized, height);
+ resized = _bindInstanceProperty$1(_context24 = _this3._didResize).call(_context24, _this3)(resized, height);
}, function () {
var _context25;
- bind$2(_context25 = _this3._applyGroupHeight).call(_context25, _this3)(height);
+ _bindInstanceProperty$1(_context25 = _this3._applyGroupHeight).call(_context25, _this3)(height);
}, function () {
var _context26;
- bind$2(_context26 = _this3._updateItemsVerticalPosition).call(_context26, _this3)(margin);
- }, bind$2(_context27 = function _context27() {
+ _bindInstanceProperty$1(_context26 = _this3._updateItemsVerticalPosition).call(_context26, _this3)(margin);
+ }, _bindInstanceProperty$1(_context27 = function _context27() {
if (!_this3.isVisible && _this3.height) {
resized = false;
}
@@ -26575,7 +34659,7 @@
} else {
var result;
- forEach$2(queue).call(queue, function (fn) {
+ _forEachInstanceProperty(queue).call(queue, function (fn) {
result = fn();
});
@@ -26594,12 +34678,12 @@
value: function _updateSubGroupHeights(margin) {
var _this4 = this;
- if (keys$3(this.subgroups).length > 0) {
+ if (_Object$keys(this.subgroups).length > 0) {
var me = this;
this._resetSubgroups();
- forEach$2(util$1).call(util$1, this.visibleItems, function (item) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.visibleItems, function (item) {
if (item.data.subgroup !== undefined) {
me.subgroups[item.data.subgroup].height = Math.max(me.subgroups[item.data.subgroup].height, item.height + margin.item.vertical);
me.subgroups[item.data.subgroup].visible = typeof _this4.subgroupVisibility[item.data.subgroup] === 'undefined' ? true : Boolean(_this4.subgroupVisibility[item.data.subgroup]);
@@ -26636,7 +34720,7 @@
var items;
if (this.heightMode === 'fixed') {
- items = util$1.toArray(this.items);
+ items = availableUtils.toArray(this.items);
} else {
// default or 'auto'
items = this.visibleItems;
@@ -26646,7 +34730,7 @@
var min = items[0].top;
var max = items[0].top + items[0].height;
- forEach$2(util$1).call(util$1, items, function (item) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, items, function (item) {
min = Math.min(min, item.top);
max = Math.max(max, item.top + item.height);
});
@@ -26656,7 +34740,7 @@
var offset = min - margin.axis;
max -= offset;
- forEach$2(util$1).call(util$1, items, function (item) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, items, function (item) {
item.top -= offset;
});
}
@@ -26667,7 +34751,7 @@
height = Math.max(height, this.props.label.height);
}
} else {
- height = this.props.label.height;
+ height = this.props.label.height;
}
return height;
@@ -26746,7 +34830,7 @@
this.orderSubgroups();
}
- if (!includes$4(_context28 = this.visibleItems).call(_context28, item)) {
+ if (!_includesInstanceProperty(_context28 = this.visibleItems).call(_context28, item)) {
var range = this.itemSet.body.range; // TODO: not nice accessing the range like this
this._checkIfVisible(item, this.visibleItems, range);
@@ -26806,7 +34890,7 @@
var newStart = me.subgroups[subgroup].items[0].data.start;
var newEnd = initialEnd - 1;
- forEach$2(_context29 = me.subgroups[subgroup].items).call(_context29, function (item) {
+ _forEachInstanceProperty(_context29 = me.subgroups[subgroup].items).call(_context29, function (item) {
if (new Date(item.data.start) < new Date(newStart)) {
newStart = item.data.start;
}
@@ -26845,7 +34929,7 @@
});
}
- sort$2(sortArray).call(sortArray, function (a, b) {
+ _sortInstanceProperty(sortArray).call(sortArray, function (a, b) {
return a.sortField - b.sortField;
});
} else if (typeof this.subgroupOrderer == 'function') {
@@ -26853,7 +34937,7 @@
sortArray.push(this.subgroups[_subgroup].items[0].data);
}
- sort$2(sortArray).call(sortArray, this.subgroupOrderer);
+ _sortInstanceProperty(sortArray).call(sortArray, this.subgroupOrderer);
}
if (sortArray.length > 0) {
@@ -26891,9 +34975,9 @@
item.setParent(null);
this.stackDirty = true; // remove from visible items
- var index = indexOf$3(_context30 = this.visibleItems).call(_context30, item);
+ var index = _indexOfInstanceProperty(_context30 = this.visibleItems).call(_context30, item);
- if (index != -1) splice$2(_context31 = this.visibleItems).call(_context31, index, 1);
+ if (index != -1) _spliceInstanceProperty(_context31 = this.visibleItems).call(_context31, index, 1);
if (item.data.subgroup !== undefined) {
this._removeFromSubgroup(item);
@@ -26918,13 +35002,13 @@
if (subgroup) {
var _context32;
- var itemIndex = indexOf$3(_context32 = subgroup.items).call(_context32, item); // Check the item is actually in this subgroup. How should items not in the group be handled?
+ var itemIndex = _indexOfInstanceProperty(_context32 = subgroup.items).call(_context32, item); // Check the item is actually in this subgroup. How should items not in the group be handled?
if (itemIndex >= 0) {
var _context33;
- splice$2(_context33 = subgroup.items).call(_context33, itemIndex, 1);
+ _spliceInstanceProperty(_context33 = subgroup.items).call(_context33, itemIndex, 1);
if (!subgroup.items.length) {
delete this.subgroups[subgroupId];
@@ -26952,7 +35036,7 @@
}, {
key: "order",
value: function order() {
- var array = util$1.toArray(this.items);
+ var array = availableUtils.toArray(this.items);
var startArray = [];
var endArray = [];
@@ -26986,7 +35070,7 @@
var visibleItems = [];
var visibleItemsLookup = {}; // we keep this to quickly look up if an item already exists in the list without using indexOf on visibleItems
- if (!this.isVisible && this.groupId != ReservedGroupIds.BACKGROUND) {
+ if (!this.isVisible && this.groupId != ReservedGroupIds$1.BACKGROUND) {
for (var i = 0; i < oldVisibleItems.length; i++) {
var item = oldVisibleItems[i];
if (item.displayed) item.hide();
@@ -27010,11 +35094,16 @@
}; // this function is used to do the binary search for items having start and end dates (range).
- var endSearchFunction = function endSearchFunction(value) {
- if (value < lowerBound) {
+ var endSearchFunction = function endSearchFunction(data) {
+ var start = data.start,
+ end = data.end;
+
+ if (end < lowerBound) {
return -1;
- } else {
+ } else if (start <= upperBound) {
return 0;
+ } else {
+ return 1;
}
}; // first check if the items that were in view previously are still in view.
// IMPORTANT: this handles the case for the items with startdate before the window and enddate after the window!
@@ -27028,7 +35117,7 @@
} // we do a binary search for the items that have only start values.
- var initialPosByStart = util$1.binarySearchCustom(orderedItems.byStart, startSearchFunction, 'data', 'start'); // trace the visible items from the inital start pos both ways until an invisible item is found, we only look at the start values.
+ var initialPosByStart = availableUtils.binarySearchCustom(orderedItems.byStart, startSearchFunction, 'data', 'start'); // trace the visible items from the inital start pos both ways until an invisible item is found, we only look at the start values.
this._traceVisible(initialPosByStart, orderedItems.byStart, visibleItems, visibleItemsLookup, function (item) {
return item.data.start < lowerBound || item.data.start > upperBound;
@@ -27044,7 +35133,7 @@
}
} else {
// we do a binary search for the items that have defined end times.
- var initialPosByEnd = util$1.binarySearchCustom(orderedItems.byEnd, endSearchFunction, 'data', 'end'); // trace the visible items from the inital start pos both ways until an invisible item is found, we only look at the end values.
+ var initialPosByEnd = availableUtils.binarySearchCustom(orderedItems.byEnd, endSearchFunction, 'data'); // trace the visible items from the inital start pos both ways until an invisible item is found, we only look at the end values.
this._traceVisible(initialPosByEnd, orderedItems.byEnd, visibleItems, visibleItemsLookup, function (item) {
return item.data.end < lowerBound || item.data.start > upperBound;
@@ -27055,11 +35144,11 @@
var redrawQueueLength = 0;
for (var _i3 = 0; _i3 < visibleItems.length; _i3++) {
- var _item2 = visibleItems[_i3];
+ var _item = visibleItems[_i3];
- if (!_item2.displayed) {
+ if (!_item.displayed) {
var returnQueue = true;
- redrawQueue[_i3] = _item2.redraw(returnQueue);
+ redrawQueue[_i3] = _item.redraw(returnQueue);
redrawQueueLength = redrawQueue[_i3].length;
}
}
@@ -27068,7 +35157,7 @@
if (needRedraw) {
var _loop4 = function _loop4(j) {
- forEach$2(util$1).call(util$1, redrawQueue, function (fns) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, redrawQueue, function (fns) {
fns[j]();
});
};
@@ -27099,30 +35188,30 @@
value: function _traceVisible(initialPos, items, visibleItems, visibleItemsLookup, breakCondition) {
if (initialPos != -1) {
for (var i = initialPos; i >= 0; i--) {
- var _item3 = items[i];
+ var item = items[i];
- if (breakCondition(_item3)) {
+ if (breakCondition(item)) {
break;
} else {
- if (!(_item3.isCluster && !_item3.hasItems()) && !_item3.cluster) {
- if (visibleItemsLookup[_item3.id] === undefined) {
- visibleItemsLookup[_item3.id] = true;
- visibleItems.push(_item3);
+ if (!(item.isCluster && !item.hasItems()) && !item.cluster) {
+ if (visibleItemsLookup[item.id] === undefined) {
+ visibleItemsLookup[item.id] = true;
+ visibleItems.push(item);
}
}
}
}
for (var _i5 = initialPos + 1; _i5 < items.length; _i5++) {
- var _item4 = items[_i5];
+ var _item2 = items[_i5];
- if (breakCondition(_item4)) {
+ if (breakCondition(_item2)) {
break;
} else {
- if (!(_item4.isCluster && !_item4.hasItems()) && !_item4.cluster) {
- if (visibleItemsLookup[_item4.id] === undefined) {
- visibleItemsLookup[_item4.id] = true;
- visibleItems.push(_item4);
+ if (!(_item2.isCluster && !_item2.hasItems()) && !_item2.cluster) {
+ if (visibleItemsLookup[_item2.id] === undefined) {
+ visibleItemsLookup[_item2.id] = true;
+ visibleItems.push(_item2);
}
}
}
@@ -27212,11 +35301,11 @@
var redrawQueueLength = 0;
for (var _i8 = 0; _i8 < visibleClusters.length; _i8++) {
- var _item5 = visibleClusters[_i8];
+ var item = visibleClusters[_i8];
- if (!_item5.displayed) {
+ if (!item.displayed) {
var returnQueue = true;
- redrawQueue[_i8] = _item5.redraw(returnQueue);
+ redrawQueue[_i8] = item.redraw(returnQueue);
redrawQueueLength = redrawQueue[_i8].length;
}
}
@@ -27226,7 +35315,7 @@
if (needRedraw) {
// redraw all regular items
for (var j = 0; j < redrawQueueLength; j++) {
- forEach$2(util$1).call(util$1, redrawQueue, function (fns) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, redrawQueue, function (fns) {
fns[j]();
});
}
@@ -27274,13 +35363,18 @@
return Group;
}();
+ function _createSuper$8(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$8(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
+
+ function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/**
* @constructor BackgroundGroup
* @extends Group
*/
var BackgroundGroup = /*#__PURE__*/function (_Group) {
- inherits(BackgroundGroup, _Group);
+ _inherits(BackgroundGroup, _Group);
+
+ var _super = _createSuper$8(BackgroundGroup);
/**
* @param {number | string} groupId
@@ -27290,9 +35384,9 @@
function BackgroundGroup(groupId, data, itemSet) {
var _this;
- classCallCheck(this, BackgroundGroup);
+ _classCallCheck(this, BackgroundGroup);
- _this = possibleConstructorReturn(this, getPrototypeOf$5(BackgroundGroup).call(this, groupId, data, itemSet)); // Group.call(this, groupId, data, itemSet);
+ _this = _super.call(this, groupId, data, itemSet); // Group.call(this, groupId, data, itemSet);
_this.width = 0;
_this.height = 0;
@@ -27309,7 +35403,7 @@
*/
- createClass(BackgroundGroup, [{
+ _createClass(BackgroundGroup, [{
key: "redraw",
value: function redraw(range, margin, forceRestack) {
// eslint-disable-line no-unused-vars
@@ -27343,9 +35437,14 @@
return BackgroundGroup;
}(Group);
- var css_248z$9 = "\n.vis-item {\n position: absolute;\n color: #1A1A1A;\n border-color: #97B0F8;\n border-width: 1px;\n background-color: #D5DDF6;\n display: inline-block;\n z-index: 1;\n /*overflow: hidden;*/\n}\n\n.vis-item.vis-selected {\n border-color: #FFC200;\n background-color: #FFF785;\n\n /* z-index must be higher than the z-index of custom time bar and current time bar */\n z-index: 2;\n}\n\n.vis-editable.vis-selected {\n cursor: move;\n}\n\n.vis-item.vis-point.vis-selected {\n background-color: #FFF785;\n}\n\n.vis-item.vis-box {\n text-align: center;\n border-style: solid;\n border-radius: 2px;\n}\n\n.vis-item.vis-point {\n background: none;\n}\n\n.vis-item.vis-dot {\n position: absolute;\n padding: 0;\n border-width: 4px;\n border-style: solid;\n border-radius: 4px;\n}\n\n.vis-item.vis-range {\n border-style: solid;\n border-radius: 2px;\n box-sizing: border-box;\n}\n\n.vis-item.vis-background {\n border: none;\n background-color: rgba(213, 221, 246, 0.4);\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n}\n\n.vis-item .vis-item-overflow {\n position: relative;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n overflow: hidden;\n}\n\n.vis-item-visible-frame {\n white-space: nowrap;\n}\n\n.vis-item.vis-range .vis-item-content {\n position: relative;\n display: inline-block;\n}\n\n.vis-item.vis-background .vis-item-content {\n position: absolute;\n display: inline-block;\n}\n\n.vis-item.vis-line {\n padding: 0;\n position: absolute;\n width: 0;\n border-left-width: 1px;\n border-left-style: solid;\n}\n\n.vis-item .vis-item-content {\n white-space: nowrap;\n box-sizing: border-box;\n padding: 5px;\n}\n\n.vis-item .vis-onUpdateTime-tooltip {\n position: absolute;\n background: #4f81bd;\n color: white;\n width: 200px;\n text-align: center;\n white-space: nowrap;\n padding: 5px;\n border-radius: 1px;\n transition: 0.4s;\n -o-transition: 0.4s;\n -moz-transition: 0.4s;\n -webkit-transition: 0.4s;\n}\n\n.vis-item .vis-delete, .vis-item .vis-delete-rtl {\n position: absolute;\n top: 0px;\n width: 24px;\n height: 24px;\n box-sizing: border-box;\n padding: 0px 5px;\n cursor: pointer;\n\n -webkit-transition: background 0.2s linear;\n -moz-transition: background 0.2s linear;\n -ms-transition: background 0.2s linear;\n -o-transition: background 0.2s linear;\n transition: background 0.2s linear;\n}\n\n.vis-item .vis-delete {\n right: -24px;\n}\n\n.vis-item .vis-delete-rtl {\n left: -24px;\n}\n\n.vis-item .vis-delete:after, .vis-item .vis-delete-rtl:after {\n content: \"\\00D7\"; /* MULTIPLICATION SIGN */\n color: red;\n font-family: arial, sans-serif;\n font-size: 22px;\n font-weight: bold;\n\n -webkit-transition: color 0.2s linear;\n -moz-transition: color 0.2s linear;\n -ms-transition: color 0.2s linear;\n -o-transition: color 0.2s linear;\n transition: color 0.2s linear;\n}\n\n.vis-item .vis-delete:hover, .vis-item .vis-delete-rtl:hover {\n background: red;\n}\n\n.vis-item .vis-delete:hover:after, .vis-item .vis-delete-rtl:hover:after {\n color: white;\n}\n\n.vis-item .vis-drag-center {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0px;\n cursor: move;\n}\n\n.vis-item.vis-range .vis-drag-left {\n position: absolute;\n width: 24px;\n max-width: 20%;\n min-width: 2px;\n height: 100%;\n top: 0;\n left: -4px;\n\n cursor: w-resize;\n}\n\n.vis-item.vis-range .vis-drag-right {\n position: absolute;\n width: 24px;\n max-width: 20%;\n min-width: 2px;\n height: 100%;\n top: 0;\n right: -4px;\n\n cursor: e-resize;\n}\n\n.vis-range.vis-item.vis-readonly .vis-drag-left,\n.vis-range.vis-item.vis-readonly .vis-drag-right {\n cursor: auto;\n}\n\n.vis-item.vis-cluster {\n vertical-align: center;\n text-align: center;\n border-style: solid;\n border-radius: 2px;\n}\n\n.vis-item.vis-cluster-line {\n padding: 0;\n position: absolute;\n width: 0;\n border-left-width: 1px;\n border-left-style: solid;\n}\n\n.vis-item.vis-cluster-dot {\n position: absolute;\n padding: 0;\n border-width: 4px;\n border-style: solid;\n border-radius: 4px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIml0ZW0uY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQTtFQUNFLGtCQUFrQjtFQUNsQixjQUFjO0VBQ2QscUJBQXFCO0VBQ3JCLGlCQUFpQjtFQUNqQix5QkFBeUI7RUFDekIscUJBQXFCO0VBQ3JCLFVBQVU7RUFDVixvQkFBb0I7QUFDdEI7O0FBRUE7RUFDRSxxQkFBcUI7RUFDckIseUJBQXlCOztFQUV6QixvRkFBb0Y7RUFDcEYsVUFBVTtBQUNaOztBQUVBO0VBQ0UsWUFBWTtBQUNkOztBQUVBO0VBQ0UseUJBQXlCO0FBQzNCOztBQUVBO0VBQ0Usa0JBQWtCO0VBQ2xCLG1CQUFtQjtFQUNuQixrQkFBa0I7QUFDcEI7O0FBRUE7RUFDRSxnQkFBZ0I7QUFDbEI7O0FBRUE7RUFDRSxrQkFBa0I7RUFDbEIsVUFBVTtFQUNWLGlCQUFpQjtFQUNqQixtQkFBbUI7RUFDbkIsa0JBQWtCO0FBQ3BCOztBQUVBO0VBQ0UsbUJBQW1CO0VBQ25CLGtCQUFrQjtFQUNsQixzQkFBc0I7QUFDeEI7O0FBRUE7RUFDRSxZQUFZO0VBQ1osMENBQTBD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color: #97B0F8;\n border-width: 1px;\n background-color: #D5DDF6;\n display: inline-block;\n z-index: 1;\n /*overflow: hidden;*/\n}\n\n.vis-item.vis-selected {\n border-color: #FFC200;\n background-color: #FFF785;\n\n /* z-index must be higher than the z-index of custom time bar and current time bar */\n z-index: 2;\n}\n\n.vis-editable.vis-selected {\n cursor: move;\n}\n\n.vis-item.vis-point.vis-selected {\n background-color: #FFF785;\n}\n\n.vis-item.vis-box {\n text-align: center;\n border-style: solid;\n border-radius: 2px;\n}\n\n.vis-item.vis-point {\n background: none;\n}\n\n.vis-item.vis-dot {\n position: absolute;\n padding: 0;\n border-width: 4px;\n border-style: solid;\n border-radius: 4px;\n}\n\n.vis-item.vis-range {\n border-style: solid;\n border-radius: 2px;\n box-sizing: border-box;\n}\n\n.vis-item.vis-background {\n border: none;\n background-color: rgba(213, 221, 246, 0.4);\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n}\n\n.vis-item .vis-item-overflow {\n position: relative;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n overflow: hidden;\n}\n\n.vis-item-visible-frame {\n white-space: nowrap;\n}\n\n.vis-item.vis-range .vis-item-content {\n position: relative;\n display: inline-block;\n}\n\n.vis-item.vis-background .vis-item-content {\n position: absolute;\n display: inline-block;\n}\n\n.vis-item.vis-line {\n padding: 0;\n position: absolute;\n width: 0;\n border-left-width: 1px;\n border-left-style: solid;\n}\n\n.vis-item .vis-item-content {\n white-space: nowrap;\n box-sizing: border-box;\n padding: 5px;\n}\n\n.vis-item .vis-onUpdateTime-tooltip {\n position: absolute;\n background: #4f81bd;\n color: white;\n width: 200px;\n text-align: center;\n white-space: nowrap;\n padding: 5px;\n border-radius: 1px;\n transition: 0.4s;\n -o-transition: 0.4s;\n -moz-transition: 0.4s;\n -webkit-transition: 0.4s;\n}\n\n.vis-item .vis-delete, .vis-item .vis-delete-rtl {\n position: absolute;\n top: 0px;\n width: 24px;\n height: 24px;\n box-sizing: border-box;\n padding: 0px 5px;\n cursor: pointer;\n\n -webkit-transition: background 0.2s linear;\n -moz-transition: background 0.2s linear;\n -ms-transition: background 0.2s linear;\n -o-transition: background 0.2s linear;\n transition: background 0.2s linear;\n}\n\n.vis-item .vis-delete {\n right: -24px;\n}\n\n.vis-item .vis-delete-rtl {\n left: -24px;\n}\n\n.vis-item .vis-delete:after, .vis-item .vis-delete-rtl:after {\n content: \"\\00D7\"; /* MULTIPLICATION SIGN */\n color: red;\n font-family: arial, sans-serif;\n font-size: 22px;\n font-weight: bold;\n\n -webkit-transition: color 0.2s linear;\n -moz-transition: color 0.2s linear;\n -ms-transition: color 0.2s linear;\n -o-transition: color 0.2s linear;\n transition: color 0.2s linear;\n}\n\n.vis-item .vis-delete:hover, .vis-item .vis-delete-rtl:hover {\n background: red;\n}\n\n.vis-item .vis-delete:hover:after, .vis-item .vis-delete-rtl:hover:after {\n color: white;\n}\n\n.vis-item .vis-drag-center {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0px;\n cursor: move;\n}\n\n.vis-item.vis-range .vis-drag-left {\n position: absolute;\n width: 24px;\n max-width: 20%;\n min-width: 2px;\n height: 100%;\n top: 0;\n left: -4px;\n\n cursor: w-resize;\n}\n\n.vis-item.vis-range .vis-drag-right {\n position: absolute;\n width: 24px;\n max-width: 20%;\n min-width: 2px;\n height: 100%;\n top: 0;\n right: -4px;\n\n cursor: e-resize;\n}\n\n.vis-range.vis-item.vis-readonly .vis-drag-left,\n.vis-range.vis-item.vis-readonly .vis-drag-right {\n cursor: auto;\n}\n\n.vis-item.vis-cluster {\n vertical-align: center;\n text-align: center;\n border-style: solid;\n border-radius: 2px;\n}\n\n.vis-item.vis-cluster-line {\n padding: 0;\n position: absolute;\n width: 0;\n border-left-width: 1px;\n border-left-style: solid;\n}\n\n.vis-item.vis-cluster-dot {\n position: absolute;\n padding: 0;\n border-width: 4px;\n border-style: solid;\n border-radius: 4px;\n}";
+ styleInject(css_248z$5);
+ function _createForOfIteratorHelper$4(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray$4(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
+
+ function _unsupportedIterableToArray$4(o, minLen) { var _context8; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$4(o, minLen); var n = _sliceInstanceProperty(_context8 = Object.prototype.toString.call(o)).call(_context8, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from$1(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$4(o, minLen); }
+
+ function _arrayLikeToArray$4(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
/**
* Item
*/
@@ -27364,7 +35463,7 @@
var _context,
_this = this;
- classCallCheck(this, Item);
+ _classCallCheck(this, Item);
this.id = null;
this.parent = null;
@@ -27375,12 +35474,12 @@
locales: locales,
locale: 'en'
};
- this.options = util$1.extend({}, this.defaultOptions, options);
- this.options.locales = util$1.extend({}, locales, this.options.locales);
+ this.options = availableUtils.extend({}, this.defaultOptions, options);
+ this.options.locales = availableUtils.extend({}, locales, this.options.locales);
var defaultLocales = this.defaultOptions.locales[this.defaultOptions.locale];
- forEach$2(_context = keys$3(this.options.locales)).call(_context, function (locale) {
- _this.options.locales[locale] = util$1.extend({}, defaultLocales, _this.options.locales[locale]);
+ _forEachInstanceProperty(_context = _Object$keys(this.options.locales)).call(_context, function (locale) {
+ _this.options.locales[locale] = availableUtils.extend({}, defaultLocales, _this.options.locales[locale]);
});
this.selected = false;
@@ -27403,7 +35502,7 @@
*/
- createClass(Item, [{
+ _createClass(Item, [{
key: "select",
value: function select() {
if (this.selectable) {
@@ -27527,24 +35626,24 @@
}, {
key: "redraw",
- value: function redraw() {} // should be implemented by the item
-
+ value: function redraw() {// should be implemented by the item
+ }
/**
* Reposition the Item horizontally
*/
}, {
key: "repositionX",
- value: function repositionX() {} // should be implemented by the item
-
+ value: function repositionX() {// should be implemented by the item
+ }
/**
* Reposition the Item vertically
*/
}, {
key: "repositionY",
- value: function repositionY() {} // should be implemented by the item
-
+ value: function repositionY() {// should be implemented by the item
+ }
/**
* Repaint a drag area on the center of the item when the item is selected
* @protected
@@ -27561,7 +35660,7 @@
var dragCenter = document.createElement('div');
dragCenter.className = 'vis-drag-center';
dragCenter.dragCenterItem = this;
- this.hammerDragCenter = new Hammer$1(dragCenter);
+ this.hammerDragCenter = new Hammer(dragCenter);
this.hammerDragCenter.on('tap', function (event) {
me.parent.itemSet.body.emitter.emit('click', {
event: event,
@@ -27584,8 +35683,12 @@
me.parent.itemSet._onDragStart(event);
});
- this.hammerDragCenter.on('panmove', bind$2(_context2 = me.parent.itemSet._onDrag).call(_context2, me.parent.itemSet));
- this.hammerDragCenter.on('panend', bind$2(_context3 = me.parent.itemSet._onDragEnd).call(_context3, me.parent.itemSet));
+ this.hammerDragCenter.on('panmove', _bindInstanceProperty$1(_context2 = me.parent.itemSet._onDrag).call(_context2, me.parent.itemSet));
+ this.hammerDragCenter.on('panend', _bindInstanceProperty$1(_context3 = me.parent.itemSet._onDragEnd).call(_context3, me.parent.itemSet)); // delay addition on item click for trackpads...
+
+ this.hammerDragCenter.get('press').set({
+ time: 10000
+ });
if (this.dom.box) {
if (this.dom.dragLeft) {
@@ -27647,13 +35750,13 @@
deleteButton.title = optionsLocale.deleteSelected; // TODO: be able to destroy the delete button
- this.hammerDeleteButton = new Hammer$1(deleteButton).on('tap', function (event) {
+ this.hammerDeleteButton = new Hammer(deleteButton).on('tap', function (event) {
event.stopPropagation();
me.parent.removeFromDataSet(me);
});
anchor.appendChild(deleteButton);
this.dom.deleteButton = deleteButton;
- } else if (!this.selected && this.dom.deleteButton) {
+ } else if ((!this.selected || !editable) && this.dom.deleteButton) {
// remove button
if (this.dom.deleteButton.parentNode) {
this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton);
@@ -27731,17 +35834,17 @@
if (this.options.tooltipOnItemUpdateTime && this.options.tooltipOnItemUpdateTime.template) {
var _context4;
- templateFunction = bind$2(_context4 = this.options.tooltipOnItemUpdateTime.template).call(_context4, this);
+ templateFunction = _bindInstanceProperty$1(_context4 = this.options.tooltipOnItemUpdateTime.template).call(_context4, this);
content = templateFunction(this.data);
} else {
- content = "start: ".concat(moment$1(this.data.start).format('MM/DD/YYYY hh:mm'));
+ content = "start: ".concat(moment$2(this.data.start).format('MM/DD/YYYY hh:mm'));
if (this.data.end) {
- content += "
end: ".concat(moment$1(this.data.end).format('MM/DD/YYYY hh:mm'));
+ content += "
end: ".concat(moment$2(this.data.end).format('MM/DD/YYYY hh:mm'));
}
}
- this.dom.onItemUpdateTimeTooltip.innerHTML = content;
+ this.dom.onItemUpdateTimeTooltip.innerHTML = availableUtils.xss(content);
}
}
/**
@@ -27779,8 +35882,8 @@
if (this.options.visibleFrameTemplate) {
var _context5;
- visibleFrameTemplateFunction = bind$2(_context5 = this.options.visibleFrameTemplate).call(_context5, this);
- itemVisibleFrameContent = visibleFrameTemplateFunction(itemData, itemVisibleFrameContentElement);
+ visibleFrameTemplateFunction = _bindInstanceProperty$1(_context5 = this.options.visibleFrameTemplate).call(_context5, this);
+ itemVisibleFrameContent = availableUtils.xss(visibleFrameTemplateFunction(itemData, itemVisibleFrameContentElement));
} else {
itemVisibleFrameContent = '';
}
@@ -27797,7 +35900,7 @@
itemVisibleFrameContentElement.innerHTML = '';
itemVisibleFrameContentElement.appendChild(itemVisibleFrameContent);
} else if (itemVisibleFrameContent != undefined) {
- itemVisibleFrameContentElement.innerHTML = itemVisibleFrameContent;
+ itemVisibleFrameContentElement.innerHTML = availableUtils.xss(itemVisibleFrameContent);
} else {
if (!(this.data.type == 'background' && this.data.content === undefined)) {
throw new Error("Property \"content\" missing in item ".concat(this.id));
@@ -27812,7 +35915,7 @@
if (this.options.template) {
var _context6;
- templateFunction = bind$2(_context6 = this.options.template).call(_context6, this);
+ templateFunction = _bindInstanceProperty$1(_context6 = this.options.template).call(_context6, this);
content = templateFunction(itemData, element, this.data);
} else {
content = this.data.content;
@@ -27829,7 +35932,7 @@
element.innerHTML = '';
element.appendChild(content);
} else if (content != undefined) {
- element.innerHTML = content;
+ element.innerHTML = availableUtils.xss(content);
} else {
if (!(this.data.type == 'background' && this.data.content === undefined)) {
throw new Error("Property \"content\" missing in item ".concat(this.id));
@@ -27852,20 +35955,19 @@
if (this.options.dataAttributes && this.options.dataAttributes.length > 0) {
var attributes = [];
- if (isArray$5(this.options.dataAttributes)) {
+ if (_Array$isArray(this.options.dataAttributes)) {
attributes = this.options.dataAttributes;
} else if (this.options.dataAttributes == 'all') {
- attributes = keys$3(this.data);
+ attributes = _Object$keys(this.data);
} else {
return;
}
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ var _iterator = _createForOfIteratorHelper$4(attributes),
+ _step;
try {
- for (var _iterator = getIterator$1(attributes), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
var name = _step.value;
var value = this.data[name];
@@ -27876,18 +35978,9 @@
}
}
} catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
+ _iterator.e(err);
} finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
- }
+ _iterator.f();
}
}
}
@@ -27902,13 +35995,13 @@
value: function _updateStyle(element) {
// remove old styles
if (this.style) {
- util$1.removeCssText(element, this.style);
+ availableUtils.removeCssText(element, this.style);
this.style = null;
} // append new styles
if (this.data.style) {
- util$1.addCssText(element, this.data.style);
+ availableUtils.addCssText(element, this.data.style);
this.style = this.data.style;
}
}
@@ -27940,9 +36033,9 @@
updateGroup: this.options.editable,
remove: this.options.editable
};
- } else if (_typeof_1(this.options.editable) === 'object') {
+ } else if (_typeof$1(this.options.editable) === 'object') {
this.editable = {};
- util$1.selectiveExtend(['updateTime', 'updateGroup', 'remove'], this.editable, this.options.editable);
+ availableUtils.selectiveExtend(['updateTime', 'updateGroup', 'remove'], this.editable, this.options.editable);
}
} // Item data overrides, except if options.editable.overrideItems is set.
@@ -27955,11 +36048,11 @@
updateGroup: this.data.editable,
remove: this.data.editable
};
- } else if (_typeof_1(this.data.editable) === 'object') {
+ } else if (_typeof$1(this.data.editable) === 'object') {
// TODO: in timeline.js 5.0, we should change this to not reset options from the timeline configuration.
// Basically just remove the next line...
this.editable = {};
- util$1.selectiveExtend(['updateTime', 'updateGroup', 'remove'], this.editable, this.data.editable);
+ availableUtils.selectiveExtend(['updateTime', 'updateGroup', 'remove'], this.editable, this.data.editable);
}
}
}
@@ -27995,7 +36088,7 @@
if (this.options.tooltip && this.options.tooltip.template) {
var _context7;
- var templateFunction = bind$2(_context7 = this.options.tooltip.template).call(_context7, this);
+ var templateFunction = _bindInstanceProperty$1(_context7 = this.options.tooltip.template).call(_context7, this);
return templateFunction(this._getItemData(), this.data);
}
@@ -28009,13 +36102,18 @@
Item.prototype.stack = true;
+ function _createSuper$7(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$7(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
+
+ function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/**
* @constructor BoxItem
* @extends Item
*/
var BoxItem = /*#__PURE__*/function (_Item) {
- inherits(BoxItem, _Item);
+ _inherits(BoxItem, _Item);
+
+ var _super = _createSuper$7(BoxItem);
/**
* @param {Object} data Object containing parameters start
@@ -28028,9 +36126,9 @@
function BoxItem(data, conversion, options) {
var _this;
- classCallCheck(this, BoxItem);
+ _classCallCheck(this, BoxItem);
- _this = possibleConstructorReturn(this, getPrototypeOf$5(BoxItem).call(this, data, conversion, options));
+ _this = _super.call(this, data, conversion, options);
_this.props = {
dot: {
width: 0,
@@ -28057,7 +36155,7 @@
*/
- createClass(BoxItem, [{
+ _createClass(BoxItem, [{
key: "isVisible",
value: function isVisible(range) {
if (this.cluster) {
@@ -28255,9 +36353,9 @@
var sizes;
var queue = [// create item DOM
- bind$2(_context = this._createDomElement).call(_context, this), // append DOM to parent DOM
- bind$2(_context2 = this._appendDomElement).call(_context2, this), // update dirty DOM
- bind$2(_context3 = this._updateDirtyDomComponents).call(_context3, this), function () {
+ _bindInstanceProperty$1(_context = this._createDomElement).call(_context, this), // append DOM to parent DOM
+ _bindInstanceProperty$1(_context2 = this._appendDomElement).call(_context2, this), // update dirty DOM
+ _bindInstanceProperty$1(_context3 = this._updateDirtyDomComponents).call(_context3, this), function () {
if (_this2.dirty) {
sizes = _this2._getDomComponentsSizes();
}
@@ -28265,17 +36363,17 @@
if (_this2.dirty) {
var _context4;
- bind$2(_context4 = _this2._updateDomComponentsSizes).call(_context4, _this2)(sizes);
+ _bindInstanceProperty$1(_context4 = _this2._updateDomComponentsSizes).call(_context4, _this2)(sizes);
}
}, // repaint DOM additionals
- bind$2(_context5 = this._repaintDomAdditionals).call(_context5, this)];
+ _bindInstanceProperty$1(_context5 = this._repaintDomAdditionals).call(_context5, this)];
if (returnQueue) {
return queue;
} else {
var result;
- forEach$2(queue).call(queue, function (fn) {
+ _forEachInstanceProperty(queue).call(queue, function (fn) {
result = fn();
});
@@ -28342,7 +36440,7 @@
return;
}
- element.style.transform = concat$2(_context6 = "translate(".concat(directionX, "px, ")).call(_context6, y, "px)");
+ element.style.transform = _concatInstanceProperty(_context6 = "translate(".concat(directionX, "px, ")).call(_context6, y, "px)");
};
repositionXY(this.dom.box, this.boxX, this.boxY, rtl);
@@ -28439,13 +36537,18 @@
return BoxItem;
}(Item);
+ function _createSuper$6(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$6(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
+
+ function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/**
* @constructor PointItem
* @extends Item
*/
var PointItem = /*#__PURE__*/function (_Item) {
- inherits(PointItem, _Item);
+ _inherits(PointItem, _Item);
+
+ var _super = _createSuper$6(PointItem);
/**
* @param {Object} data Object containing parameters start
@@ -28458,9 +36561,9 @@
function PointItem(data, conversion, options) {
var _this;
- classCallCheck(this, PointItem);
+ _classCallCheck(this, PointItem);
- _this = possibleConstructorReturn(this, getPrototypeOf$5(PointItem).call(this, data, conversion, options));
+ _this = _super.call(this, data, conversion, options);
_this.props = {
dot: {
top: 0,
@@ -28489,7 +36592,7 @@
*/
- createClass(PointItem, [{
+ _createClass(PointItem, [{
key: "isVisible",
value: function isVisible(range) {
if (this.cluster) {
@@ -28615,9 +36718,9 @@
this.props.content.height = sizes.content.height; // resize contents
if (this.options.rtl) {
- this.dom.content.style.marginRight = "".concat(2 * this.props.dot.width, "px");
+ this.dom.content.style.marginRight = "".concat(this.props.dot.width / 2, "px");
} else {
- this.dom.content.style.marginLeft = "".concat(2 * this.props.dot.width, "px");
+ this.dom.content.style.marginLeft = "".concat(this.props.dot.width / 2, "px");
} //this.dom.content.style.marginRight = ... + 'px'; // TODO: margin right
// recalculate size
@@ -28627,7 +36730,7 @@
this.dom.dot.style.top = "".concat((this.height - this.props.dot.height) / 2, "px");
var dotWidth = this.props.dot.width;
- var translateX = this.options.rtl ? dotWidth / 2 * -1 : dotWidth / 2;
+ var translateX = this.options.rtl ? dotWidth / 2 : dotWidth / 2 * -1;
this.dom.dot.style.transform = "translateX(".concat(translateX, "px");
this.dirty = false;
}
@@ -28662,9 +36765,9 @@
var sizes;
var queue = [// create item DOM
- bind$2(_context = this._createDomElement).call(_context, this), // append DOM to parent DOM
- bind$2(_context2 = this._appendDomElement).call(_context2, this), // update dirty DOM
- bind$2(_context3 = this._updateDirtyDomComponents).call(_context3, this), function () {
+ _bindInstanceProperty$1(_context = this._createDomElement).call(_context, this), // append DOM to parent DOM
+ _bindInstanceProperty$1(_context2 = this._appendDomElement).call(_context2, this), // update dirty DOM
+ _bindInstanceProperty$1(_context3 = this._updateDirtyDomComponents).call(_context3, this), function () {
if (_this2.dirty) {
sizes = _this2._getDomComponentsSizes();
}
@@ -28672,17 +36775,17 @@
if (_this2.dirty) {
var _context4;
- bind$2(_context4 = _this2._updateDomComponentsSizes).call(_context4, _this2)(sizes);
+ _bindInstanceProperty$1(_context4 = _this2._updateDomComponentsSizes).call(_context4, _this2)(sizes);
}
}, // repaint DOM additionals
- bind$2(_context5 = this._repaintDomAdditionals).call(_context5, this)];
+ _bindInstanceProperty$1(_context5 = this._repaintDomAdditionals).call(_context5, this)];
if (returnQueue) {
return queue;
} else {
var result;
- forEach$2(queue).call(queue, function (fn) {
+ _forEachInstanceProperty(queue).call(queue, function (fn) {
result = fn();
});
@@ -28717,7 +36820,7 @@
return;
}
- element.style.transform = concat$2(_context6 = "translate(".concat(directionX, "px, ")).call(_context6, y, "px)");
+ element.style.transform = _concatInstanceProperty(_context6 = "translate(".concat(directionX, "px, ")).call(_context6, y, "px)");
};
repositionXY(this.dom.point, this.pointX, this.pointY, rtl);
@@ -28813,13 +36916,18 @@
return PointItem;
}(Item);
+ function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
+
+ function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/**
* @constructor RangeItem
* @extends Item
*/
var RangeItem = /*#__PURE__*/function (_Item) {
- inherits(RangeItem, _Item);
+ _inherits(RangeItem, _Item);
+
+ var _super = _createSuper$5(RangeItem);
/**
* @param {Object} data Object containing parameters start, end
@@ -28832,9 +36940,9 @@
function RangeItem(data, conversion, options) {
var _this;
- classCallCheck(this, RangeItem);
+ _classCallCheck(this, RangeItem);
- _this = possibleConstructorReturn(this, getPrototypeOf$5(RangeItem).call(this, data, conversion, options));
+ _this = _super.call(this, data, conversion, options);
_this.props = {
content: {
width: 0
@@ -28863,7 +36971,7 @@
*/
- createClass(RangeItem, [{
+ _createClass(RangeItem, [{
key: "isVisible",
value: function isVisible(range) {
if (this.cluster) {
@@ -29026,29 +37134,29 @@
var sizes;
var queue = [// create item DOM
- bind$2(_context = this._createDomElement).call(_context, this), // append DOM to parent DOM
- bind$2(_context2 = this._appendDomElement).call(_context2, this), // update dirty DOM
- bind$2(_context3 = this._updateDirtyDomComponents).call(_context3, this), function () {
+ _bindInstanceProperty$1(_context = this._createDomElement).call(_context, this), // append DOM to parent DOM
+ _bindInstanceProperty$1(_context2 = this._appendDomElement).call(_context2, this), // update dirty DOM
+ _bindInstanceProperty$1(_context3 = this._updateDirtyDomComponents).call(_context3, this), function () {
if (_this2.dirty) {
var _context4;
- sizes = bind$2(_context4 = _this2._getDomComponentsSizes).call(_context4, _this2)();
+ sizes = _bindInstanceProperty$1(_context4 = _this2._getDomComponentsSizes).call(_context4, _this2)();
}
}, function () {
if (_this2.dirty) {
var _context5;
- bind$2(_context5 = _this2._updateDomComponentsSizes).call(_context5, _this2)(sizes);
+ _bindInstanceProperty$1(_context5 = _this2._updateDomComponentsSizes).call(_context5, _this2)(sizes);
}
}, // repaint DOM additionals
- bind$2(_context6 = this._repaintDomAdditionals).call(_context6, this)];
+ _bindInstanceProperty$1(_context6 = this._repaintDomAdditionals).call(_context6, this)];
if (returnQueue) {
return queue;
} else {
var result;
- forEach$2(queue).call(queue, function (fn) {
+ _forEachInstanceProperty(queue).call(queue, function (fn) {
result = fn();
});
@@ -29279,13 +37387,18 @@
RangeItem.prototype.baseClassName = 'vis-item vis-range';
+ function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
+
+ function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/**
* @constructor BackgroundItem
* @extends Item
*/
var BackgroundItem = /*#__PURE__*/function (_Item) {
- inherits(BackgroundItem, _Item);
+ _inherits(BackgroundItem, _Item);
+
+ var _super = _createSuper$4(BackgroundItem);
/**
* @constructor BackgroundItem
@@ -29300,9 +37413,9 @@
function BackgroundItem(data, conversion, options) {
var _this;
- classCallCheck(this, BackgroundItem);
+ _classCallCheck(this, BackgroundItem);
- _this = possibleConstructorReturn(this, getPrototypeOf$5(BackgroundItem).call(this, data, conversion, options));
+ _this = _super.call(this, data, conversion, options);
_this.props = {
content: {
width: 0
@@ -29330,7 +37443,7 @@
*/
- createClass(BackgroundItem, [{
+ _createClass(BackgroundItem, [{
key: "isVisible",
value: function isVisible(range) {
// determine visibility
@@ -29469,28 +37582,28 @@
var sizes;
var queue = [// create item DOM
- bind$2(_context = this._createDomElement).call(_context, this), // append DOM to parent DOM
- bind$2(_context2 = this._appendDomElement).call(_context2, this), bind$2(_context3 = this._updateDirtyDomComponents).call(_context3, this), function () {
+ _bindInstanceProperty$1(_context = this._createDomElement).call(_context, this), // append DOM to parent DOM
+ _bindInstanceProperty$1(_context2 = this._appendDomElement).call(_context2, this), _bindInstanceProperty$1(_context3 = this._updateDirtyDomComponents).call(_context3, this), function () {
if (_this2.dirty) {
var _context4;
- sizes = bind$2(_context4 = _this2._getDomComponentsSizes).call(_context4, _this2)();
+ sizes = _bindInstanceProperty$1(_context4 = _this2._getDomComponentsSizes).call(_context4, _this2)();
}
}, function () {
if (_this2.dirty) {
var _context5;
- bind$2(_context5 = _this2._updateDomComponentsSizes).call(_context5, _this2)(sizes);
+ _bindInstanceProperty$1(_context5 = _this2._updateDomComponentsSizes).call(_context5, _this2)(sizes);
}
}, // repaint DOM additionals
- bind$2(_context6 = this._repaintDomAdditionals).call(_context6, this)];
+ _bindInstanceProperty$1(_context6 = this._repaintDomAdditionals).call(_context6, this)];
if (returnQueue) {
return queue;
} else {
var result;
- forEach$2(queue).call(queue, function (fn) {
+ _forEachInstanceProperty(queue).call(queue, function (fn) {
result = fn();
});
@@ -29523,19 +37636,19 @@
this.dom.box.style.bottom = '';
} // and in the case of no subgroups:
else {
- // we want backgrounds with groups to only show in groups.
- if (this.parent instanceof BackgroundGroup) {
- // if the item is not in a group:
- height = Math.max(this.parent.height, this.parent.itemSet.body.domProps.center.height, this.parent.itemSet.body.domProps.centerContainer.height);
- this.dom.box.style.bottom = orientation == 'bottom' ? '0' : '';
- this.dom.box.style.top = orientation == 'top' ? '0' : '';
- } else {
- height = this.parent.height; // same alignment for items when orientation is top or bottom
+ // we want backgrounds with groups to only show in groups.
+ if (this.parent instanceof BackgroundGroup) {
+ // if the item is not in a group:
+ height = Math.max(this.parent.height, this.parent.itemSet.body.domProps.center.height, this.parent.itemSet.body.domProps.centerContainer.height);
+ this.dom.box.style.bottom = orientation == 'bottom' ? '0' : '';
+ this.dom.box.style.top = orientation == 'top' ? '0' : '';
+ } else {
+ height = this.parent.height; // same alignment for items when orientation is top or bottom
- this.dom.box.style.top = "".concat(this.parent.top, "px");
- this.dom.box.style.bottom = '';
- }
+ this.dom.box.style.top = "".concat(this.parent.top, "px");
+ this.dom.box.style.bottom = '';
}
+ }
this.dom.box.style.height = "".concat(height, "px");
}
@@ -29565,8 +37678,8 @@
BackgroundItem.prototype.repositionX = RangeItem.prototype.repositionX;
- var css_248z$a = "div.vis-tooltip {\n position: absolute;\n visibility: hidden;\n padding: 5px;\n white-space: nowrap;\n\n font-family: verdana;\n font-size:14px;\n color:#000000;\n background-color: #f5f4ed;\n\n -moz-border-radius: 3px;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n border: 1px solid #808074;\n\n box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);\n pointer-events: none;\n\n z-index: 5;\n}\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRvb2x0aXAuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0Usa0JBQWtCO0VBQ2xCLGtCQUFrQjtFQUNsQixZQUFZO0VBQ1osbUJBQW1COztFQUVuQixvQkFBb0I7RUFDcEIsY0FBYztFQUNkLGFBQWE7RUFDYix5QkFBeUI7O0VBRXpCLHVCQUF1QjtFQUN2QiwwQkFBMEI7RUFDMUIsa0JBQWtCO0VBQ2xCLHlCQUF5Qjs7RUFFekIsMkNBQTJDO0VBQzNDLG9CQUFvQjs7RUFFcEIsVUFBVTtBQUNaIiwiZmlsZSI6InRvb2x0aXAuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiZGl2LnZpcy10b29sdGlwIHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICB2aXNpYmlsaXR5OiBoaWRkZW47XG4gIHBhZGRpbmc6IDVweDtcbiAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcblxuICBmb250LWZhbWlseTogdmVyZGFuYTtcbiAgZm9udC1zaXplOjE0cHg7XG4gIGNvbG9yOiMwMDAwMDA7XG4gIGJhY2tncm91bmQtY29sb3I6ICNmNWY0ZWQ7XG5cbiAgLW1vei1ib3JkZXItcmFkaXVzOiAzcHg7XG4gIC13ZWJraXQtYm9yZGVyLXJhZGl1czogM3B4O1xuICBib3JkZXItcmFkaXVzOiAzcHg7XG4gIGJvcmRlcjogMXB4IHNvbGlkICM4MDgwNzQ7XG5cbiAgYm94LXNoYWRvdzogM3B4IDNweCAxMHB4IHJnYmEoMCwgMCwgMCwgMC4yKTtcbiAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG5cbiAgei1pbmRleDogNTtcbn1cbiJdfQ== */";
- styleInject(css_248z$a);
+ var css_248z$4 = "div.vis-tooltip {\n position: absolute;\n visibility: hidden;\n padding: 5px;\n white-space: nowrap;\n\n font-family: verdana;\n font-size:14px;\n color:#000000;\n background-color: #f5f4ed;\n\n -moz-border-radius: 3px;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n border: 1px solid #808074;\n\n box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);\n pointer-events: none;\n\n z-index: 5;\n}\n";
+ styleInject(css_248z$4);
/**
* Popup is a class to create a popup window with some text
@@ -29578,7 +37691,7 @@
* @param {string} overflowMethod How the popup should act to overflowing ('flip', 'cap' or 'none')
*/
function Popup(container, overflowMethod) {
- classCallCheck(this, Popup);
+ _classCallCheck(this, Popup);
this.container = container;
this.overflowMethod = overflowMethod || 'cap';
@@ -29597,11 +37710,11 @@
*/
- createClass(Popup, [{
+ _createClass(Popup, [{
key: "setPosition",
value: function setPosition(x, y) {
- this.x = _parseInt$2(x);
- this.y = _parseInt$2(y);
+ this.x = _parseInt(x);
+ this.y = _parseInt(y);
}
/**
* Set the content for the popup window. This can be HTML code or text.
@@ -29615,7 +37728,7 @@
this.frame.innerHTML = '';
this.frame.appendChild(content);
} else {
- this.frame.innerHTML = content; // string containing text or HTML
+ this.frame.innerHTML = availableUtils.xss(content); // string containing text or HTML
}
}
/**
@@ -29720,15 +37833,18 @@
return Popup;
}();
- var $every = arrayIteration.every;
- var STRICT_METHOD$5 = arrayMethodIsStrict('every');
- var USES_TO_LENGTH$a = arrayMethodUsesToLength('every'); // `Array.prototype.every` method
- // https://tc39.github.io/ecma262/#sec-array.prototype.every
+ var every$3 = {exports: {}};
- _export({
+ var $ = _export;
+ var $every = arrayIteration.every;
+ var arrayMethodIsStrict = arrayMethodIsStrict$6;
+ var STRICT_METHOD = arrayMethodIsStrict('every'); // `Array.prototype.every` method
+ // https://tc39.es/ecma262/#sec-array.prototype.every
+
+ $({
target: 'Array',
proto: true,
- forced: !STRICT_METHOD$5 || !USES_TO_LENGTH$a
+ forced: !STRICT_METHOD
}, {
every: function every(callbackfn
/* , thisArg */
@@ -29737,25 +37853,44 @@
}
});
- var every = entryVirtual('Array').every;
+ var entryVirtual = entryVirtual$o;
+ var every$2 = entryVirtual('Array').every;
- var ArrayPrototype$h = Array.prototype;
+ var isPrototypeOf = objectIsPrototypeOf;
+ var method = every$2;
+ var ArrayPrototype = Array.prototype;
- var every_1 = function (it) {
+ var every$1 = function (it) {
var own = it.every;
- return it === ArrayPrototype$h || it instanceof Array && own === ArrayPrototype$h.every ? every : own;
+ return it === ArrayPrototype || isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.every ? method : own;
};
- var every$1 = every_1;
+ var parent = every$1;
+ var every = parent;
- var every$2 = every$1;
+ (function (module) {
+ module.exports = every;
+ })(every$3);
+ var _everyInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(every$3.exports);
+
+ function _createForOfIteratorHelper$3(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray$3(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
+
+ function _unsupportedIterableToArray$3(o, minLen) { var _context14; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$3(o, minLen); var n = _sliceInstanceProperty(_context14 = Object.prototype.toString.call(o)).call(_context14, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from$1(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$3(o, minLen); }
+
+ function _arrayLikeToArray$3(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
+
+ function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
+
+ function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/**
* ClusterItem
*/
var ClusterItem = /*#__PURE__*/function (_Item) {
- inherits(ClusterItem, _Item);
+ _inherits(ClusterItem, _Item);
+
+ var _super = _createSuper$3(ClusterItem);
/**
* @constructor Item
@@ -29769,15 +37904,15 @@
function ClusterItem(data, conversion, options) {
var _this;
- classCallCheck(this, ClusterItem);
+ _classCallCheck(this, ClusterItem);
- var modifiedOptions = assign$2({}, {
+ var modifiedOptions = _Object$assign({}, {
fitOnDoubleClick: true
}, options, {
editable: false
});
- _this = possibleConstructorReturn(this, getPrototypeOf$5(ClusterItem).call(this, data, conversion, modifiedOptions));
+ _this = _super.call(this, data, conversion, modifiedOptions);
_this.props = {
content: {
width: 0,
@@ -29789,7 +37924,7 @@
throw new Error('Property "uiItems" missing in item ' + data.id);
}
- _this.id = v4$1();
+ _this.id = v4();
_this.group = data.group;
_this._setupRange();
@@ -29807,7 +37942,7 @@
*/
- createClass(ClusterItem, [{
+ _createClass(ClusterItem, [{
key: "hasItems",
value: function hasItems() {
return this.data.uiItems && this.data.uiItems.length && this.attached;
@@ -29838,7 +37973,7 @@
value: function isVisible(range) {
var rangeWidth = this.data.end ? this.data.end - this.data.start : 0;
var widthInMs = this.width * range.getMillisecondsPerPixel();
- var end = Math.max(rangeWidth, this.data.start.getTime() + widthInMs);
+ var end = Math.max(this.data.start.getTime() + rangeWidth, this.data.start.getTime() + widthInMs);
return this.data.start < range.end && end > range.start && this.hasItems();
}
/**
@@ -29869,27 +38004,27 @@
var sizes;
var queue = [// create item DOM
- bind$2(_context = this._createDomElement).call(_context, this), // append DOM to parent DOM
- bind$2(_context2 = this._appendDomElement).call(_context2, this), // update dirty DOM
- bind$2(_context3 = this._updateDirtyDomComponents).call(_context3, this), bind$2(_context4 = function _context4() {
+ _bindInstanceProperty$1(_context = this._createDomElement).call(_context, this), // append DOM to parent DOM
+ _bindInstanceProperty$1(_context2 = this._appendDomElement).call(_context2, this), // update dirty DOM
+ _bindInstanceProperty$1(_context3 = this._updateDirtyDomComponents).call(_context3, this), _bindInstanceProperty$1(_context4 = function _context4() {
if (this.dirty) {
sizes = this._getDomComponentsSizes();
}
- }).call(_context4, this), bind$2(_context5 = function _context5() {
+ }).call(_context4, this), _bindInstanceProperty$1(_context5 = function _context5() {
if (this.dirty) {
var _context6;
- bind$2(_context6 = this._updateDomComponentsSizes).call(_context6, this)(sizes);
+ _bindInstanceProperty$1(_context6 = this._updateDomComponentsSizes).call(_context6, this)(sizes);
}
}).call(_context5, this), // repaint DOM additionals
- bind$2(_context7 = this._repaintDomAdditionals).call(_context7, this)];
+ _bindInstanceProperty$1(_context7 = this._repaintDomAdditionals).call(_context7, this)];
if (returnQueue) {
return queue;
} else {
var result;
- forEach$2(queue).call(queue, function (fn) {
+ _forEachInstanceProperty(queue).call(queue, function (fn) {
result = fn();
});
@@ -30132,31 +38267,21 @@
value: function attach() {
var _context8;
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ var _iterator = _createForOfIteratorHelper$3(this.data.uiItems),
+ _step;
try {
- for (var _iterator = getIterator$1(this.data.uiItems), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
var item = _step.value;
item.cluster = this;
}
} catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
+ _iterator.e(err);
} finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
- }
+ _iterator.f();
}
- this.data.items = map$2(_context8 = this.data.uiItems).call(_context8, function (item) {
+ this.data.items = _mapInstanceProperty(_context8 = this.data.uiItems).call(_context8, function (item) {
return item.data;
});
this.attached = true;
@@ -30177,28 +38302,18 @@
return;
}
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
+ var _iterator2 = _createForOfIteratorHelper$3(this.data.uiItems),
+ _step2;
try {
- for (var _iterator2 = getIterator$1(this.data.uiItems), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var item = _step2.value;
delete item.cluster;
}
} catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
+ _iterator2.e(err);
} finally {
- try {
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
- _iterator2.return();
- }
- } finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
- }
- }
+ _iterator2.f();
}
this.attached = false;
@@ -30229,29 +38344,29 @@
value: function _setupRange() {
var _context9, _context10, _context11;
- var stats = map$2(_context9 = this.data.uiItems).call(_context9, function (item) {
+ var stats = _mapInstanceProperty(_context9 = this.data.uiItems).call(_context9, function (item) {
return {
start: item.data.start.valueOf(),
end: item.data.end ? item.data.end.valueOf() : item.data.start.valueOf()
};
});
- this.data.min = Math.min.apply(Math, toConsumableArray(map$2(stats).call(stats, function (s) {
+ this.data.min = Math.min.apply(Math, _toConsumableArray(_mapInstanceProperty(stats).call(stats, function (s) {
return Math.min(s.start, s.end || s.start);
})));
- this.data.max = Math.max.apply(Math, toConsumableArray(map$2(stats).call(stats, function (s) {
+ this.data.max = Math.max.apply(Math, _toConsumableArray(_mapInstanceProperty(stats).call(stats, function (s) {
return Math.max(s.start, s.end || s.start);
})));
- var centers = map$2(_context10 = this.data.uiItems).call(_context10, function (item) {
+ var centers = _mapInstanceProperty(_context10 = this.data.uiItems).call(_context10, function (item) {
return item.center;
});
- var avg = reduce$2(centers).call(centers, function (sum, value) {
+ var avg = _reduceInstanceProperty(centers).call(centers, function (sum, value) {
return sum + value;
}, 0) / this.data.uiItems.length;
- if (some$2(_context11 = this.data.uiItems).call(_context11, function (item) {
+ if (_someInstanceProperty(_context11 = this.data.uiItems).call(_context11, function (item) {
return item.data.end;
})) {
// contains ranges
@@ -30275,7 +38390,7 @@
if (this.data.uiItems && this.data.uiItems.length) {
var _context12;
- return filter$2(_context12 = this.data.uiItems).call(_context12, function (item) {
+ return _filterInstanceProperty(_context12 = this.data.uiItems).call(_context12, function (item) {
return item.cluster === _this2;
});
}
@@ -30313,7 +38428,7 @@
if (this.options.fitOnDoubleClick) {
var _context13;
- this.dom.box.ondblclick = bind$2(_context13 = ClusterItem.prototype._onDoubleClick).call(_context13, this);
+ this.dom.box.ondblclick = _bindInstanceProperty$1(_context13 = ClusterItem.prototype._onDoubleClick).call(_context13, this);
} // attach this item as attribute
@@ -30529,12 +38644,17 @@
ClusterItem.prototype.baseClassName = 'vis-item vis-range vis-cluster';
- var UNGROUPED$1 = '__ungrouped__'; // reserved group id for ungrouped items
+ function _createForOfIteratorHelper$2(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray$2(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
+
+ function _unsupportedIterableToArray$2(o, minLen) { var _context4; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$2(o, minLen); var n = _sliceInstanceProperty(_context4 = Object.prototype.toString.call(o)).call(_context4, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from$1(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen); }
+
+ function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
+ var UNGROUPED$2 = '__ungrouped__'; // reserved group id for ungrouped items
var BACKGROUND$1 = '__background__'; // reserved group id for background items without group
- var ReservedGroupIds$1 = {
- UNGROUPED: UNGROUPED$1,
+ var ReservedGroupIds = {
+ UNGROUPED: UNGROUPED$2,
BACKGROUND: BACKGROUND$1
};
/**
@@ -30547,7 +38667,7 @@
* @constructor ClusterGenerator
*/
function ClusterGenerator(itemSet) {
- classCallCheck(this, ClusterGenerator);
+ _classCallCheck(this, ClusterGenerator);
this.itemSet = itemSet;
this.groups = {};
@@ -30563,7 +38683,7 @@
*/
- createClass(ClusterGenerator, [{
+ _createClass(ClusterGenerator, [{
key: "createClusterItem",
value: function createClusterItem(itemData, conversion, options) {
var newItem = new ClusterItem(itemData, conversion, options);
@@ -30709,7 +38829,7 @@
var m = i;
while (clusterItems.length < num && m < items.length) {
- if (clusterCriteria(items[m].data, items[m].data)) {
+ if (clusterCriteria(items[i].data, items[m].data)) {
clusterItems.push(items[m]);
}
@@ -30717,7 +38837,7 @@
}
var groupId = this.itemSet.getGroupId(item.data);
- var group = this.itemSet.groups[groupId] || this.itemSet.groups[ReservedGroupIds$1.UNGROUPED];
+ var group = this.itemSet.groups[groupId] || this.itemSet.groups[ReservedGroupIds.UNGROUPED];
var cluster = this._getClusterForItems(clusterItems, group, oldClusters, options);
@@ -30748,7 +38868,7 @@
var groups = {};
this.groups = groups; // split the items per group
- for (var _i = 0, _Object$values = values$2(this.items); _i < _Object$values.length; _i++) {
+ for (var _i = 0, _Object$values = _Object$values2(this.items); _i < _Object$values.length; _i++) {
var item = _Object$values[_i];
// put the item in the correct group
var groupName = item.parent ? item.parent.groupId : '';
@@ -30777,7 +38897,7 @@
if (groups.hasOwnProperty(currentGroupName)) {
var _context;
- sort$2(_context = groups[currentGroupName]).call(_context, function (a, b) {
+ _sortInstanceProperty(_context = groups[currentGroupName]).call(_context, function (a, b) {
return a.center - b.center;
});
}
@@ -30800,12 +38920,12 @@
value: function _getClusterForItems(clusterItems, group, oldClusters, options) {
var _context2;
- var oldClustersLookup = map$2(_context2 = oldClusters || []).call(_context2, function (cluster) {
+ var oldClustersLookup = _mapInstanceProperty(_context2 = oldClusters || []).call(_context2, function (cluster) {
var _context3;
return {
cluster: cluster,
- itemsIds: new set$3(map$2(_context3 = cluster.data.uiItems).call(_context3, function (item) {
+ itemsIds: new _Set(_mapInstanceProperty(_context3 = cluster.data.uiItems).call(_context3, function (item) {
return item.id;
}))
};
@@ -30814,15 +38934,14 @@
var cluster;
if (oldClustersLookup.length) {
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ var _iterator = _createForOfIteratorHelper$2(oldClustersLookup),
+ _step;
try {
var _loop = function _loop() {
var oldClusterData = _step.value;
- if (oldClusterData.itemsIds.size === clusterItems.length && every$2(clusterItems).call(clusterItems, function (clusterItem) {
+ if (oldClusterData.itemsIds.size === clusterItems.length && _everyInstanceProperty(clusterItems).call(clusterItems, function (clusterItem) {
return oldClusterData.itemsIds.has(clusterItem.id);
})) {
cluster = oldClusterData.cluster;
@@ -30830,24 +38949,15 @@
}
};
- for (var _iterator = getIterator$1(oldClustersLookup), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
var _ret = _loop();
if (_ret === "break") break;
}
} catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
+ _iterator.e(err);
} finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
- }
+ _iterator.f();
}
}
@@ -30876,7 +38986,7 @@
var title = titleTemplate.replace(/{count}/, clusterItems.length);
var clusterContent = '' + clusterItems.length + '
';
- var clusterOptions = assign$2({}, options, this.itemSet.options);
+ var clusterOptions = _Object$assign({}, options, this.itemSet.options);
var data = {
'content': clusterContent,
@@ -30913,15 +39023,24 @@
return ClusterGenerator;
}();
- var css_248z$b = "\n.vis-itemset {\n position: relative;\n padding: 0;\n margin: 0;\n\n box-sizing: border-box;\n}\n\n.vis-itemset .vis-background,\n.vis-itemset .vis-foreground {\n position: absolute;\n width: 100%;\n height: 100%;\n overflow: visible;\n}\n\n.vis-axis {\n position: absolute;\n width: 100%;\n height: 0;\n left: 0;\n z-index: 1;\n}\n\n.vis-foreground .vis-group {\n position: relative;\n box-sizing: border-box;\n border-bottom: 1px solid #bfbfbf;\n}\n\n.vis-foreground .vis-group:last-child {\n border-bottom: none;\n}\n\n.vis-nesting-group {\n cursor: pointer;\n}\n\n.vis-label.vis-nested-group.vis-group-level-unknown-but-gte1 {\n background: #f5f5f5;\n}\n.vis-label.vis-nested-group.vis-group-level-0 {\n background-color: #ffffff;\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-0 .vis-inner {\n padding-left: 0;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-0 .vis-inner {\n padding-right: 0;\n}\n.vis-label.vis-nested-group.vis-group-level-1 {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-1 .vis-inner {\n padding-left: 15px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-1 .vis-inner {\n padding-right: 15px;\n}\n.vis-label.vis-nested-group.vis-group-level-2 {\n background-color: rgba(0, 0, 0, 0.1);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-2 .vis-inner {\n padding-left: 30px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-2 .vis-inner {\n padding-right: 30px;\n}\n.vis-label.vis-nested-group.vis-group-level-3 {\n background-color: rgba(0, 0, 0, 0.15);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-3 .vis-inner {\n padding-left: 45px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-3 .vis-inner {\n padding-right: 45px;\n}\n.vis-label.vis-nested-group.vis-group-level-4 {\n background-color: rgba(0, 0, 0, 0.2);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-4 .vis-inner {\n padding-left: 60px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-4 .vis-inner {\n padding-right: 60px;\n}\n.vis-label.vis-nested-group.vis-group-level-5 {\n background-color: rgba(0, 0, 0, 0.25);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-5 .vis-inner {\n padding-left: 75px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-5 .vis-inner {\n padding-right: 75px;\n}\n.vis-label.vis-nested-group.vis-group-level-6 {\n background-color: rgba(0, 0, 0, 0.3);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-6 .vis-inner {\n padding-left: 90px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-6 .vis-inner {\n padding-right: 90px;\n}\n.vis-label.vis-nested-group.vis-group-level-7 {\n background-color: rgba(0, 0, 0, 0.35);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-7 .vis-inner {\n padding-left: 105px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-7 .vis-inner {\n padding-right: 105px;\n}\n.vis-label.vis-nested-group.vis-group-level-8 {\n background-color: rgba(0, 0, 0, 0.4);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-8 .vis-inner {\n padding-left: 120px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-8 .vis-inner {\n padding-right: 120px;\n}\n.vis-label.vis-nested-group.vis-group-level-9 {\n background-color: rgba(0, 0, 0, 0.45);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-9 .vis-inner {\n padding-left: 135px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-9 .vis-inner {\n padding-right: 135px;\n}\n/* default takes over beginning with level-10 (thats why we add .vis-nested-group\n to the selectors above, to have higher specifity than these rules for the defaults) */\n.vis-label.vis-nested-group {\n background-color: rgba(0, 0, 0, 0.5);\n}\n.vis-ltr .vis-label.vis-nested-group .vis-inner {\n padding-left: 150px;\n}\n.vis-rtl .vis-label.vis-nested-group .vis-inner {\n padding-right: 150px;\n}\n\n.vis-group-level-unknown-but-gte1 {\n border: 1px solid red;\n}\n\n/* expanded/collapsed indicators */\n.vis-label.vis-nesting-group:before,\n.vis-label.vis-nesting-group:before {\n display: inline-block;\n width: 15px;\n}\n.vis-label.vis-nesting-group.expanded:before {\n content: \"\\25BC\";\n}\n.vis-label.vis-nesting-group.collapsed:before {\n content: \"\\25B6\";\n}\n.vis-rtl .vis-label.vis-nesting-group.collapsed:before {\n content: \"\\25C0\";\n}\n/* compensate missing expanded/collapsed indicator, but only at levels > 0 */\n.vis-ltr .vis-label:not(.vis-nesting-group):not(.vis-group-level-0) {\n padding-left: 15px;\n}\n.vis-rtl .vis-label:not(.vis-nesting-group):not(.vis-group-level-0) {\n padding-right: 15px;\n}\n\n.vis-overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 10;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIml0ZW1zZXQuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQTtFQUNFLGtCQUFrQjtFQUNsQixVQUFVO0VBQ1YsU0FBUzs7RUFFVCxzQkFBc0I7QUFDeEI7O0FBRUE7O0VBRUUsa0JBQWtCO0VBQ2xCLFdBQVc7RUFDWCxZQUFZO0VBQ1osaUJBQWlCO0FBQ25COztBQU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udmlzLXJ0bCAudmlzLWxhYmVsLnZpcy1uZXN0aW5nLWdyb3VwLmNvbGxhcHNlZDpiZWZvcmUge1xuICBjb250ZW50OiBcIlxcMjVDMFwiO1xufVxuLyogY29tcGVuc2F0ZSBtaXNzaW5nIGV4cGFuZGVkL2NvbGxhcHNlZCBpbmRpY2F0b3IsIGJ1dCBvbmx5IGF0IGxldmVscyA+IDAgKi9cbi52aXMtbHRyIC52aXMtbGFiZWw6bm90KC52aXMtbmVzdGluZy1ncm91cCk6bm90KC52aXMtZ3JvdXAtbGV2ZWwtMCkge1xuICBwYWRkaW5nLWxlZnQ6IDE1cHg7XG59XG4udmlzLXJ0bCAudmlzLWxhYmVsOm5vdCgudmlzLW5lc3RpbmctZ3JvdXApOm5vdCgudmlzLWdyb3VwLWxldmVsLTApIHtcbiAgcGFkZGluZy1yaWdodDogMTVweDtcbn1cblxuLnZpcy1vdmVybGF5IHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICB0b3A6IDA7XG4gIGxlZnQ6IDA7XG4gIHdpZHRoOiAxMDAlO1xuICBoZWlnaHQ6IDEwMCU7XG4gIHotaW5kZXg6IDEwO1xufSJdfQ== */";
- styleInject(css_248z$b);
+ var css_248z$3 = "\n.vis-itemset {\n position: relative;\n padding: 0;\n margin: 0;\n\n box-sizing: border-box;\n}\n\n.vis-itemset .vis-background,\n.vis-itemset .vis-foreground {\n position: absolute;\n width: 100%;\n height: 100%;\n overflow: visible;\n}\n\n.vis-axis {\n position: absolute;\n width: 100%;\n height: 0;\n left: 0;\n z-index: 1;\n}\n\n.vis-foreground .vis-group {\n position: relative;\n box-sizing: border-box;\n border-bottom: 1px solid #bfbfbf;\n}\n\n.vis-foreground .vis-group:last-child {\n border-bottom: none;\n}\n\n.vis-nesting-group {\n cursor: pointer;\n}\n\n.vis-label.vis-nested-group.vis-group-level-unknown-but-gte1 {\n background: #f5f5f5;\n}\n.vis-label.vis-nested-group.vis-group-level-0 {\n background-color: #ffffff;\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-0 .vis-inner {\n padding-left: 0;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-0 .vis-inner {\n padding-right: 0;\n}\n.vis-label.vis-nested-group.vis-group-level-1 {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-1 .vis-inner {\n padding-left: 15px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-1 .vis-inner {\n padding-right: 15px;\n}\n.vis-label.vis-nested-group.vis-group-level-2 {\n background-color: rgba(0, 0, 0, 0.1);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-2 .vis-inner {\n padding-left: 30px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-2 .vis-inner {\n padding-right: 30px;\n}\n.vis-label.vis-nested-group.vis-group-level-3 {\n background-color: rgba(0, 0, 0, 0.15);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-3 .vis-inner {\n padding-left: 45px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-3 .vis-inner {\n padding-right: 45px;\n}\n.vis-label.vis-nested-group.vis-group-level-4 {\n background-color: rgba(0, 0, 0, 0.2);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-4 .vis-inner {\n padding-left: 60px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-4 .vis-inner {\n padding-right: 60px;\n}\n.vis-label.vis-nested-group.vis-group-level-5 {\n background-color: rgba(0, 0, 0, 0.25);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-5 .vis-inner {\n padding-left: 75px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-5 .vis-inner {\n padding-right: 75px;\n}\n.vis-label.vis-nested-group.vis-group-level-6 {\n background-color: rgba(0, 0, 0, 0.3);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-6 .vis-inner {\n padding-left: 90px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-6 .vis-inner {\n padding-right: 90px;\n}\n.vis-label.vis-nested-group.vis-group-level-7 {\n background-color: rgba(0, 0, 0, 0.35);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-7 .vis-inner {\n padding-left: 105px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-7 .vis-inner {\n padding-right: 105px;\n}\n.vis-label.vis-nested-group.vis-group-level-8 {\n background-color: rgba(0, 0, 0, 0.4);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-8 .vis-inner {\n padding-left: 120px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-8 .vis-inner {\n padding-right: 120px;\n}\n.vis-label.vis-nested-group.vis-group-level-9 {\n background-color: rgba(0, 0, 0, 0.45);\n}\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-9 .vis-inner {\n padding-left: 135px;\n}\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-9 .vis-inner {\n padding-right: 135px;\n}\n/* default takes over beginning with level-10 (thats why we add .vis-nested-group\n to the selectors above, to have higher specifity than these rules for the defaults) */\n.vis-label.vis-nested-group {\n background-color: rgba(0, 0, 0, 0.5);\n}\n.vis-ltr .vis-label.vis-nested-group .vis-inner {\n padding-left: 150px;\n}\n.vis-rtl .vis-label.vis-nested-group .vis-inner {\n padding-right: 150px;\n}\n\n.vis-group-level-unknown-but-gte1 {\n border: 1px solid red;\n}\n\n/* expanded/collapsed indicators */\n.vis-label.vis-nesting-group:before,\n.vis-label.vis-nesting-group:before {\n display: inline-block;\n width: 15px;\n}\n.vis-label.vis-nesting-group.expanded:before {\n content: \"\\25BC\";\n}\n.vis-label.vis-nesting-group.collapsed:before {\n content: \"\\25B6\";\n}\n.vis-rtl .vis-label.vis-nesting-group.collapsed:before {\n content: \"\\25C0\";\n}\n/* compensate missing expanded/collapsed indicator, but only at levels > 0 */\n.vis-ltr .vis-label:not(.vis-nesting-group):not(.vis-group-level-0) {\n padding-left: 15px;\n}\n.vis-rtl .vis-label:not(.vis-nesting-group):not(.vis-group-level-0) {\n padding-right: 15px;\n}\n\n.vis-overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 10;\n}";
+ styleInject(css_248z$3);
- var css_248z$c = "\n.vis-labelset {\n position: relative;\n\n overflow: hidden;\n\n box-sizing: border-box;\n}\n\n.vis-labelset .vis-label {\n position: relative;\n left: 0;\n top: 0;\n width: 100%;\n color: #4d4d4d;\n\n box-sizing: border-box;\n}\n\n.vis-labelset .vis-label {\n border-bottom: 1px solid #bfbfbf;\n}\n\n.vis-labelset .vis-label.draggable {\n cursor: pointer;\n}\n\n.vis-group-is-dragging {\n background: rgba(0, 0, 0, .1);\n}\n\n.vis-labelset .vis-label:last-child {\n border-bottom: none;\n}\n\n.vis-labelset .vis-label .vis-inner {\n display: inline-block;\n padding: 5px;\n}\n\n.vis-labelset .vis-label .vis-inner.vis-hidden {\n padding: 0;\n}\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsc2V0LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0E7RUFDRSxrQkFBa0I7O0VBRWxCLGdCQUFnQjs7RUFFaEIsc0JBQXNCO0FBQ3hCOztBQUVBO0VBQ0Usa0JBQWtCO0VBQ2xCLE9BQU87RUFDUCxNQUFNO0VBQ04sV0FBVztFQUNYLGNBQWM7O0VBRWQsc0JBQXNCO0FBQ3hCOztBQUVBO0VBQ0UsZ0NBQWdDO0FBQ2xDOztBQUVBO0VBQ0UsZUFBZTtBQUNqQjs7QUFFQTtFQUNFLDZCQUE2QjtBQUMvQjs7QUFFQTtFQUNFLG1CQUFtQjtBQUNyQjs7QUFFQTtFQUNFLHFCQUFxQjtFQUNyQixZQUFZO0FBQ2Q7O0FBRUE7RUFDRSxVQUFVO0FBQ1oiLCJmaWxlIjoibGFiZWxzZXQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiXG4udmlzLWxhYmVsc2V0IHtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuXG4gIG92ZXJmbG93OiBoaWRkZW47XG5cbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbn1cblxuLnZpcy1sYWJlbHNldCAudmlzLWxhYmVsIHtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuICBsZWZ0OiAwO1xuICB0b3A6IDA7XG4gIHdpZHRoOiAxMDAlO1xuICBjb2xvcjogIzRkNGQ0ZDtcblxuICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xufVxuXG4udmlzLWxhYmVsc2V0IC52aXMtbGFiZWwge1xuICBib3JkZXItYm90dG9tOiAxcHggc29saWQgI2JmYmZiZjtcbn1cblxuLnZpcy1sYWJlbHNldCAudmlzLWxhYmVsLmRyYWdnYWJsZSB7XG4gIGN1cnNvcjogcG9pbnRlcjtcbn1cblxuLnZpcy1ncm91cC1pcy1kcmFnZ2luZyB7XG4gIGJhY2tncm91bmQ6IHJnYmEoMCwgMCwgMCwgLjEpO1xufVxuXG4udmlzLWxhYmVsc2V0IC52aXMtbGFiZWw6bGFzdC1jaGlsZCB7XG4gIGJvcmRlci1ib3R0b206IG5vbmU7XG59XG5cbi52aXMtbGFiZWxzZXQgLnZpcy1sYWJlbCAudmlzLWlubmVyIHtcbiAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICBwYWRkaW5nOiA1cHg7XG59XG5cbi52aXMtbGFiZWxzZXQgLnZpcy1sYWJlbCAudmlzLWlubmVyLnZpcy1oaWRkZW4ge1xuICBwYWRkaW5nOiAwO1xufVxuIl19 */";
- styleInject(css_248z$c);
+ var css_248z$2 = "\n.vis-labelset {\n position: relative;\n\n overflow: hidden;\n\n box-sizing: border-box;\n}\n\n.vis-labelset .vis-label {\n position: relative;\n left: 0;\n top: 0;\n width: 100%;\n color: #4d4d4d;\n\n box-sizing: border-box;\n}\n\n.vis-labelset .vis-label {\n border-bottom: 1px solid #bfbfbf;\n}\n\n.vis-labelset .vis-label.draggable {\n cursor: pointer;\n}\n\n.vis-group-is-dragging {\n background: rgba(0, 0, 0, .1);\n}\n\n.vis-labelset .vis-label:last-child {\n border-bottom: none;\n}\n\n.vis-labelset .vis-label .vis-inner {\n display: inline-block;\n padding: 5px;\n}\n\n.vis-labelset .vis-label .vis-inner.vis-hidden {\n padding: 0;\n}\n";
+ styleInject(css_248z$2);
- var UNGROUPED$2 = '__ungrouped__'; // reserved group id for ungrouped items
+ function _createForOfIteratorHelper$1(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
- var BACKGROUND$2 = '__background__'; // reserved group id for background items without group
+ function _unsupportedIterableToArray$1(o, minLen) { var _context34; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = _sliceInstanceProperty(_context34 = Object.prototype.toString.call(o)).call(_context34, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from$1(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
+
+ function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
+
+ function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
+
+ function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+ var UNGROUPED$1 = '__ungrouped__'; // reserved group id for ungrouped items
+
+ var BACKGROUND = '__background__'; // reserved group id for background items without group
/**
* An ItemSet holds a set of items and ranges which can be displayed in a
* range. The width is determined by the parent of the ItemSet, and the height
@@ -30929,7 +39048,9 @@
*/
var ItemSet = /*#__PURE__*/function (_Component) {
- inherits(ItemSet, _Component);
+ _inherits(ItemSet, _Component);
+
+ var _super = _createSuper$2(ItemSet);
/**
* @param {{dom: Object, domProps: Object, emitter: Emitter, range: Range}} body
@@ -30940,9 +39061,9 @@
function ItemSet(body, options) {
var _this;
- classCallCheck(this, ItemSet);
+ _classCallCheck(this, ItemSet);
- _this = possibleConstructorReturn(this, getPrototypeOf$5(ItemSet).call(this));
+ _this = _super.call(this);
_this.body = body;
_this.defaultOptions = {
type: null,
@@ -31026,7 +39147,7 @@
tooltipOnItemUpdateTime: false
}; // options is shared by this ItemSet and all its items
- _this.options = util$1.extend({}, _this.defaultOptions);
+ _this.options = availableUtils.extend({}, _this.defaultOptions);
_this.options.rtl = options.rtl;
_this.options.onTimeout = options.onTimeout;
_this.conversion = {
@@ -31037,7 +39158,7 @@
_this.props = {};
_this.hammer = null;
- var me = assertThisInitialized(_this);
+ var me = _assertThisInitialized(_this);
_this.itemsData = null; // DataSet
@@ -31097,7 +39218,7 @@
var groupsData = me.groupsData.getDataSet();
- forEach$2(_context = groupsData.get()).call(_context, function (groupData) {
+ _forEachInstanceProperty(_context = groupsData.get()).call(_context, function (groupData) {
if (groupData.nestedGroups) {
var _context2;
@@ -31107,7 +39228,7 @@
var updatedGroups = [];
- forEach$2(_context2 = groupData.nestedGroups).call(_context2, function (nestedGroupId) {
+ _forEachInstanceProperty(_context2 = groupData.nestedGroups).call(_context2, function (nestedGroupId) {
var updatedNestedGroup = groupsData.get(nestedGroupId);
if (!updatedNestedGroup) {
@@ -31120,7 +39241,7 @@
updatedNestedGroup.visible = false;
}
- updatedGroups = concat$2(updatedGroups).call(updatedGroups, updatedNestedGroup);
+ updatedGroups = _concatInstanceProperty(updatedGroups).call(updatedGroups, updatedNestedGroup);
});
groupsData.update(updatedGroups, senderId);
@@ -31165,7 +39286,7 @@
*/
- createClass(ItemSet, [{
+ _createClass(ItemSet, [{
key: "_create",
value: function _create() {
var _this2 = this,
@@ -31211,54 +39332,62 @@
this._updateUngrouped(); // create background Group
- var backgroundGroup = new BackgroundGroup(BACKGROUND$2, null, this);
+ var backgroundGroup = new BackgroundGroup(BACKGROUND, null, this);
backgroundGroup.show();
- this.groups[BACKGROUND$2] = backgroundGroup; // attach event listeners
+ this.groups[BACKGROUND] = backgroundGroup; // attach event listeners
// Note: we bind to the centerContainer for the case where the height
// of the center container is larger than of the ItemSet, so we
// can click in the empty area to create a new item or deselect an item.
- this.hammer = new Hammer$1(this.body.dom.centerContainer); // drag items when selected
+ this.hammer = new Hammer(this.body.dom.centerContainer); // drag items when selected
this.hammer.on('hammer.input', function (event) {
if (event.isFirst) {
_this2._onTouch(event);
}
});
- this.hammer.on('panstart', bind$2(_context3 = this._onDragStart).call(_context3, this));
- this.hammer.on('panmove', bind$2(_context4 = this._onDrag).call(_context4, this));
- this.hammer.on('panend', bind$2(_context5 = this._onDragEnd).call(_context5, this));
+ this.hammer.on('panstart', _bindInstanceProperty$1(_context3 = this._onDragStart).call(_context3, this));
+ this.hammer.on('panmove', _bindInstanceProperty$1(_context4 = this._onDrag).call(_context4, this));
+ this.hammer.on('panend', _bindInstanceProperty$1(_context5 = this._onDragEnd).call(_context5, this));
this.hammer.get('pan').set({
threshold: 5,
- direction: Hammer$1.ALL
+ direction: Hammer.ALL
+ }); // delay addition on item click for trackpads...
+
+ this.hammer.get('press').set({
+ time: 10000
}); // single select (or unselect) when tapping an item
- this.hammer.on('tap', bind$2(_context6 = this._onSelectItem).call(_context6, this)); // multi select when holding mouse/touch, or on ctrl+click
+ this.hammer.on('tap', _bindInstanceProperty$1(_context6 = this._onSelectItem).call(_context6, this)); // multi select when holding mouse/touch, or on ctrl+click
- this.hammer.on('press', bind$2(_context7 = this._onMultiSelectItem).call(_context7, this)); // add item on doubletap
+ this.hammer.on('press', _bindInstanceProperty$1(_context7 = this._onMultiSelectItem).call(_context7, this)); // delay addition on item click for trackpads...
- this.hammer.on('doubletap', bind$2(_context8 = this._onAddItem).call(_context8, this));
+ this.hammer.get('press').set({
+ time: 10000
+ }); // add item on doubletap
+
+ this.hammer.on('doubletap', _bindInstanceProperty$1(_context8 = this._onAddItem).call(_context8, this));
if (this.options.rtl) {
- this.groupHammer = new Hammer$1(this.body.dom.rightContainer);
+ this.groupHammer = new Hammer(this.body.dom.rightContainer);
} else {
- this.groupHammer = new Hammer$1(this.body.dom.leftContainer);
+ this.groupHammer = new Hammer(this.body.dom.leftContainer);
}
- this.groupHammer.on('tap', bind$2(_context9 = this._onGroupClick).call(_context9, this));
- this.groupHammer.on('panstart', bind$2(_context10 = this._onGroupDragStart).call(_context10, this));
- this.groupHammer.on('panmove', bind$2(_context11 = this._onGroupDrag).call(_context11, this));
- this.groupHammer.on('panend', bind$2(_context12 = this._onGroupDragEnd).call(_context12, this));
+ this.groupHammer.on('tap', _bindInstanceProperty$1(_context9 = this._onGroupClick).call(_context9, this));
+ this.groupHammer.on('panstart', _bindInstanceProperty$1(_context10 = this._onGroupDragStart).call(_context10, this));
+ this.groupHammer.on('panmove', _bindInstanceProperty$1(_context11 = this._onGroupDrag).call(_context11, this));
+ this.groupHammer.on('panend', _bindInstanceProperty$1(_context12 = this._onGroupDragEnd).call(_context12, this));
this.groupHammer.get('pan').set({
threshold: 5,
- direction: Hammer$1.DIRECTION_VERTICAL
+ direction: Hammer.DIRECTION_VERTICAL
});
- this.body.dom.centerContainer.addEventListener('mouseover', bind$2(_context13 = this._onMouseOver).call(_context13, this));
- this.body.dom.centerContainer.addEventListener('mouseout', bind$2(_context14 = this._onMouseOut).call(_context14, this));
- this.body.dom.centerContainer.addEventListener('mousemove', bind$2(_context15 = this._onMouseMove).call(_context15, this)); // right-click on timeline
+ this.body.dom.centerContainer.addEventListener('mouseover', _bindInstanceProperty$1(_context13 = this._onMouseOver).call(_context13, this));
+ this.body.dom.centerContainer.addEventListener('mouseout', _bindInstanceProperty$1(_context14 = this._onMouseOut).call(_context14, this));
+ this.body.dom.centerContainer.addEventListener('mousemove', _bindInstanceProperty$1(_context15 = this._onMouseMove).call(_context15, this)); // right-click on timeline
- this.body.dom.centerContainer.addEventListener('contextmenu', bind$2(_context16 = this._onDragEnd).call(_context16, this));
- this.body.dom.centerContainer.addEventListener('mousewheel', bind$2(_context17 = this._onMouseWheel).call(_context17, this)); // attach to the DOM
+ this.body.dom.centerContainer.addEventListener('contextmenu', _bindInstanceProperty$1(_context16 = this._onDragEnd).call(_context16, this));
+ this.body.dom.centerContainer.addEventListener('mousewheel', _bindInstanceProperty$1(_context17 = this._onMouseWheel).call(_context17, this)); // attach to the DOM
this.show();
}
@@ -31337,14 +39466,14 @@
// copy all options that we know
var fields = ['type', 'rtl', 'align', 'order', 'stack', 'stackSubgroups', 'selectable', 'multiselect', 'sequentialSelection', 'multiselectPerGroup', 'longSelectPressTime', 'groupOrder', 'dataAttributes', 'template', 'groupTemplate', 'visibleFrameTemplate', 'hide', 'snap', 'groupOrderSwap', 'showTooltips', 'tooltip', 'tooltipOnItemUpdateTime', 'groupHeightMode', 'onTimeout'];
- util$1.selectiveExtend(fields, this.options, options);
+ availableUtils.selectiveExtend(fields, this.options, options);
if ('itemsAlwaysDraggable' in options) {
if (typeof options.itemsAlwaysDraggable === 'boolean') {
this.options.itemsAlwaysDraggable.item = options.itemsAlwaysDraggable;
this.options.itemsAlwaysDraggable.range = false;
- } else if (_typeof_1(options.itemsAlwaysDraggable) === 'object') {
- util$1.selectiveExtend(['item', 'range'], this.options.itemsAlwaysDraggable, options.itemsAlwaysDraggable); // only allow range always draggable when item is always draggable as well
+ } else if (_typeof$1(options.itemsAlwaysDraggable) === 'object') {
+ availableUtils.selectiveExtend(['item', 'range'], this.options.itemsAlwaysDraggable, options.itemsAlwaysDraggable); // only allow range always draggable when item is always draggable as well
if (!this.options.itemsAlwaysDraggable.item) {
this.options.itemsAlwaysDraggable.range = false;
@@ -31361,7 +39490,7 @@
if ('orientation' in options) {
if (typeof options.orientation === 'string') {
this.options.orientation.item = options.orientation === 'top' ? 'top' : 'bottom';
- } else if (_typeof_1(options.orientation) === 'object' && 'item' in options.orientation) {
+ } else if (_typeof$1(options.orientation) === 'object' && 'item' in options.orientation) {
this.options.orientation.item = options.orientation.item;
}
}
@@ -31371,21 +39500,21 @@
this.options.margin.axis = options.margin;
this.options.margin.item.horizontal = options.margin;
this.options.margin.item.vertical = options.margin;
- } else if (_typeof_1(options.margin) === 'object') {
- util$1.selectiveExtend(['axis'], this.options.margin, options.margin);
+ } else if (_typeof$1(options.margin) === 'object') {
+ availableUtils.selectiveExtend(['axis'], this.options.margin, options.margin);
if ('item' in options.margin) {
if (typeof options.margin.item === 'number') {
this.options.margin.item.horizontal = options.margin.item;
this.options.margin.item.vertical = options.margin.item;
- } else if (_typeof_1(options.margin.item) === 'object') {
- util$1.selectiveExtend(['horizontal', 'vertical'], this.options.margin.item, options.margin.item);
+ } else if (_typeof$1(options.margin.item) === 'object') {
+ availableUtils.selectiveExtend(['horizontal', 'vertical'], this.options.margin.item, options.margin.item);
}
}
}
}
- forEach$2(_context18 = ['locale', 'locales']).call(_context18, function (key) {
+ _forEachInstanceProperty(_context18 = ['locale', 'locales']).call(_context18, function (key) {
if (key in options) {
_this3.options[key] = options[key];
}
@@ -31398,8 +39527,8 @@
this.options.editable.add = options.editable;
this.options.editable.remove = options.editable;
this.options.editable.overrideItems = false;
- } else if (_typeof_1(options.editable) === 'object') {
- util$1.selectiveExtend(['updateTime', 'updateGroup', 'add', 'remove', 'overrideItems'], this.options.editable, options.editable);
+ } else if (_typeof$1(options.editable) === 'object') {
+ availableUtils.selectiveExtend(['updateTime', 'updateGroup', 'add', 'remove', 'overrideItems'], this.options.editable, options.editable);
}
}
@@ -31408,8 +39537,8 @@
this.options.groupEditable.order = options.groupEditable;
this.options.groupEditable.add = options.groupEditable;
this.options.groupEditable.remove = options.groupEditable;
- } else if (_typeof_1(options.groupEditable) === 'object') {
- util$1.selectiveExtend(['order', 'add', 'remove'], this.options.groupEditable, options.groupEditable);
+ } else if (_typeof$1(options.groupEditable) === 'object') {
+ availableUtils.selectiveExtend(['order', 'add', 'remove'], this.options.groupEditable, options.groupEditable);
}
} // callback functions
@@ -31421,17 +39550,17 @@
if (!(typeof fn === 'function')) {
var _context19;
- throw new Error(concat$2(_context19 = "option ".concat(name, " must be a function ")).call(_context19, name, "(item, callback)"));
+ throw new Error(_concatInstanceProperty(_context19 = "option ".concat(name, " must be a function ")).call(_context19, name, "(item, callback)"));
}
_this3.options[name] = fn;
}
};
- forEach$2(_context20 = ['onDropObjectOnItem', 'onAdd', 'onUpdate', 'onRemove', 'onMove', 'onMoving', 'onAddGroup', 'onMoveGroup', 'onRemoveGroup']).call(_context20, addCallback);
+ _forEachInstanceProperty(_context20 = ['onDropObjectOnItem', 'onAdd', 'onUpdate', 'onRemove', 'onMove', 'onMoving', 'onAddGroup', 'onMoveGroup', 'onRemoveGroup']).call(_context20, addCallback);
if (options.cluster) {
- assign$2(this.options, {
+ _Object$assign(this.options, {
cluster: options.cluster
});
@@ -31477,15 +39606,15 @@
if (options) {
if (options.refreshItems) {
- forEach$2(util$1).call(util$1, this.items, function (item) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.items, function (item) {
item.dirty = true;
if (item.displayed) item.redraw();
});
}
if (options.restackGroups) {
- forEach$2(util$1).call(util$1, this.groups, function (group, key) {
- if (key === BACKGROUND$2) return;
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.groups, function (group, key) {
+ if (key === BACKGROUND) return;
group.stackDirty = true;
});
}
@@ -31568,7 +39697,7 @@
if (popup) {
var delay = this.options.tooltip.delay || typeof this.options.tooltip.delay === 'number' ? this.options.tooltip.delay : 500;
- this.popupTimer = setTimeout$2(function () {
+ this.popupTimer = _setTimeout(function () {
popup.show();
}, delay);
}
@@ -31602,21 +39731,20 @@
ids = [];
}
- if (!isArray$5(ids)) {
+ if (!_Array$isArray(ids)) {
ids = [ids];
}
- var idsToDeselect = filter$2(_context21 = this.selection).call(_context21, function (id) {
- return indexOf$3(ids).call(ids, id) === -1;
+ var idsToDeselect = _filterInstanceProperty(_context21 = this.selection).call(_context21, function (id) {
+ return _indexOfInstanceProperty(ids).call(ids, id) === -1;
}); // unselect currently selected items
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ var _iterator = _createForOfIteratorHelper$1(idsToDeselect),
+ _step;
try {
- for (var _iterator = getIterator$1(idsToDeselect), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
var selectedId = _step.value;
var item = this.getItemById(selectedId);
@@ -31626,27 +39754,18 @@
} // select items
} catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
+ _iterator.e(err);
} finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
- }
+ _iterator.f();
}
- this.selection = toConsumableArray(ids);
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
+ this.selection = _toConsumableArray(ids);
+
+ var _iterator2 = _createForOfIteratorHelper$1(ids),
+ _step2;
try {
- for (var _iterator2 = getIterator$1(ids), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var id = _step2.value;
var _item2 = this.getItemById(id);
@@ -31656,18 +39775,9 @@
}
}
} catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
+ _iterator2.e(err);
} finally {
- try {
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
- _iterator2.return();
- }
- } finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
- }
- }
+ _iterator2.f();
}
}
/**
@@ -31680,7 +39790,7 @@
value: function getSelection() {
var _context22;
- return concat$2(_context22 = this.selection).call(_context22, []);
+ return _concatInstanceProperty(_context22 = this.selection).call(_context22, []);
}
/**
* Get the id's of the currently visible items.
@@ -31710,12 +39820,11 @@
var rawVisibleItems = group.isVisible ? group.visibleItems : []; // filter the "raw" set with visibleItems into a set which is really
// visible by pixels
- var _iteratorNormalCompletion3 = true;
- var _didIteratorError3 = false;
- var _iteratorError3 = undefined;
+ var _iterator3 = _createForOfIteratorHelper$1(rawVisibleItems),
+ _step3;
try {
- for (var _iterator3 = getIterator$1(rawVisibleItems), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
var item = _step3.value;
// TODO: also check whether visible vertically
@@ -31730,18 +39839,63 @@
}
}
} catch (err) {
- _didIteratorError3 = true;
- _iteratorError3 = err;
+ _iterator3.e(err);
} finally {
- try {
- if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
- _iterator3.return();
- }
- } finally {
- if (_didIteratorError3) {
- throw _iteratorError3;
+ _iterator3.f();
+ }
+ }
+ }
+
+ return ids;
+ }
+ /**
+ * Get the id's of the items at specific time, where a click takes place on the timeline.
+ * @returns {Array} The ids of all items in existence at the time of click event on the timeline.
+ */
+
+ }, {
+ key: "getItemsAtCurrentTime",
+ value: function getItemsAtCurrentTime(timeOfEvent) {
+ var right;
+ var left;
+
+ if (this.options.rtl) {
+ right = this.body.util.toScreen(timeOfEvent);
+ left = this.body.util.toScreen(timeOfEvent);
+ } else {
+ left = this.body.util.toScreen(timeOfEvent);
+ right = this.body.util.toScreen(timeOfEvent);
+ }
+
+ var ids = [];
+
+ for (var groupId in this.groups) {
+ if (this.groups.hasOwnProperty(groupId)) {
+ var group = this.groups[groupId];
+ var rawVisibleItems = group.isVisible ? group.visibleItems : []; // filter the "raw" set with visibleItems into a set which is really
+ // visible by pixels
+
+ var _iterator4 = _createForOfIteratorHelper$1(rawVisibleItems),
+ _step4;
+
+ try {
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
+ var item = _step4.value;
+
+ if (this.options.rtl) {
+ if (item.right < left && item.right + item.width > right) {
+ ids.push(item.id);
+ }
+ } else {
+ if (item.left < right && item.left + item.width > left) {
+ ids.push(item.id);
+ }
}
}
+ } catch (err) {
+ _iterator4.e(err);
+ } finally {
+ _iterator4.f();
}
}
}
@@ -31781,7 +39935,7 @@
value: function getItemById(id) {
var _context23;
- return this.items[id] || find$2(_context23 = this.clusters).call(_context23, function (cluster) {
+ return this.items[id] || _findInstanceProperty(_context23 = this.clusters).call(_context23, function (cluster) {
return cluster.id === id;
});
}
@@ -31799,7 +39953,7 @@
for (var i = 0, ii = selection.length; i < ii; i++) {
if (selection[i] == id) {
// non-strict comparison!
- splice$2(selection).call(selection, i, 1);
+ _spliceInstanceProperty(selection).call(selection, i, 1);
break;
}
@@ -31817,7 +39971,7 @@
var margin = this.options.margin;
var range = this.body.range;
- var asSize = util$1.option.asSize;
+ var asSize = availableUtils.option.asSize;
var options = this.options;
var orientation = options.orientation.item;
var resized = false;
@@ -31867,12 +40021,12 @@
var height = 0;
var minHeight = margin.axis + margin.item.vertical; // redraw the background group
- this.groups[BACKGROUND$2].redraw(range, nonFirstMargin, forceRestack);
+ this.groups[BACKGROUND].redraw(range, nonFirstMargin, forceRestack);
var redrawQueue = {};
var redrawQueueLength = 0; // collect redraw functions
- forEach$2(util$1).call(util$1, this.groups, function (group, key) {
- if (key === BACKGROUND$2) return;
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.groups, function (group, key) {
+ if (key === BACKGROUND) return;
var groupMargin = group == firstGroup ? firstMargin : nonFirstMargin;
var returnQueue = true;
redrawQueue[key] = group.redraw(range, groupMargin, forceRestack, returnQueue);
@@ -31886,7 +40040,7 @@
var redrawResults = {};
var _loop = function _loop(i) {
- forEach$2(util$1).call(util$1, redrawQueue, function (fns, key) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, redrawQueue, function (fns, key) {
redrawResults[key] = fns[i]();
});
};
@@ -31896,8 +40050,8 @@
} // redraw all regular groups
- forEach$2(util$1).call(util$1, _this4.groups, function (group, key) {
- if (key === BACKGROUND$2) return;
+ _forEachInstanceProperty(availableUtils).call(availableUtils, _this4.groups, function (group, key) {
+ if (key === BACKGROUND) return;
var groupResized = redrawResults[key];
resized = groupResized || resized;
height += group.height;
@@ -31941,7 +40095,7 @@
value: function _firstGroup() {
var firstGroupIndex = this.options.orientation.item == 'top' ? 0 : this.groupIds.length - 1;
var firstGroupId = this.groupIds[firstGroupIndex];
- var firstGroup = this.groups[firstGroupId] || this.groups[UNGROUPED$2];
+ var firstGroup = this.groups[firstGroupId] || this.groups[UNGROUPED$1];
return firstGroup || null;
}
/**
@@ -31953,7 +40107,7 @@
}, {
key: "_updateUngrouped",
value: function _updateUngrouped() {
- var ungrouped = this.groups[UNGROUPED$2];
+ var ungrouped = this.groups[UNGROUPED$1];
var item;
var itemId;
@@ -31961,7 +40115,7 @@
// remove the group holding all ungrouped items
if (ungrouped) {
ungrouped.dispose();
- delete this.groups[UNGROUPED$2];
+ delete this.groups[UNGROUPED$1];
for (itemId in this.items) {
if (this.items.hasOwnProperty(itemId)) {
@@ -31979,7 +40133,7 @@
var id = null;
var data = null;
ungrouped = new Group(id, data, this);
- this.groups[UNGROUPED$2] = ungrouped;
+ this.groups[UNGROUPED$1] = ungrouped;
for (itemId in this.items) {
if (this.items.hasOwnProperty(itemId)) {
@@ -32017,15 +40171,15 @@
if (!items) {
this.itemsData = null;
- } else if (items instanceof DataSet || items instanceof DataView) {
+ } else if (isDataViewLike(items)) {
this.itemsData = typeCoerceDataSet(items);
} else {
- throw new TypeError('Data must be an instance of DataSet or DataView');
+ throw new TypeError('Data must implement the interface of DataSet or DataView');
}
if (oldItemsData) {
// unsubscribe from old dataset
- forEach$2(util$1).call(util$1, this.itemListeners, function (callback, event) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.itemListeners, function (callback, event) {
oldItemsData.off(event, callback);
}); // stop maintaining a coerced version of the old data set
@@ -32041,7 +40195,7 @@
// subscribe to new dataset
var id = this.id;
- forEach$2(util$1).call(util$1, this.itemListeners, function (callback, event) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.itemListeners, function (callback, event) {
me.itemsData.on(event, callback, id);
}); // add all new items
@@ -32080,7 +40234,7 @@
var ids; // unsubscribe from current dataset
if (this.groupsData) {
- forEach$2(util$1).call(util$1, this.groupListeners, function (callback, event) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.groupListeners, function (callback, event) {
me.groupsData.off(event, callback);
}); // remove all drawn groups
@@ -32095,27 +40249,23 @@
if (!groups) {
this.groupsData = null;
- } else if (groups instanceof DataSet || groups instanceof DataView) {
+ } else if (isDataViewLike(groups)) {
this.groupsData = groups;
} else {
- throw new TypeError('Data must be an instance of DataSet or DataView');
+ throw new TypeError('Data must implement the interface of DataSet or DataView');
}
if (this.groupsData) {
var _context24;
// go over all groups nesting
- var groupsData = this.groupsData;
+ var groupsData = this.groupsData.getDataSet();
- if (this.groupsData instanceof DataView) {
- groupsData = this.groupsData.getDataSet();
- }
-
- forEach$2(_context24 = groupsData.get()).call(_context24, function (group) {
+ _forEachInstanceProperty(_context24 = groupsData.get()).call(_context24, function (group) {
if (group.nestedGroups) {
var _context25;
- forEach$2(_context25 = group.nestedGroups).call(_context25, function (nestedGroupId) {
+ _forEachInstanceProperty(_context25 = group.nestedGroups).call(_context25, function (nestedGroupId) {
var updatedNestedGroup = groupsData.get(nestedGroupId);
updatedNestedGroup.nestedInGroup = group.id;
@@ -32131,7 +40281,7 @@
var id = this.id;
- forEach$2(util$1).call(util$1, this.groupListeners, function (callback, event) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.groupListeners, function (callback, event) {
me.groupsData.on(event, callback, id);
}); // draw all ms
@@ -32220,9 +40370,9 @@
var type = this._getType(itemData);
if (type == 'background' && itemData.group == undefined) {
- return BACKGROUND$2;
+ return BACKGROUND;
} else {
- return this.groupsData ? itemData.group : UNGROUPED$2;
+ return this.groupsData ? itemData.group : UNGROUPED$1;
}
}
/**
@@ -32238,7 +40388,7 @@
var me = this;
- forEach$2(ids).call(ids, function (id) {
+ _forEachInstanceProperty(ids).call(ids, function (id) {
var itemData = me.itemsData.get(id);
var item = me.items[id];
var type = itemData ? me._getType(itemData) : null;
@@ -32304,7 +40454,7 @@
var count = 0;
var me = this;
- forEach$2(ids).call(ids, function (id) {
+ _forEachInstanceProperty(ids).call(ids, function (id) {
var item = me.items[id];
if (item) {
@@ -32333,7 +40483,7 @@
value: function _order() {
// reorder the items in all groups
// TODO: optimization: only reorder groups affected by the changed items
- forEach$2(util$1).call(util$1, this.groups, function (group) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.groups, function (group) {
group.order();
});
}
@@ -32359,19 +40509,19 @@
value: function _onAddGroups(ids) {
var me = this;
- forEach$2(ids).call(ids, function (id) {
+ _forEachInstanceProperty(ids).call(ids, function (id) {
var groupData = me.groupsData.get(id);
var group = me.groups[id];
if (!group) {
// check for reserved ids
- if (id == UNGROUPED$2 || id == BACKGROUND$2) {
+ if (id == UNGROUPED$1 || id == BACKGROUND) {
throw new Error("Illegal group id. ".concat(id, " is a reserved id."));
}
- var groupOptions = create$2(me.options);
+ var groupOptions = _Object$create$1(me.options);
- util$1.extend(groupOptions, {
+ availableUtils.extend(groupOptions, {
height: null
});
group = new Group(id, groupData, me);
@@ -32410,7 +40560,7 @@
value: function _onRemoveGroups(ids) {
var _this7 = this;
- forEach$2(ids).call(ids, function (id) {
+ _forEachInstanceProperty(ids).call(ids, function (id) {
var group = _this7.groups[id];
if (group) {
@@ -32447,18 +40597,18 @@
order: this.options.groupOrder
});
groupIds = this._orderNestedGroups(groupIds);
- var changed = !util$1.equalArray(groupIds, this.groupIds);
+ var changed = !availableUtils.equalArray(groupIds, this.groupIds);
if (changed) {
// hide all groups, removes them from the DOM
var groups = this.groups;
- forEach$2(groupIds).call(groupIds, function (groupId) {
+ _forEachInstanceProperty(groupIds).call(groupIds, function (groupId) {
groups[groupId].hide();
}); // show the groups again, attach them to the DOM in correct order
- forEach$2(groupIds).call(groupIds, function (groupId) {
+ _forEachInstanceProperty(groupIds).call(groupIds, function (groupId) {
groups[groupId].show();
});
@@ -32494,14 +40644,14 @@
function getOrderedNestedGroups(t, groupIds) {
var result = [];
- forEach$2(groupIds).call(groupIds, function (groupId) {
+ _forEachInstanceProperty(groupIds).call(groupIds, function (groupId) {
result.push(groupId);
var groupData = t.groupsData.get(groupId);
if (groupData.nestedGroups) {
var _context26;
- var nestedGroupIds = map$2(_context26 = t.groupsData.get({
+ var nestedGroupIds = _mapInstanceProperty(_context26 = t.groupsData.get({
filter: function filter(nestedGroup) {
return nestedGroup.nestedInGroup == groupId;
},
@@ -32510,14 +40660,14 @@
return nestedGroup.id;
});
- result = concat$2(result).call(result, getOrderedNestedGroups(t, nestedGroupIds));
+ result = _concatInstanceProperty(result).call(result, getOrderedNestedGroups(t, nestedGroupIds));
}
});
return result;
}
- var topGroupIds = filter$2(groupIds).call(groupIds, function (groupId) {
+ var topGroupIds = _filterInstanceProperty(groupIds).call(groupIds, function (groupId) {
return !_this8.groupsData.get(groupId).nestedInGroup;
});
@@ -32583,9 +40733,9 @@
delete this.items[item.id]; // remove from selection
- var index = indexOf$3(_context27 = this.selection).call(_context27, item.id);
+ var index = _indexOfInstanceProperty(_context27 = this.selection).call(_context27, item.id);
- if (index != -1) splice$2(_context28 = this.selection).call(_context28, index, 1); // remove from group
+ if (index != -1) _spliceInstanceProperty(_context28 = this.selection).call(_context28, index, 1); // remove from group
item.parent && item.parent.remove(item); // remove Tooltip from DOM
@@ -32711,7 +40861,7 @@
var baseGroupIndex = this._getGroupIndex(item.data.group);
var itemsToDrag = this.options.itemsAlwaysDraggable.item && !item.selected ? [item.id] : this.getSelection();
- this.touchParams.itemProps = map$2(itemsToDrag).call(itemsToDrag, function (id) {
+ this.touchParams.itemProps = _mapInstanceProperty(itemsToDrag).call(itemsToDrag, function (id) {
var item = me.items[id];
var groupIndex = me._getGroupIndex(item.data.group);
@@ -32755,7 +40905,7 @@
end: end,
content: 'new item'
};
- var id = v4$1();
+ var id = v4();
itemData[this.itemsData.idProp] = id;
var group = this.groupFromTarget(event);
@@ -32834,7 +40984,7 @@
} // move
- forEach$2(_context29 = this.touchParams.itemProps).call(_context29, function (props) {
+ _forEachInstanceProperty(_context29 = this.touchParams.itemProps).call(_context29, function (props) {
var current = me.body.util.toTime(event.center.x - xOffset);
var initial = me.body.util.toTime(props.initialX - xOffset);
var offset;
@@ -32863,14 +41013,14 @@
// drag left side of a range item
if (_this10.options.rtl) {
if (itemData.end != undefined) {
- initialEnd = util$1.convert(props.data.end, 'Date');
+ initialEnd = availableUtils.convert(props.data.end, 'Date');
end = new Date(initialEnd.valueOf() + offset); // TODO: pass a Moment instead of a Date to snap(). (Breaking change)
itemData.end = snap ? snap(end, scale, step) : end;
}
} else {
if (itemData.start != undefined) {
- initialStart = util$1.convert(props.data.start, 'Date');
+ initialStart = availableUtils.convert(props.data.start, 'Date');
start = new Date(initialStart.valueOf() + offset); // TODO: pass a Moment instead of a Date to snap(). (Breaking change)
itemData.start = snap ? snap(start, scale, step) : start;
@@ -32880,14 +41030,14 @@
// drag right side of a range item
if (_this10.options.rtl) {
if (itemData.start != undefined) {
- initialStart = util$1.convert(props.data.start, 'Date');
+ initialStart = availableUtils.convert(props.data.start, 'Date');
start = new Date(initialStart.valueOf() + offset); // TODO: pass a Moment instead of a Date to snap(). (Breaking change)
itemData.start = snap ? snap(start, scale, step) : start;
}
} else {
if (itemData.end != undefined) {
- initialEnd = util$1.convert(props.data.end, 'Date');
+ initialEnd = availableUtils.convert(props.data.end, 'Date');
end = new Date(initialEnd.valueOf() + offset); // TODO: pass a Moment instead of a Date to snap(). (Breaking change)
itemData.end = snap ? snap(end, scale, step) : end;
@@ -32896,11 +41046,11 @@
} else {
// drag both start and end
if (itemData.start != undefined) {
- initialStart = util$1.convert(props.data.start, 'Date').valueOf();
+ initialStart = availableUtils.convert(props.data.start, 'Date').valueOf();
start = new Date(initialStart + offset);
if (itemData.end != undefined) {
- initialEnd = util$1.convert(props.data.end, 'Date');
+ initialEnd = availableUtils.convert(props.data.end, 'Date');
var duration = initialEnd.valueOf() - initialStart.valueOf(); // TODO: pass a Moment instead of a Date to snap(). (Breaking change)
itemData.start = snap ? snap(start, scale, step) : start;
@@ -32976,7 +41126,7 @@
var itemProps = this.touchParams.itemProps;
this.touchParams.itemProps = null;
- forEach$2(itemProps).call(itemProps, function (props) {
+ _forEachInstanceProperty(itemProps).call(itemProps, function (props) {
var id = props.item.id;
var exists = me.itemsData.get(id) != null;
@@ -33027,7 +41177,7 @@
var group = this.groupFromTarget(event);
- setTimeout$2(function () {
+ _setTimeout(function () {
_this12.toggleGroupShowNested(group);
}, 1);
}
@@ -33065,16 +41215,16 @@
var node = groupsData.get(current[i]);
if (node.nestedGroups) {
- nextLevel = concat$2(nextLevel).call(nextLevel, node.nestedGroups);
+ nextLevel = _concatInstanceProperty(nextLevel).call(nextLevel, node.nestedGroups);
}
}
if (nextLevel.length > 0) {
- fullNestedGroups = concat$2(fullNestedGroups).call(fullNestedGroups, nextLevel);
+ fullNestedGroups = _concatInstanceProperty(fullNestedGroups).call(fullNestedGroups, nextLevel);
}
}
- var nestedGroups = map$2(_context30 = groupsData.get(fullNestedGroups)).call(_context30, function (nestedGroup) {
+ var nestedGroups = _mapInstanceProperty(_context30 = groupsData.get(fullNestedGroups)).call(_context30, function (nestedGroup) {
if (nestedGroup.visible == undefined) {
nestedGroup.visible = true;
}
@@ -33083,14 +41233,14 @@
return nestedGroup;
});
- groupsData.update(concat$2(nestedGroups).call(nestedGroups, nestingGroup));
+ groupsData.update(_concatInstanceProperty(nestedGroups).call(nestedGroups, nestingGroup));
if (nestingGroup.showNested) {
- util$1.removeClassName(group.dom.label, 'collapsed');
- util$1.addClassName(group.dom.label, 'expanded');
+ availableUtils.removeClassName(group.dom.label, 'collapsed');
+ availableUtils.addClassName(group.dom.label, 'expanded');
} else {
- util$1.removeClassName(group.dom.label, 'expanded');
- util$1.addClassName(group.dom.label, 'collapsed');
+ availableUtils.removeClassName(group.dom.label, 'expanded');
+ availableUtils.addClassName(group.dom.label, 'collapsed');
}
}
/**
@@ -33141,12 +41291,7 @@
value: function _onGroupDrag(event) {
if (this.options.groupEditable.order && this.groupTouchParams.group) {
event.stopPropagation();
- var groupsData = this.groupsData;
-
- if (this.groupsData instanceof DataView) {
- groupsData = this.groupsData.getDataSet();
- } // drag from one group to another
-
+ var groupsData = this.groupsData.getDataSet(); // drag from one group to another
var group = this.groupFromTarget(event); // try to avoid toggling when groups differ in height
@@ -33186,7 +41331,7 @@
order: this.options.groupOrder
}); // in case of changes since _onGroupDragStart
- if (!util$1.equalArray(newOrder, this.groupTouchParams.originalOrder)) {
+ if (!availableUtils.equalArray(newOrder, this.groupTouchParams.originalOrder)) {
var origOrder = this.groupTouchParams.originalOrder;
var draggedId = this.groupTouchParams.group.groupId;
var numGroups = Math.min(origOrder.length, newOrder.length);
@@ -33211,22 +41356,22 @@
newOffset = 1;
} // if dragged group was move downwards everything above should have an offset
else if (origOrder[curPos + orgOffset] == draggedId) {
- orgOffset = 1;
- } // found a group (apart from dragged group) that has the wrong position -> switch with the
- // group at the position where other one should be, fix index arrays and continue
- else {
- var slippedPosition = indexOf$3(newOrder).call(newOrder, origOrder[curPos + orgOffset]);
+ orgOffset = 1;
+ } // found a group (apart from dragged group) that has the wrong position -> switch with the
+ // group at the position where other one should be, fix index arrays and continue
+ else {
+ var slippedPosition = _indexOfInstanceProperty(newOrder).call(newOrder, origOrder[curPos + orgOffset]);
- var switchGroup = groupsData.get(newOrder[curPos + newOffset]);
- var shouldBeGroup = groupsData.get(origOrder[curPos + orgOffset]);
- this.options.groupOrderSwap(switchGroup, shouldBeGroup, groupsData);
- groupsData.update(switchGroup);
- groupsData.update(shouldBeGroup);
- var switchGroupId = newOrder[curPos + newOffset];
- newOrder[curPos + newOffset] = origOrder[curPos + orgOffset];
- newOrder[slippedPosition] = switchGroupId;
- curPos++;
- }
+ var switchGroup = groupsData.get(newOrder[curPos + newOffset]);
+ var shouldBeGroup = groupsData.get(origOrder[curPos + orgOffset]);
+ this.options.groupOrderSwap(switchGroup, shouldBeGroup, groupsData);
+ groupsData.update(switchGroup);
+ groupsData.update(shouldBeGroup);
+ var switchGroupId = newOrder[curPos + newOffset];
+ newOrder[curPos + newOffset] = origOrder[curPos + orgOffset];
+ newOrder[slippedPosition] = switchGroupId;
+ curPos++;
+ }
}
}
}
@@ -33250,7 +41395,7 @@
var me = this;
var id = me.groupTouchParams.group.groupId;
var dataset = me.groupsData.getDataSet();
- var groupData = util$1.extend({}, dataset.get(id)); // clone the data
+ var groupData = availableUtils.extend({}, dataset.get(id)); // clone the data
me.options.onMoveGroup(groupData, function (groupData) {
if (groupData) {
@@ -33264,7 +41409,7 @@
order: me.options.groupOrder
}); // restore original order
- if (!util$1.equalArray(newOrder, me.groupTouchParams.originalOrder)) {
+ if (!availableUtils.equalArray(newOrder, me.groupTouchParams.originalOrder)) {
var origOrder = me.groupTouchParams.originalOrder;
var numGroups = Math.min(origOrder.length, newOrder.length);
var curPos = 0;
@@ -33282,7 +41427,7 @@
// group at the position where other one should be, fix index arrays and continue
- var slippedPosition = indexOf$3(newOrder).call(newOrder, origOrder[curPos]);
+ var slippedPosition = _indexOfInstanceProperty(newOrder).call(newOrder, origOrder[curPos]);
var switchGroup = dataset.get(newOrder[curPos]);
var shouldBeGroup = dataset.get(origOrder[curPos]);
@@ -33517,7 +41662,7 @@
newItemData.content = newItemData.content ? newItemData.content : 'new item';
newItemData.start = newItemData.start ? newItemData.start : snap ? snap(start, scale, step) : start;
newItemData.type = newItemData.type || 'box';
- newItemData[this.itemsData.idProp] = newItemData.id || v4$1();
+ newItemData[this.itemsData.idProp] = newItemData.id || v4();
if (newItemData.type == 'range' && !newItemData.end) {
end = this.body.util.toTime(x + this.props.width / 5);
@@ -33528,7 +41673,7 @@
start: snap ? snap(start, scale, step) : start,
content: 'new item'
};
- newItemData[this.itemsData.idProp] = v4$1(); // when default type is a range, add a default end date to the new item
+ newItemData[this.itemsData.idProp] = v4(); // when default type is a range, add a default end date to the new item
if (this.options.type === 'range') {
end = this.body.util.toTime(x + this.props.width / 5);
@@ -33614,18 +41759,18 @@
}
} else {
// add/remove this item from the current selection
- var index = indexOf$3(selection).call(selection, item.id);
+ var index = _indexOfInstanceProperty(selection).call(selection, item.id);
if (index == -1) {
// item is not yet selected -> select it
selection.push(item.id);
} else {
// item is already selected -> deselect it
- splice$2(selection).call(selection, index, 1);
+ _spliceInstanceProperty(selection).call(selection, index, 1);
}
}
- var filteredSelection = filter$2(selection).call(selection, function (item) {
+ var filteredSelection = _filterInstanceProperty(selection).call(selection, function (item) {
return _this13.getItemById(item).selectable;
});
@@ -33645,14 +41790,14 @@
}, {
key: "itemFromElement",
-
+ value:
/**
* Find an item from an element:
* searches for the attribute 'vis-item' in the element's tree
* @param {HTMLElement} element
* @return {Item | null} item
*/
- value: function itemFromElement(element) {
+ function itemFromElement(element) {
var cur = element;
while (cur) {
@@ -33740,7 +41885,7 @@
}, {
key: "_cloneItemData",
-
+ value:
/**
* Clone the data of an item, and "normalize" it: convert the start and end date
* to the type (Date, Moment, ...) configured in the DataSet. If not configured,
@@ -33750,8 +41895,8 @@
* @return {Object} The cloned object
* @private
*/
- value: function _cloneItemData(itemData, type) {
- var clone = util$1.extend({}, itemData);
+ function _cloneItemData(itemData, type) {
+ var clone = availableUtils.extend({}, itemData);
if (!type) {
// convert start and end date to the type (Date, Moment, ...) configured in the DataSet
@@ -33759,11 +41904,11 @@
}
if (clone.start != undefined) {
- clone.start = util$1.convert(clone.start, type && type.start || 'Date');
+ clone.start = availableUtils.convert(clone.start, type && type.start || 'Date');
}
if (clone.end != undefined) {
- clone.end = util$1.convert(clone.end, type && type.end || 'Date');
+ clone.end = availableUtils.convert(clone.end, type && type.end || 'Date');
}
return clone;
@@ -33790,28 +41935,18 @@
this._detachAllClusters();
if (clusters) {
- var _iteratorNormalCompletion4 = true;
- var _didIteratorError4 = false;
- var _iteratorError4 = undefined;
+ var _iterator5 = _createForOfIteratorHelper$1(clusters),
+ _step5;
try {
- for (var _iterator4 = getIterator$1(clusters), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
- var cluster = _step4.value;
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
+ var cluster = _step5.value;
cluster.attach();
}
} catch (err) {
- _didIteratorError4 = true;
- _iteratorError4 = err;
+ _iterator5.e(err);
} finally {
- try {
- if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
- _iterator4.return();
- }
- } finally {
- if (_didIteratorError4) {
- throw _iteratorError4;
- }
- }
+ _iterator5.f();
}
this.clusters = clusters;
@@ -33830,28 +41965,18 @@
value: function _detachAllClusters() {
if (this.options.cluster) {
if (this.clusters && this.clusters.length) {
- var _iteratorNormalCompletion5 = true;
- var _didIteratorError5 = false;
- var _iteratorError5 = undefined;
+ var _iterator6 = _createForOfIteratorHelper$1(this.clusters),
+ _step6;
try {
- for (var _iterator5 = getIterator$1(this.clusters), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
- var cluster = _step5.value;
+ for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
+ var cluster = _step6.value;
cluster.detach();
}
} catch (err) {
- _didIteratorError5 = true;
- _iteratorError5 = err;
+ _iterator6.e(err);
} finally {
- try {
- if (!_iteratorNormalCompletion5 && _iterator5.return != null) {
- _iterator5.return();
- }
- } finally {
- if (_didIteratorError5) {
- throw _iteratorError5;
- }
- }
+ _iterator6.f();
}
}
}
@@ -33868,50 +41993,41 @@
if (this.clusters && this.clusters.length) {
var _context31;
- var newClustersIds = new set$3(map$2(clusters).call(clusters, function (cluster) {
+ var newClustersIds = new _Set(_mapInstanceProperty(clusters).call(clusters, function (cluster) {
return cluster.id;
}));
- var clustersToUnselect = filter$2(_context31 = this.clusters).call(_context31, function (cluster) {
+ var clustersToUnselect = _filterInstanceProperty(_context31 = this.clusters).call(_context31, function (cluster) {
return !newClustersIds.has(cluster.id);
});
var selectionChanged = false;
- var _iteratorNormalCompletion6 = true;
- var _didIteratorError6 = false;
- var _iteratorError6 = undefined;
+
+ var _iterator7 = _createForOfIteratorHelper$1(clustersToUnselect),
+ _step7;
try {
- for (var _iterator6 = getIterator$1(clustersToUnselect), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {
+ for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
var _context32;
- var cluster = _step6.value;
+ var cluster = _step7.value;
- var selectedIdx = indexOf$3(_context32 = this.selection).call(_context32, cluster.id);
+ var selectedIdx = _indexOfInstanceProperty(_context32 = this.selection).call(_context32, cluster.id);
if (selectedIdx !== -1) {
var _context33;
cluster.unselect();
- splice$2(_context33 = this.selection).call(_context33, selectedIdx, 1);
+ _spliceInstanceProperty(_context33 = this.selection).call(_context33, selectedIdx, 1);
selectionChanged = true;
}
}
} catch (err) {
- _didIteratorError6 = true;
- _iteratorError6 = err;
+ _iterator7.e(err);
} finally {
- try {
- if (!_iteratorNormalCompletion6 && _iterator6.return != null) {
- _iterator6.return();
- }
- } finally {
- if (_didIteratorError6) {
- throw _iteratorError6;
- }
- }
+ _iterator7.f();
}
if (selectionChanged) {
@@ -33931,7 +42047,7 @@
var max = null;
var min = null;
- forEach$2(itemsData).call(itemsData, function (data) {
+ _forEachInstanceProperty(itemsData).call(itemsData, function (data) {
if (min == null || data.start < min) {
min = data.start;
}
@@ -33988,7 +42104,7 @@
ItemSet.prototype._onAdd = ItemSet.prototype._onUpdate;
var errorFound = false;
- var allOptions;
+ var allOptions$2;
var printStyle = 'background: #FFeeee; color: #dd0000';
/**
* Used to validate options.
@@ -33999,7 +42115,7 @@
* @ignore
*/
function Validator() {
- classCallCheck(this, Validator);
+ _classCallCheck(this, Validator);
}
/**
* Main function to be called
@@ -34011,11 +42127,11 @@
*/
- createClass(Validator, null, [{
+ _createClass(Validator, null, [{
key: "validate",
value: function validate(options, referenceOptions, subObject) {
errorFound = false;
- allOptions = referenceOptions;
+ allOptions$2 = referenceOptions;
var usedOptions = referenceOptions;
if (subObject !== undefined) {
@@ -34104,16 +42220,16 @@
if (refOptionType !== undefined) {
// if the type is correct, we check if it is supposed to be one of a few select values
- if (Validator.getType(refOptionType) === 'array' && indexOf$3(refOptionType).call(refOptionType, options[option]) === -1) {
+ if (Validator.getType(refOptionType) === 'array' && _indexOfInstanceProperty(refOptionType).call(refOptionType, options[option]) === -1) {
log('Invalid option detected in "' + option + '".' + ' Allowed values are:' + Validator.print(refOptionType) + ' not "' + options[option] + '". ');
errorFound = true;
} else if (optionType === 'object' && referenceOption !== "__any__") {
- path = util$1.copyAndExtendArray(path, option);
+ path = availableUtils.copyAndExtendArray(path, option);
Validator.parse(options[option], referenceOptions[referenceOption], path);
}
} else if (refOptionObj['any'] === undefined) {
// type of the field is incorrect and the field cannot be any
- log('Invalid type received for "' + option + '". Expected: ' + Validator.print(keys$3(refOptionObj)) + '. Received [' + optionType + '] "' + options[option] + '"');
+ log('Invalid type received for "' + option + '". Expected: ' + Validator.print(_Object$keys(refOptionObj)) + '. Received [' + optionType + '] "' + options[option] + '"');
errorFound = true;
}
}
@@ -34127,7 +42243,7 @@
}, {
key: "getType",
value: function getType(object) {
- var type = _typeof_1(object);
+ var type = _typeof$1(object);
if (type === 'object') {
if (object === null) {
@@ -34146,7 +42262,7 @@
return 'string';
}
- if (isArray$5(object)) {
+ if (_Array$isArray(object)) {
return 'array';
}
@@ -34186,7 +42302,7 @@
key: "getSuggestion",
value: function getSuggestion(option, options, path) {
var localSearch = Validator.findInOptions(option, options, path, false);
- var globalSearch = Validator.findInOptions(option, allOptions, [], true);
+ var globalSearch = Validator.findInOptions(option, allOptions$2, [], true);
var localSearchThreshold = 8;
var globalSearchThreshold = 4;
var msg;
@@ -34198,7 +42314,7 @@
} else if (localSearch.distance <= localSearchThreshold) {
msg = '. Did you mean "' + localSearch.closestMatch + '"?' + Validator.printLocation(localSearch.path, option);
} else {
- msg = '. Did you mean one of these: ' + Validator.print(keys$3(options)) + Validator.printLocation(path, option);
+ msg = '. Did you mean one of these: ' + Validator.print(_Object$keys(options)) + Validator.printLocation(path, option);
}
console.log('%cUnknown option detected: "' + option + '"' + msg, printStyle);
@@ -34229,7 +42345,7 @@
var distance = void 0;
if (options[op].__type__ !== undefined && recursive === true) {
- var result = Validator.findInOptions(option, options[op], util$1.copyAndExtendArray(path, op));
+ var result = Validator.findInOptions(option, options[op], availableUtils.copyAndExtendArray(path, op));
if (min > result.distance) {
closestMatch = result.closestMatch;
@@ -34240,7 +42356,7 @@
} else {
var _context;
- if (indexOf$3(_context = op.toLowerCase()).call(_context, lowerCaseOption) !== -1) {
+ if (_indexOfInstanceProperty(_context = op.toLowerCase()).call(_context, lowerCaseOption) !== -1) {
indexMatch = op;
}
@@ -34248,7 +42364,7 @@
if (min > distance) {
closestMatch = op;
- closestMatchPath = util$1.copyArray(path);
+ closestMatchPath = availableUtils.copyArray(path);
min = distance;
}
}
@@ -34308,7 +42424,7 @@
}, {
key: "print",
value: function print(options) {
- return stringify$2(options).replace(/(\")|(\[)|(\])|(,"__type__")/g, "").replace(/(\,)/g, ', ');
+ return _JSON$stringify(options).replace(/(\")|(\[)|(\])|(,"__type__")/g, "").replace(/(\,)/g, ', ');
}
/**
* Compute the edit distance between the two given strings
@@ -34375,353 +42491,353 @@
* __any__ means that the name of the property does not matter.
* __type__ is a required field for all objects and contains the allowed types of all objects
*/
- var string = 'string';
- var bool = 'boolean';
- var number = 'number';
- var array = 'array';
- var date = 'date';
- var object = 'object'; // should only be in a __type__ property
+ var string$1 = 'string';
+ var bool$1 = 'boolean';
+ var number$1 = 'number';
+ var array$1 = 'array';
+ var date$1 = 'date';
+ var object$1 = 'object'; // should only be in a __type__ property
- var dom = 'dom';
- var moment$2 = 'moment';
- var any = 'any';
+ var dom$1 = 'dom';
+ var moment$1 = 'moment';
+ var any$1 = 'any';
var allOptions$1 = {
configure: {
enabled: {
- 'boolean': bool
+ 'boolean': bool$1
},
filter: {
- 'boolean': bool,
+ 'boolean': bool$1,
'function': 'function'
},
container: {
- dom: dom
+ dom: dom$1
},
__type__: {
- object: object,
- 'boolean': bool,
+ object: object$1,
+ 'boolean': bool$1,
'function': 'function'
}
},
//globals :
align: {
- string: string
+ string: string$1
},
alignCurrentTime: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
rtl: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
rollingMode: {
follow: {
- 'boolean': bool
+ 'boolean': bool$1
},
offset: {
- number: number,
+ number: number$1,
'undefined': 'undefined'
},
__type__: {
- object: object
+ object: object$1
}
},
onTimeout: {
timeoutMs: {
- number: number
+ number: number$1
},
callback: {
'function': 'function'
},
__type__: {
- object: object
+ object: object$1
}
},
verticalScroll: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
horizontalScroll: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
autoResize: {
- 'boolean': bool
+ 'boolean': bool$1
},
throttleRedraw: {
- number: number
+ number: number$1
},
// TODO: DEPRICATED see https://github.com/almende/vis/issues/2511
clickToUse: {
- 'boolean': bool
+ 'boolean': bool$1
},
dataAttributes: {
- string: string,
- array: array
+ string: string$1,
+ array: array$1
},
editable: {
add: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
remove: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
updateGroup: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
updateTime: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
overrideItems: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
__type__: {
- 'boolean': bool,
- object: object
+ 'boolean': bool$1,
+ object: object$1
}
},
end: {
- number: number,
- date: date,
- string: string,
- moment: moment$2
+ number: number$1,
+ date: date$1,
+ string: string$1,
+ moment: moment$1
},
format: {
minorLabels: {
millisecond: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
second: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
minute: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
hour: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
weekday: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
day: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
week: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
month: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
year: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
__type__: {
- object: object,
+ object: object$1,
'function': 'function'
}
},
majorLabels: {
millisecond: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
second: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
minute: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
hour: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
weekday: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
day: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
week: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
month: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
year: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
__type__: {
- object: object,
+ object: object$1,
'function': 'function'
}
},
__type__: {
- object: object
+ object: object$1
}
},
moment: {
'function': 'function'
},
groupHeightMode: {
- string: string
+ string: string$1
},
groupOrder: {
- string: string,
+ string: string$1,
'function': 'function'
},
groupEditable: {
add: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
remove: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
order: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
__type__: {
- 'boolean': bool,
- object: object
+ 'boolean': bool$1,
+ object: object$1
}
},
groupOrderSwap: {
'function': 'function'
},
height: {
- string: string,
- number: number
+ string: string$1,
+ number: number$1
},
hiddenDates: {
start: {
- date: date,
- number: number,
- string: string,
- moment: moment$2
+ date: date$1,
+ number: number$1,
+ string: string$1,
+ moment: moment$1
},
end: {
- date: date,
- number: number,
- string: string,
- moment: moment$2
+ date: date$1,
+ number: number$1,
+ string: string$1,
+ moment: moment$1
},
repeat: {
- string: string
+ string: string$1
},
__type__: {
- object: object,
- array: array
+ object: object$1,
+ array: array$1
}
},
itemsAlwaysDraggable: {
item: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
range: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
__type__: {
- 'boolean': bool,
- object: object
+ 'boolean': bool$1,
+ object: object$1
}
},
limitSize: {
- 'boolean': bool
+ 'boolean': bool$1
},
locale: {
- string: string
+ string: string$1
},
locales: {
__any__: {
- any: any
+ any: any$1
},
__type__: {
- object: object
+ object: object$1
}
},
longSelectPressTime: {
- number: number
+ number: number$1
},
margin: {
axis: {
- number: number
+ number: number$1
},
item: {
horizontal: {
- number: number,
+ number: number$1,
'undefined': 'undefined'
},
vertical: {
- number: number,
+ number: number$1,
'undefined': 'undefined'
},
__type__: {
- object: object,
- number: number
+ object: object$1,
+ number: number$1
}
},
__type__: {
- object: object,
- number: number
+ object: object$1,
+ number: number$1
}
},
max: {
- date: date,
- number: number,
- string: string,
- moment: moment$2
+ date: date$1,
+ number: number$1,
+ string: string$1,
+ moment: moment$1
},
maxHeight: {
- number: number,
- string: string
+ number: number$1,
+ string: string$1
},
maxMinorChars: {
- number: number
+ number: number$1
},
min: {
- date: date,
- number: number,
- string: string,
- moment: moment$2
+ date: date$1,
+ number: number$1,
+ string: string$1,
+ moment: moment$1
},
minHeight: {
- number: number,
- string: string
+ number: number$1,
+ string: string$1
},
moveable: {
- 'boolean': bool
+ 'boolean': bool$1
},
multiselect: {
- 'boolean': bool
+ 'boolean': bool$1
},
multiselectPerGroup: {
- 'boolean': bool
+ 'boolean': bool$1
},
onAdd: {
'function': 'function'
@@ -34758,49 +42874,49 @@
},
orientation: {
axis: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
item: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
__type__: {
- string: string,
- object: object
+ string: string$1,
+ object: object$1
}
},
selectable: {
- 'boolean': bool
+ 'boolean': bool$1
},
sequentialSelection: {
- 'boolean': bool
+ 'boolean': bool$1
},
showCurrentTime: {
- 'boolean': bool
+ 'boolean': bool$1
},
showMajorLabels: {
- 'boolean': bool
+ 'boolean': bool$1
},
showMinorLabels: {
- 'boolean': bool
+ 'boolean': bool$1
},
showWeekScale: {
- 'boolean': bool
+ 'boolean': bool$1
},
stack: {
- 'boolean': bool
+ 'boolean': bool$1
},
stackSubgroups: {
- 'boolean': bool
+ 'boolean': bool$1
},
cluster: {
maxItems: {
- 'number': number,
+ 'number': number$1,
'undefined': 'undefined'
},
titleTemplate: {
- 'string': string,
+ 'string': string$1,
'undefined': 'undefined'
},
clusterCriteria: {
@@ -34808,16 +42924,16 @@
'undefined': 'undefined'
},
showStipes: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
fitOnDoubleClick: {
- 'boolean': bool,
+ 'boolean': bool$1,
'undefined': 'undefined'
},
__type__: {
- 'boolean': bool,
- object: object
+ 'boolean': bool$1,
+ object: object$1
}
},
snap: {
@@ -34825,10 +42941,10 @@
'null': 'null'
},
start: {
- date: date,
- number: number,
- string: string,
- moment: moment$2
+ date: date$1,
+ number: number$1,
+ string: string$1,
+ moment: moment$1
},
template: {
'function': 'function'
@@ -34840,27 +42956,27 @@
'function': 'function'
},
visibleFrameTemplate: {
- string: string,
+ string: string$1,
'function': 'function'
},
showTooltips: {
- 'boolean': bool
+ 'boolean': bool$1
},
tooltip: {
followMouse: {
- 'boolean': bool
+ 'boolean': bool$1
},
overflowMethod: {
'string': ['cap', 'flip', 'none']
},
delay: {
- number: number
+ number: number$1
},
template: {
'function': 'function'
},
__type__: {
- object: object
+ object: object$1
}
},
tooltipOnItemUpdateTime: {
@@ -34868,53 +42984,69 @@
'function': 'function'
},
__type__: {
- 'boolean': bool,
- object: object
+ 'boolean': bool$1,
+ object: object$1
}
},
timeAxis: {
scale: {
- string: string,
+ string: string$1,
'undefined': 'undefined'
},
step: {
- number: number,
+ number: number$1,
'undefined': 'undefined'
},
__type__: {
- object: object
+ object: object$1
}
},
type: {
- string: string
+ string: string$1
},
width: {
- string: string,
- number: number
+ string: string$1,
+ number: number$1
},
preferZoom: {
- 'boolean': bool
+ 'boolean': bool$1
},
zoomable: {
- 'boolean': bool
+ 'boolean': bool$1
},
zoomKey: {
string: ['ctrlKey', 'altKey', 'shiftKey', 'metaKey', '']
},
zoomFriction: {
- number: number
+ number: number$1
},
zoomMax: {
- number: number
+ number: number$1
},
zoomMin: {
- number: number
+ number: number$1
+ },
+ xss: {
+ disabled: {
+ boolean: bool$1
+ },
+ filterOptions: {
+ __any__: {
+ any: any$1
+ },
+ __type__: {
+ object: object$1
+ }
+ },
+ __type__: {
+ object: object$1
+ }
},
__type__: {
- object: object
+ object: object$1
}
};
- var configureOptions = {
+ var configureOptions$1 = {
global: {
align: ['center', 'left', 'right'],
alignCurrentTime: ['none', 'year', 'month', 'quarter', 'week', 'isoWeek', 'day', 'date', 'hour', 'minute', 'second'],
@@ -35012,50 +43144,13 @@
zoomable: true,
zoomKey: ['ctrlKey', 'altKey', 'shiftKey', 'metaKey', ''],
zoomMax: [315360000000000, 10, 315360000000000, 1],
- zoomMin: [10, 10, 315360000000000, 1]
+ zoomMin: [10, 10, 315360000000000, 1],
+ xss: {
+ disabled: false
+ }
}
};
- // https://tc39.github.io/ecma262/#sec-array.prototype.fill
-
-
- var arrayFill = function fill(value
- /* , start = 0, end = @length */
- ) {
- var O = toObject(this);
- var length = toLength(O.length);
- var argumentsLength = arguments.length;
- var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
- var end = argumentsLength > 2 ? arguments[2] : undefined;
- var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
-
- while (endPos > index) O[index++] = value;
-
- return O;
- };
-
- // https://tc39.github.io/ecma262/#sec-array.prototype.fill
-
- _export({
- target: 'Array',
- proto: true
- }, {
- fill: arrayFill
- }); // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
-
- var fill = entryVirtual('Array').fill;
-
- var ArrayPrototype$i = Array.prototype;
-
- var fill_1 = function (it) {
- var own = it.fill;
- return it === ArrayPrototype$i || it instanceof Array && own === ArrayPrototype$i.fill ? fill : own;
- };
-
- var fill$1 = fill_1;
-
- var fill$2 = fill$1;
-
var htmlColors = {
black: '#000000',
navy: '#000080',
@@ -35209,7 +43304,7 @@
function ColorPicker() {
var pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
- classCallCheck(this, ColorPicker);
+ _classCallCheck(this, ColorPicker);
this.pixelRatio = pixelRatio;
this.generated = false;
@@ -35247,7 +43342,7 @@
*/
- createClass(ColorPicker, [{
+ _createClass(ColorPicker, [{
key: "insertTo",
value: function insertTo(container) {
if (this.hammer !== undefined) {
@@ -35335,8 +43430,8 @@
} // check format
- if (util$1.isString(color) === true) {
- if (util$1.isValidRGB(color) === true) {
+ if (availableUtils.isString(color) === true) {
+ if (availableUtils.isValidRGB(color) === true) {
var rgbaArray = color.substr(4).substr(0, color.length - 5).split(',');
rgba = {
r: rgbaArray[0],
@@ -35344,7 +43439,7 @@
b: rgbaArray[2],
a: 1.0
};
- } else if (util$1.isValidRGBA(color) === true) {
+ } else if (availableUtils.isValidRGBA(color) === true) {
var _rgbaArray = color.substr(5).substr(0, color.length - 6).split(',');
rgba = {
@@ -35353,8 +43448,8 @@
b: _rgbaArray[2],
a: _rgbaArray[3]
};
- } else if (util$1.isValidHex(color) === true) {
- var rgbObj = util$1.hexToRGB(color);
+ } else if (availableUtils.isValidHex(color) === true) {
+ var rgbObj = availableUtils.hexToRGB(color);
rgba = {
r: rgbObj.r,
g: rgbObj.g,
@@ -35378,7 +43473,7 @@
if (rgba === undefined) {
- throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: " + stringify$2(color));
+ throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: " + _JSON$stringify(color));
} else {
this._setColor(rgba, setInitial);
}
@@ -35418,7 +43513,7 @@
// store the previous color for next time;
if (storePrevious === true) {
- this.previousColor = util$1.extend({}, this.color);
+ this.previousColor = availableUtils.extend({}, this.color);
}
if (this.applied === true) {
@@ -35428,7 +43523,7 @@
this.frame.style.display = 'none'; // call the closing callback, restoring the onclick method.
// this is in a setTimeout because it will trigger the show again before the click is done.
- setTimeout$2(function () {
+ _setTimeout(function () {
if (_this.closeCallback !== undefined) {
_this.closeCallback();
@@ -35490,11 +43585,11 @@
// store the initial color
if (setInitial === true) {
- this.initialColor = util$1.extend({}, rgba);
+ this.initialColor = availableUtils.extend({}, rgba);
}
this.color = rgba;
- var hsv = util$1.RGBToHSV(rgba.r, rgba.g, rgba.b);
+ var hsv = availableUtils.RGBToHSV(rgba.r, rgba.g, rgba.b);
var angleConvert = 2 * Math.PI;
var radius = this.r * hsv.s;
var x = this.centerCoordinates.x + radius * Math.sin(angleConvert * hsv.h);
@@ -35526,9 +43621,9 @@
}, {
key: "_setBrightness",
value: function _setBrightness(value) {
- var hsv = util$1.RGBToHSV(this.color.r, this.color.g, this.color.b);
+ var hsv = availableUtils.RGBToHSV(this.color.r, this.color.g, this.color.b);
hsv.v = value / 100;
- var rgba = util$1.HSVToRGB(hsv.h, hsv.s, hsv.v);
+ var rgba = availableUtils.HSVToRGB(hsv.h, hsv.s, hsv.v);
rgba['a'] = this.color.a;
this.color = rgba;
@@ -35544,7 +43639,7 @@
key: "_updatePicker",
value: function _updatePicker() {
var rgba = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.color;
- var hsv = util$1.RGBToHSV(rgba.r, rgba.g, rgba.b);
+ var hsv = availableUtils.RGBToHSV(rgba.r, rgba.g, rgba.b);
var ctx = this.colorPickerCanvas.getContext('2d');
if (this.pixelRation === undefined) {
@@ -35560,7 +43655,7 @@
ctx.fillStyle = 'rgba(0,0,0,' + (1 - hsv.v) + ')';
ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);
- fill$2(ctx).call(ctx);
+ _fillInstanceProperty(ctx).call(ctx);
this.brightnessRange.value = 100 * hsv.v;
this.opacityRange.value = 100 * rgba.a;
@@ -35681,19 +43776,19 @@
this.cancelButton = document.createElement("div");
this.cancelButton.className = "vis-button vis-cancel";
this.cancelButton.innerHTML = 'cancel';
- this.cancelButton.onclick = bind$2(_context = this._hide).call(_context, this, false);
+ this.cancelButton.onclick = _bindInstanceProperty$1(_context = this._hide).call(_context, this, false);
this.applyButton = document.createElement("div");
this.applyButton.className = "vis-button vis-apply";
this.applyButton.innerHTML = 'apply';
- this.applyButton.onclick = bind$2(_context2 = this._apply).call(_context2, this);
+ this.applyButton.onclick = _bindInstanceProperty$1(_context2 = this._apply).call(_context2, this);
this.saveButton = document.createElement("div");
this.saveButton.className = "vis-button vis-save";
this.saveButton.innerHTML = 'save';
- this.saveButton.onclick = bind$2(_context3 = this._save).call(_context3, this);
+ this.saveButton.onclick = _bindInstanceProperty$1(_context3 = this._save).call(_context3, this);
this.loadButton = document.createElement("div");
this.loadButton.className = "vis-button vis-load";
this.loadButton.innerHTML = 'load last';
- this.loadButton.onclick = bind$2(_context4 = this._loadLast).call(_context4, this);
+ this.loadButton.onclick = _bindInstanceProperty$1(_context4 = this._loadLast).call(_context4, this);
this.frame.appendChild(this.colorPickerDiv);
this.frame.appendChild(this.arrowDiv);
this.frame.appendChild(this.brightnessLabel);
@@ -35719,7 +43814,7 @@
this.drag = {};
this.pinch = {};
- this.hammer = new Hammer$1(this.colorPickerCanvas);
+ this.hammer = new Hammer(this.colorPickerCanvas);
this.hammer.get('pinch').set({
enable: true
});
@@ -35775,7 +43870,7 @@
for (sat = 0; sat < this.r; sat++) {
x = this.centerCoordinates.x + sat * Math.sin(angleConvert * hue);
y = this.centerCoordinates.y + sat * Math.cos(angleConvert * hue);
- rgb = util$1.HSVToRGB(hue * hfac, sat * sfac, 1);
+ rgb = availableUtils.HSVToRGB(hue * hfac, sat * sfac, 1);
ctx.fillStyle = 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')';
ctx.fillRect(x - 0.5, y - 0.5, 2, 2);
}
@@ -35816,10 +43911,10 @@
var h = angle / (2 * Math.PI);
h = h < 0 ? h + 1 : h;
var s = radius / this.r;
- var hsv = util$1.RGBToHSV(this.color.r, this.color.g, this.color.b);
+ var hsv = availableUtils.RGBToHSV(this.color.r, this.color.g, this.color.b);
hsv.h = h;
hsv.s = s;
- var rgba = util$1.HSVToRGB(hsv.h, hsv.s, hsv.v);
+ var rgba = availableUtils.HSVToRGB(hsv.h, hsv.s, hsv.v);
rgba['a'] = this.color.a;
this.color = rgba; // update previews
@@ -35831,8 +43926,8 @@
return ColorPicker;
}();
- var css_248z$d = "div.vis-configuration {\n position:relative;\n display:block;\n float:left;\n font-size:12px;\n}\n\ndiv.vis-configuration-wrapper {\n display:block;\n width:700px;\n}\n\ndiv.vis-configuration-wrapper::after {\n clear: both;\n content: \"\";\n display: block;\n}\n\ndiv.vis-configuration.vis-config-option-container{\n display:block;\n width:495px;\n background-color: #ffffff;\n border:2px solid #f7f8fa;\n border-radius:4px;\n margin-top:20px;\n left:10px;\n padding-left:5px;\n}\n\ndiv.vis-configuration.vis-config-button{\n display:block;\n width:495px;\n height:25px;\n vertical-align: middle;\n line-height:25px;\n background-color: #f7f8fa;\n border:2px solid #ceced0;\n border-radius:4px;\n margin-top:20px;\n left:10px;\n padding-left:5px;\n cursor: pointer;\n margin-bottom:30px;\n}\n\ndiv.vis-configuration.vis-config-button.hover{\n background-color: #4588e6;\n border:2px solid #214373;\n color:#ffffff;\n}\n\ndiv.vis-configuration.vis-config-item{\n display:block;\n float:left;\n width:495px;\n height:25px;\n vertical-align: middle;\n line-height:25px;\n}\n\n\ndiv.vis-configuration.vis-config-item.vis-config-s2{\n left:10px;\n background-color: #f7f8fa;\n padding-left:5px;\n border-radius:3px;\n}\ndiv.vis-configuration.vis-config-item.vis-config-s3{\n left:20px;\n background-color: #e4e9f0;\n padding-left:5px;\n border-radius:3px;\n}\ndiv.vis-configuration.vis-config-item.vis-config-s4{\n left:30px;\n background-color: #cfd8e6;\n padding-left:5px;\n border-radius:3px;\n}\n\ndiv.vis-configuration.vis-config-header{\n font-size:18px;\n font-weight: bold;\n}\n\ndiv.vis-configuration.vis-config-label{\n width:120px;\n height:25px;\n line-height: 25px;\n}\n\ndiv.vis-configuration.vis-config-label.vis-config-s3{\n width:110px;\n}\ndiv.vis-configuration.vis-config-label.vis-config-s4{\n width:100px;\n}\n\ndiv.vis-configuration.vis-config-colorBlock{\n top:1px;\n width:30px;\n height:19px;\n border:1px solid #444444;\n border-radius:2px;\n padding:0px;\n margin:0px;\n cursor:pointer;\n}\n\ninput.vis-configuration.vis-config-checkbox {\n left:-5px;\n}\n\n\ninput.vis-configuration.vis-config-rangeinput{\n position:relative;\n top:-5px;\n width:60px;\n /*height:13px;*/\n padding:1px;\n margin:0;\n pointer-events:none;\n}\n\ninput.vis-configuration.vis-config-range{\n /*removes default webkit styles*/\n -webkit-appearance: none;\n\n /*fix for FF unable to apply focus style bug */\n border: 0px solid white;\n background-color:rgba(0,0,0,0);\n\n /*required for proper track sizing in FF*/\n width: 300px;\n height:20px;\n}\ninput.vis-configuration.vis-config-range::-webkit-slider-runnable-track {\n width: 300px;\n height: 5px;\n background: #dedede; /* Old browsers */\n background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dedede), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #dedede 0%,#c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\n\n border: 1px solid #999999;\n box-shadow: #aaaaaa 0px 0px 3px 0px;\n border-radius: 3px;\n}\ninput.vis-configuration.vis-config-range::-webkit-slider-thumb {\n -webkit-appearance: none;\n border: 1px solid #14334b;\n height: 17px;\n width: 17px;\n border-radius: 50%;\n background: #3876c2; /* Old browsers */\n background: -moz-linear-gradient(top, #3876c2 0%, #385380 100%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3876c2), color-stop(100%,#385380)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #3876c2 0%,#385380 100%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #3876c2 0%,#385380 100%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #3876c2 0%,#385380 100%); /* IE10+ */\n background: linear-gradient(to bottom, #3876c2 0%,#385380 100%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380',GradientType=0 ); /* IE6-9 */\n box-shadow: #111927 0px 0px 1px 0px;\n margin-top: -7px;\n}\ninput.vis-configuration.vis-config-range:focus {\n outline: none;\n}\ninput.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track {\n background: #9d9d9d; /* Old browsers */\n background: -moz-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#9d9d9d), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #9d9d9d 0%,#c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\n}\n\ninput.vis-configuration.vis-config-range::-moz-range-track {\n width: 300px;\n height: 10px;\n background: #dedede; /* Old browsers */\n background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dedede), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #dedede 0%,#c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\n\n border: 1px solid #999999;\n box-shadow: #aaaaaa 0px 0px 3px 0px;\n border-radius: 3px;\n}\ninput.vis-configuration.vis-config-range::-moz-range-thumb {\n border: none;\n height: 16px;\n width: 16px;\n\n border-radius: 50%;\n background: #385380;\n}\n\n/*hide the outline behind the border*/\ninput.vis-configuration.vis-config-range:-moz-focusring{\n outline: 1px solid white;\n outline-offset: -1px;\n}\n\ninput.vis-configuration.vis-config-range::-ms-track {\n width: 300px;\n height: 5px;\n\n /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */\n background: transparent;\n\n /*leave room for the larger thumb to overflow with a transparent border */\n border-color: transparent;\n border-width: 6px 0;\n\n /*remove default tick marks*/\n color: transparent;\n}\ninput.vis-configuration.vis-config-range::-ms-fill-lower {\n background: #777;\n border-radius: 10px;\n}\ninput.vis-configuration.vis-config-range::-ms-fill-upper {\n background: #ddd;\n border-radius: 10px;\n}\ninput.vis-configuration.vis-config-range::-ms-thumb {\n border: none;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background: #385380;\n}\ninput.vis-configuration.vis-config-range:focus::-ms-fill-lower {\n background: #888;\n}\ninput.vis-configuration.vis-config-range:focus::-ms-fill-upper {\n background: #ccc;\n}\n\n.vis-configuration-popup {\n position: absolute;\n background: rgba(57, 76, 89, 0.85);\n border: 2px solid #f2faff;\n line-height:30px;\n height:30px;\n width:150px;\n text-align:center;\n color: #ffffff;\n font-size:14px;\n border-radius:4px;\n -webkit-transition: opacity 0.3s ease-in-out;\n -moz-transition: opacity 0.3s ease-in-out;\n transition: opacity 0.3s ease-in-out;\n}\n.vis-configuration-popup:after, .vis-configuration-popup:before {\n left: 100%;\n top: 50%;\n border: solid transparent;\n content: \" \";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.vis-configuration-popup:after {\n border-color: rgba(136, 183, 213, 0);\n border-left-color: rgba(57, 76, 89, 0.85);\n border-width: 8px;\n margin-top: -8px;\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6IDEycHg7XG4gICAgbWFyZ2luLXRvcDogLTEycHg7XG59Il19 */";
- styleInject(css_248z$d);
+ var css_248z$1 = "div.vis-configuration {\n position:relative;\n display:block;\n float:left;\n font-size:12px;\n}\n\ndiv.vis-configuration-wrapper {\n display:block;\n width:700px;\n}\n\ndiv.vis-configuration-wrapper::after {\n clear: both;\n content: \"\";\n display: block;\n}\n\ndiv.vis-configuration.vis-config-option-container{\n display:block;\n width:495px;\n background-color: #ffffff;\n border:2px solid #f7f8fa;\n border-radius:4px;\n margin-top:20px;\n left:10px;\n padding-left:5px;\n}\n\ndiv.vis-configuration.vis-config-button{\n display:block;\n width:495px;\n height:25px;\n vertical-align: middle;\n line-height:25px;\n background-color: #f7f8fa;\n border:2px solid #ceced0;\n border-radius:4px;\n margin-top:20px;\n left:10px;\n padding-left:5px;\n cursor: pointer;\n margin-bottom:30px;\n}\n\ndiv.vis-configuration.vis-config-button.hover{\n background-color: #4588e6;\n border:2px solid #214373;\n color:#ffffff;\n}\n\ndiv.vis-configuration.vis-config-item{\n display:block;\n float:left;\n width:495px;\n height:25px;\n vertical-align: middle;\n line-height:25px;\n}\n\n\ndiv.vis-configuration.vis-config-item.vis-config-s2{\n left:10px;\n background-color: #f7f8fa;\n padding-left:5px;\n border-radius:3px;\n}\ndiv.vis-configuration.vis-config-item.vis-config-s3{\n left:20px;\n background-color: #e4e9f0;\n padding-left:5px;\n border-radius:3px;\n}\ndiv.vis-configuration.vis-config-item.vis-config-s4{\n left:30px;\n background-color: #cfd8e6;\n padding-left:5px;\n border-radius:3px;\n}\n\ndiv.vis-configuration.vis-config-header{\n font-size:18px;\n font-weight: bold;\n}\n\ndiv.vis-configuration.vis-config-label{\n width:120px;\n height:25px;\n line-height: 25px;\n}\n\ndiv.vis-configuration.vis-config-label.vis-config-s3{\n width:110px;\n}\ndiv.vis-configuration.vis-config-label.vis-config-s4{\n width:100px;\n}\n\ndiv.vis-configuration.vis-config-colorBlock{\n top:1px;\n width:30px;\n height:19px;\n border:1px solid #444444;\n border-radius:2px;\n padding:0px;\n margin:0px;\n cursor:pointer;\n}\n\ninput.vis-configuration.vis-config-checkbox {\n left:-5px;\n}\n\n\ninput.vis-configuration.vis-config-rangeinput{\n position:relative;\n top:-5px;\n width:60px;\n /*height:13px;*/\n padding:1px;\n margin:0;\n pointer-events:none;\n}\n\ninput.vis-configuration.vis-config-range{\n /*removes default webkit styles*/\n -webkit-appearance: none;\n\n /*fix for FF unable to apply focus style bug */\n border: 0px solid white;\n background-color:rgba(0,0,0,0);\n\n /*required for proper track sizing in FF*/\n width: 300px;\n height:20px;\n}\ninput.vis-configuration.vis-config-range::-webkit-slider-runnable-track {\n width: 300px;\n height: 5px;\n background: #dedede; /* Old browsers */\n background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dedede), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #dedede 0%,#c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\n\n border: 1px solid #999999;\n box-shadow: #aaaaaa 0px 0px 3px 0px;\n border-radius: 3px;\n}\ninput.vis-configuration.vis-config-range::-webkit-slider-thumb {\n -webkit-appearance: none;\n border: 1px solid #14334b;\n height: 17px;\n width: 17px;\n border-radius: 50%;\n background: #3876c2; /* Old browsers */\n background: -moz-linear-gradient(top, #3876c2 0%, #385380 100%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3876c2), color-stop(100%,#385380)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #3876c2 0%,#385380 100%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #3876c2 0%,#385380 100%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #3876c2 0%,#385380 100%); /* IE10+ */\n background: linear-gradient(to bottom, #3876c2 0%,#385380 100%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380',GradientType=0 ); /* IE6-9 */\n box-shadow: #111927 0px 0px 1px 0px;\n margin-top: -7px;\n}\ninput.vis-configuration.vis-config-range:focus {\n outline: none;\n}\ninput.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track {\n background: #9d9d9d; /* Old browsers */\n background: -moz-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#9d9d9d), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #9d9d9d 0%,#c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\n}\n\ninput.vis-configuration.vis-config-range::-moz-range-track {\n width: 300px;\n height: 10px;\n background: #dedede; /* Old browsers */\n background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dedede), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #dedede 0%,#c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */\n\n border: 1px solid #999999;\n box-shadow: #aaaaaa 0px 0px 3px 0px;\n border-radius: 3px;\n}\ninput.vis-configuration.vis-config-range::-moz-range-thumb {\n border: none;\n height: 16px;\n width: 16px;\n\n border-radius: 50%;\n background: #385380;\n}\n\n/*hide the outline behind the border*/\ninput.vis-configuration.vis-config-range:-moz-focusring{\n outline: 1px solid white;\n outline-offset: -1px;\n}\n\ninput.vis-configuration.vis-config-range::-ms-track {\n width: 300px;\n height: 5px;\n\n /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */\n background: transparent;\n\n /*leave room for the larger thumb to overflow with a transparent border */\n border-color: transparent;\n border-width: 6px 0;\n\n /*remove default tick marks*/\n color: transparent;\n}\ninput.vis-configuration.vis-config-range::-ms-fill-lower {\n background: #777;\n border-radius: 10px;\n}\ninput.vis-configuration.vis-config-range::-ms-fill-upper {\n background: #ddd;\n border-radius: 10px;\n}\ninput.vis-configuration.vis-config-range::-ms-thumb {\n border: none;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background: #385380;\n}\ninput.vis-configuration.vis-config-range:focus::-ms-fill-lower {\n background: #888;\n}\ninput.vis-configuration.vis-config-range:focus::-ms-fill-upper {\n background: #ccc;\n}\n\n.vis-configuration-popup {\n position: absolute;\n background: rgba(57, 76, 89, 0.85);\n border: 2px solid #f2faff;\n line-height:30px;\n height:30px;\n width:150px;\n text-align:center;\n color: #ffffff;\n font-size:14px;\n border-radius:4px;\n -webkit-transition: opacity 0.3s ease-in-out;\n -moz-transition: opacity 0.3s ease-in-out;\n transition: opacity 0.3s ease-in-out;\n}\n.vis-configuration-popup:after, .vis-configuration-popup:before {\n left: 100%;\n top: 50%;\n border: solid transparent;\n content: \" \";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.vis-configuration-popup:after {\n border-color: rgba(136, 183, 213, 0);\n border-left-color: rgba(57, 76, 89, 0.85);\n border-width: 8px;\n margin-top: -8px;\n}\n.vis-configuration-popup:before {\n border-color: rgba(194, 225, 245, 0);\n border-left-color: #f2faff;\n border-width: 12px;\n margin-top: -12px;\n}";
+ styleInject(css_248z$1);
/**
* The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options.
@@ -35854,7 +43949,7 @@
function Configurator(parentModule, defaultContainer, configureOptions) {
var pixelRatio = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
- classCallCheck(this, Configurator);
+ _classCallCheck(this, Configurator);
this.parent = parentModule;
this.changedOptions = [];
@@ -35869,7 +43964,7 @@
container: undefined,
showButton: true
};
- util$1.extend(this.options, this.defaultOptions);
+ availableUtils.extend(this.options, this.defaultOptions);
this.configureOptions = configureOptions;
this.moduleOptions = {};
this.domElements = [];
@@ -35887,7 +43982,7 @@
*/
- createClass(Configurator, [{
+ _createClass(Configurator, [{
key: "setOptions",
value: function setOptions(options) {
if (options !== undefined) {
@@ -35900,9 +43995,9 @@
if (typeof options === 'string') {
this.options.filter = options;
- } else if (options instanceof Array) {
+ } else if (_Array$isArray(options)) {
this.options.filter = options.join();
- } else if (_typeof_1(options) === 'object') {
+ } else if (_typeof$1(options) === 'object') {
if (options == null) {
throw new TypeError('options cannot be null');
}
@@ -35911,8 +44006,8 @@
this.options.container = options.container;
}
- if (filter$2(options) !== undefined) {
- this.options.filter = filter$2(options);
+ if (_filterInstanceProperty(options) !== undefined) {
+ this.options.filter = _filterInstanceProperty(options);
}
if (options.showButton !== undefined) {
@@ -35930,7 +44025,7 @@
enabled = true;
}
- if (filter$2(this.options) === false) {
+ if (_filterInstanceProperty(this.options) === false) {
enabled = false;
}
@@ -35971,7 +44066,7 @@
this.changedOptions = [];
- var filter = filter$2(this.options);
+ var filter = _filterInstanceProperty(this.options);
var counter = 0;
var show = false;
@@ -35984,7 +44079,7 @@
if (typeof filter === 'function') {
show = filter(option, []);
show = show || this._handleObject(this.configureOptions[option], [option], true);
- } else if (filter === true || indexOf$3(filter).call(filter, option) !== -1) {
+ } else if (filter === true || _indexOfInstanceProperty(filter).call(filter, option) !== -1) {
show = true;
}
@@ -36092,7 +44187,7 @@
domElements[_key - 1] = arguments[_key];
}
- forEach$2(domElements).call(domElements, function (element) {
+ _forEachInstanceProperty(domElements).call(domElements, function (element) {
item.appendChild(element);
});
@@ -36113,7 +44208,7 @@
value: function _makeHeader(name) {
var div = document.createElement('div');
div.className = 'vis-configuration vis-config-header';
- div.innerHTML = name;
+ div.innerHTML = availableUtils.xss(name);
this._makeItem([], div);
}
@@ -36134,9 +44229,9 @@
div.className = 'vis-configuration vis-config-label vis-config-s' + path.length;
if (objectLabel === true) {
- div.innerHTML = '' + name + ':';
+ div.innerHTML = availableUtils.xss('' + name + ':');
} else {
- div.innerHTML = name + ':';
+ div.innerHTML = availableUtils.xss(name + ':');
}
return div;
@@ -36157,8 +44252,8 @@
var selectedValue = 0;
if (value !== undefined) {
- if (indexOf$3(arr).call(arr, value) !== -1) {
- selectedValue = indexOf$3(arr).call(arr, value);
+ if (_indexOfInstanceProperty(arr).call(arr, value) !== -1) {
+ selectedValue = _indexOfInstanceProperty(arr).call(arr, value);
}
}
@@ -36315,7 +44410,7 @@
var div = document.createElement("div");
div.id = "vis-configuration-popup";
div.className = "vis-configuration-popup";
- div.innerHTML = string;
+ div.innerHTML = availableUtils.xss(string);
div.onclick = function () {
_this2._removePopup();
@@ -36360,10 +44455,10 @@
this.popupDiv.html.style.top = rect.top - 30 + "px"; // 30 is the height;
document.body.appendChild(this.popupDiv.html);
- this.popupDiv.hideTimeout = setTimeout$2(function () {
+ this.popupDiv.hideTimeout = _setTimeout(function () {
_this3.popupDiv.html.style.opacity = 0;
}, 1500);
- this.popupDiv.deleteTimeout = setTimeout$2(function () {
+ this.popupDiv.deleteTimeout = _setTimeout(function () {
_this3._removePopup();
}, 1800);
}
@@ -36388,7 +44483,7 @@
checkbox.checked = value;
if (value !== defaultValue) {
- if (_typeof_1(defaultValue) === 'object') {
+ if (_typeof$1(defaultValue) === 'object') {
if (value !== defaultValue.enabled) {
this.changedOptions.push({
path: path,
@@ -36529,7 +44624,7 @@
var checkOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var show = false;
- var filter = filter$2(this.options);
+ var filter = _filterInstanceProperty(this.options);
var visibleInSet = false;
@@ -36537,13 +44632,13 @@
if (obj.hasOwnProperty(subObj)) {
show = true;
var item = obj[subObj];
- var newPath = util$1.copyAndExtendArray(path, subObj);
+ var newPath = availableUtils.copyAndExtendArray(path, subObj);
if (typeof filter === 'function') {
show = filter(subObj, path); // if needed we must go deeper into the object.
if (show === false) {
- if (!(item instanceof Array) && typeof item !== 'string' && typeof item !== 'boolean' && item instanceof Object) {
+ if (!_Array$isArray(item) && typeof item !== 'string' && typeof item !== 'boolean' && item instanceof Object) {
this.allowCreation = false;
show = this._handleObject(item, newPath, true);
this.allowCreation = checkOnly === false;
@@ -36556,7 +44651,7 @@
var value = this._getValue(newPath);
- if (item instanceof Array) {
+ if (_Array$isArray(item)) {
this._handleArray(item, value, newPath);
} else if (typeof item === 'string') {
this._makeTextInput(item, value, newPath);
@@ -36566,7 +44661,7 @@
// collapse the physics options that are not enabled
var draw = true;
- if (indexOf$3(path).call(path, 'physics') !== -1) {
+ if (_indexOfInstanceProperty(path).call(path, 'physics') !== -1) {
if (this.moduleOptions.physics.solver !== subObj) {
draw = false;
}
@@ -36575,7 +44670,7 @@
if (draw === true) {
// initially collapse options with an disabled enabled option.
if (item.enabled !== undefined) {
- var enabledPath = util$1.copyAndExtendArray(newPath, 'enabled');
+ var enabledPath = availableUtils.copyAndExtendArray(newPath, 'enabled');
var enabledValue = this._getValue(enabledPath);
@@ -36706,7 +44801,7 @@
key: "_printOptions",
value: function _printOptions() {
var options = this.getOptions();
- this.optionsContainer.innerHTML = 'var options = ' + stringify$2(options, null, 2) + '
';
+ this.optionsContainer.innerHTML = 'var options = ' + _JSON$stringify(options, null, 2) + '
';
}
/**
*
@@ -36729,13 +44824,18 @@
return Configurator;
}();
+ function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
+
+ function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/**
* Create a timeline visualization
* @extends Core
*/
var Timeline = /*#__PURE__*/function (_Core) {
- inherits(Timeline, _Core);
+ _inherits(Timeline, _Core);
+
+ var _super = _createSuper$1(Timeline);
/**
* @param {HTMLElement} container
@@ -36749,18 +44849,18 @@
var _this;
- classCallCheck(this, Timeline);
+ _classCallCheck(this, Timeline);
- _this = possibleConstructorReturn(this, getPrototypeOf$5(Timeline).call(this));
+ _this = _super.call(this);
_this.initTime = new Date();
_this.itemsDone = false;
- if (!(assertThisInitialized(_this) instanceof Timeline)) {
+ if (!(_assertThisInitialized(_this) instanceof Timeline)) {
throw new SyntaxError('Constructor must be called with the new operator');
} // if the third element is options, the forth is groups (optionally);
- if (!(isArray$5(groups) || groups instanceof DataSet || groups instanceof DataView) && groups instanceof Object) {
+ if (!(_Array$isArray(groups) || isDataViewLike(groups)) && groups instanceof Object) {
var forthArgument = options;
options = groups;
groups = forthArgument;
@@ -36772,7 +44872,7 @@
console.warn("Timeline option \"throttleRedraw\" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.");
}
- var me = assertThisInitialized(_this);
+ var me = _assertThisInitialized(_this);
_this.defaultOptions = {
autoResize: true,
@@ -36783,9 +44883,10 @@
item: 'bottom' // not relevant
},
- moment: moment$1
+ moment: moment$2
};
- _this.options = util$1.deepExtend({}, _this.defaultOptions); // Create the DOM, props, and emitter
+ _this.options = availableUtils.deepExtend({}, _this.defaultOptions);
+ options && availableUtils.setupXSSProtection(options.xss); // Create the DOM, props, and emitter
_this._create(container);
@@ -36828,7 +44929,7 @@
if (_this.options.loadingScreenTemplate) {
var _context;
- var templateFunction = bind$2(_context = _this.options.loadingScreenTemplate).call(_context, assertThisInitialized(_this));
+ var templateFunction = _bindInstanceProperty$1(_context = _this.options.loadingScreenTemplate).call(_context, _assertThisInitialized(_this));
var loadingScreen = templateFunction(_this.dom.loadingScreen);
@@ -36839,7 +44940,7 @@
loadingScreenFragment.innerHTML = '';
loadingScreenFragment.appendChild(loadingScreen);
} else if (loadingScreen != undefined) {
- loadingScreenFragment.innerHTML = loadingScreen;
+ loadingScreenFragment.innerHTML = availableUtils.xss(loadingScreen);
}
}
}
@@ -36852,9 +44953,9 @@
dom: _this.dom,
domProps: _this.props,
emitter: {
- on: bind$2(_context2 = _this.on).call(_context2, assertThisInitialized(_this)),
- off: bind$2(_context3 = _this.off).call(_context3, assertThisInitialized(_this)),
- emit: bind$2(_context4 = _this.emit).call(_context4, assertThisInitialized(_this))
+ on: _bindInstanceProperty$1(_context2 = _this.on).call(_context2, _assertThisInitialized(_this)),
+ off: _bindInstanceProperty$1(_context3 = _this.off).call(_context3, _assertThisInitialized(_this)),
+ emit: _bindInstanceProperty$1(_context4 = _this.emit).call(_context4, _assertThisInitialized(_this))
},
hiddenDates: [],
util: {
@@ -36864,11 +44965,11 @@
getStep: function getStep() {
return me.timeAxis.step.step;
},
- toScreen: bind$2(_context5 = me._toScreen).call(_context5, me),
- toGlobalScreen: bind$2(_context6 = me._toGlobalScreen).call(_context6, me),
+ toScreen: _bindInstanceProperty$1(_context5 = me._toScreen).call(_context5, me),
+ toGlobalScreen: _bindInstanceProperty$1(_context6 = me._toGlobalScreen).call(_context6, me),
// this refers to the root.width
- toTime: bind$2(_context7 = me._toTime).call(_context7, me),
- toGlobalTime: bind$2(_context8 = me._toGlobalTime).call(_context8, me)
+ toTime: _bindInstanceProperty$1(_context7 = me._toTime).call(_context7, me),
+ toGlobalTime: _bindInstanceProperty$1(_context8 = me._toGlobalTime).call(_context8, me)
}
}; // range
@@ -36897,45 +44998,53 @@
_this.groupsData = null; // DataSet
+ function emit(eventName, event) {
+ if (!me.hasListeners(eventName)) {
+ return;
+ }
+
+ me.emit(eventName, me.getEventProperties(event));
+ }
+
_this.dom.root.onclick = function (event) {
- me.emit('click', me.getEventProperties(event));
+ emit('click', event);
};
_this.dom.root.ondblclick = function (event) {
- me.emit('doubleClick', me.getEventProperties(event));
+ emit('doubleClick', event);
};
_this.dom.root.oncontextmenu = function (event) {
- me.emit('contextmenu', me.getEventProperties(event));
+ emit('contextmenu', event);
};
_this.dom.root.onmouseover = function (event) {
- me.emit('mouseOver', me.getEventProperties(event));
+ emit('mouseOver', event);
};
if (window.PointerEvent) {
_this.dom.root.onpointerdown = function (event) {
- me.emit('mouseDown', me.getEventProperties(event));
+ emit('mouseDown', event);
};
_this.dom.root.onpointermove = function (event) {
- me.emit('mouseMove', me.getEventProperties(event));
+ emit('mouseMove', event);
};
_this.dom.root.onpointerup = function (event) {
- me.emit('mouseUp', me.getEventProperties(event));
+ emit('mouseUp', event);
};
} else {
_this.dom.root.onmousemove = function (event) {
- me.emit('mouseMove', me.getEventProperties(event));
+ emit('mouseMove', event);
};
_this.dom.root.onmousedown = function (event) {
- me.emit('mouseDown', me.getEventProperties(event));
+ emit('mouseDown', event);
};
_this.dom.root.onmouseup = function (event) {
- me.emit('mouseUp', me.getEventProperties(event));
+ emit('mouseUp', event);
};
} //Single time autoscale/fit
@@ -36972,7 +45081,7 @@
me.dom.loadingScreen.parentNode.removeChild(me.dom.loadingScreen);
if (me.options.onInitialDrawComplete) {
- setTimeout$2(function () {
+ _setTimeout(function () {
return me.options.onInitialDrawComplete();
}, 0);
}
@@ -37016,10 +45125,10 @@
*/
- createClass(Timeline, [{
+ _createClass(Timeline, [{
key: "_createConfigurator",
value: function _createConfigurator() {
- return new Configurator(this, this.dom.container, configureOptions);
+ return new Configurator(this, this.dom.container, configureOptions$1);
}
/**
* Force a redraw. The size of all items will be recalculated.
@@ -37086,7 +45195,7 @@
if (!items) {
newDataSet = null;
- } else if (items instanceof DataSet || items instanceof DataView) {
+ } else if (isDataViewLike(items)) {
newDataSet = typeCoerceDataSet(items);
} else {
// turn an array into a dataset
@@ -37113,21 +45222,18 @@
// convert to type DataSet when needed
var newDataSet;
+ var filter = function filter(group) {
+ return group.visible !== false;
+ };
+
if (!groups) {
newDataSet = null;
} else {
- var filter = function filter(group) {
- return group.visible !== false;
- };
-
- if (groups instanceof DataSet || groups instanceof DataView) {
- newDataSet = new DataView(groups, {
- filter: filter
- });
- } else {
- // turn an array into a dataset
- newDataSet = new DataSet(filter$2(groups).call(groups, filter));
- }
+ // If groups is array, turn to DataSet & build dataview from that
+ if (_Array$isArray(groups)) groups = new DataSet(groups);
+ newDataSet = new DataView(groups, {
+ filter: filter
+ });
} // This looks weird but it's necessary to prevent memory leaks.
//
// The problem is that the DataView will exist as long as the DataSet it's
@@ -37141,7 +45247,7 @@
// future it will be necessary to rework this!!!!
- if (this.groupsData instanceof DataView) {
+ if (this.groupsData != null && typeof this.groupsData.setData === "function") {
this.groupsData.setData(null);
}
@@ -37221,14 +45327,14 @@
key: "focus",
value: function focus(id, options) {
if (!this.itemsData || id == undefined) return;
- var ids = isArray$5(id) ? id : [id]; // get the specified item(s)
+ var ids = _Array$isArray(id) ? id : [id]; // get the specified item(s)
var itemsData = this.itemsData.get(ids); // calculate minimum start and maximum end of specified items
var start = null;
var end = null;
- forEach$2(itemsData).call(itemsData, function (itemData) {
+ _forEachInstanceProperty(itemsData).call(itemsData, function (itemData) {
var s = itemData.start.valueOf();
var e = 'end' in itemData ? itemData.end.valueOf() : itemData.start.valueOf();
@@ -37293,9 +45399,9 @@
var finalVerticalCallback = function finalVerticalCallback() {
// Double check we ended at the proper scroll position
- setFinalVerticalPosition(); // Let the redraw settle and finalize the position.
+ setFinalVerticalPosition(); // Let the redraw settle and finalize the position.
- setTimeout$2(setFinalVerticalPosition, 100);
+ _setTimeout(setFinalVerticalPosition, 100);
}; // calculate the new middle and interval for the window
@@ -37380,7 +45486,7 @@
var redrawQueue = {};
var redrawQueueLength = 0; // collect redraw functions
- forEach$2(util$1).call(util$1, this.itemSet.items, function (item, key) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.itemSet.items, function (item, key) {
if (item.groupShowing) {
var returnQueue = true;
redrawQueue[key] = item.redraw(returnQueue);
@@ -37392,7 +45498,7 @@
if (needRedraw) {
var _loop = function _loop(i) {
- forEach$2(util$1).call(util$1, redrawQueue, function (fns) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, redrawQueue, function (fns) {
fns[i]();
});
};
@@ -37404,7 +45510,7 @@
} // calculate the date of the left side and right side of the items given
- forEach$2(util$1).call(util$1, this.itemSet.items, function (item) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.itemSet.items, function (item) {
var start = getStart(item);
var end = getEnd(item);
var startSide;
@@ -37467,9 +45573,9 @@
if (this.itemsData) {
var _context9;
- forEach$2(_context9 = this.itemsData).call(_context9, function (item) {
- var start = util$1.convert(item.start, 'Date').valueOf();
- var end = util$1.convert(item.end != undefined ? item.end : item.start, 'Date').valueOf();
+ _forEachInstanceProperty(_context9 = this.itemsData).call(_context9, function (item) {
+ var start = availableUtils.convert(item.start, 'Date').valueOf();
+ var end = availableUtils.convert(item.end != undefined ? item.end : item.start, 'Date').valueOf();
if (min === null || start < min) {
min = start;
@@ -37511,22 +45617,22 @@
var time = this._toTime(x);
var snappedTime = snap ? snap(time, scale, step) : time;
- var element = util$1.getTarget(event);
+ var element = availableUtils.getTarget(event);
var what = null;
if (item != null) {
what = 'item';
} else if (customTime != null) {
what = 'custom-time';
- } else if (util$1.hasParent(element, this.timeAxis.dom.foreground)) {
+ } else if (availableUtils.hasParent(element, this.timeAxis.dom.foreground)) {
what = 'axis';
- } else if (this.timeAxis2 && util$1.hasParent(element, this.timeAxis2.dom.foreground)) {
+ } else if (this.timeAxis2 && availableUtils.hasParent(element, this.timeAxis2.dom.foreground)) {
what = 'axis';
- } else if (util$1.hasParent(element, this.itemSet.dom.labelSet)) {
+ } else if (availableUtils.hasParent(element, this.itemSet.dom.labelSet)) {
what = 'group-label';
- } else if (util$1.hasParent(element, this.currentTime.bar)) {
+ } else if (availableUtils.hasParent(element, this.currentTime.bar)) {
what = 'current-time';
- } else if (util$1.hasParent(element, this.dom.center)) {
+ } else if (availableUtils.hasParent(element, this.dom.center)) {
what = 'background';
}
@@ -37602,7 +45708,7 @@
}(Core);
function getStart(item) {
- return util$1.convert(item.data.start, 'Date').valueOf();
+ return availableUtils.convert(item.data.start, 'Date').valueOf();
}
/**
*
@@ -37613,7 +45719,7 @@
function getEnd(item) {
var end = item.data.end != undefined ? item.data.end : item.data.start;
- return util$1.convert(end, 'Date').valueOf();
+ return availableUtils.convert(end, 'Date').valueOf();
}
/**
* @param {vis.Timeline} timeline
@@ -37683,7 +45789,7 @@
var zeroAlign = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
var formattingFunction = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;
- classCallCheck(this, DataScale);
+ _classCallCheck(this, DataScale);
this.majorSteps = [1, 2, 5, 10];
this.minorSteps = [0.25, 0.5, 1, 2];
@@ -37733,7 +45839,7 @@
*/
- createClass(DataScale, [{
+ _createClass(DataScale, [{
key: "setCharHeight",
value: function setCharHeight(majorCharHeight) {
this.majorCharHeight = majorCharHeight;
@@ -37995,13 +46101,24 @@
return DataScale;
}();
- var css_248z$e = "\n.vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal {\n position: absolute;\n width: 100%;\n height: 0;\n border-bottom: 1px solid;\n}\n\n.vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor {\n border-color: #e5e5e5;\n}\n\n.vis-panel.vis-background.vis-horizontal .vis-grid.vis-major {\n border-color: #bfbfbf;\n}\n\n\n.vis-data-axis .vis-y-axis.vis-major {\n width: 100%;\n position: absolute;\n color: #4d4d4d;\n white-space: nowrap;\n}\n\n.vis-data-axis .vis-y-axis.vis-major.vis-measure {\n padding: 0;\n margin: 0;\n border: 0;\n visibility: hidden;\n width: auto;\n}\n\n\n.vis-data-axis .vis-y-axis.vis-minor {\n position: absolute;\n width: 100%;\n color: #bebebe;\n white-space: nowrap;\n}\n\n.vis-data-axis .vis-y-axis.vis-minor.vis-measure {\n padding: 0;\n margin: 0;\n border: 0;\n visibility: hidden;\n width: auto;\n}\n\n.vis-data-axis .vis-y-axis.vis-title {\n position: absolute;\n color: #4d4d4d;\n white-space: nowrap;\n bottom: 20px;\n text-align: center;\n}\n\n.vis-data-axis .vis-y-axis.vis-title.vis-measure {\n padding: 0;\n margin: 0;\n visibility: hidden;\n width: auto;\n}\n\n.vis-data-axis .vis-y-axis.vis-title.vis-left {\n bottom: 0;\n -webkit-transform-origin: left top;\n -moz-transform-origin: left top;\n -ms-transform-origin: left top;\n -o-transform-origin: left top;\n transform-origin: left bottom;\n -webkit-transform: rotate(-90deg);\n -moz-transform: rotate(-90deg);\n -ms-transform: rotate(-90deg);\n -o-transform: rotate(-90deg);\n transform: rotate(-90deg);\n}\n\n.vis-data-axis .vis-y-axis.vis-title.vis-right {\n bottom: 0;\n -webkit-transform-origin: right bottom;\n -moz-transform-origin: right bottom;\n -ms-transform-origin: right bottom;\n -o-transform-origin: right bottom;\n transform-origin: right bottom;\n -webkit-transform: rotate(90deg);\n -moz-transform: rotate(90deg);\n -ms-transform: rotate(90deg);\n -o-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.vis-legend {\n background-color: rgba(247, 252, 255, 0.65);\n padding: 5px;\n border: 1px solid #b3b3b3;\n box-shadow: 2px 2px 10px rgba(154, 154, 154, 0.55);\n}\n\n.vis-leg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sIDE1NCwgMC41NSk7XG59XG5cbi52aXMtbGVnZW5kLXRleHQge1xuICAvKmZvbnQtc2l6ZTogMTBweDsqL1xuICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICBkaXNwbGF5OiBpbmxpbmUtYmxvY2tcbn0iXX0= */";
- styleInject(css_248z$e);
+ var css_248z = "\n.vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal {\n position: absolute;\n width: 100%;\n height: 0;\n border-bottom: 1px solid;\n}\n\n.vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor {\n border-color: #e5e5e5;\n}\n\n.vis-panel.vis-background.vis-horizontal .vis-grid.vis-major {\n border-color: #bfbfbf;\n}\n\n\n.vis-data-axis .vis-y-axis.vis-major {\n width: 100%;\n position: absolute;\n color: #4d4d4d;\n white-space: nowrap;\n}\n\n.vis-data-axis .vis-y-axis.vis-major.vis-measure {\n padding: 0;\n margin: 0;\n border: 0;\n visibility: hidden;\n width: auto;\n}\n\n\n.vis-data-axis .vis-y-axis.vis-minor {\n position: absolute;\n width: 100%;\n color: #bebebe;\n white-space: nowrap;\n}\n\n.vis-data-axis .vis-y-axis.vis-minor.vis-measure {\n padding: 0;\n margin: 0;\n border: 0;\n visibility: hidden;\n width: auto;\n}\n\n.vis-data-axis .vis-y-axis.vis-title {\n position: absolute;\n color: #4d4d4d;\n white-space: nowrap;\n bottom: 20px;\n text-align: center;\n}\n\n.vis-data-axis .vis-y-axis.vis-title.vis-measure {\n padding: 0;\n margin: 0;\n visibility: hidden;\n width: auto;\n}\n\n.vis-data-axis .vis-y-axis.vis-title.vis-left {\n bottom: 0;\n -webkit-transform-origin: left top;\n -moz-transform-origin: left top;\n -ms-transform-origin: left top;\n -o-transform-origin: left top;\n transform-origin: left bottom;\n -webkit-transform: rotate(-90deg);\n -moz-transform: rotate(-90deg);\n -ms-transform: rotate(-90deg);\n -o-transform: rotate(-90deg);\n transform: rotate(-90deg);\n}\n\n.vis-data-axis .vis-y-axis.vis-title.vis-right {\n bottom: 0;\n -webkit-transform-origin: right bottom;\n -moz-transform-origin: right bottom;\n -ms-transform-origin: right bottom;\n -o-transform-origin: right bottom;\n transform-origin: right bottom;\n -webkit-transform: rotate(90deg);\n -moz-transform: rotate(90deg);\n -ms-transform: rotate(90deg);\n -o-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.vis-legend {\n background-color: rgba(247, 252, 255, 0.65);\n padding: 5px;\n border: 1px solid #b3b3b3;\n box-shadow: 2px 2px 10px rgba(154, 154, 154, 0.55);\n}\n\n.vis-legend-text {\n /*font-size: 10px;*/\n white-space: nowrap;\n display: inline-block\n}";
+ styleInject(css_248z);
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
+
+ function _unsupportedIterableToArray(o, minLen) { var _context; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context = Object.prototype.toString.call(o)).call(_context, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from$1(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
+
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
+
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
+
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/** A horizontal time axis */
var DataAxis = /*#__PURE__*/function (_Component) {
- inherits(DataAxis, _Component);
+ _inherits(DataAxis, _Component);
+
+ var _super = _createSuper(DataAxis);
/**
* @param {Object} body
@@ -38015,10 +46132,10 @@
function DataAxis(body, options, svg, linegraphOptions) {
var _this;
- classCallCheck(this, DataAxis);
+ _classCallCheck(this, DataAxis);
- _this = possibleConstructorReturn(this, getPrototypeOf$5(DataAxis).call(this));
- _this.id = v4$1();
+ _this = _super.call(this);
+ _this.id = v4();
_this.body = body;
_this.defaultOptions = {
orientation: 'left',
@@ -38041,7 +46158,7 @@
max: undefined
},
format: function format(value) {
- return "".concat(_parseFloat$2(value.toPrecision(3)));
+ return "".concat(_parseFloat(value.toPrecision(3)));
},
title: {
text: undefined,
@@ -38054,7 +46171,7 @@
max: undefined
},
format: function format(value) {
- return "".concat(_parseFloat$2(value.toPrecision(3)));
+ return "".concat(_parseFloat(value.toPrecision(3)));
},
title: {
text: undefined,
@@ -38077,7 +46194,7 @@
start: 0,
end: 0
};
- _this.options = util$1.extend({}, _this.defaultOptions);
+ _this.options = availableUtils.extend({}, _this.defaultOptions);
_this.conversionFactor = 1;
_this.setOptions(options);
@@ -38110,7 +46227,7 @@
groups: _this.groups
};
- var me = assertThisInitialized(_this);
+ var me = _assertThisInitialized(_this);
_this.body.emitter.on("verticalDrag", function () {
me.dom.lineContainer.style.top = "".concat(me.body.domProps.scrollTop, "px");
@@ -38125,7 +46242,7 @@
*/
- createClass(DataAxis, [{
+ _createClass(DataAxis, [{
key: "addGroup",
value: function addGroup(label, graphOptions) {
if (!this.groups.hasOwnProperty(label)) {
@@ -38178,7 +46295,7 @@
}
var fields = ['orientation', 'showMinorLabels', 'showMajorLabels', 'icons', 'majorLinesOffset', 'minorLinesOffset', 'labelOffsetX', 'labelOffsetY', 'iconWidth', 'width', 'visible', 'left', 'right', 'alignZeros'];
- util$1.selectiveDeepExtend(fields, this.options, options);
+ availableUtils.selectiveDeepExtend(fields, this.options, options);
this.minWidth = Number("".concat(this.options.width).replace("px", ""));
if (redraw === true && this.dom.frame) {
@@ -38232,18 +46349,17 @@
x = this.width - iconWidth - iconOffset;
}
- var groupArray = keys$3(this.groups);
+ var groupArray = _Object$keys(this.groups);
- sort$2(groupArray).call(groupArray, function (a, b) {
+ _sortInstanceProperty(groupArray).call(groupArray, function (a, b) {
return a < b ? -1 : 1;
});
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
+ var _iterator = _createForOfIteratorHelper(groupArray),
+ _step;
try {
- for (var _iterator = getIterator$1(groupArray), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
var groupId = _step.value;
if (this.groups[groupId].visible === true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] === true)) {
@@ -38252,18 +46368,9 @@
}
}
} catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
+ _iterator.e(err);
} finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
- }
+ _iterator.f();
}
cleanupElements(this.svgElements);
@@ -38458,7 +46565,7 @@
this.maxLabelSize = 0;
var lines = this.scale.getLines();
- forEach$2(lines).call(lines, function (line) {
+ _forEachInstanceProperty(lines).call(lines, function (line) {
var y = line.y;
var isMajor = line.major;
@@ -38499,17 +46606,17 @@
resized = true;
} // this will resize the yAxis if it is too big for the labels.
else if (this.maxLabelSize < this.width - offset && this.options.visible === true && this.width > this.minWidth) {
- this.width = Math.max(this.minWidth, this.maxLabelSize + offset);
- this.options.width = "".concat(this.width, "px");
- cleanupElements(this.DOMelements.lines);
- cleanupElements(this.DOMelements.labels);
- this.redraw();
- resized = true;
- } else {
- cleanupElements(this.DOMelements.lines);
- cleanupElements(this.DOMelements.labels);
- resized = false;
- }
+ this.width = Math.max(this.minWidth, this.maxLabelSize + offset);
+ this.options.width = "".concat(this.width, "px");
+ cleanupElements(this.DOMelements.lines);
+ cleanupElements(this.DOMelements.labels);
+ this.redraw();
+ resized = true;
+ } else {
+ cleanupElements(this.DOMelements.lines);
+ cleanupElements(this.DOMelements.labels);
+ resized = false;
+ }
return resized;
}
@@ -38553,7 +46660,7 @@
var label = getDOMElement('div', this.DOMelements.labels, this.dom.frame); //this.dom.redundant.labels.shift();
label.className = className;
- label.innerHTML = text;
+ label.innerHTML = availableUtils.xss(text);
if (orientation === 'left') {
label.style.left = "-".concat(this.options.labelOffsetX, "px");
@@ -38613,10 +46720,10 @@
if (this.options[orientation].title !== undefined && this.options[orientation].title.text !== undefined) {
var title = getDOMElement('div', this.DOMelements.title, this.dom.frame);
title.className = "vis-y-axis vis-title vis-".concat(orientation);
- title.innerHTML = this.options[orientation].title.text; // Add style - if provided
+ title.innerHTML = availableUtils.xss(this.options[orientation].title.text); // Add style - if provided
if (this.options[orientation].title.style !== undefined) {
- util$1.addCssText(title, this.options[orientation].title.style);
+ availableUtils.addCssText(title, this.options[orientation].title.style);
}
if (orientation === 'left') {
@@ -38687,8 +46794,8 @@
* @constructor Points
*/
- function Points(groupId, options) {} // eslint-disable-line no-unused-vars
-
+ function Points(groupId, options) {// eslint-disable-line no-unused-vars
+ }
/**
* draw the data points
*
@@ -38710,7 +46817,7 @@
} else {
var callbackResult = callback(dataset[i], group); // result might be true, false or an object
- if (callbackResult === true || _typeof_1(callbackResult) === 'object') {
+ if (callbackResult === true || _typeof$1(callbackResult) === 'object') {
drawPoint(dataset[i].screen_x + offset, dataset[i].screen_y, getGroupTemplate(group, callbackResult), framework.svgElements, framework.svg, dataset[i].label);
}
}
@@ -38851,7 +46958,7 @@
} // sort by time and by group
- sort$2(combinedData).call(combinedData, function (a, b) {
+ _sortInstanceProperty(combinedData).call(combinedData, function (a, b) {
if (a.screen_x === b.screen_x) {
return a.groupId < b.groupId ? -1 : 1;
} else {
@@ -39003,7 +47110,7 @@
Bargraph.getStackedYRange = function (combinedData, groupRanges, groupIds, groupLabel, orientation) {
if (combinedData.length > 0) {
// sort by time and by group
- sort$2(combinedData).call(combinedData, function (a, b) {
+ _sortInstanceProperty(combinedData).call(combinedData, function (a, b) {
if (a.screen_x === b.screen_x) {
return a.groupId < b.groupId ? -1 : 1;
} else {
@@ -39376,7 +47483,7 @@
function GraphGroup(group, groupId, options, groupsUsingDefaultStyles) {
this.id = groupId;
var fields = ['sampling', 'style', 'sort', 'yAxisOrientation', 'barChart', 'drawPoints', 'shaded', 'interpolation', 'zIndex', 'excludeFromStacking', 'excludeFromLegend'];
- this.options = util$1.selectiveBridgeObject(fields, options);
+ this.options = availableUtils.selectiveBridgeObject(fields, options);
this.usingDefaultStyle = group.className === undefined;
this.groupsUsingDefaultStyles = groupsUsingDefaultStyles;
this.zeroPosition = 0;
@@ -39399,8 +47506,8 @@
if (items != null) {
this.itemsData = items;
- if (sort$2(this.options) == true) {
- util$1.insertSort(this.itemsData, function (a, b) {
+ if (_sortInstanceProperty(this.options) == true) {
+ availableUtils.insertSort(this.itemsData, function (a, b) {
return a.x > b.x ? 1 : -1;
});
}
@@ -39430,7 +47537,7 @@
GraphGroup.prototype.setOptions = function (options) {
if (options !== undefined) {
var fields = ['sampling', 'style', 'sort', 'yAxisOrientation', 'barChart', 'zIndex', 'excludeFromStacking', 'excludeFromLegend'];
- util$1.selectiveDeepExtend(fields, this.options, options); // if the group's drawPoints is a function delegate the callback to the onRender property
+ availableUtils.selectiveDeepExtend(fields, this.options, options); // if the group's drawPoints is a function delegate the callback to the onRender property
if (typeof options.drawPoints == 'function') {
options.drawPoints = {
@@ -39438,12 +47545,12 @@
};
}
- util$1.mergeOptions(this.options, options, 'interpolation');
- util$1.mergeOptions(this.options, options, 'drawPoints');
- util$1.mergeOptions(this.options, options, 'shaded');
+ availableUtils.mergeOptions(this.options, options, 'interpolation');
+ availableUtils.mergeOptions(this.options, options, 'drawPoints');
+ availableUtils.mergeOptions(this.options, options, 'shaded');
if (options.interpolation) {
- if (_typeof_1(options.interpolation) == 'object') {
+ if (_typeof$1(options.interpolation) == 'object') {
if (options.interpolation.parametrization) {
if (options.interpolation.parametrization == 'uniform') {
this.options.interpolation.alpha = 0;
@@ -39572,7 +47679,7 @@
}
};
this.side = side;
- this.options = util$1.extend({}, this.defaultOptions);
+ this.options = availableUtils.extend({}, this.defaultOptions);
this.linegraphOptions = linegraphOptions;
this.svgElements = {};
this.dom = {};
@@ -39662,15 +47769,15 @@
Legend.prototype.setOptions = function (options) {
var fields = ['enabled', 'orientation', 'icons', 'left', 'right'];
- util$1.selectiveDeepExtend(fields, this.options, options);
+ availableUtils.selectiveDeepExtend(fields, this.options, options);
};
Legend.prototype.redraw = function () {
var activeGroups = 0;
- var groupArray = keys$3(this.groups);
+ var groupArray = _Object$keys(this.groups);
- sort$2(groupArray).call(groupArray, function (a, b) {
+ _sortInstanceProperty(groupArray).call(groupArray, function (a, b) {
return a < b ? -1 : 1;
});
@@ -39734,16 +47841,16 @@
}
}
- this.dom.textArea.innerHTML = content;
+ this.dom.textArea.innerHTML = availableUtils.xss(content);
this.dom.textArea.style.lineHeight = 0.75 * this.options.iconSize + this.options.iconSpacing + 'px';
}
};
Legend.prototype.drawLegendIcons = function () {
if (this.dom.frame.parentNode) {
- var groupArray = keys$3(this.groups);
+ var groupArray = _Object$keys(this.groups);
- sort$2(groupArray).call(groupArray, function (a, b) {
+ _sortInstanceProperty(groupArray).call(groupArray, function (a, b) {
return a < b ? -1 : 1;
}); // this resets the elements so the order is maintained
@@ -39768,7 +47875,7 @@
}
};
- var UNGROUPED$3 = '__ungrouped__'; // reserved group id for ungrouped items
+ var UNGROUPED = '__ungrouped__'; // reserved group id for ungrouped items
/**
* This is the constructor of the LineGraph. It requires a Timeline body and options.
@@ -39780,7 +47887,7 @@
*/
function LineGraph(body, options) {
- this.id = v4$1();
+ this.id = v4();
this.body = body;
this.defaultOptions = {
yAxisOrientation: 'left',
@@ -39823,7 +47930,7 @@
}
}; // options is shared by this lineGraph and all its items
- this.options = util$1.extend({}, this.defaultOptions);
+ this.options = availableUtils.extend({}, this.defaultOptions);
this.dom = {};
this.props = {};
this.hammer = null;
@@ -39878,8 +47985,7 @@
this.setOptions(options);
this.groupsUsingDefaultStyles = [0];
this.body.emitter.on('rangechanged', function () {
- me.lastStart = me.body.range.start;
- me.svg.style.left = util$1.option.asSize(-me.props.width);
+ me.svg.style.left = availableUtils.option.asSize(-me.props.width);
me.forceGraphUpdate = true; //Is this local redraw necessary? (Core also does a change event!)
me.redraw.call(me);
@@ -39935,19 +48041,19 @@
this.updateSVGheight = true;
this.updateSVGheightOnResize = true;
} else if (this.body.domProps.centerContainer.height !== undefined && options.graphHeight !== undefined) {
- if (_parseInt$2((options.graphHeight + '').replace("px", '')) < this.body.domProps.centerContainer.height) {
+ if (_parseInt((options.graphHeight + '').replace("px", '')) < this.body.domProps.centerContainer.height) {
this.updateSVGheight = true;
}
}
- util$1.selectiveDeepExtend(fields, this.options, options);
- util$1.mergeOptions(this.options, options, 'interpolation');
- util$1.mergeOptions(this.options, options, 'drawPoints');
- util$1.mergeOptions(this.options, options, 'shaded');
- util$1.mergeOptions(this.options, options, 'legend');
+ availableUtils.selectiveDeepExtend(fields, this.options, options);
+ availableUtils.mergeOptions(this.options, options, 'interpolation');
+ availableUtils.mergeOptions(this.options, options, 'drawPoints');
+ availableUtils.mergeOptions(this.options, options, 'shaded');
+ availableUtils.mergeOptions(this.options, options, 'legend');
if (options.interpolation) {
- if (_typeof_1(options.interpolation) == 'object') {
+ if (_typeof$1(options.interpolation) == 'object') {
if (options.interpolation.parametrization) {
if (options.interpolation.parametrization == 'uniform') {
this.options.interpolation.alpha = 0;
@@ -39975,8 +48081,8 @@
}
}
- if (this.groups.hasOwnProperty(UNGROUPED$3)) {
- this.groups[UNGROUPED$3].setOptions(options);
+ if (this.groups.hasOwnProperty(UNGROUPED)) {
+ this.groups[UNGROUPED].setOptions(options);
}
} // this is used to redraw the graph if the visibility of the groups is changed.
@@ -40024,15 +48130,15 @@
if (!items) {
this.itemsData = null;
- } else if (items instanceof DataSet || items instanceof DataView) {
+ } else if (isDataViewLike(items)) {
this.itemsData = typeCoerceDataSet(items);
} else {
- throw new TypeError('Data must be an instance of DataSet or DataView');
+ throw new TypeError('Data must implement the interface of DataSet or DataView');
}
if (oldItemsData) {
// unsubscribe from old dataset
- forEach$2(util$1).call(util$1, this.itemListeners, function (callback, event) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.itemListeners, function (callback, event) {
oldItemsData.off(event, callback);
}); // stop maintaining a coerced version of the old data set
@@ -40048,7 +48154,7 @@
// subscribe to new dataset
var id = this.id;
- forEach$2(util$1).call(util$1, this.itemListeners, function (callback, event) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.itemListeners, function (callback, event) {
me.itemsData.on(event, callback, id);
}); // add all new items
@@ -40069,7 +48175,7 @@
var ids; // unsubscribe from current dataset
if (this.groupsData) {
- forEach$2(util$1).call(util$1, this.groupListeners, function (callback, event) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.groupListeners, function (callback, event) {
me.groupsData.off(event, callback);
}); // remove all drawn groups
@@ -40085,17 +48191,17 @@
if (!groups) {
this.groupsData = null;
- } else if (groups instanceof DataSet || groups instanceof DataView) {
+ } else if (isDataViewLike(groups)) {
this.groupsData = groups;
} else {
- throw new TypeError('Data must be an instance of DataSet or DataView');
+ throw new TypeError('Data must implement the interface of DataSet or DataView');
}
if (this.groupsData) {
// subscribe to new dataset
var id = this.id;
- forEach$2(util$1).call(util$1, this.groupListeners, function (callback, event) {
+ _forEachInstanceProperty(availableUtils).call(availableUtils, this.groupListeners, function (callback, event) {
me.groupsData.on(event, callback, id);
}); // draw all ms
@@ -40222,7 +48328,7 @@
var idMap = {};
if (ids) {
- map$2(ids).call(ids, function (id) {
+ _mapInstanceProperty(ids).call(ids, function (id) {
idMap[id] = id;
});
} //pre-Determine array sizes, for more efficient memory claim
@@ -40235,7 +48341,7 @@
var groupId = item.group;
if (groupId === null || groupId === undefined) {
- groupId = UNGROUPED$3;
+ groupId = UNGROUPED;
}
groupCounts.hasOwnProperty(groupId) ? groupCounts[groupId]++ : groupCounts[groupId] = 1;
@@ -40249,7 +48355,7 @@
if (this.groups.hasOwnProperty(groupId)) {
group = this.groups[groupId];
var existing_items = group.getItems();
- groupsContent[groupId] = filter$2(existing_items).call(existing_items, function (item) {
+ groupsContent[groupId] = _filterInstanceProperty(existing_items).call(existing_items, function (item) {
existingItemsMap[item[fieldId]] = item[fieldId];
return item[fieldId] !== idMap[item[fieldId]];
});
@@ -40269,7 +48375,7 @@
groupId = item.group;
if (groupId === null || groupId === undefined) {
- groupId = UNGROUPED$3;
+ groupId = UNGROUPED;
}
if (!groupIds && ids && item[fieldId] !== idMap[item[fieldId]] && existingItemsMap.hasOwnProperty(item[fieldId])) {
@@ -40281,9 +48387,9 @@
} //Copy data (because of unmodifiable DataView input.
- var extended = util$1.bridgeObject(item);
- extended.x = util$1.convert(item.x, 'Date');
- extended.end = util$1.convert(item.end, 'Date');
+ var extended = availableUtils.bridgeObject(item);
+ extended.x = availableUtils.convert(item.x, 'Date');
+ extended.end = availableUtils.convert(item.end, 'Date');
extended.orginalY = item.y; //real Y
extended.y = Number(item.y);
@@ -40357,10 +48463,10 @@
if (resized == true) {
var _context;
- this.svg.style.width = util$1.option.asSize(3 * this.props.width);
- this.svg.style.left = util$1.option.asSize(-this.props.width); // if the height of the graph is set as proportional, change the height of the svg
+ this.svg.style.width = availableUtils.option.asSize(3 * this.props.width);
+ this.svg.style.left = availableUtils.option.asSize(-this.props.width); // if the height of the graph is set as proportional, change the height of the svg
- if (indexOf$3(_context = this.options.height + '').call(_context, "%") != -1 || this.updateSVGheightOnResize == true) {
+ if (_indexOfInstanceProperty(_context = this.options.height + '').call(_context, "%") != -1 || this.updateSVGheightOnResize == true) {
this.updateSVGheight = true;
}
} // update the height of the graph on each redraw of the graph.
@@ -40381,6 +48487,8 @@
if (resized == true || zoomed == true || this.abortedGraphUpdate == true || this.forceGraphUpdate == true) {
resized = this._updateGraph() || resized;
this.forceGraphUpdate = false;
+ this.lastStart = this.body.range.start;
+ this.svg.style.left = -this.props.width + 'px';
} else {
// move the whole svg while dragging
if (this.lastStart != 0) {
@@ -40417,7 +48525,7 @@
}
}
- util$1.insertSort(grouplist, function (a, b) {
+ availableUtils.insertSort(grouplist, function (a, b) {
var az = a.zIndex;
var bz = b.zIndex;
if (az === undefined) az = 0;
@@ -40530,7 +48638,7 @@
if (group.options.shaded.orientation === "group") {
var subGroupId = group.options.shaded.groupId;
- if (indexOf$3(groupIds).call(groupIds, subGroupId) === -1) {
+ if (_indexOfInstanceProperty(groupIds).call(groupIds, subGroupId) === -1) {
console.log(group.id + ": Unknown shading group target given:" + subGroupId);
continue;
}
@@ -40652,13 +48760,13 @@
group = this.groups[groupIds[i]];
var itemsData = group.getItems(); // optimization for sorted data
- if (sort$2(group.options) == true) {
+ if (_sortInstanceProperty(group.options) == true) {
var dateComparator = function dateComparator(a, b) {
return a.getTime() == b.getTime() ? 0 : a < b ? -1 : 1;
};
- var first = Math.max(0, util$1.binarySearchValue(itemsData, minDate, 'x', 'before', dateComparator));
- var last = Math.min(itemsData.length, util$1.binarySearchValue(itemsData, maxDate, 'x', 'after', dateComparator) + 1);
+ var first = Math.max(0, availableUtils.binarySearchValue(itemsData, minDate, 'x', 'before', dateComparator));
+ var last = Math.min(itemsData.length, availableUtils.binarySearchValue(itemsData, maxDate, 'x', 'after', dateComparator) + 1);
if (last <= 0) {
last = itemsData.length;
@@ -40713,7 +48821,7 @@
sampledData[idx] = dataContainer[j];
}
- groupsData[groupIds[i]] = splice$2(sampledData).call(sampledData, 0, Math.round(amountOfPoints / increment));
+ groupsData[groupIds[i]] = _spliceInstanceProperty(sampledData).call(sampledData, 0, Math.round(amountOfPoints / increment));
}
}
}
@@ -40744,9 +48852,9 @@
if (options.stack === true && options.style === 'bar') {
if (options.yAxisOrientation === 'left') {
- combinedDataLeft = concat$2(combinedDataLeft).call(combinedDataLeft, groupData);
+ combinedDataLeft = _concatInstanceProperty(combinedDataLeft).call(combinedDataLeft, groupData);
} else {
- combinedDataRight = concat$2(combinedDataRight).call(combinedDataRight, groupData);
+ combinedDataRight = _concatInstanceProperty(combinedDataRight).call(combinedDataRight, groupData);
}
} else {
groupRanges[groupIds[i]] = group.getYRange(groupData, groupIds[i]);
@@ -40855,8 +48963,8 @@
var tempGroups = ['__barStackLeft', '__barStackRight', '__lineStackLeft', '__lineStackRight'];
for (i = 0; i < tempGroups.length; i++) {
- if (indexOf$3(groupIds).call(groupIds, tempGroups[i]) != -1) {
- splice$2(groupIds).call(groupIds, indexOf$3(groupIds).call(groupIds, tempGroups[i]), 1);
+ if (_indexOfInstanceProperty(groupIds).call(groupIds, tempGroups[i]) != -1) {
+ _spliceInstanceProperty(groupIds).call(groupIds, _indexOfInstanceProperty(groupIds).call(groupIds, tempGroups[i]), 1);
}
}
@@ -40946,72 +49054,72 @@
* __any__ means that the name of the property does not matter.
* __type__ is a required field for all objects and contains the allowed types of all objects
*/
- var string$1 = 'string';
- var bool$1 = 'boolean';
- var number$1 = 'number';
- var array$1 = 'array';
- var date$1 = 'date';
- var object$1 = 'object'; // should only be in a __type__ property
+ var string = 'string';
+ var bool = 'boolean';
+ var number = 'number';
+ var array = 'array';
+ var date = 'date';
+ var object = 'object'; // should only be in a __type__ property
- var dom$1 = 'dom';
- var moment$3 = 'moment';
- var any$1 = 'any';
- var allOptions$2 = {
+ var dom = 'dom';
+ var moment = 'moment';
+ var any = 'any';
+ var allOptions = {
configure: {
enabled: {
- 'boolean': bool$1
+ 'boolean': bool
},
filter: {
- 'boolean': bool$1,
+ 'boolean': bool,
'function': 'function'
},
container: {
- dom: dom$1
+ dom: dom
},
__type__: {
- object: object$1,
- 'boolean': bool$1,
+ object: object,
+ 'boolean': bool,
'function': 'function'
}
},
//globals :
alignCurrentTime: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
yAxisOrientation: {
string: ['left', 'right']
},
defaultGroup: {
- string: string$1
+ string: string
},
sort: {
- 'boolean': bool$1
+ 'boolean': bool
},
sampling: {
- 'boolean': bool$1
+ 'boolean': bool
},
stack: {
- 'boolean': bool$1
+ 'boolean': bool
},
graphHeight: {
- string: string$1,
- number: number$1
+ string: string,
+ number: number
},
shaded: {
enabled: {
- 'boolean': bool$1
+ 'boolean': bool
},
orientation: {
string: ['bottom', 'top', 'zero', 'group']
},
// top, bottom, zero, group
groupId: {
- object: object$1
+ object: object
},
__type__: {
- 'boolean': bool$1,
- object: object$1
+ 'boolean': bool,
+ object: object
}
},
style: {
@@ -41020,92 +49128,92 @@
// line, bar
barChart: {
width: {
- number: number$1
+ number: number
},
minWidth: {
- number: number$1
+ number: number
},
sideBySide: {
- 'boolean': bool$1
+ 'boolean': bool
},
align: {
string: ['left', 'center', 'right']
},
__type__: {
- object: object$1
+ object: object
}
},
interpolation: {
enabled: {
- 'boolean': bool$1
+ 'boolean': bool
},
parametrization: {
string: ['centripetal', 'chordal', 'uniform']
},
// uniform (alpha = 0.0), chordal (alpha = 1.0), centripetal (alpha = 0.5)
alpha: {
- number: number$1
+ number: number
},
__type__: {
- object: object$1,
- 'boolean': bool$1
+ object: object,
+ 'boolean': bool
}
},
drawPoints: {
enabled: {
- 'boolean': bool$1
+ 'boolean': bool
},
onRender: {
'function': 'function'
},
size: {
- number: number$1
+ number: number
},
style: {
string: ['square', 'circle']
},
// square, circle
__type__: {
- object: object$1,
- 'boolean': bool$1,
+ object: object,
+ 'boolean': bool,
'function': 'function'
}
},
dataAxis: {
showMinorLabels: {
- 'boolean': bool$1
+ 'boolean': bool
},
showMajorLabels: {
- 'boolean': bool$1
+ 'boolean': bool
},
showWeekScale: {
- 'boolean': bool$1
+ 'boolean': bool
},
icons: {
- 'boolean': bool$1
+ 'boolean': bool
},
width: {
- string: string$1,
- number: number$1
+ string: string,
+ number: number
},
visible: {
- 'boolean': bool$1
+ 'boolean': bool
},
alignZeros: {
- 'boolean': bool$1
+ 'boolean': bool
},
left: {
range: {
min: {
- number: number$1,
+ number: number,
'undefined': 'undefined'
},
max: {
- number: number$1,
+ number: number,
'undefined': 'undefined'
},
__type__: {
- object: object$1
+ object: object
}
},
format: {
@@ -41113,34 +49221,34 @@
},
title: {
text: {
- string: string$1,
- number: number$1,
+ string: string,
+ number: number,
'undefined': 'undefined'
},
style: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
__type__: {
- object: object$1
+ object: object
}
},
__type__: {
- object: object$1
+ object: object
}
},
right: {
range: {
min: {
- number: number$1,
+ number: number,
'undefined': 'undefined'
},
max: {
- number: number$1,
+ number: number,
'undefined': 'undefined'
},
__type__: {
- object: object$1
+ object: object
}
},
format: {
@@ -41148,305 +49256,309 @@
},
title: {
text: {
- string: string$1,
- number: number$1,
+ string: string,
+ number: number,
'undefined': 'undefined'
},
style: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
__type__: {
- object: object$1
+ object: object
}
},
__type__: {
- object: object$1
+ object: object
}
},
__type__: {
- object: object$1
+ object: object
}
},
legend: {
enabled: {
- 'boolean': bool$1
+ 'boolean': bool
},
icons: {
- 'boolean': bool$1
+ 'boolean': bool
},
left: {
visible: {
- 'boolean': bool$1
+ 'boolean': bool
},
position: {
string: ['top-right', 'bottom-right', 'top-left', 'bottom-left']
},
__type__: {
- object: object$1
+ object: object
}
},
right: {
visible: {
- 'boolean': bool$1
+ 'boolean': bool
},
position: {
string: ['top-right', 'bottom-right', 'top-left', 'bottom-left']
},
__type__: {
- object: object$1
+ object: object
}
},
__type__: {
- object: object$1,
- 'boolean': bool$1
+ object: object,
+ 'boolean': bool
}
},
groups: {
visibility: {
- any: any$1
+ any: any
},
__type__: {
- object: object$1
+ object: object
}
},
autoResize: {
- 'boolean': bool$1
+ 'boolean': bool
},
throttleRedraw: {
- number: number$1
+ number: number
},
// TODO: DEPRICATED see https://github.com/almende/vis/issues/2511
clickToUse: {
- 'boolean': bool$1
+ 'boolean': bool
},
end: {
- number: number$1,
- date: date$1,
- string: string$1,
- moment: moment$3
+ number: number,
+ date: date,
+ string: string,
+ moment: moment
},
format: {
minorLabels: {
millisecond: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
second: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
minute: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
hour: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
weekday: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
day: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
week: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
month: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
quarter: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
year: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
__type__: {
- object: object$1
+ object: object
}
},
majorLabels: {
millisecond: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
second: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
minute: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
hour: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
weekday: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
day: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
week: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
month: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
quarter: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
year: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
__type__: {
- object: object$1
+ object: object
}
},
__type__: {
- object: object$1
+ object: object
}
},
moment: {
'function': 'function'
},
height: {
- string: string$1,
- number: number$1
+ string: string,
+ number: number
},
hiddenDates: {
start: {
- date: date$1,
- number: number$1,
- string: string$1,
- moment: moment$3
+ date: date,
+ number: number,
+ string: string,
+ moment: moment
},
end: {
- date: date$1,
- number: number$1,
- string: string$1,
- moment: moment$3
+ date: date,
+ number: number,
+ string: string,
+ moment: moment
},
repeat: {
- string: string$1
+ string: string
},
__type__: {
- object: object$1,
- array: array$1
+ object: object,
+ array: array
}
},
locale: {
- string: string$1
+ string: string
},
locales: {
__any__: {
- any: any$1
+ any: any
},
__type__: {
- object: object$1
+ object: object
}
},
max: {
- date: date$1,
- number: number$1,
- string: string$1,
- moment: moment$3
+ date: date,
+ number: number,
+ string: string,
+ moment: moment
},
maxHeight: {
- number: number$1,
- string: string$1
+ number: number,
+ string: string
},
maxMinorChars: {
- number: number$1
+ number: number
},
min: {
- date: date$1,
- number: number$1,
- string: string$1,
- moment: moment$3
+ date: date,
+ number: number,
+ string: string,
+ moment: moment
},
minHeight: {
- number: number$1,
- string: string$1
+ number: number,
+ string: string
},
moveable: {
- 'boolean': bool$1
+ 'boolean': bool
},
multiselect: {
- 'boolean': bool$1
+ 'boolean': bool
},
orientation: {
- string: string$1
+ string: string
},
showCurrentTime: {
- 'boolean': bool$1
+ 'boolean': bool
},
showMajorLabels: {
- 'boolean': bool$1
+ 'boolean': bool
},
showMinorLabels: {
- 'boolean': bool$1
+ 'boolean': bool
},
showWeekScale: {
- 'boolean': bool$1
+ 'boolean': bool
+ },
+ snap: {
+ 'function': 'function',
+ 'null': 'null'
},
start: {
- date: date$1,
- number: number$1,
- string: string$1,
- moment: moment$3
+ date: date,
+ number: number,
+ string: string,
+ moment: moment
},
timeAxis: {
scale: {
- string: string$1,
+ string: string,
'undefined': 'undefined'
},
step: {
- number: number$1,
+ number: number,
'undefined': 'undefined'
},
__type__: {
- object: object$1
+ object: object
}
},
width: {
- string: string$1,
- number: number$1
+ string: string,
+ number: number
},
zoomable: {
- 'boolean': bool$1
+ 'boolean': bool
},
zoomKey: {
string: ['ctrlKey', 'altKey', 'metaKey', '']
},
zoomMax: {
- number: number$1
+ number: number
},
zoomMin: {
- number: number$1
+ number: number
},
zIndex: {
- number: number$1
+ number: number
},
__type__: {
- object: object$1
+ object: object
}
};
- var configureOptions$1 = {
+ var configureOptions = {
global: {
alignCurrentTime: ['none', 'year', 'month', 'quarter', 'week', 'isoWeek', 'day', 'date', 'hour', 'minute', 'second'],
//yAxisOrientation: ['left','right'], // TDOO: enable as soon as Grahp2d doesn't crash when changing this on the fly
@@ -41583,7 +49695,7 @@
var _context, _context2, _context3, _context4, _context5, _context6, _context7;
// if the third element is options, the forth is groups (optionally);
- if (!(isArray$5(groups) || groups instanceof DataSet || groups instanceof DataView) && groups instanceof Object) {
+ if (!(_Array$isArray(groups) || isDataViewLike(groups)) && groups instanceof Object) {
var forthArgument = options;
options = groups;
groups = forthArgument;
@@ -41606,13 +49718,13 @@
item: 'bottom' // not relevant for Graph2d
},
- moment: moment$1,
+ moment: moment$2,
width: null,
height: null,
maxHeight: null,
minHeight: null
};
- this.options = util$1.deepExtend({}, this.defaultOptions); // Create the DOM, props, and emitter
+ this.options = availableUtils.deepExtend({}, this.defaultOptions); // Create the DOM, props, and emitter
this._create(container); // all components listed here will be repainted automatically
@@ -41622,17 +49734,23 @@
dom: this.dom,
domProps: this.props,
emitter: {
- on: bind$2(_context = this.on).call(_context, this),
- off: bind$2(_context2 = this.off).call(_context2, this),
- emit: bind$2(_context3 = this.emit).call(_context3, this)
+ on: _bindInstanceProperty$1(_context = this.on).call(_context, this),
+ off: _bindInstanceProperty$1(_context2 = this.off).call(_context2, this),
+ emit: _bindInstanceProperty$1(_context3 = this.emit).call(_context3, this)
},
hiddenDates: [],
util: {
- toScreen: bind$2(_context4 = me._toScreen).call(_context4, me),
- toGlobalScreen: bind$2(_context5 = me._toGlobalScreen).call(_context5, me),
+ getScale: function getScale() {
+ return me.timeAxis.step.scale;
+ },
+ getStep: function getStep() {
+ return me.timeAxis.step.step;
+ },
+ toScreen: _bindInstanceProperty$1(_context4 = me._toScreen).call(_context4, me),
+ toGlobalScreen: _bindInstanceProperty$1(_context5 = me._toGlobalScreen).call(_context5, me),
// this refers to the root.width
- toTime: bind$2(_context6 = me._toTime).call(_context6, me),
- toGlobalTime: bind$2(_context7 = me._toGlobalTime).call(_context7, me)
+ toTime: _bindInstanceProperty$1(_context6 = me._toTime).call(_context6, me),
+ toGlobalTime: _bindInstanceProperty$1(_context7 = me._toGlobalTime).call(_context7, me)
}
}; // range
@@ -41695,7 +49813,7 @@
me.dom.loadingScreen.parentNode.removeChild(me.dom.loadingScreen);
if (me.options.onInitialDrawComplete) {
- setTimeout$2(function () {
+ _setTimeout(function () {
return me.options.onInitialDrawComplete();
}, 0);
}
@@ -41725,7 +49843,7 @@
Graph2d.prototype.setOptions = function (options) {
// validate options
- var errorFound = Validator.validate(options, allOptions$2);
+ var errorFound = Validator.validate(options, allOptions);
if (errorFound === true) {
console.log('%cErrors have been found in the supplied options object.', printStyle);
@@ -41746,7 +49864,7 @@
if (!items) {
newDataSet = null;
- } else if (items instanceof DataSet || items instanceof DataView) {
+ } else if (isDataViewLike(items)) {
newDataSet = typeCoerceDataSet(items);
} else {
// turn an array into a dataset
@@ -41788,7 +49906,7 @@
if (!groups) {
newDataSet = null;
- } else if (groups instanceof DataSet || groups instanceof DataView) {
+ } else if (isDataViewLike(groups)) {
newDataSet = groups;
} else {
// turn an array into a dataset
@@ -41853,7 +49971,7 @@
if (this.linegraph.groups[groupId].visible == true) {
for (var i = 0; i < this.linegraph.groups[groupId].itemsData.length; i++) {
var item = this.linegraph.groups[groupId].itemsData[i];
- var value = util$1.convert(item.x, 'Date').valueOf();
+ var value = availableUtils.convert(item.x, 'Date').valueOf();
min = min == null ? value : min > value ? value : min;
max = max == null ? value : max < value ? value : max;
}
@@ -41877,32 +49995,32 @@
Graph2d.prototype.getEventProperties = function (event) {
var clientX = event.center ? event.center.x : event.clientX;
var clientY = event.center ? event.center.y : event.clientY;
- var x = clientX - util$1.getAbsoluteLeft(this.dom.centerContainer);
- var y = clientY - util$1.getAbsoluteTop(this.dom.centerContainer);
+ var x = clientX - availableUtils.getAbsoluteLeft(this.dom.centerContainer);
+ var y = clientY - availableUtils.getAbsoluteTop(this.dom.centerContainer);
var time = this._toTime(x);
var customTime = CustomTime.customTimeFromTarget(event);
- var element = util$1.getTarget(event);
+ var element = availableUtils.getTarget(event);
var what = null;
- if (util$1.hasParent(element, this.timeAxis.dom.foreground)) {
+ if (availableUtils.hasParent(element, this.timeAxis.dom.foreground)) {
what = 'axis';
- } else if (this.timeAxis2 && util$1.hasParent(element, this.timeAxis2.dom.foreground)) {
+ } else if (this.timeAxis2 && availableUtils.hasParent(element, this.timeAxis2.dom.foreground)) {
what = 'axis';
- } else if (util$1.hasParent(element, this.linegraph.yAxisLeft.dom.frame)) {
+ } else if (availableUtils.hasParent(element, this.linegraph.yAxisLeft.dom.frame)) {
what = 'data-axis';
- } else if (util$1.hasParent(element, this.linegraph.yAxisRight.dom.frame)) {
+ } else if (availableUtils.hasParent(element, this.linegraph.yAxisRight.dom.frame)) {
what = 'data-axis';
- } else if (util$1.hasParent(element, this.linegraph.legendLeft.dom.frame)) {
+ } else if (availableUtils.hasParent(element, this.linegraph.legendLeft.dom.frame)) {
what = 'legend';
- } else if (util$1.hasParent(element, this.linegraph.legendRight.dom.frame)) {
+ } else if (availableUtils.hasParent(element, this.linegraph.legendRight.dom.frame)) {
what = 'legend';
} else if (customTime != null) {
what = 'custom-time';
- } else if (util$1.hasParent(element, this.currentTime.bar)) {
+ } else if (availableUtils.hasParent(element, this.currentTime.bar)) {
what = 'current-time';
- } else if (util$1.hasParent(element, this.dom.center)) {
+ } else if (availableUtils.hasParent(element, this.dom.center)) {
what = 'background';
}
@@ -41938,14 +50056,14 @@
Graph2d.prototype._createConfigurator = function () {
- return new Configurator(this, this.dom.container, configureOptions$1);
+ return new Configurator(this, this.dom.container, configureOptions);
};
// locales
// behave the same way.
var defaultLanguage = getNavigatorLanguage();
- moment$1.locale(defaultLanguage);
+ moment$2.locale(defaultLanguage);
var timeline = {
Core: Core,
DateUtil: DateUtil,
@@ -41957,6 +50075,7 @@
Item: Item,
BackgroundItem: BackgroundItem,
BoxItem: BoxItem,
+ ClusterItem: ClusterItem,
PointItem: PointItem,
RangeItem: RangeItem
},
@@ -41979,15 +50098,15 @@
exports.DataSet = DataSet;
exports.DataView = DataView;
exports.Graph2d = Graph2d;
- exports.Hammer = Hammer$1;
+ exports.Hammer = Hammer;
exports.Queue = Queue;
exports.Timeline = Timeline;
exports.keycharm = keycharm;
- exports.moment = moment$1;
+ exports.moment = moment$2;
exports.timeline = timeline;
- exports.util = util;
+ exports.util = util$2;
Object.defineProperty(exports, '__esModule', { value: true });
-})));
+}));
//# sourceMappingURL=vis-timeline-graph2d.js.map
diff --git a/web_timeline/static/src/js/timeline_controller.js b/web_timeline/static/src/js/timeline_controller.js
index dbb78de47..3831ed5c3 100644
--- a/web_timeline/static/src/js/timeline_controller.js
+++ b/web_timeline/static/src/js/timeline_controller.js
@@ -66,6 +66,7 @@ odoo.define("web_timeline.TimelineController", function (require) {
kwargs: {
fields: fields,
domain: domains,
+ order: [{name: this.renderer.arch.attrs.default_group_by}],
},
context: this.getSession().user_context,
}).then((data) =>
diff --git a/web_timeline/static/src/js/timeline_model.js b/web_timeline/static/src/js/timeline_model.js
index c71749c42..f67ce82ae 100644
--- a/web_timeline/static/src/js/timeline_model.js
+++ b/web_timeline/static/src/js/timeline_model.js
@@ -11,6 +11,7 @@ odoo.define("web_timeline.TimelineModel", function (require) {
load: function (params) {
this.modelName = params.modelName;
this.fieldNames = params.fieldNames;
+ this.default_group_by = params.default_group_by;
if (!this.preload_def) {
this.preload_def = $.Deferred();
$.when(
@@ -55,9 +56,12 @@ odoo.define("web_timeline.TimelineModel", function (require) {
return this._rpc({
model: this.modelName,
method: "search_read",
- context: this.data.context,
- fields: this.fieldNames,
- domain: this.data.domain,
+ kwargs: {
+ fields: this.fieldNames,
+ domain: this.data.domain,
+ order: [{name: this.default_group_by}],
+ context: this.data.context,
+ },
}).then((events) => {
this.data.data = events;
this.data.rights = {
diff --git a/web_timeline/static/src/js/timeline_renderer.js b/web_timeline/static/src/js/timeline_renderer.js
index e2dcddb48..0cf378eca 100644
--- a/web_timeline/static/src/js/timeline_renderer.js
+++ b/web_timeline/static/src/js/timeline_renderer.js
@@ -35,6 +35,7 @@ odoo.define("web_timeline.TimelineRenderer", function (require) {
this.date_delay = params.date_delay;
this.colors = params.colors;
this.fieldNames = params.fieldNames;
+ this.default_group_by = params.default_group_by;
this.dependency_arrow = params.dependency_arrow;
this.modelClass = params.view.model;
this.fields = params.fields;
@@ -376,7 +377,8 @@ odoo.define("web_timeline.TimelineRenderer", function (require) {
return events;
}
const groups = [];
- groups.push({id: -1, content: _t("UNASSIGNED")});
+ groups.push({id: -1, content: _t("UNASSIGNED"), order: -1});
+ var seq = 1;
for (const evt of events) {
const group_name = evt[_.first(group_bys)];
if (group_name) {
@@ -389,7 +391,9 @@ odoo.define("web_timeline.TimelineRenderer", function (require) {
groups.push({
id: group_name[0],
content: group_name[1],
+ order: seq,
});
+ seq += 1;
}
}
}
@@ -470,6 +474,7 @@ odoo.define("web_timeline.TimelineRenderer", function (require) {
start: date_start,
content: content,
id: evt.id,
+ order: evt.order,
group: group,
evt: evt,
style: `background-color: ${this.color};`,
diff --git a/web_timeline/static/src/js/timeline_view.js b/web_timeline/static/src/js/timeline_view.js
index fc01ae2a9..1fed93b82 100644
--- a/web_timeline/static/src/js/timeline_view.js
+++ b/web_timeline/static/src/js/timeline_view.js
@@ -72,7 +72,9 @@ odoo.define("web_timeline.TimelineView", function (require) {
const colors = this.parse_colors();
for (const color of colors) {
- fieldNames.push(color.field);
+ if (!fieldNames.includes(color.field)) {
+ fieldNames.push(color.field);
+ }
}
if (dependency_arrow) {
@@ -106,11 +108,13 @@ odoo.define("web_timeline.TimelineView", function (require) {
this.rendererParams.date_delay = date_delay;
this.rendererParams.colors = colors;
this.rendererParams.fieldNames = fieldNames;
+ this.rendererParams.default_group_by = attrs.default_group_by;
this.rendererParams.min_height = min_height;
this.rendererParams.dependency_arrow = dependency_arrow;
this.rendererParams.fields = fields;
this.loadParams.modelName = this.modelName;
this.loadParams.fieldNames = fieldNames;
+ this.loadParams.default_group_by = attrs.default_group_by;
this.controllerParams.open_popup_action = open_popup_action;
this.controllerParams.date_start = date_start;
this.controllerParams.date_stop = date_stop;
@@ -121,7 +125,7 @@ odoo.define("web_timeline.TimelineView", function (require) {
_preapre_vis_timeline_options: function (attrs) {
return {
- groupOrder: this.group_order,
+ groupOrder: "order",
orientation: "both",
selectable: true,
multiselect: true,
@@ -134,24 +138,6 @@ odoo.define("web_timeline.TimelineView", function (require) {
};
},
- /**
- * Order function for groups.
- * @param {Object} grp1
- * @param {Object} grp2
- * @returns {Integer}
- */
- group_order: function (grp1, grp2) {
- // Display non grouped elements first
- if (grp1.id === -1) {
- return -1;
- }
- if (grp2.id === -1) {
- return 1;
- }
-
- return grp1.content.localeCompare(grp2.content);
- },
-
/**
* Parse the colors attribute.
*