react-luminus-components 1.3.122 → 1.3.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +67 -67
- package/dist/{FullScreenContainer-mAo68Whi.cjs → FullScreenContainer-DJBHY7OX.cjs} +1 -1
- package/dist/{FullScreenContainer-D5HJNjJA.js → FullScreenContainer-ykoJS9e2.js} +1 -1
- package/dist/{Loading-DDP4iMkD.js → Loading-31doBIdE.js} +1 -1
- package/dist/{Loading-DcFV00Dl.cjs → Loading-BGCivdp4.cjs} +1 -1
- package/dist/{ResponsiveContextDropdown-D4ZUXpeV.js → ResponsiveContextDropdown-CdpFpQxZ.js} +405 -405
- package/dist/{ResponsiveContextDropdown-dfS5DM48.cjs → ResponsiveContextDropdown-I7HQPGhS.cjs} +15 -15
- package/dist/{SimpleTooltip-IRywMlMZ.js → SimpleTooltip-D0G41VQN.js} +1 -1
- package/dist/{SimpleTooltip-ByhVHu7a.cjs → SimpleTooltip-Dhlap3t6.cjs} +1 -1
- package/dist/components/Form/SelectInput/SelectInput.d.ts +1 -1
- package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +1 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +3 -3
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +5 -5
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +5 -5
- package/dist/main.cjs.js +2 -2
- package/dist/main.es.js +976 -958
- package/dist/models/prop-types/InputProps/SelectInputProps.d.ts +1 -0
- package/dist/{searchUtils-B9xSo56e.cjs → searchUtils-BSeOjuYy.cjs} +1 -1
- package/dist/{searchUtils-CaIIUFdA.js → searchUtils-Bz9T45BA.js} +1 -1
- package/dist/{useClipboard-Cb27P5cE.cjs → useClipboard-WgVIh4td.cjs} +1 -1
- package/dist/{useClipboard-CqRvAp9P.js → useClipboard-Y0W8_RNe.js} +1 -1
- package/dist/{useGetApiData-D9pgAI8M.js → useGetApiData-B_2_aA4k.js} +1 -1
- package/dist/{useGetApiData-hCqUUjkM.cjs → useGetApiData-D204P-_S.cjs} +1 -1
- package/dist/{usePermissions-j0eTeyp2.js → usePermissions-C3jolFW5.js} +1 -1
- package/dist/{usePermissions-CaBhDl6x.cjs → usePermissions-eOvXa_bX.cjs} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +4 -4
- package/package.json +1 -1
package/dist/main.es.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { j as r, c as w, t as je, a as pt, s as _n, g as Nn, m as wa, d as _t, b as _a, e as Na, f as Ae, h as Ca, i as ka, k as Sa, l as Ia, n as Da, o as $a, p as Ea, T as or, q as ir, r as Cn, E as Fa, u as lr, v as sn, w as cr, x as Oa, y as me, z as $t, A as Ta, B as dr, C as Et, D as La, F as Zt, G as ur, H as Ra, S as Jt, N as fr, I as on, J as ln, K as Aa, L as Ma, M as Ba, O as Va, P as Pa, Q as mr, R as Ha, U as
|
|
2
|
-
import { b6 as
|
|
1
|
+
import { j as r, c as w, t as je, a as pt, s as _n, g as Nn, m as wa, d as _t, b as _a, e as Na, f as Ae, h as Ca, i as ka, k as Sa, l as Ia, n as Da, o as $a, p as Ea, T as or, q as ir, r as Cn, E as Fa, u as lr, v as sn, w as cr, x as Oa, y as me, z as $t, A as Ta, B as dr, C as Et, D as La, F as Zt, G as ur, H as Ra, S as Jt, N as fr, I as on, J as ln, K as Aa, L as Ma, M as Ba, O as Va, P as Pa, Q as mr, R as Ha, U as za, V as Wa, W as Ua, X as Ga, Y as Ya, Z as Ka, _ as qa, $ as Xt, a0 as Qa, a1 as Bt, a2 as X, a3 as pe, a4 as en, a5 as Za, a6 as Ja, a7 as Xa, a8 as hr, a9 as xt, aa as re, ab as cn, ac as be, ad as dn, ae as Pe, af as es, ag as Le, ah as gr, ai as ts, aj as pr, ak as ns, al as rs, am as as, an as un, ao as fn, ap as xr, aq as Ze, ar as ss, as as Xe, at as os, au as kt, av as vr, aw as Oe, ax as is, ay as ls, az as cs, aA as ds, aB as Ft, aC as us, aD as jr, aE as fs, aF as et, aG as ms, aH as yr, aI as br, aJ as wr, aK as He, aL as hs, aM as gs, aN as Fe, aO as ps, aP as vt, aQ as xs, aR as Ot, aS as _r, aT as Tt, aU as Vt, aV as ze, aW as kn, aX as vs, aY as js, aZ as tt, a_ as ys, a$ as bs, b0 as ws, b1 as _s, b2 as Ns } from "./ResponsiveContextDropdown-CdpFpQxZ.js";
|
|
2
|
+
import { b6 as Wd, b7 as Ud, b4 as Gd, b3 as Yd, b8 as Kd, b9 as qd, b5 as Qd } from "./ResponsiveContextDropdown-CdpFpQxZ.js";
|
|
3
3
|
import * as oe from "react";
|
|
4
|
-
import Ce, { useCallback as C, useMemo as
|
|
5
|
-
import { c as Me, L as In } from "./Loading-
|
|
4
|
+
import Ce, { useCallback as C, useMemo as ne, useContext as Z, useRef as te, useEffect as R, useState as O, useId as Cs, Component as ks, isValidElement as Sn, Suspense as Ss, useReducer as Is, useLayoutEffect as Ds } from "react";
|
|
5
|
+
import { c as Me, L as In } from "./Loading-31doBIdE.js";
|
|
6
6
|
import { InteractionType as $s } from "@azure/msal-browser";
|
|
7
7
|
import { MsalAuthenticationTemplate as Es } from "@azure/msal-react";
|
|
8
8
|
import { useNavigate as Nr, Link as Je, Navigate as wt, generatePath as St, useParams as Fs } from "react-router-dom";
|
|
9
|
-
import { useFormContext as
|
|
9
|
+
import { useFormContext as We, Controller as mn } from "react-hook-form";
|
|
10
10
|
import { Pivot as Os } from "react-flexmonster";
|
|
11
|
-
import { S as Lt } from "./SimpleTooltip-
|
|
11
|
+
import { S as Lt } from "./SimpleTooltip-D0G41VQN.js";
|
|
12
12
|
import { u as Cr } from "./useClickOutside-BmlXg38T.js";
|
|
13
|
-
import { u as Ts, a as kr, b as Ls, c as Rs, d as As } from "./useClipboard-
|
|
13
|
+
import { u as Ts, a as kr, b as Ls, c as Rs, d as As } from "./useClipboard-Y0W8_RNe.js";
|
|
14
14
|
import It from "react-dom";
|
|
15
|
-
import { l as ht, s as tn } from "./searchUtils-
|
|
16
|
-
import { u as Ms } from "./useGetApiData-
|
|
17
|
-
import { F as Bs } from "./FullScreenContainer-
|
|
15
|
+
import { l as ht, s as tn } from "./searchUtils-Bz9T45BA.js";
|
|
16
|
+
import { u as Ms } from "./useGetApiData-B_2_aA4k.js";
|
|
17
|
+
import { F as Bs } from "./FullScreenContainer-ykoJS9e2.js";
|
|
18
18
|
const ed = ({ fileLoader: e, fileName: t, children: n }) => {
|
|
19
19
|
const a = C(async () => {
|
|
20
20
|
var c, l;
|
|
@@ -71,7 +71,7 @@ function Ht(e, t) {
|
|
|
71
71
|
const n = je(e), a = je(t);
|
|
72
72
|
return n.getFullYear() - a.getFullYear();
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function zs(e, t) {
|
|
75
75
|
const n = je(e), a = je(t), s = Fn(n, a), o = Math.abs(_t(n, a));
|
|
76
76
|
n.setDate(n.getDate() - s * o);
|
|
77
77
|
const i = +(Fn(n, a) === -s), c = s * (o - i);
|
|
@@ -98,7 +98,7 @@ function Tn(e, t, n) {
|
|
|
98
98
|
const a = gn(e, t) / Na;
|
|
99
99
|
return hn(n == null ? void 0 : n.roundingMethod)(a);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function zt(e, t, n) {
|
|
102
102
|
const a = gn(e, t) / 1e3;
|
|
103
103
|
return hn(n == null ? void 0 : n.roundingMethod)(a);
|
|
104
104
|
}
|
|
@@ -116,16 +116,16 @@ function nn(e, t) {
|
|
|
116
116
|
if (s !== "date") {
|
|
117
117
|
const u = n.getTimezoneOffset();
|
|
118
118
|
if (u !== 0) {
|
|
119
|
-
const h = Math.abs(u),
|
|
120
|
-
i = `${u < 0 ? "+" : "-"}${
|
|
119
|
+
const h = Math.abs(u), v = Ae(Math.trunc(h / 60), 2), b = Ae(h % 60, 2);
|
|
120
|
+
i = `${u < 0 ? "+" : "-"}${v}:${b}`;
|
|
121
121
|
} else
|
|
122
122
|
i = "Z";
|
|
123
|
-
const d = Ae(n.getHours(), 2), f = Ae(n.getMinutes(), 2),
|
|
124
|
-
o = `${o}${
|
|
123
|
+
const d = Ae(n.getHours(), 2), f = Ae(n.getMinutes(), 2), p = Ae(n.getSeconds(), 2), x = o === "" ? "" : "T", g = [d, f, p].join(l);
|
|
124
|
+
o = `${o}${x}${g}${i}`;
|
|
125
125
|
}
|
|
126
126
|
return o;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function Ws(e) {
|
|
129
129
|
const t = je(e), n = t.getFullYear(), a = t.getMonth(), s = pt(e, 0);
|
|
130
130
|
return s.setFullYear(n, a + 1, 0), s.setHours(0, 0, 0, 0), s.getDate();
|
|
131
131
|
}
|
|
@@ -133,10 +133,10 @@ function Us(e, t, n) {
|
|
|
133
133
|
let a = 0, s;
|
|
134
134
|
const o = je(e), i = je(t);
|
|
135
135
|
if (n != null && n.unit)
|
|
136
|
-
s = n == null ? void 0 : n.unit, s === "second" ? a =
|
|
136
|
+
s = n == null ? void 0 : n.unit, s === "second" ? a = zt(o, i) : s === "minute" ? a = Tn(o, i) : s === "hour" ? a = On(o, i) : s === "day" ? a = _t(o, i) : s === "week" ? a = En(o, i) : s === "month" ? a = Dn(o, i) : s === "quarter" ? a = Pt(o, i) : s === "year" && (a = Ht(o, i));
|
|
137
137
|
else {
|
|
138
|
-
const l =
|
|
139
|
-
Math.abs(l) < Ca ? (a =
|
|
138
|
+
const l = zt(o, i);
|
|
139
|
+
Math.abs(l) < Ca ? (a = zt(o, i), s = "second") : Math.abs(l) < ka ? (a = Tn(o, i), s = "minute") : Math.abs(l) < Sa && Math.abs(_t(o, i)) < 1 ? (a = On(o, i), s = "hour") : Math.abs(l) < Ia && (a = _t(o, i)) && Math.abs(a) < 7 ? s = "day" : Math.abs(l) < Da ? (a = En(o, i), s = "week") : Math.abs(l) < $a ? (a = Dn(o, i), s = "month") : Math.abs(l) < Ea && Pt(o, i) < 4 ? (a = Pt(o, i), s = "quarter") : (a = Ht(o, i), s = "year");
|
|
140
140
|
}
|
|
141
141
|
return new Intl.RelativeTimeFormat(n == null ? void 0 : n.locale, {
|
|
142
142
|
localeMatcher: n == null ? void 0 : n.localeMatcher,
|
|
@@ -147,7 +147,7 @@ function Us(e, t, n) {
|
|
|
147
147
|
function Gs(e, t) {
|
|
148
148
|
const n = je(e), a = n.getFullYear(), s = n.getDate(), o = pt(e, 0);
|
|
149
149
|
o.setFullYear(a, t, 15), o.setHours(0, 0, 0, 0);
|
|
150
|
-
const i =
|
|
150
|
+
const i = Ws(o);
|
|
151
151
|
return n.setMonth(t, Math.min(s, i)), n;
|
|
152
152
|
}
|
|
153
153
|
function Ir(e, t) {
|
|
@@ -191,41 +191,41 @@ const qs = {
|
|
|
191
191
|
timeout: u = 300,
|
|
192
192
|
mountOnEnter: d = !1,
|
|
193
193
|
unmountOnExit: f = !1,
|
|
194
|
-
appear:
|
|
195
|
-
getDimensionValue:
|
|
194
|
+
appear: p = !1,
|
|
195
|
+
getDimensionValue: x = Ks,
|
|
196
196
|
...g
|
|
197
197
|
}, h) => {
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
}, e), [
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
}, t), [
|
|
204
|
-
|
|
205
|
-
}, n), [
|
|
206
|
-
|
|
207
|
-
}, a), [a,
|
|
208
|
-
|
|
209
|
-
}, s), [
|
|
198
|
+
const v = typeof c == "function" ? c() : c, b = ne(() => mt((D) => {
|
|
199
|
+
D.style[v] = "0";
|
|
200
|
+
}, e), [v, e]), j = ne(() => mt((D) => {
|
|
201
|
+
const $ = `scroll${v[0].toUpperCase()}${v.slice(1)}`;
|
|
202
|
+
D.style[v] = `${D[$]}px`;
|
|
203
|
+
}, t), [v, t]), m = ne(() => mt((D) => {
|
|
204
|
+
D.style[v] = null;
|
|
205
|
+
}, n), [v, n]), y = ne(() => mt((D) => {
|
|
206
|
+
D.style[v] = `${x(v, D)}px`, Oa(D);
|
|
207
|
+
}, a), [a, x, v]), _ = ne(() => mt((D) => {
|
|
208
|
+
D.style[v] = null;
|
|
209
|
+
}, s), [v, s]);
|
|
210
210
|
return /* @__PURE__ */ r.jsx(or, {
|
|
211
211
|
ref: h,
|
|
212
212
|
addEndListener: ir,
|
|
213
213
|
...g,
|
|
214
214
|
"aria-expanded": g.role ? l : null,
|
|
215
215
|
onEnter: b,
|
|
216
|
-
onEntering:
|
|
216
|
+
onEntering: j,
|
|
217
217
|
onEntered: m,
|
|
218
|
-
onExit:
|
|
219
|
-
onExiting:
|
|
218
|
+
onExit: y,
|
|
219
|
+
onExiting: _,
|
|
220
220
|
childRef: i.ref,
|
|
221
221
|
in: l,
|
|
222
222
|
timeout: u,
|
|
223
223
|
mountOnEnter: d,
|
|
224
224
|
unmountOnExit: f,
|
|
225
|
-
appear:
|
|
226
|
-
children: (
|
|
227
|
-
|
|
228
|
-
className: w(o, i.props.className, qs[
|
|
225
|
+
appear: p,
|
|
226
|
+
children: (D, $) => /* @__PURE__ */ Ce.cloneElement(i, {
|
|
227
|
+
...$,
|
|
228
|
+
className: w(o, i.props.className, qs[D], v === "width" && "collapse-horizontal")
|
|
229
229
|
})
|
|
230
230
|
});
|
|
231
231
|
}), $r = $t("h4");
|
|
@@ -264,16 +264,16 @@ const Or = /* @__PURE__ */ oe.forwardRef((e, t) => {
|
|
|
264
264
|
onClose: u,
|
|
265
265
|
dismissible: d,
|
|
266
266
|
transition: f = Zt,
|
|
267
|
-
...
|
|
267
|
+
...p
|
|
268
268
|
} = dr(e, {
|
|
269
269
|
show: "onClose"
|
|
270
|
-
}),
|
|
270
|
+
}), x = me(n, "alert"), g = Et((b) => {
|
|
271
271
|
u && u(!1, b);
|
|
272
|
-
}), h = f === !0 ? Zt : f,
|
|
272
|
+
}), h = f === !0 ? Zt : f, v = /* @__PURE__ */ r.jsxs("div", {
|
|
273
273
|
role: "alert",
|
|
274
|
-
...h ? void 0 :
|
|
274
|
+
...h ? void 0 : p,
|
|
275
275
|
ref: t,
|
|
276
|
-
className: w(i,
|
|
276
|
+
className: w(i, x, l && `${x}-${l}`, d && `${x}-dismissible`),
|
|
277
277
|
children: [d && /* @__PURE__ */ r.jsx(La, {
|
|
278
278
|
onClick: g,
|
|
279
279
|
"aria-label": s,
|
|
@@ -282,11 +282,11 @@ const Or = /* @__PURE__ */ oe.forwardRef((e, t) => {
|
|
|
282
282
|
});
|
|
283
283
|
return h ? /* @__PURE__ */ r.jsx(h, {
|
|
284
284
|
unmountOnExit: !0,
|
|
285
|
-
...
|
|
285
|
+
...p,
|
|
286
286
|
ref: void 0,
|
|
287
287
|
in: a,
|
|
288
|
-
children:
|
|
289
|
-
}) : a ?
|
|
288
|
+
children: v
|
|
289
|
+
}) : a ? v : null;
|
|
290
290
|
});
|
|
291
291
|
Or.displayName = "Alert";
|
|
292
292
|
const Qs = Object.assign(Or, {
|
|
@@ -323,7 +323,7 @@ const Rr = /* @__PURE__ */ oe.forwardRef(({
|
|
|
323
323
|
as: n = "div",
|
|
324
324
|
...a
|
|
325
325
|
}, s) => {
|
|
326
|
-
const o = me(e, "card-header"), i =
|
|
326
|
+
const o = me(e, "card-header"), i = ne(() => ({
|
|
327
327
|
cardHeaderBsPrefix: o
|
|
328
328
|
}), [o]);
|
|
329
329
|
return /* @__PURE__ */ r.jsx(Lr.Provider, {
|
|
@@ -409,7 +409,7 @@ const Js = $t("h5"), Hr = /* @__PURE__ */ oe.forwardRef(({
|
|
|
409
409
|
...a
|
|
410
410
|
})));
|
|
411
411
|
Hr.displayName = "CardTitle";
|
|
412
|
-
const
|
|
412
|
+
const zr = /* @__PURE__ */ oe.forwardRef(({
|
|
413
413
|
bsPrefix: e,
|
|
414
414
|
className: t,
|
|
415
415
|
bg: n,
|
|
@@ -431,8 +431,8 @@ const Wr = /* @__PURE__ */ oe.forwardRef(({
|
|
|
431
431
|
}) : i
|
|
432
432
|
});
|
|
433
433
|
});
|
|
434
|
-
|
|
435
|
-
const Ln = Object.assign(
|
|
434
|
+
zr.displayName = "Card";
|
|
435
|
+
const Ln = Object.assign(zr, {
|
|
436
436
|
Img: Ar,
|
|
437
437
|
Title: Hr,
|
|
438
438
|
Subtitle: Vr,
|
|
@@ -463,7 +463,7 @@ const Xs = (e) => /* @__PURE__ */ r.jsx(Rt, {
|
|
|
463
463
|
type: "radio",
|
|
464
464
|
...e
|
|
465
465
|
})
|
|
466
|
-
}),
|
|
466
|
+
}), Wr = /* @__PURE__ */ oe.forwardRef(({
|
|
467
467
|
bsPrefix: e,
|
|
468
468
|
size: t,
|
|
469
469
|
hasValidation: n,
|
|
@@ -473,7 +473,7 @@ const Xs = (e) => /* @__PURE__ */ r.jsx(Rt, {
|
|
|
473
473
|
...o
|
|
474
474
|
}, i) => {
|
|
475
475
|
e = me(e, "input-group");
|
|
476
|
-
const c =
|
|
476
|
+
const c = ne(() => ({}), []);
|
|
477
477
|
return /* @__PURE__ */ r.jsx(Ra.Provider, {
|
|
478
478
|
value: c,
|
|
479
479
|
children: /* @__PURE__ */ r.jsx(s, {
|
|
@@ -483,8 +483,8 @@ const Xs = (e) => /* @__PURE__ */ r.jsx(Rt, {
|
|
|
483
483
|
})
|
|
484
484
|
});
|
|
485
485
|
});
|
|
486
|
-
|
|
487
|
-
const Nt = Object.assign(
|
|
486
|
+
Wr.displayName = "InputGroup";
|
|
487
|
+
const Nt = Object.assign(Wr, {
|
|
488
488
|
Text: Rt,
|
|
489
489
|
Radio: eo,
|
|
490
490
|
Checkbox: Xs
|
|
@@ -513,8 +513,8 @@ function Gr({
|
|
|
513
513
|
};
|
|
514
514
|
if (c) {
|
|
515
515
|
!s && c.role === "tablist" && (d.role = "tab");
|
|
516
|
-
const f = c.getControllerId(e ?? null),
|
|
517
|
-
d[on("event-key")] = e, d.id = f || a, u = n == null && e != null ? c.activeKey === e : n, (u || !(l != null && l.unmountOnExit) && !(l != null && l.mountOnEnter)) && (d["aria-controls"] =
|
|
516
|
+
const f = c.getControllerId(e ?? null), p = c.getControlledId(e ?? null);
|
|
517
|
+
d[on("event-key")] = e, d.id = f || a, u = n == null && e != null ? c.activeKey === e : n, (u || !(l != null && l.unmountOnExit) && !(l != null && l.mountOnEnter)) && (d["aria-controls"] = p);
|
|
518
518
|
}
|
|
519
519
|
return d.role === "tab" && (d["aria-selected"] = u, u || (d.tabIndex = -1), o && (d.tabIndex = -1, d["aria-disabled"] = !0)), d.onClick = Et((f) => {
|
|
520
520
|
o || (t == null || t(f), e != null && i && !f.isPropagationStopped() && i(e, f));
|
|
@@ -557,59 +557,59 @@ const Rn = () => {
|
|
|
557
557
|
role: o,
|
|
558
558
|
onKeyDown: i
|
|
559
559
|
} = e, c = so(e, ao);
|
|
560
|
-
const l = Ma(), u =
|
|
561
|
-
let
|
|
562
|
-
f && (o = o || "tablist", s = f.activeKey,
|
|
563
|
-
const g =
|
|
564
|
-
const
|
|
565
|
-
if (!
|
|
566
|
-
const
|
|
567
|
-
if (!
|
|
568
|
-
const
|
|
569
|
-
if (
|
|
570
|
-
let
|
|
571
|
-
return
|
|
572
|
-
},
|
|
573
|
-
m != null && (a == null || a(m,
|
|
560
|
+
const l = Ma(), u = te(!1), d = Z(Jt), f = Z(Ur);
|
|
561
|
+
let p, x;
|
|
562
|
+
f && (o = o || "tablist", s = f.activeKey, p = f.getControlledId, x = f.getControllerId);
|
|
563
|
+
const g = te(null), h = (m) => {
|
|
564
|
+
const y = g.current;
|
|
565
|
+
if (!y) return null;
|
|
566
|
+
const _ = Pa(y, `[${An}]:not([aria-disabled=true])`), D = y.querySelector("[aria-selected=true]");
|
|
567
|
+
if (!D || D !== document.activeElement) return null;
|
|
568
|
+
const $ = _.indexOf(D);
|
|
569
|
+
if ($ === -1) return null;
|
|
570
|
+
let S = $ + m;
|
|
571
|
+
return S >= _.length && (S = 0), S < 0 && (S = _.length - 1), _[S];
|
|
572
|
+
}, v = (m, y) => {
|
|
573
|
+
m != null && (a == null || a(m, y), d == null || d(m, y));
|
|
574
574
|
}, b = (m) => {
|
|
575
575
|
if (i == null || i(m), !f)
|
|
576
576
|
return;
|
|
577
|
-
let
|
|
577
|
+
let y;
|
|
578
578
|
switch (m.key) {
|
|
579
579
|
case "ArrowLeft":
|
|
580
580
|
case "ArrowUp":
|
|
581
|
-
|
|
581
|
+
y = h(-1);
|
|
582
582
|
break;
|
|
583
583
|
case "ArrowRight":
|
|
584
584
|
case "ArrowDown":
|
|
585
|
-
|
|
585
|
+
y = h(1);
|
|
586
586
|
break;
|
|
587
587
|
default:
|
|
588
588
|
return;
|
|
589
589
|
}
|
|
590
|
-
|
|
590
|
+
y && (m.preventDefault(), v(y.dataset[Va("EventKey")] || null, m), u.current = !0, l());
|
|
591
591
|
};
|
|
592
|
-
|
|
592
|
+
R(() => {
|
|
593
593
|
if (g.current && u.current) {
|
|
594
594
|
const m = g.current.querySelector(`[${An}][aria-selected=true]`);
|
|
595
595
|
m == null || m.focus();
|
|
596
596
|
}
|
|
597
597
|
u.current = !1;
|
|
598
598
|
});
|
|
599
|
-
const
|
|
599
|
+
const j = Ba(t, g);
|
|
600
600
|
return /* @__PURE__ */ r.jsx(Jt.Provider, {
|
|
601
|
-
value:
|
|
601
|
+
value: v,
|
|
602
602
|
children: /* @__PURE__ */ r.jsx(fr.Provider, {
|
|
603
603
|
value: {
|
|
604
604
|
role: o,
|
|
605
605
|
// used by NavLink to determine it's role
|
|
606
606
|
activeKey: ln(s),
|
|
607
|
-
getControlledId:
|
|
608
|
-
getControllerId:
|
|
607
|
+
getControlledId: p || Rn,
|
|
608
|
+
getControllerId: x || Rn
|
|
609
609
|
},
|
|
610
610
|
children: /* @__PURE__ */ r.jsx(n, Object.assign({}, c, {
|
|
611
611
|
onKeyDown: b,
|
|
612
|
-
ref:
|
|
612
|
+
ref: j,
|
|
613
613
|
role: o
|
|
614
614
|
}))
|
|
615
615
|
})
|
|
@@ -634,7 +634,7 @@ const oo = Object.assign(Kr, {
|
|
|
634
634
|
key: ln(a, l.href),
|
|
635
635
|
active: t,
|
|
636
636
|
...l
|
|
637
|
-
}),
|
|
637
|
+
}), p = Et((g) => {
|
|
638
638
|
if (n) {
|
|
639
639
|
g.preventDefault(), g.stopPropagation();
|
|
640
640
|
return;
|
|
@@ -642,12 +642,12 @@ const oo = Object.assign(Kr, {
|
|
|
642
642
|
d.onClick(g);
|
|
643
643
|
});
|
|
644
644
|
n && l.tabIndex === void 0 && (l.tabIndex = -1, l["aria-disabled"] = !0);
|
|
645
|
-
const
|
|
646
|
-
return process.env.NODE_ENV !== "production" && mr(c || !(!i && l.href), "`action=false` and `href` should not be used together."), /* @__PURE__ */ r.jsx(
|
|
645
|
+
const x = c || (i ? l.href ? "a" : "button" : "div");
|
|
646
|
+
return process.env.NODE_ENV !== "production" && mr(c || !(!i && l.href), "`action=false` and `href` should not be used together."), /* @__PURE__ */ r.jsx(x, {
|
|
647
647
|
ref: u,
|
|
648
648
|
...l,
|
|
649
649
|
...d,
|
|
650
|
-
onClick:
|
|
650
|
+
onClick: p,
|
|
651
651
|
className: w(s, e, f.isActive && "active", n && "disabled", o && `${e}-${o}`, i && `${e}-action`)
|
|
652
652
|
});
|
|
653
653
|
});
|
|
@@ -720,7 +720,7 @@ function co(e) {
|
|
|
720
720
|
typeof c == "object" ? (d = c, u = l, l = !0) : (l = l || !0, d = {
|
|
721
721
|
[c]: l
|
|
722
722
|
});
|
|
723
|
-
let f =
|
|
723
|
+
let f = ne(() => Object.entries(d).reduce((p, [x, g]) => ((g === "up" || g === !0) && (p = n(p, o(x))), (g === "down" || g === !0) && (p = n(p, s(x))), p), ""), [JSON.stringify(d)]);
|
|
724
724
|
return lo(f, u);
|
|
725
725
|
}
|
|
726
726
|
return i;
|
|
@@ -776,7 +776,7 @@ const Jr = /* @__PURE__ */ oe.forwardRef(({
|
|
|
776
776
|
closeLabel: n = "Close",
|
|
777
777
|
closeButton: a = !1,
|
|
778
778
|
...s
|
|
779
|
-
}, o) => (e = me(e, "offcanvas-header"), /* @__PURE__ */ r.jsx(
|
|
779
|
+
}, o) => (e = me(e, "offcanvas-header"), /* @__PURE__ */ r.jsx(za, {
|
|
780
780
|
ref: o,
|
|
781
781
|
...s,
|
|
782
782
|
className: w(t, e),
|
|
@@ -819,82 +819,82 @@ const ea = /* @__PURE__ */ oe.forwardRef(({
|
|
|
819
819
|
scroll: u = !1,
|
|
820
820
|
onEscapeKeyDown: d,
|
|
821
821
|
onShow: f,
|
|
822
|
-
onHide:
|
|
823
|
-
container:
|
|
822
|
+
onHide: p,
|
|
823
|
+
container: x,
|
|
824
824
|
autoFocus: g = !0,
|
|
825
825
|
enforceFocus: h = !0,
|
|
826
|
-
restoreFocus:
|
|
826
|
+
restoreFocus: v = !0,
|
|
827
827
|
restoreFocusOptions: b,
|
|
828
|
-
onEntered:
|
|
828
|
+
onEntered: j,
|
|
829
829
|
onExit: m,
|
|
830
|
-
onExiting:
|
|
831
|
-
onEnter:
|
|
832
|
-
onEntering:
|
|
833
|
-
onExited:
|
|
834
|
-
backdropClassName:
|
|
830
|
+
onExiting: y,
|
|
831
|
+
onEnter: _,
|
|
832
|
+
onEntering: D,
|
|
833
|
+
onExited: $,
|
|
834
|
+
backdropClassName: S,
|
|
835
835
|
manager: F,
|
|
836
|
-
renderStaticNode:
|
|
837
|
-
|
|
838
|
-
},
|
|
839
|
-
const P =
|
|
836
|
+
renderStaticNode: I = !1,
|
|
837
|
+
...E
|
|
838
|
+
}, N) => {
|
|
839
|
+
const P = te();
|
|
840
840
|
e = me(e, "offcanvas");
|
|
841
841
|
const {
|
|
842
842
|
onToggle: U
|
|
843
|
-
} = Z(
|
|
844
|
-
|
|
845
|
-
|
|
843
|
+
} = Z(Wa) || {}, [H, A] = O(!1), L = uo(o || "xs", "up");
|
|
844
|
+
R(() => {
|
|
845
|
+
A(o ? i && !L : i);
|
|
846
846
|
}, [i, o, L]);
|
|
847
847
|
const V = Et(() => {
|
|
848
|
-
U == null || U(),
|
|
849
|
-
}),
|
|
848
|
+
U == null || U(), p == null || p();
|
|
849
|
+
}), G = ne(() => ({
|
|
850
850
|
onHide: V
|
|
851
851
|
}), [V]);
|
|
852
|
-
function
|
|
852
|
+
function K() {
|
|
853
853
|
return F || (u ? (P.current || (P.current = new Ya({
|
|
854
854
|
handleContainerOverflow: !1
|
|
855
855
|
})), P.current) : Ka());
|
|
856
856
|
}
|
|
857
|
-
const q = (
|
|
858
|
-
|
|
859
|
-
},
|
|
860
|
-
|
|
861
|
-
},
|
|
862
|
-
...
|
|
863
|
-
className: w(`${e}-backdrop`,
|
|
864
|
-
}), [
|
|
865
|
-
...
|
|
866
|
-
|
|
857
|
+
const q = (W, ...le) => {
|
|
858
|
+
W && (W.style.visibility = "visible"), _ == null || _(W, ...le);
|
|
859
|
+
}, ee = (W, ...le) => {
|
|
860
|
+
W && (W.style.visibility = ""), $ == null || $(...le);
|
|
861
|
+
}, B = C((W) => /* @__PURE__ */ r.jsx("div", {
|
|
862
|
+
...W,
|
|
863
|
+
className: w(`${e}-backdrop`, S)
|
|
864
|
+
}), [S, e]), k = (W) => /* @__PURE__ */ r.jsx("div", {
|
|
865
|
+
...W,
|
|
866
|
+
...E,
|
|
867
867
|
className: w(t, o ? `${e}-${o}` : e, `${e}-${s}`),
|
|
868
868
|
"aria-labelledby": a,
|
|
869
869
|
children: n
|
|
870
870
|
});
|
|
871
871
|
return /* @__PURE__ */ r.jsxs(r.Fragment, {
|
|
872
|
-
children: [!H && (o ||
|
|
873
|
-
value:
|
|
872
|
+
children: [!H && (o || I) && k({}), /* @__PURE__ */ r.jsx(Ua.Provider, {
|
|
873
|
+
value: G,
|
|
874
874
|
children: /* @__PURE__ */ r.jsx(Ga, {
|
|
875
875
|
show: H,
|
|
876
|
-
ref:
|
|
876
|
+
ref: N,
|
|
877
877
|
backdrop: c,
|
|
878
|
-
container:
|
|
878
|
+
container: x,
|
|
879
879
|
keyboard: l,
|
|
880
880
|
autoFocus: g,
|
|
881
881
|
enforceFocus: h && !u,
|
|
882
|
-
restoreFocus:
|
|
882
|
+
restoreFocus: v,
|
|
883
883
|
restoreFocusOptions: b,
|
|
884
884
|
onEscapeKeyDown: d,
|
|
885
885
|
onShow: f,
|
|
886
886
|
onHide: V,
|
|
887
887
|
onEnter: q,
|
|
888
|
-
onEntering:
|
|
889
|
-
onEntered:
|
|
888
|
+
onEntering: D,
|
|
889
|
+
onEntered: j,
|
|
890
890
|
onExit: m,
|
|
891
|
-
onExiting:
|
|
892
|
-
onExited:
|
|
893
|
-
manager:
|
|
891
|
+
onExiting: y,
|
|
892
|
+
onExited: ee,
|
|
893
|
+
manager: K(),
|
|
894
894
|
transition: ho,
|
|
895
895
|
backdropTransition: go,
|
|
896
|
-
renderBackdrop:
|
|
897
|
-
renderDialog:
|
|
896
|
+
renderBackdrop: B,
|
|
897
|
+
renderDialog: k
|
|
898
898
|
})
|
|
899
899
|
})]
|
|
900
900
|
});
|
|
@@ -1003,18 +1003,18 @@ const td = ({ heading: e, content: t, placement: n, children: a, trigger: s, pop
|
|
|
1003
1003
|
/* @__PURE__ */ r.jsx("label", { htmlFor: i, className: w("btn luminus-context-button text-primary", `btn-${s}`, a), children: n }),
|
|
1004
1004
|
/* @__PURE__ */ r.jsx("input", { id: i, type: "file", accept: t, onChange: o, hidden: !0 })
|
|
1005
1005
|
] });
|
|
1006
|
-
}, xo = "_select_dlv1t_1",
|
|
1006
|
+
}, xo = "_select_dlv1t_1", Wt = {
|
|
1007
1007
|
select: xo
|
|
1008
1008
|
}, vo = ({ month: e, onChangeMonth: t, locale: n, yearMin: a = 2e3, yearMax: s = 2050 }) => {
|
|
1009
1009
|
const o = C((l) => {
|
|
1010
1010
|
const u = Sr(e, l);
|
|
1011
1011
|
u.getFullYear() < a || u.getFullYear() > s || t(u);
|
|
1012
|
-
}, [e, t, a, s]), i =
|
|
1012
|
+
}, [e, t, a, s]), i = ne(() => {
|
|
1013
1013
|
const l = [];
|
|
1014
1014
|
for (let u = a; u <= s; u++)
|
|
1015
1015
|
l.push(u);
|
|
1016
1016
|
return l;
|
|
1017
|
-
}, [a, s]), c =
|
|
1017
|
+
}, [a, s]), c = ne(() => {
|
|
1018
1018
|
const d = [];
|
|
1019
1019
|
for (let f = 0; f <= 11; f++)
|
|
1020
1020
|
d.push({
|
|
@@ -1024,16 +1024,16 @@ const td = ({ heading: e, content: t, placement: n, children: a, trigger: s, pop
|
|
|
1024
1024
|
return d;
|
|
1025
1025
|
}, [n]);
|
|
1026
1026
|
return /* @__PURE__ */ r.jsxs("div", { className: "card d-flex flex-row align-items-center m-0 p-1 gap-2", children: [
|
|
1027
|
-
/* @__PURE__ */ r.jsx(
|
|
1027
|
+
/* @__PURE__ */ r.jsx(re, { onClick: () => o(-1), disabled: e.getFullYear() < a || e.getFullYear() === a && e.getMonth() <= 0, children: /* @__PURE__ */ r.jsx(cn, {}) }),
|
|
1028
1028
|
/* @__PURE__ */ r.jsx(be.Select, { value: e.getMonth(), onChange: (l) => {
|
|
1029
1029
|
var u;
|
|
1030
1030
|
return ((u = l.target) == null ? void 0 : u.value) && t(Gs(e, Number(l.target.value)));
|
|
1031
|
-
}, className: w(
|
|
1031
|
+
}, className: w(Wt.select, Wt.month), children: c.map((l) => /* @__PURE__ */ r.jsx("option", { value: l.id, children: l.name }, l.id)) }),
|
|
1032
1032
|
/* @__PURE__ */ r.jsx(be.Select, { value: e.getFullYear(), onChange: (l) => {
|
|
1033
1033
|
var u;
|
|
1034
1034
|
return ((u = l.target) == null ? void 0 : u.value) && t(Ir(e, Number(l.target.value)));
|
|
1035
|
-
}, className: w(
|
|
1036
|
-
/* @__PURE__ */ r.jsx(
|
|
1035
|
+
}, className: w(Wt.select), children: i.map((l) => /* @__PURE__ */ r.jsx("option", { value: l, children: l }, l)) }),
|
|
1036
|
+
/* @__PURE__ */ r.jsx(re, { onClick: () => o(1), disabled: e.getFullYear() > s || e.getFullYear() === s && e.getMonth() >= 11, children: /* @__PURE__ */ r.jsx(dn, {}) })
|
|
1037
1037
|
] });
|
|
1038
1038
|
}, jo = "_select_pywmr_1", yo = {
|
|
1039
1039
|
select: jo
|
|
@@ -1041,19 +1041,19 @@ const td = ({ heading: e, content: t, placement: n, children: a, trigger: s, pop
|
|
|
1041
1041
|
const o = C((c) => {
|
|
1042
1042
|
const l = e.getFullYear() + c;
|
|
1043
1043
|
l < n || l > a || t(Ps(e, c));
|
|
1044
|
-
}, [e, t, a, n]), i =
|
|
1044
|
+
}, [e, t, a, n]), i = ne(() => {
|
|
1045
1045
|
const c = [];
|
|
1046
1046
|
for (let l = n; l <= a; l++)
|
|
1047
1047
|
c.push(l);
|
|
1048
1048
|
return c;
|
|
1049
1049
|
}, [n, a]);
|
|
1050
1050
|
return /* @__PURE__ */ r.jsxs("div", { className: w("card d-flex flex-row align-items-center m-0 p-1 gap-2", s ?? ""), children: [
|
|
1051
|
-
/* @__PURE__ */ r.jsx(
|
|
1051
|
+
/* @__PURE__ */ r.jsx(re, { onClick: () => o(-1), disabled: e.getFullYear() <= n, children: /* @__PURE__ */ r.jsx(cn, {}) }),
|
|
1052
1052
|
/* @__PURE__ */ r.jsx(be.Select, { value: e.getFullYear(), onChange: (c) => {
|
|
1053
1053
|
var l;
|
|
1054
1054
|
return ((l = c.target) == null ? void 0 : l.value) && t(Ir(e, Number(c.target.value)));
|
|
1055
1055
|
}, className: yo.select, children: i.map((c) => /* @__PURE__ */ r.jsx("option", { value: c, children: c }, c)) }),
|
|
1056
|
-
/* @__PURE__ */ r.jsx(
|
|
1056
|
+
/* @__PURE__ */ r.jsx(re, { onClick: () => o(1), disabled: e.getFullYear() >= a, children: /* @__PURE__ */ r.jsx(dn, {}) })
|
|
1057
1057
|
] });
|
|
1058
1058
|
}, wo = "_widget_etgh3_1", _o = {
|
|
1059
1059
|
widget: wo
|
|
@@ -1063,14 +1063,14 @@ const td = ({ heading: e, content: t, placement: n, children: a, trigger: s, pop
|
|
|
1063
1063
|
] }), Vn = ({ availableWidgets: e, onAdd: t, texts: n }) => {
|
|
1064
1064
|
const [a, s] = O(!1);
|
|
1065
1065
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1066
|
-
/* @__PURE__ */ r.jsx("div", { className: w("luminus-empty-widget", _o.widget), children: /* @__PURE__ */ r.jsx(
|
|
1066
|
+
/* @__PURE__ */ r.jsx("div", { className: w("luminus-empty-widget", _o.widget), children: /* @__PURE__ */ r.jsx(re, { onClick: () => s(!0), children: /* @__PURE__ */ r.jsx(es, {}) }) }),
|
|
1067
1067
|
/* @__PURE__ */ r.jsx(No, { show: a, widgets: e, handleClose: () => s(!1), onWidgetPicked: (o) => {
|
|
1068
1068
|
s(!1), t(o);
|
|
1069
1069
|
}, texts: n })
|
|
1070
1070
|
] });
|
|
1071
1071
|
}, Co = (e) => {
|
|
1072
1072
|
const [t, n] = O({ widgets: [] });
|
|
1073
|
-
|
|
1073
|
+
R(() => {
|
|
1074
1074
|
const s = localStorage.getItem("dashboardConfig");
|
|
1075
1075
|
s ? n(JSON.parse(s)) : e && n(e);
|
|
1076
1076
|
}, [e]);
|
|
@@ -1147,37 +1147,37 @@ const Lo = (e) => (n) => {
|
|
|
1147
1147
|
return /* @__PURE__ */ r.jsx(Ro, { fallback: /* @__PURE__ */ r.jsx(Pn, { title: t, children: n.fallbackError }), reloadButtonDisplay: "inject-to-child", navigateBack: () => a(-1), children: /* @__PURE__ */ r.jsx(Ss, { fallback: /* @__PURE__ */ r.jsx(Pn, { title: t, children: /* @__PURE__ */ r.jsx(Vs, {}) }), children: e }) });
|
|
1148
1148
|
}, rd = ({ availableWidgets: e, editMode: t, defaultDashboardConfig: n }) => {
|
|
1149
1149
|
var d;
|
|
1150
|
-
const { texts: { homeDashboard: a } } = Z(pe), { dashboardConfig: s, onChangeDashboardConfig: o } = Co(n), i = C((f,
|
|
1151
|
-
var
|
|
1152
|
-
f === ((
|
|
1150
|
+
const { texts: { homeDashboard: a } } = Z(pe), { dashboardConfig: s, onChangeDashboardConfig: o } = Co(n), i = C((f, p) => {
|
|
1151
|
+
var x, g;
|
|
1152
|
+
f === ((x = s.widgets) == null ? void 0 : x.length) ? o({
|
|
1153
1153
|
...s,
|
|
1154
|
-
widgets: [...s.widgets, { widgetId:
|
|
1154
|
+
widgets: [...s.widgets, { widgetId: p, fullWidth: !1 }]
|
|
1155
1155
|
}) : o({
|
|
1156
1156
|
...s,
|
|
1157
|
-
widgets: ((g = s.widgets) == null ? void 0 : g.map((h,
|
|
1157
|
+
widgets: ((g = s.widgets) == null ? void 0 : g.map((h, v) => v === f ? { widgetId: p, fullWidth: !1 } : h)) ?? []
|
|
1158
1158
|
});
|
|
1159
1159
|
}, [s, o]), c = C((f) => {
|
|
1160
|
-
var
|
|
1161
|
-
((
|
|
1160
|
+
var p, x;
|
|
1161
|
+
((p = s.widgets[f]) == null ? void 0 : p.widgetId) === -1 ? o({
|
|
1162
1162
|
...s,
|
|
1163
|
-
widgets: ((
|
|
1163
|
+
widgets: ((x = s.widgets) == null ? void 0 : x.filter((g, h) => h !== f)) ?? []
|
|
1164
1164
|
}) : i(f, -1);
|
|
1165
1165
|
}, [s, o, i]), l = C((f) => {
|
|
1166
|
-
var
|
|
1166
|
+
var p;
|
|
1167
1167
|
o({
|
|
1168
1168
|
...s,
|
|
1169
|
-
widgets: ((
|
|
1169
|
+
widgets: ((p = s.widgets) == null ? void 0 : p.map((x, g) => g === f ? { ...x, fullWidth: !x.fullWidth } : x)) ?? []
|
|
1170
1170
|
});
|
|
1171
|
-
}, [s, o]), u = C((f,
|
|
1171
|
+
}, [s, o]), u = C((f, p, x) => f ? /* @__PURE__ */ r.jsxs("div", { className: w(Te.widgetWrapper, {
|
|
1172
1172
|
[Te.widgetEdit]: t && f.id !== -1
|
|
1173
|
-
}, { [Te.fullWidth]:
|
|
1173
|
+
}, { [Te.fullWidth]: x }), children: [
|
|
1174
1174
|
t && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1175
|
-
/* @__PURE__ */ r.jsx(
|
|
1176
|
-
/* @__PURE__ */ r.jsx(
|
|
1175
|
+
/* @__PURE__ */ r.jsx(re, { color: "danger", onClick: () => c(p), className: w(Te.removeIcon), children: /* @__PURE__ */ r.jsx(gr, {}) }),
|
|
1176
|
+
/* @__PURE__ */ r.jsx(re, { color: x ? "danger" : "primary", onClick: () => l(p), className: w(Te.fullWidthIcon), children: /* @__PURE__ */ r.jsx(ts, {}) })
|
|
1177
1177
|
] }),
|
|
1178
|
-
f.id === -1 ? t && /* @__PURE__ */ r.jsx("div", { className: Te.widgetWrapper, children: /* @__PURE__ */ r.jsx(Vn, { availableWidgets: e, onAdd: (g) => i(
|
|
1178
|
+
f.id === -1 ? t && /* @__PURE__ */ r.jsx("div", { className: Te.widgetWrapper, children: /* @__PURE__ */ r.jsx(Vn, { availableWidgets: e, onAdd: (g) => i(p, g), texts: a }) }) : /* @__PURE__ */ r.jsx(Bo, { title: f.title, children: /* @__PURE__ */ r.jsx(f.WidgetElement, { title: f.title }) }),
|
|
1179
1179
|
f.id > -1 && t && /* @__PURE__ */ r.jsx("div", { className: Te.widgetEditOverlay })
|
|
1180
|
-
] },
|
|
1180
|
+
] }, p) : /* @__PURE__ */ r.jsx(r.Fragment, {}), [
|
|
1181
1181
|
t,
|
|
1182
1182
|
i,
|
|
1183
1183
|
c,
|
|
@@ -1186,25 +1186,25 @@ const Lo = (e) => (n) => {
|
|
|
1186
1186
|
a
|
|
1187
1187
|
]);
|
|
1188
1188
|
return /* @__PURE__ */ r.jsx("div", { className: Te.dashboard, children: /* @__PURE__ */ r.jsxs("div", { className: Te.widgetsGrid, children: [
|
|
1189
|
-
(d = s.widgets) == null ? void 0 : d.map((f,
|
|
1189
|
+
(d = s.widgets) == null ? void 0 : d.map((f, p) => u(e.find((x) => x.id === f.widgetId), p, f.fullWidth)),
|
|
1190
1190
|
t && /* @__PURE__ */ r.jsx(Vn, { availableWidgets: e, onAdd: (f) => {
|
|
1191
|
-
var
|
|
1192
|
-
return i((
|
|
1191
|
+
var p;
|
|
1192
|
+
return i((p = s.widgets) == null ? void 0 : p.length, f);
|
|
1193
1193
|
}, texts: a })
|
|
1194
1194
|
] }) });
|
|
1195
|
-
}, Vo = "_badge_193ci_1", Po = "_sm_193ci_6", Ho = "_md_193ci_10",
|
|
1195
|
+
}, Vo = "_badge_193ci_1", Po = "_sm_193ci_6", Ho = "_md_193ci_10", zo = "_lg_193ci_14", Wo = "_light_193ci_18", Ut = {
|
|
1196
1196
|
badge: Vo,
|
|
1197
1197
|
sm: Po,
|
|
1198
1198
|
md: Ho,
|
|
1199
|
-
lg:
|
|
1200
|
-
light:
|
|
1199
|
+
lg: zo,
|
|
1200
|
+
light: Wo
|
|
1201
1201
|
}, ad = ({ children: e, color: t = "primary", size: n = "md", rounded: a, className: s, ...o }) => /* @__PURE__ */ r.jsx("span", { className: w(`luminus-badge badge bg-${t} ${s ?? ""}`, { "rounded-pill": a }, { "text-dark": t === "light" }, { [Ut.light]: t === "light" }, Ut.badge, Ut[n]), ...o, children: e }), Uo = "_collapse-icon_1ahhn_1", Go = "_collapsed_1ahhn_6", Hn = {
|
|
1202
1202
|
"collapse-icon": "_collapse-icon_1ahhn_1",
|
|
1203
1203
|
collapseIcon: Uo,
|
|
1204
1204
|
collapsed: Go
|
|
1205
1205
|
}, Yo = ({ title: e, children: t, className: n, ...a }) => {
|
|
1206
1206
|
const s = a.controlled ? !1 : a.defaultOpen ?? !1, [o, i] = O(s), c = a.controlled ? a.isOpen : o;
|
|
1207
|
-
return
|
|
1207
|
+
return R(() => {
|
|
1208
1208
|
i(s);
|
|
1209
1209
|
}, [s]), /* @__PURE__ */ r.jsxs("div", { className: n ?? "", children: [
|
|
1210
1210
|
/* @__PURE__ */ r.jsxs("div", { role: "button", className: "d-flex align-items-center justify-content-between pb-3 pt-2", onClick: () => a.controlled ? a.onToggle(!a.isOpen) : i(!o), children: [
|
|
@@ -1218,54 +1218,54 @@ const Lo = (e) => (n) => {
|
|
|
1218
1218
|
] });
|
|
1219
1219
|
};
|
|
1220
1220
|
function Ko(e, t, n) {
|
|
1221
|
-
var a = this, s =
|
|
1221
|
+
var a = this, s = te(null), o = te(0), i = te(null), c = te([]), l = te(), u = te(), d = te(e), f = te(!0);
|
|
1222
1222
|
d.current = e;
|
|
1223
|
-
var
|
|
1223
|
+
var p = typeof window < "u", x = !t && t !== 0 && p;
|
|
1224
1224
|
if (typeof e != "function") throw new TypeError("Expected a function");
|
|
1225
1225
|
t = +t || 0;
|
|
1226
|
-
var g = !!(n = n || {}).leading, h = !("trailing" in n) || !!n.trailing,
|
|
1227
|
-
|
|
1226
|
+
var g = !!(n = n || {}).leading, h = !("trailing" in n) || !!n.trailing, v = "maxWait" in n, b = "debounceOnServer" in n && !!n.debounceOnServer, j = v ? Math.max(+n.maxWait || 0, t) : null;
|
|
1227
|
+
R(function() {
|
|
1228
1228
|
return f.current = !0, function() {
|
|
1229
1229
|
f.current = !1;
|
|
1230
1230
|
};
|
|
1231
1231
|
}, []);
|
|
1232
|
-
var m =
|
|
1233
|
-
var
|
|
1234
|
-
var
|
|
1235
|
-
return c.current = l.current = null, o.current =
|
|
1236
|
-
},
|
|
1237
|
-
|
|
1238
|
-
},
|
|
1232
|
+
var m = ne(function() {
|
|
1233
|
+
var y = function(I) {
|
|
1234
|
+
var E = c.current, N = l.current;
|
|
1235
|
+
return c.current = l.current = null, o.current = I, u.current = d.current.apply(N, E);
|
|
1236
|
+
}, _ = function(I, E) {
|
|
1237
|
+
x && cancelAnimationFrame(i.current), i.current = x ? requestAnimationFrame(I) : setTimeout(I, E);
|
|
1238
|
+
}, D = function(I) {
|
|
1239
1239
|
if (!f.current) return !1;
|
|
1240
|
-
var
|
|
1241
|
-
return !s.current ||
|
|
1242
|
-
},
|
|
1243
|
-
return i.current = null, h && c.current ?
|
|
1244
|
-
},
|
|
1245
|
-
var
|
|
1246
|
-
if (
|
|
1240
|
+
var E = I - s.current;
|
|
1241
|
+
return !s.current || E >= t || E < 0 || v && I - o.current >= j;
|
|
1242
|
+
}, $ = function(I) {
|
|
1243
|
+
return i.current = null, h && c.current ? y(I) : (c.current = l.current = null, u.current);
|
|
1244
|
+
}, S = function I() {
|
|
1245
|
+
var E = Date.now();
|
|
1246
|
+
if (D(E)) return $(E);
|
|
1247
1247
|
if (f.current) {
|
|
1248
|
-
var
|
|
1249
|
-
|
|
1248
|
+
var N = t - (E - s.current), P = v ? Math.min(N, j - (E - o.current)) : N;
|
|
1249
|
+
_(I, P);
|
|
1250
1250
|
}
|
|
1251
1251
|
}, F = function() {
|
|
1252
|
-
if (
|
|
1253
|
-
var
|
|
1254
|
-
if (c.current = [].slice.call(arguments), l.current = a, s.current =
|
|
1255
|
-
if (!i.current && f.current) return o.current = s.current,
|
|
1256
|
-
if (
|
|
1252
|
+
if (p || b) {
|
|
1253
|
+
var I = Date.now(), E = D(I);
|
|
1254
|
+
if (c.current = [].slice.call(arguments), l.current = a, s.current = I, E) {
|
|
1255
|
+
if (!i.current && f.current) return o.current = s.current, _(S, t), g ? y(s.current) : u.current;
|
|
1256
|
+
if (v) return _(S, t), y(s.current);
|
|
1257
1257
|
}
|
|
1258
|
-
return i.current ||
|
|
1258
|
+
return i.current || _(S, t), u.current;
|
|
1259
1259
|
}
|
|
1260
1260
|
};
|
|
1261
1261
|
return F.cancel = function() {
|
|
1262
|
-
i.current && (
|
|
1262
|
+
i.current && (x ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), o.current = 0, c.current = s.current = l.current = i.current = null;
|
|
1263
1263
|
}, F.isPending = function() {
|
|
1264
1264
|
return !!i.current;
|
|
1265
1265
|
}, F.flush = function() {
|
|
1266
|
-
return i.current ?
|
|
1266
|
+
return i.current ? $(Date.now()) : u.current;
|
|
1267
1267
|
}, F;
|
|
1268
|
-
}, [g,
|
|
1268
|
+
}, [g, v, t, j, h, x, p, b]);
|
|
1269
1269
|
return m;
|
|
1270
1270
|
}
|
|
1271
1271
|
function qo(e, t) {
|
|
@@ -1277,7 +1277,7 @@ function Qo(e, t) {
|
|
|
1277
1277
|
function sa(e, t, n) {
|
|
1278
1278
|
var a = qo, s = Is(Qo, e), o = s[0], i = s[1], c = Ko(C(function(u) {
|
|
1279
1279
|
return i(u);
|
|
1280
|
-
}, [i]), t, n), l =
|
|
1280
|
+
}, [i]), t, n), l = te(e);
|
|
1281
1281
|
return a(l.current, e) || (c(e), l.current = e), a(o, e) && c.cancel(), [o, c];
|
|
1282
1282
|
}
|
|
1283
1283
|
const Zo = "_wrapper_1kgb8_1", Jo = "_open_1kgb8_9", Xo = "_dropdown_1kgb8_13", ei = "_search-input-container_1kgb8_19", ti = "_search-input_1kgb8_19", ni = "_loading-container_1kgb8_25", ri = "_items-container_1kgb8_32", ai = "_header-row_1kgb8_38", si = "_item_1kgb8_32", oi = "_name_1kgb8_57", ii = "_column-item_1kgb8_62", li = "_icon_1kgb8_66", ci = "_action-buttons-container_1kgb8_74", di = "_reverse_1kgb8_82", ui = "_action-button_1kgb8_74", _e = {
|
|
@@ -1304,116 +1304,116 @@ const Zo = "_wrapper_1kgb8_1", Jo = "_open_1kgb8_9", Xo = "_dropdown_1kgb8_13",
|
|
|
1304
1304
|
reverse: di,
|
|
1305
1305
|
"action-button": "_action-button_1kgb8_74",
|
|
1306
1306
|
actionButton: ui
|
|
1307
|
-
}, jn = ({ show: e, onCancel: t, items: n, currentSelection: a, onSelectionChange: s, onSearchQueryChange: o, texts: i, itemsNameWidth: c, additionalColumns: l, displayIdAsName: u = !1, autoHideSearch: d = !1, allItemsLength: f, disabled:
|
|
1307
|
+
}, jn = ({ show: e, onCancel: t, items: n, currentSelection: a, onSelectionChange: s, onSearchQueryChange: o, texts: i, itemsNameWidth: c, additionalColumns: l, displayIdAsName: u = !1, autoHideSearch: d = !1, allItemsLength: f, disabled: p, isLoading: x = !1, inputRef: g, archiveColumn: h = "archive" }) => {
|
|
1308
1308
|
var Ue;
|
|
1309
|
-
const
|
|
1310
|
-
|
|
1311
|
-
var
|
|
1312
|
-
e && ((
|
|
1313
|
-
}, [m, e]),
|
|
1314
|
-
e ||
|
|
1315
|
-
}, [e]),
|
|
1316
|
-
o(
|
|
1317
|
-
}, [
|
|
1318
|
-
const [
|
|
1319
|
-
|
|
1309
|
+
const v = te(null), b = te(null), j = te(null), m = te(null), y = te(null), [_, D] = O(""), [$] = sa(_, 500), [, S] = O(!1), { copyToClipboard: F } = Ts(), I = (Ue = g.current) == null ? void 0 : Ue.getBoundingClientRect(), E = (I == null ? void 0 : I.x) ?? 0, N = ((I == null ? void 0 : I.x) ?? 0) + ((I == null ? void 0 : I.width) ?? 0), P = (I == null ? void 0 : I.y) ?? 0, U = ((I == null ? void 0 : I.y) ?? 0) + ((I == null ? void 0 : I.height) ?? 0), H = (I == null ? void 0 : I.width) ?? 0, A = (I == null ? void 0 : I.height) ?? 0, L = 5, V = ne(() => E ? E > window.innerWidth / 2 : !1, [E]), G = ne(() => P ? P > window.innerHeight / 2 : !1, [P]);
|
|
1310
|
+
R(() => {
|
|
1311
|
+
var Y;
|
|
1312
|
+
e && ((Y = m.current) == null || Y.focus());
|
|
1313
|
+
}, [m, e]), R(() => {
|
|
1314
|
+
e || D("");
|
|
1315
|
+
}, [e]), R(() => {
|
|
1316
|
+
o($);
|
|
1317
|
+
}, [$, o]);
|
|
1318
|
+
const [K, q] = O(null);
|
|
1319
|
+
R(() => {
|
|
1320
1320
|
e && n.length > 0 ? q(0) : q(null);
|
|
1321
1321
|
}, [n, e]);
|
|
1322
|
-
const
|
|
1322
|
+
const ee = ne(() => K !== null ? n.at(K) ?? null : null, [K, n]), B = C((Y, he) => {
|
|
1323
1323
|
var nt, T;
|
|
1324
|
-
const we = document.getElementById(`item-${
|
|
1324
|
+
const we = document.getElementById(`item-${Y}`);
|
|
1325
1325
|
if (we) {
|
|
1326
1326
|
const M = we.clientHeight ?? 0;
|
|
1327
|
-
he === "down" ? (nt =
|
|
1327
|
+
he === "down" ? (nt = y.current) == null || nt.scrollBy({
|
|
1328
1328
|
left: 0,
|
|
1329
1329
|
top: M,
|
|
1330
1330
|
behavior: "smooth"
|
|
1331
|
-
}) : (T =
|
|
1331
|
+
}) : (T = y.current) == null || T.scrollBy({
|
|
1332
1332
|
left: 0,
|
|
1333
1333
|
top: -M,
|
|
1334
1334
|
behavior: "smooth"
|
|
1335
1335
|
});
|
|
1336
1336
|
}
|
|
1337
|
-
}, []),
|
|
1338
|
-
if (
|
|
1337
|
+
}, []), k = C((Y) => {
|
|
1338
|
+
if (K === null || p)
|
|
1339
1339
|
return;
|
|
1340
|
-
const he =
|
|
1341
|
-
he < 0 || he >= n.length || q((we) => (we !== null &&
|
|
1342
|
-
}, [
|
|
1340
|
+
const he = K + Y;
|
|
1341
|
+
he < 0 || he >= n.length || q((we) => (we !== null && B(we, Y > 0 ? "down" : "up"), he));
|
|
1342
|
+
}, [K, n, p, B]), W = C((Y) => {
|
|
1343
1343
|
if (e)
|
|
1344
|
-
switch (
|
|
1344
|
+
switch (Y.key) {
|
|
1345
1345
|
case "Escape":
|
|
1346
|
-
|
|
1346
|
+
Y.stopPropagation(), Y.preventDefault(), t();
|
|
1347
1347
|
break;
|
|
1348
1348
|
case "Enter":
|
|
1349
|
-
|
|
1349
|
+
Y.stopPropagation(), Y.preventDefault(), p || s(ee);
|
|
1350
1350
|
break;
|
|
1351
1351
|
case "ArrowUp":
|
|
1352
|
-
|
|
1352
|
+
Y.stopPropagation(), Y.preventDefault(), k(-1);
|
|
1353
1353
|
break;
|
|
1354
1354
|
case "ArrowDown":
|
|
1355
|
-
|
|
1355
|
+
Y.stopPropagation(), Y.preventDefault(), k(1);
|
|
1356
1356
|
break;
|
|
1357
1357
|
}
|
|
1358
|
-
}, [t, e,
|
|
1359
|
-
|
|
1358
|
+
}, [t, e, k, ee, p, s]), le = C(() => {
|
|
1359
|
+
S((Y) => !Y);
|
|
1360
1360
|
}, []);
|
|
1361
|
-
|
|
1361
|
+
R(() => (window.addEventListener("scroll", le), () => {
|
|
1362
1362
|
window.removeEventListener("scroll", le);
|
|
1363
|
-
}), [le]),
|
|
1363
|
+
}), [le]), R(() => (window.addEventListener("resize", le), () => {
|
|
1364
1364
|
window.removeEventListener("resize", le);
|
|
1365
|
-
}), [le]), kr(
|
|
1366
|
-
const fe = c ?? (l && l.length > 0 ? 250 : 0), ke = (l == null ? void 0 : l.reduce((
|
|
1365
|
+
}), [le]), kr(W), Cr([v, b, j], t);
|
|
1366
|
+
const fe = c ?? (l && l.length > 0 ? 250 : 0), ke = (l == null ? void 0 : l.reduce((Y, he) => Y + (he.width ?? 100), 0)) ?? 0, J = `calc(max(${H}px, ${fe}px + ${ke}px))`, ve = ne(() => (a && e && !p) ?? !1, [a, e, p]), De = ne(() => (a && e) ?? !1, [a, e]);
|
|
1367
1367
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1368
1368
|
/* @__PURE__ */ r.jsx(la, { show: e, onClick: t }),
|
|
1369
1369
|
/* @__PURE__ */ r.jsxs("div", { className: w("luminus-dropdown-picker-actions", _e.actionButtonsContainer, {
|
|
1370
1370
|
[_e.reverse]: V
|
|
1371
1371
|
}), style: {
|
|
1372
|
-
top: `calc(${P}px + ${
|
|
1373
|
-
left: V ? ve && De ? `calc(${
|
|
1372
|
+
top: `calc(${P}px + ${A / 2}px - 12px)`,
|
|
1373
|
+
left: V ? ve && De ? `calc(${E}px - 24px - 8px - 24px - 4px)` : `calc(${E}px - 24px - 8px)` : `calc(${N}px + 8px)`
|
|
1374
1374
|
}, children: [
|
|
1375
|
-
ve && /* @__PURE__ */ r.jsx("button", { ref: b, type: "button", className: w("luminus-dropdown-picker-clear-button", _e.actionButton), onClick: () => !
|
|
1376
|
-
De && /* @__PURE__ */ r.jsx("button", { ref:
|
|
1377
|
-
var
|
|
1378
|
-
F(u ? ((
|
|
1375
|
+
ve && /* @__PURE__ */ r.jsx("button", { ref: b, type: "button", className: w("luminus-dropdown-picker-clear-button", _e.actionButton), onClick: () => !p && s(null), children: /* @__PURE__ */ r.jsx(X, { variant: "caption", className: "text-danger", children: /* @__PURE__ */ r.jsx(gr, { size: 16 }) }) }),
|
|
1376
|
+
De && /* @__PURE__ */ r.jsx("button", { ref: j, type: "button", className: w("luminus-dropdown-picker-copy-button", _e.actionButton), onClick: () => {
|
|
1377
|
+
var Y, he;
|
|
1378
|
+
F(u ? ((Y = a == null ? void 0 : a.id) == null ? void 0 : Y.toString()) ?? "" : ((he = a == null ? void 0 : a.name) == null ? void 0 : he.toString()) ?? ""), t();
|
|
1379
1379
|
}, children: /* @__PURE__ */ r.jsx(X, { variant: "caption", className: "text-info", children: /* @__PURE__ */ r.jsx(ns, { size: 16 }) }) })
|
|
1380
1380
|
] }),
|
|
1381
1381
|
/* @__PURE__ */ r.jsx("div", { className: w("luminus-dropdown-picker", _e.wrapper, {
|
|
1382
1382
|
[_e.open]: e
|
|
1383
1383
|
}), style: {
|
|
1384
|
-
top:
|
|
1385
|
-
left: V ? `calc(${
|
|
1386
|
-
right: V ? `${
|
|
1384
|
+
top: G ? `calc(${P}px - 50vh - 8px)` : `calc(${U}px + 8px)`,
|
|
1385
|
+
left: V ? `calc(${N}px - ${J})` : E,
|
|
1386
|
+
right: V ? `${N}px` : `calc(${E}px + ${J})`,
|
|
1387
1387
|
width: J,
|
|
1388
|
-
justifyContent:
|
|
1389
|
-
}, children: /* @__PURE__ */ r.jsx("div", { ref:
|
|
1390
|
-
d && (f ?? n.length) <= L ? null : /* @__PURE__ */ r.jsx("div", { className: w("search-input-container border-bottom", _e.searchInputContainer), children: /* @__PURE__ */ r.jsx(be.Control, { ref: m, type: "search", size: "sm", className: _e.searchInput, placeholder: i.searchPlaceholder, value:
|
|
1388
|
+
justifyContent: G ? "flex-end" : "flex-start"
|
|
1389
|
+
}, children: /* @__PURE__ */ r.jsx("div", { ref: v, className: w("shadow rounded", _e.dropdown), children: !p && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1390
|
+
d && (f ?? n.length) <= L ? null : /* @__PURE__ */ r.jsx("div", { className: w("search-input-container border-bottom", _e.searchInputContainer), children: /* @__PURE__ */ r.jsx(be.Control, { ref: m, type: "search", size: "sm", className: _e.searchInput, placeholder: i.searchPlaceholder, value: _, onChange: (Y) => {
|
|
1391
1391
|
var he;
|
|
1392
|
-
return
|
|
1392
|
+
return D(((he = Y.target) == null ? void 0 : he.value) ?? "");
|
|
1393
1393
|
} }) }),
|
|
1394
|
-
|
|
1394
|
+
x ? /* @__PURE__ */ r.jsx("div", { className: _e.loadingContainer, children: /* @__PURE__ */ r.jsx(vn, { animation: "border", variant: "primary" }) }) : n.length > 0 && /* @__PURE__ */ r.jsxs("div", { ref: y, className: w("items", _e.itemsContainer), children: [
|
|
1395
1395
|
l && l.length > 0 && /* @__PURE__ */ r.jsxs("div", { className: w("header-row border-bottom", _e.headerRow), children: [
|
|
1396
1396
|
/* @__PURE__ */ r.jsx("div", { className: _e.name }),
|
|
1397
|
-
l == null ? void 0 : l.filter((
|
|
1398
|
-
width: `${
|
|
1399
|
-
minWidth: `${
|
|
1400
|
-
maxWidth: `${
|
|
1401
|
-
}, children: /* @__PURE__ */ r.jsx(X, { variant: "caption", children:
|
|
1397
|
+
l == null ? void 0 : l.filter((Y) => Y.key !== h).map((Y) => /* @__PURE__ */ r.jsx("div", { className: _e.columnItem, style: {
|
|
1398
|
+
width: `${Y.width ?? 100}px`,
|
|
1399
|
+
minWidth: `${Y.width ?? 100}px`,
|
|
1400
|
+
maxWidth: `${Y.width ?? 100}px`
|
|
1401
|
+
}, children: /* @__PURE__ */ r.jsx(X, { variant: "caption", children: Y.name }) }, Y.key))
|
|
1402
1402
|
] }),
|
|
1403
|
-
n == null ? void 0 : n.map((
|
|
1404
|
-
[_e.focused]:
|
|
1403
|
+
n == null ? void 0 : n.map((Y, he) => /* @__PURE__ */ r.jsxs("button", { id: `item-${he}`, type: "button", className: w("item cursor-pointer", _e.item, {
|
|
1404
|
+
[_e.focused]: K === he
|
|
1405
1405
|
}, {
|
|
1406
|
-
focused:
|
|
1406
|
+
focused: K === he
|
|
1407
1407
|
}, {
|
|
1408
|
-
archive:
|
|
1409
|
-
}), onClick: () => !
|
|
1410
|
-
/* @__PURE__ */ r.jsx("div", { className: _e.name, children: /* @__PURE__ */ r.jsx(X, { variant: "body2", children: u ?
|
|
1408
|
+
archive: Y.additionalColumns ? Y.additionalColumns[h] : !1
|
|
1409
|
+
}), onClick: () => !p && s(Y), onMouseEnter: () => q(he), children: [
|
|
1410
|
+
/* @__PURE__ */ r.jsx("div", { className: _e.name, children: /* @__PURE__ */ r.jsx(X, { variant: "body2", children: u ? Y.id : Y.name }) }),
|
|
1411
1411
|
l == null ? void 0 : l.filter((we) => we.key !== h).map((we) => /* @__PURE__ */ r.jsx("div", { className: _e.columnItem, style: {
|
|
1412
1412
|
width: `${we.width ?? 100}px`,
|
|
1413
1413
|
minWidth: `${we.width ?? 100}px`,
|
|
1414
1414
|
maxWidth: `${we.width ?? 100}px`
|
|
1415
|
-
}, children: /* @__PURE__ */ r.jsx(X, { variant: "caption", className: w("text-muted"), children:
|
|
1416
|
-
] },
|
|
1415
|
+
}, children: /* @__PURE__ */ r.jsx(X, { variant: "caption", className: w("text-muted"), children: Y.additionalColumns && Y.additionalColumns[we.key] }) }, we.key))
|
|
1416
|
+
] }, Y.id))
|
|
1417
1417
|
] })
|
|
1418
1418
|
] }) }) })
|
|
1419
1419
|
] });
|
|
@@ -1441,9 +1441,9 @@ const Zo = "_wrapper_1kgb8_1", Jo = "_open_1kgb8_9", Xo = "_dropdown_1kgb8_13",
|
|
|
1441
1441
|
header: yi,
|
|
1442
1442
|
item: bi
|
|
1443
1443
|
}, wi = ({ show: e, query: t, onCancel: n, groups: a, isLoading: s, searchTypes: o }) => {
|
|
1444
|
-
const { texts: { appSearch: i } } = Z(pe), c =
|
|
1444
|
+
const { texts: { appSearch: i } } = Z(pe), c = te(null), l = C((u) => {
|
|
1445
1445
|
var f;
|
|
1446
|
-
const d = (f = o.find((
|
|
1446
|
+
const d = (f = o.find((p) => p.key === u.type)) == null ? void 0 : f.toPath;
|
|
1447
1447
|
return d ? `${d}/${u.searchKey}` : "/not-found";
|
|
1448
1448
|
}, [o]);
|
|
1449
1449
|
return Cr([c], n), /* @__PURE__ */ r.jsx("div", { ref: c, className: w("luminus-app-search-dropdown shadow rounded", Ge.dropdown, {
|
|
@@ -1461,7 +1461,7 @@ const Zo = "_wrapper_1kgb8_1", Jo = "_open_1kgb8_9", Xo = "_dropdown_1kgb8_13",
|
|
|
1461
1461
|
u.key.totalCount
|
|
1462
1462
|
] })
|
|
1463
1463
|
] }),
|
|
1464
|
-
(d = u.items) == null ? void 0 : d.map((f,
|
|
1464
|
+
(d = u.items) == null ? void 0 : d.map((f, p) => /* @__PURE__ */ r.jsxs(
|
|
1465
1465
|
Je,
|
|
1466
1466
|
{
|
|
1467
1467
|
to: l(f),
|
|
@@ -1472,7 +1472,7 @@ const Zo = "_wrapper_1kgb8_1", Jo = "_open_1kgb8_9", Xo = "_dropdown_1kgb8_13",
|
|
|
1472
1472
|
/* @__PURE__ */ r.jsx(X, { variant: "caption", className: "text-primary", children: /* @__PURE__ */ r.jsx(ss, {}) })
|
|
1473
1473
|
]
|
|
1474
1474
|
},
|
|
1475
|
-
|
|
1475
|
+
p
|
|
1476
1476
|
))
|
|
1477
1477
|
] }, u.key.category);
|
|
1478
1478
|
}) }) });
|
|
@@ -1498,29 +1498,29 @@ const Zo = "_wrapper_1kgb8_1", Jo = "_open_1kgb8_9", Xo = "_dropdown_1kgb8_13",
|
|
|
1498
1498
|
s(!1);
|
|
1499
1499
|
});
|
|
1500
1500
|
}, [e, t, n, c]);
|
|
1501
|
-
return
|
|
1501
|
+
return R(() => {
|
|
1502
1502
|
l();
|
|
1503
1503
|
}, [l]), { isLoading: a, searchItems: o };
|
|
1504
1504
|
}, id = ({ searchTypes: e, navigateFunction: t, currentPath: n, homePath: a = "/" }) => {
|
|
1505
1505
|
var b;
|
|
1506
|
-
const { texts: { appSearch: s } } = Z(pe), [o, i] = O(e.length > 0 ? ((b = e.at(0)) == null ? void 0 : b.key) ?? null : null), c =
|
|
1507
|
-
|
|
1508
|
-
(
|
|
1509
|
-
}, [
|
|
1510
|
-
const
|
|
1511
|
-
return
|
|
1512
|
-
var
|
|
1513
|
-
u(""), n === a && ((
|
|
1514
|
-
}, [n, a]), /* @__PURE__ */ r.jsx(be, { onSubmit: (
|
|
1515
|
-
|
|
1506
|
+
const { texts: { appSearch: s } } = Z(pe), [o, i] = O(e.length > 0 ? ((b = e.at(0)) == null ? void 0 : b.key) ?? null : null), c = ne(() => e.find((j) => j.key === o) ?? null, [e, o]), [l, u] = O(""), [d, f] = sa(l, 500), { isLoading: p, searchItems: x } = Di(c, d), [g, h] = O(!1);
|
|
1507
|
+
R(() => {
|
|
1508
|
+
(x.length > 0 || p) && h(!0);
|
|
1509
|
+
}, [x, p]);
|
|
1510
|
+
const v = te(null);
|
|
1511
|
+
return R(() => {
|
|
1512
|
+
var j;
|
|
1513
|
+
u(""), n === a && ((j = v.current) == null || j.focus());
|
|
1514
|
+
}, [n, a]), /* @__PURE__ */ r.jsx(be, { onSubmit: (j) => {
|
|
1515
|
+
j.preventDefault(), j.stopPropagation(), f.flush(), h(!1), l.length > 2 && t(`/search?query=${l}${c && c.key && `&type=${c == null ? void 0 : c.key}`}`);
|
|
1516
1516
|
}, children: /* @__PURE__ */ r.jsxs(Nt, { className: Ye.inputGroup, children: [
|
|
1517
1517
|
/* @__PURE__ */ r.jsx(Nt.Text, { className: w("p-1 rounded", Ye.inputGroupText, Ye.left), children: /* @__PURE__ */ r.jsx(hi, { searchTypes: e, selectedType: c, setSelectedType: i }) }),
|
|
1518
|
-
/* @__PURE__ */ r.jsx(be.Control, { ref:
|
|
1518
|
+
/* @__PURE__ */ r.jsx(be.Control, { ref: v, placeholder: s.searchPlaceholder, type: "text", size: "sm", className: w("luminus-app-search-input", Ye.input), value: l, onChange: (j) => {
|
|
1519
1519
|
var m;
|
|
1520
|
-
return u(((m =
|
|
1521
|
-
}, onFocus: () =>
|
|
1520
|
+
return u(((m = j.target) == null ? void 0 : m.value) ?? "");
|
|
1521
|
+
}, onFocus: () => x.length > 0 && h(!0) }),
|
|
1522
1522
|
/* @__PURE__ */ r.jsx(Nt.Text, { className: w("p-0 rounded", Ye.inputGroupText, Ye.right), children: /* @__PURE__ */ r.jsx("button", { type: "submit", className: w("text-primary", Ye.submitButton), children: /* @__PURE__ */ r.jsx(os, {}) }) }),
|
|
1523
|
-
/* @__PURE__ */ r.jsx(wi, { query: d, searchTypes: e, show: g, onCancel: () => h(!1), groups:
|
|
1523
|
+
/* @__PURE__ */ r.jsx(wi, { query: d, searchTypes: e, show: g, onCancel: () => h(!1), groups: x, isLoading: p })
|
|
1524
1524
|
] }) });
|
|
1525
1525
|
}, $i = "_card_19733_1", Ei = "_header_19733_6", Fi = "_header-content_19733_13", Oi = "_title_19733_19", Ti = "_collapse-icon_19733_22", Li = "_collapsed_19733_27", Ri = "_content_19733_30", Ke = {
|
|
1526
1526
|
card: $i,
|
|
@@ -1534,11 +1534,11 @@ const Zo = "_wrapper_1kgb8_1", Jo = "_open_1kgb8_9", Xo = "_dropdown_1kgb8_13",
|
|
|
1534
1534
|
content: Ri
|
|
1535
1535
|
}, Ai = ({ title: e, headerContent: t, children: n, className: a, headerClassName: s, contentClassName: o, dontRenderIfNoChildren: i, ...c }) => {
|
|
1536
1536
|
const l = c.collapsible ? c.controlled ? !1 : c.defaultOpen ?? !1 : !0, [u, d] = O(l), f = c.collapsible ? c.controlled ? c.isOpen : u : !0;
|
|
1537
|
-
|
|
1537
|
+
R(() => {
|
|
1538
1538
|
d(l);
|
|
1539
1539
|
}, [l]);
|
|
1540
|
-
const
|
|
1541
|
-
return i &&
|
|
1540
|
+
const p = ne(() => !n || !n.toString() || n.toString().split(",").filter((x) => x && x !== "false").length === 0, [n]);
|
|
1541
|
+
return i && p ? null : /* @__PURE__ */ r.jsxs("div", { className: w("luminus-card rounded shadow-sm", Ke.card, {
|
|
1542
1542
|
[a ?? ""]: a
|
|
1543
1543
|
}), children: [
|
|
1544
1544
|
/* @__PURE__ */ r.jsxs("div", { role: c.collapsible ? "button" : void 0, className: w("header", Ke.header, {
|
|
@@ -1605,7 +1605,7 @@ oa.propTypes = {
|
|
|
1605
1605
|
children: kt.node.isRequired,
|
|
1606
1606
|
node: kt.any
|
|
1607
1607
|
};
|
|
1608
|
-
var
|
|
1608
|
+
var zi = /* @__PURE__ */ function() {
|
|
1609
1609
|
function e(t, n) {
|
|
1610
1610
|
for (var a = 0; a < n.length; a++) {
|
|
1611
1611
|
var s = n[a];
|
|
@@ -1616,7 +1616,7 @@ var Wi = /* @__PURE__ */ function() {
|
|
|
1616
1616
|
return n && e(t.prototype, n), a && e(t, a), t;
|
|
1617
1617
|
};
|
|
1618
1618
|
}();
|
|
1619
|
-
function
|
|
1619
|
+
function Wi(e, t) {
|
|
1620
1620
|
if (!(e instanceof t))
|
|
1621
1621
|
throw new TypeError("Cannot call a class as a function");
|
|
1622
1622
|
}
|
|
@@ -1633,9 +1633,9 @@ function Gi(e, t) {
|
|
|
1633
1633
|
var ia = function(e) {
|
|
1634
1634
|
Gi(t, e);
|
|
1635
1635
|
function t() {
|
|
1636
|
-
return
|
|
1636
|
+
return Wi(this, t), Ui(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments));
|
|
1637
1637
|
}
|
|
1638
|
-
return
|
|
1638
|
+
return zi(t, [{
|
|
1639
1639
|
key: "componentDidMount",
|
|
1640
1640
|
value: function() {
|
|
1641
1641
|
this.renderPortal();
|
|
@@ -1686,34 +1686,34 @@ const Yi = "_lightbox_14acg_1", Ki = "_show_14acg_16", qi = "_header_14acg_20",
|
|
|
1686
1686
|
selected: tl,
|
|
1687
1687
|
"default-indicator": "_default-indicator_14acg_66",
|
|
1688
1688
|
defaultIndicator: nl
|
|
1689
|
-
}, rl = "_backdrop_3huvf_1", al = "_show_3huvf_11",
|
|
1689
|
+
}, rl = "_backdrop_3huvf_1", al = "_show_3huvf_11", zn = {
|
|
1690
1690
|
backdrop: rl,
|
|
1691
1691
|
show: al
|
|
1692
|
-
}, la = ({ show: e, onClick: t }) => /* @__PURE__ */ r.jsx("div", { className: w("luminus-backdrop",
|
|
1693
|
-
[
|
|
1692
|
+
}, la = ({ show: e, onClick: t }) => /* @__PURE__ */ r.jsx("div", { className: w("luminus-backdrop", zn.backdrop, {
|
|
1693
|
+
[zn.show]: e
|
|
1694
1694
|
}), onClick: () => t && t() }), ca = ({ src: e, alt: t, baseUrl: n, customToken: a, placeholder: s, ...o }) => /* @__PURE__ */ r.jsx("img", { ...o, alt: t ?? "", src: e ?? s }), sl = ({ show: e, onClose: t, photos: n, defaultIndex: a, uploadPhotosText: s, noPhotosText: o, onUploadPhotos: i, photoActions: c, baseUrl: l, customToken: u, placeholder: d, ImgComponent: f = ca }) => {
|
|
1695
|
-
const
|
|
1696
|
-
|
|
1695
|
+
const p = te(null), [x, g] = O(a), h = n.at(x), v = x > 0, b = x < n.length - 1;
|
|
1696
|
+
R(() => {
|
|
1697
1697
|
e && g(a);
|
|
1698
|
-
}, [a, e]),
|
|
1699
|
-
|
|
1700
|
-
}, [n,
|
|
1701
|
-
const
|
|
1698
|
+
}, [a, e]), R(() => {
|
|
1699
|
+
x >= n.length && g(n.length - 1);
|
|
1700
|
+
}, [n, x]);
|
|
1701
|
+
const j = C((m) => {
|
|
1702
1702
|
switch (m.key) {
|
|
1703
1703
|
case "ArrowLeft":
|
|
1704
|
-
m.stopPropagation(),
|
|
1704
|
+
m.stopPropagation(), v && g((y) => y - 1);
|
|
1705
1705
|
break;
|
|
1706
1706
|
case "ArrowRight":
|
|
1707
|
-
m.stopPropagation(), b && g((
|
|
1707
|
+
m.stopPropagation(), b && g((y) => y + 1);
|
|
1708
1708
|
break;
|
|
1709
1709
|
case "Escape":
|
|
1710
1710
|
m.stopPropagation(), t();
|
|
1711
1711
|
break;
|
|
1712
1712
|
}
|
|
1713
|
-
}, [b,
|
|
1714
|
-
return kr(
|
|
1713
|
+
}, [b, v, t]);
|
|
1714
|
+
return kr(j), /* @__PURE__ */ r.jsxs(an, { children: [
|
|
1715
1715
|
/* @__PURE__ */ r.jsx(la, { show: e, onClick: t }),
|
|
1716
|
-
/* @__PURE__ */ r.jsx("div", { ref:
|
|
1716
|
+
/* @__PURE__ */ r.jsx("div", { ref: p, className: w("luminus-lightbox rounded shadow", Ie.lightbox, {
|
|
1717
1717
|
[Ie.show]: e
|
|
1718
1718
|
}), children: e && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1719
1719
|
/* @__PURE__ */ r.jsxs("div", { className: Ie.header, children: [
|
|
@@ -1721,46 +1721,46 @@ const Yi = "_lightbox_14acg_1", Ki = "_show_14acg_16", qi = "_header_14acg_20",
|
|
|
1721
1721
|
i && /* @__PURE__ */ r.jsx(aa, { accept: ".jpg,.jpeg,.png", onUpload: (m) => {
|
|
1722
1722
|
m.length > 0 && i(Array.from(m));
|
|
1723
1723
|
}, icon: /* @__PURE__ */ r.jsx(vr, { style: { fontSize: 18 } }), multiple: !0, className: "me-3", children: s ?? null }),
|
|
1724
|
-
h && (c == null ? void 0 : c.map(({ label: m, onClick:
|
|
1724
|
+
h && (c == null ? void 0 : c.map(({ label: m, onClick: y, ..._ }, D) => /* @__PURE__ */ r.jsx(
|
|
1725
1725
|
Le,
|
|
1726
1726
|
{
|
|
1727
|
-
onClick: () =>
|
|
1728
|
-
...
|
|
1727
|
+
onClick: () => y(h.id),
|
|
1728
|
+
..._,
|
|
1729
1729
|
children: m
|
|
1730
1730
|
},
|
|
1731
|
-
`action-${
|
|
1731
|
+
`action-${D}`
|
|
1732
1732
|
)))
|
|
1733
1733
|
] }),
|
|
1734
1734
|
/* @__PURE__ */ r.jsx("div", { role: "button", onClick: t, children: /* @__PURE__ */ r.jsx(Oe, { style: { fontSize: "32px" } }) })
|
|
1735
1735
|
] }),
|
|
1736
1736
|
n.length === 0 && /* @__PURE__ */ r.jsx("div", { className: "w-100 h-100 d-flex align-items-center justify-content-center", children: /* @__PURE__ */ r.jsx(X, { variant: "body", children: o ?? "No photos available" }) }),
|
|
1737
1737
|
h && /* @__PURE__ */ r.jsxs("div", { className: Ie.photoContainer, children: [
|
|
1738
|
-
/* @__PURE__ */ r.jsx("div", { role:
|
|
1738
|
+
/* @__PURE__ */ r.jsx("div", { role: v ? "button" : void 0, className: w("align-items-start", Ie.navButton), onClick: () => v && g((m) => m - 1), children: v && /* @__PURE__ */ r.jsx(cn, { style: { fontSize: "40px" } }) }),
|
|
1739
1739
|
/* @__PURE__ */ r.jsx(f, { src: h.lgSrc, alt: h.alt, className: w("rounded", Ie.photo), baseUrl: l, customToken: u, placeholder: d }),
|
|
1740
1740
|
/* @__PURE__ */ r.jsx("div", { role: b ? "button" : void 0, className: w("align-items-end", Ie.navButton), onClick: () => b && g((m) => m + 1), children: b && /* @__PURE__ */ r.jsx(dn, { style: { fontSize: "40px" } }) })
|
|
1741
1741
|
] }),
|
|
1742
|
-
/* @__PURE__ */ r.jsx("div", { className: Ie.photosPreview, children: n.map((m,
|
|
1743
|
-
/* @__PURE__ */ r.jsx(f, { role:
|
|
1744
|
-
[Ie.selected]:
|
|
1742
|
+
/* @__PURE__ */ r.jsx("div", { className: Ie.photosPreview, children: n.map((m, y) => /* @__PURE__ */ r.jsxs("div", { role: "button", onClick: () => g(y), className: "position-relative", children: [
|
|
1743
|
+
/* @__PURE__ */ r.jsx(f, { role: y !== x ? "button" : void 0, src: m.smSrc, alt: m.alt, className: w("rounded", Ie.photo, {
|
|
1744
|
+
[Ie.selected]: y === x
|
|
1745
1745
|
}), baseUrl: l, customToken: u, placeholder: d }, m.id),
|
|
1746
1746
|
m.isDefault && /* @__PURE__ */ r.jsx("div", { className: w("text-primary", Ie.defaultIndicator), children: /* @__PURE__ */ r.jsx(is, {}) })
|
|
1747
1747
|
] })) })
|
|
1748
1748
|
] }) })
|
|
1749
1749
|
] });
|
|
1750
1750
|
}, ol = ({ photos: e, onUploadPhotos: t, uploadPhotosText: n, noPhotosText: a, photoActions: s, baseUrl: o, customToken: i, placeholder: c, ImgComponent: l = ca, noLightboxOnlyButtonOnEmpty: u = !1 }) => {
|
|
1751
|
-
const [d, f] = O(null),
|
|
1752
|
-
return
|
|
1751
|
+
const [d, f] = O(null), p = d !== null ? e[d] : null, [x, g] = O(!1);
|
|
1752
|
+
return R(() => {
|
|
1753
1753
|
if (e.length === 0) {
|
|
1754
1754
|
f(null), g(!1);
|
|
1755
1755
|
return;
|
|
1756
1756
|
}
|
|
1757
|
-
const h = e.findIndex((
|
|
1757
|
+
const h = e.findIndex((v) => v.isDefault);
|
|
1758
1758
|
f(h > -1 ? h : 0);
|
|
1759
|
-
}, [e]), !
|
|
1759
|
+
}, [e]), !p && t && u ? /* @__PURE__ */ r.jsx(aa, { accept: ".jpg,.jpeg,.png", onUpload: (h) => {
|
|
1760
1760
|
h.length > 0 && t(Array.from(h));
|
|
1761
1761
|
}, icon: /* @__PURE__ */ r.jsx(vr, { style: { fontSize: 18 } }), multiple: !0, children: n ?? null }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1762
|
-
|
|
1763
|
-
/* @__PURE__ */ r.jsx(l, { src:
|
|
1762
|
+
p ? /* @__PURE__ */ r.jsxs("div", { role: "button", className: "w-100 position-relative", onClick: () => g(!0), children: [
|
|
1763
|
+
/* @__PURE__ */ r.jsx(l, { src: p.smSrc, alt: p.alt, className: "rounded w-100", baseUrl: o, customToken: i, placeholder: c }),
|
|
1764
1764
|
e.length > 1 && /* @__PURE__ */ r.jsx("div", { className: "position-absolute rounded p-1", style: {
|
|
1765
1765
|
top: 0,
|
|
1766
1766
|
right: 0,
|
|
@@ -1769,7 +1769,7 @@ const Yi = "_lightbox_14acg_1", Ki = "_show_14acg_16", qi = "_header_14acg_20",
|
|
|
1769
1769
|
background: "rgba(105,105,105,0.5)"
|
|
1770
1770
|
}, children: /* @__PURE__ */ r.jsx(ls, { fontSize: 24 }) })
|
|
1771
1771
|
] }) : /* @__PURE__ */ r.jsx(Lt, { text: n ?? "", placement: "left", children: /* @__PURE__ */ r.jsx("div", { role: "button", className: w("rounded p-3 d-flex justify-content-center"), onClick: () => g(!0), children: /* @__PURE__ */ r.jsx("img", { src: c, alt: "placeholder", className: "rounded w-25" }) }) }),
|
|
1772
|
-
/* @__PURE__ */ r.jsx(sl, { show:
|
|
1772
|
+
/* @__PURE__ */ r.jsx(sl, { show: x, onClose: () => g(!1), photos: e, defaultIndex: d ?? 0, uploadPhotosText: n, noPhotosText: a, onUploadPhotos: t, photoActions: s, baseUrl: o, customToken: i, placeholder: c, ImgComponent: l })
|
|
1773
1773
|
] });
|
|
1774
1774
|
}, ld = ({ children: e }) => {
|
|
1775
1775
|
var c, l, u;
|
|
@@ -1818,13 +1818,13 @@ const Yi = "_lightbox_14acg_1", Ki = "_show_14acg_16", qi = "_header_14acg_20",
|
|
|
1818
1818
|
}, children: /* @__PURE__ */ r.jsxs(X, { variant: "caption", className: "w-100 text-end", children: [
|
|
1819
1819
|
"verze ",
|
|
1820
1820
|
e
|
|
1821
|
-
] }) }), hl = "_submit-container_a9slg_1", gl = "_spacer_a9slg_14",
|
|
1821
|
+
] }) }), hl = "_submit-container_a9slg_1", gl = "_spacer_a9slg_14", Wn = {
|
|
1822
1822
|
"submit-container": "_submit-container_a9slg_1",
|
|
1823
1823
|
submitContainer: hl,
|
|
1824
1824
|
spacer: gl
|
|
1825
1825
|
}, pl = ({ children: e, noSpacer: t = !1 }) => /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1826
|
-
!t && /* @__PURE__ */ r.jsx("div", { className:
|
|
1827
|
-
/* @__PURE__ */ r.jsx("div", { className: w("luminus-floating-action-container shadow",
|
|
1826
|
+
!t && /* @__PURE__ */ r.jsx("div", { className: Wn.spacer }),
|
|
1827
|
+
/* @__PURE__ */ r.jsx("div", { className: w("luminus-floating-action-container shadow", Wn.submitContainer), children: e })
|
|
1828
1828
|
] }), xl = "_timeline_g1754_1", vl = "_step-container_g1754_1", jl = "_step-date_g1754_1", yl = "_step-content_g1754_4", bl = "_content-header_g1754_8", wl = "_content-text_g1754_11", _l = "_step-icon_g1754_14", qe = {
|
|
1829
1829
|
timeline: xl,
|
|
1830
1830
|
"step-container": "_step-container_g1754_1",
|
|
@@ -1863,7 +1863,7 @@ const Yi = "_lightbox_14acg_1", Ki = "_show_14acg_16", qi = "_header_14acg_20",
|
|
|
1863
1863
|
i(!1), l(null);
|
|
1864
1864
|
});
|
|
1865
1865
|
}, [s, e]);
|
|
1866
|
-
return
|
|
1866
|
+
return R(() => {
|
|
1867
1867
|
const d = new AbortController();
|
|
1868
1868
|
return u(d.signal), () => {
|
|
1869
1869
|
d.abort();
|
|
@@ -1871,7 +1871,7 @@ const Yi = "_lightbox_14acg_1", Ki = "_show_14acg_16", qi = "_header_14acg_20",
|
|
|
1871
1871
|
}, [u]), { data: c, setData: l, reloadData: u, isLoading: o };
|
|
1872
1872
|
}, Un = ({ src: e, alt: t, baseUrl: n, customToken: a, placeholder: s, ...o }) => {
|
|
1873
1873
|
const { data: i } = Nl(e, n, a), [c, l] = O(null);
|
|
1874
|
-
return
|
|
1874
|
+
return R(() => {
|
|
1875
1875
|
let u = null;
|
|
1876
1876
|
return i !== null ? (u = URL.createObjectURL(i), l(u)) : l(null), () => {
|
|
1877
1877
|
u !== null && URL.revokeObjectURL(u);
|
|
@@ -1883,42 +1883,42 @@ const Yi = "_lightbox_14acg_1", Ki = "_show_14acg_16", qi = "_header_14acg_20",
|
|
|
1883
1883
|
const a = t(e);
|
|
1884
1884
|
return /* @__PURE__ */ r.jsx(Je, { to: a, className: "luminus-input-container position-relative w-100 text-decoration-none", children: n });
|
|
1885
1885
|
}, fa = ({ InputContainer: e = et, label: t, value: n, onChange: a, hidden: s, disabled: o, className: i, type: c, withoutLabel: l, indeterminate: u }) => {
|
|
1886
|
-
const d =
|
|
1887
|
-
return
|
|
1886
|
+
const d = te(null);
|
|
1887
|
+
return R(() => {
|
|
1888
1888
|
d.current && (d.current.indeterminate = u ?? !1);
|
|
1889
1889
|
}, [d, u]), /* @__PURE__ */ r.jsx(e, { isForCheckInput: !0, hidden: s, label: t ?? "", withoutLabel: l, className: i, children: /* @__PURE__ */ r.jsx(be.Check, { ref: d, id: `check-${t}`, type: c ?? "checkbox", label: t ?? "", checked: n, onChange: (f) => {
|
|
1890
|
-
var
|
|
1891
|
-
a && a(((
|
|
1890
|
+
var p;
|
|
1891
|
+
a && a(((p = f.target) == null ? void 0 : p.checked) ?? !1);
|
|
1892
1892
|
}, className: i ?? "", hidden: s ?? !1, disabled: o ?? !1 }) });
|
|
1893
|
-
}, st = ({ InputContainer: e = et, type: t, value: n, onChange: a, debounceMs: s, label: o, withoutLabel: i, placeholder: c, size: l, hidden: u, disabled: d, showClearIcon: f, clearValue:
|
|
1894
|
-
const b = t === "number",
|
|
1893
|
+
}, st = ({ InputContainer: e = et, type: t, value: n, onChange: a, debounceMs: s, label: o, withoutLabel: i, placeholder: c, size: l, hidden: u, disabled: d, showClearIcon: f, clearValue: p, list: x, className: g, step: h, noSelectOnFocus: v }) => {
|
|
1894
|
+
const b = t === "number", j = C(() => {
|
|
1895
1895
|
if (!a)
|
|
1896
1896
|
return;
|
|
1897
|
-
const
|
|
1898
|
-
a(b ?
|
|
1899
|
-
}, [
|
|
1900
|
-
const
|
|
1901
|
-
a && (b && a(
|
|
1902
|
-
}, [b, a]),
|
|
1897
|
+
const E = p ?? null;
|
|
1898
|
+
a(b ? E ? Number(E) : null : (E == null ? void 0 : E.toString()) ?? "");
|
|
1899
|
+
}, [p, b, a]), m = te(null), [y, _] = O((n == null ? void 0 : n.toString()) ?? ""), D = C((E) => {
|
|
1900
|
+
const N = E;
|
|
1901
|
+
a && (b && a(N == null || N === "" ? null : Number(N)), a(N || null));
|
|
1902
|
+
}, [b, a]), $ = C((E) => {
|
|
1903
1903
|
var P;
|
|
1904
|
-
const
|
|
1904
|
+
const N = (P = E.target) == null ? void 0 : P.value;
|
|
1905
1905
|
if (!s) {
|
|
1906
|
-
|
|
1906
|
+
D(N);
|
|
1907
1907
|
return;
|
|
1908
1908
|
}
|
|
1909
|
-
N
|
|
1910
|
-
|
|
1909
|
+
_(N), m.current !== null && window.clearTimeout(m.current), m.current = window.setTimeout(() => {
|
|
1910
|
+
D(N);
|
|
1911
1911
|
}, s);
|
|
1912
|
-
}, [s,
|
|
1913
|
-
|
|
1914
|
-
|
|
1912
|
+
}, [s, D]);
|
|
1913
|
+
R(() => {
|
|
1914
|
+
_(n === null ? "" : n.toString());
|
|
1915
1915
|
}, [n]);
|
|
1916
|
-
const [
|
|
1916
|
+
const [S, F] = O(!1), I = ms(t, n ? n.toString() ?? null : null, S);
|
|
1917
1917
|
return /* @__PURE__ */ r.jsxs(e, { withoutLabel: i, label: o ?? "", hidden: u, className: g, children: [
|
|
1918
|
-
/* @__PURE__ */ r.jsx(be.Control, { type:
|
|
1919
|
-
F(!0), !
|
|
1918
|
+
/* @__PURE__ */ r.jsx(be.Control, { type: I, placeholder: c ?? o, size: l, value: s ? y : (n == null ? void 0 : n.toString()) ?? "", onChange: $, className: g ?? "", hidden: u, disabled: d ?? !1, list: x, onFocus: (E) => {
|
|
1919
|
+
F(!0), !v && E.target.select();
|
|
1920
1920
|
}, onBlur: () => F(!1), step: h }),
|
|
1921
|
-
f && n !== null && a && !d && /* @__PURE__ */ r.jsx("div", { className: `luminus-input-remove-icon ${t !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ r.jsx(
|
|
1921
|
+
f && n !== null && a && !d && /* @__PURE__ */ r.jsx("div", { className: `luminus-input-remove-icon ${t !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ r.jsx(re, { color: "secondary", size: "sm", onClick: j, children: /* @__PURE__ */ r.jsx(Oe, {}) }) })
|
|
1922
1922
|
] });
|
|
1923
1923
|
}, Dt = ({
|
|
1924
1924
|
InputContainer: e = et,
|
|
@@ -1933,129 +1933,137 @@ const Yi = "_lightbox_14acg_1", Ki = "_show_14acg_16", qi = "_header_14acg_20",
|
|
|
1933
1933
|
disabled: u,
|
|
1934
1934
|
showClearIcon: d,
|
|
1935
1935
|
clearValue: f,
|
|
1936
|
-
noSortOptions:
|
|
1937
|
-
className:
|
|
1938
|
-
noEmptyOption: g
|
|
1936
|
+
noSortOptions: p,
|
|
1937
|
+
className: x,
|
|
1938
|
+
noEmptyOption: g,
|
|
1939
1939
|
// it will still add the empty option if there is no value provided or value is empty string or null
|
|
1940
|
+
appendCurrentSelectionWithName: h
|
|
1940
1941
|
}) => {
|
|
1941
|
-
const
|
|
1942
|
+
const v = C(() => {
|
|
1942
1943
|
if (!a)
|
|
1943
1944
|
return;
|
|
1944
|
-
const
|
|
1945
|
-
a(i ?
|
|
1946
|
-
}, [f, i, a])
|
|
1947
|
-
|
|
1948
|
-
|
|
1945
|
+
const j = f ?? null;
|
|
1946
|
+
a(i ? j ? Number(j) : null : (j == null ? void 0 : j.toString()) ?? "");
|
|
1947
|
+
}, [f, i, a]), b = ne(() => {
|
|
1948
|
+
const j = n ?? [];
|
|
1949
|
+
if (h !== void 0 && t && !j.some((m) => m.id === t)) {
|
|
1950
|
+
const m = { id: t, name: h };
|
|
1951
|
+
j.push(m);
|
|
1952
|
+
}
|
|
1953
|
+
return j.sort((m, y) => (p ? 0 : (m.name ?? "").localeCompare(y.name ?? "")) ?? null);
|
|
1954
|
+
}, [n, p, t, h]);
|
|
1955
|
+
return /* @__PURE__ */ r.jsxs(e, { withoutLabel: o, label: s ?? "", hidden: l, className: x, children: [
|
|
1956
|
+
/* @__PURE__ */ r.jsxs(be.Select, { size: c, value: t ?? "", onChange: (j) => {
|
|
1949
1957
|
var y;
|
|
1950
1958
|
if (!a)
|
|
1951
1959
|
return;
|
|
1952
|
-
const
|
|
1953
|
-
i && a(
|
|
1954
|
-
}, className:
|
|
1960
|
+
const m = (y = j.target) == null ? void 0 : y.value;
|
|
1961
|
+
i && a(m ? parseInt(m, 10) : null), a(m || null);
|
|
1962
|
+
}, className: x ?? "", hidden: l, disabled: u ?? !1, children: [
|
|
1955
1963
|
g && !(t == null || t === "") ? void 0 : /* @__PURE__ */ r.jsx("option", { value: "" }),
|
|
1956
|
-
|
|
1964
|
+
b == null ? void 0 : b.map((j) => /* @__PURE__ */ r.jsx("option", { value: j.id ?? "", children: j.name }, j.id))
|
|
1957
1965
|
] }),
|
|
1958
|
-
d && t && a && !u && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ r.jsx(
|
|
1966
|
+
d && t && a && !u && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ r.jsx(re, { color: "secondary", size: "sm", onClick: v, children: /* @__PURE__ */ r.jsx(Oe, {}) }) })
|
|
1959
1967
|
] });
|
|
1960
|
-
}, ud = ({ InputContainer: e = et, items: t, defaultSelection: n, selectedItemNavigateTo: a, onSearchQueryChange: s, texts: o, isLoading: i, isNumber: c, onSelect: l, label: u, withoutLabel: d, size: f, dropdownItemsNameWidth:
|
|
1968
|
+
}, ud = ({ InputContainer: e = et, items: t, defaultSelection: n, selectedItemNavigateTo: a, onSearchQueryChange: s, texts: o, isLoading: i, isNumber: c, onSelect: l, label: u, withoutLabel: d, size: f, dropdownItemsNameWidth: p, additionalColumns: x, hidden: g, disabled: h, displayIdAsName: v, CustomOnChangeComponent: b, className: j, archiveColumn: m }) => {
|
|
1961
1969
|
var P, U;
|
|
1962
|
-
const [
|
|
1963
|
-
|
|
1964
|
-
|
|
1970
|
+
const [y, _] = O(n), [D, $] = O(!1);
|
|
1971
|
+
R(() => {
|
|
1972
|
+
_((n == null ? void 0 : n.id) == null && (n == null ? void 0 : n.name) == null ? null : { id: n.id, name: n.name });
|
|
1965
1973
|
}, [n == null ? void 0 : n.id, n == null ? void 0 : n.name]);
|
|
1966
|
-
const
|
|
1967
|
-
|
|
1974
|
+
const S = C((H) => {
|
|
1975
|
+
_(H);
|
|
1968
1976
|
}, []), F = C((H) => {
|
|
1969
|
-
|
|
1970
|
-
}, [
|
|
1971
|
-
|
|
1972
|
-
l && l(
|
|
1973
|
-
}, [
|
|
1974
|
-
const
|
|
1975
|
-
return /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsxs(e, { withoutLabel: d, label: u ?? "", hidden: g, inputContainerClassName: w({ "luminus-dropdown-select-open":
|
|
1976
|
-
/* @__PURE__ */ r.jsxs(ua, { currentSelection:
|
|
1977
|
-
|
|
1978
|
-
/* @__PURE__ */ r.jsxs(be.Select, { ref:
|
|
1977
|
+
$(!1), S(H);
|
|
1978
|
+
}, [S]);
|
|
1979
|
+
R(() => {
|
|
1980
|
+
l && l(y);
|
|
1981
|
+
}, [y, l]);
|
|
1982
|
+
const I = te(null), E = a !== void 0, N = E && y !== null;
|
|
1983
|
+
return /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsxs(e, { withoutLabel: d, label: u ?? "", hidden: g, inputContainerClassName: w({ "luminus-dropdown-select-open": D }), className: j, children: [
|
|
1984
|
+
/* @__PURE__ */ r.jsxs(ua, { currentSelection: y, selectedItemNavigateTo: a, children: [
|
|
1985
|
+
v && (y == null ? void 0 : y.name) && /* @__PURE__ */ r.jsx(X, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: y.name }),
|
|
1986
|
+
/* @__PURE__ */ r.jsxs(be.Select, { ref: I, size: f, value: (y == null ? void 0 : y.id) ?? "", onChange: (H) => _({
|
|
1979
1987
|
id: c ? Number(H.target.value) ?? null : H.target.value,
|
|
1980
1988
|
name: ""
|
|
1981
1989
|
}), onMouseDown: (H) => {
|
|
1982
1990
|
H.currentTarget.focus(), H.preventDefault();
|
|
1983
1991
|
}, onClick: () => {
|
|
1984
|
-
|
|
1992
|
+
!E && !h && $(!0);
|
|
1985
1993
|
}, className: w("w-100", {
|
|
1986
1994
|
"luminus-dropdown-picker-disabled": h,
|
|
1987
|
-
"luminus-dropdown-picker-link":
|
|
1995
|
+
"luminus-dropdown-picker-link": N
|
|
1988
1996
|
}), hidden: g, children: [
|
|
1989
1997
|
/* @__PURE__ */ r.jsx("option", { value: "" }),
|
|
1990
1998
|
n && /* @__PURE__ */ r.jsx("option", { value: n.id ?? void 0, children: n.name && ((P = n.name) == null ? void 0 : P.length) > 0 ? n.name : n.id }),
|
|
1991
|
-
|
|
1999
|
+
y && /* @__PURE__ */ r.jsx("option", { value: y.id ?? void 0, children: y.name && ((U = y.name) == null ? void 0 : U.length) > 0 ? y.name : y.id })
|
|
1992
2000
|
] }),
|
|
1993
|
-
b || !h &&
|
|
1994
|
-
!b && !h &&
|
|
1995
|
-
H.preventDefault(), H.stopPropagation(),
|
|
2001
|
+
b || !h && E ? /* @__PURE__ */ r.jsxs("div", { className: "custom-picker-button", children: [
|
|
2002
|
+
!b && !h && E && /* @__PURE__ */ r.jsx(re, { size: "sm", color: "secondary", onClick: (H) => {
|
|
2003
|
+
H.preventDefault(), H.stopPropagation(), $(!0);
|
|
1996
2004
|
}, children: /* @__PURE__ */ r.jsx(yr, {}) }),
|
|
1997
2005
|
b ?? null
|
|
1998
2006
|
] }) : null
|
|
1999
2007
|
] }),
|
|
2000
|
-
|
|
2008
|
+
I.current && /* @__PURE__ */ r.jsx(jn, { show: D, onCancel: () => $(!1), items: t, currentSelection: y, onSelectionChange: F, onSearchQueryChange: s, texts: o, itemsNameWidth: p, additionalColumns: x, isLoading: i, disabled: h, inputRef: I, archiveColumn: m })
|
|
2001
2009
|
] }) });
|
|
2002
|
-
}, fd = ({ InputContainer: e = et, value: t, onChange: n, label: a, size: s, showClearIcon: o, clearValue: i, hidden: c, disabled: l, rows: u, withoutLabel: d, debounceMs: f, className:
|
|
2003
|
-
const
|
|
2010
|
+
}, fd = ({ InputContainer: e = et, value: t, onChange: n, label: a, size: s, showClearIcon: o, clearValue: i, hidden: c, disabled: l, rows: u, withoutLabel: d, debounceMs: f, className: p }) => {
|
|
2011
|
+
const x = C(() => {
|
|
2004
2012
|
if (!n)
|
|
2005
2013
|
return;
|
|
2006
2014
|
const m = i ?? null;
|
|
2007
2015
|
n((m == null ? void 0 : m.toString()) ?? "");
|
|
2008
|
-
}, [i, n]), g =
|
|
2009
|
-
const
|
|
2010
|
-
n && n(
|
|
2011
|
-
}, [n]),
|
|
2012
|
-
var
|
|
2013
|
-
const
|
|
2016
|
+
}, [i, n]), g = te(null), [h, v] = O((t == null ? void 0 : t.toString()) ?? ""), b = C((m) => {
|
|
2017
|
+
const y = m;
|
|
2018
|
+
n && n(y || null);
|
|
2019
|
+
}, [n]), j = C((m) => {
|
|
2020
|
+
var _;
|
|
2021
|
+
const y = (_ = m.target) == null ? void 0 : _.value;
|
|
2014
2022
|
if (!f) {
|
|
2015
|
-
b(
|
|
2023
|
+
b(y);
|
|
2016
2024
|
return;
|
|
2017
2025
|
}
|
|
2018
|
-
|
|
2019
|
-
b(
|
|
2026
|
+
v(y), g.current !== null && window.clearTimeout(g.current), g.current = window.setTimeout(() => {
|
|
2027
|
+
b(y);
|
|
2020
2028
|
}, f);
|
|
2021
2029
|
}, [f, b]);
|
|
2022
|
-
return
|
|
2023
|
-
|
|
2024
|
-
}, [t]), /* @__PURE__ */ r.jsxs(e, { label: a ?? "", hidden: c, withoutLabel: d, className:
|
|
2025
|
-
/* @__PURE__ */ r.jsx(be.Control, { as: "textarea", size: s, value: f ? h : t ?? "", onChange:
|
|
2026
|
-
o && t && n && !l && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r.jsx(
|
|
2030
|
+
return R(() => {
|
|
2031
|
+
v(t === null ? "" : t.toString());
|
|
2032
|
+
}, [t]), /* @__PURE__ */ r.jsxs(e, { label: a ?? "", hidden: c, withoutLabel: d, className: p, isForTextAreaInput: !0, children: [
|
|
2033
|
+
/* @__PURE__ */ r.jsx(be.Control, { as: "textarea", size: s, value: f ? h : t ?? "", onChange: j, hidden: c, disabled: l, rows: u ?? 2, className: "w-100" }),
|
|
2034
|
+
o && t && n && !l && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r.jsx(re, { color: "secondary", size: "sm", onClick: x, children: /* @__PURE__ */ r.jsx(Oe, {}) }) })
|
|
2027
2035
|
] });
|
|
2028
|
-
}, md = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, label: s, withoutLabel: o, placeholder: i, size: c, hidden: l, disabled: u, showClearIcon: d, clearValue: f, className:
|
|
2036
|
+
}, md = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, label: s, withoutLabel: o, placeholder: i, size: c, hidden: l, disabled: u, showClearIcon: d, clearValue: f, className: p, step: x, stepperStep: g = 1, min: h, max: v }) => {
|
|
2029
2037
|
const b = C(() => {
|
|
2030
2038
|
if (!n)
|
|
2031
2039
|
return;
|
|
2032
|
-
const
|
|
2033
|
-
n(
|
|
2034
|
-
}, [f, n]),
|
|
2035
|
-
const
|
|
2036
|
-
n && n(
|
|
2037
|
-
}, [
|
|
2040
|
+
const $ = f ?? null;
|
|
2041
|
+
n($ ? Number($) : null);
|
|
2042
|
+
}, [f, n]), j = te(null), [m, y] = O((t == null ? void 0 : t.toString()) ?? ""), _ = C(($) => {
|
|
2043
|
+
const S = $;
|
|
2044
|
+
n && n(S == null || S === "" ? null : ht(Number(S), h, v));
|
|
2045
|
+
}, [v, h, n]), D = C(($) => {
|
|
2038
2046
|
var F;
|
|
2039
|
-
const
|
|
2047
|
+
const S = (F = $.target) == null ? void 0 : F.value;
|
|
2040
2048
|
if (!a) {
|
|
2041
|
-
|
|
2049
|
+
_(S);
|
|
2042
2050
|
return;
|
|
2043
2051
|
}
|
|
2044
|
-
|
|
2045
|
-
|
|
2052
|
+
y(ht(Number(S), h, v).toString()), j.current !== null && window.clearTimeout(j.current), j.current = window.setTimeout(() => {
|
|
2053
|
+
_(S);
|
|
2046
2054
|
}, a);
|
|
2047
|
-
}, [a,
|
|
2048
|
-
return
|
|
2049
|
-
|
|
2050
|
-
}, [
|
|
2051
|
-
/* @__PURE__ */ r.jsx(be.Control, { type: "number", placeholder: i ?? s, size: c, value: a ? m : t ?? "", onChange:
|
|
2052
|
-
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ r.jsx(
|
|
2053
|
-
|
|
2055
|
+
}, [a, _, v, h]);
|
|
2056
|
+
return R(() => {
|
|
2057
|
+
y(t === null ? "" : ht(t, h, v).toString());
|
|
2058
|
+
}, [v, h, t]), /* @__PURE__ */ r.jsx(e, { withoutLabel: o, label: s ?? "", hidden: l, className: p, children: /* @__PURE__ */ r.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
2059
|
+
/* @__PURE__ */ r.jsx(be.Control, { type: "number", placeholder: i ?? s, size: c, value: a ? m : t ?? "", onChange: D, className: `luminus-numeric-stepper ${p ?? ""}`, hidden: l, disabled: u ?? !1, step: x }),
|
|
2060
|
+
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ r.jsx(re, { size: "sm", onClick: ($) => {
|
|
2061
|
+
$.preventDefault(), $.stopPropagation(), _(((t ?? 0) - g).toString());
|
|
2054
2062
|
}, children: /* @__PURE__ */ r.jsx(br, {}) }) }),
|
|
2055
|
-
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ r.jsx(
|
|
2056
|
-
|
|
2063
|
+
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ r.jsx(re, { size: "sm", onClick: ($) => {
|
|
2064
|
+
$.preventDefault(), $.stopPropagation(), _(((t ?? 0) + g).toString());
|
|
2057
2065
|
}, children: /* @__PURE__ */ r.jsx(wr, {}) }) }),
|
|
2058
|
-
d && t && n && !u && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r.jsx(
|
|
2066
|
+
d && t && n && !u && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r.jsx(re, { color: "secondary", size: "sm", onClick: b, children: /* @__PURE__ */ r.jsx(Oe, {}) }) })
|
|
2059
2067
|
] }) });
|
|
2060
2068
|
};
|
|
2061
2069
|
function ma(e, t) {
|
|
@@ -2113,9 +2121,9 @@ function Il(e, t, n) {
|
|
|
2113
2121
|
return s = s === -1 ? e.length : s, e.substring(0, s) + e.substring(s, e.length).replace(a, "$1" + t);
|
|
2114
2122
|
}
|
|
2115
2123
|
function Dl(e) {
|
|
2116
|
-
var t =
|
|
2124
|
+
var t = te(e);
|
|
2117
2125
|
t.current = e;
|
|
2118
|
-
var n =
|
|
2126
|
+
var n = te(function() {
|
|
2119
2127
|
for (var a = [], s = arguments.length; s--; ) a[s] = arguments[s];
|
|
2120
2128
|
return t.current.apply(t, a);
|
|
2121
2129
|
});
|
|
@@ -2163,11 +2171,11 @@ function Yn(e, t, n) {
|
|
|
2163
2171
|
if (["", "-"].indexOf(e) !== -1)
|
|
2164
2172
|
return e;
|
|
2165
2173
|
var a = (e.indexOf(".") !== -1 || n) && t, s = yn(e), o = s.beforeDecimal, i = s.afterDecimal, c = s.hasNegation, l = parseFloat("0." + (i || "0")), u = i.length <= t ? "0." + i : l.toFixed(t), d = u.split("."), f = o;
|
|
2166
|
-
o && Number(d[0]) && (f = o.split("").reverse().reduce(function(h,
|
|
2167
|
-
return h.length > b ? (Number(h[0]) + Number(
|
|
2174
|
+
o && Number(d[0]) && (f = o.split("").reverse().reduce(function(h, v, b) {
|
|
2175
|
+
return h.length > b ? (Number(h[0]) + Number(v)).toString() + h.substring(1, h.length) : v + h;
|
|
2168
2176
|
}, d[0]));
|
|
2169
|
-
var
|
|
2170
|
-
return "" +
|
|
2177
|
+
var p = pa(d[1] || "", t, n), x = c ? "-" : "", g = a ? "." : "";
|
|
2178
|
+
return "" + x + f + g + p;
|
|
2171
2179
|
}
|
|
2172
2180
|
function Qe(e, t) {
|
|
2173
2181
|
if (e.value = e.value, e !== null) {
|
|
@@ -2222,33 +2230,33 @@ function Ll(e) {
|
|
|
2222
2230
|
}
|
|
2223
2231
|
function Rl(e, t, n, a, s, o, i) {
|
|
2224
2232
|
i === void 0 && (i = Ll);
|
|
2225
|
-
var c = s.findIndex(function(
|
|
2226
|
-
return
|
|
2233
|
+
var c = s.findIndex(function(y) {
|
|
2234
|
+
return y;
|
|
2227
2235
|
}), l = e.slice(0, c);
|
|
2228
2236
|
!t && !n.startsWith(l) && (t = l, n = l + n, a = a + l.length);
|
|
2229
|
-
for (var u = n.length, d = e.length, f = {},
|
|
2230
|
-
x
|
|
2237
|
+
for (var u = n.length, d = e.length, f = {}, p = new Array(u), x = 0; x < u; x++) {
|
|
2238
|
+
p[x] = -1;
|
|
2231
2239
|
for (var g = 0, h = d; g < h; g++) {
|
|
2232
|
-
var
|
|
2240
|
+
var v = i({
|
|
2233
2241
|
currentValue: n,
|
|
2234
2242
|
lastValue: t,
|
|
2235
2243
|
formattedValue: e,
|
|
2236
|
-
currentValueIndex:
|
|
2244
|
+
currentValueIndex: x,
|
|
2237
2245
|
formattedValueIndex: g
|
|
2238
2246
|
});
|
|
2239
|
-
if (
|
|
2240
|
-
x
|
|
2247
|
+
if (v && f[g] !== !0) {
|
|
2248
|
+
p[x] = g, f[g] = !0;
|
|
2241
2249
|
break;
|
|
2242
2250
|
}
|
|
2243
2251
|
}
|
|
2244
2252
|
}
|
|
2245
|
-
for (var b = a; b < u && (
|
|
2253
|
+
for (var b = a; b < u && (p[b] === -1 || !o(n[b])); )
|
|
2246
2254
|
b++;
|
|
2247
|
-
var
|
|
2248
|
-
for (b = a - 1; b > 0 &&
|
|
2255
|
+
var j = b === u || p[b] === -1 ? d : p[b];
|
|
2256
|
+
for (b = a - 1; b > 0 && p[b] === -1; )
|
|
2249
2257
|
b--;
|
|
2250
|
-
var m = b === -1 ||
|
|
2251
|
-
return m >
|
|
2258
|
+
var m = b === -1 || p[b] === -1 ? 0 : p[b] + 1;
|
|
2259
|
+
return m > j ? j : a - m < j - a ? m : j;
|
|
2252
2260
|
}
|
|
2253
2261
|
function Kn(e, t, n, a) {
|
|
2254
2262
|
var s = e.length;
|
|
@@ -2273,8 +2281,8 @@ function Al(e) {
|
|
|
2273
2281
|
function ja(e, t, n, a, s, o) {
|
|
2274
2282
|
o === void 0 && (o = Ve);
|
|
2275
2283
|
var i = Dl(function(g, h) {
|
|
2276
|
-
var
|
|
2277
|
-
return ha(g) ? (b = "",
|
|
2284
|
+
var v, b;
|
|
2285
|
+
return ha(g) ? (b = "", v = "") : typeof g == "number" || h ? (b = typeof g == "number" ? xa(g) : g, v = a(b)) : (b = s(g, void 0), v = a(b)), { formattedValue: v, numAsString: b };
|
|
2278
2286
|
}), c = O(function() {
|
|
2279
2287
|
return i(ot(e) ? t : e, n);
|
|
2280
2288
|
}), l = c[0], u = c[1], d = function(g, h) {
|
|
@@ -2282,12 +2290,12 @@ function ja(e, t, n, a, s, o) {
|
|
|
2282
2290
|
formattedValue: g.formattedValue,
|
|
2283
2291
|
numAsString: g.value
|
|
2284
2292
|
}), o(g, h);
|
|
2285
|
-
}, f = e,
|
|
2286
|
-
ot(e) && (f = l.numAsString,
|
|
2287
|
-
var
|
|
2288
|
-
return
|
|
2289
|
-
u(
|
|
2290
|
-
}, [
|
|
2293
|
+
}, f = e, p = n;
|
|
2294
|
+
ot(e) && (f = l.numAsString, p = !0);
|
|
2295
|
+
var x = i(f, p);
|
|
2296
|
+
return ne(function() {
|
|
2297
|
+
u(x);
|
|
2298
|
+
}, [x.formattedValue]), [l, d];
|
|
2291
2299
|
}
|
|
2292
2300
|
function Ml(e) {
|
|
2293
2301
|
return e.replace(/[^0-9]/g, "");
|
|
@@ -2304,32 +2312,32 @@ function Vl(e) {
|
|
|
2304
2312
|
i === void 0 && (i = Bl);
|
|
2305
2313
|
var c = e.removeFormatting;
|
|
2306
2314
|
c === void 0 && (c = Ml);
|
|
2307
|
-
var l = e.defaultValue, u = e.valueIsNumericString, d = e.onValueChange, f = e.isAllowed,
|
|
2315
|
+
var l = e.defaultValue, u = e.valueIsNumericString, d = e.onValueChange, f = e.isAllowed, p = e.onChange;
|
|
2316
|
+
p === void 0 && (p = Ve);
|
|
2317
|
+
var x = e.onKeyDown;
|
|
2308
2318
|
x === void 0 && (x = Ve);
|
|
2309
|
-
var v = e.onKeyDown;
|
|
2310
|
-
v === void 0 && (v = Ve);
|
|
2311
2319
|
var g = e.onMouseUp;
|
|
2312
2320
|
g === void 0 && (g = Ve);
|
|
2313
2321
|
var h = e.onFocus;
|
|
2314
2322
|
h === void 0 && (h = Ve);
|
|
2315
|
-
var
|
|
2316
|
-
|
|
2317
|
-
var b = e.value,
|
|
2318
|
-
|
|
2323
|
+
var v = e.onBlur;
|
|
2324
|
+
v === void 0 && (v = Ve);
|
|
2325
|
+
var b = e.value, j = e.getCaretBoundary;
|
|
2326
|
+
j === void 0 && (j = Al);
|
|
2319
2327
|
var m = e.isValidInputCharacter;
|
|
2320
2328
|
m === void 0 && (m = yt);
|
|
2321
|
-
var
|
|
2322
|
-
|
|
2323
|
-
}, U = O(!1), H = U[0],
|
|
2329
|
+
var y = e.isCharacterSame, _ = ma(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), D = ja(b, l, !!u, i, c, d), $ = D[0], S = $.formattedValue, F = $.numAsString, I = D[1], E = te(), N = te({ formattedValue: S, numAsString: F }), P = function(T, M) {
|
|
2330
|
+
N.current = { formattedValue: T.formattedValue, numAsString: T.value }, I(T, M);
|
|
2331
|
+
}, U = O(!1), H = U[0], A = U[1], L = te(null), V = te({
|
|
2324
2332
|
setCaretTimeout: null,
|
|
2325
2333
|
focusTimeout: null
|
|
2326
2334
|
});
|
|
2327
|
-
|
|
2328
|
-
return
|
|
2335
|
+
R(function() {
|
|
2336
|
+
return A(!0), function() {
|
|
2329
2337
|
clearTimeout(V.current.setCaretTimeout), clearTimeout(V.current.focusTimeout);
|
|
2330
2338
|
};
|
|
2331
2339
|
}, []);
|
|
2332
|
-
var
|
|
2340
|
+
var G = i, K = function(T, M) {
|
|
2333
2341
|
var Q = parseFloat(M);
|
|
2334
2342
|
return {
|
|
2335
2343
|
formattedValue: T,
|
|
@@ -2340,43 +2348,43 @@ function Vl(e) {
|
|
|
2340
2348
|
T.selectionStart === 0 && T.selectionEnd === T.value.length || (Qe(T, M), V.current.setCaretTimeout = setTimeout(function() {
|
|
2341
2349
|
T.value === Q && T.selectionStart !== M && Qe(T, M);
|
|
2342
2350
|
}, 0));
|
|
2343
|
-
},
|
|
2344
|
-
return Kn(T, M,
|
|
2345
|
-
},
|
|
2346
|
-
var ce =
|
|
2351
|
+
}, ee = function(T, M, Q) {
|
|
2352
|
+
return Kn(T, M, j(T), Q);
|
|
2353
|
+
}, B = function(T, M, Q) {
|
|
2354
|
+
var ce = j(M), Ne = Rl(M, S, T, Q, ce, m, y);
|
|
2347
2355
|
return Ne = Kn(M, Ne, ce), Ne;
|
|
2348
|
-
},
|
|
2356
|
+
}, k = function(T) {
|
|
2349
2357
|
var M = T.formattedValue;
|
|
2350
2358
|
M === void 0 && (M = "");
|
|
2351
2359
|
var Q = T.input, ce = T.source, Ne = T.event, de = T.numAsString, se;
|
|
2352
2360
|
if (Q) {
|
|
2353
2361
|
var Se = T.inputValue || Q.value, $e = Yt(Q);
|
|
2354
|
-
Q.value = M, se =
|
|
2362
|
+
Q.value = M, se = B(Se, M, $e), se !== void 0 && q(Q, se, M);
|
|
2355
2363
|
}
|
|
2356
|
-
M !==
|
|
2364
|
+
M !== S && P(K(M, de), { event: Ne, source: ce });
|
|
2357
2365
|
};
|
|
2358
|
-
|
|
2359
|
-
var T =
|
|
2360
|
-
(
|
|
2366
|
+
R(function() {
|
|
2367
|
+
var T = N.current, M = T.formattedValue, Q = T.numAsString;
|
|
2368
|
+
(S !== M || F !== Q) && P(K(S, F), {
|
|
2361
2369
|
event: void 0,
|
|
2362
2370
|
source: jt.props
|
|
2363
2371
|
});
|
|
2364
|
-
}, [
|
|
2365
|
-
var
|
|
2372
|
+
}, [S, F]);
|
|
2373
|
+
var W = L.current ? Yt(L.current) : void 0, le = typeof window < "u" ? Ds : R;
|
|
2366
2374
|
le(function() {
|
|
2367
2375
|
var T = L.current;
|
|
2368
|
-
if (
|
|
2369
|
-
var M =
|
|
2370
|
-
T.value =
|
|
2376
|
+
if (S !== N.current.formattedValue && T) {
|
|
2377
|
+
var M = B(N.current.formattedValue, S, W);
|
|
2378
|
+
T.value = S, q(T, M, S);
|
|
2371
2379
|
}
|
|
2372
|
-
}, [
|
|
2380
|
+
}, [S]);
|
|
2373
2381
|
var fe = function(T, M, Q) {
|
|
2374
|
-
var ce = M.target, Ne =
|
|
2375
|
-
if (se = c(Se, void 0), f && !f(
|
|
2376
|
-
var $e = M.target,
|
|
2377
|
-
return $e.value =
|
|
2382
|
+
var ce = M.target, Ne = E.current ? El(E.current, ce.selectionEnd) : va(S, T), de = Object.assign(Object.assign({}, Ne), { lastValue: S }), se = c(T, de), Se = G(se);
|
|
2383
|
+
if (se = c(Se, void 0), f && !f(K(Se, se))) {
|
|
2384
|
+
var $e = M.target, z = Yt($e), ae = B(T, S, z);
|
|
2385
|
+
return $e.value = S, q($e, ae, S), !1;
|
|
2378
2386
|
}
|
|
2379
|
-
return
|
|
2387
|
+
return k({
|
|
2380
2388
|
formattedValue: Se,
|
|
2381
2389
|
numAsString: se,
|
|
2382
2390
|
inputValue: T,
|
|
@@ -2387,10 +2395,10 @@ function Vl(e) {
|
|
|
2387
2395
|
}, ke = function(T, M) {
|
|
2388
2396
|
M === void 0 && (M = 0);
|
|
2389
2397
|
var Q = T.selectionStart, ce = T.selectionEnd;
|
|
2390
|
-
|
|
2398
|
+
E.current = { selectionStart: Q, selectionEnd: ce + M };
|
|
2391
2399
|
}, J = function(T) {
|
|
2392
2400
|
var M = T.target, Q = M.value, ce = fe(Q, T, jt.event);
|
|
2393
|
-
ce &&
|
|
2401
|
+
ce && p(T), E.current = void 0;
|
|
2394
2402
|
}, ve = function(T) {
|
|
2395
2403
|
var M = T.target, Q = T.key, ce = M.selectionStart, Ne = M.selectionEnd, de = M.value;
|
|
2396
2404
|
de === void 0 && (de = "");
|
|
@@ -2400,20 +2408,20 @@ function Vl(e) {
|
|
|
2400
2408
|
Q === "Delete" && ce === Ne && (Se = 1);
|
|
2401
2409
|
var $e = Q === "ArrowLeft" || Q === "ArrowRight";
|
|
2402
2410
|
if (se === void 0 || ce !== Ne && !$e) {
|
|
2403
|
-
|
|
2411
|
+
x(T), ke(M, Se);
|
|
2404
2412
|
return;
|
|
2405
2413
|
}
|
|
2406
|
-
var
|
|
2414
|
+
var z = se;
|
|
2407
2415
|
if ($e) {
|
|
2408
2416
|
var ae = Q === "ArrowLeft" ? "left" : "right";
|
|
2409
|
-
|
|
2410
|
-
} else Q === "Delete" && !m(de[se]) ?
|
|
2411
|
-
|
|
2417
|
+
z = ee(de, se, ae), z !== se && T.preventDefault();
|
|
2418
|
+
} else Q === "Delete" && !m(de[se]) ? z = ee(de, se, "right") : Q === "Backspace" && !m(de[se]) && (z = ee(de, se, "left"));
|
|
2419
|
+
z !== se && q(M, z, de), x(T), ke(M, Se);
|
|
2412
2420
|
}, De = function(T) {
|
|
2413
2421
|
var M = T.target, Q = function() {
|
|
2414
2422
|
var ce = M.selectionStart, Ne = M.selectionEnd, de = M.value;
|
|
2415
2423
|
if (de === void 0 && (de = ""), ce === Ne) {
|
|
2416
|
-
var se =
|
|
2424
|
+
var se = ee(de, ce);
|
|
2417
2425
|
se !== ce && q(M, se, de);
|
|
2418
2426
|
}
|
|
2419
2427
|
};
|
|
@@ -2426,22 +2434,22 @@ function Vl(e) {
|
|
|
2426
2434
|
L.current = M, V.current.focusTimeout = setTimeout(function() {
|
|
2427
2435
|
var ce = M.selectionStart, Ne = M.selectionEnd, de = M.value;
|
|
2428
2436
|
de === void 0 && (de = "");
|
|
2429
|
-
var se =
|
|
2437
|
+
var se = ee(de, ce);
|
|
2430
2438
|
se !== ce && !(ce === 0 && Ne === de.length) && q(M, se, de), h(Object.assign(Object.assign({}, T), { currentTarget: Q }));
|
|
2431
2439
|
}, 0);
|
|
2432
|
-
},
|
|
2433
|
-
L.current = null, clearTimeout(V.current.focusTimeout), clearTimeout(V.current.setCaretTimeout),
|
|
2434
|
-
}, he = H && Ol() ? "numeric" : void 0, we = Object.assign({ inputMode: he },
|
|
2440
|
+
}, Y = function(T) {
|
|
2441
|
+
L.current = null, clearTimeout(V.current.focusTimeout), clearTimeout(V.current.setCaretTimeout), v(T);
|
|
2442
|
+
}, he = H && Ol() ? "numeric" : void 0, we = Object.assign({ inputMode: he }, _, {
|
|
2435
2443
|
type: t,
|
|
2436
|
-
value:
|
|
2444
|
+
value: S,
|
|
2437
2445
|
onChange: J,
|
|
2438
2446
|
onKeyDown: ve,
|
|
2439
2447
|
onMouseUp: De,
|
|
2440
2448
|
onFocus: Ue,
|
|
2441
|
-
onBlur:
|
|
2449
|
+
onBlur: Y
|
|
2442
2450
|
});
|
|
2443
2451
|
if (n === "text")
|
|
2444
|
-
return s ? Ce.createElement(Ce.Fragment, null, s(
|
|
2452
|
+
return s ? Ce.createElement(Ce.Fragment, null, s(S, _) || null) : Ce.createElement("span", Object.assign({}, _, { ref: o }), S);
|
|
2445
2453
|
if (a) {
|
|
2446
2454
|
var nt = a;
|
|
2447
2455
|
return Ce.createElement(nt, Object.assign({}, we, { ref: o }));
|
|
@@ -2456,8 +2464,8 @@ function qn(e, t) {
|
|
|
2456
2464
|
var i = t.allowNegative, c = t.thousandsGroupStyle;
|
|
2457
2465
|
if (c === void 0 && (c = "thousand"), e === "" || e === "-")
|
|
2458
2466
|
return e;
|
|
2459
|
-
var l = At(t), u = l.thousandSeparator, d = l.decimalSeparator, f = n !== 0 && e.indexOf(".") !== -1 || n && a,
|
|
2460
|
-
return n !== void 0 && (g = pa(g, n, !!a)), u && (
|
|
2467
|
+
var l = At(t), u = l.thousandSeparator, d = l.decimalSeparator, f = n !== 0 && e.indexOf(".") !== -1 || n && a, p = yn(e, i), x = p.beforeDecimal, g = p.afterDecimal, h = p.addNegation;
|
|
2468
|
+
return n !== void 0 && (g = pa(g, n, !!a)), u && (x = Il(x, u, c)), s && (x = s + x), o && (g = g + o), h && (x = "-" + x), e = x + (f && d || "") + g, e;
|
|
2461
2469
|
}
|
|
2462
2470
|
function At(e) {
|
|
2463
2471
|
var t = e.decimalSeparator;
|
|
@@ -2477,42 +2485,42 @@ function Pl(e, t) {
|
|
|
2477
2485
|
function Hl(e, t) {
|
|
2478
2486
|
return new RegExp("(^-)|[0-9]|" + ga(e), "g");
|
|
2479
2487
|
}
|
|
2480
|
-
function
|
|
2488
|
+
function zl(e, t, n) {
|
|
2481
2489
|
return e === "" ? !0 : !(t != null && t.match(/\d/)) && !(n != null && n.match(/\d/)) && typeof e == "string" && !isNaN(Number(e));
|
|
2482
2490
|
}
|
|
2483
|
-
function
|
|
2491
|
+
function Wl(e, t, n) {
|
|
2484
2492
|
var a;
|
|
2485
2493
|
t === void 0 && (t = Tl(e));
|
|
2486
2494
|
var s = n.allowNegative, o = n.prefix;
|
|
2487
2495
|
o === void 0 && (o = "");
|
|
2488
2496
|
var i = n.suffix;
|
|
2489
2497
|
i === void 0 && (i = "");
|
|
2490
|
-
var c = n.decimalScale, l = t.from, u = t.to, d = u.start, f = u.end,
|
|
2498
|
+
var c = n.decimalScale, l = t.from, u = t.to, d = u.start, f = u.end, p = At(n), x = p.allowedDecimalSeparators, g = p.decimalSeparator, h = e[f] === g;
|
|
2491
2499
|
if (yt(e) && (e === o || e === i) && t.lastValue === "")
|
|
2492
2500
|
return e;
|
|
2493
|
-
if (f - d === 1 &&
|
|
2494
|
-
var
|
|
2495
|
-
e = e.substring(0, d) +
|
|
2501
|
+
if (f - d === 1 && x.indexOf(e[d]) !== -1) {
|
|
2502
|
+
var v = c === 0 ? "" : g;
|
|
2503
|
+
e = e.substring(0, d) + v + e.substring(d + 1, e.length);
|
|
2496
2504
|
}
|
|
2497
|
-
var b = function(L, V,
|
|
2498
|
-
var
|
|
2499
|
-
o.startsWith("-") ?
|
|
2500
|
-
var
|
|
2501
|
-
return q && (
|
|
2502
|
-
},
|
|
2503
|
-
a =
|
|
2504
|
-
var
|
|
2505
|
-
e.length &&
|
|
2505
|
+
var b = function(L, V, G) {
|
|
2506
|
+
var K = !1, q = !1;
|
|
2507
|
+
o.startsWith("-") ? K = !1 : L.startsWith("--") ? (K = !1, q = !0) : i.startsWith("-") && L.length === i.length ? K = !1 : L[0] === "-" && (K = !0);
|
|
2508
|
+
var ee = K ? 1 : 0;
|
|
2509
|
+
return q && (ee = 2), ee && (L = L.substring(ee), V -= ee, G -= ee), { value: L, start: V, end: G, hasNegation: K };
|
|
2510
|
+
}, j = b(e, d, f), m = j.hasNegation;
|
|
2511
|
+
a = j, e = a.value, d = a.start, f = a.end;
|
|
2512
|
+
var y = b(t.lastValue, l.start, l.end), _ = y.start, D = y.end, $ = y.value, S = e.substring(d, f);
|
|
2513
|
+
e.length && $.length && (_ > $.length - i.length || D < o.length) && !(S && i.startsWith(S)) && (e = $);
|
|
2506
2514
|
var F = 0;
|
|
2507
2515
|
e.startsWith(o) ? F += o.length : d < o.length && (F = d), e = e.substring(F), f -= F;
|
|
2508
|
-
var
|
|
2509
|
-
e.endsWith(i) ?
|
|
2510
|
-
var
|
|
2516
|
+
var I = e.length, E = e.length - i.length;
|
|
2517
|
+
e.endsWith(i) ? I = E : (f > E || f > e.length - i.length) && (I = f), e = e.substring(0, I), e = Pl(m ? "-" + e : e, s), e = (e.match(Hl(g)) || []).join("");
|
|
2518
|
+
var N = e.indexOf(g);
|
|
2511
2519
|
e = e.replace(new RegExp(ga(g), "g"), function(L, V) {
|
|
2512
|
-
return V ===
|
|
2520
|
+
return V === N ? "." : "";
|
|
2513
2521
|
});
|
|
2514
|
-
var P = yn(e, s), U = P.beforeDecimal, H = P.afterDecimal,
|
|
2515
|
-
return u.end - u.start < l.end - l.start && U === "" && h && !parseFloat(H) && (e =
|
|
2522
|
+
var P = yn(e, s), U = P.beforeDecimal, H = P.afterDecimal, A = P.addNegation;
|
|
2523
|
+
return u.end - u.start < l.end - l.start && U === "" && h && !parseFloat(H) && (e = A ? "-" : ""), e;
|
|
2516
2524
|
}
|
|
2517
2525
|
function Ul(e, t) {
|
|
2518
2526
|
var n = t.prefix;
|
|
@@ -2550,59 +2558,59 @@ function Yl(e) {
|
|
|
2550
2558
|
o === void 0 && (o = Ve);
|
|
2551
2559
|
var i = e.thousandSeparator, c = e.decimalScale, l = e.fixedDecimalScale, u = e.prefix;
|
|
2552
2560
|
u === void 0 && (u = "");
|
|
2553
|
-
var d = e.defaultValue, f = e.value,
|
|
2554
|
-
return qn(
|
|
2555
|
-
}, m = function(
|
|
2556
|
-
return
|
|
2557
|
-
},
|
|
2558
|
-
ot(f) ? ot(d) || (
|
|
2559
|
-
var
|
|
2560
|
-
return ha(
|
|
2561
|
-
},
|
|
2562
|
-
var L =
|
|
2563
|
-
if (q === void 0 && (q = ""), (V === "Backspace" || V === "Delete") &&
|
|
2564
|
-
|
|
2561
|
+
var d = e.defaultValue, f = e.value, p = e.valueIsNumericString, x = e.onValueChange, g = ma(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), h = At(e), v = h.decimalSeparator, b = h.allowedDecimalSeparators, j = function(A) {
|
|
2562
|
+
return qn(A, e);
|
|
2563
|
+
}, m = function(A, L) {
|
|
2564
|
+
return Wl(A, L, e);
|
|
2565
|
+
}, y = ot(f) ? d : f, _ = p ?? zl(y, u, t);
|
|
2566
|
+
ot(f) ? ot(d) || (_ = _ || typeof d == "number") : _ = _ || typeof f == "number";
|
|
2567
|
+
var D = function(A) {
|
|
2568
|
+
return ha(A) ? A : (typeof A == "number" && (A = xa(A)), _ && typeof c == "number" ? Yn(A, c, !!l) : A);
|
|
2569
|
+
}, $ = ja(D(f), D(d), !!_, j, m, x), S = $[0], F = S.numAsString, I = S.formattedValue, E = $[1], N = function(A) {
|
|
2570
|
+
var L = A.target, V = A.key, G = L.selectionStart, K = L.selectionEnd, q = L.value;
|
|
2571
|
+
if (q === void 0 && (q = ""), (V === "Backspace" || V === "Delete") && K < u.length) {
|
|
2572
|
+
A.preventDefault();
|
|
2565
2573
|
return;
|
|
2566
2574
|
}
|
|
2567
|
-
if (
|
|
2568
|
-
s(
|
|
2575
|
+
if (G !== K) {
|
|
2576
|
+
s(A);
|
|
2569
2577
|
return;
|
|
2570
2578
|
}
|
|
2571
|
-
V === "Backspace" && q[0] === "-" &&
|
|
2572
|
-
var
|
|
2573
|
-
V === "Backspace" && q[
|
|
2574
|
-
}, P = function(
|
|
2579
|
+
V === "Backspace" && q[0] === "-" && G === u.length + 1 && n && Qe(L, 1), c && l && (V === "Backspace" && q[G - 1] === v ? (Qe(L, G - 1), A.preventDefault()) : V === "Delete" && q[G] === v && A.preventDefault()), b != null && b.includes(V) && q[G] === v && Qe(L, G + 1);
|
|
2580
|
+
var ee = i === !0 ? "," : i;
|
|
2581
|
+
V === "Backspace" && q[G - 1] === ee && Qe(L, G - 1), V === "Delete" && q[G] === ee && Qe(L, G + 1), s(A);
|
|
2582
|
+
}, P = function(A) {
|
|
2575
2583
|
var L = F;
|
|
2576
2584
|
if (L.match(/\d/g) || (L = ""), a || (L = $l(L)), l && c && (L = Yn(L, c, l)), L !== F) {
|
|
2577
2585
|
var V = qn(L, e);
|
|
2578
|
-
|
|
2586
|
+
E({
|
|
2579
2587
|
formattedValue: V,
|
|
2580
2588
|
value: L,
|
|
2581
2589
|
floatValue: parseFloat(L)
|
|
2582
2590
|
}, {
|
|
2583
|
-
event:
|
|
2591
|
+
event: A,
|
|
2584
2592
|
source: jt.event
|
|
2585
2593
|
});
|
|
2586
2594
|
}
|
|
2587
|
-
o(
|
|
2588
|
-
}, U = function(
|
|
2589
|
-
return
|
|
2590
|
-
}, H = function(
|
|
2591
|
-
var L =
|
|
2592
|
-
return
|
|
2595
|
+
o(A);
|
|
2596
|
+
}, U = function(A) {
|
|
2597
|
+
return A === v ? !0 : yt(A);
|
|
2598
|
+
}, H = function(A) {
|
|
2599
|
+
var L = A.currentValue, V = A.lastValue, G = A.formattedValue, K = A.currentValueIndex, q = A.formattedValueIndex, ee = L[K], B = G[q], k = va(V, L), W = k.to;
|
|
2600
|
+
return K >= W.start && K < W.end && b && b.includes(ee) && B === v ? !0 : ee === B;
|
|
2593
2601
|
};
|
|
2594
2602
|
return Object.assign(Object.assign({}, g), {
|
|
2595
|
-
value:
|
|
2603
|
+
value: I,
|
|
2596
2604
|
valueIsNumericString: !1,
|
|
2597
2605
|
isValidInputCharacter: U,
|
|
2598
2606
|
isCharacterSame: H,
|
|
2599
|
-
onValueChange:
|
|
2600
|
-
format:
|
|
2607
|
+
onValueChange: E,
|
|
2608
|
+
format: j,
|
|
2601
2609
|
removeFormatting: m,
|
|
2602
|
-
getCaretBoundary: function(
|
|
2603
|
-
return Ul(
|
|
2610
|
+
getCaretBoundary: function(A) {
|
|
2611
|
+
return Ul(A, e);
|
|
2604
2612
|
},
|
|
2605
|
-
onKeyDown:
|
|
2613
|
+
onKeyDown: N,
|
|
2606
2614
|
onBlur: P
|
|
2607
2615
|
});
|
|
2608
2616
|
}
|
|
@@ -2610,39 +2618,39 @@ function bn(e) {
|
|
|
2610
2618
|
var t = Yl(e);
|
|
2611
2619
|
return Ce.createElement(Vl, Object.assign({}, t));
|
|
2612
2620
|
}
|
|
2613
|
-
const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, label: s, withoutLabel: o, placeholder: i, size: c, hidden: l, disabled: u, showClearIcon: d, clearValue: f, className:
|
|
2614
|
-
const
|
|
2621
|
+
const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, label: s, withoutLabel: o, placeholder: i, size: c, hidden: l, disabled: u, showClearIcon: d, clearValue: f, className: p, step: x, noSelectOnFocus: g, decimalScale: h, numberPrefix: v, numberSuffix: b, min: j, max: m }) => {
|
|
2622
|
+
const y = C(() => {
|
|
2615
2623
|
if (!n)
|
|
2616
2624
|
return;
|
|
2617
|
-
const
|
|
2618
|
-
n(
|
|
2619
|
-
}, [f, n]),
|
|
2620
|
-
const
|
|
2621
|
-
n && n(
|
|
2622
|
-
}, [n]), F = C((
|
|
2623
|
-
var
|
|
2624
|
-
let
|
|
2625
|
-
if (Number.isNaN(
|
|
2626
|
-
|
|
2625
|
+
const I = f ?? null;
|
|
2626
|
+
n(I ? Number(I) : null);
|
|
2627
|
+
}, [f, n]), _ = te(null), [D, $] = O((t == null ? void 0 : t.toString()) ?? ""), S = C((I) => {
|
|
2628
|
+
const E = I;
|
|
2629
|
+
n && n(E == null || E === "" ? null : Number(E));
|
|
2630
|
+
}, [n]), F = C((I) => {
|
|
2631
|
+
var N, P;
|
|
2632
|
+
let E = parseFloat(((P = (N = I.target) == null ? void 0 : N.value) == null ? void 0 : P.replaceAll(" ", "")) ?? 0);
|
|
2633
|
+
if (Number.isNaN(E) && (E = 0), !a) {
|
|
2634
|
+
S(E.toString());
|
|
2627
2635
|
return;
|
|
2628
2636
|
}
|
|
2629
|
-
|
|
2630
|
-
|
|
2637
|
+
$(E.toString()), _.current !== null && window.clearTimeout(_.current), _.current = window.setTimeout(() => {
|
|
2638
|
+
S(E.toString());
|
|
2631
2639
|
}, a);
|
|
2632
|
-
}, [a,
|
|
2633
|
-
return
|
|
2634
|
-
|
|
2635
|
-
}, [m,
|
|
2636
|
-
m !== void 0 && Number(
|
|
2637
|
-
}, [
|
|
2638
|
-
!n || t === null || (m !== void 0 && t > m && n(m),
|
|
2639
|
-
}, [t, m,
|
|
2640
|
-
/* @__PURE__ */ r.jsx(bn, { displayType: "input", thousandSeparator: " ", decimalScale: h, prefix:
|
|
2641
|
-
!g &&
|
|
2640
|
+
}, [a, S]);
|
|
2641
|
+
return R(() => {
|
|
2642
|
+
$(t === null ? "" : t.toString());
|
|
2643
|
+
}, [m, j, t]), R(() => {
|
|
2644
|
+
m !== void 0 && Number(D) > m && $(m.toString()), j !== void 0 && Number(D) < j && $(j.toString());
|
|
2645
|
+
}, [D, m, j, $]), R(() => {
|
|
2646
|
+
!n || t === null || (m !== void 0 && t > m && n(m), j !== void 0 && t < j && n(j));
|
|
2647
|
+
}, [t, m, j, n]), /* @__PURE__ */ r.jsxs(e, { withoutLabel: o, label: s ?? "", hidden: l, className: p, children: [
|
|
2648
|
+
/* @__PURE__ */ r.jsx(bn, { displayType: "input", thousandSeparator: " ", decimalScale: h, prefix: v, suffix: b, defaultValue: "", value: a ? D : (t == null ? void 0 : t.toString()) ?? "", placeholder: i ?? s, onFocus: (I) => {
|
|
2649
|
+
!g && I.target.select();
|
|
2642
2650
|
}, onChange: F, hidden: l, disabled: u, className: w("form-control text-end w-100", {
|
|
2643
2651
|
[`form-control-${c}`]: c
|
|
2644
|
-
}), step:
|
|
2645
|
-
d && t !== null && n && !u && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ r.jsx(
|
|
2652
|
+
}), step: x, min: j, max: m }),
|
|
2653
|
+
d && t !== null && n && !u && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ r.jsx(re, { color: "secondary", size: "sm", onClick: y, children: /* @__PURE__ */ r.jsx(Oe, {}) }) })
|
|
2646
2654
|
] });
|
|
2647
2655
|
}, Qn = [
|
|
2648
2656
|
["D", "day"],
|
|
@@ -2733,22 +2741,22 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2733
2741
|
}, [n, t]);
|
|
2734
2742
|
return { setFromToProp: a, handleArrowClick: s, handleRangeChange: o };
|
|
2735
2743
|
}, gd = ({ fromtoState: [e, t], className: n, size: a }) => {
|
|
2736
|
-
const { texts: { date: s }, ProjectIconComponent: o } = Z(pe), [i, c] = O("C"), { handleArrowClick: l, handleRangeChange: u, setFromToProp: d } = Xl(i, c, t), f =
|
|
2737
|
-
return
|
|
2738
|
-
if (
|
|
2739
|
-
const
|
|
2740
|
-
c(
|
|
2744
|
+
const { texts: { date: s }, ProjectIconComponent: o } = Z(pe), [i, c] = O("C"), { handleArrowClick: l, handleRangeChange: u, setFromToProp: d } = Xl(i, c, t), f = ne(() => i === "C", [i]), p = te(!0);
|
|
2745
|
+
return R(() => {
|
|
2746
|
+
if (p.current) {
|
|
2747
|
+
const x = Jl(e.from, e.to);
|
|
2748
|
+
c(x), p.current = !1;
|
|
2741
2749
|
}
|
|
2742
2750
|
}, [e.from, e.to]), /* @__PURE__ */ r.jsxs("div", { className: w("d-inline-flex align-items-center gap-1", Zn.wrapper, Zn[a ?? "md"], n), children: [
|
|
2743
|
-
/* @__PURE__ */ r.jsx(
|
|
2751
|
+
/* @__PURE__ */ r.jsx(re, { disabled: f, onClick: () => {
|
|
2744
2752
|
l(-1);
|
|
2745
2753
|
}, children: /* @__PURE__ */ r.jsx(o, { icon: "chevron-left" }) }),
|
|
2746
2754
|
/* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
2747
|
-
/* @__PURE__ */ r.jsx(st, { type: "date", value: e.from, onChange: (
|
|
2748
|
-
/* @__PURE__ */ r.jsx(un, { toggle: /* @__PURE__ */ r.jsx(fn, { text: s[Qn.find((
|
|
2749
|
-
/* @__PURE__ */ r.jsx(st, { type: "date", value: e.to, onChange: (
|
|
2755
|
+
/* @__PURE__ */ r.jsx(st, { type: "date", value: e.from, onChange: (x) => d("from", x === null ? null : x.toString()), InputContainer: Fe, size: a }),
|
|
2756
|
+
/* @__PURE__ */ r.jsx(un, { toggle: /* @__PURE__ */ r.jsx(fn, { text: s[Qn.find((x) => x[0] === i)[1]].substring(0, 1), as: ps }), children: Qn.map((x) => /* @__PURE__ */ r.jsx(Ze, { disabled: x[0] === i, className: w(x[0] === i ? "text-black-50" : ""), onClick: () => u(x[0]), role: "button", children: s[x[1]] }, x[0])) }),
|
|
2757
|
+
/* @__PURE__ */ r.jsx(st, { type: "date", value: e.to, onChange: (x) => d("to", x === null ? null : x.toString()), InputContainer: Fe, size: a })
|
|
2750
2758
|
] }) }),
|
|
2751
|
-
/* @__PURE__ */ r.jsx(
|
|
2759
|
+
/* @__PURE__ */ r.jsx(re, { disabled: f, onClick: () => {
|
|
2752
2760
|
l(1);
|
|
2753
2761
|
}, children: /* @__PURE__ */ r.jsx(o, { icon: "chevron-right" }) })
|
|
2754
2762
|
] });
|
|
@@ -2869,24 +2877,24 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2869
2877
|
] }) });
|
|
2870
2878
|
}
|
|
2871
2879
|
}, hc = ({ schema: e, columns: t, initialItem: n, onEdit: a, onDelete: s }) => {
|
|
2872
|
-
const { ProjectIconComponent: o } = Z(pe), [i, c] = O(n), l = C((f,
|
|
2873
|
-
console.log("changeValue", f,
|
|
2874
|
-
...
|
|
2880
|
+
const { ProjectIconComponent: o } = Z(pe), [i, c] = O(n), l = C((f, p) => {
|
|
2881
|
+
console.log("changeValue", f, p), c((x) => ({
|
|
2882
|
+
...x,
|
|
2875
2883
|
[f]: {
|
|
2876
|
-
...
|
|
2877
|
-
value:
|
|
2884
|
+
...x[f],
|
|
2885
|
+
value: p
|
|
2878
2886
|
}
|
|
2879
2887
|
}));
|
|
2880
2888
|
}, []), u = (f) => (f == null ? void 0 : f.value) !== (f == null ? void 0 : f.defaultValue), d = C(() => Object.keys(i).some((f) => u(i[f])), [i]);
|
|
2881
|
-
return
|
|
2889
|
+
return R(() => {
|
|
2882
2890
|
c(n);
|
|
2883
2891
|
}, [n]), /* @__PURE__ */ r.jsxs("tr", { className: w("table-row", ue.tableRow), children: [
|
|
2884
|
-
/* @__PURE__ */ r.jsx("td", { className: w("table-cell", ue.tableCell, ue.stickyFirst), children: d() && /* @__PURE__ */ r.jsx(
|
|
2892
|
+
/* @__PURE__ */ r.jsx("td", { className: w("table-cell", ue.tableCell, ue.stickyFirst), children: d() && /* @__PURE__ */ r.jsx(re, { color: "success", onClick: () => a(ya(i)), children: /* @__PURE__ */ r.jsx(o, { icon: "check" }) }) }),
|
|
2885
2893
|
t.map((f) => {
|
|
2886
|
-
var
|
|
2887
|
-
return /* @__PURE__ */ r.jsx("td", { className: w("table-cell", ue.tableCell), children: /* @__PURE__ */ r.jsx(ba, { type: f.type, value: (
|
|
2894
|
+
var p, x;
|
|
2895
|
+
return /* @__PURE__ */ r.jsx("td", { className: w("table-cell", ue.tableCell), children: /* @__PURE__ */ r.jsx(ba, { type: f.type, value: (p = i[f.field ?? ""]) == null ? void 0 : p.value, field: f.field, isReadonly: f.readOnly, isPrimary: e.primaryKey === f.field, valuesForSelect: f.valuesForSelect, onChangeHandler: l, hideClearIcon: !u(i[f.field ?? ""]), clearValue: (x = i[f.field ?? ""].defaultValue) == null ? void 0 : x.toString() }) }, `${e.id}-${f.field}`);
|
|
2888
2896
|
}),
|
|
2889
|
-
/* @__PURE__ */ r.jsx("td", { className: w("table-cell", ue.tableCell, ue.stickyLast), children: /* @__PURE__ */ r.jsx(
|
|
2897
|
+
/* @__PURE__ */ r.jsx("td", { className: w("table-cell", ue.tableCell, ue.stickyLast), children: /* @__PURE__ */ r.jsx(re, { color: "danger", onClick: () => s(i[e.primaryKey ?? ""].value), children: /* @__PURE__ */ r.jsx(o, { icon: "delete" }) }) })
|
|
2890
2898
|
] });
|
|
2891
2899
|
}, gc = ({ schema: e, columns: t, onCreate: n }) => {
|
|
2892
2900
|
const { ProjectIconComponent: a } = Z(pe), [s, o] = O(null), i = C(() => {
|
|
@@ -2909,30 +2917,30 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2909
2917
|
});
|
|
2910
2918
|
}, []);
|
|
2911
2919
|
return s ? /* @__PURE__ */ r.jsxs("tr", { className: "sticky-bottom shadow", children: [
|
|
2912
|
-
/* @__PURE__ */ r.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ r.jsx(
|
|
2920
|
+
/* @__PURE__ */ r.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ r.jsx(re, { color: "success", onClick: async () => {
|
|
2913
2921
|
const l = ya(s);
|
|
2914
2922
|
l && await n(l) && o(null);
|
|
2915
2923
|
}, children: /* @__PURE__ */ r.jsx(a, { icon: "check" }) }) }),
|
|
2916
2924
|
t.map((l) => /* @__PURE__ */ r.jsx("td", { children: /* @__PURE__ */ r.jsx(ba, { type: l.type, value: s[l.field ?? ""].value, field: l.field, isReadonly: l.readOnly, isPrimary: e.primaryKey === l.field, valuesForSelect: l.valuesForSelect, onChangeHandler: c, primaryEditable: !0 }) }, `${e.id}-${l.field}`)),
|
|
2917
|
-
/* @__PURE__ */ r.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ r.jsx(
|
|
2925
|
+
/* @__PURE__ */ r.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ r.jsx(re, { color: "danger", onClick: () => o(null), children: /* @__PURE__ */ r.jsx(a, { icon: "cancel" }) }) })
|
|
2918
2926
|
] }) : /* @__PURE__ */ r.jsxs("tr", { className: "sticky-bottom shadow", children: [
|
|
2919
|
-
/* @__PURE__ */ r.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ r.jsx(
|
|
2927
|
+
/* @__PURE__ */ r.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ r.jsx(re, { onClick: i, children: /* @__PURE__ */ r.jsx(a, { icon: "add" }) }) }),
|
|
2920
2928
|
/* @__PURE__ */ r.jsx("td", { colSpan: t.length + 1 })
|
|
2921
2929
|
] });
|
|
2922
2930
|
}, pc = ({ column: e, children: t }) => e.description ? /* @__PURE__ */ r.jsx(Lt, { placement: "bottom", text: e.description ?? "", children: /* @__PURE__ */ r.jsx("div", { children: t }) }) : /* @__PURE__ */ r.jsx(r.Fragment, { children: t }), xc = ({ schema: e, items: t, onEditItem: n, onDeleteItem: a, onCreateItem: s, filters: o, setFilter: i, sortByField: c, sortByType: l, setSortBy: u, selectedMaster: d }) => {
|
|
2923
|
-
const { texts: { dynamicForms: f }, ProjectIconComponent:
|
|
2924
|
-
return
|
|
2925
|
-
var h,
|
|
2931
|
+
const { texts: { dynamicForms: f }, ProjectIconComponent: p } = Z(pe), [x, g] = O([]);
|
|
2932
|
+
return R(() => {
|
|
2933
|
+
var h, v, b;
|
|
2926
2934
|
g([
|
|
2927
|
-
...((b = (
|
|
2935
|
+
...((b = (v = (h = e.columns) == null ? void 0 : h.filter((j) => !j.hidden)) == null ? void 0 : v.filter((j) => e.masterReference ? j.field !== e.masterReferenceColumn : !0)) == null ? void 0 : b.map((j) => {
|
|
2928
2936
|
var m;
|
|
2929
2937
|
return {
|
|
2930
|
-
label:
|
|
2931
|
-
description:
|
|
2932
|
-
field:
|
|
2933
|
-
type:
|
|
2934
|
-
readOnly:
|
|
2935
|
-
valuesForSelect: ((m =
|
|
2938
|
+
label: j.caption ?? "",
|
|
2939
|
+
description: j.description ?? null,
|
|
2940
|
+
field: j.field ?? "",
|
|
2941
|
+
type: j.type,
|
|
2942
|
+
readOnly: j.readOnly,
|
|
2943
|
+
valuesForSelect: ((m = j.values) == null ? void 0 : m.filter((y) => j.valuesFilteredByMaster ? y.masterValue === d : !0).map((y) => ({ id: y.id ?? "", name: y.name }))) ?? void 0
|
|
2936
2944
|
};
|
|
2937
2945
|
})) ?? []
|
|
2938
2946
|
]);
|
|
@@ -2940,35 +2948,35 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2940
2948
|
/* @__PURE__ */ r.jsxs("thead", { className: w("text-nowrap table-header", ue.stickyTop, ue.tableHeader), children: [
|
|
2941
2949
|
/* @__PURE__ */ r.jsxs("tr", { className: w("table-row", ue.tableRow), children: [
|
|
2942
2950
|
/* @__PURE__ */ r.jsx("th", { className: w("table-head", ue.tableHead, ue.actionColumn, ue.stickyFirst) }),
|
|
2943
|
-
|
|
2944
|
-
const
|
|
2945
|
-
if (
|
|
2951
|
+
x.map((h) => /* @__PURE__ */ r.jsx("th", { className: w("table-head", ue.tableHead), onClick: () => {
|
|
2952
|
+
const v = c === h.field ? l : null;
|
|
2953
|
+
if (v === "asc") {
|
|
2946
2954
|
u(h.field, "desc");
|
|
2947
2955
|
return;
|
|
2948
2956
|
}
|
|
2949
|
-
if (
|
|
2957
|
+
if (v === "desc") {
|
|
2950
2958
|
u(h.field, null);
|
|
2951
2959
|
return;
|
|
2952
2960
|
}
|
|
2953
2961
|
u(h.field, "asc");
|
|
2954
2962
|
}, children: /* @__PURE__ */ r.jsx(pc, { column: h, children: /* @__PURE__ */ r.jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [
|
|
2955
2963
|
h.label,
|
|
2956
|
-
c === h.field && /* @__PURE__ */ r.jsx(
|
|
2964
|
+
c === h.field && /* @__PURE__ */ r.jsx(p, { icon: l === "asc" ? "chevron-up" : "chevron-down" })
|
|
2957
2965
|
] }) }) }, `${e.id}-${h.field}`)),
|
|
2958
2966
|
/* @__PURE__ */ r.jsx("th", { className: w("table-head", ue.tableHead, ue.actionColumn, ue.stickyLast) })
|
|
2959
2967
|
] }),
|
|
2960
2968
|
/* @__PURE__ */ r.jsxs("tr", { className: w("table-row filters-row", ue.tableRow, ue.filtersRow), children: [
|
|
2961
2969
|
/* @__PURE__ */ r.jsx("th", { className: w("table-head", ue.tableHead, ue.actionColumn, ue.stickyFirst) }),
|
|
2962
|
-
|
|
2970
|
+
x.map((h) => /* @__PURE__ */ r.jsx("th", { className: w("table-head", ue.tableHead), children: h.valuesForSelect && h.valuesForSelect.length > 0 || h.type === "BIT" ? /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsx(Dt, { InputContainer: Fe, withoutLabel: !0, size: "sm", value: o[h.field] ?? "", onChange: (v) => i(h.field, (v == null ? void 0 : v.toString()) ?? null), options: h.type === "BIT" ? [
|
|
2963
2971
|
{ id: 1, name: f.yes },
|
|
2964
2972
|
{ id: 0, name: f.no }
|
|
2965
|
-
] : h.valuesForSelect ?? [], isNumber: h.type === "BIT", showClearIcon: !0 }) }) : /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsx(st, { InputContainer: Fe, withoutLabel: !0, size: "sm", type: h.type === "NUM" ? "number" : h.type === "DT" ? "date" : "text", value: o[h.field] ?? "", onChange: (
|
|
2973
|
+
] : h.valuesForSelect ?? [], isNumber: h.type === "BIT", showClearIcon: !0 }) }) : /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsx(st, { InputContainer: Fe, withoutLabel: !0, size: "sm", type: h.type === "NUM" ? "number" : h.type === "DT" ? "date" : "text", value: o[h.field] ?? "", onChange: (v) => i(h.field, (v == null ? void 0 : v.toString()) ?? null) }) }) }, `${e.id}-${h.field}`)),
|
|
2966
2974
|
/* @__PURE__ */ r.jsx("th", { className: w("table-head", ue.tableHead, ue.actionColumn, ue.stickyLast) })
|
|
2967
2975
|
] })
|
|
2968
2976
|
] }),
|
|
2969
2977
|
/* @__PURE__ */ r.jsxs("tbody", { className: w("table-body", ue.tableBody), children: [
|
|
2970
|
-
t.filter((h) => h[e.primaryKey ?? ""]).map((h) => /* @__PURE__ */ r.jsx(hc, { schema: e, columns:
|
|
2971
|
-
/* @__PURE__ */ r.jsx(gc, { schema: e, columns:
|
|
2978
|
+
t.filter((h) => h[e.primaryKey ?? ""]).map((h) => /* @__PURE__ */ r.jsx(hc, { schema: e, columns: x, initialItem: h, onEdit: n, onDelete: a }, `${e.id}-${h[e.primaryKey ?? ""].value}`)),
|
|
2979
|
+
/* @__PURE__ */ r.jsx(gc, { schema: e, columns: x, onCreate: s })
|
|
2972
2980
|
] })
|
|
2973
2981
|
] });
|
|
2974
2982
|
}, vc = ({ master: e, onChange: t, options: n, label: a }) => /* @__PURE__ */ r.jsx(Dt, { label: a, value: e, onChange: (s) => t(s ? s.toString() : null), options: n, size: "sm" }), jc = "_pagination_gujwe_1", Xn = {
|
|
@@ -2981,24 +2989,24 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2981
2989
|
apiItemPost: "/dynamicForms/update",
|
|
2982
2990
|
apiItemDelete: "/dynamicForms/delete",
|
|
2983
2991
|
apiItemCreate: "/dynamicForms/insert"
|
|
2984
|
-
}, jd = ({ id: e, page: t, setPage: n, filters: a, setFilter: s, sortByField: o, sortByType: i, setSortBy: c, appUrls: { appDetail: l = er.appDetail } = er, apiUrls: { apiSchemaGet: u = at.apiSchemaGet, apiDataGet: d = at.apiDataGet, apiItemPost: f = at.apiItemPost, apiItemDelete:
|
|
2992
|
+
}, jd = ({ id: e, page: t, setPage: n, filters: a, setFilter: s, sortByField: o, sortByType: i, setSortBy: c, appUrls: { appDetail: l = er.appDetail } = er, apiUrls: { apiSchemaGet: u = at.apiSchemaGet, apiDataGet: d = at.apiDataGet, apiItemPost: f = at.apiItemPost, apiItemDelete: p = at.apiItemDelete, apiItemCreate: x = at.apiItemCreate } = at }) => {
|
|
2985
2993
|
var ce, Ne, de, se, Se, $e;
|
|
2986
|
-
const { texts: { dynamicForms: g }, ProjectIconComponent: h } = Z(pe),
|
|
2987
|
-
|
|
2988
|
-
|
|
2994
|
+
const { texts: { dynamicForms: g }, ProjectIconComponent: h } = Z(pe), v = Xe(), { startLoading: b, stopLoading: j } = Z(Ot), [m, y] = O(null), [_, D] = O(null), [$, S] = O(null), [F, I] = O(null), [E, N] = O(!1), { addNotification: P } = _r(), [U, H] = O([]), { confirm: A } = Tt(), L = 20, V = L + 1, G = F ? Math.ceil(F.length / L) : 1, K = t ? t > 1 : !1, q = t ? t < G : !1, ee = t ? (t - 1) * L : 0, B = t ? t * L : L, [k, W] = O(!1), le = k ? F == null ? void 0 : F.slice(ee, B) : F, [fe, ke] = O(null);
|
|
2995
|
+
R(() => {
|
|
2996
|
+
y(null), D(null), N(!1), H([]), ke(null);
|
|
2989
2997
|
}, [e]);
|
|
2990
2998
|
const J = C(async () => {
|
|
2991
|
-
b("dynamicFormSchema"), await
|
|
2992
|
-
|
|
2993
|
-
}).catch(() =>
|
|
2994
|
-
}, [
|
|
2995
|
-
var
|
|
2996
|
-
if (!(m === null || ((
|
|
2999
|
+
b("dynamicFormSchema"), await v.get(`${u}?id=${e}`).then(({ data: z }) => {
|
|
3000
|
+
y(z), j("dynamicFormSchema");
|
|
3001
|
+
}).catch(() => j("dynamicFormSchema"));
|
|
3002
|
+
}, [v, e, b, j, u]), ve = C(async () => {
|
|
3003
|
+
var z;
|
|
3004
|
+
if (!(m === null || ((z = m.id) == null ? void 0 : z.toString()) !== e)) {
|
|
2997
3005
|
if (m.masterReference && !fe) {
|
|
2998
|
-
|
|
3006
|
+
D([]);
|
|
2999
3007
|
return;
|
|
3000
3008
|
}
|
|
3001
|
-
b("dynamicFormData"), await
|
|
3009
|
+
b("dynamicFormData"), await v.get(`${d}?id=${e}&showArchive=${E}${m.masterReference ? `&master=${fe}` : ""}`).then(({ data: ae }) => {
|
|
3002
3010
|
const ge = ae.map((ie) => {
|
|
3003
3011
|
var xe;
|
|
3004
3012
|
return Object.fromEntries(((xe = m.columns) == null ? void 0 : xe.filter((ye) => ye.field).map((ye) => [
|
|
@@ -3006,37 +3014,37 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3006
3014
|
{ value: ie[ye.field ?? ""], defaultValue: ie[ye.field ?? ""] }
|
|
3007
3015
|
])) ?? []);
|
|
3008
3016
|
});
|
|
3009
|
-
|
|
3010
|
-
}).catch(() =>
|
|
3017
|
+
D(ge), j("dynamicFormData");
|
|
3018
|
+
}).catch(() => j("dynamicFormData"));
|
|
3011
3019
|
}
|
|
3012
|
-
}, [
|
|
3013
|
-
m && await De(m.masterReference ? { ...
|
|
3020
|
+
}, [v, e, m, b, j, E, fe, d]), De = C(async (z) => (b("dynamicFormEdit"), v.post(`${f}?id=${e}`, z).then(() => (j("dynamicFormEdit"), H([]), !0)).catch((ae) => (j("dynamicFormEdit"), H(Vt(ae)), !1))), [v, e, b, j, f]), Ue = C(async (z) => (b("dynamicFormDelete"), v.delete(`${p}?id=${e}&pk=${z}`).then(() => (j("dynamicFormDelete"), H([]), !0)).catch((ae) => (j("dynamicFormDelete"), H(Vt(ae)), !1))), [v, e, b, j, p]), Y = C(async (z) => (b("dynamicFormCreate"), v.post(`${x}?id=${e}`, z).then(({ data: ae }) => (j("dynamicFormCreate"), H([]), ae)).catch((ae) => (j("dynamicFormCreate"), H(Vt(ae)), null))), [v, e, b, j, x]), he = C(async (z) => {
|
|
3021
|
+
m && await De(m.masterReference ? { ...z, [m.masterReferenceColumn ?? ""]: fe } : z) && (P(g.editSuccess, "success"), D((ae) => ae && ae.map((ge) => {
|
|
3014
3022
|
var ie;
|
|
3015
|
-
return ((ie = ge[(m == null ? void 0 : m.primaryKey) ?? ""]) == null ? void 0 : ie.value) ===
|
|
3023
|
+
return ((ie = ge[(m == null ? void 0 : m.primaryKey) ?? ""]) == null ? void 0 : ie.value) === z[(m == null ? void 0 : m.primaryKey) ?? ""] ? Jn(z, m) : ge;
|
|
3016
3024
|
})));
|
|
3017
|
-
}, [P, De, m, fe, g]), we = C(async (
|
|
3018
|
-
await
|
|
3025
|
+
}, [P, De, m, fe, g]), we = C(async (z) => {
|
|
3026
|
+
await A(g.deleteConfirm) && await Ue(z) && (P(g.deleteSuccess, "success"), D((ae) => ae && ae.filter((ge) => {
|
|
3019
3027
|
var ie;
|
|
3020
|
-
return ((ie = ge[(m == null ? void 0 : m.primaryKey) ?? ""]) == null ? void 0 : ie.value) !==
|
|
3028
|
+
return ((ie = ge[(m == null ? void 0 : m.primaryKey) ?? ""]) == null ? void 0 : ie.value) !== z;
|
|
3021
3029
|
})));
|
|
3022
|
-
}, [P, Ue, g,
|
|
3030
|
+
}, [P, Ue, g, A, m]), nt = C(async (z) => {
|
|
3023
3031
|
if (!m)
|
|
3024
3032
|
return !1;
|
|
3025
|
-
const ae = await
|
|
3033
|
+
const ae = await Y(m.masterReference ? { ...z, [m.masterReferenceColumn ?? ""]: fe } : z);
|
|
3026
3034
|
if (ae !== null) {
|
|
3027
3035
|
P(g.createSuccess, "success");
|
|
3028
|
-
const ge = Jn(
|
|
3029
|
-
return ge[(m == null ? void 0 : m.primaryKey) ?? ""] = { value: ae, defaultValue: ae },
|
|
3036
|
+
const ge = Jn(z, m);
|
|
3037
|
+
return ge[(m == null ? void 0 : m.primaryKey) ?? ""] = { value: ae, defaultValue: ae }, D((ie) => [...ie ?? [], ge]), !0;
|
|
3030
3038
|
}
|
|
3031
3039
|
return !1;
|
|
3032
|
-
}, [P,
|
|
3033
|
-
|
|
3040
|
+
}, [P, Y, g, m, fe]), T = (z) => {
|
|
3041
|
+
z > G ? n(G) : z < 1 && n(1), n(z);
|
|
3034
3042
|
}, M = C(() => {
|
|
3035
|
-
if (!
|
|
3036
|
-
|
|
3043
|
+
if (!_ || !m) {
|
|
3044
|
+
S(null);
|
|
3037
3045
|
return;
|
|
3038
3046
|
}
|
|
3039
|
-
const
|
|
3047
|
+
const z = _.filter((ae) => Object.entries(a).every(([ge, ie]) => {
|
|
3040
3048
|
var ct, dt, ut;
|
|
3041
3049
|
if (ie === null)
|
|
3042
3050
|
return !0;
|
|
@@ -3059,19 +3067,19 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3059
3067
|
return xe.toString().toLowerCase().includes(ie.toLowerCase());
|
|
3060
3068
|
}
|
|
3061
3069
|
}));
|
|
3062
|
-
|
|
3063
|
-
}, [
|
|
3064
|
-
if (
|
|
3065
|
-
|
|
3070
|
+
S(z);
|
|
3071
|
+
}, [_, a, m]), Q = C(() => {
|
|
3072
|
+
if (!$ || !m) {
|
|
3073
|
+
I([]);
|
|
3066
3074
|
return;
|
|
3067
3075
|
}
|
|
3068
3076
|
if (!o) {
|
|
3069
|
-
|
|
3077
|
+
I($);
|
|
3070
3078
|
return;
|
|
3071
3079
|
}
|
|
3072
|
-
|
|
3080
|
+
I([...$].sort((z, ae) => {
|
|
3073
3081
|
var it, lt, ct, dt, ut, bt;
|
|
3074
|
-
const ge = ((lt = (it =
|
|
3082
|
+
const ge = ((lt = (it = z[o]) == null ? void 0 : it.value) == null ? void 0 : lt.toString()) ?? "", ie = ((dt = (ct = ae[o]) == null ? void 0 : ct.value) == null ? void 0 : dt.toString()) ?? "", xe = m.columns.find((Ee) => Ee.field === o), ye = xe == null ? void 0 : xe.type;
|
|
3075
3083
|
if (!xe || !ye || !ge && !ie)
|
|
3076
3084
|
return 0;
|
|
3077
3085
|
if (!ge)
|
|
@@ -3098,40 +3106,40 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3098
3106
|
}
|
|
3099
3107
|
return i === "asc" ? ge.toString().localeCompare(ie.toString()) : ie.toString().localeCompare(ge.toString());
|
|
3100
3108
|
}));
|
|
3101
|
-
}, [
|
|
3102
|
-
return
|
|
3109
|
+
}, [$, m, o, i]);
|
|
3110
|
+
return R(() => {
|
|
3103
3111
|
J();
|
|
3104
|
-
}, [J]),
|
|
3112
|
+
}, [J]), R(() => {
|
|
3105
3113
|
ve();
|
|
3106
|
-
}, [ve]),
|
|
3114
|
+
}, [ve]), R(() => {
|
|
3107
3115
|
M();
|
|
3108
|
-
}, [M]),
|
|
3116
|
+
}, [M]), R(() => {
|
|
3109
3117
|
Q();
|
|
3110
|
-
}, [Q]),
|
|
3111
|
-
F && F.length > V ? (
|
|
3112
|
-
}, [F, n, t, V]),
|
|
3113
|
-
!
|
|
3114
|
-
}, [t,
|
|
3118
|
+
}, [Q]), R(() => {
|
|
3119
|
+
F && F.length > V ? (W(!0), t || n(1)) : (W(!1), F && n(null));
|
|
3120
|
+
}, [F, n, t, V]), R(() => {
|
|
3121
|
+
!k || !t || (t > G && n(G), t < 1 && n(1));
|
|
3122
|
+
}, [t, k, G, n]), /* @__PURE__ */ r.jsxs("div", { className: "h-100 w-100 d-flex flex-column", children: [
|
|
3115
3123
|
/* @__PURE__ */ r.jsxs("div", { className: "mb-3 d-flex justify-content-between align-items-center", children: [
|
|
3116
3124
|
/* @__PURE__ */ r.jsx(X, { variant: "h3", children: (m == null ? void 0 : m.name) ?? "" }),
|
|
3117
|
-
/* @__PURE__ */ r.jsx(fa, { label: g.showArchived, value:
|
|
3125
|
+
/* @__PURE__ */ r.jsx(fa, { label: g.showArchived, value: E === !0, onChange: (z) => N(z) })
|
|
3118
3126
|
] }),
|
|
3119
3127
|
(m == null ? void 0 : m.description) && /* @__PURE__ */ r.jsx(X, { variant: "body2", className: "mb-3", children: m == null ? void 0 : m.description }),
|
|
3120
|
-
(m == null ? void 0 : m.masterReference) && /* @__PURE__ */ r.jsx("div", { className: "mb-3 d-flex", children: /* @__PURE__ */ r.jsx(vc, { label: ((Ne = (ce = m.columns) == null ? void 0 : ce.find((
|
|
3121
|
-
(m == null ? void 0 : m.slaves) && m.slaves.length > 0 && /* @__PURE__ */ r.jsx("div", { className: "mb-3 d-flex align-items-center flex-start", children: m.slaves.map((
|
|
3128
|
+
(m == null ? void 0 : m.masterReference) && /* @__PURE__ */ r.jsx("div", { className: "mb-3 d-flex", children: /* @__PURE__ */ r.jsx(vc, { label: ((Ne = (ce = m.columns) == null ? void 0 : ce.find((z) => z.field === m.masterReferenceColumn)) == null ? void 0 : Ne.caption) ?? "", options: ((se = (de = m.columns) == null ? void 0 : de.find((z) => z.field === m.masterReferenceColumn)) == null ? void 0 : se.values) ?? [], master: fe, onChange: (z) => ke(z) }) }),
|
|
3129
|
+
(m == null ? void 0 : m.slaves) && m.slaves.length > 0 && /* @__PURE__ */ r.jsx("div", { className: "mb-3 d-flex align-items-center flex-start", children: m.slaves.map((z) => {
|
|
3122
3130
|
var ae;
|
|
3123
|
-
return /* @__PURE__ */ r.jsx(Le, { as: "link", href: `${St(l, { id: (ae =
|
|
3131
|
+
return /* @__PURE__ */ r.jsx(Le, { as: "link", href: `${St(l, { id: (ae = z.id) == null ? void 0 : ae.toString() })}?type=dynamic-form`, children: z.name }, z.id);
|
|
3124
3132
|
}) }),
|
|
3125
|
-
m != null && m.masterReference && !fe ? /* @__PURE__ */ r.jsx(da, { variant: "warning", children: g.selectMaster((($e = (Se = m.columns) == null ? void 0 : Se.find((
|
|
3133
|
+
m != null && m.masterReference && !fe ? /* @__PURE__ */ r.jsx(da, { variant: "warning", children: g.selectMaster((($e = (Se = m.columns) == null ? void 0 : Se.find((z) => z.field === m.masterReferenceColumn)) == null ? void 0 : $e.caption) ?? "").toLowerCase() }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3126
3134
|
m && U.length > 0 && /* @__PURE__ */ r.jsx("div", { className: "mb-2", children: /* @__PURE__ */ r.jsx(ec, { errors: U, schema: m }) }),
|
|
3127
3135
|
m && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3128
|
-
/* @__PURE__ */ r.jsx("div", { className: w("rounded border overflow-auto", Xn.tableContainer), children: /* @__PURE__ */ r.jsx(xc, { schema: m, items: (
|
|
3129
|
-
|
|
3136
|
+
/* @__PURE__ */ r.jsx("div", { className: w("rounded border overflow-auto", Xn.tableContainer), children: /* @__PURE__ */ r.jsx(xc, { schema: m, items: (k ? le : F) ?? [], onEditItem: he, onDeleteItem: we, onCreateItem: nt, filters: a, setFilter: s, sortByField: o, sortByType: i, setSortBy: c, selectedMaster: (fe == null ? void 0 : fe.toString()) ?? null }) }),
|
|
3137
|
+
k && t && /* @__PURE__ */ r.jsxs("div", { className: w(Xn.pagination, "d-flex align-items-center gap-3 p-1 border-bottom border-start border-end rounded"), children: [
|
|
3130
3138
|
/* @__PURE__ */ r.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
3131
|
-
/* @__PURE__ */ r.jsx(
|
|
3132
|
-
/* @__PURE__ */ r.jsx(
|
|
3133
|
-
/* @__PURE__ */ r.jsx(
|
|
3134
|
-
/* @__PURE__ */ r.jsx(
|
|
3139
|
+
/* @__PURE__ */ r.jsx(re, { color: "primary", onClick: () => T(1), disabled: !K, children: /* @__PURE__ */ r.jsx(h, { icon: "chevron-double-left" }) }),
|
|
3140
|
+
/* @__PURE__ */ r.jsx(re, { color: "primary", onClick: () => T(t - 1), disabled: !K, children: /* @__PURE__ */ r.jsx(h, { icon: "chevron-left" }) }),
|
|
3141
|
+
/* @__PURE__ */ r.jsx(re, { color: "primary", onClick: () => T(t + 1), disabled: !q, children: /* @__PURE__ */ r.jsx(h, { icon: "chevron-right" }) }),
|
|
3142
|
+
/* @__PURE__ */ r.jsx(re, { color: "primary", onClick: () => T(G), disabled: !q, children: /* @__PURE__ */ r.jsx(h, { icon: "chevron-double-right" }) })
|
|
3135
3143
|
] }),
|
|
3136
3144
|
/* @__PURE__ */ r.jsxs(X, { variant: "body", children: [
|
|
3137
3145
|
g.tablePage,
|
|
@@ -3140,7 +3148,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3140
3148
|
" ",
|
|
3141
3149
|
g.tablePageFrom,
|
|
3142
3150
|
" ",
|
|
3143
|
-
|
|
3151
|
+
G
|
|
3144
3152
|
] })
|
|
3145
3153
|
] })
|
|
3146
3154
|
] })
|
|
@@ -3151,31 +3159,31 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3151
3159
|
}, nr = {
|
|
3152
3160
|
apiDynamicFormsGet: "/dynamicForms"
|
|
3153
3161
|
}, yc = ({ item: e, children: t }) => e.description ? /* @__PURE__ */ r.jsx(Lt, { placement: "left", text: e.description ?? "", children: /* @__PURE__ */ r.jsx("div", { children: t }) }) : /* @__PURE__ */ r.jsx(r.Fragment, { children: t }), yd = ({ activeId: e, otherForms: t = [], groupsDefs: n = [], searchQuery: a, fullSize: s, appUrls: { appDetail: o = tr.appDetail } = tr, apiUrls: { apiDynamicFormsGet: i = nr.apiDynamicFormsGet } = nr }) => {
|
|
3154
|
-
const c = Xe(), { startLoading: l, stopLoading: u } = Z(Ot), [d, f] = O(null),
|
|
3162
|
+
const c = Xe(), { startLoading: l, stopLoading: u } = Z(Ot), [d, f] = O(null), p = ne(() => [
|
|
3155
3163
|
...(d == null ? void 0 : d.map((h) => ({
|
|
3156
3164
|
...h,
|
|
3157
3165
|
type: "dynamic-form"
|
|
3158
3166
|
}))) ?? [],
|
|
3159
3167
|
...t
|
|
3160
|
-
].filter((h) => tn(h.name, a) || tn(h.description, a)).sort((h,
|
|
3168
|
+
].filter((h) => tn(h.name, a) || tn(h.description, a)).sort((h, v) => (h.name ?? "").localeCompare(v.name ?? "")) ?? [], [d, t, a]), x = ne(() => n.map((h) => ({
|
|
3161
3169
|
id: h.id,
|
|
3162
3170
|
name: h.name ?? "",
|
|
3163
|
-
items:
|
|
3164
|
-
})).filter((h) => h.items.length > 0), [n,
|
|
3171
|
+
items: p.filter((v) => v.group === h.id)
|
|
3172
|
+
})).filter((h) => h.items.length > 0), [n, p]), g = C(async () => {
|
|
3165
3173
|
l("dynamicForms"), await c.get(i).then(({ data: h }) => {
|
|
3166
3174
|
f(h), u("dynamicForms");
|
|
3167
3175
|
}).catch(() => u("dynamicForms"));
|
|
3168
3176
|
}, [c, l, u, i]);
|
|
3169
|
-
return
|
|
3177
|
+
return R(() => {
|
|
3170
3178
|
!d && g();
|
|
3171
|
-
}, [g, d]),
|
|
3172
|
-
var b,
|
|
3173
|
-
return s ? /* @__PURE__ */ r.jsxs(Je, { to: `${St(o, { id: (b =
|
|
3174
|
-
/* @__PURE__ */ r.jsx(X, { variant: "body", children:
|
|
3175
|
-
|
|
3176
|
-
] },
|
|
3179
|
+
}, [g, d]), p.length > 0 ? /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsx("div", { className: "w-auto list-group forms-items overflow-x-hidden", children: x.map((h) => /* @__PURE__ */ r.jsx(Yo, { title: h.name, defaultOpen: !0, children: h.items.map((v) => {
|
|
3180
|
+
var b, j, m, y;
|
|
3181
|
+
return s ? /* @__PURE__ */ r.jsxs(Je, { to: `${St(o, { id: (b = v.id) == null ? void 0 : b.toString() })}?type=${v.type}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((j = v.id) == null ? void 0 : j.toString()) ? "active" : ""}`, children: [
|
|
3182
|
+
/* @__PURE__ */ r.jsx(X, { variant: "body", children: v.name }),
|
|
3183
|
+
v.description && /* @__PURE__ */ r.jsx(X, { variant: "body2", className: "text-muted mt-2", children: v.description })
|
|
3184
|
+
] }, v.id) : /* @__PURE__ */ r.jsx(yc, { item: v, children: /* @__PURE__ */ r.jsx(Je, { to: `${St(o, { id: (m = v.id) == null ? void 0 : m.toString() })}?type=${v.type}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((y = v.id) == null ? void 0 : y.toString()) ? "active" : ""}`, children: /* @__PURE__ */ r.jsx(X, { variant: "body2", children: v.name }) }) }, v.id);
|
|
3177
3185
|
}) }, h.id)) }) }) : null;
|
|
3178
|
-
}, bd = ({ label: e, to: t, value: n }) => /* @__PURE__ */ r.jsxs(
|
|
3186
|
+
}, bd = ({ label: e, to: t, value: n }) => /* @__PURE__ */ r.jsxs(ze, { label: e, children: [
|
|
3179
3187
|
/* @__PURE__ */ r.jsx("input", { disabled: !0, className: "form-control d-none" }),
|
|
3180
3188
|
t ? /* @__PURE__ */ r.jsx(Je, { to: t, className: "border-bottom luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center", children: n }) : /* @__PURE__ */ r.jsx("div", { className: "luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center", children: n })
|
|
3181
3189
|
] }), wd = () => {
|
|
@@ -3232,260 +3240,270 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3232
3240
|
}, labelSkipWidth: 12, labelSkipHeight: 12, labelTextColor: {
|
|
3233
3241
|
from: "color",
|
|
3234
3242
|
modifiers: [["darker", 1.6]]
|
|
3235
|
-
}, tooltipLabel: a }), Id = ({ InputContainer: e =
|
|
3236
|
-
const { register: d, formState: f, setValue:
|
|
3237
|
-
|
|
3238
|
-
const
|
|
3243
|
+
}, tooltipLabel: a }), Id = ({ InputContainer: e = ze, formField: t, label: n, resetsFields: a, type: s, required: o, hidden: i, disabled: c, withoutLabel: l, className: u }) => {
|
|
3244
|
+
const { register: d, formState: f, setValue: p } = We(), [x, g] = O(void 0), [h, v] = O(!1);
|
|
3245
|
+
R(() => {
|
|
3246
|
+
const j = t.split(".");
|
|
3239
3247
|
let m = f.errors;
|
|
3240
|
-
|
|
3241
|
-
m !== void 0 && (m = m[
|
|
3248
|
+
j.forEach((y) => {
|
|
3249
|
+
m !== void 0 && (m = m[y]);
|
|
3242
3250
|
}), g(m);
|
|
3243
|
-
}, [f, t]),
|
|
3244
|
-
f.isSubmitted &&
|
|
3251
|
+
}, [f, t]), R(() => {
|
|
3252
|
+
f.isSubmitted && v(!0);
|
|
3245
3253
|
}, [f]);
|
|
3246
|
-
const b =
|
|
3254
|
+
const b = x !== void 0;
|
|
3247
3255
|
return /* @__PURE__ */ r.jsxs(e, { isForCheckInput: !0, hidden: i, label: `${n}${o ? " *" : ""}`, isInvalid: b, withoutLabel: l, className: u, children: [
|
|
3248
3256
|
/* @__PURE__ */ r.jsx(be.Check, { id: `check-${t}`, type: s ?? "checkbox", label: `${n}${o ? " *" : ""}`, ...d(t, {
|
|
3249
3257
|
onChange: () => {
|
|
3250
|
-
a && a.forEach((
|
|
3258
|
+
a && a.forEach((j) => p(j, null, { shouldDirty: !0, shouldValidate: h }));
|
|
3251
3259
|
}
|
|
3252
3260
|
}), isInvalid: b, hidden: i, disabled: c, className: "w-100" }),
|
|
3253
|
-
|
|
3261
|
+
x && /* @__PURE__ */ r.jsx(tt, { message: x.message })
|
|
3254
3262
|
] });
|
|
3255
|
-
}, Dd = ({ InputContainer: e =
|
|
3256
|
-
const { register: u, formState: d, setValue: f, watch:
|
|
3257
|
-
|
|
3263
|
+
}, Dd = ({ InputContainer: e = ze, label: t, formField: n, options: a, resetsFields: s, required: o, disabled: i, hidden: c, className: l }) => {
|
|
3264
|
+
const { register: u, formState: d, setValue: f, watch: p } = We(), [x, g] = O(void 0), [h, v] = O(!1), b = ne(() => a, [a]);
|
|
3265
|
+
R(() => {
|
|
3258
3266
|
const m = n.split(".");
|
|
3259
|
-
let
|
|
3260
|
-
m.forEach((
|
|
3261
|
-
|
|
3262
|
-
}), g(
|
|
3263
|
-
}, [d, n]),
|
|
3264
|
-
d.isSubmitted &&
|
|
3267
|
+
let y = d.errors;
|
|
3268
|
+
m.forEach((_) => {
|
|
3269
|
+
y !== void 0 && (y = y[_]);
|
|
3270
|
+
}), g(y);
|
|
3271
|
+
}, [d, n]), R(() => {
|
|
3272
|
+
d.isSubmitted && v(!0);
|
|
3265
3273
|
}, [d]);
|
|
3266
|
-
const
|
|
3267
|
-
return /* @__PURE__ */ r.jsxs(e, { isForRadioInput: !0, hidden: c, withoutLabel: !t, label: `${t}${o ? " *" : ""}`, isInvalid:
|
|
3268
|
-
b.map((m) => /* @__PURE__ */ r.jsx(be.Check, { id: `radio-${m.id}`, label: m.name, type: "radio", value: m.id ?? "", checked:
|
|
3274
|
+
const j = x !== void 0;
|
|
3275
|
+
return /* @__PURE__ */ r.jsxs(e, { isForRadioInput: !0, hidden: c, withoutLabel: !t, label: `${t}${o ? " *" : ""}`, isInvalid: j, className: l, children: [
|
|
3276
|
+
b.map((m) => /* @__PURE__ */ r.jsx(be.Check, { id: `radio-${m.id}`, label: m.name, type: "radio", value: m.id ?? "", checked: p(n) === m.id, ...u(n, {
|
|
3269
3277
|
onChange: () => {
|
|
3270
|
-
s && s.forEach((
|
|
3278
|
+
s && s.forEach((y) => f(y, null, { shouldDirty: !0, shouldValidate: h }));
|
|
3271
3279
|
}
|
|
3272
|
-
}), isInvalid:
|
|
3273
|
-
|
|
3280
|
+
}), isInvalid: j, hidden: c, disabled: i, className: "w-100" }, m.id)),
|
|
3281
|
+
x && /* @__PURE__ */ r.jsx(tt, { message: x.message })
|
|
3274
3282
|
] });
|
|
3275
|
-
}, $d = ({ InputContainer: e =
|
|
3276
|
-
const { formState:
|
|
3283
|
+
}, $d = ({ InputContainer: e = ze, formField: t, label: n, size: a, defaultSelection: s, resetsFields: o, isNumber: i, required: c, hidden: l, disabled: u, items: d, onSearchQueryChange: f, selectedItemNavigateTo: p, texts: x, dropdownItemsNameWidth: g, isLoading: h, withoutLabel: v, additionalColumns: b, CustomOnChangeComponent: j, icon: m, displayIdAsName: y, onSelect: _, className: D, archiveColumn: $ }) => {
|
|
3284
|
+
const { formState: S, setValue: F, watch: I, control: E } = We(), [N, P] = O(void 0), [U, H] = O(!1), [A, L] = O(!1), V = I(t) ?? null, G = V === (s == null ? void 0 : s.id) ? s == null ? void 0 : s.name : I(`${t}-DropdownName`), K = ne(() => V == null ? null : { id: V ?? null, name: G ?? "" }, [V, G]), q = C(() => {
|
|
3277
3285
|
const J = t.split(".");
|
|
3278
|
-
let ve =
|
|
3286
|
+
let ve = S.errors;
|
|
3279
3287
|
J.forEach((De) => {
|
|
3280
3288
|
ve !== void 0 && (ve = ve[De]);
|
|
3281
3289
|
}), P(ve);
|
|
3282
|
-
}, [
|
|
3290
|
+
}, [S, t]), ee = C((J) => {
|
|
3283
3291
|
if ((J == null ? void 0 : J.id) === V)
|
|
3284
3292
|
return;
|
|
3285
|
-
if (
|
|
3293
|
+
if (_ && _(J), o && o.forEach((De) => F(De, null, { shouldDirty: !0, shouldValidate: A })), J === null) {
|
|
3286
3294
|
F(t, null, {
|
|
3287
3295
|
shouldDirty: !0,
|
|
3288
|
-
shouldValidate:
|
|
3296
|
+
shouldValidate: A
|
|
3289
3297
|
}), F(`${t}-DropdownName`, null);
|
|
3290
3298
|
return;
|
|
3291
3299
|
}
|
|
3292
3300
|
let ve = null;
|
|
3293
3301
|
i ? ve = (J == null ? void 0 : J.id) !== null && (J == null ? void 0 : J.id) !== "" ? parseInt(J.id.toString(), 10) : null : ve = J.id === null || J.id === void 0 || J.id === "" ? null : J.id, F(t, ve, {
|
|
3294
3302
|
shouldDirty: !0,
|
|
3295
|
-
shouldValidate:
|
|
3303
|
+
shouldValidate: A
|
|
3296
3304
|
}), F(`${t}-DropdownName`, J.name ?? "");
|
|
3297
|
-
}, [F, t,
|
|
3298
|
-
H(!1),
|
|
3299
|
-
}, [
|
|
3305
|
+
}, [F, t, A, i, o, V, _]), B = C((J) => {
|
|
3306
|
+
H(!1), ee(J);
|
|
3307
|
+
}, [ee]), k = C(() => {
|
|
3300
3308
|
H(!1);
|
|
3301
3309
|
}, []);
|
|
3302
|
-
|
|
3310
|
+
R(() => {
|
|
3303
3311
|
q();
|
|
3304
|
-
}, [q]),
|
|
3305
|
-
|
|
3306
|
-
}, [
|
|
3307
|
-
const
|
|
3308
|
-
return /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsxs(e, { label: `${n}${c ? " *" : ""}`, hidden: l, withoutLabel:
|
|
3309
|
-
/* @__PURE__ */ r.jsxs(ua, { currentSelection:
|
|
3310
|
-
|
|
3311
|
-
/* @__PURE__ */ r.jsx(mn, { control:
|
|
3312
|
+
}, [q]), R(() => {
|
|
3313
|
+
S.isSubmitted && L(!0);
|
|
3314
|
+
}, [S]);
|
|
3315
|
+
const W = te(null), le = N !== void 0, fe = p !== void 0, ke = fe && K !== null;
|
|
3316
|
+
return /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsxs(e, { label: `${n}${c ? " *" : ""}`, hidden: l, withoutLabel: v, isInvalid: le, inputContainerClassName: w({ "luminus-dropdown-select-open": U }), className: D, children: [
|
|
3317
|
+
/* @__PURE__ */ r.jsxs(ua, { currentSelection: K, selectedItemNavigateTo: p, children: [
|
|
3318
|
+
y && (K == null ? void 0 : K.name) && /* @__PURE__ */ r.jsx(X, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: K.name }),
|
|
3319
|
+
/* @__PURE__ */ r.jsx(mn, { control: E, name: t, render: () => /* @__PURE__ */ r.jsx(be.Select, { size: a, onMouseDown: (J) => {
|
|
3312
3320
|
J.currentTarget.focus(), J.preventDefault();
|
|
3313
3321
|
}, onClick: () => {
|
|
3314
3322
|
!fe && !u && H(!0);
|
|
3315
|
-
}, ref:
|
|
3323
|
+
}, ref: W, value: V ?? "", onChange: () => {
|
|
3316
3324
|
}, isInvalid: le, hidden: l, className: w("w-100", {
|
|
3317
3325
|
"luminus-dropdown-picker-disabled": u,
|
|
3318
3326
|
"luminus-dropdown-picker-link": ke
|
|
3319
|
-
}), children: /* @__PURE__ */ r.jsx("option", { value: V, children:
|
|
3320
|
-
|
|
3321
|
-
!
|
|
3327
|
+
}), children: /* @__PURE__ */ r.jsx("option", { value: V, children: y ? V : (G == null ? void 0 : G.length) > 0 ? G : V }) }) }),
|
|
3328
|
+
j || !u && fe ? /* @__PURE__ */ r.jsxs("div", { className: "custom-picker-button", children: [
|
|
3329
|
+
!j && !u && fe && /* @__PURE__ */ r.jsx(re, { size: "sm", color: "secondary", onClick: (J) => {
|
|
3322
3330
|
J.preventDefault(), J.stopPropagation(), H(!0);
|
|
3323
3331
|
}, children: m ?? /* @__PURE__ */ r.jsx(yr, {}) }),
|
|
3324
|
-
|
|
3332
|
+
j ?? null
|
|
3325
3333
|
] }) : null
|
|
3326
3334
|
] }),
|
|
3327
|
-
|
|
3328
|
-
|
|
3335
|
+
N && /* @__PURE__ */ r.jsx(tt, { message: N.message }),
|
|
3336
|
+
W.current && /* @__PURE__ */ r.jsx(jn, { show: U, onCancel: k, items: d, currentSelection: K, onSelectionChange: B, onSearchQueryChange: f, texts: x, itemsNameWidth: g, additionalColumns: b, displayIdAsName: y, isLoading: h, disabled: u, inputRef: W, archiveColumn: $ })
|
|
3329
3337
|
] }) });
|
|
3330
|
-
}, Ed = ({ InputContainer: e =
|
|
3331
|
-
const { watch:
|
|
3338
|
+
}, Ed = ({ InputContainer: e = ze, label: t, formField: n, hidden: a, required: s, placeholder: o, disabled: i, showClearIcon: c, resetsFields: l, multiple: u, accept: d, withoutLabel: f, className: p }) => {
|
|
3339
|
+
const { watch: x, setValue: g, register: h, formState: v } = We(), [b, j] = O(!1), [m, y] = O(void 0), _ = C(() => {
|
|
3332
3340
|
g(n, "");
|
|
3333
|
-
}, [g, n]),
|
|
3334
|
-
const
|
|
3335
|
-
let F =
|
|
3336
|
-
|
|
3337
|
-
F !== void 0 && (F = F[
|
|
3338
|
-
}),
|
|
3339
|
-
}, [
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
}, [
|
|
3343
|
-
const
|
|
3344
|
-
return /* @__PURE__ */ r.jsxs(e, { label: `${t}${s ? "*" : ""}`, hidden: a, withoutLabel: f, isInvalid:
|
|
3345
|
-
/* @__PURE__ */ r.jsx(ys, { type: "file", multiple: u, accept: d.join(", "), placeholder: o ?? t, isInvalid:
|
|
3341
|
+
}, [g, n]), D = C(() => {
|
|
3342
|
+
const S = n.split(".");
|
|
3343
|
+
let F = v.errors;
|
|
3344
|
+
S.forEach((I) => {
|
|
3345
|
+
F !== void 0 && (F = F[I]);
|
|
3346
|
+
}), y(F);
|
|
3347
|
+
}, [v, n]);
|
|
3348
|
+
R(D, [D]), R(() => {
|
|
3349
|
+
v.isSubmitted && j(!0);
|
|
3350
|
+
}, [v]);
|
|
3351
|
+
const $ = m !== void 0;
|
|
3352
|
+
return /* @__PURE__ */ r.jsxs(e, { label: `${t}${s ? "*" : ""}`, hidden: a, withoutLabel: f, isInvalid: $, className: p, children: [
|
|
3353
|
+
/* @__PURE__ */ r.jsx(ys, { type: "file", multiple: u, accept: d.join(", "), placeholder: o ?? t, isInvalid: $, hidden: a, disabled: i, className: "w-100", ...h(n, {
|
|
3346
3354
|
onChange: () => {
|
|
3347
|
-
l && l.forEach((
|
|
3355
|
+
l && l.forEach((S) => g(S, null, { shouldDirty: !0, shouldValidate: b }));
|
|
3348
3356
|
}
|
|
3349
3357
|
}) }),
|
|
3350
|
-
c &&
|
|
3358
|
+
c && x(n) && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r.jsx(re, { color: "secondary", size: "sm", onClick: _, children: /* @__PURE__ */ r.jsx(Oe, {}) }) }),
|
|
3351
3359
|
m && /* @__PURE__ */ r.jsx(tt, { message: m.message })
|
|
3352
3360
|
] });
|
|
3353
3361
|
}, Fd = ({ children: e, onStorno: t, noSpacer: n }) => {
|
|
3354
|
-
const { formState: a } =
|
|
3355
|
-
return
|
|
3362
|
+
const { formState: a } = We(), [s, o] = O(!1);
|
|
3363
|
+
return R(() => {
|
|
3356
3364
|
o(Object.keys(a.dirtyFields).length > 0);
|
|
3357
3365
|
}, [a]), s ? /* @__PURE__ */ r.jsx(po, { onStorno: t, noSpacer: n, children: e }) : null;
|
|
3358
|
-
}, Od = ({ InputContainer: e =
|
|
3359
|
-
const { texts: { customSelect:
|
|
3360
|
-
const
|
|
3361
|
-
let
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
}),
|
|
3365
|
-
}, [
|
|
3366
|
-
if ((
|
|
3366
|
+
}, Od = ({ InputContainer: e = ze, options: t, formField: n, label: a, size: s, resetsFields: o, isNumber: i, required: c, hidden: l, disabled: u, withoutLabel: d, noSortOptions: f, suffixIdToName: p, onSelect: x, className: g, appendCurrentSelectionWithName: h }) => {
|
|
3367
|
+
const { texts: { customSelect: v } } = Z(pe), { formState: b, setValue: j, watch: m, control: y } = We(), [_, D] = O(void 0), [$, S] = O(!1), [F, I] = O(!1), [E, N] = O(""), P = m(n), U = ne(() => t.find((B) => B.id === P) ?? null, [t, P]), H = C(() => {
|
|
3368
|
+
const B = n.split(".");
|
|
3369
|
+
let k = b.errors;
|
|
3370
|
+
B.forEach((W) => {
|
|
3371
|
+
k !== void 0 && (k = k[W]);
|
|
3372
|
+
}), D(k);
|
|
3373
|
+
}, [b, n]), A = C((B) => {
|
|
3374
|
+
if ((B == null ? void 0 : B.id) === P)
|
|
3367
3375
|
return;
|
|
3368
|
-
if (
|
|
3369
|
-
|
|
3376
|
+
if (x && x(B), o && o.forEach((W) => j(W, null, { shouldDirty: !0, shouldValidate: F })), B === null) {
|
|
3377
|
+
j(n, null, {
|
|
3370
3378
|
shouldDirty: !0,
|
|
3371
|
-
shouldValidate:
|
|
3379
|
+
shouldValidate: F
|
|
3372
3380
|
});
|
|
3373
3381
|
return;
|
|
3374
3382
|
}
|
|
3375
|
-
let
|
|
3376
|
-
i ?
|
|
3383
|
+
let k = null;
|
|
3384
|
+
i ? k = (B == null ? void 0 : B.id) !== null && (B == null ? void 0 : B.id) !== "" ? parseInt(B.id.toString(), 10) : null : k = B.id === null || B.id === void 0 || B.id === "" ? null : B.id, j(n, k, {
|
|
3377
3385
|
shouldDirty: !0,
|
|
3378
|
-
shouldValidate:
|
|
3386
|
+
shouldValidate: F
|
|
3379
3387
|
});
|
|
3380
|
-
}, [
|
|
3381
|
-
|
|
3382
|
-
}, [
|
|
3383
|
-
|
|
3388
|
+
}, [j, n, i, o, P, F, x]), L = C((B) => {
|
|
3389
|
+
S(!1), A(B);
|
|
3390
|
+
}, [A]), V = C((B) => {
|
|
3391
|
+
N(B);
|
|
3384
3392
|
}, []);
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
}, [
|
|
3388
|
-
|
|
3389
|
-
}, [
|
|
3390
|
-
const
|
|
3391
|
-
var
|
|
3392
|
-
return
|
|
3393
|
-
}, [
|
|
3394
|
-
|
|
3395
|
-
name:
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3393
|
+
R(() => {
|
|
3394
|
+
H();
|
|
3395
|
+
}, [H]), R(() => {
|
|
3396
|
+
b.isSubmitted && I(!0);
|
|
3397
|
+
}, [b]);
|
|
3398
|
+
const G = C((B) => {
|
|
3399
|
+
var k;
|
|
3400
|
+
return B === null ? "" : !B.name || B.name.length === 0 ? ((k = B.id) == null ? void 0 : k.toString()) ?? "" : p ? `${B.name} (${B.id})` : B.name;
|
|
3401
|
+
}, [p]), K = ne(() => {
|
|
3402
|
+
const B = t ?? [];
|
|
3403
|
+
return h !== void 0 && P && (B.some((k) => k.id === P) || B.push({ id: P, name: h })), B.map((k) => ({
|
|
3404
|
+
id: k.id,
|
|
3405
|
+
name: G(k)
|
|
3406
|
+
})).filter((k) => tn(k.name, E)).sort((k, W) => f ? 0 : (k.name ?? "").localeCompare(W.name ?? ""));
|
|
3407
|
+
}, [
|
|
3408
|
+
t,
|
|
3409
|
+
f,
|
|
3410
|
+
E,
|
|
3411
|
+
G,
|
|
3412
|
+
h,
|
|
3413
|
+
P
|
|
3414
|
+
]), q = te(null), ee = _ !== void 0;
|
|
3415
|
+
return /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsxs(e, { label: `${a}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid: ee, inputContainerClassName: w({ "luminus-dropdown-select-open": $ }), className: g, children: [
|
|
3416
|
+
/* @__PURE__ */ r.jsx(mn, { control: y, name: n, render: () => /* @__PURE__ */ r.jsx(be.Select, { size: s, onMouseDown: (B) => {
|
|
3417
|
+
B.currentTarget.focus(), B.preventDefault();
|
|
3400
3418
|
}, onClick: () => {
|
|
3401
|
-
|
|
3402
|
-
}, ref:
|
|
3403
|
-
}, isInvalid:
|
|
3404
|
-
|
|
3405
|
-
|
|
3419
|
+
S(!0);
|
|
3420
|
+
}, ref: q, value: P ?? "", onChange: () => {
|
|
3421
|
+
}, isInvalid: ee, hidden: l, disabled: u, className: "w-100", children: /* @__PURE__ */ r.jsx("option", { value: (U == null ? void 0 : U.id) ?? "", children: G(U) }) }) }),
|
|
3422
|
+
_ && /* @__PURE__ */ r.jsx(tt, { message: _.message }),
|
|
3423
|
+
q.current && /* @__PURE__ */ r.jsx(jn, { show: $, onCancel: () => S(!1), items: K, currentSelection: U ?? null, onSelectionChange: L, onSearchQueryChange: V, texts: v, disabled: u, inputRef: q, autoHideSearch: !0, allItemsLength: t.length })
|
|
3406
3424
|
] }) });
|
|
3407
|
-
}, Td = ({ InputContainer: e =
|
|
3408
|
-
const { register: b, formState:
|
|
3409
|
-
m(U, ht(H, h,
|
|
3410
|
-
}, [
|
|
3425
|
+
}, Td = ({ InputContainer: e = ze, formField: t, label: n, placeholder: a, size: s, resetsFields: o, showClearIcon: i, clearValue: c, required: l, hidden: u, disabled: d, withoutLabel: f, step: p, stepperStep: x = 1, className: g, min: h, max: v }) => {
|
|
3426
|
+
const { register: b, formState: j, setValue: m, watch: y } = We(), [_, D] = O(void 0), [$, S] = O(!1), F = C((U, H, A) => {
|
|
3427
|
+
m(U, ht(H, h, v), A);
|
|
3428
|
+
}, [v, h, m]), I = C(() => {
|
|
3411
3429
|
const U = c ?? null;
|
|
3412
3430
|
F(t, U !== null ? Number(U) : null, {
|
|
3413
3431
|
shouldDirty: !0,
|
|
3414
|
-
shouldValidate:
|
|
3432
|
+
shouldValidate: $
|
|
3415
3433
|
});
|
|
3416
|
-
}, [c, F, t,
|
|
3434
|
+
}, [c, F, t, $]), E = C(() => {
|
|
3417
3435
|
const U = t.split(".");
|
|
3418
|
-
let H =
|
|
3419
|
-
U.forEach((
|
|
3420
|
-
H !== void 0 && (H = H[
|
|
3421
|
-
}),
|
|
3422
|
-
}, [
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
}, [
|
|
3426
|
-
|
|
3427
|
-
}, [
|
|
3428
|
-
const
|
|
3429
|
-
return /* @__PURE__ */ r.jsxs(e, { label: `${n}${l ? " *" : ""}`, hidden: u, withoutLabel: f, isInvalid:
|
|
3436
|
+
let H = j.errors;
|
|
3437
|
+
U.forEach((A) => {
|
|
3438
|
+
H !== void 0 && (H = H[A]);
|
|
3439
|
+
}), D(H);
|
|
3440
|
+
}, [j, t]);
|
|
3441
|
+
R(() => {
|
|
3442
|
+
E();
|
|
3443
|
+
}, [E]), R(() => {
|
|
3444
|
+
j.isSubmitted && S(!0);
|
|
3445
|
+
}, [j]);
|
|
3446
|
+
const N = _ !== void 0, P = y(t);
|
|
3447
|
+
return /* @__PURE__ */ r.jsxs(e, { label: `${n}${l ? " *" : ""}`, hidden: u, withoutLabel: f, isInvalid: N, className: g, children: [
|
|
3430
3448
|
/* @__PURE__ */ r.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
3431
3449
|
/* @__PURE__ */ r.jsx(be.Control, { type: "number", placeholder: a ?? n, size: s, ...b(t, {
|
|
3432
|
-
setValueAs: (U) => U == null || U === "" ? null : ht(Number(U), h,
|
|
3450
|
+
setValueAs: (U) => U == null || U === "" ? null : ht(Number(U), h, v),
|
|
3433
3451
|
min: h,
|
|
3434
|
-
max:
|
|
3452
|
+
max: v,
|
|
3435
3453
|
onChange: () => {
|
|
3436
|
-
o && o.forEach((U) => m(U, null, { shouldDirty: !0, shouldValidate:
|
|
3454
|
+
o && o.forEach((U) => m(U, null, { shouldDirty: !0, shouldValidate: $ }));
|
|
3437
3455
|
}
|
|
3438
|
-
}), isInvalid:
|
|
3439
|
-
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ r.jsx(
|
|
3440
|
-
U.preventDefault(), U.stopPropagation(), F(t, ((P ? Number(P) : 0) -
|
|
3456
|
+
}), isInvalid: N, hidden: u, disabled: d, className: "w-100 luminus-numeric-stepper", step: p, min: h, max: v }),
|
|
3457
|
+
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ r.jsx(re, { size: "sm", onClick: (U) => {
|
|
3458
|
+
U.preventDefault(), U.stopPropagation(), F(t, ((P ? Number(P) : 0) - x).toString(), { shouldDirty: !0, shouldValidate: $ });
|
|
3441
3459
|
}, children: /* @__PURE__ */ r.jsx(br, {}) }) }),
|
|
3442
|
-
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ r.jsx(
|
|
3443
|
-
U.preventDefault(), U.stopPropagation(), F(t, ((P ? Number(P) : 0) +
|
|
3460
|
+
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ r.jsx(re, { size: "sm", onClick: (U) => {
|
|
3461
|
+
U.preventDefault(), U.stopPropagation(), F(t, ((P ? Number(P) : 0) + x).toString(), { shouldDirty: !0, shouldValidate: $ });
|
|
3444
3462
|
}, children: /* @__PURE__ */ r.jsx(wr, {}) }) })
|
|
3445
3463
|
] }),
|
|
3446
|
-
i &&
|
|
3447
|
-
|
|
3464
|
+
i && y(t) && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r.jsx(re, { color: "secondary", size: "sm", onClick: I, children: /* @__PURE__ */ r.jsx(Oe, {}) }) }),
|
|
3465
|
+
_ && /* @__PURE__ */ r.jsx(tt, { message: _.message })
|
|
3448
3466
|
] });
|
|
3449
|
-
}, Ld = ({ InputContainer: e =
|
|
3450
|
-
const { formState:
|
|
3467
|
+
}, Ld = ({ InputContainer: e = ze, formField: t, label: n, placeholder: a, resetsFields: s, showClearIcon: o, clearValue: i, required: c, hidden: l, disabled: u, withoutLabel: d, step: f, size: p, CustomOnChangeComponent: x, noSelectOnFocus: g, className: h, decimalScale: v = 2, numberPrefix: b, numberSuffix: j, min: m, max: y }) => {
|
|
3468
|
+
const { formState: _, setValue: D, watch: $, control: S } = We(), [F, I] = O(void 0), [E, N] = O(!1), P = C(() => {
|
|
3451
3469
|
const L = i ?? null;
|
|
3452
|
-
|
|
3470
|
+
D(t, L !== null ? Number(L) : null, {
|
|
3453
3471
|
shouldDirty: !0,
|
|
3454
|
-
shouldValidate:
|
|
3472
|
+
shouldValidate: E
|
|
3455
3473
|
});
|
|
3456
|
-
}, [i,
|
|
3474
|
+
}, [i, D, t, E]), U = C(() => {
|
|
3457
3475
|
const L = t.split(".");
|
|
3458
|
-
let V =
|
|
3459
|
-
L.forEach((
|
|
3460
|
-
V !== void 0 && (V = V[
|
|
3461
|
-
}),
|
|
3462
|
-
}, [
|
|
3463
|
-
|
|
3476
|
+
let V = _.errors;
|
|
3477
|
+
L.forEach((G) => {
|
|
3478
|
+
V !== void 0 && (V = V[G]);
|
|
3479
|
+
}), I(V);
|
|
3480
|
+
}, [_, t]);
|
|
3481
|
+
R(() => {
|
|
3464
3482
|
U();
|
|
3465
|
-
}, [U]),
|
|
3466
|
-
|
|
3467
|
-
}, [
|
|
3468
|
-
const H =
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
}, [t, H,
|
|
3472
|
-
const
|
|
3473
|
-
return /* @__PURE__ */ r.jsxs(e, { label: `${n}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid:
|
|
3483
|
+
}, [U]), R(() => {
|
|
3484
|
+
_.isSubmitted && N(!0);
|
|
3485
|
+
}, [_]);
|
|
3486
|
+
const H = $(t);
|
|
3487
|
+
R(() => {
|
|
3488
|
+
y !== void 0 && H > y && D(t, y), m !== void 0 && H < m && D(t, m);
|
|
3489
|
+
}, [t, H, y, m, D]);
|
|
3490
|
+
const A = F !== void 0;
|
|
3491
|
+
return /* @__PURE__ */ r.jsxs(e, { label: `${n}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid: A, className: h, children: [
|
|
3474
3492
|
/* @__PURE__ */ r.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
3475
|
-
/* @__PURE__ */ r.jsx(mn, { control:
|
|
3493
|
+
/* @__PURE__ */ r.jsx(mn, { control: S, name: t, render: ({ field: { ref: L, onChange: V, name: G, value: K } }) => /* @__PURE__ */ r.jsx(bn, { displayType: "input", thousandSeparator: " ", decimalScale: v, prefix: b, suffix: j, defaultValue: "", name: G, value: K ?? "", placeholder: a ?? n, onFocus: (q) => {
|
|
3476
3494
|
!g && q.target.select();
|
|
3477
3495
|
}, onChange: (q) => {
|
|
3478
|
-
var
|
|
3479
|
-
const
|
|
3480
|
-
s && s.forEach((
|
|
3496
|
+
var B, k;
|
|
3497
|
+
const ee = parseFloat(((k = (B = q.target) == null ? void 0 : B.value) == null ? void 0 : k.replaceAll(" ", "")) ?? 0);
|
|
3498
|
+
s && s.forEach((W) => D(W, null, { shouldDirty: !0, shouldValidate: E })), V(ee == null || Number.isNaN(ee) ? null : Number(ee));
|
|
3481
3499
|
}, hidden: l, disabled: u, className: w("form-control text-end w-100", {
|
|
3482
|
-
"is-invalid":
|
|
3500
|
+
"is-invalid": A
|
|
3483
3501
|
}, {
|
|
3484
|
-
[`form-control-${
|
|
3485
|
-
}), step: f, getInputRef: L, min: m, max:
|
|
3486
|
-
|
|
3502
|
+
[`form-control-${p}`]: p
|
|
3503
|
+
}), step: f, getInputRef: L, min: m, max: y }) }),
|
|
3504
|
+
x && /* @__PURE__ */ r.jsx("div", { className: "custom-picker-button", children: x })
|
|
3487
3505
|
] }),
|
|
3488
|
-
o &&
|
|
3506
|
+
o && $(t) && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ r.jsx(re, { color: "secondary", size: "sm", onClick: P, children: /* @__PURE__ */ r.jsx(Oe, {}) }) }),
|
|
3489
3507
|
F && /* @__PURE__ */ r.jsx(tt, { message: F.message })
|
|
3490
3508
|
] });
|
|
3491
3509
|
}, wn = ["slice", "options", "formats", "conditions"], rr = (e) => {
|
|
@@ -3510,9 +3528,9 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3510
3528
|
t[n] = (e == null ? void 0 : e[n]) ?? void 0;
|
|
3511
3529
|
}), t;
|
|
3512
3530
|
}, _c = ({ dataSource: e, settings: t, pivotRef: n, localization: a, licenseKey: s, enabled: o = !0 }) => {
|
|
3513
|
-
const { texts: { reports: i } } = Z(pe), [c, l] = O(!1), u =
|
|
3531
|
+
const { texts: { reports: i } } = Z(pe), [c, l] = O(!1), u = te(null), d = n ?? u, f = ne(() => ({
|
|
3514
3532
|
localization: a
|
|
3515
|
-
}), [a]),
|
|
3533
|
+
}), [a]), p = C((g) => {
|
|
3516
3534
|
delete g[0], delete g[1], delete g[2];
|
|
3517
3535
|
const h = [
|
|
3518
3536
|
{
|
|
@@ -3535,26 +3553,26 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3535
3553
|
menu: h,
|
|
3536
3554
|
rightGroup: !0
|
|
3537
3555
|
}), g;
|
|
3538
|
-
}, [d, i.collapseAll, i.expand, i.expandAll]),
|
|
3556
|
+
}, [d, i.collapseAll, i.expand, i.expandAll]), x = (g) => {
|
|
3539
3557
|
const h = g.getTabs();
|
|
3540
|
-
g.getTabs = () =>
|
|
3558
|
+
g.getTabs = () => p(h);
|
|
3541
3559
|
};
|
|
3542
|
-
return
|
|
3560
|
+
return R(() => {
|
|
3543
3561
|
var g;
|
|
3544
3562
|
c && o && ((g = d.current) == null || g.flexmonster.updateData(e), console.log("Updating flexmonster dataSource to: ", e));
|
|
3545
|
-
}, [e, o, c, d]),
|
|
3546
|
-
var g, h,
|
|
3563
|
+
}, [e, o, c, d]), R(() => {
|
|
3564
|
+
var g, h, v;
|
|
3547
3565
|
if (c && o) {
|
|
3548
|
-
const { options: b, conditions:
|
|
3549
|
-
if (
|
|
3566
|
+
const { options: b, conditions: j, formats: m, slice: y, ..._ } = (g = d.current) == null ? void 0 : g.flexmonster.getReport();
|
|
3567
|
+
if (_ === void 0 || typeof _ == "string")
|
|
3550
3568
|
return;
|
|
3551
|
-
const
|
|
3552
|
-
|
|
3569
|
+
const D = wc(t);
|
|
3570
|
+
D.options = {
|
|
3553
3571
|
...t == null ? void 0 : t.options,
|
|
3554
3572
|
grid: { ...(h = t == null ? void 0 : t.options) == null ? void 0 : h.grid, autoSwitchToCompact: !1 }
|
|
3555
3573
|
};
|
|
3556
|
-
const
|
|
3557
|
-
(
|
|
3574
|
+
const $ = { ..._, ...D };
|
|
3575
|
+
(v = d.current) == null || v.flexmonster.setReport($), console.log("Refreshing flexmonster settings. New report: ", $);
|
|
3558
3576
|
}
|
|
3559
3577
|
}, [o, c, d, t]), /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsx(
|
|
3560
3578
|
Os,
|
|
@@ -3564,7 +3582,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3564
3582
|
licenseKey: s,
|
|
3565
3583
|
toolbar: !0,
|
|
3566
3584
|
height: "100%",
|
|
3567
|
-
beforetoolbarcreated:
|
|
3585
|
+
beforetoolbarcreated: x,
|
|
3568
3586
|
ready: () => {
|
|
3569
3587
|
l(!0);
|
|
3570
3588
|
},
|
|
@@ -3572,26 +3590,26 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3572
3590
|
}
|
|
3573
3591
|
) });
|
|
3574
3592
|
}, Nc = (e, t, n, a) => {
|
|
3575
|
-
const { texts: { reports: s } } = Z(pe), { prompt: o } = bs(), { confirm: i } = Tt(), c = Xe(), { user: l } = Z(Ft), { startLoading: u, stopLoading: d } = Z(Ot), { addNotification: f } = _r(),
|
|
3593
|
+
const { texts: { reports: s } } = Z(pe), { prompt: o } = bs(), { confirm: i } = Tt(), c = Xe(), { user: l } = Z(Ft), { startLoading: u, stopLoading: d } = Z(Ot), { addNotification: f } = _r(), p = C(async (b) => {
|
|
3576
3594
|
u("report-versionSavingAs");
|
|
3577
3595
|
try {
|
|
3578
|
-
const
|
|
3579
|
-
f(s.saveSuccessful, "success"), await a(
|
|
3596
|
+
const j = await c.post("/reports/version", b);
|
|
3597
|
+
f(s.saveSuccessful, "success"), await a(j.data);
|
|
3580
3598
|
} finally {
|
|
3581
3599
|
d("report-versionSavingAs");
|
|
3582
3600
|
}
|
|
3583
|
-
}, [f, a, c, s.saveSuccessful, u, d]),
|
|
3601
|
+
}, [f, a, c, s.saveSuccessful, u, d]), x = C(async () => {
|
|
3584
3602
|
if (n === null) {
|
|
3585
3603
|
f("none open", "warning");
|
|
3586
3604
|
return;
|
|
3587
3605
|
}
|
|
3588
3606
|
if (!await i(s.confirmOverwriteSave))
|
|
3589
3607
|
return;
|
|
3590
|
-
const
|
|
3591
|
-
|
|
3608
|
+
const j = rr(t);
|
|
3609
|
+
p({
|
|
3592
3610
|
reportSourceName: e,
|
|
3593
3611
|
reportVersionId: n,
|
|
3594
|
-
settings:
|
|
3612
|
+
settings: j
|
|
3595
3613
|
});
|
|
3596
3614
|
}, [
|
|
3597
3615
|
f,
|
|
@@ -3599,19 +3617,19 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3599
3617
|
t,
|
|
3600
3618
|
e,
|
|
3601
3619
|
s.confirmOverwriteSave,
|
|
3602
|
-
|
|
3620
|
+
p,
|
|
3603
3621
|
n
|
|
3604
3622
|
]), g = C(async () => {
|
|
3605
3623
|
const b = await o(s.enterName, { input: "input", required: !0 });
|
|
3606
3624
|
if (b === null)
|
|
3607
3625
|
return;
|
|
3608
|
-
const
|
|
3609
|
-
|
|
3626
|
+
const j = rr(t);
|
|
3627
|
+
p({
|
|
3610
3628
|
reportSourceName: e,
|
|
3611
3629
|
name: b,
|
|
3612
|
-
settings:
|
|
3630
|
+
settings: j
|
|
3613
3631
|
});
|
|
3614
|
-
}, [t, o, e, s.enterName,
|
|
3632
|
+
}, [t, o, e, s.enterName, p]), h = C(async () => {
|
|
3615
3633
|
u("report-versionSavingAs");
|
|
3616
3634
|
try {
|
|
3617
3635
|
await c.post("/reports/version", {
|
|
@@ -3630,7 +3648,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3630
3648
|
n,
|
|
3631
3649
|
u,
|
|
3632
3650
|
d
|
|
3633
|
-
]),
|
|
3651
|
+
]), v = C(async () => {
|
|
3634
3652
|
u("report-versionSavingAs");
|
|
3635
3653
|
try {
|
|
3636
3654
|
await c.post("/reports/version-restrictions", {
|
|
@@ -3654,7 +3672,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3654
3672
|
d,
|
|
3655
3673
|
l.personalNumber
|
|
3656
3674
|
]);
|
|
3657
|
-
return { saveAs: g, save:
|
|
3675
|
+
return { saveAs: g, save: x, archive: h, detach: v };
|
|
3658
3676
|
}, Cc = (e) => {
|
|
3659
3677
|
const t = Xe(), { startLoading: n, stopLoading: a } = Z(Ot);
|
|
3660
3678
|
return { changeEmployeeRights: C(async (o, i) => {
|
|
@@ -3676,16 +3694,16 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3676
3694
|
return c;
|
|
3677
3695
|
}, [t, e, n, a]) };
|
|
3678
3696
|
}, kc = ({ isOpen: e, onHide: t, usersData: n, setUsersData: a, reportVersionId: s, EmployeePicker: o }) => {
|
|
3679
|
-
const { ProjectIconComponent: i, texts: { reports: c } } = Z(pe), { confirm: l } = Tt(), [u, d] = O(null), { changeEmployeeRights: f } = Cc(s),
|
|
3697
|
+
const { ProjectIconComponent: i, texts: { reports: c } } = Z(pe), { confirm: l } = Tt(), [u, d] = O(null), { changeEmployeeRights: f } = Cc(s), p = C(async () => {
|
|
3680
3698
|
if (u === null)
|
|
3681
3699
|
return;
|
|
3682
3700
|
const g = await f(u, !0);
|
|
3683
3701
|
a(s, g);
|
|
3684
|
-
}, [u, f, s, a]),
|
|
3702
|
+
}, [u, f, s, a]), x = C(async (g) => {
|
|
3685
3703
|
if (!await l(c.removeSharingWith(g)))
|
|
3686
3704
|
return;
|
|
3687
|
-
const
|
|
3688
|
-
a(s,
|
|
3705
|
+
const v = await f(g, !1);
|
|
3706
|
+
a(s, v);
|
|
3689
3707
|
}, [f, l, s, c, a]);
|
|
3690
3708
|
return /* @__PURE__ */ r.jsxs(Pe, { show: e, onHide: t, children: [
|
|
3691
3709
|
/* @__PURE__ */ r.jsx(Pe.Header, { closeButton: !0, children: /* @__PURE__ */ r.jsx(Pe.Title, { children: c.reportSharing }) }),
|
|
@@ -3700,7 +3718,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3700
3718
|
" [",
|
|
3701
3719
|
g.id,
|
|
3702
3720
|
"]",
|
|
3703
|
-
/* @__PURE__ */ r.jsx(
|
|
3721
|
+
/* @__PURE__ */ r.jsx(re, { color: "danger", onClick: () => x(g.id), children: /* @__PURE__ */ r.jsx(i, { icon: "delete" }) })
|
|
3704
3722
|
] }, g.id))
|
|
3705
3723
|
] }),
|
|
3706
3724
|
/* @__PURE__ */ r.jsx(X, { variant: "h6", className: "mt-2 mb-2", children: c.addSharing }),
|
|
@@ -3708,100 +3726,100 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3708
3726
|
/* @__PURE__ */ r.jsx("div", { className: "flex-grow-1", children: /* @__PURE__ */ r.jsx(o, { defaultSelection: null, label: c.shareWith, onSelect: (g) => {
|
|
3709
3727
|
d(g === null ? null : Number(g.id));
|
|
3710
3728
|
} }) }),
|
|
3711
|
-
/* @__PURE__ */ r.jsx(en, { onClick:
|
|
3729
|
+
/* @__PURE__ */ r.jsx(en, { onClick: p, disabled: u === null, children: c.add })
|
|
3712
3730
|
] })
|
|
3713
3731
|
] })
|
|
3714
3732
|
] });
|
|
3715
3733
|
}, Sc = (e, t) => {
|
|
3716
3734
|
const [n, a] = O(null);
|
|
3717
|
-
return
|
|
3735
|
+
return R(() => {
|
|
3718
3736
|
e.then(({ default: s }) => {
|
|
3719
3737
|
const o = t !== void 0 ? t(s) : s;
|
|
3720
3738
|
a(o);
|
|
3721
3739
|
});
|
|
3722
3740
|
}, [t, e]), { mappings: n };
|
|
3723
3741
|
}, Rd = ({ reportType: e, title: t, data: n, filterElements: a, getReportRoute: s, localization: o, licenseKey: i, EmployeePicker: c, localizationJsonFile: l, localizationTransformer: u }) => {
|
|
3724
|
-
const { texts: { reports: d } } = Z(pe), { confirm: f } = Tt(),
|
|
3725
|
-
const
|
|
3726
|
-
|
|
3742
|
+
const { texts: { reports: d } } = Z(pe), { confirm: f } = Tt(), p = Nr(), { id: x } = Fs(), g = ne(() => x === void 0 ? null : Number(x), [x]), h = C((k) => {
|
|
3743
|
+
const W = k === null ? "" : k.toString();
|
|
3744
|
+
p(St(s(e), { id: W }), {
|
|
3727
3745
|
replace: !0
|
|
3728
3746
|
});
|
|
3729
|
-
}, [s,
|
|
3730
|
-
if (
|
|
3747
|
+
}, [s, p, e]), [v, b] = O(!1), j = te(null), { user: m } = Z(Ft), { data: y, reloadData: _, setData: D } = Ms(`/reports/${e}`), { mappings: $ } = Sc(l, u), [S, F] = O({}), I = C((k) => {
|
|
3748
|
+
if (y === null)
|
|
3731
3749
|
return;
|
|
3732
|
-
const
|
|
3750
|
+
const W = k.target.value, le = W === "" ? null : Number(W);
|
|
3733
3751
|
h(le);
|
|
3734
|
-
}, [
|
|
3735
|
-
await
|
|
3736
|
-
}, [
|
|
3737
|
-
if (
|
|
3752
|
+
}, [y, h]), E = C(async (k) => {
|
|
3753
|
+
await _(), h(k);
|
|
3754
|
+
}, [_, h]), N = ne(() => {
|
|
3755
|
+
if (y === null)
|
|
3738
3756
|
return null;
|
|
3739
|
-
const
|
|
3740
|
-
return
|
|
3741
|
-
}, [
|
|
3742
|
-
|
|
3743
|
-
var
|
|
3744
|
-
if (
|
|
3757
|
+
const k = y.reportVersions.find((W) => W.reportVersionId === g);
|
|
3758
|
+
return k === void 0 ? null : k;
|
|
3759
|
+
}, [y, g]);
|
|
3760
|
+
R(() => {
|
|
3761
|
+
var W;
|
|
3762
|
+
if (y === null)
|
|
3745
3763
|
return;
|
|
3746
|
-
if (
|
|
3764
|
+
if (N === null) {
|
|
3747
3765
|
F({});
|
|
3748
3766
|
return;
|
|
3749
3767
|
}
|
|
3750
|
-
const
|
|
3751
|
-
F(
|
|
3752
|
-
}, [
|
|
3753
|
-
const { save: P, saveAs: U, archive: H, detach:
|
|
3768
|
+
const k = bc(N) ?? {};
|
|
3769
|
+
F(k), (W = j.current) == null || W.flexmonster.refresh();
|
|
3770
|
+
}, [y, N, g]);
|
|
3771
|
+
const { save: P, saveAs: U, archive: H, detach: A } = Nc(e, j, g, E), L = ne(() => ({
|
|
3754
3772
|
data: n ?? [],
|
|
3755
|
-
mapping:
|
|
3756
|
-
}), [n,
|
|
3757
|
-
var
|
|
3758
|
-
await f(d.confirmRevertChanges) && ((
|
|
3759
|
-
}, [f, L, d.confirmRevertChanges,
|
|
3760
|
-
var
|
|
3761
|
-
return (
|
|
3762
|
-
}, [
|
|
3763
|
-
|
|
3764
|
-
const fe = le == null ? void 0 : le.reportVersions.findIndex((ve) => ve.reportVersionId ===
|
|
3773
|
+
mapping: $ ?? void 0
|
|
3774
|
+
}), [n, $]), V = C(async () => {
|
|
3775
|
+
var W;
|
|
3776
|
+
await f(d.confirmRevertChanges) && ((W = j.current) == null || W.flexmonster.setReport({ dataSource: L, ...S }));
|
|
3777
|
+
}, [f, L, d.confirmRevertChanges, S]), G = ne(() => (N == null ? void 0 : N.ownerId) === m.personalNumber, [N == null ? void 0 : N.ownerId, m.personalNumber]), K = ne(() => {
|
|
3778
|
+
var k;
|
|
3779
|
+
return (k = N == null ? void 0 : N.users) == null ? void 0 : k.some((W) => W.id === m.personalNumber && !W.isReportOwner);
|
|
3780
|
+
}, [N == null ? void 0 : N.users, m.personalNumber]), q = C((k, W) => {
|
|
3781
|
+
D((le) => {
|
|
3782
|
+
const fe = le == null ? void 0 : le.reportVersions.findIndex((ve) => ve.reportVersionId === k);
|
|
3765
3783
|
if (fe === void 0 || le === null)
|
|
3766
3784
|
return le;
|
|
3767
3785
|
const ke = {
|
|
3768
3786
|
...le.reportVersions[fe],
|
|
3769
|
-
users:
|
|
3787
|
+
users: W.filter((ve) => ve.isReportOwner === !1)
|
|
3770
3788
|
}, J = [...le.reportVersions];
|
|
3771
3789
|
return J[fe] = ke, {
|
|
3772
3790
|
...le,
|
|
3773
3791
|
reportVersions: J
|
|
3774
3792
|
};
|
|
3775
3793
|
});
|
|
3776
|
-
}, [
|
|
3777
|
-
await f(d.confirmDelete(
|
|
3778
|
-
}, [H, f,
|
|
3779
|
-
await f(d.confirmDetach(
|
|
3780
|
-
}, [f,
|
|
3781
|
-
return
|
|
3782
|
-
var
|
|
3783
|
-
g === null && h(((
|
|
3784
|
-
}, [
|
|
3794
|
+
}, [D]), ee = C(async () => {
|
|
3795
|
+
await f(d.confirmDelete(N == null ? void 0 : N.name)) && (await H(), h(null), await _());
|
|
3796
|
+
}, [H, f, _, N == null ? void 0 : N.name, d, h]), B = C(async () => {
|
|
3797
|
+
await f(d.confirmDetach(N == null ? void 0 : N.name)) && (await A(), h(null), await _());
|
|
3798
|
+
}, [f, A, _, N == null ? void 0 : N.name, d, h]);
|
|
3799
|
+
return R(() => {
|
|
3800
|
+
var k;
|
|
3801
|
+
g === null && h(((k = y == null ? void 0 : y.reportVersions.find((W) => W.isSystem === !0)) == null ? void 0 : k.reportVersionId) ?? null);
|
|
3802
|
+
}, [y == null ? void 0 : y.reportVersions, g, h]), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3785
3803
|
/* @__PURE__ */ r.jsx(Bs, { title: /* @__PURE__ */ r.jsxs("div", { className: "d-flex justify-content-start gap-3", children: [
|
|
3786
3804
|
/* @__PURE__ */ r.jsx(X, { variant: "h3", children: t }),
|
|
3787
3805
|
a,
|
|
3788
3806
|
/* @__PURE__ */ r.jsxs("div", { className: "d-flex gap-1 align-items-center", children: [
|
|
3789
|
-
/* @__PURE__ */ r.jsxs(ws, { size: "sm", value: g ?? void 0, onChange:
|
|
3790
|
-
/* @__PURE__ */ r.jsx("optgroup", { label: d.versionSelectSystem, children:
|
|
3791
|
-
/* @__PURE__ */ r.jsx("optgroup", { label: d.versionSelectYour, children:
|
|
3792
|
-
/* @__PURE__ */ r.jsx("optgroup", { label: d.versionSelectSharedWithYou, children:
|
|
3807
|
+
/* @__PURE__ */ r.jsxs(ws, { size: "sm", value: g ?? void 0, onChange: I, children: [
|
|
3808
|
+
/* @__PURE__ */ r.jsx("optgroup", { label: d.versionSelectSystem, children: y == null ? void 0 : y.reportVersions.filter((k) => k.isSystem === !0).map((k) => /* @__PURE__ */ r.jsx("option", { value: k.reportVersionId, children: k.name }, k.reportVersionId)) }),
|
|
3809
|
+
/* @__PURE__ */ r.jsx("optgroup", { label: d.versionSelectYour, children: y == null ? void 0 : y.reportVersions.filter((k) => k.ownerId === m.personalNumber).map((k) => /* @__PURE__ */ r.jsx("option", { value: k.reportVersionId, children: k.name }, k.reportVersionId)) }),
|
|
3810
|
+
/* @__PURE__ */ r.jsx("optgroup", { label: d.versionSelectSharedWithYou, children: y == null ? void 0 : y.reportVersions.filter((k) => k.isSystem === !1 && k.ownerId !== m.personalNumber).map((k) => /* @__PURE__ */ r.jsx("option", { value: k.reportVersionId, children: `${k.name} [${k.ownerId}]` }, k.reportVersionId)) })
|
|
3793
3811
|
] }),
|
|
3794
|
-
/* @__PURE__ */ r.jsx(Le, { icon: /* @__PURE__ */ r.jsx(_s, {}), onClick: P, disabled: g === null || (
|
|
3812
|
+
/* @__PURE__ */ r.jsx(Le, { icon: /* @__PURE__ */ r.jsx(_s, {}), onClick: P, disabled: g === null || (N == null ? void 0 : N.isSystem) || !G, children: d.save }),
|
|
3795
3813
|
/* @__PURE__ */ r.jsx(Le, { icon: /* @__PURE__ */ r.jsx(Ns, {}), onClick: U, className: "flex-shrink-0", children: d.saveAs }),
|
|
3796
3814
|
/* @__PURE__ */ r.jsxs(un, { toggle: /* @__PURE__ */ r.jsx(fn, { as: xr }), children: [
|
|
3797
3815
|
/* @__PURE__ */ r.jsx(Ze, { onClick: V, children: d.revertChanges }),
|
|
3798
|
-
/* @__PURE__ */ r.jsx(Ze, { onClick: () => b(!0), disabled: !
|
|
3799
|
-
|
|
3800
|
-
|
|
3816
|
+
/* @__PURE__ */ r.jsx(Ze, { onClick: () => b(!0), disabled: !G || (N == null ? void 0 : N.isSystem), children: d.share }),
|
|
3817
|
+
G && !(N != null && N.isSystem) ? /* @__PURE__ */ r.jsx(Ze, { color: "danger", onClick: ee, children: d.delete }) : null,
|
|
3818
|
+
K && !(N != null && N.isSystem) ? /* @__PURE__ */ r.jsx(Ze, { color: "danger", onClick: B, children: d.detach }) : null
|
|
3801
3819
|
] })
|
|
3802
3820
|
] })
|
|
3803
|
-
] }), children: /* @__PURE__ */ r.jsx("div", { className: w("h-100 w-100", L.data && L.data.length > 0 ? "" : "d-none"), children: /* @__PURE__ */ r.jsx(_c, { dataSource: L, settings:
|
|
3804
|
-
|
|
3821
|
+
] }), children: /* @__PURE__ */ r.jsx("div", { className: w("h-100 w-100", L.data && L.data.length > 0 ? "" : "d-none"), children: /* @__PURE__ */ r.jsx(_c, { dataSource: L, settings: S, pivotRef: j, enabled: L.data && L.data.length > 0, localization: o, licenseKey: i }) }) }),
|
|
3822
|
+
N !== null ? /* @__PURE__ */ r.jsx(kc, { isOpen: v, onHide: () => b(!1), usersData: N.users ?? null, setUsersData: q, reportVersionId: N == null ? void 0 : N.reportVersionId, EmployeePicker: c }) : null
|
|
3805
3823
|
] });
|
|
3806
3824
|
}, Ad = ({ cell: { value: e } }) => /* @__PURE__ */ r.jsx(r.Fragment, { children: e ? /* @__PURE__ */ r.jsx(jr, { name: e, size: 21, fontSize: 12 }) : /* @__PURE__ */ r.jsx(r.Fragment, {}) }), Ic = ({ knownTypes: e, typeFilters: t, onChangeTypeFilters: n }) => /* @__PURE__ */ r.jsx("div", { className: "mb-1 d-flex justify-content-center gap-2", children: e.map((a) => /* @__PURE__ */ r.jsx("div", { role: "button", style: {
|
|
3807
3825
|
height: "14px",
|
|
@@ -3812,7 +3830,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3812
3830
|
}, className: w(`border-${a}`, t.includes(a) && `bg-${a}`), onClick: () => {
|
|
3813
3831
|
t.includes(a) ? n(t.filter((s) => s !== a)) : n([...t, a]);
|
|
3814
3832
|
} }, a)) }), Dc = ({ linksTo: e, onClick: t, children: n }) => e ? /* @__PURE__ */ r.jsx(Je, { to: e, className: "text-decoration-none", onClick: t, children: n }) : /* @__PURE__ */ r.jsx(r.Fragment, { children: n }), $c = ({ message: e, onDeleteMessage: t, onClickMessage: n, getIcon: a, getLinksTo: s }) => {
|
|
3815
|
-
const { ProjectIconComponent: o, localizationContext: i } = Z(pe), { dateFnsLocale: c } = Z(i), l = e.dateTime ? vt(e.dateTime) : null, u = l ?
|
|
3833
|
+
const { ProjectIconComponent: o, localizationContext: i } = Z(pe), { dateFnsLocale: c } = Z(i), l = e.dateTime ? vt(e.dateTime) : null, u = l ? zs(new Date(Date.now()), l) : 0;
|
|
3816
3834
|
return /* @__PURE__ */ r.jsxs("div", { children: [
|
|
3817
3835
|
l && /* @__PURE__ */ r.jsx("div", { className: "d-flex justify-content-end", children: /* @__PURE__ */ r.jsx(Lt, { text: xt(l, "dd.MM.yyyy HH:mm"), placement: "left", children: /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(X, { variant: "caption", children: u > 2 ? xt(l, "dd.MM.yyyy") : Us(l, new Date(Date.now()), {
|
|
3818
3836
|
locale: c.code
|
|
@@ -3822,7 +3840,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3822
3840
|
/* @__PURE__ */ r.jsxs("div", { className: "d-flex flex-column gap-1 w-100", children: [
|
|
3823
3841
|
/* @__PURE__ */ r.jsxs("div", { className: "d-flex align-items-start justify-content-between gap-3", children: [
|
|
3824
3842
|
/* @__PURE__ */ r.jsx(X, { variant: "body2", className: "fw-bold", children: e.subject }),
|
|
3825
|
-
/* @__PURE__ */ r.jsx(
|
|
3843
|
+
/* @__PURE__ */ r.jsx(re, { size: "sm", onClick: (d) => {
|
|
3826
3844
|
d.preventDefault(), d.stopPropagation(), t(e.id);
|
|
3827
3845
|
}, children: /* @__PURE__ */ r.jsx(o, { icon: "delete" }) })
|
|
3828
3846
|
] }),
|
|
@@ -3831,7 +3849,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3831
3849
|
] }) }) })
|
|
3832
3850
|
] });
|
|
3833
3851
|
}, ar = ["info", "warning", "danger"], sr = ({ messages: e, isLoading: t, onDeleteMessage: n, onClickMessage: a, getIcon: s, getLinksTo: o }) => {
|
|
3834
|
-
const { texts: { messageBoard: i } } = Z(pe), [c, l] = O(ar), u =
|
|
3852
|
+
const { texts: { messageBoard: i } } = Z(pe), [c, l] = O(ar), u = ne(() => e.filter((d) => c.includes(d.type ?? "")), [c, e]);
|
|
3835
3853
|
return /* @__PURE__ */ r.jsxs("div", { className: "h-100 d-flex flex-column overflow-hidden", children: [
|
|
3836
3854
|
/* @__PURE__ */ r.jsx(Ic, { knownTypes: ar, typeFilters: c, onChangeTypeFilters: (d) => l(d) }),
|
|
3837
3855
|
t && /* @__PURE__ */ r.jsxs("div", { className: "p-3 w-100", children: [
|
|
@@ -3857,32 +3875,32 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3857
3875
|
apiGet: "/messageBoard",
|
|
3858
3876
|
apiDelete: "/messageBoard/"
|
|
3859
3877
|
}, Md = ({ renderAsNotifPanel: e, notifIcon: t, apiUrls: { apiGet: n = Kt.apiGet, apiDelete: a = Kt.apiDelete } = Kt, getIcon: s, getLinksTo: o }) => {
|
|
3860
|
-
const c = Xe(), [l, u] = O([]), [d, f] = O(!1), [
|
|
3861
|
-
|
|
3862
|
-
u(
|
|
3878
|
+
const c = Xe(), [l, u] = O([]), [d, f] = O(!1), [p, x] = O(!1), [g, h] = O(!1), v = C(async () => {
|
|
3879
|
+
x(!0), await c.get(n).then(({ data: _ }) => {
|
|
3880
|
+
u(_), f(!0), x(!1);
|
|
3863
3881
|
}).catch(() => {
|
|
3864
|
-
u([]),
|
|
3882
|
+
u([]), x(!1);
|
|
3865
3883
|
});
|
|
3866
|
-
}, [n, c]), b = C(async (
|
|
3867
|
-
b(
|
|
3868
|
-
|
|
3884
|
+
}, [n, c]), b = C(async (_) => c.delete(`${a}${_}`).then(() => !0).catch(() => !1), [a, c]), j = C((_) => {
|
|
3885
|
+
b(_).then((D) => {
|
|
3886
|
+
D && u(l.filter(($) => $.id !== _));
|
|
3869
3887
|
});
|
|
3870
3888
|
}, [b, l]);
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
const
|
|
3889
|
+
R(() => {
|
|
3890
|
+
v();
|
|
3891
|
+
const _ = setInterval(() => v(), 60 * 1e3);
|
|
3874
3892
|
return () => {
|
|
3875
|
-
clearInterval(
|
|
3893
|
+
clearInterval(_);
|
|
3876
3894
|
};
|
|
3877
|
-
}, [
|
|
3878
|
-
const m = l.filter((
|
|
3895
|
+
}, [v]);
|
|
3896
|
+
const m = l.filter((_) => _.type === "danger").length, y = d ? !1 : p;
|
|
3879
3897
|
return e ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3880
3898
|
/* @__PURE__ */ r.jsxs("div", { className: "position-relative", children: [
|
|
3881
|
-
/* @__PURE__ */ r.jsx(
|
|
3899
|
+
/* @__PURE__ */ r.jsx(re, { size: "md", onClick: () => h(!g), children: t }),
|
|
3882
3900
|
m > 0 && /* @__PURE__ */ r.jsx("div", { className: "badge rounded-pill bg-danger p-1 px-2 text-white", style: { position: "absolute", top: "-6px", right: "-10px", fontSize: "10px" }, children: m })
|
|
3883
3901
|
] }),
|
|
3884
|
-
/* @__PURE__ */ r.jsx(Bn, { show: g, onHide: () => h(!1), placement: "end", children: /* @__PURE__ */ r.jsx(Bn.Body, { children: /* @__PURE__ */ r.jsx(sr, { messages: l, isLoading:
|
|
3885
|
-
] }) : /* @__PURE__ */ r.jsx(sr, { messages: l, isLoading:
|
|
3902
|
+
/* @__PURE__ */ r.jsx(Bn, { show: g, onHide: () => h(!1), placement: "end", children: /* @__PURE__ */ r.jsx(Bn.Body, { children: /* @__PURE__ */ r.jsx(sr, { messages: l, isLoading: y, onDeleteMessage: j, onClickMessage: () => h(!1), getIcon: s, getLinksTo: o }) }) })
|
|
3903
|
+
] }) : /* @__PURE__ */ r.jsx(sr, { messages: l, isLoading: y, onDeleteMessage: j, getIcon: s, getLinksTo: o });
|
|
3886
3904
|
}, Ec = "_tab-panel_d8l8q_1", Fc = "_full-height-no-overflow_d8l8q_5", Oc = "_disabled_d8l8q_12", qt = {
|
|
3887
3905
|
"tab-panel": "_tab-panel_d8l8q_1",
|
|
3888
3906
|
tabPanel: Ec,
|
|
@@ -3898,10 +3916,10 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3898
3916
|
const c = o.type, l = o.props;
|
|
3899
3917
|
if (!l)
|
|
3900
3918
|
return null;
|
|
3901
|
-
const u = l.eventKey, d = l.children, f = l.className,
|
|
3919
|
+
const u = l.eventKey, d = l.children, f = l.className, p = l.onClick;
|
|
3902
3920
|
return /* @__PURE__ */ r.jsxs(Ce.Fragment, { children: [
|
|
3903
3921
|
/* @__PURE__ */ r.jsx(c, { ...l, className: w({ active: e === u }, f), onClick: () => {
|
|
3904
|
-
t(u),
|
|
3922
|
+
t(u), p && p(u);
|
|
3905
3923
|
}, vertical: a || s, children: d }),
|
|
3906
3924
|
s && i < n.length - 1 && /* @__PURE__ */ r.jsx("div", { className: w("join-line", Lc.joinLine) })
|
|
3907
3925
|
] }, l.eventKey);
|
|
@@ -3927,7 +3945,7 @@ export {
|
|
|
3927
3945
|
Yo as Collapse,
|
|
3928
3946
|
Le as ContextButton,
|
|
3929
3947
|
bd as DisabledRowLabelLink,
|
|
3930
|
-
|
|
3948
|
+
Wd as Documents,
|
|
3931
3949
|
un as Dropdown,
|
|
3932
3950
|
od as DropdownDivider,
|
|
3933
3951
|
Ze as DropdownItem,
|
|
@@ -3957,7 +3975,7 @@ export {
|
|
|
3957
3975
|
Gd as HookFormTextAreaInput,
|
|
3958
3976
|
Yd as HookFormTextInput,
|
|
3959
3977
|
td as HtmlTooltip,
|
|
3960
|
-
|
|
3978
|
+
re as IconButton,
|
|
3961
3979
|
Un as ImgApi,
|
|
3962
3980
|
ca as ImgDirect,
|
|
3963
3981
|
tt as InvalidFeedback,
|
|
@@ -3978,7 +3996,7 @@ export {
|
|
|
3978
3996
|
Rd as ReportPage,
|
|
3979
3997
|
Kd as ResponsiveContextDropdown,
|
|
3980
3998
|
qd as ResponsiveContextDropdownItem,
|
|
3981
|
-
|
|
3999
|
+
ze as RowLabelInput,
|
|
3982
4000
|
Cd as SearchBox,
|
|
3983
4001
|
Dt as SelectInput,
|
|
3984
4002
|
yd as SettingsFormPicker,
|