@hybridcore/ui 1.5.50 → 1.5.52

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,21 +1,38 @@
1
- import { jsxs as a, Fragment as t, jsx as r } from "react/jsx-runtime";
2
- import { Box as c, Typography as e } from "@mui/material";
3
- const x = (l, o) => (p) => /* @__PURE__ */ a(t, { children: [
4
- /* @__PURE__ */ a(c, { sx: { mb: 1, maxWidth: 400 }, children: [
5
- /* @__PURE__ */ r(
6
- e,
1
+ import { jsxs as o, Fragment as p, jsx as t } from "react/jsx-runtime";
2
+ import { Box as r, Typography as i } from "@mui/material";
3
+ const x = (a, l, e) => (n) => /* @__PURE__ */ o(p, { children: [
4
+ /* @__PURE__ */ o(r, { sx: { mb: 1 }, children: [
5
+ /* @__PURE__ */ o(
6
+ i,
7
7
  {
8
8
  component: "label",
9
9
  sx: {
10
- display: "block",
10
+ display: "inline-block",
11
11
  color: "#1e262b",
12
- fontSize: "16px"
12
+ fontSize: "16px",
13
+ position: "relative",
14
+ fontWeight: 500
13
15
  },
14
- children: l
16
+ children: [
17
+ a,
18
+ l && /* @__PURE__ */ t(
19
+ "span",
20
+ {
21
+ style: {
22
+ position: "absolute",
23
+ top: "-3px",
24
+ right: "-9px",
25
+ fontWeight: "bold",
26
+ fontSize: "16px"
27
+ },
28
+ children: "*"
29
+ }
30
+ )
31
+ ]
15
32
  }
16
33
  ),
17
- o && /* @__PURE__ */ r(
18
- e,
34
+ e && /* @__PURE__ */ t(
35
+ i,
19
36
  {
20
37
  variant: "caption",
21
38
  sx: {
@@ -24,11 +41,11 @@ const x = (l, o) => (p) => /* @__PURE__ */ a(t, { children: [
24
41
  fontSize: "13px",
25
42
  mt: 0.5
26
43
  },
27
- children: o
44
+ children: e
28
45
  }
29
46
  )
30
47
  ] }),
31
- p
48
+ n
32
49
  ] });
33
50
  export {
34
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-KcxlW4QD.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-KcxlW4QD.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-KcxlW4QD.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,17 +1,17 @@
1
1
  import { jsx as t, jsxs as c, Fragment as Oe } from "react/jsx-runtime";
2
- import Ce from "lodash";
3
- import v, { useRef as Ve } from "react";
2
+ import Le from "lodash";
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 g, TextField as x, FormHelperText as fe, FormGroup as Fe, FormControlLabel as ue, Checkbox as he, Button as I } 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
- import { Container as Re } from "../container/index.js";
9
- import { DisseminationList as Ee } from "../data-security-selectors/dissemination-list/index.js";
10
- import { SecurityLevel as Pe } from "../data-security-selectors/security-level/index.js";
11
- import { i as De, d as Be } from "../../utils-Bq0ye5vf.js";
12
- import { TreeSelect as Ae } from "../tree-select/index.js";
8
+ import { Container as Ee } from "../container/index.js";
9
+ import { DisseminationList as Pe } from "../data-security-selectors/dissemination-list/index.js";
10
+ import { SecurityLevel as Re } from "../data-security-selectors/security-level/index.js";
11
+ import { i as Be, d as Ae } from "../../utils-Bq0ye5vf.js";
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",
@@ -20,26 +20,26 @@ const We = {
20
20
  key_ops: ["encrypt", "decrypt"],
21
21
  kty: "oct"
22
22
  };
23
- function qe(e, ve) {
24
- var E, P, D, B, A, 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 C = Ve(null), {
26
- register: V,
27
- handleSubmit: pe,
23
+ function qe(e, pe) {
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 V = Ve(null), {
26
+ register: S,
27
+ handleSubmit: ve,
28
28
  control: f,
29
- formState: { errors: ge, isDirty: S },
30
- getValues: F,
29
+ formState: { errors: ye, isDirty: F },
30
+ getValues: k,
31
31
  setValue: T,
32
- reset: ye,
33
- watch: k
32
+ reset: ge,
33
+ watch: I
34
34
  } = Se({
35
35
  defaultValues: e.defaultValues
36
- }), a = (e == null ? void 0 : e.labelPosition) ?? "default", [be, xe] = v.useState([]), [w, R] = v.useState(), [$e, Te] = v.useState(0), we = v.useMemo(() => {
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
37
  const i = [];
38
38
  return e.mappedTemplates.forEach((n) => {
39
39
  n.creatable || i.push(String(n.id));
40
40
  }), i;
41
41
  }, [e.mappedTemplates]);
42
- v.useEffect(() => {
42
+ p.useEffect(() => {
43
43
  (async () => {
44
44
  const i = { ...e.defaultValues }, n = e.mappedTemplates.get(i.templateId);
45
45
  if (n) {
@@ -48,58 +48,61 @@ function qe(e, ve) {
48
48
  );
49
49
  if (r.length > 0)
50
50
  for (let o = 0; o < r.length; o++) {
51
- const d = r[o], s = Ce.get(i, `variables.${d.propertyId}`);
51
+ const d = r[o], s = Le.get(i, `variables.${d.propertyId}`);
52
52
  if (s && e.keyAuth) {
53
- const u = await De(We), y = await Be(u, String(s));
54
- y.data && (T(`variables.${d.propertyId}`, y.data), Te((b) => b + 1));
53
+ const u = await Be(We), g = await Ae(u, String(s));
54
+ g.data && (T(`variables.${d.propertyId}`, g.data), Te((b) => b + 1));
55
55
  }
56
56
  }
57
57
  }
58
58
  })();
59
59
  }, [e.defaultValues, e.mappedTemplates, e.keyAuth]);
60
- const L = () => {
61
- const i = F("templateId");
62
- w && R(void 0);
60
+ const C = () => {
61
+ const i = k("templateId");
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
66
  if (r.id === i) {
67
- R(r);
67
+ E(r);
68
68
  break;
69
69
  }
70
70
  };
71
- v.useImperativeHandle(ve, () => ({
71
+ p.useImperativeHandle(pe, () => ({
72
72
  requestSubmit() {
73
73
  var i;
74
- (i = C.current) == null || i.requestSubmit();
74
+ (i = V.current) == null || i.requestSubmit();
75
75
  },
76
76
  resetForm() {
77
- ye({
77
+ ge({
78
78
  title: "",
79
79
  description: "",
80
80
  templateId: 0,
81
81
  variables: {}
82
- }), L();
82
+ }), C();
83
83
  },
84
84
  setFormValue(i, n) {
85
85
  T(i, n);
86
86
  },
87
87
  getFormValue(i) {
88
- return F(i);
88
+ return k(i);
89
89
  },
90
90
  isDirty() {
91
- return S;
91
+ return F;
92
+ },
93
+ useWatch() {
94
+ return I;
92
95
  }
93
- })), v.useEffect(() => (L(), () => {
94
- }), [e.mappedTemplates]), v.useEffect(() => {
96
+ })), p.useEffect(() => (C(), () => {
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
- }, p = (i) => {
105
+ }, v = (i) => {
103
106
  var o, d;
104
107
  if (!i) return;
105
108
  const n = (d = (o = e == null ? void 0 : e.fieldOptions) == null ? void 0 : o[i]) == null ? void 0 : d.maxChar;
@@ -110,7 +113,7 @@ function qe(e, ve) {
110
113
  {
111
114
  condition: e.variant === void 0 || e.variant === "inline",
112
115
  wrapper: (i) => /* @__PURE__ */ t(
113
- Re,
116
+ Ee,
114
117
  {
115
118
  disableHeader: !0,
116
119
  sx: { position: "relative", overflow: "visible" },
@@ -120,16 +123,16 @@ function qe(e, ve) {
120
123
  children: /* @__PURE__ */ c(
121
124
  "form",
122
125
  {
123
- ref: C,
124
- onSubmit: pe(e.onSubmit),
126
+ ref: V,
127
+ onSubmit: ve(e.onSubmit),
125
128
  style: { display: "flex", flexDirection: "column" },
126
129
  children: [
127
- !((P = (E = e.fieldOptions) == null ? void 0 : E.title) != null && P.hidden) && /* @__PURE__ */ t(
130
+ !((R = (P = e.fieldOptions) == null ? void 0 : P.title) != null && R.hidden) && /* @__PURE__ */ t(
128
131
  m,
129
132
  {
130
133
  condition: a === "left",
131
134
  wrapper: (i) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
132
- /* @__PURE__ */ t(g, { width: "32%", children: "Title *" }),
135
+ /* @__PURE__ */ t(y, { width: "32%", children: "Title *" }),
133
136
  /* @__PURE__ */ t(l, { width: "68%", children: i })
134
137
  ] }),
135
138
  children: /* @__PURE__ */ c(l, { mb: 2, children: [
@@ -137,17 +140,17 @@ function qe(e, ve) {
137
140
  m,
138
141
  {
139
142
  condition: a === "top",
140
- wrapper: O("Title *"),
143
+ wrapper: L("Title", !0),
141
144
  children: /* @__PURE__ */ t(
142
145
  x,
143
146
  {
144
147
  label: a === "default" ? "Title *" : void 0,
145
148
  variant: e.inputVariant,
146
- placeholder: ((B = (D = e.fieldOptions) == null ? void 0 : D.title) == null ? void 0 : B.placeholder) ?? "",
147
- inputProps: p("title") ? { maxLength: p("title") } : void 0,
149
+ placeholder: ((A = (B = e.fieldOptions) == null ? void 0 : B.title) == null ? void 0 : A.placeholder) ?? "",
150
+ inputProps: v("title") ? { maxLength: v("title") } : void 0,
148
151
  fullWidth: !0,
149
- ...V("title", { required: !0 }),
150
- ...ge.title && {
152
+ ...S("title", { required: !0 }),
153
+ ...ye.title && {
151
154
  helperText: "This field is required!",
152
155
  error: !0
153
156
  }
@@ -155,7 +158,7 @@ function qe(e, ve) {
155
158
  )
156
159
  }
157
160
  ),
158
- p("title") && /* @__PURE__ */ t(fe, { sx: { textAlign: "right", mt: 0.5 }, children: `${(A = k("title")) == null ? void 0 : A.length}/${p("title")}` }),
161
+ v("title") && /* @__PURE__ */ t(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
  }
@@ -165,7 +168,7 @@ function qe(e, ve) {
165
168
  {
166
169
  condition: a === "left",
167
170
  wrapper: (i) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
168
- /* @__PURE__ */ t(g, { width: "32%", children: "Description" }),
171
+ /* @__PURE__ */ t(y, { width: "32%", children: "Description" }),
169
172
  /* @__PURE__ */ t(l, { width: "68%", children: i })
170
173
  ] }),
171
174
  children: /* @__PURE__ */ c(l, { mb: 2, children: [
@@ -173,23 +176,23 @@ function qe(e, ve) {
173
176
  m,
174
177
  {
175
178
  condition: a === "top",
176
- wrapper: O("Description"),
179
+ wrapper: L("Description", !1),
177
180
  children: /* @__PURE__ */ t(
178
181
  x,
179
182
  {
180
183
  label: a === "default" ? "Description" : void 0,
181
- inputProps: p("description") ? { maxLength: p("description") } : void 0,
184
+ inputProps: v("description") ? { maxLength: v("description") } : void 0,
182
185
  placeholder: (($ = (q = e.fieldOptions) == null ? void 0 : q.description) == null ? void 0 : $.placeholder) ?? "",
183
186
  variant: e.inputVariant,
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
- p("description") && /* @__PURE__ */ t(fe, { sx: { textAlign: "right", mt: 0.5 }, children: `${(U = k("description")) == null ? void 0 : U.length}/${p(
195
+ v("description") && /* @__PURE__ */ t(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)
@@ -201,7 +204,7 @@ function qe(e, ve) {
201
204
  {
202
205
  condition: a === "left",
203
206
  wrapper: (i) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
204
- /* @__PURE__ */ t(g, { width: "32%", children: "Template" }),
207
+ /* @__PURE__ */ t(y, { width: "32%", children: "Template" }),
205
208
  /* @__PURE__ */ t(l, { width: "68%", children: i })
206
209
  ] }),
207
210
  children: /* @__PURE__ */ c(Fe, { sx: { mb: 2 }, children: [
@@ -209,7 +212,7 @@ function qe(e, ve) {
209
212
  m,
210
213
  {
211
214
  condition: a === "top",
212
- wrapper: O("Template"),
215
+ wrapper: L("Template", !1),
213
216
  children: /* @__PURE__ */ t(
214
217
  h,
215
218
  {
@@ -234,7 +237,7 @@ function qe(e, ve) {
234
237
  );
235
238
  }
236
239
  return /* @__PURE__ */ t(
237
- Ae,
240
+ De,
238
241
  {
239
242
  label: a === "default" ? "Template" : void 0,
240
243
  data: be,
@@ -247,7 +250,7 @@ function qe(e, ve) {
247
250
  value: s ? Number(d) : 0
248
251
  }
249
252
  };
250
- n(u), L();
253
+ n(u), C();
251
254
  }
252
255
  }
253
256
  );
@@ -280,7 +283,7 @@ function qe(e, ve) {
280
283
  {
281
284
  condition: a === "left",
282
285
  wrapper: (s) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
283
- /* @__PURE__ */ t(g, { width: "32%", children: "Alias List" }),
286
+ /* @__PURE__ */ t(y, { width: "32%", children: "Alias List" }),
284
287
  /* @__PURE__ */ t(l, { width: "68%", children: s })
285
288
  ] }),
286
289
  children: /* @__PURE__ */ c(l, { mb: 2, children: [
@@ -315,7 +318,7 @@ function qe(e, ve) {
315
318
  {
316
319
  condition: a === "left",
317
320
  wrapper: (o) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
318
- /* @__PURE__ */ t(g, { width: "32%", children: "Policy List" }),
321
+ /* @__PURE__ */ t(y, { width: "32%", children: "Policy List" }),
319
322
  /* @__PURE__ */ t(l, { width: "68%", children: o })
320
323
  ] }),
321
324
  children: /* @__PURE__ */ c(l, { mb: 2, children: [
@@ -366,11 +369,11 @@ function qe(e, ve) {
366
369
  if (s.target.files) {
367
370
  const u = new FileReader();
368
371
  u.onload = async (b) => {
369
- const Le = b.target.result.split("base64,")[1];
370
- i(Le);
372
+ const Ce = b.target.result.split("base64,")[1];
373
+ i(Ce);
371
374
  };
372
- const y = s.target.files[0];
373
- T("originalFileName", y.name), T("contentType", y.type), u.readAsDataURL(y);
375
+ const g = s.target.files[0];
376
+ T("originalFileName", g.name), T("contentType", g.type), u.readAsDataURL(g);
374
377
  }
375
378
  };
376
379
  return /* @__PURE__ */ t(
@@ -378,7 +381,7 @@ function qe(e, ve) {
378
381
  {
379
382
  condition: a === "left",
380
383
  wrapper: (s) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
381
- /* @__PURE__ */ t(g, { width: "32%", children: "File to Upload" }),
384
+ /* @__PURE__ */ t(y, { width: "32%", children: "File to Upload" }),
382
385
  /* @__PURE__ */ t(l, { width: "68%", children: s })
383
386
  ] }),
384
387
  children: /* @__PURE__ */ c(l, { mb: 2, children: [
@@ -407,7 +410,7 @@ function qe(e, ve) {
407
410
  {
408
411
  condition: a === "left",
409
412
  wrapper: (i) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
410
- /* @__PURE__ */ t(g, { width: "32%", children: "Redacted" }),
413
+ /* @__PURE__ */ t(y, { width: "32%", children: "Redacted" }),
411
414
  /* @__PURE__ */ t(l, { width: "68%", children: i })
412
415
  ] }),
413
416
  children: /* @__PURE__ */ c(l, { mb: 2, children: [
@@ -434,7 +437,7 @@ function qe(e, ve) {
434
437
  {
435
438
  condition: a === "left",
436
439
  wrapper: (i) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
437
- /* @__PURE__ */ t(g, { width: "32%", children: "Content Encrypted" }),
440
+ /* @__PURE__ */ t(y, { width: "32%", children: "Content Encrypted" }),
438
441
  /* @__PURE__ */ t(l, { width: "68%", children: i })
439
442
  ] }),
440
443
  children: /* @__PURE__ */ c(l, { mb: 2, children: [
@@ -470,7 +473,7 @@ function qe(e, ve) {
470
473
  n(s);
471
474
  };
472
475
  return /* @__PURE__ */ t(
473
- Ee,
476
+ Pe,
474
477
  {
475
478
  selectedIds: o,
476
479
  memberedGroups: e.memberedGroups,
@@ -497,7 +500,7 @@ function qe(e, ve) {
497
500
  n(u);
498
501
  };
499
502
  return /* @__PURE__ */ t(
500
- Pe,
503
+ Re,
501
504
  {
502
505
  value: i || 0,
503
506
  ontologyId: e.ontologyId,
@@ -515,64 +518,59 @@ function qe(e, ve) {
515
518
  }
516
519
  }
517
520
  ) }),
518
- /* @__PURE__ */ c(l, { display: "flex", justifyContent: "space-between", mt: 3, children: [
519
- /* @__PURE__ */ t(
520
- I,
521
- {
522
- color: "primary",
523
- variant: "text",
524
- disabled: e.loading,
525
- sx: { textTransform: "none" },
526
- onClick: Ie,
527
- children: "Cancel"
528
- }
529
- ),
530
- /* @__PURE__ */ c(l, { children: [
531
- e.onRemove !== void 0 && /* @__PURE__ */ t(
532
- I,
533
- {
534
- type: "button",
535
- color: "error",
536
- variant: "contained",
537
- disabled: e.removeLoading || e.loading,
538
- sx: { mr: 2, textTransform: "none" },
539
- onClick: e.onRemove,
540
- children: e.removeLoading ? "Deleting..." : "Delete"
541
- }
542
- ),
543
- e.saveButtons ? e.saveButtons.map((i, n) => /* @__PURE__ */ t(
544
- I,
545
- {
546
- type: "submit",
547
- color: "primary",
548
- variant: "contained",
549
- disabled: e.loading,
550
- startIcon: i.icon,
551
- sx: { ml: 1, textTransform: "none" },
552
- onClick: i.onClick,
553
- children: i.label
554
- },
555
- n
556
- )) : /* @__PURE__ */ t(
557
- I,
558
- {
559
- type: "submit",
560
- color: "primary",
561
- variant: "contained",
562
- disabled: e.loading,
563
- sx: { textTransform: "none" },
564
- children: e.loading ? "Saving..." : "Save"
565
- }
566
- )
567
- ] })
568
- ] })
521
+ /* @__PURE__ */ c(
522
+ l,
523
+ {
524
+ display: "flex",
525
+ justifyContent: "space-between",
526
+ mt: 3,
527
+ width: "100%",
528
+ children: [
529
+ e.onCancel && /* @__PURE__ */ t(
530
+ O,
531
+ {
532
+ color: "primary",
533
+ variant: "text",
534
+ disabled: e.loading,
535
+ sx: { textTransform: "none" },
536
+ onClick: Ie,
537
+ children: "Cancel"
538
+ }
539
+ ),
540
+ /* @__PURE__ */ t(l, { sx: { flex: e.onCancel ? "none" : 1 }, children: e.customSaveButtons ? e.customSaveButtons : e.saveButtons ? e.saveButtons.map((i, n) => /* @__PURE__ */ t(
541
+ O,
542
+ {
543
+ type: "submit",
544
+ color: "primary",
545
+ variant: "contained",
546
+ disabled: e.loading,
547
+ startIcon: i.icon,
548
+ sx: { ml: 1, textTransform: "none" },
549
+ onClick: i.onClick,
550
+ children: i.label
551
+ },
552
+ n
553
+ )) : /* @__PURE__ */ t(
554
+ O,
555
+ {
556
+ type: "submit",
557
+ color: "primary",
558
+ variant: "contained",
559
+ disabled: e.loading,
560
+ sx: { textTransform: "none" },
561
+ children: e.loading ? "Saving..." : "Save"
562
+ }
563
+ ) })
564
+ ]
565
+ }
566
+ )
569
567
  ]
570
568
  }
571
569
  )
572
570
  }
573
571
  );
574
572
  }
575
- const nt = v.forwardRef(qe);
573
+ const nt = p.forwardRef(qe);
576
574
  export {
577
575
  nt as InstanceForm
578
576
  };
@@ -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-KcxlW4QD.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,72 +1,72 @@
1
- import { jsx as n, jsxs as h, 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 W, Typography as s, FormControl as X, FormLabel as Z, FormGroup as z, FormControlLabel as y, Checkbox as P, Button as Y, Chip as p, Dialog as O, 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";
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
7
  import te from "./hooks/useToggle.js";
8
8
  import { ConditionalWrapper as o } from "./components/conditional-wrapper/index.js";
9
- import { DateTimePicker as ce } from "./components/date-time-picker/index.js";
10
- import { GeometryPicker as ie } from "./components/geometry-picker/index.js";
11
- import { PhoneInput as re } from "./components/phone-input/index.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
12
  import S from "./components/instance-form/components/TopLabelWrapper.js";
13
- import { B as m } from "./Box-SSMZuKnS.js";
14
- import { T as G } from "./TextField-CdKnj6de.js";
15
- import { F as me } from "./FormControlLabel-BNT5EI0b.js";
16
- import { C as he } from "./Checkbox-B0P8LhCl.js";
17
- import { F as ue, 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";
13
+ import { B as h } from "./Box-SSMZuKnS.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
- property: u,
22
+ property: r,
23
23
  mapboxAccessToken: e,
24
24
  value: l,
25
25
  variant: w = "outlined",
26
- labelPosition: t = "default",
26
+ labelPosition: c = "default",
27
27
  size: I = "medium",
28
28
  onChange: T
29
29
  }) {
30
30
  var b, k, A;
31
- const a = te(!1), [f, v] = E(), [V, q] = E(!1), F = 10, B = (c) => {
32
- v(x.get(c, u.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
- }, $ = (c) => () => {
35
+ }, j = (t) => () => {
36
36
  if (l) {
37
37
  const i = [...l];
38
- i.splice(c, 1), T(i);
38
+ i.splice(t, 1), T(i);
39
39
  }
40
- }, M = (c) => {
41
- const { value: i, checked: C } = c.target;
42
- let g = x.isArray(l) ? l : [];
43
- C ? g.push(i) : g = g.filter((d) => d !== i), T(g);
40
+ }, q = (t) => {
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
- if (((k = (b = u.dataTypeInfo) == null ? void 0 : b.innerType) == null ? void 0 : k.type) === "enum") {
46
- const { enumValues: c } = u.dataTypeInfo.innerType;
45
+ if (((k = (b = r.dataTypeInfo) == null ? void 0 : b.innerType) == null ? void 0 : k.type) === "enum") {
46
+ const { enumValues: t } = r.dataTypeInfo.innerType;
47
47
  return /* @__PURE__ */ n(
48
48
  o,
49
49
  {
50
- condition: t === "left",
51
- wrapper: (i) => /* @__PURE__ */ h(W, { display: "flex", alignItems: "center", children: [
52
- /* @__PURE__ */ n(s, { width: "32%", children: u.name }),
50
+ condition: c === "left",
51
+ wrapper: (i) => /* @__PURE__ */ u(W, { display: "flex", alignItems: "center", children: [
52
+ /* @__PURE__ */ n(s, { width: "32%", children: r.name }),
53
53
  /* @__PURE__ */ n(W, { width: "68%", children: i })
54
54
  ] }),
55
- children: /* @__PURE__ */ h(_, { children: [
56
- /* @__PURE__ */ h(X, { fullWidth: !0, component: "fieldset", variant: w, children: [
57
- t === "default" && /* @__PURE__ */ n(Z, { component: "legend", sx: { mb: 1 }, children: u.name }),
58
- /* @__PURE__ */ n(z, { children: c && c.length > 0 ? c.slice(0, V ? 9999 : F).map((i, C) => /* @__PURE__ */ n(
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
59
  y,
60
60
  {
61
61
  label: i,
62
62
  control: /* @__PURE__ */ n(
63
- P,
63
+ O,
64
64
  {
65
- name: u.propertyId,
65
+ name: r.propertyId,
66
66
  value: i,
67
67
  size: "small",
68
- checked: x.isArray(l) ? l.includes(i) : !1,
69
- onChange: M
68
+ checked: C.isArray(l) ? l.includes(i) : !1,
69
+ onChange: q
70
70
  }
71
71
  ),
72
72
  componentsProps: {
@@ -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(c) && c.length > F && /* @__PURE__ */ h(
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: () => q((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__ */ h(_, { children: [
98
+ return /* @__PURE__ */ u(E, { children: [
99
99
  /* @__PURE__ */ n(
100
100
  o,
101
101
  {
102
- condition: t === "left",
103
- wrapper: (c) => /* @__PURE__ */ h(W, { display: "flex", alignItems: "center", children: [
104
- /* @__PURE__ */ n(s, { width: "32%", children: u.name }),
105
- /* @__PURE__ */ n(W, { width: "68%", children: c })
102
+ condition: c === "left",
103
+ wrapper: (t) => /* @__PURE__ */ u(W, { display: "flex", alignItems: "center", children: [
104
+ /* @__PURE__ */ n(s, { width: "32%", children: r.name }),
105
+ /* @__PURE__ */ n(W, { width: "68%", children: t })
106
106
  ] }),
107
- children: /* @__PURE__ */ h(fe, { variant: w, children: [
108
- t === "default" && /* @__PURE__ */ n(s, { children: u.name }),
109
- /* @__PURE__ */ n(ge, { children: x.isArray(l) && l.map((c, i) => {
110
- var C, g;
107
+ children: /* @__PURE__ */ u(ge, { variant: w, children: [
108
+ c === "default" && /* @__PURE__ */ n(s, { children: r.name }),
109
+ /* @__PURE__ */ n(we, { children: C.isArray(l) && l.map((t, i) => {
110
+ var x, g;
111
111
  return /* @__PURE__ */ n(
112
112
  p,
113
113
  {
114
- label: ((g = (C = u.dataTypeInfo) == null ? void 0 : C.innerType) == null ? void 0 : g.type) === "date" ? H(c).format("DD/MM/YYYY HH:mm:ss") : c,
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"
@@ -130,31 +130,31 @@ function Ce({
130
130
  ] })
131
131
  }
132
132
  ),
133
- /* @__PURE__ */ h(
134
- O,
133
+ /* @__PURE__ */ u(
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 = u.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: {
147
- ...u,
147
+ ...r,
148
148
  name: "Value",
149
- type: u.dataTypeInfo.innerType.type
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__ */ h(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,38 +162,37 @@ 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({
173
- mapboxAccessToken: u,
172
+ function Ve({
173
+ mapboxAccessToken: r,
174
174
  property: e,
175
175
  value: l,
176
176
  variant: w = "standard",
177
- labelPosition: t = "default",
177
+ labelPosition: c = "default",
178
178
  size: I = "medium",
179
179
  defaultExtent: T,
180
180
  fieldOptions: a,
181
- // keyAuth,
182
181
  onChange: f
183
182
  }) {
184
- var M, b, k, A, c, 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: r, 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
- [r]: 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
- }, q = (d) => {
195
+ }, B = (d) => {
197
196
  f({
198
197
  [e.propertyId]: d
199
198
  });
@@ -201,17 +200,17 @@ function xe({
201
200
  f({
202
201
  [e.propertyId]: d.target.value
203
202
  });
204
- }, B = (d) => (r) => {
203
+ }, N = (d) => (m) => {
205
204
  f({
206
- [d]: r
205
+ [d]: m
207
206
  });
208
- }, N = (d) => (r) => {
207
+ }, $ = (d) => (m) => {
209
208
  f({
210
- [d]: r
209
+ [d]: m
211
210
  });
212
- }, $ = (d) => (r) => {
211
+ }, j = (d) => (m) => {
213
212
  f({
214
- [d]: r
213
+ [d]: m
215
214
  });
216
215
  };
217
216
  if (a && a[e.propertyId] && a[e.propertyId].component)
@@ -228,23 +227,24 @@ function xe({
228
227
  return /* @__PURE__ */ n(
229
228
  o,
230
229
  {
231
- condition: t === "left",
232
- wrapper: (d) => /* @__PURE__ */ h(m, { display: "flex", alignItems: "center", children: [
230
+ condition: c === "left",
231
+ wrapper: (d) => /* @__PURE__ */ u(h, { display: "flex", alignItems: "center", children: [
233
232
  /* @__PURE__ */ n(s, { width: "32%", children: e.name }),
234
- /* @__PURE__ */ n(m, { width: "68%", children: d })
233
+ /* @__PURE__ */ n(h, { width: "68%", children: d })
235
234
  ] }),
236
235
  children: /* @__PURE__ */ n(
237
236
  o,
238
237
  {
239
- condition: t === "top",
238
+ condition: c === "top",
240
239
  wrapper: S(
241
- e.name,
242
- (M = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : M.description
240
+ e == null ? void 0 : e.name,
241
+ e == null ? void 0 : e.required,
242
+ (q = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : q.description
243
243
  ),
244
244
  children: /* @__PURE__ */ n(
245
- G,
245
+ H,
246
246
  {
247
- label: t === "default" ? e.name : void 0,
247
+ label: c === "default" ? e.name : void 0,
248
248
  placeholder: ((b = a == null ? void 0 : a[e.propertyId]) == null ? void 0 : b.placeholder) ?? "",
249
249
  name: e.propertyId,
250
250
  required: e.required,
@@ -256,13 +256,16 @@ function xe({
256
256
  multiline: e.type === "text",
257
257
  disabled: !e.editable,
258
258
  fullWidth: !0,
259
+ inputProps: {
260
+ maxLength: ((k = a == null ? void 0 : a[e.propertyId]) == null ? void 0 : k.maxChar) ?? 1e5
261
+ },
259
262
  InputProps: {
260
263
  size: I,
261
264
  ...a && a[e.propertyId] && {
262
265
  tabIndex: a[e.propertyId].order
263
266
  },
264
267
  ...e.privacyPreservationMethod === "ENCRYPTION" ? {
265
- 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, {}) }) })
266
269
  } : {}
267
270
  }
268
271
  }
@@ -272,32 +275,33 @@ function xe({
272
275
  }
273
276
  );
274
277
  if (e.type === "date") {
275
- const d = l !== void 0 ? H(l).format() : l;
278
+ const d = l !== void 0 ? K(l).format() : l;
276
279
  return /* @__PURE__ */ n(
277
280
  o,
278
281
  {
279
- condition: t === "left",
280
- wrapper: (r) => /* @__PURE__ */ h(m, { display: "flex", alignItems: "center", children: [
282
+ condition: c === "left",
283
+ wrapper: (m) => /* @__PURE__ */ u(h, { display: "flex", alignItems: "center", children: [
281
284
  /* @__PURE__ */ n(s, { width: "32%", children: e.name }),
282
- /* @__PURE__ */ n(m, { width: "68%", children: r })
285
+ /* @__PURE__ */ n(h, { width: "68%", children: m })
283
286
  ] }),
284
287
  children: /* @__PURE__ */ n(
285
288
  o,
286
289
  {
287
- condition: t === "top",
290
+ condition: c === "top",
288
291
  wrapper: S(
289
292
  e.name,
290
- (k = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : k.description
293
+ e == null ? void 0 : e.required,
294
+ (A = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : A.description
291
295
  ),
292
296
  children: /* @__PURE__ */ n(
293
- ce,
297
+ ie,
294
298
  {
295
- label: t === "default" ? e.name : void 0,
299
+ label: c === "default" ? e.name : void 0,
296
300
  value: d,
297
301
  variant: w,
298
302
  size: I,
299
303
  name: e.propertyId,
300
- onChange: q,
304
+ onChange: B,
301
305
  ...a && a[e.propertyId] && {
302
306
  minDate: a[e.propertyId].minDate
303
307
  }
@@ -310,26 +314,27 @@ function xe({
310
314
  }
311
315
  if (e.type === "list") {
312
316
  let d = "";
313
- 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(
314
318
  o,
315
319
  {
316
- condition: t === "left",
317
- wrapper: (r) => /* @__PURE__ */ h(m, { display: "flex", alignItems: "center", children: [
320
+ condition: c === "left",
321
+ wrapper: (m) => /* @__PURE__ */ u(h, { display: "flex", alignItems: "center", children: [
318
322
  /* @__PURE__ */ n(s, { width: "32%", children: e.name }),
319
- /* @__PURE__ */ n(m, { width: "68%", children: r })
323
+ /* @__PURE__ */ n(h, { width: "68%", children: m })
320
324
  ] }),
321
325
  children: /* @__PURE__ */ n(
322
326
  o,
323
327
  {
324
- condition: t === "top",
328
+ condition: c === "top",
325
329
  wrapper: S(
326
330
  e.name,
327
- (A = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : A.description
331
+ e == null ? void 0 : e.required,
332
+ (t = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : t.description
328
333
  ),
329
334
  children: /* @__PURE__ */ n(
330
- G,
335
+ H,
331
336
  {
332
- label: t === "default" ? e.name : void 0,
337
+ label: c === "default" ? e.name : void 0,
333
338
  name: e.propertyId,
334
339
  value: d,
335
340
  onChange: v,
@@ -356,16 +361,16 @@ function xe({
356
361
  return /* @__PURE__ */ n(
357
362
  o,
358
363
  {
359
- condition: t === "left",
360
- wrapper: (d) => /* @__PURE__ */ h(m, { display: "flex", alignItems: "center", children: [
364
+ condition: c === "left",
365
+ wrapper: (d) => /* @__PURE__ */ u(h, { display: "flex", alignItems: "center", children: [
361
366
  /* @__PURE__ */ n(s, { width: "32%", children: e.name }),
362
- /* @__PURE__ */ n(m, { width: "68%", children: d })
367
+ /* @__PURE__ */ n(h, { width: "68%", children: d })
363
368
  ] }),
364
369
  children: /* @__PURE__ */ n(
365
- me,
370
+ ue,
366
371
  {
367
372
  control: /* @__PURE__ */ n(
368
- he,
373
+ re,
369
374
  {
370
375
  name: e.propertyId,
371
376
  checked: !!(l ?? e.defaultValue ?? !1),
@@ -373,42 +378,43 @@ function xe({
373
378
  size: I
374
379
  }
375
380
  ),
376
- label: t === "default" ? e.name : void 0
381
+ label: c === "default" ? e.name : void 0
377
382
  }
378
383
  )
379
384
  }
380
385
  );
381
386
  if (e.type === "enum") {
382
387
  let d = [];
383
- return (c = e.dataTypeInfo) != null && c.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(
384
389
  o,
385
390
  {
386
- condition: t === "left",
387
- wrapper: (r) => /* @__PURE__ */ h(m, { display: "flex", alignItems: "center", children: [
391
+ condition: c === "left",
392
+ wrapper: (m) => /* @__PURE__ */ u(h, { display: "flex", alignItems: "center", children: [
388
393
  /* @__PURE__ */ n(s, { width: "32%", children: e.name }),
389
- /* @__PURE__ */ n(m, { width: "68%", children: r })
394
+ /* @__PURE__ */ n(h, { width: "68%", children: m })
390
395
  ] }),
391
396
  children: /* @__PURE__ */ n(
392
397
  o,
393
398
  {
394
- condition: t === "top",
399
+ condition: c === "top",
395
400
  wrapper: S(
396
401
  e.name,
397
- (g = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : g.description
402
+ e == null ? void 0 : e.required,
403
+ (M = a == null ? void 0 : a[e == null ? void 0 : e.propertyId]) == null ? void 0 : M.description
398
404
  ),
399
- children: /* @__PURE__ */ h(
400
- ue,
405
+ children: /* @__PURE__ */ u(
406
+ oe,
401
407
  {
402
408
  fullWidth: !0,
403
409
  variant: w,
404
410
  size: I,
405
411
  required: e.required,
406
412
  children: [
407
- t === "default" && /* @__PURE__ */ n(oe, { id: `${e.propertyId}-label`, children: e.name }),
413
+ c === "default" && /* @__PURE__ */ n(se, { id: `${e.propertyId}-label`, children: e.name }),
408
414
  /* @__PURE__ */ n(
409
- se,
415
+ Ie,
410
416
  {
411
- label: t === "default" ? e.name : void 0,
417
+ label: c === "default" ? e.name : void 0,
412
418
  name: e.name,
413
419
  labelId: `${e.propertyId}-label`,
414
420
  id: e.propertyId,
@@ -419,7 +425,7 @@ function xe({
419
425
  tabIndex: a[e.propertyId].order
420
426
  }
421
427
  },
422
- children: d.map((r, D) => /* @__PURE__ */ n(Ie, { value: r, children: r }, D))
428
+ children: d.map((m, L) => /* @__PURE__ */ n(fe, { value: m, children: m }, L))
423
429
  }
424
430
  )
425
431
  ]
@@ -433,55 +439,55 @@ function xe({
433
439
  return e.type === "geometry" ? /* @__PURE__ */ n(
434
440
  o,
435
441
  {
436
- condition: t === "left",
437
- wrapper: (d) => /* @__PURE__ */ h(m, { display: "flex", alignItems: "center", children: [
442
+ condition: c === "left",
443
+ wrapper: (d) => /* @__PURE__ */ u(h, { display: "flex", alignItems: "center", children: [
438
444
  /* @__PURE__ */ n(s, { width: "32%", children: e.name }),
439
- /* @__PURE__ */ n(m, { width: "68%", children: d })
445
+ /* @__PURE__ */ n(h, { width: "68%", children: d })
440
446
  ] }),
441
- children: /* @__PURE__ */ n(m, { sx: { width: "100%" }, children: /* @__PURE__ */ n(
442
- ie,
447
+ children: /* @__PURE__ */ n(h, { sx: { width: "100%" }, children: /* @__PURE__ */ n(
448
+ me,
443
449
  {
444
- mapboxAccessToken: u,
445
- label: t === "default" ? e.name : void 0,
450
+ mapboxAccessToken: r,
451
+ label: c === "default" ? e.name : void 0,
446
452
  value: l ?? e.defaultValue ?? "",
447
453
  defaultExtent: T,
448
454
  variant: w,
449
- onChange: B(e.propertyId)
455
+ onChange: N(e.propertyId)
450
456
  }
451
457
  ) })
452
458
  }
453
459
  ) : e.type === "phone-number" ? /* @__PURE__ */ n(
454
460
  o,
455
461
  {
456
- condition: t === "left",
457
- wrapper: (d) => /* @__PURE__ */ h(m, { display: "flex", alignItems: "center", children: [
462
+ condition: c === "left",
463
+ wrapper: (d) => /* @__PURE__ */ u(h, { display: "flex", alignItems: "center", children: [
458
464
  /* @__PURE__ */ n(s, { width: "32%", children: e.name }),
459
- /* @__PURE__ */ n(m, { width: "68%", children: d })
465
+ /* @__PURE__ */ n(h, { width: "68%", children: d })
460
466
  ] }),
461
- children: /* @__PURE__ */ n(m, { sx: { width: "100%" }, children: /* @__PURE__ */ n(
462
- re,
467
+ children: /* @__PURE__ */ n(h, { sx: { width: "100%" }, children: /* @__PURE__ */ n(
468
+ he,
463
469
  {
464
- label: t === "default" ? e.name : void 0,
470
+ label: c === "default" ? e.name : void 0,
465
471
  placeholder: "Enter phone number",
466
472
  value: l ?? e.defaultValue ?? "",
467
- onChange: N(e.propertyId)
473
+ onChange: $(e.propertyId)
468
474
  }
469
475
  ) })
470
476
  }
471
- ) : e.type === "composite-list" ? /* @__PURE__ */ n(m, { sx: { width: "100%" }, children: /* @__PURE__ */ n(
477
+ ) : e.type === "composite-list" ? /* @__PURE__ */ n(h, { sx: { width: "100%" }, children: /* @__PURE__ */ n(
472
478
  Ce,
473
479
  {
474
480
  property: e,
475
481
  value: l ?? e.defaultValue ?? "",
476
482
  variant: w,
477
- labelPosition: t,
483
+ labelPosition: c,
478
484
  size: I,
479
- mapboxAccessToken: u,
480
- onChange: $(e.propertyId)
485
+ mapboxAccessToken: r,
486
+ onChange: j(e.propertyId)
481
487
  }
482
- ) }) : /* @__PURE__ */ n(_, {});
488
+ ) }) : /* @__PURE__ */ n(E, {});
483
489
  }
484
490
  export {
485
491
  Ce as C,
486
- xe as V
492
+ Ve as V
487
493
  };
package/dist/main.d.ts CHANGED
@@ -340,6 +340,10 @@ K extends
340
340
  *
341
341
  */
342
342
  loading: boolean;
343
+ /**
344
+ *
345
+ */
346
+ customSaveButtons?: React.ReactNode;
343
347
  /**
344
348
  *
345
349
  */
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.50",
4
+ "version": "1.5.52",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",