billboard.js 3.5.0-next.1 → 3.5.1
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 +5 -2
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +795 -461
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +1968 -1320
- package/dist/billboard.pkgd.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +72 -27
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +72 -27
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +72 -27
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +72 -27
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +1172 -858
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +1243 -884
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +1244 -885
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +1245 -886
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +1246 -887
- package/dist/theme/datalab.css +1 -1
- package/dist/theme/datalab.min.css +1 -1
- package/dist/theme/graph.css +1 -1
- package/dist/theme/graph.min.css +1 -1
- package/dist/theme/insight.css +1 -1
- package/dist/theme/insight.min.css +1 -1
- package/dist-esm/billboard.js +662 -368
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +4 -3
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +4 -3
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +4 -3
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +4 -3
- package/package.json +26 -26
- package/src/Chart/api/chart.ts +4 -1
- package/src/Chart/api/data.ts +2 -2
- package/src/Chart/api/flow.ts +125 -115
- package/src/Chart/api/selection.ts +1 -1
- package/src/ChartInternal/Axis/AxisRenderer.ts +1 -1
- package/src/ChartInternal/Axis/AxisRendererHelper.ts +1 -1
- package/src/ChartInternal/ChartInternal.ts +39 -18
- package/src/ChartInternal/data/IData.ts +2 -2
- package/src/ChartInternal/data/convert.helper.ts +226 -0
- package/src/ChartInternal/data/convert.ts +44 -210
- package/src/ChartInternal/data/data.ts +1 -1
- package/src/ChartInternal/data/load.ts +5 -4
- package/src/ChartInternal/interactions/drag.ts +1 -1
- package/src/ChartInternal/internals/class.ts +1 -1
- package/src/ChartInternal/internals/color.ts +39 -41
- package/src/ChartInternal/internals/domain.ts +1 -1
- package/src/ChartInternal/internals/format.ts +1 -1
- package/src/ChartInternal/internals/legend.ts +21 -6
- package/src/ChartInternal/internals/region.ts +1 -1
- package/src/ChartInternal/internals/scale.ts +1 -1
- package/src/ChartInternal/internals/size.axis.ts +1 -1
- package/src/ChartInternal/internals/style.ts +54 -0
- package/src/ChartInternal/internals/text.ts +6 -6
- package/src/ChartInternal/internals/tooltip.ts +1 -1
- package/src/ChartInternal/shape/arc.ts +6 -5
- package/src/ChartInternal/shape/area.ts +16 -8
- package/src/ChartInternal/shape/bar.ts +13 -10
- package/src/ChartInternal/shape/line.ts +3 -2
- package/src/ChartInternal/shape/point.ts +16 -10
- package/src/ChartInternal/shape/polar.ts +2 -2
- package/src/ChartInternal/shape/shape.ts +2 -2
- package/src/Plugin/sparkline/index.ts +1 -1
- package/src/Plugin/textoverlap/index.ts +5 -2
- package/src/config/Options/Options.ts +2 -0
- package/src/config/Options/common/boost.ts +31 -0
- package/src/config/Options/data/data.ts +1 -1
- package/src/config/Options/shape/area.ts +6 -1
- package/src/config/Store/Element.ts +1 -1
- package/src/config/Store/State.ts +3 -0
- package/src/module/Cache.ts +1 -1
- package/src/module/browser.ts +2 -1
- package/src/module/generator.ts +8 -13
- package/src/module/util.ts +41 -1
- package/src/module/worker.ts +101 -0
- package/types/axis.d.ts +2 -2
- package/types/options.d.ts +24 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.5.
|
|
8
|
+
* @version 3.5.1
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -201,7 +201,7 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
201
201
|
return Plugin;
|
|
202
202
|
}();
|
|
203
203
|
|
|
204
|
-
Plugin.version = "3.5.
|
|
204
|
+
Plugin.version = "3.5.1";
|
|
205
205
|
|
|
206
206
|
;// CONCATENATED MODULE: ./src/Plugin/bubblecompare/index.ts
|
|
207
207
|
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.5.
|
|
8
|
+
* @version 3.5.1
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
12
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e=[,function(e){e.exports=t}],n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}i.d(r,{default:function(){return u}});var o=i(1),s=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();s.version="3.5.
|
|
12
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e=[,function(e){e.exports=t}],n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}i.d(r,{default:function(){return u}});var o=i(1),s=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();s.version="3.5.1";var u=function(i){var r,s;function u(t){var n=i.call(this,t)||this;return n.$$=void 0,e(n)||e(n)}s=i,(r=u).prototype=Object.create(s.prototype),r.prototype.constructor=r,n(r,s);var a=u.prototype;return a.$init=function(){var t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},a.pointExpandedR=function(t){var e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,o.select)(t.node().parentNode.parentNode).raise()},a.changeCursorPoint=function(){this.$$.$el.svg.select(".bb-event-rect").style("cursor","pointer")},a.findClosest=function(e,n){var i=this,r=this.$$;return e.filter(function(e){return t(this,i),e&&!r.isBarType(e.id)}.bind(this)).reduce(function(e,o){return t(this,i),r.dist(o,n)<this.getBubbleR(o)?o:e}.bind(this),0)},a.getBubbleR=function(e){var n=this,i=this.options,r=i.minR,o=i.maxR,s=this.getZData(e);if(!s)return r;var u=this.$$.data.targets.reduce(function(e,i){var r=e[0],o=e[1];t(this,n);var s=this.getZData(i.values[0]);return[Math.min(r,s),Math.max(o,s)]}.bind(this),[1e4,0]),a=u[0],c=u[1],f=a>0&&c===a?0:s/c;return Math.abs(f)*(o-r)+r},a.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(s);u.version="0.0.1"}(),r=r.default}()}));
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.5.
|
|
8
|
+
* @version 3.5.1
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -384,7 +384,7 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
384
384
|
return Plugin;
|
|
385
385
|
}();
|
|
386
386
|
|
|
387
|
-
Plugin.version = "3.5.
|
|
387
|
+
Plugin.version = "3.5.1";
|
|
388
388
|
|
|
389
389
|
;// CONCATENATED MODULE: ./src/Plugin/sparkline/Options.ts
|
|
390
390
|
/**
|
|
@@ -453,12 +453,13 @@ win.requestIdleCallback = win.requestIdleCallback || function (cb) {
|
|
|
453
453
|
_newArrowCheck(this, _this);
|
|
454
454
|
|
|
455
455
|
return setTimeout(cb, 1);
|
|
456
|
-
}.bind(undefined);
|
|
456
|
+
}.bind(undefined); // win.cancelIdleCallback = win.cancelIdleCallback || (id => clearTimeout(id));
|
|
457
|
+
|
|
457
458
|
|
|
458
|
-
win.
|
|
459
|
+
win.requestAnimationFrame = win.requestAnimationFrame || function (cb) {
|
|
459
460
|
_newArrowCheck(this, _this);
|
|
460
461
|
|
|
461
|
-
return
|
|
462
|
+
return setTimeout(cb, 1);
|
|
462
463
|
}.bind(undefined);
|
|
463
464
|
|
|
464
465
|
var doc = win == null ? void 0 : win.document;
|
|
@@ -1017,6 +1018,29 @@ var toArray = function (v) {
|
|
|
1017
1018
|
|
|
1018
1019
|
return [].slice.call(v);
|
|
1019
1020
|
}.bind(undefined);
|
|
1021
|
+
/**
|
|
1022
|
+
* Add CSS rules
|
|
1023
|
+
* @param {object} style Style object
|
|
1024
|
+
* @param {string} selector Selector string
|
|
1025
|
+
* @param {Array} prop Prps arrary
|
|
1026
|
+
* @returns {number} Newely added rule index
|
|
1027
|
+
* @private
|
|
1028
|
+
*/
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
function addCssRules(style, selector, prop) {
|
|
1032
|
+
var _this9 = this,
|
|
1033
|
+
rootSelctor = style.rootSelctor,
|
|
1034
|
+
sheet = style.sheet,
|
|
1035
|
+
getSelector = function (s) {
|
|
1036
|
+
_newArrowCheck(this, _this9);
|
|
1037
|
+
|
|
1038
|
+
return s.replace(/\s?(bb-)/g, ".$1").replace(/\.+/g, ".");
|
|
1039
|
+
}.bind(this),
|
|
1040
|
+
rule = rootSelctor + " " + getSelector(selector) + " {" + prop.join(";") + "}";
|
|
1041
|
+
|
|
1042
|
+
return sheet[sheet.insertRule ? "insertRule" : "addRule"](rule, sheet.cssRules.length);
|
|
1043
|
+
}
|
|
1020
1044
|
/**
|
|
1021
1045
|
* Get css rules for specified stylesheets
|
|
1022
1046
|
* @param {Array} styleSheets The stylesheets to get the rules from
|
|
@@ -1026,11 +1050,11 @@ var toArray = function (v) {
|
|
|
1026
1050
|
|
|
1027
1051
|
|
|
1028
1052
|
function getCssRules(styleSheets) {
|
|
1029
|
-
var
|
|
1053
|
+
var _this10 = this,
|
|
1030
1054
|
rules = [];
|
|
1031
1055
|
|
|
1032
1056
|
styleSheets.forEach(function (sheet) {
|
|
1033
|
-
_newArrowCheck(this,
|
|
1057
|
+
_newArrowCheck(this, _this10);
|
|
1034
1058
|
|
|
1035
1059
|
try {
|
|
1036
1060
|
if (sheet.cssRules && sheet.cssRules.length) {
|
|
@@ -1071,16 +1095,16 @@ function getTranslation(node) {
|
|
|
1071
1095
|
|
|
1072
1096
|
|
|
1073
1097
|
function getUnique(data) {
|
|
1074
|
-
var
|
|
1098
|
+
var _this11 = this,
|
|
1075
1099
|
isDate = data[0] instanceof Date,
|
|
1076
1100
|
d = (isDate ? data.map(Number) : data).filter(function (v, i, self) {
|
|
1077
|
-
_newArrowCheck(this,
|
|
1101
|
+
_newArrowCheck(this, _this11);
|
|
1078
1102
|
|
|
1079
1103
|
return self.indexOf(v) === i;
|
|
1080
1104
|
}.bind(this));
|
|
1081
1105
|
|
|
1082
1106
|
return isDate ? d.map(function (v) {
|
|
1083
|
-
_newArrowCheck(this,
|
|
1107
|
+
_newArrowCheck(this, _this11);
|
|
1084
1108
|
|
|
1085
1109
|
return new Date(v);
|
|
1086
1110
|
}.bind(this)) : d;
|
|
@@ -1094,10 +1118,10 @@ function getUnique(data) {
|
|
|
1094
1118
|
|
|
1095
1119
|
|
|
1096
1120
|
function mergeArray(arr) {
|
|
1097
|
-
var
|
|
1121
|
+
var _this12 = this;
|
|
1098
1122
|
|
|
1099
1123
|
return arr && arr.length ? arr.reduce(function (p, c) {
|
|
1100
|
-
_newArrowCheck(this,
|
|
1124
|
+
_newArrowCheck(this, _this12);
|
|
1101
1125
|
|
|
1102
1126
|
return p.concat(c);
|
|
1103
1127
|
}.bind(this)) : [];
|
|
@@ -1112,7 +1136,7 @@ function mergeArray(arr) {
|
|
|
1112
1136
|
|
|
1113
1137
|
|
|
1114
1138
|
function mergeObj(target) {
|
|
1115
|
-
for (var
|
|
1139
|
+
for (var _this13 = this, _len4 = arguments.length, objectN = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
|
1116
1140
|
objectN[_key4 - 1] = arguments[_key4];
|
|
1117
1141
|
}
|
|
1118
1142
|
|
|
@@ -1124,7 +1148,7 @@ function mergeObj(target) {
|
|
|
1124
1148
|
|
|
1125
1149
|
if (isObject(target) && isObject(source)) {
|
|
1126
1150
|
Object.keys(source).forEach(function (key) {
|
|
1127
|
-
_newArrowCheck(this,
|
|
1151
|
+
_newArrowCheck(this, _this13);
|
|
1128
1152
|
|
|
1129
1153
|
var value = source[key];
|
|
1130
1154
|
|
|
@@ -1149,7 +1173,7 @@ function mergeObj(target) {
|
|
|
1149
1173
|
|
|
1150
1174
|
|
|
1151
1175
|
function sortValue(data, isAsc) {
|
|
1152
|
-
var
|
|
1176
|
+
var _this14 = this;
|
|
1153
1177
|
|
|
1154
1178
|
if (isAsc === void 0) {
|
|
1155
1179
|
isAsc = !0;
|
|
@@ -1159,24 +1183,24 @@ function sortValue(data, isAsc) {
|
|
|
1159
1183
|
|
|
1160
1184
|
if (data[0] instanceof Date) {
|
|
1161
1185
|
fn = isAsc ? function (a, b) {
|
|
1162
|
-
_newArrowCheck(this,
|
|
1186
|
+
_newArrowCheck(this, _this14);
|
|
1163
1187
|
|
|
1164
1188
|
return a - b;
|
|
1165
1189
|
}.bind(this) : function (a, b) {
|
|
1166
|
-
_newArrowCheck(this,
|
|
1190
|
+
_newArrowCheck(this, _this14);
|
|
1167
1191
|
|
|
1168
1192
|
return b - a;
|
|
1169
1193
|
}.bind(this);
|
|
1170
1194
|
} else {
|
|
1171
1195
|
if (isAsc && !data.every(isNaN)) {
|
|
1172
1196
|
fn = function (a, b) {
|
|
1173
|
-
_newArrowCheck(this,
|
|
1197
|
+
_newArrowCheck(this, _this14);
|
|
1174
1198
|
|
|
1175
1199
|
return a - b;
|
|
1176
1200
|
}.bind(this);
|
|
1177
1201
|
} else if (!isAsc) {
|
|
1178
1202
|
fn = function (a, b) {
|
|
1179
|
-
_newArrowCheck(this,
|
|
1203
|
+
_newArrowCheck(this, _this14);
|
|
1180
1204
|
|
|
1181
1205
|
return a > b && -1 || a < b && 1 || a === b && 0;
|
|
1182
1206
|
}.bind(this);
|
|
@@ -1195,9 +1219,9 @@ function sortValue(data, isAsc) {
|
|
|
1195
1219
|
|
|
1196
1220
|
|
|
1197
1221
|
function getMinMax(type, data) {
|
|
1198
|
-
var
|
|
1222
|
+
var _this15 = this,
|
|
1199
1223
|
res = data.filter(function (v) {
|
|
1200
|
-
_newArrowCheck(this,
|
|
1224
|
+
_newArrowCheck(this, _this15);
|
|
1201
1225
|
|
|
1202
1226
|
return notEmpty(v);
|
|
1203
1227
|
}.bind(this));
|
|
@@ -1242,12 +1266,12 @@ var getRange = function (start, end, step) {
|
|
|
1242
1266
|
}.bind(undefined),
|
|
1243
1267
|
emulateEvent = {
|
|
1244
1268
|
mouse: function () {
|
|
1245
|
-
var
|
|
1269
|
+
var _this16 = this;
|
|
1246
1270
|
|
|
1247
1271
|
_newArrowCheck(this, util_this);
|
|
1248
1272
|
|
|
1249
1273
|
var getParams = function () {
|
|
1250
|
-
_newArrowCheck(this,
|
|
1274
|
+
_newArrowCheck(this, _this16);
|
|
1251
1275
|
|
|
1252
1276
|
return {
|
|
1253
1277
|
bubbles: !1,
|
|
@@ -1267,7 +1291,7 @@ var getRange = function (start, end, step) {
|
|
|
1267
1291
|
params = getParams();
|
|
1268
1292
|
}
|
|
1269
1293
|
|
|
1270
|
-
_newArrowCheck(this,
|
|
1294
|
+
_newArrowCheck(this, _this16);
|
|
1271
1295
|
|
|
1272
1296
|
el.dispatchEvent(new MouseEvent(eventType, params));
|
|
1273
1297
|
}.bind(this);
|
|
@@ -1278,7 +1302,7 @@ var getRange = function (start, end, step) {
|
|
|
1278
1302
|
params = getParams();
|
|
1279
1303
|
}
|
|
1280
1304
|
|
|
1281
|
-
_newArrowCheck(this,
|
|
1305
|
+
_newArrowCheck(this, _this16);
|
|
1282
1306
|
|
|
1283
1307
|
var mouseEvent = doc.createEvent("MouseEvent"); // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
|
|
1284
1308
|
|
|
@@ -1379,7 +1403,7 @@ function isTabVisible() {
|
|
|
1379
1403
|
|
|
1380
1404
|
|
|
1381
1405
|
function convertInputType(mouse, touch) {
|
|
1382
|
-
var
|
|
1406
|
+
var _this17 = this,
|
|
1383
1407
|
DocumentTouch = win.DocumentTouch,
|
|
1384
1408
|
matchMedia = win.matchMedia,
|
|
1385
1409
|
navigator = win.navigator,
|
|
@@ -1408,13 +1432,34 @@ function convertInputType(mouse, touch) {
|
|
|
1408
1432
|
|
|
1409
1433
|
|
|
1410
1434
|
var hasMouse = mouse && ["any-hover:hover", "any-pointer:fine"].some(function (v) {
|
|
1411
|
-
_newArrowCheck(this,
|
|
1435
|
+
_newArrowCheck(this, _this17);
|
|
1412
1436
|
|
|
1413
1437
|
return matchMedia == null ? void 0 : matchMedia("(" + v + ")").matches;
|
|
1414
1438
|
}.bind(this)); // fallback to 'mouse' if no input type is detected.
|
|
1415
1439
|
|
|
1416
1440
|
return hasMouse && "mouse" || hasTouch && "touch" || "mouse";
|
|
1417
1441
|
}
|
|
1442
|
+
/**
|
|
1443
|
+
* Run function until given condition function return true
|
|
1444
|
+
* @param {Function} fn Function to be executed when condition is true
|
|
1445
|
+
* @param {Function} conditionFn Condition function to check if condition is true
|
|
1446
|
+
* @private
|
|
1447
|
+
*/
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
function runUntil(fn, conditionFn) {
|
|
1451
|
+
var _this18 = this;
|
|
1452
|
+
|
|
1453
|
+
if (conditionFn() === !1) {
|
|
1454
|
+
win.requestAnimationFrame(function () {
|
|
1455
|
+
_newArrowCheck(this, _this18);
|
|
1456
|
+
|
|
1457
|
+
return runUntil(fn, conditionFn);
|
|
1458
|
+
}.bind(this));
|
|
1459
|
+
} else {
|
|
1460
|
+
fn();
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1418
1463
|
;// CONCATENATED MODULE: ./src/config/config.ts
|
|
1419
1464
|
|
|
1420
1465
|
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.5.
|
|
8
|
+
* @version 3.5.1
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
12
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],t):"object"==typeof exports?exports.bb=t(require("d3-selection"),require("d3-brush")):(e.bb=e.bb||{},e.bb.plugin=e.bb.plugin||{},e.bb.plugin.sparkline=t(e.d3,e.d3))}(this,(function(e,t){return function(){"use strict";var n=[,function(t){t.exports=e},,function(e){e.exports=t}],i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={exports:{}};return n[e](o,o.exports,r),o.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){function e(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function a(e){for(var t,n=1;n<arguments.length;n++)t=null!=arguments[n]?arguments[n]:{},n%2?s(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}r.d(o,{default:function(){return E}});var c={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"},b=(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({},c),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),{tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"}),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"}),function(){function t(e){void 0===e&&(e={}),this.$$=void 0,this.options=void 0,this.options=e}var n=t.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var t=this;Object.keys(this).forEach(function(n){e(this,t),this[n]=null,delete this[n]}.bind(this))},t}());b.version="3.5.0-next.1";var l=function(){return{selector:void 0}},d=(r(1),r(3),void 0),u=function(){return e(this,d),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)();u.requestIdleCallback=u.requestIdleCallback||function(t){return e(this,d),setTimeout(t,1)}.bind(void 0),u.cancelIdleCallback=u.cancelIdleCallback||function(t){return e(this,d),clearTimeout(t)}.bind(void 0);var h=null==u?void 0:u.document,f=void 0;(function(t){return e(this,f),t||0===t}).bind(void 0),function(t){return e(this,f),"function"==typeof t}.bind(void 0);var v=function(t){return e(this,f),"string"==typeof t}.bind(void 0),g=function(t){return e(this,f),"number"==typeof t}.bind(void 0),p=function(t){return e(this,f),void 0===t}.bind(void 0),y=function(t){return e(this,f),void 0!==t}.bind(void 0),m=(function(t){return e(this,f),"boolean"==typeof t}.bind(void 0),function(t){return e(this,f),10*Math.ceil(t/10)}.bind(void 0),function(t){return e(this,f),Math.ceil(t)+.5}.bind(void 0),function(t){return e(this,f),t[1]-t[0]}.bind(void 0),function(t){return e(this,f),"object"==typeof t}.bind(void 0)),x=function(t){return e(this,f),p(t)||null===t||v(t)&&0===t.length||m(t)&&!(t instanceof Date)&&0===Object.keys(t).length||g(t)&&isNaN(t)}.bind(void 0),O=(function(t){return e(this,f),!x(t)}.bind(void 0),function(t){return e(this,f),Array.isArray(t)}.bind(void 0)),j=function(t){return e(this,f),t&&!(null!=t&&t.nodeType)&&m(t)&&!O(t)}.bind(void 0);(function(t){return e(this,f),t.charAt(0).toUpperCase()+t.slice(1)}).bind(void 0);(function(t){return e(this,f),[].slice.call(t)}).bind(void 0);function $(t){for(var n=this,i=arguments.length,r=Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];if(!r.length||1===r.length&&!r[0])return t;var s=r.shift();return j(t)&&j(s)&&Object.keys(s).forEach(function(i){e(this,n);var r=s[i];j(r)?(t[i]||(t[i]={}),t[i]=$(t[i],r)):t[i]=O(r)?r.concat():r}.bind(this)),$.apply(void 0,[t].concat(r))}(function(t,n,i){void 0===i&&(i=1),e(this,f);for(var r=[],o=0|Math.max(0,Math.ceil((n-t)/i)),s=t;s<o;s++)r.push(t+s*i);return r}).bind(void 0),function(){var t=this;e(this,f);var n=function(){return e(this,t),{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}}.bind(this);try{return new MouseEvent("t"),function(i,r,o){void 0===o&&(o=n()),e(this,t),i.dispatchEvent(new MouseEvent(r,o))}.bind(this)}catch(i){return function(i,r,o){void 0===o&&(o=n()),e(this,t);var s=h.createEvent("MouseEvent");s.initMouseEvent(r,o.bubbles,o.cancelable,u,0,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),i.dispatchEvent(s)}.bind(this)}}.bind(void 0)(),function(t,n,i){e(this,f);var r=new Touch($({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},i));t.dispatchEvent(new TouchEvent(n,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}.bind(void 0);function w(t){var n,i,r,o=this,s=this.config,a=function(){e(this,o);var t=i.shift();return t&&n&&m(n)&&t in n?(n=n[t],a()):t?void 0:n}.bind(this);Object.keys(s).forEach(function(c){e(this,o),n=t,i=c.split("_"),r=a(),y(r)&&(s[c]=r)}.bind(this))}var E=function(i){var r,o;function s(e){var n=i.call(this,e)||this;return n.config=void 0,n.element=void 0,n.config=new l,t(n)||t(n)}o=i,(r=s).prototype=Object.create(o.prototype),r.prototype.constructor=r,n(r,o);var a=s.prototype;return a.$beforeInit=function(){w.call(this,this.options),this.validate(),this.element=[].slice.call(document.querySelectorAll(this.config.selector)),this.overrideInternals(),this.overrideOptions(),this.overHandler=this.overHandler.bind(this),this.moveHandler=this.moveHandler.bind(this),this.outHandler=this.outHandler.bind(this)},a.validate=function(){var e=this.$$,t=this.config,n="";if(t.selector&&document.querySelector(t.selector)||(n="No holder elements found from given selector option."),(e.hasType("bubble")||e.hasType("scatter")||e.hasArcType(e.data.targets))&&(n="Contains non supported chart types."),n)throw new Error("[Sparkline plugin] "+n)},a.overrideInternals=function(){var e=this.$$,t=e.getBarW,n=e.getIndices;e.getIndices=function(e,t,i){return"getShapeX"===i?{}:n.call(this,e,t)},e.getBarW=function(e,n){return t.call(this,e,n,1)}},a.overrideOptions=function(){var t=this,n=this.$$.config;if(n.legend_show=!1,n.resize_auto=!1,n.axis_x_show=!1,!1!==n.padding){var i=function(n){return e(this,t),Object.keys(n||{}).length>0}.bind(this);i(n.axis_x_padding)&&(n.axis_x_padding={left:15,right:15,unit:"px"}),i(n.axis_y_padding)&&(n.axis_y_padding=5)}n.axis_y_show=!1,n.tooltip_position||(n.tooltip_position=function(e,t,n){var i=this.internal.state.event,r=i.pageY-1.35*n,o=i.pageX-t/2;return r<0&&(r=0),o<0&&(o=0),{top:r,left:o}})},a.$init=function(){var e,t=this.$$.$el;t.chart.style("width","0").style("height","0").style("pointer-events","none"),(null==(e=t.tooltip)?void 0:e.node())&&document.body.appendChild(t.tooltip.node())},a.$afterInit=function(){this.$$.$el.svg.attr("style",null).style("width","0").style("height","0"),this.bindEvents(!0)},a.bindEvents=function(t){var n=this;void 0===t&&(t=!0);var i=this.$$.config;if(i.interaction_enabled&&i.tooltip_show){var r=(t?"add":"remove")+"EventListener";this.element.forEach(function(t){e(this,n);var i=t.querySelector("svg");i[r]("mouseover",this.overHandler),i[r]("mousemove",this.moveHandler),i[r]("mouseout",this.outHandler)}.bind(this))}},a.overHandler=function(e){this.$$.state.eventReceiver.rect=e.target.getBoundingClientRect()},a.moveHandler=function(e){var t,n,i=this.$$,r=i.getDataIndexFromEvent(e),o=null==(t=i.api.data(e.target.__id))?void 0:t[0],s=null==o||null==(n=o.values)?void 0:n[r];s&&!s.name&&(s.name=s.id),i.state.event=e,i.setExpand(r,o.id,!0),i.showTooltip([s],e.target)},a.outHandler=function(e){var t=this.$$;t.state.event=e,t.unexpandCircles(),t.hideTooltip()},a.$redraw=function(){var t,n=this.$$,i=n.$el,r=this.element,o=n.api.data(),s=null==(t=i.chart.html().match(/<svg[^>]*>/))?void 0:t[0],a=this;if(r.length<o.length){for(var b=i.chart.node(),l=o.length-r.length;l>0;l--)b.parentNode.insertBefore(r[0].cloneNode(),b.nextSibling);this.element=document.querySelectorAll(this.config.selector),r=this.element}o.map(function(t){return e(this,a),t.id}.bind(this)).forEach(function(t,n){e(this,a);var o="."+c.target+"-"+t,b=i.main.selectAll(o),l=r[n].querySelector("svg");l||(r[n].innerHTML=s+"</svg>",(l=r[n].querySelector("svg")).__id=t),l.querySelector(o)||b.style("opacity",null),b.style("fill","none").style("opacity",null),l.innerHTML="",l.appendChild(b.node())}.bind(this))},a.$willDestroy=function(){var t=this;this.bindEvents(!1),this.element.forEach(function(n){e(this,t),n.innerHTML=""}.bind(this))},s}(b);E.version="0.0.1"}(),o=o.default}()}));
|
|
12
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],t):"object"==typeof exports?exports.bb=t(require("d3-selection"),require("d3-brush")):(e.bb=e.bb||{},e.bb.plugin=e.bb.plugin||{},e.bb.plugin.sparkline=t(e.d3,e.d3))}(this,(function(e,t){return function(){"use strict";var n=[,function(t){t.exports=e},,function(e){e.exports=t}],i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={exports:{}};return n[e](o,o.exports,r),o.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){function e(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function a(e){for(var t,n=1;n<arguments.length;n++)t=null!=arguments[n]?arguments[n]:{},n%2?s(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}r.d(o,{default:function(){return E}});var c={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"},b=(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({},c),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),{tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"}),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"}),function(){function t(e){void 0===e&&(e={}),this.$$=void 0,this.options=void 0,this.options=e}var n=t.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var t=this;Object.keys(this).forEach(function(n){e(this,t),this[n]=null,delete this[n]}.bind(this))},t}());b.version="3.5.1";var l=function(){return{selector:void 0}},d=(r(1),r(3),void 0),u=function(){return e(this,d),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)();u.requestIdleCallback=u.requestIdleCallback||function(t){return e(this,d),setTimeout(t,1)}.bind(void 0),u.requestAnimationFrame=u.requestAnimationFrame||function(t){return e(this,d),setTimeout(t,1)}.bind(void 0);var h=null==u?void 0:u.document,f=void 0;(function(t){return e(this,f),t||0===t}).bind(void 0),function(t){return e(this,f),"function"==typeof t}.bind(void 0);var v=function(t){return e(this,f),"string"==typeof t}.bind(void 0),g=function(t){return e(this,f),"number"==typeof t}.bind(void 0),p=function(t){return e(this,f),void 0===t}.bind(void 0),y=function(t){return e(this,f),void 0!==t}.bind(void 0),m=(function(t){return e(this,f),"boolean"==typeof t}.bind(void 0),function(t){return e(this,f),10*Math.ceil(t/10)}.bind(void 0),function(t){return e(this,f),Math.ceil(t)+.5}.bind(void 0),function(t){return e(this,f),t[1]-t[0]}.bind(void 0),function(t){return e(this,f),"object"==typeof t}.bind(void 0)),x=function(t){return e(this,f),p(t)||null===t||v(t)&&0===t.length||m(t)&&!(t instanceof Date)&&0===Object.keys(t).length||g(t)&&isNaN(t)}.bind(void 0),O=(function(t){return e(this,f),!x(t)}.bind(void 0),function(t){return e(this,f),Array.isArray(t)}.bind(void 0)),j=function(t){return e(this,f),t&&!(null!=t&&t.nodeType)&&m(t)&&!O(t)}.bind(void 0);(function(t){return e(this,f),t.charAt(0).toUpperCase()+t.slice(1)}).bind(void 0);(function(t){return e(this,f),[].slice.call(t)}).bind(void 0);function $(t){for(var n=this,i=arguments.length,r=Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];if(!r.length||1===r.length&&!r[0])return t;var s=r.shift();return j(t)&&j(s)&&Object.keys(s).forEach(function(i){e(this,n);var r=s[i];j(r)?(t[i]||(t[i]={}),t[i]=$(t[i],r)):t[i]=O(r)?r.concat():r}.bind(this)),$.apply(void 0,[t].concat(r))}(function(t,n,i){void 0===i&&(i=1),e(this,f);for(var r=[],o=0|Math.max(0,Math.ceil((n-t)/i)),s=t;s<o;s++)r.push(t+s*i);return r}).bind(void 0),function(){var t=this;e(this,f);var n=function(){return e(this,t),{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}}.bind(this);try{return new MouseEvent("t"),function(i,r,o){void 0===o&&(o=n()),e(this,t),i.dispatchEvent(new MouseEvent(r,o))}.bind(this)}catch(i){return function(i,r,o){void 0===o&&(o=n()),e(this,t);var s=h.createEvent("MouseEvent");s.initMouseEvent(r,o.bubbles,o.cancelable,u,0,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),i.dispatchEvent(s)}.bind(this)}}.bind(void 0)(),function(t,n,i){e(this,f);var r=new Touch($({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},i));t.dispatchEvent(new TouchEvent(n,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}.bind(void 0);function w(t){var n,i,r,o=this,s=this.config,a=function(){e(this,o);var t=i.shift();return t&&n&&m(n)&&t in n?(n=n[t],a()):t?void 0:n}.bind(this);Object.keys(s).forEach(function(c){e(this,o),n=t,i=c.split("_"),r=a(),y(r)&&(s[c]=r)}.bind(this))}var E=function(i){var r,o;function s(e){var n=i.call(this,e)||this;return n.config=void 0,n.element=void 0,n.config=new l,t(n)||t(n)}o=i,(r=s).prototype=Object.create(o.prototype),r.prototype.constructor=r,n(r,o);var a=s.prototype;return a.$beforeInit=function(){w.call(this,this.options),this.validate(),this.element=[].slice.call(document.querySelectorAll(this.config.selector)),this.overrideInternals(),this.overrideOptions(),this.overHandler=this.overHandler.bind(this),this.moveHandler=this.moveHandler.bind(this),this.outHandler=this.outHandler.bind(this)},a.validate=function(){var e=this.$$,t=this.config,n="";if(t.selector&&document.querySelector(t.selector)||(n="No holder elements found from given selector option."),(e.hasType("bubble")||e.hasType("scatter")||e.hasArcType(e.data.targets))&&(n="Contains non supported chart types."),n)throw new Error("[Sparkline plugin] "+n)},a.overrideInternals=function(){var e=this.$$,t=e.getBarW,n=e.getIndices;e.getIndices=function(e,t,i){return"getShapeX"===i?{}:n.call(this,e,t)},e.getBarW=function(e,n){return t.call(this,e,n,1)}},a.overrideOptions=function(){var t=this,n=this.$$.config;if(n.legend_show=!1,n.resize_auto=!1,n.axis_x_show=!1,!1!==n.padding){var i=function(n){return e(this,t),Object.keys(n||{}).length>0}.bind(this);i(n.axis_x_padding)&&(n.axis_x_padding={left:15,right:15,unit:"px"}),i(n.axis_y_padding)&&(n.axis_y_padding=5)}n.axis_y_show=!1,n.tooltip_position||(n.tooltip_position=function(e,t,n){var i=this.internal.state.event,r=i.pageY-1.35*n,o=i.pageX-t/2;return r<0&&(r=0),o<0&&(o=0),{top:r,left:o}})},a.$init=function(){var e,t=this.$$.$el;t.chart.style("width","0").style("height","0").style("pointer-events","none"),(null==(e=t.tooltip)?void 0:e.node())&&document.body.appendChild(t.tooltip.node())},a.$afterInit=function(){this.$$.$el.svg.attr("style",null).style("width","0").style("height","0"),this.bindEvents(!0)},a.bindEvents=function(t){var n=this;void 0===t&&(t=!0);var i=this.$$.config;if(i.interaction_enabled&&i.tooltip_show){var r=(t?"add":"remove")+"EventListener";this.element.forEach(function(t){e(this,n);var i=t.querySelector("svg");i[r]("mouseover",this.overHandler),i[r]("mousemove",this.moveHandler),i[r]("mouseout",this.outHandler)}.bind(this))}},a.overHandler=function(e){this.$$.state.eventReceiver.rect=e.target.getBoundingClientRect()},a.moveHandler=function(e){var t,n,i=this.$$,r=i.getDataIndexFromEvent(e),o=null==(t=i.api.data(e.target.__id))?void 0:t[0],s=null==o||null==(n=o.values)?void 0:n[r];s&&!s.name&&(s.name=s.id),i.state.event=e,i.setExpand(r,o.id,!0),i.showTooltip([s],e.target)},a.outHandler=function(e){var t=this.$$;t.state.event=e,t.unexpandCircles(),t.hideTooltip()},a.$redraw=function(){var t,n=this.$$,i=n.$el,r=this.element,o=n.api.data(),s=null==(t=i.chart.html().match(/<svg[^>]*>/))?void 0:t[0],a=this;if(r.length<o.length){for(var b=i.chart.node(),l=o.length-r.length;l>0;l--)b.parentNode.insertBefore(r[0].cloneNode(),b.nextSibling);this.element=document.querySelectorAll(this.config.selector),r=this.element}o.map(function(t){return e(this,a),t.id}.bind(this)).forEach(function(t,n){e(this,a);var o="."+c.target+"-"+t,b=i.main.selectAll(o),l=r[n].querySelector("svg");l||(r[n].innerHTML=s+"</svg>",(l=r[n].querySelector("svg")).__id=t),l.querySelector(o)||b.style("opacity",null),b.style("fill","none").style("opacity",null),l.innerHTML="",l.appendChild(b.node())}.bind(this))},a.$willDestroy=function(){var t=this;this.bindEvents(!1),this.element.forEach(function(n){e(this,t),n.innerHTML=""}.bind(this))},s}(b);E.version="0.0.1"}(),o=o.default}()}));
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.5.
|
|
8
|
+
* @version 3.5.1
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -370,12 +370,13 @@ win.requestIdleCallback = win.requestIdleCallback || function (cb) {
|
|
|
370
370
|
_newArrowCheck(this, _this);
|
|
371
371
|
|
|
372
372
|
return setTimeout(cb, 1);
|
|
373
|
-
}.bind(undefined);
|
|
373
|
+
}.bind(undefined); // win.cancelIdleCallback = win.cancelIdleCallback || (id => clearTimeout(id));
|
|
374
|
+
|
|
374
375
|
|
|
375
|
-
win.
|
|
376
|
+
win.requestAnimationFrame = win.requestAnimationFrame || function (cb) {
|
|
376
377
|
_newArrowCheck(this, _this);
|
|
377
378
|
|
|
378
|
-
return
|
|
379
|
+
return setTimeout(cb, 1);
|
|
379
380
|
}.bind(undefined);
|
|
380
381
|
|
|
381
382
|
var doc = win == null ? void 0 : win.document;
|
|
@@ -934,6 +935,29 @@ var toArray = function (v) {
|
|
|
934
935
|
|
|
935
936
|
return [].slice.call(v);
|
|
936
937
|
}.bind(undefined);
|
|
938
|
+
/**
|
|
939
|
+
* Add CSS rules
|
|
940
|
+
* @param {object} style Style object
|
|
941
|
+
* @param {string} selector Selector string
|
|
942
|
+
* @param {Array} prop Prps arrary
|
|
943
|
+
* @returns {number} Newely added rule index
|
|
944
|
+
* @private
|
|
945
|
+
*/
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
function addCssRules(style, selector, prop) {
|
|
949
|
+
var _this9 = this,
|
|
950
|
+
rootSelctor = style.rootSelctor,
|
|
951
|
+
sheet = style.sheet,
|
|
952
|
+
getSelector = function (s) {
|
|
953
|
+
_newArrowCheck(this, _this9);
|
|
954
|
+
|
|
955
|
+
return s.replace(/\s?(bb-)/g, ".$1").replace(/\.+/g, ".");
|
|
956
|
+
}.bind(this),
|
|
957
|
+
rule = rootSelctor + " " + getSelector(selector) + " {" + prop.join(";") + "}";
|
|
958
|
+
|
|
959
|
+
return sheet[sheet.insertRule ? "insertRule" : "addRule"](rule, sheet.cssRules.length);
|
|
960
|
+
}
|
|
937
961
|
/**
|
|
938
962
|
* Get css rules for specified stylesheets
|
|
939
963
|
* @param {Array} styleSheets The stylesheets to get the rules from
|
|
@@ -943,11 +967,11 @@ var toArray = function (v) {
|
|
|
943
967
|
|
|
944
968
|
|
|
945
969
|
function getCssRules(styleSheets) {
|
|
946
|
-
var
|
|
970
|
+
var _this10 = this,
|
|
947
971
|
rules = [];
|
|
948
972
|
|
|
949
973
|
styleSheets.forEach(function (sheet) {
|
|
950
|
-
_newArrowCheck(this,
|
|
974
|
+
_newArrowCheck(this, _this10);
|
|
951
975
|
|
|
952
976
|
try {
|
|
953
977
|
if (sheet.cssRules && sheet.cssRules.length) {
|
|
@@ -988,16 +1012,16 @@ function getTranslation(node) {
|
|
|
988
1012
|
|
|
989
1013
|
|
|
990
1014
|
function getUnique(data) {
|
|
991
|
-
var
|
|
1015
|
+
var _this11 = this,
|
|
992
1016
|
isDate = data[0] instanceof Date,
|
|
993
1017
|
d = (isDate ? data.map(Number) : data).filter(function (v, i, self) {
|
|
994
|
-
_newArrowCheck(this,
|
|
1018
|
+
_newArrowCheck(this, _this11);
|
|
995
1019
|
|
|
996
1020
|
return self.indexOf(v) === i;
|
|
997
1021
|
}.bind(this));
|
|
998
1022
|
|
|
999
1023
|
return isDate ? d.map(function (v) {
|
|
1000
|
-
_newArrowCheck(this,
|
|
1024
|
+
_newArrowCheck(this, _this11);
|
|
1001
1025
|
|
|
1002
1026
|
return new Date(v);
|
|
1003
1027
|
}.bind(this)) : d;
|
|
@@ -1011,10 +1035,10 @@ function getUnique(data) {
|
|
|
1011
1035
|
|
|
1012
1036
|
|
|
1013
1037
|
function mergeArray(arr) {
|
|
1014
|
-
var
|
|
1038
|
+
var _this12 = this;
|
|
1015
1039
|
|
|
1016
1040
|
return arr && arr.length ? arr.reduce(function (p, c) {
|
|
1017
|
-
_newArrowCheck(this,
|
|
1041
|
+
_newArrowCheck(this, _this12);
|
|
1018
1042
|
|
|
1019
1043
|
return p.concat(c);
|
|
1020
1044
|
}.bind(this)) : [];
|
|
@@ -1029,7 +1053,7 @@ function mergeArray(arr) {
|
|
|
1029
1053
|
|
|
1030
1054
|
|
|
1031
1055
|
function mergeObj(target) {
|
|
1032
|
-
for (var
|
|
1056
|
+
for (var _this13 = this, _len4 = arguments.length, objectN = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
|
1033
1057
|
objectN[_key4 - 1] = arguments[_key4];
|
|
1034
1058
|
}
|
|
1035
1059
|
|
|
@@ -1041,7 +1065,7 @@ function mergeObj(target) {
|
|
|
1041
1065
|
|
|
1042
1066
|
if (isObject(target) && isObject(source)) {
|
|
1043
1067
|
Object.keys(source).forEach(function (key) {
|
|
1044
|
-
_newArrowCheck(this,
|
|
1068
|
+
_newArrowCheck(this, _this13);
|
|
1045
1069
|
|
|
1046
1070
|
var value = source[key];
|
|
1047
1071
|
|
|
@@ -1066,7 +1090,7 @@ function mergeObj(target) {
|
|
|
1066
1090
|
|
|
1067
1091
|
|
|
1068
1092
|
function sortValue(data, isAsc) {
|
|
1069
|
-
var
|
|
1093
|
+
var _this14 = this;
|
|
1070
1094
|
|
|
1071
1095
|
if (isAsc === void 0) {
|
|
1072
1096
|
isAsc = !0;
|
|
@@ -1076,24 +1100,24 @@ function sortValue(data, isAsc) {
|
|
|
1076
1100
|
|
|
1077
1101
|
if (data[0] instanceof Date) {
|
|
1078
1102
|
fn = isAsc ? function (a, b) {
|
|
1079
|
-
_newArrowCheck(this,
|
|
1103
|
+
_newArrowCheck(this, _this14);
|
|
1080
1104
|
|
|
1081
1105
|
return a - b;
|
|
1082
1106
|
}.bind(this) : function (a, b) {
|
|
1083
|
-
_newArrowCheck(this,
|
|
1107
|
+
_newArrowCheck(this, _this14);
|
|
1084
1108
|
|
|
1085
1109
|
return b - a;
|
|
1086
1110
|
}.bind(this);
|
|
1087
1111
|
} else {
|
|
1088
1112
|
if (isAsc && !data.every(isNaN)) {
|
|
1089
1113
|
fn = function (a, b) {
|
|
1090
|
-
_newArrowCheck(this,
|
|
1114
|
+
_newArrowCheck(this, _this14);
|
|
1091
1115
|
|
|
1092
1116
|
return a - b;
|
|
1093
1117
|
}.bind(this);
|
|
1094
1118
|
} else if (!isAsc) {
|
|
1095
1119
|
fn = function (a, b) {
|
|
1096
|
-
_newArrowCheck(this,
|
|
1120
|
+
_newArrowCheck(this, _this14);
|
|
1097
1121
|
|
|
1098
1122
|
return a > b && -1 || a < b && 1 || a === b && 0;
|
|
1099
1123
|
}.bind(this);
|
|
@@ -1112,9 +1136,9 @@ function sortValue(data, isAsc) {
|
|
|
1112
1136
|
|
|
1113
1137
|
|
|
1114
1138
|
function getMinMax(type, data) {
|
|
1115
|
-
var
|
|
1139
|
+
var _this15 = this,
|
|
1116
1140
|
res = data.filter(function (v) {
|
|
1117
|
-
_newArrowCheck(this,
|
|
1141
|
+
_newArrowCheck(this, _this15);
|
|
1118
1142
|
|
|
1119
1143
|
return notEmpty(v);
|
|
1120
1144
|
}.bind(this));
|
|
@@ -1159,12 +1183,12 @@ var getRange = function (start, end, step) {
|
|
|
1159
1183
|
}.bind(undefined),
|
|
1160
1184
|
emulateEvent = {
|
|
1161
1185
|
mouse: function () {
|
|
1162
|
-
var
|
|
1186
|
+
var _this16 = this;
|
|
1163
1187
|
|
|
1164
1188
|
_newArrowCheck(this, util_this);
|
|
1165
1189
|
|
|
1166
1190
|
var getParams = function () {
|
|
1167
|
-
_newArrowCheck(this,
|
|
1191
|
+
_newArrowCheck(this, _this16);
|
|
1168
1192
|
|
|
1169
1193
|
return {
|
|
1170
1194
|
bubbles: !1,
|
|
@@ -1184,7 +1208,7 @@ var getRange = function (start, end, step) {
|
|
|
1184
1208
|
params = getParams();
|
|
1185
1209
|
}
|
|
1186
1210
|
|
|
1187
|
-
_newArrowCheck(this,
|
|
1211
|
+
_newArrowCheck(this, _this16);
|
|
1188
1212
|
|
|
1189
1213
|
el.dispatchEvent(new MouseEvent(eventType, params));
|
|
1190
1214
|
}.bind(this);
|
|
@@ -1195,7 +1219,7 @@ var getRange = function (start, end, step) {
|
|
|
1195
1219
|
params = getParams();
|
|
1196
1220
|
}
|
|
1197
1221
|
|
|
1198
|
-
_newArrowCheck(this,
|
|
1222
|
+
_newArrowCheck(this, _this16);
|
|
1199
1223
|
|
|
1200
1224
|
var mouseEvent = doc.createEvent("MouseEvent"); // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
|
|
1201
1225
|
|
|
@@ -1296,7 +1320,7 @@ function isTabVisible() {
|
|
|
1296
1320
|
|
|
1297
1321
|
|
|
1298
1322
|
function convertInputType(mouse, touch) {
|
|
1299
|
-
var
|
|
1323
|
+
var _this17 = this,
|
|
1300
1324
|
DocumentTouch = win.DocumentTouch,
|
|
1301
1325
|
matchMedia = win.matchMedia,
|
|
1302
1326
|
navigator = win.navigator,
|
|
@@ -1325,13 +1349,34 @@ function convertInputType(mouse, touch) {
|
|
|
1325
1349
|
|
|
1326
1350
|
|
|
1327
1351
|
var hasMouse = mouse && ["any-hover:hover", "any-pointer:fine"].some(function (v) {
|
|
1328
|
-
_newArrowCheck(this,
|
|
1352
|
+
_newArrowCheck(this, _this17);
|
|
1329
1353
|
|
|
1330
1354
|
return matchMedia == null ? void 0 : matchMedia("(" + v + ")").matches;
|
|
1331
1355
|
}.bind(this)); // fallback to 'mouse' if no input type is detected.
|
|
1332
1356
|
|
|
1333
1357
|
return hasMouse && "mouse" || hasTouch && "touch" || "mouse";
|
|
1334
1358
|
}
|
|
1359
|
+
/**
|
|
1360
|
+
* Run function until given condition function return true
|
|
1361
|
+
* @param {Function} fn Function to be executed when condition is true
|
|
1362
|
+
* @param {Function} conditionFn Condition function to check if condition is true
|
|
1363
|
+
* @private
|
|
1364
|
+
*/
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
function runUntil(fn, conditionFn) {
|
|
1368
|
+
var _this18 = this;
|
|
1369
|
+
|
|
1370
|
+
if (conditionFn() === !1) {
|
|
1371
|
+
win.requestAnimationFrame(function () {
|
|
1372
|
+
_newArrowCheck(this, _this18);
|
|
1373
|
+
|
|
1374
|
+
return runUntil(fn, conditionFn);
|
|
1375
|
+
}.bind(this));
|
|
1376
|
+
} else {
|
|
1377
|
+
fn();
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1335
1380
|
;// CONCATENATED MODULE: ./src/config/config.ts
|
|
1336
1381
|
|
|
1337
1382
|
|
|
@@ -1466,7 +1511,7 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
1466
1511
|
return Plugin;
|
|
1467
1512
|
}();
|
|
1468
1513
|
|
|
1469
|
-
Plugin.version = "3.5.
|
|
1514
|
+
Plugin.version = "3.5.1";
|
|
1470
1515
|
|
|
1471
1516
|
;// CONCATENATED MODULE: ./src/Plugin/stanford/Options.ts
|
|
1472
1517
|
/**
|