@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,32 @@
|
|
|
1
|
+
import { styled as o, Paper as a, Box as t } from "@mui/material";
|
|
2
|
+
const r = o(a, {
|
|
3
|
+
name: "HCHeatMap",
|
|
4
|
+
slot: "Root",
|
|
5
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
6
|
+
})(() => ({
|
|
7
|
+
height: "100%",
|
|
8
|
+
display: "flex",
|
|
9
|
+
flexDirection: "column"
|
|
10
|
+
})), l = o(t, {
|
|
11
|
+
name: "HCHeatMap",
|
|
12
|
+
slot: "Header",
|
|
13
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
14
|
+
})(({ theme: e }) => ({
|
|
15
|
+
flex: "0 0 auto",
|
|
16
|
+
padding: e.spacing(1.25, 2)
|
|
17
|
+
})), p = o(t, {
|
|
18
|
+
name: "HCHeatMap",
|
|
19
|
+
slot: "Content",
|
|
20
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
21
|
+
})(() => ({
|
|
22
|
+
position: "relative",
|
|
23
|
+
display: "flex",
|
|
24
|
+
flexDirection: "column",
|
|
25
|
+
flex: "1 1 auto",
|
|
26
|
+
minHeight: 0
|
|
27
|
+
}));
|
|
28
|
+
export {
|
|
29
|
+
p as HeatMapContent,
|
|
30
|
+
l as HeatMapHeader,
|
|
31
|
+
r as HeatMapRoot
|
|
32
|
+
};
|
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useIconButtonLogic as m } from "./logic.js";
|
|
3
|
+
import { VerticalRoot as l, MiniRoot as u, DefaultRoot as f } from "./styled.js";
|
|
4
|
+
const x = (i) => {
|
|
5
|
+
const { state: e } = m(i), { ownerState: t, variant: c } = e, { startIcon: a, children: o, variant: v, ...r } = i;
|
|
6
|
+
if (c === "vertical")
|
|
7
|
+
return /* @__PURE__ */ n(l, { ownerState: t, ...r, children: o });
|
|
8
|
+
if (c === "mini") {
|
|
9
|
+
const { color: R, ...s } = r;
|
|
10
|
+
return /* @__PURE__ */ n(
|
|
11
|
+
u,
|
|
12
|
+
{
|
|
13
|
+
ownerState: t,
|
|
14
|
+
color: "inherit",
|
|
15
|
+
startIcon: a,
|
|
16
|
+
...s,
|
|
17
|
+
children: o
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
return /* @__PURE__ */ n(f, { ownerState: t, ...r, children: o });
|
|
15
22
|
};
|
|
16
23
|
export {
|
|
17
|
-
|
|
24
|
+
x as IconButton
|
|
18
25
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useThemeProps as s } from "@mui/material";
|
|
2
|
+
const c = (n) => {
|
|
3
|
+
const t = s({ props: n, name: "HCIconButton" }), { variant: o = "default" } = t, e = {
|
|
4
|
+
...t,
|
|
5
|
+
variant: o
|
|
6
|
+
};
|
|
7
|
+
return {
|
|
8
|
+
refs: {},
|
|
9
|
+
state: { ownerState: e, variant: o },
|
|
10
|
+
actions: {}
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
c as useIconButtonLogic
|
|
15
|
+
};
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import { styled as
|
|
2
|
-
const
|
|
1
|
+
import { styled as i, IconButton as r, ButtonBase as a, Button as l } from "@mui/material";
|
|
2
|
+
const n = (o) => o !== "ownerState", c = i(r, {
|
|
3
|
+
name: "HCIconButton",
|
|
4
|
+
slot: "root",
|
|
5
|
+
shouldForwardProp: n
|
|
6
|
+
})({}), s = i(a, {
|
|
7
|
+
name: "HCIconButton",
|
|
8
|
+
slot: "verticalRoot",
|
|
9
|
+
shouldForwardProp: n
|
|
10
|
+
})(({ ownerState: o, theme: t }) => ({
|
|
3
11
|
position: "relative",
|
|
4
12
|
display: "flex",
|
|
5
13
|
flexDirection: "column",
|
|
6
14
|
width: 130,
|
|
7
15
|
height: 140,
|
|
8
|
-
color:
|
|
16
|
+
color: o.color ? t.palette.text.primary : "inherit",
|
|
9
17
|
borderRadius: 10,
|
|
10
18
|
transition: "all .3s",
|
|
11
19
|
"&:after": {
|
|
@@ -15,15 +23,14 @@ const r = o(n)(({ theme: t, color: i }) => ({
|
|
|
15
23
|
left: 30,
|
|
16
24
|
right: 30,
|
|
17
25
|
height: 2,
|
|
18
|
-
|
|
19
|
-
backgroundColor: i ? t.palette[i].dark : "inherit",
|
|
26
|
+
backgroundColor: o.color && o.color !== "inherit" && o.color !== "default" ? t.palette[o.color].dark : "inherit",
|
|
20
27
|
borderRadius: 2,
|
|
21
28
|
opacity: 0,
|
|
22
29
|
transition: "all .3s"
|
|
23
30
|
},
|
|
24
31
|
"&:hover": {
|
|
25
32
|
boxShadow: t.shadows[4],
|
|
26
|
-
color:
|
|
33
|
+
color: o.color ? t.palette.text.primary : "inherit",
|
|
27
34
|
"&:after": {
|
|
28
35
|
opacity: 1
|
|
29
36
|
}
|
|
@@ -31,11 +38,15 @@ const r = o(n)(({ theme: t, color: i }) => ({
|
|
|
31
38
|
"& .MuiSvgIcon-root": {
|
|
32
39
|
fontSize: 50
|
|
33
40
|
}
|
|
34
|
-
})),
|
|
41
|
+
})), d = i(l, {
|
|
42
|
+
name: "HCIconButton",
|
|
43
|
+
slot: "miniRoot",
|
|
44
|
+
shouldForwardProp: n
|
|
45
|
+
})(({ theme: o }) => ({
|
|
35
46
|
fontSize: 10,
|
|
36
47
|
padding: "2px 6px",
|
|
37
48
|
minWidth: "auto",
|
|
38
|
-
boxShadow:
|
|
49
|
+
boxShadow: o.shadows[1],
|
|
39
50
|
"& .MuiButton-startIcon": {
|
|
40
51
|
marginRight: 0.25,
|
|
41
52
|
"& > :nth-of-type(1)": {
|
|
@@ -44,6 +55,7 @@ const r = o(n)(({ theme: t, color: i }) => ({
|
|
|
44
55
|
}
|
|
45
56
|
}));
|
|
46
57
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
58
|
+
c as DefaultRoot,
|
|
59
|
+
d as MiniRoot,
|
|
60
|
+
s as VerticalRoot
|
|
49
61
|
};
|
|
@@ -6,7 +6,7 @@ import "lodash";
|
|
|
6
6
|
import "react";
|
|
7
7
|
import "../../../../hooks/useToggle.js";
|
|
8
8
|
import "../../../conditional-wrapper/index.js";
|
|
9
|
-
import { C as s } from "../../../../index-
|
|
9
|
+
import { C as s } from "../../../../index-CcdvNlgr.js";
|
|
10
10
|
import "./styled.js";
|
|
11
11
|
export {
|
|
12
12
|
s as default
|
package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs as io, jsx as Ii } from "react/jsx-runtime";
|
|
2
|
-
import { c as Ne, a as na
|
|
3
|
-
import
|
|
2
|
+
import { c as Ne, a as na } from "../../../../../../_commonjsHelpers-BVfed4GL.js";
|
|
3
|
+
import qi, { useState as ro } from "react";
|
|
4
|
+
import { p as er } from "../../../../../../index-C__OZmYy.js";
|
|
4
5
|
import { Alert as ia, AlertTitle as ra, Box as oa } from "@mui/material";
|
|
5
6
|
import { FlexCol as sa } from "../../../../../flex-col/index.js";
|
|
6
7
|
var Bi = { exports: {} }, Po = {}, gt = {}, vn = {}, Bn = {}, me = {}, zn = {};
|
|
@@ -18527,7 +18528,7 @@ var Cu = Ne && Ne.__extends || /* @__PURE__ */ function() {
|
|
|
18527
18528
|
}, Xi.apply(this, arguments);
|
|
18528
18529
|
};
|
|
18529
18530
|
Object.defineProperty(jr, "__esModule", { value: !0 });
|
|
18530
|
-
var _u = vi, ae =
|
|
18531
|
+
var _u = vi, ae = er, To = qi, ai = Es, pn = pt, ko = (0, pn.getAceInstance)(), Au = (
|
|
18531
18532
|
/** @class */
|
|
18532
18533
|
function(u) {
|
|
18533
18534
|
Cu(f, u);
|
|
@@ -19067,7 +19068,7 @@ var Cd = Sd, _d = Ne && Ne.__extends || /* @__PURE__ */ function() {
|
|
|
19067
19068
|
}, Ji.apply(this, arguments);
|
|
19068
19069
|
};
|
|
19069
19070
|
Object.defineProperty(_i, "__esModule", { value: !0 });
|
|
19070
|
-
var Xt = pt, zi = (0, Xt.getAceInstance)(), Ad = vi, Ed = Eu, le =
|
|
19071
|
+
var Xt = pt, zi = (0, Xt.getAceInstance)(), Ad = vi, Ed = Eu, le = er, Oo = qi, Hi = Es, kt = Cd, Md = (
|
|
19071
19072
|
/** @class */
|
|
19072
19073
|
function(u) {
|
|
19073
19074
|
_d(f, u);
|
|
@@ -19931,7 +19932,7 @@ var Td = Ns.exports, kd = Ne && Ne.__extends || /* @__PURE__ */ function() {
|
|
|
19931
19932
|
};
|
|
19932
19933
|
}();
|
|
19933
19934
|
Object.defineProperty(Ur, "__esModule", { value: !0 });
|
|
19934
|
-
var $e =
|
|
19935
|
+
var $e = er, Do = qi, Ld = _i, Rd = Td, xd = (
|
|
19935
19936
|
/** @class */
|
|
19936
19937
|
function(u) {
|
|
19937
19938
|
kd(f, u);
|
|
@@ -20495,7 +20496,7 @@ const No = new yu({ allErrors: !0 }), Wd = {
|
|
|
20495
20496
|
};
|
|
20496
20497
|
return { valid: !0 };
|
|
20497
20498
|
};
|
|
20498
|
-
function
|
|
20499
|
+
function Kd({ data: u, onChange: f }) {
|
|
20499
20500
|
const [h, g] = ro(JSON.stringify(u, null, 2)), [_, d] = ro(
|
|
20500
20501
|
null
|
|
20501
20502
|
), m = No.compile(Wd), v = (s) => {
|
|
@@ -20547,5 +20548,5 @@ function Gd({ data: u, onChange: f }) {
|
|
|
20547
20548
|
] });
|
|
20548
20549
|
}
|
|
20549
20550
|
export {
|
|
20550
|
-
|
|
20551
|
+
Kd as default
|
|
20551
20552
|
};
|
|
@@ -3,20 +3,20 @@ import "@mui/icons-material";
|
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "dayjs";
|
|
5
5
|
import "lodash";
|
|
6
|
-
import { V as k } from "../../../../index-
|
|
6
|
+
import { V as k } from "../../../../index-CcdvNlgr.js";
|
|
7
7
|
import "../../../date-time-picker/index.js";
|
|
8
8
|
import "../../../geometry-picker/index.js";
|
|
9
9
|
import "../../../phone-input/index.js";
|
|
10
10
|
import "../../../conditional-wrapper/index.js";
|
|
11
11
|
import "../TopLabelWrapper.js";
|
|
12
12
|
import "../composite-matrix/index.js";
|
|
13
|
-
import "../../../../Box-
|
|
14
|
-
import "../../../../TextField-
|
|
15
|
-
import "../../../../FormControlLabel-
|
|
16
|
-
import "../../../../Checkbox-
|
|
17
|
-
import "../../../../
|
|
18
|
-
import "../../../../Select-
|
|
19
|
-
import "../../../../MenuItem-
|
|
13
|
+
import "../../../../Box-p6OtTUEo.js";
|
|
14
|
+
import "../../../../TextField-1yCesIbH.js";
|
|
15
|
+
import "../../../../FormControlLabel-C8SPv14J.js";
|
|
16
|
+
import "../../../../Checkbox-CWRMFTBp.js";
|
|
17
|
+
import "../../../../FormControl-BLbrq4C7.js";
|
|
18
|
+
import "../../../../Select-BgYwkZgI.js";
|
|
19
|
+
import "../../../../MenuItem-xZx_w7zA.js";
|
|
20
20
|
export {
|
|
21
21
|
k as default
|
|
22
22
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as u, Fragment as I, jsxs as _ } from "react/jsx-runtime";
|
|
2
2
|
import b from "react";
|
|
3
|
-
import { V as g } from "../../../../index-
|
|
3
|
+
import { V as g } from "../../../../index-CcdvNlgr.js";
|
|
4
4
|
import p from "lodash";
|
|
5
5
|
import { Box as i } from "@mui/material";
|
|
6
6
|
function C({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styled as r } from "@mui/material";
|
|
2
|
-
import { A as e, a as i, b as n } from "../../
|
|
2
|
+
import { A as e, a as i, b as n } from "../../AccordionSummary-DgAwVTk8.js";
|
|
3
3
|
const c = r(e)(({ theme: o }) => ({
|
|
4
4
|
borderBottom: `1px solid ${o.palette.divider}`,
|
|
5
5
|
"&:before": {
|
|
@@ -1,31 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
1
|
+
import { jsx as o, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { useThemeProps as j, Divider as I } from "@mui/material";
|
|
3
|
+
import { useMemo as v, Fragment as V } from "react";
|
|
4
|
+
import { InstanceVariableListRoot as g } from "./styled.js";
|
|
5
|
+
import { Variable as D } from "./variable.js";
|
|
6
|
+
function F(a) {
|
|
7
|
+
const p = j({
|
|
8
|
+
props: a,
|
|
9
|
+
name: "HCInstanceVariableList"
|
|
10
|
+
}), {
|
|
11
|
+
variables: s,
|
|
12
|
+
template: r,
|
|
13
|
+
extraData: i = [],
|
|
14
|
+
disableDividers: m = !1,
|
|
15
|
+
sx: c,
|
|
16
|
+
...f
|
|
17
|
+
} = p, l = v(() => {
|
|
18
|
+
const e = [...i];
|
|
19
|
+
if (!r) return e;
|
|
20
|
+
for (const [t, u] of Object.entries(s ?? {}))
|
|
21
|
+
for (const [x, y] of Object.entries(u ?? {})) {
|
|
22
|
+
const n = r.properties.find(
|
|
23
|
+
(d) => d.propertyId === x
|
|
24
|
+
);
|
|
25
|
+
n && e.push({ title: n.name, value: y, type: t });
|
|
26
|
+
}
|
|
27
|
+
return e;
|
|
28
|
+
}, [s, r, i]), b = c ?? { px: 2, py: 1, alignItems: "flex-start" };
|
|
29
|
+
return /* @__PURE__ */ o(g, { ...f, children: l.filter((e) => e.type !== "geometry").map((e, t) => /* @__PURE__ */ h(V, { children: [
|
|
30
|
+
!m && t > 0 && /* @__PURE__ */ o(I, {}),
|
|
31
|
+
/* @__PURE__ */ o(D, { ...e, sx: b })
|
|
32
|
+
] }, t)) });
|
|
33
|
+
}
|
|
29
34
|
export {
|
|
30
|
-
|
|
35
|
+
F as InstanceVariableList
|
|
31
36
|
};
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { styled as a, Box as e, Typography as
|
|
2
|
-
const
|
|
3
|
-
name: "
|
|
4
|
-
slot: "
|
|
1
|
+
import { styled as a, Box as e, Typography as t } from "@mui/material";
|
|
2
|
+
const o = a(e, {
|
|
3
|
+
name: "HCInstanceVariableList",
|
|
4
|
+
slot: "Root"
|
|
5
5
|
})({
|
|
6
6
|
width: "100%"
|
|
7
|
-
}),
|
|
8
|
-
name: "
|
|
9
|
-
slot: "
|
|
7
|
+
}), l = a(e, {
|
|
8
|
+
name: "HCInstanceVariableList",
|
|
9
|
+
slot: "Row"
|
|
10
10
|
})({
|
|
11
11
|
display: "flex"
|
|
12
|
-
}),
|
|
13
|
-
name: "
|
|
14
|
-
slot: "
|
|
15
|
-
})(({ theme:
|
|
16
|
-
flex:
|
|
12
|
+
}), s = a(t, {
|
|
13
|
+
name: "HCInstanceVariableList",
|
|
14
|
+
slot: "Title"
|
|
15
|
+
})(({ theme: i }) => ({
|
|
16
|
+
flex: 3,
|
|
17
17
|
lineHeight: 1.43,
|
|
18
|
-
paddingRight:
|
|
18
|
+
paddingRight: i.spacing(0.5),
|
|
19
19
|
fontSize: 12
|
|
20
|
-
})),
|
|
21
|
-
name: "
|
|
22
|
-
slot: "
|
|
20
|
+
})), r = a(t, {
|
|
21
|
+
name: "HCInstanceVariableList",
|
|
22
|
+
slot: "Value"
|
|
23
23
|
})(() => ({
|
|
24
|
-
flex:
|
|
24
|
+
flex: 5,
|
|
25
25
|
wordBreak: "break-word",
|
|
26
26
|
fontSize: 12
|
|
27
27
|
}));
|
|
28
28
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
o as InstanceVariableListRoot,
|
|
30
|
+
l as VariableRow,
|
|
31
|
+
s as VariableTitle,
|
|
32
|
+
r as VariableValue
|
|
33
33
|
};
|
|
@@ -1,37 +1,42 @@
|
|
|
1
|
-
import { jsx as a, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/* @__PURE__ */ a(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
import { jsx as a, Fragment as h, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import i from "dayjs";
|
|
3
|
+
import { VariableRow as u, VariableTitle as b, VariableValue as m } from "./styled.js";
|
|
4
|
+
const o = ({ title: n, value: r, sx: e }) => /* @__PURE__ */ l(u, { sx: e, children: [
|
|
5
|
+
/* @__PURE__ */ a(b, { variant: "subtitle2", children: n }),
|
|
6
|
+
/* @__PURE__ */ a(m, { variant: "body2", children: r })
|
|
7
|
+
] }), s = ({ title: n, value: r, sx: e }) => /* @__PURE__ */ a(o, { title: n, value: r, sx: e }), g = ({
|
|
8
|
+
title: n,
|
|
9
|
+
value: r,
|
|
10
|
+
sx: e
|
|
11
|
+
}) => /* @__PURE__ */ a(o, { title: n, value: r ? "Yes" : "No", sx: e }), d = ({
|
|
12
|
+
title: n,
|
|
13
|
+
value: r,
|
|
14
|
+
sx: e
|
|
15
|
+
}) => /* @__PURE__ */ a(o, { title: n, value: i(r).format("DD/MM/YYYY"), sx: e }), V = ({
|
|
16
|
+
title: n,
|
|
17
|
+
value: r,
|
|
18
|
+
sx: e
|
|
19
|
+
}) => /* @__PURE__ */ a(o, { title: n, value: (r ?? []).join(", "), sx: e }), Y = ({ title: n, value: r, sx: e }) => /* @__PURE__ */ l(u, { sx: e, children: [
|
|
20
|
+
/* @__PURE__ */ a(b, { variant: "subtitle2", children: n }),
|
|
21
|
+
/* @__PURE__ */ a(m, { variant: "body2", children: /* @__PURE__ */ a("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: r }) })
|
|
22
|
+
] }), k = ({
|
|
23
|
+
type: n,
|
|
24
|
+
title: r,
|
|
25
|
+
value: e,
|
|
26
|
+
sx: t,
|
|
27
|
+
fieldOptions: c
|
|
28
|
+
}) => {
|
|
29
|
+
if (n === "geometry") return null;
|
|
30
|
+
if (c != null && c.component) return /* @__PURE__ */ a(h, { children: c.component });
|
|
31
|
+
if (c != null && c.clickable) return /* @__PURE__ */ a(Y, { title: r, value: e, sx: t });
|
|
32
|
+
switch (n) {
|
|
33
|
+
case "boolean":
|
|
34
|
+
return /* @__PURE__ */ a(g, { title: r, value: e, sx: t });
|
|
35
|
+
case "date":
|
|
36
|
+
return /* @__PURE__ */ a(d, { title: r, value: e, sx: t });
|
|
37
|
+
case "list":
|
|
38
|
+
case "composite-list":
|
|
39
|
+
return /* @__PURE__ */ a(V, { title: r, value: e, sx: t });
|
|
35
40
|
case "string":
|
|
36
41
|
case "byte":
|
|
37
42
|
case "double":
|
|
@@ -39,47 +44,12 @@ function _(e, r, n, t) {
|
|
|
39
44
|
case "long":
|
|
40
45
|
case "enum":
|
|
41
46
|
case "text":
|
|
42
|
-
return /* @__PURE__ */ a(
|
|
43
|
-
case "boolean":
|
|
44
|
-
return /* @__PURE__ */ a(D, { title: n, value: r });
|
|
45
|
-
case "date":
|
|
46
|
-
return /* @__PURE__ */ a(k, { title: n, value: r });
|
|
47
|
-
case "list":
|
|
48
|
-
case "composite-list":
|
|
49
|
-
return /* @__PURE__ */ a(B, { title: n, value: r });
|
|
47
|
+
return /* @__PURE__ */ a(s, { title: r, value: e, sx: t });
|
|
50
48
|
default:
|
|
51
|
-
return
|
|
49
|
+
return /* @__PURE__ */ a(s, { title: r, value: String(e), sx: t });
|
|
52
50
|
}
|
|
53
|
-
}
|
|
54
|
-
function R({
|
|
55
|
-
type: e,
|
|
56
|
-
data: r,
|
|
57
|
-
filter: n,
|
|
58
|
-
properties: t,
|
|
59
|
-
hashPrefix: d,
|
|
60
|
-
fieldOptions: s
|
|
61
|
-
}) {
|
|
62
|
-
return e === "geometry" ? /* @__PURE__ */ a(x, {}) : /* @__PURE__ */ a(v, { children: Y.keys(r).filter((l) => {
|
|
63
|
-
var o;
|
|
64
|
-
const u = t.get(d + l);
|
|
65
|
-
return u && !u.visible || (o = s == null ? void 0 : s[l]) != null && o.hidden ? !1 : n === void 0 || n === "" || l.includes(n);
|
|
66
|
-
}).map((l, u) => {
|
|
67
|
-
const o = t.get(d + l), y = o ? o.name : "", c = s == null ? void 0 : s[l];
|
|
68
|
-
return T.includes(e) ? /* @__PURE__ */ m(
|
|
69
|
-
i,
|
|
70
|
-
{
|
|
71
|
-
mb: 1,
|
|
72
|
-
className: "variable",
|
|
73
|
-
...(c == null ? void 0 : c.order) && { order: c.order },
|
|
74
|
-
children: [
|
|
75
|
-
_(e, r[l], y, c),
|
|
76
|
-
c == null ? void 0 : c.helperText
|
|
77
|
-
]
|
|
78
|
-
},
|
|
79
|
-
u
|
|
80
|
-
) : /* @__PURE__ */ a(i, {}, u);
|
|
81
|
-
}) });
|
|
82
|
-
}
|
|
51
|
+
};
|
|
83
52
|
export {
|
|
84
|
-
|
|
53
|
+
k as Variable,
|
|
54
|
+
k as default
|
|
85
55
|
};
|
|
@@ -1,71 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import { IndicatorRoot as
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
barBgColor: h,
|
|
11
|
-
showPositive: b = !0,
|
|
12
|
-
showNegative: x,
|
|
13
|
-
showMiddle: I
|
|
14
|
-
}) => {
|
|
15
|
-
const k = c(() => i.isArray(n) ? n.find((r) => r > 0) ?? 0 : n ?? 0, [n]), l = c(() => i.isArray(n) ? n.find((r) => r < 0) ?? 0 : n < 0 ? n : 0, [n]), a = (r) => {
|
|
16
|
-
let d = [];
|
|
17
|
-
const M = 100 / (r.length - 1);
|
|
18
|
-
return r.forEach((u, f) => {
|
|
19
|
-
if (f === 0) {
|
|
20
|
-
d.push(`${u} 0%`);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (f === r.length - 1) {
|
|
24
|
-
d.push(`${u} 100%`);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
d.push(`${u} ${M * f}%`);
|
|
28
|
-
}), d;
|
|
29
|
-
}, y = c(() => i.isArray(o) ? `linear-gradient(45deg, ${a(o).join(", ")})` : o, [o]), A = c(() => i.isArray(s) ? `linear-gradient(45deg, ${a(s).join(", ")})` : s, [s]), j = c(() => i.isArray(e) ? `radial-gradient(circle, ${a(e).join(", ")})` : e, [e]);
|
|
30
|
-
return /* @__PURE__ */ p(w, { children: [
|
|
31
|
-
x && /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(
|
|
32
|
-
$,
|
|
33
|
-
{
|
|
34
|
-
flexDirection: "row-reverse",
|
|
35
|
-
sx: {
|
|
36
|
-
background: h
|
|
37
|
-
},
|
|
38
|
-
children: /* @__PURE__ */ t(
|
|
39
|
-
m,
|
|
40
|
-
{
|
|
41
|
-
width: `${Math.abs(l)}%`,
|
|
42
|
-
sx: {
|
|
43
|
-
background: A
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
) }),
|
|
49
|
-
I && /* @__PURE__ */ t(N, { children: /* @__PURE__ */ t(P, { sx: { background: j } }) }),
|
|
50
|
-
b && /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(
|
|
51
|
-
$,
|
|
52
|
-
{
|
|
53
|
-
sx: {
|
|
54
|
-
background: h
|
|
55
|
-
},
|
|
56
|
-
children: /* @__PURE__ */ t(
|
|
57
|
-
m,
|
|
58
|
-
{
|
|
59
|
-
width: `${k}%`,
|
|
60
|
-
sx: {
|
|
61
|
-
background: y
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
) })
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useLinearIndicatorLogic as c } from "./logic.js";
|
|
3
|
+
import { IndicatorRoot as s, IndicatorBarContainer as t, IndicatorBarBackground as n, IndicatorBar as o, IndicatorMiddleContainer as h, IndicatorMiddle as l } from "./styled.js";
|
|
4
|
+
const x = (i) => {
|
|
5
|
+
const { state: d } = c(i), { ownerState: r } = d;
|
|
6
|
+
return /* @__PURE__ */ a(s, { ownerState: r, sx: i.sx, children: [
|
|
7
|
+
i.showNegative && /* @__PURE__ */ e(t, { ownerState: r, children: /* @__PURE__ */ e(n, { ownerState: r, reverse: !0, children: /* @__PURE__ */ e(o, { ownerState: r, negative: !0 }) }) }),
|
|
8
|
+
i.showMiddle && /* @__PURE__ */ e(h, { ownerState: r, children: /* @__PURE__ */ e(l, { ownerState: r }) }),
|
|
9
|
+
(i.showPositive ?? !0) && /* @__PURE__ */ e(t, { ownerState: r, children: /* @__PURE__ */ e(n, { ownerState: r, children: /* @__PURE__ */ e(o, { ownerState: r }) }) })
|
|
67
10
|
] });
|
|
68
11
|
};
|
|
69
12
|
export {
|
|
70
|
-
|
|
13
|
+
x as LinearIndicator
|
|
71
14
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useThemeProps as $ } from "@mui/material";
|
|
2
|
+
import i from "lodash";
|
|
3
|
+
import { useMemo as a } from "react";
|
|
4
|
+
const l = (s) => {
|
|
5
|
+
const t = [], r = 100 / (s.length - 1);
|
|
6
|
+
return s.forEach((o, e) => {
|
|
7
|
+
if (e === 0) {
|
|
8
|
+
t.push(`${o} 0%`);
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (e === s.length - 1) {
|
|
12
|
+
t.push(`${o} 100%`);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
t.push(`${o} ${r * e}%`);
|
|
16
|
+
}), t;
|
|
17
|
+
}, P = (s) => {
|
|
18
|
+
const t = $({ props: s, name: "HCLinearIndicator" }), {
|
|
19
|
+
value: r,
|
|
20
|
+
positiveBarColor: o,
|
|
21
|
+
negativeBarColor: e,
|
|
22
|
+
middleColor: c,
|
|
23
|
+
barBgColor: u,
|
|
24
|
+
showPositive: d = !0,
|
|
25
|
+
showNegative: g,
|
|
26
|
+
showMiddle: f
|
|
27
|
+
} = t, p = a(() => i.isArray(r) ? r.find((n) => n > 0) ?? 0 : r ?? 0, [r]), m = a(() => i.isArray(r) ? r.find((n) => n < 0) ?? 0 : r < 0 ? r : 0, [r]), v = a(() => i.isArray(o) ? `linear-gradient(45deg, ${l(o).join(", ")})` : o, [o]), h = a(() => i.isArray(e) ? `linear-gradient(45deg, ${l(e).join(", ")})` : e, [e]), C = a(() => i.isArray(c) ? `radial-gradient(circle, ${l(c).join(", ")})` : c, [c]);
|
|
28
|
+
return {
|
|
29
|
+
refs: {},
|
|
30
|
+
state: { ownerState: {
|
|
31
|
+
value: r,
|
|
32
|
+
barBgColor: u,
|
|
33
|
+
showPositive: d,
|
|
34
|
+
showNegative: g,
|
|
35
|
+
showMiddle: f,
|
|
36
|
+
valuePositive: p,
|
|
37
|
+
valueNegative: m,
|
|
38
|
+
barColorPositive: v,
|
|
39
|
+
barColorNegative: h,
|
|
40
|
+
middleBgColor: C
|
|
41
|
+
} },
|
|
42
|
+
actions: {}
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
P as useLinearIndicatorLogic
|
|
47
|
+
};
|