@hybridcore/ui 1.5.51 → 1.5.53

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.
@@ -1,6 +1,6 @@
1
- import { jsxs as o, Fragment as n, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as o, Fragment as p, jsx as t } from "react/jsx-runtime";
2
2
  import { Box as r, Typography as i } from "@mui/material";
3
- const x = (a, l, e) => (p) => /* @__PURE__ */ o(n, { children: [
3
+ const x = (a, l, e) => (n) => /* @__PURE__ */ o(p, { children: [
4
4
  /* @__PURE__ */ o(r, { sx: { mb: 1 }, children: [
5
5
  /* @__PURE__ */ o(
6
6
  i,
@@ -10,7 +10,8 @@ const x = (a, l, e) => (p) => /* @__PURE__ */ o(n, { children: [
10
10
  display: "inline-block",
11
11
  color: "#1e262b",
12
12
  fontSize: "16px",
13
- position: "relative"
13
+ position: "relative",
14
+ fontWeight: 500
14
15
  },
15
16
  children: [
16
17
  a,
@@ -44,7 +45,7 @@ const x = (a, l, e) => (p) => /* @__PURE__ */ o(n, { children: [
44
45
  }
45
46
  )
46
47
  ] }),
47
- p
48
+ n
48
49
  ] });
49
50
  export {
50
51
  x as default
@@ -6,7 +6,7 @@ import "lodash";
6
6
  import "react";
7
7
  import "../../../../hooks/useToggle.js";
8
8
  import "../../../conditional-wrapper/index.js";
9
- import { C as s } from "../../../../index-CCkupzf4.js";
9
+ import { C as s } from "../../../../index-B6DDeKlQ.js";
10
10
  import "./styled.js";
11
11
  export {
12
12
  s as default
@@ -3,7 +3,7 @@ import "@mui/icons-material";
3
3
  import "@mui/material";
4
4
  import "dayjs";
5
5
  import "lodash";
6
- import { V as j } from "../../../../index-CCkupzf4.js";
6
+ import { V as j } from "../../../../index-B6DDeKlQ.js";
7
7
  import "../../../date-time-picker/index.js";
8
8
  import "../../../geometry-picker/index.js";
9
9
  import "../../../phone-input/index.js";
@@ -1,6 +1,6 @@
1
1
  import { jsx as u, Fragment as I, jsxs as _ } from "react/jsx-runtime";
2
2
  import b from "react";
3
- import { V as g } from "../../../../index-CCkupzf4.js";
3
+ import { V as g } from "../../../../index-B6DDeKlQ.js";
4
4
  import p from "lodash";
5
5
  import { Box as i } from "@mui/material";
6
6
  function C({
@@ -1,8 +1,8 @@
1
- import { jsx as t, jsxs as c, Fragment as Oe } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as c, Fragment as Oe } from "react/jsx-runtime";
2
2
  import Le from "lodash";
3
3
  import p, { useRef as Ve } from "react";
4
4
  import { useForm as Se, Controller as h } from "react-hook-form";
5
- import { Box as l, Typography as y, TextField as x, FormHelperText as fe, FormGroup as Fe, FormControlLabel as ue, Checkbox as he, Button as C } from "@mui/material";
5
+ import { Box as l, Typography as y, TextField as x, FormHelperText as fe, FormGroup as Fe, FormControlLabel as ue, Checkbox as he, Button as O } from "@mui/material";
6
6
  import { getNestedChildrenFromMap as ke } from "../../utils/ontology.js";
7
7
  import { ConditionalWrapper as m } from "../conditional-wrapper/index.js";
8
8
  import { Container as Ee } from "../container/index.js";
@@ -11,7 +11,7 @@ import { SecurityLevel as Re } from "../data-security-selectors/security-level/i
11
11
  import { i as Be, d as Ae } from "../../utils-Bq0ye5vf.js";
12
12
  import { TreeSelect as De } from "../tree-select/index.js";
13
13
  import Ne from "./components/policy-list/index.js";
14
- import O from "./components/TopLabelWrapper.js";
14
+ import L from "./components/TopLabelWrapper.js";
15
15
  import _e from "./components/variables/index.js";
16
16
  const We = {
17
17
  alg: "A256GCM",
@@ -22,33 +22,33 @@ const We = {
22
22
  };
23
23
  function qe(e, pe) {
24
24
  var P, R, B, A, D, N, _, W, q, $, K, M, U, j, G, H, J, Q, Y, z, X, Z, ee, te, ie, ne, le, ae, de, re, oe, ce, se;
25
- const L = Ve(null), {
26
- register: V,
25
+ const V = Ve(null), {
26
+ register: S,
27
27
  handleSubmit: ve,
28
28
  control: f,
29
- formState: { errors: ye, isDirty: S },
30
- getValues: F,
29
+ formState: { errors: ye, isDirty: F },
30
+ getValues: k,
31
31
  setValue: T,
32
32
  reset: ge,
33
- watch: k
33
+ watch: I
34
34
  } = Se({
35
35
  defaultValues: e.defaultValues
36
36
  }), a = (e == null ? void 0 : e.labelPosition) ?? "default", [be, xe] = p.useState([]), [w, E] = p.useState(), [$e, Te] = p.useState(0), we = p.useMemo(() => {
37
- const i = [];
37
+ const t = [];
38
38
  return e.mappedTemplates.forEach((n) => {
39
- n.creatable || i.push(String(n.id));
40
- }), i;
39
+ n.creatable || t.push(String(n.id));
40
+ }), t;
41
41
  }, [e.mappedTemplates]);
42
42
  p.useEffect(() => {
43
43
  (async () => {
44
- const i = { ...e.defaultValues }, n = e.mappedTemplates.get(i.templateId);
44
+ const t = { ...e.defaultValues }, n = e.mappedTemplates.get(t.templateId);
45
45
  if (n) {
46
46
  const r = n.properties.filter(
47
47
  (o) => o.privacyPreservationMethod === "ENCRYPTION"
48
48
  );
49
49
  if (r.length > 0)
50
50
  for (let o = 0; o < r.length; o++) {
51
- const d = r[o], s = Le.get(i, `variables.${d.propertyId}`);
51
+ const d = r[o], s = Le.get(t, `variables.${d.propertyId}`);
52
52
  if (s && e.keyAuth) {
53
53
  const u = await Be(We), g = await Ae(u, String(s));
54
54
  g.data && (T(`variables.${d.propertyId}`, g.data), Te((b) => b + 1));
@@ -57,21 +57,21 @@ function qe(e, pe) {
57
57
  }
58
58
  })();
59
59
  }, [e.defaultValues, e.mappedTemplates, e.keyAuth]);
60
- const I = () => {
61
- const i = F("templateId");
60
+ const C = () => {
61
+ const t = k("templateId");
62
62
  w && E(void 0);
63
63
  const n = ke(e.mappedTemplates);
64
64
  xe(n);
65
65
  for (const r of e.mappedTemplates.values())
66
- if (r.id === i) {
66
+ if (r.id === t) {
67
67
  E(r);
68
68
  break;
69
69
  }
70
70
  };
71
71
  p.useImperativeHandle(pe, () => ({
72
72
  requestSubmit() {
73
- var i;
74
- (i = L.current) == null || i.requestSubmit();
73
+ var t;
74
+ (t = V.current) == null || t.requestSubmit();
75
75
  },
76
76
  resetForm() {
77
77
  ge({
@@ -79,66 +79,69 @@ function qe(e, pe) {
79
79
  description: "",
80
80
  templateId: 0,
81
81
  variables: {}
82
- }), I();
82
+ }), C();
83
83
  },
84
- setFormValue(i, n) {
85
- T(i, n);
84
+ setFormValue(t, n) {
85
+ T(t, n);
86
86
  },
87
- getFormValue(i) {
88
- return F(i);
87
+ getFormValue(t) {
88
+ return k(t);
89
89
  },
90
90
  isDirty() {
91
- return S;
91
+ return F;
92
+ },
93
+ getWatchedValue(t) {
94
+ return I(t);
92
95
  }
93
- })), p.useEffect(() => (I(), () => {
96
+ })), p.useEffect(() => (C(), () => {
94
97
  }), [e.mappedTemplates]), p.useEffect(() => {
95
98
  e.onSelectedTemplateChange && e.onSelectedTemplateChange(w);
96
99
  }, [w]);
97
100
  const Ie = () => {
98
101
  if (e.onCancel) {
99
- e.onCancel(S);
102
+ e.onCancel(F);
100
103
  return;
101
104
  }
102
- }, v = (i) => {
105
+ }, v = (t) => {
103
106
  var o, d;
104
- if (!i) return;
105
- const n = (d = (o = e == null ? void 0 : e.fieldOptions) == null ? void 0 : o[i]) == null ? void 0 : d.maxChar;
107
+ if (!t) return;
108
+ const n = (d = (o = e == null ? void 0 : e.fieldOptions) == null ? void 0 : o[t]) == null ? void 0 : d.maxChar;
106
109
  return n != null && !Number.isNaN(Number(n)) ? Number(n) : void 0;
107
110
  };
108
- return /* @__PURE__ */ t(
111
+ return /* @__PURE__ */ i(
109
112
  m,
110
113
  {
111
114
  condition: e.variant === void 0 || e.variant === "inline",
112
- wrapper: (i) => /* @__PURE__ */ t(
115
+ wrapper: (t) => /* @__PURE__ */ i(
113
116
  Ee,
114
117
  {
115
118
  disableHeader: !0,
116
119
  sx: { position: "relative", overflow: "visible" },
117
- children: i
120
+ children: t
118
121
  }
119
122
  ),
120
123
  children: /* @__PURE__ */ c(
121
124
  "form",
122
125
  {
123
- ref: L,
126
+ ref: V,
124
127
  onSubmit: ve(e.onSubmit),
125
128
  style: { display: "flex", flexDirection: "column" },
126
129
  children: [
127
- !((R = (P = e.fieldOptions) == null ? void 0 : P.title) != null && R.hidden) && /* @__PURE__ */ t(
130
+ !((R = (P = e.fieldOptions) == null ? void 0 : P.title) != null && R.hidden) && /* @__PURE__ */ i(
128
131
  m,
129
132
  {
130
133
  condition: a === "left",
131
- wrapper: (i) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
132
- /* @__PURE__ */ t(y, { width: "32%", children: "Title *" }),
133
- /* @__PURE__ */ t(l, { width: "68%", children: i })
134
+ wrapper: (t) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
135
+ /* @__PURE__ */ i(y, { width: "32%", children: "Title *" }),
136
+ /* @__PURE__ */ i(l, { width: "68%", children: t })
134
137
  ] }),
135
138
  children: /* @__PURE__ */ c(l, { mb: 2, children: [
136
- /* @__PURE__ */ t(
139
+ /* @__PURE__ */ i(
137
140
  m,
138
141
  {
139
142
  condition: a === "top",
140
- wrapper: O("Title", !0),
141
- children: /* @__PURE__ */ t(
143
+ wrapper: L("Title", !0),
144
+ children: /* @__PURE__ */ i(
142
145
  x,
143
146
  {
144
147
  label: a === "default" ? "Title *" : void 0,
@@ -146,7 +149,7 @@ function qe(e, pe) {
146
149
  placeholder: ((A = (B = e.fieldOptions) == null ? void 0 : B.title) == null ? void 0 : A.placeholder) ?? "",
147
150
  inputProps: v("title") ? { maxLength: v("title") } : void 0,
148
151
  fullWidth: !0,
149
- ...V("title", { required: !0 }),
152
+ ...S("title", { required: !0 }),
150
153
  ...ye.title && {
151
154
  helperText: "This field is required!",
152
155
  error: !0
@@ -155,26 +158,26 @@ function qe(e, pe) {
155
158
  )
156
159
  }
157
160
  ),
158
- v("title") && /* @__PURE__ */ t(fe, { sx: { textAlign: "right", mt: 0.5 }, children: `${(D = k("title")) == null ? void 0 : D.length}/${v("title")}` }),
161
+ v("title") && /* @__PURE__ */ i(fe, { sx: { textAlign: "right", mt: 0.5 }, children: `${(D = I("title")) == null ? void 0 : D.length}/${v("title")}` }),
159
162
  e.fieldOptions && ((N = e.fieldOptions.title) == null ? void 0 : N.helperText)
160
163
  ] })
161
164
  }
162
165
  ),
163
- !((W = (_ = e.fieldOptions) == null ? void 0 : _.description) != null && W.hidden) && /* @__PURE__ */ t(
166
+ !((W = (_ = e.fieldOptions) == null ? void 0 : _.description) != null && W.hidden) && /* @__PURE__ */ i(
164
167
  m,
165
168
  {
166
169
  condition: a === "left",
167
- wrapper: (i) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
168
- /* @__PURE__ */ t(y, { width: "32%", children: "Description" }),
169
- /* @__PURE__ */ t(l, { width: "68%", children: i })
170
+ wrapper: (t) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
171
+ /* @__PURE__ */ i(y, { width: "32%", children: "Description" }),
172
+ /* @__PURE__ */ i(l, { width: "68%", children: t })
170
173
  ] }),
171
174
  children: /* @__PURE__ */ c(l, { mb: 2, children: [
172
- /* @__PURE__ */ t(
175
+ /* @__PURE__ */ i(
173
176
  m,
174
177
  {
175
178
  condition: a === "top",
176
- wrapper: O("Description", !1),
177
- children: /* @__PURE__ */ t(
179
+ wrapper: L("Description", !1),
180
+ children: /* @__PURE__ */ i(
178
181
  x,
179
182
  {
180
183
  label: a === "default" ? "Description" : void 0,
@@ -184,42 +187,42 @@ function qe(e, pe) {
184
187
  fullWidth: !0,
185
188
  multiline: !0,
186
189
  minRows: (M = (K = e.fieldOptions) == null ? void 0 : K.description) == null ? void 0 : M.minRows,
187
- ...V("description")
190
+ ...S("description")
188
191
  }
189
192
  )
190
193
  }
191
194
  ),
192
- v("description") && /* @__PURE__ */ t(fe, { sx: { textAlign: "right", mt: 0.5 }, children: `${(U = k("description")) == null ? void 0 : U.length}/${v(
195
+ v("description") && /* @__PURE__ */ i(fe, { sx: { textAlign: "right", mt: 0.5 }, children: `${(U = I("description")) == null ? void 0 : U.length}/${v(
193
196
  "description"
194
197
  )}` }),
195
198
  e.fieldOptions && ((j = e.fieldOptions.description) == null ? void 0 : j.helperText)
196
199
  ] })
197
200
  }
198
201
  ),
199
- !((H = (G = e.fieldOptions) == null ? void 0 : G.templateId) != null && H.hidden) && /* @__PURE__ */ t(
202
+ !((H = (G = e.fieldOptions) == null ? void 0 : G.templateId) != null && H.hidden) && /* @__PURE__ */ i(
200
203
  m,
201
204
  {
202
205
  condition: a === "left",
203
- wrapper: (i) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
204
- /* @__PURE__ */ t(y, { width: "32%", children: "Template" }),
205
- /* @__PURE__ */ t(l, { width: "68%", children: i })
206
+ wrapper: (t) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
207
+ /* @__PURE__ */ i(y, { width: "32%", children: "Template" }),
208
+ /* @__PURE__ */ i(l, { width: "68%", children: t })
206
209
  ] }),
207
210
  children: /* @__PURE__ */ c(Fe, { sx: { mb: 2 }, children: [
208
- /* @__PURE__ */ t(
211
+ /* @__PURE__ */ i(
209
212
  m,
210
213
  {
211
214
  condition: a === "top",
212
- wrapper: O("Template", !1),
213
- children: /* @__PURE__ */ t(
215
+ wrapper: L("Template", !1),
216
+ children: /* @__PURE__ */ i(
214
217
  h,
215
218
  {
216
219
  name: "templateId",
217
220
  control: f,
218
- render: ({ field: { value: i, onChange: n } }) => {
221
+ render: ({ field: { value: t, onChange: n } }) => {
219
222
  var r, o;
220
223
  if ((o = (r = e.fieldOptions) == null ? void 0 : r.templateId) != null && o.disabled) {
221
- const d = i ? e.mappedTemplates.get(i) : void 0;
222
- return /* @__PURE__ */ t(
224
+ const d = t ? e.mappedTemplates.get(t) : void 0;
225
+ return /* @__PURE__ */ i(
223
226
  x,
224
227
  {
225
228
  label: a === "default" ? "Template" : void 0,
@@ -233,12 +236,12 @@ function qe(e, pe) {
233
236
  }
234
237
  );
235
238
  }
236
- return /* @__PURE__ */ t(
239
+ return /* @__PURE__ */ i(
237
240
  De,
238
241
  {
239
242
  label: a === "default" ? "Template" : void 0,
240
243
  data: be,
241
- selected: i === 0 ? "" : [String(i)],
244
+ selected: t === 0 ? "" : [String(t)],
242
245
  disabled: we,
243
246
  variant: e.inputVariant,
244
247
  onChange: (d, s) => {
@@ -247,7 +250,7 @@ function qe(e, pe) {
247
250
  value: s ? Number(d) : 0
248
251
  }
249
252
  };
250
- n(u), I();
253
+ n(u), C();
251
254
  }
252
255
  }
253
256
  );
@@ -260,12 +263,12 @@ function qe(e, pe) {
260
263
  ] })
261
264
  }
262
265
  ),
263
- "aliasList" in e.defaultValues && !((Y = (Q = e.fieldOptions) == null ? void 0 : Q.aliasList) != null && Y.hidden) && /* @__PURE__ */ t(
266
+ "aliasList" in e.defaultValues && !((Y = (Q = e.fieldOptions) == null ? void 0 : Q.aliasList) != null && Y.hidden) && /* @__PURE__ */ i(
264
267
  h,
265
268
  {
266
269
  name: "aliasList",
267
270
  control: f,
268
- render: ({ field: { value: i, onChange: n, ...r } }) => {
271
+ render: ({ field: { value: t, onChange: n, ...r } }) => {
269
272
  var d;
270
273
  const o = (s) => {
271
274
  const b = {
@@ -275,22 +278,22 @@ function qe(e, pe) {
275
278
  };
276
279
  n(b);
277
280
  };
278
- return /* @__PURE__ */ t(
281
+ return /* @__PURE__ */ i(
279
282
  m,
280
283
  {
281
284
  condition: a === "left",
282
285
  wrapper: (s) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
283
- /* @__PURE__ */ t(y, { width: "32%", children: "Alias List" }),
284
- /* @__PURE__ */ t(l, { width: "68%", children: s })
286
+ /* @__PURE__ */ i(y, { width: "32%", children: "Alias List" }),
287
+ /* @__PURE__ */ i(l, { width: "68%", children: s })
285
288
  ] }),
286
289
  children: /* @__PURE__ */ c(l, { mb: 2, children: [
287
- /* @__PURE__ */ t(
290
+ /* @__PURE__ */ i(
288
291
  x,
289
292
  {
290
293
  label: a === "default" ? "Alias List" : void 0,
291
294
  variant: e.inputVariant,
292
295
  fullWidth: !0,
293
- value: i,
296
+ value: t,
294
297
  helperText: "Add list values with the comma (,) separated string",
295
298
  onChange: o,
296
299
  ...r
@@ -303,28 +306,28 @@ function qe(e, pe) {
303
306
  }
304
307
  }
305
308
  ),
306
- "appliedPolicies" in e.defaultValues && !((X = (z = e.fieldOptions) == null ? void 0 : z.appliedPolicies) != null && X.hidden) && /* @__PURE__ */ t(
309
+ "appliedPolicies" in e.defaultValues && !((X = (z = e.fieldOptions) == null ? void 0 : z.appliedPolicies) != null && X.hidden) && /* @__PURE__ */ i(
307
310
  h,
308
311
  {
309
312
  name: "appliedPolicies",
310
313
  control: f,
311
- render: ({ field: { value: i, onChange: n } }) => {
314
+ render: ({ field: { value: t, onChange: n } }) => {
312
315
  var r;
313
- return /* @__PURE__ */ t(
316
+ return /* @__PURE__ */ i(
314
317
  m,
315
318
  {
316
319
  condition: a === "left",
317
320
  wrapper: (o) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
318
- /* @__PURE__ */ t(y, { width: "32%", children: "Policy List" }),
319
- /* @__PURE__ */ t(l, { width: "68%", children: o })
321
+ /* @__PURE__ */ i(y, { width: "32%", children: "Policy List" }),
322
+ /* @__PURE__ */ i(l, { width: "68%", children: o })
320
323
  ] }),
321
324
  children: /* @__PURE__ */ c(l, { mb: 2, children: [
322
- /* @__PURE__ */ t(
325
+ /* @__PURE__ */ i(
323
326
  Ne,
324
327
  {
325
328
  policyList: e.policyList,
326
329
  labelPosition: a,
327
- value: i || void 0,
330
+ value: t || void 0,
328
331
  onChange: n
329
332
  }
330
333
  ),
@@ -335,16 +338,16 @@ function qe(e, pe) {
335
338
  }
336
339
  }
337
340
  ),
338
- /* @__PURE__ */ t(
341
+ /* @__PURE__ */ i(
339
342
  h,
340
343
  {
341
344
  name: "variables",
342
345
  control: f,
343
- render: ({ field: { value: i, onChange: n } }) => /* @__PURE__ */ t(
346
+ render: ({ field: { value: t, onChange: n } }) => /* @__PURE__ */ i(
344
347
  _e,
345
348
  {
346
349
  template: w,
347
- value: i,
350
+ value: t,
348
351
  mapboxAccessToken: e.mapboxAccessToken,
349
352
  variant: e.inputVariant,
350
353
  labelPosition: a,
@@ -355,34 +358,34 @@ function qe(e, pe) {
355
358
  }
356
359
  ),
357
360
  "fileInBase64" in e.defaultValues && !((ee = (Z = e.fieldOptions) == null ? void 0 : Z.fileInBase64) != null && ee.hidden) && /* @__PURE__ */ c(Oe, { children: [
358
- /* @__PURE__ */ t(
361
+ /* @__PURE__ */ i(
359
362
  h,
360
363
  {
361
364
  name: "fileInBase64",
362
365
  control: f,
363
- render: ({ field: { onChange: i, value: n, ...r } }) => {
366
+ render: ({ field: { onChange: t, value: n, ...r } }) => {
364
367
  var d;
365
368
  const o = (s) => {
366
369
  if (s.target.files) {
367
370
  const u = new FileReader();
368
371
  u.onload = async (b) => {
369
372
  const Ce = b.target.result.split("base64,")[1];
370
- i(Ce);
373
+ t(Ce);
371
374
  };
372
375
  const g = s.target.files[0];
373
376
  T("originalFileName", g.name), T("contentType", g.type), u.readAsDataURL(g);
374
377
  }
375
378
  };
376
- return /* @__PURE__ */ t(
379
+ return /* @__PURE__ */ i(
377
380
  m,
378
381
  {
379
382
  condition: a === "left",
380
383
  wrapper: (s) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
381
- /* @__PURE__ */ t(y, { width: "32%", children: "File to Upload" }),
382
- /* @__PURE__ */ t(l, { width: "68%", children: s })
384
+ /* @__PURE__ */ i(y, { width: "32%", children: "File to Upload" }),
385
+ /* @__PURE__ */ i(l, { width: "68%", children: s })
383
386
  ] }),
384
387
  children: /* @__PURE__ */ c(l, { mb: 2, children: [
385
- /* @__PURE__ */ t(
388
+ /* @__PURE__ */ i(
386
389
  x,
387
390
  {
388
391
  type: "file",
@@ -402,24 +405,24 @@ function qe(e, pe) {
402
405
  }
403
406
  }
404
407
  ),
405
- !((ie = (te = e.fieldOptions) == null ? void 0 : te.redacted) != null && ie.hidden) && /* @__PURE__ */ t(
408
+ !((ie = (te = e.fieldOptions) == null ? void 0 : te.redacted) != null && ie.hidden) && /* @__PURE__ */ i(
406
409
  m,
407
410
  {
408
411
  condition: a === "left",
409
- wrapper: (i) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
410
- /* @__PURE__ */ t(y, { width: "32%", children: "Redacted" }),
411
- /* @__PURE__ */ t(l, { width: "68%", children: i })
412
+ wrapper: (t) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
413
+ /* @__PURE__ */ i(y, { width: "32%", children: "Redacted" }),
414
+ /* @__PURE__ */ i(l, { width: "68%", children: t })
412
415
  ] }),
413
416
  children: /* @__PURE__ */ c(l, { mb: 2, children: [
414
- /* @__PURE__ */ t(
417
+ /* @__PURE__ */ i(
415
418
  ue,
416
419
  {
417
- control: /* @__PURE__ */ t(
420
+ control: /* @__PURE__ */ i(
418
421
  h,
419
422
  {
420
423
  name: "redacted",
421
424
  control: f,
422
- render: ({ field: { value: i, ...n } }) => /* @__PURE__ */ t(he, { checked: !!i, ...n })
425
+ render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ i(he, { checked: !!t, ...n })
423
426
  }
424
427
  ),
425
428
  label: a === "default" ? "Redacted" : void 0
@@ -429,24 +432,24 @@ function qe(e, pe) {
429
432
  ] })
430
433
  }
431
434
  ),
432
- !((ae = (le = e.fieldOptions) == null ? void 0 : le.contentEncrypted) != null && ae.hidden) && /* @__PURE__ */ t(
435
+ !((ae = (le = e.fieldOptions) == null ? void 0 : le.contentEncrypted) != null && ae.hidden) && /* @__PURE__ */ i(
433
436
  m,
434
437
  {
435
438
  condition: a === "left",
436
- wrapper: (i) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
437
- /* @__PURE__ */ t(y, { width: "32%", children: "Content Encrypted" }),
438
- /* @__PURE__ */ t(l, { width: "68%", children: i })
439
+ wrapper: (t) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
440
+ /* @__PURE__ */ i(y, { width: "32%", children: "Content Encrypted" }),
441
+ /* @__PURE__ */ i(l, { width: "68%", children: t })
439
442
  ] }),
440
443
  children: /* @__PURE__ */ c(l, { mb: 2, children: [
441
- /* @__PURE__ */ t(
444
+ /* @__PURE__ */ i(
442
445
  ue,
443
446
  {
444
- control: /* @__PURE__ */ t(
447
+ control: /* @__PURE__ */ i(
445
448
  h,
446
449
  {
447
450
  name: "contentEncrypted",
448
451
  control: f,
449
- render: ({ field: { value: i, ...n } }) => /* @__PURE__ */ t(he, { checked: !!i, ...n })
452
+ render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ i(he, { checked: !!t, ...n })
450
453
  }
451
454
  ),
452
455
  label: a === "default" ? "Content Encrypted" : void 0
@@ -457,7 +460,7 @@ function qe(e, pe) {
457
460
  }
458
461
  )
459
462
  ] }),
460
- !((oe = (re = e.fieldOptions) == null ? void 0 : re.disseminationList) != null && oe.hidden) && /* @__PURE__ */ t(
463
+ !((oe = (re = e.fieldOptions) == null ? void 0 : re.disseminationList) != null && oe.hidden) && /* @__PURE__ */ i(
461
464
  h,
462
465
  {
463
466
  name: "disseminationList",
@@ -465,11 +468,11 @@ function qe(e, pe) {
465
468
  required: !0
466
469
  },
467
470
  control: f,
468
- render: ({ field: { value: i, onChange: n }, fieldState: r }) => {
469
- const o = i || [], d = (s) => {
471
+ render: ({ field: { value: t, onChange: n }, fieldState: r }) => {
472
+ const o = t || [], d = (s) => {
470
473
  n(s);
471
474
  };
472
- return /* @__PURE__ */ t(
475
+ return /* @__PURE__ */ i(
473
476
  Pe,
474
477
  {
475
478
  selectedIds: o,
@@ -483,7 +486,7 @@ function qe(e, pe) {
483
486
  }
484
487
  }
485
488
  ),
486
- !((se = (ce = e.fieldOptions) == null ? void 0 : ce.securityLevelId) != null && se.hidden) && /* @__PURE__ */ t(l, { mt: 2, children: /* @__PURE__ */ t(
489
+ !((se = (ce = e.fieldOptions) == null ? void 0 : ce.securityLevelId) != null && se.hidden) && /* @__PURE__ */ i(l, { mt: 2, children: /* @__PURE__ */ i(
487
490
  h,
488
491
  {
489
492
  name: "securityLevelId",
@@ -491,15 +494,15 @@ function qe(e, pe) {
491
494
  required: !0
492
495
  },
493
496
  control: f,
494
- render: ({ field: { value: i, onChange: n }, fieldState: r }) => {
497
+ render: ({ field: { value: t, onChange: n }, fieldState: r }) => {
495
498
  var d, s;
496
499
  const o = (u) => {
497
500
  n(u);
498
501
  };
499
- return /* @__PURE__ */ t(
502
+ return /* @__PURE__ */ i(
500
503
  Re,
501
504
  {
502
- value: i || 0,
505
+ value: t || 0,
503
506
  ontologyId: e.ontologyId,
504
507
  appRoles: e.appRoles,
505
508
  securityLevels: e.securityLevels,
@@ -523,8 +526,8 @@ function qe(e, pe) {
523
526
  mt: 3,
524
527
  width: "100%",
525
528
  children: [
526
- e.onCancel && /* @__PURE__ */ t(
527
- C,
529
+ e.onCancel && /* @__PURE__ */ i(
530
+ O,
528
531
  {
529
532
  color: "primary",
530
533
  variant: "text",
@@ -534,21 +537,21 @@ function qe(e, pe) {
534
537
  children: "Cancel"
535
538
  }
536
539
  ),
537
- /* @__PURE__ */ t(l, { sx: { flex: e.onCancel ? "none" : 1 }, children: e.customSaveButtons ? e.customSaveButtons : e.saveButtons ? e.saveButtons.map((i, n) => /* @__PURE__ */ t(
538
- C,
540
+ /* @__PURE__ */ i(l, { sx: { flex: e.onCancel ? "none" : 1 }, children: e.customSaveButtons ? e.customSaveButtons : e.saveButtons ? e.saveButtons.map((t, n) => /* @__PURE__ */ i(
541
+ O,
539
542
  {
540
543
  type: "submit",
541
544
  color: "primary",
542
545
  variant: "contained",
543
546
  disabled: e.loading,
544
- startIcon: i.icon,
547
+ startIcon: t.icon,
545
548
  sx: { ml: 1, textTransform: "none" },
546
- onClick: i.onClick,
547
- children: i.label
549
+ onClick: t.onClick,
550
+ children: t.label
548
551
  },
549
552
  n
550
- )) : /* @__PURE__ */ t(
551
- C,
553
+ )) : /* @__PURE__ */ i(
554
+ O,
552
555
  {
553
556
  type: "submit",
554
557
  color: "primary",
@@ -5,7 +5,7 @@ import { DataGrid as fe } from "@mui/x-data-grid";
5
5
  import { useState as G, useEffect as ue } from "react";
6
6
  import h from "lodash";
7
7
  import { d as ye } from "../../ol-lGwSyEIV.js";
8
- import { V as he } from "../../index-CCkupzf4.js";
8
+ import { V as he } from "../../index-B6DDeKlQ.js";
9
9
  import { RangeSelector as me } from "../range-selector/index.js";
10
10
  const $e = ({
11
11
  open: F,
@@ -1,23 +1,23 @@
1
- import { jsx as n, jsxs as u, Fragment as _ } from "react/jsx-runtime";
2
- import { KeyboardArrowUp as R, KeyboardArrowDown as U, Add as J, LockOutlined as Q } from "@mui/icons-material";
3
- import { Box as M, Typography as s, FormControl as X, FormLabel as Z, FormGroup as z, FormControlLabel as P, Checkbox as y, Button as Y, Chip as O, Dialog as p, DialogTitle as ee, DialogContent as ne, DialogActions as ae, InputAdornment as de, Tooltip as le } from "@mui/material";
4
- import H from "dayjs";
5
- import x from "lodash";
6
- import { useState as E } from "react";
7
- import ce from "./hooks/useToggle.js";
1
+ import { jsx as n, jsxs as u, Fragment as E } from "react/jsx-runtime";
2
+ import { KeyboardArrowUp as U, KeyboardArrowDown as J, Add as Q, LockOutlined as X } from "@mui/icons-material";
3
+ import { Box as W, Typography as s, FormControl as Z, FormLabel as z, FormGroup as P, FormControlLabel as y, Checkbox as O, Button as _, Chip as p, Dialog as ee, DialogTitle as ne, DialogContent as ae, DialogActions as de, InputAdornment as le, Tooltip as ce } from "@mui/material";
4
+ import K from "dayjs";
5
+ import C from "lodash";
6
+ import { useState as G } from "react";
7
+ import te from "./hooks/useToggle.js";
8
8
  import { ConditionalWrapper as o } from "./components/conditional-wrapper/index.js";
9
- import { DateTimePicker as te } from "./components/date-time-picker/index.js";
10
- import { GeometryPicker as ie } from "./components/geometry-picker/index.js";
11
- import { PhoneInput as me } from "./components/phone-input/index.js";
12
- import W from "./components/instance-form/components/TopLabelWrapper.js";
9
+ import { DateTimePicker as ie } from "./components/date-time-picker/index.js";
10
+ import { GeometryPicker as me } from "./components/geometry-picker/index.js";
11
+ import { PhoneInput as he } from "./components/phone-input/index.js";
12
+ import S from "./components/instance-form/components/TopLabelWrapper.js";
13
13
  import { B as h } from "./Box-SSMZuKnS.js";
14
- import { T as G } from "./TextField-CdKnj6de.js";
15
- import { F as he } from "./FormControlLabel-BNT5EI0b.js";
16
- import { C as ue } from "./Checkbox-B0P8LhCl.js";
17
- import { F as re, I as oe } from "./InputLabel-ClDXuWBr.js";
18
- import { S as se } from "./Select-DuyWoyoF.js";
19
- import { M as Ie } from "./MenuItem-Lcjh1XlV.js";
20
- import { Container as fe, Values as ge, MiniButton as we } from "./components/instance-form/components/composite-list/styled.js";
14
+ import { T as H } from "./TextField-CdKnj6de.js";
15
+ import { F as ue } from "./FormControlLabel-BNT5EI0b.js";
16
+ import { C as re } from "./Checkbox-B0P8LhCl.js";
17
+ import { F as oe, I as se } from "./InputLabel-ClDXuWBr.js";
18
+ import { S as Ie } from "./Select-DuyWoyoF.js";
19
+ import { M as fe } from "./MenuItem-Lcjh1XlV.js";
20
+ import { Container as ge, Values as we, MiniButton as xe } from "./components/instance-form/components/composite-list/styled.js";
21
21
  function Ce({
22
22
  property: r,
23
23
  mapboxAccessToken: e,
@@ -28,19 +28,19 @@ function Ce({
28
28
  onChange: T
29
29
  }) {
30
30
  var b, k, A;
31
- const a = ce(!1), [f, v] = E(), [V, S] = E(!1), F = 10, B = (t) => {
32
- v(x.get(t, r.propertyId));
33
- }, N = () => {
31
+ const a = te(!1), [f, v] = G(), [V, B] = G(!1), F = 10, N = (t) => {
32
+ v(C.get(t, r.propertyId));
33
+ }, $ = () => {
34
34
  T([...l || [], f]), v(""), a.action.close();
35
- }, $ = (t) => () => {
35
+ }, j = (t) => () => {
36
36
  if (l) {
37
37
  const i = [...l];
38
38
  i.splice(t, 1), T(i);
39
39
  }
40
40
  }, q = (t) => {
41
- const { value: i, checked: C } = t.target;
42
- let g = x.isArray(l) ? l : [];
43
- C ? g.push(i) : g = g.filter((d) => d !== i), T(g);
41
+ const { value: i, checked: x } = t.target;
42
+ let g = C.isArray(l) ? l : [];
43
+ x ? g.push(i) : g = g.filter((M) => M !== i), T(g);
44
44
  };
45
45
  if (((k = (b = r.dataTypeInfo) == null ? void 0 : b.innerType) == null ? void 0 : k.type) === "enum") {
46
46
  const { enumValues: t } = r.dataTypeInfo.innerType;
@@ -48,24 +48,24 @@ function Ce({
48
48
  o,
49
49
  {
50
50
  condition: c === "left",
51
- wrapper: (i) => /* @__PURE__ */ u(M, { display: "flex", alignItems: "center", children: [
51
+ wrapper: (i) => /* @__PURE__ */ u(W, { display: "flex", alignItems: "center", children: [
52
52
  /* @__PURE__ */ n(s, { width: "32%", children: r.name }),
53
- /* @__PURE__ */ n(M, { width: "68%", children: i })
53
+ /* @__PURE__ */ n(W, { width: "68%", children: i })
54
54
  ] }),
55
- children: /* @__PURE__ */ u(_, { children: [
56
- /* @__PURE__ */ u(X, { fullWidth: !0, component: "fieldset", variant: w, children: [
57
- c === "default" && /* @__PURE__ */ n(Z, { component: "legend", sx: { mb: 1 }, children: r.name }),
58
- /* @__PURE__ */ n(z, { children: t && t.length > 0 ? t.slice(0, V ? 9999 : F).map((i, C) => /* @__PURE__ */ n(
59
- P,
55
+ children: /* @__PURE__ */ u(E, { children: [
56
+ /* @__PURE__ */ u(Z, { fullWidth: !0, component: "fieldset", variant: w, children: [
57
+ c === "default" && /* @__PURE__ */ n(z, { component: "legend", sx: { mb: 1 }, children: r.name }),
58
+ /* @__PURE__ */ n(P, { children: t && t.length > 0 ? t.slice(0, V ? 9999 : F).map((i, x) => /* @__PURE__ */ n(
59
+ y,
60
60
  {
61
61
  label: i,
62
62
  control: /* @__PURE__ */ n(
63
- y,
63
+ O,
64
64
  {
65
65
  name: r.propertyId,
66
66
  value: i,
67
67
  size: "small",
68
- checked: x.isArray(l) ? l.includes(i) : !1,
68
+ checked: C.isArray(l) ? l.includes(i) : !1,
69
69
  onChange: q
70
70
  }
71
71
  ),
@@ -75,16 +75,16 @@ function Ce({
75
75
  }
76
76
  }
77
77
  },
78
- C
78
+ x
79
79
  )) : /* @__PURE__ */ n(s, { variant: "caption", mb: 1, children: "No enum values!" }) })
80
80
  ] }),
81
- x.isArray(t) && t.length > F && /* @__PURE__ */ u(
82
- Y,
81
+ C.isArray(t) && t.length > F && /* @__PURE__ */ u(
82
+ _,
83
83
  {
84
84
  size: "small",
85
85
  sx: { p: 0, textTransform: "none" },
86
- endIcon: V ? /* @__PURE__ */ n(R, {}) : /* @__PURE__ */ n(U, {}),
87
- onClick: () => S((i) => !i),
86
+ endIcon: V ? /* @__PURE__ */ n(U, {}) : /* @__PURE__ */ n(J, {}),
87
+ onClick: () => B((i) => !i),
88
88
  children: [
89
89
  "Show ",
90
90
  V ? "Less" : "More"
@@ -95,33 +95,33 @@ function Ce({
95
95
  }
96
96
  );
97
97
  }
98
- return /* @__PURE__ */ u(_, { children: [
98
+ return /* @__PURE__ */ u(E, { children: [
99
99
  /* @__PURE__ */ n(
100
100
  o,
101
101
  {
102
102
  condition: c === "left",
103
- wrapper: (t) => /* @__PURE__ */ u(M, { display: "flex", alignItems: "center", children: [
103
+ wrapper: (t) => /* @__PURE__ */ u(W, { display: "flex", alignItems: "center", children: [
104
104
  /* @__PURE__ */ n(s, { width: "32%", children: r.name }),
105
- /* @__PURE__ */ n(M, { width: "68%", children: t })
105
+ /* @__PURE__ */ n(W, { width: "68%", children: t })
106
106
  ] }),
107
- children: /* @__PURE__ */ u(fe, { variant: w, children: [
107
+ children: /* @__PURE__ */ u(ge, { variant: w, children: [
108
108
  c === "default" && /* @__PURE__ */ n(s, { children: r.name }),
109
- /* @__PURE__ */ n(ge, { children: x.isArray(l) && l.map((t, i) => {
110
- var C, g;
109
+ /* @__PURE__ */ n(we, { children: C.isArray(l) && l.map((t, i) => {
110
+ var x, g;
111
111
  return /* @__PURE__ */ n(
112
- O,
112
+ p,
113
113
  {
114
- label: ((g = (C = r.dataTypeInfo) == null ? void 0 : C.innerType) == null ? void 0 : g.type) === "date" ? H(t).format("DD/MM/YYYY HH:mm:ss") : t,
114
+ label: ((g = (x = r.dataTypeInfo) == null ? void 0 : x.innerType) == null ? void 0 : g.type) === "date" ? K(t).format("DD/MM/YYYY HH:mm:ss") : t,
115
115
  size: I,
116
- onDelete: $(i)
116
+ onDelete: j(i)
117
117
  },
118
118
  i
119
119
  );
120
120
  }) }),
121
121
  /* @__PURE__ */ n(
122
- we,
122
+ xe,
123
123
  {
124
- startIcon: /* @__PURE__ */ n(J, {}),
124
+ startIcon: /* @__PURE__ */ n(Q, {}),
125
125
  variant: "text",
126
126
  onClick: a.action.open,
127
127
  children: "Add"
@@ -131,16 +131,16 @@ function Ce({
131
131
  }
132
132
  ),
133
133
  /* @__PURE__ */ u(
134
- p,
134
+ ee,
135
135
  {
136
136
  open: a.state.isOpen,
137
137
  onClose: a.action.close,
138
138
  maxWidth: "sm",
139
139
  fullWidth: !0,
140
140
  children: [
141
- /* @__PURE__ */ n(ee, { children: "Add List Value" }),
142
- /* @__PURE__ */ n(ne, { children: (A = r.dataTypeInfo) != null && A.innerType ? /* @__PURE__ */ n(
143
- xe,
141
+ /* @__PURE__ */ n(ne, { children: "Add List Value" }),
142
+ /* @__PURE__ */ n(ae, { children: (A = r.dataTypeInfo) != null && A.innerType ? /* @__PURE__ */ n(
143
+ Ve,
144
144
  {
145
145
  mapboxAccessToken: e,
146
146
  property: {
@@ -149,12 +149,12 @@ function Ce({
149
149
  type: r.dataTypeInfo.innerType.type
150
150
  },
151
151
  value: f,
152
- onChange: B
152
+ onChange: N
153
153
  }
154
154
  ) : null }),
155
- /* @__PURE__ */ u(ae, { children: [
155
+ /* @__PURE__ */ u(de, { children: [
156
156
  /* @__PURE__ */ n(
157
- Y,
157
+ _,
158
158
  {
159
159
  variant: "contained",
160
160
  color: "inherit",
@@ -162,14 +162,14 @@ function Ce({
162
162
  children: "Cancel"
163
163
  }
164
164
  ),
165
- /* @__PURE__ */ n(Y, { variant: "contained", color: "primary", onClick: N, children: "Ok" })
165
+ /* @__PURE__ */ n(_, { variant: "contained", color: "primary", onClick: $, children: "Ok" })
166
166
  ] })
167
167
  ]
168
168
  }
169
169
  )
170
170
  ] });
171
171
  }
172
- function xe({
172
+ function Ve({
173
173
  mapboxAccessToken: r,
174
174
  property: e,
175
175
  value: l,
@@ -178,22 +178,21 @@ function xe({
178
178
  size: I = "medium",
179
179
  defaultExtent: T,
180
180
  fieldOptions: a,
181
- // keyAuth,
182
181
  onChange: f
183
182
  }) {
184
- var q, b, k, A, t, i, C, g;
183
+ var q, b, k, A, t, i, x, g, M;
185
184
  const v = (d) => {
186
- const D = d.target.value.split(",").map((j) => j.trimStart());
185
+ const L = d.target.value.split(",").map((Y) => Y.trimStart());
187
186
  f({
188
- [e.propertyId]: D
187
+ [e.propertyId]: L
189
188
  });
190
189
  }, V = (d) => {
191
- const { name: m, type: D, checked: j, value: K } = d.target;
192
- let L = K;
193
- e.type === "double" && (L = L.replace(",", "."), L = L.replace(/[^\d.-]+/g, "")), f({
194
- [m]: D === "checkbox" ? j : L
190
+ const { name: m, type: L, checked: Y, value: R } = d.target;
191
+ let D = R;
192
+ e.type === "double" && (D = D.replace(",", "."), D = D.replace(/[^\d.-]+/g, "")), f({
193
+ [m]: L === "checkbox" ? Y : D
195
194
  });
196
- }, S = (d) => {
195
+ }, B = (d) => {
197
196
  f({
198
197
  [e.propertyId]: d
199
198
  });
@@ -201,15 +200,15 @@ function xe({
201
200
  f({
202
201
  [e.propertyId]: d.target.value
203
202
  });
204
- }, B = (d) => (m) => {
203
+ }, N = (d) => (m) => {
205
204
  f({
206
205
  [d]: m
207
206
  });
208
- }, N = (d) => (m) => {
207
+ }, $ = (d) => (m) => {
209
208
  f({
210
209
  [d]: m
211
210
  });
212
- }, $ = (d) => (m) => {
211
+ }, j = (d) => (m) => {
213
212
  f({
214
213
  [d]: m
215
214
  });
@@ -237,13 +236,13 @@ function xe({
237
236
  o,
238
237
  {
239
238
  condition: c === "top",
240
- wrapper: W(
239
+ wrapper: S(
241
240
  e == null ? void 0 : e.name,
242
241
  e == null ? void 0 : e.required,
243
242
  (q = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : q.description
244
243
  ),
245
244
  children: /* @__PURE__ */ n(
246
- G,
245
+ H,
247
246
  {
248
247
  label: c === "default" ? e.name : void 0,
249
248
  placeholder: ((b = a == null ? void 0 : a[e.propertyId]) == null ? void 0 : b.placeholder) ?? "",
@@ -257,13 +256,16 @@ function xe({
257
256
  multiline: e.type === "text",
258
257
  disabled: !e.editable,
259
258
  fullWidth: !0,
259
+ inputProps: {
260
+ maxLength: ((k = a == null ? void 0 : a[e.propertyId]) == null ? void 0 : k.maxChar) ?? 1e5
261
+ },
260
262
  InputProps: {
261
263
  size: I,
262
264
  ...a && a[e.propertyId] && {
263
265
  tabIndex: a[e.propertyId].order
264
266
  },
265
267
  ...e.privacyPreservationMethod === "ENCRYPTION" ? {
266
- endAdornment: /* @__PURE__ */ n(de, { position: "end", children: /* @__PURE__ */ n(le, { title: "Encrypted Field", children: /* @__PURE__ */ n(Q, {}) }) })
268
+ endAdornment: /* @__PURE__ */ n(le, { position: "end", children: /* @__PURE__ */ n(ce, { title: "Encrypted Field", children: /* @__PURE__ */ n(X, {}) }) })
267
269
  } : {}
268
270
  }
269
271
  }
@@ -273,7 +275,7 @@ function xe({
273
275
  }
274
276
  );
275
277
  if (e.type === "date") {
276
- const d = l !== void 0 ? H(l).format() : l;
278
+ const d = l !== void 0 ? K(l).format() : l;
277
279
  return /* @__PURE__ */ n(
278
280
  o,
279
281
  {
@@ -286,20 +288,20 @@ function xe({
286
288
  o,
287
289
  {
288
290
  condition: c === "top",
289
- wrapper: W(
291
+ wrapper: S(
290
292
  e.name,
291
293
  e == null ? void 0 : e.required,
292
- (k = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : k.description
294
+ (A = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : A.description
293
295
  ),
294
296
  children: /* @__PURE__ */ n(
295
- te,
297
+ ie,
296
298
  {
297
299
  label: c === "default" ? e.name : void 0,
298
300
  value: d,
299
301
  variant: w,
300
302
  size: I,
301
303
  name: e.propertyId,
302
- onChange: S,
304
+ onChange: B,
303
305
  ...a && a[e.propertyId] && {
304
306
  minDate: a[e.propertyId].minDate
305
307
  }
@@ -312,7 +314,7 @@ function xe({
312
314
  }
313
315
  if (e.type === "list") {
314
316
  let d = "";
315
- return e.defaultValue && (d = x.isArray(e.defaultValue) ? l.join(", ") : e.defaultValue), l && (d = x.isArray(l) ? l.join(",") : l), /* @__PURE__ */ n(
317
+ return e.defaultValue && (d = C.isArray(e.defaultValue) ? l.join(", ") : e.defaultValue), l && (d = C.isArray(l) ? l.join(",") : l), /* @__PURE__ */ n(
316
318
  o,
317
319
  {
318
320
  condition: c === "left",
@@ -324,13 +326,13 @@ function xe({
324
326
  o,
325
327
  {
326
328
  condition: c === "top",
327
- wrapper: W(
329
+ wrapper: S(
328
330
  e.name,
329
331
  e == null ? void 0 : e.required,
330
- (A = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : A.description
332
+ (t = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : t.description
331
333
  ),
332
334
  children: /* @__PURE__ */ n(
333
- G,
335
+ H,
334
336
  {
335
337
  label: c === "default" ? e.name : void 0,
336
338
  name: e.propertyId,
@@ -365,10 +367,10 @@ function xe({
365
367
  /* @__PURE__ */ n(h, { width: "68%", children: d })
366
368
  ] }),
367
369
  children: /* @__PURE__ */ n(
368
- he,
370
+ ue,
369
371
  {
370
372
  control: /* @__PURE__ */ n(
371
- ue,
373
+ re,
372
374
  {
373
375
  name: e.propertyId,
374
376
  checked: !!(l ?? e.defaultValue ?? !1),
@@ -383,7 +385,7 @@ function xe({
383
385
  );
384
386
  if (e.type === "enum") {
385
387
  let d = [];
386
- return (t = e.dataTypeInfo) != null && t.enumValues && (d = e.dataTypeInfo.enumValues), (C = (i = e.dataTypeInfo) == null ? void 0 : i.innerType) != null && C.enumValues && (d = e.dataTypeInfo.innerType.enumValues), /* @__PURE__ */ n(
388
+ return (i = e.dataTypeInfo) != null && i.enumValues && (d = e.dataTypeInfo.enumValues), (g = (x = e.dataTypeInfo) == null ? void 0 : x.innerType) != null && g.enumValues && (d = e.dataTypeInfo.innerType.enumValues), /* @__PURE__ */ n(
387
389
  o,
388
390
  {
389
391
  condition: c === "left",
@@ -395,22 +397,22 @@ function xe({
395
397
  o,
396
398
  {
397
399
  condition: c === "top",
398
- wrapper: W(
400
+ wrapper: S(
399
401
  e.name,
400
402
  e == null ? void 0 : e.required,
401
- (g = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : g.description
403
+ (M = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : M.description
402
404
  ),
403
405
  children: /* @__PURE__ */ u(
404
- re,
406
+ oe,
405
407
  {
406
408
  fullWidth: !0,
407
409
  variant: w,
408
410
  size: I,
409
411
  required: e.required,
410
412
  children: [
411
- c === "default" && /* @__PURE__ */ n(oe, { id: `${e.propertyId}-label`, children: e.name }),
413
+ c === "default" && /* @__PURE__ */ n(se, { id: `${e.propertyId}-label`, children: e.name }),
412
414
  /* @__PURE__ */ n(
413
- se,
415
+ Ie,
414
416
  {
415
417
  label: c === "default" ? e.name : void 0,
416
418
  name: e.name,
@@ -423,7 +425,7 @@ function xe({
423
425
  tabIndex: a[e.propertyId].order
424
426
  }
425
427
  },
426
- children: d.map((m, D) => /* @__PURE__ */ n(Ie, { value: m, children: m }, D))
428
+ children: d.map((m, L) => /* @__PURE__ */ n(fe, { value: m, children: m }, L))
427
429
  }
428
430
  )
429
431
  ]
@@ -443,14 +445,14 @@ function xe({
443
445
  /* @__PURE__ */ n(h, { width: "68%", children: d })
444
446
  ] }),
445
447
  children: /* @__PURE__ */ n(h, { sx: { width: "100%" }, children: /* @__PURE__ */ n(
446
- ie,
448
+ me,
447
449
  {
448
450
  mapboxAccessToken: r,
449
451
  label: c === "default" ? e.name : void 0,
450
452
  value: l ?? e.defaultValue ?? "",
451
453
  defaultExtent: T,
452
454
  variant: w,
453
- onChange: B(e.propertyId)
455
+ onChange: N(e.propertyId)
454
456
  }
455
457
  ) })
456
458
  }
@@ -463,12 +465,12 @@ function xe({
463
465
  /* @__PURE__ */ n(h, { width: "68%", children: d })
464
466
  ] }),
465
467
  children: /* @__PURE__ */ n(h, { sx: { width: "100%" }, children: /* @__PURE__ */ n(
466
- me,
468
+ he,
467
469
  {
468
470
  label: c === "default" ? e.name : void 0,
469
471
  placeholder: "Enter phone number",
470
472
  value: l ?? e.defaultValue ?? "",
471
- onChange: N(e.propertyId)
473
+ onChange: $(e.propertyId)
472
474
  }
473
475
  ) })
474
476
  }
@@ -481,11 +483,11 @@ function xe({
481
483
  labelPosition: c,
482
484
  size: I,
483
485
  mapboxAccessToken: r,
484
- onChange: $(e.propertyId)
486
+ onChange: j(e.propertyId)
485
487
  }
486
- ) }) : /* @__PURE__ */ n(_, {});
488
+ ) }) : /* @__PURE__ */ n(E, {});
487
489
  }
488
490
  export {
489
491
  Ce as C,
490
- xe as V
492
+ Ve as V
491
493
  };
package/dist/main.d.ts CHANGED
@@ -298,6 +298,8 @@ export declare interface InstanceFormHandle {
298
298
  * @returns whether any form field has been modified
299
299
  */
300
300
  isDirty(): boolean;
301
+
302
+ getWatchedValue: (name: string) => any;
301
303
  }
302
304
 
303
305
  declare interface InstanceFormProps<
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.5.51",
4
+ "version": "1.5.53",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",