react-luminus-components 2.1.0 → 2.1.2
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-DT0dU-kQ.cjs → FormDisabledProvider-BmGT82vd.cjs} +1 -1
- package/dist/{FormDisabledProvider-CixhRdLK.js → FormDisabledProvider-faatkj2d.js} +4 -4
- package/dist/components/Documents/Documents.d.ts +4 -1
- package/dist/components/Documents/components/DocumentsModals/DocumentsModals.d.ts +4 -1
- package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/EditFileModal.d.ts +2 -1
- package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/EditFileModalInner.d.ts +2 -1
- package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/components/HookFormRecipient.d.ts +12 -0
- package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/components/index.d.ts +1 -0
- package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/hooks/useEditFileForm.d.ts +15 -0
- package/dist/components/Documents/utils/documentsConstants.d.ts +3 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +103 -103
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +82 -82
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +92 -92
- package/dist/localStorageUtils-CmHKDfSh.cjs +1 -0
- package/dist/{localStorageUtils-CZ4HDRzi.js → localStorageUtils-Dm59KUwC.js} +10 -29
- package/dist/main.cjs.js +7 -15
- package/dist/main.es.js +7467 -8369
- package/dist/models/api/documents/DocumentFileModel.d.ts +8 -0
- package/dist/models/api/employee/EmployeeLookupModel.d.ts +18 -0
- package/dist/models/texts/DocumentsTexts.d.ts +8 -0
- package/dist/models/texts/NotifCentrumTexts.d.ts +1 -0
- package/dist/models/types/notifCenter/NotificationTemplate.d.ts +1 -0
- package/dist/nivo-bar-CYwXuVs2.cjs +293 -0
- package/dist/{nivo-bar-BkbzRnZi.js → nivo-bar-Dvo_C4bb.js} +15283 -14104
- package/dist/{useIsFormDirty-C2-K6Xed.cjs → useIsFormDirty-C53Kh2XN.cjs} +1 -1
- package/dist/{useIsFormDirty-DZBIvp4X.js → useIsFormDirty-DrM6JmtY.js} +1 -1
- package/dist/useLocalStorageState-CzdQutCi.js +25 -0
- package/dist/useLocalStorageState-hUZJI1T5.cjs +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +55 -55
- package/package.json +1 -1
- package/dist/localStorageUtils-CkZslzIU.cjs +0 -1
- package/dist/nivo-bar-CFkvCosn.cjs +0 -285
- package/dist/useLocalStorageState-B1kFYGzD.js +0 -91
- package/dist/useLocalStorageState-E2HAjd0z.cjs +0 -1
package/dist/hooks.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./nivo-bar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./nivo-bar-CYwXuVs2.cjs"),f=require("react"),V=require("./useLocalStorageState-hUZJI1T5.cjs"),F=require("./useIsFormDirty-C53Kh2XN.cjs");require("react/jsx-runtime");require("react-router");const H=require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-react");require("@azure/msal-browser");const Q=require("./useIsBrowserOnline-CREGrf2l.cjs"),C=new Map;function _(s,r){const e=a.useAxios({silent:!0,differentBaseUrl:r==null?void 0:r.customBaseUrl,customToken:r==null?void 0:r.customToken}),t=f.useRef(null);if(!C.has(s)){const m=e.get(s).then(n=>(C.set(s,{status:"success",data:n.data}),t.current=setTimeout(()=>{C.delete(s),t.current=null},1e4),n.data)).catch(n=>{throw C.set(s,{status:"error",error:n}),t.current=setTimeout(()=>{C.delete(s),t.current=null},1e3),n});throw C.set(s,{status:"pending",promise:m}),m}const o=C.get(s);if(o.status==="pending")throw o.promise;if(o.status==="error")throw o.error;return o.data}const J=s=>r=>(window.addEventListener(`storage_${s}`,r),()=>window.removeEventListener(`storage_${s}`,r)),M=(s,r,e)=>{const t=a.compilerRuntimeExports.c(15),o=e===void 0?localStorage:e,[m]=f.useState(r);let n;t[0]!==r?(n=JSON.stringify(r),t[0]=r,t[1]=n):n=t[1];const l=f.useRef(n),w=f.useRef(r);let h;t[2]!==s||t[3]!==m||t[4]!==o?(h=()=>{const i=o.getItem(s);return i!==l.current&&(l.current=i,w.current=l.current?JSON.parse(l.current):m),w.current},t[2]=s,t[3]=m,t[4]=o,t[5]=h):h=t[5];const y=h;let g;t[6]!==s?(g=J(s),t[6]=s,t[7]=g):g=t[7];const I=g,c=f.useSyncExternalStore(I,y);let u;t[8]!==y||t[9]!==s||t[10]!==o?(u=i=>{const O=typeof i=="function"?i(y()):i;o.setItem(s,JSON.stringify(O)),window.dispatchEvent(new Event(`storage_${s}`))},t[8]=y,t[9]=s,t[10]=o,t[11]=u):u=t[11];const d=u;let v;return t[12]!==d||t[13]!==c?(v=[c,d],t[12]=d,t[13]=c,t[14]=v):v=t[14],v},W=(s,r,e)=>{let t="pending",o;const m=s.then(n=>{t="success",o=n},n=>{const l=n==null?void 0:n.response;(l==null?void 0:l.status)===404&&e?(t="error-404",o=n):(t="error",o=n)});return()=>{switch(t){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")}}},P={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},z=(s,r)=>{const e=a.compilerRuntimeExports.c(26),{loadOnInit:t,enabled:o,silent:m,nullStateBeforeLoad:n,nullStateOnFail:l,customApiUrl:w,customBearerToken:h,dataTransformer:y,errorBoundaryOn404:g}=r===void 0?P:r,I=t===void 0?P.loadOnInit:t,c=o===void 0?P.enabled:o,u=m===void 0?P.silent:m,d=n===void 0?P.nullStateBeforeLoad:n,v=l===void 0?P.nullStateOnFail:l;let p;e[0]!==g?(p=g?[404]:void 0,e[0]=g,e[1]=p):p=e[1];let i;e[2]!==w||e[3]!==h||e[4]!==u||e[5]!==p?(i={silent:u,customToken:h,differentBaseUrl:w,noToastOnStatus:p},e[2]=w,e[3]=h,e[4]=u,e[5]=p,e[6]=i):i=e[6];const O=a.useAxios(i),{startLoading:D,stopLoading:S}=f.useContext(a.LoadingContext),E=f.useRef(0),{isAuthenticated:B}=a.useAuth(),[R,N]=f.useState(null);let b;e[7]!==O||e[8]!==y||e[9]!==c||e[10]!==g||e[11]!==B||e[12]!==d||e[13]!==v||e[14]!==u||e[15]!==D||e[16]!==S||e[17]!==s?(b=async(x,G)=>{if(!B()||c===!1)return;!u&&D(`loadData-${s}-${G}`),d&&N(null);const U=O.get(s,{signal:x}).then(K=>y?y(K.data):K.data).finally(()=>!u&&S(`loadData-${s}-${G}`));N(W(U,v??!1,g??!1))},e[7]=O,e[8]=y,e[9]=c,e[10]=g,e[11]=B,e[12]=d,e[13]=v,e[14]=u,e[15]=D,e[16]=S,e[17]=s,e[18]=b):b=e[18];const T=b;let q,A;e[19]!==T||e[20]!==I?(A=()=>{if(I===!1)return;const x=new AbortController;return T(x.signal,E.current=E.current+1),()=>{x.abort()}},q=[T,I],e[19]=T,e[20]=I,e[21]=q,e[22]=A):(q=e[21],A=e[22]),f.useEffect(A,q);let L;return e[23]!==R||e[24]!==T?(L={data:R,setData:N,reloadData:T},e[23]=R,e[24]=T,e[25]=L):L=e[25],L},Z=()=>{const s=f.useRef({}).current;return f.useEffect(()=>{const r=document.createElement("div");return r.style.position="absolute",r.style.pointerEvents="none",r.style.top="0",r.style.width="100%",r.style.height="100%",s.elt=r,document.body.appendChild(r),()=>{document.body.removeChild(r)}},[s]),r=>(e,...t)=>{const o=r(e,...t);return e.draggableProps.style.position==="fixed"?H.createPortal(o,s.elt):o}},$={storageKey:"--tmp-scroll-save--",requiredHeight:100,retryInterval:50},j=(s,r)=>{const e=a.compilerRuntimeExports.c(18),{storageKey:t,requiredHeight:o,retryInterval:m}=r===void 0?$:r,n=t===void 0?$.storageKey:t,l=o===void 0?$.requiredHeight:o,w=m===void 0?$.retryInterval:m,[h,y]=f.useState(!1),g=f.useRef(null);let I;e[0]!==n?(I=()=>{const S=localStorage.getItem(n);return localStorage.removeItem(n),S===null?null:Number(S)},e[0]=n,e[1]=I):I=e[1];const c=I;let u;e[2]!==n?(u=S=>{localStorage.setItem(n,S)},e[2]=n,e[3]=u):u=e[3];const d=u;let v,p;e[4]!==h||e[5]!==l||e[6]!==c||e[7]!==w||e[8]!==s?(v=()=>{const S=window.setInterval(()=>{if(!h&&s.current!==null&&s.current.getBoundingClientRect().height>l){y(!0);const E=c();E!==null&&s.current.scrollTo({top:E}),window.clearInterval(S)}},w);return()=>{window.clearTimeout(S)}},p=[h,l,c,w,s],e[4]=h,e[5]=l,e[6]=c,e[7]=w,e[8]=s,e[9]=v,e[10]=p):(v=e[9],p=e[10]),f.useEffect(v,p);let i,O;e[11]!==d||e[12]!==s?(i=()=>{var E;const S=new AbortController;return(E=s.current)==null||E.addEventListener("scrollend",()=>{var B;g.current=((B=s.current)==null?void 0:B.scrollTop)??0,d((g.current??0).toString())},{signal:S.signal}),()=>S.abort()},O=[d,s],e[11]=d,e[12]=s,e[13]=i,e[14]=O):(i=e[13],O=e[14]),f.useEffect(i,O);let D;return e[15]!==c||e[16]!==d?(D={saveValue:d,retrieveValue:c},e[15]=c,e[16]=d,e[17]=D):D=e[17],D};exports.cancelToken=a.cancelToken;exports.useAuth=a.useAuth;exports.useAxios=a.useAxios;exports.useClickOutside=a.useClickOutside;exports.useClipboard=a.useClipboard;exports.useConfirm=a.useConfirm;exports.useFormControlType=a.useFormControlType;exports.useGetApiData=a.useGetApiData;exports.useKeyPress=a.useKeyPress;exports.useNotifications=a.useNotifications;exports.usePermissions=a.usePermissions;exports.usePrompt=a.usePrompt;exports.useWindowSize=a.useWindowSize;exports.useZodSchemaTypes=a.useZodSchemaTypes;exports.useLocalStorageState=V.useLocalStorageState;exports.useEmployeePhotoPath=F.useEmployeePhotoPath;exports.useIsFormDirty=F.useIsFormDirty;exports.useSearchQuery=F.useSearchQuery;exports.useSearchQueryState=F.useSearchQueryState;exports.useIsBrowserOnline=Q.useIsBrowserOnline;exports.useGetApiDataBound=z;exports.useGetDataBound=_;exports.usePersistentState=M;exports.useRenderDraggableInPortal=Z;exports.useScrollSave=j;
|
package/dist/hooks.es.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { ap as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
1
|
+
import { ap as H, c as U, ar as J, bj as W } from "./nivo-bar-Dvo_C4bb.js";
|
|
2
|
+
import { cv as mt, aW as gt, cx as pt, ao as vt, cw as St, av as ht, bd as wt, as as It, bB as yt, an as bt, aI as Ot, a_ as Tt } from "./nivo-bar-Dvo_C4bb.js";
|
|
3
|
+
import { useRef as x, useState as V, useSyncExternalStore as Q, useContext as j, useEffect as F } from "react";
|
|
4
|
+
import { u as Et } from "./useLocalStorageState-CzdQutCi.js";
|
|
5
|
+
import { c as Bt, u as Dt, a as Lt, b as $t } from "./useIsFormDirty-DrM6JmtY.js";
|
|
6
6
|
import "react/jsx-runtime";
|
|
7
7
|
import "react-router";
|
|
8
|
-
import { createPortal as
|
|
8
|
+
import { createPortal as z } 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
13
|
import { u as At } from "./useIsBrowserOnline-RAirIO4c.js";
|
|
14
14
|
const T = /* @__PURE__ */ new Map();
|
|
15
|
-
function at(s,
|
|
16
|
-
const t =
|
|
15
|
+
function at(s, r) {
|
|
16
|
+
const t = H({
|
|
17
17
|
silent: !0,
|
|
18
|
-
differentBaseUrl:
|
|
19
|
-
customToken:
|
|
20
|
-
}), e =
|
|
18
|
+
differentBaseUrl: r == null ? void 0 : r.customBaseUrl,
|
|
19
|
+
customToken: r == null ? void 0 : r.customToken
|
|
20
|
+
}), e = x(null);
|
|
21
21
|
if (!T.has(s)) {
|
|
22
|
-
const d = t.get(s).then((
|
|
22
|
+
const d = t.get(s).then((n) => (T.set(s, {
|
|
23
23
|
status: "success",
|
|
24
|
-
data:
|
|
24
|
+
data: n.data
|
|
25
25
|
}), e.current = setTimeout(() => {
|
|
26
26
|
T.delete(s), e.current = null;
|
|
27
|
-
}, 1e4),
|
|
27
|
+
}, 1e4), n.data)).catch((n) => {
|
|
28
28
|
throw T.set(s, {
|
|
29
29
|
status: "error",
|
|
30
|
-
error:
|
|
30
|
+
error: n
|
|
31
31
|
}), e.current = setTimeout(() => {
|
|
32
32
|
T.delete(s), e.current = null;
|
|
33
|
-
}, 1e3),
|
|
33
|
+
}, 1e3), n;
|
|
34
34
|
});
|
|
35
35
|
throw T.set(s, {
|
|
36
36
|
status: "pending",
|
|
@@ -44,11 +44,11 @@ function at(s, n) {
|
|
|
44
44
|
throw o.error;
|
|
45
45
|
return o.data;
|
|
46
46
|
}
|
|
47
|
-
const
|
|
48
|
-
const e =
|
|
49
|
-
let
|
|
50
|
-
e[0] !==
|
|
51
|
-
const l =
|
|
47
|
+
const M = (s) => (r) => (window.addEventListener(`storage_${s}`, r), () => window.removeEventListener(`storage_${s}`, r)), lt = (s, r, t) => {
|
|
48
|
+
const e = U.c(15), o = t === void 0 ? localStorage : t, [d] = V(r);
|
|
49
|
+
let n;
|
|
50
|
+
e[0] !== r ? (n = JSON.stringify(r), e[0] = r, e[1] = n) : n = e[1];
|
|
51
|
+
const l = x(n), S = x(r);
|
|
52
52
|
let g;
|
|
53
53
|
e[2] !== s || e[3] !== d || e[4] !== o ? (g = () => {
|
|
54
54
|
const u = o.getItem(s);
|
|
@@ -56,23 +56,23 @@ const Z = (s) => (n) => (window.addEventListener(`storage_${s}`, n), () => windo
|
|
|
56
56
|
}, e[2] = s, e[3] = d, e[4] = o, e[5] = g) : g = e[5];
|
|
57
57
|
const h = g;
|
|
58
58
|
let f;
|
|
59
|
-
e[6] !== s ? (f =
|
|
60
|
-
const i =
|
|
59
|
+
e[6] !== s ? (f = M(s), e[6] = s, e[7] = f) : f = e[7];
|
|
60
|
+
const i = Q(f, h);
|
|
61
61
|
let a;
|
|
62
62
|
e[8] !== h || e[9] !== s || e[10] !== o ? (a = (u) => {
|
|
63
|
-
const
|
|
64
|
-
o.setItem(s, JSON.stringify(
|
|
63
|
+
const I = typeof u == "function" ? u(h()) : u;
|
|
64
|
+
o.setItem(s, JSON.stringify(I)), window.dispatchEvent(new Event(`storage_${s}`));
|
|
65
65
|
}, e[8] = h, e[9] = s, e[10] = o, e[11] = a) : a = e[11];
|
|
66
66
|
const c = a;
|
|
67
67
|
let p;
|
|
68
68
|
return e[12] !== c || e[13] !== i ? (p = [i, c], e[12] = c, e[13] = i, e[14] = p) : p = e[14], p;
|
|
69
|
-
},
|
|
69
|
+
}, Z = (s, r, t) => {
|
|
70
70
|
let e = "pending", o;
|
|
71
|
-
const d = s.then((
|
|
72
|
-
e = "success", o =
|
|
73
|
-
}, (
|
|
74
|
-
const l =
|
|
75
|
-
(l == null ? void 0 : l.status) === 404 && t ? (e = "error-404", o =
|
|
71
|
+
const d = s.then((n) => {
|
|
72
|
+
e = "success", o = n;
|
|
73
|
+
}, (n) => {
|
|
74
|
+
const l = n == null ? void 0 : n.response;
|
|
75
|
+
(l == null ? void 0 : l.status) === 404 && t ? (e = "error-404", o = n) : (e = "error", o = n);
|
|
76
76
|
});
|
|
77
77
|
return () => {
|
|
78
78
|
switch (e) {
|
|
@@ -95,18 +95,18 @@ const Z = (s) => (n) => (window.addEventListener(`storage_${s}`, n), () => windo
|
|
|
95
95
|
enabled: !0,
|
|
96
96
|
nullStateBeforeLoad: !0,
|
|
97
97
|
nullStateOnFail: !1
|
|
98
|
-
}, ut = (s,
|
|
99
|
-
const t =
|
|
98
|
+
}, ut = (s, r) => {
|
|
99
|
+
const t = U.c(26), {
|
|
100
100
|
loadOnInit: e,
|
|
101
101
|
enabled: o,
|
|
102
102
|
silent: d,
|
|
103
|
-
nullStateBeforeLoad:
|
|
103
|
+
nullStateBeforeLoad: n,
|
|
104
104
|
nullStateOnFail: l,
|
|
105
105
|
customApiUrl: S,
|
|
106
106
|
customBearerToken: g,
|
|
107
107
|
dataTransformer: h,
|
|
108
108
|
errorBoundaryOn404: f
|
|
109
|
-
} =
|
|
109
|
+
} = r === void 0 ? E : r, w = e === void 0 ? E.loadOnInit : e, i = o === void 0 ? E.enabled : o, a = d === void 0 ? E.silent : d, c = n === void 0 ? E.nullStateBeforeLoad : n, p = l === void 0 ? E.nullStateOnFail : l;
|
|
110
110
|
let v;
|
|
111
111
|
t[0] !== f ? (v = f ? [404] : void 0, t[0] = f, t[1] = v) : v = t[1];
|
|
112
112
|
let u;
|
|
@@ -116,24 +116,24 @@ const Z = (s) => (n) => (window.addEventListener(`storage_${s}`, n), () => windo
|
|
|
116
116
|
differentBaseUrl: S,
|
|
117
117
|
noToastOnStatus: v
|
|
118
118
|
}, t[2] = S, t[3] = g, t[4] = a, t[5] = v, t[6] = u) : u = t[6];
|
|
119
|
-
const
|
|
120
|
-
startLoading:
|
|
119
|
+
const I = H(u), {
|
|
120
|
+
startLoading: y,
|
|
121
121
|
stopLoading: m
|
|
122
|
-
} =
|
|
122
|
+
} = j(J), b = x(0), {
|
|
123
123
|
isAuthenticated: C
|
|
124
|
-
} =
|
|
125
|
-
let
|
|
126
|
-
t[7] !==
|
|
124
|
+
} = W(), [N, K] = V(null);
|
|
125
|
+
let B;
|
|
126
|
+
t[7] !== I || t[8] !== h || t[9] !== i || t[10] !== f || t[11] !== C || t[12] !== c || t[13] !== p || t[14] !== a || t[15] !== y || t[16] !== m || t[17] !== s ? (B = async (P, _) => {
|
|
127
127
|
if (!C() || i === !1)
|
|
128
128
|
return;
|
|
129
|
-
!a &&
|
|
130
|
-
const G =
|
|
129
|
+
!a && y(`loadData-${s}-${_}`), c && K(null);
|
|
130
|
+
const G = I.get(s, {
|
|
131
131
|
signal: P
|
|
132
|
-
}).then((q) => h ? h(q.data) : q.data).finally(() => !a && m(`loadData-${s}-${
|
|
133
|
-
|
|
134
|
-
}, t[7] =
|
|
135
|
-
const O =
|
|
136
|
-
let
|
|
132
|
+
}).then((q) => h ? h(q.data) : q.data).finally(() => !a && m(`loadData-${s}-${_}`));
|
|
133
|
+
K(Z(G, p ?? !1, f ?? !1));
|
|
134
|
+
}, t[7] = I, t[8] = h, t[9] = i, t[10] = f, t[11] = C, t[12] = c, t[13] = p, t[14] = a, t[15] = y, t[16] = m, t[17] = s, t[18] = B) : B = t[18];
|
|
135
|
+
const O = B;
|
|
136
|
+
let D, L;
|
|
137
137
|
t[19] !== O || t[20] !== w ? (L = () => {
|
|
138
138
|
if (w === !1)
|
|
139
139
|
return;
|
|
@@ -141,44 +141,44 @@ const Z = (s) => (n) => (window.addEventListener(`storage_${s}`, n), () => windo
|
|
|
141
141
|
return O(P.signal, b.current = b.current + 1), () => {
|
|
142
142
|
P.abort();
|
|
143
143
|
};
|
|
144
|
-
},
|
|
144
|
+
}, D = [O, w], t[19] = O, t[20] = w, t[21] = D, t[22] = L) : (D = t[21], L = t[22]), F(L, D);
|
|
145
145
|
let $;
|
|
146
146
|
return t[23] !== N || t[24] !== O ? ($ = {
|
|
147
147
|
data: N,
|
|
148
|
-
setData:
|
|
148
|
+
setData: K,
|
|
149
149
|
reloadData: O
|
|
150
150
|
}, t[23] = N, t[24] = O, t[25] = $) : $ = t[25], $;
|
|
151
151
|
}, it = () => {
|
|
152
|
-
const s =
|
|
152
|
+
const s = x({}).current;
|
|
153
153
|
return F(() => {
|
|
154
|
-
const
|
|
155
|
-
return
|
|
156
|
-
document.body.removeChild(
|
|
154
|
+
const r = document.createElement("div");
|
|
155
|
+
return r.style.position = "absolute", r.style.pointerEvents = "none", r.style.top = "0", r.style.width = "100%", r.style.height = "100%", s.elt = r, document.body.appendChild(r), () => {
|
|
156
|
+
document.body.removeChild(r);
|
|
157
157
|
};
|
|
158
|
-
}, [s]), (
|
|
159
|
-
const o =
|
|
160
|
-
return t.draggableProps.style.position === "fixed" ?
|
|
158
|
+
}, [s]), (r) => (t, ...e) => {
|
|
159
|
+
const o = r(t, ...e);
|
|
160
|
+
return t.draggableProps.style.position === "fixed" ? z(o, s.elt) : o;
|
|
161
161
|
};
|
|
162
162
|
}, A = {
|
|
163
163
|
storageKey: "--tmp-scroll-save--",
|
|
164
164
|
requiredHeight: 100,
|
|
165
165
|
retryInterval: 50
|
|
166
|
-
}, ct = (s,
|
|
167
|
-
const t =
|
|
166
|
+
}, ct = (s, r) => {
|
|
167
|
+
const t = U.c(18), {
|
|
168
168
|
storageKey: e,
|
|
169
169
|
requiredHeight: o,
|
|
170
170
|
retryInterval: d
|
|
171
|
-
} =
|
|
171
|
+
} = r === void 0 ? A : r, n = e === void 0 ? A.storageKey : e, l = o === void 0 ? A.requiredHeight : o, S = d === void 0 ? A.retryInterval : d, [g, h] = V(!1), f = x(null);
|
|
172
172
|
let w;
|
|
173
|
-
t[0] !==
|
|
174
|
-
const m = localStorage.getItem(
|
|
175
|
-
return localStorage.removeItem(
|
|
176
|
-
}, t[0] =
|
|
173
|
+
t[0] !== n ? (w = () => {
|
|
174
|
+
const m = localStorage.getItem(n);
|
|
175
|
+
return localStorage.removeItem(n), m === null ? null : Number(m);
|
|
176
|
+
}, t[0] = n, t[1] = w) : w = t[1];
|
|
177
177
|
const i = w;
|
|
178
178
|
let a;
|
|
179
|
-
t[2] !==
|
|
180
|
-
localStorage.setItem(
|
|
181
|
-
}, t[2] =
|
|
179
|
+
t[2] !== n ? (a = (m) => {
|
|
180
|
+
localStorage.setItem(n, m);
|
|
181
|
+
}, t[2] = n, t[3] = a) : a = t[3];
|
|
182
182
|
const c = a;
|
|
183
183
|
let p, v;
|
|
184
184
|
t[4] !== g || t[5] !== l || t[6] !== i || t[7] !== S || t[8] !== s ? (p = () => {
|
|
@@ -195,7 +195,7 @@ const Z = (s) => (n) => (window.addEventListener(`storage_${s}`, n), () => windo
|
|
|
195
195
|
window.clearTimeout(m);
|
|
196
196
|
};
|
|
197
197
|
}, v = [g, l, i, S, s], t[4] = g, t[5] = l, t[6] = i, t[7] = S, t[8] = s, t[9] = p, t[10] = v) : (p = t[9], v = t[10]), F(p, v);
|
|
198
|
-
let u,
|
|
198
|
+
let u, I;
|
|
199
199
|
t[11] !== c || t[12] !== s ? (u = () => {
|
|
200
200
|
var b;
|
|
201
201
|
const m = new AbortController();
|
|
@@ -205,37 +205,37 @@ const Z = (s) => (n) => (window.addEventListener(`storage_${s}`, n), () => windo
|
|
|
205
205
|
}, {
|
|
206
206
|
signal: m.signal
|
|
207
207
|
}), () => m.abort();
|
|
208
|
-
},
|
|
209
|
-
let
|
|
210
|
-
return t[15] !== i || t[16] !== c ? (
|
|
208
|
+
}, I = [c, s], t[11] = c, t[12] = s, t[13] = u, t[14] = I) : (u = t[13], I = t[14]), F(u, I);
|
|
209
|
+
let y;
|
|
210
|
+
return t[15] !== i || t[16] !== c ? (y = {
|
|
211
211
|
saveValue: c,
|
|
212
212
|
retrieveValue: i
|
|
213
|
-
}, t[15] = i, t[16] = c, t[17] =
|
|
213
|
+
}, t[15] = i, t[16] = c, t[17] = y) : y = t[17], y;
|
|
214
214
|
};
|
|
215
215
|
export {
|
|
216
216
|
mt as cancelToken,
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
W as useAuth,
|
|
218
|
+
H as useAxios,
|
|
219
219
|
gt as useClickOutside,
|
|
220
220
|
pt as useClipboard,
|
|
221
221
|
vt as useConfirm,
|
|
222
|
-
|
|
222
|
+
Bt as useEmployeePhotoPath,
|
|
223
223
|
St as useFormControlType,
|
|
224
|
-
|
|
224
|
+
ht as useGetApiData,
|
|
225
225
|
ut as useGetApiDataBound,
|
|
226
226
|
at as useGetDataBound,
|
|
227
227
|
At as useIsBrowserOnline,
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
Dt as useIsFormDirty,
|
|
229
|
+
wt as useKeyPress,
|
|
230
230
|
Et as useLocalStorageState,
|
|
231
|
-
|
|
231
|
+
It as useNotifications,
|
|
232
232
|
yt as usePermissions,
|
|
233
233
|
lt as usePersistentState,
|
|
234
|
-
|
|
234
|
+
bt as usePrompt,
|
|
235
235
|
it as useRenderDraggableInPortal,
|
|
236
236
|
ct as useScrollSave,
|
|
237
237
|
Lt as useSearchQuery,
|
|
238
238
|
$t as useSearchQueryState,
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
Ot as useWindowSize,
|
|
240
|
+
Tt as useZodSchemaTypes
|
|
241
241
|
};
|
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("./nivo-bar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("./nivo-bar-CYwXuVs2.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;
|