billboard.js 3.11.3 → 3.12.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.
Files changed (177) hide show
  1. package/README.md +1 -5
  2. package/dist/billboard.css +13 -1
  3. package/dist/billboard.js +19672 -24210
  4. package/dist/billboard.min.css +2 -2
  5. package/dist/billboard.min.js +26 -3
  6. package/dist/billboard.pkgd.js +24515 -30430
  7. package/dist/billboard.pkgd.min.js +33 -3
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.js +77 -175
  9. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -3
  10. package/dist/plugin/billboardjs-plugin-sparkline.js +429 -1134
  11. package/dist/plugin/billboardjs-plugin-sparkline.min.js +4 -3
  12. package/dist/plugin/billboardjs-plugin-stanford.js +666 -1524
  13. package/dist/plugin/billboardjs-plugin-stanford.min.js +15 -3
  14. package/dist/plugin/billboardjs-plugin-tableview.js +503 -1175
  15. package/dist/plugin/billboardjs-plugin-tableview.min.js +30 -3
  16. package/dist/plugin/billboardjs-plugin-textoverlap.js +351 -1055
  17. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +4 -3
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +1387 -1854
  19. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +5 -3
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2760 -3959
  21. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +7 -3
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +3504 -5057
  23. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +18 -3
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2906 -4072
  25. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +33 -3
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +3076 -4506
  27. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +7 -3
  28. package/dist/theme/dark.css +12 -1
  29. package/dist/theme/dark.min.css +2 -2
  30. package/dist/theme/datalab.css +12 -1
  31. package/dist/theme/datalab.min.css +2 -2
  32. package/dist/theme/graph.css +12 -1
  33. package/dist/theme/graph.min.css +2 -2
  34. package/dist/theme/insight.css +12 -1
  35. package/dist/theme/insight.min.css +2 -2
  36. package/dist/theme/modern.css +12 -1
  37. package/dist/theme/modern.min.css +3 -4
  38. package/dist-esm/billboard.js +9297 -8527
  39. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +20 -27
  40. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +155 -149
  41. package/dist-esm/plugin/billboardjs-plugin-stanford.js +302 -289
  42. package/dist-esm/plugin/billboardjs-plugin-tableview.js +236 -236
  43. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +41 -43
  44. package/package.json +29 -49
  45. package/src/Chart/api/axis.ts +6 -13
  46. package/src/Chart/api/chart.ts +12 -11
  47. package/src/Chart/api/data.ts +8 -7
  48. package/src/Chart/api/export.ts +28 -21
  49. package/src/Chart/api/flow.ts +4 -2
  50. package/src/Chart/api/grid.ts +1 -5
  51. package/src/Chart/api/load.ts +2 -2
  52. package/src/Chart/api/regions.ts +29 -5
  53. package/src/Chart/api/selection.ts +2 -2
  54. package/src/Chart/api/show.ts +2 -3
  55. package/src/Chart/api/subchart.ts +2 -2
  56. package/src/Chart/api/tooltip.ts +8 -9
  57. package/src/Chart/api/x.ts +2 -2
  58. package/src/Chart/api/zoom.ts +2 -2
  59. package/src/ChartInternal/Axis/Axis.ts +119 -44
  60. package/src/ChartInternal/Axis/AxisRenderer.ts +53 -38
  61. package/src/ChartInternal/Axis/AxisRendererHelper.ts +2 -2
  62. package/src/ChartInternal/ChartInternal.ts +87 -55
  63. package/src/ChartInternal/data/IData.ts +31 -31
  64. package/src/ChartInternal/data/convert.helper.ts +66 -68
  65. package/src/ChartInternal/data/convert.ts +11 -11
  66. package/src/ChartInternal/data/data.ts +51 -27
  67. package/src/ChartInternal/data/load.ts +7 -6
  68. package/src/ChartInternal/interactions/drag.ts +2 -1
  69. package/src/ChartInternal/interactions/eventrect.ts +84 -32
  70. package/src/ChartInternal/interactions/flow.ts +14 -4
  71. package/src/ChartInternal/interactions/interaction.ts +51 -22
  72. package/src/ChartInternal/interactions/subchart.ts +27 -25
  73. package/src/ChartInternal/interactions/zoom.ts +29 -18
  74. package/src/ChartInternal/internals/category.ts +1 -1
  75. package/src/ChartInternal/internals/class.ts +6 -6
  76. package/src/ChartInternal/internals/clip.ts +8 -4
  77. package/src/ChartInternal/internals/color.ts +70 -42
  78. package/src/ChartInternal/internals/domain.ts +59 -28
  79. package/src/ChartInternal/internals/format.ts +5 -5
  80. package/src/ChartInternal/internals/grid.ts +131 -47
  81. package/src/ChartInternal/internals/legend.ts +93 -61
  82. package/src/ChartInternal/internals/redraw.ts +6 -2
  83. package/src/ChartInternal/internals/region.ts +5 -3
  84. package/src/ChartInternal/internals/scale.ts +28 -15
  85. package/src/ChartInternal/internals/selection.ts +14 -13
  86. package/src/ChartInternal/internals/size.axis.ts +18 -10
  87. package/src/ChartInternal/internals/size.ts +98 -67
  88. package/src/ChartInternal/internals/style.ts +21 -19
  89. package/src/ChartInternal/internals/text.ts +79 -43
  90. package/src/ChartInternal/internals/title.ts +2 -2
  91. package/src/ChartInternal/internals/tooltip.ts +78 -32
  92. package/src/ChartInternal/internals/transform.ts +4 -4
  93. package/src/ChartInternal/internals/type.ts +17 -12
  94. package/src/ChartInternal/shape/arc.ts +78 -44
  95. package/src/ChartInternal/shape/area.ts +19 -22
  96. package/src/ChartInternal/shape/bar.ts +41 -31
  97. package/src/ChartInternal/shape/bubble.ts +5 -5
  98. package/src/ChartInternal/shape/candlestick.ts +15 -13
  99. package/src/ChartInternal/shape/funnel.ts +317 -0
  100. package/src/ChartInternal/shape/gauge.ts +16 -9
  101. package/src/ChartInternal/shape/line.ts +62 -46
  102. package/src/ChartInternal/shape/point.common.ts +1 -4
  103. package/src/ChartInternal/shape/point.ts +54 -34
  104. package/src/ChartInternal/shape/polar.ts +4 -2
  105. package/src/ChartInternal/shape/radar.ts +40 -22
  106. package/src/ChartInternal/shape/shape.ts +84 -58
  107. package/src/ChartInternal/shape/treemap.ts +31 -20
  108. package/src/Plugin/bubblecompare/index.ts +1 -3
  109. package/src/Plugin/sparkline/index.ts +3 -4
  110. package/src/Plugin/stanford/ColorScale.ts +3 -2
  111. package/src/Plugin/stanford/Elements.ts +15 -6
  112. package/src/Plugin/stanford/Options.ts +5 -5
  113. package/src/Plugin/stanford/index.ts +13 -9
  114. package/src/Plugin/tableview/Options.ts +1 -1
  115. package/src/Plugin/tableview/const.ts +1 -4
  116. package/src/Plugin/tableview/index.ts +11 -9
  117. package/src/Plugin/textoverlap/index.ts +4 -6
  118. package/src/config/Options/Options.ts +3 -3
  119. package/src/config/Options/axis/axis.ts +36 -0
  120. package/src/config/Options/axis/x.ts +34 -14
  121. package/src/config/Options/axis/y.ts +13 -13
  122. package/src/config/Options/axis/y2.ts +23 -10
  123. package/src/config/Options/common/color.ts +4 -4
  124. package/src/config/Options/common/grid.ts +4 -4
  125. package/src/config/Options/common/legend.ts +12 -13
  126. package/src/config/Options/common/main.ts +23 -23
  127. package/src/config/Options/common/point.ts +17 -18
  128. package/src/config/Options/common/title.ts +2 -2
  129. package/src/config/Options/common/tooltip.ts +13 -11
  130. package/src/config/Options/data/axis.ts +2 -2
  131. package/src/config/Options/data/data.ts +48 -45
  132. package/src/config/Options/interaction/interaction.ts +1 -1
  133. package/src/config/Options/interaction/subchart.ts +2 -2
  134. package/src/config/Options/interaction/zoom.ts +9 -9
  135. package/src/config/Options/shape/arc.ts +10 -13
  136. package/src/config/Options/shape/area.ts +5 -7
  137. package/src/config/Options/shape/bar.ts +8 -10
  138. package/src/config/Options/shape/bubble.ts +1 -1
  139. package/src/config/Options/shape/candlestick.ts +2 -2
  140. package/src/config/Options/shape/donut.ts +4 -4
  141. package/src/config/Options/shape/funnel.ts +38 -0
  142. package/src/config/Options/shape/gauge.ts +6 -6
  143. package/src/config/Options/shape/line.ts +3 -3
  144. package/src/config/Options/shape/pie.ts +5 -5
  145. package/src/config/Options/shape/polar.ts +3 -3
  146. package/src/config/Options/shape/radar.ts +2 -2
  147. package/src/config/Options/shape/scatter.ts +1 -1
  148. package/src/config/Options/shape/treemap.ts +1 -1
  149. package/src/config/Store/Element.ts +8 -5
  150. package/src/config/Store/State.ts +20 -13
  151. package/src/config/classes.ts +14 -4
  152. package/src/config/config.ts +1 -1
  153. package/src/config/const.ts +2 -0
  154. package/src/config/resolver/axis.ts +4 -4
  155. package/src/config/resolver/interaction.ts +3 -7
  156. package/src/config/resolver/shape.ts +17 -12
  157. package/src/core.ts +2 -3
  158. package/src/index.esm.ts +3 -6
  159. package/src/index.ts +2 -2
  160. package/src/module/Cache.ts +2 -3
  161. package/src/module/browser.ts +15 -10
  162. package/src/module/error.ts +9 -8
  163. package/src/module/generator.ts +3 -5
  164. package/src/module/util.ts +62 -39
  165. package/src/module/worker.ts +14 -11
  166. package/src/scss/billboard.scss +18 -0
  167. package/src/scss/theme/dark.scss +17 -0
  168. package/src/scss/theme/datalab.scss +17 -0
  169. package/src/scss/theme/graph.scss +17 -0
  170. package/src/scss/theme/insight.scss +17 -0
  171. package/src/scss/theme/modern.scss +17 -0
  172. package/types/axis.d.ts +17 -0
  173. package/types/bb.d.ts +1 -0
  174. package/types/index.d.ts +1 -0
  175. package/types/options.d.ts +9 -0
  176. package/types/options.shape.d.ts +26 -1
  177. package/types/types.d.ts +1 -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.11.3
8
+ * @version 3.12.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -22,45 +22,214 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
22
22
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
23
23
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
24
24
  PERFORMANCE OF THIS SOFTWARE.
25
- ***************************************************************************** */
26
- /* global Reflect, Promise, SuppressedError, Symbol */
25
+ ***************************************************************************** */
26
+ /* global Reflect, Promise, SuppressedError, Symbol */
27
+
28
+ var extendStatics = function(d, b) {
29
+ extendStatics = Object.setPrototypeOf ||
30
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
32
+ return extendStatics(d, b);
33
+ };
34
+
35
+ function __extends(d, b) {
36
+ if (typeof b !== "function" && b !== null)
37
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
38
+ extendStatics(d, b);
39
+ function __() { this.constructor = d; }
40
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41
+ }
42
+
43
+ var __assign = function() {
44
+ __assign = Object.assign || function __assign(t) {
45
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
46
+ s = arguments[i];
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
48
+ }
49
+ return t;
50
+ };
51
+ return __assign.apply(this, arguments);
52
+ };
53
+
54
+ function __spreadArray(to, from, pack) {
55
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
56
+ if (ar || !(i in from)) {
57
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
58
+ ar[i] = from[i];
59
+ }
60
+ }
61
+ return to.concat(ar || Array.prototype.slice.call(from));
62
+ }
27
63
 
28
- var _extendStatics = function extendStatics(d, b) {
29
- _extendStatics = Object.setPrototypeOf || {
30
- __proto__: []
31
- } instanceof Array && function (d, b) {
32
- d.__proto__ = b;
33
- } || function (d, b) {
34
- for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
35
- };
36
- return _extendStatics(d, b);
37
- };
38
- function __extends(d, b) {
39
- if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + (b + "") + " is not a constructor or null");
40
- _extendStatics(d, b);
41
- function __() {
42
- this.constructor = d;
43
- }
44
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
64
+ /**
65
+ * Copyright (c) 2017 ~ present NAVER Corp.
66
+ * billboard.js project is licensed under the MIT license
67
+ */
68
+ /**
69
+ * Window object
70
+ * @private
71
+ */
72
+ /* eslint-disable no-new-func, no-undef */
73
+ /**
74
+ * Get global object
75
+ * @returns {object} window object
76
+ * @private
77
+ */
78
+ function getGlobal() {
79
+ return (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object &&
80
+ globalThis) ||
81
+ (typeof global === "object" && global !== null && global.Object === Object && global) ||
82
+ (typeof self === "object" && self !== null && self.Object === Object && self) ||
83
+ Function("return this")();
45
84
  }
46
- var _assign = function __assign() {
47
- _assign = Object.assign || function (t) {
48
- for (var s, i = 1, n = arguments.length; i < n; i++) {
49
- s = arguments[i];
50
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
85
+ var win = getGlobal();
86
+ var doc = win === null || win === void 0 ? void 0 : win.document;
87
+
88
+ var isNumber = function (v) { return typeof v === "number"; };
89
+ var isDefined = function (v) { return typeof v !== "undefined"; };
90
+ var isObjectType = function (v) { return typeof v === "object"; };
91
+ /**
92
+ * Check if is array
93
+ * @param {Array} arr Data to be checked
94
+ * @returns {boolean}
95
+ * @private
96
+ */
97
+ var isArray = function (arr) { return Array.isArray(arr); };
98
+ /**
99
+ * Check if is object
100
+ * @param {object} obj Data to be checked
101
+ * @returns {boolean}
102
+ * @private
103
+ */
104
+ var isObject = function (obj) { return obj && !(obj === null || obj === void 0 ? void 0 : obj.nodeType) && isObjectType(obj) && !isArray(obj); };
105
+ /**
106
+ * Merge object returning new object
107
+ * @param {object} target Target object
108
+ * @param {object} objectN Source object
109
+ * @returns {object} merged target object
110
+ * @private
111
+ */
112
+ function mergeObj(target) {
113
+ var objectN = [];
114
+ for (var _i = 1; _i < arguments.length; _i++) {
115
+ objectN[_i - 1] = arguments[_i];
51
116
  }
52
- return t;
53
- };
54
- return _assign.apply(this, arguments);
55
- };
56
- function __spreadArray(to, from, pack) {
57
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
58
- if (ar || !(i in from)) {
59
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
60
- ar[i] = from[i];
117
+ if (!objectN.length || (objectN.length === 1 && !objectN[0])) {
118
+ return target;
119
+ }
120
+ var source = objectN.shift();
121
+ if (isObject(target) && isObject(source)) {
122
+ Object.keys(source).forEach(function (key) {
123
+ var value = source[key];
124
+ if (isObject(value)) {
125
+ !target[key] && (target[key] = {});
126
+ target[key] = mergeObj(target[key], value);
127
+ }
128
+ else {
129
+ target[key] = isArray(value) ? value.concat() : value;
130
+ }
131
+ });
132
+ }
133
+ return mergeObj.apply(void 0, __spreadArray([target], objectN, false));
134
+ }
135
+ // emulate event
136
+ ({
137
+ mouse: (function () {
138
+ var getParams = function () { return ({
139
+ bubbles: false,
140
+ cancelable: false,
141
+ screenX: 0,
142
+ screenY: 0,
143
+ clientX: 0,
144
+ clientY: 0
145
+ }); };
146
+ try {
147
+ // eslint-disable-next-line no-new
148
+ new MouseEvent("t");
149
+ return function (el, eventType, params) {
150
+ if (params === void 0) { params = getParams(); }
151
+ el.dispatchEvent(new MouseEvent(eventType, params));
152
+ };
153
+ }
154
+ catch (e) {
155
+ // Polyfills DOM4 MouseEvent
156
+ return function (el, eventType, params) {
157
+ if (params === void 0) { params = getParams(); }
158
+ var mouseEvent = doc.createEvent("MouseEvent");
159
+ // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
160
+ mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0, // the event's mouse click count
161
+ params.screenX, params.screenY, params.clientX, params.clientY, false, false, false, false, 0, null);
162
+ el.dispatchEvent(mouseEvent);
163
+ };
164
+ }
165
+ })(),
166
+ touch: function (el, eventType, params) {
167
+ var touchObj = new Touch(mergeObj({
168
+ identifier: Date.now(),
169
+ target: el,
170
+ radiusX: 2.5,
171
+ radiusY: 2.5,
172
+ rotationAngle: 10,
173
+ force: 0.5
174
+ }, params));
175
+ el.dispatchEvent(new TouchEvent(eventType, {
176
+ cancelable: true,
177
+ bubbles: true,
178
+ shiftKey: true,
179
+ touches: [touchObj],
180
+ targetTouches: [],
181
+ changedTouches: [touchObj]
182
+ }));
183
+ }
184
+ });
185
+ /**
186
+ * Process the template & return bound string
187
+ * @param {string} tpl Template string
188
+ * @param {object} data Data value to be replaced
189
+ * @returns {string}
190
+ * @private
191
+ */
192
+ function tplProcess(tpl, data) {
193
+ var res = tpl;
194
+ for (var x in data) {
195
+ res = res.replace(new RegExp("{=".concat(x, "}"), "g"), data[x]);
196
+ }
197
+ return res;
198
+ }
199
+
200
+ /**
201
+ * Load configuration option
202
+ * @param {object} config User's generation config value
203
+ * @private
204
+ */
205
+ function loadConfig(config) {
206
+ var thisConfig = this.config;
207
+ var target;
208
+ var keys;
209
+ var read;
210
+ var find = function () {
211
+ var key = keys.shift();
212
+ if (key && target && isObjectType(target) && key in target) {
213
+ target = target[key];
214
+ return find();
215
+ }
216
+ else if (!key) {
217
+ return target;
218
+ }
219
+ return undefined;
220
+ };
221
+ Object.keys(thisConfig).forEach(function (key) {
222
+ target = config;
223
+ keys = key.split("_");
224
+ read = find();
225
+ if (isDefined(read)) {
226
+ thisConfig[key] = read;
227
+ }
228
+ });
229
+ // only should run in the ChartInternal context
230
+ if (this.api) {
231
+ this.state.orgConfig = config;
61
232
  }
62
- }
63
- return to.concat(ar || Array.prototype.slice.call(from));
64
233
  }
65
234
 
66
235
  /**
@@ -121,10 +290,30 @@ var Plugin = /** @class */ (function () {
121
290
  delete _this[key];
122
291
  });
123
292
  };
124
- Plugin.version = "3.11.3";
293
+ Plugin.version = "3.12.0-next.2";
125
294
  return Plugin;
126
295
  }());
127
- var Plugin$1 = Plugin;
296
+
297
+ /**
298
+ * Copyright (c) 2021 ~ present NAVER Corp.
299
+ * billboard.js project is licensed under the MIT license
300
+ */
301
+ /**
302
+ * Constants values for plugin option
303
+ * @ignore
304
+ */
305
+ var defaultStyle = {
306
+ id: "__tableview-style__",
307
+ class: "bb-tableview",
308
+ 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}"
309
+ };
310
+ // template
311
+ var tpl = {
312
+ body: "<caption>{=title}</caption>\n\t\t<thead><tr>{=thead}</tr></thead>\n\t\t<tbody>{=tbody}</tbody>",
313
+ thead: "<th scope=\"col\">{=title}</th>",
314
+ tbodyHeader: "<th scope=\"row\">{=value}</th>",
315
+ tbody: "<td>{=value}</td>"
316
+ };
128
317
 
129
318
  /**
130
319
  * Copyright (c) 2021 ~ present NAVER Corp.
@@ -238,197 +427,6 @@ var Options = /** @class */ (function () {
238
427
  return Options;
239
428
  }());
240
429
 
241
- /**
242
- * Copyright (c) 2021 ~ present NAVER Corp.
243
- * billboard.js project is licensed under the MIT license
244
- */
245
- /**
246
- * Constants values for plugin option
247
- * @ignore
248
- */
249
- var defaultStyle = {
250
- id: "__tableview-style__",
251
- class: "bb-tableview",
252
- 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}"
253
- };
254
- // template
255
- var tpl = {
256
- body: "<caption>{=title}</caption>\n\t\t<thead><tr>{=thead}</tr></thead>\n\t\t<tbody>{=tbody}</tbody>",
257
- thead: "<th scope=\"col\">{=title}</th>",
258
- tbodyHeader: "<th scope=\"row\">{=value}</th>",
259
- tbody: "<td>{=value}</td>"
260
- };
261
-
262
- /**
263
- * Copyright (c) 2017 ~ present NAVER Corp.
264
- * billboard.js project is licensed under the MIT license
265
- */
266
- /**
267
- * Window object
268
- * @private
269
- */
270
- /* eslint-disable no-new-func, no-undef */
271
- /**
272
- * Get global object
273
- * @returns {object} window object
274
- * @private
275
- */
276
- function getGlobal() {
277
- return (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis) ||
278
- (typeof global === "object" && global !== null && global.Object === Object && global) ||
279
- (typeof self === "object" && self !== null && self.Object === Object && self) ||
280
- Function("return this")();
281
- }
282
- var win = getGlobal();
283
- var doc = win === null || win === void 0 ? void 0 : win.document;
284
-
285
- var isNumber = function (v) { return typeof v === "number"; };
286
- var isDefined = function (v) { return typeof v !== "undefined"; };
287
- var isObjectType = function (v) { return typeof v === "object"; };
288
- /**
289
- * Check if is array
290
- * @param {Array} arr Data to be checked
291
- * @returns {boolean}
292
- * @private
293
- */
294
- var isArray = function (arr) { return Array.isArray(arr); };
295
- /**
296
- * Check if is object
297
- * @param {object} obj Data to be checked
298
- * @returns {boolean}
299
- * @private
300
- */
301
- var isObject = function (obj) { return obj && !(obj === null || obj === void 0 ? void 0 : obj.nodeType) && isObjectType(obj) && !isArray(obj); };
302
- /**
303
- * Merge object returning new object
304
- * @param {object} target Target object
305
- * @param {object} objectN Source object
306
- * @returns {object} merged target object
307
- * @private
308
- */
309
- function mergeObj(target) {
310
- var objectN = [];
311
- for (var _i = 1; _i < arguments.length; _i++) {
312
- objectN[_i - 1] = arguments[_i];
313
- }
314
- if (!objectN.length || (objectN.length === 1 && !objectN[0])) {
315
- return target;
316
- }
317
- var source = objectN.shift();
318
- if (isObject(target) && isObject(source)) {
319
- Object.keys(source).forEach(function (key) {
320
- var value = source[key];
321
- if (isObject(value)) {
322
- !target[key] && (target[key] = {});
323
- target[key] = mergeObj(target[key], value);
324
- }
325
- else {
326
- target[key] = isArray(value) ?
327
- value.concat() : value;
328
- }
329
- });
330
- }
331
- return mergeObj.apply(void 0, __spreadArray([target], objectN, false));
332
- }
333
- // emulate event
334
- ({
335
- mouse: (function () {
336
- var getParams = function () { return ({
337
- bubbles: false, cancelable: false, screenX: 0, screenY: 0, clientX: 0, clientY: 0
338
- }); };
339
- try {
340
- // eslint-disable-next-line no-new
341
- new MouseEvent("t");
342
- return function (el, eventType, params) {
343
- if (params === void 0) { params = getParams(); }
344
- el.dispatchEvent(new MouseEvent(eventType, params));
345
- };
346
- }
347
- catch (e) {
348
- // Polyfills DOM4 MouseEvent
349
- return function (el, eventType, params) {
350
- if (params === void 0) { params = getParams(); }
351
- var mouseEvent = doc.createEvent("MouseEvent");
352
- // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
353
- mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0, // the event's mouse click count
354
- params.screenX, params.screenY, params.clientX, params.clientY, false, false, false, false, 0, null);
355
- el.dispatchEvent(mouseEvent);
356
- };
357
- }
358
- })(),
359
- touch: function (el, eventType, params) {
360
- var touchObj = new Touch(mergeObj({
361
- identifier: Date.now(),
362
- target: el,
363
- radiusX: 2.5,
364
- radiusY: 2.5,
365
- rotationAngle: 10,
366
- force: 0.5
367
- }, params));
368
- el.dispatchEvent(new TouchEvent(eventType, {
369
- cancelable: true,
370
- bubbles: true,
371
- shiftKey: true,
372
- touches: [touchObj],
373
- targetTouches: [],
374
- changedTouches: [touchObj]
375
- }));
376
- }
377
- });
378
- /**
379
- * Process the template & return bound string
380
- * @param {string} tpl Template string
381
- * @param {object} data Data value to be replaced
382
- * @returns {string}
383
- * @private
384
- */
385
- function tplProcess(tpl, data) {
386
- var res = tpl;
387
- for (var x in data) {
388
- res = res.replace(new RegExp("{=".concat(x, "}"), "g"), data[x]);
389
- }
390
- return res;
391
- }
392
-
393
- /**
394
- * Copyright (c) 2017 ~ present NAVER Corp.
395
- * billboard.js project is licensed under the MIT license
396
- */
397
- /**
398
- * Load configuration option
399
- * @param {object} config User's generation config value
400
- * @private
401
- */
402
- function loadConfig(config) {
403
- var thisConfig = this.config;
404
- var target;
405
- var keys;
406
- var read;
407
- var find = function () {
408
- var key = keys.shift();
409
- if (key && target && isObjectType(target) && key in target) {
410
- target = target[key];
411
- return find();
412
- }
413
- else if (!key) {
414
- return target;
415
- }
416
- return undefined;
417
- };
418
- Object.keys(thisConfig).forEach(function (key) {
419
- target = config;
420
- keys = key.split("_");
421
- read = find();
422
- if (isDefined(read)) {
423
- thisConfig[key] = read;
424
- }
425
- });
426
- // only should run in the ChartInternal context
427
- if (this.api) {
428
- this.state.orgConfig = config;
429
- }
430
- }
431
-
432
430
  /**
433
431
  * Table view plugin.<br>
434
432
  * Generates table view for bound dataset.
@@ -532,14 +530,16 @@ var TableView = /** @class */ (function (_super) {
532
530
  });
533
531
  });
534
532
  rows.forEach(function (v) {
535
- tbody += "<tr>".concat(v.map(function (d, i) { return tplProcess(i ? tpl.tbody : tpl.tbodyHeader, {
536
- value: i === 0 ?
537
- config.categoryFormat.bind(_this)(d) :
538
- (isNumber(d) ? d.toLocaleString() : config.nullString)
539
- }); }).join(""), "</tr>");
533
+ tbody += "<tr>".concat(v.map(function (d, i) {
534
+ return tplProcess(i ? tpl.tbody : tpl.tbodyHeader, {
535
+ value: i === 0 ?
536
+ config.categoryFormat.bind(_this)(d) :
537
+ (isNumber(d) ? d.toLocaleString() : config.nullString)
538
+ });
539
+ }).join(""), "</tr>");
540
540
  });
541
541
  var rx = /(<\/?(script|img)[^>]*>|<[^>]+><\/[^>]+>)/ig;
542
- var r = tplProcess(tpl.body, _assign(_assign({}, config), { title: config.title || $$.config.title_text || "", thead: thead, tbody: tbody })).replace(rx, "");
542
+ var r = tplProcess(tpl.body, __assign(__assign({}, config), { title: config.title || $$.config.title_text || "", thead: thead, tbody: tbody })).replace(rx, "");
543
543
  element.innerHTML = r;
544
544
  };
545
545
  TableView.prototype.$redraw = function () {
@@ -557,6 +557,6 @@ var TableView = /** @class */ (function (_super) {
557
557
  }
558
558
  };
559
559
  return TableView;
560
- }(Plugin$1));
560
+ }(Plugin));
561
561
 
562
562
  export { TableView as 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.11.3
8
+ * @version 3.12.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -25,35 +25,32 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
25
25
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
26
26
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
27
27
  PERFORMANCE OF THIS SOFTWARE.
28
- ***************************************************************************** */
29
- /* global Reflect, Promise, SuppressedError, Symbol */
30
-
31
- var _extendStatics = function extendStatics(d, b) {
32
- _extendStatics = Object.setPrototypeOf || {
33
- __proto__: []
34
- } instanceof Array && function (d, b) {
35
- d.__proto__ = b;
36
- } || function (d, b) {
37
- for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
38
- };
39
- return _extendStatics(d, b);
40
- };
41
- function __extends(d, b) {
42
- if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + (b + "") + " is not a constructor or null");
43
- _extendStatics(d, b);
44
- function __() {
45
- this.constructor = d;
46
- }
47
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
48
- }
49
- function __spreadArray(to, from, pack) {
50
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
51
- if (ar || !(i in from)) {
52
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
53
- ar[i] = from[i];
54
- }
55
- }
56
- return to.concat(ar || Array.prototype.slice.call(from));
28
+ ***************************************************************************** */
29
+ /* global Reflect, Promise, SuppressedError, Symbol */
30
+
31
+ var extendStatics = function(d, b) {
32
+ extendStatics = Object.setPrototypeOf ||
33
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
34
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
35
+ return extendStatics(d, b);
36
+ };
37
+
38
+ function __extends(d, b) {
39
+ if (typeof b !== "function" && b !== null)
40
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
41
+ extendStatics(d, b);
42
+ function __() { this.constructor = d; }
43
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
44
+ }
45
+
46
+ function __spreadArray(to, from, pack) {
47
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
48
+ if (ar || !(i in from)) {
49
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
50
+ ar[i] = from[i];
51
+ }
52
+ }
53
+ return to.concat(ar || Array.prototype.slice.call(from));
57
54
  }
58
55
 
59
56
  /**
@@ -71,7 +68,8 @@ function __spreadArray(to, from, pack) {
71
68
  * @private
72
69
  */
73
70
  function getGlobal() {
74
- return (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis) ||
71
+ return (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object &&
72
+ globalThis) ||
75
73
  (typeof global === "object" && global !== null && global.Object === Object && global) ||
76
74
  (typeof self === "object" && self !== null && self.Object === Object && self) ||
77
75
  Function("return this")();
@@ -119,8 +117,7 @@ function mergeObj(target) {
119
117
  target[key] = mergeObj(target[key], value);
120
118
  }
121
119
  else {
122
- target[key] = isArray(value) ?
123
- value.concat() : value;
120
+ target[key] = isArray(value) ? value.concat() : value;
124
121
  }
125
122
  });
126
123
  }
@@ -130,7 +127,12 @@ function mergeObj(target) {
130
127
  ({
131
128
  mouse: (function () {
132
129
  var getParams = function () { return ({
133
- bubbles: false, cancelable: false, screenX: 0, screenY: 0, clientX: 0, clientY: 0
130
+ bubbles: false,
131
+ cancelable: false,
132
+ screenX: 0,
133
+ screenY: 0,
134
+ clientX: 0,
135
+ clientY: 0
134
136
  }); };
135
137
  try {
136
138
  // eslint-disable-next-line no-new
@@ -172,10 +174,6 @@ function mergeObj(target) {
172
174
  }
173
175
  });
174
176
 
175
- /**
176
- * Copyright (c) 2017 ~ present NAVER Corp.
177
- * billboard.js project is licensed under the MIT license
178
- */
179
177
  /**
180
178
  * Load configuration option
181
179
  * @param {object} config User's generation config value
@@ -269,10 +267,9 @@ var Plugin = /** @class */ (function () {
269
267
  delete _this[key];
270
268
  });
271
269
  };
272
- Plugin.version = "3.11.3";
270
+ Plugin.version = "3.12.0-next.2";
273
271
  return Plugin;
274
272
  }());
275
- var Plugin$1 = Plugin;
276
273
 
277
274
  /**
278
275
  * Copyright (c) 2017 ~ present NAVER Corp.
@@ -360,7 +357,7 @@ var Options = /** @class */ (function () {
360
357
  * ]
361
358
  * });
362
359
  * @example
363
- * import {bb} from "billboard.js";
360
+ * import {bb} from "billboard.js";
364
361
  * import TextOverlap from "billboard.js/dist/billboardjs-plugin-textoverlap";
365
362
  *
366
363
  * bb.generate({
@@ -422,7 +419,8 @@ var TextOverlap = /** @class */ (function (_super) {
422
419
  var xTranslate = extent * (angle === 0 ? 1 : -1);
423
420
  var yTranslate = angle === -1 ? -extent : extent + 5;
424
421
  var txtAnchor = Math.abs(angle) === 1 ?
425
- "middle" : (angle === 0 ? "start" : "end");
422
+ "middle" :
423
+ (angle === 0 ? "start" : "end");
426
424
  this.style.display = polygonArea$1 < area ? "none" : "";
427
425
  this.setAttribute("text-anchor", txtAnchor);
428
426
  this.setAttribute("dy", "0.".concat(angle === 1 ? 71 : 35, "em"));
@@ -432,6 +430,6 @@ var TextOverlap = /** @class */ (function (_super) {
432
430
  });
433
431
  };
434
432
  return TextOverlap;
435
- }(Plugin$1));
433
+ }(Plugin));
436
434
 
437
435
  export { TextOverlap as default };