@hybridcore/ui 1.6.23 → 1.6.24
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/components/instance-form/components/composite-list/index.js +1 -1
- package/dist/components/instance-form/components/variable/index.js +1 -1
- package/dist/components/instance-form/components/variables/index.js +25 -23
- package/dist/components/instance-form/index.js +41 -39
- package/dist/components/instance-form/logic.js +41 -40
- package/dist/components/instance-variable-list/variable.js +14 -12
- package/dist/components/property-mapping/index.js +1 -1
- package/dist/components/template-form/components/property-list/property-list-columns.js +36 -29
- package/dist/components/template-form/components/property-list/property-list-form.js +332 -269
- package/dist/components/template-property-filters/index.js +25 -25
- package/dist/components/template-property-filters/logic.js +12 -10
- package/dist/constants/index.js +1 -0
- package/dist/{index-BtlzPygz.js → index-BQ4_OA4b.js} +103 -101
- package/dist/main.d.ts +14 -3
- package/package.json +1 -1
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { Box as
|
|
3
|
-
import { TemplatePropertyFiltersRoot as
|
|
4
|
-
import { useTemplatePropertyFiltersLogic as
|
|
5
|
-
import { Property as
|
|
6
|
-
const
|
|
7
|
-
/* @__PURE__ */ t(
|
|
8
|
-
/* @__PURE__ */ t(
|
|
9
|
-
] }),
|
|
10
|
-
const { state:
|
|
1
|
+
import { jsx as t, jsxs as x, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { Box as A } from "@mui/material";
|
|
3
|
+
import { TemplatePropertyFiltersRoot as h, Accordion as F, AccordionSummary as T, AccordionTitle as C, AccordionDetails as K, ExpandIcon as N, CollapseIcon as b } from "./styled.js";
|
|
4
|
+
import { useTemplatePropertyFiltersLogic as j } from "./logic.js";
|
|
5
|
+
import { Property as E } from "./property.js";
|
|
6
|
+
const O = /* @__PURE__ */ x(v, { children: [
|
|
7
|
+
/* @__PURE__ */ t(N, { className: "expandIcon" }),
|
|
8
|
+
/* @__PURE__ */ t(b, { className: "collapseIcon" })
|
|
9
|
+
] }), z = (i) => {
|
|
10
|
+
const { state: I, actions: y } = j(i), { ownerState: l } = I, { values: c, templates: s, inputVariant: g, fieldOptions: n } = i, d = (o) => {
|
|
11
11
|
const e = s.get(o.templateKey);
|
|
12
12
|
return e == null ? void 0 : e.properties.filter((r) => {
|
|
13
13
|
var a;
|
|
14
14
|
return n ? !((a = n[r.propertyId]) != null && a.hidden) : !0;
|
|
15
15
|
}).map((r, a) => {
|
|
16
|
-
var u;
|
|
16
|
+
var u, f;
|
|
17
17
|
let p = {};
|
|
18
|
-
const m = o.filters.find(
|
|
19
|
-
(
|
|
18
|
+
const m = (u = o.filters) == null ? void 0 : u.find(
|
|
19
|
+
(P) => P.fieldName === r.propertyId
|
|
20
20
|
);
|
|
21
21
|
return m && (p = m.value), /* @__PURE__ */ t(
|
|
22
|
-
|
|
22
|
+
A,
|
|
23
23
|
{
|
|
24
|
-
...n && ((
|
|
24
|
+
...n && ((f = n[r.propertyId]) == null ? void 0 : f.order) && {
|
|
25
25
|
order: n[r.propertyId].order
|
|
26
26
|
},
|
|
27
27
|
children: /* @__PURE__ */ t(
|
|
28
|
-
|
|
28
|
+
E,
|
|
29
29
|
{
|
|
30
30
|
property: r,
|
|
31
31
|
value: p,
|
|
32
32
|
size: "small",
|
|
33
|
-
variant:
|
|
34
|
-
onChange:
|
|
33
|
+
variant: g,
|
|
34
|
+
onChange: y.handleOnChange(e == null ? void 0 : e.templateKey)
|
|
35
35
|
}
|
|
36
36
|
)
|
|
37
37
|
},
|
|
@@ -39,22 +39,22 @@ const E = /* @__PURE__ */ h(P, { children: [
|
|
|
39
39
|
);
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
|
-
return c.length === 1 ? /* @__PURE__ */ t(
|
|
42
|
+
return c.length === 1 ? /* @__PURE__ */ t(h, { ownerState: l, sx: i.sx, children: d(c[0]) }) : /* @__PURE__ */ t(h, { ownerState: l, sx: i.sx, children: c.map((o, e) => {
|
|
43
43
|
const r = s.get(o.templateKey);
|
|
44
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ x(F, { disableGutters: !0, elevation: 0, square: !0, children: [
|
|
45
45
|
/* @__PURE__ */ t(
|
|
46
|
-
|
|
46
|
+
T,
|
|
47
47
|
{
|
|
48
|
-
expandIcon:
|
|
48
|
+
expandIcon: O,
|
|
49
49
|
"aria-controls": `panel${e}-content`,
|
|
50
50
|
id: `panel${e}-header`,
|
|
51
|
-
children: /* @__PURE__ */ t(
|
|
51
|
+
children: /* @__PURE__ */ t(C, { variant: "body2", children: r == null ? void 0 : r.name })
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
|
-
/* @__PURE__ */ t(
|
|
54
|
+
/* @__PURE__ */ t(K, { children: d(o) })
|
|
55
55
|
] }, e);
|
|
56
56
|
}) });
|
|
57
57
|
};
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
z as TemplatePropertyFilters
|
|
60
60
|
};
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { useThemeProps as d } from "@mui/material";
|
|
2
|
-
import
|
|
2
|
+
import n from "lodash";
|
|
3
3
|
const x = (p) => {
|
|
4
|
-
const
|
|
4
|
+
const i = d({
|
|
5
5
|
props: p,
|
|
6
6
|
name: "HCTemplatePropertyFilters"
|
|
7
|
-
}), { values:
|
|
7
|
+
}), { values: o, onChange: u } = i, c = { ...i };
|
|
8
8
|
return {
|
|
9
9
|
refs: {},
|
|
10
10
|
state: { ownerState: c },
|
|
11
|
-
actions: { handleOnChange: (
|
|
12
|
-
if (!
|
|
11
|
+
actions: { handleOnChange: (f) => (a) => {
|
|
12
|
+
if (!f) {
|
|
13
13
|
console.warn("Template could not be found!");
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
if (!
|
|
18
|
-
const
|
|
19
|
-
|
|
16
|
+
const e = o.find((t) => t.templateKey === f);
|
|
17
|
+
if (!e) return;
|
|
18
|
+
const r = n.keys(a)[0], l = n.get(a, r);
|
|
19
|
+
e.filters || (e.filters = []);
|
|
20
|
+
const s = e.filters.findIndex(
|
|
21
|
+
(t) => t.fieldName === r
|
|
20
22
|
);
|
|
21
|
-
|
|
23
|
+
n.values(l).filter((t) => !(n.isArray(t) && t.length === 0 || t === "")).length === 0 && s !== -1 ? e.filters.splice(s, 1) : s !== -1 ? e.filters[s] = { fieldName: r, value: l } : e.filters.push({ fieldName: r, value: l }), u(o, e);
|
|
22
24
|
} }
|
|
23
25
|
};
|
|
24
26
|
};
|
package/dist/constants/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as n, jsxs as I, Fragment as
|
|
2
|
-
import { KeyboardArrowUp as
|
|
3
|
-
import { FormControl as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as n, jsxs as I, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import { KeyboardArrowUp as X, KeyboardArrowDown as Z, Add as O, LockOutlined as ee } from "@mui/icons-material";
|
|
3
|
+
import { FormControl as K, FormGroup as ne, FormControlLabel as $, Checkbox as U, Chip as te, Dialog as re, DialogTitle as ae, DialogContent as oe, DialogActions as le, Button as G, TextField as H, InputAdornment as ie, Tooltip as de, InputLabel as pe, Select as ce, MenuItem as ue } from "@mui/material";
|
|
4
|
+
import J from "dayjs";
|
|
5
5
|
import C from "lodash";
|
|
6
6
|
import { ConditionalWrapper as p } from "./components/conditional-wrapper/index.js";
|
|
7
|
-
import { DateTimePicker as
|
|
8
|
-
import { GeometryPicker as
|
|
9
|
-
import { PhoneInput as
|
|
7
|
+
import { DateTimePicker as me } from "./components/date-time-picker/index.js";
|
|
8
|
+
import { GeometryPicker as se } from "./components/geometry-picker/index.js";
|
|
9
|
+
import { PhoneInput as he } from "./components/phone-input/index.js";
|
|
10
10
|
import { leftLayoutWrapper as y } from "./components/instance-form/helpers.js";
|
|
11
|
-
import { CompositeListEnumLabel as
|
|
12
|
-
import { useState as
|
|
13
|
-
import
|
|
11
|
+
import { CompositeListEnumLabel as fe, CompositeListEnumEmpty as ye, CompositeListShowMoreButton as Ie, CompositeListContainer as Ce, CompositeListLabel as ge, CompositeListValues as be, CompositeListMiniButton as ve, VariableFullWidth as P } from "./components/instance-form/styled.js";
|
|
12
|
+
import { useState as R } from "react";
|
|
13
|
+
import Ve from "./hooks/useToggle.js";
|
|
14
14
|
import b from "./components/instance-form/components/TopLabelWrapper.js";
|
|
15
|
-
import { CompositeMatrix as
|
|
16
|
-
const
|
|
17
|
-
var
|
|
15
|
+
import { CompositeMatrix as we } from "./components/instance-form/components/composite-matrix/index.js";
|
|
16
|
+
const _ = 10, Te = (q) => {
|
|
17
|
+
var L, k, A;
|
|
18
18
|
const {
|
|
19
19
|
property: l,
|
|
20
20
|
mapboxAccessToken: e,
|
|
@@ -23,10 +23,10 @@ const H = 10, Ve = (P) => {
|
|
|
23
23
|
labelPosition: r = "default",
|
|
24
24
|
size: u = "medium",
|
|
25
25
|
onChange: v
|
|
26
|
-
} =
|
|
27
|
-
|
|
26
|
+
} = q, t = Ve(!1), [T, m] = R(), [g, D] = R(!1), x = (i) => {
|
|
27
|
+
m(C.get(i, l.propertyId));
|
|
28
28
|
}, S = () => {
|
|
29
|
-
v([...a ?? [],
|
|
29
|
+
v([...a ?? [], T]), m(""), t.action.close();
|
|
30
30
|
}, W = (i) => () => {
|
|
31
31
|
if (!a) return;
|
|
32
32
|
const d = [...a];
|
|
@@ -34,9 +34,9 @@ const H = 10, Ve = (P) => {
|
|
|
34
34
|
}, E = (i) => {
|
|
35
35
|
const { value: d, checked: f } = i.target;
|
|
36
36
|
let h = C.isArray(a) ? a : [];
|
|
37
|
-
f ? h.push(d) : h = h.filter((
|
|
37
|
+
f ? h.push(d) : h = h.filter((M) => M !== d), v(h);
|
|
38
38
|
};
|
|
39
|
-
if (((
|
|
39
|
+
if (((k = (L = l.dataTypeInfo) == null ? void 0 : L.innerType) == null ? void 0 : k.type) === "enum") {
|
|
40
40
|
const { enumValues: i } = l.dataTypeInfo.innerType;
|
|
41
41
|
return /* @__PURE__ */ n(
|
|
42
42
|
p,
|
|
@@ -48,15 +48,15 @@ const H = 10, Ve = (P) => {
|
|
|
48
48
|
{
|
|
49
49
|
condition: r === "top",
|
|
50
50
|
wrapper: b(l.name, l == null ? void 0 : l.required),
|
|
51
|
-
children: /* @__PURE__ */ I(
|
|
52
|
-
/* @__PURE__ */ I(
|
|
53
|
-
r === "default" && /* @__PURE__ */ n(
|
|
54
|
-
/* @__PURE__ */ n(
|
|
55
|
-
|
|
51
|
+
children: /* @__PURE__ */ I(B, { children: [
|
|
52
|
+
/* @__PURE__ */ I(K, { fullWidth: !0, component: "fieldset", variant: s, children: [
|
|
53
|
+
r === "default" && /* @__PURE__ */ n(fe, { children: l.name }),
|
|
54
|
+
/* @__PURE__ */ n(ne, { children: i && i.length > 0 ? i.slice(0, g ? 9999 : _).map((d, f) => /* @__PURE__ */ n(
|
|
55
|
+
$,
|
|
56
56
|
{
|
|
57
57
|
label: d,
|
|
58
58
|
control: /* @__PURE__ */ n(
|
|
59
|
-
|
|
59
|
+
U,
|
|
60
60
|
{
|
|
61
61
|
name: l.propertyId,
|
|
62
62
|
value: d,
|
|
@@ -70,14 +70,14 @@ const H = 10, Ve = (P) => {
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
f
|
|
73
|
-
)) : /* @__PURE__ */ n(
|
|
73
|
+
)) : /* @__PURE__ */ n(ye, { variant: "caption", children: "No enum values!" }) })
|
|
74
74
|
] }),
|
|
75
|
-
C.isArray(i) && i.length >
|
|
76
|
-
|
|
75
|
+
C.isArray(i) && i.length > _ && /* @__PURE__ */ I(
|
|
76
|
+
Ie,
|
|
77
77
|
{
|
|
78
78
|
size: "small",
|
|
79
|
-
endIcon: g ? /* @__PURE__ */ n(
|
|
80
|
-
onClick: () =>
|
|
79
|
+
endIcon: g ? /* @__PURE__ */ n(X, {}) : /* @__PURE__ */ n(Z, {}),
|
|
80
|
+
onClick: () => D((d) => !d),
|
|
81
81
|
children: [
|
|
82
82
|
"Show ",
|
|
83
83
|
g ? "Less" : "More"
|
|
@@ -90,7 +90,7 @@ const H = 10, Ve = (P) => {
|
|
|
90
90
|
}
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
|
-
return /* @__PURE__ */ I(
|
|
93
|
+
return /* @__PURE__ */ I(B, { children: [
|
|
94
94
|
/* @__PURE__ */ n(
|
|
95
95
|
p,
|
|
96
96
|
{
|
|
@@ -101,14 +101,14 @@ const H = 10, Ve = (P) => {
|
|
|
101
101
|
{
|
|
102
102
|
condition: r === "top",
|
|
103
103
|
wrapper: b(l.name, l == null ? void 0 : l.required),
|
|
104
|
-
children: /* @__PURE__ */ I(
|
|
105
|
-
r === "default" && /* @__PURE__ */ n(
|
|
106
|
-
/* @__PURE__ */ n(
|
|
104
|
+
children: /* @__PURE__ */ I(Ce, { ownerState: { variant: s }, children: [
|
|
105
|
+
r === "default" && /* @__PURE__ */ n(ge, { children: l.name }),
|
|
106
|
+
/* @__PURE__ */ n(be, { children: C.isArray(a) && a.map((i, d) => {
|
|
107
107
|
var f, h;
|
|
108
108
|
return /* @__PURE__ */ n(
|
|
109
|
-
|
|
109
|
+
te,
|
|
110
110
|
{
|
|
111
|
-
label: ((h = (f = l.dataTypeInfo) == null ? void 0 : f.innerType) == null ? void 0 : h.type) === "date" ?
|
|
111
|
+
label: ((h = (f = l.dataTypeInfo) == null ? void 0 : f.innerType) == null ? void 0 : h.type) === "date" ? J(i).format("DD/MM/YYYY HH:mm:ss") : i,
|
|
112
112
|
size: u,
|
|
113
113
|
onDelete: W(d)
|
|
114
114
|
},
|
|
@@ -116,10 +116,10 @@ const H = 10, Ve = (P) => {
|
|
|
116
116
|
);
|
|
117
117
|
}) }),
|
|
118
118
|
/* @__PURE__ */ n(
|
|
119
|
-
|
|
119
|
+
ve,
|
|
120
120
|
{
|
|
121
121
|
ownerState: { variant: "text" },
|
|
122
|
-
startIcon: /* @__PURE__ */ n(
|
|
122
|
+
startIcon: /* @__PURE__ */ n(O, {}),
|
|
123
123
|
variant: "text",
|
|
124
124
|
onClick: t.action.open,
|
|
125
125
|
children: "Add"
|
|
@@ -131,16 +131,16 @@ const H = 10, Ve = (P) => {
|
|
|
131
131
|
}
|
|
132
132
|
),
|
|
133
133
|
/* @__PURE__ */ I(
|
|
134
|
-
|
|
134
|
+
re,
|
|
135
135
|
{
|
|
136
136
|
open: t.state.isOpen,
|
|
137
137
|
onClose: t.action.close,
|
|
138
138
|
maxWidth: "sm",
|
|
139
139
|
fullWidth: !0,
|
|
140
140
|
children: [
|
|
141
|
-
/* @__PURE__ */ n(
|
|
142
|
-
/* @__PURE__ */ n(
|
|
143
|
-
|
|
141
|
+
/* @__PURE__ */ n(ae, { children: "Add List Value" }),
|
|
142
|
+
/* @__PURE__ */ n(oe, { children: (A = l.dataTypeInfo) != null && A.innerType ? /* @__PURE__ */ n(
|
|
143
|
+
xe,
|
|
144
144
|
{
|
|
145
145
|
mapboxAccessToken: e,
|
|
146
146
|
property: {
|
|
@@ -148,13 +148,13 @@ const H = 10, Ve = (P) => {
|
|
|
148
148
|
name: "Value",
|
|
149
149
|
type: l.dataTypeInfo.innerType.type
|
|
150
150
|
},
|
|
151
|
-
value:
|
|
152
|
-
onChange:
|
|
151
|
+
value: T,
|
|
152
|
+
onChange: x
|
|
153
153
|
}
|
|
154
154
|
) : null }),
|
|
155
|
-
/* @__PURE__ */ I(
|
|
155
|
+
/* @__PURE__ */ I(le, { children: [
|
|
156
156
|
/* @__PURE__ */ n(
|
|
157
|
-
|
|
157
|
+
G,
|
|
158
158
|
{
|
|
159
159
|
variant: "contained",
|
|
160
160
|
color: "inherit",
|
|
@@ -162,14 +162,14 @@ const H = 10, Ve = (P) => {
|
|
|
162
162
|
children: "Cancel"
|
|
163
163
|
}
|
|
164
164
|
),
|
|
165
|
-
/* @__PURE__ */ n(
|
|
165
|
+
/* @__PURE__ */ n(G, { variant: "contained", color: "primary", onClick: S, children: "Ok" })
|
|
166
166
|
] })
|
|
167
167
|
]
|
|
168
168
|
}
|
|
169
169
|
)
|
|
170
170
|
] });
|
|
171
|
-
},
|
|
172
|
-
var
|
|
171
|
+
}, xe = (q) => {
|
|
172
|
+
var i, d, f, h, M, N, j, Y, z;
|
|
173
173
|
const {
|
|
174
174
|
mapboxAccessToken: l,
|
|
175
175
|
property: e,
|
|
@@ -179,28 +179,29 @@ const H = 10, Ve = (P) => {
|
|
|
179
179
|
size: u = "medium",
|
|
180
180
|
defaultExtent: v,
|
|
181
181
|
fieldOptions: t,
|
|
182
|
+
mode: T = "create",
|
|
182
183
|
onChange: m
|
|
183
|
-
} =
|
|
184
|
-
const
|
|
185
|
-
m({ [e.propertyId]:
|
|
186
|
-
},
|
|
187
|
-
const { name: c, type:
|
|
188
|
-
let
|
|
189
|
-
e.type === "double" && (
|
|
190
|
-
[c]:
|
|
184
|
+
} = q, g = T === "edit" && !e.editable, D = (o) => {
|
|
185
|
+
const V = o.target.value.split(",").map((F) => F.trimStart());
|
|
186
|
+
m({ [e.propertyId]: V });
|
|
187
|
+
}, x = (o) => {
|
|
188
|
+
const { name: c, type: V, checked: F, value: Q } = o.target;
|
|
189
|
+
let w = Q;
|
|
190
|
+
e.type === "double" && (w = String(w).replace(",", "."), w = w.replace(/[^\d.-]+/g, "")), m({
|
|
191
|
+
[c]: V === "checkbox" ? F : w
|
|
191
192
|
});
|
|
192
|
-
},
|
|
193
|
+
}, S = (o) => {
|
|
193
194
|
m({ [e.propertyId]: o });
|
|
194
|
-
},
|
|
195
|
+
}, W = (o) => {
|
|
195
196
|
m({ [e.propertyId]: o.target.value });
|
|
196
|
-
}, S = (o) => (c) => {
|
|
197
|
-
m({ [o]: c });
|
|
198
|
-
}, W = (o) => (c) => {
|
|
199
|
-
m({ [o]: c });
|
|
200
197
|
}, E = (o) => (c) => {
|
|
201
198
|
m({ [o]: c });
|
|
199
|
+
}, L = (o) => (c) => {
|
|
200
|
+
m({ [o]: c });
|
|
202
201
|
}, k = (o) => (c) => {
|
|
203
202
|
m({ [o]: c });
|
|
203
|
+
}, A = (o) => (c) => {
|
|
204
|
+
m({ [o]: c });
|
|
204
205
|
};
|
|
205
206
|
if (t && t[e.propertyId] && t[e.propertyId].component)
|
|
206
207
|
return t[e.propertyId].component;
|
|
@@ -208,6 +209,7 @@ const H = 10, Ve = (P) => {
|
|
|
208
209
|
"string",
|
|
209
210
|
"integer",
|
|
210
211
|
"double",
|
|
212
|
+
"decimal",
|
|
211
213
|
"text",
|
|
212
214
|
"long",
|
|
213
215
|
"byte",
|
|
@@ -225,25 +227,25 @@ const H = 10, Ve = (P) => {
|
|
|
225
227
|
wrapper: b(
|
|
226
228
|
e == null ? void 0 : e.name,
|
|
227
229
|
e == null ? void 0 : e.required,
|
|
228
|
-
(
|
|
230
|
+
(i = t == null ? void 0 : t[e == null ? void 0 : e.propertyId]) == null ? void 0 : i.description
|
|
229
231
|
),
|
|
230
232
|
children: /* @__PURE__ */ n(
|
|
231
|
-
|
|
233
|
+
H,
|
|
232
234
|
{
|
|
233
235
|
label: r === "default" ? e.name : void 0,
|
|
234
|
-
placeholder: ((
|
|
236
|
+
placeholder: ((d = t == null ? void 0 : t[e.propertyId]) == null ? void 0 : d.placeholder) ?? "",
|
|
235
237
|
name: e.propertyId,
|
|
236
238
|
required: e.required,
|
|
237
239
|
value: a ?? e.defaultValue ?? "",
|
|
238
240
|
defaultValue: a,
|
|
239
|
-
onChange:
|
|
241
|
+
onChange: x,
|
|
240
242
|
variant: s,
|
|
241
243
|
type: "text",
|
|
242
244
|
multiline: e.type === "text",
|
|
243
|
-
disabled:
|
|
245
|
+
disabled: g,
|
|
244
246
|
fullWidth: !0,
|
|
245
247
|
inputProps: {
|
|
246
|
-
maxLength: ((
|
|
248
|
+
maxLength: ((f = t == null ? void 0 : t[e.propertyId]) == null ? void 0 : f.maxChar) ?? 1e5
|
|
247
249
|
},
|
|
248
250
|
InputProps: {
|
|
249
251
|
size: u,
|
|
@@ -251,7 +253,7 @@ const H = 10, Ve = (P) => {
|
|
|
251
253
|
tabIndex: t[e.propertyId].order
|
|
252
254
|
},
|
|
253
255
|
...e.privacyPreservationMethod === "ENCRYPTION" ? {
|
|
254
|
-
endAdornment: /* @__PURE__ */ n(
|
|
256
|
+
endAdornment: /* @__PURE__ */ n(ie, { position: "end", children: /* @__PURE__ */ n(de, { title: "Encrypted Field", children: /* @__PURE__ */ n(ee, {}) }) })
|
|
255
257
|
} : {}
|
|
256
258
|
}
|
|
257
259
|
}
|
|
@@ -261,7 +263,7 @@ const H = 10, Ve = (P) => {
|
|
|
261
263
|
}
|
|
262
264
|
);
|
|
263
265
|
if (e.type === "date") {
|
|
264
|
-
const o = a !== void 0 ?
|
|
266
|
+
const o = a !== void 0 ? J(a).format() : a;
|
|
265
267
|
return /* @__PURE__ */ n(
|
|
266
268
|
p,
|
|
267
269
|
{
|
|
@@ -274,17 +276,17 @@ const H = 10, Ve = (P) => {
|
|
|
274
276
|
wrapper: b(
|
|
275
277
|
e.name,
|
|
276
278
|
e == null ? void 0 : e.required,
|
|
277
|
-
(
|
|
279
|
+
(h = t == null ? void 0 : t[e == null ? void 0 : e.propertyId]) == null ? void 0 : h.description
|
|
278
280
|
),
|
|
279
281
|
children: /* @__PURE__ */ n(
|
|
280
|
-
|
|
282
|
+
me,
|
|
281
283
|
{
|
|
282
284
|
label: r === "default" ? e.name : void 0,
|
|
283
285
|
value: o,
|
|
284
286
|
variant: s,
|
|
285
287
|
size: u,
|
|
286
288
|
name: e.propertyId,
|
|
287
|
-
onChange:
|
|
289
|
+
onChange: S,
|
|
288
290
|
...t && t[e.propertyId] && {
|
|
289
291
|
minDate: t[e.propertyId].minDate
|
|
290
292
|
}
|
|
@@ -309,17 +311,17 @@ const H = 10, Ve = (P) => {
|
|
|
309
311
|
wrapper: b(
|
|
310
312
|
e.name,
|
|
311
313
|
e == null ? void 0 : e.required,
|
|
312
|
-
(
|
|
314
|
+
(M = t == null ? void 0 : t[e == null ? void 0 : e.propertyId]) == null ? void 0 : M.description
|
|
313
315
|
),
|
|
314
316
|
children: /* @__PURE__ */ n(
|
|
315
|
-
|
|
317
|
+
H,
|
|
316
318
|
{
|
|
317
319
|
label: r === "default" ? e.name : void 0,
|
|
318
320
|
name: e.propertyId,
|
|
319
321
|
value: o,
|
|
320
|
-
onChange:
|
|
322
|
+
onChange: D,
|
|
321
323
|
variant: s,
|
|
322
|
-
disabled:
|
|
324
|
+
disabled: g,
|
|
323
325
|
required: e.required,
|
|
324
326
|
fullWidth: !0,
|
|
325
327
|
helperText: u === "small" ? null : "Add list values with the comma (,) separated string",
|
|
@@ -344,14 +346,14 @@ const H = 10, Ve = (P) => {
|
|
|
344
346
|
condition: r === "left",
|
|
345
347
|
wrapper: y(e.name),
|
|
346
348
|
children: /* @__PURE__ */ n(
|
|
347
|
-
|
|
349
|
+
$,
|
|
348
350
|
{
|
|
349
351
|
control: /* @__PURE__ */ n(
|
|
350
|
-
|
|
352
|
+
U,
|
|
351
353
|
{
|
|
352
354
|
name: e.propertyId,
|
|
353
355
|
checked: !!(a ?? e.defaultValue ?? !1),
|
|
354
|
-
onChange:
|
|
356
|
+
onChange: x,
|
|
355
357
|
size: u
|
|
356
358
|
}
|
|
357
359
|
),
|
|
@@ -362,7 +364,7 @@ const H = 10, Ve = (P) => {
|
|
|
362
364
|
);
|
|
363
365
|
if (e.type === "enum") {
|
|
364
366
|
let o = [];
|
|
365
|
-
return (
|
|
367
|
+
return (N = e.dataTypeInfo) != null && N.enumValues && (o = e.dataTypeInfo.enumValues), (Y = (j = e.dataTypeInfo) == null ? void 0 : j.innerType) != null && Y.enumValues && (o = e.dataTypeInfo.innerType.enumValues), /* @__PURE__ */ n(
|
|
366
368
|
p,
|
|
367
369
|
{
|
|
368
370
|
condition: r === "left",
|
|
@@ -374,32 +376,32 @@ const H = 10, Ve = (P) => {
|
|
|
374
376
|
wrapper: b(
|
|
375
377
|
e.name,
|
|
376
378
|
e == null ? void 0 : e.required,
|
|
377
|
-
(
|
|
379
|
+
(z = t == null ? void 0 : t[e == null ? void 0 : e.propertyId]) == null ? void 0 : z.description
|
|
378
380
|
),
|
|
379
381
|
children: /* @__PURE__ */ I(
|
|
380
|
-
|
|
382
|
+
K,
|
|
381
383
|
{
|
|
382
384
|
fullWidth: !0,
|
|
383
385
|
variant: s,
|
|
384
386
|
size: u,
|
|
385
387
|
required: e.required,
|
|
386
388
|
children: [
|
|
387
|
-
r === "default" && /* @__PURE__ */ n(
|
|
389
|
+
r === "default" && /* @__PURE__ */ n(pe, { id: `${e.propertyId}-label`, children: e.name }),
|
|
388
390
|
/* @__PURE__ */ n(
|
|
389
|
-
|
|
391
|
+
ce,
|
|
390
392
|
{
|
|
391
393
|
label: r === "default" ? e.name : void 0,
|
|
392
394
|
name: e.name,
|
|
393
395
|
labelId: `${e.propertyId}-label`,
|
|
394
396
|
id: e.propertyId,
|
|
395
397
|
value: a ?? "",
|
|
396
|
-
onChange:
|
|
398
|
+
onChange: W,
|
|
397
399
|
inputProps: {
|
|
398
400
|
...t && t[e.propertyId] && {
|
|
399
401
|
tabIndex: t[e.propertyId].order
|
|
400
402
|
}
|
|
401
403
|
},
|
|
402
|
-
children: o.map((c,
|
|
404
|
+
children: o.map((c, V) => /* @__PURE__ */ n(ue, { value: c, children: c }, V))
|
|
403
405
|
}
|
|
404
406
|
)
|
|
405
407
|
]
|
|
@@ -415,15 +417,15 @@ const H = 10, Ve = (P) => {
|
|
|
415
417
|
{
|
|
416
418
|
condition: r === "left",
|
|
417
419
|
wrapper: y(e.name),
|
|
418
|
-
children: /* @__PURE__ */ n(
|
|
419
|
-
|
|
420
|
+
children: /* @__PURE__ */ n(P, { children: /* @__PURE__ */ n(
|
|
421
|
+
se,
|
|
420
422
|
{
|
|
421
423
|
mapboxAccessToken: l,
|
|
422
424
|
label: r === "default" ? e.name : void 0,
|
|
423
425
|
value: a ?? e.defaultValue ?? "",
|
|
424
426
|
defaultExtent: v,
|
|
425
427
|
variant: s,
|
|
426
|
-
onChange:
|
|
428
|
+
onChange: E(e.propertyId)
|
|
427
429
|
}
|
|
428
430
|
) })
|
|
429
431
|
}
|
|
@@ -432,18 +434,18 @@ const H = 10, Ve = (P) => {
|
|
|
432
434
|
{
|
|
433
435
|
condition: r === "left",
|
|
434
436
|
wrapper: y(e.name),
|
|
435
|
-
children: /* @__PURE__ */ n(
|
|
436
|
-
|
|
437
|
+
children: /* @__PURE__ */ n(P, { children: /* @__PURE__ */ n(
|
|
438
|
+
he,
|
|
437
439
|
{
|
|
438
440
|
label: r === "default" ? e.name : void 0,
|
|
439
441
|
placeholder: "Enter phone number",
|
|
440
442
|
value: a ?? e.defaultValue ?? "",
|
|
441
|
-
onChange:
|
|
443
|
+
onChange: L(e.propertyId)
|
|
442
444
|
}
|
|
443
445
|
) })
|
|
444
446
|
}
|
|
445
|
-
) : e.type === "composite-list" ? /* @__PURE__ */ n(
|
|
446
|
-
|
|
447
|
+
) : e.type === "composite-list" ? /* @__PURE__ */ n(P, { children: /* @__PURE__ */ n(
|
|
448
|
+
Te,
|
|
447
449
|
{
|
|
448
450
|
property: e,
|
|
449
451
|
value: a ?? e.defaultValue ?? "",
|
|
@@ -451,20 +453,20 @@ const H = 10, Ve = (P) => {
|
|
|
451
453
|
labelPosition: r,
|
|
452
454
|
size: u,
|
|
453
455
|
mapboxAccessToken: l,
|
|
454
|
-
onChange:
|
|
456
|
+
onChange: k(e.propertyId)
|
|
455
457
|
}
|
|
456
|
-
) }) : e.type === "composite-matrix" ? /* @__PURE__ */ n(
|
|
457
|
-
|
|
458
|
+
) }) : e.type === "composite-matrix" ? /* @__PURE__ */ n(P, { children: /* @__PURE__ */ n(
|
|
459
|
+
we,
|
|
458
460
|
{
|
|
459
461
|
property: e,
|
|
460
462
|
value: a ?? e.defaultValue ?? "",
|
|
461
463
|
variant: s,
|
|
462
464
|
size: u,
|
|
463
|
-
onChange:
|
|
465
|
+
onChange: A(e.propertyId)
|
|
464
466
|
}
|
|
465
467
|
) }) : null;
|
|
466
468
|
};
|
|
467
469
|
export {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
+
Te as C,
|
|
471
|
+
xe as V
|
|
470
472
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -1078,6 +1078,13 @@ K extends
|
|
|
1078
1078
|
variant?: InstanceFormVariant;
|
|
1079
1079
|
inputVariant?: InstanceFormInputVariant;
|
|
1080
1080
|
labelPosition?: InstanceFormLabelPosition;
|
|
1081
|
+
/**
|
|
1082
|
+
* Whether the form creates a new instance or edits an existing one. A
|
|
1083
|
+
* property with `editable: false` accepts a value on create and is locked
|
|
1084
|
+
* on edit — so edit forms must set this explicitly.
|
|
1085
|
+
* @default "create"
|
|
1086
|
+
*/
|
|
1087
|
+
mode?: "create" | "edit";
|
|
1081
1088
|
templates: Map<string | number, T>;
|
|
1082
1089
|
values?: DefaultValues<
|
|
1083
1090
|
INSTANCE.CreateObjectDTO &
|
|
@@ -4279,9 +4286,9 @@ declare namespace FV {
|
|
|
4279
4286
|
|
|
4280
4287
|
interface TemplateFilter {
|
|
4281
4288
|
templateKey: string;
|
|
4282
|
-
filterOperator
|
|
4283
|
-
filters
|
|
4284
|
-
exclusionTemplateKeys
|
|
4289
|
+
filterOperator?: string;
|
|
4290
|
+
filters?: PropertyFilter[];
|
|
4291
|
+
exclusionTemplateKeys?: string[];
|
|
4285
4292
|
}
|
|
4286
4293
|
|
|
4287
4294
|
interface HierarchyTemplateFilter {
|
|
@@ -4767,6 +4774,10 @@ declare namespace ONTOLOGY {
|
|
|
4767
4774
|
enumValues?: string[];
|
|
4768
4775
|
};
|
|
4769
4776
|
enumValues?: string[];
|
|
4777
|
+
/** `decimal` only — total significant digits. */
|
|
4778
|
+
precision?: number;
|
|
4779
|
+
/** `decimal` only — fraction digits. */
|
|
4780
|
+
scale?: number;
|
|
4770
4781
|
}
|
|
4771
4782
|
|
|
4772
4783
|
interface RecognitionProperty {
|