@deviceinsight/ng-ui-scale-lib 9.26.0 → 10.0.1

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 (71) hide show
  1. package/README.md +1 -1
  2. package/dist/AccessEditModal-CcR8UUJ1.js +90 -0
  3. package/dist/AccessEditModal-CcR8UUJ1.js.map +1 -0
  4. package/dist/BundleManagementContainer--zLnsGKr.js +16 -0
  5. package/dist/BundleManagementContainer--zLnsGKr.js.map +1 -0
  6. package/dist/BundlesContainer-Cjb66440.js +914 -0
  7. package/dist/BundlesContainer-Cjb66440.js.map +1 -0
  8. package/dist/DatapointImport-D00OnAV4.js +293 -0
  9. package/dist/DatapointImport-D00OnAV4.js.map +1 -0
  10. package/dist/FileUploadInput-DfeELXM6.js +45 -0
  11. package/dist/FileUploadInput-DfeELXM6.js.map +1 -0
  12. package/dist/Files-jXxYNeMa.js +347 -0
  13. package/dist/Files-jXxYNeMa.js.map +1 -0
  14. package/dist/GlobalPowerBiReports-DANUj2j5.js +103 -0
  15. package/dist/GlobalPowerBiReports-DANUj2j5.js.map +1 -0
  16. package/dist/Graph-BqYDNKEo.js +53 -0
  17. package/dist/Graph-BqYDNKEo.js.map +1 -0
  18. package/dist/JsonSettingWidget-DE1lID1f.js +53 -0
  19. package/dist/JsonSettingWidget-DE1lID1f.js.map +1 -0
  20. package/dist/LicensesEditPage-PbKGjtzy.js +145 -0
  21. package/dist/LicensesEditPage-PbKGjtzy.js.map +1 -0
  22. package/dist/LicensesList-CxQ5TtrL.js +149 -0
  23. package/dist/LicensesList-CxQ5TtrL.js.map +1 -0
  24. package/dist/PropertiesEditPage-DpRwYhiU.js +373 -0
  25. package/dist/PropertiesEditPage-DpRwYhiU.js.map +1 -0
  26. package/dist/{PropertiesList-59c05fe4.js → PropertiesList-DI0mfPLo.js} +56 -58
  27. package/dist/PropertiesList-DI0mfPLo.js.map +1 -0
  28. package/dist/TemplateEditPage-BzoiAhuZ.js +508 -0
  29. package/dist/TemplateEditPage-BzoiAhuZ.js.map +1 -0
  30. package/dist/TemplateTextInput-CWPLnhST.js +45 -0
  31. package/dist/TemplateTextInput-CWPLnhST.js.map +1 -0
  32. package/dist/TemplatesListPage-BbDysOaR.js +330 -0
  33. package/dist/TemplatesListPage-BbDysOaR.js.map +1 -0
  34. package/dist/UserGroupAssignments-D4LC_sIB.js +297 -0
  35. package/dist/UserGroupAssignments-D4LC_sIB.js.map +1 -0
  36. package/dist/{UserGroupTheme-6768666a.js → UserGroupTheme-Mfh7WwKs.js} +51 -53
  37. package/dist/UserGroupTheme-Mfh7WwKs.js.map +1 -0
  38. package/dist/api.d.ts +805 -802
  39. package/dist/api.js +73 -77
  40. package/dist/api.js.map +1 -0
  41. package/dist/{consts-012135e5.js → consts-CZ_QkIyI.js} +1 -2
  42. package/dist/consts-CZ_QkIyI.js.map +1 -0
  43. package/dist/{customFileCategories-1b64ed45.js → customFileCategories-bG5S9qSy.js} +1 -0
  44. package/dist/customFileCategories-bG5S9qSy.js.map +1 -0
  45. package/dist/index.d.ts +3 -7
  46. package/dist/index.js +4729 -17113
  47. package/dist/index.js.map +1 -0
  48. package/dist/setTitle-BkLWezzi.js +39377 -0
  49. package/dist/setTitle-BkLWezzi.js.map +1 -0
  50. package/dist/style.css +1 -1
  51. package/dist/{useCanDeleteBundleVersion-64f35949.js → useCanDeleteBundleVersion-CUD1pDJ0.js} +1 -0
  52. package/dist/useCanDeleteBundleVersion-CUD1pDJ0.js.map +1 -0
  53. package/package.json +85 -108
  54. package/dist/AccessEditModal-c2178ad5.js +0 -92
  55. package/dist/BundleManagementContainer-60c28e65.js +0 -20
  56. package/dist/BundlesContainer-b3ee1991.js +0 -912
  57. package/dist/ContextBarContext-a6c59c97.js +0 -88776
  58. package/dist/DatapointImport-f6bdbdbc.js +0 -864
  59. package/dist/FileUploadInput-81bb787f.js +0 -44
  60. package/dist/Files-dc240d97.js +0 -364
  61. package/dist/GlobalPowerBiReports-3b7feef9.js +0 -11081
  62. package/dist/Graph-f5463f47.js +0 -25012
  63. package/dist/JsonSettingWidget-307658b8.js +0 -56
  64. package/dist/LicensesEditPage-f62cca26.js +0 -146
  65. package/dist/LicensesList-85279448.js +0 -150
  66. package/dist/PropertiesEditPage-4edb93b7.js +0 -371
  67. package/dist/TemplateEditPage-fe1b5f44.js +0 -508
  68. package/dist/TemplateTextInput-34e4356f.js +0 -49
  69. package/dist/TemplatesListPage-cd3194a7.js +0 -330
  70. package/dist/UserGroupAssignments-291f29f0.js +0 -297
  71. package/dist/index-738ab9ab.js +0 -18679
@@ -1,56 +0,0 @@
1
- import { dh as S, dp as C, ax as t, cC as j, ag as g } from "./ContextBarContext-a6c59c97.js";
2
- import { useState as d, useEffect as v, useCallback as y } from "react";
3
- import { C as V, j as b } from "./index-738ab9ab.js";
4
- import "react-i18next";
5
- import "react-router-dom";
6
- import "react-dom";
7
- import "@deviceinsight/ng-ui-basic-components";
8
- import "@deviceinsight/ng-ui-components";
9
- import "i18next";
10
- import "@deviceinsight/ng-ui-api-client";
11
- import "ux4iot-react";
12
- function R({ setting: e, ...p }) {
13
- const { setValue: o, setError: i, clearErrors: n, control: c } = S(), {
14
- field: r,
15
- fieldState: { error: s }
16
- } = C({ name: e.name, control: c }), [f, l] = d(""), [m, h] = d(!1);
17
- v(() => {
18
- if (!m && r.value) {
19
- const a = JSON.stringify(r.value, null, 2);
20
- l(a), h(!0);
21
- }
22
- }, [r.value, m]);
23
- const x = y(
24
- (a) => {
25
- try {
26
- l(a);
27
- const u = a === "" ? void 0 : JSON.parse(a);
28
- o(e.name, u, { shouldValidate: !0, shouldDirty: !0 }), n(e.name);
29
- } catch {
30
- i(e.name, { message: "Invalid JSON syntax" });
31
- }
32
- },
33
- [n, i, o, e.name]
34
- );
35
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsx(
36
- j,
37
- {
38
- label: /* @__PURE__ */ t.jsx(g, { i18nKey: `appSettings.property.${e.name}`, children: e.name }),
39
- error: (s == null ? void 0 : s.message) ?? "",
40
- size: "full-width",
41
- children: /* @__PURE__ */ t.jsx(
42
- V,
43
- {
44
- "data-testid": p["data-testid"],
45
- onChange: x,
46
- value: f,
47
- basicSetup: { lineNumbers: !0 },
48
- extensions: [b()]
49
- }
50
- )
51
- }
52
- ) });
53
- }
54
- export {
55
- R as default
56
- };
@@ -1,146 +0,0 @@
1
- import { ah as w, bg as C, ax as e, ag as n, bm as y, b8 as b, bS as V } from "./ContextBarContext-a6c59c97.js";
2
- import { useState as d, useEffect as v } from "react";
3
- import { Prompt as q, useHistory as B, useLocation as H, useParams as T } from "react-router-dom";
4
- import { fetchLicenses as D, fetchLicenseByName as I, updateLicense as R, createLicense as k } from "@deviceinsight/ng-ui-api-client";
5
- import { SpinnerContainer as U, ButtonRow as A, Button as N, Spinner as O } from "@deviceinsight/ng-ui-basic-components";
6
- import { messageBoxError as P, ContentHeader as z, messageBoxSuccess as F } from "@deviceinsight/ng-ui-components";
7
- import "react-i18next";
8
- import "react-dom";
9
- import "i18next";
10
- import "ux4iot-react";
11
- function G({ editedLicense: c, onSubmit: u, onCancel: r }) {
12
- const { t } = w(), {
13
- handleSubmit: p,
14
- control: l,
15
- formState: { isSubmitting: a, isDirty: x },
16
- setError: g
17
- } = C({
18
- defaultValues: c ?? { name: "", displayName: "", description: "" }
19
- }), [j, m] = d([]), [f, L] = d(!1);
20
- v(() => {
21
- L(!0), D().then(m).catch(() => {
22
- P(/* @__PURE__ */ e.jsx(n, { i18nKey: "licenses.form.fetchingError", children: "Fetching licenses failed" }));
23
- }).finally(() => L(!1));
24
- }, []);
25
- function E(i) {
26
- return c ? void 0 : j.some((h) => h.name === i) ? t("licenses.form.validation.nameInUse", {
27
- defaultValue: "A license with the same technical name already exists"
28
- }) : void 0;
29
- }
30
- function K() {
31
- return p(async (s) => {
32
- var h, S;
33
- try {
34
- await u(s);
35
- } catch (o) {
36
- o && o.response && o.response.status === 409 && ((h = o.response.data) != null && h.message) && g("name", {
37
- message: t("licenses.form.validation.nameInUse", {
38
- defaultValue: (S = o.response.data) == null ? void 0 : S.message
39
- })
40
- });
41
- }
42
- }, (s) => {
43
- console.warn("Validation error", s);
44
- })();
45
- }
46
- return /* @__PURE__ */ e.jsxs(U, { show: a || f, className: "di license-form", children: [
47
- /* @__PURE__ */ e.jsx(
48
- y,
49
- {
50
- control: l,
51
- name: "name",
52
- rules: {
53
- required: t("licenses.form.validation.nameRequired", {
54
- defaultValue: "Please enter the technical name"
55
- }),
56
- validate: E
57
- },
58
- render: ({ field: i, fieldState: { error: s } }) => /* @__PURE__ */ e.jsx(
59
- b,
60
- {
61
- ...i,
62
- disabled: !!c,
63
- label: /* @__PURE__ */ e.jsx(n, { i18nKey: "licenses.tableHeaders.name", children: "Technical Name" }),
64
- required: !0,
65
- error: s == null ? void 0 : s.message
66
- }
67
- )
68
- }
69
- ),
70
- /* @__PURE__ */ e.jsx(
71
- y,
72
- {
73
- control: l,
74
- name: "displayName",
75
- rules: {
76
- required: t("licenses.form.validation.displayNameRequired", {
77
- defaultValue: "Please enter the display name"
78
- })
79
- },
80
- render: ({ field: i, fieldState: { error: s } }) => /* @__PURE__ */ e.jsx(
81
- b,
82
- {
83
- ...i,
84
- label: /* @__PURE__ */ e.jsx(n, { i18nKey: "licenses.tableHeaders.displayName", children: "Name" }),
85
- required: !0,
86
- error: s == null ? void 0 : s.message
87
- }
88
- )
89
- }
90
- ),
91
- /* @__PURE__ */ e.jsx(
92
- y,
93
- {
94
- control: l,
95
- name: "description",
96
- render: ({ field: i }) => /* @__PURE__ */ e.jsx(
97
- b,
98
- {
99
- ...i,
100
- label: /* @__PURE__ */ e.jsx(n, { i18nKey: "licenses.tableHeaders.description", children: "Description" })
101
- }
102
- )
103
- }
104
- ),
105
- /* @__PURE__ */ e.jsxs(A, { dividing: !0, children: [
106
- /* @__PURE__ */ e.jsx(N, { primary: !0, onClick: K, disabled: a, children: /* @__PURE__ */ e.jsx(n, { i18nKey: "general.actions.save", children: "Save" }) }),
107
- /* @__PURE__ */ e.jsx(N, { disabled: a, onClick: r, children: /* @__PURE__ */ e.jsx(n, { i18nKey: "general.actions.cancel", children: "Cancel" }) })
108
- ] }),
109
- /* @__PURE__ */ e.jsx(q, { message: "", when: x && !a })
110
- ] });
111
- }
112
- function se() {
113
- const c = B(), { pathname: u } = H(), { licenseName: r } = T(), [t, p] = d(), [l, a] = d(!1), [x, g] = d(!1);
114
- if (v(() => {
115
- r && (a(!0), I(r).then(p).catch(() => {
116
- P(/* @__PURE__ */ e.jsx(n, { i18nKey: "licenses.editPage.fetchingError", children: "Fetching license failed" })), g(!0);
117
- }).finally(() => a(!1)));
118
- }, [r]), x)
119
- return /* @__PURE__ */ e.jsx(V, {});
120
- if (l)
121
- return /* @__PURE__ */ e.jsx(O, { center: !0 });
122
- const j = async (f) => {
123
- r ? (await R(f), F(/* @__PURE__ */ e.jsx(n, { i18nKey: "licenses.updateSuccess", children: "License updated" }))) : (await k(f), F(/* @__PURE__ */ e.jsx(n, { i18nKey: "licenses.createSuccess", children: "License created" }))), m();
124
- }, m = () => {
125
- c.push(u.substring(0, u.lastIndexOf("/")));
126
- };
127
- return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
128
- /* @__PURE__ */ e.jsx(
129
- z,
130
- {
131
- title: t ? {
132
- id: "licenses.edit.title",
133
- defaultValue: "Edit License"
134
- } : {
135
- id: "licenses.create.title",
136
- defaultValue: "Create License"
137
- },
138
- parentPageLink: !0
139
- }
140
- ),
141
- /* @__PURE__ */ e.jsx(G, { editedLicense: t, onSubmit: j, onCancel: m })
142
- ] });
143
- }
144
- export {
145
- se as default
146
- };
@@ -1,150 +0,0 @@
1
- import { ax as s, ag as a, ah as y, dc as b, dg as g, aR as j } from "./ContextBarContext-a6c59c97.js";
2
- import { useState as c, useEffect as f } from "react";
3
- import { Link as u } from "react-router-dom";
4
- import { fetchRolesForLicense as N, fetchLicenses as C, deleteLicense as E } from "@deviceinsight/ng-ui-api-client";
5
- import { messageBoxError as h, ContentHeader as S } from "@deviceinsight/ng-ui-components";
6
- import { useConfirm as w, Button as D, Icon as I } from "@deviceinsight/ng-ui-basic-components";
7
- import "react-i18next";
8
- import "react-dom";
9
- import "i18next";
10
- import "ux4iot-react";
11
- function T({ license: t }) {
12
- const [e, n] = c([]), [r, o] = c(!1);
13
- return f(() => {
14
- o(!0), N(t).then(n).catch(() => {
15
- h(
16
- /* @__PURE__ */ s.jsxs(a, { i18nKey: "license.roles.fetchingError", children: [
17
- "Can't fetch the roles of the following license: ",
18
- { license: t }
19
- ] })
20
- );
21
- }).finally(() => o(!1));
22
- }, [t]), r ? /* @__PURE__ */ s.jsx(a, { i18nKey: "general.actions.loading", children: "Loading..." }) : /* @__PURE__ */ s.jsx("span", { className: "di license-roles", children: e.map((i) => /* @__PURE__ */ s.jsx(u, { to: `/roles/${i.id}`, className: "role-link", children: i.name }, i.id)) });
23
- }
24
- const A = {
25
- page: 0,
26
- size: 15,
27
- sort: {
28
- property: "name",
29
- direction: "ASC"
30
- }
31
- };
32
- function K(t) {
33
- return [
34
- {
35
- name: "name",
36
- label: /* @__PURE__ */ s.jsx(a, { i18nKey: "licenses.tableHeaders.name", children: "Technical Name" }),
37
- sortable: !0,
38
- filterable: {
39
- filterType: "text",
40
- filterFn: (e, n) => e.name.toLowerCase().indexOf(n.toLowerCase()) >= 0
41
- },
42
- render: (e) => /* @__PURE__ */ s.jsx(u, { to: `licenses/${e.name}`, children: e.name })
43
- },
44
- {
45
- name: "displayName",
46
- label: /* @__PURE__ */ s.jsx(a, { i18nKey: "licenses.tableHeaders.displayName", children: "Display Name" }),
47
- sortable: !0,
48
- filterable: {
49
- filterType: "text",
50
- filterFn: (e, n) => e.displayName.toLowerCase().indexOf(n.toLowerCase()) >= 0
51
- },
52
- render: (e) => e.displayName
53
- },
54
- {
55
- name: "description",
56
- label: /* @__PURE__ */ s.jsx(a, { i18nKey: "licenses.tableHeaders.description", children: "Description" }),
57
- render: (e) => e.description
58
- },
59
- {
60
- name: "roles",
61
- label: /* @__PURE__ */ s.jsx(a, { i18nKey: "licenses.tableHeaders.roles", children: "Roles" }),
62
- render: (e) => /* @__PURE__ */ s.jsx(T, { license: e.name })
63
- },
64
- {
65
- name: "actions",
66
- label: "",
67
- width: "10%",
68
- align: "right",
69
- render: (e) => /* @__PURE__ */ s.jsx(j, { authorities: ["MANAGE_LICENSES"], children: /* @__PURE__ */ s.jsx(
70
- D,
71
- {
72
- naked: !0,
73
- title: {
74
- id: "licenses.tableHeaders.deleteLicense",
75
- defaultValue: "Delete this License"
76
- },
77
- onClick: () => t(e),
78
- children: /* @__PURE__ */ s.jsx(I, { del: !0 })
79
- }
80
- ) })
81
- }
82
- ];
83
- }
84
- function $() {
85
- const [t, e] = c(!1), [n, r] = c([]), o = w(), { t: i } = y(), p = /* @__PURE__ */ s.jsx(a, { i18nKey: "portalAdmin.sidebarElements.licenses.create", children: "Create new license" });
86
- f(() => {
87
- (async () => {
88
- try {
89
- e(!0);
90
- const m = await C();
91
- r(m);
92
- } finally {
93
- e(!1);
94
- }
95
- })();
96
- }, []);
97
- async function L(l) {
98
- if (await o({
99
- title: i("licenses.confirmDeleteLicenseTitle", { defaultValue: "Delete License" }),
100
- message: i("licenses.confirmDeleteLicenseMessage", {
101
- defaultValue: "Do you really want to delete this License?"
102
- })
103
- })) {
104
- e(!0);
105
- try {
106
- await E(l.name), r((d) => d.filter((x) => x.name !== l.name));
107
- } catch (d) {
108
- console.error("Delete license error", d), h(
109
- i("licenses.deleteFailure", { defaultValue: "Can't delete license because it is in use" })
110
- );
111
- }
112
- e(!1);
113
- }
114
- }
115
- return /* @__PURE__ */ s.jsxs("div", { "data-testid": "licenses-list", children: [
116
- /* @__PURE__ */ s.jsx(
117
- S,
118
- {
119
- title: {
120
- id: "route.label.licenses.name",
121
- defaultValue: "Licenses"
122
- }
123
- }
124
- ),
125
- /* @__PURE__ */ s.jsx(
126
- b,
127
- {
128
- tooltip: p,
129
- authorities: "MANAGE_LICENSES",
130
- path: "licenses/create",
131
- dataTestId: "create-license-button"
132
- }
133
- ),
134
- /* @__PURE__ */ s.jsx(
135
- g,
136
- {
137
- columnDefs: K(L),
138
- items: n,
139
- isLoading: t,
140
- uniqueItemKey: (l) => l.name,
141
- paginationSettings: A,
142
- "data-testid": "licenses-table",
143
- tableName: "licenses"
144
- }
145
- )
146
- ] });
147
- }
148
- export {
149
- $ as default
150
- };