react-luminus-components 1.2.32 → 1.2.34
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 +50 -35
- package/dist/{EventType-D1zXMD8A.js → EventType-ZylDtXuB.js} +1 -1
- package/dist/SimpleTooltip-Bp0AmtP_.js +5 -0
- package/dist/{Typography-B12JkmMC.js → Typography-DbHYaPxW.js} +4 -4
- package/dist/{UserAvatarToggle-BWDRIIXE.js → UserAvatarToggle-Dq9Xmfcp.js} +87 -87
- package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +1 -1
- package/dist/contexts.es.js +96 -96
- package/dist/dateUtils-CWKBTsx7.cjs +1 -0
- package/dist/dateUtils-Crak7ii9.js +131 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +7 -7
- package/dist/layout.es.js +12 -12
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +822 -822
- package/dist/models/prop-types/InputProps/SelectInputProps.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/{textUtils-BLtD0zaS.js → textUtils-BbxuIsKq.js} +2 -2
- package/dist/{useConfirm-CKDkB8lL.js → useConfirm-akv7w_iA.js} +10 -10
- package/dist/{useKeyPress-DuxmarzT.js → useKeyPress-CwWcvmEW.js} +2 -2
- package/dist/{usePermissions-Cg_BMKPX.js → usePermissions-CQVgatvt.js} +1 -1
- package/dist/utils/hookForm/hookFormUtils.d.ts +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +13 -136
- package/package.json +1 -1
- package/dist/SimpleTooltip-cMiObSvf.js +0 -5
package/dist/contexts.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { j as a,
|
|
1
|
+
import { j as a, b as N, P as xe, ac as Se, ad as He, s as X, q as $e, ae as lt, af as ct, u as M, ag as Ie, ah as Le, ai as Ke, aj as dt, ak as _e, al as ut, i as $, m as ft, v as ht, z as mt, am as Pe, an as ze, r as gt, ao as pt, L as ue, ap as Ge, aq as Et, ar as vt, as as yt, H as le, I as E, at as Ct, au as Tt, av as Be, a1 as Rt, a4 as Ve, a6 as xt, aw as Nt } from "./UserAvatarToggle-Dq9Xmfcp.js";
|
|
2
2
|
import * as R from "react";
|
|
3
3
|
import bt, { forwardRef as wt, useState as C, useRef as O, useImperativeHandle as St, useEffect as b, useCallback as y, useContext as H, useMemo as w, useReducer as kt } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { T as At } from "./Typography-
|
|
6
|
-
import { d as
|
|
4
|
+
import { u as Mt, a as Ot } from "./useConfirm-akv7w_iA.js";
|
|
5
|
+
import { T as At } from "./Typography-DbHYaPxW.js";
|
|
6
|
+
import { d as jt, u as It, q as D, L as Lt, E as v } from "./EventType-ZylDtXuB.js";
|
|
7
7
|
import _t from "react-dom";
|
|
8
|
-
const
|
|
8
|
+
const Pt = (e) => /* @__PURE__ */ R.forwardRef((t, n) => /* @__PURE__ */ a.jsx("div", {
|
|
9
9
|
...t,
|
|
10
10
|
ref: n,
|
|
11
11
|
className: N(t.className, e)
|
|
12
|
-
})),
|
|
12
|
+
})), Bt = {
|
|
13
13
|
/** An accessible label indicating the relevant information about the Close Button. */
|
|
14
14
|
"aria-label": xe.string,
|
|
15
15
|
/** A callback fired after the Close Button is clicked. */
|
|
@@ -33,7 +33,7 @@ const Bt = (e) => /* @__PURE__ */ R.forwardRef((t, n) => /* @__PURE__ */ a.jsx("
|
|
|
33
33
|
...o
|
|
34
34
|
}));
|
|
35
35
|
ke.displayName = "CloseButton";
|
|
36
|
-
ke.propTypes =
|
|
36
|
+
ke.propTypes = Bt;
|
|
37
37
|
var ce;
|
|
38
38
|
function Ue(e) {
|
|
39
39
|
if ((!ce && ce !== 0 || e) && Se) {
|
|
@@ -55,7 +55,7 @@ function Ut(e = document) {
|
|
|
55
55
|
const t = e.defaultView;
|
|
56
56
|
return Math.abs(t.innerWidth - e.documentElement.clientWidth);
|
|
57
57
|
}
|
|
58
|
-
const Fe =
|
|
58
|
+
const Fe = jt("modal-open");
|
|
59
59
|
class Me {
|
|
60
60
|
constructor({
|
|
61
61
|
ownerDocument: t,
|
|
@@ -81,7 +81,7 @@ class Me {
|
|
|
81
81
|
t.style = {
|
|
82
82
|
overflow: s.style.overflow,
|
|
83
83
|
[o]: s.style[o]
|
|
84
|
-
}, t.scrollBarWidth && (n[o] = `${parseInt(
|
|
84
|
+
}, t.scrollBarWidth && (n[o] = `${parseInt(X(s, o) || "0", 10) + t.scrollBarWidth}px`), s.setAttribute(Fe, ""), X(s, n);
|
|
85
85
|
}
|
|
86
86
|
reset() {
|
|
87
87
|
[...this.modals].forEach((t) => this.remove(t));
|
|
@@ -121,7 +121,7 @@ function Wt(e) {
|
|
|
121
121
|
})), be;
|
|
122
122
|
}
|
|
123
123
|
function Ht(e) {
|
|
124
|
-
const t =
|
|
124
|
+
const t = $e(), n = e || Wt(t), o = O({
|
|
125
125
|
dialog: null,
|
|
126
126
|
backdrop: null
|
|
127
127
|
});
|
|
@@ -152,41 +152,41 @@ const qe = /* @__PURE__ */ wt((e, t) => {
|
|
|
152
152
|
runTransition: m,
|
|
153
153
|
backdropTransition: T,
|
|
154
154
|
runBackdropTransition: fe,
|
|
155
|
-
autoFocus:
|
|
155
|
+
autoFocus: Y = !0,
|
|
156
156
|
enforceFocus: he = !0,
|
|
157
|
-
restoreFocus:
|
|
157
|
+
restoreFocus: I = !0,
|
|
158
158
|
restoreFocusOptions: me,
|
|
159
|
-
renderDialog:
|
|
159
|
+
renderDialog: J,
|
|
160
160
|
renderBackdrop: ge = (u) => /* @__PURE__ */ a.jsx("div", Object.assign({}, u)),
|
|
161
161
|
manager: pe,
|
|
162
162
|
container: Ee,
|
|
163
163
|
onShow: Z,
|
|
164
|
-
onHide:
|
|
164
|
+
onHide: K = () => {
|
|
165
165
|
},
|
|
166
166
|
onExit: ve,
|
|
167
|
-
onExited:
|
|
167
|
+
onExited: z,
|
|
168
168
|
onExiting: ee,
|
|
169
169
|
onEnter: te,
|
|
170
170
|
onEntering: ne,
|
|
171
171
|
onEntered: oe
|
|
172
172
|
} = e, ye = Dt(e, Ft);
|
|
173
|
-
const S =
|
|
173
|
+
const S = $e(), L = lt(Ee), p = Ht(pe), Ce = ct(), se = It(n), [A, _] = C(!n), x = O(null);
|
|
174
174
|
St(t, () => p, [p]), Se && !se && n && (x.current = Ne(S == null ? void 0 : S.document)), n && A && _(!1);
|
|
175
175
|
const k = M(() => {
|
|
176
|
-
if (p.add(),
|
|
176
|
+
if (p.add(), P.current = Ie(document, "keydown", Re), V.current = Ie(
|
|
177
177
|
document,
|
|
178
178
|
"focus",
|
|
179
179
|
// the timeout is necessary b/c this will run before the new modal is mounted
|
|
180
180
|
// and so steals focus from it
|
|
181
181
|
() => setTimeout(Te),
|
|
182
182
|
!0
|
|
183
|
-
), Z && Z(),
|
|
183
|
+
), Z && Z(), Y) {
|
|
184
184
|
var u, ie;
|
|
185
185
|
const Q = Ne((u = (ie = p.dialog) == null ? void 0 : ie.ownerDocument) != null ? u : S == null ? void 0 : S.document);
|
|
186
186
|
p.dialog && Q && !Le(p.dialog, Q) && (x.current = Q, p.dialog.focus());
|
|
187
187
|
}
|
|
188
|
-
}),
|
|
189
|
-
if (p.remove(),
|
|
188
|
+
}), G = M(() => {
|
|
189
|
+
if (p.remove(), P.current == null || P.current(), V.current == null || V.current(), I) {
|
|
190
190
|
var u;
|
|
191
191
|
(u = x.current) == null || u.focus == null || u.focus(me), x.current = null;
|
|
192
192
|
}
|
|
@@ -199,9 +199,9 @@ const qe = /* @__PURE__ */ wt((e, t) => {
|
|
|
199
199
|
/* should never change: */
|
|
200
200
|
k
|
|
201
201
|
]), b(() => {
|
|
202
|
-
A &&
|
|
203
|
-
}, [A,
|
|
204
|
-
|
|
202
|
+
A && G();
|
|
203
|
+
}, [A, G]), Ke(() => {
|
|
204
|
+
G();
|
|
205
205
|
});
|
|
206
206
|
const Te = M(() => {
|
|
207
207
|
if (!he || !Ce() || !p.isTopModal())
|
|
@@ -209,15 +209,15 @@ const qe = /* @__PURE__ */ wt((e, t) => {
|
|
|
209
209
|
const u = Ne(S == null ? void 0 : S.document);
|
|
210
210
|
p.dialog && u && !Le(p.dialog, u) && p.dialog.focus();
|
|
211
211
|
}), re = M((u) => {
|
|
212
|
-
u.target === u.currentTarget && (h == null || h(u), i === !0 &&
|
|
212
|
+
u.target === u.currentTarget && (h == null || h(u), i === !0 && K());
|
|
213
213
|
}), Re = M((u) => {
|
|
214
|
-
d && dt(u) && p.isTopModal() && (g == null || g(u), u.defaultPrevented ||
|
|
215
|
-
}), V = O(),
|
|
216
|
-
_(!0),
|
|
214
|
+
d && dt(u) && p.isTopModal() && (g == null || g(u), u.defaultPrevented || K());
|
|
215
|
+
}), V = O(), P = O(), ae = (...u) => {
|
|
216
|
+
_(!0), z == null || z(...u);
|
|
217
217
|
};
|
|
218
218
|
if (!L)
|
|
219
219
|
return null;
|
|
220
|
-
const
|
|
220
|
+
const B = Object.assign({
|
|
221
221
|
role: o,
|
|
222
222
|
ref: p.setDialogRef,
|
|
223
223
|
// apparently only works on the dialog role element
|
|
@@ -227,7 +227,7 @@ const qe = /* @__PURE__ */ wt((e, t) => {
|
|
|
227
227
|
className: s,
|
|
228
228
|
tabIndex: -1
|
|
229
229
|
});
|
|
230
|
-
let q =
|
|
230
|
+
let q = J ? J(B) : /* @__PURE__ */ a.jsx("div", Object.assign({}, B, {
|
|
231
231
|
children: /* @__PURE__ */ R.cloneElement(l, {
|
|
232
232
|
role: "document"
|
|
233
233
|
})
|
|
@@ -262,16 +262,16 @@ const qe = /* @__PURE__ */ wt((e, t) => {
|
|
|
262
262
|
});
|
|
263
263
|
});
|
|
264
264
|
qe.displayName = "Modal";
|
|
265
|
-
const
|
|
265
|
+
const $t = Object.assign(qe, {
|
|
266
266
|
Manager: Me
|
|
267
267
|
});
|
|
268
|
-
function
|
|
268
|
+
function Kt(e, t) {
|
|
269
269
|
e.classList ? e.classList.add(t) : ut(e, t) || (typeof e.className == "string" ? e.className = e.className + " " + t : e.setAttribute("class", (e.className && e.className.baseVal || "") + " " + t));
|
|
270
270
|
}
|
|
271
271
|
function De(e, t) {
|
|
272
272
|
return e.replace(new RegExp("(^|\\s)" + t + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function zt(e, t) {
|
|
275
275
|
e.classList ? e.classList.remove(t) : typeof e.className == "string" ? e.className = De(e.className, t) : e.setAttribute("class", De(e.className && e.className.baseVal || "", t));
|
|
276
276
|
}
|
|
277
277
|
const W = {
|
|
@@ -279,23 +279,23 @@ const W = {
|
|
|
279
279
|
STICKY_CONTENT: ".sticky-top",
|
|
280
280
|
NAVBAR_TOGGLER: ".navbar-toggler"
|
|
281
281
|
};
|
|
282
|
-
class
|
|
282
|
+
class Gt extends Me {
|
|
283
283
|
adjustAndStore(t, n, o) {
|
|
284
284
|
const s = n.style[t];
|
|
285
|
-
n.dataset[t] = s,
|
|
286
|
-
[t]: `${parseFloat(
|
|
285
|
+
n.dataset[t] = s, X(n, {
|
|
286
|
+
[t]: `${parseFloat(X(n, t)) + o}px`
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
289
|
restore(t, n) {
|
|
290
290
|
const o = n.dataset[t];
|
|
291
|
-
o !== void 0 && (delete n.dataset[t],
|
|
291
|
+
o !== void 0 && (delete n.dataset[t], X(n, {
|
|
292
292
|
[t]: o
|
|
293
293
|
}));
|
|
294
294
|
}
|
|
295
295
|
setContainerStyle(t) {
|
|
296
296
|
super.setContainerStyle(t);
|
|
297
297
|
const n = this.getElement();
|
|
298
|
-
if (
|
|
298
|
+
if (Kt(n, "modal-open"), !t.scrollBarWidth)
|
|
299
299
|
return;
|
|
300
300
|
const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
|
|
301
301
|
D(n, W.FIXED_CONTENT).forEach((r) => this.adjustAndStore(o, r, t.scrollBarWidth)), D(n, W.STICKY_CONTENT).forEach((r) => this.adjustAndStore(s, r, -t.scrollBarWidth)), D(n, W.NAVBAR_TOGGLER).forEach((r) => this.adjustAndStore(s, r, t.scrollBarWidth));
|
|
@@ -303,27 +303,27 @@ class zt extends Me {
|
|
|
303
303
|
removeContainerStyle(t) {
|
|
304
304
|
super.removeContainerStyle(t);
|
|
305
305
|
const n = this.getElement();
|
|
306
|
-
|
|
306
|
+
zt(n, "modal-open");
|
|
307
307
|
const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
|
|
308
308
|
D(n, W.FIXED_CONTENT).forEach((r) => this.restore(o, r)), D(n, W.STICKY_CONTENT).forEach((r) => this.restore(s, r)), D(n, W.NAVBAR_TOGGLER).forEach((r) => this.restore(s, r));
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
let we;
|
|
312
312
|
function Vt(e) {
|
|
313
|
-
return we || (we = new
|
|
313
|
+
return we || (we = new Gt(e)), we;
|
|
314
314
|
}
|
|
315
315
|
const Qe = /* @__PURE__ */ R.forwardRef(({
|
|
316
316
|
className: e,
|
|
317
317
|
bsPrefix: t,
|
|
318
318
|
as: n = "div",
|
|
319
319
|
...o
|
|
320
|
-
}, s) => (t =
|
|
320
|
+
}, s) => (t = $(t, "modal-body"), /* @__PURE__ */ a.jsx(n, {
|
|
321
321
|
ref: s,
|
|
322
322
|
className: N(e, t),
|
|
323
323
|
...o
|
|
324
324
|
})));
|
|
325
325
|
Qe.displayName = "ModalBody";
|
|
326
|
-
const
|
|
326
|
+
const Xe = /* @__PURE__ */ R.createContext({
|
|
327
327
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
328
328
|
onHide() {
|
|
329
329
|
}
|
|
@@ -338,7 +338,7 @@ const Je = /* @__PURE__ */ R.createContext({
|
|
|
338
338
|
scrollable: i,
|
|
339
339
|
...d
|
|
340
340
|
}, h) => {
|
|
341
|
-
e =
|
|
341
|
+
e = $(e, "modal");
|
|
342
342
|
const g = `${e}-dialog`, f = typeof r == "string" ? `${e}-fullscreen-${r}` : `${e}-fullscreen`;
|
|
343
343
|
return /* @__PURE__ */ a.jsx("div", {
|
|
344
344
|
...d,
|
|
@@ -351,17 +351,17 @@ const Je = /* @__PURE__ */ R.createContext({
|
|
|
351
351
|
});
|
|
352
352
|
});
|
|
353
353
|
Oe.displayName = "ModalDialog";
|
|
354
|
-
const
|
|
354
|
+
const Ye = /* @__PURE__ */ R.forwardRef(({
|
|
355
355
|
className: e,
|
|
356
356
|
bsPrefix: t,
|
|
357
357
|
as: n = "div",
|
|
358
358
|
...o
|
|
359
|
-
}, s) => (t =
|
|
359
|
+
}, s) => (t = $(t, "modal-footer"), /* @__PURE__ */ a.jsx(n, {
|
|
360
360
|
ref: s,
|
|
361
361
|
className: N(e, t),
|
|
362
362
|
...o
|
|
363
363
|
})));
|
|
364
|
-
|
|
364
|
+
Ye.displayName = "ModalFooter";
|
|
365
365
|
const qt = /* @__PURE__ */ R.forwardRef(({
|
|
366
366
|
closeLabel: e = "Close",
|
|
367
367
|
closeVariant: t,
|
|
@@ -370,7 +370,7 @@ const qt = /* @__PURE__ */ R.forwardRef(({
|
|
|
370
370
|
children: s,
|
|
371
371
|
...r
|
|
372
372
|
}, l) => {
|
|
373
|
-
const i = H(
|
|
373
|
+
const i = H(Xe), d = M(() => {
|
|
374
374
|
i == null || i.onHide(), o == null || o();
|
|
375
375
|
});
|
|
376
376
|
return /* @__PURE__ */ a.jsxs("div", {
|
|
@@ -382,39 +382,39 @@ const qt = /* @__PURE__ */ R.forwardRef(({
|
|
|
382
382
|
onClick: d
|
|
383
383
|
})]
|
|
384
384
|
});
|
|
385
|
-
}),
|
|
385
|
+
}), Je = /* @__PURE__ */ R.forwardRef(({
|
|
386
386
|
bsPrefix: e,
|
|
387
387
|
className: t,
|
|
388
388
|
closeLabel: n = "Close",
|
|
389
389
|
closeButton: o = !1,
|
|
390
390
|
...s
|
|
391
|
-
}, r) => (e =
|
|
391
|
+
}, r) => (e = $(e, "modal-header"), /* @__PURE__ */ a.jsx(qt, {
|
|
392
392
|
ref: r,
|
|
393
393
|
...s,
|
|
394
394
|
className: N(t, e),
|
|
395
395
|
closeLabel: n,
|
|
396
396
|
closeButton: o
|
|
397
397
|
})));
|
|
398
|
-
|
|
399
|
-
const Qt =
|
|
398
|
+
Je.displayName = "ModalHeader";
|
|
399
|
+
const Qt = Pt("h4"), Ze = /* @__PURE__ */ R.forwardRef(({
|
|
400
400
|
className: e,
|
|
401
401
|
bsPrefix: t,
|
|
402
402
|
as: n = Qt,
|
|
403
403
|
...o
|
|
404
|
-
}, s) => (t =
|
|
404
|
+
}, s) => (t = $(t, "modal-title"), /* @__PURE__ */ a.jsx(n, {
|
|
405
405
|
ref: s,
|
|
406
406
|
className: N(e, t),
|
|
407
407
|
...o
|
|
408
408
|
})));
|
|
409
409
|
Ze.displayName = "ModalTitle";
|
|
410
|
-
function
|
|
411
|
-
return /* @__PURE__ */ a.jsx(
|
|
410
|
+
function Xt(e) {
|
|
411
|
+
return /* @__PURE__ */ a.jsx(ze, {
|
|
412
412
|
...e,
|
|
413
413
|
timeout: null
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
|
-
function
|
|
417
|
-
return /* @__PURE__ */ a.jsx(
|
|
416
|
+
function Yt(e) {
|
|
417
|
+
return /* @__PURE__ */ a.jsx(ze, {
|
|
418
418
|
...e,
|
|
419
419
|
timeout: null
|
|
420
420
|
});
|
|
@@ -436,30 +436,30 @@ const et = /* @__PURE__ */ R.forwardRef(({
|
|
|
436
436
|
animation: m = !0,
|
|
437
437
|
backdrop: T = !0,
|
|
438
438
|
keyboard: fe = !0,
|
|
439
|
-
onEscapeKeyDown:
|
|
439
|
+
onEscapeKeyDown: Y,
|
|
440
440
|
onShow: he,
|
|
441
|
-
onHide:
|
|
441
|
+
onHide: I,
|
|
442
442
|
container: me,
|
|
443
|
-
autoFocus:
|
|
443
|
+
autoFocus: J = !0,
|
|
444
444
|
enforceFocus: ge = !0,
|
|
445
445
|
restoreFocus: pe = !0,
|
|
446
446
|
restoreFocusOptions: Ee,
|
|
447
447
|
onEntered: Z,
|
|
448
|
-
onExit:
|
|
448
|
+
onExit: K,
|
|
449
449
|
onExiting: ve,
|
|
450
|
-
onEnter:
|
|
450
|
+
onEnter: z,
|
|
451
451
|
onEntering: ee,
|
|
452
452
|
onExited: te,
|
|
453
453
|
backdropClassName: ne,
|
|
454
454
|
manager: oe,
|
|
455
455
|
...ye
|
|
456
456
|
}, S) => {
|
|
457
|
-
const [L, p] = C({}), [Ce, se] = C(!1), A = O(!1), _ = O(!1), x = O(null), [k,
|
|
458
|
-
e =
|
|
457
|
+
const [L, p] = C({}), [Ce, se] = C(!1), A = O(!1), _ = O(!1), x = O(null), [k, G] = ft(), Te = ht(S, G), re = M(I), Re = mt();
|
|
458
|
+
e = $(e, "modal");
|
|
459
459
|
const V = w(() => ({
|
|
460
460
|
onHide: re
|
|
461
461
|
}), [re]);
|
|
462
|
-
function
|
|
462
|
+
function P() {
|
|
463
463
|
return oe || Vt({
|
|
464
464
|
isRTL: Re
|
|
465
465
|
});
|
|
@@ -467,17 +467,17 @@ const et = /* @__PURE__ */ R.forwardRef(({
|
|
|
467
467
|
function ae(c) {
|
|
468
468
|
if (!Se)
|
|
469
469
|
return;
|
|
470
|
-
const F =
|
|
470
|
+
const F = P().getScrollbarWidth() > 0, je = c.scrollHeight > He(c).documentElement.clientHeight;
|
|
471
471
|
p({
|
|
472
|
-
paddingRight: F && !
|
|
473
|
-
paddingLeft: !F &&
|
|
472
|
+
paddingRight: F && !je ? Ue() : void 0,
|
|
473
|
+
paddingLeft: !F && je ? Ue() : void 0
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
|
-
const
|
|
476
|
+
const B = M(() => {
|
|
477
477
|
k && ae(k.dialog);
|
|
478
478
|
});
|
|
479
|
-
|
|
480
|
-
|
|
479
|
+
Ke(() => {
|
|
480
|
+
Pe(window, "resize", B), x.current == null || x.current();
|
|
481
481
|
});
|
|
482
482
|
const q = () => {
|
|
483
483
|
A.current = !0;
|
|
@@ -498,17 +498,17 @@ const et = /* @__PURE__ */ R.forwardRef(({
|
|
|
498
498
|
_.current = !1;
|
|
499
499
|
return;
|
|
500
500
|
}
|
|
501
|
-
|
|
501
|
+
I == null || I();
|
|
502
502
|
}, tt = (c) => {
|
|
503
|
-
fe ?
|
|
503
|
+
fe ? Y == null || Y(c) : (c.preventDefault(), T === "static" && u());
|
|
504
504
|
}, nt = (c, F) => {
|
|
505
|
-
c && ae(c),
|
|
505
|
+
c && ae(c), z == null || z(c, F);
|
|
506
506
|
}, ot = (c) => {
|
|
507
|
-
x.current == null || x.current(),
|
|
507
|
+
x.current == null || x.current(), K == null || K(c);
|
|
508
508
|
}, st = (c, F) => {
|
|
509
|
-
ee == null || ee(c, F), gt(window, "resize",
|
|
509
|
+
ee == null || ee(c, F), gt(window, "resize", B);
|
|
510
510
|
}, rt = (c) => {
|
|
511
|
-
c && (c.style.display = ""), te == null || te(c),
|
|
511
|
+
c && (c.style.display = ""), te == null || te(c), Pe(window, "resize", B);
|
|
512
512
|
}, at = y((c) => /* @__PURE__ */ a.jsx("div", {
|
|
513
513
|
...c,
|
|
514
514
|
className: N(`${e}-backdrop`, ne, !m && "show")
|
|
@@ -536,46 +536,46 @@ const et = /* @__PURE__ */ R.forwardRef(({
|
|
|
536
536
|
children: r
|
|
537
537
|
})
|
|
538
538
|
});
|
|
539
|
-
return /* @__PURE__ */ a.jsx(
|
|
539
|
+
return /* @__PURE__ */ a.jsx(Xe.Provider, {
|
|
540
540
|
value: V,
|
|
541
|
-
children: /* @__PURE__ */ a.jsx(
|
|
541
|
+
children: /* @__PURE__ */ a.jsx($t, {
|
|
542
542
|
show: f,
|
|
543
543
|
ref: Te,
|
|
544
544
|
backdrop: T,
|
|
545
545
|
container: me,
|
|
546
546
|
keyboard: !0,
|
|
547
|
-
autoFocus:
|
|
547
|
+
autoFocus: J,
|
|
548
548
|
enforceFocus: ge,
|
|
549
549
|
restoreFocus: pe,
|
|
550
550
|
restoreFocusOptions: Ee,
|
|
551
551
|
onEscapeKeyDown: tt,
|
|
552
552
|
onShow: he,
|
|
553
|
-
onHide:
|
|
553
|
+
onHide: I,
|
|
554
554
|
onEnter: nt,
|
|
555
555
|
onEntering: st,
|
|
556
556
|
onEntered: Z,
|
|
557
557
|
onExit: ot,
|
|
558
558
|
onExiting: ve,
|
|
559
559
|
onExited: rt,
|
|
560
|
-
manager:
|
|
561
|
-
transition: m ?
|
|
562
|
-
backdropTransition: m ?
|
|
560
|
+
manager: P(),
|
|
561
|
+
transition: m ? Xt : void 0,
|
|
562
|
+
backdropTransition: m ? Yt : void 0,
|
|
563
563
|
renderBackdrop: at,
|
|
564
564
|
renderDialog: it
|
|
565
565
|
})
|
|
566
566
|
});
|
|
567
567
|
});
|
|
568
568
|
et.displayName = "Modal";
|
|
569
|
-
const
|
|
569
|
+
const j = Object.assign(et, {
|
|
570
570
|
Body: Qe,
|
|
571
|
-
Header:
|
|
571
|
+
Header: Je,
|
|
572
572
|
Title: Ze,
|
|
573
|
-
Footer:
|
|
573
|
+
Footer: Ye,
|
|
574
574
|
Dialog: Oe,
|
|
575
575
|
TRANSITION_DURATION: 300,
|
|
576
576
|
BACKDROP_TRANSITION_DURATION: 150
|
|
577
|
-
}),
|
|
578
|
-
const { confirmTexts: e } = H(ue), { isShown: t, text: n, onFinish: o } = Mt(), { options: s } = H(
|
|
577
|
+
}), Jt = () => {
|
|
578
|
+
const { confirmTexts: e } = H(ue), { isShown: t, text: n, onFinish: o } = Mt(), { options: s } = H(Ge), [r, l] = C(s.defaultValue ?? ""), i = y(() => {
|
|
579
579
|
o(null);
|
|
580
580
|
}, [o]), d = y(() => {
|
|
581
581
|
o(r);
|
|
@@ -590,13 +590,13 @@ const I = Object.assign(et, {
|
|
|
590
590
|
autoFocus: !0,
|
|
591
591
|
tabIndex: 0
|
|
592
592
|
}), [r]);
|
|
593
|
-
return /* @__PURE__ */ a.jsxs(
|
|
594
|
-
/* @__PURE__ */ a.jsx(
|
|
595
|
-
/* @__PURE__ */ a.jsxs(
|
|
593
|
+
return /* @__PURE__ */ a.jsxs(j, { show: t, size: "sm", centered: !0, onHide: i, children: [
|
|
594
|
+
/* @__PURE__ */ a.jsx(j.Header, { children: /* @__PURE__ */ a.jsx(j.Title, { children: n }) }),
|
|
595
|
+
/* @__PURE__ */ a.jsxs(j.Body, { children: [
|
|
596
596
|
s.input === "textarea" ? /* @__PURE__ */ a.jsx("textarea", { ...h, rows: 5 }) : void 0,
|
|
597
597
|
s.input === "input" ? /* @__PURE__ */ a.jsx("input", { ...h, type: s.type }) : void 0
|
|
598
598
|
] }),
|
|
599
|
-
/* @__PURE__ */ a.jsxs(
|
|
599
|
+
/* @__PURE__ */ a.jsxs(j.Footer, { children: [
|
|
600
600
|
/* @__PURE__ */ a.jsx("button", { type: "button", className: "btn btn-secondary", onClick: i, children: e.cancel }),
|
|
601
601
|
/* @__PURE__ */ a.jsx("button", { type: "button", className: "btn btn-primary ml", onClick: d, disabled: s.required && !r, children: e.confirm })
|
|
602
602
|
] })
|
|
@@ -616,9 +616,9 @@ const I = Object.assign(et, {
|
|
|
616
616
|
options: r,
|
|
617
617
|
setOptions: l
|
|
618
618
|
}), [t, o, d, h, r]);
|
|
619
|
-
return /* @__PURE__ */ a.jsxs(
|
|
619
|
+
return /* @__PURE__ */ a.jsxs(Ge.Provider, { value: g, children: [
|
|
620
620
|
e,
|
|
621
|
-
/* @__PURE__ */ a.jsx(
|
|
621
|
+
/* @__PURE__ */ a.jsx(Jt, {})
|
|
622
622
|
] });
|
|
623
623
|
}, en = ({ children: e }) => {
|
|
624
624
|
const [t, n] = C(!1), [o, s] = C(""), r = y((d) => {
|
|
@@ -743,14 +743,14 @@ const de = {
|
|
|
743
743
|
throw new Error(`Unknown action type: ${n}`);
|
|
744
744
|
}
|
|
745
745
|
const r = o.instance.getAllAccounts();
|
|
746
|
-
return s !== e.inProgress && !
|
|
746
|
+
return s !== e.inProgress && !Be(r, e.accounts) ? {
|
|
747
747
|
...e,
|
|
748
748
|
inProgress: s,
|
|
749
749
|
accounts: r
|
|
750
750
|
} : s !== e.inProgress ? {
|
|
751
751
|
...e,
|
|
752
752
|
inProgress: s
|
|
753
|
-
} :
|
|
753
|
+
} : Be(r, e.accounts) ? e : {
|
|
754
754
|
...e,
|
|
755
755
|
accounts: r
|
|
756
756
|
};
|
|
@@ -868,7 +868,7 @@ const gn = ({ children: e }) => {
|
|
|
868
868
|
}, [o, t, n]), /* @__PURE__ */ a.jsx(Ve.Provider, { value: r, children: e.useMsal ? /* @__PURE__ */ a.jsx(sn, { instance: e.msalInstance, children: e.children }) : e.children });
|
|
869
869
|
}, rn = () => {
|
|
870
870
|
const { confirmTexts: e } = H(ue), { onConfirm: t, onCancel: n, text: o, show: s } = Ot();
|
|
871
|
-
return /* @__PURE__ */ a.jsx(
|
|
871
|
+
return /* @__PURE__ */ a.jsx(j, { show: s, size: "sm", centered: !0, onHide: n, children: /* @__PURE__ */ a.jsxs(j.Body, { children: [
|
|
872
872
|
/* @__PURE__ */ a.jsx("div", { className: "mb-5 text-center", children: /* @__PURE__ */ a.jsx(At, { variant: "h6", children: o }) }),
|
|
873
873
|
/* @__PURE__ */ a.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|
|
874
874
|
/* @__PURE__ */ a.jsx("button", { type: "button", className: "btn btn-secondary w-100", onClick: n, children: e.no }),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const d=require("./textUtils-CHVVh2oi.cjs");function N(t,e){const n=I(t);let i;if(n.date){const s=U(n.date,2);i=w(s.restDateString,s.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);const a=i.getTime();let o=0,u;if(n.time&&(o=h(n.time),isNaN(o)))return new Date(NaN);if(n.timezone){if(u=C(n.timezone),isNaN(u))return new Date(NaN)}else{const s=new Date(a+o),c=new Date(0);return c.setFullYear(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),c.setHours(s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds()),c}return new Date(a+o+u)}const f={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},p=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,g=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,T=/^([+-])(\d{2})(?::?(\d{2}))?$/;function I(t){const e={},r=t.split(f.dateTimeDelimiter);let n;if(r.length>2)return e;if(/:/.test(r[0])?n=r[0]:(e.date=r[0],n=r[1],f.timeZoneDelimiter.test(e.date)&&(e.date=t.split(f.timeZoneDelimiter)[0],n=t.substr(e.date.length,t.length))),n){const i=f.timezone.exec(n);i?(e.time=n.replace(i[1],""),e.timezone=i[1]):e.time=n}return e}function U(t,e){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(r);if(!n)return{year:NaN,restDateString:""};const i=n[1]?parseInt(n[1]):null,a=n[2]?parseInt(n[2]):null;return{year:a===null?i:a*100,restDateString:t.slice((n[1]||n[2]).length)}}function w(t,e){if(e===null)return new Date(NaN);const r=t.match(p);if(!r)return new Date(NaN);const n=!!r[4],i=l(r[1]),a=l(r[2])-1,o=l(r[3]),u=l(r[4]),s=l(r[5])-1;if(n)return z(e,u,s)?x(e,u,s):new Date(NaN);{const c=new Date(0);return!y(e,a,o)||!O(e,i)?new Date(NaN):(c.setUTCFullYear(e,a,Math.max(i,o)),c)}}function l(t){return t?parseInt(t):1}function h(t){const e=t.match(g);if(!e)return NaN;const r=m(e[1]),n=m(e[2]),i=m(e[3]);return M(r,n,i)?r*d.millisecondsInHour+n*d.millisecondsInMinute+i*1e3:NaN}function m(t){return t&&parseFloat(t.replace(",","."))||0}function C(t){if(t==="Z")return 0;const e=t.match(T);if(!e)return 0;const r=e[1]==="+"?-1:1,n=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return S(n,i)?r*(n*d.millisecondsInHour+i*d.millisecondsInMinute):NaN}function x(t,e,r){const n=new Date(0);n.setUTCFullYear(t,0,4);const i=n.getUTCDay()||7,a=(e-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+a),n}const Y=[31,null,31,30,31,30,31,31,30,31,30,31];function D(t){return t%400===0||t%4===0&&t%100!==0}function y(t,e,r){return e>=0&&e<=11&&r>=1&&r<=(Y[e]||(D(t)?29:28))}function O(t,e){return e>=1&&e<=(D(t)?366:365)}function z(t,e,r){return e>=1&&e<=53&&r>=0&&r<=6}function M(t,e,r){return t===24?e===0&&r===0:r>=0&&r<60&&e>=0&&e<60&&t>=0&&t<25}function S(t,e){return e>=0&&e<=59}const Z=t=>{const e=N(t);return!Number.isNaN(e.getTime())};exports.isISODate=Z;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { b as m, d as D } from "./textUtils-BbxuIsKq.js";
|
|
2
|
+
function N(t, e) {
|
|
3
|
+
const n = w(t);
|
|
4
|
+
let a;
|
|
5
|
+
if (n.date) {
|
|
6
|
+
const i = h(n.date, 2);
|
|
7
|
+
a = C(i.restDateString, i.year);
|
|
8
|
+
}
|
|
9
|
+
if (!a || isNaN(a.getTime()))
|
|
10
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
11
|
+
const s = a.getTime();
|
|
12
|
+
let o = 0, u;
|
|
13
|
+
if (n.time && (o = I(n.time), isNaN(o)))
|
|
14
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
15
|
+
if (n.timezone) {
|
|
16
|
+
if (u = x(n.timezone), isNaN(u))
|
|
17
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
18
|
+
} else {
|
|
19
|
+
const i = new Date(s + o), c = /* @__PURE__ */ new Date(0);
|
|
20
|
+
return c.setFullYear(
|
|
21
|
+
i.getUTCFullYear(),
|
|
22
|
+
i.getUTCMonth(),
|
|
23
|
+
i.getUTCDate()
|
|
24
|
+
), c.setHours(
|
|
25
|
+
i.getUTCHours(),
|
|
26
|
+
i.getUTCMinutes(),
|
|
27
|
+
i.getUTCSeconds(),
|
|
28
|
+
i.getUTCMilliseconds()
|
|
29
|
+
), c;
|
|
30
|
+
}
|
|
31
|
+
return new Date(s + o + u);
|
|
32
|
+
}
|
|
33
|
+
const f = {
|
|
34
|
+
dateTimeDelimiter: /[T ]/,
|
|
35
|
+
timeZoneDelimiter: /[Z ]/i,
|
|
36
|
+
timezone: /([Z+-].*)$/
|
|
37
|
+
}, g = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, T = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, U = /^([+-])(\d{2})(?::?(\d{2}))?$/;
|
|
38
|
+
function w(t) {
|
|
39
|
+
const e = {}, r = t.split(f.dateTimeDelimiter);
|
|
40
|
+
let n;
|
|
41
|
+
if (r.length > 2)
|
|
42
|
+
return e;
|
|
43
|
+
if (/:/.test(r[0]) ? n = r[0] : (e.date = r[0], n = r[1], f.timeZoneDelimiter.test(e.date) && (e.date = t.split(f.timeZoneDelimiter)[0], n = t.substr(
|
|
44
|
+
e.date.length,
|
|
45
|
+
t.length
|
|
46
|
+
))), n) {
|
|
47
|
+
const a = f.timezone.exec(n);
|
|
48
|
+
a ? (e.time = n.replace(a[1], ""), e.timezone = a[1]) : e.time = n;
|
|
49
|
+
}
|
|
50
|
+
return e;
|
|
51
|
+
}
|
|
52
|
+
function h(t, e) {
|
|
53
|
+
const r = new RegExp(
|
|
54
|
+
"^(?:(\\d{4}|[+-]\\d{" + (4 + e) + "})|(\\d{2}|[+-]\\d{" + (2 + e) + "})$)"
|
|
55
|
+
), n = t.match(r);
|
|
56
|
+
if (!n)
|
|
57
|
+
return { year: NaN, restDateString: "" };
|
|
58
|
+
const a = n[1] ? parseInt(n[1]) : null, s = n[2] ? parseInt(n[2]) : null;
|
|
59
|
+
return {
|
|
60
|
+
year: s === null ? a : s * 100,
|
|
61
|
+
restDateString: t.slice((n[1] || n[2]).length)
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function C(t, e) {
|
|
65
|
+
if (e === null)
|
|
66
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
67
|
+
const r = t.match(g);
|
|
68
|
+
if (!r)
|
|
69
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
70
|
+
const n = !!r[4], a = l(r[1]), s = l(r[2]) - 1, o = l(r[3]), u = l(r[4]), i = l(r[5]) - 1;
|
|
71
|
+
if (n)
|
|
72
|
+
return M(e, u, i) ? Y(e, u, i) : /* @__PURE__ */ new Date(NaN);
|
|
73
|
+
{
|
|
74
|
+
const c = /* @__PURE__ */ new Date(0);
|
|
75
|
+
return !z(e, s, o) || !O(e, a) ? /* @__PURE__ */ new Date(NaN) : (c.setUTCFullYear(e, s, Math.max(a, o)), c);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function l(t) {
|
|
79
|
+
return t ? parseInt(t) : 1;
|
|
80
|
+
}
|
|
81
|
+
function I(t) {
|
|
82
|
+
const e = t.match(T);
|
|
83
|
+
if (!e)
|
|
84
|
+
return NaN;
|
|
85
|
+
const r = d(e[1]), n = d(e[2]), a = d(e[3]);
|
|
86
|
+
return S(r, n, a) ? r * m + n * D + a * 1e3 : NaN;
|
|
87
|
+
}
|
|
88
|
+
function d(t) {
|
|
89
|
+
return t && parseFloat(t.replace(",", ".")) || 0;
|
|
90
|
+
}
|
|
91
|
+
function x(t) {
|
|
92
|
+
if (t === "Z")
|
|
93
|
+
return 0;
|
|
94
|
+
const e = t.match(U);
|
|
95
|
+
if (!e)
|
|
96
|
+
return 0;
|
|
97
|
+
const r = e[1] === "+" ? -1 : 1, n = parseInt(e[2]), a = e[3] && parseInt(e[3]) || 0;
|
|
98
|
+
return Z(n, a) ? r * (n * m + a * D) : NaN;
|
|
99
|
+
}
|
|
100
|
+
function Y(t, e, r) {
|
|
101
|
+
const n = /* @__PURE__ */ new Date(0);
|
|
102
|
+
n.setUTCFullYear(t, 0, 4);
|
|
103
|
+
const a = n.getUTCDay() || 7, s = (e - 1) * 7 + r + 1 - a;
|
|
104
|
+
return n.setUTCDate(n.getUTCDate() + s), n;
|
|
105
|
+
}
|
|
106
|
+
const y = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
107
|
+
function p(t) {
|
|
108
|
+
return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
|
|
109
|
+
}
|
|
110
|
+
function z(t, e, r) {
|
|
111
|
+
return e >= 0 && e <= 11 && r >= 1 && r <= (y[e] || (p(t) ? 29 : 28));
|
|
112
|
+
}
|
|
113
|
+
function O(t, e) {
|
|
114
|
+
return e >= 1 && e <= (p(t) ? 366 : 365);
|
|
115
|
+
}
|
|
116
|
+
function M(t, e, r) {
|
|
117
|
+
return e >= 1 && e <= 53 && r >= 0 && r <= 6;
|
|
118
|
+
}
|
|
119
|
+
function S(t, e, r) {
|
|
120
|
+
return t === 24 ? e === 0 && r === 0 : r >= 0 && r < 60 && e >= 0 && e < 60 && t >= 0 && t < 25;
|
|
121
|
+
}
|
|
122
|
+
function Z(t, e) {
|
|
123
|
+
return e >= 0 && e <= 59;
|
|
124
|
+
}
|
|
125
|
+
const F = (t) => {
|
|
126
|
+
const e = N(t);
|
|
127
|
+
return !Number.isNaN(e.getTime());
|
|
128
|
+
};
|
|
129
|
+
export {
|
|
130
|
+
F as i
|
|
131
|
+
};
|