react-luminus-components 1.1.28 → 1.2.0
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 +41 -41
- package/dist/{DataKey-CuZpR5t0.cjs → DataKey-CCnWsp5R.cjs} +1 -1
- package/dist/{DataKey-C3jtX0q4.js → DataKey-DEvxfpG4.js} +1 -1
- package/dist/{SimpleTooltip-BMSn8Fqk.js → SimpleTooltip-Bgsx47Y0.js} +1 -1
- package/dist/{SimpleTooltip-XmxUVlDH.cjs → SimpleTooltip-D3yt_5sa.cjs} +1 -1
- package/dist/{Typography-CHpY2hUz.cjs → Typography-CwxdFDrh.cjs} +1 -1
- package/dist/{Typography-DUoLZCdX.js → Typography-dPh0BYIU.js} +9 -9
- package/dist/{UserAvatarToggle-DP4YFoNZ.cjs → UserAvatarToggle-D8sQZp-d.cjs} +41 -41
- package/dist/{UserAvatarToggle-I_MgjXhA.js → UserAvatarToggle-DgGJIRzY.js} +68 -67
- package/dist/components/Buttons/ContextButton/ContextButton.d.ts +1 -1
- package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +1 -1
- package/dist/components/Form/CheckInput/CheckInput.d.ts +2 -10
- package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +2 -17
- package/dist/components/Form/SelectInput/SelectInput.d.ts +2 -17
- package/dist/components/Form/TextInput/TextInput.d.ts +2 -16
- package/dist/components/HookForm/CheckInput/HookFormCheckInput.d.ts +2 -2
- package/dist/components/HookForm/DropdownPicker/HookFormDropdownPicker.d.ts +2 -10
- package/dist/components/HookForm/FileInput/HookFormFileInput.d.ts +2 -13
- package/dist/components/HookForm/RadioInput/HookFormRadioInput.d.ts +2 -2
- package/dist/components/HookForm/SelectInput/HookFormSelectInput.d.ts +2 -2
- package/dist/components/HookForm/TextAreaInput/HookFormTextAreaInput.d.ts +2 -2
- package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +2 -2
- package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +4 -0
- package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +4 -0
- package/dist/components/InputContainers/index.d.ts +2 -0
- package/dist/components/common/Card/Card.d.ts +28 -0
- package/dist/components/common/InvalidFeedback/InvalidFeedback.d.ts +1 -2
- package/dist/components/common/PhotoLibrary/PhotoLibrary.d.ts +10 -0
- package/dist/components/common/PhotoLightbox/PhotoLightbox.d.ts +13 -0
- package/dist/components/common/index.d.ts +3 -1
- package/dist/contexts/prompt/PromptContext.d.ts +0 -3
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +251 -266
- package/dist/hooks/usePrompt/usePrompt.d.ts +1 -2
- package/dist/hooks/useZodSchemaTypes/useZodSchemaTypes.d.ts +6 -2
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +652 -652
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +5 -2
- package/dist/main.es.js +2109 -1952
- package/dist/models/index.d.ts +26 -8
- package/dist/models/prop-types/FormInputProps/FormCheckInputProps.d.ts +6 -0
- package/dist/models/prop-types/FormInputProps/FormFileInputProps.d.ts +11 -0
- package/dist/models/prop-types/FormInputProps/FormRadioInputProps.d.ts +6 -0
- package/dist/models/prop-types/FormInputProps/FormSelectInputProps.d.ts +6 -0
- package/dist/models/prop-types/FormInputProps/FormTextAreaInputProps.d.ts +6 -0
- package/dist/models/prop-types/FormInputProps/FormTextInputProps.d.ts +6 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormCheckInputProps.d.ts +4 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormDropdownPickerProps.d.ts +4 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormFileInputProps.d.ts +4 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormInputBaseProps.d.ts +7 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormRadioInputProps.d.ts +4 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormSelectInputProps.d.ts +4 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormTextAreaInputProps.d.ts +4 -0
- package/dist/models/prop-types/HookFormInputProps/HookFormTextInputProps.d.ts +4 -0
- package/dist/models/prop-types/InputContainerProps.d.ts +23 -0
- package/dist/models/prop-types/InputProps/CheckInputProps.d.ts +5 -0
- package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +14 -0
- package/dist/models/prop-types/InputProps/FileInputProps.d.ts +6 -0
- package/dist/models/prop-types/InputProps/InputBaseProps.d.ts +15 -0
- package/dist/models/prop-types/InputProps/RadioInputProps.d.ts +6 -0
- package/dist/models/prop-types/InputProps/SelectInputProps.d.ts +8 -0
- package/dist/models/prop-types/InputProps/TextAreaInputProps.d.ts +6 -0
- package/dist/models/prop-types/InputProps/TextInputProps.d.ts +6 -0
- package/dist/models/types/PhotoAction.d.ts +9 -0
- package/dist/models/types/PhotoLibraryItemModel.d.ts +7 -0
- package/dist/style.css +1 -1
- package/dist/useConfirm-Bm2_Ub3h.cjs +1 -0
- package/dist/useConfirm-ClKBi_ok.js +27 -0
- package/package.json +1 -1
- package/dist/components/common/InputContainer/InputContainer.d.ts +0 -10
- package/dist/models/prop-types/HookFormCheckInputProps.d.ts +0 -10
- package/dist/models/prop-types/HookFormDropdownPickerProps.d.ts +0 -13
- package/dist/models/prop-types/HookFormRadioInputProps.d.ts +0 -10
- package/dist/models/prop-types/HookFormSelectInputProps.d.ts +0 -16
- package/dist/models/prop-types/HookFormTextAreaInputProps.d.ts +0 -13
- package/dist/models/prop-types/HookFormTextInputProps.d.ts +0 -14
- package/dist/models/types/PromptOptions.d.ts +0 -6
- package/dist/useConfirm-BGatkLkP.js +0 -27
- package/dist/useConfirm-D677YHtT.cjs +0 -1
- /package/dist/models/prop-types/{HookFormInputProps.d.ts → HookFormInputProps/HookFormInputProps.d.ts} +0 -0
package/dist/contexts.es.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { j as r, c as
|
|
2
|
-
import * as
|
|
3
|
-
import { forwardRef as pt, useState as p, useRef as M, useImperativeHandle as vt, useEffect as re, useCallback as
|
|
4
|
-
import { a as yt, u as xt } from "./useConfirm-
|
|
5
|
-
import { T as wt } from "./Typography-
|
|
6
|
-
import { d as Ct, u as
|
|
1
|
+
import { j as r, c as x, e as ve, f as Ce, o as Fe, s as G, g as Ie, h as tt, i as nt, k as b, l as Re, m as ke, n as De, p as ot, r as Oe, q as st, t as $, v as rt, w as at, x as it, y as Se, F as $e, z as lt, A as dt, L as Ee, P as ct, C as ut, I as ft, B as ht, b as mt, U as gt } from "./UserAvatarToggle-DgGJIRzY.js";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { forwardRef as pt, useState as p, useRef as M, useImperativeHandle as vt, useEffect as re, useCallback as m, useContext as be, useMemo as W } from "react";
|
|
4
|
+
import { a as yt, u as xt } from "./useConfirm-ClKBi_ok.js";
|
|
5
|
+
import { T as wt } from "./Typography-dPh0BYIU.js";
|
|
6
|
+
import { d as Ct, u as Et, q as I, L as bt } from "./DataKey-DEvxfpG4.js";
|
|
7
7
|
import Mt from "react-dom";
|
|
8
|
-
const Tt = (t) => /* @__PURE__ */
|
|
8
|
+
const Tt = (t) => /* @__PURE__ */ v.forwardRef((e, n) => /* @__PURE__ */ r.jsx("div", {
|
|
9
9
|
...e,
|
|
10
10
|
ref: n,
|
|
11
|
-
className:
|
|
11
|
+
className: x(e.className, t)
|
|
12
12
|
})), jt = {
|
|
13
13
|
/** An accessible label indicating the relevant information about the Close Button. */
|
|
14
|
-
"aria-label":
|
|
14
|
+
"aria-label": ve.string,
|
|
15
15
|
/** A callback fired after the Close Button is clicked. */
|
|
16
|
-
onClick:
|
|
16
|
+
onClick: ve.func,
|
|
17
17
|
/**
|
|
18
18
|
* Render different color variant for the button.
|
|
19
19
|
*
|
|
20
20
|
* Omitting this will render the default dark color.
|
|
21
21
|
*/
|
|
22
|
-
variant:
|
|
23
|
-
}, Me = /* @__PURE__ */
|
|
22
|
+
variant: ve.oneOf(["white"])
|
|
23
|
+
}, Me = /* @__PURE__ */ v.forwardRef(({
|
|
24
24
|
className: t,
|
|
25
25
|
variant: e,
|
|
26
26
|
"aria-label": n = "Close",
|
|
@@ -28,7 +28,7 @@ const Tt = (t) => /* @__PURE__ */ y.forwardRef((e, n) => /* @__PURE__ */ r.jsx("
|
|
|
28
28
|
}, s) => /* @__PURE__ */ r.jsx("button", {
|
|
29
29
|
ref: s,
|
|
30
30
|
type: "button",
|
|
31
|
-
className:
|
|
31
|
+
className: x("btn-close", e && `btn-close-${e}`, t),
|
|
32
32
|
"aria-label": n,
|
|
33
33
|
...o
|
|
34
34
|
}));
|
|
@@ -37,13 +37,13 @@ Me.propTypes = jt;
|
|
|
37
37
|
const Nt = Me;
|
|
38
38
|
var se;
|
|
39
39
|
function Be(t) {
|
|
40
|
-
if ((!se && se !== 0 || t) &&
|
|
40
|
+
if ((!se && se !== 0 || t) && Ce) {
|
|
41
41
|
var e = document.createElement("div");
|
|
42
42
|
e.style.position = "absolute", e.style.top = "-9999px", e.style.width = "50px", e.style.height = "50px", e.style.overflow = "scroll", document.body.appendChild(e), se = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
43
43
|
}
|
|
44
44
|
return se;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function ye(t) {
|
|
47
47
|
t === void 0 && (t = Fe());
|
|
48
48
|
try {
|
|
49
49
|
var e = t.activeElement;
|
|
@@ -115,11 +115,11 @@ function St(t, e) {
|
|
|
115
115
|
s = o[a], !(e.indexOf(s) >= 0) && (n[s] = t[s]);
|
|
116
116
|
return n;
|
|
117
117
|
}
|
|
118
|
-
let
|
|
118
|
+
let xe;
|
|
119
119
|
function Bt(t) {
|
|
120
|
-
return
|
|
120
|
+
return xe || (xe = new Te({
|
|
121
121
|
ownerDocument: t == null ? void 0 : t.document
|
|
122
|
-
})),
|
|
122
|
+
})), xe;
|
|
123
123
|
}
|
|
124
124
|
function At(t) {
|
|
125
125
|
const e = Ie(), n = t || Bt(e), o = M({
|
|
@@ -130,115 +130,115 @@ function At(t) {
|
|
|
130
130
|
add: () => n.add(o.current),
|
|
131
131
|
remove: () => n.remove(o.current),
|
|
132
132
|
isTopModal: () => n.isTopModal(o.current),
|
|
133
|
-
setDialogRef:
|
|
133
|
+
setDialogRef: m((s) => {
|
|
134
134
|
o.current.dialog = s;
|
|
135
135
|
}, []),
|
|
136
|
-
setBackdropRef:
|
|
136
|
+
setBackdropRef: m((s) => {
|
|
137
137
|
o.current.backdrop = s;
|
|
138
138
|
}, [])
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
const
|
|
141
|
+
const We = /* @__PURE__ */ pt((t, e) => {
|
|
142
142
|
let {
|
|
143
143
|
show: n = !1,
|
|
144
144
|
role: o = "dialog",
|
|
145
145
|
className: s,
|
|
146
146
|
style: a,
|
|
147
|
-
children:
|
|
147
|
+
children: d,
|
|
148
148
|
backdrop: l = !0,
|
|
149
149
|
keyboard: f = !0,
|
|
150
|
-
onBackdropClick:
|
|
151
|
-
onEscapeKeyDown:
|
|
152
|
-
transition:
|
|
150
|
+
onBackdropClick: g,
|
|
151
|
+
onEscapeKeyDown: u,
|
|
152
|
+
transition: w,
|
|
153
153
|
runTransition: T,
|
|
154
|
-
backdropTransition:
|
|
155
|
-
runBackdropTransition:
|
|
154
|
+
backdropTransition: R,
|
|
155
|
+
runBackdropTransition: ae,
|
|
156
156
|
autoFocus: V = !0,
|
|
157
|
-
enforceFocus:
|
|
158
|
-
restoreFocus:
|
|
159
|
-
restoreFocusOptions:
|
|
157
|
+
enforceFocus: ie = !0,
|
|
158
|
+
restoreFocus: k = !0,
|
|
159
|
+
restoreFocusOptions: le,
|
|
160
160
|
renderDialog: q,
|
|
161
|
-
renderBackdrop:
|
|
162
|
-
manager:
|
|
163
|
-
container:
|
|
161
|
+
renderBackdrop: de = (c) => /* @__PURE__ */ r.jsx("div", Object.assign({}, c)),
|
|
162
|
+
manager: ce,
|
|
163
|
+
container: ue,
|
|
164
164
|
onShow: X,
|
|
165
165
|
onHide: H = () => {
|
|
166
166
|
},
|
|
167
|
-
onExit:
|
|
167
|
+
onExit: fe,
|
|
168
168
|
onExited: U,
|
|
169
169
|
onExiting: Y,
|
|
170
170
|
onEnter: J,
|
|
171
171
|
onEntering: Q,
|
|
172
172
|
onEntered: Z
|
|
173
|
-
} = t,
|
|
174
|
-
const C = Ie(),
|
|
175
|
-
vt(e, () =>
|
|
176
|
-
const
|
|
177
|
-
if (
|
|
173
|
+
} = t, he = St(t, Ot);
|
|
174
|
+
const C = Ie(), O = tt(ue), h = At(ce), me = nt(), ee = Et(n), [j, S] = p(!n), y = M(null);
|
|
175
|
+
vt(e, () => h, [h]), Ce && !ee && n && (y.current = ye(C == null ? void 0 : C.document)), n && j && S(!1);
|
|
176
|
+
const E = b(() => {
|
|
177
|
+
if (h.add(), B.current = Re(document, "keydown", pe), _.current = Re(
|
|
178
178
|
document,
|
|
179
179
|
"focus",
|
|
180
180
|
// the timeout is necessary b/c this will run before the new modal is mounted
|
|
181
181
|
// and so steals focus from it
|
|
182
|
-
() => setTimeout(
|
|
182
|
+
() => setTimeout(ge),
|
|
183
183
|
!0
|
|
184
184
|
), X && X(), V) {
|
|
185
185
|
var c, oe;
|
|
186
|
-
const z =
|
|
187
|
-
|
|
186
|
+
const z = ye((c = (oe = h.dialog) == null ? void 0 : oe.ownerDocument) != null ? c : C == null ? void 0 : C.document);
|
|
187
|
+
h.dialog && z && !ke(h.dialog, z) && (y.current = z, h.dialog.focus());
|
|
188
188
|
}
|
|
189
|
-
}), P =
|
|
190
|
-
if (
|
|
189
|
+
}), P = b(() => {
|
|
190
|
+
if (h.remove(), B.current == null || B.current(), _.current == null || _.current(), k) {
|
|
191
191
|
var c;
|
|
192
|
-
(c =
|
|
192
|
+
(c = y.current) == null || c.focus == null || c.focus(le), y.current = null;
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
195
|
re(() => {
|
|
196
|
-
!n || !
|
|
196
|
+
!n || !O || E();
|
|
197
197
|
}, [
|
|
198
198
|
n,
|
|
199
|
-
|
|
199
|
+
O,
|
|
200
200
|
/* should never change: */
|
|
201
|
-
|
|
201
|
+
E
|
|
202
202
|
]), re(() => {
|
|
203
203
|
j && P();
|
|
204
204
|
}, [j, P]), De(() => {
|
|
205
205
|
P();
|
|
206
206
|
});
|
|
207
|
-
const
|
|
208
|
-
if (!
|
|
207
|
+
const ge = b(() => {
|
|
208
|
+
if (!ie || !me() || !h.isTopModal())
|
|
209
209
|
return;
|
|
210
|
-
const c =
|
|
211
|
-
|
|
212
|
-
}), te =
|
|
213
|
-
c.target === c.currentTarget && (
|
|
214
|
-
}),
|
|
215
|
-
f &&
|
|
216
|
-
}), _ = M(),
|
|
217
|
-
|
|
210
|
+
const c = ye(C == null ? void 0 : C.document);
|
|
211
|
+
h.dialog && c && !ke(h.dialog, c) && h.dialog.focus();
|
|
212
|
+
}), te = b((c) => {
|
|
213
|
+
c.target === c.currentTarget && (g == null || g(c), l === !0 && H());
|
|
214
|
+
}), pe = b((c) => {
|
|
215
|
+
f && ot(c) && h.isTopModal() && (u == null || u(c), c.defaultPrevented || H());
|
|
216
|
+
}), _ = M(), B = M(), ne = (...c) => {
|
|
217
|
+
S(!0), U == null || U(...c);
|
|
218
218
|
};
|
|
219
|
-
if (!
|
|
219
|
+
if (!O)
|
|
220
220
|
return null;
|
|
221
|
-
const
|
|
221
|
+
const A = Object.assign({
|
|
222
222
|
role: o,
|
|
223
|
-
ref:
|
|
223
|
+
ref: h.setDialogRef,
|
|
224
224
|
// apparently only works on the dialog role element
|
|
225
225
|
"aria-modal": o === "dialog" ? !0 : void 0
|
|
226
|
-
},
|
|
226
|
+
}, he, {
|
|
227
227
|
style: a,
|
|
228
228
|
className: s,
|
|
229
229
|
tabIndex: -1
|
|
230
230
|
});
|
|
231
|
-
let K = q ? q(
|
|
232
|
-
children: /* @__PURE__ */
|
|
231
|
+
let K = q ? q(A) : /* @__PURE__ */ r.jsx("div", Object.assign({}, A, {
|
|
232
|
+
children: /* @__PURE__ */ v.cloneElement(d, {
|
|
233
233
|
role: "document"
|
|
234
234
|
})
|
|
235
235
|
}));
|
|
236
|
-
K = Oe(
|
|
236
|
+
K = Oe(w, T, {
|
|
237
237
|
unmountOnExit: !0,
|
|
238
238
|
mountOnEnter: !0,
|
|
239
239
|
appear: !0,
|
|
240
240
|
in: !!n,
|
|
241
|
-
onExit:
|
|
241
|
+
onExit: fe,
|
|
242
242
|
onExiting: Y,
|
|
243
243
|
onExited: ne,
|
|
244
244
|
onEnter: J,
|
|
@@ -246,28 +246,28 @@ const He = /* @__PURE__ */ pt((t, e) => {
|
|
|
246
246
|
onEntered: Z,
|
|
247
247
|
children: K
|
|
248
248
|
});
|
|
249
|
-
let
|
|
250
|
-
return l && (
|
|
251
|
-
ref:
|
|
249
|
+
let L = null;
|
|
250
|
+
return l && (L = de({
|
|
251
|
+
ref: h.setBackdropRef,
|
|
252
252
|
onClick: te
|
|
253
|
-
}),
|
|
253
|
+
}), L = Oe(R, ae, {
|
|
254
254
|
in: !!n,
|
|
255
255
|
appear: !0,
|
|
256
256
|
mountOnEnter: !0,
|
|
257
257
|
unmountOnExit: !0,
|
|
258
|
-
children:
|
|
258
|
+
children: L
|
|
259
259
|
})), /* @__PURE__ */ r.jsx(r.Fragment, {
|
|
260
260
|
children: /* @__PURE__ */ Mt.createPortal(/* @__PURE__ */ r.jsxs(r.Fragment, {
|
|
261
|
-
children: [
|
|
262
|
-
}),
|
|
261
|
+
children: [L, K]
|
|
262
|
+
}), O)
|
|
263
263
|
});
|
|
264
264
|
});
|
|
265
|
-
|
|
266
|
-
const Lt = Object.assign(
|
|
265
|
+
We.displayName = "Modal";
|
|
266
|
+
const Lt = Object.assign(We, {
|
|
267
267
|
Manager: Te
|
|
268
268
|
});
|
|
269
269
|
function Ft(t, e) {
|
|
270
|
-
t.classList ? t.classList.add(e) :
|
|
270
|
+
t.classList ? t.classList.add(e) : st(t, e) || (typeof t.className == "string" ? t.className = t.className + " " + e : t.setAttribute("class", (t.className && t.className.baseVal || "") + " " + e));
|
|
271
271
|
}
|
|
272
272
|
function Le(t, e) {
|
|
273
273
|
return t.replace(new RegExp("(^|\\s)" + e + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
|
|
@@ -275,7 +275,7 @@ function Le(t, e) {
|
|
|
275
275
|
function It(t, e) {
|
|
276
276
|
t.classList ? t.classList.remove(e) : typeof t.className == "string" ? t.className = Le(t.className, e) : t.setAttribute("class", Le(t.className && t.className.baseVal || "", e));
|
|
277
277
|
}
|
|
278
|
-
const
|
|
278
|
+
const D = {
|
|
279
279
|
FIXED_CONTENT: ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",
|
|
280
280
|
STICKY_CONTENT: ".sticky-top",
|
|
281
281
|
NAVBAR_TOGGLER: ".navbar-toggler"
|
|
@@ -299,83 +299,83 @@ class Dt extends Te {
|
|
|
299
299
|
if (Ft(n, "modal-open"), !e.scrollBarWidth)
|
|
300
300
|
return;
|
|
301
301
|
const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
|
|
302
|
-
|
|
302
|
+
I(n, D.FIXED_CONTENT).forEach((a) => this.adjustAndStore(o, a, e.scrollBarWidth)), I(n, D.STICKY_CONTENT).forEach((a) => this.adjustAndStore(s, a, -e.scrollBarWidth)), I(n, D.NAVBAR_TOGGLER).forEach((a) => this.adjustAndStore(s, a, e.scrollBarWidth));
|
|
303
303
|
}
|
|
304
304
|
removeContainerStyle(e) {
|
|
305
305
|
super.removeContainerStyle(e);
|
|
306
306
|
const n = this.getElement();
|
|
307
307
|
It(n, "modal-open");
|
|
308
308
|
const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
|
|
309
|
-
|
|
309
|
+
I(n, D.FIXED_CONTENT).forEach((a) => this.restore(o, a)), I(n, D.STICKY_CONTENT).forEach((a) => this.restore(s, a)), I(n, D.NAVBAR_TOGGLER).forEach((a) => this.restore(s, a));
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
let
|
|
312
|
+
let we;
|
|
313
313
|
function $t(t) {
|
|
314
|
-
return
|
|
314
|
+
return we || (we = new Dt(t)), we;
|
|
315
315
|
}
|
|
316
|
-
const
|
|
316
|
+
const He = /* @__PURE__ */ v.forwardRef(({
|
|
317
317
|
className: t,
|
|
318
318
|
bsPrefix: e,
|
|
319
319
|
as: n = "div",
|
|
320
320
|
...o
|
|
321
|
-
}, s) => (e =
|
|
321
|
+
}, s) => (e = $(e, "modal-body"), /* @__PURE__ */ r.jsx(n, {
|
|
322
322
|
ref: s,
|
|
323
|
-
className:
|
|
323
|
+
className: x(t, e),
|
|
324
324
|
...o
|
|
325
325
|
})));
|
|
326
|
-
|
|
327
|
-
const Wt =
|
|
326
|
+
He.displayName = "ModalBody";
|
|
327
|
+
const Wt = He, Ht = /* @__PURE__ */ v.createContext({
|
|
328
328
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
329
329
|
onHide() {
|
|
330
330
|
}
|
|
331
|
-
}),
|
|
331
|
+
}), Ue = Ht, Pe = /* @__PURE__ */ v.forwardRef(({
|
|
332
332
|
bsPrefix: t,
|
|
333
333
|
className: e,
|
|
334
334
|
contentClassName: n,
|
|
335
335
|
centered: o,
|
|
336
336
|
size: s,
|
|
337
337
|
fullscreen: a,
|
|
338
|
-
children:
|
|
338
|
+
children: d,
|
|
339
339
|
scrollable: l,
|
|
340
340
|
...f
|
|
341
|
-
},
|
|
342
|
-
t =
|
|
343
|
-
const
|
|
341
|
+
}, g) => {
|
|
342
|
+
t = $(t, "modal");
|
|
343
|
+
const u = `${t}-dialog`, w = typeof a == "string" ? `${t}-fullscreen-${a}` : `${t}-fullscreen`;
|
|
344
344
|
return /* @__PURE__ */ r.jsx("div", {
|
|
345
345
|
...f,
|
|
346
|
-
ref:
|
|
347
|
-
className:
|
|
346
|
+
ref: g,
|
|
347
|
+
className: x(u, e, s && `${t}-${s}`, o && `${u}-centered`, l && `${u}-scrollable`, a && w),
|
|
348
348
|
children: /* @__PURE__ */ r.jsx("div", {
|
|
349
|
-
className:
|
|
350
|
-
children:
|
|
349
|
+
className: x(`${t}-content`, n),
|
|
350
|
+
children: d
|
|
351
351
|
})
|
|
352
352
|
});
|
|
353
353
|
});
|
|
354
|
-
|
|
355
|
-
const
|
|
354
|
+
Pe.displayName = "ModalDialog";
|
|
355
|
+
const _e = Pe, Ke = /* @__PURE__ */ v.forwardRef(({
|
|
356
356
|
className: t,
|
|
357
357
|
bsPrefix: e,
|
|
358
358
|
as: n = "div",
|
|
359
359
|
...o
|
|
360
|
-
}, s) => (e =
|
|
360
|
+
}, s) => (e = $(e, "modal-footer"), /* @__PURE__ */ r.jsx(n, {
|
|
361
361
|
ref: s,
|
|
362
|
-
className:
|
|
362
|
+
className: x(t, e),
|
|
363
363
|
...o
|
|
364
364
|
})));
|
|
365
|
-
|
|
366
|
-
const Ut =
|
|
365
|
+
Ke.displayName = "ModalFooter";
|
|
366
|
+
const Ut = Ke, Pt = /* @__PURE__ */ v.forwardRef(({
|
|
367
367
|
closeLabel: t = "Close",
|
|
368
368
|
closeVariant: e,
|
|
369
369
|
closeButton: n = !1,
|
|
370
370
|
onHide: o,
|
|
371
371
|
children: s,
|
|
372
372
|
...a
|
|
373
|
-
},
|
|
374
|
-
const l =
|
|
373
|
+
}, d) => {
|
|
374
|
+
const l = be(Ue), f = b(() => {
|
|
375
375
|
l == null || l.onHide(), o == null || o();
|
|
376
376
|
});
|
|
377
377
|
return /* @__PURE__ */ r.jsxs("div", {
|
|
378
|
-
ref:
|
|
378
|
+
ref: d,
|
|
379
379
|
...a,
|
|
380
380
|
children: [s, n && /* @__PURE__ */ r.jsx(Nt, {
|
|
381
381
|
"aria-label": t,
|
|
@@ -383,32 +383,32 @@ const Ut = ze, Pt = /* @__PURE__ */ y.forwardRef(({
|
|
|
383
383
|
onClick: f
|
|
384
384
|
})]
|
|
385
385
|
});
|
|
386
|
-
}), _t = Pt,
|
|
386
|
+
}), _t = Pt, ze = /* @__PURE__ */ v.forwardRef(({
|
|
387
387
|
bsPrefix: t,
|
|
388
388
|
className: e,
|
|
389
389
|
closeLabel: n = "Close",
|
|
390
390
|
closeButton: o = !1,
|
|
391
391
|
...s
|
|
392
|
-
}, a) => (t =
|
|
392
|
+
}, a) => (t = $(t, "modal-header"), /* @__PURE__ */ r.jsx(_t, {
|
|
393
393
|
ref: a,
|
|
394
394
|
...s,
|
|
395
|
-
className:
|
|
395
|
+
className: x(e, t),
|
|
396
396
|
closeLabel: n,
|
|
397
397
|
closeButton: o
|
|
398
398
|
})));
|
|
399
|
-
|
|
400
|
-
const Kt =
|
|
399
|
+
ze.displayName = "ModalHeader";
|
|
400
|
+
const Kt = ze, zt = Tt("h4"), Ge = /* @__PURE__ */ v.forwardRef(({
|
|
401
401
|
className: t,
|
|
402
402
|
bsPrefix: e,
|
|
403
403
|
as: n = zt,
|
|
404
404
|
...o
|
|
405
|
-
}, s) => (e =
|
|
405
|
+
}, s) => (e = $(e, "modal-title"), /* @__PURE__ */ r.jsx(n, {
|
|
406
406
|
ref: s,
|
|
407
|
-
className:
|
|
407
|
+
className: x(t, e),
|
|
408
408
|
...o
|
|
409
409
|
})));
|
|
410
|
-
|
|
411
|
-
const Gt =
|
|
410
|
+
Ge.displayName = "ModalTitle";
|
|
411
|
+
const Gt = Ge;
|
|
412
412
|
function Vt(t) {
|
|
413
413
|
return /* @__PURE__ */ r.jsx($e, {
|
|
414
414
|
...t,
|
|
@@ -421,235 +421,220 @@ function qt(t) {
|
|
|
421
421
|
timeout: null
|
|
422
422
|
});
|
|
423
423
|
}
|
|
424
|
-
const
|
|
424
|
+
const Ve = /* @__PURE__ */ v.forwardRef(({
|
|
425
425
|
bsPrefix: t,
|
|
426
426
|
className: e,
|
|
427
427
|
style: n,
|
|
428
428
|
dialogClassName: o,
|
|
429
429
|
contentClassName: s,
|
|
430
430
|
children: a,
|
|
431
|
-
dialogAs:
|
|
431
|
+
dialogAs: d = _e,
|
|
432
432
|
"data-bs-theme": l,
|
|
433
433
|
"aria-labelledby": f,
|
|
434
|
-
"aria-describedby":
|
|
435
|
-
"aria-label":
|
|
434
|
+
"aria-describedby": g,
|
|
435
|
+
"aria-label": u,
|
|
436
436
|
/* BaseModal props */
|
|
437
|
-
show:
|
|
437
|
+
show: w = !1,
|
|
438
438
|
animation: T = !0,
|
|
439
|
-
backdrop:
|
|
440
|
-
keyboard:
|
|
439
|
+
backdrop: R = !0,
|
|
440
|
+
keyboard: ae = !0,
|
|
441
441
|
onEscapeKeyDown: V,
|
|
442
|
-
onShow:
|
|
443
|
-
onHide:
|
|
444
|
-
container:
|
|
442
|
+
onShow: ie,
|
|
443
|
+
onHide: k,
|
|
444
|
+
container: le,
|
|
445
445
|
autoFocus: q = !0,
|
|
446
|
-
enforceFocus:
|
|
447
|
-
restoreFocus:
|
|
448
|
-
restoreFocusOptions:
|
|
446
|
+
enforceFocus: de = !0,
|
|
447
|
+
restoreFocus: ce = !0,
|
|
448
|
+
restoreFocusOptions: ue,
|
|
449
449
|
onEntered: X,
|
|
450
450
|
onExit: H,
|
|
451
|
-
onExiting:
|
|
451
|
+
onExiting: fe,
|
|
452
452
|
onEnter: U,
|
|
453
453
|
onEntering: Y,
|
|
454
454
|
onExited: J,
|
|
455
455
|
backdropClassName: Q,
|
|
456
456
|
manager: Z,
|
|
457
|
-
...
|
|
457
|
+
...he
|
|
458
458
|
}, C) => {
|
|
459
|
-
const [
|
|
460
|
-
t =
|
|
461
|
-
const _ =
|
|
459
|
+
const [O, h] = p({}), [me, ee] = p(!1), j = M(!1), S = M(!1), y = M(null), [E, P] = rt(), ge = at(C, P), te = b(k), pe = it();
|
|
460
|
+
t = $(t, "modal");
|
|
461
|
+
const _ = W(() => ({
|
|
462
462
|
onHide: te
|
|
463
463
|
}), [te]);
|
|
464
|
-
function
|
|
464
|
+
function B() {
|
|
465
465
|
return Z || $t({
|
|
466
|
-
isRTL:
|
|
466
|
+
isRTL: pe
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
469
|
function ne(i) {
|
|
470
|
-
if (!
|
|
470
|
+
if (!Ce)
|
|
471
471
|
return;
|
|
472
|
-
const
|
|
473
|
-
|
|
474
|
-
paddingRight:
|
|
475
|
-
paddingLeft: !
|
|
472
|
+
const F = B().getScrollbarWidth() > 0, Ne = i.scrollHeight > Fe(i).documentElement.clientHeight;
|
|
473
|
+
h({
|
|
474
|
+
paddingRight: F && !Ne ? Be() : void 0,
|
|
475
|
+
paddingLeft: !F && Ne ? Be() : void 0
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
|
-
const
|
|
479
|
-
|
|
478
|
+
const A = b(() => {
|
|
479
|
+
E && ne(E.dialog);
|
|
480
480
|
});
|
|
481
481
|
De(() => {
|
|
482
|
-
Se(window, "resize",
|
|
482
|
+
Se(window, "resize", A), y.current == null || y.current();
|
|
483
483
|
});
|
|
484
484
|
const K = () => {
|
|
485
485
|
j.current = !0;
|
|
486
|
-
},
|
|
487
|
-
j.current &&
|
|
486
|
+
}, L = (i) => {
|
|
487
|
+
j.current && E && i.target === E.dialog && (S.current = !0), j.current = !1;
|
|
488
488
|
}, c = () => {
|
|
489
|
-
ee(!0),
|
|
489
|
+
ee(!0), y.current = dt(E.dialog, () => {
|
|
490
490
|
ee(!1);
|
|
491
491
|
});
|
|
492
492
|
}, oe = (i) => {
|
|
493
493
|
i.target === i.currentTarget && c();
|
|
494
494
|
}, z = (i) => {
|
|
495
|
-
if (
|
|
495
|
+
if (R === "static") {
|
|
496
496
|
oe(i);
|
|
497
497
|
return;
|
|
498
498
|
}
|
|
499
|
-
if (
|
|
500
|
-
|
|
499
|
+
if (S.current || i.target !== i.currentTarget) {
|
|
500
|
+
S.current = !1;
|
|
501
501
|
return;
|
|
502
502
|
}
|
|
503
|
-
|
|
504
|
-
},
|
|
505
|
-
|
|
506
|
-
},
|
|
507
|
-
i && ne(i), U == null || U(i,
|
|
508
|
-
},
|
|
509
|
-
|
|
510
|
-
},
|
|
511
|
-
Y == null || Y(i,
|
|
512
|
-
},
|
|
513
|
-
i && (i.style.display = ""), J == null || J(i), Se(window, "resize",
|
|
514
|
-
},
|
|
503
|
+
k == null || k();
|
|
504
|
+
}, qe = (i) => {
|
|
505
|
+
ae ? V == null || V(i) : (i.preventDefault(), R === "static" && c());
|
|
506
|
+
}, Xe = (i, F) => {
|
|
507
|
+
i && ne(i), U == null || U(i, F);
|
|
508
|
+
}, Ye = (i) => {
|
|
509
|
+
y.current == null || y.current(), H == null || H(i);
|
|
510
|
+
}, Je = (i, F) => {
|
|
511
|
+
Y == null || Y(i, F), lt(window, "resize", A);
|
|
512
|
+
}, Qe = (i) => {
|
|
513
|
+
i && (i.style.display = ""), J == null || J(i), Se(window, "resize", A);
|
|
514
|
+
}, Ze = m((i) => /* @__PURE__ */ r.jsx("div", {
|
|
515
515
|
...i,
|
|
516
|
-
className:
|
|
516
|
+
className: x(`${t}-backdrop`, Q, !T && "show")
|
|
517
517
|
}), [T, Q, t]), je = {
|
|
518
518
|
...n,
|
|
519
|
-
...
|
|
519
|
+
...O
|
|
520
520
|
};
|
|
521
521
|
je.display = "block";
|
|
522
|
-
const
|
|
522
|
+
const et = (i) => /* @__PURE__ */ r.jsx("div", {
|
|
523
523
|
role: "dialog",
|
|
524
524
|
...i,
|
|
525
525
|
style: je,
|
|
526
|
-
className:
|
|
527
|
-
onClick:
|
|
528
|
-
onMouseUp:
|
|
526
|
+
className: x(e, t, me && `${t}-static`, !T && "show"),
|
|
527
|
+
onClick: R ? z : void 0,
|
|
528
|
+
onMouseUp: L,
|
|
529
529
|
"data-bs-theme": l,
|
|
530
|
-
"aria-label":
|
|
530
|
+
"aria-label": u,
|
|
531
531
|
"aria-labelledby": f,
|
|
532
|
-
"aria-describedby":
|
|
533
|
-
children: /* @__PURE__ */ r.jsx(
|
|
534
|
-
...
|
|
532
|
+
"aria-describedby": g,
|
|
533
|
+
children: /* @__PURE__ */ r.jsx(d, {
|
|
534
|
+
...he,
|
|
535
535
|
onMouseDown: K,
|
|
536
536
|
className: o,
|
|
537
537
|
contentClassName: s,
|
|
538
538
|
children: a
|
|
539
539
|
})
|
|
540
540
|
});
|
|
541
|
-
return /* @__PURE__ */ r.jsx(
|
|
541
|
+
return /* @__PURE__ */ r.jsx(Ue.Provider, {
|
|
542
542
|
value: _,
|
|
543
543
|
children: /* @__PURE__ */ r.jsx(Lt, {
|
|
544
|
-
show:
|
|
545
|
-
ref:
|
|
546
|
-
backdrop:
|
|
547
|
-
container:
|
|
544
|
+
show: w,
|
|
545
|
+
ref: ge,
|
|
546
|
+
backdrop: R,
|
|
547
|
+
container: le,
|
|
548
548
|
keyboard: !0,
|
|
549
549
|
autoFocus: q,
|
|
550
|
-
enforceFocus:
|
|
551
|
-
restoreFocus:
|
|
552
|
-
restoreFocusOptions:
|
|
553
|
-
onEscapeKeyDown:
|
|
554
|
-
onShow:
|
|
555
|
-
onHide:
|
|
556
|
-
onEnter:
|
|
557
|
-
onEntering:
|
|
550
|
+
enforceFocus: de,
|
|
551
|
+
restoreFocus: ce,
|
|
552
|
+
restoreFocusOptions: ue,
|
|
553
|
+
onEscapeKeyDown: qe,
|
|
554
|
+
onShow: ie,
|
|
555
|
+
onHide: k,
|
|
556
|
+
onEnter: Xe,
|
|
557
|
+
onEntering: Je,
|
|
558
558
|
onEntered: X,
|
|
559
|
-
onExit:
|
|
560
|
-
onExiting:
|
|
561
|
-
onExited:
|
|
562
|
-
manager:
|
|
559
|
+
onExit: Ye,
|
|
560
|
+
onExiting: fe,
|
|
561
|
+
onExited: Qe,
|
|
562
|
+
manager: B(),
|
|
563
563
|
transition: T ? Vt : void 0,
|
|
564
564
|
backdropTransition: T ? qt : void 0,
|
|
565
|
-
renderBackdrop:
|
|
566
|
-
renderDialog:
|
|
565
|
+
renderBackdrop: Ze,
|
|
566
|
+
renderDialog: et
|
|
567
567
|
})
|
|
568
568
|
});
|
|
569
569
|
});
|
|
570
|
-
|
|
571
|
-
const N = Object.assign(
|
|
570
|
+
Ve.displayName = "Modal";
|
|
571
|
+
const N = Object.assign(Ve, {
|
|
572
572
|
Body: Wt,
|
|
573
573
|
Header: Kt,
|
|
574
574
|
Title: Gt,
|
|
575
575
|
Footer: Ut,
|
|
576
|
-
Dialog:
|
|
576
|
+
Dialog: _e,
|
|
577
577
|
TRANSITION_DURATION: 300,
|
|
578
578
|
BACKDROP_TRANSITION_DURATION: 150
|
|
579
579
|
}), Xt = () => {
|
|
580
|
-
const { confirmTexts: t } =
|
|
580
|
+
const { confirmTexts: t } = be(Ee), { isShown: e, text: n, onFinish: o } = yt(), [s, a] = p(""), d = m(() => {
|
|
581
581
|
o(null);
|
|
582
|
-
}, [o]),
|
|
583
|
-
o(
|
|
584
|
-
}, [o,
|
|
585
|
-
re(() => {
|
|
586
|
-
e === !0 &&
|
|
587
|
-
}, [e])
|
|
588
|
-
const h = R(() => ({
|
|
589
|
-
value: a,
|
|
590
|
-
onChange: (d) => u(d.currentTarget.value),
|
|
591
|
-
className: "w-100",
|
|
592
|
-
autoFocus: !0,
|
|
593
|
-
tabIndex: 0
|
|
594
|
-
}), [a]);
|
|
595
|
-
return /* @__PURE__ */ r.jsxs(N, { show: e, size: "sm", centered: !0, onHide: l, children: [
|
|
582
|
+
}, [o]), l = m(() => {
|
|
583
|
+
o(s);
|
|
584
|
+
}, [o, s]);
|
|
585
|
+
return re(() => {
|
|
586
|
+
e === !0 && a("");
|
|
587
|
+
}, [e]), /* @__PURE__ */ r.jsxs(N, { show: e, size: "sm", centered: !0, onHide: d, children: [
|
|
596
588
|
/* @__PURE__ */ r.jsx(N.Header, { children: /* @__PURE__ */ r.jsx(N.Title, { children: n }) }),
|
|
597
|
-
/* @__PURE__ */ r.
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
589
|
+
/* @__PURE__ */ r.jsx(N.Body, { children: /* @__PURE__ */ r.jsx(
|
|
590
|
+
"textarea",
|
|
591
|
+
{
|
|
592
|
+
autoFocus: !0,
|
|
593
|
+
tabIndex: 0,
|
|
594
|
+
value: s,
|
|
595
|
+
onChange: (f) => a(f.currentTarget.value),
|
|
596
|
+
className: "w-100",
|
|
597
|
+
rows: 5
|
|
598
|
+
}
|
|
599
|
+
) }),
|
|
607
600
|
/* @__PURE__ */ r.jsxs(N.Footer, { children: [
|
|
608
|
-
/* @__PURE__ */ r.jsx("button", { type: "button", className: "btn btn-secondary", onClick:
|
|
609
|
-
/* @__PURE__ */ r.jsx("button", { type: "button", className: "btn btn-primary ml", onClick:
|
|
601
|
+
/* @__PURE__ */ r.jsx("button", { type: "button", className: "btn btn-secondary", onClick: d, children: t.cancel }),
|
|
602
|
+
/* @__PURE__ */ r.jsx("button", { type: "button", className: "btn btn-primary ml", onClick: l, children: t.confirm })
|
|
610
603
|
] })
|
|
611
604
|
] });
|
|
612
605
|
}, Yt = ({ children: t }) => {
|
|
613
|
-
const [e, n] = p(!1), [o, s] = p(""),
|
|
614
|
-
}),
|
|
615
|
-
s(
|
|
616
|
-
}, []),
|
|
606
|
+
const [e, n] = p(!1), [o, s] = p(""), a = M(() => {
|
|
607
|
+
}), d = m((g) => {
|
|
608
|
+
s(g), n(!0), console.log("showprompt");
|
|
609
|
+
}, []), l = m(() => {
|
|
617
610
|
n(!1);
|
|
618
|
-
}, []),
|
|
619
|
-
|
|
620
|
-
text: o,
|
|
621
|
-
showPrompt: f,
|
|
622
|
-
hidePrompt: h,
|
|
623
|
-
resolveRef: l,
|
|
624
|
-
options: a,
|
|
625
|
-
setOptions: u
|
|
626
|
-
}), [e, o, f, h, a]);
|
|
627
|
-
return /* @__PURE__ */ r.jsxs(We.Provider, { value: d, children: [
|
|
611
|
+
}, []), f = W(() => ({ isShown: e, text: o, showPrompt: d, hidePrompt: l, resolveRef: a }), [l, e, d, o, a]);
|
|
612
|
+
return /* @__PURE__ */ r.jsxs(ct.Provider, { value: f, children: [
|
|
628
613
|
t,
|
|
629
614
|
/* @__PURE__ */ r.jsx(Xt, {})
|
|
630
615
|
] });
|
|
631
616
|
}, Jt = ({ children: t }) => {
|
|
632
|
-
const [e, n] = p(!1), [o, s] = p(""), a =
|
|
617
|
+
const [e, n] = p(!1), [o, s] = p(""), a = m((f) => {
|
|
633
618
|
n(!0), s(f);
|
|
634
|
-
}, []),
|
|
619
|
+
}, []), d = m(() => {
|
|
635
620
|
n(!1);
|
|
636
|
-
}, []), l =
|
|
621
|
+
}, []), l = W(() => ({ show: e, text: o, showConfirm: a, hideConfirm: d }), [e, o, a, d]);
|
|
637
622
|
return /* @__PURE__ */ r.jsxs(ut.Provider, { value: l, children: [
|
|
638
623
|
/* @__PURE__ */ r.jsx(Qt, {}),
|
|
639
624
|
t
|
|
640
625
|
] });
|
|
641
|
-
}, rn = ({ cookieDomain: t, axiosInstance: e, LinkComponent: n, language: o, axiosTexts: s, confirmTexts: a, formValidationTexts:
|
|
642
|
-
const
|
|
626
|
+
}, rn = ({ cookieDomain: t, axiosInstance: e, LinkComponent: n, language: o, axiosTexts: s, confirmTexts: a, formValidationTexts: d, homeDashboardTexts: l, formSubmitTexts: f, appSearchTexts: g, children: u }) => {
|
|
627
|
+
const w = W(() => ({
|
|
643
628
|
axiosInstance: e,
|
|
644
629
|
cookieDomain: t,
|
|
645
630
|
LinkComponent: n,
|
|
646
631
|
language: o,
|
|
647
632
|
axiosTexts: s,
|
|
648
633
|
confirmTexts: a,
|
|
649
|
-
formValidationTexts:
|
|
634
|
+
formValidationTexts: d,
|
|
650
635
|
homeDashboardTexts: l,
|
|
651
636
|
formSubmitTexts: f,
|
|
652
|
-
appSearchTexts:
|
|
637
|
+
appSearchTexts: g
|
|
653
638
|
}), [
|
|
654
639
|
e,
|
|
655
640
|
t,
|
|
@@ -657,49 +642,49 @@ const N = Object.assign(qe, {
|
|
|
657
642
|
o,
|
|
658
643
|
s,
|
|
659
644
|
a,
|
|
660
|
-
|
|
645
|
+
d,
|
|
661
646
|
l,
|
|
662
647
|
f,
|
|
663
|
-
|
|
648
|
+
g
|
|
664
649
|
]);
|
|
665
|
-
return /* @__PURE__ */ r.jsx(Ee.Provider, { value:
|
|
650
|
+
return /* @__PURE__ */ r.jsx(Ee.Provider, { value: w, children: /* @__PURE__ */ r.jsx(Jt, { children: /* @__PURE__ */ r.jsxs(Yt, { children: [
|
|
666
651
|
/* @__PURE__ */ r.jsx(ft, {}),
|
|
667
|
-
|
|
652
|
+
u
|
|
668
653
|
] }) }) });
|
|
669
654
|
}, an = ({ children: t }) => {
|
|
670
|
-
const [e, n] = p(!1), [o] = p(/* @__PURE__ */ new Set()), s =
|
|
655
|
+
const [e, n] = p(!1), [o] = p(/* @__PURE__ */ new Set()), s = m((l) => {
|
|
671
656
|
o.add(l), n(!0);
|
|
672
|
-
}, [o]), a =
|
|
657
|
+
}, [o]), a = m((l) => {
|
|
673
658
|
o.delete(l), o.size === 0 && n(!1);
|
|
674
|
-
}, [o]),
|
|
675
|
-
return /* @__PURE__ */ r.jsxs(ht.Provider, { value:
|
|
676
|
-
e && /* @__PURE__ */ r.jsx(
|
|
659
|
+
}, [o]), d = W(() => ({ isLoading: e, startLoading: s, stopLoading: a }), [e, s, a]);
|
|
660
|
+
return /* @__PURE__ */ r.jsxs(ht.Provider, { value: d, children: [
|
|
661
|
+
e && /* @__PURE__ */ r.jsx(bt, {}),
|
|
677
662
|
t
|
|
678
663
|
] });
|
|
679
664
|
}, ln = ({ children: t }) => {
|
|
680
|
-
const e = mt(), n =
|
|
681
|
-
const
|
|
682
|
-
return
|
|
683
|
-
}, []), [o, s] = p(n()), a =
|
|
684
|
-
let
|
|
685
|
-
return await e.get("/user/detail").then((
|
|
686
|
-
|
|
665
|
+
const e = mt(), n = m(() => {
|
|
666
|
+
const u = localStorage.getItem("user") ?? null;
|
|
667
|
+
return u ? JSON.parse(u) : null;
|
|
668
|
+
}, []), [o, s] = p(n()), a = m(async () => {
|
|
669
|
+
let u = null;
|
|
670
|
+
return await e.get("/user/detail").then((w) => {
|
|
671
|
+
u = w.data;
|
|
687
672
|
}).catch(() => {
|
|
688
|
-
|
|
689
|
-
}), localStorage.setItem("user", JSON.stringify(
|
|
690
|
-
}, [e]),
|
|
673
|
+
u = null;
|
|
674
|
+
}), localStorage.setItem("user", JSON.stringify(u)), u;
|
|
675
|
+
}, [e]), d = m(() => {
|
|
691
676
|
localStorage.removeItem("user");
|
|
692
|
-
}, []), l =
|
|
693
|
-
const
|
|
694
|
-
return
|
|
695
|
-
}, [a]), f =
|
|
696
|
-
|
|
697
|
-
}, [
|
|
677
|
+
}, []), l = m(async () => {
|
|
678
|
+
const u = await a();
|
|
679
|
+
return u ? (s(u), !0) : !1;
|
|
680
|
+
}, [a]), f = m(() => {
|
|
681
|
+
d(), s(null);
|
|
682
|
+
}, [d]), g = W(() => ({ user: o, loginUser: l, logoutUser: f }), [o, l, f]);
|
|
698
683
|
return re(() => {
|
|
699
684
|
s(n());
|
|
700
|
-
}, [n]), /* @__PURE__ */ r.jsx(gt.Provider, { value:
|
|
685
|
+
}, [n]), /* @__PURE__ */ r.jsx(gt.Provider, { value: g, children: t });
|
|
701
686
|
}, Qt = () => {
|
|
702
|
-
const { confirmTexts: t } =
|
|
687
|
+
const { confirmTexts: t } = be(Ee), { onConfirm: e, onCancel: n, text: o, show: s } = xt();
|
|
703
688
|
return /* @__PURE__ */ r.jsx(N, { show: s, size: "sm", centered: !0, onHide: n, children: /* @__PURE__ */ r.jsxs(N.Body, { children: [
|
|
704
689
|
/* @__PURE__ */ r.jsx("div", { className: "mb-5 text-center", children: /* @__PURE__ */ r.jsx(wt, { variant: "h6", children: o }) }),
|
|
705
690
|
/* @__PURE__ */ r.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|