react-luminus-components 1.3.53 → 1.3.54

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.
@@ -27,18 +27,18 @@
27
27
  "_nivo-pie.es-BehAujJ2.cjs"
28
28
  ]
29
29
  },
30
- "_dateUtils-C1hdRN9v.js": {
31
- "file": "dateUtils-C1hdRN9v.js",
30
+ "_dateUtils-C3diP-K2.cjs": {
31
+ "file": "dateUtils-C3diP-K2.cjs",
32
32
  "name": "dateUtils",
33
33
  "imports": [
34
- "_nivo-pie.es--oXJjsfy.js"
34
+ "_nivo-pie.es-BehAujJ2.cjs"
35
35
  ]
36
36
  },
37
- "_dateUtils-DYvDmQHJ.cjs": {
38
- "file": "dateUtils-DYvDmQHJ.cjs",
37
+ "_dateUtils-Cl2asrFg.js": {
38
+ "file": "dateUtils-Cl2asrFg.js",
39
39
  "name": "dateUtils",
40
40
  "imports": [
41
- "_nivo-pie.es-BehAujJ2.cjs"
41
+ "_nivo-pie.es--oXJjsfy.js"
42
42
  ]
43
43
  },
44
44
  "_nivo-pie.es--oXJjsfy.js": {
@@ -85,15 +85,15 @@
85
85
  "file": "useEmployeePhotoPath-DjxgOb6H.js",
86
86
  "name": "useEmployeePhotoPath"
87
87
  },
88
- "_useLocalStorageState-DWbVoRAx.js": {
89
- "file": "useLocalStorageState-DWbVoRAx.js",
88
+ "_useLocalStorageState-CgLMkNbU.js": {
89
+ "file": "useLocalStorageState-CgLMkNbU.js",
90
90
  "name": "useLocalStorageState",
91
91
  "imports": [
92
92
  "_nivo-pie.es--oXJjsfy.js"
93
93
  ]
94
94
  },
95
- "_useLocalStorageState-DfNJr0hH.cjs": {
96
- "file": "useLocalStorageState-DfNJr0hH.cjs",
95
+ "_useLocalStorageState-D9nsPMRG.cjs": {
96
+ "file": "useLocalStorageState-D9nsPMRG.cjs",
97
97
  "name": "useLocalStorageState",
98
98
  "imports": [
99
99
  "_nivo-pie.es-BehAujJ2.cjs"
@@ -122,8 +122,8 @@
122
122
  "_nivo-pie.es-BehAujJ2.cjs",
123
123
  "_useConfirm-C1L3EWPP.cjs",
124
124
  "_PrimaryButton-BFR7py-F.cjs",
125
- "_useLocalStorageState-DfNJr0hH.cjs",
126
- "_dateUtils-DYvDmQHJ.cjs"
125
+ "_useLocalStorageState-D9nsPMRG.cjs",
126
+ "_dateUtils-C3diP-K2.cjs"
127
127
  ]
128
128
  },
129
129
  "src/hooks/index.ts": {
@@ -134,8 +134,8 @@
134
134
  "imports": [
135
135
  "_nivo-pie.es-BehAujJ2.cjs",
136
136
  "_useConfirm-C1L3EWPP.cjs",
137
- "_useLocalStorageState-DfNJr0hH.cjs",
138
- "_dateUtils-DYvDmQHJ.cjs",
137
+ "_useLocalStorageState-D9nsPMRG.cjs",
138
+ "_dateUtils-C3diP-K2.cjs",
139
139
  "_useEmployeePhotoPath-BgHzjvUU.cjs",
140
140
  "_usePermissions-D4uO_uyT.cjs"
141
141
  ]
@@ -159,7 +159,7 @@
159
159
  "imports": [
160
160
  "_nivo-pie.es-BehAujJ2.cjs",
161
161
  "_PrimaryButton-BFR7py-F.cjs",
162
- "_dateUtils-DYvDmQHJ.cjs",
162
+ "_dateUtils-C3diP-K2.cjs",
163
163
  "_SimpleTooltip-XWVJvT4P.cjs",
164
164
  "_useEmployeePhotoPath-BgHzjvUU.cjs",
165
165
  "_useConfirm-C1L3EWPP.cjs",
@@ -173,7 +173,7 @@
173
173
  "isEntry": true,
174
174
  "imports": [
175
175
  "_nivo-pie.es-BehAujJ2.cjs",
176
- "_dateUtils-DYvDmQHJ.cjs",
176
+ "_dateUtils-C3diP-K2.cjs",
177
177
  "_searchUtils-BWbFBdlA.cjs",
178
178
  "_SimpleTooltip-XWVJvT4P.cjs"
179
179
  ]
@@ -1,4 +1,3 @@
1
- import { NameIdIntModel } from '../../models/index';
2
1
  import { GenericAbortSignal } from 'axios';
3
2
  import { Dispatch, SetStateAction } from 'react';
4
3
 
@@ -15,8 +14,8 @@ interface UserDelegationModel {
15
14
  to: string | null;
16
15
  }
17
16
  export interface IDelegationContext {
18
- delegation: NameIdIntModel | null;
19
- setDelegation: Dispatch<SetStateAction<NameIdIntModel | null>>;
17
+ delegation: UserDelegationModel | null;
18
+ setDelegation: Dispatch<SetStateAction<UserDelegationModel | null>>;
20
19
  availableDelegations: UserDelegationModel[] | null;
21
20
  setAvailableDelegations: React.Dispatch<React.SetStateAction<UserDelegationModel[] | null>>;
22
21
  refreshAvailableDelegations: (signal?: GenericAbortSignal, loadCallCount?: number) => Promise<void>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-pie.es-BehAujJ2.cjs"),t=require("react"),v=require("@azure/msal-browser"),w=require("@azure/msal-react");require("react-router-dom");require("react-hook-form");const I=require("./useConfirm-C1L3EWPP.cjs"),d=require("./PrimaryButton-BFR7py-F.cjs"),S=require("./useLocalStorageState-DfNJr0hH.cjs"),M=require("./dateUtils-DYvDmQHJ.cjs"),T=({children:s})=>{const[u,a]=t.useState(!1),[r,n]=t.useState(""),o=t.useCallback(c=>{a(!0),n(c)},[]),l=t.useCallback(()=>{a(!1)},[]),i=t.useMemo(()=>({show:u,text:r,showConfirm:o,hideConfirm:l}),[u,r,o,l]);return e.jsxRuntimeExports.jsxs(e.ConfirmContext.Provider,{value:i,children:[e.jsxRuntimeExports.jsx(_,{}),s]})},D=()=>{const{texts:{confirm:s}}=t.useContext(e.LuminusComponentsContext),{isShown:u,text:a,onFinish:r}=S.usePrompt(),{options:n}=t.useContext(e.PromptContext),[o,l]=t.useState(n.defaultValue??""),i=t.useCallback(()=>{r(null)},[r]),c=t.useCallback(m=>{m.preventDefault(),!(n.required&&!o)&&r(o)},[r,n.required,o]);t.useEffect(()=>{u===!0&&l(n.defaultValue??"")},[u,n.defaultValue]);const C=t.useMemo(()=>({value:o,onChange:m=>l(m.currentTarget.value),className:"w-100",autoFocus:!0,tabIndex:0}),[o]);return e.jsxRuntimeExports.jsxs(d.Modal,{show:u,size:"sm",centered:!0,onHide:i,children:[e.jsxRuntimeExports.jsx(d.Modal.Header,{className:"justify-content-center",children:e.jsxRuntimeExports.jsx(d.Modal.Title,{children:a})}),e.jsxRuntimeExports.jsxs("form",{onSubmit:c,children:[e.jsxRuntimeExports.jsxs(d.Modal.Body,{children:[n.input==="textarea"?e.jsxRuntimeExports.jsx("textarea",{...C,rows:5}):void 0,n.input==="input"?e.jsxRuntimeExports.jsx(d.FormControl,{...C,type:n.type}):void 0]}),e.jsxRuntimeExports.jsxs(d.Modal.Footer,{className:"w-100 d-flex gap-5",children:[e.jsxRuntimeExports.jsx(d.PrimaryButton,{variant:"outlined",color:"secondary",onClick:i,className:"flex-grow-1",children:s.cancel}),e.jsxRuntimeExports.jsx(d.PrimaryButton,{color:"primary",disabled:n.required&&!o,type:"submit",className:"flex-grow-1",children:s.confirm})]})]})]})},A=({children:s})=>{const[u,a]=t.useState(!1),[r,n]=t.useState(""),[o,l]=t.useState({input:"textarea",type:"text"}),i=t.useRef(()=>{}),c=t.useCallback(L=>{n(L),a(!0)},[]),C=t.useCallback(()=>{a(!1)},[]),m=t.useMemo(()=>({isShown:u,text:r,showPrompt:c,hidePrompt:C,resolveRef:i,options:o,setOptions:l}),[u,r,c,C,o]);return e.jsxRuntimeExports.jsxs(e.PromptContext.Provider,{value:m,children:[s,e.jsxRuntimeExports.jsx(D,{})]})},N=({cookieDomain:s,axiosOptions:u,language:a,texts:r,ProjectIconComponent:n,localizationContext:o,chartColorPalette:l,children:i})=>{const c=t.useMemo(()=>({axiosOptions:u,cookieDomain:s,language:a,texts:r,ProjectIconComponent:n,localizationContext:o,chartColorPalette:l}),[u,s,a,n,o,r,l]);return e.jsxRuntimeExports.jsx(e.LuminusComponentsContext.Provider,{value:c,children:e.jsxRuntimeExports.jsx(T,{children:e.jsxRuntimeExports.jsxs(A,{children:[e.jsxRuntimeExports.jsx(e.Ie,{}),i]})})})},U=({children:s})=>{const[u,a]=t.useState(!1),[r]=t.useState(new Set),n=t.useCallback(i=>{r.add(i),a(!0)},[r]),o=t.useCallback(i=>{r.delete(i),r.size===0&&a(!1)},[r]),l=t.useMemo(()=>({isLoading:u,startLoading:n,stopLoading:o}),[u,n,o]);return e.jsxRuntimeExports.jsxs(e.LoadingContext.Provider,{value:l,children:[u&&e.jsxRuntimeExports.jsx(d.Loading,{}),s]})},O=({children:s})=>{const u=e.useAxios(),{msalInstance:a}=t.useContext(e.AuthContext),{delegation:r,setDelegation:n,setAvailableDelegations:o,refreshAvailableDelegations:l}=t.useContext(e.DelegationContext),{getToken:i}=e.useAuth(),[c,C]=t.useState(null),m=t.useCallback(async()=>{const x=await i();x&&C(x)},[i]);t.useEffect(()=>{m()},[m]);const R=t.useCallback(()=>{const x=localStorage.getItem("user")??null;return x?JSON.parse(x??""):null},[])(),[p,h]=t.useState({state:R?e.LoginState.LOGGED_IN:e.LoginState.LOGGING_IN,user:R}),y=t.useCallback(async x=>{let f=null;return await u.get("/user/detail",x?{headers:{Authorization:`Bearer ${x}`}}:void 0).then(E=>{f=E.data}).catch(()=>{f=null}),f},[u]),b=t.useCallback(()=>{localStorage.removeItem("user"),h({state:e.LoginState.LOGGED_OUT,user:null}),n(null),o(null)},[o,n]),j=t.useCallback(async x=>{h({state:e.LoginState.LOGGING_IN,user:null});const f=await y(x);return f?(h({state:e.LoginState.LOGGED_IN,user:f}),localStorage.setItem("user",JSON.stringify(f)),await l(),!0):(h({state:e.LoginState.LOGIN_FAILED,user:null}),!1)},[y,l]),g=t.useCallback(()=>{b()},[b]);t.useEffect(()=>{if(a){const x=a.addEventCallback(f=>{if(f.eventType===v.EventType.LOGIN_SUCCESS&&f.payload){const E=f.payload;C(E.accessToken)}});return()=>{x&&a.removeEventCallback(x)}}return()=>{}},[a,j,g]);const P=t.useCallback(async x=>{x&&await j(x).catch(()=>{g(),n(null)})},[j,g,n]);t.useEffect(()=>{P(c)},[c,r==null?void 0:r.id,P]);const k=t.useMemo(()=>({user:p.user,userLoginState:p,loginUser:j,logoutUser:g}),[p,j,g]);return e.jsxRuntimeExports.jsx(e.UserContext.Provider,{value:k,children:s})},G=({...s})=>{const{cookieDomain:u}=t.useContext(e.LuminusComponentsContext),[,a]=e.useCookies(["Authorization"]),r=t.useMemo(()=>({useMsal:s.useMsal??!1,msalInstance:s.useMsal?s.msalInstance??null:null,msalScopes:s.useMsal?s.msalScopes??[]:[]}),[s]);return t.useEffect(()=>{if(s.useMsal){const n=s.msalInstance.addEventCallback(o=>{if(o.eventType===v.EventType.LOGIN_SUCCESS||o.eventType===v.EventType.ACQUIRE_TOKEN_SUCCESS&&o.payload){const l=o.payload,i=l.account;s.msalInstance.setActiveAccount(i);const c=l.accessToken,C=l.expiresOn;a("Authorization",c,{path:"/",secure:!0,sameSite:"none",domain:u,expires:C??void 0})}o.error&&console.error("AuthProvider MSAL Error",o)});return()=>{n&&s.msalInstance.removeEventCallback(n)}}return()=>{}},[s,a,u]),e.jsxRuntimeExports.jsx(e.AuthContext.Provider,{value:r,children:s.useMsal?e.jsxRuntimeExports.jsx(w.MsalProvider,{instance:s.msalInstance,children:s.children}):s.children})},q=({children:s,relativeEndpoint:u})=>{const[a,r,n]=S.useLocalStorageState("user-delegation",null),{data:o,setData:l,reloadData:i}=S.useGetApiData(u,{nullStateBeforeLoad:!1,nullStateOnFail:!0}),c=t.useRef(null);t.useEffect(()=>{const m=()=>{i(),c.current=window.setTimeout(m,M.msToStartOfNextDay()+5e3)};return m(),()=>{c.current!==null&&window.clearTimeout(c.current)}},[i]),t.useEffect(()=>{const m=()=>{n()};return window.addEventListener("focus",m),()=>{window.removeEventListener("focus",m)}},[n,i]);const C=t.useMemo(()=>({delegation:a,setDelegation:r,availableDelegations:o,setAvailableDelegations:l,refreshAvailableDelegations:i}),[a,r,o,l,i]);return e.jsxRuntimeExports.jsx(e.DelegationContext.Provider,{value:C,children:s})},_=()=>{const{texts:{confirm:s}}=t.useContext(e.LuminusComponentsContext),{onConfirm:u,onCancel:a,text:r,show:n}=I.useConfirm();return e.jsxRuntimeExports.jsxs(d.Modal,{show:n,size:"sm",centered:!0,onHide:a,children:[e.jsxRuntimeExports.jsx(d.Modal.Header,{className:"justify-content-center",children:e.jsxRuntimeExports.jsx(d.Modal.Title,{children:r})}),e.jsxRuntimeExports.jsx(d.Modal.Body,{children:e.jsxRuntimeExports.jsxs("div",{className:"w-100 d-flex gap-5",children:[e.jsxRuntimeExports.jsx(d.PrimaryButton,{type:"button",variant:"outlined",color:"secondary",className:"w-100",onClick:a,children:s.no}),e.jsxRuntimeExports.jsx(d.PrimaryButton,{type:"button",color:"primary",onClick:u,className:"w-100 ml",children:s.yes})]})})]})};exports.AuthContext=e.AuthContext;exports.DelegationContext=e.DelegationContext;exports.LoadingContext=e.LoadingContext;exports.LuminusComponentsContext=e.LuminusComponentsContext;exports.UserContext=e.UserContext;exports.AuthProvider=G;exports.DelegationProvider=q;exports.LoadingProvider=U;exports.LuminusComponentsProvider=N;exports.UserProvider=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-pie.es-BehAujJ2.cjs"),t=require("react"),L=require("@azure/msal-browser"),k=require("@azure/msal-react");require("react-router-dom");require("react-hook-form");const I=require("./useConfirm-C1L3EWPP.cjs"),d=require("./PrimaryButton-BFR7py-F.cjs"),R=require("./useLocalStorageState-D9nsPMRG.cjs"),S=require("./dateUtils-C3diP-K2.cjs");function T(s){const u=e.toDate(s);return u.setHours(23,59,59,999),u}function M(){return T(Date.now())}function A(s,u){const n=+e.toDate(s),[o,r]=[+e.toDate(u.start),+e.toDate(u.end)].sort((a,i)=>a-i);return n>=o&&n<=r}function O(){return S.startOfDay(Date.now())}const N=({children:s})=>{const[u,n]=t.useState(!1),[o,r]=t.useState(""),a=t.useCallback(c=>{n(!0),r(c)},[]),i=t.useCallback(()=>{n(!1)},[]),l=t.useMemo(()=>({show:u,text:o,showConfirm:a,hideConfirm:i}),[u,o,a,i]);return e.jsxRuntimeExports.jsxs(e.ConfirmContext.Provider,{value:l,children:[e.jsxRuntimeExports.jsx(H,{}),s]})},U=()=>{const{texts:{confirm:s}}=t.useContext(e.LuminusComponentsContext),{isShown:u,text:n,onFinish:o}=R.usePrompt(),{options:r}=t.useContext(e.PromptContext),[a,i]=t.useState(r.defaultValue??""),l=t.useCallback(()=>{o(null)},[o]),c=t.useCallback(C=>{C.preventDefault(),!(r.required&&!a)&&o(a)},[o,r.required,a]);t.useEffect(()=>{u===!0&&i(r.defaultValue??"")},[u,r.defaultValue]);const m=t.useMemo(()=>({value:a,onChange:C=>i(C.currentTarget.value),className:"w-100",autoFocus:!0,tabIndex:0}),[a]);return e.jsxRuntimeExports.jsxs(d.Modal,{show:u,size:"sm",centered:!0,onHide:l,children:[e.jsxRuntimeExports.jsx(d.Modal.Header,{className:"justify-content-center",children:e.jsxRuntimeExports.jsx(d.Modal.Title,{children:n})}),e.jsxRuntimeExports.jsxs("form",{onSubmit:c,children:[e.jsxRuntimeExports.jsxs(d.Modal.Body,{children:[r.input==="textarea"?e.jsxRuntimeExports.jsx("textarea",{...m,rows:5}):void 0,r.input==="input"?e.jsxRuntimeExports.jsx(d.FormControl,{...m,type:r.type}):void 0]}),e.jsxRuntimeExports.jsxs(d.Modal.Footer,{className:"w-100 d-flex gap-5",children:[e.jsxRuntimeExports.jsx(d.PrimaryButton,{variant:"outlined",color:"secondary",onClick:l,className:"flex-grow-1",children:s.cancel}),e.jsxRuntimeExports.jsx(d.PrimaryButton,{color:"primary",disabled:r.required&&!a,type:"submit",className:"flex-grow-1",children:s.confirm})]})]})]})},G=({children:s})=>{const[u,n]=t.useState(!1),[o,r]=t.useState(""),[a,i]=t.useState({input:"textarea",type:"text"}),l=t.useRef(()=>{}),c=t.useCallback(j=>{r(j),n(!0)},[]),m=t.useCallback(()=>{n(!1)},[]),C=t.useMemo(()=>({isShown:u,text:o,showPrompt:c,hidePrompt:m,resolveRef:l,options:a,setOptions:i}),[u,o,c,m,a]);return e.jsxRuntimeExports.jsxs(e.PromptContext.Provider,{value:C,children:[s,e.jsxRuntimeExports.jsx(U,{})]})},q=({cookieDomain:s,axiosOptions:u,language:n,texts:o,ProjectIconComponent:r,localizationContext:a,chartColorPalette:i,children:l})=>{const c=t.useMemo(()=>({axiosOptions:u,cookieDomain:s,language:n,texts:o,ProjectIconComponent:r,localizationContext:a,chartColorPalette:i}),[u,s,n,r,a,o,i]);return e.jsxRuntimeExports.jsx(e.LuminusComponentsContext.Provider,{value:c,children:e.jsxRuntimeExports.jsx(N,{children:e.jsxRuntimeExports.jsxs(G,{children:[e.jsxRuntimeExports.jsx(e.Ie,{}),l]})})})},_=({children:s})=>{const[u,n]=t.useState(!1),[o]=t.useState(new Set),r=t.useCallback(l=>{o.add(l),n(!0)},[o]),a=t.useCallback(l=>{o.delete(l),o.size===0&&n(!1)},[o]),i=t.useMemo(()=>({isLoading:u,startLoading:r,stopLoading:a}),[u,r,a]);return e.jsxRuntimeExports.jsxs(e.LoadingContext.Provider,{value:i,children:[u&&e.jsxRuntimeExports.jsx(d.Loading,{}),s]})},B=({children:s})=>{const u=e.useAxios(),{msalInstance:n}=t.useContext(e.AuthContext),{delegation:o,setDelegation:r,setAvailableDelegations:a,refreshAvailableDelegations:i}=t.useContext(e.DelegationContext),{getToken:l}=e.useAuth(),[c,m]=t.useState(null),C=t.useCallback(async()=>{const x=await l();x&&m(x)},[l]);t.useEffect(()=>{C()},[C]);const h=t.useCallback(()=>{const x=localStorage.getItem("user")??null;return x?JSON.parse(x??""):null},[])(),[v,E]=t.useState({state:h?e.LoginState.LOGGED_IN:e.LoginState.LOGGING_IN,user:h}),w=t.useCallback(async x=>{let f=null;return await u.get("/user/detail",x?{headers:{Authorization:`Bearer ${x}`}}:void 0).then(y=>{f=y.data}).catch(()=>{f=null}),f},[u]),D=t.useCallback(()=>{localStorage.removeItem("user"),E({state:e.LoginState.LOGGED_OUT,user:null}),r(null),a(null)},[a,r]),g=t.useCallback(async x=>{E({state:e.LoginState.LOGGING_IN,user:null});const f=await w(x);return f?(E({state:e.LoginState.LOGGED_IN,user:f}),localStorage.setItem("user",JSON.stringify(f)),await i(),!0):(E({state:e.LoginState.LOGIN_FAILED,user:null}),!1)},[w,i]),p=t.useCallback(()=>{D()},[D]);t.useEffect(()=>{if(n){const x=n.addEventCallback(f=>{if(f.eventType===L.EventType.LOGIN_SUCCESS&&f.payload){const y=f.payload;m(y.accessToken)}});return()=>{x&&n.removeEventCallback(x)}}return()=>{}},[n,g,p]);const b=t.useCallback(async x=>{x&&await g(x).catch(()=>{p(),r(null)})},[g,p,r]);t.useEffect(()=>{b(c)},[c,o==null?void 0:o.id,b]);const P=t.useMemo(()=>({user:v.user,userLoginState:v,loginUser:g,logoutUser:p}),[v,g,p]);return e.jsxRuntimeExports.jsx(e.UserContext.Provider,{value:P,children:s})},z=({...s})=>{const{cookieDomain:u}=t.useContext(e.LuminusComponentsContext),[,n]=e.useCookies(["Authorization"]),o=t.useMemo(()=>({useMsal:s.useMsal??!1,msalInstance:s.useMsal?s.msalInstance??null:null,msalScopes:s.useMsal?s.msalScopes??[]:[]}),[s]);return t.useEffect(()=>{if(s.useMsal){const r=s.msalInstance.addEventCallback(a=>{if(a.eventType===L.EventType.LOGIN_SUCCESS||a.eventType===L.EventType.ACQUIRE_TOKEN_SUCCESS&&a.payload){const i=a.payload,l=i.account;s.msalInstance.setActiveAccount(l);const c=i.accessToken,m=i.expiresOn;n("Authorization",c,{path:"/",secure:!0,sameSite:"none",domain:u,expires:m??void 0})}a.error&&console.error("AuthProvider MSAL Error",a)});return()=>{r&&s.msalInstance.removeEventCallback(r)}}return()=>{}},[s,n,u]),e.jsxRuntimeExports.jsx(e.AuthContext.Provider,{value:o,children:s.useMsal?e.jsxRuntimeExports.jsx(k.MsalProvider,{instance:s.msalInstance,children:s.children}):s.children})},F=({children:s,relativeEndpoint:u})=>{const[n,o,r]=R.useLocalStorageState("user-delegation",null),a=t.useMemo(()=>{if(!n)return null;const j=n.from?S.parseISO(n.from):O(),h=n.to?S.parseISO(n.to):M();return A(new Date(Date.now()),{start:j,end:h})?n:(o(null),null)},[n,o]),{data:i,setData:l,reloadData:c}=R.useGetApiData(u,{nullStateBeforeLoad:!1,nullStateOnFail:!0}),m=t.useRef(null);t.useEffect(()=>{const j=()=>{c(),m.current=window.setTimeout(j,S.msToStartOfNextDay()+5e3)};return j(),()=>{m.current!==null&&window.clearTimeout(m.current)}},[c]),t.useEffect(()=>{const j=()=>{r()};return window.addEventListener("focus",j),()=>{window.removeEventListener("focus",j)}},[r,c]);const C=t.useMemo(()=>({delegation:a,setDelegation:o,availableDelegations:i,setAvailableDelegations:l,refreshAvailableDelegations:c}),[a,o,i,l,c]);return e.jsxRuntimeExports.jsx(e.DelegationContext.Provider,{value:C,children:s})},H=()=>{const{texts:{confirm:s}}=t.useContext(e.LuminusComponentsContext),{onConfirm:u,onCancel:n,text:o,show:r}=I.useConfirm();return e.jsxRuntimeExports.jsxs(d.Modal,{show:r,size:"sm",centered:!0,onHide:n,children:[e.jsxRuntimeExports.jsx(d.Modal.Header,{className:"justify-content-center",children:e.jsxRuntimeExports.jsx(d.Modal.Title,{children:o})}),e.jsxRuntimeExports.jsx(d.Modal.Body,{children:e.jsxRuntimeExports.jsxs("div",{className:"w-100 d-flex gap-5",children:[e.jsxRuntimeExports.jsx(d.PrimaryButton,{type:"button",variant:"outlined",color:"secondary",className:"w-100",onClick:n,children:s.no}),e.jsxRuntimeExports.jsx(d.PrimaryButton,{type:"button",color:"primary",onClick:u,className:"w-100 ml",children:s.yes})]})})]})};exports.AuthContext=e.AuthContext;exports.DelegationContext=e.DelegationContext;exports.LoadingContext=e.LoadingContext;exports.LuminusComponentsContext=e.LuminusComponentsContext;exports.UserContext=e.UserContext;exports.AuthProvider=z;exports.DelegationProvider=F;exports.LoadingProvider=_;exports.LuminusComponentsProvider=q;exports.UserProvider=B;
@@ -1,258 +1,280 @@
1
- import { j as n, ar as R, U as L, as as U, at as z, ak as F, a5 as B, a9 as G, au as O, aa as H, ac as C, ab as q, av as V } from "./nivo-pie.es--oXJjsfy.js";
2
- import { useState as h, useCallback as d, useMemo as g, useContext as j, useEffect as S, useRef as M } from "react";
3
- import { EventType as b } from "@azure/msal-browser";
4
- import { MsalProvider as J } from "@azure/msal-react";
1
+ import { t as L, j as r, ar as F, U as P, as as G, at as B, ak as H, a5 as q, a9 as _, au as M, aa as V, ac as w, ab as J, av as K } from "./nivo-pie.es--oXJjsfy.js";
2
+ import { useState as v, useCallback as d, useMemo as S, useContext as j, useEffect as C, useRef as R } from "react";
3
+ import { EventType as O } from "@azure/msal-browser";
4
+ import { MsalProvider as Q } from "@azure/msal-react";
5
5
  import "react-router-dom";
6
6
  import "react-hook-form";
7
- import { u as K } from "./useConfirm-DKlCFqR6.js";
8
- import { f as v, b as Q, P as I, L as $ } from "./PrimaryButton-PdGX8VfF.js";
9
- import { u as W, a as X, b as Y } from "./useLocalStorageState-DWbVoRAx.js";
10
- import { m as Z } from "./dateUtils-C1hdRN9v.js";
11
- const ee = ({ children: e }) => {
12
- const [r, a] = h(!1), [o, t] = h(""), s = d((c) => {
13
- a(!0), t(c);
7
+ import { u as W } from "./useConfirm-DKlCFqR6.js";
8
+ import { f as g, b as $, P as T, L as X } from "./PrimaryButton-PdGX8VfF.js";
9
+ import { u as Y, a as Z, b as ee } from "./useLocalStorageState-CgLMkNbU.js";
10
+ import { e as te, p as U, m as se } from "./dateUtils-Cl2asrFg.js";
11
+ function ne(e) {
12
+ const a = L(e);
13
+ return a.setHours(23, 59, 59, 999), a;
14
+ }
15
+ function oe() {
16
+ return ne(Date.now());
17
+ }
18
+ function ae(e, a) {
19
+ const t = +L(e), [s, n] = [
20
+ +L(a.start),
21
+ +L(a.end)
22
+ ].sort((o, i) => o - i);
23
+ return t >= s && t <= n;
24
+ }
25
+ function re() {
26
+ return te(Date.now());
27
+ }
28
+ const ie = ({ children: e }) => {
29
+ const [a, t] = v(!1), [s, n] = v(""), o = d((c) => {
30
+ t(!0), n(c);
14
31
  }, []), i = d(() => {
15
- a(!1);
16
- }, []), l = g(() => ({ show: r, text: o, showConfirm: s, hideConfirm: i }), [r, o, s, i]);
17
- return /* @__PURE__ */ n.jsxs(R.Provider, { value: l, children: [
18
- /* @__PURE__ */ n.jsx(ne, {}),
32
+ t(!1);
33
+ }, []), l = S(() => ({ show: a, text: s, showConfirm: o, hideConfirm: i }), [a, s, o, i]);
34
+ return /* @__PURE__ */ r.jsxs(F.Provider, { value: l, children: [
35
+ /* @__PURE__ */ r.jsx(ue, {}),
19
36
  e
20
37
  ] });
21
- }, te = () => {
22
- const { texts: { confirm: e } } = j(L), { isShown: r, text: a, onFinish: o } = W(), { options: t } = j(U), [s, i] = h(t.defaultValue ?? ""), l = d(() => {
23
- o(null);
24
- }, [o]), c = d((m) => {
25
- m.preventDefault(), !(t.required && !s) && o(s);
26
- }, [o, t.required, s]);
27
- S(() => {
28
- r === !0 && i(t.defaultValue ?? "");
29
- }, [r, t.defaultValue]);
30
- const x = g(() => ({
31
- value: s,
32
- onChange: (m) => i(m.currentTarget.value),
38
+ }, le = () => {
39
+ const { texts: { confirm: e } } = j(P), { isShown: a, text: t, onFinish: s } = Y(), { options: n } = j(G), [o, i] = v(n.defaultValue ?? ""), l = d(() => {
40
+ s(null);
41
+ }, [s]), c = d((x) => {
42
+ x.preventDefault(), !(n.required && !o) && s(o);
43
+ }, [s, n.required, o]);
44
+ C(() => {
45
+ a === !0 && i(n.defaultValue ?? "");
46
+ }, [a, n.defaultValue]);
47
+ const m = S(() => ({
48
+ value: o,
49
+ onChange: (x) => i(x.currentTarget.value),
33
50
  className: "w-100",
34
51
  autoFocus: !0,
35
52
  tabIndex: 0
36
- }), [s]);
37
- return /* @__PURE__ */ n.jsxs(v, { show: r, size: "sm", centered: !0, onHide: l, children: [
38
- /* @__PURE__ */ n.jsx(v.Header, { className: "justify-content-center", children: /* @__PURE__ */ n.jsx(v.Title, { children: a }) }),
39
- /* @__PURE__ */ n.jsxs("form", { onSubmit: c, children: [
40
- /* @__PURE__ */ n.jsxs(v.Body, { children: [
41
- t.input === "textarea" ? /* @__PURE__ */ n.jsx("textarea", { ...x, rows: 5 }) : void 0,
42
- t.input === "input" ? /* @__PURE__ */ n.jsx(Q, { ...x, type: t.type }) : void 0
53
+ }), [o]);
54
+ return /* @__PURE__ */ r.jsxs(g, { show: a, size: "sm", centered: !0, onHide: l, children: [
55
+ /* @__PURE__ */ r.jsx(g.Header, { className: "justify-content-center", children: /* @__PURE__ */ r.jsx(g.Title, { children: t }) }),
56
+ /* @__PURE__ */ r.jsxs("form", { onSubmit: c, children: [
57
+ /* @__PURE__ */ r.jsxs(g.Body, { children: [
58
+ n.input === "textarea" ? /* @__PURE__ */ r.jsx("textarea", { ...m, rows: 5 }) : void 0,
59
+ n.input === "input" ? /* @__PURE__ */ r.jsx($, { ...m, type: n.type }) : void 0
43
60
  ] }),
44
- /* @__PURE__ */ n.jsxs(v.Footer, { className: "w-100 d-flex gap-5", children: [
45
- /* @__PURE__ */ n.jsx(I, { variant: "outlined", color: "secondary", onClick: l, className: "flex-grow-1", children: e.cancel }),
46
- /* @__PURE__ */ n.jsx(I, { color: "primary", disabled: t.required && !s, type: "submit", className: "flex-grow-1", children: e.confirm })
61
+ /* @__PURE__ */ r.jsxs(g.Footer, { className: "w-100 d-flex gap-5", children: [
62
+ /* @__PURE__ */ r.jsx(T, { variant: "outlined", color: "secondary", onClick: l, className: "flex-grow-1", children: e.cancel }),
63
+ /* @__PURE__ */ r.jsx(T, { color: "primary", disabled: n.required && !o, type: "submit", className: "flex-grow-1", children: e.confirm })
47
64
  ] })
48
65
  ] })
49
66
  ] });
50
- }, se = ({ children: e }) => {
51
- const [r, a] = h(!1), [o, t] = h(""), [s, i] = h({ input: "textarea", type: "text" }), l = M(() => {
52
- }), c = d((N) => {
53
- t(N), a(!0);
54
- }, []), x = d(() => {
55
- a(!1);
56
- }, []), m = g(() => ({
57
- isShown: r,
58
- text: o,
67
+ }, ce = ({ children: e }) => {
68
+ const [a, t] = v(!1), [s, n] = v(""), [o, i] = v({ input: "textarea", type: "text" }), l = R(() => {
69
+ }), c = d((h) => {
70
+ n(h), t(!0);
71
+ }, []), m = d(() => {
72
+ t(!1);
73
+ }, []), x = S(() => ({
74
+ isShown: a,
75
+ text: s,
59
76
  showPrompt: c,
60
- hidePrompt: x,
77
+ hidePrompt: m,
61
78
  resolveRef: l,
62
- options: s,
79
+ options: o,
63
80
  setOptions: i
64
- }), [r, o, c, x, s]);
65
- return /* @__PURE__ */ n.jsxs(U.Provider, { value: m, children: [
81
+ }), [a, s, c, m, o]);
82
+ return /* @__PURE__ */ r.jsxs(G.Provider, { value: x, children: [
66
83
  e,
67
- /* @__PURE__ */ n.jsx(te, {})
84
+ /* @__PURE__ */ r.jsx(le, {})
68
85
  ] });
69
- }, fe = ({ cookieDomain: e, axiosOptions: r, language: a, texts: o, ProjectIconComponent: t, localizationContext: s, chartColorPalette: i, children: l }) => {
70
- const c = g(() => ({
71
- axiosOptions: r,
86
+ }, je = ({ cookieDomain: e, axiosOptions: a, language: t, texts: s, ProjectIconComponent: n, localizationContext: o, chartColorPalette: i, children: l }) => {
87
+ const c = S(() => ({
88
+ axiosOptions: a,
72
89
  cookieDomain: e,
73
- language: a,
74
- texts: o,
75
- ProjectIconComponent: t,
76
- localizationContext: s,
90
+ language: t,
91
+ texts: s,
92
+ ProjectIconComponent: n,
93
+ localizationContext: o,
77
94
  chartColorPalette: i
78
95
  }), [
79
- r,
80
- e,
81
96
  a,
97
+ e,
82
98
  t,
83
- s,
99
+ n,
84
100
  o,
101
+ s,
85
102
  i
86
103
  ]);
87
- return /* @__PURE__ */ n.jsx(L.Provider, { value: c, children: /* @__PURE__ */ n.jsx(ee, { children: /* @__PURE__ */ n.jsxs(se, { children: [
88
- /* @__PURE__ */ n.jsx(z, {}),
104
+ return /* @__PURE__ */ r.jsx(P.Provider, { value: c, children: /* @__PURE__ */ r.jsx(ie, { children: /* @__PURE__ */ r.jsxs(ce, { children: [
105
+ /* @__PURE__ */ r.jsx(B, {}),
89
106
  l
90
107
  ] }) }) });
91
- }, he = ({ children: e }) => {
92
- const [r, a] = h(!1), [o] = h(/* @__PURE__ */ new Set()), t = d((l) => {
93
- o.add(l), a(!0);
94
- }, [o]), s = d((l) => {
95
- o.delete(l), o.size === 0 && a(!1);
96
- }, [o]), i = g(() => ({ isLoading: r, startLoading: t, stopLoading: s }), [r, t, s]);
97
- return /* @__PURE__ */ n.jsxs(F.Provider, { value: i, children: [
98
- r && /* @__PURE__ */ n.jsx($, {}),
108
+ }, ye = ({ children: e }) => {
109
+ const [a, t] = v(!1), [s] = v(/* @__PURE__ */ new Set()), n = d((l) => {
110
+ s.add(l), t(!0);
111
+ }, [s]), o = d((l) => {
112
+ s.delete(l), s.size === 0 && t(!1);
113
+ }, [s]), i = S(() => ({ isLoading: a, startLoading: n, stopLoading: o }), [a, n, o]);
114
+ return /* @__PURE__ */ r.jsxs(H.Provider, { value: i, children: [
115
+ a && /* @__PURE__ */ r.jsx(X, {}),
99
116
  e
100
117
  ] });
101
- }, ve = ({ children: e }) => {
102
- const r = B(), { msalInstance: a } = j(G), { delegation: o, setDelegation: t, setAvailableDelegations: s, refreshAvailableDelegations: i } = j(O), { getToken: l } = H(), [c, x] = h(null), m = d(async () => {
118
+ }, pe = ({ children: e }) => {
119
+ const a = q(), { msalInstance: t } = j(_), { delegation: s, setDelegation: n, setAvailableDelegations: o, refreshAvailableDelegations: i } = j(M), { getToken: l } = V(), [c, m] = v(null), x = d(async () => {
103
120
  const u = await l();
104
- u && x(u);
121
+ u && m(u);
105
122
  }, [l]);
106
- S(() => {
107
- m();
108
- }, [m]);
109
- const D = d(() => {
123
+ C(() => {
124
+ x();
125
+ }, [x]);
126
+ const I = d(() => {
110
127
  const u = localStorage.getItem("user") ?? null;
111
128
  return u ? JSON.parse(u ?? "") : null;
112
- }, [])(), [P, p] = h({
113
- state: D ? C.LOGGED_IN : C.LOGGING_IN,
114
- user: D
129
+ }, [])(), [b, D] = v({
130
+ state: I ? w.LOGGED_IN : w.LOGGING_IN,
131
+ user: I
115
132
  }), k = d(async (u) => {
116
133
  let f = null;
117
- return await r.get("/user/detail", u ? { headers: { Authorization: `Bearer ${u}` } } : void 0).then((T) => {
118
- f = T.data;
134
+ return await a.get("/user/detail", u ? { headers: { Authorization: `Bearer ${u}` } } : void 0).then((N) => {
135
+ f = N.data;
119
136
  }).catch(() => {
120
137
  f = null;
121
138
  }), f;
122
- }, [r]), A = d(() => {
123
- localStorage.removeItem("user"), p({
124
- state: C.LOGGED_OUT,
139
+ }, [a]), E = d(() => {
140
+ localStorage.removeItem("user"), D({
141
+ state: w.LOGGED_OUT,
125
142
  user: null
126
- }), t(null), s(null);
127
- }, [s, t]), w = d(async (u) => {
128
- p({
129
- state: C.LOGGING_IN,
143
+ }), n(null), o(null);
144
+ }, [o, n]), y = d(async (u) => {
145
+ D({
146
+ state: w.LOGGING_IN,
130
147
  user: null
131
148
  });
132
149
  const f = await k(u);
133
- return f ? (p({
134
- state: C.LOGGED_IN,
150
+ return f ? (D({
151
+ state: w.LOGGED_IN,
135
152
  user: f
136
- }), localStorage.setItem("user", JSON.stringify(f)), await i(), !0) : (p({
137
- state: C.LOGIN_FAILED,
153
+ }), localStorage.setItem("user", JSON.stringify(f)), await i(), !0) : (D({
154
+ state: w.LOGIN_FAILED,
138
155
  user: null
139
156
  }), !1);
140
- }, [k, i]), y = d(() => {
141
- A();
142
- }, [A]);
143
- S(() => {
144
- if (a) {
145
- const u = a.addEventCallback((f) => {
146
- if (f.eventType === b.LOGIN_SUCCESS && f.payload) {
147
- const T = f.payload;
148
- x(T.accessToken);
157
+ }, [k, i]), p = d(() => {
158
+ E();
159
+ }, [E]);
160
+ C(() => {
161
+ if (t) {
162
+ const u = t.addEventCallback((f) => {
163
+ if (f.eventType === O.LOGIN_SUCCESS && f.payload) {
164
+ const N = f.payload;
165
+ m(N.accessToken);
149
166
  }
150
167
  });
151
168
  return () => {
152
- u && a.removeEventCallback(u);
169
+ u && t.removeEventCallback(u);
153
170
  };
154
171
  }
155
172
  return () => {
156
173
  };
157
- }, [a, w, y]);
158
- const E = d(async (u) => {
159
- u && await w(u).catch(() => {
160
- y(), t(null);
174
+ }, [t, y, p]);
175
+ const A = d(async (u) => {
176
+ u && await y(u).catch(() => {
177
+ p(), n(null);
161
178
  });
162
- }, [w, y, t]);
163
- S(() => {
164
- E(c);
165
- }, [c, o == null ? void 0 : o.id, E]);
166
- const _ = g(() => ({
167
- user: P.user,
168
- userLoginState: P,
169
- loginUser: w,
170
- logoutUser: y
171
- }), [P, w, y]);
172
- return /* @__PURE__ */ n.jsx(q.Provider, { value: _, children: e });
173
- }, ge = ({ ...e }) => {
174
- const { cookieDomain: r } = j(L), [, a] = V(["Authorization"]), o = g(() => ({
179
+ }, [y, p, n]);
180
+ C(() => {
181
+ A(c);
182
+ }, [c, s == null ? void 0 : s.id, A]);
183
+ const z = S(() => ({
184
+ user: b.user,
185
+ userLoginState: b,
186
+ loginUser: y,
187
+ logoutUser: p
188
+ }), [b, y, p]);
189
+ return /* @__PURE__ */ r.jsx(J.Provider, { value: z, children: e });
190
+ }, Ie = ({ ...e }) => {
191
+ const { cookieDomain: a } = j(P), [, t] = K(["Authorization"]), s = S(() => ({
175
192
  useMsal: e.useMsal ?? !1,
176
193
  msalInstance: e.useMsal ? e.msalInstance ?? null : null,
177
194
  msalScopes: e.useMsal ? e.msalScopes ?? [] : []
178
195
  }), [e]);
179
- return S(() => {
196
+ return C(() => {
180
197
  if (e.useMsal) {
181
- const t = e.msalInstance.addEventCallback((s) => {
182
- if (s.eventType === b.LOGIN_SUCCESS || s.eventType === b.ACQUIRE_TOKEN_SUCCESS && s.payload) {
183
- const i = s.payload, l = i.account;
198
+ const n = e.msalInstance.addEventCallback((o) => {
199
+ if (o.eventType === O.LOGIN_SUCCESS || o.eventType === O.ACQUIRE_TOKEN_SUCCESS && o.payload) {
200
+ const i = o.payload, l = i.account;
184
201
  e.msalInstance.setActiveAccount(l);
185
- const c = i.accessToken, x = i.expiresOn;
186
- a("Authorization", c, {
202
+ const c = i.accessToken, m = i.expiresOn;
203
+ t("Authorization", c, {
187
204
  path: "/",
188
205
  secure: !0,
189
206
  sameSite: "none",
190
- domain: r,
191
- expires: x ?? void 0
207
+ domain: a,
208
+ expires: m ?? void 0
192
209
  });
193
210
  }
194
- s.error && console.error("AuthProvider MSAL Error", s);
211
+ o.error && console.error("AuthProvider MSAL Error", o);
195
212
  });
196
213
  return () => {
197
- t && e.msalInstance.removeEventCallback(t);
214
+ n && e.msalInstance.removeEventCallback(n);
198
215
  };
199
216
  }
200
217
  return () => {
201
218
  };
202
- }, [e, a, r]), /* @__PURE__ */ n.jsx(G.Provider, { value: o, children: e.useMsal ? /* @__PURE__ */ n.jsx(J, { instance: e.msalInstance, children: e.children }) : e.children });
203
- }, Se = ({ children: e, relativeEndpoint: r }) => {
204
- const [a, o, t] = X("user-delegation", null), { data: s, setData: i, reloadData: l } = Y(r, {
219
+ }, [e, t, a]), /* @__PURE__ */ r.jsx(_.Provider, { value: s, children: e.useMsal ? /* @__PURE__ */ r.jsx(Q, { instance: e.msalInstance, children: e.children }) : e.children });
220
+ }, De = ({ children: e, relativeEndpoint: a }) => {
221
+ const [t, s, n] = Z("user-delegation", null), o = S(() => {
222
+ if (!t)
223
+ return null;
224
+ const h = t.from ? U(t.from) : re(), I = t.to ? U(t.to) : oe();
225
+ return ae(new Date(Date.now()), { start: h, end: I }) ? t : (s(null), null);
226
+ }, [t, s]), { data: i, setData: l, reloadData: c } = ee(a, {
205
227
  nullStateBeforeLoad: !1,
206
228
  nullStateOnFail: !0
207
- }), c = M(null);
208
- S(() => {
209
- const m = () => {
210
- l(), c.current = window.setTimeout(m, Z() + 5e3);
229
+ }), m = R(null);
230
+ C(() => {
231
+ const h = () => {
232
+ c(), m.current = window.setTimeout(h, se() + 5e3);
211
233
  };
212
- return m(), () => {
213
- c.current !== null && window.clearTimeout(c.current);
234
+ return h(), () => {
235
+ m.current !== null && window.clearTimeout(m.current);
214
236
  };
215
- }, [l]), S(() => {
216
- const m = () => {
217
- t();
237
+ }, [c]), C(() => {
238
+ const h = () => {
239
+ n();
218
240
  };
219
- return window.addEventListener("focus", m), () => {
220
- window.removeEventListener("focus", m);
241
+ return window.addEventListener("focus", h), () => {
242
+ window.removeEventListener("focus", h);
221
243
  };
222
- }, [t, l]);
223
- const x = g(() => ({
224
- delegation: a,
225
- setDelegation: o,
226
- availableDelegations: s,
227
- setAvailableDelegations: i,
228
- refreshAvailableDelegations: l
244
+ }, [n, c]);
245
+ const x = S(() => ({
246
+ delegation: o,
247
+ setDelegation: s,
248
+ availableDelegations: i,
249
+ setAvailableDelegations: l,
250
+ refreshAvailableDelegations: c
229
251
  }), [
230
- a,
231
252
  o,
232
253
  s,
233
254
  i,
234
- l
255
+ l,
256
+ c
235
257
  ]);
236
- return /* @__PURE__ */ n.jsx(O.Provider, { value: x, children: e });
237
- }, ne = () => {
238
- const { texts: { confirm: e } } = j(L), { onConfirm: r, onCancel: a, text: o, show: t } = K();
239
- return /* @__PURE__ */ n.jsxs(v, { show: t, size: "sm", centered: !0, onHide: a, children: [
240
- /* @__PURE__ */ n.jsx(v.Header, { className: "justify-content-center", children: /* @__PURE__ */ n.jsx(v.Title, { children: o }) }),
241
- /* @__PURE__ */ n.jsx(v.Body, { children: /* @__PURE__ */ n.jsxs("div", { className: "w-100 d-flex gap-5", children: [
242
- /* @__PURE__ */ n.jsx(I, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: a, children: e.no }),
243
- /* @__PURE__ */ n.jsx(I, { type: "button", color: "primary", onClick: r, className: "w-100 ml", children: e.yes })
258
+ return /* @__PURE__ */ r.jsx(M.Provider, { value: x, children: e });
259
+ }, ue = () => {
260
+ const { texts: { confirm: e } } = j(P), { onConfirm: a, onCancel: t, text: s, show: n } = W();
261
+ return /* @__PURE__ */ r.jsxs(g, { show: n, size: "sm", centered: !0, onHide: t, children: [
262
+ /* @__PURE__ */ r.jsx(g.Header, { className: "justify-content-center", children: /* @__PURE__ */ r.jsx(g.Title, { children: s }) }),
263
+ /* @__PURE__ */ r.jsx(g.Body, { children: /* @__PURE__ */ r.jsxs("div", { className: "w-100 d-flex gap-5", children: [
264
+ /* @__PURE__ */ r.jsx(T, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: t, children: e.no }),
265
+ /* @__PURE__ */ r.jsx(T, { type: "button", color: "primary", onClick: a, className: "w-100 ml", children: e.yes })
244
266
  ] }) })
245
267
  ] });
246
268
  };
247
269
  export {
248
- G as AuthContext,
249
- ge as AuthProvider,
250
- O as DelegationContext,
251
- Se as DelegationProvider,
252
- F as LoadingContext,
253
- he as LoadingProvider,
254
- L as LuminusComponentsContext,
255
- fe as LuminusComponentsProvider,
256
- q as UserContext,
257
- ve as UserProvider
270
+ _ as AuthContext,
271
+ Ie as AuthProvider,
272
+ M as DelegationContext,
273
+ De as DelegationProvider,
274
+ H as LoadingContext,
275
+ ye as LoadingProvider,
276
+ P as LuminusComponentsContext,
277
+ je as LuminusComponentsProvider,
278
+ J as UserContext,
279
+ pe as UserProvider
258
280
  };