react-luminus-components 2.0.30 → 2.0.32
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/.vite/manifest.json +40 -40
- package/dist/{FormDisabledProvider-BdVAJaqG.js → FormDisabledProvider-CknAF8EI.js} +1 -1
- package/dist/{FormDisabledProvider-DyO7R2kE.cjs → FormDisabledProvider-DoGy2C4j.cjs} +1 -1
- package/dist/components/common/NotificationCenter/Actions/NotificationActions.d.ts +23 -0
- package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/ActionTemplates/ActionTemplates.d.ts +1 -1
- package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/ActionTemplates/comps/Recipients/NotificationRecipients.d.ts +1 -1
- package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/ActionTemplates/comps/modals/NotificationTargetModal.d.ts +1 -1
- package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/HistoryTable/NotificationHistoryTable.d.ts +3 -3
- package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/modals/NotificationActionAddModal.d.ts +1 -1
- package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/modals/NotificationTemplateAddModal.d.ts +2 -2
- package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/modals/NotificationTemplateEditModal.d.ts +2 -2
- package/dist/components/common/NotificationCenter/NotifStyles/NotifStyles.d.ts +8 -0
- package/dist/components/common/NotificationCenter/Users/NotificationUsers.d.ts +12 -0
- package/dist/components/{NotifCenter → common/NotificationCenter}/Users/components/EmployeeNotifTable/EmployeeNotifHistoryTable.d.ts +2 -2
- package/dist/components/{NotifCenter → common/NotificationCenter}/index.d.ts +1 -1
- package/dist/components/common/index.d.ts +3 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +598 -598
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +31 -31
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +216 -210
- package/dist/{localStorageUtils-D2opn367.js → localStorageUtils-CZ4HDRzi.js} +2 -2
- package/dist/main.cjs.js +8 -8
- package/dist/main.d.ts +1 -3
- package/dist/main.es.js +8616 -8582
- package/dist/{nivo-bar-CdrSgzV1.cjs → nivo-bar-BkpPCncR.cjs} +1 -1
- package/dist/{nivo-bar-BsmDtzXw.js → nivo-bar-wBsr2P1t.js} +65 -65
- package/dist/style.css +1 -1
- package/dist/{useIsFormDirty-Pdd8CdTQ.js → useIsFormDirty-CTuj9_Nd.js} +1 -1
- package/dist/{useIsFormDirty-CzwHpad1.cjs → useIsFormDirty-Cb4GEBID.cjs} +1 -1
- package/dist/{useLocalStorageState-Byzo2ssr.js → useLocalStorageState-DBd2vOH1.js} +1 -1
- package/dist/{useLocalStorageState-CbsbIUSp.cjs → useLocalStorageState-gKbms6va.cjs} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +16 -16
- package/package.json +1 -1
- package/dist/components/NotifCenter/Actions/NotificationActions.d.ts +0 -22
- package/dist/components/NotifCenter/NotifStyles/NotifStyles.d.ts +0 -10
- package/dist/components/NotifCenter/NotifStyles/hooks/useNotifStyleFormSchema.d.ts +0 -20
- package/dist/components/NotifCenter/NotifStyles/hooks/useNotifStyleTableColumns.d.ts +0 -7
- package/dist/components/NotifCenter/Users/NotificationUsers.d.ts +0 -10
- /package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/ActionTemplates/comps/index.d.ts +0 -0
- /package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/components/index.d.ts +0 -0
- /package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/hooks/useNotifTemplateUtils.d.ts +0 -0
- /package/dist/components/{NotifCenter → common/NotificationCenter}/Actions/types/NotificationKindFullModel.d.ts +0 -0
- /package/dist/components/{NotifCenter → common/NotificationCenter}/Users/components/index.d.ts +0 -0
package/dist/hooks.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./nivo-bar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./nivo-bar-BkpPCncR.cjs"),U=require("./useLocalStorageState-gKbms6va.cjs"),c=require("react"),F=require("./useIsFormDirty-Cb4GEBID.cjs");require("react/jsx-runtime");require("react-router");const V=require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-react");require("@azure/msal-browser");const B=new Map;function H(t,s){const e=u.useAxios({silent:!0,differentBaseUrl:s==null?void 0:s.customBaseUrl,customToken:s==null?void 0:s.customToken}),n=c.useRef(null);if(!B.has(t)){if(!e.interceptorsUsed)return null;const m=e.get(t).then(r=>(B.set(t,{status:"success",data:r.data}),n.current=setTimeout(()=>{B.delete(t),n.current=null},1e3*10),r.data)).catch(r=>{throw B.set(t,{status:"error",error:r}),n.current=setTimeout(()=>{B.delete(t),n.current=null},1e3*1),r});throw B.set(t,{status:"pending",promise:m}),m}const o=B.get(t);if(o.status==="pending")throw o.promise;if(o.status==="error")throw o.error;return o.data}const Q=t=>s=>(window.addEventListener(`storage_${t}`,s),()=>window.removeEventListener(`storage_${t}`,s)),J=(t,s,e)=>{const n=u.compilerRuntimeExports.c(15),o=e===void 0?localStorage:e,[m]=c.useState(s);let r;n[0]!==s?(r=JSON.stringify(s),n[0]=s,n[1]=r):r=n[1];const i=c.useRef(r),p=c.useRef(s);let v;n[2]!==t||n[3]!==m||n[4]!==o?(v=()=>{const l=o.getItem(t);return l!==i.current&&(i.current=l,p.current=i.current?JSON.parse(i.current):m),p.current},n[2]=t,n[3]=m,n[4]=o,n[5]=v):v=n[5];const y=v;let g;n[6]!==t?(g=Q(t),n[6]=t,n[7]=g):g=n[7];const E=g,d=c.useSyncExternalStore(E,y);let a;n[8]!==y||n[9]!==t||n[10]!==o?(a=l=>{const O=typeof l=="function"?l(y()):l;o.setItem(t,JSON.stringify(O)),window.dispatchEvent(new Event(`storage_${t}`))},n[8]=y,n[9]=t,n[10]=o,n[11]=a):a=n[11];const f=a;let w;return n[12]!==f||n[13]!==d?(w=[d,f],n[12]=f,n[13]=d,n[14]=w):w=n[14],w},M=(t,s,e)=>{let n="pending",o;const m=t.then(r=>{n="success",o=r},r=>{const i=r==null?void 0:r.response;(i==null?void 0:i.status)===404&&e?(n="error-404",o=r):(n="error",o=r)});return()=>{switch(n){case"pending":throw m;case"success":return o;case"error":if(o.code==="ERR_CANCELED")return null;throw o;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},L={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},W=(t,s)=>{const e=u.compilerRuntimeExports.c(26),{loadOnInit:n,enabled:o,silent:m,nullStateBeforeLoad:r,nullStateOnFail:i,customApiUrl:p,customBearerToken:v,dataTransformer:y,errorBoundaryOn404:g}=s===void 0?L:s,E=n===void 0?L.loadOnInit:n,d=o===void 0?L.enabled:o,a=m===void 0?L.silent:m,f=r===void 0?L.nullStateBeforeLoad:r,w=i===void 0?L.nullStateOnFail:i;let h;e[0]!==g?(h=g?[404]:void 0,e[0]=g,e[1]=h):h=e[1];let l;e[2]!==p||e[3]!==v||e[4]!==a||e[5]!==h?(l={silent:a,customToken:v,differentBaseUrl:p,noToastOnStatus:h},e[2]=p,e[3]=v,e[4]=a,e[5]=h,e[6]=l):l=e[6];const O=u.useAxios(l),{startLoading:I,stopLoading:S}=c.useContext(u.LoadingContext),D=c.useRef(0),{isAuthenticated:C}=u.useAuth(),[R,N]=c.useState(null);let P;e[7]!==O||e[8]!==y||e[9]!==d||e[10]!==g||e[11]!==C||e[12]!==f||e[13]!==w||e[14]!==a||e[15]!==I||e[16]!==S||e[17]!==t?(P=async(x,G)=>{if(!C()||d===!1)return;!a&&I(`loadData-${t}-${G}`),f&&N(null);const _=O.get(t,{signal:x}).then(K=>y?y(K.data):K.data).finally(()=>!a&&S(`loadData-${t}-${G}`));N(M(_,w??!1,g??!1))},e[7]=O,e[8]=y,e[9]=d,e[10]=g,e[11]=C,e[12]=f,e[13]=w,e[14]=a,e[15]=I,e[16]=S,e[17]=t,e[18]=P):P=e[18];const T=P;let A,b;e[19]!==T||e[20]!==E?(b=()=>{if(E===!1)return;const x=new AbortController;return T(x.signal,D.current=D.current+1),()=>{x.abort()}},A=[T,E],e[19]=T,e[20]=E,e[21]=A,e[22]=b):(A=e[21],b=e[22]),c.useEffect(b,A);let q;return e[23]!==R||e[24]!==T?(q={data:R,setData:N,reloadData:T},e[23]=R,e[24]=T,e[25]=q):q=e[25],q},z=()=>{const t=c.useRef({}).current;return c.useEffect(()=>{const s=document.createElement("div");return s.style.position="absolute",s.style.pointerEvents="none",s.style.top="0",s.style.width="100%",s.style.height="100%",t.elt=s,document.body.appendChild(s),()=>{document.body.removeChild(s)}},[t]),s=>(e,...n)=>{const o=s(e,...n);return e.draggableProps.style.position==="fixed"?V.createPortal(o,t.elt):o}},$={storageKey:"--tmp-scroll-save--",requiredHeight:100,retryInterval:50},Z=(t,s)=>{const e=u.compilerRuntimeExports.c(18),{storageKey:n,requiredHeight:o,retryInterval:m}=s===void 0?$:s,r=n===void 0?$.storageKey:n,i=o===void 0?$.requiredHeight:o,p=m===void 0?$.retryInterval:m,[v,y]=c.useState(!1),g=c.useRef(null);let E;e[0]!==r?(E=()=>{const S=localStorage.getItem(r);return localStorage.removeItem(r),S===null?null:Number(S)},e[0]=r,e[1]=E):E=e[1];const d=E;let a;e[2]!==r?(a=S=>{localStorage.setItem(r,S)},e[2]=r,e[3]=a):a=e[3];const f=a;let w,h;e[4]!==v||e[5]!==i||e[6]!==d||e[7]!==p||e[8]!==t?(w=()=>{const S=window.setInterval(()=>{if(!v&&t.current!==null&&t.current.getBoundingClientRect().height>i){y(!0);const D=d();D!==null&&t.current.scrollTo({top:D}),window.clearInterval(S)}},p);return()=>{window.clearTimeout(S)}},h=[v,i,d,p,t],e[4]=v,e[5]=i,e[6]=d,e[7]=p,e[8]=t,e[9]=w,e[10]=h):(w=e[9],h=e[10]),c.useEffect(w,h);let l,O;e[11]!==f||e[12]!==t?(l=()=>{var D;const S=new AbortController;return(D=t.current)==null||D.addEventListener("scrollend",()=>{var C;g.current=((C=t.current)==null?void 0:C.scrollTop)??0,f((g.current??0).toString())},{signal:S.signal}),()=>S.abort()},O=[f,t],e[11]=f,e[12]=t,e[13]=l,e[14]=O):(l=e[13],O=e[14]),c.useEffect(l,O);let I;return e[15]!==d||e[16]!==f?(I={saveValue:f,retrieveValue:d},e[15]=d,e[16]=f,e[17]=I):I=e[17],I},j=()=>{const t=X;return c.useSyncExternalStore(t,Y)};function X(t){return window.addEventListener("online",t),window.addEventListener("offline",t),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",t)}}function Y(){return window.navigator.onLine}exports.cancelToken=u.cancelToken;exports.useAuth=u.useAuth;exports.useAxios=u.useAxios;exports.useClickOutside=u.useClickOutside;exports.useClipboard=u.useClipboard;exports.useConfirm=u.useConfirm;exports.useFormControlType=u.useFormControlType;exports.useKeyPress=u.useKeyPress;exports.useNotifications=u.useNotifications;exports.usePermissions=u.usePermissions;exports.usePrompt=u.usePrompt;exports.useWindowSize=u.useWindowSize;exports.useZodSchemaTypes=u.useZodSchemaTypes;exports.useGetApiData=U.useGetApiData;exports.useLocalStorageState=U.useLocalStorageState;exports.useEmployeePhotoPath=F.useEmployeePhotoPath;exports.useIsFormDirty=F.useIsFormDirty;exports.useSearchQuery=F.useSearchQuery;exports.useSearchQueryState=F.useSearchQueryState;exports.useGetApiDataBound=W;exports.useGetDataBound=H;exports.useIsBrowserOnline=j;exports.usePersistentState=J;exports.useRenderDraggableInPortal=z;exports.useScrollSave=Z;
|
package/dist/hooks.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ap as q, c as
|
|
2
|
-
import { cl as pt,
|
|
3
|
-
import { u as Ct, a as Dt } from "./useLocalStorageState-
|
|
4
|
-
import { useRef as B, useState as
|
|
5
|
-
import { c as $t, u as
|
|
1
|
+
import { ap as q, c as V, ar as Q, be as W } from "./nivo-bar-wBsr2P1t.js";
|
|
2
|
+
import { cl as pt, aS as wt, cn as St, ao as ht, cm as Ot, b8 as bt, as as yt, bw as Et, an as It, aH as Lt, aV as Tt } from "./nivo-bar-wBsr2P1t.js";
|
|
3
|
+
import { u as Ct, a as Dt } from "./useLocalStorageState-DBd2vOH1.js";
|
|
4
|
+
import { useRef as B, useState as _, useSyncExternalStore as G, useContext as z, useEffect as F } from "react";
|
|
5
|
+
import { c as $t, u as Pt, a as At, b as Ft } from "./useIsFormDirty-CTuj9_Nd.js";
|
|
6
6
|
import "react/jsx-runtime";
|
|
7
7
|
import "react-router";
|
|
8
|
-
import { createPortal as
|
|
8
|
+
import { createPortal as M } from "react-dom";
|
|
9
9
|
import "react-hook-form";
|
|
10
10
|
import "react-flexmonster";
|
|
11
11
|
import "@azure/msal-react";
|
|
@@ -45,8 +45,8 @@ function lt(e, r) {
|
|
|
45
45
|
throw o.error;
|
|
46
46
|
return o.data;
|
|
47
47
|
}
|
|
48
|
-
const
|
|
49
|
-
const n =
|
|
48
|
+
const Z = (e) => (r) => (window.addEventListener(`storage_${e}`, r), () => window.removeEventListener(`storage_${e}`, r)), ut = (e, r, t) => {
|
|
49
|
+
const n = V.c(15), o = t === void 0 ? localStorage : t, [d] = _(r);
|
|
50
50
|
let s;
|
|
51
51
|
n[0] !== r ? (s = JSON.stringify(r), n[0] = r, n[1] = s) : s = n[1];
|
|
52
52
|
const i = B(s), w = B(r);
|
|
@@ -57,7 +57,7 @@ const Y = (e) => (r) => (window.addEventListener(`storage_${e}`, r), () => windo
|
|
|
57
57
|
}, n[2] = e, n[3] = d, n[4] = o, n[5] = g) : g = n[5];
|
|
58
58
|
const S = g;
|
|
59
59
|
let f;
|
|
60
|
-
n[6] !== e ? (f =
|
|
60
|
+
n[6] !== e ? (f = Z(e), n[6] = e, n[7] = f) : f = n[7];
|
|
61
61
|
const u = G(f, S);
|
|
62
62
|
let a;
|
|
63
63
|
n[8] !== S || n[9] !== e || n[10] !== o ? (a = (l) => {
|
|
@@ -67,7 +67,7 @@ const Y = (e) => (r) => (window.addEventListener(`storage_${e}`, r), () => windo
|
|
|
67
67
|
const c = a;
|
|
68
68
|
let v;
|
|
69
69
|
return n[12] !== c || n[13] !== u ? (v = [u, c], n[12] = c, n[13] = u, n[14] = v) : v = n[14], v;
|
|
70
|
-
},
|
|
70
|
+
}, j = (e, r, t) => {
|
|
71
71
|
let n = "pending", o;
|
|
72
72
|
const d = e.then((s) => {
|
|
73
73
|
n = "success", o = s;
|
|
@@ -97,7 +97,7 @@ const Y = (e) => (r) => (window.addEventListener(`storage_${e}`, r), () => windo
|
|
|
97
97
|
nullStateBeforeLoad: !0,
|
|
98
98
|
nullStateOnFail: !1
|
|
99
99
|
}, ct = (e, r) => {
|
|
100
|
-
const t =
|
|
100
|
+
const t = V.c(26), {
|
|
101
101
|
loadOnInit: n,
|
|
102
102
|
enabled: o,
|
|
103
103
|
silent: d,
|
|
@@ -120,27 +120,27 @@ const Y = (e) => (r) => (window.addEventListener(`storage_${e}`, r), () => windo
|
|
|
120
120
|
const O = q(l), {
|
|
121
121
|
startLoading: b,
|
|
122
122
|
stopLoading: m
|
|
123
|
-
} =
|
|
123
|
+
} = z(Q), y = B(0), {
|
|
124
124
|
isAuthenticated: L
|
|
125
|
-
} =
|
|
125
|
+
} = W(), [N, U] = _(null);
|
|
126
126
|
let C;
|
|
127
|
-
t[7] !== O || t[8] !== S || t[9] !== u || t[10] !== f || t[11] !== L || t[12] !== c || t[13] !== v || t[14] !== a || t[15] !== b || t[16] !== m || t[17] !== e ? (C = async (
|
|
127
|
+
t[7] !== O || t[8] !== S || t[9] !== u || t[10] !== f || t[11] !== L || t[12] !== c || t[13] !== v || t[14] !== a || t[15] !== b || t[16] !== m || t[17] !== e ? (C = async (P, H) => {
|
|
128
128
|
if (!L() || u === !1)
|
|
129
129
|
return;
|
|
130
|
-
!a && b(`loadData-${e}-${
|
|
130
|
+
!a && b(`loadData-${e}-${H}`), c && U(null);
|
|
131
131
|
const J = O.get(e, {
|
|
132
|
-
signal:
|
|
133
|
-
}).then((
|
|
134
|
-
U(
|
|
132
|
+
signal: P
|
|
133
|
+
}).then((K) => S ? S(K.data) : K.data).finally(() => !a && m(`loadData-${e}-${H}`));
|
|
134
|
+
U(j(J, v ?? !1, f ?? !1));
|
|
135
135
|
}, t[7] = O, t[8] = S, t[9] = u, t[10] = f, t[11] = L, t[12] = c, t[13] = v, t[14] = a, t[15] = b, t[16] = m, t[17] = e, t[18] = C) : C = t[18];
|
|
136
136
|
const E = C;
|
|
137
137
|
let D, x;
|
|
138
138
|
t[19] !== E || t[20] !== h ? (x = () => {
|
|
139
139
|
if (h === !1)
|
|
140
140
|
return;
|
|
141
|
-
const
|
|
142
|
-
return E(
|
|
143
|
-
|
|
141
|
+
const P = new AbortController();
|
|
142
|
+
return E(P.signal, y.current = y.current + 1), () => {
|
|
143
|
+
P.abort();
|
|
144
144
|
};
|
|
145
145
|
}, D = [E, h], t[19] = E, t[20] = h, t[21] = D, t[22] = x) : (D = t[21], x = t[22]), F(x, D);
|
|
146
146
|
let $;
|
|
@@ -158,18 +158,18 @@ const Y = (e) => (r) => (window.addEventListener(`storage_${e}`, r), () => windo
|
|
|
158
158
|
};
|
|
159
159
|
}, [e]), (r) => (t, ...n) => {
|
|
160
160
|
const o = r(t, ...n);
|
|
161
|
-
return t.draggableProps.style.position === "fixed" ?
|
|
161
|
+
return t.draggableProps.style.position === "fixed" ? M(o, e.elt) : o;
|
|
162
162
|
};
|
|
163
|
-
},
|
|
163
|
+
}, A = {
|
|
164
164
|
storageKey: "--tmp-scroll-save--",
|
|
165
165
|
requiredHeight: 100,
|
|
166
166
|
retryInterval: 50
|
|
167
167
|
}, ft = (e, r) => {
|
|
168
|
-
const t =
|
|
168
|
+
const t = V.c(18), {
|
|
169
169
|
storageKey: n,
|
|
170
170
|
requiredHeight: o,
|
|
171
171
|
retryInterval: d
|
|
172
|
-
} = r === void 0 ?
|
|
172
|
+
} = r === void 0 ? A : r, s = n === void 0 ? A.storageKey : n, i = o === void 0 ? A.requiredHeight : o, w = d === void 0 ? A.retryInterval : d, [g, S] = _(!1), f = B(null);
|
|
173
173
|
let h;
|
|
174
174
|
t[0] !== s ? (h = () => {
|
|
175
175
|
const m = localStorage.getItem(s);
|
|
@@ -212,18 +212,18 @@ const Y = (e) => (r) => (window.addEventListener(`storage_${e}`, r), () => windo
|
|
|
212
212
|
saveValue: c,
|
|
213
213
|
retrieveValue: u
|
|
214
214
|
}, t[15] = u, t[16] = c, t[17] = b) : b = t[17], b;
|
|
215
|
-
}, mt = () => G(
|
|
216
|
-
function
|
|
215
|
+
}, mt = () => G(R, X);
|
|
216
|
+
function R(e) {
|
|
217
217
|
return window.addEventListener("online", e), window.addEventListener("offline", e), () => {
|
|
218
218
|
window.removeEventListener("online", e), window.removeEventListener("offline", e);
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function X() {
|
|
222
222
|
return window.navigator.onLine;
|
|
223
223
|
}
|
|
224
224
|
export {
|
|
225
225
|
pt as cancelToken,
|
|
226
|
-
|
|
226
|
+
W as useAuth,
|
|
227
227
|
q as useAxios,
|
|
228
228
|
wt as useClickOutside,
|
|
229
229
|
St as useClipboard,
|
|
@@ -234,7 +234,7 @@ export {
|
|
|
234
234
|
ct as useGetApiDataBound,
|
|
235
235
|
lt as useGetDataBound,
|
|
236
236
|
mt as useIsBrowserOnline,
|
|
237
|
-
|
|
237
|
+
Pt as useIsFormDirty,
|
|
238
238
|
bt as useKeyPress,
|
|
239
239
|
Dt as useLocalStorageState,
|
|
240
240
|
yt as useNotifications,
|
|
@@ -243,7 +243,7 @@ export {
|
|
|
243
243
|
It as usePrompt,
|
|
244
244
|
dt as useRenderDraggableInPortal,
|
|
245
245
|
ft as useScrollSave,
|
|
246
|
-
|
|
246
|
+
At as useSearchQuery,
|
|
247
247
|
Ft as useSearchQueryState,
|
|
248
248
|
Lt as useWindowSize,
|
|
249
249
|
Tt as useZodSchemaTypes
|
package/dist/layout.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("./nivo-bar-BkpPCncR.cjs"),U=require("react"),ne=require("react-router");require("react-hook-form");require("react-flexmonster");require("@azure/msal-react");require("@azure/msal-browser");require("react-dom");const oe="_side-menu-item_o72rm_1",ae="_disabled_o72rm_6",de="_hidden_o72rm_10",ce="_nav-button_o72rm_13",re="_child_o72rm_21",me="_text_o72rm_26",ue="_icon_o72rm_36",pe="_collapse-icon_o72rm_42",he="_collapsed_o72rm_52",xe="_collapse-icon-mini_o72rm_55",_e="_expanded_o72rm_86",fe="_children-container_o72rm_92",be="_visible_o72rm_100",ve="_children_o72rm_92",Ne="_mobile_o72rm_112",r={sideMenuItem:oe,disabled:ae,hidden:de,navButton:ce,child:re,text:me,icon:ue,collapseIcon:pe,collapsed:he,collapseIconMini:xe,expanded:_e,childrenContainer:fe,visible:be,children:ve,mobile:Ne},je=a=>{const e=i.compilerRuntimeExports.c(6),{item:u,menuExpanded:x,useTooltips:b,children:j}=a;if(u.tooltip&&!x&&b){let M;e[0]===Symbol.for("react.memo_cache_sentinel")?(M={show:1e3,hide:0},e[0]=M):M=e[0];let s;e[1]!==j?(s=n.jsx("div",{children:j}),e[1]=j,e[2]=s):s=e[2];let o;return e[3]!==u.tooltip||e[4]!==s?(o=n.jsx(i.SimpleTooltip,{text:u.tooltip,placement:"top",delay:M,children:s}),e[3]=u.tooltip,e[4]=s,e[5]=o):o=e[5],o}return j},ie=({item:a,menuExpanded:e,collapsed:u,onCollapse:x,currentPath:b,useHover:j,useTooltips:M,isMobile:s,disableMode:o})=>{var N,p,c,y;const[_,l]=U.useState(!1),[m]=b.split("?"),I=a.linkTo===m||((N=a.children)==null?void 0:N.some(t=>t.linkTo===m)),v=U.useRef(null);return i.useClickOutside([v],()=>u&&x()),n.jsxs("li",{ref:v,className:i.classNames("luminus-side-menu-item",r.sideMenuItem,{[r.mobile]:s},{[r.expanded]:e},{active:_||I},{open:u&&a.children},{[o==="disable"?r.disabled:r.hidden]:a.disabled||a.notPermitted||((p=a.children)==null?void 0:p.every(t=>t.notPermitted||t.disabled))},{[o==="disable"?"disabled":"hidden"]:a.disabled||a.notPermitted||((c=a.children)==null?void 0:c.every(t=>t.notPermitted||t.disabled))}),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[n.jsx(je,{item:a,menuExpanded:e,useTooltips:M,children:a.children?n.jsx(n.Fragment,{children:n.jsxs("button",{type:"button",className:i.classNames("nav-link",r.navButton),onClick:()=>{x()},children:[n.jsx("div",{className:i.classNames("icon",r.icon),children:a.icon}),!j&&!e&&n.jsx("div",{className:i.classNames("collapse-icon-mini rounded",r.collapseIconMini,{[r.collapsed]:u}),children:n.jsx(i.MdOutlineKeyboardArrowRight,{})}),e&&n.jsx("div",{className:i.classNames("text",r.text,"text-nowrap"),children:a.title}),e&&n.jsx("div",{className:i.classNames("collapse-icon",r.collapseIcon,{[r.collapsed]:u}),children:n.jsx(i.MdOutlineKeyboardArrowRight,{})})]})}):n.jsxs(ne.Link,{to:a.disabled||a.notPermitted?"/":a.linkTo??"/",className:i.classNames("nav-link",r.navButton),children:[n.jsx("div",{className:i.classNames("icon",r.icon),children:a.icon}),e&&n.jsx("div",{className:i.classNames("text",r.text,"text-nowrap"),children:a.title})]})}),n.jsx("div",{className:i.classNames("children-container",r.childrenContainer,{[r.visible]:u}),children:n.jsx("div",{className:i.classNames("shadow rounded children",r.children),children:(y=a.children)==null?void 0:y.map(t=>n.jsx(ne.Link,{to:t.disabled||t.notPermitted?"/":t.linkTo??"/",className:i.classNames("nav-link child rounded",r.navButton,r.child,{[o==="disable"?r.disabled:r.hidden]:t.disabled||t.notPermitted},{[o==="disable"?"disabled":"hidden"]:t.disabled||t.notPermitted}),onClick:x,children:n.jsx("div",{className:i.classNames("text",r.text,"text-nowrap"),children:t.title})},t.linkTo))})})]})},Me="_side-menu_2nic9_1",Pe="_sidebar-header_2nic9_15",ge="_side-menu-pin_2nic9_22",ye="_side-menu-shrinkable-margin_2nic9_27",ke="_on-mobile-not-expanded_2nic9_31",Ce="_side-menu-content_2nic9_34",Ie="_expand_2nic9_40",Be="_only-logo_2nic9_44",Se="_mobile_2nic9_47",we="_divider_2nic9_68",C={sideMenu:Me,sidebarHeader:Pe,sideMenuPin:ge,sideMenuShrinkableMargin:ye,onMobileNotExpanded:ke,sideMenuContent:Ce,expand:Ie,onlyLogo:Be,mobile:Se,divider:we},Re=a=>{const e=i.compilerRuntimeExports.c(101),{headerItem:u,searchItem:x,shortcutsItem:b,mainItems:j,secondaryItems:M,expanded:s,setExpanded:o,currentPath:_,useHover:l,useTooltips:m,disableMode:I,sideMenuPinned:v,toggleSideMenuPinned:N}=a,p=I===void 0?"disable":I,[c,y]=U.useState(-1),{checkUserHasPermissions:t}=i.usePermissions();let P;if(e[0]!==t||e[1]!==j){let d;e[3]!==t?(d=f=>{var g;return{...f,notPermitted:!t(f.permissions??[],"any"),children:(g=f.children)==null?void 0:g.map(z=>({...z,notPermitted:!t(z.permissions??[],"any"),disabled:f.disabled||z.disabled}))}},e[3]=t,e[4]=d):d=e[4],P=j.map(d),e[0]=t,e[1]=j,e[2]=P}else P=e[2];const B=P;let W;if(e[5]!==t||e[6]!==M){let d;e[8]!==t?(d=f=>{var g;return{...f,notPermitted:!t(f.permissions??[],"any"),children:(g=f.children)==null?void 0:g.map(z=>({...z,notPermitted:!t(z.permissions??[],"any")}))}},e[8]=t,e[9]=d):d=e[9],W=M.map(d),e[5]=t,e[6]=M,e[7]=W}else W=e[7];const Z=W;let D;e[10]!==c?(D=d=>{y(d===c?-1:d)},e[10]=c,e[11]=D):D=e[11];const k=D;let G,J;e[12]!==s?(G=()=>{s||y(-1)},J=[s],e[12]=s,e[13]=G,e[14]=J):(G=e[13],J=e[14]),U.useEffect(G,J);const te=U.useRef(null);let Q;e[15]===Symbol.for("react.memo_cache_sentinel")?(Q=[te],e[15]=Q):Q=e[15];let V;e[16]!==o?(V=()=>o(!1),e[16]=o,e[17]=V):V=e[17],i.useClickOutside(Q,V);const{isMobile:h}=i.useWindowSize();let S;e[18]!==s||e[19]!==h?(S=i.classNames("luminus-side-menu shadow",C.sideMenu,{[C.mobile]:h},{[C.expand]:s},{expand:s}),e[18]=s,e[19]=h,e[20]=S):S=e[20];let w,R;e[21]!==o||e[22]!==l?(w=()=>l&&o(!0),R=()=>l&&o(!1),e[21]=o,e[22]=l,e[23]=w,e[24]=R):(w=e[23],R=e[24]);let q;e[25]!==l?(q=i.classNames("sidebar-header",C.sidebarHeader,{[C.onlyLogo]:l}),e[25]=l,e[26]=q):q=e[26];const ee=l?void 0:"button";let T;e[27]!==s||e[28]!==o||e[29]!==l?(T=l?void 0:()=>o(!s),e[27]=s,e[28]=o,e[29]=l,e[30]=T):T=e[30];let E;e[31]!==s||e[32]!==u||e[33]!==h||e[34]!==v||e[35]!==N||e[36]!==l?(E=l?u:s?n.jsxs(n.Fragment,{children:[h?n.jsx(i.MdOutlineMenu,{}):n.jsx("div",{role:"button",onClick:d=>{d.stopPropagation(),N()},className:C.sideMenuPin,children:v?n.jsx(i.PiPushPinSlashBold,{}):n.jsx(i.PiPushPinBold,{})}),u]}):n.jsx(i.MdOutlineMenu,{}),e[31]=s,e[32]=u,e[33]=h,e[34]=v,e[35]=N,e[36]=l,e[37]=E):E=e[37];let O;e[38]!==q||e[39]!==ee||e[40]!==T||e[41]!==E?(O=n.jsx("div",{className:q,role:ee,onClick:T,children:E}),e[38]=q,e[39]=ee,e[40]=T,e[41]=E,e[42]=O):O=e[42];let L;e[43]!==s||e[44]!==x||e[45]!==b?(L=s&&(x||b)?n.jsxs("div",{className:"mb-3 d-flex flex-column gap-3",children:[b&&s?b:null,x&&s?x:null]}):null,e[43]=s,e[44]=x,e[45]=b,e[46]=L):L=e[46];const se=!s&&h;let $;e[47]!==se?($=i.classNames(C.sideMenuShrinkableMargin,{[C.onMobileNotExpanded]:se}),e[47]=se,e[48]=$):$=e[48];let H;e[49]!==$?(H=n.jsx("div",{className:$}),e[49]=$,e[50]=H):H=e[50];let A;if(e[51]!==c||e[52]!==_||e[53]!==p||e[54]!==s||e[55]!==h||e[56]!==B||e[57]!==k||e[58]!==l||e[59]!==m){let d;e[61]!==c||e[62]!==_||e[63]!==p||e[64]!==s||e[65]!==h||e[66]!==k||e[67]!==l||e[68]!==m?(d=(f,g)=>n.jsx(ie,{item:f,menuExpanded:s,collapsed:g===c,onCollapse:()=>k(g),currentPath:_,useHover:l,useTooltips:m,isMobile:h,disableMode:p},f.title),e[61]=c,e[62]=_,e[63]=p,e[64]=s,e[65]=h,e[66]=k,e[67]=l,e[68]=m,e[69]=d):d=e[69],A=B.map(d),e[51]=c,e[52]=_,e[53]=p,e[54]=s,e[55]=h,e[56]=B,e[57]=k,e[58]=l,e[59]=m,e[60]=A}else A=e[60];let X;e[70]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx("hr",{className:i.classNames("divider",C.divider)}),e[70]=X):X=e[70];let F;if(e[71]!==c||e[72]!==_||e[73]!==p||e[74]!==s||e[75]!==h||e[76]!==k||e[77]!==Z||e[78]!==l||e[79]!==m){let d;e[81]!==c||e[82]!==_||e[83]!==p||e[84]!==s||e[85]!==h||e[86]!==k||e[87]!==l||e[88]!==m?(d=(f,g)=>n.jsx(ie,{item:f,menuExpanded:s,collapsed:g===c,onCollapse:()=>k(g),currentPath:_,useHover:l,useTooltips:m,isMobile:h,disableMode:p},f.title),e[81]=c,e[82]=_,e[83]=p,e[84]=s,e[85]=h,e[86]=k,e[87]=l,e[88]=m,e[89]=d):d=e[89],F=Z.map(d),e[71]=c,e[72]=_,e[73]=p,e[74]=s,e[75]=h,e[76]=k,e[77]=Z,e[78]=l,e[79]=m,e[80]=F}else F=e[80];let K;e[90]!==A||e[91]!==F?(K=n.jsxs("ul",{className:C.sideMenuContent,children:[A,X,F]}),e[90]=A,e[91]=F,e[92]=K):K=e[92];let Y;return e[93]!==w||e[94]!==R||e[95]!==O||e[96]!==L||e[97]!==H||e[98]!==K||e[99]!==S?(Y=n.jsxs("section",{ref:te,className:S,onMouseEnter:w,onMouseLeave:R,children:[O,L,H,K]}),e[93]=w,e[94]=R,e[95]=O,e[96]=L,e[97]=H,e[98]=K,e[99]=S,e[100]=Y):Y=e[100],Y},qe="_top-bar_lnmq0_1",Te="_top-bar-brand_lnmq0_12",le={topBar:qe,topBarBrand:Te},Ee=a=>{const e=i.compilerRuntimeExports.c(23),{appName:u,leftOffset:x,leftContent:b,centerContent:j,rightContent:M,showOffline:s}=a;let o;e[0]!==s?(o=i.classNames("luminus-top-bar shadow",le.topBar,{offline:s}),e[0]=s,e[1]=o):o=e[1];const _=x?`calc(100% - ${x}px)`:void 0,l=x?`${x}px`:void 0;let m;e[2]!==_||e[3]!==l?(m={width:_,left:l},e[2]=_,e[3]=l,e[4]=m):m=e[4];let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=i.classNames("luminus-top-bar-brand",le.topBarBrand),e[5]=I):I=e[5];let v;e[6]!==u?(v=n.jsx(ne.Link,{to:"/",className:I,children:u}),e[6]=u,e[7]=v):v=e[7];let N;e[8]!==b||e[9]!==v?(N=n.jsxs("div",{className:"col-4 d-flex gap-3 align-items-center",children:[v,b]}),e[8]=b,e[9]=v,e[10]=N):N=e[10];const p=j??null;let c;e[11]!==p?(c=n.jsx("div",{className:"col-4 d-flex align-items-center",children:p}),e[11]=p,e[12]=c):c=e[12];const y=M??null;let t;e[13]!==y?(t=n.jsx("div",{className:"col-4 d-flex justify-content-end align-items-center",children:y}),e[13]=y,e[14]=t):t=e[14];let P;e[15]!==t||e[16]!==N||e[17]!==c?(P=n.jsxs("div",{className:"w-100 row g-0",children:[N,c,t]}),e[15]=t,e[16]=N,e[17]=c,e[18]=P):P=e[18];let B;return e[19]!==o||e[20]!==P||e[21]!==m?(B=n.jsx("nav",{className:o,style:m,children:P}),e[19]=o,e[20]=P,e[21]=m,e[22]=B):B=e[22],B};exports.PageContainer=i.PageContainer;exports.SideContentBar=i.SideContentBar;exports.SideMenu=Re;exports.TopBar=Ee;
|