@hybridcore/ui 1.3.7 → 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 (126) 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 +1 -1
  36. package/dist/components/data-security-selectors/security-level/index.js +42 -40
  37. package/dist/components/date-time-picker/index.js +18 -19
  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 +3 -3
  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/icon-button/index.js +1 -1
  48. package/dist/components/icon-button/styled.js +0 -2
  49. package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/index.js +2 -2
  50. package/dist/components/instance-form/components/variable/index.js +19 -0
  51. package/dist/components/instance-form/components/variables/index.js +40 -0
  52. package/dist/components/{data-management/instance-form → instance-form}/index.js +106 -100
  53. package/dist/components/instance-hierarchy-table/index.js +58 -0
  54. package/dist/components/instance-hierarchy-table/styled.js +29 -0
  55. package/dist/components/instance-table/index.js +125 -0
  56. package/dist/components/instance-table/styled.js +13 -0
  57. package/dist/components/map/helpers/ol.js +1 -1
  58. package/dist/components/map/index.js +1 -1
  59. package/dist/components/map/logic.js +1 -1
  60. package/dist/components/map/styled.js +1 -1
  61. package/dist/components/phone-input/index.js +1 -1
  62. package/dist/components/property-mapping/index.js +558 -0
  63. package/dist/components/range-selector/components/composite-list-range/index.js +81 -0
  64. package/dist/components/range-selector/components/date-range/index.js +9 -0
  65. package/dist/components/range-selector/components/geometry-range/index.js +26 -0
  66. package/dist/components/range-selector/components/number-range/index.js +86 -0
  67. package/dist/components/range-selector/components/string-range/index.js +31 -0
  68. package/dist/components/range-selector/index.js +59 -0
  69. package/dist/components/search-input/index.js +4 -4
  70. package/dist/components/tabs/appleTabs.style.js +55 -0
  71. package/dist/components/tabs/index.js +93 -0
  72. package/dist/components/tabs/tab-panel.js +18 -0
  73. package/dist/components/template-form/components/catalogue-instance-selector/index.js +158 -0
  74. package/dist/components/template-form/components/property-list/index.js +72 -0
  75. package/dist/components/template-form/components/property-list/property-list-columns.js +125 -0
  76. package/dist/components/template-form/components/property-list/property-list-form.js +16 -0
  77. package/dist/components/template-form/components/property-list/property-list-logic.js +66 -0
  78. package/dist/components/template-form/components/property-list/types.js +8 -0
  79. package/dist/components/template-form/components/recognition-property-list/index.js +69 -0
  80. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +50 -0
  81. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +174 -0
  82. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-logic.js +64 -0
  83. package/dist/components/template-form/components/recognition-property-list/types.js +8 -0
  84. package/dist/components/template-form/components/select-icon/index.js +186 -0
  85. package/dist/components/template-form/components/select-icon/styled.js +76 -0
  86. package/dist/components/template-form/index.js +338 -0
  87. package/dist/components/template-property-filters/property.js +48 -46
  88. package/dist/components/tree-select/index.js +16 -15
  89. package/dist/components/tree-select/styled.js +2 -2
  90. package/dist/components/treeview-filter/index.js +8 -8
  91. package/dist/components/treeview-filter/item/index.js +1 -1
  92. package/dist/components/treeview-filter/item-label/index.js +18 -17
  93. package/dist/constants/index.js +41 -0
  94. package/dist/{createStyled-B96gjom1.js → createStyled-BzvgQjjR.js} +487 -464
  95. package/dist/createSvgIcon-Cfm1LkEe.js +73 -0
  96. package/dist/{createSvgIcon-BNrb7rDY.js → createSvgIcon-DEXLbMwp.js} +62 -90
  97. package/dist/dialog-v5-nL5yy.js +153 -0
  98. package/dist/{exactProp-CI_rjX83.js → exactProp-DkmnwNVS.js} +3 -3
  99. package/dist/extendSxProp-qqdkfHzS.js +30 -0
  100. package/dist/{index-CSfSVkKj.js → index-B0JPwFI9.js} +6 -5
  101. package/dist/index-C1fczHEW.js +11042 -0
  102. package/dist/{index-CJVcedWy.js → index-DPf5olog.js} +29 -27
  103. package/dist/{index-JrtqxUdI.js → index-DlnzUkwe.js} +1 -1
  104. package/dist/{listItemTextClasses-CFiI_U7B.js → listItemTextClasses-DsHGzpPM.js} +2 -2
  105. package/dist/main.d.ts +561 -78
  106. package/dist/main.js +157 -157
  107. package/dist/{ol-BUKJ1urU.js → ol-CHaVTXvL.js} +24 -24
  108. package/dist/property-list-form-BfP9gzSo.js +391 -0
  109. package/dist/requirePropFactory-BjhhI-AW.js +18 -0
  110. package/dist/{styled-cPJbqF0E.js → styled-LNCprp4n.js} +24 -22
  111. package/dist/unsupportedProp-BuVD30Gh.js +9 -0
  112. package/dist/useControlled-BYdyS7Pn.js +31 -0
  113. package/dist/{useTheme-C-T6Qisa.js → useTheme-DBiahn6p.js} +2 -2
  114. package/dist/{useThemeProps-DeftUmqJ.js → useThemeProps-uYx_RkOH.js} +16 -14
  115. package/dist/utils/ontology.js +52 -30
  116. package/dist/{utils-CCkxV0lZ.js → utils-DNe_YYjm.js} +16 -16
  117. package/package.json +2 -1
  118. package/dist/DialogContent-BCYm_d1s.js +0 -864
  119. package/dist/FormControlLabel-DENNVXWL.js +0 -639
  120. package/dist/Typography-Dg-ROiTA.js +0 -201
  121. package/dist/components/data-management/instance-form/components/variable/index.js +0 -17
  122. package/dist/components/data-management/instance-form/components/variables/index.js +0 -41
  123. package/dist/createSvgIcon-B2WT0K4k.js +0 -87
  124. package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/styled.js +0 -0
  125. package/dist/components/{data-management/instance-form → instance-form}/components/policy-list/index.js +0 -0
  126. package/dist/{extends-Cyw62AD_.js → objectWithoutPropertiesLoose-BK36oJDi.js} +9 -9
@@ -5,7 +5,6 @@ const r = o(n)(({ theme: t, color: i }) => ({
5
5
  flexDirection: "column",
6
6
  width: 130,
7
7
  height: 140,
8
- // @ts-ignore
9
8
  color: i ? t.palette.text.primary : "inherit",
10
9
  borderRadius: 10,
11
10
  transition: "all .3s",
@@ -24,7 +23,6 @@ const r = o(n)(({ theme: t, color: i }) => ({
24
23
  },
25
24
  "&:hover": {
26
25
  boxShadow: t.shadows[4],
27
- // @ts-ignore
28
26
  color: i ? t.palette.text.primary : "inherit",
29
27
  "&:after": {
30
28
  opacity: 1
@@ -2,8 +2,8 @@ import "react/jsx-runtime";
2
2
  import "@mui/material";
3
3
  import "./styled.js";
4
4
  import "@mui/icons-material";
5
- import "../../../../../hooks/useToggle.js";
6
- import { C as l } from "../../../../../index-CJVcedWy.js";
5
+ import "../../../../hooks/useToggle.js";
6
+ import { C as l } from "../../../../index-DPf5olog.js";
7
7
  import "react";
8
8
  import "lodash";
9
9
  import "dayjs";
@@ -0,0 +1,19 @@
1
+ import "react/jsx-runtime";
2
+ import "lodash";
3
+ import "dayjs";
4
+ import { V as g } from "../../../../index-DPf5olog.js";
5
+ import "@mui/material";
6
+ import "@mui/icons-material";
7
+ import "../../../geometry-picker/index.js";
8
+ import "../../../phone-input/index.js";
9
+ import "../../../date-time-picker/index.js";
10
+ import "../../../../TextField-D87qTh1k.js";
11
+ import "../../../../Box-BPyg-Ybm.js";
12
+ import "../../../../FormControlLabel-D9KFjcIx.js";
13
+ import "../../../../Checkbox-qy3cjvnb.js";
14
+ import "../../../../InputLabel-CWkW8NtU.js";
15
+ import "../../../../Select-ClaBvSqf.js";
16
+ import "../../../../MenuItem-D-INSvZa.js";
17
+ export {
18
+ g as default
19
+ };
@@ -0,0 +1,40 @@
1
+ import { jsx as n, Fragment as t } from "react/jsx-runtime";
2
+ import l from "react";
3
+ import { V as p } from "../../../../index-DPf5olog.js";
4
+ import m from "lodash";
5
+ function b({
6
+ template: o,
7
+ value: i,
8
+ mapboxAccessToken: s,
9
+ variant: a = "outlined",
10
+ onChange: u
11
+ }) {
12
+ const d = l.useMemo(() => {
13
+ let r = o == null ? void 0 : o.properties.filter((e) => e.visible);
14
+ return r = m.orderBy(r, "id"), r;
15
+ }, [o]), f = (r) => {
16
+ const e = {
17
+ target: {
18
+ value: { ...i, ...r }
19
+ }
20
+ };
21
+ u(e);
22
+ };
23
+ return o === void 0 ? /* @__PURE__ */ n(t, {}) : /* @__PURE__ */ n(t, { children: d.map((r, e) => {
24
+ const c = i[r.propertyId];
25
+ return /* @__PURE__ */ n(
26
+ p,
27
+ {
28
+ property: r,
29
+ value: c,
30
+ mapboxAccessToken: s,
31
+ variant: a,
32
+ onChange: f
33
+ },
34
+ e
35
+ );
36
+ }) });
37
+ }
38
+ export {
39
+ b as default
40
+ };
@@ -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 V, Box as T, Button as y } 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, S) {
28
+ function te(e, S) {
29
29
  const {
30
30
  register: C,
31
31
  handleSubmit: E,
32
32
  control: d,
33
33
  formState: { errors: F },
34
34
  getValues: x,
35
- setValue: v,
35
+ setValue: b,
36
36
  reset: k
37
- } = M({
37
+ } = W({
38
38
  defaultValues: e.defaultValues
39
- }), [R, _] = m.useState([]), [b, 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,31 +44,30 @@ function ae(e, S) {
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
- (i) => i.privacyPreservationMethod === "ENCRYPTION"
49
+ const i = n.properties.filter(
50
+ (l) => l.privacyPreservationMethod === "ENCRYPTION"
52
51
  );
53
- if (l.length > 0)
54
- for (let i = 0; i < l.length; i++) {
55
- const r = l[i], o = W.get(t, `variables.${r.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 && (v(`variables.${r.propertyId}`, u.data), w((g) => g + 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 p = () => {
63
+ const T = () => {
65
64
  const t = x("templateId");
66
- b && 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
  };
@@ -79,39 +78,39 @@ function ae(e, S) {
79
78
  description: "",
80
79
  templateId: 0,
81
80
  variables: {}
82
- }), p();
81
+ }), T();
83
82
  },
84
83
  setFormValue(t, n) {
85
- v(t, n);
84
+ b(t, n);
86
85
  },
87
86
  getFormValue(t) {
88
87
  return x(t);
89
88
  }
90
- })), m.useEffect(() => (p(), () => {
89
+ })), m.useEffect(() => (T(), () => {
91
90
  }), [e.mappedTemplates]), m.useEffect(() => {
92
- e.onSelectedTemplateChange && e.onSelectedTemplateChange(b);
93
- }, [b]);
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
116
  variant: e.inputVariant,
@@ -125,7 +124,7 @@ function ae(e, S) {
125
124
  }
126
125
  ),
127
126
  /* @__PURE__ */ a(
128
- h,
127
+ v,
129
128
  {
130
129
  label: "Description",
131
130
  variant: e.inputVariant,
@@ -135,41 +134,41 @@ function ae(e, S) {
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
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,
163
+ disabled: A,
165
164
  variant: e.inputVariant,
166
- onChange: (l, i) => {
165
+ onChange: (i, l) => {
167
166
  const r = {
168
167
  target: {
169
- value: i ? Number(l) : 0
168
+ value: l ? Number(i) : 0
170
169
  }
171
170
  };
172
- n(r), p();
171
+ n(r), T();
173
172
  }
174
173
  }
175
174
  );
@@ -181,17 +180,17 @@ function ae(e, S) {
181
180
  {
182
181
  name: "aliasList",
183
182
  control: d,
184
- render: ({ field: { value: t, onChange: n, ...l } }) => {
185
- const i = (r) => {
183
+ render: ({ field: { value: t, onChange: n, ...i } }) => {
184
+ const l = (r) => {
186
185
  const u = {
187
186
  target: {
188
- value: r.target.value.split(",").map((g) => g.trimStart())
187
+ value: r.target.value.split(",").map((f) => f.trimStart())
189
188
  }
190
189
  };
191
190
  n(u);
192
191
  };
193
192
  return /* @__PURE__ */ a(
194
- h,
193
+ v,
195
194
  {
196
195
  label: "Alias List",
197
196
  variant: e.inputVariant,
@@ -199,8 +198,8 @@ function ae(e, S) {
199
198
  value: t,
200
199
  sx: { mb: 2 },
201
200
  helperText: "Add list values with the comma (,) separated string",
202
- onChange: i,
203
- ...l
201
+ onChange: l,
202
+ ...i
204
203
  }
205
204
  );
206
205
  }
@@ -212,10 +211,10 @@ function ae(e, S) {
212
211
  name: "appliedPolicies",
213
212
  control: d,
214
213
  render: ({ field: { value: t, onChange: n } }) => /* @__PURE__ */ a(
215
- Q,
214
+ $,
216
215
  {
217
216
  policyList: e.policyList,
218
- value: t,
217
+ value: t || void 0,
219
218
  onChange: n
220
219
  }
221
220
  )
@@ -227,37 +226,37 @@ function ae(e, S) {
227
226
  name: "variables",
228
227
  control: d,
229
228
  render: ({ field: { value: t, onChange: n } }) => /* @__PURE__ */ a(
230
- X,
229
+ Q,
231
230
  {
232
- template: b,
231
+ template: g,
233
232
  value: t,
234
- mapboxAccessToken: "",
233
+ mapboxAccessToken: e.mapboxAccessToken,
235
234
  variant: e.inputVariant,
236
235
  onChange: n
237
236
  }
238
237
  )
239
238
  }
240
239
  ),
241
- "fileInBase64" in e.defaultValues && /* @__PURE__ */ f(P, { children: [
240
+ "fileInBase64" in e.defaultValues && /* @__PURE__ */ h(D, { children: [
242
241
  /* @__PURE__ */ a(
243
242
  s,
244
243
  {
245
244
  name: "fileInBase64",
246
245
  control: d,
247
- render: ({ field: { value: t, onChange: n, ...l } }) => {
248
- const i = (r) => {
249
- if (r.target.files) {
250
- const o = new FileReader();
251
- o.onload = async (u) => {
252
- const D = u.target.result.split("base64,")[1];
253
- n(D);
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);
254
253
  };
255
- const c = r.target.files[0];
256
- v("originalFileName", c.name), v("contentType", c.type), o.readAsDataURL(c);
254
+ const o = l.target.files[0];
255
+ b("originalFileName", o.name), b("contentType", o.type), r.readAsDataURL(o);
257
256
  }
258
257
  };
259
258
  return /* @__PURE__ */ a(
260
- h,
259
+ v,
261
260
  {
262
261
  type: "file",
263
262
  label: "File to Upload",
@@ -267,7 +266,7 @@ function ae(e, S) {
267
266
  helperText: "Select a file to upload",
268
267
  InputLabelProps: { shrink: !0 },
269
268
  onChange: i,
270
- ...l
269
+ ...n
271
270
  }
272
271
  );
273
272
  }
@@ -279,14 +278,14 @@ function ae(e, S) {
279
278
  name: "type",
280
279
  control: d,
281
280
  render: ({ field: { value: t, onChange: n } }) => {
282
- const l = (i) => {
281
+ const i = (l) => {
283
282
  const {
284
283
  target: { value: r }
285
- } = i;
284
+ } = l;
286
285
  n(r);
287
286
  };
288
- return /* @__PURE__ */ f(
289
- q,
287
+ return /* @__PURE__ */ h(
288
+ j,
290
289
  {
291
290
  fullWidth: !0,
292
291
  sx: {
@@ -294,8 +293,15 @@ function ae(e, S) {
294
293
  },
295
294
  variant: e.inputVariant,
296
295
  children: [
297
- /* @__PURE__ */ a(H, { children: "Type" }),
298
- /* @__PURE__ */ a(Y, { value: t, onChange: l, children: te.map((i) => /* @__PURE__ */ a(J, { value: i, children: i }, i)) })
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
+ )
299
305
  ]
300
306
  }
301
307
  );
@@ -341,16 +347,16 @@ function ae(e, S) {
341
347
  required: !0
342
348
  },
343
349
  control: d,
344
- render: ({ field: { value: t, onChange: n }, fieldState: l }) => {
345
- const i = t || [], r = (o) => {
350
+ render: ({ field: { value: t, onChange: n }, fieldState: i }) => {
351
+ const l = t || [], r = (o) => {
346
352
  n(o);
347
353
  };
348
354
  return /* @__PURE__ */ a(
349
- z,
355
+ X,
350
356
  {
351
- selectedIds: i,
357
+ selectedIds: l,
352
358
  memberedGroups: e.memberedGroups,
353
- showError: !!l.error,
359
+ showError: !!i.error,
354
360
  variant: e.inputVariant,
355
361
  onChange: r
356
362
  }
@@ -358,7 +364,7 @@ function ae(e, S) {
358
364
  }
359
365
  }
360
366
  ),
361
- /* @__PURE__ */ a(T, { mt: 2, children: /* @__PURE__ */ a(
367
+ /* @__PURE__ */ a(p, { mt: 2, children: /* @__PURE__ */ a(
362
368
  s,
363
369
  {
364
370
  name: "securityLevelId",
@@ -366,30 +372,30 @@ function ae(e, S) {
366
372
  required: !0
367
373
  },
368
374
  control: d,
369
- render: ({ field: { value: t, onChange: n }, fieldState: l }) => {
375
+ render: ({ field: { value: t, onChange: n }, fieldState: i }) => {
370
376
  var r, o;
371
- const i = (c) => {
377
+ const l = (c) => {
372
378
  n(c);
373
379
  };
374
380
  return /* @__PURE__ */ a(
375
- Z,
381
+ z,
376
382
  {
377
- value: t,
383
+ value: t || 0,
378
384
  ontologyId: e.ontologyId,
379
385
  appRoles: e.appRoles,
380
386
  securityLevels: e.securityLevels,
381
387
  minLevelId: e.minSecurityLevel,
382
388
  templateKeys: (r = e.securityLevelConfig) == null ? void 0 : r.templateKeys,
383
389
  templateType: (o = e.securityLevelConfig) == null ? void 0 : o.templateType,
384
- showError: !!l.error,
390
+ showError: !!i.error,
385
391
  variant: e.inputVariant,
386
- onChange: i
392
+ onChange: l
387
393
  }
388
394
  );
389
395
  }
390
396
  }
391
397
  ) }),
392
- /* @__PURE__ */ f(T, { display: "flex", justifyContent: "space-between", mt: 3, children: [
398
+ /* @__PURE__ */ h(p, { display: "flex", justifyContent: "space-between", mt: 3, children: [
393
399
  /* @__PURE__ */ a(
394
400
  y,
395
401
  {
@@ -397,11 +403,11 @@ function ae(e, S) {
397
403
  variant: "text",
398
404
  disabled: e.loading,
399
405
  sx: { textTransform: "none" },
400
- onClick: A,
406
+ onClick: B,
401
407
  children: "Cancel"
402
408
  }
403
409
  ),
404
- /* @__PURE__ */ f(T, { children: [
410
+ /* @__PURE__ */ h(p, { children: [
405
411
  e.onRemove !== void 0 && /* @__PURE__ */ a(
406
412
  y,
407
413
  {
@@ -444,7 +450,7 @@ function ae(e, S) {
444
450
  }
445
451
  );
446
452
  }
447
- const ye = m.forwardRef(ae);
453
+ const ge = m.forwardRef(te);
448
454
  export {
449
- ye as InstanceForm
455
+ ge as InstanceForm
450
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
+ };