@hybridcore/ui 1.4.17 → 1.4.19

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,61 +1,61 @@
1
- import { jsx as a, jsxs as h, Fragment as $ } from "react/jsx-runtime";
1
+ import { jsx as n, jsxs as h, Fragment as Z } from "react/jsx-runtime";
2
2
  import m from "react";
3
- import Q from "lodash";
4
- import { useForm as X, Controller as s } from "react-hook-form";
5
- import { getNestedChildrenFromMap as z } from "../../utils/ontology.js";
6
- import { i as Z, d as ee } from "../../utils-Bq0ye5vf.js";
7
- import { ConditionalWrapper as te } from "../conditional-wrapper/index.js";
8
- import { Container as ae } from "../container/index.js";
9
- import { TextField as v, FormGroup as ne, FormControl as ie, InputLabel as le, Select as re, MenuItem as de, FormControlLabel as W, Checkbox as M, Box as p, Button as g } from "@mui/material";
10
- import { TreeSelect as oe } from "../tree-select/index.js";
11
- import se from "./components/policy-list/index.js";
12
- import me from "./components/variables/index.js";
13
- import { DisseminationList as ce } from "../data-security-selectors/dissemination-list/index.js";
14
- import { SecurityLevel as ue } from "../data-security-selectors/security-level/index.js";
15
- const fe = {
3
+ import ee from "lodash";
4
+ import { useForm as te, Controller as s } from "react-hook-form";
5
+ import { getNestedChildrenFromMap as ne } from "../../utils/ontology.js";
6
+ import { i as ae, d as ie } from "../../utils-Bq0ye5vf.js";
7
+ import { ConditionalWrapper as le } from "../conditional-wrapper/index.js";
8
+ import { Container as re } from "../container/index.js";
9
+ import { TextField as v, FormGroup as de, FormControl as oe, InputLabel as se, Select as me, MenuItem as ce, FormControlLabel as K, Checkbox as U, Box as p, Button as g } from "@mui/material";
10
+ import { TreeSelect as ue } from "../tree-select/index.js";
11
+ import fe from "./components/policy-list/index.js";
12
+ import he from "./components/variables/index.js";
13
+ import { DisseminationList as ve } from "../data-security-selectors/dissemination-list/index.js";
14
+ import { SecurityLevel as be } from "../data-security-selectors/security-level/index.js";
15
+ const ye = {
16
16
  alg: "A256GCM",
17
17
  ext: !0,
18
18
  k: "_El6rHQxC5E7NdO5DiMDITjF7f65wrlaJmFVagVE9Ic",
19
19
  key_ops: ["encrypt", "decrypt"],
20
20
  kty: "oct"
21
- }, he = [
21
+ }, ge = [
22
22
  "IMAGE",
23
23
  "VIDEO",
24
24
  "TEXT",
25
25
  "BINARY",
26
26
  "OTHER"
27
27
  ];
28
- function ve(e, N) {
29
- var L, V, S, E, F, k, R, O, w, B, _, A, D, P;
28
+ function Te(e, j) {
29
+ var L, V, S, E, F, k, O, R, w, B, _, A, D, P, W, M, N, G;
30
30
  const {
31
31
  register: C,
32
- handleSubmit: G,
32
+ handleSubmit: q,
33
33
  control: o,
34
- formState: { errors: K },
34
+ formState: { errors: H },
35
35
  getValues: I,
36
36
  setValue: b,
37
- reset: U
38
- } = X({
37
+ reset: Y
38
+ } = te({
39
39
  defaultValues: e.defaultValues
40
- }), [j, q] = m.useState([]), [y, x] = m.useState(), [be, H] = m.useState(0), Y = m.useMemo(() => {
40
+ }), [J, $] = m.useState([]), [y, x] = m.useState(), [pe, Q] = m.useState(0), X = m.useMemo(() => {
41
41
  const t = [];
42
- return e.mappedTemplates.forEach((n) => {
43
- n.creatable || t.push(String(n.id));
42
+ return e.mappedTemplates.forEach((a) => {
43
+ a.creatable || t.push(String(a.id));
44
44
  }), t;
45
45
  }, [e.mappedTemplates]);
46
46
  m.useEffect(() => {
47
47
  (async () => {
48
- const t = { ...e.defaultValues }, n = e.mappedTemplates.get(t.templateId);
49
- if (n) {
50
- const r = n.properties.filter(
48
+ const t = { ...e.defaultValues }, a = e.mappedTemplates.get(t.templateId);
49
+ if (a) {
50
+ const r = a.properties.filter(
51
51
  (i) => i.privacyPreservationMethod === "ENCRYPTION"
52
52
  );
53
53
  if (r.length > 0)
54
54
  for (let i = 0; i < r.length; i++) {
55
- const l = r[i], d = Q.get(t, `variables.${l.propertyId}`);
55
+ const l = r[i], d = ee.get(t, `variables.${l.propertyId}`);
56
56
  if (d && e.keyAuth) {
57
- const c = await Z(fe), u = await ee(c, d);
58
- u.data && (b(`variables.${l.propertyId}`, u.data), H((f) => f + 1));
57
+ const c = await ae(ye), u = await ie(c, d);
58
+ u.data && (b(`variables.${l.propertyId}`, u.data), Q((f) => f + 1));
59
59
  }
60
60
  }
61
61
  }
@@ -64,25 +64,25 @@ function ve(e, N) {
64
64
  const T = () => {
65
65
  const t = I("templateId");
66
66
  y && x(void 0);
67
- const n = z(e.mappedTemplates);
68
- q(n);
67
+ const a = ne(e.mappedTemplates);
68
+ $(a);
69
69
  for (const r of e.mappedTemplates.values())
70
70
  if (r.id === t) {
71
71
  x(r);
72
72
  break;
73
73
  }
74
74
  };
75
- m.useImperativeHandle(N, () => ({
75
+ m.useImperativeHandle(j, () => ({
76
76
  resetForm() {
77
- U({
77
+ Y({
78
78
  title: "",
79
79
  description: "",
80
80
  templateId: 0,
81
81
  variables: {}
82
82
  }), T();
83
83
  },
84
- setFormValue(t, n) {
85
- b(t, n);
84
+ setFormValue(t, a) {
85
+ b(t, a);
86
86
  },
87
87
  getFormValue(t) {
88
88
  return I(t);
@@ -91,18 +91,18 @@ function ve(e, N) {
91
91
  }), [e.mappedTemplates]), m.useEffect(() => {
92
92
  e.onSelectedTemplateChange && e.onSelectedTemplateChange(y);
93
93
  }, [y]);
94
- const J = () => {
94
+ const z = () => {
95
95
  if (e.onCancel) {
96
96
  e.onCancel();
97
97
  return;
98
98
  }
99
99
  };
100
- return /* @__PURE__ */ a(
101
- te,
100
+ return /* @__PURE__ */ n(
101
+ le,
102
102
  {
103
103
  condition: e.variant === void 0 || e.variant === "inline",
104
- wrapper: (t) => /* @__PURE__ */ a(
105
- ae,
104
+ wrapper: (t) => /* @__PURE__ */ n(
105
+ re,
106
106
  {
107
107
  disableHeader: !0,
108
108
  sx: { position: "relative", overflow: "visible" },
@@ -112,10 +112,10 @@ function ve(e, N) {
112
112
  children: /* @__PURE__ */ h(
113
113
  "form",
114
114
  {
115
- onSubmit: G(e.onSubmit),
115
+ onSubmit: q(e.onSubmit),
116
116
  style: { display: "flex", flexDirection: "column" },
117
117
  children: [
118
- /* @__PURE__ */ a(
118
+ !((V = (L = e.fieldOptions) == null ? void 0 : L.title) != null && V.hidden) && /* @__PURE__ */ n(
119
119
  v,
120
120
  {
121
121
  label: "Title *",
@@ -123,13 +123,13 @@ function ve(e, N) {
123
123
  fullWidth: !0,
124
124
  sx: { mb: 2 },
125
125
  ...C("title", { required: !0 }),
126
- ...K.title && {
126
+ ...H.title && {
127
127
  helperText: "This field is required!",
128
128
  error: !0
129
129
  }
130
130
  }
131
131
  ),
132
- /* @__PURE__ */ a(
132
+ !((E = (S = e.fieldOptions) == null ? void 0 : S.description) != null && E.hidden) && /* @__PURE__ */ n(
133
133
  v,
134
134
  {
135
135
  label: "Description",
@@ -137,20 +137,20 @@ function ve(e, N) {
137
137
  fullWidth: !0,
138
138
  multiline: !0,
139
139
  sx: { mb: 2 },
140
- minRows: (V = (L = e.fieldOptions) == null ? void 0 : L.description) == null ? void 0 : V.minRows,
140
+ minRows: (k = (F = e.fieldOptions) == null ? void 0 : F.description) == null ? void 0 : k.minRows,
141
141
  ...C("description")
142
142
  }
143
143
  ),
144
- !((E = (S = e.fieldOptions) == null ? void 0 : S.templateId) != null && E.hidden) && /* @__PURE__ */ a(ne, { sx: { mb: 2 }, children: /* @__PURE__ */ a(
144
+ !((R = (O = e.fieldOptions) == null ? void 0 : O.templateId) != null && R.hidden) && /* @__PURE__ */ n(de, { sx: { mb: 2 }, children: /* @__PURE__ */ n(
145
145
  s,
146
146
  {
147
147
  name: "templateId",
148
148
  control: o,
149
- render: ({ field: { value: t, onChange: n } }) => {
149
+ render: ({ field: { value: t, onChange: a } }) => {
150
150
  var r, i;
151
151
  if ((i = (r = e.fieldOptions) == null ? void 0 : r.templateId) != null && i.disabled) {
152
152
  const l = t ? e.mappedTemplates.get(t) : void 0;
153
- return /* @__PURE__ */ a(
153
+ return /* @__PURE__ */ n(
154
154
  v,
155
155
  {
156
156
  label: "Template",
@@ -162,13 +162,13 @@ function ve(e, N) {
162
162
  }
163
163
  );
164
164
  }
165
- return /* @__PURE__ */ a(
166
- oe,
165
+ return /* @__PURE__ */ n(
166
+ ue,
167
167
  {
168
168
  label: "Template",
169
- data: j,
169
+ data: J,
170
170
  selected: t === 0 ? "" : [String(t)],
171
- disabled: Y,
171
+ disabled: X,
172
172
  variant: e.inputVariant,
173
173
  onChange: (l, d) => {
174
174
  const c = {
@@ -176,28 +176,28 @@ function ve(e, N) {
176
176
  value: d ? Number(l) : 0
177
177
  }
178
178
  };
179
- n(c), T();
179
+ a(c), T();
180
180
  }
181
181
  }
182
182
  );
183
183
  }
184
184
  }
185
185
  ) }),
186
- "aliasList" in e.defaultValues && !((k = (F = e.fieldOptions) == null ? void 0 : F.aliasList) != null && k.hidden) && /* @__PURE__ */ a(
186
+ "aliasList" in e.defaultValues && !((B = (w = e.fieldOptions) == null ? void 0 : w.aliasList) != null && B.hidden) && /* @__PURE__ */ n(
187
187
  s,
188
188
  {
189
189
  name: "aliasList",
190
190
  control: o,
191
- render: ({ field: { value: t, onChange: n, ...r } }) => {
191
+ render: ({ field: { value: t, onChange: a, ...r } }) => {
192
192
  const i = (l) => {
193
193
  const u = {
194
194
  target: {
195
195
  value: l.target.value.split(",").map((f) => f.trimStart())
196
196
  }
197
197
  };
198
- n(u);
198
+ a(u);
199
199
  };
200
- return /* @__PURE__ */ a(
200
+ return /* @__PURE__ */ n(
201
201
  v,
202
202
  {
203
203
  label: "Alias List",
@@ -213,46 +213,46 @@ function ve(e, N) {
213
213
  }
214
214
  }
215
215
  ),
216
- "appliedPolicies" in e.defaultValues && !((O = (R = e.fieldOptions) == null ? void 0 : R.appliedPolicies) != null && O.hidden) && /* @__PURE__ */ a(
216
+ "appliedPolicies" in e.defaultValues && !((A = (_ = e.fieldOptions) == null ? void 0 : _.appliedPolicies) != null && A.hidden) && /* @__PURE__ */ n(
217
217
  s,
218
218
  {
219
219
  name: "appliedPolicies",
220
220
  control: o,
221
- render: ({ field: { value: t, onChange: n } }) => /* @__PURE__ */ a(
222
- se,
221
+ render: ({ field: { value: t, onChange: a } }) => /* @__PURE__ */ n(
222
+ fe,
223
223
  {
224
224
  policyList: e.policyList,
225
225
  value: t || void 0,
226
- onChange: n
226
+ onChange: a
227
227
  }
228
228
  )
229
229
  }
230
230
  ),
231
- /* @__PURE__ */ a(
231
+ /* @__PURE__ */ n(
232
232
  s,
233
233
  {
234
234
  name: "variables",
235
235
  control: o,
236
- render: ({ field: { value: t, onChange: n } }) => /* @__PURE__ */ a(
237
- me,
236
+ render: ({ field: { value: t, onChange: a } }) => /* @__PURE__ */ n(
237
+ he,
238
238
  {
239
239
  template: y,
240
240
  value: t,
241
241
  mapboxAccessToken: e.mapboxAccessToken,
242
242
  variant: e.inputVariant,
243
243
  fieldOptions: e.fieldOptions,
244
- onChange: n
244
+ onChange: a
245
245
  }
246
246
  )
247
247
  }
248
248
  ),
249
- "fileInBase64" in e.defaultValues && !((B = (w = e.fieldOptions) == null ? void 0 : w.fileInBase64) != null && B.hidden) && /* @__PURE__ */ h($, { children: [
250
- /* @__PURE__ */ a(
249
+ "fileInBase64" in e.defaultValues && !((P = (D = e.fieldOptions) == null ? void 0 : D.fileInBase64) != null && P.hidden) && /* @__PURE__ */ h(Z, { children: [
250
+ /* @__PURE__ */ n(
251
251
  s,
252
252
  {
253
253
  name: "fileInBase64",
254
254
  control: o,
255
- render: ({ field: { onChange: t, ...n } }) => {
255
+ render: ({ field: { onChange: t, ...a } }) => {
256
256
  const r = (i) => {
257
257
  if (i.target.files) {
258
258
  const l = new FileReader();
@@ -264,7 +264,7 @@ function ve(e, N) {
264
264
  b("originalFileName", d.name), b("contentType", d.type), l.readAsDataURL(d);
265
265
  }
266
266
  };
267
- return /* @__PURE__ */ a(
267
+ return /* @__PURE__ */ n(
268
268
  v,
269
269
  {
270
270
  type: "file",
@@ -275,26 +275,26 @@ function ve(e, N) {
275
275
  helperText: "Select a file to upload",
276
276
  InputLabelProps: { shrink: !0 },
277
277
  onChange: r,
278
- ...n
278
+ ...a
279
279
  }
280
280
  );
281
281
  }
282
282
  }
283
283
  ),
284
- /* @__PURE__ */ a(
284
+ /* @__PURE__ */ n(
285
285
  s,
286
286
  {
287
287
  name: "type",
288
288
  control: o,
289
- render: ({ field: { value: t, onChange: n } }) => {
289
+ render: ({ field: { value: t, onChange: a } }) => {
290
290
  const r = (i) => {
291
291
  const {
292
292
  target: { value: l }
293
293
  } = i;
294
- n(l);
294
+ a(l);
295
295
  };
296
296
  return /* @__PURE__ */ h(
297
- ie,
297
+ oe,
298
298
  {
299
299
  fullWidth: !0,
300
300
  sx: {
@@ -302,13 +302,13 @@ function ve(e, N) {
302
302
  },
303
303
  variant: e.inputVariant,
304
304
  children: [
305
- /* @__PURE__ */ a(le, { children: "Type" }),
306
- /* @__PURE__ */ a(
307
- re,
305
+ /* @__PURE__ */ n(se, { children: "Type" }),
306
+ /* @__PURE__ */ n(
307
+ me,
308
308
  {
309
309
  value: t ? [t] : "",
310
310
  onChange: r,
311
- children: he.map((i) => /* @__PURE__ */ a(de, { value: i, children: i }, i))
311
+ children: ge.map((i) => /* @__PURE__ */ n(ce, { value: i, children: i }, i))
312
312
  }
313
313
  )
314
314
  ]
@@ -317,30 +317,30 @@ function ve(e, N) {
317
317
  }
318
318
  }
319
319
  ),
320
- /* @__PURE__ */ a(
321
- W,
320
+ /* @__PURE__ */ n(
321
+ K,
322
322
  {
323
- control: /* @__PURE__ */ a(
323
+ control: /* @__PURE__ */ n(
324
324
  s,
325
325
  {
326
326
  name: "redacted",
327
327
  control: o,
328
- render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ a(M, { checked: !!t, ...n })
328
+ render: ({ field: { value: t, ...a } }) => /* @__PURE__ */ n(U, { checked: !!t, ...a })
329
329
  }
330
330
  ),
331
331
  label: "Redacted",
332
332
  sx: { mb: 2 }
333
333
  }
334
334
  ),
335
- /* @__PURE__ */ a(
336
- W,
335
+ /* @__PURE__ */ n(
336
+ K,
337
337
  {
338
- control: /* @__PURE__ */ a(
338
+ control: /* @__PURE__ */ n(
339
339
  s,
340
340
  {
341
341
  name: "contentEncrypted",
342
342
  control: o,
343
- render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ a(M, { checked: !!t, ...n })
343
+ render: ({ field: { value: t, ...a } }) => /* @__PURE__ */ n(U, { checked: !!t, ...a })
344
344
  }
345
345
  ),
346
346
  label: "Content Encrypted",
@@ -348,7 +348,7 @@ function ve(e, N) {
348
348
  }
349
349
  )
350
350
  ] }),
351
- !((A = (_ = e.fieldOptions) == null ? void 0 : _.disseminationList) != null && A.hidden) && /* @__PURE__ */ a(
351
+ !((M = (W = e.fieldOptions) == null ? void 0 : W.disseminationList) != null && M.hidden) && /* @__PURE__ */ n(
352
352
  s,
353
353
  {
354
354
  name: "disseminationList",
@@ -356,12 +356,12 @@ function ve(e, N) {
356
356
  required: !0
357
357
  },
358
358
  control: o,
359
- render: ({ field: { value: t, onChange: n }, fieldState: r }) => {
359
+ render: ({ field: { value: t, onChange: a }, fieldState: r }) => {
360
360
  const i = t || [], l = (d) => {
361
- n(d);
361
+ a(d);
362
362
  };
363
- return /* @__PURE__ */ a(
364
- ce,
363
+ return /* @__PURE__ */ n(
364
+ ve,
365
365
  {
366
366
  selectedIds: i,
367
367
  memberedGroups: e.memberedGroups,
@@ -373,7 +373,7 @@ function ve(e, N) {
373
373
  }
374
374
  }
375
375
  ),
376
- !((P = (D = e.fieldOptions) == null ? void 0 : D.securityLevelId) != null && P.hidden) && /* @__PURE__ */ a(p, { mt: 2, children: /* @__PURE__ */ a(
376
+ !((G = (N = e.fieldOptions) == null ? void 0 : N.securityLevelId) != null && G.hidden) && /* @__PURE__ */ n(p, { mt: 2, children: /* @__PURE__ */ n(
377
377
  s,
378
378
  {
379
379
  name: "securityLevelId",
@@ -381,13 +381,13 @@ function ve(e, N) {
381
381
  required: !0
382
382
  },
383
383
  control: o,
384
- render: ({ field: { value: t, onChange: n }, fieldState: r }) => {
384
+ render: ({ field: { value: t, onChange: a }, fieldState: r }) => {
385
385
  var l, d;
386
386
  const i = (c) => {
387
- n(c);
387
+ a(c);
388
388
  };
389
- return /* @__PURE__ */ a(
390
- ue,
389
+ return /* @__PURE__ */ n(
390
+ be,
391
391
  {
392
392
  value: t || 0,
393
393
  ontologyId: e.ontologyId,
@@ -405,19 +405,19 @@ function ve(e, N) {
405
405
  }
406
406
  ) }),
407
407
  /* @__PURE__ */ h(p, { display: "flex", justifyContent: "space-between", mt: 3, children: [
408
- /* @__PURE__ */ a(
408
+ /* @__PURE__ */ n(
409
409
  g,
410
410
  {
411
411
  color: "primary",
412
412
  variant: "text",
413
413
  disabled: e.loading,
414
414
  sx: { textTransform: "none" },
415
- onClick: J,
415
+ onClick: z,
416
416
  children: "Cancel"
417
417
  }
418
418
  ),
419
419
  /* @__PURE__ */ h(p, { children: [
420
- e.onRemove !== void 0 && /* @__PURE__ */ a(
420
+ e.onRemove !== void 0 && /* @__PURE__ */ n(
421
421
  g,
422
422
  {
423
423
  type: "button",
@@ -429,7 +429,7 @@ function ve(e, N) {
429
429
  children: e.removeLoading ? "Deleting..." : "Delete"
430
430
  }
431
431
  ),
432
- e.saveButtons ? e.saveButtons.map((t, n) => /* @__PURE__ */ a(
432
+ e.saveButtons ? e.saveButtons.map((t, a) => /* @__PURE__ */ n(
433
433
  g,
434
434
  {
435
435
  type: "submit",
@@ -441,8 +441,8 @@ function ve(e, N) {
441
441
  onClick: t.onClick,
442
442
  children: t.label
443
443
  },
444
- n
445
- )) : /* @__PURE__ */ a(
444
+ a
445
+ )) : /* @__PURE__ */ n(
446
446
  g,
447
447
  {
448
448
  type: "submit",
@@ -461,7 +461,7 @@ function ve(e, N) {
461
461
  }
462
462
  );
463
463
  }
464
- const Oe = m.forwardRef(ve);
464
+ const Ae = m.forwardRef(Te);
465
465
  export {
466
- Oe as InstanceForm
466
+ Ae as InstanceForm
467
467
  };
package/dist/main.d.ts CHANGED
@@ -2,6 +2,7 @@ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
2
2
  import { BoxProps } from '@mui/material';
3
3
  import { Collection } from 'ol';
4
4
  import { Coordinate } from 'ol/coordinate';
5
+ import { createTheme } from '@mui/material';
5
6
  import { Dayjs } from 'dayjs';
6
7
  import { default as default_2 } from 'react';
7
8
  import { default as default_3 } from 'ol/layer/Layer';
@@ -23,6 +24,8 @@ import { Size } from 'ol/size';
23
24
  import { SxProps } from '@mui/material';
24
25
  import { SxProps as SxProps_2 } from '@mui/material/styles';
25
26
  import { Theme } from '@mui/material/styles';
27
+ import { ThemeOptions } from '@mui/material';
28
+ import { ThemeProvider } from '@mui/material';
26
29
  import { View } from 'ol';
27
30
 
28
31
  export declare function Access<T extends string>({ pagePath, feature, appRoles, fallback, loading, children, }: Props<T>): string | number | true | Iterable<ReactNode> | JSX_2.Element | null;
@@ -144,6 +147,8 @@ declare interface ContainerProps {
144
147
 
145
148
  export declare const ContextMenu: React.FC<Props_3>;
146
149
 
150
+ export { createTheme }
151
+
147
152
  declare interface DataType extends ItemProps {
148
153
  idKey?: string;
149
154
  children?: DataType[];
@@ -837,6 +842,10 @@ K extends
837
842
 
838
843
  export declare const TemplatePropertyFilters: FC<Props_10>;
839
844
 
845
+ export { ThemeOptions }
846
+
847
+ export { ThemeProvider }
848
+
840
849
  export declare const TreeSelect: FC<TreeSelectProps>;
841
850
 
842
851
  declare interface TreeSelectProps {
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Access as Ht } from "./components/access/index.js";
2
2
  import { alert as Ft, confirm as Ct } from "./components/confirm/index.js";
3
3
  import { Card as jt } from "./components/card/index.js";
4
- import { CollapsibleCard as Pt } from "./components/collapsible-card/index.js";
4
+ import { CollapsibleCard as $t } from "./components/collapsible-card/index.js";
5
5
  import { ConditionalWrapper as Et } from "./components/conditional-wrapper/index.js";
6
6
  import { Container as zt } from "./components/container/index.js";
7
7
  import { ContextMenu as Nt } from "./components/context-menu/index.js";
@@ -20,11 +20,12 @@ import { SearchInput as le } from "./components/search-input/index.js";
20
20
  import { SecurityLevel as ye } from "./components/data-security-selectors/security-level/index.js";
21
21
  import { TemplateForm as De } from "./components/template-form/index.js";
22
22
  import { TemplatePropertyFilters as xe } from "./components/template-property-filters/index.js";
23
- import { TreeSelect as Le } from "./components/tree-select/index.js";
24
- import { TreeViewFilter as Te } from "./components/treeview-filter/index.js";
23
+ import { TreeSelect as Te } from "./components/tree-select/index.js";
24
+ import { TreeViewFilter as we } from "./components/treeview-filter/index.js";
25
25
  import { S as ve } from "./utils-Bq0ye5vf.js";
26
26
  import { i as Se } from "./index-DlnzUkwe.js";
27
27
  import { h as be } from "./helpers-B4UL9NMD.js";
28
+ import { ThemeProvider as Be, createTheme as Fe } from "@mui/material";
28
29
  import { _ as dt } from "./objectWithoutPropertiesLoose-BK36oJDi.js";
29
30
  import C from "dayjs";
30
31
  import { c as U, g as z } from "./createStyled-BzvgQjjR.js";
@@ -114,56 +115,56 @@ var et = { exports: {} };
114
115
  function B(r) {
115
116
  var h, d;
116
117
  h = r, d = n && n.formats;
117
- for (var u = (r = h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(S, T, M) {
118
+ for (var u = (r = h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(S, w, M) {
118
119
  var y = M && M.toUpperCase();
119
- return T || d[M] || f[M] || d[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(k, v, A) {
120
+ return w || d[M] || f[M] || d[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(k, v, A) {
120
121
  return v || A.slice(1);
121
122
  });
122
123
  })).match(c), x = u.length, Y = 0; Y < x; Y += 1) {
123
- var I = u[Y], O = Z[I], L = O && O[0], w = O && O[1];
124
- u[Y] = w ? { regex: L, parser: w } : I.replace(/^\[|\]$/g, "");
124
+ var I = u[Y], O = Z[I], T = O && O[0], L = O && O[1];
125
+ u[Y] = L ? { regex: T, parser: L } : I.replace(/^\[|\]$/g, "");
125
126
  }
126
127
  return function(S) {
127
- for (var T = {}, M = 0, y = 0; M < x; M += 1) {
128
+ for (var w = {}, M = 0, y = 0; M < x; M += 1) {
128
129
  var k = u[M];
129
130
  if (typeof k == "string") y += k.length;
130
131
  else {
131
132
  var v = k.regex, A = k.parser, j = S.slice(y), F = v.exec(j)[0];
132
- A.call(T, F), S = S.replace(F, "");
133
+ A.call(w, F), S = S.replace(F, "");
133
134
  }
134
135
  }
135
136
  return function(b) {
136
- var $ = b.afternoon;
137
- if ($ !== void 0) {
137
+ var P = b.afternoon;
138
+ if (P !== void 0) {
138
139
  var m = b.hours;
139
- $ ? m < 12 && (b.hours += 12) : m === 12 && (b.hours = 0), delete b.afternoon;
140
+ P ? m < 12 && (b.hours += 12) : m === 12 && (b.hours = 0), delete b.afternoon;
140
141
  }
141
- }(T), T;
142
+ }(w), w;
142
143
  };
143
144
  }
144
145
  return function(r, h, d) {
145
146
  d.p.customParseFormat = !0, r && r.parseTwoDigitYear && (i = r.parseTwoDigitYear);
146
147
  var u = h.prototype, x = u.parse;
147
148
  u.parse = function(Y) {
148
- var I = Y.date, O = Y.utc, L = Y.args;
149
+ var I = Y.date, O = Y.utc, T = Y.args;
149
150
  this.$u = O;
150
- var w = L[1];
151
- if (typeof w == "string") {
152
- var S = L[2] === !0, T = L[3] === !0, M = S || T, y = L[2];
153
- T && (y = L[2]), n = this.$locale(), !S && y && (n = d.Ls[y]), this.$d = function(j, F, b, $) {
151
+ var L = T[1];
152
+ if (typeof L == "string") {
153
+ var S = T[2] === !0, w = T[3] === !0, M = S || w, y = T[2];
154
+ w && (y = T[2]), n = this.$locale(), !S && y && (n = d.Ls[y]), this.$d = function(j, F, b, P) {
154
155
  try {
155
156
  if (["x", "X"].indexOf(F) > -1) return new Date((F === "X" ? 1e3 : 1) * j);
156
- var m = B(F)(j), N = m.year, P = m.month, nt = m.day, ot = m.hours, at = m.minutes, it = m.seconds, ht = m.milliseconds, R = m.zone, X = m.week, J = /* @__PURE__ */ new Date(), _ = nt || (N || P ? 1 : J.getDate()), V = N || J.getFullYear(), W = 0;
157
- N && !P || (W = P > 0 ? P - 1 : J.getMonth());
157
+ var m = B(F)(j), N = m.year, $ = m.month, nt = m.day, ot = m.hours, at = m.minutes, it = m.seconds, ht = m.milliseconds, R = m.zone, X = m.week, J = /* @__PURE__ */ new Date(), _ = nt || (N || $ ? 1 : J.getDate()), V = N || J.getFullYear(), W = 0;
158
+ N && !$ || (W = $ > 0 ? $ - 1 : J.getMonth());
158
159
  var E, q = ot || 0, G = at || 0, K = it || 0, Q = ht || 0;
159
- return R ? new Date(Date.UTC(V, W, _, q, G, K, Q + 60 * R.offset * 1e3)) : b ? new Date(Date.UTC(V, W, _, q, G, K, Q)) : (E = new Date(V, W, _, q, G, K, Q), X && (E = $(E).week(X).toDate()), E);
160
+ return R ? new Date(Date.UTC(V, W, _, q, G, K, Q + 60 * R.offset * 1e3)) : b ? new Date(Date.UTC(V, W, _, q, G, K, Q)) : (E = new Date(V, W, _, q, G, K, Q), X && (E = P(E).week(X).toDate()), E);
160
161
  } catch {
161
162
  return /* @__PURE__ */ new Date("");
162
163
  }
163
- }(I, w, O, d), this.init(), y && y !== !0 && (this.$L = this.locale(y).$L), M && I != this.format(w) && (this.$d = /* @__PURE__ */ new Date("")), n = {};
164
- } else if (w instanceof Array) for (var k = w.length, v = 1; v <= k; v += 1) {
165
- L[1] = w[v - 1];
166
- var A = d.apply(this, L);
164
+ }(I, L, O, d), this.init(), y && y !== !0 && (this.$L = this.locale(y).$L), M && I != this.format(L) && (this.$d = /* @__PURE__ */ new Date("")), n = {};
165
+ } else if (L instanceof Array) for (var k = L.length, v = 1; v <= k; v += 1) {
166
+ T[1] = L[v - 1];
167
+ var A = d.apply(this, T);
167
168
  if (A.isValid()) {
168
169
  this.$d = A.$d, this.$L = A.$L, this.init();
169
170
  break;
@@ -330,7 +331,7 @@ const gt = ut(["Your locale has not been found.", "Either the locale key is not
330
331
  keyboardDateTime: "L LT",
331
332
  keyboardDateTime12h: "L hh:mm A",
332
333
  keyboardDateTime24h: "L HH:mm"
333
- }, Lt = (l, D) => D ? (...f) => l(...f).locale(D) : l;
334
+ }, Tt = (l, D) => D ? (...f) => l(...f).locale(D) : l;
334
335
  class St {
335
336
  constructor({
336
337
  locale: D,
@@ -376,7 +377,7 @@ class St {
376
377
  for (; i.isBefore(o); )
377
378
  n.push(i), i = i.add(1, "year");
378
379
  return n;
379
- }, this.getMeridiemText = (t) => t === "am" ? "AM" : "PM", this.rawDayJsInstance = c || C, this.dayjs = Lt(this.rawDayJsInstance, D), this.locale = D, this.formats = dt({}, Yt, f), C.extend(ft);
380
+ }, this.getMeridiemText = (t) => t === "am" ? "AM" : "PM", this.rawDayJsInstance = c || C, this.dayjs = Tt(this.rawDayJsInstance, D), this.locale = D, this.formats = dt({}, Yt, f), C.extend(ft);
380
381
  }
381
382
  }
382
383
  export {
@@ -384,7 +385,7 @@ export {
384
385
  be as AccessUtils,
385
386
  St as AdapterDayjs,
386
387
  jt as Card,
387
- Pt as CollapsibleCard,
388
+ $t as CollapsibleCard,
388
389
  Et as ConditionalWrapper,
389
390
  zt as Container,
390
391
  Nt as ContextMenu,
@@ -405,8 +406,10 @@ export {
405
406
  ye as SecurityLevel,
406
407
  De as TemplateForm,
407
408
  xe as TemplatePropertyFilters,
408
- Le as TreeSelect,
409
- Te as TreeViewFilter,
409
+ Be as ThemeProvider,
410
+ Te as TreeSelect,
411
+ we as TreeViewFilter,
410
412
  Ft as alert,
411
- Ct as confirm
413
+ Ct as confirm,
414
+ Fe as createTheme
412
415
  };
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.4.17",
4
+ "version": "1.4.19",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",