react-luminus-components 1.0.1 → 1.0.2
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/README.md +350 -2
- package/dist/components/Form/CheckInput/CheckInput.d.ts +2 -1
- package/dist/components/Form/Container/InputContainer.d.ts +2 -1
- package/dist/components/Form/EmployeePicker/EmployeePicker.d.ts +2 -1
- package/dist/components/Form/SelectInput/SelectInput.d.ts +2 -1
- package/dist/components/Form/TextInput/TextInput.d.ts +2 -1
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +310 -310
- package/dist/models/prop-types/HookFormCheckInputProps.d.ts +2 -0
- package/dist/models/prop-types/HookFormEmployeePickerProps.d.ts +2 -0
- package/dist/models/prop-types/HookFormRadioInputProps.d.ts +2 -0
- package/dist/models/prop-types/HookFormSelectInputProps.d.ts +2 -0
- package/dist/models/prop-types/HookFormTextAreaInputProps.d.ts +2 -0
- package/dist/models/prop-types/HookFormTextInputProps.d.ts +2 -0
- package/package.json +1 -1
package/dist/main.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as s, e as N, i as Yt, L as ve, k as V, h as Lt } from "./HomeDashboard.module-CuVVnp4t.mjs";
|
|
2
2
|
import * as x from "react";
|
|
3
|
-
import X, { useCallback as $, useState as I, useEffect as
|
|
3
|
+
import X, { useCallback as $, useState as I, useEffect as W, useContext as S, useRef as R, useReducer as qe, useMemo as ae } from "react";
|
|
4
4
|
import { d as Be, u as At, q as Se, L as Ht, M as ie } from "./Modal-DsY3WNWM.mjs";
|
|
5
5
|
import { T as ea } from "./Modal-DsY3WNWM.mjs";
|
|
6
6
|
import { c as qt, d as Bt, e as Vt, f as _t, g as Gt, u as Qt, m as Xt, h as Kt, w as xe, i as Ut, O as Ve, P as he, T as Jt, j as z } from "./SimpleTooltip-vqBAkdBP.mjs";
|
|
@@ -9,12 +9,12 @@ import { m as zt, a as _e } from "./constants-CzNy5yO3.mjs";
|
|
|
9
9
|
import { h as J, n as E, B as Zt, C as en, p as tn, u as nn, x as rn, q as je, z as on, v as an, P as ee } from "./hasClass-D3KZs5y_.mjs";
|
|
10
10
|
const Ro = ({ fileLoader: e, fileName: t, children: n, className: r }) => {
|
|
11
11
|
const o = $(async () => {
|
|
12
|
-
var
|
|
12
|
+
var u;
|
|
13
13
|
const a = await e();
|
|
14
14
|
if (!a)
|
|
15
15
|
return;
|
|
16
16
|
const i = window.URL.createObjectURL(new Blob([a])), c = document.createElement("a");
|
|
17
|
-
c.href = i, c.setAttribute("download", t), document.body.appendChild(c), c.click(), (
|
|
17
|
+
c.href = i, c.setAttribute("download", t), document.body.appendChild(c), c.click(), (u = c.parentNode) == null || u.removeChild(c);
|
|
18
18
|
}, [e, t]);
|
|
19
19
|
return /* @__PURE__ */ s.jsx("button", { type: "button", className: `btn btn-outline-primary ${r ?? ""}`, onClick: o, children: n });
|
|
20
20
|
};
|
|
@@ -45,8 +45,8 @@ function de() {
|
|
|
45
45
|
return cn;
|
|
46
46
|
}
|
|
47
47
|
function oe(e, t) {
|
|
48
|
-
var c,
|
|
49
|
-
const n = de(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((
|
|
48
|
+
var c, u, l, h;
|
|
49
|
+
const n = de(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((u = (c = t == null ? void 0 : t.locale) == null ? void 0 : c.options) == null ? void 0 : u.weekStartsOn) ?? n.weekStartsOn ?? ((h = (l = n.locale) == null ? void 0 : l.options) == null ? void 0 : h.weekStartsOn) ?? 0, o = A(e), a = o.getDay(), i = (a < r ? 7 : 0) + a - r;
|
|
50
50
|
return o.setDate(o.getDate() - i), o.setHours(0, 0, 0, 0), o;
|
|
51
51
|
}
|
|
52
52
|
function ce(e) {
|
|
@@ -379,17 +379,17 @@ function re(e) {
|
|
|
379
379
|
const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(o);
|
|
380
380
|
if (!a)
|
|
381
381
|
return null;
|
|
382
|
-
const i = a[0], c = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth],
|
|
382
|
+
const i = a[0], c = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], u = Array.isArray(c) ? On(c, (d) => d.test(i)) : (
|
|
383
383
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
384
|
-
Sn(c, (
|
|
384
|
+
Sn(c, (d) => d.test(i))
|
|
385
385
|
);
|
|
386
|
-
let
|
|
387
|
-
|
|
386
|
+
let l;
|
|
387
|
+
l = e.valueCallback ? e.valueCallback(u) : u, l = n.valueCallback ? (
|
|
388
388
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
389
|
-
n.valueCallback(
|
|
390
|
-
) :
|
|
389
|
+
n.valueCallback(l)
|
|
390
|
+
) : l;
|
|
391
391
|
const h = t.slice(i.length);
|
|
392
|
-
return { value:
|
|
392
|
+
return { value: l, rest: h };
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
395
|
function Sn(e, t) {
|
|
@@ -416,7 +416,7 @@ function En(e) {
|
|
|
416
416
|
return { value: i, rest: c };
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
|
-
const Tn = /^(\d+)(th|st|nd|rd)?/i,
|
|
419
|
+
const Tn = /^(\d+)(th|st|nd|rd)?/i, Wn = /\d+/i, Pn = {
|
|
420
420
|
narrow: /^(b|a)/i,
|
|
421
421
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
422
422
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
@@ -486,11 +486,11 @@ const Tn = /^(\d+)(th|st|nd|rd)?/i, Pn = /\d+/i, Wn = {
|
|
|
486
486
|
}, _n = {
|
|
487
487
|
ordinalNumber: En({
|
|
488
488
|
matchPattern: Tn,
|
|
489
|
-
parsePattern:
|
|
489
|
+
parsePattern: Wn,
|
|
490
490
|
valueCallback: (e) => parseInt(e, 10)
|
|
491
491
|
}),
|
|
492
492
|
era: re({
|
|
493
|
-
matchPatterns:
|
|
493
|
+
matchPatterns: Pn,
|
|
494
494
|
defaultMatchWidth: "wide",
|
|
495
495
|
parsePatterns: In,
|
|
496
496
|
defaultParseWidth: "any"
|
|
@@ -541,17 +541,17 @@ function Xn(e) {
|
|
|
541
541
|
return Math.round(n / _e) + 1;
|
|
542
542
|
}
|
|
543
543
|
function Qe(e, t) {
|
|
544
|
-
var h,
|
|
545
|
-
const n = A(e), r = n.getFullYear(), o = de(), a = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((
|
|
544
|
+
var h, d, f, m;
|
|
545
|
+
const n = A(e), r = n.getFullYear(), o = de(), a = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((d = (h = t == null ? void 0 : t.locale) == null ? void 0 : h.options) == null ? void 0 : d.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((m = (f = o.locale) == null ? void 0 : f.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, i = _(e, 0);
|
|
546
546
|
i.setFullYear(r + 1, 0, a), i.setHours(0, 0, 0, 0);
|
|
547
|
-
const c = oe(i, t),
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
return n.getTime() >= c.getTime() ? r + 1 : n.getTime() >=
|
|
547
|
+
const c = oe(i, t), u = _(e, 0);
|
|
548
|
+
u.setFullYear(r, 0, a), u.setHours(0, 0, 0, 0);
|
|
549
|
+
const l = oe(u, t);
|
|
550
|
+
return n.getTime() >= c.getTime() ? r + 1 : n.getTime() >= l.getTime() ? r : r - 1;
|
|
551
551
|
}
|
|
552
552
|
function Kn(e, t) {
|
|
553
|
-
var c,
|
|
554
|
-
const n = de(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((
|
|
553
|
+
var c, u, l, h;
|
|
554
|
+
const n = de(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((u = (c = t == null ? void 0 : t.locale) == null ? void 0 : c.options) == null ? void 0 : u.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((h = (l = n.locale) == null ? void 0 : l.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, o = Qe(e, t), a = _(e, 0);
|
|
555
555
|
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), oe(a, t);
|
|
556
556
|
}
|
|
557
557
|
function Un(e, t) {
|
|
@@ -1051,7 +1051,7 @@ const Q = {
|
|
|
1051
1051
|
return "Z";
|
|
1052
1052
|
switch (t) {
|
|
1053
1053
|
case "X":
|
|
1054
|
-
return
|
|
1054
|
+
return Pe(r);
|
|
1055
1055
|
case "XXXX":
|
|
1056
1056
|
case "XX":
|
|
1057
1057
|
return U(r);
|
|
@@ -1066,7 +1066,7 @@ const Q = {
|
|
|
1066
1066
|
const r = e.getTimezoneOffset();
|
|
1067
1067
|
switch (t) {
|
|
1068
1068
|
case "x":
|
|
1069
|
-
return
|
|
1069
|
+
return Pe(r);
|
|
1070
1070
|
case "xxxx":
|
|
1071
1071
|
case "xx":
|
|
1072
1072
|
return U(r);
|
|
@@ -1083,7 +1083,7 @@ const Q = {
|
|
|
1083
1083
|
case "O":
|
|
1084
1084
|
case "OO":
|
|
1085
1085
|
case "OOO":
|
|
1086
|
-
return "GMT" +
|
|
1086
|
+
return "GMT" + We(r, ":");
|
|
1087
1087
|
case "OOOO":
|
|
1088
1088
|
default:
|
|
1089
1089
|
return "GMT" + U(r, ":");
|
|
@@ -1096,7 +1096,7 @@ const Q = {
|
|
|
1096
1096
|
case "z":
|
|
1097
1097
|
case "zz":
|
|
1098
1098
|
case "zzz":
|
|
1099
|
-
return "GMT" +
|
|
1099
|
+
return "GMT" + We(r, ":");
|
|
1100
1100
|
case "zzzz":
|
|
1101
1101
|
default:
|
|
1102
1102
|
return "GMT" + U(r, ":");
|
|
@@ -1113,11 +1113,11 @@ const Q = {
|
|
|
1113
1113
|
return k(r, t.length);
|
|
1114
1114
|
}
|
|
1115
1115
|
};
|
|
1116
|
-
function
|
|
1116
|
+
function We(e, t = "") {
|
|
1117
1117
|
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.trunc(r / 60), a = r % 60;
|
|
1118
1118
|
return a === 0 ? n + String(o) : n + String(o) + t + k(a, 2);
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function Pe(e, t) {
|
|
1121
1121
|
return e % 60 === 0 ? (e > 0 ? "-" : "+") + k(Math.abs(e) / 60, 2) : U(e, t);
|
|
1122
1122
|
}
|
|
1123
1123
|
function U(e, t = "") {
|
|
@@ -1190,11 +1190,11 @@ function ar(e, t, n) {
|
|
|
1190
1190
|
}
|
|
1191
1191
|
const sr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ir = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, cr = /^'([^]*?)'?$/, lr = /''/g, ur = /[a-zA-Z]/;
|
|
1192
1192
|
function dr(e, t, n) {
|
|
1193
|
-
var h,
|
|
1194
|
-
const r = de(), o = (n == null ? void 0 : n.locale) ?? r.locale ?? Gn, a = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((
|
|
1193
|
+
var h, d, f, m, w, y, b, j;
|
|
1194
|
+
const r = de(), o = (n == null ? void 0 : n.locale) ?? r.locale ?? Gn, a = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((d = (h = n == null ? void 0 : n.locale) == null ? void 0 : h.options) == null ? void 0 : d.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((m = (f = r.locale) == null ? void 0 : f.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, i = (n == null ? void 0 : n.weekStartsOn) ?? ((y = (w = n == null ? void 0 : n.locale) == null ? void 0 : w.options) == null ? void 0 : y.weekStartsOn) ?? r.weekStartsOn ?? ((j = (b = r.locale) == null ? void 0 : b.options) == null ? void 0 : j.weekStartsOn) ?? 0, c = A(e);
|
|
1195
1195
|
if (!fn(c))
|
|
1196
1196
|
throw new RangeError("Invalid time value");
|
|
1197
|
-
let
|
|
1197
|
+
let u = t.match(ir).map((g) => {
|
|
1198
1198
|
const p = g[0];
|
|
1199
1199
|
if (p === "p" || p === "P") {
|
|
1200
1200
|
const C = zn[p];
|
|
@@ -1215,19 +1215,19 @@ function dr(e, t, n) {
|
|
|
1215
1215
|
);
|
|
1216
1216
|
return { isToken: !1, value: g };
|
|
1217
1217
|
});
|
|
1218
|
-
o.localize.preprocessor && (
|
|
1219
|
-
const
|
|
1218
|
+
o.localize.preprocessor && (u = o.localize.preprocessor(c, u));
|
|
1219
|
+
const l = {
|
|
1220
1220
|
firstWeekContainsDate: a,
|
|
1221
1221
|
weekStartsOn: i,
|
|
1222
1222
|
locale: o
|
|
1223
1223
|
};
|
|
1224
|
-
return
|
|
1224
|
+
return u.map((g) => {
|
|
1225
1225
|
if (!g.isToken)
|
|
1226
1226
|
return g.value;
|
|
1227
1227
|
const p = g.value;
|
|
1228
1228
|
(!(n != null && n.useAdditionalWeekYearTokens) && rr(p) || !(n != null && n.useAdditionalDayOfYearTokens) && nr(p)) && or(p, t, String(e));
|
|
1229
1229
|
const C = Te[p[0]];
|
|
1230
|
-
return C(c, p, o.localize,
|
|
1230
|
+
return C(c, p, o.localize, l);
|
|
1231
1231
|
}).join("");
|
|
1232
1232
|
}
|
|
1233
1233
|
function fr(e) {
|
|
@@ -1247,7 +1247,7 @@ const Yo = ({ month: e, onChangeMonth: t, locale: n }) => {
|
|
|
1247
1247
|
const [e, t] = I({
|
|
1248
1248
|
widgets: []
|
|
1249
1249
|
});
|
|
1250
|
-
|
|
1250
|
+
W(() => {
|
|
1251
1251
|
const r = localStorage.getItem("dashboardConfig");
|
|
1252
1252
|
r && t(JSON.parse(r));
|
|
1253
1253
|
}, []);
|
|
@@ -1257,44 +1257,44 @@ const Yo = ({ month: e, onChangeMonth: t, locale: n }) => {
|
|
|
1257
1257
|
return { dashboardConfig: e, onChangeDashboardConfig: n };
|
|
1258
1258
|
}, Lo = ({ availableWidgets: e }) => {
|
|
1259
1259
|
var h;
|
|
1260
|
-
const { homeDashboardTexts: t } = S(ve), { dashboardConfig: n, onChangeDashboardConfig: r } = mr(), [o, a] = I(!1), i = $((
|
|
1260
|
+
const { homeDashboardTexts: t } = S(ve), { dashboardConfig: n, onChangeDashboardConfig: r } = mr(), [o, a] = I(!1), i = $((d, f) => {
|
|
1261
1261
|
var m, w;
|
|
1262
|
-
|
|
1262
|
+
d === ((m = n.widgets) == null ? void 0 : m.length) ? r({
|
|
1263
1263
|
...n,
|
|
1264
1264
|
widgets: [...n.widgets, { widgetId: f, fullWidth: !1 }]
|
|
1265
1265
|
}) : r({
|
|
1266
1266
|
...n,
|
|
1267
|
-
widgets: ((w = n.widgets) == null ? void 0 : w.map((y, b) => b ===
|
|
1267
|
+
widgets: ((w = n.widgets) == null ? void 0 : w.map((y, b) => b === d ? { widgetId: f, fullWidth: !1 } : y)) ?? []
|
|
1268
1268
|
});
|
|
1269
|
-
}, [n, r]), c = $((
|
|
1269
|
+
}, [n, r]), c = $((d) => {
|
|
1270
1270
|
var f, m;
|
|
1271
|
-
((f = n.widgets[
|
|
1271
|
+
((f = n.widgets[d]) == null ? void 0 : f.widgetId) === -1 ? r({
|
|
1272
1272
|
...n,
|
|
1273
|
-
widgets: ((m = n.widgets) == null ? void 0 : m.filter((w, y) => y !==
|
|
1274
|
-
}) : i(
|
|
1275
|
-
}, [n, r, i]),
|
|
1273
|
+
widgets: ((m = n.widgets) == null ? void 0 : m.filter((w, y) => y !== d)) ?? []
|
|
1274
|
+
}) : i(d, -1);
|
|
1275
|
+
}, [n, r, i]), u = $((d) => {
|
|
1276
1276
|
var f;
|
|
1277
1277
|
r({
|
|
1278
1278
|
...n,
|
|
1279
|
-
widgets: ((f = n.widgets) == null ? void 0 : f.map((m, w) => w ===
|
|
1279
|
+
widgets: ((f = n.widgets) == null ? void 0 : f.map((m, w) => w === d ? { ...m, fullWidth: !m.fullWidth } : m)) ?? []
|
|
1280
1280
|
});
|
|
1281
|
-
}, [n, r]),
|
|
1282
|
-
[V.widgetEdit]: o &&
|
|
1281
|
+
}, [n, r]), l = $((d, f, m) => d ? /* @__PURE__ */ s.jsxs("div", { className: N(V.widgetWrapper, {
|
|
1282
|
+
[V.widgetEdit]: o && d.id !== -1
|
|
1283
1283
|
}, { [V.fullWidth]: m }), children: [
|
|
1284
1284
|
o && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1285
1285
|
/* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => c(f), className: N("icon-button", "color-danger", V.removeIcon), children: /* @__PURE__ */ s.jsx(_t, {}) }),
|
|
1286
|
-
/* @__PURE__ */ s.jsx("button", { type: "button", onClick: () =>
|
|
1286
|
+
/* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => u(f), className: N("icon-button", { "color-danger": m }, { "color-info": !m }, V.fullWidthIcon), children: /* @__PURE__ */ s.jsx(Gt, {}) })
|
|
1287
1287
|
] }),
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
] }, f) : /* @__PURE__ */ s.jsx(s.Fragment, {}), [o, i, c,
|
|
1288
|
+
d.id === -1 ? o && /* @__PURE__ */ s.jsx("div", { className: V.widgetWrapper, children: /* @__PURE__ */ s.jsx(Re, { onAdd: (w) => i(f, w) }) }) : d.render,
|
|
1289
|
+
d.id > -1 && o && /* @__PURE__ */ s.jsx("div", { className: V.widgetEditOverlay })
|
|
1290
|
+
] }, f) : /* @__PURE__ */ s.jsx(s.Fragment, {}), [o, i, c, u]);
|
|
1291
1291
|
return /* @__PURE__ */ s.jsxs("div", { className: V.dashboard, children: [
|
|
1292
1292
|
/* @__PURE__ */ s.jsx("div", { className: "mb-3 d-flex align-items-center justify-content-end", children: o ? /* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => a(!1), className: "btn btn-outline-danger", children: t.dashboardEditDone }) : /* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => a(!0), className: "btn btn-outline-primary", children: t.dashboardEdit }) }),
|
|
1293
1293
|
/* @__PURE__ */ s.jsxs("div", { className: V.widgetsGrid, children: [
|
|
1294
|
-
(h = n.widgets) == null ? void 0 : h.map((
|
|
1295
|
-
o && /* @__PURE__ */ s.jsx(Re, { onAdd: (
|
|
1294
|
+
(h = n.widgets) == null ? void 0 : h.map((d, f) => l(e.find((m) => m.id === d.widgetId), f, d.fullWidth)),
|
|
1295
|
+
o && /* @__PURE__ */ s.jsx(Re, { onAdd: (d) => {
|
|
1296
1296
|
var f;
|
|
1297
|
-
return i((f = n.widgets) == null ? void 0 : f.length,
|
|
1297
|
+
return i((f = n.widgets) == null ? void 0 : f.length, d);
|
|
1298
1298
|
} })
|
|
1299
1299
|
] })
|
|
1300
1300
|
] });
|
|
@@ -1303,26 +1303,26 @@ var hr = function(e, t, n, r, o, a, i, c) {
|
|
|
1303
1303
|
if (process.env.NODE_ENV !== "production" && t === void 0)
|
|
1304
1304
|
throw new Error("invariant requires an error message argument");
|
|
1305
1305
|
if (!e) {
|
|
1306
|
-
var
|
|
1306
|
+
var u;
|
|
1307
1307
|
if (t === void 0)
|
|
1308
|
-
|
|
1308
|
+
u = new Error(
|
|
1309
1309
|
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
1310
1310
|
);
|
|
1311
1311
|
else {
|
|
1312
|
-
var
|
|
1313
|
-
|
|
1312
|
+
var l = [n, r, o, a, i, c], h = 0;
|
|
1313
|
+
u = new Error(
|
|
1314
1314
|
t.replace(/%s/g, function() {
|
|
1315
|
-
return
|
|
1315
|
+
return l[h++];
|
|
1316
1316
|
})
|
|
1317
|
-
),
|
|
1317
|
+
), u.name = "Invariant Violation";
|
|
1318
1318
|
}
|
|
1319
|
-
throw
|
|
1319
|
+
throw u.framesToPop = 1, u;
|
|
1320
1320
|
}
|
|
1321
1321
|
}, gr = hr;
|
|
1322
1322
|
const Ye = /* @__PURE__ */ Lt(gr);
|
|
1323
1323
|
function pr(e, t, n, r = !1) {
|
|
1324
1324
|
const o = J(n);
|
|
1325
|
-
|
|
1325
|
+
W(() => {
|
|
1326
1326
|
const a = typeof e == "function" ? e() : e;
|
|
1327
1327
|
return a.addEventListener(t, o, r), () => a.removeEventListener(t, o, r);
|
|
1328
1328
|
}, [e]);
|
|
@@ -1348,24 +1348,24 @@ function ke({
|
|
|
1348
1348
|
role: a,
|
|
1349
1349
|
onClick: i,
|
|
1350
1350
|
tabIndex: c = 0,
|
|
1351
|
-
type:
|
|
1351
|
+
type: u
|
|
1352
1352
|
}) {
|
|
1353
1353
|
e || (n != null || r != null || o != null ? e = "a" : e = "button");
|
|
1354
|
-
const
|
|
1354
|
+
const l = {
|
|
1355
1355
|
tagName: e
|
|
1356
1356
|
};
|
|
1357
1357
|
if (e === "button")
|
|
1358
1358
|
return [{
|
|
1359
|
-
type:
|
|
1359
|
+
type: u || "button",
|
|
1360
1360
|
disabled: t
|
|
1361
|
-
},
|
|
1361
|
+
}, l];
|
|
1362
1362
|
const h = (f) => {
|
|
1363
1363
|
if ((t || e === "a" && yr(n)) && f.preventDefault(), t) {
|
|
1364
1364
|
f.stopPropagation();
|
|
1365
1365
|
return;
|
|
1366
1366
|
}
|
|
1367
1367
|
i == null || i(f);
|
|
1368
|
-
},
|
|
1368
|
+
}, d = (f) => {
|
|
1369
1369
|
f.key === " " && (f.preventDefault(), h(f));
|
|
1370
1370
|
};
|
|
1371
1371
|
return e === "a" && (n || (n = "#"), t && (n = void 0)), [{
|
|
@@ -1379,8 +1379,8 @@ function ke({
|
|
|
1379
1379
|
"aria-disabled": t || void 0,
|
|
1380
1380
|
rel: e === "a" ? o : void 0,
|
|
1381
1381
|
onClick: h,
|
|
1382
|
-
onKeyDown:
|
|
1383
|
-
},
|
|
1382
|
+
onKeyDown: d
|
|
1383
|
+
}, l];
|
|
1384
1384
|
}
|
|
1385
1385
|
const Ke = /* @__PURE__ */ x.forwardRef((e, t) => {
|
|
1386
1386
|
let {
|
|
@@ -1439,20 +1439,20 @@ const kr = Ue, Je = /* @__PURE__ */ x.forwardRef(({
|
|
|
1439
1439
|
disabled: a = !1,
|
|
1440
1440
|
className: i,
|
|
1441
1441
|
...c
|
|
1442
|
-
},
|
|
1443
|
-
const
|
|
1444
|
-
tagName:
|
|
1442
|
+
}, u) => {
|
|
1443
|
+
const l = E(t, "btn"), [h, {
|
|
1444
|
+
tagName: d
|
|
1445
1445
|
}] = ke({
|
|
1446
1446
|
tagName: e,
|
|
1447
1447
|
disabled: a,
|
|
1448
1448
|
...c
|
|
1449
|
-
}), f =
|
|
1449
|
+
}), f = d;
|
|
1450
1450
|
return /* @__PURE__ */ s.jsx(f, {
|
|
1451
1451
|
...h,
|
|
1452
1452
|
...c,
|
|
1453
|
-
ref:
|
|
1453
|
+
ref: u,
|
|
1454
1454
|
disabled: a,
|
|
1455
|
-
className: N(i,
|
|
1455
|
+
className: N(i, l, o && "active", n && `${l}-${n}`, r && `${l}-${r}`, c.href && a && "disabled")
|
|
1456
1456
|
});
|
|
1457
1457
|
});
|
|
1458
1458
|
Je.displayName = "Button";
|
|
@@ -1468,17 +1468,17 @@ function Dr({
|
|
|
1468
1468
|
}) {
|
|
1469
1469
|
t = E(t, "col");
|
|
1470
1470
|
const o = Zt(), a = en(), i = [], c = [];
|
|
1471
|
-
return o.forEach((
|
|
1472
|
-
const
|
|
1473
|
-
delete r[
|
|
1474
|
-
let h,
|
|
1475
|
-
typeof
|
|
1471
|
+
return o.forEach((u) => {
|
|
1472
|
+
const l = r[u];
|
|
1473
|
+
delete r[u];
|
|
1474
|
+
let h, d, f;
|
|
1475
|
+
typeof l == "object" && l != null ? {
|
|
1476
1476
|
span: h,
|
|
1477
|
-
offset:
|
|
1477
|
+
offset: d,
|
|
1478
1478
|
order: f
|
|
1479
|
-
} =
|
|
1480
|
-
const m =
|
|
1481
|
-
h && i.push(h === !0 ? `${t}${m}` : `${t}${m}-${h}`), f != null && c.push(`order${m}-${f}`),
|
|
1479
|
+
} = l : h = l;
|
|
1480
|
+
const m = u !== a ? `-${u}` : "";
|
|
1481
|
+
h && i.push(h === !0 ? `${t}${m}` : `${t}${m}-${h}`), f != null && c.push(`order${m}-${f}`), d != null && c.push(`offset${m}-${d}`);
|
|
1482
1482
|
}), [{
|
|
1483
1483
|
...r,
|
|
1484
1484
|
className: N(n, ...i, ...c)
|
|
@@ -1510,10 +1510,10 @@ ze.displayName = "Col";
|
|
|
1510
1510
|
const $r = ze;
|
|
1511
1511
|
function Fr(e, t, n) {
|
|
1512
1512
|
const r = R(e !== void 0), [o, a] = I(t), i = e !== void 0, c = r.current;
|
|
1513
|
-
return r.current = i, !i && c && o !== t && a(t), [i ? e : o, $((...
|
|
1514
|
-
const [
|
|
1515
|
-
let
|
|
1516
|
-
return a(
|
|
1513
|
+
return r.current = i, !i && c && o !== t && a(t), [i ? e : o, $((...u) => {
|
|
1514
|
+
const [l, ...h] = u;
|
|
1515
|
+
let d = n == null ? void 0 : n(l, ...h);
|
|
1516
|
+
return a(l), d;
|
|
1517
1517
|
}, [n])];
|
|
1518
1518
|
}
|
|
1519
1519
|
function Mr() {
|
|
@@ -1536,10 +1536,10 @@ function Ze(e = {}) {
|
|
|
1536
1536
|
flip: a,
|
|
1537
1537
|
offset: i,
|
|
1538
1538
|
rootCloseEvent: c,
|
|
1539
|
-
fixed:
|
|
1540
|
-
placement:
|
|
1539
|
+
fixed: u = !1,
|
|
1540
|
+
placement: l,
|
|
1541
1541
|
popperConfig: h = {},
|
|
1542
|
-
enableEventListeners:
|
|
1542
|
+
enableEventListeners: d = !0,
|
|
1543
1543
|
usePopper: f = !!t
|
|
1544
1544
|
} = e, m = (t == null ? void 0 : t.show) == null ? !!e.show : t.show;
|
|
1545
1545
|
m && !o.current && (o.current = !0);
|
|
@@ -1551,12 +1551,12 @@ function Ze(e = {}) {
|
|
|
1551
1551
|
menuElement: j,
|
|
1552
1552
|
toggleElement: g
|
|
1553
1553
|
} = t || {}, p = Qt(g, j, Xt({
|
|
1554
|
-
placement:
|
|
1554
|
+
placement: l || y || "bottom-start",
|
|
1555
1555
|
enabled: f,
|
|
1556
|
-
enableEvents:
|
|
1556
|
+
enableEvents: d ?? m,
|
|
1557
1557
|
offset: i,
|
|
1558
1558
|
flip: a,
|
|
1559
|
-
fixed:
|
|
1559
|
+
fixed: u,
|
|
1560
1560
|
arrowElement: n,
|
|
1561
1561
|
popperConfig: h
|
|
1562
1562
|
})), C = Object.assign({
|
|
@@ -1581,7 +1581,7 @@ function Ze(e = {}) {
|
|
|
1581
1581
|
disabled: !m
|
|
1582
1582
|
}), [C, F];
|
|
1583
1583
|
}
|
|
1584
|
-
const
|
|
1584
|
+
const Wr = {
|
|
1585
1585
|
usePopper: !0
|
|
1586
1586
|
};
|
|
1587
1587
|
function Ce(e) {
|
|
@@ -1594,11 +1594,11 @@ function Ce(e) {
|
|
|
1594
1594
|
});
|
|
1595
1595
|
}
|
|
1596
1596
|
Ce.displayName = "DropdownMenu";
|
|
1597
|
-
Ce.defaultProps =
|
|
1597
|
+
Ce.defaultProps = Wr;
|
|
1598
1598
|
const le = {
|
|
1599
1599
|
prefix: String(Math.round(Math.random() * 1e10)),
|
|
1600
1600
|
current: 0
|
|
1601
|
-
}, et = /* @__PURE__ */ X.createContext(le),
|
|
1601
|
+
}, et = /* @__PURE__ */ X.createContext(le), Pr = /* @__PURE__ */ X.createContext(!1);
|
|
1602
1602
|
let Ir = !!(typeof window < "u" && window.document && window.document.createElement), pe = /* @__PURE__ */ new WeakMap();
|
|
1603
1603
|
function Rr(e = !1) {
|
|
1604
1604
|
let t = S(et), n = R(null);
|
|
@@ -1638,7 +1638,7 @@ function Br(e) {
|
|
|
1638
1638
|
};
|
|
1639
1639
|
}
|
|
1640
1640
|
function Vr() {
|
|
1641
|
-
return typeof X.useSyncExternalStore == "function" ? X.useSyncExternalStore(Br, Hr, qr) : S(
|
|
1641
|
+
return typeof X.useSyncExternalStore == "function" ? X.useSyncExternalStore(Br, Hr, qr) : S(Pr);
|
|
1642
1642
|
}
|
|
1643
1643
|
const tt = (e) => {
|
|
1644
1644
|
var t;
|
|
@@ -1693,16 +1693,16 @@ function at({
|
|
|
1693
1693
|
}) {
|
|
1694
1694
|
const a = S(be), i = S(Gr), {
|
|
1695
1695
|
activeKey: c
|
|
1696
|
-
} = i || {},
|
|
1696
|
+
} = i || {}, u = Ae(e, t), l = n == null && e != null ? Ae(c) === u : n;
|
|
1697
1697
|
return [{
|
|
1698
|
-
onClick: J((
|
|
1699
|
-
r || (o == null || o(
|
|
1698
|
+
onClick: J((d) => {
|
|
1699
|
+
r || (o == null || o(d), a && !d.isPropagationStopped() && a(u, d));
|
|
1700
1700
|
}),
|
|
1701
1701
|
"aria-disabled": r || void 0,
|
|
1702
|
-
"aria-selected":
|
|
1702
|
+
"aria-selected": l,
|
|
1703
1703
|
[Be("dropdown-item")]: ""
|
|
1704
1704
|
}, {
|
|
1705
|
-
isActive:
|
|
1705
|
+
isActive: l
|
|
1706
1706
|
}];
|
|
1707
1707
|
}
|
|
1708
1708
|
const st = /* @__PURE__ */ x.forwardRef((e, t) => {
|
|
@@ -1713,7 +1713,7 @@ const st = /* @__PURE__ */ x.forwardRef((e, t) => {
|
|
|
1713
1713
|
active: a,
|
|
1714
1714
|
as: i = Ke
|
|
1715
1715
|
} = e, c = Xr(e, Qr);
|
|
1716
|
-
const [
|
|
1716
|
+
const [u] = at({
|
|
1717
1717
|
key: n,
|
|
1718
1718
|
href: c.href,
|
|
1719
1719
|
disabled: r,
|
|
@@ -1722,7 +1722,7 @@ const st = /* @__PURE__ */ x.forwardRef((e, t) => {
|
|
|
1722
1722
|
});
|
|
1723
1723
|
return /* @__PURE__ */ s.jsx(i, Object.assign({}, c, {
|
|
1724
1724
|
ref: t
|
|
1725
|
-
},
|
|
1725
|
+
}, u));
|
|
1726
1726
|
});
|
|
1727
1727
|
st.displayName = "DropdownItem";
|
|
1728
1728
|
function He() {
|
|
@@ -1741,51 +1741,51 @@ function se({
|
|
|
1741
1741
|
placement: i = "bottom-start",
|
|
1742
1742
|
children: c
|
|
1743
1743
|
}) {
|
|
1744
|
-
const
|
|
1744
|
+
const u = nn(), [l, h] = Fr(t, e, r), [d, f] = He(), m = d.current, [w, y] = He(), b = w.current, j = At(l), g = R(null), p = R(!1), C = S(be), F = $((v, D, P = D == null ? void 0 : D.type) => {
|
|
1745
1745
|
h(v, {
|
|
1746
1746
|
originalEvent: D,
|
|
1747
|
-
source:
|
|
1747
|
+
source: P
|
|
1748
1748
|
});
|
|
1749
1749
|
}, [h]), Y = J((v, D) => {
|
|
1750
1750
|
n == null || n(v, D), F(!1, D, "select"), D.isPropagationStopped() || C == null || C(v, D);
|
|
1751
1751
|
}), T = ae(() => ({
|
|
1752
1752
|
toggle: F,
|
|
1753
1753
|
placement: i,
|
|
1754
|
-
show:
|
|
1754
|
+
show: l,
|
|
1755
1755
|
menuElement: m,
|
|
1756
1756
|
toggleElement: b,
|
|
1757
1757
|
setMenu: f,
|
|
1758
1758
|
setToggle: y
|
|
1759
|
-
}), [F, i,
|
|
1760
|
-
m && j && !
|
|
1759
|
+
}), [F, i, l, m, b, f, y]);
|
|
1760
|
+
m && j && !l && (p.current = m.contains(m.ownerDocument.activeElement));
|
|
1761
1761
|
const O = J(() => {
|
|
1762
1762
|
b && b.focus && b.focus();
|
|
1763
1763
|
}), L = J(() => {
|
|
1764
1764
|
const v = g.current;
|
|
1765
1765
|
let D = a;
|
|
1766
|
-
if (D == null && (D =
|
|
1766
|
+
if (D == null && (D = d.current && tt(d.current) ? "keyboard" : !1), D === !1 || D === "keyboard" && !/^key.+$/.test(v))
|
|
1767
1767
|
return;
|
|
1768
|
-
const
|
|
1769
|
-
|
|
1768
|
+
const P = Se(d.current, o)[0];
|
|
1769
|
+
P && P.focus && P.focus();
|
|
1770
1770
|
});
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
}, [
|
|
1771
|
+
W(() => {
|
|
1772
|
+
l ? L() : p.current && (p.current = !1, O());
|
|
1773
|
+
}, [l, p, O, L]), W(() => {
|
|
1774
1774
|
g.current = null;
|
|
1775
1775
|
});
|
|
1776
1776
|
const M = (v, D) => {
|
|
1777
|
-
if (!
|
|
1777
|
+
if (!d.current)
|
|
1778
1778
|
return null;
|
|
1779
|
-
const
|
|
1780
|
-
let B =
|
|
1781
|
-
return B = Math.max(0, Math.min(B,
|
|
1779
|
+
const P = Se(d.current, o);
|
|
1780
|
+
let B = P.indexOf(v) + D;
|
|
1781
|
+
return B = Math.max(0, Math.min(B, P.length)), P[B];
|
|
1782
1782
|
};
|
|
1783
|
-
return pr($(() =>
|
|
1784
|
-
var D,
|
|
1783
|
+
return pr($(() => u.document, [u]), "keydown", (v) => {
|
|
1784
|
+
var D, P;
|
|
1785
1785
|
const {
|
|
1786
1786
|
key: B
|
|
1787
|
-
} = v, K = v.target, Fe = (D =
|
|
1788
|
-
if (/input|textarea/i.test(K.tagName) && (B === " " || B !== "Escape" && Fe || B === "Escape" && K.type === "search") || !Fe && !Rt || B === "Tab" && (!
|
|
1787
|
+
} = v, K = v.target, Fe = (D = d.current) == null ? void 0 : D.contains(K), Rt = (P = w.current) == null ? void 0 : P.contains(K);
|
|
1788
|
+
if (/input|textarea/i.test(K.tagName) && (B === " " || B !== "Escape" && Fe || B === "Escape" && K.type === "search") || !Fe && !Rt || B === "Tab" && (!d.current || !l))
|
|
1789
1789
|
return;
|
|
1790
1790
|
g.current = v.type;
|
|
1791
1791
|
const me = {
|
|
@@ -1799,7 +1799,7 @@ function se({
|
|
|
1799
1799
|
return;
|
|
1800
1800
|
}
|
|
1801
1801
|
case "ArrowDown":
|
|
1802
|
-
if (v.preventDefault(), !
|
|
1802
|
+
if (v.preventDefault(), !l)
|
|
1803
1803
|
h(!0, me);
|
|
1804
1804
|
else {
|
|
1805
1805
|
const H = M(K, 1);
|
|
@@ -1809,7 +1809,7 @@ function se({
|
|
|
1809
1809
|
case "Tab":
|
|
1810
1810
|
rn(K.ownerDocument, "keyup", (H) => {
|
|
1811
1811
|
var Me;
|
|
1812
|
-
(H.key === "Tab" && !H.target || !((Me =
|
|
1812
|
+
(H.key === "Tab" && !H.target || !((Me = d.current) != null && Me.contains(H.target))) && h(!1, me);
|
|
1813
1813
|
}, {
|
|
1814
1814
|
once: !0
|
|
1815
1815
|
});
|
|
@@ -1867,8 +1867,8 @@ const Ur = ut, dt = /* @__PURE__ */ x.forwardRef(({
|
|
|
1867
1867
|
active: a,
|
|
1868
1868
|
as: i = kr,
|
|
1869
1869
|
...c
|
|
1870
|
-
},
|
|
1871
|
-
const
|
|
1870
|
+
}, u) => {
|
|
1871
|
+
const l = E(e, "dropdown-item"), [h, d] = at({
|
|
1872
1872
|
key: n,
|
|
1873
1873
|
href: c.href,
|
|
1874
1874
|
disabled: r,
|
|
@@ -1878,8 +1878,8 @@ const Ur = ut, dt = /* @__PURE__ */ x.forwardRef(({
|
|
|
1878
1878
|
return /* @__PURE__ */ s.jsx(i, {
|
|
1879
1879
|
...c,
|
|
1880
1880
|
...h,
|
|
1881
|
-
ref:
|
|
1882
|
-
className: N(t,
|
|
1881
|
+
ref: u,
|
|
1882
|
+
className: N(t, l, d.isActive && "active", r && "disabled")
|
|
1883
1883
|
});
|
|
1884
1884
|
});
|
|
1885
1885
|
dt.displayName = "DropdownItem";
|
|
@@ -1908,9 +1908,9 @@ function pt(e, t) {
|
|
|
1908
1908
|
return je(n, e);
|
|
1909
1909
|
}
|
|
1910
1910
|
function wt(e, t, n) {
|
|
1911
|
-
const r = n ? "top-end" : "top-start", o = n ? "top-start" : "top-end", a = n ? "bottom-end" : "bottom-start", i = n ? "bottom-start" : "bottom-end", c = n ? "right-start" : "left-start",
|
|
1912
|
-
let
|
|
1913
|
-
return t === "up" ?
|
|
1911
|
+
const r = n ? "top-end" : "top-start", o = n ? "top-start" : "top-end", a = n ? "bottom-end" : "bottom-start", i = n ? "bottom-start" : "bottom-end", c = n ? "right-start" : "left-start", u = n ? "right-end" : "left-end", l = n ? "left-start" : "right-start", h = n ? "left-end" : "right-end";
|
|
1912
|
+
let d = e ? i : a;
|
|
1913
|
+
return t === "up" ? d = e ? o : r : t === "end" ? d = e ? h : l : t === "start" ? d = e ? u : c : t === "down-centered" ? d = "bottom" : t === "up-centered" && (d = "top"), d;
|
|
1914
1914
|
}
|
|
1915
1915
|
const bt = /* @__PURE__ */ x.forwardRef(({
|
|
1916
1916
|
bsPrefix: e,
|
|
@@ -1922,10 +1922,10 @@ const bt = /* @__PURE__ */ x.forwardRef(({
|
|
|
1922
1922
|
renderOnMount: i,
|
|
1923
1923
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
1924
1924
|
as: c = "div",
|
|
1925
|
-
popperConfig:
|
|
1926
|
-
variant:
|
|
1925
|
+
popperConfig: u,
|
|
1926
|
+
variant: l,
|
|
1927
1927
|
...h
|
|
1928
|
-
},
|
|
1928
|
+
}, d) => {
|
|
1929
1929
|
let f = !1;
|
|
1930
1930
|
const m = S(Zr), w = E(e, "dropdown-menu"), {
|
|
1931
1931
|
align: y,
|
|
@@ -1938,8 +1938,8 @@ const bt = /* @__PURE__ */ x.forwardRef(({
|
|
|
1938
1938
|
if (typeof n == "object") {
|
|
1939
1939
|
const v = Object.keys(n);
|
|
1940
1940
|
if (process.env.NODE_ENV !== "production" && xe(v.length === 1, "There should only be 1 breakpoint when passing an object to `align`"), v.length) {
|
|
1941
|
-
const D = v[0],
|
|
1942
|
-
f =
|
|
1941
|
+
const D = v[0], P = n[D];
|
|
1942
|
+
f = P === "start", p.push(`${w}-${D}-${P}`);
|
|
1943
1943
|
}
|
|
1944
1944
|
} else
|
|
1945
1945
|
n === "end" && (f = !0);
|
|
@@ -1954,10 +1954,10 @@ const bt = /* @__PURE__ */ x.forwardRef(({
|
|
|
1954
1954
|
show: a,
|
|
1955
1955
|
usePopper: !m && p.length === 0,
|
|
1956
1956
|
offset: [0, 2],
|
|
1957
|
-
popperConfig:
|
|
1957
|
+
popperConfig: u,
|
|
1958
1958
|
placement: C
|
|
1959
1959
|
});
|
|
1960
|
-
if (F.ref = je(pt(
|
|
1960
|
+
if (F.ref = je(pt(d, "DropdownMenu"), F.ref), on(() => {
|
|
1961
1961
|
O && (T == null || T.update());
|
|
1962
1962
|
}, [O]), !Y && !i && !g)
|
|
1963
1963
|
return null;
|
|
@@ -1973,7 +1973,7 @@ const bt = /* @__PURE__ */ x.forwardRef(({
|
|
|
1973
1973
|
...(p.length || m) && {
|
|
1974
1974
|
"data-bs-popper": "static"
|
|
1975
1975
|
},
|
|
1976
|
-
className: N(t, w, O && "show", f && `${w}-end`,
|
|
1976
|
+
className: N(t, w, O && "show", f && `${w}-end`, l && `${w}-${l}`, ...p)
|
|
1977
1977
|
});
|
|
1978
1978
|
});
|
|
1979
1979
|
bt.displayName = "DropdownMenu";
|
|
@@ -1986,12 +1986,12 @@ const eo = bt, yt = /* @__PURE__ */ x.forwardRef(({
|
|
|
1986
1986
|
as: o = Cr,
|
|
1987
1987
|
...a
|
|
1988
1988
|
}, i) => {
|
|
1989
|
-
const c = E(e, "dropdown-toggle"),
|
|
1989
|
+
const c = E(e, "dropdown-toggle"), u = S(fe);
|
|
1990
1990
|
r !== void 0 && (a.bsPrefix = r);
|
|
1991
|
-
const [
|
|
1992
|
-
return
|
|
1993
|
-
className: N(n, c, t && `${c}-split`, (
|
|
1994
|
-
...
|
|
1991
|
+
const [l] = nt();
|
|
1992
|
+
return l.ref = je(l.ref, pt(i, "DropdownToggle")), /* @__PURE__ */ s.jsx(o, {
|
|
1993
|
+
className: N(n, c, t && `${c}-split`, (u == null ? void 0 : u.show) && "show"),
|
|
1994
|
+
...l,
|
|
1995
1995
|
...a
|
|
1996
1996
|
});
|
|
1997
1997
|
});
|
|
@@ -2004,18 +2004,18 @@ const to = yt, vt = /* @__PURE__ */ x.forwardRef((e, t) => {
|
|
|
2004
2004
|
className: a,
|
|
2005
2005
|
align: i = "start",
|
|
2006
2006
|
onSelect: c,
|
|
2007
|
-
onToggle:
|
|
2008
|
-
focusFirstItemOnShow:
|
|
2007
|
+
onToggle: u,
|
|
2008
|
+
focusFirstItemOnShow: l,
|
|
2009
2009
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
2010
2010
|
as: h = "div",
|
|
2011
|
-
navbar:
|
|
2011
|
+
navbar: d,
|
|
2012
2012
|
autoClose: f = !0,
|
|
2013
2013
|
...m
|
|
2014
2014
|
} = Ut(e, {
|
|
2015
2015
|
show: "onToggle"
|
|
2016
2016
|
}), w = S(ht), y = E(n, "dropdown"), b = an(), j = (T) => f === !1 ? T === "click" : f === "inside" ? T !== "rootClose" : f === "outside" ? T !== "select" : !0, g = J((T, O) => {
|
|
2017
2017
|
var L, M;
|
|
2018
|
-
!((L = O.originalEvent) == null || (M = L.target) == null) && M.classList.contains("dropdown-toggle") && O.source === "mousedown" || (O.originalEvent.currentTarget === document && (O.source !== "keydown" || O.originalEvent.key === "Escape") && (O.source = "rootClose"), j(O.source) && (
|
|
2018
|
+
!((L = O.originalEvent) == null || (M = L.target) == null) && M.classList.contains("dropdown-toggle") && O.source === "mousedown" || (O.originalEvent.currentTarget === document && (O.source !== "keydown" || O.originalEvent.key === "Escape") && (O.source = "rootClose"), j(O.source) && (u == null || u(T, O)));
|
|
2019
2019
|
}), C = wt(i === "end", r, b), F = ae(() => ({
|
|
2020
2020
|
align: i,
|
|
2021
2021
|
drop: r,
|
|
@@ -2035,7 +2035,7 @@ const to = yt, vt = /* @__PURE__ */ x.forwardRef((e, t) => {
|
|
|
2035
2035
|
show: o,
|
|
2036
2036
|
onSelect: c,
|
|
2037
2037
|
onToggle: g,
|
|
2038
|
-
focusFirstItemOnShow:
|
|
2038
|
+
focusFirstItemOnShow: l,
|
|
2039
2039
|
itemSelector: `.${y}-item:not(.disabled):not(:disabled)`,
|
|
2040
2040
|
children: w ? m.children : /* @__PURE__ */ s.jsx(h, {
|
|
2041
2041
|
...m,
|
|
@@ -2089,15 +2089,15 @@ const xt = Ne, ro = /* @__PURE__ */ x.createContext({}), G = ro, jt = /* @__PURE
|
|
|
2089
2089
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
2090
2090
|
as: i = "input",
|
|
2091
2091
|
...c
|
|
2092
|
-
},
|
|
2092
|
+
}, u) => {
|
|
2093
2093
|
const {
|
|
2094
|
-
controlId:
|
|
2094
|
+
controlId: l
|
|
2095
2095
|
} = S(G);
|
|
2096
2096
|
return t = E(t, "form-check-input"), /* @__PURE__ */ s.jsx(i, {
|
|
2097
2097
|
...c,
|
|
2098
|
-
ref:
|
|
2098
|
+
ref: u,
|
|
2099
2099
|
type: r,
|
|
2100
|
-
id: e ||
|
|
2100
|
+
id: e || l,
|
|
2101
2101
|
className: N(n, t, o && "is-valid", a && "is-invalid")
|
|
2102
2102
|
});
|
|
2103
2103
|
});
|
|
@@ -2128,10 +2128,10 @@ const ye = Ct, Nt = /* @__PURE__ */ x.forwardRef(({
|
|
|
2128
2128
|
disabled: a = !1,
|
|
2129
2129
|
isValid: i = !1,
|
|
2130
2130
|
isInvalid: c = !1,
|
|
2131
|
-
feedbackTooltip:
|
|
2132
|
-
feedback:
|
|
2131
|
+
feedbackTooltip: u = !1,
|
|
2132
|
+
feedback: l,
|
|
2133
2133
|
feedbackType: h,
|
|
2134
|
-
className:
|
|
2134
|
+
className: d,
|
|
2135
2135
|
style: f,
|
|
2136
2136
|
title: m = "",
|
|
2137
2137
|
type: w = "checkbox",
|
|
@@ -2159,15 +2159,15 @@ const ye = Ct, Nt = /* @__PURE__ */ x.forwardRef(({
|
|
|
2159
2159
|
value: F,
|
|
2160
2160
|
children: /* @__PURE__ */ s.jsx("div", {
|
|
2161
2161
|
style: f,
|
|
2162
|
-
className: N(
|
|
2162
|
+
className: N(d, Y && t, r && `${t}-inline`, o && `${t}-reverse`, w === "switch" && n),
|
|
2163
2163
|
children: b || /* @__PURE__ */ s.jsxs(s.Fragment, {
|
|
2164
2164
|
children: [T, Y && /* @__PURE__ */ s.jsx(ye, {
|
|
2165
2165
|
title: m,
|
|
2166
2166
|
children: y
|
|
2167
|
-
}),
|
|
2167
|
+
}), l && /* @__PURE__ */ s.jsx(xt, {
|
|
2168
2168
|
type: h,
|
|
2169
|
-
tooltip:
|
|
2170
|
-
children:
|
|
2169
|
+
tooltip: u,
|
|
2170
|
+
children: l
|
|
2171
2171
|
})]
|
|
2172
2172
|
})
|
|
2173
2173
|
})
|
|
@@ -2186,23 +2186,23 @@ const ue = Object.assign(Nt, {
|
|
|
2186
2186
|
className: a,
|
|
2187
2187
|
isValid: i = !1,
|
|
2188
2188
|
isInvalid: c = !1,
|
|
2189
|
-
plaintext:
|
|
2190
|
-
readOnly:
|
|
2189
|
+
plaintext: u,
|
|
2190
|
+
readOnly: l,
|
|
2191
2191
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
2192
2192
|
as: h = "input",
|
|
2193
|
-
...
|
|
2193
|
+
...d
|
|
2194
2194
|
}, f) => {
|
|
2195
2195
|
const {
|
|
2196
2196
|
controlId: m
|
|
2197
2197
|
} = S(G);
|
|
2198
2198
|
return e = E(e, "form-control"), process.env.NODE_ENV !== "production" && xe(m == null || !o, "`controlId` is ignored on `<FormControl>` when `id` is specified."), /* @__PURE__ */ s.jsx(h, {
|
|
2199
|
-
...
|
|
2199
|
+
...d,
|
|
2200
2200
|
type: t,
|
|
2201
2201
|
size: r,
|
|
2202
2202
|
ref: f,
|
|
2203
|
-
readOnly:
|
|
2203
|
+
readOnly: l,
|
|
2204
2204
|
id: o || m,
|
|
2205
|
-
className: N(a,
|
|
2205
|
+
className: N(a, u ? `${e}-plaintext` : e, n && `${e}-${n}`, t === "color" && `${e}-color`, i && "is-valid", c && "is-invalid")
|
|
2206
2206
|
});
|
|
2207
2207
|
});
|
|
2208
2208
|
Dt.displayName = "FormControl";
|
|
@@ -2248,13 +2248,13 @@ const Mt = Ft, St = /* @__PURE__ */ x.forwardRef(({
|
|
|
2248
2248
|
...i
|
|
2249
2249
|
}, c) => {
|
|
2250
2250
|
const {
|
|
2251
|
-
controlId:
|
|
2251
|
+
controlId: u
|
|
2252
2252
|
} = S(G);
|
|
2253
2253
|
t = E(t, "form-label");
|
|
2254
|
-
let
|
|
2255
|
-
typeof n == "string" && (
|
|
2256
|
-
const h = N(o, t, r && "visually-hidden", n &&
|
|
2257
|
-
return process.env.NODE_ENV !== "production" && xe(
|
|
2254
|
+
let l = "col-form-label";
|
|
2255
|
+
typeof n == "string" && (l = `${l} ${l}-${n}`);
|
|
2256
|
+
const h = N(o, t, r && "visually-hidden", n && l);
|
|
2257
|
+
return process.env.NODE_ENV !== "production" && xe(u == null || !a, "`controlId` is ignored on `<FormLabel>` when `htmlFor` is specified."), a = a || u, n ? /* @__PURE__ */ s.jsx($r, {
|
|
2258
2258
|
ref: c,
|
|
2259
2259
|
as: "label",
|
|
2260
2260
|
className: h,
|
|
@@ -2298,16 +2298,16 @@ const io = Ot, Et = /* @__PURE__ */ x.forwardRef(({
|
|
|
2298
2298
|
isInvalid: a = !1,
|
|
2299
2299
|
id: i,
|
|
2300
2300
|
...c
|
|
2301
|
-
},
|
|
2301
|
+
}, u) => {
|
|
2302
2302
|
const {
|
|
2303
|
-
controlId:
|
|
2303
|
+
controlId: l
|
|
2304
2304
|
} = S(G);
|
|
2305
2305
|
return e = E(e, "form-select"), /* @__PURE__ */ s.jsx("select", {
|
|
2306
2306
|
...c,
|
|
2307
2307
|
size: n,
|
|
2308
|
-
ref:
|
|
2308
|
+
ref: u,
|
|
2309
2309
|
className: N(r, e, t && `${e}-${t}`, o && "is-valid", a && "is-invalid"),
|
|
2310
|
-
id: i ||
|
|
2310
|
+
id: i || l
|
|
2311
2311
|
});
|
|
2312
2312
|
});
|
|
2313
2313
|
Et.displayName = "FormSelect";
|
|
@@ -2326,16 +2326,16 @@ const co = Et, Tt = /* @__PURE__ */ x.forwardRef(
|
|
|
2326
2326
|
}))
|
|
2327
2327
|
);
|
|
2328
2328
|
Tt.displayName = "FormText";
|
|
2329
|
-
const lo = Tt,
|
|
2329
|
+
const lo = Tt, Wt = /* @__PURE__ */ x.forwardRef((e, t) => /* @__PURE__ */ s.jsx(ue, {
|
|
2330
2330
|
...e,
|
|
2331
2331
|
ref: t,
|
|
2332
2332
|
type: "switch"
|
|
2333
2333
|
}));
|
|
2334
|
-
|
|
2335
|
-
const uo = Object.assign(
|
|
2334
|
+
Wt.displayName = "Switch";
|
|
2335
|
+
const uo = Object.assign(Wt, {
|
|
2336
2336
|
Input: ue.Input,
|
|
2337
2337
|
Label: ue.Label
|
|
2338
|
-
}),
|
|
2338
|
+
}), Pt = /* @__PURE__ */ x.forwardRef(({
|
|
2339
2339
|
bsPrefix: e,
|
|
2340
2340
|
className: t,
|
|
2341
2341
|
children: n,
|
|
@@ -2352,8 +2352,8 @@ const uo = Object.assign(Pt, {
|
|
|
2352
2352
|
children: o
|
|
2353
2353
|
})]
|
|
2354
2354
|
})));
|
|
2355
|
-
|
|
2356
|
-
const te =
|
|
2355
|
+
Pt.displayName = "FloatingLabel";
|
|
2356
|
+
const te = Pt, fo = {
|
|
2357
2357
|
/**
|
|
2358
2358
|
* The Form `ref` will be forwarded to the underlying element,
|
|
2359
2359
|
* which means, unless it's rendered `as` a composite component,
|
|
@@ -2406,8 +2406,8 @@ const q = Object.assign(De, {
|
|
|
2406
2406
|
a = o.charCodeAt(i) + ((a << 5) - a);
|
|
2407
2407
|
let c = "#";
|
|
2408
2408
|
for (i = 0; i < 3; i += 1) {
|
|
2409
|
-
const
|
|
2410
|
-
c += `00${
|
|
2409
|
+
const u = a >> i * 8 & 255;
|
|
2410
|
+
c += `00${u.toString(16)}`.slice(-2);
|
|
2411
2411
|
}
|
|
2412
2412
|
return c;
|
|
2413
2413
|
};
|
|
@@ -2431,57 +2431,57 @@ const q = Object.assign(De, {
|
|
|
2431
2431
|
/* @__PURE__ */ s.jsx(we.Menu, { children: t })
|
|
2432
2432
|
] });
|
|
2433
2433
|
function wo(e, t, n) {
|
|
2434
|
-
var r = this, o = R(null), a = R(0), i = R(null), c = R([]),
|
|
2434
|
+
var r = this, o = R(null), a = R(0), i = R(null), c = R([]), u = R(), l = R(), h = R(e), d = R(!0);
|
|
2435
2435
|
h.current = e;
|
|
2436
2436
|
var f = typeof window < "u", m = !t && t !== 0 && f;
|
|
2437
2437
|
if (typeof e != "function")
|
|
2438
2438
|
throw new TypeError("Expected a function");
|
|
2439
2439
|
t = +t || 0;
|
|
2440
2440
|
var w = !!(n = n || {}).leading, y = !("trailing" in n) || !!n.trailing, b = "maxWait" in n, j = "debounceOnServer" in n && !!n.debounceOnServer, g = b ? Math.max(+n.maxWait || 0, t) : null;
|
|
2441
|
-
|
|
2442
|
-
return
|
|
2443
|
-
|
|
2441
|
+
W(function() {
|
|
2442
|
+
return d.current = !0, function() {
|
|
2443
|
+
d.current = !1;
|
|
2444
2444
|
};
|
|
2445
2445
|
}, []);
|
|
2446
2446
|
var p = ae(function() {
|
|
2447
2447
|
var C = function(M) {
|
|
2448
|
-
var v = c.current, D =
|
|
2449
|
-
return c.current =
|
|
2448
|
+
var v = c.current, D = u.current;
|
|
2449
|
+
return c.current = u.current = null, a.current = M, l.current = h.current.apply(D, v);
|
|
2450
2450
|
}, F = function(M, v) {
|
|
2451
2451
|
m && cancelAnimationFrame(i.current), i.current = m ? requestAnimationFrame(M) : setTimeout(M, v);
|
|
2452
2452
|
}, Y = function(M) {
|
|
2453
|
-
if (!
|
|
2453
|
+
if (!d.current)
|
|
2454
2454
|
return !1;
|
|
2455
2455
|
var v = M - o.current;
|
|
2456
2456
|
return !o.current || v >= t || v < 0 || b && M - a.current >= g;
|
|
2457
2457
|
}, T = function(M) {
|
|
2458
|
-
return i.current = null, y && c.current ? C(M) : (c.current =
|
|
2458
|
+
return i.current = null, y && c.current ? C(M) : (c.current = u.current = null, l.current);
|
|
2459
2459
|
}, O = function M() {
|
|
2460
2460
|
var v = Date.now();
|
|
2461
2461
|
if (Y(v))
|
|
2462
2462
|
return T(v);
|
|
2463
|
-
if (
|
|
2464
|
-
var D = t - (v - o.current),
|
|
2465
|
-
F(M,
|
|
2463
|
+
if (d.current) {
|
|
2464
|
+
var D = t - (v - o.current), P = b ? Math.min(D, g - (v - a.current)) : D;
|
|
2465
|
+
F(M, P);
|
|
2466
2466
|
}
|
|
2467
2467
|
}, L = function() {
|
|
2468
2468
|
if (f || j) {
|
|
2469
2469
|
var M = Date.now(), v = Y(M);
|
|
2470
|
-
if (c.current = [].slice.call(arguments),
|
|
2471
|
-
if (!i.current &&
|
|
2472
|
-
return a.current = o.current, F(O, t), w ? C(o.current) :
|
|
2470
|
+
if (c.current = [].slice.call(arguments), u.current = r, o.current = M, v) {
|
|
2471
|
+
if (!i.current && d.current)
|
|
2472
|
+
return a.current = o.current, F(O, t), w ? C(o.current) : l.current;
|
|
2473
2473
|
if (b)
|
|
2474
2474
|
return F(O, t), C(o.current);
|
|
2475
2475
|
}
|
|
2476
|
-
return i.current || F(O, t),
|
|
2476
|
+
return i.current || F(O, t), l.current;
|
|
2477
2477
|
}
|
|
2478
2478
|
};
|
|
2479
2479
|
return L.cancel = function() {
|
|
2480
|
-
i.current && (m ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), a.current = 0, c.current = o.current =
|
|
2480
|
+
i.current && (m ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), a.current = 0, c.current = o.current = u.current = i.current = null;
|
|
2481
2481
|
}, L.isPending = function() {
|
|
2482
2482
|
return !!i.current;
|
|
2483
2483
|
}, L.flush = function() {
|
|
2484
|
-
return i.current ? T(Date.now()) :
|
|
2484
|
+
return i.current ? T(Date.now()) : l.current;
|
|
2485
2485
|
}, L;
|
|
2486
2486
|
}, [w, b, t, g, y, m, f, j]);
|
|
2487
2487
|
return p;
|
|
@@ -2493,74 +2493,74 @@ function yo(e, t) {
|
|
|
2493
2493
|
return t;
|
|
2494
2494
|
}
|
|
2495
2495
|
function vo(e, t, n) {
|
|
2496
|
-
var r = n && n.equalityFn || bo, o = qe(yo, e), a = o[0], i = o[1], c = wo($(function(
|
|
2497
|
-
return i(
|
|
2498
|
-
}, [i]), t, n),
|
|
2499
|
-
return r(
|
|
2500
|
-
}
|
|
2501
|
-
const qo = ({ label: e, value: t, onChange: n,
|
|
2502
|
-
var
|
|
2503
|
-
n && n(((
|
|
2504
|
-
}, className:
|
|
2505
|
-
const
|
|
2496
|
+
var r = n && n.equalityFn || bo, o = qe(yo, e), a = o[0], i = o[1], c = wo($(function(l) {
|
|
2497
|
+
return i(l);
|
|
2498
|
+
}, [i]), t, n), u = R(e);
|
|
2499
|
+
return r(u.current, e) || (c(e), u.current = e), [a, c];
|
|
2500
|
+
}
|
|
2501
|
+
const qo = ({ label: e, value: t, onChange: n, hidden: r, disabled: o, className: a, type: i }) => /* @__PURE__ */ s.jsx(q.Check, { id: `check-${e}`, type: i ?? "checkbox", label: e ?? "", checked: t, onChange: (c) => {
|
|
2502
|
+
var u;
|
|
2503
|
+
n && n(((u = c.target) == null ? void 0 : u.checked) ?? !1);
|
|
2504
|
+
}, className: a ?? "", hidden: r ?? !1, disabled: o ?? !1 }), $e = ({ withoutLabel: e, label: t, hidden: n, children: r }) => e ? /* @__PURE__ */ s.jsx(s.Fragment, { children: r }) : /* @__PURE__ */ s.jsx(te, { label: t, hidden: n ?? !1, children: r }), xo = ({ type: e, value: t, onChange: n, label: r, withoutLabel: o, placeholder: a, size: i, hidden: c, disabled: u, showClearIcon: l, clearValue: h, className: d }) => {
|
|
2505
|
+
const f = e === "number", m = $(() => {
|
|
2506
2506
|
if (!n)
|
|
2507
2507
|
return;
|
|
2508
|
-
const
|
|
2509
|
-
n(
|
|
2510
|
-
}, [
|
|
2511
|
-
return /* @__PURE__ */ s.jsxs($e, { withoutLabel: o ?? !1, label: r ?? "", children: [
|
|
2512
|
-
/* @__PURE__ */ s.jsx(q.Control, { type: e, placeholder: a ?? r, size: i, value: t ?? "", onChange: (
|
|
2513
|
-
var
|
|
2508
|
+
const w = h ?? null;
|
|
2509
|
+
n(f ? w ? Number(w) : null : (w == null ? void 0 : w.toString()) ?? "");
|
|
2510
|
+
}, [h, f, n]);
|
|
2511
|
+
return /* @__PURE__ */ s.jsxs($e, { withoutLabel: o ?? !1, label: r ?? "", hidden: c, children: [
|
|
2512
|
+
/* @__PURE__ */ s.jsx(q.Control, { type: e, placeholder: a ?? r, size: i, value: t ?? "", onChange: (w) => {
|
|
2513
|
+
var b;
|
|
2514
2514
|
if (!n)
|
|
2515
2515
|
return;
|
|
2516
|
-
const
|
|
2517
|
-
|
|
2518
|
-
}, className:
|
|
2519
|
-
|
|
2516
|
+
const y = (b = w.target) == null ? void 0 : b.value;
|
|
2517
|
+
f && n(y ? parseInt(y, 10) : null), n(y || null);
|
|
2518
|
+
}, className: d ?? "", hidden: c, disabled: u ?? !1 }),
|
|
2519
|
+
l && t && n && !u && /* @__PURE__ */ s.jsx("div", { className: `luminus-input-remove-icon ${e !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: m, children: /* @__PURE__ */ s.jsx(z, {}) }) })
|
|
2520
2520
|
] });
|
|
2521
|
-
}, Bo = ({ value: e, options: t, onChange: n, label: r, withoutLabel: o, isNumber: a, size: i,
|
|
2522
|
-
const
|
|
2521
|
+
}, Bo = ({ value: e, options: t, onChange: n, label: r, withoutLabel: o, isNumber: a, size: i, hidden: c, disabled: u, showClearIcon: l, clearValue: h, className: d }) => {
|
|
2522
|
+
const f = $(() => {
|
|
2523
2523
|
if (!n)
|
|
2524
2524
|
return;
|
|
2525
|
-
const
|
|
2526
|
-
n(a ?
|
|
2527
|
-
}, [
|
|
2528
|
-
return /* @__PURE__ */ s.jsxs($e, { withoutLabel: o ?? !1, label: r ?? "", children: [
|
|
2529
|
-
/* @__PURE__ */ s.jsxs(q.Select, { size: i, value: e ?? "", onChange: (
|
|
2530
|
-
var
|
|
2525
|
+
const m = h ?? null;
|
|
2526
|
+
n(a ? m ? Number(m) : null : (m == null ? void 0 : m.toString()) ?? "");
|
|
2527
|
+
}, [h, a, n]);
|
|
2528
|
+
return /* @__PURE__ */ s.jsxs($e, { withoutLabel: o ?? !1, label: r ?? "", hidden: c, children: [
|
|
2529
|
+
/* @__PURE__ */ s.jsxs(q.Select, { size: i, value: e ?? "", onChange: (m) => {
|
|
2530
|
+
var y;
|
|
2531
2531
|
if (!n)
|
|
2532
2532
|
return;
|
|
2533
|
-
const
|
|
2534
|
-
a && n(
|
|
2535
|
-
}, className:
|
|
2533
|
+
const w = (y = m.target) == null ? void 0 : y.value;
|
|
2534
|
+
a && n(w ? parseInt(w, 10) : null), n(w || null);
|
|
2535
|
+
}, className: d ?? "", hidden: c, disabled: u ?? !1, children: [
|
|
2536
2536
|
/* @__PURE__ */ s.jsx("option", { value: "" }),
|
|
2537
|
-
t == null ? void 0 : t.sort((
|
|
2537
|
+
t == null ? void 0 : t.sort((m, w) => (m.name ?? "").localeCompare(w.name ?? "")).map((m) => /* @__PURE__ */ s.jsx("option", { value: m.id ?? "", children: m.name }, m.id))
|
|
2538
2538
|
] }),
|
|
2539
|
-
|
|
2539
|
+
l && e && n && !u && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: f, children: /* @__PURE__ */ s.jsx(z, {}) }) })
|
|
2540
2540
|
] });
|
|
2541
|
-
}, Vo = ({ defaultSelection: e, onSelect: t, label: n, withoutLabel: r, size: o,
|
|
2542
|
-
const [
|
|
2543
|
-
|
|
2541
|
+
}, Vo = ({ defaultSelection: e, onSelect: t, label: n, withoutLabel: r, size: o, hidden: a, disabled: i }) => {
|
|
2542
|
+
const [c, u] = I(e), [l, h] = I(!1), d = $((f) => {
|
|
2543
|
+
u(f ? { id: f.id, name: f.fullName } : null);
|
|
2544
2544
|
}, []);
|
|
2545
|
-
return
|
|
2546
|
-
|
|
2547
|
-
}, [e]),
|
|
2548
|
-
t && t(
|
|
2549
|
-
}, [
|
|
2550
|
-
/* @__PURE__ */ s.jsxs($e, { withoutLabel: r ?? !1, label: n ?? "", children: [
|
|
2551
|
-
/* @__PURE__ */ s.jsxs(q.Select, { size: o, value: (
|
|
2552
|
-
|
|
2545
|
+
return W(() => {
|
|
2546
|
+
u(e);
|
|
2547
|
+
}, [e]), W(() => {
|
|
2548
|
+
t && t(c);
|
|
2549
|
+
}, [c, t]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2550
|
+
/* @__PURE__ */ s.jsxs($e, { withoutLabel: r ?? !1, label: n ?? "", hidden: a, children: [
|
|
2551
|
+
/* @__PURE__ */ s.jsxs(q.Select, { size: o, value: (c == null ? void 0 : c.id) ?? "", onChange: (f) => u({ id: Number(f.target.value), name: "" }), onMouseDown: (f) => {
|
|
2552
|
+
f.currentTarget.focus(), f.preventDefault();
|
|
2553
2553
|
}, onClick: () => {
|
|
2554
|
-
|
|
2555
|
-
},
|
|
2554
|
+
i || h(!0);
|
|
2555
|
+
}, hidden: a, disabled: i, style: { minWidth: "200px" }, children: [
|
|
2556
2556
|
/* @__PURE__ */ s.jsx("option", { value: "" }),
|
|
2557
2557
|
e && /* @__PURE__ */ s.jsx("option", { value: e.id, children: e.name }),
|
|
2558
|
-
|
|
2558
|
+
c && /* @__PURE__ */ s.jsx("option", { value: c.id, children: c.name })
|
|
2559
2559
|
] }),
|
|
2560
|
-
|
|
2560
|
+
c && !i && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: () => d(null), children: /* @__PURE__ */ s.jsx(z, {}) }) })
|
|
2561
2561
|
] }),
|
|
2562
|
-
|
|
2563
|
-
|
|
2562
|
+
l && /* @__PURE__ */ s.jsx(It, { show: l, onCancel: () => h(!1), onEmployeeSelected: (f) => {
|
|
2563
|
+
h(!1), d(f);
|
|
2564
2564
|
} })
|
|
2565
2565
|
] });
|
|
2566
2566
|
}, jo = ({ employee: e }) => /* @__PURE__ */ s.jsxs("div", { className: "card p-3 shadow-sm", children: [
|
|
@@ -2573,8 +2573,8 @@ const qo = ({ label: e, value: t, onChange: n, disabled: r, className: o, type:
|
|
|
2573
2573
|
/* @__PURE__ */ s.jsx("div", { children: e.profession })
|
|
2574
2574
|
] })
|
|
2575
2575
|
] }), ko = ({ onEmployeeSelected: e }) => {
|
|
2576
|
-
const { axiosInstance: t, employeePickerModalTexts: n } = S(ve), [r, o] = I(!1), [a, i] = I(""), [c,
|
|
2577
|
-
if (
|
|
2576
|
+
const { axiosInstance: t, employeePickerModalTexts: n } = S(ve), [r, o] = I(!1), [a, i] = I(""), [c, u] = vo(a, 500), [l, h] = I(null), d = !c, f = $(() => {
|
|
2577
|
+
if (d) {
|
|
2578
2578
|
h(null);
|
|
2579
2579
|
return;
|
|
2580
2580
|
}
|
|
@@ -2583,17 +2583,17 @@ const qo = ({ label: e, value: t, onChange: n, disabled: r, className: o, type:
|
|
|
2583
2583
|
}).catch(() => {
|
|
2584
2584
|
h(null), o(!1);
|
|
2585
2585
|
});
|
|
2586
|
-
}, [t, c,
|
|
2587
|
-
return
|
|
2586
|
+
}, [t, c, d]);
|
|
2587
|
+
return W(() => {
|
|
2588
2588
|
f();
|
|
2589
2589
|
}, [f]), /* @__PURE__ */ s.jsxs("div", { className: "d-flex flex-column h-100 w-100 overflow-hidden", children: [
|
|
2590
2590
|
r && /* @__PURE__ */ s.jsx(Ht, {}),
|
|
2591
2591
|
/* @__PURE__ */ s.jsx("div", { className: "p-3", children: /* @__PURE__ */ s.jsx(q, { onSubmit: (m) => {
|
|
2592
|
-
m.preventDefault(), m.stopPropagation(),
|
|
2592
|
+
m.preventDefault(), m.stopPropagation(), u.flush();
|
|
2593
2593
|
}, children: /* @__PURE__ */ s.jsx(xo, { withoutLabel: !0, type: "text", placeholder: n.searchPlaceholder, size: "sm", value: a, onChange: (m) => i((m == null ? void 0 : m.toString()) ?? ""), className: "w-100" }) }) }),
|
|
2594
2594
|
/* @__PURE__ */ s.jsxs("div", { className: "h-100 overflow-auto d-flex flex-column gap-2 p-3", children: [
|
|
2595
|
-
|
|
2596
|
-
|
|
2595
|
+
l !== null && l.length === 0 && /* @__PURE__ */ s.jsx("div", { className: "alert alert-warning m-0", children: n.noResultsMessage }),
|
|
2596
|
+
l == null ? void 0 : l.map((m) => /* @__PURE__ */ s.jsx("div", { role: "button", onClick: () => e(m), children: /* @__PURE__ */ s.jsx(jo, { employee: m }) }, m.id))
|
|
2597
2597
|
] })
|
|
2598
2598
|
] });
|
|
2599
2599
|
}, Co = "_modal_18hh3_1", No = "_modal-content_18hh3_1", Do = "_modal-body_18hh3_5", $o = {
|
|
@@ -2609,60 +2609,60 @@ const qo = ({ label: e, value: t, onChange: n, disabled: r, className: o, type:
|
|
|
2609
2609
|
/* @__PURE__ */ s.jsx(ie.Body, { className: "p-0", children: /* @__PURE__ */ s.jsx(ko, { onEmployeeSelected: n }) })
|
|
2610
2610
|
] });
|
|
2611
2611
|
}, _o = ({ hookFormProps: e, inputProps: t }) => {
|
|
2612
|
-
const { register: n, formState: r, setValue: o } = e, { formField: a, label: i, resetsFields: c, type:
|
|
2613
|
-
return
|
|
2614
|
-
const
|
|
2612
|
+
const { register: n, formState: r, setValue: o } = e, { formField: a, label: i, resetsFields: c, type: u } = t, [l, h] = I(void 0);
|
|
2613
|
+
return W(() => {
|
|
2614
|
+
const d = a.split(".");
|
|
2615
2615
|
let f = r.errors;
|
|
2616
|
-
|
|
2616
|
+
d.forEach((m) => {
|
|
2617
2617
|
f !== void 0 && (f = f[m]);
|
|
2618
2618
|
}), h(f);
|
|
2619
2619
|
}, [r, a]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2620
|
-
/* @__PURE__ */ s.jsx(q.Check, { id: `check-${a}`, type:
|
|
2620
|
+
/* @__PURE__ */ s.jsx(q.Check, { id: `check-${a}`, type: u ?? "checkbox", label: i, ...n(a, {
|
|
2621
2621
|
onChange: () => {
|
|
2622
|
-
c && c.forEach((
|
|
2622
|
+
c && c.forEach((d) => o(d, null));
|
|
2623
2623
|
}
|
|
2624
|
-
}), isInvalid:
|
|
2625
|
-
|
|
2624
|
+
}), isInvalid: l !== void 0, hidden: t.hidden, disabled: t.disabled }),
|
|
2625
|
+
l && /* @__PURE__ */ s.jsx("div", { className: "invalid-feedback d-block", children: l.message })
|
|
2626
2626
|
] });
|
|
2627
2627
|
}, Go = ({ hookFormProps: e, inputProps: t }) => {
|
|
2628
|
-
const { register: n, formState: r, getValues: o, setValue: a, watch: i } = e, { formField: c, options:
|
|
2629
|
-
return
|
|
2628
|
+
const { register: n, formState: r, getValues: o, setValue: a, watch: i } = e, { formField: c, options: u, resetsFields: l } = t, [h, d] = I(void 0);
|
|
2629
|
+
return W(() => {
|
|
2630
2630
|
const f = c.split(".");
|
|
2631
2631
|
let m = r.errors;
|
|
2632
2632
|
f.forEach((w) => {
|
|
2633
2633
|
m !== void 0 && (m = m[w]);
|
|
2634
|
-
}),
|
|
2635
|
-
}, [r, c]),
|
|
2634
|
+
}), d(m);
|
|
2635
|
+
}, [r, c]), W(() => {
|
|
2636
2636
|
a(c, o(c));
|
|
2637
|
-
}, [
|
|
2638
|
-
|
|
2637
|
+
}, [u, c, o, a]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2638
|
+
u.map((f) => /* @__PURE__ */ s.jsx(q.Check, { id: `radio-${f.id}`, label: f.name, type: "radio", value: f.id ?? "", checked: i(c) === f.id, ...n(c, {
|
|
2639
2639
|
onChange: () => {
|
|
2640
|
-
|
|
2640
|
+
l && l.forEach((m) => a(m, null));
|
|
2641
2641
|
}
|
|
2642
|
-
}), isInvalid: h !== void 0 }, f.id)),
|
|
2642
|
+
}), isInvalid: h !== void 0, hidden: t.hidden, disabled: t.disabled }, f.id)),
|
|
2643
2643
|
h && /* @__PURE__ */ s.jsx("div", { className: "invalid-feedback d-block", children: h.message })
|
|
2644
2644
|
] });
|
|
2645
2645
|
}, Qo = ({ hookFormProps: e, inputProps: t }) => {
|
|
2646
|
-
const { register: n, formState: r, getValues: o, setValue: a, watch: i } = e, { formField: c, label:
|
|
2646
|
+
const { register: n, formState: r, getValues: o, setValue: a, watch: i } = e, { formField: c, label: u, resetsFields: l, options: h, isNumber: d, size: f, showClearIcon: m, clearValue: w } = t, [y, b] = I(void 0), j = $(() => {
|
|
2647
2647
|
const g = w ?? null;
|
|
2648
|
-
|
|
2649
|
-
}, [w,
|
|
2650
|
-
return
|
|
2648
|
+
d ? a(c, g ? Number(g) : null) : a(c, (g == null ? void 0 : g.toString()) ?? "");
|
|
2649
|
+
}, [w, d, a, c]);
|
|
2650
|
+
return W(() => {
|
|
2651
2651
|
const g = c.split(".");
|
|
2652
2652
|
let p = r.errors;
|
|
2653
2653
|
g.forEach((C) => {
|
|
2654
2654
|
p !== void 0 && (p = p[C]);
|
|
2655
2655
|
}), b(p);
|
|
2656
|
-
}, [r, c]),
|
|
2656
|
+
}, [r, c]), W(() => {
|
|
2657
2657
|
a(c, o(c));
|
|
2658
2658
|
}, [h, c, o, a]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2659
|
-
/* @__PURE__ */ s.jsxs(te, { label:
|
|
2659
|
+
/* @__PURE__ */ s.jsxs(te, { label: u, hidden: t.hidden, children: [
|
|
2660
2660
|
/* @__PURE__ */ s.jsxs(q.Select, { size: f, ...n(c, {
|
|
2661
|
-
setValueAs: (g) =>
|
|
2661
|
+
setValueAs: (g) => d ? g ? parseInt(g, 10) : null : g == null || g === "" ? null : g,
|
|
2662
2662
|
onChange: () => {
|
|
2663
|
-
|
|
2663
|
+
l && l.forEach((g) => a(g, null));
|
|
2664
2664
|
}
|
|
2665
|
-
}), isInvalid: y !== void 0, children: [
|
|
2665
|
+
}), isInvalid: y !== void 0, hidden: t.hidden, disabled: t.disabled, children: [
|
|
2666
2666
|
/* @__PURE__ */ s.jsx("option", { value: "" }),
|
|
2667
2667
|
h.sort((g, p) => (g.name ?? "").localeCompare(p.name ?? "")).map((g) => /* @__PURE__ */ s.jsx("option", { value: g.id ?? "", children: g.name }, g.id))
|
|
2668
2668
|
] }),
|
|
@@ -2671,31 +2671,31 @@ const qo = ({ label: e, value: t, onChange: n, disabled: r, className: o, type:
|
|
|
2671
2671
|
y && /* @__PURE__ */ s.jsx("div", { className: "invalid-feedback d-block", children: y.message })
|
|
2672
2672
|
] });
|
|
2673
2673
|
}, Xo = ({ hookFormProps: e, inputProps: t }) => {
|
|
2674
|
-
const { register: n, formState: r, setValue: o, watch: a } = e, { formField: i, label: c, resetsFields:
|
|
2675
|
-
const b =
|
|
2674
|
+
const { register: n, formState: r, setValue: o, watch: a } = e, { formField: i, label: c, resetsFields: u, size: l, showClearIcon: h, clearValue: d } = t, [f, m] = I(void 0), w = $(() => {
|
|
2675
|
+
const b = d ?? null;
|
|
2676
2676
|
o(i, (b == null ? void 0 : b.toString()) ?? "");
|
|
2677
|
-
}, [
|
|
2677
|
+
}, [d, o, i]), y = $(() => {
|
|
2678
2678
|
const b = i.split(".");
|
|
2679
2679
|
let j = r.errors;
|
|
2680
2680
|
b.forEach((g) => {
|
|
2681
2681
|
j !== void 0 && (j = j[g]);
|
|
2682
2682
|
}), m(j);
|
|
2683
2683
|
}, [r, i]);
|
|
2684
|
-
return
|
|
2684
|
+
return W(() => {
|
|
2685
2685
|
y();
|
|
2686
2686
|
}, [y]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2687
|
-
/* @__PURE__ */ s.jsxs(te, { label: c, children: [
|
|
2688
|
-
/* @__PURE__ */ s.jsx(q.Control, { as: "textarea", size:
|
|
2687
|
+
/* @__PURE__ */ s.jsxs(te, { label: c, hidden: t.hidden, children: [
|
|
2688
|
+
/* @__PURE__ */ s.jsx(q.Control, { as: "textarea", size: l, ...n(i, {
|
|
2689
2689
|
onChange: () => {
|
|
2690
|
-
|
|
2690
|
+
u && u.forEach((b) => o(b, null));
|
|
2691
2691
|
}
|
|
2692
|
-
}), isInvalid: f !== void 0 }),
|
|
2692
|
+
}), isInvalid: f !== void 0, hidden: t.hidden, disabled: t.disabled }),
|
|
2693
2693
|
h && a(i) && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: w, children: /* @__PURE__ */ s.jsx(z, {}) }) })
|
|
2694
2694
|
] }),
|
|
2695
2695
|
f && /* @__PURE__ */ s.jsx("div", { className: "invalid-feedback d-block", children: f.message })
|
|
2696
2696
|
] });
|
|
2697
2697
|
}, Ko = ({ hookFormProps: e, inputProps: t }) => {
|
|
2698
|
-
const { register: n, formState: r, setValue: o, watch: a } = e, { type: i, formField: c, label:
|
|
2698
|
+
const { register: n, formState: r, setValue: o, watch: a } = e, { type: i, formField: c, label: u, placeholder: l, size: h, resetsFields: d, showClearIcon: f, clearValue: m } = t, [w, y] = I(void 0), b = $(() => {
|
|
2699
2699
|
const g = m ?? null;
|
|
2700
2700
|
i === "number" ? o(c, g ? Number(g) : null) : o(c, (g == null ? void 0 : g.toString()) ?? "");
|
|
2701
2701
|
}, [m, i, o, c]), j = $(() => {
|
|
@@ -2705,22 +2705,22 @@ const qo = ({ label: e, value: t, onChange: n, disabled: r, className: o, type:
|
|
|
2705
2705
|
p !== void 0 && (p = p[C]);
|
|
2706
2706
|
}), y(p);
|
|
2707
2707
|
}, [r, c]);
|
|
2708
|
-
return
|
|
2708
|
+
return W(() => {
|
|
2709
2709
|
j();
|
|
2710
2710
|
}, [j]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2711
|
-
/* @__PURE__ */ s.jsxs(te, { label:
|
|
2712
|
-
/* @__PURE__ */ s.jsx(q.Control, { type: i, placeholder:
|
|
2711
|
+
/* @__PURE__ */ s.jsxs(te, { label: u, hidden: t.hidden, children: [
|
|
2712
|
+
/* @__PURE__ */ s.jsx(q.Control, { type: i, placeholder: l ?? u, size: h, ...n(c, {
|
|
2713
2713
|
setValueAs: (g) => i === "number" ? g ? parseInt(g, 10) : null : g == null || g === "" ? null : g,
|
|
2714
2714
|
onChange: () => {
|
|
2715
|
-
|
|
2715
|
+
d && d.forEach((g) => o(g, null));
|
|
2716
2716
|
}
|
|
2717
|
-
}), isInvalid: w !== void 0 }),
|
|
2717
|
+
}), isInvalid: w !== void 0, hidden: t.hidden, disabled: t.disabled }),
|
|
2718
2718
|
f && a(c) && /* @__PURE__ */ s.jsx("div", { className: `luminus-input-remove-icon ${i !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: b, children: /* @__PURE__ */ s.jsx(z, {}) }) })
|
|
2719
2719
|
] }),
|
|
2720
2720
|
w && /* @__PURE__ */ s.jsx("div", { className: "invalid-feedback d-block", children: w.message })
|
|
2721
2721
|
] });
|
|
2722
2722
|
}, Uo = ({ hookFormProps: e, inputProps: t }) => {
|
|
2723
|
-
const { register: n, formState: r, setValue: o, watch: a } = e, { formField: i, label: c, size:
|
|
2723
|
+
const { register: n, formState: r, setValue: o, watch: a } = e, { formField: i, label: c, size: u, defaultSelection: l, resetsFields: h } = t, [d, f] = I(l), [m, w] = I(void 0), [y, b] = I(!1), j = $(() => {
|
|
2724
2724
|
const p = i.split(".");
|
|
2725
2725
|
let C = r.errors;
|
|
2726
2726
|
p.forEach((F) => {
|
|
@@ -2729,15 +2729,15 @@ const qo = ({ label: e, value: t, onChange: n, disabled: r, className: o, type:
|
|
|
2729
2729
|
}, [r, i]), g = $((p) => {
|
|
2730
2730
|
f(p ? { id: p.id, name: p.fullName } : null);
|
|
2731
2731
|
}, []);
|
|
2732
|
-
return
|
|
2733
|
-
f(
|
|
2734
|
-
}, [
|
|
2735
|
-
o(i, (
|
|
2736
|
-
}, [
|
|
2732
|
+
return W(() => {
|
|
2733
|
+
f(l);
|
|
2734
|
+
}, [l]), W(() => {
|
|
2735
|
+
o(i, (d == null ? void 0 : d.id) ?? null, { shouldDirty: !0, shouldValidate: !0 });
|
|
2736
|
+
}, [d, i, o]), W(() => {
|
|
2737
2737
|
j();
|
|
2738
2738
|
}, [j]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2739
|
-
/* @__PURE__ */ s.jsxs(te, { label: c, children: [
|
|
2740
|
-
/* @__PURE__ */ s.jsxs(q.Select, { size:
|
|
2739
|
+
/* @__PURE__ */ s.jsxs(te, { label: c, hidden: t.hidden, children: [
|
|
2740
|
+
/* @__PURE__ */ s.jsxs(q.Select, { size: u, style: { minWidth: "200px" }, onMouseDown: (p) => {
|
|
2741
2741
|
p.currentTarget.focus(), p.preventDefault();
|
|
2742
2742
|
}, onClick: () => {
|
|
2743
2743
|
b(!0);
|
|
@@ -2746,10 +2746,10 @@ const qo = ({ label: e, value: t, onChange: n, disabled: r, className: o, type:
|
|
|
2746
2746
|
onChange: () => {
|
|
2747
2747
|
h && h.forEach((p) => o(p, null));
|
|
2748
2748
|
}
|
|
2749
|
-
}), isInvalid: m !== void 0, children: [
|
|
2749
|
+
}), isInvalid: m !== void 0, hidden: t.hidden, disabled: t.disabled, children: [
|
|
2750
2750
|
/* @__PURE__ */ s.jsx("option", { value: "" }),
|
|
2751
|
-
|
|
2752
|
-
|
|
2751
|
+
l && /* @__PURE__ */ s.jsx("option", { value: l.id, children: l.name }),
|
|
2752
|
+
d && /* @__PURE__ */ s.jsx("option", { value: d.id, children: d.name })
|
|
2753
2753
|
] }),
|
|
2754
2754
|
a(i) && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: () => g(null), children: /* @__PURE__ */ s.jsx(z, {}) }) })
|
|
2755
2755
|
] }),
|