@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,4 +1,4 @@
1
- import { at as c, a5 as Et, cY as wt, a_ as kt, ag as et, aV as bt, bn as It } from "./ContextBarContext-e53a6c9e.js";
1
+ import { ay as c, a5 as Et, cZ as wt, b3 as kt, ai as et, a_ as bt, bs as It } from "./ContextBarContext-0ec93c75.js";
2
2
  import * as Dt from "react";
3
3
  import { createContext as Ot, useState as pt, useEffect as Rt, useContext as At } from "react";
4
4
  import { Spinner as Tt, Button as yt, Icon as Lt, Bubble as jt } from "@deviceinsight/ng-ui-basic-components";
@@ -96,9 +96,9 @@ class Wt extends Dt.PureComponent {
96
96
  return this.createDatapoint(l + 1);
97
97
  const {
98
98
  data: { name: I, datatype: P, unit: q, thresholds: a },
99
- error: Y
99
+ error: $
100
100
  } = g[l];
101
- if (Y)
101
+ if ($)
102
102
  return setTimeout(() => this.updateUploadStateAndContinue(l, "CANNOT_UPLOAD"), 0);
103
103
  const N = {
104
104
  name: I,
@@ -167,7 +167,7 @@ License: MIT
167
167
  return i.userStep = t.step, i.userChunk = t.chunk, i.userComplete = t.complete, i.userError = t.error, t.step = w(t.step), t.chunk = w(t.chunk), t.complete = w(t.complete), t.error = w(t.error), delete t.worker, void i.postMessage({ input: e, config: t, workerId: i.id });
168
168
  }
169
169
  var s = null;
170
- return a.NODE_STREAM_INPUT, typeof e == "string" ? s = t.download ? new J(t) : new V(t) : e.readable === !0 && w(e.read) && w(e.on) ? s = new ht(t) : (d.File && e instanceof File || e instanceof Object) && (s = new Z(t)), s.stream(e);
170
+ return a.NODE_STREAM_INPUT, typeof e == "string" ? s = t.download ? new Y(t) : new Z(t) : e.readable === !0 && w(e.read) && w(e.on) ? s = new ht(t) : (d.File && e instanceof File || e instanceof Object) && (s = new X(t)), s.stream(e);
171
171
  }, unparse: function(e, t) {
172
172
  var n = !1, i = !0, s = ",", f = `\r
173
173
  `, S = '"', F = S + S, D = !1, r = null, j = !1;
@@ -221,8 +221,8 @@ License: MIT
221
221
  if (!b) {
222
222
  for (var R = 0; R < k; R++) {
223
223
  0 < R && !y && (U += s);
224
- var $ = L && B ? C[R] : R;
225
- U += m(E[_][$], R);
224
+ var J = L && B ? C[R] : R;
225
+ U += m(E[_][J], R);
226
226
  }
227
227
  _ < E.length - 1 && (!T || 0 < k && !y) && (U += f);
228
228
  }
@@ -245,15 +245,15 @@ License: MIT
245
245
  }
246
246
  } };
247
247
  if (a.RECORD_SEP = String.fromCharCode(30), a.UNIT_SEP = String.fromCharCode(31), a.BYTE_ORDER_MARK = "\uFEFF", a.BAD_DELIMITERS = ["\r", `
248
- `, '"', a.BYTE_ORDER_MARK], a.WORKERS_SUPPORTED = !x && !!d.Worker, a.NODE_STREAM_INPUT = 1, a.LocalChunkSize = 10485760, a.RemoteChunkSize = 5242880, a.DefaultDelimiter = ",", a.Parser = W, a.ParserHandle = ut, a.NetworkStreamer = J, a.FileStreamer = Z, a.StringStreamer = V, a.ReadableStreamStreamer = ht, d.jQuery) {
249
- var Y = d.jQuery;
250
- Y.fn.parse = function(e) {
248
+ `, '"', a.BYTE_ORDER_MARK], a.WORKERS_SUPPORTED = !x && !!d.Worker, a.NODE_STREAM_INPUT = 1, a.LocalChunkSize = 10485760, a.RemoteChunkSize = 5242880, a.DefaultDelimiter = ",", a.Parser = W, a.ParserHandle = ut, a.NetworkStreamer = Y, a.FileStreamer = X, a.StringStreamer = Z, a.ReadableStreamStreamer = ht, d.jQuery) {
249
+ var $ = d.jQuery;
250
+ $.fn.parse = function(e) {
251
251
  var t = e.config || {}, n = [];
252
252
  return this.each(function(f) {
253
- if (!(Y(this).prop("tagName").toUpperCase() === "INPUT" && Y(this).attr("type").toLowerCase() === "file" && d.FileReader) || !this.files || this.files.length === 0)
253
+ if (!($(this).prop("tagName").toUpperCase() === "INPUT" && $(this).attr("type").toLowerCase() === "file" && d.FileReader) || !this.files || this.files.length === 0)
254
254
  return !0;
255
255
  for (var S = 0; S < this.files.length; S++)
256
- n.push({ file: this.files[S], inputElem: this, instanceConfig: Y.extend({}, t) });
256
+ n.push({ file: this.files[S], inputElem: this, instanceConfig: $.extend({}, t) });
257
257
  }), i(), this;
258
258
  function i() {
259
259
  if (n.length !== 0) {
@@ -265,7 +265,7 @@ License: MIT
265
265
  return f = "AbortError", S = r.file, F = r.inputElem, D = j.reason, void (w(e.error) && e.error({ name: f }, S, F, D));
266
266
  if (j.action === "skip")
267
267
  return void s();
268
- typeof j.config == "object" && (r.instanceConfig = Y.extend(r.instanceConfig, j.config));
268
+ typeof j.config == "object" && (r.instanceConfig = $.extend(r.instanceConfig, j.config));
269
269
  } else if (j === "skip")
270
270
  return void s();
271
271
  }
@@ -312,7 +312,7 @@ License: MIT
312
312
  w(this._config.error) ? this._config.error(t) : I && this._config.error && d.postMessage({ workerId: a.WORKER_ID, error: t, finished: !1 });
313
313
  };
314
314
  }
315
- function J(e) {
315
+ function Y(e) {
316
316
  var t;
317
317
  (e = e || {}).chunkSize || (e.chunkSize = a.RemoteChunkSize), N.call(this, e), this._nextChunk = x ? function() {
318
318
  this._readChunk(), this._chunkLoaded();
@@ -350,7 +350,7 @@ License: MIT
350
350
  this._sendError(new Error(i));
351
351
  };
352
352
  }
353
- function Z(e) {
353
+ function X(e) {
354
354
  var t, n;
355
355
  (e = e || {}).chunkSize || (e.chunkSize = a.LocalChunkSize), N.call(this, e);
356
356
  var i = typeof FileReader < "u";
@@ -372,7 +372,7 @@ License: MIT
372
372
  this._sendError(t.error);
373
373
  };
374
374
  }
375
- function V(e) {
375
+ function Z(e) {
376
376
  var t;
377
377
  N.call(this, e = e || {}), this.stream = function(n) {
378
378
  return t = n, this._nextChunk();
@@ -480,26 +480,26 @@ License: MIT
480
480
  var b = e.quoteChar || '"';
481
481
  if (e.newline || (e.newline = function(O, p) {
482
482
  O = O.substring(0, 1048576);
483
- var R = new RegExp(K(p) + "([^]*?)" + K(p), "gm"), $ = (O = O.replace(R, "")).split("\r"), X = O.split(`
484
- `), tt = 1 < X.length && X[0].length < $[0].length;
485
- if ($.length === 1 || tt)
483
+ var R = new RegExp(K(p) + "([^]*?)" + K(p), "gm"), J = (O = O.replace(R, "")).split("\r"), V = O.split(`
484
+ `), tt = 1 < V.length && V[0].length < J[0].length;
485
+ if (J.length === 1 || tt)
486
486
  return `
487
487
  `;
488
- for (var it = 0, H = 0; H < $.length; H++)
489
- $[H][0] === `
488
+ for (var it = 0, H = 0; H < J.length; H++)
489
+ J[H][0] === `
490
490
  ` && it++;
491
- return it >= $.length / 2 ? `\r
491
+ return it >= J.length / 2 ? `\r
492
492
  ` : "\r";
493
493
  }(u, b)), i = !1, e.delimiter)
494
494
  w(e.delimiter) && (e.delimiter = e.delimiter(u), m.meta.delimiter = e.delimiter);
495
495
  else {
496
- var y = function(O, p, R, $, X) {
496
+ var y = function(O, p, R, J, V) {
497
497
  var tt, it, H, lt;
498
- X = X || [",", " ", "|", ";", a.RECORD_SEP, a.UNIT_SEP];
499
- for (var M = 0; M < X.length; M++) {
500
- var ot = X[M], dt = 0, A = 0, rt = 0;
498
+ V = V || [",", " ", "|", ";", a.RECORD_SEP, a.UNIT_SEP];
499
+ for (var M = 0; M < V.length; M++) {
500
+ var ot = V[M], dt = 0, A = 0, rt = 0;
501
501
  H = void 0;
502
- for (var G = new W({ comments: $, delimiter: ot, newline: p, preview: 10 }).parse(O), st = 0; st < G.data.length; st++)
502
+ for (var G = new W({ comments: J, delimiter: ot, newline: p, preview: 10 }).parse(O), st = 0; st < G.data.length; st++)
503
503
  if (R && E(G.data[st]))
504
504
  rt++;
505
505
  else {
@@ -596,14 +596,14 @@ License: MIT
596
596
  if (t !== D || o[p + 1] !== D) {
597
597
  if (t === D || p === 0 || o[p - 1] !== D) {
598
598
  y !== -1 && y < p + 1 && (y = o.indexOf(n, p + 1)), v !== -1 && v < p + 1 && (v = o.indexOf(i, p + 1));
599
- var $ = it(v === -1 ? y : Math.min(y, v));
600
- if (o[p + 1 + $] === n) {
601
- u.push(o.substring(r, p).replace(O, t)), o[r = p + 1 + $ + C] !== t && (p = o.indexOf(t, r)), y = o.indexOf(n, r), v = o.indexOf(i, r);
599
+ var J = it(v === -1 ? y : Math.min(y, v));
600
+ if (o[p + 1 + J] === n) {
601
+ u.push(o.substring(r, p).replace(O, t)), o[r = p + 1 + J + C] !== t && (p = o.indexOf(t, r)), y = o.indexOf(n, r), v = o.indexOf(i, r);
602
602
  break;
603
603
  }
604
- var X = it(v);
605
- if (o.substring(p + 1 + X, p + 1 + X + E) === i) {
606
- if (u.push(o.substring(r, p).replace(O, t)), lt(p + 1 + X + E), y = o.indexOf(n, r), p = o.indexOf(t, r), U && (ot(), j))
604
+ var V = it(v);
605
+ if (o.substring(p + 1 + V, p + 1 + V + E) === i) {
606
+ if (u.push(o.substring(r, p).replace(O, t)), lt(p + 1 + V + E), y = o.indexOf(n, r), p = o.indexOf(t, r), U && (ot(), j))
607
607
  return M();
608
608
  if (S && L.length >= S)
609
609
  return M(!0);
@@ -703,7 +703,7 @@ License: MIT
703
703
  var n = a.parse(t.input, t.config);
704
704
  n && d.postMessage({ workerId: a.WORKER_ID, results: n, finished: !0 });
705
705
  }
706
- }), (J.prototype = Object.create(N.prototype)).constructor = J, (Z.prototype = Object.create(N.prototype)).constructor = Z, (V.prototype = Object.create(V.prototype)).constructor = V, (ht.prototype = Object.create(N.prototype)).constructor = ht, a;
706
+ }), (Y.prototype = Object.create(N.prototype)).constructor = Y, (X.prototype = Object.create(N.prototype)).constructor = X, (Z.prototype = Object.create(Z.prototype)).constructor = Z, (ht.prototype = Object.create(N.prototype)).constructor = ht, a;
707
707
  });
708
708
  })(Ct);
709
709
  var Ht = Ct.exports;
@@ -714,26 +714,26 @@ const Gt = 20, Qt = (h) => {
714
714
  return h[0][0] === "DATAPOINT_NAME" && d.shift(), d.forEach((x, I) => {
715
715
  if (g > Gt)
716
716
  throw new Error("INVALID_DOCUMENT");
717
- const [P, q, a, Y, N, J] = x, Z = {};
718
- N && !isNaN(parseInt(N)) && (Z.threshold1 = parseInt(N)), J && !isNaN(parseInt(J)) && (Z.threshold2 = parseInt(J));
719
- const V = {
717
+ const [P, q, a, $, N, Y] = x, X = {};
718
+ N && !isNaN(parseInt(N)) && (X.threshold1 = parseInt(N)), Y && !isNaN(parseInt(Y)) && (X.threshold2 = parseInt(Y));
719
+ const Z = {
720
720
  idx: I,
721
721
  data: {
722
722
  name: P,
723
723
  datatype: q && q.toUpperCase(),
724
- unit: Y ? {
725
- name: Y,
724
+ unit: $ ? {
725
+ name: $,
726
726
  print: a
727
727
  } : null,
728
- thresholds: Z
728
+ thresholds: X
729
729
  }
730
730
  };
731
- if (l.push(V), x.length < 2)
732
- return g++, V.error = "INVALID_NUMBER_OF_CELLS";
731
+ if (l.push(Z), x.length < 2)
732
+ return g++, Z.error = "INVALID_NUMBER_OF_CELLS";
733
733
  if (!wt.includes(q))
734
- return g++, V.error = "INVALID_DATATYPE";
734
+ return g++, Z.error = "INVALID_DATATYPE";
735
735
  }), l;
736
- }, Yt = (h) => new Promise((l, g) => {
736
+ }, $t = (h) => new Promise((l, g) => {
737
737
  Ht.parse(h, {
738
738
  skipEmptyLines: !0,
739
739
  complete: ({ data: d }) => {
@@ -748,17 +748,17 @@ const Gt = 20, Qt = (h) => {
748
748
  g(d);
749
749
  }
750
750
  });
751
- }), $t = (h, l, g) => g.findIndex((d) => (d == null ? void 0 : d.name) === (h == null ? void 0 : h.name)) === l, Jt = async (h, l, g) => {
752
- const x = l.filter((I) => !I.error).map((I) => I.data.unit).filter((I) => I && !h.some((P) => P.name === I.name)).filter($t).filter(kt).map(g);
751
+ }), Jt = (h, l, g) => g.findIndex((d) => (d == null ? void 0 : d.name) === (h == null ? void 0 : h.name)) === l, Yt = async (h, l, g) => {
752
+ const x = l.filter((I) => !I.error).map((I) => I.data.unit).filter((I) => I && !h.some((P) => P.name === I.name)).filter(Jt).filter(kt).map(g);
753
753
  return await Promise.all(x), await Pt();
754
- }, Vt = [
754
+ }, Zt = [
755
755
  "DATAPOINT_NAME,DATAPOINT_TYPE,UNIT_DISPLAY_NAME,UNIT_IDENTIFIER,DATAPOINT_UPPER_THRESHOLD,DATAPOINT_LOWER_THRESHOLD",
756
756
  "new_datapoint_1,LONG,°C,degrees-celsius,20,7",
757
757
  "new_datapoint_2,LONG,,,,"
758
758
  ], vt = {
759
759
  marginLeft: 15,
760
760
  listStyle: "disc"
761
- }, Xt = () => /* @__PURE__ */ c.jsxs("ul", { style: { ...vt, width: 345 }, children: [
761
+ }, Vt = () => /* @__PURE__ */ c.jsxs("ul", { style: { ...vt, width: 345 }, children: [
762
762
  /* @__PURE__ */ c.jsxs("li", { children: [
763
763
  /* @__PURE__ */ c.jsx(et, { i18nKey: "datapointImport.infoColumns", children: "Columns:" }),
764
764
  /* @__PURE__ */ c.jsxs("ul", { style: { ...vt, listStyle: "circle" }, children: [
@@ -784,7 +784,7 @@ const Gt = 20, Qt = (h) => {
784
784
  onPageSizeChange: () => {
785
785
  }
786
786
  }), St = "uiConfigurations/datapointimportpagination";
787
- function Zt({ children: h }) {
787
+ function Xt({ children: h }) {
788
788
  const [l, g] = pt(10), d = (x) => {
789
789
  g(x), zt(St, { pageSize: x });
790
790
  };
@@ -797,19 +797,19 @@ function Zt({ children: h }) {
797
797
  }, []), /* @__PURE__ */ c.jsx(xt.Provider, { value: { pageSize: l, onPageSizeChange: d }, children: h });
798
798
  }
799
799
  function he(h) {
800
- return /* @__PURE__ */ c.jsx(Zt, { children: /* @__PURE__ */ c.jsx(te, { ...h }) });
800
+ return /* @__PURE__ */ c.jsx(Xt, { children: /* @__PURE__ */ c.jsx(te, { ...h }) });
801
801
  }
802
802
  function te({ existingUnits: h, onChangeUploadStatus: l, createDatapoint: g, addUnit: d }) {
803
- const [x, I] = pt([]), [P, q] = pt(null), { pageSize: a, onPageSizeChange: Y } = At(xt), [N, J] = pt(!1);
804
- function Z() {
803
+ const [x, I] = pt([]), [P, q] = pt(null), { pageSize: a, onPageSizeChange: $ } = At(xt), [N, Y] = pt(!1);
804
+ function X() {
805
805
  I([]), q(null);
806
806
  }
807
- function V(K) {
808
- J(!0), I([]), q(null), Yt(K).then(async (W) => {
809
- await Jt(h, W, d), I(W), l(!0, 0, 0);
807
+ function Z(K) {
808
+ Y(!0), I([]), q(null), $t(K).then(async (W) => {
809
+ await Yt(h, W, d), I(W), l(!0, 0, 0);
810
810
  }).catch((W) => {
811
811
  q(W);
812
- }).finally(() => J(!1));
812
+ }).finally(() => Y(!1));
813
813
  }
814
814
  function ht(K) {
815
815
  const W = Object.values(K), ft = W.filter((ct) => ct === "UPLOAD_SUCCESSFUL");
@@ -818,7 +818,7 @@ function te({ existingUnits: h, onChangeUploadStatus: l, createDatapoint: g, add
818
818
  function ut() {
819
819
  const K = "datapoint-import-template.csv";
820
820
  It.saveAs(
821
- new Blob([Vt.join(`
821
+ new Blob([Zt.join(`
822
822
  `)], {
823
823
  type: "text/csv"
824
824
  }),
@@ -829,8 +829,8 @@ function te({ existingUnits: h, onChangeUploadStatus: l, createDatapoint: g, add
829
829
  /* @__PURE__ */ c.jsx(
830
830
  Ut,
831
831
  {
832
- onRemoveFile: Z,
833
- onSelectFile: V,
832
+ onRemoveFile: X,
833
+ onSelectFile: Z,
834
834
  previewComponent: ({ file: K, onRemoveFile: W }) => /* @__PURE__ */ c.jsxs("strong", { className: "di delete-file-button", children: [
835
835
  K ? K.name : "",
836
836
  /* @__PURE__ */ c.jsx(yt, { naked: !0, onClick: W, "data-testid": "delete-file-button", children: /* @__PURE__ */ c.jsx(Lt, { del: !0 }) })
@@ -840,7 +840,7 @@ function te({ existingUnits: h, onChangeUploadStatus: l, createDatapoint: g, add
840
840
  P && /* @__PURE__ */ c.jsx("div", { className: "di upload-error parsing-error", children: /* @__PURE__ */ c.jsx(et, { i18nKey: "datapointImport.tooManyParsingErrors", children: "Too many parsing errors" }) }),
841
841
  !x.length && /* @__PURE__ */ c.jsxs("div", { className: "di download-csv-section", children: [
842
842
  /* @__PURE__ */ c.jsx(yt, { onClick: ut, children: /* @__PURE__ */ c.jsx(et, { i18nKey: "datapointImport.downloadSample", children: "Download template csv file" }) }),
843
- /* @__PURE__ */ c.jsx("label", { className: "csv-upload-info", children: /* @__PURE__ */ c.jsx(jt, { content: /* @__PURE__ */ c.jsx(Xt, {}), children: /* @__PURE__ */ c.jsx("span", { className: "upload-anchor", children: " ?" }) }) })
843
+ /* @__PURE__ */ c.jsx("label", { className: "csv-upload-info", children: /* @__PURE__ */ c.jsx(jt, { content: /* @__PURE__ */ c.jsx(Vt, {}), children: /* @__PURE__ */ c.jsx("span", { className: "upload-anchor", children: " ?" }) }) })
844
844
  ] }),
845
845
  /* @__PURE__ */ c.jsx("div", { className: "datapoint-import-section", children: /* @__PURE__ */ c.jsx(
846
846
  Wt,
@@ -850,7 +850,7 @@ function te({ existingUnits: h, onChangeUploadStatus: l, createDatapoint: g, add
850
850
  isLoading: N,
851
851
  createDatapoint: g,
852
852
  pageSize: a,
853
- onPageSizeChange: Y
853
+ onPageSizeChange: $
854
854
  }
855
855
  ) })
856
856
  ] });
@@ -1,4 +1,4 @@
1
- import { at as t, cz as m } from "./ContextBarContext-e53a6c9e.js";
1
+ import { ay as t, cA as m } from "./ContextBarContext-0ec93c75.js";
2
2
  import { useState as p } from "react";
3
3
  import { Button as d, Icon as u } from "@deviceinsight/ng-ui-basic-components";
4
4
  import { ImageUpload as F, FileUpload as x } from "@deviceinsight/ng-ui-components";
@@ -1,18 +1,18 @@
1
- import { ah as M, at as e, ag as p, cZ as D, c_ as R, bn as G, a6 as Y, b1 as z, cp as Z, c$ as q, aV as _, aN as $ } from "./ContextBarContext-e53a6c9e.js";
2
- import { messageBoxError as J, ReactableWithClientSidePagination as ee, ContentHeader as te, RouteTabs as se } from "@deviceinsight/ng-ui-components";
1
+ import { aj as V, ay as e, ai as p, c_ as D, c$ as R, bs as G, a6 as Y, b6 as z, cr as Z, d0 as q, a_ as _, aS as $ } from "./ContextBarContext-0ec93c75.js";
2
+ import { messageBoxError as J, ReactableWithClientSidePagination as ee, ContentHeader as se, RouteTabs as te } from "@deviceinsight/ng-ui-components";
3
3
  import { useState as B, useCallback as S, useRef as ie, useEffect as U, useMemo as X, createContext as ae, useContext as ne } from "react";
4
4
  import { Modal as le, SpinnerContainer as P, Button as k, Icon as W, useConfirm as oe } from "@deviceinsight/ng-ui-basic-components";
5
- import { F as re } from "./FileUploadInput-71acf840.js";
5
+ import { F as re } from "./FileUploadInput-83a88c0d.js";
6
6
  import { createPortal as de } from "react-dom";
7
7
  import { Link as ce } from "react-router-dom";
8
- import { g as V } from "./customFileCategories-1b64ed45.js";
8
+ import { g as M } from "./customFileCategories-1b64ed45.js";
9
9
  import "@deviceinsight/ng-ui-api-client";
10
- const Ae = ({ fileType: t, onClose: s, onUpload: l }) => {
11
- const { t: n } = M(), [u, i] = B(null), [m, A] = B(""), [g, f] = B(!1), h = u && !m, d = async (o) => {
10
+ const Ae = ({ fileType: s, onClose: t, onUpload: l }) => {
11
+ const { t: n } = V(), [u, i] = B(null), [m, A] = B(""), [g, f] = B(!1), h = u && !m, d = async (o) => {
12
12
  if (o) {
13
13
  f(!0);
14
14
  try {
15
- await l(o, t), s();
15
+ await l(o, s), t();
16
16
  } catch (F) {
17
17
  J(F.message), console.error(F), f(!1);
18
18
  }
@@ -26,13 +26,13 @@ const Ae = ({ fileType: t, onClose: s, onUpload: l }) => {
26
26
  le,
27
27
  {
28
28
  width: 450,
29
- header: t === "documents" ? /* @__PURE__ */ e.jsx(p, { i18nKey: "assets.detail.files.uploadForm.addDocument", children: "Add document" }) : /* @__PURE__ */ e.jsx(p, { i18nKey: "assets.detail.files.uploadForm.addImage", children: "Add image" }),
29
+ header: s === "documents" ? /* @__PURE__ */ e.jsx(p, { i18nKey: "assets.detail.files.uploadForm.addDocument", children: "Add document" }) : /* @__PURE__ */ e.jsx(p, { i18nKey: "assets.detail.files.uploadForm.addImage", children: "Add image" }),
30
30
  content: /* @__PURE__ */ e.jsx(P, { show: g, children: /* @__PURE__ */ e.jsx(
31
31
  re,
32
32
  {
33
33
  label: /* @__PURE__ */ e.jsx(p, { i18nKey: "assets.detail.files.uploadForm.fileLabel", children: "File to upload" }),
34
34
  onChange: x,
35
- imagesOnly: t === "images",
35
+ imagesOnly: s === "images",
36
36
  error: m,
37
37
  required: !0
38
38
  }
@@ -48,28 +48,28 @@ const Ae = ({ fileType: t, onClose: s, onUpload: l }) => {
48
48
  children: /* @__PURE__ */ e.jsx(p, { i18nKey: "general.actions.save", children: "Save" })
49
49
  }
50
50
  ),
51
- /* @__PURE__ */ e.jsx(k, { onClick: s, children: /* @__PURE__ */ e.jsx(p, { i18nKey: "general.actions.cancel", children: "Cancel" }) })
51
+ /* @__PURE__ */ e.jsx(k, { onClick: t, children: /* @__PURE__ */ e.jsx(p, { i18nKey: "general.actions.cancel", children: "Cancel" }) })
52
52
  ] })
53
53
  }
54
54
  );
55
- }, ue = ({ contentType: t, loading: s, content: l }) => /* @__PURE__ */ e.jsx("div", { className: "image-preview", children: /* @__PURE__ */ e.jsxs(P, { show: s, children: [
56
- t === "image/svg+xml" && /* @__PURE__ */ e.jsx(
55
+ }, ue = ({ contentType: s, loading: t, content: l }) => /* @__PURE__ */ e.jsx("div", { className: "image-preview", children: /* @__PURE__ */ e.jsxs(P, { show: t, children: [
56
+ s === "image/svg+xml" && /* @__PURE__ */ e.jsx(
57
57
  "div",
58
58
  {
59
59
  className: "svg-preview",
60
60
  style: {
61
- backgroundImage: `url("${s || !l ? "" : l}")`
61
+ backgroundImage: `url("${t || !l ? "" : l}")`
62
62
  }
63
63
  }
64
64
  ),
65
- t !== "image/svg+xml" && /* @__PURE__ */ e.jsx("img", { src: l, alt: "" })
65
+ s !== "image/svg+xml" && /* @__PURE__ */ e.jsx("img", { src: l, alt: "" })
66
66
  ] }) }), me = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAfCAYAAADwbH0HAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH4ggUCDQxnLQ5VQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAGASURBVEjHvde3UgMxEIBhAUNBdoKCHEo/Aa9BCwWtXw7GBRVDGPKAzzahIaeKmhp+CmSP5izJF/a8rXb3mztJJ51SRgB9qkfRb6AVpdQWMCiNANPANlAKD1SAX/6jKolr9F73bgKF1sCGgSKJh9BWBEBOAbPAE52RCtfog6XvLjDUSpoDnqVwD7rXRo3keeAlLQ7MONB9YNhVlArX6KOl/sCJGsULwGtc3IMedkWNJovAW1Tcgx4BI3EXSCTcgx4Do0m3xBLw7sI96Eli1MCXgQ9L8x0HegqMSX32XHg4zsRQA18BPj3oOTCeyVEGrDrQ746TRxAtATeeJ66KH6kavY4wx3I4UHSgl8BXJrhGm66FBJTFcaAANCxNL8zVK4pHRUVxjdYdczrhqUuOA/kkaCpco4Gl6ArIxZim6LhGa5bkWhw0Fg7kHGgA5FNsRT8OrFnu1fU0aBf81rzUbwI/eqDRHpD58pn4HTAZTljXr7yYwQFT1tfbKVfCQK/+Fv8AJCO91qtSsKIAAAAASUVORK5CYII=", ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAnCAYAAADtu3N3AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH4ggUCCsYE1yvpwAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAFTSURBVEjHrdY9S5BhFAbgNykUKUIRE10kGxxsUgQXF2lLGppsCTcdGhprCZxqcNCxKRp0EcTJpaWGwBaDhpCIoJZECIQkTOty8Ajvfs7zAy44D/f5aJrkQweGmgLoEtZxioEs9sL5+4CODLQY0DfcyECzUdovjGagCfzGMaYz0DB+4j/mMlAPPsc/PclAnXgX0MuKLME2LldkaRdXM9BCQN8xmIHuRpYOMZaBxiNLfzFTkSV4WJWlZ9ksvQ3oVTZLawG9wZUM9jygT7iegYYCOsVIxQy/6LvXFbO8F3sBLlWAN7Ef4HwFOIkjnOBOBXgP/6Inb1eAj6LcH1ULdjnAj7hWEZmNkgkbYBfep2d/C+zDlwCfVoC3cBD78kEFOIU/6U3eAu9HBnM3Rgt8XHL9tMCV1l3WXZHBzQC3UodegN3YCXC1otx+fA2wpIeHsdA0TXMGpWMqV6FcS+MAAAAASUVORK5CYII=", fe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAnCAYAAAACeRhJAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH4ggUCCwH0RU0lQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAFISURBVEjHrdaxS9VhFAZgja43JUy4uETocBsjwSXvLLnYEjQn4pKb4B6I08XJ1SXK6bo4Oogt3T0QHXTLJMGWFDFI83HwDM7f+Z0/4OF7h++8pwfD6O/JDn5gD0NZaM3dfEVfBqphJ7D17KueRDxYzmIj+BXYXBYbxwWuMJXFpnGNc4xlsQ8R8RjPslg7sF0MZqBedALbRi2D1fEtsE/ZiA0cBPYxizVxGtj7LPYKl/iHySz2Fv/xBy+y2EJEPMLTLLYa2Hc8zkAPsBnYFh5msIF72+JNBloM5CeGS5F3uMEZXpYiLfyNnfW6FHmO3xFpNvPnDgNZKkUeoRvIl8xe2rjXfbVSaCWQ/eI2xnwgJxjNtskFxrP9do3pKhp3vooboF3FVdJBbyn0OZAu6qXIUiAHaJQiM4GcoplZUCdRMxNVVEwre9TeAsA6JS24jJJMAAAAAElFTkSuQmCC", xe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAdCAYAAACqhkzFAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH4ggUCDYA/1xb7QAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAADlSURBVEjH7dW/CsIwEAbw7ySDjyFOujgJ4jMU3AWp7eJLCE7+2ZzENxB8GmdHV0FBN5f6uVQMIW0aCk45KLSX3I9LCI3AEiRHAGYoj4WInMykKpjcBhA5wJ0t2XAULQF0jedQVqAc4FVEzsZ2PMoKXB16RwADGMAA/gdUJFsAJkZ+WKF2TLKvfWcA9kpELiSbAOaezcTa+xtAKiJP/U+84i+2JBOSHcsFNsjHjvncjGSMgtvui95I9opaIxmRfOXYtHQdLtQL04rWNtTAEq8dN9FamIZucvSuYWmtg6qh9TFj+ZWwD7+x6apgNh+aAAAAAElFTkSuQmCC";
67
- const he = ({ initialImageNumber: t, items: s, onDownload: l, onClose: n }) => {
68
- const [u, i] = B(t), [m, A] = B(), [g, f] = B(!1), h = S(() => i((b) => Math.min(s.length - 1, b + 1)), [s]), d = S(() => i((b) => Math.max(0, b - 1)), []), x = ie({});
67
+ const he = ({ initialImageNumber: s, items: t, onDownload: l, onClose: n }) => {
68
+ const [u, i] = B(s), [m, A] = B(), [g, f] = B(!1), h = S(() => i((b) => Math.min(t.length - 1, b + 1)), [t]), d = S(() => i((b) => Math.max(0, b - 1)), []), x = ie({});
69
69
  U(() => (D.addListener("right", h), D.addListener("left", d), D.addListener("esc", n), () => {
70
70
  D.removeListener("right", h), D.removeListener("left", d), D.removeListener("esc", n);
71
71
  }), [h, d, n]);
72
- const o = s[u];
72
+ const o = t[u];
73
73
  U(() => {
74
74
  const b = x.current[o.key];
75
75
  b ? A(R(o.contentType, b)) : (f(!0), l(o).then((w) => {
@@ -78,7 +78,7 @@ const he = ({ initialImageNumber: t, items: s, onDownload: l, onClose: n }) => {
78
78
  }, [o, l]);
79
79
  const F = () => {
80
80
  G.saveAs(new Blob([x.current[o.key]]), o.filename);
81
- }, I = s.length > 0 && u > 0, v = s.length > 0 && u < s.length - 1, { body: y } = document;
81
+ }, I = t.length > 0 && u > 0, v = t.length > 0 && u < t.length - 1, { body: y } = document;
82
82
  return y ? de(
83
83
  /* @__PURE__ */ e.jsxs("div", { className: "di file-previewer", children: [
84
84
  /* @__PURE__ */ e.jsx("div", { className: "background" }),
@@ -97,7 +97,7 @@ const he = ({ initialImageNumber: t, items: s, onDownload: l, onClose: n }) => {
97
97
  ) : null;
98
98
  };
99
99
  var Q = { exports: {} };
100
- (function(t, s) {
100
+ (function(s, t) {
101
101
  (function(l) {
102
102
  var n = /^(b|B)$/, u = { iec: { bits: ["b", "Kib", "Mib", "Gib", "Tib", "Pib", "Eib", "Zib", "Yib"], bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] }, jedec: { bits: ["b", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"], bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] } }, i = { iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"], jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"] };
103
103
  function m(A) {
@@ -110,7 +110,7 @@ var Q = { exports: {} };
110
110
  return function(g) {
111
111
  return m(g, A);
112
112
  };
113
- }, t.exports = m;
113
+ }, s.exports = m;
114
114
  })();
115
115
  })(Q);
116
116
  var pe = Q.exports;
@@ -122,7 +122,7 @@ const be = /* @__PURE__ */ Y(pe), je = {
122
122
  direction: "DESC"
123
123
  }
124
124
  };
125
- function Be(t, s, l, n, u) {
125
+ function Be(s, t, l, n, u) {
126
126
  return [
127
127
  {
128
128
  name: "filename",
@@ -135,7 +135,7 @@ function Be(t, s, l, n, u) {
135
135
  return i.filename.toLowerCase().indexOf(m.toLowerCase()) !== -1;
136
136
  }
137
137
  },
138
- render: (i) => /* @__PURE__ */ e.jsxs(ce, { to: "#", onClick: () => s(i), children: [
138
+ render: (i) => /* @__PURE__ */ e.jsxs(ce, { to: "#", onClick: () => t(i), children: [
139
139
  i.filename,
140
140
  i.context && /* @__PURE__ */ e.jsxs("span", { children: [
141
141
  " [",
@@ -187,21 +187,21 @@ function Be(t, s, l, n, u) {
187
187
  }
188
188
  ];
189
189
  }
190
- function Fe({ files: t, loading: s, type: l, onFilenameClick: n, onDownload: u, onDelete: i }) {
191
- const { t: m } = M();
190
+ function Fe({ files: s, loading: t, type: l, onFilenameClick: n, onDownload: u, onDelete: i }) {
191
+ const { t: m } = V();
192
192
  return /* @__PURE__ */ e.jsx(
193
193
  ee,
194
194
  {
195
195
  columnDefs: Be(l, n, u, i, m),
196
196
  uniqueItemKey: (A) => A.key,
197
197
  paginationSettings: je,
198
- items: t,
199
- isLoading: s
198
+ items: s,
199
+ isLoading: t
200
200
  }
201
201
  );
202
202
  }
203
- function K(t, s, l) {
204
- const n = X(() => q(s, l, t), [s, l, t]), [u, i] = B(!1), [m, A] = B([]);
203
+ function K(s, t, l) {
204
+ const n = X(() => q(t, l, s), [t, l, s]), [u, i] = B(!1), [m, A] = B([]);
205
205
  U(() => {
206
206
  const { promise: d, cancel: x } = _(n.fetchFiles());
207
207
  return d.then((o) => {
@@ -250,32 +250,32 @@ const H = {
250
250
  documents: H,
251
251
  images: H
252
252
  });
253
- function Ce({ asset: t, assetGroup: s, children: l }) {
254
- const n = K("documents", t, s), u = K("images", t, s);
253
+ function Ce({ asset: s, assetGroup: t, children: l }) {
254
+ const n = K("documents", s, t), u = K("images", s, t);
255
255
  return /* @__PURE__ */ e.jsx(O.Provider, { value: { documents: n, images: u }, children: l });
256
256
  }
257
- function ve(t) {
258
- const { documents: s, images: l } = ne(O);
259
- return t === "documents" ? s : l;
257
+ function ve(s) {
258
+ const { documents: t, images: l } = ne(O);
259
+ return s === "documents" ? t : l;
260
260
  }
261
- function we(t, s) {
262
- const l = V().map(({ categoryName: n }) => n);
263
- return s && l.includes(s) ? t.filter((n) => n.category === s) : t.filter(
261
+ function we(s, t) {
262
+ const l = M().map(({ categoryName: n }) => n);
263
+ return t && l.includes(t) ? s.filter((n) => n.category === t) : s.filter(
264
264
  (n) => !n.category || !l.includes(n.category)
265
265
  );
266
266
  }
267
- function E({ type: t, category: s }) {
268
- const { loading: l, files: n, uploadFile: u, deleteFile: i, fetchFile: m } = ve(t), A = X(() => we(n, s), [n, s]), [g, f] = B(!1), [h, d] = B(!1), [x, o] = B(0), { t: F } = M(), I = oe();
267
+ function E({ type: s, category: t }) {
268
+ const { loading: l, files: n, uploadFile: u, deleteFile: i, fetchFile: m } = ve(s), A = X(() => we(n, t), [n, t]), [g, f] = B(!1), [h, d] = B(!1), [x, o] = B(0), { t: F } = V(), I = oe();
269
269
  async function v(j) {
270
270
  const C = await m(j);
271
271
  G.saveAs(new Blob([C]), j.filename);
272
272
  }
273
273
  function y(j) {
274
- t === "images" ? (o(A.indexOf(j)), d(!0)) : v(j);
274
+ s === "images" ? (o(A.indexOf(j)), d(!0)) : v(j);
275
275
  }
276
276
  async function b(j) {
277
277
  try {
278
- await u(j, s);
278
+ await u(j, t);
279
279
  } catch (C) {
280
280
  console.error(C), J(/* @__PURE__ */ e.jsx(p, { i18nKey: "files.error.unknown", children: "Operation failed" }));
281
281
  }
@@ -294,7 +294,7 @@ function E({ type: t, category: s }) {
294
294
  {
295
295
  files: A,
296
296
  loading: l,
297
- type: t,
297
+ type: s,
298
298
  onDownload: v,
299
299
  onFilenameClick: y,
300
300
  onDelete: w
@@ -302,10 +302,10 @@ function E({ type: t, category: s }) {
302
302
  ),
303
303
  /* @__PURE__ */ e.jsx($, { authorities: ["WRITE_ASSET_OR_ASSET_GROUP_FILE"], children: /* @__PURE__ */ e.jsxs(k, { onClick: () => f(!0), "data-testid": "add-file-button", children: [
304
304
  /* @__PURE__ */ e.jsx(W, { add: !0 }),
305
- t === "images" && /* @__PURE__ */ e.jsx(p, { i18nKey: "assets.detail.files.addImage", children: "Add image" }),
306
- t === "documents" && /* @__PURE__ */ e.jsx(p, { i18nKey: "assets.detail.files.addFile", children: "Add file" })
305
+ s === "images" && /* @__PURE__ */ e.jsx(p, { i18nKey: "assets.detail.files.addImage", children: "Add image" }),
306
+ s === "documents" && /* @__PURE__ */ e.jsx(p, { i18nKey: "assets.detail.files.addFile", children: "Add file" })
307
307
  ] }) }),
308
- g && /* @__PURE__ */ e.jsx(Ae, { fileType: t, onClose: () => f(!1), onUpload: b }),
308
+ g && /* @__PURE__ */ e.jsx(Ae, { fileType: s, onClose: () => f(!1), onUpload: b }),
309
309
  h && /* @__PURE__ */ e.jsx(
310
310
  he,
311
311
  {
@@ -324,27 +324,27 @@ function ye() {
324
324
  renderHeading: () => /* @__PURE__ */ e.jsx(p, { i18nKey: "assets.detail.files.tabs.documents", children: "Documents" }),
325
325
  renderBody: () => /* @__PURE__ */ e.jsx(E, { type: "documents" })
326
326
  },
327
- ...V().filter(({ type: t }) => t === "documents").map(({ categoryName: t, locizeKey: s, locizeDefaultValue: l }) => ({
328
- path: t,
329
- renderHeading: () => /* @__PURE__ */ e.jsx(p, { i18nKey: s, children: l }),
330
- renderBody: () => /* @__PURE__ */ e.jsx(E, { type: "documents", category: t })
327
+ ...M().filter(({ type: s }) => s === "documents").map(({ categoryName: s, locizeKey: t, locizeDefaultValue: l }) => ({
328
+ path: s,
329
+ renderHeading: () => /* @__PURE__ */ e.jsx(p, { i18nKey: t, children: l }),
330
+ renderBody: () => /* @__PURE__ */ e.jsx(E, { type: "documents", category: s })
331
331
  })),
332
332
  {
333
333
  path: "images",
334
334
  renderHeading: () => /* @__PURE__ */ e.jsx(p, { i18nKey: "assets.detail.files.tabs.images", children: "Images" }),
335
335
  renderBody: () => /* @__PURE__ */ e.jsx(E, { type: "images" })
336
336
  },
337
- ...V().filter(({ type: t }) => t === "images").map(({ categoryName: t, locizeKey: s, locizeDefaultValue: l }) => ({
338
- path: t,
339
- renderHeading: () => /* @__PURE__ */ e.jsx(p, { i18nKey: s, children: l }),
340
- renderBody: () => /* @__PURE__ */ e.jsx(E, { type: "images", category: t })
337
+ ...M().filter(({ type: s }) => s === "images").map(({ categoryName: s, locizeKey: t, locizeDefaultValue: l }) => ({
338
+ path: s,
339
+ renderHeading: () => /* @__PURE__ */ e.jsx(p, { i18nKey: t, children: l }),
340
+ renderBody: () => /* @__PURE__ */ e.jsx(E, { type: "images", category: s })
341
341
  }))
342
342
  ];
343
343
  }
344
- function Le({ asset: t, assetGroup: s }) {
344
+ function Le({ asset: s, assetGroup: t }) {
345
345
  return /* @__PURE__ */ e.jsxs("div", { children: [
346
346
  /* @__PURE__ */ e.jsx(
347
- te,
347
+ se,
348
348
  {
349
349
  title: {
350
350
  id: "assets.detail.files.name",
@@ -352,7 +352,7 @@ function Le({ asset: t, assetGroup: s }) {
352
352
  }
353
353
  }
354
354
  ),
355
- /* @__PURE__ */ e.jsx(Ce, { asset: t, assetGroup: s, children: /* @__PURE__ */ e.jsx(se, { pages: ye() }) })
355
+ /* @__PURE__ */ e.jsx(Ce, { asset: s, assetGroup: t, children: /* @__PURE__ */ e.jsx(te, { pages: ye() }) })
356
356
  ] });
357
357
  }
358
358
  export {
@@ -1,4 +1,4 @@
1
- import { a5 as $t, ad as Rr, at as wt, ag as _e } from "./ContextBarContext-e53a6c9e.js";
1
+ import { a5 as $t, af as Rr, ay as wt, ai as _e } from "./ContextBarContext-0ec93c75.js";
2
2
  import Ar, { useMemo as jr, useState as le, useEffect as He } from "react";
3
3
  import { getParamsForSingleReport as Mr } from "@deviceinsight/ng-ui-api-client";
4
4
  import { Tabs as Ir, Spinner as Br } from "@deviceinsight/ng-ui-basic-components";
@@ -1,4 +1,4 @@
1
- import { a5 as so, a6 as ro, at as mn } from "./ContextBarContext-e53a6c9e.js";
1
+ import { a5 as so, a6 as ro, ay as mn } from "./ContextBarContext-0ec93c75.js";
2
2
  import { useRef as gn, useCallback as oo, useEffect as ao } from "react";
3
3
  import { SpinnerContainer as ho } from "@deviceinsight/ng-ui-basic-components";
4
4
  import "react-router-dom";
@@ -1,6 +1,6 @@
1
- import { dd as S, dk as j, at as t, cz as C, ag as g } from "./ContextBarContext-e53a6c9e.js";
2
- import { useState as u, useEffect as v, useCallback as y } from "react";
3
- import { C as V, j as b } from "./index-23459578.js";
1
+ import { de as S, dl as j, ay as t, cA as y, ai as C } from "./ContextBarContext-0ec93c75.js";
2
+ import { useState as d, useEffect as v, useCallback as g } from "react";
3
+ import { C as V, 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";
@@ -11,19 +11,19 @@ function w({ setting: e, ...c }) {
11
11
  const { setValue: n, setError: o, clearErrors: i, control: p } = S(), {
12
12
  field: r,
13
13
  fieldState: { error: s }
14
- } = j({ name: e.name, control: p }), [f, l] = u(""), [d, h] = u(!1);
14
+ } = j({ name: e.name, control: p }), [f, l] = d(""), [m, h] = d(!1);
15
15
  v(() => {
16
- if (!d && r.value) {
16
+ if (!m && r.value) {
17
17
  const a = JSON.stringify(r.value, null, 2);
18
18
  l(a), h(!0);
19
19
  }
20
- }, [r.value, d]);
21
- const x = y(
20
+ }, [r.value, m]);
21
+ const x = g(
22
22
  (a) => {
23
23
  try {
24
24
  l(a);
25
- const m = a === "" ? void 0 : JSON.parse(a);
26
- n(e.name, m, { shouldValidate: !0, shouldDirty: !0 }), i(e.name);
25
+ const u = a === "" ? void 0 : JSON.parse(a);
26
+ n(e.name, u, { shouldValidate: !0, shouldDirty: !0 }), i(e.name);
27
27
  } catch {
28
28
  o(e.name, { message: "Invalid JSON syntax" });
29
29
  }
@@ -31,9 +31,9 @@ function w({ setting: e, ...c }) {
31
31
  [i, o, n, e.name]
32
32
  );
33
33
  return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsx(
34
- C,
34
+ y,
35
35
  {
36
- label: /* @__PURE__ */ t.jsx(g, { i18nKey: `appSettings.property.${e.name}`, children: e.name }),
36
+ label: /* @__PURE__ */ t.jsx(C, { i18nKey: `appSettings.property.${e.name}`, children: e.name }),
37
37
  error: (s == null ? void 0 : s.message) ?? "",
38
38
  size: "full-width",
39
39
  children: /* @__PURE__ */ t.jsx(