react-luminus-components 1.1.23 → 1.1.25
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 +55 -57
- package/dist/{DataKey-BWAmmcUw.js → DataKey-BM6Hi4Og.js} +1 -1
- package/dist/DataKey-DN_Gd8yX.cjs +1 -0
- package/dist/SimpleTooltip-Bg8N9Up2.cjs +1 -0
- package/dist/SimpleTooltip-DnZSi_qT.js +5 -0
- package/dist/Typography-C0E6aQv2.cjs +1 -0
- package/dist/Typography-CsdF39gW.js +36 -0
- package/dist/UserAvatarToggle-0_jNWWSB.cjs +250 -0
- package/dist/UserAvatarToggle-xT1i6nSz.js +6444 -0
- package/dist/components/Tabs/Tabs.d.ts +3 -1
- package/dist/components/Tabs/comps/Tab/Tab.d.ts +1 -1
- package/dist/components/common/AppSearch/AppSearch.d.ts +6 -1
- package/dist/components/common/AppSearch/comps/AutocompleteWindow/AutocompleteWindow.d.ts +12 -0
- package/dist/components/common/AppSearch/comps/TypeSelector/TypeSelector.d.ts +9 -0
- package/dist/components/common/AppSearch/comps/index.d.ts +2 -0
- package/dist/components/common/AppSearch/hooks/useSearchItems.d.ts +6 -0
- package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +3 -2
- package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +4 -3
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +103 -101
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +4 -4
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +1229 -1183
- package/dist/models/index.d.ts +5 -0
- package/dist/models/texts/AppSearchTexts.d.ts +5 -0
- package/dist/models/types/SearchResultGroupKeyModel.d.ts +6 -0
- package/dist/models/types/SearchResultGroupModel.d.ts +7 -0
- package/dist/models/types/SearchResultModel.d.ts +8 -0
- package/dist/models/types/SearchType.d.ts +6 -0
- package/dist/style.css +1 -1
- package/dist/{textUtils-DW4f3rLU.js → textUtils-BLtD0zaS.js} +3 -3
- package/dist/{useConfirm-BK-FMKuK.js → useConfirm-CQp43K_n.js} +1 -1
- package/dist/useConfirm-CdQJyKxQ.cjs +1 -0
- package/dist/utils.es.js +5 -5
- package/package.json +1 -1
- package/dist/DataKey--JBhGjOn.cjs +0 -1
- package/dist/SimpleTooltip-C-IHJfQ5.cjs +0 -1
- package/dist/SimpleTooltip-CfJs3h6Q.js +0 -1622
- package/dist/hasClass-D1jUrHAX.cjs +0 -20
- package/dist/hasClass-Sn_KqIXn.js +0 -1516
- package/dist/useAxios-BZn4k8_S.js +0 -3320
- package/dist/useAxios-QCWXMOfJ.cjs +0 -231
- package/dist/useConfirm-A379uhYQ.cjs +0 -1
package/dist/contexts.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { j as r,
|
|
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-xT1i6nSz.js";
|
|
2
2
|
import * as v from "react";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import { d as Ct, u as
|
|
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-CQp43K_n.js";
|
|
5
|
+
import { T as wt } from "./Typography-CsdF39gW.js";
|
|
6
|
+
import { d as Ct, u as Et, q as I, L as bt } from "./DataKey-BM6Hi4Og.js";
|
|
7
7
|
import Mt from "react-dom";
|
|
8
8
|
const Tt = (t) => /* @__PURE__ */ v.forwardRef((e, n) => /* @__PURE__ */ r.jsx("div", {
|
|
9
9
|
...e,
|
|
@@ -37,7 +37,7 @@ 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
|
}
|
|
@@ -106,8 +106,8 @@ class kt {
|
|
|
106
106
|
return !!this.modals.length && this.modals[this.modals.length - 1] === e;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
const Te = kt,
|
|
110
|
-
function
|
|
109
|
+
const Te = kt, Ot = ["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"];
|
|
110
|
+
function St(t, e) {
|
|
111
111
|
if (t == null)
|
|
112
112
|
return {};
|
|
113
113
|
var n = {}, o = Object.keys(t), s, a;
|
|
@@ -122,7 +122,7 @@ function Bt(t) {
|
|
|
122
122
|
})), xe;
|
|
123
123
|
}
|
|
124
124
|
function At(t) {
|
|
125
|
-
const e = Ie(), n = t || Bt(e), o =
|
|
125
|
+
const e = Ie(), n = t || Bt(e), o = M({
|
|
126
126
|
dialog: null,
|
|
127
127
|
backdrop: null
|
|
128
128
|
});
|
|
@@ -138,7 +138,7 @@ function At(t) {
|
|
|
138
138
|
}, [])
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
const We = /* @__PURE__ */
|
|
141
|
+
const We = /* @__PURE__ */ pt((t, e) => {
|
|
142
142
|
let {
|
|
143
143
|
show: n = !1,
|
|
144
144
|
role: o = "dialog",
|
|
@@ -149,7 +149,7 @@ const We = /* @__PURE__ */ it((t, e) => {
|
|
|
149
149
|
keyboard: f = !0,
|
|
150
150
|
onBackdropClick: g,
|
|
151
151
|
onEscapeKeyDown: u,
|
|
152
|
-
transition:
|
|
152
|
+
transition: w,
|
|
153
153
|
runTransition: T,
|
|
154
154
|
backdropTransition: R,
|
|
155
155
|
runBackdropTransition: ae,
|
|
@@ -157,23 +157,23 @@ const We = /* @__PURE__ */ it((t, e) => {
|
|
|
157
157
|
enforceFocus: ie = !0,
|
|
158
158
|
restoreFocus: k = !0,
|
|
159
159
|
restoreFocusOptions: le,
|
|
160
|
-
renderDialog:
|
|
160
|
+
renderDialog: q,
|
|
161
161
|
renderBackdrop: de = (c) => /* @__PURE__ */ r.jsx("div", Object.assign({}, c)),
|
|
162
162
|
manager: ce,
|
|
163
163
|
container: ue,
|
|
164
|
-
onShow:
|
|
164
|
+
onShow: X,
|
|
165
165
|
onHide: H = () => {
|
|
166
166
|
},
|
|
167
167
|
onExit: fe,
|
|
168
168
|
onExited: U,
|
|
169
|
-
onExiting:
|
|
169
|
+
onExiting: Y,
|
|
170
170
|
onEnter: J,
|
|
171
171
|
onEntering: Q,
|
|
172
172
|
onEntered: Z
|
|
173
|
-
} = t, he =
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
const
|
|
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
177
|
if (h.add(), B.current = Re(document, "keydown", pe), _.current = Re(
|
|
178
178
|
document,
|
|
179
179
|
"focus",
|
|
@@ -181,9 +181,9 @@ const We = /* @__PURE__ */ it((t, e) => {
|
|
|
181
181
|
// and so steals focus from it
|
|
182
182
|
() => setTimeout(ge),
|
|
183
183
|
!0
|
|
184
|
-
),
|
|
184
|
+
), X && X(), V) {
|
|
185
185
|
var c, oe;
|
|
186
|
-
const z = ye((c = (oe = h.dialog) == null ? void 0 : oe.ownerDocument) != null ? c :
|
|
186
|
+
const z = ye((c = (oe = h.dialog) == null ? void 0 : oe.ownerDocument) != null ? c : C == null ? void 0 : C.document);
|
|
187
187
|
h.dialog && z && !ke(h.dialog, z) && (y.current = z, h.dialog.focus());
|
|
188
188
|
}
|
|
189
189
|
}), P = b(() => {
|
|
@@ -193,12 +193,12 @@ const We = /* @__PURE__ */ it((t, e) => {
|
|
|
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(() => {
|
|
@@ -207,16 +207,16 @@ const We = /* @__PURE__ */ it((t, e) => {
|
|
|
207
207
|
const ge = b(() => {
|
|
208
208
|
if (!ie || !me() || !h.isTopModal())
|
|
209
209
|
return;
|
|
210
|
-
const c = ye(
|
|
210
|
+
const c = ye(C == null ? void 0 : C.document);
|
|
211
211
|
h.dialog && c && !ke(h.dialog, c) && h.dialog.focus();
|
|
212
212
|
}), te = b((c) => {
|
|
213
213
|
c.target === c.currentTarget && (g == null || g(c), l === !0 && H());
|
|
214
214
|
}), pe = b((c) => {
|
|
215
|
-
f &&
|
|
216
|
-
}), _ =
|
|
217
|
-
|
|
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
221
|
const A = Object.assign({
|
|
222
222
|
role: o,
|
|
@@ -228,18 +228,18 @@ const We = /* @__PURE__ */ it((t, e) => {
|
|
|
228
228
|
className: s,
|
|
229
229
|
tabIndex: -1
|
|
230
230
|
});
|
|
231
|
-
let K =
|
|
231
|
+
let K = q ? q(A) : /* @__PURE__ */ r.jsx("div", Object.assign({}, A, {
|
|
232
232
|
children: /* @__PURE__ */ v.cloneElement(d, {
|
|
233
233
|
role: "document"
|
|
234
234
|
})
|
|
235
235
|
}));
|
|
236
|
-
K =
|
|
236
|
+
K = Oe(w, T, {
|
|
237
237
|
unmountOnExit: !0,
|
|
238
238
|
mountOnEnter: !0,
|
|
239
239
|
appear: !0,
|
|
240
240
|
in: !!n,
|
|
241
241
|
onExit: fe,
|
|
242
|
-
onExiting:
|
|
242
|
+
onExiting: Y,
|
|
243
243
|
onExited: ne,
|
|
244
244
|
onEnter: J,
|
|
245
245
|
onEntering: Q,
|
|
@@ -250,7 +250,7 @@ const We = /* @__PURE__ */ it((t, e) => {
|
|
|
250
250
|
return l && (L = de({
|
|
251
251
|
ref: h.setBackdropRef,
|
|
252
252
|
onClick: te
|
|
253
|
-
}), L =
|
|
253
|
+
}), L = Oe(R, ae, {
|
|
254
254
|
in: !!n,
|
|
255
255
|
appear: !0,
|
|
256
256
|
mountOnEnter: !0,
|
|
@@ -259,7 +259,7 @@ const We = /* @__PURE__ */ it((t, e) => {
|
|
|
259
259
|
})), /* @__PURE__ */ r.jsx(r.Fragment, {
|
|
260
260
|
children: /* @__PURE__ */ Mt.createPortal(/* @__PURE__ */ r.jsxs(r.Fragment, {
|
|
261
261
|
children: [L, K]
|
|
262
|
-
}),
|
|
262
|
+
}), O)
|
|
263
263
|
});
|
|
264
264
|
});
|
|
265
265
|
We.displayName = "Modal";
|
|
@@ -267,7 +267,7 @@ 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, "");
|
|
@@ -318,7 +318,7 @@ const He = /* @__PURE__ */ v.forwardRef(({
|
|
|
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
323
|
className: x(t, e),
|
|
324
324
|
...o
|
|
@@ -339,12 +339,12 @@ const Wt = He, Ht = /* @__PURE__ */ v.createContext({
|
|
|
339
339
|
scrollable: l,
|
|
340
340
|
...f
|
|
341
341
|
}, g) => {
|
|
342
|
-
t =
|
|
343
|
-
const u = `${t}-dialog`,
|
|
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
346
|
ref: g,
|
|
347
|
-
className: x(u, e, s && `${t}-${s}`, o && `${u}-centered`, l && `${u}-scrollable`, a &&
|
|
347
|
+
className: x(u, e, s && `${t}-${s}`, o && `${u}-centered`, l && `${u}-scrollable`, a && w),
|
|
348
348
|
children: /* @__PURE__ */ r.jsx("div", {
|
|
349
349
|
className: x(`${t}-content`, n),
|
|
350
350
|
children: d
|
|
@@ -357,7 +357,7 @@ const _e = Pe, Ke = /* @__PURE__ */ v.forwardRef(({
|
|
|
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
362
|
className: x(t, e),
|
|
363
363
|
...o
|
|
@@ -389,7 +389,7 @@ const Ut = Ke, Pt = /* @__PURE__ */ v.forwardRef(({
|
|
|
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
395
|
className: x(e, t),
|
|
@@ -402,7 +402,7 @@ const Kt = ze, zt = Tt("h4"), Ge = /* @__PURE__ */ v.forwardRef(({
|
|
|
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
407
|
className: x(t, e),
|
|
408
408
|
...o
|
|
@@ -415,7 +415,7 @@ function Vt(t) {
|
|
|
415
415
|
timeout: null
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function qt(t) {
|
|
419
419
|
return /* @__PURE__ */ r.jsx($e, {
|
|
420
420
|
...t,
|
|
421
421
|
timeout: null
|
|
@@ -434,7 +434,7 @@ const Ve = /* @__PURE__ */ v.forwardRef(({
|
|
|
434
434
|
"aria-describedby": g,
|
|
435
435
|
"aria-label": u,
|
|
436
436
|
/* BaseModal props */
|
|
437
|
-
show:
|
|
437
|
+
show: w = !1,
|
|
438
438
|
animation: T = !0,
|
|
439
439
|
backdrop: R = !0,
|
|
440
440
|
keyboard: ae = !0,
|
|
@@ -442,23 +442,23 @@ const Ve = /* @__PURE__ */ v.forwardRef(({
|
|
|
442
442
|
onShow: ie,
|
|
443
443
|
onHide: k,
|
|
444
444
|
container: le,
|
|
445
|
-
autoFocus:
|
|
445
|
+
autoFocus: q = !0,
|
|
446
446
|
enforceFocus: de = !0,
|
|
447
447
|
restoreFocus: ce = !0,
|
|
448
448
|
restoreFocusOptions: ue,
|
|
449
|
-
onEntered:
|
|
449
|
+
onEntered: X,
|
|
450
450
|
onExit: H,
|
|
451
451
|
onExiting: fe,
|
|
452
452
|
onEnter: U,
|
|
453
|
-
onEntering:
|
|
453
|
+
onEntering: Y,
|
|
454
454
|
onExited: J,
|
|
455
455
|
backdropClassName: Q,
|
|
456
456
|
manager: Z,
|
|
457
457
|
...he
|
|
458
|
-
},
|
|
459
|
-
const [
|
|
460
|
-
t =
|
|
461
|
-
const _ =
|
|
458
|
+
}, C) => {
|
|
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
464
|
function B() {
|
|
@@ -467,7 +467,7 @@ const Ve = /* @__PURE__ */ v.forwardRef(({
|
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
469
|
function ne(i) {
|
|
470
|
-
if (!
|
|
470
|
+
if (!Ce)
|
|
471
471
|
return;
|
|
472
472
|
const F = B().getScrollbarWidth() > 0, Ne = i.scrollHeight > Fe(i).documentElement.clientHeight;
|
|
473
473
|
h({
|
|
@@ -476,17 +476,17 @@ const Ve = /* @__PURE__ */ v.forwardRef(({
|
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
478
|
const A = b(() => {
|
|
479
|
-
|
|
479
|
+
E && ne(E.dialog);
|
|
480
480
|
});
|
|
481
481
|
De(() => {
|
|
482
|
-
|
|
482
|
+
Se(window, "resize", A), y.current == null || y.current();
|
|
483
483
|
});
|
|
484
484
|
const K = () => {
|
|
485
485
|
j.current = !0;
|
|
486
486
|
}, L = (i) => {
|
|
487
|
-
j.current &&
|
|
487
|
+
j.current && E && i.target === E.dialog && (S.current = !0), j.current = !1;
|
|
488
488
|
}, c = () => {
|
|
489
|
-
ee(!0), y.current =
|
|
489
|
+
ee(!0), y.current = dt(E.dialog, () => {
|
|
490
490
|
ee(!1);
|
|
491
491
|
});
|
|
492
492
|
}, oe = (i) => {
|
|
@@ -496,27 +496,27 @@ const Ve = /* @__PURE__ */ v.forwardRef(({
|
|
|
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
503
|
k == null || k();
|
|
504
|
-
},
|
|
504
|
+
}, qe = (i) => {
|
|
505
505
|
ae ? V == null || V(i) : (i.preventDefault(), R === "static" && c());
|
|
506
|
-
},
|
|
506
|
+
}, Xe = (i, F) => {
|
|
507
507
|
i && ne(i), U == null || U(i, F);
|
|
508
|
-
},
|
|
508
|
+
}, Ye = (i) => {
|
|
509
509
|
y.current == null || y.current(), H == null || H(i);
|
|
510
510
|
}, Je = (i, F) => {
|
|
511
|
-
|
|
511
|
+
Y == null || Y(i, F), lt(window, "resize", A);
|
|
512
512
|
}, Qe = (i) => {
|
|
513
|
-
i && (i.style.display = ""), J == null || J(i),
|
|
513
|
+
i && (i.style.display = ""), J == null || J(i), Se(window, "resize", A);
|
|
514
514
|
}, Ze = m((i) => /* @__PURE__ */ r.jsx("div", {
|
|
515
515
|
...i,
|
|
516
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
522
|
const et = (i) => /* @__PURE__ */ r.jsx("div", {
|
|
@@ -541,27 +541,27 @@ const Ve = /* @__PURE__ */ v.forwardRef(({
|
|
|
541
541
|
return /* @__PURE__ */ r.jsx(Ue.Provider, {
|
|
542
542
|
value: _,
|
|
543
543
|
children: /* @__PURE__ */ r.jsx(Lt, {
|
|
544
|
-
show:
|
|
544
|
+
show: w,
|
|
545
545
|
ref: ge,
|
|
546
546
|
backdrop: R,
|
|
547
547
|
container: le,
|
|
548
548
|
keyboard: !0,
|
|
549
|
-
autoFocus:
|
|
549
|
+
autoFocus: q,
|
|
550
550
|
enforceFocus: de,
|
|
551
551
|
restoreFocus: ce,
|
|
552
552
|
restoreFocusOptions: ue,
|
|
553
|
-
onEscapeKeyDown:
|
|
553
|
+
onEscapeKeyDown: qe,
|
|
554
554
|
onShow: ie,
|
|
555
555
|
onHide: k,
|
|
556
|
-
onEnter:
|
|
556
|
+
onEnter: Xe,
|
|
557
557
|
onEntering: Je,
|
|
558
|
-
onEntered:
|
|
559
|
-
onExit:
|
|
558
|
+
onEntered: X,
|
|
559
|
+
onExit: Ye,
|
|
560
560
|
onExiting: fe,
|
|
561
561
|
onExited: Qe,
|
|
562
562
|
manager: B(),
|
|
563
563
|
transition: T ? Vt : void 0,
|
|
564
|
-
backdropTransition: T ?
|
|
564
|
+
backdropTransition: T ? qt : void 0,
|
|
565
565
|
renderBackdrop: Ze,
|
|
566
566
|
renderDialog: et
|
|
567
567
|
})
|
|
@@ -576,8 +576,8 @@ const N = Object.assign(Ve, {
|
|
|
576
576
|
Dialog: _e,
|
|
577
577
|
TRANSITION_DURATION: 300,
|
|
578
578
|
BACKDROP_TRANSITION_DURATION: 150
|
|
579
|
-
}),
|
|
580
|
-
const { confirmTexts: t } = be(
|
|
579
|
+
}), Xt = () => {
|
|
580
|
+
const { confirmTexts: t } = be(Ee), { isShown: e, text: n, onFinish: o } = yt(), [s, a] = p(""), d = m(() => {
|
|
581
581
|
o(null);
|
|
582
582
|
}, [o]), l = m(() => {
|
|
583
583
|
o(s);
|
|
@@ -602,71 +602,73 @@ const N = Object.assign(Ve, {
|
|
|
602
602
|
/* @__PURE__ */ r.jsx("button", { type: "button", className: "btn btn-primary ml", onClick: l, children: t.confirm })
|
|
603
603
|
] })
|
|
604
604
|
] });
|
|
605
|
-
},
|
|
606
|
-
const [e, n] = p(!1), [o, s] = p(""), a =
|
|
605
|
+
}, Yt = ({ children: t }) => {
|
|
606
|
+
const [e, n] = p(!1), [o, s] = p(""), a = M(() => {
|
|
607
607
|
}), d = m((g) => {
|
|
608
608
|
s(g), n(!0), console.log("showprompt");
|
|
609
609
|
}, []), l = m(() => {
|
|
610
610
|
n(!1);
|
|
611
|
-
}, []), f =
|
|
612
|
-
return /* @__PURE__ */ r.jsxs(
|
|
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: [
|
|
613
613
|
t,
|
|
614
|
-
/* @__PURE__ */ r.jsx(
|
|
614
|
+
/* @__PURE__ */ r.jsx(Xt, {})
|
|
615
615
|
] });
|
|
616
616
|
}, Jt = ({ children: t }) => {
|
|
617
617
|
const [e, n] = p(!1), [o, s] = p(""), a = m((f) => {
|
|
618
618
|
n(!0), s(f);
|
|
619
619
|
}, []), d = m(() => {
|
|
620
620
|
n(!1);
|
|
621
|
-
}, []), l =
|
|
622
|
-
return /* @__PURE__ */ r.jsxs(
|
|
621
|
+
}, []), l = W(() => ({ show: e, text: o, showConfirm: a, hideConfirm: d }), [e, o, a, d]);
|
|
622
|
+
return /* @__PURE__ */ r.jsxs(ut.Provider, { value: l, children: [
|
|
623
623
|
/* @__PURE__ */ r.jsx(Qt, {}),
|
|
624
624
|
t
|
|
625
625
|
] });
|
|
626
|
-
}, rn = ({
|
|
627
|
-
const
|
|
628
|
-
axiosInstance:
|
|
629
|
-
cookieDomain:
|
|
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(() => ({
|
|
628
|
+
axiosInstance: e,
|
|
629
|
+
cookieDomain: t,
|
|
630
630
|
LinkComponent: n,
|
|
631
631
|
language: o,
|
|
632
632
|
axiosTexts: s,
|
|
633
633
|
confirmTexts: a,
|
|
634
634
|
formValidationTexts: d,
|
|
635
635
|
homeDashboardTexts: l,
|
|
636
|
-
formSubmitTexts: f
|
|
636
|
+
formSubmitTexts: f,
|
|
637
|
+
appSearchTexts: g
|
|
637
638
|
}), [
|
|
638
|
-
t,
|
|
639
639
|
e,
|
|
640
|
+
t,
|
|
640
641
|
n,
|
|
641
642
|
o,
|
|
642
643
|
s,
|
|
643
644
|
a,
|
|
644
645
|
d,
|
|
645
646
|
l,
|
|
646
|
-
f
|
|
647
|
-
]);
|
|
648
|
-
return /* @__PURE__ */ r.jsx(Ce.Provider, { value: u, children: /* @__PURE__ */ r.jsx(Jt, { children: /* @__PURE__ */ r.jsxs(qt, { children: [
|
|
649
|
-
/* @__PURE__ */ r.jsx(ot, {}),
|
|
647
|
+
f,
|
|
650
648
|
g
|
|
649
|
+
]);
|
|
650
|
+
return /* @__PURE__ */ r.jsx(Ee.Provider, { value: w, children: /* @__PURE__ */ r.jsx(Jt, { children: /* @__PURE__ */ r.jsxs(Yt, { children: [
|
|
651
|
+
/* @__PURE__ */ r.jsx(ft, {}),
|
|
652
|
+
u
|
|
651
653
|
] }) }) });
|
|
652
654
|
}, an = ({ children: t }) => {
|
|
653
655
|
const [e, n] = p(!1), [o] = p(/* @__PURE__ */ new Set()), s = m((l) => {
|
|
654
656
|
o.add(l), n(!0);
|
|
655
657
|
}, [o]), a = m((l) => {
|
|
656
658
|
o.delete(l), o.size === 0 && n(!1);
|
|
657
|
-
}, [o]), d =
|
|
658
|
-
return /* @__PURE__ */ r.jsxs(
|
|
659
|
-
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, {}),
|
|
660
662
|
t
|
|
661
663
|
] });
|
|
662
664
|
}, ln = ({ children: t }) => {
|
|
663
|
-
const e =
|
|
665
|
+
const e = mt(), n = m(() => {
|
|
664
666
|
const u = localStorage.getItem("user") ?? null;
|
|
665
667
|
return u ? JSON.parse(u) : null;
|
|
666
668
|
}, []), [o, s] = p(n()), a = m(async () => {
|
|
667
669
|
let u = null;
|
|
668
|
-
return await e.get("/user/detail").then((
|
|
669
|
-
u =
|
|
670
|
+
return await e.get("/user/detail").then((w) => {
|
|
671
|
+
u = w.data;
|
|
670
672
|
}).catch(() => {
|
|
671
673
|
u = null;
|
|
672
674
|
}), localStorage.setItem("user", JSON.stringify(u)), u;
|
|
@@ -677,12 +679,12 @@ const N = Object.assign(Ve, {
|
|
|
677
679
|
return u ? (s(u), !0) : !1;
|
|
678
680
|
}, [a]), f = m(() => {
|
|
679
681
|
d(), s(null);
|
|
680
|
-
}, [d]), g =
|
|
682
|
+
}, [d]), g = W(() => ({ user: o, loginUser: l, logoutUser: f }), [o, l, f]);
|
|
681
683
|
return re(() => {
|
|
682
684
|
s(n());
|
|
683
|
-
}, [n]), /* @__PURE__ */ r.jsx(
|
|
685
|
+
}, [n]), /* @__PURE__ */ r.jsx(gt.Provider, { value: g, children: t });
|
|
684
686
|
}, Qt = () => {
|
|
685
|
-
const { confirmTexts: t } = be(
|
|
687
|
+
const { confirmTexts: t } = be(Ee), { onConfirm: e, onCancel: n, text: o, show: s } = xt();
|
|
686
688
|
return /* @__PURE__ */ r.jsx(N, { show: s, size: "sm", centered: !0, onHide: n, children: /* @__PURE__ */ r.jsxs(N.Body, { children: [
|
|
687
689
|
/* @__PURE__ */ r.jsx("div", { className: "mb-5 text-center", children: /* @__PURE__ */ r.jsx(wt, { variant: "h6", children: o }) }),
|
|
688
690
|
/* @__PURE__ */ r.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|
|
@@ -692,10 +694,10 @@ const N = Object.assign(Ve, {
|
|
|
692
694
|
] }) });
|
|
693
695
|
};
|
|
694
696
|
export {
|
|
695
|
-
|
|
697
|
+
ht as LoadingContext,
|
|
696
698
|
an as LoadingProvider,
|
|
697
|
-
|
|
699
|
+
Ee as LuminusComponentsContext,
|
|
698
700
|
rn as LuminusComponentsProvider,
|
|
699
|
-
|
|
701
|
+
gt as UserContext,
|
|
700
702
|
ln as UserProvider
|
|
701
703
|
};
|