react-luminus-components 2.0.29 → 2.0.31
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 +34 -34
- package/dist/{FormDisabledProvider-DkShe5lG.cjs → FormDisabledProvider-DFCB4DVo.cjs} +1 -1
- package/dist/{FormDisabledProvider-v_f72bx-.js → FormDisabledProvider-DYgNxt_V.js} +5 -5
- package/dist/ShortcutLinksContext-BGLfiUxG.cjs +285 -0
- package/dist/{ShortcutLinksContext-Bzk6zb9Z.js → ShortcutLinksContext-Bu12oYeg.js} +13126 -12179
- 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/apiWebSocket/ApiWebSocketContext.d.ts +10 -0
- package/dist/contexts/apiWebSocket/ApiWebSocketProvider.d.ts +9 -0
- package/dist/contexts/apiWebSocket/useApiWebSocket.d.ts +2 -0
- package/dist/contexts/index.d.ts +3 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +1419 -518
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useIsBrowserOnline/useIsBrowserOnline.d.ts +2 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +159 -150
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +2 -2
- package/dist/main.cjs.js +8 -8
- package/dist/main.d.ts +1 -3
- package/dist/main.es.js +8678 -8645
- package/dist/{useIsFormDirty-Cp4xs1BK.js → useIsFormDirty-D61PZNiu.js} +1 -1
- package/dist/{useIsFormDirty-DjNkWEmd.cjs → useIsFormDirty-DQrsSiIC.cjs} +1 -1
- package/dist/{useLocalStorageState-DgJ_e5P1.js → useLocalStorageState-C9vgpAvX.js} +1 -1
- package/dist/{useLocalStorageState-BOKWHt5u.cjs → useLocalStorageState-DnWPyDKJ.cjs} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +26 -26
- package/package.json +2 -1
- package/dist/ShortcutLinksContext-D4CGbP2q.cjs +0 -285
- 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/index.d.ts
CHANGED
|
@@ -21,3 +21,4 @@ export { default as useWindowSize } from './useWindowSize/useWindowSize';
|
|
|
21
21
|
export { default as useRenderDraggableInPortal } from './useRenderDraggableInPortal/useRenderDraggableInPortal';
|
|
22
22
|
export { default as useScrollSave } from './useScrollSave/useScrollSave';
|
|
23
23
|
export { default as useIsFormDirty } from './useIsFormDirty/useIsFormDirty';
|
|
24
|
+
export { default as useIsBrowserOnline } from './useIsBrowserOnline/useIsBrowserOnline';
|
package/dist/hooks.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./ShortcutLinksContext-BGLfiUxG.cjs"),U=require("./useLocalStorageState-DnWPyDKJ.cjs"),c=require("react"),F=require("./useIsFormDirty-DQrsSiIC.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 L=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(!L.has(t)){if(!e.interceptorsUsed)return null;const m=e.get(t).then(r=>(L.set(t,{status:"success",data:r.data}),n.current=setTimeout(()=>{L.delete(t),n.current=null},1e3*10),r.data)).catch(r=>{throw L.set(t,{status:"error",error:r}),n.current=setTimeout(()=>{L.delete(t),n.current=null},1e3*1),r});throw L.set(t,{status:"pending",promise:m}),m}const o=L.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 h;return n[12]!==f||n[13]!==d?(h=[d,f],n[12]=f,n[13]=d,n[14]=h):h=n[14],h},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")}}},B={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?B:s,E=n===void 0?B.loadOnInit:n,d=o===void 0?B.enabled:o,a=m===void 0?B.silent:m,f=r===void 0?B.nullStateBeforeLoad:r,h=i===void 0?B.nullStateOnFail:i;let w;e[0]!==g?(w=g?[404]:void 0,e[0]=g,e[1]=w):w=e[1];let l;e[2]!==p||e[3]!==v||e[4]!==a||e[5]!==w?(l={silent:a,customToken:v,differentBaseUrl:p,noToastOnStatus:w},e[2]=p,e[3]=v,e[4]=a,e[5]=w,e[6]=l):l=e[6];const O=u.useAxios(l),{startLoading:I,stopLoading:S}=c.useContext(u.LoadingContext),D=c.useRef(0),{isAuthenticated:T}=u.useAuth(),[R,N]=c.useState(null);let P;e[7]!==O||e[8]!==y||e[9]!==d||e[10]!==g||e[11]!==T||e[12]!==f||e[13]!==h||e[14]!==a||e[15]!==I||e[16]!==S||e[17]!==t?(P=async(x,G)=>{if(!T()||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(_,h??!1,g??!1))},e[7]=O,e[8]=y,e[9]=d,e[10]=g,e[11]=T,e[12]=f,e[13]=h,e[14]=a,e[15]=I,e[16]=S,e[17]=t,e[18]=P):P=e[18];const C=P;let A,b;e[19]!==C||e[20]!==E?(b=()=>{if(E===!1)return;const x=new AbortController;return C(x.signal,D.current=D.current+1),()=>{x.abort()}},A=[C,E],e[19]=C,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]!==C?(q={data:R,setData:N,reloadData:C},e[23]=R,e[24]=C,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 h,w;e[4]!==v||e[5]!==i||e[6]!==d||e[7]!==p||e[8]!==t?(h=()=>{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)}},w=[v,i,d,p,t],e[4]=v,e[5]=i,e[6]=d,e[7]=p,e[8]=t,e[9]=h,e[10]=w):(h=e[9],w=e[10]),c.useEffect(h,w);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 T;g.current=((T=t.current)==null?void 0:T.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,82 +1,82 @@
|
|
|
1
|
-
import { aA as H, c as _, a_ as
|
|
2
|
-
import {
|
|
3
|
-
import { u as Ct, a as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { b as $t, c as
|
|
1
|
+
import { aA as H, c as _, a_ as Q, av as W } from "./ShortcutLinksContext-Bu12oYeg.js";
|
|
2
|
+
import { cl as pt, bJ as wt, cn as St, aU as ht, cm as bt, al as Ot, a$ as yt, bd as Et, bB as It, a5 as Lt, bk as Bt } from "./ShortcutLinksContext-Bu12oYeg.js";
|
|
3
|
+
import { u as Ct, a as Dt } from "./useLocalStorageState-C9vgpAvX.js";
|
|
4
|
+
import { useRef as T, useState as K, useSyncExternalStore as J, useContext as z, useEffect as F } from "react";
|
|
5
|
+
import { b as $t, c as At, u as Pt, a as Ft } from "./useIsFormDirty-D61PZNiu.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";
|
|
12
12
|
import "@azure/msal-browser";
|
|
13
|
-
const
|
|
14
|
-
function
|
|
13
|
+
const I = /* @__PURE__ */ new Map();
|
|
14
|
+
function lt(e, r) {
|
|
15
15
|
const t = H({
|
|
16
16
|
silent: !0,
|
|
17
|
-
differentBaseUrl:
|
|
18
|
-
customToken:
|
|
19
|
-
}),
|
|
20
|
-
if (!
|
|
17
|
+
differentBaseUrl: r == null ? void 0 : r.customBaseUrl,
|
|
18
|
+
customToken: r == null ? void 0 : r.customToken
|
|
19
|
+
}), n = T(null);
|
|
20
|
+
if (!I.has(e)) {
|
|
21
21
|
if (!t.interceptorsUsed)
|
|
22
22
|
return null;
|
|
23
|
-
const d = t.get(
|
|
23
|
+
const d = t.get(e).then((s) => (I.set(e, {
|
|
24
24
|
status: "success",
|
|
25
|
-
data:
|
|
26
|
-
}),
|
|
27
|
-
|
|
28
|
-
}, 1e3 * 10),
|
|
29
|
-
throw
|
|
25
|
+
data: s.data
|
|
26
|
+
}), n.current = setTimeout(() => {
|
|
27
|
+
I.delete(e), n.current = null;
|
|
28
|
+
}, 1e3 * 10), s.data)).catch((s) => {
|
|
29
|
+
throw I.set(e, {
|
|
30
30
|
status: "error",
|
|
31
|
-
error:
|
|
32
|
-
}),
|
|
33
|
-
|
|
34
|
-
}, 1e3 * 1),
|
|
31
|
+
error: s
|
|
32
|
+
}), n.current = setTimeout(() => {
|
|
33
|
+
I.delete(e), n.current = null;
|
|
34
|
+
}, 1e3 * 1), s;
|
|
35
35
|
});
|
|
36
|
-
throw
|
|
36
|
+
throw I.set(e, {
|
|
37
37
|
status: "pending",
|
|
38
38
|
promise: d
|
|
39
39
|
}), d;
|
|
40
40
|
}
|
|
41
|
-
const o =
|
|
41
|
+
const o = I.get(e);
|
|
42
42
|
if (o.status === "pending")
|
|
43
43
|
throw o.promise;
|
|
44
44
|
if (o.status === "error")
|
|
45
45
|
throw o.error;
|
|
46
46
|
return o.data;
|
|
47
47
|
}
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
let
|
|
51
|
-
|
|
52
|
-
const
|
|
48
|
+
const Z = (e) => (r) => (window.addEventListener(`storage_${e}`, r), () => window.removeEventListener(`storage_${e}`, r)), ut = (e, r, t) => {
|
|
49
|
+
const n = _.c(15), o = t === void 0 ? localStorage : t, [d] = K(r);
|
|
50
|
+
let s;
|
|
51
|
+
n[0] !== r ? (s = JSON.stringify(r), n[0] = r, n[1] = s) : s = n[1];
|
|
52
|
+
const i = T(s), w = T(r);
|
|
53
53
|
let g;
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
return
|
|
57
|
-
},
|
|
58
|
-
const
|
|
54
|
+
n[2] !== e || n[3] !== d || n[4] !== o ? (g = () => {
|
|
55
|
+
const l = o.getItem(e);
|
|
56
|
+
return l !== i.current && (i.current = l, w.current = i.current ? JSON.parse(i.current) : d), w.current;
|
|
57
|
+
}, n[2] = e, n[3] = d, n[4] = o, n[5] = g) : g = n[5];
|
|
58
|
+
const S = g;
|
|
59
59
|
let f;
|
|
60
|
-
|
|
61
|
-
const
|
|
60
|
+
n[6] !== e ? (f = Z(e), n[6] = e, n[7] = f) : f = n[7];
|
|
61
|
+
const u = J(f, S);
|
|
62
62
|
let a;
|
|
63
|
-
|
|
64
|
-
const b = typeof
|
|
65
|
-
o.setItem(
|
|
66
|
-
},
|
|
63
|
+
n[8] !== S || n[9] !== e || n[10] !== o ? (a = (l) => {
|
|
64
|
+
const b = typeof l == "function" ? l(S()) : l;
|
|
65
|
+
o.setItem(e, JSON.stringify(b)), window.dispatchEvent(new Event(`storage_${e}`));
|
|
66
|
+
}, n[8] = S, n[9] = e, n[10] = o, n[11] = a) : a = n[11];
|
|
67
67
|
const c = a;
|
|
68
|
-
let
|
|
69
|
-
return
|
|
70
|
-
}, j = (
|
|
71
|
-
let
|
|
72
|
-
const d =
|
|
73
|
-
|
|
74
|
-
}, (
|
|
75
|
-
const
|
|
76
|
-
(
|
|
68
|
+
let v;
|
|
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
|
+
}, j = (e, r, t) => {
|
|
71
|
+
let n = "pending", o;
|
|
72
|
+
const d = e.then((s) => {
|
|
73
|
+
n = "success", o = s;
|
|
74
|
+
}, (s) => {
|
|
75
|
+
const i = s == null ? void 0 : s.response;
|
|
76
|
+
(i == null ? void 0 : i.status) === 404 && t ? (n = "error-404", o = s) : (n = "error", o = s);
|
|
77
77
|
});
|
|
78
78
|
return () => {
|
|
79
|
-
switch (
|
|
79
|
+
switch (n) {
|
|
80
80
|
case "pending":
|
|
81
81
|
throw d;
|
|
82
82
|
case "success":
|
|
@@ -90,152 +90,161 @@ const M = (s) => (n) => (window.addEventListener(`storage_${s}`, n), () => windo
|
|
|
90
90
|
throw new Error("Unknown status");
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
|
-
},
|
|
93
|
+
}, B = {
|
|
94
94
|
loadOnInit: !0,
|
|
95
95
|
silent: !1,
|
|
96
96
|
enabled: !0,
|
|
97
97
|
nullStateBeforeLoad: !0,
|
|
98
98
|
nullStateOnFail: !1
|
|
99
|
-
},
|
|
99
|
+
}, ct = (e, r) => {
|
|
100
100
|
const t = _.c(26), {
|
|
101
|
-
loadOnInit:
|
|
101
|
+
loadOnInit: n,
|
|
102
102
|
enabled: o,
|
|
103
103
|
silent: d,
|
|
104
|
-
nullStateBeforeLoad:
|
|
105
|
-
nullStateOnFail:
|
|
106
|
-
customApiUrl:
|
|
104
|
+
nullStateBeforeLoad: s,
|
|
105
|
+
nullStateOnFail: i,
|
|
106
|
+
customApiUrl: w,
|
|
107
107
|
customBearerToken: g,
|
|
108
|
-
dataTransformer:
|
|
108
|
+
dataTransformer: S,
|
|
109
109
|
errorBoundaryOn404: f
|
|
110
|
-
} =
|
|
111
|
-
let
|
|
112
|
-
t[0] !== f ? (
|
|
113
|
-
let
|
|
114
|
-
t[2] !==
|
|
110
|
+
} = r === void 0 ? B : r, h = n === void 0 ? B.loadOnInit : n, u = o === void 0 ? B.enabled : o, a = d === void 0 ? B.silent : d, c = s === void 0 ? B.nullStateBeforeLoad : s, v = i === void 0 ? B.nullStateOnFail : i;
|
|
111
|
+
let p;
|
|
112
|
+
t[0] !== f ? (p = f ? [404] : void 0, t[0] = f, t[1] = p) : p = t[1];
|
|
113
|
+
let l;
|
|
114
|
+
t[2] !== w || t[3] !== g || t[4] !== a || t[5] !== p ? (l = {
|
|
115
115
|
silent: a,
|
|
116
116
|
customToken: g,
|
|
117
|
-
differentBaseUrl:
|
|
118
|
-
noToastOnStatus:
|
|
119
|
-
}, t[2] =
|
|
120
|
-
const b = H(
|
|
121
|
-
startLoading:
|
|
117
|
+
differentBaseUrl: w,
|
|
118
|
+
noToastOnStatus: p
|
|
119
|
+
}, t[2] = w, t[3] = g, t[4] = a, t[5] = p, t[6] = l) : l = t[6];
|
|
120
|
+
const b = H(l), {
|
|
121
|
+
startLoading: O,
|
|
122
122
|
stopLoading: m
|
|
123
|
-
} =
|
|
124
|
-
isAuthenticated:
|
|
125
|
-
} =
|
|
126
|
-
let
|
|
127
|
-
t[7] !== b || t[8] !==
|
|
128
|
-
if (!
|
|
123
|
+
} = z(Q), y = T(0), {
|
|
124
|
+
isAuthenticated: L
|
|
125
|
+
} = W(), [N, U] = K(null);
|
|
126
|
+
let C;
|
|
127
|
+
t[7] !== b || t[8] !== S || t[9] !== u || t[10] !== f || t[11] !== L || t[12] !== c || t[13] !== v || t[14] !== a || t[15] !== O || t[16] !== m || t[17] !== e ? (C = async (A, V) => {
|
|
128
|
+
if (!L() || u === !1)
|
|
129
129
|
return;
|
|
130
|
-
!a &&
|
|
131
|
-
const
|
|
130
|
+
!a && O(`loadData-${e}-${V}`), c && U(null);
|
|
131
|
+
const G = b.get(e, {
|
|
132
132
|
signal: A
|
|
133
|
-
}).then((q) =>
|
|
134
|
-
U(j(
|
|
135
|
-
}, t[7] = b, t[8] =
|
|
136
|
-
const
|
|
137
|
-
let
|
|
138
|
-
t[19] !==
|
|
139
|
-
if (
|
|
133
|
+
}).then((q) => S ? S(q.data) : q.data).finally(() => !a && m(`loadData-${e}-${V}`));
|
|
134
|
+
U(j(G, v ?? !1, f ?? !1));
|
|
135
|
+
}, t[7] = b, t[8] = S, t[9] = u, t[10] = f, t[11] = L, t[12] = c, t[13] = v, t[14] = a, t[15] = O, t[16] = m, t[17] = e, t[18] = C) : C = t[18];
|
|
136
|
+
const E = C;
|
|
137
|
+
let D, x;
|
|
138
|
+
t[19] !== E || t[20] !== h ? (x = () => {
|
|
139
|
+
if (h === !1)
|
|
140
140
|
return;
|
|
141
141
|
const A = new AbortController();
|
|
142
|
-
return
|
|
142
|
+
return E(A.signal, y.current = y.current + 1), () => {
|
|
143
143
|
A.abort();
|
|
144
144
|
};
|
|
145
|
-
},
|
|
146
|
-
let
|
|
147
|
-
return t[23] !== N || t[24] !==
|
|
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
|
+
let $;
|
|
147
|
+
return t[23] !== N || t[24] !== E ? ($ = {
|
|
148
148
|
data: N,
|
|
149
149
|
setData: U,
|
|
150
|
-
reloadData:
|
|
151
|
-
}, t[23] = N, t[24] =
|
|
152
|
-
},
|
|
153
|
-
const
|
|
150
|
+
reloadData: E
|
|
151
|
+
}, t[23] = N, t[24] = E, t[25] = $) : $ = t[25], $;
|
|
152
|
+
}, dt = () => {
|
|
153
|
+
const e = T({}).current;
|
|
154
154
|
return F(() => {
|
|
155
|
-
const
|
|
156
|
-
return
|
|
157
|
-
document.body.removeChild(
|
|
155
|
+
const r = document.createElement("div");
|
|
156
|
+
return r.style.position = "absolute", r.style.pointerEvents = "none", r.style.top = "0", r.style.width = "100%", r.style.height = "100%", e.elt = r, document.body.appendChild(r), () => {
|
|
157
|
+
document.body.removeChild(r);
|
|
158
158
|
};
|
|
159
|
-
}, [
|
|
160
|
-
const o =
|
|
161
|
-
return t.draggableProps.style.position === "fixed" ?
|
|
159
|
+
}, [e]), (r) => (t, ...n) => {
|
|
160
|
+
const o = r(t, ...n);
|
|
161
|
+
return t.draggableProps.style.position === "fixed" ? M(o, e.elt) : o;
|
|
162
162
|
};
|
|
163
163
|
}, P = {
|
|
164
164
|
storageKey: "--tmp-scroll-save--",
|
|
165
165
|
requiredHeight: 100,
|
|
166
166
|
retryInterval: 50
|
|
167
|
-
},
|
|
167
|
+
}, ft = (e, r) => {
|
|
168
168
|
const t = _.c(18), {
|
|
169
|
-
storageKey:
|
|
169
|
+
storageKey: n,
|
|
170
170
|
requiredHeight: o,
|
|
171
171
|
retryInterval: d
|
|
172
|
-
} =
|
|
173
|
-
let
|
|
174
|
-
t[0] !==
|
|
175
|
-
const m = localStorage.getItem(
|
|
176
|
-
return localStorage.removeItem(
|
|
177
|
-
}, t[0] =
|
|
178
|
-
const
|
|
172
|
+
} = r === void 0 ? P : r, s = n === void 0 ? P.storageKey : n, i = o === void 0 ? P.requiredHeight : o, w = d === void 0 ? P.retryInterval : d, [g, S] = K(!1), f = T(null);
|
|
173
|
+
let h;
|
|
174
|
+
t[0] !== s ? (h = () => {
|
|
175
|
+
const m = localStorage.getItem(s);
|
|
176
|
+
return localStorage.removeItem(s), m === null ? null : Number(m);
|
|
177
|
+
}, t[0] = s, t[1] = h) : h = t[1];
|
|
178
|
+
const u = h;
|
|
179
179
|
let a;
|
|
180
|
-
t[2] !==
|
|
181
|
-
localStorage.setItem(
|
|
182
|
-
}, t[2] =
|
|
180
|
+
t[2] !== s ? (a = (m) => {
|
|
181
|
+
localStorage.setItem(s, m);
|
|
182
|
+
}, t[2] = s, t[3] = a) : a = t[3];
|
|
183
183
|
const c = a;
|
|
184
|
-
let
|
|
185
|
-
t[4] !== g || t[5] !==
|
|
184
|
+
let v, p;
|
|
185
|
+
t[4] !== g || t[5] !== i || t[6] !== u || t[7] !== w || t[8] !== e ? (v = () => {
|
|
186
186
|
const m = window.setInterval(() => {
|
|
187
|
-
if (!g &&
|
|
188
|
-
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
top:
|
|
187
|
+
if (!g && e.current !== null && e.current.getBoundingClientRect().height > i) {
|
|
188
|
+
S(!0);
|
|
189
|
+
const y = u();
|
|
190
|
+
y !== null && e.current.scrollTo({
|
|
191
|
+
top: y
|
|
192
192
|
}), window.clearInterval(m);
|
|
193
193
|
}
|
|
194
|
-
},
|
|
194
|
+
}, w);
|
|
195
195
|
return () => {
|
|
196
196
|
window.clearTimeout(m);
|
|
197
197
|
};
|
|
198
|
-
},
|
|
199
|
-
let
|
|
200
|
-
t[11] !== c || t[12] !==
|
|
201
|
-
var
|
|
198
|
+
}, p = [g, i, u, w, e], t[4] = g, t[5] = i, t[6] = u, t[7] = w, t[8] = e, t[9] = v, t[10] = p) : (v = t[9], p = t[10]), F(v, p);
|
|
199
|
+
let l, b;
|
|
200
|
+
t[11] !== c || t[12] !== e ? (l = () => {
|
|
201
|
+
var y;
|
|
202
202
|
const m = new AbortController();
|
|
203
|
-
return (
|
|
204
|
-
var
|
|
205
|
-
f.current = ((
|
|
203
|
+
return (y = e.current) == null || y.addEventListener("scrollend", () => {
|
|
204
|
+
var L;
|
|
205
|
+
f.current = ((L = e.current) == null ? void 0 : L.scrollTop) ?? 0, c((f.current ?? 0).toString());
|
|
206
206
|
}, {
|
|
207
207
|
signal: m.signal
|
|
208
208
|
}), () => m.abort();
|
|
209
|
-
}, b = [c,
|
|
210
|
-
let
|
|
211
|
-
return t[15] !==
|
|
209
|
+
}, b = [c, e], t[11] = c, t[12] = e, t[13] = l, t[14] = b) : (l = t[13], b = t[14]), F(l, b);
|
|
210
|
+
let O;
|
|
211
|
+
return t[15] !== u || t[16] !== c ? (O = {
|
|
212
212
|
saveValue: c,
|
|
213
|
-
retrieveValue:
|
|
214
|
-
}, t[15] =
|
|
215
|
-
};
|
|
213
|
+
retrieveValue: u
|
|
214
|
+
}, t[15] = u, t[16] = c, t[17] = O) : O = t[17], O;
|
|
215
|
+
}, mt = () => J(R, X);
|
|
216
|
+
function R(e) {
|
|
217
|
+
return window.addEventListener("online", e), window.addEventListener("offline", e), () => {
|
|
218
|
+
window.removeEventListener("online", e), window.removeEventListener("offline", e);
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
function X() {
|
|
222
|
+
return window.navigator.onLine;
|
|
223
|
+
}
|
|
216
224
|
export {
|
|
217
|
-
|
|
218
|
-
|
|
225
|
+
pt as cancelToken,
|
|
226
|
+
W as useAuth,
|
|
219
227
|
H as useAxios,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
228
|
+
wt as useClickOutside,
|
|
229
|
+
St as useClipboard,
|
|
230
|
+
ht as useConfirm,
|
|
223
231
|
$t as useEmployeePhotoPath,
|
|
224
|
-
|
|
232
|
+
bt as useFormControlType,
|
|
225
233
|
Ct as useGetApiData,
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
234
|
+
ct as useGetApiDataBound,
|
|
235
|
+
lt as useGetDataBound,
|
|
236
|
+
mt as useIsBrowserOnline,
|
|
237
|
+
At as useIsFormDirty,
|
|
238
|
+
Ot as useKeyPress,
|
|
239
|
+
Dt as useLocalStorageState,
|
|
240
|
+
yt as useNotifications,
|
|
241
|
+
Et as usePermissions,
|
|
242
|
+
ut as usePersistentState,
|
|
243
|
+
It as usePrompt,
|
|
244
|
+
dt as useRenderDraggableInPortal,
|
|
245
|
+
ft as useScrollSave,
|
|
246
|
+
Pt as useSearchQuery,
|
|
247
|
+
Ft as useSearchQueryState,
|
|
248
|
+
Lt as useWindowSize,
|
|
249
|
+
Bt as useZodSchemaTypes
|
|
241
250
|
};
|
package/dist/layout.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("./ShortcutLinksContext-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("./ShortcutLinksContext-BGLfiUxG.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;
|
package/dist/layout.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as S, jsx as s, Fragment as ce } from "react/jsx-runtime";
|
|
2
|
-
import { bJ as re, a as p, a0 as le, c as ie, as as ue, bd as he, a5 as fe, bN as _e, bO as be, bP as oe } from "./ShortcutLinksContext-
|
|
3
|
-
import { bb as dn, bQ as an } from "./ShortcutLinksContext-
|
|
2
|
+
import { bJ as re, a as p, a0 as le, c as ie, as as ue, bd as he, a5 as fe, bN as _e, bO as be, bP as oe } from "./ShortcutLinksContext-Bu12oYeg.js";
|
|
3
|
+
import { bb as dn, bQ as an } from "./ShortcutLinksContext-Bu12oYeg.js";
|
|
4
4
|
import { useState as me, useRef as pe, useEffect as ve } from "react";
|
|
5
5
|
import { Link as te } from "react-router";
|
|
6
6
|
import "react-hook-form";
|