@hybridcore/ui 1.3.6 → 1.4.0

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.
Files changed (128) hide show
  1. package/dist/AccordionDetails-CGs6GZQK.js +454 -0
  2. package/dist/Add-eepk2WTM.js +379 -0
  3. package/dist/Box-BPyg-Ybm.js +70 -0
  4. package/dist/Button-DLwB_sKd.js +354 -0
  5. package/dist/{ButtonBase-D6qhsxB0.js → ButtonBase-D0qccOVb.js} +6 -5
  6. package/dist/{CardContent-B8hqgH-I.js → CardContent-DFsCCOWk.js} +4 -4
  7. package/dist/{Checkbox-BFWhj3s-.js → Checkbox-qy3cjvnb.js} +134 -195
  8. package/dist/{Collapse-D_TjnyE5.js → Collapse-CL6LGGZw.js} +68 -75
  9. package/dist/Delete-OHEw9lDi.js +22 -0
  10. package/dist/DialogContent-CxOSq6h9.js +519 -0
  11. package/dist/FormControlLabel-D9KFjcIx.js +193 -0
  12. package/dist/{IconButton-D8bwME9t.js → IconButton-BaiyAtmS.js} +5 -5
  13. package/dist/{Input-Dxzguyp5.js → Input-CmCkXczh.js} +6 -6
  14. package/dist/{InputAdornment-B8ERE7Zv.js → InputAdornment-CZUPEeia.js} +5 -5
  15. package/dist/{FormControl-BMRUQKHh.js → InputLabel-CWkW8NtU.js} +316 -316
  16. package/dist/{List-DEWyK9IO.js → List-PpNAWJ_I.js} +4 -4
  17. package/dist/ListItem-CZbZ91vp.js +428 -0
  18. package/dist/{MenuItem-DstAFfik.js → MenuItem-D-INSvZa.js} +7 -7
  19. package/dist/{Modal-DNGEQJ1M.js → Modal-KrI5qFIq.js} +61 -57
  20. package/dist/{OutlinedInput-w2Cj9STF.js → OutlinedInput-DkIUD30e.js} +6 -6
  21. package/dist/{Paper-BseeergJ.js → Paper-btu3j72o.js} +5 -5
  22. package/dist/{Select-NDq3WyLt.js → Select-ClaBvSqf.js} +20 -18
  23. package/dist/Tabs-BzelDJKy.js +787 -0
  24. package/dist/TextField-D87qTh1k.js +457 -0
  25. package/dist/Typography-Bm7PFqUT.js +176 -0
  26. package/dist/assets/index.css +1 -1
  27. package/dist/assets/index2.css +1 -1
  28. package/dist/components/card/index.js +6 -6
  29. package/dist/components/card/styled.js +1 -1
  30. package/dist/components/collapsible-card/style.js +20 -466
  31. package/dist/components/confirm/dialog.js +8 -149
  32. package/dist/components/confirm/index.js +1 -1
  33. package/dist/components/container/index.js +7 -7
  34. package/dist/components/context-menu/index.js +191 -604
  35. package/dist/components/data-security-selectors/dissemination-list/index.js +12 -6
  36. package/dist/components/data-security-selectors/security-level/index.js +46 -45
  37. package/dist/components/date-time-picker/index.js +85 -64
  38. package/dist/components/geometry-picker/coordinate/index.js +1 -1
  39. package/dist/components/geometry-picker/edit/index.js +16 -16
  40. package/dist/components/geometry-picker/geometry/index.js +35 -35
  41. package/dist/components/geometry-picker/index.js +60 -56
  42. package/dist/components/geometry-picker/kml/index.js +14 -14
  43. package/dist/components/geometry-picker/map/index.js +1 -1
  44. package/dist/components/geometry-picker/map/logic.js +38 -37
  45. package/dist/components/geometry-picker/parser/coordinate-input/logic.js +63 -59
  46. package/dist/components/geometry-picker/parser/logic.js +33 -32
  47. package/dist/components/geometry-picker/styled.js +22 -14
  48. package/dist/components/icon-button/index.js +1 -1
  49. package/dist/components/icon-button/styled.js +0 -2
  50. package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/index.js +2 -2
  51. package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/styled.js +15 -6
  52. package/dist/components/instance-form/components/variable/index.js +19 -0
  53. package/dist/components/instance-form/components/variables/index.js +40 -0
  54. package/dist/components/{data-management/instance-form → instance-form}/index.js +174 -155
  55. package/dist/components/instance-hierarchy-table/index.js +58 -0
  56. package/dist/components/instance-hierarchy-table/styled.js +29 -0
  57. package/dist/components/instance-table/index.js +125 -0
  58. package/dist/components/instance-table/styled.js +13 -0
  59. package/dist/components/map/helpers/ol.js +1 -1
  60. package/dist/components/map/index.js +1 -1
  61. package/dist/components/map/logic.js +1 -1
  62. package/dist/components/map/styled.js +1 -1
  63. package/dist/components/phone-input/index.js +1 -1
  64. package/dist/components/property-mapping/index.js +558 -0
  65. package/dist/components/range-selector/components/composite-list-range/index.js +81 -0
  66. package/dist/components/range-selector/components/date-range/index.js +9 -0
  67. package/dist/components/range-selector/components/geometry-range/index.js +26 -0
  68. package/dist/components/range-selector/components/number-range/index.js +86 -0
  69. package/dist/components/range-selector/components/string-range/index.js +31 -0
  70. package/dist/components/range-selector/index.js +59 -0
  71. package/dist/components/search-input/index.js +4 -4
  72. package/dist/components/tabs/appleTabs.style.js +55 -0
  73. package/dist/components/tabs/index.js +93 -0
  74. package/dist/components/tabs/tab-panel.js +18 -0
  75. package/dist/components/template-form/components/catalogue-instance-selector/index.js +158 -0
  76. package/dist/components/template-form/components/property-list/index.js +72 -0
  77. package/dist/components/template-form/components/property-list/property-list-columns.js +125 -0
  78. package/dist/components/template-form/components/property-list/property-list-form.js +16 -0
  79. package/dist/components/template-form/components/property-list/property-list-logic.js +66 -0
  80. package/dist/components/template-form/components/property-list/types.js +8 -0
  81. package/dist/components/template-form/components/recognition-property-list/index.js +69 -0
  82. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +50 -0
  83. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +174 -0
  84. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-logic.js +64 -0
  85. package/dist/components/template-form/components/recognition-property-list/types.js +8 -0
  86. package/dist/components/template-form/components/select-icon/index.js +186 -0
  87. package/dist/components/template-form/components/select-icon/styled.js +76 -0
  88. package/dist/components/template-form/index.js +338 -0
  89. package/dist/components/template-property-filters/property.js +48 -46
  90. package/dist/components/tree-select/index.js +51 -49
  91. package/dist/components/tree-select/styled.js +2 -2
  92. package/dist/components/treeview-filter/index.js +8 -8
  93. package/dist/components/treeview-filter/item/index.js +1 -1
  94. package/dist/components/treeview-filter/item-label/index.js +18 -17
  95. package/dist/constants/index.js +41 -0
  96. package/dist/{createStyled-B96gjom1.js → createStyled-BzvgQjjR.js} +487 -464
  97. package/dist/createSvgIcon-Cfm1LkEe.js +73 -0
  98. package/dist/{createSvgIcon-BNrb7rDY.js → createSvgIcon-DEXLbMwp.js} +62 -90
  99. package/dist/dialog-v5-nL5yy.js +153 -0
  100. package/dist/{exactProp-CI_rjX83.js → exactProp-DkmnwNVS.js} +3 -3
  101. package/dist/extendSxProp-qqdkfHzS.js +30 -0
  102. package/dist/{index-CSfSVkKj.js → index-B0JPwFI9.js} +6 -5
  103. package/dist/index-C1fczHEW.js +11042 -0
  104. package/dist/index-DPf5olog.js +288 -0
  105. package/dist/{index-JrtqxUdI.js → index-DlnzUkwe.js} +1 -1
  106. package/dist/{listItemTextClasses-CFiI_U7B.js → listItemTextClasses-DsHGzpPM.js} +2 -2
  107. package/dist/main.d.ts +569 -81
  108. package/dist/main.js +157 -157
  109. package/dist/{ol-BUKJ1urU.js → ol-CHaVTXvL.js} +24 -24
  110. package/dist/property-list-form-BfP9gzSo.js +391 -0
  111. package/dist/requirePropFactory-BjhhI-AW.js +18 -0
  112. package/dist/{styled-cPJbqF0E.js → styled-LNCprp4n.js} +24 -22
  113. package/dist/unsupportedProp-BuVD30Gh.js +9 -0
  114. package/dist/useControlled-BYdyS7Pn.js +31 -0
  115. package/dist/{useTheme-C-T6Qisa.js → useTheme-DBiahn6p.js} +2 -2
  116. package/dist/{useThemeProps-DeftUmqJ.js → useThemeProps-uYx_RkOH.js} +16 -14
  117. package/dist/utils/ontology.js +52 -30
  118. package/dist/{utils-CCkxV0lZ.js → utils-DNe_YYjm.js} +16 -16
  119. package/package.json +2 -1
  120. package/dist/DialogContent-BCYm_d1s.js +0 -864
  121. package/dist/FormControlLabel-DENNVXWL.js +0 -639
  122. package/dist/Typography-Dg-ROiTA.js +0 -201
  123. package/dist/components/data-management/instance-form/components/variable/index.js +0 -17
  124. package/dist/components/data-management/instance-form/components/variables/index.js +0 -39
  125. package/dist/createSvgIcon-B2WT0K4k.js +0 -87
  126. package/dist/index-B3Oj04nl.js +0 -287
  127. package/dist/components/{data-management/instance-form → instance-form}/components/policy-list/index.js +0 -0
  128. package/dist/{extends-Cyw62AD_.js → objectWithoutPropertiesLoose-BK36oJDi.js} +9 -9
@@ -1,42 +1,42 @@
1
- import { jsx as a, jsxs as f, Fragment as P } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as h, Fragment as D } from "react/jsx-runtime";
2
2
  import m from "react";
3
- import W from "lodash";
4
- import { useForm as M, Controller as s } from "react-hook-form";
5
- import { getNestedChildrenFromMap as N } from "../../../utils/ontology.js";
6
- import { i as G, d as K } from "../../../utils-Bq0ye5vf.js";
7
- import { ConditionalWrapper as O } from "../../conditional-wrapper/index.js";
8
- import { Container as U } from "../../container/index.js";
9
- import { TextField as h, FormGroup as j, FormControl as q, InputLabel as H, Select as Y, MenuItem as J, FormControlLabel as L, Checkbox as S, Box as T, Button as g } from "@mui/material";
10
- import { TreeSelect as $ } from "../../tree-select/index.js";
11
- import Q from "./components/policy-list/index.js";
12
- import X from "./components/variables/index.js";
13
- import { DisseminationList as z } from "../../data-security-selectors/dissemination-list/index.js";
14
- import { SecurityLevel as Z } from "../../data-security-selectors/security-level/index.js";
15
- const ee = {
3
+ import P from "lodash";
4
+ import { useForm as W, Controller as s } from "react-hook-form";
5
+ import { getNestedChildrenFromMap as M } from "../../utils/ontology.js";
6
+ import { i as N, d as G } from "../../utils-Bq0ye5vf.js";
7
+ import { ConditionalWrapper as K } from "../conditional-wrapper/index.js";
8
+ import { Container as O } from "../container/index.js";
9
+ import { TextField as v, FormGroup as U, FormControl as j, InputLabel as q, Select as H, MenuItem as Y, FormControlLabel as L, Checkbox as V, Box as p, Button as y } from "@mui/material";
10
+ import { TreeSelect as J } from "../tree-select/index.js";
11
+ import $ from "./components/policy-list/index.js";
12
+ import Q from "./components/variables/index.js";
13
+ import { DisseminationList as X } from "../data-security-selectors/dissemination-list/index.js";
14
+ import { SecurityLevel as z } from "../data-security-selectors/security-level/index.js";
15
+ const Z = {
16
16
  alg: "A256GCM",
17
17
  ext: !0,
18
18
  k: "_El6rHQxC5E7NdO5DiMDITjF7f65wrlaJmFVagVE9Ic",
19
19
  key_ops: ["encrypt", "decrypt"],
20
20
  kty: "oct"
21
- }, te = [
21
+ }, ee = [
22
22
  "IMAGE",
23
23
  "VIDEO",
24
24
  "TEXT",
25
25
  "BINARY",
26
26
  "OTHER"
27
27
  ];
28
- function ae(e, F) {
28
+ function te(e, S) {
29
29
  const {
30
30
  register: C,
31
31
  handleSubmit: E,
32
32
  control: d,
33
- formState: { errors: V },
33
+ formState: { errors: F },
34
34
  getValues: x,
35
- setValue: p,
35
+ setValue: b,
36
36
  reset: k
37
- } = M({
37
+ } = W({
38
38
  defaultValues: e.defaultValues
39
- }), [R, _] = m.useState([]), [v, I] = m.useState(), [ne, w] = m.useState(0), B = m.useMemo(() => {
39
+ }), [R, _] = m.useState([]), [g, I] = m.useState(), [ae, w] = m.useState(0), A = m.useMemo(() => {
40
40
  const t = [];
41
41
  return e.mappedTemplates.forEach((n) => {
42
42
  n.creatable || t.push(String(n.id));
@@ -44,131 +44,131 @@ function ae(e, F) {
44
44
  }, [e.mappedTemplates]);
45
45
  m.useEffect(() => {
46
46
  (async () => {
47
- let t = { ...e.defaultValues };
48
- const n = e.mappedTemplates.get(t.templateId);
47
+ const t = { ...e.defaultValues }, n = e.mappedTemplates.get(t.templateId);
49
48
  if (n) {
50
- const l = n.properties.filter(
51
- (r) => r.privacyPreservationMethod === "ENCRYPTION"
49
+ const i = n.properties.filter(
50
+ (l) => l.privacyPreservationMethod === "ENCRYPTION"
52
51
  );
53
- if (l.length > 0)
54
- for (let r = 0; r < l.length; r++) {
55
- const i = l[r], o = W.get(t, `variables.${i.propertyId}`);
52
+ if (i.length > 0)
53
+ for (let l = 0; l < i.length; l++) {
54
+ const r = i[l], o = P.get(t, `variables.${r.propertyId}`);
56
55
  if (o && e.keyAuth) {
57
- const c = await G(ee), u = await K(c, o);
58
- u.data && (p(`variables.${i.propertyId}`, u.data), w((b) => b + 1));
56
+ const c = await N(Z), u = await G(c, o);
57
+ u.data && (b(`variables.${r.propertyId}`, u.data), w((f) => f + 1));
59
58
  }
60
59
  }
61
60
  }
62
61
  })();
63
62
  }, [e.defaultValues, e.mappedTemplates, e.keyAuth]);
64
- const y = () => {
63
+ const T = () => {
65
64
  const t = x("templateId");
66
- v && I(void 0);
67
- const n = N(e.mappedTemplates);
65
+ g && I(void 0);
66
+ const n = M(e.mappedTemplates);
68
67
  _(n);
69
- for (let l of e.mappedTemplates.values())
70
- if (l.id === t) {
71
- I(l);
68
+ for (const i of e.mappedTemplates.values())
69
+ if (i.id === t) {
70
+ I(i);
72
71
  break;
73
72
  }
74
73
  };
75
- m.useImperativeHandle(F, () => ({
74
+ m.useImperativeHandle(S, () => ({
76
75
  resetForm() {
77
76
  k({
78
77
  title: "",
79
78
  description: "",
80
79
  templateId: 0,
81
80
  variables: {}
82
- }), y();
81
+ }), T();
83
82
  },
84
83
  setFormValue(t, n) {
85
- p(t, n);
84
+ b(t, n);
86
85
  },
87
86
  getFormValue(t) {
88
87
  return x(t);
89
88
  }
90
- })), m.useEffect(() => (y(), () => {
89
+ })), m.useEffect(() => (T(), () => {
91
90
  }), [e.mappedTemplates]), m.useEffect(() => {
92
- e.onSelectedTemplateChange && e.onSelectedTemplateChange(v);
93
- }, [v]);
94
- const A = () => {
91
+ e.onSelectedTemplateChange && e.onSelectedTemplateChange(g);
92
+ }, [g]);
93
+ const B = () => {
95
94
  if (e.onCancel) {
96
95
  e.onCancel();
97
96
  return;
98
97
  }
99
98
  };
100
99
  return /* @__PURE__ */ a(
101
- O,
100
+ K,
102
101
  {
103
102
  condition: e.variant === void 0 || e.variant === "inline",
104
103
  wrapper: (t) => /* @__PURE__ */ a(
105
- U,
104
+ O,
106
105
  {
107
106
  disableHeader: !0,
108
107
  sx: { position: "relative", overflow: "visible" },
109
108
  children: t
110
109
  }
111
110
  ),
112
- children: /* @__PURE__ */ f("form", { onSubmit: E(e.onSubmit), children: [
111
+ children: /* @__PURE__ */ h("form", { onSubmit: E(e.onSubmit), children: [
113
112
  /* @__PURE__ */ a(
114
- h,
113
+ v,
115
114
  {
116
115
  label: "Title *",
117
- variant: "standard",
116
+ variant: e.inputVariant,
118
117
  fullWidth: !0,
119
118
  sx: { mb: 2 },
120
119
  ...C("title", { required: !0 }),
121
- ...V.title && {
120
+ ...F.title && {
122
121
  helperText: "This field is required!",
123
122
  error: !0
124
123
  }
125
124
  }
126
125
  ),
127
126
  /* @__PURE__ */ a(
128
- h,
127
+ v,
129
128
  {
130
129
  label: "Description",
131
- variant: "standard",
130
+ variant: e.inputVariant,
132
131
  fullWidth: !0,
133
132
  multiline: !0,
134
133
  sx: { mb: 2 },
135
134
  ...C("description")
136
135
  }
137
136
  ),
138
- /* @__PURE__ */ a(j, { sx: { mb: 2 }, children: /* @__PURE__ */ a(
137
+ /* @__PURE__ */ a(U, { sx: { mb: 2 }, children: /* @__PURE__ */ a(
139
138
  s,
140
139
  {
141
140
  name: "templateId",
142
141
  control: d,
143
142
  render: ({ field: { value: t, onChange: n } }) => {
144
143
  if (e.disableTemplateChange) {
145
- const l = e.mappedTemplates.get(t);
144
+ const i = t ? e.mappedTemplates.get(t) : void 0;
146
145
  return /* @__PURE__ */ a(
147
- h,
146
+ v,
148
147
  {
149
148
  label: "Template",
150
- variant: "standard",
149
+ variant: e.inputVariant,
151
150
  fullWidth: !0,
152
151
  disabled: !0,
153
- value: l == null ? void 0 : l.name,
152
+ value: i == null ? void 0 : i.name,
154
153
  InputLabelProps: { shrink: !0 }
155
154
  }
156
155
  );
157
156
  }
158
157
  return /* @__PURE__ */ a(
159
- $,
158
+ J,
160
159
  {
161
160
  label: "Template",
162
161
  data: R,
163
162
  selected: t === 0 ? "" : [String(t)],
164
- disabled: B,
165
- onChange: (l, r) => {
166
- const i = {
163
+ disabled: A,
164
+ variant: e.inputVariant,
165
+ onChange: (i, l) => {
166
+ const r = {
167
167
  target: {
168
- value: r ? Number(l) : 0
168
+ value: l ? Number(i) : 0
169
169
  }
170
170
  };
171
- n(i), y();
171
+ n(r), T();
172
172
  }
173
173
  }
174
174
  );
@@ -180,26 +180,29 @@ function ae(e, F) {
180
180
  {
181
181
  name: "aliasList",
182
182
  control: d,
183
- render: ({ field: { value: t, onChange: n, ...l } }) => /* @__PURE__ */ a(
184
- h,
185
- {
186
- label: "Alias List",
187
- variant: "standard",
188
- fullWidth: !0,
189
- value: t,
190
- sx: { mb: 2 },
191
- helperText: "Add list values with the comma (,) separated string",
192
- onChange: (i) => {
193
- const u = {
194
- target: {
195
- value: i.target.value.split(",").map((b) => b.trimStart())
196
- }
197
- };
198
- n(u);
199
- },
200
- ...l
201
- }
202
- )
183
+ render: ({ field: { value: t, onChange: n, ...i } }) => {
184
+ const l = (r) => {
185
+ const u = {
186
+ target: {
187
+ value: r.target.value.split(",").map((f) => f.trimStart())
188
+ }
189
+ };
190
+ n(u);
191
+ };
192
+ return /* @__PURE__ */ a(
193
+ v,
194
+ {
195
+ label: "Alias List",
196
+ variant: e.inputVariant,
197
+ fullWidth: !0,
198
+ value: t,
199
+ sx: { mb: 2 },
200
+ helperText: "Add list values with the comma (,) separated string",
201
+ onChange: l,
202
+ ...i
203
+ }
204
+ );
205
+ }
203
206
  }
204
207
  ),
205
208
  "appliedPolicies" in e.defaultValues && /* @__PURE__ */ a(
@@ -208,10 +211,10 @@ function ae(e, F) {
208
211
  name: "appliedPolicies",
209
212
  control: d,
210
213
  render: ({ field: { value: t, onChange: n } }) => /* @__PURE__ */ a(
211
- Q,
214
+ $,
212
215
  {
213
216
  policyList: e.policyList,
214
- value: t,
217
+ value: t || void 0,
215
218
  onChange: n
216
219
  }
217
220
  )
@@ -223,46 +226,50 @@ function ae(e, F) {
223
226
  name: "variables",
224
227
  control: d,
225
228
  render: ({ field: { value: t, onChange: n } }) => /* @__PURE__ */ a(
226
- X,
229
+ Q,
227
230
  {
228
- template: v,
231
+ template: g,
229
232
  value: t,
230
- mapboxAccessToken: "",
233
+ mapboxAccessToken: e.mapboxAccessToken,
234
+ variant: e.inputVariant,
231
235
  onChange: n
232
236
  }
233
237
  )
234
238
  }
235
239
  ),
236
- "fileInBase64" in e.defaultValues && /* @__PURE__ */ f(P, { children: [
240
+ "fileInBase64" in e.defaultValues && /* @__PURE__ */ h(D, { children: [
237
241
  /* @__PURE__ */ a(
238
242
  s,
239
243
  {
240
244
  name: "fileInBase64",
241
245
  control: d,
242
- render: ({ field: { value: t, onChange: n, ...l } }) => /* @__PURE__ */ a(
243
- h,
244
- {
245
- type: "file",
246
- label: "File to Upload",
247
- variant: "standard",
248
- fullWidth: !0,
249
- sx: { mb: 2 },
250
- helperText: "Select a file to upload",
251
- InputLabelProps: { shrink: !0 },
252
- onChange: (i) => {
253
- if (i.target.files) {
254
- const o = new FileReader();
255
- o.onload = async (u) => {
256
- const D = u.target.result.split("base64,")[1];
257
- n(D);
258
- };
259
- const c = i.target.files[0];
260
- p("originalFileName", c.name), p("contentType", c.type), o.readAsDataURL(c);
261
- }
262
- },
263
- ...l
264
- }
265
- )
246
+ render: ({ field: { onChange: t, ...n } }) => {
247
+ const i = (l) => {
248
+ if (l.target.files) {
249
+ const r = new FileReader();
250
+ r.onload = async (c) => {
251
+ const f = c.target.result.split("base64,")[1];
252
+ t(f);
253
+ };
254
+ const o = l.target.files[0];
255
+ b("originalFileName", o.name), b("contentType", o.type), r.readAsDataURL(o);
256
+ }
257
+ };
258
+ return /* @__PURE__ */ a(
259
+ v,
260
+ {
261
+ type: "file",
262
+ label: "File to Upload",
263
+ variant: e.inputVariant,
264
+ fullWidth: !0,
265
+ sx: { mb: 2 },
266
+ helperText: "Select a file to upload",
267
+ InputLabelProps: { shrink: !0 },
268
+ onChange: i,
269
+ ...n
270
+ }
271
+ );
272
+ }
266
273
  }
267
274
  ),
268
275
  /* @__PURE__ */ a(
@@ -270,25 +277,35 @@ function ae(e, F) {
270
277
  {
271
278
  name: "type",
272
279
  control: d,
273
- render: ({ field: { value: t, onChange: n } }) => /* @__PURE__ */ f(
274
- q,
275
- {
276
- fullWidth: !0,
277
- sx: {
278
- mb: 2
279
- },
280
- variant: "standard",
281
- children: [
282
- /* @__PURE__ */ a(H, { children: "Type" }),
283
- /* @__PURE__ */ a(Y, { value: t, onChange: (r) => {
284
- const {
285
- target: { value: i }
286
- } = r;
287
- n(i);
288
- }, children: te.map((r) => /* @__PURE__ */ a(J, { value: r, children: r }, r)) })
289
- ]
290
- }
291
- )
280
+ render: ({ field: { value: t, onChange: n } }) => {
281
+ const i = (l) => {
282
+ const {
283
+ target: { value: r }
284
+ } = l;
285
+ n(r);
286
+ };
287
+ return /* @__PURE__ */ h(
288
+ j,
289
+ {
290
+ fullWidth: !0,
291
+ sx: {
292
+ mb: 2
293
+ },
294
+ variant: e.inputVariant,
295
+ children: [
296
+ /* @__PURE__ */ a(q, { children: "Type" }),
297
+ /* @__PURE__ */ a(
298
+ H,
299
+ {
300
+ value: t ? [t] : "",
301
+ onChange: i,
302
+ children: ee.map((l) => /* @__PURE__ */ a(Y, { value: l, children: l }, l))
303
+ }
304
+ )
305
+ ]
306
+ }
307
+ );
308
+ }
292
309
  }
293
310
  ),
294
311
  /* @__PURE__ */ a(
@@ -299,7 +316,7 @@ function ae(e, F) {
299
316
  {
300
317
  name: "redacted",
301
318
  control: d,
302
- render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ a(S, { checked: !!t, ...n })
319
+ render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ a(V, { checked: !!t, ...n })
303
320
  }
304
321
  ),
305
322
  label: "Redacted",
@@ -314,7 +331,7 @@ function ae(e, F) {
314
331
  {
315
332
  name: "contentEncrypted",
316
333
  control: d,
317
- render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ a(S, { checked: !!t, ...n })
334
+ render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ a(V, { checked: !!t, ...n })
318
335
  }
319
336
  ),
320
337
  label: "Content Encrypted",
@@ -330,23 +347,24 @@ function ae(e, F) {
330
347
  required: !0
331
348
  },
332
349
  control: d,
333
- render: ({ field: { value: t, onChange: n }, fieldState: l }) => {
334
- const r = t || [], i = (o) => {
350
+ render: ({ field: { value: t, onChange: n }, fieldState: i }) => {
351
+ const l = t || [], r = (o) => {
335
352
  n(o);
336
353
  };
337
354
  return /* @__PURE__ */ a(
338
- z,
355
+ X,
339
356
  {
340
- selectedIds: r,
357
+ selectedIds: l,
341
358
  memberedGroups: e.memberedGroups,
342
- showError: !!l.error,
343
- onChange: i
359
+ showError: !!i.error,
360
+ variant: e.inputVariant,
361
+ onChange: r
344
362
  }
345
363
  );
346
364
  }
347
365
  }
348
366
  ),
349
- /* @__PURE__ */ a(T, { mt: 2, children: /* @__PURE__ */ a(
367
+ /* @__PURE__ */ a(p, { mt: 2, children: /* @__PURE__ */ a(
350
368
  s,
351
369
  {
352
370
  name: "securityLevelId",
@@ -354,43 +372,44 @@ function ae(e, F) {
354
372
  required: !0
355
373
  },
356
374
  control: d,
357
- render: ({ field: { value: t, onChange: n }, fieldState: l }) => {
358
- var i, o;
359
- const r = (c) => {
375
+ render: ({ field: { value: t, onChange: n }, fieldState: i }) => {
376
+ var r, o;
377
+ const l = (c) => {
360
378
  n(c);
361
379
  };
362
380
  return /* @__PURE__ */ a(
363
- Z,
381
+ z,
364
382
  {
365
- value: t,
383
+ value: t || 0,
366
384
  ontologyId: e.ontologyId,
367
385
  appRoles: e.appRoles,
368
386
  securityLevels: e.securityLevels,
369
387
  minLevelId: e.minSecurityLevel,
370
- templateKeys: (i = e.securityLevelConfig) == null ? void 0 : i.templateKeys,
388
+ templateKeys: (r = e.securityLevelConfig) == null ? void 0 : r.templateKeys,
371
389
  templateType: (o = e.securityLevelConfig) == null ? void 0 : o.templateType,
372
- showError: !!l.error,
373
- onChange: r
390
+ showError: !!i.error,
391
+ variant: e.inputVariant,
392
+ onChange: l
374
393
  }
375
394
  );
376
395
  }
377
396
  }
378
397
  ) }),
379
- /* @__PURE__ */ f(T, { display: "flex", justifyContent: "space-between", mt: 3, children: [
398
+ /* @__PURE__ */ h(p, { display: "flex", justifyContent: "space-between", mt: 3, children: [
380
399
  /* @__PURE__ */ a(
381
- g,
400
+ y,
382
401
  {
383
402
  color: "primary",
384
403
  variant: "text",
385
404
  disabled: e.loading,
386
405
  sx: { textTransform: "none" },
387
- onClick: A,
406
+ onClick: B,
388
407
  children: "Cancel"
389
408
  }
390
409
  ),
391
- /* @__PURE__ */ f(T, { children: [
410
+ /* @__PURE__ */ h(p, { children: [
392
411
  e.onRemove !== void 0 && /* @__PURE__ */ a(
393
- g,
412
+ y,
394
413
  {
395
414
  type: "button",
396
415
  color: "error",
@@ -402,7 +421,7 @@ function ae(e, F) {
402
421
  }
403
422
  ),
404
423
  e.saveButtons ? e.saveButtons.map((t, n) => /* @__PURE__ */ a(
405
- g,
424
+ y,
406
425
  {
407
426
  type: "submit",
408
427
  color: "primary",
@@ -415,7 +434,7 @@ function ae(e, F) {
415
434
  },
416
435
  n
417
436
  )) : /* @__PURE__ */ a(
418
- g,
437
+ y,
419
438
  {
420
439
  type: "submit",
421
440
  color: "primary",
@@ -431,7 +450,7 @@ function ae(e, F) {
431
450
  }
432
451
  );
433
452
  }
434
- const ge = m.forwardRef(ae);
453
+ const ge = m.forwardRef(te);
435
454
  export {
436
455
  ge as InstanceForm
437
456
  };
@@ -0,0 +1,58 @@
1
+ import { jsx as r, Fragment as c, jsxs as m } from "react/jsx-runtime";
2
+ import { Accordion as d, AccordionSummary as u, AccordionDetails as g } from "./styled.js";
3
+ import { Typography as l, Chip as f } from "@mui/material";
4
+ import { ChevronRight as y } from "@mui/icons-material";
5
+ import { getPageIcon as I, getTemplateHierarchy as x } from "../../utils/ontology.js";
6
+ import { InstanceTable as b } from "../instance-table/index.js";
7
+ const W = ({
8
+ data: n,
9
+ templates: i,
10
+ ...s
11
+ }) => {
12
+ const h = (t) => t ? x(i, t).map((e) => e.name).join(" / ") : " ";
13
+ return !n || !n.results ? /* @__PURE__ */ r(c, {}) : n.results.map((t, o) => {
14
+ const e = i.get(t.templateId);
15
+ if (!e) return /* @__PURE__ */ r(c, {});
16
+ const a = I(i, e.id);
17
+ return /* @__PURE__ */ m(
18
+ d,
19
+ {
20
+ defaultExpanded: !0,
21
+ disableGutters: !0,
22
+ elevation: 0,
23
+ square: !0,
24
+ children: [
25
+ /* @__PURE__ */ m(u, { expandIcon: /* @__PURE__ */ r(y, {}), children: [
26
+ /* @__PURE__ */ r("img", { src: a, height: 22, style: { maxWidth: 22 } }),
27
+ /* @__PURE__ */ r(l, { fontWeight: "500", ml: 2, children: e.name }),
28
+ /* @__PURE__ */ r(
29
+ f,
30
+ {
31
+ color: "primary",
32
+ label: t.totalInstanceCount,
33
+ size: "small",
34
+ sx: { height: 20, ml: 1 }
35
+ }
36
+ ),
37
+ /* @__PURE__ */ r(l, { variant: "caption", ml: 2, children: h(e) })
38
+ ] }),
39
+ /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(
40
+ b,
41
+ {
42
+ data: t.instances.map((p) => ({
43
+ ...p,
44
+ templateId: e.id
45
+ })),
46
+ template: { ...e, icon: a },
47
+ ...s
48
+ }
49
+ ) })
50
+ ]
51
+ },
52
+ o
53
+ );
54
+ });
55
+ };
56
+ export {
57
+ W as InstanceHierarchyTable
58
+ };
@@ -0,0 +1,29 @@
1
+ import { styled as r } from "@mui/material";
2
+ import { A as e, a as i, b as n } from "../../AccordionDetails-CGs6GZQK.js";
3
+ const c = r(e)(({ theme: o }) => ({
4
+ borderBottom: `1px solid ${o.palette.divider}`,
5
+ "&:before": {
6
+ display: "none"
7
+ }
8
+ })), t = r(i)(({ theme: o }) => ({
9
+ flexDirection: "row-reverse",
10
+ paddingLeft: 0,
11
+ "& .MuiAccordionSummary-expandIconWrapper.Mui-expanded": {
12
+ transform: "rotate(90deg)"
13
+ },
14
+ "& .MuiAccordionSummary-content": {
15
+ marginLeft: o.spacing(1),
16
+ alignItems: "center"
17
+ }
18
+ })), p = r(n)(({ theme: o }) => ({
19
+ padding: o.spacing(2),
20
+ paddingTop: 0,
21
+ paddingBottom: 0,
22
+ borderTop: "1px solid rgba(0, 0, 0, .125)",
23
+ background: o.palette.grey[100]
24
+ }));
25
+ export {
26
+ c as Accordion,
27
+ p as AccordionDetails,
28
+ t as AccordionSummary
29
+ };