react-luminus-components 1.3.110 → 1.3.112
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/components/Form/DropdownPicker/DropdownPicker.d.ts +1 -1
- package/dist/components/HookForm/DropdownPicker/HookFormDropdownPicker.d.ts +1 -1
- package/dist/components/common/SimplePicker/SimplePicker.d.ts +2 -1
- package/dist/main.cjs.js +2 -2
- package/dist/main.es.js +1214 -1212
- package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +1 -0
- package/package.json +1 -1
package/dist/main.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { j as r, c as w, t 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 Wa, V as za, 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 ne, 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 We, 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-DJxAkknX.js";
|
|
2
2
|
import { b6 as zd, b7 as Ud, b4 as Gd, b3 as Yd, b8 as Kd, b9 as qd, b5 as Qd } from "./ResponsiveContextDropdown-DJxAkknX.js";
|
|
3
3
|
import * as oe from "react";
|
|
4
|
-
import
|
|
5
|
-
import { c as
|
|
4
|
+
import Ce, { useCallback as C, useMemo as te, useContext as Z, useRef as ee, useEffect as A, 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-D4ukb10a.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 ze, Controller as mn } from "react-hook-form";
|
|
10
10
|
import { Pivot as Os } from "react-flexmonster";
|
|
11
11
|
import { S as Lt } from "./SimpleTooltip-BWTASqOY.js";
|
|
12
12
|
import { u as Cr } from "./useClickOutside-BmlXg38T.js";
|
|
@@ -16,7 +16,7 @@ import { l as ht, s as tn } from "./searchUtils-ClTX12v5.js";
|
|
|
16
16
|
import { u as Ms } from "./useGetApiData-Bl8eCz41.js";
|
|
17
17
|
import { F as Bs } from "./FullScreenContainer-BOjp3J6I.js";
|
|
18
18
|
const ed = ({ fileLoader: e, fileName: t, children: n }) => {
|
|
19
|
-
const a =
|
|
19
|
+
const a = C(async () => {
|
|
20
20
|
var c, l;
|
|
21
21
|
const s = await e();
|
|
22
22
|
if (!s)
|
|
@@ -25,13 +25,13 @@ const ed = ({ fileLoader: e, fileName: t, children: n }) => {
|
|
|
25
25
|
i.href = o, i.setAttribute("download", t), (c = document.body) == null || c.appendChild(i), i.click(), (l = document.body) == null || l.removeChild(i);
|
|
26
26
|
}, [e, t]);
|
|
27
27
|
return /* @__PURE__ */ r.jsx("div", { role: "button", onClick: a, children: n });
|
|
28
|
-
}, Vs = ({ className: e, ...t }) => /* @__PURE__ */ r.jsxs("div", { className: w("luminus-loading",
|
|
29
|
-
/* @__PURE__ */ r.jsx("div", { className: w("spinner-grow",
|
|
30
|
-
/* @__PURE__ */ r.jsx("div", { className: w("spinner-grow",
|
|
31
|
-
/* @__PURE__ */ r.jsx("div", { className: w("spinner-grow",
|
|
28
|
+
}, Vs = ({ className: e, ...t }) => /* @__PURE__ */ r.jsxs("div", { className: w("luminus-loading", Me.loading, Me.loadingBlock, Me.loadingBlock), ...t, children: [
|
|
29
|
+
/* @__PURE__ */ r.jsx("div", { className: w("spinner-grow", Me.spinnerGrow, "text-primary"), role: "status" }),
|
|
30
|
+
/* @__PURE__ */ r.jsx("div", { className: w("spinner-grow", Me.spinnerGrow, "text-primary", Me.second), role: "status" }),
|
|
31
|
+
/* @__PURE__ */ r.jsx("div", { className: w("spinner-grow", Me.spinnerGrow, "text-primary", Me.third), role: "status" })
|
|
32
32
|
] });
|
|
33
33
|
function Sr(e, t) {
|
|
34
|
-
const n =
|
|
34
|
+
const n = je(e);
|
|
35
35
|
if (isNaN(t)) return pt(e, NaN);
|
|
36
36
|
if (!t)
|
|
37
37
|
return n;
|
|
@@ -48,19 +48,19 @@ function Ps(e, t) {
|
|
|
48
48
|
return Sr(e, t * 12);
|
|
49
49
|
}
|
|
50
50
|
function Hs(e, t) {
|
|
51
|
-
const n =
|
|
51
|
+
const n = je(e), a = je(t), s = n.getTime() - a.getTime();
|
|
52
52
|
return s < 0 ? -1 : s > 0 ? 1 : s;
|
|
53
53
|
}
|
|
54
54
|
function Dn(e, t) {
|
|
55
|
-
const n =
|
|
55
|
+
const n = je(e), a = je(t), s = n.getFullYear() - a.getFullYear(), o = n.getMonth() - a.getMonth();
|
|
56
56
|
return s * 12 + o;
|
|
57
57
|
}
|
|
58
58
|
function $n(e) {
|
|
59
|
-
const t =
|
|
59
|
+
const t = je(e);
|
|
60
60
|
return Math.trunc(t.getMonth() / 3) + 1;
|
|
61
61
|
}
|
|
62
62
|
function Pt(e, t) {
|
|
63
|
-
const n =
|
|
63
|
+
const n = je(e), a = je(t), s = n.getFullYear() - a.getFullYear(), o = $n(n) - $n(a);
|
|
64
64
|
return s * 4 + o;
|
|
65
65
|
}
|
|
66
66
|
function En(e, t, n) {
|
|
@@ -68,11 +68,11 @@ function En(e, t, n) {
|
|
|
68
68
|
return Math.round((o - i) / wa);
|
|
69
69
|
}
|
|
70
70
|
function Ht(e, t) {
|
|
71
|
-
const n =
|
|
71
|
+
const n = je(e), a = je(t);
|
|
72
72
|
return n.getFullYear() - a.getFullYear();
|
|
73
73
|
}
|
|
74
74
|
function Ws(e, t) {
|
|
75
|
-
const n =
|
|
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);
|
|
78
78
|
return c === 0 ? 0 : c;
|
|
@@ -88,7 +88,7 @@ function hn(e) {
|
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
function gn(e, t) {
|
|
91
|
-
return +
|
|
91
|
+
return +je(e) - +je(t);
|
|
92
92
|
}
|
|
93
93
|
function On(e, t, n) {
|
|
94
94
|
const a = gn(e, t) / _a;
|
|
@@ -103,35 +103,35 @@ function Wt(e, t, n) {
|
|
|
103
103
|
return hn(n == null ? void 0 : n.roundingMethod)(a);
|
|
104
104
|
}
|
|
105
105
|
function nn(e, t) {
|
|
106
|
-
const n =
|
|
106
|
+
const n = je(e);
|
|
107
107
|
if (isNaN(n.getTime()))
|
|
108
108
|
throw new RangeError("Invalid time value");
|
|
109
109
|
const a = (t == null ? void 0 : t.format) ?? "extended", s = (t == null ? void 0 : t.representation) ?? "complete";
|
|
110
110
|
let o = "", i = "";
|
|
111
111
|
const c = a === "extended" ? "-" : "", l = a === "extended" ? ":" : "";
|
|
112
112
|
if (s !== "time") {
|
|
113
|
-
const u =
|
|
114
|
-
o = `${
|
|
113
|
+
const u = Ae(n.getDate(), 2), d = Ae(n.getMonth() + 1, 2);
|
|
114
|
+
o = `${Ae(n.getFullYear(), 4)}${c}${d}${c}${u}`;
|
|
115
115
|
}
|
|
116
116
|
if (s !== "date") {
|
|
117
117
|
const u = n.getTimezoneOffset();
|
|
118
118
|
if (u !== 0) {
|
|
119
|
-
const
|
|
120
|
-
i = `${u < 0 ? "+" : "-"}${p}:${
|
|
119
|
+
const h = Math.abs(u), p = Ae(Math.trunc(h / 60), 2), b = Ae(h % 60, 2);
|
|
120
|
+
i = `${u < 0 ? "+" : "-"}${p}:${b}`;
|
|
121
121
|
} else
|
|
122
122
|
i = "Z";
|
|
123
|
-
const d =
|
|
124
|
-
o = `${o}${v}${
|
|
123
|
+
const d = Ae(n.getHours(), 2), f = Ae(n.getMinutes(), 2), x = Ae(n.getSeconds(), 2), v = o === "" ? "" : "T", g = [d, f, x].join(l);
|
|
124
|
+
o = `${o}${v}${g}${i}`;
|
|
125
125
|
}
|
|
126
126
|
return o;
|
|
127
127
|
}
|
|
128
128
|
function zs(e) {
|
|
129
|
-
const t =
|
|
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
|
}
|
|
132
132
|
function Us(e, t, n) {
|
|
133
133
|
let a = 0, s;
|
|
134
|
-
const o =
|
|
134
|
+
const o = je(e), i = je(t);
|
|
135
135
|
if (n != null && n.unit)
|
|
136
136
|
s = n == null ? void 0 : n.unit, s === "second" ? a = Wt(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 {
|
|
@@ -145,13 +145,13 @@ function Us(e, t, n) {
|
|
|
145
145
|
}).format(a, s);
|
|
146
146
|
}
|
|
147
147
|
function Gs(e, t) {
|
|
148
|
-
const n =
|
|
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
150
|
const i = zs(o);
|
|
151
151
|
return n.setMonth(t, Math.min(s, i)), n;
|
|
152
152
|
}
|
|
153
153
|
function Ir(e, t) {
|
|
154
|
-
const n =
|
|
154
|
+
const n = je(e);
|
|
155
155
|
return isNaN(+n) ? pt(e, NaN) : (n.setFullYear(t), n);
|
|
156
156
|
}
|
|
157
157
|
function mt(...e) {
|
|
@@ -178,7 +178,7 @@ const qs = {
|
|
|
178
178
|
[lr]: "collapsing",
|
|
179
179
|
[sn]: "collapsing",
|
|
180
180
|
[cr]: "collapse show"
|
|
181
|
-
}, Dr = /* @__PURE__ */
|
|
181
|
+
}, Dr = /* @__PURE__ */ Ce.forwardRef(({
|
|
182
182
|
onEnter: e,
|
|
183
183
|
onEntering: t,
|
|
184
184
|
onEntered: n,
|
|
@@ -190,42 +190,42 @@ const qs = {
|
|
|
190
190
|
in: l = !1,
|
|
191
191
|
timeout: u = 300,
|
|
192
192
|
mountOnEnter: d = !1,
|
|
193
|
-
unmountOnExit:
|
|
193
|
+
unmountOnExit: f = !1,
|
|
194
194
|
appear: x = !1,
|
|
195
195
|
getDimensionValue: v = Ks,
|
|
196
|
-
...
|
|
197
|
-
},
|
|
198
|
-
const p = typeof c == "function" ? c() : c,
|
|
199
|
-
|
|
200
|
-
}, e), [p, e]),
|
|
196
|
+
...g
|
|
197
|
+
}, h) => {
|
|
198
|
+
const p = typeof c == "function" ? c() : c, b = te(() => mt((I) => {
|
|
199
|
+
I.style[p] = "0";
|
|
200
|
+
}, e), [p, e]), y = te(() => mt((I) => {
|
|
201
201
|
const D = `scroll${p[0].toUpperCase()}${p.slice(1)}`;
|
|
202
|
-
|
|
203
|
-
}, t), [p, t]),
|
|
204
|
-
|
|
205
|
-
}, n), [p, n]),
|
|
206
|
-
|
|
207
|
-
}, a), [a, v, p]), N =
|
|
208
|
-
|
|
202
|
+
I.style[p] = `${I[D]}px`;
|
|
203
|
+
}, t), [p, t]), m = te(() => mt((I) => {
|
|
204
|
+
I.style[p] = null;
|
|
205
|
+
}, n), [p, n]), j = te(() => mt((I) => {
|
|
206
|
+
I.style[p] = `${v(p, I)}px`, Oa(I);
|
|
207
|
+
}, a), [a, v, p]), N = te(() => mt((I) => {
|
|
208
|
+
I.style[p] = null;
|
|
209
209
|
}, s), [p, s]);
|
|
210
210
|
return /* @__PURE__ */ r.jsx(or, {
|
|
211
|
-
ref:
|
|
211
|
+
ref: h,
|
|
212
212
|
addEndListener: ir,
|
|
213
|
-
...
|
|
214
|
-
"aria-expanded":
|
|
215
|
-
onEnter:
|
|
216
|
-
onEntering:
|
|
217
|
-
onEntered:
|
|
218
|
-
onExit:
|
|
213
|
+
...g,
|
|
214
|
+
"aria-expanded": g.role ? l : null,
|
|
215
|
+
onEnter: b,
|
|
216
|
+
onEntering: y,
|
|
217
|
+
onEntered: m,
|
|
218
|
+
onExit: j,
|
|
219
219
|
onExiting: N,
|
|
220
220
|
childRef: i.ref,
|
|
221
221
|
in: l,
|
|
222
222
|
timeout: u,
|
|
223
223
|
mountOnEnter: d,
|
|
224
|
-
unmountOnExit:
|
|
224
|
+
unmountOnExit: f,
|
|
225
225
|
appear: x,
|
|
226
|
-
children: (
|
|
226
|
+
children: (I, D) => /* @__PURE__ */ Ce.cloneElement(i, {
|
|
227
227
|
...D,
|
|
228
|
-
className: w(o, i.props.className, qs[
|
|
228
|
+
className: w(o, i.props.className, qs[I], p === "width" && "collapse-horizontal")
|
|
229
229
|
})
|
|
230
230
|
});
|
|
231
231
|
}), $r = $t("h4");
|
|
@@ -235,7 +235,7 @@ const Er = /* @__PURE__ */ oe.forwardRef(({
|
|
|
235
235
|
bsPrefix: t,
|
|
236
236
|
as: n = $r,
|
|
237
237
|
...a
|
|
238
|
-
}, s) => (t =
|
|
238
|
+
}, s) => (t = me(t, "alert-heading"), /* @__PURE__ */ r.jsx(n, {
|
|
239
239
|
ref: s,
|
|
240
240
|
className: w(e, t),
|
|
241
241
|
...a
|
|
@@ -246,7 +246,7 @@ const Fr = /* @__PURE__ */ oe.forwardRef(({
|
|
|
246
246
|
bsPrefix: t,
|
|
247
247
|
as: n = Ta,
|
|
248
248
|
...a
|
|
249
|
-
}, s) => (t =
|
|
249
|
+
}, s) => (t = me(t, "alert-link"), /* @__PURE__ */ r.jsx(n, {
|
|
250
250
|
ref: s,
|
|
251
251
|
className: w(e, t),
|
|
252
252
|
...a
|
|
@@ -263,24 +263,24 @@ const Or = /* @__PURE__ */ oe.forwardRef((e, t) => {
|
|
|
263
263
|
variant: l = "primary",
|
|
264
264
|
onClose: u,
|
|
265
265
|
dismissible: d,
|
|
266
|
-
transition:
|
|
266
|
+
transition: f = Zt,
|
|
267
267
|
...x
|
|
268
268
|
} = dr(e, {
|
|
269
269
|
show: "onClose"
|
|
270
|
-
}), v =
|
|
271
|
-
u && u(!1,
|
|
272
|
-
}),
|
|
270
|
+
}), v = me(n, "alert"), g = Et((b) => {
|
|
271
|
+
u && u(!1, b);
|
|
272
|
+
}), h = f === !0 ? Zt : f, p = /* @__PURE__ */ r.jsxs("div", {
|
|
273
273
|
role: "alert",
|
|
274
|
-
...
|
|
274
|
+
...h ? void 0 : x,
|
|
275
275
|
ref: t,
|
|
276
276
|
className: w(i, v, l && `${v}-${l}`, d && `${v}-dismissible`),
|
|
277
277
|
children: [d && /* @__PURE__ */ r.jsx(La, {
|
|
278
|
-
onClick:
|
|
278
|
+
onClick: g,
|
|
279
279
|
"aria-label": s,
|
|
280
280
|
variant: o
|
|
281
281
|
}), c]
|
|
282
282
|
});
|
|
283
|
-
return
|
|
283
|
+
return h ? /* @__PURE__ */ r.jsx(h, {
|
|
284
284
|
unmountOnExit: !0,
|
|
285
285
|
...x,
|
|
286
286
|
ref: void 0,
|
|
@@ -297,7 +297,7 @@ const Qs = Object.assign(Or, {
|
|
|
297
297
|
bsPrefix: t,
|
|
298
298
|
as: n = "div",
|
|
299
299
|
...a
|
|
300
|
-
}, s) => (t =
|
|
300
|
+
}, s) => (t = me(t, "card-body"), /* @__PURE__ */ r.jsx(n, {
|
|
301
301
|
ref: s,
|
|
302
302
|
className: w(e, t),
|
|
303
303
|
...a
|
|
@@ -308,7 +308,7 @@ const Tr = /* @__PURE__ */ oe.forwardRef(({
|
|
|
308
308
|
bsPrefix: t,
|
|
309
309
|
as: n = "div",
|
|
310
310
|
...a
|
|
311
|
-
}, s) => (t =
|
|
311
|
+
}, s) => (t = me(t, "card-footer"), /* @__PURE__ */ r.jsx(n, {
|
|
312
312
|
ref: s,
|
|
313
313
|
className: w(e, t),
|
|
314
314
|
...a
|
|
@@ -323,7 +323,7 @@ const Rr = /* @__PURE__ */ oe.forwardRef(({
|
|
|
323
323
|
as: n = "div",
|
|
324
324
|
...a
|
|
325
325
|
}, s) => {
|
|
326
|
-
const o =
|
|
326
|
+
const o = me(e, "card-header"), i = te(() => ({
|
|
327
327
|
cardHeaderBsPrefix: o
|
|
328
328
|
}), [o]);
|
|
329
329
|
return /* @__PURE__ */ r.jsx(Lr.Provider, {
|
|
@@ -345,7 +345,7 @@ const Ar = /* @__PURE__ */ oe.forwardRef(
|
|
|
345
345
|
as: a = "img",
|
|
346
346
|
...s
|
|
347
347
|
}, o) => {
|
|
348
|
-
const i =
|
|
348
|
+
const i = me(e, "card-img");
|
|
349
349
|
return /* @__PURE__ */ r.jsx(a, {
|
|
350
350
|
ref: o,
|
|
351
351
|
className: w(n ? `${i}-${n}` : i, t),
|
|
@@ -359,7 +359,7 @@ const Mr = /* @__PURE__ */ oe.forwardRef(({
|
|
|
359
359
|
bsPrefix: t,
|
|
360
360
|
as: n = "div",
|
|
361
361
|
...a
|
|
362
|
-
}, s) => (t =
|
|
362
|
+
}, s) => (t = me(t, "card-img-overlay"), /* @__PURE__ */ r.jsx(n, {
|
|
363
363
|
ref: s,
|
|
364
364
|
className: w(e, t),
|
|
365
365
|
...a
|
|
@@ -370,7 +370,7 @@ const Br = /* @__PURE__ */ oe.forwardRef(({
|
|
|
370
370
|
bsPrefix: t,
|
|
371
371
|
as: n = "a",
|
|
372
372
|
...a
|
|
373
|
-
}, s) => (t =
|
|
373
|
+
}, s) => (t = me(t, "card-link"), /* @__PURE__ */ r.jsx(n, {
|
|
374
374
|
ref: s,
|
|
375
375
|
className: w(e, t),
|
|
376
376
|
...a
|
|
@@ -381,7 +381,7 @@ const Zs = $t("h6"), Vr = /* @__PURE__ */ oe.forwardRef(({
|
|
|
381
381
|
bsPrefix: t,
|
|
382
382
|
as: n = Zs,
|
|
383
383
|
...a
|
|
384
|
-
}, s) => (t =
|
|
384
|
+
}, s) => (t = me(t, "card-subtitle"), /* @__PURE__ */ r.jsx(n, {
|
|
385
385
|
ref: s,
|
|
386
386
|
className: w(e, t),
|
|
387
387
|
...a
|
|
@@ -392,7 +392,7 @@ const Pr = /* @__PURE__ */ oe.forwardRef(({
|
|
|
392
392
|
bsPrefix: t,
|
|
393
393
|
as: n = "p",
|
|
394
394
|
...a
|
|
395
|
-
}, s) => (t =
|
|
395
|
+
}, s) => (t = me(t, "card-text"), /* @__PURE__ */ r.jsx(n, {
|
|
396
396
|
ref: s,
|
|
397
397
|
className: w(e, t),
|
|
398
398
|
...a
|
|
@@ -403,7 +403,7 @@ const Js = $t("h5"), Hr = /* @__PURE__ */ oe.forwardRef(({
|
|
|
403
403
|
bsPrefix: t,
|
|
404
404
|
as: n = Js,
|
|
405
405
|
...a
|
|
406
|
-
}, s) => (t =
|
|
406
|
+
}, s) => (t = me(t, "card-title"), /* @__PURE__ */ r.jsx(n, {
|
|
407
407
|
ref: s,
|
|
408
408
|
className: w(e, t),
|
|
409
409
|
...a
|
|
@@ -421,7 +421,7 @@ const Wr = /* @__PURE__ */ oe.forwardRef(({
|
|
|
421
421
|
as: c = "div",
|
|
422
422
|
...l
|
|
423
423
|
}, u) => {
|
|
424
|
-
const d =
|
|
424
|
+
const d = me(e, "card");
|
|
425
425
|
return /* @__PURE__ */ r.jsx(c, {
|
|
426
426
|
ref: u,
|
|
427
427
|
...l,
|
|
@@ -447,7 +447,7 @@ const Ln = Object.assign(Wr, {
|
|
|
447
447
|
bsPrefix: t,
|
|
448
448
|
as: n = "span",
|
|
449
449
|
...a
|
|
450
|
-
}, s) => (t =
|
|
450
|
+
}, s) => (t = me(t, "input-group-text"), /* @__PURE__ */ r.jsx(n, {
|
|
451
451
|
ref: s,
|
|
452
452
|
className: w(e, t),
|
|
453
453
|
...a
|
|
@@ -472,8 +472,8 @@ const Xs = (e) => /* @__PURE__ */ r.jsx(Rt, {
|
|
|
472
472
|
as: s = "div",
|
|
473
473
|
...o
|
|
474
474
|
}, i) => {
|
|
475
|
-
e =
|
|
476
|
-
const c =
|
|
475
|
+
e = me(e, "input-group");
|
|
476
|
+
const c = te(() => ({}), []);
|
|
477
477
|
return /* @__PURE__ */ r.jsx(Ra.Provider, {
|
|
478
478
|
value: c,
|
|
479
479
|
children: /* @__PURE__ */ r.jsx(s, {
|
|
@@ -513,11 +513,11 @@ function Gr({
|
|
|
513
513
|
};
|
|
514
514
|
if (c) {
|
|
515
515
|
!s && c.role === "tablist" && (d.role = "tab");
|
|
516
|
-
const
|
|
517
|
-
d[on("event-key")] = e, d.id =
|
|
516
|
+
const f = c.getControllerId(e ?? null), x = 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"] = x);
|
|
518
518
|
}
|
|
519
|
-
return d.role === "tab" && (d["aria-selected"] = u, u || (d.tabIndex = -1), o && (d.tabIndex = -1, d["aria-disabled"] = !0)), d.onClick = Et((
|
|
520
|
-
o || (t == null || t(
|
|
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
|
+
o || (t == null || t(f), e != null && i && !f.isPropagationStopped() && i(e, f));
|
|
521
521
|
}), [d, {
|
|
522
522
|
isActive: u
|
|
523
523
|
}];
|
|
@@ -557,46 +557,46 @@ const Rn = () => {
|
|
|
557
557
|
role: o,
|
|
558
558
|
onKeyDown: i
|
|
559
559
|
} = e, c = so(e, ao);
|
|
560
|
-
const l = Ma(), u = ee(!1), d = Z(Jt),
|
|
560
|
+
const l = Ma(), u = ee(!1), d = Z(Jt), f = Z(Ur);
|
|
561
561
|
let x, v;
|
|
562
|
-
|
|
563
|
-
const
|
|
564
|
-
const
|
|
565
|
-
if (!
|
|
566
|
-
const N = Pa(
|
|
567
|
-
if (!
|
|
568
|
-
const D = N.indexOf(
|
|
562
|
+
f && (o = o || "tablist", s = f.activeKey, x = f.getControlledId, v = f.getControllerId);
|
|
563
|
+
const g = ee(null), h = (m) => {
|
|
564
|
+
const j = g.current;
|
|
565
|
+
if (!j) return null;
|
|
566
|
+
const N = Pa(j, `[${An}]:not([aria-disabled=true])`), I = j.querySelector("[aria-selected=true]");
|
|
567
|
+
if (!I || I !== document.activeElement) return null;
|
|
568
|
+
const D = N.indexOf(I);
|
|
569
569
|
if (D === -1) return null;
|
|
570
|
-
let
|
|
571
|
-
return
|
|
572
|
-
}, p = (
|
|
573
|
-
|
|
574
|
-
},
|
|
575
|
-
if (i == null || i(
|
|
570
|
+
let k = D + m;
|
|
571
|
+
return k >= N.length && (k = 0), k < 0 && (k = N.length - 1), N[k];
|
|
572
|
+
}, p = (m, j) => {
|
|
573
|
+
m != null && (a == null || a(m, j), d == null || d(m, j));
|
|
574
|
+
}, b = (m) => {
|
|
575
|
+
if (i == null || i(m), !f)
|
|
576
576
|
return;
|
|
577
|
-
let
|
|
578
|
-
switch (
|
|
577
|
+
let j;
|
|
578
|
+
switch (m.key) {
|
|
579
579
|
case "ArrowLeft":
|
|
580
580
|
case "ArrowUp":
|
|
581
|
-
|
|
581
|
+
j = h(-1);
|
|
582
582
|
break;
|
|
583
583
|
case "ArrowRight":
|
|
584
584
|
case "ArrowDown":
|
|
585
|
-
|
|
585
|
+
j = h(1);
|
|
586
586
|
break;
|
|
587
587
|
default:
|
|
588
588
|
return;
|
|
589
589
|
}
|
|
590
|
-
|
|
590
|
+
j && (m.preventDefault(), p(j.dataset[Va("EventKey")] || null, m), u.current = !0, l());
|
|
591
591
|
};
|
|
592
592
|
A(() => {
|
|
593
|
-
if (
|
|
594
|
-
const
|
|
595
|
-
|
|
593
|
+
if (g.current && u.current) {
|
|
594
|
+
const m = g.current.querySelector(`[${An}][aria-selected=true]`);
|
|
595
|
+
m == null || m.focus();
|
|
596
596
|
}
|
|
597
597
|
u.current = !1;
|
|
598
598
|
});
|
|
599
|
-
const
|
|
599
|
+
const y = Ba(t, g);
|
|
600
600
|
return /* @__PURE__ */ r.jsx(Jt.Provider, {
|
|
601
601
|
value: p,
|
|
602
602
|
children: /* @__PURE__ */ r.jsx(fr.Provider, {
|
|
@@ -608,8 +608,8 @@ const Rn = () => {
|
|
|
608
608
|
getControllerId: v || Rn
|
|
609
609
|
},
|
|
610
610
|
children: /* @__PURE__ */ r.jsx(n, Object.assign({}, c, {
|
|
611
|
-
onKeyDown:
|
|
612
|
-
ref:
|
|
611
|
+
onKeyDown: b,
|
|
612
|
+
ref: y,
|
|
613
613
|
role: o
|
|
614
614
|
}))
|
|
615
615
|
})
|
|
@@ -629,17 +629,17 @@ const oo = Object.assign(Kr, {
|
|
|
629
629
|
as: c,
|
|
630
630
|
...l
|
|
631
631
|
}, u) => {
|
|
632
|
-
e =
|
|
633
|
-
const [d,
|
|
632
|
+
e = me(e, "list-group-item");
|
|
633
|
+
const [d, f] = Gr({
|
|
634
634
|
key: ln(a, l.href),
|
|
635
635
|
active: t,
|
|
636
636
|
...l
|
|
637
|
-
}), x = Et((
|
|
637
|
+
}), x = Et((g) => {
|
|
638
638
|
if (n) {
|
|
639
|
-
|
|
639
|
+
g.preventDefault(), g.stopPropagation();
|
|
640
640
|
return;
|
|
641
641
|
}
|
|
642
|
-
d.onClick(
|
|
642
|
+
d.onClick(g);
|
|
643
643
|
});
|
|
644
644
|
n && l.tabIndex === void 0 && (l.tabIndex = -1, l["aria-disabled"] = !0);
|
|
645
645
|
const v = c || (i ? l.href ? "a" : "button" : "div");
|
|
@@ -648,7 +648,7 @@ const oo = Object.assign(Kr, {
|
|
|
648
648
|
...l,
|
|
649
649
|
...d,
|
|
650
650
|
onClick: x,
|
|
651
|
-
className: w(s, e,
|
|
651
|
+
className: w(s, e, f.isActive && "active", n && "disabled", o && `${e}-${o}`, i && `${e}-action`)
|
|
652
652
|
});
|
|
653
653
|
});
|
|
654
654
|
xn.displayName = "ListGroupItem";
|
|
@@ -664,7 +664,7 @@ const qr = /* @__PURE__ */ oe.forwardRef((e, t) => {
|
|
|
664
664
|
...l
|
|
665
665
|
} = dr(e, {
|
|
666
666
|
activeKey: "onSelect"
|
|
667
|
-
}), u =
|
|
667
|
+
}), u = me(a, "list-group");
|
|
668
668
|
let d;
|
|
669
669
|
return o && (d = o === !0 ? "horizontal" : `horizontal-${o}`), process.env.NODE_ENV !== "production" && mr(!(o && s === "flush"), '`variant="flush"` and `horizontal` should not be used together.'), /* @__PURE__ */ r.jsx(oo, {
|
|
670
670
|
ref: t,
|
|
@@ -720,8 +720,8 @@ 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
|
|
724
|
-
return lo(
|
|
723
|
+
let f = te(() => Object.entries(d).reduce((x, [v, g]) => ((g === "up" || g === !0) && (x = n(x, o(v))), (g === "down" || g === !0) && (x = n(x, s(v))), x), ""), [JSON.stringify(d)]);
|
|
724
|
+
return lo(f, u);
|
|
725
725
|
}
|
|
726
726
|
return i;
|
|
727
727
|
}
|
|
@@ -737,7 +737,7 @@ const uo = co({
|
|
|
737
737
|
bsPrefix: t,
|
|
738
738
|
as: n = "div",
|
|
739
739
|
...a
|
|
740
|
-
}, s) => (t =
|
|
740
|
+
}, s) => (t = me(t, "offcanvas-body"), /* @__PURE__ */ r.jsx(n, {
|
|
741
741
|
ref: s,
|
|
742
742
|
className: w(e, t),
|
|
743
743
|
...a
|
|
@@ -755,7 +755,7 @@ const fo = {
|
|
|
755
755
|
unmountOnExit: o = !1,
|
|
756
756
|
appear: i = !1,
|
|
757
757
|
...c
|
|
758
|
-
}, l) => (e =
|
|
758
|
+
}, l) => (e = me(e, "offcanvas"), /* @__PURE__ */ r.jsx(or, {
|
|
759
759
|
ref: l,
|
|
760
760
|
addEndListener: ir,
|
|
761
761
|
in: a,
|
|
@@ -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 =
|
|
779
|
+
}, o) => (e = me(e, "offcanvas-header"), /* @__PURE__ */ r.jsx(Wa, {
|
|
780
780
|
ref: o,
|
|
781
781
|
...s,
|
|
782
782
|
className: w(t, e),
|
|
@@ -789,7 +789,7 @@ const mo = $t("h5"), Xr = /* @__PURE__ */ oe.forwardRef(({
|
|
|
789
789
|
bsPrefix: t,
|
|
790
790
|
as: n = mo,
|
|
791
791
|
...a
|
|
792
|
-
}, s) => (t =
|
|
792
|
+
}, s) => (t = me(t, "offcanvas-title"), /* @__PURE__ */ r.jsx(n, {
|
|
793
793
|
ref: s,
|
|
794
794
|
className: w(e, t),
|
|
795
795
|
...a
|
|
@@ -818,83 +818,83 @@ const ea = /* @__PURE__ */ oe.forwardRef(({
|
|
|
818
818
|
keyboard: l = !0,
|
|
819
819
|
scroll: u = !1,
|
|
820
820
|
onEscapeKeyDown: d,
|
|
821
|
-
onShow:
|
|
821
|
+
onShow: f,
|
|
822
822
|
onHide: x,
|
|
823
823
|
container: v,
|
|
824
|
-
autoFocus:
|
|
825
|
-
enforceFocus:
|
|
824
|
+
autoFocus: g = !0,
|
|
825
|
+
enforceFocus: h = !0,
|
|
826
826
|
restoreFocus: p = !0,
|
|
827
|
-
restoreFocusOptions:
|
|
828
|
-
onEntered:
|
|
829
|
-
onExit:
|
|
830
|
-
onExiting:
|
|
827
|
+
restoreFocusOptions: b,
|
|
828
|
+
onEntered: y,
|
|
829
|
+
onExit: m,
|
|
830
|
+
onExiting: j,
|
|
831
831
|
onEnter: N,
|
|
832
|
-
onEntering:
|
|
832
|
+
onEntering: I,
|
|
833
833
|
onExited: D,
|
|
834
|
-
backdropClassName:
|
|
835
|
-
manager:
|
|
836
|
-
renderStaticNode:
|
|
837
|
-
|
|
834
|
+
backdropClassName: k,
|
|
835
|
+
manager: F,
|
|
836
|
+
renderStaticNode: S = !1,
|
|
837
|
+
...$
|
|
838
838
|
}, _) => {
|
|
839
|
-
const
|
|
840
|
-
e =
|
|
839
|
+
const P = ee();
|
|
840
|
+
e = me(e, "offcanvas");
|
|
841
841
|
const {
|
|
842
|
-
onToggle:
|
|
843
|
-
} = Z(za) || {}, [
|
|
842
|
+
onToggle: U
|
|
843
|
+
} = Z(za) || {}, [H, B] = O(!1), L = uo(o || "xs", "up");
|
|
844
844
|
A(() => {
|
|
845
|
-
|
|
846
|
-
}, [i, o,
|
|
847
|
-
const
|
|
848
|
-
|
|
849
|
-
}),
|
|
850
|
-
onHide:
|
|
851
|
-
}), [
|
|
852
|
-
function
|
|
853
|
-
return
|
|
845
|
+
B(o ? i && !L : i);
|
|
846
|
+
}, [i, o, L]);
|
|
847
|
+
const V = Et(() => {
|
|
848
|
+
U == null || U(), x == null || x();
|
|
849
|
+
}), z = te(() => ({
|
|
850
|
+
onHide: V
|
|
851
|
+
}), [V]);
|
|
852
|
+
function Y() {
|
|
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
|
-
}, E = (
|
|
860
|
-
|
|
861
|
-
},
|
|
862
|
-
...
|
|
863
|
-
className: w(`${e}-backdrop`,
|
|
864
|
-
}), [
|
|
865
|
-
...
|
|
866
|
-
|
|
857
|
+
const q = (K, ...le) => {
|
|
858
|
+
K && (K.style.visibility = "visible"), N == null || N(K, ...le);
|
|
859
|
+
}, E = (K, ...le) => {
|
|
860
|
+
K && (K.style.visibility = ""), D == null || D(...le);
|
|
861
|
+
}, re = C((K) => /* @__PURE__ */ r.jsx("div", {
|
|
862
|
+
...K,
|
|
863
|
+
className: w(`${e}-backdrop`, k)
|
|
864
|
+
}), [k, e]), R = (K) => /* @__PURE__ */ r.jsx("div", {
|
|
865
|
+
...K,
|
|
866
|
+
...$,
|
|
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: [!
|
|
873
|
-
value:
|
|
872
|
+
children: [!H && (o || S) && R({}), /* @__PURE__ */ r.jsx(Ua.Provider, {
|
|
873
|
+
value: z,
|
|
874
874
|
children: /* @__PURE__ */ r.jsx(Ga, {
|
|
875
|
-
show:
|
|
875
|
+
show: H,
|
|
876
876
|
ref: _,
|
|
877
877
|
backdrop: c,
|
|
878
878
|
container: v,
|
|
879
879
|
keyboard: l,
|
|
880
|
-
autoFocus:
|
|
881
|
-
enforceFocus:
|
|
880
|
+
autoFocus: g,
|
|
881
|
+
enforceFocus: h && !u,
|
|
882
882
|
restoreFocus: p,
|
|
883
|
-
restoreFocusOptions:
|
|
883
|
+
restoreFocusOptions: b,
|
|
884
884
|
onEscapeKeyDown: d,
|
|
885
|
-
onShow:
|
|
886
|
-
onHide:
|
|
885
|
+
onShow: f,
|
|
886
|
+
onHide: V,
|
|
887
887
|
onEnter: q,
|
|
888
|
-
onEntering:
|
|
889
|
-
onEntered:
|
|
890
|
-
onExit:
|
|
891
|
-
onExiting:
|
|
888
|
+
onEntering: I,
|
|
889
|
+
onEntered: y,
|
|
890
|
+
onExit: m,
|
|
891
|
+
onExiting: j,
|
|
892
892
|
onExited: E,
|
|
893
|
-
manager:
|
|
893
|
+
manager: Y(),
|
|
894
894
|
transition: ho,
|
|
895
895
|
backdropTransition: go,
|
|
896
|
-
renderBackdrop:
|
|
897
|
-
renderDialog:
|
|
896
|
+
renderBackdrop: re,
|
|
897
|
+
renderDialog: R
|
|
898
898
|
})
|
|
899
899
|
})]
|
|
900
900
|
});
|
|
@@ -912,7 +912,7 @@ function ta({
|
|
|
912
912
|
size: a,
|
|
913
913
|
...s
|
|
914
914
|
}) {
|
|
915
|
-
n =
|
|
915
|
+
n = me(n, "placeholder");
|
|
916
916
|
const [{
|
|
917
917
|
className: o,
|
|
918
918
|
...i
|
|
@@ -943,7 +943,7 @@ const ra = /* @__PURE__ */ oe.forwardRef(({
|
|
|
943
943
|
});
|
|
944
944
|
});
|
|
945
945
|
ra.displayName = "Placeholder";
|
|
946
|
-
const
|
|
946
|
+
const Be = Object.assign(ra, {
|
|
947
947
|
Button: na
|
|
948
948
|
}), vn = /* @__PURE__ */ oe.forwardRef(({
|
|
949
949
|
bsPrefix: e,
|
|
@@ -955,7 +955,7 @@ const Me = Object.assign(ra, {
|
|
|
955
955
|
className: o,
|
|
956
956
|
...i
|
|
957
957
|
}, c) => {
|
|
958
|
-
e =
|
|
958
|
+
e = me(e, "spinner");
|
|
959
959
|
const l = `${e}-${n}`;
|
|
960
960
|
return /* @__PURE__ */ r.jsx(s, {
|
|
961
961
|
ref: c,
|
|
@@ -991,7 +991,7 @@ const td = ({ heading: e, content: t, placement: n, children: a, trigger: s, pop
|
|
|
991
991
|
/* @__PURE__ */ r.jsx("input", { id: n, type: "file", accept: a, onChange: u, hidden: !0, multiple: c })
|
|
992
992
|
] });
|
|
993
993
|
}, nd = ({ onUpload: e, accept: t, children: n, className: a, size: s = "md" }) => {
|
|
994
|
-
const o =
|
|
994
|
+
const o = C(async (c) => {
|
|
995
995
|
if (c.target.files)
|
|
996
996
|
try {
|
|
997
997
|
await e(c.target.files);
|
|
@@ -1006,25 +1006,25 @@ const td = ({ heading: e, content: t, placement: n, children: a, trigger: s, pop
|
|
|
1006
1006
|
}, xo = "_select_dlv1t_1", zt = {
|
|
1007
1007
|
select: xo
|
|
1008
1008
|
}, vo = ({ month: e, onChangeMonth: t, locale: n, yearMin: a = 2e3, yearMax: s = 2050 }) => {
|
|
1009
|
-
const o =
|
|
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 = te(() => {
|
|
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 = te(() => {
|
|
1018
1018
|
const d = [];
|
|
1019
|
-
for (let
|
|
1019
|
+
for (let f = 0; f <= 11; f++)
|
|
1020
1020
|
d.push({
|
|
1021
|
-
id:
|
|
1022
|
-
name: xt(new Date(2024,
|
|
1021
|
+
id: f,
|
|
1022
|
+
name: xt(new Date(2024, f, 1), "LLLL", { locale: n })
|
|
1023
1023
|
});
|
|
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(ne, { 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)));
|
|
@@ -1033,37 +1033,37 @@ const td = ({ heading: e, content: t, placement: n, children: a, trigger: s, pop
|
|
|
1033
1033
|
var u;
|
|
1034
1034
|
return ((u = l.target) == null ? void 0 : u.value) && t(Ir(e, Number(l.target.value)));
|
|
1035
1035
|
}, className: w(zt.select), children: i.map((l) => /* @__PURE__ */ r.jsx("option", { value: l, children: l }, l)) }),
|
|
1036
|
-
/* @__PURE__ */ r.jsx(
|
|
1036
|
+
/* @__PURE__ */ r.jsx(ne, { 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
|
|
1040
1040
|
}, bo = ({ year: e, onChangeYear: t, optionMin: n = 2e3, optionMax: a = 2050, className: s }) => {
|
|
1041
|
-
const o =
|
|
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 = te(() => {
|
|
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(ne, { 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(ne, { 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
|
|
1060
|
-
}, No = ({ show: e, widgets: t, handleClose: n, onWidgetPicked: a, texts: s }) => /* @__PURE__ */ r.jsxs(
|
|
1061
|
-
/* @__PURE__ */ r.jsx(
|
|
1062
|
-
/* @__PURE__ */ r.jsx(
|
|
1060
|
+
}, No = ({ show: e, widgets: t, handleClose: n, onWidgetPicked: a, texts: s }) => /* @__PURE__ */ r.jsxs(Pe, { show: e, onHide: () => n(), children: [
|
|
1061
|
+
/* @__PURE__ */ r.jsx(Pe.Header, { closeButton: !0, children: /* @__PURE__ */ r.jsx(Pe.Title, { children: s.pickWidgetToAdd }) }),
|
|
1062
|
+
/* @__PURE__ */ r.jsx(Pe.Body, { children: /* @__PURE__ */ r.jsx("div", { className: "list-group", children: t.filter((o) => o.id >= 0).map((o) => /* @__PURE__ */ r.jsx("div", { role: "button", className: "list-group-item bg-white", onClick: () => a(o.id), children: /* @__PURE__ */ r.jsx(X, { variant: "body", children: o.name }) })) }) })
|
|
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(ne, { 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 })
|
|
@@ -1074,11 +1074,11 @@ const td = ({ heading: e, content: t, placement: n, children: a, trigger: s, pop
|
|
|
1074
1074
|
const s = localStorage.getItem("dashboardConfig");
|
|
1075
1075
|
s ? n(JSON.parse(s)) : e && n(e);
|
|
1076
1076
|
}, [e]);
|
|
1077
|
-
const a =
|
|
1077
|
+
const a = C((s) => {
|
|
1078
1078
|
n(s), localStorage.setItem("dashboardConfig", JSON.stringify(s));
|
|
1079
1079
|
}, []);
|
|
1080
1080
|
return { dashboardConfig: t, onChangeDashboardConfig: a };
|
|
1081
|
-
}, ko = "_dashboard_16plm_1", So = "_widgets-grid_16plm_1", Io = "_widget-wrapper_16plm_8", Do = "_full-width_16plm_13", $o = "_widget-edit_16plm_16", Eo = "_remove-icon_16plm_19", Fo = "_full-width-icon_16plm_26", Oo = "_widget-edit-overlay_16plm_36",
|
|
1081
|
+
}, ko = "_dashboard_16plm_1", So = "_widgets-grid_16plm_1", Io = "_widget-wrapper_16plm_8", Do = "_full-width_16plm_13", $o = "_widget-edit_16plm_16", Eo = "_remove-icon_16plm_19", Fo = "_full-width-icon_16plm_26", Oo = "_widget-edit-overlay_16plm_36", Te = {
|
|
1082
1082
|
dashboard: ko,
|
|
1083
1083
|
"widgets-grid": "_widgets-grid_16plm_1",
|
|
1084
1084
|
widgetsGrid: So,
|
|
@@ -1114,24 +1114,24 @@ class To extends ks {
|
|
|
1114
1114
|
}
|
|
1115
1115
|
render() {
|
|
1116
1116
|
const { fallback: t, fallbackOn404: n, children: a, texts: s, reloadButtonDisplay: o = "append-after-child" } = this.props;
|
|
1117
|
-
return this.state.hasError ? o === "inject-to-child" && !this.state.is404Error && Sn(t) ?
|
|
1117
|
+
return this.state.hasError ? o === "inject-to-child" && !this.state.is404Error && Sn(t) ? Ce.cloneElement(t, {
|
|
1118
1118
|
...t.props
|
|
1119
1119
|
}, /* @__PURE__ */ r.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
1120
1120
|
...t.props.children,
|
|
1121
|
-
/* @__PURE__ */ r.jsx("div", { className: "d-flex gap-2 justify-content-center", children: /* @__PURE__ */ r.jsx(
|
|
1122
|
-
] })) : o === "inject-to-child" && this.state.is404Error && Sn(n) ?
|
|
1121
|
+
/* @__PURE__ */ r.jsx("div", { className: "d-flex gap-2 justify-content-center", children: /* @__PURE__ */ r.jsx(Le, { type: "button", onClick: this.reload, children: s.reloadButtonContent }) })
|
|
1122
|
+
] })) : o === "inject-to-child" && this.state.is404Error && Sn(n) ? Ce.cloneElement(n, {
|
|
1123
1123
|
...n.props
|
|
1124
1124
|
}, /* @__PURE__ */ r.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
1125
1125
|
...n.props.children,
|
|
1126
1126
|
/* @__PURE__ */ r.jsxs("div", { className: "d-flex gap-2 justify-content-center", children: [
|
|
1127
|
-
/* @__PURE__ */ r.jsx(
|
|
1128
|
-
/* @__PURE__ */ r.jsx(
|
|
1127
|
+
/* @__PURE__ */ r.jsx(Le, { type: "button", onClick: this.reload, children: s.reloadButtonContent }),
|
|
1128
|
+
/* @__PURE__ */ r.jsx(Le, { type: "button", onClick: this.props.navigateBack, children: s.navigateBackButtonContent })
|
|
1129
1129
|
] })
|
|
1130
1130
|
] })) : /* @__PURE__ */ r.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
1131
1131
|
this.state.is404Error ? n : t,
|
|
1132
1132
|
/* @__PURE__ */ r.jsxs("div", { className: "d-flex gap-2 justify-content-center", children: [
|
|
1133
|
-
o === "none" ? null : /* @__PURE__ */ r.jsx(
|
|
1134
|
-
this.state.is404Error && /* @__PURE__ */ r.jsx(
|
|
1133
|
+
o === "none" ? null : /* @__PURE__ */ r.jsx(Le, { type: "button", onClick: this.reload, children: s.reloadButtonContent }),
|
|
1134
|
+
this.state.is404Error && /* @__PURE__ */ r.jsx(Le, { type: "button", onClick: this.props.navigateBack, children: s.navigateBackButtonContent })
|
|
1135
1135
|
] })
|
|
1136
1136
|
] }) : a;
|
|
1137
1137
|
}
|
|
@@ -1147,36 +1147,36 @@ 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 =
|
|
1151
|
-
var v,
|
|
1152
|
-
|
|
1150
|
+
const { texts: { homeDashboard: a } } = Z(pe), { dashboardConfig: s, onChangeDashboardConfig: o } = Co(n), i = C((f, x) => {
|
|
1151
|
+
var v, g;
|
|
1152
|
+
f === ((v = s.widgets) == null ? void 0 : v.length) ? o({
|
|
1153
1153
|
...s,
|
|
1154
1154
|
widgets: [...s.widgets, { widgetId: x, fullWidth: !1 }]
|
|
1155
1155
|
}) : o({
|
|
1156
1156
|
...s,
|
|
1157
|
-
widgets: ((
|
|
1157
|
+
widgets: ((g = s.widgets) == null ? void 0 : g.map((h, p) => p === f ? { widgetId: x, fullWidth: !1 } : h)) ?? []
|
|
1158
1158
|
});
|
|
1159
|
-
}, [s, o]), c =
|
|
1159
|
+
}, [s, o]), c = C((f) => {
|
|
1160
1160
|
var x, v;
|
|
1161
|
-
((x = s.widgets[
|
|
1161
|
+
((x = s.widgets[f]) == null ? void 0 : x.widgetId) === -1 ? o({
|
|
1162
1162
|
...s,
|
|
1163
|
-
widgets: ((v = s.widgets) == null ? void 0 : v.filter((
|
|
1164
|
-
}) : i(
|
|
1165
|
-
}, [s, o, i]), l =
|
|
1163
|
+
widgets: ((v = s.widgets) == null ? void 0 : v.filter((g, h) => h !== f)) ?? []
|
|
1164
|
+
}) : i(f, -1);
|
|
1165
|
+
}, [s, o, i]), l = C((f) => {
|
|
1166
1166
|
var x;
|
|
1167
1167
|
o({
|
|
1168
1168
|
...s,
|
|
1169
|
-
widgets: ((x = s.widgets) == null ? void 0 : x.map((v,
|
|
1169
|
+
widgets: ((x = s.widgets) == null ? void 0 : x.map((v, g) => g === f ? { ...v, fullWidth: !v.fullWidth } : v)) ?? []
|
|
1170
1170
|
});
|
|
1171
|
-
}, [s, o]), u =
|
|
1172
|
-
[
|
|
1173
|
-
}, { [
|
|
1171
|
+
}, [s, o]), u = C((f, x, v) => f ? /* @__PURE__ */ r.jsxs("div", { className: w(Te.widgetWrapper, {
|
|
1172
|
+
[Te.widgetEdit]: t && f.id !== -1
|
|
1173
|
+
}, { [Te.fullWidth]: v }), children: [
|
|
1174
1174
|
t && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1175
|
-
/* @__PURE__ */ r.jsx(
|
|
1176
|
-
/* @__PURE__ */ r.jsx(
|
|
1175
|
+
/* @__PURE__ */ r.jsx(ne, { color: "danger", onClick: () => c(x), className: w(Te.removeIcon), children: /* @__PURE__ */ r.jsx(gr, {}) }),
|
|
1176
|
+
/* @__PURE__ */ r.jsx(ne, { color: v ? "danger" : "primary", onClick: () => l(x), className: w(Te.fullWidthIcon), children: /* @__PURE__ */ r.jsx(ts, {}) })
|
|
1177
1177
|
] }),
|
|
1178
|
-
|
|
1179
|
-
|
|
1178
|
+
f.id === -1 ? t && /* @__PURE__ */ r.jsx("div", { className: Te.widgetWrapper, children: /* @__PURE__ */ r.jsx(Vn, { availableWidgets: e, onAdd: (g) => i(x, g), texts: a }) }) : /* @__PURE__ */ r.jsx(Bo, { title: f.title, children: /* @__PURE__ */ r.jsx(f.WidgetElement, { title: f.title }) }),
|
|
1179
|
+
f.id > -1 && t && /* @__PURE__ */ r.jsx("div", { className: Te.widgetEditOverlay })
|
|
1180
1180
|
] }, x) : /* @__PURE__ */ r.jsx(r.Fragment, {}), [
|
|
1181
1181
|
t,
|
|
1182
1182
|
i,
|
|
@@ -1185,11 +1185,11 @@ const Lo = (e) => (n) => {
|
|
|
1185
1185
|
e,
|
|
1186
1186
|
a
|
|
1187
1187
|
]);
|
|
1188
|
-
return /* @__PURE__ */ r.jsx("div", { className:
|
|
1189
|
-
(d = s.widgets) == null ? void 0 : d.map((
|
|
1190
|
-
t && /* @__PURE__ */ r.jsx(Vn, { availableWidgets: e, onAdd: (
|
|
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, x) => u(e.find((v) => v.id === f.widgetId), x, f.fullWidth)),
|
|
1190
|
+
t && /* @__PURE__ */ r.jsx(Vn, { availableWidgets: e, onAdd: (f) => {
|
|
1191
1191
|
var x;
|
|
1192
|
-
return i((x = s.widgets) == null ? void 0 : x.length,
|
|
1192
|
+
return i((x = s.widgets) == null ? void 0 : x.length, f);
|
|
1193
1193
|
}, texts: a })
|
|
1194
1194
|
] }) });
|
|
1195
1195
|
}, Vo = "_badge_193ci_1", Po = "_sm_193ci_6", Ho = "_md_193ci_10", Wo = "_lg_193ci_14", zo = "_light_193ci_18", Ut = {
|
|
@@ -1218,55 +1218,55 @@ const Lo = (e) => (n) => {
|
|
|
1218
1218
|
] });
|
|
1219
1219
|
};
|
|
1220
1220
|
function Ko(e, t, n) {
|
|
1221
|
-
var a = this, s = ee(null), o = ee(0), i = ee(null), c = ee([]), l = ee(), u = ee(), d = ee(e),
|
|
1221
|
+
var a = this, s = ee(null), o = ee(0), i = ee(null), c = ee([]), l = ee(), u = ee(), d = ee(e), f = ee(!0);
|
|
1222
1222
|
d.current = e;
|
|
1223
1223
|
var x = typeof window < "u", v = !t && t !== 0 && x;
|
|
1224
1224
|
if (typeof e != "function") throw new TypeError("Expected a function");
|
|
1225
1225
|
t = +t || 0;
|
|
1226
|
-
var
|
|
1226
|
+
var g = !!(n = n || {}).leading, h = !("trailing" in n) || !!n.trailing, p = "maxWait" in n, b = "debounceOnServer" in n && !!n.debounceOnServer, y = p ? Math.max(+n.maxWait || 0, t) : null;
|
|
1227
1227
|
A(function() {
|
|
1228
|
-
return
|
|
1229
|
-
|
|
1228
|
+
return f.current = !0, function() {
|
|
1229
|
+
f.current = !1;
|
|
1230
1230
|
};
|
|
1231
1231
|
}, []);
|
|
1232
|
-
var
|
|
1233
|
-
var
|
|
1234
|
-
var
|
|
1235
|
-
return c.current = l.current = null, o.current =
|
|
1236
|
-
}, N = function(
|
|
1237
|
-
v && cancelAnimationFrame(i.current), i.current = v ? requestAnimationFrame(
|
|
1238
|
-
},
|
|
1239
|
-
if (!
|
|
1240
|
-
var
|
|
1241
|
-
return !s.current ||
|
|
1242
|
-
}, D = function(
|
|
1243
|
-
return i.current = null,
|
|
1244
|
-
},
|
|
1245
|
-
var
|
|
1246
|
-
if (
|
|
1247
|
-
if (
|
|
1248
|
-
var _ = t - (
|
|
1249
|
-
N(
|
|
1232
|
+
var m = te(function() {
|
|
1233
|
+
var j = function(S) {
|
|
1234
|
+
var $ = c.current, _ = l.current;
|
|
1235
|
+
return c.current = l.current = null, o.current = S, u.current = d.current.apply(_, $);
|
|
1236
|
+
}, N = function(S, $) {
|
|
1237
|
+
v && cancelAnimationFrame(i.current), i.current = v ? requestAnimationFrame(S) : setTimeout(S, $);
|
|
1238
|
+
}, I = function(S) {
|
|
1239
|
+
if (!f.current) return !1;
|
|
1240
|
+
var $ = S - s.current;
|
|
1241
|
+
return !s.current || $ >= t || $ < 0 || p && S - o.current >= y;
|
|
1242
|
+
}, D = function(S) {
|
|
1243
|
+
return i.current = null, h && c.current ? j(S) : (c.current = l.current = null, u.current);
|
|
1244
|
+
}, k = function S() {
|
|
1245
|
+
var $ = Date.now();
|
|
1246
|
+
if (I($)) return D($);
|
|
1247
|
+
if (f.current) {
|
|
1248
|
+
var _ = t - ($ - s.current), P = p ? Math.min(_, y - ($ - o.current)) : _;
|
|
1249
|
+
N(S, P);
|
|
1250
1250
|
}
|
|
1251
|
-
},
|
|
1252
|
-
if (x ||
|
|
1253
|
-
var
|
|
1254
|
-
if (c.current = [].slice.call(arguments), l.current = a, s.current =
|
|
1255
|
-
if (!i.current &&
|
|
1256
|
-
if (p) return N(
|
|
1251
|
+
}, F = function() {
|
|
1252
|
+
if (x || b) {
|
|
1253
|
+
var S = Date.now(), $ = I(S);
|
|
1254
|
+
if (c.current = [].slice.call(arguments), l.current = a, s.current = S, $) {
|
|
1255
|
+
if (!i.current && f.current) return o.current = s.current, N(k, t), g ? j(s.current) : u.current;
|
|
1256
|
+
if (p) return N(k, t), j(s.current);
|
|
1257
1257
|
}
|
|
1258
|
-
return i.current || N(
|
|
1258
|
+
return i.current || N(k, t), u.current;
|
|
1259
1259
|
}
|
|
1260
1260
|
};
|
|
1261
|
-
return
|
|
1261
|
+
return F.cancel = function() {
|
|
1262
1262
|
i.current && (v ? 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
1266
|
return i.current ? D(Date.now()) : u.current;
|
|
1267
|
-
},
|
|
1268
|
-
}, [
|
|
1269
|
-
return
|
|
1267
|
+
}, F;
|
|
1268
|
+
}, [g, p, t, y, h, v, x, b]);
|
|
1269
|
+
return m;
|
|
1270
1270
|
}
|
|
1271
1271
|
function qo(e, t) {
|
|
1272
1272
|
return e === t;
|
|
@@ -1275,12 +1275,12 @@ function Qo(e, t) {
|
|
|
1275
1275
|
return t;
|
|
1276
1276
|
}
|
|
1277
1277
|
function sa(e, t, n) {
|
|
1278
|
-
var a = qo, s = Is(Qo, e), o = s[0], i = s[1], c = Ko(
|
|
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
1280
|
}, [i]), t, n), l = ee(e);
|
|
1281
1281
|
return a(l.current, e) || (c(e), l.current = e), a(o, e) && c.cancel(), [o, c];
|
|
1282
1282
|
}
|
|
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",
|
|
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 = {
|
|
1284
1284
|
wrapper: Zo,
|
|
1285
1285
|
open: Jo,
|
|
1286
1286
|
dropdown: Xo,
|
|
@@ -1304,113 +1304,115 @@ 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:
|
|
1308
|
-
var
|
|
1309
|
-
const
|
|
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: x, isLoading: v = !1, inputRef: g, archiveColumn: h = "archive" }) => {
|
|
1308
|
+
var Ue;
|
|
1309
|
+
const p = ee(null), b = ee(null), y = ee(null), m = ee(null), j = ee(null), [N, I] = O(""), [D] = sa(N, 500), [, k] = O(!1), { copyToClipboard: F } = Ts(), S = (Ue = g.current) == null ? void 0 : Ue.getBoundingClientRect(), $ = (S == null ? void 0 : S.x) ?? 0, _ = ((S == null ? void 0 : S.x) ?? 0) + ((S == null ? void 0 : S.width) ?? 0), P = (S == null ? void 0 : S.y) ?? 0, U = ((S == null ? void 0 : S.y) ?? 0) + ((S == null ? void 0 : S.height) ?? 0), H = (S == null ? void 0 : S.width) ?? 0, B = (S == null ? void 0 : S.height) ?? 0, L = 5, V = te(() => $ ? $ > window.innerWidth / 2 : !1, [$]), z = te(() => P ? P > window.innerHeight / 2 : !1, [P]);
|
|
1310
1310
|
A(() => {
|
|
1311
1311
|
var G;
|
|
1312
|
-
e && ((G =
|
|
1313
|
-
}, [
|
|
1314
|
-
e ||
|
|
1312
|
+
e && ((G = m.current) == null || G.focus());
|
|
1313
|
+
}, [m, e]), A(() => {
|
|
1314
|
+
e || I("");
|
|
1315
1315
|
}, [e]), A(() => {
|
|
1316
|
-
o(
|
|
1317
|
-
}, [
|
|
1318
|
-
const [
|
|
1316
|
+
o(D);
|
|
1317
|
+
}, [D, o]);
|
|
1318
|
+
const [Y, q] = O(null);
|
|
1319
1319
|
A(() => {
|
|
1320
|
-
e && n.length > 0 ?
|
|
1320
|
+
e && n.length > 0 ? q(0) : q(null);
|
|
1321
1321
|
}, [n, e]);
|
|
1322
|
-
const
|
|
1323
|
-
var
|
|
1324
|
-
const
|
|
1325
|
-
if (
|
|
1326
|
-
const
|
|
1327
|
-
|
|
1322
|
+
const E = te(() => Y !== null ? n.at(Y) ?? null : null, [Y, n]), re = C((G, he) => {
|
|
1323
|
+
var nt, T;
|
|
1324
|
+
const we = document.getElementById(`item-${G}`);
|
|
1325
|
+
if (we) {
|
|
1326
|
+
const M = we.clientHeight ?? 0;
|
|
1327
|
+
he === "down" ? (nt = j.current) == null || nt.scrollBy({
|
|
1328
1328
|
left: 0,
|
|
1329
|
-
top:
|
|
1329
|
+
top: M,
|
|
1330
1330
|
behavior: "smooth"
|
|
1331
|
-
}) : (
|
|
1331
|
+
}) : (T = j.current) == null || T.scrollBy({
|
|
1332
1332
|
left: 0,
|
|
1333
|
-
top: -
|
|
1333
|
+
top: -M,
|
|
1334
1334
|
behavior: "smooth"
|
|
1335
1335
|
});
|
|
1336
1336
|
}
|
|
1337
|
-
}, []),
|
|
1338
|
-
if (
|
|
1337
|
+
}, []), R = C((G) => {
|
|
1338
|
+
if (Y === null || x)
|
|
1339
1339
|
return;
|
|
1340
|
-
const
|
|
1341
|
-
|
|
1342
|
-
}, [
|
|
1340
|
+
const he = Y + G;
|
|
1341
|
+
he < 0 || he >= n.length || q((we) => (we !== null && re(we, G > 0 ? "down" : "up"), he));
|
|
1342
|
+
}, [Y, n, x, re]), K = C((G) => {
|
|
1343
1343
|
if (e)
|
|
1344
1344
|
switch (G.key) {
|
|
1345
1345
|
case "Escape":
|
|
1346
1346
|
G.stopPropagation(), G.preventDefault(), t();
|
|
1347
1347
|
break;
|
|
1348
1348
|
case "Enter":
|
|
1349
|
-
G.stopPropagation(), G.preventDefault(), x || s(
|
|
1349
|
+
G.stopPropagation(), G.preventDefault(), x || s(E);
|
|
1350
1350
|
break;
|
|
1351
1351
|
case "ArrowUp":
|
|
1352
|
-
G.stopPropagation(), G.preventDefault(),
|
|
1352
|
+
G.stopPropagation(), G.preventDefault(), R(-1);
|
|
1353
1353
|
break;
|
|
1354
1354
|
case "ArrowDown":
|
|
1355
|
-
G.stopPropagation(), G.preventDefault(),
|
|
1355
|
+
G.stopPropagation(), G.preventDefault(), R(1);
|
|
1356
1356
|
break;
|
|
1357
1357
|
}
|
|
1358
|
-
}, [t, e,
|
|
1359
|
-
|
|
1358
|
+
}, [t, e, R, E, x, s]), le = C(() => {
|
|
1359
|
+
k((G) => !G);
|
|
1360
1360
|
}, []);
|
|
1361
|
-
A(() => (window.addEventListener("scroll",
|
|
1362
|
-
window.removeEventListener("scroll",
|
|
1363
|
-
}), [
|
|
1364
|
-
window.removeEventListener("resize",
|
|
1365
|
-
}), [
|
|
1366
|
-
const
|
|
1361
|
+
A(() => (window.addEventListener("scroll", le), () => {
|
|
1362
|
+
window.removeEventListener("scroll", le);
|
|
1363
|
+
}), [le]), A(() => (window.addEventListener("resize", le), () => {
|
|
1364
|
+
window.removeEventListener("resize", le);
|
|
1365
|
+
}), [le]), kr(K), Cr([p, b, y], t);
|
|
1366
|
+
const fe = c ?? (l && l.length > 0 ? 250 : 0), ke = (l == null ? void 0 : l.reduce((G, he) => G + (he.width ?? 100), 0)) ?? 0, J = `calc(max(${H}px, ${fe}px + ${ke}px))`, ve = te(() => (a && e && !x) ?? !1, [a, e, x]), De = te(() => (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
|
-
/* @__PURE__ */ r.jsxs("div", { className: w("luminus-dropdown-picker-actions",
|
|
1370
|
-
[
|
|
1369
|
+
/* @__PURE__ */ r.jsxs("div", { className: w("luminus-dropdown-picker-actions", _e.actionButtonsContainer, {
|
|
1370
|
+
[_e.reverse]: V
|
|
1371
1371
|
}), style: {
|
|
1372
|
-
top: `calc(${
|
|
1373
|
-
left:
|
|
1372
|
+
top: `calc(${P}px + ${B / 2}px - 12px)`,
|
|
1373
|
+
left: V ? ve && De ? `calc(${$}px - 24px - 8px - 24px - 4px)` : `calc(${$}px - 24px - 8px)` : `calc(${_}px + 8px)`
|
|
1374
1374
|
}, children: [
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
var G,
|
|
1378
|
-
|
|
1375
|
+
ve && /* @__PURE__ */ r.jsx("button", { ref: b, type: "button", className: w("luminus-dropdown-picker-clear-button", _e.actionButton), onClick: () => !x && 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: y, type: "button", className: w("luminus-dropdown-picker-copy-button", _e.actionButton), onClick: () => {
|
|
1377
|
+
var G, he;
|
|
1378
|
+
F(u ? ((G = a == null ? void 0 : a.id) == null ? void 0 : G.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
|
-
/* @__PURE__ */ r.jsx("div", { className: w("luminus-dropdown-picker",
|
|
1382
|
-
[
|
|
1381
|
+
/* @__PURE__ */ r.jsx("div", { className: w("luminus-dropdown-picker", _e.wrapper, {
|
|
1382
|
+
[_e.open]: e
|
|
1383
1383
|
}), style: {
|
|
1384
|
-
top:
|
|
1385
|
-
left:
|
|
1386
|
-
right:
|
|
1387
|
-
width:
|
|
1388
|
-
justifyContent:
|
|
1389
|
-
}, children: /* @__PURE__ */ r.jsx("div", { ref:
|
|
1390
|
-
d && (
|
|
1391
|
-
var
|
|
1392
|
-
return
|
|
1384
|
+
top: z ? `calc(${P}px - 50vh - 8px)` : `calc(${U}px + 8px)`,
|
|
1385
|
+
left: V ? `calc(${_}px - ${J})` : $,
|
|
1386
|
+
right: V ? `${_}px` : `calc(${$}px + ${J})`,
|
|
1387
|
+
width: J,
|
|
1388
|
+
justifyContent: z ? "flex-end" : "flex-start"
|
|
1389
|
+
}, children: /* @__PURE__ */ r.jsx("div", { ref: p, className: w("shadow rounded", _e.dropdown), children: !x && /* @__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: N, onChange: (G) => {
|
|
1391
|
+
var he;
|
|
1392
|
+
return I(((he = G.target) == null ? void 0 : he.value) ?? "");
|
|
1393
1393
|
} }) }),
|
|
1394
|
-
v ? /* @__PURE__ */ r.jsx("div", { className:
|
|
1395
|
-
l && l.length > 0 && /* @__PURE__ */ r.jsxs("div", { className: w("header-row border-bottom",
|
|
1396
|
-
/* @__PURE__ */ r.jsx("div", { className:
|
|
1397
|
-
l == null ? void 0 : l.map((G) => /* @__PURE__ */ r.jsx("div", { className:
|
|
1394
|
+
v ? /* @__PURE__ */ r.jsx("div", { className: _e.loadingContainer, children: /* @__PURE__ */ r.jsx(vn, { animation: "border", variant: "primary" }) }) : n.length > 0 && /* @__PURE__ */ r.jsxs("div", { ref: j, className: w("items", _e.itemsContainer), children: [
|
|
1395
|
+
l && l.length > 0 && /* @__PURE__ */ r.jsxs("div", { className: w("header-row border-bottom", _e.headerRow), children: [
|
|
1396
|
+
/* @__PURE__ */ r.jsx("div", { className: _e.name }),
|
|
1397
|
+
l == null ? void 0 : l.filter((G) => G.key !== h).map((G) => /* @__PURE__ */ r.jsx("div", { className: _e.columnItem, style: {
|
|
1398
1398
|
width: `${G.width ?? 100}px`,
|
|
1399
1399
|
minWidth: `${G.width ?? 100}px`,
|
|
1400
1400
|
maxWidth: `${G.width ?? 100}px`
|
|
1401
1401
|
}, children: /* @__PURE__ */ r.jsx(X, { variant: "caption", children: G.name }) }, G.key))
|
|
1402
1402
|
] }),
|
|
1403
|
-
n == null ? void 0 : n.map((G,
|
|
1404
|
-
[
|
|
1403
|
+
n == null ? void 0 : n.map((G, he) => /* @__PURE__ */ r.jsxs("button", { id: `item-${he}`, type: "button", className: w("item cursor-pointer", _e.item, {
|
|
1404
|
+
[_e.focused]: Y === he
|
|
1405
1405
|
}, {
|
|
1406
|
-
focused:
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1406
|
+
focused: Y === he
|
|
1407
|
+
}, {
|
|
1408
|
+
archive: G.additionalColumns ? G.additionalColumns[h] : !1
|
|
1409
|
+
}), onClick: () => !x && s(G), onMouseEnter: () => q(he), children: [
|
|
1410
|
+
/* @__PURE__ */ r.jsx("div", { className: _e.name, children: /* @__PURE__ */ r.jsx(X, { variant: "body2", children: u ? G.id : G.name }) }),
|
|
1411
|
+
l == null ? void 0 : l.filter((we) => we.key !== h).map((we) => /* @__PURE__ */ r.jsx("div", { className: _e.columnItem, style: {
|
|
1412
|
+
width: `${we.width ?? 100}px`,
|
|
1413
|
+
minWidth: `${we.width ?? 100}px`,
|
|
1414
|
+
maxWidth: `${we.width ?? 100}px`
|
|
1415
|
+
}, children: /* @__PURE__ */ r.jsx(X, { variant: "caption", className: w("text-muted"), children: G.additionalColumns && G.additionalColumns[we.key] }) }, we.key))
|
|
1414
1416
|
] }, G.id))
|
|
1415
1417
|
] })
|
|
1416
1418
|
] }) }) })
|
|
@@ -1439,9 +1441,9 @@ const Zo = "_wrapper_1kgb8_1", Jo = "_open_1kgb8_9", Xo = "_dropdown_1kgb8_13",
|
|
|
1439
1441
|
header: yi,
|
|
1440
1442
|
item: bi
|
|
1441
1443
|
}, wi = ({ show: e, query: t, onCancel: n, groups: a, isLoading: s, searchTypes: o }) => {
|
|
1442
|
-
const { texts: { appSearch: i } } = Z(pe), c = ee(null), l =
|
|
1443
|
-
var
|
|
1444
|
-
const d = (
|
|
1444
|
+
const { texts: { appSearch: i } } = Z(pe), c = ee(null), l = C((u) => {
|
|
1445
|
+
var f;
|
|
1446
|
+
const d = (f = o.find((x) => x.key === u.type)) == null ? void 0 : f.toPath;
|
|
1445
1447
|
return d ? `${d}/${u.searchKey}` : "/not-found";
|
|
1446
1448
|
}, [o]);
|
|
1447
1449
|
return Cr([c], n), /* @__PURE__ */ r.jsx("div", { ref: c, className: w("luminus-app-search-dropdown shadow rounded", Ge.dropdown, {
|
|
@@ -1459,14 +1461,14 @@ const Zo = "_wrapper_1kgb8_1", Jo = "_open_1kgb8_9", Xo = "_dropdown_1kgb8_13",
|
|
|
1459
1461
|
u.key.totalCount
|
|
1460
1462
|
] })
|
|
1461
1463
|
] }),
|
|
1462
|
-
(d = u.items) == null ? void 0 : d.map((
|
|
1464
|
+
(d = u.items) == null ? void 0 : d.map((f, x) => /* @__PURE__ */ r.jsxs(
|
|
1463
1465
|
Je,
|
|
1464
1466
|
{
|
|
1465
|
-
to: l(
|
|
1467
|
+
to: l(f),
|
|
1466
1468
|
className: w("search-item d-flex gap-3 align-items-center justify-content-between", Ge.item),
|
|
1467
1469
|
onClick: n,
|
|
1468
1470
|
children: [
|
|
1469
|
-
/* @__PURE__ */ r.jsx(X, { variant: "body2", className: "text-nowrap text-truncate", children:
|
|
1471
|
+
/* @__PURE__ */ r.jsx(X, { variant: "body2", className: "text-nowrap text-truncate", children: f.name }),
|
|
1470
1472
|
/* @__PURE__ */ r.jsx(X, { variant: "caption", className: "text-primary", children: /* @__PURE__ */ r.jsx(ss, {}) })
|
|
1471
1473
|
]
|
|
1472
1474
|
},
|
|
@@ -1485,7 +1487,7 @@ const Zo = "_wrapper_1kgb8_1", Jo = "_open_1kgb8_9", Xo = "_dropdown_1kgb8_13",
|
|
|
1485
1487
|
"submit-button": "_submit-button_1lkfy_20",
|
|
1486
1488
|
submitButton: Ii
|
|
1487
1489
|
}, Di = (e, t) => {
|
|
1488
|
-
const n = Xe(), [a, s] = O(!1), [o, i] = O([]), c = !e || !e.key, l =
|
|
1490
|
+
const n = Xe(), [a, s] = O(!1), [o, i] = O([]), c = !e || !e.key, l = C(() => {
|
|
1489
1491
|
if (t.length < 3) {
|
|
1490
1492
|
i([]);
|
|
1491
1493
|
return;
|
|
@@ -1500,25 +1502,25 @@ const Zo = "_wrapper_1kgb8_1", Jo = "_open_1kgb8_9", Xo = "_dropdown_1kgb8_13",
|
|
|
1500
1502
|
l();
|
|
1501
1503
|
}, [l]), { isLoading: a, searchItems: o };
|
|
1502
1504
|
}, id = ({ searchTypes: e, navigateFunction: t, currentPath: n, homePath: a = "/" }) => {
|
|
1503
|
-
var
|
|
1504
|
-
const { texts: { appSearch: s } } = Z(pe), [o, i] = O(e.length > 0 ? ((
|
|
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 = te(() => e.find((y) => y.key === o) ?? null, [e, o]), [l, u] = O(""), [d, f] = sa(l, 500), { isLoading: x, searchItems: v } = Di(c, d), [g, h] = O(!1);
|
|
1505
1507
|
A(() => {
|
|
1506
|
-
(v.length > 0 || x) &&
|
|
1508
|
+
(v.length > 0 || x) && h(!0);
|
|
1507
1509
|
}, [v, x]);
|
|
1508
1510
|
const p = ee(null);
|
|
1509
1511
|
return A(() => {
|
|
1510
|
-
var
|
|
1511
|
-
u(""), n === a && ((
|
|
1512
|
-
}, [n, a]), /* @__PURE__ */ r.jsx(be, { onSubmit: (
|
|
1513
|
-
|
|
1512
|
+
var y;
|
|
1513
|
+
u(""), n === a && ((y = p.current) == null || y.focus());
|
|
1514
|
+
}, [n, a]), /* @__PURE__ */ r.jsx(be, { onSubmit: (y) => {
|
|
1515
|
+
y.preventDefault(), y.stopPropagation(), f.flush(), h(!1), l.length > 2 && t(`/search?query=${l}${c && c.key && `&type=${c == null ? void 0 : c.key}`}`);
|
|
1514
1516
|
}, children: /* @__PURE__ */ r.jsxs(Nt, { className: Ye.inputGroup, children: [
|
|
1515
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 }) }),
|
|
1516
|
-
/* @__PURE__ */ r.jsx(be.Control, { ref: p, placeholder: s.searchPlaceholder, type: "text", size: "sm", className: w("luminus-app-search-input", Ye.input), value: l, onChange: (
|
|
1517
|
-
var
|
|
1518
|
-
return u(((
|
|
1519
|
-
}, onFocus: () => v.length > 0 &&
|
|
1518
|
+
/* @__PURE__ */ r.jsx(be.Control, { ref: p, placeholder: s.searchPlaceholder, type: "text", size: "sm", className: w("luminus-app-search-input", Ye.input), value: l, onChange: (y) => {
|
|
1519
|
+
var m;
|
|
1520
|
+
return u(((m = y.target) == null ? void 0 : m.value) ?? "");
|
|
1521
|
+
}, onFocus: () => v.length > 0 && h(!0) }),
|
|
1520
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, {}) }) }),
|
|
1521
|
-
/* @__PURE__ */ r.jsx(wi, { query: d, searchTypes: e, show:
|
|
1523
|
+
/* @__PURE__ */ r.jsx(wi, { query: d, searchTypes: e, show: g, onCancel: () => h(!1), groups: v, isLoading: x })
|
|
1522
1524
|
] }) });
|
|
1523
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 = {
|
|
1524
1526
|
card: $i,
|
|
@@ -1531,11 +1533,11 @@ const Zo = "_wrapper_1kgb8_1", Jo = "_open_1kgb8_9", Xo = "_dropdown_1kgb8_13",
|
|
|
1531
1533
|
collapsed: Li,
|
|
1532
1534
|
content: Ri
|
|
1533
1535
|
}, Ai = ({ title: e, headerContent: t, children: n, className: a, headerClassName: s, contentClassName: o, dontRenderIfNoChildren: i, ...c }) => {
|
|
1534
|
-
const l = c.collapsible ? c.controlled ? !1 : c.defaultOpen ?? !1 : !0, [u, d] = O(l),
|
|
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;
|
|
1535
1537
|
A(() => {
|
|
1536
1538
|
d(l);
|
|
1537
1539
|
}, [l]);
|
|
1538
|
-
const x =
|
|
1540
|
+
const x = te(() => !n || !n.toString() || n.toString().split(",").filter((v) => v && v !== "false").length === 0, [n]);
|
|
1539
1541
|
return i && x ? null : /* @__PURE__ */ r.jsxs("div", { className: w("luminus-card rounded shadow-sm", Ke.card, {
|
|
1540
1542
|
[a ?? ""]: a
|
|
1541
1543
|
}), children: [
|
|
@@ -1549,10 +1551,10 @@ const Zo = "_wrapper_1kgb8_1", Jo = "_open_1kgb8_9", Xo = "_dropdown_1kgb8_13",
|
|
|
1549
1551
|
t ?? null
|
|
1550
1552
|
] }),
|
|
1551
1553
|
c.collapsible && /* @__PURE__ */ r.jsx(pr, { className: w(Ke.collapseIcon, {
|
|
1552
|
-
[Ke.collapsed]:
|
|
1554
|
+
[Ke.collapsed]: f
|
|
1553
1555
|
}) })
|
|
1554
1556
|
] }),
|
|
1555
|
-
/* @__PURE__ */ r.jsx(Dr, { in:
|
|
1557
|
+
/* @__PURE__ */ r.jsx(Dr, { in: f, children: /* @__PURE__ */ r.jsx("div", { className: w("card-content border-top border-primary", Ke.content, {
|
|
1556
1558
|
[o ?? ""]: o
|
|
1557
1559
|
}), children: n }) })
|
|
1558
1560
|
] });
|
|
@@ -1598,7 +1600,7 @@ var oa = function(e) {
|
|
|
1598
1600
|
return Mi ? (!this.props.node && !this.defaultNode && (this.defaultNode = document.createElement("div"), document.body.appendChild(this.defaultNode)), It.createPortal(this.props.children, this.props.node || this.defaultNode)) : null;
|
|
1599
1601
|
}
|
|
1600
1602
|
}]), t;
|
|
1601
|
-
}(
|
|
1603
|
+
}(Ce.Component);
|
|
1602
1604
|
oa.propTypes = {
|
|
1603
1605
|
children: kt.node.isRequired,
|
|
1604
1606
|
node: kt.any
|
|
@@ -1653,7 +1655,7 @@ var ia = function(e) {
|
|
|
1653
1655
|
value: function(a) {
|
|
1654
1656
|
!this.props.node && !this.defaultNode && (this.defaultNode = document.createElement("div"), document.body.appendChild(this.defaultNode));
|
|
1655
1657
|
var s = this.props.children;
|
|
1656
|
-
typeof this.props.children.type == "function" && (s =
|
|
1658
|
+
typeof this.props.children.type == "function" && (s = Ce.cloneElement(this.props.children)), this.portal = It.unstable_renderSubtreeIntoContainer(this, s, this.props.node || this.defaultNode);
|
|
1657
1659
|
}
|
|
1658
1660
|
}, {
|
|
1659
1661
|
key: "render",
|
|
@@ -1661,7 +1663,7 @@ var ia = function(e) {
|
|
|
1661
1663
|
return null;
|
|
1662
1664
|
}
|
|
1663
1665
|
}]), t;
|
|
1664
|
-
}(
|
|
1666
|
+
}(Ce.Component);
|
|
1665
1667
|
ia.propTypes = {
|
|
1666
1668
|
children: kt.node.isRequired,
|
|
1667
1669
|
node: kt.any
|
|
@@ -1689,75 +1691,75 @@ const Yi = "_lightbox_14acg_1", Ki = "_show_14acg_16", qi = "_header_14acg_20",
|
|
|
1689
1691
|
show: al
|
|
1690
1692
|
}, la = ({ show: e, onClick: t }) => /* @__PURE__ */ r.jsx("div", { className: w("luminus-backdrop", Wn.backdrop, {
|
|
1691
1693
|
[Wn.show]: e
|
|
1692
|
-
}), 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:
|
|
1693
|
-
const x = ee(null), [v,
|
|
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 x = ee(null), [v, g] = O(a), h = n.at(v), p = v > 0, b = v < n.length - 1;
|
|
1694
1696
|
A(() => {
|
|
1695
|
-
e &&
|
|
1697
|
+
e && g(a);
|
|
1696
1698
|
}, [a, e]), A(() => {
|
|
1697
|
-
v >= n.length &&
|
|
1699
|
+
v >= n.length && g(n.length - 1);
|
|
1698
1700
|
}, [n, v]);
|
|
1699
|
-
const
|
|
1700
|
-
switch (
|
|
1701
|
+
const y = C((m) => {
|
|
1702
|
+
switch (m.key) {
|
|
1701
1703
|
case "ArrowLeft":
|
|
1702
|
-
|
|
1704
|
+
m.stopPropagation(), p && g((j) => j - 1);
|
|
1703
1705
|
break;
|
|
1704
1706
|
case "ArrowRight":
|
|
1705
|
-
|
|
1707
|
+
m.stopPropagation(), b && g((j) => j + 1);
|
|
1706
1708
|
break;
|
|
1707
1709
|
case "Escape":
|
|
1708
|
-
|
|
1710
|
+
m.stopPropagation(), t();
|
|
1709
1711
|
break;
|
|
1710
1712
|
}
|
|
1711
|
-
}, [
|
|
1712
|
-
return kr(
|
|
1713
|
+
}, [b, p, t]);
|
|
1714
|
+
return kr(y), /* @__PURE__ */ r.jsxs(an, { children: [
|
|
1713
1715
|
/* @__PURE__ */ r.jsx(la, { show: e, onClick: t }),
|
|
1714
1716
|
/* @__PURE__ */ r.jsx("div", { ref: x, className: w("luminus-lightbox rounded shadow", Ie.lightbox, {
|
|
1715
1717
|
[Ie.show]: e
|
|
1716
1718
|
}), children: e && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1717
1719
|
/* @__PURE__ */ r.jsxs("div", { className: Ie.header, children: [
|
|
1718
1720
|
/* @__PURE__ */ r.jsxs("div", { className: w("rounded", Ie.photoActions), children: [
|
|
1719
|
-
i && /* @__PURE__ */ r.jsx(aa, { accept: ".jpg,.jpeg,.png", onUpload: (
|
|
1720
|
-
|
|
1721
|
+
i && /* @__PURE__ */ r.jsx(aa, { accept: ".jpg,.jpeg,.png", onUpload: (m) => {
|
|
1722
|
+
m.length > 0 && i(Array.from(m));
|
|
1721
1723
|
}, icon: /* @__PURE__ */ r.jsx(vr, { style: { fontSize: 18 } }), multiple: !0, className: "me-3", children: s ?? null }),
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
+
h && (c == null ? void 0 : c.map(({ label: m, onClick: j, ...N }, I) => /* @__PURE__ */ r.jsx(
|
|
1725
|
+
Le,
|
|
1724
1726
|
{
|
|
1725
|
-
onClick: () =>
|
|
1727
|
+
onClick: () => j(h.id),
|
|
1726
1728
|
...N,
|
|
1727
|
-
children:
|
|
1729
|
+
children: m
|
|
1728
1730
|
},
|
|
1729
|
-
`action-${
|
|
1731
|
+
`action-${I}`
|
|
1730
1732
|
)))
|
|
1731
1733
|
] }),
|
|
1732
|
-
/* @__PURE__ */ r.jsx("div", { role: "button", onClick: t, children: /* @__PURE__ */ r.jsx(
|
|
1734
|
+
/* @__PURE__ */ r.jsx("div", { role: "button", onClick: t, children: /* @__PURE__ */ r.jsx(Oe, { style: { fontSize: "32px" } }) })
|
|
1733
1735
|
] }),
|
|
1734
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" }) }),
|
|
1735
|
-
|
|
1736
|
-
/* @__PURE__ */ r.jsx("div", { role: p ? "button" : void 0, className: w("align-items-start", Ie.navButton), onClick: () => p &&
|
|
1737
|
-
/* @__PURE__ */ r.jsx(
|
|
1738
|
-
/* @__PURE__ */ r.jsx("div", { role:
|
|
1737
|
+
h && /* @__PURE__ */ r.jsxs("div", { className: Ie.photoContainer, children: [
|
|
1738
|
+
/* @__PURE__ */ r.jsx("div", { role: p ? "button" : void 0, className: w("align-items-start", Ie.navButton), onClick: () => p && g((m) => m - 1), children: p && /* @__PURE__ */ r.jsx(cn, { style: { fontSize: "40px" } }) }),
|
|
1739
|
+
/* @__PURE__ */ r.jsx(f, { src: h.lgSrc, alt: h.alt, className: w("rounded", Ie.photo), baseUrl: l, customToken: u, placeholder: d }),
|
|
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" } }) })
|
|
1739
1741
|
] }),
|
|
1740
|
-
/* @__PURE__ */ r.jsx("div", { className: Ie.photosPreview, children: n.map((
|
|
1741
|
-
/* @__PURE__ */ r.jsx(
|
|
1742
|
-
[Ie.selected]:
|
|
1743
|
-
}), baseUrl: l, customToken: u, placeholder: d },
|
|
1744
|
-
|
|
1742
|
+
/* @__PURE__ */ r.jsx("div", { className: Ie.photosPreview, children: n.map((m, j) => /* @__PURE__ */ r.jsxs("div", { role: "button", onClick: () => g(j), className: "position-relative", children: [
|
|
1743
|
+
/* @__PURE__ */ r.jsx(f, { role: j !== v ? "button" : void 0, src: m.smSrc, alt: m.alt, className: w("rounded", Ie.photo, {
|
|
1744
|
+
[Ie.selected]: j === v
|
|
1745
|
+
}), baseUrl: l, customToken: u, placeholder: d }, m.id),
|
|
1746
|
+
m.isDefault && /* @__PURE__ */ r.jsx("div", { className: w("text-primary", Ie.defaultIndicator), children: /* @__PURE__ */ r.jsx(is, {}) })
|
|
1745
1747
|
] })) })
|
|
1746
1748
|
] }) })
|
|
1747
1749
|
] });
|
|
1748
1750
|
}, ol = ({ photos: e, onUploadPhotos: t, uploadPhotosText: n, noPhotosText: a, photoActions: s, baseUrl: o, customToken: i, placeholder: c, ImgComponent: l = ca, noLightboxOnlyButtonOnEmpty: u = !1 }) => {
|
|
1749
|
-
const [d,
|
|
1751
|
+
const [d, f] = O(null), x = d !== null ? e[d] : null, [v, g] = O(!1);
|
|
1750
1752
|
return A(() => {
|
|
1751
1753
|
if (e.length === 0) {
|
|
1752
|
-
|
|
1754
|
+
f(null), g(!1);
|
|
1753
1755
|
return;
|
|
1754
1756
|
}
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1757
|
-
}, [e]), !x && t && u ? /* @__PURE__ */ r.jsx(aa, { accept: ".jpg,.jpeg,.png", onUpload: (
|
|
1758
|
-
|
|
1757
|
+
const h = e.findIndex((p) => p.isDefault);
|
|
1758
|
+
f(h > -1 ? h : 0);
|
|
1759
|
+
}, [e]), !x && t && u ? /* @__PURE__ */ r.jsx(aa, { accept: ".jpg,.jpeg,.png", onUpload: (h) => {
|
|
1760
|
+
h.length > 0 && t(Array.from(h));
|
|
1759
1761
|
}, icon: /* @__PURE__ */ r.jsx(vr, { style: { fontSize: 18 } }), multiple: !0, children: n ?? null }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1760
|
-
x ? /* @__PURE__ */ r.jsxs("div", { role: "button", className: "w-100 position-relative", onClick: () =>
|
|
1762
|
+
x ? /* @__PURE__ */ r.jsxs("div", { role: "button", className: "w-100 position-relative", onClick: () => g(!0), children: [
|
|
1761
1763
|
/* @__PURE__ */ r.jsx(l, { src: x.smSrc, alt: x.alt, className: "rounded w-100", baseUrl: o, customToken: i, placeholder: c }),
|
|
1762
1764
|
e.length > 1 && /* @__PURE__ */ r.jsx("div", { className: "position-absolute rounded p-1", style: {
|
|
1763
1765
|
top: 0,
|
|
@@ -1766,8 +1768,8 @@ const Yi = "_lightbox_14acg_1", Ki = "_show_14acg_16", qi = "_header_14acg_20",
|
|
|
1766
1768
|
textShadow: "-2px 2px 4px #696969",
|
|
1767
1769
|
background: "rgba(105,105,105,0.5)"
|
|
1768
1770
|
}, children: /* @__PURE__ */ r.jsx(ls, { fontSize: 24 }) })
|
|
1769
|
-
] }) : /* @__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: () =>
|
|
1770
|
-
/* @__PURE__ */ r.jsx(sl, { show: v, onClose: () =>
|
|
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: v, onClose: () => g(!1), photos: e, defaultIndex: d ?? 0, uploadPhotosText: n, noPhotosText: a, onUploadPhotos: t, photoActions: s, baseUrl: o, customToken: i, placeholder: c, ImgComponent: l })
|
|
1771
1773
|
] });
|
|
1772
1774
|
}, ld = ({ children: e }) => {
|
|
1773
1775
|
var c, l, u;
|
|
@@ -1789,7 +1791,7 @@ const Yi = "_lightbox_14acg_1", Ki = "_show_14acg_16", qi = "_header_14acg_20",
|
|
|
1789
1791
|
"type-icon": "_type-icon_1lf6j_28",
|
|
1790
1792
|
typeIcon: fl
|
|
1791
1793
|
}, ml = ({ level: e, children: t, customIcon: n, noIcon: a }) => {
|
|
1792
|
-
const { ProjectIconComponent: s } = Z(pe), o =
|
|
1794
|
+
const { ProjectIconComponent: s } = Z(pe), o = C(() => {
|
|
1793
1795
|
switch (e) {
|
|
1794
1796
|
case "info":
|
|
1795
1797
|
return /* @__PURE__ */ r.jsx(s, { icon: "info" });
|
|
@@ -1851,12 +1853,12 @@ const Yi = "_lightbox_14acg_1", Ki = "_show_14acg_16", qi = "_header_14acg_20",
|
|
|
1851
1853
|
/* @__PURE__ */ r.jsx("div", { className: w("text-primary", qe.stepIcon), children: t.icon ?? /* @__PURE__ */ r.jsx(fs, {}) })
|
|
1852
1854
|
] }) })
|
|
1853
1855
|
] }, n)) }), Nl = (e, t, n, a = !0) => {
|
|
1854
|
-
const s = Xe({ silent: a, differentBaseUrl: t, customToken: n }), [o, i] = O(!1), [c, l] = O(null), u =
|
|
1856
|
+
const s = Xe({ silent: a, differentBaseUrl: t, customToken: n }), [o, i] = O(!1), [c, l] = O(null), u = C(async (d) => {
|
|
1855
1857
|
i(!0), l(null), s.get(e, {
|
|
1856
1858
|
signal: d,
|
|
1857
1859
|
responseType: "blob"
|
|
1858
|
-
}).then((
|
|
1859
|
-
i(!1), l(
|
|
1860
|
+
}).then((f) => {
|
|
1861
|
+
i(!1), l(f.data);
|
|
1860
1862
|
}).catch(() => {
|
|
1861
1863
|
i(!1), l(null);
|
|
1862
1864
|
});
|
|
@@ -1884,39 +1886,39 @@ const Yi = "_lightbox_14acg_1", Ki = "_show_14acg_16", qi = "_header_14acg_20",
|
|
|
1884
1886
|
const d = ee(null);
|
|
1885
1887
|
return A(() => {
|
|
1886
1888
|
d.current && (d.current.indeterminate = u ?? !1);
|
|
1887
|
-
}, [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: (
|
|
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) => {
|
|
1888
1890
|
var x;
|
|
1889
|
-
a && a(((x =
|
|
1891
|
+
a && a(((x = f.target) == null ? void 0 : x.checked) ?? !1);
|
|
1890
1892
|
}, className: i ?? "", hidden: s ?? !1, disabled: o ?? !1 }) });
|
|
1891
|
-
}, 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:
|
|
1892
|
-
const
|
|
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: x, list: v, className: g, step: h, noSelectOnFocus: p }) => {
|
|
1894
|
+
const b = t === "number", y = C(() => {
|
|
1893
1895
|
if (!a)
|
|
1894
1896
|
return;
|
|
1895
|
-
const
|
|
1896
|
-
a(
|
|
1897
|
-
}, [x,
|
|
1898
|
-
const _ =
|
|
1899
|
-
a && (
|
|
1900
|
-
}, [
|
|
1901
|
-
var
|
|
1902
|
-
const _ = (
|
|
1897
|
+
const $ = x ?? null;
|
|
1898
|
+
a(b ? $ ? Number($) : null : ($ == null ? void 0 : $.toString()) ?? "");
|
|
1899
|
+
}, [x, b, a]), m = ee(null), [j, N] = O((n == null ? void 0 : n.toString()) ?? ""), I = C(($) => {
|
|
1900
|
+
const _ = $;
|
|
1901
|
+
a && (b && a(_ == null || _ === "" ? null : Number(_)), a(_ || null));
|
|
1902
|
+
}, [b, a]), D = C(($) => {
|
|
1903
|
+
var P;
|
|
1904
|
+
const _ = (P = $.target) == null ? void 0 : P.value;
|
|
1903
1905
|
if (!s) {
|
|
1904
|
-
|
|
1906
|
+
I(_);
|
|
1905
1907
|
return;
|
|
1906
1908
|
}
|
|
1907
|
-
N(_),
|
|
1908
|
-
|
|
1909
|
+
N(_), m.current !== null && window.clearTimeout(m.current), m.current = window.setTimeout(() => {
|
|
1910
|
+
I(_);
|
|
1909
1911
|
}, s);
|
|
1910
|
-
}, [s,
|
|
1912
|
+
}, [s, I]);
|
|
1911
1913
|
A(() => {
|
|
1912
1914
|
N(n === null ? "" : n.toString());
|
|
1913
1915
|
}, [n]);
|
|
1914
|
-
const [
|
|
1915
|
-
return /* @__PURE__ */ r.jsxs(e, { withoutLabel: i, label: o ?? "", hidden: u, className:
|
|
1916
|
-
/* @__PURE__ */ r.jsx(be.Control, { type:
|
|
1917
|
-
|
|
1918
|
-
}, onBlur: () =>
|
|
1919
|
-
|
|
1916
|
+
const [k, F] = O(!1), S = ms(t, n ? n.toString() ?? null : null, k);
|
|
1917
|
+
return /* @__PURE__ */ r.jsxs(e, { withoutLabel: i, label: o ?? "", hidden: u, className: g, children: [
|
|
1918
|
+
/* @__PURE__ */ r.jsx(be.Control, { type: S, placeholder: c ?? o, size: l, value: s ? j : (n == null ? void 0 : n.toString()) ?? "", onChange: D, className: g ?? "", hidden: u, disabled: d ?? !1, list: v, onFocus: ($) => {
|
|
1919
|
+
F(!0), !p && $.target.select();
|
|
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(ne, { color: "secondary", size: "sm", onClick: y, children: /* @__PURE__ */ r.jsx(Oe, {}) }) })
|
|
1920
1922
|
] });
|
|
1921
1923
|
}, Dt = ({
|
|
1922
1924
|
InputContainer: e = et,
|
|
@@ -1930,130 +1932,130 @@ const Yi = "_lightbox_14acg_1", Ki = "_show_14acg_16", qi = "_header_14acg_20",
|
|
|
1930
1932
|
hidden: l,
|
|
1931
1933
|
disabled: u,
|
|
1932
1934
|
showClearIcon: d,
|
|
1933
|
-
clearValue:
|
|
1935
|
+
clearValue: f,
|
|
1934
1936
|
noSortOptions: x,
|
|
1935
1937
|
className: v,
|
|
1936
|
-
noEmptyOption:
|
|
1938
|
+
noEmptyOption: g
|
|
1937
1939
|
// it will still add the empty option if there is no value provided or value is empty string or null
|
|
1938
1940
|
}) => {
|
|
1939
|
-
const
|
|
1941
|
+
const h = C(() => {
|
|
1940
1942
|
if (!a)
|
|
1941
1943
|
return;
|
|
1942
|
-
const p =
|
|
1944
|
+
const p = f ?? null;
|
|
1943
1945
|
a(i ? p ? Number(p) : null : (p == null ? void 0 : p.toString()) ?? "");
|
|
1944
|
-
}, [
|
|
1946
|
+
}, [f, i, a]);
|
|
1945
1947
|
return /* @__PURE__ */ r.jsxs(e, { withoutLabel: o, label: s ?? "", hidden: l, className: v, children: [
|
|
1946
1948
|
/* @__PURE__ */ r.jsxs(be.Select, { size: c, value: t ?? "", onChange: (p) => {
|
|
1947
|
-
var
|
|
1949
|
+
var y;
|
|
1948
1950
|
if (!a)
|
|
1949
1951
|
return;
|
|
1950
|
-
const
|
|
1951
|
-
i && a(
|
|
1952
|
+
const b = (y = p.target) == null ? void 0 : y.value;
|
|
1953
|
+
i && a(b ? parseInt(b, 10) : null), a(b || null);
|
|
1952
1954
|
}, className: v ?? "", hidden: l, disabled: u ?? !1, children: [
|
|
1953
|
-
|
|
1954
|
-
n == null ? void 0 : n.sort((p,
|
|
1955
|
+
g && !(t == null || t === "") ? void 0 : /* @__PURE__ */ r.jsx("option", { value: "" }),
|
|
1956
|
+
n == null ? void 0 : n.sort((p, b) => x ? 0 : (p.name ?? "").localeCompare(b.name ?? "")).map((p) => /* @__PURE__ */ r.jsx("option", { value: p.id ?? "", children: p.name }, p.id))
|
|
1955
1957
|
] }),
|
|
1956
|
-
d && t && a && !u && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ r.jsx(
|
|
1958
|
+
d && t && a && !u && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ r.jsx(ne, { color: "secondary", size: "sm", onClick: h, children: /* @__PURE__ */ r.jsx(Oe, {}) }) })
|
|
1957
1959
|
] });
|
|
1958
|
-
}, 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:
|
|
1959
|
-
var
|
|
1960
|
-
const [
|
|
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: x, additionalColumns: v, hidden: g, disabled: h, displayIdAsName: p, CustomOnChangeComponent: b, className: y, archiveColumn: m }) => {
|
|
1961
|
+
var P, U;
|
|
1962
|
+
const [j, N] = O(n), [I, D] = O(!1);
|
|
1961
1963
|
A(() => {
|
|
1962
|
-
|
|
1964
|
+
N((n == null ? void 0 : n.id) == null && (n == null ? void 0 : n.name) == null ? null : { id: n.id, name: n.name });
|
|
1963
1965
|
}, [n == null ? void 0 : n.id, n == null ? void 0 : n.name]);
|
|
1964
|
-
const
|
|
1965
|
-
|
|
1966
|
-
}, []),
|
|
1967
|
-
|
|
1968
|
-
}, [
|
|
1966
|
+
const k = C((H) => {
|
|
1967
|
+
N(H);
|
|
1968
|
+
}, []), F = C((H) => {
|
|
1969
|
+
D(!1), k(H);
|
|
1970
|
+
}, [k]);
|
|
1969
1971
|
A(() => {
|
|
1970
|
-
l && l(
|
|
1971
|
-
}, [
|
|
1972
|
-
const
|
|
1973
|
-
return /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsxs(e, { withoutLabel: d, label: u ?? "", hidden:
|
|
1974
|
-
/* @__PURE__ */ r.jsxs(ua, { currentSelection:
|
|
1975
|
-
p && (
|
|
1976
|
-
/* @__PURE__ */ r.jsxs(be.Select, { ref:
|
|
1977
|
-
id: c ? Number(
|
|
1972
|
+
l && l(j);
|
|
1973
|
+
}, [j, l]);
|
|
1974
|
+
const S = ee(null), $ = a !== void 0, _ = $ && j !== null;
|
|
1975
|
+
return /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsxs(e, { withoutLabel: d, label: u ?? "", hidden: g, inputContainerClassName: w({ "luminus-dropdown-select-open": I }), className: y, children: [
|
|
1976
|
+
/* @__PURE__ */ r.jsxs(ua, { currentSelection: j, selectedItemNavigateTo: a, children: [
|
|
1977
|
+
p && (j == null ? void 0 : j.name) && /* @__PURE__ */ r.jsx(X, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: j.name }),
|
|
1978
|
+
/* @__PURE__ */ r.jsxs(be.Select, { ref: S, size: f, value: (j == null ? void 0 : j.id) ?? "", onChange: (H) => N({
|
|
1979
|
+
id: c ? Number(H.target.value) ?? null : H.target.value,
|
|
1978
1980
|
name: ""
|
|
1979
|
-
}), onMouseDown: (
|
|
1980
|
-
|
|
1981
|
+
}), onMouseDown: (H) => {
|
|
1982
|
+
H.currentTarget.focus(), H.preventDefault();
|
|
1981
1983
|
}, onClick: () => {
|
|
1982
|
-
|
|
1984
|
+
!$ && !h && D(!0);
|
|
1983
1985
|
}, className: w("w-100", {
|
|
1984
|
-
"luminus-dropdown-picker-disabled":
|
|
1985
|
-
"luminus-dropdown-picker-link":
|
|
1986
|
-
}), hidden:
|
|
1986
|
+
"luminus-dropdown-picker-disabled": h,
|
|
1987
|
+
"luminus-dropdown-picker-link": _
|
|
1988
|
+
}), hidden: g, children: [
|
|
1987
1989
|
/* @__PURE__ */ r.jsx("option", { value: "" }),
|
|
1988
|
-
n && /* @__PURE__ */ r.jsx("option", { value: n.id ?? void 0, children: n.name && ((
|
|
1989
|
-
|
|
1990
|
+
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
|
+
j && /* @__PURE__ */ r.jsx("option", { value: j.id ?? void 0, children: j.name && ((U = j.name) == null ? void 0 : U.length) > 0 ? j.name : j.id })
|
|
1990
1992
|
] }),
|
|
1991
|
-
|
|
1992
|
-
!
|
|
1993
|
-
|
|
1993
|
+
b || !h && $ ? /* @__PURE__ */ r.jsxs("div", { className: "custom-picker-button", children: [
|
|
1994
|
+
!b && !h && $ && /* @__PURE__ */ r.jsx(ne, { size: "sm", color: "secondary", onClick: (H) => {
|
|
1995
|
+
H.preventDefault(), H.stopPropagation(), D(!0);
|
|
1994
1996
|
}, children: /* @__PURE__ */ r.jsx(yr, {}) }),
|
|
1995
|
-
|
|
1997
|
+
b ?? null
|
|
1996
1998
|
] }) : null
|
|
1997
1999
|
] }),
|
|
1998
|
-
|
|
2000
|
+
S.current && /* @__PURE__ */ r.jsx(jn, { show: I, onCancel: () => D(!1), items: t, currentSelection: j, onSelectionChange: F, onSearchQueryChange: s, texts: o, itemsNameWidth: x, additionalColumns: v, isLoading: i, disabled: h, inputRef: S, archiveColumn: m })
|
|
1999
2001
|
] }) });
|
|
2000
|
-
}, 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:
|
|
2001
|
-
const v =
|
|
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: x }) => {
|
|
2003
|
+
const v = C(() => {
|
|
2002
2004
|
if (!n)
|
|
2003
2005
|
return;
|
|
2004
|
-
const
|
|
2005
|
-
n((
|
|
2006
|
-
}, [i, n]),
|
|
2007
|
-
const
|
|
2008
|
-
n && n(
|
|
2009
|
-
}, [n]),
|
|
2006
|
+
const m = i ?? null;
|
|
2007
|
+
n((m == null ? void 0 : m.toString()) ?? "");
|
|
2008
|
+
}, [i, n]), g = ee(null), [h, p] = O((t == null ? void 0 : t.toString()) ?? ""), b = C((m) => {
|
|
2009
|
+
const j = m;
|
|
2010
|
+
n && n(j || null);
|
|
2011
|
+
}, [n]), y = C((m) => {
|
|
2010
2012
|
var N;
|
|
2011
|
-
const
|
|
2012
|
-
if (!
|
|
2013
|
-
|
|
2013
|
+
const j = (N = m.target) == null ? void 0 : N.value;
|
|
2014
|
+
if (!f) {
|
|
2015
|
+
b(j);
|
|
2014
2016
|
return;
|
|
2015
2017
|
}
|
|
2016
|
-
p(
|
|
2017
|
-
|
|
2018
|
-
},
|
|
2019
|
-
}, [
|
|
2018
|
+
p(j), g.current !== null && window.clearTimeout(g.current), g.current = window.setTimeout(() => {
|
|
2019
|
+
b(j);
|
|
2020
|
+
}, f);
|
|
2021
|
+
}, [f, b]);
|
|
2020
2022
|
return A(() => {
|
|
2021
2023
|
p(t === null ? "" : t.toString());
|
|
2022
2024
|
}, [t]), /* @__PURE__ */ r.jsxs(e, { label: a ?? "", hidden: c, withoutLabel: d, className: x, isForTextAreaInput: !0, children: [
|
|
2023
|
-
/* @__PURE__ */ r.jsx(be.Control, { as: "textarea", size: s, value:
|
|
2024
|
-
o && t && n && !l && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r.jsx(
|
|
2025
|
+
/* @__PURE__ */ r.jsx(be.Control, { as: "textarea", size: s, value: f ? h : t ?? "", onChange: y, hidden: c, disabled: l, rows: u ?? 2, className: "w-100" }),
|
|
2026
|
+
o && t && n && !l && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r.jsx(ne, { color: "secondary", size: "sm", onClick: v, children: /* @__PURE__ */ r.jsx(Oe, {}) }) })
|
|
2025
2027
|
] });
|
|
2026
|
-
}, 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:
|
|
2027
|
-
const
|
|
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: x, step: v, stepperStep: g = 1, min: h, max: p }) => {
|
|
2029
|
+
const b = C(() => {
|
|
2028
2030
|
if (!n)
|
|
2029
2031
|
return;
|
|
2030
|
-
const D =
|
|
2032
|
+
const D = f ?? null;
|
|
2031
2033
|
n(D ? Number(D) : null);
|
|
2032
|
-
}, [
|
|
2033
|
-
const
|
|
2034
|
-
n && n(
|
|
2035
|
-
}, [p,
|
|
2036
|
-
var
|
|
2037
|
-
const
|
|
2034
|
+
}, [f, n]), y = ee(null), [m, j] = O((t == null ? void 0 : t.toString()) ?? ""), N = C((D) => {
|
|
2035
|
+
const k = D;
|
|
2036
|
+
n && n(k == null || k === "" ? null : ht(Number(k), h, p));
|
|
2037
|
+
}, [p, h, n]), I = C((D) => {
|
|
2038
|
+
var F;
|
|
2039
|
+
const k = (F = D.target) == null ? void 0 : F.value;
|
|
2038
2040
|
if (!a) {
|
|
2039
|
-
N(
|
|
2041
|
+
N(k);
|
|
2040
2042
|
return;
|
|
2041
2043
|
}
|
|
2042
|
-
|
|
2043
|
-
N(
|
|
2044
|
+
j(ht(Number(k), h, p).toString()), y.current !== null && window.clearTimeout(y.current), y.current = window.setTimeout(() => {
|
|
2045
|
+
N(k);
|
|
2044
2046
|
}, a);
|
|
2045
|
-
}, [a, N, p,
|
|
2047
|
+
}, [a, N, p, h]);
|
|
2046
2048
|
return A(() => {
|
|
2047
|
-
|
|
2048
|
-
}, [p,
|
|
2049
|
-
/* @__PURE__ */ r.jsx(be.Control, { type: "number", placeholder: i ?? s, size: c, value: a ?
|
|
2050
|
-
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ r.jsx(
|
|
2051
|
-
D.preventDefault(), D.stopPropagation(), N(((t ?? 0) -
|
|
2049
|
+
j(t === null ? "" : ht(t, h, p).toString());
|
|
2050
|
+
}, [p, h, t]), /* @__PURE__ */ r.jsx(e, { withoutLabel: o, label: s ?? "", hidden: l, className: x, children: /* @__PURE__ */ r.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
2051
|
+
/* @__PURE__ */ r.jsx(be.Control, { type: "number", placeholder: i ?? s, size: c, value: a ? m : t ?? "", onChange: I, className: `luminus-numeric-stepper ${x ?? ""}`, hidden: l, disabled: u ?? !1, step: v }),
|
|
2052
|
+
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ r.jsx(ne, { size: "sm", onClick: (D) => {
|
|
2053
|
+
D.preventDefault(), D.stopPropagation(), N(((t ?? 0) - g).toString());
|
|
2052
2054
|
}, children: /* @__PURE__ */ r.jsx(br, {}) }) }),
|
|
2053
|
-
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ r.jsx(
|
|
2054
|
-
D.preventDefault(), D.stopPropagation(), N(((t ?? 0) +
|
|
2055
|
+
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ r.jsx(ne, { size: "sm", onClick: (D) => {
|
|
2056
|
+
D.preventDefault(), D.stopPropagation(), N(((t ?? 0) + g).toString());
|
|
2055
2057
|
}, children: /* @__PURE__ */ r.jsx(wr, {}) }) }),
|
|
2056
|
-
d && t && n && !u && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r.jsx(
|
|
2058
|
+
d && t && n && !u && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r.jsx(ne, { color: "secondary", size: "sm", onClick: b, children: /* @__PURE__ */ r.jsx(Oe, {}) }) })
|
|
2057
2059
|
] }) });
|
|
2058
2060
|
};
|
|
2059
2061
|
function ma(e, t) {
|
|
@@ -2069,7 +2071,7 @@ var jt;
|
|
|
2069
2071
|
(function(e) {
|
|
2070
2072
|
e.event = "event", e.props = "prop";
|
|
2071
2073
|
})(jt || (jt = {}));
|
|
2072
|
-
function
|
|
2074
|
+
function Ve() {
|
|
2073
2075
|
}
|
|
2074
2076
|
function Cl(e) {
|
|
2075
2077
|
var t, n = void 0;
|
|
@@ -2160,12 +2162,12 @@ function xa(e) {
|
|
|
2160
2162
|
function Yn(e, t, n) {
|
|
2161
2163
|
if (["", "-"].indexOf(e) !== -1)
|
|
2162
2164
|
return e;
|
|
2163
|
-
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("."),
|
|
2164
|
-
o && Number(d[0]) && (
|
|
2165
|
-
return
|
|
2165
|
+
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, p, b) {
|
|
2167
|
+
return h.length > b ? (Number(h[0]) + Number(p)).toString() + h.substring(1, h.length) : p + h;
|
|
2166
2168
|
}, d[0]));
|
|
2167
|
-
var x = pa(d[1] || "", t, n), v = c ? "-" : "",
|
|
2168
|
-
return "" + v +
|
|
2169
|
+
var x = pa(d[1] || "", t, n), v = c ? "-" : "", g = a ? "." : "";
|
|
2170
|
+
return "" + v + f + g + x;
|
|
2169
2171
|
}
|
|
2170
2172
|
function Qe(e, t) {
|
|
2171
2173
|
if (e.value = e.value, e !== null) {
|
|
@@ -2220,33 +2222,33 @@ function Ll(e) {
|
|
|
2220
2222
|
}
|
|
2221
2223
|
function Rl(e, t, n, a, s, o, i) {
|
|
2222
2224
|
i === void 0 && (i = Ll);
|
|
2223
|
-
var c = s.findIndex(function(
|
|
2224
|
-
return
|
|
2225
|
+
var c = s.findIndex(function(j) {
|
|
2226
|
+
return j;
|
|
2225
2227
|
}), l = e.slice(0, c);
|
|
2226
2228
|
!t && !n.startsWith(l) && (t = l, n = l + n, a = a + l.length);
|
|
2227
|
-
for (var u = n.length, d = e.length,
|
|
2229
|
+
for (var u = n.length, d = e.length, f = {}, x = new Array(u), v = 0; v < u; v++) {
|
|
2228
2230
|
x[v] = -1;
|
|
2229
|
-
for (var
|
|
2231
|
+
for (var g = 0, h = d; g < h; g++) {
|
|
2230
2232
|
var p = i({
|
|
2231
2233
|
currentValue: n,
|
|
2232
2234
|
lastValue: t,
|
|
2233
2235
|
formattedValue: e,
|
|
2234
2236
|
currentValueIndex: v,
|
|
2235
|
-
formattedValueIndex:
|
|
2237
|
+
formattedValueIndex: g
|
|
2236
2238
|
});
|
|
2237
|
-
if (p &&
|
|
2238
|
-
x[v] =
|
|
2239
|
+
if (p && f[g] !== !0) {
|
|
2240
|
+
x[v] = g, f[g] = !0;
|
|
2239
2241
|
break;
|
|
2240
2242
|
}
|
|
2241
2243
|
}
|
|
2242
2244
|
}
|
|
2243
|
-
for (var
|
|
2244
|
-
|
|
2245
|
-
var
|
|
2246
|
-
for (
|
|
2247
|
-
|
|
2248
|
-
var
|
|
2249
|
-
return
|
|
2245
|
+
for (var b = a; b < u && (x[b] === -1 || !o(n[b])); )
|
|
2246
|
+
b++;
|
|
2247
|
+
var y = b === u || x[b] === -1 ? d : x[b];
|
|
2248
|
+
for (b = a - 1; b > 0 && x[b] === -1; )
|
|
2249
|
+
b--;
|
|
2250
|
+
var m = b === -1 || x[b] === -1 ? 0 : x[b] + 1;
|
|
2251
|
+
return m > y ? y : a - m < y - a ? m : y;
|
|
2250
2252
|
}
|
|
2251
2253
|
function Kn(e, t, n, a) {
|
|
2252
2254
|
var s = e.length;
|
|
@@ -2269,21 +2271,21 @@ function Al(e) {
|
|
|
2269
2271
|
return t;
|
|
2270
2272
|
}
|
|
2271
2273
|
function ja(e, t, n, a, s, o) {
|
|
2272
|
-
o === void 0 && (o =
|
|
2273
|
-
var i = Dl(function(
|
|
2274
|
-
var p,
|
|
2275
|
-
return ha(
|
|
2274
|
+
o === void 0 && (o = Ve);
|
|
2275
|
+
var i = Dl(function(g, h) {
|
|
2276
|
+
var p, b;
|
|
2277
|
+
return ha(g) ? (b = "", p = "") : typeof g == "number" || h ? (b = typeof g == "number" ? xa(g) : g, p = a(b)) : (b = s(g, void 0), p = a(b)), { formattedValue: p, numAsString: b };
|
|
2276
2278
|
}), c = O(function() {
|
|
2277
2279
|
return i(ot(e) ? t : e, n);
|
|
2278
|
-
}), l = c[0], u = c[1], d = function(
|
|
2279
|
-
|
|
2280
|
-
formattedValue:
|
|
2281
|
-
numAsString:
|
|
2282
|
-
}), o(
|
|
2283
|
-
},
|
|
2284
|
-
ot(e) && (
|
|
2285
|
-
var v = i(
|
|
2286
|
-
return
|
|
2280
|
+
}), l = c[0], u = c[1], d = function(g, h) {
|
|
2281
|
+
g.formattedValue !== l.formattedValue && u({
|
|
2282
|
+
formattedValue: g.formattedValue,
|
|
2283
|
+
numAsString: g.value
|
|
2284
|
+
}), o(g, h);
|
|
2285
|
+
}, f = e, x = n;
|
|
2286
|
+
ot(e) && (f = l.numAsString, x = !0);
|
|
2287
|
+
var v = i(f, x);
|
|
2288
|
+
return te(function() {
|
|
2287
2289
|
u(v);
|
|
2288
2290
|
}, [v.formattedValue]), [l, d];
|
|
2289
2291
|
}
|
|
@@ -2302,149 +2304,149 @@ function Vl(e) {
|
|
|
2302
2304
|
i === void 0 && (i = Bl);
|
|
2303
2305
|
var c = e.removeFormatting;
|
|
2304
2306
|
c === void 0 && (c = Ml);
|
|
2305
|
-
var l = e.defaultValue, u = e.valueIsNumericString, d = e.onValueChange,
|
|
2306
|
-
x === void 0 && (x =
|
|
2307
|
+
var l = e.defaultValue, u = e.valueIsNumericString, d = e.onValueChange, f = e.isAllowed, x = e.onChange;
|
|
2308
|
+
x === void 0 && (x = Ve);
|
|
2307
2309
|
var v = e.onKeyDown;
|
|
2308
|
-
v === void 0 && (v =
|
|
2309
|
-
var
|
|
2310
|
-
|
|
2311
|
-
var
|
|
2312
|
-
|
|
2310
|
+
v === void 0 && (v = Ve);
|
|
2311
|
+
var g = e.onMouseUp;
|
|
2312
|
+
g === void 0 && (g = Ve);
|
|
2313
|
+
var h = e.onFocus;
|
|
2314
|
+
h === void 0 && (h = Ve);
|
|
2313
2315
|
var p = e.onBlur;
|
|
2314
|
-
p === void 0 && (p =
|
|
2315
|
-
var
|
|
2316
|
-
|
|
2317
|
-
var
|
|
2318
|
-
|
|
2319
|
-
var
|
|
2320
|
-
_.current = { formattedValue: T.formattedValue, numAsString: T.value },
|
|
2321
|
-
},
|
|
2316
|
+
p === void 0 && (p = Ve);
|
|
2317
|
+
var b = e.value, y = e.getCaretBoundary;
|
|
2318
|
+
y === void 0 && (y = Al);
|
|
2319
|
+
var m = e.isValidInputCharacter;
|
|
2320
|
+
m === void 0 && (m = yt);
|
|
2321
|
+
var j = e.isCharacterSame, N = ma(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), I = ja(b, l, !!u, i, c, d), D = I[0], k = D.formattedValue, F = D.numAsString, S = I[1], $ = ee(), _ = ee({ formattedValue: k, numAsString: F }), P = function(T, M) {
|
|
2322
|
+
_.current = { formattedValue: T.formattedValue, numAsString: T.value }, S(T, M);
|
|
2323
|
+
}, U = O(!1), H = U[0], B = U[1], L = ee(null), V = ee({
|
|
2322
2324
|
setCaretTimeout: null,
|
|
2323
2325
|
focusTimeout: null
|
|
2324
2326
|
});
|
|
2325
2327
|
A(function() {
|
|
2326
|
-
return
|
|
2327
|
-
clearTimeout(
|
|
2328
|
+
return B(!0), function() {
|
|
2329
|
+
clearTimeout(V.current.setCaretTimeout), clearTimeout(V.current.focusTimeout);
|
|
2328
2330
|
};
|
|
2329
2331
|
}, []);
|
|
2330
|
-
var
|
|
2331
|
-
var
|
|
2332
|
+
var z = i, Y = function(T, M) {
|
|
2333
|
+
var Q = parseFloat(M);
|
|
2332
2334
|
return {
|
|
2333
2335
|
formattedValue: T,
|
|
2334
|
-
value:
|
|
2335
|
-
floatValue: isNaN(
|
|
2336
|
+
value: M,
|
|
2337
|
+
floatValue: isNaN(Q) ? void 0 : Q
|
|
2336
2338
|
};
|
|
2337
|
-
}, q = function(T,
|
|
2338
|
-
T.selectionStart === 0 && T.selectionEnd === T.value.length || (Qe(T,
|
|
2339
|
-
T.value ===
|
|
2339
|
+
}, q = function(T, M, Q) {
|
|
2340
|
+
T.selectionStart === 0 && T.selectionEnd === T.value.length || (Qe(T, M), V.current.setCaretTimeout = setTimeout(function() {
|
|
2341
|
+
T.value === Q && T.selectionStart !== M && Qe(T, M);
|
|
2340
2342
|
}, 0));
|
|
2341
|
-
}, E = function(T,
|
|
2342
|
-
return Kn(T,
|
|
2343
|
-
},
|
|
2344
|
-
var
|
|
2345
|
-
return
|
|
2346
|
-
},
|
|
2347
|
-
var
|
|
2348
|
-
|
|
2349
|
-
var
|
|
2350
|
-
if (
|
|
2351
|
-
var Se = T.inputValue ||
|
|
2352
|
-
|
|
2343
|
+
}, E = function(T, M, Q) {
|
|
2344
|
+
return Kn(T, M, y(T), Q);
|
|
2345
|
+
}, re = function(T, M, Q) {
|
|
2346
|
+
var ce = y(M), Ne = Rl(M, k, T, Q, ce, m, j);
|
|
2347
|
+
return Ne = Kn(M, Ne, ce), Ne;
|
|
2348
|
+
}, R = function(T) {
|
|
2349
|
+
var M = T.formattedValue;
|
|
2350
|
+
M === void 0 && (M = "");
|
|
2351
|
+
var Q = T.input, ce = T.source, Ne = T.event, de = T.numAsString, se;
|
|
2352
|
+
if (Q) {
|
|
2353
|
+
var Se = T.inputValue || Q.value, $e = Yt(Q);
|
|
2354
|
+
Q.value = M, se = re(Se, M, $e), se !== void 0 && q(Q, se, M);
|
|
2353
2355
|
}
|
|
2354
|
-
|
|
2356
|
+
M !== k && P(Y(M, de), { event: Ne, source: ce });
|
|
2355
2357
|
};
|
|
2356
2358
|
A(function() {
|
|
2357
|
-
var T = _.current,
|
|
2358
|
-
(
|
|
2359
|
+
var T = _.current, M = T.formattedValue, Q = T.numAsString;
|
|
2360
|
+
(k !== M || F !== Q) && P(Y(k, F), {
|
|
2359
2361
|
event: void 0,
|
|
2360
2362
|
source: jt.props
|
|
2361
2363
|
});
|
|
2362
|
-
}, [
|
|
2363
|
-
var
|
|
2364
|
-
|
|
2365
|
-
var T =
|
|
2366
|
-
if (
|
|
2367
|
-
var
|
|
2368
|
-
T.value =
|
|
2364
|
+
}, [k, F]);
|
|
2365
|
+
var K = L.current ? Yt(L.current) : void 0, le = typeof window < "u" ? Ds : A;
|
|
2366
|
+
le(function() {
|
|
2367
|
+
var T = L.current;
|
|
2368
|
+
if (k !== _.current.formattedValue && T) {
|
|
2369
|
+
var M = re(_.current.formattedValue, k, K);
|
|
2370
|
+
T.value = k, q(T, M, k);
|
|
2369
2371
|
}
|
|
2370
|
-
}, [
|
|
2371
|
-
var
|
|
2372
|
-
var
|
|
2373
|
-
if (se = c(Se, void 0),
|
|
2374
|
-
var
|
|
2375
|
-
return
|
|
2372
|
+
}, [k]);
|
|
2373
|
+
var fe = function(T, M, Q) {
|
|
2374
|
+
var ce = M.target, Ne = $.current ? El($.current, ce.selectionEnd) : va(k, T), de = Object.assign(Object.assign({}, Ne), { lastValue: k }), se = c(T, de), Se = z(se);
|
|
2375
|
+
if (se = c(Se, void 0), f && !f(Y(Se, se))) {
|
|
2376
|
+
var $e = M.target, W = Yt($e), ae = re(T, k, W);
|
|
2377
|
+
return $e.value = k, q($e, ae, k), !1;
|
|
2376
2378
|
}
|
|
2377
|
-
return
|
|
2379
|
+
return R({
|
|
2378
2380
|
formattedValue: Se,
|
|
2379
2381
|
numAsString: se,
|
|
2380
2382
|
inputValue: T,
|
|
2381
|
-
event:
|
|
2382
|
-
source:
|
|
2383
|
-
input:
|
|
2383
|
+
event: M,
|
|
2384
|
+
source: Q,
|
|
2385
|
+
input: M.target
|
|
2384
2386
|
}), !0;
|
|
2385
|
-
},
|
|
2386
|
-
|
|
2387
|
-
var
|
|
2388
|
-
|
|
2389
|
-
},
|
|
2390
|
-
var
|
|
2391
|
-
|
|
2392
|
-
},
|
|
2393
|
-
var
|
|
2394
|
-
|
|
2387
|
+
}, ke = function(T, M) {
|
|
2388
|
+
M === void 0 && (M = 0);
|
|
2389
|
+
var Q = T.selectionStart, ce = T.selectionEnd;
|
|
2390
|
+
$.current = { selectionStart: Q, selectionEnd: ce + M };
|
|
2391
|
+
}, J = function(T) {
|
|
2392
|
+
var M = T.target, Q = M.value, ce = fe(Q, T, jt.event);
|
|
2393
|
+
ce && x(T), $.current = void 0;
|
|
2394
|
+
}, ve = function(T) {
|
|
2395
|
+
var M = T.target, Q = T.key, ce = M.selectionStart, Ne = M.selectionEnd, de = M.value;
|
|
2396
|
+
de === void 0 && (de = "");
|
|
2395
2397
|
var se;
|
|
2396
|
-
|
|
2398
|
+
Q === "ArrowLeft" || Q === "Backspace" ? se = Math.max(ce - 1, 0) : Q === "ArrowRight" ? se = Math.min(ce + 1, de.length) : Q === "Delete" && (se = ce);
|
|
2397
2399
|
var Se = 0;
|
|
2398
|
-
|
|
2399
|
-
var
|
|
2400
|
-
if (se === void 0 ||
|
|
2401
|
-
v(T),
|
|
2400
|
+
Q === "Delete" && ce === Ne && (Se = 1);
|
|
2401
|
+
var $e = Q === "ArrowLeft" || Q === "ArrowRight";
|
|
2402
|
+
if (se === void 0 || ce !== Ne && !$e) {
|
|
2403
|
+
v(T), ke(M, Se);
|
|
2402
2404
|
return;
|
|
2403
2405
|
}
|
|
2404
2406
|
var W = se;
|
|
2405
|
-
if (
|
|
2406
|
-
var ae =
|
|
2407
|
-
W = E(
|
|
2408
|
-
} else
|
|
2409
|
-
W !== se && q(
|
|
2410
|
-
},
|
|
2411
|
-
var
|
|
2412
|
-
var
|
|
2413
|
-
if (
|
|
2414
|
-
var se = E(
|
|
2415
|
-
se !==
|
|
2407
|
+
if ($e) {
|
|
2408
|
+
var ae = Q === "ArrowLeft" ? "left" : "right";
|
|
2409
|
+
W = E(de, se, ae), W !== se && T.preventDefault();
|
|
2410
|
+
} else Q === "Delete" && !m(de[se]) ? W = E(de, se, "right") : Q === "Backspace" && !m(de[se]) && (W = E(de, se, "left"));
|
|
2411
|
+
W !== se && q(M, W, de), v(T), ke(M, Se);
|
|
2412
|
+
}, De = function(T) {
|
|
2413
|
+
var M = T.target, Q = function() {
|
|
2414
|
+
var ce = M.selectionStart, Ne = M.selectionEnd, de = M.value;
|
|
2415
|
+
if (de === void 0 && (de = ""), ce === Ne) {
|
|
2416
|
+
var se = E(de, ce);
|
|
2417
|
+
se !== ce && q(M, se, de);
|
|
2416
2418
|
}
|
|
2417
2419
|
};
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
}),
|
|
2421
|
-
},
|
|
2420
|
+
Q(), requestAnimationFrame(function() {
|
|
2421
|
+
Q();
|
|
2422
|
+
}), g(T), ke(M);
|
|
2423
|
+
}, Ue = function(T) {
|
|
2422
2424
|
T.persist && T.persist();
|
|
2423
|
-
var
|
|
2424
|
-
|
|
2425
|
-
var
|
|
2426
|
-
|
|
2427
|
-
var se = E(
|
|
2428
|
-
se !==
|
|
2425
|
+
var M = T.target, Q = T.currentTarget;
|
|
2426
|
+
L.current = M, V.current.focusTimeout = setTimeout(function() {
|
|
2427
|
+
var ce = M.selectionStart, Ne = M.selectionEnd, de = M.value;
|
|
2428
|
+
de === void 0 && (de = "");
|
|
2429
|
+
var se = E(de, ce);
|
|
2430
|
+
se !== ce && !(ce === 0 && Ne === de.length) && q(M, se, de), h(Object.assign(Object.assign({}, T), { currentTarget: Q }));
|
|
2429
2431
|
}, 0);
|
|
2430
|
-
},
|
|
2431
|
-
|
|
2432
|
-
},
|
|
2432
|
+
}, G = function(T) {
|
|
2433
|
+
L.current = null, clearTimeout(V.current.focusTimeout), clearTimeout(V.current.setCaretTimeout), p(T);
|
|
2434
|
+
}, he = H && Ol() ? "numeric" : void 0, we = Object.assign({ inputMode: he }, N, {
|
|
2433
2435
|
type: t,
|
|
2434
|
-
value:
|
|
2435
|
-
onChange:
|
|
2436
|
-
onKeyDown:
|
|
2437
|
-
onMouseUp:
|
|
2438
|
-
onFocus:
|
|
2439
|
-
onBlur:
|
|
2436
|
+
value: k,
|
|
2437
|
+
onChange: J,
|
|
2438
|
+
onKeyDown: ve,
|
|
2439
|
+
onMouseUp: De,
|
|
2440
|
+
onFocus: Ue,
|
|
2441
|
+
onBlur: G
|
|
2440
2442
|
});
|
|
2441
2443
|
if (n === "text")
|
|
2442
|
-
return s ?
|
|
2444
|
+
return s ? Ce.createElement(Ce.Fragment, null, s(k, N) || null) : Ce.createElement("span", Object.assign({}, N, { ref: o }), k);
|
|
2443
2445
|
if (a) {
|
|
2444
2446
|
var nt = a;
|
|
2445
|
-
return
|
|
2447
|
+
return Ce.createElement(nt, Object.assign({}, we, { ref: o }));
|
|
2446
2448
|
}
|
|
2447
|
-
return
|
|
2449
|
+
return Ce.createElement("input", Object.assign({}, we, { ref: o }));
|
|
2448
2450
|
}
|
|
2449
2451
|
function qn(e, t) {
|
|
2450
2452
|
var n = t.decimalScale, a = t.fixedDecimalScale, s = t.prefix;
|
|
@@ -2454,8 +2456,8 @@ function qn(e, t) {
|
|
|
2454
2456
|
var i = t.allowNegative, c = t.thousandsGroupStyle;
|
|
2455
2457
|
if (c === void 0 && (c = "thousand"), e === "" || e === "-")
|
|
2456
2458
|
return e;
|
|
2457
|
-
var l = At(t), u = l.thousandSeparator, d = l.decimalSeparator,
|
|
2458
|
-
return n !== void 0 && (
|
|
2459
|
+
var l = At(t), u = l.thousandSeparator, d = l.decimalSeparator, f = n !== 0 && e.indexOf(".") !== -1 || n && a, x = yn(e, i), v = x.beforeDecimal, g = x.afterDecimal, h = x.addNegation;
|
|
2460
|
+
return n !== void 0 && (g = pa(g, n, !!a)), u && (v = Il(v, u, c)), s && (v = s + v), o && (g = g + o), h && (v = "-" + v), e = v + (f && d || "") + g, e;
|
|
2459
2461
|
}
|
|
2460
2462
|
function At(e) {
|
|
2461
2463
|
var t = e.decimalSeparator;
|
|
@@ -2485,32 +2487,32 @@ function zl(e, t, n) {
|
|
|
2485
2487
|
o === void 0 && (o = "");
|
|
2486
2488
|
var i = n.suffix;
|
|
2487
2489
|
i === void 0 && (i = "");
|
|
2488
|
-
var c = n.decimalScale, l = t.from, u = t.to, d = u.start,
|
|
2490
|
+
var c = n.decimalScale, l = t.from, u = t.to, d = u.start, f = u.end, x = At(n), v = x.allowedDecimalSeparators, g = x.decimalSeparator, h = e[f] === g;
|
|
2489
2491
|
if (yt(e) && (e === o || e === i) && t.lastValue === "")
|
|
2490
2492
|
return e;
|
|
2491
|
-
if (
|
|
2492
|
-
var p = c === 0 ? "" :
|
|
2493
|
+
if (f - d === 1 && v.indexOf(e[d]) !== -1) {
|
|
2494
|
+
var p = c === 0 ? "" : g;
|
|
2493
2495
|
e = e.substring(0, d) + p + e.substring(d + 1, e.length);
|
|
2494
2496
|
}
|
|
2495
|
-
var
|
|
2496
|
-
var
|
|
2497
|
-
o.startsWith("-") ?
|
|
2498
|
-
var E =
|
|
2499
|
-
return q && (E = 2), E && (
|
|
2500
|
-
},
|
|
2501
|
-
a =
|
|
2502
|
-
var
|
|
2503
|
-
e.length && D.length && (N > D.length - i.length ||
|
|
2504
|
-
var
|
|
2505
|
-
e.startsWith(o) ?
|
|
2506
|
-
var
|
|
2507
|
-
e.endsWith(i) ?
|
|
2508
|
-
var _ = e.indexOf(
|
|
2509
|
-
e = e.replace(new RegExp(ga(
|
|
2510
|
-
return
|
|
2497
|
+
var b = function(L, V, z) {
|
|
2498
|
+
var Y = !1, q = !1;
|
|
2499
|
+
o.startsWith("-") ? Y = !1 : L.startsWith("--") ? (Y = !1, q = !0) : i.startsWith("-") && L.length === i.length ? Y = !1 : L[0] === "-" && (Y = !0);
|
|
2500
|
+
var E = Y ? 1 : 0;
|
|
2501
|
+
return q && (E = 2), E && (L = L.substring(E), V -= E, z -= E), { value: L, start: V, end: z, hasNegation: Y };
|
|
2502
|
+
}, y = b(e, d, f), m = y.hasNegation;
|
|
2503
|
+
a = y, e = a.value, d = a.start, f = a.end;
|
|
2504
|
+
var j = b(t.lastValue, l.start, l.end), N = j.start, I = j.end, D = j.value, k = e.substring(d, f);
|
|
2505
|
+
e.length && D.length && (N > D.length - i.length || I < o.length) && !(k && i.startsWith(k)) && (e = D);
|
|
2506
|
+
var F = 0;
|
|
2507
|
+
e.startsWith(o) ? F += o.length : d < o.length && (F = d), e = e.substring(F), f -= F;
|
|
2508
|
+
var S = e.length, $ = e.length - i.length;
|
|
2509
|
+
e.endsWith(i) ? S = $ : (f > $ || f > e.length - i.length) && (S = f), e = e.substring(0, S), e = Pl(m ? "-" + e : e, s), e = (e.match(Hl(g)) || []).join("");
|
|
2510
|
+
var _ = e.indexOf(g);
|
|
2511
|
+
e = e.replace(new RegExp(ga(g), "g"), function(L, V) {
|
|
2512
|
+
return V === _ ? "." : "";
|
|
2511
2513
|
});
|
|
2512
|
-
var
|
|
2513
|
-
return u.end - u.start < l.end - l.start &&
|
|
2514
|
+
var P = yn(e, s), U = P.beforeDecimal, H = P.afterDecimal, B = P.addNegation;
|
|
2515
|
+
return u.end - u.start < l.end - l.start && U === "" && h && !parseFloat(H) && (e = B ? "-" : ""), e;
|
|
2514
2516
|
}
|
|
2515
2517
|
function Ul(e, t) {
|
|
2516
2518
|
var n = t.prefix;
|
|
@@ -2543,104 +2545,104 @@ function Gl(e) {
|
|
|
2543
2545
|
function Yl(e) {
|
|
2544
2546
|
e = Gl(e), e.decimalSeparator, e.allowedDecimalSeparators, e.thousandsGroupStyle;
|
|
2545
2547
|
var t = e.suffix, n = e.allowNegative, a = e.allowLeadingZeros, s = e.onKeyDown;
|
|
2546
|
-
s === void 0 && (s =
|
|
2548
|
+
s === void 0 && (s = Ve);
|
|
2547
2549
|
var o = e.onBlur;
|
|
2548
|
-
o === void 0 && (o =
|
|
2550
|
+
o === void 0 && (o = Ve);
|
|
2549
2551
|
var i = e.thousandSeparator, c = e.decimalScale, l = e.fixedDecimalScale, u = e.prefix;
|
|
2550
2552
|
u === void 0 && (u = "");
|
|
2551
|
-
var d = e.defaultValue,
|
|
2552
|
-
return qn(
|
|
2553
|
-
},
|
|
2554
|
-
return zl(
|
|
2555
|
-
},
|
|
2556
|
-
ot(
|
|
2557
|
-
var
|
|
2558
|
-
return ha(
|
|
2559
|
-
}, D = ja(
|
|
2560
|
-
var
|
|
2561
|
-
if (q === void 0 && (q = ""), (
|
|
2562
|
-
|
|
2553
|
+
var d = e.defaultValue, f = e.value, x = e.valueIsNumericString, v = e.onValueChange, g = ma(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), h = At(e), p = h.decimalSeparator, b = h.allowedDecimalSeparators, y = function(B) {
|
|
2554
|
+
return qn(B, e);
|
|
2555
|
+
}, m = function(B, L) {
|
|
2556
|
+
return zl(B, L, e);
|
|
2557
|
+
}, j = ot(f) ? d : f, N = x ?? Wl(j, u, t);
|
|
2558
|
+
ot(f) ? ot(d) || (N = N || typeof d == "number") : N = N || typeof f == "number";
|
|
2559
|
+
var I = function(B) {
|
|
2560
|
+
return ha(B) ? B : (typeof B == "number" && (B = xa(B)), N && typeof c == "number" ? Yn(B, c, !!l) : B);
|
|
2561
|
+
}, D = ja(I(f), I(d), !!N, y, m, v), k = D[0], F = k.numAsString, S = k.formattedValue, $ = D[1], _ = function(B) {
|
|
2562
|
+
var L = B.target, V = B.key, z = L.selectionStart, Y = L.selectionEnd, q = L.value;
|
|
2563
|
+
if (q === void 0 && (q = ""), (V === "Backspace" || V === "Delete") && Y < u.length) {
|
|
2564
|
+
B.preventDefault();
|
|
2563
2565
|
return;
|
|
2564
2566
|
}
|
|
2565
|
-
if (
|
|
2566
|
-
s(
|
|
2567
|
+
if (z !== Y) {
|
|
2568
|
+
s(B);
|
|
2567
2569
|
return;
|
|
2568
2570
|
}
|
|
2569
|
-
|
|
2571
|
+
V === "Backspace" && q[0] === "-" && z === u.length + 1 && n && Qe(L, 1), c && l && (V === "Backspace" && q[z - 1] === p ? (Qe(L, z - 1), B.preventDefault()) : V === "Delete" && q[z] === p && B.preventDefault()), b != null && b.includes(V) && q[z] === p && Qe(L, z + 1);
|
|
2570
2572
|
var E = i === !0 ? "," : i;
|
|
2571
|
-
|
|
2572
|
-
},
|
|
2573
|
-
var
|
|
2574
|
-
if (
|
|
2575
|
-
var
|
|
2576
|
-
|
|
2577
|
-
formattedValue:
|
|
2578
|
-
value:
|
|
2579
|
-
floatValue: parseFloat(
|
|
2573
|
+
V === "Backspace" && q[z - 1] === E && Qe(L, z - 1), V === "Delete" && q[z] === E && Qe(L, z + 1), s(B);
|
|
2574
|
+
}, P = function(B) {
|
|
2575
|
+
var L = F;
|
|
2576
|
+
if (L.match(/\d/g) || (L = ""), a || (L = $l(L)), l && c && (L = Yn(L, c, l)), L !== F) {
|
|
2577
|
+
var V = qn(L, e);
|
|
2578
|
+
$({
|
|
2579
|
+
formattedValue: V,
|
|
2580
|
+
value: L,
|
|
2581
|
+
floatValue: parseFloat(L)
|
|
2580
2582
|
}, {
|
|
2581
|
-
event:
|
|
2583
|
+
event: B,
|
|
2582
2584
|
source: jt.event
|
|
2583
2585
|
});
|
|
2584
2586
|
}
|
|
2585
|
-
o(
|
|
2586
|
-
},
|
|
2587
|
-
return
|
|
2588
|
-
},
|
|
2589
|
-
var
|
|
2590
|
-
return
|
|
2587
|
+
o(B);
|
|
2588
|
+
}, U = function(B) {
|
|
2589
|
+
return B === p ? !0 : yt(B);
|
|
2590
|
+
}, H = function(B) {
|
|
2591
|
+
var L = B.currentValue, V = B.lastValue, z = B.formattedValue, Y = B.currentValueIndex, q = B.formattedValueIndex, E = L[Y], re = z[q], R = va(V, L), K = R.to;
|
|
2592
|
+
return Y >= K.start && Y < K.end && b && b.includes(E) && re === p ? !0 : E === re;
|
|
2591
2593
|
};
|
|
2592
|
-
return Object.assign(Object.assign({},
|
|
2593
|
-
value:
|
|
2594
|
+
return Object.assign(Object.assign({}, g), {
|
|
2595
|
+
value: S,
|
|
2594
2596
|
valueIsNumericString: !1,
|
|
2595
|
-
isValidInputCharacter:
|
|
2596
|
-
isCharacterSame:
|
|
2597
|
-
onValueChange:
|
|
2598
|
-
format:
|
|
2599
|
-
removeFormatting:
|
|
2600
|
-
getCaretBoundary: function(
|
|
2601
|
-
return Ul(
|
|
2597
|
+
isValidInputCharacter: U,
|
|
2598
|
+
isCharacterSame: H,
|
|
2599
|
+
onValueChange: $,
|
|
2600
|
+
format: y,
|
|
2601
|
+
removeFormatting: m,
|
|
2602
|
+
getCaretBoundary: function(B) {
|
|
2603
|
+
return Ul(B, e);
|
|
2602
2604
|
},
|
|
2603
2605
|
onKeyDown: _,
|
|
2604
|
-
onBlur:
|
|
2606
|
+
onBlur: P
|
|
2605
2607
|
});
|
|
2606
2608
|
}
|
|
2607
2609
|
function bn(e) {
|
|
2608
2610
|
var t = Yl(e);
|
|
2609
|
-
return
|
|
2611
|
+
return Ce.createElement(Vl, Object.assign({}, t));
|
|
2610
2612
|
}
|
|
2611
|
-
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:
|
|
2612
|
-
const
|
|
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: x, step: v, noSelectOnFocus: g, decimalScale: h, numberPrefix: p, numberSuffix: b, min: y, max: m }) => {
|
|
2614
|
+
const j = C(() => {
|
|
2613
2615
|
if (!n)
|
|
2614
2616
|
return;
|
|
2615
|
-
const
|
|
2616
|
-
n(
|
|
2617
|
-
}, [
|
|
2618
|
-
const
|
|
2619
|
-
n && n(
|
|
2620
|
-
}, [n]),
|
|
2621
|
-
var _,
|
|
2622
|
-
let
|
|
2623
|
-
if (Number.isNaN(
|
|
2624
|
-
|
|
2617
|
+
const S = f ?? null;
|
|
2618
|
+
n(S ? Number(S) : null);
|
|
2619
|
+
}, [f, n]), N = ee(null), [I, D] = O((t == null ? void 0 : t.toString()) ?? ""), k = C((S) => {
|
|
2620
|
+
const $ = S;
|
|
2621
|
+
n && n($ == null || $ === "" ? null : Number($));
|
|
2622
|
+
}, [n]), F = C((S) => {
|
|
2623
|
+
var _, P;
|
|
2624
|
+
let $ = parseFloat(((P = (_ = S.target) == null ? void 0 : _.value) == null ? void 0 : P.replaceAll(" ", "")) ?? 0);
|
|
2625
|
+
if (Number.isNaN($) && ($ = 0), !a) {
|
|
2626
|
+
k($.toString());
|
|
2625
2627
|
return;
|
|
2626
2628
|
}
|
|
2627
|
-
D(
|
|
2628
|
-
|
|
2629
|
+
D($.toString()), N.current !== null && window.clearTimeout(N.current), N.current = window.setTimeout(() => {
|
|
2630
|
+
k($.toString());
|
|
2629
2631
|
}, a);
|
|
2630
|
-
}, [a,
|
|
2632
|
+
}, [a, k]);
|
|
2631
2633
|
return A(() => {
|
|
2632
2634
|
D(t === null ? "" : t.toString());
|
|
2633
|
-
}, [
|
|
2634
|
-
|
|
2635
|
-
}, [
|
|
2636
|
-
!n || t === null || (
|
|
2637
|
-
}, [t,
|
|
2638
|
-
/* @__PURE__ */ r.jsx(bn, { displayType: "input", thousandSeparator: " ", decimalScale:
|
|
2639
|
-
!
|
|
2640
|
-
}, onChange:
|
|
2635
|
+
}, [m, y, t]), A(() => {
|
|
2636
|
+
m !== void 0 && Number(I) > m && D(m.toString()), y !== void 0 && Number(I) < y && D(y.toString());
|
|
2637
|
+
}, [I, m, y, D]), A(() => {
|
|
2638
|
+
!n || t === null || (m !== void 0 && t > m && n(m), y !== void 0 && t < y && n(y));
|
|
2639
|
+
}, [t, m, y, n]), /* @__PURE__ */ r.jsxs(e, { withoutLabel: o, label: s ?? "", hidden: l, className: x, children: [
|
|
2640
|
+
/* @__PURE__ */ r.jsx(bn, { displayType: "input", thousandSeparator: " ", decimalScale: h, prefix: p, suffix: b, defaultValue: "", value: a ? I : (t == null ? void 0 : t.toString()) ?? "", placeholder: i ?? s, onFocus: (S) => {
|
|
2641
|
+
!g && S.target.select();
|
|
2642
|
+
}, onChange: F, hidden: l, disabled: u, className: w("form-control text-end w-100", {
|
|
2641
2643
|
[`form-control-${c}`]: c
|
|
2642
|
-
}), step: v, min:
|
|
2643
|
-
d && t !== null && n && !u && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ r.jsx(
|
|
2644
|
+
}), step: v, min: y, max: m }),
|
|
2645
|
+
d && t !== null && n && !u && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ r.jsx(ne, { color: "secondary", size: "sm", onClick: j, children: /* @__PURE__ */ r.jsx(Oe, {}) }) })
|
|
2644
2646
|
] });
|
|
2645
2647
|
}, Qn = [
|
|
2646
2648
|
["D", "day"],
|
|
@@ -2654,14 +2656,14 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2654
2656
|
sm: Ql,
|
|
2655
2657
|
md: Zl
|
|
2656
2658
|
}, Ct = (e) => {
|
|
2657
|
-
const t = new Date(e), n =
|
|
2659
|
+
const t = new Date(e), n = He(t.toISOString());
|
|
2658
2660
|
t.setMonth(t.getMonth() + 1), t.setDate(t.getDate() - 1);
|
|
2659
|
-
const a =
|
|
2661
|
+
const a = He(t.toISOString());
|
|
2660
2662
|
return { from: n, to: a };
|
|
2661
2663
|
}, gt = (e) => {
|
|
2662
|
-
const t = new Date(e), n =
|
|
2664
|
+
const t = new Date(e), n = He(t.toISOString());
|
|
2663
2665
|
t.setFullYear(t.getFullYear() + 1), t.setDate(t.getDate() - 1);
|
|
2664
|
-
const a =
|
|
2666
|
+
const a = He(t.toISOString());
|
|
2665
2667
|
return { from: n, to: a };
|
|
2666
2668
|
}, Jl = (e, t) => {
|
|
2667
2669
|
if (e === null || t === null)
|
|
@@ -2671,7 +2673,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2671
2673
|
const n = new Date(e);
|
|
2672
2674
|
return Ct(n).to === t ? "M" : gt(n).to === t ? "Y" : (console.log(gt(n), t), "C");
|
|
2673
2675
|
}, Xl = (e, t, n) => {
|
|
2674
|
-
const a =
|
|
2676
|
+
const a = C((i, c) => {
|
|
2675
2677
|
if (e === "C") {
|
|
2676
2678
|
n((l) => ({ ...l, [i]: c }));
|
|
2677
2679
|
return;
|
|
@@ -2683,7 +2685,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2683
2685
|
return l;
|
|
2684
2686
|
const u = new Date(c);
|
|
2685
2687
|
if (e === "D") {
|
|
2686
|
-
const d =
|
|
2688
|
+
const d = He(u.toISOString());
|
|
2687
2689
|
return {
|
|
2688
2690
|
from: d,
|
|
2689
2691
|
to: d
|
|
@@ -2696,7 +2698,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2696
2698
|
t("C"), n((l) => ({ ...l, [i]: c }));
|
|
2697
2699
|
break;
|
|
2698
2700
|
}
|
|
2699
|
-
}, [e, n, t]), s =
|
|
2701
|
+
}, [e, n, t]), s = C((i) => {
|
|
2700
2702
|
n((c) => {
|
|
2701
2703
|
if (c.from === null || c.to === null)
|
|
2702
2704
|
return c;
|
|
@@ -2705,18 +2707,18 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2705
2707
|
const u = new Date(c.to);
|
|
2706
2708
|
if (e === "D") {
|
|
2707
2709
|
l.setDate(l.getDate() + i);
|
|
2708
|
-
const d =
|
|
2710
|
+
const d = He(l.toISOString());
|
|
2709
2711
|
return {
|
|
2710
2712
|
from: d,
|
|
2711
2713
|
to: d
|
|
2712
2714
|
};
|
|
2713
2715
|
}
|
|
2714
2716
|
return e === "M" ? (l.setMonth(l.getMonth() + i), Ct(l)) : e === "Y" ? (l.setFullYear(l.getFullYear() + i), gt(l)) : {
|
|
2715
|
-
from:
|
|
2716
|
-
to:
|
|
2717
|
+
from: He(l.toISOString()),
|
|
2718
|
+
to: He(u.toISOString())
|
|
2717
2719
|
};
|
|
2718
2720
|
});
|
|
2719
|
-
}, [e, n]), o =
|
|
2721
|
+
}, [e, n]), o = C((i) => {
|
|
2720
2722
|
i === "D" ? n((c) => ({ from: c.from, to: c.from })) : i === "M" ? n((c) => {
|
|
2721
2723
|
if (c.from === null)
|
|
2722
2724
|
return c;
|
|
@@ -2731,32 +2733,32 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2731
2733
|
}, [n, t]);
|
|
2732
2734
|
return { setFromToProp: a, handleArrowClick: s, handleRangeChange: o };
|
|
2733
2735
|
}, gd = ({ fromtoState: [e, t], className: n, size: a }) => {
|
|
2734
|
-
const { texts: { date: s }, ProjectIconComponent: o } = Z(pe), [i, c] = O("C"), { handleArrowClick: l, handleRangeChange: u, setFromToProp: d } = Xl(i, c, t),
|
|
2736
|
+
const { texts: { date: s }, ProjectIconComponent: o } = Z(pe), [i, c] = O("C"), { handleArrowClick: l, handleRangeChange: u, setFromToProp: d } = Xl(i, c, t), f = te(() => i === "C", [i]), x = ee(!0);
|
|
2735
2737
|
return A(() => {
|
|
2736
2738
|
if (x.current) {
|
|
2737
2739
|
const v = Jl(e.from, e.to);
|
|
2738
2740
|
c(v), x.current = !1;
|
|
2739
2741
|
}
|
|
2740
2742
|
}, [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: [
|
|
2741
|
-
/* @__PURE__ */ r.jsx(
|
|
2743
|
+
/* @__PURE__ */ r.jsx(ne, { disabled: f, onClick: () => {
|
|
2742
2744
|
l(-1);
|
|
2743
2745
|
}, children: /* @__PURE__ */ r.jsx(o, { icon: "chevron-left" }) }),
|
|
2744
2746
|
/* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
2745
|
-
/* @__PURE__ */ r.jsx(st, { type: "date", value: e.from, onChange: (v) => d("from", v === null ? null : v.toString()), InputContainer:
|
|
2747
|
+
/* @__PURE__ */ r.jsx(st, { type: "date", value: e.from, onChange: (v) => d("from", v === null ? null : v.toString()), InputContainer: Fe, size: a }),
|
|
2746
2748
|
/* @__PURE__ */ r.jsx(un, { toggle: /* @__PURE__ */ r.jsx(fn, { text: s[Qn.find((v) => v[0] === i)[1]].substring(0, 1), as: ps }), children: Qn.map((v) => /* @__PURE__ */ r.jsx(Ze, { disabled: v[0] === i, className: w(v[0] === i ? "text-black-50" : ""), onClick: () => u(v[0]), role: "button", children: s[v[1]] }, v[0])) }),
|
|
2747
|
-
/* @__PURE__ */ r.jsx(st, { type: "date", value: e.to, onChange: (v) => d("to", v === null ? null : v.toString()), InputContainer:
|
|
2749
|
+
/* @__PURE__ */ r.jsx(st, { type: "date", value: e.to, onChange: (v) => d("to", v === null ? null : v.toString()), InputContainer: Fe, size: a })
|
|
2748
2750
|
] }) }),
|
|
2749
|
-
/* @__PURE__ */ r.jsx(
|
|
2751
|
+
/* @__PURE__ */ r.jsx(ne, { disabled: f, onClick: () => {
|
|
2750
2752
|
l(1);
|
|
2751
2753
|
}, children: /* @__PURE__ */ r.jsx(o, { icon: "chevron-right" }) })
|
|
2752
2754
|
] });
|
|
2753
2755
|
}, pd = ({ defaultMonth: e, searchKey: t = "monthFrom", yearMin: n, yearMax: a }) => {
|
|
2754
|
-
const { localizationContext: s } = Z(pe), { dateFnsLocale: o } = Z(s), { searchParams: i, setSearch: c } = Ls(), l = i.get(t), u = l ? vt(l) : e, d =
|
|
2755
|
-
c(t, nn(
|
|
2756
|
+
const { localizationContext: s } = Z(pe), { dateFnsLocale: o } = Z(s), { searchParams: i, setSearch: c } = Ls(), l = i.get(t), u = l ? vt(l) : e, d = C((f) => {
|
|
2757
|
+
c(t, nn(f, { representation: "date" }));
|
|
2756
2758
|
}, [t, c]);
|
|
2757
2759
|
return /* @__PURE__ */ r.jsx(vo, { month: u, onChangeMonth: d, locale: o, yearMin: n, yearMax: a });
|
|
2758
2760
|
}, xd = ({ defaultYear: e, searchKey: t = "yearFrom", optionMin: n, optionMax: a, className: s }) => {
|
|
2759
|
-
const [o, i] = Rs(t, nn(e, { representation: "date" })), c = o ? vt(o) : e, l =
|
|
2761
|
+
const [o, i] = Rs(t, nn(e, { representation: "date" })), c = o ? vt(o) : e, l = C((u) => {
|
|
2760
2762
|
i(nn(u, { representation: "date" }));
|
|
2761
2763
|
}, [i]);
|
|
2762
2764
|
return /* @__PURE__ */ r.jsx(bo, { year: c, onChangeYear: l, optionMin: n, optionMax: a, className: s });
|
|
@@ -2824,7 +2826,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2824
2826
|
}
|
|
2825
2827
|
n[a] = { value: s, defaultValue: s };
|
|
2826
2828
|
}), n;
|
|
2827
|
-
}, tc = "_table_1klfy_1", nc = "_table-header_1klfy_10", rc = "_table-row_1klfy_10", ac = "_table-head_1klfy_10", sc = "_filters-row_1klfy_19", oc = "_table-body_1klfy_30", ic = "_table-cell_1klfy_30", lc = "_action-column_1klfy_43", cc = "_sticky-top_1klfy_47", dc = "_sticky-first_1klfy_54", uc = "_sticky-last_1klfy_61", fc = "_sticky-bottom_1klfy_68",
|
|
2829
|
+
}, tc = "_table_1klfy_1", nc = "_table-header_1klfy_10", rc = "_table-row_1klfy_10", ac = "_table-head_1klfy_10", sc = "_filters-row_1klfy_19", oc = "_table-body_1klfy_30", ic = "_table-cell_1klfy_30", lc = "_action-column_1klfy_43", cc = "_sticky-top_1klfy_47", dc = "_sticky-first_1klfy_54", uc = "_sticky-last_1klfy_61", fc = "_sticky-bottom_1klfy_68", ue = {
|
|
2828
2830
|
table: tc,
|
|
2829
2831
|
"table-header": "_table-header_1klfy_10",
|
|
2830
2832
|
tableHeader: nc,
|
|
@@ -2853,13 +2855,13 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2853
2855
|
}, ba = ({ type: e, value: t, field: n, isPrimary: a, isReadonly: s, primaryEditable: o = !1, valuesForSelect: i, onChangeHandler: c, hideClearIcon: l, clearValue: u }) => {
|
|
2854
2856
|
switch (e) {
|
|
2855
2857
|
case "NUM":
|
|
2856
|
-
return i && i.length > 0 ? /* @__PURE__ */ r.jsx(Dt, { withoutLabel: !0, InputContainer:
|
|
2858
|
+
return i && i.length > 0 ? /* @__PURE__ */ r.jsx(Dt, { withoutLabel: !0, InputContainer: Fe, className: rt.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (d) => c(n, d === null ? null : Number(d)), options: i, disabled: s || o ? !1 : a, showClearIcon: !l, clearValue: u }) : /* @__PURE__ */ r.jsx(st, { withoutLabel: !0, InputContainer: Fe, className: rt.input, size: "sm", type: "number", value: t === null ? null : Number(t), onChange: (d) => c(n, d === null ? null : Number(d)), disabled: s || o ? !1 : a, showClearIcon: !l, clearValue: u });
|
|
2857
2859
|
case "STR":
|
|
2858
|
-
return i && i.length > 0 ? /* @__PURE__ */ r.jsx(Dt, { withoutLabel: !0, InputContainer:
|
|
2860
|
+
return i && i.length > 0 ? /* @__PURE__ */ r.jsx(Dt, { withoutLabel: !0, InputContainer: Fe, className: rt.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (d) => c(n, (d == null ? void 0 : d.toString()) ?? null), options: i, disabled: s || o ? !1 : a, showClearIcon: !l, clearValue: u }) : /* @__PURE__ */ r.jsx(st, { withoutLabel: !0, InputContainer: Fe, className: rt.input, size: "sm", type: "text", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (d) => c(n, (d == null ? void 0 : d.toString()) ?? null), disabled: s || o ? !1 : a, showClearIcon: !l, clearValue: u });
|
|
2859
2861
|
case "BIT":
|
|
2860
|
-
return /* @__PURE__ */ r.jsx(fa, { InputContainer:
|
|
2862
|
+
return /* @__PURE__ */ r.jsx(fa, { InputContainer: Fe, className: rt.input, value: t === !0, onChange: (d) => c(n, d), disabled: s || o ? !1 : a });
|
|
2861
2863
|
case "DT":
|
|
2862
|
-
return /* @__PURE__ */ r.jsx(st, { withoutLabel: !0, InputContainer:
|
|
2864
|
+
return /* @__PURE__ */ r.jsx(st, { withoutLabel: !0, InputContainer: Fe, className: rt.input, size: "sm", type: "date", value: t ? t.toString().split("T")[0] ?? "" : "", onChange: (d) => c(n, (d == null ? void 0 : d.toString()) ?? null), disabled: s || o ? !1 : a, showClearIcon: !l, clearValue: u });
|
|
2863
2865
|
default:
|
|
2864
2866
|
return /* @__PURE__ */ r.jsx("div", { className: "alert alert-warning p-1 m-0", children: /* @__PURE__ */ r.jsxs(X, { variant: "body", children: [
|
|
2865
2867
|
"Neznámý typ ",
|
|
@@ -2867,37 +2869,37 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2867
2869
|
] }) });
|
|
2868
2870
|
}
|
|
2869
2871
|
}, hc = ({ schema: e, columns: t, initialItem: n, onEdit: a, onDelete: s }) => {
|
|
2870
|
-
const { ProjectIconComponent: o } = Z(pe), [i, c] = O(n), l =
|
|
2871
|
-
console.log("changeValue",
|
|
2872
|
+
const { ProjectIconComponent: o } = Z(pe), [i, c] = O(n), l = C((f, x) => {
|
|
2873
|
+
console.log("changeValue", f, x), c((v) => ({
|
|
2872
2874
|
...v,
|
|
2873
|
-
[
|
|
2874
|
-
...v[
|
|
2875
|
+
[f]: {
|
|
2876
|
+
...v[f],
|
|
2875
2877
|
value: x
|
|
2876
2878
|
}
|
|
2877
2879
|
}));
|
|
2878
|
-
}, []), u = (
|
|
2880
|
+
}, []), 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]);
|
|
2879
2881
|
return A(() => {
|
|
2880
2882
|
c(n);
|
|
2881
|
-
}, [n]), /* @__PURE__ */ r.jsxs("tr", { className: w("table-row",
|
|
2882
|
-
/* @__PURE__ */ r.jsx("td", { className: w("table-cell",
|
|
2883
|
-
t.map((
|
|
2883
|
+
}, [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(ne, { color: "success", onClick: () => a(ya(i)), children: /* @__PURE__ */ r.jsx(o, { icon: "check" }) }) }),
|
|
2885
|
+
t.map((f) => {
|
|
2884
2886
|
var x, v;
|
|
2885
|
-
return /* @__PURE__ */ r.jsx("td", { className: w("table-cell",
|
|
2887
|
+
return /* @__PURE__ */ r.jsx("td", { className: w("table-cell", ue.tableCell), children: /* @__PURE__ */ r.jsx(ba, { type: f.type, value: (x = i[f.field ?? ""]) == null ? void 0 : x.value, field: f.field, isReadonly: f.readOnly, isPrimary: e.primaryKey === f.field, valuesForSelect: f.valuesForSelect, onChangeHandler: l, hideClearIcon: !u(i[f.field ?? ""]), clearValue: (v = i[f.field ?? ""].defaultValue) == null ? void 0 : v.toString() }) }, `${e.id}-${f.field}`);
|
|
2886
2888
|
}),
|
|
2887
|
-
/* @__PURE__ */ r.jsx("td", { className: w("table-cell",
|
|
2889
|
+
/* @__PURE__ */ r.jsx("td", { className: w("table-cell", ue.tableCell, ue.stickyLast), children: /* @__PURE__ */ r.jsx(ne, { color: "danger", onClick: () => s(i[e.primaryKey ?? ""].value), children: /* @__PURE__ */ r.jsx(o, { icon: "delete" }) }) })
|
|
2888
2890
|
] });
|
|
2889
2891
|
}, gc = ({ schema: e, columns: t, onCreate: n }) => {
|
|
2890
|
-
const { ProjectIconComponent: a } = Z(pe), [s, o] = O(null), i =
|
|
2892
|
+
const { ProjectIconComponent: a } = Z(pe), [s, o] = O(null), i = C(() => {
|
|
2891
2893
|
var u;
|
|
2892
2894
|
const l = {};
|
|
2893
2895
|
(u = e.columns) == null || u.forEach((d) => {
|
|
2894
|
-
const
|
|
2896
|
+
const f = d.type === "BIT" ? !1 : d.type === "NUM" ? 0 : d.type === "STR" ? "" : null;
|
|
2895
2897
|
l[d.field ?? ""] = {
|
|
2896
|
-
value:
|
|
2897
|
-
defaultValue:
|
|
2898
|
+
value: f,
|
|
2899
|
+
defaultValue: f
|
|
2898
2900
|
};
|
|
2899
2901
|
}), o(l);
|
|
2900
|
-
}, [e]), c =
|
|
2902
|
+
}, [e]), c = C((l, u) => {
|
|
2901
2903
|
o((d) => d && {
|
|
2902
2904
|
...d,
|
|
2903
2905
|
[l]: {
|
|
@@ -2907,65 +2909,65 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2907
2909
|
});
|
|
2908
2910
|
}, []);
|
|
2909
2911
|
return s ? /* @__PURE__ */ r.jsxs("tr", { className: "sticky-bottom shadow", children: [
|
|
2910
|
-
/* @__PURE__ */ r.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ r.jsx(
|
|
2912
|
+
/* @__PURE__ */ r.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ r.jsx(ne, { color: "success", onClick: async () => {
|
|
2911
2913
|
const l = ya(s);
|
|
2912
2914
|
l && await n(l) && o(null);
|
|
2913
2915
|
}, children: /* @__PURE__ */ r.jsx(a, { icon: "check" }) }) }),
|
|
2914
2916
|
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}`)),
|
|
2915
|
-
/* @__PURE__ */ r.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ r.jsx(
|
|
2917
|
+
/* @__PURE__ */ r.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ r.jsx(ne, { color: "danger", onClick: () => o(null), children: /* @__PURE__ */ r.jsx(a, { icon: "cancel" }) }) })
|
|
2916
2918
|
] }) : /* @__PURE__ */ r.jsxs("tr", { className: "sticky-bottom shadow", children: [
|
|
2917
|
-
/* @__PURE__ */ r.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ r.jsx(
|
|
2919
|
+
/* @__PURE__ */ r.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ r.jsx(ne, { onClick: i, children: /* @__PURE__ */ r.jsx(a, { icon: "add" }) }) }),
|
|
2918
2920
|
/* @__PURE__ */ r.jsx("td", { colSpan: t.length + 1 })
|
|
2919
2921
|
] });
|
|
2920
2922
|
}, 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 }) => {
|
|
2921
|
-
const { texts: { dynamicForms:
|
|
2923
|
+
const { texts: { dynamicForms: f }, ProjectIconComponent: x } = Z(pe), [v, g] = O([]);
|
|
2922
2924
|
return A(() => {
|
|
2923
|
-
var
|
|
2924
|
-
|
|
2925
|
-
...((
|
|
2926
|
-
var
|
|
2925
|
+
var h, p, b;
|
|
2926
|
+
g([
|
|
2927
|
+
...((b = (p = (h = e.columns) == null ? void 0 : h.filter((y) => !y.hidden)) == null ? void 0 : p.filter((y) => e.masterReference ? y.field !== e.masterReferenceColumn : !0)) == null ? void 0 : b.map((y) => {
|
|
2928
|
+
var m;
|
|
2927
2929
|
return {
|
|
2928
|
-
label:
|
|
2929
|
-
description:
|
|
2930
|
-
field:
|
|
2931
|
-
type:
|
|
2932
|
-
readOnly:
|
|
2933
|
-
valuesForSelect: ((
|
|
2930
|
+
label: y.caption ?? "",
|
|
2931
|
+
description: y.description ?? null,
|
|
2932
|
+
field: y.field ?? "",
|
|
2933
|
+
type: y.type,
|
|
2934
|
+
readOnly: y.readOnly,
|
|
2935
|
+
valuesForSelect: ((m = y.values) == null ? void 0 : m.filter((j) => y.valuesFilteredByMaster ? j.masterValue === d : !0).map((j) => ({ id: j.id ?? "", name: j.name }))) ?? void 0
|
|
2934
2936
|
};
|
|
2935
2937
|
})) ?? []
|
|
2936
2938
|
]);
|
|
2937
|
-
}, [e, d]), /* @__PURE__ */ r.jsxs("table", { id: `dynamic-table-${e.id}`, className: w("table table-borderless luminus-df-table",
|
|
2938
|
-
/* @__PURE__ */ r.jsxs("thead", { className: w("text-nowrap table-header",
|
|
2939
|
-
/* @__PURE__ */ r.jsxs("tr", { className: w("table-row",
|
|
2940
|
-
/* @__PURE__ */ r.jsx("th", { className: w("table-head",
|
|
2941
|
-
v.map((
|
|
2942
|
-
const p = c ===
|
|
2939
|
+
}, [e, d]), /* @__PURE__ */ r.jsxs("table", { id: `dynamic-table-${e.id}`, className: w("table table-borderless luminus-df-table", ue.table), children: [
|
|
2940
|
+
/* @__PURE__ */ r.jsxs("thead", { className: w("text-nowrap table-header", ue.stickyTop, ue.tableHeader), children: [
|
|
2941
|
+
/* @__PURE__ */ r.jsxs("tr", { className: w("table-row", ue.tableRow), children: [
|
|
2942
|
+
/* @__PURE__ */ r.jsx("th", { className: w("table-head", ue.tableHead, ue.actionColumn, ue.stickyFirst) }),
|
|
2943
|
+
v.map((h) => /* @__PURE__ */ r.jsx("th", { className: w("table-head", ue.tableHead), onClick: () => {
|
|
2944
|
+
const p = c === h.field ? l : null;
|
|
2943
2945
|
if (p === "asc") {
|
|
2944
|
-
u(
|
|
2946
|
+
u(h.field, "desc");
|
|
2945
2947
|
return;
|
|
2946
2948
|
}
|
|
2947
2949
|
if (p === "desc") {
|
|
2948
|
-
u(
|
|
2950
|
+
u(h.field, null);
|
|
2949
2951
|
return;
|
|
2950
2952
|
}
|
|
2951
|
-
u(
|
|
2952
|
-
}, children: /* @__PURE__ */ r.jsx(pc, { column:
|
|
2953
|
-
|
|
2954
|
-
c ===
|
|
2955
|
-
] }) }) }, `${e.id}-${
|
|
2956
|
-
/* @__PURE__ */ r.jsx("th", { className: w("table-head",
|
|
2953
|
+
u(h.field, "asc");
|
|
2954
|
+
}, children: /* @__PURE__ */ r.jsx(pc, { column: h, children: /* @__PURE__ */ r.jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [
|
|
2955
|
+
h.label,
|
|
2956
|
+
c === h.field && /* @__PURE__ */ r.jsx(x, { icon: l === "asc" ? "chevron-up" : "chevron-down" })
|
|
2957
|
+
] }) }) }, `${e.id}-${h.field}`)),
|
|
2958
|
+
/* @__PURE__ */ r.jsx("th", { className: w("table-head", ue.tableHead, ue.actionColumn, ue.stickyLast) })
|
|
2957
2959
|
] }),
|
|
2958
|
-
/* @__PURE__ */ r.jsxs("tr", { className: w("table-row filters-row",
|
|
2959
|
-
/* @__PURE__ */ r.jsx("th", { className: w("table-head",
|
|
2960
|
-
v.map((
|
|
2961
|
-
{ id: 1, name:
|
|
2962
|
-
{ id: 0, name:
|
|
2963
|
-
] :
|
|
2964
|
-
/* @__PURE__ */ r.jsx("th", { className: w("table-head",
|
|
2960
|
+
/* @__PURE__ */ r.jsxs("tr", { className: w("table-row filters-row", ue.tableRow, ue.filtersRow), children: [
|
|
2961
|
+
/* @__PURE__ */ r.jsx("th", { className: w("table-head", ue.tableHead, ue.actionColumn, ue.stickyFirst) }),
|
|
2962
|
+
v.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: (p) => i(h.field, (p == null ? void 0 : p.toString()) ?? null), options: h.type === "BIT" ? [
|
|
2963
|
+
{ id: 1, name: f.yes },
|
|
2964
|
+
{ 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: (p) => i(h.field, (p == null ? void 0 : p.toString()) ?? null) }) }) }, `${e.id}-${h.field}`)),
|
|
2966
|
+
/* @__PURE__ */ r.jsx("th", { className: w("table-head", ue.tableHead, ue.actionColumn, ue.stickyLast) })
|
|
2965
2967
|
] })
|
|
2966
2968
|
] }),
|
|
2967
|
-
/* @__PURE__ */ r.jsxs("tbody", { className: w("table-body",
|
|
2968
|
-
t.filter((
|
|
2969
|
+
/* @__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: v, initialItem: h, onEdit: n, onDelete: a }, `${e.id}-${h[e.primaryKey ?? ""].value}`)),
|
|
2969
2971
|
/* @__PURE__ */ r.jsx(gc, { schema: e, columns: v, onCreate: s })
|
|
2970
2972
|
] })
|
|
2971
2973
|
] });
|
|
@@ -2979,59 +2981,59 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
2979
2981
|
apiItemPost: "/dynamicForms/update",
|
|
2980
2982
|
apiItemDelete: "/dynamicForms/delete",
|
|
2981
2983
|
apiItemCreate: "/dynamicForms/insert"
|
|
2982
|
-
}, 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:
|
|
2983
|
-
var
|
|
2984
|
-
const { texts: { dynamicForms:
|
|
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: x = at.apiItemDelete, apiItemCreate: v = at.apiItemCreate } = at }) => {
|
|
2985
|
+
var ce, Ne, de, se, Se, $e;
|
|
2986
|
+
const { texts: { dynamicForms: g }, ProjectIconComponent: h } = Z(pe), p = Xe(), { startLoading: b, stopLoading: y } = Z(Ot), [m, j] = O(null), [N, I] = O(null), [D, k] = O(null), [F, S] = O(null), [$, _] = O(!1), { addNotification: P } = _r(), [U, H] = O([]), { confirm: B } = Tt(), L = 20, V = L + 1, z = F ? Math.ceil(F.length / L) : 1, Y = t ? t > 1 : !1, q = t ? t < z : !1, E = t ? (t - 1) * L : 0, re = t ? t * L : L, [R, K] = O(!1), le = R ? F == null ? void 0 : F.slice(E, re) : F, [fe, ke] = O(null);
|
|
2985
2987
|
A(() => {
|
|
2986
|
-
|
|
2988
|
+
j(null), I(null), _(!1), H([]), ke(null);
|
|
2987
2989
|
}, [e]);
|
|
2988
|
-
const
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
}).catch(() =>
|
|
2992
|
-
}, [p, e,
|
|
2990
|
+
const J = C(async () => {
|
|
2991
|
+
b("dynamicFormSchema"), await p.get(`${u}?id=${e}`).then(({ data: W }) => {
|
|
2992
|
+
j(W), y("dynamicFormSchema");
|
|
2993
|
+
}).catch(() => y("dynamicFormSchema"));
|
|
2994
|
+
}, [p, e, b, y, u]), ve = C(async () => {
|
|
2993
2995
|
var W;
|
|
2994
|
-
if (!(
|
|
2995
|
-
if (
|
|
2996
|
-
|
|
2996
|
+
if (!(m === null || ((W = m.id) == null ? void 0 : W.toString()) !== e)) {
|
|
2997
|
+
if (m.masterReference && !fe) {
|
|
2998
|
+
I([]);
|
|
2997
2999
|
return;
|
|
2998
3000
|
}
|
|
2999
|
-
|
|
3001
|
+
b("dynamicFormData"), await p.get(`${d}?id=${e}&showArchive=${$}${m.masterReference ? `&master=${fe}` : ""}`).then(({ data: ae }) => {
|
|
3000
3002
|
const ge = ae.map((ie) => {
|
|
3001
3003
|
var xe;
|
|
3002
|
-
return Object.fromEntries(((xe =
|
|
3004
|
+
return Object.fromEntries(((xe = m.columns) == null ? void 0 : xe.filter((ye) => ye.field).map((ye) => [
|
|
3003
3005
|
ye.field,
|
|
3004
3006
|
{ value: ie[ye.field ?? ""], defaultValue: ie[ye.field ?? ""] }
|
|
3005
3007
|
])) ?? []);
|
|
3006
3008
|
});
|
|
3007
|
-
|
|
3008
|
-
}).catch(() =>
|
|
3009
|
+
I(ge), y("dynamicFormData");
|
|
3010
|
+
}).catch(() => y("dynamicFormData"));
|
|
3009
3011
|
}
|
|
3010
|
-
}, [p, e,
|
|
3011
|
-
|
|
3012
|
+
}, [p, e, m, b, y, $, fe, d]), De = C(async (W) => (b("dynamicFormEdit"), p.post(`${f}?id=${e}`, W).then(() => (y("dynamicFormEdit"), H([]), !0)).catch((ae) => (y("dynamicFormEdit"), H(Vt(ae)), !1))), [p, e, b, y, f]), Ue = C(async (W) => (b("dynamicFormDelete"), p.delete(`${x}?id=${e}&pk=${W}`).then(() => (y("dynamicFormDelete"), H([]), !0)).catch((ae) => (y("dynamicFormDelete"), H(Vt(ae)), !1))), [p, e, b, y, x]), G = C(async (W) => (b("dynamicFormCreate"), p.post(`${v}?id=${e}`, W).then(({ data: ae }) => (y("dynamicFormCreate"), H([]), ae)).catch((ae) => (y("dynamicFormCreate"), H(Vt(ae)), null))), [p, e, b, y, v]), he = C(async (W) => {
|
|
3013
|
+
m && await De(m.masterReference ? { ...W, [m.masterReferenceColumn ?? ""]: fe } : W) && (P(g.editSuccess, "success"), I((ae) => ae && ae.map((ge) => {
|
|
3012
3014
|
var ie;
|
|
3013
|
-
return ((ie = ge[(
|
|
3015
|
+
return ((ie = ge[(m == null ? void 0 : m.primaryKey) ?? ""]) == null ? void 0 : ie.value) === W[(m == null ? void 0 : m.primaryKey) ?? ""] ? Jn(W, m) : ge;
|
|
3014
3016
|
})));
|
|
3015
|
-
}, [
|
|
3016
|
-
await
|
|
3017
|
+
}, [P, De, m, fe, g]), we = C(async (W) => {
|
|
3018
|
+
await B(g.deleteConfirm) && await Ue(W) && (P(g.deleteSuccess, "success"), I((ae) => ae && ae.filter((ge) => {
|
|
3017
3019
|
var ie;
|
|
3018
|
-
return ((ie = ge[(
|
|
3020
|
+
return ((ie = ge[(m == null ? void 0 : m.primaryKey) ?? ""]) == null ? void 0 : ie.value) !== W;
|
|
3019
3021
|
})));
|
|
3020
|
-
}, [
|
|
3021
|
-
if (!
|
|
3022
|
+
}, [P, Ue, g, B, m]), nt = C(async (W) => {
|
|
3023
|
+
if (!m)
|
|
3022
3024
|
return !1;
|
|
3023
|
-
const ae = await
|
|
3025
|
+
const ae = await G(m.masterReference ? { ...W, [m.masterReferenceColumn ?? ""]: fe } : W);
|
|
3024
3026
|
if (ae !== null) {
|
|
3025
|
-
|
|
3026
|
-
const ge = Jn(W,
|
|
3027
|
-
return ge[(
|
|
3027
|
+
P(g.createSuccess, "success");
|
|
3028
|
+
const ge = Jn(W, m);
|
|
3029
|
+
return ge[(m == null ? void 0 : m.primaryKey) ?? ""] = { value: ae, defaultValue: ae }, I((ie) => [...ie ?? [], ge]), !0;
|
|
3028
3030
|
}
|
|
3029
3031
|
return !1;
|
|
3030
|
-
}, [
|
|
3031
|
-
W >
|
|
3032
|
-
},
|
|
3033
|
-
if (!N || !
|
|
3034
|
-
|
|
3032
|
+
}, [P, G, g, m, fe]), T = (W) => {
|
|
3033
|
+
W > z ? n(z) : W < 1 && n(1), n(W);
|
|
3034
|
+
}, M = C(() => {
|
|
3035
|
+
if (!N || !m) {
|
|
3036
|
+
k(null);
|
|
3035
3037
|
return;
|
|
3036
3038
|
}
|
|
3037
3039
|
const W = N.filter((ae) => Object.entries(a).every(([ge, ie]) => {
|
|
@@ -3041,7 +3043,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3041
3043
|
const xe = (ct = ae[ge]) == null ? void 0 : ct.value;
|
|
3042
3044
|
if (xe == null)
|
|
3043
3045
|
return !1;
|
|
3044
|
-
const ye = (dt =
|
|
3046
|
+
const ye = (dt = m.columns) == null ? void 0 : dt.find((bt) => bt.field === ge), it = ye == null ? void 0 : ye.type, lt = (ye == null ? void 0 : ye.values) && ((ut = ye == null ? void 0 : ye.values) == null ? void 0 : ut.length) > 0;
|
|
3045
3047
|
if (!it)
|
|
3046
3048
|
return !1;
|
|
3047
3049
|
switch (it) {
|
|
@@ -3057,19 +3059,19 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3057
3059
|
return xe.toString().toLowerCase().includes(ie.toLowerCase());
|
|
3058
3060
|
}
|
|
3059
3061
|
}));
|
|
3060
|
-
|
|
3061
|
-
}, [N, a,
|
|
3062
|
-
if (!D || !
|
|
3063
|
-
|
|
3062
|
+
k(W);
|
|
3063
|
+
}, [N, a, m]), Q = C(() => {
|
|
3064
|
+
if (!D || !m) {
|
|
3065
|
+
S([]);
|
|
3064
3066
|
return;
|
|
3065
3067
|
}
|
|
3066
3068
|
if (!o) {
|
|
3067
|
-
|
|
3069
|
+
S(D);
|
|
3068
3070
|
return;
|
|
3069
3071
|
}
|
|
3070
|
-
|
|
3072
|
+
S([...D].sort((W, ae) => {
|
|
3071
3073
|
var it, lt, ct, dt, ut, bt;
|
|
3072
|
-
const ge = ((lt = (it = W[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 =
|
|
3074
|
+
const ge = ((lt = (it = W[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;
|
|
3073
3075
|
if (!xe || !ye || !ge && !ie)
|
|
3074
3076
|
return 0;
|
|
3075
3077
|
if (!ge)
|
|
@@ -3077,68 +3079,68 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3077
3079
|
if (!ie)
|
|
3078
3080
|
return -1;
|
|
3079
3081
|
if (xe.values && xe.values.length > 0) {
|
|
3080
|
-
const
|
|
3082
|
+
const Ee = ((ut = xe.values.find((Mt) => {
|
|
3081
3083
|
var ft;
|
|
3082
3084
|
return ((ft = Mt.id) == null ? void 0 : ft.toString()) === ge;
|
|
3083
|
-
})) == null ? void 0 : ut.name) ?? "",
|
|
3085
|
+
})) == null ? void 0 : ut.name) ?? "", Re = ((bt = xe.values.find((Mt) => {
|
|
3084
3086
|
var ft;
|
|
3085
3087
|
return ((ft = Mt.id) == null ? void 0 : ft.toString()) === ie;
|
|
3086
3088
|
})) == null ? void 0 : bt.name) ?? "";
|
|
3087
|
-
return i === "asc" ?
|
|
3089
|
+
return i === "asc" ? Ee.localeCompare(Re) : Re.localeCompare(Ee);
|
|
3088
3090
|
}
|
|
3089
3091
|
if (ye === "NUM") {
|
|
3090
|
-
const
|
|
3091
|
-
return i === "asc" ?
|
|
3092
|
+
const Ee = Number(ge), Re = Number(ie);
|
|
3093
|
+
return i === "asc" ? Ee - Re : Re - Ee;
|
|
3092
3094
|
}
|
|
3093
3095
|
if (ye === "DT") {
|
|
3094
|
-
const
|
|
3095
|
-
return i === "asc" ?
|
|
3096
|
+
const Ee = vt(ge == null ? void 0 : ge.toString()).getTime(), Re = vt(ie == null ? void 0 : ie.toString()).getTime();
|
|
3097
|
+
return i === "asc" ? Ee - Re : Re - Ee;
|
|
3096
3098
|
}
|
|
3097
3099
|
return i === "asc" ? ge.toString().localeCompare(ie.toString()) : ie.toString().localeCompare(ge.toString());
|
|
3098
3100
|
}));
|
|
3099
|
-
}, [D,
|
|
3101
|
+
}, [D, m, o, i]);
|
|
3100
3102
|
return A(() => {
|
|
3101
|
-
|
|
3102
|
-
}, [
|
|
3103
|
-
|
|
3104
|
-
}, [
|
|
3105
|
-
|
|
3106
|
-
}, [
|
|
3107
|
-
|
|
3108
|
-
}, [
|
|
3109
|
-
|
|
3110
|
-
}, [
|
|
3111
|
-
!
|
|
3112
|
-
}, [t,
|
|
3103
|
+
J();
|
|
3104
|
+
}, [J]), A(() => {
|
|
3105
|
+
ve();
|
|
3106
|
+
}, [ve]), A(() => {
|
|
3107
|
+
M();
|
|
3108
|
+
}, [M]), A(() => {
|
|
3109
|
+
Q();
|
|
3110
|
+
}, [Q]), A(() => {
|
|
3111
|
+
F && F.length > V ? (K(!0), t || n(1)) : (K(!1), F && n(null));
|
|
3112
|
+
}, [F, n, t, V]), A(() => {
|
|
3113
|
+
!R || !t || (t > z && n(z), t < 1 && n(1));
|
|
3114
|
+
}, [t, R, z, n]), /* @__PURE__ */ r.jsxs("div", { className: "h-100 w-100 d-flex flex-column", children: [
|
|
3113
3115
|
/* @__PURE__ */ r.jsxs("div", { className: "mb-3 d-flex justify-content-between align-items-center", children: [
|
|
3114
|
-
/* @__PURE__ */ r.jsx(X, { variant: "h3", children: (
|
|
3115
|
-
/* @__PURE__ */ r.jsx(fa, { label:
|
|
3116
|
+
/* @__PURE__ */ r.jsx(X, { variant: "h3", children: (m == null ? void 0 : m.name) ?? "" }),
|
|
3117
|
+
/* @__PURE__ */ r.jsx(fa, { label: g.showArchived, value: $ === !0, onChange: (W) => _(W) })
|
|
3116
3118
|
] }),
|
|
3117
|
-
(
|
|
3118
|
-
(
|
|
3119
|
-
(
|
|
3119
|
+
(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((W) => W.field === m.masterReferenceColumn)) == null ? void 0 : Ne.caption) ?? "", options: ((se = (de = m.columns) == null ? void 0 : de.find((W) => W.field === m.masterReferenceColumn)) == null ? void 0 : se.values) ?? [], master: fe, onChange: (W) => ke(W) }) }),
|
|
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((W) => {
|
|
3120
3122
|
var ae;
|
|
3121
|
-
return /* @__PURE__ */ r.jsx(
|
|
3123
|
+
return /* @__PURE__ */ r.jsx(Le, { as: "link", href: `${St(l, { id: (ae = W.id) == null ? void 0 : ae.toString() })}?type=dynamic-form`, children: W.name }, W.id);
|
|
3122
3124
|
}) }),
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
/* @__PURE__ */ r.jsx("div", { className: w("rounded border overflow-auto", Xn.tableContainer), children: /* @__PURE__ */ r.jsx(xc, { schema:
|
|
3127
|
-
|
|
3125
|
+
m != null && m.masterReference && !fe ? /* @__PURE__ */ r.jsx(da, { variant: "warning", children: g.selectMaster((($e = (Se = m.columns) == null ? void 0 : Se.find((W) => W.field === m.masterReferenceColumn)) == null ? void 0 : $e.caption) ?? "").toLowerCase() }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3126
|
+
m && U.length > 0 && /* @__PURE__ */ r.jsx("div", { className: "mb-2", children: /* @__PURE__ */ r.jsx(ec, { errors: U, schema: m }) }),
|
|
3127
|
+
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: (R ? 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 }) }),
|
|
3129
|
+
R && 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: [
|
|
3128
3130
|
/* @__PURE__ */ r.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
3129
|
-
/* @__PURE__ */ r.jsx(
|
|
3130
|
-
/* @__PURE__ */ r.jsx(
|
|
3131
|
-
/* @__PURE__ */ r.jsx(
|
|
3132
|
-
/* @__PURE__ */ r.jsx(
|
|
3131
|
+
/* @__PURE__ */ r.jsx(ne, { color: "primary", onClick: () => T(1), disabled: !Y, children: /* @__PURE__ */ r.jsx(h, { icon: "chevron-double-left" }) }),
|
|
3132
|
+
/* @__PURE__ */ r.jsx(ne, { color: "primary", onClick: () => T(t - 1), disabled: !Y, children: /* @__PURE__ */ r.jsx(h, { icon: "chevron-left" }) }),
|
|
3133
|
+
/* @__PURE__ */ r.jsx(ne, { color: "primary", onClick: () => T(t + 1), disabled: !q, children: /* @__PURE__ */ r.jsx(h, { icon: "chevron-right" }) }),
|
|
3134
|
+
/* @__PURE__ */ r.jsx(ne, { color: "primary", onClick: () => T(z), disabled: !q, children: /* @__PURE__ */ r.jsx(h, { icon: "chevron-double-right" }) })
|
|
3133
3135
|
] }),
|
|
3134
3136
|
/* @__PURE__ */ r.jsxs(X, { variant: "body", children: [
|
|
3135
|
-
|
|
3137
|
+
g.tablePage,
|
|
3136
3138
|
" ",
|
|
3137
3139
|
t,
|
|
3138
3140
|
" ",
|
|
3139
|
-
|
|
3141
|
+
g.tablePageFrom,
|
|
3140
3142
|
" ",
|
|
3141
|
-
|
|
3143
|
+
z
|
|
3142
3144
|
] })
|
|
3143
3145
|
] })
|
|
3144
3146
|
] })
|
|
@@ -3149,31 +3151,31 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3149
3151
|
}, nr = {
|
|
3150
3152
|
apiDynamicFormsGet: "/dynamicForms"
|
|
3151
3153
|
}, 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 }) => {
|
|
3152
|
-
const c = Xe(), { startLoading: l, stopLoading: u } = Z(Ot), [d,
|
|
3153
|
-
...(d == null ? void 0 : d.map((
|
|
3154
|
-
...
|
|
3154
|
+
const c = Xe(), { startLoading: l, stopLoading: u } = Z(Ot), [d, f] = O(null), x = te(() => [
|
|
3155
|
+
...(d == null ? void 0 : d.map((h) => ({
|
|
3156
|
+
...h,
|
|
3155
3157
|
type: "dynamic-form"
|
|
3156
3158
|
}))) ?? [],
|
|
3157
3159
|
...t
|
|
3158
|
-
].filter((
|
|
3159
|
-
id:
|
|
3160
|
-
name:
|
|
3161
|
-
items: x.filter((p) => p.group ===
|
|
3162
|
-
})).filter((
|
|
3163
|
-
l("dynamicForms"), await c.get(i).then(({ data:
|
|
3164
|
-
|
|
3160
|
+
].filter((h) => tn(h.name, a) || tn(h.description, a)).sort((h, p) => (h.name ?? "").localeCompare(p.name ?? "")) ?? [], [d, t, a]), v = te(() => n.map((h) => ({
|
|
3161
|
+
id: h.id,
|
|
3162
|
+
name: h.name ?? "",
|
|
3163
|
+
items: x.filter((p) => p.group === h.id)
|
|
3164
|
+
})).filter((h) => h.items.length > 0), [n, x]), g = C(async () => {
|
|
3165
|
+
l("dynamicForms"), await c.get(i).then(({ data: h }) => {
|
|
3166
|
+
f(h), u("dynamicForms");
|
|
3165
3167
|
}).catch(() => u("dynamicForms"));
|
|
3166
3168
|
}, [c, l, u, i]);
|
|
3167
3169
|
return A(() => {
|
|
3168
|
-
!d &&
|
|
3169
|
-
}, [
|
|
3170
|
-
var
|
|
3171
|
-
return s ? /* @__PURE__ */ r.jsxs(Je, { to: `${St(o, { id: (
|
|
3170
|
+
!d && g();
|
|
3171
|
+
}, [g, d]), x.length > 0 ? /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsx("div", { className: "w-auto list-group forms-items overflow-x-hidden", children: v.map((h) => /* @__PURE__ */ r.jsx(Yo, { title: h.name, defaultOpen: !0, children: h.items.map((p) => {
|
|
3172
|
+
var b, y, m, j;
|
|
3173
|
+
return s ? /* @__PURE__ */ r.jsxs(Je, { to: `${St(o, { id: (b = p.id) == null ? void 0 : b.toString() })}?type=${p.type}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((y = p.id) == null ? void 0 : y.toString()) ? "active" : ""}`, children: [
|
|
3172
3174
|
/* @__PURE__ */ r.jsx(X, { variant: "body", children: p.name }),
|
|
3173
3175
|
p.description && /* @__PURE__ */ r.jsx(X, { variant: "body2", className: "text-muted mt-2", children: p.description })
|
|
3174
|
-
] }, p.id) : /* @__PURE__ */ r.jsx(yc, { item: p, children: /* @__PURE__ */ r.jsx(Je, { to: `${St(o, { id: (
|
|
3175
|
-
}) },
|
|
3176
|
-
}, bd = ({ label: e, to: t, value: n }) => /* @__PURE__ */ r.jsxs(
|
|
3176
|
+
] }, p.id) : /* @__PURE__ */ r.jsx(yc, { item: p, children: /* @__PURE__ */ r.jsx(Je, { to: `${St(o, { id: (m = p.id) == null ? void 0 : m.toString() })}?type=${p.type}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((j = p.id) == null ? void 0 : j.toString()) ? "active" : ""}`, children: /* @__PURE__ */ r.jsx(X, { variant: "body2", children: p.name }) }) }, p.id);
|
|
3177
|
+
}) }, h.id)) }) }) : null;
|
|
3178
|
+
}, bd = ({ label: e, to: t, value: n }) => /* @__PURE__ */ r.jsxs(We, { label: e, children: [
|
|
3177
3179
|
/* @__PURE__ */ r.jsx("input", { disabled: !0, className: "form-control d-none" }),
|
|
3178
3180
|
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 })
|
|
3179
3181
|
] }), wd = () => {
|
|
@@ -3208,7 +3210,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3208
3210
|
};
|
|
3209
3211
|
return /* @__PURE__ */ r.jsxs(Nt, { className: `${a}`, children: [
|
|
3210
3212
|
/* @__PURE__ */ r.jsx(be.Control, { value: e, onChange: (o) => t(o.target.value) }),
|
|
3211
|
-
e && /* @__PURE__ */ r.jsx(Xt, { onClick: () => s(""), variant: "link", className: "border text-muted", children: /* @__PURE__ */ r.jsx(
|
|
3213
|
+
e && /* @__PURE__ */ r.jsx(Xt, { onClick: () => s(""), variant: "link", className: "border text-muted", children: /* @__PURE__ */ r.jsx(Oe, {}) }),
|
|
3212
3214
|
/* @__PURE__ */ r.jsx(Xt, { onClick: () => n && n(e), variant: "link", className: "border", children: /* @__PURE__ */ r.jsx(vs, {}) })
|
|
3213
3215
|
] });
|
|
3214
3216
|
}, kd = ({ value: e, numberPrefix: t, numberSuffix: n, decimalScale: a = 2, className: s }) => /* @__PURE__ */ r.jsx(bn, { value: e, displayType: "text", thousandSeparator: " ", decimalScale: a, defaultValue: "", prefix: t, suffix: n, className: s }), Sd = ({ data: e, keys: t, colors: n, tooltipLabel: a }) => /* @__PURE__ */ r.jsx(js, { data: e.map((s) => ({ name: s.name, ...s.values })), indexBy: "name", keys: t, margin: {
|
|
@@ -3230,261 +3232,261 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3230
3232
|
}, labelSkipWidth: 12, labelSkipHeight: 12, labelTextColor: {
|
|
3231
3233
|
from: "color",
|
|
3232
3234
|
modifiers: [["darker", 1.6]]
|
|
3233
|
-
}, tooltipLabel: a }), Id = ({ InputContainer: e =
|
|
3234
|
-
const { register: d, formState:
|
|
3235
|
+
}, tooltipLabel: a }), Id = ({ InputContainer: e = We, formField: t, label: n, resetsFields: a, type: s, required: o, hidden: i, disabled: c, withoutLabel: l, className: u }) => {
|
|
3236
|
+
const { register: d, formState: f, setValue: x } = ze(), [v, g] = O(void 0), [h, p] = O(!1);
|
|
3235
3237
|
A(() => {
|
|
3236
|
-
const
|
|
3237
|
-
let
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
}),
|
|
3241
|
-
}, [
|
|
3242
|
-
|
|
3243
|
-
}, [
|
|
3244
|
-
const
|
|
3245
|
-
return /* @__PURE__ */ r.jsxs(e, { isForCheckInput: !0, hidden: i, label: `${n}${o ? " *" : ""}`, isInvalid:
|
|
3238
|
+
const y = t.split(".");
|
|
3239
|
+
let m = f.errors;
|
|
3240
|
+
y.forEach((j) => {
|
|
3241
|
+
m !== void 0 && (m = m[j]);
|
|
3242
|
+
}), g(m);
|
|
3243
|
+
}, [f, t]), A(() => {
|
|
3244
|
+
f.isSubmitted && p(!0);
|
|
3245
|
+
}, [f]);
|
|
3246
|
+
const b = v !== void 0;
|
|
3247
|
+
return /* @__PURE__ */ r.jsxs(e, { isForCheckInput: !0, hidden: i, label: `${n}${o ? " *" : ""}`, isInvalid: b, withoutLabel: l, className: u, children: [
|
|
3246
3248
|
/* @__PURE__ */ r.jsx(be.Check, { id: `check-${t}`, type: s ?? "checkbox", label: `${n}${o ? " *" : ""}`, ...d(t, {
|
|
3247
3249
|
onChange: () => {
|
|
3248
|
-
a && a.forEach((
|
|
3250
|
+
a && a.forEach((y) => x(y, null, { shouldDirty: !0, shouldValidate: h }));
|
|
3249
3251
|
}
|
|
3250
|
-
}), isInvalid:
|
|
3252
|
+
}), isInvalid: b, hidden: i, disabled: c, className: "w-100" }),
|
|
3251
3253
|
v && /* @__PURE__ */ r.jsx(tt, { message: v.message })
|
|
3252
3254
|
] });
|
|
3253
|
-
}, Dd = ({ InputContainer: e =
|
|
3254
|
-
const { register: u, formState: d, setValue:
|
|
3255
|
+
}, Dd = ({ InputContainer: e = We, label: t, formField: n, options: a, resetsFields: s, required: o, disabled: i, hidden: c, className: l }) => {
|
|
3256
|
+
const { register: u, formState: d, setValue: f, watch: x } = ze(), [v, g] = O(void 0), [h, p] = O(!1), b = te(() => a, [a]);
|
|
3255
3257
|
A(() => {
|
|
3256
|
-
const
|
|
3257
|
-
let
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
}),
|
|
3258
|
+
const m = n.split(".");
|
|
3259
|
+
let j = d.errors;
|
|
3260
|
+
m.forEach((N) => {
|
|
3261
|
+
j !== void 0 && (j = j[N]);
|
|
3262
|
+
}), g(j);
|
|
3261
3263
|
}, [d, n]), A(() => {
|
|
3262
3264
|
d.isSubmitted && p(!0);
|
|
3263
3265
|
}, [d]);
|
|
3264
|
-
const
|
|
3265
|
-
return /* @__PURE__ */ r.jsxs(e, { isForRadioInput: !0, hidden: c, withoutLabel: !t, label: `${t}${o ? " *" : ""}`, isInvalid:
|
|
3266
|
-
|
|
3266
|
+
const y = v !== void 0;
|
|
3267
|
+
return /* @__PURE__ */ r.jsxs(e, { isForRadioInput: !0, hidden: c, withoutLabel: !t, label: `${t}${o ? " *" : ""}`, isInvalid: y, className: l, children: [
|
|
3268
|
+
b.map((m) => /* @__PURE__ */ r.jsx(be.Check, { id: `radio-${m.id}`, label: m.name, type: "radio", value: m.id ?? "", checked: x(n) === m.id, ...u(n, {
|
|
3267
3269
|
onChange: () => {
|
|
3268
|
-
s && s.forEach((
|
|
3270
|
+
s && s.forEach((j) => f(j, null, { shouldDirty: !0, shouldValidate: h }));
|
|
3269
3271
|
}
|
|
3270
|
-
}), isInvalid:
|
|
3272
|
+
}), isInvalid: y, hidden: c, disabled: i, className: "w-100" }, m.id)),
|
|
3271
3273
|
v && /* @__PURE__ */ r.jsx(tt, { message: v.message })
|
|
3272
3274
|
] });
|
|
3273
|
-
}, $d = ({ InputContainer: e =
|
|
3274
|
-
const { formState:
|
|
3275
|
-
const
|
|
3276
|
-
let
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
}),
|
|
3280
|
-
}, [
|
|
3281
|
-
if ((
|
|
3275
|
+
}, $d = ({ InputContainer: e = We, formField: t, label: n, size: a, defaultSelection: s, resetsFields: o, isNumber: i, required: c, hidden: l, disabled: u, items: d, onSearchQueryChange: f, selectedItemNavigateTo: x, texts: v, dropdownItemsNameWidth: g, isLoading: h, withoutLabel: p, additionalColumns: b, CustomOnChangeComponent: y, icon: m, displayIdAsName: j, onSelect: N, className: I, archiveColumn: D }) => {
|
|
3276
|
+
const { formState: k, setValue: F, watch: S, control: $ } = ze(), [_, P] = O(void 0), [U, H] = O(!1), [B, L] = O(!1), V = S(t) ?? null, z = V === (s == null ? void 0 : s.id) ? s == null ? void 0 : s.name : S(`${t}-DropdownName`), Y = te(() => V == null ? null : { id: V ?? null, name: z ?? "" }, [V, z]), q = C(() => {
|
|
3277
|
+
const J = t.split(".");
|
|
3278
|
+
let ve = k.errors;
|
|
3279
|
+
J.forEach((De) => {
|
|
3280
|
+
ve !== void 0 && (ve = ve[De]);
|
|
3281
|
+
}), P(ve);
|
|
3282
|
+
}, [k, t]), E = C((J) => {
|
|
3283
|
+
if ((J == null ? void 0 : J.id) === V)
|
|
3282
3284
|
return;
|
|
3283
|
-
if (N && N(
|
|
3284
|
-
|
|
3285
|
+
if (N && N(J), o && o.forEach((De) => F(De, null, { shouldDirty: !0, shouldValidate: B })), J === null) {
|
|
3286
|
+
F(t, null, {
|
|
3285
3287
|
shouldDirty: !0,
|
|
3286
|
-
shouldValidate:
|
|
3287
|
-
}),
|
|
3288
|
+
shouldValidate: B
|
|
3289
|
+
}), F(`${t}-DropdownName`, null);
|
|
3288
3290
|
return;
|
|
3289
3291
|
}
|
|
3290
|
-
let
|
|
3291
|
-
i ?
|
|
3292
|
+
let ve = null;
|
|
3293
|
+
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, {
|
|
3292
3294
|
shouldDirty: !0,
|
|
3293
|
-
shouldValidate:
|
|
3294
|
-
}),
|
|
3295
|
-
}, [
|
|
3296
|
-
|
|
3297
|
-
}, [
|
|
3298
|
-
|
|
3295
|
+
shouldValidate: B
|
|
3296
|
+
}), F(`${t}-DropdownName`, J.name ?? "");
|
|
3297
|
+
}, [F, t, B, i, o, V, N]), re = C((J) => {
|
|
3298
|
+
H(!1), E(J);
|
|
3299
|
+
}, [E]), R = C(() => {
|
|
3300
|
+
H(!1);
|
|
3299
3301
|
}, []);
|
|
3300
3302
|
A(() => {
|
|
3301
|
-
|
|
3302
|
-
}, [
|
|
3303
|
-
|
|
3304
|
-
}, [
|
|
3305
|
-
const
|
|
3306
|
-
return /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsxs(e, { label: `${n}${c ? " *" : ""}`, hidden: l, withoutLabel: p, isInvalid:
|
|
3307
|
-
/* @__PURE__ */ r.jsxs(ua, { currentSelection:
|
|
3308
|
-
|
|
3309
|
-
/* @__PURE__ */ r.jsx(mn, { control:
|
|
3310
|
-
|
|
3303
|
+
q();
|
|
3304
|
+
}, [q]), A(() => {
|
|
3305
|
+
k.isSubmitted && L(!0);
|
|
3306
|
+
}, [k]);
|
|
3307
|
+
const K = ee(null), le = _ !== void 0, fe = x !== void 0, ke = fe && Y !== null;
|
|
3308
|
+
return /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsxs(e, { label: `${n}${c ? " *" : ""}`, hidden: l, withoutLabel: p, isInvalid: le, inputContainerClassName: w({ "luminus-dropdown-select-open": U }), className: I, children: [
|
|
3309
|
+
/* @__PURE__ */ r.jsxs(ua, { currentSelection: Y, selectedItemNavigateTo: x, children: [
|
|
3310
|
+
j && (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 }),
|
|
3311
|
+
/* @__PURE__ */ r.jsx(mn, { control: $, name: t, render: () => /* @__PURE__ */ r.jsx(be.Select, { size: a, onMouseDown: (J) => {
|
|
3312
|
+
J.currentTarget.focus(), J.preventDefault();
|
|
3311
3313
|
}, onClick: () => {
|
|
3312
|
-
!
|
|
3313
|
-
}, ref:
|
|
3314
|
-
}, isInvalid:
|
|
3314
|
+
!fe && !u && H(!0);
|
|
3315
|
+
}, ref: K, value: V ?? "", onChange: () => {
|
|
3316
|
+
}, isInvalid: le, hidden: l, className: w("w-100", {
|
|
3315
3317
|
"luminus-dropdown-picker-disabled": u,
|
|
3316
|
-
"luminus-dropdown-picker-link":
|
|
3317
|
-
}), children: /* @__PURE__ */ r.jsx("option", { value:
|
|
3318
|
-
|
|
3319
|
-
!
|
|
3320
|
-
|
|
3321
|
-
}, children:
|
|
3322
|
-
|
|
3318
|
+
"luminus-dropdown-picker-link": ke
|
|
3319
|
+
}), children: /* @__PURE__ */ r.jsx("option", { value: V, children: j ? V : (z == null ? void 0 : z.length) > 0 ? z : V }) }) }),
|
|
3320
|
+
y || !u && fe ? /* @__PURE__ */ r.jsxs("div", { className: "custom-picker-button", children: [
|
|
3321
|
+
!y && !u && fe && /* @__PURE__ */ r.jsx(ne, { size: "sm", color: "secondary", onClick: (J) => {
|
|
3322
|
+
J.preventDefault(), J.stopPropagation(), H(!0);
|
|
3323
|
+
}, children: m ?? /* @__PURE__ */ r.jsx(yr, {}) }),
|
|
3324
|
+
y ?? null
|
|
3323
3325
|
] }) : null
|
|
3324
3326
|
] }),
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
+
_ && /* @__PURE__ */ r.jsx(tt, { message: _.message }),
|
|
3328
|
+
K.current && /* @__PURE__ */ r.jsx(jn, { show: U, onCancel: R, items: d, currentSelection: Y, onSelectionChange: re, onSearchQueryChange: f, texts: v, itemsNameWidth: g, additionalColumns: b, displayIdAsName: j, isLoading: h, disabled: u, inputRef: K, archiveColumn: D })
|
|
3327
3329
|
] }) });
|
|
3328
|
-
}, Ed = ({ InputContainer: e =
|
|
3329
|
-
const { watch: v, setValue:
|
|
3330
|
-
|
|
3331
|
-
}, [
|
|
3332
|
-
const
|
|
3333
|
-
let
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
}),
|
|
3330
|
+
}, Ed = ({ InputContainer: e = We, label: t, formField: n, hidden: a, required: s, placeholder: o, disabled: i, showClearIcon: c, resetsFields: l, multiple: u, accept: d, withoutLabel: f, className: x }) => {
|
|
3331
|
+
const { watch: v, setValue: g, register: h, formState: p } = ze(), [b, y] = O(!1), [m, j] = O(void 0), N = C(() => {
|
|
3332
|
+
g(n, "");
|
|
3333
|
+
}, [g, n]), I = C(() => {
|
|
3334
|
+
const k = n.split(".");
|
|
3335
|
+
let F = p.errors;
|
|
3336
|
+
k.forEach((S) => {
|
|
3337
|
+
F !== void 0 && (F = F[S]);
|
|
3338
|
+
}), j(F);
|
|
3337
3339
|
}, [p, n]);
|
|
3338
|
-
A(
|
|
3339
|
-
p.isSubmitted &&
|
|
3340
|
+
A(I, [I]), A(() => {
|
|
3341
|
+
p.isSubmitted && y(!0);
|
|
3340
3342
|
}, [p]);
|
|
3341
|
-
const D =
|
|
3342
|
-
return /* @__PURE__ */ r.jsxs(e, { label: `${t}${s ? "*" : ""}`, hidden: a, withoutLabel:
|
|
3343
|
-
/* @__PURE__ */ r.jsx(ys, { type: "file", multiple: u, accept: d.join(", "), placeholder: o ?? t, isInvalid: D, hidden: a, disabled: i, className: "w-100", ...
|
|
3343
|
+
const D = m !== void 0;
|
|
3344
|
+
return /* @__PURE__ */ r.jsxs(e, { label: `${t}${s ? "*" : ""}`, hidden: a, withoutLabel: f, isInvalid: D, className: x, children: [
|
|
3345
|
+
/* @__PURE__ */ r.jsx(ys, { type: "file", multiple: u, accept: d.join(", "), placeholder: o ?? t, isInvalid: D, hidden: a, disabled: i, className: "w-100", ...h(n, {
|
|
3344
3346
|
onChange: () => {
|
|
3345
|
-
l && l.forEach((
|
|
3347
|
+
l && l.forEach((k) => g(k, null, { shouldDirty: !0, shouldValidate: b }));
|
|
3346
3348
|
}
|
|
3347
3349
|
}) }),
|
|
3348
|
-
c && v(n) && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r.jsx(
|
|
3349
|
-
|
|
3350
|
+
c && v(n) && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r.jsx(ne, { color: "secondary", size: "sm", onClick: N, children: /* @__PURE__ */ r.jsx(Oe, {}) }) }),
|
|
3351
|
+
m && /* @__PURE__ */ r.jsx(tt, { message: m.message })
|
|
3350
3352
|
] });
|
|
3351
3353
|
}, Fd = ({ children: e, onStorno: t, noSpacer: n }) => {
|
|
3352
|
-
const { formState: a } =
|
|
3354
|
+
const { formState: a } = ze(), [s, o] = O(!1);
|
|
3353
3355
|
return A(() => {
|
|
3354
3356
|
o(Object.keys(a.dirtyFields).length > 0);
|
|
3355
3357
|
}, [a]), s ? /* @__PURE__ */ r.jsx(po, { onStorno: t, noSpacer: n, children: e }) : null;
|
|
3356
|
-
}, Od = ({ InputContainer: e =
|
|
3357
|
-
const { texts: { customSelect:
|
|
3358
|
+
}, Od = ({ InputContainer: e = We, options: t, formField: n, label: a, size: s, resetsFields: o, isNumber: i, required: c, hidden: l, disabled: u, withoutLabel: d, noSortOptions: f, suffixIdToName: x, onSelect: v, className: g }) => {
|
|
3359
|
+
const { texts: { customSelect: h } } = Z(pe), { formState: p, setValue: b, watch: y, control: m } = ze(), [j, N] = O(void 0), [I, D] = O(!1), [k, F] = O(!1), [S, $] = O(""), _ = y(n), P = te(() => t.find((E) => E.id === _) ?? null, [t, _]), U = C(() => {
|
|
3358
3360
|
const E = n.split(".");
|
|
3359
|
-
let
|
|
3360
|
-
E.forEach((
|
|
3361
|
-
|
|
3362
|
-
}), N(
|
|
3363
|
-
}, [p, n]),
|
|
3361
|
+
let re = p.errors;
|
|
3362
|
+
E.forEach((R) => {
|
|
3363
|
+
re !== void 0 && (re = re[R]);
|
|
3364
|
+
}), N(re);
|
|
3365
|
+
}, [p, n]), H = C((E) => {
|
|
3364
3366
|
if ((E == null ? void 0 : E.id) === _)
|
|
3365
3367
|
return;
|
|
3366
|
-
if (v && v(E), o && o.forEach((
|
|
3367
|
-
|
|
3368
|
+
if (v && v(E), o && o.forEach((R) => b(R, null, { shouldDirty: !0, shouldValidate: k })), E === null) {
|
|
3369
|
+
b(n, null, {
|
|
3368
3370
|
shouldDirty: !0,
|
|
3369
|
-
shouldValidate:
|
|
3371
|
+
shouldValidate: k
|
|
3370
3372
|
});
|
|
3371
3373
|
return;
|
|
3372
3374
|
}
|
|
3373
|
-
let
|
|
3374
|
-
i ?
|
|
3375
|
+
let re = null;
|
|
3376
|
+
i ? re = (E == null ? void 0 : E.id) !== null && (E == null ? void 0 : E.id) !== "" ? parseInt(E.id.toString(), 10) : null : re = E.id === null || E.id === void 0 || E.id === "" ? null : E.id, b(n, re, {
|
|
3375
3377
|
shouldDirty: !0,
|
|
3376
|
-
shouldValidate:
|
|
3378
|
+
shouldValidate: k
|
|
3377
3379
|
});
|
|
3378
|
-
}, [
|
|
3379
|
-
D(!1),
|
|
3380
|
-
}, [
|
|
3381
|
-
|
|
3380
|
+
}, [b, n, i, o, _, k, v]), B = C((E) => {
|
|
3381
|
+
D(!1), H(E);
|
|
3382
|
+
}, [H]), L = C((E) => {
|
|
3383
|
+
$(E);
|
|
3382
3384
|
}, []);
|
|
3383
3385
|
A(() => {
|
|
3384
|
-
|
|
3385
|
-
}, [
|
|
3386
|
-
p.isSubmitted &&
|
|
3386
|
+
U();
|
|
3387
|
+
}, [U]), A(() => {
|
|
3388
|
+
p.isSubmitted && F(!0);
|
|
3387
3389
|
}, [p]);
|
|
3388
|
-
const
|
|
3389
|
-
var
|
|
3390
|
-
return E === null ? "" : !E.name || E.name.length === 0 ? ((
|
|
3391
|
-
}, [x]),
|
|
3390
|
+
const V = C((E) => {
|
|
3391
|
+
var re;
|
|
3392
|
+
return E === null ? "" : !E.name || E.name.length === 0 ? ((re = E.id) == null ? void 0 : re.toString()) ?? "" : x ? `${E.name} (${E.id})` : E.name;
|
|
3393
|
+
}, [x]), z = te(() => t.map((E) => ({
|
|
3392
3394
|
id: E.id,
|
|
3393
|
-
name:
|
|
3394
|
-
})).filter((E) => tn(E.name,
|
|
3395
|
-
return /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsxs(e, { label: `${a}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid: q, inputContainerClassName: w({ "luminus-dropdown-select-open":
|
|
3396
|
-
/* @__PURE__ */ r.jsx(mn, { control:
|
|
3395
|
+
name: V(E)
|
|
3396
|
+
})).filter((E) => tn(E.name, S)).sort((E, re) => f ? 0 : (E.name ?? "").localeCompare(re.name ?? "")), [t, f, S, V]), Y = ee(null), q = j !== void 0;
|
|
3397
|
+
return /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsxs(e, { label: `${a}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid: q, inputContainerClassName: w({ "luminus-dropdown-select-open": I }), className: g, children: [
|
|
3398
|
+
/* @__PURE__ */ r.jsx(mn, { control: m, name: n, render: () => /* @__PURE__ */ r.jsx(be.Select, { size: s, onMouseDown: (E) => {
|
|
3397
3399
|
E.currentTarget.focus(), E.preventDefault();
|
|
3398
3400
|
}, onClick: () => {
|
|
3399
3401
|
D(!0);
|
|
3400
|
-
}, ref:
|
|
3401
|
-
}, isInvalid: q, hidden: l, disabled: u, className: "w-100", children: /* @__PURE__ */ r.jsx("option", { value: (
|
|
3402
|
-
|
|
3403
|
-
|
|
3402
|
+
}, ref: Y, value: _ ?? "", onChange: () => {
|
|
3403
|
+
}, isInvalid: q, hidden: l, disabled: u, className: "w-100", children: /* @__PURE__ */ r.jsx("option", { value: (P == null ? void 0 : P.id) ?? "", children: V(P) }) }) }),
|
|
3404
|
+
j && /* @__PURE__ */ r.jsx(tt, { message: j.message }),
|
|
3405
|
+
Y.current && /* @__PURE__ */ r.jsx(jn, { show: I, onCancel: () => D(!1), items: z, currentSelection: P ?? null, onSelectionChange: B, onSearchQueryChange: L, texts: h, disabled: u, inputRef: Y, autoHideSearch: !0, allItemsLength: t.length })
|
|
3404
3406
|
] }) });
|
|
3405
|
-
}, Td = ({ InputContainer: e =
|
|
3406
|
-
const { register:
|
|
3407
|
-
|
|
3408
|
-
}, [p,
|
|
3409
|
-
const
|
|
3410
|
-
|
|
3407
|
+
}, Td = ({ InputContainer: e = We, formField: t, label: n, placeholder: a, size: s, resetsFields: o, showClearIcon: i, clearValue: c, required: l, hidden: u, disabled: d, withoutLabel: f, step: x, stepperStep: v = 1, className: g, min: h, max: p }) => {
|
|
3408
|
+
const { register: b, formState: y, setValue: m, watch: j } = ze(), [N, I] = O(void 0), [D, k] = O(!1), F = C((U, H, B) => {
|
|
3409
|
+
m(U, ht(H, h, p), B);
|
|
3410
|
+
}, [p, h, m]), S = C(() => {
|
|
3411
|
+
const U = c ?? null;
|
|
3412
|
+
F(t, U !== null ? Number(U) : null, {
|
|
3411
3413
|
shouldDirty: !0,
|
|
3412
3414
|
shouldValidate: D
|
|
3413
3415
|
});
|
|
3414
|
-
}, [c,
|
|
3415
|
-
const
|
|
3416
|
-
let
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
}),
|
|
3420
|
-
}, [
|
|
3416
|
+
}, [c, F, t, D]), $ = C(() => {
|
|
3417
|
+
const U = t.split(".");
|
|
3418
|
+
let H = y.errors;
|
|
3419
|
+
U.forEach((B) => {
|
|
3420
|
+
H !== void 0 && (H = H[B]);
|
|
3421
|
+
}), I(H);
|
|
3422
|
+
}, [y, t]);
|
|
3421
3423
|
A(() => {
|
|
3422
|
-
|
|
3423
|
-
}, [
|
|
3424
|
-
|
|
3425
|
-
}, [
|
|
3426
|
-
const _ = N !== void 0,
|
|
3427
|
-
return /* @__PURE__ */ r.jsxs(e, { label: `${n}${l ? " *" : ""}`, hidden: u, withoutLabel:
|
|
3424
|
+
$();
|
|
3425
|
+
}, [$]), A(() => {
|
|
3426
|
+
y.isSubmitted && k(!0);
|
|
3427
|
+
}, [y]);
|
|
3428
|
+
const _ = N !== void 0, P = j(t);
|
|
3429
|
+
return /* @__PURE__ */ r.jsxs(e, { label: `${n}${l ? " *" : ""}`, hidden: u, withoutLabel: f, isInvalid: _, className: g, children: [
|
|
3428
3430
|
/* @__PURE__ */ r.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
3429
|
-
/* @__PURE__ */ r.jsx(be.Control, { type: "number", placeholder: a ?? n, size: s, ...
|
|
3430
|
-
setValueAs: (
|
|
3431
|
-
min:
|
|
3431
|
+
/* @__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, p),
|
|
3433
|
+
min: h,
|
|
3432
3434
|
max: p,
|
|
3433
3435
|
onChange: () => {
|
|
3434
|
-
o && o.forEach((
|
|
3436
|
+
o && o.forEach((U) => m(U, null, { shouldDirty: !0, shouldValidate: D }));
|
|
3435
3437
|
}
|
|
3436
|
-
}), isInvalid: _, hidden: u, disabled: d, className: "w-100 luminus-numeric-stepper", step: x, min:
|
|
3437
|
-
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ r.jsx(
|
|
3438
|
-
|
|
3438
|
+
}), isInvalid: _, hidden: u, disabled: d, className: "w-100 luminus-numeric-stepper", step: x, min: h, max: p }),
|
|
3439
|
+
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ r.jsx(ne, { size: "sm", onClick: (U) => {
|
|
3440
|
+
U.preventDefault(), U.stopPropagation(), F(t, ((P ? Number(P) : 0) - v).toString(), { shouldDirty: !0, shouldValidate: D });
|
|
3439
3441
|
}, children: /* @__PURE__ */ r.jsx(br, {}) }) }),
|
|
3440
|
-
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ r.jsx(
|
|
3441
|
-
|
|
3442
|
+
/* @__PURE__ */ r.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ r.jsx(ne, { size: "sm", onClick: (U) => {
|
|
3443
|
+
U.preventDefault(), U.stopPropagation(), F(t, ((P ? Number(P) : 0) + v).toString(), { shouldDirty: !0, shouldValidate: D });
|
|
3442
3444
|
}, children: /* @__PURE__ */ r.jsx(wr, {}) }) })
|
|
3443
3445
|
] }),
|
|
3444
|
-
i &&
|
|
3446
|
+
i && j(t) && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r.jsx(ne, { color: "secondary", size: "sm", onClick: S, children: /* @__PURE__ */ r.jsx(Oe, {}) }) }),
|
|
3445
3447
|
N && /* @__PURE__ */ r.jsx(tt, { message: N.message })
|
|
3446
3448
|
] });
|
|
3447
|
-
}, Ld = ({ InputContainer: e =
|
|
3448
|
-
const { formState: N, setValue:
|
|
3449
|
-
const
|
|
3450
|
-
|
|
3449
|
+
}, Ld = ({ InputContainer: e = We, formField: t, label: n, placeholder: a, resetsFields: s, showClearIcon: o, clearValue: i, required: c, hidden: l, disabled: u, withoutLabel: d, step: f, size: x, CustomOnChangeComponent: v, noSelectOnFocus: g, className: h, decimalScale: p = 2, numberPrefix: b, numberSuffix: y, min: m, max: j }) => {
|
|
3450
|
+
const { formState: N, setValue: I, watch: D, control: k } = ze(), [F, S] = O(void 0), [$, _] = O(!1), P = C(() => {
|
|
3451
|
+
const L = i ?? null;
|
|
3452
|
+
I(t, L !== null ? Number(L) : null, {
|
|
3451
3453
|
shouldDirty: !0,
|
|
3452
|
-
shouldValidate:
|
|
3454
|
+
shouldValidate: $
|
|
3453
3455
|
});
|
|
3454
|
-
}, [i,
|
|
3455
|
-
const
|
|
3456
|
-
let
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
}),
|
|
3456
|
+
}, [i, I, t, $]), U = C(() => {
|
|
3457
|
+
const L = t.split(".");
|
|
3458
|
+
let V = N.errors;
|
|
3459
|
+
L.forEach((z) => {
|
|
3460
|
+
V !== void 0 && (V = V[z]);
|
|
3461
|
+
}), S(V);
|
|
3460
3462
|
}, [N, t]);
|
|
3461
3463
|
A(() => {
|
|
3462
|
-
|
|
3463
|
-
}, [
|
|
3464
|
+
U();
|
|
3465
|
+
}, [U]), A(() => {
|
|
3464
3466
|
N.isSubmitted && _(!0);
|
|
3465
3467
|
}, [N]);
|
|
3466
|
-
const
|
|
3468
|
+
const H = D(t);
|
|
3467
3469
|
A(() => {
|
|
3468
|
-
|
|
3469
|
-
}, [t,
|
|
3470
|
-
const
|
|
3471
|
-
return /* @__PURE__ */ r.jsxs(e, { label: `${n}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid:
|
|
3470
|
+
j !== void 0 && H > j && I(t, j), m !== void 0 && H < m && I(t, m);
|
|
3471
|
+
}, [t, H, j, m, I]);
|
|
3472
|
+
const B = F !== void 0;
|
|
3473
|
+
return /* @__PURE__ */ r.jsxs(e, { label: `${n}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid: B, className: h, children: [
|
|
3472
3474
|
/* @__PURE__ */ r.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
3473
|
-
/* @__PURE__ */ r.jsx(mn, { control:
|
|
3474
|
-
!
|
|
3475
|
+
/* @__PURE__ */ r.jsx(mn, { control: k, name: t, render: ({ field: { ref: L, onChange: V, name: z, value: Y } }) => /* @__PURE__ */ r.jsx(bn, { displayType: "input", thousandSeparator: " ", decimalScale: p, prefix: b, suffix: y, defaultValue: "", name: z, value: Y ?? "", placeholder: a ?? n, onFocus: (q) => {
|
|
3476
|
+
!g && q.target.select();
|
|
3475
3477
|
}, onChange: (q) => {
|
|
3476
|
-
var
|
|
3477
|
-
const E = parseFloat(((
|
|
3478
|
-
s && s.forEach((
|
|
3478
|
+
var re, R;
|
|
3479
|
+
const E = parseFloat(((R = (re = q.target) == null ? void 0 : re.value) == null ? void 0 : R.replaceAll(" ", "")) ?? 0);
|
|
3480
|
+
s && s.forEach((K) => I(K, null, { shouldDirty: !0, shouldValidate: $ })), V(E == null || Number.isNaN(E) ? null : Number(E));
|
|
3479
3481
|
}, hidden: l, disabled: u, className: w("form-control text-end w-100", {
|
|
3480
|
-
"is-invalid":
|
|
3482
|
+
"is-invalid": B
|
|
3481
3483
|
}, {
|
|
3482
3484
|
[`form-control-${x}`]: x
|
|
3483
|
-
}), step:
|
|
3485
|
+
}), step: f, getInputRef: L, min: m, max: j }) }),
|
|
3484
3486
|
v && /* @__PURE__ */ r.jsx("div", { className: "custom-picker-button", children: v })
|
|
3485
3487
|
] }),
|
|
3486
|
-
o && D(t) && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ r.jsx(
|
|
3487
|
-
|
|
3488
|
+
o && D(t) && /* @__PURE__ */ r.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ r.jsx(ne, { color: "secondary", size: "sm", onClick: P, children: /* @__PURE__ */ r.jsx(Oe, {}) }) }),
|
|
3489
|
+
F && /* @__PURE__ */ r.jsx(tt, { message: F.message })
|
|
3488
3490
|
] });
|
|
3489
3491
|
}, wn = ["slice", "options", "formats", "conditions"], rr = (e) => {
|
|
3490
3492
|
const t = e.current.flexmonster.getReport({ withDefaults: !0 });
|
|
@@ -3508,11 +3510,11 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3508
3510
|
t[n] = (e == null ? void 0 : e[n]) ?? void 0;
|
|
3509
3511
|
}), t;
|
|
3510
3512
|
}, _c = ({ dataSource: e, settings: t, pivotRef: n, localization: a, licenseKey: s, enabled: o = !0 }) => {
|
|
3511
|
-
const { texts: { reports: i } } = Z(pe), [c, l] = O(!1), u = ee(null), d = n ?? u,
|
|
3513
|
+
const { texts: { reports: i } } = Z(pe), [c, l] = O(!1), u = ee(null), d = n ?? u, f = te(() => ({
|
|
3512
3514
|
localization: a
|
|
3513
|
-
}), [a]), x =
|
|
3514
|
-
delete
|
|
3515
|
-
const
|
|
3515
|
+
}), [a]), x = C((g) => {
|
|
3516
|
+
delete g[0], delete g[1], delete g[2];
|
|
3517
|
+
const h = [
|
|
3516
3518
|
{
|
|
3517
3519
|
id: "fm-tab-expand",
|
|
3518
3520
|
title: i.expandAll,
|
|
@@ -3526,39 +3528,39 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3526
3528
|
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'
|
|
3527
3529
|
}
|
|
3528
3530
|
];
|
|
3529
|
-
return
|
|
3531
|
+
return g.unshift({
|
|
3530
3532
|
id: "fm-tab-expand",
|
|
3531
3533
|
title: i.expand,
|
|
3532
3534
|
icon: '<svg height="42" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d=" M16 4 L28 4 L28 16 L24 12 L20 16 L16 12 L20 8z M4 16 L8 20 L12 16 L16 20 L12 24 L16 28 L4 28z "/></svg>',
|
|
3533
|
-
menu:
|
|
3535
|
+
menu: h,
|
|
3534
3536
|
rightGroup: !0
|
|
3535
|
-
}),
|
|
3536
|
-
}, [d, i.collapseAll, i.expand, i.expandAll]), v = (
|
|
3537
|
-
const
|
|
3538
|
-
|
|
3537
|
+
}), g;
|
|
3538
|
+
}, [d, i.collapseAll, i.expand, i.expandAll]), v = (g) => {
|
|
3539
|
+
const h = g.getTabs();
|
|
3540
|
+
g.getTabs = () => x(h);
|
|
3539
3541
|
};
|
|
3540
3542
|
return A(() => {
|
|
3541
|
-
var
|
|
3542
|
-
c && o && ((
|
|
3543
|
+
var g;
|
|
3544
|
+
c && o && ((g = d.current) == null || g.flexmonster.updateData(e), console.log("Updating flexmonster dataSource to: ", e));
|
|
3543
3545
|
}, [e, o, c, d]), A(() => {
|
|
3544
|
-
var
|
|
3546
|
+
var g, h, p;
|
|
3545
3547
|
if (c && o) {
|
|
3546
|
-
const { options:
|
|
3548
|
+
const { options: b, conditions: y, formats: m, slice: j, ...N } = (g = d.current) == null ? void 0 : g.flexmonster.getReport();
|
|
3547
3549
|
if (N === void 0 || typeof N == "string")
|
|
3548
3550
|
return;
|
|
3549
|
-
const
|
|
3550
|
-
|
|
3551
|
+
const I = wc(t);
|
|
3552
|
+
I.options = {
|
|
3551
3553
|
...t == null ? void 0 : t.options,
|
|
3552
|
-
grid: { ...(
|
|
3554
|
+
grid: { ...(h = t == null ? void 0 : t.options) == null ? void 0 : h.grid, autoSwitchToCompact: !1 }
|
|
3553
3555
|
};
|
|
3554
|
-
const D = { ...N, ...
|
|
3556
|
+
const D = { ...N, ...I };
|
|
3555
3557
|
(p = d.current) == null || p.flexmonster.setReport(D), console.log("Refreshing flexmonster settings. New report: ", D);
|
|
3556
3558
|
}
|
|
3557
3559
|
}, [o, c, d, t]), /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsx(
|
|
3558
3560
|
Os,
|
|
3559
3561
|
{
|
|
3560
3562
|
ref: d,
|
|
3561
|
-
global:
|
|
3563
|
+
global: f,
|
|
3562
3564
|
licenseKey: s,
|
|
3563
3565
|
toolbar: !0,
|
|
3564
3566
|
height: "100%",
|
|
@@ -3570,65 +3572,65 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3570
3572
|
}
|
|
3571
3573
|
) });
|
|
3572
3574
|
}, Nc = (e, t, n, a) => {
|
|
3573
|
-
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:
|
|
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(), x = C(async (b) => {
|
|
3574
3576
|
u("report-versionSavingAs");
|
|
3575
3577
|
try {
|
|
3576
|
-
const
|
|
3577
|
-
|
|
3578
|
+
const y = await c.post("/reports/version", b);
|
|
3579
|
+
f(s.saveSuccessful, "success"), await a(y.data);
|
|
3578
3580
|
} finally {
|
|
3579
3581
|
d("report-versionSavingAs");
|
|
3580
3582
|
}
|
|
3581
|
-
}, [
|
|
3583
|
+
}, [f, a, c, s.saveSuccessful, u, d]), v = C(async () => {
|
|
3582
3584
|
if (n === null) {
|
|
3583
|
-
|
|
3585
|
+
f("none open", "warning");
|
|
3584
3586
|
return;
|
|
3585
3587
|
}
|
|
3586
3588
|
if (!await i(s.confirmOverwriteSave))
|
|
3587
3589
|
return;
|
|
3588
|
-
const
|
|
3590
|
+
const y = rr(t);
|
|
3589
3591
|
x({
|
|
3590
3592
|
reportSourceName: e,
|
|
3591
3593
|
reportVersionId: n,
|
|
3592
|
-
settings:
|
|
3594
|
+
settings: y
|
|
3593
3595
|
});
|
|
3594
3596
|
}, [
|
|
3595
|
-
|
|
3597
|
+
f,
|
|
3596
3598
|
i,
|
|
3597
3599
|
t,
|
|
3598
3600
|
e,
|
|
3599
3601
|
s.confirmOverwriteSave,
|
|
3600
3602
|
x,
|
|
3601
3603
|
n
|
|
3602
|
-
]),
|
|
3603
|
-
const
|
|
3604
|
-
if (
|
|
3604
|
+
]), g = C(async () => {
|
|
3605
|
+
const b = await o(s.enterName, { input: "input", required: !0 });
|
|
3606
|
+
if (b === null)
|
|
3605
3607
|
return;
|
|
3606
|
-
const
|
|
3608
|
+
const y = rr(t);
|
|
3607
3609
|
x({
|
|
3608
3610
|
reportSourceName: e,
|
|
3609
|
-
name:
|
|
3610
|
-
settings:
|
|
3611
|
+
name: b,
|
|
3612
|
+
settings: y
|
|
3611
3613
|
});
|
|
3612
|
-
}, [t, o, e, s.enterName, x]),
|
|
3614
|
+
}, [t, o, e, s.enterName, x]), h = C(async () => {
|
|
3613
3615
|
u("report-versionSavingAs");
|
|
3614
3616
|
try {
|
|
3615
3617
|
await c.post("/reports/version", {
|
|
3616
3618
|
reportVersionId: n ?? void 0,
|
|
3617
3619
|
reportSourceName: e,
|
|
3618
3620
|
isArchived: !0
|
|
3619
|
-
}),
|
|
3621
|
+
}), f(s.deleteSuccessful, "success");
|
|
3620
3622
|
} finally {
|
|
3621
3623
|
d("report-versionSavingAs");
|
|
3622
3624
|
}
|
|
3623
3625
|
}, [
|
|
3624
|
-
|
|
3626
|
+
f,
|
|
3625
3627
|
c,
|
|
3626
3628
|
e,
|
|
3627
3629
|
s.deleteSuccessful,
|
|
3628
3630
|
n,
|
|
3629
3631
|
u,
|
|
3630
3632
|
d
|
|
3631
|
-
]), p =
|
|
3633
|
+
]), p = C(async () => {
|
|
3632
3634
|
u("report-versionSavingAs");
|
|
3633
3635
|
try {
|
|
3634
3636
|
await c.post("/reports/version-restrictions", {
|
|
@@ -3639,12 +3641,12 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3639
3641
|
addRights: !1
|
|
3640
3642
|
}
|
|
3641
3643
|
]
|
|
3642
|
-
}),
|
|
3644
|
+
}), f(s.detachSuccessful, "success");
|
|
3643
3645
|
} finally {
|
|
3644
3646
|
d("report-versionSavingAs");
|
|
3645
3647
|
}
|
|
3646
3648
|
}, [
|
|
3647
|
-
|
|
3649
|
+
f,
|
|
3648
3650
|
c,
|
|
3649
3651
|
s.detachSuccessful,
|
|
3650
3652
|
n,
|
|
@@ -3652,10 +3654,10 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3652
3654
|
d,
|
|
3653
3655
|
l.personalNumber
|
|
3654
3656
|
]);
|
|
3655
|
-
return { saveAs:
|
|
3657
|
+
return { saveAs: g, save: v, archive: h, detach: p };
|
|
3656
3658
|
}, Cc = (e) => {
|
|
3657
3659
|
const t = Xe(), { startLoading: n, stopLoading: a } = Z(Ot);
|
|
3658
|
-
return { changeEmployeeRights:
|
|
3660
|
+
return { changeEmployeeRights: C(async (o, i) => {
|
|
3659
3661
|
let c = null;
|
|
3660
3662
|
n("reportSharing-addPerson");
|
|
3661
3663
|
try {
|
|
@@ -3674,37 +3676,37 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3674
3676
|
return c;
|
|
3675
3677
|
}, [t, e, n, a]) };
|
|
3676
3678
|
}, kc = ({ isOpen: e, onHide: t, usersData: n, setUsersData: a, reportVersionId: s, EmployeePicker: o }) => {
|
|
3677
|
-
const { ProjectIconComponent: i, texts: { reports: c } } = Z(pe), { confirm: l } = Tt(), [u, d] = O(null), { changeEmployeeRights:
|
|
3679
|
+
const { ProjectIconComponent: i, texts: { reports: c } } = Z(pe), { confirm: l } = Tt(), [u, d] = O(null), { changeEmployeeRights: f } = Cc(s), x = C(async () => {
|
|
3678
3680
|
if (u === null)
|
|
3679
3681
|
return;
|
|
3680
|
-
const
|
|
3681
|
-
a(s,
|
|
3682
|
-
}, [u,
|
|
3683
|
-
if (!await l(c.removeSharingWith(
|
|
3682
|
+
const g = await f(u, !0);
|
|
3683
|
+
a(s, g);
|
|
3684
|
+
}, [u, f, s, a]), v = C(async (g) => {
|
|
3685
|
+
if (!await l(c.removeSharingWith(g)))
|
|
3684
3686
|
return;
|
|
3685
|
-
const p = await
|
|
3687
|
+
const p = await f(g, !1);
|
|
3686
3688
|
a(s, p);
|
|
3687
|
-
}, [
|
|
3688
|
-
return /* @__PURE__ */ r.jsxs(
|
|
3689
|
-
/* @__PURE__ */ r.jsx(
|
|
3690
|
-
/* @__PURE__ */ r.jsxs(
|
|
3689
|
+
}, [f, l, s, c, a]);
|
|
3690
|
+
return /* @__PURE__ */ r.jsxs(Pe, { show: e, onHide: t, children: [
|
|
3691
|
+
/* @__PURE__ */ r.jsx(Pe.Header, { closeButton: !0, children: /* @__PURE__ */ r.jsx(Pe.Title, { children: c.reportSharing }) }),
|
|
3692
|
+
/* @__PURE__ */ r.jsxs(Pe.Body, { children: [
|
|
3691
3693
|
/* @__PURE__ */ r.jsx(X, { variant: "h6", children: c.sharedWith }),
|
|
3692
3694
|
/* @__PURE__ */ r.jsxs(io, { variant: "flush", children: [
|
|
3693
3695
|
n && n.length === 0 ? /* @__PURE__ */ r.jsx("div", { className: "px-2", children: c.noone.toLowerCase() }) : null,
|
|
3694
|
-
n == null ? void 0 : n.map((
|
|
3695
|
-
|
|
3696
|
+
n == null ? void 0 : n.map((g) => /* @__PURE__ */ r.jsxs(xn, { className: "d-flex justify-content-between align-items-center gap-3 border-bottom px-2 py-1", children: [
|
|
3697
|
+
g.lastName,
|
|
3696
3698
|
" ",
|
|
3697
|
-
|
|
3699
|
+
g.firstName,
|
|
3698
3700
|
" [",
|
|
3699
|
-
|
|
3701
|
+
g.id,
|
|
3700
3702
|
"]",
|
|
3701
|
-
/* @__PURE__ */ r.jsx(
|
|
3702
|
-
] },
|
|
3703
|
+
/* @__PURE__ */ r.jsx(ne, { color: "danger", onClick: () => v(g.id), children: /* @__PURE__ */ r.jsx(i, { icon: "delete" }) })
|
|
3704
|
+
] }, g.id))
|
|
3703
3705
|
] }),
|
|
3704
3706
|
/* @__PURE__ */ r.jsx(X, { variant: "h6", className: "mt-2 mb-2", children: c.addSharing }),
|
|
3705
3707
|
/* @__PURE__ */ r.jsxs("div", { className: "d-flex gap-2 align-items-center", children: [
|
|
3706
|
-
/* @__PURE__ */ r.jsx("div", { className: "flex-grow-1", children: /* @__PURE__ */ r.jsx(o, { defaultSelection: null, label: c.shareWith, onSelect: (
|
|
3707
|
-
d(
|
|
3708
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex-grow-1", children: /* @__PURE__ */ r.jsx(o, { defaultSelection: null, label: c.shareWith, onSelect: (g) => {
|
|
3709
|
+
d(g === null ? null : Number(g.id));
|
|
3708
3710
|
} }) }),
|
|
3709
3711
|
/* @__PURE__ */ r.jsx(en, { onClick: x, disabled: u === null, children: c.add })
|
|
3710
3712
|
] })
|
|
@@ -3719,87 +3721,87 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3719
3721
|
});
|
|
3720
3722
|
}, [t, e]), { mappings: n };
|
|
3721
3723
|
}, Rd = ({ reportType: e, title: t, data: n, filterElements: a, getReportRoute: s, localization: o, licenseKey: i, EmployeePicker: c, localizationJsonFile: l, localizationTransformer: u }) => {
|
|
3722
|
-
const { texts: { reports: d } } = Z(pe), { confirm:
|
|
3723
|
-
const
|
|
3724
|
-
x(St(s(e), { id:
|
|
3724
|
+
const { texts: { reports: d } } = Z(pe), { confirm: f } = Tt(), x = Nr(), { id: v } = Fs(), g = te(() => v === void 0 ? null : Number(v), [v]), h = C((R) => {
|
|
3725
|
+
const K = R === null ? "" : R.toString();
|
|
3726
|
+
x(St(s(e), { id: K }), {
|
|
3725
3727
|
replace: !0
|
|
3726
3728
|
});
|
|
3727
|
-
}, [s, x, e]), [p,
|
|
3728
|
-
if (
|
|
3729
|
+
}, [s, x, e]), [p, b] = O(!1), y = ee(null), { user: m } = Z(Ft), { data: j, reloadData: N, setData: I } = Ms(`/reports/${e}`), { mappings: D } = Sc(l, u), [k, F] = O({}), S = C((R) => {
|
|
3730
|
+
if (j === null)
|
|
3729
3731
|
return;
|
|
3730
|
-
const
|
|
3731
|
-
|
|
3732
|
-
}, [
|
|
3733
|
-
await N(),
|
|
3734
|
-
}, [N,
|
|
3735
|
-
if (
|
|
3732
|
+
const K = R.target.value, le = K === "" ? null : Number(K);
|
|
3733
|
+
h(le);
|
|
3734
|
+
}, [j, h]), $ = C(async (R) => {
|
|
3735
|
+
await N(), h(R);
|
|
3736
|
+
}, [N, h]), _ = te(() => {
|
|
3737
|
+
if (j === null)
|
|
3736
3738
|
return null;
|
|
3737
|
-
const
|
|
3738
|
-
return
|
|
3739
|
-
}, [
|
|
3739
|
+
const R = j.reportVersions.find((K) => K.reportVersionId === g);
|
|
3740
|
+
return R === void 0 ? null : R;
|
|
3741
|
+
}, [j, g]);
|
|
3740
3742
|
A(() => {
|
|
3741
|
-
var
|
|
3742
|
-
if (
|
|
3743
|
+
var K;
|
|
3744
|
+
if (j === null)
|
|
3743
3745
|
return;
|
|
3744
3746
|
if (_ === null) {
|
|
3745
|
-
|
|
3747
|
+
F({});
|
|
3746
3748
|
return;
|
|
3747
3749
|
}
|
|
3748
|
-
const
|
|
3749
|
-
|
|
3750
|
-
}, [
|
|
3751
|
-
const { save:
|
|
3750
|
+
const R = bc(_) ?? {};
|
|
3751
|
+
F(R), (K = y.current) == null || K.flexmonster.refresh();
|
|
3752
|
+
}, [j, _, g]);
|
|
3753
|
+
const { save: P, saveAs: U, archive: H, detach: B } = Nc(e, y, g, $), L = te(() => ({
|
|
3752
3754
|
data: n ?? [],
|
|
3753
3755
|
mapping: D ?? void 0
|
|
3754
|
-
}), [n, D]),
|
|
3755
|
-
var
|
|
3756
|
-
await
|
|
3757
|
-
}, [
|
|
3758
|
-
var
|
|
3759
|
-
return (
|
|
3760
|
-
}, [_ == null ? void 0 : _.users,
|
|
3761
|
-
|
|
3762
|
-
const
|
|
3763
|
-
if (
|
|
3764
|
-
return
|
|
3765
|
-
const
|
|
3766
|
-
...
|
|
3767
|
-
users:
|
|
3768
|
-
},
|
|
3769
|
-
return
|
|
3770
|
-
...
|
|
3771
|
-
reportVersions:
|
|
3756
|
+
}), [n, D]), V = C(async () => {
|
|
3757
|
+
var K;
|
|
3758
|
+
await f(d.confirmRevertChanges) && ((K = y.current) == null || K.flexmonster.setReport({ dataSource: L, ...k }));
|
|
3759
|
+
}, [f, L, d.confirmRevertChanges, k]), z = te(() => (_ == null ? void 0 : _.ownerId) === m.personalNumber, [_ == null ? void 0 : _.ownerId, m.personalNumber]), Y = te(() => {
|
|
3760
|
+
var R;
|
|
3761
|
+
return (R = _ == null ? void 0 : _.users) == null ? void 0 : R.some((K) => K.id === m.personalNumber && !K.isReportOwner);
|
|
3762
|
+
}, [_ == null ? void 0 : _.users, m.personalNumber]), q = C((R, K) => {
|
|
3763
|
+
I((le) => {
|
|
3764
|
+
const fe = le == null ? void 0 : le.reportVersions.findIndex((ve) => ve.reportVersionId === R);
|
|
3765
|
+
if (fe === void 0 || le === null)
|
|
3766
|
+
return le;
|
|
3767
|
+
const ke = {
|
|
3768
|
+
...le.reportVersions[fe],
|
|
3769
|
+
users: K.filter((ve) => ve.isReportOwner === !1)
|
|
3770
|
+
}, J = [...le.reportVersions];
|
|
3771
|
+
return J[fe] = ke, {
|
|
3772
|
+
...le,
|
|
3773
|
+
reportVersions: J
|
|
3772
3774
|
};
|
|
3773
3775
|
});
|
|
3774
|
-
}, [
|
|
3775
|
-
await
|
|
3776
|
-
}, [
|
|
3777
|
-
await
|
|
3778
|
-
}, [
|
|
3776
|
+
}, [I]), E = C(async () => {
|
|
3777
|
+
await f(d.confirmDelete(_ == null ? void 0 : _.name)) && (await H(), h(null), await N());
|
|
3778
|
+
}, [H, f, N, _ == null ? void 0 : _.name, d, h]), re = C(async () => {
|
|
3779
|
+
await f(d.confirmDetach(_ == null ? void 0 : _.name)) && (await B(), h(null), await N());
|
|
3780
|
+
}, [f, B, N, _ == null ? void 0 : _.name, d, h]);
|
|
3779
3781
|
return A(() => {
|
|
3780
|
-
var
|
|
3781
|
-
|
|
3782
|
-
}, [
|
|
3782
|
+
var R;
|
|
3783
|
+
g === null && h(((R = j == null ? void 0 : j.reportVersions.find((K) => K.isSystem === !0)) == null ? void 0 : R.reportVersionId) ?? null);
|
|
3784
|
+
}, [j == null ? void 0 : j.reportVersions, g, h]), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3783
3785
|
/* @__PURE__ */ r.jsx(Bs, { title: /* @__PURE__ */ r.jsxs("div", { className: "d-flex justify-content-start gap-3", children: [
|
|
3784
3786
|
/* @__PURE__ */ r.jsx(X, { variant: "h3", children: t }),
|
|
3785
3787
|
a,
|
|
3786
3788
|
/* @__PURE__ */ r.jsxs("div", { className: "d-flex gap-1 align-items-center", children: [
|
|
3787
|
-
/* @__PURE__ */ r.jsxs(ws, { size: "sm", value:
|
|
3788
|
-
/* @__PURE__ */ r.jsx("optgroup", { label: d.versionSelectSystem, children:
|
|
3789
|
-
/* @__PURE__ */ r.jsx("optgroup", { label: d.versionSelectYour, children:
|
|
3790
|
-
/* @__PURE__ */ r.jsx("optgroup", { label: d.versionSelectSharedWithYou, children:
|
|
3789
|
+
/* @__PURE__ */ r.jsxs(ws, { size: "sm", value: g ?? void 0, onChange: S, children: [
|
|
3790
|
+
/* @__PURE__ */ r.jsx("optgroup", { label: d.versionSelectSystem, children: j == null ? void 0 : j.reportVersions.filter((R) => R.isSystem === !0).map((R) => /* @__PURE__ */ r.jsx("option", { value: R.reportVersionId, children: R.name }, R.reportVersionId)) }),
|
|
3791
|
+
/* @__PURE__ */ r.jsx("optgroup", { label: d.versionSelectYour, children: j == null ? void 0 : j.reportVersions.filter((R) => R.ownerId === m.personalNumber).map((R) => /* @__PURE__ */ r.jsx("option", { value: R.reportVersionId, children: R.name }, R.reportVersionId)) }),
|
|
3792
|
+
/* @__PURE__ */ r.jsx("optgroup", { label: d.versionSelectSharedWithYou, children: j == null ? void 0 : j.reportVersions.filter((R) => R.isSystem === !1 && R.ownerId !== m.personalNumber).map((R) => /* @__PURE__ */ r.jsx("option", { value: R.reportVersionId, children: `${R.name} [${R.ownerId}]` }, R.reportVersionId)) })
|
|
3791
3793
|
] }),
|
|
3792
|
-
/* @__PURE__ */ r.jsx(
|
|
3793
|
-
/* @__PURE__ */ r.jsx(
|
|
3794
|
+
/* @__PURE__ */ r.jsx(Le, { icon: /* @__PURE__ */ r.jsx(_s, {}), onClick: P, disabled: g === null || (_ == null ? void 0 : _.isSystem) || !z, children: d.save }),
|
|
3795
|
+
/* @__PURE__ */ r.jsx(Le, { icon: /* @__PURE__ */ r.jsx(Ns, {}), onClick: U, className: "flex-shrink-0", children: d.saveAs }),
|
|
3794
3796
|
/* @__PURE__ */ r.jsxs(un, { toggle: /* @__PURE__ */ r.jsx(fn, { as: xr }), children: [
|
|
3795
|
-
/* @__PURE__ */ r.jsx(Ze, { onClick:
|
|
3796
|
-
/* @__PURE__ */ r.jsx(Ze, { onClick: () =>
|
|
3797
|
-
|
|
3798
|
-
|
|
3797
|
+
/* @__PURE__ */ r.jsx(Ze, { onClick: V, children: d.revertChanges }),
|
|
3798
|
+
/* @__PURE__ */ r.jsx(Ze, { onClick: () => b(!0), disabled: !z || (_ == null ? void 0 : _.isSystem), children: d.share }),
|
|
3799
|
+
z && !(_ != null && _.isSystem) ? /* @__PURE__ */ r.jsx(Ze, { color: "danger", onClick: E, children: d.delete }) : null,
|
|
3800
|
+
Y && !(_ != null && _.isSystem) ? /* @__PURE__ */ r.jsx(Ze, { color: "danger", onClick: re, children: d.detach }) : null
|
|
3799
3801
|
] })
|
|
3800
3802
|
] })
|
|
3801
|
-
] }), children: /* @__PURE__ */ r.jsx("div", { className: w("h-100 w-100",
|
|
3802
|
-
_ !== null ? /* @__PURE__ */ r.jsx(kc, { isOpen: p, onHide: () =>
|
|
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: k, pivotRef: y, enabled: L.data && L.data.length > 0, localization: o, licenseKey: i }) }) }),
|
|
3804
|
+
_ !== null ? /* @__PURE__ */ r.jsx(kc, { isOpen: p, onHide: () => b(!1), usersData: _.users ?? null, setUsersData: q, reportVersionId: _ == null ? void 0 : _.reportVersionId, EmployeePicker: c }) : null
|
|
3803
3805
|
] });
|
|
3804
3806
|
}, 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: {
|
|
3805
3807
|
height: "14px",
|
|
@@ -3820,7 +3822,7 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3820
3822
|
/* @__PURE__ */ r.jsxs("div", { className: "d-flex flex-column gap-1 w-100", children: [
|
|
3821
3823
|
/* @__PURE__ */ r.jsxs("div", { className: "d-flex align-items-start justify-content-between gap-3", children: [
|
|
3822
3824
|
/* @__PURE__ */ r.jsx(X, { variant: "body2", className: "fw-bold", children: e.subject }),
|
|
3823
|
-
/* @__PURE__ */ r.jsx(
|
|
3825
|
+
/* @__PURE__ */ r.jsx(ne, { size: "sm", onClick: (d) => {
|
|
3824
3826
|
d.preventDefault(), d.stopPropagation(), t(e.id);
|
|
3825
3827
|
}, children: /* @__PURE__ */ r.jsx(o, { icon: "delete" }) })
|
|
3826
3828
|
] }),
|
|
@@ -3829,21 +3831,21 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3829
3831
|
] }) }) })
|
|
3830
3832
|
] });
|
|
3831
3833
|
}, ar = ["info", "warning", "danger"], sr = ({ messages: e, isLoading: t, onDeleteMessage: n, onClickMessage: a, getIcon: s, getLinksTo: o }) => {
|
|
3832
|
-
const { texts: { messageBoard: i } } = Z(pe), [c, l] = O(ar), u =
|
|
3834
|
+
const { texts: { messageBoard: i } } = Z(pe), [c, l] = O(ar), u = te(() => e.filter((d) => c.includes(d.type ?? "")), [c, e]);
|
|
3833
3835
|
return /* @__PURE__ */ r.jsxs("div", { className: "h-100 d-flex flex-column overflow-hidden", children: [
|
|
3834
3836
|
/* @__PURE__ */ r.jsx(Ic, { knownTypes: ar, typeFilters: c, onChangeTypeFilters: (d) => l(d) }),
|
|
3835
3837
|
t && /* @__PURE__ */ r.jsxs("div", { className: "p-3 w-100", children: [
|
|
3836
|
-
/* @__PURE__ */ r.jsx(
|
|
3837
|
-
/* @__PURE__ */ r.jsxs(
|
|
3838
|
-
/* @__PURE__ */ r.jsx(
|
|
3838
|
+
/* @__PURE__ */ r.jsx(Be, { as: Ln.Title, animation: "glow", children: /* @__PURE__ */ r.jsx(Be, { xs: 6 }) }),
|
|
3839
|
+
/* @__PURE__ */ r.jsxs(Be, { as: Ln.Text, animation: "glow", children: [
|
|
3840
|
+
/* @__PURE__ */ r.jsx(Be, { xs: 7 }),
|
|
3839
3841
|
" ",
|
|
3840
|
-
/* @__PURE__ */ r.jsx(
|
|
3842
|
+
/* @__PURE__ */ r.jsx(Be, { xs: 4 }),
|
|
3841
3843
|
" ",
|
|
3842
|
-
/* @__PURE__ */ r.jsx(
|
|
3844
|
+
/* @__PURE__ */ r.jsx(Be, { xs: 4 }),
|
|
3843
3845
|
" ",
|
|
3844
|
-
/* @__PURE__ */ r.jsx(
|
|
3846
|
+
/* @__PURE__ */ r.jsx(Be, { xs: 6 }),
|
|
3845
3847
|
" ",
|
|
3846
|
-
/* @__PURE__ */ r.jsx(
|
|
3848
|
+
/* @__PURE__ */ r.jsx(Be, { xs: 8 })
|
|
3847
3849
|
] })
|
|
3848
3850
|
] }),
|
|
3849
3851
|
!t && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
@@ -3855,17 +3857,17 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3855
3857
|
apiGet: "/messageBoard",
|
|
3856
3858
|
apiDelete: "/messageBoard/"
|
|
3857
3859
|
}, Md = ({ renderAsNotifPanel: e, notifIcon: t, apiUrls: { apiGet: n = Kt.apiGet, apiDelete: a = Kt.apiDelete } = Kt, getIcon: s, getLinksTo: o }) => {
|
|
3858
|
-
const c = Xe(), [l, u] = O([]), [d,
|
|
3860
|
+
const c = Xe(), [l, u] = O([]), [d, f] = O(!1), [x, v] = O(!1), [g, h] = O(!1), p = C(async () => {
|
|
3859
3861
|
v(!0), await c.get(n).then(({ data: N }) => {
|
|
3860
|
-
u(N),
|
|
3862
|
+
u(N), f(!0), v(!1);
|
|
3861
3863
|
}).catch(() => {
|
|
3862
3864
|
u([]), v(!1);
|
|
3863
3865
|
});
|
|
3864
|
-
}, [n, c]),
|
|
3865
|
-
|
|
3866
|
-
|
|
3866
|
+
}, [n, c]), b = C(async (N) => c.delete(`${a}${N}`).then(() => !0).catch(() => !1), [a, c]), y = C((N) => {
|
|
3867
|
+
b(N).then((I) => {
|
|
3868
|
+
I && u(l.filter((D) => D.id !== N));
|
|
3867
3869
|
});
|
|
3868
|
-
}, [
|
|
3870
|
+
}, [b, l]);
|
|
3869
3871
|
A(() => {
|
|
3870
3872
|
p();
|
|
3871
3873
|
const N = setInterval(() => p(), 60 * 1e3);
|
|
@@ -3873,14 +3875,14 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3873
3875
|
clearInterval(N);
|
|
3874
3876
|
};
|
|
3875
3877
|
}, [p]);
|
|
3876
|
-
const
|
|
3878
|
+
const m = l.filter((N) => N.type === "danger").length, j = d ? !1 : x;
|
|
3877
3879
|
return e ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3878
3880
|
/* @__PURE__ */ r.jsxs("div", { className: "position-relative", children: [
|
|
3879
|
-
/* @__PURE__ */ r.jsx(
|
|
3880
|
-
|
|
3881
|
+
/* @__PURE__ */ r.jsx(ne, { size: "md", onClick: () => h(!g), children: t }),
|
|
3882
|
+
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 })
|
|
3881
3883
|
] }),
|
|
3882
|
-
/* @__PURE__ */ r.jsx(Bn, { show:
|
|
3883
|
-
] }) : /* @__PURE__ */ r.jsx(sr, { messages: l, isLoading:
|
|
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: j, onDeleteMessage: y, onClickMessage: () => h(!1), getIcon: s, getLinksTo: o }) }) })
|
|
3885
|
+
] }) : /* @__PURE__ */ r.jsx(sr, { messages: l, isLoading: j, onDeleteMessage: y, getIcon: s, getLinksTo: o });
|
|
3884
3886
|
}, Ec = "_tab-panel_d8l8q_1", Fc = "_full-height-no-overflow_d8l8q_5", Oc = "_disabled_d8l8q_12", qt = {
|
|
3885
3887
|
"tab-panel": "_tab-panel_d8l8q_1",
|
|
3886
3888
|
tabPanel: Ec,
|
|
@@ -3896,9 +3898,9 @@ const hd = ({ InputContainer: e = et, value: t, onChange: n, debounceMs: a, labe
|
|
|
3896
3898
|
const c = o.type, l = o.props;
|
|
3897
3899
|
if (!l)
|
|
3898
3900
|
return null;
|
|
3899
|
-
const u = l.eventKey, d = l.children,
|
|
3900
|
-
return /* @__PURE__ */ r.jsxs(
|
|
3901
|
-
/* @__PURE__ */ r.jsx(c, { ...l, className: w({ active: e === u },
|
|
3901
|
+
const u = l.eventKey, d = l.children, f = l.className, x = l.onClick;
|
|
3902
|
+
return /* @__PURE__ */ r.jsxs(Ce.Fragment, { children: [
|
|
3903
|
+
/* @__PURE__ */ r.jsx(c, { ...l, className: w({ active: e === u }, f), onClick: () => {
|
|
3902
3904
|
t(u), x && x(u);
|
|
3903
3905
|
}, vertical: a || s, children: d }),
|
|
3904
3906
|
s && i < n.length - 1 && /* @__PURE__ */ r.jsx("div", { className: w("join-line", Lc.joinLine) })
|
|
@@ -3923,7 +3925,7 @@ export {
|
|
|
3923
3925
|
Ai as Card,
|
|
3924
3926
|
fa as CheckInput,
|
|
3925
3927
|
Yo as Collapse,
|
|
3926
|
-
|
|
3928
|
+
Le as ContextButton,
|
|
3927
3929
|
bd as DisabledRowLabelLink,
|
|
3928
3930
|
zd as Documents,
|
|
3929
3931
|
un as Dropdown,
|
|
@@ -3955,7 +3957,7 @@ export {
|
|
|
3955
3957
|
Gd as HookFormTextAreaInput,
|
|
3956
3958
|
Yd as HookFormTextInput,
|
|
3957
3959
|
td as HtmlTooltip,
|
|
3958
|
-
|
|
3960
|
+
ne as IconButton,
|
|
3959
3961
|
Un as ImgApi,
|
|
3960
3962
|
ca as ImgDirect,
|
|
3961
3963
|
tt as InvalidFeedback,
|
|
@@ -3965,7 +3967,7 @@ export {
|
|
|
3965
3967
|
Md as MessageBoard,
|
|
3966
3968
|
vo as MonthPicker,
|
|
3967
3969
|
pd as MonthPickerSearchParams,
|
|
3968
|
-
|
|
3970
|
+
Fe as NoInputContainer,
|
|
3969
3971
|
kd as NumericFormat,
|
|
3970
3972
|
md as NumericStepperInput,
|
|
3971
3973
|
hd as NumericTextInput,
|
|
@@ -3976,7 +3978,7 @@ export {
|
|
|
3976
3978
|
Rd as ReportPage,
|
|
3977
3979
|
Kd as ResponsiveContextDropdown,
|
|
3978
3980
|
qd as ResponsiveContextDropdownItem,
|
|
3979
|
-
|
|
3981
|
+
We as RowLabelInput,
|
|
3980
3982
|
Cd as SearchBox,
|
|
3981
3983
|
Dt as SelectInput,
|
|
3982
3984
|
yd as SettingsFormPicker,
|