@hybridcore/ui 1.6.0 → 1.6.2
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/CATALOG.md +179 -0
- package/README.md +1 -2
- package/dist/AccordionSummary-CJppWeqF.js +781 -0
- package/dist/Add-CqcD1PWb.js +403 -0
- package/dist/Box-DqUMmZjL.js +31 -0
- package/dist/{Button-CvE2gnly.js → Button-C5yquWAB.js} +120 -133
- package/dist/ButtonBase-BEF7oTOe.js +887 -0
- package/dist/{Delete-CW0UZv1m.js → Delete-BdyYpINH.js} +9 -8
- package/dist/{DialogContent-B3nbEbuv.js → DialogContent-BvVjD9z3.js} +127 -124
- package/dist/FormGroup-CpBsIyYR.js +89 -0
- package/dist/{IconButton-CHwRQF-g.js → IconButton-BoGwbvrP.js} +41 -43
- package/dist/InputLabel-Dd8RrneV.js +341 -0
- package/dist/{MenuItem-xZx_w7zA.js → MenuItem-DwqJqzuM.js} +51 -53
- package/dist/Modal-MUZygjmQ.js +1158 -0
- package/dist/Paper-BkQLdsCI.js +582 -0
- package/dist/Select-DHUl_uG3.js +3916 -0
- package/dist/SwitchBase-DTndTqI8.js +235 -0
- package/dist/TextField-e2oKaUN1.js +669 -0
- package/dist/TransitionGroupContext-BDAp2T0O.js +96 -0
- package/dist/{Typography-CxbneZy_.js → Typography-DgsSLCFC.js} +53 -53
- package/dist/assertThisInitialized-C1dAyb4j.js +7 -0
- package/dist/assets/index4.css +1 -0
- package/dist/clsx-OuTLNxxd.js +16 -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/button/index.js +10 -0
- package/dist/components/button/logic.js +26 -0
- package/dist/components/button/styled.js +9 -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/chart-error.js +19 -0
- package/dist/components/charts/candlestick/index.js +3 -3
- package/dist/components/charts/candlestick/logic.js +123 -113
- package/dist/components/charts/chart-wrapper/index.js +5 -5
- package/dist/components/charts/column-line-mix/index.js +9 -8
- package/dist/components/charts/column-line-mix/logic.js +68 -71
- package/dist/components/charts/drill-down-treemap/index.js +8 -7
- package/dist/components/charts/drill-down-treemap/logic.js +138 -144
- package/dist/components/charts/drill-down-voronoi-treemap/index.js +9 -8
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +222 -228
- package/dist/components/charts/heatmap/index.js +9 -8
- package/dist/components/charts/heatmap/logic.js +167 -173
- package/dist/components/charts/highlighting-line-data/index.js +3 -3
- package/dist/components/charts/line/index.js +9 -8
- package/dist/components/charts/line/logic.js +74 -79
- package/dist/components/charts/logaritmic-scale/index.js +9 -8
- package/dist/components/charts/logaritmic-scale/logic.js +63 -69
- package/dist/components/charts/multiple-value-axes/index.js +9 -8
- package/dist/components/charts/multiple-value-axes/logic.js +101 -107
- package/dist/components/charts/nested-pie/index.js +9 -8
- package/dist/components/charts/nested-pie/logic.js +62 -68
- package/dist/components/charts/packed-circles/index.js +7 -6
- package/dist/components/charts/packed-circles/logic.js +50 -56
- package/dist/components/charts/pie-chart/index.js +9 -8
- package/dist/components/charts/pie-chart/logic.js +49 -54
- package/dist/components/charts/stacked-area-radar/index.js +8 -7
- package/dist/components/charts/stacked-area-radar/logic.js +113 -118
- package/dist/components/charts/stacked-column-chart/index.js +9 -8
- package/dist/components/charts/stacked-column-chart/logic.js +78 -84
- package/dist/components/charts/xy-chart/index.js +9 -8
- package/dist/components/charts/xy-chart/logic.js +56 -60
- package/dist/components/collapsible-card/index.js +11 -10
- package/dist/components/collapsible-card/styled.js +1 -1
- package/dist/components/color-picker/index.js +7120 -0
- package/dist/components/color-picker/logic.js +18 -0
- package/dist/components/color-picker/styled.js +7 -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 -457
- package/dist/components/context-menu/logic.js +14 -0
- package/dist/components/context-menu/styled.js +40 -0
- package/dist/components/data-grid/index.js +22 -0
- package/dist/components/data-grid/logic.js +15 -0
- package/dist/components/data-grid/styled.js +20 -0
- package/dist/components/data-map/components/controls/index.js +4 -6
- package/dist/components/data-map/index.js +11 -11
- package/dist/components/data-security-selectors/dissemination-list/index.js +192 -191
- package/dist/components/data-security-selectors/dissemination-list/styled.js +12 -12
- package/dist/components/data-security-selectors/security-level/index.js +39 -91
- package/dist/components/data-security-selectors/security-level/logic.js +28 -0
- package/dist/components/data-security-selectors/security-level/styled.js +53 -0
- package/dist/components/date-picker-with-custom-range/index.js +1 -1
- package/dist/components/date-range-picker/index.js +2748 -0
- package/dist/components/date-range-picker/styled.js +14 -0
- package/dist/components/date-time-picker/index.js +45 -46
- package/dist/components/divider/index.js +11 -11
- package/dist/components/document-viewer/components/action-buttons/index.js +15 -15
- package/dist/components/document-viewer/components/navigation/index.js +9 -9
- package/dist/components/document-viewer/components/viewer/index.js +31 -35
- package/dist/components/document-viewer/index.js +31 -39
- package/dist/components/document-viewer/logic.js +41 -34
- package/dist/components/document-viewer/styled.js +115 -27
- package/dist/components/duration-select/index.js +27 -0
- package/dist/components/duration-select/logic.js +21 -0
- package/dist/components/duration-select/styled.js +26 -0
- package/dist/components/editable-text/index.js +20 -0
- package/dist/components/editable-text/logic.js +18 -0
- package/dist/components/editable-text/styled.js +22 -0
- package/dist/components/geometry-picker/coordinate/index.js +29 -29
- package/dist/components/geometry-picker/edit/index.js +18 -18
- package/dist/components/geometry-picker/geometry/index.js +67 -67
- package/dist/components/geometry-picker/geometry/map-overlay.js +6 -6
- package/dist/components/geometry-picker/index.js +69 -85
- package/dist/components/geometry-picker/kml/index.js +16 -16
- package/dist/components/geometry-picker/logic.js +50 -57
- package/dist/components/geometry-picker/map/index.js +8 -8
- package/dist/components/geometry-picker/parser/coordinate-input/index.js +4 -4
- package/dist/components/geometry-picker/parser/index.js +46 -50
- package/dist/components/geometry-picker/parser/styled.js +22 -4
- package/dist/components/geometry-picker/styled.js +97 -37
- package/dist/components/geometry-picker/wkt/index.js +13 -13
- package/dist/components/heat-map/components/controls/index.js +4 -6
- package/dist/components/heat-map/components/legend/index.js +15 -17
- package/dist/components/heat-map/index.js +7 -7
- package/dist/components/instance-form/components/TopLabelWrapper.js +8 -48
- package/dist/components/instance-form/components/composite-list/index.js +5 -3
- package/dist/components/instance-form/components/composite-matrix/components/editable-table/index.js +83 -74
- package/dist/components/instance-form/components/composite-matrix/components/editor/index.js +45 -66
- package/dist/components/instance-form/components/composite-matrix/components/form/index.js +60 -75
- package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +2425 -2422
- package/dist/components/instance-form/components/composite-matrix/components/table/index.js +33 -52
- package/dist/components/instance-form/components/composite-matrix/index.js +30 -36
- package/dist/components/instance-form/components/policy-list/index.js +47 -81
- package/dist/components/instance-form/components/variable/index.js +6 -11
- package/dist/components/instance-form/components/variables/index.js +48 -55
- package/dist/components/instance-form/helpers.js +9 -0
- package/dist/components/instance-form/index.js +402 -518
- package/dist/components/instance-form/logic.js +115 -0
- package/dist/components/instance-form/styled.js +487 -0
- 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 +11 -11
- 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/index.js +28 -6
- package/dist/components/map/styled.js +1 -1
- package/dist/components/notification/index.js +67 -0
- package/dist/components/notification/logic.js +30 -0
- package/dist/components/notification/store.js +23 -0
- package/dist/components/notification/styled.js +52 -0
- package/dist/components/object-profile-card/components/avatar/index.js +9 -10
- package/dist/components/object-profile-card/index.js +19 -20
- package/dist/components/paginated-list/index.js +2 -3
- 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/placeholder/index.js +10 -0
- package/dist/components/placeholder/logic.js +12 -0
- package/dist/components/placeholder/styled.js +32 -0
- package/dist/components/positional-tooltip/index.js +24 -0
- package/dist/components/positional-tooltip/styled.js +17 -0
- package/dist/components/property-mapping/index.js +204 -423
- package/dist/components/property-mapping/logic.js +156 -0
- package/dist/components/property-mapping/styled.js +199 -0
- package/dist/components/prr-map/components/controls/index.js +4 -6
- package/dist/components/prr-map/components/legend/index.js +26 -28
- package/dist/components/prr-map/index.js +5 -5
- package/dist/components/range-selector/components/composite-list-range/index.js +42 -50
- package/dist/components/range-selector/components/date-range/index.js +87 -4221
- 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 +4294 -0
- package/dist/components/raster-grid-map/components/controls/index.js +4 -6
- package/dist/components/raster-grid-map/components/legend/index.js +4 -6
- package/dist/components/raster-grid-map/index.js +5 -5
- package/dist/components/scroll-drag/index.js +22 -0
- package/dist/components/scroll-drag/logic.js +39 -0
- package/dist/components/scroll-drag/styled.js +17 -0
- package/dist/components/search-input/logic.js +35 -33
- package/dist/components/simple-pivot-table/index.js +12 -12
- package/dist/components/sortable-list/index.js +599 -0
- package/dist/components/sortable-list/logic.js +18 -0
- package/dist/components/sortable-list/styled.js +38 -0
- package/dist/components/static-text/index.js +6 -6
- package/dist/components/stats-box/index.js +12 -0
- package/dist/components/stats-box/styled.js +36 -0
- 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 +27 -26
- 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 +758 -14
- package/dist/components/template-form/components/recognition-property-list/index.js +11 -11
- 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 +24 -23
- package/dist/components/template-form/components/select-icon/index.js +24 -24
- package/dist/components/template-form/helpers.js +17 -0
- package/dist/components/template-form/index.js +270 -309
- package/dist/components/template-form/logic.js +69 -0
- package/dist/components/template-form/styled.js +84 -0
- 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/text-overflow/index.js +6 -0
- package/dist/components/text-overflow/styled.js +13 -0
- package/dist/components/timeline/index.js +12 -12
- package/dist/components/toggle-view-button/index.js +35 -0
- package/dist/components/toggle-view-button/logic.js +22 -0
- package/dist/components/toggle-view-button/styled.js +11 -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/components/visually-hidden-input/index.js +4 -0
- package/dist/components/visually-hidden-input/styled.js +18 -0
- package/dist/createChainedFunction-C0nujS3O.js +9 -0
- package/dist/{createSvgIcon-DrtgaibK.js → createSvgIcon-Ch_cT8az.js} +69 -68
- package/dist/createSvgIcon-DuDuASu1.js +62 -0
- package/dist/{dialog-DcwXug9J.js → dialog-BYRnCztH.js} +18 -18
- package/dist/formControlState-vgaj2ksH.js +10 -0
- package/dist/generateUtilityClasses-C3ivN9Ie.js +2973 -0
- package/dist/{helpers-B4UL9NMD.js → helpers-D4uXfBfO.js} +2 -2
- package/dist/index-BtlzPygz.js +470 -0
- package/dist/index-DH6qsPBn.js +153 -0
- package/dist/{index-syTc6m_V.js → index-e9xTIYWt.js} +87 -87
- package/dist/main.d.ts +1722 -562
- package/dist/main.js +161 -128
- package/dist/ownerWindow-wg6foiOE.js +10 -0
- package/dist/setPrototypeOf-NPgp4cYc.js +8 -0
- package/dist/styled-Db1RdcPA.js +323 -0
- package/dist/unsupportedProp-DuqR2hj9.js +36 -0
- package/dist/useId-BW-oWmul.js +19 -0
- package/dist/useMobilePicker-CY8ndYRL.js +8279 -0
- package/dist/useSlot-B_Q4vnX5.js +42 -0
- package/package.json +15 -7
- package/dist/AccordionSummary-DgAwVTk8.js +0 -742
- package/dist/Add-DJLrrVHm.js +0 -382
- package/dist/Box-p6OtTUEo.js +0 -30
- package/dist/ButtonBase-2bPw77UP.js +0 -961
- package/dist/CardContent-CSHh-ZlM.js +0 -74
- package/dist/Checkbox-CWRMFTBp.js +0 -421
- package/dist/FormControl-BLbrq4C7.js +0 -1636
- package/dist/FormControlLabel-C8SPv14J.js +0 -195
- package/dist/InputAdornment-DLxWUE6H.js +0 -157
- package/dist/List-tqElle9C.js +0 -121
- package/dist/ListItem-CfjsIg4B.js +0 -430
- package/dist/Modal-DhPpOoGB.js +0 -1299
- package/dist/Paper-2B03OBmZ.js +0 -169
- package/dist/Select-BgYwkZgI.js +0 -2613
- package/dist/TextField-1yCesIbH.js +0 -457
- package/dist/assertThisInitialized-BUtkG-md.js +0 -13
- package/dist/capitalize-ciszXJ7R.js +0 -9
- package/dist/components/instance-form/components/composite-list/styled.js +0 -73
- package/dist/components/instance-form/components/composite-matrix/components/editor/styled.js +0 -1
- package/dist/components/instance-form/components/composite-matrix/styled.js +0 -69
- package/dist/components/key-protection/index.js +0 -4
- package/dist/components/key-protection/menu.js +0 -85
- package/dist/components/key-protection/utils.js +0 -10
- package/dist/components/treeview-filter/item/styled.js +0 -39
- package/dist/createSvgIcon-BjpIhJ30.js +0 -71
- package/dist/createTheme-DYxDnE9u.js +0 -612
- package/dist/index-BMS1Otro.js +0 -183
- package/dist/index-CcdvNlgr.js +0 -503
- package/dist/index-kCJ_Zvl8.js +0 -34
- package/dist/isHostComponent-kiaBvYVo.js +0 -6
- package/dist/isMuiElement-CxT3_ACP.js +0 -13
- package/dist/listItemTextClasses-C3lndiXO.js +0 -16
- package/dist/property-list-form-zZQfpR0X.js +0 -386
- package/dist/styled-eZwjUruw.js +0 -12
- package/dist/unsupportedProp-BND8AB6O.js +0 -25
- package/dist/useId-B4-oF9Mq.js +0 -34
- package/dist/useMobilePicker-BLg3Blg8.js +0 -7589
- package/dist/useThemeProps-BzzHcQyd.js +0 -58
- package/dist/utils-BDNynJcd.js +0 -365
- package/dist/utils-Bq0ye5vf.js +0 -115
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { useThemeProps as _ } from "@mui/material";
|
|
2
|
+
import K from "lodash";
|
|
3
|
+
import s, { useRef as L } from "react";
|
|
4
|
+
import { useForm as G } from "react-hook-form";
|
|
5
|
+
import { getNestedChildrenFromMap as U } from "../../utils/ontology.js";
|
|
6
|
+
const j = (l) => window.crypto.subtle.importKey(
|
|
7
|
+
"jwk",
|
|
8
|
+
l,
|
|
9
|
+
{ name: "AES-GCM", length: 256 },
|
|
10
|
+
!0,
|
|
11
|
+
["encrypt", "decrypt"]
|
|
12
|
+
), B = async (l, e) => {
|
|
13
|
+
try {
|
|
14
|
+
const r = window.atob(e).split(":"), p = new Uint8Array(r[0].split(",").map(Number)), m = new Uint8Array(r[1].split(",").map(Number)).buffer, u = await crypto.subtle.decrypt({ name: "AES-GCM", iv: p }, l, m);
|
|
15
|
+
return { status: "SUCCESS", data: new TextDecoder().decode(u) };
|
|
16
|
+
} catch (r) {
|
|
17
|
+
return console.error(r), { status: "ERROR", message: "Decryption error" };
|
|
18
|
+
}
|
|
19
|
+
}, H = {
|
|
20
|
+
alg: "A256GCM",
|
|
21
|
+
ext: !0,
|
|
22
|
+
k: "_El6rHQxC5E7NdO5DiMDITjF7f65wrlaJmFVagVE9Ic",
|
|
23
|
+
key_ops: ["encrypt", "decrypt"],
|
|
24
|
+
kty: "oct"
|
|
25
|
+
}, q = (l) => {
|
|
26
|
+
const e = _({ props: l, name: "HCInstanceForm" }), r = L(null), p = G({ defaultValues: e.values }), {
|
|
27
|
+
register: m,
|
|
28
|
+
handleSubmit: u,
|
|
29
|
+
control: E,
|
|
30
|
+
formState: { errors: I, isDirty: y },
|
|
31
|
+
getValues: d,
|
|
32
|
+
setValue: f,
|
|
33
|
+
reset: N,
|
|
34
|
+
watch: V
|
|
35
|
+
} = p, h = (e == null ? void 0 : e.labelPosition) ?? "default", b = e.variant ?? "inline", v = e.loading ?? !1, C = !!e.onCancel, g = !!(e.policyList && e.policyList.length > 0), [k, x] = s.useState([]), [c, S] = s.useState(), [, A] = s.useState(0), M = s.useMemo(() => {
|
|
36
|
+
const a = [];
|
|
37
|
+
return e.templates.forEach((t) => {
|
|
38
|
+
t.creatable || a.push(String(t.id));
|
|
39
|
+
}), a;
|
|
40
|
+
}, [e.templates]);
|
|
41
|
+
s.useEffect(() => {
|
|
42
|
+
(async () => {
|
|
43
|
+
if (!e.values) return;
|
|
44
|
+
const a = { ...e.values }, t = e.templates.get(a.templateId);
|
|
45
|
+
if (!t) return;
|
|
46
|
+
const n = t.properties.filter(
|
|
47
|
+
(o) => o.privacyPreservationMethod === "ENCRYPTION"
|
|
48
|
+
);
|
|
49
|
+
if (n.length !== 0)
|
|
50
|
+
for (const o of n) {
|
|
51
|
+
const i = K.get(a, `variables.${o.propertyId}`);
|
|
52
|
+
if (i && e.keyAuth) {
|
|
53
|
+
const D = await j(H), T = await B(D, String(i));
|
|
54
|
+
T.data && (f(`variables.${o.propertyId}`, T.data), A((O) => O + 1));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
})();
|
|
58
|
+
}, [e.values, e.templates, e.keyAuth, f]);
|
|
59
|
+
const w = s.useCallback(() => {
|
|
60
|
+
const a = d("templateId");
|
|
61
|
+
c && S(void 0);
|
|
62
|
+
const t = U(e.templates);
|
|
63
|
+
x(t);
|
|
64
|
+
for (const n of e.templates.values())
|
|
65
|
+
if (n.id === a) {
|
|
66
|
+
S(n);
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
}, [d, e.templates, c]);
|
|
70
|
+
s.useEffect(() => {
|
|
71
|
+
w();
|
|
72
|
+
}, [e.templates]), s.useEffect(() => {
|
|
73
|
+
e.onSelectedTemplateChange && e.onSelectedTemplateChange(c);
|
|
74
|
+
}, [c]);
|
|
75
|
+
const P = () => {
|
|
76
|
+
e.onCancel && e.onCancel(y);
|
|
77
|
+
}, R = (a) => {
|
|
78
|
+
var o, i;
|
|
79
|
+
if (!a) return;
|
|
80
|
+
const t = (i = (o = e == null ? void 0 : e.fieldOptions) == null ? void 0 : o[a]) == null ? void 0 : i.maxChar;
|
|
81
|
+
return t != null && !Number.isNaN(Number(t)) ? Number(t) : void 0;
|
|
82
|
+
}, F = {
|
|
83
|
+
variant: b,
|
|
84
|
+
inputVariant: e.inputVariant,
|
|
85
|
+
labelPosition: h,
|
|
86
|
+
loading: v,
|
|
87
|
+
hasCancel: C,
|
|
88
|
+
hasPolicyList: g
|
|
89
|
+
};
|
|
90
|
+
return {
|
|
91
|
+
refs: { formRef: r },
|
|
92
|
+
state: {
|
|
93
|
+
ownerState: F,
|
|
94
|
+
templates: k,
|
|
95
|
+
selectedTemplate: c,
|
|
96
|
+
disabledTemplates: M,
|
|
97
|
+
labelPosition: h,
|
|
98
|
+
variant: b,
|
|
99
|
+
loading: v,
|
|
100
|
+
hasCancel: C,
|
|
101
|
+
hasPolicyList: g,
|
|
102
|
+
errors: I,
|
|
103
|
+
isDirty: y
|
|
104
|
+
},
|
|
105
|
+
form: { register: m, handleSubmit: u, control: E, getValues: d, setValue: f, reset: N, watch: V },
|
|
106
|
+
actions: {
|
|
107
|
+
handleTemplates: w,
|
|
108
|
+
handleOnCancel: P,
|
|
109
|
+
maxCharValidation: R
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
export {
|
|
114
|
+
q as useInstanceFormLogic
|
|
115
|
+
};
|
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
import { styled as t, Box as n, Typography as i, FormHelperText as d, FormGroup as g, Button as e, FormLabel as s, OutlinedInput as C, TableContainer as x, TableCell as r, Alert as b, DialogTitle as u, Tabs as F, Tab as f, DialogContent as L, FormControlLabel as I } from "@mui/material";
|
|
2
|
+
const p = (o) => o !== "ownerState", c = (o) => o !== "ownerState", H = t(n, {
|
|
3
|
+
name: "HCInstanceForm",
|
|
4
|
+
slot: "root",
|
|
5
|
+
shouldForwardProp: c
|
|
6
|
+
})({}), w = t("form", {
|
|
7
|
+
name: "HCInstanceForm",
|
|
8
|
+
slot: "form"
|
|
9
|
+
})({
|
|
10
|
+
display: "flex",
|
|
11
|
+
flexDirection: "column"
|
|
12
|
+
}), h = t(n, {
|
|
13
|
+
name: "HCInstanceForm",
|
|
14
|
+
slot: "field"
|
|
15
|
+
})(({ theme: o }) => ({
|
|
16
|
+
marginBottom: o.spacing(2)
|
|
17
|
+
})), T = t(n, {
|
|
18
|
+
name: "HCInstanceForm",
|
|
19
|
+
slot: "leftLayout"
|
|
20
|
+
})({
|
|
21
|
+
display: "flex",
|
|
22
|
+
alignItems: "center"
|
|
23
|
+
}), v = t(i, {
|
|
24
|
+
name: "HCInstanceForm",
|
|
25
|
+
slot: "leftLabel"
|
|
26
|
+
})({
|
|
27
|
+
width: "32%"
|
|
28
|
+
}), B = t(n, {
|
|
29
|
+
name: "HCInstanceForm",
|
|
30
|
+
slot: "leftContent"
|
|
31
|
+
})({
|
|
32
|
+
width: "68%"
|
|
33
|
+
}), y = t(d, {
|
|
34
|
+
name: "HCInstanceForm",
|
|
35
|
+
slot: "charCount"
|
|
36
|
+
})(({ theme: o }) => ({
|
|
37
|
+
textAlign: "right",
|
|
38
|
+
marginTop: o.spacing(0.5)
|
|
39
|
+
})), E = t(g, {
|
|
40
|
+
name: "HCInstanceForm",
|
|
41
|
+
slot: "templateGroup"
|
|
42
|
+
})(({ theme: o }) => ({
|
|
43
|
+
marginBottom: o.spacing(2)
|
|
44
|
+
})), R = t(n, {
|
|
45
|
+
name: "HCInstanceForm",
|
|
46
|
+
slot: "securityLevelContainer"
|
|
47
|
+
})(({ theme: o }) => ({
|
|
48
|
+
marginTop: o.spacing(2)
|
|
49
|
+
})), S = t(n, {
|
|
50
|
+
name: "HCInstanceForm",
|
|
51
|
+
slot: "actionsRow"
|
|
52
|
+
})(({ theme: o }) => ({
|
|
53
|
+
display: "flex",
|
|
54
|
+
justifyContent: "space-between",
|
|
55
|
+
marginTop: o.spacing(3),
|
|
56
|
+
width: "100%"
|
|
57
|
+
})), P = t(e, {
|
|
58
|
+
name: "HCInstanceForm",
|
|
59
|
+
slot: "cancelButton"
|
|
60
|
+
})({
|
|
61
|
+
textTransform: "none"
|
|
62
|
+
}), k = t(n, {
|
|
63
|
+
name: "HCInstanceForm",
|
|
64
|
+
slot: "saveButtonsContainer",
|
|
65
|
+
shouldForwardProp: c
|
|
66
|
+
})(({ ownerState: o }) => ({
|
|
67
|
+
flex: o.hasCancel ? "none" : 1
|
|
68
|
+
})), D = t(e, {
|
|
69
|
+
name: "HCInstanceForm",
|
|
70
|
+
slot: "saveButton"
|
|
71
|
+
})(({ theme: o }) => ({
|
|
72
|
+
marginLeft: o.spacing(1),
|
|
73
|
+
textTransform: "none",
|
|
74
|
+
"&:first-of-type": {
|
|
75
|
+
marginLeft: 0
|
|
76
|
+
}
|
|
77
|
+
})), z = {
|
|
78
|
+
position: "relative",
|
|
79
|
+
overflow: "visible"
|
|
80
|
+
}, W = t(n, {
|
|
81
|
+
name: "HCInstanceForm",
|
|
82
|
+
slot: "topLabelWrapper"
|
|
83
|
+
})(({ theme: o }) => ({
|
|
84
|
+
marginBottom: o.spacing(1)
|
|
85
|
+
})), A = t(s, {
|
|
86
|
+
name: "HCInstanceForm",
|
|
87
|
+
slot: "topLabel"
|
|
88
|
+
})(({ theme: o }) => ({
|
|
89
|
+
display: "block",
|
|
90
|
+
marginBottom: o.spacing(0.5)
|
|
91
|
+
})), V = t("span", {
|
|
92
|
+
name: "HCInstanceForm",
|
|
93
|
+
slot: "topLabelAsterisk"
|
|
94
|
+
})({}), G = t(i, {
|
|
95
|
+
name: "HCInstanceForm",
|
|
96
|
+
slot: "topLabelDescription"
|
|
97
|
+
})(({ theme: o }) => ({
|
|
98
|
+
display: "block",
|
|
99
|
+
color: o.palette.text.secondary,
|
|
100
|
+
marginTop: o.spacing(0.5)
|
|
101
|
+
})), O = t(n, {
|
|
102
|
+
name: "HCInstanceForm",
|
|
103
|
+
slot: "variablesContainer"
|
|
104
|
+
})({
|
|
105
|
+
display: "flex",
|
|
106
|
+
flexDirection: "column"
|
|
107
|
+
}), J = t(n, {
|
|
108
|
+
name: "HCInstanceForm",
|
|
109
|
+
slot: "variableFullWidth"
|
|
110
|
+
})({
|
|
111
|
+
width: "100%"
|
|
112
|
+
}), N = t(n, {
|
|
113
|
+
name: "HCInstanceForm",
|
|
114
|
+
slot: "policyListRoot",
|
|
115
|
+
shouldForwardProp: p
|
|
116
|
+
})(({ theme: o, ownerState: a }) => ({
|
|
117
|
+
...a.variant === "outlined" && {
|
|
118
|
+
position: "relative",
|
|
119
|
+
marginTop: o.spacing(1.5),
|
|
120
|
+
zIndex: 9
|
|
121
|
+
}
|
|
122
|
+
})), j = t(s, {
|
|
123
|
+
name: "HCInstanceForm",
|
|
124
|
+
slot: "policyListLabel",
|
|
125
|
+
shouldForwardProp: p
|
|
126
|
+
})(({ theme: o, ownerState: a }) => ({
|
|
127
|
+
display: "block",
|
|
128
|
+
...a.showError && {
|
|
129
|
+
color: o.palette.error.main
|
|
130
|
+
},
|
|
131
|
+
...a.variant === "outlined" && {
|
|
132
|
+
position: "absolute",
|
|
133
|
+
fontSize: "small",
|
|
134
|
+
zIndex: 1,
|
|
135
|
+
backgroundColor: o.palette.background.paper,
|
|
136
|
+
marginLeft: o.spacing(1.5),
|
|
137
|
+
marginTop: "-9px",
|
|
138
|
+
paddingLeft: o.spacing(0.5),
|
|
139
|
+
paddingRight: o.spacing(0.5)
|
|
140
|
+
}
|
|
141
|
+
})), m = (o) => o !== "ownerState", X = t(n, {
|
|
142
|
+
name: "HCInstanceForm",
|
|
143
|
+
slot: "compositeListContainer",
|
|
144
|
+
shouldForwardProp: m
|
|
145
|
+
})(
|
|
146
|
+
({ theme: o, ownerState: a }) => ({
|
|
147
|
+
position: "relative",
|
|
148
|
+
width: "100%",
|
|
149
|
+
boxSizing: "border-box",
|
|
150
|
+
...a.variant === "outlined" ? {
|
|
151
|
+
border: "1px solid",
|
|
152
|
+
padding: "10px 60px 10px 10px",
|
|
153
|
+
borderRadius: o.spacing(0.5),
|
|
154
|
+
"& .MuiButton-root": {
|
|
155
|
+
margin: "14px 8px"
|
|
156
|
+
},
|
|
157
|
+
"& .MuiTypography-root": {
|
|
158
|
+
position: "absolute",
|
|
159
|
+
top: -15,
|
|
160
|
+
left: 10,
|
|
161
|
+
paddingLeft: 4,
|
|
162
|
+
paddingRight: 4,
|
|
163
|
+
backgroundColor: o.palette.background.default
|
|
164
|
+
}
|
|
165
|
+
} : {
|
|
166
|
+
borderBottom: "1px solid",
|
|
167
|
+
paddingBottom: o.spacing(0.5)
|
|
168
|
+
},
|
|
169
|
+
borderColor: o.palette.action.disabled,
|
|
170
|
+
"&:hover": {
|
|
171
|
+
borderColor: o.palette.action.active
|
|
172
|
+
}
|
|
173
|
+
})
|
|
174
|
+
), _ = t(i, {
|
|
175
|
+
name: "HCInstanceForm",
|
|
176
|
+
slot: "compositeListLabel"
|
|
177
|
+
})({}), q = t(n, {
|
|
178
|
+
name: "HCInstanceForm",
|
|
179
|
+
slot: "compositeListValues"
|
|
180
|
+
})(({ theme: o }) => ({
|
|
181
|
+
minHeight: 33,
|
|
182
|
+
whiteSpace: "normal",
|
|
183
|
+
"& .MuiChip-root": {
|
|
184
|
+
marginRight: o.spacing(0.5),
|
|
185
|
+
marginTop: o.spacing(0.5)
|
|
186
|
+
},
|
|
187
|
+
"& .MuiChip-root:first-of-type": {
|
|
188
|
+
marginLeft: 0
|
|
189
|
+
}
|
|
190
|
+
})), K = t(e, {
|
|
191
|
+
name: "HCInstanceForm",
|
|
192
|
+
slot: "compositeListMiniButton",
|
|
193
|
+
shouldForwardProp: m
|
|
194
|
+
})(
|
|
195
|
+
({ theme: o, ownerState: a }) => ({
|
|
196
|
+
position: "absolute",
|
|
197
|
+
top: 0,
|
|
198
|
+
right: 0,
|
|
199
|
+
fontSize: 10,
|
|
200
|
+
padding: "3px 8px",
|
|
201
|
+
minWidth: "auto",
|
|
202
|
+
boxShadow: o.shadows[1],
|
|
203
|
+
textTransform: "none",
|
|
204
|
+
borderRadius: 13,
|
|
205
|
+
marginLeft: o.spacing(0.5),
|
|
206
|
+
"& .MuiButton-startIcon": {
|
|
207
|
+
marginRight: 0.25,
|
|
208
|
+
"& > :nth-of-type(1)": {
|
|
209
|
+
fontSize: 14
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
...a.variant === "contained" && {
|
|
213
|
+
"&:hover": {
|
|
214
|
+
backgroundColor: o.palette.grey[300],
|
|
215
|
+
boxShadow: o.shadows[1]
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
...a.variant === "text" && {
|
|
219
|
+
backgroundColor: o.palette.common.white,
|
|
220
|
+
"&:hover": {
|
|
221
|
+
backgroundColor: o.palette.grey[300]
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
})
|
|
225
|
+
), Q = t(s, {
|
|
226
|
+
name: "HCInstanceForm",
|
|
227
|
+
slot: "compositeListEnumLabel"
|
|
228
|
+
})(({ theme: o }) => ({
|
|
229
|
+
marginBottom: o.spacing(1)
|
|
230
|
+
})), U = t(i, {
|
|
231
|
+
name: "HCInstanceForm",
|
|
232
|
+
slot: "compositeListEnumEmpty"
|
|
233
|
+
})(({ theme: o }) => ({
|
|
234
|
+
marginBottom: o.spacing(1)
|
|
235
|
+
})), Y = t(e, {
|
|
236
|
+
name: "HCInstanceForm",
|
|
237
|
+
slot: "compositeListShowMoreButton"
|
|
238
|
+
})({
|
|
239
|
+
padding: 0,
|
|
240
|
+
textTransform: "none"
|
|
241
|
+
}), l = (o) => o !== "ownerState", Z = t(n, {
|
|
242
|
+
name: "HCInstanceForm",
|
|
243
|
+
slot: "compositeMatrixContainer",
|
|
244
|
+
shouldForwardProp: l
|
|
245
|
+
})(
|
|
246
|
+
({ theme: o, ownerState: a }) => ({
|
|
247
|
+
position: "relative",
|
|
248
|
+
width: "100%",
|
|
249
|
+
height: "100%",
|
|
250
|
+
...a.variant === "outlined" ? {
|
|
251
|
+
border: "1px solid",
|
|
252
|
+
padding: "2.5px 60px 2.5px 2.5px",
|
|
253
|
+
borderRadius: o.spacing(0.5),
|
|
254
|
+
"& .MuiButton-root": {
|
|
255
|
+
margin: "7px 8px"
|
|
256
|
+
}
|
|
257
|
+
} : {
|
|
258
|
+
borderBottom: "1px solid",
|
|
259
|
+
paddingBottom: o.spacing(0.5)
|
|
260
|
+
},
|
|
261
|
+
borderColor: o.palette.action.disabled,
|
|
262
|
+
"&:hover": {
|
|
263
|
+
borderColor: o.palette.action.active
|
|
264
|
+
}
|
|
265
|
+
})
|
|
266
|
+
), $ = t(i, {
|
|
267
|
+
name: "HCInstanceForm",
|
|
268
|
+
slot: "compositeMatrixLabel"
|
|
269
|
+
})({}), oo = t(n, {
|
|
270
|
+
name: "HCInstanceForm",
|
|
271
|
+
slot: "compositeMatrixValues"
|
|
272
|
+
})(({ theme: o }) => ({
|
|
273
|
+
minHeight: 33,
|
|
274
|
+
paddingTop: o.spacing(1),
|
|
275
|
+
paddingBottom: o.spacing(1),
|
|
276
|
+
overflow: "hidden",
|
|
277
|
+
whiteSpace: "nowrap",
|
|
278
|
+
textOverflow: "ellipsis",
|
|
279
|
+
"& .MuiChip-root": {
|
|
280
|
+
marginRight: o.spacing(0.5),
|
|
281
|
+
marginTop: o.spacing(0.5)
|
|
282
|
+
},
|
|
283
|
+
"& .MuiChip-root:first-of-type": {
|
|
284
|
+
marginLeft: 0
|
|
285
|
+
}
|
|
286
|
+
})), to = t(e, {
|
|
287
|
+
name: "HCInstanceForm",
|
|
288
|
+
slot: "compositeMatrixMiniButton",
|
|
289
|
+
shouldForwardProp: l
|
|
290
|
+
})(
|
|
291
|
+
({ theme: o, ownerState: a }) => ({
|
|
292
|
+
position: "absolute",
|
|
293
|
+
top: 0,
|
|
294
|
+
right: 0,
|
|
295
|
+
fontSize: 10,
|
|
296
|
+
padding: "3px 8px",
|
|
297
|
+
minWidth: "auto",
|
|
298
|
+
boxShadow: o.shadows[1],
|
|
299
|
+
textTransform: "none",
|
|
300
|
+
borderRadius: 13,
|
|
301
|
+
marginLeft: o.spacing(0.5),
|
|
302
|
+
"& .MuiButton-startIcon": {
|
|
303
|
+
marginRight: 0.25,
|
|
304
|
+
"& > :nth-of-type(1)": {
|
|
305
|
+
fontSize: 14
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
...a.variant === "contained" && {
|
|
309
|
+
"&:hover": {
|
|
310
|
+
backgroundColor: o.palette.grey[300],
|
|
311
|
+
boxShadow: o.shadows[1]
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
...a.variant === "text" && {
|
|
315
|
+
backgroundColor: o.palette.common.white,
|
|
316
|
+
"&:hover": {
|
|
317
|
+
backgroundColor: o.palette.grey[300]
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
})
|
|
321
|
+
), no = t(i, {
|
|
322
|
+
name: "HCInstanceForm",
|
|
323
|
+
slot: "compositeMatrixFormLabel"
|
|
324
|
+
})({
|
|
325
|
+
fontWeight: 500
|
|
326
|
+
}), ao = t(C, {
|
|
327
|
+
name: "HCInstanceForm",
|
|
328
|
+
slot: "compositeMatrixFormInput"
|
|
329
|
+
})({
|
|
330
|
+
fontSize: 13,
|
|
331
|
+
flex: 1
|
|
332
|
+
}), io = t(x, {
|
|
333
|
+
name: "HCInstanceForm",
|
|
334
|
+
slot: "compositeMatrixTableContainer"
|
|
335
|
+
})({
|
|
336
|
+
width: "100%",
|
|
337
|
+
"*": { fontSize: 11 }
|
|
338
|
+
}), eo = t(r, {
|
|
339
|
+
name: "HCInstanceForm",
|
|
340
|
+
slot: "compositeMatrixTableHeaderCell"
|
|
341
|
+
})(({ theme: o }) => ({
|
|
342
|
+
fontWeight: 600,
|
|
343
|
+
backgroundColor: o.palette.action.hover
|
|
344
|
+
})), ro = t(r, {
|
|
345
|
+
name: "HCInstanceForm",
|
|
346
|
+
slot: "compositeMatrixTableCell",
|
|
347
|
+
shouldForwardProp: l
|
|
348
|
+
})(
|
|
349
|
+
({ theme: o, ownerState: a }) => ({
|
|
350
|
+
cursor: a.clickable ? "pointer" : "default",
|
|
351
|
+
paddingLeft: o.spacing(1.5),
|
|
352
|
+
paddingRight: o.spacing(1.5),
|
|
353
|
+
paddingTop: o.spacing(0.75),
|
|
354
|
+
paddingBottom: o.spacing(0.75)
|
|
355
|
+
})
|
|
356
|
+
), so = t(r, {
|
|
357
|
+
name: "HCInstanceForm",
|
|
358
|
+
slot: "compositeMatrixEditableHeaderCell"
|
|
359
|
+
})(({ theme: o }) => ({
|
|
360
|
+
backgroundColor: o.palette.action.hover
|
|
361
|
+
})), lo = t(r, {
|
|
362
|
+
name: "HCInstanceForm",
|
|
363
|
+
slot: "compositeMatrixEditableCornerCell"
|
|
364
|
+
})(({ theme: o }) => ({
|
|
365
|
+
fontWeight: 600,
|
|
366
|
+
backgroundColor: o.palette.action.hover,
|
|
367
|
+
width: 120
|
|
368
|
+
})), po = t(r, {
|
|
369
|
+
name: "HCInstanceForm",
|
|
370
|
+
slot: "compositeMatrixEditableRowCell"
|
|
371
|
+
})(({ theme: o }) => ({
|
|
372
|
+
backgroundColor: o.palette.action.hover
|
|
373
|
+
})), co = t(b, {
|
|
374
|
+
name: "HCInstanceForm",
|
|
375
|
+
slot: "compositeMatrixJsonAlert"
|
|
376
|
+
})(({ theme: o }) => ({
|
|
377
|
+
marginBottom: o.spacing(2)
|
|
378
|
+
})), mo = t(u, {
|
|
379
|
+
name: "HCInstanceForm",
|
|
380
|
+
slot: "compositeMatrixEditorDialogTitle"
|
|
381
|
+
})({
|
|
382
|
+
paddingBottom: 0
|
|
383
|
+
}), go = t(i, {
|
|
384
|
+
name: "HCInstanceForm",
|
|
385
|
+
slot: "compositeMatrixEditorDialogTitleLabel"
|
|
386
|
+
})({}), Co = t(F, {
|
|
387
|
+
name: "HCInstanceForm",
|
|
388
|
+
slot: "compositeMatrixEditorTabs"
|
|
389
|
+
})({}), xo = t(f, {
|
|
390
|
+
name: "HCInstanceForm",
|
|
391
|
+
slot: "compositeMatrixEditorTab"
|
|
392
|
+
})(({ theme: o }) => ({
|
|
393
|
+
paddingLeft: 0,
|
|
394
|
+
paddingRight: 0,
|
|
395
|
+
minWidth: "auto",
|
|
396
|
+
textTransform: "none",
|
|
397
|
+
marginRight: o.spacing(2)
|
|
398
|
+
})), bo = t(L, {
|
|
399
|
+
name: "HCInstanceForm",
|
|
400
|
+
slot: "compositeMatrixEditorDialogContent"
|
|
401
|
+
})({
|
|
402
|
+
padding: 0
|
|
403
|
+
}), uo = t(n, {
|
|
404
|
+
name: "HCInstanceForm",
|
|
405
|
+
slot: "compositeMatrixEditorPanel"
|
|
406
|
+
})(({ theme: o }) => ({
|
|
407
|
+
flex: 1,
|
|
408
|
+
paddingLeft: o.spacing(2),
|
|
409
|
+
paddingRight: o.spacing(2),
|
|
410
|
+
paddingTop: o.spacing(2),
|
|
411
|
+
paddingBottom: o.spacing(2)
|
|
412
|
+
})), Fo = t(n, {
|
|
413
|
+
name: "HCInstanceForm",
|
|
414
|
+
slot: "compositeMatrixEditorPreviewDivider"
|
|
415
|
+
})(({ theme: o }) => ({
|
|
416
|
+
alignSelf: "stretch",
|
|
417
|
+
borderLeft: "1px solid",
|
|
418
|
+
borderColor: o.palette.divider
|
|
419
|
+
})), fo = t(n, {
|
|
420
|
+
name: "HCInstanceForm",
|
|
421
|
+
slot: "compositeMatrixEditorPreview"
|
|
422
|
+
})(({ theme: o }) => ({
|
|
423
|
+
flex: 2,
|
|
424
|
+
paddingLeft: o.spacing(2),
|
|
425
|
+
paddingRight: o.spacing(2),
|
|
426
|
+
paddingTop: o.spacing(1),
|
|
427
|
+
paddingBottom: o.spacing(2)
|
|
428
|
+
})), Lo = t(I, {
|
|
429
|
+
name: "HCInstanceForm",
|
|
430
|
+
slot: "compositeMatrixEditorPreviewSwitch"
|
|
431
|
+
})(({ theme: o }) => ({
|
|
432
|
+
marginLeft: 0,
|
|
433
|
+
marginBottom: o.spacing(1)
|
|
434
|
+
}));
|
|
435
|
+
export {
|
|
436
|
+
S as ActionsRow,
|
|
437
|
+
z as CONTAINER_SX,
|
|
438
|
+
P as CancelButton,
|
|
439
|
+
y as CharCount,
|
|
440
|
+
X as CompositeListContainer,
|
|
441
|
+
U as CompositeListEnumEmpty,
|
|
442
|
+
Q as CompositeListEnumLabel,
|
|
443
|
+
_ as CompositeListLabel,
|
|
444
|
+
K as CompositeListMiniButton,
|
|
445
|
+
Y as CompositeListShowMoreButton,
|
|
446
|
+
q as CompositeListValues,
|
|
447
|
+
Z as CompositeMatrixContainer,
|
|
448
|
+
lo as CompositeMatrixEditableCornerCell,
|
|
449
|
+
so as CompositeMatrixEditableHeaderCell,
|
|
450
|
+
po as CompositeMatrixEditableRowCell,
|
|
451
|
+
bo as CompositeMatrixEditorDialogContent,
|
|
452
|
+
mo as CompositeMatrixEditorDialogTitle,
|
|
453
|
+
go as CompositeMatrixEditorDialogTitleLabel,
|
|
454
|
+
uo as CompositeMatrixEditorPanel,
|
|
455
|
+
fo as CompositeMatrixEditorPreview,
|
|
456
|
+
Fo as CompositeMatrixEditorPreviewDivider,
|
|
457
|
+
Lo as CompositeMatrixEditorPreviewSwitch,
|
|
458
|
+
xo as CompositeMatrixEditorTab,
|
|
459
|
+
Co as CompositeMatrixEditorTabs,
|
|
460
|
+
ao as CompositeMatrixFormInput,
|
|
461
|
+
no as CompositeMatrixFormLabel,
|
|
462
|
+
co as CompositeMatrixJsonAlert,
|
|
463
|
+
$ as CompositeMatrixLabel,
|
|
464
|
+
to as CompositeMatrixMiniButton,
|
|
465
|
+
ro as CompositeMatrixTableCell,
|
|
466
|
+
io as CompositeMatrixTableContainer,
|
|
467
|
+
eo as CompositeMatrixTableHeaderCell,
|
|
468
|
+
oo as CompositeMatrixValues,
|
|
469
|
+
h as FieldContainer,
|
|
470
|
+
w as InstanceFormForm,
|
|
471
|
+
H as InstanceFormRoot,
|
|
472
|
+
B as LeftContent,
|
|
473
|
+
v as LeftLabel,
|
|
474
|
+
T as LeftLayout,
|
|
475
|
+
j as PolicyListLabel,
|
|
476
|
+
N as PolicyListRoot,
|
|
477
|
+
D as SaveButton,
|
|
478
|
+
k as SaveButtonsContainer,
|
|
479
|
+
R as SecurityLevelContainer,
|
|
480
|
+
E as TemplateGroup,
|
|
481
|
+
A as TopLabel,
|
|
482
|
+
V as TopLabelAsterisk,
|
|
483
|
+
G as TopLabelDescription,
|
|
484
|
+
W as TopLabelWrapperRoot,
|
|
485
|
+
J as VariableFullWidth,
|
|
486
|
+
O as VariablesContainer
|
|
487
|
+
};
|
|
@@ -1,58 +1,53 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
data:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (!e) return /* @__PURE__ */ r(c, {});
|
|
16
|
-
const a = I(i, e.id);
|
|
17
|
-
return /* @__PURE__ */ m(
|
|
18
|
-
d,
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronRight as h } from "@mui/icons-material";
|
|
3
|
+
import { getPageIcon as I } from "../../utils/ontology.js";
|
|
4
|
+
import { InstanceTable as f } from "../instance-table/index.js";
|
|
5
|
+
import { useInstanceHierarchyTableLogic as x } from "./logic.js";
|
|
6
|
+
import { HierarchyRoot as y, Accordion as b, AccordionSummary as g, TemplateIcon as H, TemplateName as T, CountChip as C, HierarchyLabel as v, AccordionDetails as A } from "./styled.js";
|
|
7
|
+
const z = (r) => {
|
|
8
|
+
const { state: l, actions: s } = x(r), { ownerState: m } = l, { data: a, templates: o, ...d } = r;
|
|
9
|
+
return !a || !a.results ? null : /* @__PURE__ */ e(y, { ownerState: m, sx: r.sx, children: a.results.map((n, p) => {
|
|
10
|
+
const t = o.get(n.templateId);
|
|
11
|
+
if (!t) return null;
|
|
12
|
+
const c = I(o, t.id);
|
|
13
|
+
return /* @__PURE__ */ i(
|
|
14
|
+
b,
|
|
19
15
|
{
|
|
20
16
|
defaultExpanded: !0,
|
|
21
17
|
disableGutters: !0,
|
|
22
18
|
elevation: 0,
|
|
23
19
|
square: !0,
|
|
24
20
|
children: [
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
|
|
21
|
+
/* @__PURE__ */ i(g, { expandIcon: /* @__PURE__ */ e(h, {}), children: [
|
|
22
|
+
/* @__PURE__ */ e(H, { src: c }),
|
|
23
|
+
/* @__PURE__ */ e(T, { children: t.name }),
|
|
24
|
+
/* @__PURE__ */ e(
|
|
25
|
+
C,
|
|
30
26
|
{
|
|
31
27
|
color: "primary",
|
|
32
|
-
label:
|
|
33
|
-
size: "small"
|
|
34
|
-
sx: { height: 20, ml: 1 }
|
|
28
|
+
label: n.totalInstanceCount,
|
|
29
|
+
size: "small"
|
|
35
30
|
}
|
|
36
31
|
),
|
|
37
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ e(v, { variant: "caption", children: s.getHierarchy(t) })
|
|
38
33
|
] }),
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
34
|
+
/* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
|
|
35
|
+
f,
|
|
41
36
|
{
|
|
42
|
-
data:
|
|
43
|
-
...
|
|
44
|
-
templateId:
|
|
37
|
+
data: n.instances.map((u) => ({
|
|
38
|
+
...u,
|
|
39
|
+
templateId: t.id
|
|
45
40
|
})),
|
|
46
|
-
template: { ...
|
|
47
|
-
...
|
|
41
|
+
template: { ...t, icon: c },
|
|
42
|
+
...d
|
|
48
43
|
}
|
|
49
44
|
) })
|
|
50
45
|
]
|
|
51
46
|
},
|
|
52
|
-
|
|
47
|
+
p
|
|
53
48
|
);
|
|
54
|
-
});
|
|
49
|
+
}) });
|
|
55
50
|
};
|
|
56
51
|
export {
|
|
57
|
-
|
|
52
|
+
z as InstanceHierarchyTable
|
|
58
53
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useThemeProps as o } from "@mui/material";
|
|
2
|
+
import { getTemplateHierarchy as c } from "../../utils/ontology.js";
|
|
3
|
+
const m = (t) => {
|
|
4
|
+
const e = o({
|
|
5
|
+
props: t,
|
|
6
|
+
name: "HCInstanceHierarchyTable"
|
|
7
|
+
}), a = { ...e };
|
|
8
|
+
return {
|
|
9
|
+
refs: {},
|
|
10
|
+
state: { ownerState: a },
|
|
11
|
+
actions: { getHierarchy: (r) => r ? c(e.templates, r).map((n) => n.name).join(" / ") : " " }
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
m as useInstanceHierarchyTableLogic
|
|
16
|
+
};
|