react-luminus-components 2.0.32 → 2.0.33
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 +12 -2
- package/dist/components/Layout/ConnectionNotification/ConnectionAlert.d.ts +5 -0
- package/dist/components/Layout/ConnectionNotification/ConnectionIcon.d.ts +5 -0
- package/dist/components/Layout/index.d.ts +2 -0
- package/dist/contexts/index.d.ts +1 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +415 -408
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +148 -155
- package/dist/main.cjs.js +7 -7
- package/dist/main.d.ts +2 -0
- package/dist/main.es.js +346 -308
- package/dist/useIsBrowserOnline-CREGrf2l.cjs +1 -0
- package/dist/useIsBrowserOnline-RAirIO4c.js +13 -0
- package/package.json +1 -1
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 a=require("./nivo-bar-BkpPCncR.cjs"),U=require("./useLocalStorageState-gKbms6va.cjs"),f=require("react"),F=require("./useIsFormDirty-Cb4GEBID.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)){if(!e.interceptorsUsed)return null;const m=e.get(s).then(n=>(C.set(s,{status:"success",data:n.data}),t.current=setTimeout(()=>{C.delete(s),t.current=null},1e3*10),n.data)).catch(n=>{throw C.set(s,{status:"error",error:n}),t.current=setTimeout(()=>{C.delete(s),t.current=null},1e3*1),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 V=O.get(s,{signal:x}).then(K=>y?y(K.data):K.data).finally(()=>!u&&S(`loadData-${s}-${G}`));N(W(V,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.useKeyPress=a.useKeyPress;exports.useNotifications=a.useNotifications;exports.usePermissions=a.usePermissions;exports.usePrompt=a.usePrompt;exports.useWindowSize=a.useWindowSize;exports.useZodSchemaTypes=a.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.useIsBrowserOnline=Q.useIsBrowserOnline;exports.useGetApiDataBound=z;exports.useGetDataBound=_;exports.usePersistentState=M;exports.useRenderDraggableInPortal=Z;exports.useScrollSave=j;
|
package/dist/hooks.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ap as
|
|
2
|
-
import { cl as
|
|
3
|
-
import { u as Ct, a as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { c as
|
|
1
|
+
import { ap as _, c as V, ar as J, be as Q } from "./nivo-bar-wBsr2P1t.js";
|
|
2
|
+
import { cl as mt, aS as gt, cn as pt, ao as vt, cm as St, b8 as ht, as as wt, bw as yt, an as It, aH as bt, aV as Ot } from "./nivo-bar-wBsr2P1t.js";
|
|
3
|
+
import { u as Ct, a as Et } from "./useLocalStorageState-DBd2vOH1.js";
|
|
4
|
+
import { useRef as D, useState as H, useSyncExternalStore as W, useContext as z, useEffect as F } from "react";
|
|
5
|
+
import { c as xt, u as Bt, a as Lt, b as $t } from "./useIsFormDirty-CTuj9_Nd.js";
|
|
6
6
|
import "react/jsx-runtime";
|
|
7
7
|
import "react-router";
|
|
8
8
|
import { createPortal as M } from "react-dom";
|
|
@@ -10,73 +10,74 @@ import "react-hook-form";
|
|
|
10
10
|
import "react-flexmonster";
|
|
11
11
|
import "@azure/msal-react";
|
|
12
12
|
import "@azure/msal-browser";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
import { u as At } from "./useIsBrowserOnline-RAirIO4c.js";
|
|
14
|
+
const T = /* @__PURE__ */ new Map();
|
|
15
|
+
function at(s, r) {
|
|
16
|
+
const t = _({
|
|
16
17
|
silent: !0,
|
|
17
18
|
differentBaseUrl: r == null ? void 0 : r.customBaseUrl,
|
|
18
19
|
customToken: r == null ? void 0 : r.customToken
|
|
19
|
-
}),
|
|
20
|
-
if (!
|
|
20
|
+
}), e = D(null);
|
|
21
|
+
if (!T.has(s)) {
|
|
21
22
|
if (!t.interceptorsUsed)
|
|
22
23
|
return null;
|
|
23
|
-
const d = t.get(
|
|
24
|
+
const d = t.get(s).then((n) => (T.set(s, {
|
|
24
25
|
status: "success",
|
|
25
|
-
data:
|
|
26
|
-
}),
|
|
27
|
-
|
|
28
|
-
}, 1e3 * 10),
|
|
29
|
-
throw
|
|
26
|
+
data: n.data
|
|
27
|
+
}), e.current = setTimeout(() => {
|
|
28
|
+
T.delete(s), e.current = null;
|
|
29
|
+
}, 1e3 * 10), n.data)).catch((n) => {
|
|
30
|
+
throw T.set(s, {
|
|
30
31
|
status: "error",
|
|
31
|
-
error:
|
|
32
|
-
}),
|
|
33
|
-
|
|
34
|
-
}, 1e3 * 1),
|
|
32
|
+
error: n
|
|
33
|
+
}), e.current = setTimeout(() => {
|
|
34
|
+
T.delete(s), e.current = null;
|
|
35
|
+
}, 1e3 * 1), n;
|
|
35
36
|
});
|
|
36
|
-
throw
|
|
37
|
+
throw T.set(s, {
|
|
37
38
|
status: "pending",
|
|
38
39
|
promise: d
|
|
39
40
|
}), d;
|
|
40
41
|
}
|
|
41
|
-
const o =
|
|
42
|
+
const o = T.get(s);
|
|
42
43
|
if (o.status === "pending")
|
|
43
44
|
throw o.promise;
|
|
44
45
|
if (o.status === "error")
|
|
45
46
|
throw o.error;
|
|
46
47
|
return o.data;
|
|
47
48
|
}
|
|
48
|
-
const Z = (
|
|
49
|
-
const
|
|
50
|
-
let
|
|
51
|
-
|
|
52
|
-
const
|
|
49
|
+
const Z = (s) => (r) => (window.addEventListener(`storage_${s}`, r), () => window.removeEventListener(`storage_${s}`, r)), lt = (s, r, t) => {
|
|
50
|
+
const e = V.c(15), o = t === void 0 ? localStorage : t, [d] = H(r);
|
|
51
|
+
let n;
|
|
52
|
+
e[0] !== r ? (n = JSON.stringify(r), e[0] = r, e[1] = n) : n = e[1];
|
|
53
|
+
const l = D(n), S = D(r);
|
|
53
54
|
let g;
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
return
|
|
57
|
-
},
|
|
58
|
-
const
|
|
55
|
+
e[2] !== s || e[3] !== d || e[4] !== o ? (g = () => {
|
|
56
|
+
const u = o.getItem(s);
|
|
57
|
+
return u !== l.current && (l.current = u, S.current = l.current ? JSON.parse(l.current) : d), S.current;
|
|
58
|
+
}, e[2] = s, e[3] = d, e[4] = o, e[5] = g) : g = e[5];
|
|
59
|
+
const h = g;
|
|
59
60
|
let f;
|
|
60
|
-
|
|
61
|
-
const
|
|
61
|
+
e[6] !== s ? (f = Z(s), e[6] = s, e[7] = f) : f = e[7];
|
|
62
|
+
const i = W(f, h);
|
|
62
63
|
let a;
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
o.setItem(
|
|
66
|
-
},
|
|
64
|
+
e[8] !== h || e[9] !== s || e[10] !== o ? (a = (u) => {
|
|
65
|
+
const y = typeof u == "function" ? u(h()) : u;
|
|
66
|
+
o.setItem(s, JSON.stringify(y)), window.dispatchEvent(new Event(`storage_${s}`));
|
|
67
|
+
}, e[8] = h, e[9] = s, e[10] = o, e[11] = a) : a = e[11];
|
|
67
68
|
const c = a;
|
|
68
|
-
let
|
|
69
|
-
return
|
|
70
|
-
}, j = (
|
|
71
|
-
let
|
|
72
|
-
const d =
|
|
73
|
-
|
|
74
|
-
}, (
|
|
75
|
-
const
|
|
76
|
-
(
|
|
69
|
+
let p;
|
|
70
|
+
return e[12] !== c || e[13] !== i ? (p = [i, c], e[12] = c, e[13] = i, e[14] = p) : p = e[14], p;
|
|
71
|
+
}, j = (s, r, t) => {
|
|
72
|
+
let e = "pending", o;
|
|
73
|
+
const d = s.then((n) => {
|
|
74
|
+
e = "success", o = n;
|
|
75
|
+
}, (n) => {
|
|
76
|
+
const l = n == null ? void 0 : n.response;
|
|
77
|
+
(l == null ? void 0 : l.status) === 404 && t ? (e = "error-404", o = n) : (e = "error", o = n);
|
|
77
78
|
});
|
|
78
79
|
return () => {
|
|
79
|
-
switch (
|
|
80
|
+
switch (e) {
|
|
80
81
|
case "pending":
|
|
81
82
|
throw d;
|
|
82
83
|
case "success":
|
|
@@ -90,161 +91,153 @@ const Z = (e) => (r) => (window.addEventListener(`storage_${e}`, r), () => windo
|
|
|
90
91
|
throw new Error("Unknown status");
|
|
91
92
|
}
|
|
92
93
|
};
|
|
93
|
-
},
|
|
94
|
+
}, E = {
|
|
94
95
|
loadOnInit: !0,
|
|
95
96
|
silent: !1,
|
|
96
97
|
enabled: !0,
|
|
97
98
|
nullStateBeforeLoad: !0,
|
|
98
99
|
nullStateOnFail: !1
|
|
99
|
-
},
|
|
100
|
+
}, ut = (s, r) => {
|
|
100
101
|
const t = V.c(26), {
|
|
101
|
-
loadOnInit:
|
|
102
|
+
loadOnInit: e,
|
|
102
103
|
enabled: o,
|
|
103
104
|
silent: d,
|
|
104
|
-
nullStateBeforeLoad:
|
|
105
|
-
nullStateOnFail:
|
|
106
|
-
customApiUrl:
|
|
105
|
+
nullStateBeforeLoad: n,
|
|
106
|
+
nullStateOnFail: l,
|
|
107
|
+
customApiUrl: S,
|
|
107
108
|
customBearerToken: g,
|
|
108
|
-
dataTransformer:
|
|
109
|
+
dataTransformer: h,
|
|
109
110
|
errorBoundaryOn404: f
|
|
110
|
-
} = r === void 0 ?
|
|
111
|
-
let
|
|
112
|
-
t[0] !== f ? (
|
|
113
|
-
let
|
|
114
|
-
t[2] !==
|
|
111
|
+
} = 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;
|
|
112
|
+
let v;
|
|
113
|
+
t[0] !== f ? (v = f ? [404] : void 0, t[0] = f, t[1] = v) : v = t[1];
|
|
114
|
+
let u;
|
|
115
|
+
t[2] !== S || t[3] !== g || t[4] !== a || t[5] !== v ? (u = {
|
|
115
116
|
silent: a,
|
|
116
117
|
customToken: g,
|
|
117
|
-
differentBaseUrl:
|
|
118
|
-
noToastOnStatus:
|
|
119
|
-
}, t[2] =
|
|
120
|
-
const
|
|
121
|
-
startLoading:
|
|
118
|
+
differentBaseUrl: S,
|
|
119
|
+
noToastOnStatus: v
|
|
120
|
+
}, t[2] = S, t[3] = g, t[4] = a, t[5] = v, t[6] = u) : u = t[6];
|
|
121
|
+
const y = _(u), {
|
|
122
|
+
startLoading: I,
|
|
122
123
|
stopLoading: m
|
|
123
|
-
} = z(
|
|
124
|
-
isAuthenticated:
|
|
125
|
-
} =
|
|
126
|
-
let
|
|
127
|
-
t[7] !==
|
|
128
|
-
if (!
|
|
124
|
+
} = z(J), b = D(0), {
|
|
125
|
+
isAuthenticated: C
|
|
126
|
+
} = Q(), [N, U] = H(null);
|
|
127
|
+
let x;
|
|
128
|
+
t[7] !== y || t[8] !== h || t[9] !== i || t[10] !== f || t[11] !== C || t[12] !== c || t[13] !== p || t[14] !== a || t[15] !== I || t[16] !== m || t[17] !== s ? (x = async (P, K) => {
|
|
129
|
+
if (!C() || i === !1)
|
|
129
130
|
return;
|
|
130
|
-
!a &&
|
|
131
|
-
const
|
|
131
|
+
!a && I(`loadData-${s}-${K}`), c && U(null);
|
|
132
|
+
const G = y.get(s, {
|
|
132
133
|
signal: P
|
|
133
|
-
}).then((
|
|
134
|
-
U(j(
|
|
135
|
-
}, t[7] =
|
|
136
|
-
const
|
|
137
|
-
let
|
|
138
|
-
t[19] !==
|
|
139
|
-
if (
|
|
134
|
+
}).then((q) => h ? h(q.data) : q.data).finally(() => !a && m(`loadData-${s}-${K}`));
|
|
135
|
+
U(j(G, p ?? !1, f ?? !1));
|
|
136
|
+
}, t[7] = y, t[8] = h, t[9] = i, t[10] = f, t[11] = C, t[12] = c, t[13] = p, t[14] = a, t[15] = I, t[16] = m, t[17] = s, t[18] = x) : x = t[18];
|
|
137
|
+
const O = x;
|
|
138
|
+
let B, L;
|
|
139
|
+
t[19] !== O || t[20] !== w ? (L = () => {
|
|
140
|
+
if (w === !1)
|
|
140
141
|
return;
|
|
141
142
|
const P = new AbortController();
|
|
142
|
-
return
|
|
143
|
+
return O(P.signal, b.current = b.current + 1), () => {
|
|
143
144
|
P.abort();
|
|
144
145
|
};
|
|
145
|
-
},
|
|
146
|
+
}, B = [O, w], t[19] = O, t[20] = w, t[21] = B, t[22] = L) : (B = t[21], L = t[22]), F(L, B);
|
|
146
147
|
let $;
|
|
147
|
-
return t[23] !== N || t[24] !==
|
|
148
|
+
return t[23] !== N || t[24] !== O ? ($ = {
|
|
148
149
|
data: N,
|
|
149
150
|
setData: U,
|
|
150
|
-
reloadData:
|
|
151
|
-
}, t[23] = N, t[24] =
|
|
152
|
-
},
|
|
153
|
-
const
|
|
151
|
+
reloadData: O
|
|
152
|
+
}, t[23] = N, t[24] = O, t[25] = $) : $ = t[25], $;
|
|
153
|
+
}, it = () => {
|
|
154
|
+
const s = D({}).current;
|
|
154
155
|
return F(() => {
|
|
155
156
|
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%",
|
|
157
|
+
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), () => {
|
|
157
158
|
document.body.removeChild(r);
|
|
158
159
|
};
|
|
159
|
-
}, [
|
|
160
|
-
const o = r(t, ...
|
|
161
|
-
return t.draggableProps.style.position === "fixed" ? M(o,
|
|
160
|
+
}, [s]), (r) => (t, ...e) => {
|
|
161
|
+
const o = r(t, ...e);
|
|
162
|
+
return t.draggableProps.style.position === "fixed" ? M(o, s.elt) : o;
|
|
162
163
|
};
|
|
163
164
|
}, A = {
|
|
164
165
|
storageKey: "--tmp-scroll-save--",
|
|
165
166
|
requiredHeight: 100,
|
|
166
167
|
retryInterval: 50
|
|
167
|
-
},
|
|
168
|
+
}, ct = (s, r) => {
|
|
168
169
|
const t = V.c(18), {
|
|
169
|
-
storageKey:
|
|
170
|
+
storageKey: e,
|
|
170
171
|
requiredHeight: o,
|
|
171
172
|
retryInterval: d
|
|
172
|
-
} = r === void 0 ? A : r,
|
|
173
|
-
let
|
|
174
|
-
t[0] !==
|
|
175
|
-
const m = localStorage.getItem(
|
|
176
|
-
return localStorage.removeItem(
|
|
177
|
-
}, t[0] =
|
|
178
|
-
const
|
|
173
|
+
} = 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] = H(!1), f = D(null);
|
|
174
|
+
let w;
|
|
175
|
+
t[0] !== n ? (w = () => {
|
|
176
|
+
const m = localStorage.getItem(n);
|
|
177
|
+
return localStorage.removeItem(n), m === null ? null : Number(m);
|
|
178
|
+
}, t[0] = n, t[1] = w) : w = t[1];
|
|
179
|
+
const i = w;
|
|
179
180
|
let a;
|
|
180
|
-
t[2] !==
|
|
181
|
-
localStorage.setItem(
|
|
182
|
-
}, t[2] =
|
|
181
|
+
t[2] !== n ? (a = (m) => {
|
|
182
|
+
localStorage.setItem(n, m);
|
|
183
|
+
}, t[2] = n, t[3] = a) : a = t[3];
|
|
183
184
|
const c = a;
|
|
184
|
-
let
|
|
185
|
-
t[4] !== g || t[5] !==
|
|
185
|
+
let p, v;
|
|
186
|
+
t[4] !== g || t[5] !== l || t[6] !== i || t[7] !== S || t[8] !== s ? (p = () => {
|
|
186
187
|
const m = window.setInterval(() => {
|
|
187
|
-
if (!g &&
|
|
188
|
-
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
top:
|
|
188
|
+
if (!g && s.current !== null && s.current.getBoundingClientRect().height > l) {
|
|
189
|
+
h(!0);
|
|
190
|
+
const b = i();
|
|
191
|
+
b !== null && s.current.scrollTo({
|
|
192
|
+
top: b
|
|
192
193
|
}), window.clearInterval(m);
|
|
193
194
|
}
|
|
194
|
-
},
|
|
195
|
+
}, S);
|
|
195
196
|
return () => {
|
|
196
197
|
window.clearTimeout(m);
|
|
197
198
|
};
|
|
198
|
-
},
|
|
199
|
-
let
|
|
200
|
-
t[11] !== c || t[12] !==
|
|
201
|
-
var
|
|
199
|
+
}, 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);
|
|
200
|
+
let u, y;
|
|
201
|
+
t[11] !== c || t[12] !== s ? (u = () => {
|
|
202
|
+
var b;
|
|
202
203
|
const m = new AbortController();
|
|
203
|
-
return (
|
|
204
|
-
var
|
|
205
|
-
f.current = ((
|
|
204
|
+
return (b = s.current) == null || b.addEventListener("scrollend", () => {
|
|
205
|
+
var C;
|
|
206
|
+
f.current = ((C = s.current) == null ? void 0 : C.scrollTop) ?? 0, c((f.current ?? 0).toString());
|
|
206
207
|
}, {
|
|
207
208
|
signal: m.signal
|
|
208
209
|
}), () => m.abort();
|
|
209
|
-
},
|
|
210
|
-
let
|
|
211
|
-
return t[15] !==
|
|
210
|
+
}, y = [c, s], t[11] = c, t[12] = s, t[13] = u, t[14] = y) : (u = t[13], y = t[14]), F(u, y);
|
|
211
|
+
let I;
|
|
212
|
+
return t[15] !== i || t[16] !== c ? (I = {
|
|
212
213
|
saveValue: c,
|
|
213
|
-
retrieveValue:
|
|
214
|
-
}, t[15] =
|
|
215
|
-
}
|
|
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
|
-
}
|
|
214
|
+
retrieveValue: i
|
|
215
|
+
}, t[15] = i, t[16] = c, t[17] = I) : I = t[17], I;
|
|
216
|
+
};
|
|
224
217
|
export {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
218
|
+
mt as cancelToken,
|
|
219
|
+
Q as useAuth,
|
|
220
|
+
_ as useAxios,
|
|
221
|
+
gt as useClickOutside,
|
|
222
|
+
pt as useClipboard,
|
|
223
|
+
vt as useConfirm,
|
|
224
|
+
xt as useEmployeePhotoPath,
|
|
225
|
+
St as useFormControlType,
|
|
233
226
|
Ct as useGetApiData,
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
227
|
+
ut as useGetApiDataBound,
|
|
228
|
+
at as useGetDataBound,
|
|
229
|
+
At as useIsBrowserOnline,
|
|
230
|
+
Bt as useIsFormDirty,
|
|
231
|
+
ht as useKeyPress,
|
|
232
|
+
Et as useLocalStorageState,
|
|
233
|
+
wt as useNotifications,
|
|
234
|
+
yt as usePermissions,
|
|
235
|
+
lt as usePersistentState,
|
|
243
236
|
It as usePrompt,
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
237
|
+
it as useRenderDraggableInPortal,
|
|
238
|
+
ct as useScrollSave,
|
|
239
|
+
Lt as useSearchQuery,
|
|
240
|
+
$t as useSearchQueryState,
|
|
241
|
+
bt as useWindowSize,
|
|
242
|
+
Ot as useZodSchemaTypes
|
|
250
243
|
};
|