react-luminus-components 1.3.149 → 1.3.151
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 +58 -75
- package/dist/{FullScreenContainer-DYBgh54H.js → FullScreenContainer-Ahxfk-Xk.js} +1 -1
- package/dist/{FullScreenContainer-wS-hROzA.cjs → FullScreenContainer-BWYwSExf.cjs} +1 -1
- package/dist/{Loading-DVzR10eX.cjs → Loading-C-Dsxusq.cjs} +1 -1
- package/dist/{Loading-fF23C88q.js → Loading-DiC4Np7v.js} +1 -1
- package/dist/components/Form/CheckInput/CheckInput.d.ts +1 -1
- package/dist/components/Form/CustomSelectInput/CustomSelectInput.d.ts +1 -1
- package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +1 -1
- package/dist/components/Form/NumericStepperInput/NumericStepperInput.d.ts +1 -1
- package/dist/components/Form/NumericTextInput/NumericTextInput.d.ts +1 -1
- package/dist/components/Form/SelectInput/SelectInput.d.ts +1 -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/CheckInput/HookFormCheckInput.d.ts +1 -1
- package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +1 -1
- package/dist/components/HookForm/DropdownPicker/HookFormDropdownPicker.d.ts +1 -1
- package/dist/components/HookForm/FileInput/HookFormFileInput.d.ts +1 -1
- package/dist/components/HookForm/NumericStepperInput/HookFormNumericStepperInput.d.ts +1 -1
- package/dist/components/HookForm/NumericTextInput/HookFormNumericTextInput.d.ts +1 -1
- package/dist/components/HookForm/SelectInput/HookFormSelectInput.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/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +6 -2
- package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +2 -0
- package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +2 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +35 -35
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +9 -9
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +36 -37
- package/dist/main.cjs.js +2 -2
- package/dist/main.es.js +1124 -1124
- package/dist/models/prop-types/InputContainerProps.d.ts +1 -0
- package/dist/models/prop-types/InputProps/CheckInputProps.d.ts +1 -0
- package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +1 -0
- package/dist/models/prop-types/InputProps/FileInputProps.d.ts +1 -0
- package/dist/models/prop-types/InputProps/NumericInputProps.d.ts +1 -0
- package/dist/models/prop-types/InputProps/SelectInputProps.d.ts +1 -0
- package/dist/models/prop-types/InputProps/TextAreaInputProps.d.ts +1 -0
- package/dist/models/prop-types/InputProps/TextInputProps.d.ts +1 -0
- package/dist/{nivo-bar.es-GeqH-wP6.js → nivo-bar.es-B2GqU-tV.js} +5362 -5350
- package/dist/nivo-bar.es-C8-VCzr1.cjs +279 -0
- package/dist/{searchUtils-rKGYKo3G.cjs → searchUtils-BSGjuykO.cjs} +1 -1
- package/dist/{searchUtils-C-B9CjZk.js → searchUtils-BhpLdWdC.js} +1 -1
- package/dist/{useClipboard-DryTYSx9.cjs → useClipboard-D6esVLqf.cjs} +1 -1
- package/dist/{useClipboard-B_wtiBC7.js → useClipboard-DegAIBUd.js} +1 -1
- package/dist/{useGetApiData-DRl4eniT.js → useGetApiData-CTK8sM2X.js} +4 -4
- package/dist/{useGetApiData-C6zACwiC.cjs → useGetApiData-D4Xo7Loy.cjs} +1 -1
- package/dist/{usePermissions-Dn1zXYZT.js → usePermissions-BKn9Opdd.js} +1 -1
- package/dist/{usePermissions-DihYt5eO.cjs → usePermissions-DMDGiPC1.cjs} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +59 -60
- package/package.json +1 -1
- package/dist/SimpleTooltip-B20SNN2b.cjs +0 -1
- package/dist/SimpleTooltip-BJ1Ja0Rd.js +0 -5
- package/dist/nivo-bar.es-CRYH7xvU.cjs +0 -279
package/dist/main.es.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { j as n, c as b, t as je, a as vt, s as $n, g as En, m as Os, d as kt, b as Fs, e as Ts, f as
|
|
2
|
-
import {
|
|
1
|
+
import { j as n, c as b, t as je, a as vt, s as $n, g as En, m as Os, d as kt, b as Fs, e as Ts, f as Pe, h as Ls, i as Rs, k as As, l as Ms, n as Bs, o as Vs, p as zs, T as vr, q as jr, r as On, E as Ps, u as yr, v as mn, w as wr, x as Ws, y as me, z as Tt, A as Hs, B as br, C as Lt, D as Us, F as sn, G as _r, H as Ys, S as an, N as Nr, I as hn, J as gn, K as Gs, L as Ks, M as qs, O as Qs, P as Zs, Q as Sr, R as Js, U as Xs, V as ea, W as ta, X as na, Y as ra, Z as sa, _ as on, $ as aa, a0 as Yt, a1 as X, a2 as fe, a3 as ln, a4 as oa, a5 as ia, a6 as la, a7 as Cr, a8 as jt, a9 as ne, aa as pn, ab as ve, ac as xn, ad as Me, ae as nt, af as ca, ag as Be, ah as kr, ai as Ir, aj as Dr, ak as Ve, al as rt, am as da, an as ua, ao as fa, ap as ma, aq as Rt, ar as st, as as At, at as Mt, au as $r, av as Ye, aw as ha, ax as ga, ay as pa, az as Bt, aA as Vt, aB as vn, aC as Ge, aD as Er, aE as yt, aF as zt, aG as xa, aH as Or, aI as va, aJ as Fr, aK as ja, aL as ya, aM as wa, aN as $t, aO as Tr, aP as ba, aQ as _a, aR as Na, aS as Sa, aT as Ca, aU as ka, aV as Ke, aW as Ia, aX as Da, aY as Re, aZ as $a, a_ as Ea, a$ as Gt, b0 as Fn, b1 as Oa, b2 as Fa } from "./nivo-bar.es-B2GqU-tV.js";
|
|
2
|
+
import { b6 as iu, b7 as lu, b4 as cu, b3 as du, b8 as uu, b9 as fu, b5 as mu } from "./nivo-bar.es-B2GqU-tV.js";
|
|
3
3
|
import * as ae from "react";
|
|
4
|
-
import Se, { useCallback as
|
|
5
|
-
import { c as
|
|
4
|
+
import Se, { useCallback as D, useMemo as J, useContext as q, useRef as Z, useEffect as B, useState as F, useId as Ta, Component as La, isValidElement as Tn, Suspense as Ra, useLayoutEffect as Aa } from "react";
|
|
5
|
+
import { c as We, L as Ln } from "./Loading-DiC4Np7v.js";
|
|
6
6
|
import { InteractionType as Ma } from "@azure/msal-browser";
|
|
7
7
|
import { MsalAuthenticationTemplate as Ba } from "@azure/msal-react";
|
|
8
8
|
import { useNavigate as Lr, Link as tt, useParams as Va, generatePath as Et, Navigate as St } from "react-router-dom";
|
|
9
|
-
import { useFormContext as
|
|
9
|
+
import { useFormContext as qe, Controller as jn } from "react-hook-form";
|
|
10
10
|
import { Pivot as za } from "react-flexmonster";
|
|
11
11
|
import { u as yn, a as Rr } from "./useWindowSize-OLYtjFv_.js";
|
|
12
|
-
import { s as wt, l as pt } from "./searchUtils-
|
|
13
|
-
import {
|
|
14
|
-
import { u as Pa, a as Ar, b as Wa, c as Ha, d as Ua } from "./useClipboard-B_wtiBC7.js";
|
|
12
|
+
import { s as wt, l as pt } from "./searchUtils-BhpLdWdC.js";
|
|
13
|
+
import { u as Pa, a as Ar, b as Wa, c as Ha, d as Ua } from "./useClipboard-DegAIBUd.js";
|
|
15
14
|
import Ot from "react-dom";
|
|
16
|
-
import { u as Rn } from "./useGetApiData-
|
|
17
|
-
import { F as Ya } from "./FullScreenContainer-
|
|
18
|
-
const
|
|
19
|
-
const s =
|
|
15
|
+
import { u as Rn } from "./useGetApiData-CTK8sM2X.js";
|
|
16
|
+
import { F as Ya } from "./FullScreenContainer-Ahxfk-Xk.js";
|
|
17
|
+
const xd = ({ fileLoader: e, fileName: t, children: r }) => {
|
|
18
|
+
const s = D(async () => {
|
|
20
19
|
var l, c;
|
|
21
20
|
const a = await e();
|
|
22
21
|
if (!a)
|
|
@@ -25,10 +24,10 @@ const vd = ({ fileLoader: e, fileName: t, children: r }) => {
|
|
|
25
24
|
i.href = o, i.setAttribute("download", t), (l = document.body) == null || l.appendChild(i), i.click(), (c = document.body) == null || c.removeChild(i);
|
|
26
25
|
}, [e, t]);
|
|
27
26
|
return /* @__PURE__ */ n.jsx("div", { role: "button", onClick: s, children: r });
|
|
28
|
-
}, Ga = ({ className: e, ...t }) => /* @__PURE__ */ n.jsxs("div", { className: b("luminus-loading",
|
|
29
|
-
/* @__PURE__ */ n.jsx("div", { className: b("spinner-grow",
|
|
30
|
-
/* @__PURE__ */ n.jsx("div", { className: b("spinner-grow",
|
|
31
|
-
/* @__PURE__ */ n.jsx("div", { className: b("spinner-grow",
|
|
27
|
+
}, Ga = ({ className: e, ...t }) => /* @__PURE__ */ n.jsxs("div", { className: b("luminus-loading", We.loading, We.loadingBlock, We.loadingBlock), ...t, children: [
|
|
28
|
+
/* @__PURE__ */ n.jsx("div", { className: b("spinner-grow", We.spinnerGrow, "text-primary"), role: "status" }),
|
|
29
|
+
/* @__PURE__ */ n.jsx("div", { className: b("spinner-grow", We.spinnerGrow, "text-primary", We.second), role: "status" }),
|
|
30
|
+
/* @__PURE__ */ n.jsx("div", { className: b("spinner-grow", We.spinnerGrow, "text-primary", We.third), role: "status" })
|
|
32
31
|
] });
|
|
33
32
|
function Mr(e, t) {
|
|
34
33
|
const r = je(e);
|
|
@@ -110,17 +109,17 @@ function cn(e, t) {
|
|
|
110
109
|
let o = "", i = "";
|
|
111
110
|
const l = s === "extended" ? "-" : "", c = s === "extended" ? ":" : "";
|
|
112
111
|
if (a !== "time") {
|
|
113
|
-
const d =
|
|
114
|
-
o = `${
|
|
112
|
+
const d = Pe(r.getDate(), 2), u = Pe(r.getMonth() + 1, 2);
|
|
113
|
+
o = `${Pe(r.getFullYear(), 4)}${l}${u}${l}${d}`;
|
|
115
114
|
}
|
|
116
115
|
if (a !== "date") {
|
|
117
116
|
const d = r.getTimezoneOffset();
|
|
118
117
|
if (d !== 0) {
|
|
119
|
-
const h = Math.abs(d),
|
|
120
|
-
i = `${d < 0 ? "+" : "-"}${
|
|
118
|
+
const h = Math.abs(d), x = Pe(Math.trunc(h / 60), 2), j = Pe(h % 60, 2);
|
|
119
|
+
i = `${d < 0 ? "+" : "-"}${x}:${j}`;
|
|
121
120
|
} else
|
|
122
121
|
i = "Z";
|
|
123
|
-
const u =
|
|
122
|
+
const u = Pe(r.getHours(), 2), m = Pe(r.getMinutes(), 2), v = Pe(r.getSeconds(), 2), f = o === "" ? "" : "T", p = [u, m, v].join(c);
|
|
124
123
|
o = `${o}${f}${p}${i}`;
|
|
125
124
|
}
|
|
126
125
|
return o;
|
|
@@ -195,18 +194,18 @@ const no = {
|
|
|
195
194
|
getDimensionValue: f = to,
|
|
196
195
|
...p
|
|
197
196
|
}, h) => {
|
|
198
|
-
const
|
|
199
|
-
I.style[
|
|
200
|
-
}, e), [
|
|
201
|
-
const
|
|
202
|
-
I.style[
|
|
203
|
-
}, t), [
|
|
204
|
-
I.style[
|
|
205
|
-
}, r), [
|
|
206
|
-
I.style[
|
|
207
|
-
}, s), [s, f,
|
|
208
|
-
I.style[
|
|
209
|
-
}, a), [
|
|
197
|
+
const x = typeof l == "function" ? l() : l, j = J(() => gt((I) => {
|
|
198
|
+
I.style[x] = "0";
|
|
199
|
+
}, e), [x, e]), w = J(() => gt((I) => {
|
|
200
|
+
const E = `scroll${x[0].toUpperCase()}${x.slice(1)}`;
|
|
201
|
+
I.style[x] = `${I[E]}px`;
|
|
202
|
+
}, t), [x, t]), y = J(() => gt((I) => {
|
|
203
|
+
I.style[x] = null;
|
|
204
|
+
}, r), [x, r]), g = J(() => gt((I) => {
|
|
205
|
+
I.style[x] = `${f(x, I)}px`, Ws(I);
|
|
206
|
+
}, s), [s, f, x]), N = J(() => gt((I) => {
|
|
207
|
+
I.style[x] = null;
|
|
208
|
+
}, a), [x, a]);
|
|
210
209
|
return /* @__PURE__ */ n.jsx(vr, {
|
|
211
210
|
ref: h,
|
|
212
211
|
addEndListener: jr,
|
|
@@ -215,7 +214,7 @@ const no = {
|
|
|
215
214
|
onEnter: j,
|
|
216
215
|
onEntering: w,
|
|
217
216
|
onEntered: y,
|
|
218
|
-
onExit:
|
|
217
|
+
onExit: g,
|
|
219
218
|
onExiting: N,
|
|
220
219
|
childRef: i.ref,
|
|
221
220
|
in: c,
|
|
@@ -223,9 +222,9 @@ const no = {
|
|
|
223
222
|
mountOnEnter: u,
|
|
224
223
|
unmountOnExit: m,
|
|
225
224
|
appear: v,
|
|
226
|
-
children: (I,
|
|
227
|
-
...
|
|
228
|
-
className: b(o, i.props.className, no[I],
|
|
225
|
+
children: (I, E) => /* @__PURE__ */ Se.cloneElement(i, {
|
|
226
|
+
...E,
|
|
227
|
+
className: b(o, i.props.className, no[I], x === "width" && "collapse-horizontal")
|
|
229
228
|
})
|
|
230
229
|
});
|
|
231
230
|
}), zr = Tt("h4");
|
|
@@ -235,7 +234,7 @@ const Pr = /* @__PURE__ */ ae.forwardRef(({
|
|
|
235
234
|
bsPrefix: t,
|
|
236
235
|
as: r = zr,
|
|
237
236
|
...s
|
|
238
|
-
}, a) => (t =
|
|
237
|
+
}, a) => (t = me(t, "alert-heading"), /* @__PURE__ */ n.jsx(r, {
|
|
239
238
|
ref: a,
|
|
240
239
|
className: b(e, t),
|
|
241
240
|
...s
|
|
@@ -246,7 +245,7 @@ const Wr = /* @__PURE__ */ ae.forwardRef(({
|
|
|
246
245
|
bsPrefix: t,
|
|
247
246
|
as: r = Hs,
|
|
248
247
|
...s
|
|
249
|
-
}, a) => (t =
|
|
248
|
+
}, a) => (t = me(t, "alert-link"), /* @__PURE__ */ n.jsx(r, {
|
|
250
249
|
ref: a,
|
|
251
250
|
className: b(e, t),
|
|
252
251
|
...s
|
|
@@ -267,9 +266,9 @@ const Hr = /* @__PURE__ */ ae.forwardRef((e, t) => {
|
|
|
267
266
|
...v
|
|
268
267
|
} = br(e, {
|
|
269
268
|
show: "onClose"
|
|
270
|
-
}), f =
|
|
269
|
+
}), f = me(r, "alert"), p = Lt((j) => {
|
|
271
270
|
d && d(!1, j);
|
|
272
|
-
}), h = m === !0 ? sn : m,
|
|
271
|
+
}), h = m === !0 ? sn : m, x = /* @__PURE__ */ n.jsxs("div", {
|
|
273
272
|
role: "alert",
|
|
274
273
|
...h ? void 0 : v,
|
|
275
274
|
ref: t,
|
|
@@ -285,8 +284,8 @@ const Hr = /* @__PURE__ */ ae.forwardRef((e, t) => {
|
|
|
285
284
|
...v,
|
|
286
285
|
ref: void 0,
|
|
287
286
|
in: s,
|
|
288
|
-
children:
|
|
289
|
-
}) : s ?
|
|
287
|
+
children: x
|
|
288
|
+
}) : s ? x : null;
|
|
290
289
|
});
|
|
291
290
|
Hr.displayName = "Alert";
|
|
292
291
|
const ro = Object.assign(Hr, {
|
|
@@ -297,7 +296,7 @@ const ro = Object.assign(Hr, {
|
|
|
297
296
|
bsPrefix: t,
|
|
298
297
|
as: r = "div",
|
|
299
298
|
...s
|
|
300
|
-
}, a) => (t =
|
|
299
|
+
}, a) => (t = me(t, "card-body"), /* @__PURE__ */ n.jsx(r, {
|
|
301
300
|
ref: a,
|
|
302
301
|
className: b(e, t),
|
|
303
302
|
...s
|
|
@@ -308,7 +307,7 @@ const Ur = /* @__PURE__ */ ae.forwardRef(({
|
|
|
308
307
|
bsPrefix: t,
|
|
309
308
|
as: r = "div",
|
|
310
309
|
...s
|
|
311
|
-
}, a) => (t =
|
|
310
|
+
}, a) => (t = me(t, "card-footer"), /* @__PURE__ */ n.jsx(r, {
|
|
312
311
|
ref: a,
|
|
313
312
|
className: b(e, t),
|
|
314
313
|
...s
|
|
@@ -323,7 +322,7 @@ const Gr = /* @__PURE__ */ ae.forwardRef(({
|
|
|
323
322
|
as: r = "div",
|
|
324
323
|
...s
|
|
325
324
|
}, a) => {
|
|
326
|
-
const o =
|
|
325
|
+
const o = me(e, "card-header"), i = J(() => ({
|
|
327
326
|
cardHeaderBsPrefix: o
|
|
328
327
|
}), [o]);
|
|
329
328
|
return /* @__PURE__ */ n.jsx(Yr.Provider, {
|
|
@@ -345,7 +344,7 @@ const Kr = /* @__PURE__ */ ae.forwardRef(
|
|
|
345
344
|
as: s = "img",
|
|
346
345
|
...a
|
|
347
346
|
}, o) => {
|
|
348
|
-
const i =
|
|
347
|
+
const i = me(e, "card-img");
|
|
349
348
|
return /* @__PURE__ */ n.jsx(s, {
|
|
350
349
|
ref: o,
|
|
351
350
|
className: b(r ? `${i}-${r}` : i, t),
|
|
@@ -359,7 +358,7 @@ const qr = /* @__PURE__ */ ae.forwardRef(({
|
|
|
359
358
|
bsPrefix: t,
|
|
360
359
|
as: r = "div",
|
|
361
360
|
...s
|
|
362
|
-
}, a) => (t =
|
|
361
|
+
}, a) => (t = me(t, "card-img-overlay"), /* @__PURE__ */ n.jsx(r, {
|
|
363
362
|
ref: a,
|
|
364
363
|
className: b(e, t),
|
|
365
364
|
...s
|
|
@@ -370,7 +369,7 @@ const Qr = /* @__PURE__ */ ae.forwardRef(({
|
|
|
370
369
|
bsPrefix: t,
|
|
371
370
|
as: r = "a",
|
|
372
371
|
...s
|
|
373
|
-
}, a) => (t =
|
|
372
|
+
}, a) => (t = me(t, "card-link"), /* @__PURE__ */ n.jsx(r, {
|
|
374
373
|
ref: a,
|
|
375
374
|
className: b(e, t),
|
|
376
375
|
...s
|
|
@@ -381,7 +380,7 @@ const so = Tt("h6"), Zr = /* @__PURE__ */ ae.forwardRef(({
|
|
|
381
380
|
bsPrefix: t,
|
|
382
381
|
as: r = so,
|
|
383
382
|
...s
|
|
384
|
-
}, a) => (t =
|
|
383
|
+
}, a) => (t = me(t, "card-subtitle"), /* @__PURE__ */ n.jsx(r, {
|
|
385
384
|
ref: a,
|
|
386
385
|
className: b(e, t),
|
|
387
386
|
...s
|
|
@@ -392,7 +391,7 @@ const Jr = /* @__PURE__ */ ae.forwardRef(({
|
|
|
392
391
|
bsPrefix: t,
|
|
393
392
|
as: r = "p",
|
|
394
393
|
...s
|
|
395
|
-
}, a) => (t =
|
|
394
|
+
}, a) => (t = me(t, "card-text"), /* @__PURE__ */ n.jsx(r, {
|
|
396
395
|
ref: a,
|
|
397
396
|
className: b(e, t),
|
|
398
397
|
...s
|
|
@@ -403,7 +402,7 @@ const ao = Tt("h5"), Xr = /* @__PURE__ */ ae.forwardRef(({
|
|
|
403
402
|
bsPrefix: t,
|
|
404
403
|
as: r = ao,
|
|
405
404
|
...s
|
|
406
|
-
}, a) => (t =
|
|
405
|
+
}, a) => (t = me(t, "card-title"), /* @__PURE__ */ n.jsx(r, {
|
|
407
406
|
ref: a,
|
|
408
407
|
className: b(e, t),
|
|
409
408
|
...s
|
|
@@ -421,7 +420,7 @@ const es = /* @__PURE__ */ ae.forwardRef(({
|
|
|
421
420
|
as: l = "div",
|
|
422
421
|
...c
|
|
423
422
|
}, d) => {
|
|
424
|
-
const u =
|
|
423
|
+
const u = me(e, "card");
|
|
425
424
|
return /* @__PURE__ */ n.jsx(l, {
|
|
426
425
|
ref: d,
|
|
427
426
|
...c,
|
|
@@ -447,7 +446,7 @@ const Wn = Object.assign(es, {
|
|
|
447
446
|
bsPrefix: t,
|
|
448
447
|
as: r = "span",
|
|
449
448
|
...s
|
|
450
|
-
}, a) => (t =
|
|
449
|
+
}, a) => (t = me(t, "input-group-text"), /* @__PURE__ */ n.jsx(r, {
|
|
451
450
|
ref: a,
|
|
452
451
|
className: b(e, t),
|
|
453
452
|
...s
|
|
@@ -472,7 +471,7 @@ const oo = (e) => /* @__PURE__ */ n.jsx(Pt, {
|
|
|
472
471
|
as: a = "div",
|
|
473
472
|
...o
|
|
474
473
|
}, i) => {
|
|
475
|
-
e =
|
|
474
|
+
e = me(e, "input-group");
|
|
476
475
|
const l = J(() => ({}), []);
|
|
477
476
|
return /* @__PURE__ */ n.jsx(Ys.Provider, {
|
|
478
477
|
value: l,
|
|
@@ -561,33 +560,33 @@ const Hn = () => {
|
|
|
561
560
|
let v, f;
|
|
562
561
|
m && (o = o || "tablist", a = m.activeKey, v = m.getControlledId, f = m.getControllerId);
|
|
563
562
|
const p = Z(null), h = (y) => {
|
|
564
|
-
const
|
|
565
|
-
if (!
|
|
566
|
-
const N = Zs(
|
|
563
|
+
const g = p.current;
|
|
564
|
+
if (!g) return null;
|
|
565
|
+
const N = Zs(g, `[${Un}]:not([aria-disabled=true])`), I = g.querySelector("[aria-selected=true]");
|
|
567
566
|
if (!I || I !== document.activeElement) return null;
|
|
568
|
-
const
|
|
569
|
-
if (
|
|
570
|
-
let
|
|
571
|
-
return
|
|
572
|
-
},
|
|
573
|
-
y != null && (s == null || s(y,
|
|
567
|
+
const E = N.indexOf(I);
|
|
568
|
+
if (E === -1) return null;
|
|
569
|
+
let S = E + y;
|
|
570
|
+
return S >= N.length && (S = 0), S < 0 && (S = N.length - 1), N[S];
|
|
571
|
+
}, x = (y, g) => {
|
|
572
|
+
y != null && (s == null || s(y, g), u == null || u(y, g));
|
|
574
573
|
}, j = (y) => {
|
|
575
574
|
if (i == null || i(y), !m)
|
|
576
575
|
return;
|
|
577
|
-
let
|
|
576
|
+
let g;
|
|
578
577
|
switch (y.key) {
|
|
579
578
|
case "ArrowLeft":
|
|
580
579
|
case "ArrowUp":
|
|
581
|
-
|
|
580
|
+
g = h(-1);
|
|
582
581
|
break;
|
|
583
582
|
case "ArrowRight":
|
|
584
583
|
case "ArrowDown":
|
|
585
|
-
|
|
584
|
+
g = h(1);
|
|
586
585
|
break;
|
|
587
586
|
default:
|
|
588
587
|
return;
|
|
589
588
|
}
|
|
590
|
-
|
|
589
|
+
g && (y.preventDefault(), x(g.dataset[Qs("EventKey")] || null, y), d.current = !0, c());
|
|
591
590
|
};
|
|
592
591
|
B(() => {
|
|
593
592
|
if (p.current && d.current) {
|
|
@@ -598,7 +597,7 @@ const Hn = () => {
|
|
|
598
597
|
});
|
|
599
598
|
const w = qs(t, p);
|
|
600
599
|
return /* @__PURE__ */ n.jsx(an.Provider, {
|
|
601
|
-
value:
|
|
600
|
+
value: x,
|
|
602
601
|
children: /* @__PURE__ */ n.jsx(Nr.Provider, {
|
|
603
602
|
value: {
|
|
604
603
|
role: o,
|
|
@@ -629,7 +628,7 @@ const mo = Object.assign(as, {
|
|
|
629
628
|
as: l,
|
|
630
629
|
...c
|
|
631
630
|
}, d) => {
|
|
632
|
-
e =
|
|
631
|
+
e = me(e, "list-group-item");
|
|
633
632
|
const [u, m] = rs({
|
|
634
633
|
key: gn(s, c.href),
|
|
635
634
|
active: t,
|
|
@@ -664,7 +663,7 @@ const os = /* @__PURE__ */ ae.forwardRef((e, t) => {
|
|
|
664
663
|
...c
|
|
665
664
|
} = br(e, {
|
|
666
665
|
activeKey: "onSelect"
|
|
667
|
-
}), d =
|
|
666
|
+
}), d = me(s, "list-group");
|
|
668
667
|
let u;
|
|
669
668
|
return o && (u = o === !0 ? "horizontal" : `horizontal-${o}`), process.env.NODE_ENV !== "production" && Sr(!(o && a === "flush"), '`variant="flush"` and `horizontal` should not be used together.'), /* @__PURE__ */ n.jsx(mo, {
|
|
670
669
|
ref: t,
|
|
@@ -737,7 +736,7 @@ const xo = po({
|
|
|
737
736
|
bsPrefix: t,
|
|
738
737
|
as: r = "div",
|
|
739
738
|
...s
|
|
740
|
-
}, a) => (t =
|
|
739
|
+
}, a) => (t = me(t, "offcanvas-body"), /* @__PURE__ */ n.jsx(r, {
|
|
741
740
|
ref: a,
|
|
742
741
|
className: b(e, t),
|
|
743
742
|
...s
|
|
@@ -755,7 +754,7 @@ const vo = {
|
|
|
755
754
|
unmountOnExit: o = !1,
|
|
756
755
|
appear: i = !1,
|
|
757
756
|
...l
|
|
758
|
-
}, c) => (e =
|
|
757
|
+
}, c) => (e = me(e, "offcanvas"), /* @__PURE__ */ n.jsx(vr, {
|
|
759
758
|
ref: c,
|
|
760
759
|
addEndListener: jr,
|
|
761
760
|
in: s,
|
|
@@ -776,7 +775,7 @@ const cs = /* @__PURE__ */ ae.forwardRef(({
|
|
|
776
775
|
closeLabel: r = "Close",
|
|
777
776
|
closeButton: s = !1,
|
|
778
777
|
...a
|
|
779
|
-
}, o) => (e =
|
|
778
|
+
}, o) => (e = me(e, "offcanvas-header"), /* @__PURE__ */ n.jsx(Xs, {
|
|
780
779
|
ref: o,
|
|
781
780
|
...a,
|
|
782
781
|
className: b(t, e),
|
|
@@ -789,7 +788,7 @@ const jo = Tt("h5"), ds = /* @__PURE__ */ ae.forwardRef(({
|
|
|
789
788
|
bsPrefix: t,
|
|
790
789
|
as: r = jo,
|
|
791
790
|
...s
|
|
792
|
-
}, a) => (t =
|
|
791
|
+
}, a) => (t = me(t, "offcanvas-title"), /* @__PURE__ */ n.jsx(r, {
|
|
793
792
|
ref: a,
|
|
794
793
|
className: b(e, t),
|
|
795
794
|
...s
|
|
@@ -823,74 +822,74 @@ const us = /* @__PURE__ */ ae.forwardRef(({
|
|
|
823
822
|
container: f,
|
|
824
823
|
autoFocus: p = !0,
|
|
825
824
|
enforceFocus: h = !0,
|
|
826
|
-
restoreFocus:
|
|
825
|
+
restoreFocus: x = !0,
|
|
827
826
|
restoreFocusOptions: j,
|
|
828
827
|
onEntered: w,
|
|
829
828
|
onExit: y,
|
|
830
|
-
onExiting:
|
|
829
|
+
onExiting: g,
|
|
831
830
|
onEnter: N,
|
|
832
831
|
onEntering: I,
|
|
833
|
-
onExited:
|
|
834
|
-
backdropClassName:
|
|
835
|
-
manager:
|
|
836
|
-
renderStaticNode:
|
|
837
|
-
...
|
|
838
|
-
},
|
|
839
|
-
const
|
|
840
|
-
e =
|
|
841
|
-
const [
|
|
832
|
+
onExited: E,
|
|
833
|
+
backdropClassName: S,
|
|
834
|
+
manager: T,
|
|
835
|
+
renderStaticNode: _ = !1,
|
|
836
|
+
...R
|
|
837
|
+
}, k) => {
|
|
838
|
+
const $ = Z();
|
|
839
|
+
e = me(e, "offcanvas");
|
|
840
|
+
const [L, P] = F(!1), O = Lt(v), A = xo(o || "xs", "up");
|
|
842
841
|
B(() => {
|
|
843
|
-
|
|
844
|
-
}, [i, o,
|
|
845
|
-
const
|
|
846
|
-
onHide:
|
|
847
|
-
}), [
|
|
848
|
-
function
|
|
849
|
-
return
|
|
842
|
+
P(o ? i && !A : i);
|
|
843
|
+
}, [i, o, A]);
|
|
844
|
+
const W = J(() => ({
|
|
845
|
+
onHide: O
|
|
846
|
+
}), [O]);
|
|
847
|
+
function U() {
|
|
848
|
+
return T || (d ? ($.current || ($.current = new na({
|
|
850
849
|
handleContainerOverflow: !1
|
|
851
|
-
})),
|
|
850
|
+
})), $.current) : ra());
|
|
852
851
|
}
|
|
853
|
-
const
|
|
854
|
-
|
|
855
|
-
}, K = (
|
|
856
|
-
|
|
857
|
-
}, ee =
|
|
858
|
-
|
|
859
|
-
className: b(`${e}-backdrop`,
|
|
860
|
-
}), [
|
|
861
|
-
|
|
862
|
-
...
|
|
852
|
+
const H = (C, ...z) => {
|
|
853
|
+
C && (C.style.visibility = "visible"), N == null || N(C, ...z);
|
|
854
|
+
}, K = (C, ...z) => {
|
|
855
|
+
C && (C.style.visibility = ""), E == null || E(...z);
|
|
856
|
+
}, ee = D((C) => /* @__PURE__ */ n.jsx("div", {
|
|
857
|
+
...C,
|
|
858
|
+
className: b(`${e}-backdrop`, S)
|
|
859
|
+
}), [S, e]), le = (C) => /* @__PURE__ */ n.jsx("div", {
|
|
860
|
+
...C,
|
|
861
|
+
...R,
|
|
863
862
|
className: b(t, o ? `${e}-${o}` : e, `${e}-${a}`),
|
|
864
863
|
"aria-labelledby": s,
|
|
865
864
|
children: r
|
|
866
865
|
});
|
|
867
866
|
return /* @__PURE__ */ n.jsxs(n.Fragment, {
|
|
868
|
-
children: [!
|
|
869
|
-
value:
|
|
867
|
+
children: [!L && (o || _) && le({}), /* @__PURE__ */ n.jsx(ea.Provider, {
|
|
868
|
+
value: W,
|
|
870
869
|
children: /* @__PURE__ */ n.jsx(ta, {
|
|
871
|
-
show:
|
|
872
|
-
ref:
|
|
870
|
+
show: L,
|
|
871
|
+
ref: k,
|
|
873
872
|
backdrop: l,
|
|
874
873
|
container: f,
|
|
875
874
|
keyboard: c,
|
|
876
875
|
autoFocus: p,
|
|
877
876
|
enforceFocus: h && !d,
|
|
878
|
-
restoreFocus:
|
|
877
|
+
restoreFocus: x,
|
|
879
878
|
restoreFocusOptions: j,
|
|
880
879
|
onEscapeKeyDown: u,
|
|
881
880
|
onShow: m,
|
|
882
|
-
onHide:
|
|
883
|
-
onEnter:
|
|
881
|
+
onHide: O,
|
|
882
|
+
onEnter: H,
|
|
884
883
|
onEntering: I,
|
|
885
884
|
onEntered: w,
|
|
886
885
|
onExit: y,
|
|
887
|
-
onExiting:
|
|
886
|
+
onExiting: g,
|
|
888
887
|
onExited: K,
|
|
889
|
-
manager:
|
|
888
|
+
manager: U(),
|
|
890
889
|
transition: yo,
|
|
891
890
|
backdropTransition: wo,
|
|
892
891
|
renderBackdrop: ee,
|
|
893
|
-
renderDialog:
|
|
892
|
+
renderDialog: le
|
|
894
893
|
})
|
|
895
894
|
})]
|
|
896
895
|
});
|
|
@@ -908,7 +907,7 @@ function fs({
|
|
|
908
907
|
size: s,
|
|
909
908
|
...a
|
|
910
909
|
}) {
|
|
911
|
-
r =
|
|
910
|
+
r = me(r, "placeholder");
|
|
912
911
|
const [{
|
|
913
912
|
className: o,
|
|
914
913
|
...i
|
|
@@ -939,7 +938,7 @@ const hs = /* @__PURE__ */ ae.forwardRef(({
|
|
|
939
938
|
});
|
|
940
939
|
});
|
|
941
940
|
hs.displayName = "Placeholder";
|
|
942
|
-
const
|
|
941
|
+
const He = Object.assign(hs, {
|
|
943
942
|
Button: ms
|
|
944
943
|
}), Sn = /* @__PURE__ */ ae.forwardRef(({
|
|
945
944
|
bsPrefix: e,
|
|
@@ -951,7 +950,7 @@ const We = Object.assign(hs, {
|
|
|
951
950
|
className: o,
|
|
952
951
|
...i
|
|
953
952
|
}, l) => {
|
|
954
|
-
e =
|
|
953
|
+
e = me(e, "spinner");
|
|
955
954
|
const c = `${e}-${r}`;
|
|
956
955
|
return /* @__PURE__ */ n.jsx(a, {
|
|
957
956
|
ref: l,
|
|
@@ -960,11 +959,11 @@ const We = Object.assign(hs, {
|
|
|
960
959
|
});
|
|
961
960
|
});
|
|
962
961
|
Sn.displayName = "Spinner";
|
|
963
|
-
const
|
|
962
|
+
const vd = ({ heading: e, content: t, placement: r, children: s, trigger: a, popoverClassName: o, ...i }) => /* @__PURE__ */ n.jsx(aa, { placement: r, overlay: /* @__PURE__ */ n.jsxs(Yt, { className: b("luminus-popover", o), onClick: (l) => l.stopPropagation(), children: [
|
|
964
963
|
e && /* @__PURE__ */ n.jsx(Yt.Header, { children: typeof e == "string" ? /* @__PURE__ */ n.jsx(X, { variant: "h6", className: "text-primary", children: e }) : e }),
|
|
965
964
|
/* @__PURE__ */ n.jsx(Yt.Body, { children: t })
|
|
966
965
|
] }), trigger: a ?? "hover", rootClose: !0, show: i.controlled ? i.isOpen : void 0, onToggle: i.controlled ? (l) => i.setIsOpen(l) : void 0, children: s }), bo = ({ children: e, onStorno: t, noSpacer: r }) => {
|
|
967
|
-
const { texts: { formSubmit: s } } = q(
|
|
966
|
+
const { texts: { formSubmit: s } } = q(fe);
|
|
968
967
|
return /* @__PURE__ */ n.jsxs(pc, { noSpacer: r, children: [
|
|
969
968
|
/* @__PURE__ */ n.jsxs(ln, { as: "button", color: "primary", size: "lg", type: "submit", children: [
|
|
970
969
|
/* @__PURE__ */ n.jsx(oa, {}),
|
|
@@ -986,8 +985,8 @@ const jd = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
|
|
|
986
985
|
] }),
|
|
987
986
|
/* @__PURE__ */ n.jsx("input", { id: r, type: "file", accept: s, onChange: d, hidden: !0, multiple: l })
|
|
988
987
|
] });
|
|
989
|
-
},
|
|
990
|
-
const o =
|
|
988
|
+
}, jd = ({ onUpload: e, accept: t, children: r, className: s, size: a = "md" }) => {
|
|
989
|
+
const o = D(async (l) => {
|
|
991
990
|
if (l.target.files)
|
|
992
991
|
try {
|
|
993
992
|
await e(l.target.files);
|
|
@@ -1002,7 +1001,7 @@ const jd = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
|
|
|
1002
1001
|
}, _o = "_select_dlv1t_1", Zt = {
|
|
1003
1002
|
select: _o
|
|
1004
1003
|
}, No = ({ month: e, onChangeMonth: t, locale: r, yearMin: s = 2e3, yearMax: a = 2050 }) => {
|
|
1005
|
-
const o =
|
|
1004
|
+
const o = D((c) => {
|
|
1006
1005
|
const d = Mr(e, c);
|
|
1007
1006
|
d.getFullYear() < s || d.getFullYear() > a || t(d);
|
|
1008
1007
|
}, [e, t, s, a]), i = J(() => {
|
|
@@ -1020,21 +1019,21 @@ const jd = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
|
|
|
1020
1019
|
return u;
|
|
1021
1020
|
}, [r]);
|
|
1022
1021
|
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(
|
|
1024
|
-
/* @__PURE__ */ n.jsx(
|
|
1022
|
+
/* @__PURE__ */ n.jsx(ne, { onClick: () => o(-1), disabled: e.getFullYear() < s || e.getFullYear() === s && e.getMonth() <= 0, children: /* @__PURE__ */ n.jsx(pn, {}) }),
|
|
1023
|
+
/* @__PURE__ */ n.jsx(ve.Select, { value: e.getMonth(), onChange: (c) => {
|
|
1025
1024
|
var d;
|
|
1026
1025
|
return ((d = c.target) == null ? void 0 : d.value) && t(Xa(e, Number(c.target.value)));
|
|
1027
1026
|
}, className: b(Zt.select, Zt.month), children: l.map((c) => /* @__PURE__ */ n.jsx("option", { value: c.id, children: c.name }, c.id)) }),
|
|
1028
|
-
/* @__PURE__ */ n.jsx(
|
|
1027
|
+
/* @__PURE__ */ n.jsx(ve.Select, { value: e.getFullYear(), onChange: (c) => {
|
|
1029
1028
|
var d;
|
|
1030
1029
|
return ((d = c.target) == null ? void 0 : d.value) && t(Br(e, Number(c.target.value)));
|
|
1031
1030
|
}, className: b(Zt.select), children: i.map((c) => /* @__PURE__ */ n.jsx("option", { value: c, children: c }, c)) }),
|
|
1032
|
-
/* @__PURE__ */ n.jsx(
|
|
1031
|
+
/* @__PURE__ */ n.jsx(ne, { onClick: () => o(1), disabled: e.getFullYear() > a || e.getFullYear() === a && e.getMonth() >= 11, children: /* @__PURE__ */ n.jsx(xn, {}) })
|
|
1033
1032
|
] });
|
|
1034
1033
|
}, So = "_select_pywmr_1", Co = {
|
|
1035
1034
|
select: So
|
|
1036
1035
|
}, ko = ({ year: e, onChangeYear: t, optionMin: r = 2e3, optionMax: s = 2050, className: a }) => {
|
|
1037
|
-
const o =
|
|
1036
|
+
const o = D((l) => {
|
|
1038
1037
|
const c = e.getFullYear() + l;
|
|
1039
1038
|
c < r || c > s || t(Ka(e, l));
|
|
1040
1039
|
}, [e, t, s, r]), i = J(() => {
|
|
@@ -1044,12 +1043,12 @@ const jd = ({ heading: e, content: t, placement: r, children: s, trigger: a, pop
|
|
|
1044
1043
|
return l;
|
|
1045
1044
|
}, [r, s]);
|
|
1046
1045
|
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(
|
|
1048
|
-
/* @__PURE__ */ n.jsx(
|
|
1046
|
+
/* @__PURE__ */ n.jsx(ne, { onClick: () => o(-1), disabled: e.getFullYear() <= r, children: /* @__PURE__ */ n.jsx(pn, {}) }),
|
|
1047
|
+
/* @__PURE__ */ n.jsx(ve.Select, { value: e.getFullYear(), onChange: (l) => {
|
|
1049
1048
|
var c;
|
|
1050
1049
|
return ((c = l.target) == null ? void 0 : c.value) && t(Br(e, Number(l.target.value)));
|
|
1051
1050
|
}, className: Co.select, children: i.map((l) => /* @__PURE__ */ n.jsx("option", { value: l, children: l }, l)) }),
|
|
1052
|
-
/* @__PURE__ */ n.jsx(
|
|
1051
|
+
/* @__PURE__ */ n.jsx(ne, { onClick: () => o(1), disabled: e.getFullYear() >= s, children: /* @__PURE__ */ n.jsx(xn, {}) })
|
|
1053
1052
|
] });
|
|
1054
1053
|
};
|
|
1055
1054
|
class Io extends La {
|
|
@@ -1075,75 +1074,75 @@ class Io extends La {
|
|
|
1075
1074
|
...t.props
|
|
1076
1075
|
}, /* @__PURE__ */ n.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
1077
1076
|
...t.props.children,
|
|
1078
|
-
/* @__PURE__ */ n.jsx("div", { className: "d-flex gap-2 justify-content-center", children: /* @__PURE__ */ n.jsx(
|
|
1077
|
+
/* @__PURE__ */ n.jsx("div", { className: "d-flex gap-2 justify-content-center", children: /* @__PURE__ */ n.jsx(Me, { type: "button", onClick: this.reload, children: a.reloadButtonContent }) })
|
|
1079
1078
|
] })) : o === "inject-to-child" && this.state.is404Error && Tn(r) ? Se.cloneElement(r, {
|
|
1080
1079
|
...r.props
|
|
1081
1080
|
}, /* @__PURE__ */ n.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
1082
1081
|
...r.props.children,
|
|
1083
1082
|
/* @__PURE__ */ n.jsxs("div", { className: "d-flex gap-2 justify-content-center", children: [
|
|
1084
|
-
/* @__PURE__ */ n.jsx(
|
|
1085
|
-
/* @__PURE__ */ n.jsx(
|
|
1083
|
+
/* @__PURE__ */ n.jsx(Me, { type: "button", onClick: this.reload, children: a.reloadButtonContent }),
|
|
1084
|
+
/* @__PURE__ */ n.jsx(Me, { type: "button", onClick: this.props.navigateBack, children: a.navigateBackButtonContent })
|
|
1086
1085
|
] })
|
|
1087
1086
|
] })) : /* @__PURE__ */ n.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
1088
1087
|
this.state.is404Error ? r : t,
|
|
1089
1088
|
/* @__PURE__ */ n.jsxs("div", { className: "d-flex gap-2 justify-content-center", children: [
|
|
1090
|
-
o === "none" ? null : /* @__PURE__ */ n.jsx(
|
|
1091
|
-
this.state.is404Error && /* @__PURE__ */ n.jsx(
|
|
1089
|
+
o === "none" ? null : /* @__PURE__ */ n.jsx(Me, { type: "button", onClick: this.reload, children: a.reloadButtonContent }),
|
|
1090
|
+
this.state.is404Error && /* @__PURE__ */ n.jsx(Me, { type: "button", onClick: this.props.navigateBack, children: a.navigateBackButtonContent })
|
|
1092
1091
|
] })
|
|
1093
1092
|
] }) : s;
|
|
1094
1093
|
}
|
|
1095
1094
|
}
|
|
1096
1095
|
const Do = (e) => (r) => {
|
|
1097
|
-
const { texts: { errorBoundary: s } } = q(
|
|
1096
|
+
const { texts: { errorBoundary: s } } = q(fe);
|
|
1098
1097
|
return /* @__PURE__ */ n.jsx(e, { texts: s, ...r });
|
|
1099
1098
|
}, $o = Do(Io), Eo = "_widget-card_e9tsb_1", Oo = {
|
|
1100
1099
|
"widget-card": "_widget-card_e9tsb_1",
|
|
1101
1100
|
widgetCard: Eo
|
|
1102
1101
|
}, Kn = ({ children: e, title: t, headerContent: r }) => /* @__PURE__ */ n.jsx(Al, { className: b(Oo.widgetCard, "luminus-widget"), title: t, headerContent: r, contentClassName: "h-100 overflow-auto", children: e }), Fo = ({ children: e, title: t }) => {
|
|
1103
|
-
const { texts: { widget: r } } = q(
|
|
1102
|
+
const { texts: { widget: r } } = q(fe), s = Lr();
|
|
1104
1103
|
return /* @__PURE__ */ n.jsx($o, { fallback: /* @__PURE__ */ n.jsx(Kn, { title: t, children: r.fallbackError }), reloadButtonDisplay: "inject-to-child", navigateBack: () => s(-1), children: /* @__PURE__ */ n.jsx(Ra, { fallback: /* @__PURE__ */ n.jsx(Kn, { title: t, children: /* @__PURE__ */ n.jsx(Ga, {}) }), children: e }) });
|
|
1105
1104
|
}, ps = ({ currentSelection: e, selectedItemNavigateTo: t, children: r }) => {
|
|
1106
1105
|
if (!e || !e.id || !t)
|
|
1107
1106
|
return /* @__PURE__ */ n.jsx("div", { className: "luminus-input-container position-relative w-100", children: r });
|
|
1108
1107
|
const s = t(e);
|
|
1109
1108
|
return /* @__PURE__ */ n.jsx(tt, { to: s, className: "luminus-input-container position-relative w-100 text-decoration-none", children: r });
|
|
1110
|
-
}, xs = ({ InputContainer: e = nt, label: t, value: r, onChange: s, hidden: a, disabled: o, className: i, type: l, withoutLabel: c, indeterminate: d }) => {
|
|
1111
|
-
const
|
|
1109
|
+
}, xs = ({ InputContainer: e = nt, label: t, value: r, onChange: s, hidden: a, disabled: o, className: i, type: l, withoutLabel: c, indeterminate: d, hint: u }) => {
|
|
1110
|
+
const m = Z(null);
|
|
1112
1111
|
return B(() => {
|
|
1113
|
-
|
|
1114
|
-
}, [
|
|
1115
|
-
var
|
|
1116
|
-
s && s(((
|
|
1112
|
+
m.current && (m.current.indeterminate = d ?? !1);
|
|
1113
|
+
}, [m, d]), /* @__PURE__ */ n.jsx(e, { isForCheckInput: !0, hidden: a, label: t ?? "", withoutLabel: c, className: i, hint: u, children: /* @__PURE__ */ n.jsx(ve.Check, { ref: m, id: `check-${t}`, type: l ?? "checkbox", label: t ?? "", checked: r, onChange: (v) => {
|
|
1114
|
+
var f;
|
|
1115
|
+
s && s(((f = v.target) == null ? void 0 : f.checked) ?? !1);
|
|
1117
1116
|
}, className: i ?? "", hidden: a ?? !1, disabled: o ?? !1 }) });
|
|
1118
|
-
}, it = ({ InputContainer: e = nt, type: t, value: r, onChange: s, debounceMs: a, label: o, withoutLabel: i, placeholder: l, size: c, hidden: d, disabled: u, showClearIcon: m, clearValue: v, list: f, className: p, step: h, minLength:
|
|
1119
|
-
const
|
|
1117
|
+
}, it = ({ InputContainer: e = nt, type: t, value: r, onChange: s, debounceMs: a, label: o, withoutLabel: i, placeholder: l, size: c, hidden: d, disabled: u, showClearIcon: m, clearValue: v, list: f, className: p, step: h, minLength: x, maxLength: j, noSelectOnFocus: w, hint: y }) => {
|
|
1118
|
+
const g = t === "number", N = D(() => {
|
|
1120
1119
|
if (!s)
|
|
1121
1120
|
return;
|
|
1122
|
-
const
|
|
1123
|
-
s(
|
|
1124
|
-
}, [v,
|
|
1125
|
-
const
|
|
1126
|
-
s && (
|
|
1127
|
-
}, [
|
|
1128
|
-
var
|
|
1129
|
-
const
|
|
1121
|
+
const L = v ?? null;
|
|
1122
|
+
s(g ? L ? Number(L) : null : (L == null ? void 0 : L.toString()) ?? "");
|
|
1123
|
+
}, [v, g, s]), I = Z(null), [E, S] = F((r == null ? void 0 : r.toString()) ?? ""), T = D((L) => {
|
|
1124
|
+
const P = L;
|
|
1125
|
+
s && (g && s(P == null || P === "" ? null : Number(P)), s(P || null));
|
|
1126
|
+
}, [g, s]), _ = D((L) => {
|
|
1127
|
+
var O;
|
|
1128
|
+
const P = (O = L.target) == null ? void 0 : O.value;
|
|
1130
1129
|
if (!a) {
|
|
1131
|
-
|
|
1130
|
+
T(P);
|
|
1132
1131
|
return;
|
|
1133
1132
|
}
|
|
1134
|
-
|
|
1135
|
-
|
|
1133
|
+
S(P), I.current !== null && window.clearTimeout(I.current), I.current = window.setTimeout(() => {
|
|
1134
|
+
T(P);
|
|
1136
1135
|
}, a);
|
|
1137
|
-
}, [a,
|
|
1136
|
+
}, [a, T]);
|
|
1138
1137
|
B(() => {
|
|
1139
|
-
|
|
1138
|
+
S(r === null ? "" : r.toString());
|
|
1140
1139
|
}, [r]);
|
|
1141
|
-
const [
|
|
1142
|
-
return /* @__PURE__ */ n.jsxs(e, { withoutLabel: i, label: o ?? "", hidden: d, className: p, children: [
|
|
1143
|
-
/* @__PURE__ */ n.jsx(
|
|
1144
|
-
|
|
1145
|
-
}, onBlur: () =>
|
|
1146
|
-
m && r !== null && s && !u && /* @__PURE__ */ n.jsx("div", { className: `luminus-input-remove-icon ${t !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ n.jsx(
|
|
1140
|
+
const [R, k] = F(!1), $ = ca(t, r ? r.toString() ?? null : null, R);
|
|
1141
|
+
return /* @__PURE__ */ n.jsxs(e, { withoutLabel: i, label: o ?? "", hidden: d, className: p, hint: y, children: [
|
|
1142
|
+
/* @__PURE__ */ n.jsx(ve.Control, { type: $, placeholder: l ?? o, size: c, value: a ? E : (r == null ? void 0 : r.toString()) ?? "", onChange: _, className: p ?? "", hidden: d, disabled: u ?? !1, list: f, onFocus: (L) => {
|
|
1143
|
+
k(!0), !w && L.target.select();
|
|
1144
|
+
}, onBlur: () => k(!1), step: h, minLength: x, maxLength: j }),
|
|
1145
|
+
m && r !== null && s && !u && /* @__PURE__ */ n.jsx("div", { className: `luminus-input-remove-icon ${t !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ n.jsx(ne, { color: "secondary", size: "sm", onClick: N, children: /* @__PURE__ */ n.jsx(Be, {}) }) })
|
|
1147
1146
|
] });
|
|
1148
1147
|
}, Ft = ({
|
|
1149
1148
|
InputContainer: e = nt,
|
|
@@ -1162,139 +1161,140 @@ const Do = (e) => (r) => {
|
|
|
1162
1161
|
noEmptyOption: f,
|
|
1163
1162
|
// it will still add the empty option if there is no value provided or value is empty string or null
|
|
1164
1163
|
appendCurrentSelectionWithName: p,
|
|
1165
|
-
dropdownWidth: h
|
|
1164
|
+
dropdownWidth: h,
|
|
1165
|
+
hint: x
|
|
1166
1166
|
}) => {
|
|
1167
|
-
const { texts: { customSelect:
|
|
1168
|
-
|
|
1169
|
-
}, []),
|
|
1170
|
-
var
|
|
1171
|
-
return
|
|
1172
|
-
}, [v]),
|
|
1173
|
-
const
|
|
1174
|
-
return p !== void 0 && t !== void 0 && t !== null && (
|
|
1175
|
-
id:
|
|
1176
|
-
name:
|
|
1177
|
-
})).filter((
|
|
1178
|
-
}, [r, u,
|
|
1179
|
-
var
|
|
1180
|
-
s && s((
|
|
1181
|
-
}, [s, i]),
|
|
1182
|
-
|
|
1183
|
-
}, [
|
|
1184
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: c, inputContainerClassName: b({ "luminus-dropdown-select-open":
|
|
1185
|
-
/* @__PURE__ */ n.jsxs(
|
|
1186
|
-
|
|
1167
|
+
const { texts: { customSelect: j } } = q(fe), [w, y] = F(!1), [g, N] = F(""), I = D(($) => {
|
|
1168
|
+
N($);
|
|
1169
|
+
}, []), E = J(() => r.find(($) => $.id === t) ?? null, [r, t]), S = D(($) => {
|
|
1170
|
+
var L;
|
|
1171
|
+
return $ === null ? "" : !$.name || $.name.length === 0 ? ((L = $.id) == null ? void 0 : L.toString()) ?? "" : v ? `${$.name} (${$.id})` : $.name;
|
|
1172
|
+
}, [v]), T = J(() => {
|
|
1173
|
+
const $ = r ?? [];
|
|
1174
|
+
return p !== void 0 && t !== void 0 && t !== null && ($.some((L) => L.id === t) || $.push({ id: t, name: p })), $.map((L) => ({
|
|
1175
|
+
id: L.id,
|
|
1176
|
+
name: S(L)
|
|
1177
|
+
})).filter((L) => wt(L.name, g)).sort((L, P) => u ? 0 : (L.name ?? "").localeCompare(P.name ?? ""));
|
|
1178
|
+
}, [r, u, g, S, p, t]), _ = D(($) => {
|
|
1179
|
+
var L;
|
|
1180
|
+
s && s(($ == null ? void 0 : $.id) === void 0 || ($ == null ? void 0 : $.id) === null ? null : i ? Number($.id) : (L = $.id) == null ? void 0 : L.toString());
|
|
1181
|
+
}, [s, i]), R = D(($) => {
|
|
1182
|
+
y(!1), _($);
|
|
1183
|
+
}, [_]), k = Z(null);
|
|
1184
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: c, inputContainerClassName: b({ "luminus-dropdown-select-open": w }), className: m, hint: x, children: [
|
|
1185
|
+
/* @__PURE__ */ n.jsxs(ve.Select, { ref: k, size: l, value: t ?? "", onMouseDown: ($) => {
|
|
1186
|
+
$.currentTarget.focus(), $.preventDefault();
|
|
1187
1187
|
}, onClick: () => {
|
|
1188
|
-
!d &&
|
|
1188
|
+
!d && y(!0);
|
|
1189
1189
|
}, className: b("w-100", {
|
|
1190
1190
|
"luminus-dropdown-picker-disabled": d
|
|
1191
1191
|
}), hidden: c, children: [
|
|
1192
1192
|
f && !(t == null || t === "") ? void 0 : /* @__PURE__ */ n.jsx("option", { value: "" }),
|
|
1193
|
-
t != null && /* @__PURE__ */ n.jsx("option", { value: t, children:
|
|
1193
|
+
t != null && /* @__PURE__ */ n.jsx("option", { value: t, children: S(E) })
|
|
1194
1194
|
] }),
|
|
1195
|
-
|
|
1195
|
+
k.current && /* @__PURE__ */ n.jsx(Ht, { show: w, onCancel: () => y(!1), items: T, currentSelection: E ?? null, onSelectionChange: R, onSearchQueryChange: I, texts: j, disabled: d, inputRef: k, autoHideSearch: !0, allItemsLength: r.length, itemsNameWidth: h })
|
|
1196
1196
|
] }) });
|
|
1197
|
-
},
|
|
1198
|
-
const [
|
|
1199
|
-
l && l(
|
|
1200
|
-
}, [l]),
|
|
1201
|
-
|
|
1202
|
-
}, [
|
|
1203
|
-
var
|
|
1204
|
-
return h ? ((
|
|
1197
|
+
}, yd = ({ InputContainer: e = nt, items: t, selectedItemNavigateTo: r, onSearchQueryChange: s, texts: a, isLoading: o, value: i, onSelect: l, label: c, withoutLabel: d, size: u, dropdownItemsNameWidth: m, additionalColumns: v, hidden: f, disabled: p, displayIdAsName: h, CustomOnChangeComponent: x, className: j, archiveColumn: w, icon: y, hint: g }) => {
|
|
1198
|
+
const [N, I] = F(!1), E = D(($) => {
|
|
1199
|
+
l && l($);
|
|
1200
|
+
}, [l]), S = D(($) => {
|
|
1201
|
+
I(!1), E($);
|
|
1202
|
+
}, [E]), T = Z(null), _ = r !== void 0, R = _ && i !== null, k = J(() => {
|
|
1203
|
+
var $, L;
|
|
1204
|
+
return h ? (($ = i == null ? void 0 : i.id) == null ? void 0 : $.toString()) ?? "" : i != null && i.name && i.name.length > 0 ? i.name : ((L = i == null ? void 0 : i.id) == null ? void 0 : L.toString()) ?? "";
|
|
1205
1205
|
}, [i, h]);
|
|
1206
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: d, label: c ?? "", hidden: f, inputContainerClassName: b({ "luminus-dropdown-select-open":
|
|
1206
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: d, label: c ?? "", hidden: f, inputContainerClassName: b({ "luminus-dropdown-select-open": N }), className: j, hint: g, children: [
|
|
1207
1207
|
/* @__PURE__ */ n.jsxs(ps, { currentSelection: i, selectedItemNavigateTo: r, children: [
|
|
1208
1208
|
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 }),
|
|
1209
1209
|
/* @__PURE__ */ n.jsxs(
|
|
1210
|
-
|
|
1210
|
+
ve.Select,
|
|
1211
1211
|
{
|
|
1212
|
-
ref:
|
|
1212
|
+
ref: T,
|
|
1213
1213
|
size: u,
|
|
1214
1214
|
value: (i == null ? void 0 : i.id) ?? "",
|
|
1215
|
-
onMouseDown: (
|
|
1216
|
-
|
|
1215
|
+
onMouseDown: ($) => {
|
|
1216
|
+
$.currentTarget.focus(), $.preventDefault();
|
|
1217
1217
|
},
|
|
1218
1218
|
onClick: () => {
|
|
1219
|
-
!
|
|
1219
|
+
!_ && !p && I(!0);
|
|
1220
1220
|
},
|
|
1221
1221
|
className: b("w-100", {
|
|
1222
1222
|
"luminus-dropdown-picker-disabled": p,
|
|
1223
|
-
"luminus-dropdown-picker-link":
|
|
1223
|
+
"luminus-dropdown-picker-link": R
|
|
1224
1224
|
}),
|
|
1225
1225
|
hidden: f,
|
|
1226
1226
|
children: [
|
|
1227
1227
|
/* @__PURE__ */ n.jsx("option", { value: "" }),
|
|
1228
|
-
i && /* @__PURE__ */ n.jsx("option", { value: i.id ?? void 0, children:
|
|
1228
|
+
i && /* @__PURE__ */ n.jsx("option", { value: i.id ?? void 0, children: k })
|
|
1229
1229
|
]
|
|
1230
1230
|
}
|
|
1231
1231
|
),
|
|
1232
|
-
|
|
1233
|
-
!
|
|
1234
|
-
|
|
1232
|
+
x || !p && _ ? /* @__PURE__ */ n.jsxs("div", { className: "custom-picker-button", children: [
|
|
1233
|
+
!x && !p && _ && /* @__PURE__ */ n.jsx(ne, { size: "sm", color: "secondary", onClick: ($) => {
|
|
1234
|
+
$.preventDefault(), $.stopPropagation(), I(!0);
|
|
1235
1235
|
}, children: y ?? /* @__PURE__ */ n.jsx(kr, {}) }),
|
|
1236
|
-
|
|
1236
|
+
x ?? null
|
|
1237
1237
|
] }) : null
|
|
1238
1238
|
] }),
|
|
1239
|
-
|
|
1239
|
+
T.current && /* @__PURE__ */ n.jsx(Ht, { show: N, onCancel: () => I(!1), items: t, currentSelection: i, onSelectionChange: S, onSearchQueryChange: s, texts: a, itemsNameWidth: m, additionalColumns: v, isLoading: o, disabled: p, inputRef: T, archiveColumn: w, displayIdAsName: h })
|
|
1240
1240
|
] }) });
|
|
1241
|
-
},
|
|
1242
|
-
const
|
|
1241
|
+
}, wd = ({ InputContainer: e = nt, value: t, onChange: r, label: s, size: a, showClearIcon: o, clearValue: i, hidden: l, disabled: c, rows: d, withoutLabel: u, debounceMs: m, minLength: v, maxLength: f, className: p, hint: h }) => {
|
|
1242
|
+
const x = D(() => {
|
|
1243
1243
|
if (!r)
|
|
1244
1244
|
return;
|
|
1245
|
-
const
|
|
1246
|
-
r((
|
|
1247
|
-
}, [i, r]),
|
|
1248
|
-
const
|
|
1249
|
-
r && r(
|
|
1250
|
-
}, [r]),
|
|
1251
|
-
var
|
|
1252
|
-
const
|
|
1245
|
+
const I = i ?? null;
|
|
1246
|
+
r((I == null ? void 0 : I.toString()) ?? "");
|
|
1247
|
+
}, [i, r]), j = Z(null), [w, y] = F((t == null ? void 0 : t.toString()) ?? ""), g = D((I) => {
|
|
1248
|
+
const E = I;
|
|
1249
|
+
r && r(E || null);
|
|
1250
|
+
}, [r]), N = D((I) => {
|
|
1251
|
+
var S;
|
|
1252
|
+
const E = (S = I.target) == null ? void 0 : S.value;
|
|
1253
1253
|
if (!m) {
|
|
1254
|
-
|
|
1254
|
+
g(E);
|
|
1255
1255
|
return;
|
|
1256
1256
|
}
|
|
1257
|
-
|
|
1258
|
-
|
|
1257
|
+
y(E), j.current !== null && window.clearTimeout(j.current), j.current = window.setTimeout(() => {
|
|
1258
|
+
g(E);
|
|
1259
1259
|
}, m);
|
|
1260
|
-
}, [m,
|
|
1260
|
+
}, [m, g]);
|
|
1261
1261
|
return B(() => {
|
|
1262
|
-
|
|
1263
|
-
}, [t]), /* @__PURE__ */ n.jsxs(e, { label: s ?? "", hidden: l, withoutLabel: u, className: p, isForTextAreaInput: !0, children: [
|
|
1264
|
-
/* @__PURE__ */ n.jsx(
|
|
1265
|
-
o && t && r && !c && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(
|
|
1262
|
+
y(t === null ? "" : t.toString());
|
|
1263
|
+
}, [t]), /* @__PURE__ */ n.jsxs(e, { label: s ?? "", hidden: l, withoutLabel: u, className: p, isForTextAreaInput: !0, hint: h, children: [
|
|
1264
|
+
/* @__PURE__ */ n.jsx(ve.Control, { as: "textarea", size: a, value: m ? w : t ?? "", onChange: N, hidden: l, disabled: c, rows: d ?? 2, className: "w-100", minLength: v, maxLength: f }),
|
|
1265
|
+
o && t && r && !c && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(ne, { color: "secondary", size: "sm", onClick: x, children: /* @__PURE__ */ n.jsx(Be, {}) }) })
|
|
1266
1266
|
] });
|
|
1267
|
-
},
|
|
1268
|
-
const
|
|
1267
|
+
}, bd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size: l, hidden: c, disabled: d, showClearIcon: u, clearValue: m, className: v, step: f, stepperStep: p = 1, min: h, max: x, hint: j }) => {
|
|
1268
|
+
const w = D(() => {
|
|
1269
1269
|
if (!r)
|
|
1270
1270
|
return;
|
|
1271
|
-
const
|
|
1272
|
-
r(
|
|
1273
|
-
}, [m, r]),
|
|
1274
|
-
const
|
|
1275
|
-
r && r(
|
|
1276
|
-
}, [
|
|
1277
|
-
var
|
|
1278
|
-
const
|
|
1271
|
+
const S = m ?? null;
|
|
1272
|
+
r(S ? Number(S) : null);
|
|
1273
|
+
}, [m, r]), y = Z(null), [g, N] = F((t == null ? void 0 : t.toString()) ?? ""), I = D((S) => {
|
|
1274
|
+
const T = S;
|
|
1275
|
+
r && r(T == null || T === "" ? null : pt(Number(T), h, x));
|
|
1276
|
+
}, [x, h, r]), E = D((S) => {
|
|
1277
|
+
var _;
|
|
1278
|
+
const T = (_ = S.target) == null ? void 0 : _.value;
|
|
1279
1279
|
if (!s) {
|
|
1280
|
-
|
|
1280
|
+
I(T);
|
|
1281
1281
|
return;
|
|
1282
1282
|
}
|
|
1283
|
-
|
|
1284
|
-
|
|
1283
|
+
N(pt(Number(T), h, x).toString()), y.current !== null && window.clearTimeout(y.current), y.current = window.setTimeout(() => {
|
|
1284
|
+
I(T);
|
|
1285
1285
|
}, s);
|
|
1286
|
-
}, [s,
|
|
1286
|
+
}, [s, I, x, h]);
|
|
1287
1287
|
return B(() => {
|
|
1288
|
-
|
|
1289
|
-
}, [
|
|
1290
|
-
/* @__PURE__ */ n.jsx(
|
|
1291
|
-
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ n.jsx(
|
|
1292
|
-
|
|
1288
|
+
N(t === null ? "" : pt(t, h, x).toString());
|
|
1289
|
+
}, [x, h, t]), /* @__PURE__ */ n.jsx(e, { withoutLabel: o, label: a ?? "", hidden: c, hint: j, className: v, children: /* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
1290
|
+
/* @__PURE__ */ n.jsx(ve.Control, { type: "number", placeholder: i ?? a, size: l, value: s ? g : t ?? "", onChange: E, className: `luminus-numeric-stepper ${v ?? ""}`, hidden: c, disabled: d ?? !1, step: f }),
|
|
1291
|
+
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ n.jsx(ne, { size: "sm", onClick: (S) => {
|
|
1292
|
+
S.preventDefault(), S.stopPropagation(), I(((t ?? 0) - p).toString());
|
|
1293
1293
|
}, children: /* @__PURE__ */ n.jsx(Ir, {}) }) }),
|
|
1294
|
-
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ n.jsx(
|
|
1295
|
-
|
|
1294
|
+
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ n.jsx(ne, { size: "sm", onClick: (S) => {
|
|
1295
|
+
S.preventDefault(), S.stopPropagation(), I(((t ?? 0) + p).toString());
|
|
1296
1296
|
}, children: /* @__PURE__ */ n.jsx(Dr, {}) }) }),
|
|
1297
|
-
u && t && r && !d && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(
|
|
1297
|
+
u && t && r && !d && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(ne, { color: "secondary", size: "sm", onClick: w, children: /* @__PURE__ */ n.jsx(Be, {}) }) })
|
|
1298
1298
|
] }) });
|
|
1299
1299
|
};
|
|
1300
1300
|
function vs(e, t) {
|
|
@@ -1310,7 +1310,7 @@ var bt;
|
|
|
1310
1310
|
(function(e) {
|
|
1311
1311
|
e.event = "event", e.props = "prop";
|
|
1312
1312
|
})(bt || (bt = {}));
|
|
1313
|
-
function
|
|
1313
|
+
function Ue() {
|
|
1314
1314
|
}
|
|
1315
1315
|
function To(e) {
|
|
1316
1316
|
var t, r = void 0;
|
|
@@ -1402,8 +1402,8 @@ function Qn(e, t, r) {
|
|
|
1402
1402
|
if (["", "-"].indexOf(e) !== -1)
|
|
1403
1403
|
return e;
|
|
1404
1404
|
var s = (e.indexOf(".") !== -1 || r) && t, a = Cn(e), o = a.beforeDecimal, i = a.afterDecimal, l = a.hasNegation, c = parseFloat("0." + (i || "0")), d = i.length <= t ? "0." + i : c.toFixed(t), u = d.split("."), m = o;
|
|
1405
|
-
o && Number(u[0]) && (m = o.split("").reverse().reduce(function(h,
|
|
1406
|
-
return h.length > j ? (Number(h[0]) + Number(
|
|
1405
|
+
o && Number(u[0]) && (m = o.split("").reverse().reduce(function(h, x, j) {
|
|
1406
|
+
return h.length > j ? (Number(h[0]) + Number(x)).toString() + h.substring(1, h.length) : x + h;
|
|
1407
1407
|
}, u[0]));
|
|
1408
1408
|
var v = ws(u[1] || "", t, r), f = l ? "-" : "", p = s ? "." : "";
|
|
1409
1409
|
return "" + f + m + p + v;
|
|
@@ -1461,21 +1461,21 @@ function Ho(e) {
|
|
|
1461
1461
|
}
|
|
1462
1462
|
function Uo(e, t, r, s, a, o, i) {
|
|
1463
1463
|
i === void 0 && (i = Ho);
|
|
1464
|
-
var l = a.findIndex(function(
|
|
1465
|
-
return
|
|
1464
|
+
var l = a.findIndex(function(g) {
|
|
1465
|
+
return g;
|
|
1466
1466
|
}), c = e.slice(0, l);
|
|
1467
1467
|
!t && !r.startsWith(c) && (t = c, r = c + r, s = s + c.length);
|
|
1468
1468
|
for (var d = r.length, u = e.length, m = {}, v = new Array(d), f = 0; f < d; f++) {
|
|
1469
1469
|
v[f] = -1;
|
|
1470
1470
|
for (var p = 0, h = u; p < h; p++) {
|
|
1471
|
-
var
|
|
1471
|
+
var x = i({
|
|
1472
1472
|
currentValue: r,
|
|
1473
1473
|
lastValue: t,
|
|
1474
1474
|
formattedValue: e,
|
|
1475
1475
|
currentValueIndex: f,
|
|
1476
1476
|
formattedValueIndex: p
|
|
1477
1477
|
});
|
|
1478
|
-
if (
|
|
1478
|
+
if (x && m[p] !== !0) {
|
|
1479
1479
|
v[f] = p, m[p] = !0;
|
|
1480
1480
|
break;
|
|
1481
1481
|
}
|
|
@@ -1510,10 +1510,10 @@ function Yo(e) {
|
|
|
1510
1510
|
return t;
|
|
1511
1511
|
}
|
|
1512
1512
|
function Ns(e, t, r, s, a, o) {
|
|
1513
|
-
o === void 0 && (o =
|
|
1513
|
+
o === void 0 && (o = Ue);
|
|
1514
1514
|
var i = Mo(function(p, h) {
|
|
1515
|
-
var
|
|
1516
|
-
return js(p) ? (j = "",
|
|
1515
|
+
var x, j;
|
|
1516
|
+
return js(p) ? (j = "", x = "") : typeof p == "number" || h ? (j = typeof p == "number" ? bs(p) : p, x = s(j)) : (j = a(p, void 0), x = s(j)), { formattedValue: x, numAsString: j };
|
|
1517
1517
|
}), l = F(function() {
|
|
1518
1518
|
return i(lt(e) ? t : e, r);
|
|
1519
1519
|
}), c = l[0], d = l[1], u = function(p, h) {
|
|
@@ -1544,143 +1544,143 @@ function qo(e) {
|
|
|
1544
1544
|
var l = e.removeFormatting;
|
|
1545
1545
|
l === void 0 && (l = Go);
|
|
1546
1546
|
var c = e.defaultValue, d = e.valueIsNumericString, u = e.onValueChange, m = e.isAllowed, v = e.onChange;
|
|
1547
|
-
v === void 0 && (v =
|
|
1547
|
+
v === void 0 && (v = Ue);
|
|
1548
1548
|
var f = e.onKeyDown;
|
|
1549
|
-
f === void 0 && (f =
|
|
1549
|
+
f === void 0 && (f = Ue);
|
|
1550
1550
|
var p = e.onMouseUp;
|
|
1551
|
-
p === void 0 && (p =
|
|
1551
|
+
p === void 0 && (p = Ue);
|
|
1552
1552
|
var h = e.onFocus;
|
|
1553
|
-
h === void 0 && (h =
|
|
1554
|
-
var
|
|
1555
|
-
|
|
1553
|
+
h === void 0 && (h = Ue);
|
|
1554
|
+
var x = e.onBlur;
|
|
1555
|
+
x === void 0 && (x = Ue);
|
|
1556
1556
|
var j = e.value, w = e.getCaretBoundary;
|
|
1557
1557
|
w === void 0 && (w = Yo);
|
|
1558
1558
|
var y = e.isValidInputCharacter;
|
|
1559
1559
|
y === void 0 && (y = _t);
|
|
1560
|
-
var
|
|
1561
|
-
|
|
1562
|
-
},
|
|
1560
|
+
var g = e.isCharacterSame, N = vs(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), I = Ns(j, c, !!d, i, l, u), E = I[0], S = E.formattedValue, T = E.numAsString, _ = I[1], R = Z(), k = Z({ formattedValue: S, numAsString: T }), $ = function(M, V) {
|
|
1561
|
+
k.current = { formattedValue: M.formattedValue, numAsString: M.value }, _(M, V);
|
|
1562
|
+
}, L = F(!1), P = L[0], O = L[1], A = Z(null), W = Z({
|
|
1563
1563
|
setCaretTimeout: null,
|
|
1564
1564
|
focusTimeout: null
|
|
1565
1565
|
});
|
|
1566
1566
|
B(function() {
|
|
1567
|
-
return
|
|
1568
|
-
clearTimeout(
|
|
1567
|
+
return O(!0), function() {
|
|
1568
|
+
clearTimeout(W.current.setCaretTimeout), clearTimeout(W.current.focusTimeout);
|
|
1569
1569
|
};
|
|
1570
1570
|
}, []);
|
|
1571
|
-
var
|
|
1571
|
+
var U = i, H = function(M, V) {
|
|
1572
1572
|
var Q = parseFloat(V);
|
|
1573
1573
|
return {
|
|
1574
|
-
formattedValue:
|
|
1574
|
+
formattedValue: M,
|
|
1575
1575
|
value: V,
|
|
1576
1576
|
floatValue: isNaN(Q) ? void 0 : Q
|
|
1577
1577
|
};
|
|
1578
|
-
}, K = function(
|
|
1579
|
-
|
|
1580
|
-
|
|
1578
|
+
}, K = function(M, V, Q) {
|
|
1579
|
+
M.selectionStart === 0 && M.selectionEnd === M.value.length || (et(M, V), W.current.setCaretTimeout = setTimeout(function() {
|
|
1580
|
+
M.value === Q && M.selectionStart !== V && et(M, V);
|
|
1581
1581
|
}, 0));
|
|
1582
|
-
}, ee = function(
|
|
1583
|
-
return Zn(
|
|
1584
|
-
},
|
|
1585
|
-
var
|
|
1586
|
-
return _e = Zn(V, _e,
|
|
1587
|
-
},
|
|
1588
|
-
var V =
|
|
1582
|
+
}, ee = function(M, V, Q) {
|
|
1583
|
+
return Zn(M, V, w(M), Q);
|
|
1584
|
+
}, le = function(M, V, Q) {
|
|
1585
|
+
var ce = w(V), _e = Uo(V, S, M, Q, ce, y, g);
|
|
1586
|
+
return _e = Zn(V, _e, ce), _e;
|
|
1587
|
+
}, C = function(M) {
|
|
1588
|
+
var V = M.formattedValue;
|
|
1589
1589
|
V === void 0 && (V = "");
|
|
1590
|
-
var Q =
|
|
1590
|
+
var Q = M.input, ce = M.source, _e = M.event, de = M.numAsString, se;
|
|
1591
1591
|
if (Q) {
|
|
1592
|
-
var
|
|
1593
|
-
Q.value = V, se =
|
|
1592
|
+
var Ce = M.inputValue || Q.value, $e = Jt(Q);
|
|
1593
|
+
Q.value = V, se = le(Ce, V, $e), se !== void 0 && K(Q, se, V);
|
|
1594
1594
|
}
|
|
1595
|
-
V !==
|
|
1595
|
+
V !== S && $(H(V, de), { event: _e, source: ce });
|
|
1596
1596
|
};
|
|
1597
1597
|
B(function() {
|
|
1598
|
-
var
|
|
1599
|
-
(
|
|
1598
|
+
var M = k.current, V = M.formattedValue, Q = M.numAsString;
|
|
1599
|
+
(S !== V || T !== Q) && $(H(S, T), {
|
|
1600
1600
|
event: void 0,
|
|
1601
1601
|
source: bt.props
|
|
1602
1602
|
});
|
|
1603
|
-
}, [
|
|
1604
|
-
var
|
|
1605
|
-
|
|
1606
|
-
var
|
|
1607
|
-
if (
|
|
1608
|
-
var V =
|
|
1609
|
-
|
|
1603
|
+
}, [S, T]);
|
|
1604
|
+
var z = A.current ? Jt(A.current) : void 0, re = typeof window < "u" ? Aa : B;
|
|
1605
|
+
re(function() {
|
|
1606
|
+
var M = A.current;
|
|
1607
|
+
if (S !== k.current.formattedValue && M) {
|
|
1608
|
+
var V = le(k.current.formattedValue, S, z);
|
|
1609
|
+
M.value = S, K(M, V, S);
|
|
1610
1610
|
}
|
|
1611
|
-
}, [
|
|
1612
|
-
var
|
|
1613
|
-
var
|
|
1614
|
-
if (se = l(
|
|
1615
|
-
var
|
|
1616
|
-
return
|
|
1611
|
+
}, [S]);
|
|
1612
|
+
var Oe = function(M, V, Q) {
|
|
1613
|
+
var ce = V.target, _e = R.current ? Vo(R.current, ce.selectionEnd) : _s(S, M), de = Object.assign(Object.assign({}, _e), { lastValue: S }), se = l(M, de), Ce = U(se);
|
|
1614
|
+
if (se = l(Ce, void 0), m && !m(H(Ce, se))) {
|
|
1615
|
+
var $e = V.target, Ee = Jt($e), G = le(M, S, Ee);
|
|
1616
|
+
return $e.value = S, K($e, G, S), !1;
|
|
1617
1617
|
}
|
|
1618
|
-
return
|
|
1619
|
-
formattedValue:
|
|
1618
|
+
return C({
|
|
1619
|
+
formattedValue: Ce,
|
|
1620
1620
|
numAsString: se,
|
|
1621
|
-
inputValue:
|
|
1621
|
+
inputValue: M,
|
|
1622
1622
|
event: V,
|
|
1623
1623
|
source: Q,
|
|
1624
1624
|
input: V.target
|
|
1625
1625
|
}), !0;
|
|
1626
|
-
},
|
|
1626
|
+
}, he = function(M, V) {
|
|
1627
1627
|
V === void 0 && (V = 0);
|
|
1628
|
-
var Q =
|
|
1629
|
-
|
|
1630
|
-
},
|
|
1631
|
-
var V =
|
|
1632
|
-
|
|
1633
|
-
},
|
|
1634
|
-
var V =
|
|
1635
|
-
|
|
1628
|
+
var Q = M.selectionStart, ce = M.selectionEnd;
|
|
1629
|
+
R.current = { selectionStart: Q, selectionEnd: ce + V };
|
|
1630
|
+
}, Fe = function(M) {
|
|
1631
|
+
var V = M.target, Q = V.value, ce = Oe(Q, M, bt.event);
|
|
1632
|
+
ce && v(M), R.current = void 0;
|
|
1633
|
+
}, te = function(M) {
|
|
1634
|
+
var V = M.target, Q = M.key, ce = V.selectionStart, _e = V.selectionEnd, de = V.value;
|
|
1635
|
+
de === void 0 && (de = "");
|
|
1636
1636
|
var se;
|
|
1637
|
-
Q === "ArrowLeft" || Q === "Backspace" ? se = Math.max(
|
|
1638
|
-
var
|
|
1639
|
-
Q === "Delete" &&
|
|
1640
|
-
var
|
|
1641
|
-
if (se === void 0 ||
|
|
1642
|
-
f(
|
|
1637
|
+
Q === "ArrowLeft" || Q === "Backspace" ? se = Math.max(ce - 1, 0) : Q === "ArrowRight" ? se = Math.min(ce + 1, de.length) : Q === "Delete" && (se = ce);
|
|
1638
|
+
var Ce = 0;
|
|
1639
|
+
Q === "Delete" && ce === _e && (Ce = 1);
|
|
1640
|
+
var $e = Q === "ArrowLeft" || Q === "ArrowRight";
|
|
1641
|
+
if (se === void 0 || ce !== _e && !$e) {
|
|
1642
|
+
f(M), he(V, Ce);
|
|
1643
1643
|
return;
|
|
1644
1644
|
}
|
|
1645
|
-
var
|
|
1646
|
-
if (
|
|
1647
|
-
var
|
|
1648
|
-
|
|
1649
|
-
} else Q === "Delete" && !y(
|
|
1650
|
-
|
|
1651
|
-
},
|
|
1652
|
-
var V =
|
|
1653
|
-
var
|
|
1654
|
-
if (
|
|
1655
|
-
var se = ee(
|
|
1656
|
-
se !==
|
|
1645
|
+
var Ee = se;
|
|
1646
|
+
if ($e) {
|
|
1647
|
+
var G = Q === "ArrowLeft" ? "left" : "right";
|
|
1648
|
+
Ee = ee(de, se, G), Ee !== se && M.preventDefault();
|
|
1649
|
+
} else Q === "Delete" && !y(de[se]) ? Ee = ee(de, se, "right") : Q === "Backspace" && !y(de[se]) && (Ee = ee(de, se, "left"));
|
|
1650
|
+
Ee !== se && K(V, Ee, de), f(M), he(V, Ce);
|
|
1651
|
+
}, Ne = function(M) {
|
|
1652
|
+
var V = M.target, Q = function() {
|
|
1653
|
+
var ce = V.selectionStart, _e = V.selectionEnd, de = V.value;
|
|
1654
|
+
if (de === void 0 && (de = ""), ce === _e) {
|
|
1655
|
+
var se = ee(de, ce);
|
|
1656
|
+
se !== ce && K(V, se, de);
|
|
1657
1657
|
}
|
|
1658
1658
|
};
|
|
1659
1659
|
Q(), requestAnimationFrame(function() {
|
|
1660
1660
|
Q();
|
|
1661
|
-
}), p(
|
|
1662
|
-
},
|
|
1663
|
-
|
|
1664
|
-
var V =
|
|
1665
|
-
|
|
1666
|
-
var
|
|
1667
|
-
|
|
1668
|
-
var se = ee(
|
|
1669
|
-
se !==
|
|
1661
|
+
}), p(M), he(V);
|
|
1662
|
+
}, De = function(M) {
|
|
1663
|
+
M.persist && M.persist();
|
|
1664
|
+
var V = M.target, Q = M.currentTarget;
|
|
1665
|
+
A.current = V, W.current.focusTimeout = setTimeout(function() {
|
|
1666
|
+
var ce = V.selectionStart, _e = V.selectionEnd, de = V.value;
|
|
1667
|
+
de === void 0 && (de = "");
|
|
1668
|
+
var se = ee(de, ce);
|
|
1669
|
+
se !== ce && !(ce === 0 && _e === de.length) && K(V, se, de), h(Object.assign(Object.assign({}, M), { currentTarget: Q }));
|
|
1670
1670
|
}, 0);
|
|
1671
|
-
},
|
|
1672
|
-
|
|
1673
|
-
},
|
|
1671
|
+
}, Y = function(M) {
|
|
1672
|
+
A.current = null, clearTimeout(W.current.focusTimeout), clearTimeout(W.current.setCaretTimeout), x(M);
|
|
1673
|
+
}, ge = P && Po() ? "numeric" : void 0, we = Object.assign({ inputMode: ge }, N, {
|
|
1674
1674
|
type: t,
|
|
1675
|
-
value:
|
|
1676
|
-
onChange:
|
|
1677
|
-
onKeyDown:
|
|
1678
|
-
onMouseUp:
|
|
1679
|
-
onFocus:
|
|
1680
|
-
onBlur:
|
|
1675
|
+
value: S,
|
|
1676
|
+
onChange: Fe,
|
|
1677
|
+
onKeyDown: te,
|
|
1678
|
+
onMouseUp: Ne,
|
|
1679
|
+
onFocus: De,
|
|
1680
|
+
onBlur: Y
|
|
1681
1681
|
});
|
|
1682
1682
|
if (r === "text")
|
|
1683
|
-
return a ? Se.createElement(Se.Fragment, null, a(
|
|
1683
|
+
return a ? Se.createElement(Se.Fragment, null, a(S, N) || null) : Se.createElement("span", Object.assign({}, N, { ref: o }), S);
|
|
1684
1684
|
if (s) {
|
|
1685
1685
|
var at = s;
|
|
1686
1686
|
return Se.createElement(at, Object.assign({}, we, { ref: o }));
|
|
@@ -1730,28 +1730,28 @@ function Xo(e, t, r) {
|
|
|
1730
1730
|
if (_t(e) && (e === o || e === i) && t.lastValue === "")
|
|
1731
1731
|
return e;
|
|
1732
1732
|
if (m - u === 1 && f.indexOf(e[u]) !== -1) {
|
|
1733
|
-
var
|
|
1734
|
-
e = e.substring(0, u) +
|
|
1733
|
+
var x = l === 0 ? "" : p;
|
|
1734
|
+
e = e.substring(0, u) + x + e.substring(u + 1, e.length);
|
|
1735
1735
|
}
|
|
1736
|
-
var j = function(
|
|
1737
|
-
var
|
|
1738
|
-
o.startsWith("-") ?
|
|
1739
|
-
var ee =
|
|
1740
|
-
return K && (ee = 2), ee && (
|
|
1736
|
+
var j = function(A, W, U) {
|
|
1737
|
+
var H = !1, K = !1;
|
|
1738
|
+
o.startsWith("-") ? H = !1 : A.startsWith("--") ? (H = !1, K = !0) : i.startsWith("-") && A.length === i.length ? H = !1 : A[0] === "-" && (H = !0);
|
|
1739
|
+
var ee = H ? 1 : 0;
|
|
1740
|
+
return K && (ee = 2), ee && (A = A.substring(ee), W -= ee, U -= ee), { value: A, start: W, end: U, hasNegation: H };
|
|
1741
1741
|
}, w = j(e, u, m), y = w.hasNegation;
|
|
1742
1742
|
s = w, e = s.value, u = s.start, m = s.end;
|
|
1743
|
-
var
|
|
1744
|
-
e.length &&
|
|
1745
|
-
var
|
|
1746
|
-
e.startsWith(o) ?
|
|
1747
|
-
var
|
|
1748
|
-
e.endsWith(i) ?
|
|
1749
|
-
var
|
|
1750
|
-
e = e.replace(new RegExp(ys(p), "g"), function(
|
|
1751
|
-
return
|
|
1743
|
+
var g = j(t.lastValue, c.start, c.end), N = g.start, I = g.end, E = g.value, S = e.substring(u, m);
|
|
1744
|
+
e.length && E.length && (N > E.length - i.length || I < o.length) && !(S && i.startsWith(S)) && (e = E);
|
|
1745
|
+
var T = 0;
|
|
1746
|
+
e.startsWith(o) ? T += o.length : u < o.length && (T = u), e = e.substring(T), m -= T;
|
|
1747
|
+
var _ = e.length, R = e.length - i.length;
|
|
1748
|
+
e.endsWith(i) ? _ = R : (m > R || m > e.length - i.length) && (_ = m), e = e.substring(0, _), e = Qo(y ? "-" + e : e, a), e = (e.match(Zo(p)) || []).join("");
|
|
1749
|
+
var k = e.indexOf(p);
|
|
1750
|
+
e = e.replace(new RegExp(ys(p), "g"), function(A, W) {
|
|
1751
|
+
return W === k ? "." : "";
|
|
1752
1752
|
});
|
|
1753
|
-
var
|
|
1754
|
-
return d.end - d.start < c.end - c.start &&
|
|
1753
|
+
var $ = Cn(e, a), L = $.beforeDecimal, P = $.afterDecimal, O = $.addNegation;
|
|
1754
|
+
return d.end - d.start < c.end - c.start && L === "" && h && !parseFloat(P) && (e = O ? "-" : ""), e;
|
|
1755
1755
|
}
|
|
1756
1756
|
function ei(e, t) {
|
|
1757
1757
|
var r = t.prefix;
|
|
@@ -1784,379 +1784,379 @@ function ti(e) {
|
|
|
1784
1784
|
function ni(e) {
|
|
1785
1785
|
e = ti(e), e.decimalSeparator, e.allowedDecimalSeparators, e.thousandsGroupStyle;
|
|
1786
1786
|
var t = e.suffix, r = e.allowNegative, s = e.allowLeadingZeros, a = e.onKeyDown;
|
|
1787
|
-
a === void 0 && (a =
|
|
1787
|
+
a === void 0 && (a = Ue);
|
|
1788
1788
|
var o = e.onBlur;
|
|
1789
|
-
o === void 0 && (o =
|
|
1789
|
+
o === void 0 && (o = Ue);
|
|
1790
1790
|
var i = e.thousandSeparator, l = e.decimalScale, c = e.fixedDecimalScale, d = e.prefix;
|
|
1791
1791
|
d === void 0 && (d = "");
|
|
1792
|
-
var u = e.defaultValue, m = e.value, v = e.valueIsNumericString, f = e.onValueChange, p = vs(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), h = Wt(e),
|
|
1793
|
-
return Jn(
|
|
1794
|
-
}, y = function(
|
|
1795
|
-
return Xo(
|
|
1796
|
-
},
|
|
1792
|
+
var u = e.defaultValue, m = e.value, v = e.valueIsNumericString, f = e.onValueChange, p = vs(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), h = Wt(e), x = h.decimalSeparator, j = h.allowedDecimalSeparators, w = function(O) {
|
|
1793
|
+
return Jn(O, e);
|
|
1794
|
+
}, y = function(O, A) {
|
|
1795
|
+
return Xo(O, A, e);
|
|
1796
|
+
}, g = lt(m) ? u : m, N = v ?? Jo(g, d, t);
|
|
1797
1797
|
lt(m) ? lt(u) || (N = N || typeof u == "number") : N = N || typeof m == "number";
|
|
1798
|
-
var I = function(
|
|
1799
|
-
return js(
|
|
1800
|
-
},
|
|
1801
|
-
var
|
|
1802
|
-
if (K === void 0 && (K = ""), (
|
|
1803
|
-
|
|
1798
|
+
var I = function(O) {
|
|
1799
|
+
return js(O) ? O : (typeof O == "number" && (O = bs(O)), N && typeof l == "number" ? Qn(O, l, !!c) : O);
|
|
1800
|
+
}, E = Ns(I(m), I(u), !!N, w, y, f), S = E[0], T = S.numAsString, _ = S.formattedValue, R = E[1], k = function(O) {
|
|
1801
|
+
var A = O.target, W = O.key, U = A.selectionStart, H = A.selectionEnd, K = A.value;
|
|
1802
|
+
if (K === void 0 && (K = ""), (W === "Backspace" || W === "Delete") && H < d.length) {
|
|
1803
|
+
O.preventDefault();
|
|
1804
1804
|
return;
|
|
1805
1805
|
}
|
|
1806
|
-
if (
|
|
1807
|
-
a(
|
|
1806
|
+
if (U !== H) {
|
|
1807
|
+
a(O);
|
|
1808
1808
|
return;
|
|
1809
1809
|
}
|
|
1810
|
-
|
|
1810
|
+
W === "Backspace" && K[0] === "-" && U === d.length + 1 && r && et(A, 1), l && c && (W === "Backspace" && K[U - 1] === x ? (et(A, U - 1), O.preventDefault()) : W === "Delete" && K[U] === x && O.preventDefault()), j != null && j.includes(W) && K[U] === x && et(A, U + 1);
|
|
1811
1811
|
var ee = i === !0 ? "," : i;
|
|
1812
|
-
|
|
1813
|
-
},
|
|
1814
|
-
var
|
|
1815
|
-
if (
|
|
1816
|
-
var
|
|
1817
|
-
|
|
1818
|
-
formattedValue:
|
|
1819
|
-
value:
|
|
1820
|
-
floatValue: parseFloat(
|
|
1812
|
+
W === "Backspace" && K[U - 1] === ee && et(A, U - 1), W === "Delete" && K[U] === ee && et(A, U + 1), a(O);
|
|
1813
|
+
}, $ = function(O) {
|
|
1814
|
+
var A = T;
|
|
1815
|
+
if (A.match(/\d/g) || (A = ""), s || (A = Bo(A)), c && l && (A = Qn(A, l, c)), A !== T) {
|
|
1816
|
+
var W = Jn(A, e);
|
|
1817
|
+
R({
|
|
1818
|
+
formattedValue: W,
|
|
1819
|
+
value: A,
|
|
1820
|
+
floatValue: parseFloat(A)
|
|
1821
1821
|
}, {
|
|
1822
|
-
event:
|
|
1822
|
+
event: O,
|
|
1823
1823
|
source: bt.event
|
|
1824
1824
|
});
|
|
1825
1825
|
}
|
|
1826
|
-
o(
|
|
1827
|
-
},
|
|
1828
|
-
return
|
|
1829
|
-
},
|
|
1830
|
-
var
|
|
1831
|
-
return y(
|
|
1826
|
+
o(O);
|
|
1827
|
+
}, L = function(O) {
|
|
1828
|
+
return O === x ? !0 : _t(O);
|
|
1829
|
+
}, P = function(O) {
|
|
1830
|
+
var A = O.currentValue, W = O.lastValue, U = O.formattedValue, H = O.currentValueIndex, K = O.formattedValueIndex, ee = A[H], le = U[K], C = _s(W, A), z = C.to, re = function(Oe) {
|
|
1831
|
+
return y(Oe).indexOf(".") + d.length;
|
|
1832
1832
|
};
|
|
1833
|
-
return m === 0 && c && l && z
|
|
1833
|
+
return m === 0 && c && l && A[z.start] === x && re(A) < H && re(U) > K ? !1 : H >= z.start && H < z.end && j && j.includes(ee) && le === x ? !0 : ee === le;
|
|
1834
1834
|
};
|
|
1835
1835
|
return Object.assign(Object.assign({}, p), {
|
|
1836
|
-
value:
|
|
1836
|
+
value: _,
|
|
1837
1837
|
valueIsNumericString: !1,
|
|
1838
|
-
isValidInputCharacter:
|
|
1839
|
-
isCharacterSame:
|
|
1840
|
-
onValueChange:
|
|
1838
|
+
isValidInputCharacter: L,
|
|
1839
|
+
isCharacterSame: P,
|
|
1840
|
+
onValueChange: R,
|
|
1841
1841
|
format: w,
|
|
1842
1842
|
removeFormatting: y,
|
|
1843
|
-
getCaretBoundary: function(
|
|
1844
|
-
return ei(
|
|
1843
|
+
getCaretBoundary: function(O) {
|
|
1844
|
+
return ei(O, e);
|
|
1845
1845
|
},
|
|
1846
|
-
onKeyDown:
|
|
1847
|
-
onBlur:
|
|
1846
|
+
onKeyDown: k,
|
|
1847
|
+
onBlur: $
|
|
1848
1848
|
});
|
|
1849
1849
|
}
|
|
1850
1850
|
function kn(e) {
|
|
1851
1851
|
var t = ni(e);
|
|
1852
1852
|
return Se.createElement(qo, Object.assign({}, t));
|
|
1853
1853
|
}
|
|
1854
|
-
const
|
|
1855
|
-
const
|
|
1854
|
+
const _d = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size: l, hidden: c, disabled: d, showClearIcon: u, clearValue: m, className: v, step: f, noSelectOnFocus: p, decimalScale: h, numberPrefix: x, numberSuffix: j, min: w, max: y, hint: g }) => {
|
|
1855
|
+
const N = D(() => {
|
|
1856
1856
|
if (!r)
|
|
1857
1857
|
return;
|
|
1858
|
-
const
|
|
1859
|
-
r(
|
|
1860
|
-
}, [m, r]),
|
|
1861
|
-
const
|
|
1862
|
-
r && r(
|
|
1863
|
-
}, [r]),
|
|
1864
|
-
var
|
|
1865
|
-
let
|
|
1866
|
-
if (Number.isNaN(
|
|
1867
|
-
|
|
1858
|
+
const R = m ?? null;
|
|
1859
|
+
r(R ? Number(R) : null);
|
|
1860
|
+
}, [m, r]), I = Z(null), [E, S] = F((t == null ? void 0 : t.toString()) ?? ""), T = D((R) => {
|
|
1861
|
+
const k = R;
|
|
1862
|
+
r && r(k == null || k === "" ? null : Number(k));
|
|
1863
|
+
}, [r]), _ = D((R) => {
|
|
1864
|
+
var $, L;
|
|
1865
|
+
let k = parseFloat(((L = ($ = R.target) == null ? void 0 : $.value) == null ? void 0 : L.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
|
|
1866
|
+
if (Number.isNaN(k) && (k = 0), !s) {
|
|
1867
|
+
T(k.toString());
|
|
1868
1868
|
return;
|
|
1869
1869
|
}
|
|
1870
|
-
|
|
1871
|
-
|
|
1870
|
+
S(k.toString()), I.current !== null && window.clearTimeout(I.current), I.current = window.setTimeout(() => {
|
|
1871
|
+
T(k.toString());
|
|
1872
1872
|
}, s);
|
|
1873
|
-
}, [s,
|
|
1873
|
+
}, [s, T]);
|
|
1874
1874
|
return B(() => {
|
|
1875
|
-
|
|
1875
|
+
S(t === null ? "" : t.toString());
|
|
1876
1876
|
}, [y, w, t]), B(() => {
|
|
1877
|
-
y !== void 0 && Number(
|
|
1878
|
-
}, [
|
|
1877
|
+
y !== void 0 && Number(E) > y && S(y.toString()), w !== void 0 && Number(E) < w && S(w.toString());
|
|
1878
|
+
}, [E, y, w, S]), B(() => {
|
|
1879
1879
|
!r || t === null || (y !== void 0 && t > y && r(y), w !== void 0 && t < w && r(w));
|
|
1880
|
-
}, [t, y, w, r]), /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: c, className: v, children: [
|
|
1881
|
-
/* @__PURE__ */ n.jsx(kn, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: h, prefix:
|
|
1882
|
-
!p &&
|
|
1883
|
-
}, onChange:
|
|
1880
|
+
}, [t, y, w, r]), /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: c, className: v, hint: g, children: [
|
|
1881
|
+
/* @__PURE__ */ n.jsx(kn, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: h, prefix: x, suffix: j, defaultValue: "", value: s ? E : (t == null ? void 0 : t.toString()) ?? "", placeholder: i ?? a, onFocus: (R) => {
|
|
1882
|
+
!p && R.target.select();
|
|
1883
|
+
}, onChange: _, hidden: c, disabled: d, className: b("form-control text-end w-100", {
|
|
1884
1884
|
[`form-control-${l}`]: l
|
|
1885
1885
|
}), step: f, min: w, max: y }),
|
|
1886
|
-
u && t !== null && r && !d && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(
|
|
1886
|
+
u && t !== null && r && !d && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(ne, { color: "secondary", size: "sm", onClick: N, children: /* @__PURE__ */ n.jsx(Be, {}) }) })
|
|
1887
1887
|
] });
|
|
1888
|
-
},
|
|
1889
|
-
const c =
|
|
1888
|
+
}, Nd = ({ InputContainer: e = Ve, label: t, options: r, disabled: s, hidden: a, className: o, value: i, onChange: l }) => {
|
|
1889
|
+
const c = D((d) => {
|
|
1890
1890
|
l && l(d.target.value);
|
|
1891
1891
|
}, [l]);
|
|
1892
|
-
return /* @__PURE__ */ n.jsx(e, { isForRadioInput: !0, hidden: a, withoutLabel: !t, label: `${t}`, className: o, children: r.map((d) => /* @__PURE__ */ n.jsx(
|
|
1893
|
-
},
|
|
1894
|
-
const { register:
|
|
1892
|
+
return /* @__PURE__ */ n.jsx(e, { isForRadioInput: !0, hidden: a, withoutLabel: !t, label: `${t}`, className: o, children: r.map((d) => /* @__PURE__ */ n.jsx(ve.Check, { id: `radio-${d.id}`, label: d.name, type: "radio", value: d.id ?? "", checked: i === d.id, onChange: c, hidden: a, disabled: s, className: "w-100" }, d.id)) });
|
|
1893
|
+
}, Sd = ({ InputContainer: e = Ve, formField: t, label: r, resetsFields: s, type: a, required: o, hidden: i, disabled: l, withoutLabel: c, hint: d, className: u }) => {
|
|
1894
|
+
const { register: m, formState: v, setValue: f } = qe(), [p, h] = F(void 0), [x, j] = F(!1);
|
|
1895
1895
|
B(() => {
|
|
1896
|
-
const
|
|
1897
|
-
let
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
}),
|
|
1901
|
-
}, [
|
|
1902
|
-
|
|
1903
|
-
}, [
|
|
1904
|
-
const
|
|
1905
|
-
return /* @__PURE__ */ n.jsxs(e, { isForCheckInput: !0, hidden: i, label: `${r}${o ? " *" : ""}`, isInvalid:
|
|
1906
|
-
/* @__PURE__ */ n.jsx(
|
|
1896
|
+
const y = t.split(".");
|
|
1897
|
+
let g = v.errors;
|
|
1898
|
+
y.forEach((N) => {
|
|
1899
|
+
g !== void 0 && (g = g[N]);
|
|
1900
|
+
}), h(g);
|
|
1901
|
+
}, [v, t]), B(() => {
|
|
1902
|
+
v.isSubmitted && j(!0);
|
|
1903
|
+
}, [v]);
|
|
1904
|
+
const w = p !== void 0;
|
|
1905
|
+
return /* @__PURE__ */ n.jsxs(e, { isForCheckInput: !0, hidden: i, label: `${r}${o ? " *" : ""}`, isInvalid: w, withoutLabel: c, hint: d, className: u, children: [
|
|
1906
|
+
/* @__PURE__ */ n.jsx(ve.Check, { id: `check-${t}`, type: a ?? "checkbox", label: `${r}${o ? " *" : ""}`, ...m(t, {
|
|
1907
1907
|
onChange: () => {
|
|
1908
|
-
s && s.forEach((
|
|
1908
|
+
s && s.forEach((y) => f(y, null, { shouldDirty: !0, shouldValidate: x }));
|
|
1909
1909
|
}
|
|
1910
|
-
}), isInvalid:
|
|
1911
|
-
|
|
1910
|
+
}), isInvalid: w, hidden: i, disabled: l, className: "w-100" }),
|
|
1911
|
+
p && /* @__PURE__ */ n.jsx(rt, { message: p.message })
|
|
1912
1912
|
] });
|
|
1913
|
-
},
|
|
1914
|
-
const { register: d, formState: u, setValue: m, watch: v } =
|
|
1913
|
+
}, Cd = ({ InputContainer: e = Ve, label: t, formField: r, options: s, resetsFields: a, required: o, disabled: i, hidden: l, className: c }) => {
|
|
1914
|
+
const { register: d, formState: u, setValue: m, watch: v } = qe(), [f, p] = F(void 0), [h, x] = F(!1), j = J(() => s, [s]);
|
|
1915
1915
|
B(() => {
|
|
1916
1916
|
const y = r.split(".");
|
|
1917
|
-
let
|
|
1917
|
+
let g = u.errors;
|
|
1918
1918
|
y.forEach((N) => {
|
|
1919
|
-
|
|
1920
|
-
}), p(
|
|
1919
|
+
g !== void 0 && (g = g[N]);
|
|
1920
|
+
}), p(g);
|
|
1921
1921
|
}, [u, r]), B(() => {
|
|
1922
|
-
u.isSubmitted &&
|
|
1922
|
+
u.isSubmitted && x(!0);
|
|
1923
1923
|
}, [u]);
|
|
1924
1924
|
const w = f !== void 0;
|
|
1925
1925
|
return /* @__PURE__ */ n.jsxs(e, { isForRadioInput: !0, hidden: l, withoutLabel: !t, label: `${t}${o ? " *" : ""}`, isInvalid: w, className: c, children: [
|
|
1926
|
-
j.map((y) => /* @__PURE__ */ n.jsx(
|
|
1926
|
+
j.map((y) => /* @__PURE__ */ n.jsx(ve.Check, { id: `radio-${y.id}`, label: y.name, type: "radio", value: y.id ?? "", checked: v(r) === y.id, ...d(r, {
|
|
1927
1927
|
onChange: () => {
|
|
1928
|
-
a && a.forEach((
|
|
1928
|
+
a && a.forEach((g) => m(g, null, { shouldDirty: !0, shouldValidate: h }));
|
|
1929
1929
|
}
|
|
1930
1930
|
}), isInvalid: w, hidden: l, disabled: i, className: "w-100" }, y.id)),
|
|
1931
1931
|
f && /* @__PURE__ */ n.jsx(rt, { message: f.message })
|
|
1932
1932
|
] });
|
|
1933
|
-
},
|
|
1934
|
-
const { formState:
|
|
1935
|
-
const
|
|
1936
|
-
let Ne =
|
|
1937
|
-
|
|
1938
|
-
Ne !== void 0 && (Ne = Ne[
|
|
1939
|
-
}),
|
|
1940
|
-
}, [
|
|
1941
|
-
if ((
|
|
1933
|
+
}, kd = ({ InputContainer: e = Ve, formField: t, label: r, size: s, defaultSelection: a, resetsFields: o, isNumber: i, required: l, hidden: c, disabled: d, items: u, onSearchQueryChange: m, selectedItemNavigateTo: v, texts: f, dropdownItemsNameWidth: p, isLoading: h, withoutLabel: x, additionalColumns: j, CustomOnChangeComponent: w, icon: y, displayIdAsName: g, onSelect: N, className: I, archiveColumn: E, hint: S }) => {
|
|
1934
|
+
const { formState: T, setValue: _, watch: R, control: k } = qe(), [$, L] = F(void 0), [P, O] = F(!1), [A, W] = F(!1), U = R(t) ?? null, H = U === (a == null ? void 0 : a.id) ? a == null ? void 0 : a.name : R(`${t}-DropdownName`), K = J(() => U == null ? null : { id: U ?? null, name: H ?? "" }, [U, H]), ee = D(() => {
|
|
1935
|
+
const te = t.split(".");
|
|
1936
|
+
let Ne = T.errors;
|
|
1937
|
+
te.forEach((De) => {
|
|
1938
|
+
Ne !== void 0 && (Ne = Ne[De]);
|
|
1939
|
+
}), L(Ne);
|
|
1940
|
+
}, [T, t]), le = D((te) => {
|
|
1941
|
+
if ((te == null ? void 0 : te.id) === U)
|
|
1942
1942
|
return;
|
|
1943
|
-
if (N && N(
|
|
1944
|
-
|
|
1943
|
+
if (N && N(te), o && o.forEach((De) => _(De, null, { shouldDirty: !0, shouldValidate: A })), te === null) {
|
|
1944
|
+
_(t, null, {
|
|
1945
1945
|
shouldDirty: !0,
|
|
1946
|
-
shouldValidate:
|
|
1947
|
-
}),
|
|
1946
|
+
shouldValidate: A
|
|
1947
|
+
}), _(`${t}-DropdownName`, null);
|
|
1948
1948
|
return;
|
|
1949
1949
|
}
|
|
1950
1950
|
let Ne = null;
|
|
1951
|
-
i ? Ne = (
|
|
1951
|
+
i ? Ne = (te == null ? void 0 : te.id) !== null && (te == null ? void 0 : te.id) !== "" ? parseInt(te.id.toString(), 10) : null : Ne = te.id === null || te.id === void 0 || te.id === "" ? null : te.id, _(t, Ne, {
|
|
1952
1952
|
shouldDirty: !0,
|
|
1953
|
-
shouldValidate:
|
|
1954
|
-
}),
|
|
1955
|
-
}, [
|
|
1956
|
-
|
|
1957
|
-
}, [
|
|
1958
|
-
|
|
1953
|
+
shouldValidate: A
|
|
1954
|
+
}), _(`${t}-DropdownName`, te.name ?? "");
|
|
1955
|
+
}, [_, t, A, i, o, U, N]), C = D((te) => {
|
|
1956
|
+
O(!1), le(te);
|
|
1957
|
+
}, [le]), z = D(() => {
|
|
1958
|
+
O(!1);
|
|
1959
1959
|
}, []);
|
|
1960
1960
|
B(() => {
|
|
1961
|
-
|
|
1962
|
-
}, [
|
|
1963
|
-
|
|
1964
|
-
}, [
|
|
1965
|
-
const
|
|
1966
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${r}${l ? " *" : ""}`, hidden: c, withoutLabel:
|
|
1967
|
-
/* @__PURE__ */ n.jsxs(ps, { currentSelection:
|
|
1968
|
-
|
|
1969
|
-
/* @__PURE__ */ n.jsx(jn, { control:
|
|
1970
|
-
|
|
1961
|
+
ee();
|
|
1962
|
+
}, [ee]), B(() => {
|
|
1963
|
+
T.isSubmitted && W(!0);
|
|
1964
|
+
}, [T]);
|
|
1965
|
+
const re = Z(null), Oe = $ !== void 0, he = v !== void 0, Fe = he && K !== null;
|
|
1966
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${r}${l ? " *" : ""}`, hidden: c, withoutLabel: x, isInvalid: Oe, inputContainerClassName: b({ "luminus-dropdown-select-open": P }), hint: S, className: I, children: [
|
|
1967
|
+
/* @__PURE__ */ n.jsxs(ps, { currentSelection: K, selectedItemNavigateTo: v, children: [
|
|
1968
|
+
g && (K == null ? void 0 : K.name) && /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: K.name }),
|
|
1969
|
+
/* @__PURE__ */ n.jsx(jn, { control: k, name: t, render: () => /* @__PURE__ */ n.jsx(ve.Select, { size: s, onMouseDown: (te) => {
|
|
1970
|
+
te.currentTarget.focus(), te.preventDefault();
|
|
1971
1971
|
}, onClick: () => {
|
|
1972
|
-
!
|
|
1973
|
-
}, ref:
|
|
1974
|
-
}, isInvalid:
|
|
1972
|
+
!he && !d && O(!0);
|
|
1973
|
+
}, ref: re, value: U ?? "", onChange: () => {
|
|
1974
|
+
}, isInvalid: Oe, hidden: c, className: b("w-100", {
|
|
1975
1975
|
"luminus-dropdown-picker-disabled": d,
|
|
1976
|
-
"luminus-dropdown-picker-link":
|
|
1977
|
-
}), children: /* @__PURE__ */ n.jsx("option", { value:
|
|
1978
|
-
w || !d &&
|
|
1979
|
-
!w && !d &&
|
|
1980
|
-
|
|
1976
|
+
"luminus-dropdown-picker-link": Fe
|
|
1977
|
+
}), children: /* @__PURE__ */ n.jsx("option", { value: U, children: g ? U : (H == null ? void 0 : H.length) > 0 ? H : U }) }) }),
|
|
1978
|
+
w || !d && he ? /* @__PURE__ */ n.jsxs("div", { className: "custom-picker-button", children: [
|
|
1979
|
+
!w && !d && he && /* @__PURE__ */ n.jsx(ne, { size: "sm", color: "secondary", onClick: (te) => {
|
|
1980
|
+
te.preventDefault(), te.stopPropagation(), O(!0);
|
|
1981
1981
|
}, children: y ?? /* @__PURE__ */ n.jsx(kr, {}) }),
|
|
1982
1982
|
w ?? null
|
|
1983
1983
|
] }) : null
|
|
1984
1984
|
] }),
|
|
1985
|
-
|
|
1986
|
-
|
|
1985
|
+
$ && /* @__PURE__ */ n.jsx(rt, { message: $.message }),
|
|
1986
|
+
re.current && /* @__PURE__ */ n.jsx(Ht, { show: P, onCancel: z, items: u, currentSelection: K, onSelectionChange: C, onSearchQueryChange: m, texts: f, itemsNameWidth: p, additionalColumns: j, displayIdAsName: g, isLoading: h, disabled: d, inputRef: re, archiveColumn: E })
|
|
1987
1987
|
] }) });
|
|
1988
|
-
},
|
|
1989
|
-
const { watch:
|
|
1990
|
-
|
|
1991
|
-
}, [
|
|
1992
|
-
const
|
|
1993
|
-
let
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
}),
|
|
1997
|
-
}, [
|
|
1998
|
-
B(
|
|
1999
|
-
|
|
2000
|
-
}, [
|
|
2001
|
-
const
|
|
2002
|
-
return /* @__PURE__ */ n.jsxs(e, { label: `${t}${a ? "*" : ""}`, hidden: s, withoutLabel: m, isInvalid:
|
|
2003
|
-
/* @__PURE__ */ n.jsx(da, { type: "file", multiple: d, accept: u.join(", "), placeholder: o ?? t, isInvalid:
|
|
1988
|
+
}, Id = ({ InputContainer: e = Ve, label: t, formField: r, hidden: s, required: a, placeholder: o, disabled: i, showClearIcon: l, resetsFields: c, multiple: d, accept: u, withoutLabel: m, hint: v, className: f }) => {
|
|
1989
|
+
const { watch: p, setValue: h, register: x, formState: j } = qe(), [w, y] = F(!1), [g, N] = F(void 0), I = D(() => {
|
|
1990
|
+
h(r, "");
|
|
1991
|
+
}, [h, r]), E = D(() => {
|
|
1992
|
+
const T = r.split(".");
|
|
1993
|
+
let _ = j.errors;
|
|
1994
|
+
T.forEach((R) => {
|
|
1995
|
+
_ !== void 0 && (_ = _[R]);
|
|
1996
|
+
}), N(_);
|
|
1997
|
+
}, [j, r]);
|
|
1998
|
+
B(E, [E]), B(() => {
|
|
1999
|
+
j.isSubmitted && y(!0);
|
|
2000
|
+
}, [j]);
|
|
2001
|
+
const S = g !== void 0;
|
|
2002
|
+
return /* @__PURE__ */ n.jsxs(e, { label: `${t}${a ? "*" : ""}`, hidden: s, withoutLabel: m, isInvalid: S, hint: v, className: f, children: [
|
|
2003
|
+
/* @__PURE__ */ n.jsx(da, { type: "file", multiple: d, accept: u.join(", "), placeholder: o ?? t, isInvalid: S, hidden: s, disabled: i, className: "w-100", ...x(r, {
|
|
2004
2004
|
onChange: () => {
|
|
2005
|
-
c && c.forEach((
|
|
2005
|
+
c && c.forEach((T) => h(T, null, { shouldDirty: !0, shouldValidate: w }));
|
|
2006
2006
|
}
|
|
2007
2007
|
}) }),
|
|
2008
|
-
l &&
|
|
2009
|
-
|
|
2008
|
+
l && p(r) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(ne, { color: "secondary", size: "sm", onClick: I, children: /* @__PURE__ */ n.jsx(Be, {}) }) }),
|
|
2009
|
+
g && /* @__PURE__ */ n.jsx(rt, { message: g.message })
|
|
2010
2010
|
] });
|
|
2011
|
-
},
|
|
2012
|
-
const { formState: s } =
|
|
2011
|
+
}, Dd = ({ children: e, onStorno: t, noSpacer: r }) => {
|
|
2012
|
+
const { formState: s } = qe(), [a, o] = F(!1);
|
|
2013
2013
|
return B(() => {
|
|
2014
2014
|
o(Object.keys(s.dirtyFields).length > 0);
|
|
2015
2015
|
}, [s]), a ? /* @__PURE__ */ n.jsx(bo, { onStorno: t, noSpacer: r, children: e }) : null;
|
|
2016
|
-
},
|
|
2017
|
-
const { texts: { customSelect:
|
|
2018
|
-
const
|
|
2019
|
-
let
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
}),
|
|
2023
|
-
}, [
|
|
2024
|
-
if ((
|
|
2016
|
+
}, $d = ({ InputContainer: e = Ve, options: t, formField: r, label: s, size: a, resetsFields: o, isNumber: i, required: l, hidden: c, disabled: d, withoutLabel: u, noSortOptions: m, suffixIdToName: v, onSelect: f, className: p, appendCurrentSelectionWithName: h, hint: x }) => {
|
|
2017
|
+
const { texts: { customSelect: j } } = q(fe), { formState: w, setValue: y, watch: g, control: N } = qe(), [I, E] = F(void 0), [S, T] = F(!1), [_, R] = F(!1), [k, $] = F(""), L = g(r), P = J(() => t.find((C) => C.id === L) ?? null, [t, L]), O = D(() => {
|
|
2018
|
+
const C = r.split(".");
|
|
2019
|
+
let z = w.errors;
|
|
2020
|
+
C.forEach((re) => {
|
|
2021
|
+
z !== void 0 && (z = z[re]);
|
|
2022
|
+
}), E(z);
|
|
2023
|
+
}, [w, r]), A = D((C) => {
|
|
2024
|
+
if ((C == null ? void 0 : C.id) === L)
|
|
2025
2025
|
return;
|
|
2026
|
-
if (f && f(
|
|
2027
|
-
|
|
2026
|
+
if (f && f(C), o && o.forEach((re) => y(re, null, { shouldDirty: !0, shouldValidate: _ })), C === null) {
|
|
2027
|
+
y(r, null, {
|
|
2028
2028
|
shouldDirty: !0,
|
|
2029
|
-
shouldValidate:
|
|
2029
|
+
shouldValidate: _
|
|
2030
2030
|
});
|
|
2031
2031
|
return;
|
|
2032
2032
|
}
|
|
2033
|
-
let
|
|
2034
|
-
i ?
|
|
2033
|
+
let z = null;
|
|
2034
|
+
i ? z = (C == null ? void 0 : C.id) !== null && (C == null ? void 0 : C.id) !== "" ? parseInt(C.id.toString(), 10) : null : z = C.id === null || C.id === void 0 || C.id === "" ? null : C.id, y(r, z, {
|
|
2035
2035
|
shouldDirty: !0,
|
|
2036
|
-
shouldValidate:
|
|
2036
|
+
shouldValidate: _
|
|
2037
2037
|
});
|
|
2038
|
-
}, [
|
|
2039
|
-
|
|
2040
|
-
}, [
|
|
2041
|
-
|
|
2038
|
+
}, [y, r, i, o, L, _, f]), W = D((C) => {
|
|
2039
|
+
T(!1), A(C);
|
|
2040
|
+
}, [A]), U = D((C) => {
|
|
2041
|
+
$(C);
|
|
2042
2042
|
}, []);
|
|
2043
2043
|
B(() => {
|
|
2044
|
-
|
|
2045
|
-
}, [
|
|
2046
|
-
|
|
2047
|
-
}, [
|
|
2048
|
-
const
|
|
2049
|
-
var
|
|
2050
|
-
return
|
|
2051
|
-
}, [v]),
|
|
2052
|
-
const
|
|
2053
|
-
return h !== void 0 &&
|
|
2054
|
-
id:
|
|
2055
|
-
name:
|
|
2056
|
-
})).filter((
|
|
2044
|
+
O();
|
|
2045
|
+
}, [O]), B(() => {
|
|
2046
|
+
w.isSubmitted && R(!0);
|
|
2047
|
+
}, [w]);
|
|
2048
|
+
const H = D((C) => {
|
|
2049
|
+
var z;
|
|
2050
|
+
return C === null ? "" : !C.name || C.name.length === 0 ? ((z = C.id) == null ? void 0 : z.toString()) ?? "" : v ? `${C.name} (${C.id})` : C.name;
|
|
2051
|
+
}, [v]), K = J(() => {
|
|
2052
|
+
const C = t ?? [];
|
|
2053
|
+
return h !== void 0 && L && (C.some((z) => z.id === L) || C.push({ id: L, name: h })), C.map((z) => ({
|
|
2054
|
+
id: z.id,
|
|
2055
|
+
name: H(z)
|
|
2056
|
+
})).filter((z) => wt(z.name, k)).sort((z, re) => m ? 0 : (z.name ?? "").localeCompare(re.name ?? ""));
|
|
2057
2057
|
}, [
|
|
2058
2058
|
t,
|
|
2059
2059
|
m,
|
|
2060
|
-
|
|
2061
|
-
|
|
2060
|
+
k,
|
|
2061
|
+
H,
|
|
2062
2062
|
h,
|
|
2063
|
-
|
|
2064
|
-
]),
|
|
2065
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${s}${l ? " *" : ""}`, hidden: c, withoutLabel: u, isInvalid:
|
|
2066
|
-
/* @__PURE__ */ n.jsx(jn, { control:
|
|
2067
|
-
|
|
2063
|
+
L
|
|
2064
|
+
]), ee = Z(null), le = I !== void 0;
|
|
2065
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${s}${l ? " *" : ""}`, hidden: c, withoutLabel: u, isInvalid: le, inputContainerClassName: b({ "luminus-dropdown-select-open": S }), hint: x, className: p, children: [
|
|
2066
|
+
/* @__PURE__ */ n.jsx(jn, { control: N, name: r, render: () => /* @__PURE__ */ n.jsx(ve.Select, { size: a, onMouseDown: (C) => {
|
|
2067
|
+
C.currentTarget.focus(), C.preventDefault();
|
|
2068
2068
|
}, onClick: () => {
|
|
2069
|
-
|
|
2070
|
-
}, ref:
|
|
2071
|
-
}, isInvalid:
|
|
2072
|
-
|
|
2073
|
-
|
|
2069
|
+
T(!0);
|
|
2070
|
+
}, ref: ee, value: L ?? "", onChange: () => {
|
|
2071
|
+
}, isInvalid: le, hidden: c, disabled: d, className: "w-100", children: /* @__PURE__ */ n.jsx("option", { value: (P == null ? void 0 : P.id) ?? "", children: H(P) }) }) }),
|
|
2072
|
+
I && /* @__PURE__ */ n.jsx(rt, { message: I.message }),
|
|
2073
|
+
ee.current && /* @__PURE__ */ n.jsx(Ht, { show: S, onCancel: () => T(!1), items: K, currentSelection: P ?? null, onSelectionChange: W, onSearchQueryChange: U, texts: j, disabled: d, inputRef: ee, autoHideSearch: !0, allItemsLength: t.length })
|
|
2074
2074
|
] }) });
|
|
2075
|
-
},
|
|
2076
|
-
const { register:
|
|
2077
|
-
|
|
2078
|
-
}, [
|
|
2079
|
-
const
|
|
2080
|
-
|
|
2075
|
+
}, Ed = ({ InputContainer: e = Ve, formField: t, label: r, placeholder: s, size: a, resetsFields: o, showClearIcon: i, clearValue: l, required: c, hidden: d, disabled: u, withoutLabel: m, step: v, stepperStep: f = 1, className: p, min: h, max: x, hint: j }) => {
|
|
2076
|
+
const { register: w, formState: y, setValue: g, watch: N } = qe(), [I, E] = F(void 0), [S, T] = F(!1), _ = D((P, O, A) => {
|
|
2077
|
+
g(P, pt(O, h, x), A);
|
|
2078
|
+
}, [x, h, g]), R = D(() => {
|
|
2079
|
+
const P = l ?? null;
|
|
2080
|
+
_(t, P !== null ? Number(P) : null, {
|
|
2081
2081
|
shouldDirty: !0,
|
|
2082
|
-
shouldValidate:
|
|
2082
|
+
shouldValidate: S
|
|
2083
2083
|
});
|
|
2084
|
-
}, [l,
|
|
2085
|
-
const
|
|
2086
|
-
let
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
}),
|
|
2090
|
-
}, [
|
|
2084
|
+
}, [l, _, t, S]), k = D(() => {
|
|
2085
|
+
const P = t.split(".");
|
|
2086
|
+
let O = y.errors;
|
|
2087
|
+
P.forEach((A) => {
|
|
2088
|
+
O !== void 0 && (O = O[A]);
|
|
2089
|
+
}), E(O);
|
|
2090
|
+
}, [y, t]);
|
|
2091
2091
|
B(() => {
|
|
2092
|
-
|
|
2093
|
-
}, [
|
|
2094
|
-
|
|
2095
|
-
}, [
|
|
2096
|
-
const
|
|
2097
|
-
return /* @__PURE__ */ n.jsxs(e, { label: `${r}${c ? " *" : ""}`, hidden: d, withoutLabel: m, isInvalid:
|
|
2092
|
+
k();
|
|
2093
|
+
}, [k]), B(() => {
|
|
2094
|
+
y.isSubmitted && T(!0);
|
|
2095
|
+
}, [y]);
|
|
2096
|
+
const $ = I !== void 0, L = N(t);
|
|
2097
|
+
return /* @__PURE__ */ n.jsxs(e, { label: `${r}${c ? " *" : ""}`, hidden: d, withoutLabel: m, isInvalid: $, hint: j, className: p, children: [
|
|
2098
2098
|
/* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
2099
|
-
/* @__PURE__ */ n.jsx(
|
|
2100
|
-
setValueAs: (
|
|
2099
|
+
/* @__PURE__ */ n.jsx(ve.Control, { type: "number", placeholder: s ?? r, size: a, ...w(t, {
|
|
2100
|
+
setValueAs: (P) => P == null || P === "" ? null : pt(Number(P), h, x),
|
|
2101
2101
|
min: h,
|
|
2102
|
-
max:
|
|
2102
|
+
max: x,
|
|
2103
2103
|
onChange: () => {
|
|
2104
|
-
o && o.forEach((
|
|
2104
|
+
o && o.forEach((P) => g(P, null, { shouldDirty: !0, shouldValidate: S }));
|
|
2105
2105
|
}
|
|
2106
|
-
}), isInvalid:
|
|
2107
|
-
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ n.jsx(
|
|
2108
|
-
|
|
2106
|
+
}), isInvalid: $, hidden: d, disabled: u, className: "w-100 luminus-numeric-stepper", step: v, min: h, max: x }),
|
|
2107
|
+
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ n.jsx(ne, { size: "sm", onClick: (P) => {
|
|
2108
|
+
P.preventDefault(), P.stopPropagation(), _(t, ((L ? Number(L) : 0) - f).toString(), { shouldDirty: !0, shouldValidate: S });
|
|
2109
2109
|
}, children: /* @__PURE__ */ n.jsx(Ir, {}) }) }),
|
|
2110
|
-
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ n.jsx(
|
|
2111
|
-
|
|
2110
|
+
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ n.jsx(ne, { size: "sm", onClick: (P) => {
|
|
2111
|
+
P.preventDefault(), P.stopPropagation(), _(t, ((L ? Number(L) : 0) + f).toString(), { shouldDirty: !0, shouldValidate: S });
|
|
2112
2112
|
}, children: /* @__PURE__ */ n.jsx(Dr, {}) }) })
|
|
2113
2113
|
] }),
|
|
2114
|
-
i &&
|
|
2115
|
-
|
|
2114
|
+
i && N(t) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(ne, { color: "secondary", size: "sm", onClick: R, children: /* @__PURE__ */ n.jsx(Be, {}) }) }),
|
|
2115
|
+
I && /* @__PURE__ */ n.jsx(rt, { message: I.message })
|
|
2116
2116
|
] });
|
|
2117
|
-
},
|
|
2118
|
-
const { formState:
|
|
2119
|
-
const
|
|
2120
|
-
|
|
2117
|
+
}, Od = ({ InputContainer: e = Ve, formField: t, label: r, placeholder: s, resetsFields: a, showClearIcon: o, clearValue: i, required: l, hidden: c, disabled: d, withoutLabel: u, step: m, size: v, CustomOnChangeComponent: f, noSelectOnFocus: p, className: h, decimalScale: x = 2, numberPrefix: j, numberSuffix: w, min: y, max: g, hint: N }) => {
|
|
2118
|
+
const { formState: I, setValue: E, watch: S, control: T } = qe(), [_, R] = F(void 0), [k, $] = F(!1), L = D(() => {
|
|
2119
|
+
const W = i ?? null;
|
|
2120
|
+
E(t, W !== null ? Number(W) : null, {
|
|
2121
2121
|
shouldDirty: !0,
|
|
2122
|
-
shouldValidate:
|
|
2122
|
+
shouldValidate: k
|
|
2123
2123
|
});
|
|
2124
|
-
}, [i,
|
|
2125
|
-
const
|
|
2126
|
-
let
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
}),
|
|
2130
|
-
}, [
|
|
2124
|
+
}, [i, E, t, k]), P = D(() => {
|
|
2125
|
+
const W = t.split(".");
|
|
2126
|
+
let U = I.errors;
|
|
2127
|
+
W.forEach((H) => {
|
|
2128
|
+
U !== void 0 && (U = U[H]);
|
|
2129
|
+
}), R(U);
|
|
2130
|
+
}, [I, t]);
|
|
2131
2131
|
B(() => {
|
|
2132
|
-
|
|
2133
|
-
}, [
|
|
2134
|
-
|
|
2135
|
-
}, [
|
|
2136
|
-
const
|
|
2132
|
+
P();
|
|
2133
|
+
}, [P]), B(() => {
|
|
2134
|
+
I.isSubmitted && $(!0);
|
|
2135
|
+
}, [I]);
|
|
2136
|
+
const O = S(t);
|
|
2137
2137
|
B(() => {
|
|
2138
|
-
|
|
2139
|
-
}, [t,
|
|
2140
|
-
const
|
|
2141
|
-
return /* @__PURE__ */ n.jsxs(e, { label: `${r}${l ? " *" : ""}`, hidden: c, withoutLabel: u, isInvalid:
|
|
2138
|
+
g !== void 0 && O > g && E(t, g), y !== void 0 && O < y && E(t, y);
|
|
2139
|
+
}, [t, O, g, y, E]);
|
|
2140
|
+
const A = _ !== void 0;
|
|
2141
|
+
return /* @__PURE__ */ n.jsxs(e, { label: `${r}${l ? " *" : ""}`, hidden: c, withoutLabel: u, isInvalid: A, hint: N, className: h, children: [
|
|
2142
2142
|
/* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
2143
|
-
/* @__PURE__ */ n.jsx(jn, { control:
|
|
2144
|
-
!p &&
|
|
2145
|
-
}, onChange: (
|
|
2146
|
-
var
|
|
2147
|
-
const
|
|
2148
|
-
a && a.forEach((
|
|
2143
|
+
/* @__PURE__ */ n.jsx(jn, { control: T, name: t, render: ({ field: { ref: W, onChange: U, name: H, value: K } }) => /* @__PURE__ */ n.jsx(kn, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: x, prefix: j, suffix: w, defaultValue: "", name: H, value: K ?? "", placeholder: s ?? r, onFocus: (ee) => {
|
|
2144
|
+
!p && ee.target.select();
|
|
2145
|
+
}, onChange: (ee) => {
|
|
2146
|
+
var C, z;
|
|
2147
|
+
const le = parseFloat(((z = (C = ee.target) == null ? void 0 : C.value) == null ? void 0 : z.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
|
|
2148
|
+
a && a.forEach((re) => E(re, null, { shouldDirty: !0, shouldValidate: k })), U(le == null || Number.isNaN(le) ? null : Number(le));
|
|
2149
2149
|
}, hidden: c, disabled: d, className: b("form-control text-end w-100", {
|
|
2150
|
-
"is-invalid":
|
|
2150
|
+
"is-invalid": A
|
|
2151
2151
|
}, {
|
|
2152
2152
|
[`form-control-${v}`]: v
|
|
2153
|
-
}), step: m, getInputRef:
|
|
2153
|
+
}), step: m, getInputRef: W, min: y, max: g }) }),
|
|
2154
2154
|
f && /* @__PURE__ */ n.jsx("div", { className: "custom-picker-button", children: f })
|
|
2155
2155
|
] }),
|
|
2156
|
-
o &&
|
|
2157
|
-
|
|
2156
|
+
o && S(t) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(ne, { color: "secondary", size: "sm", onClick: L, children: /* @__PURE__ */ n.jsx(Be, {}) }) }),
|
|
2157
|
+
_ && /* @__PURE__ */ n.jsx(rt, { message: _.message })
|
|
2158
2158
|
] });
|
|
2159
|
-
},
|
|
2159
|
+
}, Fd = ({ color: e = "primary", icon: t = /* @__PURE__ */ n.jsx(Cr, { size: 12 }), inputId: r = "context-file-input", accept: s = "*", onUpload: a, multiple: o, className: i, children: l, ...c }) => {
|
|
2160
2160
|
const d = (u) => {
|
|
2161
2161
|
u.target.files && (a(u.target.files), u.target.value = "");
|
|
2162
2162
|
};
|
|
@@ -2169,7 +2169,7 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2169
2169
|
] });
|
|
2170
2170
|
}, ri = "_divider_1e6rk_1", si = {
|
|
2171
2171
|
divider: ri
|
|
2172
|
-
},
|
|
2172
|
+
}, Td = ({ className: e }) => /* @__PURE__ */ n.jsx(fa.Divider, { className: b("luminus-dropdown-divider", e, si.divider) }), In = ["slice", "options", "formats", "conditions"], Xn = (e) => {
|
|
2173
2173
|
const t = e.current.flexmonster.getReport({ withDefaults: !0 });
|
|
2174
2174
|
if (typeof t == "string")
|
|
2175
2175
|
throw alert("report is string"), new Error("report is string");
|
|
@@ -2191,9 +2191,9 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2191
2191
|
t[r] = (e == null ? void 0 : e[r]) ?? void 0;
|
|
2192
2192
|
}), t;
|
|
2193
2193
|
}, er = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, tr = (e) => !e.member && !e.isDrillThrough, nr = (e, t) => typeof e == "function" ? e(t) : e.replace(":id", t), ii = ({ dataSource: e, settings: t, pivotRef: r, localization: s, licenseKey: a, hyperlinkColumn: o, enabled: i = !0 }) => {
|
|
2194
|
-
const { texts: { reports: l } } = q(
|
|
2194
|
+
const { texts: { reports: l } } = q(fe), [c, d] = F(!1), u = Z(null), m = r ?? u, v = J(() => ({
|
|
2195
2195
|
localization: s
|
|
2196
|
-
}), [s]), f =
|
|
2196
|
+
}), [s]), f = D((j) => {
|
|
2197
2197
|
delete j[0], delete j[1], delete j[2];
|
|
2198
2198
|
const w = [
|
|
2199
2199
|
{
|
|
@@ -2226,31 +2226,31 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2226
2226
|
}, [e, i, c, m]), B(() => {
|
|
2227
2227
|
var j, w, y;
|
|
2228
2228
|
if (c && i) {
|
|
2229
|
-
const { options:
|
|
2230
|
-
if (
|
|
2229
|
+
const { options: g, conditions: N, formats: I, slice: E, ...S } = (j = m.current) == null ? void 0 : j.flexmonster.getReport();
|
|
2230
|
+
if (S === void 0 || typeof S == "string")
|
|
2231
2231
|
return;
|
|
2232
|
-
const
|
|
2233
|
-
|
|
2232
|
+
const T = oi(t);
|
|
2233
|
+
T.options = {
|
|
2234
2234
|
...t == null ? void 0 : t.options,
|
|
2235
2235
|
grid: { ...(w = t == null ? void 0 : t.options) == null ? void 0 : w.grid, autoSwitchToCompact: !1 },
|
|
2236
2236
|
showFieldListSearch: !0
|
|
2237
2237
|
};
|
|
2238
|
-
const
|
|
2239
|
-
(y = m.current) == null || y.flexmonster.setReport(
|
|
2238
|
+
const _ = { ...S, ...T };
|
|
2239
|
+
(y = m.current) == null || y.flexmonster.setReport(_), console.log("Refreshing flexmonster settings. New report: ", _);
|
|
2240
2240
|
}
|
|
2241
2241
|
}, [i, c, m, t]);
|
|
2242
|
-
const h =
|
|
2243
|
-
var
|
|
2242
|
+
const h = D((j, w) => {
|
|
2243
|
+
var T;
|
|
2244
2244
|
if (!o || !er(w, o.idColumn) || tr(w))
|
|
2245
2245
|
return;
|
|
2246
|
-
const y = (
|
|
2246
|
+
const y = (T = w.escapedLabel) == null ? void 0 : T.toString();
|
|
2247
2247
|
if (y === void 0)
|
|
2248
2248
|
return;
|
|
2249
|
-
const
|
|
2249
|
+
const g = nr(o.url, y), N = "style='color: #00a45a; text-decoration: underline; cursor: pointer;'", I = w.type === "header" ? "onclick='event.stopImmediatePropagation()'" : "", E = w.isDrillThrough || w.type === "header" ? `href='${g}' target='_blank'` : "";
|
|
2250
2250
|
j.style && (j.style["z-index"] = 1);
|
|
2251
|
-
const
|
|
2252
|
-
j.text =
|
|
2253
|
-
}, [o]),
|
|
2251
|
+
const S = `<a ${E} ${N} ${I}>${w.escapedLabel}</a>`;
|
|
2252
|
+
j.text = S;
|
|
2253
|
+
}, [o]), x = D((j) => {
|
|
2254
2254
|
if (!o || !er(j, o.idColumn) || tr(j))
|
|
2255
2255
|
return;
|
|
2256
2256
|
const w = nr(o.url, j.escapedLabel ?? "");
|
|
@@ -2270,11 +2270,11 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2270
2270
|
},
|
|
2271
2271
|
width: "100%",
|
|
2272
2272
|
customizeCell: h,
|
|
2273
|
-
cellclick:
|
|
2273
|
+
cellclick: x
|
|
2274
2274
|
}
|
|
2275
2275
|
) });
|
|
2276
2276
|
}, li = (e, t, r, s) => {
|
|
2277
|
-
const { texts: { reports: a } } = q(
|
|
2277
|
+
const { texts: { reports: a } } = q(fe), { prompt: o } = ma(), { confirm: i } = Rt(), l = st(), { user: c } = q(At), { startLoading: d, stopLoading: u } = q(Mt), { addNotification: m } = $r(), v = D(async (j) => {
|
|
2278
2278
|
d("report-versionSavingAs");
|
|
2279
2279
|
try {
|
|
2280
2280
|
const w = await l.post("/reports/version", j);
|
|
@@ -2282,7 +2282,7 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2282
2282
|
} finally {
|
|
2283
2283
|
u("report-versionSavingAs");
|
|
2284
2284
|
}
|
|
2285
|
-
}, [m, s, l, a.saveSuccessful, d, u]), f =
|
|
2285
|
+
}, [m, s, l, a.saveSuccessful, d, u]), f = D(async () => {
|
|
2286
2286
|
if (r === null) {
|
|
2287
2287
|
m("none open", "warning");
|
|
2288
2288
|
return;
|
|
@@ -2303,7 +2303,7 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2303
2303
|
a.confirmOverwriteSave,
|
|
2304
2304
|
v,
|
|
2305
2305
|
r
|
|
2306
|
-
]), p =
|
|
2306
|
+
]), p = D(async () => {
|
|
2307
2307
|
const j = await o(a.enterName, { input: "input", required: !0 });
|
|
2308
2308
|
if (j === null)
|
|
2309
2309
|
return;
|
|
@@ -2313,7 +2313,7 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2313
2313
|
name: j,
|
|
2314
2314
|
settings: w
|
|
2315
2315
|
});
|
|
2316
|
-
}, [t, o, e, a.enterName, v]), h =
|
|
2316
|
+
}, [t, o, e, a.enterName, v]), h = D(async () => {
|
|
2317
2317
|
d("report-versionSavingAs");
|
|
2318
2318
|
try {
|
|
2319
2319
|
await l.post("/reports/version", {
|
|
@@ -2332,7 +2332,7 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2332
2332
|
r,
|
|
2333
2333
|
d,
|
|
2334
2334
|
u
|
|
2335
|
-
]),
|
|
2335
|
+
]), x = D(async () => {
|
|
2336
2336
|
d("report-versionSavingAs");
|
|
2337
2337
|
try {
|
|
2338
2338
|
await l.post("/reports/version-restrictions", {
|
|
@@ -2356,10 +2356,10 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2356
2356
|
u,
|
|
2357
2357
|
c.personalNumber
|
|
2358
2358
|
]);
|
|
2359
|
-
return { saveAs: p, save: f, archive: h, detach:
|
|
2359
|
+
return { saveAs: p, save: f, archive: h, detach: x };
|
|
2360
2360
|
}, ci = (e) => {
|
|
2361
2361
|
const t = st(), { startLoading: r, stopLoading: s } = q(Mt);
|
|
2362
|
-
return { changeEmployeeRights:
|
|
2362
|
+
return { changeEmployeeRights: D(async (o, i) => {
|
|
2363
2363
|
let l = null;
|
|
2364
2364
|
r("reportSharing-addPerson");
|
|
2365
2365
|
try {
|
|
@@ -2378,25 +2378,25 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2378
2378
|
return l;
|
|
2379
2379
|
}, [t, e, r, s]) };
|
|
2380
2380
|
}, di = ({ isOpen: e, onHide: t, usersData: r, reportVersionId: s, EmployeePicker: a, setReportVersion: o }) => {
|
|
2381
|
-
const { ProjectIconComponent: i, texts: { reports: l } } = q(
|
|
2382
|
-
o((
|
|
2383
|
-
...
|
|
2381
|
+
const { ProjectIconComponent: i, texts: { reports: l } } = q(fe), { confirm: c } = Rt(), [d, u] = F(null), { changeEmployeeRights: m } = ci(s), v = D((h) => {
|
|
2382
|
+
o((x) => x === null ? null : {
|
|
2383
|
+
...x,
|
|
2384
2384
|
users: h.filter((j) => j.isReportOwner === !1)
|
|
2385
2385
|
});
|
|
2386
|
-
}, [o]), f =
|
|
2386
|
+
}, [o]), f = D(async () => {
|
|
2387
2387
|
if (d === null)
|
|
2388
2388
|
return;
|
|
2389
2389
|
const h = await m(d.id, !0);
|
|
2390
2390
|
v(h), u(null);
|
|
2391
|
-
}, [d, m, v]), p =
|
|
2391
|
+
}, [d, m, v]), p = D(async (h) => {
|
|
2392
2392
|
if (!await c(l.removeSharingWith(h)))
|
|
2393
2393
|
return;
|
|
2394
2394
|
const j = await m(h, !1);
|
|
2395
2395
|
v(j);
|
|
2396
2396
|
}, [m, c, l, v]);
|
|
2397
|
-
return /* @__PURE__ */ n.jsxs(
|
|
2398
|
-
/* @__PURE__ */ n.jsx(
|
|
2399
|
-
/* @__PURE__ */ n.jsxs(
|
|
2397
|
+
return /* @__PURE__ */ n.jsxs(Ye, { show: e, onHide: t, children: [
|
|
2398
|
+
/* @__PURE__ */ n.jsx(Ye.Header, { closeButton: !0, children: /* @__PURE__ */ n.jsx(Ye.Title, { children: l.reportSharing }) }),
|
|
2399
|
+
/* @__PURE__ */ n.jsxs(Ye.Body, { children: [
|
|
2400
2400
|
/* @__PURE__ */ n.jsx(X, { variant: "h6", children: l.sharedWith }),
|
|
2401
2401
|
/* @__PURE__ */ n.jsxs(ho, { variant: "flush", children: [
|
|
2402
2402
|
r && r.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-2 text-muted", children: l.noone.toLowerCase() }) : null,
|
|
@@ -2407,7 +2407,7 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2407
2407
|
" [",
|
|
2408
2408
|
h.id,
|
|
2409
2409
|
"]",
|
|
2410
|
-
/* @__PURE__ */ n.jsx(
|
|
2410
|
+
/* @__PURE__ */ n.jsx(ne, { color: "danger", onClick: () => p(h.id), children: /* @__PURE__ */ n.jsx(i, { icon: "delete" }) })
|
|
2411
2411
|
] }, h.id))
|
|
2412
2412
|
] }),
|
|
2413
2413
|
/* @__PURE__ */ n.jsx(X, { variant: "h6", className: "mt-2 mb-2", children: l.addSharing }),
|
|
@@ -2431,81 +2431,81 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2431
2431
|
s(o);
|
|
2432
2432
|
});
|
|
2433
2433
|
}, [t, e]), { mappings: r };
|
|
2434
|
-
},
|
|
2435
|
-
const { texts: { reports: m } } = q(
|
|
2436
|
-
const
|
|
2437
|
-
f(Et(a(e), { id:
|
|
2434
|
+
}, Ld = ({ reportType: e, title: t, data: r, filterElements: s, getReportRoute: a, localization: o, licenseKey: i, EmployeePicker: l, localizationJsonFile: c, localizationTransformer: d, hyperlinkColumn: u }) => {
|
|
2435
|
+
const { texts: { reports: m } } = q(fe), { confirm: v } = Rt(), f = Lr(), { id: p } = Va(), h = J(() => p === void 0 ? null : Number(p), [p]), x = D((C) => {
|
|
2436
|
+
const z = C === null ? "" : C.toString();
|
|
2437
|
+
f(Et(a(e), { id: z }), {
|
|
2438
2438
|
replace: !0
|
|
2439
2439
|
});
|
|
2440
|
-
}, [a, f, e]), [j, w] = F(!1), y = Z(null), { user:
|
|
2440
|
+
}, [a, f, e]), [j, w] = F(!1), y = Z(null), { user: g } = q(At), { data: N, reloadData: I } = Rn(`/reports/${e}`), { mappings: E } = ui(c, d), [S, T] = F({}), _ = D((C) => {
|
|
2441
2441
|
if (N === null)
|
|
2442
2442
|
return;
|
|
2443
|
-
const
|
|
2444
|
-
|
|
2445
|
-
}, [N,
|
|
2446
|
-
await I(),
|
|
2447
|
-
}, [I,
|
|
2443
|
+
const z = C.target.value, re = z === "" ? null : Number(z);
|
|
2444
|
+
x(re);
|
|
2445
|
+
}, [N, x]), R = D(async (C) => {
|
|
2446
|
+
await I(), x(C);
|
|
2447
|
+
}, [I, x]), { data: k, setData: $ } = Rn(`/reports/version/${h}`, { enabled: h !== null });
|
|
2448
2448
|
B(() => {
|
|
2449
|
-
var
|
|
2449
|
+
var z;
|
|
2450
2450
|
if (N === null)
|
|
2451
2451
|
return;
|
|
2452
|
-
if (
|
|
2453
|
-
|
|
2452
|
+
if (k === null) {
|
|
2453
|
+
T({});
|
|
2454
2454
|
return;
|
|
2455
2455
|
}
|
|
2456
|
-
const
|
|
2457
|
-
|
|
2458
|
-
}, [N,
|
|
2459
|
-
const { save:
|
|
2456
|
+
const C = ai(k) ?? {};
|
|
2457
|
+
T(C), (z = y.current) == null || z.flexmonster.refresh();
|
|
2458
|
+
}, [N, k, h]);
|
|
2459
|
+
const { save: L, saveAs: P, archive: O, detach: A } = li(e, y, h, R), W = J(() => ({
|
|
2460
2460
|
data: r ?? [],
|
|
2461
|
-
mapping:
|
|
2462
|
-
}), [r,
|
|
2463
|
-
var
|
|
2464
|
-
await v(m.confirmRevertChanges) && ((
|
|
2465
|
-
}, [v,
|
|
2466
|
-
var
|
|
2467
|
-
return (
|
|
2468
|
-
}, [
|
|
2469
|
-
await v(m.confirmDelete(
|
|
2470
|
-
}, [
|
|
2471
|
-
await v(m.confirmDetach(
|
|
2472
|
-
}, [v,
|
|
2461
|
+
mapping: E ?? void 0
|
|
2462
|
+
}), [r, E]), U = D(async () => {
|
|
2463
|
+
var z;
|
|
2464
|
+
await v(m.confirmRevertChanges) && ((z = y.current) == null || z.flexmonster.setReport({ dataSource: W, ...S }));
|
|
2465
|
+
}, [v, W, m.confirmRevertChanges, S]), H = J(() => (k == null ? void 0 : k.ownerId) === g.personalNumber, [k == null ? void 0 : k.ownerId, g.personalNumber]), K = J(() => {
|
|
2466
|
+
var C;
|
|
2467
|
+
return (C = k == null ? void 0 : k.users) == null ? void 0 : C.some((z) => z.id === g.personalNumber && !z.isReportOwner);
|
|
2468
|
+
}, [k == null ? void 0 : k.users, g.personalNumber]), ee = D(async () => {
|
|
2469
|
+
await v(m.confirmDelete(k == null ? void 0 : k.name)) && (await O(), x(null), await I());
|
|
2470
|
+
}, [O, v, I, k == null ? void 0 : k.name, m, x]), le = D(async () => {
|
|
2471
|
+
await v(m.confirmDetach(k == null ? void 0 : k.name)) && (await A(), x(null), await I());
|
|
2472
|
+
}, [v, A, I, k == null ? void 0 : k.name, m, x]);
|
|
2473
2473
|
return B(() => {
|
|
2474
|
-
var
|
|
2475
|
-
h === null &&
|
|
2476
|
-
}, [N == null ? void 0 : N.reportVersions, h,
|
|
2474
|
+
var C, z;
|
|
2475
|
+
h === null && x(((C = N == null ? void 0 : N.reportVersions.find((re) => re.isSystem === !0)) == null ? void 0 : C.reportVersionId) ?? ((z = N == null ? void 0 : N.reportVersions[0]) == null ? void 0 : z.reportVersionId) ?? null);
|
|
2476
|
+
}, [N == null ? void 0 : N.reportVersions, h, x]), console.log(W), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2477
2477
|
/* @__PURE__ */ n.jsx(Ya, { title: /* @__PURE__ */ n.jsxs("div", { className: "d-flex justify-content-start gap-3", children: [
|
|
2478
2478
|
/* @__PURE__ */ n.jsx(X, { variant: "h3", children: t }),
|
|
2479
2479
|
s,
|
|
2480
2480
|
/* @__PURE__ */ n.jsxs("div", { className: "d-flex gap-1 align-items-center", children: [
|
|
2481
|
-
/* @__PURE__ */ n.jsxs(ha, { size: "sm", value: h ?? void 0, onChange:
|
|
2482
|
-
/* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectSystem, children: N == null ? void 0 : N.reportVersions.filter((
|
|
2483
|
-
/* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectYour, children: N == null ? void 0 : N.reportVersions.filter((
|
|
2484
|
-
/* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectSharedWithYou, children: N == null ? void 0 : N.reportVersions.filter((
|
|
2481
|
+
/* @__PURE__ */ n.jsxs(ha, { size: "sm", value: h ?? void 0, onChange: _, children: [
|
|
2482
|
+
/* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectSystem, children: N == null ? void 0 : N.reportVersions.filter((C) => C.isSystem === !0).map((C) => /* @__PURE__ */ n.jsx("option", { value: C.reportVersionId, children: C.name }, C.reportVersionId)) }),
|
|
2483
|
+
/* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectYour, children: N == null ? void 0 : N.reportVersions.filter((C) => C.ownerId === g.personalNumber).map((C) => /* @__PURE__ */ n.jsx("option", { value: C.reportVersionId, children: C.name }, C.reportVersionId)) }),
|
|
2484
|
+
/* @__PURE__ */ n.jsx("optgroup", { label: m.versionSelectSharedWithYou, children: N == null ? void 0 : N.reportVersions.filter((C) => C.isSystem === !1 && C.ownerId !== g.personalNumber).map((C) => /* @__PURE__ */ n.jsx("option", { value: C.reportVersionId, children: `${C.name} [${C.ownerId}]` }, C.reportVersionId)) })
|
|
2485
2485
|
] }),
|
|
2486
|
-
/* @__PURE__ */ n.jsx(
|
|
2487
|
-
/* @__PURE__ */ n.jsx(
|
|
2486
|
+
/* @__PURE__ */ n.jsx(Me, { icon: /* @__PURE__ */ n.jsx(ga, {}), onClick: L, disabled: h === null || (k == null ? void 0 : k.isSystem) || !H, children: m.save }),
|
|
2487
|
+
/* @__PURE__ */ n.jsx(Me, { icon: /* @__PURE__ */ n.jsx(pa, {}), onClick: P, className: "flex-shrink-0", children: m.saveAs }),
|
|
2488
2488
|
/* @__PURE__ */ n.jsxs(Bt, { toggle: /* @__PURE__ */ n.jsx(Vt, { as: vn }), children: [
|
|
2489
|
-
/* @__PURE__ */ n.jsx(
|
|
2490
|
-
/* @__PURE__ */ n.jsx(
|
|
2491
|
-
|
|
2492
|
-
K && !(
|
|
2489
|
+
/* @__PURE__ */ n.jsx(Ge, { onClick: U, children: m.revertChanges }),
|
|
2490
|
+
/* @__PURE__ */ n.jsx(Ge, { onClick: () => w(!0), disabled: !H || (k == null ? void 0 : k.isSystem), children: m.share }),
|
|
2491
|
+
H && !(k != null && k.isSystem) ? /* @__PURE__ */ n.jsx(Ge, { color: "danger", onClick: ee, children: m.delete }) : null,
|
|
2492
|
+
K && !(k != null && k.isSystem) ? /* @__PURE__ */ n.jsx(Ge, { color: "danger", onClick: le, children: m.detach }) : null
|
|
2493
2493
|
] })
|
|
2494
2494
|
] })
|
|
2495
|
-
] }), children: /* @__PURE__ */ n.jsx("div", { className: b("h-100 w-100",
|
|
2496
|
-
|
|
2495
|
+
] }), children: /* @__PURE__ */ n.jsx("div", { className: b("h-100 w-100", W.data && W.data.length > 0 ? "" : "d-none"), children: /* @__PURE__ */ n.jsx(ii, { dataSource: W, settings: S, pivotRef: y, enabled: W.data && W.data.length > 0, localization: o, licenseKey: i, hyperlinkColumn: u }) }) }),
|
|
2496
|
+
k !== null ? /* @__PURE__ */ n.jsx(
|
|
2497
2497
|
di,
|
|
2498
2498
|
{
|
|
2499
2499
|
isOpen: j,
|
|
2500
2500
|
onHide: () => w(!1),
|
|
2501
|
-
usersData:
|
|
2502
|
-
setReportVersion:
|
|
2503
|
-
reportVersionId:
|
|
2501
|
+
usersData: k.users ?? null,
|
|
2502
|
+
setReportVersion: $,
|
|
2503
|
+
reportVersionId: k == null ? void 0 : k.reportVersionId,
|
|
2504
2504
|
EmployeePicker: l
|
|
2505
2505
|
}
|
|
2506
2506
|
) : null
|
|
2507
2507
|
] });
|
|
2508
|
-
},
|
|
2508
|
+
}, Rd = ({ cell: { value: e } }) => /* @__PURE__ */ n.jsx(n.Fragment, { children: e ? /* @__PURE__ */ n.jsx(Er, { name: e, size: 21, fontSize: 12 }) : /* @__PURE__ */ n.jsx(n.Fragment, {}) }), fi = ({ 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: {
|
|
2509
2509
|
height: "14px",
|
|
2510
2510
|
width: "14px",
|
|
2511
2511
|
borderRadius: "50%",
|
|
@@ -2514,7 +2514,7 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2514
2514
|
}, className: b(`border-${s}`, t.includes(s) && `bg-${s}`), onClick: () => {
|
|
2515
2515
|
t.includes(s) ? r(t.filter((a) => a !== s)) : r([...t, s]);
|
|
2516
2516
|
} }, s)) }), mi = ({ 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 }), hi = ({ message: e, onDeleteMessage: t, onClickMessage: r, getIcon: s, getLinksTo: a }) => {
|
|
2517
|
-
const { ProjectIconComponent: o, localizationContext: i } = q(
|
|
2517
|
+
const { ProjectIconComponent: o, localizationContext: i } = q(fe), { dateFnsLocale: l } = q(i), c = e.dateTime ? yt(e.dateTime) : null, d = c ? Qa(new Date(Date.now()), c) : 0;
|
|
2518
2518
|
return /* @__PURE__ */ n.jsxs("div", { children: [
|
|
2519
2519
|
c && /* @__PURE__ */ n.jsx("div", { className: "d-flex justify-content-end", children: /* @__PURE__ */ n.jsx(zt, { text: jt(c, "dd.MM.yyyy HH:mm"), placement: "left", children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(X, { variant: "caption", children: d > 2 ? jt(c, "dd.MM.yyyy") : Ja(c, new Date(Date.now()), {
|
|
2520
2520
|
locale: l.code
|
|
@@ -2524,7 +2524,7 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2524
2524
|
/* @__PURE__ */ n.jsxs("div", { className: "d-flex flex-column gap-1 w-100", children: [
|
|
2525
2525
|
/* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-start justify-content-between gap-3", children: [
|
|
2526
2526
|
/* @__PURE__ */ n.jsx(X, { variant: "body2", className: "fw-bold", children: e.subject }),
|
|
2527
|
-
/* @__PURE__ */ n.jsx(
|
|
2527
|
+
/* @__PURE__ */ n.jsx(ne, { size: "sm", onClick: (u) => {
|
|
2528
2528
|
u.preventDefault(), u.stopPropagation(), t(e.id);
|
|
2529
2529
|
}, children: /* @__PURE__ */ n.jsx(o, { icon: "delete" }) })
|
|
2530
2530
|
] }),
|
|
@@ -2533,21 +2533,21 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2533
2533
|
] }) }) })
|
|
2534
2534
|
] });
|
|
2535
2535
|
}, rr = ["info", "warning", "danger"], sr = ({ messages: e, isLoading: t, onDeleteMessage: r, onClickMessage: s, getIcon: a, getLinksTo: o }) => {
|
|
2536
|
-
const { texts: { messageBoard: i } } = q(
|
|
2536
|
+
const { texts: { messageBoard: i } } = q(fe), [l, c] = F(rr), d = J(() => e.filter((u) => l.includes(u.type ?? "")), [l, e]);
|
|
2537
2537
|
return /* @__PURE__ */ n.jsxs("div", { className: "h-100 d-flex flex-column overflow-hidden", children: [
|
|
2538
2538
|
/* @__PURE__ */ n.jsx(fi, { knownTypes: rr, typeFilters: l, onChangeTypeFilters: (u) => c(u) }),
|
|
2539
2539
|
t && /* @__PURE__ */ n.jsxs("div", { className: "p-3 w-100", children: [
|
|
2540
|
-
/* @__PURE__ */ n.jsx(
|
|
2541
|
-
/* @__PURE__ */ n.jsxs(
|
|
2542
|
-
/* @__PURE__ */ n.jsx(
|
|
2540
|
+
/* @__PURE__ */ n.jsx(He, { as: Wn.Title, animation: "glow", children: /* @__PURE__ */ n.jsx(He, { xs: 6 }) }),
|
|
2541
|
+
/* @__PURE__ */ n.jsxs(He, { as: Wn.Text, animation: "glow", children: [
|
|
2542
|
+
/* @__PURE__ */ n.jsx(He, { xs: 7 }),
|
|
2543
2543
|
" ",
|
|
2544
|
-
/* @__PURE__ */ n.jsx(
|
|
2544
|
+
/* @__PURE__ */ n.jsx(He, { xs: 4 }),
|
|
2545
2545
|
" ",
|
|
2546
|
-
/* @__PURE__ */ n.jsx(
|
|
2546
|
+
/* @__PURE__ */ n.jsx(He, { xs: 4 }),
|
|
2547
2547
|
" ",
|
|
2548
|
-
/* @__PURE__ */ n.jsx(
|
|
2548
|
+
/* @__PURE__ */ n.jsx(He, { xs: 6 }),
|
|
2549
2549
|
" ",
|
|
2550
|
-
/* @__PURE__ */ n.jsx(
|
|
2550
|
+
/* @__PURE__ */ n.jsx(He, { xs: 8 })
|
|
2551
2551
|
] })
|
|
2552
2552
|
] }),
|
|
2553
2553
|
!t && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
@@ -2558,40 +2558,40 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2558
2558
|
}, Xt = {
|
|
2559
2559
|
apiGet: "/messageBoard",
|
|
2560
2560
|
apiDelete: "/messageBoard/"
|
|
2561
|
-
},
|
|
2562
|
-
const l = st(), [c, d] = F([]), [u, m] = F(!1), [v, f] = F(!1), [p, h] = F(!1),
|
|
2561
|
+
}, Ad = ({ renderAsNotifPanel: e, notifIcon: t, apiUrls: { apiGet: r = Xt.apiGet, apiDelete: s = Xt.apiDelete } = Xt, getIcon: a, getLinksTo: o }) => {
|
|
2562
|
+
const l = st(), [c, d] = F([]), [u, m] = F(!1), [v, f] = F(!1), [p, h] = F(!1), x = D(async () => {
|
|
2563
2563
|
f(!0), await l.get(r).then(({ data: N }) => {
|
|
2564
2564
|
d(N), m(!0), f(!1);
|
|
2565
2565
|
}).catch(() => {
|
|
2566
2566
|
d([]), f(!1);
|
|
2567
2567
|
});
|
|
2568
|
-
}, [r, l]), j =
|
|
2568
|
+
}, [r, l]), j = D(async (N) => l.delete(`${s}${N}`).then(() => !0).catch(() => !1), [s, l]), w = D((N) => {
|
|
2569
2569
|
j(N).then((I) => {
|
|
2570
|
-
I && d(c.filter((
|
|
2570
|
+
I && d(c.filter((E) => E.id !== N));
|
|
2571
2571
|
});
|
|
2572
2572
|
}, [j, c]);
|
|
2573
2573
|
B(() => {
|
|
2574
|
-
|
|
2575
|
-
const N = setInterval(() =>
|
|
2574
|
+
x();
|
|
2575
|
+
const N = setInterval(() => x(), 60 * 1e3);
|
|
2576
2576
|
return () => {
|
|
2577
2577
|
clearInterval(N);
|
|
2578
2578
|
};
|
|
2579
|
-
}, [
|
|
2580
|
-
const y = c.filter((N) => N.type === "danger").length,
|
|
2579
|
+
}, [x]);
|
|
2580
|
+
const y = c.filter((N) => N.type === "danger").length, g = u ? !1 : v;
|
|
2581
2581
|
return e ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2582
2582
|
/* @__PURE__ */ n.jsxs("div", { className: "position-relative", children: [
|
|
2583
|
-
/* @__PURE__ */ n.jsx(
|
|
2583
|
+
/* @__PURE__ */ n.jsx(ne, { size: "md", onClick: () => h(!p), children: t }),
|
|
2584
2584
|
y > 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: y })
|
|
2585
2585
|
] }),
|
|
2586
|
-
/* @__PURE__ */ n.jsx(Gn, { show: p, onHide: () => h(!1), placement: "end", children: /* @__PURE__ */ n.jsx(Gn.Body, { children: /* @__PURE__ */ n.jsx(sr, { messages: c, isLoading:
|
|
2587
|
-
] }) : /* @__PURE__ */ n.jsx(sr, { messages: c, isLoading:
|
|
2586
|
+
/* @__PURE__ */ n.jsx(Gn, { show: p, onHide: () => h(!1), placement: "end", children: /* @__PURE__ */ n.jsx(Gn.Body, { children: /* @__PURE__ */ n.jsx(sr, { messages: c, isLoading: g, onDeleteMessage: w, onClickMessage: () => h(!1), getIcon: a, getLinksTo: o }) }) })
|
|
2587
|
+
] }) : /* @__PURE__ */ n.jsx(sr, { messages: c, isLoading: g, onDeleteMessage: w, getIcon: a, getLinksTo: o });
|
|
2588
2588
|
}, gi = "_tab-panel_d8l8q_1", pi = "_full-height-no-overflow_d8l8q_5", xi = "_disabled_d8l8q_12", en = {
|
|
2589
2589
|
"tab-panel": "_tab-panel_d8l8q_1",
|
|
2590
2590
|
tabPanel: gi,
|
|
2591
2591
|
"full-height-no-overflow": "_full-height-no-overflow_d8l8q_5",
|
|
2592
2592
|
fullHeightNoOverflow: pi,
|
|
2593
2593
|
disabled: xi
|
|
2594
|
-
},
|
|
2594
|
+
}, Md = ({ eventKey: e, activeTab: t, fullHeightNoOverflow: r, disabled: s, className: a, children: o }) => e !== t ? null : /* @__PURE__ */ n.jsx("div", { className: b("luminus-tab-panel", en.tabPanel, { [en.fullHeightNoOverflow]: r }, { disabled: s }, { [en.disabled]: s }, a), children: o }), vi = "_join-line_1q9e8_1", ji = {
|
|
2595
2595
|
"join-line": "_join-line_1q9e8_1",
|
|
2596
2596
|
joinLine: vi
|
|
2597
2597
|
}, yi = ({ 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 }, {
|
|
@@ -2613,11 +2613,11 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2613
2613
|
vertical: _i
|
|
2614
2614
|
}, Ni = ({ 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", tn.tab, t, {
|
|
2615
2615
|
disabled: s
|
|
2616
|
-
}, { [tn.disabled]: s }, { vertical: a }, { [tn.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 }),
|
|
2616
|
+
}, { [tn.disabled]: s }, { vertical: a }, { [tn.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 }), Bd = ({ tabs: e, activeTab: t, onSelect: r, ...s }) => {
|
|
2617
2617
|
var i;
|
|
2618
|
-
const { ProjectIconComponent: a } = q(
|
|
2619
|
-
return o ? /* @__PURE__ */ n.jsx(Bt, { toggle: /* @__PURE__ */ n.jsx(Vt, { as: vn, text: ((i = e.find((l) => l.id === t)) == null ? void 0 : i.name) ?? "", icon: /* @__PURE__ */ n.jsx(a, { icon: "chevron-down" }) }), ...s, children: e.map((l) => /* @__PURE__ */ n.jsx(
|
|
2620
|
-
}, Si = "_widgets-row_13gg1_1", Ci = "_widget_13gg1_1", ki = "_widget-img_13gg1_5", Ii = "_widget-title-spacer_13gg1_14", Di = "_widget-title_13gg1_14", $i = "_title_13gg1_28",
|
|
2618
|
+
const { ProjectIconComponent: a } = q(fe), { isMobile: o } = yn();
|
|
2619
|
+
return o ? /* @__PURE__ */ n.jsx(Bt, { toggle: /* @__PURE__ */ n.jsx(Vt, { as: vn, text: ((i = e.find((l) => l.id === t)) == null ? void 0 : i.name) ?? "", icon: /* @__PURE__ */ n.jsx(a, { icon: "chevron-down" }) }), ...s, children: e.map((l) => /* @__PURE__ */ n.jsx(Ge, { onClick: () => r(l.id), children: l.name }, l.id)) }) : /* @__PURE__ */ n.jsx(yi, { activeTab: t, onSelect: (l) => r(l), ...s, children: e.map((l) => /* @__PURE__ */ n.jsx(Ni, { eventKey: l.id, children: l.name }, l.id)) });
|
|
2620
|
+
}, Si = "_widgets-row_13gg1_1", Ci = "_widget_13gg1_1", ki = "_widget-img_13gg1_5", Ii = "_widget-title-spacer_13gg1_14", Di = "_widget-title_13gg1_14", $i = "_title_13gg1_28", ke = {
|
|
2621
2621
|
"widgets-row": "_widgets-row_13gg1_1",
|
|
2622
2622
|
widgetsRow: Si,
|
|
2623
2623
|
widget: Ci,
|
|
@@ -2630,28 +2630,28 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2630
2630
|
title: $i
|
|
2631
2631
|
}, Ei = ({ show: e, widgetGroups: t, widgets: r, handleClose: s, onWidgetPicked: a, texts: o }) => {
|
|
2632
2632
|
const [i, l] = F(""), c = J(() => r.filter((u) => u.id !== -1 && wt(u.name, i)), [r, i]), d = J(() => t.filter((u) => c.some((m) => m.group === u.id)), [t, c]);
|
|
2633
|
-
return /* @__PURE__ */ n.jsxs(
|
|
2634
|
-
/* @__PURE__ */ n.jsxs(
|
|
2635
|
-
/* @__PURE__ */ n.jsx(
|
|
2636
|
-
/* @__PURE__ */ n.jsx(
|
|
2633
|
+
return /* @__PURE__ */ n.jsxs(Ye, { show: e, onHide: () => s(), size: "lg", children: [
|
|
2634
|
+
/* @__PURE__ */ n.jsxs(Ye.Header, { closeButton: !0, children: [
|
|
2635
|
+
/* @__PURE__ */ n.jsx(Ye.Title, { className: "w-100", children: o.pickWidgetToAdd }),
|
|
2636
|
+
/* @__PURE__ */ n.jsx(ve.Control, { type: "search", size: "sm", value: i, placeholder: o.searchPlaceholder, onChange: (u) => {
|
|
2637
2637
|
var m;
|
|
2638
2638
|
return l(((m = u.target) == null ? void 0 : m.value) ?? "");
|
|
2639
2639
|
}, className: "me-3", style: { maxWidth: "200px" } })
|
|
2640
2640
|
] }),
|
|
2641
|
-
/* @__PURE__ */ n.jsx(
|
|
2642
|
-
d.map((u) => /* @__PURE__ */ n.jsx(un, { defaultOpen: !0, title: u.name ?? "", children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className: b("row gx-3 gy-3",
|
|
2643
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
2641
|
+
/* @__PURE__ */ n.jsx(Ye.Body, { className: "flex-column gap-3", children: c.length === 0 ? /* @__PURE__ */ n.jsx(Dn, { variant: "warning", children: o.noWidgets }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2642
|
+
d.map((u) => /* @__PURE__ */ n.jsx(un, { defaultOpen: !0, title: u.name ?? "", children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className: b("row gx-3 gy-3", ke.widgetsRow), children: c.filter((m) => m.group === u.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", ke.widget), onClick: () => a(m.id), children: [
|
|
2643
|
+
/* @__PURE__ */ n.jsx("div", { className: ke.widgetImg, style: {
|
|
2644
2644
|
backgroundImage: m.img ? `url(${m.img})` : void 0
|
|
2645
2645
|
} }),
|
|
2646
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
2647
|
-
/* @__PURE__ */ n.jsx("div", { className: b(
|
|
2646
|
+
/* @__PURE__ */ n.jsx("div", { className: ke.widgetTitleSpacer }),
|
|
2647
|
+
/* @__PURE__ */ n.jsx("div", { className: b(ke.widgetTitle, "rounded"), children: /* @__PURE__ */ n.jsx(X, { variant: "body", className: b(ke.title, "text-white text-truncate"), children: m.name }) })
|
|
2648
2648
|
] }, m.id) })) }) }) }, u.id)),
|
|
2649
|
-
c.some((u) => u.group === void 0) && /* @__PURE__ */ n.jsx(un, { 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",
|
|
2650
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
2649
|
+
c.some((u) => u.group === void 0) && /* @__PURE__ */ n.jsx(un, { 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", ke.widgetsRow), children: c.filter((u) => u.group === void 0).map((u) => /* @__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", ke.widget), onClick: () => a(u.id), children: [
|
|
2650
|
+
/* @__PURE__ */ n.jsx("div", { className: ke.widgetImg, style: {
|
|
2651
2651
|
backgroundImage: u.img ? `url(${u.img})` : void 0
|
|
2652
2652
|
} }),
|
|
2653
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
2654
|
-
/* @__PURE__ */ n.jsx("div", { className: b(
|
|
2653
|
+
/* @__PURE__ */ n.jsx("div", { className: ke.widgetTitleSpacer }),
|
|
2654
|
+
/* @__PURE__ */ n.jsx("div", { className: b(ke.widgetTitle, "rounded"), children: /* @__PURE__ */ n.jsx(X, { variant: "body", className: b(ke.title, "text-white text-truncate"), children: u.name }) })
|
|
2655
2655
|
] }, u.id) })) }) }) })
|
|
2656
2656
|
] }) })
|
|
2657
2657
|
] });
|
|
@@ -2663,12 +2663,12 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2663
2663
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2664
2664
|
/* @__PURE__ */ n.jsx("div", { className: b("luminus-empty-widget", ar.widget, {
|
|
2665
2665
|
[ar.mobile]: i
|
|
2666
|
-
}), children: /* @__PURE__ */ n.jsx(
|
|
2666
|
+
}), children: /* @__PURE__ */ n.jsx(ne, { onClick: () => o(!0), children: /* @__PURE__ */ n.jsx(xa, {}) }) }),
|
|
2667
2667
|
/* @__PURE__ */ n.jsx(Ei, { show: a, widgetGroups: e, widgets: t, handleClose: () => o(!1), onWidgetPicked: (l) => {
|
|
2668
2668
|
o(!1), r(l);
|
|
2669
2669
|
}, texts: s })
|
|
2670
2670
|
] });
|
|
2671
|
-
}, Ti = "_dashboard_if2cc_1", Li = "_widgets-grid_if2cc_1", Ri = "_widget-wrapper_if2cc_8", Ai = "_full-width_if2cc_13", Mi = "_widget-edit_if2cc_16", Bi = "_remove-icon_if2cc_19", Vi = "_full-width-icon_if2cc_26", zi = "_widget-edit-overlay_if2cc_36", Pi = "_mobile_if2cc_45",
|
|
2671
|
+
}, Ti = "_dashboard_if2cc_1", Li = "_widgets-grid_if2cc_1", Ri = "_widget-wrapper_if2cc_8", Ai = "_full-width_if2cc_13", Mi = "_widget-edit_if2cc_16", Bi = "_remove-icon_if2cc_19", Vi = "_full-width-icon_if2cc_26", zi = "_widget-edit-overlay_if2cc_36", Pi = "_mobile_if2cc_45", Le = {
|
|
2672
2672
|
dashboard: Ti,
|
|
2673
2673
|
"widgets-grid": "_widgets-grid_if2cc_1",
|
|
2674
2674
|
widgetsGrid: Li,
|
|
@@ -2691,42 +2691,42 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2691
2691
|
const a = localStorage.getItem("dashboardConfig");
|
|
2692
2692
|
a ? r(JSON.parse(a)) : e && r(e);
|
|
2693
2693
|
}, [e]);
|
|
2694
|
-
const s =
|
|
2694
|
+
const s = D((a) => {
|
|
2695
2695
|
r(a), localStorage.setItem("dashboardConfig", JSON.stringify(a));
|
|
2696
2696
|
}, []);
|
|
2697
2697
|
return { dashboardConfig: t, onChangeDashboardConfig: s };
|
|
2698
|
-
},
|
|
2698
|
+
}, Vd = ({ widgetGroups: e, availableWidgets: t, editMode: r, defaultDashboardConfig: s }) => {
|
|
2699
2699
|
var v;
|
|
2700
|
-
const { texts: { homeDashboard: a } } = q(
|
|
2701
|
-
var h,
|
|
2700
|
+
const { texts: { homeDashboard: a } } = q(fe), { dashboardConfig: o, onChangeDashboardConfig: i } = Wi(s), l = D((f, p) => {
|
|
2701
|
+
var h, x;
|
|
2702
2702
|
f === ((h = o.widgets) == null ? void 0 : h.length) ? i({
|
|
2703
2703
|
...o,
|
|
2704
2704
|
widgets: [...o.widgets, { widgetId: p, fullWidth: !1 }]
|
|
2705
2705
|
}) : i({
|
|
2706
2706
|
...o,
|
|
2707
|
-
widgets: ((
|
|
2707
|
+
widgets: ((x = o.widgets) == null ? void 0 : x.map((j, w) => w === f ? { widgetId: p, fullWidth: !1 } : j)) ?? []
|
|
2708
2708
|
});
|
|
2709
|
-
}, [o, i]), c =
|
|
2709
|
+
}, [o, i]), c = D((f) => {
|
|
2710
2710
|
var p, h;
|
|
2711
2711
|
((p = o.widgets[f]) == null ? void 0 : p.widgetId) === -1 ? i({
|
|
2712
2712
|
...o,
|
|
2713
|
-
widgets: ((h = o.widgets) == null ? void 0 : h.filter((
|
|
2713
|
+
widgets: ((h = o.widgets) == null ? void 0 : h.filter((x, j) => j !== f)) ?? []
|
|
2714
2714
|
}) : l(f, -1);
|
|
2715
|
-
}, [o, i, l]), d =
|
|
2715
|
+
}, [o, i, l]), d = D((f) => {
|
|
2716
2716
|
var p;
|
|
2717
2717
|
i({
|
|
2718
2718
|
...o,
|
|
2719
|
-
widgets: ((p = o.widgets) == null ? void 0 : p.map((h,
|
|
2719
|
+
widgets: ((p = o.widgets) == null ? void 0 : p.map((h, x) => x === f ? { ...h, fullWidth: !h.fullWidth } : h)) ?? []
|
|
2720
2720
|
});
|
|
2721
|
-
}, [o, i]), u =
|
|
2722
|
-
[
|
|
2723
|
-
}, { [
|
|
2721
|
+
}, [o, i]), u = D((f, p, h) => f ? /* @__PURE__ */ n.jsxs("div", { className: b(Le.widgetWrapper, {
|
|
2722
|
+
[Le.widgetEdit]: r && f.id !== -1
|
|
2723
|
+
}, { [Le.fullWidth]: h }), children: [
|
|
2724
2724
|
r && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2725
|
-
/* @__PURE__ */ n.jsx(
|
|
2726
|
-
/* @__PURE__ */ n.jsx(
|
|
2725
|
+
/* @__PURE__ */ n.jsx(ne, { color: "danger", onClick: () => c(p), className: b(Le.removeIcon), children: /* @__PURE__ */ n.jsx(Or, {}) }),
|
|
2726
|
+
/* @__PURE__ */ n.jsx(ne, { color: h ? "danger" : "primary", onClick: () => d(p), className: b(Le.fullWidthIcon), children: /* @__PURE__ */ n.jsx(va, {}) })
|
|
2727
2727
|
] }),
|
|
2728
|
-
f.id === -1 ? r && /* @__PURE__ */ n.jsx("div", { className:
|
|
2729
|
-
f.id > -1 && r && /* @__PURE__ */ n.jsx("div", { className:
|
|
2728
|
+
f.id === -1 ? r && /* @__PURE__ */ n.jsx("div", { className: Le.widgetWrapper, children: /* @__PURE__ */ n.jsx(or, { widgetGroups: e, availableWidgets: t, onAdd: (x) => l(p, x), texts: a }) }) : /* @__PURE__ */ n.jsx(Fo, { title: f.title, children: /* @__PURE__ */ n.jsx(f.WidgetElement, { title: f.title }) }),
|
|
2729
|
+
f.id > -1 && r && /* @__PURE__ */ n.jsx("div", { className: Le.widgetEditOverlay })
|
|
2730
2730
|
] }, p) : /* @__PURE__ */ n.jsx(n.Fragment, {}), [
|
|
2731
2731
|
r,
|
|
2732
2732
|
e,
|
|
@@ -2736,7 +2736,7 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2736
2736
|
t,
|
|
2737
2737
|
a
|
|
2738
2738
|
]), { isMobile: m } = yn();
|
|
2739
|
-
return /* @__PURE__ */ n.jsx("div", { className: b(
|
|
2739
|
+
return /* @__PURE__ */ n.jsx("div", { className: b(Le.dashboard, { [Le.mobile]: m }), children: /* @__PURE__ */ n.jsxs("div", { className: b(Le.widgetsGrid), children: [
|
|
2740
2740
|
(v = o.widgets) == null ? void 0 : v.map((f, p) => u(t.find((h) => h.id === f.widgetId), p, f.fullWidth)),
|
|
2741
2741
|
r && /* @__PURE__ */ n.jsx(or, { widgetGroups: e, availableWidgets: t, onAdd: (f) => {
|
|
2742
2742
|
var p;
|
|
@@ -2749,7 +2749,7 @@ const Nd = ({ InputContainer: e = nt, value: t, onChange: r, debounceMs: s, labe
|
|
|
2749
2749
|
md: Yi,
|
|
2750
2750
|
lg: Gi,
|
|
2751
2751
|
light: Ki
|
|
2752
|
-
},
|
|
2752
|
+
}, zd = ({ 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" }, { [nn.light]: t === "light" }, nn.badge, nn[r]), ...o, children: e }), qi = "_collapse-icon_1ahhn_1", Qi = "_collapsed_1ahhn_6", ir = {
|
|
2753
2753
|
"collapse-icon": "_collapse-icon_1ahhn_1",
|
|
2754
2754
|
collapseIcon: qi,
|
|
2755
2755
|
collapsed: Qi
|
|
@@ -2774,56 +2774,56 @@ function Zi(e, t, r) {
|
|
|
2774
2774
|
var v = typeof window < "u", f = !t && t !== 0 && v;
|
|
2775
2775
|
if (typeof e != "function") throw new TypeError("Expected a function");
|
|
2776
2776
|
t = +t || 0;
|
|
2777
|
-
var p = !!(r = r || {}).leading, h = !("trailing" in r) || !!r.trailing,
|
|
2777
|
+
var p = !!(r = r || {}).leading, h = !("trailing" in r) || !!r.trailing, x = "maxWait" in r, j = "debounceOnServer" in r && !!r.debounceOnServer, w = x ? Math.max(+r.maxWait || 0, t) : null;
|
|
2778
2778
|
B(function() {
|
|
2779
2779
|
return m.current = !0, function() {
|
|
2780
2780
|
m.current = !1;
|
|
2781
2781
|
};
|
|
2782
2782
|
}, []);
|
|
2783
2783
|
var y = J(function() {
|
|
2784
|
-
var
|
|
2785
|
-
var
|
|
2786
|
-
return l.current = c.current = null, o.current =
|
|
2787
|
-
}, N = function(
|
|
2788
|
-
f && cancelAnimationFrame(i.current), i.current = f ? requestAnimationFrame(
|
|
2789
|
-
}, I = function(
|
|
2784
|
+
var g = function(_) {
|
|
2785
|
+
var R = l.current, k = c.current;
|
|
2786
|
+
return l.current = c.current = null, o.current = _, d.current = u.current.apply(k, R);
|
|
2787
|
+
}, N = function(_, R) {
|
|
2788
|
+
f && cancelAnimationFrame(i.current), i.current = f ? requestAnimationFrame(_) : setTimeout(_, R);
|
|
2789
|
+
}, I = function(_) {
|
|
2790
2790
|
if (!m.current) return !1;
|
|
2791
|
-
var
|
|
2792
|
-
return !a.current ||
|
|
2793
|
-
},
|
|
2794
|
-
return i.current = null, h && l.current ?
|
|
2795
|
-
},
|
|
2796
|
-
var
|
|
2797
|
-
if (I(
|
|
2791
|
+
var R = _ - a.current;
|
|
2792
|
+
return !a.current || R >= t || R < 0 || x && _ - o.current >= w;
|
|
2793
|
+
}, E = function(_) {
|
|
2794
|
+
return i.current = null, h && l.current ? g(_) : (l.current = c.current = null, d.current);
|
|
2795
|
+
}, S = function _() {
|
|
2796
|
+
var R = Date.now();
|
|
2797
|
+
if (I(R)) return E(R);
|
|
2798
2798
|
if (m.current) {
|
|
2799
|
-
var
|
|
2800
|
-
N(
|
|
2799
|
+
var k = t - (R - a.current), $ = x ? Math.min(k, w - (R - o.current)) : k;
|
|
2800
|
+
N(_, $);
|
|
2801
2801
|
}
|
|
2802
|
-
},
|
|
2802
|
+
}, T = function() {
|
|
2803
2803
|
if (v || j) {
|
|
2804
|
-
var
|
|
2805
|
-
if (l.current = [].slice.call(arguments), c.current = s, a.current =
|
|
2806
|
-
if (!i.current && m.current) return o.current = a.current, N(
|
|
2807
|
-
if (
|
|
2804
|
+
var _ = Date.now(), R = I(_);
|
|
2805
|
+
if (l.current = [].slice.call(arguments), c.current = s, a.current = _, R) {
|
|
2806
|
+
if (!i.current && m.current) return o.current = a.current, N(S, t), p ? g(a.current) : d.current;
|
|
2807
|
+
if (x) return N(S, t), g(a.current);
|
|
2808
2808
|
}
|
|
2809
|
-
return i.current || N(
|
|
2809
|
+
return i.current || N(S, t), d.current;
|
|
2810
2810
|
}
|
|
2811
2811
|
};
|
|
2812
|
-
return
|
|
2812
|
+
return T.cancel = function() {
|
|
2813
2813
|
i.current && (f ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), o.current = 0, l.current = a.current = c.current = i.current = null;
|
|
2814
|
-
},
|
|
2814
|
+
}, T.isPending = function() {
|
|
2815
2815
|
return !!i.current;
|
|
2816
|
-
},
|
|
2817
|
-
return i.current ?
|
|
2818
|
-
},
|
|
2819
|
-
}, [p,
|
|
2816
|
+
}, T.flush = function() {
|
|
2817
|
+
return i.current ? E(Date.now()) : d.current;
|
|
2818
|
+
}, T;
|
|
2819
|
+
}, [p, x, t, w, h, f, v, j]);
|
|
2820
2820
|
return y;
|
|
2821
2821
|
}
|
|
2822
2822
|
function Ji(e, t) {
|
|
2823
2823
|
return e === t;
|
|
2824
2824
|
}
|
|
2825
2825
|
function Ss(e, t, r) {
|
|
2826
|
-
var s = Ji, a = Z(e), o = F({})[1], i = Zi(
|
|
2826
|
+
var s = Ji, a = Z(e), o = F({})[1], i = Zi(D(function(c) {
|
|
2827
2827
|
a.current = c, o({});
|
|
2828
2828
|
}, [o]), t, r), l = Z(e);
|
|
2829
2829
|
return s(l.current, e) || (i(e), l.current = e), [a.current, i];
|
|
@@ -2853,115 +2853,115 @@ const Xi = "_wrapper_1kgb8_1", el = "_open_1kgb8_9", tl = "_dropdown_1kgb8_13",
|
|
|
2853
2853
|
"action-button": "_action-button_1kgb8_74",
|
|
2854
2854
|
actionButton: ml
|
|
2855
2855
|
}, Ht = ({ show: e, onCancel: t, items: r, currentSelection: s, onSelectionChange: a, onSearchQueryChange: o, texts: i, itemsNameWidth: l, additionalColumns: c, displayIdAsName: d = !1, autoHideSearch: u = !1, allItemsLength: m, disabled: v, isLoading: f = !1, inputRef: p, archiveColumn: h = "archive" }) => {
|
|
2856
|
-
var
|
|
2857
|
-
const
|
|
2856
|
+
var De;
|
|
2857
|
+
const x = Z(null), j = Z(null), w = Z(null), y = Z(null), g = Z(null), [N, I] = F(""), [E] = Ss(N, 500), [, S] = F(!1), { copyToClipboard: T } = Pa(), _ = (De = p.current) == null ? void 0 : De.getBoundingClientRect(), R = (_ == null ? void 0 : _.x) ?? 0, k = ((_ == null ? void 0 : _.x) ?? 0) + ((_ == null ? void 0 : _.width) ?? 0), $ = (_ == null ? void 0 : _.y) ?? 0, L = ((_ == null ? void 0 : _.y) ?? 0) + ((_ == null ? void 0 : _.height) ?? 0), P = (_ == null ? void 0 : _.width) ?? 0, O = (_ == null ? void 0 : _.height) ?? 0, A = 5, W = J(() => R ? R > window.innerWidth / 2 : !1, [R]), U = J(() => $ ? $ > window.innerHeight / 2 : !1, [$]);
|
|
2858
2858
|
B(() => {
|
|
2859
|
-
var
|
|
2860
|
-
e && ((
|
|
2859
|
+
var Y;
|
|
2860
|
+
e && ((Y = y.current) == null || Y.focus());
|
|
2861
2861
|
}, [y, e]), B(() => {
|
|
2862
2862
|
e || I("");
|
|
2863
2863
|
}, [e]), B(() => {
|
|
2864
|
-
o && o(
|
|
2865
|
-
}, [
|
|
2866
|
-
const [
|
|
2864
|
+
o && o(E);
|
|
2865
|
+
}, [E, o]);
|
|
2866
|
+
const [H, K] = F(null);
|
|
2867
2867
|
B(() => {
|
|
2868
2868
|
e && r.length > 0 ? K(0) : K(null);
|
|
2869
2869
|
}, [r, e]);
|
|
2870
|
-
const ee = J(() =>
|
|
2871
|
-
var at,
|
|
2872
|
-
const we = document.getElementById(`item-${
|
|
2870
|
+
const ee = J(() => H !== null ? r.at(H) ?? null : null, [H, r]), le = D((Y, ge) => {
|
|
2871
|
+
var at, M;
|
|
2872
|
+
const we = document.getElementById(`item-${Y}`);
|
|
2873
2873
|
if (we) {
|
|
2874
2874
|
const V = we.clientHeight ?? 0;
|
|
2875
|
-
|
|
2875
|
+
ge === "down" ? (at = g.current) == null || at.scrollBy({
|
|
2876
2876
|
left: 0,
|
|
2877
2877
|
top: V,
|
|
2878
2878
|
behavior: "smooth"
|
|
2879
|
-
}) : (
|
|
2879
|
+
}) : (M = g.current) == null || M.scrollBy({
|
|
2880
2880
|
left: 0,
|
|
2881
2881
|
top: -V,
|
|
2882
2882
|
behavior: "smooth"
|
|
2883
2883
|
});
|
|
2884
2884
|
}
|
|
2885
|
-
}, []),
|
|
2886
|
-
if (
|
|
2885
|
+
}, []), C = D((Y) => {
|
|
2886
|
+
if (H === null || v)
|
|
2887
2887
|
return;
|
|
2888
|
-
const
|
|
2889
|
-
|
|
2890
|
-
}, [
|
|
2888
|
+
const ge = H + Y;
|
|
2889
|
+
ge < 0 || ge >= r.length || K((we) => (we !== null && le(we, Y > 0 ? "down" : "up"), ge));
|
|
2890
|
+
}, [H, r, v, le]), z = D((Y) => {
|
|
2891
2891
|
if (e)
|
|
2892
|
-
switch (
|
|
2892
|
+
switch (Y.key) {
|
|
2893
2893
|
case "Escape":
|
|
2894
|
-
|
|
2894
|
+
Y.stopPropagation(), Y.preventDefault(), t();
|
|
2895
2895
|
break;
|
|
2896
2896
|
case "Enter":
|
|
2897
|
-
|
|
2897
|
+
Y.stopPropagation(), Y.preventDefault(), v || a(ee);
|
|
2898
2898
|
break;
|
|
2899
2899
|
case "ArrowUp":
|
|
2900
|
-
|
|
2900
|
+
Y.stopPropagation(), Y.preventDefault(), C(-1);
|
|
2901
2901
|
break;
|
|
2902
2902
|
case "ArrowDown":
|
|
2903
|
-
|
|
2903
|
+
Y.stopPropagation(), Y.preventDefault(), C(1);
|
|
2904
2904
|
break;
|
|
2905
2905
|
}
|
|
2906
|
-
}, [t, e,
|
|
2907
|
-
|
|
2906
|
+
}, [t, e, C, ee, v, a]), re = D(() => {
|
|
2907
|
+
S((Y) => !Y);
|
|
2908
2908
|
}, []);
|
|
2909
|
-
B(() => (window.addEventListener("scroll",
|
|
2910
|
-
window.removeEventListener("scroll",
|
|
2911
|
-
}), [
|
|
2912
|
-
window.removeEventListener("resize",
|
|
2913
|
-
}), [
|
|
2914
|
-
const
|
|
2909
|
+
B(() => (window.addEventListener("scroll", re), () => {
|
|
2910
|
+
window.removeEventListener("scroll", re);
|
|
2911
|
+
}), [re]), B(() => (window.addEventListener("resize", re), () => {
|
|
2912
|
+
window.removeEventListener("resize", re);
|
|
2913
|
+
}), [re]), Ar(z), Rr([x, j, w], t);
|
|
2914
|
+
const Oe = l ?? (c && c.length > 0 ? 250 : 0), he = (c == null ? void 0 : c.reduce((Y, ge) => Y + (ge.width ?? 100), 0)) ?? 0, Fe = `calc(max(${P}px, ${Oe}px + ${he}px))`, te = J(() => (s && e && !v) ?? !1, [s, e, v]), Ne = J(() => (s && e) ?? !1, [s, e]);
|
|
2915
2915
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2916
2916
|
/* @__PURE__ */ n.jsx(Is, { show: e, onClick: t }),
|
|
2917
2917
|
/* @__PURE__ */ n.jsxs("div", { className: b("luminus-dropdown-picker-actions", be.actionButtonsContainer, {
|
|
2918
|
-
[be.reverse]:
|
|
2918
|
+
[be.reverse]: W
|
|
2919
2919
|
}), style: {
|
|
2920
|
-
top: `calc(${
|
|
2921
|
-
left:
|
|
2920
|
+
top: `calc(${$}px + ${O / 2}px - 12px)`,
|
|
2921
|
+
left: W ? te && Ne ? `calc(${R}px - 24px - 8px - 24px - 4px)` : `calc(${R}px - 24px - 8px)` : `calc(${k}px + 8px)`
|
|
2922
2922
|
}, children: [
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
var
|
|
2926
|
-
|
|
2923
|
+
te && /* @__PURE__ */ n.jsx("button", { ref: j, type: "button", className: b("luminus-dropdown-picker-clear-button", be.actionButton), onClick: () => !v && a(null), children: /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "text-danger", children: /* @__PURE__ */ n.jsx(Or, { size: 16 }) }) }),
|
|
2924
|
+
Ne && /* @__PURE__ */ n.jsx("button", { ref: w, type: "button", className: b("luminus-dropdown-picker-copy-button", be.actionButton), onClick: () => {
|
|
2925
|
+
var Y, ge;
|
|
2926
|
+
T(d ? ((Y = s == null ? void 0 : s.id) == null ? void 0 : Y.toString()) ?? "" : ((ge = s == null ? void 0 : s.name) == null ? void 0 : ge.toString()) ?? ""), t();
|
|
2927
2927
|
}, children: /* @__PURE__ */ n.jsx(X, { variant: "caption", className: "text-info", children: /* @__PURE__ */ n.jsx(ja, { size: 16 }) }) })
|
|
2928
2928
|
] }),
|
|
2929
2929
|
/* @__PURE__ */ n.jsx("div", { className: b("luminus-dropdown-picker", be.wrapper, {
|
|
2930
2930
|
[be.open]: e
|
|
2931
2931
|
}), style: {
|
|
2932
|
-
top:
|
|
2933
|
-
left:
|
|
2934
|
-
right:
|
|
2935
|
-
width:
|
|
2936
|
-
justifyContent:
|
|
2937
|
-
}, children: /* @__PURE__ */ n.jsx("div", { ref:
|
|
2938
|
-
!o || u && (m ?? r.length) <=
|
|
2939
|
-
var
|
|
2940
|
-
return I(((
|
|
2932
|
+
top: U ? `calc(${$}px - 50vh - 8px)` : `calc(${L}px + 8px)`,
|
|
2933
|
+
left: W ? `calc(${k}px - ${Fe})` : R,
|
|
2934
|
+
right: W ? `${k}px` : `calc(${R}px + ${Fe})`,
|
|
2935
|
+
width: Fe,
|
|
2936
|
+
justifyContent: U ? "flex-end" : "flex-start"
|
|
2937
|
+
}, children: /* @__PURE__ */ n.jsx("div", { ref: x, className: b("shadow rounded", be.dropdown), children: !v && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2938
|
+
!o || u && (m ?? r.length) <= A ? null : /* @__PURE__ */ n.jsx("div", { className: b("search-input-container border-bottom", be.searchInputContainer), children: /* @__PURE__ */ n.jsx(ve.Control, { ref: y, type: "search", size: "sm", className: be.searchInput, placeholder: i.searchPlaceholder, value: N, onChange: (Y) => {
|
|
2939
|
+
var ge;
|
|
2940
|
+
return I(((ge = Y.target) == null ? void 0 : ge.value) ?? "");
|
|
2941
2941
|
} }) }),
|
|
2942
|
-
f ? /* @__PURE__ */ n.jsx("div", { className: be.loadingContainer, children: /* @__PURE__ */ n.jsx(Sn, { animation: "border", variant: "primary" }) }) : r.length > 0 && /* @__PURE__ */ n.jsxs("div", { ref:
|
|
2942
|
+
f ? /* @__PURE__ */ n.jsx("div", { className: be.loadingContainer, children: /* @__PURE__ */ n.jsx(Sn, { animation: "border", variant: "primary" }) }) : r.length > 0 && /* @__PURE__ */ n.jsxs("div", { ref: g, className: b("items", be.itemsContainer), children: [
|
|
2943
2943
|
c && c.length > 0 && /* @__PURE__ */ n.jsxs("div", { className: b("header-row border-bottom", be.headerRow), children: [
|
|
2944
2944
|
/* @__PURE__ */ n.jsx("div", { className: be.name }),
|
|
2945
|
-
c == null ? void 0 : c.filter((
|
|
2946
|
-
width: `${
|
|
2947
|
-
minWidth: `${
|
|
2948
|
-
maxWidth: `${
|
|
2949
|
-
}, children: /* @__PURE__ */ n.jsx(X, { variant: "caption", children:
|
|
2945
|
+
c == null ? void 0 : c.filter((Y) => Y.key !== h).map((Y) => /* @__PURE__ */ n.jsx("div", { className: be.columnItem, style: {
|
|
2946
|
+
width: `${Y.width ?? 100}px`,
|
|
2947
|
+
minWidth: `${Y.width ?? 100}px`,
|
|
2948
|
+
maxWidth: `${Y.width ?? 100}px`
|
|
2949
|
+
}, children: /* @__PURE__ */ n.jsx(X, { variant: "caption", children: Y.name }) }, Y.key))
|
|
2950
2950
|
] }),
|
|
2951
|
-
r == null ? void 0 : r.map((
|
|
2952
|
-
[be.focused]:
|
|
2951
|
+
r == null ? void 0 : r.map((Y, ge) => /* @__PURE__ */ n.jsxs("button", { id: `item-${ge}`, type: "button", className: b("item cursor-pointer", be.item, {
|
|
2952
|
+
[be.focused]: H === ge
|
|
2953
2953
|
}, {
|
|
2954
|
-
focused:
|
|
2954
|
+
focused: H === ge
|
|
2955
2955
|
}, {
|
|
2956
|
-
archive:
|
|
2957
|
-
}), onClick: () => !v && a(
|
|
2958
|
-
/* @__PURE__ */ n.jsx("div", { className: be.name, children: /* @__PURE__ */ n.jsx(X, { variant: "body2", children: d ?
|
|
2956
|
+
archive: Y.additionalColumns ? Y.additionalColumns[h] : !1
|
|
2957
|
+
}), onClick: () => !v && a(Y), onMouseEnter: () => K(ge), children: [
|
|
2958
|
+
/* @__PURE__ */ n.jsx("div", { className: be.name, children: /* @__PURE__ */ n.jsx(X, { variant: "body2", children: d ? Y.id : Y.name }) }),
|
|
2959
2959
|
c == null ? void 0 : c.filter((we) => we.key !== h).map((we) => /* @__PURE__ */ n.jsx("div", { className: be.columnItem, style: {
|
|
2960
2960
|
width: `${we.width ?? 100}px`,
|
|
2961
2961
|
minWidth: `${we.width ?? 100}px`,
|
|
2962
2962
|
maxWidth: `${we.width ?? 100}px`
|
|
2963
|
-
}, children: /* @__PURE__ */ n.jsx(X, { variant: "caption", className: b("text-muted"), children:
|
|
2964
|
-
] },
|
|
2963
|
+
}, children: /* @__PURE__ */ n.jsx(X, { variant: "caption", className: b("text-muted"), children: Y.additionalColumns && Y.additionalColumns[we.key] }) }, we.key))
|
|
2964
|
+
] }, Y.id))
|
|
2965
2965
|
] })
|
|
2966
2966
|
] }) }) })
|
|
2967
2967
|
] });
|
|
@@ -2975,7 +2975,7 @@ const Xi = "_wrapper_1kgb8_1", el = "_open_1kgb8_9", tl = "_dropdown_1kgb8_13",
|
|
|
2975
2975
|
input: vl,
|
|
2976
2976
|
"submit-button": "_submit-button_1lkfy_20",
|
|
2977
2977
|
submitButton: jl
|
|
2978
|
-
}, yl = ({ searchTypes: e, selectedType: t, setSelectedType: r }) => /* @__PURE__ */ n.jsx(Bt, { toggle: /* @__PURE__ */ n.jsx(Vt, { as: vn, icon: null, text: t == null ? void 0 : t.text }), children: e.map((s) => /* @__PURE__ */ n.jsx(
|
|
2978
|
+
}, yl = ({ searchTypes: e, selectedType: t, setSelectedType: r }) => /* @__PURE__ */ n.jsx(Bt, { toggle: /* @__PURE__ */ n.jsx(Vt, { as: vn, icon: null, text: t == null ? void 0 : t.text }), children: e.map((s) => /* @__PURE__ */ n.jsx(Ge, { icon: null, onClick: () => r(s.key), children: s.text }, s.key)) }), wl = "_dropdown_1ddrg_1", bl = "_open_1ddrg_12", _l = "_loading-container_1ddrg_15", Nl = "_groups-container_1ddrg_22", Sl = "_group_1ddrg_22", Cl = "_header_1ddrg_26", kl = "_item_1ddrg_33", Ze = {
|
|
2979
2979
|
dropdown: wl,
|
|
2980
2980
|
open: bl,
|
|
2981
2981
|
"loading-container": "_loading-container_1ddrg_15",
|
|
@@ -2986,7 +2986,7 @@ const Xi = "_wrapper_1kgb8_1", el = "_open_1kgb8_9", tl = "_dropdown_1kgb8_13",
|
|
|
2986
2986
|
header: Cl,
|
|
2987
2987
|
item: kl
|
|
2988
2988
|
}, Il = ({ show: e, query: t, onCancel: r, groups: s, isLoading: a, searchTypes: o }) => {
|
|
2989
|
-
const { texts: { appSearch: i } } = q(
|
|
2989
|
+
const { texts: { appSearch: i } } = q(fe), l = Z(null), c = D((d) => {
|
|
2990
2990
|
var m;
|
|
2991
2991
|
const u = (m = o.find((v) => v.key === d.type)) == null ? void 0 : m.toPath;
|
|
2992
2992
|
return u ? `${u}/${d.searchKey}` : "/not-found";
|
|
@@ -3022,7 +3022,7 @@ const Xi = "_wrapper_1kgb8_1", el = "_open_1kgb8_9", tl = "_dropdown_1kgb8_13",
|
|
|
3022
3022
|
] }, d.key.category);
|
|
3023
3023
|
}) }) });
|
|
3024
3024
|
}, Dl = (e, t) => {
|
|
3025
|
-
const r = st(), [s, a] = F(!1), [o, i] = F([]), l = !e || !e.key, c =
|
|
3025
|
+
const r = st(), [s, a] = F(!1), [o, i] = F([]), l = !e || !e.key, c = D(() => {
|
|
3026
3026
|
if (t.length < 3) {
|
|
3027
3027
|
i([]);
|
|
3028
3028
|
return;
|
|
@@ -3036,26 +3036,26 @@ const Xi = "_wrapper_1kgb8_1", el = "_open_1kgb8_9", tl = "_dropdown_1kgb8_13",
|
|
|
3036
3036
|
return B(() => {
|
|
3037
3037
|
c();
|
|
3038
3038
|
}, [c]), { isLoading: s, searchItems: o };
|
|
3039
|
-
},
|
|
3039
|
+
}, Pd = ({ searchTypes: e, navigateFunction: t, currentPath: r, homePath: s = "/", className: a }) => {
|
|
3040
3040
|
var w;
|
|
3041
|
-
const { texts: { appSearch: o } } = q(
|
|
3041
|
+
const { texts: { appSearch: o } } = q(fe), [i, l] = F(e.length > 0 ? ((w = e.at(0)) == null ? void 0 : w.key) ?? null : null), c = J(() => e.find((y) => y.key === i) ?? null, [e, i]), [d, u] = F(""), [m, v] = Ss(d, 500), { isLoading: f, searchItems: p } = Dl(c, m), [h, x] = F(!1);
|
|
3042
3042
|
B(() => {
|
|
3043
|
-
(p.length > 0 || f) &&
|
|
3043
|
+
(p.length > 0 || f) && x(!0);
|
|
3044
3044
|
}, [p, f]);
|
|
3045
3045
|
const j = Z(null);
|
|
3046
3046
|
return B(() => {
|
|
3047
3047
|
var y;
|
|
3048
3048
|
u(""), r === s && ((y = j.current) == null || y.focus());
|
|
3049
|
-
}, [r, s]), /* @__PURE__ */ n.jsx(
|
|
3050
|
-
y.preventDefault(), y.stopPropagation(), v.flush(),
|
|
3049
|
+
}, [r, s]), /* @__PURE__ */ n.jsx(ve, { onSubmit: (y) => {
|
|
3050
|
+
y.preventDefault(), y.stopPropagation(), v.flush(), x(!1), d.length > 2 && t(`/search?query=${d}${c && c.key && `&type=${c == null ? void 0 : c.key}`}`);
|
|
3051
3051
|
}, children: /* @__PURE__ */ n.jsxs(It, { className: b(Qe.inputGroup, a), children: [
|
|
3052
3052
|
/* @__PURE__ */ n.jsx(It.Text, { className: b("p-1 rounded", Qe.inputGroupText, Qe.left), children: /* @__PURE__ */ n.jsx(yl, { searchTypes: e, selectedType: c, setSelectedType: l }) }),
|
|
3053
|
-
/* @__PURE__ */ n.jsx(
|
|
3054
|
-
var
|
|
3055
|
-
return u(((
|
|
3056
|
-
}, onFocus: () => p.length > 0 &&
|
|
3053
|
+
/* @__PURE__ */ n.jsx(ve.Control, { ref: j, placeholder: o.searchPlaceholder, type: "text", size: "sm", className: b("luminus-app-search-input", Qe.input), value: d, onChange: (y) => {
|
|
3054
|
+
var g;
|
|
3055
|
+
return u(((g = y.target) == null ? void 0 : g.value) ?? "");
|
|
3056
|
+
}, onFocus: () => p.length > 0 && x(!0) }),
|
|
3057
3057
|
/* @__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(wa, {}) }) }),
|
|
3058
|
-
/* @__PURE__ */ n.jsx(Il, { query: m, searchTypes: e, show: h, onCancel: () =>
|
|
3058
|
+
/* @__PURE__ */ n.jsx(Il, { query: m, searchTypes: e, show: h, onCancel: () => x(!1), groups: p, isLoading: f })
|
|
3059
3059
|
] }) });
|
|
3060
3060
|
}, $l = "_card_19733_1", El = "_header_19733_6", Ol = "_header-content_19733_13", Fl = "_title_19733_19", Tl = "_collapse-icon_19733_22", Ll = "_collapsed_19733_27", Rl = "_content_19733_30", Je = {
|
|
3061
3061
|
card: $l,
|
|
@@ -3205,7 +3205,7 @@ ks.propTypes = {
|
|
|
3205
3205
|
};
|
|
3206
3206
|
var fn = void 0;
|
|
3207
3207
|
Ot.createPortal ? fn = Cs : fn = ks;
|
|
3208
|
-
const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20", Ql = "_photo-actions_14acg_26", Zl = "_photo-container_14acg_31", Jl = "_photo_14acg_26", Xl = "_nav-button_14acg_41", ec = "_photos-preview_14acg_49", tc = "_selected_14acg_62", nc = "_default-indicator_14acg_66",
|
|
3208
|
+
const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20", Ql = "_photo-actions_14acg_26", Zl = "_photo-container_14acg_31", Jl = "_photo_14acg_26", Xl = "_nav-button_14acg_41", ec = "_photos-preview_14acg_49", tc = "_selected_14acg_62", nc = "_default-indicator_14acg_66", Ie = {
|
|
3209
3209
|
lightbox: Gl,
|
|
3210
3210
|
show: Kl,
|
|
3211
3211
|
header: ql,
|
|
@@ -3227,58 +3227,58 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3227
3227
|
}, Is = ({ show: e, onClick: t }) => /* @__PURE__ */ n.jsx("div", { className: b("luminus-backdrop", lr.backdrop, {
|
|
3228
3228
|
[lr.show]: e
|
|
3229
3229
|
}), onClick: () => t && t() }), Ds = ({ src: e, alt: t, baseUrl: r, customToken: s, placeholder: a, ...o }) => /* @__PURE__ */ n.jsx("img", { ...o, alt: t ?? "", src: e ?? a }), ac = ({ show: e, onClose: t, photos: r, defaultIndex: s, uploadPhotosText: a, noPhotosText: o, onUploadPhotos: i, photoActions: l, baseUrl: c, customToken: d, placeholder: u, ImgComponent: m = Ds }) => {
|
|
3230
|
-
const v = Z(null), [f, p] = F(s), h = r.at(f),
|
|
3230
|
+
const v = Z(null), [f, p] = F(s), h = r.at(f), x = f > 0, j = f < r.length - 1;
|
|
3231
3231
|
B(() => {
|
|
3232
3232
|
e && p(s);
|
|
3233
3233
|
}, [s, e]), B(() => {
|
|
3234
3234
|
f >= r.length && p(r.length - 1);
|
|
3235
3235
|
}, [r, f]);
|
|
3236
|
-
const w =
|
|
3236
|
+
const w = D((y) => {
|
|
3237
3237
|
switch (y.key) {
|
|
3238
3238
|
case "ArrowLeft":
|
|
3239
|
-
y.stopPropagation(),
|
|
3239
|
+
y.stopPropagation(), x && p((g) => g - 1);
|
|
3240
3240
|
break;
|
|
3241
3241
|
case "ArrowRight":
|
|
3242
|
-
y.stopPropagation(), j && p((
|
|
3242
|
+
y.stopPropagation(), j && p((g) => g + 1);
|
|
3243
3243
|
break;
|
|
3244
3244
|
case "Escape":
|
|
3245
3245
|
y.stopPropagation(), t();
|
|
3246
3246
|
break;
|
|
3247
3247
|
}
|
|
3248
|
-
}, [j,
|
|
3248
|
+
}, [j, x, t]);
|
|
3249
3249
|
return Ar(w), /* @__PURE__ */ n.jsxs(fn, { children: [
|
|
3250
3250
|
/* @__PURE__ */ n.jsx(Is, { show: e, onClick: t }),
|
|
3251
|
-
/* @__PURE__ */ n.jsx("div", { ref: v, className: b("luminus-lightbox rounded shadow",
|
|
3252
|
-
[
|
|
3251
|
+
/* @__PURE__ */ n.jsx("div", { ref: v, className: b("luminus-lightbox rounded shadow", Ie.lightbox, {
|
|
3252
|
+
[Ie.show]: e
|
|
3253
3253
|
}), children: e && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3254
|
-
/* @__PURE__ */ n.jsxs("div", { className:
|
|
3255
|
-
/* @__PURE__ */ n.jsxs("div", { className: b("rounded",
|
|
3254
|
+
/* @__PURE__ */ n.jsxs("div", { className: Ie.header, children: [
|
|
3255
|
+
/* @__PURE__ */ n.jsxs("div", { className: b("rounded", Ie.photoActions), children: [
|
|
3256
3256
|
i && /* @__PURE__ */ n.jsx(gs, { accept: ".jpg,.jpeg,.png", onUpload: (y) => {
|
|
3257
3257
|
y.length > 0 && i(Array.from(y));
|
|
3258
3258
|
}, icon: /* @__PURE__ */ n.jsx(Tr, { style: { fontSize: 18 } }), multiple: !0, className: "me-3", children: a ?? null }),
|
|
3259
|
-
h && (l == null ? void 0 : l.map(({ label: y, onClick:
|
|
3260
|
-
|
|
3259
|
+
h && (l == null ? void 0 : l.map(({ label: y, onClick: g, ...N }, I) => /* @__PURE__ */ n.jsx(
|
|
3260
|
+
Me,
|
|
3261
3261
|
{
|
|
3262
|
-
onClick: () =>
|
|
3262
|
+
onClick: () => g(h.id),
|
|
3263
3263
|
...N,
|
|
3264
3264
|
children: y
|
|
3265
3265
|
},
|
|
3266
3266
|
`action-${I}`
|
|
3267
3267
|
)))
|
|
3268
3268
|
] }),
|
|
3269
|
-
/* @__PURE__ */ n.jsx("div", { role: "button", onClick: t, children: /* @__PURE__ */ n.jsx(
|
|
3269
|
+
/* @__PURE__ */ n.jsx("div", { role: "button", onClick: t, children: /* @__PURE__ */ n.jsx(Be, { style: { fontSize: "32px" } }) })
|
|
3270
3270
|
] }),
|
|
3271
3271
|
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" }) }),
|
|
3272
|
-
h && /* @__PURE__ */ n.jsxs("div", { className:
|
|
3273
|
-
/* @__PURE__ */ n.jsx("div", { role:
|
|
3274
|
-
/* @__PURE__ */ n.jsx(m, { src: h.lgSrc, alt: h.alt, className: b("rounded",
|
|
3275
|
-
/* @__PURE__ */ n.jsx("div", { role: j ? "button" : void 0, className: b("align-items-end",
|
|
3272
|
+
h && /* @__PURE__ */ n.jsxs("div", { className: Ie.photoContainer, children: [
|
|
3273
|
+
/* @__PURE__ */ n.jsx("div", { role: x ? "button" : void 0, className: b("align-items-start", Ie.navButton), onClick: () => x && p((y) => y - 1), children: x && /* @__PURE__ */ n.jsx(pn, { style: { fontSize: "40px" } }) }),
|
|
3274
|
+
/* @__PURE__ */ n.jsx(m, { src: h.lgSrc, alt: h.alt, className: b("rounded", Ie.photo), baseUrl: c, customToken: d, placeholder: u }),
|
|
3275
|
+
/* @__PURE__ */ n.jsx("div", { role: j ? "button" : void 0, className: b("align-items-end", Ie.navButton), onClick: () => j && p((y) => y + 1), children: j && /* @__PURE__ */ n.jsx(xn, { style: { fontSize: "40px" } }) })
|
|
3276
3276
|
] }),
|
|
3277
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
3278
|
-
/* @__PURE__ */ n.jsx(m, { role:
|
|
3279
|
-
[
|
|
3277
|
+
/* @__PURE__ */ n.jsx("div", { className: Ie.photosPreview, children: r.map((y, g) => /* @__PURE__ */ n.jsxs("div", { role: "button", onClick: () => p(g), className: "position-relative", children: [
|
|
3278
|
+
/* @__PURE__ */ n.jsx(m, { role: g !== f ? "button" : void 0, src: y.smSrc, alt: y.alt, className: b("rounded", Ie.photo, {
|
|
3279
|
+
[Ie.selected]: g === f
|
|
3280
3280
|
}), baseUrl: c, customToken: d, placeholder: u }, y.id),
|
|
3281
|
-
y.isDefault && /* @__PURE__ */ n.jsx("div", { className: b("text-primary",
|
|
3281
|
+
y.isDefault && /* @__PURE__ */ n.jsx("div", { className: b("text-primary", Ie.defaultIndicator), children: /* @__PURE__ */ n.jsx(ba, {}) })
|
|
3282
3282
|
] })) })
|
|
3283
3283
|
] }) })
|
|
3284
3284
|
] });
|
|
@@ -3289,10 +3289,10 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3289
3289
|
v(null);
|
|
3290
3290
|
return;
|
|
3291
3291
|
}
|
|
3292
|
-
const
|
|
3293
|
-
v(
|
|
3294
|
-
}, [e]), !f && t && d ? /* @__PURE__ */ n.jsx(gs, { accept: ".jpg,.jpeg,.png", onUpload: (
|
|
3295
|
-
|
|
3292
|
+
const x = e.findIndex((j) => j.isDefault);
|
|
3293
|
+
v(x > -1 ? x : 0);
|
|
3294
|
+
}, [e]), !f && t && d ? /* @__PURE__ */ n.jsx(gs, { accept: ".jpg,.jpeg,.png", onUpload: (x) => {
|
|
3295
|
+
x.length > 0 && t(Array.from(x));
|
|
3296
3296
|
}, icon: /* @__PURE__ */ n.jsx(Tr, { style: { fontSize: 18 } }), multiple: !0, children: r ?? null }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3297
3297
|
f ? /* @__PURE__ */ n.jsxs("div", { role: "button", className: "w-100 position-relative", onClick: () => h(!0), children: [
|
|
3298
3298
|
/* @__PURE__ */ n.jsx(c, { src: f.smSrc, alt: f.alt, className: "rounded w-100", baseUrl: o, customToken: i, placeholder: l }),
|
|
@@ -3306,7 +3306,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3306
3306
|
] }) : /* @__PURE__ */ n.jsx(zt, { 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: l, alt: "placeholder", className: "rounded w-25" }) }) }),
|
|
3307
3307
|
/* @__PURE__ */ n.jsx(ac, { show: p && !u, onClose: () => h(!1), photos: e, defaultIndex: m ?? 0, uploadPhotosText: r, noPhotosText: s, onUploadPhotos: t, photoActions: a, baseUrl: o, customToken: i, placeholder: l, ImgComponent: c })
|
|
3308
3308
|
] });
|
|
3309
|
-
},
|
|
3309
|
+
}, Wd = ({ children: e }) => {
|
|
3310
3310
|
var l, c, d;
|
|
3311
3311
|
const { useMsal: t, msalScopes: r } = q(Na), { isAuthenticated: s } = Sa(), { userLoginState: a } = q(At), o = a.state === Ca.LOGGING_IN, i = a.user && ((l = a.user) == null ? void 0 : l.permissions) && ((d = (c = a.user) == null ? void 0 : c.permissions) == null ? void 0 : d.length) > 0;
|
|
3312
3312
|
return t ? /* @__PURE__ */ n.jsx(Ba, { interactionType: Ma.Redirect, authenticationRequest: { scopes: r }, children: o || !s() ? /* @__PURE__ */ n.jsx(Ln, {}) : 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(Ln, {}) : !s() || !a.user ? /* @__PURE__ */ n.jsx(St, { to: "/login", replace: !0 }) : i ? e : /* @__PURE__ */ n.jsx(St, { to: "/user-not-permitted", replace: !0 });
|
|
@@ -3326,7 +3326,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3326
3326
|
"type-icon": "_type-icon_z9z4m_28",
|
|
3327
3327
|
typeIcon: fc
|
|
3328
3328
|
}, mc = ({ level: e, children: t, customIcon: r, noIcon: s }) => {
|
|
3329
|
-
const { ProjectIconComponent: a } = q(
|
|
3329
|
+
const { ProjectIconComponent: a } = q(fe), o = D(() => {
|
|
3330
3330
|
switch (e) {
|
|
3331
3331
|
case "info":
|
|
3332
3332
|
return /* @__PURE__ */ n.jsx(a, { icon: "info" });
|
|
@@ -3342,7 +3342,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3342
3342
|
!s && /* @__PURE__ */ n.jsx("div", { className: b(rn.typeIcon), children: r ?? o() }),
|
|
3343
3343
|
/* @__PURE__ */ n.jsx(X, { variant: "body2", className: "w-100", children: t })
|
|
3344
3344
|
] });
|
|
3345
|
-
},
|
|
3345
|
+
}, Hd = ({ version: e }) => /* @__PURE__ */ n.jsx("div", { className: "rounded", style: {
|
|
3346
3346
|
position: "fixed",
|
|
3347
3347
|
right: "0px",
|
|
3348
3348
|
bottom: "0px",
|
|
@@ -3374,7 +3374,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3374
3374
|
contentText: bc,
|
|
3375
3375
|
"step-icon": "_step-icon_g1754_14",
|
|
3376
3376
|
stepIcon: _c
|
|
3377
|
-
},
|
|
3377
|
+
}, Ud = ({ steps: e }) => /* @__PURE__ */ n.jsx("div", { className: Xe.timeline, children: e.sort((t, r) => qa(t.date ?? /* @__PURE__ */ new Date(), r.date ?? /* @__PURE__ */ new Date())).map((t, r) => /* @__PURE__ */ n.jsxs("div", { className: b("row g-0 gx-3", Xe.stepContainer), children: [
|
|
3378
3378
|
/* @__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", Xe.stepDate), children: [
|
|
3379
3379
|
/* @__PURE__ */ n.jsx("div", { children: jt(t.date, "dd.MM.yyyy") }),
|
|
3380
3380
|
/* @__PURE__ */ n.jsx("div", { children: jt(t.date, "HH:mm") })
|
|
@@ -3388,7 +3388,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3388
3388
|
/* @__PURE__ */ n.jsx("div", { className: b("text-primary", Xe.stepIcon), children: t.icon ?? /* @__PURE__ */ n.jsx(ka, {}) })
|
|
3389
3389
|
] }) })
|
|
3390
3390
|
] }, r)) }), Nc = (e, t, r, s = !0) => {
|
|
3391
|
-
const a = st({ silent: s, differentBaseUrl: t, customToken: r }), [o, i] = F(!1), [l, c] = F(null), d =
|
|
3391
|
+
const a = st({ silent: s, differentBaseUrl: t, customToken: r }), [o, i] = F(!1), [l, c] = F(null), d = D(async (u) => {
|
|
3392
3392
|
i(!0), c(null), a.get(e, {
|
|
3393
3393
|
signal: u,
|
|
3394
3394
|
responseType: "blob"
|
|
@@ -3424,14 +3424,14 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3424
3424
|
sm: kc,
|
|
3425
3425
|
md: Ic
|
|
3426
3426
|
}, Dt = (e) => {
|
|
3427
|
-
const t = new Date(e), r =
|
|
3427
|
+
const t = new Date(e), r = Ke(t.toISOString());
|
|
3428
3428
|
t.setMonth(t.getMonth() + 1), t.setDate(t.getDate() - 1);
|
|
3429
|
-
const s =
|
|
3429
|
+
const s = Ke(t.toISOString());
|
|
3430
3430
|
return { from: r, to: s };
|
|
3431
3431
|
}, xt = (e) => {
|
|
3432
|
-
const t = new Date(e), r =
|
|
3432
|
+
const t = new Date(e), r = Ke(t.toISOString());
|
|
3433
3433
|
t.setFullYear(t.getFullYear() + 1), t.setDate(t.getDate() - 1);
|
|
3434
|
-
const s =
|
|
3434
|
+
const s = Ke(t.toISOString());
|
|
3435
3435
|
return { from: r, to: s };
|
|
3436
3436
|
}, Dc = (e, t) => {
|
|
3437
3437
|
if (e === null || t === null)
|
|
@@ -3441,7 +3441,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3441
3441
|
const r = new Date(e);
|
|
3442
3442
|
return Dt(r).to === t ? "M" : xt(r).to === t ? "Y" : (console.log(xt(r), t), "C");
|
|
3443
3443
|
}, $c = (e, t, r) => {
|
|
3444
|
-
const s =
|
|
3444
|
+
const s = D((i, l) => {
|
|
3445
3445
|
if (e === "C") {
|
|
3446
3446
|
r((c) => ({ ...c, [i]: l }));
|
|
3447
3447
|
return;
|
|
@@ -3453,7 +3453,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3453
3453
|
return c;
|
|
3454
3454
|
const d = new Date(l);
|
|
3455
3455
|
if (e === "D") {
|
|
3456
|
-
const u =
|
|
3456
|
+
const u = Ke(d.toISOString());
|
|
3457
3457
|
return {
|
|
3458
3458
|
from: u,
|
|
3459
3459
|
to: u
|
|
@@ -3466,7 +3466,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3466
3466
|
t("C"), r((c) => ({ ...c, [i]: l }));
|
|
3467
3467
|
break;
|
|
3468
3468
|
}
|
|
3469
|
-
}, [e, r, t]), a =
|
|
3469
|
+
}, [e, r, t]), a = D((i) => {
|
|
3470
3470
|
r((l) => {
|
|
3471
3471
|
if (l.from === null || l.to === null)
|
|
3472
3472
|
return l;
|
|
@@ -3475,18 +3475,18 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3475
3475
|
const d = new Date(l.to);
|
|
3476
3476
|
if (e === "D") {
|
|
3477
3477
|
c.setDate(c.getDate() + i);
|
|
3478
|
-
const u =
|
|
3478
|
+
const u = Ke(c.toISOString());
|
|
3479
3479
|
return {
|
|
3480
3480
|
from: u,
|
|
3481
3481
|
to: u
|
|
3482
3482
|
};
|
|
3483
3483
|
}
|
|
3484
3484
|
return e === "M" ? (c.setMonth(c.getMonth() + i), Dt(c)) : e === "Y" ? (c.setFullYear(c.getFullYear() + i), xt(c)) : {
|
|
3485
|
-
from:
|
|
3486
|
-
to:
|
|
3485
|
+
from: Ke(c.toISOString()),
|
|
3486
|
+
to: Ke(d.toISOString())
|
|
3487
3487
|
};
|
|
3488
3488
|
});
|
|
3489
|
-
}, [e, r]), o =
|
|
3489
|
+
}, [e, r]), o = D((i) => {
|
|
3490
3490
|
i === "D" ? r((l) => ({ from: l.from, to: l.from })) : i === "M" ? r((l) => {
|
|
3491
3491
|
if (l.from === null)
|
|
3492
3492
|
return l;
|
|
@@ -3500,38 +3500,38 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3500
3500
|
}), t(i);
|
|
3501
3501
|
}, [r, t]);
|
|
3502
3502
|
return { setFromToProp: s, handleArrowClick: a, handleRangeChange: o };
|
|
3503
|
-
},
|
|
3504
|
-
const { texts: { date: a }, ProjectIconComponent: o } = q(
|
|
3503
|
+
}, Yd = ({ fromtoState: [e, t], className: r, size: s }) => {
|
|
3504
|
+
const { texts: { date: a }, ProjectIconComponent: o } = q(fe), [i, l] = F("C"), { handleArrowClick: c, handleRangeChange: d, setFromToProp: u } = $c(i, l, t), m = J(() => i === "C", [i]), v = Z(!0);
|
|
3505
3505
|
return B(() => {
|
|
3506
3506
|
if (v.current) {
|
|
3507
3507
|
const f = Dc(e.from, e.to);
|
|
3508
3508
|
l(f), v.current = !1;
|
|
3509
3509
|
}
|
|
3510
3510
|
}, [e.from, e.to]), /* @__PURE__ */ n.jsxs("div", { className: b("d-inline-flex align-items-center gap-1", fr.wrapper, fr[s ?? "md"], r), children: [
|
|
3511
|
-
/* @__PURE__ */ n.jsx(
|
|
3511
|
+
/* @__PURE__ */ n.jsx(ne, { disabled: m, onClick: () => {
|
|
3512
3512
|
c(-1);
|
|
3513
3513
|
}, children: /* @__PURE__ */ n.jsx(o, { icon: "chevron-left" }) }),
|
|
3514
3514
|
/* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
3515
|
-
/* @__PURE__ */ n.jsx(it, { type: "date", value: e.from, onChange: (f) => u("from", f === null ? null : f.toString()), InputContainer:
|
|
3516
|
-
/* @__PURE__ */ n.jsx(Bt, { toggle: /* @__PURE__ */ n.jsx(Vt, { text: a[ur.find((f) => f[0] === i)[1]].substring(0, 1), as: $a }), children: ur.map((f) => /* @__PURE__ */ n.jsx(
|
|
3517
|
-
/* @__PURE__ */ n.jsx(it, { type: "date", value: e.to, onChange: (f) => u("to", f === null ? null : f.toString()), InputContainer:
|
|
3515
|
+
/* @__PURE__ */ n.jsx(it, { type: "date", value: e.from, onChange: (f) => u("from", f === null ? null : f.toString()), InputContainer: Re, size: s }),
|
|
3516
|
+
/* @__PURE__ */ n.jsx(Bt, { toggle: /* @__PURE__ */ n.jsx(Vt, { text: a[ur.find((f) => f[0] === i)[1]].substring(0, 1), as: $a }), children: ur.map((f) => /* @__PURE__ */ n.jsx(Ge, { disabled: f[0] === i, className: b(f[0] === i ? "text-black-50" : ""), onClick: () => d(f[0]), role: "button", children: a[f[1]] }, f[0])) }),
|
|
3517
|
+
/* @__PURE__ */ n.jsx(it, { type: "date", value: e.to, onChange: (f) => u("to", f === null ? null : f.toString()), InputContainer: Re, size: s })
|
|
3518
3518
|
] }) }),
|
|
3519
|
-
/* @__PURE__ */ n.jsx(
|
|
3519
|
+
/* @__PURE__ */ n.jsx(ne, { disabled: m, onClick: () => {
|
|
3520
3520
|
c(1);
|
|
3521
3521
|
}, children: /* @__PURE__ */ n.jsx(o, { icon: "chevron-right" }) })
|
|
3522
3522
|
] });
|
|
3523
|
-
},
|
|
3524
|
-
const { localizationContext: a } = q(
|
|
3523
|
+
}, Gd = ({ defaultMonth: e, searchKey: t = "monthFrom", yearMin: r, yearMax: s }) => {
|
|
3524
|
+
const { localizationContext: a } = q(fe), { dateFnsLocale: o } = q(a), { searchParams: i, setSearch: l } = Wa(), c = i.get(t), d = c ? yt(c) : e, u = D((m) => {
|
|
3525
3525
|
l(t, cn(m, { representation: "date" }));
|
|
3526
3526
|
}, [t, l]);
|
|
3527
3527
|
return /* @__PURE__ */ n.jsx(No, { month: d, onChangeMonth: u, locale: o, yearMin: r, yearMax: s });
|
|
3528
|
-
},
|
|
3529
|
-
const [o, i] = Ha(t, cn(e, { representation: "date" })), l = o ? yt(o) : e, c =
|
|
3528
|
+
}, Kd = ({ defaultYear: e, searchKey: t = "yearFrom", optionMin: r, optionMax: s, className: a }) => {
|
|
3529
|
+
const [o, i] = Ha(t, cn(e, { representation: "date" })), l = o ? yt(o) : e, c = D((d) => {
|
|
3530
3530
|
i(cn(d, { representation: "date" }));
|
|
3531
3531
|
}, [i]);
|
|
3532
3532
|
return /* @__PURE__ */ n.jsx(ko, { year: l, onChangeYear: c, optionMin: r, optionMax: s, className: a });
|
|
3533
|
-
},
|
|
3534
|
-
const { chartColorPalette: a } = q(
|
|
3533
|
+
}, qd = ({ data: e, showLegend: t = !1, legendPosition: r = "left", onClick: s }) => {
|
|
3534
|
+
const { chartColorPalette: a } = q(fe);
|
|
3535
3535
|
return /* @__PURE__ */ n.jsx(Ea, { data: e, margin: {
|
|
3536
3536
|
top: 50,
|
|
3537
3537
|
right: t && r === "right" ? 200 : 100,
|
|
@@ -3594,7 +3594,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3594
3594
|
}
|
|
3595
3595
|
r[s] = { value: a, defaultValue: a };
|
|
3596
3596
|
}), r;
|
|
3597
|
-
}, Oc = "_table_1klfy_1", Fc = "_table-header_1klfy_10", Tc = "_table-row_1klfy_10", Lc = "_table-head_1klfy_10", Rc = "_filters-row_1klfy_19", Ac = "_table-body_1klfy_30", Mc = "_table-cell_1klfy_30", Bc = "_action-column_1klfy_43", Vc = "_sticky-top_1klfy_47", zc = "_sticky-first_1klfy_54", Pc = "_sticky-last_1klfy_61", Wc = "_sticky-bottom_1klfy_68",
|
|
3597
|
+
}, Oc = "_table_1klfy_1", Fc = "_table-header_1klfy_10", Tc = "_table-row_1klfy_10", Lc = "_table-head_1klfy_10", Rc = "_filters-row_1klfy_19", Ac = "_table-body_1klfy_30", Mc = "_table-cell_1klfy_30", Bc = "_action-column_1klfy_43", Vc = "_sticky-top_1klfy_47", zc = "_sticky-first_1klfy_54", Pc = "_sticky-last_1klfy_61", Wc = "_sticky-bottom_1klfy_68", ue = {
|
|
3598
3598
|
table: Oc,
|
|
3599
3599
|
"table-header": "_table-header_1klfy_10",
|
|
3600
3600
|
tableHeader: Fc,
|
|
@@ -3618,22 +3618,22 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3618
3618
|
stickyLast: Pc,
|
|
3619
3619
|
"sticky-bottom": "_sticky-bottom_1klfy_68",
|
|
3620
3620
|
stickyBottom: Wc
|
|
3621
|
-
}, Hc = "_input_pxkkh_1",
|
|
3621
|
+
}, Hc = "_input_pxkkh_1", Ae = {
|
|
3622
3622
|
input: Hc
|
|
3623
3623
|
}, Es = ({ type: e, value: t, field: r, isPrimary: s, isReadonly: a, primaryEditable: o = !1, valuesForSelect: i, addValueToValuesForSelect: l, onChangeHandler: c, hideClearIcon: d, clearValue: u, customPickers: m }) => {
|
|
3624
3624
|
var v;
|
|
3625
3625
|
switch (e) {
|
|
3626
3626
|
case "NUM":
|
|
3627
|
-
return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Ft, { withoutLabel: !0, InputContainer:
|
|
3627
|
+
return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Ft, { withoutLabel: !0, InputContainer: Re, className: Ae.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => c(r, f === null ? null : Number(f)), options: i, disabled: a || o ? !1 : s, showClearIcon: !d, clearValue: u, dropdownWidth: 200 }) : /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer: Re, className: Ae.input, size: "sm", type: "number", value: t === null ? null : Number(t), onChange: (f) => c(r, f === null ? null : Number(f)), disabled: a || o ? !1 : s, showClearIcon: !d, clearValue: u });
|
|
3628
3628
|
case "STR":
|
|
3629
|
-
return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Ft, { withoutLabel: !0, InputContainer:
|
|
3629
|
+
return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Ft, { withoutLabel: !0, InputContainer: Re, className: Ae.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => c(r, (f == null ? void 0 : f.toString()) ?? null), options: i, disabled: a || o ? !1 : s, showClearIcon: !d, clearValue: u, dropdownWidth: 200 }) : /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer: Re, className: b(Ae.input, Ae.longer), size: "sm", type: "text", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => c(r, (f == null ? void 0 : f.toString()) ?? null), disabled: a || o ? !1 : s, showClearIcon: !d, clearValue: u });
|
|
3630
3630
|
case "BIT":
|
|
3631
|
-
return /* @__PURE__ */ n.jsx(xs, { InputContainer:
|
|
3631
|
+
return /* @__PURE__ */ n.jsx(xs, { InputContainer: Re, className: Ae.input, value: t === !0, onChange: (f) => c(r, f), disabled: a || o ? !1 : s });
|
|
3632
3632
|
case "DT":
|
|
3633
|
-
return /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer:
|
|
3633
|
+
return /* @__PURE__ */ n.jsx(it, { withoutLabel: !0, InputContainer: Re, className: Ae.input, size: "sm", type: "date", value: t ? t.toString().split("T")[0] ?? "" : "", onChange: (f) => c(r, (f == null ? void 0 : f.toString()) ?? null), disabled: a || o ? !1 : s, showClearIcon: !d, clearValue: u });
|
|
3634
3634
|
default: {
|
|
3635
3635
|
const f = m == null ? void 0 : m.find((p) => p.type === e);
|
|
3636
|
-
return f ? /* @__PURE__ */ n.jsx(f.picker, { className: b(
|
|
3636
|
+
return f ? /* @__PURE__ */ n.jsx(f.picker, { className: b(Ae.input, Ae.longer), value: t ? {
|
|
3637
3637
|
id: (t == null ? void 0 : t.toString()) ?? null,
|
|
3638
3638
|
name: ((v = i == null ? void 0 : i.find((p) => {
|
|
3639
3639
|
var h;
|
|
@@ -3641,12 +3641,12 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3641
3641
|
})) == null ? void 0 : v.name) ?? ""
|
|
3642
3642
|
} : null, onChange: (p) => {
|
|
3643
3643
|
var h;
|
|
3644
|
-
c(r, (p == null ? void 0 : p.id) ?? null), console.log(p, i == null ? void 0 : i.some((
|
|
3644
|
+
c(r, (p == null ? void 0 : p.id) ?? null), console.log(p, i == null ? void 0 : i.some((x) => {
|
|
3645
3645
|
var j, w;
|
|
3646
|
-
return ((j =
|
|
3647
|
-
}), l), p && !(i != null && i.some((
|
|
3646
|
+
return ((j = x.id) == null ? void 0 : j.toString()) === ((w = p == null ? void 0 : p.id) == null ? void 0 : w.toString());
|
|
3647
|
+
}), l), p && !(i != null && i.some((x) => {
|
|
3648
3648
|
var j, w;
|
|
3649
|
-
return ((j =
|
|
3649
|
+
return ((j = x.id) == null ? void 0 : j.toString()) === ((w = p == null ? void 0 : p.id) == null ? void 0 : w.toString());
|
|
3650
3650
|
})) && l && (console.log("adding to values for select"), l({ id: ((h = p.id) == null ? void 0 : h.toString()) ?? "", name: p.name }));
|
|
3651
3651
|
}, 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: [
|
|
3652
3652
|
"Neznámý typ ",
|
|
@@ -3655,7 +3655,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3655
3655
|
}
|
|
3656
3656
|
}
|
|
3657
3657
|
}, Uc = ({ schema: e, columns: t, setColumns: r, initialItem: s, onEdit: a, onDelete: o, customPickers: i }) => {
|
|
3658
|
-
const { ProjectIconComponent: l } = q(
|
|
3658
|
+
const { ProjectIconComponent: l } = q(fe), [c, d] = F(s), u = D((f, p) => {
|
|
3659
3659
|
console.log("changeValue", f, p), d((h) => ({
|
|
3660
3660
|
...h,
|
|
3661
3661
|
[f]: {
|
|
@@ -3663,21 +3663,21 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3663
3663
|
value: p
|
|
3664
3664
|
}
|
|
3665
3665
|
}));
|
|
3666
|
-
}, []), m = (f) => (f == null ? void 0 : f.value) !== (f == null ? void 0 : f.defaultValue), v =
|
|
3666
|
+
}, []), m = (f) => (f == null ? void 0 : f.value) !== (f == null ? void 0 : f.defaultValue), v = D(() => Object.keys(c).some((f) => m(c[f])), [c]);
|
|
3667
3667
|
return B(() => {
|
|
3668
3668
|
d(s);
|
|
3669
|
-
}, [s]), /* @__PURE__ */ n.jsxs("tr", { className: b("table-row",
|
|
3670
|
-
/* @__PURE__ */ n.jsx("td", { className: b("table-cell",
|
|
3669
|
+
}, [s]), /* @__PURE__ */ n.jsxs("tr", { className: b("table-row", ue.tableRow), children: [
|
|
3670
|
+
/* @__PURE__ */ n.jsx("td", { className: b("table-cell", ue.tableCell, ue.stickyFirst), children: v() && /* @__PURE__ */ n.jsx(ne, { color: "success", onClick: () => a($s(c)), children: /* @__PURE__ */ n.jsx(l, { icon: "check" }) }) }),
|
|
3671
3671
|
t.map((f) => {
|
|
3672
3672
|
var p, h;
|
|
3673
|
-
return /* @__PURE__ */ n.jsx("td", { className: b("table-cell",
|
|
3674
|
-
r(t.map((j) => j.field === f.field ? { ...j, valuesForSelect: [...j.valuesForSelect ?? [],
|
|
3673
|
+
return /* @__PURE__ */ n.jsx("td", { className: b("table-cell", ue.tableCell), children: /* @__PURE__ */ n.jsx(Es, { type: f.type, value: (p = c[f.field ?? ""]) == null ? void 0 : p.value, field: f.field, isReadonly: f.readOnly, isPrimary: e.primaryKey === f.field, valuesForSelect: f.valuesForSelect, addValueToValuesForSelect: (x) => {
|
|
3674
|
+
r(t.map((j) => j.field === f.field ? { ...j, valuesForSelect: [...j.valuesForSelect ?? [], x] } : j));
|
|
3675
3675
|
}, onChangeHandler: u, hideClearIcon: !m(c[f.field ?? ""]), clearValue: (h = c[f.field ?? ""].defaultValue) == null ? void 0 : h.toString(), customPickers: i }) }, `${e.id}-${f.field}`);
|
|
3676
3676
|
}),
|
|
3677
|
-
/* @__PURE__ */ n.jsx("td", { className: b("table-cell",
|
|
3677
|
+
/* @__PURE__ */ n.jsx("td", { className: b("table-cell", ue.tableCell, ue.stickyLast), children: /* @__PURE__ */ n.jsx(ne, { color: "danger", onClick: () => o(c[e.primaryKey ?? ""].value), children: /* @__PURE__ */ n.jsx(l, { icon: "delete" }) }) })
|
|
3678
3678
|
] });
|
|
3679
3679
|
}, Yc = ({ schema: e, columns: t, setColumns: r, onCreate: s, customPickers: a }) => {
|
|
3680
|
-
const { ProjectIconComponent: o } = q(
|
|
3680
|
+
const { ProjectIconComponent: o } = q(fe), [i, l] = F(null), c = D(() => {
|
|
3681
3681
|
var m;
|
|
3682
3682
|
const u = {};
|
|
3683
3683
|
(m = e.columns) == null || m.forEach((v) => {
|
|
@@ -3687,7 +3687,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3687
3687
|
defaultValue: f
|
|
3688
3688
|
};
|
|
3689
3689
|
}), l(u);
|
|
3690
|
-
}, [e]), d =
|
|
3690
|
+
}, [e]), d = D((u, m) => {
|
|
3691
3691
|
l((v) => v && {
|
|
3692
3692
|
...v,
|
|
3693
3693
|
[u]: {
|
|
@@ -3697,16 +3697,16 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3697
3697
|
});
|
|
3698
3698
|
}, []);
|
|
3699
3699
|
return i ? /* @__PURE__ */ n.jsxs("tr", { className: "sticky-bottom shadow", children: [
|
|
3700
|
-
/* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(
|
|
3700
|
+
/* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(ne, { color: "success", onClick: async () => {
|
|
3701
3701
|
const u = $s(i);
|
|
3702
3702
|
u && await s(u) && l(null);
|
|
3703
3703
|
}, children: /* @__PURE__ */ n.jsx(o, { icon: "check" }) }) }),
|
|
3704
3704
|
t.map((u) => /* @__PURE__ */ n.jsx("td", { children: /* @__PURE__ */ n.jsx(Es, { type: u.type, value: i[u.field ?? ""].value, field: u.field, isReadonly: u.readOnly, isPrimary: e.primaryKey === u.field, valuesForSelect: u.valuesForSelect, addValueToValuesForSelect: (m) => {
|
|
3705
3705
|
r(t.map((v) => v.field === u.field ? { ...v, valuesForSelect: [...v.valuesForSelect ?? [], m] } : v));
|
|
3706
3706
|
}, onChangeHandler: d, primaryEditable: !0, customPickers: a }) }, `${e.id}-${u.field}`)),
|
|
3707
|
-
/* @__PURE__ */ n.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ n.jsx(
|
|
3707
|
+
/* @__PURE__ */ n.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ n.jsx(ne, { color: "danger", onClick: () => l(null), children: /* @__PURE__ */ n.jsx(o, { icon: "cancel" }) }) })
|
|
3708
3708
|
] }) : /* @__PURE__ */ n.jsxs("tr", { className: "sticky-bottom shadow", children: [
|
|
3709
|
-
/* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(
|
|
3709
|
+
/* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(ne, { onClick: c, children: /* @__PURE__ */ n.jsx(o, { icon: "add" }) }) }),
|
|
3710
3710
|
/* @__PURE__ */ n.jsx("td", { colSpan: t.length + 1 })
|
|
3711
3711
|
] });
|
|
3712
3712
|
}, Gc = "_resizer_ref0b_1", Kc = "_content_ref0b_11", qc = "_dragging_ref0b_16", Ct = {
|
|
@@ -3727,7 +3727,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3727
3727
|
a(null), o.currentTarget.classList.remove(Ct.dragging);
|
|
3728
3728
|
}, children: /* @__PURE__ */ n.jsx("div", { className: b("content", Ct.content) }) });
|
|
3729
3729
|
}, Zc = ({ column: e, children: t }) => e.description ? /* @__PURE__ */ n.jsx(zt, { placement: "bottom", text: e.description ?? "", children: /* @__PURE__ */ n.jsx("div", { children: t }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: t }), Jc = ({ column: e, sortByField: t, sortByType: r, setSortBy: s }) => {
|
|
3730
|
-
const { ProjectIconComponent: a } = q(
|
|
3730
|
+
const { ProjectIconComponent: a } = q(fe), o = Z(null), i = J(() => {
|
|
3731
3731
|
if (e.valuesForSelect && e.valuesForSelect.length > 0)
|
|
3732
3732
|
return 200;
|
|
3733
3733
|
switch (e.type) {
|
|
@@ -3743,7 +3743,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3743
3743
|
return 100;
|
|
3744
3744
|
}
|
|
3745
3745
|
}, [e.type, e.valuesForSelect]);
|
|
3746
|
-
return /* @__PURE__ */ n.jsxs("th", { ref: o, className: b("table-head",
|
|
3746
|
+
return /* @__PURE__ */ n.jsxs("th", { ref: o, className: b("table-head", ue.tableHead), onClick: () => {
|
|
3747
3747
|
const l = t === e.field ? r : null;
|
|
3748
3748
|
if (l === "asc") {
|
|
3749
3749
|
s(e.field, "desc");
|
|
@@ -3762,11 +3762,11 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3762
3762
|
/* @__PURE__ */ n.jsx(Qc, { cellRef: o, defaultWidth: i })
|
|
3763
3763
|
] });
|
|
3764
3764
|
}, Xc = ({ schema: e, items: t, onEditItem: r, onDeleteItem: s, onCreateItem: a, filters: o, setFilter: i, sortByField: l, sortByType: c, setSortBy: d, selectedMaster: u, customPickers: m }) => {
|
|
3765
|
-
const { texts: { dynamicForms: v } } = q(
|
|
3765
|
+
const { texts: { dynamicForms: v } } = q(fe), [f, p] = F([]);
|
|
3766
3766
|
return B(() => {
|
|
3767
|
-
var h,
|
|
3767
|
+
var h, x, j;
|
|
3768
3768
|
p([
|
|
3769
|
-
...((j = (
|
|
3769
|
+
...((j = (x = (h = e.columns) == null ? void 0 : h.filter((w) => !w.hidden)) == null ? void 0 : x.filter((w) => e.masterReference ? w.field !== e.masterReferenceColumn : !0)) == null ? void 0 : j.map((w) => {
|
|
3770
3770
|
var y;
|
|
3771
3771
|
return {
|
|
3772
3772
|
label: w.caption ?? "",
|
|
@@ -3775,27 +3775,27 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3775
3775
|
field: w.field ?? "",
|
|
3776
3776
|
type: w.type,
|
|
3777
3777
|
readOnly: w.readOnly,
|
|
3778
|
-
valuesForSelect: ((y = w.values) == null ? void 0 : y.filter((
|
|
3778
|
+
valuesForSelect: ((y = w.values) == null ? void 0 : y.filter((g) => w.valuesFilteredByMaster ? g.masterValue === u : !0).map((g) => ({ id: g.id ?? "", name: g.name }))) ?? void 0
|
|
3779
3779
|
};
|
|
3780
3780
|
})) ?? []
|
|
3781
3781
|
]);
|
|
3782
|
-
}, [e, u]), /* @__PURE__ */ n.jsxs("table", { id: `dynamic-table-${e.id}`, className: b("table table-borderless luminus-df-table",
|
|
3783
|
-
/* @__PURE__ */ n.jsxs("thead", { className: b("text-nowrap table-header",
|
|
3784
|
-
/* @__PURE__ */ n.jsxs("tr", { className: b("table-row",
|
|
3785
|
-
/* @__PURE__ */ n.jsx("th", { className: b("table-head",
|
|
3782
|
+
}, [e, u]), /* @__PURE__ */ n.jsxs("table", { id: `dynamic-table-${e.id}`, className: b("table table-borderless luminus-df-table", ue.table), children: [
|
|
3783
|
+
/* @__PURE__ */ n.jsxs("thead", { className: b("text-nowrap table-header", ue.stickyTop, ue.tableHeader), children: [
|
|
3784
|
+
/* @__PURE__ */ n.jsxs("tr", { className: b("table-row", ue.tableRow), children: [
|
|
3785
|
+
/* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyFirst) }),
|
|
3786
3786
|
f.map((h) => /* @__PURE__ */ n.jsx(Jc, { column: h, sortByField: l, sortByType: c, setSortBy: d }, `${e.id}-${h.field}`)),
|
|
3787
|
-
/* @__PURE__ */ n.jsx("th", { className: b("table-head",
|
|
3787
|
+
/* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyLast) })
|
|
3788
3788
|
] }),
|
|
3789
|
-
/* @__PURE__ */ n.jsxs("tr", { className: b("table-row filters-row",
|
|
3790
|
-
/* @__PURE__ */ n.jsx("th", { className: b("table-head",
|
|
3791
|
-
f.map((h) => /* @__PURE__ */ n.jsx("th", { className: b("table-head",
|
|
3789
|
+
/* @__PURE__ */ n.jsxs("tr", { className: b("table-row filters-row", ue.tableRow, ue.filtersRow), children: [
|
|
3790
|
+
/* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyFirst) }),
|
|
3791
|
+
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: Re, withoutLabel: !0, size: "sm", value: o[h.field] ?? "", onChange: (x) => i(h.field, (x == null ? void 0 : x.toString()) ?? null), options: h.type === "BIT" ? [
|
|
3792
3792
|
{ id: 1, name: v.yes },
|
|
3793
3793
|
{ id: 0, name: v.no }
|
|
3794
|
-
] : h.valuesForSelect ?? [], isNumber: h.type === "BIT", showClearIcon: !0, dropdownWidth: 200 }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(it, { InputContainer:
|
|
3795
|
-
/* @__PURE__ */ n.jsx("th", { className: b("table-head",
|
|
3794
|
+
] : h.valuesForSelect ?? [], isNumber: h.type === "BIT", showClearIcon: !0, dropdownWidth: 200 }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(it, { InputContainer: Re, 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}`)),
|
|
3795
|
+
/* @__PURE__ */ n.jsx("th", { className: b("table-head", ue.tableHead, ue.actionColumn, ue.stickyLast) })
|
|
3796
3796
|
] })
|
|
3797
3797
|
] }),
|
|
3798
|
-
/* @__PURE__ */ n.jsxs("tbody", { className: b("table-body",
|
|
3798
|
+
/* @__PURE__ */ n.jsxs("tbody", { className: b("table-body", ue.tableBody), children: [
|
|
3799
3799
|
t.filter((h) => h[e.primaryKey ?? ""]).map((h) => /* @__PURE__ */ n.jsx(Uc, { schema: e, columns: f, setColumns: p, initialItem: h, onEdit: r, onDelete: s, customPickers: m }, `${e.id}-${h[e.primaryKey ?? ""].value}`)),
|
|
3800
3800
|
/* @__PURE__ */ n.jsx(Yc, { schema: e, columns: f, setColumns: p, onCreate: a, customPickers: m })
|
|
3801
3801
|
] })
|
|
@@ -3810,157 +3810,157 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3810
3810
|
apiItemPost: "/dynamicForms/update",
|
|
3811
3811
|
apiItemDelete: "/dynamicForms/delete",
|
|
3812
3812
|
apiItemCreate: "/dynamicForms/insert"
|
|
3813
|
-
},
|
|
3814
|
-
var _e,
|
|
3815
|
-
const { texts: { dynamicForms: h }, ProjectIconComponent:
|
|
3813
|
+
}, Qd = ({ id: e, page: t, setPage: r, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy: l, appUrls: { appDetail: c = gr.appDetail } = gr, apiUrls: { apiSchemaGet: d = ot.apiSchemaGet, apiDataGet: u = ot.apiDataGet, apiItemPost: m = ot.apiItemPost, apiItemDelete: v = ot.apiItemDelete, apiItemCreate: f = ot.apiItemCreate } = ot, customPickers: p }) => {
|
|
3814
|
+
var _e, de, se, Ce, $e, Ee;
|
|
3815
|
+
const { texts: { dynamicForms: h }, ProjectIconComponent: x } = q(fe), j = st(), { startLoading: w, stopLoading: y } = q(Mt), [g, N] = F(null), [I, E] = F(null), [S, T] = F(null), [_, R] = F(null), [k, $] = F(!1), { addNotification: L } = $r(), [P, O] = F([]), { confirm: A } = Rt(), W = 20, U = W + 1, H = _ ? Math.ceil(_.length / W) : 1, K = t ? t > 1 : !1, ee = t ? t < H : !1, le = t ? (t - 1) * W : 0, C = t ? t * W : W, [z, re] = F(!1), Oe = z ? _ == null ? void 0 : _.slice(le, C) : _, [he, Fe] = F(null);
|
|
3816
3816
|
B(() => {
|
|
3817
|
-
N(null),
|
|
3817
|
+
N(null), E(null), $(!1), O([]), Fe(null);
|
|
3818
3818
|
}, [e]);
|
|
3819
|
-
const
|
|
3820
|
-
w("dynamicFormSchema"), await j.get(`${d}?id=${e}`).then(({ data:
|
|
3821
|
-
N(
|
|
3819
|
+
const te = D(async () => {
|
|
3820
|
+
w("dynamicFormSchema"), await j.get(`${d}?id=${e}`).then(({ data: G }) => {
|
|
3821
|
+
N(G), y("dynamicFormSchema");
|
|
3822
3822
|
}).catch(() => y("dynamicFormSchema"));
|
|
3823
|
-
}, [j, e, w, y, d]),
|
|
3824
|
-
var
|
|
3825
|
-
if (!(
|
|
3826
|
-
if (
|
|
3827
|
-
|
|
3823
|
+
}, [j, e, w, y, d]), Ne = D(async () => {
|
|
3824
|
+
var G;
|
|
3825
|
+
if (!(g === null || ((G = g.id) == null ? void 0 : G.toString()) !== e)) {
|
|
3826
|
+
if (g.masterReference && !he) {
|
|
3827
|
+
E([]);
|
|
3828
3828
|
return;
|
|
3829
3829
|
}
|
|
3830
|
-
w("dynamicFormData"), await j.get(`${u}?id=${e}&showArchive=${
|
|
3831
|
-
const
|
|
3832
|
-
var
|
|
3833
|
-
return Object.fromEntries(((
|
|
3830
|
+
w("dynamicFormData"), await j.get(`${u}?id=${e}&showArchive=${k}${g.masterReference ? `&master=${he}` : ""}`).then(({ data: ie }) => {
|
|
3831
|
+
const pe = ie.map((oe) => {
|
|
3832
|
+
var xe;
|
|
3833
|
+
return Object.fromEntries(((xe = g.columns) == null ? void 0 : xe.filter((ye) => ye.field).map((ye) => [
|
|
3834
3834
|
ye.field,
|
|
3835
3835
|
{ value: oe[ye.field ?? ""], defaultValue: oe[ye.field ?? ""] }
|
|
3836
3836
|
])) ?? []);
|
|
3837
3837
|
});
|
|
3838
|
-
|
|
3838
|
+
E(pe), y("dynamicFormData");
|
|
3839
3839
|
}).catch(() => y("dynamicFormData"));
|
|
3840
3840
|
}
|
|
3841
|
-
}, [j, e,
|
|
3842
|
-
|
|
3841
|
+
}, [j, e, g, w, y, k, he, u]), De = D(async (G) => (w("dynamicFormEdit"), j.post(`${m}?id=${e}`, G).then(() => (y("dynamicFormEdit"), O([]), !0)).catch((ie) => (y("dynamicFormEdit"), O(Gt(ie)), !1))), [j, e, w, y, m]), Y = D(async (G) => (w("dynamicFormDelete"), j.delete(`${v}?id=${e}&pk=${G}`).then(() => (y("dynamicFormDelete"), O([]), !0)).catch((ie) => (y("dynamicFormDelete"), O(Gt(ie)), !1))), [j, e, w, y, v]), ge = D(async (G) => (w("dynamicFormCreate"), j.post(`${f}?id=${e}`, G).then(({ data: ie }) => (y("dynamicFormCreate"), O([]), ie)).catch((ie) => (y("dynamicFormCreate"), O(Gt(ie)), null))), [j, e, w, y, f]), we = D(async (G) => {
|
|
3842
|
+
g && await De(g.masterReference ? { ...G, [g.masterReferenceColumn ?? ""]: he } : G) && (L(h.editSuccess, "success"), E((ie) => ie && ie.map((pe) => {
|
|
3843
3843
|
var oe;
|
|
3844
|
-
return ((oe =
|
|
3844
|
+
return ((oe = pe[(g == null ? void 0 : g.primaryKey) ?? ""]) == null ? void 0 : oe.value) === G[(g == null ? void 0 : g.primaryKey) ?? ""] ? mr(G, g) : pe;
|
|
3845
3845
|
})));
|
|
3846
|
-
}, [
|
|
3847
|
-
await
|
|
3846
|
+
}, [L, De, g, he, h]), at = D(async (G) => {
|
|
3847
|
+
await A(h.deleteConfirm) && await Y(G) && (L(h.deleteSuccess, "success"), E((ie) => ie && ie.filter((pe) => {
|
|
3848
3848
|
var oe;
|
|
3849
|
-
return ((oe =
|
|
3849
|
+
return ((oe = pe[(g == null ? void 0 : g.primaryKey) ?? ""]) == null ? void 0 : oe.value) !== G;
|
|
3850
3850
|
})));
|
|
3851
|
-
}, [
|
|
3852
|
-
if (!
|
|
3851
|
+
}, [L, Y, h, A, g]), M = D(async (G) => {
|
|
3852
|
+
if (!g)
|
|
3853
3853
|
return !1;
|
|
3854
|
-
const ie = await
|
|
3854
|
+
const ie = await ge(g.masterReference ? { ...G, [g.masterReferenceColumn ?? ""]: he } : G);
|
|
3855
3855
|
if (ie !== null) {
|
|
3856
|
-
|
|
3857
|
-
const
|
|
3858
|
-
return
|
|
3856
|
+
L(h.createSuccess, "success");
|
|
3857
|
+
const pe = mr(G, g);
|
|
3858
|
+
return pe[(g == null ? void 0 : g.primaryKey) ?? ""] = { value: ie, defaultValue: ie }, E((oe) => [...oe ?? [], pe]), !0;
|
|
3859
3859
|
}
|
|
3860
3860
|
return !1;
|
|
3861
|
-
}, [
|
|
3862
|
-
|
|
3863
|
-
}, Q =
|
|
3864
|
-
if (!I || !
|
|
3865
|
-
|
|
3861
|
+
}, [L, ge, h, g, he]), V = (G) => {
|
|
3862
|
+
G > H ? r(H) : G < 1 && r(1), r(G);
|
|
3863
|
+
}, Q = D(() => {
|
|
3864
|
+
if (!I || !g) {
|
|
3865
|
+
T(null);
|
|
3866
3866
|
return;
|
|
3867
3867
|
}
|
|
3868
|
-
const
|
|
3868
|
+
const G = I.filter((ie) => Object.entries(s).every(([pe, oe]) => {
|
|
3869
3869
|
var ut, ft, mt;
|
|
3870
3870
|
if (oe === null)
|
|
3871
3871
|
return !0;
|
|
3872
|
-
const
|
|
3873
|
-
if (
|
|
3872
|
+
const xe = (ut = ie[pe]) == null ? void 0 : ut.value;
|
|
3873
|
+
if (xe == null)
|
|
3874
3874
|
return !1;
|
|
3875
|
-
const ye = (ft =
|
|
3875
|
+
const ye = (ft = g.columns) == null ? void 0 : ft.find((Nt) => Nt.field === pe), ct = ye == null ? void 0 : ye.type, dt = (ye == null ? void 0 : ye.values) && ((mt = ye == null ? void 0 : ye.values) == null ? void 0 : mt.length) > 0;
|
|
3876
3876
|
if (!ct)
|
|
3877
3877
|
return !1;
|
|
3878
3878
|
switch (ct) {
|
|
3879
3879
|
case "STR":
|
|
3880
|
-
return dt ?
|
|
3880
|
+
return dt ? xe === oe : xe.toString().toLowerCase().includes(oe.toLowerCase());
|
|
3881
3881
|
case "NUM":
|
|
3882
|
-
return dt ? Number(
|
|
3882
|
+
return dt ? Number(xe) === Number(oe) : xe.toString().toLowerCase().includes(oe.toLowerCase());
|
|
3883
3883
|
case "DT":
|
|
3884
|
-
return
|
|
3884
|
+
return xe.toString().toLowerCase().includes(oe.toLowerCase());
|
|
3885
3885
|
case "BIT":
|
|
3886
|
-
return Number(
|
|
3886
|
+
return Number(xe) === Number(oe);
|
|
3887
3887
|
default:
|
|
3888
|
-
return
|
|
3888
|
+
return xe.toString().toLowerCase().includes(oe.toLowerCase());
|
|
3889
3889
|
}
|
|
3890
3890
|
}));
|
|
3891
|
-
|
|
3892
|
-
}, [I, s,
|
|
3893
|
-
if (!
|
|
3894
|
-
|
|
3891
|
+
T(G);
|
|
3892
|
+
}, [I, s, g]), ce = D(() => {
|
|
3893
|
+
if (!S || !g) {
|
|
3894
|
+
R([]);
|
|
3895
3895
|
return;
|
|
3896
3896
|
}
|
|
3897
3897
|
if (!o) {
|
|
3898
|
-
|
|
3898
|
+
R(S);
|
|
3899
3899
|
return;
|
|
3900
3900
|
}
|
|
3901
|
-
|
|
3901
|
+
R([...S].sort((G, ie) => {
|
|
3902
3902
|
var ct, dt, ut, ft, mt, Nt;
|
|
3903
|
-
const
|
|
3904
|
-
if (!
|
|
3903
|
+
const pe = ((dt = (ct = G[o]) == null ? void 0 : ct.value) == null ? void 0 : dt.toString()) ?? "", oe = ((ft = (ut = ie[o]) == null ? void 0 : ut.value) == null ? void 0 : ft.toString()) ?? "", xe = g.columns.find((Te) => Te.field === o), ye = xe == null ? void 0 : xe.type;
|
|
3904
|
+
if (!xe || !ye || !pe && !oe)
|
|
3905
3905
|
return 0;
|
|
3906
|
-
if (!
|
|
3906
|
+
if (!pe)
|
|
3907
3907
|
return 1;
|
|
3908
3908
|
if (!oe)
|
|
3909
3909
|
return -1;
|
|
3910
|
-
if (
|
|
3911
|
-
const
|
|
3910
|
+
if (xe.values && xe.values.length > 0) {
|
|
3911
|
+
const Te = ((mt = xe.values.find((Ut) => {
|
|
3912
3912
|
var ht;
|
|
3913
|
-
return ((ht = Ut.id) == null ? void 0 : ht.toString()) ===
|
|
3914
|
-
})) == null ? void 0 : mt.name) ?? "",
|
|
3913
|
+
return ((ht = Ut.id) == null ? void 0 : ht.toString()) === pe;
|
|
3914
|
+
})) == null ? void 0 : mt.name) ?? "", ze = ((Nt = xe.values.find((Ut) => {
|
|
3915
3915
|
var ht;
|
|
3916
3916
|
return ((ht = Ut.id) == null ? void 0 : ht.toString()) === oe;
|
|
3917
3917
|
})) == null ? void 0 : Nt.name) ?? "";
|
|
3918
|
-
return i === "asc" ?
|
|
3918
|
+
return i === "asc" ? Te.localeCompare(ze) : ze.localeCompare(Te);
|
|
3919
3919
|
}
|
|
3920
3920
|
if (ye === "NUM") {
|
|
3921
|
-
const
|
|
3922
|
-
return i === "asc" ?
|
|
3921
|
+
const Te = Number(pe), ze = Number(oe);
|
|
3922
|
+
return i === "asc" ? Te - ze : ze - Te;
|
|
3923
3923
|
}
|
|
3924
3924
|
if (ye === "DT") {
|
|
3925
|
-
const
|
|
3926
|
-
return i === "asc" ?
|
|
3925
|
+
const Te = yt(pe == null ? void 0 : pe.toString()).getTime(), ze = yt(oe == null ? void 0 : oe.toString()).getTime();
|
|
3926
|
+
return i === "asc" ? Te - ze : ze - Te;
|
|
3927
3927
|
}
|
|
3928
|
-
return i === "asc" ?
|
|
3928
|
+
return i === "asc" ? pe.toString().localeCompare(oe.toString()) : oe.toString().localeCompare(pe.toString());
|
|
3929
3929
|
}));
|
|
3930
|
-
}, [
|
|
3930
|
+
}, [S, g, o, i]);
|
|
3931
3931
|
return B(() => {
|
|
3932
|
+
te();
|
|
3933
|
+
}, [te]), B(() => {
|
|
3932
3934
|
Ne();
|
|
3933
3935
|
}, [Ne]), B(() => {
|
|
3934
|
-
$e();
|
|
3935
|
-
}, [$e]), B(() => {
|
|
3936
3936
|
Q();
|
|
3937
3937
|
}, [Q]), B(() => {
|
|
3938
|
-
|
|
3939
|
-
}, [
|
|
3940
|
-
|
|
3941
|
-
}, [
|
|
3942
|
-
!
|
|
3943
|
-
}, [t,
|
|
3938
|
+
ce();
|
|
3939
|
+
}, [ce]), B(() => {
|
|
3940
|
+
_ && _.length > U ? (re(!0), t || r(1)) : (re(!1), _ && r(null));
|
|
3941
|
+
}, [_, r, t, U]), B(() => {
|
|
3942
|
+
!z || !t || (t > H && r(H), t < 1 && r(1));
|
|
3943
|
+
}, [t, z, H, r]), /* @__PURE__ */ n.jsxs("div", { className: "h-100 w-100 d-flex flex-column", children: [
|
|
3944
3944
|
/* @__PURE__ */ n.jsxs("div", { className: "mb-3 d-flex justify-content-between align-items-center", children: [
|
|
3945
|
-
/* @__PURE__ */ n.jsx(X, { variant: "h3", children: (
|
|
3946
|
-
/* @__PURE__ */ n.jsx(xs, { label: h.showArchived, value:
|
|
3945
|
+
/* @__PURE__ */ n.jsx(X, { variant: "h3", children: (g == null ? void 0 : g.name) ?? "" }),
|
|
3946
|
+
/* @__PURE__ */ n.jsx(xs, { label: h.showArchived, value: k === !0, onChange: (G) => $(G) })
|
|
3947
3947
|
] }),
|
|
3948
|
-
(
|
|
3949
|
-
(
|
|
3950
|
-
(
|
|
3948
|
+
(g == null ? void 0 : g.description) && /* @__PURE__ */ n.jsx(X, { variant: "body2", className: "mb-3", children: g == null ? void 0 : g.description }),
|
|
3949
|
+
(g == null ? void 0 : g.masterReference) && /* @__PURE__ */ n.jsx("div", { className: "mb-3 d-flex", children: /* @__PURE__ */ n.jsx(ed, { label: ((de = (_e = g.columns) == null ? void 0 : _e.find((G) => G.field === g.masterReferenceColumn)) == null ? void 0 : de.caption) ?? "", options: ((Ce = (se = g.columns) == null ? void 0 : se.find((G) => G.field === g.masterReferenceColumn)) == null ? void 0 : Ce.values) ?? [], master: he, onChange: (G) => Fe(G) }) }),
|
|
3950
|
+
(g == null ? void 0 : g.slaves) && g.slaves.length > 0 && /* @__PURE__ */ n.jsx("div", { className: "mb-3 d-flex align-items-center flex-start gap-1", children: g.slaves.map((G) => {
|
|
3951
3951
|
var ie;
|
|
3952
|
-
return /* @__PURE__ */ n.jsx(
|
|
3952
|
+
return /* @__PURE__ */ n.jsx(Me, { as: "link", href: `${Et(c, { id: (ie = G.id) == null ? void 0 : ie.toString() })}?type=dynamic-form`, children: G.name }, G.id);
|
|
3953
3953
|
}) }),
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
/* @__PURE__ */ n.jsx("div", { className: b("rounded border overflow-auto", hr.tableContainer), children: /* @__PURE__ */ n.jsx(Xc, { schema:
|
|
3958
|
-
|
|
3954
|
+
g != null && g.masterReference && !he ? /* @__PURE__ */ n.jsx(Dn, { variant: "warning", children: h.selectMaster(((Ee = ($e = g.columns) == null ? void 0 : $e.find((G) => G.field === g.masterReferenceColumn)) == null ? void 0 : Ee.caption) ?? "").toLowerCase() }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3955
|
+
g && P.length > 0 && /* @__PURE__ */ n.jsx("div", { className: "mb-2", children: /* @__PURE__ */ n.jsx(Ec, { errors: P, schema: g }) }),
|
|
3956
|
+
g && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3957
|
+
/* @__PURE__ */ n.jsx("div", { className: b("rounded border overflow-auto", hr.tableContainer), children: /* @__PURE__ */ n.jsx(Xc, { schema: g, items: (z ? Oe : _) ?? [], onEditItem: we, onDeleteItem: at, onCreateItem: M, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy: l, selectedMaster: (he == null ? void 0 : he.toString()) ?? null, customPickers: p }) }),
|
|
3958
|
+
z && t && /* @__PURE__ */ n.jsxs("div", { className: b(hr.pagination, "d-flex align-items-center gap-3 p-1 border-bottom border-start border-end rounded"), children: [
|
|
3959
3959
|
/* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
3960
|
-
/* @__PURE__ */ n.jsx(
|
|
3961
|
-
/* @__PURE__ */ n.jsx(
|
|
3962
|
-
/* @__PURE__ */ n.jsx(
|
|
3963
|
-
/* @__PURE__ */ n.jsx(
|
|
3960
|
+
/* @__PURE__ */ n.jsx(ne, { color: "primary", onClick: () => V(1), disabled: !K, children: /* @__PURE__ */ n.jsx(x, { icon: "chevron-double-left" }) }),
|
|
3961
|
+
/* @__PURE__ */ n.jsx(ne, { color: "primary", onClick: () => V(t - 1), disabled: !K, children: /* @__PURE__ */ n.jsx(x, { icon: "chevron-left" }) }),
|
|
3962
|
+
/* @__PURE__ */ n.jsx(ne, { color: "primary", onClick: () => V(t + 1), disabled: !ee, children: /* @__PURE__ */ n.jsx(x, { icon: "chevron-right" }) }),
|
|
3963
|
+
/* @__PURE__ */ n.jsx(ne, { color: "primary", onClick: () => V(H), disabled: !ee, children: /* @__PURE__ */ n.jsx(x, { icon: "chevron-double-right" }) })
|
|
3964
3964
|
] }),
|
|
3965
3965
|
/* @__PURE__ */ n.jsxs(X, { variant: "body", children: [
|
|
3966
3966
|
h.tablePage,
|
|
@@ -3969,7 +3969,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3969
3969
|
" ",
|
|
3970
3970
|
h.tablePageFrom,
|
|
3971
3971
|
" ",
|
|
3972
|
-
|
|
3972
|
+
H
|
|
3973
3973
|
] })
|
|
3974
3974
|
] })
|
|
3975
3975
|
] })
|
|
@@ -3979,39 +3979,39 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
3979
3979
|
appDetail: "/settings/:id"
|
|
3980
3980
|
}, xr = {
|
|
3981
3981
|
apiDynamicFormsGet: "/dynamicForms"
|
|
3982
|
-
}, nd = ({ item: e, children: t }) => e.description ? /* @__PURE__ */ n.jsx(zt, { placement: "left", text: e.description ?? "", children: /* @__PURE__ */ n.jsx("div", { children: t }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: t }),
|
|
3982
|
+
}, nd = ({ item: e, children: t }) => e.description ? /* @__PURE__ */ n.jsx(zt, { placement: "left", text: e.description ?? "", children: /* @__PURE__ */ n.jsx("div", { children: t }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: t }), Zd = ({ activeId: e, otherForms: t = [], groupsDefs: r = [], searchQuery: s, fullSize: a, appUrls: { appDetail: o = pr.appDetail } = pr, apiUrls: { apiDynamicFormsGet: i = xr.apiDynamicFormsGet } = xr }) => {
|
|
3983
3983
|
const l = st(), { startLoading: c, stopLoading: d } = q(Mt), [u, m] = F(null), v = J(() => [
|
|
3984
3984
|
...(u == null ? void 0 : u.map((h) => ({
|
|
3985
3985
|
...h,
|
|
3986
3986
|
type: "dynamic-form"
|
|
3987
3987
|
}))) ?? [],
|
|
3988
3988
|
...t
|
|
3989
|
-
].filter((h) => wt(h.name, s) || wt(h.description, s)).sort((h,
|
|
3989
|
+
].filter((h) => wt(h.name, s) || wt(h.description, s)).sort((h, x) => (h.name ?? "").localeCompare(x.name ?? "")) ?? [], [u, t, s]), f = J(() => r.map((h) => ({
|
|
3990
3990
|
id: h.id,
|
|
3991
3991
|
name: h.name ?? "",
|
|
3992
|
-
items: v.filter((
|
|
3993
|
-
})).filter((h) => h.items.length > 0), [r, v]), p =
|
|
3992
|
+
items: v.filter((x) => x.group === h.id)
|
|
3993
|
+
})).filter((h) => h.items.length > 0), [r, v]), p = D(async () => {
|
|
3994
3994
|
c("dynamicForms"), await l.get(i).then(({ data: h }) => {
|
|
3995
3995
|
m(h), d("dynamicForms");
|
|
3996
3996
|
}).catch(() => d("dynamicForms"));
|
|
3997
3997
|
}, [l, c, d, i]);
|
|
3998
3998
|
return B(() => {
|
|
3999
3999
|
!u && p();
|
|
4000
|
-
}, [p, u]), v.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(un, { title: h.name, defaultOpen: !0, children: h.items.map((
|
|
4001
|
-
var j, w, y,
|
|
4002
|
-
return a ? /* @__PURE__ */ n.jsxs(tt, { to: `${Et(o, { id: (j =
|
|
4003
|
-
/* @__PURE__ */ n.jsx(X, { variant: "body", children:
|
|
4004
|
-
|
|
4005
|
-
] },
|
|
4000
|
+
}, [p, u]), v.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(un, { title: h.name, defaultOpen: !0, children: h.items.map((x) => {
|
|
4001
|
+
var j, w, y, g;
|
|
4002
|
+
return a ? /* @__PURE__ */ n.jsxs(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()) === ((w = x.id) == null ? void 0 : w.toString()) ? "active" : ""}`, children: [
|
|
4003
|
+
/* @__PURE__ */ n.jsx(X, { variant: "body", children: x.name }),
|
|
4004
|
+
x.description && /* @__PURE__ */ n.jsx(X, { variant: "body2", className: "text-muted mt-2", children: x.description })
|
|
4005
|
+
] }, x.id) : /* @__PURE__ */ n.jsx(nd, { item: x, children: /* @__PURE__ */ n.jsx(tt, { to: `${Et(o, { id: (y = x.id) == null ? void 0 : y.toString() })}?type=${x.type}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((g = x.id) == null ? void 0 : g.toString()) ? "active" : ""}`, children: /* @__PURE__ */ n.jsx(X, { variant: "body2", children: x.name }) }) }, x.id);
|
|
4006
4006
|
}) }, h.id)) }) }) : null;
|
|
4007
|
-
},
|
|
4007
|
+
}, Jd = ({ label: e, to: t, value: r }) => /* @__PURE__ */ n.jsxs(Ve, { label: e, children: [
|
|
4008
4008
|
/* @__PURE__ */ n.jsx("input", { disabled: !0, className: "form-control d-none" }),
|
|
4009
4009
|
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 })
|
|
4010
|
-
] }),
|
|
4011
|
-
const { localizationContext: e } = q(
|
|
4010
|
+
] }), Xd = () => {
|
|
4011
|
+
const { localizationContext: e } = q(fe), { language: t, setLanguage: r } = q(e), s = (a) => {
|
|
4012
4012
|
r(a);
|
|
4013
4013
|
};
|
|
4014
|
-
return /* @__PURE__ */ n.jsx(
|
|
4014
|
+
return /* @__PURE__ */ n.jsx(Ge, { onClick: (a) => {
|
|
4015
4015
|
s(t === "cz" ? "en" : "cz"), a.stopPropagation();
|
|
4016
4016
|
}, children: t === "cz" ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4017
4017
|
/* @__PURE__ */ n.jsx("strong", { children: "CZ" }),
|
|
@@ -4022,7 +4022,7 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
4022
4022
|
/* @__PURE__ */ n.jsx(Fn, {}),
|
|
4023
4023
|
/* @__PURE__ */ n.jsx("span", { children: "CZ" })
|
|
4024
4024
|
] }) });
|
|
4025
|
-
},
|
|
4025
|
+
}, eu = ({ controlId: e, ...t }) => /* @__PURE__ */ n.jsx(ve.Group, { controlId: e, ...t }), tu = ({ employeeId: e, alt: t, noPhotoImage: r, cafmApiUrl: s, showLargeInLightBox: a = !1 }) => {
|
|
4026
4026
|
const { user: o } = q(At), { photoPath: i, photoPathSm: l } = Ua(e);
|
|
4027
4027
|
return /* @__PURE__ */ n.jsx(n.Fragment, { children: e && /* @__PURE__ */ n.jsx(n.Fragment, { children: a ? /* @__PURE__ */ n.jsx(oc, { baseUrl: s, customToken: o.cafmToken ?? void 0, photos: [
|
|
4028
4028
|
{
|
|
@@ -4033,16 +4033,16 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
4033
4033
|
lgSrc: i
|
|
4034
4034
|
}
|
|
4035
4035
|
], placeholder: r, ImgComponent: dr }) : /* @__PURE__ */ n.jsx(dr, { baseUrl: s, customToken: o.cafmToken ?? void 0, src: l, alt: t, placeholder: r, className: "rounded w-100" }) }) });
|
|
4036
|
-
},
|
|
4036
|
+
}, nu = ({ text: e, setText: t, onSearchButtonClick: r, className: s }) => {
|
|
4037
4037
|
const a = (o) => {
|
|
4038
4038
|
t(o);
|
|
4039
4039
|
};
|
|
4040
4040
|
return /* @__PURE__ */ n.jsxs(It, { className: `${s}`, children: [
|
|
4041
|
-
/* @__PURE__ */ n.jsx(
|
|
4042
|
-
e && /* @__PURE__ */ n.jsx(on, { onClick: () => a(""), variant: "link", className: "border text-muted", children: /* @__PURE__ */ n.jsx(
|
|
4041
|
+
/* @__PURE__ */ n.jsx(ve.Control, { value: e, onChange: (o) => t(o.target.value) }),
|
|
4042
|
+
e && /* @__PURE__ */ n.jsx(on, { onClick: () => a(""), variant: "link", className: "border text-muted", children: /* @__PURE__ */ n.jsx(Be, {}) }),
|
|
4043
4043
|
/* @__PURE__ */ n.jsx(on, { onClick: () => r && r(e), variant: "link", className: "border", children: /* @__PURE__ */ n.jsx(Oa, {}) })
|
|
4044
4044
|
] });
|
|
4045
|
-
},
|
|
4045
|
+
}, ru = ({ value: e, numberPrefix: t, numberSuffix: r, decimalScale: s = 2, className: a }) => /* @__PURE__ */ n.jsx(kn, { value: e, displayType: "text", thousandSeparator: " ", decimalScale: s, defaultValue: "", prefix: t, suffix: r, className: a, decimalSeparator: "," }), su = ({ data: e, keys: t, colors: r, tooltipLabel: s }) => /* @__PURE__ */ n.jsx(Fa, { data: e.map((a) => ({ name: a.name, ...a.values })), indexBy: "name", keys: t, margin: {
|
|
4046
4046
|
top: 20,
|
|
4047
4047
|
right: 50,
|
|
4048
4048
|
bottom: 30,
|
|
@@ -4065,91 +4065,91 @@ const Gl = "_lightbox_14acg_1", Kl = "_show_14acg_16", ql = "_header_14acg_20",
|
|
|
4065
4065
|
export {
|
|
4066
4066
|
Dn as Alert,
|
|
4067
4067
|
mc as AlertItem,
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4068
|
+
xd as ApiFileDownloadButton,
|
|
4069
|
+
Pd as AppSearch,
|
|
4070
|
+
Wd as AuthTemplate,
|
|
4071
4071
|
Er as AvatarIcon,
|
|
4072
4072
|
Is as Backdrop,
|
|
4073
|
-
|
|
4074
|
-
|
|
4073
|
+
zd as Badge,
|
|
4074
|
+
su as BarChart,
|
|
4075
4075
|
Al as Card,
|
|
4076
4076
|
xs as CheckInput,
|
|
4077
4077
|
un as Collapse,
|
|
4078
4078
|
Qc as ColumnResizer,
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4079
|
+
Me as ContextButton,
|
|
4080
|
+
Jd as DisabledRowLabelLink,
|
|
4081
|
+
iu as Documents,
|
|
4082
4082
|
Bt as Dropdown,
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4083
|
+
Td as DropdownDivider,
|
|
4084
|
+
Ge as DropdownItem,
|
|
4085
|
+
yd as DropdownPicker,
|
|
4086
4086
|
Vt as DropdownToggle,
|
|
4087
|
-
|
|
4088
|
-
|
|
4087
|
+
Qd as DynamicForm,
|
|
4088
|
+
tu as EmployeeSmallPhoto,
|
|
4089
4089
|
$o as ErrorBoundary,
|
|
4090
|
-
|
|
4091
|
-
|
|
4090
|
+
lu as FileExtensionIcon,
|
|
4091
|
+
jd as FileUploadButton,
|
|
4092
4092
|
gs as FileUploadContextButton,
|
|
4093
|
-
|
|
4093
|
+
Fd as FileUploadDropdownItem,
|
|
4094
4094
|
ii as Flexmonster,
|
|
4095
4095
|
pc as FloatingActionContainer,
|
|
4096
4096
|
bo as FloatingFormSubmit,
|
|
4097
4097
|
nt as FloatingLabelInput,
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4098
|
+
Yd as FromToDatePicker,
|
|
4099
|
+
Vd as HomeDashboard,
|
|
4100
|
+
Sd as HookFormCheckInput,
|
|
4101
|
+
kd as HookFormDropdownPicker,
|
|
4102
|
+
Id as HookFormFileInput,
|
|
4103
|
+
Dd as HookFormFloatingSubmit,
|
|
4104
|
+
Ed as HookFormNumericStepperInput,
|
|
4105
|
+
Od as HookFormNumericTextInput,
|
|
4106
|
+
Cd as HookFormRadioInput,
|
|
4107
|
+
$d as HookFormSelectInput,
|
|
4108
|
+
cu as HookFormTextAreaInput,
|
|
4109
|
+
du as HookFormTextInput,
|
|
4110
|
+
vd as HtmlTooltip,
|
|
4111
|
+
ne as IconButton,
|
|
4112
4112
|
dr as ImgApi,
|
|
4113
4113
|
Ds as ImgDirect,
|
|
4114
4114
|
rt as InvalidFeedback,
|
|
4115
|
-
|
|
4115
|
+
Xd as LanguageSwitch,
|
|
4116
4116
|
Ln as Loading,
|
|
4117
4117
|
Ga as LoadingBlock,
|
|
4118
|
-
|
|
4118
|
+
Ad as MessageBoard,
|
|
4119
4119
|
No as MonthPicker,
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4120
|
+
Gd as MonthPickerSearchParams,
|
|
4121
|
+
Re as NoInputContainer,
|
|
4122
|
+
ru as NumericFormat,
|
|
4123
|
+
bd as NumericStepperInput,
|
|
4124
|
+
_d as NumericTextInput,
|
|
4125
4125
|
oc as PhotoLibrary,
|
|
4126
4126
|
ac as PhotoLightbox,
|
|
4127
|
-
|
|
4127
|
+
qd as PieChart,
|
|
4128
4128
|
ln as PrimaryButton,
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4129
|
+
Nd as RadioInput,
|
|
4130
|
+
Ld as ReportPage,
|
|
4131
|
+
uu as ResponsiveContextDropdown,
|
|
4132
|
+
fu as ResponsiveContextDropdownItem,
|
|
4133
|
+
Bd as ResponsiveTabs,
|
|
4134
|
+
Ve as RowLabelInput,
|
|
4135
|
+
nu as SearchBox,
|
|
4136
4136
|
Ft as SelectInput,
|
|
4137
|
-
|
|
4137
|
+
Zd as SettingsFormPicker,
|
|
4138
4138
|
Ht as SimplePicker,
|
|
4139
4139
|
vn as SimpleToggle,
|
|
4140
4140
|
zt as SimpleTooltip,
|
|
4141
4141
|
Ni as Tab,
|
|
4142
|
-
|
|
4142
|
+
Md as TabPanel,
|
|
4143
4143
|
yi as Tabs,
|
|
4144
|
-
|
|
4144
|
+
wd as TextAreaInput,
|
|
4145
4145
|
it as TextInput,
|
|
4146
|
-
|
|
4147
|
-
|
|
4146
|
+
Ud as Timeline,
|
|
4147
|
+
eu as TypedFormGroup,
|
|
4148
4148
|
X as Typography,
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4149
|
+
mu as UserAvatarToggle,
|
|
4150
|
+
Rd as UserAvatarValueFormat,
|
|
4151
|
+
Hd as VersionInfo,
|
|
4152
4152
|
Kn as WidgetCard,
|
|
4153
4153
|
ko as YearPicker,
|
|
4154
|
-
|
|
4154
|
+
Kd as YearPickerSearchParams
|
|
4155
4155
|
};
|