react-luminus-components 2.0.3-beta.r19-12 → 2.0.3-beta.r19-14
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 +26 -26
- package/dist/{FormDisabledProvider-Df1ohtig.cjs → FormDisabledProvider-B62seaHO.cjs} +1 -1
- package/dist/{FormDisabledProvider-BPAzfs0s.js → FormDisabledProvider-qklvful2.js} +1 -1
- package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +1 -1
- package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +1 -1
- package/dist/components/common/SimplePicker/SimplePicker.d.ts +6 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +5 -5
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +3 -3
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +2 -2
- package/dist/main.cjs.js +5 -5
- package/dist/main.es.js +1023 -1023
- package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +5 -0
- package/dist/{nivo-bar-DIQcMyXJ.cjs → nivo-bar-C5h-CRYO.cjs} +30 -30
- package/dist/{nivo-bar-CkGPzpeT.js → nivo-bar-FuUHRilH.js} +5226 -5219
- package/dist/{useLocalStorageState-Bwt8wp1e.js → useLocalStorageState-BWVTT0cO.js} +1 -1
- package/dist/{useLocalStorageState-BStYdTWW.cjs → useLocalStorageState-iaJubQoG.cjs} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +2 -2
- package/package.json +1 -1
package/dist/main.es.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { c as I, t as Ce, a as Ln, s as zr, g as Hr, m as gi, d as Cn, b as vi, e as yi, f as
|
|
2
|
-
import { bF as Lp, bE as Ap } from "./nivo-bar-
|
|
3
|
-
import { jsx as r, jsxs as g, Fragment as
|
|
1
|
+
import { c as I, t as Ce, a as Ln, s as zr, g as Hr, m as gi, d as Cn, b as vi, e as yi, f as ct, h as bi, i as wi, j as Ni, k as xi, l as Si, n as Ci, o as ki, T as Ka, p as Qa, q as Xa, r as Vr, u as Ii, E as Za, v as yr, w as Ja, x as _i, y as ke, z as br, A as Di, F as eo, B as Ti, C as Ei, D as Oi, M as $i, G as Li, H as Ai, I as Ri, J as ji, K as Mi, L as lr, N as Pi, O as Fi, P as G, Q as Qe, R as Bi, S as zi, U as Hi, V as to, W as rt, X as J, Y as wr, Z as le, _ as Nr, $ as Ur, a0 as Vi, a1 as Ui, a2 as Wi, a3 as re, a4 as $, a5 as Ht, a6 as ze, a7 as xr, a8 as Sr, a9 as no, aa as Cr, ab as pt, ac as ro, ad as ao, ae as Se, af as ot, ag as _t, ah as Ft, ai as Gi, aj as Ae, ak as Yi, al as qi, am as it, an as je, ao as gt, ap as Je, aq as Dt, ar as nn, as as An, at, au as Ki, av as Ye, aw as Qi, ax as Xi, ay as vt, az as Re, aA as yt, aB as Tt, aC as qe, aD as $e, aE as He, aF as Rn, aG as oo, aH as Ge, aI as kr, aJ as Ke, aK as mn, aL as Ir, aM as Dn, aN as Zi, aO as Ji, aP as el, aQ as tl, aR as nl, aS as rl, aT as jn, aU as io, aV as Mn, aW as Bt, aX as al, aY as ol, aZ as il, a_ as lo, a$ as Tn, b0 as rn, b1 as fn, b2 as ll, b3 as sl, b4 as cl, b5 as dl, b6 as ul, b7 as ml, b8 as fl, b9 as so, ba as hl, bb as pl, bc as gl, bd as vl, be as yl, bf as ft, bg as bl, bh as wl, bi as Nl, bj as xl, bk as Sl, bl as Kt, bm as co, bn as Cl, bo as Wn, bp as uo, bq as $t, br as kl, bs as Il, bt as En, bu as _l, bv as mo, bw as gn, bx as fo, by as ho, bz as Dl, bA as Tl, bB as _r, bC as El, bD as Ol } from "./nivo-bar-FuUHRilH.js";
|
|
2
|
+
import { bF as Lp, bE as Ap } from "./nivo-bar-FuUHRilH.js";
|
|
3
|
+
import { jsx as r, jsxs as g, Fragment as X } from "react/jsx-runtime";
|
|
4
4
|
import * as we from "react";
|
|
5
|
-
import Le, { useCallback as D, useMemo as
|
|
6
|
-
import { c as
|
|
5
|
+
import Le, { useCallback as D, useMemo as R, useState as L, useRef as ve, useEffect as U, useContext as P, useId as $l, useLayoutEffect as Ll, Component as Al, isValidElement as Wr, Suspense as Rl, Fragment as jl } from "react";
|
|
6
|
+
import { c as tt, a as Ml, b as Pl, L as sr, F as Fl } from "./FormDisabledProvider-qklvful2.js";
|
|
7
7
|
import { InteractionType as Bl } from "@azure/msal-browser";
|
|
8
8
|
import { MsalAuthenticationTemplate as zl } from "@azure/msal-react";
|
|
9
9
|
import "@tanstack/react-query";
|
|
10
10
|
import { Link as Oe, useNavigate as Pn, useSearchParams as Hl, useParams as po, generatePath as zt, useLocation as Vl, Navigate as vn } from "react-router";
|
|
11
11
|
import On from "react-dom";
|
|
12
|
-
import { useFormContext as Et, useWatch as
|
|
12
|
+
import { useFormContext as Et, useWatch as ht, Controller as Dr, useFormState as Ul, useForm as Fn, FormProvider as Bn } from "react-hook-form";
|
|
13
13
|
import { Pivot as Wl } from "react-flexmonster";
|
|
14
14
|
import { l as Jt, g as cr, d as Gl, r as Yl, h as kn } from "./localStorageUtils-B7BmbR_u.js";
|
|
15
|
-
import { u as
|
|
15
|
+
import { u as _e, a as an } from "./useLocalStorageState-BWVTT0cO.js";
|
|
16
16
|
import { u as ql, a as kt, b as Kl } from "./useEmployeePhotoPath-DdMmh1qU.js";
|
|
17
17
|
const Ch = ({ fileLoader: e, fileName: t, children: n }) => {
|
|
18
18
|
const a = D(async () => {
|
|
@@ -24,10 +24,10 @@ const Ch = ({ fileLoader: e, fileName: t, children: n }) => {
|
|
|
24
24
|
i.href = l, i.setAttribute("download", t), (s = document.body) == null || s.appendChild(i), i.click(), (c = document.body) == null || c.removeChild(i);
|
|
25
25
|
}, [e, t]);
|
|
26
26
|
return /* @__PURE__ */ r("div", { role: "button", onClick: a, children: n });
|
|
27
|
-
}, Ql = ({ className: e, size: t, ...n }) => /* @__PURE__ */ g("div", { className: I("luminus-loading",
|
|
28
|
-
/* @__PURE__ */ r("div", { className: I("spinner-grow",
|
|
29
|
-
/* @__PURE__ */ r("div", { className: I("spinner-grow",
|
|
30
|
-
/* @__PURE__ */ r("div", { className: I("spinner-grow",
|
|
27
|
+
}, Ql = ({ className: e, size: t, ...n }) => /* @__PURE__ */ g("div", { className: I("luminus-loading", tt.loading, tt.loadingBlock, t === "line" ? tt.sizeLine : void 0, t === "fill" ? tt.sizeFill : void 0, e), ...n, children: [
|
|
28
|
+
/* @__PURE__ */ r("div", { className: I("spinner-grow", tt.spinnerGrow, "text-primary"), role: "status" }),
|
|
29
|
+
/* @__PURE__ */ r("div", { className: I("spinner-grow", tt.spinnerGrow, "text-primary", tt.second), role: "status" }),
|
|
30
|
+
/* @__PURE__ */ r("div", { className: I("spinner-grow", tt.spinnerGrow, "text-primary", tt.third), role: "status" })
|
|
31
31
|
] });
|
|
32
32
|
function Xl(e, t) {
|
|
33
33
|
const n = Ce(e);
|
|
@@ -96,17 +96,17 @@ function jt(e, t) {
|
|
|
96
96
|
let l = "", i = "";
|
|
97
97
|
const s = a === "extended" ? "-" : "", c = a === "extended" ? ":" : "";
|
|
98
98
|
if (o !== "time") {
|
|
99
|
-
const d =
|
|
100
|
-
l = `${
|
|
99
|
+
const d = ct(n.getDate(), 2), u = ct(n.getMonth() + 1, 2);
|
|
100
|
+
l = `${ct(n.getFullYear(), 4)}${s}${u}${s}${d}`;
|
|
101
101
|
}
|
|
102
102
|
if (o !== "date") {
|
|
103
103
|
const d = n.getTimezoneOffset();
|
|
104
104
|
if (d !== 0) {
|
|
105
|
-
const w = Math.abs(d), v =
|
|
105
|
+
const w = Math.abs(d), v = ct(Math.trunc(w / 60), 2), b = ct(w % 60, 2);
|
|
106
106
|
i = `${d < 0 ? "+" : "-"}${v}:${b}`;
|
|
107
107
|
} else
|
|
108
108
|
i = "Z";
|
|
109
|
-
const u =
|
|
109
|
+
const u = ct(n.getHours(), 2), m = ct(n.getMinutes(), 2), f = ct(n.getSeconds(), 2), p = l === "" ? "" : "T", h = [u, m, f].join(c);
|
|
110
110
|
l = `${l}${p}${h}${i}`;
|
|
111
111
|
}
|
|
112
112
|
return l;
|
|
@@ -181,16 +181,16 @@ const os = {
|
|
|
181
181
|
getDimensionValue: p = as,
|
|
182
182
|
...h
|
|
183
183
|
}, w) => {
|
|
184
|
-
const v = typeof s == "function" ? s() : s, b =
|
|
184
|
+
const v = typeof s == "function" ? s() : s, b = R(() => Qt((S) => {
|
|
185
185
|
S.style[v] = "0";
|
|
186
|
-
}, e), [v, e]), x =
|
|
186
|
+
}, e), [v, e]), x = R(() => Qt((S) => {
|
|
187
187
|
const _ = `scroll${v[0].toUpperCase()}${v.slice(1)}`;
|
|
188
188
|
S.style[v] = `${S[_]}px`;
|
|
189
|
-
}, t), [v, t]), C =
|
|
189
|
+
}, t), [v, t]), C = R(() => Qt((S) => {
|
|
190
190
|
S.style[v] = null;
|
|
191
|
-
}, n), [v, n]), N =
|
|
191
|
+
}, n), [v, n]), N = R(() => Qt((S) => {
|
|
192
192
|
S.style[v] = `${p(v, S)}px`, Ii(S);
|
|
193
|
-
}, a), [a, p, v]), y =
|
|
193
|
+
}, a), [a, p, v]), y = R(() => Qt((S) => {
|
|
194
194
|
S.style[v] = null;
|
|
195
195
|
}, o), [v, o]);
|
|
196
196
|
return /* @__PURE__ */ r(Ka, {
|
|
@@ -247,7 +247,7 @@ const yo = /* @__PURE__ */ we.forwardRef(({
|
|
|
247
247
|
as: n = "div",
|
|
248
248
|
...a
|
|
249
249
|
}, o) => {
|
|
250
|
-
const l = ke(e, "card-header"), i =
|
|
250
|
+
const l = ke(e, "card-header"), i = R(() => ({
|
|
251
251
|
cardHeaderBsPrefix: l
|
|
252
252
|
}), [l]);
|
|
253
253
|
return /* @__PURE__ */ r(vo.Provider, {
|
|
@@ -397,7 +397,7 @@ const ss = (e) => /* @__PURE__ */ r(zn, {
|
|
|
397
397
|
...l
|
|
398
398
|
}, i) => {
|
|
399
399
|
e = ke(e, "input-group");
|
|
400
|
-
const s =
|
|
400
|
+
const s = R(() => ({}), []);
|
|
401
401
|
return /* @__PURE__ */ r(Di.Provider, {
|
|
402
402
|
value: s,
|
|
403
403
|
children: /* @__PURE__ */ r(o, {
|
|
@@ -456,7 +456,7 @@ function us(e) {
|
|
|
456
456
|
typeof s == "object" ? (u = s, d = c, c = !0) : (c = c || !0, u = {
|
|
457
457
|
[s]: c
|
|
458
458
|
});
|
|
459
|
-
let m =
|
|
459
|
+
let m = R(() => Object.entries(u).reduce((f, [p, h]) => ((h === "up" || h === !0) && (f = n(f, l(p))), (h === "down" || h === !0) && (f = n(f, o(p))), f), ""), [JSON.stringify(u)]);
|
|
460
460
|
return ds(m, d);
|
|
461
461
|
}
|
|
462
462
|
return i;
|
|
@@ -568,44 +568,44 @@ const Oo = /* @__PURE__ */ we.forwardRef(({
|
|
|
568
568
|
onEntering: S,
|
|
569
569
|
onExited: _,
|
|
570
570
|
backdropClassName: k,
|
|
571
|
-
manager:
|
|
571
|
+
manager: j,
|
|
572
572
|
renderStaticNode: T = !1,
|
|
573
573
|
...M
|
|
574
|
-
},
|
|
575
|
-
const
|
|
574
|
+
}, F) => {
|
|
575
|
+
const E = ve();
|
|
576
576
|
e = ke(e, "offcanvas");
|
|
577
|
-
const [
|
|
577
|
+
const [O, Z] = L(!1), H = Oi(f), z = ms(l || "xs", "up");
|
|
578
578
|
U(() => {
|
|
579
|
-
|
|
580
|
-
}, [i, l,
|
|
581
|
-
const
|
|
582
|
-
onHide:
|
|
583
|
-
}), [
|
|
584
|
-
function
|
|
585
|
-
return
|
|
579
|
+
Z(l ? i && !z : i);
|
|
580
|
+
}, [i, l, z]);
|
|
581
|
+
const A = R(() => ({
|
|
582
|
+
onHide: H
|
|
583
|
+
}), [H]);
|
|
584
|
+
function V() {
|
|
585
|
+
return j || (d ? (E.current || (E.current = new Ri({
|
|
586
586
|
handleContainerOverflow: !1
|
|
587
|
-
})),
|
|
587
|
+
})), E.current) : ji());
|
|
588
588
|
}
|
|
589
|
-
const
|
|
590
|
-
|
|
591
|
-
},
|
|
592
|
-
|
|
593
|
-
},
|
|
594
|
-
...
|
|
589
|
+
const B = (ie, ...xe) => {
|
|
590
|
+
ie && (ie.style.visibility = "visible"), y == null || y(ie, ...xe);
|
|
591
|
+
}, Y = (ie, ...xe) => {
|
|
592
|
+
ie && (ie.style.visibility = ""), _ == null || _(...xe);
|
|
593
|
+
}, ee = D((ie) => /* @__PURE__ */ r("div", {
|
|
594
|
+
...ie,
|
|
595
595
|
className: I(`${e}-backdrop`, k)
|
|
596
|
-
}), [k, e]), ce = (
|
|
597
|
-
...
|
|
596
|
+
}), [k, e]), ce = (ie) => /* @__PURE__ */ r("div", {
|
|
597
|
+
...ie,
|
|
598
598
|
...M,
|
|
599
599
|
className: I(t, l ? `${e}-${l}` : e, `${e}-${o}`),
|
|
600
600
|
"aria-labelledby": a,
|
|
601
601
|
children: n
|
|
602
602
|
});
|
|
603
|
-
return /* @__PURE__ */ g(
|
|
604
|
-
children: [!
|
|
605
|
-
value:
|
|
603
|
+
return /* @__PURE__ */ g(X, {
|
|
604
|
+
children: [!O && (l || T) && ce({}), /* @__PURE__ */ r($i.Provider, {
|
|
605
|
+
value: A,
|
|
606
606
|
children: /* @__PURE__ */ r(Li, {
|
|
607
|
-
show:
|
|
608
|
-
ref:
|
|
607
|
+
show: O,
|
|
608
|
+
ref: F,
|
|
609
609
|
backdrop: s,
|
|
610
610
|
container: p,
|
|
611
611
|
keyboard: c,
|
|
@@ -615,17 +615,17 @@ const Oo = /* @__PURE__ */ we.forwardRef(({
|
|
|
615
615
|
restoreFocusOptions: b,
|
|
616
616
|
onEscapeKeyDown: u,
|
|
617
617
|
onShow: m,
|
|
618
|
-
onHide:
|
|
619
|
-
onEnter:
|
|
618
|
+
onHide: H,
|
|
619
|
+
onEnter: B,
|
|
620
620
|
onEntering: S,
|
|
621
621
|
onEntered: x,
|
|
622
622
|
onExit: C,
|
|
623
623
|
onExiting: N,
|
|
624
|
-
onExited:
|
|
625
|
-
manager:
|
|
624
|
+
onExited: Y,
|
|
625
|
+
manager: V(),
|
|
626
626
|
transition: ps,
|
|
627
627
|
backdropTransition: gs,
|
|
628
|
-
renderBackdrop:
|
|
628
|
+
renderBackdrop: ee,
|
|
629
629
|
renderDialog: ce
|
|
630
630
|
})
|
|
631
631
|
})]
|
|
@@ -675,7 +675,7 @@ const Ao = /* @__PURE__ */ we.forwardRef(({
|
|
|
675
675
|
});
|
|
676
676
|
});
|
|
677
677
|
Ao.displayName = "Placeholder";
|
|
678
|
-
const
|
|
678
|
+
const dt = Object.assign(Ao, {
|
|
679
679
|
Button: Lo
|
|
680
680
|
}), Lr = /* @__PURE__ */ we.forwardRef(({
|
|
681
681
|
bsPrefix: e,
|
|
@@ -729,13 +729,13 @@ const Ro = /* @__PURE__ */ we.forwardRef(({
|
|
|
729
729
|
});
|
|
730
730
|
Ro.displayName = "Table";
|
|
731
731
|
const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
732
|
-
const { texts: { formSubmit: o } } =
|
|
732
|
+
const { texts: { formSubmit: o } } = P(G);
|
|
733
733
|
return /* @__PURE__ */ g(Hm, { noSpacer: n, children: [
|
|
734
|
-
/* @__PURE__ */ g(
|
|
734
|
+
/* @__PURE__ */ g(Qe, { as: "button", color: "primary", size: "lg", type: "submit", disabled: a, children: [
|
|
735
735
|
/* @__PURE__ */ r(Bi, {}),
|
|
736
736
|
e
|
|
737
737
|
] }),
|
|
738
|
-
t && /* @__PURE__ */ g(
|
|
738
|
+
t && /* @__PURE__ */ g(Qe, { as: "button", color: "secondary", variant: "outlined", size: "lg", onClick: t, children: [
|
|
739
739
|
/* @__PURE__ */ r(zi, {}),
|
|
740
740
|
o.storno
|
|
741
741
|
] })
|
|
@@ -744,7 +744,7 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
744
744
|
const u = (m) => {
|
|
745
745
|
m.target.files && (l(m.target.files), m.target.value = "");
|
|
746
746
|
};
|
|
747
|
-
return /* @__PURE__ */ g(
|
|
747
|
+
return /* @__PURE__ */ g(X, { children: [
|
|
748
748
|
/* @__PURE__ */ g("label", { ref: e, htmlFor: a, className: I(`luminus-context-button btn text-${t} ${i ?? ""}`, Hi.button), ...d, children: [
|
|
749
749
|
n,
|
|
750
750
|
s
|
|
@@ -760,7 +760,7 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
760
760
|
s.target.value = "";
|
|
761
761
|
}
|
|
762
762
|
}, [e]), i = $l();
|
|
763
|
-
return /* @__PURE__ */ g(
|
|
763
|
+
return /* @__PURE__ */ g(X, { children: [
|
|
764
764
|
/* @__PURE__ */ r("label", { htmlFor: i, className: I("btn luminus-context-button text-primary", `btn-${o}`, a), children: n }),
|
|
765
765
|
/* @__PURE__ */ r("input", { id: i, type: "file", accept: t, onChange: l, hidden: !0 })
|
|
766
766
|
] });
|
|
@@ -772,17 +772,17 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
772
772
|
const d = D((f) => {
|
|
773
773
|
const p = Ml(e, f);
|
|
774
774
|
p.getFullYear() < a || p.getFullYear() > o || t(p);
|
|
775
|
-
}, [e, t, a, o]), u =
|
|
775
|
+
}, [e, t, a, o]), u = R(() => {
|
|
776
776
|
const f = [];
|
|
777
777
|
for (let p = a; p <= o; p++)
|
|
778
778
|
f.push(p);
|
|
779
779
|
return f;
|
|
780
|
-
}, [a, o]), m =
|
|
780
|
+
}, [a, o]), m = R(() => {
|
|
781
781
|
const h = [];
|
|
782
782
|
for (let w = 0; w <= 11; w++)
|
|
783
783
|
h.push({
|
|
784
784
|
id: w,
|
|
785
|
-
name:
|
|
785
|
+
name: rt(new Date(2024, w, 1), "LLLL", { locale: n })
|
|
786
786
|
});
|
|
787
787
|
return h;
|
|
788
788
|
}, [n]);
|
|
@@ -790,11 +790,11 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
790
790
|
[yn[c]]: c
|
|
791
791
|
}), children: [
|
|
792
792
|
/* @__PURE__ */ r(J, { onClick: () => d(-1), disabled: e.getFullYear() < a || e.getFullYear() === a && e.getMonth() <= 0, children: /* @__PURE__ */ r(wr, {}) }),
|
|
793
|
-
/* @__PURE__ */ r(
|
|
793
|
+
/* @__PURE__ */ r(le.Select, { value: e.getMonth(), onChange: (f) => {
|
|
794
794
|
var p;
|
|
795
795
|
return ((p = f.target) == null ? void 0 : p.value) && t(ns(e, Number(f.target.value)));
|
|
796
796
|
}, className: I(yn.select, yn.month, i), children: m.map((f) => /* @__PURE__ */ r("option", { value: f.id, children: f.name }, f.id)) }),
|
|
797
|
-
/* @__PURE__ */ r(
|
|
797
|
+
/* @__PURE__ */ r(le.Select, { value: e.getFullYear(), onChange: (f) => {
|
|
798
798
|
var p;
|
|
799
799
|
return ((p = f.target) == null ? void 0 : p.value) && t(dr(e, Number(f.target.value)));
|
|
800
800
|
}, className: I(yn.select, s), children: u.map((f) => /* @__PURE__ */ r("option", { value: f, children: f }, f)) }),
|
|
@@ -803,13 +803,13 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
803
803
|
}, xs = "_select_pywmr_1", Ss = {
|
|
804
804
|
select: xs
|
|
805
805
|
}, ta = 2e3, na = 2050, Cs = ({ year: e, onChangeYear: t, className: n, variant: a = "standart", ...o }) => {
|
|
806
|
-
const l =
|
|
806
|
+
const l = R(() => {
|
|
807
807
|
var d;
|
|
808
808
|
return o.manualOptions ? ((d = o.options) == null ? void 0 : d.at(0)) ?? ta : o.optionMin ?? ta;
|
|
809
|
-
}, [o]), i =
|
|
809
|
+
}, [o]), i = R(() => {
|
|
810
810
|
var d;
|
|
811
811
|
return o.manualOptions ? ((d = o.options) == null ? void 0 : d.at(-1)) ?? na : o.optionMax ?? na;
|
|
812
|
-
}, [o]), s =
|
|
812
|
+
}, [o]), s = R(() => {
|
|
813
813
|
if (o.manualOptions)
|
|
814
814
|
return o.options;
|
|
815
815
|
const d = [];
|
|
@@ -830,7 +830,7 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
830
830
|
}, [e, t, i, l, o, s]);
|
|
831
831
|
return /* @__PURE__ */ g("div", { className: I("d-flex flex-row align-items-center m-0", a === "standart" ? "card p-1 gap-2" : void 0, a === "minimalist" ? "p-0 gap-0" : void 0, n ?? ""), children: [
|
|
832
832
|
/* @__PURE__ */ r(J, { onClick: () => c(-1), disabled: e.getFullYear() <= l, children: /* @__PURE__ */ r(wr, {}) }),
|
|
833
|
-
/* @__PURE__ */ r(
|
|
833
|
+
/* @__PURE__ */ r(le.Select, { value: e.getFullYear(), onChange: (d) => {
|
|
834
834
|
var u;
|
|
835
835
|
return ((u = d.target) == null ? void 0 : u.value) && t(dr(e, Number(d.target.value)));
|
|
836
836
|
}, className: I(Ss.select, "bg-transparent"), children: s.map((d) => /* @__PURE__ */ r("option", { value: d, children: d }, d)) }),
|
|
@@ -839,10 +839,10 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
839
839
|
}, ks = "_avatar-icon_1axl6_1", Is = {
|
|
840
840
|
avatarIcon: ks
|
|
841
841
|
}, Ar = ({ name: e, fontSize: t, size: n }) => {
|
|
842
|
-
const a =
|
|
842
|
+
const a = R(() => {
|
|
843
843
|
const i = e.split(" ");
|
|
844
844
|
return i.length < 2 ? e : Ur(" ", i.at(i.length - 2), i.at(i.length - 1));
|
|
845
|
-
}, [e]), o =
|
|
845
|
+
}, [e]), o = R(() => {
|
|
846
846
|
const i = a.split(" ");
|
|
847
847
|
return Ur("", ...i.map((s) => s.at(0) ?? void 0));
|
|
848
848
|
}, [a]), l = (i) => {
|
|
@@ -950,11 +950,11 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
950
950
|
qrStyle: "dots"
|
|
951
951
|
}
|
|
952
952
|
}, Ds = _s, Ts = ({ value: e, qrRef: t, variant: n = "blackRedEyes" }) => /* @__PURE__ */ r(Wi, { ref: t, value: e, eyeColor: ra["eon-red"], fgColor: ra["eon-turquoise"], logoHeight: 32, logoWidth: 32, removeQrCodeBehindLogo: !0, logoPadding: 5, logoPaddingStyle: "circle", ecLevel: "Q", ...Ds[n] }), Es = ({ value: e, contactType: t, className: n }) => {
|
|
953
|
-
const { ProjectIconComponent: a } =
|
|
953
|
+
const { ProjectIconComponent: a } = P(G), [o, l] = L(!1), i = D(() => {
|
|
954
954
|
l(!0);
|
|
955
955
|
}, []), s = D(() => {
|
|
956
956
|
l(!1);
|
|
957
|
-
}, []), c =
|
|
957
|
+
}, []), c = R(() => {
|
|
958
958
|
switch (t) {
|
|
959
959
|
case "email":
|
|
960
960
|
return "mailto";
|
|
@@ -964,7 +964,7 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
964
964
|
throw new Error("Incorrect type for ContactsLink");
|
|
965
965
|
}
|
|
966
966
|
}, [t]);
|
|
967
|
-
return /* @__PURE__ */ g(
|
|
967
|
+
return /* @__PURE__ */ g(X, { children: [
|
|
968
968
|
/* @__PURE__ */ r(J, { onClick: i, disabled: e === null, className: n, children: /* @__PURE__ */ r(a, { icon: "qr-code" }) }),
|
|
969
969
|
/* @__PURE__ */ r(re, { show: o, onHide: s, size: "sm", children: /* @__PURE__ */ g(re.Body, { className: "d-flex flex-column align-items-center", children: [
|
|
970
970
|
/* @__PURE__ */ r(Ts, { value: `${c}:${e}` }),
|
|
@@ -972,7 +972,7 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
972
972
|
] }) })
|
|
973
973
|
] });
|
|
974
974
|
}, Os = ({ contactType: e, value: t, className: n, children: a, showIconWithChildren: o }) => {
|
|
975
|
-
const { ProjectIconComponent: l } =
|
|
975
|
+
const { ProjectIconComponent: l } = P(G), i = R(() => {
|
|
976
976
|
switch (e) {
|
|
977
977
|
case "email":
|
|
978
978
|
return "mailto";
|
|
@@ -981,7 +981,7 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
981
981
|
default:
|
|
982
982
|
throw new Error("Incorrect type for ContactsLink");
|
|
983
983
|
}
|
|
984
|
-
}, [e]), s =
|
|
984
|
+
}, [e]), s = R(() => {
|
|
985
985
|
switch (e) {
|
|
986
986
|
case "email":
|
|
987
987
|
return "mail";
|
|
@@ -991,7 +991,7 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
991
991
|
throw new Error("Incorrect type for ContactsLink");
|
|
992
992
|
}
|
|
993
993
|
}, [e]);
|
|
994
|
-
return /* @__PURE__ */ r("div", { className: n, children: t === null ? /* @__PURE__ */ g(
|
|
994
|
+
return /* @__PURE__ */ r("div", { className: n, children: t === null ? /* @__PURE__ */ g(X, { children: [
|
|
995
995
|
a,
|
|
996
996
|
(!a || o) && /* @__PURE__ */ r(J, { disabled: !0, children: /* @__PURE__ */ r(l, { icon: s }) })
|
|
997
997
|
] }) : /* @__PURE__ */ g(Oe, { to: `${i}:${t}`, className: "w-100", children: [
|
|
@@ -999,10 +999,10 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
999
999
|
(!a || o) && /* @__PURE__ */ r(J, { children: /* @__PURE__ */ r(l, { icon: s }) })
|
|
1000
1000
|
] }) });
|
|
1001
1001
|
}, on = ({ InputContainer: e = Ht, label: t, value: n, onChange: a, hidden: o, disabled: l, className: i, type: s, withoutLabel: c, indeterminate: d, hint: u }) => {
|
|
1002
|
-
const m =
|
|
1002
|
+
const m = ve(null);
|
|
1003
1003
|
return U(() => {
|
|
1004
1004
|
m.current && (m.current.indeterminate = d ?? !1);
|
|
1005
|
-
}, [m, d]), /* @__PURE__ */ r(e, { isForCheckInput: !0, hidden: o, label: t ?? "", withoutLabel: c, className: i, hint: u, disabled: l, children: /* @__PURE__ */ r(
|
|
1005
|
+
}, [m, d]), /* @__PURE__ */ r(e, { isForCheckInput: !0, hidden: o, label: t ?? "", withoutLabel: c, className: i, hint: u, disabled: l, children: /* @__PURE__ */ r(le.Check, { ref: m, id: `check-${t}`, type: s ?? "checkbox", label: t ?? "", checked: n, onChange: (f) => {
|
|
1006
1006
|
var p;
|
|
1007
1007
|
a && a(((p = f.target) == null ? void 0 : p.checked) ?? !1);
|
|
1008
1008
|
}, className: i ?? "", hidden: o ?? !1, disabled: l ?? !1 }) });
|
|
@@ -1013,7 +1013,7 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
1013
1013
|
popoverHandle: Rs,
|
|
1014
1014
|
btnsPopoverHideable: js
|
|
1015
1015
|
}, Mo = ({ children: e, className: t, withoutLabel: n, label: a, contactType: o, value: l }) => {
|
|
1016
|
-
const { ProjectIconComponent: i } =
|
|
1016
|
+
const { ProjectIconComponent: i } = P(G);
|
|
1017
1017
|
return /* @__PURE__ */ g("div", { className: I("d-flex align-items-center", t), children: [
|
|
1018
1018
|
!n && /* @__PURE__ */ r("div", { className: I("d-flex justify-content-between align-items-center w-50"), children: /* @__PURE__ */ r($, { variant: "form-label", className: "text-muted", children: a }) }),
|
|
1019
1019
|
/* @__PURE__ */ g("div", { className: I("w-50", Xt.popoverContainer), children: [
|
|
@@ -1027,51 +1027,51 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
1027
1027
|
] })
|
|
1028
1028
|
] })
|
|
1029
1029
|
] });
|
|
1030
|
-
}, Ih = ({ value: e, label: t, InputContainer: n = Ht, className: a, withoutLabel: o, hidden: l, disabled: i, contactType: s, ...c }) => l ? null : /* @__PURE__ */ r(Mo, { contactType: s, value: e, withoutLabel: o, label: t, className: a, children: /* @__PURE__ */ r(
|
|
1031
|
-
const [
|
|
1030
|
+
}, Ih = ({ value: e, label: t, InputContainer: n = Ht, className: a, withoutLabel: o, hidden: l, disabled: i, contactType: s, ...c }) => l ? null : /* @__PURE__ */ r(Mo, { contactType: s, value: e, withoutLabel: o, label: t, className: a, children: /* @__PURE__ */ r(ze, { type: "text", value: e, disabled: i, InputContainer: n, size: "sm", withoutLabel: !0, ...c }) }), _h = ({ InputContainer: e = Ht, items: t, selectedItemNavigateTo: n, onSearchQueryChange: a, texts: o, isLoading: l, value: i, onSelect: s, label: c, withoutLabel: d, size: u, dropdownItemsNameWidth: m, additionalColumns: f, hidden: p, disabled: h, displayIdAsName: w, CustomOnChangeComponent: v, className: b, archiveColumn: x, icon: C, hint: N, addNewOptionPath: y, refreshOptions: S, MiniDetailComponent: _, miniDetailPlacement: k, suggestedItems: j, suggestedItemsTitle: T, customEllipsisOptions: M }) => {
|
|
1031
|
+
const [F, E] = L(!1), O = D((B) => {
|
|
1032
1032
|
s && s(B);
|
|
1033
|
-
}, [s]),
|
|
1034
|
-
|
|
1035
|
-
}, [O]),
|
|
1036
|
-
var B,
|
|
1037
|
-
return w ? ((B = i == null ? void 0 : i.id) == null ? void 0 : B.toString()) ?? "" : i != null && i.name && i.name.length > 0 ? i.name : ((
|
|
1033
|
+
}, [s]), Z = D((B) => {
|
|
1034
|
+
E(!1), O(B);
|
|
1035
|
+
}, [O]), H = ve(null), z = n !== void 0, A = z && i !== null, V = R(() => {
|
|
1036
|
+
var B, Y;
|
|
1037
|
+
return w ? ((B = i == null ? void 0 : i.id) == null ? void 0 : B.toString()) ?? "" : i != null && i.name && i.name.length > 0 ? i.name : ((Y = i == null ? void 0 : i.id) == null ? void 0 : Y.toString()) ?? "";
|
|
1038
1038
|
}, [i, w]);
|
|
1039
|
-
return /* @__PURE__ */ r(
|
|
1039
|
+
return /* @__PURE__ */ r(X, { children: /* @__PURE__ */ g(e, { withoutLabel: d, label: c ?? "", hidden: p, inputContainerClassName: I({ "luminus-dropdown-select-open": F }), className: b, hint: N, disabled: h, children: [
|
|
1040
1040
|
/* @__PURE__ */ g(xr, { currentSelection: i, selectedItemNavigateTo: n, children: [
|
|
1041
1041
|
w && (i == null ? void 0 : i.name) && /* @__PURE__ */ r($, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: i.name }),
|
|
1042
1042
|
/* @__PURE__ */ r(Sr, { value: (i == null ? void 0 : i.id) ?? null, MiniDetailComponent: _, miniDetailPlacement: k, children: /* @__PURE__ */ g(
|
|
1043
|
-
|
|
1043
|
+
le.Select,
|
|
1044
1044
|
{
|
|
1045
|
-
ref:
|
|
1045
|
+
ref: H,
|
|
1046
1046
|
size: u,
|
|
1047
1047
|
value: (i == null ? void 0 : i.id) ?? "",
|
|
1048
1048
|
onMouseDown: (B) => {
|
|
1049
1049
|
B.currentTarget.focus(), B.preventDefault();
|
|
1050
1050
|
},
|
|
1051
1051
|
onClick: () => {
|
|
1052
|
-
!z && !h &&
|
|
1052
|
+
!z && !h && E(!0);
|
|
1053
1053
|
},
|
|
1054
1054
|
onChange: () => {
|
|
1055
1055
|
},
|
|
1056
1056
|
className: I("w-100", {
|
|
1057
1057
|
"luminus-dropdown-picker-disabled": h,
|
|
1058
|
-
"luminus-dropdown-picker-link":
|
|
1058
|
+
"luminus-dropdown-picker-link": A
|
|
1059
1059
|
}),
|
|
1060
1060
|
hidden: p,
|
|
1061
1061
|
children: [
|
|
1062
1062
|
/* @__PURE__ */ r("option", { value: "" }),
|
|
1063
|
-
i && /* @__PURE__ */ r("option", { value: i.id ?? void 0, children:
|
|
1063
|
+
i && /* @__PURE__ */ r("option", { value: i.id ?? void 0, children: V })
|
|
1064
1064
|
]
|
|
1065
1065
|
}
|
|
1066
1066
|
) }),
|
|
1067
1067
|
v || !h && z ? /* @__PURE__ */ g("div", { className: "custom-picker-button", children: [
|
|
1068
1068
|
!v && !h && z && /* @__PURE__ */ r(J, { size: "sm", color: "secondary", onClick: (B) => {
|
|
1069
|
-
B.preventDefault(), B.stopPropagation(),
|
|
1069
|
+
B.preventDefault(), B.stopPropagation(), E(!0);
|
|
1070
1070
|
}, children: C ?? /* @__PURE__ */ r(no, {}) }),
|
|
1071
1071
|
v ?? null
|
|
1072
1072
|
] }) : null
|
|
1073
1073
|
] }),
|
|
1074
|
-
|
|
1074
|
+
H.current && /* @__PURE__ */ r(Cr, { show: F, onCancel: () => E(!1), items: t, currentSelection: i, onSelectionChange: Z, onSearchQueryChange: a, texts: o, itemsNameWidth: m, additionalColumns: f, isLoading: l, disabled: h, inputRef: H, archiveColumn: x, displayIdAsName: w, addNewOptionPath: y, refreshOptions: S, suggestedItems: j, suggestedItemsTitle: T, customEllipsisOptions: M })
|
|
1075
1075
|
] }) });
|
|
1076
1076
|
}, Dh = ({ InputContainer: e = Ht, value: t, onChange: n, label: a, size: o, showClearIcon: l, clearValue: i, hidden: s, disabled: c, rows: d, withoutLabel: u, debounceMs: m, minLength: f, maxLength: p, className: h, hint: w }) => {
|
|
1077
1077
|
const v = D(() => {
|
|
@@ -1079,7 +1079,7 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
1079
1079
|
return;
|
|
1080
1080
|
const S = i ?? null;
|
|
1081
1081
|
n((S == null ? void 0 : S.toString()) ?? "");
|
|
1082
|
-
}, [i, n]), b =
|
|
1082
|
+
}, [i, n]), b = ve(null), [x, C] = L((t == null ? void 0 : t.toString()) ?? ""), N = D((S) => {
|
|
1083
1083
|
const _ = S;
|
|
1084
1084
|
n && n(_ || null);
|
|
1085
1085
|
}, [n]), y = D((S) => {
|
|
@@ -1096,8 +1096,8 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
1096
1096
|
return U(() => {
|
|
1097
1097
|
C(t === null ? "" : t.toString());
|
|
1098
1098
|
}, [t]), /* @__PURE__ */ g(e, { label: a ?? "", hidden: s, withoutLabel: u, className: h, isForTextAreaInput: !0, hint: w, disabled: c, children: [
|
|
1099
|
-
/* @__PURE__ */ r(
|
|
1100
|
-
l && t && n && !c && /* @__PURE__ */ r("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r(J, { color: "secondary", size: "sm", onClick: v, children: /* @__PURE__ */ r(
|
|
1099
|
+
/* @__PURE__ */ r(le.Control, { as: "textarea", size: o, value: m ? x : t ?? "", onChange: y, hidden: s, disabled: c, rows: d ?? 2, className: "w-100", minLength: f, maxLength: p }),
|
|
1100
|
+
l && t && n && !c && /* @__PURE__ */ r("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r(J, { color: "secondary", size: "sm", onClick: v, children: /* @__PURE__ */ r(pt, {}) }) })
|
|
1101
1101
|
] });
|
|
1102
1102
|
}, Th = ({ InputContainer: e = Ht, value: t, onChange: n, debounceMs: a, label: o, withoutLabel: l, placeholder: i, size: s, hidden: c, disabled: d, showClearIcon: u, clearValue: m, className: f, step: p, stepperStep: h = 1, min: w, max: v, hint: b }) => {
|
|
1103
1103
|
const x = D(() => {
|
|
@@ -1105,31 +1105,31 @@ const vs = ({ children: e, onStorno: t, noSpacer: n, disabled: a }) => {
|
|
|
1105
1105
|
return;
|
|
1106
1106
|
const k = m ?? null;
|
|
1107
1107
|
n(k ? Number(k) : null);
|
|
1108
|
-
}, [m, n]), C =
|
|
1109
|
-
const
|
|
1110
|
-
n && n(
|
|
1108
|
+
}, [m, n]), C = ve(null), [N, y] = L((t == null ? void 0 : t.toString()) ?? ""), S = D((k) => {
|
|
1109
|
+
const j = k;
|
|
1110
|
+
n && n(j == null || j === "" ? null : Jt(Number(j), w, v));
|
|
1111
1111
|
}, [v, w, n]), _ = D((k) => {
|
|
1112
1112
|
var T;
|
|
1113
|
-
const
|
|
1113
|
+
const j = (T = k.target) == null ? void 0 : T.value;
|
|
1114
1114
|
if (!a) {
|
|
1115
|
-
S(
|
|
1115
|
+
S(j);
|
|
1116
1116
|
return;
|
|
1117
1117
|
}
|
|
1118
|
-
y(Jt(Number(
|
|
1119
|
-
S(
|
|
1118
|
+
y(Jt(Number(j), w, v).toString()), C.current !== null && window.clearTimeout(C.current), C.current = window.setTimeout(() => {
|
|
1119
|
+
S(j);
|
|
1120
1120
|
}, a);
|
|
1121
1121
|
}, [a, S, v, w]);
|
|
1122
1122
|
return U(() => {
|
|
1123
1123
|
y(t === null ? "" : Jt(t, w, v).toString());
|
|
1124
1124
|
}, [v, w, t]), /* @__PURE__ */ r(e, { withoutLabel: l, label: o ?? "", hidden: c, hint: b, className: f, disabled: d, children: /* @__PURE__ */ g("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
1125
|
-
/* @__PURE__ */ r(
|
|
1125
|
+
/* @__PURE__ */ r(le.Control, { type: "number", placeholder: i ?? o, size: s, value: a ? N : t ?? "", onChange: _, className: `luminus-numeric-stepper ${f ?? ""}`, hidden: c, disabled: d ?? !1, step: p }),
|
|
1126
1126
|
/* @__PURE__ */ r("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ r(J, { size: "sm", onClick: (k) => {
|
|
1127
1127
|
k.preventDefault(), k.stopPropagation(), S(((t ?? 0) - h).toString());
|
|
1128
1128
|
}, children: /* @__PURE__ */ r(ro, {}) }) }),
|
|
1129
1129
|
/* @__PURE__ */ r("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ r(J, { size: "sm", onClick: (k) => {
|
|
1130
1130
|
k.preventDefault(), k.stopPropagation(), S(((t ?? 0) + h).toString());
|
|
1131
1131
|
}, children: /* @__PURE__ */ r(ao, {}) }) }),
|
|
1132
|
-
u && t && n && !d && /* @__PURE__ */ r("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r(J, { color: "secondary", size: "sm", onClick: x, children: /* @__PURE__ */ r(
|
|
1132
|
+
u && t && n && !d && /* @__PURE__ */ r("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r(J, { color: "secondary", size: "sm", onClick: x, children: /* @__PURE__ */ r(pt, {}) }) })
|
|
1133
1133
|
] }) });
|
|
1134
1134
|
};
|
|
1135
1135
|
function Po(e, t) {
|
|
@@ -1145,7 +1145,7 @@ var ln;
|
|
|
1145
1145
|
(function(e) {
|
|
1146
1146
|
e.event = "event", e.props = "prop";
|
|
1147
1147
|
})(ln || (ln = {}));
|
|
1148
|
-
function
|
|
1148
|
+
function mt() {
|
|
1149
1149
|
}
|
|
1150
1150
|
function Ms(e) {
|
|
1151
1151
|
var t, n = void 0;
|
|
@@ -1187,9 +1187,9 @@ function Bs(e, t, n) {
|
|
|
1187
1187
|
return o = o === -1 ? e.length : o, e.substring(0, o) + e.substring(o, e.length).replace(a, "$1" + t);
|
|
1188
1188
|
}
|
|
1189
1189
|
function zs(e) {
|
|
1190
|
-
var t =
|
|
1190
|
+
var t = ve(e);
|
|
1191
1191
|
t.current = e;
|
|
1192
|
-
var n =
|
|
1192
|
+
var n = ve(function() {
|
|
1193
1193
|
for (var a = [], o = arguments.length; o--; ) a[o] = arguments[o];
|
|
1194
1194
|
return t.current.apply(t, a);
|
|
1195
1195
|
});
|
|
@@ -1345,7 +1345,7 @@ function Ks(e) {
|
|
|
1345
1345
|
return t;
|
|
1346
1346
|
}
|
|
1347
1347
|
function Uo(e, t, n, a, o, l) {
|
|
1348
|
-
l === void 0 && (l =
|
|
1348
|
+
l === void 0 && (l = mt);
|
|
1349
1349
|
var i = zs(function(h, w) {
|
|
1350
1350
|
var v, b;
|
|
1351
1351
|
return Fo(h) ? (b = "", v = "") : typeof h == "number" || w ? (b = typeof h == "number" ? Ho(h) : h, v = a(b)) : (b = o(h, void 0), v = a(b)), { formattedValue: v, numAsString: b };
|
|
@@ -1359,7 +1359,7 @@ function Uo(e, t, n, a, o, l) {
|
|
|
1359
1359
|
}, m = e, f = n;
|
|
1360
1360
|
Mt(e) && (m = c.numAsString, f = !0);
|
|
1361
1361
|
var p = i(m, f);
|
|
1362
|
-
return
|
|
1362
|
+
return R(function() {
|
|
1363
1363
|
d(p);
|
|
1364
1364
|
}, [p.formattedValue]), [c, u];
|
|
1365
1365
|
}
|
|
@@ -1379,148 +1379,148 @@ function Zs(e) {
|
|
|
1379
1379
|
var s = e.removeFormatting;
|
|
1380
1380
|
s === void 0 && (s = Qs);
|
|
1381
1381
|
var c = e.defaultValue, d = e.valueIsNumericString, u = e.onValueChange, m = e.isAllowed, f = e.onChange;
|
|
1382
|
-
f === void 0 && (f =
|
|
1382
|
+
f === void 0 && (f = mt);
|
|
1383
1383
|
var p = e.onKeyDown;
|
|
1384
|
-
p === void 0 && (p =
|
|
1384
|
+
p === void 0 && (p = mt);
|
|
1385
1385
|
var h = e.onMouseUp;
|
|
1386
|
-
h === void 0 && (h =
|
|
1386
|
+
h === void 0 && (h = mt);
|
|
1387
1387
|
var w = e.onFocus;
|
|
1388
|
-
w === void 0 && (w =
|
|
1388
|
+
w === void 0 && (w = mt);
|
|
1389
1389
|
var v = e.onBlur;
|
|
1390
|
-
v === void 0 && (v =
|
|
1390
|
+
v === void 0 && (v = mt);
|
|
1391
1391
|
var b = e.value, x = e.getCaretBoundary;
|
|
1392
1392
|
x === void 0 && (x = Ks);
|
|
1393
1393
|
var C = e.isValidInputCharacter;
|
|
1394
1394
|
C === void 0 && (C = sn);
|
|
1395
|
-
var N = e.isCharacterSame, y = Po(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), S = Uo(b, c, !!d, i, s, u), _ = S[0], k = _.formattedValue,
|
|
1396
|
-
|
|
1397
|
-
},
|
|
1395
|
+
var N = e.isCharacterSame, y = Po(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), S = Uo(b, c, !!d, i, s, u), _ = S[0], k = _.formattedValue, j = _.numAsString, T = S[1], M = ve(), F = ve({ formattedValue: k, numAsString: j }), E = function(K, Q) {
|
|
1396
|
+
F.current = { formattedValue: K.formattedValue, numAsString: K.value }, T(K, Q);
|
|
1397
|
+
}, O = L(!1), Z = O[0], H = O[1], z = ve(null), A = ve({
|
|
1398
1398
|
setCaretTimeout: null,
|
|
1399
1399
|
focusTimeout: null
|
|
1400
1400
|
});
|
|
1401
1401
|
U(function() {
|
|
1402
|
-
return
|
|
1403
|
-
clearTimeout(
|
|
1402
|
+
return H(!0), function() {
|
|
1403
|
+
clearTimeout(A.current.setCaretTimeout), clearTimeout(A.current.focusTimeout);
|
|
1404
1404
|
};
|
|
1405
1405
|
}, []);
|
|
1406
|
-
var
|
|
1407
|
-
var
|
|
1406
|
+
var V = i, B = function(K, Q) {
|
|
1407
|
+
var q = parseFloat(Q);
|
|
1408
1408
|
return {
|
|
1409
|
-
formattedValue:
|
|
1410
|
-
value:
|
|
1411
|
-
floatValue: isNaN(
|
|
1409
|
+
formattedValue: K,
|
|
1410
|
+
value: Q,
|
|
1411
|
+
floatValue: isNaN(q) ? void 0 : q
|
|
1412
1412
|
};
|
|
1413
|
-
},
|
|
1414
|
-
|
|
1415
|
-
|
|
1413
|
+
}, Y = function(K, Q, q) {
|
|
1414
|
+
K.selectionStart === 0 && K.selectionEnd === K.value.length || (Ct(K, Q), A.current.setCaretTimeout = setTimeout(function() {
|
|
1415
|
+
K.value === q && K.selectionStart !== Q && Ct(K, Q);
|
|
1416
1416
|
}, 0));
|
|
1417
|
-
},
|
|
1418
|
-
return ia(
|
|
1419
|
-
}, ce = function(
|
|
1420
|
-
var ae = x(
|
|
1421
|
-
return be = ia(
|
|
1422
|
-
},
|
|
1423
|
-
var
|
|
1424
|
-
|
|
1425
|
-
var
|
|
1426
|
-
if (
|
|
1427
|
-
var
|
|
1428
|
-
|
|
1417
|
+
}, ee = function(K, Q, q) {
|
|
1418
|
+
return ia(K, Q, x(K), q);
|
|
1419
|
+
}, ce = function(K, Q, q) {
|
|
1420
|
+
var ae = x(Q), be = qs(Q, k, K, q, ae, C, N);
|
|
1421
|
+
return be = ia(Q, be, ae), be;
|
|
1422
|
+
}, ie = function(K) {
|
|
1423
|
+
var Q = K.formattedValue;
|
|
1424
|
+
Q === void 0 && (Q = "");
|
|
1425
|
+
var q = K.input, ae = K.source, be = K.event, he = K.numAsString, se;
|
|
1426
|
+
if (q) {
|
|
1427
|
+
var Fe = K.inputValue || q.value, Ve = Kn(q);
|
|
1428
|
+
q.value = Q, se = ce(Fe, Q, Ve), se !== void 0 && Y(q, se, Q);
|
|
1429
1429
|
}
|
|
1430
|
-
|
|
1430
|
+
Q !== k && E(B(Q, he), { event: be, source: ae });
|
|
1431
1431
|
};
|
|
1432
1432
|
U(function() {
|
|
1433
|
-
var
|
|
1434
|
-
(k !==
|
|
1433
|
+
var K = F.current, Q = K.formattedValue, q = K.numAsString;
|
|
1434
|
+
(k !== Q || j !== q) && E(B(k, j), {
|
|
1435
1435
|
event: void 0,
|
|
1436
1436
|
source: ln.props
|
|
1437
1437
|
});
|
|
1438
|
-
}, [k,
|
|
1439
|
-
var xe =
|
|
1438
|
+
}, [k, j]);
|
|
1439
|
+
var xe = z.current ? Kn(z.current) : void 0, W = typeof window < "u" ? Ll : U;
|
|
1440
1440
|
W(function() {
|
|
1441
|
-
var
|
|
1442
|
-
if (k !==
|
|
1443
|
-
var
|
|
1444
|
-
|
|
1441
|
+
var K = z.current;
|
|
1442
|
+
if (k !== F.current.formattedValue && K) {
|
|
1443
|
+
var Q = ce(F.current.formattedValue, k, xe);
|
|
1444
|
+
K.value = k, Y(K, Q, k);
|
|
1445
1445
|
}
|
|
1446
1446
|
}, [k]);
|
|
1447
|
-
var oe = function(
|
|
1448
|
-
var ae =
|
|
1449
|
-
if (se = s(
|
|
1450
|
-
var
|
|
1451
|
-
return
|
|
1447
|
+
var oe = function(K, Q, q) {
|
|
1448
|
+
var ae = Q.target, be = M.current ? Vs(M.current, ae.selectionEnd) : Vo(k, K), he = Object.assign(Object.assign({}, be), { lastValue: k }), se = s(K, he), Fe = V(se);
|
|
1449
|
+
if (se = s(Fe, void 0), m && !m(B(Fe, se))) {
|
|
1450
|
+
var Ve = Q.target, Ue = Kn(Ve), Ot = ce(K, k, Ue);
|
|
1451
|
+
return Ve.value = k, Y(Ve, Ot, k), !1;
|
|
1452
1452
|
}
|
|
1453
|
-
return
|
|
1454
|
-
formattedValue:
|
|
1453
|
+
return ie({
|
|
1454
|
+
formattedValue: Fe,
|
|
1455
1455
|
numAsString: se,
|
|
1456
|
-
inputValue:
|
|
1457
|
-
event:
|
|
1458
|
-
source:
|
|
1459
|
-
input:
|
|
1456
|
+
inputValue: K,
|
|
1457
|
+
event: Q,
|
|
1458
|
+
source: q,
|
|
1459
|
+
input: Q.target
|
|
1460
1460
|
}), !0;
|
|
1461
|
-
},
|
|
1462
|
-
|
|
1463
|
-
var
|
|
1464
|
-
M.current = { selectionStart:
|
|
1465
|
-
},
|
|
1466
|
-
var
|
|
1467
|
-
ae && f(
|
|
1468
|
-
},
|
|
1469
|
-
var
|
|
1470
|
-
|
|
1461
|
+
}, ge = function(K, Q) {
|
|
1462
|
+
Q === void 0 && (Q = 0);
|
|
1463
|
+
var q = K.selectionStart, ae = K.selectionEnd;
|
|
1464
|
+
M.current = { selectionStart: q, selectionEnd: ae + Q };
|
|
1465
|
+
}, De = function(K) {
|
|
1466
|
+
var Q = K.target, q = Q.value, ae = oe(q, K, ln.event);
|
|
1467
|
+
ae && f(K), M.current = void 0;
|
|
1468
|
+
}, me = function(K) {
|
|
1469
|
+
var Q = K.target, q = K.key, ae = Q.selectionStart, be = Q.selectionEnd, he = Q.value;
|
|
1470
|
+
he === void 0 && (he = "");
|
|
1471
1471
|
var se;
|
|
1472
|
-
|
|
1473
|
-
var
|
|
1474
|
-
|
|
1475
|
-
var
|
|
1476
|
-
if (se === void 0 || ae !== be && !
|
|
1477
|
-
p(
|
|
1472
|
+
q === "ArrowLeft" || q === "Backspace" ? se = Math.max(ae - 1, 0) : q === "ArrowRight" ? se = Math.min(ae + 1, he.length) : q === "Delete" && (se = ae);
|
|
1473
|
+
var Fe = 0;
|
|
1474
|
+
q === "Delete" && ae === be && (Fe = 1);
|
|
1475
|
+
var Ve = q === "ArrowLeft" || q === "ArrowRight";
|
|
1476
|
+
if (se === void 0 || ae !== be && !Ve) {
|
|
1477
|
+
p(K), ge(Q, Fe);
|
|
1478
1478
|
return;
|
|
1479
1479
|
}
|
|
1480
|
-
var
|
|
1481
|
-
if (
|
|
1482
|
-
var Ot =
|
|
1483
|
-
|
|
1484
|
-
} else
|
|
1485
|
-
|
|
1486
|
-
},
|
|
1487
|
-
var
|
|
1488
|
-
var ae =
|
|
1489
|
-
if (
|
|
1490
|
-
var se =
|
|
1491
|
-
se !== ae && Q
|
|
1480
|
+
var Ue = se;
|
|
1481
|
+
if (Ve) {
|
|
1482
|
+
var Ot = q === "ArrowLeft" ? "left" : "right";
|
|
1483
|
+
Ue = ee(he, se, Ot), Ue !== se && K.preventDefault();
|
|
1484
|
+
} else q === "Delete" && !C(he[se]) ? Ue = ee(he, se, "right") : q === "Backspace" && !C(he[se]) && (Ue = ee(he, se, "left"));
|
|
1485
|
+
Ue !== se && Y(Q, Ue, he), p(K), ge(Q, Fe);
|
|
1486
|
+
}, Pe = function(K) {
|
|
1487
|
+
var Q = K.target, q = function() {
|
|
1488
|
+
var ae = Q.selectionStart, be = Q.selectionEnd, he = Q.value;
|
|
1489
|
+
if (he === void 0 && (he = ""), ae === be) {
|
|
1490
|
+
var se = ee(he, ae);
|
|
1491
|
+
se !== ae && Y(Q, se, he);
|
|
1492
1492
|
}
|
|
1493
1493
|
};
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
}), h(
|
|
1497
|
-
},
|
|
1498
|
-
|
|
1499
|
-
var
|
|
1500
|
-
|
|
1501
|
-
var ae =
|
|
1502
|
-
|
|
1503
|
-
var se =
|
|
1504
|
-
se !== ae && !(ae === 0 && be ===
|
|
1494
|
+
q(), requestAnimationFrame(function() {
|
|
1495
|
+
q();
|
|
1496
|
+
}), h(K), ge(Q);
|
|
1497
|
+
}, te = function(K) {
|
|
1498
|
+
K.persist && K.persist();
|
|
1499
|
+
var Q = K.target, q = K.currentTarget;
|
|
1500
|
+
z.current = Q, A.current.focusTimeout = setTimeout(function() {
|
|
1501
|
+
var ae = Q.selectionStart, be = Q.selectionEnd, he = Q.value;
|
|
1502
|
+
he === void 0 && (he = "");
|
|
1503
|
+
var se = ee(he, ae);
|
|
1504
|
+
se !== ae && !(ae === 0 && be === he.length) && Y(Q, se, he), w(Object.assign(Object.assign({}, K), { currentTarget: q }));
|
|
1505
1505
|
}, 0);
|
|
1506
|
-
},
|
|
1507
|
-
|
|
1508
|
-
},
|
|
1506
|
+
}, fe = function(K) {
|
|
1507
|
+
z.current = null, clearTimeout(A.current.focusTimeout), clearTimeout(A.current.setCaretTimeout), v(K);
|
|
1508
|
+
}, Me = Z && Ws() ? "numeric" : void 0, lt = Object.assign({ inputMode: Me }, y, {
|
|
1509
1509
|
type: t,
|
|
1510
1510
|
value: k,
|
|
1511
|
-
onChange:
|
|
1512
|
-
onKeyDown:
|
|
1513
|
-
onMouseUp:
|
|
1514
|
-
onFocus:
|
|
1515
|
-
onBlur:
|
|
1511
|
+
onChange: De,
|
|
1512
|
+
onKeyDown: me,
|
|
1513
|
+
onMouseUp: Pe,
|
|
1514
|
+
onFocus: te,
|
|
1515
|
+
onBlur: fe
|
|
1516
1516
|
});
|
|
1517
1517
|
if (n === "text")
|
|
1518
1518
|
return o ? Le.createElement(Le.Fragment, null, o(k, y) || null) : Le.createElement("span", Object.assign({}, y, { ref: l }), k);
|
|
1519
1519
|
if (a) {
|
|
1520
|
-
var
|
|
1521
|
-
return Le.createElement(
|
|
1520
|
+
var et = a;
|
|
1521
|
+
return Le.createElement(et, Object.assign({}, lt, { ref: l }));
|
|
1522
1522
|
}
|
|
1523
|
-
return Le.createElement("input", Object.assign({},
|
|
1523
|
+
return Le.createElement("input", Object.assign({}, lt, { ref: l }));
|
|
1524
1524
|
}
|
|
1525
1525
|
function la(e, t) {
|
|
1526
1526
|
var n = t.decimalScale, a = t.fixedDecimalScale, o = t.prefix;
|
|
@@ -1568,25 +1568,25 @@ function nc(e, t, n) {
|
|
|
1568
1568
|
var v = s === 0 ? "" : h;
|
|
1569
1569
|
e = e.substring(0, u) + v + e.substring(u + 1, e.length);
|
|
1570
1570
|
}
|
|
1571
|
-
var b = function(
|
|
1572
|
-
var
|
|
1573
|
-
l.startsWith("-") ?
|
|
1574
|
-
var
|
|
1575
|
-
return
|
|
1571
|
+
var b = function(z, A, V) {
|
|
1572
|
+
var B = !1, Y = !1;
|
|
1573
|
+
l.startsWith("-") ? B = !1 : z.startsWith("--") ? (B = !1, Y = !0) : i.startsWith("-") && z.length === i.length ? B = !1 : z[0] === "-" && (B = !0);
|
|
1574
|
+
var ee = B ? 1 : 0;
|
|
1575
|
+
return Y && (ee = 2), ee && (z = z.substring(ee), A -= ee, V -= ee), { value: z, start: A, end: V, hasNegation: B };
|
|
1576
1576
|
}, x = b(e, u, m), C = x.hasNegation;
|
|
1577
1577
|
a = x, e = a.value, u = a.start, m = a.end;
|
|
1578
1578
|
var N = b(t.lastValue, c.start, c.end), y = N.start, S = N.end, _ = N.value, k = e.substring(u, m);
|
|
1579
1579
|
e.length && _.length && (y > _.length - i.length || S < l.length) && !(k && i.startsWith(k)) && (e = _);
|
|
1580
|
-
var
|
|
1581
|
-
e.startsWith(l) ?
|
|
1580
|
+
var j = 0;
|
|
1581
|
+
e.startsWith(l) ? j += l.length : u < l.length && (j = u), e = e.substring(j), m -= j;
|
|
1582
1582
|
var T = e.length, M = e.length - i.length;
|
|
1583
1583
|
e.endsWith(i) ? T = M : (m > M || m > e.length - i.length) && (T = m), e = e.substring(0, T), e = Js(C ? "-" + e : e, o), e = (e.match(ec(h)) || []).join("");
|
|
1584
|
-
var
|
|
1585
|
-
e = e.replace(new RegExp(Bo(h), "g"), function(
|
|
1586
|
-
return
|
|
1584
|
+
var F = e.indexOf(h);
|
|
1585
|
+
e = e.replace(new RegExp(Bo(h), "g"), function(z, A) {
|
|
1586
|
+
return A === F ? "." : "";
|
|
1587
1587
|
});
|
|
1588
|
-
var
|
|
1589
|
-
return d.end - d.start < c.end - c.start &&
|
|
1588
|
+
var E = Rr(e, o), O = E.beforeDecimal, Z = E.afterDecimal, H = E.addNegation;
|
|
1589
|
+
return d.end - d.start < c.end - c.start && O === "" && w && !parseFloat(Z) && (e = H ? "-" : ""), e;
|
|
1590
1590
|
}
|
|
1591
1591
|
function rc(e, t) {
|
|
1592
1592
|
var n = t.prefix;
|
|
@@ -1619,67 +1619,67 @@ function ac(e) {
|
|
|
1619
1619
|
function oc(e) {
|
|
1620
1620
|
e = ac(e), e.decimalSeparator, e.allowedDecimalSeparators, e.thousandsGroupStyle;
|
|
1621
1621
|
var t = e.suffix, n = e.allowNegative, a = e.allowLeadingZeros, o = e.onKeyDown;
|
|
1622
|
-
o === void 0 && (o =
|
|
1622
|
+
o === void 0 && (o = mt);
|
|
1623
1623
|
var l = e.onBlur;
|
|
1624
|
-
l === void 0 && (l =
|
|
1624
|
+
l === void 0 && (l = mt);
|
|
1625
1625
|
var i = e.thousandSeparator, s = e.decimalScale, c = e.fixedDecimalScale, d = e.prefix;
|
|
1626
1626
|
d === void 0 && (d = "");
|
|
1627
|
-
var u = e.defaultValue, m = e.value, f = e.valueIsNumericString, p = e.onValueChange, h = Po(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), w = Hn(e), v = w.decimalSeparator, b = w.allowedDecimalSeparators, x = function(
|
|
1628
|
-
return la(
|
|
1629
|
-
}, C = function(
|
|
1630
|
-
return nc(
|
|
1627
|
+
var u = e.defaultValue, m = e.value, f = e.valueIsNumericString, p = e.onValueChange, h = Po(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), w = Hn(e), v = w.decimalSeparator, b = w.allowedDecimalSeparators, x = function(H) {
|
|
1628
|
+
return la(H, e);
|
|
1629
|
+
}, C = function(H, z) {
|
|
1630
|
+
return nc(H, z, e);
|
|
1631
1631
|
}, N = Mt(m) ? u : m, y = f ?? tc(N, d, t);
|
|
1632
1632
|
Mt(m) ? Mt(u) || (y = y || typeof u == "number") : y = y || typeof m == "number";
|
|
1633
|
-
var S = function(
|
|
1634
|
-
return Fo(
|
|
1635
|
-
}, _ = Uo(S(m), S(u), !!y, x, C, p), k = _[0],
|
|
1636
|
-
var
|
|
1637
|
-
if (
|
|
1638
|
-
|
|
1633
|
+
var S = function(H) {
|
|
1634
|
+
return Fo(H) ? H : (typeof H == "number" && (H = Ho(H)), y && typeof s == "number" ? oa(H, s, !!c) : H);
|
|
1635
|
+
}, _ = Uo(S(m), S(u), !!y, x, C, p), k = _[0], j = k.numAsString, T = k.formattedValue, M = _[1], F = function(H) {
|
|
1636
|
+
var z = H.target, A = H.key, V = z.selectionStart, B = z.selectionEnd, Y = z.value;
|
|
1637
|
+
if (Y === void 0 && (Y = ""), (A === "Backspace" || A === "Delete") && B < d.length) {
|
|
1638
|
+
H.preventDefault();
|
|
1639
1639
|
return;
|
|
1640
1640
|
}
|
|
1641
|
-
if (
|
|
1642
|
-
o(
|
|
1641
|
+
if (V !== B) {
|
|
1642
|
+
o(H);
|
|
1643
1643
|
return;
|
|
1644
1644
|
}
|
|
1645
|
-
|
|
1646
|
-
var
|
|
1647
|
-
|
|
1648
|
-
},
|
|
1649
|
-
var
|
|
1650
|
-
if (
|
|
1651
|
-
var
|
|
1645
|
+
A === "Backspace" && Y[0] === "-" && V === d.length + 1 && n && Ct(z, 1), s && c && (A === "Backspace" && Y[V - 1] === v ? (Ct(z, V - 1), H.preventDefault()) : A === "Delete" && Y[V] === v && H.preventDefault()), b != null && b.includes(A) && Y[V] === v && Ct(z, V + 1);
|
|
1646
|
+
var ee = i === !0 ? "," : i;
|
|
1647
|
+
A === "Backspace" && Y[V - 1] === ee && Ct(z, V - 1), A === "Delete" && Y[V] === ee && Ct(z, V + 1), o(H);
|
|
1648
|
+
}, E = function(H) {
|
|
1649
|
+
var z = j;
|
|
1650
|
+
if (z.match(/\d/g) || (z = ""), a || (z = Hs(z)), c && s && (z = oa(z, s, c)), z !== j) {
|
|
1651
|
+
var A = la(z, e);
|
|
1652
1652
|
M({
|
|
1653
|
-
formattedValue:
|
|
1654
|
-
value:
|
|
1655
|
-
floatValue: parseFloat(
|
|
1653
|
+
formattedValue: A,
|
|
1654
|
+
value: z,
|
|
1655
|
+
floatValue: parseFloat(z)
|
|
1656
1656
|
}, {
|
|
1657
|
-
event:
|
|
1657
|
+
event: H,
|
|
1658
1658
|
source: ln.event
|
|
1659
1659
|
});
|
|
1660
1660
|
}
|
|
1661
|
-
l(
|
|
1662
|
-
},
|
|
1663
|
-
return
|
|
1664
|
-
},
|
|
1665
|
-
var
|
|
1661
|
+
l(H);
|
|
1662
|
+
}, O = function(H) {
|
|
1663
|
+
return H === v ? !0 : sn(H);
|
|
1664
|
+
}, Z = function(H) {
|
|
1665
|
+
var z = H.currentValue, A = H.lastValue, V = H.formattedValue, B = H.currentValueIndex, Y = H.formattedValueIndex, ee = z[B], ce = V[Y], ie = Vo(A, z), xe = ie.to, W = function(oe) {
|
|
1666
1666
|
return C(oe).indexOf(".") + d.length;
|
|
1667
1667
|
};
|
|
1668
|
-
return m === 0 && c && s &&
|
|
1668
|
+
return m === 0 && c && s && z[xe.start] === v && W(z) < B && W(V) > Y ? !1 : B >= xe.start && B < xe.end && b && b.includes(ee) && ce === v ? !0 : ee === ce;
|
|
1669
1669
|
};
|
|
1670
1670
|
return Object.assign(Object.assign({}, h), {
|
|
1671
1671
|
value: T,
|
|
1672
1672
|
valueIsNumericString: !1,
|
|
1673
|
-
isValidInputCharacter:
|
|
1674
|
-
isCharacterSame:
|
|
1673
|
+
isValidInputCharacter: O,
|
|
1674
|
+
isCharacterSame: Z,
|
|
1675
1675
|
onValueChange: M,
|
|
1676
1676
|
format: x,
|
|
1677
1677
|
removeFormatting: C,
|
|
1678
|
-
getCaretBoundary: function(
|
|
1679
|
-
return rc(
|
|
1678
|
+
getCaretBoundary: function(H) {
|
|
1679
|
+
return rc(H, e);
|
|
1680
1680
|
},
|
|
1681
|
-
onKeyDown:
|
|
1682
|
-
onBlur:
|
|
1681
|
+
onKeyDown: F,
|
|
1682
|
+
onBlur: E
|
|
1683
1683
|
});
|
|
1684
1684
|
}
|
|
1685
1685
|
function jr(e) {
|
|
@@ -1690,55 +1690,55 @@ const ic = ({ InputContainer: e = Ht, value: t, onChange: n, debounceMs: a, labe
|
|
|
1690
1690
|
const S = D(() => {
|
|
1691
1691
|
if (!n)
|
|
1692
1692
|
return;
|
|
1693
|
-
const
|
|
1694
|
-
n(
|
|
1695
|
-
}, [m, n]), _ =
|
|
1696
|
-
const
|
|
1697
|
-
n && n(
|
|
1698
|
-
}, [n]), M = D((
|
|
1699
|
-
var
|
|
1700
|
-
let
|
|
1701
|
-
if (Number.isNaN(
|
|
1702
|
-
T(
|
|
1693
|
+
const F = m ?? null;
|
|
1694
|
+
n(F ? Number(F) : null);
|
|
1695
|
+
}, [m, n]), _ = ve(null), [k, j] = L((t == null ? void 0 : t.toString()) ?? ""), T = D((F) => {
|
|
1696
|
+
const E = F;
|
|
1697
|
+
n && n(E == null || E === "" ? null : Number(E));
|
|
1698
|
+
}, [n]), M = D((F) => {
|
|
1699
|
+
var O, Z;
|
|
1700
|
+
let E = parseFloat(((Z = (O = F.target) == null ? void 0 : O.value) == null ? void 0 : Z.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
|
|
1701
|
+
if (Number.isNaN(E) && (E = 0), !a) {
|
|
1702
|
+
T(E.toString());
|
|
1703
1703
|
return;
|
|
1704
1704
|
}
|
|
1705
|
-
|
|
1706
|
-
T(
|
|
1705
|
+
j(E.toString()), _.current !== null && window.clearTimeout(_.current), _.current = window.setTimeout(() => {
|
|
1706
|
+
T(E.toString());
|
|
1707
1707
|
}, a);
|
|
1708
1708
|
}, [a, T]);
|
|
1709
1709
|
return U(() => {
|
|
1710
|
-
|
|
1710
|
+
j(t === null ? "" : t.toString());
|
|
1711
1711
|
}, [N, C, t]), U(() => {
|
|
1712
|
-
N !== void 0 && Number(k) > N &&
|
|
1713
|
-
}, [k, N, C,
|
|
1712
|
+
N !== void 0 && Number(k) > N && j(N.toString()), C !== void 0 && Number(k) < C && j(C.toString());
|
|
1713
|
+
}, [k, N, C, j]), U(() => {
|
|
1714
1714
|
!n || t === null || (N !== void 0 && t > N && n(N), C !== void 0 && t < C && n(C));
|
|
1715
1715
|
}, [t, N, C, n]), /* @__PURE__ */ g(e, { withoutLabel: l, label: o ?? "", hidden: c, className: f, hint: y, disabled: d, children: [
|
|
1716
|
-
/* @__PURE__ */ r(jr, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: w, fixedDecimalScale: v, prefix: b, suffix: x, defaultValue: "", value: a ? k : (t == null ? void 0 : t.toString()) ?? "", placeholder: i ?? o, onFocus: (
|
|
1717
|
-
!h &&
|
|
1716
|
+
/* @__PURE__ */ r(jr, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: w, fixedDecimalScale: v, prefix: b, suffix: x, defaultValue: "", value: a ? k : (t == null ? void 0 : t.toString()) ?? "", placeholder: i ?? o, onFocus: (F) => {
|
|
1717
|
+
!h && F.target.select();
|
|
1718
1718
|
}, onChange: M, hidden: c, disabled: d, className: I("form-control text-end w-100", {
|
|
1719
1719
|
[`form-control-${s}`]: s
|
|
1720
1720
|
}), step: p, min: C, max: N }),
|
|
1721
|
-
u && t !== null && n && !d && /* @__PURE__ */ r("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ r(J, { color: "secondary", size: "sm", onClick: S, children: /* @__PURE__ */ r(
|
|
1721
|
+
u && t !== null && n && !d && /* @__PURE__ */ r("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ r(J, { color: "secondary", size: "sm", onClick: S, children: /* @__PURE__ */ r(pt, {}) }) })
|
|
1722
1722
|
] });
|
|
1723
1723
|
}, lc = ({ InputContainer: e = Se, label: t, options: n, disabled: a, hidden: o, className: l, value: i, onChange: s }) => {
|
|
1724
1724
|
const c = D((d) => {
|
|
1725
1725
|
s && s(d.target.value);
|
|
1726
1726
|
}, [s]);
|
|
1727
|
-
return /* @__PURE__ */ r(e, { isForRadioInput: !0, hidden: o, withoutLabel: !t, label: `${t}`, className: l, disabled: a, children: n.map((d) => /* @__PURE__ */ r(
|
|
1727
|
+
return /* @__PURE__ */ r(e, { isForRadioInput: !0, hidden: o, withoutLabel: !t, label: `${t}`, className: l, disabled: a, children: n.map((d) => /* @__PURE__ */ r(le.Check, { id: `radio-${d.id}`, label: d.name, type: "radio", value: d.id ?? "", checked: i === d.id, onChange: c, hidden: o, disabled: a, className: "w-100" }, d.id)) });
|
|
1728
1728
|
}, Eh = ({ InputContainer: e = Se, formField: t, label: n, resetsFields: a, type: o, required: l, hidden: i, disabled: s, withoutLabel: c, hint: d, onChange: u, className: m }) => {
|
|
1729
|
-
const { register: f, formState: { errors: p, isSubmitted: h }, setValue: w } = Et(), v =
|
|
1729
|
+
const { register: f, formState: { errors: p, isSubmitted: h }, setValue: w } = Et(), v = ot({ falseIfNotInit: !0 }), [b, x] = L(void 0), [C, N] = L(!1);
|
|
1730
1730
|
U(() => {
|
|
1731
1731
|
const _ = t.split(".");
|
|
1732
1732
|
let k = p;
|
|
1733
|
-
_.forEach((
|
|
1734
|
-
k !== void 0 && (k = k[
|
|
1733
|
+
_.forEach((j) => {
|
|
1734
|
+
k !== void 0 && (k = k[j]);
|
|
1735
1735
|
}), x(k);
|
|
1736
1736
|
}, [p, t]);
|
|
1737
|
-
const y =
|
|
1737
|
+
const y = R(() => s || v, [s, v]), S = b !== void 0;
|
|
1738
1738
|
return U(() => {
|
|
1739
1739
|
h && N(!0);
|
|
1740
1740
|
}, [h]), /* @__PURE__ */ g(e, { isForCheckInput: !0, hidden: i, label: n ?? "", required: l, disabled: y, isInvalid: S, withoutLabel: c, hint: d, className: m, children: [
|
|
1741
|
-
/* @__PURE__ */ r(
|
|
1741
|
+
/* @__PURE__ */ r(le.Check, { id: `check-${t}`, type: o ?? "checkbox", label: `${n}${l ? " *" : ""}`, ...f(t, {
|
|
1742
1742
|
onChange: (_) => {
|
|
1743
1743
|
a && a.forEach((k) => w(k, null, { shouldDirty: !0, shouldValidate: C })), u && u(_.target.value ?? null);
|
|
1744
1744
|
}
|
|
@@ -1746,253 +1746,253 @@ const ic = ({ InputContainer: e = Ht, value: t, onChange: n, debounceMs: a, labe
|
|
|
1746
1746
|
b && /* @__PURE__ */ r(_t, { message: b.message })
|
|
1747
1747
|
] });
|
|
1748
1748
|
}, Oh = ({ InputContainer: e = Se, label: t, formField: n, options: a, resetsFields: o, required: l, disabled: i, hidden: s, onChange: c, className: d }) => {
|
|
1749
|
-
const { register: u, formState: { errors: m, isSubmitted: f }, setValue: p } = Et(), h =
|
|
1749
|
+
const { register: u, formState: { errors: m, isSubmitted: f }, setValue: p } = Et(), h = ot({ falseIfNotInit: !0 }), [w, v] = L(void 0), [b, x] = L(!1), C = R(() => a, [a]), N = R(() => i || h, [i, h]);
|
|
1750
1750
|
U(() => {
|
|
1751
1751
|
const _ = n.split(".");
|
|
1752
1752
|
let k = m;
|
|
1753
|
-
_.forEach((
|
|
1754
|
-
k !== void 0 && (k = k[
|
|
1753
|
+
_.forEach((j) => {
|
|
1754
|
+
k !== void 0 && (k = k[j]);
|
|
1755
1755
|
}), v(k);
|
|
1756
1756
|
}, [m, n]), U(() => {
|
|
1757
1757
|
f && x(!0);
|
|
1758
1758
|
}, [f]);
|
|
1759
|
-
const y = w !== void 0, S =
|
|
1759
|
+
const y = w !== void 0, S = ht({ name: n });
|
|
1760
1760
|
return /* @__PURE__ */ g(e, { isForRadioInput: !0, hidden: s, withoutLabel: !t, label: t ?? "", required: l, disabled: N, isInvalid: y, className: d, children: [
|
|
1761
|
-
C.map((_) => /* @__PURE__ */ r(
|
|
1761
|
+
C.map((_) => /* @__PURE__ */ r(le.Check, { id: `radio-${_.id}`, label: _.name, type: "radio", value: _.id ?? "", checked: S === _.id, ...u(n, {
|
|
1762
1762
|
onChange: (k) => {
|
|
1763
|
-
var
|
|
1764
|
-
o && o.forEach((T) => p(T, null, { shouldDirty: !0, shouldValidate: b })), c && c((
|
|
1763
|
+
var j;
|
|
1764
|
+
o && o.forEach((T) => p(T, null, { shouldDirty: !0, shouldValidate: b })), c && c((j = k.target) != null && j.value ? k.target.value.toString() : null);
|
|
1765
1765
|
}
|
|
1766
1766
|
}), isInvalid: y, hidden: s, disabled: N, className: "w-100" }, _.id)),
|
|
1767
1767
|
w && /* @__PURE__ */ r(_t, { message: w.message })
|
|
1768
1768
|
] });
|
|
1769
1769
|
}, $h = ({ label: e, InputContainer: t = Se, className: n, withoutLabel: a, hidden: o, disabled: l, contactType: i, formField: s, ...c }) => {
|
|
1770
|
-
const d =
|
|
1770
|
+
const d = ht({ name: s }), u = ot({ falseIfNotInit: !0 }), m = R(() => l || u, [l, u]);
|
|
1771
1771
|
return o ? null : /* @__PURE__ */ r(Mo, { contactType: i, value: d, withoutLabel: a, label: e, className: n, children: /* @__PURE__ */ r(Ft, { type: "text", formField: s, InputContainer: t, size: "sm", withoutLabel: !0, className: "flex-grow-1", disabled: m, ...c }) });
|
|
1772
|
-
}, Lh = ({ InputContainer: e = Se, formField: t, label: n, size: a, defaultSelection: o, resetsFields: l, isNumber: i, required: s, hidden: c, disabled: d, items: u, onSearchQueryChange: m, selectedItemNavigateTo: f, texts: p, dropdownItemsNameWidth: h, isLoading: w, withoutLabel: v, additionalColumns: b, CustomOnChangeComponent: x, icon: C, displayIdAsName: N, onSelect: y, className: S, archiveColumn: _, hint: k, addNewOptionPath:
|
|
1773
|
-
const { formState: { errors:
|
|
1774
|
-
const
|
|
1775
|
-
let ae =
|
|
1776
|
-
|
|
1772
|
+
}, Lh = ({ InputContainer: e = Se, formField: t, label: n, size: a, defaultSelection: o, resetsFields: l, isNumber: i, required: s, hidden: c, disabled: d, items: u, onSearchQueryChange: m, selectedItemNavigateTo: f, texts: p, dropdownItemsNameWidth: h, isLoading: w, withoutLabel: v, additionalColumns: b, CustomOnChangeComponent: x, icon: C, displayIdAsName: N, onSelect: y, className: S, archiveColumn: _, hint: k, addNewOptionPath: j, refreshOptions: T, MiniDetailComponent: M, miniDetailPlacement: F, suggestedItems: E, suggestedItemsTitle: O }) => {
|
|
1773
|
+
const { formState: { errors: Z, isSubmitted: H }, setValue: z, control: A } = Et(), V = ot({ falseIfNotInit: !0 }), [B, Y] = L(void 0), [ee, ce] = L(!1), [ie, xe] = L(!1), W = ht({ name: t }) ?? null, oe = ht({ name: `${t}-DropdownName` }), ge = W === (o == null ? void 0 : o.id) ? o == null ? void 0 : o.name : oe, De = R(() => W == null ? null : { id: W ?? null, name: ge ?? "" }, [W, ge]), me = D(() => {
|
|
1774
|
+
const q = t.split(".");
|
|
1775
|
+
let ae = Z;
|
|
1776
|
+
q.forEach((be) => {
|
|
1777
1777
|
ae !== void 0 && (ae = ae[be]);
|
|
1778
|
-
}),
|
|
1779
|
-
}, [
|
|
1780
|
-
if ((
|
|
1778
|
+
}), Y(ae);
|
|
1779
|
+
}, [Z, t]), Pe = D((q) => {
|
|
1780
|
+
if ((q == null ? void 0 : q.id) === W)
|
|
1781
1781
|
return;
|
|
1782
|
-
if (y && y(
|
|
1783
|
-
|
|
1782
|
+
if (y && y(q), l && l.forEach((be) => z(be, null, { shouldDirty: !0, shouldValidate: ie })), q === null) {
|
|
1783
|
+
z(t, null, {
|
|
1784
1784
|
shouldDirty: !0,
|
|
1785
|
-
shouldValidate:
|
|
1786
|
-
}),
|
|
1785
|
+
shouldValidate: ie
|
|
1786
|
+
}), z(`${t}-DropdownName`, null);
|
|
1787
1787
|
return;
|
|
1788
1788
|
}
|
|
1789
1789
|
let ae = null;
|
|
1790
|
-
i ? ae = (
|
|
1790
|
+
i ? ae = (q == null ? void 0 : q.id) !== null && (q == null ? void 0 : q.id) !== "" ? parseInt(q.id.toString(), 10) : null : ae = q.id === null || q.id === void 0 || q.id === "" ? null : q.id, z(t, ae, {
|
|
1791
1791
|
shouldDirty: !0,
|
|
1792
|
-
shouldValidate:
|
|
1793
|
-
}),
|
|
1794
|
-
}, [
|
|
1795
|
-
ce(!1),
|
|
1796
|
-
}, [
|
|
1792
|
+
shouldValidate: ie
|
|
1793
|
+
}), z(`${t}-DropdownName`, q.name ?? "");
|
|
1794
|
+
}, [z, t, ie, i, l, W, y]), te = D((q) => {
|
|
1795
|
+
ce(!1), Pe(q);
|
|
1796
|
+
}, [Pe]), fe = D(() => {
|
|
1797
1797
|
ce(!1);
|
|
1798
|
-
}, []),
|
|
1798
|
+
}, []), Me = ve(null), lt = B !== void 0, et = f !== void 0, K = et && De !== null, Q = R(() => d || V, [d, V]);
|
|
1799
1799
|
return U(() => {
|
|
1800
|
-
|
|
1801
|
-
}, [
|
|
1802
|
-
|
|
1803
|
-
}, [
|
|
1804
|
-
/* @__PURE__ */ g(xr, { currentSelection:
|
|
1805
|
-
N && (
|
|
1806
|
-
/* @__PURE__ */ r(Dr, { control:
|
|
1807
|
-
|
|
1800
|
+
me();
|
|
1801
|
+
}, [me]), U(() => {
|
|
1802
|
+
H && xe(!0);
|
|
1803
|
+
}, [H]), /* @__PURE__ */ r(X, { children: /* @__PURE__ */ g(e, { label: n ?? "", required: s, disabled: Q, hidden: c, withoutLabel: v, isInvalid: lt, inputContainerClassName: I({ "luminus-dropdown-select-open": ee }), hint: k, className: S, children: [
|
|
1804
|
+
/* @__PURE__ */ g(xr, { currentSelection: De, selectedItemNavigateTo: f, children: [
|
|
1805
|
+
N && (De == null ? void 0 : De.name) && /* @__PURE__ */ r($, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: De.name }),
|
|
1806
|
+
/* @__PURE__ */ r(Dr, { control: A, name: t, render: () => /* @__PURE__ */ r(Sr, { value: W, MiniDetailComponent: M, miniDetailPlacement: F, children: /* @__PURE__ */ r(le.Select, { size: a, onMouseDown: (q) => {
|
|
1807
|
+
q.currentTarget.focus(), q.preventDefault();
|
|
1808
1808
|
}, onClick: () => {
|
|
1809
|
-
!
|
|
1810
|
-
}, ref:
|
|
1811
|
-
}, isInvalid:
|
|
1812
|
-
"luminus-dropdown-picker-disabled":
|
|
1813
|
-
"luminus-dropdown-picker-link":
|
|
1814
|
-
}), children: /* @__PURE__ */ r("option", { value: W, children: N ? W : (
|
|
1815
|
-
x || !
|
|
1816
|
-
!x && !
|
|
1817
|
-
|
|
1809
|
+
!et && !Q && ce(!0);
|
|
1810
|
+
}, ref: Me, value: W ?? "", onChange: () => {
|
|
1811
|
+
}, isInvalid: lt, hidden: c, className: I("w-100", {
|
|
1812
|
+
"luminus-dropdown-picker-disabled": Q,
|
|
1813
|
+
"luminus-dropdown-picker-link": K
|
|
1814
|
+
}), children: /* @__PURE__ */ r("option", { value: W, children: N ? W : (ge == null ? void 0 : ge.length) > 0 ? ge : W }) }) }) }),
|
|
1815
|
+
x || !Q && et ? /* @__PURE__ */ g("div", { className: "custom-picker-button", children: [
|
|
1816
|
+
!x && !Q && et && /* @__PURE__ */ r(J, { size: "sm", color: "secondary", onClick: (q) => {
|
|
1817
|
+
q.preventDefault(), q.stopPropagation(), ce(!0);
|
|
1818
1818
|
}, children: C ?? /* @__PURE__ */ r(no, {}) }),
|
|
1819
1819
|
x ?? null
|
|
1820
1820
|
] }) : null
|
|
1821
1821
|
] }),
|
|
1822
|
-
|
|
1823
|
-
|
|
1822
|
+
B && /* @__PURE__ */ r(_t, { message: B.message }),
|
|
1823
|
+
Me.current && /* @__PURE__ */ r(Cr, { show: ee, onCancel: fe, items: u, currentSelection: De, onSelectionChange: te, onSearchQueryChange: m, texts: p, itemsNameWidth: h, additionalColumns: b, displayIdAsName: N, isLoading: w, disabled: Q, inputRef: Me, archiveColumn: _, addNewOptionPath: j, refreshOptions: T, suggestedItems: E, suggestedItemsTitle: O })
|
|
1824
1824
|
] }) });
|
|
1825
1825
|
}, Ah = ({ InputContainer: e = Se, label: t, formField: n, hidden: a, required: o, placeholder: l, disabled: i, showClearIcon: s, resetsFields: c, multiple: d, accept: u, withoutLabel: m, hint: f, className: p }) => {
|
|
1826
|
-
const { setValue: h, register: w, formState: { errors: v, isSubmitted: b } } = Et(), x =
|
|
1826
|
+
const { setValue: h, register: w, formState: { errors: v, isSubmitted: b } } = Et(), x = ot({ falseIfNotInit: !0 }), [C, N] = L(!1), [y, S] = L(void 0), _ = D(() => {
|
|
1827
1827
|
h(n, "");
|
|
1828
1828
|
}, [h, n]), k = D(() => {
|
|
1829
|
-
const
|
|
1830
|
-
let
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
}), S(
|
|
1829
|
+
const F = n.split(".");
|
|
1830
|
+
let E = v;
|
|
1831
|
+
F.forEach((O) => {
|
|
1832
|
+
E !== void 0 && (E = E[O]);
|
|
1833
|
+
}), S(E);
|
|
1834
1834
|
}, [v, n]);
|
|
1835
1835
|
U(k, [k]), U(() => {
|
|
1836
1836
|
b && N(!0);
|
|
1837
1837
|
}, [b]);
|
|
1838
|
-
const
|
|
1839
|
-
return /* @__PURE__ */ g(e, { label: t ?? "", required: o, disabled:
|
|
1840
|
-
/* @__PURE__ */ r(Gi, { type: "file", multiple: d, accept: u.join(", "), placeholder: l ?? t, isInvalid: T, hidden: a, disabled:
|
|
1838
|
+
const j = R(() => i || x, [i, x]), T = y !== void 0, M = ht({ name: n });
|
|
1839
|
+
return /* @__PURE__ */ g(e, { label: t ?? "", required: o, disabled: j, hidden: a, withoutLabel: m, isInvalid: T, hint: f, className: p, children: [
|
|
1840
|
+
/* @__PURE__ */ r(Gi, { type: "file", multiple: d, accept: u.join(", "), placeholder: l ?? t, isInvalid: T, hidden: a, disabled: j, className: "w-100", ...w(n, {
|
|
1841
1841
|
onChange: () => {
|
|
1842
|
-
c && c.forEach((
|
|
1842
|
+
c && c.forEach((F) => h(F, null, { shouldDirty: !0, shouldValidate: C }));
|
|
1843
1843
|
}
|
|
1844
1844
|
}) }),
|
|
1845
|
-
s && M != null && /* @__PURE__ */ r("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r(J, { color: "secondary", size: "sm", onClick: _, children: /* @__PURE__ */ r(
|
|
1845
|
+
s && M != null && /* @__PURE__ */ r("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r(J, { color: "secondary", size: "sm", onClick: _, children: /* @__PURE__ */ r(pt, {}) }) }),
|
|
1846
1846
|
y && /* @__PURE__ */ r(_t, { message: y.message })
|
|
1847
1847
|
] });
|
|
1848
1848
|
}, sc = ({ children: e, onStorno: t, noSpacer: n }) => {
|
|
1849
|
-
const { isDirty: a } = Ul(), o =
|
|
1849
|
+
const { isDirty: a } = Ul(), o = ot({ falseIfNotInit: !0 });
|
|
1850
1850
|
return a ? /* @__PURE__ */ r(vs, { onStorno: t, noSpacer: n, disabled: o, children: e }) : null;
|
|
1851
|
-
}, mr = ({ InputContainer: e = Se, options: t, formField: n, label: a, size: o, resetsFields: l, isNumber: i, required: s, hidden: c, disabled: d, withoutLabel: u, noSortOptions: m, suffixIdToName: f, onSelect: p, className: h, appendCurrentSelectionWithName: w, hint: v, addNewOptionPath: b, refreshOptions: x, MiniDetailComponent: C, miniDetailPlacement: N, selectedItemNavigateTo: y }) => {
|
|
1852
|
-
const { texts: { customSelect:
|
|
1853
|
-
const
|
|
1854
|
-
let
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
}), O(
|
|
1858
|
-
}, [
|
|
1859
|
-
if ((
|
|
1851
|
+
}, mr = ({ InputContainer: e = Se, options: t, formField: n, label: a, size: o, resetsFields: l, isNumber: i, required: s, hidden: c, disabled: d, withoutLabel: u, noSortOptions: m, suffixIdToName: f, onSelect: p, className: h, appendCurrentSelectionWithName: w, hint: v, addNewOptionPath: b, refreshOptions: x, MiniDetailComponent: C, miniDetailPlacement: N, selectedItemNavigateTo: y, noRemoveButton: S }) => {
|
|
1852
|
+
const { texts: { customSelect: _ } } = P(G), { formState: { errors: k, isSubmitted: j }, setValue: T, control: M } = Et(), F = ot({ falseIfNotInit: !0 }), [E, O] = L(void 0), [Z, H] = L(!1), [z, A] = L(!1), [V, B] = L(""), Y = ht({ name: n }), ee = R(() => t.find((te) => te.id === Y) ?? null, [t, Y]), ce = D(() => {
|
|
1853
|
+
const te = n.split(".");
|
|
1854
|
+
let fe = k;
|
|
1855
|
+
te.forEach((Me) => {
|
|
1856
|
+
fe !== void 0 && (fe = fe[Me]);
|
|
1857
|
+
}), O(fe);
|
|
1858
|
+
}, [k, n]), ie = D((te) => {
|
|
1859
|
+
if ((te == null ? void 0 : te.id) === Y)
|
|
1860
1860
|
return;
|
|
1861
|
-
if (p && p(
|
|
1862
|
-
|
|
1861
|
+
if (p && p(te), l && l.forEach((Me) => T(Me, null, { shouldDirty: !0, shouldValidate: z })), te === null) {
|
|
1862
|
+
T(n, null, {
|
|
1863
1863
|
shouldDirty: !0,
|
|
1864
1864
|
shouldValidate: z
|
|
1865
1865
|
});
|
|
1866
1866
|
return;
|
|
1867
1867
|
}
|
|
1868
|
-
let
|
|
1869
|
-
i ?
|
|
1868
|
+
let fe = null;
|
|
1869
|
+
i ? fe = (te == null ? void 0 : te.id) !== null && (te == null ? void 0 : te.id) !== "" ? parseInt(te.id.toString(), 10) : null : fe = te.id === null || te.id === void 0 || te.id === "" ? null : te.id, T(n, fe, {
|
|
1870
1870
|
shouldDirty: !0,
|
|
1871
1871
|
shouldValidate: z
|
|
1872
1872
|
});
|
|
1873
|
-
}, [
|
|
1874
|
-
|
|
1875
|
-
}, [
|
|
1876
|
-
B(
|
|
1877
|
-
}, []),
|
|
1873
|
+
}, [T, n, i, l, Y, z, p]), xe = D((te) => {
|
|
1874
|
+
H(!1), ie(te);
|
|
1875
|
+
}, [ie]), W = D((te) => {
|
|
1876
|
+
B(te);
|
|
1877
|
+
}, []), oe = R(() => d || F, [d, F]);
|
|
1878
1878
|
U(() => {
|
|
1879
|
-
|
|
1880
|
-
}, [
|
|
1881
|
-
|
|
1882
|
-
}, [
|
|
1883
|
-
const
|
|
1884
|
-
var
|
|
1885
|
-
return
|
|
1886
|
-
}, [f]),
|
|
1887
|
-
const
|
|
1888
|
-
return w !== void 0 &&
|
|
1889
|
-
id:
|
|
1890
|
-
name:
|
|
1891
|
-
})).filter((
|
|
1879
|
+
ce();
|
|
1880
|
+
}, [ce]), U(() => {
|
|
1881
|
+
j && A(!0);
|
|
1882
|
+
}, [j]);
|
|
1883
|
+
const ge = D((te) => {
|
|
1884
|
+
var fe;
|
|
1885
|
+
return te === null ? "" : !te.name || te.name.length === 0 ? ((fe = te.id) == null ? void 0 : fe.toString()) ?? "" : f ? `${te.name} (${te.id})` : te.name;
|
|
1886
|
+
}, [f]), De = R(() => {
|
|
1887
|
+
const te = t ? [...t] : [];
|
|
1888
|
+
return w !== void 0 && Y && (te.some((fe) => fe.id === Y) || te.push({ id: Y, name: w })), te.map((fe) => ({
|
|
1889
|
+
id: fe.id,
|
|
1890
|
+
name: ge(fe)
|
|
1891
|
+
})).filter((fe) => Ae(fe.name, V)).sort((fe, Me) => m ? 0 : (fe.name ?? "").localeCompare(Me.name ?? ""));
|
|
1892
1892
|
}, [
|
|
1893
1893
|
t,
|
|
1894
1894
|
m,
|
|
1895
|
-
|
|
1896
|
-
|
|
1895
|
+
V,
|
|
1896
|
+
ge,
|
|
1897
1897
|
w,
|
|
1898
|
-
|
|
1899
|
-
]),
|
|
1900
|
-
return /* @__PURE__ */ r(
|
|
1901
|
-
/* @__PURE__ */ r(xr, { currentSelection:
|
|
1902
|
-
|
|
1898
|
+
Y
|
|
1899
|
+
]), me = ve(null), Pe = E !== void 0;
|
|
1900
|
+
return /* @__PURE__ */ r(X, { children: /* @__PURE__ */ g(e, { label: a ?? "", required: s, disabled: oe, hidden: c, withoutLabel: u, isInvalid: Pe, inputContainerClassName: I({ "luminus-dropdown-select-open": Z }), hint: v, className: h, children: [
|
|
1901
|
+
/* @__PURE__ */ r(xr, { currentSelection: ee, selectedItemNavigateTo: y, children: /* @__PURE__ */ r(Dr, { control: M, name: n, render: () => /* @__PURE__ */ r(Sr, { value: Y, MiniDetailComponent: C, miniDetailPlacement: N, children: /* @__PURE__ */ r(le.Select, { size: o, onMouseDown: (te) => {
|
|
1902
|
+
te.currentTarget.focus(), te.preventDefault();
|
|
1903
1903
|
}, onClick: () => {
|
|
1904
|
-
|
|
1905
|
-
}, ref:
|
|
1906
|
-
}, isInvalid:
|
|
1907
|
-
|
|
1908
|
-
|
|
1904
|
+
H(!0);
|
|
1905
|
+
}, ref: me, value: Y ?? "", onChange: () => {
|
|
1906
|
+
}, isInvalid: Pe, hidden: c, disabled: oe, className: "w-100", children: /* @__PURE__ */ r("option", { value: (ee == null ? void 0 : ee.id) ?? "", children: ge(ee) }) }) }) }) }),
|
|
1907
|
+
E && /* @__PURE__ */ r(_t, { message: E.message }),
|
|
1908
|
+
me.current && /* @__PURE__ */ r(Cr, { show: Z, onCancel: () => H(!1), items: De, currentSelection: ee ?? null, onSelectionChange: xe, onSearchQueryChange: W, texts: _, disabled: oe, inputRef: me, autoHideSearch: !0, allItemsLength: t.length, addNewOptionPath: b, refreshOptions: x, noRemoveButton: S })
|
|
1909
1909
|
] }) });
|
|
1910
1910
|
}, Rh = ({ InputContainer: e = Se, formField: t, label: n, placeholder: a, size: o, resetsFields: l, showClearIcon: i, clearValue: s, required: c, hidden: d, disabled: u, withoutLabel: m, step: f, stepperStep: p = 1, className: h, min: w, max: v, onChange: b, hint: x }) => {
|
|
1911
|
-
const { register: C, formState: { errors: N, isSubmitted: y }, setValue: S } = Et(), _ =
|
|
1912
|
-
S(
|
|
1913
|
-
}, [v, w, S]),
|
|
1914
|
-
const
|
|
1915
|
-
|
|
1911
|
+
const { register: C, formState: { errors: N, isSubmitted: y }, setValue: S } = Et(), _ = ot({ falseIfNotInit: !0 }), [k, j] = L(void 0), [T, M] = L(!1), F = D((A, V, B) => {
|
|
1912
|
+
S(A, Jt(V, w, v), B);
|
|
1913
|
+
}, [v, w, S]), E = D(() => {
|
|
1914
|
+
const A = s ?? null;
|
|
1915
|
+
F(t, A !== null ? Number(A) : null, {
|
|
1916
1916
|
shouldDirty: !0,
|
|
1917
1917
|
shouldValidate: T
|
|
1918
1918
|
});
|
|
1919
|
-
}, [s,
|
|
1920
|
-
const
|
|
1921
|
-
let
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
}),
|
|
1925
|
-
}, [N, t]),
|
|
1919
|
+
}, [s, F, t, T]), O = D(() => {
|
|
1920
|
+
const A = t.split(".");
|
|
1921
|
+
let V = N;
|
|
1922
|
+
A.forEach((B) => {
|
|
1923
|
+
V !== void 0 && (V = V[B]);
|
|
1924
|
+
}), j(V);
|
|
1925
|
+
}, [N, t]), Z = R(() => u || _, [u, _]);
|
|
1926
1926
|
U(() => {
|
|
1927
|
-
|
|
1928
|
-
}, [
|
|
1927
|
+
O();
|
|
1928
|
+
}, [O]), U(() => {
|
|
1929
1929
|
y && M(!0);
|
|
1930
1930
|
}, [y]);
|
|
1931
|
-
const
|
|
1932
|
-
return /* @__PURE__ */ g(e, { label: n ?? "", required: c, disabled:
|
|
1931
|
+
const H = k !== void 0, z = ht({ name: t });
|
|
1932
|
+
return /* @__PURE__ */ g(e, { label: n ?? "", required: c, disabled: Z, hidden: d, withoutLabel: m, isInvalid: H, hint: x, className: h, children: [
|
|
1933
1933
|
/* @__PURE__ */ g("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
1934
|
-
/* @__PURE__ */ r(
|
|
1935
|
-
setValueAs: (
|
|
1934
|
+
/* @__PURE__ */ r(le.Control, { type: "number", placeholder: a ?? n, size: o, ...C(t, {
|
|
1935
|
+
setValueAs: (A) => A == null || A === "" ? null : Jt(Number(A), w, v),
|
|
1936
1936
|
min: w,
|
|
1937
1937
|
max: v,
|
|
1938
|
-
onChange: (
|
|
1939
|
-
var
|
|
1940
|
-
l && l.forEach((
|
|
1938
|
+
onChange: (A) => {
|
|
1939
|
+
var V;
|
|
1940
|
+
l && l.forEach((B) => S(B, null, { shouldDirty: !0, shouldValidate: T })), b && b((V = A.target) != null && V.value ? Number(A.target.value) ?? null : null);
|
|
1941
1941
|
}
|
|
1942
|
-
}), isInvalid:
|
|
1943
|
-
/* @__PURE__ */ r("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ r(J, { size: "sm", onClick: (
|
|
1944
|
-
|
|
1942
|
+
}), isInvalid: H, hidden: d, disabled: Z, className: "w-100 luminus-numeric-stepper", step: f, min: w, max: v }),
|
|
1943
|
+
/* @__PURE__ */ r("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ r(J, { size: "sm", onClick: (A) => {
|
|
1944
|
+
A.preventDefault(), A.stopPropagation(), F(t, ((z ? Number(z) : 0) - p).toString(), { shouldDirty: !0, shouldValidate: T });
|
|
1945
1945
|
}, children: /* @__PURE__ */ r(ro, {}) }) }),
|
|
1946
|
-
/* @__PURE__ */ r("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ r(J, { size: "sm", onClick: (
|
|
1947
|
-
|
|
1946
|
+
/* @__PURE__ */ r("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ r(J, { size: "sm", onClick: (A) => {
|
|
1947
|
+
A.preventDefault(), A.stopPropagation(), F(t, ((z ? Number(z) : 0) + p).toString(), { shouldDirty: !0, shouldValidate: T });
|
|
1948
1948
|
}, children: /* @__PURE__ */ r(ao, {}) }) })
|
|
1949
1949
|
] }),
|
|
1950
|
-
i &&
|
|
1950
|
+
i && z != null && /* @__PURE__ */ r("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ r(J, { color: "secondary", size: "sm", onClick: E, children: /* @__PURE__ */ r(pt, {}) }) }),
|
|
1951
1951
|
k && /* @__PURE__ */ r(_t, { message: k.message })
|
|
1952
1952
|
] });
|
|
1953
1953
|
}, jh = ({ InputContainer: e = Se, formField: t, label: n, placeholder: a, resetsFields: o, showClearIcon: l, clearValue: i, required: s, hidden: c, disabled: d, withoutLabel: u, step: m, size: f, CustomOnChangeComponent: p, noSelectOnFocus: h, className: w, decimalScale: v = 2, fixedDecimalScale: b = !1, numberPrefix: x, numberSuffix: C, min: N, max: y, onChange: S, hint: _ }) => {
|
|
1954
|
-
const { formState: { errors: k, isSubmitted:
|
|
1955
|
-
const
|
|
1956
|
-
T(t,
|
|
1954
|
+
const { formState: { errors: k, isSubmitted: j }, setValue: T, control: M } = Et(), F = ot({ falseIfNotInit: !0 }), [E, O] = L(void 0), [Z, H] = L(!1), z = D(() => {
|
|
1955
|
+
const ee = i ?? null;
|
|
1956
|
+
T(t, ee !== null ? Number(ee) : null, {
|
|
1957
1957
|
shouldDirty: !0,
|
|
1958
|
-
shouldValidate:
|
|
1958
|
+
shouldValidate: Z
|
|
1959
1959
|
});
|
|
1960
|
-
}, [i, T, t,
|
|
1961
|
-
const
|
|
1960
|
+
}, [i, T, t, Z]), A = D(() => {
|
|
1961
|
+
const ee = t.split(".");
|
|
1962
1962
|
let ce = k;
|
|
1963
|
-
|
|
1964
|
-
ce !== void 0 && (ce = ce[
|
|
1965
|
-
}),
|
|
1966
|
-
}, [k, t]),
|
|
1963
|
+
ee.forEach((ie) => {
|
|
1964
|
+
ce !== void 0 && (ce = ce[ie]);
|
|
1965
|
+
}), O(ce);
|
|
1966
|
+
}, [k, t]), V = R(() => d || F, [d, F]);
|
|
1967
1967
|
U(() => {
|
|
1968
|
-
|
|
1969
|
-
}, [
|
|
1970
|
-
|
|
1971
|
-
}, [
|
|
1972
|
-
const
|
|
1968
|
+
A();
|
|
1969
|
+
}, [A]), U(() => {
|
|
1970
|
+
j && H(!0);
|
|
1971
|
+
}, [j]);
|
|
1972
|
+
const B = ht({ name: t });
|
|
1973
1973
|
U(() => {
|
|
1974
|
-
y !== void 0 &&
|
|
1975
|
-
}, [t,
|
|
1976
|
-
const
|
|
1977
|
-
return /* @__PURE__ */ g(e, { label: n ?? "", required: s, disabled:
|
|
1974
|
+
y !== void 0 && B > y && T(t, y), N !== void 0 && B < N && T(t, N);
|
|
1975
|
+
}, [t, B, y, N, T]);
|
|
1976
|
+
const Y = E !== void 0;
|
|
1977
|
+
return /* @__PURE__ */ g(e, { label: n ?? "", required: s, disabled: V, hidden: c, withoutLabel: u, isInvalid: Y, hint: _, className: w, children: [
|
|
1978
1978
|
/* @__PURE__ */ g("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
1979
|
-
/* @__PURE__ */ r(Dr, { control: M, name: t, render: ({ field: { ref:
|
|
1979
|
+
/* @__PURE__ */ r(Dr, { control: M, name: t, render: ({ field: { ref: ee, onChange: ce, name: ie, value: xe } }) => /* @__PURE__ */ r(jr, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: v, fixedDecimalScale: b, prefix: x, suffix: C, defaultValue: "", name: ie, value: xe ?? "", placeholder: a ?? n, onFocus: (W) => {
|
|
1980
1980
|
!h && W.target.select();
|
|
1981
1981
|
}, onChange: (W) => {
|
|
1982
|
-
var
|
|
1983
|
-
const oe = parseFloat(((
|
|
1984
|
-
o && o.forEach((
|
|
1985
|
-
const
|
|
1986
|
-
ce(
|
|
1987
|
-
}, hidden: c, disabled:
|
|
1988
|
-
"is-invalid":
|
|
1982
|
+
var De, me;
|
|
1983
|
+
const oe = parseFloat(((me = (De = W.target) == null ? void 0 : De.value) == null ? void 0 : me.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
|
|
1984
|
+
o && o.forEach((Pe) => T(Pe, null, { shouldDirty: !0, shouldValidate: Z }));
|
|
1985
|
+
const ge = oe == null || Number.isNaN(oe) ? null : Number(oe);
|
|
1986
|
+
ce(ge), S && S(ge);
|
|
1987
|
+
}, hidden: c, disabled: V, className: I("form-control text-end w-100", {
|
|
1988
|
+
"is-invalid": Y
|
|
1989
1989
|
}, {
|
|
1990
1990
|
[`form-control-${f}`]: f
|
|
1991
|
-
}), step: m, getInputRef:
|
|
1991
|
+
}), step: m, getInputRef: ee, min: N, max: y }) }),
|
|
1992
1992
|
p && /* @__PURE__ */ r("div", { className: "custom-picker-button", children: p })
|
|
1993
1993
|
] }),
|
|
1994
|
-
l &&
|
|
1995
|
-
|
|
1994
|
+
l && B != null && /* @__PURE__ */ r("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ r(J, { color: "secondary", size: "sm", onClick: z, children: /* @__PURE__ */ r(pt, {}) }) }),
|
|
1995
|
+
E && /* @__PURE__ */ r(_t, { message: E.message })
|
|
1996
1996
|
] });
|
|
1997
1997
|
}, Mh = ({ ref: e, userName: t, onClick: n, children: a }) => /* @__PURE__ */ g("button", { type: "button", ref: e, onClick: (o) => {
|
|
1998
1998
|
o.preventDefault(), n(o);
|
|
@@ -2007,7 +2007,7 @@ const ic = ({ InputContainer: e = Ht, value: t, onChange: n, debounceMs: a, labe
|
|
|
2007
2007
|
const d = (u) => {
|
|
2008
2008
|
u.target.files && (o(u.target.files), u.target.value = "");
|
|
2009
2009
|
};
|
|
2010
|
-
return /* @__PURE__ */ g(
|
|
2010
|
+
return /* @__PURE__ */ g(X, { children: [
|
|
2011
2011
|
/* @__PURE__ */ g("label", { htmlFor: n, className: I(`btn luminus-dropdown-item text-nowrap rounded text-${e} ${i ?? ""}`, Yi.item), ...c, children: [
|
|
2012
2012
|
t,
|
|
2013
2013
|
s
|
|
@@ -2037,7 +2037,7 @@ const ic = ({ InputContainer: e = Ht, value: t, onChange: n, debounceMs: a, labe
|
|
|
2037
2037
|
}), t;
|
|
2038
2038
|
}, uc = (e) => e && e.type === "header" && e.member && e.member.caption !== "All" && // collapsed groups have this in continuing cells
|
|
2039
2039
|
e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da = (e) => !e.member && !e.isDrillThrough, ua = (e, t) => typeof e == "function" ? e(t) : e.replace(":id", t), mc = ({ dataSource: e, settings: t, pivotRef: n, localization: a, licenseKey: o, hyperlinkColumn: l, roomPasportization: i, enabled: s = !0 }) => {
|
|
2040
|
-
const { texts: { reports: c } } =
|
|
2040
|
+
const { texts: { reports: c } } = P(G), [d, u] = L(!1), m = ve(null), f = n ?? m, p = R(() => ({
|
|
2041
2041
|
localization: a
|
|
2042
2042
|
}), [a]), h = D((N) => {
|
|
2043
2043
|
delete N[0], delete N[1], delete N[2];
|
|
@@ -2065,29 +2065,29 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2065
2065
|
}, [f, c.collapseAll, c.expand, c.expandAll]), w = (N) => {
|
|
2066
2066
|
const y = N.getTabs();
|
|
2067
2067
|
N.getTabs = () => h(y);
|
|
2068
|
-
}, v =
|
|
2068
|
+
}, v = R(() => e && e.mapping ? Object.values(e.mapping).filter((N) => N.caption.includes("P:")).map((N) => ({ uniqueName: N.caption.replace("P:", ""), caption: N.caption })) : [], [e]), b = R(() => {
|
|
2069
2069
|
var y, S, _, k;
|
|
2070
2070
|
const N = (y = f.current) == null ? void 0 : y.flexmonster.getReport();
|
|
2071
2071
|
return N && N.slice ? {
|
|
2072
2072
|
...N.slice,
|
|
2073
2073
|
rows: [
|
|
2074
|
-
...((S = N.slice.rows) == null ? void 0 : S.filter((
|
|
2074
|
+
...((S = N.slice.rows) == null ? void 0 : S.filter((j) => {
|
|
2075
2075
|
var T;
|
|
2076
|
-
return !((T =
|
|
2076
|
+
return !((T = j.caption) != null && T.includes("P:"));
|
|
2077
2077
|
})) ?? [],
|
|
2078
2078
|
...v
|
|
2079
2079
|
],
|
|
2080
2080
|
columns: [
|
|
2081
|
-
...((_ = N.slice.columns) == null ? void 0 : _.filter((
|
|
2081
|
+
...((_ = N.slice.columns) == null ? void 0 : _.filter((j) => {
|
|
2082
2082
|
var T;
|
|
2083
|
-
return !((T =
|
|
2083
|
+
return !((T = j.caption) != null && T.includes("P:"));
|
|
2084
2084
|
})) ?? [],
|
|
2085
2085
|
...v
|
|
2086
2086
|
],
|
|
2087
2087
|
measures: [
|
|
2088
|
-
...((k = N.slice.measures) == null ? void 0 : k.filter((
|
|
2088
|
+
...((k = N.slice.measures) == null ? void 0 : k.filter((j) => {
|
|
2089
2089
|
var T;
|
|
2090
|
-
return !((T =
|
|
2090
|
+
return !((T = j.caption) != null && T.includes("P:"));
|
|
2091
2091
|
})) ?? [],
|
|
2092
2092
|
...v
|
|
2093
2093
|
]
|
|
@@ -2097,7 +2097,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2097
2097
|
var N, y, S, _;
|
|
2098
2098
|
if (d && s) {
|
|
2099
2099
|
if (i && b) {
|
|
2100
|
-
const k = (N = f.current) == null ? void 0 : N.flexmonster.getReport(),
|
|
2100
|
+
const k = (N = f.current) == null ? void 0 : N.flexmonster.getReport(), j = k && k.options ? {
|
|
2101
2101
|
...k.options,
|
|
2102
2102
|
grid: { ...(y = k.options) == null ? void 0 : y.grid, autoSwitchToCompact: !1 }
|
|
2103
2103
|
} : {};
|
|
@@ -2105,7 +2105,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2105
2105
|
...k,
|
|
2106
2106
|
dataSource: e,
|
|
2107
2107
|
slice: b,
|
|
2108
|
-
options:
|
|
2108
|
+
options: j
|
|
2109
2109
|
});
|
|
2110
2110
|
} else
|
|
2111
2111
|
(_ = f.current) == null || _.flexmonster.updateData(e);
|
|
@@ -2114,8 +2114,8 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2114
2114
|
}, [e, s, d, v, f, i, b]), U(() => {
|
|
2115
2115
|
var N, y, S, _, k;
|
|
2116
2116
|
if (d && s) {
|
|
2117
|
-
const
|
|
2118
|
-
if (
|
|
2117
|
+
const j = (N = f.current) == null ? void 0 : N.flexmonster.getReport();
|
|
2118
|
+
if (j === void 0 || typeof j == "string")
|
|
2119
2119
|
return;
|
|
2120
2120
|
const T = dc(t);
|
|
2121
2121
|
T.options = {
|
|
@@ -2127,32 +2127,32 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2127
2127
|
}, i && (T.slice = {
|
|
2128
2128
|
...t == null ? void 0 : t.slice,
|
|
2129
2129
|
rows: [
|
|
2130
|
-
...((_ = (S = t == null ? void 0 : t.slice) == null ? void 0 : S.rows) == null ? void 0 : _.filter((
|
|
2131
|
-
var
|
|
2132
|
-
return !((
|
|
2130
|
+
...((_ = (S = t == null ? void 0 : t.slice) == null ? void 0 : S.rows) == null ? void 0 : _.filter((F) => {
|
|
2131
|
+
var E;
|
|
2132
|
+
return !((E = F.caption) != null && E.includes("P:"));
|
|
2133
2133
|
})) ?? [],
|
|
2134
2134
|
...v
|
|
2135
2135
|
]
|
|
2136
2136
|
});
|
|
2137
|
-
const M = { ...
|
|
2137
|
+
const M = { ...j, ...T };
|
|
2138
2138
|
(k = f.current) == null || k.flexmonster.setReport(M), console.log("Refreshing flexmonster settings. New report: ", M);
|
|
2139
2139
|
}
|
|
2140
2140
|
}, [s, d, v, f, i, t]);
|
|
2141
2141
|
const x = D((N, y) => {
|
|
2142
|
-
var
|
|
2142
|
+
var F, E;
|
|
2143
2143
|
if (uc(y)) {
|
|
2144
|
-
N.text = ((
|
|
2145
|
-
const
|
|
2146
|
-
N.style["padding-left"] =
|
|
2144
|
+
N.text = ((F = y.member) == null ? void 0 : F.caption) ?? "";
|
|
2145
|
+
const O = N.style["padding-left"] ?? "4px", Z = parseInt(O, 10);
|
|
2146
|
+
N.style["padding-left"] = Z + 11 + "px";
|
|
2147
2147
|
}
|
|
2148
2148
|
if (!l || !ca(y, l.idColumn) || da(y))
|
|
2149
2149
|
return;
|
|
2150
|
-
const S = (
|
|
2150
|
+
const S = (E = y.escapedLabel) == null ? void 0 : E.toString();
|
|
2151
2151
|
if (S === void 0)
|
|
2152
2152
|
return;
|
|
2153
|
-
const _ = ua(l.url, S), k = "style='color: #00a45a; text-decoration: underline; cursor: pointer;'",
|
|
2153
|
+
const _ = ua(l.url, S), k = "style='color: #00a45a; text-decoration: underline; cursor: pointer;'", j = y.type === "header" ? "onclick='event.stopImmediatePropagation()'" : "", T = y.isDrillThrough || y.type === "header" ? `href='${_}' target='_blank'` : "";
|
|
2154
2154
|
N.style && (N.style["z-index"] = 1);
|
|
2155
|
-
const M = `<a ${T} ${k} ${
|
|
2155
|
+
const M = `<a ${T} ${k} ${j}>${y.escapedLabel}</a>`;
|
|
2156
2156
|
N.text = M;
|
|
2157
2157
|
}, [l]), C = D((N) => {
|
|
2158
2158
|
if (!l || !ca(N, l.idColumn) || da(N))
|
|
@@ -2160,7 +2160,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2160
2160
|
const y = ua(l.url, N.escapedLabel ?? "");
|
|
2161
2161
|
window.open(y ?? "", "_blank", "noreferrer");
|
|
2162
2162
|
}, [l]);
|
|
2163
|
-
return /* @__PURE__ */ r(
|
|
2163
|
+
return /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(
|
|
2164
2164
|
Wl,
|
|
2165
2165
|
{
|
|
2166
2166
|
ref: f,
|
|
@@ -2178,7 +2178,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2178
2178
|
}
|
|
2179
2179
|
) });
|
|
2180
2180
|
}, fc = (e, t, n, a) => {
|
|
2181
|
-
const { texts: { reports: o } } =
|
|
2181
|
+
const { texts: { reports: o } } = P(G), { prompt: l } = qi(), { confirm: i } = it(), s = je(), { user: c } = P(gt), { startLoading: d, stopLoading: u } = P(Je), { addNotification: m } = Dt(), f = D(async (b) => {
|
|
2182
2182
|
d("report-versionSavingAs");
|
|
2183
2183
|
try {
|
|
2184
2184
|
const x = await s.post("/reports/version", b);
|
|
@@ -2262,7 +2262,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2262
2262
|
]);
|
|
2263
2263
|
return { saveAs: h, save: p, archive: w, detach: v };
|
|
2264
2264
|
}, hc = (e) => {
|
|
2265
|
-
const t = je(), { startLoading: n, stopLoading: a } =
|
|
2265
|
+
const t = je(), { startLoading: n, stopLoading: a } = P(Je);
|
|
2266
2266
|
return { changeEmployeeRights: D(async (l, i) => {
|
|
2267
2267
|
let s = null;
|
|
2268
2268
|
n("reportSharing-addPerson");
|
|
@@ -2282,7 +2282,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2282
2282
|
return s;
|
|
2283
2283
|
}, [t, e, n, a]) };
|
|
2284
2284
|
}, pc = ({ isOpen: e, onHide: t, usersData: n, reportVersionId: a, EmployeePicker: o, setReportVersion: l }) => {
|
|
2285
|
-
const { ProjectIconComponent: i, texts: { reports: s } } =
|
|
2285
|
+
const { ProjectIconComponent: i, texts: { reports: s } } = P(G), { confirm: c } = it(), [d, u] = L(null), { changeEmployeeRights: m } = hc(a), f = D((w) => {
|
|
2286
2286
|
l((v) => v === null ? null : {
|
|
2287
2287
|
...v,
|
|
2288
2288
|
users: w.filter((b) => b.isReportOwner === !1)
|
|
@@ -2323,7 +2323,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2323
2323
|
}
|
|
2324
2324
|
u(w);
|
|
2325
2325
|
}, value: d }) }),
|
|
2326
|
-
/* @__PURE__ */ r(
|
|
2326
|
+
/* @__PURE__ */ r(Qe, { onClick: p, disabled: d === null, children: s.add })
|
|
2327
2327
|
] })
|
|
2328
2328
|
] })
|
|
2329
2329
|
] });
|
|
@@ -2336,77 +2336,77 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2336
2336
|
});
|
|
2337
2337
|
}, [t, e]), { mappings: n };
|
|
2338
2338
|
}, Fh = ({ reportType: e, title: t, data: n, filterElements: a, getReportRoute: o, localization: l, licenseKey: i, EmployeePicker: s, localizationJsonFile: c, localizationTransformer: d, hyperlinkColumn: u, roomPasportization: m = !1 }) => {
|
|
2339
|
-
const { texts: { reports: f } } =
|
|
2339
|
+
const { texts: { reports: f } } = P(G), { confirm: p } = it(), h = Pn(), [w] = Hl(), { id: v } = po(), b = R(() => v === void 0 ? null : Number(v), [v]), x = D((W) => {
|
|
2340
2340
|
const oe = W === null ? "" : W.toString();
|
|
2341
2341
|
h(zt(o(e), { id: oe }) + "?" + w.toString(), {
|
|
2342
2342
|
replace: !0,
|
|
2343
2343
|
flushSync: !0
|
|
2344
2344
|
});
|
|
2345
|
-
}, [o, h, e, w]), [C, N] = L(!1), y =
|
|
2346
|
-
const oe = W.target.value,
|
|
2347
|
-
x(
|
|
2348
|
-
}, [x]),
|
|
2345
|
+
}, [o, h, e, w]), [C, N] = L(!1), y = ve(null), { user: S } = P(gt), { data: _, reloadData: k } = _e(`/reports/${e}`), { mappings: j } = gc(c, d), [T, M] = L({}), F = D((W) => {
|
|
2346
|
+
const oe = W.target.value, ge = oe === "" ? null : Number(oe);
|
|
2347
|
+
x(ge);
|
|
2348
|
+
}, [x]), E = D(async (W) => {
|
|
2349
2349
|
await k(), x(W);
|
|
2350
|
-
}, [k, x]), { data:
|
|
2350
|
+
}, [k, x]), { data: O, setData: Z } = _e(`/reports/version/${b}`, { enabled: b !== null, nullStateBeforeLoad: !1, nullStateOnFail: !0 });
|
|
2351
2351
|
U(() => {
|
|
2352
2352
|
var oe;
|
|
2353
|
-
if (
|
|
2353
|
+
if (O === null) {
|
|
2354
2354
|
M({});
|
|
2355
2355
|
return;
|
|
2356
2356
|
}
|
|
2357
|
-
const W = cc(
|
|
2357
|
+
const W = cc(O) ?? {};
|
|
2358
2358
|
M(W), (oe = y.current) == null || oe.flexmonster.refresh();
|
|
2359
|
-
}, [
|
|
2360
|
-
const { save:
|
|
2359
|
+
}, [O]);
|
|
2360
|
+
const { save: H, saveAs: z, archive: A, detach: V } = fc(e, y, b, E), B = R(() => ({
|
|
2361
2361
|
data: n ?? [],
|
|
2362
|
-
mapping:
|
|
2363
|
-
}), [n,
|
|
2362
|
+
mapping: j ?? void 0
|
|
2363
|
+
}), [n, j]), Y = D(async () => {
|
|
2364
2364
|
var oe;
|
|
2365
|
-
await p(f.confirmRevertChanges) && ((oe = y.current) == null || oe.flexmonster.setReport({ dataSource:
|
|
2366
|
-
}, [p,
|
|
2365
|
+
await p(f.confirmRevertChanges) && ((oe = y.current) == null || oe.flexmonster.setReport({ dataSource: B, ...T }));
|
|
2366
|
+
}, [p, B, f.confirmRevertChanges, T]), ee = R(() => (O == null ? void 0 : O.ownerId) === S.personalNumber, [O == null ? void 0 : O.ownerId, S.personalNumber]), ce = R(() => {
|
|
2367
2367
|
var W;
|
|
2368
|
-
return (W =
|
|
2369
|
-
}, [
|
|
2370
|
-
await p(f.confirmDelete(
|
|
2371
|
-
}, [
|
|
2372
|
-
await p(f.confirmDetach(
|
|
2373
|
-
}, [p,
|
|
2368
|
+
return (W = O == null ? void 0 : O.users) == null ? void 0 : W.some((oe) => oe.id === S.personalNumber && !oe.isReportOwner);
|
|
2369
|
+
}, [O == null ? void 0 : O.users, S.personalNumber]), ie = D(async () => {
|
|
2370
|
+
await p(f.confirmDelete(O == null ? void 0 : O.name)) && (await A(), x(null), await k());
|
|
2371
|
+
}, [A, p, k, O == null ? void 0 : O.name, f, x]), xe = D(async () => {
|
|
2372
|
+
await p(f.confirmDetach(O == null ? void 0 : O.name)) && (await V(), x(null), await k());
|
|
2373
|
+
}, [p, V, k, O == null ? void 0 : O.name, f, x]);
|
|
2374
2374
|
return U(() => {
|
|
2375
2375
|
var W, oe;
|
|
2376
|
-
b === null && x(((W = _ == null ? void 0 : _.reportVersions.find((
|
|
2377
|
-
}, [_ == null ? void 0 : _.reportVersions, b, x]), /* @__PURE__ */ g(
|
|
2378
|
-
/* @__PURE__ */ r(
|
|
2376
|
+
b === null && x(((W = _ == null ? void 0 : _.reportVersions.find((ge) => ge.isSystem === !0)) == null ? void 0 : W.reportVersionId) ?? ((oe = _ == null ? void 0 : _.reportVersions[0]) == null ? void 0 : oe.reportVersionId) ?? null);
|
|
2377
|
+
}, [_ == null ? void 0 : _.reportVersions, b, x]), /* @__PURE__ */ g(X, { children: [
|
|
2378
|
+
/* @__PURE__ */ r(at, { variant: "fullScreen", title: /* @__PURE__ */ g("div", { className: "d-flex justify-content-start gap-3", children: [
|
|
2379
2379
|
/* @__PURE__ */ r($, { variant: "h3", children: t }),
|
|
2380
2380
|
a,
|
|
2381
2381
|
/* @__PURE__ */ g("div", { className: "d-flex gap-1 align-items-center", children: [
|
|
2382
|
-
/* @__PURE__ */ g(Ki, { size: "sm", value: b ?? void 0, onChange:
|
|
2382
|
+
/* @__PURE__ */ g(Ki, { size: "sm", value: b ?? void 0, onChange: F, children: [
|
|
2383
2383
|
/* @__PURE__ */ r("optgroup", { label: f.versionSelectSystem, children: _ == null ? void 0 : _.reportVersions.filter((W) => W.isSystem === !0).map((W) => /* @__PURE__ */ r("option", { value: W.reportVersionId, children: W.name }, W.reportVersionId)) }),
|
|
2384
2384
|
/* @__PURE__ */ r("optgroup", { label: f.versionSelectYour, children: _ == null ? void 0 : _.reportVersions.filter((W) => W.ownerId === S.personalNumber).map((W) => /* @__PURE__ */ r("option", { value: W.reportVersionId, children: W.name }, W.reportVersionId)) }),
|
|
2385
2385
|
/* @__PURE__ */ r("optgroup", { label: f.versionSelectSharedWithYou, children: _ == null ? void 0 : _.reportVersions.filter((W) => W.isSystem === !1 && W.ownerId !== S.personalNumber).map((W) => /* @__PURE__ */ r("option", { value: W.reportVersionId, children: `${W.name} [${W.ownerId}]` }, W.reportVersionId)) })
|
|
2386
2386
|
] }),
|
|
2387
|
-
/* @__PURE__ */ r(
|
|
2388
|
-
/* @__PURE__ */ r(
|
|
2389
|
-
/* @__PURE__ */ g(
|
|
2390
|
-
/* @__PURE__ */ r(Re, { onClick:
|
|
2391
|
-
/* @__PURE__ */ r(Re, { onClick: () => N(!0), disabled: !
|
|
2392
|
-
|
|
2393
|
-
ce && !(
|
|
2387
|
+
/* @__PURE__ */ r(Ye, { icon: /* @__PURE__ */ r(Qi, {}), onClick: H, disabled: b === null || (O == null ? void 0 : O.isSystem) || !ee, children: f.save }),
|
|
2388
|
+
/* @__PURE__ */ r(Ye, { icon: /* @__PURE__ */ r(Xi, {}), onClick: z, className: "flex-shrink-0", children: f.saveAs }),
|
|
2389
|
+
/* @__PURE__ */ g(vt, { toggle: /* @__PURE__ */ r(yt, { as: Tt }), children: [
|
|
2390
|
+
/* @__PURE__ */ r(Re, { onClick: Y, children: f.revertChanges }),
|
|
2391
|
+
/* @__PURE__ */ r(Re, { onClick: () => N(!0), disabled: !ee || (O == null ? void 0 : O.isSystem), children: f.share }),
|
|
2392
|
+
ee && !(O != null && O.isSystem) ? /* @__PURE__ */ r(Re, { color: "danger", onClick: ie, children: f.delete }) : null,
|
|
2393
|
+
ce && !(O != null && O.isSystem) ? /* @__PURE__ */ r(Re, { color: "danger", onClick: xe, children: f.detach }) : null
|
|
2394
2394
|
] })
|
|
2395
2395
|
] })
|
|
2396
|
-
] }), children: /* @__PURE__ */ r("div", { className: I("h-100 w-100",
|
|
2397
|
-
|
|
2396
|
+
] }), children: /* @__PURE__ */ r("div", { className: I("h-100 w-100", B.data && B.data.length > 0 ? "" : "d-none"), children: /* @__PURE__ */ r(mc, { dataSource: B, settings: T, pivotRef: y, enabled: B.data && B.data.length > 0, roomPasportization: m, localization: l, licenseKey: i, hyperlinkColumn: u }) }) }),
|
|
2397
|
+
O !== null ? /* @__PURE__ */ r(
|
|
2398
2398
|
pc,
|
|
2399
2399
|
{
|
|
2400
2400
|
isOpen: C,
|
|
2401
2401
|
onHide: () => N(!1),
|
|
2402
|
-
usersData:
|
|
2403
|
-
setReportVersion:
|
|
2404
|
-
reportVersionId:
|
|
2402
|
+
usersData: O.users ?? null,
|
|
2403
|
+
setReportVersion: Z,
|
|
2404
|
+
reportVersionId: O == null ? void 0 : O.reportVersionId,
|
|
2405
2405
|
EmployeePicker: s
|
|
2406
2406
|
}
|
|
2407
2407
|
) : null
|
|
2408
2408
|
] });
|
|
2409
|
-
}, Bh = ({ cell: { value: e } }) => /* @__PURE__ */ r(
|
|
2409
|
+
}, Bh = ({ cell: { value: e } }) => /* @__PURE__ */ r(X, { children: e ? /* @__PURE__ */ r(Ar, { name: e, size: 21, fontSize: 12 }) : /* @__PURE__ */ r(X, {}) }), vc = ({ knownTypes: e, typeFilters: t, onChangeTypeFilters: n }) => /* @__PURE__ */ r("div", { className: "mb-1 d-flex justify-content-center gap-2", children: e.map((a) => /* @__PURE__ */ r("div", { role: "button", style: {
|
|
2410
2410
|
height: "14px",
|
|
2411
2411
|
width: "14px",
|
|
2412
2412
|
borderRadius: "50%",
|
|
@@ -2414,10 +2414,10 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2414
2414
|
backgroundColor: "transparent"
|
|
2415
2415
|
}, className: I(`border-${a}`, t.includes(a) && `bg-${a}`), onClick: () => {
|
|
2416
2416
|
t.includes(a) ? n(t.filter((o) => o !== a)) : n([...t, a]);
|
|
2417
|
-
} }, a)) }), yc = ({ linksTo: e, onClick: t, children: n }) => e ? /* @__PURE__ */ r(Oe, { to: e, className: "text-decoration-none", onClick: t, children: n }) : /* @__PURE__ */ r(
|
|
2418
|
-
const { ProjectIconComponent: l, localizationContext: i } =
|
|
2417
|
+
} }, a)) }), yc = ({ linksTo: e, onClick: t, children: n }) => e ? /* @__PURE__ */ r(Oe, { to: e, className: "text-decoration-none", onClick: t, children: n }) : /* @__PURE__ */ r(X, { children: n }), bc = ({ message: e, onDeleteMessage: t, onClickMessage: n, getIcon: a, getLinksTo: o }) => {
|
|
2418
|
+
const { ProjectIconComponent: l, localizationContext: i } = P(G), { dateFnsLocale: s } = P(i), c = e.dateTime ? qe(e.dateTime) : null, d = c ? Jl(new Date(Date.now()), c) : 0;
|
|
2419
2419
|
return /* @__PURE__ */ g("div", { children: [
|
|
2420
|
-
c && /* @__PURE__ */ r("div", { className: "d-flex justify-content-end", children: /* @__PURE__ */ r($e, { text:
|
|
2420
|
+
c && /* @__PURE__ */ r("div", { className: "d-flex justify-content-end", children: /* @__PURE__ */ r($e, { text: rt(c, "dd.MM.yyyy HH:mm"), placement: "left", children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r($, { variant: "caption", children: d > 2 ? rt(c, "dd.MM.yyyy") : ts(c, new Date(Date.now()), {
|
|
2421
2421
|
locale: s.code
|
|
2422
2422
|
}) }) }) }) }),
|
|
2423
2423
|
/* @__PURE__ */ r(yc, { linksTo: o(e) ?? void 0, onClick: n, children: /* @__PURE__ */ r(Lm, { level: e.type, noIcon: !0, children: /* @__PURE__ */ g("div", { className: "d-flex align-items-start gap-2", children: [
|
|
@@ -2434,25 +2434,25 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2434
2434
|
] }) }) })
|
|
2435
2435
|
] });
|
|
2436
2436
|
}, ma = ["info", "warning", "danger"], fa = ({ messages: e, isLoading: t, onDeleteMessage: n, onClickMessage: a, getIcon: o, getLinksTo: l }) => {
|
|
2437
|
-
const { texts: { messageBoard: i } } =
|
|
2437
|
+
const { texts: { messageBoard: i } } = P(G), [s, c] = L(ma), d = R(() => e.filter((u) => s.includes(u.type ?? "")), [s, e]);
|
|
2438
2438
|
return /* @__PURE__ */ g("div", { className: "h-100 d-flex flex-column overflow-hidden", children: [
|
|
2439
2439
|
/* @__PURE__ */ r(vc, { knownTypes: ma, typeFilters: s, onChangeTypeFilters: (u) => c(u) }),
|
|
2440
2440
|
t && /* @__PURE__ */ g("div", { className: "p-3 w-100", children: [
|
|
2441
|
-
/* @__PURE__ */ r(
|
|
2442
|
-
/* @__PURE__ */ g(
|
|
2443
|
-
/* @__PURE__ */ r(
|
|
2441
|
+
/* @__PURE__ */ r(dt, { as: Zr.Title, animation: "glow", children: /* @__PURE__ */ r(dt, { xs: 6 }) }),
|
|
2442
|
+
/* @__PURE__ */ g(dt, { as: Zr.Text, animation: "glow", children: [
|
|
2443
|
+
/* @__PURE__ */ r(dt, { xs: 7 }),
|
|
2444
2444
|
" ",
|
|
2445
|
-
/* @__PURE__ */ r(
|
|
2445
|
+
/* @__PURE__ */ r(dt, { xs: 4 }),
|
|
2446
2446
|
" ",
|
|
2447
|
-
/* @__PURE__ */ r(
|
|
2447
|
+
/* @__PURE__ */ r(dt, { xs: 4 }),
|
|
2448
2448
|
" ",
|
|
2449
|
-
/* @__PURE__ */ r(
|
|
2449
|
+
/* @__PURE__ */ r(dt, { xs: 6 }),
|
|
2450
2450
|
" ",
|
|
2451
|
-
/* @__PURE__ */ r(
|
|
2451
|
+
/* @__PURE__ */ r(dt, { xs: 8 })
|
|
2452
2452
|
] })
|
|
2453
2453
|
] }),
|
|
2454
|
-
!t && /* @__PURE__ */ g(
|
|
2455
|
-
e.length === 0 && /* @__PURE__ */ r(
|
|
2454
|
+
!t && /* @__PURE__ */ g(X, { children: [
|
|
2455
|
+
e.length === 0 && /* @__PURE__ */ r(He, { variant: "info", size: "sm", className: "mt-2", children: i.noMessages }),
|
|
2456
2456
|
/* @__PURE__ */ r("div", { className: "h-100 overflow-y-auto d-flex flex-column gap-2 luminus-thin-scrollbar", children: d.map((u) => /* @__PURE__ */ r(bc, { message: u, onDeleteMessage: n, onClickMessage: a, getIcon: o, getLinksTo: l }, u.id)) })
|
|
2457
2457
|
] })
|
|
2458
2458
|
] });
|
|
@@ -2479,7 +2479,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2479
2479
|
};
|
|
2480
2480
|
}, [v]);
|
|
2481
2481
|
const C = c.filter((y) => y.type === "danger").length, N = u ? !1 : f;
|
|
2482
|
-
return e ? /* @__PURE__ */ g(
|
|
2482
|
+
return e ? /* @__PURE__ */ g(X, { children: [
|
|
2483
2483
|
/* @__PURE__ */ g("div", { className: "position-relative", children: [
|
|
2484
2484
|
/* @__PURE__ */ r(J, { size: "md", onClick: () => w(!h), children: t }),
|
|
2485
2485
|
C > 0 && /* @__PURE__ */ r("div", { className: "badge rounded-pill bg-danger p-1 px-2 text-white", style: { position: "absolute", top: "-6px", right: "-10px", fontSize: "10px" }, children: C })
|
|
@@ -2513,8 +2513,8 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2513
2513
|
disabled: a
|
|
2514
2514
|
}, { [Zn.disabled]: a }, { vertical: o }, { [Zn.vertical]: o }), onClick: () => n && !a && n(e), children: typeof l == "string" ? /* @__PURE__ */ r($, { variant: o ? "body" : "h6", className: o ? "" : "text-primary", children: l }) : l }), Hh = ({ tabs: e, activeTab: t, onSelect: n, ...a }) => {
|
|
2515
2515
|
var i;
|
|
2516
|
-
const { ProjectIconComponent: o } =
|
|
2517
|
-
return l ? /* @__PURE__ */ r(
|
|
2516
|
+
const { ProjectIconComponent: o } = P(G), { isMobile: l } = Rn();
|
|
2517
|
+
return l ? /* @__PURE__ */ r(vt, { toggle: /* @__PURE__ */ r(yt, { as: Tt, text: ((i = e.find((s) => s.id === t)) == null ? void 0 : i.name) ?? "", icon: /* @__PURE__ */ r(o, { icon: "chevron-down" }) }), ...a, children: e.map((s) => /* @__PURE__ */ r(Re, { onClick: () => n(s.id), children: s.name }, s.id)) }) : /* @__PURE__ */ r(Wo, { activeTab: t, onSelect: (s) => n(s), ...a, children: e.map((s) => /* @__PURE__ */ r(Go, { eventKey: s.id, children: s.name }, s.id)) });
|
|
2518
2518
|
}, Tc = "_selection_1dtmm_1", Ec = "_selectionBg_1dtmm_10", Oc = "_selectionItemsContainer_1dtmm_18", $c = "_selectionItems_1dtmm_18", bn = {
|
|
2519
2519
|
selection: Tc,
|
|
2520
2520
|
selectionBg: Ec,
|
|
@@ -2524,7 +2524,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2524
2524
|
const [o, l] = L(!1), i = (s) => {
|
|
2525
2525
|
t(s), l(!1);
|
|
2526
2526
|
};
|
|
2527
|
-
return /* @__PURE__ */ g(
|
|
2527
|
+
return /* @__PURE__ */ g(X, { children: [
|
|
2528
2528
|
/* @__PURE__ */ r(J, { className: "rounded m-1", onClick: () => l(!0), children: /* @__PURE__ */ r(n, { icon: e }) }),
|
|
2529
2529
|
o && /* @__PURE__ */ g("div", { className: bn.selection, children: [
|
|
2530
2530
|
/* @__PURE__ */ r("div", { className: bn.selectionBg, onClick: () => l(!1) }),
|
|
@@ -2532,21 +2532,21 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2532
2532
|
] })
|
|
2533
2533
|
] });
|
|
2534
2534
|
}, qo = () => {
|
|
2535
|
-
const e =
|
|
2535
|
+
const e = P(oo);
|
|
2536
2536
|
if (e === void 0)
|
|
2537
2537
|
throw new Error("ShortcutLinksProvider not initilized. Probably tried to use useShortcutLinks outside ShortcutLinksProvider.");
|
|
2538
2538
|
return e;
|
|
2539
2539
|
}, Lc = ({ shortcutLink: e, IconComponent: t, IconTypeArray: n, editShortcutLink: a, deleteLocation: o }) => {
|
|
2540
|
-
const { ProjectIconComponent: l } =
|
|
2540
|
+
const { ProjectIconComponent: l } = P(G), [i, s] = L(e.icon), [c, d] = L(e.name), u = R(() => !(i === e.icon && c === e.name), [i, c, e.icon, e.name]), m = D(() => {
|
|
2541
2541
|
s(e.icon), d(e.name);
|
|
2542
2542
|
}, [e]), f = D(() => {
|
|
2543
2543
|
a({ ...e, icon: i, name: c });
|
|
2544
2544
|
}, [a, i, c, e]);
|
|
2545
|
-
return /* @__PURE__ */ g(
|
|
2546
|
-
/* @__PURE__ */ r("td", { className: "align-middle", children: /* @__PURE__ */ r(
|
|
2545
|
+
return /* @__PURE__ */ g(X, { children: [
|
|
2546
|
+
/* @__PURE__ */ r("td", { className: "align-middle", children: /* @__PURE__ */ r(ze, { type: "text", maxLength: 20, value: c, onChange: d, className: "d-flex-grow-1", InputContainer: Ge, size: "sm" }) }),
|
|
2547
2547
|
/* @__PURE__ */ r("td", { className: "align-middle", children: /* @__PURE__ */ r("div", { className: "d-flex justify-content-center align-items-center", children: /* @__PURE__ */ r(Yo, { icon: i, setIcon: s, IconComponent: t, IconTypeArray: n }) }) }),
|
|
2548
2548
|
/* @__PURE__ */ r("td", { className: "align-middle", style: { width: "7em" }, children: /* @__PURE__ */ g("div", { className: "d-flex gap-2 align-items-center justify-content-end", children: [
|
|
2549
|
-
u && /* @__PURE__ */ g(
|
|
2549
|
+
u && /* @__PURE__ */ g(X, { children: [
|
|
2550
2550
|
/* @__PURE__ */ r(J, { onClick: m, color: "secondary", className: "d-inline", children: /* @__PURE__ */ r(l, { icon: "cancel" }) }),
|
|
2551
2551
|
/* @__PURE__ */ r(J, { onClick: f, color: "success", className: "d-inline", children: /* @__PURE__ */ r(l, { icon: "check" }) })
|
|
2552
2552
|
] }),
|
|
@@ -2557,7 +2557,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2557
2557
|
const l = D(() => {
|
|
2558
2558
|
o(e.id);
|
|
2559
2559
|
}, [o, e.id]);
|
|
2560
|
-
return /* @__PURE__ */ r("tr", { className: "mb-3", children: /* @__PURE__ */ g(
|
|
2560
|
+
return /* @__PURE__ */ r("tr", { className: "mb-3", children: /* @__PURE__ */ g(X, { children: [
|
|
2561
2561
|
/* @__PURE__ */ r("td", { className: "align-middle", children: e.url.length <= 23 ? /* @__PURE__ */ r($, { variant: "body2", children: e.url }) : /* @__PURE__ */ r($e, { placement: "bottom", text: e.url, children: /* @__PURE__ */ g($, { variant: "body2", children: [
|
|
2562
2562
|
e.url.slice(0, 21),
|
|
2563
2563
|
"..."
|
|
@@ -2565,8 +2565,8 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2565
2565
|
/* @__PURE__ */ r(Lc, { shortcutLink: e, IconComponent: t, IconTypeArray: n, editShortcutLink: a, deleteLocation: l })
|
|
2566
2566
|
] }) });
|
|
2567
2567
|
}, Vh = ({ IconComponent: e, IconTypeArray: t }) => {
|
|
2568
|
-
const { texts: n } =
|
|
2569
|
-
return /* @__PURE__ */ r(
|
|
2568
|
+
const { texts: n } = P(G), { shortcutLinks: a, editShortcutLink: o, deleteShortcutLink: l } = qo();
|
|
2569
|
+
return /* @__PURE__ */ r(X, { children: a !== null && a.length > 0 ? /* @__PURE__ */ g(Ro, { size: "sm", title: n.shortcutLinks.shortcutLinksSetting, children: [
|
|
2570
2570
|
/* @__PURE__ */ r("thead", { className: "fw-bold", children: /* @__PURE__ */ g("tr", { children: [
|
|
2571
2571
|
/* @__PURE__ */ r("th", { children: /* @__PURE__ */ r($, { variant: "body2", children: n.shortcutLinks.target }) }),
|
|
2572
2572
|
/* @__PURE__ */ r("th", { children: /* @__PURE__ */ r($, { variant: "body2", children: n.shortcutLinks.name }) }),
|
|
@@ -2574,15 +2574,15 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2574
2574
|
/* @__PURE__ */ r("th", {})
|
|
2575
2575
|
] }) }),
|
|
2576
2576
|
/* @__PURE__ */ r("tbody", { children: a == null ? void 0 : a.map((i) => /* @__PURE__ */ r(Ac, { shortcutLink: i, IconComponent: e, IconTypeArray: t, editShortcutLink: o, deleteShortcutLink: l }, i.id)) })
|
|
2577
|
-
] }) : /* @__PURE__ */ r(
|
|
2577
|
+
] }) : /* @__PURE__ */ r(He, { variant: "info", size: "sm", children: n.shortcutLinks.addLinksToEditThemHereInfo }) });
|
|
2578
2578
|
}, fr = 5, Rc = "_linkButton_pnlvi_1", jc = "_linkAddButton_pnlvi_31", Mc = "_createLinkRow_pnlvi_39", Pt = {
|
|
2579
2579
|
linkButton: Rc,
|
|
2580
2580
|
linkAddButton: jc,
|
|
2581
2581
|
createLinkRow: Mc
|
|
2582
2582
|
}, Pc = ({ shortcutLink: e, IconComponent: t }) => /* @__PURE__ */ r($e, { text: e.name, placement: "bottom", children: /* @__PURE__ */ r(Oe, { to: e.url, className: Pt.linkButton, children: /* @__PURE__ */ r(t, { icon: e.icon }) }) }), Fc = ({ closeModal: e, isOpen: t, createLink: n, pageTitlePrefix: a, IconComponent: o, IconTypeArray: l }) => {
|
|
2583
|
-
const i = Vl(), { texts: s } =
|
|
2583
|
+
const i = Vl(), { texts: s } = P(G), [c, d] = L("star-outline"), [u, m] = L(a ? document.title.replace(a, "") : document.title), f = D(async () => {
|
|
2584
2584
|
await n({ icon: c, name: u, url: i.pathname + i.search }), e();
|
|
2585
|
-
}, [e, n, c, i.pathname, i.search, u]), p =
|
|
2585
|
+
}, [e, n, c, i.pathname, i.search, u]), p = R(() => i.pathname + i.search, [i.pathname, i.search]);
|
|
2586
2586
|
return /* @__PURE__ */ r(re, { show: t, onHide: e, size: "sm", children: /* @__PURE__ */ g("div", { onKeyDown: (h) => {
|
|
2587
2587
|
h.code !== "Escape" && h.stopPropagation();
|
|
2588
2588
|
}, children: [
|
|
@@ -2597,29 +2597,29 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2597
2597
|
] }),
|
|
2598
2598
|
/* @__PURE__ */ g("div", { className: Pt.createLinkRow, children: [
|
|
2599
2599
|
/* @__PURE__ */ r($, { variant: "form-label", className: "pe-3 text-end", children: s.shortcutLinks.name }),
|
|
2600
|
-
/* @__PURE__ */ r("div", { className: "d-flex align-items-middle fw-bold", children: /* @__PURE__ */ r(
|
|
2600
|
+
/* @__PURE__ */ r("div", { className: "d-flex align-items-middle fw-bold", children: /* @__PURE__ */ r(ze, { type: "text", maxLength: 25, value: u, onChange: m, className: "w-100", InputContainer: Se, withoutLabel: !0 }) })
|
|
2601
2601
|
] }),
|
|
2602
2602
|
/* @__PURE__ */ g("div", { className: Pt.createLinkRow, children: [
|
|
2603
2603
|
/* @__PURE__ */ r($, { variant: "form-label", className: "pe-3 text-end", children: s.shortcutLinks.icon }),
|
|
2604
2604
|
/* @__PURE__ */ r("div", { className: "d-flex align-items-middle fw-bold", children: /* @__PURE__ */ r(Yo, { icon: c, setIcon: d, IconComponent: o, IconTypeArray: l }) })
|
|
2605
2605
|
] })
|
|
2606
2606
|
] }),
|
|
2607
|
-
/* @__PURE__ */ r(re.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ r(
|
|
2607
|
+
/* @__PURE__ */ r(re.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ r(Qe, { onClick: f, children: s.shortcutLinks.addShortcut }) })
|
|
2608
2608
|
] }) });
|
|
2609
2609
|
}, Bc = ({ IconComponent: e, IconTypeArray: t, pageTitlePrefix: n, createLink: a }) => {
|
|
2610
|
-
const { ProjectIconComponent: o, texts: l } =
|
|
2611
|
-
return /* @__PURE__ */ g(
|
|
2610
|
+
const { ProjectIconComponent: o, texts: l } = P(G), [i, s] = L(!1), [c] = kr(i, 100);
|
|
2611
|
+
return /* @__PURE__ */ g(X, { children: [
|
|
2612
2612
|
/* @__PURE__ */ r($e, { text: l.shortcutLinks.addShortcut, placement: "bottom", children: /* @__PURE__ */ r("button", { type: "button", className: I(Pt.linkButton, Pt.linkAddButton), onClick: () => s(!0), children: /* @__PURE__ */ r(o, { icon: "add" }) }) }),
|
|
2613
2613
|
(i || c) && /* @__PURE__ */ r(Fc, { IconComponent: e, IconTypeArray: t, closeModal: () => s(!1), createLink: a, isOpen: i, pageTitlePrefix: n })
|
|
2614
2614
|
] });
|
|
2615
2615
|
}, Uh = ({ IconComponent: e, IconTypeArray: t, pageTitlePrefix: n }) => {
|
|
2616
|
-
const { shortcutLinks: a, createShortcutLink: o } = qo(), l =
|
|
2617
|
-
return /* @__PURE__ */ r(
|
|
2616
|
+
const { shortcutLinks: a, createShortcutLink: o } = qo(), l = R(() => a !== null && a.length < fr, [a]);
|
|
2617
|
+
return /* @__PURE__ */ r(X, { children: /* @__PURE__ */ g("div", { className: "d-flex gap-2", children: [
|
|
2618
2618
|
a == null ? void 0 : a.slice(0, fr).map((i, s) => i !== null ? /* @__PURE__ */ r(Pc, { shortcutLink: i, IconComponent: e }, s) : null),
|
|
2619
2619
|
l && /* @__PURE__ */ r(Bc, { IconComponent: e, IconTypeArray: t, pageTitlePrefix: n, createLink: o })
|
|
2620
2620
|
] }) });
|
|
2621
2621
|
}, zc = (e) => {
|
|
2622
|
-
const t = je(), { startLoading: n, stopLoading: a } =
|
|
2622
|
+
const t = je(), { startLoading: n, stopLoading: a } = P(Je), o = D(async (s) => {
|
|
2623
2623
|
n("submit-createShortcutLink");
|
|
2624
2624
|
try {
|
|
2625
2625
|
await t.post(`/dynamicForms/insert?referenceId=${e}`, s);
|
|
@@ -2651,7 +2651,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2651
2651
|
throw new Error("Tried to make operation on null shortcutLinks.");
|
|
2652
2652
|
return e;
|
|
2653
2653
|
}, Wh = ({ children: e, referenceId: t }) => {
|
|
2654
|
-
const { user: n } =
|
|
2654
|
+
const { user: n } = P(gt), a = D((p) => p.map((h) => ({ id: h.id, icon: h.icon, name: h.name, url: h.url })), []), { data: o, reloadData: l } = _e(`/dynamicForms/lookup-data-all?referenceId=${t}&employee=${n == null ? void 0 : n.personalNumber}`, {
|
|
2655
2655
|
silent: !0,
|
|
2656
2656
|
dataTransformer: a,
|
|
2657
2657
|
enabled: n !== null
|
|
@@ -2665,7 +2665,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2665
2665
|
await s({ ...p, employee: h.personalNumber }), await l();
|
|
2666
2666
|
}, [l, s, n]), m = D(async (p) => {
|
|
2667
2667
|
await c(p), await l();
|
|
2668
|
-
}, [l, c]), f =
|
|
2668
|
+
}, [l, c]), f = R(() => ({
|
|
2669
2669
|
shortcutLinks: o,
|
|
2670
2670
|
createShortcutLink: d,
|
|
2671
2671
|
editShortcutLink: u,
|
|
@@ -2673,19 +2673,19 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2673
2673
|
}), [d, m, u, o]);
|
|
2674
2674
|
return /* @__PURE__ */ r(oo.Provider, { value: f, children: e });
|
|
2675
2675
|
}, Vc = ({ targets: e, removeNotifTarget: t }) => {
|
|
2676
|
-
const { ProjectIconComponent: n } =
|
|
2677
|
-
return /* @__PURE__ */ r(
|
|
2678
|
-
/* @__PURE__ */ r("div", { className: "text-secondary", children: /* @__PURE__ */ r("span", { className: "d-flex gap-2 ", children: a.employeeId && a.roleName === null ? /* @__PURE__ */ g(
|
|
2676
|
+
const { ProjectIconComponent: n } = P(G);
|
|
2677
|
+
return /* @__PURE__ */ r(X, { children: e && e.sort((a, o) => (a.employeeId ?? 0) - (o.employeeId ?? 0)).map((a) => /* @__PURE__ */ g("div", { className: "d-flex gap-2 align-items-center justify-content-between mb-1", children: [
|
|
2678
|
+
/* @__PURE__ */ r("div", { className: "text-secondary", children: /* @__PURE__ */ r("span", { className: "d-flex gap-2 ", children: a.employeeId && a.roleName === null ? /* @__PURE__ */ g(X, { children: [
|
|
2679
2679
|
/* @__PURE__ */ r(n, { icon: "user" }),
|
|
2680
2680
|
/* @__PURE__ */ r($, { variant: "subtitle", children: a.employeeName })
|
|
2681
|
-
] }) : /* @__PURE__ */ g(
|
|
2681
|
+
] }) : /* @__PURE__ */ g(X, { children: [
|
|
2682
2682
|
/* @__PURE__ */ r(n, { icon: "role" }),
|
|
2683
2683
|
/* @__PURE__ */ r($, { variant: "subtitle", children: a.roleName })
|
|
2684
2684
|
] }) }) }),
|
|
2685
2685
|
/* @__PURE__ */ r(J, { size: "sm", color: "danger", onClick: () => t(a.id), children: /* @__PURE__ */ r(n, { icon: "delete" }) })
|
|
2686
2686
|
] }, a.id)) });
|
|
2687
2687
|
}, Uc = ({ show: e, onHide: t, roles: n, onAddTarget: a, EmployeePicker: o, templateId: l }) => {
|
|
2688
|
-
const { texts: { notifCentrum: i } } =
|
|
2688
|
+
const { texts: { notifCentrum: i } } = P(G), [s, c] = L(null), [d, u] = L(null), [m, f] = L("R"), p = D(() => {
|
|
2689
2689
|
c(null), u(null), t();
|
|
2690
2690
|
}, [t]);
|
|
2691
2691
|
return /* @__PURE__ */ g(re, { show: e, onHide: () => p(), children: [
|
|
@@ -2695,9 +2695,9 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2695
2695
|
{ id: "E", name: i.employee },
|
|
2696
2696
|
{ id: "R", name: i.role }
|
|
2697
2697
|
], value: m, onChange: (h) => f(h), InputContainer: Se }),
|
|
2698
|
-
m === "E" ? /* @__PURE__ */ r(o, { InputContainer: Se, label: i.employee, value: { id: (s == null ? void 0 : s.id) ?? null, name: (s == null ? void 0 : s.name) ?? "" }, onSelect: (h) => c({ id: Number(h == null ? void 0 : h.id) ?? null, name: (h == null ? void 0 : h.name) ?? "" }) }) : /* @__PURE__ */ r(
|
|
2698
|
+
m === "E" ? /* @__PURE__ */ r(o, { InputContainer: Se, label: i.employee, value: { id: (s == null ? void 0 : s.id) ?? null, name: (s == null ? void 0 : s.name) ?? "" }, onSelect: (h) => c({ id: Number(h == null ? void 0 : h.id) ?? null, name: (h == null ? void 0 : h.name) ?? "" }) }) : /* @__PURE__ */ r(Ke, { InputContainer: Se, label: i.role, options: n.map((h) => ({ id: h, name: h })), value: d, onChange: (h) => u((h == null ? void 0 : h.toString()) ?? "") })
|
|
2699
2699
|
] }),
|
|
2700
|
-
/* @__PURE__ */ r(re.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ r(
|
|
2700
|
+
/* @__PURE__ */ r(re.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ r(Qe, { onClick: () => {
|
|
2701
2701
|
a({
|
|
2702
2702
|
templateId: l ?? 0,
|
|
2703
2703
|
targetId: null,
|
|
@@ -2707,26 +2707,26 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2707
2707
|
}, children: i.add }) })
|
|
2708
2708
|
] });
|
|
2709
2709
|
}, Wc = ({ templates: e, selectedTemplateId: t, setSelectedTemplateId: n, roles: a, onAddNotifTarget: o, onRemoveNotifTarget: l, EmployeePicker: i }) => {
|
|
2710
|
-
const { texts: { notifCentrum: s }, ProjectIconComponent: c } =
|
|
2711
|
-
return /* @__PURE__ */ g(
|
|
2710
|
+
const { texts: { notifCentrum: s }, ProjectIconComponent: c } = P(G), [d, u] = L(!1);
|
|
2711
|
+
return /* @__PURE__ */ g(X, { children: [
|
|
2712
2712
|
/* @__PURE__ */ r(nn, { className: "overflow-auto h-max-100 p-2", children: e.map((m) => /* @__PURE__ */ g(nn.Item, { action: t !== m.id, className: `p-0 mb-2 border rounded shadow-sm ${t === m.id ? "border-1 border-primary" : ""}`, onClick: () => n(m.id), children: [
|
|
2713
2713
|
/* @__PURE__ */ g("div", { className: "d-flex gap-2 justify-content-between align-items-center border-1 border-bottom border-primary p-2", children: [
|
|
2714
2714
|
/* @__PURE__ */ r("div", { className: "text-primary", children: m.destinationId === 1 ? /* @__PURE__ */ r(c, { icon: "mail-envelope" }) : /* @__PURE__ */ r(c, { icon: "dashboard" }) }),
|
|
2715
2715
|
/* @__PURE__ */ r($, { className: "text-truncate text-primary", variant: "subtitle", children: m.subjectTemplate }),
|
|
2716
2716
|
/* @__PURE__ */ r(J, { size: "sm", onClick: () => u(!0), children: /* @__PURE__ */ r(c, { icon: "add" }) })
|
|
2717
2717
|
] }),
|
|
2718
|
-
/* @__PURE__ */ r("div", { className: "my-2 ps-3 pe-2", children: m.targets.length > 0 ? /* @__PURE__ */ r(Vc, { targets: m.targets, removeNotifTarget: l }) : /* @__PURE__ */ r(
|
|
2718
|
+
/* @__PURE__ */ r("div", { className: "my-2 ps-3 pe-2", children: m.targets.length > 0 ? /* @__PURE__ */ r(Vc, { targets: m.targets, removeNotifTarget: l }) : /* @__PURE__ */ r(He, { size: "sm", variant: "warning", children: s.noTargets }) })
|
|
2719
2719
|
] }, m.id)) }),
|
|
2720
2720
|
/* @__PURE__ */ r(Uc, { show: d, onHide: () => u(!1), roles: a ?? [], onAddTarget: o, EmployeePicker: i, templateId: t })
|
|
2721
2721
|
] });
|
|
2722
2722
|
}, Gc = ({ data: e, onClick: t, BnfTableComponent: n }) => {
|
|
2723
|
-
const { texts: { notifCentrum: a } } =
|
|
2723
|
+
const { texts: { notifCentrum: a } } = P(G), o = R(() => e == null ? void 0 : e.map((c) => {
|
|
2724
2724
|
var d;
|
|
2725
2725
|
return {
|
|
2726
2726
|
...c,
|
|
2727
2727
|
recipientsString: ((d = c.recipients) == null ? void 0 : d.map((u) => u.name).join(", ")) ?? ""
|
|
2728
2728
|
};
|
|
2729
|
-
}), [e]), l = mn(), i =
|
|
2729
|
+
}), [e]), l = mn(), i = R(() => [
|
|
2730
2730
|
l.accessor("date", {
|
|
2731
2731
|
header: a.date,
|
|
2732
2732
|
type: "date"
|
|
@@ -2754,94 +2754,94 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2754
2754
|
}, [t]);
|
|
2755
2755
|
return /* @__PURE__ */ r(n, { columns: i, data: o, onRowClick: s });
|
|
2756
2756
|
}, Yc = ({ show: e, onHide: t, template: n, onEdit: a }) => {
|
|
2757
|
-
const { texts: { notifCentrum: o } } =
|
|
2757
|
+
const { texts: { notifCentrum: o } } = P(G), [l, i] = L(null), [s, c] = L(null);
|
|
2758
2758
|
U(() => {
|
|
2759
2759
|
n && (i(n.subjectTemplate), c(n.textTemplate));
|
|
2760
2760
|
}, [n]);
|
|
2761
2761
|
const d = D(() => {
|
|
2762
2762
|
!l || !s || (a(l, s), t());
|
|
2763
2763
|
}, [s, a, t, l]);
|
|
2764
|
-
return /* @__PURE__ */ r(
|
|
2764
|
+
return /* @__PURE__ */ r(X, { children: n && /* @__PURE__ */ g(re, { show: e, onHide: t, size: "lg", scrollable: !0, children: [
|
|
2765
2765
|
/* @__PURE__ */ r(re.Header, { children: /* @__PURE__ */ r(re.Title, { children: o.editTemplate }) }),
|
|
2766
2766
|
/* @__PURE__ */ g(re.Body, { style: { minHeight: "50vh" }, children: [
|
|
2767
|
-
/* @__PURE__ */ g(
|
|
2768
|
-
/* @__PURE__ */ r(
|
|
2769
|
-
/* @__PURE__ */ r(
|
|
2767
|
+
/* @__PURE__ */ g(le.Group, { controlId: "subject", children: [
|
|
2768
|
+
/* @__PURE__ */ r(le.Label, { children: /* @__PURE__ */ r($, { variant: "form-label", className: "text-primary", children: o.subject }) }),
|
|
2769
|
+
/* @__PURE__ */ r(le.Control, { value: l ?? "", onChange: (u) => i(u.target.value) })
|
|
2770
2770
|
] }),
|
|
2771
|
-
/* @__PURE__ */ g(
|
|
2772
|
-
/* @__PURE__ */ r(
|
|
2773
|
-
/* @__PURE__ */ r(
|
|
2771
|
+
/* @__PURE__ */ g(le.Group, { controlId: "text", children: [
|
|
2772
|
+
/* @__PURE__ */ r(le.Label, { children: /* @__PURE__ */ r($, { variant: "form-label", className: "text-primary", children: o.text }) }),
|
|
2773
|
+
/* @__PURE__ */ r(le.Control, { as: "textarea", rows: 10, value: s ?? "", onChange: (u) => c(u.target.value), style: {
|
|
2774
2774
|
resize: "vertical",
|
|
2775
2775
|
minHeight: "400px"
|
|
2776
2776
|
} })
|
|
2777
2777
|
] })
|
|
2778
2778
|
] }),
|
|
2779
|
-
/* @__PURE__ */ r(re.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ r(
|
|
2779
|
+
/* @__PURE__ */ r(re.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ r(Qe, { onClick: () => {
|
|
2780
2780
|
console.log(l), console.log(s), d();
|
|
2781
2781
|
}, children: o.save }) })
|
|
2782
2782
|
] }) });
|
|
2783
2783
|
}, Gh = ({ kinds: e, reloadActions: t, reloadHistory: n, reloadRoles: a, onRemoveTarget: o, onPostTarget: l, onTemplateEdit: i, EmployeePicker: s, BnfTableComponent: c }) => {
|
|
2784
|
-
var
|
|
2785
|
-
const { texts: { notifCentrum: d }, ProjectIconComponent: u } =
|
|
2784
|
+
var H, z;
|
|
2785
|
+
const { texts: { notifCentrum: d }, ProjectIconComponent: u } = P(G), { confirm: m } = it(), [f, p] = L(null), [h, w] = L(null), [v, b] = L(!1), [x, C] = an("notif-kind-id", null);
|
|
2786
2786
|
U(() => {
|
|
2787
|
-
var
|
|
2788
|
-
e.length > 0 ? C(((
|
|
2787
|
+
var A;
|
|
2788
|
+
e.length > 0 ? C(((A = e.at(0)) == null ? void 0 : A.id) ?? null) : C(null);
|
|
2789
2789
|
}, [e, C]);
|
|
2790
2790
|
const [N, y] = L([]);
|
|
2791
2791
|
U(() => {
|
|
2792
|
-
x && t(x).then((
|
|
2793
|
-
y(
|
|
2794
|
-
}).catch((
|
|
2795
|
-
console.log(
|
|
2792
|
+
x && t(x).then((A) => {
|
|
2793
|
+
y(A);
|
|
2794
|
+
}).catch((A) => {
|
|
2795
|
+
console.log(A), y([]);
|
|
2796
2796
|
});
|
|
2797
2797
|
}, [t, x]);
|
|
2798
|
-
const [S, _] = an("notif-action-id", ((
|
|
2798
|
+
const [S, _] = an("notif-action-id", ((H = N == null ? void 0 : N.at(0)) == null ? void 0 : H.id) ?? null), [k, j] = L([]);
|
|
2799
2799
|
U(() => {
|
|
2800
|
-
S === null || f === null || n(S, f).then((
|
|
2801
|
-
A
|
|
2802
|
-
}).catch((
|
|
2803
|
-
console.log(
|
|
2800
|
+
S === null || f === null || n(S, f).then((A) => {
|
|
2801
|
+
j(A);
|
|
2802
|
+
}).catch((A) => {
|
|
2803
|
+
console.log(A), j([]);
|
|
2804
2804
|
});
|
|
2805
2805
|
}, [t, n, S, x, f]);
|
|
2806
2806
|
const [T, M] = L([]);
|
|
2807
2807
|
U(() => {
|
|
2808
|
-
S !== null && a(S).then((
|
|
2809
|
-
M(
|
|
2810
|
-
}).catch((
|
|
2811
|
-
console.log(
|
|
2808
|
+
S !== null && a(S).then((A) => {
|
|
2809
|
+
M(A);
|
|
2810
|
+
}).catch((A) => {
|
|
2811
|
+
console.log(A), M([]);
|
|
2812
2812
|
});
|
|
2813
2813
|
}, [a, S]);
|
|
2814
|
-
const
|
|
2815
|
-
var
|
|
2816
|
-
return !N || !S ? [] : ((
|
|
2817
|
-
}, [N, S]),
|
|
2818
|
-
l(
|
|
2814
|
+
const F = R(() => {
|
|
2815
|
+
var A;
|
|
2816
|
+
return !N || !S ? [] : ((A = N.find((V) => V.id === S)) == null ? void 0 : A.templates) ?? [];
|
|
2817
|
+
}, [N, S]), E = D((A, V) => {
|
|
2818
|
+
l(A, V).then((B) => {
|
|
2819
2819
|
y(N ? [
|
|
2820
|
-
...N.map((
|
|
2821
|
-
...
|
|
2820
|
+
...N.map((Y) => Y.id !== S ? Y : {
|
|
2821
|
+
...Y,
|
|
2822
2822
|
templates: [
|
|
2823
|
-
...
|
|
2823
|
+
...Y.templates.map((ee) => ee.id !== f ? ee : { ...ee, targets: [...ee.targets, B] })
|
|
2824
2824
|
]
|
|
2825
2825
|
})
|
|
2826
2826
|
] : []);
|
|
2827
|
-
}).catch((
|
|
2828
|
-
}, [N, l, S, f, y]),
|
|
2829
|
-
f && i(f,
|
|
2827
|
+
}).catch((B) => console.log(B));
|
|
2828
|
+
}, [N, l, S, f, y]), O = D((A, V) => {
|
|
2829
|
+
f && i(f, A, V).then(() => {
|
|
2830
2830
|
y(N ? [
|
|
2831
|
-
...N.map((
|
|
2832
|
-
...
|
|
2831
|
+
...N.map((B) => B.id !== S ? B : {
|
|
2832
|
+
...B,
|
|
2833
2833
|
templates: [
|
|
2834
|
-
...
|
|
2834
|
+
...B.templates.map((Y) => Y.id !== f ? Y : { ...Y, subjectTemplate: A, textTemplate: V })
|
|
2835
2835
|
]
|
|
2836
2836
|
})
|
|
2837
2837
|
] : []);
|
|
2838
|
-
}).catch((
|
|
2839
|
-
}, [N, i, S, f]),
|
|
2840
|
-
await m(d.confirmTargetDelete) && o(
|
|
2841
|
-
...N.map((
|
|
2842
|
-
...
|
|
2838
|
+
}).catch((B) => console.log(B));
|
|
2839
|
+
}, [N, i, S, f]), Z = D(async (A) => {
|
|
2840
|
+
await m(d.confirmTargetDelete) && o(A).then(() => y(N ? [
|
|
2841
|
+
...N.map((V) => V.id !== S ? V : {
|
|
2842
|
+
...V,
|
|
2843
2843
|
templates: [
|
|
2844
|
-
...
|
|
2844
|
+
...V.templates.map((B) => B.id !== f ? B : { ...B, targets: B.targets.filter((Y) => Y.id !== A) })
|
|
2845
2845
|
]
|
|
2846
2846
|
})
|
|
2847
2847
|
] : []));
|
|
@@ -2849,22 +2849,22 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2849
2849
|
return /* @__PURE__ */ g("div", { className: "h-100 overflow-hidden", children: [
|
|
2850
2850
|
/* @__PURE__ */ g("div", { className: "d-flex justify-content-between align-items-center", children: [
|
|
2851
2851
|
/* @__PURE__ */ g("div", { className: "row w-100", children: [
|
|
2852
|
-
/* @__PURE__ */ r("div", { className: "col-2", children: /* @__PURE__ */ r(
|
|
2853
|
-
/* @__PURE__ */ r("div", { className: "col-3", children: /* @__PURE__ */ r(
|
|
2852
|
+
/* @__PURE__ */ r("div", { className: "col-2", children: /* @__PURE__ */ r(Ke, { label: d.kind, size: "sm", noEmptyOption: !0, options: (e == null ? void 0 : e.map((A) => ({ id: A.id, name: A.name }))) ?? [], value: x ?? null, onChange: (A) => C(Number(A)), dropdownWidth: 200 }) }),
|
|
2853
|
+
/* @__PURE__ */ r("div", { className: "col-3", children: /* @__PURE__ */ r(Ke, { label: d.subkind, size: "sm", noEmptyOption: !0, options: (N == null ? void 0 : N.map((A) => ({ id: A.id, name: A.name }))) ?? [], value: S ?? null, onChange: (A) => _(Number(A)), dropdownWidth: 250 }) })
|
|
2854
2854
|
] }),
|
|
2855
2855
|
/* @__PURE__ */ r(Ir, { children: /* @__PURE__ */ r(Dn, { hideOn: "always", cKey: "template-edit", onClick: () => b(!0), disabled: f === null, icon: /* @__PURE__ */ r(u, { icon: "edit" }), children: d.editTemplate }) })
|
|
2856
2856
|
] }),
|
|
2857
2857
|
/* @__PURE__ */ g("div", { className: "vh-100 overflow-hidden d-flex gap-1", children: [
|
|
2858
|
-
/* @__PURE__ */ r("div", { className: "h-75 w-25 overflow-hidden", children: /* @__PURE__ */ r(Wc, { templates:
|
|
2859
|
-
p(
|
|
2858
|
+
/* @__PURE__ */ r("div", { className: "h-75 w-25 overflow-hidden", children: /* @__PURE__ */ r(Wc, { templates: F, roles: T ?? [], onAddNotifTarget: E, onRemoveNotifTarget: Z, selectedTemplateId: f, setSelectedTemplateId: (A) => {
|
|
2859
|
+
p(A), w(null);
|
|
2860
2860
|
}, EmployeePicker: s }) }),
|
|
2861
|
-
/* @__PURE__ */ r("div", { className: "w-25 h-75 overflow-hidden", children: f && /* @__PURE__ */ r(Gc, { data: k ?? [], onClick: (
|
|
2862
|
-
f && /* @__PURE__ */ r("div", { className: "h-75 w-75 overflow-hidden bg-darker", children: /* @__PURE__ */ r("iframe", { title: "notification", className: "w-100 h-100", srcDoc: (h == null ? void 0 : h.message) ?? ((
|
|
2861
|
+
/* @__PURE__ */ r("div", { className: "w-25 h-75 overflow-hidden", children: f && /* @__PURE__ */ r(Gc, { data: k ?? [], onClick: (A) => w((k == null ? void 0 : k.find((V) => V.id === A)) ?? null), BnfTableComponent: c }) }),
|
|
2862
|
+
f && /* @__PURE__ */ r("div", { className: "h-75 w-75 overflow-hidden bg-darker", children: /* @__PURE__ */ r("iframe", { title: "notification", className: "w-100 h-100", srcDoc: (h == null ? void 0 : h.message) ?? ((z = F.find((A) => A.id === f)) == null ? void 0 : z.textTemplate) }) })
|
|
2863
2863
|
] }),
|
|
2864
|
-
/* @__PURE__ */ r(Yc, { show: v, onHide: () => b(!1), template:
|
|
2864
|
+
/* @__PURE__ */ r(Yc, { show: v, onHide: () => b(!1), template: F.find((A) => A.id === f) ?? null, onEdit: O })
|
|
2865
2865
|
] });
|
|
2866
2866
|
}, qc = ({ history: e, onClick: t, BnfTableComponent: n }) => {
|
|
2867
|
-
const { texts: { notifCentrum: a } } =
|
|
2867
|
+
const { texts: { notifCentrum: a } } = P(G), o = mn(), l = R(() => [
|
|
2868
2868
|
o.accessor("id", {
|
|
2869
2869
|
header: "notificationHistory.id",
|
|
2870
2870
|
type: "number",
|
|
@@ -2934,7 +2934,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2934
2934
|
}, [t]);
|
|
2935
2935
|
return /* @__PURE__ */ r(n, { columns: l, data: e, pagination: { mode: "enabled" }, fullScreen: { enabled: !1 }, onRowClick: i });
|
|
2936
2936
|
}, Yh = ({ reloadUserHistory: e, EmployeePicker: t, BnfTableComponent: n }) => {
|
|
2937
|
-
const { texts: { notifCentrum: a } } =
|
|
2937
|
+
const { texts: { notifCentrum: a } } = P(G), [o, l] = L(null), [i, s] = an("notif-user", null), [c, d] = L([]);
|
|
2938
2938
|
return U(() => {
|
|
2939
2939
|
i !== null && e(i.id).then((u) => {
|
|
2940
2940
|
d(u);
|
|
@@ -2950,7 +2950,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2950
2950
|
] });
|
|
2951
2951
|
}, Kc = ({ result: e, onClose: t, tableIdentifier: n, BnfTableComponent: a }) => {
|
|
2952
2952
|
var c, d, u, m, f;
|
|
2953
|
-
const { texts: { imports: o }, ProjectIconComponent: l } =
|
|
2953
|
+
const { texts: { imports: o }, ProjectIconComponent: l } = P(G), i = mn(), s = R(() => [
|
|
2954
2954
|
i.accessor("row", {
|
|
2955
2955
|
header: o.row,
|
|
2956
2956
|
type: "number",
|
|
@@ -2967,7 +2967,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2967
2967
|
size: 500
|
|
2968
2968
|
})
|
|
2969
2969
|
], [i, o]);
|
|
2970
|
-
return e ? /* @__PURE__ */ r(
|
|
2970
|
+
return e ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(He, { variant: e.success ? "success" : "danger", size: "sm", className: "mb-2 p-2", children: /* @__PURE__ */ g("div", { className: "d-flex gap-3 align-items-start", children: [
|
|
2971
2971
|
/* @__PURE__ */ g("div", { className: "w-100", children: [
|
|
2972
2972
|
/* @__PURE__ */ r("div", { className: "w-100 text-center", children: e.success ? o.importSuccess : o.importFailed }),
|
|
2973
2973
|
e.success && ((c = e.data) != null && c.added || (d = e.data) != null && d.updated || (u = e.data) != null && u.deleted) ? /* @__PURE__ */ r("div", { className: "d-flex justify-content-center mt-2", children: /* @__PURE__ */ g("div", { className: "list-group", children: [
|
|
@@ -2992,7 +2992,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
2992
2992
|
uploadBox: Qc,
|
|
2993
2993
|
browseBtn: Xc
|
|
2994
2994
|
}, Zc = ({ file: e, onFileChange: t, onImport: n, children: a, multiple: o, accept: l }) => {
|
|
2995
|
-
const { ProjectIconComponent: i, texts: { imports: s } } =
|
|
2995
|
+
const { ProjectIconComponent: i, texts: { imports: s } } = P(G), c = D(async (u) => {
|
|
2996
2996
|
u.length > 0 && t(o === !0 ? [...u] : u[0]);
|
|
2997
2997
|
}, [e, o, t]), d = D((u) => {
|
|
2998
2998
|
var f;
|
|
@@ -3000,12 +3000,12 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3000
3000
|
const m = (f = u.dataTransfer) == null ? void 0 : f.files;
|
|
3001
3001
|
m && (m == null ? void 0 : m.length) > 0 && c(m);
|
|
3002
3002
|
}, [c]);
|
|
3003
|
-
return /* @__PURE__ */ g(
|
|
3003
|
+
return /* @__PURE__ */ g(X, { children: [
|
|
3004
3004
|
e !== null ? /* @__PURE__ */ g("div", { className: "d-flex border rounded p-1 ps-2 bg-white justify-content-between align-items-center mb-2", children: [
|
|
3005
3005
|
/* @__PURE__ */ r($, { variant: "body", children: o ? e.map((u) => u.name).join(", ") : e.name }),
|
|
3006
3006
|
/* @__PURE__ */ g("div", { className: "d-flex align-items-center gap-3", children: [
|
|
3007
3007
|
a ?? null,
|
|
3008
|
-
/* @__PURE__ */ r(
|
|
3008
|
+
/* @__PURE__ */ r(Qe, { className: "text-nowrap", size: "sm", disabled: e === null, onClick: n, children: s.start })
|
|
3009
3009
|
] })
|
|
3010
3010
|
] }) : null,
|
|
3011
3011
|
/* @__PURE__ */ g("div", { className: I(Jn.uploadBox, { [Jn.active]: e !== null }), onDrop: d, onDragOver: (u) => u.preventDefault(), children: [
|
|
@@ -3021,13 +3021,13 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3021
3021
|
] })
|
|
3022
3022
|
] });
|
|
3023
3023
|
}, qh = ({ otherSettingId: e, languageOptions: t, tableIdentifier: n, SettingsOutlet: a, BnfTableComponent: o, importLocalization: l }) => {
|
|
3024
|
-
const { texts: { localizations: i } } =
|
|
3024
|
+
const { texts: { localizations: i } } = P(G), [s, c] = L(t[0].id), [d, u] = L(null), [m, f] = L(null), p = D(async () => {
|
|
3025
3025
|
if (d === null)
|
|
3026
3026
|
return;
|
|
3027
3027
|
const h = await l({ file: d, lang: s });
|
|
3028
3028
|
h.status === "success" && f(h.data);
|
|
3029
3029
|
}, [l, s, d]);
|
|
3030
|
-
return /* @__PURE__ */ r(a, { itemId: e, title: i.localizationImport, children: m ? /* @__PURE__ */ r(Kc, { result: m, onClose: () => f(null), BnfTableComponent: o, tableIdentifier: n }) : /* @__PURE__ */ r(Zc, { file: d, onFileChange: u, onImport: p, children: /* @__PURE__ */ r("div", { style: { minWidth: 140 }, children: /* @__PURE__ */ r(
|
|
3030
|
+
return /* @__PURE__ */ r(a, { itemId: e, title: i.localizationImport, children: m ? /* @__PURE__ */ r(Kc, { result: m, onClose: () => f(null), BnfTableComponent: o, tableIdentifier: n }) : /* @__PURE__ */ r(Zc, { file: d, onFileChange: u, onImport: p, children: /* @__PURE__ */ r("div", { style: { minWidth: 140 }, children: /* @__PURE__ */ r(Ke, { value: s, onChange: (h) => typeof h == "string" ? c(h) : null, options: t, label: i.importedLanguage }) }) }) });
|
|
3031
3031
|
}, Jc = (e, t) => {
|
|
3032
3032
|
const n = t.split(".");
|
|
3033
3033
|
let a = e;
|
|
@@ -3040,7 +3040,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3040
3040
|
a = i;
|
|
3041
3041
|
}
|
|
3042
3042
|
}, ed = ({ selLng: e, lngsData: t, localizationKey: n, reloadData: a, saveChanges: o }) => {
|
|
3043
|
-
const { ProjectIconComponent: l } =
|
|
3043
|
+
const { ProjectIconComponent: l } = P(G), i = R(() => {
|
|
3044
3044
|
const m = t.get(e);
|
|
3045
3045
|
if (m === void 0)
|
|
3046
3046
|
return "";
|
|
@@ -3048,9 +3048,9 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3048
3048
|
return m !== void 0 && f !== void 0 ? f : "";
|
|
3049
3049
|
}, [t, n, e]), [s, c] = L(i), d = D(async () => {
|
|
3050
3050
|
await o([{ fileName: e + ".json", items: [{ key: n, value: s }] }]), await a();
|
|
3051
|
-
}, [n, a, o, e, s]), u =
|
|
3051
|
+
}, [n, a, o, e, s]), u = R(() => s !== i, [i, s]);
|
|
3052
3052
|
return /* @__PURE__ */ g("div", { className: "d-flex", children: [
|
|
3053
|
-
/* @__PURE__ */ r(
|
|
3053
|
+
/* @__PURE__ */ r(ze, { label: e + n, type: "text", value: s, onChange: (m) => {
|
|
3054
3054
|
c(typeof m != "string" ? "" : m);
|
|
3055
3055
|
}, InputContainer: Se, withoutLabel: !0, className: "flex-grow-1" }),
|
|
3056
3056
|
u ? /* @__PURE__ */ g("div", { className: "d-flex align-items-center gap-1", children: [
|
|
@@ -3082,73 +3082,73 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3082
3082
|
a = i;
|
|
3083
3083
|
}
|
|
3084
3084
|
}, Kh = ({ languageOptions: e, envMode: t, getOtherSettingsUrl: n, downloadXls: a, saveChanges: o, localizationFilesOptions: l, remoteLocalesRoot: i }) => {
|
|
3085
|
-
const { texts: { localizations: s }, ProjectIconComponent: c } =
|
|
3086
|
-
f(/* @__PURE__ */ new Map()), x(
|
|
3087
|
-
}, []), N =
|
|
3085
|
+
const { texts: { localizations: s }, ProjectIconComponent: c } = P(G), [d, u] = L(1), [m, f] = L(/* @__PURE__ */ new Map()), [p, h] = L(null), [w, v] = L(""), [b, x] = L(/* @__PURE__ */ new Set()), C = D((E) => {
|
|
3086
|
+
f(/* @__PURE__ */ new Map()), x(E);
|
|
3087
|
+
}, []), N = R(() => e.filter((E) => !b.has(E.id)), [b, e]), y = R(() => {
|
|
3088
3088
|
if (m.size === 0)
|
|
3089
3089
|
return [];
|
|
3090
|
-
const
|
|
3091
|
-
if (typeof
|
|
3092
|
-
Object.entries(
|
|
3090
|
+
const E = /* @__PURE__ */ new Set(), O = (V, B = "") => {
|
|
3091
|
+
if (typeof V[1] == "object") {
|
|
3092
|
+
Object.entries(V[1]).forEach((Y) => O(Y, B + V[0] + "."));
|
|
3093
3093
|
return;
|
|
3094
3094
|
}
|
|
3095
|
-
|
|
3095
|
+
E.add(B + V[0]);
|
|
3096
3096
|
};
|
|
3097
|
-
Array.from(m).forEach((
|
|
3098
|
-
Object.entries(
|
|
3097
|
+
Array.from(m).forEach((V) => {
|
|
3098
|
+
Object.entries(V[1]).forEach((B) => O(B));
|
|
3099
3099
|
});
|
|
3100
|
-
const
|
|
3101
|
-
return ((
|
|
3102
|
-
const
|
|
3103
|
-
return
|
|
3104
|
-
}) :
|
|
3105
|
-
key:
|
|
3106
|
-
lngData: new Map(Array.from(b).map((
|
|
3107
|
-
const
|
|
3100
|
+
const Z = Array.from(E), H = l.find((V) => V.path === p);
|
|
3101
|
+
return ((H == null ? void 0 : H.type) === "report" ? Z.filter((V) => {
|
|
3102
|
+
const B = V.split(".");
|
|
3103
|
+
return B[B.length - 1] === "caption";
|
|
3104
|
+
}) : Z).map((V) => ({
|
|
3105
|
+
key: V,
|
|
3106
|
+
lngData: new Map(Array.from(b).map((B) => {
|
|
3107
|
+
const Y = m.get(B);
|
|
3108
3108
|
return [
|
|
3109
|
-
|
|
3110
|
-
(
|
|
3109
|
+
B,
|
|
3110
|
+
(Y === void 0 ? void 0 : md(Y, V)) ?? ""
|
|
3111
3111
|
];
|
|
3112
3112
|
}))
|
|
3113
3113
|
}));
|
|
3114
|
-
}, [m, l, p, b]), S =
|
|
3115
|
-
|
|
3116
|
-
}, [_]),
|
|
3114
|
+
}, [m, l, p, b]), S = R(() => y.filter((E) => Ae(E.key, w) || Array.from(E.lngData).some((O) => typeof (O == null ? void 0 : O[1]) != "string" ? !1 : Ae((O == null ? void 0 : O[1]) ?? "", w))), [w, y]), _ = R(() => Math.ceil(S.length / wn), [S.length]), k = D((E) => {
|
|
3115
|
+
E !== null && u(() => Math.max(1, Math.min(E, _)));
|
|
3116
|
+
}, [_]), j = D(async () => {
|
|
3117
3117
|
if (p === null)
|
|
3118
3118
|
return;
|
|
3119
|
-
const
|
|
3120
|
-
const
|
|
3121
|
-
`${i}${p == null ? void 0 : p.replace("{{lng}}",
|
|
3119
|
+
const E = Array.from(b).map((Z) => (async () => {
|
|
3120
|
+
const H = await Zi.get(
|
|
3121
|
+
`${i}${p == null ? void 0 : p.replace("{{lng}}", Z)}&v=${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
3122
3122
|
// &v to not hit browser cache
|
|
3123
3123
|
{ responseType: "json" }
|
|
3124
3124
|
);
|
|
3125
|
-
return [
|
|
3126
|
-
})()),
|
|
3127
|
-
f(new Map(
|
|
3125
|
+
return [Z, H.data];
|
|
3126
|
+
})()), O = await Promise.allSettled(E);
|
|
3127
|
+
f(new Map(O.map((Z) => Z.status === "fulfilled" ? Z.value : ["", {}])));
|
|
3128
3128
|
}, [i, p, b]), T = D(async () => {
|
|
3129
|
-
|
|
3130
|
-
}, [
|
|
3129
|
+
j();
|
|
3130
|
+
}, [j]), M = R(() => N.length > 0, [N.length]), F = R(() => b.size + 1 + (M ? 1 : 0), [M, b.size]);
|
|
3131
3131
|
return U(() => {
|
|
3132
3132
|
k(d);
|
|
3133
3133
|
}, [k, d, S]), U(() => {
|
|
3134
|
-
|
|
3135
|
-
}, [
|
|
3134
|
+
j();
|
|
3135
|
+
}, [j]), i === void 0 ? /* @__PURE__ */ r(at, { children: /* @__PURE__ */ g(He, { variant: "danger", className: "fw-bold", children: [
|
|
3136
3136
|
s.cantRunLocalizationSettings,
|
|
3137
3137
|
/* @__PURE__ */ r("br", {}),
|
|
3138
3138
|
/* @__PURE__ */ r("br", {}),
|
|
3139
3139
|
s.envNotConnectedToRemote(t.toUpperCase())
|
|
3140
|
-
] }) }) : /* @__PURE__ */ r(
|
|
3141
|
-
"--keys-table-columns":
|
|
3140
|
+
] }) }) : /* @__PURE__ */ r(at, { title: /* @__PURE__ */ r("div", { className: "d-flex gap-4", children: /* @__PURE__ */ r($, { variant: "h3", children: s.localizationSettings }) }), helmet: s.localizationSettings, variant: "fullScreen", children: /* @__PURE__ */ g("div", { className: Te.keysTable, style: {
|
|
3141
|
+
"--keys-table-columns": F,
|
|
3142
3142
|
"--adding-column": M ? 1 : 0
|
|
3143
3143
|
}, children: [
|
|
3144
3144
|
/* @__PURE__ */ g("div", { className: I(Te.tableFullWidth, "d-flex align-items-center justify-content-between gap-2 px-2 mt-1"), children: [
|
|
3145
|
-
/* @__PURE__ */ r(
|
|
3146
|
-
id:
|
|
3147
|
-
name:
|
|
3148
|
-
})), value: p, onChange: (
|
|
3145
|
+
/* @__PURE__ */ r(Ke, { options: l.map((E) => ({
|
|
3146
|
+
id: E.path,
|
|
3147
|
+
name: E.nameTranslationKey
|
|
3148
|
+
})), value: p, onChange: (E) => typeof E != "number" ? h(E) : null, size: "sm", label: s.localizationFile, className: Te.fileSelect, noSortOptions: !0 }),
|
|
3149
3149
|
/* @__PURE__ */ g("div", { className: I(Te.searchBox, "d-flex align-items-center gap-2 border rounded"), children: [
|
|
3150
3150
|
/* @__PURE__ */ r(c, { icon: "search", className: "text-muted", size: 18, iconProps: { className: "mt- me-n4" } }),
|
|
3151
|
-
/* @__PURE__ */ r(
|
|
3151
|
+
/* @__PURE__ */ r(ze, { type: "text", value: w, onChange: (E) => v(typeof E == "string" ? E : ""), size: "sm", showClearIcon: w !== "", withoutLabel: !0, placeholder: "vyhledávat...", className: "placeholder-muted bg-transparent border-0 my-0 py-0 w-100" })
|
|
3152
3152
|
] }),
|
|
3153
3153
|
/* @__PURE__ */ g(Ir, { children: [
|
|
3154
3154
|
/* @__PURE__ */ r(Dn, { cKey: "export", hideOn: "always", onClick: a, icon: /* @__PURE__ */ r(Ji, { fileExtension: "xls" }), children: s.xlsExport }),
|
|
@@ -3157,15 +3157,15 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3157
3157
|
] }),
|
|
3158
3158
|
/* @__PURE__ */ g("div", { className: I(Te.subgrid, Te.lngSelectRow), children: [
|
|
3159
3159
|
/* @__PURE__ */ r($, { variant: "body", children: s.key }),
|
|
3160
|
-
Array.from(b).map((
|
|
3161
|
-
M ? /* @__PURE__ */ r(
|
|
3160
|
+
Array.from(b).map((E, O) => /* @__PURE__ */ r(Ke, { options: e.filter((Z) => Z.id === E || !b.has(Z.id)), value: E, onChange: (Z) => C((H) => Z === null ? (H.delete(E), new Set(H)) : (typeof Z == "string" && (H.delete(E), H.add(Z)), new Set(H))), size: "sm", label: `${s.language} ${O + 1}`, withoutLabel: !0, InputContainer: Se, className: I(Te.lngSelect) }, E)),
|
|
3161
|
+
M ? /* @__PURE__ */ r(Ke, { options: N, value: null, onChange: (E) => C((O) => (typeof E == "string" && O.add(E), new Set(O))), size: "sm", label: s.addLanguage, InputContainer: Se, className: I(Te.lngSelect, Te.addLng) }) : null
|
|
3162
3162
|
] }),
|
|
3163
3163
|
/* @__PURE__ */ g("div", { className: I(Te.subgrid, Te.tableBody), children: [
|
|
3164
|
-
y.length === 0 || S.length === 0 ? /* @__PURE__ */ r(
|
|
3165
|
-
S.slice(wn * (d - 1), wn * d).map((
|
|
3166
|
-
/* @__PURE__ */ r($, { variant: "form-label", children:
|
|
3167
|
-
Array.from(b).map((
|
|
3168
|
-
] },
|
|
3164
|
+
y.length === 0 || S.length === 0 ? /* @__PURE__ */ r(He, { variant: "warning", className: I(Te.tableFullWidth, Te.emptyTableAlert, "my-n1"), children: y.length === 0 ? s.noDataLoaded : S.length === 0 ? s.noDataFiltered : null }) : null,
|
|
3165
|
+
S.slice(wn * (d - 1), wn * d).map((E) => /* @__PURE__ */ g("div", { className: I(Te.subgrid, Te.tableItem), children: [
|
|
3166
|
+
/* @__PURE__ */ r($, { variant: "form-label", children: E.key }),
|
|
3167
|
+
Array.from(b).map((O) => /* @__PURE__ */ r(ed, { localizationKey: E.key, lngsData: m, selLng: O, reloadData: T, saveChanges: o }, O))
|
|
3168
|
+
] }, E.key))
|
|
3169
3169
|
] }),
|
|
3170
3170
|
/* @__PURE__ */ g("div", { className: I("d-flex align-items-center justify-content-around gap-3 px-2 py-0", Te.tableFooter), children: [
|
|
3171
3171
|
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ g($, { variant: "body", children: [
|
|
@@ -3213,7 +3213,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3213
3213
|
}).catch(() => {
|
|
3214
3214
|
s(!1);
|
|
3215
3215
|
}));
|
|
3216
|
-
}, [l, a, u, t, n, e]), f =
|
|
3216
|
+
}, [l, a, u, t, n, e]), f = R(() => {
|
|
3217
3217
|
if (o === void 0)
|
|
3218
3218
|
return [];
|
|
3219
3219
|
if (t.length < pa || !["XAP", "", null].includes(e))
|
|
@@ -3226,7 +3226,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3226
3226
|
items: v
|
|
3227
3227
|
});
|
|
3228
3228
|
}), h;
|
|
3229
|
-
}, [t, o, e]), p =
|
|
3229
|
+
}, [t, o, e]), p = R(() => f.concat(c), [c, f]);
|
|
3230
3230
|
return U(() => {
|
|
3231
3231
|
m();
|
|
3232
3232
|
}, [m]), { isLoading: i, searchItems: p };
|
|
@@ -3237,7 +3237,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3237
3237
|
right: gd,
|
|
3238
3238
|
input: vd,
|
|
3239
3239
|
submitButton: yd
|
|
3240
|
-
}, bd = ({ searchTypes: e, selectedType: t, setSelectedType: n }) => /* @__PURE__ */ r(
|
|
3240
|
+
}, bd = ({ searchTypes: e, selectedType: t, setSelectedType: n }) => /* @__PURE__ */ r(vt, { toggle: /* @__PURE__ */ r(yt, { as: Tt, icon: null, text: t == null ? void 0 : t.text }), children: e.map((a) => /* @__PURE__ */ r(Re, { icon: null, onClick: () => n(a.key), children: a.text }, a.key)) }), wd = "_dropdown_1ddrg_1", Nd = "_open_1ddrg_12", xd = "_loading-container_1ddrg_15", Sd = "_groups-container_1ddrg_22", Cd = "_group_1ddrg_22", kd = "_header_1ddrg_26", Id = "_item_1ddrg_33", St = {
|
|
3241
3241
|
dropdown: wd,
|
|
3242
3242
|
open: Nd,
|
|
3243
3243
|
loadingContainer: xd,
|
|
@@ -3246,13 +3246,13 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3246
3246
|
header: kd,
|
|
3247
3247
|
item: Id
|
|
3248
3248
|
}, _d = ({ item: e, searchTypes: t, onCancel: n }) => {
|
|
3249
|
-
const a =
|
|
3249
|
+
const a = R(() => t.find((i) => i.key === e.type), [e.type, t]), o = R(() => Ko(e, a, t), [e, a, t]), l = R(() => Qo(e, a), [e, a]);
|
|
3250
3250
|
return /* @__PURE__ */ g(Oe, { to: o, className: I("search-item d-flex gap-3 align-items-center justify-content-between", St.item), onClick: n, children: [
|
|
3251
3251
|
/* @__PURE__ */ r($, { variant: "body2", className: "text-nowrap text-truncate", children: l }),
|
|
3252
3252
|
/* @__PURE__ */ r($, { variant: "caption", className: "text-primary", children: /* @__PURE__ */ r(el, {}) })
|
|
3253
3253
|
] });
|
|
3254
3254
|
}, Dd = ({ show: e, query: t, onCancel: n, groups: a, isLoading: o, searchTypes: l }) => {
|
|
3255
|
-
const { texts: { appSearch: i } } =
|
|
3255
|
+
const { texts: { appSearch: i } } = P(G), s = ve(null);
|
|
3256
3256
|
return tl([s], n), /* @__PURE__ */ r("div", { ref: s, className: I("luminus-app-search-dropdown shadow rounded", St.dropdown, {
|
|
3257
3257
|
[St.open]: e
|
|
3258
3258
|
}), children: o ? /* @__PURE__ */ r("div", { className: St.loadingContainer, children: /* @__PURE__ */ r(nl, { animation: "border", variant: "primary" }) }) : /* @__PURE__ */ r("div", { className: St.groupsContainer, children: a == null ? void 0 : a.map((c) => {
|
|
@@ -3281,19 +3281,19 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3281
3281
|
}) }) });
|
|
3282
3282
|
}, Qh = ({ searchTypes: e, navigateFunction: t, currentPath: n, homePath: a = "/", className: o, staticAppItems: l, searchEndpointUri: i }) => {
|
|
3283
3283
|
var N;
|
|
3284
|
-
const { texts: { appSearch: s } } =
|
|
3284
|
+
const { texts: { appSearch: s } } = P(G), [c, d] = L(e.length > 0 ? ((N = e.at(0)) == null ? void 0 : N.key) ?? null : null), u = R(() => e.find((y) => y.key === c) ?? null, [e, c]), [m, f] = L(""), [p, h] = kr(encodeURIComponent(m), 500), { isLoading: w, searchItems: v } = Xo(c, p, i, !1, l), [b, x] = L(!1);
|
|
3285
3285
|
U(() => {
|
|
3286
3286
|
(v.length > 0 || w) && x(!0);
|
|
3287
3287
|
}, [v, w]);
|
|
3288
|
-
const C =
|
|
3288
|
+
const C = ve(null);
|
|
3289
3289
|
return U(() => {
|
|
3290
3290
|
var y;
|
|
3291
3291
|
f(""), n === a && ((y = C.current) == null || y.focus());
|
|
3292
|
-
}, [n, a]), /* @__PURE__ */ r(
|
|
3292
|
+
}, [n, a]), /* @__PURE__ */ r(le, { className: "w-100 d-flex align-items-center justify-content-center", onSubmit: (y) => {
|
|
3293
3293
|
y.preventDefault(), y.stopPropagation(), h.flush(), x(!1), p.length > 2 && t(`/search?query=${p}${u && u.key && `&type=${u == null ? void 0 : u.key}`}`);
|
|
3294
3294
|
}, children: /* @__PURE__ */ g(In, { className: I(bt.inputGroup, o), children: [
|
|
3295
3295
|
/* @__PURE__ */ r(In.Text, { className: I("p-1 rounded", bt.inputGroupText, bt.left), children: /* @__PURE__ */ r(bd, { searchTypes: e, selectedType: u, setSelectedType: d }) }),
|
|
3296
|
-
/* @__PURE__ */ r(
|
|
3296
|
+
/* @__PURE__ */ r(le.Control, { ref: C, placeholder: s.searchPlaceholder, type: "text", size: "sm", className: I("luminus-app-search-input", bt.input), value: m, onChange: (y) => {
|
|
3297
3297
|
var S;
|
|
3298
3298
|
return f(((S = y.target) == null ? void 0 : S.value) ?? "");
|
|
3299
3299
|
}, onFocus: () => v.length > 0 && x(!0) }),
|
|
@@ -3301,18 +3301,18 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3301
3301
|
/* @__PURE__ */ r(Dd, { query: p, searchTypes: e, show: b, onCancel: () => x(!1), groups: v, isLoading: w })
|
|
3302
3302
|
] }) });
|
|
3303
3303
|
}, Td = ({ item: e, searchTypes: t }) => {
|
|
3304
|
-
const { ProjectIconComponent: n } =
|
|
3304
|
+
const { ProjectIconComponent: n } = P(G), a = R(() => t.find((i) => i.key === e.type), [e.type, t]), o = R(() => Ko(e, a, t), [e, a, t]), l = R(() => Qo(e, a), [e, a]);
|
|
3305
3305
|
return /* @__PURE__ */ g(Oe, { to: o, className: "text-nowrap list-group-item list-group-item-action d-flex justify-content-between align-items-center", children: [
|
|
3306
3306
|
/* @__PURE__ */ r($, { variant: "body", children: l }),
|
|
3307
3307
|
/* @__PURE__ */ r(n, { icon: "chevron-right", className: "text-primary" })
|
|
3308
3308
|
] });
|
|
3309
3309
|
}, Xh = ({ query: e, type: t, appSearchTypes: n, searchEndpointUri: a, staticAppItems: o }) => {
|
|
3310
3310
|
var u, m;
|
|
3311
|
-
const { texts: { appSearch: l } } =
|
|
3311
|
+
const { texts: { appSearch: l } } = P(G), [i, s] = L(""), { searchItems: c, isLoading: d } = Xo(t, e, a, !0, o);
|
|
3312
3312
|
return U(() => {
|
|
3313
3313
|
var f;
|
|
3314
3314
|
i || c === null || c.length === 0 || s(((f = c[0].key) == null ? void 0 : f.category) ?? "");
|
|
3315
|
-
}, [c, i]), c === null ? null : /* @__PURE__ */ r(
|
|
3315
|
+
}, [c, i]), c === null ? null : /* @__PURE__ */ r(at, { variant: "fullScreen", children: d ? /* @__PURE__ */ r(sr, {}) : c.length === 0 ? /* @__PURE__ */ r("div", { className: "alert alert-warning", children: /* @__PURE__ */ r($, { variant: "body", children: l.noResultsFor(e) }) }) : /* @__PURE__ */ g(X, { children: [
|
|
3316
3316
|
/* @__PURE__ */ r(Wo, { activeTab: i, onSelect: (f) => s((f == null ? void 0 : f.toString()) ?? ""), children: c.map((f) => {
|
|
3317
3317
|
var p, h;
|
|
3318
3318
|
return /* @__PURE__ */ r(Go, { eventKey: ((p = f.key) == null ? void 0 : p.category) ?? "", children: ((h = f.key) == null ? void 0 : h.categoryName) ?? "" }, f.key.category);
|
|
@@ -3323,10 +3323,10 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3323
3323
|
)) }) })
|
|
3324
3324
|
] }) });
|
|
3325
3325
|
}, Zh = () => {
|
|
3326
|
-
const { texts: { userSettings: e } } =
|
|
3326
|
+
const { texts: { userSettings: e } } = P(G), [t, n] = an("file-download-try-opening", !0);
|
|
3327
3327
|
return /* @__PURE__ */ r(It, { collapsible: !0, title: e.downloads, defaultOpen: !0, children: /* @__PURE__ */ r(on, { type: "switch", value: t === void 0 ? !0 : t, onChange: n, label: e.tryOpenFileLabel }) });
|
|
3328
3328
|
}, Ed = ({ show: e, handleClose: t, onConfirm: n, apiCreateBackup: a }) => {
|
|
3329
|
-
const { texts: { userSettings: o } } =
|
|
3329
|
+
const { texts: { userSettings: o } } = P(G), { zStringRequired: l } = jn(), { addNotification: i } = Dt(), s = je(), { startLoading: c, stopLoading: d } = P(Je), [u, m] = L(null), f = io.object({
|
|
3330
3330
|
name: l()
|
|
3331
3331
|
}), p = Fn({ resolver: Mn(f) }), h = D(async (v, b) => (c("localStorageSettingPost"), s.post(a, {
|
|
3332
3332
|
name: v,
|
|
@@ -3338,12 +3338,12 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3338
3338
|
e && m(Gl());
|
|
3339
3339
|
}, [e]), /* @__PURE__ */ g(re, { show: e, onHide: () => t(), children: [
|
|
3340
3340
|
/* @__PURE__ */ r(re.Header, { closeButton: !0, children: /* @__PURE__ */ r(re.Title, { children: o.localStorageCreateBackup }) }),
|
|
3341
|
-
/* @__PURE__ */ r(Bn, { ...p, children: /* @__PURE__ */ g(
|
|
3341
|
+
/* @__PURE__ */ r(Bn, { ...p, children: /* @__PURE__ */ g(le, { onSubmit: p.handleSubmit(w), noValidate: !0, children: [
|
|
3342
3342
|
/* @__PURE__ */ g(re.Body, { children: [
|
|
3343
|
-
/* @__PURE__ */ r(
|
|
3343
|
+
/* @__PURE__ */ r(He, { variant: "info", size: "sm", children: o.localStorageCreateBackupInfo(Object.keys(u || {}).length) }),
|
|
3344
3344
|
/* @__PURE__ */ r(Ft, { required: !0, label: o.localStorageCreateBackupName, formField: "name", type: "text" })
|
|
3345
3345
|
] }),
|
|
3346
|
-
/* @__PURE__ */ r(re.Footer, { className: "justify-content-end", children: /* @__PURE__ */ r(
|
|
3346
|
+
/* @__PURE__ */ r(re.Footer, { className: "justify-content-end", children: /* @__PURE__ */ r(Qe, { type: "submit", children: o.localStorageCreateBackupSave }) })
|
|
3347
3347
|
] }) })
|
|
3348
3348
|
] });
|
|
3349
3349
|
}, Nn = {
|
|
@@ -3351,13 +3351,13 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3351
3351
|
apiCreateBackup: "/localStorageSettings",
|
|
3352
3352
|
apiDeleteBackup: "/localStorageSettings"
|
|
3353
3353
|
}, Jh = ({ apiUrls: { apiGetBackups: e = Nn.apiGetBackups, apiCreateBackup: t = Nn.apiCreateBackup, apiDeleteBackup: n = Nn.apiDeleteBackup } = Nn }) => {
|
|
3354
|
-
const { ProjectIconComponent: a, texts: { userSettings: o } } =
|
|
3354
|
+
const { ProjectIconComponent: a, texts: { userSettings: o } } = P(G), { confirm: l } = it(), i = je(), { startLoading: s, stopLoading: c } = P(Je), { addNotification: d } = Dt(), [u, m] = L(!1), { data: f, setData: p, reloadData: h } = _e(e), w = D(async (x) => (s("localStorageSettingDelete"), i.delete(`${n}/${x}`).then(() => !0).catch(() => !1).finally(() => c("localStorageSettingDelete"))), [i, n, s, c]), v = D(async (x) => {
|
|
3355
3355
|
await l(o.localStorageDeleteBackupConfirm) && await w(x) && (d(o.localStorageDeleteBackupSuccess, "success"), p((C) => (C == null ? void 0 : C.filter((N) => N.id !== x)) ?? null));
|
|
3356
3356
|
}, [l, o, w, d, p]), b = D(async (x) => {
|
|
3357
3357
|
x.setting && await l(o.localStorageLoadBackup) && (Yl(x.setting) ? d(o.localStorageLoadBackupSuccess, "success") : d(o.localStorageLoadBackupError, "danger"));
|
|
3358
3358
|
}, [l, o, d]);
|
|
3359
3359
|
return /* @__PURE__ */ g(It, { collapsible: !0, title: o.localStorage, defaultOpen: !0, children: [
|
|
3360
|
-
/* @__PURE__ */ r(
|
|
3360
|
+
/* @__PURE__ */ r(Ye, { className: "mb-2", onClick: () => m(!0), children: o.localStorageCreateBackup }),
|
|
3361
3361
|
f && f.length > 0 ? /* @__PURE__ */ r("div", { className: "list-group", children: f.map((x, C) => /* @__PURE__ */ g(
|
|
3362
3362
|
"div",
|
|
3363
3363
|
{
|
|
@@ -3375,15 +3375,15 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3375
3375
|
]
|
|
3376
3376
|
},
|
|
3377
3377
|
C
|
|
3378
|
-
)) }) : f ? /* @__PURE__ */ r(
|
|
3378
|
+
)) }) : f ? /* @__PURE__ */ r(He, { variant: "secondary", size: "sm", children: o.localStorageNoBackups }) : null,
|
|
3379
3379
|
/* @__PURE__ */ r(Ed, { show: u, handleClose: () => m(!1), onConfirm: () => {
|
|
3380
3380
|
m(!1), h();
|
|
3381
3381
|
}, apiCreateBackup: t })
|
|
3382
3382
|
] });
|
|
3383
3383
|
}, ep = () => {
|
|
3384
|
-
const { texts: { userSettings: e } } =
|
|
3384
|
+
const { texts: { userSettings: e } } = P(G), [t, n] = an("search-use-asterisk", !0);
|
|
3385
3385
|
return /* @__PURE__ */ r(It, { collapsible: !0, title: e.searchSettings, defaultOpen: !0, children: /* @__PURE__ */ r(on, { type: "switch", value: t === void 0 ? !0 : t, onChange: n, label: e.searchSettingsUseAsterisk }) });
|
|
3386
|
-
}, Od = "_widgets-row_13gg1_1", $d = "_widget_13gg1_1", Ld = "_widget-img_13gg1_5", Ad = "_widget-title-spacer_13gg1_14", Rd = "_widget-title_13gg1_14", jd = "_title_13gg1_28",
|
|
3386
|
+
}, Od = "_widgets-row_13gg1_1", $d = "_widget_13gg1_1", Ld = "_widget-img_13gg1_5", Ad = "_widget-title-spacer_13gg1_14", Rd = "_widget-title_13gg1_14", jd = "_title_13gg1_28", Be = {
|
|
3387
3387
|
widgetsRow: Od,
|
|
3388
3388
|
widget: $d,
|
|
3389
3389
|
widgetImg: Ld,
|
|
@@ -3391,29 +3391,29 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3391
3391
|
widgetTitle: Rd,
|
|
3392
3392
|
title: jd
|
|
3393
3393
|
}, Md = ({ show: e, widgetGroups: t, widgets: n, handleClose: a, onWidgetPicked: o, texts: l }) => {
|
|
3394
|
-
const [i, s] = L(""), c =
|
|
3394
|
+
const [i, s] = L(""), c = R(() => n.filter((u) => u.id !== -1 && Ae(u.name, i)), [n, i]), d = R(() => t.filter((u) => c.some((m) => m.group === u.id)), [t, c]);
|
|
3395
3395
|
return /* @__PURE__ */ g(re, { show: e, onHide: () => a(), size: "lg", children: [
|
|
3396
3396
|
/* @__PURE__ */ g(re.Header, { closeButton: !0, children: [
|
|
3397
3397
|
/* @__PURE__ */ r(re.Title, { className: "w-100", children: l.pickWidgetToAdd }),
|
|
3398
|
-
/* @__PURE__ */ r(
|
|
3398
|
+
/* @__PURE__ */ r(le.Control, { type: "search", size: "sm", value: i, placeholder: l.searchPlaceholder, onChange: (u) => {
|
|
3399
3399
|
var m;
|
|
3400
3400
|
return s(((m = u.target) == null ? void 0 : m.value) ?? "");
|
|
3401
3401
|
}, className: "me-3", style: { maxWidth: "200px" } })
|
|
3402
3402
|
] }),
|
|
3403
|
-
/* @__PURE__ */ r(re.Body, { className: "flex-column gap-3", children: c.length === 0 ? /* @__PURE__ */ r(
|
|
3404
|
-
d.map((u) => /* @__PURE__ */ r($n, { defaultOpen: !0, title: u.name ?? "", children: /* @__PURE__ */ r("div", { className: "p-1", children: /* @__PURE__ */ r("div", { className: I("row gx-3 gy-3",
|
|
3405
|
-
/* @__PURE__ */ r("div", { className:
|
|
3403
|
+
/* @__PURE__ */ r(re.Body, { className: "flex-column gap-3", children: c.length === 0 ? /* @__PURE__ */ r(He, { variant: "warning", children: l.noWidgets }) : /* @__PURE__ */ g(X, { children: [
|
|
3404
|
+
d.map((u) => /* @__PURE__ */ r($n, { defaultOpen: !0, title: u.name ?? "", children: /* @__PURE__ */ r("div", { className: "p-1", children: /* @__PURE__ */ r("div", { className: I("row gx-3 gy-3", Be.widgetsRow), children: c.filter((m) => m.group === u.id).map((m) => /* @__PURE__ */ r("div", { className: "col col-4", children: /* @__PURE__ */ g("div", { role: "button", className: I("p-0 pt-2 bg-white rounded shadow-sm", Be.widget), onClick: () => o(m.id), children: [
|
|
3405
|
+
/* @__PURE__ */ r("div", { className: Be.widgetImg, style: {
|
|
3406
3406
|
backgroundImage: m.img ? `url(${m.img})` : void 0
|
|
3407
3407
|
} }),
|
|
3408
|
-
/* @__PURE__ */ r("div", { className:
|
|
3409
|
-
/* @__PURE__ */ r("div", { className: I(
|
|
3408
|
+
/* @__PURE__ */ r("div", { className: Be.widgetTitleSpacer }),
|
|
3409
|
+
/* @__PURE__ */ r("div", { className: I(Be.widgetTitle, "rounded"), children: /* @__PURE__ */ r($, { variant: "body", className: I(Be.title, "text-white text-truncate"), children: m.name }) })
|
|
3410
3410
|
] }, m.id) })) }) }) }, u.id)),
|
|
3411
|
-
c.some((u) => u.group === void 0) && /* @__PURE__ */ r($n, { defaultOpen: !0, title: l.otherWidgets, children: /* @__PURE__ */ r("div", { className: "p-1", children: /* @__PURE__ */ r("div", { className: I("row gx-3 gy-3",
|
|
3412
|
-
/* @__PURE__ */ r("div", { className:
|
|
3411
|
+
c.some((u) => u.group === void 0) && /* @__PURE__ */ r($n, { defaultOpen: !0, title: l.otherWidgets, children: /* @__PURE__ */ r("div", { className: "p-1", children: /* @__PURE__ */ r("div", { className: I("row gx-3 gy-3", Be.widgetsRow), children: c.filter((u) => u.group === void 0).map((u) => /* @__PURE__ */ r("div", { className: "col col-4", children: /* @__PURE__ */ g("div", { role: "button", className: I("p-0 pt-2 bg-white rounded shadow-sm", Be.widget), onClick: () => o(u.id), children: [
|
|
3412
|
+
/* @__PURE__ */ r("div", { className: Be.widgetImg, style: {
|
|
3413
3413
|
backgroundImage: u.img ? `url(${u.img})` : void 0
|
|
3414
3414
|
} }),
|
|
3415
|
-
/* @__PURE__ */ r("div", { className:
|
|
3416
|
-
/* @__PURE__ */ r("div", { className: I(
|
|
3415
|
+
/* @__PURE__ */ r("div", { className: Be.widgetTitleSpacer }),
|
|
3416
|
+
/* @__PURE__ */ r("div", { className: I(Be.widgetTitle, "rounded"), children: /* @__PURE__ */ r($, { variant: "body", className: I(Be.title, "text-white text-truncate"), children: u.name }) })
|
|
3417
3417
|
] }, u.id) })) }) }) })
|
|
3418
3418
|
] }) })
|
|
3419
3419
|
] });
|
|
@@ -3422,7 +3422,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3422
3422
|
mobile: Fd
|
|
3423
3423
|
}, Zo = ({ widgetGroups: e, availableWidgets: t, onAdd: n, texts: a }) => {
|
|
3424
3424
|
const [o, l] = L(!1), { isMobile: i } = Rn();
|
|
3425
|
-
return /* @__PURE__ */ g(
|
|
3425
|
+
return /* @__PURE__ */ g(X, { children: [
|
|
3426
3426
|
/* @__PURE__ */ r("div", { className: I("luminus-empty-widget", ga.widget, {
|
|
3427
3427
|
[ga.mobile]: i
|
|
3428
3428
|
}), children: /* @__PURE__ */ r(J, { onClick: () => l(!0), children: /* @__PURE__ */ r(al, {}) }) }),
|
|
@@ -3430,7 +3430,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3430
3430
|
l(!1), n(s);
|
|
3431
3431
|
}, texts: a })
|
|
3432
3432
|
] });
|
|
3433
|
-
}, Bd = "_dashboard_1gf59_1", zd = "_widgets-grid_1gf59_1", Hd = "_widget-wrapper_1gf59_8", Vd = "_full-width_1gf59_13", Ud = "_widget-edit_1gf59_16", Wd = "_remove-icon_1gf59_19", Gd = "_full-width-icon_1gf59_26", Yd = "_widget-edit-overlay_1gf59_36", qd = "_mobile_1gf59_45",
|
|
3433
|
+
}, Bd = "_dashboard_1gf59_1", zd = "_widgets-grid_1gf59_1", Hd = "_widget-wrapper_1gf59_8", Vd = "_full-width_1gf59_13", Ud = "_widget-edit_1gf59_16", Wd = "_remove-icon_1gf59_19", Gd = "_full-width-icon_1gf59_26", Yd = "_widget-edit-overlay_1gf59_36", qd = "_mobile_1gf59_45", Ze = {
|
|
3434
3434
|
dashboard: Bd,
|
|
3435
3435
|
widgetsGrid: zd,
|
|
3436
3436
|
widgetWrapper: Hd,
|
|
@@ -3441,16 +3441,16 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3441
3441
|
widgetEditOverlay: Yd,
|
|
3442
3442
|
mobile: qd
|
|
3443
3443
|
}, Kd = ({ widget: e, onIndex: t, fullWidth: n, editMode: a, widgetGroups: o, availableWidgets: l, onRemove: i, onToggleFullWidth: s, onAdd: c }) => {
|
|
3444
|
-
const { texts: { homeDashboard: d } } =
|
|
3445
|
-
return e ? /* @__PURE__ */ g("div", { className: I(
|
|
3446
|
-
[
|
|
3447
|
-
}, { [
|
|
3448
|
-
a && /* @__PURE__ */ g(
|
|
3449
|
-
/* @__PURE__ */ r(J, { color: "danger", onClick: () => i(t), className: I(
|
|
3450
|
-
/* @__PURE__ */ r(J, { color: n ? "danger" : "primary", onClick: () => s(t), className: I(
|
|
3444
|
+
const { texts: { homeDashboard: d } } = P(G);
|
|
3445
|
+
return e ? /* @__PURE__ */ g("div", { className: I(Ze.widgetWrapper, {
|
|
3446
|
+
[Ze.widgetEdit]: a && e.id !== -1
|
|
3447
|
+
}, { [Ze.fullWidth]: n }), children: [
|
|
3448
|
+
a && /* @__PURE__ */ g(X, { children: [
|
|
3449
|
+
/* @__PURE__ */ r(J, { color: "danger", onClick: () => i(t), className: I(Ze.removeIcon), children: /* @__PURE__ */ r(ol, {}) }),
|
|
3450
|
+
/* @__PURE__ */ r(J, { color: n ? "danger" : "primary", onClick: () => s(t), className: I(Ze.fullWidthIcon), children: /* @__PURE__ */ r(il, {}) })
|
|
3451
3451
|
] }),
|
|
3452
|
-
e.id === -1 ? a && /* @__PURE__ */ r("div", { className:
|
|
3453
|
-
e.id > -1 && a && /* @__PURE__ */ r("div", { className:
|
|
3452
|
+
e.id === -1 ? a && /* @__PURE__ */ r("div", { className: Ze.widgetWrapper, children: /* @__PURE__ */ r(Zo, { widgetGroups: o, availableWidgets: l, onAdd: (u) => c(t, u), texts: d }) }) : /* @__PURE__ */ r(Fm, { title: e.title, children: /* @__PURE__ */ r(e.WidgetElement, { title: e.title }) }),
|
|
3453
|
+
e.id > -1 && a && /* @__PURE__ */ r("div", { className: Ze.widgetEditOverlay })
|
|
3454
3454
|
] }, t) : null;
|
|
3455
3455
|
}, Qd = (e, t = "dashboardConfig") => {
|
|
3456
3456
|
const [n, a] = L({ widgets: [] });
|
|
@@ -3464,7 +3464,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3464
3464
|
return { dashboardConfig: n, onChangeDashboardConfig: o };
|
|
3465
3465
|
}, tp = ({ widgetGroups: e, availableWidgets: t, editMode: n, defaultDashboardConfig: a, dashboardConfigKey: o }) => {
|
|
3466
3466
|
var f;
|
|
3467
|
-
const { texts: { homeDashboard: l } } =
|
|
3467
|
+
const { texts: { homeDashboard: l } } = P(G), { dashboardConfig: i, onChangeDashboardConfig: s } = Qd(a, o), c = D((p, h) => {
|
|
3468
3468
|
var w, v;
|
|
3469
3469
|
p === ((w = i.widgets) == null ? void 0 : w.length) ? s({
|
|
3470
3470
|
...i,
|
|
@@ -3486,7 +3486,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3486
3486
|
widgets: ((h = i.widgets) == null ? void 0 : h.map((w, v) => v === p ? { ...w, fullWidth: !w.fullWidth } : w)) ?? []
|
|
3487
3487
|
});
|
|
3488
3488
|
}, [i, s]), { isMobile: m } = Rn();
|
|
3489
|
-
return /* @__PURE__ */ r("div", { className: I(
|
|
3489
|
+
return /* @__PURE__ */ r("div", { className: I(Ze.dashboard, { [Ze.mobile]: m }), children: /* @__PURE__ */ g("div", { className: I(Ze.widgetsGrid), children: [
|
|
3490
3490
|
(f = i.widgets) == null ? void 0 : f.map((p, h) => /* @__PURE__ */ r(
|
|
3491
3491
|
Kd,
|
|
3492
3492
|
{
|
|
@@ -3514,7 +3514,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3514
3514
|
lg: eu,
|
|
3515
3515
|
light: tu
|
|
3516
3516
|
}, np = ({ children: e, color: t = "primary", size: n = "md", rounded: a, className: o, variant: l = "filled", ...i }) => {
|
|
3517
|
-
const s =
|
|
3517
|
+
const s = R(() => l === "filled" ? I(`bg-${t}`) : l === "outline" ? I(`text-${t} border-${t} border bg-white`) : "", [t, l]);
|
|
3518
3518
|
return /* @__PURE__ */ r("span", { className: I("luminus-badge badge", s, o, { "rounded-pill": a }, { "text-dark": t === "light" }, { [er.light]: t === "light" }, er.badge, er[n]), ...i, children: e });
|
|
3519
3519
|
}, nu = "_collapse-icon_1ahhn_1", ru = "_collapsed_1ahhn_6", va = {
|
|
3520
3520
|
collapseIcon: nu,
|
|
@@ -3546,7 +3546,7 @@ e.label === "", ca = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, da =
|
|
|
3546
3546
|
U(() => {
|
|
3547
3547
|
u(c);
|
|
3548
3548
|
}, [c]);
|
|
3549
|
-
const f =
|
|
3549
|
+
const f = R(() => !n || !n.toString() || n.toString().split(",").filter((p) => p && p !== "false").length === 0, [n]);
|
|
3550
3550
|
return i && f ? null : /* @__PURE__ */ g("div", { className: I("luminus-card rounded shadow-sm", wt.card, {
|
|
3551
3551
|
[a ?? ""]: a
|
|
3552
3552
|
}), children: [
|
|
@@ -4372,7 +4372,7 @@ function Ia(e, t) {
|
|
|
4372
4372
|
}
|
|
4373
4373
|
return n;
|
|
4374
4374
|
}
|
|
4375
|
-
function
|
|
4375
|
+
function ut(e) {
|
|
4376
4376
|
for (var t = 1; t < arguments.length; t++) {
|
|
4377
4377
|
var n = arguments[t] != null ? arguments[t] : {};
|
|
4378
4378
|
t % 2 ? Ia(Object(n), !0).forEach(function(a) {
|
|
@@ -4471,19 +4471,19 @@ function um(e) {
|
|
|
4471
4471
|
var k = a.get(_);
|
|
4472
4472
|
if (k == null)
|
|
4473
4473
|
return S;
|
|
4474
|
-
var
|
|
4474
|
+
var j = {
|
|
4475
4475
|
input: N,
|
|
4476
4476
|
source: x,
|
|
4477
4477
|
element: k.element
|
|
4478
4478
|
};
|
|
4479
|
-
if (k.canDrop && !k.canDrop(
|
|
4479
|
+
if (k.canDrop && !k.canDrop(j))
|
|
4480
4480
|
return c({
|
|
4481
4481
|
source: x,
|
|
4482
4482
|
target: k.element.parentElement,
|
|
4483
4483
|
input: N,
|
|
4484
4484
|
result: S
|
|
4485
4485
|
});
|
|
4486
|
-
var T = (h = (w = k.getData) === null || w === void 0 ? void 0 : w.call(k,
|
|
4486
|
+
var T = (h = (w = k.getData) === null || w === void 0 ? void 0 : w.call(k, j)) !== null && h !== void 0 ? h : {}, M = (v = (b = k.getDropEffect) === null || b === void 0 ? void 0 : b.call(k, j)) !== null && v !== void 0 ? v : n, F = {
|
|
4487
4487
|
data: T,
|
|
4488
4488
|
element: k.element,
|
|
4489
4489
|
dropEffect: M,
|
|
@@ -4496,14 +4496,14 @@ function um(e) {
|
|
|
4496
4496
|
target: k.element.parentElement,
|
|
4497
4497
|
input: N,
|
|
4498
4498
|
// Using bubble ordering. Same ordering as `event.getPath()`
|
|
4499
|
-
result: [].concat(ci(S), [
|
|
4499
|
+
result: [].concat(ci(S), [F])
|
|
4500
4500
|
});
|
|
4501
4501
|
}
|
|
4502
4502
|
function d(p) {
|
|
4503
4503
|
var h = p.eventName, w = p.payload, v = nr(w.location.current.dropTargets), b;
|
|
4504
4504
|
try {
|
|
4505
4505
|
for (v.s(); !(b = v.n()).done; ) {
|
|
4506
|
-
var x, C = b.value, N = a.get(C.element), y =
|
|
4506
|
+
var x, C = b.value, N = a.get(C.element), y = ut(ut({}, w), {}, {
|
|
4507
4507
|
self: C
|
|
4508
4508
|
});
|
|
4509
4509
|
N == null || (x = N[h]) === null || x === void 0 || x.call(
|
|
@@ -4526,39 +4526,39 @@ function um(e) {
|
|
|
4526
4526
|
onDragStart: d,
|
|
4527
4527
|
onDrop: d,
|
|
4528
4528
|
onDropTargetChange: function(h) {
|
|
4529
|
-
var w = h.payload, v = new Set(w.location.current.dropTargets.map(function(
|
|
4530
|
-
return
|
|
4529
|
+
var w = h.payload, v = new Set(w.location.current.dropTargets.map(function(z) {
|
|
4530
|
+
return z.element;
|
|
4531
4531
|
})), b = /* @__PURE__ */ new Set(), x = nr(w.location.previous.dropTargets), C;
|
|
4532
4532
|
try {
|
|
4533
4533
|
for (x.s(); !(C = x.n()).done; ) {
|
|
4534
4534
|
var N, y = C.value;
|
|
4535
4535
|
b.add(y.element);
|
|
4536
|
-
var S = a.get(y.element), _ = v.has(y.element), k =
|
|
4536
|
+
var S = a.get(y.element), _ = v.has(y.element), k = ut(ut({}, w), {}, {
|
|
4537
4537
|
self: y
|
|
4538
4538
|
});
|
|
4539
4539
|
if (S == null || (N = S.onDropTargetChange) === null || N === void 0 || N.call(S, k), !_) {
|
|
4540
|
-
var
|
|
4541
|
-
S == null || (
|
|
4540
|
+
var j;
|
|
4541
|
+
S == null || (j = S.onDragLeave) === null || j === void 0 || j.call(S, k);
|
|
4542
4542
|
}
|
|
4543
4543
|
}
|
|
4544
|
-
} catch (
|
|
4545
|
-
x.e(
|
|
4544
|
+
} catch (z) {
|
|
4545
|
+
x.e(z);
|
|
4546
4546
|
} finally {
|
|
4547
4547
|
x.f();
|
|
4548
4548
|
}
|
|
4549
4549
|
var T = nr(w.location.current.dropTargets), M;
|
|
4550
4550
|
try {
|
|
4551
4551
|
for (T.s(); !(M = T.n()).done; ) {
|
|
4552
|
-
var
|
|
4553
|
-
if (!b.has(
|
|
4554
|
-
var
|
|
4555
|
-
self:
|
|
4556
|
-
}),
|
|
4557
|
-
|
|
4552
|
+
var F, E, O = M.value;
|
|
4553
|
+
if (!b.has(O.element)) {
|
|
4554
|
+
var Z = ut(ut({}, w), {}, {
|
|
4555
|
+
self: O
|
|
4556
|
+
}), H = a.get(O.element);
|
|
4557
|
+
H == null || (F = H.onDropTargetChange) === null || F === void 0 || F.call(H, Z), H == null || (E = H.onDragEnter) === null || E === void 0 || E.call(H, Z);
|
|
4558
4558
|
}
|
|
4559
4559
|
}
|
|
4560
|
-
} catch (
|
|
4561
|
-
T.e(
|
|
4560
|
+
} catch (z) {
|
|
4561
|
+
T.e(z);
|
|
4562
4562
|
} finally {
|
|
4563
4563
|
T.f();
|
|
4564
4564
|
}
|
|
@@ -4576,25 +4576,25 @@ function um(e) {
|
|
|
4576
4576
|
if (x.length >= b.length)
|
|
4577
4577
|
return x;
|
|
4578
4578
|
for (var C = rr(b), N = rr(x), y = [], S = 0; S < C.length; S++) {
|
|
4579
|
-
var _, k = C[S],
|
|
4580
|
-
if (
|
|
4581
|
-
y.push(
|
|
4579
|
+
var _, k = C[S], j = N[S];
|
|
4580
|
+
if (j != null) {
|
|
4581
|
+
y.push(j);
|
|
4582
4582
|
continue;
|
|
4583
4583
|
}
|
|
4584
4584
|
var T = y[S - 1], M = C[S - 1];
|
|
4585
4585
|
if ((T == null ? void 0 : T.element) !== (M == null ? void 0 : M.element))
|
|
4586
4586
|
break;
|
|
4587
|
-
var
|
|
4588
|
-
if (!
|
|
4587
|
+
var F = a.get(k.element);
|
|
4588
|
+
if (!F)
|
|
4589
4589
|
break;
|
|
4590
|
-
var
|
|
4590
|
+
var E = {
|
|
4591
4591
|
input: v,
|
|
4592
4592
|
source: h,
|
|
4593
|
-
element:
|
|
4593
|
+
element: F.element
|
|
4594
4594
|
};
|
|
4595
|
-
if (
|
|
4595
|
+
if (F.canDrop && !F.canDrop(E) || !((_ = F.getIsSticky) !== null && _ !== void 0 && _.call(F, E)))
|
|
4596
4596
|
break;
|
|
4597
|
-
y.push(
|
|
4597
|
+
y.push(ut(ut({}, k), {}, {
|
|
4598
4598
|
// making it clear to consumers this drop target is active due to stickiness
|
|
4599
4599
|
isActiveDueToStickiness: !0
|
|
4600
4600
|
}));
|
|
@@ -4882,7 +4882,7 @@ const $a = ({ width: e }) => /* @__PURE__ */ r("div", { style: {
|
|
|
4882
4882
|
borderRadius: "4px"
|
|
4883
4883
|
} }), Sm = ({ photo: e, setSelectedIndex: t, selectedIndex: n, index: a, ImgComponent: o, baseUrl: l, customToken: i, placeholder: s }) => {
|
|
4884
4884
|
var p;
|
|
4885
|
-
const c =
|
|
4885
|
+
const c = ve(null), [d, u] = L({
|
|
4886
4886
|
type: "idle"
|
|
4887
4887
|
}), [m, f] = L(!1);
|
|
4888
4888
|
return U(() => c.current ? Vn(fi({
|
|
@@ -4919,7 +4919,7 @@ const $a = ({ width: e }) => /* @__PURE__ */ r("div", { style: {
|
|
|
4919
4919
|
};
|
|
4920
4920
|
}
|
|
4921
4921
|
})) : () => {
|
|
4922
|
-
}, [e.id]), /* @__PURE__ */ g(
|
|
4922
|
+
}, [e.id]), /* @__PURE__ */ g(X, { children: [
|
|
4923
4923
|
d.type === "is-over" && d.closestEdge === "left" && /* @__PURE__ */ r($a, { width: d.draggedWidth }),
|
|
4924
4924
|
/* @__PURE__ */ g(
|
|
4925
4925
|
"div",
|
|
@@ -4947,7 +4947,7 @@ const $a = ({ width: e }) => /* @__PURE__ */ r("div", { style: {
|
|
|
4947
4947
|
d.type === "is-over" && d.closestEdge === "right" && /* @__PURE__ */ r($a, { width: d.draggedWidth })
|
|
4948
4948
|
] });
|
|
4949
4949
|
}, Cm = ({ photos: e, setSelectedIndex: t, selectedIndex: n, ImgComponent: a, baseUrl: o, customToken: l, placeholder: i, reorderPhotos: s, onChangeOrder: c }) => {
|
|
4950
|
-
const d =
|
|
4950
|
+
const d = ve(null);
|
|
4951
4951
|
return U(() => {
|
|
4952
4952
|
if (!d.current)
|
|
4953
4953
|
throw new Error("dropTargetRef is not defined");
|
|
@@ -4989,8 +4989,8 @@ const $a = ({ width: e }) => /* @__PURE__ */ r("div", { style: {
|
|
|
4989
4989
|
break;
|
|
4990
4990
|
}
|
|
4991
4991
|
}, [C, x, t]), y = D((_, k) => {
|
|
4992
|
-
const
|
|
4993
|
-
return
|
|
4992
|
+
const j = Array.from(p), [T] = j.splice(_, 1);
|
|
4993
|
+
return j.splice(k, 0, T), j;
|
|
4994
4994
|
}, [p]);
|
|
4995
4995
|
ul(N);
|
|
4996
4996
|
const S = ml({
|
|
@@ -5006,25 +5006,25 @@ const $a = ({ width: e }) => /* @__PURE__ */ r("div", { style: {
|
|
|
5006
5006
|
/* @__PURE__ */ r(fl, { show: e, onClick: t }),
|
|
5007
5007
|
/* @__PURE__ */ r("div", { className: I("luminus-lightbox rounded shadow", Ee.lightbox, {
|
|
5008
5008
|
[Ee.show]: e
|
|
5009
|
-
}), ...S, children: e && /* @__PURE__ */ g(
|
|
5009
|
+
}), ...S, children: e && /* @__PURE__ */ g(X, { children: [
|
|
5010
5010
|
/* @__PURE__ */ g("div", { className: Ee.header, children: [
|
|
5011
5011
|
/* @__PURE__ */ g("div", { className: I("rounded", Ee.photoActions), children: [
|
|
5012
5012
|
i && /* @__PURE__ */ r(jo, { accept: ".jpg,.jpeg,.png", onUpload: (_) => {
|
|
5013
5013
|
_.length > 0 && i(Array.from(_));
|
|
5014
5014
|
}, icon: /* @__PURE__ */ r(so, { style: { fontSize: 18 } }), multiple: !0, className: "me-1 me-lg-3", children: o ?? null }),
|
|
5015
|
-
/* @__PURE__ */ r(Ir, { children: b && (s == null ? void 0 : s.map(({ label: _, onClick: k, ...
|
|
5015
|
+
/* @__PURE__ */ r(Ir, { children: b && (s == null ? void 0 : s.map(({ label: _, onClick: k, ...j }, T) => /* @__PURE__ */ r(
|
|
5016
5016
|
Dn,
|
|
5017
5017
|
{
|
|
5018
5018
|
hideOn: "sm",
|
|
5019
5019
|
cKey: `action-${T}`,
|
|
5020
5020
|
onClick: () => k(b.id),
|
|
5021
|
-
...
|
|
5021
|
+
...j,
|
|
5022
5022
|
children: typeof _ == "string" ? _ : _(b.id)
|
|
5023
5023
|
},
|
|
5024
5024
|
`action-${T}`
|
|
5025
5025
|
))) })
|
|
5026
5026
|
] }),
|
|
5027
|
-
/* @__PURE__ */ r("div", { role: "button", onClick: t, children: /* @__PURE__ */ r(
|
|
5027
|
+
/* @__PURE__ */ r("div", { role: "button", onClick: t, children: /* @__PURE__ */ r(pt, { style: { fontSize: "32px" } }) })
|
|
5028
5028
|
] }),
|
|
5029
5029
|
p.length === 0 && /* @__PURE__ */ r("div", { className: "w-100 h-100 d-flex align-items-center justify-content-center", children: /* @__PURE__ */ r($, { variant: "body", children: l ?? "No photos available" }) }),
|
|
5030
5030
|
b && /* @__PURE__ */ g("div", { className: Ee.photoContainer, children: [
|
|
@@ -5046,7 +5046,7 @@ const $a = ({ width: e }) => /* @__PURE__ */ r("div", { style: {
|
|
|
5046
5046
|
p(b > -1 ? b : 0);
|
|
5047
5047
|
}, [e]), !h && t && d ? /* @__PURE__ */ r(jo, { accept: ".jpg,.jpeg,.png", onUpload: (b) => {
|
|
5048
5048
|
b.length > 0 && t(Array.from(b));
|
|
5049
|
-
}, icon: /* @__PURE__ */ r(so, { style: { fontSize: 18 } }), multiple: !0, children: n ?? null }) : /* @__PURE__ */ g(
|
|
5049
|
+
}, icon: /* @__PURE__ */ r(so, { style: { fontSize: 18 } }), multiple: !0, children: n ?? null }) : /* @__PURE__ */ g(X, { children: [
|
|
5050
5050
|
h ? /* @__PURE__ */ g("div", { role: "button", className: "w-100 position-relative", onClick: () => v(!0), children: [
|
|
5051
5051
|
/* @__PURE__ */ r(c, { src: h.smSrc, alt: h.alt, className: "rounded w-100", baseUrl: l, customToken: i, placeholder: s }),
|
|
5052
5052
|
e.length > 1 && /* @__PURE__ */ r("div", { className: "position-absolute rounded p-1", style: {
|
|
@@ -5061,8 +5061,8 @@ const $a = ({ width: e }) => /* @__PURE__ */ r("div", { style: {
|
|
|
5061
5061
|
] });
|
|
5062
5062
|
}, rp = ({ children: e }) => {
|
|
5063
5063
|
var c, d, u;
|
|
5064
|
-
const { useMsal: t, msalScopes: n, msalExtraScopes: a } =
|
|
5065
|
-
return t ? /* @__PURE__ */ r(zl, { interactionType: Bl.Redirect, authenticationRequest: { scopes: n, extraScopesToConsent: a }, children: i || !o() ? /* @__PURE__ */ r(sr, {}) : l.user ? s ? /* @__PURE__ */ r(
|
|
5064
|
+
const { useMsal: t, msalScopes: n, msalExtraScopes: a } = P(pl), { isAuthenticated: o } = gl(), { userLoginState: l } = P(gt), i = l.state === vl.LOGGING_IN, s = l.user && ((c = l.user) == null ? void 0 : c.permissions) && ((u = (d = l.user) == null ? void 0 : d.permissions) == null ? void 0 : u.length) > 0;
|
|
5065
|
+
return t ? /* @__PURE__ */ r(zl, { interactionType: Bl.Redirect, authenticationRequest: { scopes: n, extraScopesToConsent: a }, children: i || !o() ? /* @__PURE__ */ r(sr, {}) : l.user ? s ? /* @__PURE__ */ r(X, { children: e }) : /* @__PURE__ */ r(vn, { to: "/user-not-permitted", replace: !0 }) : /* @__PURE__ */ r(vn, { to: "/no-user-login", replace: !0 }) }) : i ? /* @__PURE__ */ r(sr, {}) : !o() || !l.user ? /* @__PURE__ */ r(vn, { to: "/login", replace: !0 }) : s ? e : /* @__PURE__ */ r(vn, { to: "/user-not-permitted", replace: !0 });
|
|
5066
5066
|
}, _m = "_item_z9z4m_1", Dm = "_level-success_z9z4m_4", Tm = "_level-info_z9z4m_10", Em = "_level-warning_z9z4m_16", Om = "_level-danger_z9z4m_22", $m = "_type-icon_z9z4m_28", ar = {
|
|
5067
5067
|
item: _m,
|
|
5068
5068
|
"level-success": "_level-success_z9z4m_4",
|
|
@@ -5076,7 +5076,7 @@ const $a = ({ width: e }) => /* @__PURE__ */ r("div", { style: {
|
|
|
5076
5076
|
"type-icon": "_type-icon_z9z4m_28",
|
|
5077
5077
|
typeIcon: $m
|
|
5078
5078
|
}, Lm = ({ level: e, children: t, customIcon: n, noIcon: a }) => {
|
|
5079
|
-
const { ProjectIconComponent: o } =
|
|
5079
|
+
const { ProjectIconComponent: o } = P(G), l = D(() => {
|
|
5080
5080
|
switch (e) {
|
|
5081
5081
|
case "info":
|
|
5082
5082
|
return /* @__PURE__ */ r(o, { icon: "info" });
|
|
@@ -5131,36 +5131,36 @@ class jm extends Al {
|
|
|
5131
5131
|
...t.props
|
|
5132
5132
|
}, /* @__PURE__ */ g("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
5133
5133
|
...t.props.children,
|
|
5134
|
-
/* @__PURE__ */ r("div", { className: "d-flex gap-2 justify-content-center", children: /* @__PURE__ */ r(
|
|
5134
|
+
/* @__PURE__ */ r("div", { className: "d-flex gap-2 justify-content-center", children: /* @__PURE__ */ r(Ye, { type: "button", onClick: this.reload, children: o.reloadButtonContent }) })
|
|
5135
5135
|
] })) : l === "inject-to-child" && this.state.is404Error && Wr(n) ? Le.cloneElement(n, {
|
|
5136
5136
|
...n.props
|
|
5137
5137
|
}, /* @__PURE__ */ g("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
5138
5138
|
...n.props.children,
|
|
5139
5139
|
/* @__PURE__ */ g("div", { className: "d-flex gap-2 justify-content-center", children: [
|
|
5140
|
-
/* @__PURE__ */ r(
|
|
5141
|
-
/* @__PURE__ */ r(
|
|
5140
|
+
/* @__PURE__ */ r(Ye, { type: "button", onClick: this.reload, children: o.reloadButtonContent }),
|
|
5141
|
+
/* @__PURE__ */ r(Ye, { type: "button", onClick: this.props.navigateBack, children: o.navigateBackButtonContent })
|
|
5142
5142
|
] })
|
|
5143
5143
|
] })) : /* @__PURE__ */ g("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
5144
5144
|
this.state.is404Error ? n : t,
|
|
5145
5145
|
/* @__PURE__ */ g("div", { className: "d-flex gap-2 justify-content-center", children: [
|
|
5146
|
-
l === "none" ? null : /* @__PURE__ */ r(
|
|
5147
|
-
this.state.is404Error && /* @__PURE__ */ r(
|
|
5146
|
+
l === "none" ? null : /* @__PURE__ */ r(Ye, { type: "button", onClick: this.reload, children: o.reloadButtonContent }),
|
|
5147
|
+
this.state.is404Error && /* @__PURE__ */ r(Ye, { type: "button", onClick: this.props.navigateBack, children: o.navigateBackButtonContent })
|
|
5148
5148
|
] })
|
|
5149
5149
|
] }) : a;
|
|
5150
5150
|
}
|
|
5151
5151
|
}
|
|
5152
5152
|
const Mm = (e) => (n) => {
|
|
5153
|
-
const { texts: { errorBoundary: a } } =
|
|
5153
|
+
const { texts: { errorBoundary: a } } = P(G);
|
|
5154
5154
|
return /* @__PURE__ */ r(e, { texts: a, ...n });
|
|
5155
5155
|
}, Pm = Mm(jm), Fm = ({ children: e, title: t }) => {
|
|
5156
|
-
const { texts: { widget: n } } =
|
|
5156
|
+
const { texts: { widget: n } } = P(G), a = Pn();
|
|
5157
5157
|
return U(() => {
|
|
5158
5158
|
console.log("widget wrapper mounted");
|
|
5159
5159
|
}, []), /* @__PURE__ */ r(Pm, { fallback: /* @__PURE__ */ r(La, { title: t, children: n.fallbackError }), reloadButtonDisplay: "inject-to-child", navigateBack: () => a(-1), children: /* @__PURE__ */ r(Rl, { fallback: /* @__PURE__ */ r(La, { title: t, children: /* @__PURE__ */ r(Ql, {}) }), children: e }) });
|
|
5160
5160
|
}, Bm = "_submit-container_j8pmc_1", zm = "_spacer_j8pmc_14", Aa = {
|
|
5161
5161
|
submitContainer: Bm,
|
|
5162
5162
|
spacer: zm
|
|
5163
|
-
}, Hm = ({ children: e, noSpacer: t = !1 }) => /* @__PURE__ */ g(
|
|
5163
|
+
}, Hm = ({ children: e, noSpacer: t = !1 }) => /* @__PURE__ */ g(X, { children: [
|
|
5164
5164
|
!t && /* @__PURE__ */ r("div", { className: Aa.spacer }),
|
|
5165
5165
|
/* @__PURE__ */ r("div", { className: I("luminus-floating-action-container shadow", Aa.submitContainer), children: e })
|
|
5166
5166
|
] }), Vm = "_timeline_g1754_1", Um = "_step-container_g1754_1", Wm = "_step-date_g1754_1", Gm = "_step-content_g1754_4", Ym = "_content-header_g1754_8", qm = "_content-text_g1754_11", Km = "_step-icon_g1754_14", Nt = {
|
|
@@ -5173,8 +5173,8 @@ const Mm = (e) => (n) => {
|
|
|
5173
5173
|
stepIcon: Km
|
|
5174
5174
|
}, Qm = ({ steps: e, dontSort: t }) => /* @__PURE__ */ r("div", { className: Nt.timeline, children: e.sort((n, a) => t ? 0 : Zl(n.date ?? /* @__PURE__ */ new Date(), a.date ?? /* @__PURE__ */ new Date())).map((n, a) => /* @__PURE__ */ g("div", { className: I("row g-0 gx-3", Nt.stepContainer), children: [
|
|
5175
5175
|
/* @__PURE__ */ r("div", { className: "col-3", children: n.date && /* @__PURE__ */ g($, { variant: "caption", className: I("h-100 d-flex flex-column align-items-end justify-content-center gap-0", Nt.stepDate), children: [
|
|
5176
|
-
/* @__PURE__ */ r("div", { children:
|
|
5177
|
-
n.dateFormat === "date" ? null : /* @__PURE__ */ r("div", { children:
|
|
5176
|
+
/* @__PURE__ */ r("div", { children: rt(n.date, "dd.MM.yyyy") }),
|
|
5177
|
+
n.dateFormat === "date" ? null : /* @__PURE__ */ r("div", { children: rt(n.date, "HH:mm") })
|
|
5178
5178
|
] }) }),
|
|
5179
5179
|
/* @__PURE__ */ r("div", { className: "col-9", children: /* @__PURE__ */ g("div", { className: I("h-100 d-flex flex-column gap-1 border-start border-2 p-3", Nt.stepContent), children: [
|
|
5180
5180
|
/* @__PURE__ */ g("div", { className: I("d-flex gap-2 align-items-center", Nt.contentHeader), children: [
|
|
@@ -5215,7 +5215,7 @@ const Mm = (e) => (n) => {
|
|
|
5215
5215
|
backgroundSize: "contain"
|
|
5216
5216
|
} }) : /* @__PURE__ */ r("img", { ...i, alt: t ?? "", src: c ?? o });
|
|
5217
5217
|
}, op = ({ src: e, alt: t, baseUrl: n, customToken: a, placeholder: o, renderAsDivBg: l, ...i }) => {
|
|
5218
|
-
const { data: s } =
|
|
5218
|
+
const { data: s } = _e("/photos/SAS", { silent: !0 }), c = R(() => `${e}?${s}`, [e, s]);
|
|
5219
5219
|
return !s || !e ? null : l ? /* @__PURE__ */ r("div", { ...i, style: {
|
|
5220
5220
|
backgroundImage: c ? `url(${c})` : void 0,
|
|
5221
5221
|
backgroundRepeat: "no-repeat",
|
|
@@ -5239,14 +5239,14 @@ const Mm = (e) => (n) => {
|
|
|
5239
5239
|
sm: tf,
|
|
5240
5240
|
md: nf
|
|
5241
5241
|
}, _n = (e) => {
|
|
5242
|
-
const t = new Date(e), n =
|
|
5242
|
+
const t = new Date(e), n = ft(t.toISOString());
|
|
5243
5243
|
t.setUTCMonth(t.getUTCMonth() + 1), t.setUTCDate(t.getUTCDate() - 1);
|
|
5244
|
-
const a =
|
|
5244
|
+
const a = ft(t.toISOString());
|
|
5245
5245
|
return { from: n, to: a };
|
|
5246
5246
|
}, tn = (e) => {
|
|
5247
|
-
const t = new Date(e), n =
|
|
5247
|
+
const t = new Date(e), n = ft(t.toISOString());
|
|
5248
5248
|
t.setUTCFullYear(t.getUTCFullYear() + 1), t.setUTCDate(t.getUTCDate() - 1);
|
|
5249
|
-
const a =
|
|
5249
|
+
const a = ft(t.toISOString());
|
|
5250
5250
|
return { from: n, to: a };
|
|
5251
5251
|
}, rf = (e, t) => {
|
|
5252
5252
|
if (e === null || t === null)
|
|
@@ -5268,7 +5268,7 @@ const Mm = (e) => (n) => {
|
|
|
5268
5268
|
return c;
|
|
5269
5269
|
const d = new Date(s);
|
|
5270
5270
|
if (e === "D") {
|
|
5271
|
-
const u =
|
|
5271
|
+
const u = ft(d.toISOString());
|
|
5272
5272
|
return {
|
|
5273
5273
|
from: u,
|
|
5274
5274
|
to: u
|
|
@@ -5290,15 +5290,15 @@ const Mm = (e) => (n) => {
|
|
|
5290
5290
|
const d = new Date(s.to);
|
|
5291
5291
|
if (e === "D") {
|
|
5292
5292
|
c.setDate(c.getDate() + i);
|
|
5293
|
-
const u =
|
|
5293
|
+
const u = ft(c.toISOString());
|
|
5294
5294
|
return {
|
|
5295
5295
|
from: u,
|
|
5296
5296
|
to: u
|
|
5297
5297
|
};
|
|
5298
5298
|
}
|
|
5299
5299
|
return e === "M" ? (c.setMonth(c.getMonth() + i), _n(c)) : e === "Y" ? (c.setFullYear(c.getFullYear() + i), tn(c)) : {
|
|
5300
|
-
from:
|
|
5301
|
-
to:
|
|
5300
|
+
from: ft(c.toISOString()),
|
|
5301
|
+
to: ft(d.toISOString())
|
|
5302
5302
|
};
|
|
5303
5303
|
});
|
|
5304
5304
|
}, [e, n]), l = D((i) => {
|
|
@@ -5316,7 +5316,7 @@ const Mm = (e) => (n) => {
|
|
|
5316
5316
|
}, [n, t]);
|
|
5317
5317
|
return { setFromToProp: a, handleArrowClick: o, handleRangeChange: l };
|
|
5318
5318
|
}, ip = ({ fromtoState: [e, t], className: n, size: a }) => {
|
|
5319
|
-
const { texts: { date: o }, ProjectIconComponent: l } =
|
|
5319
|
+
const { texts: { date: o }, ProjectIconComponent: l } = P(G), [i, s] = L("C"), { handleArrowClick: c, handleRangeChange: d, setFromToProp: u } = af(i, s, t), m = R(() => i === "C", [i]), f = ve(!0);
|
|
5320
5320
|
return U(() => {
|
|
5321
5321
|
if (f.current) {
|
|
5322
5322
|
const p = rf(e.from, e.to);
|
|
@@ -5327,26 +5327,26 @@ const Mm = (e) => (n) => {
|
|
|
5327
5327
|
c(-1);
|
|
5328
5328
|
}, children: /* @__PURE__ */ r(l, { icon: "chevron-left" }) }),
|
|
5329
5329
|
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ g("div", { className: "d-flex align-items-center gap-1", children: [
|
|
5330
|
-
/* @__PURE__ */ r(
|
|
5331
|
-
/* @__PURE__ */ r(
|
|
5332
|
-
/* @__PURE__ */ r(
|
|
5330
|
+
/* @__PURE__ */ r(ze, { type: "date", value: e.from, onChange: (p) => u("from", p === null ? null : p.toString()), InputContainer: Ge, size: a }),
|
|
5331
|
+
/* @__PURE__ */ r(vt, { toggle: /* @__PURE__ */ r(yt, { text: o[ja.find((p) => p[0] === i)[1]].substring(0, 1), as: Zm }), children: ja.map((p) => /* @__PURE__ */ r(Re, { disabled: p[0] === i, className: I(p[0] === i ? "text-black-50" : ""), onClick: () => d(p[0]), role: "button", children: o[p[1]] }, p[0])) }),
|
|
5332
|
+
/* @__PURE__ */ r(ze, { type: "date", value: e.to, onChange: (p) => u("to", p === null ? null : p.toString()), InputContainer: Ge, size: a })
|
|
5333
5333
|
] }) }),
|
|
5334
5334
|
/* @__PURE__ */ r(J, { disabled: m, onClick: () => {
|
|
5335
5335
|
c(1);
|
|
5336
5336
|
}, children: /* @__PURE__ */ r(l, { icon: "chevron-right" }) })
|
|
5337
5337
|
] });
|
|
5338
5338
|
}, lp = ({ defaultMonth: e, searchKey: t = "monthFrom", yearMin: n, yearMax: a }) => {
|
|
5339
|
-
const { localizationContext: o } =
|
|
5339
|
+
const { localizationContext: o } = P(G), { dateFnsLocale: l } = P(o), { searchParams: i, setSearch: s } = ql(), c = i.get(t), d = c ? qe(c) : e, u = D((m) => {
|
|
5340
5340
|
s(t, jt(m, { representation: "date" }));
|
|
5341
5341
|
}, [t, s]);
|
|
5342
5342
|
return /* @__PURE__ */ r(Ns, { month: d, onChangeMonth: u, locale: l, yearMin: n, yearMax: a });
|
|
5343
5343
|
}, sp = ({ defaultYear: e, searchKey: t = "yearFrom", ...n }) => {
|
|
5344
|
-
const [a, o] = kt(t, jt(e, { representation: "date" })), l = a ?
|
|
5344
|
+
const [a, o] = kt(t, jt(e, { representation: "date" })), l = a ? qe(a) : e, i = D((s) => {
|
|
5345
5345
|
o(jt(s, { representation: "date" }));
|
|
5346
5346
|
}, [o]);
|
|
5347
5347
|
return /* @__PURE__ */ r(Cs, { year: l, onChangeYear: i, ...n });
|
|
5348
5348
|
}, cp = ({ data: e, showLegend: t = !1, legendPosition: n = "left", onClick: a }) => {
|
|
5349
|
-
const { chartColorPalette: o } =
|
|
5349
|
+
const { chartColorPalette: o } = P(G);
|
|
5350
5350
|
return /* @__PURE__ */ r(Nl, { data: e, margin: {
|
|
5351
5351
|
top: 50,
|
|
5352
5352
|
right: t && n === "right" ? 200 : 100,
|
|
@@ -5375,7 +5375,7 @@ const Mm = (e) => (n) => {
|
|
|
5375
5375
|
] : [], onClick: (l) => a && a(l.data) });
|
|
5376
5376
|
}, of = ({ val: e, translateKey: t, data: n, unit: a }) => {
|
|
5377
5377
|
var c, d;
|
|
5378
|
-
const o = e.point.id.split("."), l = o[0], i = Number(o[1]), s =
|
|
5378
|
+
const o = e.point.id.split("."), l = o[0], i = Number(o[1]), s = R(() => {
|
|
5379
5379
|
const u = e.point.x < 100 ? "56%" : "-56%", m = e.point.y < 60 ? "70px" : "8px";
|
|
5380
5380
|
return { transform: `translate(${u}, ${m})` };
|
|
5381
5381
|
}, [e.point.x, e.point.y]);
|
|
@@ -5393,55 +5393,55 @@ const Mm = (e) => (n) => {
|
|
|
5393
5393
|
] })
|
|
5394
5394
|
] });
|
|
5395
5395
|
}, dp = ({ data: e, xKey: t, yKeys: n, translateKey: a, usePercentageValue: o = !1, variant: l = "default", legendPosition: i, noSort: s = !1, unit: c }) => {
|
|
5396
|
-
const { confirm: d } =
|
|
5396
|
+
const { confirm: d } = it(), { chartColorPalette: u, texts: { chart: m } } = P(G), [f, p] = L(/* @__PURE__ */ new Set()), h = ve(null), w = async () => {
|
|
5397
5397
|
var M;
|
|
5398
5398
|
const T = (M = h.current) == null ? void 0 : M.querySelector("svg");
|
|
5399
5399
|
if (T && await d(m.confirmExport)) {
|
|
5400
|
-
const
|
|
5401
|
-
|
|
5402
|
-
const
|
|
5403
|
-
Sl(new Blob([
|
|
5400
|
+
const F = T.cloneNode(!0);
|
|
5401
|
+
F.setAttribute("fill", "none");
|
|
5402
|
+
const O = new XMLSerializer().serializeToString(F);
|
|
5403
|
+
Sl(new Blob([O], {
|
|
5404
5404
|
type: "image/svg+xml"
|
|
5405
5405
|
}), "graf.svg");
|
|
5406
5406
|
}
|
|
5407
5407
|
}, v = (T) => {
|
|
5408
5408
|
p((M) => {
|
|
5409
|
-
const
|
|
5410
|
-
return
|
|
5409
|
+
const F = new Set(M);
|
|
5410
|
+
return F.has(T.id) ? F.delete(T.id) : F.add(T.id), F;
|
|
5411
5411
|
});
|
|
5412
|
-
}, b =
|
|
5413
|
-
var
|
|
5414
|
-
return typeof M[t] == "number" && typeof T[t] == "number" ? T[t] - M[t] : (T[t] ?? "").toString().localeCompare(((
|
|
5415
|
-
}), [e, s, t]), x =
|
|
5412
|
+
}, b = R(() => s ? e : e.toSorted((T, M) => {
|
|
5413
|
+
var F;
|
|
5414
|
+
return typeof M[t] == "number" && typeof T[t] == "number" ? T[t] - M[t] : (T[t] ?? "").toString().localeCompare(((F = M[t]) == null ? void 0 : F.toString()) ?? "");
|
|
5415
|
+
}), [e, s, t]), x = R(() => {
|
|
5416
5416
|
const T = [];
|
|
5417
5417
|
return n.forEach((M) => {
|
|
5418
5418
|
if (o) {
|
|
5419
|
-
const
|
|
5420
|
-
if (
|
|
5419
|
+
const F = Math.max(...b.map((O) => O[M.key] ?? -1 / 0));
|
|
5420
|
+
if (F === -1 / 0)
|
|
5421
5421
|
return;
|
|
5422
|
-
const
|
|
5423
|
-
b.forEach((
|
|
5424
|
-
|
|
5422
|
+
const E = [];
|
|
5423
|
+
b.forEach((O) => {
|
|
5424
|
+
O[M.key] != null && E.push({ x: O[t], y: F === 0 ? 0 : O[M.key] / F });
|
|
5425
5425
|
}), T.push({
|
|
5426
5426
|
id: M.key,
|
|
5427
|
-
data:
|
|
5427
|
+
data: E
|
|
5428
5428
|
});
|
|
5429
5429
|
} else
|
|
5430
5430
|
T.push({
|
|
5431
5431
|
id: M.key,
|
|
5432
|
-
data: b.map((
|
|
5432
|
+
data: b.map((F) => ({ x: F[t], y: F[M.key] }))
|
|
5433
5433
|
});
|
|
5434
5434
|
}), T;
|
|
5435
5435
|
}, [b, o, t, n]), C = D((T) => {
|
|
5436
5436
|
var M;
|
|
5437
|
-
return /* @__PURE__ */ r(of, { data: b, translateKey: a, val: T, unit: ((M = n.find((
|
|
5438
|
-
var
|
|
5439
|
-
return
|
|
5437
|
+
return /* @__PURE__ */ r(of, { data: b, translateKey: a, val: T, unit: ((M = n.find((F) => {
|
|
5438
|
+
var E;
|
|
5439
|
+
return F.key === ((E = T.point) == null ? void 0 : E.seriesId);
|
|
5440
5440
|
})) == null ? void 0 : M.unit) ?? c ?? void 0 });
|
|
5441
|
-
}, [b, a, c, n]), N =
|
|
5441
|
+
}, [b, a, c, n]), N = R(() => Math.min(...e.map((T) => T[t] ?? 1 / 0)), [e, t]), y = R(() => Math.max(...e.map((T) => T[t] ?? -1 / 0)), [e, t]), S = R(() => {
|
|
5442
5442
|
var T;
|
|
5443
5443
|
return typeof ((T = e == null ? void 0 : e[0]) == null ? void 0 : T[t]);
|
|
5444
|
-
}, [e, t]), _ = i ?? (l === "sideContent" ? "bottom" : "right"), k =
|
|
5444
|
+
}, [e, t]), _ = i ?? (l === "sideContent" ? "bottom" : "right"), k = R(() => !o && l !== "sideContent", [o, l]), j = R(() => [N, y], [y, N]);
|
|
5445
5445
|
return /* @__PURE__ */ r("div", { ref: h, className: "d-flex h-100 w-100", children: /* @__PURE__ */ r(xl, { onClick: () => w(), data: x, xScale: S === "string" ? { type: "point" } : { type: "linear", min: N }, yScale: { type: "linear", nice: !0 }, axisLeft: k ? {
|
|
5446
5446
|
tickSize: 5,
|
|
5447
5447
|
tickPadding: 5,
|
|
@@ -5452,7 +5452,7 @@ const Mm = (e) => (n) => {
|
|
|
5452
5452
|
truncateTickAt: 0
|
|
5453
5453
|
// format: val => `${val * 100} %`,
|
|
5454
5454
|
} : null, axisBottom: {
|
|
5455
|
-
tickValues: l === "sideContent" ?
|
|
5455
|
+
tickValues: l === "sideContent" ? j : void 0
|
|
5456
5456
|
}, gridYValues: l === "sideContent" ? [0] : void 0, legends: _ !== "none" ? [
|
|
5457
5457
|
{
|
|
5458
5458
|
data: n.map((T, M) => ({
|
|
@@ -5528,7 +5528,7 @@ const Mm = (e) => (n) => {
|
|
|
5528
5528
|
}
|
|
5529
5529
|
n[a] = { value: o, defaultValue: o };
|
|
5530
5530
|
}), n;
|
|
5531
|
-
}, sf = "_table_1klfy_1", cf = "_table-header_1klfy_10", df = "_table-row_1klfy_10", uf = "_table-head_1klfy_10", mf = "_filters-row_1klfy_19", ff = "_table-body_1klfy_30", hf = "_table-cell_1klfy_30", pf = "_action-column_1klfy_43", gf = "_sticky-top_1klfy_47", vf = "_sticky-first_1klfy_54", yf = "_sticky-last_1klfy_61",
|
|
5531
|
+
}, sf = "_table_1klfy_1", cf = "_table-header_1klfy_10", df = "_table-row_1klfy_10", uf = "_table-head_1klfy_10", mf = "_filters-row_1klfy_19", ff = "_table-body_1klfy_30", hf = "_table-cell_1klfy_30", pf = "_action-column_1klfy_43", gf = "_sticky-top_1klfy_47", vf = "_sticky-first_1klfy_54", yf = "_sticky-last_1klfy_61", pe = {
|
|
5532
5532
|
table: sf,
|
|
5533
5533
|
tableHeader: cf,
|
|
5534
5534
|
tableRow: df,
|
|
@@ -5540,7 +5540,7 @@ const Mm = (e) => (n) => {
|
|
|
5540
5540
|
stickyTop: gf,
|
|
5541
5541
|
stickyFirst: vf,
|
|
5542
5542
|
stickyLast: yf
|
|
5543
|
-
}, bf = "_input_pxkkh_1",
|
|
5543
|
+
}, bf = "_input_pxkkh_1", nt = {
|
|
5544
5544
|
input: bf
|
|
5545
5545
|
}, wf = "_multiselect_134m5_1", Nf = "_multiselect-menu_134m5_10", xf = "_dropdown-item_134m5_18", Sf = "_special-option_134m5_24", Lt = {
|
|
5546
5546
|
multiselect: wf,
|
|
@@ -5549,15 +5549,15 @@ const Mm = (e) => (n) => {
|
|
|
5549
5549
|
specialOption: Sf
|
|
5550
5550
|
}, Fa = 10, Ba = ({ value: e, field: t, disabled: n, valuesForSelect: a, onChangeHandler: o, separator: l }) => {
|
|
5551
5551
|
var v, b, x, C;
|
|
5552
|
-
const { texts: { dynamicForms: i } } =
|
|
5552
|
+
const { texts: { dynamicForms: i } } = P(G), [s, c] = L("");
|
|
5553
5553
|
a == null || a.sort((N, y) => (N.name ?? "").localeCompare(y.name ?? ""));
|
|
5554
|
-
const d =
|
|
5554
|
+
const d = R(() => {
|
|
5555
5555
|
var N;
|
|
5556
5556
|
return e ? (N = e == null ? void 0 : e.toString()) == null ? void 0 : N.split(l) : [];
|
|
5557
5557
|
}, [e, l]), u = D((N, y) => {
|
|
5558
5558
|
const S = N.split(l), _ = y ? S.every((k) => d.includes(k)) && d.length === S.length ? null : S : N === "" ? void 0 : d.includes(N) ? d.filter((k) => k !== N) : [...d, N];
|
|
5559
5559
|
o(_ != null && _.length ? _.join(l) : null);
|
|
5560
|
-
}, [o, d, l]), m =
|
|
5560
|
+
}, [o, d, l]), m = R(() => {
|
|
5561
5561
|
const N = [
|
|
5562
5562
|
{
|
|
5563
5563
|
value: a.map((y) => {
|
|
@@ -5576,7 +5576,7 @@ const Mm = (e) => (n) => {
|
|
|
5576
5576
|
specialOption: !1
|
|
5577
5577
|
});
|
|
5578
5578
|
}), N;
|
|
5579
|
-
}, [a, i, l]), f =
|
|
5579
|
+
}, [a, i, l]), f = ve(null), p = ve(null), [h, w] = L(!1);
|
|
5580
5580
|
return U(() => {
|
|
5581
5581
|
h && p.current && p.current.focus();
|
|
5582
5582
|
}, [h]), U(() => {
|
|
@@ -5590,8 +5590,8 @@ const Mm = (e) => (n) => {
|
|
|
5590
5590
|
top: (x = f.current) == null ? void 0 : x.getBoundingClientRect().bottom,
|
|
5591
5591
|
maxWidth: `max(300px, ${(C = f.current) == null ? void 0 : C.getBoundingClientRect().width}px)`
|
|
5592
5592
|
}, children: [
|
|
5593
|
-
m.length >= Fa ? /* @__PURE__ */ r(Kt.Item, { className: I("rounded", Lt.dropdownItem, Lt.searchItem), children: /* @__PURE__ */ r(
|
|
5594
|
-
m.filter((N) => N.specialOption ? !0 : s ? Ae(N.value, s) : !0).map((N) => /* @__PURE__ */ r(Kt.Item, { onClick: () => !n && u(N.value, N.specialOption), disabled: n, className: I("rounded", Lt.dropdownItem, { [Lt.specialOption]: N.specialOption }, { "text-muted": n }), children: /* @__PURE__ */ r(
|
|
5593
|
+
m.length >= Fa ? /* @__PURE__ */ r(Kt.Item, { className: I("rounded", Lt.dropdownItem, Lt.searchItem), children: /* @__PURE__ */ r(le.Control, { ref: p, type: "search", size: "sm", value: s, onChange: (N) => c(N.target.value ?? ""), className: "w-100" }) }) : null,
|
|
5594
|
+
m.filter((N) => N.specialOption ? !0 : s ? Ae(N.value, s) : !0).map((N) => /* @__PURE__ */ r(Kt.Item, { onClick: () => !n && u(N.value, N.specialOption), disabled: n, className: I("rounded", Lt.dropdownItem, { [Lt.specialOption]: N.specialOption }, { "text-muted": n }), children: /* @__PURE__ */ r(le.Check, { disabled: n, label: N.label, checked: N.specialOption ? d.length === N.value.split(l).length && d.every((y) => N.value.split(l).includes(y)) : d.includes(N.value), onChange: () => {
|
|
5595
5595
|
} }) }, N.value))
|
|
5596
5596
|
] })
|
|
5597
5597
|
] });
|
|
@@ -5599,18 +5599,18 @@ const Mm = (e) => (n) => {
|
|
|
5599
5599
|
var h;
|
|
5600
5600
|
switch (e) {
|
|
5601
5601
|
case "NUM":
|
|
5602
|
-
return i && i.length > 0 ? f ? /* @__PURE__ */ r(Ba, { field: n, value: (t == null ? void 0 : t.toString()) ?? "", separator: p ?? ",", onChangeHandler: (w) => c(n, w), valuesForSelect: i, disabled: o ? !0 : a ? !l : !1 }) : /* @__PURE__ */ r(
|
|
5602
|
+
return i && i.length > 0 ? f ? /* @__PURE__ */ r(Ba, { field: n, value: (t == null ? void 0 : t.toString()) ?? "", separator: p ?? ",", onChangeHandler: (w) => c(n, w), valuesForSelect: i, disabled: o ? !0 : a ? !l : !1 }) : /* @__PURE__ */ r(Ke, { withoutLabel: !0, InputContainer: Ge, className: nt.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (w) => c(n, w === null ? null : Number(w)), options: i, disabled: o ? !0 : a ? !l : !1, showClearIcon: !d, clearValue: u, dropdownWidth: 200 }) : /* @__PURE__ */ r(ze, { withoutLabel: !0, InputContainer: Ge, className: nt.input, size: "sm", type: "number", value: t === null ? null : Number(t), onChange: (w) => c(n, w === null ? null : Number(w)), disabled: o ? !0 : a ? !l : !1, showClearIcon: !d, clearValue: u });
|
|
5603
5603
|
case "STR":
|
|
5604
5604
|
return i && i.length > 0 ? f ? /* @__PURE__ */ r(Ba, { field: n, value: (t == null ? void 0 : t.toString()) ?? "", separator: p ?? ",", onChangeHandler: (w) => {
|
|
5605
5605
|
c(n, w);
|
|
5606
|
-
}, valuesForSelect: i, disabled: o ? !0 : a ? !l : !1 }) : /* @__PURE__ */ r(
|
|
5606
|
+
}, valuesForSelect: i, disabled: o ? !0 : a ? !l : !1 }) : /* @__PURE__ */ r(Ke, { withoutLabel: !0, InputContainer: Ge, className: nt.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (w) => c(n, (w == null ? void 0 : w.toString()) ?? null), options: i, disabled: o ? !0 : a ? !l : !1, showClearIcon: !d, clearValue: u, dropdownWidth: 200 }) : /* @__PURE__ */ r(ze, { withoutLabel: !0, InputContainer: Ge, className: I(nt.input, nt.longer), size: "sm", type: "text", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (w) => c(n, (w == null ? void 0 : w.toString()) ?? null), disabled: o ? !0 : a ? !l : !1, showClearIcon: !d, clearValue: u });
|
|
5607
5607
|
case "BIT":
|
|
5608
|
-
return /* @__PURE__ */ r(on, { InputContainer:
|
|
5608
|
+
return /* @__PURE__ */ r(on, { InputContainer: Ge, className: nt.input, value: t === !0, onChange: (w) => c(n, w), disabled: o ? !0 : a ? !l : !1 });
|
|
5609
5609
|
case "DT":
|
|
5610
|
-
return /* @__PURE__ */ r(
|
|
5610
|
+
return /* @__PURE__ */ r(ze, { withoutLabel: !0, InputContainer: Ge, className: nt.input, size: "sm", type: "date", value: t ? t.toString().split("T")[0] ?? "" : "", onChange: (w) => c(n, (w == null ? void 0 : w.toString()) ?? null), disabled: o ? !0 : a ? !l : !1, showClearIcon: !d, clearValue: u });
|
|
5611
5611
|
default: {
|
|
5612
5612
|
const w = m == null ? void 0 : m.find((v) => v.type === e);
|
|
5613
|
-
return w ? /* @__PURE__ */ r(w.picker, { className: I(
|
|
5613
|
+
return w ? /* @__PURE__ */ r(w.picker, { className: I(nt.input, nt.longer), value: t ? {
|
|
5614
5614
|
id: (t == null ? void 0 : t.toString()) ?? null,
|
|
5615
5615
|
name: ((h = i == null ? void 0 : i.find((v) => {
|
|
5616
5616
|
var b;
|
|
@@ -5632,7 +5632,7 @@ const Mm = (e) => (n) => {
|
|
|
5632
5632
|
}
|
|
5633
5633
|
}
|
|
5634
5634
|
}, Cf = ({ schema: e, columns: t, setColumns: n, initialItem: a, onEdit: o, onDelete: l, customPickers: i, appDetail: s }) => {
|
|
5635
|
-
const { ProjectIconComponent: c } =
|
|
5635
|
+
const { ProjectIconComponent: c } = P(G), [d, u] = L(a), m = D((h, w) => {
|
|
5636
5636
|
console.log("changeValue", h, w), u((v) => ({
|
|
5637
5637
|
...v,
|
|
5638
5638
|
[h]: {
|
|
@@ -5643,15 +5643,15 @@ const Mm = (e) => (n) => {
|
|
|
5643
5643
|
}, []), f = (h) => (h == null ? void 0 : h.value) !== (h == null ? void 0 : h.defaultValue), p = D(() => Object.keys(d).some((h) => f(d[h])), [d]);
|
|
5644
5644
|
return U(() => {
|
|
5645
5645
|
u(a);
|
|
5646
|
-
}, [a]), /* @__PURE__ */ g("tr", { className: I("table-row",
|
|
5647
|
-
/* @__PURE__ */ r("td", { className: I("table-cell",
|
|
5646
|
+
}, [a]), /* @__PURE__ */ g("tr", { className: I("table-row", pe.tableRow), children: [
|
|
5647
|
+
/* @__PURE__ */ r("td", { className: I("table-cell", pe.tableCell, pe.stickyFirst), children: p() && /* @__PURE__ */ r(J, { color: "success", onClick: () => o(hi(d)), children: /* @__PURE__ */ r(c, { icon: "check" }) }) }),
|
|
5648
5648
|
t.map((h) => {
|
|
5649
5649
|
var w, v;
|
|
5650
|
-
return /* @__PURE__ */ r("td", { className: I("table-cell",
|
|
5650
|
+
return /* @__PURE__ */ r("td", { className: I("table-cell", pe.tableCell), children: /* @__PURE__ */ r(pi, { type: h.type, value: (w = d[h.field ?? ""]) == null ? void 0 : w.value, field: h.field, isReadonly: h.readOnly, isPrimary: e.primaryKey === h.field, valuesForSelect: h.valuesForSelect, addValueToValuesForSelect: (b) => {
|
|
5651
5651
|
n(t.map((x) => x.field === h.field ? { ...x, valuesForSelect: [...x.valuesForSelect ?? [], b] } : x));
|
|
5652
5652
|
}, onChangeHandler: m, hideClearIcon: !f(d[h.field ?? ""]), clearValue: (v = d[h.field ?? ""].defaultValue) == null ? void 0 : v.toString(), customPickers: i, isMultiChoice: h.multiChoice ?? !1, multiChoiceSeparator: h.multiChoiceSeparator ?? null }) }, `${e.id}-${h.field}`);
|
|
5653
5653
|
}),
|
|
5654
|
-
/* @__PURE__ */ g("td", { className: I("table-cell d-flex gap-1",
|
|
5654
|
+
/* @__PURE__ */ g("td", { className: I("table-cell d-flex gap-1", pe.tableCell, pe.stickyLast), children: [
|
|
5655
5655
|
e != null && e.slaves && e.slaves.length > 0 ? e.slaves.map((h, w) => {
|
|
5656
5656
|
var v, b;
|
|
5657
5657
|
return /* @__PURE__ */ r(J, { as: "link", href: `${zt(s, { id: (v = h.id) == null ? void 0 : v.toString() })}?type=dynamic-form&masterId=${(b = d.id) == null ? void 0 : b.value}`, children: /* @__PURE__ */ r($e, { text: h.name ?? "", placement: "left", children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ g($, { variant: "body", className: "d-flex align-items-center text-primary", children: [
|
|
@@ -5663,7 +5663,7 @@ const Mm = (e) => (n) => {
|
|
|
5663
5663
|
] })
|
|
5664
5664
|
] });
|
|
5665
5665
|
}, kf = ({ schema: e, columns: t, setColumns: n, onCreate: a, customPickers: o }) => {
|
|
5666
|
-
const { ProjectIconComponent: l } =
|
|
5666
|
+
const { ProjectIconComponent: l } = P(G), [i, s] = L(null), c = D(() => {
|
|
5667
5667
|
var m;
|
|
5668
5668
|
const u = {};
|
|
5669
5669
|
(m = e.columns) == null || m.forEach((f) => {
|
|
@@ -5713,13 +5713,13 @@ const Mm = (e) => (n) => {
|
|
|
5713
5713
|
o(null), l.currentTarget.classList.remove(xn.dragging);
|
|
5714
5714
|
}, children: /* @__PURE__ */ r("div", { className: I("content", xn.content) }) });
|
|
5715
5715
|
}, Ef = ({ column: e, children: t }) => {
|
|
5716
|
-
const { ProjectIconComponent: n } =
|
|
5716
|
+
const { ProjectIconComponent: n } = P(G);
|
|
5717
5717
|
return e.description ? /* @__PURE__ */ r($e, { placement: "bottom", text: e.description ?? "", children: /* @__PURE__ */ g("div", { className: "d-flex justify-content-between", children: [
|
|
5718
5718
|
t,
|
|
5719
5719
|
/* @__PURE__ */ r(n, { icon: "info" })
|
|
5720
|
-
] }) }) : /* @__PURE__ */ r(
|
|
5720
|
+
] }) }) : /* @__PURE__ */ r(X, { children: t });
|
|
5721
5721
|
}, Of = ({ column: e, sortByField: t, sortByType: n, setSortBy: a }) => {
|
|
5722
|
-
const { ProjectIconComponent: o } =
|
|
5722
|
+
const { ProjectIconComponent: o } = P(G), l = ve(null), i = R(() => {
|
|
5723
5723
|
if (e.valuesForSelect && e.valuesForSelect.length > 0)
|
|
5724
5724
|
return 200;
|
|
5725
5725
|
switch (e.type) {
|
|
@@ -5735,7 +5735,7 @@ const Mm = (e) => (n) => {
|
|
|
5735
5735
|
return 100;
|
|
5736
5736
|
}
|
|
5737
5737
|
}, [e.type, e.valuesForSelect]);
|
|
5738
|
-
return /* @__PURE__ */ g("th", { ref: l, className: I("table-head",
|
|
5738
|
+
return /* @__PURE__ */ g("th", { ref: l, className: I("table-head", pe.tableHead), onClick: () => {
|
|
5739
5739
|
const s = t === e.field ? n : null;
|
|
5740
5740
|
if (s === "asc") {
|
|
5741
5741
|
a(e.field, "desc");
|
|
@@ -5754,7 +5754,7 @@ const Mm = (e) => (n) => {
|
|
|
5754
5754
|
/* @__PURE__ */ r(Tf, { cellRef: l, defaultWidth: i })
|
|
5755
5755
|
] });
|
|
5756
5756
|
}, $f = ({ schema: e, items: t, onEditItem: n, onDeleteItem: a, onCreateItem: o, filters: l, setFilter: i, sortByField: s, sortByType: c, setSortBy: d, selectedMaster: u, customPickers: m, appDetail: f }) => {
|
|
5757
|
-
const { texts: { dynamicForms: p } } =
|
|
5757
|
+
const { texts: { dynamicForms: p } } = P(G), [h, w] = L([]);
|
|
5758
5758
|
return U(() => {
|
|
5759
5759
|
var v, b, x;
|
|
5760
5760
|
w([
|
|
@@ -5773,28 +5773,28 @@ const Mm = (e) => (n) => {
|
|
|
5773
5773
|
};
|
|
5774
5774
|
})) ?? []
|
|
5775
5775
|
]);
|
|
5776
|
-
}, [e, u]), /* @__PURE__ */ g("table", { id: `dynamic-table-${e.id}`, className: I("table table-borderless luminus-df-table",
|
|
5777
|
-
/* @__PURE__ */ g("thead", { className: I("text-nowrap table-header",
|
|
5778
|
-
/* @__PURE__ */ g("tr", { className: I("table-row",
|
|
5779
|
-
/* @__PURE__ */ r("th", { className: I("table-head",
|
|
5776
|
+
}, [e, u]), /* @__PURE__ */ g("table", { id: `dynamic-table-${e.id}`, className: I("table table-borderless luminus-df-table", pe.table), children: [
|
|
5777
|
+
/* @__PURE__ */ g("thead", { className: I("text-nowrap table-header", pe.stickyTop, pe.tableHeader), children: [
|
|
5778
|
+
/* @__PURE__ */ g("tr", { className: I("table-row", pe.tableRow), children: [
|
|
5779
|
+
/* @__PURE__ */ r("th", { className: I("table-head", pe.tableHead, pe.actionColumn, pe.stickyFirst) }),
|
|
5780
5780
|
h.map((v) => /* @__PURE__ */ r(Of, { column: v, sortByField: s, sortByType: c, setSortBy: d }, `${e.id}-${v.field}`)),
|
|
5781
|
-
/* @__PURE__ */ r("th", { className: I("table-head",
|
|
5781
|
+
/* @__PURE__ */ r("th", { className: I("table-head", pe.tableHead, pe.actionColumn, pe.stickyLast) })
|
|
5782
5782
|
] }),
|
|
5783
|
-
/* @__PURE__ */ g("tr", { className: I("table-row filters-row",
|
|
5784
|
-
/* @__PURE__ */ r("th", { className: I("table-head",
|
|
5785
|
-
h.map((v) => /* @__PURE__ */ r("th", { className: I("table-head",
|
|
5783
|
+
/* @__PURE__ */ g("tr", { className: I("table-row filters-row", pe.tableRow, pe.filtersRow), children: [
|
|
5784
|
+
/* @__PURE__ */ r("th", { className: I("table-head", pe.tableHead, pe.actionColumn, pe.stickyFirst) }),
|
|
5785
|
+
h.map((v) => /* @__PURE__ */ r("th", { className: I("table-head", pe.tableHead), children: v.valuesForSelect && v.valuesForSelect.length > 0 || v.type === "BIT" ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(Ke, { InputContainer: Ge, withoutLabel: !0, size: "sm", value: l[v.field] ?? "", onChange: (b) => i(v.field, (b == null ? void 0 : b.toString()) ?? null), options: v.type === "BIT" ? [
|
|
5786
5786
|
{ id: 1, name: p.yes },
|
|
5787
5787
|
{ id: 0, name: p.no }
|
|
5788
|
-
] : v.valuesForSelect ?? [], isNumber: v.type === "BIT", showClearIcon: !0, dropdownWidth: 200 }) }) : /* @__PURE__ */ r(
|
|
5789
|
-
/* @__PURE__ */ r("th", { className: I("table-head",
|
|
5788
|
+
] : v.valuesForSelect ?? [], isNumber: v.type === "BIT", showClearIcon: !0, dropdownWidth: 200 }) }) : /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(ze, { InputContainer: Ge, withoutLabel: !0, size: "sm", type: v.type === "NUM" ? "number" : v.type === "DT" ? "date" : "text", value: l[v.field] ?? "", onChange: (b) => i(v.field, (b == null ? void 0 : b.toString()) ?? null) }) }) }, `${e.id}-${v.field}`)),
|
|
5789
|
+
/* @__PURE__ */ r("th", { className: I("table-head", pe.tableHead, pe.actionColumn, pe.stickyLast) })
|
|
5790
5790
|
] })
|
|
5791
5791
|
] }),
|
|
5792
|
-
/* @__PURE__ */ g("tbody", { className: I("table-body",
|
|
5792
|
+
/* @__PURE__ */ g("tbody", { className: I("table-body", pe.tableBody), children: [
|
|
5793
5793
|
t.filter((v) => v[e.primaryKey ?? ""]).map((v) => /* @__PURE__ */ r(Cf, { schema: e, columns: h, setColumns: w, initialItem: v, onEdit: n, onDelete: a, customPickers: m, appDetail: f }, `${e.id}-${v[e.primaryKey ?? ""].value}`)),
|
|
5794
5794
|
/* @__PURE__ */ r(kf, { schema: e, columns: h, setColumns: w, onCreate: o, customPickers: m })
|
|
5795
5795
|
] })
|
|
5796
5796
|
] });
|
|
5797
|
-
}, Lf = ({ master: e, onChange: t, options: n, label: a }) => /* @__PURE__ */ r("div", { style: { minWidth: "200px" }, children: /* @__PURE__ */ r(
|
|
5797
|
+
}, Lf = ({ master: e, onChange: t, options: n, label: a }) => /* @__PURE__ */ r("div", { style: { minWidth: "200px" }, children: /* @__PURE__ */ r(Ke, { label: a, value: e, onChange: (o) => t(o ? o.toString() : null), options: n, size: "sm" }) }), Af = "_pagination_gujwe_1", za = {
|
|
5798
5798
|
pagination: Af
|
|
5799
5799
|
}, Ha = {
|
|
5800
5800
|
appDetail: "/settings/:id"
|
|
@@ -5806,75 +5806,75 @@ const Mm = (e) => (n) => {
|
|
|
5806
5806
|
apiItemCreate: "/dynamicForms/insert",
|
|
5807
5807
|
apiExportGet: "/dynamicForms/export"
|
|
5808
5808
|
}, up = ({ id: e, page: t, setPage: n, filters: a, setFilter: o, sortByField: l, sortByType: i, setSortBy: s, appUrls: { appDetail: c = Ha.appDetail } = Ha, apiUrls: { apiSchemaGet: d = xt.apiSchemaGet, apiDataGet: u = xt.apiDataGet, apiItemPost: m = xt.apiItemPost, apiItemDelete: f = xt.apiItemDelete, apiItemCreate: p = xt.apiItemCreate, apiExportGet: h = xt.apiExportGet } = xt, customPickers: w }) => {
|
|
5809
|
-
var
|
|
5810
|
-
const { texts: { dynamicForms: v }, ProjectIconComponent: b } =
|
|
5809
|
+
var Fe, Ve, Ue, Ot, Pr, Fr, Br;
|
|
5810
|
+
const { texts: { dynamicForms: v }, ProjectIconComponent: b } = P(G), x = je(), { startLoading: C, stopLoading: N } = P(Je), [y, S] = L(null), [_, k] = L(null), [j, T] = L(null), [M, F] = L(null), [E, O] = L(!1), { addNotification: Z } = Dt(), [H, z] = L([]), { confirm: A } = it(), V = 20, B = V + 1, Y = M ? Math.ceil(M.length / V) : 1, ee = t ? t > 1 : !1, ce = t ? t < Y : !1, ie = t ? (t - 1) * V : 0, xe = t ? t * V : V, W = R(() => M ? M.length > B : !1, [M, B]), oe = R(() => W ? (M == null ? void 0 : M.slice(ie, xe)) ?? null : M ?? null, [W, M, ie, xe]), [ge, De] = kt("masterId", null, "string"), [me, Pe] = L(ge);
|
|
5811
5811
|
U(() => {
|
|
5812
|
-
S(null), k(null),
|
|
5812
|
+
S(null), k(null), O(!1), z([]);
|
|
5813
5813
|
}, [e]), U(() => {
|
|
5814
|
-
|
|
5815
|
-
}, [
|
|
5816
|
-
const
|
|
5817
|
-
C("dynamicFormSchema"), await x.get(`${d}?id=${e}`).then(({ data:
|
|
5818
|
-
S(
|
|
5814
|
+
ge !== null && (Pe(ge), De(null));
|
|
5815
|
+
}, [ge, e, De]);
|
|
5816
|
+
const te = D(async () => {
|
|
5817
|
+
C("dynamicFormSchema"), await x.get(`${d}?id=${e}`).then(({ data: ne }) => {
|
|
5818
|
+
S(ne), N("dynamicFormSchema");
|
|
5819
5819
|
}).catch(() => N("dynamicFormSchema"));
|
|
5820
|
-
}, [x, e, C, N, d]),
|
|
5821
|
-
var
|
|
5822
|
-
if (!(y === null || ((
|
|
5823
|
-
if (y.masterReference && !
|
|
5820
|
+
}, [x, e, C, N, d]), fe = D(async () => {
|
|
5821
|
+
var ne;
|
|
5822
|
+
if (!(y === null || ((ne = y.id) == null ? void 0 : ne.toString()) !== e)) {
|
|
5823
|
+
if (y.masterReference && !me) {
|
|
5824
5824
|
k([]);
|
|
5825
5825
|
return;
|
|
5826
5826
|
}
|
|
5827
|
-
C("dynamicFormData"), await x.get(`${u}?id=${e}&showArchive=${
|
|
5828
|
-
const
|
|
5827
|
+
C("dynamicFormData"), await x.get(`${u}?id=${e}&showArchive=${E}${y.masterReference ? `&master=${me}` : ""}`).then(({ data: de }) => {
|
|
5828
|
+
const ye = de.map((ue) => {
|
|
5829
5829
|
var Ne;
|
|
5830
|
-
return Object.fromEntries(((Ne = y.columns) == null ? void 0 : Ne.filter((
|
|
5831
|
-
|
|
5832
|
-
{ value: ue[
|
|
5830
|
+
return Object.fromEntries(((Ne = y.columns) == null ? void 0 : Ne.filter((Ie) => Ie.field).map((Ie) => [
|
|
5831
|
+
Ie.field,
|
|
5832
|
+
{ value: ue[Ie.field ?? ""], defaultValue: ue[Ie.field ?? ""] }
|
|
5833
5833
|
])) ?? []);
|
|
5834
5834
|
});
|
|
5835
|
-
k(
|
|
5835
|
+
k(ye), N("dynamicFormData");
|
|
5836
5836
|
}).catch(() => N("dynamicFormData"));
|
|
5837
5837
|
}
|
|
5838
|
-
}, [x, e, y, C, N,
|
|
5839
|
-
var
|
|
5840
|
-
y === null || ((
|
|
5838
|
+
}, [x, e, y, C, N, E, me, u]), Me = D(async () => {
|
|
5839
|
+
var ne;
|
|
5840
|
+
y === null || ((ne = y.id) == null ? void 0 : ne.toString()) !== e || y.masterReference && !me || (C("dynamicFormExport"), await x.get(`${h}?id=${e}&showArchive=${E}${y.masterReference ? `&master=${me}` : ""}`, {
|
|
5841
5841
|
responseType: "blob"
|
|
5842
5842
|
}).then((de) => Cl(de, { fallbackName: `export-${e}` })).finally(() => N("dynamicFormExport")));
|
|
5843
|
-
}, [x, e, y, C, N,
|
|
5844
|
-
y && await
|
|
5843
|
+
}, [x, e, y, C, N, E, me, h]), lt = D(async (ne) => (C("dynamicFormEdit"), x.post(`${m}?id=${e}`, ne).then(() => (N("dynamicFormEdit"), z([]), !0)).catch((de) => (N("dynamicFormEdit"), z(Wn(de)), !1))), [x, e, C, N, m]), et = D(async (ne) => (C("dynamicFormDelete"), x.delete(`${f}?id=${e}&pk=${ne}`).then(() => (N("dynamicFormDelete"), z([]), !0)).catch((de) => (N("dynamicFormDelete"), z(Wn(de)), !1))), [x, e, C, N, f]), K = D(async (ne) => (C("dynamicFormCreate"), x.post(`${p}?id=${e}`, ne).then(({ data: de }) => (N("dynamicFormCreate"), z([]), de)).catch((de) => (N("dynamicFormCreate"), z(Wn(de)), null))), [x, e, C, N, p]), Q = D(async (ne) => {
|
|
5844
|
+
y && await lt(y.masterReference ? { ...ne, [y.masterReferenceColumn ?? ""]: me } : ne) && (Z(v.editSuccess, "success"), k((de) => de && de.map((ye) => {
|
|
5845
5845
|
var ue;
|
|
5846
|
-
return ((ue =
|
|
5846
|
+
return ((ue = ye[(y == null ? void 0 : y.primaryKey) ?? ""]) == null ? void 0 : ue.value) === ne[(y == null ? void 0 : y.primaryKey) ?? ""] ? Pa(ne, y) : ye;
|
|
5847
5847
|
})));
|
|
5848
|
-
}, [
|
|
5849
|
-
await
|
|
5848
|
+
}, [Z, lt, y, me, v]), q = D(async (ne) => {
|
|
5849
|
+
await A(v.deleteConfirm) && await et(ne) && (Z(v.deleteSuccess, "success"), k((de) => de && de.filter((ye) => {
|
|
5850
5850
|
var ue;
|
|
5851
|
-
return ((ue =
|
|
5851
|
+
return ((ue = ye[(y == null ? void 0 : y.primaryKey) ?? ""]) == null ? void 0 : ue.value) !== ne;
|
|
5852
5852
|
})));
|
|
5853
|
-
}, [
|
|
5853
|
+
}, [Z, et, v, A, y]), ae = D(async (ne) => {
|
|
5854
5854
|
if (!y)
|
|
5855
5855
|
return !1;
|
|
5856
|
-
const de = await
|
|
5856
|
+
const de = await K(y.masterReference ? { ...ne, [y.masterReferenceColumn ?? ""]: me } : ne);
|
|
5857
5857
|
if (de !== null) {
|
|
5858
|
-
|
|
5859
|
-
const
|
|
5860
|
-
return
|
|
5858
|
+
Z(v.createSuccess, "success");
|
|
5859
|
+
const ye = Pa(ne, y);
|
|
5860
|
+
return ye[(y == null ? void 0 : y.primaryKey) ?? ""] = { value: de, defaultValue: de }, k((ue) => [...ue ?? [], ye]), !0;
|
|
5861
5861
|
}
|
|
5862
5862
|
return !1;
|
|
5863
|
-
}, [
|
|
5864
|
-
|
|
5865
|
-
},
|
|
5863
|
+
}, [Z, K, v, y, me]), be = (ne) => {
|
|
5864
|
+
ne > Y ? n(Y) : ne < 1 && n(1), n(ne);
|
|
5865
|
+
}, he = D(() => {
|
|
5866
5866
|
if (!_ || !y) {
|
|
5867
5867
|
T(null);
|
|
5868
5868
|
return;
|
|
5869
5869
|
}
|
|
5870
|
-
const
|
|
5870
|
+
const ne = _.filter((de) => Object.entries(a).every(([ye, ue]) => {
|
|
5871
5871
|
var Wt, Gt, Yt;
|
|
5872
5872
|
if (ue === null)
|
|
5873
5873
|
return !0;
|
|
5874
|
-
const Ne = (Wt = de[
|
|
5874
|
+
const Ne = (Wt = de[ye]) == null ? void 0 : Wt.value;
|
|
5875
5875
|
if (Ne == null)
|
|
5876
5876
|
return !1;
|
|
5877
|
-
const
|
|
5877
|
+
const Ie = (Gt = y.columns) == null ? void 0 : Gt.find((pn) => pn.field === ye), Vt = Ie == null ? void 0 : Ie.type, Ut = (Ie == null ? void 0 : Ie.values) && ((Yt = Ie == null ? void 0 : Ie.values) == null ? void 0 : Yt.length) > 0;
|
|
5878
5878
|
if (!Vt)
|
|
5879
5879
|
return !1;
|
|
5880
5880
|
switch (Vt) {
|
|
@@ -5890,93 +5890,93 @@ const Mm = (e) => (n) => {
|
|
|
5890
5890
|
return Ne.toString().toLowerCase().includes(ue.toLowerCase());
|
|
5891
5891
|
}
|
|
5892
5892
|
}));
|
|
5893
|
-
T(
|
|
5893
|
+
T(ne);
|
|
5894
5894
|
}, [_, a, y]), se = D(() => {
|
|
5895
|
-
if (!
|
|
5896
|
-
|
|
5895
|
+
if (!j || !y) {
|
|
5896
|
+
F([]);
|
|
5897
5897
|
return;
|
|
5898
5898
|
}
|
|
5899
5899
|
if (!l) {
|
|
5900
|
-
|
|
5900
|
+
F(j);
|
|
5901
5901
|
return;
|
|
5902
5902
|
}
|
|
5903
|
-
|
|
5903
|
+
F([...j].sort((ne, de) => {
|
|
5904
5904
|
var Vt, Ut, Wt, Gt, Yt, pn;
|
|
5905
|
-
const
|
|
5906
|
-
if (!Ne || !
|
|
5905
|
+
const ye = ((Ut = (Vt = ne[l]) == null ? void 0 : Vt.value) == null ? void 0 : Ut.toString()) ?? "", ue = ((Gt = (Wt = de[l]) == null ? void 0 : Wt.value) == null ? void 0 : Gt.toString()) ?? "", Ne = y.columns.find((Xe) => Xe.field === l), Ie = Ne == null ? void 0 : Ne.type;
|
|
5906
|
+
if (!Ne || !Ie || !ye && !ue)
|
|
5907
5907
|
return 0;
|
|
5908
|
-
if (!
|
|
5908
|
+
if (!ye)
|
|
5909
5909
|
return 1;
|
|
5910
5910
|
if (!ue)
|
|
5911
5911
|
return -1;
|
|
5912
5912
|
if (Ne.values && Ne.values.length > 0) {
|
|
5913
|
-
const
|
|
5913
|
+
const Xe = ((Yt = Ne.values.find((Un) => {
|
|
5914
5914
|
var qt;
|
|
5915
|
-
return ((qt = Un.id) == null ? void 0 : qt.toString()) ===
|
|
5916
|
-
})) == null ? void 0 : Yt.name) ?? "",
|
|
5915
|
+
return ((qt = Un.id) == null ? void 0 : qt.toString()) === ye;
|
|
5916
|
+
})) == null ? void 0 : Yt.name) ?? "", st = ((pn = Ne.values.find((Un) => {
|
|
5917
5917
|
var qt;
|
|
5918
5918
|
return ((qt = Un.id) == null ? void 0 : qt.toString()) === ue;
|
|
5919
5919
|
})) == null ? void 0 : pn.name) ?? "";
|
|
5920
|
-
return i === "asc" ?
|
|
5920
|
+
return i === "asc" ? Xe.localeCompare(st) : st.localeCompare(Xe);
|
|
5921
5921
|
}
|
|
5922
|
-
if (
|
|
5923
|
-
const
|
|
5924
|
-
return i === "asc" ?
|
|
5922
|
+
if (Ie === "NUM") {
|
|
5923
|
+
const Xe = Number(ye), st = Number(ue);
|
|
5924
|
+
return i === "asc" ? Xe - st : st - Xe;
|
|
5925
5925
|
}
|
|
5926
|
-
if (
|
|
5927
|
-
const
|
|
5928
|
-
return i === "asc" ?
|
|
5926
|
+
if (Ie === "DT") {
|
|
5927
|
+
const Xe = qe(ye == null ? void 0 : ye.toString()).getTime(), st = qe(ue == null ? void 0 : ue.toString()).getTime();
|
|
5928
|
+
return i === "asc" ? Xe - st : st - Xe;
|
|
5929
5929
|
}
|
|
5930
|
-
return i === "asc" ?
|
|
5930
|
+
return i === "asc" ? ye.toString().localeCompare(ue.toString()) : ue.toString().localeCompare(ye.toString());
|
|
5931
5931
|
}));
|
|
5932
|
-
}, [
|
|
5932
|
+
}, [j, y, l, i]);
|
|
5933
5933
|
return U(() => {
|
|
5934
|
-
|
|
5935
|
-
}, [
|
|
5936
|
-
Me();
|
|
5937
|
-
}, [Me]), U(() => {
|
|
5934
|
+
te();
|
|
5935
|
+
}, [te]), U(() => {
|
|
5938
5936
|
fe();
|
|
5939
5937
|
}, [fe]), U(() => {
|
|
5938
|
+
he();
|
|
5939
|
+
}, [he]), U(() => {
|
|
5940
5940
|
se();
|
|
5941
5941
|
}, [se]), U(() => {
|
|
5942
5942
|
W ? t || n(1) : M && n(null);
|
|
5943
5943
|
}, [M, W, t, n]), U(() => {
|
|
5944
|
-
!W || !t || (t >
|
|
5945
|
-
}, [t, W,
|
|
5944
|
+
!W || !t || (t > Y && n(Y), t < 1 && n(1));
|
|
5945
|
+
}, [t, W, Y, n]), /* @__PURE__ */ g("div", { className: "h-100 w-100 d-flex flex-column", children: [
|
|
5946
5946
|
/* @__PURE__ */ g("div", { className: "mb-3 d-flex justify-content-between align-items-start", children: [
|
|
5947
5947
|
/* @__PURE__ */ g("div", { className: "d-flex align-items-center gap-3", children: [
|
|
5948
5948
|
/* @__PURE__ */ r($, { variant: "h3", children: (y == null ? void 0 : y.name) ?? "" }),
|
|
5949
|
-
(y == null ? void 0 : y.masterReference) && /* @__PURE__ */ r(Lf, { label: ((
|
|
5949
|
+
(y == null ? void 0 : y.masterReference) && /* @__PURE__ */ r(Lf, { label: ((Ve = (Fe = y.columns) == null ? void 0 : Fe.find((ne) => ne.field === y.masterReferenceColumn)) == null ? void 0 : Ve.caption) ?? "", options: ((Ot = (Ue = y.columns) == null ? void 0 : Ue.find((ne) => ne.field === y.masterReferenceColumn)) == null ? void 0 : Ot.values) ?? [], master: me, onChange: (ne) => Pe(ne) })
|
|
5950
5950
|
] }),
|
|
5951
5951
|
/* @__PURE__ */ g("div", { className: "d-flex align-items-center gap-1", children: [
|
|
5952
|
-
(Pr = y == null ? void 0 : y.slaves) == null ? void 0 : Pr.map((
|
|
5953
|
-
var
|
|
5954
|
-
return /* @__PURE__ */ g(
|
|
5952
|
+
(Pr = y == null ? void 0 : y.slaves) == null ? void 0 : Pr.map((ne, de) => {
|
|
5953
|
+
var ye;
|
|
5954
|
+
return /* @__PURE__ */ g(Ye, { as: "link", href: `${zt(c, { id: (ye = ne.id) == null ? void 0 : ye.toString() })}?type=dynamic-form`, children: [
|
|
5955
5955
|
/* @__PURE__ */ g("div", { className: "d-flex align-items-center", children: [
|
|
5956
5956
|
y.slaves.length > 1 ? /* @__PURE__ */ r($, { variant: "caption", className: "text-primary", children: de + 1 }) : null,
|
|
5957
5957
|
/* @__PURE__ */ r(co, {})
|
|
5958
5958
|
] }),
|
|
5959
|
-
|
|
5960
|
-
] },
|
|
5959
|
+
ne.name
|
|
5960
|
+
] }, ne.id);
|
|
5961
5961
|
}),
|
|
5962
|
-
/* @__PURE__ */ g(
|
|
5963
|
-
/* @__PURE__ */ r(Re, { onClick: () =>
|
|
5962
|
+
/* @__PURE__ */ g(vt, { toggle: /* @__PURE__ */ r(yt, { as: Tt }), children: [
|
|
5963
|
+
/* @__PURE__ */ r(Re, { onClick: () => O(!E), children: E ? v.hideArchived : v.showArchived }),
|
|
5964
5964
|
/* @__PURE__ */ r(uo, {}),
|
|
5965
|
-
/* @__PURE__ */ r(Re, { onClick:
|
|
5965
|
+
/* @__PURE__ */ r(Re, { onClick: Me, icon: /* @__PURE__ */ r(b, { icon: "file-download" }), children: v.downloadExport })
|
|
5966
5966
|
] })
|
|
5967
5967
|
] })
|
|
5968
5968
|
] }),
|
|
5969
5969
|
(y == null ? void 0 : y.description) && /* @__PURE__ */ r($, { variant: "body2", className: "mb-3", children: y == null ? void 0 : y.description }),
|
|
5970
|
-
y != null && y.masterReference && !
|
|
5971
|
-
y &&
|
|
5972
|
-
y && /* @__PURE__ */ g(
|
|
5973
|
-
/* @__PURE__ */ r("div", { className: I("rounded border overflow-auto", za.tableContainer), children: /* @__PURE__ */ r($f, { schema: y, items: !W && M && (M == null ? void 0 : M.length) >
|
|
5970
|
+
y != null && y.masterReference && !me ? /* @__PURE__ */ r(He, { variant: "warning", children: v.selectMaster(((Br = (Fr = y.columns) == null ? void 0 : Fr.find((ne) => ne.field === y.masterReferenceColumn)) == null ? void 0 : Br.caption) ?? "").toLowerCase() }) : /* @__PURE__ */ g(X, { children: [
|
|
5971
|
+
y && H.length > 0 && /* @__PURE__ */ r("div", { className: "mb-2", children: /* @__PURE__ */ r(lf, { errors: H, schema: y }) }),
|
|
5972
|
+
y && /* @__PURE__ */ g(X, { children: [
|
|
5973
|
+
/* @__PURE__ */ r("div", { className: I("rounded border overflow-auto", za.tableContainer), children: /* @__PURE__ */ r($f, { schema: y, items: !W && M && (M == null ? void 0 : M.length) > B ? [] : (W ? oe : M) ?? [], onEditItem: Q, onDeleteItem: q, onCreateItem: ae, filters: a, setFilter: o, sortByField: l, sortByType: i, setSortBy: s, selectedMaster: (me == null ? void 0 : me.toString()) ?? null, customPickers: w, appDetail: c }) }),
|
|
5974
5974
|
W && t && /* @__PURE__ */ g("div", { className: I(za.pagination, "d-flex align-items-center gap-3 p-1 border-bottom border-start border-end rounded"), children: [
|
|
5975
5975
|
/* @__PURE__ */ g("div", { className: "d-flex align-items-center gap-1", children: [
|
|
5976
|
-
/* @__PURE__ */ r(J, { color: "primary", onClick: () => be(1), disabled: !
|
|
5977
|
-
/* @__PURE__ */ r(J, { color: "primary", onClick: () => be(t - 1), disabled: !
|
|
5976
|
+
/* @__PURE__ */ r(J, { color: "primary", onClick: () => be(1), disabled: !ee, children: /* @__PURE__ */ r(b, { icon: "chevron-double-left" }) }),
|
|
5977
|
+
/* @__PURE__ */ r(J, { color: "primary", onClick: () => be(t - 1), disabled: !ee, children: /* @__PURE__ */ r(b, { icon: "chevron-left" }) }),
|
|
5978
5978
|
/* @__PURE__ */ r(J, { color: "primary", onClick: () => be(t + 1), disabled: !ce, children: /* @__PURE__ */ r(b, { icon: "chevron-right" }) }),
|
|
5979
|
-
/* @__PURE__ */ r(J, { color: "primary", onClick: () => be(
|
|
5979
|
+
/* @__PURE__ */ r(J, { color: "primary", onClick: () => be(Y), disabled: !ce, children: /* @__PURE__ */ r(b, { icon: "chevron-double-right" }) })
|
|
5980
5980
|
] }),
|
|
5981
5981
|
/* @__PURE__ */ g($, { variant: "body", children: [
|
|
5982
5982
|
v.tablePage,
|
|
@@ -5985,7 +5985,7 @@ const Mm = (e) => (n) => {
|
|
|
5985
5985
|
" ",
|
|
5986
5986
|
v.tablePageFrom,
|
|
5987
5987
|
" ",
|
|
5988
|
-
|
|
5988
|
+
Y
|
|
5989
5989
|
] })
|
|
5990
5990
|
] })
|
|
5991
5991
|
] })
|
|
@@ -5995,20 +5995,20 @@ const Mm = (e) => (n) => {
|
|
|
5995
5995
|
appDetail: "/settings/:id"
|
|
5996
5996
|
}, Ua = {
|
|
5997
5997
|
apiDynamicFormsGet: "/dynamicForms"
|
|
5998
|
-
}, Rf = ({ item: e, children: t }) => e.description ? /* @__PURE__ */ r($e, { placement: "left", text: e.description ?? "", children: /* @__PURE__ */ r("div", { children: t }) }) : /* @__PURE__ */ r(
|
|
5998
|
+
}, Rf = ({ item: e, children: t }) => e.description ? /* @__PURE__ */ r($e, { placement: "left", text: e.description ?? "", children: /* @__PURE__ */ r("div", { children: t }) }) : /* @__PURE__ */ r(X, { children: t }), Wa = ({ item: e, fullSize: t, appDetail: n, search: a, activeId: o }) => {
|
|
5999
5999
|
var l, i, s, c;
|
|
6000
6000
|
return t ? /* @__PURE__ */ g(Oe, { to: `${zt(n, { id: (l = e.id) == null ? void 0 : l.toString() })}?type=${e.type}&search=${a ?? ""}`, className: `text-nowrap list-group-item list-group-item-action ${(o == null ? void 0 : o.toString()) === ((i = e.id) == null ? void 0 : i.toString()) ? "active" : ""}`, children: [
|
|
6001
6001
|
/* @__PURE__ */ r($, { variant: "body", children: e.name }),
|
|
6002
6002
|
e.description && /* @__PURE__ */ r($, { variant: "body2", className: "text-muted mt-2", children: e.description })
|
|
6003
6003
|
] }) : /* @__PURE__ */ r(Rf, { item: e, children: /* @__PURE__ */ r(Oe, { to: `${zt(n, { id: (s = e.id) == null ? void 0 : s.toString() })}?type=${e.type}&search=${a ?? ""}`, className: `text-nowrap list-group-item list-group-item-action ${(o == null ? void 0 : o.toString()) === ((c = e.id) == null ? void 0 : c.toString()) ? "active" : ""}`, children: /* @__PURE__ */ r($, { variant: "body2", children: e.name }) }) }, e.id);
|
|
6004
6004
|
}, mp = ({ activeId: e, anchoredForms: t, otherForms: n = [], groupsDefs: a = [], searchQuery: o, fullSize: l, appUrls: { appDetail: i = Va.appDetail } = Va, apiUrls: { apiDynamicFormsGet: s = Ua.apiDynamicFormsGet } = Ua }) => {
|
|
6005
|
-
const c = je(), { startLoading: d, stopLoading: u } =
|
|
6005
|
+
const c = je(), { startLoading: d, stopLoading: u } = P(Je), [m, f] = L(null), [p] = kt("search", ""), h = R(() => (t == null ? void 0 : t.filter((x) => Ae(x.name, o) || Ae(x.description, o)).sort((x, C) => (x.name ?? "").localeCompare(C.name ?? ""))) ?? [], [t, o]), w = R(() => [
|
|
6006
6006
|
...(m == null ? void 0 : m.map((x) => ({
|
|
6007
6007
|
...x,
|
|
6008
6008
|
type: "dynamic-form"
|
|
6009
6009
|
}))) ?? [],
|
|
6010
6010
|
...n
|
|
6011
|
-
].filter((x) => Ae(x.name, o) || Ae(x.description, o)).sort((x, C) => (x.name ?? "").localeCompare(C.name ?? "")) ?? [], [m, n, o]), v =
|
|
6011
|
+
].filter((x) => Ae(x.name, o) || Ae(x.description, o)).sort((x, C) => (x.name ?? "").localeCompare(C.name ?? "")) ?? [], [m, n, o]), v = R(() => a.map((x) => ({
|
|
6012
6012
|
id: x.id,
|
|
6013
6013
|
name: x.name ?? "",
|
|
6014
6014
|
items: w.filter((C) => C.group === x.id)
|
|
@@ -6019,8 +6019,8 @@ const Mm = (e) => (n) => {
|
|
|
6019
6019
|
}, [c, d, u, s]);
|
|
6020
6020
|
return U(() => {
|
|
6021
6021
|
!m && b();
|
|
6022
|
-
}, [b, m]), [...h, ...w].length > 0 ? /* @__PURE__ */ r(
|
|
6023
|
-
h.length > 0 ? /* @__PURE__ */ g(
|
|
6022
|
+
}, [b, m]), [...h, ...w].length > 0 ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ g("div", { className: "w-auto list-group forms-items overflow-x-hidden", children: [
|
|
6023
|
+
h.length > 0 ? /* @__PURE__ */ g(X, { children: [
|
|
6024
6024
|
h.map((x) => /* @__PURE__ */ r(Wa, { item: x, fullSize: l ?? !1, appDetail: i, search: p, activeId: e }, x.id)),
|
|
6025
6025
|
/* @__PURE__ */ r("hr", { className: "mb-0" })
|
|
6026
6026
|
] }) : null,
|
|
@@ -6030,33 +6030,33 @@ const Mm = (e) => (n) => {
|
|
|
6030
6030
|
/* @__PURE__ */ r("input", { disabled: !0, className: "form-control d-none" }),
|
|
6031
6031
|
t ? /* @__PURE__ */ r(Oe, { to: t, className: "border-bottom luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center", children: n }) : /* @__PURE__ */ r("div", { className: "luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center", children: n })
|
|
6032
6032
|
] }), hp = () => {
|
|
6033
|
-
const { localizationContext: e } =
|
|
6033
|
+
const { localizationContext: e } = P(G), { language: t, setLanguage: n } = P(e), a = (o) => {
|
|
6034
6034
|
n(o);
|
|
6035
6035
|
};
|
|
6036
6036
|
return /* @__PURE__ */ r(Re, { onClick: (o) => {
|
|
6037
6037
|
a(t === "cz" ? "en" : t === "en" ? "de" : "cz"), o.stopPropagation();
|
|
6038
|
-
}, children: t === "cz" ? /* @__PURE__ */ g(
|
|
6038
|
+
}, children: t === "cz" ? /* @__PURE__ */ g(X, { children: [
|
|
6039
6039
|
/* @__PURE__ */ r("strong", { className: "fw-bold", children: "CZ" }),
|
|
6040
6040
|
/* @__PURE__ */ r($t, {}),
|
|
6041
6041
|
/* @__PURE__ */ r("span", { children: "EN" }),
|
|
6042
6042
|
/* @__PURE__ */ r($t, {}),
|
|
6043
6043
|
/* @__PURE__ */ r("span", { children: "DE" })
|
|
6044
|
-
] }) : t === "en" ? /* @__PURE__ */ g(
|
|
6044
|
+
] }) : t === "en" ? /* @__PURE__ */ g(X, { children: [
|
|
6045
6045
|
/* @__PURE__ */ r("strong", { className: "fw-bold", children: "EN" }),
|
|
6046
6046
|
/* @__PURE__ */ r($t, {}),
|
|
6047
6047
|
/* @__PURE__ */ r("span", { children: "DE" }),
|
|
6048
6048
|
/* @__PURE__ */ r($t, {}),
|
|
6049
6049
|
/* @__PURE__ */ r("span", { children: "CZ" })
|
|
6050
|
-
] }) : /* @__PURE__ */ g(
|
|
6050
|
+
] }) : /* @__PURE__ */ g(X, { children: [
|
|
6051
6051
|
/* @__PURE__ */ r("strong", { className: "fw-bold", children: "DE" }),
|
|
6052
6052
|
/* @__PURE__ */ r($t, {}),
|
|
6053
6053
|
/* @__PURE__ */ r("span", { children: "CZ" }),
|
|
6054
6054
|
/* @__PURE__ */ r($t, {}),
|
|
6055
6055
|
/* @__PURE__ */ r("span", { children: "EN" })
|
|
6056
6056
|
] }) });
|
|
6057
|
-
}, pp = ({ controlId: e, ...t }) => /* @__PURE__ */ r(
|
|
6058
|
-
const { user: l } =
|
|
6059
|
-
return /* @__PURE__ */ r(
|
|
6057
|
+
}, pp = ({ controlId: e, ...t }) => /* @__PURE__ */ r(le.Group, { controlId: e, ...t }), gp = ({ employeeId: e, alt: t, noPhotoImage: n, cafmApiUrl: a, showLargeInLightBox: o = !1 }) => {
|
|
6058
|
+
const { user: l } = P(gt), { photoPath: i, photoPathSm: s } = Kl(e);
|
|
6059
|
+
return /* @__PURE__ */ r(X, { children: e && /* @__PURE__ */ r(X, { children: o ? /* @__PURE__ */ r(Im, { baseUrl: a, customToken: l.cafmToken ?? void 0, photos: [
|
|
6060
6060
|
{
|
|
6061
6061
|
id: e.toString(),
|
|
6062
6062
|
alt: t ?? "",
|
|
@@ -6070,8 +6070,8 @@ const Mm = (e) => (n) => {
|
|
|
6070
6070
|
t(l);
|
|
6071
6071
|
};
|
|
6072
6072
|
return /* @__PURE__ */ g(In, { className: `${a}`, children: [
|
|
6073
|
-
/* @__PURE__ */ r(
|
|
6074
|
-
e && /* @__PURE__ */ r(lr, { onClick: () => o(""), variant: "link", className: "border text-muted", children: /* @__PURE__ */ r(
|
|
6073
|
+
/* @__PURE__ */ r(le.Control, { value: e, onChange: (l) => t(l.target.value) }),
|
|
6074
|
+
e && /* @__PURE__ */ r(lr, { onClick: () => o(""), variant: "link", className: "border text-muted", children: /* @__PURE__ */ r(pt, {}) }),
|
|
6075
6075
|
/* @__PURE__ */ r(lr, { onClick: () => n && n(e), variant: "link", className: "border", children: /* @__PURE__ */ r(kl, {}) })
|
|
6076
6076
|
] });
|
|
6077
6077
|
}, yp = ({ value: e, numberPrefix: t, numberSuffix: n, decimalScale: a = 2, fixedDecimalScale: o = !1, className: l }) => /* @__PURE__ */ r(jr, { value: e, displayType: "text", thousandSeparator: " ", decimalScale: a, fixedDecimalScale: o, defaultValue: "", prefix: t, suffix: n, className: l, decimalSeparator: "," }), bp = ({ data: e, keys: t, colors: n, tooltipLabel: a }) => /* @__PURE__ */ r(Il, { data: e.map((o) => ({ name: o.name, ...o.values })), indexBy: "name", keys: t, margin: {
|
|
@@ -6102,8 +6102,8 @@ const Mm = (e) => (n) => {
|
|
|
6102
6102
|
reportCard: Hf,
|
|
6103
6103
|
cardTitleLink: Vf
|
|
6104
6104
|
}, Uf = ({ reportsLastUsedGet: e, getReportRoute: t, getReportName: n }) => {
|
|
6105
|
-
const { texts: { reports: a } } =
|
|
6106
|
-
return /* @__PURE__ */ r(
|
|
6105
|
+
const { texts: { reports: a } } = P(G), { data: o } = _e(e);
|
|
6106
|
+
return /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r($n, { defaultOpen: !0, title: a.index.lastUsedReports, children: /* @__PURE__ */ r(nn, { children: o && o.map((l) => l.versions.map((i) => /* @__PURE__ */ g(An, { as: Oe, to: t(l, i.id), className: "p-1 px-2", action: !0, children: [
|
|
6107
6107
|
/* @__PURE__ */ r($, { variant: "body2", className: "text-uppercase", children: n(l) }),
|
|
6108
6108
|
/* @__PURE__ */ g($, { variant: "caption", className: "d-flex justify-content-between align-items-center gap-3 text-dark", children: [
|
|
6109
6109
|
i.name,
|
|
@@ -6111,14 +6111,14 @@ const Mm = (e) => (n) => {
|
|
|
6111
6111
|
] })
|
|
6112
6112
|
] }))) }) }) });
|
|
6113
6113
|
}, Ga = ({ reportVersion: e, getReportRoute: t, report: n }) => /* @__PURE__ */ r(An, { as: Oe, to: t(n, e.id), className: "p-1 px-2", action: !0, children: /* @__PURE__ */ r($, { variant: "body2", className: "d-flex justify-content-between align-items-center gap-3", children: /* @__PURE__ */ r("div", { className: "link", children: e.name }) }) }), Sn = 5, Ya = ({ versionsList: e, getReportRoute: t, report: n }) => {
|
|
6114
|
-
const { ProjectIconComponent: a } =
|
|
6115
|
-
return /* @__PURE__ */ r(
|
|
6114
|
+
const { ProjectIconComponent: a } = P(G), [o, l] = L(!0), i = R(() => e.length <= Sn ? e : e.slice(0, Sn - 1), [e]), s = R(() => e.length <= Sn ? [] : e.slice(Sn - 1), [e]);
|
|
6115
|
+
return /* @__PURE__ */ r(X, { children: /* @__PURE__ */ g(nn, { children: [
|
|
6116
6116
|
i.map((c) => /* @__PURE__ */ r(Ga, { reportVersion: c, getReportRoute: t, report: n })),
|
|
6117
6117
|
o ? null : s.map((c) => /* @__PURE__ */ r(Ga, { reportVersion: c, getReportRoute: t, report: n })),
|
|
6118
6118
|
s.length > 0 && /* @__PURE__ */ r(An, { onClick: () => l((c) => !c), className: "py-0 d-flex justify-content-center", children: o ? /* @__PURE__ */ r(a, { icon: "chevron-down" }) : /* @__PURE__ */ r(a, { icon: "chevron-up" }) })
|
|
6119
6119
|
] }) });
|
|
6120
6120
|
}, Wf = ({ report: e, getReportRoute: t, getReportName: n, getReportDescription: a }) => {
|
|
6121
|
-
const o =
|
|
6121
|
+
const o = R(() => e.versionsCustom.length === 0 ? { xs: 12 } : { xs: 12, sm: 6, md: 12, lg: 12, xl: 12, xxl: 6 }, [e.versionsCustom.length]);
|
|
6122
6122
|
return /* @__PURE__ */ r("div", { className: "col-12 col-lg-4", children: /* @__PURE__ */ g(
|
|
6123
6123
|
It,
|
|
6124
6124
|
{
|
|
@@ -6139,22 +6139,22 @@ const Mm = (e) => (n) => {
|
|
|
6139
6139
|
reportsGet: "/reports",
|
|
6140
6140
|
reportsLastUsedGet: "/reports/last-used"
|
|
6141
6141
|
}, wp = ({ groups: e, apiUrls: { reportsGet: t = or.reportsGet, reportsLastUsedGet: n = or.reportsLastUsedGet } = or, getReportName: a, getReportDescription: o, getGroupTitle: l, getReportRoute: i }) => {
|
|
6142
|
-
const { texts: { reports: s } } =
|
|
6142
|
+
const { texts: { reports: s } } = P(G), [c, d] = L(""), [u] = kr(c, 500), m = D((v) => v.map((b) => ({
|
|
6143
6143
|
...b,
|
|
6144
6144
|
groupId: !b.groupId || b.groupId === 0 || !e.some((x) => x === b.groupId) ? 999 : b.groupId
|
|
6145
|
-
})), [e]), { data: f } =
|
|
6145
|
+
})), [e]), { data: f } = _e(t, { dataTransformer: m }), p = R(() => {
|
|
6146
6146
|
if (f === null)
|
|
6147
6147
|
return {};
|
|
6148
6148
|
const v = {};
|
|
6149
6149
|
return e.forEach((b) => {
|
|
6150
6150
|
v[b] = f.filter((x) => x.groupId === b && (Ae(a(x), u) || Ae(o(x), u) || x.versions.some((C) => Ae(C.name, u)) || x.versionsCustom.some((C) => Ae(C.name, u))));
|
|
6151
6151
|
}), v;
|
|
6152
|
-
}, [u, e, f, o, a]), h =
|
|
6152
|
+
}, [u, e, f, o, a]), h = R(() => e.filter((v) => {
|
|
6153
6153
|
var b;
|
|
6154
6154
|
return ((b = p[v]) == null ? void 0 : b.length) > 0;
|
|
6155
6155
|
}), [p, e]), { isMobile: w } = Rn();
|
|
6156
|
-
return /* @__PURE__ */ g(
|
|
6157
|
-
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
|
|
6156
|
+
return /* @__PURE__ */ g(at, { unavailableOnMobile: !0, variant: "fullScreen", sideContent: /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(Uf, { reportsLastUsedGet: n, getReportName: a, getReportRoute: i }) }), children: [
|
|
6157
|
+
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(le.Control, { className: "mb-3", type: "search", value: c, onChange: (v) => {
|
|
6158
6158
|
var b;
|
|
6159
6159
|
return d(((b = v.target) == null ? void 0 : b.value) ?? "");
|
|
6160
6160
|
}, placeholder: s.index.search }) }),
|
|
@@ -6169,15 +6169,15 @@ const Mm = (e) => (n) => {
|
|
|
6169
6169
|
sm: Yf,
|
|
6170
6170
|
lg: qf
|
|
6171
6171
|
}, Np = ({ children: e, useMiniDetail: t, miniDetailProps: n, placement: a = "bottom", trigger: o = ["hover"], delayMs: l = 500 }) => {
|
|
6172
|
-
const { user: i } =
|
|
6172
|
+
const { user: i } = P(gt), [s, c] = L(!1), { isLoading: d, detail: u, heading: m, tooltipWidth: f } = t({
|
|
6173
6173
|
...n,
|
|
6174
6174
|
enabled: s && !(i != null && i.external)
|
|
6175
|
-
}), p =
|
|
6175
|
+
}), p = ve(null);
|
|
6176
6176
|
return /* @__PURE__ */ r("div", { onMouseEnter: () => {
|
|
6177
6177
|
p.current = window.setTimeout(() => c(!0), l);
|
|
6178
6178
|
}, onMouseLeave: () => {
|
|
6179
6179
|
p.current && clearTimeout(p.current), c(!1);
|
|
6180
|
-
}, children: s && !(i != null && i.external) ? /* @__PURE__ */ r(_l, { heading: d ? /* @__PURE__ */ r($, { variant: "body2", className: "placeholder-glow", children: /* @__PURE__ */ r("span", { className: "placeholder bg-primary col-6" }) }) : m, content: /* @__PURE__ */ r(
|
|
6180
|
+
}, children: s && !(i != null && i.external) ? /* @__PURE__ */ r(_l, { heading: d ? /* @__PURE__ */ r($, { variant: "body2", className: "placeholder-glow", children: /* @__PURE__ */ r("span", { className: "placeholder bg-primary col-6" }) }) : m, content: /* @__PURE__ */ r(X, { children: d ? /* @__PURE__ */ g($, { variant: "body2", className: "placeholder-glow", children: [
|
|
6181
6181
|
/* @__PURE__ */ g("div", { className: "d-flex justify-content-between py-1", children: [
|
|
6182
6182
|
/* @__PURE__ */ r("span", { className: "placeholder col-5" }),
|
|
6183
6183
|
/* @__PURE__ */ r("span", { className: "placeholder col-4" })
|
|
@@ -6198,17 +6198,17 @@ const Mm = (e) => (n) => {
|
|
|
6198
6198
|
/* @__PURE__ */ r("span", { className: "placeholder col-5" }),
|
|
6199
6199
|
/* @__PURE__ */ r("span", { className: "placeholder col-4" })
|
|
6200
6200
|
] })
|
|
6201
|
-
] }) : u }), placement: a, trigger: o, popoverClassName: I(qa.miniDetailPopover, qa[f]), children: /* @__PURE__ */ r("div", { children: e }) }) : /* @__PURE__ */ r(
|
|
6201
|
+
] }) : u }), placement: a, trigger: o, popoverClassName: I(qa.miniDetailPopover, qa[f]), children: /* @__PURE__ */ r("div", { children: e }) }) : /* @__PURE__ */ r(X, { children: e }) });
|
|
6202
6202
|
}, xp = ({ label: e, value: t }) => /* @__PURE__ */ g("div", { className: "py-1 border-bottom d-flex gap-3 align-items-center justify-content-between", children: [
|
|
6203
6203
|
/* @__PURE__ */ r($, { variant: "caption", children: e }),
|
|
6204
6204
|
/* @__PURE__ */ r($, { variant: "body2", className: "text-end", children: t ?? "-" })
|
|
6205
6205
|
] }), Sp = ({ route: e, variant: t = "link", children: n, className: a, disabled: o = !1, routeParams: l }) => {
|
|
6206
|
-
const { checkUserHasPermissions: i } = mo(), s =
|
|
6206
|
+
const { checkUserHasPermissions: i } = mo(), s = R(() => o || !(e.permissions === void 0 || i(e.permissions)), [i, o, e.permissions]), c = n ?? e.name, d = R(() => {
|
|
6207
6207
|
switch (t) {
|
|
6208
6208
|
case "primaryButton":
|
|
6209
|
-
return
|
|
6209
|
+
return Qe;
|
|
6210
6210
|
case "contextButton":
|
|
6211
|
-
return
|
|
6211
|
+
return Ye;
|
|
6212
6212
|
case "iconButton":
|
|
6213
6213
|
return J;
|
|
6214
6214
|
default:
|
|
@@ -6218,7 +6218,7 @@ const Mm = (e) => (n) => {
|
|
|
6218
6218
|
return t === "link" ? /* @__PURE__ */ r(Oe, { to: cr(e.route, l), className: I("link font-size-14", s ? "disabled" : void 0, a), children: c }) : /* @__PURE__ */ r(d, { as: "link", href: cr(e.route, l), className: I(s ? "disabled" : void 0, a), children: c });
|
|
6219
6219
|
}, Cp = ({ id: e, getTimelineApiPath: t }) => {
|
|
6220
6220
|
var i;
|
|
6221
|
-
const { texts: { approval: n }, ProjectIconComponent: a } =
|
|
6221
|
+
const { texts: { approval: n }, ProjectIconComponent: a } = P(G), { data: o } = _e(t(e)), l = D((s, c = !1) => {
|
|
6222
6222
|
switch (s) {
|
|
6223
6223
|
case gn.Zamitnuto:
|
|
6224
6224
|
return /* @__PURE__ */ r($e, { placement: "left", text: n.stateRejected, children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(a, { icon: "cancel-simple", className: c ? "text-danger" : "bg-danger rounded-circle p-1", iconProps: { fontSize: "14px", color: c ? void 0 : "white" } }) }) });
|
|
@@ -6234,7 +6234,7 @@ const Mm = (e) => (n) => {
|
|
|
6234
6234
|
}, [n, a]);
|
|
6235
6235
|
return /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(Qm, { dontSort: !0, steps: [
|
|
6236
6236
|
o != null && o.startDate ? {
|
|
6237
|
-
date:
|
|
6237
|
+
date: qe(o.startDate),
|
|
6238
6238
|
title: /* @__PURE__ */ r($, { variant: "body2", children: n.startDate }),
|
|
6239
6239
|
dateFormat: "date"
|
|
6240
6240
|
} : null,
|
|
@@ -6259,12 +6259,12 @@ const Mm = (e) => (n) => {
|
|
|
6259
6259
|
};
|
|
6260
6260
|
})) ?? [],
|
|
6261
6261
|
o != null && o.finishedDate ? {
|
|
6262
|
-
date:
|
|
6262
|
+
date: qe(o.finishedDate),
|
|
6263
6263
|
title: /* @__PURE__ */ r($, { variant: "body2", children: n.finishedDate }),
|
|
6264
6264
|
dateFormat: "date"
|
|
6265
6265
|
} : null
|
|
6266
6266
|
].filter((s) => s !== null).map((s) => s) }) });
|
|
6267
|
-
}, Kf = "_state-switch_uc6su_1", Qf = "_switch-button_uc6su_7", Xf = "_bg-layer_uc6su_17", Zf = "_text-layer_uc6su_26", Jf = "_left_uc6su_38", eh = "_right_uc6su_41", th = "_active_uc6su_44",
|
|
6267
|
+
}, Kf = "_state-switch_uc6su_1", Qf = "_switch-button_uc6su_7", Xf = "_bg-layer_uc6su_17", Zf = "_text-layer_uc6su_26", Jf = "_left_uc6su_38", eh = "_right_uc6su_41", th = "_active_uc6su_44", We = {
|
|
6268
6268
|
stateSwitch: Kf,
|
|
6269
6269
|
switchButton: Qf,
|
|
6270
6270
|
bgLayer: Xf,
|
|
@@ -6272,21 +6272,21 @@ const Mm = (e) => (n) => {
|
|
|
6272
6272
|
left: Jf,
|
|
6273
6273
|
right: eh,
|
|
6274
6274
|
active: th
|
|
6275
|
-
}, kp = ({ isLeftStateActive: e, toggleState: t, leftStateLabel: n, rightStateLabel: a }) => /* @__PURE__ */ g("div", { role: "button", className: I("gap-1",
|
|
6276
|
-
/* @__PURE__ */ g($, { variant: "body2", className: I(
|
|
6277
|
-
[
|
|
6275
|
+
}, kp = ({ isLeftStateActive: e, toggleState: t, leftStateLabel: n, rightStateLabel: a }) => /* @__PURE__ */ g("div", { role: "button", className: I("gap-1", We.stateSwitch), onClick: t, children: [
|
|
6276
|
+
/* @__PURE__ */ g($, { variant: "body2", className: I(We.switchButton, We.left, {
|
|
6277
|
+
[We.active]: e
|
|
6278
6278
|
}), children: [
|
|
6279
|
-
/* @__PURE__ */ r("div", { className:
|
|
6280
|
-
/* @__PURE__ */ r("div", { className:
|
|
6279
|
+
/* @__PURE__ */ r("div", { className: We.bgLayer }),
|
|
6280
|
+
/* @__PURE__ */ r("div", { className: We.textLayer, children: n })
|
|
6281
6281
|
] }),
|
|
6282
|
-
/* @__PURE__ */ g($, { variant: "body2", className: I(
|
|
6283
|
-
[
|
|
6282
|
+
/* @__PURE__ */ g($, { variant: "body2", className: I(We.switchButton, We.right, {
|
|
6283
|
+
[We.active]: !e
|
|
6284
6284
|
}), children: [
|
|
6285
|
-
/* @__PURE__ */ r("div", { className:
|
|
6286
|
-
/* @__PURE__ */ r("div", { className:
|
|
6285
|
+
/* @__PURE__ */ r("div", { className: We.bgLayer }),
|
|
6286
|
+
/* @__PURE__ */ r("div", { className: We.textLayer, children: a })
|
|
6287
6287
|
] })
|
|
6288
6288
|
] }), Ip = ({ showArchived: e, BnfTableComponent: t, tableIdentifier: n, detailRoute: a }) => {
|
|
6289
|
-
const { texts: { substitutions: o } } =
|
|
6289
|
+
const { texts: { substitutions: o } } = P(G), { data: l } = _e(`/permissions/substitutions?archived=${e}`), i = R(() => ({ enable: !0, column: "archived" }), []), s = mn(), c = R(() => [
|
|
6290
6290
|
s.accessor("employeeName", {
|
|
6291
6291
|
header: o.index.employeeName,
|
|
6292
6292
|
type: "string",
|
|
@@ -6335,19 +6335,19 @@ const Mm = (e) => (n) => {
|
|
|
6335
6335
|
}), [a]);
|
|
6336
6336
|
return /* @__PURE__ */ r(t, { data: l ?? [], columns: c, tableId: n, pagination: { mode: "enabled" }, archiveHighlighting: i, rowNavigation: d });
|
|
6337
6337
|
}, nh = (e, t) => {
|
|
6338
|
-
const n = je(), a = Pn(), { startLoading: o, stopLoading: l } =
|
|
6338
|
+
const n = je(), a = Pn(), { startLoading: o, stopLoading: l } = P(Je), { zDateRequired: i, zNumberRequired: s } = jn(), { addNotification: c } = Dt(), { refreshAvailableDelegations: d } = P(fo), { user: u } = P(gt), { texts: { substitutions: { detail: m } } } = P(G), f = ho({
|
|
6339
6339
|
id: s(),
|
|
6340
6340
|
employeeId: s(),
|
|
6341
6341
|
substituteId: s(),
|
|
6342
6342
|
from: i(),
|
|
6343
6343
|
to: i(),
|
|
6344
6344
|
roles: Dl(Tl())
|
|
6345
|
-
}), p =
|
|
6345
|
+
}), p = R(() => ({
|
|
6346
6346
|
id: (e == null ? void 0 : e.id) ?? 0,
|
|
6347
6347
|
employeeId: (e == null ? void 0 : e.employeeId) ?? (u == null ? void 0 : u.personalNumber) ?? void 0,
|
|
6348
6348
|
substituteId: (e == null ? void 0 : e.substituteId) ?? void 0,
|
|
6349
|
-
from: (e == null ? void 0 : e.from) ??
|
|
6350
|
-
to: (e == null ? void 0 : e.to) ??
|
|
6349
|
+
from: (e == null ? void 0 : e.from) ?? rt(/* @__PURE__ */ new Date(), "yyyy-MM-dd"),
|
|
6350
|
+
to: (e == null ? void 0 : e.to) ?? rt(/* @__PURE__ */ new Date(), "yyyy-MM-dd"),
|
|
6351
6351
|
roles: (e == null ? void 0 : e.roles) ?? []
|
|
6352
6352
|
}), [
|
|
6353
6353
|
e == null ? void 0 : e.employeeId,
|
|
@@ -6385,15 +6385,15 @@ const Mm = (e) => (n) => {
|
|
|
6385
6385
|
}, [p, h]), { formSchema: f, onSubmit: w, formMethods: h };
|
|
6386
6386
|
}, _p = ({ indexRoute: e }) => {
|
|
6387
6387
|
var N;
|
|
6388
|
-
const { id: t } = po(), { user: n } =
|
|
6388
|
+
const { id: t } = po(), { user: n } = P(gt), a = je(), o = Pn(), { confirm: l } = it(), { texts: { substitutions: { detail: i } } } = P(G), { data: s } = _e(`/permissions/substitutions/${t}`, {
|
|
6389
6389
|
enabled: t !== void 0
|
|
6390
|
-
}), { data: c } =
|
|
6390
|
+
}), { data: c } = _e("/permissions/users"), { onSubmit: d, formMethods: u } = nh(s, e), m = u.watch("employeeId"), { data: f } = _e(`/permissions/roles?userName=${(N = c == null ? void 0 : c.find((y) => y.employeeId === m)) == null ? void 0 : N.name}`, { enabled: m > 0 && !!c }), { refreshAvailableDelegations: p } = P(fo), { checkUserHasPermissions: h } = mo(), w = D(async () => {
|
|
6391
6391
|
await l(i.deleteConfirm) && (await a.delete(`/permissions/substitutions/${t}`), p(), o(e));
|
|
6392
|
-
}, [a, l, t, o, p, i, e]), v =
|
|
6393
|
-
return /* @__PURE__ */ r(
|
|
6392
|
+
}, [a, l, t, o, p, i, e]), v = R(() => m !== (n == null ? void 0 : n.personalNumber) && !h(["ZASTUP_MODIFY"]), [h, m, n == null ? void 0 : n.personalNumber]), b = u.watch("roles"), x = R(() => f == null ? void 0 : f.filter((y) => y.canBeRepresented), [f]), C = R(() => (x == null ? void 0 : x.every((y) => b == null ? void 0 : b.includes(y.name))) ?? !1, [x, b]);
|
|
6393
|
+
return /* @__PURE__ */ r(at, { title: /* @__PURE__ */ g("div", { className: "d-flex justify-content-between align-items-center", children: [
|
|
6394
6394
|
/* @__PURE__ */ r($, { variant: "h3", children: i.title }),
|
|
6395
|
-
/* @__PURE__ */ r(
|
|
6396
|
-
] }), children: /* @__PURE__ */ r(Bn, { ...u, children: /* @__PURE__ */ r(Fl, { disabled: v, children: /* @__PURE__ */ g(
|
|
6395
|
+
/* @__PURE__ */ r(vt, { toggle: /* @__PURE__ */ r(yt, { as: Tt }), children: /* @__PURE__ */ r(Re, { onClick: () => w(), children: i.delete }) })
|
|
6396
|
+
] }), children: /* @__PURE__ */ r(Bn, { ...u, children: /* @__PURE__ */ r(Fl, { disabled: v, children: /* @__PURE__ */ g(le, { onSubmit: u.handleSubmit(d), className: "h-100", children: [
|
|
6397
6397
|
/* @__PURE__ */ g(Lr, { className: "h-100 gx-3 gy-3", children: [
|
|
6398
6398
|
/* @__PURE__ */ r(En, { sm: 12, md: 4, children: /* @__PURE__ */ g(It, { title: i.title, children: [
|
|
6399
6399
|
/* @__PURE__ */ r(mr, { formField: "employeeId", options: (c == null ? void 0 : c.map((y) => ({
|
|
@@ -6429,7 +6429,7 @@ const Mm = (e) => (n) => {
|
|
|
6429
6429
|
/* @__PURE__ */ r(sc, { onStorno: () => u.reset(), children: i.save })
|
|
6430
6430
|
] }) }) }) });
|
|
6431
6431
|
}, rh = ({ BnfTableComponent: e, items: t, onEditItem: n, tableIdentifier: a }) => {
|
|
6432
|
-
const { texts: { approval: o } } =
|
|
6432
|
+
const { texts: { approval: o } } = P(G), l = R(() => t.map((d) => ({ ...d, archive: !!(d.dateTo && El(qe(d.dateTo))) })), [t]), i = mn(), s = R(() => [
|
|
6433
6433
|
i.accessor("id", {
|
|
6434
6434
|
header: "Id",
|
|
6435
6435
|
type: "number",
|
|
@@ -6488,7 +6488,7 @@ const Mm = (e) => (n) => {
|
|
|
6488
6488
|
}, [t, n]);
|
|
6489
6489
|
return /* @__PURE__ */ r(e, { tableId: a, columns: s, data: l, onRowClick: c });
|
|
6490
6490
|
}, ah = (e, t = "/approval/delegation/runningProcess", n = "/approval/delegation", a = (o) => `/approval/delegation/${o}`) => {
|
|
6491
|
-
const o = je(), { startLoading: l, stopLoading: i } =
|
|
6491
|
+
const o = je(), { startLoading: l, stopLoading: i } = P(Je), s = D(async (u, m) => {
|
|
6492
6492
|
let f = null;
|
|
6493
6493
|
l("getHasRunningProcesses");
|
|
6494
6494
|
try {
|
|
@@ -6505,7 +6505,7 @@ const Mm = (e) => (n) => {
|
|
|
6505
6505
|
return { getHasRunningProcesses: s, postEditDelegation: c, postDeleteDelegation: d };
|
|
6506
6506
|
}, oh = ({ model: e, handleClose: t, onConfirm: n, apiApprovalDefinitions: a, apiHasRunningProcess: o, apiPostEditDelegation: l, apiDeleteDelegation: i, EmployeePickerComponent: s }) => {
|
|
6507
6507
|
var _, k;
|
|
6508
|
-
const { ProjectIconComponent: c, texts: { approval: d } } =
|
|
6508
|
+
const { ProjectIconComponent: c, texts: { approval: d } } = P(G), { zDate: u, zObjectIdIntRequired: m, zDateRequired: f } = jn(), { addNotification: p } = Dt(), { confirm: h } = it(), { data: w } = _e(a), v = ho({
|
|
6509
6509
|
employee: m(),
|
|
6510
6510
|
delegate: m(),
|
|
6511
6511
|
dateFrom: f(),
|
|
@@ -6513,20 +6513,20 @@ const Mm = (e) => (n) => {
|
|
|
6513
6513
|
approval: m()
|
|
6514
6514
|
}), b = Fn({ resolver: Mn(v) }), { getHasRunningProcesses: x, postEditDelegation: C, postDeleteDelegation: N } = ah(e, o, l, i);
|
|
6515
6515
|
U(() => {
|
|
6516
|
-
var
|
|
6516
|
+
var j, T, M, F, E, O;
|
|
6517
6517
|
e && (b.reset({
|
|
6518
6518
|
...e,
|
|
6519
|
-
employee: { id: ((
|
|
6519
|
+
employee: { id: ((j = e.employee) == null ? void 0 : j.id) ?? 0 },
|
|
6520
6520
|
delegate: { id: ((T = e.delegate) == null ? void 0 : T.id) ?? 0 },
|
|
6521
6521
|
dateFrom: e.dateFrom ?? "",
|
|
6522
6522
|
approval: { id: ((M = e.approval) == null ? void 0 : M.id) ?? 0 }
|
|
6523
|
-
}, { keepDirty: !1 }), (
|
|
6523
|
+
}, { keepDirty: !1 }), (F = e.employee) != null && F.id || kn(b, "employee.id"), (E = e.delegate) != null && E.id || kn(b, "delegate.id"), (O = e.approval) != null && O.id || kn(b, "approval.id"));
|
|
6524
6524
|
}, [e, b]);
|
|
6525
|
-
const y = async (
|
|
6525
|
+
const y = async (j) => {
|
|
6526
6526
|
if (!e)
|
|
6527
6527
|
return;
|
|
6528
6528
|
const T = { ...e };
|
|
6529
|
-
Object.assign(T,
|
|
6529
|
+
Object.assign(T, j), Ol(T);
|
|
6530
6530
|
const M = await x(T.employee.id, T.approval.id);
|
|
6531
6531
|
T.includeExisting = M && !!await h(d.delegations.delegateExistingsConfirmMessage), await C(T, b) && (p(e.id ? d.delegations.editSuccess : d.delegations.createSuccess, "success"), n());
|
|
6532
6532
|
}, S = D(async () => {
|
|
@@ -6535,9 +6535,9 @@ const Mm = (e) => (n) => {
|
|
|
6535
6535
|
return /* @__PURE__ */ g(re, { show: e !== null, onHide: () => t(), children: [
|
|
6536
6536
|
/* @__PURE__ */ g(re.Header, { closeButton: !0, children: [
|
|
6537
6537
|
/* @__PURE__ */ r(re.Title, { className: "w-100", children: e != null && e.id ? d.delegations.detailTitle : d.delegations.newTitle }),
|
|
6538
|
-
e != null && e.id ? /* @__PURE__ */ r(
|
|
6538
|
+
e != null && e.id ? /* @__PURE__ */ r(vt, { toggle: /* @__PURE__ */ r(yt, { as: Tt }), className: "modalHeaderDropdown", children: /* @__PURE__ */ r(Re, { color: "danger", icon: /* @__PURE__ */ r(c, { icon: "delete" }), onClick: S, children: d.delegations.delete }) }) : null
|
|
6539
6539
|
] }),
|
|
6540
|
-
/* @__PURE__ */ r(Bn, { ...b, children: /* @__PURE__ */ g(
|
|
6540
|
+
/* @__PURE__ */ r(Bn, { ...b, children: /* @__PURE__ */ g(le, { onSubmit: b.handleSubmit(y), noValidate: !0, children: [
|
|
6541
6541
|
/* @__PURE__ */ g(re.Body, { children: [
|
|
6542
6542
|
/* @__PURE__ */ r(mr, { label: d.delegations.detail.approval, isNumber: !0, formField: "approval.id", options: w ?? [], required: !0 }),
|
|
6543
6543
|
/* @__PURE__ */ r(s, { label: d.delegations.detail.employee, formField: "employee.id", defaultSelection: (_ = e == null ? void 0 : e.employee) != null && _.id ? { id: e.employee.id, name: e.employee.name } : null, required: !0 }),
|
|
@@ -6545,7 +6545,7 @@ const Mm = (e) => (n) => {
|
|
|
6545
6545
|
/* @__PURE__ */ r(Ft, { label: d.delegations.detail.dateFrom, formField: "dateFrom", type: "date", required: !0 }),
|
|
6546
6546
|
/* @__PURE__ */ r(Ft, { label: d.delegations.detail.dateTo, formField: "dateTo", type: "date" })
|
|
6547
6547
|
] }),
|
|
6548
|
-
/* @__PURE__ */ r(re.Footer, { className: "justify-content-end", children: /* @__PURE__ */ r(
|
|
6548
|
+
/* @__PURE__ */ r(re.Footer, { className: "justify-content-end", children: /* @__PURE__ */ r(Qe, { type: "submit", children: e != null && e.id ? d.delegations.save : d.delegations.create }) })
|
|
6549
6549
|
] }) })
|
|
6550
6550
|
] });
|
|
6551
6551
|
}, At = {
|
|
@@ -6555,10 +6555,10 @@ const Mm = (e) => (n) => {
|
|
|
6555
6555
|
apiDeleteDelegation: (e) => `/approval/delegation/${e}`,
|
|
6556
6556
|
apiApprovalDefinitions: "/approval/definition"
|
|
6557
6557
|
}, Dp = ({ apiUrls: { apiApprovalDelegations: e = At.apiApprovalDelegations, apiHasRunningProcess: t = At.apiHasRunningProcess, apiPostEditDelegation: n = At.apiPostEditDelegation, apiDeleteDelegation: a = At.apiDeleteDelegation, apiApprovalDefinitions: o = At.apiApprovalDefinitions } = At, BnfTableComponent: l, tableIdentifier: i, EmployeePickerComponent: s }) => {
|
|
6558
|
-
const { texts: { approval: c } } =
|
|
6559
|
-
return /* @__PURE__ */ g(
|
|
6558
|
+
const { texts: { approval: c } } = P(G), [d, u] = kt("archive", !1), [m, f] = L(null), { data: p, reloadData: h } = _e(`${e}?archive=${d}`);
|
|
6559
|
+
return /* @__PURE__ */ g(at, { variant: "fullScreen", title: /* @__PURE__ */ g("div", { className: "d-flex justify-content-between align-items-center", children: [
|
|
6560
6560
|
/* @__PURE__ */ r($, { variant: "h3", children: c.delegations.title }),
|
|
6561
|
-
/* @__PURE__ */ g(
|
|
6561
|
+
/* @__PURE__ */ g(vt, { toggle: /* @__PURE__ */ r(yt, { as: Tt }), children: [
|
|
6562
6562
|
/* @__PURE__ */ r(Re, { onClick: () => f({
|
|
6563
6563
|
id: null,
|
|
6564
6564
|
employee: null,
|
|
@@ -6578,7 +6578,7 @@ const Mm = (e) => (n) => {
|
|
|
6578
6578
|
}, EmployeePickerComponent: s, apiApprovalDefinitions: o, apiHasRunningProcess: t, apiPostEditDelegation: n, apiDeleteDelegation: a })
|
|
6579
6579
|
] });
|
|
6580
6580
|
}, ih = ({ show: e, handleClose: t, onConfirm: n, currentEmployee: a, approvalApproverId: o, apiPostChangeEmployee: l, EmployeePickerComponent: i }) => {
|
|
6581
|
-
const { texts: { approval: s } } =
|
|
6581
|
+
const { texts: { approval: s } } = P(G), { zNumberRequired: c } = jn(), d = je(), { startLoading: u, stopLoading: m } = P(Je), { addNotification: f } = Dt(), p = io.object({
|
|
6582
6582
|
employeeId: c()
|
|
6583
6583
|
}), h = Fn({
|
|
6584
6584
|
resolver: Mn(p)
|
|
@@ -6594,14 +6594,14 @@ const Mm = (e) => (n) => {
|
|
|
6594
6594
|
};
|
|
6595
6595
|
return /* @__PURE__ */ g(re, { show: e, onHide: () => t(), children: [
|
|
6596
6596
|
/* @__PURE__ */ r(re.Header, { closeButton: !0, children: /* @__PURE__ */ r(re.Title, { children: s.definitions.changeEmployeeTitle }) }),
|
|
6597
|
-
/* @__PURE__ */ r(Bn, { ...h, children: /* @__PURE__ */ g(
|
|
6597
|
+
/* @__PURE__ */ r(Bn, { ...h, children: /* @__PURE__ */ g(le, { onSubmit: h.handleSubmit(v), noValidate: !0, children: [
|
|
6598
6598
|
/* @__PURE__ */ r(re.Body, { children: /* @__PURE__ */ r(i, { formField: "employeeId", defaultSelection: a, label: s.definitions.changeEmployeeNewEmployee, required: !0 }) }),
|
|
6599
|
-
/* @__PURE__ */ r(re.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ r(
|
|
6599
|
+
/* @__PURE__ */ r(re.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ r(Qe, { type: "submit", children: s.definitions.changeEmployeeConfirm }) })
|
|
6600
6600
|
] }) })
|
|
6601
6601
|
] });
|
|
6602
6602
|
}, lh = ({ level: e, reloadApproval: t, appEmployeeDetail: n, apiPostChangeEmployee: a, EmployeePickerComponent: o }) => {
|
|
6603
6603
|
var d;
|
|
6604
|
-
const { ProjectIconComponent: l, texts: { approval: i } } =
|
|
6604
|
+
const { ProjectIconComponent: l, texts: { approval: i } } = P(G), [s, c] = L(null);
|
|
6605
6605
|
return /* @__PURE__ */ g("div", { className: "bg-white rounded p-2 px-3 d-flex flex-column gap-2 shadow-sm", children: [
|
|
6606
6606
|
/* @__PURE__ */ g("div", { className: "d-flex align-items-center justify-content-between", children: [
|
|
6607
6607
|
/* @__PURE__ */ r($, { variant: "body", children: i.definitions.nthLevel(e.index + 1) }),
|
|
@@ -6609,7 +6609,7 @@ const Mm = (e) => (n) => {
|
|
|
6609
6609
|
] }),
|
|
6610
6610
|
e.approvers && e.approvers.length > 0 ? /* @__PURE__ */ r("div", { className: "list-group", children: (d = e.approvers) == null ? void 0 : d.map((u) => /* @__PURE__ */ g("div", { className: "list-group-item ms-3 p-1 px-2 d-flex align-items-center justify-content-between gap-5", children: [
|
|
6611
6611
|
/* @__PURE__ */ g($, { variant: "body2", className: "d-flex align-items-center justify-content-between gap-2", children: [
|
|
6612
|
-
u.employeeId ? /* @__PURE__ */ g(
|
|
6612
|
+
u.employeeId ? /* @__PURE__ */ g(X, { children: [
|
|
6613
6613
|
/* @__PURE__ */ r(l, { icon: "user" }),
|
|
6614
6614
|
/* @__PURE__ */ r(J, { size: "sm", onClick: () => c({
|
|
6615
6615
|
id: u.id,
|
|
@@ -6620,7 +6620,7 @@ const Mm = (e) => (n) => {
|
|
|
6620
6620
|
}), children: /* @__PURE__ */ r(l, { icon: "edit" }) }),
|
|
6621
6621
|
/* @__PURE__ */ r(Oe, { to: n(u.employeeId), className: "link", children: u.employeeName })
|
|
6622
6622
|
] }) : null,
|
|
6623
|
-
u.role ? /* @__PURE__ */ g(
|
|
6623
|
+
u.role ? /* @__PURE__ */ g(X, { children: [
|
|
6624
6624
|
/* @__PURE__ */ r(l, { icon: "role" }),
|
|
6625
6625
|
" ",
|
|
6626
6626
|
/* @__PURE__ */ r("span", { className: "fw-bold text-uppercase", children: u.role })
|
|
@@ -6633,7 +6633,7 @@ const Mm = (e) => (n) => {
|
|
|
6633
6633
|
}, apiPostChangeEmployee: a, EmployeePickerComponent: o })
|
|
6634
6634
|
] });
|
|
6635
6635
|
}, sh = ({ approval: e, apiApprovalDelegations: t, appEmployeeDetail: n }) => {
|
|
6636
|
-
const { ProjectIconComponent: a, texts: { approval: o } } =
|
|
6636
|
+
const { ProjectIconComponent: a, texts: { approval: o } } = P(G), { data: l } = _e(t), i = R(() => l ? l.filter((s) => {
|
|
6637
6637
|
var c;
|
|
6638
6638
|
return ((c = s.approval) == null ? void 0 : c.id) === e.id;
|
|
6639
6639
|
}) : null, [l, e]);
|
|
@@ -6655,11 +6655,11 @@ const Mm = (e) => (n) => {
|
|
|
6655
6655
|
] })
|
|
6656
6656
|
] }, s.id);
|
|
6657
6657
|
}) }) : null }),
|
|
6658
|
-
i && i.length === 0 ? /* @__PURE__ */ r(
|
|
6658
|
+
i && i.length === 0 ? /* @__PURE__ */ r(He, { variant: "secondary", size: "sm", children: o.delegations.noDelegations }) : null
|
|
6659
6659
|
] });
|
|
6660
6660
|
}, ch = ({ approval: e, reloadApproval: t, appEmployeeDetail: n, apiPostChangeEmployee: a, apiApprovalDelegations: o, EmployeePickerComponent: l }) => {
|
|
6661
6661
|
var s, c;
|
|
6662
|
-
const { texts: { approval: i } } =
|
|
6662
|
+
const { texts: { approval: i } } = P(G);
|
|
6663
6663
|
return /* @__PURE__ */ g("div", { className: "row g-0 overflow-hidden h-100", children: [
|
|
6664
6664
|
/* @__PURE__ */ r("div", { className: "col-7 overflow-hidden h-100", children: /* @__PURE__ */ g("div", { className: "d-flex flex-column gap-0 overflow-hidden h-100", children: [
|
|
6665
6665
|
/* @__PURE__ */ g("div", { className: "px-4 pt-1 d-flex align-items-center justify-content-between", children: [
|
|
@@ -6683,15 +6683,15 @@ const Mm = (e) => (n) => {
|
|
|
6683
6683
|
appApprovalsDelegations: "/approvals/delegations",
|
|
6684
6684
|
appEmployeeDetail: (e) => `/employees/${e}`
|
|
6685
6685
|
}, Tp = ({ appUrls: { appApprovalsDelegations: e = ir.appApprovalsDelegations, appEmployeeDetail: t = ir.appEmployeeDetail } = ir, apiUrls: { apiApprovalDefinitions: n = Zt.apiApprovalDefinitions, apiApprovalDefinitionDetail: a = Zt.apiApprovalDefinitionDetail, apiPostChangeEmployee: o = Zt.apiPostChangeEmployee, apiApprovalDelegations: l = Zt.apiApprovalDelegations } = Zt, EmployeePickerComponent: i }) => {
|
|
6686
|
-
const { ProjectIconComponent: s, texts: { approval: c } } =
|
|
6686
|
+
const { ProjectIconComponent: s, texts: { approval: c } } = P(G), { data: d } = _e(n), [u, m] = kt("approval", null), { data: f, reloadData: p } = _e(a(u ?? 0), {
|
|
6687
6687
|
enabled: u !== null
|
|
6688
6688
|
});
|
|
6689
6689
|
return U(() => {
|
|
6690
6690
|
var h;
|
|
6691
6691
|
u || m(((h = d == null ? void 0 : d.at(0)) == null ? void 0 : h.id) ?? null);
|
|
6692
|
-
}, [d, u, m]), /* @__PURE__ */ r(
|
|
6692
|
+
}, [d, u, m]), /* @__PURE__ */ r(at, { variant: "fullScreen", title: /* @__PURE__ */ g("div", { className: "d-flex justify-content-between align-items-center", children: [
|
|
6693
6693
|
/* @__PURE__ */ r($, { variant: "h3", children: c.definitions.title }),
|
|
6694
|
-
/* @__PURE__ */ r(
|
|
6694
|
+
/* @__PURE__ */ r(Ye, { as: "link", href: e, icon: /* @__PURE__ */ r(s, { icon: "link" }), children: c.definitions.delegationsDefinitions })
|
|
6695
6695
|
] }), children: /* @__PURE__ */ g("div", { className: "row g-0 h-max-100 overflow-hidden", children: [
|
|
6696
6696
|
/* @__PURE__ */ r("div", { className: "col-2 overflow-hidden h-100", children: /* @__PURE__ */ r($, { variant: "body2", className: "overflow-x-hidden overflow-y-auto h-100", children: /* @__PURE__ */ r("div", { className: "list-group", children: d == null ? void 0 : d.sort((h, w) => (h.name ?? "").localeCompare(w.name ?? "")).map((h) => /* @__PURE__ */ g("div", { role: "button", className: I("list-group-item list-group-item-action p-2 d-flex gap-3 align-items-center justify-content-between", {
|
|
6697
6697
|
"bg-primary text-white": u === h.id
|
|
@@ -6705,25 +6705,25 @@ const Mm = (e) => (n) => {
|
|
|
6705
6705
|
/* @__PURE__ */ r("div", { className: "col-10 overflow-hidden h-100", children: f ? /* @__PURE__ */ r(ch, { approval: f, reloadApproval: p, appEmployeeDetail: t, apiPostChangeEmployee: o, EmployeePickerComponent: i, apiApprovalDelegations: l }) : null })
|
|
6706
6706
|
] }) });
|
|
6707
6707
|
}, Ep = ({ overviewApiPath: e = (t) => `/notification/email/overview?date=${t}` }) => {
|
|
6708
|
-
const { ProjectIconComponent: t, texts: { emailOverview: n } } =
|
|
6708
|
+
const { ProjectIconComponent: t, texts: { emailOverview: n } } = P(G), [a, o] = kt("date", jt(/* @__PURE__ */ new Date(), { representation: "date" })), l = R(() => a ? qe(a) : /* @__PURE__ */ new Date(), [a]), { data: i } = _e(e(jt(l, { representation: "date" }))), s = D((m) => {
|
|
6709
6709
|
o(jt(Xl(l, m), { representation: "date" }));
|
|
6710
|
-
}, [l, o]), [c, d] = kt("email", null), u =
|
|
6711
|
-
return /* @__PURE__ */ r(
|
|
6710
|
+
}, [l, o]), [c, d] = kt("email", null), u = R(() => c ? i == null ? void 0 : i.find((m) => m.id === c) : null, [c, i]);
|
|
6711
|
+
return /* @__PURE__ */ r(at, { variant: "fullScreen", title: /* @__PURE__ */ g("div", { className: "d-flex align-items-center gap-3", children: [
|
|
6712
6712
|
/* @__PURE__ */ r($, { variant: "h3", children: n.title }),
|
|
6713
6713
|
/* @__PURE__ */ g("div", { className: "d-flex gap-1 align-items-center justify-content-start", children: [
|
|
6714
6714
|
/* @__PURE__ */ r(J, { onClick: () => s(-1), children: /* @__PURE__ */ r(t, { icon: "chevron-left" }) }),
|
|
6715
|
-
/* @__PURE__ */ r(
|
|
6715
|
+
/* @__PURE__ */ r(ze, { type: "date", withoutLabel: !0, value: a, onChange: (m) => o((m == null ? void 0 : m.toString()) ?? ""), size: "sm", className: "mb-1" }),
|
|
6716
6716
|
/* @__PURE__ */ r(J, { onClick: () => s(1), children: /* @__PURE__ */ r(t, { icon: "chevron-right" }) })
|
|
6717
6717
|
] })
|
|
6718
|
-
] }), children: i !== null && i.length < 1 ? /* @__PURE__ */ r(
|
|
6718
|
+
] }), children: i !== null && i.length < 1 ? /* @__PURE__ */ r(He, { variant: "warning", children: n.noMails }) : /* @__PURE__ */ g("div", { className: "d-flex overflow-hidden gap-3 h-100", children: [
|
|
6719
6719
|
/* @__PURE__ */ r("div", { className: "h-100 overflow-y-auto overflow-x-hidden", style: { minWidth: "260px" }, children: /* @__PURE__ */ r("div", { className: "list-group", children: i == null ? void 0 : i.map((m) => /* @__PURE__ */ g("div", { role: "button", onClick: () => d(m.id), className: I("list-group-item list-group-item-action d-flex gap-3 justify-content-between p-2", { active: c === m.id }), children: [
|
|
6720
6720
|
/* @__PURE__ */ r($, { variant: "body2", children: m.subject }),
|
|
6721
|
-
/* @__PURE__ */ r($, { variant: "caption", children:
|
|
6721
|
+
/* @__PURE__ */ r($, { variant: "caption", children: rt(qe(m.date ?? ""), "HH:mm") })
|
|
6722
6722
|
] }, m.id)) }) }),
|
|
6723
6723
|
u ? /* @__PURE__ */ g("div", { className: "w-100 h-100 overflow-hidden bg-white rounded shadow-sm p-0", children: [
|
|
6724
6724
|
/* @__PURE__ */ r("div", { className: "mb-3 p-3 bg-darker", children: /* @__PURE__ */ g("div", { className: "row gx-3", children: [
|
|
6725
6725
|
/* @__PURE__ */ g("div", { className: "col-8", children: [
|
|
6726
|
-
/* @__PURE__ */ r($, { variant: "caption", children:
|
|
6726
|
+
/* @__PURE__ */ r($, { variant: "caption", children: rt(qe((u == null ? void 0 : u.date) ?? ""), "dd.MM.yyyy HH:mm") }),
|
|
6727
6727
|
/* @__PURE__ */ r($, { variant: "h6", children: (u == null ? void 0 : u.subject) ?? "" })
|
|
6728
6728
|
] }),
|
|
6729
6729
|
/* @__PURE__ */ g("div", { className: "col-4", children: [
|
|
@@ -6742,7 +6742,7 @@ const Mm = (e) => (n) => {
|
|
|
6742
6742
|
] }) });
|
|
6743
6743
|
};
|
|
6744
6744
|
export {
|
|
6745
|
-
|
|
6745
|
+
He as Alert,
|
|
6746
6746
|
Lm as AlertItem,
|
|
6747
6747
|
Ch as ApiFileDownloadButton,
|
|
6748
6748
|
Qh as AppSearch,
|
|
@@ -6761,14 +6761,14 @@ export {
|
|
|
6761
6761
|
Es as ContactButtonQrModal,
|
|
6762
6762
|
Ih as ContactInput,
|
|
6763
6763
|
Os as ContactsLink,
|
|
6764
|
-
|
|
6764
|
+
Ye as ContextButton,
|
|
6765
6765
|
fp as DisabledRowLabelLink,
|
|
6766
6766
|
Lp as Documents,
|
|
6767
|
-
|
|
6767
|
+
vt as Dropdown,
|
|
6768
6768
|
uo as DropdownDivider,
|
|
6769
6769
|
Re as DropdownItem,
|
|
6770
6770
|
_h as DropdownPicker,
|
|
6771
|
-
|
|
6771
|
+
yt as DropdownToggle,
|
|
6772
6772
|
up as DynamicForm,
|
|
6773
6773
|
Ep as EmailOverview,
|
|
6774
6774
|
gp as EmployeeSmallPhoto,
|
|
@@ -6817,7 +6817,7 @@ export {
|
|
|
6817
6817
|
xp as MiniDetailValueItem,
|
|
6818
6818
|
Ns as MonthPicker,
|
|
6819
6819
|
lp as MonthPickerSearchParams,
|
|
6820
|
-
|
|
6820
|
+
Ge as NoInputContainer,
|
|
6821
6821
|
Gh as NotificationActions,
|
|
6822
6822
|
Yh as NotificationUsers,
|
|
6823
6823
|
yp as NumericFormat,
|
|
@@ -6828,7 +6828,7 @@ export {
|
|
|
6828
6828
|
Im as PhotoLibrary,
|
|
6829
6829
|
km as PhotoLightbox,
|
|
6830
6830
|
cp as PieChart,
|
|
6831
|
-
|
|
6831
|
+
Qe as PrimaryButton,
|
|
6832
6832
|
lc as RadioInput,
|
|
6833
6833
|
Fh as ReportPage,
|
|
6834
6834
|
wp as ReportsIndexPage,
|
|
@@ -6840,7 +6840,7 @@ export {
|
|
|
6840
6840
|
vp as SearchBox,
|
|
6841
6841
|
Xh as SearchPage,
|
|
6842
6842
|
ep as SearchSettingsUS,
|
|
6843
|
-
|
|
6843
|
+
Ke as SelectInput,
|
|
6844
6844
|
mp as SettingsFormPicker,
|
|
6845
6845
|
Uh as ShortcutLinks,
|
|
6846
6846
|
Wh as ShortcutLinksProvider,
|
|
@@ -6853,7 +6853,7 @@ export {
|
|
|
6853
6853
|
Sc as TabPanel,
|
|
6854
6854
|
Wo as Tabs,
|
|
6855
6855
|
Dh as TextAreaInput,
|
|
6856
|
-
|
|
6856
|
+
ze as TextInput,
|
|
6857
6857
|
Qm as Timeline,
|
|
6858
6858
|
pp as TypedFormGroup,
|
|
6859
6859
|
$ as Typography,
|