react-luminus-components 1.3.137 → 1.3.139
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +67 -67
- package/dist/{FullScreenContainer-QZL25nwN.cjs → FullScreenContainer-CVKbJze4.cjs} +1 -1
- package/dist/{FullScreenContainer-Cc46PVe2.js → FullScreenContainer-fopp-NKw.js} +1 -1
- package/dist/{Loading-CA7u4kBy.js → Loading-D-8onCUM.js} +1 -1
- package/dist/{Loading-CMt3VG4t.cjs → Loading-sjvHc7Sa.cjs} +1 -1
- package/dist/{SimpleTooltip--ds7sp_S.cjs → SimpleTooltip-BZjQ0AEv.cjs} +1 -1
- package/dist/{SimpleTooltip-Bs5BLZ5t.js → SimpleTooltip-C2_3k1tX.js} +1 -1
- package/dist/components/Flexmonster/Flexmonster.d.ts +2 -1
- package/dist/components/Flexmonster/ReportPage.d.ts +2 -1
- package/dist/components/Form/TextAreaInput/TextAreaInput.d.ts +1 -1
- package/dist/components/Form/TextInput/TextInput.d.ts +1 -1
- package/dist/components/HookForm/TextAreaInput/HookFormTextAreaInput.d.ts +1 -1
- package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +1 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +3 -3
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +5 -5
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +5 -5
- package/dist/main.cjs.js +2 -2
- package/dist/main.es.js +1400 -1399
- package/dist/models/prop-types/InputProps/TextAreaInputProps.d.ts +2 -0
- package/dist/models/prop-types/InputProps/TextInputProps.d.ts +2 -0
- package/dist/{nivo-bar.es-DBTZjPsB.cjs → nivo-bar.es-COxBgUgA.cjs} +15 -15
- package/dist/{nivo-bar.es-Dum3I77T.js → nivo-bar.es-s7vl_gHE.js} +949 -949
- package/dist/{searchUtils-B5DzQW59.js → searchUtils-C9nt8MAB.js} +1 -1
- package/dist/{searchUtils-NVr-jBP1.cjs → searchUtils-CWdC2-w5.cjs} +1 -1
- package/dist/{useClipboard-BotlCgQ1.js → useClipboard-CGx1yhm_.js} +1 -1
- package/dist/{useClipboard-CMfba8aV.cjs → useClipboard-x3q2qkcm.cjs} +1 -1
- package/dist/{useGetApiData-DzpRmCDp.js → useGetApiData-HIvldLKx.js} +1 -1
- package/dist/{useGetApiData-DP6fnE--.cjs → useGetApiData-RRfvB5LW.cjs} +1 -1
- package/dist/{usePermissions-DLkjF3C2.js → usePermissions-C--KXiM9.js} +1 -1
- package/dist/{usePermissions-DAmFUO7q.cjs → usePermissions-CymKuv5R.cjs} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +4 -4
- package/package.json +1 -1
package/dist/main.es.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { j as n, c as
|
|
2
|
-
import { b5 as eu, b6 as tu, b3 as nu, b2 as ru, b7 as su, b8 as au, b4 as ou } from "./nivo-bar.es-
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import { c as ze, L as Fn } from "./Loading-
|
|
1
|
+
import { j as n, c as b, t as je, a as vt, s as In, g as Dn, m as Cs, d as kt, b as ks, e as Is, f as Ve, h as Ds, i as $s, k as Es, l as Os, n as Fs, o as Ts, p as Rs, T as ur, q as fr, r as $n, E as Ls, u as mr, v as un, w as hr, x as As, y as me, z as Tt, A as Ms, B as gr, C as Rt, D as Bs, F as nn, G as pr, H as Vs, S as rn, N as xr, I as fn, J as mn, K as zs, L as Ps, M as Ws, O as Hs, P as Us, Q as vr, R as Ys, U as Gs, V as Ks, W as qs, X as Qs, Y as Zs, Z as Js, _ as sn, $ as Xs, a0 as Ht, a1 as X, a2 as he, a3 as an, a4 as ea, a5 as ta, a6 as na, a7 as jr, a8 as jt, a9 as se, aa as hn, ab as ye, ac as gn, ad as nt, ae as ra, af as Me, ag as yr, ah as wr, ai as br, aj as rt, ak as Ye, al as sa, am as aa, an as oa, ao as ia, ap as Lt, aq as st, ar as At, as as Mt, at as _r, au as He, av as la, aw as Ae, ax as ca, ay as da, az as pn, aA as xn, aB as Nr, aC as et, aD as Sr, aE as yt, aF as ua, aG as Cr, aH as fa, aI as kr, aJ as ma, aK as ha, aL as ga, aM as $t, aN as Ir, aO as pa, aP as xa, aQ as va, aR as ja, aS as ya, aT as wa, aU as Ue, aV as ba, aW as _a, aX as Te, aY as Na, aZ as Sa, a_ as Ut, a$ as En, b0 as Ca, b1 as ka } from "./nivo-bar.es-s7vl_gHE.js";
|
|
2
|
+
import { b5 as eu, b6 as tu, b3 as nu, b2 as ru, b7 as su, b8 as au, b4 as ou } from "./nivo-bar.es-s7vl_gHE.js";
|
|
3
|
+
import * as oe from "react";
|
|
4
|
+
import ke, { useCallback as S, useMemo as Q, useContext as Z, useRef as J, useEffect as B, useState as E, useId as Ia, useLayoutEffect as Da, Component as $a, isValidElement as On, Suspense as Ea } from "react";
|
|
5
|
+
import { c as ze, L as Fn } from "./Loading-D-8onCUM.js";
|
|
6
6
|
import { InteractionType as Oa } from "@azure/msal-browser";
|
|
7
7
|
import { MsalAuthenticationTemplate as Fa } from "@azure/msal-react";
|
|
8
8
|
import { Link as tt, useNavigate as Dr, useParams as Ta, generatePath as Et, Navigate as St } from "react-router-dom";
|
|
9
9
|
import { useFormContext as Ge, Controller as vn } from "react-hook-form";
|
|
10
10
|
import { Pivot as Ra } from "react-flexmonster";
|
|
11
|
-
import { s as wt, l as pt } from "./searchUtils-
|
|
12
|
-
import { S as Bt } from "./SimpleTooltip-
|
|
11
|
+
import { s as wt, l as pt } from "./searchUtils-C9nt8MAB.js";
|
|
12
|
+
import { S as Bt } from "./SimpleTooltip-C2_3k1tX.js";
|
|
13
13
|
import { u as $r } from "./useClickOutside-BmlXg38T.js";
|
|
14
|
-
import { u as La, a as Er, b as Aa, c as Ma, d as Ba } from "./useClipboard-
|
|
14
|
+
import { u as La, a as Er, b as Aa, c as Ma, d as Ba } from "./useClipboard-CGx1yhm_.js";
|
|
15
15
|
import Ot from "react-dom";
|
|
16
|
-
import { u as Va } from "./useGetApiData-
|
|
17
|
-
import { F as za } from "./FullScreenContainer-
|
|
16
|
+
import { u as Va } from "./useGetApiData-HIvldLKx.js";
|
|
17
|
+
import { F as za } from "./FullScreenContainer-fopp-NKw.js";
|
|
18
18
|
const dd = ({ fileLoader: e, fileName: t, children: r }) => {
|
|
19
19
|
const s = S(async () => {
|
|
20
20
|
var c, l;
|
|
@@ -25,10 +25,10 @@ const dd = ({ fileLoader: e, fileName: t, children: r }) => {
|
|
|
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__ */ n.jsx("div", { role: "button", onClick: s, children: r });
|
|
28
|
-
}, Pa = ({ className: e, ...t }) => /* @__PURE__ */ n.jsxs("div", { className:
|
|
29
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
30
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
31
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
28
|
+
}, Pa = ({ className: e, ...t }) => /* @__PURE__ */ n.jsxs("div", { className: b("luminus-loading", ze.loading, ze.loadingBlock, ze.loadingBlock), ...t, children: [
|
|
29
|
+
/* @__PURE__ */ n.jsx("div", { className: b("spinner-grow", ze.spinnerGrow, "text-primary"), role: "status" }),
|
|
30
|
+
/* @__PURE__ */ n.jsx("div", { className: b("spinner-grow", ze.spinnerGrow, "text-primary", ze.second), role: "status" }),
|
|
31
|
+
/* @__PURE__ */ n.jsx("div", { className: b("spinner-grow", ze.spinnerGrow, "text-primary", ze.third), role: "status" })
|
|
32
32
|
] });
|
|
33
33
|
function Or(e, t) {
|
|
34
34
|
const r = je(e);
|
|
@@ -116,12 +116,12 @@ function on(e, t) {
|
|
|
116
116
|
if (a !== "date") {
|
|
117
117
|
const u = r.getTimezoneOffset();
|
|
118
118
|
if (u !== 0) {
|
|
119
|
-
const h = Math.abs(u),
|
|
120
|
-
i = `${u < 0 ? "+" : "-"}${
|
|
119
|
+
const h = Math.abs(u), x = Ve(Math.trunc(h / 60), 2), w = Ve(h % 60, 2);
|
|
120
|
+
i = `${u < 0 ? "+" : "-"}${x}:${w}`;
|
|
121
121
|
} else
|
|
122
122
|
i = "Z";
|
|
123
|
-
const d = Ve(r.getHours(), 2),
|
|
124
|
-
o = `${o}${f}${
|
|
123
|
+
const d = Ve(r.getHours(), 2), m = Ve(r.getMinutes(), 2), g = Ve(r.getSeconds(), 2), f = o === "" ? "" : "T", p = [d, m, g].join(l);
|
|
124
|
+
o = `${o}${f}${p}${i}`;
|
|
125
125
|
}
|
|
126
126
|
return o;
|
|
127
127
|
}
|
|
@@ -178,7 +178,7 @@ const Za = {
|
|
|
178
178
|
[mr]: "collapsing",
|
|
179
179
|
[un]: "collapsing",
|
|
180
180
|
[hr]: "collapse show"
|
|
181
|
-
}, Tr = /* @__PURE__ */
|
|
181
|
+
}, Tr = /* @__PURE__ */ ke.forwardRef(({
|
|
182
182
|
onEnter: e,
|
|
183
183
|
onEntering: t,
|
|
184
184
|
onEntered: r,
|
|
@@ -190,69 +190,69 @@ const Za = {
|
|
|
190
190
|
in: l = !1,
|
|
191
191
|
timeout: u = 300,
|
|
192
192
|
mountOnEnter: d = !1,
|
|
193
|
-
unmountOnExit:
|
|
194
|
-
appear:
|
|
193
|
+
unmountOnExit: m = !1,
|
|
194
|
+
appear: g = !1,
|
|
195
195
|
getDimensionValue: f = Qa,
|
|
196
|
-
...
|
|
196
|
+
...p
|
|
197
197
|
}, h) => {
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
}, e), [
|
|
201
|
-
const D = `scroll${
|
|
202
|
-
|
|
203
|
-
}, t), [
|
|
204
|
-
|
|
205
|
-
}, r), [
|
|
206
|
-
|
|
207
|
-
}, s), [s, f,
|
|
208
|
-
|
|
209
|
-
}, a), [
|
|
198
|
+
const x = typeof c == "function" ? c() : c, w = Q(() => gt((C) => {
|
|
199
|
+
C.style[x] = "0";
|
|
200
|
+
}, e), [x, e]), y = Q(() => gt((C) => {
|
|
201
|
+
const D = `scroll${x[0].toUpperCase()}${x.slice(1)}`;
|
|
202
|
+
C.style[x] = `${C[D]}px`;
|
|
203
|
+
}, t), [x, t]), j = Q(() => gt((C) => {
|
|
204
|
+
C.style[x] = null;
|
|
205
|
+
}, r), [x, r]), v = Q(() => gt((C) => {
|
|
206
|
+
C.style[x] = `${f(x, C)}px`, As(C);
|
|
207
|
+
}, s), [s, f, x]), _ = Q(() => gt((C) => {
|
|
208
|
+
C.style[x] = null;
|
|
209
|
+
}, a), [x, a]);
|
|
210
210
|
return /* @__PURE__ */ n.jsx(ur, {
|
|
211
211
|
ref: h,
|
|
212
212
|
addEndListener: fr,
|
|
213
|
-
...
|
|
214
|
-
"aria-expanded":
|
|
215
|
-
onEnter:
|
|
216
|
-
onEntering:
|
|
213
|
+
...p,
|
|
214
|
+
"aria-expanded": p.role ? l : null,
|
|
215
|
+
onEnter: w,
|
|
216
|
+
onEntering: y,
|
|
217
217
|
onEntered: j,
|
|
218
|
-
onExit:
|
|
219
|
-
onExiting:
|
|
218
|
+
onExit: v,
|
|
219
|
+
onExiting: _,
|
|
220
220
|
childRef: i.ref,
|
|
221
221
|
in: l,
|
|
222
222
|
timeout: u,
|
|
223
223
|
mountOnEnter: d,
|
|
224
|
-
unmountOnExit:
|
|
225
|
-
appear:
|
|
226
|
-
children: (
|
|
224
|
+
unmountOnExit: m,
|
|
225
|
+
appear: g,
|
|
226
|
+
children: (C, D) => /* @__PURE__ */ ke.cloneElement(i, {
|
|
227
227
|
...D,
|
|
228
|
-
className:
|
|
228
|
+
className: b(o, i.props.className, Za[C], x === "width" && "collapse-horizontal")
|
|
229
229
|
})
|
|
230
230
|
});
|
|
231
231
|
}), Rr = Tt("h4");
|
|
232
232
|
Rr.displayName = "DivStyledAsH4";
|
|
233
|
-
const Lr = /* @__PURE__ */
|
|
233
|
+
const Lr = /* @__PURE__ */ oe.forwardRef(({
|
|
234
234
|
className: e,
|
|
235
235
|
bsPrefix: t,
|
|
236
236
|
as: r = Rr,
|
|
237
237
|
...s
|
|
238
|
-
}, a) => (t =
|
|
238
|
+
}, a) => (t = me(t, "alert-heading"), /* @__PURE__ */ n.jsx(r, {
|
|
239
239
|
ref: a,
|
|
240
|
-
className:
|
|
240
|
+
className: b(e, t),
|
|
241
241
|
...s
|
|
242
242
|
})));
|
|
243
243
|
Lr.displayName = "AlertHeading";
|
|
244
|
-
const Ar = /* @__PURE__ */
|
|
244
|
+
const Ar = /* @__PURE__ */ oe.forwardRef(({
|
|
245
245
|
className: e,
|
|
246
246
|
bsPrefix: t,
|
|
247
247
|
as: r = Ms,
|
|
248
248
|
...s
|
|
249
|
-
}, a) => (t =
|
|
249
|
+
}, a) => (t = me(t, "alert-link"), /* @__PURE__ */ n.jsx(r, {
|
|
250
250
|
ref: a,
|
|
251
|
-
className:
|
|
251
|
+
className: b(e, t),
|
|
252
252
|
...s
|
|
253
253
|
})));
|
|
254
254
|
Ar.displayName = "AlertLink";
|
|
255
|
-
const Mr = /* @__PURE__ */
|
|
255
|
+
const Mr = /* @__PURE__ */ oe.forwardRef((e, t) => {
|
|
256
256
|
const {
|
|
257
257
|
bsPrefix: r,
|
|
258
258
|
show: s = !0,
|
|
@@ -263,67 +263,67 @@ const Mr = /* @__PURE__ */ ae.forwardRef((e, t) => {
|
|
|
263
263
|
variant: l = "primary",
|
|
264
264
|
onClose: u,
|
|
265
265
|
dismissible: d,
|
|
266
|
-
transition:
|
|
267
|
-
...
|
|
266
|
+
transition: m = nn,
|
|
267
|
+
...g
|
|
268
268
|
} = gr(e, {
|
|
269
269
|
show: "onClose"
|
|
270
|
-
}), f =
|
|
271
|
-
u && u(!1,
|
|
272
|
-
}), h =
|
|
270
|
+
}), f = me(r, "alert"), p = Rt((w) => {
|
|
271
|
+
u && u(!1, w);
|
|
272
|
+
}), h = m === !0 ? nn : m, x = /* @__PURE__ */ n.jsxs("div", {
|
|
273
273
|
role: "alert",
|
|
274
|
-
...h ? void 0 :
|
|
274
|
+
...h ? void 0 : g,
|
|
275
275
|
ref: t,
|
|
276
|
-
className:
|
|
276
|
+
className: b(i, f, l && `${f}-${l}`, d && `${f}-dismissible`),
|
|
277
277
|
children: [d && /* @__PURE__ */ n.jsx(Bs, {
|
|
278
|
-
onClick:
|
|
278
|
+
onClick: p,
|
|
279
279
|
"aria-label": a,
|
|
280
280
|
variant: o
|
|
281
281
|
}), c]
|
|
282
282
|
});
|
|
283
283
|
return h ? /* @__PURE__ */ n.jsx(h, {
|
|
284
284
|
unmountOnExit: !0,
|
|
285
|
-
...
|
|
285
|
+
...g,
|
|
286
286
|
ref: void 0,
|
|
287
287
|
in: s,
|
|
288
|
-
children:
|
|
289
|
-
}) : s ?
|
|
288
|
+
children: x
|
|
289
|
+
}) : s ? x : null;
|
|
290
290
|
});
|
|
291
291
|
Mr.displayName = "Alert";
|
|
292
292
|
const Ja = Object.assign(Mr, {
|
|
293
293
|
Link: Ar,
|
|
294
294
|
Heading: Lr
|
|
295
|
-
}), wn = /* @__PURE__ */
|
|
295
|
+
}), wn = /* @__PURE__ */ oe.forwardRef(({
|
|
296
296
|
className: e,
|
|
297
297
|
bsPrefix: t,
|
|
298
298
|
as: r = "div",
|
|
299
299
|
...s
|
|
300
|
-
}, a) => (t =
|
|
300
|
+
}, a) => (t = me(t, "card-body"), /* @__PURE__ */ n.jsx(r, {
|
|
301
301
|
ref: a,
|
|
302
|
-
className:
|
|
302
|
+
className: b(e, t),
|
|
303
303
|
...s
|
|
304
304
|
})));
|
|
305
305
|
wn.displayName = "CardBody";
|
|
306
|
-
const Br = /* @__PURE__ */
|
|
306
|
+
const Br = /* @__PURE__ */ oe.forwardRef(({
|
|
307
307
|
className: e,
|
|
308
308
|
bsPrefix: t,
|
|
309
309
|
as: r = "div",
|
|
310
310
|
...s
|
|
311
|
-
}, a) => (t =
|
|
311
|
+
}, a) => (t = me(t, "card-footer"), /* @__PURE__ */ n.jsx(r, {
|
|
312
312
|
ref: a,
|
|
313
|
-
className:
|
|
313
|
+
className: b(e, t),
|
|
314
314
|
...s
|
|
315
315
|
})));
|
|
316
316
|
Br.displayName = "CardFooter";
|
|
317
|
-
const Vr = /* @__PURE__ */
|
|
317
|
+
const Vr = /* @__PURE__ */ oe.createContext(null);
|
|
318
318
|
Vr.displayName = "CardHeaderContext";
|
|
319
|
-
const zr = /* @__PURE__ */
|
|
319
|
+
const zr = /* @__PURE__ */ oe.forwardRef(({
|
|
320
320
|
bsPrefix: e,
|
|
321
321
|
className: t,
|
|
322
322
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
323
323
|
as: r = "div",
|
|
324
324
|
...s
|
|
325
325
|
}, a) => {
|
|
326
|
-
const o =
|
|
326
|
+
const o = me(e, "card-header"), i = Q(() => ({
|
|
327
327
|
cardHeaderBsPrefix: o
|
|
328
328
|
}), [o]);
|
|
329
329
|
return /* @__PURE__ */ n.jsx(Vr.Provider, {
|
|
@@ -331,12 +331,12 @@ const zr = /* @__PURE__ */ ae.forwardRef(({
|
|
|
331
331
|
children: /* @__PURE__ */ n.jsx(r, {
|
|
332
332
|
ref: a,
|
|
333
333
|
...s,
|
|
334
|
-
className:
|
|
334
|
+
className: b(t, o)
|
|
335
335
|
})
|
|
336
336
|
});
|
|
337
337
|
});
|
|
338
338
|
zr.displayName = "CardHeader";
|
|
339
|
-
const Pr = /* @__PURE__ */
|
|
339
|
+
const Pr = /* @__PURE__ */ oe.forwardRef(
|
|
340
340
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
341
341
|
({
|
|
342
342
|
bsPrefix: e,
|
|
@@ -345,71 +345,71 @@ const Pr = /* @__PURE__ */ ae.forwardRef(
|
|
|
345
345
|
as: s = "img",
|
|
346
346
|
...a
|
|
347
347
|
}, o) => {
|
|
348
|
-
const i =
|
|
348
|
+
const i = me(e, "card-img");
|
|
349
349
|
return /* @__PURE__ */ n.jsx(s, {
|
|
350
350
|
ref: o,
|
|
351
|
-
className:
|
|
351
|
+
className: b(r ? `${i}-${r}` : i, t),
|
|
352
352
|
...a
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
355
|
);
|
|
356
356
|
Pr.displayName = "CardImg";
|
|
357
|
-
const Wr = /* @__PURE__ */
|
|
357
|
+
const Wr = /* @__PURE__ */ oe.forwardRef(({
|
|
358
358
|
className: e,
|
|
359
359
|
bsPrefix: t,
|
|
360
360
|
as: r = "div",
|
|
361
361
|
...s
|
|
362
|
-
}, a) => (t =
|
|
362
|
+
}, a) => (t = me(t, "card-img-overlay"), /* @__PURE__ */ n.jsx(r, {
|
|
363
363
|
ref: a,
|
|
364
|
-
className:
|
|
364
|
+
className: b(e, t),
|
|
365
365
|
...s
|
|
366
366
|
})));
|
|
367
367
|
Wr.displayName = "CardImgOverlay";
|
|
368
|
-
const Hr = /* @__PURE__ */
|
|
368
|
+
const Hr = /* @__PURE__ */ oe.forwardRef(({
|
|
369
369
|
className: e,
|
|
370
370
|
bsPrefix: t,
|
|
371
371
|
as: r = "a",
|
|
372
372
|
...s
|
|
373
|
-
}, a) => (t =
|
|
373
|
+
}, a) => (t = me(t, "card-link"), /* @__PURE__ */ n.jsx(r, {
|
|
374
374
|
ref: a,
|
|
375
|
-
className:
|
|
375
|
+
className: b(e, t),
|
|
376
376
|
...s
|
|
377
377
|
})));
|
|
378
378
|
Hr.displayName = "CardLink";
|
|
379
|
-
const Xa = Tt("h6"), Ur = /* @__PURE__ */
|
|
379
|
+
const Xa = Tt("h6"), Ur = /* @__PURE__ */ oe.forwardRef(({
|
|
380
380
|
className: e,
|
|
381
381
|
bsPrefix: t,
|
|
382
382
|
as: r = Xa,
|
|
383
383
|
...s
|
|
384
|
-
}, a) => (t =
|
|
384
|
+
}, a) => (t = me(t, "card-subtitle"), /* @__PURE__ */ n.jsx(r, {
|
|
385
385
|
ref: a,
|
|
386
|
-
className:
|
|
386
|
+
className: b(e, t),
|
|
387
387
|
...s
|
|
388
388
|
})));
|
|
389
389
|
Ur.displayName = "CardSubtitle";
|
|
390
|
-
const Yr = /* @__PURE__ */
|
|
390
|
+
const Yr = /* @__PURE__ */ oe.forwardRef(({
|
|
391
391
|
className: e,
|
|
392
392
|
bsPrefix: t,
|
|
393
393
|
as: r = "p",
|
|
394
394
|
...s
|
|
395
|
-
}, a) => (t =
|
|
395
|
+
}, a) => (t = me(t, "card-text"), /* @__PURE__ */ n.jsx(r, {
|
|
396
396
|
ref: a,
|
|
397
|
-
className:
|
|
397
|
+
className: b(e, t),
|
|
398
398
|
...s
|
|
399
399
|
})));
|
|
400
400
|
Yr.displayName = "CardText";
|
|
401
|
-
const eo = Tt("h5"), Gr = /* @__PURE__ */
|
|
401
|
+
const eo = Tt("h5"), Gr = /* @__PURE__ */ oe.forwardRef(({
|
|
402
402
|
className: e,
|
|
403
403
|
bsPrefix: t,
|
|
404
404
|
as: r = eo,
|
|
405
405
|
...s
|
|
406
|
-
}, a) => (t =
|
|
406
|
+
}, a) => (t = me(t, "card-title"), /* @__PURE__ */ n.jsx(r, {
|
|
407
407
|
ref: a,
|
|
408
|
-
className:
|
|
408
|
+
className: b(e, t),
|
|
409
409
|
...s
|
|
410
410
|
})));
|
|
411
411
|
Gr.displayName = "CardTitle";
|
|
412
|
-
const Kr = /* @__PURE__ */
|
|
412
|
+
const Kr = /* @__PURE__ */ oe.forwardRef(({
|
|
413
413
|
bsPrefix: e,
|
|
414
414
|
className: t,
|
|
415
415
|
bg: r,
|
|
@@ -421,11 +421,11 @@ const Kr = /* @__PURE__ */ ae.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__ */ n.jsx(c, {
|
|
426
426
|
ref: u,
|
|
427
427
|
...l,
|
|
428
|
-
className:
|
|
428
|
+
className: b(t, d, r && `bg-${r}`, s && `text-${s}`, a && `border-${a}`),
|
|
429
429
|
children: o ? /* @__PURE__ */ n.jsx(wn, {
|
|
430
430
|
children: i
|
|
431
431
|
}) : i
|
|
@@ -442,14 +442,14 @@ const Vn = Object.assign(Kr, {
|
|
|
442
442
|
Header: zr,
|
|
443
443
|
Footer: Br,
|
|
444
444
|
ImgOverlay: Wr
|
|
445
|
-
}), Vt = /* @__PURE__ */
|
|
445
|
+
}), Vt = /* @__PURE__ */ oe.forwardRef(({
|
|
446
446
|
className: e,
|
|
447
447
|
bsPrefix: t,
|
|
448
448
|
as: r = "span",
|
|
449
449
|
...s
|
|
450
|
-
}, a) => (t =
|
|
450
|
+
}, a) => (t = me(t, "input-group-text"), /* @__PURE__ */ n.jsx(r, {
|
|
451
451
|
ref: a,
|
|
452
|
-
className:
|
|
452
|
+
className: b(e, t),
|
|
453
453
|
...s
|
|
454
454
|
})));
|
|
455
455
|
Vt.displayName = "InputGroupText";
|
|
@@ -463,7 +463,7 @@ const to = (e) => /* @__PURE__ */ n.jsx(Vt, {
|
|
|
463
463
|
type: "radio",
|
|
464
464
|
...e
|
|
465
465
|
})
|
|
466
|
-
}), qr = /* @__PURE__ */
|
|
466
|
+
}), qr = /* @__PURE__ */ oe.forwardRef(({
|
|
467
467
|
bsPrefix: e,
|
|
468
468
|
size: t,
|
|
469
469
|
hasValidation: r,
|
|
@@ -472,14 +472,14 @@ const to = (e) => /* @__PURE__ */ n.jsx(Vt, {
|
|
|
472
472
|
as: a = "div",
|
|
473
473
|
...o
|
|
474
474
|
}, i) => {
|
|
475
|
-
e =
|
|
475
|
+
e = me(e, "input-group");
|
|
476
476
|
const c = Q(() => ({}), []);
|
|
477
477
|
return /* @__PURE__ */ n.jsx(Vs.Provider, {
|
|
478
478
|
value: c,
|
|
479
479
|
children: /* @__PURE__ */ n.jsx(a, {
|
|
480
480
|
ref: i,
|
|
481
481
|
...o,
|
|
482
|
-
className:
|
|
482
|
+
className: b(s, e, t && `${e}-${t}`, r && "has-validation")
|
|
483
483
|
})
|
|
484
484
|
});
|
|
485
485
|
});
|
|
@@ -488,7 +488,7 @@ const It = Object.assign(qr, {
|
|
|
488
488
|
Text: Vt,
|
|
489
489
|
Radio: no,
|
|
490
490
|
Checkbox: to
|
|
491
|
-
}), Qr = /* @__PURE__ */
|
|
491
|
+
}), Qr = /* @__PURE__ */ oe.createContext(null), ro = ["as", "active", "eventKey"];
|
|
492
492
|
function so(e, t) {
|
|
493
493
|
if (e == null) return {};
|
|
494
494
|
var r = {};
|
|
@@ -513,16 +513,16 @@ function Zr({
|
|
|
513
513
|
};
|
|
514
514
|
if (c) {
|
|
515
515
|
!a && c.role === "tablist" && (d.role = "tab");
|
|
516
|
-
const
|
|
517
|
-
d[fn("event-key")] = e, d.id =
|
|
516
|
+
const m = c.getControllerId(e ?? null), g = c.getControlledId(e ?? null);
|
|
517
|
+
d[fn("event-key")] = e, d.id = m || s, u = r == null && e != null ? c.activeKey === e : r, (u || !(l != null && l.unmountOnExit) && !(l != null && l.mountOnEnter)) && (d["aria-controls"] = g);
|
|
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 = Rt((
|
|
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 = Rt((m) => {
|
|
520
|
+
o || (t == null || t(m), e != null && i && !m.isPropagationStopped() && i(e, m));
|
|
521
521
|
}), [d, {
|
|
522
522
|
isActive: u
|
|
523
523
|
}];
|
|
524
524
|
}
|
|
525
|
-
const Jr = /* @__PURE__ */
|
|
525
|
+
const Jr = /* @__PURE__ */ oe.forwardRef((e, t) => {
|
|
526
526
|
let {
|
|
527
527
|
as: r = zs,
|
|
528
528
|
active: s,
|
|
@@ -548,7 +548,7 @@ function oo(e, t) {
|
|
|
548
548
|
return r;
|
|
549
549
|
}
|
|
550
550
|
const zn = () => {
|
|
551
|
-
}, Pn = fn("event-key"), Xr = /* @__PURE__ */
|
|
551
|
+
}, Pn = fn("event-key"), Xr = /* @__PURE__ */ oe.forwardRef((e, t) => {
|
|
552
552
|
let {
|
|
553
553
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
554
554
|
as: r = "div",
|
|
@@ -557,59 +557,59 @@ const zn = () => {
|
|
|
557
557
|
role: o,
|
|
558
558
|
onKeyDown: i
|
|
559
559
|
} = e, c = oo(e, ao);
|
|
560
|
-
const l = Ps(), u = J(!1), d = Z(rn),
|
|
561
|
-
let
|
|
562
|
-
|
|
563
|
-
const
|
|
564
|
-
const
|
|
565
|
-
if (!
|
|
566
|
-
const
|
|
567
|
-
if (
|
|
568
|
-
const D =
|
|
560
|
+
const l = Ps(), u = J(!1), d = Z(rn), m = Z(Qr);
|
|
561
|
+
let g, f;
|
|
562
|
+
m && (o = o || "tablist", a = m.activeKey, g = m.getControlledId, f = m.getControllerId);
|
|
563
|
+
const p = J(null), h = (j) => {
|
|
564
|
+
const v = p.current;
|
|
565
|
+
if (!v) return null;
|
|
566
|
+
const _ = Us(v, `[${Pn}]:not([aria-disabled=true])`), C = v.querySelector("[aria-selected=true]");
|
|
567
|
+
if (!C || C !== document.activeElement) return null;
|
|
568
|
+
const D = _.indexOf(C);
|
|
569
569
|
if (D === -1) return null;
|
|
570
|
-
let
|
|
571
|
-
return
|
|
572
|
-
},
|
|
573
|
-
j != null && (s == null || s(j,
|
|
574
|
-
},
|
|
575
|
-
if (i == null || i(j), !
|
|
570
|
+
let k = D + j;
|
|
571
|
+
return k >= _.length && (k = 0), k < 0 && (k = _.length - 1), _[k];
|
|
572
|
+
}, x = (j, v) => {
|
|
573
|
+
j != null && (s == null || s(j, v), d == null || d(j, v));
|
|
574
|
+
}, w = (j) => {
|
|
575
|
+
if (i == null || i(j), !m)
|
|
576
576
|
return;
|
|
577
|
-
let
|
|
577
|
+
let v;
|
|
578
578
|
switch (j.key) {
|
|
579
579
|
case "ArrowLeft":
|
|
580
580
|
case "ArrowUp":
|
|
581
|
-
|
|
581
|
+
v = h(-1);
|
|
582
582
|
break;
|
|
583
583
|
case "ArrowRight":
|
|
584
584
|
case "ArrowDown":
|
|
585
|
-
|
|
585
|
+
v = h(1);
|
|
586
586
|
break;
|
|
587
587
|
default:
|
|
588
588
|
return;
|
|
589
589
|
}
|
|
590
|
-
|
|
590
|
+
v && (j.preventDefault(), x(v.dataset[Hs("EventKey")] || null, j), u.current = !0, l());
|
|
591
591
|
};
|
|
592
|
-
|
|
593
|
-
if (
|
|
594
|
-
const j =
|
|
592
|
+
B(() => {
|
|
593
|
+
if (p.current && u.current) {
|
|
594
|
+
const j = p.current.querySelector(`[${Pn}][aria-selected=true]`);
|
|
595
595
|
j == null || j.focus();
|
|
596
596
|
}
|
|
597
597
|
u.current = !1;
|
|
598
598
|
});
|
|
599
|
-
const
|
|
599
|
+
const y = Ws(t, p);
|
|
600
600
|
return /* @__PURE__ */ n.jsx(rn.Provider, {
|
|
601
|
-
value:
|
|
601
|
+
value: x,
|
|
602
602
|
children: /* @__PURE__ */ n.jsx(xr.Provider, {
|
|
603
603
|
value: {
|
|
604
604
|
role: o,
|
|
605
605
|
// used by NavLink to determine it's role
|
|
606
606
|
activeKey: mn(a),
|
|
607
|
-
getControlledId:
|
|
607
|
+
getControlledId: g || zn,
|
|
608
608
|
getControllerId: f || zn
|
|
609
609
|
},
|
|
610
610
|
children: /* @__PURE__ */ n.jsx(r, Object.assign({}, c, {
|
|
611
|
-
onKeyDown:
|
|
612
|
-
ref:
|
|
611
|
+
onKeyDown: w,
|
|
612
|
+
ref: y,
|
|
613
613
|
role: o
|
|
614
614
|
}))
|
|
615
615
|
})
|
|
@@ -618,7 +618,7 @@ const zn = () => {
|
|
|
618
618
|
Xr.displayName = "Nav";
|
|
619
619
|
const io = Object.assign(Xr, {
|
|
620
620
|
Item: Jr
|
|
621
|
-
}), bn = /* @__PURE__ */
|
|
621
|
+
}), bn = /* @__PURE__ */ oe.forwardRef(({
|
|
622
622
|
bsPrefix: e,
|
|
623
623
|
active: t,
|
|
624
624
|
disabled: r,
|
|
@@ -629,17 +629,17 @@ const io = Object.assign(Xr, {
|
|
|
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, m] = Zr({
|
|
634
634
|
key: mn(s, l.href),
|
|
635
635
|
active: t,
|
|
636
636
|
...l
|
|
637
|
-
}),
|
|
637
|
+
}), g = Rt((p) => {
|
|
638
638
|
if (r) {
|
|
639
|
-
|
|
639
|
+
p.preventDefault(), p.stopPropagation();
|
|
640
640
|
return;
|
|
641
641
|
}
|
|
642
|
-
d.onClick(
|
|
642
|
+
d.onClick(p);
|
|
643
643
|
});
|
|
644
644
|
r && l.tabIndex === void 0 && (l.tabIndex = -1, l["aria-disabled"] = !0);
|
|
645
645
|
const f = c || (i ? l.href ? "a" : "button" : "div");
|
|
@@ -647,12 +647,12 @@ const io = Object.assign(Xr, {
|
|
|
647
647
|
ref: u,
|
|
648
648
|
...l,
|
|
649
649
|
...d,
|
|
650
|
-
onClick:
|
|
651
|
-
className:
|
|
650
|
+
onClick: g,
|
|
651
|
+
className: b(a, e, m.isActive && "active", r && "disabled", o && `${e}-${o}`, i && `${e}-action`)
|
|
652
652
|
});
|
|
653
653
|
});
|
|
654
654
|
bn.displayName = "ListGroupItem";
|
|
655
|
-
const es = /* @__PURE__ */
|
|
655
|
+
const es = /* @__PURE__ */ oe.forwardRef((e, t) => {
|
|
656
656
|
const {
|
|
657
657
|
className: r,
|
|
658
658
|
bsPrefix: s,
|
|
@@ -664,13 +664,13 @@ const es = /* @__PURE__ */ ae.forwardRef((e, t) => {
|
|
|
664
664
|
...l
|
|
665
665
|
} = gr(e, {
|
|
666
666
|
activeKey: "onSelect"
|
|
667
|
-
}), u =
|
|
667
|
+
}), u = me(s, "list-group");
|
|
668
668
|
let d;
|
|
669
669
|
return o && (d = o === !0 ? "horizontal" : `horizontal-${o}`), process.env.NODE_ENV !== "production" && vr(!(o && a === "flush"), '`variant="flush"` and `horizontal` should not be used together.'), /* @__PURE__ */ n.jsx(io, {
|
|
670
670
|
ref: t,
|
|
671
671
|
...l,
|
|
672
672
|
as: c,
|
|
673
|
-
className:
|
|
673
|
+
className: b(r, u, a && `${u}-${a}`, d && `${u}-${d}`, i && `${u}-numbered`)
|
|
674
674
|
});
|
|
675
675
|
});
|
|
676
676
|
es.displayName = "ListGroup";
|
|
@@ -684,7 +684,7 @@ const lo = Object.assign(es, {
|
|
|
684
684
|
return s || (s = t.matchMedia(e), s.refCount = 0, r.set(s.media, s)), s;
|
|
685
685
|
};
|
|
686
686
|
function co(e, t = typeof window > "u" ? void 0 : window) {
|
|
687
|
-
const r = Wn(e, t), [s, a] =
|
|
687
|
+
const r = Wn(e, t), [s, a] = E(() => r ? r.matches : !1);
|
|
688
688
|
return Ys(() => {
|
|
689
689
|
let o = Wn(e, t);
|
|
690
690
|
if (!o)
|
|
@@ -720,8 +720,8 @@ function uo(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 co(
|
|
723
|
+
let m = Q(() => Object.entries(d).reduce((g, [f, p]) => ((p === "up" || p === !0) && (g = r(g, o(f))), (p === "down" || p === !0) && (g = r(g, a(f))), g), ""), [JSON.stringify(d)]);
|
|
724
|
+
return co(m, u);
|
|
725
725
|
}
|
|
726
726
|
return i;
|
|
727
727
|
}
|
|
@@ -732,21 +732,21 @@ const fo = uo({
|
|
|
732
732
|
lg: 992,
|
|
733
733
|
xl: 1200,
|
|
734
734
|
xxl: 1400
|
|
735
|
-
}), ts = /* @__PURE__ */
|
|
735
|
+
}), ts = /* @__PURE__ */ oe.forwardRef(({
|
|
736
736
|
className: e,
|
|
737
737
|
bsPrefix: t,
|
|
738
738
|
as: r = "div",
|
|
739
739
|
...s
|
|
740
|
-
}, a) => (t =
|
|
740
|
+
}, a) => (t = me(t, "offcanvas-body"), /* @__PURE__ */ n.jsx(r, {
|
|
741
741
|
ref: a,
|
|
742
|
-
className:
|
|
742
|
+
className: b(e, t),
|
|
743
743
|
...s
|
|
744
744
|
})));
|
|
745
745
|
ts.displayName = "OffcanvasBody";
|
|
746
746
|
const mo = {
|
|
747
747
|
[un]: "show",
|
|
748
748
|
[hr]: "show"
|
|
749
|
-
}, ns = /* @__PURE__ */
|
|
749
|
+
}, ns = /* @__PURE__ */ oe.forwardRef(({
|
|
750
750
|
bsPrefix: e,
|
|
751
751
|
className: t,
|
|
752
752
|
children: r,
|
|
@@ -755,7 +755,7 @@ const mo = {
|
|
|
755
755
|
unmountOnExit: o = !1,
|
|
756
756
|
appear: i = !1,
|
|
757
757
|
...c
|
|
758
|
-
}, l) => (e =
|
|
758
|
+
}, l) => (e = me(e, "offcanvas"), /* @__PURE__ */ n.jsx(ur, {
|
|
759
759
|
ref: l,
|
|
760
760
|
addEndListener: fr,
|
|
761
761
|
in: s,
|
|
@@ -764,34 +764,34 @@ const mo = {
|
|
|
764
764
|
appear: i,
|
|
765
765
|
...c,
|
|
766
766
|
childRef: r.ref,
|
|
767
|
-
children: (u, d) => /* @__PURE__ */
|
|
767
|
+
children: (u, d) => /* @__PURE__ */ oe.cloneElement(r, {
|
|
768
768
|
...d,
|
|
769
|
-
className:
|
|
769
|
+
className: b(t, r.props.className, (u === un || u === mr) && `${e}-toggling`, mo[u])
|
|
770
770
|
})
|
|
771
771
|
})));
|
|
772
772
|
ns.displayName = "OffcanvasToggling";
|
|
773
|
-
const rs = /* @__PURE__ */
|
|
773
|
+
const rs = /* @__PURE__ */ oe.forwardRef(({
|
|
774
774
|
bsPrefix: e,
|
|
775
775
|
className: t,
|
|
776
776
|
closeLabel: r = "Close",
|
|
777
777
|
closeButton: s = !1,
|
|
778
778
|
...a
|
|
779
|
-
}, o) => (e =
|
|
779
|
+
}, o) => (e = me(e, "offcanvas-header"), /* @__PURE__ */ n.jsx(Gs, {
|
|
780
780
|
ref: o,
|
|
781
781
|
...a,
|
|
782
|
-
className:
|
|
782
|
+
className: b(t, e),
|
|
783
783
|
closeLabel: r,
|
|
784
784
|
closeButton: s
|
|
785
785
|
})));
|
|
786
786
|
rs.displayName = "OffcanvasHeader";
|
|
787
|
-
const ho = Tt("h5"), ss = /* @__PURE__ */
|
|
787
|
+
const ho = Tt("h5"), ss = /* @__PURE__ */ oe.forwardRef(({
|
|
788
788
|
className: e,
|
|
789
789
|
bsPrefix: t,
|
|
790
790
|
as: r = ho,
|
|
791
791
|
...s
|
|
792
|
-
}, a) => (t =
|
|
792
|
+
}, a) => (t = me(t, "offcanvas-title"), /* @__PURE__ */ n.jsx(r, {
|
|
793
793
|
ref: a,
|
|
794
|
-
className:
|
|
794
|
+
className: b(e, t),
|
|
795
795
|
...s
|
|
796
796
|
})));
|
|
797
797
|
ss.displayName = "OffcanvasTitle";
|
|
@@ -805,7 +805,7 @@ function po(e) {
|
|
|
805
805
|
...e
|
|
806
806
|
});
|
|
807
807
|
}
|
|
808
|
-
const as = /* @__PURE__ */
|
|
808
|
+
const as = /* @__PURE__ */ oe.forwardRef(({
|
|
809
809
|
bsPrefix: e,
|
|
810
810
|
className: t,
|
|
811
811
|
children: r,
|
|
@@ -818,79 +818,79 @@ const as = /* @__PURE__ */ ae.forwardRef(({
|
|
|
818
818
|
keyboard: l = !0,
|
|
819
819
|
scroll: u = !1,
|
|
820
820
|
onEscapeKeyDown: d,
|
|
821
|
-
onShow:
|
|
822
|
-
onHide:
|
|
821
|
+
onShow: m,
|
|
822
|
+
onHide: g,
|
|
823
823
|
container: f,
|
|
824
|
-
autoFocus:
|
|
824
|
+
autoFocus: p = !0,
|
|
825
825
|
enforceFocus: h = !0,
|
|
826
|
-
restoreFocus:
|
|
827
|
-
restoreFocusOptions:
|
|
828
|
-
onEntered:
|
|
826
|
+
restoreFocus: x = !0,
|
|
827
|
+
restoreFocusOptions: w,
|
|
828
|
+
onEntered: y,
|
|
829
829
|
onExit: j,
|
|
830
|
-
onExiting:
|
|
831
|
-
onEnter:
|
|
832
|
-
onEntering:
|
|
830
|
+
onExiting: v,
|
|
831
|
+
onEnter: _,
|
|
832
|
+
onEntering: C,
|
|
833
833
|
onExited: D,
|
|
834
|
-
backdropClassName:
|
|
835
|
-
manager:
|
|
836
|
-
renderStaticNode:
|
|
837
|
-
...
|
|
838
|
-
},
|
|
839
|
-
const
|
|
840
|
-
e =
|
|
841
|
-
const [
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
}, [i, o,
|
|
845
|
-
const
|
|
846
|
-
onHide:
|
|
847
|
-
}), [
|
|
834
|
+
backdropClassName: k,
|
|
835
|
+
manager: T,
|
|
836
|
+
renderStaticNode: I = !1,
|
|
837
|
+
...O
|
|
838
|
+
}, $) => {
|
|
839
|
+
const N = J();
|
|
840
|
+
e = me(e, "offcanvas");
|
|
841
|
+
const [M, re] = E(!1), R = Rt(g), z = fo(o || "xs", "up");
|
|
842
|
+
B(() => {
|
|
843
|
+
re(o ? i && !z : i);
|
|
844
|
+
}, [i, o, z]);
|
|
845
|
+
const L = Q(() => ({
|
|
846
|
+
onHide: R
|
|
847
|
+
}), [R]);
|
|
848
848
|
function G() {
|
|
849
|
-
return
|
|
849
|
+
return T || (u ? (N.current || (N.current = new Qs({
|
|
850
850
|
handleContainerOverflow: !1
|
|
851
|
-
})),
|
|
851
|
+
})), N.current) : Zs());
|
|
852
852
|
}
|
|
853
|
-
const W = (
|
|
854
|
-
|
|
855
|
-
}, K = (
|
|
856
|
-
|
|
857
|
-
},
|
|
858
|
-
...
|
|
859
|
-
className:
|
|
860
|
-
}), [
|
|
861
|
-
...
|
|
862
|
-
...
|
|
863
|
-
className:
|
|
853
|
+
const W = (H, ...F) => {
|
|
854
|
+
H && (H.style.visibility = "visible"), _ == null || _(H, ...F);
|
|
855
|
+
}, K = (H, ...F) => {
|
|
856
|
+
H && (H.style.visibility = ""), D == null || D(...F);
|
|
857
|
+
}, ee = S((H) => /* @__PURE__ */ n.jsx("div", {
|
|
858
|
+
...H,
|
|
859
|
+
className: b(`${e}-backdrop`, k)
|
|
860
|
+
}), [k, e]), P = (H) => /* @__PURE__ */ n.jsx("div", {
|
|
861
|
+
...H,
|
|
862
|
+
...O,
|
|
863
|
+
className: b(t, o ? `${e}-${o}` : e, `${e}-${a}`),
|
|
864
864
|
"aria-labelledby": s,
|
|
865
865
|
children: r
|
|
866
866
|
});
|
|
867
867
|
return /* @__PURE__ */ n.jsxs(n.Fragment, {
|
|
868
|
-
children: [!
|
|
869
|
-
value:
|
|
868
|
+
children: [!M && (o || I) && P({}), /* @__PURE__ */ n.jsx(Ks.Provider, {
|
|
869
|
+
value: L,
|
|
870
870
|
children: /* @__PURE__ */ n.jsx(qs, {
|
|
871
|
-
show:
|
|
872
|
-
ref:
|
|
871
|
+
show: M,
|
|
872
|
+
ref: $,
|
|
873
873
|
backdrop: c,
|
|
874
874
|
container: f,
|
|
875
875
|
keyboard: l,
|
|
876
|
-
autoFocus:
|
|
876
|
+
autoFocus: p,
|
|
877
877
|
enforceFocus: h && !u,
|
|
878
|
-
restoreFocus:
|
|
879
|
-
restoreFocusOptions:
|
|
878
|
+
restoreFocus: x,
|
|
879
|
+
restoreFocusOptions: w,
|
|
880
880
|
onEscapeKeyDown: d,
|
|
881
|
-
onShow:
|
|
882
|
-
onHide:
|
|
881
|
+
onShow: m,
|
|
882
|
+
onHide: R,
|
|
883
883
|
onEnter: W,
|
|
884
|
-
onEntering:
|
|
885
|
-
onEntered:
|
|
884
|
+
onEntering: C,
|
|
885
|
+
onEntered: y,
|
|
886
886
|
onExit: j,
|
|
887
|
-
onExiting:
|
|
887
|
+
onExiting: v,
|
|
888
888
|
onExited: K,
|
|
889
889
|
manager: G(),
|
|
890
890
|
transition: go,
|
|
891
891
|
backdropTransition: po,
|
|
892
|
-
renderBackdrop:
|
|
893
|
-
renderDialog:
|
|
892
|
+
renderBackdrop: ee,
|
|
893
|
+
renderDialog: P
|
|
894
894
|
})
|
|
895
895
|
})]
|
|
896
896
|
});
|
|
@@ -908,17 +908,17 @@ function os({
|
|
|
908
908
|
size: s,
|
|
909
909
|
...a
|
|
910
910
|
}) {
|
|
911
|
-
r =
|
|
911
|
+
r = me(r, "placeholder");
|
|
912
912
|
const [{
|
|
913
913
|
className: o,
|
|
914
914
|
...i
|
|
915
915
|
}] = Js(a);
|
|
916
916
|
return {
|
|
917
917
|
...i,
|
|
918
|
-
className:
|
|
918
|
+
className: b(o, e ? `${r}-${e}` : r, s && `${r}-${s}`, t && `bg-${t}`)
|
|
919
919
|
};
|
|
920
920
|
}
|
|
921
|
-
const is = /* @__PURE__ */
|
|
921
|
+
const is = /* @__PURE__ */ oe.forwardRef((e, t) => {
|
|
922
922
|
const r = os(e);
|
|
923
923
|
return /* @__PURE__ */ n.jsx(sn, {
|
|
924
924
|
...r,
|
|
@@ -928,7 +928,7 @@ const is = /* @__PURE__ */ ae.forwardRef((e, t) => {
|
|
|
928
928
|
});
|
|
929
929
|
});
|
|
930
930
|
is.displayName = "PlaceholderButton";
|
|
931
|
-
const ls = /* @__PURE__ */
|
|
931
|
+
const ls = /* @__PURE__ */ oe.forwardRef(({
|
|
932
932
|
as: e = "span",
|
|
933
933
|
...t
|
|
934
934
|
}, r) => {
|
|
@@ -941,7 +941,7 @@ const ls = /* @__PURE__ */ ae.forwardRef(({
|
|
|
941
941
|
ls.displayName = "Placeholder";
|
|
942
942
|
const Pe = Object.assign(ls, {
|
|
943
943
|
Button: is
|
|
944
|
-
}), _n = /* @__PURE__ */
|
|
944
|
+
}), _n = /* @__PURE__ */ oe.forwardRef(({
|
|
945
945
|
bsPrefix: e,
|
|
946
946
|
variant: t,
|
|
947
947
|
animation: r = "border",
|
|
@@ -951,20 +951,20 @@ const Pe = Object.assign(ls, {
|
|
|
951
951
|
className: o,
|
|
952
952
|
...i
|
|
953
953
|
}, c) => {
|
|
954
|
-
e =
|
|
954
|
+
e = me(e, "spinner");
|
|
955
955
|
const l = `${e}-${r}`;
|
|
956
956
|
return /* @__PURE__ */ n.jsx(a, {
|
|
957
957
|
ref: c,
|
|
958
958
|
...i,
|
|
959
|
-
className:
|
|
959
|
+
className: b(o, l, s && `${l}-${s}`, t && `text-${t}`)
|
|
960
960
|
});
|
|
961
961
|
});
|
|
962
962
|
_n.displayName = "Spinner";
|
|
963
|
-
const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, popoverClassName: o, ...i }) => /* @__PURE__ */ n.jsx(Xs, { placement: r, overlay: /* @__PURE__ */ n.jsxs(Ht, { className:
|
|
964
|
-
e && /* @__PURE__ */ n.jsx(Ht.Header, { children: typeof e == "string" ? /* @__PURE__ */ n.jsx(
|
|
963
|
+
const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, popoverClassName: o, ...i }) => /* @__PURE__ */ n.jsx(Xs, { placement: r, overlay: /* @__PURE__ */ n.jsxs(Ht, { className: b("luminus-popover", o), onClick: (c) => c.stopPropagation(), children: [
|
|
964
|
+
e && /* @__PURE__ */ n.jsx(Ht.Header, { children: typeof e == "string" ? /* @__PURE__ */ n.jsx(X, { variant: "h6", className: "text-primary", children: e }) : e }),
|
|
965
965
|
/* @__PURE__ */ n.jsx(Ht.Body, { children: t })
|
|
966
966
|
] }), trigger: a ?? "hover", rootClose: !0, show: i.controlled ? i.isOpen : void 0, onToggle: i.controlled ? (c) => i.setIsOpen(c) : void 0, children: s }), xo = ({ children: e, onStorno: t, noSpacer: r }) => {
|
|
967
|
-
const { texts: { formSubmit: s } } = Z(
|
|
967
|
+
const { texts: { formSubmit: s } } = Z(he);
|
|
968
968
|
return /* @__PURE__ */ n.jsxs(lc, { noSpacer: r, children: [
|
|
969
969
|
/* @__PURE__ */ n.jsxs(an, { as: "button", color: "primary", size: "lg", type: "submit", children: [
|
|
970
970
|
/* @__PURE__ */ n.jsx(ea, {}),
|
|
@@ -980,7 +980,7 @@ const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
|
|
|
980
980
|
d.target.files && (a(d.target.files), d.target.value = "");
|
|
981
981
|
};
|
|
982
982
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
983
|
-
/* @__PURE__ */ n.jsxs("label", { htmlFor: r, className:
|
|
983
|
+
/* @__PURE__ */ n.jsxs("label", { htmlFor: r, className: b(`luminus-context-button btn text-${e} ${o ?? ""}`, na.button), ...l, children: [
|
|
984
984
|
t,
|
|
985
985
|
i
|
|
986
986
|
] }),
|
|
@@ -996,7 +996,7 @@ const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
|
|
|
996
996
|
}
|
|
997
997
|
}, [e]), i = Ia();
|
|
998
998
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
999
|
-
/* @__PURE__ */ n.jsx("label", { htmlFor: i, className:
|
|
999
|
+
/* @__PURE__ */ n.jsx("label", { htmlFor: i, className: b("btn luminus-context-button text-primary", `btn-${a}`, s), children: r }),
|
|
1000
1000
|
/* @__PURE__ */ n.jsx("input", { id: i, type: "file", accept: t, onChange: o, hidden: !0 })
|
|
1001
1001
|
] });
|
|
1002
1002
|
}, vo = "_select_dlv1t_1", qt = {
|
|
@@ -1012,24 +1012,24 @@ const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
|
|
|
1012
1012
|
return l;
|
|
1013
1013
|
}, [s, a]), c = Q(() => {
|
|
1014
1014
|
const d = [];
|
|
1015
|
-
for (let
|
|
1015
|
+
for (let m = 0; m <= 11; m++)
|
|
1016
1016
|
d.push({
|
|
1017
|
-
id:
|
|
1018
|
-
name: jt(new Date(2024,
|
|
1017
|
+
id: m,
|
|
1018
|
+
name: jt(new Date(2024, m, 1), "LLLL", { locale: r })
|
|
1019
1019
|
});
|
|
1020
1020
|
return d;
|
|
1021
1021
|
}, [r]);
|
|
1022
1022
|
return /* @__PURE__ */ n.jsxs("div", { className: "card d-flex flex-row align-items-center m-0 p-1 gap-2", children: [
|
|
1023
|
-
/* @__PURE__ */ n.jsx(
|
|
1023
|
+
/* @__PURE__ */ n.jsx(se, { onClick: () => o(-1), disabled: e.getFullYear() < s || e.getFullYear() === s && e.getMonth() <= 0, children: /* @__PURE__ */ n.jsx(hn, {}) }),
|
|
1024
1024
|
/* @__PURE__ */ n.jsx(ye.Select, { value: e.getMonth(), onChange: (l) => {
|
|
1025
1025
|
var u;
|
|
1026
1026
|
return ((u = l.target) == null ? void 0 : u.value) && t(Ka(e, Number(l.target.value)));
|
|
1027
|
-
}, className:
|
|
1027
|
+
}, className: b(qt.select, qt.month), children: c.map((l) => /* @__PURE__ */ n.jsx("option", { value: l.id, children: l.name }, l.id)) }),
|
|
1028
1028
|
/* @__PURE__ */ n.jsx(ye.Select, { value: e.getFullYear(), onChange: (l) => {
|
|
1029
1029
|
var u;
|
|
1030
1030
|
return ((u = l.target) == null ? void 0 : u.value) && t(Fr(e, Number(l.target.value)));
|
|
1031
|
-
}, className:
|
|
1032
|
-
/* @__PURE__ */ n.jsx(
|
|
1031
|
+
}, className: b(qt.select), children: i.map((l) => /* @__PURE__ */ n.jsx("option", { value: l, children: l }, l)) }),
|
|
1032
|
+
/* @__PURE__ */ n.jsx(se, { onClick: () => o(1), disabled: e.getFullYear() > a || e.getFullYear() === a && e.getMonth() >= 11, children: /* @__PURE__ */ n.jsx(gn, {}) })
|
|
1033
1033
|
] });
|
|
1034
1034
|
}, yo = "_select_pywmr_1", wo = {
|
|
1035
1035
|
select: yo
|
|
@@ -1043,13 +1043,13 @@ const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
|
|
|
1043
1043
|
c.push(l);
|
|
1044
1044
|
return c;
|
|
1045
1045
|
}, [r, s]);
|
|
1046
|
-
return /* @__PURE__ */ n.jsxs("div", { className:
|
|
1047
|
-
/* @__PURE__ */ n.jsx(
|
|
1046
|
+
return /* @__PURE__ */ n.jsxs("div", { className: b("card d-flex flex-row align-items-center m-0 p-1 gap-2", a ?? ""), children: [
|
|
1047
|
+
/* @__PURE__ */ n.jsx(se, { onClick: () => o(-1), disabled: e.getFullYear() <= r, children: /* @__PURE__ */ n.jsx(hn, {}) }),
|
|
1048
1048
|
/* @__PURE__ */ n.jsx(ye.Select, { value: e.getFullYear(), onChange: (c) => {
|
|
1049
1049
|
var l;
|
|
1050
1050
|
return ((l = c.target) == null ? void 0 : l.value) && t(Fr(e, Number(c.target.value)));
|
|
1051
1051
|
}, className: wo.select, children: i.map((c) => /* @__PURE__ */ n.jsx("option", { value: c, children: c }, c)) }),
|
|
1052
|
-
/* @__PURE__ */ n.jsx(
|
|
1052
|
+
/* @__PURE__ */ n.jsx(se, { onClick: () => o(1), disabled: e.getFullYear() >= s, children: /* @__PURE__ */ n.jsx(gn, {}) })
|
|
1053
1053
|
] });
|
|
1054
1054
|
}, _o = "_widget_etgh3_1", No = {
|
|
1055
1055
|
widget: _o
|
|
@@ -1060,41 +1060,41 @@ const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
|
|
|
1060
1060
|
return /* @__PURE__ */ n.jsx(tt, { to: s, className: "luminus-input-container position-relative w-100 text-decoration-none", children: r });
|
|
1061
1061
|
}, us = ({ InputContainer: e = nt, label: t, value: r, onChange: s, hidden: a, disabled: o, className: i, type: c, withoutLabel: l, indeterminate: u }) => {
|
|
1062
1062
|
const d = J(null);
|
|
1063
|
-
return
|
|
1063
|
+
return B(() => {
|
|
1064
1064
|
d.current && (d.current.indeterminate = u ?? !1);
|
|
1065
|
-
}, [d, u]), /* @__PURE__ */ n.jsx(e, { isForCheckInput: !0, hidden: a, label: t ?? "", withoutLabel: l, className: i, children: /* @__PURE__ */ n.jsx(ye.Check, { ref: d, id: `check-${t}`, type: c ?? "checkbox", label: t ?? "", checked: r, onChange: (
|
|
1066
|
-
var
|
|
1067
|
-
s && s(((
|
|
1065
|
+
}, [d, u]), /* @__PURE__ */ n.jsx(e, { isForCheckInput: !0, hidden: a, label: t ?? "", withoutLabel: l, className: i, children: /* @__PURE__ */ n.jsx(ye.Check, { ref: d, id: `check-${t}`, type: c ?? "checkbox", label: t ?? "", checked: r, onChange: (m) => {
|
|
1066
|
+
var g;
|
|
1067
|
+
s && s(((g = m.target) == null ? void 0 : g.checked) ?? !1);
|
|
1068
1068
|
}, className: i ?? "", hidden: a ?? !1, disabled: o ?? !1 }) });
|
|
1069
|
-
}, it = ({ InputContainer: e = nt, type: t, value: r, onChange: s, debounceMs: a, label: o, withoutLabel: i, placeholder: c, size: l, hidden: u, disabled: d, showClearIcon:
|
|
1070
|
-
const
|
|
1069
|
+
}, it = ({ InputContainer: e = nt, type: t, value: r, onChange: s, debounceMs: a, label: o, withoutLabel: i, placeholder: c, size: l, hidden: u, disabled: d, showClearIcon: m, clearValue: g, list: f, className: p, step: h, minLength: x, maxLength: w, noSelectOnFocus: y }) => {
|
|
1070
|
+
const j = t === "number", v = S(() => {
|
|
1071
1071
|
if (!s)
|
|
1072
1072
|
return;
|
|
1073
|
-
const
|
|
1074
|
-
s(
|
|
1075
|
-
}, [
|
|
1076
|
-
const
|
|
1077
|
-
s && (
|
|
1078
|
-
}, [
|
|
1079
|
-
var
|
|
1080
|
-
const
|
|
1073
|
+
const N = g ?? null;
|
|
1074
|
+
s(j ? N ? Number(N) : null : (N == null ? void 0 : N.toString()) ?? "");
|
|
1075
|
+
}, [g, j, s]), _ = J(null), [C, D] = E((r == null ? void 0 : r.toString()) ?? ""), k = S((N) => {
|
|
1076
|
+
const M = N;
|
|
1077
|
+
s && (j && s(M == null || M === "" ? null : Number(M)), s(M || null));
|
|
1078
|
+
}, [j, s]), T = S((N) => {
|
|
1079
|
+
var re;
|
|
1080
|
+
const M = (re = N.target) == null ? void 0 : re.value;
|
|
1081
1081
|
if (!a) {
|
|
1082
|
-
|
|
1082
|
+
k(M);
|
|
1083
1083
|
return;
|
|
1084
1084
|
}
|
|
1085
|
-
|
|
1086
|
-
|
|
1085
|
+
D(M), _.current !== null && window.clearTimeout(_.current), _.current = window.setTimeout(() => {
|
|
1086
|
+
k(M);
|
|
1087
1087
|
}, a);
|
|
1088
|
-
}, [a,
|
|
1089
|
-
|
|
1090
|
-
|
|
1088
|
+
}, [a, k]);
|
|
1089
|
+
B(() => {
|
|
1090
|
+
D(r === null ? "" : r.toString());
|
|
1091
1091
|
}, [r]);
|
|
1092
|
-
const [I,
|
|
1093
|
-
return /* @__PURE__ */ n.jsxs(e, { withoutLabel: i, label: o ?? "", hidden: u, className:
|
|
1094
|
-
/* @__PURE__ */ n.jsx(ye.Control, { type:
|
|
1095
|
-
|
|
1096
|
-
}, onBlur: () =>
|
|
1097
|
-
|
|
1092
|
+
const [I, O] = E(!1), $ = ra(t, r ? r.toString() ?? null : null, I);
|
|
1093
|
+
return /* @__PURE__ */ n.jsxs(e, { withoutLabel: i, label: o ?? "", hidden: u, className: p, children: [
|
|
1094
|
+
/* @__PURE__ */ n.jsx(ye.Control, { type: $, placeholder: c ?? o, size: l, value: a ? C : (r == null ? void 0 : r.toString()) ?? "", onChange: T, className: p ?? "", hidden: u, disabled: d ?? !1, list: f, onFocus: (N) => {
|
|
1095
|
+
O(!0), !y && N.target.select();
|
|
1096
|
+
}, onBlur: () => O(!1), step: h, minLength: x, maxLength: w }),
|
|
1097
|
+
m && r !== null && s && !d && /* @__PURE__ */ n.jsx("div", { className: `luminus-input-remove-icon ${t !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: v, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
|
|
1098
1098
|
] });
|
|
1099
1099
|
}, Ft = ({
|
|
1100
1100
|
InputContainer: e = nt,
|
|
@@ -1108,144 +1108,144 @@ const ud = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
|
|
|
1108
1108
|
hidden: l,
|
|
1109
1109
|
disabled: u,
|
|
1110
1110
|
noSortOptions: d,
|
|
1111
|
-
className:
|
|
1112
|
-
suffixIdToName:
|
|
1111
|
+
className: m,
|
|
1112
|
+
suffixIdToName: g,
|
|
1113
1113
|
noEmptyOption: f,
|
|
1114
1114
|
// it will still add the empty option if there is no value provided or value is empty string or null
|
|
1115
|
-
appendCurrentSelectionWithName:
|
|
1115
|
+
appendCurrentSelectionWithName: p,
|
|
1116
1116
|
dropdownWidth: h
|
|
1117
1117
|
}) => {
|
|
1118
|
-
const { texts: { customSelect:
|
|
1119
|
-
|
|
1120
|
-
}, []),
|
|
1121
|
-
var
|
|
1122
|
-
return
|
|
1123
|
-
}, [
|
|
1124
|
-
const
|
|
1125
|
-
return
|
|
1126
|
-
id:
|
|
1127
|
-
name: D(
|
|
1128
|
-
})).filter((
|
|
1129
|
-
}, [r, d, j, D,
|
|
1130
|
-
var
|
|
1131
|
-
s && s((
|
|
1132
|
-
}, [s, i]),
|
|
1133
|
-
|
|
1134
|
-
}, [
|
|
1135
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: l, inputContainerClassName:
|
|
1136
|
-
/* @__PURE__ */ n.jsxs(ye.Select, { ref:
|
|
1137
|
-
|
|
1118
|
+
const { texts: { customSelect: x } } = Z(he), [w, y] = E(!1), [j, v] = E(""), _ = S(($) => {
|
|
1119
|
+
v($);
|
|
1120
|
+
}, []), C = Q(() => r.find(($) => $.id === t) ?? null, [r, t]), D = S(($) => {
|
|
1121
|
+
var N;
|
|
1122
|
+
return $ === null ? "" : !$.name || $.name.length === 0 ? ((N = $.id) == null ? void 0 : N.toString()) ?? "" : g ? `${$.name} (${$.id})` : $.name;
|
|
1123
|
+
}, [g]), k = Q(() => {
|
|
1124
|
+
const $ = r ?? [];
|
|
1125
|
+
return p !== void 0 && t !== void 0 && t !== null && ($.some((N) => N.id === t) || $.push({ id: t, name: p })), $.map((N) => ({
|
|
1126
|
+
id: N.id,
|
|
1127
|
+
name: D(N)
|
|
1128
|
+
})).filter((N) => wt(N.name, j)).sort((N, M) => d ? 0 : (N.name ?? "").localeCompare(M.name ?? ""));
|
|
1129
|
+
}, [r, d, j, D, p, t]), T = S(($) => {
|
|
1130
|
+
var N;
|
|
1131
|
+
s && s(($ == null ? void 0 : $.id) === void 0 || ($ == null ? void 0 : $.id) === null ? null : i ? Number($.id) : (N = $.id) == null ? void 0 : N.toString());
|
|
1132
|
+
}, [s, i]), I = S(($) => {
|
|
1133
|
+
y(!1), T($);
|
|
1134
|
+
}, [T]), O = J(null);
|
|
1135
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: l, inputContainerClassName: b({ "luminus-dropdown-select-open": w }), className: m, children: [
|
|
1136
|
+
/* @__PURE__ */ n.jsxs(ye.Select, { ref: O, size: c, value: t ?? "", onMouseDown: ($) => {
|
|
1137
|
+
$.currentTarget.focus(), $.preventDefault();
|
|
1138
1138
|
}, onClick: () => {
|
|
1139
|
-
!u &&
|
|
1140
|
-
}, className:
|
|
1139
|
+
!u && y(!0);
|
|
1140
|
+
}, className: b("w-100", {
|
|
1141
1141
|
"luminus-dropdown-picker-disabled": u
|
|
1142
1142
|
}), hidden: l, children: [
|
|
1143
1143
|
f && !(t == null || t === "") ? void 0 : /* @__PURE__ */ n.jsx("option", { value: "" }),
|
|
1144
|
-
t != null && /* @__PURE__ */ n.jsx("option", { value: t, children: D(
|
|
1144
|
+
t != null && /* @__PURE__ */ n.jsx("option", { value: t, children: D(C) })
|
|
1145
1145
|
] }),
|
|
1146
|
-
|
|
1146
|
+
O.current && /* @__PURE__ */ n.jsx(Pt, { show: w, onCancel: () => y(!1), items: k, currentSelection: C ?? null, onSelectionChange: I, onSearchQueryChange: _, texts: x, disabled: u, inputRef: O, autoHideSearch: !0, allItemsLength: r.length, itemsNameWidth: h })
|
|
1147
1147
|
] }) });
|
|
1148
|
-
}, md = ({ InputContainer: e = nt, items: t, selectedItemNavigateTo: r, onSearchQueryChange: s, texts: a, isLoading: o, value: i, onSelect: c, label: l, withoutLabel: u, size: d, dropdownItemsNameWidth:
|
|
1149
|
-
const [
|
|
1150
|
-
c && c(
|
|
1151
|
-
}, [c]), D = S((
|
|
1152
|
-
|
|
1153
|
-
}, [
|
|
1154
|
-
var
|
|
1155
|
-
return h ? ((
|
|
1148
|
+
}, md = ({ InputContainer: e = nt, items: t, selectedItemNavigateTo: r, onSearchQueryChange: s, texts: a, isLoading: o, value: i, onSelect: c, label: l, withoutLabel: u, size: d, dropdownItemsNameWidth: m, additionalColumns: g, hidden: f, disabled: p, displayIdAsName: h, CustomOnChangeComponent: x, className: w, archiveColumn: y, icon: j }) => {
|
|
1149
|
+
const [v, _] = E(!1), C = S(($) => {
|
|
1150
|
+
c && c($);
|
|
1151
|
+
}, [c]), D = S(($) => {
|
|
1152
|
+
_(!1), C($);
|
|
1153
|
+
}, [C]), k = J(null), T = r !== void 0, I = T && i !== null, O = Q(() => {
|
|
1154
|
+
var $, N;
|
|
1155
|
+
return h ? (($ = i == null ? void 0 : i.id) == null ? void 0 : $.toString()) ?? "" : i != null && i.name && i.name.length > 0 ? i.name : ((N = i == null ? void 0 : i.id) == null ? void 0 : N.toString()) ?? "";
|
|
1156
1156
|
}, [i, h]);
|
|
1157
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: u, label: l ?? "", hidden: f, inputContainerClassName:
|
|
1157
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: u, label: l ?? "", hidden: f, inputContainerClassName: b({ "luminus-dropdown-select-open": v }), className: w, children: [
|
|
1158
1158
|
/* @__PURE__ */ n.jsxs(ds, { currentSelection: i, selectedItemNavigateTo: r, children: [
|
|
1159
|
-
h && (i == null ? void 0 : i.name) && /* @__PURE__ */ n.jsx(
|
|
1159
|
+
h && (i == null ? void 0 : i.name) && /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: i.name }),
|
|
1160
1160
|
/* @__PURE__ */ n.jsxs(
|
|
1161
1161
|
ye.Select,
|
|
1162
1162
|
{
|
|
1163
|
-
ref:
|
|
1163
|
+
ref: k,
|
|
1164
1164
|
size: d,
|
|
1165
1165
|
value: (i == null ? void 0 : i.id) ?? "",
|
|
1166
|
-
onMouseDown: (
|
|
1167
|
-
|
|
1166
|
+
onMouseDown: ($) => {
|
|
1167
|
+
$.currentTarget.focus(), $.preventDefault();
|
|
1168
1168
|
},
|
|
1169
1169
|
onClick: () => {
|
|
1170
|
-
!
|
|
1170
|
+
!T && !p && _(!0);
|
|
1171
1171
|
},
|
|
1172
|
-
className:
|
|
1173
|
-
"luminus-dropdown-picker-disabled":
|
|
1174
|
-
"luminus-dropdown-picker-link":
|
|
1172
|
+
className: b("w-100", {
|
|
1173
|
+
"luminus-dropdown-picker-disabled": p,
|
|
1174
|
+
"luminus-dropdown-picker-link": I
|
|
1175
1175
|
}),
|
|
1176
1176
|
hidden: f,
|
|
1177
1177
|
children: [
|
|
1178
1178
|
/* @__PURE__ */ n.jsx("option", { value: "" }),
|
|
1179
|
-
i && /* @__PURE__ */ n.jsx("option", { value: i.id ?? void 0, children:
|
|
1179
|
+
i && /* @__PURE__ */ n.jsx("option", { value: i.id ?? void 0, children: O })
|
|
1180
1180
|
]
|
|
1181
1181
|
}
|
|
1182
1182
|
),
|
|
1183
|
-
|
|
1184
|
-
!
|
|
1185
|
-
|
|
1183
|
+
x || !p && T ? /* @__PURE__ */ n.jsxs("div", { className: "custom-picker-button", children: [
|
|
1184
|
+
!x && !p && T && /* @__PURE__ */ n.jsx(se, { size: "sm", color: "secondary", onClick: ($) => {
|
|
1185
|
+
$.preventDefault(), $.stopPropagation(), _(!0);
|
|
1186
1186
|
}, children: j ?? /* @__PURE__ */ n.jsx(yr, {}) }),
|
|
1187
|
-
|
|
1187
|
+
x ?? null
|
|
1188
1188
|
] }) : null
|
|
1189
1189
|
] }),
|
|
1190
|
-
|
|
1190
|
+
k.current && /* @__PURE__ */ n.jsx(Pt, { show: v, onCancel: () => _(!1), items: t, currentSelection: i, onSelectionChange: D, onSearchQueryChange: s, texts: a, itemsNameWidth: m, additionalColumns: g, isLoading: o, disabled: p, inputRef: k, archiveColumn: y, displayIdAsName: h })
|
|
1191
1191
|
] }) });
|
|
1192
|
-
}, hd = ({ InputContainer: e = nt, value: t, onChange: r, label: s, size: a, showClearIcon: o, clearValue: i, hidden: c, disabled: l, rows: u, withoutLabel: d, debounceMs: g, className:
|
|
1193
|
-
const
|
|
1192
|
+
}, hd = ({ InputContainer: e = nt, value: t, onChange: r, label: s, size: a, showClearIcon: o, clearValue: i, hidden: c, disabled: l, rows: u, withoutLabel: d, debounceMs: m, minLength: g, maxLength: f, className: p }) => {
|
|
1193
|
+
const h = S(() => {
|
|
1194
1194
|
if (!r)
|
|
1195
1195
|
return;
|
|
1196
|
-
const
|
|
1197
|
-
r((
|
|
1198
|
-
}, [i, r]),
|
|
1199
|
-
const
|
|
1200
|
-
r && r(
|
|
1201
|
-
}, [r]),
|
|
1202
|
-
var
|
|
1203
|
-
const
|
|
1204
|
-
if (!
|
|
1205
|
-
|
|
1196
|
+
const _ = i ?? null;
|
|
1197
|
+
r((_ == null ? void 0 : _.toString()) ?? "");
|
|
1198
|
+
}, [i, r]), x = J(null), [w, y] = E((t == null ? void 0 : t.toString()) ?? ""), j = S((_) => {
|
|
1199
|
+
const C = _;
|
|
1200
|
+
r && r(C || null);
|
|
1201
|
+
}, [r]), v = S((_) => {
|
|
1202
|
+
var D;
|
|
1203
|
+
const C = (D = _.target) == null ? void 0 : D.value;
|
|
1204
|
+
if (!m) {
|
|
1205
|
+
j(C);
|
|
1206
1206
|
return;
|
|
1207
1207
|
}
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
},
|
|
1211
|
-
}, [
|
|
1212
|
-
return
|
|
1213
|
-
|
|
1214
|
-
}, [t]), /* @__PURE__ */ n.jsxs(e, { label: s ?? "", hidden: c, withoutLabel: d, className:
|
|
1215
|
-
/* @__PURE__ */ n.jsx(ye.Control, { as: "textarea", size: a, value:
|
|
1216
|
-
o && t && r && !l && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(
|
|
1208
|
+
y(C), x.current !== null && window.clearTimeout(x.current), x.current = window.setTimeout(() => {
|
|
1209
|
+
j(C);
|
|
1210
|
+
}, m);
|
|
1211
|
+
}, [m, j]);
|
|
1212
|
+
return B(() => {
|
|
1213
|
+
y(t === null ? "" : t.toString());
|
|
1214
|
+
}, [t]), /* @__PURE__ */ n.jsxs(e, { label: s ?? "", hidden: c, withoutLabel: d, className: p, isForTextAreaInput: !0, children: [
|
|
1215
|
+
/* @__PURE__ */ n.jsx(ye.Control, { as: "textarea", size: a, value: m ? w : t ?? "", onChange: v, hidden: c, disabled: l, rows: u ?? 2, className: "w-100", minLength: g, maxLength: f }),
|
|
1216
|
+
o && t && r && !l && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: h, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
|
|
1217
1217
|
] });
|
|
1218
|
-
}, gd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size: c, hidden: l, disabled: u, showClearIcon: d, clearValue:
|
|
1219
|
-
const
|
|
1218
|
+
}, gd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size: c, hidden: l, disabled: u, showClearIcon: d, clearValue: m, className: g, step: f, stepperStep: p = 1, min: h, max: x }) => {
|
|
1219
|
+
const w = S(() => {
|
|
1220
1220
|
if (!r)
|
|
1221
1221
|
return;
|
|
1222
|
-
const D =
|
|
1222
|
+
const D = m ?? null;
|
|
1223
1223
|
r(D ? Number(D) : null);
|
|
1224
|
-
}, [
|
|
1225
|
-
const
|
|
1226
|
-
r && r(
|
|
1227
|
-
}, [
|
|
1228
|
-
var
|
|
1229
|
-
const
|
|
1224
|
+
}, [m, r]), y = J(null), [j, v] = E((t == null ? void 0 : t.toString()) ?? ""), _ = S((D) => {
|
|
1225
|
+
const k = D;
|
|
1226
|
+
r && r(k == null || k === "" ? null : pt(Number(k), h, x));
|
|
1227
|
+
}, [x, h, r]), C = S((D) => {
|
|
1228
|
+
var T;
|
|
1229
|
+
const k = (T = D.target) == null ? void 0 : T.value;
|
|
1230
1230
|
if (!s) {
|
|
1231
|
-
|
|
1231
|
+
_(k);
|
|
1232
1232
|
return;
|
|
1233
1233
|
}
|
|
1234
|
-
|
|
1235
|
-
|
|
1234
|
+
v(pt(Number(k), h, x).toString()), y.current !== null && window.clearTimeout(y.current), y.current = window.setTimeout(() => {
|
|
1235
|
+
_(k);
|
|
1236
1236
|
}, s);
|
|
1237
|
-
}, [s,
|
|
1238
|
-
return
|
|
1239
|
-
|
|
1240
|
-
}, [
|
|
1241
|
-
/* @__PURE__ */ n.jsx(ye.Control, { type: "number", placeholder: i ?? a, size: c, value: s ? j : t ?? "", onChange:
|
|
1242
|
-
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ n.jsx(
|
|
1243
|
-
D.preventDefault(), D.stopPropagation(),
|
|
1237
|
+
}, [s, _, x, h]);
|
|
1238
|
+
return B(() => {
|
|
1239
|
+
v(t === null ? "" : pt(t, h, x).toString());
|
|
1240
|
+
}, [x, h, t]), /* @__PURE__ */ n.jsx(e, { withoutLabel: o, label: a ?? "", hidden: l, className: g, children: /* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
1241
|
+
/* @__PURE__ */ n.jsx(ye.Control, { type: "number", placeholder: i ?? a, size: c, value: s ? j : t ?? "", onChange: C, className: `luminus-numeric-stepper ${g ?? ""}`, hidden: l, disabled: u ?? !1, step: f }),
|
|
1242
|
+
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (D) => {
|
|
1243
|
+
D.preventDefault(), D.stopPropagation(), _(((t ?? 0) - p).toString());
|
|
1244
1244
|
}, children: /* @__PURE__ */ n.jsx(wr, {}) }) }),
|
|
1245
|
-
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ n.jsx(
|
|
1246
|
-
D.preventDefault(), D.stopPropagation(),
|
|
1245
|
+
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (D) => {
|
|
1246
|
+
D.preventDefault(), D.stopPropagation(), _(((t ?? 0) + p).toString());
|
|
1247
1247
|
}, children: /* @__PURE__ */ n.jsx(br, {}) }) }),
|
|
1248
|
-
d && t && r && !u && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(
|
|
1248
|
+
d && t && r && !u && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: w, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
|
|
1249
1249
|
] }) });
|
|
1250
1250
|
};
|
|
1251
1251
|
function fs(e, t) {
|
|
@@ -1352,12 +1352,12 @@ function ps(e) {
|
|
|
1352
1352
|
function Yn(e, t, r) {
|
|
1353
1353
|
if (["", "-"].indexOf(e) !== -1)
|
|
1354
1354
|
return e;
|
|
1355
|
-
var s = (e.indexOf(".") !== -1 || r) && t, a = Nn(e), o = a.beforeDecimal, i = a.afterDecimal, c = a.hasNegation, l = parseFloat("0." + (i || "0")), u = i.length <= t ? "0." + i : l.toFixed(t), d = u.split("."),
|
|
1356
|
-
o && Number(d[0]) && (
|
|
1357
|
-
return h.length >
|
|
1355
|
+
var s = (e.indexOf(".") !== -1 || r) && t, a = Nn(e), o = a.beforeDecimal, i = a.afterDecimal, c = a.hasNegation, l = parseFloat("0." + (i || "0")), u = i.length <= t ? "0." + i : l.toFixed(t), d = u.split("."), m = o;
|
|
1356
|
+
o && Number(d[0]) && (m = o.split("").reverse().reduce(function(h, x, w) {
|
|
1357
|
+
return h.length > w ? (Number(h[0]) + Number(x)).toString() + h.substring(1, h.length) : x + h;
|
|
1358
1358
|
}, d[0]));
|
|
1359
|
-
var
|
|
1360
|
-
return "" + f +
|
|
1359
|
+
var g = gs(d[1] || "", t, r), f = c ? "-" : "", p = s ? "." : "";
|
|
1360
|
+
return "" + f + m + p + g;
|
|
1361
1361
|
}
|
|
1362
1362
|
function Xe(e, t) {
|
|
1363
1363
|
if (e.value = e.value, e !== null) {
|
|
@@ -1412,33 +1412,33 @@ function Ro(e) {
|
|
|
1412
1412
|
}
|
|
1413
1413
|
function Lo(e, t, r, s, a, o, i) {
|
|
1414
1414
|
i === void 0 && (i = Ro);
|
|
1415
|
-
var c = a.findIndex(function(
|
|
1416
|
-
return
|
|
1415
|
+
var c = a.findIndex(function(v) {
|
|
1416
|
+
return v;
|
|
1417
1417
|
}), l = e.slice(0, c);
|
|
1418
1418
|
!t && !r.startsWith(l) && (t = l, r = l + r, s = s + l.length);
|
|
1419
|
-
for (var u = r.length, d = e.length,
|
|
1420
|
-
|
|
1421
|
-
for (var
|
|
1422
|
-
var
|
|
1419
|
+
for (var u = r.length, d = e.length, m = {}, g = new Array(u), f = 0; f < u; f++) {
|
|
1420
|
+
g[f] = -1;
|
|
1421
|
+
for (var p = 0, h = d; p < h; p++) {
|
|
1422
|
+
var x = i({
|
|
1423
1423
|
currentValue: r,
|
|
1424
1424
|
lastValue: t,
|
|
1425
1425
|
formattedValue: e,
|
|
1426
1426
|
currentValueIndex: f,
|
|
1427
|
-
formattedValueIndex:
|
|
1427
|
+
formattedValueIndex: p
|
|
1428
1428
|
});
|
|
1429
|
-
if (
|
|
1430
|
-
|
|
1429
|
+
if (x && m[p] !== !0) {
|
|
1430
|
+
g[f] = p, m[p] = !0;
|
|
1431
1431
|
break;
|
|
1432
1432
|
}
|
|
1433
1433
|
}
|
|
1434
1434
|
}
|
|
1435
|
-
for (var
|
|
1436
|
-
|
|
1437
|
-
var
|
|
1438
|
-
for (
|
|
1439
|
-
|
|
1440
|
-
var j =
|
|
1441
|
-
return j >
|
|
1435
|
+
for (var w = s; w < u && (g[w] === -1 || !o(r[w])); )
|
|
1436
|
+
w++;
|
|
1437
|
+
var y = w === u || g[w] === -1 ? d : g[w];
|
|
1438
|
+
for (w = s - 1; w > 0 && g[w] === -1; )
|
|
1439
|
+
w--;
|
|
1440
|
+
var j = w === -1 || g[w] === -1 ? 0 : g[w] + 1;
|
|
1441
|
+
return j > y ? y : s - j < y - s ? j : y;
|
|
1442
1442
|
}
|
|
1443
1443
|
function Gn(e, t, r, s) {
|
|
1444
1444
|
var a = e.length;
|
|
@@ -1462,19 +1462,19 @@ function Ao(e) {
|
|
|
1462
1462
|
}
|
|
1463
1463
|
function vs(e, t, r, s, a, o) {
|
|
1464
1464
|
o === void 0 && (o = We);
|
|
1465
|
-
var i = Do(function(
|
|
1466
|
-
var
|
|
1467
|
-
return ms(
|
|
1468
|
-
}), c =
|
|
1465
|
+
var i = Do(function(p, h) {
|
|
1466
|
+
var x, w;
|
|
1467
|
+
return ms(p) ? (w = "", x = "") : typeof p == "number" || h ? (w = typeof p == "number" ? ps(p) : p, x = s(w)) : (w = a(p, void 0), x = s(w)), { formattedValue: x, numAsString: w };
|
|
1468
|
+
}), c = E(function() {
|
|
1469
1469
|
return i(lt(e) ? t : e, r);
|
|
1470
|
-
}), l = c[0], u = c[1], d = function(
|
|
1471
|
-
|
|
1472
|
-
formattedValue:
|
|
1473
|
-
numAsString:
|
|
1474
|
-
}), o(
|
|
1475
|
-
},
|
|
1476
|
-
lt(e) && (
|
|
1477
|
-
var f = i(
|
|
1470
|
+
}), l = c[0], u = c[1], d = function(p, h) {
|
|
1471
|
+
p.formattedValue !== l.formattedValue && u({
|
|
1472
|
+
formattedValue: p.formattedValue,
|
|
1473
|
+
numAsString: p.value
|
|
1474
|
+
}), o(p, h);
|
|
1475
|
+
}, m = e, g = r;
|
|
1476
|
+
lt(e) && (m = l.numAsString, g = !0);
|
|
1477
|
+
var f = i(m, g);
|
|
1478
1478
|
return Q(function() {
|
|
1479
1479
|
u(f);
|
|
1480
1480
|
}, [f.formattedValue]), [l, d];
|
|
@@ -1494,149 +1494,149 @@ function Vo(e) {
|
|
|
1494
1494
|
i === void 0 && (i = Bo);
|
|
1495
1495
|
var c = e.removeFormatting;
|
|
1496
1496
|
c === void 0 && (c = Mo);
|
|
1497
|
-
var l = e.defaultValue, u = e.valueIsNumericString, d = e.onValueChange,
|
|
1498
|
-
|
|
1497
|
+
var l = e.defaultValue, u = e.valueIsNumericString, d = e.onValueChange, m = e.isAllowed, g = e.onChange;
|
|
1498
|
+
g === void 0 && (g = We);
|
|
1499
1499
|
var f = e.onKeyDown;
|
|
1500
1500
|
f === void 0 && (f = We);
|
|
1501
|
-
var
|
|
1502
|
-
|
|
1501
|
+
var p = e.onMouseUp;
|
|
1502
|
+
p === void 0 && (p = We);
|
|
1503
1503
|
var h = e.onFocus;
|
|
1504
1504
|
h === void 0 && (h = We);
|
|
1505
|
-
var
|
|
1506
|
-
|
|
1507
|
-
var
|
|
1508
|
-
|
|
1505
|
+
var x = e.onBlur;
|
|
1506
|
+
x === void 0 && (x = We);
|
|
1507
|
+
var w = e.value, y = e.getCaretBoundary;
|
|
1508
|
+
y === void 0 && (y = Ao);
|
|
1509
1509
|
var j = e.isValidInputCharacter;
|
|
1510
1510
|
j === void 0 && (j = _t);
|
|
1511
|
-
var
|
|
1512
|
-
|
|
1513
|
-
},
|
|
1511
|
+
var v = e.isCharacterSame, _ = fs(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), C = vs(w, l, !!u, i, c, d), D = C[0], k = D.formattedValue, T = D.numAsString, I = C[1], O = J(), $ = J({ formattedValue: k, numAsString: T }), N = function(A, V) {
|
|
1512
|
+
$.current = { formattedValue: A.formattedValue, numAsString: A.value }, I(A, V);
|
|
1513
|
+
}, M = E(!1), re = M[0], R = M[1], z = J(null), L = J({
|
|
1514
1514
|
setCaretTimeout: null,
|
|
1515
1515
|
focusTimeout: null
|
|
1516
1516
|
});
|
|
1517
|
-
|
|
1518
|
-
return
|
|
1519
|
-
clearTimeout(
|
|
1517
|
+
B(function() {
|
|
1518
|
+
return R(!0), function() {
|
|
1519
|
+
clearTimeout(L.current.setCaretTimeout), clearTimeout(L.current.focusTimeout);
|
|
1520
1520
|
};
|
|
1521
1521
|
}, []);
|
|
1522
|
-
var G = i, W = function(A,
|
|
1523
|
-
var q = parseFloat(
|
|
1522
|
+
var G = i, W = function(A, V) {
|
|
1523
|
+
var q = parseFloat(V);
|
|
1524
1524
|
return {
|
|
1525
1525
|
formattedValue: A,
|
|
1526
|
-
value:
|
|
1526
|
+
value: V,
|
|
1527
1527
|
floatValue: isNaN(q) ? void 0 : q
|
|
1528
1528
|
};
|
|
1529
|
-
}, K = function(A,
|
|
1530
|
-
A.selectionStart === 0 && A.selectionEnd === A.value.length || (Xe(A,
|
|
1531
|
-
A.value === q && A.selectionStart !==
|
|
1529
|
+
}, K = function(A, V, q) {
|
|
1530
|
+
A.selectionStart === 0 && A.selectionEnd === A.value.length || (Xe(A, V), L.current.setCaretTimeout = setTimeout(function() {
|
|
1531
|
+
A.value === q && A.selectionStart !== V && Xe(A, V);
|
|
1532
1532
|
}, 0));
|
|
1533
|
-
},
|
|
1534
|
-
return Gn(A,
|
|
1535
|
-
},
|
|
1536
|
-
var ce =
|
|
1537
|
-
return
|
|
1538
|
-
},
|
|
1539
|
-
var
|
|
1540
|
-
|
|
1541
|
-
var q = A.input, ce = A.source,
|
|
1533
|
+
}, ee = function(A, V, q) {
|
|
1534
|
+
return Gn(A, V, y(A), q);
|
|
1535
|
+
}, P = function(A, V, q) {
|
|
1536
|
+
var ce = y(V), Se = Lo(V, k, A, q, ce, j, v);
|
|
1537
|
+
return Se = Gn(V, Se, ce), Se;
|
|
1538
|
+
}, H = function(A) {
|
|
1539
|
+
var V = A.formattedValue;
|
|
1540
|
+
V === void 0 && (V = "");
|
|
1541
|
+
var q = A.input, ce = A.source, Se = A.event, de = A.numAsString, ae;
|
|
1542
1542
|
if (q) {
|
|
1543
|
-
var
|
|
1544
|
-
q.value =
|
|
1543
|
+
var Ie = A.inputValue || q.value, Ee = Qt(q);
|
|
1544
|
+
q.value = V, ae = P(Ie, V, Ee), ae !== void 0 && K(q, ae, V);
|
|
1545
1545
|
}
|
|
1546
|
-
|
|
1546
|
+
V !== k && N(W(V, de), { event: Se, source: ce });
|
|
1547
1547
|
};
|
|
1548
|
-
|
|
1549
|
-
var A =
|
|
1550
|
-
(
|
|
1548
|
+
B(function() {
|
|
1549
|
+
var A = $.current, V = A.formattedValue, q = A.numAsString;
|
|
1550
|
+
(k !== V || T !== q) && N(W(k, T), {
|
|
1551
1551
|
event: void 0,
|
|
1552
1552
|
source: bt.props
|
|
1553
1553
|
});
|
|
1554
|
-
}, [
|
|
1555
|
-
var
|
|
1556
|
-
|
|
1557
|
-
var A =
|
|
1558
|
-
if (
|
|
1559
|
-
var
|
|
1560
|
-
A.value =
|
|
1554
|
+
}, [k, T]);
|
|
1555
|
+
var F = z.current ? Qt(z.current) : void 0, ne = typeof window < "u" ? Da : B;
|
|
1556
|
+
ne(function() {
|
|
1557
|
+
var A = z.current;
|
|
1558
|
+
if (k !== $.current.formattedValue && A) {
|
|
1559
|
+
var V = P($.current.formattedValue, k, F);
|
|
1560
|
+
A.value = k, K(A, V, k);
|
|
1561
1561
|
}
|
|
1562
|
-
}, [
|
|
1563
|
-
var
|
|
1564
|
-
var ce =
|
|
1565
|
-
if (
|
|
1566
|
-
var Ee =
|
|
1567
|
-
return Ee.value =
|
|
1562
|
+
}, [k]);
|
|
1563
|
+
var ge = function(A, V, q) {
|
|
1564
|
+
var ce = V.target, Se = O.current ? Eo(O.current, ce.selectionEnd) : xs(k, A), de = Object.assign(Object.assign({}, Se), { lastValue: k }), ae = c(A, de), Ie = G(ae);
|
|
1565
|
+
if (ae = c(Ie, void 0), m && !m(W(Ie, ae))) {
|
|
1566
|
+
var Ee = V.target, Oe = Qt(Ee), Y = P(A, k, Oe);
|
|
1567
|
+
return Ee.value = k, K(Ee, Y, k), !1;
|
|
1568
1568
|
}
|
|
1569
|
-
return
|
|
1570
|
-
formattedValue:
|
|
1571
|
-
numAsString:
|
|
1569
|
+
return H({
|
|
1570
|
+
formattedValue: Ie,
|
|
1571
|
+
numAsString: ae,
|
|
1572
1572
|
inputValue: A,
|
|
1573
|
-
event:
|
|
1573
|
+
event: V,
|
|
1574
1574
|
source: q,
|
|
1575
|
-
input:
|
|
1575
|
+
input: V.target
|
|
1576
1576
|
}), !0;
|
|
1577
|
-
},
|
|
1578
|
-
|
|
1577
|
+
}, fe = function(A, V) {
|
|
1578
|
+
V === void 0 && (V = 0);
|
|
1579
1579
|
var q = A.selectionStart, ce = A.selectionEnd;
|
|
1580
|
-
|
|
1581
|
-
},
|
|
1582
|
-
var
|
|
1583
|
-
ce &&
|
|
1584
|
-
},
|
|
1585
|
-
var
|
|
1580
|
+
O.current = { selectionStart: q, selectionEnd: ce + V };
|
|
1581
|
+
}, te = function(A) {
|
|
1582
|
+
var V = A.target, q = V.value, ce = ge(q, A, bt.event);
|
|
1583
|
+
ce && g(A), O.current = void 0;
|
|
1584
|
+
}, we = function(A) {
|
|
1585
|
+
var V = A.target, q = A.key, ce = V.selectionStart, Se = V.selectionEnd, de = V.value;
|
|
1586
1586
|
de === void 0 && (de = "");
|
|
1587
|
-
var
|
|
1588
|
-
q === "ArrowLeft" || q === "Backspace" ?
|
|
1589
|
-
var
|
|
1590
|
-
q === "Delete" && ce ===
|
|
1587
|
+
var ae;
|
|
1588
|
+
q === "ArrowLeft" || q === "Backspace" ? ae = Math.max(ce - 1, 0) : q === "ArrowRight" ? ae = Math.min(ce + 1, de.length) : q === "Delete" && (ae = ce);
|
|
1589
|
+
var Ie = 0;
|
|
1590
|
+
q === "Delete" && ce === Se && (Ie = 1);
|
|
1591
1591
|
var Ee = q === "ArrowLeft" || q === "ArrowRight";
|
|
1592
|
-
if (
|
|
1593
|
-
f(A),
|
|
1592
|
+
if (ae === void 0 || ce !== Se && !Ee) {
|
|
1593
|
+
f(A), fe(V, Ie);
|
|
1594
1594
|
return;
|
|
1595
1595
|
}
|
|
1596
|
-
var Oe =
|
|
1596
|
+
var Oe = ae;
|
|
1597
1597
|
if (Ee) {
|
|
1598
1598
|
var Y = q === "ArrowLeft" ? "left" : "right";
|
|
1599
|
-
Oe =
|
|
1600
|
-
} else q === "Delete" && !j(de[
|
|
1601
|
-
Oe !==
|
|
1602
|
-
},
|
|
1603
|
-
var
|
|
1604
|
-
var ce =
|
|
1605
|
-
if (de === void 0 && (de = ""), ce ===
|
|
1606
|
-
var
|
|
1607
|
-
|
|
1599
|
+
Oe = ee(de, ae, Y), Oe !== ae && A.preventDefault();
|
|
1600
|
+
} else q === "Delete" && !j(de[ae]) ? Oe = ee(de, ae, "right") : q === "Backspace" && !j(de[ae]) && (Oe = ee(de, ae, "left"));
|
|
1601
|
+
Oe !== ae && K(V, Oe, de), f(A), fe(V, Ie);
|
|
1602
|
+
}, Ce = function(A) {
|
|
1603
|
+
var V = A.target, q = function() {
|
|
1604
|
+
var ce = V.selectionStart, Se = V.selectionEnd, de = V.value;
|
|
1605
|
+
if (de === void 0 && (de = ""), ce === Se) {
|
|
1606
|
+
var ae = ee(de, ce);
|
|
1607
|
+
ae !== ce && K(V, ae, de);
|
|
1608
1608
|
}
|
|
1609
1609
|
};
|
|
1610
1610
|
q(), requestAnimationFrame(function() {
|
|
1611
1611
|
q();
|
|
1612
|
-
}),
|
|
1612
|
+
}), p(A), fe(V);
|
|
1613
1613
|
}, Ke = function(A) {
|
|
1614
1614
|
A.persist && A.persist();
|
|
1615
|
-
var
|
|
1616
|
-
|
|
1617
|
-
var ce =
|
|
1615
|
+
var V = A.target, q = A.currentTarget;
|
|
1616
|
+
z.current = V, L.current.focusTimeout = setTimeout(function() {
|
|
1617
|
+
var ce = V.selectionStart, Se = V.selectionEnd, de = V.value;
|
|
1618
1618
|
de === void 0 && (de = "");
|
|
1619
|
-
var
|
|
1620
|
-
|
|
1619
|
+
var ae = ee(de, ce);
|
|
1620
|
+
ae !== ce && !(ce === 0 && Se === de.length) && K(V, ae, de), h(Object.assign(Object.assign({}, A), { currentTarget: q }));
|
|
1621
1621
|
}, 0);
|
|
1622
1622
|
}, U = function(A) {
|
|
1623
|
-
|
|
1624
|
-
},
|
|
1623
|
+
z.current = null, clearTimeout(L.current.focusTimeout), clearTimeout(L.current.setCaretTimeout), x(A);
|
|
1624
|
+
}, pe = re && Fo() ? "numeric" : void 0, _e = Object.assign({ inputMode: pe }, _, {
|
|
1625
1625
|
type: t,
|
|
1626
|
-
value:
|
|
1627
|
-
onChange:
|
|
1628
|
-
onKeyDown:
|
|
1629
|
-
onMouseUp:
|
|
1626
|
+
value: k,
|
|
1627
|
+
onChange: te,
|
|
1628
|
+
onKeyDown: we,
|
|
1629
|
+
onMouseUp: Ce,
|
|
1630
1630
|
onFocus: Ke,
|
|
1631
1631
|
onBlur: U
|
|
1632
1632
|
});
|
|
1633
1633
|
if (r === "text")
|
|
1634
|
-
return a ?
|
|
1634
|
+
return a ? ke.createElement(ke.Fragment, null, a(k, _) || null) : ke.createElement("span", Object.assign({}, _, { ref: o }), k);
|
|
1635
1635
|
if (s) {
|
|
1636
1636
|
var at = s;
|
|
1637
|
-
return
|
|
1637
|
+
return ke.createElement(at, Object.assign({}, _e, { ref: o }));
|
|
1638
1638
|
}
|
|
1639
|
-
return
|
|
1639
|
+
return ke.createElement("input", Object.assign({}, _e, { ref: o }));
|
|
1640
1640
|
}
|
|
1641
1641
|
function Kn(e, t) {
|
|
1642
1642
|
var r = t.decimalScale, s = t.fixedDecimalScale, a = t.prefix;
|
|
@@ -1646,8 +1646,8 @@ function Kn(e, t) {
|
|
|
1646
1646
|
var i = t.allowNegative, c = t.thousandsGroupStyle;
|
|
1647
1647
|
if (c === void 0 && (c = "thousand"), e === "" || e === "-")
|
|
1648
1648
|
return e;
|
|
1649
|
-
var l = zt(t), u = l.thousandSeparator, d = l.decimalSeparator,
|
|
1650
|
-
return r !== void 0 && (
|
|
1649
|
+
var l = zt(t), u = l.thousandSeparator, d = l.decimalSeparator, m = r !== 0 && e.indexOf(".") !== -1 || r && s, g = Nn(e, i), f = g.beforeDecimal, p = g.afterDecimal, h = g.addNegation;
|
|
1650
|
+
return r !== void 0 && (p = gs(p, r, !!s)), u && (f = Io(f, u, c)), a && (f = a + f), o && (p = p + o), h && (f = "-" + f), e = f + (m && d || "") + p, e;
|
|
1651
1651
|
}
|
|
1652
1652
|
function zt(e) {
|
|
1653
1653
|
var t = e.decimalSeparator;
|
|
@@ -1677,32 +1677,32 @@ function Ho(e, t, r) {
|
|
|
1677
1677
|
o === void 0 && (o = "");
|
|
1678
1678
|
var i = r.suffix;
|
|
1679
1679
|
i === void 0 && (i = "");
|
|
1680
|
-
var c = r.decimalScale, l = t.from, u = t.to, d = u.start,
|
|
1680
|
+
var c = r.decimalScale, l = t.from, u = t.to, d = u.start, m = u.end, g = zt(r), f = g.allowedDecimalSeparators, p = g.decimalSeparator, h = e[m] === p;
|
|
1681
1681
|
if (_t(e) && (e === o || e === i) && t.lastValue === "")
|
|
1682
1682
|
return e;
|
|
1683
|
-
if (
|
|
1684
|
-
var
|
|
1685
|
-
e = e.substring(0, d) +
|
|
1683
|
+
if (m - d === 1 && f.indexOf(e[d]) !== -1) {
|
|
1684
|
+
var x = c === 0 ? "" : p;
|
|
1685
|
+
e = e.substring(0, d) + x + e.substring(d + 1, e.length);
|
|
1686
1686
|
}
|
|
1687
|
-
var
|
|
1687
|
+
var w = function(z, L, G) {
|
|
1688
1688
|
var W = !1, K = !1;
|
|
1689
|
-
o.startsWith("-") ? W = !1 :
|
|
1690
|
-
var
|
|
1691
|
-
return K && (
|
|
1692
|
-
},
|
|
1693
|
-
s =
|
|
1694
|
-
var
|
|
1695
|
-
e.length && D.length && (
|
|
1696
|
-
var
|
|
1697
|
-
e.startsWith(o) ?
|
|
1698
|
-
var
|
|
1699
|
-
e.endsWith(i) ?
|
|
1700
|
-
var
|
|
1701
|
-
e = e.replace(new RegExp(hs(
|
|
1702
|
-
return
|
|
1689
|
+
o.startsWith("-") ? W = !1 : z.startsWith("--") ? (W = !1, K = !0) : i.startsWith("-") && z.length === i.length ? W = !1 : z[0] === "-" && (W = !0);
|
|
1690
|
+
var ee = W ? 1 : 0;
|
|
1691
|
+
return K && (ee = 2), ee && (z = z.substring(ee), L -= ee, G -= ee), { value: z, start: L, end: G, hasNegation: W };
|
|
1692
|
+
}, y = w(e, d, m), j = y.hasNegation;
|
|
1693
|
+
s = y, e = s.value, d = s.start, m = s.end;
|
|
1694
|
+
var v = w(t.lastValue, l.start, l.end), _ = v.start, C = v.end, D = v.value, k = e.substring(d, m);
|
|
1695
|
+
e.length && D.length && (_ > D.length - i.length || C < o.length) && !(k && i.startsWith(k)) && (e = D);
|
|
1696
|
+
var T = 0;
|
|
1697
|
+
e.startsWith(o) ? T += o.length : d < o.length && (T = d), e = e.substring(T), m -= T;
|
|
1698
|
+
var I = e.length, O = e.length - i.length;
|
|
1699
|
+
e.endsWith(i) ? I = O : (m > O || m > e.length - i.length) && (I = m), e = e.substring(0, I), e = zo(j ? "-" + e : e, a), e = (e.match(Po(p)) || []).join("");
|
|
1700
|
+
var $ = e.indexOf(p);
|
|
1701
|
+
e = e.replace(new RegExp(hs(p), "g"), function(z, L) {
|
|
1702
|
+
return L === $ ? "." : "";
|
|
1703
1703
|
});
|
|
1704
|
-
var
|
|
1705
|
-
return u.end - u.start < l.end - l.start &&
|
|
1704
|
+
var N = Nn(e, a), M = N.beforeDecimal, re = N.afterDecimal, R = N.addNegation;
|
|
1705
|
+
return u.end - u.start < l.end - l.start && M === "" && h && !parseFloat(re) && (e = R ? "-" : ""), e;
|
|
1706
1706
|
}
|
|
1707
1707
|
function Uo(e, t) {
|
|
1708
1708
|
var r = t.prefix;
|
|
@@ -1740,374 +1740,374 @@ function Go(e) {
|
|
|
1740
1740
|
o === void 0 && (o = We);
|
|
1741
1741
|
var i = e.thousandSeparator, c = e.decimalScale, l = e.fixedDecimalScale, u = e.prefix;
|
|
1742
1742
|
u === void 0 && (u = "");
|
|
1743
|
-
var d = e.defaultValue,
|
|
1744
|
-
return Kn(
|
|
1745
|
-
}, j = function(
|
|
1746
|
-
return Ho(
|
|
1747
|
-
},
|
|
1748
|
-
lt(
|
|
1749
|
-
var
|
|
1750
|
-
return ms(
|
|
1751
|
-
}, D = vs(
|
|
1752
|
-
var
|
|
1753
|
-
if (K === void 0 && (K = ""), (
|
|
1754
|
-
|
|
1743
|
+
var d = e.defaultValue, m = e.value, g = e.valueIsNumericString, f = e.onValueChange, p = fs(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), h = zt(e), x = h.decimalSeparator, w = h.allowedDecimalSeparators, y = function(R) {
|
|
1744
|
+
return Kn(R, e);
|
|
1745
|
+
}, j = function(R, z) {
|
|
1746
|
+
return Ho(R, z, e);
|
|
1747
|
+
}, v = lt(m) ? d : m, _ = g ?? Wo(v, u, t);
|
|
1748
|
+
lt(m) ? lt(d) || (_ = _ || typeof d == "number") : _ = _ || typeof m == "number";
|
|
1749
|
+
var C = function(R) {
|
|
1750
|
+
return ms(R) ? R : (typeof R == "number" && (R = ps(R)), _ && typeof c == "number" ? Yn(R, c, !!l) : R);
|
|
1751
|
+
}, D = vs(C(m), C(d), !!_, y, j, f), k = D[0], T = k.numAsString, I = k.formattedValue, O = D[1], $ = function(R) {
|
|
1752
|
+
var z = R.target, L = R.key, G = z.selectionStart, W = z.selectionEnd, K = z.value;
|
|
1753
|
+
if (K === void 0 && (K = ""), (L === "Backspace" || L === "Delete") && W < u.length) {
|
|
1754
|
+
R.preventDefault();
|
|
1755
1755
|
return;
|
|
1756
1756
|
}
|
|
1757
1757
|
if (G !== W) {
|
|
1758
|
-
a(
|
|
1758
|
+
a(R);
|
|
1759
1759
|
return;
|
|
1760
1760
|
}
|
|
1761
|
-
|
|
1762
|
-
var
|
|
1763
|
-
|
|
1764
|
-
},
|
|
1765
|
-
var
|
|
1766
|
-
if (
|
|
1767
|
-
var
|
|
1768
|
-
|
|
1769
|
-
formattedValue:
|
|
1770
|
-
value:
|
|
1771
|
-
floatValue: parseFloat(
|
|
1761
|
+
L === "Backspace" && K[0] === "-" && G === u.length + 1 && r && Xe(z, 1), c && l && (L === "Backspace" && K[G - 1] === x ? (Xe(z, G - 1), R.preventDefault()) : L === "Delete" && K[G] === x && R.preventDefault()), w != null && w.includes(L) && K[G] === x && Xe(z, G + 1);
|
|
1762
|
+
var ee = i === !0 ? "," : i;
|
|
1763
|
+
L === "Backspace" && K[G - 1] === ee && Xe(z, G - 1), L === "Delete" && K[G] === ee && Xe(z, G + 1), a(R);
|
|
1764
|
+
}, N = function(R) {
|
|
1765
|
+
var z = T;
|
|
1766
|
+
if (z.match(/\d/g) || (z = ""), s || (z = $o(z)), l && c && (z = Yn(z, c, l)), z !== T) {
|
|
1767
|
+
var L = Kn(z, e);
|
|
1768
|
+
O({
|
|
1769
|
+
formattedValue: L,
|
|
1770
|
+
value: z,
|
|
1771
|
+
floatValue: parseFloat(z)
|
|
1772
1772
|
}, {
|
|
1773
|
-
event:
|
|
1773
|
+
event: R,
|
|
1774
1774
|
source: bt.event
|
|
1775
1775
|
});
|
|
1776
1776
|
}
|
|
1777
|
-
o(
|
|
1778
|
-
},
|
|
1779
|
-
return
|
|
1780
|
-
},
|
|
1781
|
-
var
|
|
1782
|
-
return j(
|
|
1777
|
+
o(R);
|
|
1778
|
+
}, M = function(R) {
|
|
1779
|
+
return R === x ? !0 : _t(R);
|
|
1780
|
+
}, re = function(R) {
|
|
1781
|
+
var z = R.currentValue, L = R.lastValue, G = R.formattedValue, W = R.currentValueIndex, K = R.formattedValueIndex, ee = z[W], P = G[K], H = xs(L, z), F = H.to, ne = function(ge) {
|
|
1782
|
+
return j(ge).indexOf(".") + u.length;
|
|
1783
1783
|
};
|
|
1784
|
-
return
|
|
1784
|
+
return m === 0 && l && c && z[F.start] === x && ne(z) < W && ne(G) > K ? !1 : W >= F.start && W < F.end && w && w.includes(ee) && P === x ? !0 : ee === P;
|
|
1785
1785
|
};
|
|
1786
|
-
return Object.assign(Object.assign({},
|
|
1787
|
-
value:
|
|
1786
|
+
return Object.assign(Object.assign({}, p), {
|
|
1787
|
+
value: I,
|
|
1788
1788
|
valueIsNumericString: !1,
|
|
1789
|
-
isValidInputCharacter:
|
|
1790
|
-
isCharacterSame:
|
|
1791
|
-
onValueChange:
|
|
1792
|
-
format:
|
|
1789
|
+
isValidInputCharacter: M,
|
|
1790
|
+
isCharacterSame: re,
|
|
1791
|
+
onValueChange: O,
|
|
1792
|
+
format: y,
|
|
1793
1793
|
removeFormatting: j,
|
|
1794
|
-
getCaretBoundary: function(
|
|
1795
|
-
return Uo(
|
|
1794
|
+
getCaretBoundary: function(R) {
|
|
1795
|
+
return Uo(R, e);
|
|
1796
1796
|
},
|
|
1797
|
-
onKeyDown:
|
|
1798
|
-
onBlur:
|
|
1797
|
+
onKeyDown: $,
|
|
1798
|
+
onBlur: N
|
|
1799
1799
|
});
|
|
1800
1800
|
}
|
|
1801
1801
|
function Sn(e) {
|
|
1802
1802
|
var t = Go(e);
|
|
1803
|
-
return
|
|
1803
|
+
return ke.createElement(Vo, Object.assign({}, t));
|
|
1804
1804
|
}
|
|
1805
|
-
const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size: c, hidden: l, disabled: u, showClearIcon: d, clearValue:
|
|
1806
|
-
const
|
|
1805
|
+
const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size: c, hidden: l, disabled: u, showClearIcon: d, clearValue: m, className: g, step: f, noSelectOnFocus: p, decimalScale: h, numberPrefix: x, numberSuffix: w, min: y, max: j }) => {
|
|
1806
|
+
const v = S(() => {
|
|
1807
1807
|
if (!r)
|
|
1808
1808
|
return;
|
|
1809
|
-
const
|
|
1810
|
-
r(
|
|
1811
|
-
}, [
|
|
1812
|
-
const
|
|
1813
|
-
r && r(
|
|
1814
|
-
}, [r]),
|
|
1815
|
-
var
|
|
1816
|
-
let
|
|
1817
|
-
if (Number.isNaN(
|
|
1818
|
-
|
|
1809
|
+
const I = m ?? null;
|
|
1810
|
+
r(I ? Number(I) : null);
|
|
1811
|
+
}, [m, r]), _ = J(null), [C, D] = E((t == null ? void 0 : t.toString()) ?? ""), k = S((I) => {
|
|
1812
|
+
const O = I;
|
|
1813
|
+
r && r(O == null || O === "" ? null : Number(O));
|
|
1814
|
+
}, [r]), T = S((I) => {
|
|
1815
|
+
var $, N;
|
|
1816
|
+
let O = parseFloat(((N = ($ = I.target) == null ? void 0 : $.value) == null ? void 0 : N.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
|
|
1817
|
+
if (Number.isNaN(O) && (O = 0), !s) {
|
|
1818
|
+
k(O.toString());
|
|
1819
1819
|
return;
|
|
1820
1820
|
}
|
|
1821
|
-
D(
|
|
1822
|
-
|
|
1821
|
+
D(O.toString()), _.current !== null && window.clearTimeout(_.current), _.current = window.setTimeout(() => {
|
|
1822
|
+
k(O.toString());
|
|
1823
1823
|
}, s);
|
|
1824
|
-
}, [s,
|
|
1825
|
-
return
|
|
1824
|
+
}, [s, k]);
|
|
1825
|
+
return B(() => {
|
|
1826
1826
|
D(t === null ? "" : t.toString());
|
|
1827
|
-
}, [j,
|
|
1828
|
-
j !== void 0 && Number(
|
|
1829
|
-
}, [
|
|
1830
|
-
!r || t === null || (j !== void 0 && t > j && r(j),
|
|
1831
|
-
}, [t, j,
|
|
1832
|
-
/* @__PURE__ */ n.jsx(Sn, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: h, prefix:
|
|
1833
|
-
!
|
|
1834
|
-
}, onChange:
|
|
1827
|
+
}, [j, y, t]), B(() => {
|
|
1828
|
+
j !== void 0 && Number(C) > j && D(j.toString()), y !== void 0 && Number(C) < y && D(y.toString());
|
|
1829
|
+
}, [C, j, y, D]), B(() => {
|
|
1830
|
+
!r || t === null || (j !== void 0 && t > j && r(j), y !== void 0 && t < y && r(y));
|
|
1831
|
+
}, [t, j, y, r]), /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: l, className: g, children: [
|
|
1832
|
+
/* @__PURE__ */ n.jsx(Sn, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: h, prefix: x, suffix: w, defaultValue: "", value: s ? C : (t == null ? void 0 : t.toString()) ?? "", placeholder: i ?? a, onFocus: (I) => {
|
|
1833
|
+
!p && I.target.select();
|
|
1834
|
+
}, onChange: T, hidden: l, disabled: u, className: b("form-control text-end w-100", {
|
|
1835
1835
|
[`form-control-${c}`]: c
|
|
1836
|
-
}), step: f, min:
|
|
1837
|
-
d && t !== null && r && !u && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(
|
|
1836
|
+
}), step: f, min: y, max: j }),
|
|
1837
|
+
d && t !== null && r && !u && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: v, children: /* @__PURE__ */ n.jsx(Me, {}) }) })
|
|
1838
1838
|
] });
|
|
1839
1839
|
}, xd = ({ InputContainer: e = Ye, formField: t, label: r, resetsFields: s, type: a, required: o, hidden: i, disabled: c, withoutLabel: l, className: u }) => {
|
|
1840
|
-
const { register: d, formState:
|
|
1841
|
-
|
|
1842
|
-
const
|
|
1843
|
-
let j =
|
|
1844
|
-
|
|
1845
|
-
j !== void 0 && (j = j[
|
|
1846
|
-
}),
|
|
1847
|
-
}, [
|
|
1848
|
-
|
|
1849
|
-
}, [
|
|
1850
|
-
const
|
|
1851
|
-
return /* @__PURE__ */ n.jsxs(e, { isForCheckInput: !0, hidden: i, label: `${r}${o ? " *" : ""}`, isInvalid:
|
|
1840
|
+
const { register: d, formState: m, setValue: g } = Ge(), [f, p] = E(void 0), [h, x] = E(!1);
|
|
1841
|
+
B(() => {
|
|
1842
|
+
const y = t.split(".");
|
|
1843
|
+
let j = m.errors;
|
|
1844
|
+
y.forEach((v) => {
|
|
1845
|
+
j !== void 0 && (j = j[v]);
|
|
1846
|
+
}), p(j);
|
|
1847
|
+
}, [m, t]), B(() => {
|
|
1848
|
+
m.isSubmitted && x(!0);
|
|
1849
|
+
}, [m]);
|
|
1850
|
+
const w = f !== void 0;
|
|
1851
|
+
return /* @__PURE__ */ n.jsxs(e, { isForCheckInput: !0, hidden: i, label: `${r}${o ? " *" : ""}`, isInvalid: w, withoutLabel: l, className: u, children: [
|
|
1852
1852
|
/* @__PURE__ */ n.jsx(ye.Check, { id: `check-${t}`, type: a ?? "checkbox", label: `${r}${o ? " *" : ""}`, ...d(t, {
|
|
1853
1853
|
onChange: () => {
|
|
1854
|
-
s && s.forEach((
|
|
1854
|
+
s && s.forEach((y) => g(y, null, { shouldDirty: !0, shouldValidate: h }));
|
|
1855
1855
|
}
|
|
1856
|
-
}), isInvalid:
|
|
1856
|
+
}), isInvalid: w, hidden: i, disabled: c, className: "w-100" }),
|
|
1857
1857
|
f && /* @__PURE__ */ n.jsx(rt, { message: f.message })
|
|
1858
1858
|
] });
|
|
1859
1859
|
}, vd = ({ InputContainer: e = Ye, label: t, formField: r, options: s, resetsFields: a, required: o, disabled: i, hidden: c, className: l }) => {
|
|
1860
|
-
const { register: u, formState: d, setValue:
|
|
1861
|
-
|
|
1860
|
+
const { register: u, formState: d, setValue: m, watch: g } = Ge(), [f, p] = E(void 0), [h, x] = E(!1), w = Q(() => s, [s]);
|
|
1861
|
+
B(() => {
|
|
1862
1862
|
const j = r.split(".");
|
|
1863
|
-
let
|
|
1864
|
-
j.forEach((
|
|
1865
|
-
|
|
1866
|
-
}),
|
|
1867
|
-
}, [d, r]),
|
|
1868
|
-
d.isSubmitted &&
|
|
1863
|
+
let v = d.errors;
|
|
1864
|
+
j.forEach((_) => {
|
|
1865
|
+
v !== void 0 && (v = v[_]);
|
|
1866
|
+
}), p(v);
|
|
1867
|
+
}, [d, r]), B(() => {
|
|
1868
|
+
d.isSubmitted && x(!0);
|
|
1869
1869
|
}, [d]);
|
|
1870
|
-
const
|
|
1871
|
-
return /* @__PURE__ */ n.jsxs(e, { isForRadioInput: !0, hidden: c, withoutLabel: !t, label: `${t}${o ? " *" : ""}`, isInvalid:
|
|
1872
|
-
|
|
1870
|
+
const y = f !== void 0;
|
|
1871
|
+
return /* @__PURE__ */ n.jsxs(e, { isForRadioInput: !0, hidden: c, withoutLabel: !t, label: `${t}${o ? " *" : ""}`, isInvalid: y, className: l, children: [
|
|
1872
|
+
w.map((j) => /* @__PURE__ */ n.jsx(ye.Check, { id: `radio-${j.id}`, label: j.name, type: "radio", value: j.id ?? "", checked: g(r) === j.id, ...u(r, {
|
|
1873
1873
|
onChange: () => {
|
|
1874
|
-
a && a.forEach((
|
|
1874
|
+
a && a.forEach((v) => m(v, null, { shouldDirty: !0, shouldValidate: h }));
|
|
1875
1875
|
}
|
|
1876
|
-
}), isInvalid:
|
|
1876
|
+
}), isInvalid: y, hidden: c, disabled: i, className: "w-100" }, j.id)),
|
|
1877
1877
|
f && /* @__PURE__ */ n.jsx(rt, { message: f.message })
|
|
1878
1878
|
] });
|
|
1879
|
-
}, jd = ({ InputContainer: e = Ye, formField: t, label: r, size: s, defaultSelection: a, resetsFields: o, isNumber: i, required: c, hidden: l, disabled: u, items: d, onSearchQueryChange:
|
|
1880
|
-
const { formState:
|
|
1881
|
-
const
|
|
1882
|
-
let
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
}),
|
|
1886
|
-
}, [
|
|
1887
|
-
if ((
|
|
1879
|
+
}, jd = ({ InputContainer: e = Ye, formField: t, label: r, size: s, defaultSelection: a, resetsFields: o, isNumber: i, required: c, hidden: l, disabled: u, items: d, onSearchQueryChange: m, selectedItemNavigateTo: g, texts: f, dropdownItemsNameWidth: p, isLoading: h, withoutLabel: x, additionalColumns: w, CustomOnChangeComponent: y, icon: j, displayIdAsName: v, onSelect: _, className: C, archiveColumn: D }) => {
|
|
1880
|
+
const { formState: k, setValue: T, watch: I, control: O } = Ge(), [$, N] = E(void 0), [M, re] = E(!1), [R, z] = E(!1), L = I(t) ?? null, G = L === (a == null ? void 0 : a.id) ? a == null ? void 0 : a.name : I(`${t}-DropdownName`), W = Q(() => L == null ? null : { id: L ?? null, name: G ?? "" }, [L, G]), K = S(() => {
|
|
1881
|
+
const te = t.split(".");
|
|
1882
|
+
let we = k.errors;
|
|
1883
|
+
te.forEach((Ce) => {
|
|
1884
|
+
we !== void 0 && (we = we[Ce]);
|
|
1885
|
+
}), N(we);
|
|
1886
|
+
}, [k, t]), ee = S((te) => {
|
|
1887
|
+
if ((te == null ? void 0 : te.id) === L)
|
|
1888
1888
|
return;
|
|
1889
|
-
if (
|
|
1890
|
-
|
|
1889
|
+
if (_ && _(te), o && o.forEach((Ce) => T(Ce, null, { shouldDirty: !0, shouldValidate: R })), te === null) {
|
|
1890
|
+
T(t, null, {
|
|
1891
1891
|
shouldDirty: !0,
|
|
1892
|
-
shouldValidate:
|
|
1893
|
-
}),
|
|
1892
|
+
shouldValidate: R
|
|
1893
|
+
}), T(`${t}-DropdownName`, null);
|
|
1894
1894
|
return;
|
|
1895
1895
|
}
|
|
1896
|
-
let
|
|
1897
|
-
i ?
|
|
1896
|
+
let we = null;
|
|
1897
|
+
i ? we = (te == null ? void 0 : te.id) !== null && (te == null ? void 0 : te.id) !== "" ? parseInt(te.id.toString(), 10) : null : we = te.id === null || te.id === void 0 || te.id === "" ? null : te.id, T(t, we, {
|
|
1898
1898
|
shouldDirty: !0,
|
|
1899
|
-
shouldValidate:
|
|
1900
|
-
}),
|
|
1901
|
-
}, [
|
|
1902
|
-
|
|
1903
|
-
}, [
|
|
1904
|
-
|
|
1899
|
+
shouldValidate: R
|
|
1900
|
+
}), T(`${t}-DropdownName`, te.name ?? "");
|
|
1901
|
+
}, [T, t, R, i, o, L, _]), P = S((te) => {
|
|
1902
|
+
re(!1), ee(te);
|
|
1903
|
+
}, [ee]), H = S(() => {
|
|
1904
|
+
re(!1);
|
|
1905
1905
|
}, []);
|
|
1906
|
-
|
|
1906
|
+
B(() => {
|
|
1907
1907
|
K();
|
|
1908
|
-
}, [K]),
|
|
1909
|
-
|
|
1910
|
-
}, [
|
|
1911
|
-
const
|
|
1912
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${r}${c ? " *" : ""}`, hidden: l, withoutLabel:
|
|
1913
|
-
/* @__PURE__ */ n.jsxs(ds, { currentSelection: W, selectedItemNavigateTo:
|
|
1914
|
-
|
|
1915
|
-
/* @__PURE__ */ n.jsx(vn, { control:
|
|
1916
|
-
|
|
1908
|
+
}, [K]), B(() => {
|
|
1909
|
+
k.isSubmitted && z(!0);
|
|
1910
|
+
}, [k]);
|
|
1911
|
+
const F = J(null), ne = $ !== void 0, ge = g !== void 0, fe = ge && W !== null;
|
|
1912
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${r}${c ? " *" : ""}`, hidden: l, withoutLabel: x, isInvalid: ne, inputContainerClassName: b({ "luminus-dropdown-select-open": M }), className: C, children: [
|
|
1913
|
+
/* @__PURE__ */ n.jsxs(ds, { currentSelection: W, selectedItemNavigateTo: g, children: [
|
|
1914
|
+
v && (W == null ? void 0 : W.name) && /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: W.name }),
|
|
1915
|
+
/* @__PURE__ */ n.jsx(vn, { control: O, name: t, render: () => /* @__PURE__ */ n.jsx(ye.Select, { size: s, onMouseDown: (te) => {
|
|
1916
|
+
te.currentTarget.focus(), te.preventDefault();
|
|
1917
1917
|
}, onClick: () => {
|
|
1918
|
-
!
|
|
1919
|
-
}, ref:
|
|
1920
|
-
}, isInvalid:
|
|
1918
|
+
!ge && !u && re(!0);
|
|
1919
|
+
}, ref: F, value: L ?? "", onChange: () => {
|
|
1920
|
+
}, isInvalid: ne, hidden: l, className: b("w-100", {
|
|
1921
1921
|
"luminus-dropdown-picker-disabled": u,
|
|
1922
|
-
"luminus-dropdown-picker-link":
|
|
1923
|
-
}), children: /* @__PURE__ */ n.jsx("option", { value:
|
|
1924
|
-
|
|
1925
|
-
!
|
|
1926
|
-
|
|
1922
|
+
"luminus-dropdown-picker-link": fe
|
|
1923
|
+
}), children: /* @__PURE__ */ n.jsx("option", { value: L, children: v ? L : (G == null ? void 0 : G.length) > 0 ? G : L }) }) }),
|
|
1924
|
+
y || !u && ge ? /* @__PURE__ */ n.jsxs("div", { className: "custom-picker-button", children: [
|
|
1925
|
+
!y && !u && ge && /* @__PURE__ */ n.jsx(se, { size: "sm", color: "secondary", onClick: (te) => {
|
|
1926
|
+
te.preventDefault(), te.stopPropagation(), re(!0);
|
|
1927
1927
|
}, children: j ?? /* @__PURE__ */ n.jsx(yr, {}) }),
|
|
1928
|
-
|
|
1928
|
+
y ?? null
|
|
1929
1929
|
] }) : null
|
|
1930
1930
|
] }),
|
|
1931
|
-
|
|
1932
|
-
|
|
1931
|
+
$ && /* @__PURE__ */ n.jsx(rt, { message: $.message }),
|
|
1932
|
+
F.current && /* @__PURE__ */ n.jsx(Pt, { show: M, onCancel: H, items: d, currentSelection: W, onSelectionChange: P, onSearchQueryChange: m, texts: f, itemsNameWidth: p, additionalColumns: w, displayIdAsName: v, isLoading: h, disabled: u, inputRef: F, archiveColumn: D })
|
|
1933
1933
|
] }) });
|
|
1934
|
-
}, yd = ({ InputContainer: e = Ye, label: t, formField: r, hidden: s, required: a, placeholder: o, disabled: i, showClearIcon: c, resetsFields: l, multiple: u, accept: d, withoutLabel:
|
|
1935
|
-
const { watch: f, setValue:
|
|
1936
|
-
|
|
1937
|
-
}, [
|
|
1938
|
-
const
|
|
1939
|
-
let
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
}),
|
|
1943
|
-
}, [
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
}, [
|
|
1934
|
+
}, yd = ({ InputContainer: e = Ye, label: t, formField: r, hidden: s, required: a, placeholder: o, disabled: i, showClearIcon: c, resetsFields: l, multiple: u, accept: d, withoutLabel: m, className: g }) => {
|
|
1935
|
+
const { watch: f, setValue: p, register: h, formState: x } = Ge(), [w, y] = E(!1), [j, v] = E(void 0), _ = S(() => {
|
|
1936
|
+
p(r, "");
|
|
1937
|
+
}, [p, r]), C = S(() => {
|
|
1938
|
+
const k = r.split(".");
|
|
1939
|
+
let T = x.errors;
|
|
1940
|
+
k.forEach((I) => {
|
|
1941
|
+
T !== void 0 && (T = T[I]);
|
|
1942
|
+
}), v(T);
|
|
1943
|
+
}, [x, r]);
|
|
1944
|
+
B(C, [C]), B(() => {
|
|
1945
|
+
x.isSubmitted && y(!0);
|
|
1946
|
+
}, [x]);
|
|
1947
1947
|
const D = j !== void 0;
|
|
1948
|
-
return /* @__PURE__ */ n.jsxs(e, { label: `${t}${a ? "*" : ""}`, hidden: s, withoutLabel:
|
|
1948
|
+
return /* @__PURE__ */ n.jsxs(e, { label: `${t}${a ? "*" : ""}`, hidden: s, withoutLabel: m, isInvalid: D, className: g, children: [
|
|
1949
1949
|
/* @__PURE__ */ n.jsx(sa, { type: "file", multiple: u, accept: d.join(", "), placeholder: o ?? t, isInvalid: D, hidden: s, disabled: i, className: "w-100", ...h(r, {
|
|
1950
1950
|
onChange: () => {
|
|
1951
|
-
l && l.forEach((
|
|
1951
|
+
l && l.forEach((k) => p(k, null, { shouldDirty: !0, shouldValidate: w }));
|
|
1952
1952
|
}
|
|
1953
1953
|
}) }),
|
|
1954
|
-
c && f(r) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(
|
|
1954
|
+
c && f(r) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: _, children: /* @__PURE__ */ n.jsx(Me, {}) }) }),
|
|
1955
1955
|
j && /* @__PURE__ */ n.jsx(rt, { message: j.message })
|
|
1956
1956
|
] });
|
|
1957
1957
|
}, wd = ({ children: e, onStorno: t, noSpacer: r }) => {
|
|
1958
|
-
const { formState: s } = Ge(), [a, o] =
|
|
1959
|
-
return
|
|
1958
|
+
const { formState: s } = Ge(), [a, o] = E(!1);
|
|
1959
|
+
return B(() => {
|
|
1960
1960
|
o(Object.keys(s.dirtyFields).length > 0);
|
|
1961
1961
|
}, [s]), a ? /* @__PURE__ */ n.jsx(xo, { onStorno: t, noSpacer: r, children: e }) : null;
|
|
1962
|
-
}, bd = ({ InputContainer: e = Ye, options: t, formField: r, label: s, size: a, resetsFields: o, isNumber: i, required: c, hidden: l, disabled: u, withoutLabel: d, noSortOptions:
|
|
1963
|
-
const { texts: { customSelect:
|
|
1964
|
-
const
|
|
1965
|
-
let
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
}),
|
|
1969
|
-
}, [
|
|
1970
|
-
if ((
|
|
1962
|
+
}, bd = ({ InputContainer: e = Ye, options: t, formField: r, label: s, size: a, resetsFields: o, isNumber: i, required: c, hidden: l, disabled: u, withoutLabel: d, noSortOptions: m, suffixIdToName: g, onSelect: f, className: p, appendCurrentSelectionWithName: h }) => {
|
|
1963
|
+
const { texts: { customSelect: x } } = Z(he), { formState: w, setValue: y, watch: j, control: v } = Ge(), [_, C] = E(void 0), [D, k] = E(!1), [T, I] = E(!1), [O, $] = E(""), N = j(r), M = Q(() => t.find((P) => P.id === N) ?? null, [t, N]), re = S(() => {
|
|
1964
|
+
const P = r.split(".");
|
|
1965
|
+
let H = w.errors;
|
|
1966
|
+
P.forEach((F) => {
|
|
1967
|
+
H !== void 0 && (H = H[F]);
|
|
1968
|
+
}), C(H);
|
|
1969
|
+
}, [w, r]), R = S((P) => {
|
|
1970
|
+
if ((P == null ? void 0 : P.id) === N)
|
|
1971
1971
|
return;
|
|
1972
|
-
if (f && f(
|
|
1973
|
-
|
|
1972
|
+
if (f && f(P), o && o.forEach((F) => y(F, null, { shouldDirty: !0, shouldValidate: T })), P === null) {
|
|
1973
|
+
y(r, null, {
|
|
1974
1974
|
shouldDirty: !0,
|
|
1975
|
-
shouldValidate:
|
|
1975
|
+
shouldValidate: T
|
|
1976
1976
|
});
|
|
1977
1977
|
return;
|
|
1978
1978
|
}
|
|
1979
|
-
let
|
|
1980
|
-
i ?
|
|
1979
|
+
let H = null;
|
|
1980
|
+
i ? H = (P == null ? void 0 : P.id) !== null && (P == null ? void 0 : P.id) !== "" ? parseInt(P.id.toString(), 10) : null : H = P.id === null || P.id === void 0 || P.id === "" ? null : P.id, y(r, H, {
|
|
1981
1981
|
shouldDirty: !0,
|
|
1982
|
-
shouldValidate:
|
|
1982
|
+
shouldValidate: T
|
|
1983
1983
|
});
|
|
1984
|
-
}, [
|
|
1985
|
-
|
|
1986
|
-
}, [
|
|
1987
|
-
|
|
1984
|
+
}, [y, r, i, o, N, T, f]), z = S((P) => {
|
|
1985
|
+
k(!1), R(P);
|
|
1986
|
+
}, [R]), L = S((P) => {
|
|
1987
|
+
$(P);
|
|
1988
1988
|
}, []);
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
}, [
|
|
1992
|
-
|
|
1993
|
-
}, [
|
|
1994
|
-
const G = S((
|
|
1995
|
-
var
|
|
1996
|
-
return
|
|
1997
|
-
}, [
|
|
1998
|
-
const
|
|
1999
|
-
return h !== void 0 &&
|
|
2000
|
-
id:
|
|
2001
|
-
name: G(
|
|
2002
|
-
})).filter((
|
|
1989
|
+
B(() => {
|
|
1990
|
+
re();
|
|
1991
|
+
}, [re]), B(() => {
|
|
1992
|
+
w.isSubmitted && I(!0);
|
|
1993
|
+
}, [w]);
|
|
1994
|
+
const G = S((P) => {
|
|
1995
|
+
var H;
|
|
1996
|
+
return P === null ? "" : !P.name || P.name.length === 0 ? ((H = P.id) == null ? void 0 : H.toString()) ?? "" : g ? `${P.name} (${P.id})` : P.name;
|
|
1997
|
+
}, [g]), W = Q(() => {
|
|
1998
|
+
const P = t ?? [];
|
|
1999
|
+
return h !== void 0 && N && (P.some((H) => H.id === N) || P.push({ id: N, name: h })), P.map((H) => ({
|
|
2000
|
+
id: H.id,
|
|
2001
|
+
name: G(H)
|
|
2002
|
+
})).filter((H) => wt(H.name, O)).sort((H, F) => m ? 0 : (H.name ?? "").localeCompare(F.name ?? ""));
|
|
2003
2003
|
}, [
|
|
2004
2004
|
t,
|
|
2005
|
-
|
|
2006
|
-
|
|
2005
|
+
m,
|
|
2006
|
+
O,
|
|
2007
2007
|
G,
|
|
2008
2008
|
h,
|
|
2009
|
-
|
|
2010
|
-
]), K = J(null),
|
|
2011
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${s}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid:
|
|
2012
|
-
/* @__PURE__ */ n.jsx(vn, { control:
|
|
2013
|
-
|
|
2009
|
+
N
|
|
2010
|
+
]), K = J(null), ee = _ !== void 0;
|
|
2011
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${s}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid: ee, inputContainerClassName: b({ "luminus-dropdown-select-open": D }), className: p, children: [
|
|
2012
|
+
/* @__PURE__ */ n.jsx(vn, { control: v, name: r, render: () => /* @__PURE__ */ n.jsx(ye.Select, { size: a, onMouseDown: (P) => {
|
|
2013
|
+
P.currentTarget.focus(), P.preventDefault();
|
|
2014
2014
|
}, onClick: () => {
|
|
2015
|
-
|
|
2016
|
-
}, ref: K, value:
|
|
2017
|
-
}, isInvalid:
|
|
2018
|
-
|
|
2019
|
-
K.current && /* @__PURE__ */ n.jsx(Pt, { show: D, onCancel: () =>
|
|
2015
|
+
k(!0);
|
|
2016
|
+
}, ref: K, value: N ?? "", onChange: () => {
|
|
2017
|
+
}, isInvalid: ee, hidden: l, disabled: u, className: "w-100", children: /* @__PURE__ */ n.jsx("option", { value: (M == null ? void 0 : M.id) ?? "", children: G(M) }) }) }),
|
|
2018
|
+
_ && /* @__PURE__ */ n.jsx(rt, { message: _.message }),
|
|
2019
|
+
K.current && /* @__PURE__ */ n.jsx(Pt, { show: D, onCancel: () => k(!1), items: W, currentSelection: M ?? null, onSelectionChange: z, onSearchQueryChange: L, texts: x, disabled: u, inputRef: K, autoHideSearch: !0, allItemsLength: t.length })
|
|
2020
2020
|
] }) });
|
|
2021
|
-
}, _d = ({ InputContainer: e = Ye, formField: t, label: r, placeholder: s, size: a, resetsFields: o, showClearIcon: i, clearValue: c, required: l, hidden: u, disabled: d, withoutLabel:
|
|
2022
|
-
const { register:
|
|
2023
|
-
j(
|
|
2024
|
-
}, [
|
|
2025
|
-
const
|
|
2026
|
-
|
|
2021
|
+
}, _d = ({ InputContainer: e = Ye, formField: t, label: r, placeholder: s, size: a, resetsFields: o, showClearIcon: i, clearValue: c, required: l, hidden: u, disabled: d, withoutLabel: m, step: g, stepperStep: f = 1, className: p, min: h, max: x }) => {
|
|
2022
|
+
const { register: w, formState: y, setValue: j, watch: v } = Ge(), [_, C] = E(void 0), [D, k] = E(!1), T = S((M, re, R) => {
|
|
2023
|
+
j(M, pt(re, h, x), R);
|
|
2024
|
+
}, [x, h, j]), I = S(() => {
|
|
2025
|
+
const M = c ?? null;
|
|
2026
|
+
T(t, M !== null ? Number(M) : null, {
|
|
2027
2027
|
shouldDirty: !0,
|
|
2028
2028
|
shouldValidate: D
|
|
2029
2029
|
});
|
|
2030
|
-
}, [c,
|
|
2031
|
-
const
|
|
2032
|
-
let
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
}),
|
|
2036
|
-
}, [
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
}, [
|
|
2040
|
-
|
|
2041
|
-
}, [
|
|
2042
|
-
const
|
|
2043
|
-
return /* @__PURE__ */ n.jsxs(e, { label: `${r}${l ? " *" : ""}`, hidden: u, withoutLabel:
|
|
2030
|
+
}, [c, T, t, D]), O = S(() => {
|
|
2031
|
+
const M = t.split(".");
|
|
2032
|
+
let re = y.errors;
|
|
2033
|
+
M.forEach((R) => {
|
|
2034
|
+
re !== void 0 && (re = re[R]);
|
|
2035
|
+
}), C(re);
|
|
2036
|
+
}, [y, t]);
|
|
2037
|
+
B(() => {
|
|
2038
|
+
O();
|
|
2039
|
+
}, [O]), B(() => {
|
|
2040
|
+
y.isSubmitted && k(!0);
|
|
2041
|
+
}, [y]);
|
|
2042
|
+
const $ = _ !== void 0, N = v(t);
|
|
2043
|
+
return /* @__PURE__ */ n.jsxs(e, { label: `${r}${l ? " *" : ""}`, hidden: u, withoutLabel: m, isInvalid: $, className: p, children: [
|
|
2044
2044
|
/* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
2045
|
-
/* @__PURE__ */ n.jsx(ye.Control, { type: "number", placeholder: s ?? r, size: a, ...
|
|
2046
|
-
setValueAs: (
|
|
2045
|
+
/* @__PURE__ */ n.jsx(ye.Control, { type: "number", placeholder: s ?? r, size: a, ...w(t, {
|
|
2046
|
+
setValueAs: (M) => M == null || M === "" ? null : pt(Number(M), h, x),
|
|
2047
2047
|
min: h,
|
|
2048
|
-
max:
|
|
2048
|
+
max: x,
|
|
2049
2049
|
onChange: () => {
|
|
2050
|
-
o && o.forEach((
|
|
2050
|
+
o && o.forEach((M) => j(M, null, { shouldDirty: !0, shouldValidate: D }));
|
|
2051
2051
|
}
|
|
2052
|
-
}), isInvalid:
|
|
2053
|
-
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ n.jsx(
|
|
2054
|
-
|
|
2052
|
+
}), isInvalid: $, hidden: u, disabled: d, className: "w-100 luminus-numeric-stepper", step: g, min: h, max: x }),
|
|
2053
|
+
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (M) => {
|
|
2054
|
+
M.preventDefault(), M.stopPropagation(), T(t, ((N ? Number(N) : 0) - f).toString(), { shouldDirty: !0, shouldValidate: D });
|
|
2055
2055
|
}, children: /* @__PURE__ */ n.jsx(wr, {}) }) }),
|
|
2056
|
-
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ n.jsx(
|
|
2057
|
-
|
|
2056
|
+
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (M) => {
|
|
2057
|
+
M.preventDefault(), M.stopPropagation(), T(t, ((N ? Number(N) : 0) + f).toString(), { shouldDirty: !0, shouldValidate: D });
|
|
2058
2058
|
}, children: /* @__PURE__ */ n.jsx(br, {}) }) })
|
|
2059
2059
|
] }),
|
|
2060
|
-
i &&
|
|
2061
|
-
|
|
2060
|
+
i && v(t) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: I, children: /* @__PURE__ */ n.jsx(Me, {}) }) }),
|
|
2061
|
+
_ && /* @__PURE__ */ n.jsx(rt, { message: _.message })
|
|
2062
2062
|
] });
|
|
2063
|
-
}, Nd = ({ InputContainer: e = Ye, formField: t, label: r, placeholder: s, resetsFields: a, showClearIcon: o, clearValue: i, required: c, hidden: l, disabled: u, withoutLabel: d, step:
|
|
2064
|
-
const { formState:
|
|
2065
|
-
const
|
|
2066
|
-
|
|
2063
|
+
}, Nd = ({ InputContainer: e = Ye, formField: t, label: r, placeholder: s, resetsFields: a, showClearIcon: o, clearValue: i, required: c, hidden: l, disabled: u, withoutLabel: d, step: m, size: g, CustomOnChangeComponent: f, noSelectOnFocus: p, className: h, decimalScale: x = 2, numberPrefix: w, numberSuffix: y, min: j, max: v }) => {
|
|
2064
|
+
const { formState: _, setValue: C, watch: D, control: k } = Ge(), [T, I] = E(void 0), [O, $] = E(!1), N = S(() => {
|
|
2065
|
+
const z = i ?? null;
|
|
2066
|
+
C(t, z !== null ? Number(z) : null, {
|
|
2067
2067
|
shouldDirty: !0,
|
|
2068
|
-
shouldValidate:
|
|
2068
|
+
shouldValidate: O
|
|
2069
2069
|
});
|
|
2070
|
-
}, [i,
|
|
2071
|
-
const
|
|
2072
|
-
let
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
}),
|
|
2076
|
-
}, [
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
}, [
|
|
2080
|
-
|
|
2081
|
-
}, [
|
|
2082
|
-
const
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
}, [t,
|
|
2086
|
-
const
|
|
2087
|
-
return /* @__PURE__ */ n.jsxs(e, { label: `${r}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid:
|
|
2070
|
+
}, [i, C, t, O]), M = S(() => {
|
|
2071
|
+
const z = t.split(".");
|
|
2072
|
+
let L = _.errors;
|
|
2073
|
+
z.forEach((G) => {
|
|
2074
|
+
L !== void 0 && (L = L[G]);
|
|
2075
|
+
}), I(L);
|
|
2076
|
+
}, [_, t]);
|
|
2077
|
+
B(() => {
|
|
2078
|
+
M();
|
|
2079
|
+
}, [M]), B(() => {
|
|
2080
|
+
_.isSubmitted && $(!0);
|
|
2081
|
+
}, [_]);
|
|
2082
|
+
const re = D(t);
|
|
2083
|
+
B(() => {
|
|
2084
|
+
v !== void 0 && re > v && C(t, v), j !== void 0 && re < j && C(t, j);
|
|
2085
|
+
}, [t, re, v, j, C]);
|
|
2086
|
+
const R = T !== void 0;
|
|
2087
|
+
return /* @__PURE__ */ n.jsxs(e, { label: `${r}${c ? " *" : ""}`, hidden: l, withoutLabel: d, isInvalid: R, className: h, children: [
|
|
2088
2088
|
/* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
2089
|
-
/* @__PURE__ */ n.jsx(vn, { control:
|
|
2090
|
-
!
|
|
2089
|
+
/* @__PURE__ */ n.jsx(vn, { control: k, name: t, render: ({ field: { ref: z, onChange: L, name: G, value: W } }) => /* @__PURE__ */ n.jsx(Sn, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: x, prefix: w, suffix: y, defaultValue: "", name: G, value: W ?? "", placeholder: s ?? r, onFocus: (K) => {
|
|
2090
|
+
!p && K.target.select();
|
|
2091
2091
|
}, onChange: (K) => {
|
|
2092
|
-
var
|
|
2093
|
-
const
|
|
2094
|
-
a && a.forEach((
|
|
2095
|
-
}, hidden: l, disabled: u, className:
|
|
2096
|
-
"is-invalid":
|
|
2092
|
+
var P, H;
|
|
2093
|
+
const ee = parseFloat(((H = (P = K.target) == null ? void 0 : P.value) == null ? void 0 : H.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
|
|
2094
|
+
a && a.forEach((F) => C(F, null, { shouldDirty: !0, shouldValidate: O })), L(ee == null || Number.isNaN(ee) ? null : Number(ee));
|
|
2095
|
+
}, hidden: l, disabled: u, className: b("form-control text-end w-100", {
|
|
2096
|
+
"is-invalid": R
|
|
2097
2097
|
}, {
|
|
2098
|
-
[`form-control-${
|
|
2099
|
-
}), step:
|
|
2098
|
+
[`form-control-${g}`]: g
|
|
2099
|
+
}), step: m, getInputRef: z, min: j, max: v }) }),
|
|
2100
2100
|
f && /* @__PURE__ */ n.jsx("div", { className: "custom-picker-button", children: f })
|
|
2101
2101
|
] }),
|
|
2102
|
-
o && D(t) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(
|
|
2103
|
-
|
|
2102
|
+
o && D(t) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(se, { color: "secondary", size: "sm", onClick: N, children: /* @__PURE__ */ n.jsx(Me, {}) }) }),
|
|
2103
|
+
T && /* @__PURE__ */ n.jsx(rt, { message: T.message })
|
|
2104
2104
|
] });
|
|
2105
2105
|
}, Sd = ({ color: e = "primary", icon: t = /* @__PURE__ */ n.jsx(jr, { size: 12 }), inputId: r = "context-file-input", accept: s = "*", onUpload: a, multiple: o, className: i, children: c, ...l }) => {
|
|
2106
2106
|
const u = (d) => {
|
|
2107
2107
|
d.target.files && (a(d.target.files), d.target.value = "");
|
|
2108
2108
|
};
|
|
2109
2109
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2110
|
-
/* @__PURE__ */ n.jsxs("label", { htmlFor: r, className:
|
|
2110
|
+
/* @__PURE__ */ n.jsxs("label", { htmlFor: r, className: b(`btn luminus-dropdown-item text-nowrap rounded text-${e} ${i ?? ""}`, aa.item), ...l, children: [
|
|
2111
2111
|
t,
|
|
2112
2112
|
c
|
|
2113
2113
|
] }),
|
|
@@ -2115,7 +2115,7 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2115
2115
|
] });
|
|
2116
2116
|
}, Ko = "_divider_1e6rk_1", qo = {
|
|
2117
2117
|
divider: Ko
|
|
2118
|
-
}, Cd = ({ className: e }) => /* @__PURE__ */ n.jsx(oa.Divider, { className:
|
|
2118
|
+
}, Cd = ({ className: e }) => /* @__PURE__ */ n.jsx(oa.Divider, { className: b("luminus-dropdown-divider", e, qo.divider) }), Cn = ["slice", "options", "formats", "conditions"], qn = (e) => {
|
|
2119
2119
|
const t = e.current.flexmonster.getReport({ withDefaults: !0 });
|
|
2120
2120
|
if (typeof t == "string")
|
|
2121
2121
|
throw alert("report is string"), new Error("report is string");
|
|
@@ -2136,128 +2136,129 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2136
2136
|
return Cn.forEach((r) => {
|
|
2137
2137
|
t[r] = (e == null ? void 0 : e[r]) ?? void 0;
|
|
2138
2138
|
}), t;
|
|
2139
|
-
}, Jo = ({ dataSource: e, settings: t, pivotRef: r, localization: s, licenseKey: a,
|
|
2140
|
-
const { texts: { reports:
|
|
2139
|
+
}, Jo = ({ dataSource: e, settings: t, pivotRef: r, localization: s, licenseKey: a, customizeCell: o, enabled: i = !0 }) => {
|
|
2140
|
+
const { texts: { reports: c } } = Z(he), [l, u] = E(!1), d = J(null), m = r ?? d, g = Q(() => ({
|
|
2141
2141
|
localization: s
|
|
2142
|
-
}), [s]),
|
|
2143
|
-
delete
|
|
2144
|
-
const
|
|
2142
|
+
}), [s]), f = S((h) => {
|
|
2143
|
+
delete h[0], delete h[1], delete h[2];
|
|
2144
|
+
const x = [
|
|
2145
2145
|
{
|
|
2146
2146
|
id: "fm-tab-expand",
|
|
2147
|
-
title:
|
|
2148
|
-
handler:
|
|
2147
|
+
title: c.expandAll,
|
|
2148
|
+
handler: m.current.flexmonster.expandAllData,
|
|
2149
2149
|
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/><path fill="none" d="M0 0h24v24H0V0z"/></svg>'
|
|
2150
2150
|
},
|
|
2151
2151
|
{
|
|
2152
2152
|
id: "fm-tab-collapse",
|
|
2153
|
-
title:
|
|
2154
|
-
handler:
|
|
2153
|
+
title: c.collapseAll,
|
|
2154
|
+
handler: m.current.flexmonster.collapseAllData,
|
|
2155
2155
|
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>'
|
|
2156
2156
|
}
|
|
2157
2157
|
];
|
|
2158
|
-
return
|
|
2158
|
+
return h.unshift({
|
|
2159
2159
|
id: "fm-tab-expand",
|
|
2160
|
-
title:
|
|
2160
|
+
title: c.expand,
|
|
2161
2161
|
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>',
|
|
2162
|
-
menu:
|
|
2162
|
+
menu: x,
|
|
2163
2163
|
rightGroup: !0
|
|
2164
|
-
}),
|
|
2165
|
-
}, [
|
|
2166
|
-
const
|
|
2167
|
-
|
|
2164
|
+
}), h;
|
|
2165
|
+
}, [m, c.collapseAll, c.expand, c.expandAll]), p = (h) => {
|
|
2166
|
+
const x = h.getTabs();
|
|
2167
|
+
h.getTabs = () => f(x);
|
|
2168
2168
|
};
|
|
2169
|
-
return
|
|
2170
|
-
var
|
|
2171
|
-
|
|
2172
|
-
}, [e,
|
|
2173
|
-
var
|
|
2174
|
-
if (
|
|
2175
|
-
const { options: y, conditions:
|
|
2176
|
-
if (
|
|
2169
|
+
return B(() => {
|
|
2170
|
+
var h;
|
|
2171
|
+
l && i && ((h = m.current) == null || h.flexmonster.updateData(e), console.log("Updating flexmonster dataSource to: ", e));
|
|
2172
|
+
}, [e, i, l, m]), B(() => {
|
|
2173
|
+
var h, x, w;
|
|
2174
|
+
if (l && i) {
|
|
2175
|
+
const { options: y, conditions: j, formats: v, slice: _, ...C } = (h = m.current) == null ? void 0 : h.flexmonster.getReport();
|
|
2176
|
+
if (C === void 0 || typeof C == "string")
|
|
2177
2177
|
return;
|
|
2178
|
-
const
|
|
2179
|
-
|
|
2178
|
+
const D = Zo(t);
|
|
2179
|
+
D.options = {
|
|
2180
2180
|
...t == null ? void 0 : t.options,
|
|
2181
|
-
grid: { ...(
|
|
2181
|
+
grid: { ...(x = t == null ? void 0 : t.options) == null ? void 0 : x.grid, autoSwitchToCompact: !1 }
|
|
2182
2182
|
};
|
|
2183
|
-
const
|
|
2184
|
-
(
|
|
2183
|
+
const k = { ...C, ...D };
|
|
2184
|
+
(w = m.current) == null || w.flexmonster.setReport(k), console.log("Refreshing flexmonster settings. New report: ", k);
|
|
2185
2185
|
}
|
|
2186
|
-
}, [
|
|
2186
|
+
}, [i, l, m, t]), /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(
|
|
2187
2187
|
Ra,
|
|
2188
2188
|
{
|
|
2189
|
-
ref:
|
|
2189
|
+
ref: m,
|
|
2190
2190
|
global: g,
|
|
2191
2191
|
licenseKey: a,
|
|
2192
2192
|
toolbar: !0,
|
|
2193
2193
|
height: "100%",
|
|
2194
|
-
beforetoolbarcreated:
|
|
2194
|
+
beforetoolbarcreated: p,
|
|
2195
2195
|
ready: () => {
|
|
2196
|
-
|
|
2196
|
+
u(!0);
|
|
2197
2197
|
},
|
|
2198
|
-
width: "100%"
|
|
2198
|
+
width: "100%",
|
|
2199
|
+
customizeCell: o
|
|
2199
2200
|
}
|
|
2200
2201
|
) });
|
|
2201
2202
|
}, Xo = (e, t, r, s) => {
|
|
2202
|
-
const { texts: { reports: a } } = Z(
|
|
2203
|
+
const { texts: { reports: a } } = Z(he), { prompt: o } = ia(), { confirm: i } = Lt(), c = st(), { user: l } = Z(At), { startLoading: u, stopLoading: d } = Z(Mt), { addNotification: m } = _r(), g = S(async (w) => {
|
|
2203
2204
|
u("report-versionSavingAs");
|
|
2204
2205
|
try {
|
|
2205
|
-
const
|
|
2206
|
-
|
|
2206
|
+
const y = await c.post("/reports/version", w);
|
|
2207
|
+
m(a.saveSuccessful, "success"), await s(y.data);
|
|
2207
2208
|
} finally {
|
|
2208
2209
|
d("report-versionSavingAs");
|
|
2209
2210
|
}
|
|
2210
|
-
}, [
|
|
2211
|
+
}, [m, s, c, a.saveSuccessful, u, d]), f = S(async () => {
|
|
2211
2212
|
if (r === null) {
|
|
2212
|
-
|
|
2213
|
+
m("none open", "warning");
|
|
2213
2214
|
return;
|
|
2214
2215
|
}
|
|
2215
2216
|
if (!await i(a.confirmOverwriteSave))
|
|
2216
2217
|
return;
|
|
2217
|
-
const
|
|
2218
|
-
|
|
2218
|
+
const y = qn(t);
|
|
2219
|
+
g({
|
|
2219
2220
|
reportSourceName: e,
|
|
2220
2221
|
reportVersionId: r,
|
|
2221
|
-
settings:
|
|
2222
|
+
settings: y
|
|
2222
2223
|
});
|
|
2223
2224
|
}, [
|
|
2224
|
-
|
|
2225
|
+
m,
|
|
2225
2226
|
i,
|
|
2226
2227
|
t,
|
|
2227
2228
|
e,
|
|
2228
2229
|
a.confirmOverwriteSave,
|
|
2229
|
-
|
|
2230
|
+
g,
|
|
2230
2231
|
r
|
|
2231
|
-
]),
|
|
2232
|
-
const
|
|
2233
|
-
if (
|
|
2232
|
+
]), p = S(async () => {
|
|
2233
|
+
const w = await o(a.enterName, { input: "input", required: !0 });
|
|
2234
|
+
if (w === null)
|
|
2234
2235
|
return;
|
|
2235
|
-
const
|
|
2236
|
-
|
|
2236
|
+
const y = qn(t);
|
|
2237
|
+
g({
|
|
2237
2238
|
reportSourceName: e,
|
|
2238
|
-
name:
|
|
2239
|
-
settings:
|
|
2239
|
+
name: w,
|
|
2240
|
+
settings: y
|
|
2240
2241
|
});
|
|
2241
|
-
}, [t, o, e, a.enterName,
|
|
2242
|
+
}, [t, o, e, a.enterName, g]), h = S(async () => {
|
|
2242
2243
|
u("report-versionSavingAs");
|
|
2243
2244
|
try {
|
|
2244
2245
|
await c.post("/reports/version", {
|
|
2245
2246
|
reportVersionId: r ?? void 0,
|
|
2246
2247
|
reportSourceName: e,
|
|
2247
2248
|
isArchived: !0
|
|
2248
|
-
}),
|
|
2249
|
+
}), m(a.deleteSuccessful, "success");
|
|
2249
2250
|
} finally {
|
|
2250
2251
|
d("report-versionSavingAs");
|
|
2251
2252
|
}
|
|
2252
2253
|
}, [
|
|
2253
|
-
|
|
2254
|
+
m,
|
|
2254
2255
|
c,
|
|
2255
2256
|
e,
|
|
2256
2257
|
a.deleteSuccessful,
|
|
2257
2258
|
r,
|
|
2258
2259
|
u,
|
|
2259
2260
|
d
|
|
2260
|
-
]),
|
|
2261
|
+
]), x = S(async () => {
|
|
2261
2262
|
u("report-versionSavingAs");
|
|
2262
2263
|
try {
|
|
2263
2264
|
await c.post("/reports/version-restrictions", {
|
|
@@ -2268,12 +2269,12 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2268
2269
|
addRights: !1
|
|
2269
2270
|
}
|
|
2270
2271
|
]
|
|
2271
|
-
}),
|
|
2272
|
+
}), m(a.detachSuccessful, "success");
|
|
2272
2273
|
} finally {
|
|
2273
2274
|
d("report-versionSavingAs");
|
|
2274
2275
|
}
|
|
2275
2276
|
}, [
|
|
2276
|
-
|
|
2277
|
+
m,
|
|
2277
2278
|
c,
|
|
2278
2279
|
a.detachSuccessful,
|
|
2279
2280
|
r,
|
|
@@ -2281,7 +2282,7 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2281
2282
|
d,
|
|
2282
2283
|
l.personalNumber
|
|
2283
2284
|
]);
|
|
2284
|
-
return { saveAs:
|
|
2285
|
+
return { saveAs: p, save: f, archive: h, detach: x };
|
|
2285
2286
|
}, ei = (e) => {
|
|
2286
2287
|
const t = st(), { startLoading: r, stopLoading: s } = Z(Mt);
|
|
2287
2288
|
return { changeEmployeeRights: S(async (o, i) => {
|
|
@@ -2303,132 +2304,132 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2303
2304
|
return c;
|
|
2304
2305
|
}, [t, e, r, s]) };
|
|
2305
2306
|
}, ti = ({ isOpen: e, onHide: t, usersData: r, setUsersData: s, reportVersionId: a, EmployeePicker: o }) => {
|
|
2306
|
-
const { ProjectIconComponent: i, texts: { reports: c } } = Z(
|
|
2307
|
+
const { ProjectIconComponent: i, texts: { reports: c } } = Z(he), { confirm: l } = Lt(), [u, d] = E(null), { changeEmployeeRights: m } = ei(a), g = S(async () => {
|
|
2307
2308
|
if (u === null)
|
|
2308
2309
|
return;
|
|
2309
|
-
const
|
|
2310
|
-
s(a,
|
|
2311
|
-
}, [u,
|
|
2312
|
-
if (!await l(c.removeSharingWith(
|
|
2310
|
+
const p = await m(u, !0);
|
|
2311
|
+
s(a, p);
|
|
2312
|
+
}, [u, m, a, s]), f = S(async (p) => {
|
|
2313
|
+
if (!await l(c.removeSharingWith(p)))
|
|
2313
2314
|
return;
|
|
2314
|
-
const
|
|
2315
|
-
s(a,
|
|
2316
|
-
}, [
|
|
2315
|
+
const x = await m(p, !1);
|
|
2316
|
+
s(a, x);
|
|
2317
|
+
}, [m, l, a, c, s]);
|
|
2317
2318
|
return /* @__PURE__ */ n.jsxs(He, { show: e, onHide: t, children: [
|
|
2318
2319
|
/* @__PURE__ */ n.jsx(He.Header, { closeButton: !0, children: /* @__PURE__ */ n.jsx(He.Title, { children: c.reportSharing }) }),
|
|
2319
2320
|
/* @__PURE__ */ n.jsxs(He.Body, { children: [
|
|
2320
|
-
/* @__PURE__ */ n.jsx(
|
|
2321
|
+
/* @__PURE__ */ n.jsx(X, { variant: "h6", children: c.sharedWith }),
|
|
2321
2322
|
/* @__PURE__ */ n.jsxs(lo, { variant: "flush", children: [
|
|
2322
2323
|
r && r.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-2", children: c.noone.toLowerCase() }) : null,
|
|
2323
|
-
r == null ? void 0 : r.map((
|
|
2324
|
-
|
|
2324
|
+
r == null ? void 0 : r.map((p) => /* @__PURE__ */ n.jsxs(bn, { className: "d-flex justify-content-between align-items-center gap-3 border-bottom px-2 py-1", children: [
|
|
2325
|
+
p.lastName,
|
|
2325
2326
|
" ",
|
|
2326
|
-
|
|
2327
|
+
p.firstName,
|
|
2327
2328
|
" [",
|
|
2328
|
-
|
|
2329
|
+
p.id,
|
|
2329
2330
|
"]",
|
|
2330
|
-
/* @__PURE__ */ n.jsx(
|
|
2331
|
-
] },
|
|
2331
|
+
/* @__PURE__ */ n.jsx(se, { color: "danger", onClick: () => f(p.id), children: /* @__PURE__ */ n.jsx(i, { icon: "delete" }) })
|
|
2332
|
+
] }, p.id))
|
|
2332
2333
|
] }),
|
|
2333
|
-
/* @__PURE__ */ n.jsx(
|
|
2334
|
+
/* @__PURE__ */ n.jsx(X, { variant: "h6", className: "mt-2 mb-2", children: c.addSharing }),
|
|
2334
2335
|
/* @__PURE__ */ n.jsxs("div", { className: "d-flex gap-2 align-items-center", children: [
|
|
2335
|
-
/* @__PURE__ */ n.jsx("div", { className: "flex-grow-1", children: /* @__PURE__ */ n.jsx(o, { defaultSelection: null, label: c.shareWith, onSelect: (
|
|
2336
|
-
d(
|
|
2336
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex-grow-1", children: /* @__PURE__ */ n.jsx(o, { defaultSelection: null, label: c.shareWith, onSelect: (p) => {
|
|
2337
|
+
d(p === null ? null : Number(p.id));
|
|
2337
2338
|
} }) }),
|
|
2338
|
-
/* @__PURE__ */ n.jsx(an, { onClick:
|
|
2339
|
+
/* @__PURE__ */ n.jsx(an, { onClick: g, disabled: u === null, children: c.add })
|
|
2339
2340
|
] })
|
|
2340
2341
|
] })
|
|
2341
2342
|
] });
|
|
2342
2343
|
}, ni = (e, t) => {
|
|
2343
|
-
const [r, s] =
|
|
2344
|
-
return
|
|
2344
|
+
const [r, s] = E(null);
|
|
2345
|
+
return B(() => {
|
|
2345
2346
|
e.then(({ default: a }) => {
|
|
2346
2347
|
const o = t !== void 0 ? t(a) : a;
|
|
2347
2348
|
s(o);
|
|
2348
2349
|
});
|
|
2349
2350
|
}, [t, e]), { mappings: r };
|
|
2350
|
-
}, kd = ({ reportType: e, title: t, data: r, filterElements: s, getReportRoute: a, localization: o, licenseKey: i, EmployeePicker: c, localizationJsonFile: l, localizationTransformer: u }) => {
|
|
2351
|
-
const { texts: { reports:
|
|
2352
|
-
const
|
|
2353
|
-
|
|
2351
|
+
}, kd = ({ reportType: e, title: t, data: r, filterElements: s, getReportRoute: a, localization: o, licenseKey: i, EmployeePicker: c, localizationJsonFile: l, localizationTransformer: u, customizeCell: d }) => {
|
|
2352
|
+
const { texts: { reports: m } } = Z(he), { confirm: g } = Lt(), f = Dr(), { id: p } = Ta(), h = Q(() => p === void 0 ? null : Number(p), [p]), x = S((F) => {
|
|
2353
|
+
const ne = F === null ? "" : F.toString();
|
|
2354
|
+
f(Et(a(e), { id: ne }), {
|
|
2354
2355
|
replace: !0
|
|
2355
2356
|
});
|
|
2356
|
-
}, [a,
|
|
2357
|
-
if (
|
|
2357
|
+
}, [a, f, e]), [w, y] = E(!1), j = J(null), { user: v } = Z(At), { data: _, reloadData: C, setData: D } = Va(`/reports/${e}`), { mappings: k } = ni(l, u), [T, I] = E({}), O = S((F) => {
|
|
2358
|
+
if (_ === null)
|
|
2358
2359
|
return;
|
|
2359
|
-
const
|
|
2360
|
-
|
|
2361
|
-
}, [
|
|
2362
|
-
await
|
|
2363
|
-
}, [
|
|
2364
|
-
if (
|
|
2360
|
+
const ne = F.target.value, ge = ne === "" ? null : Number(ne);
|
|
2361
|
+
x(ge);
|
|
2362
|
+
}, [_, x]), $ = S(async (F) => {
|
|
2363
|
+
await C(), x(F);
|
|
2364
|
+
}, [C, x]), N = Q(() => {
|
|
2365
|
+
if (_ === null)
|
|
2365
2366
|
return null;
|
|
2366
|
-
const
|
|
2367
|
-
return
|
|
2368
|
-
}, [
|
|
2369
|
-
|
|
2370
|
-
var
|
|
2371
|
-
if (
|
|
2367
|
+
const F = _.reportVersions.find((ne) => ne.reportVersionId === h);
|
|
2368
|
+
return F === void 0 ? null : F;
|
|
2369
|
+
}, [_, h]);
|
|
2370
|
+
B(() => {
|
|
2371
|
+
var ne;
|
|
2372
|
+
if (_ === null)
|
|
2372
2373
|
return;
|
|
2373
|
-
if (
|
|
2374
|
-
|
|
2374
|
+
if (N === null) {
|
|
2375
|
+
I({});
|
|
2375
2376
|
return;
|
|
2376
2377
|
}
|
|
2377
|
-
const
|
|
2378
|
-
F
|
|
2379
|
-
}, [
|
|
2380
|
-
const { save:
|
|
2378
|
+
const F = Qo(N) ?? {};
|
|
2379
|
+
I(F), (ne = j.current) == null || ne.flexmonster.refresh();
|
|
2380
|
+
}, [_, N, h]);
|
|
2381
|
+
const { save: M, saveAs: re, archive: R, detach: z } = Xo(e, j, h, $), L = Q(() => ({
|
|
2381
2382
|
data: r ?? [],
|
|
2382
|
-
mapping:
|
|
2383
|
-
}), [r,
|
|
2384
|
-
var
|
|
2385
|
-
await g(
|
|
2386
|
-
}, [g, L,
|
|
2387
|
-
var
|
|
2388
|
-
return (
|
|
2389
|
-
}, [
|
|
2390
|
-
|
|
2391
|
-
const
|
|
2392
|
-
if (
|
|
2393
|
-
return
|
|
2394
|
-
const
|
|
2395
|
-
...
|
|
2396
|
-
users:
|
|
2397
|
-
},
|
|
2398
|
-
return
|
|
2399
|
-
...
|
|
2400
|
-
reportVersions:
|
|
2383
|
+
mapping: k ?? void 0
|
|
2384
|
+
}), [r, k]), G = S(async () => {
|
|
2385
|
+
var ne;
|
|
2386
|
+
await g(m.confirmRevertChanges) && ((ne = j.current) == null || ne.flexmonster.setReport({ dataSource: L, ...T }));
|
|
2387
|
+
}, [g, L, m.confirmRevertChanges, T]), W = Q(() => (N == null ? void 0 : N.ownerId) === v.personalNumber, [N == null ? void 0 : N.ownerId, v.personalNumber]), K = Q(() => {
|
|
2388
|
+
var F;
|
|
2389
|
+
return (F = N == null ? void 0 : N.users) == null ? void 0 : F.some((ne) => ne.id === v.personalNumber && !ne.isReportOwner);
|
|
2390
|
+
}, [N == null ? void 0 : N.users, v.personalNumber]), ee = S((F, ne) => {
|
|
2391
|
+
D((ge) => {
|
|
2392
|
+
const fe = ge == null ? void 0 : ge.reportVersions.findIndex((Ce) => Ce.reportVersionId === F);
|
|
2393
|
+
if (fe === void 0 || ge === null)
|
|
2394
|
+
return ge;
|
|
2395
|
+
const te = {
|
|
2396
|
+
...ge.reportVersions[fe],
|
|
2397
|
+
users: ne.filter((Ce) => Ce.isReportOwner === !1)
|
|
2398
|
+
}, we = [...ge.reportVersions];
|
|
2399
|
+
return we[fe] = te, {
|
|
2400
|
+
...ge,
|
|
2401
|
+
reportVersions: we
|
|
2401
2402
|
};
|
|
2402
2403
|
});
|
|
2403
|
-
}, [
|
|
2404
|
-
await g(
|
|
2405
|
-
}, [
|
|
2406
|
-
await g(
|
|
2407
|
-
}, [g,
|
|
2408
|
-
return
|
|
2409
|
-
var
|
|
2410
|
-
|
|
2411
|
-
}, [
|
|
2404
|
+
}, [D]), P = S(async () => {
|
|
2405
|
+
await g(m.confirmDelete(N == null ? void 0 : N.name)) && (await R(), x(null), await C());
|
|
2406
|
+
}, [R, g, C, N == null ? void 0 : N.name, m, x]), H = S(async () => {
|
|
2407
|
+
await g(m.confirmDetach(N == null ? void 0 : N.name)) && (await z(), x(null), await C());
|
|
2408
|
+
}, [g, z, C, N == null ? void 0 : N.name, m, x]);
|
|
2409
|
+
return B(() => {
|
|
2410
|
+
var F;
|
|
2411
|
+
h === null && x(((F = _ == null ? void 0 : _.reportVersions.find((ne) => ne.isSystem === !0)) == null ? void 0 : F.reportVersionId) ?? null);
|
|
2412
|
+
}, [_ == null ? void 0 : _.reportVersions, h, x]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2412
2413
|
/* @__PURE__ */ n.jsx(za, { title: /* @__PURE__ */ n.jsxs("div", { className: "d-flex justify-content-start gap-3", children: [
|
|
2413
|
-
/* @__PURE__ */ n.jsx(
|
|
2414
|
+
/* @__PURE__ */ n.jsx(X, { variant: "h3", children: t }),
|
|
2414
2415
|
s,
|
|
2415
2416
|
/* @__PURE__ */ n.jsxs("div", { className: "d-flex gap-1 align-items-center", children: [
|
|
2416
|
-
/* @__PURE__ */ n.jsxs(la, { size: "sm", value:
|
|
2417
|
-
/* @__PURE__ */ n.jsx("optgroup", { label:
|
|
2418
|
-
/* @__PURE__ */ n.jsx("optgroup", { label:
|
|
2419
|
-
/* @__PURE__ */ n.jsx("optgroup", { label:
|
|
2417
|
+
/* @__PURE__ */ n.jsxs(la, { size: "sm", value: h ?? void 0, onChange: O, children: [
|
|
2418
|
+
/* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectSystem, children: _ == null ? void 0 : _.reportVersions.filter((F) => F.isSystem === !0).map((F) => /* @__PURE__ */ n.jsx("option", { value: F.reportVersionId, children: F.name }, F.reportVersionId)) }),
|
|
2419
|
+
/* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectYour, children: _ == null ? void 0 : _.reportVersions.filter((F) => F.ownerId === v.personalNumber).map((F) => /* @__PURE__ */ n.jsx("option", { value: F.reportVersionId, children: F.name }, F.reportVersionId)) }),
|
|
2420
|
+
/* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectSharedWithYou, children: _ == null ? void 0 : _.reportVersions.filter((F) => F.isSystem === !1 && F.ownerId !== v.personalNumber).map((F) => /* @__PURE__ */ n.jsx("option", { value: F.reportVersionId, children: `${F.name} [${F.ownerId}]` }, F.reportVersionId)) })
|
|
2420
2421
|
] }),
|
|
2421
|
-
/* @__PURE__ */ n.jsx(Ae, { icon: /* @__PURE__ */ n.jsx(ca, {}), onClick:
|
|
2422
|
-
/* @__PURE__ */ n.jsx(Ae, { icon: /* @__PURE__ */ n.jsx(da, {}), onClick:
|
|
2422
|
+
/* @__PURE__ */ n.jsx(Ae, { icon: /* @__PURE__ */ n.jsx(ca, {}), onClick: M, disabled: h === null || (N == null ? void 0 : N.isSystem) || !W, children: m.save }),
|
|
2423
|
+
/* @__PURE__ */ n.jsx(Ae, { icon: /* @__PURE__ */ n.jsx(da, {}), onClick: re, className: "flex-shrink-0", children: m.saveAs }),
|
|
2423
2424
|
/* @__PURE__ */ n.jsxs(pn, { toggle: /* @__PURE__ */ n.jsx(xn, { as: Nr }), children: [
|
|
2424
|
-
/* @__PURE__ */ n.jsx(et, { onClick:
|
|
2425
|
-
/* @__PURE__ */ n.jsx(et, { onClick: () => y(!0), disabled: !
|
|
2426
|
-
|
|
2427
|
-
|
|
2425
|
+
/* @__PURE__ */ n.jsx(et, { onClick: G, children: m.revertChanges }),
|
|
2426
|
+
/* @__PURE__ */ n.jsx(et, { onClick: () => y(!0), disabled: !W || (N == null ? void 0 : N.isSystem), children: m.share }),
|
|
2427
|
+
W && !(N != null && N.isSystem) ? /* @__PURE__ */ n.jsx(et, { color: "danger", onClick: P, children: m.delete }) : null,
|
|
2428
|
+
K && !(N != null && N.isSystem) ? /* @__PURE__ */ n.jsx(et, { color: "danger", onClick: H, children: m.detach }) : null
|
|
2428
2429
|
] })
|
|
2429
2430
|
] })
|
|
2430
|
-
] }), children: /* @__PURE__ */ n.jsx("div", { className:
|
|
2431
|
-
|
|
2431
|
+
] }), children: /* @__PURE__ */ n.jsx("div", { className: b("h-100 w-100", L.data && L.data.length > 0 ? "" : "d-none"), children: /* @__PURE__ */ n.jsx(Jo, { dataSource: L, settings: T, pivotRef: j, enabled: L.data && L.data.length > 0, localization: o, licenseKey: i, customizeCell: d }) }) }),
|
|
2432
|
+
N !== null ? /* @__PURE__ */ n.jsx(ti, { isOpen: w, onHide: () => y(!1), usersData: N.users ?? null, setUsersData: ee, reportVersionId: N == null ? void 0 : N.reportVersionId, EmployeePicker: c }) : null
|
|
2432
2433
|
] });
|
|
2433
2434
|
}, Id = ({ cell: { value: e } }) => /* @__PURE__ */ n.jsx(n.Fragment, { children: e ? /* @__PURE__ */ n.jsx(Sr, { name: e, size: 21, fontSize: 12 }) : /* @__PURE__ */ n.jsx(n.Fragment, {}) }), ri = ({ knownTypes: e, typeFilters: t, onChangeTypeFilters: r }) => /* @__PURE__ */ n.jsx("div", { className: "mb-1 d-flex justify-content-center gap-2", children: e.map((s) => /* @__PURE__ */ n.jsx("div", { role: "button", style: {
|
|
2434
2435
|
height: "14px",
|
|
@@ -2436,29 +2437,29 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2436
2437
|
borderRadius: "50%",
|
|
2437
2438
|
border: "2px solid transparent",
|
|
2438
2439
|
backgroundColor: "transparent"
|
|
2439
|
-
}, className:
|
|
2440
|
+
}, className: b(`border-${s}`, t.includes(s) && `bg-${s}`), onClick: () => {
|
|
2440
2441
|
t.includes(s) ? r(t.filter((a) => a !== s)) : r([...t, s]);
|
|
2441
2442
|
} }, s)) }), si = ({ linksTo: e, onClick: t, children: r }) => e ? /* @__PURE__ */ n.jsx(tt, { to: e, className: "text-decoration-none", onClick: t, children: r }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: r }), ai = ({ message: e, onDeleteMessage: t, onClickMessage: r, getIcon: s, getLinksTo: a }) => {
|
|
2442
|
-
const { ProjectIconComponent: o, localizationContext: i } = Z(
|
|
2443
|
+
const { ProjectIconComponent: o, localizationContext: i } = Z(he), { dateFnsLocale: c } = Z(i), l = e.dateTime ? yt(e.dateTime) : null, u = l ? Ua(new Date(Date.now()), l) : 0;
|
|
2443
2444
|
return /* @__PURE__ */ n.jsxs("div", { children: [
|
|
2444
|
-
l && /* @__PURE__ */ n.jsx("div", { className: "d-flex justify-content-end", children: /* @__PURE__ */ n.jsx(Bt, { text: jt(l, "dd.MM.yyyy HH:mm"), placement: "left", children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
|
|
2445
|
+
l && /* @__PURE__ */ n.jsx("div", { className: "d-flex justify-content-end", children: /* @__PURE__ */ n.jsx(Bt, { text: jt(l, "dd.MM.yyyy HH:mm"), placement: "left", children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(X, { variant: "caption", children: u > 2 ? jt(l, "dd.MM.yyyy") : Ga(l, new Date(Date.now()), {
|
|
2445
2446
|
locale: c.code
|
|
2446
2447
|
}) }) }) }) }),
|
|
2447
2448
|
/* @__PURE__ */ n.jsx(si, { linksTo: a(e) ?? void 0, onClick: r, children: /* @__PURE__ */ n.jsx(ac, { level: e.type, noIcon: !0, children: /* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-start gap-2", children: [
|
|
2448
2449
|
s(e),
|
|
2449
2450
|
/* @__PURE__ */ n.jsxs("div", { className: "d-flex flex-column gap-1 w-100", children: [
|
|
2450
2451
|
/* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-start justify-content-between gap-3", children: [
|
|
2451
|
-
/* @__PURE__ */ n.jsx(
|
|
2452
|
-
/* @__PURE__ */ n.jsx(
|
|
2452
|
+
/* @__PURE__ */ n.jsx(X, { variant: "body2", className: "fw-bold", children: e.subject }),
|
|
2453
|
+
/* @__PURE__ */ n.jsx(se, { size: "sm", onClick: (d) => {
|
|
2453
2454
|
d.preventDefault(), d.stopPropagation(), t(e.id);
|
|
2454
2455
|
}, children: /* @__PURE__ */ n.jsx(o, { icon: "delete" }) })
|
|
2455
2456
|
] }),
|
|
2456
|
-
/* @__PURE__ */ n.jsx(
|
|
2457
|
+
/* @__PURE__ */ n.jsx(X, { variant: "body2", children: e.text })
|
|
2457
2458
|
] })
|
|
2458
2459
|
] }) }) })
|
|
2459
2460
|
] });
|
|
2460
2461
|
}, Qn = ["info", "warning", "danger"], Zn = ({ messages: e, isLoading: t, onDeleteMessage: r, onClickMessage: s, getIcon: a, getLinksTo: o }) => {
|
|
2461
|
-
const { texts: { messageBoard: i } } = Z(
|
|
2462
|
+
const { texts: { messageBoard: i } } = Z(he), [c, l] = E(Qn), u = Q(() => e.filter((d) => c.includes(d.type ?? "")), [c, e]);
|
|
2462
2463
|
return /* @__PURE__ */ n.jsxs("div", { className: "h-100 d-flex flex-column overflow-hidden", children: [
|
|
2463
2464
|
/* @__PURE__ */ n.jsx(ri, { knownTypes: Qn, typeFilters: c, onChangeTypeFilters: (d) => l(d) }),
|
|
2464
2465
|
t && /* @__PURE__ */ n.jsxs("div", { className: "p-3 w-100", children: [
|
|
@@ -2484,61 +2485,61 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2484
2485
|
apiGet: "/messageBoard",
|
|
2485
2486
|
apiDelete: "/messageBoard/"
|
|
2486
2487
|
}, Dd = ({ renderAsNotifPanel: e, notifIcon: t, apiUrls: { apiGet: r = Zt.apiGet, apiDelete: s = Zt.apiDelete } = Zt, getIcon: a, getLinksTo: o }) => {
|
|
2487
|
-
const c = st(), [l, u] =
|
|
2488
|
-
f(!0), await c.get(r).then(({ data:
|
|
2489
|
-
u(
|
|
2488
|
+
const c = st(), [l, u] = E([]), [d, m] = E(!1), [g, f] = E(!1), [p, h] = E(!1), x = S(async () => {
|
|
2489
|
+
f(!0), await c.get(r).then(({ data: _ }) => {
|
|
2490
|
+
u(_), m(!0), f(!1);
|
|
2490
2491
|
}).catch(() => {
|
|
2491
2492
|
u([]), f(!1);
|
|
2492
2493
|
});
|
|
2493
|
-
}, [r, c]),
|
|
2494
|
-
|
|
2495
|
-
|
|
2494
|
+
}, [r, c]), w = S(async (_) => c.delete(`${s}${_}`).then(() => !0).catch(() => !1), [s, c]), y = S((_) => {
|
|
2495
|
+
w(_).then((C) => {
|
|
2496
|
+
C && u(l.filter((D) => D.id !== _));
|
|
2496
2497
|
});
|
|
2497
|
-
}, [
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
const
|
|
2498
|
+
}, [w, l]);
|
|
2499
|
+
B(() => {
|
|
2500
|
+
x();
|
|
2501
|
+
const _ = setInterval(() => x(), 60 * 1e3);
|
|
2501
2502
|
return () => {
|
|
2502
|
-
clearInterval(
|
|
2503
|
+
clearInterval(_);
|
|
2503
2504
|
};
|
|
2504
|
-
}, [
|
|
2505
|
-
const j = l.filter((
|
|
2505
|
+
}, [x]);
|
|
2506
|
+
const j = l.filter((_) => _.type === "danger").length, v = d ? !1 : g;
|
|
2506
2507
|
return e ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2507
2508
|
/* @__PURE__ */ n.jsxs("div", { className: "position-relative", children: [
|
|
2508
|
-
/* @__PURE__ */ n.jsx(
|
|
2509
|
+
/* @__PURE__ */ n.jsx(se, { size: "md", onClick: () => h(!p), children: t }),
|
|
2509
2510
|
j > 0 && /* @__PURE__ */ n.jsx("div", { className: "badge rounded-pill bg-danger p-1 px-2 text-white", style: { position: "absolute", top: "-6px", right: "-10px", fontSize: "10px" }, children: j })
|
|
2510
2511
|
] }),
|
|
2511
|
-
/* @__PURE__ */ n.jsx(Hn, { show:
|
|
2512
|
-
] }) : /* @__PURE__ */ n.jsx(Zn, { messages: l, isLoading:
|
|
2512
|
+
/* @__PURE__ */ n.jsx(Hn, { show: p, onHide: () => h(!1), placement: "end", children: /* @__PURE__ */ n.jsx(Hn.Body, { children: /* @__PURE__ */ n.jsx(Zn, { messages: l, isLoading: v, onDeleteMessage: y, onClickMessage: () => h(!1), getIcon: a, getLinksTo: o }) }) })
|
|
2513
|
+
] }) : /* @__PURE__ */ n.jsx(Zn, { messages: l, isLoading: v, onDeleteMessage: y, getIcon: a, getLinksTo: o });
|
|
2513
2514
|
}, oi = "_tab-panel_d8l8q_1", ii = "_full-height-no-overflow_d8l8q_5", li = "_disabled_d8l8q_12", Jt = {
|
|
2514
2515
|
"tab-panel": "_tab-panel_d8l8q_1",
|
|
2515
2516
|
tabPanel: oi,
|
|
2516
2517
|
"full-height-no-overflow": "_full-height-no-overflow_d8l8q_5",
|
|
2517
2518
|
fullHeightNoOverflow: ii,
|
|
2518
2519
|
disabled: li
|
|
2519
|
-
}, $d = ({ eventKey: e, activeTab: t, fullHeightNoOverflow: r, disabled: s, className: a, children: o }) => e !== t ? null : /* @__PURE__ */ n.jsx("div", { className:
|
|
2520
|
+
}, $d = ({ eventKey: e, activeTab: t, fullHeightNoOverflow: r, disabled: s, className: a, children: o }) => e !== t ? null : /* @__PURE__ */ n.jsx("div", { className: b("luminus-tab-panel", Jt.tabPanel, { [Jt.fullHeightNoOverflow]: r }, { disabled: s }, { [Jt.disabled]: s }, a), children: o }), ci = "_join-line_1q9e8_1", di = {
|
|
2520
2521
|
"join-line": "_join-line_1q9e8_1",
|
|
2521
2522
|
joinLine: ci
|
|
2522
|
-
}, Ed = ({ activeTab: e, onSelect: t, children: r, vertical: s, verticalStepper: a }) => /* @__PURE__ */ n.jsx("div", { className:
|
|
2523
|
+
}, Ed = ({ activeTab: e, onSelect: t, children: r, vertical: s, verticalStepper: a }) => /* @__PURE__ */ n.jsx("div", { className: b("luminus-tabs d-flex mb-2", { "gap-1": !a }, { "gap-0": a }, {
|
|
2523
2524
|
"flex-column": s || a
|
|
2524
2525
|
}), children: r.map((o, i) => {
|
|
2525
2526
|
const c = o.type, l = o.props;
|
|
2526
2527
|
if (!l)
|
|
2527
2528
|
return null;
|
|
2528
|
-
const u = l.eventKey, d = l.children,
|
|
2529
|
-
return /* @__PURE__ */ n.jsxs(
|
|
2530
|
-
/* @__PURE__ */ n.jsx(c, { ...l, className:
|
|
2531
|
-
t(u),
|
|
2529
|
+
const u = l.eventKey, d = l.children, m = l.className, g = l.onClick;
|
|
2530
|
+
return /* @__PURE__ */ n.jsxs(ke.Fragment, { children: [
|
|
2531
|
+
/* @__PURE__ */ n.jsx(c, { ...l, className: b({ active: e === u }, m), onClick: () => {
|
|
2532
|
+
t(u), g && g(u);
|
|
2532
2533
|
}, vertical: s || a, children: d }),
|
|
2533
|
-
a && i < r.length - 1 && /* @__PURE__ */ n.jsx("div", { className:
|
|
2534
|
+
a && i < r.length - 1 && /* @__PURE__ */ n.jsx("div", { className: b("join-line", di.joinLine) })
|
|
2534
2535
|
] }, l.eventKey);
|
|
2535
2536
|
}) }), ui = "_tab_1tbi7_1", fi = "_disabled_1tbi7_7", mi = "_vertical_1tbi7_13", Xt = {
|
|
2536
2537
|
tab: ui,
|
|
2537
2538
|
disabled: fi,
|
|
2538
2539
|
vertical: mi
|
|
2539
|
-
}, Od = ({ eventKey: e, className: t, onClick: r, disabled: s, vertical: a, children: o }) => /* @__PURE__ */ n.jsx("div", { role: "button", className:
|
|
2540
|
+
}, Od = ({ eventKey: e, className: t, onClick: r, disabled: s, vertical: a, children: o }) => /* @__PURE__ */ n.jsx("div", { role: "button", className: b("luminus-tab text-primary rounded", Xt.tab, t, {
|
|
2540
2541
|
disabled: s
|
|
2541
|
-
}, { [Xt.disabled]: s }, { vertical: a }, { [Xt.vertical]: a }), onClick: () => r && !s && r(e), children: typeof o == "string" ? /* @__PURE__ */ n.jsx(
|
|
2542
|
+
}, { [Xt.disabled]: s }, { vertical: a }, { [Xt.vertical]: a }), onClick: () => r && !s && r(e), children: typeof o == "string" ? /* @__PURE__ */ n.jsx(X, { variant: a ? "body" : "h6", className: a ? "" : "text-primary", children: o }) : o }), hi = "_widgets-row_13gg1_1", gi = "_widget_13gg1_1", pi = "_widget-img_13gg1_5", xi = "_widget-title-spacer_13gg1_14", vi = "_widget-title_13gg1_14", ji = "_title_13gg1_28", De = {
|
|
2542
2543
|
"widgets-row": "_widgets-row_13gg1_1",
|
|
2543
2544
|
widgetsRow: hi,
|
|
2544
2545
|
widget: gi,
|
|
@@ -2550,43 +2551,43 @@ const pd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2550
2551
|
widgetTitle: vi,
|
|
2551
2552
|
title: ji
|
|
2552
2553
|
}, yi = ({ show: e, widgetGroups: t, widgets: r, handleClose: s, onWidgetPicked: a, texts: o }) => {
|
|
2553
|
-
const [i, c] =
|
|
2554
|
+
const [i, c] = E(""), l = Q(() => r.filter((d) => d.id !== -1 && wt(d.name, i)), [r, i]), u = Q(() => t.filter((d) => l.some((m) => m.group === d.id)), [t, l]);
|
|
2554
2555
|
return /* @__PURE__ */ n.jsxs(He, { show: e, onHide: () => s(), size: "lg", children: [
|
|
2555
2556
|
/* @__PURE__ */ n.jsxs(He.Header, { closeButton: !0, children: [
|
|
2556
2557
|
/* @__PURE__ */ n.jsx(He.Title, { className: "w-100", children: o.pickWidgetToAdd }),
|
|
2557
2558
|
/* @__PURE__ */ n.jsx(ye.Control, { type: "search", size: "sm", value: i, placeholder: o.searchPlaceholder, onChange: (d) => {
|
|
2558
|
-
var
|
|
2559
|
-
return c(((
|
|
2559
|
+
var m;
|
|
2560
|
+
return c(((m = d.target) == null ? void 0 : m.value) ?? "");
|
|
2560
2561
|
}, className: "me-3", style: { maxWidth: "200px" } })
|
|
2561
2562
|
] }),
|
|
2562
2563
|
/* @__PURE__ */ n.jsx(He.Body, { className: "flex-column gap-3", children: l.length === 0 ? /* @__PURE__ */ n.jsx(kn, { variant: "warning", children: o.noWidgets }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2563
|
-
u.map((d) => /* @__PURE__ */ n.jsx(cn, { defaultOpen: !0, title: d.name ?? "", children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className:
|
|
2564
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
2565
|
-
backgroundImage:
|
|
2564
|
+
u.map((d) => /* @__PURE__ */ n.jsx(cn, { defaultOpen: !0, title: d.name ?? "", children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className: b("row gx-3 gy-3", De.widgetsRow), children: l.filter((m) => m.group === d.id).map((m) => /* @__PURE__ */ n.jsx("div", { className: "col col-4", children: /* @__PURE__ */ n.jsxs("div", { role: "button", className: b("p-0 pt-2 bg-white rounded shadow-sm", De.widget), onClick: () => a(m.id), children: [
|
|
2565
|
+
/* @__PURE__ */ n.jsx("div", { className: De.widgetImg, style: {
|
|
2566
|
+
backgroundImage: m.img ? `url(${m.img})` : void 0
|
|
2566
2567
|
} }),
|
|
2567
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
2568
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
2569
|
-
] },
|
|
2570
|
-
l.some((d) => d.group === void 0) && /* @__PURE__ */ n.jsx(cn, { defaultOpen: !0, title: o.otherWidgets, children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className:
|
|
2571
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
2568
|
+
/* @__PURE__ */ n.jsx("div", { className: De.widgetTitleSpacer }),
|
|
2569
|
+
/* @__PURE__ */ n.jsx("div", { className: b(De.widgetTitle, "rounded"), children: /* @__PURE__ */ n.jsx(X, { variant: "body", className: b(De.title, "text-white text-truncate"), children: m.name }) })
|
|
2570
|
+
] }, m.id) })) }) }) }, d.id)),
|
|
2571
|
+
l.some((d) => d.group === void 0) && /* @__PURE__ */ n.jsx(cn, { defaultOpen: !0, title: o.otherWidgets, children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className: b("row gx-3 gy-3", De.widgetsRow), children: l.filter((d) => d.group === void 0).map((d) => /* @__PURE__ */ n.jsx("div", { className: "col col-4", children: /* @__PURE__ */ n.jsxs("div", { role: "button", className: b("p-0 pt-2 bg-white rounded shadow-sm", De.widget), onClick: () => a(d.id), children: [
|
|
2572
|
+
/* @__PURE__ */ n.jsx("div", { className: De.widgetImg, style: {
|
|
2572
2573
|
backgroundImage: d.img ? `url(${d.img})` : void 0
|
|
2573
2574
|
} }),
|
|
2574
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
2575
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
2575
|
+
/* @__PURE__ */ n.jsx("div", { className: De.widgetTitleSpacer }),
|
|
2576
|
+
/* @__PURE__ */ n.jsx("div", { className: b(De.widgetTitle, "rounded"), children: /* @__PURE__ */ n.jsx(X, { variant: "body", className: b(De.title, "text-white text-truncate"), children: d.name }) })
|
|
2576
2577
|
] }, d.id) })) }) }) })
|
|
2577
2578
|
] }) })
|
|
2578
2579
|
] });
|
|
2579
2580
|
}, Jn = ({ widgetGroups: e, availableWidgets: t, onAdd: r, texts: s }) => {
|
|
2580
|
-
const [a, o] =
|
|
2581
|
+
const [a, o] = E(!1);
|
|
2581
2582
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2582
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
2583
|
+
/* @__PURE__ */ n.jsx("div", { className: b("luminus-empty-widget", No.widget), children: /* @__PURE__ */ n.jsx(se, { onClick: () => o(!0), children: /* @__PURE__ */ n.jsx(ua, {}) }) }),
|
|
2583
2584
|
/* @__PURE__ */ n.jsx(yi, { show: a, widgetGroups: e, widgets: t, handleClose: () => o(!1), onWidgetPicked: (i) => {
|
|
2584
2585
|
o(!1), r(i);
|
|
2585
2586
|
}, texts: s })
|
|
2586
2587
|
] });
|
|
2587
2588
|
}, wi = (e) => {
|
|
2588
|
-
const [t, r] =
|
|
2589
|
-
|
|
2589
|
+
const [t, r] = E({ widgets: [] });
|
|
2590
|
+
B(() => {
|
|
2590
2591
|
const a = localStorage.getItem("dashboardConfig");
|
|
2591
2592
|
a ? r(JSON.parse(a)) : e && r(e);
|
|
2592
2593
|
}, [e]);
|
|
@@ -2630,12 +2631,12 @@ class $i extends $a {
|
|
|
2630
2631
|
}
|
|
2631
2632
|
render() {
|
|
2632
2633
|
const { fallback: t, fallbackOn404: r, children: s, texts: a, reloadButtonDisplay: o = "append-after-child" } = this.props;
|
|
2633
|
-
return this.state.hasError ? o === "inject-to-child" && !this.state.is404Error && On(t) ?
|
|
2634
|
+
return this.state.hasError ? o === "inject-to-child" && !this.state.is404Error && On(t) ? ke.cloneElement(t, {
|
|
2634
2635
|
...t.props
|
|
2635
2636
|
}, /* @__PURE__ */ n.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
2636
2637
|
...t.props.children,
|
|
2637
2638
|
/* @__PURE__ */ n.jsx("div", { className: "d-flex gap-2 justify-content-center", children: /* @__PURE__ */ n.jsx(Ae, { type: "button", onClick: this.reload, children: a.reloadButtonContent }) })
|
|
2638
|
-
] })) : o === "inject-to-child" && this.state.is404Error && On(r) ?
|
|
2639
|
+
] })) : o === "inject-to-child" && this.state.is404Error && On(r) ? ke.cloneElement(r, {
|
|
2639
2640
|
...r.props
|
|
2640
2641
|
}, /* @__PURE__ */ n.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
2641
2642
|
...r.props.children,
|
|
@@ -2653,46 +2654,46 @@ class $i extends $a {
|
|
|
2653
2654
|
}
|
|
2654
2655
|
}
|
|
2655
2656
|
const Ei = (e) => (r) => {
|
|
2656
|
-
const { texts: { errorBoundary: s } } = Z(
|
|
2657
|
+
const { texts: { errorBoundary: s } } = Z(he);
|
|
2657
2658
|
return /* @__PURE__ */ n.jsx(e, { texts: s, ...r });
|
|
2658
2659
|
}, Oi = Ei($i), Fi = "_widget-card_e9tsb_1", Ti = {
|
|
2659
2660
|
"widget-card": "_widget-card_e9tsb_1",
|
|
2660
2661
|
widgetCard: Fi
|
|
2661
|
-
}, Xn = ({ children: e, title: t, headerContent: r }) => /* @__PURE__ */ n.jsx(Dl, { className:
|
|
2662
|
-
const { texts: { widget: r } } = Z(
|
|
2662
|
+
}, Xn = ({ children: e, title: t, headerContent: r }) => /* @__PURE__ */ n.jsx(Dl, { className: b(Ti.widgetCard, "luminus-widget"), title: t, headerContent: r, contentClassName: "h-100 overflow-auto", children: e }), Ri = ({ children: e, title: t }) => {
|
|
2663
|
+
const { texts: { widget: r } } = Z(he), s = Dr();
|
|
2663
2664
|
return /* @__PURE__ */ n.jsx(Oi, { fallback: /* @__PURE__ */ n.jsx(Xn, { title: t, children: r.fallbackError }), reloadButtonDisplay: "inject-to-child", navigateBack: () => s(-1), children: /* @__PURE__ */ n.jsx(Ea, { fallback: /* @__PURE__ */ n.jsx(Xn, { title: t, children: /* @__PURE__ */ n.jsx(Pa, {}) }), children: e }) });
|
|
2664
2665
|
}, Fd = ({ widgetGroups: e, availableWidgets: t, editMode: r, defaultDashboardConfig: s }) => {
|
|
2665
|
-
var
|
|
2666
|
-
const { texts: { homeDashboard: a } } = Z(
|
|
2667
|
-
var
|
|
2668
|
-
|
|
2666
|
+
var m;
|
|
2667
|
+
const { texts: { homeDashboard: a } } = Z(he), { dashboardConfig: o, onChangeDashboardConfig: i } = wi(s), c = S((g, f) => {
|
|
2668
|
+
var p, h;
|
|
2669
|
+
g === ((p = o.widgets) == null ? void 0 : p.length) ? i({
|
|
2669
2670
|
...o,
|
|
2670
2671
|
widgets: [...o.widgets, { widgetId: f, fullWidth: !1 }]
|
|
2671
2672
|
}) : i({
|
|
2672
2673
|
...o,
|
|
2673
|
-
widgets: ((h = o.widgets) == null ? void 0 : h.map((
|
|
2674
|
+
widgets: ((h = o.widgets) == null ? void 0 : h.map((x, w) => w === g ? { widgetId: f, fullWidth: !1 } : x)) ?? []
|
|
2674
2675
|
});
|
|
2675
|
-
}, [o, i]), l = S((
|
|
2676
|
-
var f,
|
|
2677
|
-
((f = o.widgets[
|
|
2676
|
+
}, [o, i]), l = S((g) => {
|
|
2677
|
+
var f, p;
|
|
2678
|
+
((f = o.widgets[g]) == null ? void 0 : f.widgetId) === -1 ? i({
|
|
2678
2679
|
...o,
|
|
2679
|
-
widgets: ((
|
|
2680
|
-
}) : c(
|
|
2681
|
-
}, [o, i, c]), u = S((
|
|
2680
|
+
widgets: ((p = o.widgets) == null ? void 0 : p.filter((h, x) => x !== g)) ?? []
|
|
2681
|
+
}) : c(g, -1);
|
|
2682
|
+
}, [o, i, c]), u = S((g) => {
|
|
2682
2683
|
var f;
|
|
2683
2684
|
i({
|
|
2684
2685
|
...o,
|
|
2685
|
-
widgets: ((f = o.widgets) == null ? void 0 : f.map((
|
|
2686
|
+
widgets: ((f = o.widgets) == null ? void 0 : f.map((p, h) => h === g ? { ...p, fullWidth: !p.fullWidth } : p)) ?? []
|
|
2686
2687
|
});
|
|
2687
|
-
}, [o, i]), d = S((
|
|
2688
|
-
[Re.widgetEdit]: r &&
|
|
2689
|
-
}, { [Re.fullWidth]:
|
|
2688
|
+
}, [o, i]), d = S((g, f, p) => g ? /* @__PURE__ */ n.jsxs("div", { className: b(Re.widgetWrapper, {
|
|
2689
|
+
[Re.widgetEdit]: r && g.id !== -1
|
|
2690
|
+
}, { [Re.fullWidth]: p }), children: [
|
|
2690
2691
|
r && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2691
|
-
/* @__PURE__ */ n.jsx(
|
|
2692
|
-
/* @__PURE__ */ n.jsx(
|
|
2692
|
+
/* @__PURE__ */ n.jsx(se, { color: "danger", onClick: () => l(f), className: b(Re.removeIcon), children: /* @__PURE__ */ n.jsx(Cr, {}) }),
|
|
2693
|
+
/* @__PURE__ */ n.jsx(se, { color: p ? "danger" : "primary", onClick: () => u(f), className: b(Re.fullWidthIcon), children: /* @__PURE__ */ n.jsx(fa, {}) })
|
|
2693
2694
|
] }),
|
|
2694
|
-
|
|
2695
|
-
|
|
2695
|
+
g.id === -1 ? r && /* @__PURE__ */ n.jsx("div", { className: Re.widgetWrapper, children: /* @__PURE__ */ n.jsx(Jn, { widgetGroups: e, availableWidgets: t, onAdd: (h) => c(f, h), texts: a }) }) : /* @__PURE__ */ n.jsx(Ri, { title: g.title, children: /* @__PURE__ */ n.jsx(g.WidgetElement, { title: g.title }) }),
|
|
2696
|
+
g.id > -1 && r && /* @__PURE__ */ n.jsx("div", { className: Re.widgetEditOverlay })
|
|
2696
2697
|
] }, f) : /* @__PURE__ */ n.jsx(n.Fragment, {}), [
|
|
2697
2698
|
r,
|
|
2698
2699
|
e,
|
|
@@ -2703,10 +2704,10 @@ const Ei = (e) => (r) => {
|
|
|
2703
2704
|
a
|
|
2704
2705
|
]);
|
|
2705
2706
|
return /* @__PURE__ */ n.jsx("div", { className: Re.dashboard, children: /* @__PURE__ */ n.jsxs("div", { className: Re.widgetsGrid, children: [
|
|
2706
|
-
(
|
|
2707
|
-
r && /* @__PURE__ */ n.jsx(Jn, { widgetGroups: e, availableWidgets: t, onAdd: (
|
|
2707
|
+
(m = o.widgets) == null ? void 0 : m.map((g, f) => d(t.find((p) => p.id === g.widgetId), f, g.fullWidth)),
|
|
2708
|
+
r && /* @__PURE__ */ n.jsx(Jn, { widgetGroups: e, availableWidgets: t, onAdd: (g) => {
|
|
2708
2709
|
var f;
|
|
2709
|
-
return c((f = o.widgets) == null ? void 0 : f.length,
|
|
2710
|
+
return c((f = o.widgets) == null ? void 0 : f.length, g);
|
|
2710
2711
|
}, texts: a })
|
|
2711
2712
|
] }) });
|
|
2712
2713
|
}, Li = "_badge_193ci_1", Ai = "_sm_193ci_6", Mi = "_md_193ci_10", Bi = "_lg_193ci_14", Vi = "_light_193ci_18", en = {
|
|
@@ -2715,18 +2716,18 @@ const Ei = (e) => (r) => {
|
|
|
2715
2716
|
md: Mi,
|
|
2716
2717
|
lg: Bi,
|
|
2717
2718
|
light: Vi
|
|
2718
|
-
}, Td = ({ children: e, color: t = "primary", size: r = "md", rounded: s, className: a, ...o }) => /* @__PURE__ */ n.jsx("span", { className:
|
|
2719
|
+
}, Td = ({ children: e, color: t = "primary", size: r = "md", rounded: s, className: a, ...o }) => /* @__PURE__ */ n.jsx("span", { className: b(`luminus-badge badge bg-${t} ${a ?? ""}`, { "rounded-pill": s }, { "text-dark": t === "light" }, { [en.light]: t === "light" }, en.badge, en[r]), ...o, children: e }), zi = "_collapse-icon_1ahhn_1", Pi = "_collapsed_1ahhn_6", er = {
|
|
2719
2720
|
"collapse-icon": "_collapse-icon_1ahhn_1",
|
|
2720
2721
|
collapseIcon: zi,
|
|
2721
2722
|
collapsed: Pi
|
|
2722
2723
|
}, cn = ({ title: e, children: t, className: r, ...s }) => {
|
|
2723
|
-
const a = s.controlled ? !1 : s.defaultOpen ?? !1, [o, i] =
|
|
2724
|
-
return
|
|
2724
|
+
const a = s.controlled ? !1 : s.defaultOpen ?? !1, [o, i] = E(a), c = s.controlled ? s.isOpen : o;
|
|
2725
|
+
return B(() => {
|
|
2725
2726
|
i(a);
|
|
2726
2727
|
}, [a]), /* @__PURE__ */ n.jsxs("div", { className: r ?? "", children: [
|
|
2727
2728
|
/* @__PURE__ */ n.jsxs("div", { role: "button", className: "d-flex align-items-center justify-content-between pb-3 pt-2", onClick: () => s.controlled ? s.onToggle(!s.isOpen) : i(!o), children: [
|
|
2728
|
-
/* @__PURE__ */ n.jsx(
|
|
2729
|
-
/* @__PURE__ */ n.jsx(kr, { className:
|
|
2729
|
+
/* @__PURE__ */ n.jsx(X, { variant: "h6", children: e }),
|
|
2730
|
+
/* @__PURE__ */ n.jsx(kr, { className: b(er.collapseIcon, {
|
|
2730
2731
|
[er.collapsed]: c
|
|
2731
2732
|
}) })
|
|
2732
2733
|
] }),
|
|
@@ -2735,66 +2736,66 @@ const Ei = (e) => (r) => {
|
|
|
2735
2736
|
] });
|
|
2736
2737
|
};
|
|
2737
2738
|
function Wi(e, t, r) {
|
|
2738
|
-
var s = this, a = J(null), o = J(0), i = J(null), c = J([]), l = J(), u = J(), d = J(e),
|
|
2739
|
+
var s = this, a = J(null), o = J(0), i = J(null), c = J([]), l = J(), u = J(), d = J(e), m = J(!0);
|
|
2739
2740
|
d.current = e;
|
|
2740
|
-
var
|
|
2741
|
+
var g = typeof window < "u", f = !t && t !== 0 && g;
|
|
2741
2742
|
if (typeof e != "function") throw new TypeError("Expected a function");
|
|
2742
2743
|
t = +t || 0;
|
|
2743
|
-
var
|
|
2744
|
-
|
|
2745
|
-
return
|
|
2746
|
-
|
|
2744
|
+
var p = !!(r = r || {}).leading, h = !("trailing" in r) || !!r.trailing, x = "maxWait" in r, w = "debounceOnServer" in r && !!r.debounceOnServer, y = x ? Math.max(+r.maxWait || 0, t) : null;
|
|
2745
|
+
B(function() {
|
|
2746
|
+
return m.current = !0, function() {
|
|
2747
|
+
m.current = !1;
|
|
2747
2748
|
};
|
|
2748
2749
|
}, []);
|
|
2749
2750
|
var j = Q(function() {
|
|
2750
|
-
var
|
|
2751
|
-
var
|
|
2752
|
-
return c.current = l.current = null, o.current =
|
|
2753
|
-
},
|
|
2754
|
-
f && cancelAnimationFrame(i.current), i.current = f ? requestAnimationFrame(
|
|
2755
|
-
},
|
|
2756
|
-
if (!
|
|
2757
|
-
var
|
|
2758
|
-
return !a.current ||
|
|
2759
|
-
}, D = function(
|
|
2760
|
-
return i.current = null, h && c.current ?
|
|
2761
|
-
},
|
|
2762
|
-
var
|
|
2763
|
-
if (
|
|
2764
|
-
if (
|
|
2765
|
-
var
|
|
2766
|
-
|
|
2751
|
+
var v = function(I) {
|
|
2752
|
+
var O = c.current, $ = l.current;
|
|
2753
|
+
return c.current = l.current = null, o.current = I, u.current = d.current.apply($, O);
|
|
2754
|
+
}, _ = function(I, O) {
|
|
2755
|
+
f && cancelAnimationFrame(i.current), i.current = f ? requestAnimationFrame(I) : setTimeout(I, O);
|
|
2756
|
+
}, C = function(I) {
|
|
2757
|
+
if (!m.current) return !1;
|
|
2758
|
+
var O = I - a.current;
|
|
2759
|
+
return !a.current || O >= t || O < 0 || x && I - o.current >= y;
|
|
2760
|
+
}, D = function(I) {
|
|
2761
|
+
return i.current = null, h && c.current ? v(I) : (c.current = l.current = null, u.current);
|
|
2762
|
+
}, k = function I() {
|
|
2763
|
+
var O = Date.now();
|
|
2764
|
+
if (C(O)) return D(O);
|
|
2765
|
+
if (m.current) {
|
|
2766
|
+
var $ = t - (O - a.current), N = x ? Math.min($, y - (O - o.current)) : $;
|
|
2767
|
+
_(I, N);
|
|
2767
2768
|
}
|
|
2768
|
-
},
|
|
2769
|
-
if (
|
|
2770
|
-
var
|
|
2771
|
-
if (c.current = [].slice.call(arguments), l.current = s, a.current =
|
|
2772
|
-
if (!i.current &&
|
|
2773
|
-
if (
|
|
2769
|
+
}, T = function() {
|
|
2770
|
+
if (g || w) {
|
|
2771
|
+
var I = Date.now(), O = C(I);
|
|
2772
|
+
if (c.current = [].slice.call(arguments), l.current = s, a.current = I, O) {
|
|
2773
|
+
if (!i.current && m.current) return o.current = a.current, _(k, t), p ? v(a.current) : u.current;
|
|
2774
|
+
if (x) return _(k, t), v(a.current);
|
|
2774
2775
|
}
|
|
2775
|
-
return i.current ||
|
|
2776
|
+
return i.current || _(k, t), u.current;
|
|
2776
2777
|
}
|
|
2777
2778
|
};
|
|
2778
|
-
return
|
|
2779
|
+
return T.cancel = function() {
|
|
2779
2780
|
i.current && (f ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), o.current = 0, c.current = a.current = l.current = i.current = null;
|
|
2780
|
-
},
|
|
2781
|
+
}, T.isPending = function() {
|
|
2781
2782
|
return !!i.current;
|
|
2782
|
-
},
|
|
2783
|
+
}, T.flush = function() {
|
|
2783
2784
|
return i.current ? D(Date.now()) : u.current;
|
|
2784
|
-
},
|
|
2785
|
-
}, [
|
|
2785
|
+
}, T;
|
|
2786
|
+
}, [p, x, t, y, h, f, g, w]);
|
|
2786
2787
|
return j;
|
|
2787
2788
|
}
|
|
2788
2789
|
function Hi(e, t) {
|
|
2789
2790
|
return e === t;
|
|
2790
2791
|
}
|
|
2791
2792
|
function js(e, t, r) {
|
|
2792
|
-
var s = Hi, a = J(e), o =
|
|
2793
|
+
var s = Hi, a = J(e), o = E({})[1], i = Wi(S(function(l) {
|
|
2793
2794
|
a.current = l, o({});
|
|
2794
2795
|
}, [o]), t, r), c = J(e);
|
|
2795
2796
|
return s(c.current, e) || (i(e), c.current = e), [a.current, i];
|
|
2796
2797
|
}
|
|
2797
|
-
const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13", Ki = "_search-input-container_1kgb8_19", qi = "_search-input_1kgb8_19", Qi = "_loading-container_1kgb8_25", Zi = "_items-container_1kgb8_32", Ji = "_header-row_1kgb8_38", Xi = "_item_1kgb8_32", el = "_name_1kgb8_57", tl = "_column-item_1kgb8_62", nl = "_icon_1kgb8_66", rl = "_action-buttons-container_1kgb8_74", sl = "_reverse_1kgb8_82", al = "_action-button_1kgb8_74",
|
|
2798
|
+
const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13", Ki = "_search-input-container_1kgb8_19", qi = "_search-input_1kgb8_19", Qi = "_loading-container_1kgb8_25", Zi = "_items-container_1kgb8_32", Ji = "_header-row_1kgb8_38", Xi = "_item_1kgb8_32", el = "_name_1kgb8_57", tl = "_column-item_1kgb8_62", nl = "_icon_1kgb8_66", rl = "_action-buttons-container_1kgb8_74", sl = "_reverse_1kgb8_82", al = "_action-button_1kgb8_74", Ne = {
|
|
2798
2799
|
wrapper: Ui,
|
|
2799
2800
|
open: Yi,
|
|
2800
2801
|
dropdown: Gi,
|
|
@@ -2818,115 +2819,115 @@ const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13",
|
|
|
2818
2819
|
reverse: sl,
|
|
2819
2820
|
"action-button": "_action-button_1kgb8_74",
|
|
2820
2821
|
actionButton: al
|
|
2821
|
-
}, Pt = ({ show: e, onCancel: t, items: r, currentSelection: s, onSelectionChange: a, onSearchQueryChange: o, texts: i, itemsNameWidth: c, additionalColumns: l, displayIdAsName: u = !1, autoHideSearch: d = !1, allItemsLength:
|
|
2822
|
+
}, Pt = ({ show: e, onCancel: t, items: r, currentSelection: s, onSelectionChange: a, onSearchQueryChange: o, texts: i, itemsNameWidth: c, additionalColumns: l, displayIdAsName: u = !1, autoHideSearch: d = !1, allItemsLength: m, disabled: g, isLoading: f = !1, inputRef: p, archiveColumn: h = "archive" }) => {
|
|
2822
2823
|
var Ke;
|
|
2823
|
-
const
|
|
2824
|
-
|
|
2824
|
+
const x = J(null), w = J(null), y = J(null), j = J(null), v = J(null), [_, C] = E(""), [D] = js(_, 500), [, k] = E(!1), { copyToClipboard: T } = La(), I = (Ke = p.current) == null ? void 0 : Ke.getBoundingClientRect(), O = (I == null ? void 0 : I.x) ?? 0, $ = ((I == null ? void 0 : I.x) ?? 0) + ((I == null ? void 0 : I.width) ?? 0), N = (I == null ? void 0 : I.y) ?? 0, M = ((I == null ? void 0 : I.y) ?? 0) + ((I == null ? void 0 : I.height) ?? 0), re = (I == null ? void 0 : I.width) ?? 0, R = (I == null ? void 0 : I.height) ?? 0, z = 5, L = Q(() => O ? O > window.innerWidth / 2 : !1, [O]), G = Q(() => N ? N > window.innerHeight / 2 : !1, [N]);
|
|
2825
|
+
B(() => {
|
|
2825
2826
|
var U;
|
|
2826
2827
|
e && ((U = j.current) == null || U.focus());
|
|
2827
|
-
}, [j, e]),
|
|
2828
|
-
e ||
|
|
2829
|
-
}, [e]),
|
|
2828
|
+
}, [j, e]), B(() => {
|
|
2829
|
+
e || C("");
|
|
2830
|
+
}, [e]), B(() => {
|
|
2830
2831
|
o(D);
|
|
2831
2832
|
}, [D, o]);
|
|
2832
|
-
const [W, K] =
|
|
2833
|
-
|
|
2833
|
+
const [W, K] = E(null);
|
|
2834
|
+
B(() => {
|
|
2834
2835
|
e && r.length > 0 ? K(0) : K(null);
|
|
2835
2836
|
}, [r, e]);
|
|
2836
|
-
const
|
|
2837
|
+
const ee = Q(() => W !== null ? r.at(W) ?? null : null, [W, r]), P = S((U, pe) => {
|
|
2837
2838
|
var at, A;
|
|
2838
|
-
const
|
|
2839
|
-
if (
|
|
2840
|
-
const
|
|
2841
|
-
|
|
2839
|
+
const _e = document.getElementById(`item-${U}`);
|
|
2840
|
+
if (_e) {
|
|
2841
|
+
const V = _e.clientHeight ?? 0;
|
|
2842
|
+
pe === "down" ? (at = v.current) == null || at.scrollBy({
|
|
2842
2843
|
left: 0,
|
|
2843
|
-
top:
|
|
2844
|
+
top: V,
|
|
2844
2845
|
behavior: "smooth"
|
|
2845
|
-
}) : (A =
|
|
2846
|
+
}) : (A = v.current) == null || A.scrollBy({
|
|
2846
2847
|
left: 0,
|
|
2847
|
-
top: -
|
|
2848
|
+
top: -V,
|
|
2848
2849
|
behavior: "smooth"
|
|
2849
2850
|
});
|
|
2850
2851
|
}
|
|
2851
|
-
}, []),
|
|
2852
|
-
if (W === null ||
|
|
2852
|
+
}, []), H = S((U) => {
|
|
2853
|
+
if (W === null || g)
|
|
2853
2854
|
return;
|
|
2854
|
-
const
|
|
2855
|
-
|
|
2856
|
-
}, [W, r,
|
|
2855
|
+
const pe = W + U;
|
|
2856
|
+
pe < 0 || pe >= r.length || K((_e) => (_e !== null && P(_e, U > 0 ? "down" : "up"), pe));
|
|
2857
|
+
}, [W, r, g, P]), F = S((U) => {
|
|
2857
2858
|
if (e)
|
|
2858
2859
|
switch (U.key) {
|
|
2859
2860
|
case "Escape":
|
|
2860
2861
|
U.stopPropagation(), U.preventDefault(), t();
|
|
2861
2862
|
break;
|
|
2862
2863
|
case "Enter":
|
|
2863
|
-
U.stopPropagation(), U.preventDefault(),
|
|
2864
|
+
U.stopPropagation(), U.preventDefault(), g || a(ee);
|
|
2864
2865
|
break;
|
|
2865
2866
|
case "ArrowUp":
|
|
2866
|
-
U.stopPropagation(), U.preventDefault(),
|
|
2867
|
+
U.stopPropagation(), U.preventDefault(), H(-1);
|
|
2867
2868
|
break;
|
|
2868
2869
|
case "ArrowDown":
|
|
2869
|
-
U.stopPropagation(), U.preventDefault(),
|
|
2870
|
+
U.stopPropagation(), U.preventDefault(), H(1);
|
|
2870
2871
|
break;
|
|
2871
2872
|
}
|
|
2872
|
-
}, [t, e,
|
|
2873
|
-
|
|
2873
|
+
}, [t, e, H, ee, g, a]), ne = S(() => {
|
|
2874
|
+
k((U) => !U);
|
|
2874
2875
|
}, []);
|
|
2875
|
-
|
|
2876
|
-
window.removeEventListener("scroll",
|
|
2877
|
-
}), [
|
|
2878
|
-
window.removeEventListener("resize",
|
|
2879
|
-
}), [
|
|
2880
|
-
const
|
|
2876
|
+
B(() => (window.addEventListener("scroll", ne), () => {
|
|
2877
|
+
window.removeEventListener("scroll", ne);
|
|
2878
|
+
}), [ne]), B(() => (window.addEventListener("resize", ne), () => {
|
|
2879
|
+
window.removeEventListener("resize", ne);
|
|
2880
|
+
}), [ne]), Er(F), $r([x, w, y], t);
|
|
2881
|
+
const ge = c ?? (l && l.length > 0 ? 250 : 0), fe = (l == null ? void 0 : l.reduce((U, pe) => U + (pe.width ?? 100), 0)) ?? 0, te = `calc(max(${re}px, ${ge}px + ${fe}px))`, we = Q(() => (s && e && !g) ?? !1, [s, e, g]), Ce = Q(() => (s && e) ?? !1, [s, e]);
|
|
2881
2882
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2882
2883
|
/* @__PURE__ */ n.jsx(bs, { show: e, onClick: t }),
|
|
2883
|
-
/* @__PURE__ */ n.jsxs("div", { className:
|
|
2884
|
-
[
|
|
2884
|
+
/* @__PURE__ */ n.jsxs("div", { className: b("luminus-dropdown-picker-actions", Ne.actionButtonsContainer, {
|
|
2885
|
+
[Ne.reverse]: L
|
|
2885
2886
|
}), style: {
|
|
2886
|
-
top: `calc(${
|
|
2887
|
-
left:
|
|
2887
|
+
top: `calc(${N}px + ${R / 2}px - 12px)`,
|
|
2888
|
+
left: L ? we && Ce ? `calc(${O}px - 24px - 8px - 24px - 4px)` : `calc(${O}px - 24px - 8px)` : `calc(${$}px + 8px)`
|
|
2888
2889
|
}, children: [
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
var U,
|
|
2892
|
-
|
|
2893
|
-
}, children: /* @__PURE__ */ n.jsx(
|
|
2890
|
+
we && /* @__PURE__ */ n.jsx("button", { ref: w, type: "button", className: b("luminus-dropdown-picker-clear-button", Ne.actionButton), onClick: () => !g && a(null), children: /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "text-danger", children: /* @__PURE__ */ n.jsx(Cr, { size: 16 }) }) }),
|
|
2891
|
+
Ce && /* @__PURE__ */ n.jsx("button", { ref: y, type: "button", className: b("luminus-dropdown-picker-copy-button", Ne.actionButton), onClick: () => {
|
|
2892
|
+
var U, pe;
|
|
2893
|
+
T(u ? ((U = s == null ? void 0 : s.id) == null ? void 0 : U.toString()) ?? "" : ((pe = s == null ? void 0 : s.name) == null ? void 0 : pe.toString()) ?? ""), t();
|
|
2894
|
+
}, children: /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "text-info", children: /* @__PURE__ */ n.jsx(ma, { size: 16 }) }) })
|
|
2894
2895
|
] }),
|
|
2895
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
2896
|
-
[
|
|
2896
|
+
/* @__PURE__ */ n.jsx("div", { className: b("luminus-dropdown-picker", Ne.wrapper, {
|
|
2897
|
+
[Ne.open]: e
|
|
2897
2898
|
}), style: {
|
|
2898
|
-
top: G ? `calc(${
|
|
2899
|
-
left:
|
|
2900
|
-
right:
|
|
2901
|
-
width:
|
|
2899
|
+
top: G ? `calc(${N}px - 50vh - 8px)` : `calc(${M}px + 8px)`,
|
|
2900
|
+
left: L ? `calc(${$}px - ${te})` : O,
|
|
2901
|
+
right: L ? `${$}px` : `calc(${O}px + ${te})`,
|
|
2902
|
+
width: te,
|
|
2902
2903
|
justifyContent: G ? "flex-end" : "flex-start"
|
|
2903
|
-
}, children: /* @__PURE__ */ n.jsx("div", { ref:
|
|
2904
|
-
d && (
|
|
2905
|
-
var
|
|
2906
|
-
return
|
|
2904
|
+
}, children: /* @__PURE__ */ n.jsx("div", { ref: x, className: b("shadow rounded", Ne.dropdown), children: !g && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2905
|
+
d && (m ?? r.length) <= z ? null : /* @__PURE__ */ n.jsx("div", { className: b("search-input-container border-bottom", Ne.searchInputContainer), children: /* @__PURE__ */ n.jsx(ye.Control, { ref: j, type: "search", size: "sm", className: Ne.searchInput, placeholder: i.searchPlaceholder, value: _, onChange: (U) => {
|
|
2906
|
+
var pe;
|
|
2907
|
+
return C(((pe = U.target) == null ? void 0 : pe.value) ?? "");
|
|
2907
2908
|
} }) }),
|
|
2908
|
-
f ? /* @__PURE__ */ n.jsx("div", { className:
|
|
2909
|
-
l && l.length > 0 && /* @__PURE__ */ n.jsxs("div", { className:
|
|
2910
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
2911
|
-
l == null ? void 0 : l.filter((U) => U.key !== h).map((U) => /* @__PURE__ */ n.jsx("div", { className:
|
|
2909
|
+
f ? /* @__PURE__ */ n.jsx("div", { className: Ne.loadingContainer, children: /* @__PURE__ */ n.jsx(_n, { animation: "border", variant: "primary" }) }) : r.length > 0 && /* @__PURE__ */ n.jsxs("div", { ref: v, className: b("items", Ne.itemsContainer), children: [
|
|
2910
|
+
l && l.length > 0 && /* @__PURE__ */ n.jsxs("div", { className: b("header-row border-bottom", Ne.headerRow), children: [
|
|
2911
|
+
/* @__PURE__ */ n.jsx("div", { className: Ne.name }),
|
|
2912
|
+
l == null ? void 0 : l.filter((U) => U.key !== h).map((U) => /* @__PURE__ */ n.jsx("div", { className: Ne.columnItem, style: {
|
|
2912
2913
|
width: `${U.width ?? 100}px`,
|
|
2913
2914
|
minWidth: `${U.width ?? 100}px`,
|
|
2914
2915
|
maxWidth: `${U.width ?? 100}px`
|
|
2915
|
-
}, children: /* @__PURE__ */ n.jsx(
|
|
2916
|
+
}, children: /* @__PURE__ */ n.jsx(X, { variant: "caption", children: U.name }) }, U.key))
|
|
2916
2917
|
] }),
|
|
2917
|
-
r == null ? void 0 : r.map((U,
|
|
2918
|
-
[
|
|
2918
|
+
r == null ? void 0 : r.map((U, pe) => /* @__PURE__ */ n.jsxs("button", { id: `item-${pe}`, type: "button", className: b("item cursor-pointer", Ne.item, {
|
|
2919
|
+
[Ne.focused]: W === pe
|
|
2919
2920
|
}, {
|
|
2920
|
-
focused: W ===
|
|
2921
|
+
focused: W === pe
|
|
2921
2922
|
}, {
|
|
2922
2923
|
archive: U.additionalColumns ? U.additionalColumns[h] : !1
|
|
2923
|
-
}), onClick: () => !
|
|
2924
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
2925
|
-
l == null ? void 0 : l.filter((
|
|
2926
|
-
width: `${
|
|
2927
|
-
minWidth: `${
|
|
2928
|
-
maxWidth: `${
|
|
2929
|
-
}, children: /* @__PURE__ */ n.jsx(
|
|
2924
|
+
}), onClick: () => !g && a(U), onMouseEnter: () => K(pe), children: [
|
|
2925
|
+
/* @__PURE__ */ n.jsx("div", { className: Ne.name, children: /* @__PURE__ */ n.jsx(X, { variant: "body2", children: u ? U.id : U.name }) }),
|
|
2926
|
+
l == null ? void 0 : l.filter((_e) => _e.key !== h).map((_e) => /* @__PURE__ */ n.jsx("div", { className: Ne.columnItem, style: {
|
|
2927
|
+
width: `${_e.width ?? 100}px`,
|
|
2928
|
+
minWidth: `${_e.width ?? 100}px`,
|
|
2929
|
+
maxWidth: `${_e.width ?? 100}px`
|
|
2930
|
+
}, children: /* @__PURE__ */ n.jsx(X, { variant: "caption", className: b("text-muted"), children: U.additionalColumns && U.additionalColumns[_e.key] }) }, _e.key))
|
|
2930
2931
|
] }, U.id))
|
|
2931
2932
|
] })
|
|
2932
2933
|
] }) }) })
|
|
@@ -2942,19 +2943,19 @@ const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13",
|
|
|
2942
2943
|
header: fl,
|
|
2943
2944
|
item: ml
|
|
2944
2945
|
}, hl = ({ show: e, query: t, onCancel: r, groups: s, isLoading: a, searchTypes: o }) => {
|
|
2945
|
-
const { texts: { appSearch: i } } = Z(
|
|
2946
|
-
var
|
|
2947
|
-
const d = (
|
|
2946
|
+
const { texts: { appSearch: i } } = Z(he), c = J(null), l = S((u) => {
|
|
2947
|
+
var m;
|
|
2948
|
+
const d = (m = o.find((g) => g.key === u.type)) == null ? void 0 : m.toPath;
|
|
2948
2949
|
return d ? `${d}/${u.searchKey}` : "/not-found";
|
|
2949
2950
|
}, [o]);
|
|
2950
|
-
return $r([c], r), /* @__PURE__ */ n.jsx("div", { ref: c, className:
|
|
2951
|
+
return $r([c], r), /* @__PURE__ */ n.jsx("div", { ref: c, className: b("luminus-app-search-dropdown shadow rounded", qe.dropdown, {
|
|
2951
2952
|
[qe.open]: e
|
|
2952
2953
|
}), children: a ? /* @__PURE__ */ n.jsx("div", { className: qe.loadingContainer, children: /* @__PURE__ */ n.jsx(_n, { animation: "border", variant: "primary" }) }) : /* @__PURE__ */ n.jsx("div", { className: qe.groupsContainer, children: s == null ? void 0 : s.map((u) => {
|
|
2953
2954
|
var d;
|
|
2954
|
-
return /* @__PURE__ */ n.jsxs("div", { className:
|
|
2955
|
-
/* @__PURE__ */ n.jsxs(tt, { to: `/search?query=${t}&type=${u.key.category}`, className:
|
|
2956
|
-
/* @__PURE__ */ n.jsx(
|
|
2957
|
-
/* @__PURE__ */ n.jsxs(
|
|
2955
|
+
return /* @__PURE__ */ n.jsxs("div", { className: b(qe.group), children: [
|
|
2956
|
+
/* @__PURE__ */ n.jsxs(tt, { to: `/search?query=${t}&type=${u.key.category}`, className: b("group-header", qe.header), onClick: r, children: [
|
|
2957
|
+
/* @__PURE__ */ n.jsx(X, { variant: "body", className: "text-primary", children: u.key.categoryName }),
|
|
2958
|
+
/* @__PURE__ */ n.jsxs(X, { variant: "caption", children: [
|
|
2958
2959
|
u.items.length,
|
|
2959
2960
|
" ",
|
|
2960
2961
|
i.amountFrom,
|
|
@@ -2962,18 +2963,18 @@ const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13",
|
|
|
2962
2963
|
u.key.totalCount
|
|
2963
2964
|
] })
|
|
2964
2965
|
] }),
|
|
2965
|
-
(d = u.items) == null ? void 0 : d.map((
|
|
2966
|
+
(d = u.items) == null ? void 0 : d.map((m, g) => /* @__PURE__ */ n.jsxs(
|
|
2966
2967
|
tt,
|
|
2967
2968
|
{
|
|
2968
|
-
to: l(
|
|
2969
|
-
className:
|
|
2969
|
+
to: l(m),
|
|
2970
|
+
className: b("search-item d-flex gap-3 align-items-center justify-content-between", qe.item),
|
|
2970
2971
|
onClick: r,
|
|
2971
2972
|
children: [
|
|
2972
|
-
/* @__PURE__ */ n.jsx(
|
|
2973
|
-
/* @__PURE__ */ n.jsx(
|
|
2973
|
+
/* @__PURE__ */ n.jsx(X, { variant: "body2", className: "text-nowrap text-truncate", children: m.name }),
|
|
2974
|
+
/* @__PURE__ */ n.jsx(X, { variant: "caption", className: "text-primary", children: /* @__PURE__ */ n.jsx(ha, {}) })
|
|
2974
2975
|
]
|
|
2975
2976
|
},
|
|
2976
|
-
|
|
2977
|
+
g
|
|
2977
2978
|
))
|
|
2978
2979
|
] }, u.key.category);
|
|
2979
2980
|
}) }) });
|
|
@@ -2988,7 +2989,7 @@ const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13",
|
|
|
2988
2989
|
"submit-button": "_submit-button_1lkfy_20",
|
|
2989
2990
|
submitButton: yl
|
|
2990
2991
|
}, wl = (e, t) => {
|
|
2991
|
-
const r = st(), [s, a] =
|
|
2992
|
+
const r = st(), [s, a] = E(!1), [o, i] = E([]), c = !e || !e.key, l = S(() => {
|
|
2992
2993
|
if (t.length < 3) {
|
|
2993
2994
|
i([]);
|
|
2994
2995
|
return;
|
|
@@ -2999,29 +3000,29 @@ const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13",
|
|
|
2999
3000
|
a(!1);
|
|
3000
3001
|
});
|
|
3001
3002
|
}, [e, t, r, c]);
|
|
3002
|
-
return
|
|
3003
|
+
return B(() => {
|
|
3003
3004
|
l();
|
|
3004
3005
|
}, [l]), { isLoading: s, searchItems: o };
|
|
3005
3006
|
}, Rd = ({ searchTypes: e, navigateFunction: t, currentPath: r, homePath: s = "/" }) => {
|
|
3006
|
-
var
|
|
3007
|
-
const { texts: { appSearch: a } } = Z(
|
|
3008
|
-
|
|
3009
|
-
(f.length > 0 ||
|
|
3010
|
-
}, [f,
|
|
3011
|
-
const
|
|
3012
|
-
return
|
|
3013
|
-
var
|
|
3014
|
-
u(""), r === s && ((
|
|
3015
|
-
}, [r, s]), /* @__PURE__ */ n.jsx(ye, { onSubmit: (
|
|
3016
|
-
|
|
3007
|
+
var w;
|
|
3008
|
+
const { texts: { appSearch: a } } = Z(he), [o, i] = E(e.length > 0 ? ((w = e.at(0)) == null ? void 0 : w.key) ?? null : null), c = Q(() => e.find((y) => y.key === o) ?? null, [e, o]), [l, u] = E(""), [d, m] = js(l, 500), { isLoading: g, searchItems: f } = wl(c, d), [p, h] = E(!1);
|
|
3009
|
+
B(() => {
|
|
3010
|
+
(f.length > 0 || g) && h(!0);
|
|
3011
|
+
}, [f, g]);
|
|
3012
|
+
const x = J(null);
|
|
3013
|
+
return B(() => {
|
|
3014
|
+
var y;
|
|
3015
|
+
u(""), r === s && ((y = x.current) == null || y.focus());
|
|
3016
|
+
}, [r, s]), /* @__PURE__ */ n.jsx(ye, { onSubmit: (y) => {
|
|
3017
|
+
y.preventDefault(), y.stopPropagation(), m.flush(), h(!1), l.length > 2 && t(`/search?query=${l}${c && c.key && `&type=${c == null ? void 0 : c.key}`}`);
|
|
3017
3018
|
}, children: /* @__PURE__ */ n.jsxs(It, { className: Qe.inputGroup, children: [
|
|
3018
|
-
/* @__PURE__ */ n.jsx(It.Text, { className:
|
|
3019
|
-
/* @__PURE__ */ n.jsx(ye.Control, { ref:
|
|
3019
|
+
/* @__PURE__ */ n.jsx(It.Text, { className: b("p-1 rounded", Qe.inputGroupText, Qe.left), children: /* @__PURE__ */ n.jsx(ol, { searchTypes: e, selectedType: c, setSelectedType: i }) }),
|
|
3020
|
+
/* @__PURE__ */ n.jsx(ye.Control, { ref: x, placeholder: a.searchPlaceholder, type: "text", size: "sm", className: b("luminus-app-search-input", Qe.input), value: l, onChange: (y) => {
|
|
3020
3021
|
var j;
|
|
3021
|
-
return u(((j =
|
|
3022
|
+
return u(((j = y.target) == null ? void 0 : j.value) ?? "");
|
|
3022
3023
|
}, onFocus: () => f.length > 0 && h(!0) }),
|
|
3023
|
-
/* @__PURE__ */ n.jsx(It.Text, { className:
|
|
3024
|
-
/* @__PURE__ */ n.jsx(hl, { query: d, searchTypes: e, show:
|
|
3024
|
+
/* @__PURE__ */ n.jsx(It.Text, { className: b("p-0 rounded", Qe.inputGroupText, Qe.right), children: /* @__PURE__ */ n.jsx("button", { type: "submit", className: b("text-primary", Qe.submitButton), children: /* @__PURE__ */ n.jsx(ga, {}) }) }),
|
|
3025
|
+
/* @__PURE__ */ n.jsx(hl, { query: d, searchTypes: e, show: p, onCancel: () => h(!1), groups: f, isLoading: g })
|
|
3025
3026
|
] }) });
|
|
3026
3027
|
}, bl = "_card_19733_1", _l = "_header_19733_6", Nl = "_header-content_19733_13", Sl = "_title_19733_19", Cl = "_collapse-icon_19733_22", kl = "_collapsed_19733_27", Il = "_content_19733_30", Ze = {
|
|
3027
3028
|
card: bl,
|
|
@@ -3034,28 +3035,28 @@ const Ui = "_wrapper_1kgb8_1", Yi = "_open_1kgb8_9", Gi = "_dropdown_1kgb8_13",
|
|
|
3034
3035
|
collapsed: kl,
|
|
3035
3036
|
content: Il
|
|
3036
3037
|
}, Dl = ({ title: e, headerContent: t, children: r, className: s, headerClassName: a, contentClassName: o, dontRenderIfNoChildren: i, ...c }) => {
|
|
3037
|
-
const l = c.collapsible ? c.controlled ? !1 : c.defaultOpen ?? !1 : !0, [u, d] =
|
|
3038
|
-
|
|
3038
|
+
const l = c.collapsible ? c.controlled ? !1 : c.defaultOpen ?? !1 : !0, [u, d] = E(l), m = c.collapsible ? c.controlled ? c.isOpen : u : !0;
|
|
3039
|
+
B(() => {
|
|
3039
3040
|
d(l);
|
|
3040
3041
|
}, [l]);
|
|
3041
|
-
const
|
|
3042
|
-
return i &&
|
|
3042
|
+
const g = Q(() => !r || !r.toString() || r.toString().split(",").filter((f) => f && f !== "false").length === 0, [r]);
|
|
3043
|
+
return i && g ? null : /* @__PURE__ */ n.jsxs("div", { className: b("luminus-card rounded shadow-sm", Ze.card, {
|
|
3043
3044
|
[s ?? ""]: s
|
|
3044
3045
|
}), children: [
|
|
3045
|
-
/* @__PURE__ */ n.jsxs("div", { role: c.collapsible ? "button" : void 0, className:
|
|
3046
|
+
/* @__PURE__ */ n.jsxs("div", { role: c.collapsible ? "button" : void 0, className: b("header", Ze.header, {
|
|
3046
3047
|
[a ?? ""]: a
|
|
3047
3048
|
}), onClick: () => {
|
|
3048
3049
|
c.collapsible && (c.controlled ? c.onToggle(!c.isOpen) : d(!u));
|
|
3049
3050
|
}, children: [
|
|
3050
|
-
/* @__PURE__ */ n.jsxs("div", { className:
|
|
3051
|
-
/* @__PURE__ */ n.jsx(
|
|
3051
|
+
/* @__PURE__ */ n.jsxs("div", { className: b("header-content", Ze.headerContent), children: [
|
|
3052
|
+
/* @__PURE__ */ n.jsx(X, { variant: "h6", className: b("text-primary", Ze.title), children: e }),
|
|
3052
3053
|
t ?? null
|
|
3053
3054
|
] }),
|
|
3054
|
-
c.collapsible && /* @__PURE__ */ n.jsx(kr, { className:
|
|
3055
|
-
[Ze.collapsed]:
|
|
3055
|
+
c.collapsible && /* @__PURE__ */ n.jsx(kr, { className: b(Ze.collapseIcon, {
|
|
3056
|
+
[Ze.collapsed]: m
|
|
3056
3057
|
}) })
|
|
3057
3058
|
] }),
|
|
3058
|
-
/* @__PURE__ */ n.jsx(Tr, { in:
|
|
3059
|
+
/* @__PURE__ */ n.jsx(Tr, { in: m, children: /* @__PURE__ */ n.jsx("div", { className: b("card-content border-top border-primary", Ze.content, {
|
|
3059
3060
|
[o ?? ""]: o
|
|
3060
3061
|
}), children: r }) })
|
|
3061
3062
|
] });
|
|
@@ -3101,7 +3102,7 @@ var ys = function(e) {
|
|
|
3101
3102
|
return $l ? (!this.props.node && !this.defaultNode && (this.defaultNode = document.createElement("div"), document.body.appendChild(this.defaultNode)), Ot.createPortal(this.props.children, this.props.node || this.defaultNode)) : null;
|
|
3102
3103
|
}
|
|
3103
3104
|
}]), t;
|
|
3104
|
-
}(
|
|
3105
|
+
}(ke.Component);
|
|
3105
3106
|
ys.propTypes = {
|
|
3106
3107
|
children: $t.node.isRequired,
|
|
3107
3108
|
node: $t.any
|
|
@@ -3156,7 +3157,7 @@ var ws = function(e) {
|
|
|
3156
3157
|
value: function(s) {
|
|
3157
3158
|
!this.props.node && !this.defaultNode && (this.defaultNode = document.createElement("div"), document.body.appendChild(this.defaultNode));
|
|
3158
3159
|
var a = this.props.children;
|
|
3159
|
-
typeof this.props.children.type == "function" && (a =
|
|
3160
|
+
typeof this.props.children.type == "function" && (a = ke.cloneElement(this.props.children)), this.portal = Ot.unstable_renderSubtreeIntoContainer(this, a, this.props.node || this.defaultNode);
|
|
3160
3161
|
}
|
|
3161
3162
|
}, {
|
|
3162
3163
|
key: "render",
|
|
@@ -3164,14 +3165,14 @@ var ws = function(e) {
|
|
|
3164
3165
|
return null;
|
|
3165
3166
|
}
|
|
3166
3167
|
}]), t;
|
|
3167
|
-
}(
|
|
3168
|
+
}(ke.Component);
|
|
3168
3169
|
ws.propTypes = {
|
|
3169
3170
|
children: $t.node.isRequired,
|
|
3170
3171
|
node: $t.any
|
|
3171
3172
|
};
|
|
3172
3173
|
var dn = void 0;
|
|
3173
3174
|
Ot.createPortal ? dn = ys : dn = ws;
|
|
3174
|
-
const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20", Pl = "_photo-actions_14acg_26", Wl = "_photo-container_14acg_31", Hl = "_photo_14acg_26", Ul = "_nav-button_14acg_41", Yl = "_photos-preview_14acg_49", Gl = "_selected_14acg_62", Kl = "_default-indicator_14acg_66",
|
|
3175
|
+
const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20", Pl = "_photo-actions_14acg_26", Wl = "_photo-container_14acg_31", Hl = "_photo_14acg_26", Ul = "_nav-button_14acg_41", Yl = "_photos-preview_14acg_49", Gl = "_selected_14acg_62", Kl = "_default-indicator_14acg_66", $e = {
|
|
3175
3176
|
lightbox: Bl,
|
|
3176
3177
|
show: Vl,
|
|
3177
3178
|
header: zl,
|
|
@@ -3190,75 +3191,75 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3190
3191
|
}, ql = "_backdrop_3huvf_1", Ql = "_show_3huvf_11", tr = {
|
|
3191
3192
|
backdrop: ql,
|
|
3192
3193
|
show: Ql
|
|
3193
|
-
}, bs = ({ show: e, onClick: t }) => /* @__PURE__ */ n.jsx("div", { className:
|
|
3194
|
+
}, bs = ({ show: e, onClick: t }) => /* @__PURE__ */ n.jsx("div", { className: b("luminus-backdrop", tr.backdrop, {
|
|
3194
3195
|
[tr.show]: e
|
|
3195
|
-
}), onClick: () => t && t() }), _s = ({ src: e, alt: t, baseUrl: r, customToken: s, placeholder: a, ...o }) => /* @__PURE__ */ n.jsx("img", { ...o, alt: t ?? "", src: e ?? a }), Zl = ({ show: e, onClose: t, photos: r, defaultIndex: s, uploadPhotosText: a, noPhotosText: o, onUploadPhotos: i, photoActions: c, baseUrl: l, customToken: u, placeholder: d, ImgComponent:
|
|
3196
|
-
const
|
|
3197
|
-
|
|
3198
|
-
e &&
|
|
3199
|
-
}, [s, e]),
|
|
3200
|
-
f >= r.length &&
|
|
3196
|
+
}), onClick: () => t && t() }), _s = ({ src: e, alt: t, baseUrl: r, customToken: s, placeholder: a, ...o }) => /* @__PURE__ */ n.jsx("img", { ...o, alt: t ?? "", src: e ?? a }), Zl = ({ show: e, onClose: t, photos: r, defaultIndex: s, uploadPhotosText: a, noPhotosText: o, onUploadPhotos: i, photoActions: c, baseUrl: l, customToken: u, placeholder: d, ImgComponent: m = _s }) => {
|
|
3197
|
+
const g = J(null), [f, p] = E(s), h = r.at(f), x = f > 0, w = f < r.length - 1;
|
|
3198
|
+
B(() => {
|
|
3199
|
+
e && p(s);
|
|
3200
|
+
}, [s, e]), B(() => {
|
|
3201
|
+
f >= r.length && p(r.length - 1);
|
|
3201
3202
|
}, [r, f]);
|
|
3202
|
-
const
|
|
3203
|
+
const y = S((j) => {
|
|
3203
3204
|
switch (j.key) {
|
|
3204
3205
|
case "ArrowLeft":
|
|
3205
|
-
j.stopPropagation(),
|
|
3206
|
+
j.stopPropagation(), x && p((v) => v - 1);
|
|
3206
3207
|
break;
|
|
3207
3208
|
case "ArrowRight":
|
|
3208
|
-
j.stopPropagation(),
|
|
3209
|
+
j.stopPropagation(), w && p((v) => v + 1);
|
|
3209
3210
|
break;
|
|
3210
3211
|
case "Escape":
|
|
3211
3212
|
j.stopPropagation(), t();
|
|
3212
3213
|
break;
|
|
3213
3214
|
}
|
|
3214
|
-
}, [
|
|
3215
|
-
return Er(
|
|
3215
|
+
}, [w, x, t]);
|
|
3216
|
+
return Er(y), /* @__PURE__ */ n.jsxs(dn, { children: [
|
|
3216
3217
|
/* @__PURE__ */ n.jsx(bs, { show: e, onClick: t }),
|
|
3217
|
-
/* @__PURE__ */ n.jsx("div", { ref:
|
|
3218
|
-
[
|
|
3218
|
+
/* @__PURE__ */ n.jsx("div", { ref: g, className: b("luminus-lightbox rounded shadow", $e.lightbox, {
|
|
3219
|
+
[$e.show]: e
|
|
3219
3220
|
}), children: e && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3220
|
-
/* @__PURE__ */ n.jsxs("div", { className:
|
|
3221
|
-
/* @__PURE__ */ n.jsxs("div", { className:
|
|
3221
|
+
/* @__PURE__ */ n.jsxs("div", { className: $e.header, children: [
|
|
3222
|
+
/* @__PURE__ */ n.jsxs("div", { className: b("rounded", $e.photoActions), children: [
|
|
3222
3223
|
i && /* @__PURE__ */ n.jsx(cs, { accept: ".jpg,.jpeg,.png", onUpload: (j) => {
|
|
3223
3224
|
j.length > 0 && i(Array.from(j));
|
|
3224
3225
|
}, icon: /* @__PURE__ */ n.jsx(Ir, { style: { fontSize: 18 } }), multiple: !0, className: "me-3", children: a ?? null }),
|
|
3225
|
-
h && (c == null ? void 0 : c.map(({ label: j, onClick:
|
|
3226
|
+
h && (c == null ? void 0 : c.map(({ label: j, onClick: v, ..._ }, C) => /* @__PURE__ */ n.jsx(
|
|
3226
3227
|
Ae,
|
|
3227
3228
|
{
|
|
3228
|
-
onClick: () =>
|
|
3229
|
-
...
|
|
3229
|
+
onClick: () => v(h.id),
|
|
3230
|
+
..._,
|
|
3230
3231
|
children: j
|
|
3231
3232
|
},
|
|
3232
|
-
`action-${
|
|
3233
|
+
`action-${C}`
|
|
3233
3234
|
)))
|
|
3234
3235
|
] }),
|
|
3235
3236
|
/* @__PURE__ */ n.jsx("div", { role: "button", onClick: t, children: /* @__PURE__ */ n.jsx(Me, { style: { fontSize: "32px" } }) })
|
|
3236
3237
|
] }),
|
|
3237
|
-
r.length === 0 && /* @__PURE__ */ n.jsx("div", { className: "w-100 h-100 d-flex align-items-center justify-content-center", children: /* @__PURE__ */ n.jsx(
|
|
3238
|
-
h && /* @__PURE__ */ n.jsxs("div", { className:
|
|
3239
|
-
/* @__PURE__ */ n.jsx("div", { role:
|
|
3240
|
-
/* @__PURE__ */ n.jsx(
|
|
3241
|
-
/* @__PURE__ */ n.jsx("div", { role:
|
|
3238
|
+
r.length === 0 && /* @__PURE__ */ n.jsx("div", { className: "w-100 h-100 d-flex align-items-center justify-content-center", children: /* @__PURE__ */ n.jsx(X, { variant: "body", children: o ?? "No photos available" }) }),
|
|
3239
|
+
h && /* @__PURE__ */ n.jsxs("div", { className: $e.photoContainer, children: [
|
|
3240
|
+
/* @__PURE__ */ n.jsx("div", { role: x ? "button" : void 0, className: b("align-items-start", $e.navButton), onClick: () => x && p((j) => j - 1), children: x && /* @__PURE__ */ n.jsx(hn, { style: { fontSize: "40px" } }) }),
|
|
3241
|
+
/* @__PURE__ */ n.jsx(m, { src: h.lgSrc, alt: h.alt, className: b("rounded", $e.photo), baseUrl: l, customToken: u, placeholder: d }),
|
|
3242
|
+
/* @__PURE__ */ n.jsx("div", { role: w ? "button" : void 0, className: b("align-items-end", $e.navButton), onClick: () => w && p((j) => j + 1), children: w && /* @__PURE__ */ n.jsx(gn, { style: { fontSize: "40px" } }) })
|
|
3242
3243
|
] }),
|
|
3243
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
3244
|
-
/* @__PURE__ */ n.jsx(
|
|
3245
|
-
[
|
|
3244
|
+
/* @__PURE__ */ n.jsx("div", { className: $e.photosPreview, children: r.map((j, v) => /* @__PURE__ */ n.jsxs("div", { role: "button", onClick: () => p(v), className: "position-relative", children: [
|
|
3245
|
+
/* @__PURE__ */ n.jsx(m, { role: v !== f ? "button" : void 0, src: j.smSrc, alt: j.alt, className: b("rounded", $e.photo, {
|
|
3246
|
+
[$e.selected]: v === f
|
|
3246
3247
|
}), baseUrl: l, customToken: u, placeholder: d }, j.id),
|
|
3247
|
-
j.isDefault && /* @__PURE__ */ n.jsx("div", { className:
|
|
3248
|
+
j.isDefault && /* @__PURE__ */ n.jsx("div", { className: b("text-primary", $e.defaultIndicator), children: /* @__PURE__ */ n.jsx(pa, {}) })
|
|
3248
3249
|
] })) })
|
|
3249
3250
|
] }) })
|
|
3250
3251
|
] });
|
|
3251
3252
|
}, Jl = ({ photos: e, onUploadPhotos: t, uploadPhotosText: r, noPhotosText: s, photoActions: a, baseUrl: o, customToken: i, placeholder: c, ImgComponent: l = _s, noLightboxOnlyButtonOnEmpty: u = !1, hideLightbox: d = !1 }) => {
|
|
3252
|
-
const [
|
|
3253
|
-
return
|
|
3253
|
+
const [m, g] = E(null), f = m !== null ? e[m] : null, [p, h] = E(!1);
|
|
3254
|
+
return B(() => {
|
|
3254
3255
|
if (e.length === 0) {
|
|
3255
|
-
|
|
3256
|
+
g(null);
|
|
3256
3257
|
return;
|
|
3257
3258
|
}
|
|
3258
|
-
const
|
|
3259
|
-
x
|
|
3260
|
-
}, [e]), !f && t && u ? /* @__PURE__ */ n.jsx(cs, { accept: ".jpg,.jpeg,.png", onUpload: (
|
|
3261
|
-
|
|
3259
|
+
const x = e.findIndex((w) => w.isDefault);
|
|
3260
|
+
g(x > -1 ? x : 0);
|
|
3261
|
+
}, [e]), !f && t && u ? /* @__PURE__ */ n.jsx(cs, { accept: ".jpg,.jpeg,.png", onUpload: (x) => {
|
|
3262
|
+
x.length > 0 && t(Array.from(x));
|
|
3262
3263
|
}, icon: /* @__PURE__ */ n.jsx(Ir, { style: { fontSize: 18 } }), multiple: !0, children: r ?? null }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3263
3264
|
f ? /* @__PURE__ */ n.jsxs("div", { role: "button", className: "w-100 position-relative", onClick: () => h(!0), children: [
|
|
3264
3265
|
/* @__PURE__ */ n.jsx(l, { src: f.smSrc, alt: f.alt, className: "rounded w-100", baseUrl: o, customToken: i, placeholder: c }),
|
|
@@ -3269,8 +3270,8 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3269
3270
|
textShadow: "-2px 2px 4px #696969",
|
|
3270
3271
|
background: "rgba(105,105,105,0.5)"
|
|
3271
3272
|
}, children: /* @__PURE__ */ n.jsx(xa, { fontSize: 24 }) })
|
|
3272
|
-
] }) : /* @__PURE__ */ n.jsx(Bt, { text: r ?? "", placement: "left", children: /* @__PURE__ */ n.jsx("div", { role: "button", className:
|
|
3273
|
-
/* @__PURE__ */ n.jsx(Zl, { show:
|
|
3273
|
+
] }) : /* @__PURE__ */ n.jsx(Bt, { text: r ?? "", placement: "left", children: /* @__PURE__ */ n.jsx("div", { role: "button", className: b("rounded p-3 d-flex justify-content-center"), onClick: () => h(!0), children: /* @__PURE__ */ n.jsx("img", { src: c, alt: "placeholder", className: "rounded w-25" }) }) }),
|
|
3274
|
+
/* @__PURE__ */ n.jsx(Zl, { show: p && !d, onClose: () => h(!1), photos: e, defaultIndex: m ?? 0, uploadPhotosText: r, noPhotosText: s, onUploadPhotos: t, photoActions: a, baseUrl: o, customToken: i, placeholder: c, ImgComponent: l })
|
|
3274
3275
|
] });
|
|
3275
3276
|
}, Ld = ({ children: e }) => {
|
|
3276
3277
|
var c, l, u;
|
|
@@ -3278,7 +3279,7 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3278
3279
|
return t ? /* @__PURE__ */ n.jsx(Fa, { interactionType: Oa.Redirect, authenticationRequest: { scopes: r }, children: o || !s() ? /* @__PURE__ */ n.jsx(Fn, {}) : a.user ? i ? /* @__PURE__ */ n.jsx(n.Fragment, { children: e }) : /* @__PURE__ */ n.jsx(St, { to: "/user-not-permitted", replace: !0 }) : /* @__PURE__ */ n.jsx(St, { to: "/no-user-login", replace: !0 }) }) : o ? /* @__PURE__ */ n.jsx(Fn, {}) : !s() || !a.user ? /* @__PURE__ */ n.jsx(St, { to: "/login", replace: !0 }) : i ? e : /* @__PURE__ */ n.jsx(St, { to: "/user-not-permitted", replace: !0 });
|
|
3279
3280
|
}, kn = (e) => {
|
|
3280
3281
|
const { variant: t, children: r, className: s, size: a = "md", typographyVariant: o = a === "sm" ? "body2" : "body", ...i } = { ...e };
|
|
3281
|
-
return /* @__PURE__ */ n.jsx(Ja, { variant: t, className: `text-center ${a === "sm" ? "p-1" : a === "md" ? "p-3" : "p-4"} bg-${t} bg-opacity-10 border-none ${s ?? ""}`, ...i, children: /* @__PURE__ */ n.jsx(
|
|
3282
|
+
return /* @__PURE__ */ n.jsx(Ja, { variant: t, className: `text-center ${a === "sm" ? "p-1" : a === "md" ? "p-3" : "p-4"} bg-${t} bg-opacity-10 border-none ${s ?? ""}`, ...i, children: /* @__PURE__ */ n.jsx(X, { variant: o, children: r }) });
|
|
3282
3283
|
}, Xl = "_item_z9z4m_1", ec = "_level-success_z9z4m_4", tc = "_level-info_z9z4m_10", nc = "_level-warning_z9z4m_16", rc = "_level-danger_z9z4m_22", sc = "_type-icon_z9z4m_28", tn = {
|
|
3283
3284
|
item: Xl,
|
|
3284
3285
|
"level-success": "_level-success_z9z4m_4",
|
|
@@ -3292,7 +3293,7 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3292
3293
|
"type-icon": "_type-icon_z9z4m_28",
|
|
3293
3294
|
typeIcon: sc
|
|
3294
3295
|
}, ac = ({ level: e, children: t, customIcon: r, noIcon: s }) => {
|
|
3295
|
-
const { ProjectIconComponent: a } = Z(
|
|
3296
|
+
const { ProjectIconComponent: a } = Z(he), o = S(() => {
|
|
3296
3297
|
switch (e) {
|
|
3297
3298
|
case "info":
|
|
3298
3299
|
return /* @__PURE__ */ n.jsx(a, { icon: "info" });
|
|
@@ -3304,9 +3305,9 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3304
3305
|
return /* @__PURE__ */ n.jsx(a, { icon: "check" });
|
|
3305
3306
|
}
|
|
3306
3307
|
}, [a, e]);
|
|
3307
|
-
return /* @__PURE__ */ n.jsxs("div", { className:
|
|
3308
|
-
!s && /* @__PURE__ */ n.jsx("div", { className:
|
|
3309
|
-
/* @__PURE__ */ n.jsx(
|
|
3308
|
+
return /* @__PURE__ */ n.jsxs("div", { className: b("p-2 rounded d-flex gap-1 align-items-center justify-content-between", { "ps-1": !s }, tn.item, tn[`level-${e}`]), children: [
|
|
3309
|
+
!s && /* @__PURE__ */ n.jsx("div", { className: b(tn.typeIcon), children: r ?? o() }),
|
|
3310
|
+
/* @__PURE__ */ n.jsx(X, { variant: "body2", className: "w-100", children: t })
|
|
3310
3311
|
] });
|
|
3311
3312
|
}, Ad = ({ version: e }) => /* @__PURE__ */ n.jsx("div", { className: "rounded", style: {
|
|
3312
3313
|
position: "fixed",
|
|
@@ -3316,7 +3317,7 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3316
3317
|
backgroundColor: "rgba(255, 255, 255, 0.5)",
|
|
3317
3318
|
padding: "4px",
|
|
3318
3319
|
pointerEvents: "all"
|
|
3319
|
-
}, children: /* @__PURE__ */ n.jsxs(
|
|
3320
|
+
}, children: /* @__PURE__ */ n.jsxs(X, { variant: "caption", className: "w-100 text-end", children: [
|
|
3320
3321
|
"verze ",
|
|
3321
3322
|
e
|
|
3322
3323
|
] }) }), oc = "_submit-container_a9slg_1", ic = "_spacer_a9slg_14", nr = {
|
|
@@ -3325,7 +3326,7 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3325
3326
|
spacer: ic
|
|
3326
3327
|
}, lc = ({ children: e, noSpacer: t = !1 }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3327
3328
|
!t && /* @__PURE__ */ n.jsx("div", { className: nr.spacer }),
|
|
3328
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
3329
|
+
/* @__PURE__ */ n.jsx("div", { className: b("luminus-floating-action-container shadow", nr.submitContainer), children: e })
|
|
3329
3330
|
] }), cc = "_timeline_g1754_1", dc = "_step-container_g1754_1", uc = "_step-date_g1754_1", fc = "_step-content_g1754_4", mc = "_content-header_g1754_8", hc = "_content-text_g1754_11", gc = "_step-icon_g1754_14", Je = {
|
|
3330
3331
|
timeline: cc,
|
|
3331
3332
|
"step-container": "_step-container_g1754_1",
|
|
@@ -3340,39 +3341,39 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3340
3341
|
contentText: hc,
|
|
3341
3342
|
"step-icon": "_step-icon_g1754_14",
|
|
3342
3343
|
stepIcon: gc
|
|
3343
|
-
}, Md = ({ steps: e }) => /* @__PURE__ */ n.jsx("div", { className: Je.timeline, children: e.sort((t, r) => Ha(t.date ?? /* @__PURE__ */ new Date(), r.date ?? /* @__PURE__ */ new Date())).map((t, r) => /* @__PURE__ */ n.jsxs("div", { className:
|
|
3344
|
-
/* @__PURE__ */ n.jsx("div", { className: "col-3", children: t.date && /* @__PURE__ */ n.jsxs(
|
|
3344
|
+
}, Md = ({ steps: e }) => /* @__PURE__ */ n.jsx("div", { className: Je.timeline, children: e.sort((t, r) => Ha(t.date ?? /* @__PURE__ */ new Date(), r.date ?? /* @__PURE__ */ new Date())).map((t, r) => /* @__PURE__ */ n.jsxs("div", { className: b("row g-0 gx-3", Je.stepContainer), children: [
|
|
3345
|
+
/* @__PURE__ */ n.jsx("div", { className: "col-3", children: t.date && /* @__PURE__ */ n.jsxs(X, { variant: "caption", className: b("h-100 d-flex flex-column align-items-end justify-content-center gap-0", Je.stepDate), children: [
|
|
3345
3346
|
/* @__PURE__ */ n.jsx("div", { children: jt(t.date, "dd.MM.yyyy") }),
|
|
3346
3347
|
/* @__PURE__ */ n.jsx("div", { children: jt(t.date, "HH:mm") })
|
|
3347
3348
|
] }) }),
|
|
3348
|
-
/* @__PURE__ */ n.jsx("div", { className: "col-9", children: /* @__PURE__ */ n.jsxs("div", { className:
|
|
3349
|
-
/* @__PURE__ */ n.jsxs("div", { className:
|
|
3349
|
+
/* @__PURE__ */ n.jsx("div", { className: "col-9", children: /* @__PURE__ */ n.jsxs("div", { className: b("h-100 d-flex flex-column gap-1 border-start border-2 p-3", Je.stepContent), children: [
|
|
3350
|
+
/* @__PURE__ */ n.jsxs("div", { className: b("d-flex gap-2 align-items-center", Je.contentHeader), children: [
|
|
3350
3351
|
t.person && /* @__PURE__ */ n.jsx(Sr, { name: t.person.name ?? "", size: 22, fontSize: 12 }),
|
|
3351
|
-
typeof t.title == "string" ? /* @__PURE__ */ n.jsx(
|
|
3352
|
+
typeof t.title == "string" ? /* @__PURE__ */ n.jsx(X, { variant: "body", className: "fw-bold", children: t.title }) : t.title
|
|
3352
3353
|
] }),
|
|
3353
|
-
t.text && /* @__PURE__ */ n.jsx(
|
|
3354
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
3354
|
+
t.text && /* @__PURE__ */ n.jsx(X, { variant: "body2", className: Je.contentText, children: t.text }),
|
|
3355
|
+
/* @__PURE__ */ n.jsx("div", { className: b("text-primary", Je.stepIcon), children: t.icon ?? /* @__PURE__ */ n.jsx(wa, {}) })
|
|
3355
3356
|
] }) })
|
|
3356
3357
|
] }, r)) }), pc = (e, t, r, s = !0) => {
|
|
3357
|
-
const a = st({ silent: s, differentBaseUrl: t, customToken: r }), [o, i] =
|
|
3358
|
+
const a = st({ silent: s, differentBaseUrl: t, customToken: r }), [o, i] = E(!1), [c, l] = E(null), u = S(async (d) => {
|
|
3358
3359
|
i(!0), l(null), a.get(e, {
|
|
3359
3360
|
signal: d,
|
|
3360
3361
|
responseType: "blob"
|
|
3361
|
-
}).then((
|
|
3362
|
-
i(!1), l(
|
|
3362
|
+
}).then((m) => {
|
|
3363
|
+
i(!1), l(m.data);
|
|
3363
3364
|
}).catch(() => {
|
|
3364
3365
|
i(!1), l(null);
|
|
3365
3366
|
});
|
|
3366
3367
|
}, [a, e]);
|
|
3367
|
-
return
|
|
3368
|
+
return B(() => {
|
|
3368
3369
|
const d = new AbortController();
|
|
3369
3370
|
return u(d.signal), () => {
|
|
3370
3371
|
d.abort();
|
|
3371
3372
|
};
|
|
3372
3373
|
}, [u]), { data: c, setData: l, reloadData: u, isLoading: o };
|
|
3373
3374
|
}, rr = ({ src: e, alt: t, baseUrl: r, customToken: s, placeholder: a, ...o }) => {
|
|
3374
|
-
const { data: i } = pc(e, r, s), [c, l] =
|
|
3375
|
-
return
|
|
3375
|
+
const { data: i } = pc(e, r, s), [c, l] = E(null);
|
|
3376
|
+
return B(() => {
|
|
3376
3377
|
let u = null;
|
|
3377
3378
|
return i !== null ? (u = URL.createObjectURL(i), l(u)) : l(null), () => {
|
|
3378
3379
|
u !== null && URL.revokeObjectURL(u);
|
|
@@ -3467,28 +3468,28 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3467
3468
|
}, [r, t]);
|
|
3468
3469
|
return { setFromToProp: s, handleArrowClick: a, handleRangeChange: o };
|
|
3469
3470
|
}, Bd = ({ fromtoState: [e, t], className: r, size: s }) => {
|
|
3470
|
-
const { texts: { date: a }, ProjectIconComponent: o } = Z(
|
|
3471
|
-
return
|
|
3472
|
-
if (
|
|
3471
|
+
const { texts: { date: a }, ProjectIconComponent: o } = Z(he), [i, c] = E("C"), { handleArrowClick: l, handleRangeChange: u, setFromToProp: d } = bc(i, c, t), m = Q(() => i === "C", [i]), g = J(!0);
|
|
3472
|
+
return B(() => {
|
|
3473
|
+
if (g.current) {
|
|
3473
3474
|
const f = wc(e.from, e.to);
|
|
3474
|
-
c(f),
|
|
3475
|
+
c(f), g.current = !1;
|
|
3475
3476
|
}
|
|
3476
|
-
}, [e.from, e.to]), /* @__PURE__ */ n.jsxs("div", { className:
|
|
3477
|
-
/* @__PURE__ */ n.jsx(
|
|
3477
|
+
}, [e.from, e.to]), /* @__PURE__ */ n.jsxs("div", { className: b("d-inline-flex align-items-center gap-1", ar.wrapper, ar[s ?? "md"], r), children: [
|
|
3478
|
+
/* @__PURE__ */ n.jsx(se, { disabled: m, onClick: () => {
|
|
3478
3479
|
l(-1);
|
|
3479
3480
|
}, children: /* @__PURE__ */ n.jsx(o, { icon: "chevron-left" }) }),
|
|
3480
3481
|
/* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
3481
3482
|
/* @__PURE__ */ n.jsx(it, { type: "date", value: e.from, onChange: (f) => d("from", f === null ? null : f.toString()), InputContainer: Te, size: s }),
|
|
3482
|
-
/* @__PURE__ */ n.jsx(pn, { toggle: /* @__PURE__ */ n.jsx(xn, { text: a[sr.find((f) => f[0] === i)[1]].substring(0, 1), as: Na }), children: sr.map((f) => /* @__PURE__ */ n.jsx(et, { disabled: f[0] === i, className:
|
|
3483
|
+
/* @__PURE__ */ n.jsx(pn, { toggle: /* @__PURE__ */ n.jsx(xn, { text: a[sr.find((f) => f[0] === i)[1]].substring(0, 1), as: Na }), children: sr.map((f) => /* @__PURE__ */ n.jsx(et, { disabled: f[0] === i, className: b(f[0] === i ? "text-black-50" : ""), onClick: () => u(f[0]), role: "button", children: a[f[1]] }, f[0])) }),
|
|
3483
3484
|
/* @__PURE__ */ n.jsx(it, { type: "date", value: e.to, onChange: (f) => d("to", f === null ? null : f.toString()), InputContainer: Te, size: s })
|
|
3484
3485
|
] }) }),
|
|
3485
|
-
/* @__PURE__ */ n.jsx(
|
|
3486
|
+
/* @__PURE__ */ n.jsx(se, { disabled: m, onClick: () => {
|
|
3486
3487
|
l(1);
|
|
3487
3488
|
}, children: /* @__PURE__ */ n.jsx(o, { icon: "chevron-right" }) })
|
|
3488
3489
|
] });
|
|
3489
3490
|
}, Vd = ({ defaultMonth: e, searchKey: t = "monthFrom", yearMin: r, yearMax: s }) => {
|
|
3490
|
-
const { localizationContext: a } = Z(
|
|
3491
|
-
c(t, on(
|
|
3491
|
+
const { localizationContext: a } = Z(he), { dateFnsLocale: o } = Z(a), { searchParams: i, setSearch: c } = Aa(), l = i.get(t), u = l ? yt(l) : e, d = S((m) => {
|
|
3492
|
+
c(t, on(m, { representation: "date" }));
|
|
3492
3493
|
}, [t, c]);
|
|
3493
3494
|
return /* @__PURE__ */ n.jsx(jo, { month: u, onChangeMonth: d, locale: o, yearMin: r, yearMax: s });
|
|
3494
3495
|
}, zd = ({ defaultYear: e, searchKey: t = "yearFrom", optionMin: r, optionMax: s, className: a }) => {
|
|
@@ -3497,7 +3498,7 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3497
3498
|
}, [i]);
|
|
3498
3499
|
return /* @__PURE__ */ n.jsx(bo, { year: c, onChangeYear: l, optionMin: r, optionMax: s, className: a });
|
|
3499
3500
|
}, Pd = ({ data: e, showLegend: t = !1, legendPosition: r = "left", onClick: s }) => {
|
|
3500
|
-
const { chartColorPalette: a } = Z(
|
|
3501
|
+
const { chartColorPalette: a } = Z(he);
|
|
3501
3502
|
return /* @__PURE__ */ n.jsx(Sa, { data: e, margin: {
|
|
3502
3503
|
top: 50,
|
|
3503
3504
|
right: t && r === "right" ? 200 : 100,
|
|
@@ -3530,11 +3531,11 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3530
3531
|
return s.toLowerCase() === "others" ? "Obecné" : ((o = (a = t.columns) == null ? void 0 : a.find((i) => i.field === s)) == null ? void 0 : o.caption) ?? s;
|
|
3531
3532
|
};
|
|
3532
3533
|
return /* @__PURE__ */ n.jsx("div", { className: "alert alert-danger w-100 m-0 p-2", children: /* @__PURE__ */ n.jsx("table", { children: /* @__PURE__ */ n.jsx("tbody", { children: e.map((s) => /* @__PURE__ */ n.jsxs("tr", { children: [
|
|
3533
|
-
/* @__PURE__ */ n.jsx("td", { className: "fw-bold pe-2", children: /* @__PURE__ */ n.jsxs(
|
|
3534
|
+
/* @__PURE__ */ n.jsx("td", { className: "fw-bold pe-2", children: /* @__PURE__ */ n.jsxs(X, { variant: "body", children: [
|
|
3534
3535
|
r(s.name),
|
|
3535
3536
|
":"
|
|
3536
3537
|
] }) }),
|
|
3537
|
-
/* @__PURE__ */ n.jsx("td", { className: "", children: /* @__PURE__ */ n.jsx(
|
|
3538
|
+
/* @__PURE__ */ n.jsx("td", { className: "", children: /* @__PURE__ */ n.jsx(X, { variant: "body", children: s.errors }) })
|
|
3538
3539
|
] }, s.name)) }) }) });
|
|
3539
3540
|
}, Ns = (e) => {
|
|
3540
3541
|
const t = {};
|
|
@@ -3586,93 +3587,93 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3586
3587
|
stickyBottom: Rc
|
|
3587
3588
|
}, Lc = "_input_pxkkh_1", Le = {
|
|
3588
3589
|
input: Lc
|
|
3589
|
-
}, Ss = ({ type: e, value: t, field: r, isPrimary: s, isReadonly: a, primaryEditable: o = !1, valuesForSelect: i, addValueToValuesForSelect: c, onChangeHandler: l, hideClearIcon: u, clearValue: d, customPickers:
|
|
3590
|
-
var
|
|
3590
|
+
}, Ss = ({ type: e, value: t, field: r, isPrimary: s, isReadonly: a, primaryEditable: o = !1, valuesForSelect: i, addValueToValuesForSelect: c, onChangeHandler: l, hideClearIcon: u, clearValue: d, customPickers: m }) => {
|
|
3591
|
+
var g;
|
|
3591
3592
|
switch (e) {
|
|
3592
3593
|
case "NUM":
|
|
3593
3594
|
return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Ft, { withoutLabel: !0, InputContainer: Te, className: Le.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => l(r, f === null ? null : Number(f)), options: i, disabled: a || o ? !1 : s, showClearIcon: !u, clearValue: d, dropdownWidth: 200 }) : /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer: Te, className: Le.input, size: "sm", type: "number", value: t === null ? null : Number(t), onChange: (f) => l(r, f === null ? null : Number(f)), disabled: a || o ? !1 : s, showClearIcon: !u, clearValue: d });
|
|
3594
3595
|
case "STR":
|
|
3595
|
-
return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Ft, { withoutLabel: !0, InputContainer: Te, className: Le.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => l(r, (f == null ? void 0 : f.toString()) ?? null), options: i, disabled: a || o ? !1 : s, showClearIcon: !u, clearValue: d, dropdownWidth: 200 }) : /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer: Te, className:
|
|
3596
|
+
return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Ft, { withoutLabel: !0, InputContainer: Te, className: Le.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => l(r, (f == null ? void 0 : f.toString()) ?? null), options: i, disabled: a || o ? !1 : s, showClearIcon: !u, clearValue: d, dropdownWidth: 200 }) : /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer: Te, className: b(Le.input, Le.longer), size: "sm", type: "text", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => l(r, (f == null ? void 0 : f.toString()) ?? null), disabled: a || o ? !1 : s, showClearIcon: !u, clearValue: d });
|
|
3596
3597
|
case "BIT":
|
|
3597
3598
|
return /* @__PURE__ */ n.jsx(us, { InputContainer: Te, className: Le.input, value: t === !0, onChange: (f) => l(r, f), disabled: a || o ? !1 : s });
|
|
3598
3599
|
case "DT":
|
|
3599
3600
|
return /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer: Te, className: Le.input, size: "sm", type: "date", value: t ? t.toString().split("T")[0] ?? "" : "", onChange: (f) => l(r, (f == null ? void 0 : f.toString()) ?? null), disabled: a || o ? !1 : s, showClearIcon: !u, clearValue: d });
|
|
3600
3601
|
default: {
|
|
3601
|
-
const f =
|
|
3602
|
-
return f ? /* @__PURE__ */ n.jsx(f.picker, { className:
|
|
3602
|
+
const f = m == null ? void 0 : m.find((p) => p.type === e);
|
|
3603
|
+
return f ? /* @__PURE__ */ n.jsx(f.picker, { className: b(Le.input, Le.longer), value: t ? {
|
|
3603
3604
|
id: (t == null ? void 0 : t.toString()) ?? null,
|
|
3604
|
-
name: ((
|
|
3605
|
+
name: ((g = i == null ? void 0 : i.find((p) => {
|
|
3605
3606
|
var h;
|
|
3606
|
-
return ((h =
|
|
3607
|
-
})) == null ? void 0 :
|
|
3608
|
-
} : null, onChange: (
|
|
3607
|
+
return ((h = p.id) == null ? void 0 : h.toString()) === (t == null ? void 0 : t.toString());
|
|
3608
|
+
})) == null ? void 0 : g.name) ?? ""
|
|
3609
|
+
} : null, onChange: (p) => {
|
|
3609
3610
|
var h;
|
|
3610
|
-
l(r, (
|
|
3611
|
-
var
|
|
3612
|
-
return ((
|
|
3613
|
-
}), c),
|
|
3614
|
-
var
|
|
3615
|
-
return ((
|
|
3616
|
-
})) && c && (console.log("adding to values for select"), c({ id: ((h =
|
|
3617
|
-
}, disabled: a || o ? !1 : s }) : /* @__PURE__ */ n.jsx("div", { className: "alert alert-warning p-1 m-0", children: /* @__PURE__ */ n.jsxs(
|
|
3611
|
+
l(r, (p == null ? void 0 : p.id) ?? null), console.log(p, i == null ? void 0 : i.some((x) => {
|
|
3612
|
+
var w, y;
|
|
3613
|
+
return ((w = x.id) == null ? void 0 : w.toString()) === ((y = p == null ? void 0 : p.id) == null ? void 0 : y.toString());
|
|
3614
|
+
}), c), p && !(i != null && i.some((x) => {
|
|
3615
|
+
var w, y;
|
|
3616
|
+
return ((w = x.id) == null ? void 0 : w.toString()) === ((y = p == null ? void 0 : p.id) == null ? void 0 : y.toString());
|
|
3617
|
+
})) && c && (console.log("adding to values for select"), c({ id: ((h = p.id) == null ? void 0 : h.toString()) ?? "", name: p.name }));
|
|
3618
|
+
}, disabled: a || o ? !1 : s }) : /* @__PURE__ */ n.jsx("div", { className: "alert alert-warning p-1 m-0", children: /* @__PURE__ */ n.jsxs(X, { variant: "body", children: [
|
|
3618
3619
|
"Neznámý typ ",
|
|
3619
3620
|
e
|
|
3620
3621
|
] }) });
|
|
3621
3622
|
}
|
|
3622
3623
|
}
|
|
3623
3624
|
}, Ac = ({ schema: e, columns: t, setColumns: r, initialItem: s, onEdit: a, onDelete: o, customPickers: i }) => {
|
|
3624
|
-
const { ProjectIconComponent: c } = Z(
|
|
3625
|
-
console.log("changeValue", f,
|
|
3625
|
+
const { ProjectIconComponent: c } = Z(he), [l, u] = E(s), d = S((f, p) => {
|
|
3626
|
+
console.log("changeValue", f, p), u((h) => ({
|
|
3626
3627
|
...h,
|
|
3627
3628
|
[f]: {
|
|
3628
3629
|
...h[f],
|
|
3629
|
-
value:
|
|
3630
|
+
value: p
|
|
3630
3631
|
}
|
|
3631
3632
|
}));
|
|
3632
|
-
}, []),
|
|
3633
|
-
return
|
|
3633
|
+
}, []), m = (f) => (f == null ? void 0 : f.value) !== (f == null ? void 0 : f.defaultValue), g = S(() => Object.keys(l).some((f) => m(l[f])), [l]);
|
|
3634
|
+
return B(() => {
|
|
3634
3635
|
u(s);
|
|
3635
|
-
}, [s]), /* @__PURE__ */ n.jsxs("tr", { className:
|
|
3636
|
-
/* @__PURE__ */ n.jsx("td", { className:
|
|
3636
|
+
}, [s]), /* @__PURE__ */ n.jsxs("tr", { className: b("table-row", ue.tableRow), children: [
|
|
3637
|
+
/* @__PURE__ */ n.jsx("td", { className: b("table-cell", ue.tableCell, ue.stickyFirst), children: g() && /* @__PURE__ */ n.jsx(se, { color: "success", onClick: () => a(Ns(l)), children: /* @__PURE__ */ n.jsx(c, { icon: "check" }) }) }),
|
|
3637
3638
|
t.map((f) => {
|
|
3638
|
-
var
|
|
3639
|
-
return /* @__PURE__ */ n.jsx("td", { className:
|
|
3640
|
-
r(t.map((
|
|
3641
|
-
}, onChangeHandler: d, hideClearIcon: !
|
|
3639
|
+
var p, h;
|
|
3640
|
+
return /* @__PURE__ */ n.jsx("td", { className: b("table-cell", ue.tableCell), children: /* @__PURE__ */ n.jsx(Ss, { type: f.type, value: (p = l[f.field ?? ""]) == null ? void 0 : p.value, field: f.field, isReadonly: f.readOnly, isPrimary: e.primaryKey === f.field, valuesForSelect: f.valuesForSelect, addValueToValuesForSelect: (x) => {
|
|
3641
|
+
r(t.map((w) => w.field === f.field ? { ...w, valuesForSelect: [...w.valuesForSelect ?? [], x] } : w));
|
|
3642
|
+
}, onChangeHandler: d, hideClearIcon: !m(l[f.field ?? ""]), clearValue: (h = l[f.field ?? ""].defaultValue) == null ? void 0 : h.toString(), customPickers: i }) }, `${e.id}-${f.field}`);
|
|
3642
3643
|
}),
|
|
3643
|
-
/* @__PURE__ */ n.jsx("td", { className:
|
|
3644
|
+
/* @__PURE__ */ n.jsx("td", { className: b("table-cell", ue.tableCell, ue.stickyLast), children: /* @__PURE__ */ n.jsx(se, { color: "danger", onClick: () => o(l[e.primaryKey ?? ""].value), children: /* @__PURE__ */ n.jsx(c, { icon: "delete" }) }) })
|
|
3644
3645
|
] });
|
|
3645
3646
|
}, Mc = ({ schema: e, columns: t, setColumns: r, onCreate: s, customPickers: a }) => {
|
|
3646
|
-
const { ProjectIconComponent: o } = Z(
|
|
3647
|
-
var
|
|
3647
|
+
const { ProjectIconComponent: o } = Z(he), [i, c] = E(null), l = S(() => {
|
|
3648
|
+
var m;
|
|
3648
3649
|
const d = {};
|
|
3649
|
-
(
|
|
3650
|
-
const f =
|
|
3651
|
-
d[
|
|
3650
|
+
(m = e.columns) == null || m.forEach((g) => {
|
|
3651
|
+
const f = g.type === "BIT" ? !1 : g.type === "NUM" ? 0 : g.type === "STR" ? "" : null;
|
|
3652
|
+
d[g.field ?? ""] = {
|
|
3652
3653
|
value: f,
|
|
3653
3654
|
defaultValue: f
|
|
3654
3655
|
};
|
|
3655
3656
|
}), c(d);
|
|
3656
|
-
}, [e]), u = S((d,
|
|
3657
|
-
c((
|
|
3658
|
-
...
|
|
3657
|
+
}, [e]), u = S((d, m) => {
|
|
3658
|
+
c((g) => g && {
|
|
3659
|
+
...g,
|
|
3659
3660
|
[d]: {
|
|
3660
|
-
...
|
|
3661
|
-
value:
|
|
3661
|
+
...g[d],
|
|
3662
|
+
value: m
|
|
3662
3663
|
}
|
|
3663
3664
|
});
|
|
3664
3665
|
}, []);
|
|
3665
3666
|
return i ? /* @__PURE__ */ n.jsxs("tr", { className: "sticky-bottom shadow", children: [
|
|
3666
|
-
/* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(
|
|
3667
|
+
/* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(se, { color: "success", onClick: async () => {
|
|
3667
3668
|
const d = Ns(i);
|
|
3668
3669
|
d && await s(d) && c(null);
|
|
3669
3670
|
}, children: /* @__PURE__ */ n.jsx(o, { icon: "check" }) }) }),
|
|
3670
|
-
t.map((d) => /* @__PURE__ */ n.jsx("td", { children: /* @__PURE__ */ n.jsx(Ss, { type: d.type, value: i[d.field ?? ""].value, field: d.field, isReadonly: d.readOnly, isPrimary: e.primaryKey === d.field, valuesForSelect: d.valuesForSelect, addValueToValuesForSelect: (
|
|
3671
|
-
r(t.map((
|
|
3671
|
+
t.map((d) => /* @__PURE__ */ n.jsx("td", { children: /* @__PURE__ */ n.jsx(Ss, { type: d.type, value: i[d.field ?? ""].value, field: d.field, isReadonly: d.readOnly, isPrimary: e.primaryKey === d.field, valuesForSelect: d.valuesForSelect, addValueToValuesForSelect: (m) => {
|
|
3672
|
+
r(t.map((g) => g.field === d.field ? { ...g, valuesForSelect: [...g.valuesForSelect ?? [], m] } : g));
|
|
3672
3673
|
}, onChangeHandler: u, primaryEditable: !0, customPickers: a }) }, `${e.id}-${d.field}`)),
|
|
3673
|
-
/* @__PURE__ */ n.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ n.jsx(
|
|
3674
|
+
/* @__PURE__ */ n.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ n.jsx(se, { color: "danger", onClick: () => c(null), children: /* @__PURE__ */ n.jsx(o, { icon: "cancel" }) }) })
|
|
3674
3675
|
] }) : /* @__PURE__ */ n.jsxs("tr", { className: "sticky-bottom shadow", children: [
|
|
3675
|
-
/* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(
|
|
3676
|
+
/* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(se, { onClick: l, children: /* @__PURE__ */ n.jsx(o, { icon: "add" }) }) }),
|
|
3676
3677
|
/* @__PURE__ */ n.jsx("td", { colSpan: t.length + 1 })
|
|
3677
3678
|
] });
|
|
3678
3679
|
}, Bc = "_resizer_ref0b_1", Vc = "_content_ref0b_11", zc = "_dragging_ref0b_16", Ct = {
|
|
@@ -3680,20 +3681,20 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3680
3681
|
content: Vc,
|
|
3681
3682
|
dragging: zc
|
|
3682
3683
|
}, Pc = ({ cellRef: e, defaultWidth: t }) => {
|
|
3683
|
-
const [r, s] =
|
|
3684
|
-
return
|
|
3684
|
+
const [r, s] = E(t), [, a] = E(null);
|
|
3685
|
+
return B(() => {
|
|
3685
3686
|
s(t);
|
|
3686
|
-
}, [t]),
|
|
3687
|
+
}, [t]), B(() => {
|
|
3687
3688
|
e.current && (e.current.style.minWidth = `${r}px`);
|
|
3688
|
-
}, [r, e]), /* @__PURE__ */ n.jsx("div", { className:
|
|
3689
|
+
}, [r, e]), /* @__PURE__ */ n.jsx("div", { className: b("luminus-column-resizer", Ct.resizer), draggable: !0, onDragStart: (o) => {
|
|
3689
3690
|
a(o.currentTarget.getBoundingClientRect().x), o.currentTarget.classList.add(Ct.dragging);
|
|
3690
3691
|
}, onDrag: (o) => {
|
|
3691
3692
|
a((i) => (e.current && s((c) => c + o.clientX - (i ?? 0)), o.clientX));
|
|
3692
3693
|
}, onDragEnd: (o) => {
|
|
3693
3694
|
a(null), o.currentTarget.classList.remove(Ct.dragging);
|
|
3694
|
-
}, children: /* @__PURE__ */ n.jsx("div", { className:
|
|
3695
|
+
}, children: /* @__PURE__ */ n.jsx("div", { className: b("content", Ct.content) }) });
|
|
3695
3696
|
}, Wc = ({ column: e, children: t }) => e.description ? /* @__PURE__ */ n.jsx(Bt, { placement: "bottom", text: e.description ?? "", children: /* @__PURE__ */ n.jsx("div", { children: t }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: t }), Hc = ({ column: e, sortByField: t, sortByType: r, setSortBy: s }) => {
|
|
3696
|
-
const { ProjectIconComponent: a } = Z(
|
|
3697
|
+
const { ProjectIconComponent: a } = Z(he), o = J(null), i = Q(() => {
|
|
3697
3698
|
if (e.valuesForSelect && e.valuesForSelect.length > 0)
|
|
3698
3699
|
return 200;
|
|
3699
3700
|
switch (e.type) {
|
|
@@ -3709,7 +3710,7 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3709
3710
|
return 100;
|
|
3710
3711
|
}
|
|
3711
3712
|
}, [e.type, e.valuesForSelect]);
|
|
3712
|
-
return /* @__PURE__ */ n.jsxs("th", { ref: o, className:
|
|
3713
|
+
return /* @__PURE__ */ n.jsxs("th", { ref: o, className: b("table-head", ue.tableHead), onClick: () => {
|
|
3713
3714
|
const c = t === e.field ? r : null;
|
|
3714
3715
|
if (c === "asc") {
|
|
3715
3716
|
s(e.field, "desc");
|
|
@@ -3727,43 +3728,43 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3727
3728
|
] }) }),
|
|
3728
3729
|
/* @__PURE__ */ n.jsx(Pc, { cellRef: o, defaultWidth: i })
|
|
3729
3730
|
] });
|
|
3730
|
-
}, Uc = ({ schema: e, items: t, onEditItem: r, onDeleteItem: s, onCreateItem: a, filters: o, setFilter: i, sortByField: c, sortByType: l, setSortBy: u, selectedMaster: d, customPickers:
|
|
3731
|
-
const { texts: { dynamicForms:
|
|
3732
|
-
return
|
|
3733
|
-
var h,
|
|
3734
|
-
|
|
3735
|
-
...((
|
|
3731
|
+
}, Uc = ({ schema: e, items: t, onEditItem: r, onDeleteItem: s, onCreateItem: a, filters: o, setFilter: i, sortByField: c, sortByType: l, setSortBy: u, selectedMaster: d, customPickers: m }) => {
|
|
3732
|
+
const { texts: { dynamicForms: g } } = Z(he), [f, p] = E([]);
|
|
3733
|
+
return B(() => {
|
|
3734
|
+
var h, x, w;
|
|
3735
|
+
p([
|
|
3736
|
+
...((w = (x = (h = e.columns) == null ? void 0 : h.filter((y) => !y.hidden)) == null ? void 0 : x.filter((y) => e.masterReference ? y.field !== e.masterReferenceColumn : !0)) == null ? void 0 : w.map((y) => {
|
|
3736
3737
|
var j;
|
|
3737
3738
|
return {
|
|
3738
|
-
label:
|
|
3739
|
+
label: y.caption ?? "",
|
|
3739
3740
|
width: 100,
|
|
3740
|
-
description:
|
|
3741
|
-
field:
|
|
3742
|
-
type:
|
|
3743
|
-
readOnly:
|
|
3744
|
-
valuesForSelect: ((j =
|
|
3741
|
+
description: y.description ?? null,
|
|
3742
|
+
field: y.field ?? "",
|
|
3743
|
+
type: y.type,
|
|
3744
|
+
readOnly: y.readOnly,
|
|
3745
|
+
valuesForSelect: ((j = y.values) == null ? void 0 : j.filter((v) => y.valuesFilteredByMaster ? v.masterValue === d : !0).map((v) => ({ id: v.id ?? "", name: v.name }))) ?? void 0
|
|
3745
3746
|
};
|
|
3746
3747
|
})) ?? []
|
|
3747
3748
|
]);
|
|
3748
|
-
}, [e, d]), /* @__PURE__ */ n.jsxs("table", { id: `dynamic-table-${e.id}`, className:
|
|
3749
|
-
/* @__PURE__ */ n.jsxs("thead", { className:
|
|
3750
|
-
/* @__PURE__ */ n.jsxs("tr", { className:
|
|
3751
|
-
/* @__PURE__ */ n.jsx("th", { className:
|
|
3749
|
+
}, [e, d]), /* @__PURE__ */ n.jsxs("table", { id: `dynamic-table-${e.id}`, className: b("table table-borderless luminus-df-table", ue.table), children: [
|
|
3750
|
+
/* @__PURE__ */ n.jsxs("thead", { className: b("text-nowrap table-header", ue.stickyTop, ue.tableHeader), children: [
|
|
3751
|
+
/* @__PURE__ */ n.jsxs("tr", { className: b("table-row", ue.tableRow), children: [
|
|
3752
|
+
/* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyFirst) }),
|
|
3752
3753
|
f.map((h) => /* @__PURE__ */ n.jsx(Hc, { column: h, sortByField: c, sortByType: l, setSortBy: u }, `${e.id}-${h.field}`)),
|
|
3753
|
-
/* @__PURE__ */ n.jsx("th", { className:
|
|
3754
|
+
/* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyLast) })
|
|
3754
3755
|
] }),
|
|
3755
|
-
/* @__PURE__ */ n.jsxs("tr", { className:
|
|
3756
|
-
/* @__PURE__ */ n.jsx("th", { className:
|
|
3757
|
-
f.map((h) => /* @__PURE__ */ n.jsx("th", { className:
|
|
3758
|
-
{ id: 1, name:
|
|
3759
|
-
{ id: 0, name:
|
|
3760
|
-
] : h.valuesForSelect ?? [], isNumber: h.type === "BIT", showClearIcon: !0, dropdownWidth: 200 }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(it, { InputContainer: Te, withoutLabel: !0, size: "sm", type: h.type === "NUM" ? "number" : h.type === "DT" ? "date" : "text", value: o[h.field] ?? "", onChange: (
|
|
3761
|
-
/* @__PURE__ */ n.jsx("th", { className:
|
|
3756
|
+
/* @__PURE__ */ n.jsxs("tr", { className: b("table-row filters-row", ue.tableRow, ue.filtersRow), children: [
|
|
3757
|
+
/* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyFirst) }),
|
|
3758
|
+
f.map((h) => /* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead), children: h.valuesForSelect && h.valuesForSelect.length > 0 || h.type === "BIT" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(Ft, { InputContainer: Te, withoutLabel: !0, size: "sm", value: o[h.field] ?? "", onChange: (x) => i(h.field, (x == null ? void 0 : x.toString()) ?? null), options: h.type === "BIT" ? [
|
|
3759
|
+
{ id: 1, name: g.yes },
|
|
3760
|
+
{ id: 0, name: g.no }
|
|
3761
|
+
] : h.valuesForSelect ?? [], isNumber: h.type === "BIT", showClearIcon: !0, dropdownWidth: 200 }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(it, { InputContainer: Te, withoutLabel: !0, size: "sm", type: h.type === "NUM" ? "number" : h.type === "DT" ? "date" : "text", value: o[h.field] ?? "", onChange: (x) => i(h.field, (x == null ? void 0 : x.toString()) ?? null) }) }) }, `${e.id}-${h.field}`)),
|
|
3762
|
+
/* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyLast) })
|
|
3762
3763
|
] })
|
|
3763
3764
|
] }),
|
|
3764
|
-
/* @__PURE__ */ n.jsxs("tbody", { className:
|
|
3765
|
-
t.filter((h) => h[e.primaryKey ?? ""]).map((h) => /* @__PURE__ */ n.jsx(Ac, { schema: e, columns: f, setColumns:
|
|
3766
|
-
/* @__PURE__ */ n.jsx(Mc, { schema: e, columns: f, setColumns:
|
|
3765
|
+
/* @__PURE__ */ n.jsxs("tbody", { className: b("table-body", ue.tableBody), children: [
|
|
3766
|
+
t.filter((h) => h[e.primaryKey ?? ""]).map((h) => /* @__PURE__ */ n.jsx(Ac, { schema: e, columns: f, setColumns: p, initialItem: h, onEdit: r, onDelete: s, customPickers: m }, `${e.id}-${h[e.primaryKey ?? ""].value}`)),
|
|
3767
|
+
/* @__PURE__ */ n.jsx(Mc, { schema: e, columns: f, setColumns: p, onCreate: a, customPickers: m })
|
|
3767
3768
|
] })
|
|
3768
3769
|
] });
|
|
3769
3770
|
}, Yc = ({ master: e, onChange: t, options: r, label: s }) => /* @__PURE__ */ n.jsx("div", { style: { minWidth: "200px" }, children: /* @__PURE__ */ n.jsx(Ft, { label: s, value: e, onChange: (a) => t(a ? a.toString() : null), options: r, size: "sm" }) }), Gc = "_pagination_gujwe_1", ir = {
|
|
@@ -3776,159 +3777,159 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3776
3777
|
apiItemPost: "/dynamicForms/update",
|
|
3777
3778
|
apiItemDelete: "/dynamicForms/delete",
|
|
3778
3779
|
apiItemCreate: "/dynamicForms/insert"
|
|
3779
|
-
}, Wd = ({ id: e, page: t, setPage: r, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy: c, appUrls: { appDetail: l = lr.appDetail } = lr, apiUrls: { apiSchemaGet: u = ot.apiSchemaGet, apiDataGet: d = ot.apiDataGet, apiItemPost:
|
|
3780
|
-
var
|
|
3781
|
-
const { texts: { dynamicForms: h }, ProjectIconComponent:
|
|
3782
|
-
|
|
3783
|
-
|
|
3780
|
+
}, Wd = ({ id: e, page: t, setPage: r, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy: c, appUrls: { appDetail: l = lr.appDetail } = lr, apiUrls: { apiSchemaGet: u = ot.apiSchemaGet, apiDataGet: d = ot.apiDataGet, apiItemPost: m = ot.apiItemPost, apiItemDelete: g = ot.apiItemDelete, apiItemCreate: f = ot.apiItemCreate } = ot, customPickers: p }) => {
|
|
3781
|
+
var Se, de, ae, Ie, Ee, Oe;
|
|
3782
|
+
const { texts: { dynamicForms: h }, ProjectIconComponent: x } = Z(he), w = st(), { startLoading: y, stopLoading: j } = Z(Mt), [v, _] = E(null), [C, D] = E(null), [k, T] = E(null), [I, O] = E(null), [$, N] = E(!1), { addNotification: M } = _r(), [re, R] = E([]), { confirm: z } = Lt(), L = 20, G = L + 1, W = I ? Math.ceil(I.length / L) : 1, K = t ? t > 1 : !1, ee = t ? t < W : !1, P = t ? (t - 1) * L : 0, H = t ? t * L : L, [F, ne] = E(!1), ge = F ? I == null ? void 0 : I.slice(P, H) : I, [fe, te] = E(null);
|
|
3783
|
+
B(() => {
|
|
3784
|
+
_(null), D(null), N(!1), R([]), te(null);
|
|
3784
3785
|
}, [e]);
|
|
3785
|
-
const
|
|
3786
|
-
|
|
3787
|
-
|
|
3786
|
+
const we = S(async () => {
|
|
3787
|
+
y("dynamicFormSchema"), await w.get(`${u}?id=${e}`).then(({ data: Y }) => {
|
|
3788
|
+
_(Y), j("dynamicFormSchema");
|
|
3788
3789
|
}).catch(() => j("dynamicFormSchema"));
|
|
3789
|
-
}, [
|
|
3790
|
+
}, [w, e, y, j, u]), Ce = S(async () => {
|
|
3790
3791
|
var Y;
|
|
3791
|
-
if (!(
|
|
3792
|
-
if (
|
|
3792
|
+
if (!(v === null || ((Y = v.id) == null ? void 0 : Y.toString()) !== e)) {
|
|
3793
|
+
if (v.masterReference && !fe) {
|
|
3793
3794
|
D([]);
|
|
3794
3795
|
return;
|
|
3795
3796
|
}
|
|
3796
|
-
|
|
3797
|
-
const
|
|
3798
|
-
var
|
|
3799
|
-
return Object.fromEntries(((
|
|
3800
|
-
|
|
3801
|
-
{ value:
|
|
3797
|
+
y("dynamicFormData"), await w.get(`${d}?id=${e}&showArchive=${$}${v.masterReference ? `&master=${fe}` : ""}`).then(({ data: le }) => {
|
|
3798
|
+
const xe = le.map((ie) => {
|
|
3799
|
+
var ve;
|
|
3800
|
+
return Object.fromEntries(((ve = v.columns) == null ? void 0 : ve.filter((be) => be.field).map((be) => [
|
|
3801
|
+
be.field,
|
|
3802
|
+
{ value: ie[be.field ?? ""], defaultValue: ie[be.field ?? ""] }
|
|
3802
3803
|
])) ?? []);
|
|
3803
3804
|
});
|
|
3804
|
-
D(
|
|
3805
|
+
D(xe), j("dynamicFormData");
|
|
3805
3806
|
}).catch(() => j("dynamicFormData"));
|
|
3806
3807
|
}
|
|
3807
|
-
}, [
|
|
3808
|
-
|
|
3809
|
-
var
|
|
3810
|
-
return ((
|
|
3808
|
+
}, [w, e, v, y, j, $, fe, d]), Ke = S(async (Y) => (y("dynamicFormEdit"), w.post(`${m}?id=${e}`, Y).then(() => (j("dynamicFormEdit"), R([]), !0)).catch((le) => (j("dynamicFormEdit"), R(Ut(le)), !1))), [w, e, y, j, m]), U = S(async (Y) => (y("dynamicFormDelete"), w.delete(`${g}?id=${e}&pk=${Y}`).then(() => (j("dynamicFormDelete"), R([]), !0)).catch((le) => (j("dynamicFormDelete"), R(Ut(le)), !1))), [w, e, y, j, g]), pe = S(async (Y) => (y("dynamicFormCreate"), w.post(`${f}?id=${e}`, Y).then(({ data: le }) => (j("dynamicFormCreate"), R([]), le)).catch((le) => (j("dynamicFormCreate"), R(Ut(le)), null))), [w, e, y, j, f]), _e = S(async (Y) => {
|
|
3809
|
+
v && await Ke(v.masterReference ? { ...Y, [v.masterReferenceColumn ?? ""]: fe } : Y) && (M(h.editSuccess, "success"), D((le) => le && le.map((xe) => {
|
|
3810
|
+
var ie;
|
|
3811
|
+
return ((ie = xe[(v == null ? void 0 : v.primaryKey) ?? ""]) == null ? void 0 : ie.value) === Y[(v == null ? void 0 : v.primaryKey) ?? ""] ? or(Y, v) : xe;
|
|
3811
3812
|
})));
|
|
3812
|
-
}, [
|
|
3813
|
-
await
|
|
3814
|
-
var
|
|
3815
|
-
return ((
|
|
3813
|
+
}, [M, Ke, v, fe, h]), at = S(async (Y) => {
|
|
3814
|
+
await z(h.deleteConfirm) && await U(Y) && (M(h.deleteSuccess, "success"), D((le) => le && le.filter((xe) => {
|
|
3815
|
+
var ie;
|
|
3816
|
+
return ((ie = xe[(v == null ? void 0 : v.primaryKey) ?? ""]) == null ? void 0 : ie.value) !== Y;
|
|
3816
3817
|
})));
|
|
3817
|
-
}, [
|
|
3818
|
-
if (!
|
|
3818
|
+
}, [M, U, h, z, v]), A = S(async (Y) => {
|
|
3819
|
+
if (!v)
|
|
3819
3820
|
return !1;
|
|
3820
|
-
const le = await
|
|
3821
|
+
const le = await pe(v.masterReference ? { ...Y, [v.masterReferenceColumn ?? ""]: fe } : Y);
|
|
3821
3822
|
if (le !== null) {
|
|
3822
|
-
|
|
3823
|
-
const
|
|
3824
|
-
return
|
|
3823
|
+
M(h.createSuccess, "success");
|
|
3824
|
+
const xe = or(Y, v);
|
|
3825
|
+
return xe[(v == null ? void 0 : v.primaryKey) ?? ""] = { value: le, defaultValue: le }, D((ie) => [...ie ?? [], xe]), !0;
|
|
3825
3826
|
}
|
|
3826
3827
|
return !1;
|
|
3827
|
-
}, [
|
|
3828
|
+
}, [M, pe, h, v, fe]), V = (Y) => {
|
|
3828
3829
|
Y > W ? r(W) : Y < 1 && r(1), r(Y);
|
|
3829
3830
|
}, q = S(() => {
|
|
3830
|
-
if (
|
|
3831
|
-
|
|
3831
|
+
if (!C || !v) {
|
|
3832
|
+
T(null);
|
|
3832
3833
|
return;
|
|
3833
3834
|
}
|
|
3834
|
-
const Y =
|
|
3835
|
+
const Y = C.filter((le) => Object.entries(s).every(([xe, ie]) => {
|
|
3835
3836
|
var ut, ft, mt;
|
|
3836
|
-
if (
|
|
3837
|
+
if (ie === null)
|
|
3837
3838
|
return !0;
|
|
3838
|
-
const
|
|
3839
|
-
if (
|
|
3839
|
+
const ve = (ut = le[xe]) == null ? void 0 : ut.value;
|
|
3840
|
+
if (ve == null)
|
|
3840
3841
|
return !1;
|
|
3841
|
-
const
|
|
3842
|
+
const be = (ft = v.columns) == null ? void 0 : ft.find((Nt) => Nt.field === xe), ct = be == null ? void 0 : be.type, dt = (be == null ? void 0 : be.values) && ((mt = be == null ? void 0 : be.values) == null ? void 0 : mt.length) > 0;
|
|
3842
3843
|
if (!ct)
|
|
3843
3844
|
return !1;
|
|
3844
3845
|
switch (ct) {
|
|
3845
3846
|
case "STR":
|
|
3846
|
-
return dt ?
|
|
3847
|
+
return dt ? ve === ie : ve.toString().toLowerCase().includes(ie.toLowerCase());
|
|
3847
3848
|
case "NUM":
|
|
3848
|
-
return dt ? Number(
|
|
3849
|
+
return dt ? Number(ve) === Number(ie) : ve.toString().toLowerCase().includes(ie.toLowerCase());
|
|
3849
3850
|
case "DT":
|
|
3850
|
-
return
|
|
3851
|
+
return ve.toString().toLowerCase().includes(ie.toLowerCase());
|
|
3851
3852
|
case "BIT":
|
|
3852
|
-
return Number(
|
|
3853
|
+
return Number(ve) === Number(ie);
|
|
3853
3854
|
default:
|
|
3854
|
-
return
|
|
3855
|
+
return ve.toString().toLowerCase().includes(ie.toLowerCase());
|
|
3855
3856
|
}
|
|
3856
3857
|
}));
|
|
3857
|
-
|
|
3858
|
-
}, [
|
|
3859
|
-
if (!
|
|
3860
|
-
|
|
3858
|
+
T(Y);
|
|
3859
|
+
}, [C, s, v]), ce = S(() => {
|
|
3860
|
+
if (!k || !v) {
|
|
3861
|
+
O([]);
|
|
3861
3862
|
return;
|
|
3862
3863
|
}
|
|
3863
3864
|
if (!o) {
|
|
3864
|
-
|
|
3865
|
+
O(k);
|
|
3865
3866
|
return;
|
|
3866
3867
|
}
|
|
3867
|
-
|
|
3868
|
+
O([...k].sort((Y, le) => {
|
|
3868
3869
|
var ct, dt, ut, ft, mt, Nt;
|
|
3869
|
-
const
|
|
3870
|
-
if (!
|
|
3870
|
+
const xe = ((dt = (ct = Y[o]) == null ? void 0 : ct.value) == null ? void 0 : dt.toString()) ?? "", ie = ((ft = (ut = le[o]) == null ? void 0 : ut.value) == null ? void 0 : ft.toString()) ?? "", ve = v.columns.find((Fe) => Fe.field === o), be = ve == null ? void 0 : ve.type;
|
|
3871
|
+
if (!ve || !be || !xe && !ie)
|
|
3871
3872
|
return 0;
|
|
3872
|
-
if (!
|
|
3873
|
+
if (!xe)
|
|
3873
3874
|
return 1;
|
|
3874
|
-
if (!
|
|
3875
|
+
if (!ie)
|
|
3875
3876
|
return -1;
|
|
3876
|
-
if (
|
|
3877
|
-
const Fe = ((mt =
|
|
3877
|
+
if (ve.values && ve.values.length > 0) {
|
|
3878
|
+
const Fe = ((mt = ve.values.find((Wt) => {
|
|
3878
3879
|
var ht;
|
|
3879
|
-
return ((ht = Wt.id) == null ? void 0 : ht.toString()) ===
|
|
3880
|
-
})) == null ? void 0 : mt.name) ?? "", Be = ((Nt =
|
|
3880
|
+
return ((ht = Wt.id) == null ? void 0 : ht.toString()) === xe;
|
|
3881
|
+
})) == null ? void 0 : mt.name) ?? "", Be = ((Nt = ve.values.find((Wt) => {
|
|
3881
3882
|
var ht;
|
|
3882
|
-
return ((ht = Wt.id) == null ? void 0 : ht.toString()) ===
|
|
3883
|
+
return ((ht = Wt.id) == null ? void 0 : ht.toString()) === ie;
|
|
3883
3884
|
})) == null ? void 0 : Nt.name) ?? "";
|
|
3884
3885
|
return i === "asc" ? Fe.localeCompare(Be) : Be.localeCompare(Fe);
|
|
3885
3886
|
}
|
|
3886
|
-
if (
|
|
3887
|
-
const Fe = Number(
|
|
3887
|
+
if (be === "NUM") {
|
|
3888
|
+
const Fe = Number(xe), Be = Number(ie);
|
|
3888
3889
|
return i === "asc" ? Fe - Be : Be - Fe;
|
|
3889
3890
|
}
|
|
3890
|
-
if (
|
|
3891
|
-
const Fe = yt(
|
|
3891
|
+
if (be === "DT") {
|
|
3892
|
+
const Fe = yt(xe == null ? void 0 : xe.toString()).getTime(), Be = yt(ie == null ? void 0 : ie.toString()).getTime();
|
|
3892
3893
|
return i === "asc" ? Fe - Be : Be - Fe;
|
|
3893
3894
|
}
|
|
3894
|
-
return i === "asc" ?
|
|
3895
|
+
return i === "asc" ? xe.toString().localeCompare(ie.toString()) : ie.toString().localeCompare(xe.toString());
|
|
3895
3896
|
}));
|
|
3896
|
-
}, [
|
|
3897
|
-
return
|
|
3898
|
-
|
|
3899
|
-
}, [
|
|
3900
|
-
|
|
3901
|
-
}, [
|
|
3897
|
+
}, [k, v, o, i]);
|
|
3898
|
+
return B(() => {
|
|
3899
|
+
we();
|
|
3900
|
+
}, [we]), B(() => {
|
|
3901
|
+
Ce();
|
|
3902
|
+
}, [Ce]), B(() => {
|
|
3902
3903
|
q();
|
|
3903
|
-
}, [q]),
|
|
3904
|
+
}, [q]), B(() => {
|
|
3904
3905
|
ce();
|
|
3905
|
-
}, [ce]),
|
|
3906
|
-
|
|
3907
|
-
}, [
|
|
3908
|
-
!
|
|
3909
|
-
}, [t,
|
|
3906
|
+
}, [ce]), B(() => {
|
|
3907
|
+
I && I.length > G ? (ne(!0), t || r(1)) : (ne(!1), I && r(null));
|
|
3908
|
+
}, [I, r, t, G]), B(() => {
|
|
3909
|
+
!F || !t || (t > W && r(W), t < 1 && r(1));
|
|
3910
|
+
}, [t, F, W, r]), /* @__PURE__ */ n.jsxs("div", { className: "h-100 w-100 d-flex flex-column", children: [
|
|
3910
3911
|
/* @__PURE__ */ n.jsxs("div", { className: "mb-3 d-flex justify-content-between align-items-center", children: [
|
|
3911
|
-
/* @__PURE__ */ n.jsx(
|
|
3912
|
-
/* @__PURE__ */ n.jsx(us, { label: h.showArchived, value:
|
|
3912
|
+
/* @__PURE__ */ n.jsx(X, { variant: "h3", children: (v == null ? void 0 : v.name) ?? "" }),
|
|
3913
|
+
/* @__PURE__ */ n.jsx(us, { label: h.showArchived, value: $ === !0, onChange: (Y) => N(Y) })
|
|
3913
3914
|
] }),
|
|
3914
|
-
(
|
|
3915
|
-
(
|
|
3916
|
-
(
|
|
3915
|
+
(v == null ? void 0 : v.description) && /* @__PURE__ */ n.jsx(X, { variant: "body2", className: "mb-3", children: v == null ? void 0 : v.description }),
|
|
3916
|
+
(v == null ? void 0 : v.masterReference) && /* @__PURE__ */ n.jsx("div", { className: "mb-3 d-flex", children: /* @__PURE__ */ n.jsx(Yc, { label: ((de = (Se = v.columns) == null ? void 0 : Se.find((Y) => Y.field === v.masterReferenceColumn)) == null ? void 0 : de.caption) ?? "", options: ((Ie = (ae = v.columns) == null ? void 0 : ae.find((Y) => Y.field === v.masterReferenceColumn)) == null ? void 0 : Ie.values) ?? [], master: fe, onChange: (Y) => te(Y) }) }),
|
|
3917
|
+
(v == null ? void 0 : v.slaves) && v.slaves.length > 0 && /* @__PURE__ */ n.jsx("div", { className: "mb-3 d-flex align-items-center flex-start gap-1", children: v.slaves.map((Y) => {
|
|
3917
3918
|
var le;
|
|
3918
3919
|
return /* @__PURE__ */ n.jsx(Ae, { as: "link", href: `${Et(l, { id: (le = Y.id) == null ? void 0 : le.toString() })}?type=dynamic-form`, children: Y.name }, Y.id);
|
|
3919
3920
|
}) }),
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
3924
|
-
|
|
3921
|
+
v != null && v.masterReference && !fe ? /* @__PURE__ */ n.jsx(kn, { variant: "warning", children: h.selectMaster(((Oe = (Ee = v.columns) == null ? void 0 : Ee.find((Y) => Y.field === v.masterReferenceColumn)) == null ? void 0 : Oe.caption) ?? "").toLowerCase() }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3922
|
+
v && re.length > 0 && /* @__PURE__ */ n.jsx("div", { className: "mb-2", children: /* @__PURE__ */ n.jsx(_c, { errors: re, schema: v }) }),
|
|
3923
|
+
v && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3924
|
+
/* @__PURE__ */ n.jsx("div", { className: b("rounded border overflow-auto", ir.tableContainer), children: /* @__PURE__ */ n.jsx(Uc, { schema: v, items: (F ? ge : I) ?? [], onEditItem: _e, onDeleteItem: at, onCreateItem: A, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy: c, selectedMaster: (fe == null ? void 0 : fe.toString()) ?? null, customPickers: p }) }),
|
|
3925
|
+
F && t && /* @__PURE__ */ n.jsxs("div", { className: b(ir.pagination, "d-flex align-items-center gap-3 p-1 border-bottom border-start border-end rounded"), children: [
|
|
3925
3926
|
/* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
3926
|
-
/* @__PURE__ */ n.jsx(
|
|
3927
|
-
/* @__PURE__ */ n.jsx(
|
|
3928
|
-
/* @__PURE__ */ n.jsx(
|
|
3929
|
-
/* @__PURE__ */ n.jsx(
|
|
3927
|
+
/* @__PURE__ */ n.jsx(se, { color: "primary", onClick: () => V(1), disabled: !K, children: /* @__PURE__ */ n.jsx(x, { icon: "chevron-double-left" }) }),
|
|
3928
|
+
/* @__PURE__ */ n.jsx(se, { color: "primary", onClick: () => V(t - 1), disabled: !K, children: /* @__PURE__ */ n.jsx(x, { icon: "chevron-left" }) }),
|
|
3929
|
+
/* @__PURE__ */ n.jsx(se, { color: "primary", onClick: () => V(t + 1), disabled: !ee, children: /* @__PURE__ */ n.jsx(x, { icon: "chevron-right" }) }),
|
|
3930
|
+
/* @__PURE__ */ n.jsx(se, { color: "primary", onClick: () => V(W), disabled: !ee, children: /* @__PURE__ */ n.jsx(x, { icon: "chevron-double-right" }) })
|
|
3930
3931
|
] }),
|
|
3931
|
-
/* @__PURE__ */ n.jsxs(
|
|
3932
|
+
/* @__PURE__ */ n.jsxs(X, { variant: "body", children: [
|
|
3932
3933
|
h.tablePage,
|
|
3933
3934
|
" ",
|
|
3934
3935
|
t,
|
|
@@ -3946,35 +3947,35 @@ const Bl = "_lightbox_14acg_1", Vl = "_show_14acg_16", zl = "_header_14acg_20",
|
|
|
3946
3947
|
}, dr = {
|
|
3947
3948
|
apiDynamicFormsGet: "/dynamicForms"
|
|
3948
3949
|
}, Kc = ({ item: e, children: t }) => e.description ? /* @__PURE__ */ n.jsx(Bt, { placement: "left", text: e.description ?? "", children: /* @__PURE__ */ n.jsx("div", { children: t }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: t }), Hd = ({ activeId: e, otherForms: t = [], groupsDefs: r = [], searchQuery: s, fullSize: a, appUrls: { appDetail: o = cr.appDetail } = cr, apiUrls: { apiDynamicFormsGet: i = dr.apiDynamicFormsGet } = dr }) => {
|
|
3949
|
-
const c = st(), { startLoading: l, stopLoading: u } = Z(Mt), [d,
|
|
3950
|
+
const c = st(), { startLoading: l, stopLoading: u } = Z(Mt), [d, m] = E(null), g = Q(() => [
|
|
3950
3951
|
...(d == null ? void 0 : d.map((h) => ({
|
|
3951
3952
|
...h,
|
|
3952
3953
|
type: "dynamic-form"
|
|
3953
3954
|
}))) ?? [],
|
|
3954
3955
|
...t
|
|
3955
|
-
].filter((h) => wt(h.name, s) || wt(h.description, s)).sort((h,
|
|
3956
|
+
].filter((h) => wt(h.name, s) || wt(h.description, s)).sort((h, x) => (h.name ?? "").localeCompare(x.name ?? "")) ?? [], [d, t, s]), f = Q(() => r.map((h) => ({
|
|
3956
3957
|
id: h.id,
|
|
3957
3958
|
name: h.name ?? "",
|
|
3958
|
-
items:
|
|
3959
|
-
})).filter((h) => h.items.length > 0), [r,
|
|
3959
|
+
items: g.filter((x) => x.group === h.id)
|
|
3960
|
+
})).filter((h) => h.items.length > 0), [r, g]), p = S(async () => {
|
|
3960
3961
|
l("dynamicForms"), await c.get(i).then(({ data: h }) => {
|
|
3961
|
-
|
|
3962
|
+
m(h), u("dynamicForms");
|
|
3962
3963
|
}).catch(() => u("dynamicForms"));
|
|
3963
3964
|
}, [c, l, u, i]);
|
|
3964
|
-
return
|
|
3965
|
-
!d &&
|
|
3966
|
-
}, [
|
|
3967
|
-
var
|
|
3968
|
-
return a ? /* @__PURE__ */ n.jsxs(tt, { to: `${Et(o, { id: (
|
|
3969
|
-
/* @__PURE__ */ n.jsx(
|
|
3970
|
-
|
|
3971
|
-
] },
|
|
3965
|
+
return B(() => {
|
|
3966
|
+
!d && p();
|
|
3967
|
+
}, [p, d]), g.length > 0 ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx("div", { className: "w-auto list-group forms-items overflow-x-hidden", children: f.map((h) => /* @__PURE__ */ n.jsx(cn, { title: h.name, defaultOpen: !0, children: h.items.map((x) => {
|
|
3968
|
+
var w, y, j, v;
|
|
3969
|
+
return a ? /* @__PURE__ */ n.jsxs(tt, { to: `${Et(o, { id: (w = x.id) == null ? void 0 : w.toString() })}?type=${x.type}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((y = x.id) == null ? void 0 : y.toString()) ? "active" : ""}`, children: [
|
|
3970
|
+
/* @__PURE__ */ n.jsx(X, { variant: "body", children: x.name }),
|
|
3971
|
+
x.description && /* @__PURE__ */ n.jsx(X, { variant: "body2", className: "text-muted mt-2", children: x.description })
|
|
3972
|
+
] }, x.id) : /* @__PURE__ */ n.jsx(Kc, { item: x, children: /* @__PURE__ */ n.jsx(tt, { to: `${Et(o, { id: (j = x.id) == null ? void 0 : j.toString() })}?type=${x.type}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((v = x.id) == null ? void 0 : v.toString()) ? "active" : ""}`, children: /* @__PURE__ */ n.jsx(X, { variant: "body2", children: x.name }) }) }, x.id);
|
|
3972
3973
|
}) }, h.id)) }) }) : null;
|
|
3973
3974
|
}, Ud = ({ label: e, to: t, value: r }) => /* @__PURE__ */ n.jsxs(Ye, { label: e, children: [
|
|
3974
3975
|
/* @__PURE__ */ n.jsx("input", { disabled: !0, className: "form-control d-none" }),
|
|
3975
3976
|
t ? /* @__PURE__ */ n.jsx(tt, { to: t, className: "border-bottom luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center", children: r }) : /* @__PURE__ */ n.jsx("div", { className: "luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center", children: r })
|
|
3976
3977
|
] }), Yd = () => {
|
|
3977
|
-
const { localizationContext: e } = Z(
|
|
3978
|
+
const { localizationContext: e } = Z(he), { language: t, setLanguage: r } = Z(e), s = (a) => {
|
|
3978
3979
|
r(a);
|
|
3979
3980
|
};
|
|
3980
3981
|
return /* @__PURE__ */ n.jsx(et, { onClick: (a) => {
|
|
@@ -4074,7 +4075,7 @@ export {
|
|
|
4074
4075
|
nu as HookFormTextAreaInput,
|
|
4075
4076
|
ru as HookFormTextInput,
|
|
4076
4077
|
ud as HtmlTooltip,
|
|
4077
|
-
|
|
4078
|
+
se as IconButton,
|
|
4078
4079
|
rr as ImgApi,
|
|
4079
4080
|
_s as ImgDirect,
|
|
4080
4081
|
rt as InvalidFeedback,
|
|
@@ -4109,7 +4110,7 @@ export {
|
|
|
4109
4110
|
it as TextInput,
|
|
4110
4111
|
Md as Timeline,
|
|
4111
4112
|
Gd as TypedFormGroup,
|
|
4112
|
-
|
|
4113
|
+
X as Typography,
|
|
4113
4114
|
ou as UserAvatarToggle,
|
|
4114
4115
|
Id as UserAvatarValueFormat,
|
|
4115
4116
|
Ad as VersionInfo,
|