@deviceinsight/ng-ui-scale-lib 9.17.0 → 9.18.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 (27) hide show
  1. package/dist/{AccessEditModal-87adb3bc.js → AccessEditModal-7f7dd35b.js} +17 -17
  2. package/dist/{BundleManagementContainer-57ee391d.js → BundleManagementContainer-14ea6dd5.js} +4 -4
  3. package/dist/{BundlesContainer-2b549c33.js → BundlesContainer-bf7f72ee.js} +18 -18
  4. package/dist/{ContextBarContext-e53a6c9e.js → ContextBarContext-0ec93c75.js} +11335 -11302
  5. package/dist/{DatapointImport-98e41f0a.js → DatapointImport-991e2cb4.js} +60 -60
  6. package/dist/{FileUploadInput-71acf840.js → FileUploadInput-83a88c0d.js} +1 -1
  7. package/dist/{Files-656859d4.js → Files-266fbcde.js} +55 -55
  8. package/dist/{GlobalPowerBiReports-b7588d80.js → GlobalPowerBiReports-b8af443b.js} +1 -1
  9. package/dist/{Graph-8f3faa67.js → Graph-499b8c29.js} +1 -1
  10. package/dist/{JsonSettingWidget-017b7d08.js → JsonSettingWidget-8a23e9a8.js} +11 -11
  11. package/dist/{LicensesEditPage-4491349f.js → LicensesEditPage-9c298d77.js} +19 -19
  12. package/dist/{LicensesList-30258d16.js → LicensesList-ad375f43.js} +7 -7
  13. package/dist/{PropertiesEditPage-61e927bb.js → PropertiesEditPage-d6bf8e29.js} +27 -27
  14. package/dist/{PropertiesList-c892709f.js → PropertiesList-cb6ce316.js} +9 -9
  15. package/dist/{TemplateEditPage-7c975f0a.js → TemplateEditPage-584631b9.js} +15 -15
  16. package/dist/{TemplateTextInput-5dcab91f.js → TemplateTextInput-ba99d8e8.js} +2 -2
  17. package/dist/{TemplatesListPage-ce255ca0.js → TemplatesListPage-9e43955b.js} +26 -26
  18. package/dist/{UserGroupAssignments-3dd28edc.js → UserGroupAssignments-05e6aa96.js} +8 -8
  19. package/dist/{UserGroupTheme-b4b7b3aa.js → UserGroupTheme-b6fd6fe0.js} +2 -2
  20. package/dist/api.js +21 -21
  21. package/dist/{index-23459578.js → index-d8fd8057.js} +28 -28
  22. package/dist/index.js +2049 -2000
  23. package/dist/{react-router-01703761.js → react-router-995966c8.js} +1 -1
  24. package/dist/style.css +1 -1
  25. package/package.json +1 -1
  26. package/dist/api.d.ts +0 -1173
  27. package/dist/index.d.ts +0 -5
@@ -1,15 +1,15 @@
1
- import { ah as w, bc as C, at as e, ag as n, bi as y, b4 as b, bN as V } from "./ContextBarContext-e53a6c9e.js";
1
+ import { aj as w, bh as C, ay as e, ai as n, bn as y, b9 as b, bS as V } from "./ContextBarContext-0ec93c75.js";
2
2
  import { useState as d, useEffect as v } from "react";
3
3
  import { Prompt as q, useHistory as B, useLocation as H, useParams as T } from "react-router-dom";
4
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 S, Spinner as O } from "@deviceinsight/ng-ui-basic-components";
5
+ import { SpinnerContainer as U, ButtonRow as A, Button as N, Spinner as O } from "@deviceinsight/ng-ui-basic-components";
6
6
  import { messageBoxError as P, ContentHeader as z, messageBoxSuccess as F } from "@deviceinsight/ng-ui-components";
7
7
  import "react-dom";
8
8
  function G({ editedLicense: c, onSubmit: u, onCancel: r }) {
9
- const { t } = w(), {
9
+ const { t: a } = w(), {
10
10
  handleSubmit: p,
11
11
  control: l,
12
- formState: { isSubmitting: a, isDirty: x },
12
+ formState: { isSubmitting: t, isDirty: x },
13
13
  setError: g
14
14
  } = C({
15
15
  defaultValues: c ?? { name: "", displayName: "", description: "" }
@@ -20,19 +20,19 @@ function G({ editedLicense: c, onSubmit: u, onCancel: r }) {
20
20
  }).finally(() => L(!1));
21
21
  }, []);
22
22
  function E(i) {
23
- return c ? void 0 : j.some((h) => h.name === i) ? t("licenses.form.validation.nameInUse", {
23
+ return c ? void 0 : j.some((h) => h.name === i) ? a("licenses.form.validation.nameInUse", {
24
24
  defaultValue: "A license with the same technical name already exists"
25
25
  }) : void 0;
26
26
  }
27
27
  function K() {
28
28
  return p(async (s) => {
29
- var h, N;
29
+ var h, S;
30
30
  try {
31
31
  await u(s);
32
32
  } catch (o) {
33
33
  o && o.response && o.response.status === 409 && ((h = o.response.data) != null && h.message) && g("name", {
34
- message: t("licenses.form.validation.nameInUse", {
35
- defaultValue: (N = o.response.data) == null ? void 0 : N.message
34
+ message: a("licenses.form.validation.nameInUse", {
35
+ defaultValue: (S = o.response.data) == null ? void 0 : S.message
36
36
  })
37
37
  });
38
38
  }
@@ -40,14 +40,14 @@ function G({ editedLicense: c, onSubmit: u, onCancel: r }) {
40
40
  console.warn("Validation error", s);
41
41
  })();
42
42
  }
43
- return /* @__PURE__ */ e.jsxs(U, { show: a || f, className: "di license-form", children: [
43
+ return /* @__PURE__ */ e.jsxs(U, { show: t || f, className: "di license-form", children: [
44
44
  /* @__PURE__ */ e.jsx(
45
45
  y,
46
46
  {
47
47
  control: l,
48
48
  name: "name",
49
49
  rules: {
50
- required: t("licenses.form.validation.nameRequired", {
50
+ required: a("licenses.form.validation.nameRequired", {
51
51
  defaultValue: "Please enter the technical name"
52
52
  }),
53
53
  validate: E
@@ -70,7 +70,7 @@ function G({ editedLicense: c, onSubmit: u, onCancel: r }) {
70
70
  control: l,
71
71
  name: "displayName",
72
72
  rules: {
73
- required: t("licenses.form.validation.displayNameRequired", {
73
+ required: a("licenses.form.validation.displayNameRequired", {
74
74
  defaultValue: "Please enter the display name"
75
75
  })
76
76
  },
@@ -100,18 +100,18 @@ function G({ editedLicense: c, onSubmit: u, onCancel: r }) {
100
100
  }
101
101
  ),
102
102
  /* @__PURE__ */ e.jsxs(A, { dividing: !0, children: [
103
- /* @__PURE__ */ e.jsx(S, { primary: !0, onClick: K, disabled: a, children: /* @__PURE__ */ e.jsx(n, { i18nKey: "general.actions.save", children: "Save" }) }),
104
- /* @__PURE__ */ e.jsx(S, { disabled: a, onClick: r, children: /* @__PURE__ */ e.jsx(n, { i18nKey: "general.actions.cancel", children: "Cancel" }) })
103
+ /* @__PURE__ */ e.jsx(N, { primary: !0, onClick: K, disabled: t, children: /* @__PURE__ */ e.jsx(n, { i18nKey: "general.actions.save", children: "Save" }) }),
104
+ /* @__PURE__ */ e.jsx(N, { disabled: t, onClick: r, children: /* @__PURE__ */ e.jsx(n, { i18nKey: "general.actions.cancel", children: "Cancel" }) })
105
105
  ] }),
106
- /* @__PURE__ */ e.jsx(q, { message: "", when: x && !a })
106
+ /* @__PURE__ */ e.jsx(q, { message: "", when: x && !t })
107
107
  ] });
108
108
  }
109
109
  function _() {
110
- const c = B(), { pathname: u } = H(), { licenseName: r } = T(), [t, p] = d(), [l, a] = d(!1), [x, g] = d(!1);
110
+ const c = B(), { pathname: u } = H(), { licenseName: r } = T(), [a, p] = d(), [l, t] = d(!1), [x, g] = d(!1);
111
111
  if (v(() => {
112
- r && (a(!0), I(r).then(p).catch(() => {
112
+ r && (t(!0), I(r).then(p).catch(() => {
113
113
  P(/* @__PURE__ */ e.jsx(n, { i18nKey: "licenses.editPage.fetchingError", children: "Fetching license failed" })), g(!0);
114
- }).finally(() => a(!1)));
114
+ }).finally(() => t(!1)));
115
115
  }, [r]), x)
116
116
  return /* @__PURE__ */ e.jsx(V, {});
117
117
  if (l)
@@ -125,7 +125,7 @@ function _() {
125
125
  /* @__PURE__ */ e.jsx(
126
126
  z,
127
127
  {
128
- title: t ? {
128
+ title: a ? {
129
129
  id: "licenses.edit.title",
130
130
  defaultValue: "Edit License"
131
131
  } : {
@@ -135,7 +135,7 @@ function _() {
135
135
  parentPageLink: !0
136
136
  }
137
137
  ),
138
- /* @__PURE__ */ e.jsx(G, { editedLicense: t, onSubmit: j, onCancel: m })
138
+ /* @__PURE__ */ e.jsx(G, { editedLicense: a, onSubmit: j, onCancel: m })
139
139
  ] });
140
140
  }
141
141
  export {
@@ -1,14 +1,14 @@
1
- import { at as s, ag as a, ah as y, d8 as b, dc as g, aN as j } from "./ContextBarContext-e53a6c9e.js";
1
+ import { ay as s, ai as a, aj as y, d9 as b, dd as g, aS as j } from "./ContextBarContext-0ec93c75.js";
2
2
  import { useState as c, useEffect as f } from "react";
3
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";
4
+ import { fetchRolesForLicense as C, fetchLicenses as N, deleteLicense as S } from "@deviceinsight/ng-ui-api-client";
5
+ import { messageBoxError as h, ContentHeader as E } from "@deviceinsight/ng-ui-components";
6
6
  import { useConfirm as w, Button as D, Icon as I } from "@deviceinsight/ng-ui-basic-components";
7
7
  import "react-dom";
8
8
  function T({ license: t }) {
9
9
  const [e, n] = c([]), [r, o] = c(!1);
10
10
  return f(() => {
11
- o(!0), N(t).then(n).catch(() => {
11
+ o(!0), C(t).then(n).catch(() => {
12
12
  h(
13
13
  /* @__PURE__ */ s.jsxs(a, { i18nKey: "license.roles.fetchingError", children: [
14
14
  "Can't fetch the roles of the following license: ",
@@ -84,7 +84,7 @@ function B() {
84
84
  (async () => {
85
85
  try {
86
86
  e(!0);
87
- const m = await C();
87
+ const m = await N();
88
88
  r(m);
89
89
  } finally {
90
90
  e(!1);
@@ -100,7 +100,7 @@ function B() {
100
100
  })) {
101
101
  e(!0);
102
102
  try {
103
- await E(l.name), r((d) => d.filter((x) => x.name !== l.name));
103
+ await S(l.name), r((d) => d.filter((x) => x.name !== l.name));
104
104
  } catch (d) {
105
105
  console.error("Delete license error", d), h(
106
106
  i("licenses.deleteFailure", { defaultValue: "Can't delete license because it is in use" })
@@ -111,7 +111,7 @@ function B() {
111
111
  }
112
112
  return /* @__PURE__ */ s.jsxs("div", { "data-testid": "licenses-list", children: [
113
113
  /* @__PURE__ */ s.jsx(
114
- S,
114
+ E,
115
115
  {
116
116
  title: {
117
117
  id: "route.label.licenses.name",
@@ -1,10 +1,10 @@
1
- import { at as e, cz as E, aK as V, dl as F, dd as L, dk as B, ag as d, ah as G, bc as U, bf as D, bi as h, b4 as w, dm as R, di as P, dn as k, aq as M, dp as H, dq as X, bN as _, aU as z, dr as Y } from "./ContextBarContext-e53a6c9e.js";
2
- import { useState as T, useEffect as $ } from "react";
3
- import { useLocation as J, useHistory as Q, useParams as W } from "react-router-dom";
4
- import { getPropertyById as Z, updateProperty as ee, createProperty as re } from "@deviceinsight/ng-ui-api-client";
5
- import { Button as v, Checkbox as A, Icon as K, ButtonRow as te, Spinner as se } from "@deviceinsight/ng-ui-basic-components";
6
- import { messageBoxError as O, ContentHeader as ae } from "@deviceinsight/ng-ui-components";
7
- import { P as ne } from "./react-router-01703761.js";
1
+ import { ay as e, cA as E, aP as V, dm as F, de as L, dl as B, ai as d, aj as G, bh as D, bk as U, bn as h, b9 as w, dn as R, dj as T, dp as A, ao as M, dq as H, dr as X, bS as _, aZ as Y, ds as Z } from "./ContextBarContext-0ec93c75.js";
2
+ import { useState as P, useEffect as $ } from "react";
3
+ import { useLocation as z, useHistory as J, useParams as Q } from "react-router-dom";
4
+ import { getPropertyById as W, updateProperty as ee, createProperty as re } from "@deviceinsight/ng-ui-api-client";
5
+ import { Button as v, Checkbox as k, Icon as O, ButtonRow as te, Spinner as se } from "@deviceinsight/ng-ui-basic-components";
6
+ import { messageBoxError as K, ContentHeader as ae } from "@deviceinsight/ng-ui-components";
7
+ import { P as ne } from "./react-router-995966c8.js";
8
8
  import "react-dom";
9
9
  import "./extends-0a3e0827.js";
10
10
  function le(r) {
@@ -30,7 +30,7 @@ function ie() {
30
30
  getValues: r,
31
31
  formState: { errors: s },
32
32
  trigger: x
33
- } = L(), [c, i] = T(!!r("allowedValues")), {
33
+ } = L(), [c, i] = P(!!r("allowedValues")), {
34
34
  field: { value: t, onChange: a },
35
35
  fieldState: { invalid: u }
36
36
  } = B({
@@ -56,14 +56,14 @@ function ie() {
56
56
  E,
57
57
  {
58
58
  label: /* @__PURE__ */ e.jsxs("div", { className: "di allowed-values-header", children: [
59
- /* @__PURE__ */ e.jsx(A, { type: "toggle", value: c, toggleSmall: !0, onChange: y }),
59
+ /* @__PURE__ */ e.jsx(k, { type: "toggle", value: c, toggleSmall: !0, onChange: y }),
60
60
  " ",
61
61
  /* @__PURE__ */ e.jsx(d, { i18nKey: "properties.labels.allowedValues", children: "Allowed Values" })
62
62
  ] }),
63
63
  error: s.allowedValues ? "Required" : void 0,
64
64
  className: "di allowed-values-container",
65
65
  children: [
66
- /* @__PURE__ */ e.jsx(A, { value: c, onChange: y }),
66
+ /* @__PURE__ */ e.jsx(k, { value: c, onChange: y }),
67
67
  (t == null ? void 0 : t.length) === 0 ? /* @__PURE__ */ e.jsx("div", { className: "empty-placeholder", children: /* @__PURE__ */ e.jsx(d, { i18nKey: "properties.labels.allowedValuesEmptyPlaceholder", children: "No values" }) }) : /* @__PURE__ */ e.jsx("ul", { children: t == null ? void 0 : t.map((n, p) => /* @__PURE__ */ e.jsxs("li", { className: "item", children: [
68
68
  /* @__PURE__ */ e.jsx(E, { className: "value-container", children: /* @__PURE__ */ e.jsx(
69
69
  "input",
@@ -73,13 +73,13 @@ function ie() {
73
73
  onChange: (m) => g(m.target.value, p)
74
74
  }
75
75
  ) }),
76
- /* @__PURE__ */ e.jsx(v, { onClick: () => f(p), children: /* @__PURE__ */ e.jsx(K, { del: !0 }) })
76
+ /* @__PURE__ */ e.jsx(v, { onClick: () => f(p), children: /* @__PURE__ */ e.jsx(O, { del: !0 }) })
77
77
  ] }, p)) })
78
78
  ]
79
79
  }
80
80
  ),
81
81
  c && /* @__PURE__ */ e.jsxs(v, { onClick: () => b(""), children: [
82
- /* @__PURE__ */ e.jsx(K, { add: !0 }),
82
+ /* @__PURE__ */ e.jsx(O, { add: !0 }),
83
83
  /* @__PURE__ */ e.jsx(d, { i18nKey: "properties.labels.allowedValuesAdd", children: "Add" })
84
84
  ] })
85
85
  ] });
@@ -103,7 +103,7 @@ function ce() {
103
103
  };
104
104
  }
105
105
  function ue({ editedProperty: r, isReadonly: s, onSubmit: x, onCancel: c }) {
106
- const { t: i } = G(), t = U({
106
+ const { t: i } = G(), t = D({
107
107
  defaultValues: r || ce()
108
108
  }), {
109
109
  control: a,
@@ -119,9 +119,9 @@ function ue({ editedProperty: r, isReadonly: s, onSubmit: x, onCancel: c }) {
119
119
  } catch (S) {
120
120
  if (M.isAxiosError(S)) {
121
121
  const { fieldName: N, message: C } = H(S, i);
122
- N ? b(N, { message: C }) : O(C);
122
+ N ? b(N, { message: C }) : K(C);
123
123
  } else
124
- O(X(i));
124
+ K(X(i));
125
125
  }
126
126
  }
127
127
  return u(l, (o) => {
@@ -129,7 +129,7 @@ function ue({ editedProperty: r, isReadonly: s, onSubmit: x, onCancel: c }) {
129
129
  })();
130
130
  }
131
131
  const p = f("type"), m = !!r, j = p === "STRING" || p === "TEXT", I = !!f("allowedValues");
132
- return /* @__PURE__ */ e.jsx(D, { ...t, children: /* @__PURE__ */ e.jsxs("div", { className: "property-form", children: [
132
+ return /* @__PURE__ */ e.jsx(U, { ...t, children: /* @__PURE__ */ e.jsxs("div", { className: "property-form", children: [
133
133
  /* @__PURE__ */ e.jsx(
134
134
  h,
135
135
  {
@@ -197,7 +197,7 @@ function ue({ editedProperty: r, isReadonly: s, onSubmit: x, onCancel: c }) {
197
197
  name: "addToAll",
198
198
  control: a,
199
199
  render: ({ field: l }) => /* @__PURE__ */ e.jsx(
200
- P,
200
+ T,
201
201
  {
202
202
  ...l,
203
203
  label: /* @__PURE__ */ e.jsx(d, { i18nKey: "properties.labels.addToSearch", children: "Add to Search" }),
@@ -212,7 +212,7 @@ function ue({ editedProperty: r, isReadonly: s, onSubmit: x, onCancel: c }) {
212
212
  name: "unique",
213
213
  control: a,
214
214
  render: ({ field: { value: l, onChange: o } }) => /* @__PURE__ */ e.jsx(
215
- P,
215
+ T,
216
216
  {
217
217
  value: !!l,
218
218
  onChange: o,
@@ -228,7 +228,7 @@ function ue({ editedProperty: r, isReadonly: s, onSubmit: x, onCancel: c }) {
228
228
  name: "final",
229
229
  control: a,
230
230
  render: ({ field: { value: l, onChange: o } }) => /* @__PURE__ */ e.jsx(
231
- P,
231
+ T,
232
232
  {
233
233
  value: !!l,
234
234
  onChange: o,
@@ -245,7 +245,7 @@ function ue({ editedProperty: r, isReadonly: s, onSubmit: x, onCancel: c }) {
245
245
  name: "minLength",
246
246
  control: a,
247
247
  render: ({ field: { value: l, ...o } }) => /* @__PURE__ */ e.jsx(
248
- k,
248
+ A,
249
249
  {
250
250
  ...o,
251
251
  value: l ?? void 0,
@@ -262,7 +262,7 @@ function ue({ editedProperty: r, isReadonly: s, onSubmit: x, onCancel: c }) {
262
262
  name: "maxLength",
263
263
  control: a,
264
264
  render: ({ field: { value: l, ...o } }) => /* @__PURE__ */ e.jsx(
265
- k,
265
+ A,
266
266
  {
267
267
  ...o,
268
268
  value: l ?? void 0,
@@ -325,11 +325,11 @@ function q(r) {
325
325
  }
326
326
  return r;
327
327
  }
328
- function Te() {
329
- const { pathname: r } = J(), s = Q(), { propertyKey: x } = W(), [c, i] = T(void 0), [t, a] = T(!0), [u, f] = T(!1);
328
+ function Pe() {
329
+ const { pathname: r } = z(), s = J(), { propertyKey: x } = Q(), [c, i] = P(void 0), [t, a] = P(!0), [u, f] = P(!1);
330
330
  async function b(m) {
331
331
  try {
332
- const j = await Z(m);
332
+ const j = await W(m);
333
333
  i(j);
334
334
  } catch (j) {
335
335
  console.error(j), f(!0);
@@ -344,7 +344,7 @@ function Te() {
344
344
  s.push(r.substring(0, r.lastIndexOf("/")));
345
345
  }
346
346
  async function y(m) {
347
- c ? await ee(q(m)) : await re(q(m)), Y(me), g();
347
+ c ? await ee(q(m)) : await re(q(m)), Z(me), g();
348
348
  }
349
349
  function n() {
350
350
  g();
@@ -358,7 +358,7 @@ function Te() {
358
358
  ue,
359
359
  {
360
360
  editedProperty: c,
361
- isReadonly: !!c && !z(["UPDATE_PROPERTY"]),
361
+ isReadonly: !!c && !Y(["UPDATE_PROPERTY"]),
362
362
  onSubmit: y,
363
363
  onCancel: n
364
364
  }
@@ -366,5 +366,5 @@ function Te() {
366
366
  ] });
367
367
  }
368
368
  export {
369
- Te as default
369
+ Pe as default
370
370
  };
@@ -1,7 +1,7 @@
1
- import { aU as c, at as t, ag as a, b9 as f, ah as y, d8 as b, dc as T } from "./ContextBarContext-e53a6c9e.js";
2
- import { useContext as m, useState as h, useEffect as P } from "react";
1
+ import { aZ as f, ay as t, ai as a, be as c, aj as y, d9 as b, dd as T } from "./ContextBarContext-0ec93c75.js";
2
+ import { useContext as m, useState as P, useEffect as h } from "react";
3
3
  import { deleteProperty as A } from "@deviceinsight/ng-ui-api-client";
4
- import { Bubble as g, Button as x, Icon as I, withConfirm as O } from "@deviceinsight/ng-ui-basic-components";
4
+ import { Bubble as x, Button as I, Icon as g, withConfirm as O } from "@deviceinsight/ng-ui-basic-components";
5
5
  import { ContentHeader as E } from "@deviceinsight/ng-ui-components";
6
6
  import { Link as v } from "react-router-dom";
7
7
  import "react-dom";
@@ -29,7 +29,7 @@ const D = [
29
29
  "definitionId"
30
30
  ];
31
31
  function G(n, l) {
32
- const o = c(["DELETE_PROPERTY"]);
32
+ const o = f(["DELETE_PROPERTY"]);
33
33
  return [
34
34
  {
35
35
  name: "propertyKey",
@@ -172,7 +172,7 @@ function G(n, l) {
172
172
  const r = D.includes(e.key);
173
173
  if (o) {
174
174
  const i = /* @__PURE__ */ t.jsx(
175
- x,
175
+ I,
176
176
  {
177
177
  naked: !0,
178
178
  title: {
@@ -181,11 +181,11 @@ function G(n, l) {
181
181
  },
182
182
  onClick: () => l(e),
183
183
  disabled: r,
184
- children: /* @__PURE__ */ t.jsx(I, { del: !0 })
184
+ children: /* @__PURE__ */ t.jsx(g, { del: !0 })
185
185
  }
186
186
  );
187
187
  return r ? /* @__PURE__ */ t.jsx(
188
- g,
188
+ x,
189
189
  {
190
190
  content: /* @__PURE__ */ t.jsx(a, { i18nKey: "properties.tableHeaders.reserved", children: "This property is reserved and can't be deleted" }),
191
191
  children: i
@@ -205,7 +205,7 @@ const C = {
205
205
  direction: "ASC"
206
206
  }
207
207
  }, V = ({ confirm: n }) => {
208
- const { properties: l, reloadProperties: o } = m(f), [e, r] = h(!1), { t: i } = y(), d = /* @__PURE__ */ t.jsx(a, { i18nKey: "portalAdmin.sidebarElements.properties.create", children: "Create new property" });
208
+ const { properties: l, reloadProperties: o } = m(c), [e, r] = P(!1), { t: i } = y(), d = /* @__PURE__ */ t.jsx(a, { i18nKey: "portalAdmin.sidebarElements.properties.create", children: "Create new property" });
209
209
  async function p() {
210
210
  try {
211
211
  r(!0), await o();
@@ -213,7 +213,7 @@ const C = {
213
213
  r(!1);
214
214
  }
215
215
  }
216
- P(() => {
216
+ h(() => {
217
217
  p();
218
218
  }, []);
219
219
  async function u(s) {
@@ -1,11 +1,11 @@
1
- import { at as e, ag as r, d6 as v, bJ as B, dd as $, ah as R, de as M, bi as S, df as z, b4 as q, b9 as U, bc as H, bf as J, bs as Q, bN as X, ad as Y } from "./ContextBarContext-e53a6c9e.js";
2
- import Z, { useState as C, useRef as D, useContext as O, useEffect as w } from "react";
1
+ import { ay as e, ai as r, d7 as v, bO as B, de as $, aj as R, df as M, bn as S, dg as z, b9 as q, be as U, bh as H, bk as J, bx as Q, bS as X, af as Y } from "./ContextBarContext-0ec93c75.js";
2
+ import Z, { useState as C, useRef as D, useContext as O, useEffect as N } from "react";
3
3
  import { useParams as ee, useHistory as te, useLocation as ae } from "react-router-dom";
4
4
  import { fetchEmailTemplateById as ne, fetchEmailTemplates as se, createEmailTemplate as ie, updateEmailTemplate as oe, deleteEmailTemplate as le } from "@deviceinsight/ng-ui-api-client";
5
5
  import { Modal as _, Button as k, useConfirm as re, Accordion as ce, AccordionItem as de, Icon as A, ButtonRow as ue, SpinnerContainer as me } from "@deviceinsight/ng-ui-basic-components";
6
6
  import { ReactableWithClientSidePagination as W, nanoid10 as fe, messageBoxError as K, ContentHeader as pe } from "@deviceinsight/ng-ui-components";
7
- import { P as he } from "./react-router-01703761.js";
8
- import { A as xe } from "./AccessEditModal-87adb3bc.js";
7
+ import { P as he } from "./react-router-995966c8.js";
8
+ import { A as xe } from "./AccessEditModal-7f7dd35b.js";
9
9
  import "react-dom";
10
10
  import "./extends-0a3e0827.js";
11
11
  const je = (t) => [
@@ -94,7 +94,7 @@ const je = (t) => [
94
94
  width: 600
95
95
  }
96
96
  );
97
- }, G = Z.lazy(() => import("./TemplateTextInput-5dcab91f.js")), ve = (t, a) => t.locale === "default" ? -1 : a.locale === "default" ? 1 : t.locale.localeCompare(a.locale);
97
+ }, G = Z.lazy(() => import("./TemplateTextInput-ba99d8e8.js")), ve = (t, a) => t.locale === "default" ? -1 : a.locale === "default" ? 1 : t.locale.localeCompare(a.locale);
98
98
  function Ce() {
99
99
  const t = re(), [a, n] = C(!1), [c, s] = C("message"), {
100
100
  watch: m,
@@ -133,8 +133,8 @@ function Ce() {
133
133
  return /* @__PURE__ */ e.jsxs("div", { className: "notification-content", children: [
134
134
  /* @__PURE__ */ e.jsx("h2", { children: /* @__PURE__ */ e.jsx(r, { i18nKey: "notificationTemplates.form.languages", children: "Languages" }) }),
135
135
  /* @__PURE__ */ e.jsx(ce, { children: [...o].sort(ve).map((x) => {
136
- var N;
137
- const { locale: u } = x, y = /* @__PURE__ */ e.jsx(r, { i18nKey: "notificationTemplate.form.message", children: "Message" }), i = o.indexOf(x), p = !!((N = b.locales) != null && N[i]);
136
+ var w;
137
+ const { locale: u } = x, y = /* @__PURE__ */ e.jsx(r, { i18nKey: "notificationTemplate.form.message", children: "Message" }), i = o.indexOf(x), p = !!((w = b.locales) != null && w[i]);
138
138
  return /* @__PURE__ */ e.jsx(
139
139
  de,
140
140
  {
@@ -267,13 +267,13 @@ function ke() {
267
267
  )
268
268
  ] });
269
269
  }
270
- function Ne({ onCancel: t, onSubmit: a, disabled: n }) {
270
+ function we({ onCancel: t, onSubmit: a, disabled: n }) {
271
271
  return /* @__PURE__ */ e.jsxs(ue, { dividing: !0, children: [
272
272
  /* @__PURE__ */ e.jsx(k, { primary: !0, onClick: a, disabled: n, children: /* @__PURE__ */ e.jsx(r, { i18nKey: v.save.id, children: v.save.defaultValue }) }),
273
273
  /* @__PURE__ */ e.jsx(k, { onClick: t, children: /* @__PURE__ */ e.jsx(r, { i18nKey: v.cancel.id, children: v.cancel.defaultValue }) })
274
274
  ] });
275
275
  }
276
- function we() {
276
+ function Ne() {
277
277
  return {
278
278
  name: `__${fe()}`,
279
279
  locales: [
@@ -289,7 +289,7 @@ function we() {
289
289
  }
290
290
  function Se({ onCancel: t, onSubmit: a, editedTemplateData: n }) {
291
291
  const { locales: c } = O(U), s = H({
292
- defaultValues: n ?? we()
292
+ defaultValues: n ?? Ne()
293
293
  }), {
294
294
  handleSubmit: m,
295
295
  setValue: h,
@@ -327,7 +327,7 @@ function Se({ onCancel: t, onSubmit: a, editedTemplateData: n }) {
327
327
  }
328
328
  ) }),
329
329
  /* @__PURE__ */ e.jsx(
330
- Ne,
330
+ we,
331
331
  {
332
332
  onCancel: t,
333
333
  onSubmit: n ? j : () => d(!0),
@@ -355,7 +355,7 @@ function Se({ onCancel: t, onSubmit: a, editedTemplateData: n }) {
355
355
  }
356
356
  function Ve() {
357
357
  const { templateId: t } = ee(), [a, n] = C(void 0), [c, s] = C(void 0), [m, h] = C(!0);
358
- return w(() => {
358
+ return N(() => {
359
359
  if (!t || t === "create") {
360
360
  h(!1);
361
361
  return;
@@ -443,7 +443,7 @@ function Me() {
443
443
  ({ locale: i }) => !j.some((p) => p.locale === i)
444
444
  ), y = T === o.displayName ? l.filter((i) => {
445
445
  const p = j.find(
446
- (N) => N.locale === i.locale
446
+ (w) => w.locale === i.locale
447
447
  );
448
448
  return p && Ae(p, i);
449
449
  }) : l.filter(
@@ -467,13 +467,13 @@ function Me() {
467
467
  function d() {
468
468
  n.push("/portaladmin/templates");
469
469
  }
470
- return w(() => {
470
+ return N(() => {
471
471
  a({
472
472
  type: "string",
473
473
  value: (s == null ? void 0 : s.displayName) || (s == null ? void 0 : s.name) || "",
474
474
  pathname: c
475
475
  });
476
- }, [s, c, a]), w(() => () => a(), [a]), w(() => {
476
+ }, [s, c, a]), N(() => () => a(), [a]), N(() => {
477
477
  m && (console.error(m), K(
478
478
  /* @__PURE__ */ e.jsx(r, { i18nKey: "notificationTemplates.form.fetchFailed", children: "An error occurred while trying to fetch the template(s)" })
479
479
  ));
@@ -1,6 +1,6 @@
1
- import { at as l, cz as x, aK as n } from "./ContextBarContext-e53a6c9e.js";
1
+ import { ay as l, cA as x, aP as n } from "./ContextBarContext-0ec93c75.js";
2
2
  import j from "react";
3
- import { C as d, j as b } from "./index-23459578.js";
3
+ import { C as d, j as b } from "./index-d8fd8057.js";
4
4
  import "react-router-dom";
5
5
  import "@deviceinsight/ng-ui-basic-components";
6
6
  import "@deviceinsight/ng-ui-components";