@hybridcore/ui 1.5.90 → 1.6.1
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-CMg08YSA.js} +91 -95
- package/dist/{Add-CMz4N2zT.js → Add-DuVVJeQU.js} +35 -36
- package/dist/AnimatedTheme-jnasw6rT.js +11305 -0
- package/dist/AxisRenderer-DTyLLA6c.js +3579 -0
- package/dist/AxisRendererY-C_ItLPNV.js +445 -0
- package/dist/Bullet-DVczI2TD.js +41 -0
- package/dist/Button-CcsPEIDh.js +35 -0
- package/dist/{ButtonBase-DsX-jMQJ.js → ButtonBase-sObABYY2.js} +62 -58
- package/dist/CategoryAxis-CwnfaGc8.js +458 -0
- 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-fBLhTHbF.js} +1 -1
- package/dist/{DialogContent-CqTojymQ.js → DialogContent-CGJ7alb8.js} +10 -13
- package/dist/FormControl-BCurCxRj.js +1294 -0
- package/dist/FormControlLabel-BkRfrhNy.js +601 -0
- package/dist/Hierarchy-Bihj0S61.js +925 -0
- package/dist/{IconButton-DJ-31-Fd.js → IconButton-_opV1iNK.js} +18 -19
- package/dist/IconPlus-yPkff_Vj.js +19 -0
- package/dist/{InputAdornment-B7qEA4kN.js → InputAdornment-C7PEvvYr.js} +17 -19
- package/dist/InputLabel-rEwwnD4_.js +354 -0
- package/dist/Legend-Dp_MKfS4.js +178 -0
- package/dist/LineSeries-Uiv5o56b.js +472 -0
- package/dist/{MenuItem-C6qlUyV3.js → MenuItem-DrE50M_p.js} +92 -69
- package/dist/Modal-DlB6GH-f.js +1659 -0
- package/dist/Paper-q9kKjAKx.js +527 -0
- package/dist/PieSeries-B2fW3z0s.js +693 -0
- package/dist/RoundedRectangle-CWLi2PXn.js +34 -0
- package/dist/Scrollbar-D86MJyr2.js +171 -0
- 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-DSDIEEKu.js +3161 -0
- package/dist/Tick-2bcLyHpF.js +162 -0
- package/dist/{Typography-D1t7XuLN.js → Typography-B-Z5Y0Xq.js} +48 -50
- 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-quqpGCFu.js +9 -0
- package/dist/components/access/helpers.js +1 -1
- package/dist/components/access/index.js +8 -15
- package/dist/components/access/logic.js +25 -0
- package/dist/components/card/index.js +158 -498
- package/dist/components/card/logic.js +24 -0
- package/dist/components/card/styled.js +226 -51
- package/dist/components/card-alternate/index.js +111 -139
- package/dist/components/card-alternate/logic.js +17 -0
- package/dist/components/card-alternate/styled.js +113 -19
- 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 +28 -269
- package/dist/components/container/logic.js +12 -0
- package/dist/components/container/styled.js +29 -0
- package/dist/components/context-menu/index.js +25 -557
- package/dist/components/context-menu/logic.js +14 -0
- package/dist/components/context-menu/styled.js +40 -0
- 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 +36 -91
- package/dist/components/data-security-selectors/security-level/logic.js +73 -0
- package/dist/components/data-security-selectors/security-level/styled.js +47 -0
- 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 +8 -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 +7 -9
- package/dist/components/instance-form/components/variables/index.js +1 -1
- package/dist/components/instance-form/index.js +1 -1
- package/dist/components/instance-hierarchy-table/index.js +32 -37
- package/dist/components/instance-hierarchy-table/logic.js +16 -0
- package/dist/components/instance-hierarchy-table/styled.js +53 -12
- package/dist/components/instance-table/index.js +30 -135
- package/dist/components/instance-table/logic.js +122 -0
- package/dist/components/instance-table/styled.js +53 -11
- 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/key-protection/index.js +45 -2
- package/dist/components/key-protection/logic.js +40 -0
- package/dist/components/key-protection/styled.js +45 -0
- package/dist/components/key-protection/utils.js +1 -1
- 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/loading/index.js +15 -9
- package/dist/components/loading/logic.js +15 -0
- package/dist/components/loading/styled.js +26 -19
- 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/phone-input/index.js +18 -22
- package/dist/components/phone-input/logic.js +14 -0
- package/dist/components/phone-input/styled.js +12 -4
- 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 +42 -50
- package/dist/components/range-selector/components/date-range/index.js +148 -7
- package/dist/components/range-selector/components/geometry-range/index.js +11 -17
- package/dist/components/range-selector/components/number-range/index.js +48 -53
- package/dist/components/range-selector/components/string-range/index.js +15 -17
- package/dist/components/range-selector/index.js +63 -57
- package/dist/components/range-selector/logic.js +12 -0
- package/dist/components/range-selector/styled.js +4222 -0
- 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/filter/index.js +13 -18
- package/dist/components/template-filters/components/tab-panel/index.js +8 -16
- package/dist/components/template-filters/index.js +21 -29
- package/dist/components/template-filters/logic.js +18 -0
- package/dist/components/template-filters/styled.js +44 -1
- package/dist/components/template-form/components/property-list/index.js +8 -8
- 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 +8 -10
- 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 +8 -9
- package/dist/components/template-form/index.js +32 -33
- package/dist/components/template-property-filters/index.js +45 -95
- package/dist/components/template-property-filters/logic.js +27 -0
- package/dist/components/template-property-filters/property.js +105 -165
- package/dist/components/template-property-filters/styled.js +121 -20
- 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 +52 -67
- package/dist/components/tree-select/logic.js +59 -0
- package/dist/components/tree-select/styled.js +45 -62
- package/dist/components/treeview-filter/index.js +43 -65
- package/dist/components/treeview-filter/item/index.js +43 -42
- package/dist/components/treeview-filter/item-label/index.js +17 -37
- package/dist/components/treeview-filter/logic.js +28 -0
- package/dist/components/treeview-filter/styled.js +86 -0
- package/dist/components/uploader/index.js +532 -567
- package/dist/components/uploader/logic.js +74 -0
- package/dist/components/uploader/styled.js +93 -46
- package/dist/constant-BiOGvlZc.js +21 -0
- package/dist/createReactComponent-C7L-DMHj.js +60 -0
- package/dist/{createSvgIcon-DLPYMuH1.js → createSvgIcon-BM3-TsGy.js} +33 -36
- package/dist/{createSvgIcon-OuwzpcaC.js → createSvgIcon-DX-SqL8M.js} +24 -26
- package/dist/{dialog-BE4D6swf.js → dialog-cf4HUXXl.js} +27 -28
- package/dist/{helpers-DaCoWmi2.js → helpers-B4UL9NMD.js} +3 -3
- package/dist/index-BMS1Otro.js +183 -0
- package/dist/index-C8C3YXle.js +1932 -0
- package/dist/index-C__OZmYy.js +663 -0
- package/dist/{index-CGNxsLVm.js → index-DPKUmQnz.js} +11 -13
- package/dist/{index-JrtqxUdI.js → index-kCJ_Zvl8.js} +5 -5
- package/dist/index.es-CHNMhaMi.js +2067 -0
- package/dist/index.esm-BLLrbTzY.js +318 -0
- package/dist/isMuiElement-BkJ72LB3.js +26 -0
- package/dist/main.d.ts +1869 -565
- 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-DL_dEoNn.js} +57 -62
- package/dist/{createTheme-CNnKNxwL.js → styled-Bsjp3kFh.js} +275 -278
- package/dist/useId-B4-oF9Mq.js +34 -0
- package/dist/useMobilePicker-B-M3dnTn.js +7993 -0
- package/dist/{utils-Bq0ye5vf.js → utils-Cxu-fHjQ.js} +7 -7
- package/package.json +11 -2
- package/dist/AxisRendererY-kADUad00.js +0 -18370
- package/dist/Box-B1AVyJ_s.js +0 -71
- package/dist/Button-eqWvpDuh.js +0 -356
- package/dist/CardContent-DsYqqPeJ.js +0 -74
- package/dist/Checkbox-CrU2hpWB.js +0 -420
- package/dist/DateAxis-CMum47iz.js +0 -924
- package/dist/FormControlLabel-BrdX4R71.js +0 -195
- package/dist/Input-CoIrGZAh.js +0 -326
- package/dist/InputLabel-CBuAYyuT.js +0 -1367
- package/dist/LineSeries-CfcpoYla.js +0 -549
- package/dist/List-DOD5kSk3.js +0 -121
- package/dist/ListItem-r8PbsvCz.js +0 -429
- package/dist/Modal-CkcFEpHa.js +0 -1284
- package/dist/OutlinedInput-B-iZoc9l.js +0 -450
- package/dist/Paper-CjqLScHA.js +0 -163
- package/dist/Select-t3ewnSdf.js +0 -2180
- package/dist/Tabs-Cn42Z5QI.js +0 -789
- package/dist/TextField-BQ8a50fA.js +0 -459
- package/dist/components/collapsible-card/style.js +0 -49
- package/dist/components/key-protection/menu.js +0 -85
- 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/components/treeview-filter/item/styled.js +0 -39
- package/dist/createStyled-BGx1I94c.js +0 -352
- package/dist/createTheme-CyC5HawC.js +0 -879
- package/dist/debounce-46wSf_lW.js +0 -15
- 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/isHostComponent-kiaBvYVo.js +0 -6
- package/dist/isMuiElement-CxT3_ACP.js +0 -13
- package/dist/listItemTextClasses-CNjn41Of.js +0 -16
- 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/useFormControl-CatNKXAi.js +0 -10
- 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
- package/dist/utils-CsOZUsQj.js +0 -365
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { useThemeProps as N } from "@mui/material";
|
|
2
|
+
import { GridActionsCellItem as S } from "@mui/x-data-grid";
|
|
3
|
+
import G from "dayjs";
|
|
4
|
+
import Y from "lodash";
|
|
5
|
+
import { useMemo as D, createElement as h } from "react";
|
|
6
|
+
import { TemplateIcon as H, TitleButton as R } from "./styled.js";
|
|
7
|
+
const L = (T) => {
|
|
8
|
+
const C = N({ props: T, name: "HCInstanceTable" }), {
|
|
9
|
+
template: o,
|
|
10
|
+
selectedIds: y = [],
|
|
11
|
+
sortColumnsBy: m = "type",
|
|
12
|
+
actions: u,
|
|
13
|
+
actionsWidth: b = 50,
|
|
14
|
+
enableCheckboxSelection: v = !1,
|
|
15
|
+
fieldOptions: e,
|
|
16
|
+
onSelect: w,
|
|
17
|
+
onTitleClick: f
|
|
18
|
+
} = C, I = u !== void 0, g = b, M = {
|
|
19
|
+
...C,
|
|
20
|
+
selectedIds: y,
|
|
21
|
+
sortColumnsBy: m,
|
|
22
|
+
actionsWidth: b,
|
|
23
|
+
enableCheckboxSelection: v,
|
|
24
|
+
hasActions: I,
|
|
25
|
+
resolvedActionsWidth: g
|
|
26
|
+
}, A = D(() => {
|
|
27
|
+
var l, i, n, d, p, k;
|
|
28
|
+
return [
|
|
29
|
+
...(l = e == null ? void 0 : e.templateIcon) != null && l.hidden ? [] : [
|
|
30
|
+
{
|
|
31
|
+
field: "template",
|
|
32
|
+
headerName: "",
|
|
33
|
+
sortable: !1,
|
|
34
|
+
filterable: !1,
|
|
35
|
+
align: "center",
|
|
36
|
+
width: 30,
|
|
37
|
+
renderCell: ((i = e == null ? void 0 : e.templateIcon) == null ? void 0 : i.renderCell) ?? (() => o ? h(H, { src: o.icon }) : null)
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
...(n = e == null ? void 0 : e.title) != null && n.hidden ? [] : [
|
|
41
|
+
{
|
|
42
|
+
field: "title",
|
|
43
|
+
headerName: "Title",
|
|
44
|
+
width: 400,
|
|
45
|
+
sortable: !1,
|
|
46
|
+
filterable: !1,
|
|
47
|
+
valueGetter: (t) => t.row.title,
|
|
48
|
+
renderCell: ((d = e == null ? void 0 : e.title) == null ? void 0 : d.renderCell) ?? ((t) => {
|
|
49
|
+
const { row: r, value: a } = t;
|
|
50
|
+
return f ? h(
|
|
51
|
+
R,
|
|
52
|
+
{
|
|
53
|
+
onClick: () => f(r),
|
|
54
|
+
disableRipple: !0
|
|
55
|
+
},
|
|
56
|
+
a
|
|
57
|
+
) : a;
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
...(p = e == null ? void 0 : e.description) != null && p.hidden ? [] : [
|
|
62
|
+
{
|
|
63
|
+
field: "description",
|
|
64
|
+
headerName: "Description",
|
|
65
|
+
width: 400,
|
|
66
|
+
sortable: !1,
|
|
67
|
+
filterable: !1,
|
|
68
|
+
valueGetter: (t) => t.row.description,
|
|
69
|
+
renderCell: (k = e == null ? void 0 : e.description) == null ? void 0 : k.renderCell
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
...o ? o.properties.filter(
|
|
73
|
+
(t) => (!e || !e[t.propertyId] || !e[t.propertyId].hidden) && t.visible && t.type !== "geometry" && t.type !== "coordinate"
|
|
74
|
+
).sort(
|
|
75
|
+
(t, r) => m === "type" ? t.type < r.type ? -1 : t.type > r.type ? 1 : 0 : t.name < r.name ? -1 : 1
|
|
76
|
+
).map((t) => {
|
|
77
|
+
var a;
|
|
78
|
+
const r = `variables.${t.type}.${t.propertyId}`;
|
|
79
|
+
return {
|
|
80
|
+
field: r,
|
|
81
|
+
headerName: t.name,
|
|
82
|
+
sortable: !1,
|
|
83
|
+
filterable: !1,
|
|
84
|
+
width: 150,
|
|
85
|
+
valueFormatter: (s) => s.value && t.type === "date" ? G(s.value).format("DD/MM/YYYY HH:mm") : s.value,
|
|
86
|
+
valueGetter: (s) => Y.get(s.row, r),
|
|
87
|
+
renderCell: e && ((a = e[t.propertyId]) == null ? void 0 : a.renderCell)
|
|
88
|
+
};
|
|
89
|
+
}) : []
|
|
90
|
+
];
|
|
91
|
+
}, [o, e, f, m]);
|
|
92
|
+
return {
|
|
93
|
+
refs: {},
|
|
94
|
+
state: {
|
|
95
|
+
ownerState: M,
|
|
96
|
+
columns: A,
|
|
97
|
+
selectedIds: y,
|
|
98
|
+
enableCheckboxSelection: v,
|
|
99
|
+
hasActions: I,
|
|
100
|
+
resolvedActionsWidth: g
|
|
101
|
+
},
|
|
102
|
+
actions: { onRowSelectionModelChange: (c) => {
|
|
103
|
+
w && w(c);
|
|
104
|
+
}, getActions: (c) => u ? u.map((l, i) => {
|
|
105
|
+
const { showInMenu: n, ...d } = l, p = {
|
|
106
|
+
key: i,
|
|
107
|
+
...d,
|
|
108
|
+
...n ? { showInMenu: n } : {},
|
|
109
|
+
onClick: () => {
|
|
110
|
+
l.onClick && l.onClick(c);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
return h(
|
|
114
|
+
S,
|
|
115
|
+
p
|
|
116
|
+
);
|
|
117
|
+
}) : [] }
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
export {
|
|
121
|
+
L as useInstanceTableLogic
|
|
122
|
+
};
|
|
@@ -1,13 +1,55 @@
|
|
|
1
|
-
import { styled as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { styled as n, Box as e, ButtonBase as s } from "@mui/material";
|
|
2
|
+
import { DataGrid as a } from "@mui/x-data-grid";
|
|
3
|
+
const o = (t) => t !== "ownerState", c = n(e, {
|
|
4
|
+
name: "HCInstanceTable",
|
|
5
|
+
slot: "root",
|
|
6
|
+
shouldForwardProp: o
|
|
7
|
+
})({
|
|
8
|
+
position: "relative"
|
|
9
|
+
}), d = n(a, {
|
|
10
|
+
name: "HCInstanceTable",
|
|
11
|
+
slot: "dataGrid",
|
|
12
|
+
shouldForwardProp: o
|
|
13
|
+
})(({ ownerState: t }) => ({
|
|
14
|
+
border: "none",
|
|
15
|
+
"& .MuiDataGrid-main": {
|
|
16
|
+
marginRight: t.hasActions ? `${t.resolvedActionsWidth}px` : 0
|
|
17
|
+
}
|
|
18
|
+
})), m = n(e, {
|
|
19
|
+
name: "HCInstanceTable",
|
|
20
|
+
slot: "actionsContainer",
|
|
21
|
+
shouldForwardProp: o
|
|
22
|
+
})(({ theme: t, ownerState: i }) => ({
|
|
23
|
+
position: "absolute",
|
|
24
|
+
top: 0,
|
|
25
|
+
right: 0,
|
|
26
|
+
width: i.resolvedActionsWidth,
|
|
27
|
+
background: t.palette.background.default
|
|
28
|
+
})), b = n(a, {
|
|
29
|
+
name: "HCInstanceTable",
|
|
30
|
+
slot: "actionsGrid"
|
|
31
|
+
})({
|
|
32
|
+
border: "none"
|
|
33
|
+
}), p = n("img", {
|
|
34
|
+
name: "HCInstanceTable",
|
|
35
|
+
slot: "templateIcon"
|
|
36
|
+
})({
|
|
37
|
+
display: "inline",
|
|
38
|
+
height: 20,
|
|
39
|
+
maxWidth: 20
|
|
40
|
+
}), h = n(s, {
|
|
41
|
+
name: "HCInstanceTable",
|
|
42
|
+
slot: "titleButton"
|
|
43
|
+
})({
|
|
44
|
+
"&:hover": {
|
|
45
|
+
textDecoration: "underline"
|
|
46
|
+
}
|
|
47
|
+
});
|
|
11
48
|
export {
|
|
12
|
-
|
|
49
|
+
m as ActionsContainer,
|
|
50
|
+
b as ActionsDataGrid,
|
|
51
|
+
d as InstanceDataGrid,
|
|
52
|
+
c as InstanceTableRoot,
|
|
53
|
+
p as TemplateIcon,
|
|
54
|
+
h as TitleButton
|
|
13
55
|
};
|
|
@@ -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,4 +1,47 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Key as i, Add as h } from "@mui/icons-material";
|
|
3
|
+
import { useKeyProtectionMenuLogic as d } from "./logic.js";
|
|
4
|
+
import { KeyProtectionRoot as m, KeyIconButton as p, KeyMenu as y, KeyMenuItem as c, KeyMenuItemIcon as a } from "./styled.js";
|
|
5
|
+
const x = (r) => {
|
|
6
|
+
const { state: l, actions: o } = d(r), { ownerState: s, isOpen: n, anchorEl: u } = l;
|
|
7
|
+
return /* @__PURE__ */ t(m, { ownerState: s, sx: r.sx, children: [
|
|
8
|
+
/* @__PURE__ */ e(
|
|
9
|
+
p,
|
|
10
|
+
{
|
|
11
|
+
size: "large",
|
|
12
|
+
"aria-label": "account of current user",
|
|
13
|
+
onClick: o.open,
|
|
14
|
+
color: "inherit",
|
|
15
|
+
"aria-controls": n ? "key-protection-menu" : void 0,
|
|
16
|
+
"aria-haspopup": "true",
|
|
17
|
+
"aria-expanded": n ? "true" : void 0,
|
|
18
|
+
children: /* @__PURE__ */ e(i, {})
|
|
19
|
+
}
|
|
20
|
+
),
|
|
21
|
+
/* @__PURE__ */ t(
|
|
22
|
+
y,
|
|
23
|
+
{
|
|
24
|
+
id: "key-protection-menu",
|
|
25
|
+
anchorEl: u,
|
|
26
|
+
keepMounted: !0,
|
|
27
|
+
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
28
|
+
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
29
|
+
open: n,
|
|
30
|
+
onClose: o.close,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ t(c, { onClick: o.handleRegister, children: [
|
|
33
|
+
/* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(h, { fontSize: "small" }) }),
|
|
34
|
+
"Register Key"
|
|
35
|
+
] }),
|
|
36
|
+
/* @__PURE__ */ t(c, { onClick: o.handleAuth, children: [
|
|
37
|
+
/* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(i, { fontSize: "small" }) }),
|
|
38
|
+
"Authenticate"
|
|
39
|
+
] })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
] });
|
|
44
|
+
};
|
|
2
45
|
export {
|
|
3
|
-
|
|
46
|
+
x as KeyProtectionMenu
|
|
4
47
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useThemeProps as u } from "@mui/material";
|
|
2
|
+
import p from "lodash";
|
|
3
|
+
import d from "../../hooks/useMenuLogic.js";
|
|
4
|
+
import { alert as r } from "../confirm/index.js";
|
|
5
|
+
import { r as m, a as f } from "../../utils-Cxu-fHjQ.js";
|
|
6
|
+
let o;
|
|
7
|
+
const E = (c) => {
|
|
8
|
+
const n = u({
|
|
9
|
+
props: c,
|
|
10
|
+
name: "HCKeyProtectionMenu"
|
|
11
|
+
}), { state: s, action: e } = d(), a = { ...n }, i = async () => {
|
|
12
|
+
e.close();
|
|
13
|
+
const t = await m();
|
|
14
|
+
t ? (o = p.get(t, "rawId"), new Uint8Array(o).toString(), r("Successfull", "Key successfully registered")) : r("Error!", "The key couldn't be registered!");
|
|
15
|
+
}, l = async () => {
|
|
16
|
+
e.close();
|
|
17
|
+
try {
|
|
18
|
+
await f(o), r("Successfull", "Successfully authenticated");
|
|
19
|
+
} catch (t) {
|
|
20
|
+
r("Error!", "Couldn't be authenticated!"), console.error(t);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
refs: {},
|
|
25
|
+
state: {
|
|
26
|
+
ownerState: a,
|
|
27
|
+
isOpen: s.isOpen,
|
|
28
|
+
anchorEl: s.anchorEl
|
|
29
|
+
},
|
|
30
|
+
actions: {
|
|
31
|
+
open: e.open,
|
|
32
|
+
close: e.close,
|
|
33
|
+
handleRegister: i,
|
|
34
|
+
handleAuth: l
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
E as useKeyProtectionMenuLogic
|
|
40
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { styled as o, IconButton as t, Menu as n, MenuItem as r, ListItemIcon as i } from "@mui/material";
|
|
2
|
+
const a = (e) => e !== "ownerState", s = o("div", {
|
|
3
|
+
name: "HCKeyProtectionMenu",
|
|
4
|
+
slot: "root",
|
|
5
|
+
shouldForwardProp: a
|
|
6
|
+
})({
|
|
7
|
+
display: "inline-flex"
|
|
8
|
+
}), u = o(t, {
|
|
9
|
+
name: "HCKeyProtectionMenu",
|
|
10
|
+
slot: "iconButton"
|
|
11
|
+
})({}), l = o(n, {
|
|
12
|
+
name: "HCKeyProtectionMenu",
|
|
13
|
+
slot: "menu"
|
|
14
|
+
})(({ theme: e }) => ({
|
|
15
|
+
"& .MuiPaper-root": {
|
|
16
|
+
overflow: "visible",
|
|
17
|
+
filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",
|
|
18
|
+
marginTop: e.spacing(1.5),
|
|
19
|
+
"&:before": {
|
|
20
|
+
content: '""',
|
|
21
|
+
display: "block",
|
|
22
|
+
position: "absolute",
|
|
23
|
+
top: 0,
|
|
24
|
+
right: 14,
|
|
25
|
+
width: 10,
|
|
26
|
+
height: 10,
|
|
27
|
+
backgroundColor: e.palette.background.paper,
|
|
28
|
+
transform: "translateY(-50%) rotate(45deg)",
|
|
29
|
+
zIndex: 0
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
})), m = o(r, {
|
|
33
|
+
name: "HCKeyProtectionMenu",
|
|
34
|
+
slot: "menuItem"
|
|
35
|
+
})({}), p = o(i, {
|
|
36
|
+
name: "HCKeyProtectionMenu",
|
|
37
|
+
slot: "menuItemIcon"
|
|
38
|
+
})({});
|
|
39
|
+
export {
|
|
40
|
+
u as KeyIconButton,
|
|
41
|
+
l as KeyMenu,
|
|
42
|
+
m as KeyMenuItem,
|
|
43
|
+
p as KeyMenuItemIcon,
|
|
44
|
+
s as KeyProtectionRoot
|
|
45
|
+
};
|
|
@@ -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
|
};
|