@carbon/charts 1.7.6 → 1.9.0-next.0
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/CHANGELOG.md +97 -155
- package/README.md +18 -20
- package/dist/_baseEach-603421de.mjs +21 -0
- package/dist/_baseEach-603421de.mjs.map +1 -0
- package/dist/_baseEach-cdac417f.js +2 -0
- package/dist/_baseEach-cdac417f.js.map +1 -0
- package/dist/a11y-7bad4f48.mjs +5 -0
- package/dist/a11y-7bad4f48.mjs.map +1 -0
- package/dist/a11y-c7c9d087.js +2 -0
- package/dist/a11y-c7c9d087.js.map +1 -0
- package/dist/angle-utils-6f166b40.js +2 -0
- package/dist/angle-utils-6f166b40.js.map +1 -0
- package/dist/angle-utils-8b6ce998.mjs +387 -0
- package/dist/angle-utils-8b6ce998.mjs.map +1 -0
- package/dist/axis-chart.d.ts +13 -0
- package/dist/chart.d.ts +18 -0
- package/dist/charts/alluvial.d.ts +10 -0
- package/dist/charts/area-stacked.d.ts +8 -0
- package/dist/charts/area.d.ts +8 -0
- package/dist/charts/bar-grouped.d.ts +8 -0
- package/dist/charts/bar-simple.d.ts +8 -0
- package/dist/charts/bar-stacked.d.ts +8 -0
- package/dist/charts/boxplot.d.ts +10 -0
- package/dist/charts/bubble.d.ts +8 -0
- package/dist/charts/bullet.d.ts +10 -0
- package/dist/charts/choropleth.d.ts +14 -0
- package/dist/charts/circle-pack.d.ts +10 -0
- package/dist/charts/combo.d.ts +9 -0
- package/dist/charts/donut.d.ts +8 -0
- package/dist/charts/gauge.d.ts +10 -0
- package/dist/charts/heatmap.d.ts +14 -0
- package/dist/charts/histogram.d.ts +10 -0
- package/dist/charts/index.d.ts +27 -0
- package/dist/charts/line.d.ts +8 -0
- package/dist/charts/lollipop.d.ts +8 -0
- package/dist/charts/meter.d.ts +10 -0
- package/dist/charts/pie.d.ts +10 -0
- package/dist/charts/radar.d.ts +10 -0
- package/dist/charts/scatter.d.ts +8 -0
- package/dist/charts/tree.d.ts +10 -0
- package/dist/charts/treemap.d.ts +10 -0
- package/dist/charts/wordcloud.d.ts +10 -0
- package/dist/choropleth-4ac6ac20.js +82 -0
- package/dist/choropleth-4ac6ac20.js.map +1 -0
- package/dist/choropleth-f473ea0d.mjs +7997 -0
- package/dist/choropleth-f473ea0d.mjs.map +1 -0
- package/dist/color-scale-utils-5eb3eeaa.mjs +3809 -0
- package/dist/color-scale-utils-5eb3eeaa.mjs.map +1 -0
- package/dist/color-scale-utils-7d463811.js +3 -0
- package/dist/color-scale-utils-7d463811.js.map +1 -0
- package/dist/components/axes/axis.d.ts +24 -0
- package/dist/components/axes/chart-clip.d.ts +13 -0
- package/dist/components/axes/grid-brush.d.ts +10 -0
- package/dist/components/axes/grid.d.ts +22 -0
- package/dist/components/axes/index.d.ts +12 -0
- package/dist/components/axes/ruler-binned.d.ts +10 -0
- package/dist/components/axes/ruler.d.ts +30 -0
- package/dist/components/axes/toolbar.d.ts +40 -0
- package/dist/components/axes/two-dimensional-axes.d.ts +16 -0
- package/dist/components/axes/zero-line.d.ts +7 -0
- package/dist/components/axes/zoom-bar.d.ts +31 -0
- package/dist/components/component.d.ts +30 -0
- package/dist/components/diagrams/buildPaths.d.ts +40 -0
- package/dist/components/diagrams/index.d.ts +2 -0
- package/dist/components/essentials/canvas-chart-clip.d.ts +6 -0
- package/dist/components/essentials/color-scale-legend.d.ts +20 -0
- package/dist/components/essentials/geo-projection.d.ts +16 -0
- package/dist/components/essentials/highlights.d.ts +13 -0
- package/dist/components/essentials/index.d.ts +11 -0
- package/dist/components/essentials/legend.d.ts +11 -0
- package/dist/components/essentials/modal.d.ts +14 -0
- package/dist/components/essentials/threshold.d.ts +20 -0
- package/dist/components/essentials/title-meter.d.ts +30 -0
- package/dist/components/essentials/title.d.ts +20 -0
- package/dist/components/essentials/tooltip.d.ts +22 -0
- package/dist/components/graphs/alluvial.d.ts +14 -0
- package/dist/components/graphs/area-stacked.d.ts +11 -0
- package/dist/components/graphs/area.d.ts +12 -0
- package/dist/components/graphs/bar-grouped.d.ts +22 -0
- package/dist/components/graphs/bar-simple.d.ts +12 -0
- package/dist/components/graphs/bar-stacked.d.ts +13 -0
- package/dist/components/graphs/bar.d.ts +5 -0
- package/dist/components/graphs/boxplot.d.ts +9 -0
- package/dist/components/graphs/bubble.d.ts +13 -0
- package/dist/components/graphs/bullet.d.ts +12 -0
- package/dist/components/graphs/choropleth.d.ts +6 -0
- package/dist/components/graphs/circle-pack.d.ts +19 -0
- package/dist/components/graphs/donut.d.ts +9 -0
- package/dist/components/graphs/gauge.d.ts +27 -0
- package/dist/components/graphs/heatmap.d.ts +25 -0
- package/dist/components/graphs/histogram.d.ts +12 -0
- package/dist/components/graphs/index.d.ts +28 -0
- package/dist/components/graphs/line.d.ts +11 -0
- package/dist/components/graphs/lollipop.d.ts +14 -0
- package/dist/components/graphs/meter.d.ts +10 -0
- package/dist/components/graphs/pie.d.ts +16 -0
- package/dist/components/graphs/radar.d.ts +25 -0
- package/dist/components/graphs/scatter-stacked.d.ts +8 -0
- package/dist/components/graphs/scatter.d.ts +21 -0
- package/dist/components/graphs/skeleton-lines.d.ts +12 -0
- package/dist/components/graphs/skeleton.d.ts +23 -0
- package/dist/components/graphs/tree.d.ts +9 -0
- package/dist/components/graphs/treemap.d.ts +11 -0
- package/dist/components/graphs/wordcloud.d.ts +12 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +76 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/layout.d.ts +18 -0
- package/dist/components/layout/spacer.d.ts +5 -0
- package/dist/configuration-non-customizable.d.ts +263 -0
- package/dist/configuration.d.ts +48 -0
- package/dist/demo/charts/alluvial.d.ts +109 -0
- package/dist/demo/charts/area.d.ts +224 -0
- package/dist/demo/charts/bar.d.ts +681 -0
- package/dist/demo/charts/boxplot.d.ts +34 -0
- package/dist/demo/charts/bubble.d.ts +141 -0
- package/dist/demo/charts/bullet.d.ts +24 -0
- package/dist/demo/charts/chart-types.d.ts +128 -0
- package/dist/demo/charts/choropleth.d.ts +738 -0
- package/dist/demo/charts/circle-pack.d.ts +91 -0
- package/dist/demo/charts/combo.d.ts +482 -0
- package/dist/demo/charts/donut.d.ts +64 -0
- package/dist/demo/charts/gauge.d.ts +40 -0
- package/dist/demo/charts/heatmap.d.ts +125 -0
- package/dist/demo/charts/hightlight.d.ts +40 -0
- package/dist/demo/charts/histogram.d.ts +63 -0
- package/dist/demo/charts/index.d.ts +62 -0
- package/dist/demo/charts/line.d.ts +361 -0
- package/dist/demo/charts/lollipop.d.ts +39 -0
- package/dist/demo/charts/meter.d.ts +95 -0
- package/dist/demo/charts/pie.d.ts +46 -0
- package/dist/demo/charts/radar.d.ts +63 -0
- package/dist/demo/charts/scatter.d.ts +118 -0
- package/dist/demo/charts/step.d.ts +96 -0
- package/dist/demo/charts/time-series-axis.d.ts +293 -0
- package/dist/demo/charts/toolbar.d.ts +12 -0
- package/dist/demo/charts/topojson-110.d.ts +360 -0
- package/dist/demo/charts/tree.d.ts +30 -0
- package/dist/demo/charts/treemap.d.ts +15 -0
- package/dist/demo/charts/wordcloud.d.ts +14 -0
- package/dist/demo/charts/zoom-bar.d.ts +79 -0
- package/dist/demo/index.d.ts +4 -0
- package/dist/demo/index.js +470 -0
- package/dist/demo/index.js.map +1 -0
- package/dist/demo/index.mjs +51789 -0
- package/dist/demo/index.mjs.map +1 -0
- package/dist/demo/styles.css +30574 -0
- package/dist/demo/styles.css.map +1 -0
- package/dist/demo/utils/index.d.ts +2 -0
- package/dist/demo/utils/sandbox.d.ts +39 -0
- package/dist/demo/utils/story-widgets.d.ts +7 -0
- package/dist/enums-a96ef472.mjs +89 -0
- package/dist/enums-a96ef472.mjs.map +1 -0
- package/dist/enums-aa2efd99.js +2 -0
- package/dist/enums-aa2efd99.js.map +1 -0
- package/dist/index-822564ed.js +2 -0
- package/dist/index-822564ed.js.map +1 -0
- package/dist/index-a266373c.mjs +749 -0
- package/dist/index-a266373c.mjs.map +1 -0
- package/dist/index-becfb567.mjs +72 -0
- package/dist/index-becfb567.mjs.map +1 -0
- package/dist/index-d865d500.js +2 -0
- package/dist/index-d865d500.js.map +1 -0
- package/dist/index-ec554115.mjs +62 -0
- package/dist/index-ec554115.mjs.map +1 -0
- package/dist/index-f23685eb.js +2 -0
- package/dist/index-f23685eb.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1121 -0
- package/dist/index.mjs.map +1 -0
- package/dist/interfaces/axis-scales.d.ts +201 -0
- package/dist/interfaces/charts.d.ts +520 -0
- package/dist/interfaces/components.d.ts +231 -0
- package/dist/interfaces/enums.d.ts +261 -0
- package/dist/interfaces/events.d.ts +239 -0
- package/dist/interfaces/index.d.ts +12 -0
- package/dist/interfaces/index.js +2 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/index.mjs +58 -0
- package/dist/interfaces/index.mjs.map +1 -0
- package/dist/interfaces/layout.d.ts +21 -0
- package/dist/interfaces/model.d.ts +35 -0
- package/dist/interfaces/services.d.ts +20 -0
- package/dist/interfaces/truncation.d.ts +17 -0
- package/dist/model/binned-charts.d.ts +7 -0
- package/dist/model/cartesian-charts.d.ts +24 -0
- package/dist/model/choropleth.d.ts +29 -0
- package/dist/model/heatmap.d.ts +57 -0
- package/dist/model/index.d.ts +16 -0
- package/dist/model/index.js +3 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model/index.mjs +1107 -0
- package/dist/model/index.mjs.map +1 -0
- package/dist/model/meter.d.ts +20 -0
- package/dist/model/model.d.ts +110 -0
- package/dist/services/angle-utils.d.ts +15 -0
- package/dist/services/color-scale-utils.d.ts +2 -0
- package/dist/services/curves.d.ts +24 -0
- package/dist/services/essentials/dom-utils.d.ts +45 -0
- package/dist/services/essentials/events.d.ts +8 -0
- package/dist/services/essentials/files.d.ts +7 -0
- package/dist/services/essentials/gradient-utils.d.ts +6 -0
- package/dist/services/essentials/index.d.ts +5 -0
- package/dist/services/essentials/transitions.d.ts +13 -0
- package/dist/services/index.d.ts +9 -0
- package/dist/services/index.js +2 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/index.mjs +32 -0
- package/dist/services/index.mjs.map +1 -0
- package/dist/services/scales-cartesian.d.ts +89 -0
- package/dist/services/service.d.ts +11 -0
- package/dist/services/zoom.d.ts +21 -0
- package/dist/styles/_chart-holder.scss +50 -0
- package/dist/styles/color-palatte.scss +458 -0
- package/dist/styles/colors.scss +131 -0
- package/dist/styles/components/_color-legend.scss +11 -0
- package/dist/styles/components/_edge.scss +65 -0
- package/dist/styles/components/_grid.scss +30 -0
- package/dist/styles/components/_marker.scss +7 -0
- package/dist/styles/components/_meter-title.scss +37 -0
- package/dist/styles/components/_tooltip.scss +132 -0
- package/dist/styles/components/diagrams/_card-node.scss +97 -0
- package/dist/styles/components/diagrams/_edge.scss +66 -0
- package/dist/styles/components/diagrams/_shape-node.scss +89 -0
- package/dist/styles/components/diagrams/index.scss +4 -0
- package/dist/styles/graphs/_alluvial.scss +17 -0
- package/dist/styles/graphs/_bullet.scss +36 -0
- package/dist/styles/graphs/_choropleth.scss +18 -0
- package/dist/styles/graphs/_circle-pack.scss +36 -0
- package/dist/styles/graphs/_gauge.scss +23 -0
- package/dist/styles/graphs/_heatmap.scss +60 -0
- package/dist/styles/graphs/_meter.scss +34 -0
- package/dist/styles/graphs/_radar.scss +18 -0
- package/dist/styles/graphs/_scatter-stacked.scss +12 -0
- package/dist/styles/graphs/_tree.scss +46 -0
- package/dist/styles/graphs/index.scss +19 -0
- package/dist/styles/styles.scss +40 -0
- package/dist/styles/tokens.scss +407 -0
- package/dist/styles.css +28463 -0
- package/dist/styles.css.map +1 -0
- package/dist/styles.min.css +1 -0
- package/dist/styles.min.css.map +1 -0
- package/dist/tools.d.ts +150 -0
- package/package.json +140 -101
- package/axis-chart.d.ts +0 -10
- package/axis-chart.js +0 -169
- package/axis-chart.js.map +0 -1
- package/build/demo/create-codesandbox.d.ts +0 -113
- package/build/demo/data/CHART_TYPES.d.ts +0 -123
- package/build/demo/data/alluvial.d.ts +0 -109
- package/build/demo/data/area.d.ts +0 -224
- package/build/demo/data/bar.d.ts +0 -681
- package/build/demo/data/boxplot.d.ts +0 -34
- package/build/demo/data/bubble.d.ts +0 -141
- package/build/demo/data/bullet.d.ts +0 -24
- package/build/demo/data/circle-pack.d.ts +0 -91
- package/build/demo/data/combo.d.ts +0 -482
- package/build/demo/data/donut.d.ts +0 -64
- package/build/demo/data/gauge.d.ts +0 -40
- package/build/demo/data/heatmap.d.ts +0 -125
- package/build/demo/data/high-scale.d.ts +0 -1
- package/build/demo/data/hightlight.d.ts +0 -40
- package/build/demo/data/histogram.d.ts +0 -63
- package/build/demo/data/index.d.ts +0 -32
- package/build/demo/data/line.d.ts +0 -361
- package/build/demo/data/lollipop.d.ts +0 -39
- package/build/demo/data/meter.d.ts +0 -95
- package/build/demo/data/pie.d.ts +0 -46
- package/build/demo/data/radar.d.ts +0 -63
- package/build/demo/data/scatter.d.ts +0 -118
- package/build/demo/data/step.d.ts +0 -96
- package/build/demo/data/time-series-axis.d.ts +0 -368
- package/build/demo/data/toolbar.d.ts +0 -12
- package/build/demo/data/tree.d.ts +0 -30
- package/build/demo/data/treemap.d.ts +0 -15
- package/build/demo/data/wordcloud.d.ts +0 -14
- package/build/demo/data/zoom-bar.d.ts +0 -94
- package/build/demo/utils.d.ts +0 -40
- package/build/src/axis-chart.d.ts +0 -10
- package/build/src/chart.d.ts +0 -14
- package/build/src/charts/alluvial.d.ts +0 -8
- package/build/src/charts/area-stacked.d.ts +0 -6
- package/build/src/charts/area.d.ts +0 -6
- package/build/src/charts/bar-grouped.d.ts +0 -6
- package/build/src/charts/bar-simple.d.ts +0 -6
- package/build/src/charts/bar-stacked.d.ts +0 -6
- package/build/src/charts/boxplot.d.ts +0 -8
- package/build/src/charts/bubble.d.ts +0 -6
- package/build/src/charts/bullet.d.ts +0 -8
- package/build/src/charts/circle-pack.d.ts +0 -8
- package/build/src/charts/combo.d.ts +0 -7
- package/build/src/charts/donut.d.ts +0 -6
- package/build/src/charts/gauge.d.ts +0 -8
- package/build/src/charts/heatmap.d.ts +0 -10
- package/build/src/charts/histogram.d.ts +0 -8
- package/build/src/charts/index.d.ts +0 -24
- package/build/src/charts/line.d.ts +0 -6
- package/build/src/charts/lollipop.d.ts +0 -6
- package/build/src/charts/meter.d.ts +0 -8
- package/build/src/charts/pie.d.ts +0 -8
- package/build/src/charts/radar.d.ts +0 -8
- package/build/src/charts/scatter.d.ts +0 -6
- package/build/src/charts/tree.d.ts +0 -8
- package/build/src/charts/treemap.d.ts +0 -8
- package/build/src/charts/wordcloud.d.ts +0 -8
- package/build/src/components/axes/axis.d.ts +0 -24
- package/build/src/components/axes/chart-clip.d.ts +0 -13
- package/build/src/components/axes/grid-brush.d.ts +0 -10
- package/build/src/components/axes/grid.d.ts +0 -22
- package/build/src/components/axes/hover-axis.d.ts +0 -10
- package/build/src/components/axes/ruler-binned.d.ts +0 -7
- package/build/src/components/axes/ruler-stacked.d.ts +0 -4
- package/build/src/components/axes/ruler.d.ts +0 -27
- package/build/src/components/axes/toolbar.d.ts +0 -40
- package/build/src/components/axes/two-dimensional-axes.d.ts +0 -16
- package/build/src/components/axes/zero-line.d.ts +0 -7
- package/build/src/components/axes/zoom-bar.d.ts +0 -28
- package/build/src/components/component.d.ts +0 -28
- package/build/src/components/diagrams/buildPaths.d.ts +0 -63
- package/build/src/components/diagrams/markerDefinitions.d.ts +0 -37
- package/build/src/components/essentials/canvas-chart-clip.d.ts +0 -6
- package/build/src/components/essentials/color-scale-legend.d.ts +0 -17
- package/build/src/components/essentials/highlights.d.ts +0 -13
- package/build/src/components/essentials/legend.d.ts +0 -11
- package/build/src/components/essentials/modal.d.ts +0 -14
- package/build/src/components/essentials/threshold.d.ts +0 -20
- package/build/src/components/essentials/title-meter.d.ts +0 -30
- package/build/src/components/essentials/title.d.ts +0 -20
- package/build/src/components/essentials/tooltip-axis.d.ts +0 -4
- package/build/src/components/essentials/tooltip.d.ts +0 -22
- package/build/src/components/graphs/alluvial.d.ts +0 -14
- package/build/src/components/graphs/area-stacked.d.ts +0 -11
- package/build/src/components/graphs/area.d.ts +0 -12
- package/build/src/components/graphs/bar-grouped.d.ts +0 -22
- package/build/src/components/graphs/bar-simple.d.ts +0 -12
- package/build/src/components/graphs/bar-stacked.d.ts +0 -13
- package/build/src/components/graphs/bar.d.ts +0 -5
- package/build/src/components/graphs/boxplot.d.ts +0 -9
- package/build/src/components/graphs/bubble.d.ts +0 -13
- package/build/src/components/graphs/bullet.d.ts +0 -12
- package/build/src/components/graphs/circle-pack.d.ts +0 -19
- package/build/src/components/graphs/donut.d.ts +0 -9
- package/build/src/components/graphs/gauge.d.ts +0 -27
- package/build/src/components/graphs/heatmap.d.ts +0 -25
- package/build/src/components/graphs/histogram.d.ts +0 -12
- package/build/src/components/graphs/line.d.ts +0 -11
- package/build/src/components/graphs/lollipop.d.ts +0 -14
- package/build/src/components/graphs/meter.d.ts +0 -10
- package/build/src/components/graphs/pie.d.ts +0 -16
- package/build/src/components/graphs/radar.d.ts +0 -25
- package/build/src/components/graphs/scatter-stacked.d.ts +0 -8
- package/build/src/components/graphs/scatter.d.ts +0 -21
- package/build/src/components/graphs/skeleton-lines.d.ts +0 -11
- package/build/src/components/graphs/skeleton.d.ts +0 -22
- package/build/src/components/graphs/tree.d.ts +0 -9
- package/build/src/components/graphs/treemap.d.ts +0 -11
- package/build/src/components/graphs/wordcloud.d.ts +0 -12
- package/build/src/components/index.d.ts +0 -51
- package/build/src/components/layout/layout.d.ts +0 -17
- package/build/src/components/layout/spacer.d.ts +0 -5
- package/build/src/configuration-non-customizable.d.ts +0 -263
- package/build/src/configuration.d.ts +0 -44
- package/build/src/interfaces/a11y.d.ts +0 -12
- package/build/src/interfaces/axis-scales.d.ts +0 -201
- package/build/src/interfaces/charts.d.ts +0 -485
- package/build/src/interfaces/components.d.ts +0 -231
- package/build/src/interfaces/enums.d.ts +0 -249
- package/build/src/interfaces/events.d.ts +0 -230
- package/build/src/interfaces/index.d.ts +0 -7
- package/build/src/interfaces/layout.d.ts +0 -15
- package/build/src/interfaces/model.d.ts +0 -35
- package/build/src/interfaces/truncation.d.ts +0 -17
- package/build/src/model/alluvial.d.ts +0 -8
- package/build/src/model/binned-charts.d.ts +0 -7
- package/build/src/model/boxplot.d.ts +0 -14
- package/build/src/model/bullet.d.ts +0 -14
- package/build/src/model/cartesian-charts.d.ts +0 -24
- package/build/src/model/circle-pack.d.ts +0 -36
- package/build/src/model/gauge.d.ts +0 -9
- package/build/src/model/heatmap.d.ts +0 -57
- package/build/src/model/meter.d.ts +0 -19
- package/build/src/model/model.d.ts +0 -107
- package/build/src/model/pie.d.ts +0 -9
- package/build/src/model/radar.d.ts +0 -7
- package/build/src/model/tree.d.ts +0 -14
- package/build/src/model/treemap.d.ts +0 -8
- package/build/src/model/wordcloud.d.ts +0 -7
- package/build/src/services/angle-utils.d.ts +0 -205
- package/build/src/services/canvas-zoom.d.ts +0 -11
- package/build/src/services/curves.d.ts +0 -25
- package/build/src/services/essentials/dom-utils.d.ts +0 -39
- package/build/src/services/essentials/events.d.ts +0 -8
- package/build/src/services/essentials/files.d.ts +0 -6
- package/build/src/services/essentials/gradient-utils.d.ts +0 -6
- package/build/src/services/essentials/transitions.d.ts +0 -13
- package/build/src/services/index.d.ts +0 -9
- package/build/src/services/scales-cartesian.d.ts +0 -86
- package/build/src/services/service.d.ts +0 -10
- package/build/src/services/time-series.d.ts +0 -787
- package/build/src/services/zoom.d.ts +0 -21
- package/build/src/tools.d.ts +0 -2427
- package/build/stories/all.stories.d.ts +0 -1
- package/build/stories/tutorials/api.d.ts +0 -4
- package/build/stories/tutorials/color-palette.d.ts +0 -4
- package/build/stories/tutorials/combo-charts.d.ts +0 -4
- package/build/stories/tutorials/dual-axes.d.ts +0 -4
- package/build/stories/tutorials/event-listeners.d.ts +0 -4
- package/build/stories/tutorials/getting-started/angular.d.ts +0 -5
- package/build/stories/tutorials/getting-started/react.d.ts +0 -5
- package/build/stories/tutorials/getting-started/vanilla.d.ts +0 -5
- package/build/stories/tutorials/getting-started/vue.d.ts +0 -5
- package/build/stories/tutorials/index.d.ts +0 -11
- package/build/stories/tutorials/tabular-data-format.d.ts +0 -4
- package/build/stories/tutorials/themes.d.ts +0 -4
- package/build/stories/tutorials.stories.d.ts +0 -1
- package/bundle.js +0 -17
- package/chart.d.ts +0 -14
- package/chart.js +0 -198
- package/chart.js.map +0 -1
- package/charts/alluvial.d.ts +0 -8
- package/charts/alluvial.js +0 -46
- package/charts/alluvial.js.map +0 -1
- package/charts/area-stacked.d.ts +0 -6
- package/charts/area-stacked.js +0 -55
- package/charts/area-stacked.js.map +0 -1
- package/charts/area.d.ts +0 -6
- package/charts/area.js +0 -54
- package/charts/area.js.map +0 -1
- package/charts/bar-grouped.d.ts +0 -6
- package/charts/bar-grouped.js +0 -49
- package/charts/bar-grouped.js.map +0 -1
- package/charts/bar-simple.d.ts +0 -6
- package/charts/bar-simple.js +0 -49
- package/charts/bar-simple.js.map +0 -1
- package/charts/bar-stacked.d.ts +0 -6
- package/charts/bar-stacked.js +0 -50
- package/charts/bar-stacked.js.map +0 -1
- package/charts/boxplot.d.ts +0 -8
- package/charts/boxplot.js +0 -55
- package/charts/boxplot.js.map +0 -1
- package/charts/bubble.d.ts +0 -6
- package/charts/bubble.js +0 -49
- package/charts/bubble.js.map +0 -1
- package/charts/bullet.d.ts +0 -8
- package/charts/bullet.js +0 -50
- package/charts/bullet.js.map +0 -1
- package/charts/circle-pack.d.ts +0 -8
- package/charts/circle-pack.js +0 -45
- package/charts/circle-pack.js.map +0 -1
- package/charts/combo.d.ts +0 -7
- package/charts/combo.js +0 -132
- package/charts/combo.js.map +0 -1
- package/charts/donut.d.ts +0 -6
- package/charts/donut.js +0 -46
- package/charts/donut.js.map +0 -1
- package/charts/gauge.d.ts +0 -8
- package/charts/gauge.js +0 -42
- package/charts/gauge.js.map +0 -1
- package/charts/heatmap.d.ts +0 -10
- package/charts/heatmap.js +0 -138
- package/charts/heatmap.js.map +0 -1
- package/charts/histogram.d.ts +0 -8
- package/charts/histogram.js +0 -48
- package/charts/histogram.js.map +0 -1
- package/charts/index.d.ts +0 -24
- package/charts/index.js +0 -25
- package/charts/index.js.map +0 -1
- package/charts/line.d.ts +0 -6
- package/charts/line.js +0 -48
- package/charts/line.js.map +0 -1
- package/charts/lollipop.d.ts +0 -6
- package/charts/lollipop.js +0 -50
- package/charts/lollipop.js.map +0 -1
- package/charts/meter.d.ts +0 -8
- package/charts/meter.js +0 -94
- package/charts/meter.js.map +0 -1
- package/charts/pie.d.ts +0 -8
- package/charts/pie.js +0 -55
- package/charts/pie.js.map +0 -1
- package/charts/radar.d.ts +0 -8
- package/charts/radar.js +0 -44
- package/charts/radar.js.map +0 -1
- package/charts/scatter.d.ts +0 -6
- package/charts/scatter.js +0 -49
- package/charts/scatter.js.map +0 -1
- package/charts/tree.d.ts +0 -8
- package/charts/tree.js +0 -47
- package/charts/tree.js.map +0 -1
- package/charts/treemap.d.ts +0 -8
- package/charts/treemap.js +0 -43
- package/charts/treemap.js.map +0 -1
- package/charts/wordcloud.d.ts +0 -8
- package/charts/wordcloud.js +0 -49
- package/charts/wordcloud.js.map +0 -1
- package/components/axes/axis.d.ts +0 -24
- package/components/axes/axis.js +0 -587
- package/components/axes/axis.js.map +0 -1
- package/components/axes/chart-clip.d.ts +0 -13
- package/components/axes/chart-clip.js +0 -63
- package/components/axes/chart-clip.js.map +0 -1
- package/components/axes/grid-brush.d.ts +0 -10
- package/components/axes/grid-brush.js +0 -170
- package/components/axes/grid-brush.js.map +0 -1
- package/components/axes/grid.d.ts +0 -22
- package/components/axes/grid.js +0 -235
- package/components/axes/grid.js.map +0 -1
- package/components/axes/hover-axis.js +0 -243
- package/components/axes/hover-axis.js.map +0 -1
- package/components/axes/ruler-binned.d.ts +0 -7
- package/components/axes/ruler-binned.js +0 -136
- package/components/axes/ruler-binned.js.map +0 -1
- package/components/axes/ruler-stacked.js +0 -26
- package/components/axes/ruler-stacked.js.map +0 -1
- package/components/axes/ruler.d.ts +0 -27
- package/components/axes/ruler.js +0 -209
- package/components/axes/ruler.js.map +0 -1
- package/components/axes/toolbar.d.ts +0 -40
- package/components/axes/toolbar.js +0 -558
- package/components/axes/toolbar.js.map +0 -1
- package/components/axes/two-dimensional-axes.d.ts +0 -16
- package/components/axes/two-dimensional-axes.js +0 -134
- package/components/axes/two-dimensional-axes.js.map +0 -1
- package/components/axes/zero-line.d.ts +0 -7
- package/components/axes/zero-line.js +0 -76
- package/components/axes/zero-line.js.map +0 -1
- package/components/axes/zoom-bar.d.ts +0 -28
- package/components/axes/zoom-bar.js +0 -490
- package/components/axes/zoom-bar.js.map +0 -1
- package/components/component.d.ts +0 -28
- package/components/component.js +0 -102
- package/components/component.js.map +0 -1
- package/components/diagrams/buildPaths.d.ts +0 -39
- package/components/diagrams/buildPaths.js +0 -71
- package/components/diagrams/buildPaths.js.map +0 -1
- package/components/diagrams/markerDefinitions.js +0 -38
- package/components/diagrams/markerDefinitions.js.map +0 -1
- package/components/essentials/canvas-chart-clip.d.ts +0 -6
- package/components/essentials/canvas-chart-clip.js +0 -46
- package/components/essentials/canvas-chart-clip.js.map +0 -1
- package/components/essentials/color-scale-legend.d.ts +0 -17
- package/components/essentials/color-scale-legend.js +0 -230
- package/components/essentials/color-scale-legend.js.map +0 -1
- package/components/essentials/highlights.d.ts +0 -13
- package/components/essentials/highlights.js +0 -196
- package/components/essentials/highlights.js.map +0 -1
- package/components/essentials/legend.d.ts +0 -11
- package/components/essentials/legend.js +0 -428
- package/components/essentials/legend.js.map +0 -1
- package/components/essentials/modal.d.ts +0 -14
- package/components/essentials/modal.js +0 -89
- package/components/essentials/modal.js.map +0 -1
- package/components/essentials/threshold.d.ts +0 -20
- package/components/essentials/threshold.js +0 -306
- package/components/essentials/threshold.js.map +0 -1
- package/components/essentials/title-meter.d.ts +0 -30
- package/components/essentials/title-meter.js +0 -279
- package/components/essentials/title-meter.js.map +0 -1
- package/components/essentials/title.d.ts +0 -20
- package/components/essentials/title.js +0 -138
- package/components/essentials/title.js.map +0 -1
- package/components/essentials/tooltip-axis.js +0 -142
- package/components/essentials/tooltip-axis.js.map +0 -1
- package/components/essentials/tooltip.d.ts +0 -22
- package/components/essentials/tooltip.js +0 -263
- package/components/essentials/tooltip.js.map +0 -1
- package/components/graphs/alluvial.d.ts +0 -14
- package/components/graphs/alluvial.js +0 -535
- package/components/graphs/alluvial.js.map +0 -1
- package/components/graphs/area-stacked.d.ts +0 -11
- package/components/graphs/area-stacked.js +0 -131
- package/components/graphs/area-stacked.js.map +0 -1
- package/components/graphs/area.d.ts +0 -12
- package/components/graphs/area.js +0 -260
- package/components/graphs/area.js.map +0 -1
- package/components/graphs/bar-grouped.d.ts +0 -22
- package/components/graphs/bar-grouped.js +0 -312
- package/components/graphs/bar-grouped.js.map +0 -1
- package/components/graphs/bar-simple.d.ts +0 -12
- package/components/graphs/bar-simple.js +0 -218
- package/components/graphs/bar-simple.js.map +0 -1
- package/components/graphs/bar-stacked.d.ts +0 -13
- package/components/graphs/bar-stacked.js +0 -281
- package/components/graphs/bar-stacked.js.map +0 -1
- package/components/graphs/bar.d.ts +0 -5
- package/components/graphs/bar.js +0 -58
- package/components/graphs/bar.js.map +0 -1
- package/components/graphs/boxplot.d.ts +0 -9
- package/components/graphs/boxplot.js +0 -485
- package/components/graphs/boxplot.js.map +0 -1
- package/components/graphs/bubble.d.ts +0 -13
- package/components/graphs/bubble.js +0 -113
- package/components/graphs/bubble.js.map +0 -1
- package/components/graphs/bullet.d.ts +0 -12
- package/components/graphs/bullet.js +0 -395
- package/components/graphs/bullet.js.map +0 -1
- package/components/graphs/circle-pack.d.ts +0 -19
- package/components/graphs/circle-pack.js +0 -388
- package/components/graphs/circle-pack.js.map +0 -1
- package/components/graphs/donut.d.ts +0 -9
- package/components/graphs/donut.js +0 -116
- package/components/graphs/donut.js.map +0 -1
- package/components/graphs/gauge.d.ts +0 -27
- package/components/graphs/gauge.js +0 -347
- package/components/graphs/gauge.js.map +0 -1
- package/components/graphs/heatmap.d.ts +0 -25
- package/components/graphs/heatmap.js +0 -388
- package/components/graphs/heatmap.js.map +0 -1
- package/components/graphs/histogram.d.ts +0 -12
- package/components/graphs/histogram.js +0 -220
- package/components/graphs/histogram.js.map +0 -1
- package/components/graphs/line.d.ts +0 -11
- package/components/graphs/line.js +0 -179
- package/components/graphs/line.js.map +0 -1
- package/components/graphs/lollipop.d.ts +0 -14
- package/components/graphs/lollipop.js +0 -164
- package/components/graphs/lollipop.js.map +0 -1
- package/components/graphs/meter.d.ts +0 -10
- package/components/graphs/meter.js +0 -284
- package/components/graphs/meter.js.map +0 -1
- package/components/graphs/pie.d.ts +0 -16
- package/components/graphs/pie.js +0 -438
- package/components/graphs/pie.js.map +0 -1
- package/components/graphs/radar.d.ts +0 -25
- package/components/graphs/radar.js +0 -737
- package/components/graphs/radar.js.map +0 -1
- package/components/graphs/scatter-stacked.d.ts +0 -8
- package/components/graphs/scatter-stacked.js +0 -140
- package/components/graphs/scatter-stacked.js.map +0 -1
- package/components/graphs/scatter.d.ts +0 -21
- package/components/graphs/scatter.js +0 -360
- package/components/graphs/scatter.js.map +0 -1
- package/components/graphs/skeleton-lines.d.ts +0 -11
- package/components/graphs/skeleton-lines.js +0 -84
- package/components/graphs/skeleton-lines.js.map +0 -1
- package/components/graphs/skeleton.d.ts +0 -22
- package/components/graphs/skeleton.js +0 -272
- package/components/graphs/skeleton.js.map +0 -1
- package/components/graphs/tree.d.ts +0 -9
- package/components/graphs/tree.js +0 -262
- package/components/graphs/tree.js.map +0 -1
- package/components/graphs/treemap.d.ts +0 -11
- package/components/graphs/treemap.js +0 -344
- package/components/graphs/treemap.js.map +0 -1
- package/components/graphs/wordcloud.d.ts +0 -12
- package/components/graphs/wordcloud.js +0 -268
- package/components/graphs/wordcloud.js.map +0 -1
- package/components/index.d.ts +0 -51
- package/components/index.js +0 -57
- package/components/index.js.map +0 -1
- package/components/layout/layout.d.ts +0 -17
- package/components/layout/layout.js +0 -191
- package/components/layout/layout.js.map +0 -1
- package/components/layout/spacer.d.ts +0 -5
- package/components/layout/spacer.js +0 -33
- package/components/layout/spacer.js.map +0 -1
- package/configuration-non-customizable.d.ts +0 -263
- package/configuration-non-customizable.js +0 -276
- package/configuration-non-customizable.js.map +0 -1
- package/configuration.d.ts +0 -44
- package/configuration.js +0 -535
- package/configuration.js.map +0 -1
- package/demo/create-codesandbox.d.ts +0 -65
- package/demo/create-codesandbox.js +0 -155
- package/demo/create-codesandbox.js.map +0 -1
- package/demo/data/CHART_TYPES.d.ts +0 -123
- package/demo/data/CHART_TYPES.js +0 -123
- package/demo/data/CHART_TYPES.js.map +0 -1
- package/demo/data/alluvial.d.ts +0 -109
- package/demo/data/alluvial.js +0 -328
- package/demo/data/alluvial.js.map +0 -1
- package/demo/data/area.d.ts +0 -224
- package/demo/data/area.js +0 -330
- package/demo/data/area.js.map +0 -1
- package/demo/data/bar.d.ts +0 -681
- package/demo/data/bar.js +0 -915
- package/demo/data/bar.js.map +0 -1
- package/demo/data/boxplot.d.ts +0 -34
- package/demo/data/boxplot.js +0 -48
- package/demo/data/boxplot.js.map +0 -1
- package/demo/data/bubble.d.ts +0 -141
- package/demo/data/bubble.js +0 -182
- package/demo/data/bubble.js.map +0 -1
- package/demo/data/bullet.d.ts +0 -24
- package/demo/data/bullet.js +0 -55
- package/demo/data/bullet.js.map +0 -1
- package/demo/data/bundle.js +0 -1
- package/demo/data/circle-pack.d.ts +0 -91
- package/demo/data/circle-pack.js +0 -224
- package/demo/data/circle-pack.js.map +0 -1
- package/demo/data/combo.d.ts +0 -482
- package/demo/data/combo.js +0 -571
- package/demo/data/combo.js.map +0 -1
- package/demo/data/donut.d.ts +0 -64
- package/demo/data/donut.js +0 -60
- package/demo/data/donut.js.map +0 -1
- package/demo/data/gauge.d.ts +0 -40
- package/demo/data/gauge.js +0 -41
- package/demo/data/gauge.js.map +0 -1
- package/demo/data/heatmap.d.ts +0 -125
- package/demo/data/heatmap.js +0 -1149
- package/demo/data/heatmap.js.map +0 -1
- package/demo/data/high-scale.d.ts +0 -1
- package/demo/data/high-scale.js +0 -5
- package/demo/data/high-scale.js.map +0 -1
- package/demo/data/hightlight.d.ts +0 -40
- package/demo/data/hightlight.js +0 -44
- package/demo/data/hightlight.js.map +0 -1
- package/demo/data/histogram.d.ts +0 -63
- package/demo/data/histogram.js +0 -312
- package/demo/data/histogram.js.map +0 -1
- package/demo/data/index.d.ts +0 -32
- package/demo/data/index.js +0 -1265
- package/demo/data/index.js.map +0 -1
- package/demo/data/line.d.ts +0 -361
- package/demo/data/line.js +0 -480
- package/demo/data/line.js.map +0 -1
- package/demo/data/lollipop.d.ts +0 -39
- package/demo/data/lollipop.js +0 -37
- package/demo/data/lollipop.js.map +0 -1
- package/demo/data/meter.d.ts +0 -95
- package/demo/data/meter.js +0 -114
- package/demo/data/meter.js.map +0 -1
- package/demo/data/pie.d.ts +0 -46
- package/demo/data/pie.js +0 -55
- package/demo/data/pie.js.map +0 -1
- package/demo/data/radar.d.ts +0 -63
- package/demo/data/radar.js +0 -118
- package/demo/data/radar.js.map +0 -1
- package/demo/data/scatter.d.ts +0 -118
- package/demo/data/scatter.js +0 -143
- package/demo/data/scatter.js.map +0 -1
- package/demo/data/step.d.ts +0 -96
- package/demo/data/step.js +0 -27
- package/demo/data/step.js.map +0 -1
- package/demo/data/time-series-axis.d.ts +0 -368
- package/demo/data/time-series-axis.js +0 -436
- package/demo/data/time-series-axis.js.map +0 -1
- package/demo/data/toolbar.d.ts +0 -12
- package/demo/data/toolbar.js +0 -67
- package/demo/data/toolbar.js.map +0 -1
- package/demo/data/tree.d.ts +0 -30
- package/demo/data/tree.js +0 -209
- package/demo/data/tree.js.map +0 -1
- package/demo/data/treemap.d.ts +0 -15
- package/demo/data/treemap.js +0 -93
- package/demo/data/treemap.js.map +0 -1
- package/demo/data/wordcloud.d.ts +0 -14
- package/demo/data/wordcloud.js +0 -105
- package/demo/data/wordcloud.js.map +0 -1
- package/demo/data/zoom-bar.d.ts +0 -94
- package/demo/data/zoom-bar.js +0 -187
- package/demo/data/zoom-bar.js.map +0 -1
- package/demo/styles.css +0 -31006
- package/demo/styles.css.map +0 -1
- package/demo/styles.min.css +0 -1
- package/demo/styles.min.css.map +0 -1
- package/demo/tsconfig.tsbuildinfo +0 -1432
- package/demo/utils.d.ts +0 -24
- package/demo/utils.js +0 -194
- package/demo/utils.js.map +0 -1
- package/index.d.ts +0 -4
- package/index.js +0 -6
- package/index.js.map +0 -1
- package/interfaces/a11y.js +0 -14
- package/interfaces/a11y.js.map +0 -1
- package/interfaces/axis-scales.d.ts +0 -201
- package/interfaces/axis-scales.js +0 -1
- package/interfaces/axis-scales.js.map +0 -1
- package/interfaces/charts.d.ts +0 -485
- package/interfaces/charts.js +0 -1
- package/interfaces/charts.js.map +0 -1
- package/interfaces/components.d.ts +0 -231
- package/interfaces/components.js +0 -1
- package/interfaces/components.js.map +0 -1
- package/interfaces/enums.d.ts +0 -249
- package/interfaces/enums.js +0 -280
- package/interfaces/enums.js.map +0 -1
- package/interfaces/events.d.ts +0 -230
- package/interfaces/events.js +0 -259
- package/interfaces/events.js.map +0 -1
- package/interfaces/index.d.ts +0 -7
- package/interfaces/index.js +0 -3
- package/interfaces/index.js.map +0 -1
- package/interfaces/layout.d.ts +0 -15
- package/interfaces/layout.js +0 -1
- package/interfaces/layout.js.map +0 -1
- package/interfaces/model.d.ts +0 -35
- package/interfaces/model.js +0 -1
- package/interfaces/model.js.map +0 -1
- package/interfaces/truncation.d.ts +0 -17
- package/interfaces/truncation.js +0 -1
- package/interfaces/truncation.js.map +0 -1
- package/model/alluvial.js +0 -47
- package/model/alluvial.js.map +0 -1
- package/model/binned-charts.d.ts +0 -7
- package/model/binned-charts.js +0 -52
- package/model/binned-charts.js.map +0 -1
- package/model/boxplot.js +0 -174
- package/model/boxplot.js.map +0 -1
- package/model/bullet.js +0 -74
- package/model/bullet.js.map +0 -1
- package/model/cartesian-charts.d.ts +0 -24
- package/model/cartesian-charts.js +0 -202
- package/model/cartesian-charts.js.map +0 -1
- package/model/circle-pack.js +0 -189
- package/model/circle-pack.js.map +0 -1
- package/model/gauge.js +0 -51
- package/model/gauge.js.map +0 -1
- package/model/heatmap.d.ts +0 -57
- package/model/heatmap.js +0 -281
- package/model/heatmap.js.map +0 -1
- package/model/meter.d.ts +0 -19
- package/model/meter.js +0 -118
- package/model/meter.js.map +0 -1
- package/model/model.d.ts +0 -107
- package/model/model.js +0 -712
- package/model/model.js.map +0 -1
- package/model/pie.js +0 -66
- package/model/pie.js.map +0 -1
- package/model/radar.js +0 -52
- package/model/radar.js.map +0 -1
- package/model/tree.js +0 -56
- package/model/tree.js.map +0 -1
- package/model/treemap.js +0 -44
- package/model/treemap.js.map +0 -1
- package/model/wordcloud.js +0 -47
- package/model/wordcloud.js.map +0 -1
- package/polyfills.d.ts +0 -0
- package/polyfills.js +0 -29
- package/polyfills.js.map +0 -1
- package/services/angle-utils.d.ts +0 -16
- package/services/angle-utils.js +0 -82
- package/services/angle-utils.js.map +0 -1
- package/services/canvas-zoom.js +0 -72
- package/services/canvas-zoom.js.map +0 -1
- package/services/curves.d.ts +0 -25
- package/services/curves.js +0 -77
- package/services/curves.js.map +0 -1
- package/services/essentials/dom-utils.d.ts +0 -39
- package/services/essentials/dom-utils.js +0 -423
- package/services/essentials/dom-utils.js.map +0 -1
- package/services/essentials/events.d.ts +0 -8
- package/services/essentials/events.js +0 -53
- package/services/essentials/events.js.map +0 -1
- package/services/essentials/files.d.ts +0 -6
- package/services/essentials/files.js +0 -60
- package/services/essentials/files.js.map +0 -1
- package/services/essentials/gradient-utils.d.ts +0 -6
- package/services/essentials/gradient-utils.js +0 -85
- package/services/essentials/gradient-utils.js.map +0 -1
- package/services/essentials/transitions.d.ts +0 -13
- package/services/essentials/transitions.js +0 -51
- package/services/essentials/transitions.js.map +0 -1
- package/services/index.d.ts +0 -9
- package/services/index.js +0 -12
- package/services/index.js.map +0 -1
- package/services/scales-cartesian.d.ts +0 -86
- package/services/scales-cartesian.js +0 -656
- package/services/scales-cartesian.js.map +0 -1
- package/services/service.d.ts +0 -10
- package/services/service.js +0 -24
- package/services/service.js.map +0 -1
- package/services/time-series.js +0 -147
- package/services/time-series.js.map +0 -1
- package/services/zoom.d.ts +0 -21
- package/services/zoom.js +0 -217
- package/services/zoom.js.map +0 -1
- package/styles/_chart-holder.scss +0 -50
- package/styles/color-palatte.scss +0 -362
- package/styles/colors.scss +0 -140
- package/styles/components/_color-legend.scss +0 -11
- package/styles/components/_edge.scss +0 -65
- package/styles/components/_grid.scss +0 -30
- package/styles/components/_marker.scss +0 -7
- package/styles/components/_meter-title.scss +0 -37
- package/styles/components/_tooltip.scss +0 -132
- package/styles/components/diagrams/_card-node.scss +0 -97
- package/styles/components/diagrams/_edge.scss +0 -66
- package/styles/components/diagrams/_shape-node.scss +0 -89
- package/styles/components/diagrams/index.scss +0 -4
- package/styles/graphs/_alluvial.scss +0 -17
- package/styles/graphs/_bullet.scss +0 -36
- package/styles/graphs/_circle-pack.scss +0 -36
- package/styles/graphs/_gauge.scss +0 -23
- package/styles/graphs/_heatmap.scss +0 -60
- package/styles/graphs/_meter.scss +0 -34
- package/styles/graphs/_radar.scss +0 -18
- package/styles/graphs/_scatter-stacked.scss +0 -12
- package/styles/graphs/_tree.scss +0 -47
- package/styles/graphs/index.scss +0 -18
- package/styles/styles.scss +0 -35
- package/styles/tokens.scss +0 -416
- package/styles.css +0 -6313
- package/styles.css.map +0 -1
- package/styles.min.css +0 -1
- package/styles.min.css.map +0 -1
- package/tools.d.ts +0 -144
- package/tools.js +0 -348
- package/tools.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -3444
- /package/{components → dist/components}/axes/hover-axis.d.ts +0 -0
- /package/{components → dist/components}/axes/ruler-stacked.d.ts +0 -0
- /package/{components → dist/components}/diagrams/markerDefinitions.d.ts +0 -0
- /package/{components → dist/components}/essentials/tooltip-axis.d.ts +0 -0
- /package/{interfaces → dist/interfaces}/a11y.d.ts +0 -0
- /package/{model → dist/model}/alluvial.d.ts +0 -0
- /package/{model → dist/model}/boxplot.d.ts +0 -0
- /package/{model → dist/model}/bullet.d.ts +0 -0
- /package/{model → dist/model}/circle-pack.d.ts +0 -0
- /package/{model → dist/model}/gauge.d.ts +0 -0
- /package/{model → dist/model}/pie.d.ts +0 -0
- /package/{model → dist/model}/radar.d.ts +0 -0
- /package/{model → dist/model}/tree.d.ts +0 -0
- /package/{model → dist/model}/treemap.d.ts +0 -0
- /package/{model → dist/model}/wordcloud.d.ts +0 -0
- /package/{services → dist/services}/canvas-zoom.d.ts +0 -0
- /package/{services → dist/services}/time-series.d.ts +0 -0
- /package/{styles → dist/styles}/_type.scss +0 -0
- /package/{styles → dist/styles}/components/_axis.scss +0 -0
- /package/{styles → dist/styles}/components/_callouts.scss +0 -0
- /package/{styles → dist/styles}/components/_grid-brush.scss +0 -0
- /package/{styles → dist/styles}/components/_highlights.scss +0 -0
- /package/{styles → dist/styles}/components/_layout.scss +0 -0
- /package/{styles → dist/styles}/components/_legend.scss +0 -0
- /package/{styles → dist/styles}/components/_modal.scss +0 -0
- /package/{styles → dist/styles}/components/_ruler.scss +0 -0
- /package/{styles → dist/styles}/components/_skeleton-lines.scss +0 -0
- /package/{styles → dist/styles}/components/_skeleton.scss +0 -0
- /package/{styles → dist/styles}/components/_threshold.scss +0 -0
- /package/{styles → dist/styles}/components/_title.scss +0 -0
- /package/{styles → dist/styles}/components/_toolbar.scss +0 -0
- /package/{styles → dist/styles}/components/_zero-line.scss +0 -0
- /package/{styles → dist/styles}/components/_zoom-bar.scss +0 -0
- /package/{styles → dist/styles}/components/diagrams/_marker.scss +0 -0
- /package/{styles → dist/styles}/components/index.scss +0 -0
- /package/{styles → dist/styles}/graphs/_area.scss +0 -0
- /package/{styles → dist/styles}/graphs/_bubble.scss +0 -0
- /package/{styles → dist/styles}/graphs/_donut.scss +0 -0
- /package/{styles → dist/styles}/graphs/_line.scss +0 -0
- /package/{styles → dist/styles}/graphs/_lollipop.scss +0 -0
- /package/{styles → dist/styles}/graphs/_pie.scss +0 -0
- /package/{styles → dist/styles}/graphs/_scatter.scss +0 -0
- /package/{styles → dist/styles}/graphs/_treemap.scss +0 -0
- /package/{styles → dist/styles}/graphs/_wordcloud.scss +0 -0
|
@@ -1,558 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
// Internal Imports
|
|
15
|
-
import { Component } from '../component';
|
|
16
|
-
import { Events, RenderTypes, ToolbarControlTypes } from '../../interfaces';
|
|
17
|
-
import * as Tools from '../../tools';
|
|
18
|
-
// D3 Imports
|
|
19
|
-
import { select } from 'd3-selection';
|
|
20
|
-
var Toolbar = /** @class */ (function (_super) {
|
|
21
|
-
__extends(Toolbar, _super);
|
|
22
|
-
function Toolbar() {
|
|
23
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
-
_this.type = 'toolbar';
|
|
25
|
-
_this.renderType = RenderTypes.HTML;
|
|
26
|
-
return _this;
|
|
27
|
-
}
|
|
28
|
-
Toolbar.prototype.init = function () {
|
|
29
|
-
var _this = this;
|
|
30
|
-
var bodyOnClickHandler = function () { return _this.updateOverflowMenu(false); };
|
|
31
|
-
// Grab the tooltip element
|
|
32
|
-
this.services.events.addEventListener(Events.Toolbar.SHOW_OVERFLOW_MENU, function () {
|
|
33
|
-
_this.renderOverflowMenu();
|
|
34
|
-
// hide overflow menu if user clicks on somewhere in web page
|
|
35
|
-
document.body.addEventListener('click', bodyOnClickHandler);
|
|
36
|
-
});
|
|
37
|
-
// listen to hide overflow menu event to hide the overflow menu
|
|
38
|
-
this.services.events.addEventListener(Events.Toolbar.HIDE_OVERFLOW_MENU, function () {
|
|
39
|
-
// // hide overflow menu if user clicks on somewhere in web page
|
|
40
|
-
document.body.removeEventListener('click', bodyOnClickHandler);
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
Toolbar.prototype.render = function (animate) {
|
|
44
|
-
var _this = this;
|
|
45
|
-
if (animate === void 0) { animate = true; }
|
|
46
|
-
var container = this.getComponentContainer()
|
|
47
|
-
.attr('role', 'toolbar')
|
|
48
|
-
.attr('aria-label', "chart-" + this.services.domUtils.getChartID() + " toolbar");
|
|
49
|
-
var isDataLoading = Tools.getProperty(this.getOptions(), 'data', 'loading');
|
|
50
|
-
if (isDataLoading) {
|
|
51
|
-
container.html('');
|
|
52
|
-
// Set overflow menu to null if data is loading
|
|
53
|
-
// This will render in a new overflow menu when data is done loading
|
|
54
|
-
this.overflowMenu = null;
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
if (!this.overflowMenu) {
|
|
58
|
-
this.overflowMenu = container
|
|
59
|
-
.append('div')
|
|
60
|
-
.attr('class', 'cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip')
|
|
61
|
-
.attr('tabindex', -1)
|
|
62
|
-
.html("<ul role='menu'></ul>");
|
|
63
|
-
}
|
|
64
|
-
// get the toolbar buttons
|
|
65
|
-
var _a = this.getControlConfigs(), buttonList = _a.buttonList, overflowMenuItemList = _a.overflowMenuItemList;
|
|
66
|
-
// overflow button is required only if overflow menu item list is valid
|
|
67
|
-
if (!!overflowMenuItemList) {
|
|
68
|
-
buttonList.push(this.getOverflowButtonConfig());
|
|
69
|
-
}
|
|
70
|
-
var toolbarControls = container
|
|
71
|
-
.selectAll('div.toolbar-control')
|
|
72
|
-
.data(buttonList, function (button) { return button.id; });
|
|
73
|
-
toolbarControls.exit().remove();
|
|
74
|
-
var enteringToolbarControls = toolbarControls
|
|
75
|
-
.enter()
|
|
76
|
-
.append('div')
|
|
77
|
-
.attr('class', 'toolbar-control cds--overflow-menu cds--overflow-menu')
|
|
78
|
-
.attr('role', 'button');
|
|
79
|
-
var self_1 = this;
|
|
80
|
-
var allToolbarControls = enteringToolbarControls
|
|
81
|
-
.merge(toolbarControls)
|
|
82
|
-
.classed('disabled', function (d) { return d.shouldBeDisabled(); })
|
|
83
|
-
.attr('aria-disabled', function (d) { return d.shouldBeDisabled(); })
|
|
84
|
-
.attr('aria-label', function (d) { return d.title; })
|
|
85
|
-
.html(function (d) { return "\n\t\t\t<button\n\t\t\t\tclass=\"cds--overflow-menu__trigger cds--overflow-menu__trigger\"\n\t\t\t\taria-haspopup=\"true\" aria-expanded=\"false\" id=\"" + _this.services.domUtils.generateElementIDString("control-" + d.id) + "\" aria-label=\"" + d.title + "\">\n\t\t\t\t<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cds--overflow-menu__icon cds--overflow-menu__icon\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t" + d.iconSVG.content + "\n\t\t\t\t</svg>\n\t\t\t</button>"; })
|
|
86
|
-
.each(function (d, index) {
|
|
87
|
-
var _this = this;
|
|
88
|
-
select(this)
|
|
89
|
-
.select('svg')
|
|
90
|
-
.style('will-change', 'transform')
|
|
91
|
-
.style('width', d.iconSVG.width !== undefined
|
|
92
|
-
? d.iconSVG.width
|
|
93
|
-
: '20px')
|
|
94
|
-
.style('height', d.iconSVG.height !== undefined
|
|
95
|
-
? d.iconSVG.height
|
|
96
|
-
: '20px');
|
|
97
|
-
select(this)
|
|
98
|
-
.select('button')
|
|
99
|
-
.on('click', function (event) {
|
|
100
|
-
if (!d.shouldBeDisabled()) {
|
|
101
|
-
self_1.triggerFunctionAndEvent(d, event, _this);
|
|
102
|
-
}
|
|
103
|
-
})
|
|
104
|
-
.on('keydown', function (event) {
|
|
105
|
-
if ((event.key && event.key === 'Enter') ||
|
|
106
|
-
event.key === ' ') {
|
|
107
|
-
event.preventDefault();
|
|
108
|
-
self_1.triggerFunctionAndEvent(d, event, _this);
|
|
109
|
-
}
|
|
110
|
-
else if (event.key && event.key === 'ArrowLeft') {
|
|
111
|
-
self_1.focusOnPreviousEnabledToolbarItem(index);
|
|
112
|
-
}
|
|
113
|
-
else if (event.key &&
|
|
114
|
-
event.key === 'ArrowRight') {
|
|
115
|
-
self_1.focusOnNextEnabledToolbarItem(index);
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
this.overflowButton = this.getComponentContainer().select("button.cds--overflow-menu__trigger#" + this.services.domUtils.generateElementIDString('control-toolbar-overflow-menu'));
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
Toolbar.prototype.renderOverflowMenu = function () {
|
|
123
|
-
var _this = this;
|
|
124
|
-
var overflowMenuItemList = this.getControlConfigs().overflowMenuItemList;
|
|
125
|
-
var overflowMenuControls = this.overflowMenu
|
|
126
|
-
.select('ul')
|
|
127
|
-
.selectAll('li.cds--overflow-menu-options__option')
|
|
128
|
-
.data(overflowMenuItemList, function (button) {
|
|
129
|
-
return Tools.getProperty(button, 'id');
|
|
130
|
-
});
|
|
131
|
-
overflowMenuControls.exit().remove();
|
|
132
|
-
var enteringOverflowMenuControls = overflowMenuControls
|
|
133
|
-
.enter()
|
|
134
|
-
.append('li')
|
|
135
|
-
.attr('id', function (d) {
|
|
136
|
-
return _this.services.domUtils.generateElementIDString("control-" + d.id);
|
|
137
|
-
})
|
|
138
|
-
.attr('class', 'cds--overflow-menu-options__option cds--overflow-menu-options__option')
|
|
139
|
-
.attr('role', 'menuitem')
|
|
140
|
-
.attr('tabindex', 1);
|
|
141
|
-
enteringOverflowMenuControls
|
|
142
|
-
.append('button')
|
|
143
|
-
.attr('class', 'cds--overflow-menu-options__btn cds--overflow-menu-options__btn');
|
|
144
|
-
enteringOverflowMenuControls
|
|
145
|
-
.merge(overflowMenuControls)
|
|
146
|
-
.classed('cds--overflow-menu-options__option--disabled', function (d) {
|
|
147
|
-
return d.shouldBeDisabled();
|
|
148
|
-
})
|
|
149
|
-
.classed('cds--overflow-menu-options__option--disabled', function (d) {
|
|
150
|
-
return d.shouldBeDisabled();
|
|
151
|
-
})
|
|
152
|
-
.attr('aria-disabled', function (d) { return d.shouldBeDisabled(); })
|
|
153
|
-
.selectAll('button')
|
|
154
|
-
.text(function (d) { return d.text; });
|
|
155
|
-
};
|
|
156
|
-
Toolbar.prototype.isOverflowMenuOpen = function () {
|
|
157
|
-
return this.overflowMenu.classed('is-open');
|
|
158
|
-
};
|
|
159
|
-
// show/hide overflow menu
|
|
160
|
-
Toolbar.prototype.updateOverflowMenu = function (show) {
|
|
161
|
-
if (!this.overflowMenu) {
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
this.overflowMenu.classed('is-open', show);
|
|
165
|
-
// update overflow button background
|
|
166
|
-
if (this.overflowButton) {
|
|
167
|
-
this.overflowButton.attr('aria-expanded', show);
|
|
168
|
-
select(this.overflowButton.node().parentNode)
|
|
169
|
-
.classed('cds--overflow-menu--open', show)
|
|
170
|
-
.classed('cds--overflow-menu--open', show);
|
|
171
|
-
}
|
|
172
|
-
if (show) {
|
|
173
|
-
this.services.events.dispatchEvent(Events.Toolbar.SHOW_OVERFLOW_MENU);
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
this.services.events.dispatchEvent(Events.Toolbar.HIDE_OVERFLOW_MENU);
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
// Toolbar controllers
|
|
180
|
-
Toolbar.prototype.focusOnPreviousEnabledToolbarItem = function (currentItemIndex) {
|
|
181
|
-
var buttonList = this.getToolbarButtonItems();
|
|
182
|
-
var previousItemIndex = buttonList.length;
|
|
183
|
-
for (var i = currentItemIndex - 1; i >= 0; i--) {
|
|
184
|
-
var previousButtonItem = buttonList[i];
|
|
185
|
-
if (!previousButtonItem.shouldBeDisabled()) {
|
|
186
|
-
previousItemIndex = i;
|
|
187
|
-
break;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
// only if previous enabled menu item found
|
|
191
|
-
if (previousItemIndex < buttonList.length) {
|
|
192
|
-
var previousItemNode = select("button#" + this.services.domUtils.generateElementIDString("control-" + buttonList[previousItemIndex].id)).node();
|
|
193
|
-
if ('focus' in previousItemNode) {
|
|
194
|
-
previousItemNode.focus();
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
Toolbar.prototype.focusOnNextEnabledToolbarItem = function (currentItemIndex) {
|
|
199
|
-
var buttonList = this.getToolbarButtonItems();
|
|
200
|
-
var nextItemIndex = -1;
|
|
201
|
-
for (var i = currentItemIndex + 1; i < buttonList.length; i++) {
|
|
202
|
-
var nextOverflowMenuItem = buttonList[i];
|
|
203
|
-
if (!nextOverflowMenuItem.shouldBeDisabled()) {
|
|
204
|
-
nextItemIndex = i;
|
|
205
|
-
break;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
// only if next enabled menu item found
|
|
209
|
-
if (nextItemIndex > -1) {
|
|
210
|
-
var nextItemNode = select("button#" + this.services.domUtils.generateElementIDString("control-" + buttonList[nextItemIndex].id)).node();
|
|
211
|
-
if ('focus' in nextItemNode) {
|
|
212
|
-
nextItemNode.focus();
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
Toolbar.prototype.focusOnPreviousEnabledMenuItem = function (currentItemIndex) {
|
|
217
|
-
var overflowMenuItems = this.getOverflowMenuItems();
|
|
218
|
-
var previousItemIndex = overflowMenuItems.length;
|
|
219
|
-
for (var i = currentItemIndex - 1; i >= 0; i--) {
|
|
220
|
-
var previousOverflowMenuItem = overflowMenuItems[i];
|
|
221
|
-
if (!previousOverflowMenuItem.shouldBeDisabled()) {
|
|
222
|
-
previousItemIndex = i;
|
|
223
|
-
break;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
// only if previous enabled menu item found
|
|
227
|
-
if (previousItemIndex < overflowMenuItems.length) {
|
|
228
|
-
var previousItemNode = select("#" + this.services.domUtils.generateElementIDString("control-" + overflowMenuItems[previousItemIndex].id) + " button").node();
|
|
229
|
-
if ('focus' in previousItemNode) {
|
|
230
|
-
previousItemNode.focus();
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
Toolbar.prototype.focusOnNextEnabledMenuItem = function (currentItemIndex) {
|
|
235
|
-
var overflowMenuItems = this.getOverflowMenuItems();
|
|
236
|
-
var nextItemIndex = -1;
|
|
237
|
-
for (var i = currentItemIndex + 1; i < overflowMenuItems.length; i++) {
|
|
238
|
-
var nextOverflowMenuItem = overflowMenuItems[i];
|
|
239
|
-
if (!nextOverflowMenuItem.shouldBeDisabled()) {
|
|
240
|
-
nextItemIndex = i;
|
|
241
|
-
break;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
// only if next enabled menu item found
|
|
245
|
-
if (nextItemIndex > -1) {
|
|
246
|
-
var nextItemNode = select("#" + this.services.domUtils.generateElementIDString("control-" + overflowMenuItems[nextItemIndex].id) + " button").node();
|
|
247
|
-
if ('focus' in nextItemNode) {
|
|
248
|
-
nextItemNode.focus();
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
Toolbar.prototype.toggleOverflowMenu = function (event) {
|
|
253
|
-
var _this = this;
|
|
254
|
-
if (this.isOverflowMenuOpen()) {
|
|
255
|
-
// hide overflow menu
|
|
256
|
-
this.updateOverflowMenu(false);
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
// show overflow menu
|
|
260
|
-
this.updateOverflowMenu(true);
|
|
261
|
-
// setup overflow menu item event listener
|
|
262
|
-
var self_2 = this;
|
|
263
|
-
var overflowMenuItems = this.getOverflowMenuItems();
|
|
264
|
-
overflowMenuItems.forEach(function (menuItem, index) {
|
|
265
|
-
var element = select("#" + _this.services.domUtils.generateElementIDString("control-" + menuItem.id));
|
|
266
|
-
if (element !== null) {
|
|
267
|
-
element.on('click', function () {
|
|
268
|
-
self_2.triggerFunctionAndEvent(menuItem, event, element.node());
|
|
269
|
-
// hide overflow menu
|
|
270
|
-
self_2.updateOverflowMenu(false);
|
|
271
|
-
});
|
|
272
|
-
element.on('keydown', function (keyEvent) {
|
|
273
|
-
if (keyEvent && keyEvent.key === 'Enter') {
|
|
274
|
-
self_2.triggerFunctionAndEvent(menuItem, event, element.node());
|
|
275
|
-
}
|
|
276
|
-
else if (keyEvent && keyEvent.key === 'ArrowUp') {
|
|
277
|
-
// focus on previous menu item
|
|
278
|
-
self_2.focusOnPreviousEnabledMenuItem(index);
|
|
279
|
-
}
|
|
280
|
-
else if (keyEvent && keyEvent.key === 'ArrowDown') {
|
|
281
|
-
// focus on next menu item
|
|
282
|
-
self_2.focusOnNextEnabledMenuItem(index);
|
|
283
|
-
}
|
|
284
|
-
else if (keyEvent && keyEvent.key === 'Escape') {
|
|
285
|
-
self_2.updateOverflowMenu(false);
|
|
286
|
-
}
|
|
287
|
-
// Not hide overflow menu by keyboard arrow up/down event
|
|
288
|
-
// Prevent page from scrolling up/down
|
|
289
|
-
keyEvent.preventDefault();
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
});
|
|
293
|
-
// default to focus on the first enabled menu item
|
|
294
|
-
self_2.focusOnNextEnabledMenuItem(-1);
|
|
295
|
-
}
|
|
296
|
-
// propogation should not be stopped for keyboard events
|
|
297
|
-
if (!!event) {
|
|
298
|
-
event.stopImmediatePropagation();
|
|
299
|
-
}
|
|
300
|
-
};
|
|
301
|
-
// Calls passed function && dispatches event
|
|
302
|
-
Toolbar.prototype.triggerFunctionAndEvent = function (control, event, element) {
|
|
303
|
-
// Check if trigger is disabled
|
|
304
|
-
if (typeof control.shouldBeDisabled === 'function' &&
|
|
305
|
-
control.shouldBeDisabled()) {
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
|
-
// Call custom function only if it exists
|
|
309
|
-
if (typeof control.clickFunction === 'function') {
|
|
310
|
-
control.clickFunction(event);
|
|
311
|
-
}
|
|
312
|
-
// Dispatch selection event
|
|
313
|
-
this.services.events.dispatchEvent(Events.Toolbar.BUTTON_CLICK, {
|
|
314
|
-
control: control,
|
|
315
|
-
event: event,
|
|
316
|
-
element: element,
|
|
317
|
-
});
|
|
318
|
-
};
|
|
319
|
-
Toolbar.prototype.getControlConfigs = function () {
|
|
320
|
-
var _this = this;
|
|
321
|
-
var numberOfIcons = Tools.getProperty(this.getOptions(), 'toolbar', 'numberOfIcons') -
|
|
322
|
-
1;
|
|
323
|
-
var controls = Tools.getProperty(this.getOptions(), 'toolbar', 'controls');
|
|
324
|
-
var overflowSpecificControls = [];
|
|
325
|
-
var buttonList = [];
|
|
326
|
-
var overflowList = [];
|
|
327
|
-
controls.forEach(function (control) {
|
|
328
|
-
var controlConfig = null;
|
|
329
|
-
// check if button is custom or default control
|
|
330
|
-
if (control.type === ToolbarControlTypes.CUSTOM) {
|
|
331
|
-
// add generic id if missing
|
|
332
|
-
if (Tools.getProperty(control, 'id') === null) {
|
|
333
|
-
// add id directly to the data passed so that id isn't reassigned on rerender
|
|
334
|
-
control.id = "toolbar-button-" + Toolbar.buttonID++;
|
|
335
|
-
}
|
|
336
|
-
// define function if missing
|
|
337
|
-
if (Tools.getProperty(control, 'shouldBeDisabled') === null) {
|
|
338
|
-
control.shouldBeDisabled = function () { return false; };
|
|
339
|
-
}
|
|
340
|
-
controlConfig = control;
|
|
341
|
-
}
|
|
342
|
-
else {
|
|
343
|
-
controlConfig = _this.getControlConfigByType(control.type);
|
|
344
|
-
}
|
|
345
|
-
// add to list if config is valid
|
|
346
|
-
if (controlConfig) {
|
|
347
|
-
controlConfig.text = control.text ? control.text : control.type;
|
|
348
|
-
if (controlConfig.id.indexOf('toolbar-export') !== -1) {
|
|
349
|
-
overflowSpecificControls.push(controlConfig);
|
|
350
|
-
}
|
|
351
|
-
else if (buttonList.length < numberOfIcons) {
|
|
352
|
-
// check if icon exists else assign to the overflow list
|
|
353
|
-
if (Tools.getProperty(controlConfig, 'iconSVG', 'content') === null) {
|
|
354
|
-
overflowList.push(controlConfig);
|
|
355
|
-
}
|
|
356
|
-
else {
|
|
357
|
-
buttonList.push(controlConfig);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
else {
|
|
361
|
-
overflowList.push(controlConfig);
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
});
|
|
365
|
-
// Ensures the `export` controls are always at the bottom
|
|
366
|
-
overflowList.push.apply(overflowList, overflowSpecificControls);
|
|
367
|
-
if (!overflowList.length) {
|
|
368
|
-
return {
|
|
369
|
-
buttonList: buttonList,
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
return {
|
|
373
|
-
buttonList: buttonList,
|
|
374
|
-
overflowMenuItemList: overflowList,
|
|
375
|
-
};
|
|
376
|
-
};
|
|
377
|
-
Toolbar.prototype.getToolbarButtonItems = function () {
|
|
378
|
-
var _a = this.getControlConfigs(), buttonList = _a.buttonList, overflowMenuItemList = _a.overflowMenuItemList;
|
|
379
|
-
if (!!overflowMenuItemList) {
|
|
380
|
-
buttonList.push(this.getOverflowButtonConfig());
|
|
381
|
-
}
|
|
382
|
-
if (!!buttonList) {
|
|
383
|
-
return buttonList;
|
|
384
|
-
}
|
|
385
|
-
return [];
|
|
386
|
-
};
|
|
387
|
-
Toolbar.prototype.getOverflowMenuItems = function () {
|
|
388
|
-
var overflowMenuItemList = this.getControlConfigs().overflowMenuItemList;
|
|
389
|
-
if (!!overflowMenuItemList) {
|
|
390
|
-
return overflowMenuItemList;
|
|
391
|
-
}
|
|
392
|
-
else {
|
|
393
|
-
return [];
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
// special button config for overflow button
|
|
397
|
-
Toolbar.prototype.getOverflowButtonConfig = function () {
|
|
398
|
-
var _this = this;
|
|
399
|
-
return {
|
|
400
|
-
id: 'toolbar-overflow-menu',
|
|
401
|
-
title: 'More options',
|
|
402
|
-
shouldBeDisabled: function () { return false; },
|
|
403
|
-
iconSVG: {
|
|
404
|
-
content: "<circle cx=\"16\" cy=\"8\" r=\"2\"></circle>\n\t\t\t\t<circle cx=\"16\" cy=\"16\" r=\"2\"></circle>\n\t\t\t\t<circle cx=\"16\" cy=\"24\" r=\"2\"></circle>",
|
|
405
|
-
},
|
|
406
|
-
clickFunction: function (event) { return _this.toggleOverflowMenu(event); },
|
|
407
|
-
};
|
|
408
|
-
};
|
|
409
|
-
Toolbar.prototype.getControlConfigByType = function (controlType) {
|
|
410
|
-
var _this = this;
|
|
411
|
-
var isZoomBarEnabled = this.services.zoom &&
|
|
412
|
-
this.services.zoom.isZoomBarEnabled() &&
|
|
413
|
-
!this.services.zoom.isEmptyState();
|
|
414
|
-
var displayData = this.model.getDisplayData();
|
|
415
|
-
var controlConfig;
|
|
416
|
-
switch (controlType) {
|
|
417
|
-
case ToolbarControlTypes.ZOOM_IN:
|
|
418
|
-
if (isZoomBarEnabled) {
|
|
419
|
-
controlConfig = {
|
|
420
|
-
id: 'toolbar-zoomIn',
|
|
421
|
-
title: 'Zoom in',
|
|
422
|
-
shouldBeDisabled: function () {
|
|
423
|
-
return _this.services.zoom.isMinZoomDomain();
|
|
424
|
-
},
|
|
425
|
-
iconSVG: {
|
|
426
|
-
content: this.getControlIconByType(controlType),
|
|
427
|
-
},
|
|
428
|
-
clickFunction: function () { return _this.services.zoom.zoomIn(); },
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
break;
|
|
432
|
-
case ToolbarControlTypes.ZOOM_OUT:
|
|
433
|
-
if (isZoomBarEnabled) {
|
|
434
|
-
controlConfig = {
|
|
435
|
-
id: 'toolbar-zoomOut',
|
|
436
|
-
title: 'Zoom out',
|
|
437
|
-
shouldBeDisabled: function () {
|
|
438
|
-
return _this.services.zoom.isMaxZoomDomain();
|
|
439
|
-
},
|
|
440
|
-
iconSVG: {
|
|
441
|
-
content: this.getControlIconByType(controlType),
|
|
442
|
-
},
|
|
443
|
-
clickFunction: function () { return _this.services.zoom.zoomOut(); },
|
|
444
|
-
};
|
|
445
|
-
}
|
|
446
|
-
break;
|
|
447
|
-
case ToolbarControlTypes.RESET_ZOOM:
|
|
448
|
-
if (isZoomBarEnabled) {
|
|
449
|
-
controlConfig = {
|
|
450
|
-
id: 'toolbar-resetZoom',
|
|
451
|
-
title: 'Reset zoom',
|
|
452
|
-
shouldBeDisabled: function () {
|
|
453
|
-
return _this.services.zoom.isMaxZoomDomain();
|
|
454
|
-
},
|
|
455
|
-
iconSVG: {
|
|
456
|
-
content: this.getControlIconByType(controlType),
|
|
457
|
-
},
|
|
458
|
-
clickFunction: function () {
|
|
459
|
-
return _this.services.zoom.resetZoomDomain();
|
|
460
|
-
},
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
break;
|
|
464
|
-
case ToolbarControlTypes.MAKE_FULLSCREEN:
|
|
465
|
-
controlConfig = {
|
|
466
|
-
id: 'toolbar-makefullscreen',
|
|
467
|
-
iconSVG: {
|
|
468
|
-
content: this.getControlIconByType(controlType),
|
|
469
|
-
width: '15px',
|
|
470
|
-
height: '15px',
|
|
471
|
-
},
|
|
472
|
-
title: 'Make fullscreen',
|
|
473
|
-
shouldBeDisabled: function () { return false; },
|
|
474
|
-
clickFunction: function () {
|
|
475
|
-
_this.services.domUtils.toggleFullscreen();
|
|
476
|
-
},
|
|
477
|
-
};
|
|
478
|
-
break;
|
|
479
|
-
case ToolbarControlTypes.SHOW_AS_DATATABLE:
|
|
480
|
-
controlConfig = {
|
|
481
|
-
id: 'toolbar-showasdatatable',
|
|
482
|
-
iconSVG: {
|
|
483
|
-
content: this.getControlIconByType(controlType),
|
|
484
|
-
},
|
|
485
|
-
title: 'Show as table',
|
|
486
|
-
shouldBeDisabled: function () { return displayData.length === 0; },
|
|
487
|
-
clickFunction: function () {
|
|
488
|
-
return _this.services.events.dispatchEvent(Events.Modal.SHOW);
|
|
489
|
-
},
|
|
490
|
-
};
|
|
491
|
-
break;
|
|
492
|
-
case ToolbarControlTypes.EXPORT_CSV:
|
|
493
|
-
controlConfig = {
|
|
494
|
-
id: 'toolbar-export-CSV',
|
|
495
|
-
title: 'Export as CSV',
|
|
496
|
-
shouldBeDisabled: function () { return false; },
|
|
497
|
-
iconSVG: {
|
|
498
|
-
content: this.getControlIconByType(controlType),
|
|
499
|
-
},
|
|
500
|
-
clickFunction: function () { return _this.model.exportToCSV(); },
|
|
501
|
-
};
|
|
502
|
-
break;
|
|
503
|
-
case ToolbarControlTypes.EXPORT_PNG:
|
|
504
|
-
controlConfig = {
|
|
505
|
-
id: 'toolbar-export-PNG',
|
|
506
|
-
title: 'Export as PNG',
|
|
507
|
-
shouldBeDisabled: function () { return false; },
|
|
508
|
-
iconSVG: {
|
|
509
|
-
content: this.getControlIconByType(controlType),
|
|
510
|
-
},
|
|
511
|
-
clickFunction: function () { return _this.services.domUtils.exportToPNG(); },
|
|
512
|
-
};
|
|
513
|
-
break;
|
|
514
|
-
case ToolbarControlTypes.EXPORT_JPG:
|
|
515
|
-
controlConfig = {
|
|
516
|
-
id: 'toolbar-export-JPG',
|
|
517
|
-
title: 'Export as JPG',
|
|
518
|
-
shouldBeDisabled: function () { return false; },
|
|
519
|
-
iconSVG: {
|
|
520
|
-
content: this.getControlIconByType(controlType),
|
|
521
|
-
},
|
|
522
|
-
clickFunction: function () { return _this.services.domUtils.exportToJPG(); },
|
|
523
|
-
};
|
|
524
|
-
break;
|
|
525
|
-
// add more toolbar control configuration here
|
|
526
|
-
default:
|
|
527
|
-
throw Error('Not supported toolbar control type: ' + controlType);
|
|
528
|
-
}
|
|
529
|
-
return controlConfig;
|
|
530
|
-
};
|
|
531
|
-
Toolbar.prototype.getControlIconByType = function (controlType) {
|
|
532
|
-
switch (controlType) {
|
|
533
|
-
case ToolbarControlTypes.ZOOM_IN:
|
|
534
|
-
return "<polygon points=\"19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13\"/>\n\t\t\t\t\t\t<path d=\"M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z\"/>";
|
|
535
|
-
case ToolbarControlTypes.ZOOM_OUT:
|
|
536
|
-
return "<rect x=\"9\" y=\"13\" width=\"10\" height=\"2\"/>\n\t\t\t\t\t\t<path d=\"M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z\"/>";
|
|
537
|
-
case ToolbarControlTypes.RESET_ZOOM:
|
|
538
|
-
return "<path d=\"M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z\"/>";
|
|
539
|
-
case ToolbarControlTypes.MAKE_FULLSCREEN:
|
|
540
|
-
return "<polygon points=\"21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2\"/><polygon points=\"15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42\"/>";
|
|
541
|
-
case ToolbarControlTypes.SHOW_AS_DATATABLE:
|
|
542
|
-
return "<rect x=\"4\" y=\"6\" width=\"18\" height=\"2\"/><rect x=\"4\" y=\"12\" width=\"18\" height=\"2\"/><rect x=\"4\" y=\"18\" width=\"18\" height=\"2\"/><rect x=\"4\" y=\"24\" width=\"18\" height=\"2\"/><rect x=\"26\" y=\"6\" width=\"2\" height=\"2\"/><rect x=\"26\" y=\"12\" width=\"2\" height=\"2\"/><rect x=\"26\" y=\"18\" width=\"2\" height=\"2\"/><rect x=\"26\" y=\"24\" width=\"2\" height=\"2\"/>";
|
|
543
|
-
case ToolbarControlTypes.EXPORT_CSV:
|
|
544
|
-
return "<path d=\"M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z\"/>";
|
|
545
|
-
case ToolbarControlTypes.EXPORT_JPG:
|
|
546
|
-
return "<path d=\"M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z\"/>";
|
|
547
|
-
case ToolbarControlTypes.EXPORT_PNG:
|
|
548
|
-
return "<path d=\"M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z\"/>"; // add more icons here
|
|
549
|
-
// svg icon must be with 32x32 viewBox
|
|
550
|
-
default:
|
|
551
|
-
throw Error('Not supported toolbar control type: ' + controlType);
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
Toolbar.buttonID = 0;
|
|
555
|
-
return Toolbar;
|
|
556
|
-
}(Component));
|
|
557
|
-
export { Toolbar };
|
|
558
|
-
//# sourceMappingURL=../../../src/components/axes/toolbar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.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mB,CAAC,OAAO;gBAC/B,OAAO,iQAC4I,CAAC;YACrJ,KAAK,mBAAmB,CAAC,QAAQ;gBAChC,OAAO,oNAC4I,CAAC;YACrJ,KAAK,mBAAmB,CAAC,UAAU;gBAClC,OAAO,iNAA+M,CAAC;YACxN,KAAK,mBAAmB,CAAC,eAAe;gBACvC,OAAO,oLAAgL,CAAC;YACzL,KAAK,mBAAmB,CAAC,iBAAiB;gBACzC,OAAO,gZAAgV,CAAC;YACzV,KAAK,mBAAmB,CAAC,UAAU;gBAClC,OAAO,iNAA+M,CAAC;YACxN,KAAK,mBAAmB,CAAC,UAAU;gBAClC,OAAO,iNAA+M,CAAC;YACxN,KAAK,mBAAmB,CAAC,UAAU;gBAClC,OAAO,iNAA+M,CAAC,CAAC,sBAAsB;YAC/O,sCAAsC;YAEtC;gBACC,MAAM,KAAK,CACV,sCAAsC,GAAG,WAAW,CACpD,CAAC;SACH;IACF,CAAC;IA5qBM,gBAAQ,GAAG,CAAC,CAAC;IA6qBrB,cAAC;CAAA,AA9qBD,CAA6B,SAAS,GA8qBrC;SA9qBY,OAAO","sourcesContent":["// Internal Imports\nimport { Component } from '../component';\nimport { Events, RenderTypes, ToolbarControlTypes } from '../../interfaces';\nimport * as Tools from '../../tools';\n\n// D3 Imports\nimport { select } from 'd3-selection';\n\nexport class Toolbar extends Component {\n\tstatic buttonID = 0;\n\ttype = 'toolbar';\n\trenderType = RenderTypes.HTML;\n\n\t// overflow menu button to control background color\n\toverflowButton: any;\n\n\t// div options list element\n\toverflowMenu: any;\n\n\tinit() {\n\t\tconst bodyOnClickHandler = () => this.updateOverflowMenu(false);\n\n\t\t// Grab the tooltip element\n\t\tthis.services.events.addEventListener(\n\t\t\tEvents.Toolbar.SHOW_OVERFLOW_MENU,\n\t\t\t() => {\n\t\t\t\tthis.renderOverflowMenu();\n\n\t\t\t\t// hide overflow menu if user clicks on somewhere in web page\n\t\t\t\tdocument.body.addEventListener('click', bodyOnClickHandler);\n\t\t\t}\n\t\t);\n\n\t\t// listen to hide overflow menu event to hide the overflow menu\n\t\tthis.services.events.addEventListener(\n\t\t\tEvents.Toolbar.HIDE_OVERFLOW_MENU,\n\t\t\t() => {\n\t\t\t\t// // hide overflow menu if user clicks on somewhere in web page\n\t\t\t\tdocument.body.removeEventListener('click', bodyOnClickHandler);\n\t\t\t}\n\t\t);\n\t}\n\n\trender(animate = true) {\n\t\tconst container = this.getComponentContainer()\n\t\t\t.attr('role', 'toolbar')\n\t\t\t.attr(\n\t\t\t\t'aria-label',\n\t\t\t\t`chart-${this.services.domUtils.getChartID()} toolbar`\n\t\t\t);\n\n\t\tconst isDataLoading = Tools.getProperty(\n\t\t\tthis.getOptions(),\n\t\t\t'data',\n\t\t\t'loading'\n\t\t);\n\n\t\tif (isDataLoading) {\n\t\t\tcontainer.html('');\n\t\t\t// Set overflow menu to null if data is loading\n\t\t\t// This will render in a new overflow menu when data is done loading\n\t\t\tthis.overflowMenu = null;\n\t\t} else {\n\t\t\tif (!this.overflowMenu) {\n\t\t\t\tthis.overflowMenu = container\n\t\t\t\t\t.append('div')\n\t\t\t\t\t.attr(\n\t\t\t\t\t\t'class',\n\t\t\t\t\t\t'cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip'\n\t\t\t\t\t)\n\t\t\t\t\t.attr('tabindex', -1)\n\t\t\t\t\t.html(`<ul role='menu'></ul>`);\n\t\t\t}\n\n\t\t\t// get the toolbar buttons\n\t\t\tconst {\n\t\t\t\tbuttonList,\n\t\t\t\toverflowMenuItemList,\n\t\t\t} = this.getControlConfigs();\n\n\t\t\t// overflow button is required only if overflow menu item list is valid\n\t\t\tif (!!overflowMenuItemList) {\n\t\t\t\tbuttonList.push(this.getOverflowButtonConfig());\n\t\t\t}\n\n\t\t\tconst toolbarControls = container\n\t\t\t\t.selectAll('div.toolbar-control')\n\t\t\t\t.data(buttonList, (button) => button.id);\n\n\t\t\ttoolbarControls.exit().remove();\n\n\t\t\tconst enteringToolbarControls = toolbarControls\n\t\t\t\t.enter()\n\t\t\t\t.append('div')\n\t\t\t\t.attr(\n\t\t\t\t\t'class',\n\t\t\t\t\t'toolbar-control cds--overflow-menu cds--overflow-menu'\n\t\t\t\t)\n\t\t\t\t.attr('role', 'button');\n\n\t\t\tconst self = this;\n\t\t\tconst allToolbarControls = enteringToolbarControls\n\t\t\t\t.merge(toolbarControls)\n\t\t\t\t.classed('disabled', (d) => d.shouldBeDisabled())\n\t\t\t\t.attr('aria-disabled', (d) => d.shouldBeDisabled())\n\t\t\t\t.attr('aria-label', (d) => d.title)\n\t\t\t\t.html(\n\t\t\t\t\t(d) => `\n\t\t\t<button\n\t\t\t\tclass=\"cds--overflow-menu__trigger cds--overflow-menu__trigger\"\n\t\t\t\taria-haspopup=\"true\" aria-expanded=\"false\" id=\"${this.services.domUtils.generateElementIDString(\n\t\t\t\t\t`control-${d.id}`\n\t\t\t\t)}\" aria-label=\"${d.title}\">\n\t\t\t\t<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cds--overflow-menu__icon cds--overflow-menu__icon\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t${d.iconSVG.content}\n\t\t\t\t</svg>\n\t\t\t</button>`\n\t\t\t\t)\n\t\t\t\t.each(function (d, index) {\n\t\t\t\t\tselect(this)\n\t\t\t\t\t\t.select('svg')\n\t\t\t\t\t\t.style('will-change', 'transform')\n\t\t\t\t\t\t.style(\n\t\t\t\t\t\t\t'width',\n\t\t\t\t\t\t\td.iconSVG.width !== undefined\n\t\t\t\t\t\t\t\t? d.iconSVG.width\n\t\t\t\t\t\t\t\t: '20px'\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.style(\n\t\t\t\t\t\t\t'height',\n\t\t\t\t\t\t\td.iconSVG.height !== undefined\n\t\t\t\t\t\t\t\t? d.iconSVG.height\n\t\t\t\t\t\t\t\t: '20px'\n\t\t\t\t\t\t);\n\n\t\t\t\t\tselect(this)\n\t\t\t\t\t\t.select('button')\n\t\t\t\t\t\t.on('click', (event) => {\n\t\t\t\t\t\t\tif (!d.shouldBeDisabled()) {\n\t\t\t\t\t\t\t\tself.triggerFunctionAndEvent(d, event, this);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.on('keydown', (event: KeyboardEvent) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t(event.key && event.key === 'Enter') ||\n\t\t\t\t\t\t\t\tevent.key === ' '\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\tself.triggerFunctionAndEvent(d, event, this);\n\t\t\t\t\t\t\t} else if (event.key && event.key === 'ArrowLeft') {\n\t\t\t\t\t\t\t\tself.focusOnPreviousEnabledToolbarItem(index);\n\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\tevent.key &&\n\t\t\t\t\t\t\t\tevent.key === 'ArrowRight'\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tself.focusOnNextEnabledToolbarItem(index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\tthis.overflowButton = this.getComponentContainer().select(\n\t\t\t\t`button.cds--overflow-menu__trigger#${this.services.domUtils.generateElementIDString(\n\t\t\t\t\t'control-toolbar-overflow-menu'\n\t\t\t\t)}`\n\t\t\t);\n\t\t}\n\t}\n\n\trenderOverflowMenu() {\n\t\tconst { overflowMenuItemList } = this.getControlConfigs();\n\n\t\tconst overflowMenuControls = this.overflowMenu\n\t\t\t.select('ul')\n\t\t\t.selectAll('li.cds--overflow-menu-options__option')\n\t\t\t.data(overflowMenuItemList, (button) =>\n\t\t\t\tTools.getProperty(button, 'id')\n\t\t\t);\n\n\t\toverflowMenuControls.exit().remove();\n\n\t\tconst enteringOverflowMenuControls = overflowMenuControls\n\t\t\t.enter()\n\t\t\t.append('li')\n\t\t\t.attr('id', (d) =>\n\t\t\t\tthis.services.domUtils.generateElementIDString(\n\t\t\t\t\t`control-${d.id}`\n\t\t\t\t)\n\t\t\t)\n\t\t\t.attr(\n\t\t\t\t'class',\n\t\t\t\t'cds--overflow-menu-options__option cds--overflow-menu-options__option'\n\t\t\t)\n\t\t\t.attr('role', 'menuitem')\n\t\t\t.attr('tabindex', 1);\n\n\t\tenteringOverflowMenuControls\n\t\t\t.append('button')\n\t\t\t.attr(\n\t\t\t\t'class',\n\t\t\t\t'cds--overflow-menu-options__btn cds--overflow-menu-options__btn'\n\t\t\t);\n\n\t\tenteringOverflowMenuControls\n\t\t\t.merge(overflowMenuControls)\n\t\t\t.classed('cds--overflow-menu-options__option--disabled', (d) =>\n\t\t\t\td.shouldBeDisabled()\n\t\t\t)\n\t\t\t.classed('cds--overflow-menu-options__option--disabled', (d) =>\n\t\t\t\td.shouldBeDisabled()\n\t\t\t)\n\t\t\t.attr('aria-disabled', (d) => d.shouldBeDisabled())\n\t\t\t.selectAll('button')\n\t\t\t.text((d) => d.text);\n\t}\n\n\tisOverflowMenuOpen() {\n\t\treturn this.overflowMenu.classed('is-open');\n\t}\n\n\t// show/hide overflow menu\n\tupdateOverflowMenu(show: boolean) {\n\t\tif (!this.overflowMenu) {\n\t\t\treturn;\n\t\t}\n\t\tthis.overflowMenu.classed('is-open', show);\n\n\t\t// update overflow button background\n\t\tif (this.overflowButton) {\n\t\t\tthis.overflowButton.attr('aria-expanded', show);\n\t\t\tselect(this.overflowButton.node().parentNode)\n\t\t\t\t.classed('cds--overflow-menu--open', show)\n\t\t\t\t.classed('cds--overflow-menu--open', show);\n\t\t}\n\n\t\tif (show) {\n\t\t\tthis.services.events.dispatchEvent(\n\t\t\t\tEvents.Toolbar.SHOW_OVERFLOW_MENU\n\t\t\t);\n\t\t} else {\n\t\t\tthis.services.events.dispatchEvent(\n\t\t\t\tEvents.Toolbar.HIDE_OVERFLOW_MENU\n\t\t\t);\n\t\t}\n\t}\n\n\t// Toolbar controllers\n\tfocusOnPreviousEnabledToolbarItem(currentItemIndex) {\n\t\tconst buttonList = this.getToolbarButtonItems();\n\t\tlet previousItemIndex = buttonList.length;\n\n\t\tfor (let i = currentItemIndex - 1; i >= 0; i--) {\n\t\t\tconst previousButtonItem = buttonList[i];\n\t\t\tif (!previousButtonItem.shouldBeDisabled()) {\n\t\t\t\tpreviousItemIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// only if previous enabled menu item found\n\t\tif (previousItemIndex < buttonList.length) {\n\t\t\tconst previousItemNode = select(\n\t\t\t\t`button#${this.services.domUtils.generateElementIDString(\n\t\t\t\t\t`control-${buttonList[previousItemIndex].id}`\n\t\t\t\t)}`\n\t\t\t).node();\n\t\t\tif ('focus' in previousItemNode) {\n\t\t\t\tpreviousItemNode.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\tfocusOnNextEnabledToolbarItem(currentItemIndex) {\n\t\tconst buttonList = this.getToolbarButtonItems();\n\t\tlet nextItemIndex = -1;\n\n\t\tfor (let i = currentItemIndex + 1; i < buttonList.length; i++) {\n\t\t\tconst nextOverflowMenuItem = buttonList[i];\n\t\t\tif (!nextOverflowMenuItem.shouldBeDisabled()) {\n\t\t\t\tnextItemIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// only if next enabled menu item found\n\t\tif (nextItemIndex > -1) {\n\t\t\tconst nextItemNode = select(\n\t\t\t\t`button#${this.services.domUtils.generateElementIDString(\n\t\t\t\t\t`control-${buttonList[nextItemIndex].id}`\n\t\t\t\t)}`\n\t\t\t).node();\n\n\t\t\tif ('focus' in nextItemNode) {\n\t\t\t\tnextItemNode.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\tfocusOnPreviousEnabledMenuItem(currentItemIndex) {\n\t\tconst overflowMenuItems = this.getOverflowMenuItems();\n\t\tlet previousItemIndex = overflowMenuItems.length;\n\n\t\tfor (let i = currentItemIndex - 1; i >= 0; i--) {\n\t\t\tconst previousOverflowMenuItem = overflowMenuItems[i];\n\t\t\tif (!previousOverflowMenuItem.shouldBeDisabled()) {\n\t\t\t\tpreviousItemIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// only if previous enabled menu item found\n\t\tif (previousItemIndex < overflowMenuItems.length) {\n\t\t\tconst previousItemNode = select(\n\t\t\t\t`#${this.services.domUtils.generateElementIDString(\n\t\t\t\t\t`control-${overflowMenuItems[previousItemIndex].id}`\n\t\t\t\t)} button`\n\t\t\t).node();\n\t\t\tif ('focus' in previousItemNode) {\n\t\t\t\tpreviousItemNode.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\tfocusOnNextEnabledMenuItem(currentItemIndex) {\n\t\tconst overflowMenuItems = this.getOverflowMenuItems();\n\t\tlet nextItemIndex = -1;\n\n\t\tfor (let i = currentItemIndex + 1; i < overflowMenuItems.length; i++) {\n\t\t\tconst nextOverflowMenuItem = overflowMenuItems[i];\n\t\t\tif (!nextOverflowMenuItem.shouldBeDisabled()) {\n\t\t\t\tnextItemIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// only if next enabled menu item found\n\t\tif (nextItemIndex > -1) {\n\t\t\tconst nextItemNode = select(\n\t\t\t\t`#${this.services.domUtils.generateElementIDString(\n\t\t\t\t\t`control-${overflowMenuItems[nextItemIndex].id}`\n\t\t\t\t)} button`\n\t\t\t).node();\n\n\t\t\tif ('focus' in nextItemNode) {\n\t\t\t\tnextItemNode.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\ttoggleOverflowMenu(event) {\n\t\tif (this.isOverflowMenuOpen()) {\n\t\t\t// hide overflow menu\n\t\t\tthis.updateOverflowMenu(false);\n\t\t} else {\n\t\t\t// show overflow menu\n\t\t\tthis.updateOverflowMenu(true);\n\n\t\t\t// setup overflow menu item event listener\n\t\t\tconst self = this;\n\t\t\tconst overflowMenuItems = this.getOverflowMenuItems();\n\t\t\toverflowMenuItems.forEach((menuItem, index) => {\n\t\t\t\tconst element = select(\n\t\t\t\t\t`#${this.services.domUtils.generateElementIDString(\n\t\t\t\t\t\t`control-${menuItem.id}`\n\t\t\t\t\t)}`\n\t\t\t\t);\n\t\t\t\tif (element !== null) {\n\t\t\t\t\telement.on('click', () => {\n\t\t\t\t\t\tself.triggerFunctionAndEvent(\n\t\t\t\t\t\t\tmenuItem,\n\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\telement.node()\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// hide overflow menu\n\t\t\t\t\t\tself.updateOverflowMenu(false);\n\t\t\t\t\t});\n\n\t\t\t\t\telement.on('keydown', (keyEvent: KeyboardEvent) => {\n\t\t\t\t\t\tif (keyEvent && keyEvent.key === 'Enter') {\n\t\t\t\t\t\t\tself.triggerFunctionAndEvent(\n\t\t\t\t\t\t\t\tmenuItem,\n\t\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\t\telement.node()\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if (keyEvent && keyEvent.key === 'ArrowUp') {\n\t\t\t\t\t\t\t// focus on previous menu item\n\t\t\t\t\t\t\tself.focusOnPreviousEnabledMenuItem(index);\n\t\t\t\t\t\t} else if (keyEvent && keyEvent.key === 'ArrowDown') {\n\t\t\t\t\t\t\t// focus on next menu item\n\t\t\t\t\t\t\tself.focusOnNextEnabledMenuItem(index);\n\t\t\t\t\t\t} else if (keyEvent && keyEvent.key === 'Escape') {\n\t\t\t\t\t\t\tself.updateOverflowMenu(false);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Not hide overflow menu by keyboard arrow up/down event\n\t\t\t\t\t\t// Prevent page from scrolling up/down\n\t\t\t\t\t\tkeyEvent.preventDefault();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// default to focus on the first enabled menu item\n\t\t\tself.focusOnNextEnabledMenuItem(-1);\n\t\t}\n\n\t\t// propogation should not be stopped for keyboard events\n\t\tif (!!event) {\n\t\t\tevent.stopImmediatePropagation();\n\t\t}\n\t}\n\n\t// Calls passed function && dispatches event\n\ttriggerFunctionAndEvent(control, event, element?) {\n\t\t// Check if trigger is disabled\n\t\tif (\n\t\t\ttypeof control.shouldBeDisabled === 'function' &&\n\t\t\tcontrol.shouldBeDisabled()\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Call custom function only if it exists\n\t\tif (typeof control.clickFunction === 'function') {\n\t\t\tcontrol.clickFunction(event);\n\t\t}\n\n\t\t// Dispatch selection event\n\t\tthis.services.events.dispatchEvent(Events.Toolbar.BUTTON_CLICK, {\n\t\t\tcontrol,\n\t\t\tevent,\n\t\t\telement,\n\t\t});\n\t}\n\n\tgetControlConfigs() {\n\t\tconst numberOfIcons =\n\t\t\tTools.getProperty(this.getOptions(), 'toolbar', 'numberOfIcons') -\n\t\t\t1;\n\t\tconst controls = Tools.getProperty(\n\t\t\tthis.getOptions(),\n\t\t\t'toolbar',\n\t\t\t'controls'\n\t\t);\n\n\t\tconst overflowSpecificControls = [];\n\t\tconst buttonList = [];\n\t\tconst overflowList = [];\n\n\t\tcontrols.forEach((control) => {\n\t\t\tlet controlConfig = null;\n\t\t\t// check if button is custom or default control\n\t\t\tif (control.type === ToolbarControlTypes.CUSTOM) {\n\t\t\t\t// add generic id if missing\n\t\t\t\tif (Tools.getProperty(control, 'id') === null) {\n\t\t\t\t\t// add id directly to the data passed so that id isn't reassigned on rerender\n\t\t\t\t\tcontrol.id = `toolbar-button-${Toolbar.buttonID++}`;\n\t\t\t\t}\n\t\t\t\t// define function if missing\n\t\t\t\tif (Tools.getProperty(control, 'shouldBeDisabled') === null) {\n\t\t\t\t\tcontrol.shouldBeDisabled = () => false;\n\t\t\t\t}\n\n\t\t\t\tcontrolConfig = control;\n\t\t\t} else {\n\t\t\t\tcontrolConfig = this.getControlConfigByType(control.type);\n\t\t\t}\n\n\t\t\t// add to list if config is valid\n\t\t\tif (controlConfig) {\n\t\t\t\tcontrolConfig.text = control.text ? control.text : control.type;\n\n\t\t\t\tif (controlConfig.id.indexOf('toolbar-export') !== -1) {\n\t\t\t\t\toverflowSpecificControls.push(controlConfig);\n\t\t\t\t} else if (buttonList.length < numberOfIcons) {\n\t\t\t\t\t// check if icon exists else assign to the overflow list\n\t\t\t\t\tif (\n\t\t\t\t\t\tTools.getProperty(\n\t\t\t\t\t\t\tcontrolConfig,\n\t\t\t\t\t\t\t'iconSVG',\n\t\t\t\t\t\t\t'content'\n\t\t\t\t\t\t) === null\n\t\t\t\t\t) {\n\t\t\t\t\t\toverflowList.push(controlConfig);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbuttonList.push(controlConfig);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\toverflowList.push(controlConfig);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Ensures the `export` controls are always at the bottom\n\t\toverflowList.push(...overflowSpecificControls);\n\n\t\tif (!overflowList.length) {\n\t\t\treturn {\n\t\t\t\tbuttonList,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tbuttonList,\n\t\t\toverflowMenuItemList: overflowList,\n\t\t};\n\t}\n\n\tgetToolbarButtonItems() {\n\t\tconst { buttonList, overflowMenuItemList } = this.getControlConfigs();\n\t\tif (!!overflowMenuItemList) {\n\t\t\tbuttonList.push(this.getOverflowButtonConfig());\n\t\t}\n\t\tif (!!buttonList) {\n\t\t\treturn buttonList;\n\t\t}\n\n\t\treturn [];\n\t}\n\n\tgetOverflowMenuItems() {\n\t\tconst { overflowMenuItemList } = this.getControlConfigs();\n\t\tif (!!overflowMenuItemList) {\n\t\t\treturn overflowMenuItemList;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t}\n\n\t// special button config for overflow button\n\tgetOverflowButtonConfig() {\n\t\treturn {\n\t\t\tid: 'toolbar-overflow-menu',\n\t\t\ttitle: 'More options',\n\t\t\tshouldBeDisabled: () => false,\n\t\t\ticonSVG: {\n\t\t\t\tcontent: `<circle cx=\"16\" cy=\"8\" r=\"2\"></circle>\n\t\t\t\t<circle cx=\"16\" cy=\"16\" r=\"2\"></circle>\n\t\t\t\t<circle cx=\"16\" cy=\"24\" r=\"2\"></circle>`,\n\t\t\t},\n\t\t\tclickFunction: (event) => this.toggleOverflowMenu(event),\n\t\t};\n\t}\n\n\tgetControlConfigByType(controlType: ToolbarControlTypes) {\n\t\tconst isZoomBarEnabled =\n\t\t\tthis.services.zoom &&\n\t\t\tthis.services.zoom.isZoomBarEnabled() &&\n\t\t\t!this.services.zoom.isEmptyState();\n\n\t\tconst displayData = this.model.getDisplayData();\n\n\t\tlet controlConfig;\n\t\tswitch (controlType) {\n\t\t\tcase ToolbarControlTypes.ZOOM_IN:\n\t\t\t\tif (isZoomBarEnabled) {\n\t\t\t\t\tcontrolConfig = {\n\t\t\t\t\t\tid: 'toolbar-zoomIn',\n\t\t\t\t\t\ttitle: 'Zoom in',\n\t\t\t\t\t\tshouldBeDisabled: () =>\n\t\t\t\t\t\t\tthis.services.zoom.isMinZoomDomain(),\n\t\t\t\t\t\ticonSVG: {\n\t\t\t\t\t\t\tcontent: this.getControlIconByType(controlType),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclickFunction: () => this.services.zoom.zoomIn(),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ToolbarControlTypes.ZOOM_OUT:\n\t\t\t\tif (isZoomBarEnabled) {\n\t\t\t\t\tcontrolConfig = {\n\t\t\t\t\t\tid: 'toolbar-zoomOut',\n\t\t\t\t\t\ttitle: 'Zoom out',\n\t\t\t\t\t\tshouldBeDisabled: () =>\n\t\t\t\t\t\t\tthis.services.zoom.isMaxZoomDomain(),\n\t\t\t\t\t\ticonSVG: {\n\t\t\t\t\t\t\tcontent: this.getControlIconByType(controlType),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclickFunction: () => this.services.zoom.zoomOut(),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ToolbarControlTypes.RESET_ZOOM:\n\t\t\t\tif (isZoomBarEnabled) {\n\t\t\t\t\tcontrolConfig = {\n\t\t\t\t\t\tid: 'toolbar-resetZoom',\n\t\t\t\t\t\ttitle: 'Reset zoom',\n\t\t\t\t\t\tshouldBeDisabled: () =>\n\t\t\t\t\t\t\tthis.services.zoom.isMaxZoomDomain(),\n\t\t\t\t\t\ticonSVG: {\n\t\t\t\t\t\t\tcontent: this.getControlIconByType(controlType),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclickFunction: () =>\n\t\t\t\t\t\t\tthis.services.zoom.resetZoomDomain(),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ToolbarControlTypes.MAKE_FULLSCREEN:\n\t\t\t\tcontrolConfig = {\n\t\t\t\t\tid: 'toolbar-makefullscreen',\n\t\t\t\t\ticonSVG: {\n\t\t\t\t\t\tcontent: this.getControlIconByType(controlType),\n\t\t\t\t\t\twidth: '15px',\n\t\t\t\t\t\theight: '15px',\n\t\t\t\t\t},\n\t\t\t\t\ttitle: 'Make fullscreen',\n\t\t\t\t\tshouldBeDisabled: () => false,\n\t\t\t\t\tclickFunction: () => {\n\t\t\t\t\t\tthis.services.domUtils.toggleFullscreen();\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tcase ToolbarControlTypes.SHOW_AS_DATATABLE:\n\t\t\t\tcontrolConfig = {\n\t\t\t\t\tid: 'toolbar-showasdatatable',\n\t\t\t\t\ticonSVG: {\n\t\t\t\t\t\tcontent: this.getControlIconByType(controlType),\n\t\t\t\t\t},\n\t\t\t\t\ttitle: 'Show as table',\n\t\t\t\t\tshouldBeDisabled: () => displayData.length === 0,\n\t\t\t\t\tclickFunction: () =>\n\t\t\t\t\t\tthis.services.events.dispatchEvent(Events.Modal.SHOW),\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tcase ToolbarControlTypes.EXPORT_CSV:\n\t\t\t\tcontrolConfig = {\n\t\t\t\t\tid: 'toolbar-export-CSV',\n\t\t\t\t\ttitle: 'Export as CSV',\n\t\t\t\t\tshouldBeDisabled: () => false,\n\t\t\t\t\ticonSVG: {\n\t\t\t\t\t\tcontent: this.getControlIconByType(controlType),\n\t\t\t\t\t},\n\t\t\t\t\tclickFunction: () => this.model.exportToCSV(),\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tcase ToolbarControlTypes.EXPORT_PNG:\n\t\t\t\tcontrolConfig = {\n\t\t\t\t\tid: 'toolbar-export-PNG',\n\t\t\t\t\ttitle: 'Export as PNG',\n\t\t\t\t\tshouldBeDisabled: () => false,\n\t\t\t\t\ticonSVG: {\n\t\t\t\t\t\tcontent: this.getControlIconByType(controlType),\n\t\t\t\t\t},\n\t\t\t\t\tclickFunction: () => this.services.domUtils.exportToPNG(),\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tcase ToolbarControlTypes.EXPORT_JPG:\n\t\t\t\tcontrolConfig = {\n\t\t\t\t\tid: 'toolbar-export-JPG',\n\t\t\t\t\ttitle: 'Export as JPG',\n\t\t\t\t\tshouldBeDisabled: () => false,\n\t\t\t\t\ticonSVG: {\n\t\t\t\t\t\tcontent: this.getControlIconByType(controlType),\n\t\t\t\t\t},\n\t\t\t\t\tclickFunction: () => this.services.domUtils.exportToJPG(),\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\t// add more toolbar control configuration here\n\n\t\t\tdefault:\n\t\t\t\tthrow Error(\n\t\t\t\t\t'Not supported toolbar control type: ' + controlType\n\t\t\t\t);\n\t\t}\n\t\treturn controlConfig;\n\t}\n\n\tgetControlIconByType(controlType: ToolbarControlTypes) {\n\t\tswitch (controlType) {\n\t\t\tcase ToolbarControlTypes.ZOOM_IN:\n\t\t\t\treturn `<polygon points=\"19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13\"/>\n\t\t\t\t\t\t<path d=\"M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z\"/>`;\n\t\t\tcase ToolbarControlTypes.ZOOM_OUT:\n\t\t\t\treturn `<rect x=\"9\" y=\"13\" width=\"10\" height=\"2\"/>\n\t\t\t\t\t\t<path d=\"M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z\"/>`;\n\t\t\tcase ToolbarControlTypes.RESET_ZOOM:\n\t\t\t\treturn `<path d=\"M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z\"/>`;\n\t\t\tcase ToolbarControlTypes.MAKE_FULLSCREEN:\n\t\t\t\treturn `<polygon points=\"21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2\"/><polygon points=\"15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42\"/>`;\n\t\t\tcase ToolbarControlTypes.SHOW_AS_DATATABLE:\n\t\t\t\treturn `<rect x=\"4\" y=\"6\" width=\"18\" height=\"2\"/><rect x=\"4\" y=\"12\" width=\"18\" height=\"2\"/><rect x=\"4\" y=\"18\" width=\"18\" height=\"2\"/><rect x=\"4\" y=\"24\" width=\"18\" height=\"2\"/><rect x=\"26\" y=\"6\" width=\"2\" height=\"2\"/><rect x=\"26\" y=\"12\" width=\"2\" height=\"2\"/><rect x=\"26\" y=\"18\" width=\"2\" height=\"2\"/><rect x=\"26\" y=\"24\" width=\"2\" height=\"2\"/>`;\n\t\t\tcase ToolbarControlTypes.EXPORT_CSV:\n\t\t\t\treturn `<path d=\"M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z\"/>`;\n\t\t\tcase ToolbarControlTypes.EXPORT_JPG:\n\t\t\t\treturn `<path d=\"M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z\"/>`;\n\t\t\tcase ToolbarControlTypes.EXPORT_PNG:\n\t\t\t\treturn `<path d=\"M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z\"/>`; // add more icons here\n\t\t\t// svg icon must be with 32x32 viewBox\n\n\t\t\tdefault:\n\t\t\t\tthrow Error(\n\t\t\t\t\t'Not supported toolbar control type: ' + controlType\n\t\t\t\t);\n\t\t}\n\t}\n}\n"]}
|