billboard.js 3.11.2 → 3.12.0-next.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.
Files changed (171) hide show
  1. package/README.md +2 -6
  2. package/dist/billboard.css +5 -1
  3. package/dist/billboard.js +19431 -24292
  4. package/dist/billboard.min.css +2 -2
  5. package/dist/billboard.min.js +26 -3
  6. package/dist/billboard.pkgd.js +22301 -29057
  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 +423 -1134
  11. package/dist/plugin/billboardjs-plugin-sparkline.min.js +4 -3
  12. package/dist/plugin/billboardjs-plugin-stanford.js +660 -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 +339 -1324
  19. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +5 -3
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +1701 -3424
  21. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +7 -3
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2385 -4462
  23. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +18 -3
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +1783 -3467
  25. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +33 -3
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2031 -3979
  27. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +7 -3
  28. package/dist/theme/dark.css +5 -1
  29. package/dist/theme/dark.min.css +2 -2
  30. package/dist/theme/datalab.css +5 -1
  31. package/dist/theme/datalab.min.css +2 -2
  32. package/dist/theme/graph.css +5 -1
  33. package/dist/theme/graph.min.css +2 -2
  34. package/dist/theme/insight.css +5 -1
  35. package/dist/theme/insight.min.css +2 -2
  36. package/dist/theme/modern.css +5 -1
  37. package/dist/theme/modern.min.css +3 -4
  38. package/dist-esm/billboard.js +9051 -8666
  39. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +19 -25
  40. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +149 -148
  41. package/dist-esm/plugin/billboardjs-plugin-stanford.js +295 -286
  42. package/dist-esm/plugin/billboardjs-plugin-tableview.js +235 -234
  43. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +40 -41
  44. package/package.json +26 -46
  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 +5 -7
  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 +79 -51
  63. package/src/ChartInternal/data/IData.ts +22 -29
  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 +40 -23
  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 +54 -25
  70. package/src/ChartInternal/interactions/flow.ts +14 -4
  71. package/src/ChartInternal/interactions/interaction.ts +34 -12
  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 +5 -5
  76. package/src/ChartInternal/internals/clip.ts +9 -10
  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 +130 -47
  81. package/src/ChartInternal/internals/legend.ts +99 -66
  82. package/src/ChartInternal/internals/redraw.ts +3 -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 +97 -66
  88. package/src/ChartInternal/internals/style.ts +21 -19
  89. package/src/ChartInternal/internals/text.ts +64 -39
  90. package/src/ChartInternal/internals/title.ts +2 -2
  91. package/src/ChartInternal/internals/tooltip.ts +83 -34
  92. package/src/ChartInternal/internals/transform.ts +2 -2
  93. package/src/ChartInternal/internals/type.ts +12 -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/gauge.ts +16 -9
  100. package/src/ChartInternal/shape/line.ts +62 -46
  101. package/src/ChartInternal/shape/point.common.ts +1 -4
  102. package/src/ChartInternal/shape/point.ts +52 -32
  103. package/src/ChartInternal/shape/polar.ts +4 -2
  104. package/src/ChartInternal/shape/radar.ts +40 -22
  105. package/src/ChartInternal/shape/shape.ts +84 -58
  106. package/src/ChartInternal/shape/treemap.ts +29 -20
  107. package/src/Plugin/bubblecompare/index.ts +1 -3
  108. package/src/Plugin/sparkline/index.ts +3 -4
  109. package/src/Plugin/stanford/ColorScale.ts +3 -2
  110. package/src/Plugin/stanford/Elements.ts +15 -6
  111. package/src/Plugin/stanford/Options.ts +5 -5
  112. package/src/Plugin/stanford/index.ts +13 -9
  113. package/src/Plugin/tableview/Options.ts +1 -1
  114. package/src/Plugin/tableview/const.ts +1 -4
  115. package/src/Plugin/tableview/index.ts +11 -9
  116. package/src/Plugin/textoverlap/index.ts +4 -6
  117. package/src/config/Options/Options.ts +3 -3
  118. package/src/config/Options/axis/axis.ts +36 -0
  119. package/src/config/Options/axis/x.ts +12 -13
  120. package/src/config/Options/axis/y.ts +13 -13
  121. package/src/config/Options/axis/y2.ts +23 -10
  122. package/src/config/Options/common/color.ts +4 -4
  123. package/src/config/Options/common/grid.ts +4 -4
  124. package/src/config/Options/common/legend.ts +13 -14
  125. package/src/config/Options/common/main.ts +23 -23
  126. package/src/config/Options/common/point.ts +17 -18
  127. package/src/config/Options/common/title.ts +2 -2
  128. package/src/config/Options/common/tooltip.ts +13 -11
  129. package/src/config/Options/data/axis.ts +2 -2
  130. package/src/config/Options/data/data.ts +45 -45
  131. package/src/config/Options/interaction/interaction.ts +1 -1
  132. package/src/config/Options/interaction/subchart.ts +2 -2
  133. package/src/config/Options/interaction/zoom.ts +9 -9
  134. package/src/config/Options/shape/arc.ts +10 -13
  135. package/src/config/Options/shape/area.ts +5 -7
  136. package/src/config/Options/shape/bar.ts +8 -10
  137. package/src/config/Options/shape/bubble.ts +1 -1
  138. package/src/config/Options/shape/candlestick.ts +2 -2
  139. package/src/config/Options/shape/donut.ts +4 -4
  140. package/src/config/Options/shape/gauge.ts +6 -6
  141. package/src/config/Options/shape/line.ts +3 -3
  142. package/src/config/Options/shape/pie.ts +5 -5
  143. package/src/config/Options/shape/polar.ts +3 -3
  144. package/src/config/Options/shape/radar.ts +2 -2
  145. package/src/config/Options/shape/scatter.ts +1 -1
  146. package/src/config/Options/shape/treemap.ts +1 -1
  147. package/src/config/Store/Element.ts +8 -5
  148. package/src/config/Store/State.ts +19 -13
  149. package/src/config/classes.ts +6 -4
  150. package/src/config/config.ts +1 -1
  151. package/src/config/resolver/axis.ts +4 -4
  152. package/src/config/resolver/interaction.ts +3 -7
  153. package/src/config/resolver/shape.ts +11 -12
  154. package/src/core.ts +2 -3
  155. package/src/index.esm.ts +2 -6
  156. package/src/index.ts +2 -2
  157. package/src/module/Cache.ts +2 -3
  158. package/src/module/browser.ts +15 -10
  159. package/src/module/error.ts +9 -8
  160. package/src/module/generator.ts +3 -5
  161. package/src/module/util.ts +60 -37
  162. package/src/module/worker.ts +14 -11
  163. package/src/scss/billboard.scss +6 -0
  164. package/src/scss/theme/dark.scss +6 -0
  165. package/src/scss/theme/datalab.scss +6 -0
  166. package/src/scss/theme/graph.scss +6 -0
  167. package/src/scss/theme/insight.scss +6 -0
  168. package/src/scss/theme/modern.scss +6 -0
  169. package/types/axis.d.ts +7 -0
  170. package/types/options.d.ts +7 -0
  171. package/types/options.shape.d.ts +7 -0
@@ -31,5 +31,5 @@ export default {
31
31
  * zerobased: false
32
32
  * }
33
33
  */
34
- scatter_zerobased: false,
34
+ scatter_zerobased: false
35
35
  };
@@ -47,7 +47,7 @@ export default {
47
47
  * }
48
48
  */
49
49
  treemap_tile: "binary",
50
- treemap_label_format: <(() => number|string)|undefined> undefined,
50
+ treemap_label_format: <(() => number | string) | undefined>undefined,
51
51
  treemap_label_threshold: 0.05,
52
52
  treemap_label_show: true
53
53
  };
@@ -14,9 +14,7 @@ type T = d3Selection | null;
14
14
  */
15
15
  export default class Element {
16
16
  constructor() {
17
- const element: {
18
- [key: string]: T | {[key: string]: T}
19
- } = {
17
+ const element: {[key: string]: T | {[key: string]: T}} = {
20
18
  chart: null,
21
19
  main: null,
22
20
  svg: null,
@@ -26,6 +24,11 @@ export default class Element {
26
24
  y2: null,
27
25
  subX: null
28
26
  },
27
+ axisTooltip: {
28
+ x: null,
29
+ y: null,
30
+ y2: null
31
+ },
29
32
  defs: null,
30
33
  tooltip: null,
31
34
  legend: null,
@@ -48,12 +51,12 @@ export default class Element {
48
51
  grid: {
49
52
  main: null, // grid (also focus)
50
53
  x: null, // xgrid,
51
- y: null, // ygrid,
54
+ y: null // ygrid,
52
55
  },
53
56
  gridLines: {
54
57
  main: null, // gridLines
55
58
  x: null, // xgridLines,
56
- y: null, // ygridLines
59
+ y: null // ygridLines
57
60
  },
58
61
  region: {
59
62
  main: null, // region
@@ -55,14 +55,20 @@ export default class State {
55
55
  dataMax: 0,
56
56
 
57
57
  maxTickSize: {
58
- x: {width: 0, height: 0, ticks: <(number|string)[]> [], clipPath: 0, domain: ""},
58
+ x: {
59
+ width: 0,
60
+ height: 0,
61
+ ticks: <(number | string)[]>[],
62
+ clipPath: 0,
63
+ domain: ""
64
+ },
59
65
  y: {width: 0, height: 0, domain: ""},
60
66
  y2: {width: 0, height: 0, domain: ""}
61
67
  },
62
68
 
63
69
  // current used chart type list
64
- types: <string[]> [],
65
- needle: undefined, // arc needle current value
70
+ types: <string[]>[],
71
+ needle: undefined // arc needle current value
66
72
  },
67
73
 
68
74
  // legend
@@ -135,25 +141,25 @@ export default class State {
135
141
  orgConfig: {}, // user original genration config
136
142
 
137
143
  // ID strings
138
- hiddenTargetIds: <string[]> [],
139
- hiddenLegendIds: <string[]> [],
140
- focusedTargetIds: <string[]> [],
141
- defocusedTargetIds: <string[]> [],
144
+ hiddenTargetIds: <string[]>[],
145
+ hiddenLegendIds: <string[]>[],
146
+ focusedTargetIds: <string[]>[],
147
+ defocusedTargetIds: <string[]>[],
142
148
 
143
149
  // value for Arc
144
150
  radius: 0,
145
- innerRadius: <{[key: string]: number}|number> 0,
146
- outerRadius: <{[key: string]: number}|number|undefined> undefined,
151
+ innerRadius: <{[key: string]: number} | number>0,
152
+ outerRadius: <{[key: string]: number} | number | undefined>undefined,
147
153
  innerRadiusRatio: 0,
148
154
  gaugeArcWidth: 0,
149
155
  radiusExpanded: 0,
150
156
 
151
157
  // xgrid attribute
152
158
  xgridAttr: {
153
- x1: <number | null> null,
154
- x2: <number | null> null,
155
- y1: <number | null> null,
156
- y2: <number | null> null
159
+ x1: <number | null>null,
160
+ x2: <number | null>null,
161
+ y1: <number | null>null,
162
+ y2: <number | null>null
157
163
  }
158
164
  };
159
165
  }
@@ -39,7 +39,10 @@ export const $AXIS = {
39
39
  axisY: "bb-axis-y",
40
40
  axisY2: "bb-axis-y2",
41
41
  axisY2Label: "bb-axis-y2-label",
42
- axisYLabel: "bb-axis-y-label"
42
+ axisYLabel: "bb-axis-y-label",
43
+ axisXTooltip: "bb-axis-x-tooltip",
44
+ axisYTooltip: "bb-axis-y-tooltip",
45
+ axisY2Tooltip: "bb-axis-y2-tooltip"
43
46
  };
44
47
 
45
48
  export const $BAR = {
@@ -103,8 +106,7 @@ export const $EVENT = {
103
106
  eventRect: "bb-event-rect",
104
107
  eventRects: "bb-event-rects",
105
108
  eventRectsMultiple: "bb-event-rects-multiple",
106
- eventRectsSingle: "bb-event-rects-single",
107
-
109
+ eventRectsSingle: "bb-event-rects-single"
108
110
  };
109
111
 
110
112
  export const $FOCUS = {
@@ -151,7 +153,7 @@ export const $SELECT = {
151
153
 
152
154
  export const $SHAPE = {
153
155
  shape: "bb-shape",
154
- shapes: "bb-shapes",
156
+ shapes: "bb-shapes"
155
157
  };
156
158
 
157
159
  export const $SUBCHART = {
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) 2017 ~ present NAVER Corp.
3
3
  * billboard.js project is licensed under the MIT license
4
4
  */
5
+ import type {ChartOptions} from "../../types/options";
5
6
  import {isDefined, isObjectType} from "../module/util";
6
7
  import Options from "./Options/Options";
7
- import type {ChartOptions} from "../../types/options";
8
8
 
9
9
  /**
10
10
  * Load configuration option
@@ -8,11 +8,11 @@
8
8
  // Chart
9
9
  import apiAxis from "../../Chart/api/axis";
10
10
  import apiCategory from "../../Chart/api/category";
11
+ import apiFlow from "../../Chart/api/flow";
11
12
  import apiGrid from "../../Chart/api/grid";
12
13
  import apiGroup from "../../Chart/api/group";
13
14
  import apiRegion from "../../Chart/api/regions";
14
15
  import apiX from "../../Chart/api/x";
15
- import apiFlow from "../../Chart/api/flow";
16
16
 
17
17
  // ChartInternal
18
18
  import axis from "../../ChartInternal/Axis/Axis";
@@ -25,9 +25,9 @@ import region from "../../ChartInternal/internals/region";
25
25
  import sizeAxis from "../../ChartInternal/internals/size.axis";
26
26
 
27
27
  // Axis based options
28
- import optDataAxis from "../Options/data/axis";
29
28
  import optAxis from "../Options/axis/axis";
30
29
  import optGrid from "../Options/common/grid";
30
+ import optDataAxis from "../Options/data/axis";
31
31
 
32
32
  export const api = [
33
33
  apiAxis,
@@ -46,11 +46,11 @@ export const internal = {
46
46
  flow,
47
47
  grid,
48
48
  region,
49
- sizeAxis,
49
+ sizeAxis
50
50
  };
51
51
 
52
52
  export const options = {
53
53
  optDataAxis,
54
54
  optAxis,
55
- optGrid,
55
+ optGrid
56
56
  };
@@ -4,8 +4,8 @@
4
4
  */
5
5
  import Chart from "../../Chart/Chart";
6
6
  import ChartInternal from "../../ChartInternal/ChartInternal";
7
- import Options from "../Options/Options";
8
7
  import {extend} from "../../module/util";
8
+ import Options from "../Options/Options";
9
9
 
10
10
  // Chart
11
11
  import apiSelection from "../../Chart/api/selection";
@@ -13,20 +13,16 @@ import apiSubchart from "../../Chart/api/subchart";
13
13
  import apiZoom from "../../Chart/api/zoom";
14
14
 
15
15
  // ChartInternal
16
- import selection from "../../ChartInternal/internals/selection";
17
16
  import subchart from "../../ChartInternal/interactions/subchart";
18
17
  import zoom from "../../ChartInternal/interactions/zoom";
18
+ import selection from "../../ChartInternal/internals/selection";
19
19
 
20
20
  // Axis based options
21
21
  import optDataSelection from "../Options/data/selection";
22
22
  import optSubchart from "../Options/interaction/subchart";
23
23
  import optZoom from "../Options/interaction/zoom";
24
24
 
25
- export {
26
- selectionModule as selection,
27
- subchartModule as subchart,
28
- zoomModule as zoom
29
- };
25
+ export {selectionModule as selection, subchartModule as subchart, zoomModule as zoom};
30
26
 
31
27
  let selectionModule = (): boolean => {
32
28
  extend(ChartInternal.prototype, selection);
@@ -4,27 +4,23 @@
4
4
  */
5
5
  import Chart from "../../Chart/Chart";
6
6
  import ChartInternal from "../../ChartInternal/ChartInternal";
7
- import Options from "../Options/Options";
8
- import {TYPE} from "../const";
9
7
  import {extend} from "../../module/util";
8
+ import {TYPE} from "../const";
9
+ import Options from "../Options/Options";
10
10
 
11
11
  // Axis
12
- import {
13
- api as axisAPI,
14
- internal as axisInternal,
15
- options as axisOptions
16
- } from "./axis";
12
+ import {api as axisAPI, internal as axisInternal, options as axisOptions} from "./axis";
17
13
 
18
14
  // Shape
19
15
  import shapeArc from "../../ChartInternal/shape/arc";
20
16
  import shapeArea from "../../ChartInternal/shape/area";
21
17
  import shapeBar from "../../ChartInternal/shape/bar";
18
+ import shapeBubble from "../../ChartInternal/shape/bubble";
22
19
  import shapeCandlestick from "../../ChartInternal/shape/candlestick";
23
20
  import shapeGauge from "../../ChartInternal/shape/gauge";
24
- import shapeBubble from "../../ChartInternal/shape/bubble";
25
21
  import shapeLine from "../../ChartInternal/shape/line";
26
- import shapePointCommon from "../../ChartInternal/shape/point.common";
27
22
  import shapePoint from "../../ChartInternal/shape/point";
23
+ import shapePointCommon from "../../ChartInternal/shape/point.common";
28
24
  import shapePolar from "../../ChartInternal/shape/polar";
29
25
  import shapeRadar from "../../ChartInternal/shape/radar";
30
26
  import shapeTreemap from "../../ChartInternal/shape/treemap";
@@ -151,17 +147,20 @@ let bar = (): string => (
151
147
  );
152
148
  let bubble = (): string => (
153
149
  extendAxis(
154
- [shapePointCommon, shapePoint, shapeBubble], [optBubble, optPoint]
150
+ [shapePointCommon, shapePoint, shapeBubble],
151
+ [optBubble, optPoint]
155
152
  ), (bubble = () => TYPE.BUBBLE)()
156
153
  );
157
154
  let candlestick = (): string => (
158
155
  extendAxis(
159
- [shapeCandlestick, shapePointCommon], [optCandlestick, optPoint]
156
+ [shapeCandlestick, shapePointCommon],
157
+ [optCandlestick, optPoint]
160
158
  ), (candlestick = () => TYPE.CANDLESTICK)()
161
159
  );
162
160
  let scatter = (): string => (
163
161
  extendAxis(
164
- [shapePointCommon, shapePoint], [optPoint, optScatter]
162
+ [shapePointCommon, shapePoint],
163
+ [optPoint, optScatter]
165
164
  ), (scatter = () => TYPE.SCATTER)()
166
165
  );
167
166
 
package/src/core.ts CHANGED
@@ -5,9 +5,6 @@
5
5
  import Chart from "./Chart/Chart";
6
6
  import {isObject, mergeObj} from "./module/util";
7
7
 
8
- // eslint-disable-next-line no-use-before-define
9
- export {bb, bb as default};
10
-
11
8
  let defaults = {};
12
9
 
13
10
  /**
@@ -157,3 +154,5 @@ const bb = {
157
154
  */
158
155
  plugin: {}
159
156
  };
157
+
158
+ export {bb, bb as default};
package/src/index.esm.ts CHANGED
@@ -25,10 +25,6 @@ export {
25
25
  } from "./config/resolver/shape";
26
26
 
27
27
  // interaction module
28
- export {
29
- selection,
30
- subchart,
31
- zoom
32
- } from "./config/resolver/interaction";
28
+ export {selection, subchart, zoom} from "./config/resolver/interaction";
33
29
 
34
- export {default, bb} from "./core";
30
+ export {bb, default} from "./core";
package/src/index.ts CHANGED
@@ -2,8 +2,8 @@
2
2
  * Copyright (c) 2017 ~ present NAVER Corp.
3
3
  * billboard project is licensed under the MIT license
4
4
  */
5
- import * as shape from "./config/resolver/shape";
6
5
  import * as interaction from "./config/resolver/interaction";
6
+ import * as shape from "./config/resolver/shape";
7
7
 
8
8
  // extends shape modules
9
9
  Object.keys(shape)
@@ -13,4 +13,4 @@ Object.keys(shape)
13
13
  Object.keys(interaction)
14
14
  .forEach(v => interaction[v]());
15
15
 
16
- export {default, bb} from "./core";
16
+ export {bb, default} from "./core";
@@ -2,8 +2,8 @@
2
2
  * Copyright (c) 2017 ~ present NAVER Corp.
3
3
  * billboard.js project is licensed under the MIT license
4
4
  */
5
- import {isString, isValue} from "./util";
6
5
  import type {DataRow} from "../../types/types";
6
+ import {isString, isValue} from "./util";
7
7
 
8
8
  /**
9
9
  * Constant for cache key
@@ -57,7 +57,7 @@ export default class Cache {
57
57
  * @returns {*}
58
58
  * @private
59
59
  */
60
- get(key: string|string[], isDataType = false): any | null {
60
+ get(key: string | string[], isDataType = false): any | null {
61
61
  // when is isDataType, key should be string array
62
62
  if (isDataType && Array.isArray(key)) {
63
63
  const targets: any[] = [];
@@ -98,7 +98,6 @@ export default class Cache {
98
98
  * @returns {object}
99
99
  * @private
100
100
  */
101
- // eslint-disable-next-line camelcase
102
101
  cloneTarget(target: DataRow): DataRow {
103
102
  return {
104
103
  id: target.id,
@@ -7,20 +7,14 @@
7
7
  * @private
8
8
  */
9
9
  /* eslint-disable no-new-func, no-undef */
10
- export {
11
- win as window,
12
- doc as document,
13
- requestAnimationFrame, cancelAnimationFrame,
14
- requestIdleCallback, cancelIdleCallback
15
- };
16
-
17
10
  /**
18
11
  * Get global object
19
12
  * @returns {object} window object
20
13
  * @private
21
14
  */
22
15
  function getGlobal() {
23
- return (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis) ||
16
+ return (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object &&
17
+ globalThis) ||
24
18
  (typeof global === "object" && global !== null && global.Object === Object && global) ||
25
19
  (typeof self === "object" && self !== null && self.Object === Object && self) ||
26
20
  Function("return this")();
@@ -33,8 +27,10 @@ function getGlobal() {
33
27
  * @private
34
28
  */
35
29
  function getFallback(w) {
36
- const hasRAF = typeof w?.requestAnimationFrame === "function" && typeof w?.cancelAnimationFrame === "function";
37
- const hasRIC = typeof w?.requestIdleCallback === "function" && typeof w?.cancelIdleCallback === "function";
30
+ const hasRAF = typeof w?.requestAnimationFrame === "function" &&
31
+ typeof w?.cancelAnimationFrame === "function";
32
+ const hasRIC = typeof w?.requestIdleCallback === "function" &&
33
+ typeof w?.cancelIdleCallback === "function";
38
34
  const request = cb => setTimeout(cb, 1);
39
35
  const cancel = id => clearTimeout(id);
40
36
 
@@ -55,3 +51,12 @@ const [
55
51
  requestIdleCallback,
56
52
  cancelIdleCallback
57
53
  ] = getFallback(win);
54
+
55
+ export {
56
+ cancelAnimationFrame,
57
+ cancelIdleCallback,
58
+ doc as document,
59
+ requestAnimationFrame,
60
+ requestIdleCallback,
61
+ win as window
62
+ };
@@ -1,5 +1,5 @@
1
- import {window} from "./browser";
2
1
  import {TYPE, TYPE_METHOD_NEEDED} from "../config/const";
2
+ import {window} from "./browser";
3
3
  import {camelize, isEmpty} from "./util";
4
4
 
5
5
  /**
@@ -7,10 +7,7 @@ import {camelize, isEmpty} from "./util";
7
7
  * billboard.js project is licensed under the MIT license
8
8
  */
9
9
  /* eslint no-console: "off" */
10
- export {
11
- checkModuleImport,
12
- logError
13
- };
10
+ export {checkModuleImport, logError};
14
11
 
15
12
  /**
16
13
  * Check chart type module imports.
@@ -35,7 +32,9 @@ function checkModuleImport(ctx) {
35
32
  }
36
33
  }
37
34
 
38
- type && logError(`Please, make sure if %c${camelize(type)}`, "module has been imported and specified correctly.");
35
+ type &&
36
+ logError(`Please, make sure if %c${camelize(type)}`,
37
+ "module has been imported and specified correctly.");
39
38
  }
40
39
 
41
40
  /**
@@ -46,11 +45,13 @@ function checkModuleImport(ctx) {
46
45
  */
47
46
  function logError(head, tail) {
48
47
  const prefix = "[billboard.js]";
49
- const info = "https://github.com/naver/billboard.js/wiki/CHANGELOG-v2#modularization-by-its-functionality";
48
+ const info =
49
+ "https://github.com/naver/billboard.js/wiki/CHANGELOG-v2#modularization-by-its-functionality";
50
50
  const hasConsole = window.console?.error;
51
51
 
52
52
  if (hasConsole) {
53
- console.error(`❌ ${prefix} ${head}`, "background:red;color:white;display:block;font-size:15px", tail);
53
+ console.error(`❌ ${prefix} ${head}`,
54
+ "background:red;color:white;display:block;font-size:15px", tail);
54
55
  console.info("%cℹ️", "font-size:15px", info);
55
56
  }
56
57
 
@@ -3,7 +3,7 @@
3
3
  * billboard.js project is licensed under the MIT license
4
4
  */
5
5
  import type {d3Transition} from "../../types/types";
6
- import {window, requestIdleCallback} from "./browser";
6
+ import {requestIdleCallback, window} from "./browser";
7
7
  import {isArray, isNumber, isTabVisible, runUntil} from "./util";
8
8
 
9
9
  const {setTimeout, clearTimeout} = window;
@@ -14,7 +14,7 @@ const {setTimeout, clearTimeout} = window;
14
14
  * @returns {Fucntion}
15
15
  * @private
16
16
  */
17
- export function generateResize(option: boolean|number) {
17
+ export function generateResize(option: boolean | number) {
18
18
  const fn: Function[] = [];
19
19
  let timeout;
20
20
 
@@ -94,9 +94,7 @@ export function generateWait() {
94
94
  };
95
95
 
96
96
  f.add = function(t: Transition | Transition[]) {
97
- isArray(t) ?
98
- (transitionsToWait = transitionsToWait.concat(t)) :
99
- transitionsToWait.push(t);
97
+ isArray(t) ? (transitionsToWait = transitionsToWait.concat(t)) : transitionsToWait.push(t);
100
98
  };
101
99
 
102
100
  return f;