@hybridcore/ui 1.6.0 → 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/{AccordionSummary-DgAwVTk8.js → AccordionSummary-CMg08YSA.js} +20 -23
- package/dist/{Add-DJLrrVHm.js → Add-DuVVJeQU.js} +65 -67
- package/dist/{ButtonBase-2bPw77UP.js → ButtonBase-sObABYY2.js} +60 -56
- package/dist/{Delete-CW0UZv1m.js → Delete-fBLhTHbF.js} +1 -1
- package/dist/{DialogContent-B3nbEbuv.js → DialogContent-CGJ7alb8.js} +8 -10
- package/dist/{FormControl-BLbrq4C7.js → FormControl-BCurCxRj.js} +377 -719
- package/dist/FormControlLabel-BkRfrhNy.js +601 -0
- package/dist/{IconButton-CHwRQF-g.js → IconButton-_opV1iNK.js} +26 -28
- package/dist/{InputAdornment-DLxWUE6H.js → InputAdornment-C7PEvvYr.js} +16 -18
- package/dist/InputLabel-rEwwnD4_.js +354 -0
- package/dist/{MenuItem-xZx_w7zA.js → MenuItem-DrE50M_p.js} +92 -70
- package/dist/Modal-DlB6GH-f.js +1659 -0
- package/dist/Paper-q9kKjAKx.js +527 -0
- package/dist/{Select-BgYwkZgI.js → TextField-DSDIEEKu.js} +1449 -901
- package/dist/{Typography-CxbneZy_.js → Typography-B-Z5Y0Xq.js} +46 -48
- package/dist/{capitalize-ciszXJ7R.js → capitalize-quqpGCFu.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/collapsible-card/index.js +1 -1
- package/dist/components/collapsible-card/styled.js +1 -1
- 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-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 +1 -1
- package/dist/components/geometry-picker/index.js +13 -12
- package/dist/components/instance-form/components/composite-list/index.js +1 -1
- 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/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/loading/index.js +15 -9
- package/dist/components/loading/logic.js +15 -0
- package/dist/components/loading/styled.js +26 -19
- 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 +1 -1
- 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 +4222 -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 +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/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/{createSvgIcon-BjpIhJ30.js → createSvgIcon-BM3-TsGy.js} +25 -26
- package/dist/{createSvgIcon-DrtgaibK.js → createSvgIcon-DX-SqL8M.js} +23 -25
- package/dist/{dialog-DcwXug9J.js → dialog-cf4HUXXl.js} +26 -27
- package/dist/{index-syTc6m_V.js → index-C8C3YXle.js} +92 -94
- package/dist/{index-CcdvNlgr.js → index-DPKUmQnz.js} +11 -13
- package/dist/isMuiElement-BkJ72LB3.js +26 -0
- package/dist/main.d.ts +734 -298
- package/dist/main.js +15 -15
- package/dist/{property-list-form-zZQfpR0X.js → property-list-form-DL_dEoNn.js} +56 -61
- package/dist/{createTheme-DYxDnE9u.js → styled-Bsjp3kFh.js} +232 -176
- package/dist/{useMobilePicker-BLg3Blg8.js → useMobilePicker-B-M3dnTn.js} +2692 -2288
- package/dist/{utils-Bq0ye5vf.js → utils-Cxu-fHjQ.js} +7 -7
- package/package.json +1 -1
- package/dist/Box-p6OtTUEo.js +0 -30
- package/dist/Button-CvE2gnly.js +0 -370
- package/dist/CardContent-CSHh-ZlM.js +0 -74
- package/dist/Checkbox-CWRMFTBp.js +0 -421
- package/dist/FormControlLabel-C8SPv14J.js +0 -195
- 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/TextField-1yCesIbH.js +0 -457
- package/dist/components/key-protection/menu.js +0 -85
- package/dist/components/treeview-filter/item/styled.js +0 -39
- package/dist/debounce-46wSf_lW.js +0 -15
- package/dist/isHostComponent-kiaBvYVo.js +0 -6
- package/dist/isMuiElement-CxT3_ACP.js +0 -13
- package/dist/listItemTextClasses-C3lndiXO.js +0 -16
- package/dist/styled-eZwjUruw.js +0 -12
- package/dist/useFormControl-CatNKXAi.js +0 -10
- package/dist/useThemeProps-BzzHcQyd.js +0 -58
- package/dist/utils-BDNynJcd.js +0 -365
|
@@ -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
|
};
|