@hybridcore/ui 1.5.89 → 1.6.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/dist/{AccordionDetails-DhriPVPP.js → AccordionSummary-DgAwVTk8.js} +81 -82
- package/dist/{Add-CMz4N2zT.js → Add-DJLrrVHm.js} +52 -51
- package/dist/AnimatedTheme-jnasw6rT.js +11305 -0
- package/dist/AxisRenderer-DTyLLA6c.js +3579 -0
- package/dist/AxisRendererY-C_ItLPNV.js +445 -0
- package/dist/Box-p6OtTUEo.js +30 -0
- package/dist/Bullet-DVczI2TD.js +41 -0
- package/dist/Button-CcsPEIDh.js +35 -0
- package/dist/{Button-eqWvpDuh.js → Button-CvE2gnly.js} +138 -124
- package/dist/{ButtonBase-DsX-jMQJ.js → ButtonBase-2bPw77UP.js} +5 -5
- package/dist/{CardContent-DsYqqPeJ.js → CardContent-CSHh-ZlM.js} +4 -4
- package/dist/CategoryAxis-CwnfaGc8.js +458 -0
- package/dist/{Checkbox-CrU2hpWB.js → Checkbox-CWRMFTBp.js} +12 -11
- package/dist/Circle-Cy5s-pVc.js +27 -0
- package/dist/ColorSet-C7vpNXhM.js +2957 -0
- package/dist/{ColumnSeries-BTcqshjB.js → ColumnSeries-CjgdJ2QL.js} +129 -126
- package/dist/DataProcessor-CHDO51q4.js +83 -0
- package/dist/DateAxis-YX3QNIB-.js +569 -0
- package/dist/{Delete-86TO0fMo.js → Delete-CW0UZv1m.js} +1 -1
- package/dist/{DialogContent-CqTojymQ.js → DialogContent-B3nbEbuv.js} +10 -11
- package/dist/FormControl-BLbrq4C7.js +1636 -0
- package/dist/{FormControlLabel-BrdX4R71.js → FormControlLabel-C8SPv14J.js} +8 -8
- package/dist/Hierarchy-Bihj0S61.js +925 -0
- package/dist/{IconButton-DJ-31-Fd.js → IconButton-CHwRQF-g.js} +20 -19
- package/dist/IconPlus-yPkff_Vj.js +19 -0
- package/dist/{InputAdornment-B7qEA4kN.js → InputAdornment-DLxWUE6H.js} +6 -6
- package/dist/Legend-Dp_MKfS4.js +178 -0
- package/dist/LineSeries-Uiv5o56b.js +472 -0
- package/dist/{List-DOD5kSk3.js → List-tqElle9C.js} +4 -4
- package/dist/{ListItem-r8PbsvCz.js → ListItem-CfjsIg4B.js} +9 -8
- package/dist/{MenuItem-C6qlUyV3.js → MenuItem-xZx_w7zA.js} +14 -13
- package/dist/{Modal-CkcFEpHa.js → Modal-DhPpOoGB.js} +292 -277
- package/dist/{Paper-CjqLScHA.js → Paper-2B03OBmZ.js} +47 -41
- package/dist/PieSeries-B2fW3z0s.js +693 -0
- package/dist/RoundedRectangle-CWLi2PXn.js +34 -0
- package/dist/Scrollbar-D86MJyr2.js +171 -0
- package/dist/{Select-t3ewnSdf.js → Select-BgYwkZgI.js} +2066 -1633
- package/dist/Slice-B19rbYDZ.js +261 -0
- package/dist/{Source-BESIjd9X.js → Source-BSZST_GH.js} +2472 -2445
- package/dist/{Text-Cl1H4b0h.js → Text-ChJRuaD8.js} +398 -397
- package/dist/{TextField-BQ8a50fA.js → TextField-1yCesIbH.js} +23 -25
- package/dist/Tick-2bcLyHpF.js +162 -0
- package/dist/{Typography-D1t7XuLN.js → Typography-CxbneZy_.js} +11 -11
- package/dist/Vector-BmuhQO4p.js +3606 -0
- package/dist/Vector-DfTqQEln.js +1735 -0
- package/dist/WKT-2wsDT-nq.js +2310 -0
- package/dist/XYCursor-C8WktvKM.js +362 -0
- package/dist/ZoomableContainer-DYyqwaMb.js +220 -0
- package/dist/_commonjsHelpers-BVfed4GL.js +28 -0
- package/dist/capitalize-ciszXJ7R.js +9 -0
- package/dist/components/access/helpers.js +1 -1
- package/dist/components/access/index.js +1 -1
- package/dist/components/card/index.js +6 -6
- package/dist/components/card/styled.js +1 -1
- package/dist/components/charts/_common/utils.js +20 -0
- package/dist/components/charts/candlestick/logic.js +170 -140
- package/dist/components/charts/chart-wrapper/helpers.js +27 -0
- package/dist/components/charts/chart-wrapper/index.js +44 -0
- package/dist/components/charts/chart-wrapper/logic.js +47 -0
- package/dist/components/charts/chart-wrapper/styled.js +44 -0
- package/dist/components/charts/column-line-mix/index.js +10 -0
- package/dist/components/charts/column-line-mix/logic.js +162 -0
- package/dist/components/charts/column-line-mix/styled.js +12 -0
- package/dist/components/charts/drill-down-treemap/index.js +10 -0
- package/dist/components/charts/drill-down-treemap/logic.js +391 -0
- package/dist/components/charts/drill-down-treemap/styled.js +12 -0
- package/dist/components/charts/drill-down-voronoi-treemap/index.js +10 -0
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +1527 -0
- package/dist/components/charts/drill-down-voronoi-treemap/styled.js +12 -0
- package/dist/components/charts/heatmap/index.js +10 -0
- package/dist/components/charts/heatmap/logic.js +361 -0
- package/dist/components/charts/heatmap/styled.js +12 -0
- package/dist/components/charts/highlighting-line-data/logic.js +89 -256
- package/dist/components/charts/line/index.js +10 -0
- package/dist/components/charts/line/logic.js +148 -0
- package/dist/components/charts/line/styled.js +12 -0
- package/dist/components/charts/logaritmic-scale/index.js +10 -0
- package/dist/components/charts/logaritmic-scale/logic.js +119 -0
- package/dist/components/charts/logaritmic-scale/styled.js +12 -0
- package/dist/components/charts/multiple-value-axes/index.js +10 -0
- package/dist/components/charts/multiple-value-axes/logic.js +191 -0
- package/dist/components/charts/multiple-value-axes/styled.js +12 -0
- package/dist/components/charts/nested-pie/index.js +10 -0
- package/dist/components/charts/nested-pie/logic.js +110 -0
- package/dist/components/charts/nested-pie/styled.js +12 -0
- package/dist/components/charts/packed-circles/index.js +10 -0
- package/dist/components/charts/packed-circles/logic.js +423 -0
- package/dist/components/charts/packed-circles/styled.js +12 -0
- package/dist/components/charts/pie-chart/index.js +10 -0
- package/dist/components/charts/pie-chart/logic.js +70 -0
- package/dist/components/charts/pie-chart/styled.js +12 -0
- package/dist/components/charts/stacked-area-radar/index.js +10 -0
- package/dist/components/charts/stacked-area-radar/logic.js +868 -0
- package/dist/components/charts/stacked-area-radar/styled.js +12 -0
- package/dist/components/charts/stacked-column-chart/index.js +10 -0
- package/dist/components/charts/stacked-column-chart/logic.js +148 -0
- package/dist/components/charts/stacked-column-chart/styled.js +12 -0
- package/dist/components/charts/xy-chart/index.js +10 -0
- package/dist/components/charts/xy-chart/logic.js +170 -0
- package/dist/components/charts/xy-chart/styled.js +12 -0
- package/dist/components/collapsible-card/index.js +58 -32
- package/dist/components/collapsible-card/logic.js +20 -0
- package/dist/components/collapsible-card/styled.js +52 -0
- package/dist/components/confirm/dialog.js +3 -3
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/container/index.js +7 -7
- package/dist/components/context-menu/index.js +153 -253
- package/dist/components/data-map/components/controls/index.js +12 -0
- package/dist/components/data-map/components/controls/styled.js +34 -0
- package/dist/components/data-map/index.js +51 -0
- package/dist/components/data-map/logic.js +108 -0
- package/dist/components/data-map/styled.js +32 -0
- package/dist/components/data-security-selectors/security-level/index.js +5 -5
- package/dist/components/date-picker-with-custom-range/index.js +9 -0
- package/dist/components/date-picker-with-custom-range/logic.js +66 -0
- package/dist/components/date-picker-with-custom-range/styled.js +43 -0
- package/dist/components/divider/index.js +18 -0
- package/dist/components/divider/logic.js +13 -0
- package/dist/components/divider/styled.js +14 -0
- package/dist/components/geometry-picker/coordinate/index.js +1 -1
- package/dist/components/geometry-picker/edit/index.js +1 -1
- package/dist/components/geometry-picker/geometry/index.js +1 -1
- package/dist/components/geometry-picker/index.js +7 -8
- package/dist/components/geometry-picker/kml/index.js +1 -1
- package/dist/components/geometry-picker/map/index.js +1 -1
- package/dist/components/geometry-picker/map/logic.js +65 -62
- package/dist/components/geometry-picker/map/style.js +1 -1
- package/dist/components/heat-map/components/controls/index.js +12 -0
- package/dist/components/heat-map/components/controls/styled.js +34 -0
- package/dist/components/heat-map/components/legend/index.js +26 -0
- package/dist/components/heat-map/components/legend/styled.js +14 -0
- package/dist/components/heat-map/index.js +37 -0
- package/dist/components/heat-map/logic.js +1945 -0
- package/dist/components/heat-map/styled.js +32 -0
- package/dist/components/icon-button/index.js +22 -15
- package/dist/components/icon-button/logic.js +15 -0
- package/dist/components/icon-button/styled.js +22 -10
- package/dist/components/instance-form/components/composite-list/index.js +1 -1
- package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +8 -7
- package/dist/components/instance-form/components/variable/index.js +8 -8
- package/dist/components/instance-form/components/variables/index.js +1 -1
- package/dist/components/instance-hierarchy-table/styled.js +1 -1
- package/dist/components/instance-variable-list/index.js +34 -29
- package/dist/components/instance-variable-list/styled.js +21 -21
- package/dist/components/instance-variable-list/variable.js +44 -74
- package/dist/components/linear-indicator/index.js +10 -67
- package/dist/components/linear-indicator/logic.js +47 -0
- package/dist/components/linear-indicator/styled.js +39 -40
- package/dist/components/map/helpers/kml.js +1 -1
- package/dist/components/map/helpers/mapbox.js +14 -14
- package/dist/components/map/helpers/ol.js +23 -19
- package/dist/components/map/helpers/wkt.js +26 -1314
- package/dist/components/map/index.js +1 -1
- package/dist/components/map/logic.js +113 -101
- package/dist/components/map/styled.js +39 -31
- package/dist/components/metric-card/MetricChart.js +50 -498
- package/dist/components/metric-card/index.js +94 -115
- package/dist/components/metric-card/logic.js +70 -131
- package/dist/components/object-profile-card/components/avatar/index.js +44 -0
- package/dist/components/object-profile-card/components/avatar/logic.js +19 -0
- package/dist/components/object-profile-card/components/avatar/styled.js +41 -0
- package/dist/components/object-profile-card/index.js +90 -0
- package/dist/components/object-profile-card/logic.js +33 -0
- package/dist/components/object-profile-card/styled.js +48 -0
- package/dist/components/paginated-list/index.js +93 -89
- package/dist/components/paginated-list/logic.js +51 -40
- package/dist/components/paginated-list/styled.js +25 -21
- package/dist/components/property-mapping/index.js +2 -2
- package/dist/components/prr-map/components/controls/index.js +12 -0
- package/dist/components/prr-map/components/controls/styled.js +34 -0
- package/dist/components/prr-map/components/legend/index.js +36 -0
- package/dist/components/prr-map/components/legend/styled.js +21 -0
- package/dist/components/prr-map/index.js +38 -0
- package/dist/components/prr-map/logic.js +104 -0
- package/dist/components/prr-map/styled.js +32 -0
- package/dist/components/range-selector/components/composite-list-range/index.js +1 -1
- package/dist/components/range-selector/components/date-range/index.js +4282 -7
- package/dist/components/range-selector/index.js +1 -1
- package/dist/components/raster-grid-map/components/controls/index.js +12 -0
- package/dist/components/raster-grid-map/components/controls/styled.js +34 -0
- package/dist/components/raster-grid-map/components/legend/index.js +14 -0
- package/dist/components/raster-grid-map/components/legend/styled.js +21 -0
- package/dist/components/raster-grid-map/helpers.js +190 -0
- package/dist/components/raster-grid-map/index.js +38 -0
- package/dist/components/raster-grid-map/logic.js +172 -0
- package/dist/components/raster-grid-map/styled.js +32 -0
- package/dist/components/search-input/index.js +62 -140
- package/dist/components/search-input/logic.js +43 -0
- package/dist/components/search-input/styled.js +33 -0
- package/dist/components/simple-pivot-table/index.js +66 -0
- package/dist/components/simple-pivot-table/logic.js +51 -0
- package/dist/components/simple-pivot-table/styled.js +45 -0
- package/dist/components/static-text/index.js +18 -0
- package/dist/components/static-text/logic.js +13 -0
- package/dist/components/static-text/styled.js +45 -0
- package/dist/components/tabs/index.js +56 -2160
- package/dist/components/tabs/logic.js +36 -0
- package/dist/components/tabs/styled.js +94 -16
- package/dist/components/tabs/tab-panel.js +11 -10
- package/dist/components/template-filters/components/tab-panel/index.js +1 -1
- package/dist/components/template-form/components/property-list/index.js +7 -7
- package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
- package/dist/components/template-form/components/property-list/property-list-form.js +9 -9
- package/dist/components/template-form/components/recognition-property-list/index.js +6 -6
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +7 -7
- package/dist/components/template-form/index.js +5 -5
- package/dist/components/template-property-filters/property.js +5 -5
- package/dist/components/timeline/index.js +61 -0
- package/dist/components/timeline/logic.js +40 -0
- package/dist/components/timeline/styled.js +48 -0
- package/dist/components/tree-select/index.js +5 -5
- package/dist/components/treeview-filter/item-label/index.js +3 -3
- package/dist/constant-BiOGvlZc.js +21 -0
- package/dist/createReactComponent-C7L-DMHj.js +60 -0
- package/dist/{createSvgIcon-DLPYMuH1.js → createSvgIcon-BjpIhJ30.js} +30 -32
- package/dist/{createSvgIcon-OuwzpcaC.js → createSvgIcon-DrtgaibK.js} +5 -5
- package/dist/{createTheme-CNnKNxwL.js → createTheme-DYxDnE9u.js} +226 -285
- package/dist/{dialog-BE4D6swf.js → dialog-DcwXug9J.js} +6 -6
- package/dist/{helpers-DaCoWmi2.js → helpers-B4UL9NMD.js} +3 -3
- package/dist/index-BMS1Otro.js +183 -0
- package/dist/index-C__OZmYy.js +663 -0
- package/dist/{index-CGNxsLVm.js → index-CcdvNlgr.js} +7 -7
- package/dist/{index-JrtqxUdI.js → index-kCJ_Zvl8.js} +5 -5
- package/dist/index-syTc6m_V.js +1934 -0
- package/dist/index.es-CHNMhaMi.js +2067 -0
- package/dist/index.esm-BLLrbTzY.js +318 -0
- package/dist/{listItemTextClasses-CNjn41Of.js → listItemTextClasses-C3lndiXO.js} +2 -2
- package/dist/main.d.ts +1226 -358
- package/dist/main.js +141 -443
- package/dist/{has-DNclCIDV.js → math-Bvt2Ubuz.js} +220 -222
- package/dist/ol-yOE-NV0X.js +7465 -0
- package/dist/path-CNVruS--.js +84 -0
- package/dist/{property-list-form-C5hcK2y2.js → property-list-form-zZQfpR0X.js} +13 -13
- package/dist/styled-eZwjUruw.js +12 -0
- package/dist/useId-B4-oF9Mq.js +34 -0
- package/dist/useMobilePicker-BLg3Blg8.js +7589 -0
- package/dist/useThemeProps-BzzHcQyd.js +58 -0
- package/dist/{utils-CsOZUsQj.js → utils-BDNynJcd.js} +2 -2
- package/package.json +42 -9
- package/dist/AxisRendererY-kADUad00.js +0 -18370
- package/dist/Box-B1AVyJ_s.js +0 -71
- package/dist/DateAxis-CMum47iz.js +0 -924
- package/dist/Input-CoIrGZAh.js +0 -326
- package/dist/InputLabel-CBuAYyuT.js +0 -1367
- package/dist/LineSeries-CfcpoYla.js +0 -549
- package/dist/OutlinedInput-B-iZoc9l.js +0 -450
- package/dist/Tabs-Cn42Z5QI.js +0 -789
- package/dist/components/collapsible-card/style.js +0 -49
- package/dist/components/profile-card/index.js +0 -80
- package/dist/components/profile-card/logic.js +0 -33
- package/dist/components/profile-card/styled.js +0 -43
- package/dist/components/tabs/appleTabs.style.js +0 -55
- package/dist/createStyled-BGx1I94c.js +0 -352
- package/dist/createTheme-CyC5HawC.js +0 -879
- package/dist/exactProp-cjT0t_Pt.js +0 -36
- package/dist/extendSxProp-FEpqY5_S.js +0 -30
- package/dist/index-DMSHuq6l.js +0 -688
- package/dist/index-SpeaLUQD.js +0 -10963
- package/dist/ol-lGwSyEIV.js +0 -15050
- package/dist/ownerDocument-CUrv0DIK.js +0 -6
- package/dist/ownerWindow-niciwP7I.js +0 -7
- package/dist/styled-B8ugzvji.js +0 -12
- package/dist/useId-BHG98T5I.js +0 -26
- package/dist/useTheme-C15Eq8KG.js +0 -18
- package/dist/useTheme-D-uii9iX.js +0 -10
- package/dist/useThemeProps-DRP1dikX.js +0 -95
|
@@ -0,0 +1,925 @@
|
|
|
1
|
+
import { b as x, C as L, I as N, a as u, p as v, J as C, m as R, e as p, K as S, f, _ as A } from "./ColorSet-C7vpNXhM.js";
|
|
2
|
+
import { a as H, n as d, C as _, S as P, k as B, l as O, L as j, D as T } from "./AnimatedTheme-jnasw6rT.js";
|
|
3
|
+
class I extends H {
|
|
4
|
+
setupDefaultRules() {
|
|
5
|
+
super.setupDefaultRules();
|
|
6
|
+
const e = this._root.interfaceColors, i = this._root.gridLayout, t = this.rule.bind(this);
|
|
7
|
+
t("Hierarchy").setAll({
|
|
8
|
+
legendLabelText: "{category}",
|
|
9
|
+
legendValueText: "{sum.formatNumber('#.#')}",
|
|
10
|
+
width: x,
|
|
11
|
+
height: x,
|
|
12
|
+
colors: L.new(this._root, { step: 2 }),
|
|
13
|
+
downDepth: 1,
|
|
14
|
+
initialDepth: 5,
|
|
15
|
+
singleBranchOnly: !0,
|
|
16
|
+
maskContent: !0,
|
|
17
|
+
animationEasing: N(C)
|
|
18
|
+
}), t("HierarchyNode").setAll({
|
|
19
|
+
toggleKey: "disabled",
|
|
20
|
+
setStateOnChildren: !0,
|
|
21
|
+
position: "absolute",
|
|
22
|
+
isMeasured: !1,
|
|
23
|
+
cursorOverStyle: "pointer",
|
|
24
|
+
tooltipText: "{category}: {sum}"
|
|
25
|
+
}), t("HierarchyNode", ["last"]).setAll({
|
|
26
|
+
cursorOverStyle: "default"
|
|
27
|
+
});
|
|
28
|
+
{
|
|
29
|
+
const s = t("Label", ["hierarchy", "node"]);
|
|
30
|
+
s.setAll({
|
|
31
|
+
centerX: u,
|
|
32
|
+
centerY: u,
|
|
33
|
+
position: "absolute",
|
|
34
|
+
paddingBottom: 1,
|
|
35
|
+
paddingTop: 1,
|
|
36
|
+
paddingRight: 4,
|
|
37
|
+
paddingLeft: 4,
|
|
38
|
+
text: "{category}",
|
|
39
|
+
populateText: !0,
|
|
40
|
+
oversizedBehavior: "fit",
|
|
41
|
+
minScale: 0.3
|
|
42
|
+
}), d(s, "fill", e, "alternativeText");
|
|
43
|
+
}
|
|
44
|
+
{
|
|
45
|
+
const s = t("HierarchyLink");
|
|
46
|
+
s.setAll({
|
|
47
|
+
isMeasured: !1,
|
|
48
|
+
position: "absolute",
|
|
49
|
+
strokeWidth: 1,
|
|
50
|
+
strokeOpacity: 1,
|
|
51
|
+
strength: 0.9,
|
|
52
|
+
distance: 1.1
|
|
53
|
+
}), d(s, "stroke", e, "grid");
|
|
54
|
+
}
|
|
55
|
+
t("Circle", ["linkedhierarchy", "shape"]).setAll({
|
|
56
|
+
position: "absolute",
|
|
57
|
+
fillOpacity: 1,
|
|
58
|
+
strokeOpacity: 0,
|
|
59
|
+
radius: 15,
|
|
60
|
+
tooltipY: 0
|
|
61
|
+
}), t("Circle", ["linkedhierarchy", "shape", "outer"]).setAll({
|
|
62
|
+
position: "absolute",
|
|
63
|
+
opacity: 1,
|
|
64
|
+
fillOpacity: 0,
|
|
65
|
+
strokeDasharray: 0,
|
|
66
|
+
strokeOpacity: 1,
|
|
67
|
+
radius: 15,
|
|
68
|
+
scale: 1.1,
|
|
69
|
+
interactive: !1
|
|
70
|
+
}), t("Circle", ["linkedhierarchy", "shape", "outer"]).states.create("disabled", { opacity: 1, scale: 1.1, strokeDasharray: 2 }), t("Circle", ["linkedhierarchy", "shape", "outer"]).states.create("hoverDisabled", { scale: 1.2, opacity: 1, strokeDasharray: 2 }), t("Circle", ["linkedhierarchy", "shape", "outer"]).states.create("hover", { scale: 1.05, strokeDasharray: 0 }), t("Circle", ["linkedhierarchy", "shape", "outer"]).states.create("hidden", { opacity: 0, strokeDasharray: 0 }), t("BreadcrumbBar").setAll({
|
|
71
|
+
paddingLeft: 8,
|
|
72
|
+
layout: i
|
|
73
|
+
});
|
|
74
|
+
{
|
|
75
|
+
const s = t("Label", ["breadcrumb"]);
|
|
76
|
+
s.setAll({
|
|
77
|
+
paddingRight: 4,
|
|
78
|
+
paddingLeft: 4,
|
|
79
|
+
cursorOverStyle: "pointer",
|
|
80
|
+
populateText: !0,
|
|
81
|
+
text: "{category}:"
|
|
82
|
+
}), d(s, "fill", e, "primaryButton");
|
|
83
|
+
}
|
|
84
|
+
{
|
|
85
|
+
const s = t("Label", ["breadcrumb"]).states.create("hover", {});
|
|
86
|
+
d(s, "fill", e, "primaryButtonHover");
|
|
87
|
+
}
|
|
88
|
+
{
|
|
89
|
+
const s = t("Label", ["breadcrumb"]).states.create("down", { stateAnimationDuration: 0 });
|
|
90
|
+
d(s, "fill", e, "primaryButtonDown");
|
|
91
|
+
}
|
|
92
|
+
{
|
|
93
|
+
const s = t("Label", ["breadcrumb", "last"]);
|
|
94
|
+
s.setAll({
|
|
95
|
+
populateText: !0,
|
|
96
|
+
text: "{category}",
|
|
97
|
+
fontWeight: "bold",
|
|
98
|
+
cursorOverStyle: "default"
|
|
99
|
+
}), d(s, "fill", e, "primaryButton");
|
|
100
|
+
}
|
|
101
|
+
{
|
|
102
|
+
const s = t("RoundedRectangle", ["breadcrumb", "label", "background"]);
|
|
103
|
+
s.setAll({
|
|
104
|
+
fillOpacity: 0
|
|
105
|
+
}), d(s, "fill", e, "background");
|
|
106
|
+
}
|
|
107
|
+
t("Partition").setAll({
|
|
108
|
+
downDepth: 1,
|
|
109
|
+
upDepth: 0,
|
|
110
|
+
initialDepth: 5
|
|
111
|
+
}), t("HierarchyNode", ["partition"]).setAll({
|
|
112
|
+
setStateOnChildren: !1
|
|
113
|
+
}), t("HierarchyNode", ["partition"]).states.create("hidden", {
|
|
114
|
+
opacity: 1,
|
|
115
|
+
visible: !0
|
|
116
|
+
});
|
|
117
|
+
{
|
|
118
|
+
const s = t("Label", ["partition", "node"]);
|
|
119
|
+
s.setAll({
|
|
120
|
+
x: u,
|
|
121
|
+
y: u,
|
|
122
|
+
centerY: u,
|
|
123
|
+
centerX: u,
|
|
124
|
+
paddingBottom: 1,
|
|
125
|
+
paddingTop: 1,
|
|
126
|
+
paddingLeft: 1,
|
|
127
|
+
paddingRight: 1,
|
|
128
|
+
rotation: 90,
|
|
129
|
+
populateText: !0,
|
|
130
|
+
text: "{category}",
|
|
131
|
+
oversizedBehavior: "fit",
|
|
132
|
+
minScale: 0.4
|
|
133
|
+
}), d(s, "fill", e, "alternativeText");
|
|
134
|
+
}
|
|
135
|
+
t("Label", ["horizontal", "partition", "node"]).setAll({
|
|
136
|
+
rotation: 0
|
|
137
|
+
});
|
|
138
|
+
{
|
|
139
|
+
const s = t("RoundedRectangle", ["partition", "node", "shape"]);
|
|
140
|
+
s.setAll({
|
|
141
|
+
strokeOpacity: 1,
|
|
142
|
+
strokeWidth: 1,
|
|
143
|
+
cornerRadiusBR: 0,
|
|
144
|
+
cornerRadiusTR: 0,
|
|
145
|
+
cornerRadiusBL: 0,
|
|
146
|
+
cornerRadiusTL: 0
|
|
147
|
+
}), d(s, "stroke", e, "background");
|
|
148
|
+
}
|
|
149
|
+
t("RoundedRectangle", ["partition", "node", "shape", "last"]).setAll({
|
|
150
|
+
fillOpacity: 0.75
|
|
151
|
+
}), t("Sunburst").setAll({
|
|
152
|
+
singleBranchOnly: !0
|
|
153
|
+
}), t("HierarchyNode", ["sunburst"]).setAll({
|
|
154
|
+
setStateOnChildren: !1
|
|
155
|
+
}), t("HierarchyNode", ["sunburst"]).states.create("hidden", {
|
|
156
|
+
opacity: 0,
|
|
157
|
+
visible: !1
|
|
158
|
+
});
|
|
159
|
+
{
|
|
160
|
+
const s = t("Slice", ["sunburst", "node", "shape"]);
|
|
161
|
+
s.setAll({
|
|
162
|
+
strokeOpacity: 1,
|
|
163
|
+
strokeWidth: 1,
|
|
164
|
+
cornerRadius: 0
|
|
165
|
+
}), d(s, "stroke", e, "background");
|
|
166
|
+
}
|
|
167
|
+
t("Slice", ["sunburst", "node", "shape", "last"]).setAll({
|
|
168
|
+
fillOpacity: 0.75
|
|
169
|
+
});
|
|
170
|
+
{
|
|
171
|
+
const s = t("RadialLabel", ["sunburst", "node"]);
|
|
172
|
+
s.setAll({
|
|
173
|
+
x: 0,
|
|
174
|
+
y: 0,
|
|
175
|
+
textType: "radial",
|
|
176
|
+
paddingBottom: 1,
|
|
177
|
+
paddingTop: 1,
|
|
178
|
+
paddingLeft: 1,
|
|
179
|
+
paddingRight: 1,
|
|
180
|
+
centerX: u,
|
|
181
|
+
populateText: !0,
|
|
182
|
+
text: "{category}",
|
|
183
|
+
oversizedBehavior: "fit",
|
|
184
|
+
minScale: 0.4,
|
|
185
|
+
baseRadius: u,
|
|
186
|
+
rotation: 0
|
|
187
|
+
}), d(s, "fill", e, "alternativeText");
|
|
188
|
+
}
|
|
189
|
+
t("ForceDirected").setAll({
|
|
190
|
+
minRadius: v(1),
|
|
191
|
+
maxRadius: v(8),
|
|
192
|
+
initialFrames: 500,
|
|
193
|
+
centerStrength: 0.8,
|
|
194
|
+
manyBodyStrength: -14,
|
|
195
|
+
velocityDecay: 0.5,
|
|
196
|
+
linkWithStrength: 0.5,
|
|
197
|
+
showOnFrame: 10,
|
|
198
|
+
singleBranchOnly: !1,
|
|
199
|
+
upDepth: 1 / 0,
|
|
200
|
+
downDepth: 1,
|
|
201
|
+
initialDepth: 5,
|
|
202
|
+
topDepth: 0
|
|
203
|
+
}), t("Tree").setAll({
|
|
204
|
+
orientation: "vertical",
|
|
205
|
+
paddingLeft: 20,
|
|
206
|
+
paddingRight: 20,
|
|
207
|
+
paddingTop: 20,
|
|
208
|
+
paddingBottom: 20,
|
|
209
|
+
singleBranchOnly: !1,
|
|
210
|
+
upDepth: 1 / 0,
|
|
211
|
+
downDepth: 1,
|
|
212
|
+
initialDepth: 5,
|
|
213
|
+
topDepth: 0
|
|
214
|
+
}), t("Pack").setAll({
|
|
215
|
+
paddingLeft: 20,
|
|
216
|
+
paddingTop: 20,
|
|
217
|
+
paddingBottom: 20,
|
|
218
|
+
paddingRight: 20,
|
|
219
|
+
nodePadding: 0
|
|
220
|
+
});
|
|
221
|
+
{
|
|
222
|
+
const s = t("Label", ["pack", "node"]);
|
|
223
|
+
s.setAll({
|
|
224
|
+
centerY: u,
|
|
225
|
+
centerX: u,
|
|
226
|
+
paddingBottom: 1,
|
|
227
|
+
paddingTop: 1,
|
|
228
|
+
paddingLeft: 1,
|
|
229
|
+
paddingRight: 1,
|
|
230
|
+
populateText: !0,
|
|
231
|
+
text: "{category}",
|
|
232
|
+
oversizedBehavior: "fit",
|
|
233
|
+
minScale: 0.4
|
|
234
|
+
}), d(s, "fill", e, "alternativeText");
|
|
235
|
+
}
|
|
236
|
+
{
|
|
237
|
+
const s = t("Circle", ["pack", "node", "shape"]);
|
|
238
|
+
s.setAll({
|
|
239
|
+
strokeOpacity: 0.5,
|
|
240
|
+
fillOpacity: 0.8,
|
|
241
|
+
strokeWidth: 1
|
|
242
|
+
}), d(s, "stroke", e, "background");
|
|
243
|
+
}
|
|
244
|
+
t("LinkedHierarchyNode").setAll({
|
|
245
|
+
draggable: !0
|
|
246
|
+
}), t("LinkedHierarchyNode").states.create("hidden", { scale: 0, opacity: 0, visible: !1 }), t("Treemap").setAll({
|
|
247
|
+
upDepth: 0,
|
|
248
|
+
layoutAlgorithm: "squarify"
|
|
249
|
+
});
|
|
250
|
+
{
|
|
251
|
+
const s = t("Label", ["treemap", "node"]);
|
|
252
|
+
s.setAll({
|
|
253
|
+
x: u,
|
|
254
|
+
y: u,
|
|
255
|
+
centerY: u,
|
|
256
|
+
centerX: u,
|
|
257
|
+
paddingBottom: 1,
|
|
258
|
+
paddingTop: 1,
|
|
259
|
+
paddingLeft: 1,
|
|
260
|
+
paddingRight: 1,
|
|
261
|
+
populateText: !0,
|
|
262
|
+
text: "{category}",
|
|
263
|
+
oversizedBehavior: "fit",
|
|
264
|
+
minScale: 0.4
|
|
265
|
+
}), d(s, "fill", e, "alternativeText");
|
|
266
|
+
}
|
|
267
|
+
t("HierarchyNode", ["treemap", "node"]).setAll({
|
|
268
|
+
tooltipY: v(40),
|
|
269
|
+
isMeasured: !1,
|
|
270
|
+
position: "absolute",
|
|
271
|
+
cursorOverStyle: "pointer"
|
|
272
|
+
}), t("HierarchyNode", ["treemap", "node", "last"]).setAll({
|
|
273
|
+
cursorOverStyle: "default"
|
|
274
|
+
});
|
|
275
|
+
{
|
|
276
|
+
const s = t("RoundedRectangle", ["treemap", "node", "shape"]);
|
|
277
|
+
s.setAll({
|
|
278
|
+
strokeOpacity: 1,
|
|
279
|
+
strokeWidth: 1,
|
|
280
|
+
cornerRadiusBR: 0,
|
|
281
|
+
cornerRadiusTR: 0,
|
|
282
|
+
cornerRadiusBL: 0,
|
|
283
|
+
cornerRadiusTL: 0,
|
|
284
|
+
fillOpacity: 1
|
|
285
|
+
}), d(s, "stroke", e, "background");
|
|
286
|
+
}
|
|
287
|
+
t("VoronoiTreemap").setAll({
|
|
288
|
+
type: "polygon",
|
|
289
|
+
minWeightRatio: 5e-3,
|
|
290
|
+
convergenceRatio: 5e-3,
|
|
291
|
+
maxIterationCount: 100,
|
|
292
|
+
singleBranchOnly: !0
|
|
293
|
+
});
|
|
294
|
+
{
|
|
295
|
+
const s = t("Graphics", ["voronoitreemap", "node", "shape"]);
|
|
296
|
+
s.setAll({
|
|
297
|
+
strokeOpacity: 1,
|
|
298
|
+
strokeWidth: 1,
|
|
299
|
+
fillOpacity: 1
|
|
300
|
+
}), d(s, "stroke", e, "background");
|
|
301
|
+
}
|
|
302
|
+
t("Polygon", ["hierarchy", "node", "shape", "depth1"]).setAll({
|
|
303
|
+
strokeWidth: 3
|
|
304
|
+
});
|
|
305
|
+
{
|
|
306
|
+
const s = t("Label", ["voronoitreemap"]);
|
|
307
|
+
s.setAll({
|
|
308
|
+
centerY: u,
|
|
309
|
+
centerX: u,
|
|
310
|
+
paddingBottom: 1,
|
|
311
|
+
paddingTop: 1,
|
|
312
|
+
paddingLeft: 1,
|
|
313
|
+
paddingRight: 1,
|
|
314
|
+
populateText: !0,
|
|
315
|
+
text: "{category}",
|
|
316
|
+
oversizedBehavior: "fit",
|
|
317
|
+
minScale: 0.4,
|
|
318
|
+
layer: 30
|
|
319
|
+
}), d(s, "fill", e, "alternativeText");
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
class b extends _ {
|
|
324
|
+
constructor() {
|
|
325
|
+
super(...arguments), Object.defineProperty(this, "series", {
|
|
326
|
+
enumerable: !0,
|
|
327
|
+
configurable: !0,
|
|
328
|
+
writable: !0,
|
|
329
|
+
value: void 0
|
|
330
|
+
}), Object.defineProperty(this, "_clickDisposer", {
|
|
331
|
+
enumerable: !0,
|
|
332
|
+
configurable: !0,
|
|
333
|
+
writable: !0,
|
|
334
|
+
value: void 0
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
_afterNew() {
|
|
338
|
+
super._afterNew(), this.states.create("disabled", {}), this.states.create("hover", {}), this.states.create("hoverDisabled", {}), this.on("disabled", () => {
|
|
339
|
+
const e = this.dataItem;
|
|
340
|
+
if (!e.get("children")) {
|
|
341
|
+
this.set("disabled", !0);
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
const i = this.get("disabled"), t = this.series;
|
|
345
|
+
e && t && e.get("disabled") != i && (i ? t.disableDataItem(e) : t.enableDataItem(e, t.get("downDepth", 1), 0));
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
_changed() {
|
|
349
|
+
super._changed(), this.isDirty("toggleKey") && (this.get("toggleKey") == "disabled" ? this._clickDisposer = this.events.on("click", () => {
|
|
350
|
+
if (!this._isDragging) {
|
|
351
|
+
let i = this.series;
|
|
352
|
+
i && i.selectDataItem(this.dataItem);
|
|
353
|
+
}
|
|
354
|
+
}) : this._clickDisposer && this._clickDisposer.dispose());
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
Object.defineProperty(b, "className", {
|
|
358
|
+
enumerable: !0,
|
|
359
|
+
configurable: !0,
|
|
360
|
+
writable: !0,
|
|
361
|
+
value: "HierarchyNode"
|
|
362
|
+
});
|
|
363
|
+
Object.defineProperty(b, "classNames", {
|
|
364
|
+
enumerable: !0,
|
|
365
|
+
configurable: !0,
|
|
366
|
+
writable: !0,
|
|
367
|
+
value: _.classNames.concat([b.className])
|
|
368
|
+
});
|
|
369
|
+
function W(a) {
|
|
370
|
+
var e = 0, i = a.children, t = i && i.length;
|
|
371
|
+
if (!t) e = 1;
|
|
372
|
+
else for (; --t >= 0; ) e += i[t].value;
|
|
373
|
+
a.value = e;
|
|
374
|
+
}
|
|
375
|
+
function z() {
|
|
376
|
+
return this.eachAfter(W);
|
|
377
|
+
}
|
|
378
|
+
function V(a, e) {
|
|
379
|
+
let i = -1;
|
|
380
|
+
for (const t of this)
|
|
381
|
+
a.call(e, t, ++i, this);
|
|
382
|
+
return this;
|
|
383
|
+
}
|
|
384
|
+
function M(a, e) {
|
|
385
|
+
for (var i = this, t = [i], s, r, n = -1; i = t.pop(); )
|
|
386
|
+
if (a.call(e, i, ++n, this), s = i.children)
|
|
387
|
+
for (r = s.length - 1; r >= 0; --r)
|
|
388
|
+
t.push(s[r]);
|
|
389
|
+
return this;
|
|
390
|
+
}
|
|
391
|
+
function F(a, e) {
|
|
392
|
+
for (var i = this, t = [i], s = [], r, n, l, o = -1; i = t.pop(); )
|
|
393
|
+
if (s.push(i), r = i.children)
|
|
394
|
+
for (n = 0, l = r.length; n < l; ++n)
|
|
395
|
+
t.push(r[n]);
|
|
396
|
+
for (; i = s.pop(); )
|
|
397
|
+
a.call(e, i, ++o, this);
|
|
398
|
+
return this;
|
|
399
|
+
}
|
|
400
|
+
function K(a, e) {
|
|
401
|
+
let i = -1;
|
|
402
|
+
for (const t of this)
|
|
403
|
+
if (a.call(e, t, ++i, this))
|
|
404
|
+
return t;
|
|
405
|
+
}
|
|
406
|
+
function Y(a) {
|
|
407
|
+
return this.eachAfter(function(e) {
|
|
408
|
+
for (var i = +a(e.data) || 0, t = e.children, s = t && t.length; --s >= 0; ) i += t[s].value;
|
|
409
|
+
e.value = i;
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
function X(a) {
|
|
413
|
+
return this.eachBefore(function(e) {
|
|
414
|
+
e.children && e.children.sort(a);
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
function E(a) {
|
|
418
|
+
for (var e = this, i = q(e, a), t = [e]; e !== i; )
|
|
419
|
+
e = e.parent, t.push(e);
|
|
420
|
+
for (var s = t.length; a !== i; )
|
|
421
|
+
t.splice(s, 0, a), a = a.parent;
|
|
422
|
+
return t;
|
|
423
|
+
}
|
|
424
|
+
function q(a, e) {
|
|
425
|
+
if (a === e) return a;
|
|
426
|
+
var i = a.ancestors(), t = e.ancestors(), s = null;
|
|
427
|
+
for (a = i.pop(), e = t.pop(); a === e; )
|
|
428
|
+
s = a, a = i.pop(), e = t.pop();
|
|
429
|
+
return s;
|
|
430
|
+
}
|
|
431
|
+
function G() {
|
|
432
|
+
for (var a = this, e = [a]; a = a.parent; )
|
|
433
|
+
e.push(a);
|
|
434
|
+
return e;
|
|
435
|
+
}
|
|
436
|
+
function J() {
|
|
437
|
+
return Array.from(this);
|
|
438
|
+
}
|
|
439
|
+
function Q() {
|
|
440
|
+
var a = [];
|
|
441
|
+
return this.eachBefore(function(e) {
|
|
442
|
+
e.children || a.push(e);
|
|
443
|
+
}), a;
|
|
444
|
+
}
|
|
445
|
+
function U() {
|
|
446
|
+
var a = this, e = [];
|
|
447
|
+
return a.each(function(i) {
|
|
448
|
+
i !== a && e.push({ source: i.parent, target: i });
|
|
449
|
+
}), e;
|
|
450
|
+
}
|
|
451
|
+
function* Z() {
|
|
452
|
+
var a = this, e, i = [a], t, s, r;
|
|
453
|
+
do
|
|
454
|
+
for (e = i.reverse(), i = []; a = e.pop(); )
|
|
455
|
+
if (yield a, t = a.children)
|
|
456
|
+
for (s = 0, r = t.length; s < r; ++s)
|
|
457
|
+
i.push(t[s]);
|
|
458
|
+
while (i.length);
|
|
459
|
+
}
|
|
460
|
+
function w(a, e) {
|
|
461
|
+
a instanceof Map ? (a = [void 0, a], e === void 0 && (e = te)) : e === void 0 && (e = ee);
|
|
462
|
+
for (var i = new y(a), t, s = [i], r, n, l, o; t = s.pop(); )
|
|
463
|
+
if ((n = e(t.data)) && (o = (n = Array.from(n)).length))
|
|
464
|
+
for (t.children = n, l = o - 1; l >= 0; --l)
|
|
465
|
+
s.push(r = n[l] = new y(n[l])), r.parent = t, r.depth = t.depth + 1;
|
|
466
|
+
return i.eachBefore(se);
|
|
467
|
+
}
|
|
468
|
+
function $() {
|
|
469
|
+
return w(this).eachBefore(ie);
|
|
470
|
+
}
|
|
471
|
+
function ee(a) {
|
|
472
|
+
return a.children;
|
|
473
|
+
}
|
|
474
|
+
function te(a) {
|
|
475
|
+
return Array.isArray(a) ? a[1] : null;
|
|
476
|
+
}
|
|
477
|
+
function ie(a) {
|
|
478
|
+
a.data.value !== void 0 && (a.value = a.data.value), a.data = a.data.data;
|
|
479
|
+
}
|
|
480
|
+
function se(a) {
|
|
481
|
+
var e = 0;
|
|
482
|
+
do
|
|
483
|
+
a.height = e;
|
|
484
|
+
while ((a = a.parent) && a.height < ++e);
|
|
485
|
+
}
|
|
486
|
+
function y(a) {
|
|
487
|
+
this.data = a, this.depth = this.height = 0, this.parent = null;
|
|
488
|
+
}
|
|
489
|
+
y.prototype = w.prototype = {
|
|
490
|
+
constructor: y,
|
|
491
|
+
count: z,
|
|
492
|
+
each: V,
|
|
493
|
+
eachAfter: F,
|
|
494
|
+
eachBefore: M,
|
|
495
|
+
find: K,
|
|
496
|
+
sum: Y,
|
|
497
|
+
sort: X,
|
|
498
|
+
path: E,
|
|
499
|
+
ancestors: G,
|
|
500
|
+
descendants: J,
|
|
501
|
+
leaves: Q,
|
|
502
|
+
links: U,
|
|
503
|
+
copy: $,
|
|
504
|
+
[Symbol.iterator]: Z
|
|
505
|
+
};
|
|
506
|
+
class D extends P {
|
|
507
|
+
constructor() {
|
|
508
|
+
super(...arguments), Object.defineProperty(this, "nodesContainer", {
|
|
509
|
+
enumerable: !0,
|
|
510
|
+
configurable: !0,
|
|
511
|
+
writable: !0,
|
|
512
|
+
value: this.children.push(_.new(this._root, { isMeasured: !1 }))
|
|
513
|
+
}), Object.defineProperty(this, "_rootNode", {
|
|
514
|
+
enumerable: !0,
|
|
515
|
+
configurable: !0,
|
|
516
|
+
writable: !0,
|
|
517
|
+
value: void 0
|
|
518
|
+
}), Object.defineProperty(this, "_treeData", {
|
|
519
|
+
enumerable: !0,
|
|
520
|
+
configurable: !0,
|
|
521
|
+
writable: !0,
|
|
522
|
+
value: void 0
|
|
523
|
+
}), Object.defineProperty(this, "_index", {
|
|
524
|
+
enumerable: !0,
|
|
525
|
+
configurable: !0,
|
|
526
|
+
writable: !0,
|
|
527
|
+
value: 0
|
|
528
|
+
}), Object.defineProperty(this, "_tag", {
|
|
529
|
+
enumerable: !0,
|
|
530
|
+
configurable: !0,
|
|
531
|
+
writable: !0,
|
|
532
|
+
value: "hierarchy"
|
|
533
|
+
}), Object.defineProperty(this, "nodes", {
|
|
534
|
+
enumerable: !0,
|
|
535
|
+
configurable: !0,
|
|
536
|
+
writable: !0,
|
|
537
|
+
value: this.addDisposer(new B(O.new({}), () => b.new(this._root, {
|
|
538
|
+
themeTags: R(this.nodes.template.get("themeTags", []), [this._tag, "hierarchy", "node"])
|
|
539
|
+
}, this.nodes.template)))
|
|
540
|
+
}), Object.defineProperty(this, "labels", {
|
|
541
|
+
enumerable: !0,
|
|
542
|
+
configurable: !0,
|
|
543
|
+
writable: !0,
|
|
544
|
+
value: this.addDisposer(new B(O.new({}), () => j.new(this._root, {
|
|
545
|
+
themeTags: R(this.labels.template.get("themeTags", []), [this._tag])
|
|
546
|
+
}, this.labels.template)))
|
|
547
|
+
}), Object.defineProperty(this, "_currentDownDepth", {
|
|
548
|
+
enumerable: !0,
|
|
549
|
+
configurable: !0,
|
|
550
|
+
writable: !0,
|
|
551
|
+
value: void 0
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* @ignore
|
|
556
|
+
*/
|
|
557
|
+
makeNode(e) {
|
|
558
|
+
const i = e.get("childData"), t = this.nodes.make();
|
|
559
|
+
t.series = this, t._setDataItem(e), this.nodes.push(t), e.setRaw("node", t);
|
|
560
|
+
const s = this.labels.make();
|
|
561
|
+
s._setDataItem(e), e.setRaw("label", s), this.labels.push(s), (!i || i.length == 0) && t.addTag("last");
|
|
562
|
+
const r = e.get("depth");
|
|
563
|
+
return t.addTag("depth" + r), this.nodesContainer.children.push(t), t.children.push(s), t;
|
|
564
|
+
}
|
|
565
|
+
_afterNew() {
|
|
566
|
+
this._defaultThemes.push(I.new(this._root)), this.fields.push("category", "childData", "disabled", "fill"), this.children.push(this.bulletsContainer), super._afterNew();
|
|
567
|
+
}
|
|
568
|
+
_prepareChildren() {
|
|
569
|
+
if (super._prepareChildren(), this._valuesDirty) {
|
|
570
|
+
this._treeData = {};
|
|
571
|
+
const e = this.dataItems[0];
|
|
572
|
+
if (e && (this._makeHierarchyData(this._treeData, e), this._index = 0, this._rootNode = w(this._treeData), this._rootNode)) {
|
|
573
|
+
this._rootNode.sum((t) => t.value);
|
|
574
|
+
const i = this.get("sort");
|
|
575
|
+
i == "descending" ? this._rootNode.sort((t, s) => s.value - t.value) : i == "ascending" && this._rootNode.sort((t, s) => t.value - s.value), this.setPrivateRaw("valueLow", 1 / 0), this.setPrivateRaw("valueHigh", -1 / 0), this.setPrivateRaw("maxDepth", 0), this._updateValues(this._rootNode);
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
if ((this._valuesDirty || this._sizeDirty) && this._updateVisuals(), this._sizeDirty) {
|
|
579
|
+
const e = this.get("selectedDataItem");
|
|
580
|
+
e && this._zoom(e);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
_changed() {
|
|
584
|
+
super._changed(), this.isDirty("selectedDataItem") && this._selectDataItem(this.get("selectedDataItem"));
|
|
585
|
+
}
|
|
586
|
+
_updateVisuals() {
|
|
587
|
+
this._rootNode && this._updateNodes(this._rootNode);
|
|
588
|
+
}
|
|
589
|
+
_updateNodes(e) {
|
|
590
|
+
const i = e.data.dataItem;
|
|
591
|
+
if (i) {
|
|
592
|
+
this._updateNode(i), this.bullets.length > 0 && !i.bullets && this._makeBullets(i);
|
|
593
|
+
const t = e.children;
|
|
594
|
+
t && p(t, (s) => {
|
|
595
|
+
this._updateNodes(s);
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
_updateNode(e) {
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Looks up and returns a data item by its ID.
|
|
603
|
+
*
|
|
604
|
+
* @param id ID
|
|
605
|
+
* @return Data item
|
|
606
|
+
*/
|
|
607
|
+
getDataItemById(e) {
|
|
608
|
+
return this._getDataItemById(this.dataItems, e);
|
|
609
|
+
}
|
|
610
|
+
_getDataItemById(e, i) {
|
|
611
|
+
let t;
|
|
612
|
+
return p(e, (s) => {
|
|
613
|
+
s.get("id") == i && (t = s);
|
|
614
|
+
const r = s.get("children");
|
|
615
|
+
if (r) {
|
|
616
|
+
let n = this._getDataItemById(r, i);
|
|
617
|
+
n && (t = n);
|
|
618
|
+
}
|
|
619
|
+
}), t;
|
|
620
|
+
}
|
|
621
|
+
_handleBullets(e) {
|
|
622
|
+
p(e, (i) => {
|
|
623
|
+
const t = i.bullets;
|
|
624
|
+
t && (p(t, (r) => {
|
|
625
|
+
r.dispose();
|
|
626
|
+
}), i.bullets = void 0);
|
|
627
|
+
const s = i.get("children");
|
|
628
|
+
s && this._handleBullets(s);
|
|
629
|
+
}), this._updateVisuals();
|
|
630
|
+
}
|
|
631
|
+
_onDataClear() {
|
|
632
|
+
super._onDataClear();
|
|
633
|
+
const e = this.get("colors");
|
|
634
|
+
e && e.reset();
|
|
635
|
+
const i = this.get("patterns");
|
|
636
|
+
i && i.reset();
|
|
637
|
+
}
|
|
638
|
+
processDataItem(e) {
|
|
639
|
+
super.processDataItem(e);
|
|
640
|
+
const i = e.get("childData"), t = this.get("colors"), s = this.get("patterns"), r = this.get("topDepth", 0);
|
|
641
|
+
e.get("parent") || (e.setRaw("depth", 0), t && r == 0 && e.get("fill") == null && (e.setRaw("fill", t.next()), s && e.setRaw("fillPattern", s.next())));
|
|
642
|
+
let n = e.get("depth");
|
|
643
|
+
const l = this.get("initialDepth", 1);
|
|
644
|
+
if (this.makeNode(e), this._processDataItem(e), i) {
|
|
645
|
+
const h = [];
|
|
646
|
+
e.setRaw("children", h), p(i, (g) => {
|
|
647
|
+
const c = new T(this, g, this._makeDataItem(g));
|
|
648
|
+
h.push(c), c.setRaw("parent", e), c.setRaw("depth", n + 1), this.dataItems.length == 1 && n == 0 ? (t && c.get("fill") == null && c.setRaw("fill", t.next()), s && c.get("fillPattern") == null && c.setRaw("fillPattern", s.next())) : (c.get("fill") == null && c.setRaw("fill", e.get("fill")), c.get("fillPattern") == null && c.setRaw("fillPattern", e.get("fillPattern"))), this.processDataItem(c);
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
const o = e.get("children");
|
|
652
|
+
(!o || o.length == 0) && e.get("node").setAll({ toggleKey: void 0 }), e.get("disabled") == null && n >= r + l && this.disableDataItem(e, 0);
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* Adds children data to the target data item.
|
|
656
|
+
*
|
|
657
|
+
* @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/hierarchy-api/#Dynamically_adding_child_nodes} for more info
|
|
658
|
+
* @since 5.4.5
|
|
659
|
+
*/
|
|
660
|
+
addChildData(e, i) {
|
|
661
|
+
const t = e.dataContext, s = this.get("childDataField");
|
|
662
|
+
let r = t[s];
|
|
663
|
+
r ? r.push(...i) : (r = i, t[s] = r);
|
|
664
|
+
let n = e.get("children");
|
|
665
|
+
n || (n = [], e.set("children", n));
|
|
666
|
+
const l = e.get("node");
|
|
667
|
+
l && l.set("toggleKey", this.nodes.template.get("toggleKey", "disabled"));
|
|
668
|
+
let o = e.get("depth");
|
|
669
|
+
p(r, (h) => {
|
|
670
|
+
let g = !1;
|
|
671
|
+
if (S(n, (c) => c.dataContext == h ? (g = !0, !1) : !0), !g) {
|
|
672
|
+
const c = new T(this, h, this._makeDataItem(h));
|
|
673
|
+
if (n.push(c), c.setRaw("parent", e), c.setRaw("depth", o + 1), c.get("fill") == null) {
|
|
674
|
+
let m = e.get("fill");
|
|
675
|
+
if (m == null) {
|
|
676
|
+
const k = this.get("colors");
|
|
677
|
+
k && (m = k.next());
|
|
678
|
+
}
|
|
679
|
+
c.setRaw("fill", m);
|
|
680
|
+
}
|
|
681
|
+
this.processDataItem(c);
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
_processDataItem(e) {
|
|
686
|
+
}
|
|
687
|
+
_updateValues(e) {
|
|
688
|
+
const i = e.data.dataItem;
|
|
689
|
+
if (e.depth > this.getPrivate("maxDepth") && this.setPrivateRaw("maxDepth", e.depth), i) {
|
|
690
|
+
i.setRaw("d3HierarchyNode", e), e.index = this._index, this._index++, this.root.events.once("frameended", () => {
|
|
691
|
+
i.get("node").set("disabled", i.get("disabled"));
|
|
692
|
+
});
|
|
693
|
+
let s = e.data.value, r = e.value;
|
|
694
|
+
if (s != null && (r = s, e.value = r), f(r)) {
|
|
695
|
+
i.setRaw("sum", r), i.setRaw("valuePercentTotal", r / this.dataItems[0].get("sum") * 100);
|
|
696
|
+
let n = 100;
|
|
697
|
+
const l = i.get("parent");
|
|
698
|
+
l && (n = r / l.get("sum") * 100), i.get("label").text.markDirtyText(), i.setRaw("valuePercent", n);
|
|
699
|
+
const o = this.getPrivate("valueLow");
|
|
700
|
+
o != null && o > r && this.setPrivateRaw("valueLow", r);
|
|
701
|
+
const h = this.getPrivate("valueHigh");
|
|
702
|
+
h != null && h < r && this.setPrivateRaw("valueHigh", r);
|
|
703
|
+
}
|
|
704
|
+
this.updateLegendValue(i);
|
|
705
|
+
}
|
|
706
|
+
const t = e.children;
|
|
707
|
+
t && p(t, (s) => {
|
|
708
|
+
this._updateValues(s);
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
_makeHierarchyData(e, i) {
|
|
712
|
+
e.dataItem = i;
|
|
713
|
+
const t = i.get("children");
|
|
714
|
+
if (t) {
|
|
715
|
+
const s = [];
|
|
716
|
+
e.children = s, p(t, (n) => {
|
|
717
|
+
const l = {};
|
|
718
|
+
s.push(l), this._makeHierarchyData(l, n);
|
|
719
|
+
});
|
|
720
|
+
const r = i.get("valueWorking");
|
|
721
|
+
f(r) && (e.value = r);
|
|
722
|
+
} else {
|
|
723
|
+
const s = i.get("valueWorking");
|
|
724
|
+
f(s) && (e.value = s);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* @ignore
|
|
729
|
+
*/
|
|
730
|
+
disposeDataItem(e) {
|
|
731
|
+
super.disposeDataItem(e);
|
|
732
|
+
const i = e.get("node");
|
|
733
|
+
i && (this.nodes.removeValue(i), i.dispose());
|
|
734
|
+
const t = e.get("label");
|
|
735
|
+
t && (this.labels.removeValue(t), t.dispose());
|
|
736
|
+
const s = e.get("children");
|
|
737
|
+
s && p(s, (r) => {
|
|
738
|
+
this.disposeDataItem(r);
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Hides hierarchy's data item.
|
|
743
|
+
*
|
|
744
|
+
* @param dataItem Data item
|
|
745
|
+
* @param duration Animation duration in milliseconds
|
|
746
|
+
* @return Promise
|
|
747
|
+
*/
|
|
748
|
+
hideDataItem(e, i) {
|
|
749
|
+
const t = Object.create(null, {
|
|
750
|
+
hideDataItem: { get: () => super.hideDataItem }
|
|
751
|
+
});
|
|
752
|
+
return A(this, void 0, void 0, function* () {
|
|
753
|
+
const s = [t.hideDataItem.call(this, e, i)], r = this.states.create("hidden", {});
|
|
754
|
+
if (!f(i)) {
|
|
755
|
+
const g = "stateAnimationDuration";
|
|
756
|
+
i = r.get(g, this.get(g, 0));
|
|
757
|
+
}
|
|
758
|
+
const n = "stateAnimationEasing", l = r.get(n, this.get(n)), o = e.get("children");
|
|
759
|
+
(!o || o.length == 0) && f(e.get("value")) && s.push(e.animate({ key: "valueWorking", to: 0, duration: i, easing: l }).waitForStop());
|
|
760
|
+
const h = e.get("node");
|
|
761
|
+
h.hide(), h.hideTooltip(), o && p(o, (g) => {
|
|
762
|
+
s.push(this.hideDataItem(g));
|
|
763
|
+
}), yield Promise.all(s);
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Shows hierarchy's data item.
|
|
768
|
+
*
|
|
769
|
+
* @param dataItem Data item
|
|
770
|
+
* @param duration Animation duration in milliseconds
|
|
771
|
+
* @return Promise
|
|
772
|
+
*/
|
|
773
|
+
showDataItem(e, i) {
|
|
774
|
+
const t = Object.create(null, {
|
|
775
|
+
showDataItem: { get: () => super.showDataItem }
|
|
776
|
+
});
|
|
777
|
+
return A(this, void 0, void 0, function* () {
|
|
778
|
+
const s = [t.showDataItem.call(this, e, i)];
|
|
779
|
+
f(i) || (i = this.get("stateAnimationDuration", 0));
|
|
780
|
+
const r = this.get("stateAnimationEasing"), n = e.get("children");
|
|
781
|
+
(!n || n.length == 0) && f(e.get("value")) && s.push(e.animate({ key: "valueWorking", to: e.get("value"), duration: i, easing: r }).waitForStop()), e.get("node").show(), n && p(n, (o) => {
|
|
782
|
+
s.push(this.showDataItem(o));
|
|
783
|
+
}), yield Promise.all(s);
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* Enables a disabled data item.
|
|
788
|
+
*
|
|
789
|
+
* @param dataItem Target data item
|
|
790
|
+
* @param duration Animation duration in milliseconds
|
|
791
|
+
*/
|
|
792
|
+
enableDataItem(e, i, t, s) {
|
|
793
|
+
t == null && (t = 0), i == null && (i = 1), e.set("disabled", !1), e.get("node").set("disabled", !1), e.isHidden() || e.get("node").show(s);
|
|
794
|
+
const r = this.get("topDepth", 0);
|
|
795
|
+
if (e.get("depth") < r && e.get("node").hide(0), t == 0) {
|
|
796
|
+
const l = this.get("upDepth", 1 / 0);
|
|
797
|
+
let o = e, h = 0;
|
|
798
|
+
for (; o !== void 0; )
|
|
799
|
+
h > l && o.get("node").hide(), o = o.get("parent"), h++;
|
|
800
|
+
}
|
|
801
|
+
let n = e.get("children");
|
|
802
|
+
n && (t < i - 1 ? p(n, (l) => {
|
|
803
|
+
const o = this.get("disabledField");
|
|
804
|
+
o ? l.dataContext[o] != !0 ? this.enableDataItem(l, i, t + 1, s) : this.disableDataItem(l) : this.enableDataItem(l, i, t + 1, s);
|
|
805
|
+
}) : p(n, (l) => {
|
|
806
|
+
l.isHidden() || (l.get("node").show(s), l.get("node").states.applyAnimate("disabled"), l.set("disabled", !0), this.disableDataItem(l));
|
|
807
|
+
}));
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
* Disables a data item.
|
|
811
|
+
*
|
|
812
|
+
* @param dataItem Target data item
|
|
813
|
+
* @param duration Animation duration in milliseconds
|
|
814
|
+
*/
|
|
815
|
+
disableDataItem(e, i) {
|
|
816
|
+
e.set("disabled", !0);
|
|
817
|
+
let t = e.get("children");
|
|
818
|
+
t && p(t, (s) => {
|
|
819
|
+
this.disableDataItem(s, i), s.get("node").hide(i);
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
_selectDataItem(e, i, t) {
|
|
823
|
+
if (e) {
|
|
824
|
+
if (!t) {
|
|
825
|
+
const h = "dataitemselected";
|
|
826
|
+
this.events.dispatch(h, { type: h, target: this, dataItem: e });
|
|
827
|
+
}
|
|
828
|
+
let s = this.getPrivate("maxDepth", 1);
|
|
829
|
+
const r = this.get("topDepth", 0);
|
|
830
|
+
i == null && (i = Math.min(this.get("downDepth", 1), s - e.get("depth")));
|
|
831
|
+
const n = e.get("d3HierarchyNode");
|
|
832
|
+
let l = n.depth;
|
|
833
|
+
this.inited || (i = Math.min(this.get("initialDepth", 1), s - r), i = Math.max(0, i)), this._currentDownDepth = i, l + i > s && (i = s - l), l < r && (i += r - l, l = r);
|
|
834
|
+
const o = e.get("children");
|
|
835
|
+
o && o.length > 0 ? (i > 0 ? this.enableDataItem(e, i) : (e.get("node").show(), p(o, (h) => {
|
|
836
|
+
h.get("node").hide();
|
|
837
|
+
})), n.depth < r && e.get("node").hide(0), this.get("singleBranchOnly") && this._handleSingle(e)) : this.enableDataItem(e, i), this._root.events.once("frameended", () => {
|
|
838
|
+
this._zoom(e);
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
_zoom(e) {
|
|
843
|
+
}
|
|
844
|
+
_handleSingle(e) {
|
|
845
|
+
const i = e.get("parent");
|
|
846
|
+
if (i) {
|
|
847
|
+
const t = i.get("children");
|
|
848
|
+
t && p(t, (s) => {
|
|
849
|
+
s != e && this.disableDataItem(s);
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* Selects specific data item.
|
|
855
|
+
*
|
|
856
|
+
* @param dataItem Target data item
|
|
857
|
+
*/
|
|
858
|
+
selectDataItem(e) {
|
|
859
|
+
const i = e.get("parent"), t = this.getPrivate("maxDepth", 1);
|
|
860
|
+
if (this.get("selectedDataItem") == e)
|
|
861
|
+
if (i)
|
|
862
|
+
this.set("selectedDataItem", i);
|
|
863
|
+
else {
|
|
864
|
+
let s = Math.min(this.get("downDepth", 1), t - e.get("depth"));
|
|
865
|
+
this._currentDownDepth == s && (s = Math.min(this.get("initialDepth", 1), t - this.get("topDepth", 0))), this._selectDataItem(e, s);
|
|
866
|
+
}
|
|
867
|
+
else
|
|
868
|
+
this.set("selectedDataItem", e);
|
|
869
|
+
}
|
|
870
|
+
_makeBullet(e, i, t) {
|
|
871
|
+
const s = super._makeBullet(e, i, t);
|
|
872
|
+
if (s) {
|
|
873
|
+
const r = s.get("sprite"), n = e.get("node");
|
|
874
|
+
r && (n.children.push(r), n.on("width", () => {
|
|
875
|
+
this._positionBullet(s);
|
|
876
|
+
}), n.on("height", () => {
|
|
877
|
+
this._positionBullet(s);
|
|
878
|
+
}));
|
|
879
|
+
}
|
|
880
|
+
return s;
|
|
881
|
+
}
|
|
882
|
+
_positionBullet(e) {
|
|
883
|
+
const i = e.get("sprite");
|
|
884
|
+
if (i) {
|
|
885
|
+
const t = i.dataItem, s = e.get("locationX", 0.5), r = e.get("locationY", 0.5), n = t.get("node");
|
|
886
|
+
i.set("x", n.width() * s), i.set("y", n.height() * r);
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* Triggers hover on a series data item.
|
|
891
|
+
*
|
|
892
|
+
* @since 5.0.7
|
|
893
|
+
* @param dataItem Target data item
|
|
894
|
+
*/
|
|
895
|
+
hoverDataItem(e) {
|
|
896
|
+
const i = e.get("node");
|
|
897
|
+
i && !i.isHidden() && i.hover();
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* Triggers un-hover on a series data item.
|
|
901
|
+
*
|
|
902
|
+
* @since 5.0.7
|
|
903
|
+
* @param dataItem Target data item
|
|
904
|
+
*/
|
|
905
|
+
unhoverDataItem(e) {
|
|
906
|
+
const i = e.get("node");
|
|
907
|
+
i && i.unhover();
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
Object.defineProperty(D, "className", {
|
|
911
|
+
enumerable: !0,
|
|
912
|
+
configurable: !0,
|
|
913
|
+
writable: !0,
|
|
914
|
+
value: "Hierarchy"
|
|
915
|
+
});
|
|
916
|
+
Object.defineProperty(D, "classNames", {
|
|
917
|
+
enumerable: !0,
|
|
918
|
+
configurable: !0,
|
|
919
|
+
writable: !0,
|
|
920
|
+
value: P.classNames.concat([D.className])
|
|
921
|
+
});
|
|
922
|
+
export {
|
|
923
|
+
D as H,
|
|
924
|
+
I as a
|
|
925
|
+
};
|