react-luminus-components 1.3.238 → 1.3.240
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +34 -34
- package/dist/{Loading-Cc0-NwgK.cjs → Loading-D4SCMh6h.cjs} +1 -1
- package/dist/{Loading-CptpWbFC.js → Loading-_7loOvtU.js} +1 -1
- package/dist/components/common/LineChart/LineChart.d.ts +23 -0
- package/dist/components/common/LineChart/comps/LineChartTooltip/LineChartTooltip.d.ts +12 -0
- package/dist/components/common/LineChart/comps/index.d.ts +1 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +17 -17
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +6 -6
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +22 -22
- package/dist/main.d.ts +1 -0
- package/dist/main.es.js +2212 -2107
- package/dist/models/index.d.ts +2 -0
- package/dist/models/types/common/KeysExtendingType.d.ts +4 -0
- package/dist/models/types/common/OnlyAttrExtending.d.ts +6 -0
- package/dist/models/types/lineChartTypes/LineChartValidKey.d.ts +2 -0
- package/dist/models/types/lineChartTypes/LineChartValidValue.d.ts +2 -0
- package/dist/{nivo-bar.es-CwPk6jCC.js → nivo-bar.es-BeALe7Gh.js} +10399 -9202
- package/dist/nivo-bar.es-BebGU-zz.cjs +279 -0
- package/dist/{useGetApiData-DURYIaAm.cjs → useGetApiData-COPBCf8x.cjs} +1 -1
- package/dist/{useGetApiData-BIcmQjVP.js → useGetApiData-DrkjC5UR.js} +1 -1
- package/dist/{usePermissions-CgIi1N68.js → usePermissions-Blbd53ol.js} +1 -1
- package/dist/{usePermissions-BQ-3epgD.cjs → usePermissions-Daf3EkaR.cjs} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +8 -8
- package/package.json +2 -1
- package/dist/nivo-bar.es-CE89xOvu.cjs +0 -279
package/dist/.vite/manifest.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_Loading-
|
|
3
|
-
"file": "Loading-
|
|
2
|
+
"_Loading-D4SCMh6h.cjs": {
|
|
3
|
+
"file": "Loading-D4SCMh6h.cjs",
|
|
4
4
|
"name": "Loading",
|
|
5
5
|
"imports": [
|
|
6
|
-
"_nivo-bar.es-
|
|
6
|
+
"_nivo-bar.es-BebGU-zz.cjs"
|
|
7
7
|
]
|
|
8
8
|
},
|
|
9
|
-
"_Loading-
|
|
10
|
-
"file": "Loading-
|
|
9
|
+
"_Loading-_7loOvtU.js": {
|
|
10
|
+
"file": "Loading-_7loOvtU.js",
|
|
11
11
|
"name": "Loading",
|
|
12
12
|
"imports": [
|
|
13
|
-
"_nivo-bar.es-
|
|
13
|
+
"_nivo-bar.es-BeALe7Gh.js"
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
|
-
"_nivo-bar.es-
|
|
17
|
-
"file": "nivo-bar.es-
|
|
16
|
+
"_nivo-bar.es-BeALe7Gh.js": {
|
|
17
|
+
"file": "nivo-bar.es-BeALe7Gh.js",
|
|
18
18
|
"name": "nivo-bar.es"
|
|
19
19
|
},
|
|
20
|
-
"_nivo-bar.es-
|
|
21
|
-
"file": "nivo-bar.es-
|
|
20
|
+
"_nivo-bar.es-BebGU-zz.cjs": {
|
|
21
|
+
"file": "nivo-bar.es-BebGU-zz.cjs",
|
|
22
22
|
"name": "nivo-bar.es"
|
|
23
23
|
},
|
|
24
24
|
"_numberUtils-BY7ziQF8.cjs": {
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
"file": "numberUtils-Bwf8nio8.js",
|
|
30
30
|
"name": "numberUtils"
|
|
31
31
|
},
|
|
32
|
-
"_useGetApiData-
|
|
33
|
-
"file": "useGetApiData-
|
|
32
|
+
"_useGetApiData-COPBCf8x.cjs": {
|
|
33
|
+
"file": "useGetApiData-COPBCf8x.cjs",
|
|
34
34
|
"name": "useGetApiData",
|
|
35
35
|
"imports": [
|
|
36
|
-
"_nivo-bar.es-
|
|
36
|
+
"_nivo-bar.es-BebGU-zz.cjs"
|
|
37
37
|
]
|
|
38
38
|
},
|
|
39
|
-
"_useGetApiData-
|
|
40
|
-
"file": "useGetApiData-
|
|
39
|
+
"_useGetApiData-DrkjC5UR.js": {
|
|
40
|
+
"file": "useGetApiData-DrkjC5UR.js",
|
|
41
41
|
"name": "useGetApiData",
|
|
42
42
|
"imports": [
|
|
43
|
-
"_nivo-bar.es-
|
|
43
|
+
"_nivo-bar.es-BeALe7Gh.js"
|
|
44
44
|
]
|
|
45
45
|
},
|
|
46
46
|
"_useLocalStorageState-BFc8Gc8H.cjs": {
|
|
@@ -51,18 +51,18 @@
|
|
|
51
51
|
"file": "useLocalStorageState-Bt99kkCr.js",
|
|
52
52
|
"name": "useLocalStorageState"
|
|
53
53
|
},
|
|
54
|
-
"_usePermissions-
|
|
55
|
-
"file": "usePermissions-
|
|
54
|
+
"_usePermissions-Blbd53ol.js": {
|
|
55
|
+
"file": "usePermissions-Blbd53ol.js",
|
|
56
56
|
"name": "usePermissions",
|
|
57
57
|
"imports": [
|
|
58
|
-
"_nivo-bar.es-
|
|
58
|
+
"_nivo-bar.es-BeALe7Gh.js"
|
|
59
59
|
]
|
|
60
60
|
},
|
|
61
|
-
"_usePermissions-
|
|
62
|
-
"file": "usePermissions-
|
|
61
|
+
"_usePermissions-Daf3EkaR.cjs": {
|
|
62
|
+
"file": "usePermissions-Daf3EkaR.cjs",
|
|
63
63
|
"name": "usePermissions",
|
|
64
64
|
"imports": [
|
|
65
|
-
"_nivo-bar.es-
|
|
65
|
+
"_nivo-bar.es-BebGU-zz.cjs"
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
68
|
"_useRenderDraggableInPortal-D0OLp7Qb.js": {
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"src": "src/contexts/index.ts",
|
|
80
80
|
"isEntry": true,
|
|
81
81
|
"imports": [
|
|
82
|
-
"_nivo-bar.es-
|
|
83
|
-
"_Loading-
|
|
84
|
-
"_useGetApiData-
|
|
82
|
+
"_nivo-bar.es-BebGU-zz.cjs",
|
|
83
|
+
"_Loading-D4SCMh6h.cjs",
|
|
84
|
+
"_useGetApiData-COPBCf8x.cjs",
|
|
85
85
|
"_useLocalStorageState-BFc8Gc8H.cjs"
|
|
86
86
|
]
|
|
87
87
|
},
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
"src": "src/hooks/index.ts",
|
|
92
92
|
"isEntry": true,
|
|
93
93
|
"imports": [
|
|
94
|
-
"_nivo-bar.es-
|
|
95
|
-
"_usePermissions-
|
|
96
|
-
"_useGetApiData-
|
|
94
|
+
"_nivo-bar.es-BebGU-zz.cjs",
|
|
95
|
+
"_usePermissions-Daf3EkaR.cjs",
|
|
96
|
+
"_useGetApiData-COPBCf8x.cjs",
|
|
97
97
|
"_useLocalStorageState-BFc8Gc8H.cjs",
|
|
98
98
|
"_useRenderDraggableInPortal-QPCaw-E_.cjs"
|
|
99
99
|
]
|
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
"src": "src/layout/index.ts",
|
|
105
105
|
"isEntry": true,
|
|
106
106
|
"imports": [
|
|
107
|
-
"_nivo-bar.es-
|
|
108
|
-
"_usePermissions-
|
|
107
|
+
"_nivo-bar.es-BebGU-zz.cjs",
|
|
108
|
+
"_usePermissions-Daf3EkaR.cjs"
|
|
109
109
|
]
|
|
110
110
|
},
|
|
111
111
|
"src/main.ts": {
|
|
@@ -114,10 +114,10 @@
|
|
|
114
114
|
"src": "src/main.ts",
|
|
115
115
|
"isEntry": true,
|
|
116
116
|
"imports": [
|
|
117
|
-
"_nivo-bar.es-
|
|
118
|
-
"_Loading-
|
|
117
|
+
"_nivo-bar.es-BebGU-zz.cjs",
|
|
118
|
+
"_Loading-D4SCMh6h.cjs",
|
|
119
119
|
"_useRenderDraggableInPortal-QPCaw-E_.cjs",
|
|
120
|
-
"_useGetApiData-
|
|
120
|
+
"_useGetApiData-COPBCf8x.cjs",
|
|
121
121
|
"_numberUtils-BY7ziQF8.cjs"
|
|
122
122
|
]
|
|
123
123
|
},
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"src": "src/utils/index.ts",
|
|
128
128
|
"isEntry": true,
|
|
129
129
|
"imports": [
|
|
130
|
-
"_nivo-bar.es-
|
|
130
|
+
"_nivo-bar.es-BebGU-zz.cjs",
|
|
131
131
|
"_numberUtils-BY7ziQF8.cjs"
|
|
132
132
|
]
|
|
133
133
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./nivo-bar.es-
|
|
1
|
+
"use strict";const s=require("./nivo-bar.es-BebGU-zz.cjs"),o="_loading_obchl_1",i="_spinner-grow_obchl_10",e="_second_obchl_14",r="_third_obchl_17",l="_loadingBlock_obchl_21",c="_sizeLine_obchl_29",t="_sizeFill_obchl_36",n={loading:o,"spinner-grow":"_spinner-grow_obchl_10",spinnerGrow:i,second:e,third:r,loadingBlock:l,sizeLine:c,sizeFill:t},a=()=>s.jsxRuntimeExports.jsxs("div",{className:s.classNames("luminus-loading",n.loading),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("spinner-grow",n.spinnerGrow,"text-primary"),role:"status"}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("spinner-grow",n.spinnerGrow,"text-primary",n.second),role:"status"}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("spinner-grow",n.spinnerGrow,"text-primary",n.third),role:"status"})]});exports.Loading=a;exports.classes=n;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as n, c as o } from "./nivo-bar.es-
|
|
1
|
+
import { j as n, c as o } from "./nivo-bar.es-BeALe7Gh.js";
|
|
2
2
|
const i = "_loading_obchl_1", r = "_spinner-grow_obchl_10", e = "_second_obchl_14", l = "_third_obchl_17", c = "_loadingBlock_obchl_21", a = "_sizeLine_obchl_29", t = "_sizeFill_obchl_36", s = {
|
|
3
3
|
loading: i,
|
|
4
4
|
"spinner-grow": "_spinner-grow_obchl_10",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as KeysExtendingType } from '../../../models/types/common/KeysExtendingType';
|
|
2
|
+
import { default as OnlyAttrExtending } from '../../../models/types/common/OnlyAttrExtending';
|
|
3
|
+
import { default as LineChartValidKey } from '../../../models/types/lineChartTypes/LineChartValidKey';
|
|
4
|
+
import { default as LineChartValidValue } from '../../../models/types/lineChartTypes/LineChartValidValue';
|
|
5
|
+
|
|
6
|
+
type LineChartProps<DataType extends OnlyAttrExtending<DataType, LineChartValidValue>> = {
|
|
7
|
+
data: Array<DataType>;
|
|
8
|
+
translateKey: (key: Extract<keyof DataType, LineChartValidKey>) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Key of the DataType to be used as x axix. If the type of data[0][xKey] is string, x axis type is 'point'.
|
|
11
|
+
*/
|
|
12
|
+
xKey: Extract<keyof DataType, LineChartValidKey>;
|
|
13
|
+
/**
|
|
14
|
+
* Keys of DataType to be used for y axis.
|
|
15
|
+
*/
|
|
16
|
+
yKeys: ReadonlyArray<Extract<KeysExtendingType<DataType, LineChartValidValue>, LineChartValidKey>>;
|
|
17
|
+
/**
|
|
18
|
+
* If true, will recalculate each value to it's percentage of maximal value. Usefule when some yKey values are disproportional to others.
|
|
19
|
+
*/
|
|
20
|
+
usePercentageValue?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const LineChart: <DataType extends OnlyAttrExtending<DataType, LineChartValidValue>>({ data, xKey, yKeys, translateKey, usePercentageValue, }: LineChartProps<DataType>) => import("react").JSX.Element;
|
|
23
|
+
export default LineChart;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as OnlyAttrExtending } from '../../../../../models/types/common/OnlyAttrExtending';
|
|
2
|
+
import { default as LineChartValidKey } from '../../../../../models/types/lineChartTypes/LineChartValidKey';
|
|
3
|
+
import { default as LineChartValidValue } from '../../../../../models/types/lineChartTypes/LineChartValidValue';
|
|
4
|
+
import { PointTooltipProps } from '@nivo/line';
|
|
5
|
+
|
|
6
|
+
type LineChartTooltipProps<DataType extends OnlyAttrExtending<DataType, LineChartValidValue>> = {
|
|
7
|
+
val: PointTooltipProps;
|
|
8
|
+
translateKey: (key: Extract<keyof DataType, LineChartValidKey>) => string;
|
|
9
|
+
data: Array<DataType>;
|
|
10
|
+
};
|
|
11
|
+
declare const LineChartTooltip: <DataType extends OnlyAttrExtending<DataType, LineChartValidValue>>({ val, translateKey, data, }: LineChartTooltipProps<DataType>) => import("react").JSX.Element;
|
|
12
|
+
export default LineChartTooltip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as LineChartTooltip } from './LineChartTooltip/LineChartTooltip';
|
|
@@ -30,6 +30,7 @@ export { default as FromToDatePicker } from './FromToDatePicker/FromToDatePicker
|
|
|
30
30
|
export { default as MonthPickerSearchParams } from './MonthPickerSearchParams/MonthPickerSearchParams';
|
|
31
31
|
export { default as YearPickerSearchParams } from './YearPickerSearchParams/YearPickerSearchParams';
|
|
32
32
|
export { default as PieChart } from './PieChart/PieChart';
|
|
33
|
+
export { default as LineChart } from './LineChart/LineChart';
|
|
33
34
|
export { default as DynamicForm } from './DynamicForm/DynamicForm';
|
|
34
35
|
export { default as SettingsFormPicker } from './SettingsFormPicker/SettingsFormPicker';
|
|
35
36
|
export { default as DisabledRowLabelLink } from './DisabledRowLabelLink/DisabledRowLabelLink';
|
package/dist/contexts.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ae=Object.defineProperty;var ie=(e,t,r)=>t in e?ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var C=(e,t,r)=>ie(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./nivo-bar.es-CE89xOvu.cjs"),c=require("react"),N=require("@azure/msal-browser"),le=require("@azure/msal-react");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");const ue=require("./Loading-Cc0-NwgK.cjs"),ce=require("./useGetApiData-DURYIaAm.cjs"),fe=require("./useLocalStorageState-BFc8Gc8H.cjs");function de(e){const t=o.toDate(e);return t.setHours(23,59,59,999),t}function me(){return de(Date.now())}function pe(e,t){const r=+o.toDate(e),[n,s]=[+o.toDate(t.start),+o.toDate(t.end)].sort((a,u)=>a-u);return r>=n&&r<=s}function he(){return o.startOfDay(Date.now())}const xe=({children:e})=>{const[t,r]=c.useState(!1),[n,s]=c.useState(""),a=c.useCallback(f=>{r(!0),s(f)},[]),u=c.useCallback(()=>{r(!1)},[]),i=c.useMemo(()=>({show:t,text:n,showConfirm:a,hideConfirm:u}),[t,n,a,u]);return o.jsxRuntimeExports.jsxs(o.ConfirmContext.Provider,{value:i,children:[o.jsxRuntimeExports.jsx(Qe,{}),e]})},ge=()=>{const{texts:{confirm:e}}=c.useContext(o.LuminusComponentsContext),{isShown:t,text:r,onFinish:n}=o.usePrompt(),{options:s}=c.useContext(o.PromptContext),[a,u]=c.useState(s.defaultValue??""),i=c.useCallback(()=>{n(null)},[n]),f=c.useCallback(d=>{d.preventDefault(),!(s.required&&!a)&&n(a)},[n,s.required,a]);c.useEffect(()=>{t===!0&&u(s.defaultValue??"")},[t,s.defaultValue]);const l=c.useMemo(()=>({value:a,onChange:d=>u(d.currentTarget.value),className:"w-100",autoFocus:!0,tabIndex:0}),[a]);return o.jsxRuntimeExports.jsxs(o.Modal,{show:t,size:"sm",centered:!0,onHide:i,children:[o.jsxRuntimeExports.jsx(o.Modal.Header,{className:"justify-content-center",children:o.jsxRuntimeExports.jsx(o.Modal.Title,{children:r})}),o.jsxRuntimeExports.jsxs("form",{onSubmit:f,children:[o.jsxRuntimeExports.jsxs(o.Modal.Body,{children:[s.input==="textarea"?o.jsxRuntimeExports.jsx("textarea",{...l,rows:5}):void 0,s.input==="input"?o.jsxRuntimeExports.jsx(o.FormControl,{...l,type:s.type}):void 0]}),o.jsxRuntimeExports.jsxs(o.Modal.Footer,{className:"w-100 d-flex gap-5",children:[o.jsxRuntimeExports.jsx(o.PrimaryButton,{variant:"outlined",color:"secondary",onClick:i,className:"flex-grow-1",children:e.cancel}),o.jsxRuntimeExports.jsx(o.PrimaryButton,{color:"primary",disabled:s.required&&!a,type:"submit",className:"flex-grow-1",children:e.confirm})]})]})]})},ye=({children:e})=>{const[t,r]=c.useState(!1),[n,s]=c.useState(""),[a,u]=c.useState({input:"textarea",type:"text"}),i=c.useRef(()=>{}),f=c.useCallback(m=>{s(m),r(!0)},[]),l=c.useCallback(()=>{r(!1)},[]),d=c.useMemo(()=>({isShown:t,text:n,showPrompt:f,hidePrompt:l,resolveRef:i,options:a,setOptions:u}),[t,n,f,l,a]);return o.jsxRuntimeExports.jsxs(o.PromptContext.Provider,{value:d,children:[e,o.jsxRuntimeExports.jsx(ge,{})]})},ve=({cookieDomain:e,axiosOptions:t,language:r,texts:n,ProjectIconComponent:s,localizationContext:a,chartColorPalette:u,children:i})=>{const f=c.useMemo(()=>({axiosOptions:t,cookieDomain:e,language:r,texts:n,ProjectIconComponent:s,localizationContext:a,chartColorPalette:u}),[t,e,r,s,a,n,u]);return o.jsxRuntimeExports.jsx(o.LuminusComponentsContext.Provider,{value:f,children:o.jsxRuntimeExports.jsx(xe,{children:o.jsxRuntimeExports.jsxs(ye,{children:[o.jsxRuntimeExports.jsx(o.Ie,{}),i]})})})},Te=({children:e})=>{const[t,r]=c.useState(!1),[n]=c.useState(new Set),s=c.useCallback(i=>{n.add(i),r(!0)},[n]),a=c.useCallback(i=>{n.delete(i),n.size===0&&r(!1)},[n]),u=c.useMemo(()=>({isLoading:t,startLoading:s,stopLoading:a}),[t,s,a]);return o.jsxRuntimeExports.jsxs(o.LoadingContext.Provider,{value:u,children:[t&&o.jsxRuntimeExports.jsx(ue.Loading,{}),e]})},Ce=({children:e})=>{const t=o.useAxios(),{msalInstance:r}=c.useContext(o.AuthContext),{delegation:n,setDelegation:s,setAvailableDelegations:a,refreshAvailableDelegations:u}=c.useContext(o.DelegationContext),{getToken:i}=o.useAuth(),[f,l]=c.useState(null),d=c.useCallback(async()=>{const x=await i();x&&l(x.token)},[i]);c.useEffect(()=>{d()},[d]);const h=c.useCallback(()=>{const x=localStorage.getItem("user")??null;return x?JSON.parse(x??""):null},[])(),[p,g]=c.useState({state:h?o.LoginState.LOGGED_IN:o.LoginState.LOGGING_IN,user:h}),P=c.useCallback(async x=>{let v=null;return await t.get("/user/detail",x?{headers:{Authorization:`Bearer ${x}`}}:void 0).then(M=>{v=M.data}).catch(()=>{v=null}),v},[t]),S=c.useCallback(()=>{localStorage.removeItem("user"),g({state:o.LoginState.LOGGED_OUT,user:null}),s(null),a(null)},[a,s]),E=c.useCallback(async x=>{g({state:o.LoginState.LOGGING_IN,user:null});const v=await P(x);return v?(g({state:o.LoginState.LOGGED_IN,user:v}),localStorage.setItem("user",JSON.stringify(v)),await u(),!0):(g({state:o.LoginState.LOGIN_FAILED,user:null}),!1)},[P,u]),b=c.useCallback(()=>{S()},[S]);c.useEffect(()=>{if(r){const x=r.addEventCallback(v=>{if(v.eventType===N.EventType.LOGIN_SUCCESS&&v.payload){const M=v.payload;l(M.accessToken)}});return()=>{x&&r.removeEventCallback(x)}}return()=>{}},[r,E,b]);const B=c.useCallback(async x=>{x&&await E(x).catch(()=>{b(),s(null)})},[E,b,s]);c.useEffect(()=>{B(f)},[f,n==null?void 0:n.id,B]);const oe=c.useMemo(()=>({user:p.user,userLoginState:p,loginUser:E,logoutUser:b}),[p,E,b]);return o.jsxRuntimeExports.jsx(o.UserContext.Provider,{value:oe,children:e})},Ee=({...e})=>{const{cookieDomain:t}=c.useContext(o.LuminusComponentsContext),[,r]=o.useCookies(["Authorization"]),n=c.useMemo(()=>({useMsal:e.useMsal??!1,msalInstance:e.useMsal?e.msalInstance??null:null,msalScopes:e.useMsal?e.msalScopes??[]:[],msalExtraScopes:e.useMsal?e.msalExtraScopes??[]:[]}),[e]);return c.useEffect(()=>{if(e.useMsal){const s=e.msalInstance.addEventCallback(a=>{if(a.eventType===N.EventType.LOGIN_SUCCESS||a.eventType===N.EventType.ACQUIRE_TOKEN_SUCCESS&&a.payload){const u=a.payload,i=u.account;e.msalInstance.setActiveAccount(i);const f=u.accessToken,l=u.expiresOn;r("Authorization",f,{path:"/",secure:!0,sameSite:"none",domain:t,expires:l??void 0})}a.error&&console.error("AuthProvider MSAL Error",a)});return()=>{s&&e.msalInstance.removeEventCallback(s)}}return()=>{}},[e,r,t]),o.jsxRuntimeExports.jsx(o.AuthContext.Provider,{value:n,children:e.useMsal?o.jsxRuntimeExports.jsx(le.MsalProvider,{instance:e.msalInstance,children:e.children}):e.children})},Se=({children:e,relativeEndpoint:t})=>{const[r,n,s]=fe.useLocalStorageState("user-delegation",null),a=c.useMemo(()=>{if(!r)return null;const m=r.from?o.parseISO(r.from):he(),h=r.to?o.parseISO(r.to):me();return pe(new Date(Date.now()),{start:m,end:h})?r:(n(null),null)},[r,n]),{data:u,setData:i,reloadData:f}=ce.useGetApiData(t,{nullStateBeforeLoad:!1,nullStateOnFail:!0}),l=c.useRef(null);c.useEffect(()=>{const m=()=>{f(),l.current=window.setTimeout(m,o.msToStartOfNextDay()+5e3)};return m(),()=>{l.current!==null&&window.clearTimeout(l.current)}},[f]),c.useEffect(()=>{const m=()=>{s()};return window.addEventListener("focus",m),()=>{window.removeEventListener("focus",m)}},[s,f]);const d=c.useMemo(()=>({delegation:a,setDelegation:n,availableDelegations:u,setAvailableDelegations:i,refreshAvailableDelegations:f}),[a,n,u,i,f]);return o.jsxRuntimeExports.jsx(o.DelegationContext.Provider,{value:d,children:e})};var be=typeof Element<"u",Ae=typeof Map=="function",je=typeof Set=="function",Oe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function I(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,s;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!I(e[n],t[n]))return!1;return!0}var a;if(Ae&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;for(a=e.entries();!(n=a.next()).done;)if(!I(n.value[1],t.get(n.value[0])))return!1;return!0}if(je&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(Oe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;if(be&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((s[n]==="_owner"||s[n]==="__v"||s[n]==="__o")&&e.$$typeof)&&!I(e[s[n]],t[s[n]]))return!1;return!0}return e!==e&&t!==t}var we=function(t,r){try{return I(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const Pe=o.getDefaultExportFromCjs(we);var ke=function(t,r,n,s){var a=n?n.call(s,t,r):void 0;if(a!==void 0)return!!a;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var u=Object.keys(t),i=Object.keys(r);if(u.length!==i.length)return!1;for(var f=Object.prototype.hasOwnProperty.bind(r),l=0;l<u.length;l++){var d=u[l];if(!f(d))return!1;var m=t[d],h=r[d];if(a=n?n.call(s,m,h,d):void 0,a===!1||a===void 0&&m!==h)return!1}return!0};const Re=o.getDefaultExportFromCjs(ke);var Q=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(Q||{}),H={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},V=Object.values(Q),K={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},De=Object.entries(K).reduce((e,[t,r])=>(e[r]=t,e),{}),T="data-rh",O={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},w=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},Ie=e=>{let t=w(e,"title");const r=w(e,O.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=w(e,O.DEFAULT_TITLE);return t||n||void 0},Le=e=>w(e,O.ON_CHANGE_CLIENT_STATE)||(()=>{}),$=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),Me=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const s=Object.keys(n);for(let a=0;a<s.length;a+=1){const i=s[a].toLowerCase();if(e.indexOf(i)!==-1&&n[i])return r.concat(n)}}return r},[]),He=e=>console&&typeof console.warn=="function"&&console.warn(e),k=(e,t,r)=>{const n={};return r.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&He(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,a)=>{const u={};a.filter(f=>{let l;const d=Object.keys(f);for(let h=0;h<d.length;h+=1){const p=d[h],g=p.toLowerCase();t.indexOf(g)!==-1&&!(l==="rel"&&f[l].toLowerCase()==="canonical")&&!(g==="rel"&&f[g].toLowerCase()==="stylesheet")&&(l=g),t.indexOf(p)!==-1&&(p==="innerHTML"||p==="cssText"||p==="itemprop")&&(l=p)}if(!l||!f[l])return!1;const m=f[l].toLowerCase();return n[l]||(n[l]={}),u[l]||(u[l]={}),n[l][m]?!1:(u[l][m]=!0,!0)}).reverse().forEach(f=>s.push(f));const i=Object.keys(u);for(let f=0;f<i.length;f+=1){const l=i[f],d={...n[l],...u[l]};n[l]=d}return s},[]).reverse()},$e=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},_e=e=>({baseTag:Me(["href"],e),bodyAttributes:$("bodyAttributes",e),defer:w(e,O.DEFER),encode:w(e,O.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:$("htmlAttributes",e),linkTags:k("link",["rel","href"],e),metaTags:k("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:k("noscript",["innerHTML"],e),onChangeClientState:Le(e),scriptTags:k("script",["src","innerHTML"],e),styleTags:k("style",["cssText"],e),title:Ie(e),titleAttributes:$("titleAttributes",e),prioritizeSeoTags:$e(e,O.PRIORITIZE_SEO_TAGS)}),X=e=>Array.isArray(e)?e.join(""):e,Ue=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},_=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(Ue(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},Y=(e,t)=>({...e,[t]:void 0}),Ne=["noscript","script","style"],q=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),ee=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),qe=(e,t,r,n)=>{const s=ee(r),a=X(t);return s?`<${e} ${T}="true" ${s}>${q(a,n)}</${e}>`:`<${e} ${T}="true">${q(a,n)}</${e}>`},Fe=(e,t,r=!0)=>t.reduce((n,s)=>{const a=s,u=Object.keys(a).filter(l=>!(l==="innerHTML"||l==="cssText")).reduce((l,d)=>{const m=typeof a[d]>"u"?d:`${d}="${q(a[d],r)}"`;return l?`${l} ${m}`:m},""),i=a.innerHTML||a.cssText||"",f=Ne.indexOf(e)===-1;return`${n}<${e} ${T}="true" ${u}${f?"/>":`>${i}</${e}>`}`},""),te=(e,t={})=>Object.keys(e).reduce((r,n)=>{const s=K[n];return r[s||n]=e[n],r},t),Ge=(e,t,r)=>{const n={key:t,[T]:!0},s=te(r,n);return[c.createElement("title",s,t)]},L=(e,t)=>t.map((r,n)=>{const s={key:n,[T]:!0};return Object.keys(r).forEach(a=>{const i=K[a]||a;if(i==="innerHTML"||i==="cssText"){const f=r.innerHTML||r.cssText;s.dangerouslySetInnerHTML={__html:f}}else s[i]=r[a]}),c.createElement(e,s)}),y=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>Ge(e,t.title,t.titleAttributes),toString:()=>qe(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>te(t),toString:()=>ee(t)};default:return{toComponent:()=>L(e,t),toString:()=>Fe(e,t,r)}}},ze=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const s=_(e,H.meta),a=_(t,H.link),u=_(r,H.script);return{priorityMethods:{toComponent:()=>[...L("meta",s.priority),...L("link",a.priority),...L("script",u.priority)],toString:()=>`${y("meta",s.priority,n)} ${y("link",a.priority,n)} ${y("script",u.priority,n)}`},metaTags:s.default,linkTags:a.default,scriptTags:u.default}},Ke=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:s,noscriptTags:a,styleTags:u,title:i="",titleAttributes:f,prioritizeSeoTags:l}=e;let{linkTags:d,metaTags:m,scriptTags:h}=e,p={toComponent:()=>{},toString:()=>""};return l&&({priorityMethods:p,linkTags:d,metaTags:m,scriptTags:h}=ze(e)),{priority:p,base:y("base",t,n),bodyAttributes:y("bodyAttributes",r,n),htmlAttributes:y("htmlAttributes",s,n),link:y("link",d,n),meta:y("meta",m,n),noscript:y("noscript",a,n),script:y("script",h,n),style:y("style",u,n),title:y("title",{title:i,titleAttributes:f},n)}},F=Ke,D=[],re=!!(typeof window<"u"&&window.document&&window.document.createElement),G=class{constructor(e,t){C(this,"instances",[]);C(this,"canUseDOM",re);C(this,"context");C(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?D:this.instances,add:e=>{(this.canUseDOM?D:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?D:this.instances).indexOf(e);(this.canUseDOM?D:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=F({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},Be={},ne=c.createContext(Be),A,se=(A=class extends c.Component{constructor(r){super(r);C(this,"helmetData");this.helmetData=new G(this.props.context||{},A.canUseDOM)}render(){return c.createElement(ne.Provider,{value:this.helmetData.value},this.props.children)}},C(A,"canUseDOM",re),A),j=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${T}]`),s=[].slice.call(n),a=[];let u;return t&&t.length&&t.forEach(i=>{const f=document.createElement(e);for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l))if(l==="innerHTML")f.innerHTML=i.innerHTML;else if(l==="cssText")f.styleSheet?f.styleSheet.cssText=i.cssText:f.appendChild(document.createTextNode(i.cssText));else{const d=l,m=typeof i[d]>"u"?"":i[d];f.setAttribute(l,m)}f.setAttribute(T,"true"),s.some((l,d)=>(u=d,f.isEqualNode(l)))?s.splice(u,1):a.push(f)}),s.forEach(i=>{var f;return(f=i.parentNode)==null?void 0:f.removeChild(i)}),a.forEach(i=>r.appendChild(i)),{oldTags:s,newTags:a}},z=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(T),s=n?n.split(","):[],a=[...s],u=Object.keys(t);for(const i of u){const f=t[i]||"";r.getAttribute(i)!==f&&r.setAttribute(i,f),s.indexOf(i)===-1&&s.push(i);const l=a.indexOf(i);l!==-1&&a.splice(l,1)}for(let i=a.length-1;i>=0;i-=1)r.removeAttribute(a[i]);s.length===a.length?r.removeAttribute(T):r.getAttribute(T)!==u.join(",")&&r.setAttribute(T,u.join(","))},Ve=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=X(e)),z("title",t)},J=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:s,linkTags:a,metaTags:u,noscriptTags:i,onChangeClientState:f,scriptTags:l,styleTags:d,title:m,titleAttributes:h}=e;z("body",n),z("html",s),Ve(m,h);const p={baseTag:j("base",r),linkTags:j("link",a),metaTags:j("meta",u),noscriptTags:j("noscript",i),scriptTags:j("script",l),styleTags:j("style",d)},g={},P={};Object.keys(p).forEach(S=>{const{newTags:E,oldTags:b}=p[S];E.length&&(g[S]=E),b.length&&(P[S]=p[S].oldTags)}),t&&t(),f(e,g,P)},R=null,Ye=e=>{R&&cancelAnimationFrame(R),e.defer?R=requestAnimationFrame(()=>{J(e,()=>{R=null})}):(J(e),R=null)},Je=Ye,W=class extends c.Component{constructor(){super(...arguments);C(this,"rendered",!1)}shouldComponentUpdate(t){return!Re(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const s=_e(t.get().map(a=>{const u={...a.props};return delete u.context,u}));se.canUseDOM?Je(s):F&&(n=F(s)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},U,We=(U=class extends c.Component{shouldComponentUpdate(e){return!Pe(Y(this.props,"helmetData"),Y(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}warnOnInvalidChildren(e,t){return o.invariant(V.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${V.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),o.invariant(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return c.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:s,...a}=n.props,u=Object.keys(a).reduce((f,l)=>(f[De[l]||l]=a[l],f),{});let{type:i}=n;switch(typeof i=="symbol"?i=i.toString():this.warnOnInvalidChildren(n,s),i){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,u,s);break;default:t=this.mapObjectTypeChildren(n,t,u,s);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof G)){const s=n;n=new G(s.context,!0),delete r.helmetData}return n?c.createElement(W,{...r,context:n.value}):c.createElement(ne.Consumer,null,s=>c.createElement(W,{...r,context:s}))}},C(U,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),U);const Z=(e,t)=>e?`${e} | ${t}`:t,Ze=({defaultHelmet:e,children:t,helmetPrefix:r})=>{const[n,s]=c.useState([Z(r??"",e)]),a=c.useCallback(l=>{s(d=>[...d,Z(r??"",l)])},[r]),u=c.useCallback(()=>{s(l=>l.length>1?l.slice(0,-1):l)},[s]),i=c.useMemo(()=>n.at(-1)??"",[n]),f=c.useMemo(()=>({addHelmet:a,removeHelmet:u}),[a,u]);return o.jsxRuntimeExports.jsx(o.HelmetContext.Provider,{value:f,children:o.jsxRuntimeExports.jsxs(se,{children:[o.jsxRuntimeExports.jsx(We,{defer:!1,children:o.jsxRuntimeExports.jsx("title",{children:i})}),t]})})},Qe=()=>{const{texts:{confirm:e}}=c.useContext(o.LuminusComponentsContext),{onConfirm:t,onCancel:r,text:n,show:s}=o.useConfirm(),a=c.useCallback(u=>{switch(u.key){case"Enter":u.stopPropagation(),t();break;case"Escape":u.stopPropagation(),r();break}},[t,r]);return o.useKeyPress(a),o.jsxRuntimeExports.jsxs(o.Modal,{show:s,size:"sm",centered:!0,onHide:r,children:[o.jsxRuntimeExports.jsx(o.Modal.Header,{className:"justify-content-center",children:o.jsxRuntimeExports.jsx(o.Modal.Title,{children:n})}),o.jsxRuntimeExports.jsx(o.Modal.Body,{children:o.jsxRuntimeExports.jsxs("div",{className:"w-100 d-flex gap-5",children:[o.jsxRuntimeExports.jsx(o.PrimaryButton,{type:"button",variant:"outlined",color:"secondary",className:"w-100",onClick:r,children:e.no}),o.jsxRuntimeExports.jsx(o.PrimaryButton,{type:"button",color:"primary",onClick:t,className:"w-100 ml",children:e.yes})]})})]})};exports.AuthContext=o.AuthContext;exports.DelegationContext=o.DelegationContext;exports.HelmetContext=o.HelmetContext;exports.LoadingContext=o.LoadingContext;exports.LuminusComponentsContext=o.LuminusComponentsContext;exports.UserContext=o.UserContext;exports.AuthProvider=Ee;exports.DelegationProvider=Se;exports.HelmetProvider=Ze;exports.LoadingProvider=Te;exports.LuminusComponentsProvider=ve;exports.UserProvider=Ce;
|
|
1
|
+
"use strict";var ae=Object.defineProperty;var ie=(e,t,r)=>t in e?ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var C=(e,t,r)=>ie(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./nivo-bar.es-BebGU-zz.cjs"),c=require("react"),N=require("@azure/msal-browser"),le=require("@azure/msal-react");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");const ue=require("./Loading-D4SCMh6h.cjs"),ce=require("./useGetApiData-COPBCf8x.cjs"),fe=require("./useLocalStorageState-BFc8Gc8H.cjs");function de(e){const t=o.toDate(e);return t.setHours(23,59,59,999),t}function me(){return de(Date.now())}function pe(e,t){const r=+o.toDate(e),[n,s]=[+o.toDate(t.start),+o.toDate(t.end)].sort((a,u)=>a-u);return r>=n&&r<=s}function he(){return o.startOfDay(Date.now())}const xe=({children:e})=>{const[t,r]=c.useState(!1),[n,s]=c.useState(""),a=c.useCallback(f=>{r(!0),s(f)},[]),u=c.useCallback(()=>{r(!1)},[]),i=c.useMemo(()=>({show:t,text:n,showConfirm:a,hideConfirm:u}),[t,n,a,u]);return o.jsxRuntimeExports.jsxs(o.ConfirmContext.Provider,{value:i,children:[o.jsxRuntimeExports.jsx(Qe,{}),e]})},ge=()=>{const{texts:{confirm:e}}=c.useContext(o.LuminusComponentsContext),{isShown:t,text:r,onFinish:n}=o.usePrompt(),{options:s}=c.useContext(o.PromptContext),[a,u]=c.useState(s.defaultValue??""),i=c.useCallback(()=>{n(null)},[n]),f=c.useCallback(d=>{d.preventDefault(),!(s.required&&!a)&&n(a)},[n,s.required,a]);c.useEffect(()=>{t===!0&&u(s.defaultValue??"")},[t,s.defaultValue]);const l=c.useMemo(()=>({value:a,onChange:d=>u(d.currentTarget.value),className:"w-100",autoFocus:!0,tabIndex:0}),[a]);return o.jsxRuntimeExports.jsxs(o.Modal,{show:t,size:"sm",centered:!0,onHide:i,children:[o.jsxRuntimeExports.jsx(o.Modal.Header,{className:"justify-content-center",children:o.jsxRuntimeExports.jsx(o.Modal.Title,{children:r})}),o.jsxRuntimeExports.jsxs("form",{onSubmit:f,children:[o.jsxRuntimeExports.jsxs(o.Modal.Body,{children:[s.input==="textarea"?o.jsxRuntimeExports.jsx("textarea",{...l,rows:5}):void 0,s.input==="input"?o.jsxRuntimeExports.jsx(o.FormControl,{...l,type:s.type}):void 0]}),o.jsxRuntimeExports.jsxs(o.Modal.Footer,{className:"w-100 d-flex gap-5",children:[o.jsxRuntimeExports.jsx(o.PrimaryButton,{variant:"outlined",color:"secondary",onClick:i,className:"flex-grow-1",children:e.cancel}),o.jsxRuntimeExports.jsx(o.PrimaryButton,{color:"primary",disabled:s.required&&!a,type:"submit",className:"flex-grow-1",children:e.confirm})]})]})]})},ye=({children:e})=>{const[t,r]=c.useState(!1),[n,s]=c.useState(""),[a,u]=c.useState({input:"textarea",type:"text"}),i=c.useRef(()=>{}),f=c.useCallback(m=>{s(m),r(!0)},[]),l=c.useCallback(()=>{r(!1)},[]),d=c.useMemo(()=>({isShown:t,text:n,showPrompt:f,hidePrompt:l,resolveRef:i,options:a,setOptions:u}),[t,n,f,l,a]);return o.jsxRuntimeExports.jsxs(o.PromptContext.Provider,{value:d,children:[e,o.jsxRuntimeExports.jsx(ge,{})]})},ve=({cookieDomain:e,axiosOptions:t,language:r,texts:n,ProjectIconComponent:s,localizationContext:a,chartColorPalette:u,children:i})=>{const f=c.useMemo(()=>({axiosOptions:t,cookieDomain:e,language:r,texts:n,ProjectIconComponent:s,localizationContext:a,chartColorPalette:u}),[t,e,r,s,a,n,u]);return o.jsxRuntimeExports.jsx(o.LuminusComponentsContext.Provider,{value:f,children:o.jsxRuntimeExports.jsx(xe,{children:o.jsxRuntimeExports.jsxs(ye,{children:[o.jsxRuntimeExports.jsx(o.Ie,{}),i]})})})},Te=({children:e})=>{const[t,r]=c.useState(!1),[n]=c.useState(new Set),s=c.useCallback(i=>{n.add(i),r(!0)},[n]),a=c.useCallback(i=>{n.delete(i),n.size===0&&r(!1)},[n]),u=c.useMemo(()=>({isLoading:t,startLoading:s,stopLoading:a}),[t,s,a]);return o.jsxRuntimeExports.jsxs(o.LoadingContext.Provider,{value:u,children:[t&&o.jsxRuntimeExports.jsx(ue.Loading,{}),e]})},Ce=({children:e})=>{const t=o.useAxios(),{msalInstance:r}=c.useContext(o.AuthContext),{delegation:n,setDelegation:s,setAvailableDelegations:a,refreshAvailableDelegations:u}=c.useContext(o.DelegationContext),{getToken:i}=o.useAuth(),[f,l]=c.useState(null),d=c.useCallback(async()=>{const x=await i();x&&l(x.token)},[i]);c.useEffect(()=>{d()},[d]);const h=c.useCallback(()=>{const x=localStorage.getItem("user")??null;return x?JSON.parse(x??""):null},[])(),[p,g]=c.useState({state:h?o.LoginState.LOGGED_IN:o.LoginState.LOGGING_IN,user:h}),P=c.useCallback(async x=>{let v=null;return await t.get("/user/detail",x?{headers:{Authorization:`Bearer ${x}`}}:void 0).then(M=>{v=M.data}).catch(()=>{v=null}),v},[t]),S=c.useCallback(()=>{localStorage.removeItem("user"),g({state:o.LoginState.LOGGED_OUT,user:null}),s(null),a(null)},[a,s]),E=c.useCallback(async x=>{g({state:o.LoginState.LOGGING_IN,user:null});const v=await P(x);return v?(g({state:o.LoginState.LOGGED_IN,user:v}),localStorage.setItem("user",JSON.stringify(v)),await u(),!0):(g({state:o.LoginState.LOGIN_FAILED,user:null}),!1)},[P,u]),b=c.useCallback(()=>{S()},[S]);c.useEffect(()=>{if(r){const x=r.addEventCallback(v=>{if(v.eventType===N.EventType.LOGIN_SUCCESS&&v.payload){const M=v.payload;l(M.accessToken)}});return()=>{x&&r.removeEventCallback(x)}}return()=>{}},[r,E,b]);const B=c.useCallback(async x=>{x&&await E(x).catch(()=>{b(),s(null)})},[E,b,s]);c.useEffect(()=>{B(f)},[f,n==null?void 0:n.id,B]);const oe=c.useMemo(()=>({user:p.user,userLoginState:p,loginUser:E,logoutUser:b}),[p,E,b]);return o.jsxRuntimeExports.jsx(o.UserContext.Provider,{value:oe,children:e})},Ee=({...e})=>{const{cookieDomain:t}=c.useContext(o.LuminusComponentsContext),[,r]=o.useCookies(["Authorization"]),n=c.useMemo(()=>({useMsal:e.useMsal??!1,msalInstance:e.useMsal?e.msalInstance??null:null,msalScopes:e.useMsal?e.msalScopes??[]:[],msalExtraScopes:e.useMsal?e.msalExtraScopes??[]:[]}),[e]);return c.useEffect(()=>{if(e.useMsal){const s=e.msalInstance.addEventCallback(a=>{if(a.eventType===N.EventType.LOGIN_SUCCESS||a.eventType===N.EventType.ACQUIRE_TOKEN_SUCCESS&&a.payload){const u=a.payload,i=u.account;e.msalInstance.setActiveAccount(i);const f=u.accessToken,l=u.expiresOn;r("Authorization",f,{path:"/",secure:!0,sameSite:"none",domain:t,expires:l??void 0})}a.error&&console.error("AuthProvider MSAL Error",a)});return()=>{s&&e.msalInstance.removeEventCallback(s)}}return()=>{}},[e,r,t]),o.jsxRuntimeExports.jsx(o.AuthContext.Provider,{value:n,children:e.useMsal?o.jsxRuntimeExports.jsx(le.MsalProvider,{instance:e.msalInstance,children:e.children}):e.children})},Se=({children:e,relativeEndpoint:t})=>{const[r,n,s]=fe.useLocalStorageState("user-delegation",null),a=c.useMemo(()=>{if(!r)return null;const m=r.from?o.parseISO(r.from):he(),h=r.to?o.parseISO(r.to):me();return pe(new Date(Date.now()),{start:m,end:h})?r:(n(null),null)},[r,n]),{data:u,setData:i,reloadData:f}=ce.useGetApiData(t,{nullStateBeforeLoad:!1,nullStateOnFail:!0}),l=c.useRef(null);c.useEffect(()=>{const m=()=>{f(),l.current=window.setTimeout(m,o.msToStartOfNextDay()+5e3)};return m(),()=>{l.current!==null&&window.clearTimeout(l.current)}},[f]),c.useEffect(()=>{const m=()=>{s()};return window.addEventListener("focus",m),()=>{window.removeEventListener("focus",m)}},[s,f]);const d=c.useMemo(()=>({delegation:a,setDelegation:n,availableDelegations:u,setAvailableDelegations:i,refreshAvailableDelegations:f}),[a,n,u,i,f]);return o.jsxRuntimeExports.jsx(o.DelegationContext.Provider,{value:d,children:e})};var be=typeof Element<"u",Ae=typeof Map=="function",je=typeof Set=="function",Oe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function I(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,s;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!I(e[n],t[n]))return!1;return!0}var a;if(Ae&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;for(a=e.entries();!(n=a.next()).done;)if(!I(n.value[1],t.get(n.value[0])))return!1;return!0}if(je&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(Oe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;if(be&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((s[n]==="_owner"||s[n]==="__v"||s[n]==="__o")&&e.$$typeof)&&!I(e[s[n]],t[s[n]]))return!1;return!0}return e!==e&&t!==t}var we=function(t,r){try{return I(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const Pe=o.getDefaultExportFromCjs(we);var ke=function(t,r,n,s){var a=n?n.call(s,t,r):void 0;if(a!==void 0)return!!a;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var u=Object.keys(t),i=Object.keys(r);if(u.length!==i.length)return!1;for(var f=Object.prototype.hasOwnProperty.bind(r),l=0;l<u.length;l++){var d=u[l];if(!f(d))return!1;var m=t[d],h=r[d];if(a=n?n.call(s,m,h,d):void 0,a===!1||a===void 0&&m!==h)return!1}return!0};const Re=o.getDefaultExportFromCjs(ke);var Q=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(Q||{}),H={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},V=Object.values(Q),K={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},De=Object.entries(K).reduce((e,[t,r])=>(e[r]=t,e),{}),T="data-rh",O={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},w=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},Ie=e=>{let t=w(e,"title");const r=w(e,O.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=w(e,O.DEFAULT_TITLE);return t||n||void 0},Le=e=>w(e,O.ON_CHANGE_CLIENT_STATE)||(()=>{}),$=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),Me=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const s=Object.keys(n);for(let a=0;a<s.length;a+=1){const i=s[a].toLowerCase();if(e.indexOf(i)!==-1&&n[i])return r.concat(n)}}return r},[]),He=e=>console&&typeof console.warn=="function"&&console.warn(e),k=(e,t,r)=>{const n={};return r.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&He(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,a)=>{const u={};a.filter(f=>{let l;const d=Object.keys(f);for(let h=0;h<d.length;h+=1){const p=d[h],g=p.toLowerCase();t.indexOf(g)!==-1&&!(l==="rel"&&f[l].toLowerCase()==="canonical")&&!(g==="rel"&&f[g].toLowerCase()==="stylesheet")&&(l=g),t.indexOf(p)!==-1&&(p==="innerHTML"||p==="cssText"||p==="itemprop")&&(l=p)}if(!l||!f[l])return!1;const m=f[l].toLowerCase();return n[l]||(n[l]={}),u[l]||(u[l]={}),n[l][m]?!1:(u[l][m]=!0,!0)}).reverse().forEach(f=>s.push(f));const i=Object.keys(u);for(let f=0;f<i.length;f+=1){const l=i[f],d={...n[l],...u[l]};n[l]=d}return s},[]).reverse()},$e=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},_e=e=>({baseTag:Me(["href"],e),bodyAttributes:$("bodyAttributes",e),defer:w(e,O.DEFER),encode:w(e,O.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:$("htmlAttributes",e),linkTags:k("link",["rel","href"],e),metaTags:k("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:k("noscript",["innerHTML"],e),onChangeClientState:Le(e),scriptTags:k("script",["src","innerHTML"],e),styleTags:k("style",["cssText"],e),title:Ie(e),titleAttributes:$("titleAttributes",e),prioritizeSeoTags:$e(e,O.PRIORITIZE_SEO_TAGS)}),X=e=>Array.isArray(e)?e.join(""):e,Ue=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},_=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(Ue(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},Y=(e,t)=>({...e,[t]:void 0}),Ne=["noscript","script","style"],q=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),ee=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),qe=(e,t,r,n)=>{const s=ee(r),a=X(t);return s?`<${e} ${T}="true" ${s}>${q(a,n)}</${e}>`:`<${e} ${T}="true">${q(a,n)}</${e}>`},Fe=(e,t,r=!0)=>t.reduce((n,s)=>{const a=s,u=Object.keys(a).filter(l=>!(l==="innerHTML"||l==="cssText")).reduce((l,d)=>{const m=typeof a[d]>"u"?d:`${d}="${q(a[d],r)}"`;return l?`${l} ${m}`:m},""),i=a.innerHTML||a.cssText||"",f=Ne.indexOf(e)===-1;return`${n}<${e} ${T}="true" ${u}${f?"/>":`>${i}</${e}>`}`},""),te=(e,t={})=>Object.keys(e).reduce((r,n)=>{const s=K[n];return r[s||n]=e[n],r},t),Ge=(e,t,r)=>{const n={key:t,[T]:!0},s=te(r,n);return[c.createElement("title",s,t)]},L=(e,t)=>t.map((r,n)=>{const s={key:n,[T]:!0};return Object.keys(r).forEach(a=>{const i=K[a]||a;if(i==="innerHTML"||i==="cssText"){const f=r.innerHTML||r.cssText;s.dangerouslySetInnerHTML={__html:f}}else s[i]=r[a]}),c.createElement(e,s)}),y=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>Ge(e,t.title,t.titleAttributes),toString:()=>qe(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>te(t),toString:()=>ee(t)};default:return{toComponent:()=>L(e,t),toString:()=>Fe(e,t,r)}}},ze=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const s=_(e,H.meta),a=_(t,H.link),u=_(r,H.script);return{priorityMethods:{toComponent:()=>[...L("meta",s.priority),...L("link",a.priority),...L("script",u.priority)],toString:()=>`${y("meta",s.priority,n)} ${y("link",a.priority,n)} ${y("script",u.priority,n)}`},metaTags:s.default,linkTags:a.default,scriptTags:u.default}},Ke=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:s,noscriptTags:a,styleTags:u,title:i="",titleAttributes:f,prioritizeSeoTags:l}=e;let{linkTags:d,metaTags:m,scriptTags:h}=e,p={toComponent:()=>{},toString:()=>""};return l&&({priorityMethods:p,linkTags:d,metaTags:m,scriptTags:h}=ze(e)),{priority:p,base:y("base",t,n),bodyAttributes:y("bodyAttributes",r,n),htmlAttributes:y("htmlAttributes",s,n),link:y("link",d,n),meta:y("meta",m,n),noscript:y("noscript",a,n),script:y("script",h,n),style:y("style",u,n),title:y("title",{title:i,titleAttributes:f},n)}},F=Ke,D=[],re=!!(typeof window<"u"&&window.document&&window.document.createElement),G=class{constructor(e,t){C(this,"instances",[]);C(this,"canUseDOM",re);C(this,"context");C(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?D:this.instances,add:e=>{(this.canUseDOM?D:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?D:this.instances).indexOf(e);(this.canUseDOM?D:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=F({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},Be={},ne=c.createContext(Be),A,se=(A=class extends c.Component{constructor(r){super(r);C(this,"helmetData");this.helmetData=new G(this.props.context||{},A.canUseDOM)}render(){return c.createElement(ne.Provider,{value:this.helmetData.value},this.props.children)}},C(A,"canUseDOM",re),A),j=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${T}]`),s=[].slice.call(n),a=[];let u;return t&&t.length&&t.forEach(i=>{const f=document.createElement(e);for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l))if(l==="innerHTML")f.innerHTML=i.innerHTML;else if(l==="cssText")f.styleSheet?f.styleSheet.cssText=i.cssText:f.appendChild(document.createTextNode(i.cssText));else{const d=l,m=typeof i[d]>"u"?"":i[d];f.setAttribute(l,m)}f.setAttribute(T,"true"),s.some((l,d)=>(u=d,f.isEqualNode(l)))?s.splice(u,1):a.push(f)}),s.forEach(i=>{var f;return(f=i.parentNode)==null?void 0:f.removeChild(i)}),a.forEach(i=>r.appendChild(i)),{oldTags:s,newTags:a}},z=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(T),s=n?n.split(","):[],a=[...s],u=Object.keys(t);for(const i of u){const f=t[i]||"";r.getAttribute(i)!==f&&r.setAttribute(i,f),s.indexOf(i)===-1&&s.push(i);const l=a.indexOf(i);l!==-1&&a.splice(l,1)}for(let i=a.length-1;i>=0;i-=1)r.removeAttribute(a[i]);s.length===a.length?r.removeAttribute(T):r.getAttribute(T)!==u.join(",")&&r.setAttribute(T,u.join(","))},Ve=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=X(e)),z("title",t)},J=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:s,linkTags:a,metaTags:u,noscriptTags:i,onChangeClientState:f,scriptTags:l,styleTags:d,title:m,titleAttributes:h}=e;z("body",n),z("html",s),Ve(m,h);const p={baseTag:j("base",r),linkTags:j("link",a),metaTags:j("meta",u),noscriptTags:j("noscript",i),scriptTags:j("script",l),styleTags:j("style",d)},g={},P={};Object.keys(p).forEach(S=>{const{newTags:E,oldTags:b}=p[S];E.length&&(g[S]=E),b.length&&(P[S]=p[S].oldTags)}),t&&t(),f(e,g,P)},R=null,Ye=e=>{R&&cancelAnimationFrame(R),e.defer?R=requestAnimationFrame(()=>{J(e,()=>{R=null})}):(J(e),R=null)},Je=Ye,W=class extends c.Component{constructor(){super(...arguments);C(this,"rendered",!1)}shouldComponentUpdate(t){return!Re(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const s=_e(t.get().map(a=>{const u={...a.props};return delete u.context,u}));se.canUseDOM?Je(s):F&&(n=F(s)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},U,We=(U=class extends c.Component{shouldComponentUpdate(e){return!Pe(Y(this.props,"helmetData"),Y(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}warnOnInvalidChildren(e,t){return o.invariant(V.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${V.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),o.invariant(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return c.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:s,...a}=n.props,u=Object.keys(a).reduce((f,l)=>(f[De[l]||l]=a[l],f),{});let{type:i}=n;switch(typeof i=="symbol"?i=i.toString():this.warnOnInvalidChildren(n,s),i){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,u,s);break;default:t=this.mapObjectTypeChildren(n,t,u,s);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof G)){const s=n;n=new G(s.context,!0),delete r.helmetData}return n?c.createElement(W,{...r,context:n.value}):c.createElement(ne.Consumer,null,s=>c.createElement(W,{...r,context:s}))}},C(U,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),U);const Z=(e,t)=>e?`${e} | ${t}`:t,Ze=({defaultHelmet:e,children:t,helmetPrefix:r})=>{const[n,s]=c.useState([Z(r??"",e)]),a=c.useCallback(l=>{s(d=>[...d,Z(r??"",l)])},[r]),u=c.useCallback(()=>{s(l=>l.length>1?l.slice(0,-1):l)},[s]),i=c.useMemo(()=>n.at(-1)??"",[n]),f=c.useMemo(()=>({addHelmet:a,removeHelmet:u}),[a,u]);return o.jsxRuntimeExports.jsx(o.HelmetContext.Provider,{value:f,children:o.jsxRuntimeExports.jsxs(se,{children:[o.jsxRuntimeExports.jsx(We,{defer:!1,children:o.jsxRuntimeExports.jsx("title",{children:i})}),t]})})},Qe=()=>{const{texts:{confirm:e}}=c.useContext(o.LuminusComponentsContext),{onConfirm:t,onCancel:r,text:n,show:s}=o.useConfirm(),a=c.useCallback(u=>{switch(u.key){case"Enter":u.stopPropagation(),t();break;case"Escape":u.stopPropagation(),r();break}},[t,r]);return o.useKeyPress(a),o.jsxRuntimeExports.jsxs(o.Modal,{show:s,size:"sm",centered:!0,onHide:r,children:[o.jsxRuntimeExports.jsx(o.Modal.Header,{className:"justify-content-center",children:o.jsxRuntimeExports.jsx(o.Modal.Title,{children:n})}),o.jsxRuntimeExports.jsx(o.Modal.Body,{children:o.jsxRuntimeExports.jsxs("div",{className:"w-100 d-flex gap-5",children:[o.jsxRuntimeExports.jsx(o.PrimaryButton,{type:"button",variant:"outlined",color:"secondary",className:"w-100",onClick:r,children:e.no}),o.jsxRuntimeExports.jsx(o.PrimaryButton,{type:"button",color:"primary",onClick:t,className:"w-100 ml",children:e.yes})]})})]})};exports.AuthContext=o.AuthContext;exports.DelegationContext=o.DelegationContext;exports.HelmetContext=o.HelmetContext;exports.LoadingContext=o.LoadingContext;exports.LuminusComponentsContext=o.LuminusComponentsContext;exports.UserContext=o.UserContext;exports.AuthProvider=Ee;exports.DelegationProvider=Se;exports.HelmetProvider=Ze;exports.LoadingProvider=Te;exports.LuminusComponentsProvider=ve;exports.UserProvider=Ce;
|
package/dist/contexts.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var be = Object.defineProperty;
|
|
2
2
|
var Ee = (e, t, r) => t in e ? be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var S = (e, t, r) => Ee(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import { t as N,
|
|
4
|
+
import { t as N, br as Oe, j as f, bs as we, P as z, ag as Ie, bt as fe, am as b, ad as Pe, Q as q, bu as je, ak as De, ai as ke, aZ as de, bv as me, a_ as Le, a$ as D, aj as He, bw as _e, ay as se, bx as $e, aQ as pe, by as oe, bz as Me, ah as Re, aU as Ue } from "./nivo-bar.es-BeALe7Gh.js";
|
|
5
5
|
import O, { useState as C, useCallback as m, useMemo as A, useContext as _, useEffect as j, useRef as he, Component as te } from "react";
|
|
6
6
|
import { EventType as Z } from "@azure/msal-browser";
|
|
7
7
|
import { MsalProvider as Ne } from "@azure/msal-react";
|
|
@@ -9,9 +9,9 @@ import "react-router-dom";
|
|
|
9
9
|
import "react-dom";
|
|
10
10
|
import "react-hook-form";
|
|
11
11
|
import "react-flexmonster";
|
|
12
|
-
import { L as Fe } from "./Loading-
|
|
13
|
-
import { u as
|
|
14
|
-
import { u as
|
|
12
|
+
import { L as Fe } from "./Loading-_7loOvtU.js";
|
|
13
|
+
import { u as Ge } from "./useGetApiData-DrkjC5UR.js";
|
|
14
|
+
import { u as qe } from "./useLocalStorageState-Bt99kkCr.js";
|
|
15
15
|
function ze(e) {
|
|
16
16
|
const t = N(e);
|
|
17
17
|
return t.setHours(23, 59, 59, 999), t;
|
|
@@ -63,8 +63,8 @@ const Ye = ({ children: e }) => {
|
|
|
63
63
|
s.input === "input" ? /* @__PURE__ */ f.jsx(Pe, { ...i, type: s.type }) : void 0
|
|
64
64
|
] }),
|
|
65
65
|
/* @__PURE__ */ f.jsxs(b.Footer, { className: "w-100 d-flex gap-5", children: [
|
|
66
|
-
/* @__PURE__ */ f.jsx(
|
|
67
|
-
/* @__PURE__ */ f.jsx(
|
|
66
|
+
/* @__PURE__ */ f.jsx(q, { variant: "outlined", color: "secondary", onClick: a, className: "flex-grow-1", children: e.cancel }),
|
|
67
|
+
/* @__PURE__ */ f.jsx(q, { color: "primary", disabled: s.required && !o, type: "submit", className: "flex-grow-1", children: e.confirm })
|
|
68
68
|
] })
|
|
69
69
|
] })
|
|
70
70
|
] });
|
|
@@ -223,12 +223,12 @@ const Ye = ({ children: e }) => {
|
|
|
223
223
|
};
|
|
224
224
|
}, [e, r, t]), /* @__PURE__ */ f.jsx(de.Provider, { value: n, children: e.useMsal ? /* @__PURE__ */ f.jsx(Ne, { instance: e.msalInstance, children: e.children }) : e.children });
|
|
225
225
|
}, Ft = ({ children: e, relativeEndpoint: t }) => {
|
|
226
|
-
const [r, n, s] =
|
|
226
|
+
const [r, n, s] = qe("user-delegation", null), o = A(() => {
|
|
227
227
|
if (!r)
|
|
228
228
|
return null;
|
|
229
229
|
const d = r.from ? se(r.from) : Be(), h = r.to ? se(r.to) : Ke();
|
|
230
230
|
return Ve(new Date(Date.now()), { start: d, end: h }) ? r : (n(null), null);
|
|
231
|
-
}, [r, n]), { data: l, setData: a, reloadData: c } =
|
|
231
|
+
}, [r, n]), { data: l, setData: a, reloadData: c } = Ge(t, {
|
|
232
232
|
nullStateBeforeLoad: !1,
|
|
233
233
|
nullStateOnFail: !0
|
|
234
234
|
}), i = he(null);
|
|
@@ -543,7 +543,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
543
543
|
[x]: !0
|
|
544
544
|
}, s = ve(r, n);
|
|
545
545
|
return [O.createElement("title", s, t)];
|
|
546
|
-
},
|
|
546
|
+
}, G = (e, t) => t.map((r, n) => {
|
|
547
547
|
const s = {
|
|
548
548
|
key: n,
|
|
549
549
|
[x]: !0
|
|
@@ -571,7 +571,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
571
571
|
};
|
|
572
572
|
default:
|
|
573
573
|
return {
|
|
574
|
-
toComponent: () =>
|
|
574
|
+
toComponent: () => G(e, t),
|
|
575
575
|
toString: () => ht(e, t, r)
|
|
576
576
|
};
|
|
577
577
|
}
|
|
@@ -580,9 +580,9 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
580
580
|
return {
|
|
581
581
|
priorityMethods: {
|
|
582
582
|
toComponent: () => [
|
|
583
|
-
...
|
|
584
|
-
...
|
|
585
|
-
...
|
|
583
|
+
...G("meta", s.priority),
|
|
584
|
+
...G("link", o.priority),
|
|
585
|
+
...G("script", l.priority)
|
|
586
586
|
],
|
|
587
587
|
toString: () => (
|
|
588
588
|
// generate all the tags as strings and concatenate them
|
|
@@ -906,7 +906,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
|
|
|
906
906
|
encodeSpecialCharacters: !0,
|
|
907
907
|
prioritizeSeoTags: !1
|
|
908
908
|
}), Q);
|
|
909
|
-
const ue = (e, t) => e ? `${e} | ${t}` : t,
|
|
909
|
+
const ue = (e, t) => e ? `${e} | ${t}` : t, Gt = ({ defaultHelmet: e, children: t, helmetPrefix: r }) => {
|
|
910
910
|
const [n, s] = C([
|
|
911
911
|
ue(r ?? "", e)
|
|
912
912
|
]), o = m((i) => {
|
|
@@ -932,8 +932,8 @@ const ue = (e, t) => e ? `${e} | ${t}` : t, qt = ({ defaultHelmet: e, children:
|
|
|
932
932
|
return Ue(o), /* @__PURE__ */ f.jsxs(b, { show: s, size: "sm", centered: !0, onHide: r, children: [
|
|
933
933
|
/* @__PURE__ */ f.jsx(b.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(b.Title, { children: n }) }),
|
|
934
934
|
/* @__PURE__ */ f.jsx(b.Body, { children: /* @__PURE__ */ f.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|
|
935
|
-
/* @__PURE__ */ f.jsx(
|
|
936
|
-
/* @__PURE__ */ f.jsx(
|
|
935
|
+
/* @__PURE__ */ f.jsx(q, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: r, children: e.no }),
|
|
936
|
+
/* @__PURE__ */ f.jsx(q, { type: "button", color: "primary", onClick: t, className: "w-100 ml", children: e.yes })
|
|
937
937
|
] }) })
|
|
938
938
|
] });
|
|
939
939
|
};
|
|
@@ -943,7 +943,7 @@ export {
|
|
|
943
943
|
me as DelegationContext,
|
|
944
944
|
Ft as DelegationProvider,
|
|
945
945
|
Me as HelmetContext,
|
|
946
|
-
|
|
946
|
+
Gt as HelmetProvider,
|
|
947
947
|
De as LoadingContext,
|
|
948
948
|
Rt as LoadingProvider,
|
|
949
949
|
z as LuminusComponentsContext,
|
package/dist/hooks.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-BebGU-zz.cjs"),k=require("./usePermissions-Daf3EkaR.cjs"),T=require("./useGetApiData-COPBCf8x.cjs"),c=require("react"),x=require("./useLocalStorageState-BFc8Gc8H.cjs"),f=require("./useRenderDraggableInPortal-QPCaw-E_.cjs");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const B=r=>{let t="pending",u;const s=r.then(a=>{t="success",u=a},a=>{t="error",u=a});return()=>{switch(t){case"pending":throw s;case"success":return u;case"error":throw u;default:throw new Error("Unknown status")}}};function G(r,t){const u=e.useAxios({silent:!0,differentBaseUrl:t==null?void 0:t.customBaseUrl,customToken:t==null?void 0:t.customToken}),[s,a]=c.useState(null);return c.useEffect(()=>{(async()=>{const n=u.get(r).then(o=>o.data);a(B(n))})()},[u,r]),s}const L=(r,t,u)=>{let s="pending",a;const i=r.then(n=>{s="success",a=n},n=>{const o=n==null?void 0:n.response;(o==null?void 0:o.status)===404&&u?(s="error-404",a=n):(s="error",a=n)});return()=>{switch(s){case"pending":throw i;case"success":return a;case"error":return null;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},l={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},E=(r,{loadOnInit:t=l.loadOnInit,enabled:u=l.enabled,silent:s=l.silent,nullStateBeforeLoad:a=l.nullStateBeforeLoad,nullStateOnFail:i=l.nullStateOnFail,customApiUrl:n,customBearerToken:o,dataTransformer:h,errorBoundaryOn404:S}=l)=>{const p=e.useAxios({silent:s,customToken:o,differentBaseUrl:n,noToastOnStatus:S?[404]:void 0}),{startLoading:D,stopLoading:w}=c.useContext(e.LoadingContext),C=c.useRef(0),{isAuthenticated:P}=e.useAuth(),[b,g]=c.useState(null),m=c.useCallback(async(d,y)=>{if(!P()||u===!1)return;!s&&D(`loadData-${r}-${y}`),a&&g(null);const q=p.get(r,{signal:d}).then(A=>h?h(A.data):A.data).finally(()=>!s&&w(`loadData-${r}-${y}`));g(L(q,i??!1,S??!1))},[P,u,s,D,r,a,p,h,w,i,S]);return c.useEffect(()=>{if(t===!1)return;const d=new AbortController;return m(d.signal,++C.current),()=>{d.abort()}},[m,t]),{data:b,setData:g,reloadData:m}};exports.cancelToken=e.cancelToken;exports.useAuth=e.useAuth;exports.useAxios=e.useAxios;exports.useClickOutside=e.useClickOutside;exports.useClipboard=e.useClipboard;exports.useConfirm=e.useConfirm;exports.useFormControlType=e.useFormControlType;exports.useKeyPress=e.useKeyPress;exports.useNotifications=e.useNotifications;exports.usePrompt=e.usePrompt;exports.useWindowSize=e.useWindowSize;exports.useZodSchemaTypes=e.useZodSchemaTypes;exports.usePermissions=k.usePermissions;exports.useGetApiData=T.useGetApiData;exports.useLocalStorageState=x.useLocalStorageState;exports.useEmployeePhotoPath=f.useEmployeePhotoPath;exports.useRenderDraggableInPortal=f.useRenderDraggableInPortal;exports.useSearchQuery=f.useSearchQuery;exports.useSearchQueryState=f.useSearchQueryState;exports.useGetApiDataBound=E;exports.useGetDataBound=G;
|
package/dist/hooks.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ai as S, ak as B, a_ as P } from "./nivo-bar.es-
|
|
2
|
-
import {
|
|
3
|
-
import { u as ae } from "./usePermissions-
|
|
4
|
-
import { u as re } from "./useGetApiData-
|
|
1
|
+
import { ai as S, ak as B, a_ as P } from "./nivo-bar.es-BeALe7Gh.js";
|
|
2
|
+
import { bA as j, aK as q, bD as H, ah as J, bC as M, aU as V, al as X, ag as Y, aB as ee, bB as te } from "./nivo-bar.es-BeALe7Gh.js";
|
|
3
|
+
import { u as ae } from "./usePermissions-Blbd53ol.js";
|
|
4
|
+
import { u as re } from "./useGetApiData-DrkjC5UR.js";
|
|
5
5
|
import { useState as x, useEffect as C, useContext as U, useRef as L, useCallback as T } from "react";
|
|
6
6
|
import { u as ue } from "./useLocalStorageState-Bt99kkCr.js";
|
|
7
7
|
import { c as ce, u as ie, a as fe, b as de } from "./useRenderDraggableInPortal-D0OLp7Qb.js";
|
|
@@ -31,7 +31,7 @@ const $ = (o) => {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
-
function
|
|
34
|
+
function z(o, e) {
|
|
35
35
|
const a = S({
|
|
36
36
|
silent: !0,
|
|
37
37
|
differentBaseUrl: e == null ? void 0 : e.customBaseUrl,
|
|
@@ -119,7 +119,7 @@ export {
|
|
|
119
119
|
M as useFormControlType,
|
|
120
120
|
re as useGetApiData,
|
|
121
121
|
N as useGetApiDataBound,
|
|
122
|
-
|
|
122
|
+
z as useGetDataBound,
|
|
123
123
|
V as useKeyPress,
|
|
124
124
|
ue as useLocalStorageState,
|
|
125
125
|
X as useNotifications,
|
package/dist/layout.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-BebGU-zz.cjs"),x=require("react"),g=require("react-router-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");require("react-dom");const k=require("./usePermissions-Daf3EkaR.cjs"),P="_side-menu-item_o72rm_1",f="_disabled_o72rm_6",w="_hidden_o72rm_10",I="_nav-button_o72rm_13",S="_child_o72rm_21",L="_text_o72rm_26",T="_icon_o72rm_36",O="_collapse-icon_o72rm_42",$="_collapsed_o72rm_52",A="_collapse-icon-mini_o72rm_55",K="_expanded_o72rm_86",D="_children-container_o72rm_92",F="_visible_o72rm_100",z="_children_o72rm_92",U="_mobile_o72rm_112",n={"side-menu-item":"_side-menu-item_o72rm_1",sideMenuItem:P,disabled:f,hidden:w,"nav-button":"_nav-button_o72rm_13",navButton:I,child:S,text:L,icon:T,"collapse-icon":"_collapse-icon_o72rm_42",collapseIcon:O,collapsed:$,"collapse-icon-mini":"_collapse-icon-mini_o72rm_55",collapseIconMini:A,expanded:K,"children-container":"_children-container_o72rm_92",childrenContainer:D,visible:F,children:z,mobile:U},W=({item:s,menuExpanded:i,useTooltips:l,children:c})=>s.tooltip&&!i&&l?e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:s.tooltip,placement:"top",delay:{show:1e3,hide:0},children:e.jsxRuntimeExports.jsx("div",{children:c})}):c,B=({item:s,menuExpanded:i,collapsed:l,onCollapse:c,currentPath:_,useHover:r,useTooltips:p,isMobile:E,disableMode:a})=>{var q,y,v,N;const[M,b]=x.useState(!1),[j]=_.split("?"),R=s.linkTo===j||((q=s.children)==null?void 0:q.some(o=>o.linkTo===j)),m=x.useRef(null);return e.useClickOutside([m],()=>l&&c()),e.jsxRuntimeExports.jsxs("li",{ref:m,className:e.classNames("luminus-side-menu-item",n.sideMenuItem,{[n.mobile]:E},{[n.expanded]:i},{active:M||R},{open:l&&s.children},{[a==="disable"?n.disabled:n.hidden]:s.disabled||s.notPermitted||((y=s.children)==null?void 0:y.every(o=>o.notPermitted||o.disabled))},{[a==="disable"?"disabled":"hidden"]:s.disabled||s.notPermitted||((v=s.children)==null?void 0:v.every(o=>o.notPermitted||o.disabled))}),onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),children:[e.jsxRuntimeExports.jsx(W,{item:s,menuExpanded:i,useTooltips:p,children:s.children?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:e.classNames("nav-link",n.navButton),onClick:()=>{c()},children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",n.icon),children:s.icon}),!r&&!i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon-mini rounded",n.collapseIconMini,{[n.collapsed]:l}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:s.title}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon",n.collapseIcon,{[n.collapsed]:l}),children:e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardArrowRight,{})})]})}):e.jsxRuntimeExports.jsxs(g.Link,{to:s.disabled||s.notPermitted?"/":s.linkTo??"/",className:e.classNames("nav-link",n.navButton),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",n.icon),children:s.icon}),i&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:s.title})]})}),e.jsxRuntimeExports.jsx("div",{className:e.classNames("children-container",n.childrenContainer,{[n.visible]:l}),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("shadow rounded children",n.children),children:(N=s.children)==null?void 0:N.map(o=>e.jsxRuntimeExports.jsx(g.Link,{to:o.disabled||o.notPermitted?"/":o.linkTo??"/",className:e.classNames("nav-link child rounded",n.navButton,n.child,{[a==="disable"?n.disabled:n.hidden]:o.disabled||o.notPermitted},{[a==="disable"?"disabled":"hidden"]:o.disabled||o.notPermitted}),onClick:c,children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",n.text,"text-nowrap"),children:o.title})},o.linkTo))})})]})},G="_side-menu_1q9oh_1",J="_sidebar-header_1q9oh_15",Q="_side-menu-content_1q9oh_22",V="_expand_1q9oh_27",X="_only-logo_1q9oh_31",Y="_mobile_1q9oh_34",Z="_divider_1q9oh_49",u={"side-menu":"_side-menu_1q9oh_1",sideMenu:G,"sidebar-header":"_sidebar-header_1q9oh_15",sidebarHeader:J,"side-menu-content":"_side-menu-content_1q9oh_22",sideMenuContent:Q,expand:V,"only-logo":"_only-logo_1q9oh_31",onlyLogo:X,mobile:Y,divider:Z},H=({headerItem:s,searchItem:i,shortcutsItem:l,mainItems:c,secondaryItems:_,expanded:r,setExpanded:p,currentPath:E,useHover:a,useTooltips:M,disableMode:b="disable"})=>{const[j,R]=x.useState(-1),{checkUserHasPermissions:m}=k.usePermissions(),q=x.useMemo(()=>c.map(t=>{var d;return{...t,notPermitted:!m(t.permissions??[],"any"),children:(d=t.children)==null?void 0:d.map(h=>({...h,notPermitted:!m(h.permissions??[],"any"),disabled:t.disabled||h.disabled}))}}),[c,m]),y=x.useMemo(()=>_.map(t=>{var d;return{...t,notPermitted:!m(t.permissions??[],"any"),children:(d=t.children)==null?void 0:d.map(h=>({...h,notPermitted:!m(h.permissions??[],"any")}))}}),[_,m]),v=t=>{R(t===j?-1:t)};x.useEffect(()=>{r||R(-1)},[r]);const N=x.useRef(null);e.useClickOutside([N],()=>p(!1));const{isMobile:o}=e.useWindowSize();return e.jsxRuntimeExports.jsxs("section",{ref:N,className:e.classNames("luminus-side-menu shadow",u.sideMenu,{[u.mobile]:o},{[u.expand]:r},{expand:r}),onMouseEnter:()=>a&&p(!0),onMouseLeave:()=>a&&p(!1),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("sidebar-header",u.sidebarHeader,{[u.onlyLogo]:a}),role:a?void 0:"button",onClick:a?void 0:()=>p(!r),children:a?s:r?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.MdOutlineKeyboardDoubleArrowLeft,{}),s]}):e.jsxRuntimeExports.jsx(e.MdOutlineMenu,{})}),r&&(i||l)?e.jsxRuntimeExports.jsxs("div",{className:"mb-3 d-flex flex-column gap-3",children:[l&&r?l:null,i&&r?i:null]}):null,e.jsxRuntimeExports.jsxs("ul",{className:u.sideMenuContent,children:[q.map((t,d)=>e.jsxRuntimeExports.jsx(B,{item:t,menuExpanded:r,collapsed:d===j,onCollapse:()=>v(d),currentPath:E,useHover:a,useTooltips:M,isMobile:o,disableMode:b},t.title)),e.jsxRuntimeExports.jsx("hr",{className:e.classNames("divider",u.divider)}),y.map((t,d)=>e.jsxRuntimeExports.jsx(B,{item:t,menuExpanded:r,collapsed:d===j,onCollapse:()=>v(d),currentPath:E,useHover:a,useTooltips:M,isMobile:o,disableMode:b},t.title))]})]})},ee="_top-bar_lnmq0_1",se="_top-bar-brand_lnmq0_12",C={"top-bar":"_top-bar_lnmq0_1",topBar:ee,"top-bar-brand":"_top-bar-brand_lnmq0_12",topBarBrand:se},ne=({appName:s,leftOffset:i,leftContent:l,centerContent:c,rightContent:_})=>e.jsxRuntimeExports.jsx("nav",{className:e.classNames("luminus-top-bar shadow",C.topBar),style:{width:i?`calc(100% - ${i}px)`:void 0,left:i?`${i}px`:void 0},children:e.jsxRuntimeExports.jsxs("div",{className:"w-100 row g-0",children:[e.jsxRuntimeExports.jsxs("div",{className:"col-4 d-flex gap-3 align-items-center",children:[e.jsxRuntimeExports.jsx(g.Link,{to:"/",className:e.classNames("luminus-top-bar-brand",C.topBarBrand),children:s}),l]}),e.jsxRuntimeExports.jsx("div",{className:"col-4 d-flex align-items-center",children:c??null}),e.jsxRuntimeExports.jsx("div",{className:"col-4 d-flex justify-content-end align-items-center",children:_??null})]})});exports.PageContainer=e.PageContainer;exports.SideContentBar=e.SideContentBar;exports.SideMenu=H;exports.TopBar=ne;
|
package/dist/layout.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { aK as I, j as e, c as i, $ as C, az as $, aB as R,
|
|
2
|
-
import { ap as Be,
|
|
1
|
+
import { aK as I, j as e, c as i, $ as C, az as $, aB as R, bo as S, bp as A } from "./nivo-bar.es-BeALe7Gh.js";
|
|
2
|
+
import { ap as Be, bq as ge } from "./nivo-bar.es-BeALe7Gh.js";
|
|
3
3
|
import { useState as L, useRef as T, useMemo as k, useEffect as K } from "react";
|
|
4
4
|
import { Link as q } from "react-router-dom";
|
|
5
5
|
import "react-hook-form";
|
|
@@ -7,7 +7,7 @@ import "react-flexmonster";
|
|
|
7
7
|
import "@azure/msal-browser";
|
|
8
8
|
import "@azure/msal-react";
|
|
9
9
|
import "react-dom";
|
|
10
|
-
import { u as z } from "./usePermissions-
|
|
10
|
+
import { u as z } from "./usePermissions-Blbd53ol.js";
|
|
11
11
|
const F = "_side-menu-item_o72rm_1", O = "_disabled_o72rm_6", D = "_hidden_o72rm_10", U = "_nav-button_o72rm_13", W = "_child_o72rm_21", E = "_text_o72rm_26", G = "_icon_o72rm_36", J = "_collapse-icon_o72rm_42", Q = "_collapsed_o72rm_52", V = "_collapse-icon-mini_o72rm_55", X = "_expanded_o72rm_86", Y = "_children-container_o72rm_92", Z = "_visible_o72rm_100", H = "_children_o72rm_92", ee = "_mobile_o72rm_112", s = {
|
|
12
12
|
"side-menu-item": "_side-menu-item_o72rm_1",
|
|
13
13
|
sideMenuItem: F,
|