@hybridcore/ui 1.5.45 → 1.5.47

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,11 +1,11 @@
1
- import { jsx as o, Fragment as D, jsxs as j } from "react/jsx-runtime";
2
- import { useState as B, useMemo as $ } from "react";
1
+ import { jsx as a, Fragment as D, jsxs as Y } from "react/jsx-runtime";
2
+ import { useMemo as j } from "react";
3
3
  import { DataGrid as N } from "@mui/x-data-grid";
4
- import { ButtonBase as k, Box as A } from "@mui/material";
5
- import { DataGridActions as E } from "./styled.js";
6
- import P from "dayjs";
7
- import T from "lodash";
8
- const U = ({
4
+ import { ButtonBase as B, Box as S } from "@mui/material";
5
+ import { DataGridActions as $ } from "./styled.js";
6
+ import k from "dayjs";
7
+ import A from "lodash";
8
+ const K = ({
9
9
  template: l,
10
10
  data: h,
11
11
  selectedIds: R = [],
@@ -17,8 +17,8 @@ const U = ({
17
17
  onSelect: d,
18
18
  onTitleClick: y
19
19
  }) => {
20
- const [F, H] = B(R), S = $(() => {
21
- var w, g, s, v, b, x, C, I;
20
+ const F = j(() => {
21
+ var w, g, v, b, s, x, C, I;
22
22
  return [
23
23
  ...(w = e == null ? void 0 : e.templateIcon) != null && w.hidden ? [] : [
24
24
  {
@@ -28,17 +28,17 @@ const U = ({
28
28
  filterable: !1,
29
29
  align: "center",
30
30
  width: 30,
31
- renderCell: (g = e == null ? void 0 : e.templateIcon) != null && g.renderCell ? (s = e == null ? void 0 : e.templateIcon) == null ? void 0 : s.renderCell : () => l ? /* @__PURE__ */ o(
31
+ renderCell: (g = e == null ? void 0 : e.templateIcon) != null && g.renderCell ? (v = e == null ? void 0 : e.templateIcon) == null ? void 0 : v.renderCell : () => l ? /* @__PURE__ */ a(
32
32
  "img",
33
33
  {
34
34
  src: l.icon,
35
35
  height: 20,
36
36
  style: { display: "inline", maxWidth: 20 }
37
37
  }
38
- ) : /* @__PURE__ */ o(D, {})
38
+ ) : /* @__PURE__ */ a(D, {})
39
39
  }
40
40
  ],
41
- ...(v = e == null ? void 0 : e.title) != null && v.hidden ? [] : [
41
+ ...(b = e == null ? void 0 : e.title) != null && b.hidden ? [] : [
42
42
  {
43
43
  field: "title",
44
44
  headerName: "Title",
@@ -46,10 +46,10 @@ const U = ({
46
46
  sortable: !1,
47
47
  filterable: !1,
48
48
  valueGetter: (r) => r.row.title,
49
- renderCell: (b = e == null ? void 0 : e.title) != null && b.renderCell ? (x = e == null ? void 0 : e.title) == null ? void 0 : x.renderCell : (r) => {
49
+ renderCell: (s = e == null ? void 0 : e.title) != null && s.renderCell ? (x = e == null ? void 0 : e.title) == null ? void 0 : x.renderCell : (r) => {
50
50
  const { row: t, value: c } = r;
51
- return y ? /* @__PURE__ */ o(
52
- k,
51
+ return y ? /* @__PURE__ */ a(
52
+ B,
53
53
  {
54
54
  onClick: () => y(t),
55
55
  sx: { "&:hover": { textDecoration: "underline" } },
@@ -85,21 +85,21 @@ const U = ({
85
85
  sortable: !1,
86
86
  filterable: !1,
87
87
  width: 150,
88
- valueFormatter: (n) => n.value && r.type === "date" ? P(n.value).format("DD/MM/YYYY HH:mm") : n.value,
89
- valueGetter: (n) => T.get(n.row, t),
88
+ valueFormatter: (n) => n.value && r.type === "date" ? k(n.value).format("DD/MM/YYYY HH:mm") : n.value,
89
+ valueGetter: (n) => A.get(n.row, t),
90
90
  renderCell: e && ((c = e[r.propertyId]) == null ? void 0 : c.renderCell)
91
91
  };
92
92
  })
93
93
  ] : []
94
94
  ];
95
- }, [l]), Y = (a) => {
96
- H(a), d && d(a);
95
+ }, [l]), H = (o) => {
96
+ d && d(o);
97
97
  };
98
- return /* @__PURE__ */ j(A, { position: "relative", children: [
99
- /* @__PURE__ */ o(
98
+ return /* @__PURE__ */ Y(S, { position: "relative", children: [
99
+ /* @__PURE__ */ a(
100
100
  N,
101
101
  {
102
- columns: S,
102
+ columns: F,
103
103
  rows: h,
104
104
  autoHeight: !0,
105
105
  density: "compact",
@@ -109,16 +109,16 @@ const U = ({
109
109
  marginRight: u ? `${m}px` : 0
110
110
  }
111
111
  },
112
- getRowId: (a) => a.id,
112
+ getRowId: (o) => o.id,
113
113
  hideFooterPagination: !0,
114
114
  hideFooter: !0,
115
115
  checkboxSelection: M,
116
- rowSelectionModel: F,
117
- onRowSelectionModelChange: Y,
116
+ rowSelectionModel: R,
117
+ onRowSelectionModelChange: H,
118
118
  keepNonExistentRowsSelected: !0
119
119
  }
120
120
  ),
121
- u !== void 0 && /* @__PURE__ */ o(E, { width: m, children: /* @__PURE__ */ o(
121
+ u !== void 0 && /* @__PURE__ */ a($, { width: m, children: /* @__PURE__ */ a(
122
122
  N,
123
123
  {
124
124
  columns: [
@@ -136,13 +136,13 @@ const U = ({
136
136
  hideFooter: !0,
137
137
  sx: { border: "none" },
138
138
  slots: {
139
- noRowsOverlay: () => /* @__PURE__ */ o(D, {})
139
+ noRowsOverlay: () => /* @__PURE__ */ a(D, {})
140
140
  },
141
- getRowId: (a) => a.id
141
+ getRowId: (o) => o.id
142
142
  }
143
143
  ) })
144
144
  ] });
145
145
  };
146
146
  export {
147
- U as InstanceTable
147
+ K as InstanceTable
148
148
  };
@@ -1,41 +1,41 @@
1
- import { jsxs as c, jsx as i, Fragment as b } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as i, Fragment as b } from "react/jsx-runtime";
2
2
  import { CloseOutlined as le, ChevronRight as ie, ErrorOutline as ne, Check as oe, Refresh as ae } from "@mui/icons-material";
3
- import { Dialog as de, DialogTitle as se, Box as m, Typography as $, TextField as D, IconButton as W, DialogContent as pe, DialogActions as ce, Button as V, FormControl as _, Select as H, MenuItem as A } from "@mui/material";
3
+ import { Dialog as de, DialogTitle as pe, Box as m, Typography as $, TextField as R, IconButton as J, DialogContent as se, DialogActions as ce, Button as W, FormControl as V, Select as _, MenuItem as A } from "@mui/material";
4
4
  import { DataGrid as fe } from "@mui/x-data-grid";
5
- import { useState as P, useEffect as ue } from "react";
5
+ import { useState as H, useEffect as ue } from "react";
6
6
  import h from "lodash";
7
7
  import { d as ye } from "../../ol-lGwSyEIV.js";
8
8
  import { V as he } from "../../index-OtGK6phq.js";
9
9
  import { RangeSelector as me } from "../range-selector/index.js";
10
10
  const $e = ({
11
- open: I,
12
- data: K,
11
+ open: F,
12
+ data: P,
13
13
  objectTemplate: q,
14
14
  agent: a,
15
15
  enableValueInput: T,
16
- loading: E,
17
- agentTemplates: j,
16
+ loading: B,
17
+ agentTemplates: K,
18
18
  catalogueInstances: v,
19
- objectInstance: O,
19
+ objectInstance: I,
20
20
  disableCatalogueSource: G,
21
21
  disableObjectSource: U,
22
22
  scenario: C,
23
- mapboxAccessToken: z,
23
+ mapboxAccessToken: E,
24
24
  onSubmit: M,
25
- onClose: N
25
+ onClose: O
26
26
  }) => {
27
- const [k, F] = P(K), [L, B] = P(/* @__PURE__ */ new Map());
28
- ue(() => (B(/* @__PURE__ */ new Map()), I && F(K), () => {
29
- }), [I]);
27
+ const [k, j] = H(P), [L, N] = H(/* @__PURE__ */ new Map());
28
+ ue(() => (N(/* @__PURE__ */ new Map()), () => {
29
+ }), [F]);
30
30
  const Q = () => {
31
31
  a ? M(a, !0) : M(k);
32
- }, R = (n) => {
33
- const { name: d, value: s } = n.target;
34
- let o = s;
32
+ }, D = (n) => {
33
+ const { name: d, value: p } = n.target;
34
+ let o = p;
35
35
  d === "criticalityScore" && (o = o.replace(",", "."), o = o.replace(/[^\d.-]+/g, "")), X(d)(o);
36
36
  }, X = (n) => (d) => {
37
37
  a && M({ ...a, [n]: d });
38
- }, S = (n, d, s, o) => (r) => {
38
+ }, S = (n, d, p, o) => (r) => {
39
39
  if (a) {
40
40
  let t = [...a.propertyInfoMap];
41
41
  const e = t.findIndex(
@@ -46,17 +46,17 @@ const $e = ({
46
46
  t.splice(e, 1, {
47
47
  ...t[e],
48
48
  value: l,
49
- source: s ? s || "" : t[e].source,
49
+ source: p ? p || "" : t[e].source,
50
50
  sourceField: o !== void 0 ? o || "" : t[e].sourceField
51
51
  }), M && M({ ...a, propertyInfoMap: t });
52
52
  }
53
53
  }
54
54
  }, Y = (n) => () => {
55
- const { policyKey: d, key: s, source: o, sourceField: r } = n;
55
+ const { policyKey: d, key: p, source: o, sourceField: r } = n;
56
56
  let t = "";
57
57
  if (o === "OBJECT")
58
58
  t = h.get(
59
- O,
59
+ I,
60
60
  `variables.${n.dataType.type}.${r}`
61
61
  );
62
62
  else if (o) {
@@ -70,25 +70,25 @@ const $e = ({
70
70
  v
71
71
  );
72
72
  }
73
- t && (S(d, s)({ value: t }), B((e) => {
73
+ t && (S(d, p)({ value: t }), N((e) => {
74
74
  const l = new Map(e);
75
75
  return l.set(
76
- `${h.get(a, "referenceObjectInstanceId")}:${d}:${s}`,
76
+ `${h.get(a, "referenceObjectInstanceId")}:${d}:${p}`,
77
77
  "Updated"
78
78
  ), l;
79
79
  }), setTimeout(() => {
80
- B((e) => {
80
+ N((e) => {
81
81
  const l = new Map(e);
82
82
  return l.set(
83
83
  `${h.get(
84
84
  a,
85
85
  "referenceObjectInstanceId"
86
- )}:${d}:${s}`,
86
+ )}:${d}:${p}`,
87
87
  "Default"
88
88
  ), l;
89
89
  });
90
90
  }, 2e3));
91
- }, Z = (n, d) => (s) => {
91
+ }, Z = (n, d) => (p) => {
92
92
  if (a) {
93
93
  let o = [...a.propertyInfoMap];
94
94
  const r = o.findIndex(
@@ -96,14 +96,14 @@ const $e = ({
96
96
  );
97
97
  o[r] && (o.splice(r, 1, {
98
98
  ...o[r],
99
- randomInfo: s
99
+ randomInfo: p
100
100
  }), M && M({ ...a, propertyInfoMap: o }));
101
101
  }
102
102
  }, ee = (n) => (d) => {
103
- const s = d.target.name;
103
+ const p = d.target.name;
104
104
  let o = [...k];
105
105
  const r = o[n], t = r.propertyMappings.findIndex(
106
- (l) => l.key === s
106
+ (l) => l.key === p
107
107
  ), e = r.propertyMappings[t];
108
108
  h.set(
109
109
  o,
@@ -113,31 +113,31 @@ const $e = ({
113
113
  o,
114
114
  `${n}.propertyMappings.${t}.sourceField`,
115
115
  ""
116
- ), F(o), a && S(
116
+ ), j(o), a && S(
117
117
  r.key,
118
118
  e.key,
119
119
  String(d.target.value),
120
120
  ""
121
121
  )({ value: "" });
122
122
  }, re = (n) => (d) => {
123
- const s = d.target.name;
123
+ const p = d.target.name;
124
124
  let o = [...k];
125
125
  const r = o[n], t = r.propertyMappings.findIndex(
126
- (l) => l.key === s
126
+ (l) => l.key === p
127
127
  ), e = r.propertyMappings[t];
128
128
  if (h.set(
129
129
  o,
130
130
  `${n}.propertyMappings.${t}.sourceField`,
131
131
  d.target.value
132
- ), F(o), T && a) {
132
+ ), j(o), T && a) {
133
133
  const l = h.get(
134
134
  o,
135
135
  `${n}.propertyMappings.${t}.source`
136
136
  );
137
137
  if (l === "OBJECT") {
138
- if (O) {
138
+ if (I) {
139
139
  const u = h.get(
140
- O.variables,
140
+ I.variables,
141
141
  `${e.dataType.type}.${d.target.value}`
142
142
  ) || "";
143
143
  S(
@@ -170,7 +170,7 @@ const $e = ({
170
170
  }
171
171
  }
172
172
  }, te = (n, d) => {
173
- let s = {
173
+ let p = {
174
174
  field: "value",
175
175
  headerName: "Value",
176
176
  sortable: !1,
@@ -180,39 +180,39 @@ const $e = ({
180
180
  renderCell: (r) => {
181
181
  var x, g;
182
182
  const { key: t, dataType: e } = r.row;
183
- let l = "", u = /* @__PURE__ */ i(b, {}), y = /* @__PURE__ */ i(b, {}), p = r.row.source;
183
+ let l = "", u = /* @__PURE__ */ i(b, {}), y = /* @__PURE__ */ i(b, {}), s = r.row.source;
184
184
  if (T && a) {
185
- const f = a.propertyInfoMap.find(
185
+ const c = a.propertyInfoMap.find(
186
186
  (w) => w.key === t && w.policyKey === n.key
187
187
  );
188
- if (f) {
189
- const { valid: w, validationErrors: J } = f;
190
- l = f.value, p = f.source, w === !1 && (u = /* @__PURE__ */ i(
188
+ if (c) {
189
+ const { valid: w, validationErrors: z } = c;
190
+ l = c.value, s = c.source, w === !1 && (u = /* @__PURE__ */ i(
191
191
  ne,
192
192
  {
193
193
  color: "error",
194
194
  fontSize: "small",
195
195
  sx: { ml: 1 },
196
- titleAccess: J ? J.join(", ") : "Value is not valid!"
196
+ titleAccess: z ? z.join(", ") : "Value is not valid!"
197
197
  }
198
- )), p && (L.get(
199
- `${h.get(a, "referenceObjectInstanceId")}:${f.policyKey}:${f.key}`
198
+ )), s && (L.get(
199
+ `${h.get(a, "referenceObjectInstanceId")}:${c.policyKey}:${c.key}`
200
200
  ) === "Updated" ? y = /* @__PURE__ */ i(oe, { color: "success", sx: { mr: 1 }, titleAccess: "Updated" }) : y = /* @__PURE__ */ i(
201
- W,
201
+ J,
202
202
  {
203
- onClick: Y(f),
204
- title: `Reload value from the ${p === "OBJECT" ? "Object" : "Catalogue"}`,
203
+ onClick: Y(c),
204
+ title: `Reload value from the ${s === "OBJECT" ? "Object" : "Catalogue"}`,
205
205
  children: /* @__PURE__ */ i(ae, {})
206
206
  }
207
207
  ));
208
208
  }
209
- if (p === "STATIC") {
209
+ if (s === "STATIC") {
210
210
  const w = (x = C == null ? void 0 : C.environment.context) != null && x.boundingBox ? ye(C.environment.context.boundingBox) : void 0;
211
- return /* @__PURE__ */ c(b, { children: [
211
+ return /* @__PURE__ */ f(b, { children: [
212
212
  /* @__PURE__ */ i(
213
213
  he,
214
214
  {
215
- mapboxAccessToken: z,
215
+ mapboxAccessToken: E,
216
216
  property: {
217
217
  propertyId: "value",
218
218
  type: e.type,
@@ -231,24 +231,24 @@ const $e = ({
231
231
  u
232
232
  ] });
233
233
  }
234
- if (p === "RANDOM" || p === "SMART_RANDOM")
235
- return /* @__PURE__ */ c(b, { children: [
234
+ if (s === "RANDOM" || s === "SMART_RANDOM")
235
+ return /* @__PURE__ */ f(b, { children: [
236
236
  /* @__PURE__ */ i(
237
237
  me,
238
238
  {
239
239
  type: e.type,
240
- value: f == null ? void 0 : f.randomInfo,
240
+ value: c == null ? void 0 : c.randomInfo,
241
241
  innerType: (g = e.innerType) == null ? void 0 : g.type,
242
242
  minDate: C ? C.startTime : "",
243
243
  maxDate: C ? C.endTime : "",
244
- mapboxAccessToken: z,
244
+ mapboxAccessToken: E,
245
245
  onChange: Z(n.key, t)
246
246
  }
247
247
  ),
248
248
  u
249
249
  ] });
250
250
  }
251
- return h.isArray(l) && (l = l.join(", ")), /* @__PURE__ */ c(
251
+ return h.isArray(l) && (l = l.join(", ")), /* @__PURE__ */ f(
252
252
  m,
253
253
  {
254
254
  display: "flex",
@@ -256,7 +256,7 @@ const $e = ({
256
256
  alignItems: "center",
257
257
  width: "100%",
258
258
  children: [
259
- /* @__PURE__ */ c(m, { flex: 1, children: [
259
+ /* @__PURE__ */ f(m, { flex: 1, children: [
260
260
  l,
261
261
  u
262
262
  ] }),
@@ -274,7 +274,7 @@ const $e = ({
274
274
  filterable: !1,
275
275
  disableColumnMenu: !0,
276
276
  flex: 1,
277
- renderCell: (r) => /* @__PURE__ */ c(
277
+ renderCell: (r) => /* @__PURE__ */ f(
278
278
  m,
279
279
  {
280
280
  sx: {
@@ -339,8 +339,8 @@ const $e = ({
339
339
  );
340
340
  e && (t = e.source || "");
341
341
  }
342
- return /* @__PURE__ */ i(_, { fullWidth: !0, size: "small", children: /* @__PURE__ */ c(
343
- H,
342
+ return /* @__PURE__ */ i(V, { fullWidth: !0, size: "small", children: /* @__PURE__ */ f(
343
+ _,
344
344
  {
345
345
  onChange: ee(d),
346
346
  name: String(r.id),
@@ -365,43 +365,43 @@ const $e = ({
365
365
  const { dataType: t } = r.row;
366
366
  let e = r.row.source, l = r.row.sourceField;
367
367
  if (a) {
368
- const p = a.propertyInfoMap.find(
368
+ const s = a.propertyInfoMap.find(
369
369
  (x) => x.policyKey === n.key && x.key === r.id
370
370
  );
371
- p && (e = p.source, l = p.sourceField || "");
371
+ s && (e = s.source, l = s.sourceField || "");
372
372
  }
373
373
  let u = l || "";
374
374
  if (e === "RANDOM" || e === "STATIC" || e === "SMART_RANDOM")
375
375
  return /* @__PURE__ */ i(b, {});
376
376
  let y = [];
377
377
  if (e === "OBJECT")
378
- y = q.properties.map((p) => ({
379
- value: p.propertyId,
380
- text: p.name
378
+ y = q.properties.map((s) => ({
379
+ value: s.propertyId,
380
+ text: s.name
381
381
  }));
382
382
  else if (e !== null) {
383
- const p = Number(e), x = v == null ? void 0 : v.find(
384
- (g) => g.id === p
383
+ const s = Number(e), x = v == null ? void 0 : v.find(
384
+ (g) => g.id === s
385
385
  );
386
- if (x && j) {
387
- const g = j.find(
388
- (f) => f.templateKey === x.template.templateKey
386
+ if (x && K) {
387
+ const g = K.find(
388
+ (c) => c.templateKey === x.template.templateKey
389
389
  );
390
- g && (y = g.properties.map((f) => ({
391
- value: f.propertyId,
392
- text: f.name
390
+ g && (y = g.properties.filter((c) => c.type === t.type).map((c) => ({
391
+ value: c.propertyId,
392
+ text: c.name
393
393
  })));
394
394
  }
395
395
  }
396
- return /* @__PURE__ */ i(_, { fullWidth: !0, size: "small", children: /* @__PURE__ */ c(
397
- H,
396
+ return /* @__PURE__ */ i(V, { fullWidth: !0, size: "small", children: /* @__PURE__ */ f(
397
+ _,
398
398
  {
399
399
  onChange: re(d),
400
400
  name: String(r.id),
401
401
  value: u,
402
402
  children: [
403
- y.map((p, x) => /* @__PURE__ */ i(A, { value: p.value, children: p.text }, x)),
404
- y.length === 0 && /* @__PURE__ */ c(A, { disabled: !0, children: [
403
+ y.map((s, x) => /* @__PURE__ */ i(A, { value: s.value, children: s.text }, x)),
404
+ y.length === 0 && /* @__PURE__ */ f(A, { disabled: !0, children: [
405
405
  "No ",
406
406
  t.type,
407
407
  " property found!"
@@ -412,22 +412,22 @@ const $e = ({
412
412
  }
413
413
  }
414
414
  ];
415
- return T ? [...o, s] : o;
415
+ return T ? [...o, p] : o;
416
416
  };
417
- return /* @__PURE__ */ c(de, { open: I, fullWidth: !0, maxWidth: "lg", onClose: N, children: [
418
- /* @__PURE__ */ c(
419
- se,
417
+ return /* @__PURE__ */ f(de, { open: F, fullWidth: !0, maxWidth: "lg", onClose: O, children: [
418
+ /* @__PURE__ */ f(
419
+ pe,
420
420
  {
421
421
  component: "div",
422
422
  lineHeight: 1,
423
423
  display: "flex",
424
424
  justifyContent: "space-between",
425
425
  children: [
426
- /* @__PURE__ */ i(m, { children: a === void 0 ? /* @__PURE__ */ c(b, { children: [
426
+ /* @__PURE__ */ i(m, { children: a === void 0 ? /* @__PURE__ */ f(b, { children: [
427
427
  /* @__PURE__ */ i($, { variant: "h6", children: "Property Mapping" }),
428
428
  /* @__PURE__ */ i($, { variant: "caption", children: "Map policy properties with object template or catalog istance properties" })
429
- ] }) : /* @__PURE__ */ c(m, { display: "flex", flex: 1, alignItems: "flex-start", children: [
430
- /* @__PURE__ */ c(
429
+ ] }) : /* @__PURE__ */ f(m, { display: "flex", flex: 1, alignItems: "flex-start", children: [
430
+ /* @__PURE__ */ f(
431
431
  m,
432
432
  {
433
433
  display: "flex",
@@ -436,13 +436,13 @@ const $e = ({
436
436
  minWidth: 200,
437
437
  children: [
438
438
  /* @__PURE__ */ i(
439
- D,
439
+ R,
440
440
  {
441
441
  name: "name",
442
442
  variant: "standard",
443
443
  value: a.name,
444
444
  placeholder: "Add name",
445
- onChange: R,
445
+ onChange: D,
446
446
  sx: {
447
447
  "& .MuiInputBase-root:before": {
448
448
  border: "none"
@@ -451,14 +451,14 @@ const $e = ({
451
451
  }
452
452
  ),
453
453
  "description" in a && /* @__PURE__ */ i(
454
- D,
454
+ R,
455
455
  {
456
456
  name: "description",
457
457
  variant: "standard",
458
458
  size: "small",
459
459
  value: a.description,
460
460
  placeholder: "Add description",
461
- onChange: R,
461
+ onChange: D,
462
462
  sx: {
463
463
  "& .MuiInputBase-root:before": {
464
464
  border: "none"
@@ -469,9 +469,9 @@ const $e = ({
469
469
  ]
470
470
  }
471
471
  ),
472
- /* @__PURE__ */ c(m, { ml: 4, children: [
472
+ /* @__PURE__ */ f(m, { ml: 4, children: [
473
473
  "count" in a && /* @__PURE__ */ i(
474
- D,
474
+ R,
475
475
  {
476
476
  name: "count",
477
477
  label: "Count",
@@ -479,11 +479,11 @@ const $e = ({
479
479
  required: !0,
480
480
  sx: { width: 100, mr: 1 },
481
481
  value: a.count,
482
- onChange: R
482
+ onChange: D
483
483
  }
484
484
  ),
485
485
  "criticalityScore" in a && /* @__PURE__ */ i(
486
- D,
486
+ R,
487
487
  {
488
488
  name: "criticalityScore",
489
489
  label: "Criticality Score",
@@ -492,26 +492,26 @@ const $e = ({
492
492
  title: "Should be between 0 and 1",
493
493
  sx: { width: 150 },
494
494
  value: a.criticalityScore,
495
- onChange: R
495
+ onChange: D
496
496
  }
497
497
  )
498
498
  ] })
499
499
  ] }) }),
500
- /* @__PURE__ */ i(m, { flex: 1, textAlign: "end", children: /* @__PURE__ */ i(W, { onClick: N, children: /* @__PURE__ */ i(le, {}) }) })
500
+ /* @__PURE__ */ i(m, { flex: 1, textAlign: "end", children: /* @__PURE__ */ i(J, { onClick: O, children: /* @__PURE__ */ i(le, {}) }) })
501
501
  ]
502
502
  }
503
503
  ),
504
- /* @__PURE__ */ i(pe, { sx: { minHeight: 300 }, children: k.map((n, d) => /* @__PURE__ */ c(
504
+ /* @__PURE__ */ i(se, { sx: { minHeight: 300 }, children: k.map((n, d) => /* @__PURE__ */ f(
505
505
  m,
506
506
  {
507
- boxShadow: (s) => s.shadows[1],
507
+ boxShadow: (p) => p.shadows[1],
508
508
  mt: 0.1,
509
509
  mb: 2,
510
510
  overflow: "hidden",
511
511
  borderRadius: 1,
512
512
  children: [
513
- /* @__PURE__ */ c(m, { display: "flex", alignItems: "center", p: 2, children: [
514
- /* @__PURE__ */ i($, { children: n.catalogInstances.map((s) => s.name).join(", ") }),
513
+ /* @__PURE__ */ f(m, { display: "flex", alignItems: "center", p: 2, children: [
514
+ /* @__PURE__ */ i($, { children: n.catalogInstances.map((p) => p.name).join(", ") }),
515
515
  /* @__PURE__ */ i(ie, { color: "disabled", sx: { mx: 1 } }),
516
516
  /* @__PURE__ */ i($, { variant: "caption", color: "GrayText", children: n.name || n.key })
517
517
  ] }),
@@ -525,28 +525,28 @@ const $e = ({
525
525
  sx: {
526
526
  border: "none",
527
527
  "& .MuiDataGrid-columnHeadersInner": {
528
- backgroundColor: (s) => s.palette.grey[200]
528
+ backgroundColor: (p) => p.palette.grey[200]
529
529
  }
530
530
  },
531
531
  hideFooterPagination: !0,
532
532
  hideFooter: !0,
533
- getRowId: (s) => s.key
533
+ getRowId: (p) => p.key
534
534
  }
535
535
  )
536
536
  ]
537
537
  },
538
538
  d
539
539
  )) }),
540
- /* @__PURE__ */ c(ce, { children: [
541
- /* @__PURE__ */ i(V, { color: "inherit", variant: "contained", onClick: N, children: "Cancel" }),
540
+ /* @__PURE__ */ f(ce, { children: [
541
+ /* @__PURE__ */ i(W, { color: "inherit", variant: "contained", onClick: O, children: "Cancel" }),
542
542
  /* @__PURE__ */ i(
543
- V,
543
+ W,
544
544
  {
545
545
  color: "primary",
546
546
  variant: "contained",
547
- disabled: k.length === 0 || E,
547
+ disabled: k.length === 0 || B,
548
548
  onClick: Q,
549
- children: E ? "Saving..." : "Save"
549
+ children: B ? "Saving..." : "Save"
550
550
  }
551
551
  )
552
552
  ] })
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, Fragment as S, jsx as e } from "react/jsx-runtime";
2
2
  import { useMemo as T } from "react";
3
- import { Box as t, TextField as k, InputAdornment as w, Button as a, Dialog as j, DialogTitle as A, Typography as p, IconButton as D, DialogContent as M, DialogActions as B } from "@mui/material";
3
+ import { Box as l, TextField as k, InputAdornment as w, Button as a, Dialog as j, DialogTitle as A, Typography as m, IconButton as D, DialogContent as B, DialogActions as M } from "@mui/material";
4
4
  import { CloseOutlined as O } from "@mui/icons-material";
5
5
  import P from "../../../../hooks/useToggle.js";
6
6
  import { SearchInput as W } from "../../../search-input/index.js";
@@ -8,27 +8,27 @@ import { InstanceHierarchyTable as F } from "../../../instance-hierarchy-table/i
8
8
  import { PropertyMapping as H } from "../../../property-mapping/index.js";
9
9
  const K = ({
10
10
  inputVariant: c,
11
- templates: l,
11
+ templates: r,
12
12
  data: d,
13
- onSelect: h,
14
- onSearchSubmit: m,
15
- openMapping: u,
13
+ onSelect: p,
14
+ onSearchSubmit: u,
15
+ openMapping: s,
16
16
  mappingData: g,
17
17
  objectTemplate: f,
18
- selectedInstances: r = [],
18
+ selectedInstances: t = [],
19
19
  mapboxAccessToken: x,
20
20
  onMappingSubmit: C,
21
- onMappingOpen: s,
21
+ onMappingOpen: h,
22
22
  onMappingClose: y
23
23
  }) => {
24
24
  const o = P(!1), b = T(
25
- () => Array.from(l, ([n, I]) => I),
26
- [l]
25
+ () => Array.from(r, ([n, I]) => I),
26
+ [r]
27
27
  ), v = (n) => {
28
- o.action.close(), s(n);
28
+ o.action.close(), h(n);
29
29
  };
30
30
  return /* @__PURE__ */ i(S, { children: [
31
- /* @__PURE__ */ e(t, { mb: 2, position: "relative", children: /* @__PURE__ */ e(
31
+ /* @__PURE__ */ e(l, { mb: 2, position: "relative", children: /* @__PURE__ */ e(
32
32
  k,
33
33
  {
34
34
  label: "Catalogue Instance(s)",
@@ -41,12 +41,12 @@ const K = ({
41
41
  {
42
42
  variant: "contained",
43
43
  size: "small",
44
- onClick: s,
44
+ onClick: h,
45
45
  children: "Edit Mapping"
46
46
  }
47
47
  ) })
48
48
  },
49
- value: r.map((n) => n.title).join(", "),
49
+ value: t.map((n) => n.title).join(", "),
50
50
  onClick: o.action.open
51
51
  }
52
52
  ) }),
@@ -66,12 +66,12 @@ const K = ({
66
66
  display: "flex",
67
67
  justifyContent: "space-between",
68
68
  children: [
69
- /* @__PURE__ */ i(t, { flex: 1, children: [
70
- /* @__PURE__ */ e(p, { variant: "h6", children: "Catalogue Instance" }),
71
- /* @__PURE__ */ e(p, { variant: "caption", children: "Search and select catalogue instance(s)" })
69
+ /* @__PURE__ */ i(l, { flex: 1, children: [
70
+ /* @__PURE__ */ e(m, { variant: "h6", children: "Catalogue Instance" }),
71
+ /* @__PURE__ */ e(m, { variant: "caption", children: "Search and select catalogue instance(s)" })
72
72
  ] }),
73
73
  /* @__PURE__ */ i(
74
- t,
74
+ l,
75
75
  {
76
76
  flex: 1,
77
77
  flexGrow: 1,
@@ -84,7 +84,7 @@ const K = ({
84
84
  {
85
85
  variant: c,
86
86
  sx: { width: 300 },
87
- onSubmit: m
87
+ onSubmit: u
88
88
  }
89
89
  ),
90
90
  /* @__PURE__ */ e(
@@ -101,8 +101,8 @@ const K = ({
101
101
  ]
102
102
  }
103
103
  ),
104
- /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(
105
- t,
104
+ /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(
105
+ l,
106
106
  {
107
107
  boxShadow: (n) => n.shadows[1],
108
108
  mt: 0.1,
@@ -112,15 +112,15 @@ const K = ({
112
112
  F,
113
113
  {
114
114
  data: d,
115
- templates: l,
115
+ templates: r,
116
116
  enableCheckboxSelection: !0,
117
- selectedIds: r.map((n) => n.id),
118
- onSelect: h
117
+ selectedIds: t.map((n) => n.id),
118
+ onSelect: p
119
119
  }
120
120
  )
121
121
  }
122
122
  ) }),
123
- /* @__PURE__ */ i(B, { children: [
123
+ /* @__PURE__ */ i(M, { children: [
124
124
  /* @__PURE__ */ e(
125
125
  a,
126
126
  {
@@ -135,7 +135,7 @@ const K = ({
135
135
  {
136
136
  color: "primary",
137
137
  variant: "contained",
138
- disabled: r.length === 0,
138
+ disabled: t.length === 0,
139
139
  onClick: v,
140
140
  children: "Property Mapping"
141
141
  }
@@ -144,15 +144,16 @@ const K = ({
144
144
  ]
145
145
  }
146
146
  ),
147
- /* @__PURE__ */ e(
147
+ s && /* @__PURE__ */ e(
148
148
  H,
149
149
  {
150
150
  data: g,
151
151
  objectTemplate: f,
152
152
  agentTemplates: b,
153
+ catalogueInstances: t,
153
154
  mapboxAccessToken: x,
154
155
  onSubmit: C,
155
- open: u,
156
+ open: s,
156
157
  onClose: y
157
158
  }
158
159
  )
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.45",
4
+ "version": "1.5.47",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",