react-luminus-components 2.0.5-beta.r19-11 → 2.0.5-beta.r19-13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/common/ReportsIndexPage/ReportsIndexPage.d.ts +2 -2
- package/dist/components/common/ReportsIndexPage/comps/ReportIndexMain/ReportIndexMain.d.ts +17 -0
- package/dist/components/common/ReportsIndexPage/comps/{ReportIndexItem → ReportIndexMain/comps/ReportIndexItem}/ReportIndexItem.d.ts +1 -1
- package/dist/components/common/ReportsIndexPage/comps/{ReportIndexItem → ReportIndexMain/comps/ReportIndexItem}/comps/ReportsCollapseVersionList/ReportsCollapseVersionList.d.ts +1 -1
- package/dist/components/common/ReportsIndexPage/comps/{ReportIndexItem → ReportIndexMain/comps/ReportIndexItem}/comps/ReportsCollapseVersionList/comps/ReportCollapseVersionItem/ReportCollapseVersionItem.d.ts +1 -1
- package/dist/components/common/ReportsIndexPage/comps/ReportIndexMain/comps/index.d.ts +1 -0
- package/dist/components/common/ReportsIndexPage/comps/index.d.ts +1 -1
- package/dist/components/common/ReportsIndexPage/hooks/useReportData.d.ts +10 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +44 -43
- package/dist/main.cjs.js +9 -9
- package/dist/main.es.js +2222 -2179
- package/dist/models/api/reports/ReportDto.d.ts +3 -0
- package/dist/models/api/reports/ReportGroup.d.ts +5 -0
- package/dist/style.css +1 -1
- package/package.json +2 -2
- /package/dist/components/common/ReportsIndexPage/comps/{ReportIndexItem → ReportIndexMain/comps/ReportIndexItem}/comps/ReportsCollapseVersionList/comps/index.d.ts +0 -0
- /package/dist/components/common/ReportsIndexPage/comps/{ReportIndexItem → ReportIndexMain/comps/ReportIndexItem}/comps/index.d.ts +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ReportDto } from '../../../models/index';
|
|
2
2
|
|
|
3
3
|
type Props = {
|
|
4
|
-
groups: number[];
|
|
5
4
|
getReportName: (report: ReportDto) => string;
|
|
6
5
|
getReportDescription: (report: ReportDto) => string;
|
|
7
6
|
getGroupTitle: (group: number) => string;
|
|
@@ -9,7 +8,8 @@ type Props = {
|
|
|
9
8
|
apiUrls?: {
|
|
10
9
|
reportsGet?: string;
|
|
11
10
|
reportsLastUsedGet?: string;
|
|
11
|
+
groupsGet?: string;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
declare const ReportsIndexPage: ({
|
|
14
|
+
declare const ReportsIndexPage: ({ apiUrls: { reportsGet, reportsLastUsedGet, groupsGet, }, getReportName, getReportDescription, getGroupTitle, getReportRoute, }: Props) => import("react").JSX.Element;
|
|
15
15
|
export default ReportsIndexPage;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as ReportGroups } from '../../../../../models/api/reports/ReportGroup';
|
|
2
|
+
import { ReportDto } from '../../../../../models/index';
|
|
3
|
+
import { default as ReportsTexts } from '../../../../../models/texts/ReportsTexts';
|
|
4
|
+
|
|
5
|
+
type ReportIndexMainProps = {
|
|
6
|
+
searchQuery: string;
|
|
7
|
+
setSearchQuery: (query: string) => void;
|
|
8
|
+
reportsTexts: ReportsTexts;
|
|
9
|
+
filteredGroups: number[];
|
|
10
|
+
filteredReports: ReportGroups;
|
|
11
|
+
getGroupTitle: (group: number) => string;
|
|
12
|
+
getReportRoute: (report: ReportDto, reportVersionId?: number) => string;
|
|
13
|
+
getReportName: (report: ReportDto) => string;
|
|
14
|
+
getReportDescription: (report: ReportDto) => string;
|
|
15
|
+
};
|
|
16
|
+
declare const ReportIndexMain: ({ searchQuery, setSearchQuery, reportsTexts, filteredGroups, filteredReports, getGroupTitle, getReportRoute, getReportName, getReportDescription, }: ReportIndexMainProps) => import("react").JSX.Element;
|
|
17
|
+
export default ReportIndexMain;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ReportIndexItem } from './ReportIndexItem/ReportIndexItem';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as ReportsLastUsed } from './ReportsLastUsed/ReportsLastUsed';
|
|
2
|
-
export { default as
|
|
2
|
+
export { default as ReportIndexMain } from './ReportIndexMain/ReportIndexMain';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as ReportGroups } from '../../../../models/api/reports/ReportGroup';
|
|
2
|
+
import { NameIdIntModel, ReportDto } from '../../../../models/index';
|
|
3
|
+
|
|
4
|
+
declare const useReportData: (reportsGet: string, groupsGet: string, getReportName: (report: ReportDto) => string, getReportDescription: (report: ReportDto) => string, debouncedQuery: string) => {
|
|
5
|
+
reports: ReportDto[] | null;
|
|
6
|
+
groupsData: NameIdIntModel[] | null;
|
|
7
|
+
filteredReports: ReportGroups;
|
|
8
|
+
filteredGroups: number[];
|
|
9
|
+
};
|
|
10
|
+
export default useReportData;
|
package/dist/hooks.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./nivo-bar-D9jkkQXQ.cjs"),K=require("./useLocalStorageState-Ckz2EH-e.cjs"),d=require("react"),F=require("./useIsFormDirty-BqN7w6bo.cjs");require("react/jsx-runtime");require("react-router");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./nivo-bar-D9jkkQXQ.cjs"),K=require("./useLocalStorageState-Ckz2EH-e.cjs"),d=require("react"),F=require("./useIsFormDirty-BqN7w6bo.cjs");require("react/jsx-runtime");require("react-router");const H=require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const T=new Map;function Q(t,r){const e=a.useAxios({silent:!0,differentBaseUrl:r==null?void 0:r.customBaseUrl,customToken:r==null?void 0:r.customToken}),s=d.useRef(null);if(!T.has(t)){if(!e.interceptorsUsed)return null;const f=e.get(t).then(n=>(T.set(t,{status:"success",data:n.data}),s.current=setTimeout(()=>{T.delete(t),s.current=null},1e3*10),n.data)).catch(n=>{throw T.set(t,{status:"error",error:n}),s.current=setTimeout(()=>{T.delete(t),s.current=null},1e3*1),n});throw T.set(t,{status:"pending",promise:f}),f}const o=T.get(t);if(o.status==="pending")throw o.promise;if(o.status==="error")throw o.error;return o.data}const _=t=>r=>(window.addEventListener(`storage_${t}`,r),()=>window.removeEventListener(`storage_${t}`,r)),J=(t,r,e)=>{const s=a.compilerRuntimeExports.c(14),o=e===void 0?localStorage:e,[f]=d.useState(r);let n;s[0]!==r?(n=JSON.stringify(r),s[0]=r,s[1]=n):n=s[1];const l=d.useRef(n),w=d.useRef(r);let h;s[2]!==t||s[3]!==f||s[4]!==o?(h=()=>{const g=o.getItem(t);return g!==l.current&&(l.current=g,w.current=l.current?JSON.parse(l.current):f),w.current},s[2]=t,s[3]=f,s[4]=o,s[5]=h):h=s[5];const D=h;let m;s[6]!==t?(m=_(t),s[6]=t,s[7]=m):m=s[7];const y=m,i=d.useSyncExternalStore(y,D);let u;s[8]!==t||s[9]!==o?(u=g=>{o.setItem(t,JSON.stringify(g)),window.dispatchEvent(new Event(`storage_${t}`))},s[8]=t,s[9]=o,s[10]=u):u=s[10];const c=u;let v;return s[11]!==c||s[12]!==i?(v=[i,c],s[11]=c,s[12]=i,s[13]=v):v=s[13],v},M=(t,r,e)=>{let s="pending",o;const f=t.then(n=>{s="success",o=n},n=>{const l=n==null?void 0:n.response;(l==null?void 0:l.status)===404&&e?(s="error-404",o=n):(s="error",o=n)});return()=>{switch(s){case"pending":throw f;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,r)=>{const e=a.compilerRuntimeExports.c(26),{loadOnInit:s,enabled:o,silent:f,nullStateBeforeLoad:n,nullStateOnFail:l,customApiUrl:w,customBearerToken:h,dataTransformer:D,errorBoundaryOn404:m}=r===void 0?b:r,y=s===void 0?b.loadOnInit:s,i=o===void 0?b.enabled:o,u=f===void 0?b.silent:f,c=n===void 0?b.nullStateBeforeLoad:n,v=l===void 0?b.nullStateOnFail:l;let p;e[0]!==m?(p=m?[404]:void 0,e[0]=m,e[1]=p):p=e[1];let g;e[2]!==w||e[3]!==h||e[4]!==u||e[5]!==p?(g={silent:u,customToken:h,differentBaseUrl:w,noToastOnStatus:p},e[2]=w,e[3]=h,e[4]=u,e[5]=p,e[6]=g):g=e[6];const E=a.useAxios(g),{startLoading:I,stopLoading:S}=d.useContext(a.LoadingContext),O=d.useRef(0),{isAuthenticated:P}=a.useAuth(),[R,N]=d.useState(null);let A;e[7]!==E||e[8]!==D||e[9]!==i||e[10]!==m||e[11]!==P||e[12]!==c||e[13]!==v||e[14]!==u||e[15]!==I||e[16]!==S||e[17]!==t?(A=async(x,V)=>{if(!P()||i===!1)return;!u&&I(`loadData-${t}-${V}`),c&&N(null);const U=E.get(t,{signal:x}).then(G=>D?D(G.data):G.data).finally(()=>!u&&S(`loadData-${t}-${V}`));N(M(U,v??!1,m??!1))},e[7]=E,e[8]=D,e[9]=i,e[10]=m,e[11]=P,e[12]=c,e[13]=v,e[14]=u,e[15]=I,e[16]=S,e[17]=t,e[18]=A):A=e[18];const C=A;let q,B;e[19]!==C||e[20]!==y?(B=()=>{if(y===!1)return;const x=new AbortController;return C(x.signal,O.current=O.current+1),()=>{x.abort()}},q=[C,y],e[19]=C,e[20]=y,e[21]=q,e[22]=B):(q=e[21],B=e[22]),d.useEffect(B,q);let L;return e[23]!==R||e[24]!==C?(L={data:R,setData:N,reloadData:C},e[23]=R,e[24]=C,e[25]=L):L=e[25],L},z=()=>{const t=d.useRef({}).current;return d.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%",t.elt=r,document.body.appendChild(r),()=>{document.body.removeChild(r)}},[t]),r=>(e,...s)=>{const o=r(e,...s);return e.draggableProps.style.position==="fixed"?H.createPortal(o,t.elt):o}},$={storageKey:"--tmp-scroll-save--",requiredHeight:100,retryInterval:50},Z=(t,r)=>{const e=a.compilerRuntimeExports.c(18),{storageKey:s,requiredHeight:o,retryInterval:f}=r===void 0?$:r,n=s===void 0?$.storageKey:s,l=o===void 0?$.requiredHeight:o,w=f===void 0?$.retryInterval:f,[h,D]=d.useState(!1),m=d.useRef(null);let y;e[0]!==n?(y=()=>{const S=localStorage.getItem(n);return localStorage.removeItem(n),S===null?null:Number(S)},e[0]=n,e[1]=y):y=e[1];const i=y;let u;e[2]!==n?(u=S=>{localStorage.setItem(n,S)},e[2]=n,e[3]=u):u=e[3];const c=u;let v,p;e[4]!==h||e[5]!==l||e[6]!==i||e[7]!==w||e[8]!==t?(v=()=>{const S=window.setInterval(()=>{if(!h&&t.current!==null&&t.current.getBoundingClientRect().height>l){D(!0);const O=i();O!==null&&t.current.scrollTo({top:O}),window.clearInterval(S)}},w);return()=>{window.clearTimeout(S)}},p=[h,l,i,w,t],e[4]=h,e[5]=l,e[6]=i,e[7]=w,e[8]=t,e[9]=v,e[10]=p):(v=e[9],p=e[10]),d.useEffect(v,p);let g,E;e[11]!==c||e[12]!==t?(g=()=>{var O;const S=new AbortController;return(O=t.current)==null||O.addEventListener("scrollend",()=>{var P;m.current=((P=t.current)==null?void 0:P.scrollTop)??0,c((m.current??0).toString())},{signal:S.signal}),()=>S.abort()},E=[c,t],e[11]=c,e[12]=t,e[13]=g,e[14]=E):(g=e[13],E=e[14]),d.useEffect(g,E);let I;return e[15]!==i||e[16]!==c?(I={saveValue:c,retrieveValue:i},e[15]=i,e[16]=c,e[17]=I):I=e[17],I};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=K.useGetApiData;exports.useLocalStorageState=K.useLocalStorageState;exports.useEmployeePhotoPath=F.useEmployeePhotoPath;exports.useIsFormDirty=F.useIsFormDirty;exports.useSearchQuery=F.useSearchQuery;exports.useSearchQueryState=F.useSearchQueryState;exports.useGetApiDataBound=W;exports.useGetDataBound=Q;exports.usePersistentState=J;exports.useRenderDraggableInPortal=z;exports.useScrollSave=Z;
|
package/dist/hooks.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ao as
|
|
2
|
-
import { bS as
|
|
1
|
+
import { ao as H, c as V, aq as J, bd as Q } from "./nivo-bar-CyXsS9At.js";
|
|
2
|
+
import { bS as mt, aR as gt, bU as pt, an as vt, bT as St, b7 as ht, ar as wt, bv as bt, am as yt, aG as It, aU as Ot } from "./nivo-bar-CyXsS9At.js";
|
|
3
3
|
import { u as Ct, a as Et } from "./useLocalStorageState-aZb0PB2o.js";
|
|
4
|
-
import { useRef as D, useState as
|
|
4
|
+
import { useRef as D, useState as q, useSyncExternalStore as W, useContext as z, useEffect as U } from "react";
|
|
5
5
|
import { c as xt, u as Bt, a as Lt, b as $t } from "./useIsFormDirty-B7rzoRSx.js";
|
|
6
6
|
import "react/jsx-runtime";
|
|
7
7
|
import "react-router";
|
|
@@ -12,55 +12,56 @@ import "@azure/msal-browser";
|
|
|
12
12
|
import "@azure/msal-react";
|
|
13
13
|
const T = /* @__PURE__ */ new Map();
|
|
14
14
|
function at(e, n) {
|
|
15
|
-
const t =
|
|
15
|
+
const t = H({
|
|
16
16
|
silent: !0,
|
|
17
17
|
differentBaseUrl: n == null ? void 0 : n.customBaseUrl,
|
|
18
18
|
customToken: n == null ? void 0 : n.customToken
|
|
19
19
|
}), s = D(null);
|
|
20
|
-
if (!t.interceptorsUsed)
|
|
21
|
-
return null;
|
|
22
20
|
if (!T.has(e)) {
|
|
21
|
+
if (!t.interceptorsUsed)
|
|
22
|
+
return null;
|
|
23
23
|
const c = t.get(e).then((r) => (T.set(e, {
|
|
24
24
|
status: "success",
|
|
25
25
|
data: r.data
|
|
26
26
|
}), s.current = setTimeout(() => {
|
|
27
27
|
T.delete(e), s.current = null;
|
|
28
|
-
},
|
|
28
|
+
}, 1e3 * 10), r.data)).catch((r) => {
|
|
29
29
|
throw T.set(e, {
|
|
30
30
|
status: "error",
|
|
31
31
|
error: r
|
|
32
32
|
}), s.current = setTimeout(() => {
|
|
33
33
|
T.delete(e), s.current = null;
|
|
34
|
-
}, 1e3), r;
|
|
34
|
+
}, 1e3 * 1), r;
|
|
35
35
|
});
|
|
36
36
|
throw T.set(e, {
|
|
37
|
-
status: "pending"
|
|
37
|
+
status: "pending",
|
|
38
|
+
promise: c
|
|
38
39
|
}), c;
|
|
39
40
|
}
|
|
40
41
|
const o = T.get(e);
|
|
41
42
|
if (o.status === "pending")
|
|
42
|
-
throw
|
|
43
|
+
throw o.promise;
|
|
43
44
|
if (o.status === "error")
|
|
44
45
|
throw o.error;
|
|
45
46
|
return o.data;
|
|
46
47
|
}
|
|
47
48
|
const R = (e) => (n) => (window.addEventListener(`storage_${e}`, n), () => window.removeEventListener(`storage_${e}`, n)), lt = (e, n, t) => {
|
|
48
|
-
const s = V.c(14), o = t === void 0 ? localStorage : t, [c] =
|
|
49
|
+
const s = V.c(14), o = t === void 0 ? localStorage : t, [c] = q(n);
|
|
49
50
|
let r;
|
|
50
51
|
s[0] !== n ? (r = JSON.stringify(n), s[0] = n, s[1] = r) : r = s[1];
|
|
51
52
|
const l = D(r), S = D(n);
|
|
52
53
|
let g;
|
|
53
54
|
s[2] !== e || s[3] !== c || s[4] !== o ? (g = () => {
|
|
54
|
-
const
|
|
55
|
-
return
|
|
55
|
+
const f = o.getItem(e);
|
|
56
|
+
return f !== l.current && (l.current = f, S.current = l.current ? JSON.parse(l.current) : c), S.current;
|
|
56
57
|
}, s[2] = e, s[3] = c, s[4] = o, s[5] = g) : g = s[5];
|
|
57
58
|
const w = g;
|
|
58
59
|
let d;
|
|
59
60
|
s[6] !== e ? (d = R(e), s[6] = e, s[7] = d) : d = s[7];
|
|
60
61
|
const u = W(d, w);
|
|
61
62
|
let a;
|
|
62
|
-
s[8] !== e || s[9] !== o ? (a = (
|
|
63
|
-
o.setItem(e, JSON.stringify(
|
|
63
|
+
s[8] !== e || s[9] !== o ? (a = (f) => {
|
|
64
|
+
o.setItem(e, JSON.stringify(f)), window.dispatchEvent(new Event(`storage_${e}`));
|
|
64
65
|
}, s[8] = e, s[9] = o, s[10] = a) : a = s[10];
|
|
65
66
|
const i = a;
|
|
66
67
|
let p;
|
|
@@ -108,29 +109,29 @@ const R = (e) => (n) => (window.addEventListener(`storage_${e}`, n), () => windo
|
|
|
108
109
|
} = n === void 0 ? E : n, h = s === void 0 ? E.loadOnInit : s, u = o === void 0 ? E.enabled : o, a = c === void 0 ? E.silent : c, i = r === void 0 ? E.nullStateBeforeLoad : r, p = l === void 0 ? E.nullStateOnFail : l;
|
|
109
110
|
let v;
|
|
110
111
|
t[0] !== d ? (v = d ? [404] : void 0, t[0] = d, t[1] = v) : v = t[1];
|
|
111
|
-
let
|
|
112
|
-
t[2] !== S || t[3] !== g || t[4] !== a || t[5] !== v ? (
|
|
112
|
+
let f;
|
|
113
|
+
t[2] !== S || t[3] !== g || t[4] !== a || t[5] !== v ? (f = {
|
|
113
114
|
silent: a,
|
|
114
115
|
customToken: g,
|
|
115
116
|
differentBaseUrl: S,
|
|
116
117
|
noToastOnStatus: v
|
|
117
|
-
}, t[2] = S, t[3] = g, t[4] = a, t[5] = v, t[6] =
|
|
118
|
-
const b =
|
|
118
|
+
}, t[2] = S, t[3] = g, t[4] = a, t[5] = v, t[6] = f) : f = t[6];
|
|
119
|
+
const b = H(f), {
|
|
119
120
|
startLoading: y,
|
|
120
|
-
stopLoading:
|
|
121
|
+
stopLoading: m
|
|
121
122
|
} = z(J), I = D(0), {
|
|
122
123
|
isAuthenticated: C
|
|
123
|
-
} = Q(), [F, N] =
|
|
124
|
+
} = Q(), [F, N] = q(null);
|
|
124
125
|
let x;
|
|
125
|
-
t[7] !== b || t[8] !== w || t[9] !== u || t[10] !== d || t[11] !== C || t[12] !== i || t[13] !== p || t[14] !== a || t[15] !== y || t[16] !==
|
|
126
|
+
t[7] !== b || t[8] !== w || t[9] !== u || t[10] !== d || t[11] !== C || t[12] !== i || t[13] !== p || t[14] !== a || t[15] !== y || t[16] !== m || t[17] !== e ? (x = async (P, K) => {
|
|
126
127
|
if (!C() || u === !1)
|
|
127
128
|
return;
|
|
128
|
-
!a && y(`loadData-${e}-${
|
|
129
|
-
const
|
|
129
|
+
!a && y(`loadData-${e}-${K}`), i && N(null);
|
|
130
|
+
const _ = b.get(e, {
|
|
130
131
|
signal: P
|
|
131
|
-
}).then((
|
|
132
|
-
N(Z(
|
|
133
|
-
}, t[7] = b, t[8] = w, t[9] = u, t[10] = d, t[11] = C, t[12] = i, t[13] = p, t[14] = a, t[15] = y, t[16] =
|
|
132
|
+
}).then((G) => w ? w(G.data) : G.data).finally(() => !a && m(`loadData-${e}-${K}`));
|
|
133
|
+
N(Z(_, p ?? !1, d ?? !1));
|
|
134
|
+
}, t[7] = b, t[8] = w, t[9] = u, t[10] = d, t[11] = C, t[12] = i, t[13] = p, t[14] = a, t[15] = y, t[16] = m, t[17] = e, t[18] = x) : x = t[18];
|
|
134
135
|
const O = x;
|
|
135
136
|
let B, L;
|
|
136
137
|
t[19] !== O || t[20] !== h ? (L = () => {
|
|
@@ -167,44 +168,44 @@ const R = (e) => (n) => (window.addEventListener(`storage_${e}`, n), () => windo
|
|
|
167
168
|
storageKey: s,
|
|
168
169
|
requiredHeight: o,
|
|
169
170
|
retryInterval: c
|
|
170
|
-
} = n === void 0 ? A : n, r = s === void 0 ? A.storageKey : s, l = o === void 0 ? A.requiredHeight : o, S = c === void 0 ? A.retryInterval : c, [g, w] =
|
|
171
|
+
} = n === void 0 ? A : n, r = s === void 0 ? A.storageKey : s, l = o === void 0 ? A.requiredHeight : o, S = c === void 0 ? A.retryInterval : c, [g, w] = q(!1), d = D(null);
|
|
171
172
|
let h;
|
|
172
173
|
t[0] !== r ? (h = () => {
|
|
173
|
-
const
|
|
174
|
-
return localStorage.removeItem(r),
|
|
174
|
+
const m = localStorage.getItem(r);
|
|
175
|
+
return localStorage.removeItem(r), m === null ? null : Number(m);
|
|
175
176
|
}, t[0] = r, t[1] = h) : h = t[1];
|
|
176
177
|
const u = h;
|
|
177
178
|
let a;
|
|
178
|
-
t[2] !== r ? (a = (
|
|
179
|
-
localStorage.setItem(r,
|
|
179
|
+
t[2] !== r ? (a = (m) => {
|
|
180
|
+
localStorage.setItem(r, m);
|
|
180
181
|
}, t[2] = r, t[3] = a) : a = t[3];
|
|
181
182
|
const i = a;
|
|
182
183
|
let p, v;
|
|
183
184
|
t[4] !== g || t[5] !== l || t[6] !== u || t[7] !== S || t[8] !== e ? (p = () => {
|
|
184
|
-
const
|
|
185
|
+
const m = window.setInterval(() => {
|
|
185
186
|
if (!g && e.current !== null && e.current.getBoundingClientRect().height > l) {
|
|
186
187
|
w(!0);
|
|
187
188
|
const I = u();
|
|
188
189
|
I !== null && e.current.scrollTo({
|
|
189
190
|
top: I
|
|
190
|
-
}), window.clearInterval(
|
|
191
|
+
}), window.clearInterval(m);
|
|
191
192
|
}
|
|
192
193
|
}, S);
|
|
193
194
|
return () => {
|
|
194
|
-
window.clearTimeout(
|
|
195
|
+
window.clearTimeout(m);
|
|
195
196
|
};
|
|
196
197
|
}, v = [g, l, u, S, e], t[4] = g, t[5] = l, t[6] = u, t[7] = S, t[8] = e, t[9] = p, t[10] = v) : (p = t[9], v = t[10]), U(p, v);
|
|
197
|
-
let
|
|
198
|
-
t[11] !== i || t[12] !== e ? (
|
|
198
|
+
let f, b;
|
|
199
|
+
t[11] !== i || t[12] !== e ? (f = () => {
|
|
199
200
|
var I;
|
|
200
|
-
const
|
|
201
|
+
const m = new AbortController();
|
|
201
202
|
return (I = e.current) == null || I.addEventListener("scrollend", () => {
|
|
202
203
|
var C;
|
|
203
204
|
d.current = ((C = e.current) == null ? void 0 : C.scrollTop) ?? 0, i((d.current ?? 0).toString());
|
|
204
205
|
}, {
|
|
205
|
-
signal:
|
|
206
|
-
}), () =>
|
|
207
|
-
}, b = [i, e], t[11] = i, t[12] = e, t[13] =
|
|
206
|
+
signal: m.signal
|
|
207
|
+
}), () => m.abort();
|
|
208
|
+
}, b = [i, e], t[11] = i, t[12] = e, t[13] = f, t[14] = b) : (f = t[13], b = t[14]), U(f, b);
|
|
208
209
|
let y;
|
|
209
210
|
return t[15] !== u || t[16] !== i ? (y = {
|
|
210
211
|
saveValue: i,
|
|
@@ -212,9 +213,9 @@ const R = (e) => (n) => (window.addEventListener(`storage_${e}`, n), () => windo
|
|
|
212
213
|
}, t[15] = u, t[16] = i, t[17] = y) : y = t[17], y;
|
|
213
214
|
};
|
|
214
215
|
export {
|
|
215
|
-
|
|
216
|
+
mt as cancelToken,
|
|
216
217
|
Q as useAuth,
|
|
217
|
-
|
|
218
|
+
H as useAxios,
|
|
218
219
|
gt as useClickOutside,
|
|
219
220
|
pt as useClipboard,
|
|
220
221
|
vt as useConfirm,
|