@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,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useLocation as
|
|
4
|
-
import { getPropertyById as
|
|
5
|
-
import { Button as v, Checkbox as A, Icon as O, ButtonRow as
|
|
6
|
-
import { messageBoxError as K, ContentHeader as
|
|
7
|
-
import
|
|
1
|
+
import { aw as e, cy as E, aN as V, dl as F, dd as L, dk as B, ag as d, ah as G, bf as D, bi as R, bl as h, b7 as w, dm as U, di as P, dn as k, al as M, dp as H, dq as X, bR as _, aX as Y, dr as $ } from "./ContextBarContext-8a081573.js";
|
|
2
|
+
import { useState as T, useEffect as z } from "react";
|
|
3
|
+
import { Prompt as J, useLocation as Q, useHistory as W, useParams as Z } from "react-router-dom";
|
|
4
|
+
import { getPropertyById as ee, updateProperty as re, createProperty as te } from "@deviceinsight/ng-ui-api-client";
|
|
5
|
+
import { Button as v, Checkbox as A, Icon as O, ButtonRow as se, Spinner as ae } from "@deviceinsight/ng-ui-basic-components";
|
|
6
|
+
import { messageBoxError as K, ContentHeader as ne } from "@deviceinsight/ng-ui-components";
|
|
7
|
+
import "react-i18next";
|
|
8
|
+
import "i18next";
|
|
9
|
+
import "ux4iot-react";
|
|
8
10
|
import "react-dom";
|
|
9
|
-
import "./extends-0a3e0827.js";
|
|
10
11
|
function le(r) {
|
|
11
12
|
const { options: s, children: x, onChange: c, values: i, ...t } = r;
|
|
12
13
|
function a(u) {
|
|
@@ -30,7 +31,7 @@ function ie() {
|
|
|
30
31
|
getValues: r,
|
|
31
32
|
formState: { errors: s },
|
|
32
33
|
trigger: x
|
|
33
|
-
} = L(), [c, i] =
|
|
34
|
+
} = L(), [c, i] = T(!!r("allowedValues")), {
|
|
34
35
|
field: { value: t, onChange: a },
|
|
35
36
|
fieldState: { invalid: u }
|
|
36
37
|
} = B({
|
|
@@ -116,12 +117,12 @@ function ue({ editedProperty: r, isReadonly: s, onSubmit: x, onCancel: c }) {
|
|
|
116
117
|
async function l(o) {
|
|
117
118
|
try {
|
|
118
119
|
await x(o);
|
|
119
|
-
} catch (
|
|
120
|
-
if (M.isAxiosError(
|
|
121
|
-
const { fieldName: N, message: C } = H(
|
|
120
|
+
} catch (S) {
|
|
121
|
+
if (M.isAxiosError(S)) {
|
|
122
|
+
const { fieldName: N, message: C } = H(S, i);
|
|
122
123
|
N ? b(N, { message: C }) : K(C);
|
|
123
124
|
} else
|
|
124
|
-
K(
|
|
125
|
+
K(X(i));
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
128
|
return u(l, (o) => {
|
|
@@ -129,7 +130,7 @@ function ue({ editedProperty: r, isReadonly: s, onSubmit: x, onCancel: c }) {
|
|
|
129
130
|
})();
|
|
130
131
|
}
|
|
131
132
|
const p = f("type"), m = !!r, j = p === "STRING" || p === "TEXT", I = !!f("allowedValues");
|
|
132
|
-
return /* @__PURE__ */ e.jsx(
|
|
133
|
+
return /* @__PURE__ */ e.jsx(R, { ...t, children: /* @__PURE__ */ e.jsxs("div", { className: "property-form", children: [
|
|
133
134
|
/* @__PURE__ */ e.jsx(
|
|
134
135
|
h,
|
|
135
136
|
{
|
|
@@ -158,7 +159,7 @@ function ue({ editedProperty: r, isReadonly: s, onSubmit: x, onCancel: c }) {
|
|
|
158
159
|
name: "type",
|
|
159
160
|
control: a,
|
|
160
161
|
render: ({ field: l }) => /* @__PURE__ */ e.jsx(
|
|
161
|
-
|
|
162
|
+
U,
|
|
162
163
|
{
|
|
163
164
|
label: /* @__PURE__ */ e.jsx(d, { i18nKey: "properties.labels.type", children: "Type" }),
|
|
164
165
|
...l,
|
|
@@ -175,14 +176,14 @@ function ue({ editedProperty: r, isReadonly: s, onSubmit: x, onCancel: c }) {
|
|
|
175
176
|
name: "entityTargets",
|
|
176
177
|
control: a,
|
|
177
178
|
rules: { validate: (l) => l.length === 0 ? "Required" : void 0 },
|
|
178
|
-
render: ({ field: { value: l, onChange: o }, fieldState: { error:
|
|
179
|
+
render: ({ field: { value: l, onChange: o }, fieldState: { error: S } }) => /* @__PURE__ */ e.jsx(
|
|
179
180
|
le,
|
|
180
181
|
{
|
|
181
182
|
label: /* @__PURE__ */ e.jsx(d, { i18nKey: "properties.labels.entityTargets", children: "Entity targets" }),
|
|
182
183
|
values: l,
|
|
183
184
|
onChange: o,
|
|
184
185
|
options: de,
|
|
185
|
-
error:
|
|
186
|
+
error: S ? i("properties.form.validation.entityTargets.required", {
|
|
186
187
|
defaultValue: "Please select a at least one entity target"
|
|
187
188
|
}) : void 0,
|
|
188
189
|
required: !0,
|
|
@@ -296,11 +297,11 @@ function ue({ editedProperty: r, isReadonly: s, onSubmit: x, onCancel: c }) {
|
|
|
296
297
|
"* ",
|
|
297
298
|
/* @__PURE__ */ e.jsx(d, { i18nKey: "form.field.required", children: "required" })
|
|
298
299
|
] }),
|
|
299
|
-
/* @__PURE__ */ e.jsxs(
|
|
300
|
+
/* @__PURE__ */ e.jsxs(se, { dividing: !0, children: [
|
|
300
301
|
/* @__PURE__ */ e.jsx(v, { className: "with-spinner", primary: !0, onClick: n, disabled: g, children: /* @__PURE__ */ e.jsx(d, { i18nKey: "general.actions.save", children: "Save" }) }),
|
|
301
302
|
/* @__PURE__ */ e.jsx(v, { disabled: g, onClick: c, children: /* @__PURE__ */ e.jsx(d, { i18nKey: "general.actions.cancel", children: "Cancel" }) })
|
|
302
303
|
] }),
|
|
303
|
-
/* @__PURE__ */ e.jsx(
|
|
304
|
+
/* @__PURE__ */ e.jsx(J, { message: "", when: y && !g })
|
|
304
305
|
] }) });
|
|
305
306
|
}
|
|
306
307
|
const pe = (r) => r ? {
|
|
@@ -325,11 +326,11 @@ function q(r) {
|
|
|
325
326
|
}
|
|
326
327
|
return r;
|
|
327
328
|
}
|
|
328
|
-
function
|
|
329
|
-
const { pathname: r } =
|
|
329
|
+
function Pe() {
|
|
330
|
+
const { pathname: r } = Q(), s = W(), { propertyKey: x } = Z(), [c, i] = T(void 0), [t, a] = T(!0), [u, f] = T(!1);
|
|
330
331
|
async function b(m) {
|
|
331
332
|
try {
|
|
332
|
-
const j = await
|
|
333
|
+
const j = await ee(m);
|
|
333
334
|
i(j);
|
|
334
335
|
} catch (j) {
|
|
335
336
|
console.error(j), f(!0);
|
|
@@ -337,28 +338,28 @@ function Se() {
|
|
|
337
338
|
a(!1);
|
|
338
339
|
}
|
|
339
340
|
}
|
|
340
|
-
|
|
341
|
+
z(() => {
|
|
341
342
|
x && x !== "create" ? b(x) : a(!1);
|
|
342
343
|
}, [x]);
|
|
343
344
|
function g() {
|
|
344
345
|
s.push(r.substring(0, r.lastIndexOf("/")));
|
|
345
346
|
}
|
|
346
347
|
async function y(m) {
|
|
347
|
-
c ? await
|
|
348
|
+
c ? await re(q(m)) : await te(q(m)), $(me), g();
|
|
348
349
|
}
|
|
349
350
|
function n() {
|
|
350
351
|
g();
|
|
351
352
|
}
|
|
352
353
|
if (u)
|
|
353
|
-
return /* @__PURE__ */ e.jsx(
|
|
354
|
+
return /* @__PURE__ */ e.jsx(_, {});
|
|
354
355
|
const p = pe(!c);
|
|
355
|
-
return t ? /* @__PURE__ */ e.jsx(
|
|
356
|
-
/* @__PURE__ */ e.jsx(
|
|
356
|
+
return t ? /* @__PURE__ */ e.jsx(ae, { center: !0 }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
357
|
+
/* @__PURE__ */ e.jsx(ne, { title: p, parentPageLink: !0 }),
|
|
357
358
|
/* @__PURE__ */ e.jsx(
|
|
358
359
|
ue,
|
|
359
360
|
{
|
|
360
361
|
editedProperty: c,
|
|
361
|
-
isReadonly: !!c && !
|
|
362
|
+
isReadonly: !!c && !Y(["UPDATE_PROPERTY"]),
|
|
362
363
|
onSubmit: y,
|
|
363
364
|
onCancel: n
|
|
364
365
|
}
|
|
@@ -366,5 +367,5 @@ function Se() {
|
|
|
366
367
|
] });
|
|
367
368
|
}
|
|
368
369
|
export {
|
|
369
|
-
|
|
370
|
+
Pe as default
|
|
370
371
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useContext as T, useState as
|
|
1
|
+
import { aX as c, aw as t, ag as a, bc as f, ah as y, d8 as b, dc as m } from "./ContextBarContext-8a081573.js";
|
|
2
|
+
import { useContext as T, useState as h, useEffect as P } from "react";
|
|
3
3
|
import { deleteProperty as A } from "@deviceinsight/ng-ui-api-client";
|
|
4
|
-
import { Bubble as
|
|
4
|
+
import { Bubble as g, Button as x, Icon as I, 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
|
+
import "react-i18next";
|
|
8
|
+
import "i18next";
|
|
9
|
+
import "ux4iot-react";
|
|
7
10
|
import "react-dom";
|
|
8
11
|
const D = [
|
|
9
12
|
"name",
|
|
@@ -29,7 +32,7 @@ const D = [
|
|
|
29
32
|
"definitionId"
|
|
30
33
|
];
|
|
31
34
|
function G(n, l) {
|
|
32
|
-
const o =
|
|
35
|
+
const o = c(["DELETE_PROPERTY"]);
|
|
33
36
|
return [
|
|
34
37
|
{
|
|
35
38
|
name: "propertyKey",
|
|
@@ -172,7 +175,7 @@ function G(n, l) {
|
|
|
172
175
|
const r = D.includes(e.key);
|
|
173
176
|
if (o) {
|
|
174
177
|
const i = /* @__PURE__ */ t.jsx(
|
|
175
|
-
|
|
178
|
+
x,
|
|
176
179
|
{
|
|
177
180
|
naked: !0,
|
|
178
181
|
title: {
|
|
@@ -181,11 +184,11 @@ function G(n, l) {
|
|
|
181
184
|
},
|
|
182
185
|
onClick: () => l(e),
|
|
183
186
|
disabled: r,
|
|
184
|
-
children: /* @__PURE__ */ t.jsx(
|
|
187
|
+
children: /* @__PURE__ */ t.jsx(I, { del: !0 })
|
|
185
188
|
}
|
|
186
189
|
);
|
|
187
190
|
return r ? /* @__PURE__ */ t.jsx(
|
|
188
|
-
|
|
191
|
+
g,
|
|
189
192
|
{
|
|
190
193
|
content: /* @__PURE__ */ t.jsx(a, { i18nKey: "properties.tableHeaders.reserved", children: "This property is reserved and can't be deleted" }),
|
|
191
194
|
children: i
|
|
@@ -205,7 +208,7 @@ const C = {
|
|
|
205
208
|
direction: "ASC"
|
|
206
209
|
}
|
|
207
210
|
}, V = ({ confirm: n }) => {
|
|
208
|
-
const { properties: l, reloadProperties: o } = T(
|
|
211
|
+
const { properties: l, reloadProperties: o } = T(f), [e, r] = h(!1), { t: i } = y(), d = /* @__PURE__ */ t.jsx(a, { i18nKey: "portalAdmin.sidebarElements.properties.create", children: "Create new property" });
|
|
209
212
|
async function p() {
|
|
210
213
|
try {
|
|
211
214
|
r(!0), await o();
|
|
@@ -213,7 +216,7 @@ const C = {
|
|
|
213
216
|
r(!1);
|
|
214
217
|
}
|
|
215
218
|
}
|
|
216
|
-
|
|
219
|
+
P(() => {
|
|
217
220
|
p();
|
|
218
221
|
}, []);
|
|
219
222
|
async function u(s) {
|
|
@@ -260,7 +263,7 @@ const C = {
|
|
|
260
263
|
}
|
|
261
264
|
)
|
|
262
265
|
] });
|
|
263
|
-
},
|
|
266
|
+
}, _ = O(V);
|
|
264
267
|
export {
|
|
265
|
-
|
|
268
|
+
_ as default
|
|
266
269
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aw as e, ag as r, d6 as v, bN as B, dd as $, ah as R, de as M, bl as S, df as z, b7 as q, bc as U, bf as H, bi as J, bw as Q, bR as X, ad as Y } from "./ContextBarContext-8a081573.js";
|
|
2
2
|
import Z, { useState as C, useRef as D, useContext as O, useEffect as w } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { fetchEmailTemplateById as
|
|
5
|
-
import { Modal as _, Button as k, useConfirm as
|
|
6
|
-
import { ReactableWithClientSidePagination as W, nanoid10 as
|
|
7
|
-
import
|
|
8
|
-
import { A as xe } from "./AccessEditModal-
|
|
3
|
+
import { Prompt as ee, useParams as te, useHistory as ae, useLocation as ne } from "react-router-dom";
|
|
4
|
+
import { fetchEmailTemplateById as se, fetchEmailTemplates as ie, createEmailTemplate as oe, updateEmailTemplate as le, deleteEmailTemplate as re } from "@deviceinsight/ng-ui-api-client";
|
|
5
|
+
import { Modal as _, Button as k, useConfirm as ce, Accordion as de, AccordionItem as ue, Icon as A, ButtonRow as me, SpinnerContainer as fe } from "@deviceinsight/ng-ui-basic-components";
|
|
6
|
+
import { ReactableWithClientSidePagination as W, nanoid10 as pe, messageBoxError as K, ContentHeader as he } from "@deviceinsight/ng-ui-components";
|
|
7
|
+
import "react-i18next";
|
|
8
|
+
import { A as xe } from "./AccessEditModal-861d96a6.js";
|
|
9
|
+
import "i18next";
|
|
10
|
+
import "ux4iot-react";
|
|
9
11
|
import "react-dom";
|
|
10
|
-
import "./extends-0a3e0827.js";
|
|
11
12
|
const je = (t) => [
|
|
12
13
|
{
|
|
13
14
|
name: "locale",
|
|
@@ -60,7 +61,7 @@ const je = (t) => [
|
|
|
60
61
|
render: (a) => /* @__PURE__ */ e.jsx("div", { onClick: () => t(a), className: "clickable", children: a })
|
|
61
62
|
}
|
|
62
63
|
], ge = () => {
|
|
63
|
-
const { assetProperties: t, assetGroupProperties: a } =
|
|
64
|
+
const { assetProperties: t, assetGroupProperties: a } = B();
|
|
64
65
|
return {
|
|
65
66
|
assetProperties: t.filter((n) => !n.key.startsWith("_") && n.deletable),
|
|
66
67
|
assetGroupProperties: a.filter(
|
|
@@ -96,9 +97,9 @@ const je = (t) => [
|
|
|
96
97
|
width: 600
|
|
97
98
|
}
|
|
98
99
|
);
|
|
99
|
-
}, G = Z.lazy(() => import("./TemplateTextInput-
|
|
100
|
+
}, G = Z.lazy(() => import("./TemplateTextInput-ac5506a5.js")), ve = (t, a) => t.locale === "default" ? -1 : a.locale === "default" ? 1 : t.locale.localeCompare(a.locale);
|
|
100
101
|
function Ce() {
|
|
101
|
-
const t =
|
|
102
|
+
const t = ce(), [a, n] = C(!1), [c, s] = C("message"), {
|
|
102
103
|
watch: m,
|
|
103
104
|
control: h,
|
|
104
105
|
setValue: f,
|
|
@@ -134,15 +135,15 @@ function Ce() {
|
|
|
134
135
|
}
|
|
135
136
|
return /* @__PURE__ */ e.jsxs("div", { className: "notification-content", children: [
|
|
136
137
|
/* @__PURE__ */ e.jsx("h2", { children: /* @__PURE__ */ e.jsx(r, { i18nKey: "notificationTemplates.form.languages", children: "Languages" }) }),
|
|
137
|
-
/* @__PURE__ */ e.jsx(
|
|
138
|
+
/* @__PURE__ */ e.jsx(de, { children: [...o].sort(ve).map((x) => {
|
|
138
139
|
var N;
|
|
139
140
|
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]);
|
|
140
141
|
return /* @__PURE__ */ e.jsx(
|
|
141
|
-
|
|
142
|
+
ue,
|
|
142
143
|
{
|
|
143
144
|
title: /* @__PURE__ */ e.jsxs("span", { className: "notification-locale-header", children: [
|
|
144
145
|
u,
|
|
145
|
-
p && /* @__PURE__ */ e.jsx("img", { src:
|
|
146
|
+
p && /* @__PURE__ */ e.jsx("img", { src: M, alt: "" })
|
|
146
147
|
] }),
|
|
147
148
|
tools: [
|
|
148
149
|
/* @__PURE__ */ e.jsx(
|
|
@@ -230,7 +231,7 @@ function Ce() {
|
|
|
230
231
|
}
|
|
231
232
|
function ke() {
|
|
232
233
|
const { t } = R(), { control: a } = $();
|
|
233
|
-
return /* @__PURE__ */ e.jsxs(
|
|
234
|
+
return /* @__PURE__ */ e.jsxs(z, { children: [
|
|
234
235
|
/* @__PURE__ */ e.jsx(
|
|
235
236
|
S,
|
|
236
237
|
{
|
|
@@ -270,14 +271,14 @@ function ke() {
|
|
|
270
271
|
] });
|
|
271
272
|
}
|
|
272
273
|
function Ne({ onCancel: t, onSubmit: a, disabled: n }) {
|
|
273
|
-
return /* @__PURE__ */ e.jsxs(
|
|
274
|
+
return /* @__PURE__ */ e.jsxs(me, { dividing: !0, children: [
|
|
274
275
|
/* @__PURE__ */ e.jsx(k, { primary: !0, onClick: a, disabled: n, children: /* @__PURE__ */ e.jsx(r, { i18nKey: v.save.id, children: v.save.defaultValue }) }),
|
|
275
276
|
/* @__PURE__ */ e.jsx(k, { onClick: t, children: /* @__PURE__ */ e.jsx(r, { i18nKey: v.cancel.id, children: v.cancel.defaultValue }) })
|
|
276
277
|
] });
|
|
277
278
|
}
|
|
278
279
|
function we() {
|
|
279
280
|
return {
|
|
280
|
-
name: `__${
|
|
281
|
+
name: `__${pe()}`,
|
|
281
282
|
locales: [
|
|
282
283
|
{
|
|
283
284
|
locale: "default",
|
|
@@ -352,11 +353,11 @@ function Se({ onCancel: t, onSubmit: a, editedTemplateData: n }) {
|
|
|
352
353
|
loading: b
|
|
353
354
|
}
|
|
354
355
|
),
|
|
355
|
-
/* @__PURE__ */ e.jsx(
|
|
356
|
+
/* @__PURE__ */ e.jsx(ee, { message: "", when: g && !b })
|
|
356
357
|
] }) });
|
|
357
358
|
}
|
|
358
359
|
function Ve() {
|
|
359
|
-
const { templateId: t } =
|
|
360
|
+
const { templateId: t } = te(), [a, n] = C(void 0), [c, s] = C(void 0), [m, h] = C(!0);
|
|
360
361
|
return w(() => {
|
|
361
362
|
if (!t || t === "create") {
|
|
362
363
|
h(!1);
|
|
@@ -364,7 +365,7 @@ function Ve() {
|
|
|
364
365
|
}
|
|
365
366
|
(async () => {
|
|
366
367
|
try {
|
|
367
|
-
const f = await
|
|
368
|
+
const f = await se(parseInt(t)), P = (await ie({
|
|
368
369
|
name: f.name,
|
|
369
370
|
page: 0,
|
|
370
371
|
size: 2e3
|
|
@@ -393,13 +394,13 @@ function Ve() {
|
|
|
393
394
|
};
|
|
394
395
|
}
|
|
395
396
|
function Le(t) {
|
|
396
|
-
return t.map((a) =>
|
|
397
|
+
return t.map((a) => oe(a));
|
|
397
398
|
}
|
|
398
399
|
function Ee(t) {
|
|
399
|
-
return t.map((a) =>
|
|
400
|
+
return t.map((a) => le(a));
|
|
400
401
|
}
|
|
401
402
|
function Ie(t) {
|
|
402
|
-
return t.map((a) =>
|
|
403
|
+
return t.map((a) => re(a));
|
|
403
404
|
}
|
|
404
405
|
function F(t, a) {
|
|
405
406
|
const { name: n, displayName: c, accountGroupsWithAccess: s } = a, m = a.locales.find((b) => b.locale === t);
|
|
@@ -424,8 +425,8 @@ function Ke(t, a, n) {
|
|
|
424
425
|
};
|
|
425
426
|
}
|
|
426
427
|
const Ae = (t, a) => t.subject !== a.subject || t.text !== a.text;
|
|
427
|
-
function
|
|
428
|
-
const { t } = R(), { setContextInfo: a } = O(Q), n =
|
|
428
|
+
function ze() {
|
|
429
|
+
const { t } = R(), { setContextInfo: a } = O(Q), n = ae(), { pathname: c } = ne(), { initialFormData: s, error: m, loading: h } = Ve();
|
|
429
430
|
async function f(o, l, T) {
|
|
430
431
|
const j = Le(o), x = Ee(l), u = Ie(T);
|
|
431
432
|
await Promise.all([...j, ...x, ...u]);
|
|
@@ -479,9 +480,9 @@ function Be() {
|
|
|
479
480
|
m && (console.error(m), K(
|
|
480
481
|
/* @__PURE__ */ e.jsx(r, { i18nKey: "notificationTemplates.form.fetchFailed", children: "An error occurred while trying to fetch the template(s)" })
|
|
481
482
|
));
|
|
482
|
-
}, [m, t]), m ? /* @__PURE__ */ e.jsx(X, {}) : /* @__PURE__ */ e.jsxs(
|
|
483
|
+
}, [m, t]), m ? /* @__PURE__ */ e.jsx(X, {}) : /* @__PURE__ */ e.jsxs(fe, { show: h, children: [
|
|
483
484
|
/* @__PURE__ */ e.jsx(
|
|
484
|
-
|
|
485
|
+
he,
|
|
485
486
|
{
|
|
486
487
|
parentPageLink: !0,
|
|
487
488
|
subPagePathPrefixArray: ["/email", "/sms"],
|
|
@@ -503,5 +504,5 @@ function Be() {
|
|
|
503
504
|
] });
|
|
504
505
|
}
|
|
505
506
|
export {
|
|
506
|
-
|
|
507
|
+
ze as default
|
|
507
508
|
};
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aw as r, cy as x, aN as n } from "./ContextBarContext-8a081573.js";
|
|
2
2
|
import j from "react";
|
|
3
|
-
import { C as d, j as
|
|
3
|
+
import { C as d, j as N } from "./index-852b249c.js";
|
|
4
4
|
import "react-router-dom";
|
|
5
5
|
import "@deviceinsight/ng-ui-basic-components";
|
|
6
6
|
import "@deviceinsight/ng-ui-components";
|
|
7
|
+
import "react-i18next";
|
|
8
|
+
import "i18next";
|
|
7
9
|
import "@deviceinsight/ng-ui-api-client";
|
|
10
|
+
import "ux4iot-react";
|
|
8
11
|
import "react-dom";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
({ onFocus: r, onChange: i, refField: c, renderAs: a, ...o }, s) => {
|
|
12
|
+
const P = j.forwardRef(
|
|
13
|
+
({ onFocus: l, onChange: i, refField: c, renderAs: o, ...a }, s) => {
|
|
12
14
|
function p() {
|
|
13
|
-
|
|
15
|
+
l();
|
|
14
16
|
}
|
|
15
17
|
const m = (t, e) => {
|
|
16
|
-
!
|
|
17
|
-
}, { label: f, ...u } =
|
|
18
|
-
return /* @__PURE__ */
|
|
18
|
+
!o || o === "input" ? i == null || i(t.replace(/\n/g, ""), e) : i == null || i(t, e);
|
|
19
|
+
}, { label: f, ...u } = a;
|
|
20
|
+
return /* @__PURE__ */ r.jsx(x, { ...u, label: f, children: /* @__PURE__ */ r.jsx(
|
|
19
21
|
"div",
|
|
20
22
|
{
|
|
21
23
|
className: n("di notification-template-field", {
|
|
22
|
-
textarea:
|
|
24
|
+
textarea: o === "textarea"
|
|
23
25
|
}),
|
|
24
|
-
children: /* @__PURE__ */
|
|
26
|
+
children: /* @__PURE__ */ r.jsx(
|
|
25
27
|
d,
|
|
26
28
|
{
|
|
27
|
-
...
|
|
29
|
+
...a,
|
|
28
30
|
basicSetup: {
|
|
29
31
|
lineNumbers: !1,
|
|
30
32
|
highlightActiveLine: !1,
|
|
@@ -35,7 +37,7 @@ const D = j.forwardRef(
|
|
|
35
37
|
c(t), s && (typeof s == "function" ? s(t) : s.current = t);
|
|
36
38
|
},
|
|
37
39
|
onFocus: p,
|
|
38
|
-
extensions: [
|
|
40
|
+
extensions: [N()]
|
|
39
41
|
}
|
|
40
42
|
)
|
|
41
43
|
}
|
|
@@ -43,5 +45,5 @@ const D = j.forwardRef(
|
|
|
43
45
|
}
|
|
44
46
|
);
|
|
45
47
|
export {
|
|
46
|
-
|
|
48
|
+
P as default
|
|
47
49
|
};
|