@deviceinsight/ng-ui-scale-lib 9.19.0 → 9.21.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-38c11d48.js → AccessEditModal-861d96a6.js} +14 -14
- package/dist/BundleManagementContainer-492e1a51.js +20 -0
- package/dist/{BundlesContainer-ff572d82.js → BundlesContainer-56136d83.js} +29 -26
- package/dist/{ContextBarContext-0565a593.js → ContextBarContext-8a081573.js} +39111 -47026
- package/dist/{DatapointImport-2deee17a.js → DatapointImport-8fc8457e.js} +68 -65
- package/dist/{FileUploadInput-87e9d774.js → FileUploadInput-4459f512.js} +3 -3
- package/dist/{Files-f6c464c2.js → Files-d47286c7.js} +42 -39
- package/dist/{GlobalPowerBiReports-f448278b.js → GlobalPowerBiReports-3de00692.js} +6 -3
- package/dist/{Graph-fce6bde2.js → Graph-b5c9417d.js} +4 -1
- package/dist/{JsonSettingWidget-0360cf69.js → JsonSettingWidget-c54df0d6.js} +18 -16
- package/dist/{LicensesEditPage-effb07a9.js → LicensesEditPage-fa4f079f.js} +33 -30
- package/dist/{LicensesList-7832868c.js → LicensesList-41498d29.js} +12 -9
- package/dist/{PropertiesEditPage-e84dd613.js → PropertiesEditPage-e4acc179.js} +30 -29
- package/dist/{PropertiesList-e8f218de.js → PropertiesList-fd78361b.js} +14 -11
- package/dist/{TemplateEditPage-a3994735.js → TemplateEditPage-a7b34bbc.js} +29 -28
- package/dist/{TemplateTextInput-712d3528.js → TemplateTextInput-ac5506a5.js} +16 -14
- package/dist/{TemplatesListPage-86d0d508.js → TemplatesListPage-ea78387b.js} +53 -50
- package/dist/{UserGroupAssignments-b2e98796.js → UserGroupAssignments-4e7c6567.js} +34 -31
- package/dist/{UserGroupTheme-6e262174.js → UserGroupTheme-16db6c5b.js} +7 -6
- package/dist/api.d.ts +13 -1
- package/dist/api.js +71 -67
- package/dist/{index-8f79799f.js → index-852b249c.js} +1138 -1117
- package/dist/index.js +2908 -2912
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/dist/BundleManagementContainer-0efa3cec.js +0 -17
- package/dist/extends-0a3e0827.js +0 -13
- package/dist/react-router-824f2efe.js +0 -1152
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ax as A, ah as j, aX as w, aw as e, ag as r, bP as I, dg as U, dh as O, di as _, cg as b, dj as m } from "./ContextBarContext-8a081573.js";
|
|
2
2
|
import { useState as f, useContext as E, useMemo as M } from "react";
|
|
3
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
|
-
import { searchUserGroups as
|
|
6
|
-
const
|
|
7
|
-
function
|
|
5
|
+
import { searchUserGroups as W } from "@deviceinsight/ng-ui-api-client";
|
|
6
|
+
const L = "usergroupsWithoutAccessToTemplate";
|
|
7
|
+
function N(o) {
|
|
8
8
|
return {
|
|
9
9
|
fields: b,
|
|
10
|
-
search: (s, t) =>
|
|
10
|
+
search: (s, t) => W(o(s), t)
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function P(o, s) {
|
|
14
14
|
return s ? m(
|
|
15
15
|
s.filter((t) => !o.includes(t)),
|
|
16
16
|
!1
|
|
17
17
|
) : m(o, !0);
|
|
18
18
|
}
|
|
19
19
|
function q({ onSave: o, onCancel: s, loading: t, template: n }) {
|
|
20
|
-
const [i, T] = f([]), [a, S] = f(!0), { user: u } = E(
|
|
20
|
+
const [i, T] = f([]), [a, S] = f(!0), { user: u } = E(A), 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
|
-
), { t: d } =
|
|
24
|
+
), { t: d } = j(), h = w(["ACCESS_TO_ALL_NOTIFICATION_TEMPLATES"]), g = (n == null ? void 0 : n.accountGroupsWithAccess) ?? [], p = [...i, ...g].some(
|
|
25
25
|
(c) => u.accountGroupIds.includes(c)
|
|
26
|
-
),
|
|
26
|
+
), y = !h && !p || t;
|
|
27
27
|
return /* @__PURE__ */ e.jsx(
|
|
28
28
|
k,
|
|
29
29
|
{
|
|
@@ -44,15 +44,15 @@ function q({ onSave: o, onCancel: s, loading: t, template: n }) {
|
|
|
44
44
|
/* @__PURE__ */ e.jsx(
|
|
45
45
|
U,
|
|
46
46
|
{
|
|
47
|
-
searchContext:
|
|
48
|
-
searchConfig:
|
|
49
|
-
columnDefinitions:
|
|
47
|
+
searchContext: L,
|
|
48
|
+
searchConfig: N(P(l, C)),
|
|
49
|
+
columnDefinitions: O(!0),
|
|
50
50
|
uniqueItemKey: (c) => c.id,
|
|
51
51
|
pageSize: 5,
|
|
52
52
|
onSelectSome: T,
|
|
53
53
|
updateTrigger: G,
|
|
54
54
|
extraHeaderComponent: () => /* @__PURE__ */ e.jsx(
|
|
55
|
-
|
|
55
|
+
_,
|
|
56
56
|
{
|
|
57
57
|
style: {
|
|
58
58
|
flexGrow: 1,
|
|
@@ -77,7 +77,7 @@ function q({ onSave: o, onCancel: s, loading: t, template: n }) {
|
|
|
77
77
|
x,
|
|
78
78
|
{
|
|
79
79
|
primary: !0,
|
|
80
|
-
disabled:
|
|
80
|
+
disabled: y,
|
|
81
81
|
onClick: () => o([...l, ...i], n),
|
|
82
82
|
children: /* @__PURE__ */ e.jsx(r, { i18nKey: "general.actions.save", children: "Save" })
|
|
83
83
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { bw as n, aw as r } from "./ContextBarContext-8a081573.js";
|
|
2
|
+
import { useContext as m, useEffect as s } from "react";
|
|
3
|
+
import { useLocation as i } from "react-router-dom";
|
|
4
|
+
import { messageBoxDismissGroup as a } from "@deviceinsight/ng-ui-components";
|
|
5
|
+
import { M as p } from "./consts-012135e5.js";
|
|
6
|
+
import "@deviceinsight/ng-ui-basic-components";
|
|
7
|
+
import "react-i18next";
|
|
8
|
+
import "i18next";
|
|
9
|
+
import "@deviceinsight/ng-ui-api-client";
|
|
10
|
+
import "ux4iot-react";
|
|
11
|
+
import "react-dom";
|
|
12
|
+
function I({ children: o }) {
|
|
13
|
+
const { setContextInfo: t } = m(n), { pathname: e } = i();
|
|
14
|
+
return s(() => (t(), () => {
|
|
15
|
+
a(p), t();
|
|
16
|
+
}), [e, t]), /* @__PURE__ */ r.jsx("div", { children: o });
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
I as default
|
|
20
|
+
};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ah as S, bf as P, aw as e, ag as r, bl as A, b7 as I, d6 as T, aQ as F, b4 as re, aj as ae, d7 as ie, cn as q, d8 as oe } from "./ContextBarContext-8a081573.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
|
|
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-
|
|
9
|
+
import { F as Le } from "./FileUploadInput-4459f512.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);
|
|
@@ -34,7 +37,7 @@ const Y = (n) => {
|
|
|
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" }),
|
|
@@ -345,7 +348,7 @@ const J = [
|
|
|
345
348
|
)
|
|
346
349
|
}
|
|
347
350
|
], X = ({ count: n }) => /* @__PURE__ */ e.jsx(
|
|
348
|
-
|
|
351
|
+
pe,
|
|
349
352
|
{
|
|
350
353
|
className: "neutral",
|
|
351
354
|
style: {
|
|
@@ -468,8 +471,8 @@ const J = [
|
|
|
468
471
|
},
|
|
469
472
|
onChange: (E) => {
|
|
470
473
|
if (E) {
|
|
471
|
-
const
|
|
472
|
-
|
|
474
|
+
const _ = new FormData();
|
|
475
|
+
_.append("file", E), B(_);
|
|
473
476
|
}
|
|
474
477
|
}
|
|
475
478
|
},
|
|
@@ -485,7 +488,7 @@ const J = [
|
|
|
485
488
|
}, en = {
|
|
486
489
|
id: "bundlemanagement.releaseBundleVersionSuccess",
|
|
487
490
|
defaultValue: "The version was published"
|
|
488
|
-
},
|
|
491
|
+
}, y = {
|
|
489
492
|
id: "bundlemanagement.modalCloseButton",
|
|
490
493
|
defaultValue: "Close"
|
|
491
494
|
}, C = {
|
|
@@ -524,7 +527,7 @@ const J = [
|
|
|
524
527
|
}, [t, b, n]);
|
|
525
528
|
const B = !!(x.data && x.data.length);
|
|
526
529
|
return /* @__PURE__ */ e.jsx(
|
|
527
|
-
|
|
530
|
+
p,
|
|
528
531
|
{
|
|
529
532
|
width: 500,
|
|
530
533
|
header: t ? /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.editversion", children: "Add Files" }) : /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.addversion", children: "Create new Version" }),
|
|
@@ -545,7 +548,7 @@ const J = [
|
|
|
545
548
|
children: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundlemanagement.publish", children: "Publish" })
|
|
546
549
|
}
|
|
547
550
|
),
|
|
548
|
-
/* @__PURE__ */ e.jsx(j, { onClick: d, "data-testid": c.CANCEL_SAVE_VERSION_BUTTON, children: /* @__PURE__ */ e.jsx(r, { i18nKey:
|
|
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 }) })
|
|
549
552
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
550
553
|
/* @__PURE__ */ e.jsx(
|
|
551
554
|
j,
|
|
@@ -590,7 +593,7 @@ const J = [
|
|
|
590
593
|
successMessages: hn
|
|
591
594
|
}), a = Se(n, t), i = () => l(n.id, t.id).then(d).then(s);
|
|
592
595
|
return /* @__PURE__ */ e.jsx(
|
|
593
|
-
|
|
596
|
+
p,
|
|
594
597
|
{
|
|
595
598
|
header: /* @__PURE__ */ e.jsx(r, { i18nKey: U.id, children: U.defaultValue }),
|
|
596
599
|
content: /* @__PURE__ */ e.jsx(cn, { version: t, ...a }),
|
|
@@ -626,7 +629,7 @@ const J = [
|
|
|
626
629
|
return D(() => {
|
|
627
630
|
t && (l(n.id, t), u(n.id, t));
|
|
628
631
|
}, [u, l, t, n]), /* @__PURE__ */ e.jsx(
|
|
629
|
-
|
|
632
|
+
p,
|
|
630
633
|
{
|
|
631
634
|
width: 500,
|
|
632
635
|
header: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleversion.viewVersion", children: "Version Details" }),
|
|
@@ -641,7 +644,7 @@ const J = [
|
|
|
641
644
|
}
|
|
642
645
|
)
|
|
643
646
|
] }) }),
|
|
644
|
-
footer: /* @__PURE__ */ e.jsx(j, { onClick: s, "data-testid": c.MODAL_CLOSE_BUTTON, children: /* @__PURE__ */ e.jsx(r, { i18nKey:
|
|
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 }) })
|
|
645
648
|
}
|
|
646
649
|
);
|
|
647
650
|
}, En = {
|
|
@@ -702,7 +705,7 @@ const J = [
|
|
|
702
705
|
s
|
|
703
706
|
), [B, f] = V(Bn), {
|
|
704
707
|
run: E,
|
|
705
|
-
data:
|
|
708
|
+
data: _,
|
|
706
709
|
loading: le
|
|
707
710
|
} = g({
|
|
708
711
|
requestFunction: W,
|
|
@@ -714,7 +717,7 @@ const J = [
|
|
|
714
717
|
/* @__PURE__ */ e.jsx(
|
|
715
718
|
gn,
|
|
716
719
|
{
|
|
717
|
-
versions:
|
|
720
|
+
versions: _,
|
|
718
721
|
paginationSettings: B,
|
|
719
722
|
setPaginationSettings: f,
|
|
720
723
|
columnDefs: b,
|
|
@@ -765,7 +768,7 @@ const J = [
|
|
|
765
768
|
}, Dn = (n) => {
|
|
766
769
|
const { bundle: t, onDelete: s, isOpen: d } = n, { id: l, name: a } = t;
|
|
767
770
|
return /* @__PURE__ */ he(
|
|
768
|
-
|
|
771
|
+
_e,
|
|
769
772
|
{
|
|
770
773
|
...n,
|
|
771
774
|
"data-testid": c.ACCORDION_ITEM + l,
|
|
@@ -803,14 +806,14 @@ const J = [
|
|
|
803
806
|
}, Tn = ({ bundles: n, onDelete: t, isLoading: s }) => {
|
|
804
807
|
const d = q(), l = Nn(d, n);
|
|
805
808
|
return /* @__PURE__ */ e.jsxs(N, { show: s, children: [
|
|
806
|
-
/* @__PURE__ */ e.jsx(
|
|
809
|
+
/* @__PURE__ */ e.jsx(ye, { accordionClass: "bundles", defaultOpenPageIndex: l, children: (n || []).map((a) => /* @__PURE__ */ e.jsx(Dn, { bundle: a, onDelete: t }, a.name)) }, l),
|
|
807
810
|
!s && (!n || !n.length) && /* @__PURE__ */ e.jsx(r, { i18nKey: "bundleManagement.noBundles", children: "There are currently no bundles" })
|
|
808
811
|
] });
|
|
809
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: [
|
|
810
813
|
"The bundle ",
|
|
811
814
|
/* @__PURE__ */ e.jsx("strong", { children: n }),
|
|
812
815
|
" cannot be deleted."
|
|
813
|
-
] }) }) }) }),
|
|
816
|
+
] }) }) }) }), pn = (n, t) => /* @__PURE__ */ e.jsxs("div", { "data-testid": c.DELETE_BUNDLE_DIALOG, children: [
|
|
814
817
|
/* @__PURE__ */ e.jsx("p", { "data-testid": "deleteBundleModalBody1", children: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundlemanagement.deleteBundleModalBody1", children: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
815
818
|
"Do you really want to delete the bundle ",
|
|
816
819
|
/* @__PURE__ */ e.jsx("strong", { children: n }),
|
|
@@ -822,7 +825,7 @@ const J = [
|
|
|
822
825
|
" version(s) and the associated files."
|
|
823
826
|
] }) }) }),
|
|
824
827
|
/* @__PURE__ */ e.jsx("p", { "data-testid": "deleteBundleModalBody3", children: /* @__PURE__ */ e.jsx(r, { i18nKey: "bundlemanagement.deleteBundleModalBody3", children: "This action cannot be undone." }) })
|
|
825
|
-
] }),
|
|
828
|
+
] }), _n = ({ bundle: n, canBeDeleted: t, error: s, processing: d }) => {
|
|
826
829
|
const {
|
|
827
830
|
run: l,
|
|
828
831
|
data: a,
|
|
@@ -838,20 +841,20 @@ const J = [
|
|
|
838
841
|
style: {
|
|
839
842
|
minHeight: 50
|
|
840
843
|
},
|
|
841
|
-
children: !d && !i && (t ?
|
|
844
|
+
children: !d && !i && (t ? pn(n.name, a ? a.totalElements.toString() : void 0) : vn(n.name, s))
|
|
842
845
|
}
|
|
843
846
|
) });
|
|
844
|
-
},
|
|
847
|
+
}, yn = [ke], Cn = [Je], Ln = ({ bundle: n, onCancel: t, loadBundles: s }) => {
|
|
845
848
|
const { run: d } = g({
|
|
846
849
|
requestFunction: Ve,
|
|
847
|
-
errorMessages:
|
|
850
|
+
errorMessages: yn,
|
|
848
851
|
successMessages: Cn
|
|
849
852
|
}), l = Ae(n), a = () => d(n.id).then(s).then(t);
|
|
850
853
|
return /* @__PURE__ */ e.jsx(
|
|
851
|
-
|
|
854
|
+
p,
|
|
852
855
|
{
|
|
853
856
|
header: /* @__PURE__ */ e.jsx(r, { i18nKey: k.id, children: k.defaultValue }),
|
|
854
|
-
content: /* @__PURE__ */ e.jsx(
|
|
857
|
+
content: /* @__PURE__ */ e.jsx(_n, { bundle: n, ...l }),
|
|
855
858
|
footer: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
856
859
|
/* @__PURE__ */ e.jsx(j, { primary: !0, disabled: !l.canBeDeleted, onClick: a, children: /* @__PURE__ */ e.jsx(r, { i18nKey: C.id, children: C.defaultValue }) }),
|
|
857
860
|
/* @__PURE__ */ e.jsx(j, { onClick: t, children: /* @__PURE__ */ e.jsx(r, { i18nKey: L.id, children: L.defaultValue }) })
|
|
@@ -859,7 +862,7 @@ const J = [
|
|
|
859
862
|
width: 500
|
|
860
863
|
}
|
|
861
864
|
);
|
|
862
|
-
}, Sn = [Ue],
|
|
865
|
+
}, Sn = [Ue], zn = () => {
|
|
863
866
|
const n = me(), [t, s] = V(!1), {
|
|
864
867
|
data: d,
|
|
865
868
|
loading: l,
|
|
@@ -905,5 +908,5 @@ const J = [
|
|
|
905
908
|
] });
|
|
906
909
|
};
|
|
907
910
|
export {
|
|
908
|
-
|
|
911
|
+
zn as default
|
|
909
912
|
};
|