@ukpc-lib/react 0.12.1-dev.8 → 0.13.1-dev.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/components/index.cjs +9 -9
- package/dist/components/index.js +8 -8
- package/dist/{index.esm2017-B86w0LQi.js → index.esm2017-D3VDEGOb.js} +21 -9
- package/dist/{index.esm2017-DMgzbuon.cjs → index.esm2017-DtX2uFv9.cjs} +3 -3
- package/dist/share/hooks/index.d.ts +1 -0
- package/dist/share/hooks/useSyncRouter.d.ts +7 -0
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +71 -50
- package/package.json +1 -1
- package/web-components-bundle/access-denied/index.js +2 -2
- package/web-components-bundle/base-breadcrumbs/index.js +2 -2
- package/web-components-bundle/favorite-menu/index.js +4 -4
- package/web-components-bundle/global-menu/index.js +4 -4
- package/web-components-bundle/global-topbar/index.js +6 -6
- package/web-components-bundle/has-permission/index.js +3 -3
- package/web-components-bundle/{index-T58UE-6b.js → index-B2-j-GrO.js} +1 -1
- package/web-components-bundle/{index-BziS9Had.js → index-B8-7QZsi.js} +593 -593
- package/web-components-bundle/{index-BSe1av43.js → index-Cx0zTfOC.js} +1 -1
- package/web-components-bundle/{index-CaxjbvSW.js → index-DkWIzRN3.js} +30 -18
- package/web-components-bundle/page-not-found/index.js +2 -2
- package/web-components-bundle/{react-to-web-component-CXwKHjZr.js → react-to-web-component-D7SoYMky.js} +1535 -1527
- package/web-components-bundle/{react-toastify.esm-CrTD7cpE.js → react-toastify.esm-Y1WvK90L.js} +1 -1
- package/web-components-bundle/toast-config/index.js +2 -2
- package/web-components-bundle/toast-config-notification/index.js +2 -2
package/dist/components/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import ii, { jsxs as M, Fragment as le, jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import * as N from "react";
|
|
3
3
|
import ye, { useState as W, useContext as $e, useEffect as q, useRef as Se, useCallback as Mt, forwardRef as ai, createElement as sr, PureComponent as si } from "react";
|
|
4
|
-
import { c as ne, a as gt, C as Le, t as ct, p as li, L as Xr, u as ci, b as ui, S as qn, d as di, e as fi, Q as Zn, f as Et, g as Xn, h as hi, s as Ct, _ as B, P as R, i as pe, j as mi, o as pi, k as Ne, l as gi, m as yi, n as Jr, q as Ot, r as Qr, I as vi, v as bi, w as en, D as xi, x as Jn, y as Qn, z as Si, A as wi, B as _i } from "../index.esm2017-
|
|
5
|
-
import { H as au, G as su, K as lu, E as cu, F as uu, J as du } from "../index.esm2017-
|
|
4
|
+
import { c as ne, a as gt, C as Le, t as ct, p as li, L as Xr, u as ci, b as ui, S as qn, d as di, e as fi, Q as Zn, f as Et, g as Xn, h as hi, s as Ct, _ as B, P as R, i as pe, j as mi, o as pi, k as Ne, l as gi, m as yi, n as Jr, q as Ot, r as Qr, I as vi, v as bi, w as en, D as xi, x as Jn, y as Qn, z as Si, A as wi, B as _i } from "../index.esm2017-D3VDEGOb.js";
|
|
5
|
+
import { H as au, G as su, K as lu, E as cu, F as uu, J as du } from "../index.esm2017-D3VDEGOb.js";
|
|
6
6
|
import Q from "moment";
|
|
7
7
|
import { Stack as me, Dialog as Ei, DialogTitle as Ci, Typography as Ce, DialogContent as Ti, DialogActions as Ii, Button as pr, Box as ki, ClickAwayListener as Mi, TextField as eo, IconButton as Oi, CircularProgress as $i, Fade as Ai, Paper as Ni, Checkbox as Ri, Breadcrumbs as Pi } from "@mui/material";
|
|
8
8
|
import "axios";
|
|
9
|
-
import "@r2wc/react-to-web-component";
|
|
10
9
|
import { useParams as zi, Link as to } from "react-router-dom";
|
|
10
|
+
import "@r2wc/react-to-web-component";
|
|
11
11
|
import "react-query";
|
|
12
12
|
import "react-dom";
|
|
13
13
|
const Di = (e) => {
|
|
@@ -1900,7 +1900,7 @@ function Ba({
|
|
|
1900
1900
|
if ((_ != null ? _.shadowRoot : document).getElementById("selectedSearch") === null) {
|
|
1901
1901
|
console.log("enter", x);
|
|
1902
1902
|
const E = x.currentTarget.value;
|
|
1903
|
-
window.location.href = `${h}/
|
|
1903
|
+
window.location.href = `${h}/GlobalSearch/page/Index?Term=${E}`;
|
|
1904
1904
|
return;
|
|
1905
1905
|
}
|
|
1906
1906
|
}
|
|
@@ -2080,7 +2080,7 @@ function Ua({ classNames: e = "", ...t }) {
|
|
|
2080
2080
|
s.length >= 3 ? E(s) : _([]);
|
|
2081
2081
|
}, [s]);
|
|
2082
2082
|
const E = async (O) => {
|
|
2083
|
-
await fetch(`${o}/
|
|
2083
|
+
await fetch(`${o}/GlobalSearch/page/Suggestions?term=${O}`).then((C) => C.json()).then((C) => {
|
|
2084
2084
|
_(C), console.log(C);
|
|
2085
2085
|
}).catch((C) => {
|
|
2086
2086
|
console.error(C);
|
|
@@ -2093,13 +2093,13 @@ function Ua({ classNames: e = "", ...t }) {
|
|
|
2093
2093
|
const C = O.entityType, $ = O.entityId;
|
|
2094
2094
|
switch (C) {
|
|
2095
2095
|
case "Zone":
|
|
2096
|
-
document.location.href = o + "/
|
|
2096
|
+
document.location.href = o + "/SiteManagement/page/Zone/Details/" + $;
|
|
2097
2097
|
return;
|
|
2098
2098
|
case "Location":
|
|
2099
|
-
document.location.href = o + "/
|
|
2099
|
+
document.location.href = o + "/SiteManagement/page/Location/Details/" + $;
|
|
2100
2100
|
return;
|
|
2101
2101
|
case "Company":
|
|
2102
|
-
document.location.href = o + "/
|
|
2102
|
+
document.location.href = o + "/SiteManagement/page/Company/Details/" + $;
|
|
2103
2103
|
return;
|
|
2104
2104
|
default:
|
|
2105
2105
|
console.log(`Unsure how to navigate to ${C} ${$}`);
|
|
@@ -6,8 +6,8 @@ import bI from "axios";
|
|
|
6
6
|
import wI from "moment";
|
|
7
7
|
import { createTheme as xI, ThemeProvider as SI, Grid as TI, CircularProgress as CI, Tooltip as Ld, styled as EI, Switch as kI } from "@mui/material";
|
|
8
8
|
import { useQuery as zv, useQueryClient as nT } from "react-query";
|
|
9
|
-
import "@r2wc/react-to-web-component";
|
|
10
9
|
import { Link as rT, useLocation as iT } from "react-router-dom";
|
|
10
|
+
import "@r2wc/react-to-web-component";
|
|
11
11
|
import { createPortal as Yv } from "react-dom";
|
|
12
12
|
function DI(t, e) {
|
|
13
13
|
for (var n = 0; n < e.length; n++) {
|
|
@@ -2146,13 +2146,24 @@ const A0 = (t) => {
|
|
|
2146
2146
|
function fM(t, e) {
|
|
2147
2147
|
var o, a, c, d, p, w, m, T, E;
|
|
2148
2148
|
const n = t.config, r = ((a = (o = t.response) == null ? void 0 : o.data) == null ? void 0 : a.errorMessage) || ((d = (c = t.response) == null ? void 0 : c.data) == null ? void 0 : d.message), i = r === lM.TOKEN_EXPIRED;
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2149
|
+
if (((p = t.response) == null ? void 0 : p.status) === 401 && i && !n._retry)
|
|
2150
|
+
return Mg ? new Promise((I, A) => {
|
|
2151
|
+
Bm.push({ resolve: I, reject: A });
|
|
2152
|
+
}).then(() => da(n)).catch((I) => Promise.reject(I)) : (n._retry = !0, Mg = !0, da.post("/authentication/api/v1/auth/refresh-token", void 0, {
|
|
2153
|
+
baseURL: window.env.AUTHEN_DOMAIN
|
|
2154
|
+
}).then(() => (A0(null), da(n))).catch((I) => (A0(I), Promise.reject(I))).finally(() => {
|
|
2155
|
+
Mg = !1;
|
|
2156
|
+
}));
|
|
2157
|
+
if (((w = t.response) == null ? void 0 : w.status) === 401 && !i) {
|
|
2158
|
+
if (window.self !== window.top && window.top) {
|
|
2159
|
+
console.log("401 - IFRAME");
|
|
2160
|
+
const I = `${window.env.AUTHEN_DOMAIN || window.top.origin}/authentication/login`;
|
|
2161
|
+
window.top.location.href = I;
|
|
2162
|
+
return;
|
|
2163
|
+
}
|
|
2164
|
+
return uM(window.env.AUTHEN_DOMAIN);
|
|
2165
|
+
}
|
|
2166
|
+
return ((m = t.response) == null ? void 0 : m.status) === 403 ? (T = e == null ? void 0 : e.handle403) == null || T.call(e, t) : (!(e != null && e.disabledPushNotify) && Bp(fT(`${r || "Something went wrong!"}`)), (E = e == null ? void 0 : e.handleOtherError) == null || E.call(e, t)), r && t.response && t.response.data && (t.response.data.message = r), Promise.reject(t);
|
|
2156
2167
|
}
|
|
2157
2168
|
const LY = da.interceptors.response.use(
|
|
2158
2169
|
(t) => t,
|
|
@@ -29699,7 +29710,7 @@ function ZD({ ...t }) {
|
|
|
29699
29710
|
}, [t.item.isFavorite]);
|
|
29700
29711
|
const _ = un(), U = un();
|
|
29701
29712
|
U != null && U.current && ((We = U == null ? void 0 : U.current) == null ? void 0 : We.scrollWidth) > ((Qe = U == null ? void 0 : U.current) == null ? void 0 : Qe.clientWidth);
|
|
29702
|
-
const G = window.location.origin, ne = e.path && e.path.includes("http") ? new URL(e.path) : { origin: "", pathname: "" }, K = window.location.pathname.split("/")[1], le = ne.pathname.split("/")[1], S =
|
|
29713
|
+
const G = window.location.origin, ne = e.path && e.path.includes("http") ? new URL(e.path) : { origin: "", pathname: "" }, K = window.location.pathname.split("/")[1], le = ne.pathname.split("/")[1], S = t.item.redirectUrl || t.ssr || !G.includes("local") && G !== ne.origin || le !== K, se = r ? "div" : !t.isInternalApp && S ? "a" : rT, ue = e.redirectUrl || e.path || "#", He = n + 1, Ae = r && o && E, Me = o || n === 0 ? void 0 : `${n + 0.25}rem`, $e = () => {
|
|
29703
29714
|
I(!0);
|
|
29704
29715
|
}, Ue = () => {
|
|
29705
29716
|
I(!1);
|
|
@@ -30153,6 +30164,7 @@ function b6(t) {
|
|
|
30153
30164
|
return /* @__PURE__ */ Ve(
|
|
30154
30165
|
ZD,
|
|
30155
30166
|
{
|
|
30167
|
+
isInternalApp: t.isInternalApp,
|
|
30156
30168
|
isActive: de,
|
|
30157
30169
|
isCollapsed: p,
|
|
30158
30170
|
replacePath: t.replacePath,
|