@hybridcore/ui 1.5.90 → 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 +11 -2
- 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,162 @@
|
|
|
1
|
+
import { R as O, A as R, T as p } from "../../../AnimatedTheme-jnasw6rT.js";
|
|
2
|
+
import { useThemeProps as B, useTheme as I } from "@mui/material";
|
|
3
|
+
import A from "lodash";
|
|
4
|
+
import { useId as M, useRef as z, useEffect as P } from "react";
|
|
5
|
+
import { colorSetFromPalette as E } from "../_common/utils.js";
|
|
6
|
+
import { c as i, p as N, a as F } from "../../../ColorSet-C7vpNXhM.js";
|
|
7
|
+
import { X as V, V as W } from "../../../AxisRenderer-DTyLLA6c.js";
|
|
8
|
+
import { S as q } from "../../../Scrollbar-D86MJyr2.js";
|
|
9
|
+
import { D as H } from "../../../DateAxis-YX3QNIB-.js";
|
|
10
|
+
import { A as X, a as U } from "../../../AxisRendererY-C_ItLPNV.js";
|
|
11
|
+
import { C as _ } from "../../../CategoryAxis-CwnfaGc8.js";
|
|
12
|
+
import { C as $ } from "../../../ColumnSeries-CjgdJ2QL.js";
|
|
13
|
+
import { D as k } from "../../../DataProcessor-CHDO51q4.js";
|
|
14
|
+
import { L as j } from "../../../LineSeries-Uiv5o56b.js";
|
|
15
|
+
import { B as G } from "../../../Bullet-DVczI2TD.js";
|
|
16
|
+
import { C as J } from "../../../Circle-Cy5s-pVc.js";
|
|
17
|
+
import { X as K } from "../../../XYCursor-C8WktvKM.js";
|
|
18
|
+
import { L as Q } from "../../../Legend-Dp_MKfS4.js";
|
|
19
|
+
const ve = (C) => {
|
|
20
|
+
const f = B({ props: C, name: "HCColumnLineMix" }), {
|
|
21
|
+
dimensions: t,
|
|
22
|
+
values: h,
|
|
23
|
+
data: n,
|
|
24
|
+
initDelay: b = 0,
|
|
25
|
+
baseInterval: L,
|
|
26
|
+
colors: g,
|
|
27
|
+
sx: T,
|
|
28
|
+
...Y
|
|
29
|
+
} = f, a = I(), x = `hc-column-line-mix-${M().replace(/:/g, "")}`, d = z(null);
|
|
30
|
+
P(() => {
|
|
31
|
+
let c;
|
|
32
|
+
return c = setTimeout(() => {
|
|
33
|
+
var w, v, y;
|
|
34
|
+
if (t.length < 1) {
|
|
35
|
+
console.error("ColumnLineMix requires at least 1 dimension");
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const e = O.new(x);
|
|
39
|
+
d.current = e, e.setThemes([R.new(e)]), e.interfaceColors.setAll({
|
|
40
|
+
text: i(a.palette.text.primary),
|
|
41
|
+
grid: i(a.palette.divider),
|
|
42
|
+
stroke: i(a.palette.divider)
|
|
43
|
+
});
|
|
44
|
+
const r = e.container.children.push(
|
|
45
|
+
V.new(e, {
|
|
46
|
+
panX: !1,
|
|
47
|
+
panY: !1,
|
|
48
|
+
wheelX: "none",
|
|
49
|
+
wheelY: "none",
|
|
50
|
+
paddingLeft: 0,
|
|
51
|
+
layout: e.verticalLayout
|
|
52
|
+
})
|
|
53
|
+
);
|
|
54
|
+
r.set("colors", E(e, g)), r.get("colors", {}).set("step", 3), r.set(
|
|
55
|
+
"scrollbarX",
|
|
56
|
+
q.new(e, { orientation: "horizontal" })
|
|
57
|
+
);
|
|
58
|
+
let s, l = n;
|
|
59
|
+
t[0].type === "date" ? (l = A.orderBy(n, [t[0].value]), s = r.xAxes.push(
|
|
60
|
+
H.new(e, {
|
|
61
|
+
maxDeviation: 0.1,
|
|
62
|
+
groupData: !1,
|
|
63
|
+
baseInterval: L || { timeUnit: "day", count: 1 },
|
|
64
|
+
renderer: X.new(e, {}),
|
|
65
|
+
tooltip: p.new(e, {})
|
|
66
|
+
})
|
|
67
|
+
), (w = s.get("renderer")) == null || w.grid.template.setAll({
|
|
68
|
+
stroke: i(a.palette.divider),
|
|
69
|
+
strokeOpacity: 1
|
|
70
|
+
})) : (s = r.xAxes.push(
|
|
71
|
+
_.new(e, {
|
|
72
|
+
categoryField: t[0].value,
|
|
73
|
+
renderer: X.new(e, {}),
|
|
74
|
+
tooltip: p.new(e, {})
|
|
75
|
+
})
|
|
76
|
+
), (v = s.get("renderer")) == null || v.grid.template.setAll({
|
|
77
|
+
stroke: i(a.palette.divider),
|
|
78
|
+
strokeOpacity: 1
|
|
79
|
+
}), e.numberFormatter.setAll({
|
|
80
|
+
numberFormat: "#",
|
|
81
|
+
numericFields: ["valueX"]
|
|
82
|
+
}), l = A.orderBy(n, [t[0].value]), s.data.setAll(l));
|
|
83
|
+
const u = r.yAxes.push(
|
|
84
|
+
W.new(e, {
|
|
85
|
+
min: 0,
|
|
86
|
+
extraMax: 0.1,
|
|
87
|
+
renderer: U.new(e, { strokeOpacity: 0.1 })
|
|
88
|
+
})
|
|
89
|
+
);
|
|
90
|
+
(y = u.get("renderer")) == null || y.grid.template.setAll({
|
|
91
|
+
stroke: i(a.palette.divider),
|
|
92
|
+
strokeOpacity: 1
|
|
93
|
+
}), h.forEach((m, S) => {
|
|
94
|
+
if (S === 0) {
|
|
95
|
+
const o = r.series.push(
|
|
96
|
+
$.new(e, {
|
|
97
|
+
name: m.name,
|
|
98
|
+
xAxis: s,
|
|
99
|
+
yAxis: u,
|
|
100
|
+
valueYField: m.dataFieldName,
|
|
101
|
+
...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value },
|
|
102
|
+
tooltip: p.new(e, {
|
|
103
|
+
pointerOrientation: "horizontal",
|
|
104
|
+
labelText: "{name} in {categoryX}: {valueY} {info}"
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
|
+
);
|
|
108
|
+
o.columns.template.setAll({
|
|
109
|
+
tooltipY: N(10),
|
|
110
|
+
templateField: "columnSettings"
|
|
111
|
+
}), t[0].type === "date" && (o.data.processor = k.new(e, {
|
|
112
|
+
dateFormat: "i",
|
|
113
|
+
dateFields: [t[0].value]
|
|
114
|
+
})), o.data.setAll(l), o.appear();
|
|
115
|
+
} else {
|
|
116
|
+
const o = r.series.push(
|
|
117
|
+
j.new(e, {
|
|
118
|
+
name: m.name,
|
|
119
|
+
xAxis: s,
|
|
120
|
+
yAxis: u,
|
|
121
|
+
valueYField: m.dataFieldName,
|
|
122
|
+
...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value },
|
|
123
|
+
tooltip: p.new(e, {
|
|
124
|
+
pointerOrientation: "horizontal",
|
|
125
|
+
labelText: "{name} in {categoryX}: {valueY} {info}"
|
|
126
|
+
})
|
|
127
|
+
})
|
|
128
|
+
);
|
|
129
|
+
o.strokes.template.setAll({
|
|
130
|
+
strokeWidth: 3,
|
|
131
|
+
templateField: "strokeSettings"
|
|
132
|
+
}), t[0].type === "date" && (o.data.processor = k.new(e, {
|
|
133
|
+
dateFormat: "i",
|
|
134
|
+
dateFields: [t[0].value]
|
|
135
|
+
})), o.data.setAll(l), o.bullets.push(function() {
|
|
136
|
+
return G.new(e, {
|
|
137
|
+
sprite: J.new(e, {
|
|
138
|
+
strokeWidth: 3,
|
|
139
|
+
stroke: o.get("stroke"),
|
|
140
|
+
radius: 5,
|
|
141
|
+
fill: e.interfaceColors.get("background")
|
|
142
|
+
})
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}), r.set("cursor", K.new(e, {})), r.children.push(
|
|
147
|
+
Q.new(e, {
|
|
148
|
+
centerX: F,
|
|
149
|
+
x: F
|
|
150
|
+
})
|
|
151
|
+
).data.setAll(r.series.values), r.appear(1e3, 100);
|
|
152
|
+
}, b), () => {
|
|
153
|
+
var e;
|
|
154
|
+
c && clearTimeout(c), (e = d.current) == null || e.dispose(), d.current = null;
|
|
155
|
+
};
|
|
156
|
+
}, [n, t, h, a.palette.mode, g]);
|
|
157
|
+
const D = { ...f };
|
|
158
|
+
return { chartId: x, ownerState: D, sx: T, other: Y };
|
|
159
|
+
};
|
|
160
|
+
export {
|
|
161
|
+
ve as useColumnLineMixLogic
|
|
162
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { styled as t, Box as e } from "@mui/material";
|
|
2
|
+
const n = t(e, {
|
|
3
|
+
name: "HCColumnLineMix",
|
|
4
|
+
slot: "Root",
|
|
5
|
+
shouldForwardProp: (o) => o !== "ownerState"
|
|
6
|
+
})(() => ({
|
|
7
|
+
width: "100%",
|
|
8
|
+
height: "100%"
|
|
9
|
+
}));
|
|
10
|
+
export {
|
|
11
|
+
n as ColumnLineMixRoot
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useDrillDownTreemapLogic as n } from "./logic.js";
|
|
3
|
+
import { DrillDownTreemapRoot as l } from "./styled.js";
|
|
4
|
+
function a(o) {
|
|
5
|
+
const { chartId: e, ownerState: t, sx: i, other: m } = n(o);
|
|
6
|
+
return /* @__PURE__ */ r(l, { ownerState: t, sx: i, ...m, children: /* @__PURE__ */ r("div", { id: e, style: { width: "100%", height: "100%" } }) });
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
a as DrillDownTreemap
|
|
10
|
+
};
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import { C as V, k as X, l as B, L as W, R as E, a as Z, A as $ } from "../../../AnimatedTheme-jnasw6rT.js";
|
|
2
|
+
import { useThemeProps as G, useTheme as J } from "@mui/material";
|
|
3
|
+
import K from "dayjs";
|
|
4
|
+
import Q from "lodash";
|
|
5
|
+
import { useId as U, useRef as ee, useEffect as te } from "react";
|
|
6
|
+
import { colorSetFromPalette as ie } from "../_common/utils.js";
|
|
7
|
+
import { m as I, f as N, e as j, p as C } from "../../../ColorSet-C7vpNXhM.js";
|
|
8
|
+
import { a as ae, H as F } from "../../../Hierarchy-Bihj0S61.js";
|
|
9
|
+
import { R as z } from "../../../RoundedRectangle-CWLi2PXn.js";
|
|
10
|
+
import { r as ne, c as k, a as O } from "../../../constant-BiOGvlZc.js";
|
|
11
|
+
class L extends V {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), Object.defineProperty(this, "labels", {
|
|
14
|
+
enumerable: !0,
|
|
15
|
+
configurable: !0,
|
|
16
|
+
writable: !0,
|
|
17
|
+
value: this.addDisposer(new X(B.new({}), () => W._new(this._root, {
|
|
18
|
+
themeTags: I(this.labels.template.get("themeTags", []), ["label"]),
|
|
19
|
+
background: z.new(this._root, {
|
|
20
|
+
themeTags: ["background"]
|
|
21
|
+
})
|
|
22
|
+
}, [this.labels.template])))
|
|
23
|
+
}), Object.defineProperty(this, "_disposer", {
|
|
24
|
+
enumerable: !0,
|
|
25
|
+
configurable: !0,
|
|
26
|
+
writable: !0,
|
|
27
|
+
value: void 0
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @ignore
|
|
32
|
+
*/
|
|
33
|
+
makeLabel(t) {
|
|
34
|
+
const i = this.labels.make();
|
|
35
|
+
return i._setDataItem(t), i.states.create("hover", {}), i.states.create("down", {}), i.events.on("click", () => {
|
|
36
|
+
const a = this.get("series");
|
|
37
|
+
a && a.selectDataItem(t);
|
|
38
|
+
}), this.labels.push(i), i;
|
|
39
|
+
}
|
|
40
|
+
_afterNew() {
|
|
41
|
+
this._defaultThemes.push(ae.new(this._root)), this._settings.themeTags = I(this._settings.themeTags, ["breadcrumb"]), super._afterNew();
|
|
42
|
+
}
|
|
43
|
+
_changed() {
|
|
44
|
+
if (super._changed(), this.isDirty("series")) {
|
|
45
|
+
const t = this.get("series"), i = this._prevSettings.series;
|
|
46
|
+
t != i ? this._disposer = t.events.on("dataitemselected", (a) => {
|
|
47
|
+
this._handleDataItem(a.dataItem);
|
|
48
|
+
}) : i && this._disposer && this._disposer.dispose(), this._handleDataItem(t.get("selectedDataItem"));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
_handleDataItem(t) {
|
|
52
|
+
if (this.set("minHeight", this.height()), this.children.clear(), this.labels.clear(), t) {
|
|
53
|
+
let i = t;
|
|
54
|
+
for (; i; ) {
|
|
55
|
+
let a = this.makeLabel(i);
|
|
56
|
+
i == t && a.addTag("last"), this.children.moveValue(a, 0), i = i.get("parent");
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
Object.defineProperty(L, "className", {
|
|
62
|
+
enumerable: !0,
|
|
63
|
+
configurable: !0,
|
|
64
|
+
writable: !0,
|
|
65
|
+
value: "BreadcrumbBar"
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(L, "classNames", {
|
|
68
|
+
enumerable: !0,
|
|
69
|
+
configurable: !0,
|
|
70
|
+
writable: !0,
|
|
71
|
+
value: V.classNames.concat([L.className])
|
|
72
|
+
});
|
|
73
|
+
function se(h) {
|
|
74
|
+
h.x0 = Math.round(h.x0), h.y0 = Math.round(h.y0), h.x1 = Math.round(h.x1), h.y1 = Math.round(h.y1);
|
|
75
|
+
}
|
|
76
|
+
function x(h, t, i, a, s) {
|
|
77
|
+
for (var l = h.children, n, g = -1, b = l.length, m = h.value && (a - t) / h.value; ++g < b; )
|
|
78
|
+
n = l[g], n.y0 = i, n.y1 = s, n.x0 = t, n.x1 = t += n.value * m;
|
|
79
|
+
}
|
|
80
|
+
function A(h, t, i, a, s) {
|
|
81
|
+
for (var l = h.children, n, g = -1, b = l.length, m = h.value && (s - i) / h.value; ++g < b; )
|
|
82
|
+
n = l[g], n.x0 = t, n.x1 = a, n.y0 = i, n.y1 = i += n.value * m;
|
|
83
|
+
}
|
|
84
|
+
var re = (1 + Math.sqrt(5)) / 2;
|
|
85
|
+
function oe(h, t, i, a, s, l) {
|
|
86
|
+
for (var n = [], g = t.children, b, m, r = 0, p = 0, e = g.length, c, u, o = t.value, d, f, v, P, D, y, w; r < e; ) {
|
|
87
|
+
c = s - i, u = l - a;
|
|
88
|
+
do
|
|
89
|
+
d = g[p++].value;
|
|
90
|
+
while (!d && p < e);
|
|
91
|
+
for (f = v = d, y = Math.max(u / c, c / u) / (o * h), w = d * d * y, D = Math.max(v / w, w / f); p < e; ++p) {
|
|
92
|
+
if (d += m = g[p].value, m < f && (f = m), m > v && (v = m), w = d * d * y, P = Math.max(v / w, w / f), P > D) {
|
|
93
|
+
d -= m;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
D = P;
|
|
97
|
+
}
|
|
98
|
+
n.push(b = { value: d, dice: c < u, children: g.slice(r, p) }), b.dice ? x(b, i, a, s, o ? a += u * d / o : l) : A(b, i, a, o ? i += c * d / o : s, l), o -= d, r = p;
|
|
99
|
+
}
|
|
100
|
+
return n;
|
|
101
|
+
}
|
|
102
|
+
const M = function h(t) {
|
|
103
|
+
function i(a, s, l, n, g) {
|
|
104
|
+
oe(t, a, s, l, n, g);
|
|
105
|
+
}
|
|
106
|
+
return i.ratio = function(a) {
|
|
107
|
+
return h((a = +a) > 1 ? a : 1);
|
|
108
|
+
}, i;
|
|
109
|
+
}(re);
|
|
110
|
+
function q() {
|
|
111
|
+
var h = M, t = !1, i = 1, a = 1, s = [0], l = k, n = k, g = k, b = k, m = k;
|
|
112
|
+
function r(e) {
|
|
113
|
+
return e.x0 = e.y0 = 0, e.x1 = i, e.y1 = a, e.eachBefore(p), s = [0], t && e.eachBefore(se), e;
|
|
114
|
+
}
|
|
115
|
+
function p(e) {
|
|
116
|
+
var c = s[e.depth], u = e.x0 + c, o = e.y0 + c, d = e.x1 - c, f = e.y1 - c;
|
|
117
|
+
d < u && (u = d = (u + d) / 2), f < o && (o = f = (o + f) / 2), e.x0 = u, e.y0 = o, e.x1 = d, e.y1 = f, e.children && (c = s[e.depth + 1] = l(e) / 2, u += m(e) - c, o += n(e) - c, d -= g(e) - c, f -= b(e) - c, d < u && (u = d = (u + d) / 2), f < o && (o = f = (o + f) / 2), h(e, u, o, d, f));
|
|
118
|
+
}
|
|
119
|
+
return r.round = function(e) {
|
|
120
|
+
return arguments.length ? (t = !!e, r) : t;
|
|
121
|
+
}, r.size = function(e) {
|
|
122
|
+
return arguments.length ? (i = +e[0], a = +e[1], r) : [i, a];
|
|
123
|
+
}, r.tile = function(e) {
|
|
124
|
+
return arguments.length ? (h = ne(e), r) : h;
|
|
125
|
+
}, r.padding = function(e) {
|
|
126
|
+
return arguments.length ? r.paddingInner(e).paddingOuter(e) : r.paddingInner();
|
|
127
|
+
}, r.paddingInner = function(e) {
|
|
128
|
+
return arguments.length ? (l = typeof e == "function" ? e : O(+e), r) : l;
|
|
129
|
+
}, r.paddingOuter = function(e) {
|
|
130
|
+
return arguments.length ? r.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e) : r.paddingTop();
|
|
131
|
+
}, r.paddingTop = function(e) {
|
|
132
|
+
return arguments.length ? (n = typeof e == "function" ? e : O(+e), r) : n;
|
|
133
|
+
}, r.paddingRight = function(e) {
|
|
134
|
+
return arguments.length ? (g = typeof e == "function" ? e : O(+e), r) : g;
|
|
135
|
+
}, r.paddingBottom = function(e) {
|
|
136
|
+
return arguments.length ? (b = typeof e == "function" ? e : O(+e), r) : b;
|
|
137
|
+
}, r.paddingLeft = function(e) {
|
|
138
|
+
return arguments.length ? (m = typeof e == "function" ? e : O(+e), r) : m;
|
|
139
|
+
}, r;
|
|
140
|
+
}
|
|
141
|
+
function le(h, t, i, a, s) {
|
|
142
|
+
var l = h.children, n, g = l.length, b, m = new Array(g + 1);
|
|
143
|
+
for (m[0] = b = n = 0; n < g; ++n)
|
|
144
|
+
m[n + 1] = b += l[n].value;
|
|
145
|
+
r(0, g, h.value, t, i, a, s);
|
|
146
|
+
function r(p, e, c, u, o, d, f) {
|
|
147
|
+
if (p >= e - 1) {
|
|
148
|
+
var v = l[p];
|
|
149
|
+
v.x0 = u, v.y0 = o, v.x1 = d, v.y1 = f;
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
for (var P = m[p], D = c / 2 + P, y = p + 1, w = e - 1; y < w; ) {
|
|
153
|
+
var T = y + w >>> 1;
|
|
154
|
+
m[T] < D ? y = T + 1 : w = T;
|
|
155
|
+
}
|
|
156
|
+
D - m[y - 1] < m[y] - D && p + 1 < y && --y;
|
|
157
|
+
var _ = m[y] - P, R = c - _;
|
|
158
|
+
if (d - u > f - o) {
|
|
159
|
+
var H = c ? (u * R + d * _) / c : d;
|
|
160
|
+
r(p, y, _, u, o, H, f), r(y, e, R, H, o, d, f);
|
|
161
|
+
} else {
|
|
162
|
+
var S = c ? (o * R + f * _) / c : f;
|
|
163
|
+
r(p, y, _, u, o, d, S), r(y, e, R, u, S, d, f);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function de(h, t, i, a, s) {
|
|
168
|
+
(h.depth & 1 ? A : x)(h, t, i, a, s);
|
|
169
|
+
}
|
|
170
|
+
class Y extends F {
|
|
171
|
+
constructor() {
|
|
172
|
+
super(...arguments), Object.defineProperty(this, "_tag", {
|
|
173
|
+
enumerable: !0,
|
|
174
|
+
configurable: !0,
|
|
175
|
+
writable: !0,
|
|
176
|
+
value: "treemap"
|
|
177
|
+
}), Object.defineProperty(this, "rectangleTemplate", {
|
|
178
|
+
enumerable: !0,
|
|
179
|
+
configurable: !0,
|
|
180
|
+
writable: !0,
|
|
181
|
+
value: B.new({})
|
|
182
|
+
}), Object.defineProperty(this, "_treemapLayout", {
|
|
183
|
+
enumerable: !0,
|
|
184
|
+
configurable: !0,
|
|
185
|
+
writable: !0,
|
|
186
|
+
value: q().tile(M)
|
|
187
|
+
}), Object.defineProperty(this, "rectangles", {
|
|
188
|
+
enumerable: !0,
|
|
189
|
+
configurable: !0,
|
|
190
|
+
writable: !0,
|
|
191
|
+
value: this.addDisposer(new X(B.new({}), () => z._new(this._root, {
|
|
192
|
+
themeTags: I(this.rectangles.template.get("themeTags", []), [this._tag, "shape"])
|
|
193
|
+
}, [this.rectangles.template])))
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
_afterNew() {
|
|
197
|
+
super._afterNew(), this.setPrivate("scaleX", 1), this.setPrivate("scaleY", 1), this.nodes.template.setPrivate("trustBounds", !0);
|
|
198
|
+
}
|
|
199
|
+
_prepareChildren() {
|
|
200
|
+
if (super._prepareChildren(), this.isDirty("layoutAlgorithm")) {
|
|
201
|
+
let t;
|
|
202
|
+
switch (this.get("layoutAlgorithm")) {
|
|
203
|
+
case "squarify":
|
|
204
|
+
t = M;
|
|
205
|
+
break;
|
|
206
|
+
case "binary":
|
|
207
|
+
t = le;
|
|
208
|
+
break;
|
|
209
|
+
case "slice":
|
|
210
|
+
t = A;
|
|
211
|
+
break;
|
|
212
|
+
case "dice":
|
|
213
|
+
t = x;
|
|
214
|
+
break;
|
|
215
|
+
case "sliceDice":
|
|
216
|
+
t = de;
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
if (t) {
|
|
220
|
+
this._treemapLayout = q().tile(t), this._updateVisuals();
|
|
221
|
+
const i = this.get("selectedDataItem");
|
|
222
|
+
i && this._zoom(i);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
(this.isDirty("nodePaddingRight") || this.isDirty("nodePaddingLeft") || this.isDirty("nodePaddingTop") || this.isDirty("nodePaddingBottom") || this.isDirty("nodePaddingOuter") || this.isDirty("nodePaddingInner")) && this._rootNode && this._updateNodes(this._rootNode), (this.isPrivateDirty("scaleX") || this.isPrivateDirty("scaleY")) && this._rootNode && this._updateNodesScale(this._rootNode);
|
|
226
|
+
}
|
|
227
|
+
_updateVisuals() {
|
|
228
|
+
if (this._rootNode) {
|
|
229
|
+
const t = this._treemapLayout;
|
|
230
|
+
t.size([this.innerWidth(), this.innerHeight()]);
|
|
231
|
+
const i = this.get("nodePaddingLeft"), a = this.get("nodePaddingRight"), s = this.get("nodePaddingTop"), l = this.get("nodePaddingBottom"), n = this.get("nodePaddingInner"), g = this.get("nodePaddingOuter");
|
|
232
|
+
N(i) && t.paddingLeft(i), N(a) && t.paddingRight(a), N(s) && t.paddingTop(s), N(l) && t.paddingBottom(l), N(n) && t.paddingInner(n), N(g) && t.paddingOuter(g), t(this._rootNode), this._updateNodes(this._rootNode);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
_updateNode(t) {
|
|
236
|
+
super._updateNode(t);
|
|
237
|
+
const i = t.get("node"), a = t.get("rectangle"), s = t.get("d3HierarchyNode"), l = this.getPrivate("scaleX", 1), n = this.getPrivate("scaleY", 1), g = s.x0 * l, b = s.x1 * l, m = s.y0 * n, r = s.y1 * n, p = b - g, e = r - m, c = this.get("animationDuration", 0), u = this.get("animationEasing");
|
|
238
|
+
if (i.animate({ key: "x", to: g, duration: c, easing: u }), i.animate({ key: "y", to: m, duration: c, easing: u }), i.animate({ key: "width", to: p, duration: c, easing: u }), i.animate({ key: "height", to: e, duration: c, easing: u }), a) {
|
|
239
|
+
const o = t.get("fill"), d = t.get("fillPattern");
|
|
240
|
+
a.animate({ key: "width", to: p, duration: c, easing: u }), a.animate({ key: "height", to: e, duration: c, easing: u }), a._setDefault("fill", o), a._setDefault("fillPattern", d), a._setDefault("stroke", o);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
_updateNodesScale(t) {
|
|
244
|
+
const i = t.data.dataItem;
|
|
245
|
+
if (i) {
|
|
246
|
+
const a = i.get("node"), s = i.get("rectangle"), l = this.getPrivate("scaleX", 1), n = this.getPrivate("scaleY", 1), g = t.x0 * l, b = t.x1 * l, m = t.y0 * n, r = t.y1 * n, p = b - g, e = r - m;
|
|
247
|
+
a.setAll({ x: g, y: m, width: p, height: e }), s.setAll({ width: p, height: e });
|
|
248
|
+
const c = t.children;
|
|
249
|
+
c && j(c, (u) => {
|
|
250
|
+
this._updateNodesScale(u);
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* @ignore
|
|
256
|
+
*/
|
|
257
|
+
makeNode(t) {
|
|
258
|
+
const i = super.makeNode(t), a = i.children.moveValue(this.rectangles.make(), 0);
|
|
259
|
+
i.setPrivate("tooltipTarget", a), t.setRaw("rectangle", a);
|
|
260
|
+
const s = t.get("label");
|
|
261
|
+
return a.on("width", () => {
|
|
262
|
+
s.setPrivate("maxWidth", a.width());
|
|
263
|
+
}), a.on("height", () => {
|
|
264
|
+
s.setPrivate("maxHeight", a.height());
|
|
265
|
+
}), i;
|
|
266
|
+
}
|
|
267
|
+
_zoom(t) {
|
|
268
|
+
if (this.width() > 0 && this.height() > 0) {
|
|
269
|
+
const i = t.get("d3HierarchyNode"), a = this.get("nodePaddingOuter", 0);
|
|
270
|
+
let s = i.x0 + a, l = i.x1 - a, n = i.y0 + a, g = i.y1 - a, b = (this.innerWidth() - a * 2) / (l - s), m = (this.innerHeight() - a * 2) / (g - n);
|
|
271
|
+
const r = this.get("animationEasing");
|
|
272
|
+
let p = this.get("animationDuration", 0);
|
|
273
|
+
this.inited || (p = 0), this.animatePrivate({ key: "scaleX", to: b, duration: p, easing: r }), this.animatePrivate({ key: "scaleY", to: m, duration: p, easing: r }), this.nodesContainer.animate({ key: "x", to: a - s * b, duration: p, easing: r }), this.nodesContainer.animate({ key: "y", to: a - n * m, duration: p, easing: r });
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
_selectDataItem(t, i, a) {
|
|
277
|
+
if (super._selectDataItem(t, i, a), t) {
|
|
278
|
+
let s = this.get("downDepth", 1) + t.get("depth");
|
|
279
|
+
this.inited || (s = this.get("initialDepth", 1));
|
|
280
|
+
const l = this._getVisibleNodes(t, s);
|
|
281
|
+
this.nodes.each((n) => {
|
|
282
|
+
l.indexOf(n.dataItem) == -1 ? n.setPrivate("focusable", !1) : n.removePrivate("focusable");
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
this._root._invalidateTabindexes();
|
|
286
|
+
}
|
|
287
|
+
_getVisibleNodes(t, i) {
|
|
288
|
+
const a = t.get("children");
|
|
289
|
+
let s = [];
|
|
290
|
+
return a && j(a, (l) => {
|
|
291
|
+
l.get("depth") == i || !l.get("children") ? s.push(l) : s = s.concat(this._getVisibleNodes(l, i));
|
|
292
|
+
}), s;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
Object.defineProperty(Y, "className", {
|
|
296
|
+
enumerable: !0,
|
|
297
|
+
configurable: !0,
|
|
298
|
+
writable: !0,
|
|
299
|
+
value: "Treemap"
|
|
300
|
+
});
|
|
301
|
+
Object.defineProperty(Y, "classNames", {
|
|
302
|
+
enumerable: !0,
|
|
303
|
+
configurable: !0,
|
|
304
|
+
writable: !0,
|
|
305
|
+
value: F.classNames.concat([Y.className])
|
|
306
|
+
});
|
|
307
|
+
const we = (h) => {
|
|
308
|
+
const t = G({ props: h, name: "HCDrillDownTreemap" }), {
|
|
309
|
+
dimensions: i,
|
|
310
|
+
values: a,
|
|
311
|
+
data: s,
|
|
312
|
+
initDelay: l = 0,
|
|
313
|
+
colors: n,
|
|
314
|
+
sx: g,
|
|
315
|
+
...b
|
|
316
|
+
} = t, m = J(), p = `hc-drill-down-treemap-${U().replace(/:/g, "")}`, e = ee(null);
|
|
317
|
+
te(() => {
|
|
318
|
+
let u;
|
|
319
|
+
return u = setTimeout(() => {
|
|
320
|
+
var D;
|
|
321
|
+
if (i.length < 2) {
|
|
322
|
+
console.error("DrillDownTreemap requires at least 2 dimensions");
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
if (a.length < 1) {
|
|
326
|
+
console.error("DrillDownTreemap requires at least 1 value");
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
const o = E.new(p);
|
|
330
|
+
e.current = o;
|
|
331
|
+
const d = Z.new(o);
|
|
332
|
+
d.rule("RoundedRectangle", ["hierarchy", "node", "shape", "depth1"]).setAll({ strokeWidth: 2 }), d.rule("RoundedRectangle", ["hierarchy", "node", "shape", "depth2"]).setAll({ strokeWidth: 1, strokeOpacity: 0.2 }), d.rule("Label", ["node", "depth1"]).setAll({ fontSize: 10 }), d.rule("Label", ["node", "depth2"]).setAll({ fontSize: 10 }), o.setThemes([$.new(o), d]);
|
|
333
|
+
const f = o.container.children.push(
|
|
334
|
+
V.new(o, {
|
|
335
|
+
width: C(100),
|
|
336
|
+
height: C(100),
|
|
337
|
+
layout: o.verticalLayout
|
|
338
|
+
})
|
|
339
|
+
), v = f.children.push(
|
|
340
|
+
Y.new(o, {
|
|
341
|
+
sort: "descending",
|
|
342
|
+
singleBranchOnly: !1,
|
|
343
|
+
downDepth: 1,
|
|
344
|
+
upDepth: 0,
|
|
345
|
+
initialDepth: 1,
|
|
346
|
+
valueField: a[0].dataFieldName,
|
|
347
|
+
categoryField: "name",
|
|
348
|
+
childDataField: "children",
|
|
349
|
+
nodePaddingOuter: 0,
|
|
350
|
+
nodePaddingInner: 0
|
|
351
|
+
})
|
|
352
|
+
);
|
|
353
|
+
v.nodes.template.setPrivate("trustBounds", !0), v.set("colors", ie(o, n)), (D = v.get("colors")) == null || D.set("step", 1), f.children.moveValue(
|
|
354
|
+
L.new(o, { series: v }),
|
|
355
|
+
0
|
|
356
|
+
);
|
|
357
|
+
const P = (y, w, T) => {
|
|
358
|
+
if (y === "date") {
|
|
359
|
+
let _ = "YYYY";
|
|
360
|
+
return w.includes("month") ? _ = "MMM YYYY" : w.includes("day") && (_ = "DD MMM YYYY"), K(T).format(_);
|
|
361
|
+
}
|
|
362
|
+
return T;
|
|
363
|
+
};
|
|
364
|
+
if (i.length > 1) {
|
|
365
|
+
const y = Q.groupBy(s, i[0].value), w = [];
|
|
366
|
+
Object.keys(y).forEach((T) => {
|
|
367
|
+
w.push({
|
|
368
|
+
name: P(i[0].type, i[0].value, T),
|
|
369
|
+
children: y[T].map((_) => ({
|
|
370
|
+
name: P(
|
|
371
|
+
i[1].type,
|
|
372
|
+
i[1].value,
|
|
373
|
+
_[i[1].value]
|
|
374
|
+
),
|
|
375
|
+
[a[0].dataFieldName]: _[a[0].dataFieldName]
|
|
376
|
+
}))
|
|
377
|
+
});
|
|
378
|
+
}), v.data.setAll([{ name: "Home", children: w }]);
|
|
379
|
+
}
|
|
380
|
+
v.set("selectedDataItem", v.dataItems[0]);
|
|
381
|
+
}, l), () => {
|
|
382
|
+
var o;
|
|
383
|
+
u && clearTimeout(u), (o = e.current) == null || o.dispose(), e.current = null;
|
|
384
|
+
};
|
|
385
|
+
}, [s, i, a, m.palette.mode, n]);
|
|
386
|
+
const c = { ...t };
|
|
387
|
+
return { chartId: p, ownerState: c, sx: g, other: b };
|
|
388
|
+
};
|
|
389
|
+
export {
|
|
390
|
+
we as useDrillDownTreemapLogic
|
|
391
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { styled as r, Box as t } from "@mui/material";
|
|
2
|
+
const l = r(t, {
|
|
3
|
+
name: "HCDrillDownTreemap",
|
|
4
|
+
slot: "Root",
|
|
5
|
+
shouldForwardProp: (o) => o !== "ownerState"
|
|
6
|
+
})(() => ({
|
|
7
|
+
width: "100%",
|
|
8
|
+
height: "100%"
|
|
9
|
+
}));
|
|
10
|
+
export {
|
|
11
|
+
l as DrillDownTreemapRoot
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useDrillDownVoronoiTreemapLogic as m } from "./logic.js";
|
|
3
|
+
import { DrillDownVoronoiTreemapRoot as l } from "./styled.js";
|
|
4
|
+
function a(r) {
|
|
5
|
+
const { chartId: i, ownerState: e, sx: t, other: n } = m(r);
|
|
6
|
+
return /* @__PURE__ */ o(l, { ownerState: e, sx: t, ...n, children: /* @__PURE__ */ o("div", { id: i, style: { width: "100%", height: "100%" } }) });
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
a as DrillDownVoronoiTreemap
|
|
10
|
+
};
|