@deviceinsight/ng-ui-scale-lib 9.18.8 → 9.19.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.
- package/dist/{AccessEditModal-a02b50a1.js → AccessEditModal-38c11d48.js} +12 -11
- package/dist/{BundleManagementContainer-dbac0259.js → BundleManagementContainer-0efa3cec.js} +1 -1
- package/dist/{BundlesContainer-498d7121.js → BundlesContainer-ff572d82.js} +92 -91
- package/dist/{ContextBarContext-f2968fee.js → ContextBarContext-0565a593.js} +8447 -8361
- package/dist/{DatapointImport-0610eed8.js → DatapointImport-2deee17a.js} +35 -34
- package/dist/{FileUploadInput-aea4f866.js → FileUploadInput-87e9d774.js} +1 -1
- package/dist/{Files-25853de9.js → Files-f6c464c2.js} +28 -27
- package/dist/{GlobalPowerBiReports-06c92d0e.js → GlobalPowerBiReports-f448278b.js} +1 -1
- package/dist/{Graph-ad8ad6f9.js → Graph-fce6bde2.js} +1 -1
- package/dist/{JsonSettingWidget-c471537a.js → JsonSettingWidget-0360cf69.js} +2 -2
- package/dist/{LicensesEditPage-e6c71c43.js → LicensesEditPage-effb07a9.js} +1 -1
- package/dist/{LicensesList-d28c9799.js → LicensesList-7832868c.js} +6 -5
- package/dist/{PropertiesEditPage-85bc5517.js → PropertiesEditPage-e84dd613.js} +2 -2
- package/dist/{PropertiesList-fcf0d837.js → PropertiesList-e8f218de.js} +6 -5
- package/dist/{TemplateEditPage-a34efc41.js → TemplateEditPage-a3994735.js} +19 -17
- package/dist/{TemplateTextInput-fe5912e7.js → TemplateTextInput-712d3528.js} +2 -2
- package/dist/{TemplatesListPage-ce7fea1d.js → TemplatesListPage-86d0d508.js} +4 -3
- package/dist/{UserGroupAssignments-8fd3c47d.js → UserGroupAssignments-b2e98796.js} +3 -2
- package/dist/{UserGroupTheme-0e8a16c4.js → UserGroupTheme-6e262174.js} +2 -2
- package/dist/api.js +2 -2
- package/dist/{index-e2b27256.js → index-8f79799f.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{react-router-7b367edf.js → react-router-824f2efe.js} +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { aA as g, aj as y, a_ as w, az as e, ai as r, bR as I, di as U, dj as _, dk as O, cj as
|
|
2
|
-
import { useState as f, useContext as
|
|
3
|
-
import { Modal as
|
|
1
|
+
import { aA as g, aj as y, a_ as w, az as e, ai as r, bR as I, di as U, dj as _, dk as O, cj as b, dl as m } from "./ContextBarContext-0565a593.js";
|
|
2
|
+
import { useState as f, useContext as E, useMemo as M } from "react";
|
|
3
|
+
import { Modal as k, SpinnerContainer as K, Button as x } from "@deviceinsight/ng-ui-basic-components";
|
|
4
4
|
import { InfoBox as F } from "@deviceinsight/ng-ui-components";
|
|
5
5
|
import { searchUserGroups as R } from "@deviceinsight/ng-ui-api-client";
|
|
6
6
|
const W = "usergroupsWithoutAccessToTemplate";
|
|
7
7
|
function z(o) {
|
|
8
8
|
return {
|
|
9
|
-
fields:
|
|
9
|
+
fields: b,
|
|
10
10
|
search: (s, t) => R(o(s), t)
|
|
11
11
|
};
|
|
12
12
|
}
|
|
@@ -17,15 +17,15 @@ function L(o, s) {
|
|
|
17
17
|
) : m(o, !0);
|
|
18
18
|
}
|
|
19
19
|
function q({ onSave: o, onCancel: s, loading: t, template: n }) {
|
|
20
|
-
const [i, T] = f([]), [
|
|
20
|
+
const [i, T] = f([]), [a, S] = f(!0), { user: u } = E(g), l = n && n.accountGroupsWithAccess || [], C = a ? u.accountGroupIds ?? [] : null, G = M(
|
|
21
21
|
() => Math.random(),
|
|
22
22
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
23
|
-
[
|
|
23
|
+
[a]
|
|
24
24
|
), { t: d } = y(), h = w(["ACCESS_TO_ALL_NOTIFICATION_TEMPLATES"]), j = (n == null ? void 0 : n.accountGroupsWithAccess) ?? [], p = [...i, ...j].some(
|
|
25
|
-
(
|
|
25
|
+
(c) => u.accountGroupIds.includes(c)
|
|
26
26
|
), A = !h && !p || t;
|
|
27
27
|
return /* @__PURE__ */ e.jsx(
|
|
28
|
-
|
|
28
|
+
k,
|
|
29
29
|
{
|
|
30
30
|
onOutsideClick: s,
|
|
31
31
|
header: /* @__PURE__ */ e.jsx(r, { i18nKey: "notificationTemplate.access.modal.title", children: "Authorize User Groups to access this template" }),
|
|
@@ -47,7 +47,7 @@ function q({ onSave: o, onCancel: s, loading: t, template: n }) {
|
|
|
47
47
|
searchContext: W,
|
|
48
48
|
searchConfig: z(L(l, C)),
|
|
49
49
|
columnDefinitions: _(!0),
|
|
50
|
-
uniqueItemKey: (
|
|
50
|
+
uniqueItemKey: (c) => c.id,
|
|
51
51
|
pageSize: 5,
|
|
52
52
|
onSelectSome: T,
|
|
53
53
|
updateTrigger: G,
|
|
@@ -58,7 +58,7 @@ function q({ onSave: o, onCancel: s, loading: t, template: n }) {
|
|
|
58
58
|
flexGrow: 1,
|
|
59
59
|
marginLeft: "50px"
|
|
60
60
|
},
|
|
61
|
-
value:
|
|
61
|
+
value: a,
|
|
62
62
|
onChange: S,
|
|
63
63
|
label: d("notificationTemplate.access.modal.showOnlyMyGroups", {
|
|
64
64
|
defaultValue: "Show only my groups"
|
|
@@ -66,7 +66,8 @@ function q({ onSave: o, onCancel: s, loading: t, template: n }) {
|
|
|
66
66
|
horizontal: !0
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
searchInputScope: "notification-template-access-modal"
|
|
69
|
+
searchInputScope: "notification-template-access-modal",
|
|
70
|
+
tableName: "notification-template-access-modal-table"
|
|
70
71
|
}
|
|
71
72
|
),
|
|
72
73
|
/* @__PURE__ */ e.jsx(r, { i18nKey: "notificationTemplate.access.modal.note", children: "Please select User Groups to authorise them to access and work with this template." })
|
package/dist/{BundleManagementContainer-dbac0259.js → BundleManagementContainer-0efa3cec.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { by as n, az as r } from "./ContextBarContext-
|
|
1
|
+
import { by as n, az as r } from "./ContextBarContext-0565a593.js";
|
|
2
2
|
import { useContext as m, useEffect as s } from "react";
|
|
3
3
|
import { useLocation as a } from "react-router-dom";
|
|
4
4
|
import { messageBoxDismissGroup as i } from "@deviceinsight/ng-ui-components";
|
|
@@ -1,19 +1,19 @@
|
|
|
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-
|
|
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-0565a593.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
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";
|
|
7
7
|
import { B as c, Q, a as Ce } from "./consts-012135e5.js";
|
|
8
|
-
import { F as Le } from "./FileUploadInput-
|
|
8
|
+
import { F as Le } from "./FileUploadInput-87e9d774.js";
|
|
9
9
|
import { u as Se, b as Ae } from "./useCanDeleteBundleVersion-64f35949.js";
|
|
10
10
|
import "react-dom";
|
|
11
11
|
const Y = (n) => {
|
|
12
12
|
n && setTimeout(() => n.focus(), 0);
|
|
13
13
|
}, Z = (n, t) => {
|
|
14
14
|
D(() => {
|
|
15
|
-
const s = (
|
|
16
|
-
t || (
|
|
15
|
+
const s = (d) => {
|
|
16
|
+
t || (d.code === "Enter" || d.code === "NumpadEnter") && n();
|
|
17
17
|
};
|
|
18
18
|
return document.addEventListener("keydown", s), () => {
|
|
19
19
|
document.removeEventListener("keydown", s);
|
|
@@ -21,8 +21,8 @@ const Y = (n) => {
|
|
|
21
21
|
}, [n, t]);
|
|
22
22
|
}, Ie = ({ setOpen: n, loadBundles: t }) => {
|
|
23
23
|
const { t: s } = S(), {
|
|
24
|
-
handleSubmit:
|
|
25
|
-
control:
|
|
24
|
+
handleSubmit: d,
|
|
25
|
+
control: l,
|
|
26
26
|
formState: { isSubmitting: a }
|
|
27
27
|
} = P({ defaultValues: { name: "" } }), i = (o) => xe(o).then(() => {
|
|
28
28
|
t(), n(!1), $(
|
|
@@ -30,7 +30,7 @@ const Y = (n) => {
|
|
|
30
30
|
);
|
|
31
31
|
}).catch((h) => {
|
|
32
32
|
console.error("bundle creation error", h), H(/* @__PURE__ */ e.jsx(r, { i18nKey: "bundlemanagement.createBundleError", children: "Could not save bundle" }));
|
|
33
|
-
}), u = () =>
|
|
33
|
+
}), u = () => d(i, (o) => {
|
|
34
34
|
console.warn("Validation error", o);
|
|
35
35
|
})();
|
|
36
36
|
return Z(u, !1), /* @__PURE__ */ e.jsx(
|
|
@@ -42,7 +42,7 @@ const Y = (n) => {
|
|
|
42
42
|
A,
|
|
43
43
|
{
|
|
44
44
|
name: "name",
|
|
45
|
-
control:
|
|
45
|
+
control: l,
|
|
46
46
|
rules: {
|
|
47
47
|
required: s("bundleManagement.bundles.name.required", {
|
|
48
48
|
defaultValue: "Name is required"
|
|
@@ -92,15 +92,15 @@ const Y = (n) => {
|
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
94
|
}, O = (n, t, s) => {
|
|
95
|
-
n && n.some((
|
|
95
|
+
n && n.some((d) => !d.condition || d.condition(s) ? (t(/* @__PURE__ */ e.jsx(r, { i18nKey: d.id, children: d.defaultValue })), !0) : !1);
|
|
96
96
|
};
|
|
97
97
|
function g({
|
|
98
98
|
requestFunction: n,
|
|
99
99
|
errorMessages: t,
|
|
100
100
|
successMessages: s,
|
|
101
|
-
initialData:
|
|
101
|
+
initialData: d
|
|
102
102
|
}) {
|
|
103
|
-
const [
|
|
103
|
+
const [l, a] = V(d), [i, u] = V(!1), [o, h] = V(void 0), m = ce(!0), b = ue(async (...B) => {
|
|
104
104
|
try {
|
|
105
105
|
h(void 0), u(!0);
|
|
106
106
|
const f = await n(...B);
|
|
@@ -113,25 +113,25 @@ function g({
|
|
|
113
113
|
}, [n, t, s]);
|
|
114
114
|
return D(() => (m.current = !0, () => {
|
|
115
115
|
m.current = !1;
|
|
116
|
-
}), [n, t, s]), { run: b, data:
|
|
116
|
+
}), [n, t, s]), { run: b, data: l, loading: i, error: o };
|
|
117
117
|
}
|
|
118
118
|
const K = (n) => n ? /* @__PURE__ */ e.jsx("span", { children: re(n, { showTimezone: !1 }) }) : "-", Fe = ({
|
|
119
119
|
onViewDetails: n,
|
|
120
120
|
onDelete: t,
|
|
121
121
|
onEdit: s
|
|
122
|
-
},
|
|
122
|
+
}, d) => [
|
|
123
123
|
{
|
|
124
124
|
name: "name",
|
|
125
125
|
label: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.name", children: "Name" }),
|
|
126
126
|
sortable: !0,
|
|
127
|
-
render: (
|
|
127
|
+
render: (l) => /* @__PURE__ */ e.jsx(
|
|
128
128
|
"a",
|
|
129
129
|
{
|
|
130
130
|
href: "edit",
|
|
131
131
|
onClick: (a) => {
|
|
132
|
-
a.preventDefault(), n(
|
|
132
|
+
a.preventDefault(), n(l.id);
|
|
133
133
|
},
|
|
134
|
-
children:
|
|
134
|
+
children: l.name
|
|
135
135
|
}
|
|
136
136
|
),
|
|
137
137
|
width: "15%"
|
|
@@ -140,48 +140,48 @@ const K = (n) => n ? /* @__PURE__ */ e.jsx("span", { children: re(n, { showTimez
|
|
|
140
140
|
name: "description",
|
|
141
141
|
label: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.description", children: "Description" }),
|
|
142
142
|
sortable: !0,
|
|
143
|
-
render: ({ description:
|
|
143
|
+
render: ({ description: l }) => /* @__PURE__ */ e.jsx("span", { children: l }),
|
|
144
144
|
width: "20%"
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
name: "fileCount",
|
|
148
148
|
label: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.files", children: "Files" }),
|
|
149
149
|
sortable: !0,
|
|
150
|
-
render: ({ fileCount:
|
|
150
|
+
render: ({ fileCount: l }) => /* @__PURE__ */ e.jsx("span", { children: l || "-" }),
|
|
151
151
|
width: "10%"
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
154
|
name: "draft",
|
|
155
155
|
label: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.status", children: "Status" }),
|
|
156
156
|
sortable: !0,
|
|
157
|
-
render: ({ draft:
|
|
157
|
+
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
158
|
width: "10%"
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
name: "createdAt",
|
|
162
162
|
label: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.createdAt", children: "Created at" }),
|
|
163
163
|
sortable: !0,
|
|
164
|
-
render: ({ createdAt:
|
|
164
|
+
render: ({ createdAt: l }) => /* @__PURE__ */ e.jsx("span", { children: K(l) })
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
167
|
name: "releasedAt",
|
|
168
168
|
label: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.releasedAt", children: "Published at" }),
|
|
169
169
|
sortable: !0,
|
|
170
|
-
render: ({ releasedAt:
|
|
170
|
+
render: ({ releasedAt: l }) => /* @__PURE__ */ e.jsx("span", { children: l ? K(l) : "-" })
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
name: "delete",
|
|
174
174
|
label: "",
|
|
175
175
|
width: "5%",
|
|
176
176
|
align: "right",
|
|
177
|
-
render: (
|
|
178
|
-
|
|
177
|
+
render: (l) => /* @__PURE__ */ e.jsx(F, { authorities: ["WRITE_BUNDLE"], children: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
178
|
+
l.draft && /* @__PURE__ */ e.jsx(
|
|
179
179
|
j,
|
|
180
180
|
{
|
|
181
181
|
naked: !0,
|
|
182
182
|
small: !0,
|
|
183
|
-
onClick: () => s(
|
|
184
|
-
title:
|
|
183
|
+
onClick: () => s(l.id),
|
|
184
|
+
title: d("bundleversion.edit", {
|
|
185
185
|
defaultValue: "Edit Bundle Version"
|
|
186
186
|
}),
|
|
187
187
|
"data-testid": c.DELETE_VERSION_ICON,
|
|
@@ -193,10 +193,10 @@ const K = (n) => n ? /* @__PURE__ */ e.jsx("span", { children: re(n, { showTimez
|
|
|
193
193
|
{
|
|
194
194
|
naked: !0,
|
|
195
195
|
small: !0,
|
|
196
|
-
onClick: () => t(
|
|
197
|
-
title:
|
|
196
|
+
onClick: () => t(l),
|
|
197
|
+
title: d("bundleversion.delete", {
|
|
198
198
|
defaultValue: "Delete Bundle Version",
|
|
199
|
-
version:
|
|
199
|
+
version: l.name
|
|
200
200
|
}),
|
|
201
201
|
"data-testid": c.DELETE_VERSION_ICON,
|
|
202
202
|
children: /* @__PURE__ */ e.jsx(v, { del: !0 })
|
|
@@ -206,7 +206,7 @@ const K = (n) => n ? /* @__PURE__ */ e.jsx("span", { children: re(n, { showTimez
|
|
|
206
206
|
}
|
|
207
207
|
], Me = /^[a-zA-Z0-9_.-]*$/;
|
|
208
208
|
function we({ header: n, formContext: t, onSubmit: s }) {
|
|
209
|
-
const { t:
|
|
209
|
+
const { t: d } = S(), { control: l } = t;
|
|
210
210
|
return Z(s, !1), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
211
211
|
/* @__PURE__ */ e.jsx(
|
|
212
212
|
"h3",
|
|
@@ -222,20 +222,20 @@ function we({ header: n, formContext: t, onSubmit: s }) {
|
|
|
222
222
|
A,
|
|
223
223
|
{
|
|
224
224
|
name: "name",
|
|
225
|
-
control:
|
|
225
|
+
control: l,
|
|
226
226
|
rules: {
|
|
227
|
-
required:
|
|
227
|
+
required: d("version.name.required", {
|
|
228
228
|
defaultValue: "Name is required."
|
|
229
229
|
}),
|
|
230
230
|
pattern: {
|
|
231
231
|
value: Me,
|
|
232
|
-
message:
|
|
232
|
+
message: d("version.name.pattern", {
|
|
233
233
|
defaultValue: "Name can only contain latin characters, number, dots and underscores."
|
|
234
234
|
})
|
|
235
235
|
},
|
|
236
236
|
maxLength: {
|
|
237
237
|
value: 50,
|
|
238
|
-
message:
|
|
238
|
+
message: d("version.name.maxLength", {
|
|
239
239
|
defaultValue: "Name cannot be longer than 50 characters"
|
|
240
240
|
})
|
|
241
241
|
}
|
|
@@ -259,11 +259,11 @@ function we({ header: n, formContext: t, onSubmit: s }) {
|
|
|
259
259
|
A,
|
|
260
260
|
{
|
|
261
261
|
name: "description",
|
|
262
|
-
control:
|
|
262
|
+
control: l,
|
|
263
263
|
rules: {
|
|
264
264
|
maxLength: {
|
|
265
265
|
value: 250,
|
|
266
|
-
message:
|
|
266
|
+
message: d("version.description.maxLength", {
|
|
267
267
|
defaultValue: "Description cannot be longer than 250 characters"
|
|
268
268
|
})
|
|
269
269
|
}
|
|
@@ -374,10 +374,11 @@ const J = [
|
|
|
374
374
|
Ne,
|
|
375
375
|
{
|
|
376
376
|
columnDefs: t,
|
|
377
|
-
uniqueItemKey: (
|
|
377
|
+
uniqueItemKey: (d) => `${d.name}_${d.size}`,
|
|
378
378
|
paginationSettings: Re,
|
|
379
379
|
items: n,
|
|
380
|
-
isLoading: s
|
|
380
|
+
isLoading: s,
|
|
381
|
+
tableName: "files"
|
|
381
382
|
}
|
|
382
383
|
)
|
|
383
384
|
] }) }), ne = ({ bundle: n, version: t }) => /* @__PURE__ */ e.jsxs("div", { className: "bundle-version-info", children: [
|
|
@@ -432,7 +433,7 @@ const J = [
|
|
|
432
433
|
}, Ye = "DUPLICATE_FILE_NAME", Ze = ({
|
|
433
434
|
bundle: n,
|
|
434
435
|
version: t,
|
|
435
|
-
fileLoader: { run: s, data:
|
|
436
|
+
fileLoader: { run: s, data: d, loading: l }
|
|
436
437
|
}) => {
|
|
437
438
|
const { t: a } = S(), i = t ? t.id : "", { run: u, loading: o } = g({
|
|
438
439
|
requestFunction: je,
|
|
@@ -454,8 +455,8 @@ const J = [
|
|
|
454
455
|
/* @__PURE__ */ e.jsx(
|
|
455
456
|
ee,
|
|
456
457
|
{
|
|
457
|
-
isLoading: o || m ||
|
|
458
|
-
files:
|
|
458
|
+
isLoading: o || m || l,
|
|
459
|
+
files: d || [],
|
|
459
460
|
columnDefs: f
|
|
460
461
|
}
|
|
461
462
|
),
|
|
@@ -472,7 +473,7 @@ const J = [
|
|
|
472
473
|
}
|
|
473
474
|
}
|
|
474
475
|
},
|
|
475
|
-
|
|
476
|
+
d ? d.length : 1
|
|
476
477
|
) })
|
|
477
478
|
] });
|
|
478
479
|
}, Je = {
|
|
@@ -496,21 +497,21 @@ const J = [
|
|
|
496
497
|
}, R = {
|
|
497
498
|
id: "bundlemanagement.modalSaveAndProceedButton",
|
|
498
499
|
defaultValue: "Save and Proceed"
|
|
499
|
-
}, nn = [te], tn = [se], sn = [ze],
|
|
500
|
-
const
|
|
500
|
+
}, nn = [te], tn = [se], sn = [ze], ln = [Ge], dn = [en], rn = ({ bundle: n, versionId: t, setVersionId: s, onClose: d }) => {
|
|
501
|
+
const l = P({
|
|
501
502
|
defaultValues: {
|
|
502
503
|
name: "",
|
|
503
504
|
description: ""
|
|
504
505
|
}
|
|
505
|
-
}), { handleSubmit: a } =
|
|
506
|
+
}), { handleSubmit: a } = l, i = (f) => ge(n.id, f).then((E) => s(E.id)), u = () => a(i, (f) => {
|
|
506
507
|
console.warn("Validation error", f);
|
|
507
508
|
})(), o = g({
|
|
508
509
|
requestFunction: u,
|
|
509
510
|
errorMessages: sn
|
|
510
511
|
}), h = g({
|
|
511
512
|
requestFunction: Ee,
|
|
512
|
-
errorMessages:
|
|
513
|
-
successMessages:
|
|
513
|
+
errorMessages: ln,
|
|
514
|
+
successMessages: dn
|
|
514
515
|
}), m = g({
|
|
515
516
|
requestFunction: G,
|
|
516
517
|
errorMessages: nn
|
|
@@ -531,7 +532,7 @@ const J = [
|
|
|
531
532
|
N,
|
|
532
533
|
{
|
|
533
534
|
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:
|
|
535
|
+
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
536
|
}
|
|
536
537
|
),
|
|
537
538
|
footer: t ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
@@ -539,24 +540,24 @@ const J = [
|
|
|
539
540
|
j,
|
|
540
541
|
{
|
|
541
542
|
primary: !0,
|
|
542
|
-
onClick: () => h.run(n.id, t || "").then(
|
|
543
|
+
onClick: () => h.run(n.id, t || "").then(d),
|
|
543
544
|
disabled: !B || h.loading,
|
|
544
545
|
children: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundlemanagement.publish", children: "Publish" })
|
|
545
546
|
}
|
|
546
547
|
),
|
|
547
|
-
/* @__PURE__ */ e.jsx(j, { onClick:
|
|
548
|
+
/* @__PURE__ */ e.jsx(j, { onClick: d, "data-testid": c.CANCEL_SAVE_VERSION_BUTTON, children: /* @__PURE__ */ e.jsx(r, { i18nKey: p.id, children: p.defaultValue }) })
|
|
548
549
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
549
550
|
/* @__PURE__ */ e.jsx(
|
|
550
551
|
j,
|
|
551
552
|
{
|
|
552
553
|
primary: !0,
|
|
553
554
|
onClick: o.run,
|
|
554
|
-
disabled:
|
|
555
|
+
disabled: l.formState.isSubmitting || o.loading,
|
|
555
556
|
"data-testid": c.SAVE_VERSION_BUTTON,
|
|
556
557
|
children: /* @__PURE__ */ e.jsx(r, { i18nKey: R.id, children: R.defaultValue })
|
|
557
558
|
}
|
|
558
559
|
),
|
|
559
|
-
/* @__PURE__ */ e.jsx(j, { onClick:
|
|
560
|
+
/* @__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
561
|
] })
|
|
561
562
|
}
|
|
562
563
|
);
|
|
@@ -574,20 +575,20 @@ const J = [
|
|
|
574
575
|
"Do you really want to delete the version ",
|
|
575
576
|
/* @__PURE__ */ e.jsx("strong", { children: n }),
|
|
576
577
|
"?"
|
|
577
|
-
] }) }) }) }), cn = ({ version: n, canBeDeleted: t, error: s, processing:
|
|
578
|
+
] }) }) }) }), cn = ({ version: n, canBeDeleted: t, error: s, processing: d }) => /* @__PURE__ */ e.jsx(N, { show: d, children: /* @__PURE__ */ e.jsx(
|
|
578
579
|
"div",
|
|
579
580
|
{
|
|
580
581
|
style: {
|
|
581
582
|
minHeight: 50
|
|
582
583
|
},
|
|
583
|
-
children: !
|
|
584
|
+
children: !d && (t ? on(n.name) : an(n.name, s))
|
|
584
585
|
}
|
|
585
|
-
) }), un = [qe], hn = [Xe], mn = ({ bundle: n, version: t, onCancel: s, loadVersions:
|
|
586
|
-
const { run:
|
|
586
|
+
) }), un = [qe], hn = [Xe], mn = ({ bundle: n, version: t, onCancel: s, loadVersions: d }) => {
|
|
587
|
+
const { run: l } = g({
|
|
587
588
|
requestFunction: Be,
|
|
588
589
|
errorMessages: un,
|
|
589
590
|
successMessages: hn
|
|
590
|
-
}), a = Se(n, t), i = () =>
|
|
591
|
+
}), a = Se(n, t), i = () => l(n.id, t.id).then(d).then(s);
|
|
591
592
|
return /* @__PURE__ */ e.jsx(
|
|
592
593
|
_,
|
|
593
594
|
{
|
|
@@ -600,9 +601,9 @@ const J = [
|
|
|
600
601
|
width: 500
|
|
601
602
|
}
|
|
602
603
|
);
|
|
603
|
-
}, xn = [te], jn = [se], fn = ({ bundle: n, versionId: t, onClose: s, t:
|
|
604
|
+
}, xn = [te], jn = [se], fn = ({ bundle: n, versionId: t, onClose: s, t: d }) => {
|
|
604
605
|
const {
|
|
605
|
-
run:
|
|
606
|
+
run: l,
|
|
606
607
|
data: a,
|
|
607
608
|
loading: i
|
|
608
609
|
} = g({
|
|
@@ -621,10 +622,10 @@ const J = [
|
|
|
621
622
|
window.location.replace(f.downloadLink);
|
|
622
623
|
}),
|
|
623
624
|
errorMessages: [Pe]
|
|
624
|
-
}), b = Ke(m,
|
|
625
|
+
}), b = Ke(m, d);
|
|
625
626
|
return D(() => {
|
|
626
|
-
t && (
|
|
627
|
-
}, [u,
|
|
627
|
+
t && (l(n.id, t), u(n.id, t));
|
|
628
|
+
}, [u, l, t, n]), /* @__PURE__ */ e.jsx(
|
|
628
629
|
_,
|
|
629
630
|
{
|
|
630
631
|
width: 500,
|
|
@@ -645,7 +646,7 @@ const J = [
|
|
|
645
646
|
);
|
|
646
647
|
}, En = {
|
|
647
648
|
getRowClass: (n) => n.draft ? "draft" : "released"
|
|
648
|
-
}, gn = ({ columnDefs: n, paginationSettings: t, setPaginationSettings: s, versions:
|
|
649
|
+
}, gn = ({ columnDefs: n, paginationSettings: t, setPaginationSettings: s, versions: d, loading: l }) => /* @__PURE__ */ e.jsx(N, { show: l, children: /* @__PURE__ */ e.jsxs(
|
|
649
650
|
"div",
|
|
650
651
|
{
|
|
651
652
|
className: "bundle-version-table",
|
|
@@ -655,7 +656,7 @@ const J = [
|
|
|
655
656
|
children: [
|
|
656
657
|
/* @__PURE__ */ e.jsxs("h2", { children: [
|
|
657
658
|
/* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.title", children: "Versions" }),
|
|
658
|
-
/* @__PURE__ */ e.jsx(X, { count:
|
|
659
|
+
/* @__PURE__ */ e.jsx(X, { count: d && d.totalElements })
|
|
659
660
|
] }),
|
|
660
661
|
/* @__PURE__ */ e.jsx(
|
|
661
662
|
Te,
|
|
@@ -672,7 +673,7 @@ const J = [
|
|
|
672
673
|
direction: i
|
|
673
674
|
}
|
|
674
675
|
}),
|
|
675
|
-
pageable:
|
|
676
|
+
pageable: d,
|
|
676
677
|
rowDef: En,
|
|
677
678
|
"data-testid": "bundle-versions-table"
|
|
678
679
|
}
|
|
@@ -687,10 +688,10 @@ const J = [
|
|
|
687
688
|
direction: "DESC"
|
|
688
689
|
}
|
|
689
690
|
}, bn = [We], Vn = ({ bundle: n, isOpen: t }) => {
|
|
690
|
-
const { t: s } = S(), [
|
|
691
|
+
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
692
|
D(() => {
|
|
692
|
-
const
|
|
693
|
-
w &&
|
|
693
|
+
const de = x.get(Q), w = x.get(Ce);
|
|
694
|
+
w && de === n.id && i(w);
|
|
694
695
|
}, [x, n]);
|
|
695
696
|
const b = Fe(
|
|
696
697
|
{
|
|
@@ -702,7 +703,7 @@ const J = [
|
|
|
702
703
|
), [B, f] = V(Bn), {
|
|
703
704
|
run: E,
|
|
704
705
|
data: y,
|
|
705
|
-
loading:
|
|
706
|
+
loading: le
|
|
706
707
|
} = g({
|
|
707
708
|
requestFunction: W,
|
|
708
709
|
errorMessages: bn
|
|
@@ -717,13 +718,13 @@ const J = [
|
|
|
717
718
|
paginationSettings: B,
|
|
718
719
|
setPaginationSettings: f,
|
|
719
720
|
columnDefs: b,
|
|
720
|
-
loading:
|
|
721
|
+
loading: le
|
|
721
722
|
}
|
|
722
723
|
),
|
|
723
724
|
/* @__PURE__ */ e.jsx(F, { authorities: ["WRITE_BUNDLE"], children: /* @__PURE__ */ e.jsxs(
|
|
724
725
|
j,
|
|
725
726
|
{
|
|
726
|
-
onClick: () =>
|
|
727
|
+
onClick: () => l(!0),
|
|
727
728
|
"data-testid": c.CREATE_VERSION_BUTTON,
|
|
728
729
|
children: [
|
|
729
730
|
/* @__PURE__ */ e.jsx(v, { add: !0 }),
|
|
@@ -740,14 +741,14 @@ const J = [
|
|
|
740
741
|
loadVersions: M
|
|
741
742
|
}
|
|
742
743
|
),
|
|
743
|
-
(
|
|
744
|
+
(d || u) && /* @__PURE__ */ e.jsx(
|
|
744
745
|
rn,
|
|
745
746
|
{
|
|
746
747
|
bundle: n,
|
|
747
748
|
versionId: u,
|
|
748
749
|
setVersionId: o,
|
|
749
750
|
onClose: () => {
|
|
750
|
-
|
|
751
|
+
l(!1), o(void 0), M();
|
|
751
752
|
}
|
|
752
753
|
}
|
|
753
754
|
),
|
|
@@ -762,14 +763,14 @@ const J = [
|
|
|
762
763
|
)
|
|
763
764
|
] });
|
|
764
765
|
}, Dn = (n) => {
|
|
765
|
-
const { bundle: t, onDelete: s, isOpen:
|
|
766
|
+
const { bundle: t, onDelete: s, isOpen: d } = n, { id: l, name: a } = t;
|
|
766
767
|
return /* @__PURE__ */ he(
|
|
767
768
|
ye,
|
|
768
769
|
{
|
|
769
770
|
...n,
|
|
770
|
-
"data-testid": c.ACCORDION_ITEM +
|
|
771
|
+
"data-testid": c.ACCORDION_ITEM + l,
|
|
771
772
|
title: a,
|
|
772
|
-
key:
|
|
773
|
+
key: l,
|
|
773
774
|
tools: [
|
|
774
775
|
/* @__PURE__ */ e.jsx(
|
|
775
776
|
F,
|
|
@@ -794,15 +795,15 @@ const J = [
|
|
|
794
795
|
)
|
|
795
796
|
]
|
|
796
797
|
},
|
|
797
|
-
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(Vn, { bundle: t, isOpen: !!
|
|
798
|
+
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(Vn, { bundle: t, isOpen: !!d }) })
|
|
798
799
|
);
|
|
799
800
|
}, Nn = (n, t) => {
|
|
800
801
|
const s = n.get(Q);
|
|
801
|
-
return !t || !t.length || !s ? 0 : t.reduce((
|
|
802
|
+
return !t || !t.length || !s ? 0 : t.reduce((d, l, a) => l.id === s ? a : d, 0);
|
|
802
803
|
}, Tn = ({ bundles: n, onDelete: t, isLoading: s }) => {
|
|
803
|
-
const
|
|
804
|
+
const d = q(), l = Nn(d, n);
|
|
804
805
|
return /* @__PURE__ */ e.jsxs(N, { show: s, children: [
|
|
805
|
-
/* @__PURE__ */ e.jsx(pe, { accordionClass: "bundles", defaultOpenPageIndex:
|
|
806
|
+
/* @__PURE__ */ e.jsx(pe, { accordionClass: "bundles", defaultOpenPageIndex: l, children: (n || []).map((a) => /* @__PURE__ */ e.jsx(Dn, { bundle: a, onDelete: t }, a.name)) }, l),
|
|
806
807
|
!s && (!n || !n.length) && /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleManagement.noBundles", children: "There are currently no bundles" })
|
|
807
808
|
] });
|
|
808
809
|
}, 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: [
|
|
@@ -821,38 +822,38 @@ const J = [
|
|
|
821
822
|
" version(s) and the associated files."
|
|
822
823
|
] }) }) }),
|
|
823
824
|
/* @__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:
|
|
825
|
+
] }), yn = ({ bundle: n, canBeDeleted: t, error: s, processing: d }) => {
|
|
825
826
|
const {
|
|
826
|
-
run:
|
|
827
|
+
run: l,
|
|
827
828
|
data: a,
|
|
828
829
|
loading: i
|
|
829
830
|
} = g({
|
|
830
831
|
requestFunction: W
|
|
831
832
|
});
|
|
832
833
|
return D(() => {
|
|
833
|
-
t &&
|
|
834
|
-
}, [
|
|
834
|
+
t && l(n.id);
|
|
835
|
+
}, [l, n, t]), /* @__PURE__ */ e.jsx(N, { show: d || i, children: /* @__PURE__ */ e.jsx(
|
|
835
836
|
"div",
|
|
836
837
|
{
|
|
837
838
|
style: {
|
|
838
839
|
minHeight: 50
|
|
839
840
|
},
|
|
840
|
-
children: !
|
|
841
|
+
children: !d && !i && (t ? _n(n.name, a ? a.totalElements.toString() : void 0) : vn(n.name, s))
|
|
841
842
|
}
|
|
842
843
|
) });
|
|
843
844
|
}, pn = [ke], Cn = [Je], Ln = ({ bundle: n, onCancel: t, loadBundles: s }) => {
|
|
844
|
-
const { run:
|
|
845
|
+
const { run: d } = g({
|
|
845
846
|
requestFunction: Ve,
|
|
846
847
|
errorMessages: pn,
|
|
847
848
|
successMessages: Cn
|
|
848
|
-
}),
|
|
849
|
+
}), l = Ae(n), a = () => d(n.id).then(s).then(t);
|
|
849
850
|
return /* @__PURE__ */ e.jsx(
|
|
850
851
|
_,
|
|
851
852
|
{
|
|
852
853
|
header: /* @__PURE__ */ e.jsx(r, { i18nKey: k.id, children: k.defaultValue }),
|
|
853
|
-
content: /* @__PURE__ */ e.jsx(yn, { bundle: n, ...
|
|
854
|
+
content: /* @__PURE__ */ e.jsx(yn, { bundle: n, ...l }),
|
|
854
855
|
footer: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
855
|
-
/* @__PURE__ */ e.jsx(j, { primary: !0, disabled: !
|
|
856
|
+
/* @__PURE__ */ e.jsx(j, { primary: !0, disabled: !l.canBeDeleted, onClick: a, children: /* @__PURE__ */ e.jsx(r, { i18nKey: C.id, children: C.defaultValue }) }),
|
|
856
857
|
/* @__PURE__ */ e.jsx(j, { onClick: t, children: /* @__PURE__ */ e.jsx(r, { i18nKey: L.id, children: L.defaultValue }) })
|
|
857
858
|
] }),
|
|
858
859
|
width: 500
|
|
@@ -860,8 +861,8 @@ const J = [
|
|
|
860
861
|
);
|
|
861
862
|
}, Sn = [Ue], Pn = () => {
|
|
862
863
|
const n = me(), [t, s] = V(!1), {
|
|
863
|
-
data:
|
|
864
|
-
loading:
|
|
864
|
+
data: d,
|
|
865
|
+
loading: l,
|
|
865
866
|
run: a
|
|
866
867
|
} = g({
|
|
867
868
|
requestFunction: De,
|
|
@@ -891,7 +892,7 @@ const J = [
|
|
|
891
892
|
onClick: h
|
|
892
893
|
}
|
|
893
894
|
),
|
|
894
|
-
/* @__PURE__ */ e.jsx(Tn, { bundles:
|
|
895
|
+
/* @__PURE__ */ e.jsx(Tn, { bundles: d, onDelete: u, isLoading: l }),
|
|
895
896
|
i && /* @__PURE__ */ e.jsx(
|
|
896
897
|
Ln,
|
|
897
898
|
{
|