react-luminus-components 1.3.63 → 1.3.65
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 +85 -79
- package/dist/{PrimaryButton-CnFyjyQe.js → PrimaryButton-B-4FDBTu.js} +1 -1
- package/dist/{PrimaryButton-CxBVQgvY.cjs → PrimaryButton-D597YT4l.cjs} +1 -1
- package/dist/{SimpleTooltip-B5HNfoAQ.js → SimpleTooltip-DKYGIm0z.js} +1 -1
- package/dist/{SimpleTooltip-C28Y34Nc.cjs → SimpleTooltip-DSvr5tFN.cjs} +1 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +24 -24
- package/dist/{dateUtils-DUgLL3G0.cjs → dateUtils-D-Kr9uyw.cjs} +1 -1
- package/dist/{dateUtils-BSbNrnHO.js → dateUtils-D_TxQkwR.js} +15 -15
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useClipboard/useClipboard.d.ts +4 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +452 -451
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +2 -2
- package/dist/main.es.js +1690 -1683
- package/dist/models/texts/ClipboardTexts.d.ts +5 -0
- package/dist/models/texts/ComponentsContextTexts.d.ts +2 -0
- package/dist/{nivo-pie.es-B6Ojc01x.js → nivo-pie.es-BDucg1Se.js} +117 -113
- package/dist/{nivo-pie.es-DP0bHyrp.cjs → nivo-pie.es-DDmgfWkx.cjs} +46 -46
- package/dist/{searchUtils-ClCfXRxm.js → searchUtils-BSgX6UMV.js} +1 -1
- package/dist/{searchUtils-AXoVGgYD.cjs → searchUtils-LPeUPG5Y.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/useClipboard-B7mREbqi.js +70 -0
- package/dist/useClipboard-DQ9COBXW.cjs +1 -0
- package/dist/{useConfirm-QPOkaeUY.js → useConfirm-CA4uEYqW.js} +1 -1
- package/dist/{useConfirm-cpgD1_D9.cjs → useConfirm-LVh4L1xZ.cjs} +1 -1
- package/dist/useLocalStorageState-B1YahEo2.js +72 -0
- package/dist/useLocalStorageState-bxFIq9SR.cjs +1 -0
- package/dist/{usePermissions-DNSr9IJP.cjs → usePermissions-CYf12h6x.cjs} +1 -1
- package/dist/{usePermissions-C2sxicUL.js → usePermissions-Cb6jEqr-.js} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +12 -12
- package/package.json +1 -1
- package/dist/useEmployeePhotoPath-BgHzjvUU.cjs +0 -1
- package/dist/useEmployeePhotoPath-DjxgOb6H.js +0 -55
- package/dist/useLocalStorageState-CmWLfi7Q.cjs +0 -1
- package/dist/useLocalStorageState-DSpsMAVt.js +0 -72
package/dist/.vite/manifest.json
CHANGED
|
@@ -1,116 +1,122 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_PrimaryButton-
|
|
3
|
-
"file": "PrimaryButton-
|
|
2
|
+
"_PrimaryButton-B-4FDBTu.js": {
|
|
3
|
+
"file": "PrimaryButton-B-4FDBTu.js",
|
|
4
4
|
"name": "PrimaryButton",
|
|
5
5
|
"imports": [
|
|
6
|
-
"_nivo-pie.es-
|
|
6
|
+
"_nivo-pie.es-BDucg1Se.js"
|
|
7
7
|
]
|
|
8
8
|
},
|
|
9
|
-
"_PrimaryButton-
|
|
10
|
-
"file": "PrimaryButton-
|
|
9
|
+
"_PrimaryButton-D597YT4l.cjs": {
|
|
10
|
+
"file": "PrimaryButton-D597YT4l.cjs",
|
|
11
11
|
"name": "PrimaryButton",
|
|
12
12
|
"imports": [
|
|
13
|
-
"_nivo-pie.es-
|
|
13
|
+
"_nivo-pie.es-DDmgfWkx.cjs"
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
|
-
"_SimpleTooltip-
|
|
17
|
-
"file": "SimpleTooltip-
|
|
16
|
+
"_SimpleTooltip-DKYGIm0z.js": {
|
|
17
|
+
"file": "SimpleTooltip-DKYGIm0z.js",
|
|
18
18
|
"name": "SimpleTooltip",
|
|
19
19
|
"imports": [
|
|
20
|
-
"_nivo-pie.es-
|
|
20
|
+
"_nivo-pie.es-BDucg1Se.js"
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
|
-
"_SimpleTooltip-
|
|
24
|
-
"file": "SimpleTooltip-
|
|
23
|
+
"_SimpleTooltip-DSvr5tFN.cjs": {
|
|
24
|
+
"file": "SimpleTooltip-DSvr5tFN.cjs",
|
|
25
25
|
"name": "SimpleTooltip",
|
|
26
26
|
"imports": [
|
|
27
|
-
"_nivo-pie.es-
|
|
27
|
+
"_nivo-pie.es-DDmgfWkx.cjs"
|
|
28
28
|
]
|
|
29
29
|
},
|
|
30
|
-
"_dateUtils-
|
|
31
|
-
"file": "dateUtils-
|
|
30
|
+
"_dateUtils-D-Kr9uyw.cjs": {
|
|
31
|
+
"file": "dateUtils-D-Kr9uyw.cjs",
|
|
32
32
|
"name": "dateUtils",
|
|
33
33
|
"imports": [
|
|
34
|
-
"_nivo-pie.es-
|
|
34
|
+
"_nivo-pie.es-DDmgfWkx.cjs"
|
|
35
35
|
]
|
|
36
36
|
},
|
|
37
|
-
"_dateUtils-
|
|
38
|
-
"file": "dateUtils-
|
|
37
|
+
"_dateUtils-D_TxQkwR.js": {
|
|
38
|
+
"file": "dateUtils-D_TxQkwR.js",
|
|
39
39
|
"name": "dateUtils",
|
|
40
40
|
"imports": [
|
|
41
|
-
"_nivo-pie.es-
|
|
41
|
+
"_nivo-pie.es-BDucg1Se.js"
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
|
-
"_nivo-pie.es-
|
|
45
|
-
"file": "nivo-pie.es-
|
|
44
|
+
"_nivo-pie.es-BDucg1Se.js": {
|
|
45
|
+
"file": "nivo-pie.es-BDucg1Se.js",
|
|
46
46
|
"name": "nivo-pie.es"
|
|
47
47
|
},
|
|
48
|
-
"_nivo-pie.es-
|
|
49
|
-
"file": "nivo-pie.es-
|
|
48
|
+
"_nivo-pie.es-DDmgfWkx.cjs": {
|
|
49
|
+
"file": "nivo-pie.es-DDmgfWkx.cjs",
|
|
50
50
|
"name": "nivo-pie.es"
|
|
51
51
|
},
|
|
52
|
-
"_searchUtils-
|
|
53
|
-
"file": "searchUtils-
|
|
52
|
+
"_searchUtils-BSgX6UMV.js": {
|
|
53
|
+
"file": "searchUtils-BSgX6UMV.js",
|
|
54
54
|
"name": "searchUtils",
|
|
55
55
|
"imports": [
|
|
56
|
-
"_nivo-pie.es-
|
|
56
|
+
"_nivo-pie.es-BDucg1Se.js"
|
|
57
57
|
]
|
|
58
58
|
},
|
|
59
|
-
"_searchUtils-
|
|
60
|
-
"file": "searchUtils-
|
|
59
|
+
"_searchUtils-LPeUPG5Y.cjs": {
|
|
60
|
+
"file": "searchUtils-LPeUPG5Y.cjs",
|
|
61
61
|
"name": "searchUtils",
|
|
62
62
|
"imports": [
|
|
63
|
-
"_nivo-pie.es-
|
|
63
|
+
"_nivo-pie.es-DDmgfWkx.cjs"
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
|
-
"
|
|
67
|
-
"file": "
|
|
68
|
-
"name": "
|
|
66
|
+
"_useClipboard-B7mREbqi.js": {
|
|
67
|
+
"file": "useClipboard-B7mREbqi.js",
|
|
68
|
+
"name": "useClipboard",
|
|
69
69
|
"imports": [
|
|
70
|
-
"_nivo-pie.es-
|
|
70
|
+
"_nivo-pie.es-BDucg1Se.js"
|
|
71
71
|
]
|
|
72
72
|
},
|
|
73
|
-
"
|
|
74
|
-
"file": "
|
|
75
|
-
"name": "
|
|
73
|
+
"_useClipboard-DQ9COBXW.cjs": {
|
|
74
|
+
"file": "useClipboard-DQ9COBXW.cjs",
|
|
75
|
+
"name": "useClipboard",
|
|
76
76
|
"imports": [
|
|
77
|
-
"_nivo-pie.es-
|
|
77
|
+
"_nivo-pie.es-DDmgfWkx.cjs"
|
|
78
78
|
]
|
|
79
79
|
},
|
|
80
|
-
"
|
|
81
|
-
"file": "
|
|
82
|
-
"name": "
|
|
80
|
+
"_useConfirm-CA4uEYqW.js": {
|
|
81
|
+
"file": "useConfirm-CA4uEYqW.js",
|
|
82
|
+
"name": "useConfirm",
|
|
83
|
+
"imports": [
|
|
84
|
+
"_nivo-pie.es-BDucg1Se.js"
|
|
85
|
+
]
|
|
83
86
|
},
|
|
84
|
-
"
|
|
85
|
-
"file": "
|
|
86
|
-
"name": "
|
|
87
|
+
"_useConfirm-LVh4L1xZ.cjs": {
|
|
88
|
+
"file": "useConfirm-LVh4L1xZ.cjs",
|
|
89
|
+
"name": "useConfirm",
|
|
90
|
+
"imports": [
|
|
91
|
+
"_nivo-pie.es-DDmgfWkx.cjs"
|
|
92
|
+
]
|
|
87
93
|
},
|
|
88
|
-
"_useLocalStorageState-
|
|
89
|
-
"file": "useLocalStorageState-
|
|
94
|
+
"_useLocalStorageState-B1YahEo2.js": {
|
|
95
|
+
"file": "useLocalStorageState-B1YahEo2.js",
|
|
90
96
|
"name": "useLocalStorageState",
|
|
91
97
|
"imports": [
|
|
92
|
-
"_nivo-pie.es-
|
|
98
|
+
"_nivo-pie.es-BDucg1Se.js"
|
|
93
99
|
]
|
|
94
100
|
},
|
|
95
|
-
"_useLocalStorageState-
|
|
96
|
-
"file": "useLocalStorageState-
|
|
101
|
+
"_useLocalStorageState-bxFIq9SR.cjs": {
|
|
102
|
+
"file": "useLocalStorageState-bxFIq9SR.cjs",
|
|
97
103
|
"name": "useLocalStorageState",
|
|
98
104
|
"imports": [
|
|
99
|
-
"_nivo-pie.es-
|
|
105
|
+
"_nivo-pie.es-DDmgfWkx.cjs"
|
|
100
106
|
]
|
|
101
107
|
},
|
|
102
|
-
"_usePermissions-
|
|
103
|
-
"file": "usePermissions-
|
|
108
|
+
"_usePermissions-CYf12h6x.cjs": {
|
|
109
|
+
"file": "usePermissions-CYf12h6x.cjs",
|
|
104
110
|
"name": "usePermissions",
|
|
105
111
|
"imports": [
|
|
106
|
-
"_nivo-pie.es-
|
|
112
|
+
"_nivo-pie.es-DDmgfWkx.cjs"
|
|
107
113
|
]
|
|
108
114
|
},
|
|
109
|
-
"_usePermissions-
|
|
110
|
-
"file": "usePermissions-
|
|
115
|
+
"_usePermissions-Cb6jEqr-.js": {
|
|
116
|
+
"file": "usePermissions-Cb6jEqr-.js",
|
|
111
117
|
"name": "usePermissions",
|
|
112
118
|
"imports": [
|
|
113
|
-
"_nivo-pie.es-
|
|
119
|
+
"_nivo-pie.es-BDucg1Se.js"
|
|
114
120
|
]
|
|
115
121
|
},
|
|
116
122
|
"src/contexts/index.ts": {
|
|
@@ -119,11 +125,11 @@
|
|
|
119
125
|
"src": "src/contexts/index.ts",
|
|
120
126
|
"isEntry": true,
|
|
121
127
|
"imports": [
|
|
122
|
-
"_nivo-pie.es-
|
|
123
|
-
"_useConfirm-
|
|
124
|
-
"_PrimaryButton-
|
|
125
|
-
"_useLocalStorageState-
|
|
126
|
-
"_dateUtils-
|
|
128
|
+
"_nivo-pie.es-DDmgfWkx.cjs",
|
|
129
|
+
"_useConfirm-LVh4L1xZ.cjs",
|
|
130
|
+
"_PrimaryButton-D597YT4l.cjs",
|
|
131
|
+
"_useLocalStorageState-bxFIq9SR.cjs",
|
|
132
|
+
"_dateUtils-D-Kr9uyw.cjs"
|
|
127
133
|
]
|
|
128
134
|
},
|
|
129
135
|
"src/hooks/index.ts": {
|
|
@@ -132,12 +138,12 @@
|
|
|
132
138
|
"src": "src/hooks/index.ts",
|
|
133
139
|
"isEntry": true,
|
|
134
140
|
"imports": [
|
|
135
|
-
"_nivo-pie.es-
|
|
136
|
-
"_useConfirm-
|
|
137
|
-
"_useLocalStorageState-
|
|
138
|
-
"_dateUtils-
|
|
139
|
-
"
|
|
140
|
-
"_usePermissions-
|
|
141
|
+
"_nivo-pie.es-DDmgfWkx.cjs",
|
|
142
|
+
"_useConfirm-LVh4L1xZ.cjs",
|
|
143
|
+
"_useLocalStorageState-bxFIq9SR.cjs",
|
|
144
|
+
"_dateUtils-D-Kr9uyw.cjs",
|
|
145
|
+
"_useClipboard-DQ9COBXW.cjs",
|
|
146
|
+
"_usePermissions-CYf12h6x.cjs"
|
|
141
147
|
]
|
|
142
148
|
},
|
|
143
149
|
"src/layout/index.ts": {
|
|
@@ -146,9 +152,9 @@
|
|
|
146
152
|
"src": "src/layout/index.ts",
|
|
147
153
|
"isEntry": true,
|
|
148
154
|
"imports": [
|
|
149
|
-
"_nivo-pie.es-
|
|
150
|
-
"_usePermissions-
|
|
151
|
-
"_SimpleTooltip-
|
|
155
|
+
"_nivo-pie.es-DDmgfWkx.cjs",
|
|
156
|
+
"_usePermissions-CYf12h6x.cjs",
|
|
157
|
+
"_SimpleTooltip-DSvr5tFN.cjs"
|
|
152
158
|
]
|
|
153
159
|
},
|
|
154
160
|
"src/main.ts": {
|
|
@@ -157,13 +163,13 @@
|
|
|
157
163
|
"src": "src/main.ts",
|
|
158
164
|
"isEntry": true,
|
|
159
165
|
"imports": [
|
|
160
|
-
"_nivo-pie.es-
|
|
161
|
-
"_PrimaryButton-
|
|
162
|
-
"_dateUtils-
|
|
163
|
-
"_SimpleTooltip-
|
|
164
|
-
"
|
|
165
|
-
"_useConfirm-
|
|
166
|
-
"_searchUtils-
|
|
166
|
+
"_nivo-pie.es-DDmgfWkx.cjs",
|
|
167
|
+
"_PrimaryButton-D597YT4l.cjs",
|
|
168
|
+
"_dateUtils-D-Kr9uyw.cjs",
|
|
169
|
+
"_SimpleTooltip-DSvr5tFN.cjs",
|
|
170
|
+
"_useClipboard-DQ9COBXW.cjs",
|
|
171
|
+
"_useConfirm-LVh4L1xZ.cjs",
|
|
172
|
+
"_searchUtils-LPeUPG5Y.cjs"
|
|
167
173
|
]
|
|
168
174
|
},
|
|
169
175
|
"src/utils/index.ts": {
|
|
@@ -172,10 +178,10 @@
|
|
|
172
178
|
"src": "src/utils/index.ts",
|
|
173
179
|
"isEntry": true,
|
|
174
180
|
"imports": [
|
|
175
|
-
"_nivo-pie.es-
|
|
176
|
-
"_dateUtils-
|
|
177
|
-
"_searchUtils-
|
|
178
|
-
"_SimpleTooltip-
|
|
181
|
+
"_nivo-pie.es-DDmgfWkx.cjs",
|
|
182
|
+
"_dateUtils-D-Kr9uyw.cjs",
|
|
183
|
+
"_searchUtils-LPeUPG5Y.cjs",
|
|
184
|
+
"_SimpleTooltip-DSvr5tFN.cjs"
|
|
179
185
|
]
|
|
180
186
|
},
|
|
181
187
|
"style.css": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as r, c as d, P as D, M as tt, v as R, J as nt,
|
|
1
|
+
import { j as r, c as d, P as D, M as tt, v as R, J as nt, ax as be, ay as Se, o as V, G as $e, az as ot, aA as st, w as T, aB as je, aC as ke, aD as Le, aE as at, aF as _e, aG as rt, A as it, I as lt, L as dt, aH as Oe, F as De, H as ct, aI as ut } from "./nivo-pie.es-BDucg1Se.js";
|
|
2
2
|
import * as u from "react";
|
|
3
3
|
import { useRef as N, useEffect as we, useContext as Ie, forwardRef as ft, useState as ve, useImperativeHandle as mt, useCallback as Ee, useMemo as gt } from "react";
|
|
4
4
|
import ht from "react-dom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("./nivo-pie.es-DP0bHyrp.cjs"),c=require("react"),Ke=require("react-dom"),qe=require("react-router-dom");function Ve(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const u=Ve(c),ze="_loading_rgybp_1",Pe="_spinner-grow_rgybp_10",Xe="_second_rgybp_14",Ye="_third_rgybp_17",Je="_loadingBlock_rgybp_21",N={loading:ze,"spinner-grow":"_spinner-grow_rgybp_10",spinnerGrow:Pe,second:Xe,third:Ye,loadingBlock:Je},Qe=()=>n.jsxRuntimeExports.jsxs("div",{className:n.classNames("luminus-loading",N.loading),children:[n.jsxRuntimeExports.jsx("div",{className:n.classNames("spinner-grow",N.spinnerGrow,"text-primary"),role:"status"}),n.jsxRuntimeExports.jsx("div",{className:n.classNames("spinner-grow",N.spinnerGrow,"text-primary",N.second),role:"status"}),n.jsxRuntimeExports.jsx("div",{className:n.classNames("spinner-grow",N.spinnerGrow,"text-primary",N.third),role:"status"})]}),we=t=>u.forwardRef((e,s)=>n.jsxRuntimeExports.jsx("div",{...e,ref:s,className:n.classNames(e.className,t)}));function Ne(t){const e=c.useRef(null);return c.useEffect(()=>{e.current=t}),e.current}const Ze={"aria-label":n.Oe.string,onClick:n.Oe.func,variant:n.Oe.oneOf(["white"])},Z=u.forwardRef(({className:t,variant:e,"aria-label":s="Close",...o},r)=>n.jsxRuntimeExports.jsx("button",{ref:r,type:"button",className:n.classNames("btn-close",e&&`btn-close-${e}`,t),"aria-label":s,...o}));Z.displayName="CloseButton";Z.propTypes=Ze;var et=Function.prototype.bind.call(Function.prototype.call,[].slice);function j(t,e){return et(t.querySelectorAll(e))}const tt="data-rr-ui-";function je(t){return`${tt}${t}`}const nt={type:n.Oe.string,tooltip:n.Oe.bool,as:n.Oe.elementType},ee=u.forwardRef(({as:t="div",className:e,type:s="valid",tooltip:o=!1,...r},a)=>n.jsxRuntimeExports.jsx(t,{...r,ref:a,className:n.classNames(e,`${s}-${o?"tooltip":"feedback"}`)}));ee.displayName="Feedback";ee.propTypes=nt;const Ce=u.forwardRef(({bsPrefix:t,type:e,size:s,htmlSize:o,id:r,className:a,isValid:g=!1,isInvalid:m=!1,plaintext:h,readOnly:y,as:f="input",...v},x)=>{const{controlId:E}=c.useContext(n.FormContext);return t=n.useBootstrapPrefix(t,"form-control"),process.env.NODE_ENV!=="production"&&n.warning(E==null||!r,"`controlId` is ignored on `<FormControl>` when `id` is specified."),n.jsxRuntimeExports.jsx(f,{...v,type:e,size:o,ref:x,readOnly:y,id:r||E,className:n.classNames(a,h?`${t}-plaintext`:t,s&&`${t}-${s}`,e==="color"&&`${t}-color`,g&&"is-valid",m&&"is-invalid")})});Ce.displayName="FormControl";const st=Object.assign(Ce,{Feedback:ee});var Q;function Re(t){if((!Q&&Q!==0||t)&&n.canUseDOM){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),Q=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return Q}function me(t){t===void 0&&(t=n.ownerDocument());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function ot(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const be=je("modal-open");class ge{constructor({ownerDocument:e,handleContainerOverflow:s=!0,isRTL:o=!1}={}){this.handleContainerOverflow=s,this.isRTL=o,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return ot(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const s={overflow:"hidden"},o=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[o]:r.style[o]},e.scrollBarWidth&&(s[o]=`${parseInt(n.style(r,o)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(be,""),n.style(r,s)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const s=this.getElement();s.removeAttribute(be),Object.assign(s.style,e.style)}add(e){let s=this.modals.indexOf(e);return s!==-1||(s=this.modals.length,this.modals.push(e),this.setModalAttributes(e),s!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),s}remove(e){const s=this.modals.indexOf(e);s!==-1&&(this.modals.splice(s,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const rt=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function at(t,e){if(t==null)return{};var s={};for(var o in t)if({}.hasOwnProperty.call(t,o)){if(e.indexOf(o)>=0)continue;s[o]=t[o]}return s}let fe;function it(t){return fe||(fe=new ge({ownerDocument:t==null?void 0:t.document})),fe}function lt(t){const e=n.useWindow(),s=t||it(e),o=c.useRef({dialog:null,backdrop:null});return Object.assign(o.current,{add:()=>s.add(o.current),remove:()=>s.remove(o.current),isTopModal:()=>s.isTopModal(o.current),setDialogRef:c.useCallback(r=>{o.current.dialog=r},[]),setBackdropRef:c.useCallback(r=>{o.current.backdrop=r},[])})}const Me=c.forwardRef((t,e)=>{let{show:s=!1,role:o="dialog",className:r,style:a,children:g,backdrop:m=!0,keyboard:h=!0,onBackdropClick:y,onEscapeKeyDown:f,transition:v,runTransition:x,backdropTransition:E,runBackdropTransition:te,autoFocus:H=!0,enforceFocus:ne=!0,restoreFocus:C=!0,restoreFocusOptions:se,renderDialog:U,renderBackdrop:oe=l=>n.jsxRuntimeExports.jsx("div",Object.assign({},l)),manager:re,container:ae,onShow:G,onHide:F=()=>{},onExit:ie,onExited:$,onExiting:K,onEnter:q,onEntering:V,onEntered:z}=t,le=at(t,rt);const R=n.useWindow(),M=n.useWaitForDOMRef(ae),d=lt(re),ce=n.useMounted(),P=Ne(s),[w,T]=c.useState(!s),p=c.useRef(null);c.useImperativeHandle(e,()=>d,[d]),n.canUseDOM&&!P&&s&&(p.current=me(R==null?void 0:R.document)),s&&w&&T(!1);const b=n.useEventCallback(()=>{if(d.add(),k.current=n.listen(document,"keydown",ue),L.current=n.listen(document,"focus",()=>setTimeout(de),!0),G&&G(),H){var l,J;const W=me((l=(J=d.dialog)==null?void 0:J.ownerDocument)!=null?l:R==null?void 0:R.document);d.dialog&&W&&!n.contains(d.dialog,W)&&(p.current=W,d.dialog.focus())}}),D=n.useEventCallback(()=>{if(d.remove(),k.current==null||k.current(),L.current==null||L.current(),C){var l;(l=p.current)==null||l.focus==null||l.focus(se),p.current=null}});c.useEffect(()=>{!s||!M||b()},[s,M,b]),c.useEffect(()=>{w&&D()},[w,D]),n.useWillUnmount(()=>{D()});const de=n.useEventCallback(()=>{if(!ne||!ce()||!d.isTopModal())return;const l=me(R==null?void 0:R.document);d.dialog&&l&&!n.contains(d.dialog,l)&&d.dialog.focus()}),X=n.useEventCallback(l=>{l.target===l.currentTarget&&(y==null||y(l),m===!0&&F())}),ue=n.useEventCallback(l=>{h&&n.isEscKey(l)&&d.isTopModal()&&(f==null||f(l),l.defaultPrevented||F())}),L=c.useRef(),k=c.useRef(),Y=(...l)=>{T(!0),$==null||$(...l)};if(!M)return null;const O=Object.assign({role:o,ref:d.setDialogRef,"aria-modal":o==="dialog"?!0:void 0},le,{style:a,className:r,tabIndex:-1});let I=U?U(O):n.jsxRuntimeExports.jsx("div",Object.assign({},O,{children:u.cloneElement(g,{role:"document"})}));I=n.renderTransition(v,x,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!s,onExit:ie,onExiting:K,onExited:Y,onEnter:q,onEntering:V,onEntered:z,children:I});let _=null;return m&&(_=oe({ref:d.setBackdropRef,onClick:X}),_=n.renderTransition(E,te,{in:!!s,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:_})),n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:Ke.createPortal(n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[_,I]}),M)})});Me.displayName="Modal";const Te=Object.assign(Me,{Manager:ge});function ct(t,e){t.classList?t.classList.add(e):n.hasClass(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function ve(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function dt(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=ve(t.className,e):t.setAttribute("class",ve(t.className&&t.className.baseVal||"",e))}const S={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class ke extends ge{adjustAndStore(e,s,o){const r=s.style[e];s.dataset[e]=r,n.style(s,{[e]:`${parseFloat(n.style(s,e))+o}px`})}restore(e,s){const o=s.dataset[e];o!==void 0&&(delete s.dataset[e],n.style(s,{[e]:o}))}setContainerStyle(e){super.setContainerStyle(e);const s=this.getElement();if(ct(s,"modal-open"),!e.scrollBarWidth)return;const o=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";j(s,S.FIXED_CONTENT).forEach(a=>this.adjustAndStore(o,a,e.scrollBarWidth)),j(s,S.STICKY_CONTENT).forEach(a=>this.adjustAndStore(r,a,-e.scrollBarWidth)),j(s,S.NAVBAR_TOGGLER).forEach(a=>this.adjustAndStore(r,a,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const s=this.getElement();dt(s,"modal-open");const o=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";j(s,S.FIXED_CONTENT).forEach(a=>this.restore(o,a)),j(s,S.STICKY_CONTENT).forEach(a=>this.restore(r,a)),j(s,S.NAVBAR_TOGGLER).forEach(a=>this.restore(r,a))}}let pe;function Oe(t){return pe||(pe=new ke(t)),pe}const _e=u.forwardRef(({className:t,bsPrefix:e,as:s="div",...o},r)=>(e=n.useBootstrapPrefix(e,"modal-body"),n.jsxRuntimeExports.jsx(s,{ref:r,className:n.classNames(t,e),...o})));_e.displayName="ModalBody";const he=u.createContext({onHide(){}}),xe=u.forwardRef(({bsPrefix:t,className:e,contentClassName:s,centered:o,size:r,fullscreen:a,children:g,scrollable:m,...h},y)=>{t=n.useBootstrapPrefix(t,"modal");const f=`${t}-dialog`,v=typeof a=="string"?`${t}-fullscreen-${a}`:`${t}-fullscreen`;return n.jsxRuntimeExports.jsx("div",{...h,ref:y,className:n.classNames(f,e,r&&`${t}-${r}`,o&&`${f}-centered`,m&&`${f}-scrollable`,a&&v),children:n.jsxRuntimeExports.jsx("div",{className:n.classNames(`${t}-content`,s),children:g})})});xe.displayName="ModalDialog";const Be=u.forwardRef(({className:t,bsPrefix:e,as:s="div",...o},r)=>(e=n.useBootstrapPrefix(e,"modal-footer"),n.jsxRuntimeExports.jsx(s,{ref:r,className:n.classNames(t,e),...o})));Be.displayName="ModalFooter";const Se=u.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:s=!1,onHide:o,children:r,...a},g)=>{const m=c.useContext(he),h=n.useEventCallback(()=>{m==null||m.onHide(),o==null||o()});return n.jsxRuntimeExports.jsxs("div",{ref:g,...a,children:[r,s&&n.jsxRuntimeExports.jsx(Z,{"aria-label":t,variant:e,onClick:h})]})}),Ae=u.forwardRef(({bsPrefix:t,className:e,closeLabel:s="Close",closeButton:o=!1,...r},a)=>(t=n.useBootstrapPrefix(t,"modal-header"),n.jsxRuntimeExports.jsx(Se,{ref:a,...r,className:n.classNames(e,t),closeLabel:s,closeButton:o})));Ae.displayName="ModalHeader";const ut=we("h4"),Fe=u.forwardRef(({className:t,bsPrefix:e,as:s=ut,...o},r)=>(e=n.useBootstrapPrefix(e,"modal-title"),n.jsxRuntimeExports.jsx(s,{ref:r,className:n.classNames(t,e),...o})));Fe.displayName="ModalTitle";function mt(t){return n.jsxRuntimeExports.jsx(n.Fade,{...t,timeout:null})}function ft(t){return n.jsxRuntimeExports.jsx(n.Fade,{...t,timeout:null})}const $e=u.forwardRef(({bsPrefix:t,className:e,style:s,dialogClassName:o,contentClassName:r,children:a,dialogAs:g=xe,"data-bs-theme":m,"aria-labelledby":h,"aria-describedby":y,"aria-label":f,show:v=!1,animation:x=!0,backdrop:E=!0,keyboard:te=!0,onEscapeKeyDown:H,onShow:ne,onHide:C,container:se,autoFocus:U=!0,enforceFocus:oe=!0,restoreFocus:re=!0,restoreFocusOptions:ae,onEntered:G,onExit:F,onExiting:ie,onEnter:$,onEntering:K,onExited:q,backdropClassName:V,manager:z,...le},R)=>{const[M,d]=c.useState({}),[ce,P]=c.useState(!1),w=c.useRef(!1),T=c.useRef(!1),p=c.useRef(null),[b,D]=n.useCallbackRef(),de=n.useMergedRefs(R,D),X=n.useEventCallback(C),ue=n.useIsRTL();t=n.useBootstrapPrefix(t,"modal");const L=c.useMemo(()=>({onHide:X}),[X]);function k(){return z||Oe({isRTL:ue})}function Y(i){if(!n.canUseDOM)return;const B=k().getScrollbarWidth()>0,ye=i.scrollHeight>n.ownerDocument(i).documentElement.clientHeight;d({paddingRight:B&&!ye?Re():void 0,paddingLeft:!B&&ye?Re():void 0})}const O=n.useEventCallback(()=>{b&&Y(b.dialog)});n.useWillUnmount(()=>{n.removeEventListener(window,"resize",O),p.current==null||p.current()});const I=()=>{w.current=!0},_=i=>{w.current&&b&&i.target===b.dialog&&(T.current=!0),w.current=!1},l=()=>{P(!0),p.current=n.transitionEnd(b.dialog,()=>{P(!1)})},J=i=>{i.target===i.currentTarget&&l()},W=i=>{if(E==="static"){J(i);return}if(T.current||i.target!==i.currentTarget){T.current=!1;return}C==null||C()},De=i=>{te?H==null||H(i):(i.preventDefault(),E==="static"&&l())},Le=(i,B)=>{i&&Y(i),$==null||$(i,B)},Ie=i=>{p.current==null||p.current(),F==null||F(i)},We=(i,B)=>{K==null||K(i,B),n.addEventListener(window,"resize",O)},He=i=>{i&&(i.style.display=""),q==null||q(i),n.removeEventListener(window,"resize",O)},Ue=c.useCallback(i=>n.jsxRuntimeExports.jsx("div",{...i,className:n.classNames(`${t}-backdrop`,V,!x&&"show")}),[x,V,t]),Ee={...s,...M};Ee.display="block";const Ge=i=>n.jsxRuntimeExports.jsx("div",{role:"dialog",...i,style:Ee,className:n.classNames(e,t,ce&&`${t}-static`,!x&&"show"),onClick:E?W:void 0,onMouseUp:_,"data-bs-theme":m,"aria-label":f,"aria-labelledby":h,"aria-describedby":y,children:n.jsxRuntimeExports.jsx(g,{...le,onMouseDown:I,className:o,contentClassName:r,children:a})});return n.jsxRuntimeExports.jsx(he.Provider,{value:L,children:n.jsxRuntimeExports.jsx(Te,{show:v,ref:de,backdrop:E,container:se,keyboard:!0,autoFocus:U,enforceFocus:oe,restoreFocus:re,restoreFocusOptions:ae,onEscapeKeyDown:De,onShow:ne,onHide:C,onEnter:Le,onEntering:We,onEntered:G,onExit:Ie,onExiting:ie,onExited:He,manager:k(),transition:x?mt:void 0,backdropTransition:x?ft:void 0,renderBackdrop:Ue,renderDialog:Ge})})});$e.displayName="Modal";const pt=Object.assign($e,{Body:_e,Header:Ae,Title:Fe,Footer:Be,Dialog:xe,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),gt="_button_1wjon_1",ht="_filled_1wjon_7",xt="_sm_1wjon_13",Et="_md_1wjon_18",yt="_lg_1wjon_23",A={button:gt,filled:ht,sm:xt,md:Et,lg:yt},Rt=({variant:t="filled",color:e="primary",size:s="md",className:o,children:r,...a})=>a.as==="link"?n.jsxRuntimeExports.jsx(qe.Link,{to:a.href??"/",className:n.classNames(`luminus-primary-button ${e} btn ${t==="outlined"?`btn-outline-${e}`:`btn-${e}`} ${o??""}`,A.button,A[t],A[s]),...a,children:r}):a.as==="button"||a.as===void 0?n.jsxRuntimeExports.jsx("button",{type:"button",className:n.classNames(`luminus-primary-button ${e} btn ${t==="outlined"?`btn-outline-${e}`:`btn-${e}`} ${o??""}`,A.button,A[t],A[s]),...a,children:r}):null;exports.AbstractModalHeader=Se;exports.BaseModal=Te;exports.BootstrapModalManager=ke;exports.CloseButton=Z;exports.Feedback=ee;exports.FormControl=st;exports.Loading=Qe;exports.Modal=pt;exports.ModalContext=he;exports.PrimaryButton=Rt;exports.classes=N;exports.dataAttr=je;exports.divWithClassName=we;exports.getSharedManager=Oe;exports.qsa=j;exports.usePrevious=Ne;
|
|
1
|
+
"use strict";const n=require("./nivo-pie.es-DDmgfWkx.cjs"),c=require("react"),Ke=require("react-dom"),qe=require("react-router-dom");function Ve(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const u=Ve(c),ze="_loading_rgybp_1",Pe="_spinner-grow_rgybp_10",Xe="_second_rgybp_14",Ye="_third_rgybp_17",Je="_loadingBlock_rgybp_21",N={loading:ze,"spinner-grow":"_spinner-grow_rgybp_10",spinnerGrow:Pe,second:Xe,third:Ye,loadingBlock:Je},Qe=()=>n.jsxRuntimeExports.jsxs("div",{className:n.classNames("luminus-loading",N.loading),children:[n.jsxRuntimeExports.jsx("div",{className:n.classNames("spinner-grow",N.spinnerGrow,"text-primary"),role:"status"}),n.jsxRuntimeExports.jsx("div",{className:n.classNames("spinner-grow",N.spinnerGrow,"text-primary",N.second),role:"status"}),n.jsxRuntimeExports.jsx("div",{className:n.classNames("spinner-grow",N.spinnerGrow,"text-primary",N.third),role:"status"})]}),we=t=>u.forwardRef((e,s)=>n.jsxRuntimeExports.jsx("div",{...e,ref:s,className:n.classNames(e.className,t)}));function Ne(t){const e=c.useRef(null);return c.useEffect(()=>{e.current=t}),e.current}const Ze={"aria-label":n.Oe.string,onClick:n.Oe.func,variant:n.Oe.oneOf(["white"])},Z=u.forwardRef(({className:t,variant:e,"aria-label":s="Close",...o},r)=>n.jsxRuntimeExports.jsx("button",{ref:r,type:"button",className:n.classNames("btn-close",e&&`btn-close-${e}`,t),"aria-label":s,...o}));Z.displayName="CloseButton";Z.propTypes=Ze;var et=Function.prototype.bind.call(Function.prototype.call,[].slice);function j(t,e){return et(t.querySelectorAll(e))}const tt="data-rr-ui-";function je(t){return`${tt}${t}`}const nt={type:n.Oe.string,tooltip:n.Oe.bool,as:n.Oe.elementType},ee=u.forwardRef(({as:t="div",className:e,type:s="valid",tooltip:o=!1,...r},a)=>n.jsxRuntimeExports.jsx(t,{...r,ref:a,className:n.classNames(e,`${s}-${o?"tooltip":"feedback"}`)}));ee.displayName="Feedback";ee.propTypes=nt;const Ce=u.forwardRef(({bsPrefix:t,type:e,size:s,htmlSize:o,id:r,className:a,isValid:g=!1,isInvalid:m=!1,plaintext:h,readOnly:y,as:f="input",...v},x)=>{const{controlId:E}=c.useContext(n.FormContext);return t=n.useBootstrapPrefix(t,"form-control"),process.env.NODE_ENV!=="production"&&n.warning(E==null||!r,"`controlId` is ignored on `<FormControl>` when `id` is specified."),n.jsxRuntimeExports.jsx(f,{...v,type:e,size:o,ref:x,readOnly:y,id:r||E,className:n.classNames(a,h?`${t}-plaintext`:t,s&&`${t}-${s}`,e==="color"&&`${t}-color`,g&&"is-valid",m&&"is-invalid")})});Ce.displayName="FormControl";const st=Object.assign(Ce,{Feedback:ee});var Q;function Re(t){if((!Q&&Q!==0||t)&&n.canUseDOM){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),Q=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return Q}function me(t){t===void 0&&(t=n.ownerDocument());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function ot(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const be=je("modal-open");class ge{constructor({ownerDocument:e,handleContainerOverflow:s=!0,isRTL:o=!1}={}){this.handleContainerOverflow=s,this.isRTL=o,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return ot(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const s={overflow:"hidden"},o=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[o]:r.style[o]},e.scrollBarWidth&&(s[o]=`${parseInt(n.style(r,o)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(be,""),n.style(r,s)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const s=this.getElement();s.removeAttribute(be),Object.assign(s.style,e.style)}add(e){let s=this.modals.indexOf(e);return s!==-1||(s=this.modals.length,this.modals.push(e),this.setModalAttributes(e),s!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),s}remove(e){const s=this.modals.indexOf(e);s!==-1&&(this.modals.splice(s,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const rt=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function at(t,e){if(t==null)return{};var s={};for(var o in t)if({}.hasOwnProperty.call(t,o)){if(e.indexOf(o)>=0)continue;s[o]=t[o]}return s}let fe;function it(t){return fe||(fe=new ge({ownerDocument:t==null?void 0:t.document})),fe}function lt(t){const e=n.useWindow(),s=t||it(e),o=c.useRef({dialog:null,backdrop:null});return Object.assign(o.current,{add:()=>s.add(o.current),remove:()=>s.remove(o.current),isTopModal:()=>s.isTopModal(o.current),setDialogRef:c.useCallback(r=>{o.current.dialog=r},[]),setBackdropRef:c.useCallback(r=>{o.current.backdrop=r},[])})}const Me=c.forwardRef((t,e)=>{let{show:s=!1,role:o="dialog",className:r,style:a,children:g,backdrop:m=!0,keyboard:h=!0,onBackdropClick:y,onEscapeKeyDown:f,transition:v,runTransition:x,backdropTransition:E,runBackdropTransition:te,autoFocus:H=!0,enforceFocus:ne=!0,restoreFocus:C=!0,restoreFocusOptions:se,renderDialog:U,renderBackdrop:oe=l=>n.jsxRuntimeExports.jsx("div",Object.assign({},l)),manager:re,container:ae,onShow:G,onHide:F=()=>{},onExit:ie,onExited:$,onExiting:K,onEnter:q,onEntering:V,onEntered:z}=t,le=at(t,rt);const R=n.useWindow(),M=n.useWaitForDOMRef(ae),d=lt(re),ce=n.useMounted(),P=Ne(s),[w,T]=c.useState(!s),p=c.useRef(null);c.useImperativeHandle(e,()=>d,[d]),n.canUseDOM&&!P&&s&&(p.current=me(R==null?void 0:R.document)),s&&w&&T(!1);const b=n.useEventCallback(()=>{if(d.add(),k.current=n.listen(document,"keydown",ue),L.current=n.listen(document,"focus",()=>setTimeout(de),!0),G&&G(),H){var l,J;const W=me((l=(J=d.dialog)==null?void 0:J.ownerDocument)!=null?l:R==null?void 0:R.document);d.dialog&&W&&!n.contains(d.dialog,W)&&(p.current=W,d.dialog.focus())}}),D=n.useEventCallback(()=>{if(d.remove(),k.current==null||k.current(),L.current==null||L.current(),C){var l;(l=p.current)==null||l.focus==null||l.focus(se),p.current=null}});c.useEffect(()=>{!s||!M||b()},[s,M,b]),c.useEffect(()=>{w&&D()},[w,D]),n.useWillUnmount(()=>{D()});const de=n.useEventCallback(()=>{if(!ne||!ce()||!d.isTopModal())return;const l=me(R==null?void 0:R.document);d.dialog&&l&&!n.contains(d.dialog,l)&&d.dialog.focus()}),X=n.useEventCallback(l=>{l.target===l.currentTarget&&(y==null||y(l),m===!0&&F())}),ue=n.useEventCallback(l=>{h&&n.isEscKey(l)&&d.isTopModal()&&(f==null||f(l),l.defaultPrevented||F())}),L=c.useRef(),k=c.useRef(),Y=(...l)=>{T(!0),$==null||$(...l)};if(!M)return null;const O=Object.assign({role:o,ref:d.setDialogRef,"aria-modal":o==="dialog"?!0:void 0},le,{style:a,className:r,tabIndex:-1});let I=U?U(O):n.jsxRuntimeExports.jsx("div",Object.assign({},O,{children:u.cloneElement(g,{role:"document"})}));I=n.renderTransition(v,x,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!s,onExit:ie,onExiting:K,onExited:Y,onEnter:q,onEntering:V,onEntered:z,children:I});let _=null;return m&&(_=oe({ref:d.setBackdropRef,onClick:X}),_=n.renderTransition(E,te,{in:!!s,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:_})),n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:Ke.createPortal(n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[_,I]}),M)})});Me.displayName="Modal";const Te=Object.assign(Me,{Manager:ge});function ct(t,e){t.classList?t.classList.add(e):n.hasClass(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function ve(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function dt(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=ve(t.className,e):t.setAttribute("class",ve(t.className&&t.className.baseVal||"",e))}const S={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class ke extends ge{adjustAndStore(e,s,o){const r=s.style[e];s.dataset[e]=r,n.style(s,{[e]:`${parseFloat(n.style(s,e))+o}px`})}restore(e,s){const o=s.dataset[e];o!==void 0&&(delete s.dataset[e],n.style(s,{[e]:o}))}setContainerStyle(e){super.setContainerStyle(e);const s=this.getElement();if(ct(s,"modal-open"),!e.scrollBarWidth)return;const o=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";j(s,S.FIXED_CONTENT).forEach(a=>this.adjustAndStore(o,a,e.scrollBarWidth)),j(s,S.STICKY_CONTENT).forEach(a=>this.adjustAndStore(r,a,-e.scrollBarWidth)),j(s,S.NAVBAR_TOGGLER).forEach(a=>this.adjustAndStore(r,a,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const s=this.getElement();dt(s,"modal-open");const o=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";j(s,S.FIXED_CONTENT).forEach(a=>this.restore(o,a)),j(s,S.STICKY_CONTENT).forEach(a=>this.restore(r,a)),j(s,S.NAVBAR_TOGGLER).forEach(a=>this.restore(r,a))}}let pe;function Oe(t){return pe||(pe=new ke(t)),pe}const _e=u.forwardRef(({className:t,bsPrefix:e,as:s="div",...o},r)=>(e=n.useBootstrapPrefix(e,"modal-body"),n.jsxRuntimeExports.jsx(s,{ref:r,className:n.classNames(t,e),...o})));_e.displayName="ModalBody";const he=u.createContext({onHide(){}}),xe=u.forwardRef(({bsPrefix:t,className:e,contentClassName:s,centered:o,size:r,fullscreen:a,children:g,scrollable:m,...h},y)=>{t=n.useBootstrapPrefix(t,"modal");const f=`${t}-dialog`,v=typeof a=="string"?`${t}-fullscreen-${a}`:`${t}-fullscreen`;return n.jsxRuntimeExports.jsx("div",{...h,ref:y,className:n.classNames(f,e,r&&`${t}-${r}`,o&&`${f}-centered`,m&&`${f}-scrollable`,a&&v),children:n.jsxRuntimeExports.jsx("div",{className:n.classNames(`${t}-content`,s),children:g})})});xe.displayName="ModalDialog";const Be=u.forwardRef(({className:t,bsPrefix:e,as:s="div",...o},r)=>(e=n.useBootstrapPrefix(e,"modal-footer"),n.jsxRuntimeExports.jsx(s,{ref:r,className:n.classNames(t,e),...o})));Be.displayName="ModalFooter";const Se=u.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:s=!1,onHide:o,children:r,...a},g)=>{const m=c.useContext(he),h=n.useEventCallback(()=>{m==null||m.onHide(),o==null||o()});return n.jsxRuntimeExports.jsxs("div",{ref:g,...a,children:[r,s&&n.jsxRuntimeExports.jsx(Z,{"aria-label":t,variant:e,onClick:h})]})}),Ae=u.forwardRef(({bsPrefix:t,className:e,closeLabel:s="Close",closeButton:o=!1,...r},a)=>(t=n.useBootstrapPrefix(t,"modal-header"),n.jsxRuntimeExports.jsx(Se,{ref:a,...r,className:n.classNames(e,t),closeLabel:s,closeButton:o})));Ae.displayName="ModalHeader";const ut=we("h4"),Fe=u.forwardRef(({className:t,bsPrefix:e,as:s=ut,...o},r)=>(e=n.useBootstrapPrefix(e,"modal-title"),n.jsxRuntimeExports.jsx(s,{ref:r,className:n.classNames(t,e),...o})));Fe.displayName="ModalTitle";function mt(t){return n.jsxRuntimeExports.jsx(n.Fade,{...t,timeout:null})}function ft(t){return n.jsxRuntimeExports.jsx(n.Fade,{...t,timeout:null})}const $e=u.forwardRef(({bsPrefix:t,className:e,style:s,dialogClassName:o,contentClassName:r,children:a,dialogAs:g=xe,"data-bs-theme":m,"aria-labelledby":h,"aria-describedby":y,"aria-label":f,show:v=!1,animation:x=!0,backdrop:E=!0,keyboard:te=!0,onEscapeKeyDown:H,onShow:ne,onHide:C,container:se,autoFocus:U=!0,enforceFocus:oe=!0,restoreFocus:re=!0,restoreFocusOptions:ae,onEntered:G,onExit:F,onExiting:ie,onEnter:$,onEntering:K,onExited:q,backdropClassName:V,manager:z,...le},R)=>{const[M,d]=c.useState({}),[ce,P]=c.useState(!1),w=c.useRef(!1),T=c.useRef(!1),p=c.useRef(null),[b,D]=n.useCallbackRef(),de=n.useMergedRefs(R,D),X=n.useEventCallback(C),ue=n.useIsRTL();t=n.useBootstrapPrefix(t,"modal");const L=c.useMemo(()=>({onHide:X}),[X]);function k(){return z||Oe({isRTL:ue})}function Y(i){if(!n.canUseDOM)return;const B=k().getScrollbarWidth()>0,ye=i.scrollHeight>n.ownerDocument(i).documentElement.clientHeight;d({paddingRight:B&&!ye?Re():void 0,paddingLeft:!B&&ye?Re():void 0})}const O=n.useEventCallback(()=>{b&&Y(b.dialog)});n.useWillUnmount(()=>{n.removeEventListener(window,"resize",O),p.current==null||p.current()});const I=()=>{w.current=!0},_=i=>{w.current&&b&&i.target===b.dialog&&(T.current=!0),w.current=!1},l=()=>{P(!0),p.current=n.transitionEnd(b.dialog,()=>{P(!1)})},J=i=>{i.target===i.currentTarget&&l()},W=i=>{if(E==="static"){J(i);return}if(T.current||i.target!==i.currentTarget){T.current=!1;return}C==null||C()},De=i=>{te?H==null||H(i):(i.preventDefault(),E==="static"&&l())},Le=(i,B)=>{i&&Y(i),$==null||$(i,B)},Ie=i=>{p.current==null||p.current(),F==null||F(i)},We=(i,B)=>{K==null||K(i,B),n.addEventListener(window,"resize",O)},He=i=>{i&&(i.style.display=""),q==null||q(i),n.removeEventListener(window,"resize",O)},Ue=c.useCallback(i=>n.jsxRuntimeExports.jsx("div",{...i,className:n.classNames(`${t}-backdrop`,V,!x&&"show")}),[x,V,t]),Ee={...s,...M};Ee.display="block";const Ge=i=>n.jsxRuntimeExports.jsx("div",{role:"dialog",...i,style:Ee,className:n.classNames(e,t,ce&&`${t}-static`,!x&&"show"),onClick:E?W:void 0,onMouseUp:_,"data-bs-theme":m,"aria-label":f,"aria-labelledby":h,"aria-describedby":y,children:n.jsxRuntimeExports.jsx(g,{...le,onMouseDown:I,className:o,contentClassName:r,children:a})});return n.jsxRuntimeExports.jsx(he.Provider,{value:L,children:n.jsxRuntimeExports.jsx(Te,{show:v,ref:de,backdrop:E,container:se,keyboard:!0,autoFocus:U,enforceFocus:oe,restoreFocus:re,restoreFocusOptions:ae,onEscapeKeyDown:De,onShow:ne,onHide:C,onEnter:Le,onEntering:We,onEntered:G,onExit:Ie,onExiting:ie,onExited:He,manager:k(),transition:x?mt:void 0,backdropTransition:x?ft:void 0,renderBackdrop:Ue,renderDialog:Ge})})});$e.displayName="Modal";const pt=Object.assign($e,{Body:_e,Header:Ae,Title:Fe,Footer:Be,Dialog:xe,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),gt="_button_1wjon_1",ht="_filled_1wjon_7",xt="_sm_1wjon_13",Et="_md_1wjon_18",yt="_lg_1wjon_23",A={button:gt,filled:ht,sm:xt,md:Et,lg:yt},Rt=({variant:t="filled",color:e="primary",size:s="md",className:o,children:r,...a})=>a.as==="link"?n.jsxRuntimeExports.jsx(qe.Link,{to:a.href??"/",className:n.classNames(`luminus-primary-button ${e} btn ${t==="outlined"?`btn-outline-${e}`:`btn-${e}`} ${o??""}`,A.button,A[t],A[s]),...a,children:r}):a.as==="button"||a.as===void 0?n.jsxRuntimeExports.jsx("button",{type:"button",className:n.classNames(`luminus-primary-button ${e} btn ${t==="outlined"?`btn-outline-${e}`:`btn-${e}`} ${o??""}`,A.button,A[t],A[s]),...a,children:r}):null;exports.AbstractModalHeader=Se;exports.BaseModal=Te;exports.BootstrapModalManager=ke;exports.CloseButton=Z;exports.Feedback=ee;exports.FormControl=st;exports.Loading=Qe;exports.Modal=pt;exports.ModalContext=he;exports.PrimaryButton=Rt;exports.classes=N;exports.dataAttr=je;exports.divWithClassName=we;exports.getSharedManager=Oe;exports.qsa=j;exports.usePrevious=Ne;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as o, Q as a,
|
|
1
|
+
import { j as o, Q as a, aW as e } from "./nivo-pie.es-BDucg1Se.js";
|
|
2
2
|
const l = ({ text: s, placement: r, children: t }) => /* @__PURE__ */ o.jsx(a, { placement: r, overlay: /* @__PURE__ */ o.jsx(e, { className: "luminus-tooltip", children: s }), children: t });
|
|
3
3
|
export {
|
|
4
4
|
l as S
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./nivo-pie.es-
|
|
1
|
+
"use strict";const e=require("./nivo-pie.es-DDmgfWkx.cjs"),t=({text:i,placement:o,children:s})=>e.jsxRuntimeExports.jsx(e.OverlayTrigger,{placement:o,overlay:e.jsxRuntimeExports.jsx(e.Tooltip,{className:"luminus-tooltip",children:i}),children:s});exports.SimpleTooltip=t;
|
package/dist/contexts.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-pie.es-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-pie.es-DDmgfWkx.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-LVh4L1xZ.cjs"),d=require("./PrimaryButton-D597YT4l.cjs"),R=require("./useLocalStorageState-bxFIq9SR.cjs"),S=require("./dateUtils-D-Kr9uyw.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;
|
package/dist/contexts.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { t as L, j as r,
|
|
2
|
-
import { useState as v, useCallback as d, useMemo as S, useContext as j, useEffect as
|
|
1
|
+
import { t as L, j as r, as as F, U as P, at as G, au as B, al as H, a6 as q, aa as _, av as M, ab as V, ad as C, ac as J, aw as K } from "./nivo-pie.es-BDucg1Se.js";
|
|
2
|
+
import { useState as v, useCallback as d, useMemo as S, useContext as j, useEffect as w, useRef as R } from "react";
|
|
3
3
|
import { EventType as O } from "@azure/msal-browser";
|
|
4
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 W } from "./useConfirm-
|
|
8
|
-
import { f as g, b as $, P as T, L as X } from "./PrimaryButton-
|
|
9
|
-
import { u as Y, a as Z, b as ee } from "./useLocalStorageState-
|
|
10
|
-
import { e as te, p as U, m as se } from "./dateUtils-
|
|
7
|
+
import { u as W } from "./useConfirm-CA4uEYqW.js";
|
|
8
|
+
import { f as g, b as $, P as T, L as X } from "./PrimaryButton-B-4FDBTu.js";
|
|
9
|
+
import { u as Y, a as Z, b as ee } from "./useLocalStorageState-B1YahEo2.js";
|
|
10
|
+
import { e as te, p as U, m as se } from "./dateUtils-D_TxQkwR.js";
|
|
11
11
|
function ne(e) {
|
|
12
12
|
const a = L(e);
|
|
13
13
|
return a.setHours(23, 59, 59, 999), a;
|
|
@@ -41,7 +41,7 @@ const ie = ({ children: e }) => {
|
|
|
41
41
|
}, [s]), c = d((x) => {
|
|
42
42
|
x.preventDefault(), !(n.required && !o) && s(o);
|
|
43
43
|
}, [s, n.required, o]);
|
|
44
|
-
|
|
44
|
+
w(() => {
|
|
45
45
|
a === !0 && i(n.defaultValue ?? "");
|
|
46
46
|
}, [a, n.defaultValue]);
|
|
47
47
|
const m = S(() => ({
|
|
@@ -120,44 +120,44 @@ const ie = ({ children: e }) => {
|
|
|
120
120
|
const u = await l();
|
|
121
121
|
u && m(u);
|
|
122
122
|
}, [l]);
|
|
123
|
-
|
|
123
|
+
w(() => {
|
|
124
124
|
x();
|
|
125
125
|
}, [x]);
|
|
126
126
|
const I = d(() => {
|
|
127
127
|
const u = localStorage.getItem("user") ?? null;
|
|
128
128
|
return u ? JSON.parse(u ?? "") : null;
|
|
129
129
|
}, [])(), [b, D] = v({
|
|
130
|
-
state: I ?
|
|
130
|
+
state: I ? C.LOGGED_IN : C.LOGGING_IN,
|
|
131
131
|
user: I
|
|
132
|
-
}),
|
|
132
|
+
}), E = d(async (u) => {
|
|
133
133
|
let f = null;
|
|
134
134
|
return await a.get("/user/detail", u ? { headers: { Authorization: `Bearer ${u}` } } : void 0).then((N) => {
|
|
135
135
|
f = N.data;
|
|
136
136
|
}).catch(() => {
|
|
137
137
|
f = null;
|
|
138
138
|
}), f;
|
|
139
|
-
}, [a]),
|
|
139
|
+
}, [a]), k = d(() => {
|
|
140
140
|
localStorage.removeItem("user"), D({
|
|
141
|
-
state:
|
|
141
|
+
state: C.LOGGED_OUT,
|
|
142
142
|
user: null
|
|
143
143
|
}), n(null), o(null);
|
|
144
144
|
}, [o, n]), y = d(async (u) => {
|
|
145
145
|
D({
|
|
146
|
-
state:
|
|
146
|
+
state: C.LOGGING_IN,
|
|
147
147
|
user: null
|
|
148
148
|
});
|
|
149
|
-
const f = await
|
|
149
|
+
const f = await E(u);
|
|
150
150
|
return f ? (D({
|
|
151
|
-
state:
|
|
151
|
+
state: C.LOGGED_IN,
|
|
152
152
|
user: f
|
|
153
153
|
}), localStorage.setItem("user", JSON.stringify(f)), await i(), !0) : (D({
|
|
154
|
-
state:
|
|
154
|
+
state: C.LOGIN_FAILED,
|
|
155
155
|
user: null
|
|
156
156
|
}), !1);
|
|
157
|
-
}, [
|
|
158
|
-
|
|
159
|
-
}, [
|
|
160
|
-
|
|
157
|
+
}, [E, i]), p = d(() => {
|
|
158
|
+
k();
|
|
159
|
+
}, [k]);
|
|
160
|
+
w(() => {
|
|
161
161
|
if (t) {
|
|
162
162
|
const u = t.addEventCallback((f) => {
|
|
163
163
|
if (f.eventType === O.LOGIN_SUCCESS && f.payload) {
|
|
@@ -177,7 +177,7 @@ const ie = ({ children: e }) => {
|
|
|
177
177
|
p(), n(null);
|
|
178
178
|
});
|
|
179
179
|
}, [y, p, n]);
|
|
180
|
-
|
|
180
|
+
w(() => {
|
|
181
181
|
A(c);
|
|
182
182
|
}, [c, s == null ? void 0 : s.id, A]);
|
|
183
183
|
const z = S(() => ({
|
|
@@ -193,7 +193,7 @@ const ie = ({ children: e }) => {
|
|
|
193
193
|
msalInstance: e.useMsal ? e.msalInstance ?? null : null,
|
|
194
194
|
msalScopes: e.useMsal ? e.msalScopes ?? [] : []
|
|
195
195
|
}), [e]);
|
|
196
|
-
return
|
|
196
|
+
return w(() => {
|
|
197
197
|
if (e.useMsal) {
|
|
198
198
|
const n = e.msalInstance.addEventCallback((o) => {
|
|
199
199
|
if (o.eventType === O.LOGIN_SUCCESS || o.eventType === O.ACQUIRE_TOKEN_SUCCESS && o.payload) {
|
|
@@ -227,14 +227,14 @@ const ie = ({ children: e }) => {
|
|
|
227
227
|
nullStateBeforeLoad: !1,
|
|
228
228
|
nullStateOnFail: !0
|
|
229
229
|
}), m = R(null);
|
|
230
|
-
|
|
230
|
+
w(() => {
|
|
231
231
|
const h = () => {
|
|
232
232
|
c(), m.current = window.setTimeout(h, se() + 5e3);
|
|
233
233
|
};
|
|
234
234
|
return h(), () => {
|
|
235
235
|
m.current !== null && window.clearTimeout(m.current);
|
|
236
236
|
};
|
|
237
|
-
}, [c]),
|
|
237
|
+
}, [c]), w(() => {
|
|
238
238
|
const h = () => {
|
|
239
239
|
n();
|
|
240
240
|
};
|