@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,12 @@
|
|
|
1
|
+
import { styled as r, Box as t } from "@mui/material";
|
|
2
|
+
const i = r(t, {
|
|
3
|
+
name: "HCDrillDownVoronoiTreemap",
|
|
4
|
+
slot: "Root",
|
|
5
|
+
shouldForwardProp: (o) => o !== "ownerState"
|
|
6
|
+
})(() => ({
|
|
7
|
+
width: "100%",
|
|
8
|
+
height: "100%"
|
|
9
|
+
}));
|
|
10
|
+
export {
|
|
11
|
+
i as DrillDownVoronoiTreemapRoot
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useHeatmapLogic as a } from "./logic.js";
|
|
3
|
+
import { HeatmapRoot as p } from "./styled.js";
|
|
4
|
+
function d(o) {
|
|
5
|
+
const { chartId: r, ownerState: e, sx: i, other: m } = a(o);
|
|
6
|
+
return /* @__PURE__ */ t(p, { ownerState: e, sx: i, ...m, children: /* @__PURE__ */ t("div", { id: r, style: { width: "100%", height: "100%" } }) });
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
d as Heatmap
|
|
10
|
+
};
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { m as Q, s as Z, C as D, L as $, k as ee, l as te, T as J, R as re, A as ae } from "../../../AnimatedTheme-jnasw6rT.js";
|
|
2
|
+
import { useThemeProps as ie, useTheme as se } from "@mui/material";
|
|
3
|
+
import oe from "dayjs";
|
|
4
|
+
import Y from "lodash";
|
|
5
|
+
import { useId as ne, useRef as le, useEffect as ce } from "react";
|
|
6
|
+
import { colorSetFromPalette as ue } from "../_common/utils.js";
|
|
7
|
+
import { E as K, e as he, f as G, u as F, m as W, b as p, p as H, c as O } from "../../../ColorSet-C7vpNXhM.js";
|
|
8
|
+
import { X as de } from "../../../AxisRenderer-DTyLLA6c.js";
|
|
9
|
+
import { A as me, a as pe } from "../../../AxisRendererY-C_ItLPNV.js";
|
|
10
|
+
import { C as X } from "../../../CategoryAxis-CwnfaGc8.js";
|
|
11
|
+
import { R as fe } from "../../../RoundedRectangle-CWLi2PXn.js";
|
|
12
|
+
import { C as ge } from "../../../ColumnSeries-CjgdJ2QL.js";
|
|
13
|
+
class T extends K {
|
|
14
|
+
_afterNew() {
|
|
15
|
+
super._afterNewApplyThemes();
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @ignore
|
|
19
|
+
*/
|
|
20
|
+
getFill(i) {
|
|
21
|
+
return {
|
|
22
|
+
addColorStop: (s, e) => {
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
_changed() {
|
|
27
|
+
super._changed();
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @ignore
|
|
31
|
+
*/
|
|
32
|
+
getBounds(i) {
|
|
33
|
+
const s = this.get("target");
|
|
34
|
+
if (s) {
|
|
35
|
+
let e = s.globalBounds();
|
|
36
|
+
const r = i.toLocal({ x: e.left, y: e.top }), l = i.toLocal({ x: e.right, y: e.top }), o = i.toLocal({ x: e.right, y: e.bottom }), a = i.toLocal({ x: e.left, y: e.bottom });
|
|
37
|
+
return {
|
|
38
|
+
left: Math.min(r.x, l.x, o.x, a.x),
|
|
39
|
+
top: Math.min(r.y, l.y, o.y, a.y),
|
|
40
|
+
right: Math.max(r.x, l.x, o.x, a.x),
|
|
41
|
+
bottom: Math.max(r.y, l.y, o.y, a.y)
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
return i._display.getLocalBounds();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
Object.defineProperty(T, "className", {
|
|
48
|
+
enumerable: !0,
|
|
49
|
+
configurable: !0,
|
|
50
|
+
writable: !0,
|
|
51
|
+
value: "Gradient"
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(T, "classNames", {
|
|
54
|
+
enumerable: !0,
|
|
55
|
+
configurable: !0,
|
|
56
|
+
writable: !0,
|
|
57
|
+
value: K.classNames.concat([T.className])
|
|
58
|
+
});
|
|
59
|
+
class P extends T {
|
|
60
|
+
/**
|
|
61
|
+
* @ignore
|
|
62
|
+
*/
|
|
63
|
+
getFill(i) {
|
|
64
|
+
const s = this.get("rotation", 0);
|
|
65
|
+
let e = this.getBounds(i), r = e.left || 0, l = e.right || 0, o = e.top || 0, a = e.bottom || 0, m = Q(s), f = Z(s), c = m * (l - r), u = f * (a - o);
|
|
66
|
+
c == 0 && (c = 1), u == 0 && (u = 1);
|
|
67
|
+
let h = Math.max(c, u);
|
|
68
|
+
const g = this._root._renderer.createLinearGradient(r, o, r + h * m, o + h * f), A = this.get("stops");
|
|
69
|
+
if (A) {
|
|
70
|
+
let C = 0;
|
|
71
|
+
he(A, (t) => {
|
|
72
|
+
let d = t.offset;
|
|
73
|
+
G(d) || (d = C / (A.length - 1));
|
|
74
|
+
let v = t.opacity;
|
|
75
|
+
G(v) || (v = 1);
|
|
76
|
+
let n = t.color;
|
|
77
|
+
if (n) {
|
|
78
|
+
const w = t.lighten;
|
|
79
|
+
w && (n = F.lighten(n, w));
|
|
80
|
+
const b = t.brighten;
|
|
81
|
+
b && (n = F.brighten(n, b)), g.addColorStop(d, "rgba(" + n.r + "," + n.g + "," + n.b + "," + v + ")");
|
|
82
|
+
}
|
|
83
|
+
C++;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return g;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
Object.defineProperty(P, "className", {
|
|
90
|
+
enumerable: !0,
|
|
91
|
+
configurable: !0,
|
|
92
|
+
writable: !0,
|
|
93
|
+
value: "LinearGradient"
|
|
94
|
+
});
|
|
95
|
+
Object.defineProperty(P, "classNames", {
|
|
96
|
+
enumerable: !0,
|
|
97
|
+
configurable: !0,
|
|
98
|
+
writable: !0,
|
|
99
|
+
value: T.classNames.concat([P.className])
|
|
100
|
+
});
|
|
101
|
+
class V extends D {
|
|
102
|
+
constructor() {
|
|
103
|
+
super(...arguments), Object.defineProperty(this, "labelContainer", {
|
|
104
|
+
enumerable: !0,
|
|
105
|
+
configurable: !0,
|
|
106
|
+
writable: !0,
|
|
107
|
+
value: this.children.push(D.new(this._root, {}))
|
|
108
|
+
}), Object.defineProperty(this, "markerContainer", {
|
|
109
|
+
enumerable: !0,
|
|
110
|
+
configurable: !0,
|
|
111
|
+
writable: !0,
|
|
112
|
+
value: this.children.push(D.new(this._root, {}))
|
|
113
|
+
}), Object.defineProperty(this, "startLabel", {
|
|
114
|
+
enumerable: !0,
|
|
115
|
+
configurable: !0,
|
|
116
|
+
writable: !0,
|
|
117
|
+
value: this.labelContainer.children.push($.new(this._root, { themeTags: ["start"] }))
|
|
118
|
+
}), Object.defineProperty(this, "endLabel", {
|
|
119
|
+
enumerable: !0,
|
|
120
|
+
configurable: !0,
|
|
121
|
+
writable: !0,
|
|
122
|
+
value: this.labelContainer.children.push($.new(this._root, { themeTags: ["end"] }))
|
|
123
|
+
}), Object.defineProperty(this, "markers", {
|
|
124
|
+
enumerable: !0,
|
|
125
|
+
configurable: !0,
|
|
126
|
+
writable: !0,
|
|
127
|
+
value: this.addDisposer(new ee(te.new({}), () => fe._new(this._root, {
|
|
128
|
+
themeTags: W(this.markers.template.get("themeTags", []), [this.get("orientation"), "heatlegend", "marker"])
|
|
129
|
+
}, [this.markers.template])))
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
_afterNew() {
|
|
133
|
+
this._settings.themeTags = W(this._settings.themeTags, ["heatlegend", this._settings.orientation]), super._afterNew(), this.set("tooltip", J.new(this._root, {
|
|
134
|
+
themeTags: ["heatlegend"]
|
|
135
|
+
}));
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* @ignore
|
|
139
|
+
*/
|
|
140
|
+
makeMarker() {
|
|
141
|
+
const i = this.markers.make();
|
|
142
|
+
return i.states.create("disabled", {}), i;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Moves and shows tooltip at specific value.
|
|
146
|
+
*
|
|
147
|
+
* Can also specify optional text to show in tooltip, as well as the color.
|
|
148
|
+
*
|
|
149
|
+
* @param value Value
|
|
150
|
+
* @param text Text
|
|
151
|
+
* @param color Color
|
|
152
|
+
*/
|
|
153
|
+
showValue(i, s, e) {
|
|
154
|
+
const r = this.getTooltip();
|
|
155
|
+
if (r && G(i)) {
|
|
156
|
+
const l = this.get("startValue", 0), o = this.get("endValue", 1);
|
|
157
|
+
let a = (i - l) / (o - l);
|
|
158
|
+
(a == 1 / 0 || a == -1 / 0 || isNaN(a)) && (a = 0.5);
|
|
159
|
+
const m = this.get("startColor"), f = this.get("endColor");
|
|
160
|
+
s || (s = this.getNumberFormatter().format(i)), e || (e = F.interpolate(a, m, f)), r.label.set("text", s);
|
|
161
|
+
let c;
|
|
162
|
+
this.get("orientation") == "vertical" ? c = this.markerContainer.toGlobal({ x: 0, y: this.innerHeight() * (1 - a) }) : c = this.markerContainer.toGlobal({ x: this.innerWidth() * a, y: 0 });
|
|
163
|
+
let u = r.get("background");
|
|
164
|
+
u && u.set("fill", e), r.set("pointTo", c), r.show();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
_prepareChildren() {
|
|
168
|
+
super._prepareChildren();
|
|
169
|
+
const i = this.labelContainer, s = this.get("orientation"), e = this.startLabel, r = this.endLabel, l = this.getTooltip();
|
|
170
|
+
if (this.isDirty("orientation") && (s == "vertical" ? (this.markerContainer.setAll({ layout: this._root.verticalLayout, height: p }), this.set("layout", this._root.horizontalLayout), e.setAll({ y: p, x: void 0, centerY: p, centerX: p }), r.setAll({ y: 0, x: void 0, centerY: 0, centerX: p }), i.setAll({ height: p, width: void 0 }), l && l.set("pointerOrientation", "horizontal")) : (this.markerContainer.setAll({ layout: this._root.horizontalLayout, width: p }), this.set("layout", this._root.verticalLayout), e.setAll({ x: 0, y: void 0, centerX: 0, centerY: 0 }), r.setAll({ x: p, y: void 0, centerX: p, centerY: 0 }), i.setAll({ width: p, height: void 0 }), l && l.set("pointerOrientation", "vertical"))), this.isDirty("stepCount")) {
|
|
171
|
+
const o = this.get("stepCount", 1), a = this.get("startColor"), m = this.get("endColor"), f = this.get("startOpacity", 1), c = this.get("endOpacity", 1);
|
|
172
|
+
if (this.markerContainer.children.clear(), o > 1)
|
|
173
|
+
for (let u = 0; u < o; u++) {
|
|
174
|
+
const h = this.makeMarker();
|
|
175
|
+
s == "vertical" ? this.markerContainer.children.moveValue(h, 0) : this.markerContainer.children.push(h), a && m && h.setAll({
|
|
176
|
+
fill: F.interpolate(u / o, a, m),
|
|
177
|
+
fillOpacity: H(u / o * 100).interpolate(f, c)
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
else if (o == 1) {
|
|
181
|
+
const u = this.makeMarker();
|
|
182
|
+
this.markerContainer.children.push(u);
|
|
183
|
+
const h = P.new(this._root, {
|
|
184
|
+
stops: [{
|
|
185
|
+
color: a,
|
|
186
|
+
opacity: f
|
|
187
|
+
}, {
|
|
188
|
+
color: m,
|
|
189
|
+
opacity: c
|
|
190
|
+
}]
|
|
191
|
+
});
|
|
192
|
+
if (s == "vertical") {
|
|
193
|
+
h.set("rotation", 90);
|
|
194
|
+
let g = h.get("stops");
|
|
195
|
+
g && g.reverse();
|
|
196
|
+
} else
|
|
197
|
+
h.set("rotation", 0);
|
|
198
|
+
a && m && u.set("fillGradient", h);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
(this.isDirty("startText") || this.isDirty("startValue")) && e.set("text", this.get("startText", this.getNumberFormatter().format(this.get("startValue", 0)))), (this.isDirty("endText") || this.isDirty("endValue")) && r.set("text", this.get("endText", this.getNumberFormatter().format(this.get("endValue", 1))));
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
Object.defineProperty(V, "className", {
|
|
205
|
+
enumerable: !0,
|
|
206
|
+
configurable: !0,
|
|
207
|
+
writable: !0,
|
|
208
|
+
value: "HeatLegend"
|
|
209
|
+
});
|
|
210
|
+
Object.defineProperty(V, "classNames", {
|
|
211
|
+
enumerable: !0,
|
|
212
|
+
configurable: !0,
|
|
213
|
+
writable: !0,
|
|
214
|
+
value: D.classNames.concat([V.className])
|
|
215
|
+
});
|
|
216
|
+
const Ye = (L) => {
|
|
217
|
+
const i = ie({ props: L, name: "HCHeatmap" }), {
|
|
218
|
+
dimensions: s,
|
|
219
|
+
values: e,
|
|
220
|
+
data: r,
|
|
221
|
+
initDelay: l = 0,
|
|
222
|
+
baseInterval: o,
|
|
223
|
+
colors: a,
|
|
224
|
+
sx: m,
|
|
225
|
+
...f
|
|
226
|
+
} = i, c = se(), h = `hc-heatmap-${ne().replace(/:/g, "")}`, g = le(null);
|
|
227
|
+
ce(() => {
|
|
228
|
+
let C;
|
|
229
|
+
return C = setTimeout(() => {
|
|
230
|
+
var I, E;
|
|
231
|
+
if (s.length < 2) {
|
|
232
|
+
console.error("Heatmap requires at least 2 dimensions");
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
if (e.length < 1) {
|
|
236
|
+
console.error("Heatmap requires at least 1 value");
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
const t = re.new(h);
|
|
240
|
+
g.current = t, t.setThemes([ae.new(t)]), t.interfaceColors.setAll({
|
|
241
|
+
text: O(c.palette.text.primary),
|
|
242
|
+
grid: O(c.palette.divider),
|
|
243
|
+
stroke: O(c.palette.divider)
|
|
244
|
+
});
|
|
245
|
+
const d = t.container.children.push(
|
|
246
|
+
de.new(t, {
|
|
247
|
+
panX: !1,
|
|
248
|
+
panY: !1,
|
|
249
|
+
wheelX: "none",
|
|
250
|
+
wheelY: "none",
|
|
251
|
+
layout: t.verticalLayout
|
|
252
|
+
})
|
|
253
|
+
);
|
|
254
|
+
d.set("colors", ue(t, a));
|
|
255
|
+
const v = me.new(t, {
|
|
256
|
+
visible: !1,
|
|
257
|
+
minGridDistance: 30
|
|
258
|
+
});
|
|
259
|
+
v.grid.template.set("visible", !1);
|
|
260
|
+
const n = s[0];
|
|
261
|
+
let w, b = r;
|
|
262
|
+
if (n.type === "date") {
|
|
263
|
+
const y = (o == null ? void 0 : o.timeUnit) || "day";
|
|
264
|
+
let k = "DD/MM/YYYY";
|
|
265
|
+
y === "month" ? k = "MM YYYY" : y === "year" && (k = "YYYY"), w = d.xAxes.push(
|
|
266
|
+
X.new(t, {
|
|
267
|
+
categoryField: n.value,
|
|
268
|
+
renderer: v
|
|
269
|
+
})
|
|
270
|
+
), b = Y.orderBy(r, [n.value]), b = b.map((_) => ({
|
|
271
|
+
..._,
|
|
272
|
+
[n.value]: oe(_[n.value]).format(k)
|
|
273
|
+
}));
|
|
274
|
+
} else
|
|
275
|
+
w = d.xAxes.push(
|
|
276
|
+
X.new(t, {
|
|
277
|
+
categoryField: n.value,
|
|
278
|
+
renderer: v,
|
|
279
|
+
tooltip: J.new(t, {})
|
|
280
|
+
})
|
|
281
|
+
);
|
|
282
|
+
const B = Y.uniqBy(b, n.value);
|
|
283
|
+
if (w.data.setAll(B), e.length === 1 && s.length > 1) {
|
|
284
|
+
const y = s[1].value, k = pe.new(t, {
|
|
285
|
+
visible: !1,
|
|
286
|
+
minGridDistance: 20,
|
|
287
|
+
inversed: !0
|
|
288
|
+
});
|
|
289
|
+
k.grid.template.set("visible", !1);
|
|
290
|
+
const _ = d.yAxes.push(
|
|
291
|
+
X.new(t, {
|
|
292
|
+
maxDeviation: 0,
|
|
293
|
+
renderer: k,
|
|
294
|
+
categoryField: y
|
|
295
|
+
})
|
|
296
|
+
), S = t.interfaceColors.get("background"), j = d.bottomAxesContainer.children.push(
|
|
297
|
+
V.new(t, {
|
|
298
|
+
orientation: "horizontal",
|
|
299
|
+
startColor: S,
|
|
300
|
+
endColor: (I = d.get("colors")) == null ? void 0 : I.getIndex(0),
|
|
301
|
+
startOpacity: 1,
|
|
302
|
+
endOpacity: 1
|
|
303
|
+
})
|
|
304
|
+
), x = d.series.push(
|
|
305
|
+
ge.new(t, {
|
|
306
|
+
calculateAggregates: !0,
|
|
307
|
+
stroke: O(16777215),
|
|
308
|
+
clustered: !1,
|
|
309
|
+
xAxis: w,
|
|
310
|
+
yAxis: _,
|
|
311
|
+
categoryXField: n.value,
|
|
312
|
+
categoryYField: y,
|
|
313
|
+
valueField: e[0].dataFieldName
|
|
314
|
+
})
|
|
315
|
+
);
|
|
316
|
+
x.columns.template.setAll({
|
|
317
|
+
tooltipText: "{categoryY}, {categoryX}: {value}",
|
|
318
|
+
strokeOpacity: 1,
|
|
319
|
+
strokeWidth: 2,
|
|
320
|
+
width: H(100),
|
|
321
|
+
height: H(100)
|
|
322
|
+
}), x.columns.template.events.on("pointerover", function(R) {
|
|
323
|
+
const N = R.target.dataItem;
|
|
324
|
+
N && j.showValue(N.get(y, 0));
|
|
325
|
+
}), x.events.on("datavalidated", function() {
|
|
326
|
+
j.set("startValue", x.getPrivate("valueLow")), j.set("endValue", x.getPrivate("valueHigh"));
|
|
327
|
+
}), x.set("heatRules", [
|
|
328
|
+
{
|
|
329
|
+
target: x.columns.template,
|
|
330
|
+
min: S,
|
|
331
|
+
max: (E = d.get("colors")) == null ? void 0 : E.getIndex(0),
|
|
332
|
+
dataField: "value",
|
|
333
|
+
key: "fill"
|
|
334
|
+
}
|
|
335
|
+
]);
|
|
336
|
+
const q = Y.uniqBy(b, y), M = [];
|
|
337
|
+
B.forEach((R) => {
|
|
338
|
+
q.forEach((N) => {
|
|
339
|
+
const z = {
|
|
340
|
+
[n.value]: R[n.value],
|
|
341
|
+
[y]: N[y]
|
|
342
|
+
}, U = Y.find(b, z);
|
|
343
|
+
U === void 0 ? M.push({
|
|
344
|
+
...z,
|
|
345
|
+
[e[0].dataFieldName]: 0
|
|
346
|
+
}) : M.push(U);
|
|
347
|
+
});
|
|
348
|
+
}), _.data.setAll(q), x.data.setAll(M);
|
|
349
|
+
}
|
|
350
|
+
d.appear(1e3, 100);
|
|
351
|
+
}, l), () => {
|
|
352
|
+
var t;
|
|
353
|
+
C && clearTimeout(C), (t = g.current) == null || t.dispose(), g.current = null;
|
|
354
|
+
};
|
|
355
|
+
}, [r, s, e, c.palette.mode, a]);
|
|
356
|
+
const A = { ...i };
|
|
357
|
+
return { chartId: h, ownerState: A, sx: m, other: f };
|
|
358
|
+
};
|
|
359
|
+
export {
|
|
360
|
+
Ye as useHeatmapLogic
|
|
361
|
+
};
|