@hybridcore/ui 1.5.51 → 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,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({
@@ -2,7 +2,7 @@ import { jsx as t, 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,15 +22,15 @@ 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(() => {
@@ -57,8 +57,8 @@ 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 i = k("templateId");
62
62
  w && E(void 0);
63
63
  const n = ke(e.mappedTemplates);
64
64
  xe(n);
@@ -71,7 +71,7 @@ function qe(e, pe) {
71
71
  p.useImperativeHandle(pe, () => ({
72
72
  requestSubmit() {
73
73
  var i;
74
- (i = L.current) == null || i.requestSubmit();
74
+ (i = V.current) == null || i.requestSubmit();
75
75
  },
76
76
  resetForm() {
77
77
  ge({
@@ -79,24 +79,27 @@ function qe(e, pe) {
79
79
  description: "",
80
80
  templateId: 0,
81
81
  variables: {}
82
- }), I();
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
- })), 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
105
  }, v = (i) => {
@@ -120,7 +123,7 @@ function qe(e, pe) {
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: [
@@ -137,7 +140,7 @@ function qe(e, pe) {
137
140
  m,
138
141
  {
139
142
  condition: a === "top",
140
- wrapper: O("Title", !0),
143
+ wrapper: L("Title", !0),
141
144
  children: /* @__PURE__ */ t(
142
145
  x,
143
146
  {
@@ -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,7 +158,7 @@ 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__ */ 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
  }
@@ -173,7 +176,7 @@ function qe(e, pe) {
173
176
  m,
174
177
  {
175
178
  condition: a === "top",
176
- wrapper: O("Description", !1),
179
+ wrapper: L("Description", !1),
177
180
  children: /* @__PURE__ */ t(
178
181
  x,
179
182
  {
@@ -184,12 +187,12 @@ 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__ */ 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)
@@ -209,7 +212,7 @@ function qe(e, pe) {
209
212
  m,
210
213
  {
211
214
  condition: a === "top",
212
- wrapper: O("Template", !1),
215
+ wrapper: L("Template", !1),
213
216
  children: /* @__PURE__ */ t(
214
217
  h,
215
218
  {
@@ -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
  );
@@ -524,7 +527,7 @@ function qe(e, pe) {
524
527
  width: "100%",
525
528
  children: [
526
529
  e.onCancel && /* @__PURE__ */ t(
527
- C,
530
+ O,
528
531
  {
529
532
  color: "primary",
530
533
  variant: "text",
@@ -535,7 +538,7 @@ function qe(e, pe) {
535
538
  }
536
539
  ),
537
540
  /* @__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,
541
+ O,
539
542
  {
540
543
  type: "submit",
541
544
  color: "primary",
@@ -548,7 +551,7 @@ function qe(e, pe) {
548
551
  },
549
552
  n
550
553
  )) : /* @__PURE__ */ t(
551
- C,
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/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.52",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",