react-luminus-components 1.1.22 → 1.1.24
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 +52 -61
- package/dist/{DataKey-B7CWQXvv.js → DataKey-C2SXqWR2.js} +1 -1
- package/dist/{DataKey-DVMbPWFY.cjs → DataKey-CvRVDggK.cjs} +1 -1
- package/dist/{SimpleTooltip-Dk1A5Tpg.js → SimpleTooltip-Bldb-kTm.js} +2 -2
- package/dist/{SimpleTooltip-D91sCKFo.cjs → SimpleTooltip-C_bpFbwl.cjs} +1 -1
- package/dist/components/Tabs/Tabs.d.ts +3 -1
- package/dist/components/Tabs/comps/Tab/Tab.d.ts +1 -1
- package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +1 -0
- package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +2 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +153 -151
- package/dist/{hasClass-DIHyDa4e.js → hasClass-BW_ewlE1.js} +1 -1
- package/dist/{hasClass-DjB0wTmj.cjs → hasClass-uRfdPyYB.cjs} +1 -1
- package/dist/hooks/useAxios/useAxios.d.ts +1 -1
- 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 +690 -690
- package/dist/style.css +1 -1
- package/dist/textUtils-CHVVh2oi.cjs +1 -0
- package/dist/textUtils-DW4f3rLU.js +36 -0
- package/dist/useAxios-CMffjGyX.cjs +231 -0
- package/dist/useAxios-hDu0KL-3.js +3314 -0
- package/dist/{useConfirm-CrTJszXF.cjs → useConfirm-BkwWgb-h.cjs} +1 -1
- package/dist/{useConfirm-CyietOP-.js → useConfirm-DYu6kYED.js} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +5 -5
- package/package.json +2 -1
- package/dist/constants-CT2hnPeO.cjs +0 -1
- package/dist/constants-CzNy5yO3.js +0 -7
- package/dist/textUtils-Bb6c2XYw.cjs +0 -1
- package/dist/textUtils-Bd2QCbzF.js +0 -32
- package/dist/useAxios-B4X7zKtj.cjs +0 -212
- package/dist/useAxios-CHbKHRpj.js +0 -2883
package/dist/contexts.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { j as r, d as x, L as Ce, P as tt, C as
|
|
1
|
+
import { j as r, d as x, L as Ce, P as tt, C as nt, I as ot, e as st, b as rt, U as at } from "./useAxios-hDu0KL-3.js";
|
|
2
2
|
import * as v from "react";
|
|
3
3
|
import { forwardRef as it, useState as p, useRef as E, useImperativeHandle as lt, useEffect as re, useCallback as m, useContext as be, useMemo as $ } from "react";
|
|
4
|
-
import { a as dt, u as ct } from "./useConfirm-
|
|
5
|
-
import { P as ve, c as Ee, o as Fe, s as G, u as
|
|
6
|
-
import { d as Ct, u as bt, q as
|
|
4
|
+
import { a as dt, u as ct } from "./useConfirm-DYu6kYED.js";
|
|
5
|
+
import { P as ve, c as Ee, o as Fe, s as G, u as Ie, a as ut, b as ft, d as b, l as Re, e as ke, f as De, i as ht, r as Se, h as mt, g as W, j as gt, k as pt, m as vt, n as Oe, F as $e, p as yt, t as xt, T as wt } from "./hasClass-BW_ewlE1.js";
|
|
6
|
+
import { d as Ct, u as bt, q as I, L as Et } from "./DataKey-C2SXqWR2.js";
|
|
7
7
|
import Mt from "react-dom";
|
|
8
|
-
const Tt = (t) => /* @__PURE__ */ v.forwardRef((e,
|
|
8
|
+
const Tt = (t) => /* @__PURE__ */ v.forwardRef((e, n) => /* @__PURE__ */ r.jsx("div", {
|
|
9
9
|
...e,
|
|
10
|
-
ref:
|
|
10
|
+
ref: n,
|
|
11
11
|
className: x(e.className, t)
|
|
12
12
|
})), jt = {
|
|
13
13
|
/** An accessible label indicating the relevant information about the Close Button. */
|
|
@@ -23,14 +23,14 @@ const Tt = (t) => /* @__PURE__ */ v.forwardRef((e, o) => /* @__PURE__ */ r.jsx("
|
|
|
23
23
|
}, Me = /* @__PURE__ */ v.forwardRef(({
|
|
24
24
|
className: t,
|
|
25
25
|
variant: e,
|
|
26
|
-
"aria-label":
|
|
27
|
-
...
|
|
26
|
+
"aria-label": n = "Close",
|
|
27
|
+
...o
|
|
28
28
|
}, s) => /* @__PURE__ */ r.jsx("button", {
|
|
29
29
|
ref: s,
|
|
30
30
|
type: "button",
|
|
31
31
|
className: x("btn-close", e && `btn-close-${e}`, t),
|
|
32
|
-
"aria-label":
|
|
33
|
-
...
|
|
32
|
+
"aria-label": n,
|
|
33
|
+
...o
|
|
34
34
|
}));
|
|
35
35
|
Me.displayName = "CloseButton";
|
|
36
36
|
Me.propTypes = jt;
|
|
@@ -60,10 +60,10 @@ const Ae = Ct("modal-open");
|
|
|
60
60
|
class kt {
|
|
61
61
|
constructor({
|
|
62
62
|
ownerDocument: e,
|
|
63
|
-
handleContainerOverflow:
|
|
64
|
-
isRTL:
|
|
63
|
+
handleContainerOverflow: n = !0,
|
|
64
|
+
isRTL: o = !1
|
|
65
65
|
} = {}) {
|
|
66
|
-
this.handleContainerOverflow =
|
|
66
|
+
this.handleContainerOverflow = n, this.isRTL = o, this.modals = [], this.ownerDocument = e;
|
|
67
67
|
}
|
|
68
68
|
getScrollbarWidth() {
|
|
69
69
|
return Rt(this.ownerDocument);
|
|
@@ -76,31 +76,31 @@ class kt {
|
|
|
76
76
|
removeModalAttributes(e) {
|
|
77
77
|
}
|
|
78
78
|
setContainerStyle(e) {
|
|
79
|
-
const
|
|
79
|
+
const n = {
|
|
80
80
|
overflow: "hidden"
|
|
81
|
-
},
|
|
81
|
+
}, o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.getElement();
|
|
82
82
|
e.style = {
|
|
83
83
|
overflow: s.style.overflow,
|
|
84
|
-
[
|
|
85
|
-
}, e.scrollBarWidth && (o
|
|
84
|
+
[o]: s.style[o]
|
|
85
|
+
}, e.scrollBarWidth && (n[o] = `${parseInt(G(s, o) || "0", 10) + e.scrollBarWidth}px`), s.setAttribute(Ae, ""), G(s, n);
|
|
86
86
|
}
|
|
87
87
|
reset() {
|
|
88
88
|
[...this.modals].forEach((e) => this.remove(e));
|
|
89
89
|
}
|
|
90
90
|
removeContainerStyle(e) {
|
|
91
|
-
const
|
|
92
|
-
|
|
91
|
+
const n = this.getElement();
|
|
92
|
+
n.removeAttribute(Ae), Object.assign(n.style, e.style);
|
|
93
93
|
}
|
|
94
94
|
add(e) {
|
|
95
|
-
let
|
|
96
|
-
return
|
|
95
|
+
let n = this.modals.indexOf(e);
|
|
96
|
+
return n !== -1 || (n = this.modals.length, this.modals.push(e), this.setModalAttributes(e), n !== 0) || (this.state = {
|
|
97
97
|
scrollBarWidth: this.getScrollbarWidth(),
|
|
98
98
|
style: {}
|
|
99
|
-
}, this.handleContainerOverflow && this.setContainerStyle(this.state)),
|
|
99
|
+
}, this.handleContainerOverflow && this.setContainerStyle(this.state)), n;
|
|
100
100
|
}
|
|
101
101
|
remove(e) {
|
|
102
|
-
const
|
|
103
|
-
|
|
102
|
+
const n = this.modals.indexOf(e);
|
|
103
|
+
n !== -1 && (this.modals.splice(n, 1), !this.modals.length && this.handleContainerOverflow && this.removeContainerStyle(this.state), this.removeModalAttributes(e));
|
|
104
104
|
}
|
|
105
105
|
isTopModal(e) {
|
|
106
106
|
return !!this.modals.length && this.modals[this.modals.length - 1] === e;
|
|
@@ -110,10 +110,10 @@ const Te = kt, St = ["show", "role", "className", "style", "children", "backdrop
|
|
|
110
110
|
function Ot(t, e) {
|
|
111
111
|
if (t == null)
|
|
112
112
|
return {};
|
|
113
|
-
var
|
|
114
|
-
for (a = 0; a <
|
|
115
|
-
s =
|
|
116
|
-
return
|
|
113
|
+
var n = {}, o = Object.keys(t), s, a;
|
|
114
|
+
for (a = 0; a < o.length; a++)
|
|
115
|
+
s = o[a], !(e.indexOf(s) >= 0) && (n[s] = t[s]);
|
|
116
|
+
return n;
|
|
117
117
|
}
|
|
118
118
|
let xe;
|
|
119
119
|
function Bt(t) {
|
|
@@ -122,26 +122,26 @@ function Bt(t) {
|
|
|
122
122
|
})), xe;
|
|
123
123
|
}
|
|
124
124
|
function At(t) {
|
|
125
|
-
const e =
|
|
125
|
+
const e = Ie(), n = t || Bt(e), o = E({
|
|
126
126
|
dialog: null,
|
|
127
127
|
backdrop: null
|
|
128
128
|
});
|
|
129
|
-
return Object.assign(
|
|
130
|
-
add: () =>
|
|
131
|
-
remove: () =>
|
|
132
|
-
isTopModal: () =>
|
|
129
|
+
return Object.assign(o.current, {
|
|
130
|
+
add: () => n.add(o.current),
|
|
131
|
+
remove: () => n.remove(o.current),
|
|
132
|
+
isTopModal: () => n.isTopModal(o.current),
|
|
133
133
|
setDialogRef: m((s) => {
|
|
134
|
-
|
|
134
|
+
o.current.dialog = s;
|
|
135
135
|
}, []),
|
|
136
136
|
setBackdropRef: m((s) => {
|
|
137
|
-
|
|
137
|
+
o.current.backdrop = s;
|
|
138
138
|
}, [])
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
const We = /* @__PURE__ */ it((t, e) => {
|
|
142
142
|
let {
|
|
143
|
-
show:
|
|
144
|
-
role:
|
|
143
|
+
show: n = !1,
|
|
144
|
+
role: o = "dialog",
|
|
145
145
|
className: s,
|
|
146
146
|
style: a,
|
|
147
147
|
children: d,
|
|
@@ -171,8 +171,8 @@ const We = /* @__PURE__ */ it((t, e) => {
|
|
|
171
171
|
onEntering: Q,
|
|
172
172
|
onEntered: Z
|
|
173
173
|
} = t, he = Ot(t, St);
|
|
174
|
-
const w =
|
|
175
|
-
lt(e, () => h, [h]), Ee && !ee &&
|
|
174
|
+
const w = Ie(), S = ut(ue), h = At(ce), me = ft(), ee = bt(n), [j, O] = p(!n), y = E(null);
|
|
175
|
+
lt(e, () => h, [h]), Ee && !ee && n && (y.current = ye(w == null ? void 0 : w.document)), n && j && O(!1);
|
|
176
176
|
const C = b(() => {
|
|
177
177
|
if (h.add(), B.current = Re(document, "keydown", pe), _.current = Re(
|
|
178
178
|
document,
|
|
@@ -182,8 +182,8 @@ const We = /* @__PURE__ */ it((t, e) => {
|
|
|
182
182
|
() => setTimeout(ge),
|
|
183
183
|
!0
|
|
184
184
|
), Y && Y(), V) {
|
|
185
|
-
var c,
|
|
186
|
-
const z = ye((c = (
|
|
185
|
+
var c, oe;
|
|
186
|
+
const z = ye((c = (oe = h.dialog) == null ? void 0 : oe.ownerDocument) != null ? c : w == null ? void 0 : w.document);
|
|
187
187
|
h.dialog && z && !ke(h.dialog, z) && (y.current = z, h.dialog.focus());
|
|
188
188
|
}
|
|
189
189
|
}), P = b(() => {
|
|
@@ -193,15 +193,15 @@ const We = /* @__PURE__ */ it((t, e) => {
|
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
195
|
re(() => {
|
|
196
|
-
!
|
|
196
|
+
!n || !S || C();
|
|
197
197
|
}, [
|
|
198
|
-
|
|
198
|
+
n,
|
|
199
199
|
S,
|
|
200
200
|
/* should never change: */
|
|
201
201
|
C
|
|
202
202
|
]), re(() => {
|
|
203
203
|
j && P();
|
|
204
|
-
}, [j, P]),
|
|
204
|
+
}, [j, P]), De(() => {
|
|
205
205
|
P();
|
|
206
206
|
});
|
|
207
207
|
const ge = b(() => {
|
|
@@ -213,16 +213,16 @@ const We = /* @__PURE__ */ it((t, e) => {
|
|
|
213
213
|
c.target === c.currentTarget && (g == null || g(c), l === !0 && H());
|
|
214
214
|
}), pe = b((c) => {
|
|
215
215
|
f && ht(c) && h.isTopModal() && (u == null || u(c), c.defaultPrevented || H());
|
|
216
|
-
}), _ = E(), B = E(),
|
|
216
|
+
}), _ = E(), B = E(), ne = (...c) => {
|
|
217
217
|
O(!0), U == null || U(...c);
|
|
218
218
|
};
|
|
219
219
|
if (!S)
|
|
220
220
|
return null;
|
|
221
221
|
const A = Object.assign({
|
|
222
|
-
role:
|
|
222
|
+
role: o,
|
|
223
223
|
ref: h.setDialogRef,
|
|
224
224
|
// apparently only works on the dialog role element
|
|
225
|
-
"aria-modal":
|
|
225
|
+
"aria-modal": o === "dialog" ? !0 : void 0
|
|
226
226
|
}, he, {
|
|
227
227
|
style: a,
|
|
228
228
|
className: s,
|
|
@@ -237,10 +237,10 @@ const We = /* @__PURE__ */ it((t, e) => {
|
|
|
237
237
|
unmountOnExit: !0,
|
|
238
238
|
mountOnEnter: !0,
|
|
239
239
|
appear: !0,
|
|
240
|
-
in: !!
|
|
240
|
+
in: !!n,
|
|
241
241
|
onExit: fe,
|
|
242
242
|
onExiting: q,
|
|
243
|
-
onExited:
|
|
243
|
+
onExited: ne,
|
|
244
244
|
onEnter: J,
|
|
245
245
|
onEntering: Q,
|
|
246
246
|
onEntered: Z,
|
|
@@ -251,7 +251,7 @@ const We = /* @__PURE__ */ it((t, e) => {
|
|
|
251
251
|
ref: h.setBackdropRef,
|
|
252
252
|
onClick: te
|
|
253
253
|
}), L = Se(R, ae, {
|
|
254
|
-
in: !!
|
|
254
|
+
in: !!n,
|
|
255
255
|
appear: !0,
|
|
256
256
|
mountOnEnter: !0,
|
|
257
257
|
unmountOnExit: !0,
|
|
@@ -272,56 +272,56 @@ function Ft(t, e) {
|
|
|
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, "");
|
|
274
274
|
}
|
|
275
|
-
function
|
|
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"
|
|
282
282
|
};
|
|
283
|
-
class
|
|
284
|
-
adjustAndStore(e,
|
|
285
|
-
const s =
|
|
286
|
-
|
|
287
|
-
[e]: `${parseFloat(G(
|
|
283
|
+
class Dt extends Te {
|
|
284
|
+
adjustAndStore(e, n, o) {
|
|
285
|
+
const s = n.style[e];
|
|
286
|
+
n.dataset[e] = s, G(n, {
|
|
287
|
+
[e]: `${parseFloat(G(n, e)) + o}px`
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
|
-
restore(e,
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
[e]:
|
|
290
|
+
restore(e, n) {
|
|
291
|
+
const o = n.dataset[e];
|
|
292
|
+
o !== void 0 && (delete n.dataset[e], G(n, {
|
|
293
|
+
[e]: o
|
|
294
294
|
}));
|
|
295
295
|
}
|
|
296
296
|
setContainerStyle(e) {
|
|
297
297
|
super.setContainerStyle(e);
|
|
298
|
-
const
|
|
299
|
-
if (Ft(
|
|
298
|
+
const n = this.getElement();
|
|
299
|
+
if (Ft(n, "modal-open"), !e.scrollBarWidth)
|
|
300
300
|
return;
|
|
301
|
-
const
|
|
302
|
-
|
|
301
|
+
const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
|
|
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
|
-
const
|
|
307
|
-
|
|
308
|
-
const
|
|
309
|
-
|
|
306
|
+
const n = this.getElement();
|
|
307
|
+
It(n, "modal-open");
|
|
308
|
+
const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
|
|
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
312
|
let we;
|
|
313
313
|
function $t(t) {
|
|
314
|
-
return we || (we = new
|
|
314
|
+
return we || (we = new Dt(t)), we;
|
|
315
315
|
}
|
|
316
316
|
const He = /* @__PURE__ */ v.forwardRef(({
|
|
317
317
|
className: t,
|
|
318
318
|
bsPrefix: e,
|
|
319
|
-
as:
|
|
320
|
-
...
|
|
321
|
-
}, s) => (e = W(e, "modal-body"), /* @__PURE__ */ r.jsx(
|
|
319
|
+
as: n = "div",
|
|
320
|
+
...o
|
|
321
|
+
}, s) => (e = W(e, "modal-body"), /* @__PURE__ */ r.jsx(n, {
|
|
322
322
|
ref: s,
|
|
323
323
|
className: x(t, e),
|
|
324
|
-
...
|
|
324
|
+
...o
|
|
325
325
|
})));
|
|
326
326
|
He.displayName = "ModalBody";
|
|
327
327
|
const Wt = He, Ht = /* @__PURE__ */ v.createContext({
|
|
@@ -331,8 +331,8 @@ const Wt = He, Ht = /* @__PURE__ */ v.createContext({
|
|
|
331
331
|
}), Ue = Ht, Pe = /* @__PURE__ */ v.forwardRef(({
|
|
332
332
|
bsPrefix: t,
|
|
333
333
|
className: e,
|
|
334
|
-
contentClassName:
|
|
335
|
-
centered:
|
|
334
|
+
contentClassName: n,
|
|
335
|
+
centered: o,
|
|
336
336
|
size: s,
|
|
337
337
|
fullscreen: a,
|
|
338
338
|
children: d,
|
|
@@ -344,9 +344,9 @@ const Wt = He, Ht = /* @__PURE__ */ v.createContext({
|
|
|
344
344
|
return /* @__PURE__ */ r.jsx("div", {
|
|
345
345
|
...f,
|
|
346
346
|
ref: g,
|
|
347
|
-
className: x(u, e, s && `${t}-${s}`,
|
|
347
|
+
className: x(u, e, s && `${t}-${s}`, o && `${u}-centered`, l && `${u}-scrollable`, a && M),
|
|
348
348
|
children: /* @__PURE__ */ r.jsx("div", {
|
|
349
|
-
className: x(`${t}-content`,
|
|
349
|
+
className: x(`${t}-content`, n),
|
|
350
350
|
children: d
|
|
351
351
|
})
|
|
352
352
|
});
|
|
@@ -355,29 +355,29 @@ Pe.displayName = "ModalDialog";
|
|
|
355
355
|
const _e = Pe, Ke = /* @__PURE__ */ v.forwardRef(({
|
|
356
356
|
className: t,
|
|
357
357
|
bsPrefix: e,
|
|
358
|
-
as:
|
|
359
|
-
...
|
|
360
|
-
}, s) => (e = W(e, "modal-footer"), /* @__PURE__ */ r.jsx(
|
|
358
|
+
as: n = "div",
|
|
359
|
+
...o
|
|
360
|
+
}, s) => (e = W(e, "modal-footer"), /* @__PURE__ */ r.jsx(n, {
|
|
361
361
|
ref: s,
|
|
362
362
|
className: x(t, e),
|
|
363
|
-
...
|
|
363
|
+
...o
|
|
364
364
|
})));
|
|
365
365
|
Ke.displayName = "ModalFooter";
|
|
366
366
|
const Ut = Ke, Pt = /* @__PURE__ */ v.forwardRef(({
|
|
367
367
|
closeLabel: t = "Close",
|
|
368
368
|
closeVariant: e,
|
|
369
|
-
closeButton:
|
|
370
|
-
onHide:
|
|
369
|
+
closeButton: n = !1,
|
|
370
|
+
onHide: o,
|
|
371
371
|
children: s,
|
|
372
372
|
...a
|
|
373
373
|
}, d) => {
|
|
374
374
|
const l = be(Ue), f = b(() => {
|
|
375
|
-
l == null || l.onHide(),
|
|
375
|
+
l == null || l.onHide(), o == null || o();
|
|
376
376
|
});
|
|
377
377
|
return /* @__PURE__ */ r.jsxs("div", {
|
|
378
378
|
ref: d,
|
|
379
379
|
...a,
|
|
380
|
-
children: [s,
|
|
380
|
+
children: [s, n && /* @__PURE__ */ r.jsx(Nt, {
|
|
381
381
|
"aria-label": t,
|
|
382
382
|
variant: e,
|
|
383
383
|
onClick: f
|
|
@@ -386,26 +386,26 @@ const Ut = Ke, Pt = /* @__PURE__ */ v.forwardRef(({
|
|
|
386
386
|
}), _t = Pt, ze = /* @__PURE__ */ v.forwardRef(({
|
|
387
387
|
bsPrefix: t,
|
|
388
388
|
className: e,
|
|
389
|
-
closeLabel:
|
|
390
|
-
closeButton:
|
|
389
|
+
closeLabel: n = "Close",
|
|
390
|
+
closeButton: o = !1,
|
|
391
391
|
...s
|
|
392
392
|
}, a) => (t = W(t, "modal-header"), /* @__PURE__ */ r.jsx(_t, {
|
|
393
393
|
ref: a,
|
|
394
394
|
...s,
|
|
395
395
|
className: x(e, t),
|
|
396
|
-
closeLabel:
|
|
397
|
-
closeButton:
|
|
396
|
+
closeLabel: n,
|
|
397
|
+
closeButton: o
|
|
398
398
|
})));
|
|
399
399
|
ze.displayName = "ModalHeader";
|
|
400
400
|
const Kt = ze, zt = Tt("h4"), Ge = /* @__PURE__ */ v.forwardRef(({
|
|
401
401
|
className: t,
|
|
402
402
|
bsPrefix: e,
|
|
403
|
-
as:
|
|
404
|
-
...
|
|
405
|
-
}, s) => (e = W(e, "modal-title"), /* @__PURE__ */ r.jsx(
|
|
403
|
+
as: n = zt,
|
|
404
|
+
...o
|
|
405
|
+
}, s) => (e = W(e, "modal-title"), /* @__PURE__ */ r.jsx(n, {
|
|
406
406
|
ref: s,
|
|
407
407
|
className: x(t, e),
|
|
408
|
-
...
|
|
408
|
+
...o
|
|
409
409
|
})));
|
|
410
410
|
Ge.displayName = "ModalTitle";
|
|
411
411
|
const Gt = Ge;
|
|
@@ -424,8 +424,8 @@ function Xt(t) {
|
|
|
424
424
|
const Ve = /* @__PURE__ */ v.forwardRef(({
|
|
425
425
|
bsPrefix: t,
|
|
426
426
|
className: e,
|
|
427
|
-
style:
|
|
428
|
-
dialogClassName:
|
|
427
|
+
style: n,
|
|
428
|
+
dialogClassName: o,
|
|
429
429
|
contentClassName: s,
|
|
430
430
|
children: a,
|
|
431
431
|
dialogAs: d = _e,
|
|
@@ -466,7 +466,7 @@ const Ve = /* @__PURE__ */ v.forwardRef(({
|
|
|
466
466
|
isRTL: pe
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function ne(i) {
|
|
470
470
|
if (!Ee)
|
|
471
471
|
return;
|
|
472
472
|
const F = B().getScrollbarWidth() > 0, Ne = i.scrollHeight > Fe(i).documentElement.clientHeight;
|
|
@@ -476,9 +476,9 @@ const Ve = /* @__PURE__ */ v.forwardRef(({
|
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
478
|
const A = b(() => {
|
|
479
|
-
C &&
|
|
479
|
+
C && ne(C.dialog);
|
|
480
480
|
});
|
|
481
|
-
|
|
481
|
+
De(() => {
|
|
482
482
|
Oe(window, "resize", A), y.current == null || y.current();
|
|
483
483
|
});
|
|
484
484
|
const K = () => {
|
|
@@ -489,11 +489,11 @@ const Ve = /* @__PURE__ */ v.forwardRef(({
|
|
|
489
489
|
ee(!0), y.current = xt(C.dialog, () => {
|
|
490
490
|
ee(!1);
|
|
491
491
|
});
|
|
492
|
-
},
|
|
492
|
+
}, oe = (i) => {
|
|
493
493
|
i.target === i.currentTarget && c();
|
|
494
494
|
}, z = (i) => {
|
|
495
495
|
if (R === "static") {
|
|
496
|
-
|
|
496
|
+
oe(i);
|
|
497
497
|
return;
|
|
498
498
|
}
|
|
499
499
|
if (O.current || i.target !== i.currentTarget) {
|
|
@@ -504,7 +504,7 @@ const Ve = /* @__PURE__ */ v.forwardRef(({
|
|
|
504
504
|
}, Xe = (i) => {
|
|
505
505
|
ae ? V == null || V(i) : (i.preventDefault(), R === "static" && c());
|
|
506
506
|
}, Ye = (i, F) => {
|
|
507
|
-
i &&
|
|
507
|
+
i && ne(i), U == null || U(i, F);
|
|
508
508
|
}, qe = (i) => {
|
|
509
509
|
y.current == null || y.current(), H == null || H(i);
|
|
510
510
|
}, Je = (i, F) => {
|
|
@@ -515,7 +515,7 @@ const Ve = /* @__PURE__ */ v.forwardRef(({
|
|
|
515
515
|
...i,
|
|
516
516
|
className: x(`${t}-backdrop`, Q, !T && "show")
|
|
517
517
|
}), [T, Q, t]), je = {
|
|
518
|
-
...
|
|
518
|
+
...n,
|
|
519
519
|
...S
|
|
520
520
|
};
|
|
521
521
|
je.display = "block";
|
|
@@ -533,7 +533,7 @@ const Ve = /* @__PURE__ */ v.forwardRef(({
|
|
|
533
533
|
children: /* @__PURE__ */ r.jsx(d, {
|
|
534
534
|
...he,
|
|
535
535
|
onMouseDown: K,
|
|
536
|
-
className:
|
|
536
|
+
className: o,
|
|
537
537
|
contentClassName: s,
|
|
538
538
|
children: a
|
|
539
539
|
})
|
|
@@ -577,15 +577,15 @@ const N = Object.assign(Ve, {
|
|
|
577
577
|
TRANSITION_DURATION: 300,
|
|
578
578
|
BACKDROP_TRANSITION_DURATION: 150
|
|
579
579
|
}), Yt = () => {
|
|
580
|
-
const { confirmTexts: t } = be(Ce), { isShown: e, text:
|
|
581
|
-
|
|
582
|
-
}, [
|
|
583
|
-
|
|
584
|
-
}, [
|
|
580
|
+
const { confirmTexts: t } = be(Ce), { isShown: e, text: n, onFinish: o } = dt(), [s, a] = p(""), d = m(() => {
|
|
581
|
+
o(null);
|
|
582
|
+
}, [o]), l = m(() => {
|
|
583
|
+
o(s);
|
|
584
|
+
}, [o, s]);
|
|
585
585
|
return re(() => {
|
|
586
586
|
e === !0 && a("");
|
|
587
587
|
}, [e]), /* @__PURE__ */ r.jsxs(N, { show: e, size: "sm", centered: !0, onHide: d, children: [
|
|
588
|
-
/* @__PURE__ */ r.jsx(N.Header, { children: /* @__PURE__ */ r.jsx(N.Title, { children:
|
|
588
|
+
/* @__PURE__ */ r.jsx(N.Header, { children: /* @__PURE__ */ r.jsx(N.Title, { children: n }) }),
|
|
589
589
|
/* @__PURE__ */ r.jsx(N.Body, { children: /* @__PURE__ */ r.jsx(
|
|
590
590
|
"textarea",
|
|
591
591
|
{
|
|
@@ -603,65 +603,67 @@ const N = Object.assign(Ve, {
|
|
|
603
603
|
] })
|
|
604
604
|
] });
|
|
605
605
|
}, qt = ({ children: t }) => {
|
|
606
|
-
const [e,
|
|
606
|
+
const [e, n] = p(!1), [o, s] = p(""), a = E(() => {
|
|
607
607
|
}), d = m((g) => {
|
|
608
|
-
s(g),
|
|
608
|
+
s(g), n(!0), console.log("showprompt");
|
|
609
609
|
}, []), l = m(() => {
|
|
610
|
-
|
|
611
|
-
}, []), f = $(() => ({ isShown: e, text:
|
|
610
|
+
n(!1);
|
|
611
|
+
}, []), f = $(() => ({ isShown: e, text: o, showPrompt: d, hidePrompt: l, resolveRef: a }), [l, e, d, o, a]);
|
|
612
612
|
return /* @__PURE__ */ r.jsxs(tt.Provider, { value: f, children: [
|
|
613
613
|
t,
|
|
614
614
|
/* @__PURE__ */ r.jsx(Yt, {})
|
|
615
615
|
] });
|
|
616
616
|
}, Jt = ({ children: t }) => {
|
|
617
|
-
const [e,
|
|
618
|
-
|
|
617
|
+
const [e, n] = p(!1), [o, s] = p(""), a = m((f) => {
|
|
618
|
+
n(!0), s(f);
|
|
619
619
|
}, []), d = m(() => {
|
|
620
|
-
|
|
621
|
-
}, []), l = $(() => ({ show: e, text:
|
|
622
|
-
return /* @__PURE__ */ r.jsxs(
|
|
620
|
+
n(!1);
|
|
621
|
+
}, []), l = $(() => ({ show: e, text: o, showConfirm: a, hideConfirm: d }), [e, o, a, d]);
|
|
622
|
+
return /* @__PURE__ */ r.jsxs(nt.Provider, { value: l, children: [
|
|
623
623
|
/* @__PURE__ */ r.jsx(Qt, {}),
|
|
624
624
|
t
|
|
625
625
|
] });
|
|
626
|
-
},
|
|
627
|
-
const
|
|
626
|
+
}, rn = ({ axiosInstance: t, cookieDomain: e, LinkComponent: n, language: o, axiosTexts: s, confirmTexts: a, formValidationTexts: d, homeDashboardTexts: l, formSubmitTexts: f, children: g }) => {
|
|
627
|
+
const u = $(() => ({
|
|
628
628
|
axiosInstance: t,
|
|
629
|
-
|
|
629
|
+
cookieDomain: e,
|
|
630
|
+
LinkComponent: n,
|
|
630
631
|
language: o,
|
|
631
|
-
axiosTexts:
|
|
632
|
-
confirmTexts:
|
|
633
|
-
formValidationTexts:
|
|
634
|
-
homeDashboardTexts:
|
|
635
|
-
formSubmitTexts:
|
|
632
|
+
axiosTexts: s,
|
|
633
|
+
confirmTexts: a,
|
|
634
|
+
formValidationTexts: d,
|
|
635
|
+
homeDashboardTexts: l,
|
|
636
|
+
formSubmitTexts: f
|
|
636
637
|
}), [
|
|
637
638
|
t,
|
|
638
639
|
e,
|
|
639
|
-
o,
|
|
640
640
|
n,
|
|
641
|
+
o,
|
|
641
642
|
s,
|
|
642
643
|
a,
|
|
643
644
|
d,
|
|
644
|
-
l
|
|
645
|
-
]);
|
|
646
|
-
return /* @__PURE__ */ r.jsx(Ce.Provider, { value: g, children: /* @__PURE__ */ r.jsx(Jt, { children: /* @__PURE__ */ r.jsxs(qt, { children: [
|
|
647
|
-
/* @__PURE__ */ r.jsx(nt, {}),
|
|
645
|
+
l,
|
|
648
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, {}),
|
|
650
|
+
g
|
|
649
651
|
] }) }) });
|
|
650
|
-
},
|
|
651
|
-
const [e,
|
|
652
|
-
|
|
653
|
-
}, [
|
|
654
|
-
|
|
655
|
-
}, [
|
|
652
|
+
}, an = ({ children: t }) => {
|
|
653
|
+
const [e, n] = p(!1), [o] = p(/* @__PURE__ */ new Set()), s = m((l) => {
|
|
654
|
+
o.add(l), n(!0);
|
|
655
|
+
}, [o]), a = m((l) => {
|
|
656
|
+
o.delete(l), o.size === 0 && n(!1);
|
|
657
|
+
}, [o]), d = $(() => ({ isLoading: e, startLoading: s, stopLoading: a }), [e, s, a]);
|
|
656
658
|
return /* @__PURE__ */ r.jsxs(st.Provider, { value: d, children: [
|
|
657
659
|
e && /* @__PURE__ */ r.jsx(Et, {}),
|
|
658
660
|
t
|
|
659
661
|
] });
|
|
660
|
-
},
|
|
661
|
-
const e = rt(),
|
|
662
|
+
}, ln = ({ children: t }) => {
|
|
663
|
+
const e = rt(), n = m(() => {
|
|
662
664
|
const u = localStorage.getItem("user") ?? null;
|
|
663
665
|
return u ? JSON.parse(u) : null;
|
|
664
|
-
}, []), [
|
|
666
|
+
}, []), [o, s] = p(n()), a = m(async () => {
|
|
665
667
|
let u = null;
|
|
666
668
|
return await e.get("/user/detail").then((M) => {
|
|
667
669
|
u = M.data;
|
|
@@ -675,25 +677,25 @@ const N = Object.assign(Ve, {
|
|
|
675
677
|
return u ? (s(u), !0) : !1;
|
|
676
678
|
}, [a]), f = m(() => {
|
|
677
679
|
d(), s(null);
|
|
678
|
-
}, [d]), g = $(() => ({ user:
|
|
680
|
+
}, [d]), g = $(() => ({ user: o, loginUser: l, logoutUser: f }), [o, l, f]);
|
|
679
681
|
return re(() => {
|
|
680
|
-
s(
|
|
681
|
-
}, [
|
|
682
|
+
s(n());
|
|
683
|
+
}, [n]), /* @__PURE__ */ r.jsx(at.Provider, { value: g, children: t });
|
|
682
684
|
}, Qt = () => {
|
|
683
|
-
const { confirmTexts: t } = be(Ce), { onConfirm: e, onCancel:
|
|
684
|
-
return /* @__PURE__ */ r.jsx(N, { show: s, size: "sm", centered: !0, onHide:
|
|
685
|
-
/* @__PURE__ */ r.jsx("div", { className: "mb-5 text-center", children: /* @__PURE__ */ r.jsx(wt, { variant: "h6", children:
|
|
685
|
+
const { confirmTexts: t } = be(Ce), { onConfirm: e, onCancel: n, text: o, show: s } = ct();
|
|
686
|
+
return /* @__PURE__ */ r.jsx(N, { show: s, size: "sm", centered: !0, onHide: n, children: /* @__PURE__ */ r.jsxs(N.Body, { children: [
|
|
687
|
+
/* @__PURE__ */ r.jsx("div", { className: "mb-5 text-center", children: /* @__PURE__ */ r.jsx(wt, { variant: "h6", children: o }) }),
|
|
686
688
|
/* @__PURE__ */ r.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|
|
687
|
-
/* @__PURE__ */ r.jsx("button", { type: "button", className: "btn btn-secondary w-100", onClick:
|
|
689
|
+
/* @__PURE__ */ r.jsx("button", { type: "button", className: "btn btn-secondary w-100", onClick: n, children: t.no }),
|
|
688
690
|
/* @__PURE__ */ r.jsx("button", { type: "button", className: "btn btn-primary w-100 ml", onClick: e, children: t.yes })
|
|
689
691
|
] })
|
|
690
692
|
] }) });
|
|
691
693
|
};
|
|
692
694
|
export {
|
|
693
695
|
st as LoadingContext,
|
|
694
|
-
|
|
696
|
+
an as LoadingProvider,
|
|
695
697
|
Ce as LuminusComponentsContext,
|
|
696
|
-
|
|
698
|
+
rn as LuminusComponentsProvider,
|
|
697
699
|
at as UserContext,
|
|
698
|
-
|
|
700
|
+
ln as UserProvider
|
|
699
701
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as L, d as B, g as at } from "./useAxios-
|
|
1
|
+
import { j as L, d as B, g as at } from "./useAxios-hDu0KL-3.js";
|
|
2
2
|
import * as fe from "react";
|
|
3
3
|
import Z, { useContext as oe, useMemo as st, useRef as Y, useCallback as k, useEffect as Q, useState as Me, useLayoutEffect as ut, createContext as ct, cloneElement as Ie } from "react";
|
|
4
4
|
import ne from "react-dom";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const j=require("./useAxios-
|
|
1
|
+
"use strict";const j=require("./useAxios-CMffjGyX.cjs"),p=require("react"),Z=require("react-dom");function ct(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const se=ct(p),ft="_h1_1p97i_1",lt="_h3_1p97i_8",dt="_h6_1p97i_15",pt="_subtitle_1p97i_22",vt="_body_1p97i_29",yt="_body2_1p97i_36",Et="_caption_1p97i_43",mt="_form-label_1p97i_50",z={h1:ft,h3:lt,h6:dt,subtitle:pt,body:vt,body2:yt,caption:Et,"form-label":"_form-label_1p97i_50",formLabel:mt},ht=({variant:e,className:t,children:r})=>{switch(e){case"h1":return j.jsxRuntimeExports.jsx("h1",{className:j.classNames("luminus-text-primary luminus-h1",z.h1,t),children:r});case"h3":return j.jsxRuntimeExports.jsx("h3",{className:j.classNames("luminus-text luminus-h3",z.h3,t),children:r});case"h6":return j.jsxRuntimeExports.jsx("h6",{className:j.classNames("luminus-text luminus-h6",z.h6,t),children:r});case"subtitle":return j.jsxRuntimeExports.jsx("div",{className:j.classNames("luminus-text luminus-subtitle",z.subtitle,t),children:r});case"body":return j.jsxRuntimeExports.jsx("div",{className:j.classNames("luminus-text luminus-body",z.body,t),children:r});case"body2":return j.jsxRuntimeExports.jsx("div",{className:j.classNames("luminus-text luminus-body2",z.body2,t),children:r});case"caption":return j.jsxRuntimeExports.jsx("div",{className:j.classNames("luminus-text-muted luminus-caption",z.caption,t),children:r});case"form-label":return j.jsxRuntimeExports.jsx("div",{className:j.classNames("luminus-text luminus-form-label",z.formLabel,t),children:r});default:return j.jsxRuntimeExports.jsx(j.jsxRuntimeExports.Fragment,{children:r})}},bt=({variant:e,className:t,children:r})=>j.jsxRuntimeExports.jsx(ht,{variant:e,className:t,children:r});function Xe(e,t){if(e==null)return{};var r={},o=Object.keys(e),i,n;for(n=0;n<o.length;n++)i=o[n],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function _e(e,t){return _e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},_e(e,t)}function xt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_e(e,t)}const Tt=["xxl","xl","lg","md","sm","xs"],gt="xs",ue=se.createContext({prefixes:{},breakpoints:Tt,minBreakpoint:gt});function Rt(e,t){const{prefixes:r}=p.useContext(ue);return e||r[t]||t}function Ot(){const{breakpoints:e}=p.useContext(ue);return e}function _t(){const{minBreakpoint:e}=p.useContext(ue);return e}function St(){const{dir:e}=p.useContext(ue);return e==="rtl"}function je(e){return e&&e.ownerDocument||document}function Ct(e){var t=je(e);return t&&t.defaultView||window}function Pt(e,t){return Ct(e).getComputedStyle(e,t)}var wt=/([A-Z])/g;function jt(e){return e.replace(wt,"-$1").toLowerCase()}var Dt=/^ms-/;function oe(e){return jt(e).replace(Dt,"-ms-")}var Mt=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function kt(e){return!!(e&&Mt.test(e))}function De(e,t){var r="",o="";if(typeof t=="string")return e.style.getPropertyValue(oe(t))||Pt(e).getPropertyValue(oe(t));Object.keys(t).forEach(function(i){var n=t[i];!n&&n!==0?e.style.removeProperty(oe(i)):kt(i)?o+=i+"("+n+") ":r+=oe(i)+": "+n+";"}),o&&(r+="transform: "+o+";"),e.style.cssText+=";"+r}var Se={exports:{}},ie={exports:{}},C={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CancelTokenStatic } from 'axios';
|
|
2
2
|
export declare const cancelToken: CancelTokenStatic;
|
|
3
|
-
export declare const useAxios: (authenticated?: boolean) => import("axios").AxiosInstance;
|
|
3
|
+
export declare const useAxios: (authenticated?: boolean, differentBaseUrl?: string | undefined) => import("axios").AxiosInstance;
|