react-luminus-components 1.2.97 → 1.2.98
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/main.cjs.js +1 -1
- package/dist/main.es.js +131 -131
- package/package.json +1 -1
package/dist/main.es.js
CHANGED
|
@@ -1195,8 +1195,8 @@ function no(n, e, t) {
|
|
|
1195
1195
|
}
|
|
1196
1196
|
const ro = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, so = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, oo = /^'([^]*?)'?$/, ao = /''/g, io = /[a-zA-Z]/;
|
|
1197
1197
|
function st(n, e, t) {
|
|
1198
|
-
var d, h, p, g,
|
|
1199
|
-
const r = Ge(), s = (t == null ? void 0 : t.locale) ?? r.locale ?? Hs, a = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((h = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((g = (p = r.locale) == null ? void 0 : p.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, i = (t == null ? void 0 : t.weekStartsOn) ?? ((x = (
|
|
1198
|
+
var d, h, p, g, j, x, m, k;
|
|
1199
|
+
const r = Ge(), s = (t == null ? void 0 : t.locale) ?? r.locale ?? Hs, a = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((h = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((g = (p = r.locale) == null ? void 0 : p.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, i = (t == null ? void 0 : t.weekStartsOn) ?? ((x = (j = t == null ? void 0 : t.locale) == null ? void 0 : j.options) == null ? void 0 : x.weekStartsOn) ?? r.weekStartsOn ?? ((k = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : k.weekStartsOn) ?? 0, l = Z(n);
|
|
1200
1200
|
if (!ls(l))
|
|
1201
1201
|
throw new RangeError("Invalid time value");
|
|
1202
1202
|
let c = e.match(so).map((b) => {
|
|
@@ -1303,7 +1303,7 @@ const po = {
|
|
|
1303
1303
|
unmountOnExit: h = !1,
|
|
1304
1304
|
appear: p = !1,
|
|
1305
1305
|
getDimensionValue: g = fo,
|
|
1306
|
-
...
|
|
1306
|
+
...j
|
|
1307
1307
|
}, x) => {
|
|
1308
1308
|
const m = typeof l == "function" ? l() : l, k = Q(() => $e((v) => {
|
|
1309
1309
|
v.style[m] = "0";
|
|
@@ -1314,19 +1314,19 @@ const po = {
|
|
|
1314
1314
|
v.style[m] = null;
|
|
1315
1315
|
}, t), [m, t]), N = Q(() => $e((v) => {
|
|
1316
1316
|
v.style[m] = `${g(m, v)}px`, xr(v);
|
|
1317
|
-
}, r), [r, g, m]),
|
|
1317
|
+
}, r), [r, g, m]), _ = Q(() => $e((v) => {
|
|
1318
1318
|
v.style[m] = null;
|
|
1319
1319
|
}, s), [m, s]);
|
|
1320
1320
|
return /* @__PURE__ */ o.jsx(dr, {
|
|
1321
1321
|
ref: x,
|
|
1322
1322
|
addEndListener: hr,
|
|
1323
|
-
...
|
|
1324
|
-
"aria-expanded":
|
|
1323
|
+
...j,
|
|
1324
|
+
"aria-expanded": j.role ? c : null,
|
|
1325
1325
|
onEnter: k,
|
|
1326
1326
|
onEntering: b,
|
|
1327
1327
|
onEntered: f,
|
|
1328
1328
|
onExit: N,
|
|
1329
|
-
onExiting:
|
|
1329
|
+
onExiting: _,
|
|
1330
1330
|
childRef: i.ref,
|
|
1331
1331
|
in: c,
|
|
1332
1332
|
timeout: u,
|
|
@@ -1487,7 +1487,7 @@ const jn = /* @__PURE__ */ A.forwardRef((n, e) => {
|
|
|
1487
1487
|
...p
|
|
1488
1488
|
} = Qt(n, {
|
|
1489
1489
|
show: "onClose"
|
|
1490
|
-
}), g = G(t, "alert"),
|
|
1490
|
+
}), g = G(t, "alert"), j = me((k) => {
|
|
1491
1491
|
u && u(!1, k);
|
|
1492
1492
|
}), x = h === !0 ? kt : h, m = /* @__PURE__ */ o.jsxs("div", {
|
|
1493
1493
|
role: "alert",
|
|
@@ -1495,7 +1495,7 @@ const jn = /* @__PURE__ */ A.forwardRef((n, e) => {
|
|
|
1495
1495
|
ref: e,
|
|
1496
1496
|
className: w(i, g, c && `${g}-${c}`, d && `${g}-dismissible`),
|
|
1497
1497
|
children: [d && /* @__PURE__ */ o.jsx(Qr, {
|
|
1498
|
-
onClick:
|
|
1498
|
+
onClick: j,
|
|
1499
1499
|
"aria-label": s,
|
|
1500
1500
|
variant: a
|
|
1501
1501
|
}), l]
|
|
@@ -1623,7 +1623,7 @@ function Cn(n = {}) {
|
|
|
1623
1623
|
usePopper: p = !!e
|
|
1624
1624
|
} = n, g = (e == null ? void 0 : e.show) == null ? !!n.show : e.show;
|
|
1625
1625
|
g && !s.current && (s.current = !0);
|
|
1626
|
-
const
|
|
1626
|
+
const j = (v) => {
|
|
1627
1627
|
e == null || e.toggle(!1, v);
|
|
1628
1628
|
}, {
|
|
1629
1629
|
placement: x,
|
|
@@ -1644,7 +1644,7 @@ function Cn(n = {}) {
|
|
|
1644
1644
|
"aria-labelledby": b == null ? void 0 : b.id
|
|
1645
1645
|
}, f.attributes.popper, {
|
|
1646
1646
|
style: f.styles.popper
|
|
1647
|
-
}),
|
|
1647
|
+
}), _ = {
|
|
1648
1648
|
show: g,
|
|
1649
1649
|
placement: x,
|
|
1650
1650
|
hasShown: s.current,
|
|
@@ -1656,10 +1656,10 @@ function Cn(n = {}) {
|
|
|
1656
1656
|
style: f.styles.arrow
|
|
1657
1657
|
}) : {}
|
|
1658
1658
|
};
|
|
1659
|
-
return jr(k,
|
|
1659
|
+
return jr(k, j, {
|
|
1660
1660
|
clickTrigger: l,
|
|
1661
1661
|
disabled: !g
|
|
1662
|
-
}), [N,
|
|
1662
|
+
}), [N, _];
|
|
1663
1663
|
}
|
|
1664
1664
|
function $n(n) {
|
|
1665
1665
|
let {
|
|
@@ -1820,22 +1820,22 @@ function De({
|
|
|
1820
1820
|
placement: i = "bottom-start",
|
|
1821
1821
|
children: l
|
|
1822
1822
|
}) {
|
|
1823
|
-
const c = kr(), [u, d] = Co(e, n, r), [h, p] = Wt(), g = h.current, [
|
|
1823
|
+
const c = kr(), [u, d] = Co(e, n, r), [h, p] = Wt(), g = h.current, [j, x] = Wt(), m = j.current, k = Xr(u), b = Y(null), f = Y(!1), N = L(ot), _ = T((y, S, F = S == null ? void 0 : S.type) => {
|
|
1824
1824
|
d(y, {
|
|
1825
1825
|
originalEvent: S,
|
|
1826
1826
|
source: F
|
|
1827
1827
|
});
|
|
1828
1828
|
}, [d]), v = me((y, S) => {
|
|
1829
|
-
t == null || t(y, S),
|
|
1829
|
+
t == null || t(y, S), _(!1, S, "select"), S.isPropagationStopped() || N == null || N(y, S);
|
|
1830
1830
|
}), $ = Q(() => ({
|
|
1831
|
-
toggle:
|
|
1831
|
+
toggle: _,
|
|
1832
1832
|
placement: i,
|
|
1833
1833
|
show: u,
|
|
1834
1834
|
menuElement: g,
|
|
1835
1835
|
toggleElement: m,
|
|
1836
1836
|
setMenu: p,
|
|
1837
1837
|
setToggle: x
|
|
1838
|
-
}), [
|
|
1838
|
+
}), [_, i, u, g, m, p, x]);
|
|
1839
1839
|
g && k && !u && (f.current = g.contains(g.ownerDocument.activeElement));
|
|
1840
1840
|
const P = me(() => {
|
|
1841
1841
|
m && m.focus && m.focus();
|
|
@@ -1863,7 +1863,7 @@ function De({
|
|
|
1863
1863
|
var S, F;
|
|
1864
1864
|
const {
|
|
1865
1865
|
key: W
|
|
1866
|
-
} = y, H = y.target, R = (S = h.current) == null ? void 0 : S.contains(H), V = (F =
|
|
1866
|
+
} = y, H = y.target, R = (S = h.current) == null ? void 0 : S.contains(H), V = (F = j.current) == null ? void 0 : F.contains(H);
|
|
1867
1867
|
if (/input|textarea/i.test(H.tagName) && (W === " " || W !== "Escape" && R || W === "Escape" && H.type === "search") || !R && !V || W === "Tab" && (!h.current || !u))
|
|
1868
1868
|
return;
|
|
1869
1869
|
b.current = y.type;
|
|
@@ -2005,7 +2005,7 @@ const Yn = /* @__PURE__ */ A.forwardRef(({
|
|
|
2005
2005
|
...d
|
|
2006
2006
|
}, h) => {
|
|
2007
2007
|
let p = !1;
|
|
2008
|
-
const g = L(Rn),
|
|
2008
|
+
const g = L(Rn), j = G(n, "dropdown-menu"), {
|
|
2009
2009
|
align: x,
|
|
2010
2010
|
drop: m,
|
|
2011
2011
|
isRTL: k
|
|
@@ -2017,11 +2017,11 @@ const Yn = /* @__PURE__ */ A.forwardRef(({
|
|
|
2017
2017
|
const y = Object.keys(t);
|
|
2018
2018
|
if (process.env.NODE_ENV !== "production" && Xt(y.length === 1, "There should only be 1 breakpoint when passing an object to `align`"), y.length) {
|
|
2019
2019
|
const S = y[0], F = t[S];
|
|
2020
|
-
p = F === "start", f.push(`${
|
|
2020
|
+
p = F === "start", f.push(`${j}-${S}-${F}`);
|
|
2021
2021
|
}
|
|
2022
2022
|
} else
|
|
2023
2023
|
t === "end" && (p = !0);
|
|
2024
|
-
const N = qn(p, m, k), [
|
|
2024
|
+
const N = qn(p, m, k), [_, {
|
|
2025
2025
|
hasShown: v,
|
|
2026
2026
|
popper: $,
|
|
2027
2027
|
show: P,
|
|
@@ -2035,23 +2035,23 @@ const Yn = /* @__PURE__ */ A.forwardRef(({
|
|
|
2035
2035
|
popperConfig: c,
|
|
2036
2036
|
placement: N
|
|
2037
2037
|
});
|
|
2038
|
-
if (
|
|
2038
|
+
if (_.ref = lt(Ln(h, "DropdownMenu"), _.ref), Cr(() => {
|
|
2039
2039
|
P && ($ == null || $.update());
|
|
2040
2040
|
}, [P]), !v && !i && !b)
|
|
2041
2041
|
return null;
|
|
2042
|
-
typeof l != "string" && (
|
|
2042
|
+
typeof l != "string" && (_.show = P, _.close = () => I == null ? void 0 : I(!1), _.align = t);
|
|
2043
2043
|
let C = d.style;
|
|
2044
2044
|
return $ != null && $.placement && (C = {
|
|
2045
2045
|
...d.style,
|
|
2046
|
-
...
|
|
2046
|
+
..._.style
|
|
2047
2047
|
}, d["x-placement"] = $.placement), /* @__PURE__ */ o.jsx(l, {
|
|
2048
2048
|
...d,
|
|
2049
|
-
...
|
|
2049
|
+
..._,
|
|
2050
2050
|
style: C,
|
|
2051
2051
|
...(f.length || g) && {
|
|
2052
2052
|
"data-bs-popper": "static"
|
|
2053
2053
|
},
|
|
2054
|
-
className: w(e,
|
|
2054
|
+
className: w(e, j, P && "show", p && `${j}-end`, u && `${j}-${u}`, ...f)
|
|
2055
2055
|
});
|
|
2056
2056
|
});
|
|
2057
2057
|
Yn.displayName = "DropdownMenu";
|
|
@@ -2091,10 +2091,10 @@ const Bn = /* @__PURE__ */ A.forwardRef((n, e) => {
|
|
|
2091
2091
|
...g
|
|
2092
2092
|
} = Qt(n, {
|
|
2093
2093
|
show: "onToggle"
|
|
2094
|
-
}),
|
|
2094
|
+
}), j = L(Ue), x = G(t, "dropdown"), m = $r(), k = ($) => p === !1 ? $ === "click" : p === "inside" ? $ !== "rootClose" : p === "outside" ? $ !== "select" : !0, b = me(($, P) => {
|
|
2095
2095
|
var I, C;
|
|
2096
2096
|
!((I = P.originalEvent) == null || (C = I.target) == null) && C.classList.contains("dropdown-toggle") && P.source === "mousedown" || (P.originalEvent.currentTarget === document && (P.source !== "keydown" || P.originalEvent.key === "Escape") && (P.source = "rootClose"), k(P.source) && (c == null || c($, P)));
|
|
2097
|
-
}), N = qn(i === "end", r, m),
|
|
2097
|
+
}), N = qn(i === "end", r, m), _ = Q(() => ({
|
|
2098
2098
|
align: i,
|
|
2099
2099
|
drop: r,
|
|
2100
2100
|
isRTL: m
|
|
@@ -2107,7 +2107,7 @@ const Bn = /* @__PURE__ */ A.forwardRef((n, e) => {
|
|
|
2107
2107
|
start: "dropstart"
|
|
2108
2108
|
};
|
|
2109
2109
|
return /* @__PURE__ */ o.jsx(xt.Provider, {
|
|
2110
|
-
value:
|
|
2110
|
+
value: _,
|
|
2111
2111
|
children: /* @__PURE__ */ o.jsx(De, {
|
|
2112
2112
|
placement: N,
|
|
2113
2113
|
show: s,
|
|
@@ -2115,7 +2115,7 @@ const Bn = /* @__PURE__ */ A.forwardRef((n, e) => {
|
|
|
2115
2115
|
onToggle: b,
|
|
2116
2116
|
focusFirstItemOnShow: u,
|
|
2117
2117
|
itemSelector: `.${x}-item:not(.disabled):not(:disabled)`,
|
|
2118
|
-
children:
|
|
2118
|
+
children: j ? g.children : /* @__PURE__ */ o.jsx(d, {
|
|
2119
2119
|
...g,
|
|
2120
2120
|
ref: e,
|
|
2121
2121
|
className: w(a, s && "show", v[r])
|
|
@@ -2186,7 +2186,7 @@ const Vn = /* @__PURE__ */ A.forwardRef(({
|
|
|
2186
2186
|
className: h,
|
|
2187
2187
|
style: p,
|
|
2188
2188
|
title: g = "",
|
|
2189
|
-
type:
|
|
2189
|
+
type: j = "checkbox",
|
|
2190
2190
|
label: x,
|
|
2191
2191
|
children: m,
|
|
2192
2192
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
@@ -2196,11 +2196,11 @@ const Vn = /* @__PURE__ */ A.forwardRef(({
|
|
|
2196
2196
|
e = G(e, "form-check"), t = G(t, "form-switch");
|
|
2197
2197
|
const {
|
|
2198
2198
|
controlId: N
|
|
2199
|
-
} = L(be),
|
|
2199
|
+
} = L(be), _ = Q(() => ({
|
|
2200
2200
|
controlId: n || N
|
|
2201
2201
|
}), [N, n]), v = !m && x != null && x !== !1 || ko(m, Be), $ = /* @__PURE__ */ o.jsx(Oe, {
|
|
2202
2202
|
...b,
|
|
2203
|
-
type:
|
|
2203
|
+
type: j === "switch" ? "checkbox" : j,
|
|
2204
2204
|
ref: f,
|
|
2205
2205
|
isValid: i,
|
|
2206
2206
|
isInvalid: l,
|
|
@@ -2208,10 +2208,10 @@ const Vn = /* @__PURE__ */ A.forwardRef(({
|
|
|
2208
2208
|
as: k
|
|
2209
2209
|
});
|
|
2210
2210
|
return /* @__PURE__ */ o.jsx(be.Provider, {
|
|
2211
|
-
value:
|
|
2211
|
+
value: _,
|
|
2212
2212
|
children: /* @__PURE__ */ o.jsx("div", {
|
|
2213
2213
|
style: p,
|
|
2214
|
-
className: w(h, v && e, r && `${e}-inline`, s && `${e}-reverse`,
|
|
2214
|
+
className: w(h, v && e, r && `${e}-inline`, s && `${e}-reverse`, j === "switch" && t),
|
|
2215
2215
|
children: m || /* @__PURE__ */ o.jsxs(o.Fragment, {
|
|
2216
2216
|
children: [$, v && /* @__PURE__ */ o.jsx(Be, {
|
|
2217
2217
|
title: g,
|
|
@@ -2737,7 +2737,7 @@ function Ra(n, e, t) {
|
|
|
2737
2737
|
return;
|
|
2738
2738
|
}
|
|
2739
2739
|
}, [u, c]);
|
|
2740
|
-
const
|
|
2740
|
+
const j = T(async (m, k) => {
|
|
2741
2741
|
const b = m || n, f = k || e;
|
|
2742
2742
|
switch (b) {
|
|
2743
2743
|
case qe.Popup:
|
|
@@ -2759,15 +2759,15 @@ function Ra(n, e, t) {
|
|
|
2759
2759
|
scopes: e.scopes || Ct
|
|
2760
2760
|
}) : (a.trace("useMsalAuthentication - acquireToken - No request object provided, using default request."), f = {
|
|
2761
2761
|
scopes: Ct
|
|
2762
|
-
}), !f.account && l && (a.trace("useMsalAuthentication - acquireToken - Attaching account to request"), f.account = l), (async () => (a.verbose("useMsalAuthentication - Calling acquireTokenSilent"), r.acquireTokenSilent(f).catch(async (
|
|
2763
|
-
if (
|
|
2762
|
+
}), !f.account && l && (a.trace("useMsalAuthentication - acquireToken - Attaching account to request"), f.account = l), (async () => (a.verbose("useMsalAuthentication - Calling acquireTokenSilent"), r.acquireTokenSilent(f).catch(async (_) => {
|
|
2763
|
+
if (_ instanceof bt) {
|
|
2764
2764
|
if (p.current)
|
|
2765
2765
|
throw a.error("useMsalAuthentication - Interaction required but is already in progress. Please try again, if needed, after interaction completes."), je.createUnableToFallbackToInteractionError();
|
|
2766
|
-
return a.error("useMsalAuthentication - Interaction required, falling back to interaction"),
|
|
2766
|
+
return a.error("useMsalAuthentication - Interaction required, falling back to interaction"), j(b, f);
|
|
2767
2767
|
}
|
|
2768
|
-
throw
|
|
2769
|
-
})))().then((
|
|
2770
|
-
throw h.current && d([null,
|
|
2768
|
+
throw _;
|
|
2769
|
+
})))().then((_) => (h.current && d([_, null]), _)).catch((_) => {
|
|
2770
|
+
throw h.current && d([null, _]), _;
|
|
2771
2771
|
});
|
|
2772
2772
|
}, [
|
|
2773
2773
|
r,
|
|
@@ -2775,7 +2775,7 @@ function Ra(n, e, t) {
|
|
|
2775
2775
|
e,
|
|
2776
2776
|
a,
|
|
2777
2777
|
l,
|
|
2778
|
-
|
|
2778
|
+
j
|
|
2779
2779
|
]);
|
|
2780
2780
|
return D(() => {
|
|
2781
2781
|
const m = r.addEventCallback((k) => {
|
|
@@ -2798,10 +2798,10 @@ function Ra(n, e, t) {
|
|
|
2798
2798
|
};
|
|
2799
2799
|
}, [r, a]), D(() => {
|
|
2800
2800
|
g.current && s === Ie.None && (g.current = !1, i ? l && (a.info("useMsalAuthentication - User is authenticated, attempting to acquire token"), x().catch(() => {
|
|
2801
|
-
})) : (a.info("useMsalAuthentication - No user is authenticated, attempting to login"),
|
|
2801
|
+
})) : (a.info("useMsalAuthentication - No user is authenticated, attempting to login"), j().catch(() => {
|
|
2802
2802
|
})));
|
|
2803
|
-
}, [i, l, s,
|
|
2804
|
-
login:
|
|
2803
|
+
}, [i, l, s, j, x, a]), {
|
|
2804
|
+
login: j,
|
|
2805
2805
|
acquireToken: x,
|
|
2806
2806
|
result: c,
|
|
2807
2807
|
error: u
|
|
@@ -2987,25 +2987,25 @@ const ci = (n) => (t) => {
|
|
|
2987
2987
|
}, el = ({ availableWidgets: n, editMode: e, defaultDashboardConfig: t }) => {
|
|
2988
2988
|
var d;
|
|
2989
2989
|
const { homeDashboardTexts: r } = L(se), { dashboardConfig: s, onChangeDashboardConfig: a } = Ja(t), i = T((h, p) => {
|
|
2990
|
-
var g,
|
|
2990
|
+
var g, j;
|
|
2991
2991
|
h === ((g = s.widgets) == null ? void 0 : g.length) ? a({
|
|
2992
2992
|
...s,
|
|
2993
2993
|
widgets: [...s.widgets, { widgetId: p, fullWidth: !1 }]
|
|
2994
2994
|
}) : a({
|
|
2995
2995
|
...s,
|
|
2996
|
-
widgets: ((
|
|
2996
|
+
widgets: ((j = s.widgets) == null ? void 0 : j.map((x, m) => m === h ? { widgetId: p, fullWidth: !1 } : x)) ?? []
|
|
2997
2997
|
});
|
|
2998
2998
|
}, [s, a]), l = T((h) => {
|
|
2999
2999
|
var p, g;
|
|
3000
3000
|
((p = s.widgets[h]) == null ? void 0 : p.widgetId) === -1 ? a({
|
|
3001
3001
|
...s,
|
|
3002
|
-
widgets: ((g = s.widgets) == null ? void 0 : g.filter((
|
|
3002
|
+
widgets: ((g = s.widgets) == null ? void 0 : g.filter((j, x) => x !== h)) ?? []
|
|
3003
3003
|
}) : i(h, -1);
|
|
3004
3004
|
}, [s, a, i]), c = T((h) => {
|
|
3005
3005
|
var p;
|
|
3006
3006
|
a({
|
|
3007
3007
|
...s,
|
|
3008
|
-
widgets: ((p = s.widgets) == null ? void 0 : p.map((g,
|
|
3008
|
+
widgets: ((p = s.widgets) == null ? void 0 : p.map((g, j) => j === h ? { ...g, fullWidth: !g.fullWidth } : g)) ?? []
|
|
3009
3009
|
});
|
|
3010
3010
|
}, [s, a]), u = T((h, p, g) => h ? /* @__PURE__ */ o.jsxs("div", { className: w(ie.widgetWrapper, {
|
|
3011
3011
|
[ie.widgetEdit]: e && h.id !== -1
|
|
@@ -3014,7 +3014,7 @@ const ci = (n) => (t) => {
|
|
|
3014
3014
|
/* @__PURE__ */ o.jsx(U, { color: "danger", onClick: () => l(p), className: w(ie.removeIcon), children: /* @__PURE__ */ o.jsx(en, {}) }),
|
|
3015
3015
|
/* @__PURE__ */ o.jsx(U, { color: g ? "danger" : "primary", onClick: () => c(p), className: w(ie.fullWidthIcon), children: /* @__PURE__ */ o.jsx(Mr, {}) })
|
|
3016
3016
|
] }),
|
|
3017
|
-
h.id === -1 ? e && /* @__PURE__ */ o.jsx("div", { className: ie.widgetWrapper, children: /* @__PURE__ */ o.jsx(Yt, { availableWidgets: n, onAdd: (
|
|
3017
|
+
h.id === -1 ? e && /* @__PURE__ */ o.jsx("div", { className: ie.widgetWrapper, children: /* @__PURE__ */ o.jsx(Yt, { availableWidgets: n, onAdd: (j) => i(p, j), texts: r }) }) : /* @__PURE__ */ o.jsx(hi, { title: h.title, children: /* @__PURE__ */ o.jsx(h.WidgetElement, { title: h.title }) }),
|
|
3018
3018
|
h.id > -1 && e && /* @__PURE__ */ o.jsx("div", { className: ie.widgetEditOverlay })
|
|
3019
3019
|
] }, p) : /* @__PURE__ */ o.jsx(o.Fragment, {}), [
|
|
3020
3020
|
e,
|
|
@@ -3069,7 +3069,7 @@ function bi(n, e, t) {
|
|
|
3069
3069
|
if (typeof n != "function")
|
|
3070
3070
|
throw new TypeError("Expected a function");
|
|
3071
3071
|
e = +e || 0;
|
|
3072
|
-
var
|
|
3072
|
+
var j = !!(t = t || {}).leading, x = !("trailing" in t) || !!t.trailing, m = "maxWait" in t, k = "debounceOnServer" in t && !!t.debounceOnServer, b = m ? Math.max(+t.maxWait || 0, e) : null;
|
|
3073
3073
|
D(function() {
|
|
3074
3074
|
return h.current = !0, function() {
|
|
3075
3075
|
h.current = !1;
|
|
@@ -3079,7 +3079,7 @@ function bi(n, e, t) {
|
|
|
3079
3079
|
var N = function(C) {
|
|
3080
3080
|
var y = l.current, S = c.current;
|
|
3081
3081
|
return l.current = c.current = null, a.current = C, u.current = d.current.apply(S, y);
|
|
3082
|
-
},
|
|
3082
|
+
}, _ = function(C, y) {
|
|
3083
3083
|
g && cancelAnimationFrame(i.current), i.current = g ? requestAnimationFrame(C) : setTimeout(C, y);
|
|
3084
3084
|
}, v = function(C) {
|
|
3085
3085
|
if (!h.current)
|
|
@@ -3094,18 +3094,18 @@ function bi(n, e, t) {
|
|
|
3094
3094
|
return $(y);
|
|
3095
3095
|
if (h.current) {
|
|
3096
3096
|
var S = e - (y - s.current), F = m ? Math.min(S, b - (y - a.current)) : S;
|
|
3097
|
-
|
|
3097
|
+
_(C, F);
|
|
3098
3098
|
}
|
|
3099
3099
|
}, I = function() {
|
|
3100
3100
|
if (p || k) {
|
|
3101
3101
|
var C = Date.now(), y = v(C);
|
|
3102
3102
|
if (l.current = [].slice.call(arguments), c.current = r, s.current = C, y) {
|
|
3103
3103
|
if (!i.current && h.current)
|
|
3104
|
-
return a.current = s.current,
|
|
3104
|
+
return a.current = s.current, _(P, e), j ? N(s.current) : u.current;
|
|
3105
3105
|
if (m)
|
|
3106
|
-
return
|
|
3106
|
+
return _(P, e), N(s.current);
|
|
3107
3107
|
}
|
|
3108
|
-
return i.current ||
|
|
3108
|
+
return i.current || _(P, e), u.current;
|
|
3109
3109
|
}
|
|
3110
3110
|
};
|
|
3111
3111
|
return I.cancel = function() {
|
|
@@ -3115,7 +3115,7 @@ function bi(n, e, t) {
|
|
|
3115
3115
|
}, I.flush = function() {
|
|
3116
3116
|
return i.current ? $(Date.now()) : u.current;
|
|
3117
3117
|
}, I;
|
|
3118
|
-
}, [
|
|
3118
|
+
}, [j, m, e, b, x, g, p, k]);
|
|
3119
3119
|
return f;
|
|
3120
3120
|
}
|
|
3121
3121
|
function _i(n, e) {
|
|
@@ -3151,9 +3151,9 @@ const ki = "_wrapper_uccrb_1", Ni = "_open_uccrb_9", Ci = "_dropdown_uccrb_13",
|
|
|
3151
3151
|
icon: Mi,
|
|
3152
3152
|
"clear-button": "_clear-button_uccrb_74",
|
|
3153
3153
|
clearButton: Ai
|
|
3154
|
-
}, _t = ({ show: n, onCancel: e, items: t, currentSelection: r, onSelectionChange: s, onSearchQueryChange: a, texts: i, itemsNameWidth: l, additionalColumns: c, displayIdAsName: u = !1, autoHideSearch: d = !1, allItemsLength: h, disabled: p, isLoading: g = !1, inputRef:
|
|
3154
|
+
}, _t = ({ show: n, onCancel: e, items: t, currentSelection: r, onSelectionChange: s, onSearchQueryChange: a, texts: i, itemsNameWidth: l, additionalColumns: c, displayIdAsName: u = !1, autoHideSearch: d = !1, allItemsLength: h, disabled: p, isLoading: g = !1, inputRef: j }) => {
|
|
3155
3155
|
var E;
|
|
3156
|
-
const x = Y(null), m = Y(null), k = Y(null), [b, f] = O(""), [N] = rr(b, 500), [,
|
|
3156
|
+
const x = Y(null), m = Y(null), k = Y(null), [b, f] = O(""), [N] = rr(b, 500), [, _] = O(!1), v = (E = j.current) == null ? void 0 : E.getBoundingClientRect(), $ = (v == null ? void 0 : v.x) ?? 0, P = ((v == null ? void 0 : v.x) ?? 0) + ((v == null ? void 0 : v.width) ?? 0), I = (v == null ? void 0 : v.y) ?? 0, C = ((v == null ? void 0 : v.y) ?? 0) + ((v == null ? void 0 : v.height) ?? 0), y = (v == null ? void 0 : v.width) ?? 0, S = (v == null ? void 0 : v.height) ?? 0, F = 5, W = Q(() => $ ? $ > window.innerWidth / 2 : !1, [$]), H = Q(() => I ? I > window.innerHeight / 2 : !1, [I]);
|
|
3157
3157
|
D(() => {
|
|
3158
3158
|
var M;
|
|
3159
3159
|
n && ((M = k.current) == null || M.focus());
|
|
@@ -3169,7 +3169,7 @@ const ki = "_wrapper_uccrb_1", Ni = "_open_uccrb_9", Ci = "_dropdown_uccrb_13",
|
|
|
3169
3169
|
break;
|
|
3170
3170
|
}
|
|
3171
3171
|
}, [e]), V = T(() => {
|
|
3172
|
-
|
|
3172
|
+
_((M) => !M);
|
|
3173
3173
|
}, []);
|
|
3174
3174
|
D(() => (window.addEventListener("scroll", V), () => {
|
|
3175
3175
|
window.removeEventListener("scroll", V);
|
|
@@ -3336,8 +3336,8 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3336
3336
|
}, children: /* @__PURE__ */ o.jsxs(tt, { className: xe.inputGroup, children: [
|
|
3337
3337
|
/* @__PURE__ */ o.jsx(tt.Text, { className: w("p-1 rounded", xe.inputGroupText, xe.left), children: /* @__PURE__ */ o.jsx(Gi, { searchTypes: n, selectedType: r, setSelectedType: s }) }),
|
|
3338
3338
|
/* @__PURE__ */ o.jsx(J.Control, { placeholder: t.searchPlaceholder, type: "text", size: "sm", className: w("luminus-app-search-input", xe.input), value: a, onChange: (g) => {
|
|
3339
|
-
var
|
|
3340
|
-
return i(((
|
|
3339
|
+
var j;
|
|
3340
|
+
return i(((j = g.target) == null ? void 0 : j.value) ?? "");
|
|
3341
3341
|
}, onFocus: () => d.length > 0 && p(!0) }),
|
|
3342
3342
|
/* @__PURE__ */ o.jsx(tt.Text, { className: w("p-0 rounded", xe.inputGroupText, xe.right), children: /* @__PURE__ */ o.jsx("button", { type: "submit", className: w("text-primary", xe.submitButton), children: /* @__PURE__ */ o.jsx(Fi, {}) }) }),
|
|
3343
3343
|
/* @__PURE__ */ o.jsx(ec, { query: l, searchTypes: n, show: h, onCancel: () => p(!1), groups: d, isLoading: u })
|
|
@@ -3404,7 +3404,7 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3404
3404
|
}, [r, n]), D(() => {
|
|
3405
3405
|
u >= t.length && d(t.length - 1);
|
|
3406
3406
|
}, [t, u]);
|
|
3407
|
-
const
|
|
3407
|
+
const j = T((x) => {
|
|
3408
3408
|
switch (x.key) {
|
|
3409
3409
|
case "ArrowLeft":
|
|
3410
3410
|
x.stopPropagation(), p && d((m) => m - 1);
|
|
@@ -3417,7 +3417,7 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3417
3417
|
break;
|
|
3418
3418
|
}
|
|
3419
3419
|
}, [g, p, e]);
|
|
3420
|
-
return dn(
|
|
3420
|
+
return dn(j), /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
3421
3421
|
/* @__PURE__ */ o.jsx(ir, { show: n, onClick: e }),
|
|
3422
3422
|
/* @__PURE__ */ o.jsxs("div", { ref: c, className: w("luminus-lightbox rounded shadow", re.lightbox, {
|
|
3423
3423
|
[re.show]: n
|
|
@@ -3543,32 +3543,32 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3543
3543
|
}, hl = ({ InputContainer: n = ke, label: e, value: t, onChange: r, hidden: s, disabled: a, className: i, type: l, withoutLabel: c }) => /* @__PURE__ */ o.jsx(n, { isForCheckInput: !0, hidden: s, label: e ?? "", withoutLabel: c, className: i, children: /* @__PURE__ */ o.jsx(J.Check, { id: `check-${e}`, type: l ?? "checkbox", label: e ?? "", checked: t, onChange: (u) => {
|
|
3544
3544
|
var d;
|
|
3545
3545
|
r && r(((d = u.target) == null ? void 0 : d.checked) ?? !1);
|
|
3546
|
-
}, className: i ?? "", hidden: s ?? !1, disabled: a ?? !1 }) }), ml = ({ InputContainer: n = ke, type: e, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: i, placeholder: l, size: c, hidden: u, disabled: d, showClearIcon: h, clearValue: p, list: g, className:
|
|
3546
|
+
}, className: i ?? "", hidden: s ?? !1, disabled: a ?? !1 }) }), ml = ({ InputContainer: n = ke, type: e, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: i, placeholder: l, size: c, hidden: u, disabled: d, showClearIcon: h, clearValue: p, list: g, className: j, step: x }) => {
|
|
3547
3547
|
const m = e === "number", k = T(() => {
|
|
3548
3548
|
if (!r)
|
|
3549
3549
|
return;
|
|
3550
3550
|
const C = p ?? null;
|
|
3551
3551
|
r(m ? C ? Number(C) : null : (C == null ? void 0 : C.toString()) ?? "");
|
|
3552
|
-
}, [p, m, r]), b = Y(null), [f, N] = O((t == null ? void 0 : t.toString()) ?? ""),
|
|
3552
|
+
}, [p, m, r]), b = Y(null), [f, N] = O((t == null ? void 0 : t.toString()) ?? ""), _ = T((C) => {
|
|
3553
3553
|
const y = C;
|
|
3554
3554
|
r && (m && r(y == null || y === "" ? null : Number(y)), r(y || null));
|
|
3555
3555
|
}, [m, r]), v = T((C) => {
|
|
3556
3556
|
var S;
|
|
3557
3557
|
const y = (S = C.target) == null ? void 0 : S.value;
|
|
3558
3558
|
if (!s) {
|
|
3559
|
-
|
|
3559
|
+
_(y);
|
|
3560
3560
|
return;
|
|
3561
3561
|
}
|
|
3562
3562
|
N(y), b.current !== null && window.clearTimeout(b.current), b.current = window.setTimeout(() => {
|
|
3563
|
-
|
|
3563
|
+
_(y);
|
|
3564
3564
|
}, s);
|
|
3565
|
-
}, [s,
|
|
3565
|
+
}, [s, _]);
|
|
3566
3566
|
D(() => {
|
|
3567
3567
|
N(t === null ? "" : t.toString());
|
|
3568
3568
|
}, [t]);
|
|
3569
3569
|
const [$, P] = O(!1), I = mn(e, t ? t.toString() ?? null : null, $);
|
|
3570
|
-
return /* @__PURE__ */ o.jsxs(n, { withoutLabel: i, label: a ?? "", hidden: u, className:
|
|
3571
|
-
/* @__PURE__ */ o.jsx(J.Control, { type: I, placeholder: l ?? a, size: c, value: s ? f : t ?? "", onChange: v, className:
|
|
3570
|
+
return /* @__PURE__ */ o.jsxs(n, { withoutLabel: i, label: a ?? "", hidden: u, className: j, children: [
|
|
3571
|
+
/* @__PURE__ */ o.jsx(J.Control, { type: I, placeholder: l ?? a, size: c, value: s ? f : t ?? "", onChange: v, className: j ?? "", hidden: u, disabled: d ?? !1, list: g, onFocus: () => P(!0), onBlur: () => P(!1), step: x }),
|
|
3572
3572
|
h && t && r && !d && /* @__PURE__ */ o.jsx("div", { className: `luminus-input-remove-icon ${e !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ o.jsx(U, { color: "secondary", size: "sm", onClick: k, children: /* @__PURE__ */ o.jsx(ce, {}) }) })
|
|
3573
3573
|
] });
|
|
3574
3574
|
}, fl = ({
|
|
@@ -3586,7 +3586,7 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3586
3586
|
clearValue: h,
|
|
3587
3587
|
noSortOptions: p,
|
|
3588
3588
|
className: g,
|
|
3589
|
-
noEmptyOption:
|
|
3589
|
+
noEmptyOption: j
|
|
3590
3590
|
// it will still add the empty option if there is no value provided or value is empty string or null
|
|
3591
3591
|
}) => {
|
|
3592
3592
|
const x = T(() => {
|
|
@@ -3603,14 +3603,14 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3603
3603
|
const k = (b = m.target) == null ? void 0 : b.value;
|
|
3604
3604
|
i && r(k ? parseInt(k, 10) : null), r(k || null);
|
|
3605
3605
|
}, className: g ?? "", hidden: c, disabled: u ?? !1, children: [
|
|
3606
|
-
|
|
3606
|
+
j && !(e == null || e === "") ? void 0 : /* @__PURE__ */ o.jsx("option", { value: "" }),
|
|
3607
3607
|
t == null ? void 0 : t.sort((m, k) => p ? 0 : (m.name ?? "").localeCompare(k.name ?? "")).map((m) => /* @__PURE__ */ o.jsx("option", { value: m.id ?? "", children: m.name }, m.id))
|
|
3608
3608
|
] }),
|
|
3609
3609
|
d && e && r && !u && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ o.jsx(U, { color: "secondary", size: "sm", onClick: x, children: /* @__PURE__ */ o.jsx(ce, {}) }) })
|
|
3610
3610
|
] });
|
|
3611
|
-
}, pl = ({ InputContainer: n = ke, items: e, defaultSelection: t, selectedItemNavigateTo: r, onSearchQueryChange: s, texts: a, isLoading: i, isNumber: l, onSelect: c, label: u, withoutLabel: d, size: h, dropdownItemsNameWidth: p, additionalColumns: g, hidden:
|
|
3611
|
+
}, pl = ({ InputContainer: n = ke, items: e, defaultSelection: t, selectedItemNavigateTo: r, onSearchQueryChange: s, texts: a, isLoading: i, isNumber: l, onSelect: c, label: u, withoutLabel: d, size: h, dropdownItemsNameWidth: p, additionalColumns: g, hidden: j, disabled: x, displayIdAsName: m, CustomOnChangeComponent: k, className: b }) => {
|
|
3612
3612
|
var S, F;
|
|
3613
|
-
const [f, N] = O(t), [
|
|
3613
|
+
const [f, N] = O(t), [_, v] = O(!1);
|
|
3614
3614
|
D(() => {
|
|
3615
3615
|
N(t);
|
|
3616
3616
|
}, [t]);
|
|
@@ -3623,7 +3623,7 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3623
3623
|
c && c(f);
|
|
3624
3624
|
}, [f, c]);
|
|
3625
3625
|
const I = Y(null), C = r !== void 0, y = C && f !== null;
|
|
3626
|
-
return /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsxs(n, { withoutLabel: d, label: u ?? "", hidden:
|
|
3626
|
+
return /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsxs(n, { withoutLabel: d, label: u ?? "", hidden: j, inputContainerClassName: w({ "luminus-dropdown-select-open": _ }), className: b, children: [
|
|
3627
3627
|
/* @__PURE__ */ o.jsxs(cr, { currentSelection: f, selectedItemNavigateTo: r, children: [
|
|
3628
3628
|
m && (f == null ? void 0 : f.name) && /* @__PURE__ */ o.jsx(z, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: f.name }),
|
|
3629
3629
|
/* @__PURE__ */ o.jsxs(J.Select, { ref: I, size: h, value: (f == null ? void 0 : f.id) ?? "", onChange: (W) => N({
|
|
@@ -3636,7 +3636,7 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3636
3636
|
}, className: w("w-100", {
|
|
3637
3637
|
"luminus-dropdown-picker-disabled": x,
|
|
3638
3638
|
"luminus-dropdown-picker-link": y
|
|
3639
|
-
}), hidden:
|
|
3639
|
+
}), hidden: j, children: [
|
|
3640
3640
|
/* @__PURE__ */ o.jsx("option", { value: "" }),
|
|
3641
3641
|
t && /* @__PURE__ */ o.jsx("option", { value: t.id ?? void 0, children: t.name && ((S = t.name) == null ? void 0 : S.length) > 0 ? t.name : t.id }),
|
|
3642
3642
|
f && /* @__PURE__ */ o.jsx("option", { value: f.id ?? void 0, children: f.name && ((F = f.name) == null ? void 0 : F.length) > 0 ? f.name : f.id })
|
|
@@ -3648,7 +3648,7 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3648
3648
|
k ?? null
|
|
3649
3649
|
] }) : null
|
|
3650
3650
|
] }),
|
|
3651
|
-
I.current && /* @__PURE__ */ o.jsx(_t, { show:
|
|
3651
|
+
I.current && /* @__PURE__ */ o.jsx(_t, { show: _, onCancel: () => v(!1), items: e, currentSelection: f, onSelectionChange: P, onSearchQueryChange: s, texts: a, itemsNameWidth: p, additionalColumns: g, isLoading: i, disabled: x, inputRef: I })
|
|
3652
3652
|
] }) });
|
|
3653
3653
|
}, gl = ({ InputContainer: n = ke, value: e, onChange: t, label: r, size: s, showClearIcon: a, clearValue: i, hidden: l, disabled: c, rows: u, withoutLabel: d, debounceMs: h, className: p }) => {
|
|
3654
3654
|
const g = T(() => {
|
|
@@ -3656,17 +3656,17 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3656
3656
|
return;
|
|
3657
3657
|
const f = i ?? null;
|
|
3658
3658
|
t((f == null ? void 0 : f.toString()) ?? "");
|
|
3659
|
-
}, [i, t]),
|
|
3659
|
+
}, [i, t]), j = Y(null), [x, m] = O((e == null ? void 0 : e.toString()) ?? ""), k = T((f) => {
|
|
3660
3660
|
const N = f;
|
|
3661
3661
|
t && t(N || null);
|
|
3662
3662
|
}, [t]), b = T((f) => {
|
|
3663
|
-
var
|
|
3664
|
-
const N = (
|
|
3663
|
+
var _;
|
|
3664
|
+
const N = (_ = f.target) == null ? void 0 : _.value;
|
|
3665
3665
|
if (!h) {
|
|
3666
3666
|
k(N);
|
|
3667
3667
|
return;
|
|
3668
3668
|
}
|
|
3669
|
-
m(N),
|
|
3669
|
+
m(N), j.current !== null && window.clearTimeout(j.current), j.current = window.setTimeout(() => {
|
|
3670
3670
|
k(N);
|
|
3671
3671
|
}, h);
|
|
3672
3672
|
}, [h, k]);
|
|
@@ -3676,18 +3676,18 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3676
3676
|
/* @__PURE__ */ o.jsx(J.Control, { as: "textarea", size: s, value: h ? x : e ?? "", onChange: b, hidden: l, disabled: c, rows: u ?? 2, className: "w-100" }),
|
|
3677
3677
|
a && e && t && !c && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ o.jsx(U, { color: "secondary", size: "sm", onClick: g, children: /* @__PURE__ */ o.jsx(ce, {}) }) })
|
|
3678
3678
|
] });
|
|
3679
|
-
}, xl = ({ InputContainer: n = ke, value: e, onChange: t, debounceMs: r, label: s, withoutLabel: a, placeholder: i, size: l, hidden: c, disabled: u, showClearIcon: d, clearValue: h, className: p, step: g, stepperStep:
|
|
3679
|
+
}, xl = ({ InputContainer: n = ke, value: e, onChange: t, debounceMs: r, label: s, withoutLabel: a, placeholder: i, size: l, hidden: c, disabled: u, showClearIcon: d, clearValue: h, className: p, step: g, stepperStep: j = 1 }) => {
|
|
3680
3680
|
const x = T(() => {
|
|
3681
3681
|
if (!t)
|
|
3682
3682
|
return;
|
|
3683
|
-
const
|
|
3684
|
-
t(
|
|
3685
|
-
}, [h, t]), m = Y(null), [k, b] = O((e == null ? void 0 : e.toString()) ?? ""), f = T((
|
|
3686
|
-
const v =
|
|
3683
|
+
const _ = h ?? null;
|
|
3684
|
+
t(_ ? Number(_) : null);
|
|
3685
|
+
}, [h, t]), m = Y(null), [k, b] = O((e == null ? void 0 : e.toString()) ?? ""), f = T((_) => {
|
|
3686
|
+
const v = _;
|
|
3687
3687
|
t && t(v == null || v === "" ? null : Number(v));
|
|
3688
|
-
}, [t]), N = T((
|
|
3688
|
+
}, [t]), N = T((_) => {
|
|
3689
3689
|
var $;
|
|
3690
|
-
const v = ($ =
|
|
3690
|
+
const v = ($ = _.target) == null ? void 0 : $.value;
|
|
3691
3691
|
if (!r) {
|
|
3692
3692
|
f(v);
|
|
3693
3693
|
return;
|
|
@@ -3700,22 +3700,22 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3700
3700
|
b(e === null ? "" : e.toString());
|
|
3701
3701
|
}, [e]), /* @__PURE__ */ o.jsx(n, { withoutLabel: a, label: s ?? "", hidden: c, className: p, children: /* @__PURE__ */ o.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
3702
3702
|
/* @__PURE__ */ o.jsx(J.Control, { type: "number", placeholder: i ?? s, size: l, value: r ? k : e ?? "", onChange: N, className: `luminus-numeric-stepper ${p ?? ""}`, hidden: c, disabled: u ?? !1, step: g }),
|
|
3703
|
-
/* @__PURE__ */ o.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ o.jsx(U, { size: "sm", onClick: (
|
|
3704
|
-
|
|
3703
|
+
/* @__PURE__ */ o.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ o.jsx(U, { size: "sm", onClick: (_) => {
|
|
3704
|
+
_.preventDefault(), _.stopPropagation(), f(((e ?? 0) - j).toString());
|
|
3705
3705
|
}, children: /* @__PURE__ */ o.jsx(sr, {}) }) }),
|
|
3706
|
-
/* @__PURE__ */ o.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ o.jsx(U, { size: "sm", onClick: (
|
|
3707
|
-
|
|
3706
|
+
/* @__PURE__ */ o.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ o.jsx(U, { size: "sm", onClick: (_) => {
|
|
3707
|
+
_.preventDefault(), _.stopPropagation(), f(((e ?? 0) + j).toString());
|
|
3708
3708
|
}, children: /* @__PURE__ */ o.jsx(or, {}) }) }),
|
|
3709
3709
|
d && e && t && !u && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ o.jsx(U, { color: "secondary", size: "sm", onClick: x, children: /* @__PURE__ */ o.jsx(ce, {}) }) })
|
|
3710
3710
|
] }) });
|
|
3711
3711
|
}, wl = ({ InputContainer: n = fe, formField: e, label: t, resetsFields: r, type: s, required: a, hidden: i, disabled: l, withoutLabel: c, className: u }) => {
|
|
3712
|
-
const { register: d, formState: h, setValue: p } = le(), [g,
|
|
3712
|
+
const { register: d, formState: h, setValue: p } = le(), [g, j] = O(void 0), [x, m] = O(!1);
|
|
3713
3713
|
D(() => {
|
|
3714
3714
|
const b = e.split(".");
|
|
3715
3715
|
let f = h.errors;
|
|
3716
3716
|
b.forEach((N) => {
|
|
3717
3717
|
f !== void 0 && (f = f[N]);
|
|
3718
|
-
}),
|
|
3718
|
+
}), j(f);
|
|
3719
3719
|
}, [h, e]), D(() => {
|
|
3720
3720
|
h.isSubmitted && m(!0);
|
|
3721
3721
|
}, [h]);
|
|
@@ -3729,13 +3729,13 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3729
3729
|
g && /* @__PURE__ */ o.jsx(pe, { message: g.message })
|
|
3730
3730
|
] });
|
|
3731
3731
|
}, vl = ({ InputContainer: n = fe, label: e, formField: t, options: r, resetsFields: s, required: a, disabled: i, hidden: l, className: c }) => {
|
|
3732
|
-
const { register: u, formState: d, setValue: h, watch: p } = le(), [g,
|
|
3732
|
+
const { register: u, formState: d, setValue: h, watch: p } = le(), [g, j] = O(void 0), [x, m] = O(!1), k = Q(() => r, [r]);
|
|
3733
3733
|
D(() => {
|
|
3734
3734
|
const f = t.split(".");
|
|
3735
3735
|
let N = d.errors;
|
|
3736
|
-
f.forEach((
|
|
3737
|
-
N !== void 0 && (N = N[
|
|
3738
|
-
}),
|
|
3736
|
+
f.forEach((_) => {
|
|
3737
|
+
N !== void 0 && (N = N[_]);
|
|
3738
|
+
}), j(N);
|
|
3739
3739
|
}, [d, t]), D(() => {
|
|
3740
3740
|
d.isSubmitted && m(!0);
|
|
3741
3741
|
}, [d]);
|
|
@@ -3749,7 +3749,7 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3749
3749
|
g && /* @__PURE__ */ o.jsx(pe, { message: g.message })
|
|
3750
3750
|
] });
|
|
3751
3751
|
}, yl = ({ InputContainer: n = fe, formField: e, label: t, resetsFields: r, size: s, showClearIcon: a, clearValue: i, required: l, hidden: c, disabled: u, rows: d, withoutLabel: h, customFormControlProps: p, className: g }) => {
|
|
3752
|
-
const { register:
|
|
3752
|
+
const { register: j, formState: x, setValue: m, watch: k } = le(), [b, f] = O(void 0), [N, _] = O(!1), v = T(() => {
|
|
3753
3753
|
const I = i ?? null;
|
|
3754
3754
|
m(e, (I == null ? void 0 : I.toString()) ?? "", { shouldDirty: !0, shouldValidate: N });
|
|
3755
3755
|
}, [i, m, e, N]), $ = T(() => {
|
|
@@ -3762,11 +3762,11 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3762
3762
|
D(() => {
|
|
3763
3763
|
$();
|
|
3764
3764
|
}, [$]), D(() => {
|
|
3765
|
-
x.isSubmitted &&
|
|
3765
|
+
x.isSubmitted && _(!0);
|
|
3766
3766
|
}, [x]);
|
|
3767
3767
|
const P = b !== void 0;
|
|
3768
3768
|
return /* @__PURE__ */ o.jsxs(n, { label: `${t}${l ? " *" : ""}`, hidden: c, withoutLabel: h, isInvalid: P, className: g, isForTextAreaInput: !0, children: [
|
|
3769
|
-
/* @__PURE__ */ o.jsx(J.Control, { as: "textarea", size: s, ...
|
|
3769
|
+
/* @__PURE__ */ o.jsx(J.Control, { as: "textarea", size: s, ...j(e, {
|
|
3770
3770
|
setValueAs: (I) => I == null || I === "" ? null : I,
|
|
3771
3771
|
onChange: () => {
|
|
3772
3772
|
r && r.forEach((I) => m(I, null, { shouldDirty: !0, shouldValidate: N }));
|
|
@@ -3775,8 +3775,8 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3775
3775
|
a && k(e) && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ o.jsx(U, { color: "secondary", size: "sm", onClick: v, children: /* @__PURE__ */ o.jsx(ce, {}) }) }),
|
|
3776
3776
|
b && /* @__PURE__ */ o.jsx(pe, { message: b.message })
|
|
3777
3777
|
] });
|
|
3778
|
-
}, bl = ({ InputContainer: n = fe, type: e, formField: t, label: r, placeholder: s, size: a, resetsFields: i, showClearIcon: l, clearValue: c, required: u, hidden: d, disabled: h, withoutLabel: p, list: g, step:
|
|
3779
|
-
const { register: k, formState: b, setValue: f, watch: N } = le(), [
|
|
3778
|
+
}, bl = ({ InputContainer: n = fe, type: e, formField: t, label: r, placeholder: s, size: a, resetsFields: i, showClearIcon: l, clearValue: c, required: u, hidden: d, disabled: h, withoutLabel: p, list: g, step: j, CustomOnChangeComponent: x, className: m }) => {
|
|
3779
|
+
const { register: k, formState: b, setValue: f, watch: N } = le(), [_, v] = O(void 0), [$, P] = O(!1), I = T(() => {
|
|
3780
3780
|
const R = c ?? null;
|
|
3781
3781
|
e === "number" ? f(t, R !== null ? Number(R) : null, {
|
|
3782
3782
|
shouldDirty: !0,
|
|
@@ -3794,7 +3794,7 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3794
3794
|
}, [C]), D(() => {
|
|
3795
3795
|
b.isSubmitted && P(!0);
|
|
3796
3796
|
}, [b]);
|
|
3797
|
-
const y =
|
|
3797
|
+
const y = _ !== void 0, [S, F] = O(!1), W = N(t), H = mn(e, W ?? null, S);
|
|
3798
3798
|
return /* @__PURE__ */ o.jsxs(n, { label: `${r}${u ? " *" : ""}`, hidden: d, withoutLabel: p, isInvalid: y, className: m, children: [
|
|
3799
3799
|
/* @__PURE__ */ o.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
3800
3800
|
/* @__PURE__ */ o.jsx(J.Control, { type: H, placeholder: s ?? r, size: a, onFocus: () => {
|
|
@@ -3805,20 +3805,20 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3805
3805
|
i && i.forEach((R) => f(R, null, { shouldDirty: !0, shouldValidate: $ }));
|
|
3806
3806
|
},
|
|
3807
3807
|
onBlur: () => F(!1)
|
|
3808
|
-
}), isInvalid: y, hidden: d, disabled: h, list: g, className: "w-100", step:
|
|
3808
|
+
}), isInvalid: y, hidden: d, disabled: h, list: g, className: "w-100", step: j }),
|
|
3809
3809
|
x && /* @__PURE__ */ o.jsx("div", { className: "custom-picker-button", children: x })
|
|
3810
3810
|
] }),
|
|
3811
3811
|
l && N(t) && /* @__PURE__ */ o.jsx("div", { className: `luminus-input-remove-icon ${e !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ o.jsx(U, { color: "secondary", size: "sm", onClick: I, children: /* @__PURE__ */ o.jsx(ce, {}) }) }),
|
|
3812
|
-
|
|
3812
|
+
_ && /* @__PURE__ */ o.jsx(pe, { message: _.message })
|
|
3813
3813
|
] });
|
|
3814
|
-
}, _l = ({ InputContainer: n = fe, formField: e, label: t, size: r, defaultSelection: s, resetsFields: a, isNumber: i, required: l, hidden: c, disabled: u, items: d, onSearchQueryChange: h, selectedItemNavigateTo: p, texts: g, dropdownItemsNameWidth:
|
|
3815
|
-
const { formState:
|
|
3814
|
+
}, _l = ({ InputContainer: n = fe, formField: e, label: t, size: r, defaultSelection: s, resetsFields: a, isNumber: i, required: l, hidden: c, disabled: u, items: d, onSearchQueryChange: h, selectedItemNavigateTo: p, texts: g, dropdownItemsNameWidth: j, isLoading: x, withoutLabel: m, additionalColumns: k, CustomOnChangeComponent: b, displayIdAsName: f, className: N }) => {
|
|
3815
|
+
const { formState: _, setValue: v, watch: $, control: P } = le(), [I, C] = O(void 0), [y, S] = O(!1), [F, W] = O(!1), H = $(e) ?? null, R = H === (s == null ? void 0 : s.id) ? s == null ? void 0 : s.name : $(`${e}-DropdownName`), V = Q(() => H == null ? null : { id: H ?? null, name: R ?? "" }, [H, R]), ae = T(() => {
|
|
3816
3816
|
const B = e.split(".");
|
|
3817
|
-
let ue =
|
|
3817
|
+
let ue = _.errors;
|
|
3818
3818
|
B.forEach((Qe) => {
|
|
3819
3819
|
ue !== void 0 && (ue = ue[Qe]);
|
|
3820
3820
|
}), C(ue);
|
|
3821
|
-
}, [
|
|
3821
|
+
}, [_, e]), ne = T((B) => {
|
|
3822
3822
|
if ((B == null ? void 0 : B.id) === H)
|
|
3823
3823
|
return;
|
|
3824
3824
|
if (a && a.forEach((Qe) => v(Qe, null, { shouldDirty: !0, shouldValidate: F })), B === null) {
|
|
@@ -3841,8 +3841,8 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3841
3841
|
D(() => {
|
|
3842
3842
|
ae();
|
|
3843
3843
|
}, [ae]), D(() => {
|
|
3844
|
-
|
|
3845
|
-
}, [
|
|
3844
|
+
_.isSubmitted && W(!0);
|
|
3845
|
+
}, [_]);
|
|
3846
3846
|
const M = Y(null), X = I !== void 0, Pe = p !== void 0, lr = Pe && V !== null;
|
|
3847
3847
|
return /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsxs(n, { label: `${t}${l ? " *" : ""}`, hidden: c, withoutLabel: m, isInvalid: X, inputContainerClassName: w({ "luminus-dropdown-select-open": y }), className: N, children: [
|
|
3848
3848
|
/* @__PURE__ */ o.jsxs(cr, { currentSelection: V, selectedItemNavigateTo: p, children: [
|
|
@@ -3864,12 +3864,12 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3864
3864
|
] }) : null
|
|
3865
3865
|
] }),
|
|
3866
3866
|
I && /* @__PURE__ */ o.jsx(pe, { message: I.message }),
|
|
3867
|
-
M.current && /* @__PURE__ */ o.jsx(_t, { show: y, onCancel: E, items: d, currentSelection: V, onSelectionChange: K, onSearchQueryChange: h, texts: g, itemsNameWidth:
|
|
3867
|
+
M.current && /* @__PURE__ */ o.jsx(_t, { show: y, onCancel: E, items: d, currentSelection: V, onSelectionChange: K, onSearchQueryChange: h, texts: g, itemsNameWidth: j, additionalColumns: k, displayIdAsName: f, isLoading: x, disabled: u, inputRef: M })
|
|
3868
3868
|
] }) });
|
|
3869
3869
|
}, jl = ({ InputContainer: n = fe, label: e, formField: t, hidden: r, required: s, placeholder: a, disabled: i, showClearIcon: l, resetsFields: c, multiple: u, accept: d, withoutLabel: h, className: p }) => {
|
|
3870
|
-
const { watch: g, setValue:
|
|
3871
|
-
|
|
3872
|
-
}, [
|
|
3870
|
+
const { watch: g, setValue: j, register: x, formState: m } = le(), [k, b] = O(!1), [f, N] = O(void 0), _ = T(() => {
|
|
3871
|
+
j(t, "");
|
|
3872
|
+
}, [j, t]), v = T(() => {
|
|
3873
3873
|
const P = t.split(".");
|
|
3874
3874
|
let I = m.errors;
|
|
3875
3875
|
P.forEach((C) => {
|
|
@@ -3883,10 +3883,10 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3883
3883
|
return /* @__PURE__ */ o.jsxs(n, { label: `${e}${s ? "*" : ""}`, hidden: r, withoutLabel: h, isInvalid: $, className: p, children: [
|
|
3884
3884
|
/* @__PURE__ */ o.jsx(cn, { type: "file", multiple: u, accept: d.join(", "), placeholder: a ?? e, isInvalid: $, hidden: r, disabled: i, className: "w-100", ...x(t, {
|
|
3885
3885
|
onChange: () => {
|
|
3886
|
-
c && c.forEach((P) =>
|
|
3886
|
+
c && c.forEach((P) => j(P, null, { shouldDirty: !0, shouldValidate: k }));
|
|
3887
3887
|
}
|
|
3888
3888
|
}) }),
|
|
3889
|
-
l && g(t) && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ o.jsx(U, { color: "secondary", size: "sm", onClick:
|
|
3889
|
+
l && g(t) && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ o.jsx(U, { color: "secondary", size: "sm", onClick: _, children: /* @__PURE__ */ o.jsx(ce, {}) }) }),
|
|
3890
3890
|
f && /* @__PURE__ */ o.jsx(pe, { message: f.message })
|
|
3891
3891
|
] });
|
|
3892
3892
|
}, kl = ({ children: n, onStorno: e }) => {
|
|
@@ -3895,7 +3895,7 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3895
3895
|
s(Object.keys(t.dirtyFields).length > 0);
|
|
3896
3896
|
}, [t]), r ? /* @__PURE__ */ o.jsx(qa, { onStorno: e, children: n }) : null;
|
|
3897
3897
|
}, Nl = ({ InputContainer: n = fe, options: e, formField: t, label: r, size: s, resetsFields: a, isNumber: i, required: l, hidden: c, disabled: u, withoutLabel: d, noSortOptions: h, suffixIdToName: p, className: g }) => {
|
|
3898
|
-
const { customSelectTexts:
|
|
3898
|
+
const { customSelectTexts: j } = L(se), { formState: x, setValue: m, watch: k, control: b } = le(), [f, N] = O(void 0), [_, v] = O(!1), [$, P] = O(!1), [I, C] = O(""), y = k(t), S = Q(() => e.find((E) => E.id === y) ?? null, [e, y]), F = T(() => {
|
|
3899
3899
|
const E = t.split(".");
|
|
3900
3900
|
let M = x.errors;
|
|
3901
3901
|
E.forEach((X) => {
|
|
@@ -3933,7 +3933,7 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3933
3933
|
id: E.id,
|
|
3934
3934
|
name: V(E)
|
|
3935
3935
|
})).filter((E) => ts(E.name, I)).sort((E, M) => h ? 0 : (E.name ?? "").localeCompare(M.name ?? "")), [e, h, I, V]), ne = Y(null), K = f !== void 0;
|
|
3936
|
-
return /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsxs(n, { label: `${r}${l ? " *" : ""}`, hidden: c, withoutLabel: d, isInvalid: K, inputContainerClassName: w({ "luminus-dropdown-select-open":
|
|
3936
|
+
return /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsxs(n, { label: `${r}${l ? " *" : ""}`, hidden: c, withoutLabel: d, isInvalid: K, inputContainerClassName: w({ "luminus-dropdown-select-open": _ }), className: g, children: [
|
|
3937
3937
|
/* @__PURE__ */ o.jsx(un, { control: b, name: t, render: () => /* @__PURE__ */ o.jsx(J.Select, { size: s, onMouseDown: (E) => {
|
|
3938
3938
|
E.currentTarget.focus(), E.preventDefault();
|
|
3939
3939
|
}, onClick: () => {
|
|
@@ -3941,16 +3941,16 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3941
3941
|
}, ref: ne, value: y ?? "", onChange: () => {
|
|
3942
3942
|
}, isInvalid: K, hidden: c, disabled: u, className: "w-100", children: /* @__PURE__ */ o.jsx("option", { value: (S == null ? void 0 : S.id) ?? "", children: V(S) }) }) }),
|
|
3943
3943
|
f && /* @__PURE__ */ o.jsx(pe, { message: f.message }),
|
|
3944
|
-
ne.current && /* @__PURE__ */ o.jsx(_t, { show:
|
|
3944
|
+
ne.current && /* @__PURE__ */ o.jsx(_t, { show: _, onCancel: () => v(!1), items: ae, currentSelection: S ?? null, onSelectionChange: H, onSearchQueryChange: R, texts: j, disabled: u, inputRef: ne, autoHideSearch: !0, allItemsLength: e.length })
|
|
3945
3945
|
] }) });
|
|
3946
|
-
}, Cl = ({ InputContainer: n = fe, formField: e, label: t, placeholder: r, size: s, resetsFields: a, showClearIcon: i, clearValue: l, required: c, hidden: u, disabled: d, withoutLabel: h, step: p, stepperStep: g = 1, className:
|
|
3947
|
-
const { register: x, formState: m, setValue: k, watch: b } = le(), [f, N] = O(void 0), [
|
|
3946
|
+
}, Cl = ({ InputContainer: n = fe, formField: e, label: t, placeholder: r, size: s, resetsFields: a, showClearIcon: i, clearValue: l, required: c, hidden: u, disabled: d, withoutLabel: h, step: p, stepperStep: g = 1, className: j }) => {
|
|
3947
|
+
const { register: x, formState: m, setValue: k, watch: b } = le(), [f, N] = O(void 0), [_, v] = O(!1), $ = T(() => {
|
|
3948
3948
|
const y = l ?? null;
|
|
3949
3949
|
k(e, y !== null ? Number(y) : null, {
|
|
3950
3950
|
shouldDirty: !0,
|
|
3951
|
-
shouldValidate:
|
|
3951
|
+
shouldValidate: _
|
|
3952
3952
|
});
|
|
3953
|
-
}, [l, k, e,
|
|
3953
|
+
}, [l, k, e, _]), P = T(() => {
|
|
3954
3954
|
const y = e.split(".");
|
|
3955
3955
|
let S = m.errors;
|
|
3956
3956
|
y.forEach((F) => {
|
|
@@ -3963,19 +3963,19 @@ const Wi = "_item_1dy8x_1", ar = {
|
|
|
3963
3963
|
m.isSubmitted && v(!0);
|
|
3964
3964
|
}, [m]);
|
|
3965
3965
|
const I = f !== void 0, C = b(e);
|
|
3966
|
-
return /* @__PURE__ */ o.jsxs(n, { label: `${t}${c ? " *" : ""}`, hidden: u, withoutLabel: h, isInvalid: I, className:
|
|
3966
|
+
return /* @__PURE__ */ o.jsxs(n, { label: `${t}${c ? " *" : ""}`, hidden: u, withoutLabel: h, isInvalid: I, className: j, children: [
|
|
3967
3967
|
/* @__PURE__ */ o.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
3968
3968
|
/* @__PURE__ */ o.jsx(J.Control, { type: "number", placeholder: r ?? t, size: s, ...x(e, {
|
|
3969
3969
|
setValueAs: (y) => y == null || y === "" ? null : Number(y),
|
|
3970
3970
|
onChange: () => {
|
|
3971
|
-
a && a.forEach((y) => k(y, null, { shouldDirty: !0, shouldValidate:
|
|
3971
|
+
a && a.forEach((y) => k(y, null, { shouldDirty: !0, shouldValidate: _ }));
|
|
3972
3972
|
}
|
|
3973
3973
|
}), isInvalid: I, hidden: u, disabled: d, className: "w-100 luminus-numeric-stepper", step: p }),
|
|
3974
3974
|
/* @__PURE__ */ o.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ o.jsx(U, { size: "sm", onClick: (y) => {
|
|
3975
|
-
y.preventDefault(), y.stopPropagation(), k(e, ((C ? Number(C) : 0) - g).toString());
|
|
3975
|
+
y.preventDefault(), y.stopPropagation(), k(e, ((C ? Number(C) : 0) - g).toString(), { shouldDirty: !0, shouldValidate: _ });
|
|
3976
3976
|
}, children: /* @__PURE__ */ o.jsx(sr, {}) }) }),
|
|
3977
3977
|
/* @__PURE__ */ o.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ o.jsx(U, { size: "sm", onClick: (y) => {
|
|
3978
|
-
y.preventDefault(), y.stopPropagation(), k(e, ((C ? Number(C) : 0) + g).toString());
|
|
3978
|
+
y.preventDefault(), y.stopPropagation(), k(e, ((C ? Number(C) : 0) + g).toString(), { shouldDirty: !0, shouldValidate: _ });
|
|
3979
3979
|
}, children: /* @__PURE__ */ o.jsx(or, {}) }) })
|
|
3980
3980
|
] }),
|
|
3981
3981
|
i && b(e) && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ o.jsx(U, { color: "secondary", size: "sm", onClick: $, children: /* @__PURE__ */ o.jsx(ce, {}) }) }),
|