@hybridcore/ui 1.5.34 → 1.5.36

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,183 +1,188 @@
1
- import { jsx as t, jsxs as d, Fragment as ue } from "react/jsx-runtime";
2
- import h from "react";
3
- import he from "lodash";
4
- import { useForm as be, Controller as f } from "react-hook-form";
5
- import { getNestedChildrenFromMap as ve } from "../../utils/ontology.js";
6
- import { i as ye, d as ge } from "../../utils-Bq0ye5vf.js";
1
+ import { jsx as i, jsxs as d, Fragment as he } from "react/jsx-runtime";
2
+ import h, { useRef as be } from "react";
3
+ import ve from "lodash";
4
+ import { useForm as ye, Controller as f } from "react-hook-form";
5
+ import { getNestedChildrenFromMap as ge } from "../../utils/ontology.js";
6
+ import { i as Te, d as xe } from "../../utils-Bq0ye5vf.js";
7
7
  import { ConditionalWrapper as u } from "../conditional-wrapper/index.js";
8
- import { Container as Te } from "../container/index.js";
9
- import { Box as n, Typography as b, TextField as g, FormGroup as xe, FormControlLabel as ee, Checkbox as te, Button as I } from "@mui/material";
10
- import { TreeSelect as Ie } from "../tree-select/index.js";
11
- import we from "./components/policy-list/index.js";
12
- import Pe from "./components/variables/index.js";
13
- import { DisseminationList as Ce } from "../data-security-selectors/dissemination-list/index.js";
14
- import { SecurityLevel as Le } from "../data-security-selectors/security-level/index.js";
15
- const Oe = {
8
+ import { Container as Ie } from "../container/index.js";
9
+ import { Box as n, Typography as b, TextField as g, FormGroup as we, FormControlLabel as te, Checkbox as ie, Button as I } from "@mui/material";
10
+ import { TreeSelect as Pe } from "../tree-select/index.js";
11
+ import Ce from "./components/policy-list/index.js";
12
+ import Le from "./components/variables/index.js";
13
+ import { DisseminationList as Oe } from "../data-security-selectors/dissemination-list/index.js";
14
+ import { SecurityLevel as pe } from "../data-security-selectors/security-level/index.js";
15
+ const Ve = {
16
16
  alg: "A256GCM",
17
17
  ext: !0,
18
18
  k: "_El6rHQxC5E7NdO5DiMDITjF7f65wrlaJmFVagVE9Ic",
19
19
  key_ops: ["encrypt", "decrypt"],
20
20
  kty: "oct"
21
21
  };
22
- function pe(e, ie) {
23
- var O, p, V, S, F, k, E, R, B, D, _, A, W, N, K, M, U, j, q, G, H, J, $, Q, Y, z, X;
24
- const {
25
- register: P,
26
- handleSubmit: le,
22
+ function Se(e, le) {
23
+ var p, V, S, F, k, R, E, B, D, _, A, W, q, N, K, M, U, j, G, H, J, $, Q, Y, z, X, Z;
24
+ const P = be(null), {
25
+ register: C,
26
+ handleSubmit: ne,
27
27
  control: s,
28
- formState: { errors: ne, isDirty: ae },
29
- getValues: C,
28
+ formState: { errors: ae, isDirty: de },
29
+ getValues: L,
30
30
  setValue: T,
31
- reset: de
32
- } = be({
31
+ reset: re
32
+ } = ye({
33
33
  defaultValues: e.defaultValues
34
- }), [re, oe] = h.useState([]), [x, L] = h.useState(), [Ve, ce] = h.useState(0), se = h.useMemo(() => {
35
- const i = [];
34
+ }), [oe, ce] = h.useState([]), [x, O] = h.useState(), [Fe, se] = h.useState(0), me = h.useMemo(() => {
35
+ const t = [];
36
36
  return e.mappedTemplates.forEach((l) => {
37
- l.creatable || i.push(String(l.id));
38
- }), i;
37
+ l.creatable || t.push(String(l.id));
38
+ }), t;
39
39
  }, [e.mappedTemplates]);
40
40
  h.useEffect(() => {
41
41
  (async () => {
42
- const i = { ...e.defaultValues }, l = e.mappedTemplates.get(i.templateId);
42
+ const t = { ...e.defaultValues }, l = e.mappedTemplates.get(t.templateId);
43
43
  if (l) {
44
44
  const a = l.properties.filter(
45
45
  (o) => o.privacyPreservationMethod === "ENCRYPTION"
46
46
  );
47
47
  if (a.length > 0)
48
48
  for (let o = 0; o < a.length; o++) {
49
- const r = a[o], c = he.get(i, `variables.${r.propertyId}`);
49
+ const r = a[o], c = ve.get(t, `variables.${r.propertyId}`);
50
50
  if (c && e.keyAuth) {
51
- const m = await ye(Oe), v = await ge(m, String(c));
52
- v.data && (T(`variables.${r.propertyId}`, v.data), ce((y) => y + 1));
51
+ const m = await Te(Ve), v = await xe(m, String(c));
52
+ v.data && (T(`variables.${r.propertyId}`, v.data), se((y) => y + 1));
53
53
  }
54
54
  }
55
55
  }
56
56
  })();
57
57
  }, [e.defaultValues, e.mappedTemplates, e.keyAuth]);
58
58
  const w = () => {
59
- const i = C("templateId");
60
- x && L(void 0);
61
- const l = ve(e.mappedTemplates);
62
- oe(l);
59
+ const t = L("templateId");
60
+ x && O(void 0);
61
+ const l = ge(e.mappedTemplates);
62
+ ce(l);
63
63
  for (const a of e.mappedTemplates.values())
64
- if (a.id === i) {
65
- L(a);
64
+ if (a.id === t) {
65
+ O(a);
66
66
  break;
67
67
  }
68
68
  };
69
- h.useImperativeHandle(ie, () => ({
69
+ h.useImperativeHandle(le, () => ({
70
+ requestSubmit() {
71
+ var t;
72
+ (t = P.current) == null || t.requestSubmit();
73
+ },
70
74
  resetForm() {
71
- de({
75
+ re({
72
76
  title: "",
73
77
  description: "",
74
78
  templateId: 0,
75
79
  variables: {}
76
80
  }), w();
77
81
  },
78
- setFormValue(i, l) {
79
- T(i, l);
82
+ setFormValue(t, l) {
83
+ T(t, l);
80
84
  },
81
- getFormValue(i) {
82
- return C(i);
85
+ getFormValue(t) {
86
+ return L(t);
83
87
  }
84
88
  })), h.useEffect(() => (w(), () => {
85
89
  }), [e.mappedTemplates]), h.useEffect(() => {
86
90
  e.onSelectedTemplateChange && e.onSelectedTemplateChange(x);
87
91
  }, [x]);
88
- const me = () => {
92
+ const fe = () => {
89
93
  if (e.onCancel) {
90
- e.onCancel(ae);
94
+ e.onCancel(de);
91
95
  return;
92
96
  }
93
97
  };
94
- return /* @__PURE__ */ t(
98
+ return /* @__PURE__ */ i(
95
99
  u,
96
100
  {
97
101
  condition: e.variant === void 0 || e.variant === "inline",
98
- wrapper: (i) => /* @__PURE__ */ t(
99
- Te,
102
+ wrapper: (t) => /* @__PURE__ */ i(
103
+ Ie,
100
104
  {
101
105
  disableHeader: !0,
102
106
  sx: { position: "relative", overflow: "visible" },
103
- children: i
107
+ children: t
104
108
  }
105
109
  ),
106
110
  children: /* @__PURE__ */ d(
107
111
  "form",
108
112
  {
109
- onSubmit: le(e.onSubmit),
113
+ ref: P,
114
+ onSubmit: ne(e.onSubmit),
110
115
  style: { display: "flex", flexDirection: "column" },
111
116
  children: [
112
- !((p = (O = e.fieldOptions) == null ? void 0 : O.title) != null && p.hidden) && /* @__PURE__ */ t(
117
+ !((V = (p = e.fieldOptions) == null ? void 0 : p.title) != null && V.hidden) && /* @__PURE__ */ i(
113
118
  u,
114
119
  {
115
120
  condition: e.labelPosition === "left",
116
- wrapper: (i) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
117
- /* @__PURE__ */ t(b, { width: "32%", children: "Title *" }),
118
- /* @__PURE__ */ t(n, { width: "68%", children: i })
121
+ wrapper: (t) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
122
+ /* @__PURE__ */ i(b, { width: "32%", children: "Title *" }),
123
+ /* @__PURE__ */ i(n, { width: "68%", children: t })
119
124
  ] }),
120
125
  children: /* @__PURE__ */ d(n, { mb: 2, children: [
121
- /* @__PURE__ */ t(
126
+ /* @__PURE__ */ i(
122
127
  g,
123
128
  {
124
129
  label: e.labelPosition === "default" ? "Title *" : void 0,
125
130
  variant: e.inputVariant,
126
131
  fullWidth: !0,
127
- ...P("title", { required: !0 }),
128
- ...ne.title && {
132
+ ...C("title", { required: !0 }),
133
+ ...ae.title && {
129
134
  helperText: "This field is required!",
130
135
  error: !0
131
136
  }
132
137
  }
133
138
  ),
134
- e.fieldOptions && ((V = e.fieldOptions.title) == null ? void 0 : V.helperText)
139
+ e.fieldOptions && ((S = e.fieldOptions.title) == null ? void 0 : S.helperText)
135
140
  ] })
136
141
  }
137
142
  ),
138
- !((F = (S = e.fieldOptions) == null ? void 0 : S.description) != null && F.hidden) && /* @__PURE__ */ t(
143
+ !((k = (F = e.fieldOptions) == null ? void 0 : F.description) != null && k.hidden) && /* @__PURE__ */ i(
139
144
  u,
140
145
  {
141
146
  condition: e.labelPosition === "left",
142
- wrapper: (i) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
143
- /* @__PURE__ */ t(b, { width: "32%", children: "Description" }),
144
- /* @__PURE__ */ t(n, { width: "68%", children: i })
147
+ wrapper: (t) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
148
+ /* @__PURE__ */ i(b, { width: "32%", children: "Description" }),
149
+ /* @__PURE__ */ i(n, { width: "68%", children: t })
145
150
  ] }),
146
151
  children: /* @__PURE__ */ d(n, { mb: 2, children: [
147
- /* @__PURE__ */ t(
152
+ /* @__PURE__ */ i(
148
153
  g,
149
154
  {
150
155
  label: e.labelPosition === "default" ? "Description" : void 0,
151
156
  variant: e.inputVariant,
152
157
  fullWidth: !0,
153
158
  multiline: !0,
154
- minRows: (E = (k = e.fieldOptions) == null ? void 0 : k.description) == null ? void 0 : E.minRows,
155
- ...P("description")
159
+ minRows: (E = (R = e.fieldOptions) == null ? void 0 : R.description) == null ? void 0 : E.minRows,
160
+ ...C("description")
156
161
  }
157
162
  ),
158
- e.fieldOptions && ((R = e.fieldOptions.description) == null ? void 0 : R.helperText)
163
+ e.fieldOptions && ((B = e.fieldOptions.description) == null ? void 0 : B.helperText)
159
164
  ] })
160
165
  }
161
166
  ),
162
- !((D = (B = e.fieldOptions) == null ? void 0 : B.templateId) != null && D.hidden) && /* @__PURE__ */ t(
167
+ !((_ = (D = e.fieldOptions) == null ? void 0 : D.templateId) != null && _.hidden) && /* @__PURE__ */ i(
163
168
  u,
164
169
  {
165
170
  condition: e.labelPosition === "left",
166
- wrapper: (i) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
167
- /* @__PURE__ */ t(b, { width: "32%", children: "Template" }),
168
- /* @__PURE__ */ t(n, { width: "68%", children: i })
171
+ wrapper: (t) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
172
+ /* @__PURE__ */ i(b, { width: "32%", children: "Template" }),
173
+ /* @__PURE__ */ i(n, { width: "68%", children: t })
169
174
  ] }),
170
- children: /* @__PURE__ */ d(xe, { sx: { mb: 2 }, children: [
171
- /* @__PURE__ */ t(
175
+ children: /* @__PURE__ */ d(we, { sx: { mb: 2 }, children: [
176
+ /* @__PURE__ */ i(
172
177
  f,
173
178
  {
174
179
  name: "templateId",
175
180
  control: s,
176
- render: ({ field: { value: i, onChange: l } }) => {
181
+ render: ({ field: { value: t, onChange: l } }) => {
177
182
  var a, o;
178
183
  if ((o = (a = e.fieldOptions) == null ? void 0 : a.templateId) != null && o.disabled) {
179
- const r = i ? e.mappedTemplates.get(i) : void 0;
180
- return /* @__PURE__ */ t(
184
+ const r = t ? e.mappedTemplates.get(t) : void 0;
185
+ return /* @__PURE__ */ i(
181
186
  g,
182
187
  {
183
188
  label: "Template",
@@ -189,13 +194,13 @@ function pe(e, ie) {
189
194
  }
190
195
  );
191
196
  }
192
- return /* @__PURE__ */ t(
193
- Ie,
197
+ return /* @__PURE__ */ i(
198
+ Pe,
194
199
  {
195
200
  label: e.labelPosition === "default" ? "Template" : void 0,
196
- data: re,
197
- selected: i === 0 ? "" : [String(i)],
198
- disabled: se,
201
+ data: oe,
202
+ selected: t === 0 ? "" : [String(t)],
203
+ disabled: me,
199
204
  variant: e.inputVariant,
200
205
  onChange: (r, c) => {
201
206
  const m = {
@@ -210,41 +215,41 @@ function pe(e, ie) {
210
215
  }
211
216
  }
212
217
  ),
213
- e.fieldOptions && ((_ = e.fieldOptions.templateId) == null ? void 0 : _.helperText)
218
+ e.fieldOptions && ((A = e.fieldOptions.templateId) == null ? void 0 : A.helperText)
214
219
  ] })
215
220
  }
216
221
  ),
217
- "aliasList" in e.defaultValues && !((W = (A = e.fieldOptions) == null ? void 0 : A.aliasList) != null && W.hidden) && /* @__PURE__ */ t(
222
+ "aliasList" in e.defaultValues && !((q = (W = e.fieldOptions) == null ? void 0 : W.aliasList) != null && q.hidden) && /* @__PURE__ */ i(
218
223
  f,
219
224
  {
220
225
  name: "aliasList",
221
226
  control: s,
222
- render: ({ field: { value: i, onChange: l, ...a } }) => {
227
+ render: ({ field: { value: t, onChange: l, ...a } }) => {
223
228
  var r;
224
229
  const o = (c) => {
225
230
  const y = {
226
231
  target: {
227
- value: c.target.value.split(",").map((Z) => Z.trimStart())
232
+ value: c.target.value.split(",").map((ee) => ee.trimStart())
228
233
  }
229
234
  };
230
235
  l(y);
231
236
  };
232
- return /* @__PURE__ */ t(
237
+ return /* @__PURE__ */ i(
233
238
  u,
234
239
  {
235
240
  condition: e.labelPosition === "left",
236
241
  wrapper: (c) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
237
- /* @__PURE__ */ t(b, { width: "32%", children: "Alias List" }),
238
- /* @__PURE__ */ t(n, { width: "68%", children: c })
242
+ /* @__PURE__ */ i(b, { width: "32%", children: "Alias List" }),
243
+ /* @__PURE__ */ i(n, { width: "68%", children: c })
239
244
  ] }),
240
245
  children: /* @__PURE__ */ d(n, { mb: 2, children: [
241
- /* @__PURE__ */ t(
246
+ /* @__PURE__ */ i(
242
247
  g,
243
248
  {
244
249
  label: e.labelPosition === "default" ? "Alias List" : void 0,
245
250
  variant: e.inputVariant,
246
251
  fullWidth: !0,
247
- value: i,
252
+ value: t,
248
253
  helperText: "Add list values with the comma (,) separated string",
249
254
  onChange: o,
250
255
  ...a
@@ -257,28 +262,28 @@ function pe(e, ie) {
257
262
  }
258
263
  }
259
264
  ),
260
- "appliedPolicies" in e.defaultValues && !((K = (N = e.fieldOptions) == null ? void 0 : N.appliedPolicies) != null && K.hidden) && /* @__PURE__ */ t(
265
+ "appliedPolicies" in e.defaultValues && !((K = (N = e.fieldOptions) == null ? void 0 : N.appliedPolicies) != null && K.hidden) && /* @__PURE__ */ i(
261
266
  f,
262
267
  {
263
268
  name: "appliedPolicies",
264
269
  control: s,
265
- render: ({ field: { value: i, onChange: l } }) => {
270
+ render: ({ field: { value: t, onChange: l } }) => {
266
271
  var a;
267
- return /* @__PURE__ */ t(
272
+ return /* @__PURE__ */ i(
268
273
  u,
269
274
  {
270
275
  condition: e.labelPosition === "left",
271
276
  wrapper: (o) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
272
- /* @__PURE__ */ t(b, { width: "32%", children: "Policy List" }),
273
- /* @__PURE__ */ t(n, { width: "68%", children: o })
277
+ /* @__PURE__ */ i(b, { width: "32%", children: "Policy List" }),
278
+ /* @__PURE__ */ i(n, { width: "68%", children: o })
274
279
  ] }),
275
280
  children: /* @__PURE__ */ d(n, { mb: 2, children: [
276
- /* @__PURE__ */ t(
277
- we,
281
+ /* @__PURE__ */ i(
282
+ Ce,
278
283
  {
279
284
  policyList: e.policyList,
280
285
  labelPosition: e.labelPosition,
281
- value: i || void 0,
286
+ value: t || void 0,
282
287
  onChange: l
283
288
  }
284
289
  ),
@@ -289,16 +294,16 @@ function pe(e, ie) {
289
294
  }
290
295
  }
291
296
  ),
292
- /* @__PURE__ */ t(
297
+ /* @__PURE__ */ i(
293
298
  f,
294
299
  {
295
300
  name: "variables",
296
301
  control: s,
297
- render: ({ field: { value: i, onChange: l } }) => /* @__PURE__ */ t(
298
- Pe,
302
+ render: ({ field: { value: t, onChange: l } }) => /* @__PURE__ */ i(
303
+ Le,
299
304
  {
300
305
  template: x,
301
- value: i,
306
+ value: t,
302
307
  mapboxAccessToken: e.mapboxAccessToken,
303
308
  variant: e.inputVariant,
304
309
  labelPosition: e.labelPosition,
@@ -308,35 +313,35 @@ function pe(e, ie) {
308
313
  )
309
314
  }
310
315
  ),
311
- "fileInBase64" in e.defaultValues && !((U = (M = e.fieldOptions) == null ? void 0 : M.fileInBase64) != null && U.hidden) && /* @__PURE__ */ d(ue, { children: [
312
- /* @__PURE__ */ t(
316
+ "fileInBase64" in e.defaultValues && !((U = (M = e.fieldOptions) == null ? void 0 : M.fileInBase64) != null && U.hidden) && /* @__PURE__ */ d(he, { children: [
317
+ /* @__PURE__ */ i(
313
318
  f,
314
319
  {
315
320
  name: "fileInBase64",
316
321
  control: s,
317
- render: ({ field: { onChange: i, value: l, ...a } }) => {
322
+ render: ({ field: { onChange: t, value: l, ...a } }) => {
318
323
  var r;
319
324
  const o = (c) => {
320
325
  if (c.target.files) {
321
326
  const m = new FileReader();
322
327
  m.onload = async (y) => {
323
- const fe = y.target.result.split("base64,")[1];
324
- i(fe);
328
+ const ue = y.target.result.split("base64,")[1];
329
+ t(ue);
325
330
  };
326
331
  const v = c.target.files[0];
327
332
  T("originalFileName", v.name), T("contentType", v.type), m.readAsDataURL(v);
328
333
  }
329
334
  };
330
- return /* @__PURE__ */ t(
335
+ return /* @__PURE__ */ i(
331
336
  u,
332
337
  {
333
338
  condition: e.labelPosition === "left",
334
339
  wrapper: (c) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
335
- /* @__PURE__ */ t(b, { width: "32%", children: "File to Upload" }),
336
- /* @__PURE__ */ t(n, { width: "68%", children: c })
340
+ /* @__PURE__ */ i(b, { width: "32%", children: "File to Upload" }),
341
+ /* @__PURE__ */ i(n, { width: "68%", children: c })
337
342
  ] }),
338
343
  children: /* @__PURE__ */ d(n, { mb: 2, children: [
339
- /* @__PURE__ */ t(
344
+ /* @__PURE__ */ i(
340
345
  g,
341
346
  {
342
347
  type: "file",
@@ -356,62 +361,62 @@ function pe(e, ie) {
356
361
  }
357
362
  }
358
363
  ),
359
- !((q = (j = e.fieldOptions) == null ? void 0 : j.redacted) != null && q.hidden) && /* @__PURE__ */ t(
364
+ !((G = (j = e.fieldOptions) == null ? void 0 : j.redacted) != null && G.hidden) && /* @__PURE__ */ i(
360
365
  u,
361
366
  {
362
367
  condition: e.labelPosition === "left",
363
- wrapper: (i) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
364
- /* @__PURE__ */ t(b, { width: "32%", children: "Redacted" }),
365
- /* @__PURE__ */ t(n, { width: "68%", children: i })
368
+ wrapper: (t) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
369
+ /* @__PURE__ */ i(b, { width: "32%", children: "Redacted" }),
370
+ /* @__PURE__ */ i(n, { width: "68%", children: t })
366
371
  ] }),
367
372
  children: /* @__PURE__ */ d(n, { mb: 2, children: [
368
- /* @__PURE__ */ t(
369
- ee,
373
+ /* @__PURE__ */ i(
374
+ te,
370
375
  {
371
- control: /* @__PURE__ */ t(
376
+ control: /* @__PURE__ */ i(
372
377
  f,
373
378
  {
374
379
  name: "redacted",
375
380
  control: s,
376
- render: ({ field: { value: i, ...l } }) => /* @__PURE__ */ t(te, { checked: !!i, ...l })
381
+ render: ({ field: { value: t, ...l } }) => /* @__PURE__ */ i(ie, { checked: !!t, ...l })
377
382
  }
378
383
  ),
379
384
  label: e.labelPosition === "default" ? "Redacted" : void 0
380
385
  }
381
386
  ),
382
- e.fieldOptions && ((G = e.fieldOptions.redacted) == null ? void 0 : G.helperText)
387
+ e.fieldOptions && ((H = e.fieldOptions.redacted) == null ? void 0 : H.helperText)
383
388
  ] })
384
389
  }
385
390
  ),
386
- !((J = (H = e.fieldOptions) == null ? void 0 : H.contentEncrypted) != null && J.hidden) && /* @__PURE__ */ t(
391
+ !(($ = (J = e.fieldOptions) == null ? void 0 : J.contentEncrypted) != null && $.hidden) && /* @__PURE__ */ i(
387
392
  u,
388
393
  {
389
394
  condition: e.labelPosition === "left",
390
- wrapper: (i) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
391
- /* @__PURE__ */ t(b, { width: "32%", children: "Content Encrypted" }),
392
- /* @__PURE__ */ t(n, { width: "68%", children: i })
395
+ wrapper: (t) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
396
+ /* @__PURE__ */ i(b, { width: "32%", children: "Content Encrypted" }),
397
+ /* @__PURE__ */ i(n, { width: "68%", children: t })
393
398
  ] }),
394
399
  children: /* @__PURE__ */ d(n, { mb: 2, children: [
395
- /* @__PURE__ */ t(
396
- ee,
400
+ /* @__PURE__ */ i(
401
+ te,
397
402
  {
398
- control: /* @__PURE__ */ t(
403
+ control: /* @__PURE__ */ i(
399
404
  f,
400
405
  {
401
406
  name: "contentEncrypted",
402
407
  control: s,
403
- render: ({ field: { value: i, ...l } }) => /* @__PURE__ */ t(te, { checked: !!i, ...l })
408
+ render: ({ field: { value: t, ...l } }) => /* @__PURE__ */ i(ie, { checked: !!t, ...l })
404
409
  }
405
410
  ),
406
411
  label: e.labelPosition === "default" ? "Content Encrypted" : void 0
407
412
  }
408
413
  ),
409
- e.fieldOptions && (($ = e.fieldOptions.contentEncrypted) == null ? void 0 : $.helperText)
414
+ e.fieldOptions && ((Q = e.fieldOptions.contentEncrypted) == null ? void 0 : Q.helperText)
410
415
  ] })
411
416
  }
412
417
  )
413
418
  ] }),
414
- !((Y = (Q = e.fieldOptions) == null ? void 0 : Q.disseminationList) != null && Y.hidden) && /* @__PURE__ */ t(
419
+ !((z = (Y = e.fieldOptions) == null ? void 0 : Y.disseminationList) != null && z.hidden) && /* @__PURE__ */ i(
415
420
  f,
416
421
  {
417
422
  name: "disseminationList",
@@ -419,12 +424,12 @@ function pe(e, ie) {
419
424
  required: !0
420
425
  },
421
426
  control: s,
422
- render: ({ field: { value: i, onChange: l }, fieldState: a }) => {
423
- const o = i || [], r = (c) => {
427
+ render: ({ field: { value: t, onChange: l }, fieldState: a }) => {
428
+ const o = t || [], r = (c) => {
424
429
  l(c);
425
430
  };
426
- return /* @__PURE__ */ t(
427
- Ce,
431
+ return /* @__PURE__ */ i(
432
+ Oe,
428
433
  {
429
434
  selectedIds: o,
430
435
  memberedGroups: e.memberedGroups,
@@ -437,7 +442,7 @@ function pe(e, ie) {
437
442
  }
438
443
  }
439
444
  ),
440
- !((X = (z = e.fieldOptions) == null ? void 0 : z.securityLevelId) != null && X.hidden) && /* @__PURE__ */ t(n, { mt: 2, children: /* @__PURE__ */ t(
445
+ !((Z = (X = e.fieldOptions) == null ? void 0 : X.securityLevelId) != null && Z.hidden) && /* @__PURE__ */ i(n, { mt: 2, children: /* @__PURE__ */ i(
441
446
  f,
442
447
  {
443
448
  name: "securityLevelId",
@@ -445,15 +450,15 @@ function pe(e, ie) {
445
450
  required: !0
446
451
  },
447
452
  control: s,
448
- render: ({ field: { value: i, onChange: l }, fieldState: a }) => {
453
+ render: ({ field: { value: t, onChange: l }, fieldState: a }) => {
449
454
  var r, c;
450
455
  const o = (m) => {
451
456
  l(m);
452
457
  };
453
- return /* @__PURE__ */ t(
454
- Le,
458
+ return /* @__PURE__ */ i(
459
+ pe,
455
460
  {
456
- value: i || 0,
461
+ value: t || 0,
457
462
  ontologyId: e.ontologyId,
458
463
  appRoles: e.appRoles,
459
464
  securityLevels: e.securityLevels,
@@ -470,19 +475,19 @@ function pe(e, ie) {
470
475
  }
471
476
  ) }),
472
477
  /* @__PURE__ */ d(n, { display: "flex", justifyContent: "space-between", mt: 3, children: [
473
- /* @__PURE__ */ t(
478
+ /* @__PURE__ */ i(
474
479
  I,
475
480
  {
476
481
  color: "primary",
477
482
  variant: "text",
478
483
  disabled: e.loading,
479
484
  sx: { textTransform: "none" },
480
- onClick: me,
485
+ onClick: fe,
481
486
  children: "Cancel"
482
487
  }
483
488
  ),
484
489
  /* @__PURE__ */ d(n, { children: [
485
- e.onRemove !== void 0 && /* @__PURE__ */ t(
490
+ e.onRemove !== void 0 && /* @__PURE__ */ i(
486
491
  I,
487
492
  {
488
493
  type: "button",
@@ -494,20 +499,20 @@ function pe(e, ie) {
494
499
  children: e.removeLoading ? "Deleting..." : "Delete"
495
500
  }
496
501
  ),
497
- e.saveButtons ? e.saveButtons.map((i, l) => /* @__PURE__ */ t(
502
+ e.saveButtons ? e.saveButtons.map((t, l) => /* @__PURE__ */ i(
498
503
  I,
499
504
  {
500
505
  type: "submit",
501
506
  color: "primary",
502
507
  variant: "contained",
503
508
  disabled: e.loading,
504
- startIcon: i.icon,
509
+ startIcon: t.icon,
505
510
  sx: { ml: 1, textTransform: "none" },
506
- onClick: i.onClick,
507
- children: i.label
511
+ onClick: t.onClick,
512
+ children: t.label
508
513
  },
509
514
  l
510
- )) : /* @__PURE__ */ t(
515
+ )) : /* @__PURE__ */ i(
511
516
  I,
512
517
  {
513
518
  type: "submit",
@@ -526,7 +531,7 @@ function pe(e, ie) {
526
531
  }
527
532
  );
528
533
  }
529
- const je = h.forwardRef(pe);
534
+ const Ge = h.forwardRef(Se);
530
535
  export {
531
- je as InstanceForm
536
+ Ge as InstanceForm
532
537
  };
package/dist/main.d.ts CHANGED
@@ -276,6 +276,7 @@ declare interface InstanceFormHandle {
276
276
  * @returns
277
277
  */
278
278
  resetForm: () => void;
279
+ requestSubmit: () => void;
279
280
  /**
280
281
  *
281
282
  * @param name
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.34",
4
+ "version": "1.5.36",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",