billboard.js 3.9.4 → 3.10.0-next.2
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.
- package/README.md +2 -2
- package/dist/billboard.css +2 -2
- package/dist/billboard.js +2742 -2516
- package/dist/billboard.min.css +2 -2
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +2936 -2704
- package/dist/billboard.pkgd.min.js +4 -4
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +15 -15
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +205 -186
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +231 -226
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +172 -152
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +161 -142
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/{billboardjs-plugin-bubblecompare.js → billboardjs-plugin-bubblecompare.pkgd.js} +52 -32
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +12 -0
- package/dist/plugin/pkgd/{billboardjs-plugin-sparkline.js → billboardjs-plugin-sparkline.pkgd.js} +239 -200
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +12 -0
- package/dist/plugin/pkgd/{billboardjs-plugin-stanford.js → billboardjs-plugin-stanford.pkgd.js} +301 -277
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +12 -0
- package/dist/plugin/pkgd/{billboardjs-plugin-tableview.js → billboardjs-plugin-tableview.pkgd.js} +206 -166
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +12 -0
- package/dist/plugin/pkgd/{billboardjs-plugin-textoverlap.js → billboardjs-plugin-textoverlap.pkgd.js} +308 -278
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +12 -0
- package/dist/theme/dark.css +5 -4
- package/dist/theme/dark.min.css +2 -2
- package/dist/theme/datalab.css +5 -4
- package/dist/theme/datalab.min.css +2 -2
- package/dist/theme/graph.css +5 -4
- package/dist/theme/graph.min.css +2 -2
- package/dist/theme/insight.css +5 -4
- package/dist/theme/insight.min.css +2 -2
- package/dist-esm/billboard.js +718 -509
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +3 -3
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +15 -9
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +21 -28
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +17 -11
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +13 -7
- package/package.json +32 -32
- package/src/Chart/api/axis.ts +4 -0
- package/src/Chart/api/category.ts +8 -4
- package/src/Chart/api/export.ts +1 -2
- package/src/Chart/api/subchart.ts +162 -89
- package/src/Chart/api/zoom.ts +69 -79
- package/src/ChartInternal/Axis/AxisRendererHelper.ts +0 -8
- package/src/ChartInternal/data/IData.ts +4 -1
- package/src/ChartInternal/data/convert.helper.ts +1 -15
- package/src/ChartInternal/data/data.ts +8 -2
- package/src/ChartInternal/interactions/eventrect.ts +3 -4
- package/src/ChartInternal/interactions/flow.ts +1 -7
- package/src/ChartInternal/interactions/interaction.ts +11 -5
- package/src/ChartInternal/interactions/subchart.ts +36 -30
- package/src/ChartInternal/interactions/zoom.ts +13 -3
- package/src/ChartInternal/internals/category.ts +2 -2
- package/src/ChartInternal/internals/clip.ts +4 -5
- package/src/ChartInternal/internals/color.ts +49 -23
- package/src/ChartInternal/internals/domain.ts +46 -10
- package/src/ChartInternal/internals/grid.ts +57 -86
- package/src/ChartInternal/internals/redraw.ts +1 -6
- package/src/ChartInternal/internals/region.ts +35 -12
- package/src/ChartInternal/internals/selection.ts +1 -1
- package/src/ChartInternal/internals/text.ts +1 -26
- package/src/ChartInternal/internals/title.ts +10 -48
- package/src/ChartInternal/internals/tooltip.ts +50 -54
- package/src/ChartInternal/shape/arc.ts +2 -2
- package/src/ChartInternal/shape/candlestick.ts +2 -17
- package/src/ChartInternal/shape/point.ts +36 -8
- package/src/ChartInternal/shape/radar.ts +1 -1
- package/src/ChartInternal/shape/shape.ts +50 -4
- package/src/ChartInternal/shape/treemap.ts +2 -2
- package/src/Plugin/bubblecompare/index.ts +1 -1
- package/src/Plugin/sparkline/index.ts +2 -2
- package/src/Plugin/stanford/Elements.ts +10 -2
- package/src/Plugin/stanford/index.ts +1 -24
- package/src/Plugin/tableview/index.ts +2 -2
- package/src/config/Options/axis/x.ts +1 -0
- package/src/config/Options/common/main.ts +12 -2
- package/src/config/Options/common/point.ts +41 -0
- package/src/config/Options/common/tooltip.ts +10 -10
- package/src/config/Options/data/axis.ts +3 -1
- package/src/config/Options/data/data.ts +10 -2
- package/src/config/Options/shape/area.ts +10 -4
- package/src/config/Options/shape/bar.ts +10 -4
- package/src/config/Store/State.ts +3 -0
- package/src/module/Cache.ts +7 -5
- package/src/module/browser.ts +34 -14
- package/src/module/util.ts +8 -4
- package/src/module/worker.ts +24 -13
- package/src/scss/billboard.scss +4 -2
- package/src/scss/theme/dark.scss +4 -2
- package/src/scss/theme/datalab.scss +4 -2
- package/src/scss/theme/graph.scss +4 -2
- package/src/scss/theme/insight.scss +4 -2
- package/types/chart.d.ts +11 -0
- package/types/options.d.ts +9 -3
- package/types/options.shape.d.ts +26 -0
- package/types/types.d.ts +15 -1
package/dist/plugin/pkgd/{billboardjs-plugin-tableview.js → billboardjs-plugin-tableview.pkgd.js}
RENAMED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.
|
|
8
|
+
* @version 3.10.0-next.2
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
else if(typeof exports === 'object')
|
|
18
18
|
exports["bb"] = factory();
|
|
19
19
|
else
|
|
20
|
-
root["bb"] = root["bb"] || {}, root["bb"]["plugin"] = root["bb"]["plugin"] || {}, root["bb"]["plugin"]["tableview"] = factory();
|
|
20
|
+
root["bb"] = root["bb"] || {}, root["bb"]["plugin"] = root["bb"]["plugin"] || {}, root["bb"]["plugin"]["tableview.pkgd"] = factory();
|
|
21
21
|
})(this, function() {
|
|
22
22
|
return /******/ (function() { // webpackBootstrap
|
|
23
23
|
/******/ var __webpack_modules__ = ([
|
|
@@ -1233,10 +1233,10 @@ var store = __webpack_require__(37);
|
|
|
1233
1233
|
(module.exports = function (key, value) {
|
|
1234
1234
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
1235
1235
|
})('versions', []).push({
|
|
1236
|
-
version: '3.32.
|
|
1236
|
+
version: '3.32.2',
|
|
1237
1237
|
mode: IS_PURE ? 'pure' : 'global',
|
|
1238
1238
|
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
1239
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.32.
|
|
1239
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE',
|
|
1240
1240
|
source: 'https://github.com/zloirock/core-js'
|
|
1241
1241
|
});
|
|
1242
1242
|
|
|
@@ -4590,7 +4590,9 @@ try {
|
|
|
4590
4590
|
} catch (error) { /* empty */ }
|
|
4591
4591
|
|
|
4592
4592
|
module.exports = function (exec, SKIP_CLOSING) {
|
|
4593
|
-
|
|
4593
|
+
try {
|
|
4594
|
+
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
|
4595
|
+
} catch (error) { return false; } // workaround of old WebKit + `eval` bug
|
|
4594
4596
|
var ITERATION_SUPPORT = false;
|
|
4595
4597
|
try {
|
|
4596
4598
|
var object = {};
|
|
@@ -4789,12 +4791,15 @@ module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, I
|
|
|
4789
4791
|
|
|
4790
4792
|
var getIterationMethod = function (KIND) {
|
|
4791
4793
|
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
|
4792
|
-
if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
|
|
4794
|
+
if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
|
|
4795
|
+
|
|
4793
4796
|
switch (KIND) {
|
|
4794
4797
|
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
|
4795
4798
|
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
|
4796
4799
|
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
|
4797
|
-
}
|
|
4800
|
+
}
|
|
4801
|
+
|
|
4802
|
+
return function () { return new IteratorConstructor(this); };
|
|
4798
4803
|
};
|
|
4799
4804
|
|
|
4800
4805
|
var TO_STRING_TAG = NAME + ' Iterator';
|
|
@@ -6395,7 +6400,7 @@ var pack = function (number, mantissaLength, bytes) {
|
|
|
6395
6400
|
exponent = eMax;
|
|
6396
6401
|
} else if (exponent + eBias >= 1) {
|
|
6397
6402
|
mantissa = roundToEven((number * c - 1) * pow(2, mantissaLength));
|
|
6398
|
-
exponent
|
|
6403
|
+
exponent += eBias;
|
|
6399
6404
|
} else {
|
|
6400
6405
|
mantissa = roundToEven(number * pow(2, eBias - 1) * pow(2, mantissaLength));
|
|
6401
6406
|
exponent = 0;
|
|
@@ -6444,8 +6449,8 @@ var unpack = function (buffer, mantissaLength) {
|
|
|
6444
6449
|
} else if (exponent === eMax) {
|
|
6445
6450
|
return mantissa ? NaN : s ? -Infinity : Infinity;
|
|
6446
6451
|
} else {
|
|
6447
|
-
mantissa
|
|
6448
|
-
exponent
|
|
6452
|
+
mantissa += pow(2, mantissaLength);
|
|
6453
|
+
exponent -= eBias;
|
|
6449
6454
|
} return (s ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
|
|
6450
6455
|
};
|
|
6451
6456
|
|
|
@@ -8020,6 +8025,7 @@ var exp = Math.exp;
|
|
|
8020
8025
|
// https://tc39.es/ecma262/#sec-math.expm1
|
|
8021
8026
|
module.exports = (!$expm1
|
|
8022
8027
|
// Old FF bug
|
|
8028
|
+
// eslint-disable-next-line no-loss-of-precision -- required for old engines
|
|
8023
8029
|
|| $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
|
|
8024
8030
|
// Tor Browser bug
|
|
8025
8031
|
|| $expm1(-2e-17) !== -2e-17
|
|
@@ -8385,9 +8391,20 @@ var toNumber = function (argument) {
|
|
|
8385
8391
|
if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
|
|
8386
8392
|
} else if (first === 48) {
|
|
8387
8393
|
switch (charCodeAt(it, 1)) {
|
|
8388
|
-
|
|
8389
|
-
case
|
|
8390
|
-
|
|
8394
|
+
// fast equal of /^0b[01]+$/i
|
|
8395
|
+
case 66:
|
|
8396
|
+
case 98:
|
|
8397
|
+
radix = 2;
|
|
8398
|
+
maxCode = 49;
|
|
8399
|
+
break;
|
|
8400
|
+
// fast equal of /^0o[0-7]+$/i
|
|
8401
|
+
case 79:
|
|
8402
|
+
case 111:
|
|
8403
|
+
radix = 8;
|
|
8404
|
+
maxCode = 55;
|
|
8405
|
+
break;
|
|
8406
|
+
default:
|
|
8407
|
+
return +it;
|
|
8391
8408
|
}
|
|
8392
8409
|
digits = stringSlice(it, 2);
|
|
8393
8410
|
length = digits.length;
|
|
@@ -11446,7 +11463,7 @@ var handleNCG = function (string) {
|
|
|
11446
11463
|
for (; index <= length; index++) {
|
|
11447
11464
|
chr = charAt(string, index);
|
|
11448
11465
|
if (chr === '\\') {
|
|
11449
|
-
chr
|
|
11466
|
+
chr += charAt(string, ++index);
|
|
11450
11467
|
} else if (chr === ']') {
|
|
11451
11468
|
brackets = false;
|
|
11452
11469
|
} else if (!brackets) switch (true) {
|
|
@@ -12477,7 +12494,10 @@ module.exports = function (KEY, exec, FORCED, SHAM) {
|
|
|
12477
12494
|
re[SYMBOL] = /./[SYMBOL];
|
|
12478
12495
|
}
|
|
12479
12496
|
|
|
12480
|
-
re.exec = function () {
|
|
12497
|
+
re.exec = function () {
|
|
12498
|
+
execCalled = true;
|
|
12499
|
+
return null;
|
|
12500
|
+
};
|
|
12481
12501
|
|
|
12482
12502
|
re[SYMBOL]('');
|
|
12483
12503
|
return !execCalled;
|
|
@@ -16406,7 +16426,7 @@ var checkBasicSemantic = function (structuredCloneImplementation) {
|
|
|
16406
16426
|
var set1 = new global.Set([7]);
|
|
16407
16427
|
var set2 = structuredCloneImplementation(set1);
|
|
16408
16428
|
var number = structuredCloneImplementation(Object(7));
|
|
16409
|
-
return set2 === set1 || !set2.has(7) || typeof number != 'object' || number !== 7;
|
|
16429
|
+
return set2 === set1 || !set2.has(7) || typeof number != 'object' || +number !== 7;
|
|
16410
16430
|
}) && structuredCloneImplementation;
|
|
16411
16431
|
};
|
|
16412
16432
|
|
|
@@ -18366,7 +18386,7 @@ var encode = function (input) {
|
|
|
18366
18386
|
var q = delta;
|
|
18367
18387
|
var k = base;
|
|
18368
18388
|
while (true) {
|
|
18369
|
-
var t = k <= bias ? tMin :
|
|
18389
|
+
var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
|
|
18370
18390
|
if (q < t) break;
|
|
18371
18391
|
var qMinusT = q - t;
|
|
18372
18392
|
var baseMinusT = base - t;
|
|
@@ -19457,7 +19477,7 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
19457
19477
|
* @example
|
|
19458
19478
|
* bb.plugin.stanford.version; // ex) 1.9.0
|
|
19459
19479
|
*/
|
|
19460
|
-
|
|
19480
|
+
let Plugin = /*#__PURE__*/function () {
|
|
19461
19481
|
/**
|
|
19462
19482
|
* Constructor
|
|
19463
19483
|
* @param {Any} options config option object
|
|
@@ -19511,7 +19531,7 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
19511
19531
|
};
|
|
19512
19532
|
return Plugin;
|
|
19513
19533
|
}();
|
|
19514
|
-
Plugin.version = "3.
|
|
19534
|
+
Plugin.version = "3.10.0-next.2";
|
|
19515
19535
|
|
|
19516
19536
|
;// CONCATENATED MODULE: ./src/Plugin/tableview/Options.ts
|
|
19517
19537
|
/**
|
|
@@ -19526,7 +19546,7 @@ Plugin.version = "3.9.4";
|
|
|
19526
19546
|
* @returns {TableviewOptions}
|
|
19527
19547
|
* @private
|
|
19528
19548
|
*/
|
|
19529
|
-
|
|
19549
|
+
let Options = function () {
|
|
19530
19550
|
return {
|
|
19531
19551
|
/**
|
|
19532
19552
|
* Set tableview holder selector.
|
|
@@ -19560,7 +19580,7 @@ var Options = function () {
|
|
|
19560
19580
|
* categoryFormat: "#table-holder"
|
|
19561
19581
|
*/
|
|
19562
19582
|
categoryFormat: function categoryFormat(v) {
|
|
19563
|
-
|
|
19583
|
+
let category = v;
|
|
19564
19584
|
if (this.$$.axis.isCategorized()) {
|
|
19565
19585
|
category = this.$$.categoryName(v);
|
|
19566
19586
|
} else if (this.$$.axis.isTimeSeries()) {
|
|
@@ -19622,7 +19642,7 @@ var Options = function () {
|
|
|
19622
19642
|
* @ignore
|
|
19623
19643
|
*/
|
|
19624
19644
|
|
|
19625
|
-
|
|
19645
|
+
const defaultStyle = {
|
|
19626
19646
|
id: "__tableview-style__",
|
|
19627
19647
|
class: "bb-tableview",
|
|
19628
19648
|
rule: ".bb-tableview {\n\t\tborder-collapse:collapse;\n\t\tborder-spacing:0;\n\t\tbackground:#fff;\n\t\tmin-width:100%;\n\t\tmargin-top:10px;\n\t\tfont-family:sans-serif;\n\t\tfont-size:.9em;\n\t}\n\t.bb-tableview tr:hover {\n\t\tbackground:#eef7ff;\n\t}\n\t.bb-tableview thead tr {\n\t\tbackground:#f8f8f8;\n\t}\n\t.bb-tableview caption,.bb-tableview td,.bb-tableview th {\n\t\ttext-align: center;\n\t\tborder:1px solid silver;\n\t\tpadding:.5em;\n\t}\n\t.bb-tableview caption {\n\t\tfont-size:1.1em;\n\t\tfont-weight:700;\n\t\tmargin-bottom: -1px;\n\t}"
|
|
@@ -19635,7 +19655,7 @@ var defaultStyle = {
|
|
|
19635
19655
|
}; // template
|
|
19636
19656
|
;// CONCATENATED MODULE: ./node_modules/d3-selection/src/sourceEvent.js
|
|
19637
19657
|
/* harmony default export */ function sourceEvent(event) {
|
|
19638
|
-
|
|
19658
|
+
let sourceEvent;
|
|
19639
19659
|
while (sourceEvent = event.sourceEvent) event = sourceEvent;
|
|
19640
19660
|
return event;
|
|
19641
19661
|
}
|
|
@@ -20118,7 +20138,7 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Sy
|
|
|
20118
20138
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
20119
20139
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
20120
20140
|
/* harmony default export */ function size() {
|
|
20121
|
-
|
|
20141
|
+
let size = 0;
|
|
20122
20142
|
for (var _iterator = _createForOfIteratorHelperLoose(this), _step; !(_step = _iterator()).done;) {
|
|
20123
20143
|
_step.value;
|
|
20124
20144
|
++size;
|
|
@@ -20670,10 +20690,10 @@ Selection.prototype = selection.prototype = (_selection$prototype = {
|
|
|
20670
20690
|
;// CONCATENATED MODULE: ./node_modules/d3-drag/src/noevent.js
|
|
20671
20691
|
// These are typically used in conjunction with noevent to ensure that we can
|
|
20672
20692
|
// preventDefault on the event.
|
|
20673
|
-
|
|
20693
|
+
const nonpassive = {
|
|
20674
20694
|
passive: !1
|
|
20675
20695
|
};
|
|
20676
|
-
|
|
20696
|
+
const nonpassivecapture = {
|
|
20677
20697
|
capture: !0,
|
|
20678
20698
|
passive: !1
|
|
20679
20699
|
};
|
|
@@ -20988,7 +21008,7 @@ function rgb_formatHex8() {
|
|
|
20988
21008
|
return "#" + hex(this.r) + hex(this.g) + hex(this.b) + hex((isNaN(this.opacity) ? 1 : this.opacity) * 255);
|
|
20989
21009
|
}
|
|
20990
21010
|
function rgb_formatRgb() {
|
|
20991
|
-
|
|
21011
|
+
const a = clampa(this.opacity);
|
|
20992
21012
|
return "" + (a === 1 ? "rgb(" : "rgba(") + clampi(this.r) + ", " + clampi(this.g) + ", " + clampi(this.b) + (a === 1 ? ")" : ", " + a + ")");
|
|
20993
21013
|
}
|
|
20994
21014
|
function clampa(opacity) {
|
|
@@ -21061,7 +21081,7 @@ src_define(Hsl, hsl, extend(Color, {
|
|
|
21061
21081
|
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
21062
21082
|
},
|
|
21063
21083
|
formatHsl: function formatHsl() {
|
|
21064
|
-
|
|
21084
|
+
const a = clampa(this.opacity);
|
|
21065
21085
|
return "" + (a === 1 ? "hsl(" : "hsla(") + clamph(this.h) + ", " + clampt(this.s) * 100 + "%, " + clampt(this.l) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
|
|
21066
21086
|
}
|
|
21067
21087
|
}));
|
|
@@ -21669,7 +21689,7 @@ var svgNode;
|
|
|
21669
21689
|
|
|
21670
21690
|
/* eslint-disable no-undef */
|
|
21671
21691
|
function parseCss(value) {
|
|
21672
|
-
|
|
21692
|
+
const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
|
|
21673
21693
|
return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
|
|
21674
21694
|
}
|
|
21675
21695
|
function parseSvg(value) {
|
|
@@ -22424,7 +22444,7 @@ var src_constant_this = undefined;
|
|
|
22424
22444
|
}).bind(undefined));
|
|
22425
22445
|
;// CONCATENATED MODULE: ./node_modules/d3-brush/src/event.js
|
|
22426
22446
|
function BrushEvent(type, _ref) {
|
|
22427
|
-
|
|
22447
|
+
let sourceEvent = _ref.sourceEvent,
|
|
22428
22448
|
target = _ref.target,
|
|
22429
22449
|
selection = _ref.selection,
|
|
22430
22450
|
mode = _ref.mode,
|
|
@@ -22493,7 +22513,7 @@ var MODE_DRAG = {
|
|
|
22493
22513
|
MODE_CENTER = {
|
|
22494
22514
|
name: "center"
|
|
22495
22515
|
};
|
|
22496
|
-
|
|
22516
|
+
const abs = Math.abs,
|
|
22497
22517
|
max = Math.max,
|
|
22498
22518
|
min = Math.min;
|
|
22499
22519
|
function number1(e) {
|
|
@@ -22779,7 +22799,7 @@ function brush_brush(dim) {
|
|
|
22779
22799
|
lockY,
|
|
22780
22800
|
points = Array.from(event.touches || [event], function (t) {
|
|
22781
22801
|
_newArrowCheck(this, _this);
|
|
22782
|
-
|
|
22802
|
+
const i = t.identifier;
|
|
22783
22803
|
t = src_pointer(t, that);
|
|
22784
22804
|
t.point0 = t.slice();
|
|
22785
22805
|
t.identifier = i;
|
|
@@ -22789,7 +22809,7 @@ function brush_brush(dim) {
|
|
|
22789
22809
|
var emit = emitter(that, arguments, !0).beforestart();
|
|
22790
22810
|
if (type === "overlay") {
|
|
22791
22811
|
if (selection) moving = !0;
|
|
22792
|
-
|
|
22812
|
+
const pts = [points[0], points[1] || points[0]];
|
|
22793
22813
|
state.selection = selection = [[w0 = dim === Y ? W : min(pts[0][0], pts[1][0]), n0 = dim === X ? N : min(pts[0][1], pts[1][1])], [e0 = dim === Y ? E : max(pts[0][0], pts[1][0]), s0 = dim === X ? S : max(pts[0][1], pts[1][1])]];
|
|
22794
22814
|
if (points.length > 1) move(event);
|
|
22795
22815
|
} else {
|
|
@@ -22816,26 +22836,26 @@ function brush_brush(dim) {
|
|
|
22816
22836
|
emit.start(event, mode.name);
|
|
22817
22837
|
function moved(event) {
|
|
22818
22838
|
for (var _iterator = brush_createForOfIteratorHelperLoose(event.changedTouches || [event]), _step; !(_step = _iterator()).done;) {
|
|
22819
|
-
|
|
22839
|
+
const p = _step.value;
|
|
22820
22840
|
for (var _iterator3 = brush_createForOfIteratorHelperLoose(points), _step3; !(_step3 = _iterator3()).done;) {
|
|
22821
|
-
|
|
22841
|
+
const d = _step3.value;
|
|
22822
22842
|
if (d.identifier === p.identifier) d.cur = src_pointer(p, that);
|
|
22823
22843
|
}
|
|
22824
22844
|
}
|
|
22825
22845
|
if (shifting && !lockX && !lockY && points.length === 1) {
|
|
22826
|
-
|
|
22846
|
+
const point = points[0];
|
|
22827
22847
|
if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1])) lockY = !0;else lockX = !0;
|
|
22828
22848
|
}
|
|
22829
22849
|
for (var _iterator2 = brush_createForOfIteratorHelperLoose(points), _step2; !(_step2 = _iterator2()).done;) {
|
|
22830
|
-
|
|
22831
|
-
if (
|
|
22850
|
+
const point = _step2.value;
|
|
22851
|
+
if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];
|
|
22832
22852
|
}
|
|
22833
22853
|
moving = !0;
|
|
22834
22854
|
src_noevent(event);
|
|
22835
22855
|
move(event);
|
|
22836
22856
|
}
|
|
22837
22857
|
function move(event) {
|
|
22838
|
-
|
|
22858
|
+
const point = points[0],
|
|
22839
22859
|
point0 = point.point0;
|
|
22840
22860
|
var t;
|
|
22841
22861
|
dx = point[0] - point0[0];
|
|
@@ -23026,7 +23046,6 @@ function brush_brush(dim) {
|
|
|
23026
23046
|
|
|
23027
23047
|
;// CONCATENATED MODULE: ./src/module/browser.ts
|
|
23028
23048
|
|
|
23029
|
-
var browser_this = undefined;
|
|
23030
23049
|
/**
|
|
23031
23050
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
23032
23051
|
* billboard.js project is licensed under the MIT license
|
|
@@ -23037,26 +23056,41 @@ var browser_this = undefined;
|
|
|
23037
23056
|
*/
|
|
23038
23057
|
/* eslint-disable no-new-func, no-undef */
|
|
23039
23058
|
|
|
23040
|
-
|
|
23041
|
-
|
|
23042
|
-
|
|
23043
|
-
|
|
23044
|
-
|
|
23045
|
-
|
|
23046
|
-
|
|
23047
|
-
|
|
23048
|
-
|
|
23059
|
+
|
|
23060
|
+
/**
|
|
23061
|
+
* Get global object
|
|
23062
|
+
* @returns {object} window object
|
|
23063
|
+
* @private
|
|
23064
|
+
*/
|
|
23065
|
+
function getGlobal() {
|
|
23066
|
+
return typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis || typeof global === "object" && global !== null && global.Object === Object && global || typeof self === "object" && self !== null && self.Object === Object && self || Function("return this")();
|
|
23067
|
+
}
|
|
23068
|
+
|
|
23069
|
+
/**
|
|
23070
|
+
* Get fallback object
|
|
23071
|
+
* @param {object} w global object
|
|
23072
|
+
* @returns {Array} fallback object array
|
|
23073
|
+
* @private
|
|
23074
|
+
*/
|
|
23075
|
+
function getFallback(w) {
|
|
23076
|
+
var _this = this;
|
|
23077
|
+
const hasRAF = typeof (w == null ? void 0 : w.requestAnimationFrame) === "function",
|
|
23078
|
+
hasRIC = typeof (w == null ? void 0 : w.requestIdleCallback) === "function";
|
|
23079
|
+
return [hasRAF ? w.requestAnimationFrame : function (cb) {
|
|
23080
|
+
_newArrowCheck(this, _this);
|
|
23049
23081
|
return setTimeout(cb, 1);
|
|
23050
|
-
}.bind(
|
|
23051
|
-
|
|
23052
|
-
_newArrowCheck(this, browser_this);
|
|
23082
|
+
}.bind(this), hasRAF ? w.cancelAnimationFrame : function (id) {
|
|
23083
|
+
_newArrowCheck(this, _this);
|
|
23053
23084
|
return clearTimeout(id);
|
|
23054
|
-
}.bind(
|
|
23055
|
-
|
|
23056
|
-
|
|
23057
|
-
doc = win == null ? void 0 : win.document
|
|
23058
|
-
|
|
23059
|
-
|
|
23085
|
+
}.bind(this), hasRIC ? w.requestIdleCallback : requestAnimationFrame, hasRIC ? w.cancelIdleCallback : cancelAnimationFrame];
|
|
23086
|
+
}
|
|
23087
|
+
const win = getGlobal(),
|
|
23088
|
+
doc = win == null ? void 0 : win.document,
|
|
23089
|
+
_getFallback = getFallback(win),
|
|
23090
|
+
requestAnimationFrame = _getFallback[0],
|
|
23091
|
+
cancelAnimationFrame = _getFallback[1],
|
|
23092
|
+
requestIdleCallback = _getFallback[2],
|
|
23093
|
+
cancelIdleCallback = _getFallback[3];
|
|
23060
23094
|
;// CONCATENATED MODULE: ./src/module/util.ts
|
|
23061
23095
|
|
|
23062
23096
|
|
|
@@ -23072,7 +23106,7 @@ function _objectSpread(e) { for (var r = 1, t; r < arguments.length; r++) { t =
|
|
|
23072
23106
|
|
|
23073
23107
|
|
|
23074
23108
|
|
|
23075
|
-
|
|
23109
|
+
const isValue = function (v) {
|
|
23076
23110
|
_newArrowCheck(this, util_this);
|
|
23077
23111
|
return v || v === 0;
|
|
23078
23112
|
}.bind(undefined),
|
|
@@ -23165,8 +23199,8 @@ function getOption(options, key, defaultValue) {
|
|
|
23165
23199
|
* @private
|
|
23166
23200
|
*/
|
|
23167
23201
|
function hasValue(dict, value) {
|
|
23168
|
-
var _this2 = this
|
|
23169
|
-
|
|
23202
|
+
var _this2 = this;
|
|
23203
|
+
let found = !1;
|
|
23170
23204
|
Object.keys(dict).forEach(function (key) {
|
|
23171
23205
|
_newArrowCheck(this, _this2);
|
|
23172
23206
|
return dict[key] === value && (found = !0);
|
|
@@ -23183,7 +23217,7 @@ function hasValue(dict, value) {
|
|
|
23183
23217
|
* @private
|
|
23184
23218
|
*/
|
|
23185
23219
|
function callFn(fn, thisArg) {
|
|
23186
|
-
|
|
23220
|
+
const isFn = isFunction(fn);
|
|
23187
23221
|
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
23188
23222
|
args[_key - 2] = arguments[_key];
|
|
23189
23223
|
}
|
|
@@ -23198,14 +23232,15 @@ function callFn(fn, thisArg) {
|
|
|
23198
23232
|
* @private
|
|
23199
23233
|
*/
|
|
23200
23234
|
function endall(transition, cb) {
|
|
23201
|
-
var _this3 = this
|
|
23202
|
-
|
|
23203
|
-
|
|
23204
|
-
|
|
23205
|
-
|
|
23206
|
-
|
|
23207
|
-
|
|
23208
|
-
|
|
23235
|
+
var _this3 = this;
|
|
23236
|
+
let n = 0;
|
|
23237
|
+
const end = function () {
|
|
23238
|
+
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
23239
|
+
args[_key2] = arguments[_key2];
|
|
23240
|
+
}
|
|
23241
|
+
--n || cb.apply.apply(cb, [this].concat(args));
|
|
23242
|
+
};
|
|
23243
|
+
|
|
23209
23244
|
// if is transition selection
|
|
23210
23245
|
if ("duration" in transition) {
|
|
23211
23246
|
transition.each(function () {
|
|
@@ -23224,8 +23259,8 @@ function endall(transition, cb) {
|
|
|
23224
23259
|
* @returns {string}
|
|
23225
23260
|
* @private
|
|
23226
23261
|
*/
|
|
23227
|
-
function
|
|
23228
|
-
return isString(str) ? str.replace(
|
|
23262
|
+
function sanitize(str) {
|
|
23263
|
+
return isString(str) ? str.replace(/<(script|img)?/ig, "<").replace(/(script)?>/ig, ">") : str;
|
|
23229
23264
|
}
|
|
23230
23265
|
|
|
23231
23266
|
/**
|
|
@@ -23250,12 +23285,12 @@ function setTextValue(node, text, dy, toMiddle) {
|
|
|
23250
23285
|
if (text.indexOf("\n") === -1) {
|
|
23251
23286
|
node.text(text);
|
|
23252
23287
|
} else {
|
|
23253
|
-
|
|
23288
|
+
const diff = [node.text(), text].map(function (v) {
|
|
23254
23289
|
_newArrowCheck(this, _this4);
|
|
23255
23290
|
return v.replace(/[\s\n]/g, "");
|
|
23256
23291
|
}.bind(this));
|
|
23257
23292
|
if (diff[0] !== diff[1]) {
|
|
23258
|
-
|
|
23293
|
+
const multiline = text.split("\n"),
|
|
23259
23294
|
len = toMiddle ? multiline.length - 1 : 1;
|
|
23260
23295
|
// reset possible text
|
|
23261
23296
|
node.html("");
|
|
@@ -23281,7 +23316,7 @@ function getRectSegList(path) {
|
|
|
23281
23316
|
* | |
|
|
23282
23317
|
* seg0 ---------- seg3
|
|
23283
23318
|
* */
|
|
23284
|
-
|
|
23319
|
+
const _path$getBBox = path.getBBox(),
|
|
23285
23320
|
x = _path$getBBox.x,
|
|
23286
23321
|
y = _path$getBBox.y,
|
|
23287
23322
|
width = _path$getBBox.width,
|
|
@@ -23315,7 +23350,7 @@ function getRectSegList(path) {
|
|
|
23315
23350
|
* @private
|
|
23316
23351
|
*/
|
|
23317
23352
|
function getPathBox(path) {
|
|
23318
|
-
|
|
23353
|
+
const _path$getBoundingClie = path.getBoundingClientRect(),
|
|
23319
23354
|
width = _path$getBoundingClie.width,
|
|
23320
23355
|
height = _path$getBoundingClie.height,
|
|
23321
23356
|
items = getRectSegList(path),
|
|
@@ -23338,9 +23373,12 @@ function getPathBox(path) {
|
|
|
23338
23373
|
*/
|
|
23339
23374
|
function getPointer(event, element) {
|
|
23340
23375
|
var _ref,
|
|
23341
|
-
touches = event && ((_ref = event.touches || event.sourceEvent && event.sourceEvent.touches) == null ? void 0 : _ref[0]),
|
|
23342
|
-
pointer = src_pointer(touches || event, element),
|
|
23343
23376
|
_this5 = this;
|
|
23377
|
+
const touches = event && ((_ref = event.touches || event.sourceEvent && event.sourceEvent.touches) == null ? void 0 : _ref[0]);
|
|
23378
|
+
let pointer = [0, 0];
|
|
23379
|
+
try {
|
|
23380
|
+
pointer = src_pointer(touches || event, element);
|
|
23381
|
+
} catch (e) {}
|
|
23344
23382
|
return pointer.map(function (v) {
|
|
23345
23383
|
_newArrowCheck(this, _this5);
|
|
23346
23384
|
return isNaN(v) ? 0 : v;
|
|
@@ -23354,10 +23392,10 @@ function getPointer(event, element) {
|
|
|
23354
23392
|
* @private
|
|
23355
23393
|
*/
|
|
23356
23394
|
function getBrushSelection(ctx) {
|
|
23357
|
-
|
|
23395
|
+
const event = ctx.event,
|
|
23358
23396
|
$el = ctx.$el,
|
|
23359
23397
|
main = $el.subchart.main || $el.main;
|
|
23360
|
-
|
|
23398
|
+
let selection;
|
|
23361
23399
|
|
|
23362
23400
|
// check from event
|
|
23363
23401
|
if (event && event.type === "brush") {
|
|
@@ -23377,7 +23415,7 @@ function getBrushSelection(ctx) {
|
|
|
23377
23415
|
* @private
|
|
23378
23416
|
*/
|
|
23379
23417
|
function getBoundingRect(node) {
|
|
23380
|
-
|
|
23418
|
+
const needEvaluate = !("rect" in node) || "rect" in node && node.hasAttribute("width") && node.rect.width !== +node.getAttribute("width");
|
|
23381
23419
|
return needEvaluate ? node.rect = node.getBoundingClientRect() : node.rect;
|
|
23382
23420
|
}
|
|
23383
23421
|
|
|
@@ -23399,7 +23437,7 @@ function getRandom(asStr, min, max) {
|
|
|
23399
23437
|
if (max === void 0) {
|
|
23400
23438
|
max = 1e4;
|
|
23401
23439
|
}
|
|
23402
|
-
|
|
23440
|
+
const crpt = win.crypto || win.msCrypto,
|
|
23403
23441
|
rand = crpt ? min + crpt.getRandomValues(new Uint32Array(1))[0] % (max - min + 1) : Math.floor(Math.random() * (max - min) + min);
|
|
23404
23442
|
return asStr ? rand + "" : rand;
|
|
23405
23443
|
}
|
|
@@ -23418,8 +23456,8 @@ function findIndex(arr, v, start, end, isRotated) {
|
|
|
23418
23456
|
if (start > end) {
|
|
23419
23457
|
return -1;
|
|
23420
23458
|
}
|
|
23421
|
-
|
|
23422
|
-
|
|
23459
|
+
const mid = Math.floor((start + end) / 2);
|
|
23460
|
+
let _arr$mid = arr[mid],
|
|
23423
23461
|
x = _arr$mid.x,
|
|
23424
23462
|
_arr$mid$w = _arr$mid.w,
|
|
23425
23463
|
w = _arr$mid$w === void 0 ? 0 : _arr$mid$w;
|
|
@@ -23440,7 +23478,7 @@ function findIndex(arr, v, start, end, isRotated) {
|
|
|
23440
23478
|
* @private
|
|
23441
23479
|
*/
|
|
23442
23480
|
function brushEmpty(ctx) {
|
|
23443
|
-
|
|
23481
|
+
const selection = getBrushSelection(ctx);
|
|
23444
23482
|
if (selection) {
|
|
23445
23483
|
// brush selected area
|
|
23446
23484
|
// two-dimensional: [[x0, y0], [x1, y1]]
|
|
@@ -23457,17 +23495,19 @@ function brushEmpty(ctx) {
|
|
|
23457
23495
|
* @private
|
|
23458
23496
|
*/
|
|
23459
23497
|
function deepClone() {
|
|
23460
|
-
|
|
23461
|
-
|
|
23462
|
-
|
|
23463
|
-
|
|
23464
|
-
|
|
23465
|
-
|
|
23466
|
-
|
|
23467
|
-
return r;
|
|
23498
|
+
var _this6 = this;
|
|
23499
|
+
const _clone = function clone(v) {
|
|
23500
|
+
_newArrowCheck(this, _this6);
|
|
23501
|
+
if (isObject(v) && v.constructor) {
|
|
23502
|
+
const r = new v.constructor();
|
|
23503
|
+
for (const k in v) {
|
|
23504
|
+
r[k] = _clone(v[k]);
|
|
23468
23505
|
}
|
|
23469
|
-
return
|
|
23470
|
-
}
|
|
23506
|
+
return r;
|
|
23507
|
+
}
|
|
23508
|
+
return v;
|
|
23509
|
+
}.bind(this);
|
|
23510
|
+
for (var _len3 = arguments.length, objectN = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
23471
23511
|
objectN[_key3] = arguments[_key3];
|
|
23472
23512
|
}
|
|
23473
23513
|
return objectN.map(function (v) {
|
|
@@ -23499,7 +23539,7 @@ function util_extend(target, source) {
|
|
|
23499
23539
|
}
|
|
23500
23540
|
|
|
23501
23541
|
// exclude name with only numbers
|
|
23502
|
-
for (
|
|
23542
|
+
for (const p in source) {
|
|
23503
23543
|
if (/^\d+$/.test(p) || p in target) {
|
|
23504
23544
|
continue;
|
|
23505
23545
|
}
|
|
@@ -23514,7 +23554,7 @@ function util_extend(target, source) {
|
|
|
23514
23554
|
* @returns {string} capitalized string
|
|
23515
23555
|
* @private
|
|
23516
23556
|
*/
|
|
23517
|
-
|
|
23557
|
+
const capitalize = function (str) {
|
|
23518
23558
|
_newArrowCheck(this, util_this);
|
|
23519
23559
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
23520
23560
|
}.bind(undefined);
|
|
@@ -23543,7 +23583,7 @@ function camelize(str, separator) {
|
|
|
23543
23583
|
* @returns {Array}
|
|
23544
23584
|
* @private
|
|
23545
23585
|
*/
|
|
23546
|
-
|
|
23586
|
+
const toArray = function (v) {
|
|
23547
23587
|
_newArrowCheck(this, util_this);
|
|
23548
23588
|
return [].slice.call(v);
|
|
23549
23589
|
}.bind(undefined);
|
|
@@ -23557,8 +23597,8 @@ var toArray = function (v) {
|
|
|
23557
23597
|
* @private
|
|
23558
23598
|
*/
|
|
23559
23599
|
function addCssRules(style, selector, prop) {
|
|
23560
|
-
var _this9 = this
|
|
23561
|
-
|
|
23600
|
+
var _this9 = this;
|
|
23601
|
+
const rootSelctor = style.rootSelctor,
|
|
23562
23602
|
sheet = style.sheet,
|
|
23563
23603
|
getSelector = function (s) {
|
|
23564
23604
|
_newArrowCheck(this, _this9);
|
|
@@ -23575,8 +23615,8 @@ function addCssRules(style, selector, prop) {
|
|
|
23575
23615
|
* @private
|
|
23576
23616
|
*/
|
|
23577
23617
|
function getCssRules(styleSheets) {
|
|
23578
|
-
var _this10 = this
|
|
23579
|
-
|
|
23618
|
+
var _this10 = this;
|
|
23619
|
+
let rules = [];
|
|
23580
23620
|
styleSheets.forEach(function (sheet) {
|
|
23581
23621
|
_newArrowCheck(this, _this10);
|
|
23582
23622
|
try {
|
|
@@ -23598,7 +23638,7 @@ function getCssRules(styleSheets) {
|
|
|
23598
23638
|
* @private
|
|
23599
23639
|
*/
|
|
23600
23640
|
function getTranslation(node) {
|
|
23601
|
-
|
|
23641
|
+
const transform = node ? node.transform : null,
|
|
23602
23642
|
baseVal = transform && transform.baseVal;
|
|
23603
23643
|
return baseVal && baseVal.numberOfItems ? baseVal.getItem(0).matrix : {
|
|
23604
23644
|
a: 0,
|
|
@@ -23617,8 +23657,8 @@ function getTranslation(node) {
|
|
|
23617
23657
|
* @private
|
|
23618
23658
|
*/
|
|
23619
23659
|
function getUnique(data) {
|
|
23620
|
-
var _this11 = this
|
|
23621
|
-
|
|
23660
|
+
var _this11 = this;
|
|
23661
|
+
const isDate = data[0] instanceof Date,
|
|
23622
23662
|
d = (isDate ? data.map(Number) : data).filter(function (v, i, self) {
|
|
23623
23663
|
_newArrowCheck(this, _this11);
|
|
23624
23664
|
return self.indexOf(v) === i;
|
|
@@ -23657,11 +23697,11 @@ function mergeObj(target) {
|
|
|
23657
23697
|
if (!objectN.length || objectN.length === 1 && !objectN[0]) {
|
|
23658
23698
|
return target;
|
|
23659
23699
|
}
|
|
23660
|
-
|
|
23700
|
+
const source = objectN.shift();
|
|
23661
23701
|
if (isObject(target) && isObject(source)) {
|
|
23662
23702
|
Object.keys(source).forEach(function (key) {
|
|
23663
23703
|
_newArrowCheck(this, _this13);
|
|
23664
|
-
|
|
23704
|
+
const value = source[key];
|
|
23665
23705
|
if (isObject(value)) {
|
|
23666
23706
|
target[key] || (target[key] = {});
|
|
23667
23707
|
target[key] = mergeObj(target[key], value);
|
|
@@ -23685,7 +23725,7 @@ function sortValue(data, isAsc) {
|
|
|
23685
23725
|
if (isAsc === void 0) {
|
|
23686
23726
|
isAsc = !0;
|
|
23687
23727
|
}
|
|
23688
|
-
|
|
23728
|
+
let fn;
|
|
23689
23729
|
if (data[0] instanceof Date) {
|
|
23690
23730
|
fn = isAsc ? function (a, b) {
|
|
23691
23731
|
_newArrowCheck(this, _this14);
|
|
@@ -23718,11 +23758,11 @@ function sortValue(data, isAsc) {
|
|
|
23718
23758
|
* @private
|
|
23719
23759
|
*/
|
|
23720
23760
|
function getMinMax(type, data) {
|
|
23721
|
-
var _this15 = this
|
|
23722
|
-
|
|
23723
|
-
|
|
23724
|
-
|
|
23725
|
-
|
|
23761
|
+
var _this15 = this;
|
|
23762
|
+
let res = data.filter(function (v) {
|
|
23763
|
+
_newArrowCheck(this, _this15);
|
|
23764
|
+
return notEmpty(v);
|
|
23765
|
+
}.bind(this));
|
|
23726
23766
|
if (res.length) {
|
|
23727
23767
|
if (isNumber(res[0])) {
|
|
23728
23768
|
res = Math[type].apply(Math, res);
|
|
@@ -23743,14 +23783,14 @@ function getMinMax(type, data) {
|
|
|
23743
23783
|
* @returns {Array}
|
|
23744
23784
|
* @private
|
|
23745
23785
|
*/
|
|
23746
|
-
|
|
23786
|
+
const getRange = function (start, end, step) {
|
|
23747
23787
|
if (step === void 0) {
|
|
23748
23788
|
step = 1;
|
|
23749
23789
|
}
|
|
23750
23790
|
_newArrowCheck(this, util_this);
|
|
23751
|
-
|
|
23791
|
+
const res = [],
|
|
23752
23792
|
n = Math.max(0, Math.ceil((end - start) / step)) | 0;
|
|
23753
|
-
for (
|
|
23793
|
+
for (let i = start; i < n; i++) {
|
|
23754
23794
|
res.push(start + i * step);
|
|
23755
23795
|
}
|
|
23756
23796
|
return res;
|
|
@@ -23759,7 +23799,7 @@ var getRange = function (start, end, step) {
|
|
|
23759
23799
|
mouse: function () {
|
|
23760
23800
|
var _this16 = this;
|
|
23761
23801
|
_newArrowCheck(this, util_this);
|
|
23762
|
-
|
|
23802
|
+
const getParams = function () {
|
|
23763
23803
|
_newArrowCheck(this, _this16);
|
|
23764
23804
|
return {
|
|
23765
23805
|
bubbles: !1,
|
|
@@ -23787,7 +23827,7 @@ var getRange = function (start, end, step) {
|
|
|
23787
23827
|
params = getParams();
|
|
23788
23828
|
}
|
|
23789
23829
|
_newArrowCheck(this, _this16);
|
|
23790
|
-
|
|
23830
|
+
const mouseEvent = doc.createEvent("MouseEvent");
|
|
23791
23831
|
|
|
23792
23832
|
// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
|
|
23793
23833
|
mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0,
|
|
@@ -23799,7 +23839,7 @@ var getRange = function (start, end, step) {
|
|
|
23799
23839
|
}.bind(undefined)(),
|
|
23800
23840
|
touch: function touch(el, eventType, params) {
|
|
23801
23841
|
_newArrowCheck(this, util_this);
|
|
23802
|
-
|
|
23842
|
+
const touchObj = new Touch(mergeObj({
|
|
23803
23843
|
identifier: Date.now(),
|
|
23804
23844
|
target: el,
|
|
23805
23845
|
radiusX: 2.5,
|
|
@@ -23825,8 +23865,8 @@ var getRange = function (start, end, step) {
|
|
|
23825
23865
|
* @private
|
|
23826
23866
|
*/
|
|
23827
23867
|
function tplProcess(tpl, data) {
|
|
23828
|
-
|
|
23829
|
-
for (
|
|
23868
|
+
let res = tpl;
|
|
23869
|
+
for (const x in data) {
|
|
23830
23870
|
res = res.replace(new RegExp("{=" + x + "}", "g"), data[x]);
|
|
23831
23871
|
}
|
|
23832
23872
|
return res;
|
|
@@ -23840,13 +23880,14 @@ function tplProcess(tpl, data) {
|
|
|
23840
23880
|
* @private
|
|
23841
23881
|
*/
|
|
23842
23882
|
function parseDate(date) {
|
|
23843
|
-
|
|
23883
|
+
let parsedDate;
|
|
23844
23884
|
if (date instanceof Date) {
|
|
23845
23885
|
parsedDate = date;
|
|
23846
23886
|
} else if (isString(date)) {
|
|
23847
|
-
var _format$dataTime
|
|
23848
|
-
|
|
23887
|
+
var _format$dataTime;
|
|
23888
|
+
const config = this.config,
|
|
23849
23889
|
format = this.format;
|
|
23890
|
+
|
|
23850
23891
|
// if fails to parse, try by new Date()
|
|
23851
23892
|
// https://github.com/naver/billboard.js/issues/1714
|
|
23852
23893
|
parsedDate = (_format$dataTime = format.dataTime(config.data_xFormat)(date)) != null ? _format$dataTime : new Date(date);
|
|
@@ -23876,11 +23917,11 @@ function isTabVisible() {
|
|
|
23876
23917
|
* @private
|
|
23877
23918
|
*/
|
|
23878
23919
|
function convertInputType(mouse, touch) {
|
|
23879
|
-
var _this17 = this
|
|
23880
|
-
|
|
23920
|
+
var _this17 = this;
|
|
23921
|
+
const DocumentTouch = win.DocumentTouch,
|
|
23881
23922
|
matchMedia = win.matchMedia,
|
|
23882
|
-
navigator = win.navigator
|
|
23883
|
-
|
|
23923
|
+
navigator = win.navigator;
|
|
23924
|
+
let hasTouch = !1;
|
|
23884
23925
|
if (touch) {
|
|
23885
23926
|
// Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/
|
|
23886
23927
|
if (navigator && "maxTouchPoints" in navigator) {
|
|
@@ -23896,7 +23937,7 @@ function convertInputType(mouse, touch) {
|
|
|
23896
23937
|
hasTouch = !0;
|
|
23897
23938
|
} else {
|
|
23898
23939
|
// Only as a last resort, fall back to user agent sniffing
|
|
23899
|
-
|
|
23940
|
+
const UA = navigator.userAgent;
|
|
23900
23941
|
hasTouch = /\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(UA) || /\b(Android|Windows Phone|iPad|iPod)\b/i.test(UA);
|
|
23901
23942
|
}
|
|
23902
23943
|
}
|
|
@@ -23905,7 +23946,7 @@ function convertInputType(mouse, touch) {
|
|
|
23905
23946
|
// Check if agent has mouse using any-hover, touch devices (e.g iPad) with external mouse will return true as long as mouse is connected
|
|
23906
23947
|
// https://css-tricks.com/interaction-media-features-and-their-potential-for-incorrect-assumptions/#aa-testing-the-capabilities-of-all-inputs
|
|
23907
23948
|
// Demo: https://patrickhlauke.github.io/touch/pointer-hover-any-pointer-any-hover/
|
|
23908
|
-
|
|
23949
|
+
const hasMouse = mouse && ["any-hover:hover", "any-pointer:fine"].some(function (v) {
|
|
23909
23950
|
_newArrowCheck(this, _this17);
|
|
23910
23951
|
return matchMedia == null ? void 0 : matchMedia("(" + v + ")").matches;
|
|
23911
23952
|
}.bind(this));
|
|
@@ -23944,22 +23985,20 @@ function runUntil(fn, conditionFn) {
|
|
|
23944
23985
|
* @private
|
|
23945
23986
|
*/
|
|
23946
23987
|
function loadConfig(config) {
|
|
23947
|
-
var _this = this
|
|
23948
|
-
|
|
23949
|
-
|
|
23950
|
-
|
|
23951
|
-
|
|
23952
|
-
|
|
23953
|
-
|
|
23954
|
-
|
|
23955
|
-
|
|
23956
|
-
|
|
23957
|
-
|
|
23958
|
-
|
|
23959
|
-
|
|
23960
|
-
|
|
23961
|
-
return undefined;
|
|
23962
|
-
}.bind(this);
|
|
23988
|
+
var _this = this;
|
|
23989
|
+
const thisConfig = this.config;
|
|
23990
|
+
let target, keys, read;
|
|
23991
|
+
const _find = function find() {
|
|
23992
|
+
_newArrowCheck(this, _this);
|
|
23993
|
+
const key = keys.shift();
|
|
23994
|
+
if (key && target && isObjectType(target) && key in target) {
|
|
23995
|
+
target = target[key];
|
|
23996
|
+
return _find();
|
|
23997
|
+
} else if (!key) {
|
|
23998
|
+
return target;
|
|
23999
|
+
}
|
|
24000
|
+
return undefined;
|
|
24001
|
+
}.bind(this);
|
|
23963
24002
|
Object.keys(thisConfig).forEach(function (key) {
|
|
23964
24003
|
_newArrowCheck(this, _this);
|
|
23965
24004
|
target = config;
|
|
@@ -24035,7 +24074,7 @@ function tableview_objectSpread(e) { for (var r = 1, t; r < arguments.length; r+
|
|
|
24035
24074
|
* ]
|
|
24036
24075
|
* })
|
|
24037
24076
|
*/
|
|
24038
|
-
|
|
24077
|
+
let TableView = /*#__PURE__*/function (_Plugin) {
|
|
24039
24078
|
_inheritsLoose(TableView, _Plugin);
|
|
24040
24079
|
function TableView(options) {
|
|
24041
24080
|
var _this = _Plugin.call(this, options) || this;
|
|
@@ -24049,26 +24088,26 @@ var TableView = /*#__PURE__*/function (_Plugin) {
|
|
|
24049
24088
|
loadConfig.call(this, this.options);
|
|
24050
24089
|
};
|
|
24051
24090
|
_proto.$init = function $init() {
|
|
24052
|
-
var _element$classList
|
|
24053
|
-
|
|
24091
|
+
var _element$classList;
|
|
24092
|
+
const _this$config = this.config,
|
|
24054
24093
|
className = _this$config.class,
|
|
24055
24094
|
selector = _this$config.selector,
|
|
24056
|
-
style = _this$config.style
|
|
24057
|
-
|
|
24095
|
+
style = _this$config.style;
|
|
24096
|
+
let element = document.querySelector(selector || "." + (className || defaultStyle.class));
|
|
24058
24097
|
if (!element) {
|
|
24059
|
-
|
|
24098
|
+
const chart = this.$$.$el.chart.node();
|
|
24060
24099
|
element = document.createElement("table");
|
|
24061
24100
|
chart.parentNode.insertBefore(element, chart.nextSibling);
|
|
24062
24101
|
}
|
|
24063
24102
|
if (element.tagName !== "TABLE") {
|
|
24064
|
-
|
|
24103
|
+
const table = document.createElement("table");
|
|
24065
24104
|
element.appendChild(table);
|
|
24066
24105
|
element = table;
|
|
24067
24106
|
}
|
|
24068
24107
|
|
|
24069
24108
|
// append default css style
|
|
24070
24109
|
if (style && !document.getElementById(defaultStyle.id)) {
|
|
24071
|
-
|
|
24110
|
+
const s = document.createElement("style");
|
|
24072
24111
|
s.id = defaultStyle.id;
|
|
24073
24112
|
s.innerHTML = defaultStyle.rule;
|
|
24074
24113
|
(document.head || document.getElementsByTagName("head")[0]).appendChild(s);
|
|
@@ -24082,16 +24121,16 @@ var TableView = /*#__PURE__*/function (_Plugin) {
|
|
|
24082
24121
|
* @private
|
|
24083
24122
|
*/;
|
|
24084
24123
|
_proto.generateTable = function generateTable() {
|
|
24085
|
-
var _this2 = this
|
|
24086
|
-
|
|
24124
|
+
var _this2 = this;
|
|
24125
|
+
const $$ = this.$$,
|
|
24087
24126
|
config = this.config,
|
|
24088
24127
|
element = this.element,
|
|
24089
|
-
dataToShow = $$.filterTargetsToShow($$.data.targets)
|
|
24090
|
-
|
|
24128
|
+
dataToShow = $$.filterTargetsToShow($$.data.targets);
|
|
24129
|
+
let thead = tplProcess(tpl.thead, {
|
|
24091
24130
|
title: dataToShow.length ? this.config.categoryTitle : ""
|
|
24092
24131
|
}),
|
|
24093
|
-
tbody = ""
|
|
24094
|
-
|
|
24132
|
+
tbody = "";
|
|
24133
|
+
const rows = [];
|
|
24095
24134
|
dataToShow.forEach(function (v) {
|
|
24096
24135
|
var _this3 = this;
|
|
24097
24136
|
_newArrowCheck(this, _this2);
|
|
@@ -24118,25 +24157,26 @@ var TableView = /*#__PURE__*/function (_Plugin) {
|
|
|
24118
24157
|
});
|
|
24119
24158
|
}.bind(this)).join("") + "</tr>";
|
|
24120
24159
|
}.bind(this));
|
|
24121
|
-
|
|
24160
|
+
const r = tplProcess(tpl.body, tableview_objectSpread(tableview_objectSpread({}, config), {}, {
|
|
24122
24161
|
title: config.title || $$.config.title_text || "",
|
|
24123
24162
|
thead: thead,
|
|
24124
24163
|
tbody: tbody
|
|
24125
|
-
})).replace(
|
|
24164
|
+
})).replace(/(<\/?(script|img)[^>]*>|<[^>]+><\/[^>]+>)/ig, "");
|
|
24126
24165
|
element.innerHTML = r;
|
|
24127
24166
|
};
|
|
24128
24167
|
_proto.$redraw = function $redraw() {
|
|
24129
|
-
|
|
24168
|
+
const state = this.$$.state,
|
|
24130
24169
|
doNotUpdate = state.resizing || !this.config.updateOnToggle && state.toggling;
|
|
24131
24170
|
doNotUpdate || this.generateTable();
|
|
24132
24171
|
};
|
|
24133
24172
|
_proto.$willDestroy = function $willDestroy() {
|
|
24134
|
-
|
|
24173
|
+
var _this$element$parentN;
|
|
24174
|
+
(_this$element$parentN = this.element.parentNode) == null || _this$element$parentN.removeChild(this.element);
|
|
24135
24175
|
|
|
24136
24176
|
// remove default css style when left one chart instance
|
|
24137
24177
|
if (this.$$.charts.length === 1) {
|
|
24138
|
-
var _s$parentNode
|
|
24139
|
-
|
|
24178
|
+
var _s$parentNode;
|
|
24179
|
+
const s = document.getElementById(defaultStyle.id);
|
|
24140
24180
|
s == null || (_s$parentNode = s.parentNode) == null || _s$parentNode.removeChild(s);
|
|
24141
24181
|
}
|
|
24142
24182
|
};
|