billboard.js 3.14.1 → 3.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +79 -41
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +9 -9
  5. package/dist/billboard.pkgd.js +79 -41
  6. package/dist/billboard.pkgd.min.js +9 -9
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +9 -3
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +9 -3
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +9 -3
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +4 -4
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +9 -3
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2 -2
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
  19. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +9 -3
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +2 -2
  21. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +9 -3
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +7 -7
  23. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +9 -3
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +2 -2
  25. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +9 -3
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +2 -2
  27. package/dist/theme/dark.css +1 -1
  28. package/dist/theme/dark.min.css +1 -1
  29. package/dist/theme/datalab.css +1 -1
  30. package/dist/theme/datalab.min.css +1 -1
  31. package/dist/theme/graph.css +1 -1
  32. package/dist/theme/graph.min.css +1 -1
  33. package/dist/theme/insight.css +1 -1
  34. package/dist/theme/insight.min.css +1 -1
  35. package/dist/theme/modern.css +1 -1
  36. package/dist/theme/modern.min.css +1 -1
  37. package/dist-esm/billboard.js +460 -420
  38. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +4 -4
  39. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +88 -15
  40. package/dist-esm/plugin/billboardjs-plugin-stanford.js +86 -13
  41. package/dist-esm/plugin/billboardjs-plugin-tableview.js +83 -10
  42. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +70 -7
  43. package/package.json +29 -29
  44. package/src/ChartInternal/Axis/Axis.ts +23 -0
  45. package/src/ChartInternal/data/data.ts +5 -4
  46. package/src/ChartInternal/interactions/interaction.ts +1 -1
  47. package/src/ChartInternal/interactions/subchart.ts +2 -25
  48. package/src/ChartInternal/interactions/zoom.ts +21 -0
  49. package/src/ChartInternal/internals/tooltip.ts +25 -15
  50. package/src/config/Options/axis/x.ts +2 -1
  51. package/src/config/Options/shape/gauge.ts +3 -2
  52. package/src/module/util.ts +10 -2
  53. package/types/axis.d.ts +2 -2
  54. package/types/options.shape.d.ts +3 -2
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.14.1
8
+ * @version 3.14.3
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -66,7 +66,7 @@ var Plugin = /** @class */ (function () {
66
66
  * @private
67
67
  */
68
68
  function Plugin(options) {
69
- if (options === void 0) { options = {}; }
69
+ if (options === undefined) { options = {}; }
70
70
  this.options = options;
71
71
  }
72
72
  /**
@@ -100,7 +100,7 @@ var Plugin = /** @class */ (function () {
100
100
  delete _this[key];
101
101
  });
102
102
  };
103
- Plugin.version = "3.14.1";
103
+ Plugin.version = "3.14.3";
104
104
  return Plugin;
105
105
  }());
106
106
 
@@ -159,7 +159,7 @@ var BubbleCompare = /** @class */ (function (_super) {
159
159
  };
160
160
  BubbleCompare.prototype.pointExpandedR = function (d) {
161
161
  var baseR = this.getBubbleR(d);
162
- var _a = this.options.expandScale, expandScale = _a === void 0 ? 1 : _a;
162
+ var _a = this.options.expandScale, expandScale = _a === undefined ? 1 : _a;
163
163
  BubbleCompare.raiseFocusedBubbleLayer(d);
164
164
  this.changeCursorPoint();
165
165
  return baseR * expandScale;
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.14.1
8
+ * @version 3.14.3
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -49,7 +49,17 @@ var __assign = function() {
49
49
  return t;
50
50
  };
51
51
  return __assign.apply(this, arguments);
52
- };
52
+ };
53
+
54
+ function __spreadArray(to, from, pack) {
55
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
56
+ if (ar || !(i in from)) {
57
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
58
+ ar[i] = from[i];
59
+ }
60
+ }
61
+ return to.concat(ar || Array.prototype.slice.call(from));
62
+ }
53
63
 
54
64
  /**
55
65
  * Copyright (c) 2017 ~ present NAVER Corp.
@@ -241,10 +251,54 @@ function getGlobal() {
241
251
  Function("return this")();
242
252
  }
243
253
  var win = getGlobal();
244
- var doc = win === null || win === void 0 ? void 0 : win.document;
254
+ var doc = win === null || win === undefined ? undefined : win.document;
245
255
 
246
256
  var isDefined = function (v) { return typeof v !== "undefined"; };
247
257
  var isObjectType = function (v) { return typeof v === "object"; };
258
+ /**
259
+ * Check if is array
260
+ * @param {Array} arr Data to be checked
261
+ * @returns {boolean}
262
+ * @private
263
+ */
264
+ var isArray = function (arr) { return Array.isArray(arr); };
265
+ /**
266
+ * Check if is object
267
+ * @param {object} obj Data to be checked
268
+ * @returns {boolean}
269
+ * @private
270
+ */
271
+ var isObject = function (obj) { return obj && !(obj === null || obj === undefined ? undefined : obj.nodeType) && isObjectType(obj) && !isArray(obj); };
272
+ /**
273
+ * Merge object returning new object
274
+ * @param {object} target Target object
275
+ * @param {object} objectN Source object
276
+ * @returns {object} merged target object
277
+ * @private
278
+ */
279
+ function mergeObj(target) {
280
+ var objectN = [];
281
+ for (var _i = 1; _i < arguments.length; _i++) {
282
+ objectN[_i - 1] = arguments[_i];
283
+ }
284
+ if (!objectN.length || (objectN.length === 1 && !objectN[0])) {
285
+ return target;
286
+ }
287
+ var source = objectN.shift();
288
+ if (isObject(target) && isObject(source)) {
289
+ Object.keys(source).forEach(function (key) {
290
+ var value = source[key];
291
+ if (isObject(value)) {
292
+ !target[key] && (target[key] = {});
293
+ target[key] = mergeObj(target[key], value);
294
+ }
295
+ else {
296
+ target[key] = isArray(value) ? value.concat() : value;
297
+ }
298
+ });
299
+ }
300
+ return mergeObj.apply(undefined, __spreadArray([target], objectN, false));
301
+ }
248
302
  // emulate event
249
303
  ({
250
304
  mouse: (function () {
@@ -260,14 +314,14 @@ var isObjectType = function (v) { return typeof v === "object"; };
260
314
  // eslint-disable-next-line no-new
261
315
  new MouseEvent("t");
262
316
  return function (el, eventType, params) {
263
- if (params === void 0) { params = getParams(); }
317
+ if (params === undefined) { params = getParams(); }
264
318
  el.dispatchEvent(new MouseEvent(eventType, params));
265
319
  };
266
320
  }
267
321
  catch (_a) {
268
322
  // Polyfills DOM4 MouseEvent
269
323
  return function (el, eventType, params) {
270
- if (params === void 0) { params = getParams(); }
324
+ if (params === undefined) { params = getParams(); }
271
325
  var mouseEvent = doc.createEvent("MouseEvent");
272
326
  // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
273
327
  mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0, // the event's mouse click count
@@ -275,7 +329,26 @@ var isObjectType = function (v) { return typeof v === "object"; };
275
329
  el.dispatchEvent(mouseEvent);
276
330
  };
277
331
  }
278
- })()});
332
+ })(),
333
+ touch: function (el, eventType, params) {
334
+ var touchObj = new Touch(mergeObj({
335
+ identifier: Date.now(),
336
+ target: el,
337
+ radiusX: 2.5,
338
+ radiusY: 2.5,
339
+ rotationAngle: 10,
340
+ force: 0.5
341
+ }, params));
342
+ el.dispatchEvent(new TouchEvent(eventType, {
343
+ cancelable: true,
344
+ bubbles: true,
345
+ shiftKey: true,
346
+ touches: [touchObj],
347
+ targetTouches: [],
348
+ changedTouches: [touchObj]
349
+ }));
350
+ }
351
+ });
279
352
 
280
353
  /**
281
354
  * Load configuration option
@@ -336,7 +409,7 @@ var Plugin = /** @class */ (function () {
336
409
  * @private
337
410
  */
338
411
  function Plugin(options) {
339
- if (options === void 0) { options = {}; }
412
+ if (options === undefined) { options = {}; }
340
413
  this.options = options;
341
414
  }
342
415
  /**
@@ -370,7 +443,7 @@ var Plugin = /** @class */ (function () {
370
443
  delete _this[key];
371
444
  });
372
445
  };
373
- Plugin.version = "3.14.1";
446
+ Plugin.version = "3.14.3";
374
447
  return Plugin;
375
448
  }());
376
449
 
@@ -537,7 +610,7 @@ var Sparkline = /** @class */ (function (_super) {
537
610
  .style("width", "0")
538
611
  .style("height", "0")
539
612
  .style("pointer-events", "none");
540
- ((_a = $el.tooltip) === null || _a === void 0 ? void 0 : _a.node()) && document.body.appendChild($el.tooltip.node());
613
+ ((_a = $el.tooltip) === null || _a === undefined ? undefined : _a.node()) && document.body.appendChild($el.tooltip.node());
541
614
  };
542
615
  Sparkline.prototype.$afterInit = function () {
543
616
  var $$ = this.$$;
@@ -553,7 +626,7 @@ var Sparkline = /** @class */ (function (_super) {
553
626
  */
554
627
  Sparkline.prototype.bindEvents = function (bind) {
555
628
  var _this = this;
556
- if (bind === void 0) { bind = true; }
629
+ if (bind === undefined) { bind = true; }
557
630
  var config = this.$$.config;
558
631
  if (config.interaction_enabled && config.tooltip_show) {
559
632
  var method_1 = "".concat(bind ? "add" : "remove", "EventListener");
@@ -575,14 +648,14 @@ var Sparkline = /** @class */ (function (_super) {
575
648
  var _a, _b, _c, _d;
576
649
  var $$ = this.$$;
577
650
  var index = $$.getDataIndexFromEvent(e);
578
- var data = (_a = $$.api.data(e.target.__id)) === null || _a === void 0 ? void 0 : _a[0];
579
- var d = (_b = data === null || data === void 0 ? void 0 : data.values) === null || _b === void 0 ? void 0 : _b[index];
651
+ var data = (_a = $$.api.data(e.target.__id)) === null || _a === undefined ? undefined : _a[0];
652
+ var d = (_b = data === null || data === undefined ? undefined : data.values) === null || _b === undefined ? undefined : _b[index];
580
653
  if (d && !d.name) {
581
654
  d.name = d.id;
582
655
  }
583
656
  $$.state.event = e;
584
- if (((_c = $$.isPointFocusOnly) === null || _c === void 0 ? void 0 : _c.call($$)) && d) {
585
- (_d = $$.showCircleFocus) === null || _d === void 0 ? void 0 : _d.call($$, [d]);
657
+ if (((_c = $$.isPointFocusOnly) === null || _c === undefined ? undefined : _c.call($$)) && d) {
658
+ (_d = $$.showCircleFocus) === null || _d === undefined ? undefined : _d.call($$, [d]);
586
659
  }
587
660
  $$.setExpand(index, data.id, true);
588
661
  $$.showTooltip([d], e.target);
@@ -599,7 +672,7 @@ var Sparkline = /** @class */ (function (_super) {
599
672
  var $el = $$.$el;
600
673
  var el = this.element;
601
674
  var data = $$.api.data();
602
- var svgWrapper = (_a = $el.chart.html().match(/<svg[^>]*>/)) === null || _a === void 0 ? void 0 : _a[0];
675
+ var svgWrapper = (_a = $el.chart.html().match(/<svg[^>]*>/)) === null || _a === undefined ? undefined : _a[0];
603
676
  // append sparkline holder if is less than the data length
604
677
  if (el.length < data.length) {
605
678
  var chart = $el.chart.node();
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.14.1
8
+ * @version 3.14.3
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -55,7 +55,17 @@ var __assign = function() {
55
55
  return t;
56
56
  };
57
57
  return __assign.apply(this, arguments);
58
- };
58
+ };
59
+
60
+ function __spreadArray(to, from, pack) {
61
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
62
+ if (ar || !(i in from)) {
63
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
64
+ ar[i] = from[i];
65
+ }
66
+ }
67
+ return to.concat(ar || Array.prototype.slice.call(from));
68
+ }
59
69
 
60
70
  /**
61
71
  * Copyright (c) 2017 ~ present NAVER Corp.
@@ -247,7 +257,7 @@ function getGlobal() {
247
257
  Function("return this")();
248
258
  }
249
259
  var win = getGlobal();
250
- var doc = win === null || win === void 0 ? void 0 : win.document;
260
+ var doc = win === null || win === undefined ? undefined : win.document;
251
261
 
252
262
  var isFunction = function (v) { return typeof v === "function"; };
253
263
  var isString = function (v) { return typeof v === "string"; };
@@ -259,6 +269,50 @@ var isEmpty = function (o) { return (isUndefined(o) || o === null ||
259
269
  (isString(o) && o.length === 0) ||
260
270
  (isObjectType(o) && !(o instanceof Date) && Object.keys(o).length === 0) ||
261
271
  (isNumber(o) && isNaN(o))); };
272
+ /**
273
+ * Check if is array
274
+ * @param {Array} arr Data to be checked
275
+ * @returns {boolean}
276
+ * @private
277
+ */
278
+ var isArray = function (arr) { return Array.isArray(arr); };
279
+ /**
280
+ * Check if is object
281
+ * @param {object} obj Data to be checked
282
+ * @returns {boolean}
283
+ * @private
284
+ */
285
+ var isObject = function (obj) { return obj && !(obj === null || obj === undefined ? undefined : obj.nodeType) && isObjectType(obj) && !isArray(obj); };
286
+ /**
287
+ * Merge object returning new object
288
+ * @param {object} target Target object
289
+ * @param {object} objectN Source object
290
+ * @returns {object} merged target object
291
+ * @private
292
+ */
293
+ function mergeObj(target) {
294
+ var objectN = [];
295
+ for (var _i = 1; _i < arguments.length; _i++) {
296
+ objectN[_i - 1] = arguments[_i];
297
+ }
298
+ if (!objectN.length || (objectN.length === 1 && !objectN[0])) {
299
+ return target;
300
+ }
301
+ var source = objectN.shift();
302
+ if (isObject(target) && isObject(source)) {
303
+ Object.keys(source).forEach(function (key) {
304
+ var value = source[key];
305
+ if (isObject(value)) {
306
+ !target[key] && (target[key] = {});
307
+ target[key] = mergeObj(target[key], value);
308
+ }
309
+ else {
310
+ target[key] = isArray(value) ? value.concat() : value;
311
+ }
312
+ });
313
+ }
314
+ return mergeObj.apply(undefined, __spreadArray([target], objectN, false));
315
+ }
262
316
  /**
263
317
  * Get range
264
318
  * @param {number} start Start number
@@ -290,14 +344,14 @@ var getRange = function (start, end, step) {
290
344
  // eslint-disable-next-line no-new
291
345
  new MouseEvent("t");
292
346
  return function (el, eventType, params) {
293
- if (params === void 0) { params = getParams(); }
347
+ if (params === undefined) { params = getParams(); }
294
348
  el.dispatchEvent(new MouseEvent(eventType, params));
295
349
  };
296
350
  }
297
351
  catch (_a) {
298
352
  // Polyfills DOM4 MouseEvent
299
353
  return function (el, eventType, params) {
300
- if (params === void 0) { params = getParams(); }
354
+ if (params === undefined) { params = getParams(); }
301
355
  var mouseEvent = doc.createEvent("MouseEvent");
302
356
  // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
303
357
  mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0, // the event's mouse click count
@@ -305,7 +359,26 @@ var getRange = function (start, end, step) {
305
359
  el.dispatchEvent(mouseEvent);
306
360
  };
307
361
  }
308
- })()});
362
+ })(),
363
+ touch: function (el, eventType, params) {
364
+ var touchObj = new Touch(mergeObj({
365
+ identifier: Date.now(),
366
+ target: el,
367
+ radiusX: 2.5,
368
+ radiusY: 2.5,
369
+ rotationAngle: 10,
370
+ force: 0.5
371
+ }, params));
372
+ el.dispatchEvent(new TouchEvent(eventType, {
373
+ cancelable: true,
374
+ bubbles: true,
375
+ shiftKey: true,
376
+ touches: [touchObj],
377
+ targetTouches: [],
378
+ changedTouches: [touchObj]
379
+ }));
380
+ }
381
+ });
309
382
  /**
310
383
  * Get parsed date value
311
384
  * (It must be called in 'ChartInternal' context)
@@ -323,7 +396,7 @@ function parseDate(date) {
323
396
  var _b = this, config = _b.config, format = _b.format;
324
397
  // if fails to parse, try by new Date()
325
398
  // https://github.com/naver/billboard.js/issues/1714
326
- parsedDate = (_a = format.dataTime(config.data_xFormat)(date)) !== null && _a !== void 0 ? _a : new Date(date);
399
+ parsedDate = (_a = format.dataTime(config.data_xFormat)(date)) !== null && _a !== undefined ? _a : new Date(date);
327
400
  }
328
401
  else if (isNumber(date) && !isNaN(date)) {
329
402
  parsedDate = new Date(+date);
@@ -394,7 +467,7 @@ var Plugin = /** @class */ (function () {
394
467
  * @private
395
468
  */
396
469
  function Plugin(options) {
397
- if (options === void 0) { options = {}; }
470
+ if (options === undefined) { options = {}; }
398
471
  this.options = options;
399
472
  }
400
473
  /**
@@ -428,7 +501,7 @@ var Plugin = /** @class */ (function () {
428
501
  delete _this[key];
429
502
  });
430
503
  };
431
- Plugin.version = "3.14.1";
504
+ Plugin.version = "3.14.3";
432
505
  return Plugin;
433
506
  }());
434
507
 
@@ -746,7 +819,7 @@ var Elements = /** @class */ (function () {
746
819
  .style("opacity", null);
747
820
  };
748
821
  Elements.prototype.updateStanfordElements = function (duration) {
749
- if (duration === void 0) { duration = 0; }
822
+ if (duration === undefined) { duration = 0; }
750
823
  this.updateStanfordLines(duration);
751
824
  this.updateStanfordRegions(duration);
752
825
  };
@@ -1040,8 +1113,8 @@ var Stanford = /** @class */ (function (_super) {
1040
1113
  };
1041
1114
  Stanford.prototype.$redraw = function (duration) {
1042
1115
  var _a, _b;
1043
- (_a = this.colorScale) === null || _a === void 0 ? void 0 : _a.drawColorScale();
1044
- (_b = this.elements) === null || _b === void 0 ? void 0 : _b.updateStanfordElements(duration);
1116
+ (_a = this.colorScale) === null || _a === undefined ? undefined : _a.drawColorScale();
1117
+ (_b = this.elements) === null || _b === undefined ? undefined : _b.updateStanfordElements(duration);
1045
1118
  };
1046
1119
  Stanford.prototype.getOptions = function () {
1047
1120
  return new Options();
@@ -1086,7 +1159,7 @@ var Stanford = /** @class */ (function (_super) {
1086
1159
  var data_x = config.data_x;
1087
1160
  var html = "<table class=\"".concat($TOOLTIP.tooltip, "\"><tbody>");
1088
1161
  d.forEach(function (v) {
1089
- var _a = v.id, id = _a === void 0 ? "" : _a, _b = v.value, value = _b === void 0 ? 0 : _b, _c = v.epochs, epochs = _c === void 0 ? 0 : _c, _d = v.x, x = _d === void 0 ? "" : _d;
1162
+ var _a = v.id, id = _a === undefined ? "" : _a, _b = v.value, value = _b === undefined ? 0 : _b, _c = v.epochs, epochs = _c === undefined ? 0 : _c, _d = v.x, x = _d === undefined ? "" : _d;
1090
1163
  html += "<tr>\n\t\t\t\t\t\t\t<th>".concat(data_x || "", "</th>\n\t\t\t\t\t\t\t<th class=\"value\">").concat(defaultTitleFormat(x), "</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>").concat(v.id, "</th>\n\t\t\t\t\t\t\t<th class=\"value\">").concat(defaultValueFormat(value), "</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class=\"").concat($TOOLTIP.tooltipName, "-").concat(id, "\">\n\t\t\t\t\t\t\t<td class=\"name\"><span style=\"background-color:").concat(color(v), "\"></span>Epochs</td>\n\t\t\t\t\t\t\t<td class=\"value\">").concat(defaultValueFormat(epochs), "</td>\n\t\t\t\t\t\t</tr>");
1091
1164
  });
1092
1165
  return "".concat(html, "</tbody></table>");
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.14.1
8
+ * @version 3.14.3
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -49,7 +49,17 @@ var __assign = function() {
49
49
  return t;
50
50
  };
51
51
  return __assign.apply(this, arguments);
52
- };
52
+ };
53
+
54
+ function __spreadArray(to, from, pack) {
55
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
56
+ if (ar || !(i in from)) {
57
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
58
+ ar[i] = from[i];
59
+ }
60
+ }
61
+ return to.concat(ar || Array.prototype.slice.call(from));
62
+ }
53
63
 
54
64
  /**
55
65
  * Copyright (c) 2017 ~ present NAVER Corp.
@@ -73,11 +83,55 @@ function getGlobal() {
73
83
  Function("return this")();
74
84
  }
75
85
  var win = getGlobal();
76
- var doc = win === null || win === void 0 ? void 0 : win.document;
86
+ var doc = win === null || win === undefined ? undefined : win.document;
77
87
 
78
88
  var isNumber = function (v) { return typeof v === "number"; };
79
89
  var isDefined = function (v) { return typeof v !== "undefined"; };
80
90
  var isObjectType = function (v) { return typeof v === "object"; };
91
+ /**
92
+ * Check if is array
93
+ * @param {Array} arr Data to be checked
94
+ * @returns {boolean}
95
+ * @private
96
+ */
97
+ var isArray = function (arr) { return Array.isArray(arr); };
98
+ /**
99
+ * Check if is object
100
+ * @param {object} obj Data to be checked
101
+ * @returns {boolean}
102
+ * @private
103
+ */
104
+ var isObject = function (obj) { return obj && !(obj === null || obj === undefined ? undefined : obj.nodeType) && isObjectType(obj) && !isArray(obj); };
105
+ /**
106
+ * Merge object returning new object
107
+ * @param {object} target Target object
108
+ * @param {object} objectN Source object
109
+ * @returns {object} merged target object
110
+ * @private
111
+ */
112
+ function mergeObj(target) {
113
+ var objectN = [];
114
+ for (var _i = 1; _i < arguments.length; _i++) {
115
+ objectN[_i - 1] = arguments[_i];
116
+ }
117
+ if (!objectN.length || (objectN.length === 1 && !objectN[0])) {
118
+ return target;
119
+ }
120
+ var source = objectN.shift();
121
+ if (isObject(target) && isObject(source)) {
122
+ Object.keys(source).forEach(function (key) {
123
+ var value = source[key];
124
+ if (isObject(value)) {
125
+ !target[key] && (target[key] = {});
126
+ target[key] = mergeObj(target[key], value);
127
+ }
128
+ else {
129
+ target[key] = isArray(value) ? value.concat() : value;
130
+ }
131
+ });
132
+ }
133
+ return mergeObj.apply(undefined, __spreadArray([target], objectN, false));
134
+ }
81
135
  // emulate event
82
136
  ({
83
137
  mouse: (function () {
@@ -93,14 +147,14 @@ var isObjectType = function (v) { return typeof v === "object"; };
93
147
  // eslint-disable-next-line no-new
94
148
  new MouseEvent("t");
95
149
  return function (el, eventType, params) {
96
- if (params === void 0) { params = getParams(); }
150
+ if (params === undefined) { params = getParams(); }
97
151
  el.dispatchEvent(new MouseEvent(eventType, params));
98
152
  };
99
153
  }
100
154
  catch (_a) {
101
155
  // Polyfills DOM4 MouseEvent
102
156
  return function (el, eventType, params) {
103
- if (params === void 0) { params = getParams(); }
157
+ if (params === undefined) { params = getParams(); }
104
158
  var mouseEvent = doc.createEvent("MouseEvent");
105
159
  // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
106
160
  mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0, // the event's mouse click count
@@ -108,7 +162,26 @@ var isObjectType = function (v) { return typeof v === "object"; };
108
162
  el.dispatchEvent(mouseEvent);
109
163
  };
110
164
  }
111
- })()});
165
+ })(),
166
+ touch: function (el, eventType, params) {
167
+ var touchObj = new Touch(mergeObj({
168
+ identifier: Date.now(),
169
+ target: el,
170
+ radiusX: 2.5,
171
+ radiusY: 2.5,
172
+ rotationAngle: 10,
173
+ force: 0.5
174
+ }, params));
175
+ el.dispatchEvent(new TouchEvent(eventType, {
176
+ cancelable: true,
177
+ bubbles: true,
178
+ shiftKey: true,
179
+ touches: [touchObj],
180
+ targetTouches: [],
181
+ changedTouches: [touchObj]
182
+ }));
183
+ }
184
+ });
112
185
  /**
113
186
  * Process the template & return bound string
114
187
  * @param {string} tpl Template string
@@ -183,7 +256,7 @@ var Plugin = /** @class */ (function () {
183
256
  * @private
184
257
  */
185
258
  function Plugin(options) {
186
- if (options === void 0) { options = {}; }
259
+ if (options === undefined) { options = {}; }
187
260
  this.options = options;
188
261
  }
189
262
  /**
@@ -217,7 +290,7 @@ var Plugin = /** @class */ (function () {
217
290
  delete _this[key];
218
291
  });
219
292
  };
220
- Plugin.version = "3.14.1";
293
+ Plugin.version = "3.14.3";
221
294
  return Plugin;
222
295
  }());
223
296
 
@@ -476,11 +549,11 @@ var TableView = /** @class */ (function (_super) {
476
549
  };
477
550
  TableView.prototype.$willDestroy = function () {
478
551
  var _a, _b;
479
- (_a = this.element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.element);
552
+ (_a = this.element.parentNode) === null || _a === undefined ? undefined : _a.removeChild(this.element);
480
553
  // remove default css style when left one chart instance
481
554
  if (this.$$.charts.length === 1) {
482
555
  var s = document.getElementById(defaultStyle.id);
483
- (_b = s === null || s === void 0 ? void 0 : s.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(s);
556
+ (_b = s === null || s === undefined ? undefined : s.parentNode) === null || _b === undefined ? undefined : _b.removeChild(s);
484
557
  }
485
558
  };
486
559
  return TableView;