@ukpc-lib/react 0.16.14 → 0.16.15-sandbox.saas-9356.patch-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.
- package/dist/components/Toast/index.d.ts +2 -1
- package/dist/components/index.cjs +2 -2
- package/dist/components/index.js +6 -5
- package/dist/{index.esm2017-BTPhaEQE.js → index.esm2017-DZkOZ7Ks.js} +6351 -6309
- package/dist/{index.esm2017-B0NKoRVE.cjs → index.esm2017-kN5fDF5_.cjs} +105 -105
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +10 -10
- package/dist/translations/config.d.ts +6 -0
- package/package.json +1 -1
- package/web-components-bundle/access-denied/index.js +1 -1
- package/web-components-bundle/favorite-menu/index.js +2 -2
- package/web-components-bundle/global-menu/index.js +2 -2
- package/web-components-bundle/global-topbar/index.js +2 -2
- package/web-components-bundle/has-permission/index.js +1 -1
- package/web-components-bundle/{index-Ch-015PG.js → index-D118mGIQ.js} +59 -43
- package/web-components-bundle/{index-1KYsFOtH.js → index-Y9gHBnwV.js} +7670 -7646
package/dist/share/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.esm2017-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.esm2017-kN5fDF5_.cjs"),m=require("axios"),u=require("react"),d=require("react-router-dom"),a=require("react/jsx-runtime");require("@r2wc/react-to-web-component");require("@mui/material");require("react-query");require("react-dom");require("moment");const h=s=>{const[t,r]=u.useState([]);return u.useEffect(()=>{m.get(`${s}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(o=>r(o.data)).catch(o=>{console.error("Getting user permission error:",o)})},[s]),t},p=s=>{const t=d.useLocation();if(u.useEffect(()=>{var o,i;let r=t.pathname+t.search+t.hash;s&&!r.includes(s)&&(r=s+r),console.log("🚀 ~ PrivateLayout.tsx ~ fullPath:",r),(i=(o=window.top)==null?void 0:o.shellNavigate)==null||i.call(o,"/app"+r,{replace:!0})},[t,s]),window.self===window.top){console.log("useSyncRouter: Navigate to /app path"),window.location.href=window.location.href.replace(window.origin,`${window.origin}/app`);return}};function g({open:s,disabled:t}){u.useMemo(()=>{var r,o,i,n;t||(s?(o=(r=window.top)==null?void 0:r.HostBridge)==null||o.openBackdrop(!0):(n=(i=window.top)==null?void 0:i.HostBridge)==null||n.openBackdrop(!1))},[s,t])}const l=(s,t)=>(r,o)=>{const n=e.useUserPermissions({axiosInstance:t,baseUrl:s}).data;return n?o?r.every(c=>n==null?void 0:n.includes(c)):r.some(c=>n==null?void 0:n.includes(c)):!1},f=({baseUrl:s,accessWith:t,requireAll:r,children:o})=>l(s)(t,r)?a.jsx(a.Fragment,{children:o}):null,P=({accessWith:s,requireAll:t,baseUrl:r,children:o})=>l(r)(s,t)?a.jsx(a.Fragment,{children:o}):a.jsx(e.UnauthorizedPage,{});exports.AuthContext=e.AuthContext;exports.AuthProvider=e.AuthProvider;exports.ERROR_MESSAGE=e.ERROR_MESSAGE;exports.SaasThemeProvider=e.SaasThemeProvider;exports.TranslationProvider=e.TranslationProvider;exports.X_AUTO_CANCEL=e.X_AUTO_CANCEL;exports.axiosInstance=e.axiosInstance;exports.color=e.color;exports.createCustomTheme=e.createCustomTheme;exports.handleErrorAxios=e.handleErrorAxios;exports.isCanceledError=e.isCanceledError;exports.login=e.login;exports.logout=e.logout;exports.requestInterceptor=e.requestInterceptor;exports.responseInterceptor=e.responseInterceptor;exports.search=e.search;exports.setFavicon=e.setFavicon;exports.setShellBackdrop=e.setShellBackdrop;exports.translate=e.translate;exports.translationConfig=e.translationConfig;exports.useAuth=e.useAuth;exports.useCustomTranslation=e.useCustomTranslation;exports.useTheme=e.useTheme;exports.useTranslation=e.useTranslation;exports.HasPermission=f;exports.PermissionRoute=P;exports.getUseHasPermission=l;exports.useGetPermission=h;exports.useSyncBackdrop=g;exports.useSyncRouter=p;
|
package/dist/share/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { O as p, U as l } from "../index.esm2017-DZkOZ7Ks.js";
|
|
2
|
+
import { R as L, T as N, V as O, a7 as _, a4 as $, X as j, a as D, c as F, a5 as M, Z as X, $ as q, W as z, Y as V, a1 as Y, a0 as Z, v as J, a6 as K, s as Q, t as W, a2 as b, e as ee, u as se, j as oe, a3 as re } from "../index.esm2017-DZkOZ7Ks.js";
|
|
3
3
|
import d from "axios";
|
|
4
4
|
import { useState as f, useEffect as u, useMemo as h } from "react";
|
|
5
5
|
import { useLocation as w } from "react-router-dom";
|
|
@@ -64,16 +64,16 @@ const m = (o, r) => (e, s) => {
|
|
|
64
64
|
}) => m(e)(o, r) ? /* @__PURE__ */ i(c, { children: s }) : /* @__PURE__ */ i(l, {});
|
|
65
65
|
export {
|
|
66
66
|
L as AuthContext,
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
N as AuthProvider,
|
|
68
|
+
O as ERROR_MESSAGE,
|
|
69
69
|
H as HasPermission,
|
|
70
70
|
U as PermissionRoute,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
_ as SaasThemeProvider,
|
|
72
|
+
$ as TranslationProvider,
|
|
73
|
+
j as X_AUTO_CANCEL,
|
|
74
|
+
D as axiosInstance,
|
|
75
|
+
F as color,
|
|
76
|
+
M as createCustomTheme,
|
|
77
77
|
m as getUseHasPermission,
|
|
78
78
|
X as handleErrorAxios,
|
|
79
79
|
q as isCanceledError,
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "../react-to-web-component-w5r1Fs9q.js";
|
|
2
|
-
import { F, u as v } from "../index-
|
|
2
|
+
import { F, u as v } from "../index-Y9gHBnwV.js";
|
|
3
3
|
import "../index-N6zjI_u_.js";
|
|
4
4
|
import "../index-BBl8HzU3.js";
|
|
5
|
+
import "../index-D118mGIQ.js";
|
|
5
6
|
import "../react-toastify.esm-H_Xdunfj.js";
|
|
6
7
|
import "../toast-config/index.js";
|
|
7
8
|
import "../toast-config-notification/index.js";
|
|
8
9
|
import "../SaasThemeProvider-DUpoV8xb.js";
|
|
9
|
-
import "../index-Ch-015PG.js";
|
|
10
10
|
export {
|
|
11
11
|
F as FavoriteMenu,
|
|
12
12
|
v as updateFavoriteItems
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../react-to-web-component-w5r1Fs9q.js";
|
|
2
|
-
import { G as e } from "../index-
|
|
2
|
+
import { G as e } from "../index-Y9gHBnwV.js";
|
|
3
3
|
import "../index-N6zjI_u_.js";
|
|
4
4
|
import "../index-BBl8HzU3.js";
|
|
5
5
|
import "../SaasThemeProvider-DUpoV8xb.js";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-D118mGIQ.js";
|
|
7
7
|
export {
|
|
8
8
|
e as GlobalMenu
|
|
9
9
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../react-to-web-component-w5r1Fs9q.js";
|
|
2
|
-
import { L as s, T as L } from "../index-
|
|
2
|
+
import { L as s, T as L } from "../index-Y9gHBnwV.js";
|
|
3
3
|
import "../index-N6zjI_u_.js";
|
|
4
|
-
import "../index-
|
|
4
|
+
import "../index-D118mGIQ.js";
|
|
5
5
|
import "../index-BBl8HzU3.js";
|
|
6
6
|
import "../SaasThemeProvider-DUpoV8xb.js";
|
|
7
7
|
import "../react-toastify.esm-H_Xdunfj.js";
|
|
@@ -308,9 +308,9 @@ function an(i, e, t) {
|
|
|
308
308
|
var n = ye(i, t);
|
|
309
309
|
return n !== void 0 ? n : ye(e, t);
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function _t(i, e, t) {
|
|
312
312
|
for (var n in e)
|
|
313
|
-
n !== "__proto__" && n !== "constructor" && (n in i ? typeof i[n] == "string" || i[n] instanceof String || typeof e[n] == "string" || e[n] instanceof String ? t && (i[n] = e[n]) :
|
|
313
|
+
n !== "__proto__" && n !== "constructor" && (n in i ? typeof i[n] == "string" || i[n] instanceof String || typeof e[n] == "string" || e[n] instanceof String ? t && (i[n] = e[n]) : _t(i[n], e[n], t) : i[n] = e[n]);
|
|
314
314
|
return i;
|
|
315
315
|
}
|
|
316
316
|
function re(i) {
|
|
@@ -477,7 +477,7 @@ var dn = function(i) {
|
|
|
477
477
|
}, c = [r, a];
|
|
478
478
|
r.indexOf(".") > -1 && (c = r.split("."), s = o, o = a, a = c[1]), this.addNamespaces(a);
|
|
479
479
|
var f = ye(this.data, c) || {};
|
|
480
|
-
s ?
|
|
480
|
+
s ? _t(f, o, u) : f = ge(ge({}, f), o), Je(this.data, c, f), d.silent || this.emit("added", r, a, o);
|
|
481
481
|
}
|
|
482
482
|
}, {
|
|
483
483
|
key: "removeResourceBundle",
|
|
@@ -513,7 +513,7 @@ var dn = function(i) {
|
|
|
513
513
|
return this.data;
|
|
514
514
|
}
|
|
515
515
|
}]), t;
|
|
516
|
-
}(ee),
|
|
516
|
+
}(ee), Ct = {
|
|
517
517
|
processors: {},
|
|
518
518
|
addPostProcessor: function(e) {
|
|
519
519
|
this.processors[e.name] = e;
|
|
@@ -641,14 +641,14 @@ var Ge = {}, Qe = function(i) {
|
|
|
641
641
|
usedNS: g
|
|
642
642
|
} : f;
|
|
643
643
|
}
|
|
644
|
-
var v = this.resolve(r, a), m = v && v.res, S = v && v.usedKey || f, x = v && v.exactUsedKey || f, k = Object.prototype.toString.apply(m), D = ["[object Number]", "[object Function]", "[object RegExp]"], I = a.joinArrays !== void 0 ? a.joinArrays : this.options.joinArrays,
|
|
645
|
-
if (
|
|
644
|
+
var v = this.resolve(r, a), m = v && v.res, S = v && v.usedKey || f, x = v && v.exactUsedKey || f, k = Object.prototype.toString.apply(m), D = ["[object Number]", "[object Function]", "[object RegExp]"], I = a.joinArrays !== void 0 ? a.joinArrays : this.options.joinArrays, C = !this.i18nFormat || this.i18nFormat.handleAsObject, R = typeof m != "string" && typeof m != "boolean" && typeof m != "number";
|
|
645
|
+
if (C && m && R && D.indexOf(k) < 0 && !(typeof I == "string" && k === "[object Array]")) {
|
|
646
646
|
if (!a.returnObjects && !this.options.returnObjects) {
|
|
647
647
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
648
|
-
var
|
|
648
|
+
var _ = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(S, m, T(T({}, a), {}, {
|
|
649
649
|
ns: p
|
|
650
650
|
})) : "key '".concat(f, " (").concat(this.language, ")' returned an object instead of string.");
|
|
651
|
-
return u ? (v.res =
|
|
651
|
+
return u ? (v.res = _, v) : _;
|
|
652
652
|
}
|
|
653
653
|
if (d) {
|
|
654
654
|
var Y = k === "[object Array]", A = Y ? [] : {}, Pe = Y ? x : S;
|
|
@@ -662,7 +662,7 @@ var Ge = {}, Qe = function(i) {
|
|
|
662
662
|
}
|
|
663
663
|
m = A;
|
|
664
664
|
}
|
|
665
|
-
} else if (
|
|
665
|
+
} else if (C && typeof I == "string" && k === "[object Array]")
|
|
666
666
|
m = m.join(I), m && (m = this.extendTranslation(m, r, a, o));
|
|
667
667
|
else {
|
|
668
668
|
var h = !1, O = !1, j = a.count !== void 0 && typeof a.count != "string", L = t.hasDefaultValue(a), P = j ? this.pluralResolver.getSuffix(b, a.count, a) : "", K = a["defaultValue".concat(P)] || a.defaultValue;
|
|
@@ -724,7 +724,7 @@ var Ge = {}, Qe = function(i) {
|
|
|
724
724
|
}, o)), o.interpolation && this.interpolator.reset();
|
|
725
725
|
}
|
|
726
726
|
var w = o.postProcess || this.options.postProcess, v = typeof w == "string" ? [w] : w;
|
|
727
|
-
return r != null && v && v.length && o.applyPostProcessor !== !1 && (r =
|
|
727
|
+
return r != null && v && v.length && o.applyPostProcessor !== !1 && (r = Ct.handle(v, r, a, this.options && this.options.postProcessPassResolved ? T({
|
|
728
728
|
i18nResolved: s
|
|
729
729
|
}, o) : o, this)), r;
|
|
730
730
|
}
|
|
@@ -749,14 +749,14 @@ var Ge = {}, Qe = function(i) {
|
|
|
749
749
|
else {
|
|
750
750
|
var I;
|
|
751
751
|
w && (I = a.pluralResolver.getSuffix(k, o.count, o));
|
|
752
|
-
var
|
|
753
|
-
if (w && (D.push(b + I), v && D.push(b +
|
|
752
|
+
var C = "".concat(a.options.pluralSeparator, "zero");
|
|
753
|
+
if (w && (D.push(b + I), v && D.push(b + C)), m) {
|
|
754
754
|
var R = "".concat(b).concat(a.options.contextSeparator).concat(o.context);
|
|
755
|
-
D.push(R), w && (D.push(R + I), v && D.push(R +
|
|
755
|
+
D.push(R), w && (D.push(R + I), v && D.push(R + C));
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
|
-
for (var
|
|
759
|
-
a.isValidLookup(s) || (d =
|
|
758
|
+
for (var _; _ = D.pop(); )
|
|
759
|
+
a.isValidLookup(s) || (d = _, s = a.getResource(k, x, _, o));
|
|
760
760
|
}
|
|
761
761
|
}));
|
|
762
762
|
});
|
|
@@ -1860,7 +1860,7 @@ var we = function(i) {
|
|
|
1860
1860
|
throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1861
1861
|
if (!r.type)
|
|
1862
1862
|
throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1863
|
-
return r.type === "backend" && (this.modules.backend = r), (r.type === "logger" || r.log && r.warn && r.error) && (this.modules.logger = r), r.type === "languageDetector" && (this.modules.languageDetector = r), r.type === "i18nFormat" && (this.modules.i18nFormat = r), r.type === "postProcessor" &&
|
|
1863
|
+
return r.type === "backend" && (this.modules.backend = r), (r.type === "logger" || r.log && r.warn && r.error) && (this.modules.logger = r), r.type === "languageDetector" && (this.modules.languageDetector = r), r.type === "i18nFormat" && (this.modules.i18nFormat = r), r.type === "postProcessor" && Ct.addPostProcessor(r), r.type === "formatter" && (this.modules.formatter = r), r.type === "3rdParty" && this.modules.external.push(r), this;
|
|
1864
1864
|
}
|
|
1865
1865
|
}, {
|
|
1866
1866
|
key: "setResolvedLanguage",
|
|
@@ -2039,9 +2039,9 @@ N.setDefaultNamespace;
|
|
|
2039
2039
|
N.hasLoadedNamespace;
|
|
2040
2040
|
N.loadNamespaces;
|
|
2041
2041
|
N.loadLanguages;
|
|
2042
|
-
var Nt = [],
|
|
2042
|
+
var Nt = [], _n = Nt.forEach, Cn = Nt.slice;
|
|
2043
2043
|
function Nn(i) {
|
|
2044
|
-
return
|
|
2044
|
+
return _n.call(Cn.call(arguments, 1), function(e) {
|
|
2045
2045
|
if (e)
|
|
2046
2046
|
for (var t in e)
|
|
2047
2047
|
i[t] === void 0 && (i[t] = e[t]);
|
|
@@ -2489,7 +2489,7 @@ function mt(i, e) {
|
|
|
2489
2489
|
}
|
|
2490
2490
|
return t;
|
|
2491
2491
|
}
|
|
2492
|
-
function
|
|
2492
|
+
function _e(i) {
|
|
2493
2493
|
for (var e = 1; e < arguments.length; e++) {
|
|
2494
2494
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
2495
2495
|
e % 2 ? mt(Object(t), !0).forEach(function(n) {
|
|
@@ -2510,16 +2510,16 @@ function ar(i) {
|
|
|
2510
2510
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = e.i18n, n = M.useContext(Ut) || {}, r = n.i18n, a = n.defaultNS, o = t || r || Zn();
|
|
2511
2511
|
if (o && !o.reportNamespaces && (o.reportNamespaces = new tr()), !o) {
|
|
2512
2512
|
Ne("You will need to pass in an i18next instance by using initReactI18next");
|
|
2513
|
-
var s = function(R,
|
|
2514
|
-
return typeof
|
|
2513
|
+
var s = function(R, _) {
|
|
2514
|
+
return typeof _ == "string" ? _ : _ && U(_) === "object" && typeof _.defaultValue == "string" ? _.defaultValue : Array.isArray(R) ? R[R.length - 1] : R;
|
|
2515
2515
|
}, u = [s, {}, !1];
|
|
2516
2516
|
return u.t = s, u.i18n = {}, u.ready = !1, u;
|
|
2517
2517
|
}
|
|
2518
2518
|
o.options.react && o.options.react.wait !== void 0 && Ne("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
2519
|
-
var d =
|
|
2519
|
+
var d = _e(_e(_e({}, Qn()), o.options.react), e), c = d.useSuspense, f = d.keyPrefix, p = a || o.options && o.options.defaultNS;
|
|
2520
2520
|
p = typeof p == "string" ? [p] : p || ["translation"], o.reportNamespaces.addUsedNamespaces && o.reportNamespaces.addUsedNamespaces(p);
|
|
2521
|
-
var g = (o.isInitialized || o.initializedStoreOnce) && p.every(function(
|
|
2522
|
-
return Vn(
|
|
2521
|
+
var g = (o.isInitialized || o.initializedStoreOnce) && p.every(function(C) {
|
|
2522
|
+
return Vn(C, o, d);
|
|
2523
2523
|
});
|
|
2524
2524
|
function b() {
|
|
2525
2525
|
return o.getFixedT(e.lng || null, d.nsMode === "fallback" ? p : p[0], f);
|
|
@@ -2528,20 +2528,20 @@ function ar(i) {
|
|
|
2528
2528
|
e.lng && (S = "".concat(e.lng).concat(S));
|
|
2529
2529
|
var x = ir(S), k = M.useRef(!0);
|
|
2530
2530
|
M.useEffect(function() {
|
|
2531
|
-
var
|
|
2531
|
+
var C = d.bindI18n, R = d.bindI18nStore;
|
|
2532
2532
|
k.current = !0, !g && !c && (e.lng ? gt(o, e.lng, p, function() {
|
|
2533
2533
|
k.current && m(b);
|
|
2534
2534
|
}) : pt(o, p, function() {
|
|
2535
2535
|
k.current && m(b);
|
|
2536
2536
|
})), g && x && x !== S && k.current && m(b);
|
|
2537
|
-
function
|
|
2537
|
+
function _() {
|
|
2538
2538
|
k.current && m(b);
|
|
2539
2539
|
}
|
|
2540
|
-
return
|
|
2541
|
-
k.current = !1,
|
|
2542
|
-
return o.off(Y,
|
|
2540
|
+
return C && o && o.on(C, _), R && o && o.store.on(R, _), function() {
|
|
2541
|
+
k.current = !1, C && o && C.split(" ").forEach(function(Y) {
|
|
2542
|
+
return o.off(Y, _);
|
|
2543
2543
|
}), R && o && R.split(" ").forEach(function(Y) {
|
|
2544
|
-
return o.store.off(Y,
|
|
2544
|
+
return o.store.off(Y, _);
|
|
2545
2545
|
});
|
|
2546
2546
|
};
|
|
2547
2547
|
}, [o, S]);
|
|
@@ -2552,11 +2552,11 @@ function ar(i) {
|
|
|
2552
2552
|
var I = [v, o, g];
|
|
2553
2553
|
if (I.t = v, I.i18n = o, I.ready = g, g || !g && !c)
|
|
2554
2554
|
return I;
|
|
2555
|
-
throw new Promise(function(
|
|
2555
|
+
throw new Promise(function(C) {
|
|
2556
2556
|
e.lng ? gt(o, e.lng, p, function() {
|
|
2557
|
-
return
|
|
2557
|
+
return C();
|
|
2558
2558
|
}) : pt(o, p, function() {
|
|
2559
|
-
return
|
|
2559
|
+
return C();
|
|
2560
2560
|
});
|
|
2561
2561
|
});
|
|
2562
2562
|
}
|
|
@@ -2886,13 +2886,13 @@ function hr() {
|
|
|
2886
2886
|
throw new Error("could not read FormData body as text");
|
|
2887
2887
|
return Promise.resolve(this._bodyText);
|
|
2888
2888
|
}, u.formData && (this.formData = function() {
|
|
2889
|
-
return this.text().then(
|
|
2889
|
+
return this.text().then(_);
|
|
2890
2890
|
}), this.json = function() {
|
|
2891
2891
|
return this.text().then(JSON.parse);
|
|
2892
2892
|
}, this;
|
|
2893
2893
|
}
|
|
2894
2894
|
var I = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
|
|
2895
|
-
function
|
|
2895
|
+
function C(l) {
|
|
2896
2896
|
var h = l.toUpperCase();
|
|
2897
2897
|
return I.indexOf(h) > -1 ? h : l;
|
|
2898
2898
|
}
|
|
@@ -2907,7 +2907,7 @@ function hr() {
|
|
|
2907
2907
|
this.url = l.url, this.credentials = l.credentials, h.headers || (this.headers = new y(l.headers)), this.method = l.method, this.mode = l.mode, this.signal = l.signal, !O && l._bodyInit != null && (O = l._bodyInit, l.bodyUsed = !0);
|
|
2908
2908
|
} else
|
|
2909
2909
|
this.url = String(l);
|
|
2910
|
-
if (this.credentials = h.credentials || this.credentials || "same-origin", (h.headers || !this.headers) && (this.headers = new y(h.headers)), this.method =
|
|
2910
|
+
if (this.credentials = h.credentials || this.credentials || "same-origin", (h.headers || !this.headers) && (this.headers = new y(h.headers)), this.method = C(h.method || this.method || "GET"), this.mode = h.mode || this.mode || null, this.signal = h.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && O)
|
|
2911
2911
|
throw new TypeError("Body not allowed for GET or HEAD requests");
|
|
2912
2912
|
if (this._initBody(O), (this.method === "GET" || this.method === "HEAD") && (h.cache === "no-store" || h.cache === "no-cache")) {
|
|
2913
2913
|
var j = /([?&])_=[^&]*/;
|
|
@@ -2922,7 +2922,7 @@ function hr() {
|
|
|
2922
2922
|
R.prototype.clone = function() {
|
|
2923
2923
|
return new R(this, { body: this._bodyInit });
|
|
2924
2924
|
};
|
|
2925
|
-
function
|
|
2925
|
+
function _(l) {
|
|
2926
2926
|
var h = new FormData();
|
|
2927
2927
|
return l.trim().split("&").forEach(function(O) {
|
|
2928
2928
|
if (O) {
|
|
@@ -3197,7 +3197,7 @@ function jt(i, e) {
|
|
|
3197
3197
|
}
|
|
3198
3198
|
return t;
|
|
3199
3199
|
}
|
|
3200
|
-
function
|
|
3200
|
+
function Ce(i) {
|
|
3201
3201
|
for (var e = 1; e < arguments.length; e++) {
|
|
3202
3202
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
3203
3203
|
e % 2 ? jt(Object(t), !0).forEach(function(n) {
|
|
@@ -3275,7 +3275,7 @@ var kr = function() {
|
|
|
3275
3275
|
key: "init",
|
|
3276
3276
|
value: function(t) {
|
|
3277
3277
|
var n = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
3278
|
-
if (this.services = t, this.options =
|
|
3278
|
+
if (this.services = t, this.options = Ce(Ce(Ce({}, kr()), this.options || {}), r), this.allOptions = a, this.services && this.options.reloadInterval) {
|
|
3279
3279
|
var o = setInterval(function() {
|
|
3280
3280
|
return n.reload();
|
|
3281
3281
|
}, this.options.reloadInterval);
|
|
@@ -3382,6 +3382,7 @@ var kr = function() {
|
|
|
3382
3382
|
zt.type = "backend";
|
|
3383
3383
|
var Lr = /* @__PURE__ */ ((i) => (i.en = "en", i.de = "de", i))(Lr || {});
|
|
3384
3384
|
N.use(Dt).use(Ht).use(er).init({
|
|
3385
|
+
// 💥 CHANGED: Set to true to force immediate API load in the Shell on startup.
|
|
3385
3386
|
initImmediate: !0,
|
|
3386
3387
|
supportedLngs: [
|
|
3387
3388
|
"en",
|
|
@@ -3393,6 +3394,7 @@ N.use(Dt).use(Ht).use(er).init({
|
|
|
3393
3394
|
load: "languageOnly",
|
|
3394
3395
|
ns: ["translation"],
|
|
3395
3396
|
fallbackNS: "translation",
|
|
3397
|
+
// Use a reliable common namespace as fallback
|
|
3396
3398
|
partialBundledLanguages: !0,
|
|
3397
3399
|
resources: {},
|
|
3398
3400
|
interpolation: { escapeValue: !1 },
|
|
@@ -3404,14 +3406,28 @@ N.use(Dt).use(Ht).use(er).init({
|
|
|
3404
3406
|
backend: {
|
|
3405
3407
|
backends: [zt],
|
|
3406
3408
|
backendOptions: [
|
|
3409
|
+
// Option for ParentCacheBackend
|
|
3410
|
+
{},
|
|
3411
|
+
// Option for HttpBackend
|
|
3407
3412
|
{
|
|
3408
3413
|
loadPath: (i) => {
|
|
3409
3414
|
var r, a, o;
|
|
3410
3415
|
const t = (Array.isArray(i) ? i[0] : i || "en").split("-")[0];
|
|
3411
3416
|
return `${((r = window == null ? void 0 : window.env) == null ? void 0 : r.TRANSLATION_URL) ?? ((a = window == null ? void 0 : window.env) == null ? void 0 : a.VITE_BASE_URL) ?? ((o = window == null ? void 0 : window.env) == null ? void 0 : o.REACT_APP_BASE_URL) ?? `${location.protocol}//${location.host}`}/translations/${t}`;
|
|
3412
3417
|
},
|
|
3413
|
-
|
|
3414
|
-
|
|
3418
|
+
request: async (i, e, t, n) => {
|
|
3419
|
+
try {
|
|
3420
|
+
const r = await fetch(e, { method: "GET" }), a = await r.json(), o = e.match(/\/translations\/([^/?]+)/), s = o ? o[1] : "en";
|
|
3421
|
+
window.translations = window.translations || {}, window.translations[s] = {
|
|
3422
|
+
translation: a
|
|
3423
|
+
}, n(null, {
|
|
3424
|
+
status: r.status,
|
|
3425
|
+
data: a
|
|
3426
|
+
});
|
|
3427
|
+
} catch (r) {
|
|
3428
|
+
n(r, { status: 500, data: {} });
|
|
3429
|
+
}
|
|
3430
|
+
}
|
|
3415
3431
|
}
|
|
3416
3432
|
]
|
|
3417
3433
|
}
|
|
@@ -3512,11 +3528,11 @@ const me = {
|
|
|
3512
3528
|
]
|
|
3513
3529
|
}
|
|
3514
3530
|
);
|
|
3515
|
-
function
|
|
3531
|
+
function _r() {
|
|
3516
3532
|
return /* @__PURE__ */ E.jsx(or, { i18n: N, children: /* @__PURE__ */ E.jsx(Rr, {}) });
|
|
3517
3533
|
}
|
|
3518
3534
|
{
|
|
3519
|
-
const i = Xt(
|
|
3535
|
+
const i = Xt(_r);
|
|
3520
3536
|
customElements.define("access-denied", i);
|
|
3521
3537
|
}
|
|
3522
3538
|
export {
|