@deviceinsight/ng-ui-scale-lib 9.18.8 → 9.20.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 (32) hide show
  1. package/dist/{AccessEditModal-a02b50a1.js → AccessEditModal-ee0139fb.js} +24 -23
  2. package/dist/BundleManagementContainer-093786e5.js +20 -0
  3. package/dist/{BundlesContainer-498d7121.js → BundlesContainer-54c9cc3a.js} +114 -110
  4. package/dist/{ContextBarContext-f2968fee.js → ContextBarContext-0c28ce9d.js} +38292 -46174
  5. package/dist/{DatapointImport-0610eed8.js → DatapointImport-6d394cb5.js} +126 -122
  6. package/dist/{FileUploadInput-aea4f866.js → FileUploadInput-a23ba785.js} +3 -3
  7. package/dist/{Files-25853de9.js → Files-4fc0415e.js} +23 -19
  8. package/dist/GlobalPowerBiReports-f9bf0765.js +11079 -0
  9. package/dist/{Graph-ad8ad6f9.js → Graph-2840eac2.js} +4 -1
  10. package/dist/JsonSettingWidget-8908d40b.js +57 -0
  11. package/dist/{LicensesEditPage-e6c71c43.js → LicensesEditPage-3332b87c.js} +33 -30
  12. package/dist/{LicensesList-d28c9799.js → LicensesList-6254cd37.js} +17 -13
  13. package/dist/{PropertiesEditPage-85bc5517.js → PropertiesEditPage-5b148652.js} +24 -21
  14. package/dist/{PropertiesList-fcf0d837.js → PropertiesList-06478803.js} +17 -13
  15. package/dist/{TemplateEditPage-a34efc41.js → TemplateEditPage-94088888.js} +28 -23
  16. package/dist/TemplateTextInput-e8861a0f.js +50 -0
  17. package/dist/{TemplatesListPage-ce7fea1d.js → TemplatesListPage-866246c6.js} +55 -51
  18. package/dist/{UserGroupAssignments-8fd3c47d.js → UserGroupAssignments-6feae326.js} +36 -32
  19. package/dist/{UserGroupTheme-0e8a16c4.js → UserGroupTheme-7ee8e92e.js} +14 -11
  20. package/dist/api.d.ts +3 -0
  21. package/dist/api.js +59 -56
  22. package/dist/{index-e2b27256.js → index-34a2015c.js} +7 -7
  23. package/dist/index.js +2761 -2765
  24. package/dist/objectWithoutPropertiesLoose-a4604547.js +26 -0
  25. package/dist/{react-router-7b367edf.js → react-router-d38ecdf4.js} +113 -108
  26. package/dist/style.css +1 -1
  27. package/package.json +4 -4
  28. package/dist/BundleManagementContainer-dbac0259.js +0 -17
  29. package/dist/GlobalPowerBiReports-06c92d0e.js +0 -11078
  30. package/dist/JsonSettingWidget-c471537a.js +0 -54
  31. package/dist/TemplateTextInput-fe5912e7.js +0 -47
  32. package/dist/extends-0a3e0827.js +0 -13
@@ -1,19 +1,22 @@
1
- import { aj as S, bi as P, az as e, ai as r, bo as A, ba as I, d8 as T, aT as F, b7 as re, am as ae, d9 as ie, cq as q, da as oe } from "./ContextBarContext-f2968fee.js";
1
+ import { ah as S, bf as P, aw as e, ag as r, bl as A, b7 as I, d5 as T, aQ as F, b4 as re, aj as ae, d6 as ie, cn as q, d7 as oe } from "./ContextBarContext-0c28ce9d.js";
2
2
  import { useEffect as D, useState as V, useRef as ce, useCallback as ue, createElement as he } from "react";
3
3
  import { useLocation as me } from "react-router-dom";
4
4
  import { createBundle as xe, deleteBundleFile as je, createBundleFile as fe, releaseBundleVersion as Ee, fetchBundleVersion as G, fetchBundleFiles as z, createBundleVersion as ge, deleteBundleVersion as Be, downloadBundleFile as be, fetchBundleVersions as W, deleteBundle as Ve, fetchAllBundles as De } from "@deviceinsight/ng-ui-api-client";
5
5
  import { messageBoxSuccess as $, messageBoxError as H, ReactableWithClientSidePagination as Ne, Reactable as Te, ContentHeader as ve } from "@deviceinsight/ng-ui-components";
6
- import { Modal as _, SpinnerContainer as N, Button as j, Icon as v, Label as _e, AccordionItem as ye, Accordion as pe } from "@deviceinsight/ng-ui-basic-components";
6
+ import "react-i18next";
7
+ import { Modal as p, SpinnerContainer as N, Button as j, Icon as v, Label as pe, AccordionItem as _e, Accordion as ye } from "@deviceinsight/ng-ui-basic-components";
7
8
  import { B as c, Q, a as Ce } from "./consts-012135e5.js";
8
- import { F as Le } from "./FileUploadInput-aea4f866.js";
9
+ import { F as Le } from "./FileUploadInput-a23ba785.js";
9
10
  import { u as Se, b as Ae } from "./useCanDeleteBundleVersion-64f35949.js";
11
+ import "i18next";
12
+ import "ux4iot-react";
10
13
  import "react-dom";
11
14
  const Y = (n) => {
12
15
  n && setTimeout(() => n.focus(), 0);
13
16
  }, Z = (n, t) => {
14
17
  D(() => {
15
- const s = (l) => {
16
- t || (l.code === "Enter" || l.code === "NumpadEnter") && n();
18
+ const s = (d) => {
19
+ t || (d.code === "Enter" || d.code === "NumpadEnter") && n();
17
20
  };
18
21
  return document.addEventListener("keydown", s), () => {
19
22
  document.removeEventListener("keydown", s);
@@ -21,8 +24,8 @@ const Y = (n) => {
21
24
  }, [n, t]);
22
25
  }, Ie = ({ setOpen: n, loadBundles: t }) => {
23
26
  const { t: s } = S(), {
24
- handleSubmit: l,
25
- control: d,
27
+ handleSubmit: d,
28
+ control: l,
26
29
  formState: { isSubmitting: a }
27
30
  } = P({ defaultValues: { name: "" } }), i = (o) => xe(o).then(() => {
28
31
  t(), n(!1), $(
@@ -30,11 +33,11 @@ const Y = (n) => {
30
33
  );
31
34
  }).catch((h) => {
32
35
  console.error("bundle creation error", h), H(/* @__PURE__ */ e.jsx(r, { i18nKey: "bundlemanagement.createBundleError", children: "Could not save bundle" }));
33
- }), u = () => l(i, (o) => {
36
+ }), u = () => d(i, (o) => {
34
37
  console.warn("Validation error", o);
35
38
  })();
36
39
  return Z(u, !1), /* @__PURE__ */ e.jsx(
37
- _,
40
+ p,
38
41
  {
39
42
  width: 400,
40
43
  header: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundle.create.title", children: "Create new Bundle" }),
@@ -42,7 +45,7 @@ const Y = (n) => {
42
45
  A,
43
46
  {
44
47
  name: "name",
45
- control: d,
48
+ control: l,
46
49
  rules: {
47
50
  required: s("bundleManagement.bundles.name.required", {
48
51
  defaultValue: "Name is required"
@@ -92,15 +95,15 @@ const Y = (n) => {
92
95
  }
93
96
  );
94
97
  }, O = (n, t, s) => {
95
- n && n.some((l) => !l.condition || l.condition(s) ? (t(/* @__PURE__ */ e.jsx(r, { i18nKey: l.id, children: l.defaultValue })), !0) : !1);
98
+ n && n.some((d) => !d.condition || d.condition(s) ? (t(/* @__PURE__ */ e.jsx(r, { i18nKey: d.id, children: d.defaultValue })), !0) : !1);
96
99
  };
97
100
  function g({
98
101
  requestFunction: n,
99
102
  errorMessages: t,
100
103
  successMessages: s,
101
- initialData: l
104
+ initialData: d
102
105
  }) {
103
- const [d, a] = V(l), [i, u] = V(!1), [o, h] = V(void 0), m = ce(!0), b = ue(async (...B) => {
106
+ const [l, a] = V(d), [i, u] = V(!1), [o, h] = V(void 0), m = ce(!0), b = ue(async (...B) => {
104
107
  try {
105
108
  h(void 0), u(!0);
106
109
  const f = await n(...B);
@@ -113,25 +116,25 @@ function g({
113
116
  }, [n, t, s]);
114
117
  return D(() => (m.current = !0, () => {
115
118
  m.current = !1;
116
- }), [n, t, s]), { run: b, data: d, loading: i, error: o };
119
+ }), [n, t, s]), { run: b, data: l, loading: i, error: o };
117
120
  }
118
121
  const K = (n) => n ? /* @__PURE__ */ e.jsx("span", { children: re(n, { showTimezone: !1 }) }) : "-", Fe = ({
119
122
  onViewDetails: n,
120
123
  onDelete: t,
121
124
  onEdit: s
122
- }, l) => [
125
+ }, d) => [
123
126
  {
124
127
  name: "name",
125
128
  label: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.name", children: "Name" }),
126
129
  sortable: !0,
127
- render: (d) => /* @__PURE__ */ e.jsx(
130
+ render: (l) => /* @__PURE__ */ e.jsx(
128
131
  "a",
129
132
  {
130
133
  href: "edit",
131
134
  onClick: (a) => {
132
- a.preventDefault(), n(d.id);
135
+ a.preventDefault(), n(l.id);
133
136
  },
134
- children: d.name
137
+ children: l.name
135
138
  }
136
139
  ),
137
140
  width: "15%"
@@ -140,48 +143,48 @@ const K = (n) => n ? /* @__PURE__ */ e.jsx("span", { children: re(n, { showTimez
140
143
  name: "description",
141
144
  label: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.description", children: "Description" }),
142
145
  sortable: !0,
143
- render: ({ description: d }) => /* @__PURE__ */ e.jsx("span", { children: d }),
146
+ render: ({ description: l }) => /* @__PURE__ */ e.jsx("span", { children: l }),
144
147
  width: "20%"
145
148
  },
146
149
  {
147
150
  name: "fileCount",
148
151
  label: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.files", children: "Files" }),
149
152
  sortable: !0,
150
- render: ({ fileCount: d }) => /* @__PURE__ */ e.jsx("span", { children: d || "-" }),
153
+ render: ({ fileCount: l }) => /* @__PURE__ */ e.jsx("span", { children: l || "-" }),
151
154
  width: "10%"
152
155
  },
153
156
  {
154
157
  name: "draft",
155
158
  label: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.status", children: "Status" }),
156
159
  sortable: !0,
157
- render: ({ draft: d }) => /* @__PURE__ */ e.jsx("span", { children: d ? /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.draft", children: "Draft" }) : /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.published", children: "Published" }) }),
160
+ render: ({ draft: l }) => /* @__PURE__ */ e.jsx("span", { children: l ? /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.draft", children: "Draft" }) : /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.published", children: "Published" }) }),
158
161
  width: "10%"
159
162
  },
160
163
  {
161
164
  name: "createdAt",
162
165
  label: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.createdAt", children: "Created at" }),
163
166
  sortable: !0,
164
- render: ({ createdAt: d }) => /* @__PURE__ */ e.jsx("span", { children: K(d) })
167
+ render: ({ createdAt: l }) => /* @__PURE__ */ e.jsx("span", { children: K(l) })
165
168
  },
166
169
  {
167
170
  name: "releasedAt",
168
171
  label: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.releasedAt", children: "Published at" }),
169
172
  sortable: !0,
170
- render: ({ releasedAt: d }) => /* @__PURE__ */ e.jsx("span", { children: d ? K(d) : "-" })
173
+ render: ({ releasedAt: l }) => /* @__PURE__ */ e.jsx("span", { children: l ? K(l) : "-" })
171
174
  },
172
175
  {
173
176
  name: "delete",
174
177
  label: "",
175
178
  width: "5%",
176
179
  align: "right",
177
- render: (d) => /* @__PURE__ */ e.jsx(F, { authorities: ["WRITE_BUNDLE"], children: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
178
- d.draft && /* @__PURE__ */ e.jsx(
180
+ render: (l) => /* @__PURE__ */ e.jsx(F, { authorities: ["WRITE_BUNDLE"], children: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
181
+ l.draft && /* @__PURE__ */ e.jsx(
179
182
  j,
180
183
  {
181
184
  naked: !0,
182
185
  small: !0,
183
- onClick: () => s(d.id),
184
- title: l("bundleversion.edit", {
186
+ onClick: () => s(l.id),
187
+ title: d("bundleversion.edit", {
185
188
  defaultValue: "Edit Bundle Version"
186
189
  }),
187
190
  "data-testid": c.DELETE_VERSION_ICON,
@@ -193,10 +196,10 @@ const K = (n) => n ? /* @__PURE__ */ e.jsx("span", { children: re(n, { showTimez
193
196
  {
194
197
  naked: !0,
195
198
  small: !0,
196
- onClick: () => t(d),
197
- title: l("bundleversion.delete", {
199
+ onClick: () => t(l),
200
+ title: d("bundleversion.delete", {
198
201
  defaultValue: "Delete Bundle Version",
199
- version: d.name
202
+ version: l.name
200
203
  }),
201
204
  "data-testid": c.DELETE_VERSION_ICON,
202
205
  children: /* @__PURE__ */ e.jsx(v, { del: !0 })
@@ -206,7 +209,7 @@ const K = (n) => n ? /* @__PURE__ */ e.jsx("span", { children: re(n, { showTimez
206
209
  }
207
210
  ], Me = /^[a-zA-Z0-9_.-]*$/;
208
211
  function we({ header: n, formContext: t, onSubmit: s }) {
209
- const { t: l } = S(), { control: d } = t;
212
+ const { t: d } = S(), { control: l } = t;
210
213
  return Z(s, !1), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
211
214
  /* @__PURE__ */ e.jsx(
212
215
  "h3",
@@ -222,20 +225,20 @@ function we({ header: n, formContext: t, onSubmit: s }) {
222
225
  A,
223
226
  {
224
227
  name: "name",
225
- control: d,
228
+ control: l,
226
229
  rules: {
227
- required: l("version.name.required", {
230
+ required: d("version.name.required", {
228
231
  defaultValue: "Name is required."
229
232
  }),
230
233
  pattern: {
231
234
  value: Me,
232
- message: l("version.name.pattern", {
235
+ message: d("version.name.pattern", {
233
236
  defaultValue: "Name can only contain latin characters, number, dots and underscores."
234
237
  })
235
238
  },
236
239
  maxLength: {
237
240
  value: 50,
238
- message: l("version.name.maxLength", {
241
+ message: d("version.name.maxLength", {
239
242
  defaultValue: "Name cannot be longer than 50 characters"
240
243
  })
241
244
  }
@@ -259,11 +262,11 @@ function we({ header: n, formContext: t, onSubmit: s }) {
259
262
  A,
260
263
  {
261
264
  name: "description",
262
- control: d,
265
+ control: l,
263
266
  rules: {
264
267
  maxLength: {
265
268
  value: 250,
266
- message: l("version.description.maxLength", {
269
+ message: d("version.description.maxLength", {
267
270
  defaultValue: "Description cannot be longer than 250 characters"
268
271
  })
269
272
  }
@@ -345,7 +348,7 @@ const J = [
345
348
  )
346
349
  }
347
350
  ], X = ({ count: n }) => /* @__PURE__ */ e.jsx(
348
- _e,
351
+ pe,
349
352
  {
350
353
  className: "neutral",
351
354
  style: {
@@ -374,10 +377,11 @@ const J = [
374
377
  Ne,
375
378
  {
376
379
  columnDefs: t,
377
- uniqueItemKey: (l) => `${l.name}_${l.size}`,
380
+ uniqueItemKey: (d) => `${d.name}_${d.size}`,
378
381
  paginationSettings: Re,
379
382
  items: n,
380
- isLoading: s
383
+ isLoading: s,
384
+ tableName: "files"
381
385
  }
382
386
  )
383
387
  ] }) }), ne = ({ bundle: n, version: t }) => /* @__PURE__ */ e.jsxs("div", { className: "bundle-version-info", children: [
@@ -432,7 +436,7 @@ const J = [
432
436
  }, Ye = "DUPLICATE_FILE_NAME", Ze = ({
433
437
  bundle: n,
434
438
  version: t,
435
- fileLoader: { run: s, data: l, loading: d }
439
+ fileLoader: { run: s, data: d, loading: l }
436
440
  }) => {
437
441
  const { t: a } = S(), i = t ? t.id : "", { run: u, loading: o } = g({
438
442
  requestFunction: je,
@@ -454,8 +458,8 @@ const J = [
454
458
  /* @__PURE__ */ e.jsx(
455
459
  ee,
456
460
  {
457
- isLoading: o || m || d,
458
- files: l || [],
461
+ isLoading: o || m || l,
462
+ files: d || [],
459
463
  columnDefs: f
460
464
  }
461
465
  ),
@@ -467,12 +471,12 @@ const J = [
467
471
  },
468
472
  onChange: (E) => {
469
473
  if (E) {
470
- const y = new FormData();
471
- y.append("file", E), B(y);
474
+ const _ = new FormData();
475
+ _.append("file", E), B(_);
472
476
  }
473
477
  }
474
478
  },
475
- l ? l.length : 1
479
+ d ? d.length : 1
476
480
  ) })
477
481
  ] });
478
482
  }, Je = {
@@ -484,7 +488,7 @@ const J = [
484
488
  }, en = {
485
489
  id: "bundlemanagement.releaseBundleVersionSuccess",
486
490
  defaultValue: "The version was published"
487
- }, p = {
491
+ }, y = {
488
492
  id: "bundlemanagement.modalCloseButton",
489
493
  defaultValue: "Close"
490
494
  }, C = {
@@ -496,21 +500,21 @@ const J = [
496
500
  }, R = {
497
501
  id: "bundlemanagement.modalSaveAndProceedButton",
498
502
  defaultValue: "Save and Proceed"
499
- }, nn = [te], tn = [se], sn = [ze], dn = [Ge], ln = [en], rn = ({ bundle: n, versionId: t, setVersionId: s, onClose: l }) => {
500
- const d = P({
503
+ }, nn = [te], tn = [se], sn = [ze], ln = [Ge], dn = [en], rn = ({ bundle: n, versionId: t, setVersionId: s, onClose: d }) => {
504
+ const l = P({
501
505
  defaultValues: {
502
506
  name: "",
503
507
  description: ""
504
508
  }
505
- }), { handleSubmit: a } = d, i = (f) => ge(n.id, f).then((E) => s(E.id)), u = () => a(i, (f) => {
509
+ }), { handleSubmit: a } = l, i = (f) => ge(n.id, f).then((E) => s(E.id)), u = () => a(i, (f) => {
506
510
  console.warn("Validation error", f);
507
511
  })(), o = g({
508
512
  requestFunction: u,
509
513
  errorMessages: sn
510
514
  }), h = g({
511
515
  requestFunction: Ee,
512
- errorMessages: dn,
513
- successMessages: ln
516
+ errorMessages: ln,
517
+ successMessages: dn
514
518
  }), m = g({
515
519
  requestFunction: G,
516
520
  errorMessages: nn
@@ -523,7 +527,7 @@ const J = [
523
527
  }, [t, b, n]);
524
528
  const B = !!(x.data && x.data.length);
525
529
  return /* @__PURE__ */ e.jsx(
526
- _,
530
+ p,
527
531
  {
528
532
  width: 500,
529
533
  header: t ? /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.editversion", children: "Add Files" }) : /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.addversion", children: "Create new Version" }),
@@ -531,7 +535,7 @@ const J = [
531
535
  N,
532
536
  {
533
537
  show: h.loading || m.loading && !m.data || o.loading,
534
- children: t ? /* @__PURE__ */ e.jsx(Ze, { bundle: n, version: m.data, fileLoader: x }) : /* @__PURE__ */ e.jsx(we, { header: n.name, formContext: d, onSubmit: u })
538
+ children: t ? /* @__PURE__ */ e.jsx(Ze, { bundle: n, version: m.data, fileLoader: x }) : /* @__PURE__ */ e.jsx(we, { header: n.name, formContext: l, onSubmit: u })
535
539
  }
536
540
  ),
537
541
  footer: t ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
@@ -539,24 +543,24 @@ const J = [
539
543
  j,
540
544
  {
541
545
  primary: !0,
542
- onClick: () => h.run(n.id, t || "").then(l),
546
+ onClick: () => h.run(n.id, t || "").then(d),
543
547
  disabled: !B || h.loading,
544
548
  children: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundlemanagement.publish", children: "Publish" })
545
549
  }
546
550
  ),
547
- /* @__PURE__ */ e.jsx(j, { onClick: l, "data-testid": c.CANCEL_SAVE_VERSION_BUTTON, children: /* @__PURE__ */ e.jsx(r, { i18nKey: p.id, children: p.defaultValue }) })
551
+ /* @__PURE__ */ e.jsx(j, { onClick: d, "data-testid": c.CANCEL_SAVE_VERSION_BUTTON, children: /* @__PURE__ */ e.jsx(r, { i18nKey: y.id, children: y.defaultValue }) })
548
552
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
549
553
  /* @__PURE__ */ e.jsx(
550
554
  j,
551
555
  {
552
556
  primary: !0,
553
557
  onClick: o.run,
554
- disabled: d.formState.isSubmitting || o.loading,
558
+ disabled: l.formState.isSubmitting || o.loading,
555
559
  "data-testid": c.SAVE_VERSION_BUTTON,
556
560
  children: /* @__PURE__ */ e.jsx(r, { i18nKey: R.id, children: R.defaultValue })
557
561
  }
558
562
  ),
559
- /* @__PURE__ */ e.jsx(j, { onClick: l, "data-testid": c.CANCEL_SAVE_VERSION_BUTTON, children: /* @__PURE__ */ e.jsx(r, { i18nKey: T.cancel.id, children: T.cancel.defaultValue }) })
563
+ /* @__PURE__ */ e.jsx(j, { onClick: d, "data-testid": c.CANCEL_SAVE_VERSION_BUTTON, children: /* @__PURE__ */ e.jsx(r, { i18nKey: T.cancel.id, children: T.cancel.defaultValue }) })
560
564
  ] })
561
565
  }
562
566
  );
@@ -574,22 +578,22 @@ const J = [
574
578
  "Do you really want to delete the version ",
575
579
  /* @__PURE__ */ e.jsx("strong", { children: n }),
576
580
  "?"
577
- ] }) }) }) }), cn = ({ version: n, canBeDeleted: t, error: s, processing: l }) => /* @__PURE__ */ e.jsx(N, { show: l, children: /* @__PURE__ */ e.jsx(
581
+ ] }) }) }) }), cn = ({ version: n, canBeDeleted: t, error: s, processing: d }) => /* @__PURE__ */ e.jsx(N, { show: d, children: /* @__PURE__ */ e.jsx(
578
582
  "div",
579
583
  {
580
584
  style: {
581
585
  minHeight: 50
582
586
  },
583
- children: !l && (t ? on(n.name) : an(n.name, s))
587
+ children: !d && (t ? on(n.name) : an(n.name, s))
584
588
  }
585
- ) }), un = [qe], hn = [Xe], mn = ({ bundle: n, version: t, onCancel: s, loadVersions: l }) => {
586
- const { run: d } = g({
589
+ ) }), un = [qe], hn = [Xe], mn = ({ bundle: n, version: t, onCancel: s, loadVersions: d }) => {
590
+ const { run: l } = g({
587
591
  requestFunction: Be,
588
592
  errorMessages: un,
589
593
  successMessages: hn
590
- }), a = Se(n, t), i = () => d(n.id, t.id).then(l).then(s);
594
+ }), a = Se(n, t), i = () => l(n.id, t.id).then(d).then(s);
591
595
  return /* @__PURE__ */ e.jsx(
592
- _,
596
+ p,
593
597
  {
594
598
  header: /* @__PURE__ */ e.jsx(r, { i18nKey: U.id, children: U.defaultValue }),
595
599
  content: /* @__PURE__ */ e.jsx(cn, { version: t, ...a }),
@@ -600,9 +604,9 @@ const J = [
600
604
  width: 500
601
605
  }
602
606
  );
603
- }, xn = [te], jn = [se], fn = ({ bundle: n, versionId: t, onClose: s, t: l }) => {
607
+ }, xn = [te], jn = [se], fn = ({ bundle: n, versionId: t, onClose: s, t: d }) => {
604
608
  const {
605
- run: d,
609
+ run: l,
606
610
  data: a,
607
611
  loading: i
608
612
  } = g({
@@ -621,11 +625,11 @@ const J = [
621
625
  window.location.replace(f.downloadLink);
622
626
  }),
623
627
  errorMessages: [Pe]
624
- }), b = Ke(m, l);
628
+ }), b = Ke(m, d);
625
629
  return D(() => {
626
- t && (d(n.id, t), u(n.id, t));
627
- }, [u, d, t, n]), /* @__PURE__ */ e.jsx(
628
- _,
630
+ t && (l(n.id, t), u(n.id, t));
631
+ }, [u, l, t, n]), /* @__PURE__ */ e.jsx(
632
+ p,
629
633
  {
630
634
  width: 500,
631
635
  header: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.viewVersion", children: "Version Details" }),
@@ -640,12 +644,12 @@ const J = [
640
644
  }
641
645
  )
642
646
  ] }) }),
643
- footer: /* @__PURE__ */ e.jsx(j, { onClick: s, "data-testid": c.MODAL_CLOSE_BUTTON, children: /* @__PURE__ */ e.jsx(r, { i18nKey: p.id, children: p.defaultValue }) })
647
+ footer: /* @__PURE__ */ e.jsx(j, { onClick: s, "data-testid": c.MODAL_CLOSE_BUTTON, children: /* @__PURE__ */ e.jsx(r, { i18nKey: y.id, children: y.defaultValue }) })
644
648
  }
645
649
  );
646
650
  }, En = {
647
651
  getRowClass: (n) => n.draft ? "draft" : "released"
648
- }, gn = ({ columnDefs: n, paginationSettings: t, setPaginationSettings: s, versions: l, loading: d }) => /* @__PURE__ */ e.jsx(N, { show: d, children: /* @__PURE__ */ e.jsxs(
652
+ }, gn = ({ columnDefs: n, paginationSettings: t, setPaginationSettings: s, versions: d, loading: l }) => /* @__PURE__ */ e.jsx(N, { show: l, children: /* @__PURE__ */ e.jsxs(
649
653
  "div",
650
654
  {
651
655
  className: "bundle-version-table",
@@ -655,7 +659,7 @@ const J = [
655
659
  children: [
656
660
  /* @__PURE__ */ e.jsxs("h2", { children: [
657
661
  /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.title", children: "Versions" }),
658
- /* @__PURE__ */ e.jsx(X, { count: l && l.totalElements })
662
+ /* @__PURE__ */ e.jsx(X, { count: d && d.totalElements })
659
663
  ] }),
660
664
  /* @__PURE__ */ e.jsx(
661
665
  Te,
@@ -672,7 +676,7 @@ const J = [
672
676
  direction: i
673
677
  }
674
678
  }),
675
- pageable: l,
679
+ pageable: d,
676
680
  rowDef: En,
677
681
  "data-testid": "bundle-versions-table"
678
682
  }
@@ -687,10 +691,10 @@ const J = [
687
691
  direction: "DESC"
688
692
  }
689
693
  }, bn = [We], Vn = ({ bundle: n, isOpen: t }) => {
690
- const { t: s } = S(), [l, d] = V(!1), [a, i] = V(void 0), [u, o] = V(void 0), [h, m] = V(void 0), x = q();
694
+ const { t: s } = S(), [d, l] = V(!1), [a, i] = V(void 0), [u, o] = V(void 0), [h, m] = V(void 0), x = q();
691
695
  D(() => {
692
- const le = x.get(Q), w = x.get(Ce);
693
- w && le === n.id && i(w);
696
+ const de = x.get(Q), w = x.get(Ce);
697
+ w && de === n.id && i(w);
694
698
  }, [x, n]);
695
699
  const b = Fe(
696
700
  {
@@ -701,8 +705,8 @@ const J = [
701
705
  s
702
706
  ), [B, f] = V(Bn), {
703
707
  run: E,
704
- data: y,
705
- loading: de
708
+ data: _,
709
+ loading: le
706
710
  } = g({
707
711
  requestFunction: W,
708
712
  errorMessages: bn
@@ -713,17 +717,17 @@ const J = [
713
717
  /* @__PURE__ */ e.jsx(
714
718
  gn,
715
719
  {
716
- versions: y,
720
+ versions: _,
717
721
  paginationSettings: B,
718
722
  setPaginationSettings: f,
719
723
  columnDefs: b,
720
- loading: de
724
+ loading: le
721
725
  }
722
726
  ),
723
727
  /* @__PURE__ */ e.jsx(F, { authorities: ["WRITE_BUNDLE"], children: /* @__PURE__ */ e.jsxs(
724
728
  j,
725
729
  {
726
- onClick: () => d(!0),
730
+ onClick: () => l(!0),
727
731
  "data-testid": c.CREATE_VERSION_BUTTON,
728
732
  children: [
729
733
  /* @__PURE__ */ e.jsx(v, { add: !0 }),
@@ -740,14 +744,14 @@ const J = [
740
744
  loadVersions: M
741
745
  }
742
746
  ),
743
- (l || u) && /* @__PURE__ */ e.jsx(
747
+ (d || u) && /* @__PURE__ */ e.jsx(
744
748
  rn,
745
749
  {
746
750
  bundle: n,
747
751
  versionId: u,
748
752
  setVersionId: o,
749
753
  onClose: () => {
750
- d(!1), o(void 0), M();
754
+ l(!1), o(void 0), M();
751
755
  }
752
756
  }
753
757
  ),
@@ -762,14 +766,14 @@ const J = [
762
766
  )
763
767
  ] });
764
768
  }, Dn = (n) => {
765
- const { bundle: t, onDelete: s, isOpen: l } = n, { id: d, name: a } = t;
769
+ const { bundle: t, onDelete: s, isOpen: d } = n, { id: l, name: a } = t;
766
770
  return /* @__PURE__ */ he(
767
- ye,
771
+ _e,
768
772
  {
769
773
  ...n,
770
- "data-testid": c.ACCORDION_ITEM + d,
774
+ "data-testid": c.ACCORDION_ITEM + l,
771
775
  title: a,
772
- key: d,
776
+ key: l,
773
777
  tools: [
774
778
  /* @__PURE__ */ e.jsx(
775
779
  F,
@@ -794,22 +798,22 @@ const J = [
794
798
  )
795
799
  ]
796
800
  },
797
- /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(Vn, { bundle: t, isOpen: !!l }) })
801
+ /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(Vn, { bundle: t, isOpen: !!d }) })
798
802
  );
799
803
  }, Nn = (n, t) => {
800
804
  const s = n.get(Q);
801
- return !t || !t.length || !s ? 0 : t.reduce((l, d, a) => d.id === s ? a : l, 0);
805
+ return !t || !t.length || !s ? 0 : t.reduce((d, l, a) => l.id === s ? a : d, 0);
802
806
  }, Tn = ({ bundles: n, onDelete: t, isLoading: s }) => {
803
- const l = q(), d = Nn(l, n);
807
+ const d = q(), l = Nn(d, n);
804
808
  return /* @__PURE__ */ e.jsxs(N, { show: s, children: [
805
- /* @__PURE__ */ e.jsx(pe, { accordionClass: "bundles", defaultOpenPageIndex: d, children: (n || []).map((a) => /* @__PURE__ */ e.jsx(Dn, { bundle: a, onDelete: t }, a.name)) }, d),
809
+ /* @__PURE__ */ e.jsx(ye, { accordionClass: "bundles", defaultOpenPageIndex: l, children: (n || []).map((a) => /* @__PURE__ */ e.jsx(Dn, { bundle: a, onDelete: t }, a.name)) }, l),
806
810
  !s && (!n || !n.length) && /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleManagement.noBundles", children: "There are currently no bundles" })
807
811
  ] });
808
812
  }, vn = (n, t) => /* @__PURE__ */ e.jsx("div", { "data-testid": c.DELETE_BUNDLE_DIALOG, children: t || /* @__PURE__ */ e.jsx("p", { children: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundlemanagement.deleteBundleModalBodyError", children: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
809
813
  "The bundle ",
810
814
  /* @__PURE__ */ e.jsx("strong", { children: n }),
811
815
  " cannot be deleted."
812
- ] }) }) }) }), _n = (n, t) => /* @__PURE__ */ e.jsxs("div", { "data-testid": c.DELETE_BUNDLE_DIALOG, children: [
816
+ ] }) }) }) }), pn = (n, t) => /* @__PURE__ */ e.jsxs("div", { "data-testid": c.DELETE_BUNDLE_DIALOG, children: [
813
817
  /* @__PURE__ */ e.jsx("p", { "data-testid": "deleteBundleModalBody1", children: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundlemanagement.deleteBundleModalBody1", children: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
814
818
  "Do you really want to delete the bundle ",
815
819
  /* @__PURE__ */ e.jsx("strong", { children: n }),
@@ -821,47 +825,47 @@ const J = [
821
825
  " version(s) and the associated files."
822
826
  ] }) }) }),
823
827
  /* @__PURE__ */ e.jsx("p", { "data-testid": "deleteBundleModalBody3", children: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundlemanagement.deleteBundleModalBody3", children: "This action cannot be undone." }) })
824
- ] }), yn = ({ bundle: n, canBeDeleted: t, error: s, processing: l }) => {
828
+ ] }), _n = ({ bundle: n, canBeDeleted: t, error: s, processing: d }) => {
825
829
  const {
826
- run: d,
830
+ run: l,
827
831
  data: a,
828
832
  loading: i
829
833
  } = g({
830
834
  requestFunction: W
831
835
  });
832
836
  return D(() => {
833
- t && d(n.id);
834
- }, [d, n, t]), /* @__PURE__ */ e.jsx(N, { show: l || i, children: /* @__PURE__ */ e.jsx(
837
+ t && l(n.id);
838
+ }, [l, n, t]), /* @__PURE__ */ e.jsx(N, { show: d || i, children: /* @__PURE__ */ e.jsx(
835
839
  "div",
836
840
  {
837
841
  style: {
838
842
  minHeight: 50
839
843
  },
840
- children: !l && !i && (t ? _n(n.name, a ? a.totalElements.toString() : void 0) : vn(n.name, s))
844
+ children: !d && !i && (t ? pn(n.name, a ? a.totalElements.toString() : void 0) : vn(n.name, s))
841
845
  }
842
846
  ) });
843
- }, pn = [ke], Cn = [Je], Ln = ({ bundle: n, onCancel: t, loadBundles: s }) => {
844
- const { run: l } = g({
847
+ }, yn = [ke], Cn = [Je], Ln = ({ bundle: n, onCancel: t, loadBundles: s }) => {
848
+ const { run: d } = g({
845
849
  requestFunction: Ve,
846
- errorMessages: pn,
850
+ errorMessages: yn,
847
851
  successMessages: Cn
848
- }), d = Ae(n), a = () => l(n.id).then(s).then(t);
852
+ }), l = Ae(n), a = () => d(n.id).then(s).then(t);
849
853
  return /* @__PURE__ */ e.jsx(
850
- _,
854
+ p,
851
855
  {
852
856
  header: /* @__PURE__ */ e.jsx(r, { i18nKey: k.id, children: k.defaultValue }),
853
- content: /* @__PURE__ */ e.jsx(yn, { bundle: n, ...d }),
857
+ content: /* @__PURE__ */ e.jsx(_n, { bundle: n, ...l }),
854
858
  footer: /* @__PURE__ */ e.jsxs("div", { children: [
855
- /* @__PURE__ */ e.jsx(j, { primary: !0, disabled: !d.canBeDeleted, onClick: a, children: /* @__PURE__ */ e.jsx(r, { i18nKey: C.id, children: C.defaultValue }) }),
859
+ /* @__PURE__ */ e.jsx(j, { primary: !0, disabled: !l.canBeDeleted, onClick: a, children: /* @__PURE__ */ e.jsx(r, { i18nKey: C.id, children: C.defaultValue }) }),
856
860
  /* @__PURE__ */ e.jsx(j, { onClick: t, children: /* @__PURE__ */ e.jsx(r, { i18nKey: L.id, children: L.defaultValue }) })
857
861
  ] }),
858
862
  width: 500
859
863
  }
860
864
  );
861
- }, Sn = [Ue], Pn = () => {
865
+ }, Sn = [Ue], zn = () => {
862
866
  const n = me(), [t, s] = V(!1), {
863
- data: l,
864
- loading: d,
867
+ data: d,
868
+ loading: l,
865
869
  run: a
866
870
  } = g({
867
871
  requestFunction: De,
@@ -891,7 +895,7 @@ const J = [
891
895
  onClick: h
892
896
  }
893
897
  ),
894
- /* @__PURE__ */ e.jsx(Tn, { bundles: l, onDelete: u, isLoading: d }),
898
+ /* @__PURE__ */ e.jsx(Tn, { bundles: d, onDelete: u, isLoading: l }),
895
899
  i && /* @__PURE__ */ e.jsx(
896
900
  Ln,
897
901
  {
@@ -904,5 +908,5 @@ const J = [
904
908
  ] });
905
909
  };
906
910
  export {
907
- Pn as default
911
+ zn as default
908
912
  };