@ukpc-lib/react 0.13.1-dev.26 → 0.13.1-dev.28
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/StyledDateRangePicker/index.d.ts +0 -1
- package/dist/components/index.cjs +3 -3
- package/dist/components/index.js +588 -596
- package/dist/{index.esm2017-BRdyW06b.cjs → index.esm2017-C4FTxfgs.cjs} +113 -113
- package/dist/{index.esm2017-DiJ5f9ER.js → index.esm2017-DTCfAUpp.js} +9800 -9769
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +12 -12
- package/package.json +1 -1
- package/web-components-bundle/{SaasThemeProvider-8W2MaSUF.js → SaasThemeProvider-A_eMJWqw.js} +9 -9
- package/web-components-bundle/access-denied/index.js +2 -3
- package/web-components-bundle/base-breadcrumbs/index.js +3 -3
- package/web-components-bundle/favorite-menu/index.js +7 -7
- package/web-components-bundle/global-menu/index.js +6 -6
- package/web-components-bundle/global-topbar/index.js +7 -7
- package/web-components-bundle/has-permission/index.js +2 -2
- package/web-components-bundle/{index-Bu7DHdEJ.js → index-BwEhsh9S.js} +19 -21
- package/web-components-bundle/{index-CHcaOev7.js → index-CE4KNS10.js} +946 -946
- package/web-components-bundle/{index-CDpevgH4.js → index-CEnVJkU6.js} +9296 -9270
- package/web-components-bundle/index-DQQeBZzF.js +3527 -0
- package/web-components-bundle/page-not-found/index.js +4 -5
- package/web-components-bundle/{react-to-web-component-CXwKHjZr.js → react-to-web-component-BOygDorD.js} +1535 -1527
- package/web-components-bundle/{react-toastify.esm-CrTD7cpE.js → react-toastify.esm-DnABvuky.js} +21 -21
- package/web-components-bundle/toast-config/index.js +2 -2
- package/web-components-bundle/toast-config-notification/index.js +2 -2
- package/web-components-bundle/index-Bk42Mf7H.js +0 -3206
- package/web-components-bundle/useTranslation-Xt9Mgi4Q.js +0 -337
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-C4FTxfgs.cjs"),g=require("axios"),c=require("react"),d=require("react-router-dom"),u=require("react/jsx-runtime");require("@r2wc/react-to-web-component");require("@mui/material");require("react-query");require("react-dom");require("moment");const h=r=>{const[i,t]=c.useState([]);return c.useEffect(()=>{g.get(`${r}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(s=>t(s.data)).catch(s=>{console.error("Getting user permission error:",s)})},[r]),i},f=r=>{const i=d.useNavigate(),t=d.useLocation();console.log(" useSyncRouter.tsx ~ location1:",t,window.location.pathname);const s=(n=t)=>(r||"")+n.pathname+n.search+n.hash;if(c.useEffect(()=>{const n={changeRoute:o=>{const a=s();if(typeof o=="string"&&a!==o){console.log(" useSyncRouter.tsx ~ location2:",a,o);const m=r&&o.startsWith(r)?o.substring(r.length):o;i(m)}}};window.MicrofeBridge=n},[i,t]),c.useEffect(()=>{var o,a;const n=s();console.log("fullPath1",window.location.pathname,n),(a=(o=window.parent)==null?void 0:o.HostBridge)==null||a.childRouteChange(n)},[t]),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 P({open:r,disabled:i}){c.useMemo(()=>{var t,s,n,o;i||(r?(s=(t=window.top)==null?void 0:t.HostBridge)==null||s.openBackdrop(!0):(o=(n=window.top)==null?void 0:n.HostBridge)==null||o.openBackdrop(!1))},[r,i])}const l=(r,i)=>(t,s)=>{const o=e.useUserPermissions({axiosInstance:i,baseUrl:r}).data;return o?s?t.every(a=>o==null?void 0:o.includes(a)):t.some(a=>o==null?void 0:o.includes(a)):!1},w=({baseUrl:r,accessWith:i,requireAll:t,children:s})=>l(r)(i,t)?u.jsx(u.Fragment,{children:s}):null,p=({accessWith:r,requireAll:i,baseUrl:t,children:s})=>l(t)(r,i)?u.jsx(u.Fragment,{children:s}):u.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.axiosInstance=e.axiosInstance;exports.color=e.color;exports.createCustomTheme=e.createCustomTheme;exports.handleErrorAxios=e.handleErrorAxios;exports.login=e.login;exports.logout=e.logout;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=w;exports.PermissionRoute=p;exports.getUseHasPermission=l;exports.useGetPermission=h;exports.useSyncBackdrop=P;exports.useSyncRouter=f;
|
package/dist/share/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { K as d, U as g } from "../index.esm2017-DTCfAUpp.js";
|
|
2
|
+
import { M as z, O as D, R as I, a2 as N, $ as O, a as j, c as K, a0 as L, W as V, T as W, V as X, X as Y, r as Z, a1 as _, s as q, t as J, Y as Q, e as b, u as oo, i as eo, Z as so } from "../index.esm2017-DTCfAUpp.js";
|
|
3
3
|
import p from "axios";
|
|
4
4
|
import { useState as f, useEffect as a, useMemo as h } from "react";
|
|
5
5
|
import { useNavigate as w, useLocation as P } from "react-router-dom";
|
|
@@ -89,17 +89,17 @@ export {
|
|
|
89
89
|
N as SaasThemeProvider,
|
|
90
90
|
O as TranslationProvider,
|
|
91
91
|
j as axiosInstance,
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
K as color,
|
|
93
|
+
L as createCustomTheme,
|
|
94
94
|
l as getUseHasPermission,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
V as handleErrorAxios,
|
|
96
|
+
W as login,
|
|
97
|
+
X as logout,
|
|
98
|
+
Y as responseInterceptor,
|
|
99
|
+
Z as search,
|
|
100
|
+
_ as setFavicon,
|
|
101
|
+
q as setShellBackdrop,
|
|
102
|
+
J as translate,
|
|
103
103
|
Q as translationConfig,
|
|
104
104
|
b as useAuth,
|
|
105
105
|
oo as useCustomTranslation,
|
package/package.json
CHANGED
package/web-components-bundle/{SaasThemeProvider-8W2MaSUF.js → SaasThemeProvider-A_eMJWqw.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as j, r as b } from "./react-to-web-component-BOygDorD.js";
|
|
2
2
|
function c() {
|
|
3
3
|
return c = Object.assign ? Object.assign.bind() : function(t) {
|
|
4
4
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -51,7 +51,7 @@ function K(t, e) {
|
|
|
51
51
|
var n = t ?? !e;
|
|
52
52
|
return n ? "active" : "inactive";
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function V(t, e) {
|
|
55
55
|
var n = t.active, r = t.exact, i = t.fetching, o = t.inactive, s = t.predicate, u = t.queryKey, f = t.stale;
|
|
56
56
|
if (l(u)) {
|
|
57
57
|
if (r) {
|
|
@@ -70,7 +70,7 @@ function R(t, e) {
|
|
|
70
70
|
}
|
|
71
71
|
return !(typeof f == "boolean" && e.isStale() !== f || typeof i == "boolean" && e.isFetching() !== i || s && !s(e));
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function $(t, e) {
|
|
74
74
|
var n = t.exact, r = t.fetching, i = t.predicate, o = t.mutationKey;
|
|
75
75
|
if (l(o)) {
|
|
76
76
|
if (!e.options.mutationKey)
|
|
@@ -119,7 +119,7 @@ function x(t, e) {
|
|
|
119
119
|
}
|
|
120
120
|
return e;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function J(t, e) {
|
|
123
123
|
if (t && !e || e && !t)
|
|
124
124
|
return !1;
|
|
125
125
|
for (var n in t)
|
|
@@ -142,7 +142,7 @@ function v(t) {
|
|
|
142
142
|
function l(t) {
|
|
143
143
|
return typeof t == "string" || Array.isArray(t);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function R(t) {
|
|
146
146
|
return new Promise(function(e) {
|
|
147
147
|
setTimeout(e, t);
|
|
148
148
|
});
|
|
@@ -221,7 +221,7 @@ export {
|
|
|
221
221
|
D as a,
|
|
222
222
|
N as b,
|
|
223
223
|
W as c,
|
|
224
|
-
|
|
224
|
+
$ as d,
|
|
225
225
|
y as e,
|
|
226
226
|
B as f,
|
|
227
227
|
G as g,
|
|
@@ -230,13 +230,13 @@ export {
|
|
|
230
230
|
H as j,
|
|
231
231
|
h as k,
|
|
232
232
|
m as l,
|
|
233
|
-
|
|
233
|
+
V as m,
|
|
234
234
|
E as n,
|
|
235
|
-
|
|
235
|
+
J as o,
|
|
236
236
|
L as p,
|
|
237
237
|
S as q,
|
|
238
238
|
x as r,
|
|
239
|
-
|
|
239
|
+
R as s,
|
|
240
240
|
U as t,
|
|
241
241
|
X as u
|
|
242
242
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { U as e } from "../index-
|
|
3
|
-
import "../useTranslation-Xt9Mgi4Q.js";
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { U as e } from "../index-DQQeBZzF.js";
|
|
4
3
|
export {
|
|
5
4
|
e as UnauthorizedPage
|
|
6
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { V as e } from "../index-
|
|
3
|
-
import "../SaasThemeProvider-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { V as e } from "../index-CE4KNS10.js";
|
|
3
|
+
import "../SaasThemeProvider-A_eMJWqw.js";
|
|
4
4
|
export {
|
|
5
5
|
e as BaseBreadcrumbs
|
|
6
6
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { F, u as v } from "../index-
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../react-toastify.esm-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { F, u as v } from "../index-CEnVJkU6.js";
|
|
3
|
+
import "../index-BwEhsh9S.js";
|
|
4
|
+
import "../index-CE4KNS10.js";
|
|
5
|
+
import "../react-toastify.esm-DnABvuky.js";
|
|
6
6
|
import "../toast-config/index.js";
|
|
7
7
|
import "../toast-config-notification/index.js";
|
|
8
|
-
import "../SaasThemeProvider-
|
|
9
|
-
import "../index-
|
|
8
|
+
import "../SaasThemeProvider-A_eMJWqw.js";
|
|
9
|
+
import "../index-DQQeBZzF.js";
|
|
10
10
|
export {
|
|
11
11
|
F as FavoriteMenu,
|
|
12
12
|
v as updateFavoriteItems
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { G as e } from "../index-
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../SaasThemeProvider-
|
|
6
|
-
import "../index-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { G as e } from "../index-CEnVJkU6.js";
|
|
3
|
+
import "../index-BwEhsh9S.js";
|
|
4
|
+
import "../index-CE4KNS10.js";
|
|
5
|
+
import "../SaasThemeProvider-A_eMJWqw.js";
|
|
6
|
+
import "../index-DQQeBZzF.js";
|
|
7
7
|
export {
|
|
8
8
|
e as GlobalMenu
|
|
9
9
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { L as s, T as L } from "../index-
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../index-
|
|
6
|
-
import "../SaasThemeProvider-
|
|
7
|
-
import "../react-toastify.esm-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { L as s, T as L } from "../index-CEnVJkU6.js";
|
|
3
|
+
import "../index-BwEhsh9S.js";
|
|
4
|
+
import "../index-DQQeBZzF.js";
|
|
5
|
+
import "../index-CE4KNS10.js";
|
|
6
|
+
import "../SaasThemeProvider-A_eMJWqw.js";
|
|
7
|
+
import "../react-toastify.esm-DnABvuky.js";
|
|
8
8
|
import "../toast-config/index.js";
|
|
9
9
|
import "../toast-config-notification/index.js";
|
|
10
10
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { H as o, g as r } from "../index-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { H as o, g as r } from "../index-CEnVJkU6.js";
|
|
3
3
|
export {
|
|
4
4
|
o as HasPermission,
|
|
5
5
|
r as getUseHasPermission
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { j as e, s as a } from "./react-to-web-component-
|
|
2
|
-
import { u as s } from "./SaasThemeProvider-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function c({ children: t, styles: o = [], ...i }) {
|
|
1
|
+
import { j as e, s as a } from "./react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { u as s } from "./SaasThemeProvider-A_eMJWqw.js";
|
|
3
|
+
const l = "*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}";
|
|
4
|
+
function d({ children: t, styles: o = [], ...i }) {
|
|
6
5
|
return /* @__PURE__ */ e.jsxs("div", { ...i, children: [
|
|
7
|
-
[
|
|
6
|
+
[l, ...o].map((n, r) => /* @__PURE__ */ e.jsx("style", { type: "text/css", children: n }, r)),
|
|
8
7
|
t
|
|
9
8
|
] });
|
|
10
9
|
}
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
window.location.href =
|
|
14
|
-
}, { colors:
|
|
15
|
-
return /* @__PURE__ */ e.jsx(
|
|
10
|
+
const c = ".pnf-button-primary{font-size:14px;background-color:var(--primary300);color:var(--buttonText);padding:8px 24px;border-radius:4px;border:none;cursor:pointer;transition:background-color .25s cubic-bezier(.4,0,.2,1),box-shadow .25s cubic-bezier(.4,0,.2,1),border-color .25s cubic-bezier(.4,0,.2,1),color .25s cubic-bezier(.4,0,.2,1)}.pnf-button-primary:hover{background-color:var(--buttonHover)}.pnf-container{padding-top:16px;padding-bottom:16px;gap:16px;display:flex;flex-direction:column;align-items:center;font-family:inherit}.pnf-content-wrapper{display:flex;flex-direction:column;gap:8px;align-items:center}.pnf-title{text-align:center;font-size:1.25rem;font-weight:500;margin:0}.pnf-description{text-align:center;color:#85858a;font-size:.875rem;font-weight:400;margin:0}", p = () => {
|
|
11
|
+
const t = () => {
|
|
12
|
+
window.top && (window.top.location.href = "/app/home");
|
|
13
|
+
}, { colors: o } = s();
|
|
14
|
+
return /* @__PURE__ */ e.jsx(d, { styles: [c], children: /* @__PURE__ */ e.jsxs("div", { className: "pnf-container", children: [
|
|
16
15
|
/* @__PURE__ */ e.jsx(
|
|
17
16
|
"img",
|
|
18
17
|
{
|
|
@@ -23,30 +22,29 @@ const p = ".pnf-button-primary{font-size:14px;background-color:var(--primary300)
|
|
|
23
22
|
}
|
|
24
23
|
),
|
|
25
24
|
/* @__PURE__ */ e.jsxs("div", { className: "pnf-content-wrapper", children: [
|
|
26
|
-
/* @__PURE__ */ e.jsx("h4", { className: "pnf-title", children:
|
|
25
|
+
/* @__PURE__ */ e.jsx("h4", { className: "pnf-title", children: "Page Not Found" }),
|
|
27
26
|
/* @__PURE__ */ e.jsxs("p", { className: "pnf-description", children: [
|
|
28
|
-
|
|
29
|
-
" ",
|
|
27
|
+
"We’re sorry. The page you requested could not be found. ",
|
|
30
28
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
31
|
-
|
|
29
|
+
"Please go back to the home page"
|
|
32
30
|
] }),
|
|
33
31
|
/* @__PURE__ */ e.jsx(
|
|
34
32
|
"button",
|
|
35
33
|
{
|
|
36
34
|
className: "pnf-button-primary",
|
|
37
|
-
style: { backgroundColor: `${
|
|
38
|
-
onClick:
|
|
39
|
-
children:
|
|
35
|
+
style: { backgroundColor: `${o.primary300}` },
|
|
36
|
+
onClick: t,
|
|
37
|
+
children: "Go to homepage"
|
|
40
38
|
}
|
|
41
39
|
)
|
|
42
40
|
] })
|
|
43
41
|
] }) });
|
|
44
|
-
}, h = () => /* @__PURE__ */ e.jsx(
|
|
42
|
+
}, h = () => /* @__PURE__ */ e.jsx(p, {});
|
|
45
43
|
{
|
|
46
44
|
const t = a(h);
|
|
47
45
|
customElements.define("page-not-found", t);
|
|
48
46
|
}
|
|
49
47
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
p as P,
|
|
49
|
+
d as S
|
|
52
50
|
};
|