@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,84 @@
|
|
|
1
|
+
import { styled as e, TextField as l, FormGroup as a, Box as o, Button as m, FormLabel as n } from "@mui/material";
|
|
2
|
+
const s = e("form", {
|
|
3
|
+
name: "HCTemplateForm",
|
|
4
|
+
slot: "root"
|
|
5
|
+
})({}), p = e(l, {
|
|
6
|
+
name: "HCTemplateForm",
|
|
7
|
+
slot: "field"
|
|
8
|
+
})(({ theme: t }) => ({
|
|
9
|
+
marginBottom: t.spacing(2)
|
|
10
|
+
})), c = e(a, {
|
|
11
|
+
name: "HCTemplateForm",
|
|
12
|
+
slot: "fieldGroup"
|
|
13
|
+
})(({ theme: t }) => ({
|
|
14
|
+
marginBottom: t.spacing(2)
|
|
15
|
+
})), i = e(a, {
|
|
16
|
+
name: "HCTemplateForm",
|
|
17
|
+
slot: "checkboxesRow"
|
|
18
|
+
})(({ theme: t }) => ({
|
|
19
|
+
marginBottom: t.spacing(2)
|
|
20
|
+
})), T = e(o, {
|
|
21
|
+
name: "HCTemplateForm",
|
|
22
|
+
slot: "actionsRow"
|
|
23
|
+
})(({ theme: t }) => ({
|
|
24
|
+
display: "flex",
|
|
25
|
+
justifyContent: "space-between",
|
|
26
|
+
marginTop: t.spacing(3)
|
|
27
|
+
})), F = e(o, {
|
|
28
|
+
name: "HCTemplateForm",
|
|
29
|
+
slot: "actionsRight"
|
|
30
|
+
})({}), C = e(m, {
|
|
31
|
+
name: "HCTemplateForm",
|
|
32
|
+
slot: "cancelButton"
|
|
33
|
+
})({
|
|
34
|
+
textTransform: "none"
|
|
35
|
+
}), f = e(m, {
|
|
36
|
+
name: "HCTemplateForm",
|
|
37
|
+
slot: "saveButton"
|
|
38
|
+
})({
|
|
39
|
+
textTransform: "none"
|
|
40
|
+
}), g = e(m, {
|
|
41
|
+
name: "HCTemplateForm",
|
|
42
|
+
slot: "extraSaveButton"
|
|
43
|
+
})(({ theme: t }) => ({
|
|
44
|
+
marginLeft: t.spacing(1),
|
|
45
|
+
textTransform: "none"
|
|
46
|
+
})), u = e(n, {
|
|
47
|
+
name: "HCTemplateForm",
|
|
48
|
+
slot: "topLabel"
|
|
49
|
+
})(({ theme: t }) => ({
|
|
50
|
+
display: "block",
|
|
51
|
+
marginBottom: t.spacing(0.5)
|
|
52
|
+
})), B = e(o, {
|
|
53
|
+
name: "HCTemplateForm",
|
|
54
|
+
slot: "leftLayout"
|
|
55
|
+
})(({ theme: t }) => ({
|
|
56
|
+
display: "flex",
|
|
57
|
+
alignItems: "center",
|
|
58
|
+
marginBottom: t.spacing(2)
|
|
59
|
+
})), H = e(n, {
|
|
60
|
+
name: "HCTemplateForm",
|
|
61
|
+
slot: "leftLabel"
|
|
62
|
+
})({
|
|
63
|
+
width: "32%"
|
|
64
|
+
}), x = e(o, {
|
|
65
|
+
name: "HCTemplateForm",
|
|
66
|
+
slot: "leftContent"
|
|
67
|
+
})({
|
|
68
|
+
width: "68%"
|
|
69
|
+
});
|
|
70
|
+
export {
|
|
71
|
+
F as TemplateFormActionsRight,
|
|
72
|
+
T as TemplateFormActionsRow,
|
|
73
|
+
C as TemplateFormCancelButton,
|
|
74
|
+
i as TemplateFormCheckboxesRow,
|
|
75
|
+
g as TemplateFormExtraSaveButton,
|
|
76
|
+
p as TemplateFormField,
|
|
77
|
+
c as TemplateFormFieldGroup,
|
|
78
|
+
x as TemplateFormLeftContent,
|
|
79
|
+
H as TemplateFormLeftLabel,
|
|
80
|
+
B as TemplateFormLeftLayout,
|
|
81
|
+
s as TemplateFormRoot,
|
|
82
|
+
f as TemplateFormSaveButton,
|
|
83
|
+
u as TemplateFormTopLabel
|
|
84
|
+
};
|
|
@@ -1,110 +1,60 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fieldOptions: i,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
);
|
|
21
|
-
const o = s.get(n, r);
|
|
22
|
-
s.values(o).filter((l) => !(s.isArray(l) && l.length === 0 || l === "")).length === 0 && t !== -1 ? e.filters.splice(t, 1) : t !== -1 ? e.filters[t] = {
|
|
23
|
-
fieldName: r,
|
|
24
|
-
value: o
|
|
25
|
-
} : e.filters.push({
|
|
26
|
-
fieldName: r,
|
|
27
|
-
value: o
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
g(f, e);
|
|
31
|
-
} else console.warn("Template could not be found!");
|
|
32
|
-
};
|
|
33
|
-
if (f.length === 1) {
|
|
34
|
-
const a = f[0], n = h.get(a.templateKey);
|
|
35
|
-
return /* @__PURE__ */ d(c, { display: "flex", flexDirection: "column", children: n == null ? void 0 : n.properties.filter((e) => {
|
|
36
|
-
var r;
|
|
37
|
-
return i ? !((r = i[e.propertyId]) != null && r.hidden) : !0;
|
|
38
|
-
}).map((e, r) => {
|
|
39
|
-
var l;
|
|
40
|
-
let t = {};
|
|
41
|
-
const o = a.filters.find(
|
|
42
|
-
(u) => u.fieldName === e.propertyId
|
|
1
|
+
import { jsx as t, jsxs as h, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { Box as v } from "@mui/material";
|
|
3
|
+
import { TemplatePropertyFiltersRoot as f, Accordion as A, AccordionSummary as F, AccordionTitle as T, AccordionDetails as C, ExpandIcon as K, CollapseIcon as N } from "./styled.js";
|
|
4
|
+
import { useTemplatePropertyFiltersLogic as b } from "./logic.js";
|
|
5
|
+
import { Property as j } from "./property.js";
|
|
6
|
+
const E = /* @__PURE__ */ h(P, { children: [
|
|
7
|
+
/* @__PURE__ */ t(K, { className: "expandIcon" }),
|
|
8
|
+
/* @__PURE__ */ t(N, { className: "collapseIcon" })
|
|
9
|
+
] }), w = (i) => {
|
|
10
|
+
const { state: x, actions: I } = b(i), { ownerState: l } = x, { values: c, templates: s, inputVariant: y, fieldOptions: n } = i, d = (o) => {
|
|
11
|
+
const e = s.get(o.templateKey);
|
|
12
|
+
return e == null ? void 0 : e.properties.filter((r) => {
|
|
13
|
+
var a;
|
|
14
|
+
return n ? !((a = n[r.propertyId]) != null && a.hidden) : !0;
|
|
15
|
+
}).map((r, a) => {
|
|
16
|
+
var u;
|
|
17
|
+
let p = {};
|
|
18
|
+
const m = o.filters.find(
|
|
19
|
+
(g) => g.fieldName === r.propertyId
|
|
43
20
|
);
|
|
44
|
-
return
|
|
45
|
-
|
|
21
|
+
return m && (p = m.value), /* @__PURE__ */ t(
|
|
22
|
+
v,
|
|
46
23
|
{
|
|
47
|
-
...
|
|
48
|
-
order:
|
|
24
|
+
...n && ((u = n[r.propertyId]) == null ? void 0 : u.order) && {
|
|
25
|
+
order: n[r.propertyId].order
|
|
49
26
|
},
|
|
50
|
-
children: /* @__PURE__ */
|
|
51
|
-
|
|
27
|
+
children: /* @__PURE__ */ t(
|
|
28
|
+
j,
|
|
52
29
|
{
|
|
53
|
-
property:
|
|
54
|
-
value:
|
|
30
|
+
property: r,
|
|
31
|
+
value: p,
|
|
55
32
|
size: "small",
|
|
56
|
-
variant:
|
|
57
|
-
onChange:
|
|
33
|
+
variant: y,
|
|
34
|
+
onChange: I.handleOnChange(e == null ? void 0 : e.templateKey)
|
|
58
35
|
}
|
|
59
36
|
)
|
|
60
37
|
},
|
|
61
|
-
|
|
38
|
+
a
|
|
62
39
|
);
|
|
63
|
-
})
|
|
64
|
-
}
|
|
65
|
-
return f.map((
|
|
66
|
-
const
|
|
67
|
-
return /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
return c.length === 1 ? /* @__PURE__ */ t(f, { ownerState: l, sx: i.sx, children: d(c[0]) }) : /* @__PURE__ */ t(f, { ownerState: l, sx: i.sx, children: c.map((o, e) => {
|
|
43
|
+
const r = s.get(o.templateKey);
|
|
44
|
+
return /* @__PURE__ */ h(A, { disableGutters: !0, elevation: 0, square: !0, children: [
|
|
45
|
+
/* @__PURE__ */ t(
|
|
46
|
+
F,
|
|
70
47
|
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
48
|
+
expandIcon: E,
|
|
49
|
+
"aria-controls": `panel${e}-content`,
|
|
50
|
+
id: `panel${e}-header`,
|
|
51
|
+
children: /* @__PURE__ */ t(T, { variant: "body2", children: r == null ? void 0 : r.name })
|
|
74
52
|
}
|
|
75
53
|
),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}).map((r, t) => {
|
|
80
|
-
var u;
|
|
81
|
-
let o = {};
|
|
82
|
-
const l = a.filters.find(
|
|
83
|
-
(v) => v.fieldName === r.propertyId
|
|
84
|
-
);
|
|
85
|
-
return l && (o = l.value), /* @__PURE__ */ d(
|
|
86
|
-
c,
|
|
87
|
-
{
|
|
88
|
-
...i && ((u = i[r.propertyId]) == null ? void 0 : u.order) && {
|
|
89
|
-
order: i[r.propertyId].order
|
|
90
|
-
},
|
|
91
|
-
children: /* @__PURE__ */ d(
|
|
92
|
-
y,
|
|
93
|
-
{
|
|
94
|
-
property: r,
|
|
95
|
-
value: o,
|
|
96
|
-
size: "small",
|
|
97
|
-
variant: m,
|
|
98
|
-
onChange: p(e == null ? void 0 : e.templateKey)
|
|
99
|
-
}
|
|
100
|
-
)
|
|
101
|
-
},
|
|
102
|
-
t
|
|
103
|
-
);
|
|
104
|
-
}) })
|
|
105
|
-
] }, n);
|
|
106
|
-
});
|
|
54
|
+
/* @__PURE__ */ t(C, { children: d(o) })
|
|
55
|
+
] }, e);
|
|
56
|
+
}) });
|
|
107
57
|
};
|
|
108
58
|
export {
|
|
109
|
-
|
|
59
|
+
w as TemplatePropertyFilters
|
|
110
60
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useThemeProps as d } from "@mui/material";
|
|
2
|
+
import s from "lodash";
|
|
3
|
+
const x = (p) => {
|
|
4
|
+
const l = d({
|
|
5
|
+
props: p,
|
|
6
|
+
name: "HCTemplatePropertyFilters"
|
|
7
|
+
}), { values: i, onChange: u } = l, c = { ...l };
|
|
8
|
+
return {
|
|
9
|
+
refs: {},
|
|
10
|
+
state: { ownerState: c },
|
|
11
|
+
actions: { handleOnChange: (a) => (f) => {
|
|
12
|
+
if (!a) {
|
|
13
|
+
console.warn("Template could not be found!");
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const t = i.find((e) => e.templateKey === a);
|
|
17
|
+
if (!t) return;
|
|
18
|
+
const n = s.keys(f)[0], o = s.get(f, n), r = t.filters.findIndex(
|
|
19
|
+
(e) => e.fieldName === n
|
|
20
|
+
);
|
|
21
|
+
s.values(o).filter((e) => !(s.isArray(e) && e.length === 0 || e === "")).length === 0 && r !== -1 ? t.filters.splice(r, 1) : r !== -1 ? t.filters[r] = { fieldName: n, value: o } : t.filters.push({ fieldName: n, value: o }), u(i, t);
|
|
22
|
+
} }
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
x as useTemplatePropertyFiltersLogic
|
|
27
|
+
};
|
|
@@ -1,247 +1,187 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
),
|
|
32
|
-
[s]: n
|
|
33
|
-
});
|
|
34
|
-
}, g = (l) => (n) => {
|
|
35
|
-
let o = { ...a };
|
|
36
|
-
o[l] = f(n).format("YYYY-MM-DD"), p({
|
|
37
|
-
[e.propertyId]: o
|
|
38
|
-
});
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { KeyboardArrowUp as D, KeyboardArrowDown as F } from "@mui/icons-material";
|
|
3
|
+
import { TextField as y, FormControlLabel as R, Checkbox as E, FormControl as A, FormGroup as B } from "@mui/material";
|
|
4
|
+
import { DatePicker as S } from "@mui/x-date-pickers";
|
|
5
|
+
import d from "dayjs";
|
|
6
|
+
import { useState as W } from "react";
|
|
7
|
+
import { PropertyContainer as m, PropertyLabel as f, INPUT_FONT_SX as O, PropertyRangeRow as T, PropertyRangeSeparator as V, DATE_PICKER_SLOT_PROPS as _, PropertyEnumLabel as z, PropertyEnumItem as N, PropertyEnumCheckbox as j, PropertyShowMoreButton as K, SHOW_MORE_ICON_SX as M } from "./styled.js";
|
|
8
|
+
const v = 10, H = {
|
|
9
|
+
typography: { variant: "body2", fontSize: 13 }
|
|
10
|
+
}, U = {
|
|
11
|
+
typography: { fontSize: 13 }
|
|
12
|
+
}, ee = (w) => {
|
|
13
|
+
var P, b, g, I, C;
|
|
14
|
+
const {
|
|
15
|
+
property: e,
|
|
16
|
+
value: r,
|
|
17
|
+
size: s = "medium",
|
|
18
|
+
variant: u = "outlined",
|
|
19
|
+
onChange: h
|
|
20
|
+
} = w, c = (o) => (n) => {
|
|
21
|
+
const a = { ...r }, l = n.target.type === "checkbox" ? n.target.checked : n.target.value;
|
|
22
|
+
a[o] = String(l), h({ [n.target.name]: a });
|
|
23
|
+
}, Y = (o) => {
|
|
24
|
+
var L;
|
|
25
|
+
const n = { ...r }, { value: a, checked: l, name: p } = o.target;
|
|
26
|
+
l ? (n.atLeastOneOf || (n.atLeastOneOf = []), n.atLeastOneOf.push(a)) : n.atLeastOneOf = (L = n.atLeastOneOf) == null ? void 0 : L.filter(
|
|
27
|
+
(k) => k !== a
|
|
28
|
+
), h({ [p]: n });
|
|
29
|
+
}, x = (o) => (n) => {
|
|
30
|
+
const a = { ...r };
|
|
31
|
+
a[o] = d(n).format("YYYY-MM-DD"), h({ [e.propertyId]: a });
|
|
39
32
|
};
|
|
40
33
|
if (["string", "text", "list"].includes(e.type))
|
|
41
|
-
return /* @__PURE__ */ m
|
|
42
|
-
/* @__PURE__ */ t(
|
|
34
|
+
return /* @__PURE__ */ i(m, { children: [
|
|
35
|
+
/* @__PURE__ */ t(f, { variant: "caption", children: e.name }),
|
|
43
36
|
/* @__PURE__ */ t(
|
|
44
|
-
|
|
37
|
+
y,
|
|
45
38
|
{
|
|
46
39
|
name: e.propertyId,
|
|
47
|
-
value:
|
|
48
|
-
size:
|
|
49
|
-
onChange:
|
|
40
|
+
value: r.exact ?? e.defaultValue ?? "",
|
|
41
|
+
size: s,
|
|
42
|
+
onChange: c("exact"),
|
|
50
43
|
variant: u,
|
|
51
44
|
type: "text",
|
|
52
45
|
multiline: e.type === "text",
|
|
53
46
|
disabled: !e.editable,
|
|
54
47
|
fullWidth: !0,
|
|
55
|
-
InputProps: {
|
|
56
|
-
sx: { fontSize: 12 }
|
|
57
|
-
}
|
|
48
|
+
InputProps: { sx: O }
|
|
58
49
|
}
|
|
59
50
|
)
|
|
60
51
|
] });
|
|
61
52
|
if (["integer", "double", "long", "byte"].includes(e.type))
|
|
62
|
-
return /* @__PURE__ */ m
|
|
63
|
-
/* @__PURE__ */ t(
|
|
64
|
-
/* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ i(m, { children: [
|
|
54
|
+
/* @__PURE__ */ t(f, { variant: "caption", children: e.name }),
|
|
55
|
+
/* @__PURE__ */ i(T, { children: [
|
|
65
56
|
/* @__PURE__ */ t(
|
|
66
|
-
|
|
57
|
+
y,
|
|
67
58
|
{
|
|
68
59
|
name: e.propertyId,
|
|
69
|
-
value:
|
|
70
|
-
size:
|
|
71
|
-
onChange:
|
|
60
|
+
value: r.min ?? e.defaultValue ?? "",
|
|
61
|
+
size: s,
|
|
62
|
+
onChange: c("min"),
|
|
72
63
|
variant: u,
|
|
73
64
|
type: "number",
|
|
74
65
|
disabled: !e.editable,
|
|
75
66
|
fullWidth: !0,
|
|
76
|
-
InputProps: {
|
|
77
|
-
placeholder: "Min",
|
|
78
|
-
sx: { fontSize: 12 }
|
|
79
|
-
}
|
|
67
|
+
InputProps: { placeholder: "Min", sx: O }
|
|
80
68
|
}
|
|
81
69
|
),
|
|
82
|
-
/* @__PURE__ */ t(
|
|
70
|
+
/* @__PURE__ */ t(V, { children: "-" }),
|
|
83
71
|
/* @__PURE__ */ t(
|
|
84
|
-
|
|
72
|
+
y,
|
|
85
73
|
{
|
|
86
74
|
name: e.propertyId,
|
|
87
|
-
value:
|
|
88
|
-
size:
|
|
89
|
-
onChange:
|
|
75
|
+
value: r.max ?? e.defaultValue ?? "",
|
|
76
|
+
size: s,
|
|
77
|
+
onChange: c("max"),
|
|
90
78
|
variant: u,
|
|
91
79
|
type: "number",
|
|
92
80
|
disabled: !e.editable,
|
|
93
81
|
fullWidth: !0,
|
|
94
|
-
InputProps: {
|
|
95
|
-
placeholder: "Max",
|
|
96
|
-
sx: { fontSize: 12 }
|
|
97
|
-
}
|
|
82
|
+
InputProps: { placeholder: "Max", sx: O }
|
|
98
83
|
}
|
|
99
84
|
)
|
|
100
85
|
] })
|
|
101
86
|
] });
|
|
102
87
|
if (e.type === "date") {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
88
|
+
const o = "YYYY-MM-DD", n = "DD/MM/YYYY", a = r.min && d(r.min, o, !0).isValid() ? d(r.min, o) : null, l = r.max && d(r.max, o, !0).isValid() ? d(r.max, o) : null, p = {
|
|
89
|
+
..._,
|
|
90
|
+
textField: {
|
|
91
|
+
..._.textField,
|
|
92
|
+
variant: u,
|
|
93
|
+
name: e.propertyId,
|
|
94
|
+
size: s
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
return /* @__PURE__ */ i(m, { children: [
|
|
98
|
+
/* @__PURE__ */ t(f, { variant: "caption", children: e.name }),
|
|
99
|
+
/* @__PURE__ */ i(T, { children: [
|
|
107
100
|
/* @__PURE__ */ t(
|
|
108
|
-
|
|
101
|
+
S,
|
|
109
102
|
{
|
|
110
103
|
label: "From",
|
|
111
|
-
value:
|
|
112
|
-
format:
|
|
104
|
+
value: a,
|
|
105
|
+
format: n,
|
|
113
106
|
views: ["year", "month", "day"],
|
|
114
|
-
slotProps:
|
|
115
|
-
|
|
116
|
-
variant: u,
|
|
117
|
-
name: e.propertyId,
|
|
118
|
-
size: d,
|
|
119
|
-
fullWidth: !0,
|
|
120
|
-
inputProps: { sx: { fontSize: 12 } },
|
|
121
|
-
InputLabelProps: { sx: { fontSize: 12 } }
|
|
122
|
-
},
|
|
123
|
-
inputAdornment: {
|
|
124
|
-
sx: {
|
|
125
|
-
"& .MuiSvgIcon-root": {
|
|
126
|
-
fontSize: 16
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
onChange: g("min")
|
|
107
|
+
slotProps: p,
|
|
108
|
+
onChange: x("min")
|
|
132
109
|
}
|
|
133
110
|
),
|
|
134
|
-
/* @__PURE__ */ t(
|
|
111
|
+
/* @__PURE__ */ t(V, { children: "-" }),
|
|
135
112
|
/* @__PURE__ */ t(
|
|
136
|
-
|
|
113
|
+
S,
|
|
137
114
|
{
|
|
138
115
|
label: "To",
|
|
139
|
-
value:
|
|
140
|
-
format:
|
|
141
|
-
minDate:
|
|
116
|
+
value: l,
|
|
117
|
+
format: n,
|
|
118
|
+
minDate: a !== null ? a : void 0,
|
|
142
119
|
views: ["year", "month", "day"],
|
|
143
|
-
slotProps:
|
|
144
|
-
|
|
145
|
-
variant: u,
|
|
146
|
-
name: e.propertyId,
|
|
147
|
-
size: d,
|
|
148
|
-
fullWidth: !0,
|
|
149
|
-
inputProps: { sx: { fontSize: 12 } },
|
|
150
|
-
InputLabelProps: { sx: { fontSize: 12 } }
|
|
151
|
-
},
|
|
152
|
-
inputAdornment: {
|
|
153
|
-
sx: {
|
|
154
|
-
"& .MuiSvgIcon-root": {
|
|
155
|
-
fontSize: 16
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
onChange: g("max")
|
|
120
|
+
slotProps: p,
|
|
121
|
+
onChange: x("max")
|
|
161
122
|
}
|
|
162
123
|
)
|
|
163
124
|
] })
|
|
164
125
|
] });
|
|
165
126
|
}
|
|
166
127
|
if (e.type === "boolean")
|
|
167
|
-
return /* @__PURE__ */ t(
|
|
168
|
-
|
|
128
|
+
return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(
|
|
129
|
+
R,
|
|
169
130
|
{
|
|
170
131
|
label: e.name,
|
|
171
132
|
control: /* @__PURE__ */ t(
|
|
172
|
-
|
|
133
|
+
E,
|
|
173
134
|
{
|
|
174
|
-
size:
|
|
135
|
+
size: s,
|
|
175
136
|
name: e.propertyId,
|
|
176
|
-
checked: !!
|
|
177
|
-
onChange:
|
|
137
|
+
checked: !!r,
|
|
138
|
+
onChange: c("exact")
|
|
178
139
|
}
|
|
179
140
|
),
|
|
180
|
-
slotProps:
|
|
181
|
-
typography: {
|
|
182
|
-
fontSize: 13
|
|
183
|
-
}
|
|
184
|
-
}
|
|
141
|
+
slotProps: U
|
|
185
142
|
}
|
|
186
143
|
) });
|
|
187
|
-
if (e.type === "enum" || e.type === "composite-list" && ((
|
|
188
|
-
const [
|
|
189
|
-
let
|
|
190
|
-
return (
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */ t(
|
|
193
|
-
/* @__PURE__ */ t(
|
|
194
|
-
|
|
144
|
+
if (e.type === "enum" || e.type === "composite-list" && ((b = (P = e.dataTypeInfo) == null ? void 0 : P.innerType) == null ? void 0 : b.type) === "enum") {
|
|
145
|
+
const [o, n] = W(!1);
|
|
146
|
+
let a = [];
|
|
147
|
+
return (g = e.dataTypeInfo) != null && g.enumValues && (a = e.dataTypeInfo.enumValues), (C = (I = e.dataTypeInfo) == null ? void 0 : I.innerType) != null && C.enumValues && (a = e.dataTypeInfo.innerType.enumValues), /* @__PURE__ */ i(m, { children: [
|
|
148
|
+
/* @__PURE__ */ i(A, { fullWidth: !0, component: "fieldset", variant: u, children: [
|
|
149
|
+
/* @__PURE__ */ t(z, { children: e.name }),
|
|
150
|
+
/* @__PURE__ */ t(B, { children: a.slice(0, o ? 9999 : v).map((l, p) => /* @__PURE__ */ t(
|
|
151
|
+
N,
|
|
195
152
|
{
|
|
196
|
-
label:
|
|
153
|
+
label: l,
|
|
197
154
|
control: /* @__PURE__ */ t(
|
|
198
|
-
|
|
155
|
+
j,
|
|
199
156
|
{
|
|
200
157
|
name: e.propertyId,
|
|
201
|
-
value:
|
|
158
|
+
value: l,
|
|
202
159
|
size: "small",
|
|
203
|
-
checked:
|
|
204
|
-
onChange:
|
|
205
|
-
sx: {
|
|
206
|
-
p: 0,
|
|
207
|
-
mr: 1,
|
|
208
|
-
"& .MuiSvgIcon-root": {
|
|
209
|
-
fontSize: 16
|
|
210
|
-
}
|
|
211
|
-
}
|
|
160
|
+
checked: r.atLeastOneOf ? r.atLeastOneOf.includes(l) : !1,
|
|
161
|
+
onChange: Y
|
|
212
162
|
}
|
|
213
163
|
),
|
|
214
|
-
componentsProps:
|
|
215
|
-
typography: {
|
|
216
|
-
variant: "body2",
|
|
217
|
-
fontSize: 13
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
sx: {
|
|
221
|
-
m: 0,
|
|
222
|
-
mb: 1
|
|
223
|
-
}
|
|
164
|
+
componentsProps: H
|
|
224
165
|
},
|
|
225
|
-
|
|
166
|
+
p
|
|
226
167
|
)) })
|
|
227
168
|
] }),
|
|
228
|
-
|
|
229
|
-
|
|
169
|
+
a.length > v && /* @__PURE__ */ i(
|
|
170
|
+
K,
|
|
230
171
|
{
|
|
231
172
|
size: "small",
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
onClick: () => n((s) => !s),
|
|
173
|
+
endIcon: o ? /* @__PURE__ */ t(D, { sx: M }) : /* @__PURE__ */ t(F, { sx: M }),
|
|
174
|
+
onClick: () => n((l) => !l),
|
|
235
175
|
children: [
|
|
236
176
|
"Show ",
|
|
237
|
-
|
|
177
|
+
o ? "Less" : "More"
|
|
238
178
|
]
|
|
239
179
|
}
|
|
240
180
|
)
|
|
241
181
|
] });
|
|
242
182
|
}
|
|
243
|
-
return
|
|
183
|
+
return null;
|
|
244
184
|
};
|
|
245
185
|
export {
|
|
246
|
-
|
|
186
|
+
ee as Property
|
|
247
187
|
};
|