react-luminus-components 1.5.28 → 1.5.29
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 +9 -9
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +1 -1
- package/dist/main.cjs.js +10 -10
- package/dist/main.es.js +808 -800
- package/dist/useLocalStorageState-CnlCu8Mz.js +78 -0
- package/dist/useLocalStorageState-DB-ELZMp.cjs +1 -0
- package/package.json +1 -1
- package/dist/useLocalStorageState-CHGwpC9r.cjs +0 -1
- package/dist/useLocalStorageState-MAU8FeEy.js +0 -78
package/dist/main.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as a, c as I, t as Ae, a as Ar, s as Fi, g as Vi, m as qc, d as br, b as Yc, e as Kc, f as It, h as Xc, i as Qc, k as Jc, l as Zc, n as ed, o as td, p as nd, T as _s, q as Os, r as $i, E as rd, u as Ps, v as Ga, w as Ts, x as ad, y as Re, z as Ua, F as As, A as id, B as od, C as sd, D as ld, M as cd, G as dd, H as ud, I as pd, J as fd, K as md, L as Ca, N as gd, O as vd, P as
|
|
1
|
+
import { j as a, c as I, t as Ae, a as Ar, s as Fi, g as Vi, m as qc, d as br, b as Yc, e as Kc, f as It, h as Xc, i as Qc, k as Jc, l as Zc, n as ed, o as td, p as nd, T as _s, q as Os, r as $i, E as rd, u as Ps, v as Ga, w as Ts, x as ad, y as Re, z as Ua, F as As, A as id, B as od, C as sd, D as ld, M as cd, G as dd, H as ud, I as pd, J as fd, K as md, L as Ca, N as gd, O as vd, P as K, Q as mt, R as hd, S as bd, U as jt, V as te, W as Ha, X as he, Y as Wa, Z as dt, _ as xd, $ as ue, a0 as M, a1 as xn, a2 as rt, a3 as za, a4 as qa, a5 as Rs, a6 as Ya, a7 as Bt, a8 as ks, a9 as Bs, aa as Te, ab as Dt, ac as Zt, ad as fn, ae as yd, af as qe, ag as wd, ah as jd, ai as Nd, aj as St, ak as Ke, al as Lt, am as bt, an as en, ao as Fn, ap as Rr, aq as Nt, ar as Dd, as as Sd, at as Cd, au as Mt, av as Ft, aw as tn, ax as Ye, ay as Ls, az as pt, aA as ze, aB as it, aC as kr, aD as Ms, aE as ct, aF as Ka, aG as ft, aH as Xa, aI as Nr, aJ as Ed, aK as Id, aL as _d, aM as Od, aN as Pd, aO as Td, aP as Br, aQ as cn, aR as Lr, aS as mn, aT as Ad, aU as Rd, aV as kd, aW as Fs, aX as ht, aY as Bd, aZ as Ld, a_ as Dr, a$ as ie, b0 as Vs, b1 as Md, b2 as Fd, b3 as Vd, b4 as $s, b5 as Gs, b6 as $d, b7 as Gd, b8 as Ud, b9 as Hd, ba as Wd, bb as zd, bc as Pt, bd as qd, be as Yd, bf as Kd, bg as Xd, bh as Qd, bi as Jd, bj as In, bk as Us, bl as Zd, bm as Xr, bn as Hs, bo as eu, bp as tu, bq as Sr, br as nu, bs as Ws, bt as or, bu as zs, bv as Qa, bw as ru, bx as au } from "./nivo-bar.es-C7fnWh-z.js";
|
|
2
2
|
import { bA as rD, by as aD, bz as iD } from "./nivo-bar.es-C7fnWh-z.js";
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as _e from "react";
|
|
4
|
+
import de, { useCallback as P, useMemo as k, useState as B, useRef as re, useEffect as H, useContext as V, useId as iu, Component as ou, isValidElement as Gi, Suspense as su, useLayoutEffect as Ja, useReducer as lu, Fragment as cu } from "react";
|
|
5
5
|
import { c as yt, a as du, b as uu, L as Ea, F as pu } from "./FormDisabledProvider-BOj1vV8O.js";
|
|
6
6
|
import { InteractionType as fu } from "@azure/msal-browser";
|
|
7
7
|
import { MsalAuthenticationTemplate as mu } from "@azure/msal-react";
|
|
@@ -10,7 +10,7 @@ import Vn, { unstable_batchedUpdates as hu } from "react-dom";
|
|
|
10
10
|
import { useFormContext as Ct, Controller as Za, useForm as Fr, FormProvider as Vr } from "react-hook-form";
|
|
11
11
|
import { Pivot as bu } from "react-flexmonster";
|
|
12
12
|
import { u as xu, a as yu, b as Xt, c as wu } from "./useRenderDraggableInPortal-D0OLp7Qb.js";
|
|
13
|
-
import { u as Be, a as $n } from "./useLocalStorageState-
|
|
13
|
+
import { u as Be, a as $n } from "./useLocalStorageState-CnlCu8Mz.js";
|
|
14
14
|
import { l as kn, g as Ia, d as ju, r as Nu, h as xr } from "./localStorageUtils-8ScvouMK.js";
|
|
15
15
|
const Kj = ({ fileLoader: e, fileName: t, children: n }) => {
|
|
16
16
|
const r = P(async () => {
|
|
@@ -162,7 +162,7 @@ const Au = {
|
|
|
162
162
|
[Ps]: "collapsing",
|
|
163
163
|
[Ga]: "collapsing",
|
|
164
164
|
[Ts]: "collapse show"
|
|
165
|
-
}, Ys = /* @__PURE__ */
|
|
165
|
+
}, Ys = /* @__PURE__ */ de.forwardRef(({
|
|
166
166
|
onEnter: e,
|
|
167
167
|
onEntering: t,
|
|
168
168
|
onEntered: n,
|
|
@@ -207,12 +207,12 @@ const Au = {
|
|
|
207
207
|
mountOnEnter: d,
|
|
208
208
|
unmountOnExit: p,
|
|
209
209
|
appear: f,
|
|
210
|
-
children: (D, S) => /* @__PURE__ */
|
|
210
|
+
children: (D, S) => /* @__PURE__ */ de.cloneElement(s, {
|
|
211
211
|
...S,
|
|
212
212
|
className: I(o, s.props.className, Au[D], h === "width" && "collapse-horizontal")
|
|
213
213
|
})
|
|
214
214
|
});
|
|
215
|
-
}), ni = /* @__PURE__ */
|
|
215
|
+
}), ni = /* @__PURE__ */ _e.forwardRef(({
|
|
216
216
|
className: e,
|
|
217
217
|
bsPrefix: t,
|
|
218
218
|
as: n = "div",
|
|
@@ -223,7 +223,7 @@ const Au = {
|
|
|
223
223
|
...r
|
|
224
224
|
})));
|
|
225
225
|
ni.displayName = "CardBody";
|
|
226
|
-
const Ks = /* @__PURE__ */
|
|
226
|
+
const Ks = /* @__PURE__ */ _e.forwardRef(({
|
|
227
227
|
className: e,
|
|
228
228
|
bsPrefix: t,
|
|
229
229
|
as: n = "div",
|
|
@@ -234,9 +234,9 @@ const Ks = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
234
234
|
...r
|
|
235
235
|
})));
|
|
236
236
|
Ks.displayName = "CardFooter";
|
|
237
|
-
const Xs = /* @__PURE__ */
|
|
237
|
+
const Xs = /* @__PURE__ */ _e.createContext(null);
|
|
238
238
|
Xs.displayName = "CardHeaderContext";
|
|
239
|
-
const Qs = /* @__PURE__ */
|
|
239
|
+
const Qs = /* @__PURE__ */ _e.forwardRef(({
|
|
240
240
|
bsPrefix: e,
|
|
241
241
|
className: t,
|
|
242
242
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
@@ -256,7 +256,7 @@ const Qs = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
256
256
|
});
|
|
257
257
|
});
|
|
258
258
|
Qs.displayName = "CardHeader";
|
|
259
|
-
const Js = /* @__PURE__ */
|
|
259
|
+
const Js = /* @__PURE__ */ _e.forwardRef(
|
|
260
260
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
261
261
|
({
|
|
262
262
|
bsPrefix: e,
|
|
@@ -274,7 +274,7 @@ const Js = /* @__PURE__ */ Ie.forwardRef(
|
|
|
274
274
|
}
|
|
275
275
|
);
|
|
276
276
|
Js.displayName = "CardImg";
|
|
277
|
-
const Zs = /* @__PURE__ */
|
|
277
|
+
const Zs = /* @__PURE__ */ _e.forwardRef(({
|
|
278
278
|
className: e,
|
|
279
279
|
bsPrefix: t,
|
|
280
280
|
as: n = "div",
|
|
@@ -285,7 +285,7 @@ const Zs = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
285
285
|
...r
|
|
286
286
|
})));
|
|
287
287
|
Zs.displayName = "CardImgOverlay";
|
|
288
|
-
const el = /* @__PURE__ */
|
|
288
|
+
const el = /* @__PURE__ */ _e.forwardRef(({
|
|
289
289
|
className: e,
|
|
290
290
|
bsPrefix: t,
|
|
291
291
|
as: n = "a",
|
|
@@ -296,7 +296,7 @@ const el = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
296
296
|
...r
|
|
297
297
|
})));
|
|
298
298
|
el.displayName = "CardLink";
|
|
299
|
-
const Ru = Ua("h6"), tl = /* @__PURE__ */
|
|
299
|
+
const Ru = Ua("h6"), tl = /* @__PURE__ */ _e.forwardRef(({
|
|
300
300
|
className: e,
|
|
301
301
|
bsPrefix: t,
|
|
302
302
|
as: n = Ru,
|
|
@@ -307,7 +307,7 @@ const Ru = Ua("h6"), tl = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
307
307
|
...r
|
|
308
308
|
})));
|
|
309
309
|
tl.displayName = "CardSubtitle";
|
|
310
|
-
const nl = /* @__PURE__ */
|
|
310
|
+
const nl = /* @__PURE__ */ _e.forwardRef(({
|
|
311
311
|
className: e,
|
|
312
312
|
bsPrefix: t,
|
|
313
313
|
as: n = "p",
|
|
@@ -318,7 +318,7 @@ const nl = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
318
318
|
...r
|
|
319
319
|
})));
|
|
320
320
|
nl.displayName = "CardText";
|
|
321
|
-
const ku = Ua("h5"), rl = /* @__PURE__ */
|
|
321
|
+
const ku = Ua("h5"), rl = /* @__PURE__ */ _e.forwardRef(({
|
|
322
322
|
className: e,
|
|
323
323
|
bsPrefix: t,
|
|
324
324
|
as: n = ku,
|
|
@@ -329,7 +329,7 @@ const ku = Ua("h5"), rl = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
329
329
|
...r
|
|
330
330
|
})));
|
|
331
331
|
rl.displayName = "CardTitle";
|
|
332
|
-
const al = /* @__PURE__ */
|
|
332
|
+
const al = /* @__PURE__ */ _e.forwardRef(({
|
|
333
333
|
bsPrefix: e,
|
|
334
334
|
className: t,
|
|
335
335
|
bg: n,
|
|
@@ -362,7 +362,7 @@ const Ki = Object.assign(al, {
|
|
|
362
362
|
Header: Qs,
|
|
363
363
|
Footer: Ks,
|
|
364
364
|
ImgOverlay: Zs
|
|
365
|
-
}), $r = /* @__PURE__ */
|
|
365
|
+
}), $r = /* @__PURE__ */ _e.forwardRef(({
|
|
366
366
|
className: e,
|
|
367
367
|
bsPrefix: t,
|
|
368
368
|
as: n = "span",
|
|
@@ -383,7 +383,7 @@ const Bu = (e) => /* @__PURE__ */ a.jsx($r, {
|
|
|
383
383
|
type: "radio",
|
|
384
384
|
...e
|
|
385
385
|
})
|
|
386
|
-
}), il = /* @__PURE__ */
|
|
386
|
+
}), il = /* @__PURE__ */ _e.forwardRef(({
|
|
387
387
|
bsPrefix: e,
|
|
388
388
|
size: t,
|
|
389
389
|
hasValidation: n,
|
|
@@ -464,7 +464,7 @@ const Vu = Fu({
|
|
|
464
464
|
lg: 992,
|
|
465
465
|
xl: 1200,
|
|
466
466
|
xxl: 1400
|
|
467
|
-
}), ol = /* @__PURE__ */
|
|
467
|
+
}), ol = /* @__PURE__ */ _e.forwardRef(({
|
|
468
468
|
className: e,
|
|
469
469
|
bsPrefix: t,
|
|
470
470
|
as: n = "div",
|
|
@@ -478,7 +478,7 @@ ol.displayName = "OffcanvasBody";
|
|
|
478
478
|
const $u = {
|
|
479
479
|
[Ga]: "show",
|
|
480
480
|
[Ts]: "show"
|
|
481
|
-
}, sl = /* @__PURE__ */
|
|
481
|
+
}, sl = /* @__PURE__ */ _e.forwardRef(({
|
|
482
482
|
bsPrefix: e,
|
|
483
483
|
className: t,
|
|
484
484
|
children: n,
|
|
@@ -496,13 +496,13 @@ const $u = {
|
|
|
496
496
|
appear: s,
|
|
497
497
|
...l,
|
|
498
498
|
childRef: n.ref,
|
|
499
|
-
children: (u, d) => /* @__PURE__ */
|
|
499
|
+
children: (u, d) => /* @__PURE__ */ _e.cloneElement(n, {
|
|
500
500
|
...d,
|
|
501
501
|
className: I(t, n.props.className, (u === Ga || u === Ps) && `${e}-toggling`, $u[u])
|
|
502
502
|
})
|
|
503
503
|
})));
|
|
504
504
|
sl.displayName = "OffcanvasToggling";
|
|
505
|
-
const ll = /* @__PURE__ */
|
|
505
|
+
const ll = /* @__PURE__ */ _e.forwardRef(({
|
|
506
506
|
bsPrefix: e,
|
|
507
507
|
className: t,
|
|
508
508
|
closeLabel: n = "Close",
|
|
@@ -516,7 +516,7 @@ const ll = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
516
516
|
closeButton: r
|
|
517
517
|
})));
|
|
518
518
|
ll.displayName = "OffcanvasHeader";
|
|
519
|
-
const Gu = Ua("h5"), cl = /* @__PURE__ */
|
|
519
|
+
const Gu = Ua("h5"), cl = /* @__PURE__ */ _e.forwardRef(({
|
|
520
520
|
className: e,
|
|
521
521
|
bsPrefix: t,
|
|
522
522
|
as: n = Gu,
|
|
@@ -537,7 +537,7 @@ function Hu(e) {
|
|
|
537
537
|
...e
|
|
538
538
|
});
|
|
539
539
|
}
|
|
540
|
-
const dl = /* @__PURE__ */
|
|
540
|
+
const dl = /* @__PURE__ */ _e.forwardRef(({
|
|
541
541
|
bsPrefix: e,
|
|
542
542
|
className: t,
|
|
543
543
|
children: n,
|
|
@@ -566,38 +566,38 @@ const dl = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
566
566
|
backdropClassName: O,
|
|
567
567
|
manager: E,
|
|
568
568
|
renderStaticNode: _ = !1,
|
|
569
|
-
...
|
|
569
|
+
...A
|
|
570
570
|
}, L) => {
|
|
571
571
|
const C = re();
|
|
572
572
|
e = Re(e, "offcanvas");
|
|
573
|
-
const [T,
|
|
574
|
-
|
|
575
|
-
|
|
573
|
+
const [T, z] = B(!1), $ = ld(f), F = Vu(o || "xs", "up");
|
|
574
|
+
H(() => {
|
|
575
|
+
z(o ? s && !F : s);
|
|
576
576
|
}, [s, o, F]);
|
|
577
577
|
const q = k(() => ({
|
|
578
578
|
onHide: $
|
|
579
579
|
}), [$]);
|
|
580
|
-
function
|
|
580
|
+
function W() {
|
|
581
581
|
return E || (u ? (C.current || (C.current = new pd({
|
|
582
582
|
handleContainerOverflow: !1
|
|
583
583
|
})), C.current) : fd());
|
|
584
584
|
}
|
|
585
|
-
const
|
|
586
|
-
|
|
587
|
-
},
|
|
588
|
-
|
|
589
|
-
}, X = P((
|
|
590
|
-
...
|
|
585
|
+
const R = (se, ...we) => {
|
|
586
|
+
se && (se.style.visibility = "visible"), y == null || y(se, ...we);
|
|
587
|
+
}, U = (se, ...we) => {
|
|
588
|
+
se && (se.style.visibility = ""), S == null || S(...we);
|
|
589
|
+
}, X = P((se) => /* @__PURE__ */ a.jsx("div", {
|
|
590
|
+
...se,
|
|
591
591
|
className: I(`${e}-backdrop`, O)
|
|
592
|
-
}), [O, e]),
|
|
593
|
-
...
|
|
594
|
-
...
|
|
592
|
+
}), [O, e]), ee = (se) => /* @__PURE__ */ a.jsx("div", {
|
|
593
|
+
...se,
|
|
594
|
+
...A,
|
|
595
595
|
className: I(t, o ? `${e}-${o}` : e, `${e}-${i}`),
|
|
596
596
|
"aria-labelledby": r,
|
|
597
597
|
children: n
|
|
598
598
|
});
|
|
599
599
|
return /* @__PURE__ */ a.jsxs(a.Fragment, {
|
|
600
|
-
children: [!T && (o || _) &&
|
|
600
|
+
children: [!T && (o || _) && ee({}), /* @__PURE__ */ a.jsx(cd.Provider, {
|
|
601
601
|
value: q,
|
|
602
602
|
children: /* @__PURE__ */ a.jsx(dd, {
|
|
603
603
|
show: T,
|
|
@@ -612,17 +612,17 @@ const dl = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
612
612
|
onEscapeKeyDown: d,
|
|
613
613
|
onShow: p,
|
|
614
614
|
onHide: $,
|
|
615
|
-
onEnter:
|
|
615
|
+
onEnter: R,
|
|
616
616
|
onEntering: D,
|
|
617
617
|
onEntered: x,
|
|
618
618
|
onExit: j,
|
|
619
619
|
onExiting: w,
|
|
620
|
-
onExited:
|
|
621
|
-
manager:
|
|
620
|
+
onExited: U,
|
|
621
|
+
manager: W(),
|
|
622
622
|
transition: Uu,
|
|
623
623
|
backdropTransition: Hu,
|
|
624
624
|
renderBackdrop: X,
|
|
625
|
-
renderDialog:
|
|
625
|
+
renderDialog: ee
|
|
626
626
|
})
|
|
627
627
|
})]
|
|
628
628
|
});
|
|
@@ -650,7 +650,7 @@ function ul({
|
|
|
650
650
|
className: I(o, e ? `${n}-${e}` : n, r && `${n}-${r}`, t && `bg-${t}`)
|
|
651
651
|
};
|
|
652
652
|
}
|
|
653
|
-
const pl = /* @__PURE__ */
|
|
653
|
+
const pl = /* @__PURE__ */ _e.forwardRef((e, t) => {
|
|
654
654
|
const n = ul(e);
|
|
655
655
|
return /* @__PURE__ */ a.jsx(Ca, {
|
|
656
656
|
...n,
|
|
@@ -660,7 +660,7 @@ const pl = /* @__PURE__ */ Ie.forwardRef((e, t) => {
|
|
|
660
660
|
});
|
|
661
661
|
});
|
|
662
662
|
pl.displayName = "PlaceholderButton";
|
|
663
|
-
const fl = /* @__PURE__ */
|
|
663
|
+
const fl = /* @__PURE__ */ _e.forwardRef(({
|
|
664
664
|
as: e = "span",
|
|
665
665
|
...t
|
|
666
666
|
}, n) => {
|
|
@@ -673,7 +673,7 @@ const fl = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
673
673
|
fl.displayName = "Placeholder";
|
|
674
674
|
const _t = Object.assign(fl, {
|
|
675
675
|
Button: pl
|
|
676
|
-
}), ri = /* @__PURE__ */
|
|
676
|
+
}), ri = /* @__PURE__ */ _e.forwardRef(({
|
|
677
677
|
bsPrefix: e,
|
|
678
678
|
className: t,
|
|
679
679
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
@@ -697,7 +697,7 @@ const _t = Object.assign(fl, {
|
|
|
697
697
|
});
|
|
698
698
|
});
|
|
699
699
|
ri.displayName = "Row";
|
|
700
|
-
const Wu = /* @__PURE__ */
|
|
700
|
+
const Wu = /* @__PURE__ */ _e.forwardRef(({
|
|
701
701
|
bsPrefix: e,
|
|
702
702
|
className: t,
|
|
703
703
|
striped: n,
|
|
@@ -723,7 +723,7 @@ const Wu = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
723
723
|
}
|
|
724
724
|
return m;
|
|
725
725
|
}), zu = ({ children: e, onStorno: t, noSpacer: n, disabled: r }) => {
|
|
726
|
-
const { texts: { formSubmit: i } } = V(
|
|
726
|
+
const { texts: { formSubmit: i } } = V(K);
|
|
727
727
|
return /* @__PURE__ */ a.jsxs(vw, { noSpacer: n, children: [
|
|
728
728
|
/* @__PURE__ */ a.jsxs(mt, { as: "button", color: "primary", size: "lg", type: "submit", disabled: r, children: [
|
|
729
729
|
/* @__PURE__ */ a.jsx(hd, {}),
|
|
@@ -772,7 +772,7 @@ const Wu = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
772
772
|
return /* @__PURE__ */ a.jsxs("div", { className: I("card d-flex flex-row align-items-center justify-content-center m-0 p-1 gap-2", o, {
|
|
773
773
|
[lr[c]]: c
|
|
774
774
|
}), children: [
|
|
775
|
-
/* @__PURE__ */ a.jsx(
|
|
775
|
+
/* @__PURE__ */ a.jsx(te, { onClick: () => u(-1), disabled: e.getFullYear() < r || e.getFullYear() === r && e.getMonth() <= 0, children: /* @__PURE__ */ a.jsx(Ha, {}) }),
|
|
776
776
|
/* @__PURE__ */ a.jsx(he.Select, { value: e.getMonth(), onChange: (f) => {
|
|
777
777
|
var m;
|
|
778
778
|
return ((m = f.target) == null ? void 0 : m.value) && t(Ou(e, Number(f.target.value)));
|
|
@@ -781,7 +781,7 @@ const Wu = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
781
781
|
var m;
|
|
782
782
|
return ((m = f.target) == null ? void 0 : m.value) && t(_a(e, Number(f.target.value)));
|
|
783
783
|
}, className: I(lr.select, l), children: d.map((f) => /* @__PURE__ */ a.jsx("option", { value: f, children: f }, f)) }),
|
|
784
|
-
/* @__PURE__ */ a.jsx(
|
|
784
|
+
/* @__PURE__ */ a.jsx(te, { onClick: () => u(1), disabled: e.getFullYear() > i || e.getFullYear() === i && e.getMonth() >= 11, children: /* @__PURE__ */ a.jsx(Wa, {}) })
|
|
785
785
|
] });
|
|
786
786
|
}, Qu = "_select_pywmr_1", Ju = {
|
|
787
787
|
select: Qu
|
|
@@ -812,12 +812,12 @@ const Wu = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
812
812
|
}
|
|
813
813
|
}, [e, t, s, o, i, l]);
|
|
814
814
|
return /* @__PURE__ */ a.jsxs("div", { className: I("d-flex flex-row align-items-center m-0", r === "standart" ? "card p-1 gap-2" : void 0, r === "minimalist" ? "p-0 gap-0" : void 0, n ?? ""), children: [
|
|
815
|
-
/* @__PURE__ */ a.jsx(
|
|
815
|
+
/* @__PURE__ */ a.jsx(te, { onClick: () => c(-1), disabled: e.getFullYear() <= o, children: /* @__PURE__ */ a.jsx(Ha, {}) }),
|
|
816
816
|
/* @__PURE__ */ a.jsx(he.Select, { value: e.getFullYear(), onChange: (u) => {
|
|
817
817
|
var d;
|
|
818
818
|
return ((d = u.target) == null ? void 0 : d.value) && t(_a(e, Number(u.target.value)));
|
|
819
819
|
}, className: I(Ju.select, "bg-transparent"), children: l.map((u) => /* @__PURE__ */ a.jsx("option", { value: u, children: u }, u)) }),
|
|
820
|
-
/* @__PURE__ */ a.jsx(
|
|
820
|
+
/* @__PURE__ */ a.jsx(te, { onClick: () => c(1), disabled: e.getFullYear() >= s, children: /* @__PURE__ */ a.jsx(Wa, {}) })
|
|
821
821
|
] });
|
|
822
822
|
};
|
|
823
823
|
class ep extends ou {
|
|
@@ -838,12 +838,12 @@ class ep extends ou {
|
|
|
838
838
|
}
|
|
839
839
|
render() {
|
|
840
840
|
const { fallback: t, fallbackOn404: n, children: r, texts: i, reloadButtonDisplay: o = "append-after-child" } = this.props;
|
|
841
|
-
return this.state.hasError ? o === "inject-to-child" && !this.state.is404Error && Gi(t) ?
|
|
841
|
+
return this.state.hasError ? o === "inject-to-child" && !this.state.is404Error && Gi(t) ? de.cloneElement(t, {
|
|
842
842
|
...t.props
|
|
843
843
|
}, /* @__PURE__ */ a.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
844
844
|
...t.props.children,
|
|
845
845
|
/* @__PURE__ */ a.jsx("div", { className: "d-flex gap-2 justify-content-center", children: /* @__PURE__ */ a.jsx(dt, { type: "button", onClick: this.reload, children: i.reloadButtonContent }) })
|
|
846
|
-
] })) : o === "inject-to-child" && this.state.is404Error && Gi(n) ?
|
|
846
|
+
] })) : o === "inject-to-child" && this.state.is404Error && Gi(n) ? de.cloneElement(n, {
|
|
847
847
|
...n.props
|
|
848
848
|
}, /* @__PURE__ */ a.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
849
849
|
...n.props.children,
|
|
@@ -861,13 +861,13 @@ class ep extends ou {
|
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
863
|
const tp = (e) => (n) => {
|
|
864
|
-
const { texts: { errorBoundary: r } } = V(
|
|
864
|
+
const { texts: { errorBoundary: r } } = V(K);
|
|
865
865
|
return /* @__PURE__ */ a.jsx(e, { texts: r, ...n });
|
|
866
866
|
}, np = tp(ep), rp = "_widget-card_e9tsb_1", ap = {
|
|
867
867
|
"widget-card": "_widget-card_e9tsb_1",
|
|
868
868
|
widgetCard: rp
|
|
869
869
|
}, eo = ({ children: e, title: t, headerContent: n }) => /* @__PURE__ */ a.jsx(Qt, { className: I(ap.widgetCard, "luminus-widget"), title: t, headerContent: n, contentClassName: "h-100 overflow-auto", children: e }), ip = ({ children: e, title: t }) => {
|
|
870
|
-
const { texts: { widget: n } } = V(
|
|
870
|
+
const { texts: { widget: n } } = V(K), r = Mr();
|
|
871
871
|
return /* @__PURE__ */ a.jsx(np, { fallback: /* @__PURE__ */ a.jsx(eo, { title: t, children: n.fallbackError }), reloadButtonDisplay: "inject-to-child", navigateBack: () => r(-1), children: /* @__PURE__ */ a.jsx(su, { fallback: /* @__PURE__ */ a.jsx(eo, { title: t, children: /* @__PURE__ */ a.jsx(Du, {}) }), children: e }) });
|
|
872
872
|
}, to = {
|
|
873
873
|
"eon-red": "#ea1b0a",
|
|
@@ -954,7 +954,7 @@ const tp = (e) => (n) => {
|
|
|
954
954
|
qrStyle: "dots"
|
|
955
955
|
}
|
|
956
956
|
}, sp = op, lp = ({ value: e, qrRef: t, variant: n = "blackRedEyes" }) => /* @__PURE__ */ a.jsx(xd, { ref: t, value: e, eyeColor: to["eon-red"], fgColor: to["eon-turquoise"], logoHeight: 32, logoWidth: 32, removeQrCodeBehindLogo: !0, logoPadding: 5, logoPaddingStyle: "circle", ecLevel: "Q", ...sp[n] }), cp = ({ value: e, contactType: t, className: n }) => {
|
|
957
|
-
const { ProjectIconComponent: r } = V(
|
|
957
|
+
const { ProjectIconComponent: r } = V(K), [i, o] = B(!1), s = P(() => {
|
|
958
958
|
o(!0);
|
|
959
959
|
}, []), l = P(() => {
|
|
960
960
|
o(!1);
|
|
@@ -969,14 +969,14 @@ const tp = (e) => (n) => {
|
|
|
969
969
|
}
|
|
970
970
|
}, [t]);
|
|
971
971
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
972
|
-
/* @__PURE__ */ a.jsx(
|
|
973
|
-
/* @__PURE__ */ a.jsx(
|
|
972
|
+
/* @__PURE__ */ a.jsx(te, { onClick: s, disabled: e === null, className: n, children: /* @__PURE__ */ a.jsx(r, { icon: "qr-code" }) }),
|
|
973
|
+
/* @__PURE__ */ a.jsx(ue, { show: i, onHide: l, size: "sm", children: /* @__PURE__ */ a.jsxs(ue.Body, { className: "d-flex flex-column align-items-center", children: [
|
|
974
974
|
/* @__PURE__ */ a.jsx(lp, { value: `${c}:${e}` }),
|
|
975
975
|
/* @__PURE__ */ a.jsx(M, { variant: "subtitle", children: e })
|
|
976
976
|
] }) })
|
|
977
977
|
] });
|
|
978
978
|
}, dp = ({ contactType: e, value: t, className: n, children: r, showIconWithChildren: i }) => {
|
|
979
|
-
const { ProjectIconComponent: o } = V(
|
|
979
|
+
const { ProjectIconComponent: o } = V(K), s = k(() => {
|
|
980
980
|
switch (e) {
|
|
981
981
|
case "email":
|
|
982
982
|
return "mailto";
|
|
@@ -997,14 +997,14 @@ const tp = (e) => (n) => {
|
|
|
997
997
|
}, [e]);
|
|
998
998
|
return /* @__PURE__ */ a.jsx("div", { className: n, children: t === null ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
999
999
|
r,
|
|
1000
|
-
(!r || i) && /* @__PURE__ */ a.jsx(
|
|
1000
|
+
(!r || i) && /* @__PURE__ */ a.jsx(te, { disabled: !0, children: /* @__PURE__ */ a.jsx(o, { icon: l }) })
|
|
1001
1001
|
] }) : /* @__PURE__ */ a.jsxs(He, { to: `${s}:${t}`, className: "w-100", children: [
|
|
1002
1002
|
r,
|
|
1003
|
-
(!r || i) && /* @__PURE__ */ a.jsx(
|
|
1003
|
+
(!r || i) && /* @__PURE__ */ a.jsx(te, { children: /* @__PURE__ */ a.jsx(o, { icon: l }) })
|
|
1004
1004
|
] }) });
|
|
1005
1005
|
}, Gn = ({ InputContainer: e = xn, label: t, value: n, onChange: r, hidden: i, disabled: o, className: s, type: l, withoutLabel: c, indeterminate: u, hint: d }) => {
|
|
1006
1006
|
const p = re(null);
|
|
1007
|
-
return
|
|
1007
|
+
return H(() => {
|
|
1008
1008
|
p.current && (p.current.indeterminate = u ?? !1);
|
|
1009
1009
|
}, [p, u]), /* @__PURE__ */ a.jsx(e, { isForCheckInput: !0, hidden: i, label: t ?? "", withoutLabel: c, className: s, hint: d, disabled: o, children: /* @__PURE__ */ a.jsx(he.Check, { ref: p, id: `check-${t}`, type: l ?? "checkbox", label: t ?? "", checked: n, onChange: (f) => {
|
|
1010
1010
|
var m;
|
|
@@ -1017,7 +1017,7 @@ const tp = (e) => (n) => {
|
|
|
1017
1017
|
popoverHandle: mp,
|
|
1018
1018
|
btnsPopoverHideable: gp
|
|
1019
1019
|
}, ml = ({ children: e, className: t, withoutLabel: n, label: r, contactType: i, value: o }) => {
|
|
1020
|
-
const { ProjectIconComponent: s } = V(
|
|
1020
|
+
const { ProjectIconComponent: s } = V(K);
|
|
1021
1021
|
return /* @__PURE__ */ a.jsxs("div", { className: I("d-flex align-items-center", t), children: [
|
|
1022
1022
|
!n && /* @__PURE__ */ a.jsx("div", { className: I("d-flex justify-content-between align-items-center w-50"), children: /* @__PURE__ */ a.jsx(M, { variant: "form-label", className: "text-muted", children: r }) }),
|
|
1023
1023
|
/* @__PURE__ */ a.jsxs("div", { className: I("w-50", On.popoverContainer), children: [
|
|
@@ -1031,14 +1031,14 @@ const tp = (e) => (n) => {
|
|
|
1031
1031
|
] })
|
|
1032
1032
|
] })
|
|
1033
1033
|
] });
|
|
1034
|
-
}, Qj = ({ value: e, label: t, InputContainer: n = xn, className: r, withoutLabel: i, hidden: o, disabled: s, contactType: l, ...c }) => o ? null : /* @__PURE__ */ a.jsx(ml, { contactType: l, value: e, withoutLabel: i, label: t, className: r, children: /* @__PURE__ */ a.jsx(rt, { type: "text", value: e, disabled: s, InputContainer: n, size: "sm", withoutLabel: !0, ...c }) }), Jj = ({ InputContainer: e = xn, items: t, selectedItemNavigateTo: n, onSearchQueryChange: r, texts: i, isLoading: o, value: s, onSelect: l, label: c, withoutLabel: u, size: d, dropdownItemsNameWidth: p, additionalColumns: f, hidden: m, disabled: g, displayIdAsName: b, CustomOnChangeComponent: h, className: v, archiveColumn: x, icon: j, hint: w, addNewOptionPath: y, refreshOptions: D, MiniDetailComponent: S, miniDetailPlacement: O, suggestedItems: E, suggestedItemsTitle: _, customEllipsisOptions:
|
|
1035
|
-
const [L, C] = B(!1), T = P((
|
|
1036
|
-
l && l(
|
|
1037
|
-
}, [l]),
|
|
1038
|
-
C(!1), T(
|
|
1039
|
-
}, [T]), $ = re(null), F = n !== void 0, q = F && s !== null,
|
|
1040
|
-
var
|
|
1041
|
-
return b ? ((
|
|
1034
|
+
}, Qj = ({ value: e, label: t, InputContainer: n = xn, className: r, withoutLabel: i, hidden: o, disabled: s, contactType: l, ...c }) => o ? null : /* @__PURE__ */ a.jsx(ml, { contactType: l, value: e, withoutLabel: i, label: t, className: r, children: /* @__PURE__ */ a.jsx(rt, { type: "text", value: e, disabled: s, InputContainer: n, size: "sm", withoutLabel: !0, ...c }) }), Jj = ({ InputContainer: e = xn, items: t, selectedItemNavigateTo: n, onSearchQueryChange: r, texts: i, isLoading: o, value: s, onSelect: l, label: c, withoutLabel: u, size: d, dropdownItemsNameWidth: p, additionalColumns: f, hidden: m, disabled: g, displayIdAsName: b, CustomOnChangeComponent: h, className: v, archiveColumn: x, icon: j, hint: w, addNewOptionPath: y, refreshOptions: D, MiniDetailComponent: S, miniDetailPlacement: O, suggestedItems: E, suggestedItemsTitle: _, customEllipsisOptions: A }) => {
|
|
1035
|
+
const [L, C] = B(!1), T = P((R) => {
|
|
1036
|
+
l && l(R);
|
|
1037
|
+
}, [l]), z = P((R) => {
|
|
1038
|
+
C(!1), T(R);
|
|
1039
|
+
}, [T]), $ = re(null), F = n !== void 0, q = F && s !== null, W = k(() => {
|
|
1040
|
+
var R, U;
|
|
1041
|
+
return b ? ((R = s == null ? void 0 : s.id) == null ? void 0 : R.toString()) ?? "" : s != null && s.name && s.name.length > 0 ? s.name : ((U = s == null ? void 0 : s.id) == null ? void 0 : U.toString()) ?? "";
|
|
1042
1042
|
}, [s, b]);
|
|
1043
1043
|
return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsxs(e, { withoutLabel: u, label: c ?? "", hidden: m, inputContainerClassName: I({ "luminus-dropdown-select-open": L }), className: v, hint: w, disabled: g, children: [
|
|
1044
1044
|
/* @__PURE__ */ a.jsxs(za, { currentSelection: s, selectedItemNavigateTo: n, children: [
|
|
@@ -1049,8 +1049,8 @@ const tp = (e) => (n) => {
|
|
|
1049
1049
|
ref: $,
|
|
1050
1050
|
size: d,
|
|
1051
1051
|
value: (s == null ? void 0 : s.id) ?? "",
|
|
1052
|
-
onMouseDown: (
|
|
1053
|
-
|
|
1052
|
+
onMouseDown: (R) => {
|
|
1053
|
+
R.currentTarget.focus(), R.preventDefault();
|
|
1054
1054
|
},
|
|
1055
1055
|
onClick: () => {
|
|
1056
1056
|
!F && !g && C(!0);
|
|
@@ -1064,18 +1064,18 @@ const tp = (e) => (n) => {
|
|
|
1064
1064
|
hidden: m,
|
|
1065
1065
|
children: [
|
|
1066
1066
|
/* @__PURE__ */ a.jsx("option", { value: "" }),
|
|
1067
|
-
s && /* @__PURE__ */ a.jsx("option", { value: s.id ?? void 0, children:
|
|
1067
|
+
s && /* @__PURE__ */ a.jsx("option", { value: s.id ?? void 0, children: W })
|
|
1068
1068
|
]
|
|
1069
1069
|
}
|
|
1070
1070
|
) }),
|
|
1071
1071
|
h || !g && F ? /* @__PURE__ */ a.jsxs("div", { className: "custom-picker-button", children: [
|
|
1072
|
-
!h && !g && F && /* @__PURE__ */ a.jsx(
|
|
1073
|
-
|
|
1072
|
+
!h && !g && F && /* @__PURE__ */ a.jsx(te, { size: "sm", color: "secondary", onClick: (R) => {
|
|
1073
|
+
R.preventDefault(), R.stopPropagation(), C(!0);
|
|
1074
1074
|
}, children: j ?? /* @__PURE__ */ a.jsx(Rs, {}) }),
|
|
1075
1075
|
h ?? null
|
|
1076
1076
|
] }) : null
|
|
1077
1077
|
] }),
|
|
1078
|
-
$.current && /* @__PURE__ */ a.jsx(Ya, { show: L, onCancel: () => C(!1), items: t, currentSelection: s, onSelectionChange:
|
|
1078
|
+
$.current && /* @__PURE__ */ a.jsx(Ya, { show: L, onCancel: () => C(!1), items: t, currentSelection: s, onSelectionChange: z, onSearchQueryChange: r, texts: i, itemsNameWidth: p, additionalColumns: f, isLoading: o, disabled: g, inputRef: $, archiveColumn: x, displayIdAsName: b, addNewOptionPath: y, refreshOptions: D, suggestedItems: E, suggestedItemsTitle: _, customEllipsisOptions: A })
|
|
1079
1079
|
] }) });
|
|
1080
1080
|
}, Zj = ({ InputContainer: e = xn, value: t, onChange: n, label: r, size: i, showClearIcon: o, clearValue: s, hidden: l, disabled: c, rows: u, withoutLabel: d, debounceMs: p, minLength: f, maxLength: m, className: g, hint: b }) => {
|
|
1081
1081
|
const h = P(() => {
|
|
@@ -1097,11 +1097,11 @@ const tp = (e) => (n) => {
|
|
|
1097
1097
|
w(S);
|
|
1098
1098
|
}, p);
|
|
1099
1099
|
}, [p, w]);
|
|
1100
|
-
return
|
|
1100
|
+
return H(() => {
|
|
1101
1101
|
j(t === null ? "" : t.toString());
|
|
1102
1102
|
}, [t]), /* @__PURE__ */ a.jsxs(e, { label: r ?? "", hidden: l, withoutLabel: d, className: g, isForTextAreaInput: !0, hint: b, disabled: c, children: [
|
|
1103
1103
|
/* @__PURE__ */ a.jsx(he.Control, { as: "textarea", size: i, value: p ? x : t ?? "", onChange: y, hidden: l, disabled: c, rows: u ?? 2, className: "w-100", minLength: f, maxLength: m }),
|
|
1104
|
-
o && t && n && !c && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ a.jsx(
|
|
1104
|
+
o && t && n && !c && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ a.jsx(te, { color: "secondary", size: "sm", onClick: h, children: /* @__PURE__ */ a.jsx(Bt, {}) }) })
|
|
1105
1105
|
] });
|
|
1106
1106
|
}, eN = ({ InputContainer: e = xn, value: t, onChange: n, debounceMs: r, label: i, withoutLabel: o, placeholder: s, size: l, hidden: c, disabled: u, showClearIcon: d, clearValue: p, className: f, step: m, stepperStep: g = 1, min: b, max: h, hint: v }) => {
|
|
1107
1107
|
const x = P(() => {
|
|
@@ -1123,17 +1123,17 @@ const tp = (e) => (n) => {
|
|
|
1123
1123
|
D(E);
|
|
1124
1124
|
}, r);
|
|
1125
1125
|
}, [r, D, h, b]);
|
|
1126
|
-
return
|
|
1126
|
+
return H(() => {
|
|
1127
1127
|
y(t === null ? "" : kn(t, b, h).toString());
|
|
1128
1128
|
}, [h, b, t]), /* @__PURE__ */ a.jsx(e, { withoutLabel: o, label: i ?? "", hidden: c, hint: v, className: f, disabled: u, children: /* @__PURE__ */ a.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
1129
1129
|
/* @__PURE__ */ a.jsx(he.Control, { type: "number", placeholder: s ?? i, size: l, value: r ? w : t ?? "", onChange: S, className: `luminus-numeric-stepper ${f ?? ""}`, hidden: c, disabled: u ?? !1, step: m }),
|
|
1130
|
-
/* @__PURE__ */ a.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ a.jsx(
|
|
1130
|
+
/* @__PURE__ */ a.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ a.jsx(te, { size: "sm", onClick: (O) => {
|
|
1131
1131
|
O.preventDefault(), O.stopPropagation(), D(((t ?? 0) - g).toString());
|
|
1132
1132
|
}, children: /* @__PURE__ */ a.jsx(ks, {}) }) }),
|
|
1133
|
-
/* @__PURE__ */ a.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ a.jsx(
|
|
1133
|
+
/* @__PURE__ */ a.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ a.jsx(te, { size: "sm", onClick: (O) => {
|
|
1134
1134
|
O.preventDefault(), O.stopPropagation(), D(((t ?? 0) + g).toString());
|
|
1135
1135
|
}, children: /* @__PURE__ */ a.jsx(Bs, {}) }) }),
|
|
1136
|
-
d && t && n && !u && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ a.jsx(
|
|
1136
|
+
d && t && n && !u && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ a.jsx(te, { color: "secondary", size: "sm", onClick: x, children: /* @__PURE__ */ a.jsx(Bt, {}) }) })
|
|
1137
1137
|
] }) });
|
|
1138
1138
|
};
|
|
1139
1139
|
function gl(e, t) {
|
|
@@ -1396,135 +1396,135 @@ function Pp(e) {
|
|
|
1396
1396
|
x === void 0 && (x = Ip);
|
|
1397
1397
|
var j = e.isValidInputCharacter;
|
|
1398
1398
|
j === void 0 && (j = Hn);
|
|
1399
|
-
var w = e.isCharacterSame, y = gl(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), D = wl(v, c, !!u, s, l, d), S = D[0], O = S.formattedValue, E = S.numAsString, _ = D[1],
|
|
1400
|
-
L.current = { formattedValue:
|
|
1401
|
-
}, T = B(!1),
|
|
1399
|
+
var w = e.isCharacterSame, y = gl(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), D = wl(v, c, !!u, s, l, d), S = D[0], O = S.formattedValue, E = S.numAsString, _ = D[1], A = re(), L = re({ formattedValue: O, numAsString: E }), C = function(Y, G) {
|
|
1400
|
+
L.current = { formattedValue: Y.formattedValue, numAsString: Y.value }, _(Y, G);
|
|
1401
|
+
}, T = B(!1), z = T[0], $ = T[1], F = re(null), q = re({
|
|
1402
1402
|
setCaretTimeout: null,
|
|
1403
1403
|
focusTimeout: null
|
|
1404
1404
|
});
|
|
1405
|
-
|
|
1405
|
+
H(function() {
|
|
1406
1406
|
return $(!0), function() {
|
|
1407
1407
|
clearTimeout(q.current.setCaretTimeout), clearTimeout(q.current.focusTimeout);
|
|
1408
1408
|
};
|
|
1409
1409
|
}, []);
|
|
1410
|
-
var
|
|
1410
|
+
var W = s, R = function(Y, G) {
|
|
1411
1411
|
var ae = parseFloat(G);
|
|
1412
1412
|
return {
|
|
1413
|
-
formattedValue:
|
|
1413
|
+
formattedValue: Y,
|
|
1414
1414
|
value: G,
|
|
1415
1415
|
floatValue: isNaN(ae) ? void 0 : ae
|
|
1416
1416
|
};
|
|
1417
|
-
},
|
|
1418
|
-
|
|
1419
|
-
|
|
1417
|
+
}, U = function(Y, G, ae) {
|
|
1418
|
+
Y.selectionStart === 0 && Y.selectionEnd === Y.value.length || (Kt(Y, G), q.current.setCaretTimeout = setTimeout(function() {
|
|
1419
|
+
Y.value === ae && Y.selectionStart !== G && Kt(Y, G);
|
|
1420
1420
|
}, 0));
|
|
1421
|
-
}, X = function(
|
|
1422
|
-
return ao(
|
|
1423
|
-
},
|
|
1424
|
-
var ge = x(G),
|
|
1425
|
-
return
|
|
1426
|
-
},
|
|
1427
|
-
var G =
|
|
1421
|
+
}, X = function(Y, G, ae) {
|
|
1422
|
+
return ao(Y, G, x(Y), ae);
|
|
1423
|
+
}, ee = function(Y, G, ae) {
|
|
1424
|
+
var ge = x(G), Ie = Ep(G, O, Y, ae, ge, j, w);
|
|
1425
|
+
return Ie = ao(G, Ie, ge), Ie;
|
|
1426
|
+
}, se = function(Y) {
|
|
1427
|
+
var G = Y.formattedValue;
|
|
1428
1428
|
G === void 0 && (G = "");
|
|
1429
|
-
var ae =
|
|
1429
|
+
var ae = Y.input, ge = Y.source, Ie = Y.event, be = Y.numAsString, fe;
|
|
1430
1430
|
if (ae) {
|
|
1431
|
-
var Ve =
|
|
1432
|
-
ae.value = G,
|
|
1431
|
+
var Ve = Y.inputValue || ae.value, ot = ea(ae);
|
|
1432
|
+
ae.value = G, fe = ee(Ve, G, ot), fe !== void 0 && U(ae, fe, G);
|
|
1433
1433
|
}
|
|
1434
|
-
G !== O && C(
|
|
1434
|
+
G !== O && C(R(G, be), { event: Ie, source: ge });
|
|
1435
1435
|
};
|
|
1436
|
-
|
|
1437
|
-
var
|
|
1438
|
-
(O !== G || E !== ae) && C(
|
|
1436
|
+
H(function() {
|
|
1437
|
+
var Y = L.current, G = Y.formattedValue, ae = Y.numAsString;
|
|
1438
|
+
(O !== G || E !== ae) && C(R(O, E), {
|
|
1439
1439
|
event: void 0,
|
|
1440
1440
|
source: Un.props
|
|
1441
1441
|
});
|
|
1442
1442
|
}, [O, E]);
|
|
1443
|
-
var we = F.current ? ea(F.current) : void 0,
|
|
1444
|
-
|
|
1445
|
-
var
|
|
1446
|
-
if (O !== L.current.formattedValue &&
|
|
1447
|
-
var G =
|
|
1448
|
-
|
|
1443
|
+
var we = F.current ? ea(F.current) : void 0, oe = typeof window < "u" ? Ja : H;
|
|
1444
|
+
oe(function() {
|
|
1445
|
+
var Y = F.current;
|
|
1446
|
+
if (O !== L.current.formattedValue && Y) {
|
|
1447
|
+
var G = ee(L.current.formattedValue, O, we);
|
|
1448
|
+
Y.value = O, U(Y, G, O);
|
|
1449
1449
|
}
|
|
1450
1450
|
}, [O]);
|
|
1451
|
-
var
|
|
1452
|
-
var ge = G.target,
|
|
1453
|
-
if (
|
|
1454
|
-
var ot = G.target, st = ea(ot), rn =
|
|
1455
|
-
return ot.value = O,
|
|
1451
|
+
var Q = function(Y, G, ae) {
|
|
1452
|
+
var ge = G.target, Ie = A.current ? jp(A.current, ge.selectionEnd) : yl(O, Y), be = Object.assign(Object.assign({}, Ie), { lastValue: O }), fe = l(Y, be), Ve = W(fe);
|
|
1453
|
+
if (fe = l(Ve, void 0), p && !p(R(Ve, fe))) {
|
|
1454
|
+
var ot = G.target, st = ea(ot), rn = ee(Y, O, st);
|
|
1455
|
+
return ot.value = O, U(ot, rn, O), !1;
|
|
1456
1456
|
}
|
|
1457
|
-
return
|
|
1457
|
+
return se({
|
|
1458
1458
|
formattedValue: Ve,
|
|
1459
|
-
numAsString:
|
|
1460
|
-
inputValue:
|
|
1459
|
+
numAsString: fe,
|
|
1460
|
+
inputValue: Y,
|
|
1461
1461
|
event: G,
|
|
1462
1462
|
source: ae,
|
|
1463
1463
|
input: G.target
|
|
1464
1464
|
}), !0;
|
|
1465
|
-
},
|
|
1465
|
+
}, le = function(Y, G) {
|
|
1466
1466
|
G === void 0 && (G = 0);
|
|
1467
|
-
var ae =
|
|
1468
|
-
|
|
1469
|
-
},
|
|
1470
|
-
var G =
|
|
1471
|
-
ge && f(
|
|
1472
|
-
}, me = function(
|
|
1473
|
-
var G =
|
|
1467
|
+
var ae = Y.selectionStart, ge = Y.selectionEnd;
|
|
1468
|
+
A.current = { selectionStart: ae, selectionEnd: ge + G };
|
|
1469
|
+
}, Ce = function(Y) {
|
|
1470
|
+
var G = Y.target, ae = G.value, ge = Q(ae, Y, Un.event);
|
|
1471
|
+
ge && f(Y), A.current = void 0;
|
|
1472
|
+
}, me = function(Y) {
|
|
1473
|
+
var G = Y.target, ae = Y.key, ge = G.selectionStart, Ie = G.selectionEnd, be = G.value;
|
|
1474
1474
|
be === void 0 && (be = "");
|
|
1475
|
-
var
|
|
1476
|
-
ae === "ArrowLeft" || ae === "Backspace" ?
|
|
1475
|
+
var fe;
|
|
1476
|
+
ae === "ArrowLeft" || ae === "Backspace" ? fe = Math.max(ge - 1, 0) : ae === "ArrowRight" ? fe = Math.min(ge + 1, be.length) : ae === "Delete" && (fe = ge);
|
|
1477
1477
|
var Ve = 0;
|
|
1478
|
-
ae === "Delete" && ge ===
|
|
1478
|
+
ae === "Delete" && ge === Ie && (Ve = 1);
|
|
1479
1479
|
var ot = ae === "ArrowLeft" || ae === "ArrowRight";
|
|
1480
|
-
if (
|
|
1481
|
-
m(
|
|
1480
|
+
if (fe === void 0 || ge !== Ie && !ot) {
|
|
1481
|
+
m(Y), le(G, Ve);
|
|
1482
1482
|
return;
|
|
1483
1483
|
}
|
|
1484
|
-
var st =
|
|
1484
|
+
var st = fe;
|
|
1485
1485
|
if (ot) {
|
|
1486
1486
|
var rn = ae === "ArrowLeft" ? "left" : "right";
|
|
1487
|
-
st = X(be,
|
|
1488
|
-
} else ae === "Delete" && !j(be[
|
|
1489
|
-
st !==
|
|
1490
|
-
}, J = function(
|
|
1491
|
-
var G =
|
|
1492
|
-
var ge = G.selectionStart,
|
|
1493
|
-
if (be === void 0 && (be = ""), ge ===
|
|
1494
|
-
var
|
|
1495
|
-
|
|
1487
|
+
st = X(be, fe, rn), st !== fe && Y.preventDefault();
|
|
1488
|
+
} else ae === "Delete" && !j(be[fe]) ? st = X(be, fe, "right") : ae === "Backspace" && !j(be[fe]) && (st = X(be, fe, "left"));
|
|
1489
|
+
st !== fe && U(G, st, be), m(Y), le(G, Ve);
|
|
1490
|
+
}, J = function(Y) {
|
|
1491
|
+
var G = Y.target, ae = function() {
|
|
1492
|
+
var ge = G.selectionStart, Ie = G.selectionEnd, be = G.value;
|
|
1493
|
+
if (be === void 0 && (be = ""), ge === Ie) {
|
|
1494
|
+
var fe = X(be, ge);
|
|
1495
|
+
fe !== ge && U(G, fe, be);
|
|
1496
1496
|
}
|
|
1497
1497
|
};
|
|
1498
1498
|
ae(), requestAnimationFrame(function() {
|
|
1499
1499
|
ae();
|
|
1500
|
-
}), g(
|
|
1501
|
-
}, ne = function(
|
|
1502
|
-
|
|
1503
|
-
var G =
|
|
1500
|
+
}), g(Y), le(G);
|
|
1501
|
+
}, ne = function(Y) {
|
|
1502
|
+
Y.persist && Y.persist();
|
|
1503
|
+
var G = Y.target, ae = Y.currentTarget;
|
|
1504
1504
|
F.current = G, q.current.focusTimeout = setTimeout(function() {
|
|
1505
|
-
var ge = G.selectionStart,
|
|
1505
|
+
var ge = G.selectionStart, Ie = G.selectionEnd, be = G.value;
|
|
1506
1506
|
be === void 0 && (be = "");
|
|
1507
|
-
var
|
|
1508
|
-
|
|
1507
|
+
var fe = X(be, ge);
|
|
1508
|
+
fe !== ge && !(ge === 0 && Ie === be.length) && U(G, fe, be), b(Object.assign(Object.assign({}, Y), { currentTarget: ae }));
|
|
1509
1509
|
}, 0);
|
|
1510
|
-
},
|
|
1511
|
-
F.current = null, clearTimeout(q.current.focusTimeout), clearTimeout(q.current.setCaretTimeout), h(
|
|
1512
|
-
}, Pe =
|
|
1510
|
+
}, pe = function(Y) {
|
|
1511
|
+
F.current = null, clearTimeout(q.current.focusTimeout), clearTimeout(q.current.setCaretTimeout), h(Y);
|
|
1512
|
+
}, Pe = z && Dp() ? "numeric" : void 0, Ze = Object.assign({ inputMode: Pe }, y, {
|
|
1513
1513
|
type: t,
|
|
1514
1514
|
value: O,
|
|
1515
|
-
onChange:
|
|
1515
|
+
onChange: Ce,
|
|
1516
1516
|
onKeyDown: me,
|
|
1517
1517
|
onMouseUp: J,
|
|
1518
1518
|
onFocus: ne,
|
|
1519
|
-
onBlur:
|
|
1519
|
+
onBlur: pe
|
|
1520
1520
|
});
|
|
1521
1521
|
if (n === "text")
|
|
1522
|
-
return i ?
|
|
1522
|
+
return i ? de.createElement(de.Fragment, null, i(O, y) || null) : de.createElement("span", Object.assign({}, y, { ref: o }), O);
|
|
1523
1523
|
if (r) {
|
|
1524
1524
|
var xt = r;
|
|
1525
|
-
return
|
|
1525
|
+
return de.createElement(xt, Object.assign({}, Ze, { ref: o }));
|
|
1526
1526
|
}
|
|
1527
|
-
return
|
|
1527
|
+
return de.createElement("input", Object.assign({}, Ze, { ref: o }));
|
|
1528
1528
|
}
|
|
1529
1529
|
function io(e, t) {
|
|
1530
1530
|
var n = t.decimalScale, r = t.fixedDecimalScale, i = t.prefix;
|
|
@@ -1572,25 +1572,25 @@ function kp(e, t, n) {
|
|
|
1572
1572
|
var h = l === 0 ? "" : g;
|
|
1573
1573
|
e = e.substring(0, d) + h + e.substring(d + 1, e.length);
|
|
1574
1574
|
}
|
|
1575
|
-
var v = function(F, q,
|
|
1576
|
-
var
|
|
1577
|
-
o.startsWith("-") ?
|
|
1578
|
-
var X =
|
|
1579
|
-
return
|
|
1575
|
+
var v = function(F, q, W) {
|
|
1576
|
+
var R = !1, U = !1;
|
|
1577
|
+
o.startsWith("-") ? R = !1 : F.startsWith("--") ? (R = !1, U = !0) : s.startsWith("-") && F.length === s.length ? R = !1 : F[0] === "-" && (R = !0);
|
|
1578
|
+
var X = R ? 1 : 0;
|
|
1579
|
+
return U && (X = 2), X && (F = F.substring(X), q -= X, W -= X), { value: F, start: q, end: W, hasNegation: R };
|
|
1580
1580
|
}, x = v(e, d, p), j = x.hasNegation;
|
|
1581
1581
|
r = x, e = r.value, d = r.start, p = r.end;
|
|
1582
1582
|
var w = v(t.lastValue, c.start, c.end), y = w.start, D = w.end, S = w.value, O = e.substring(d, p);
|
|
1583
1583
|
e.length && S.length && (y > S.length - s.length || D < o.length) && !(O && s.startsWith(O)) && (e = S);
|
|
1584
1584
|
var E = 0;
|
|
1585
1585
|
e.startsWith(o) ? E += o.length : d < o.length && (E = d), e = e.substring(E), p -= E;
|
|
1586
|
-
var _ = e.length,
|
|
1587
|
-
e.endsWith(s) ? _ =
|
|
1586
|
+
var _ = e.length, A = e.length - s.length;
|
|
1587
|
+
e.endsWith(s) ? _ = A : (p > A || p > e.length - s.length) && (_ = p), e = e.substring(0, _), e = Tp(j ? "-" + e : e, i), e = (e.match(Ap(g)) || []).join("");
|
|
1588
1588
|
var L = e.indexOf(g);
|
|
1589
1589
|
e = e.replace(new RegExp(hl(g), "g"), function(F, q) {
|
|
1590
1590
|
return q === L ? "." : "";
|
|
1591
1591
|
});
|
|
1592
|
-
var C = ai(e, i), T = C.beforeDecimal,
|
|
1593
|
-
return u.end - u.start < c.end - c.start && T === "" && b && !parseFloat(
|
|
1592
|
+
var C = ai(e, i), T = C.beforeDecimal, z = C.afterDecimal, $ = C.addNegation;
|
|
1593
|
+
return u.end - u.start < c.end - c.start && T === "" && b && !parseFloat(z) && (e = $ ? "-" : ""), e;
|
|
1594
1594
|
}
|
|
1595
1595
|
function Bp(e, t) {
|
|
1596
1596
|
var n = t.prefix;
|
|
@@ -1636,24 +1636,24 @@ function Mp(e) {
|
|
|
1636
1636
|
un(p) ? un(d) || (y = y || typeof d == "number") : y = y || typeof p == "number";
|
|
1637
1637
|
var D = function($) {
|
|
1638
1638
|
return vl($) ? $ : (typeof $ == "number" && ($ = xl($)), y && typeof l == "number" ? ro($, l, !!c) : $);
|
|
1639
|
-
}, S = wl(D(p), D(d), !!y, x, j, m), O = S[0], E = O.numAsString, _ = O.formattedValue,
|
|
1640
|
-
var F = $.target, q = $.key,
|
|
1641
|
-
if (
|
|
1639
|
+
}, S = wl(D(p), D(d), !!y, x, j, m), O = S[0], E = O.numAsString, _ = O.formattedValue, A = S[1], L = function($) {
|
|
1640
|
+
var F = $.target, q = $.key, W = F.selectionStart, R = F.selectionEnd, U = F.value;
|
|
1641
|
+
if (U === void 0 && (U = ""), (q === "Backspace" || q === "Delete") && R < u.length) {
|
|
1642
1642
|
$.preventDefault();
|
|
1643
1643
|
return;
|
|
1644
1644
|
}
|
|
1645
|
-
if (
|
|
1645
|
+
if (W !== R) {
|
|
1646
1646
|
i($);
|
|
1647
1647
|
return;
|
|
1648
1648
|
}
|
|
1649
|
-
q === "Backspace" &&
|
|
1649
|
+
q === "Backspace" && U[0] === "-" && W === u.length + 1 && n && Kt(F, 1), l && c && (q === "Backspace" && U[W - 1] === h ? (Kt(F, W - 1), $.preventDefault()) : q === "Delete" && U[W] === h && $.preventDefault()), v != null && v.includes(q) && U[W] === h && Kt(F, W + 1);
|
|
1650
1650
|
var X = s === !0 ? "," : s;
|
|
1651
|
-
q === "Backspace" && W
|
|
1651
|
+
q === "Backspace" && U[W - 1] === X && Kt(F, W - 1), q === "Delete" && U[W] === X && Kt(F, W + 1), i($);
|
|
1652
1652
|
}, C = function($) {
|
|
1653
1653
|
var F = E;
|
|
1654
1654
|
if (F.match(/\d/g) || (F = ""), r || (F = wp(F)), c && l && (F = ro(F, l, c)), F !== E) {
|
|
1655
1655
|
var q = io(F, e);
|
|
1656
|
-
|
|
1656
|
+
A({
|
|
1657
1657
|
formattedValue: q,
|
|
1658
1658
|
value: F,
|
|
1659
1659
|
floatValue: parseFloat(F)
|
|
@@ -1665,18 +1665,18 @@ function Mp(e) {
|
|
|
1665
1665
|
o($);
|
|
1666
1666
|
}, T = function($) {
|
|
1667
1667
|
return $ === h ? !0 : Hn($);
|
|
1668
|
-
},
|
|
1669
|
-
var F = $.currentValue, q = $.lastValue,
|
|
1670
|
-
return j(
|
|
1668
|
+
}, z = function($) {
|
|
1669
|
+
var F = $.currentValue, q = $.lastValue, W = $.formattedValue, R = $.currentValueIndex, U = $.formattedValueIndex, X = F[R], ee = W[U], se = yl(q, F), we = se.to, oe = function(Q) {
|
|
1670
|
+
return j(Q).indexOf(".") + u.length;
|
|
1671
1671
|
};
|
|
1672
|
-
return p === 0 && c && l && F[we.start] === h &&
|
|
1672
|
+
return p === 0 && c && l && F[we.start] === h && oe(F) < R && oe(W) > U ? !1 : R >= we.start && R < we.end && v && v.includes(X) && ee === h ? !0 : X === ee;
|
|
1673
1673
|
};
|
|
1674
1674
|
return Object.assign(Object.assign({}, g), {
|
|
1675
1675
|
value: _,
|
|
1676
1676
|
valueIsNumericString: !1,
|
|
1677
1677
|
isValidInputCharacter: T,
|
|
1678
|
-
isCharacterSame:
|
|
1679
|
-
onValueChange:
|
|
1678
|
+
isCharacterSame: z,
|
|
1679
|
+
onValueChange: A,
|
|
1680
1680
|
format: x,
|
|
1681
1681
|
removeFormatting: j,
|
|
1682
1682
|
getCaretBoundary: function($) {
|
|
@@ -1688,7 +1688,7 @@ function Mp(e) {
|
|
|
1688
1688
|
}
|
|
1689
1689
|
function ii(e) {
|
|
1690
1690
|
var t = Mp(e);
|
|
1691
|
-
return
|
|
1691
|
+
return de.createElement(Pp, Object.assign({}, t));
|
|
1692
1692
|
}
|
|
1693
1693
|
const Fp = ({ InputContainer: e = xn, value: t, onChange: n, debounceMs: r, label: i, withoutLabel: o, placeholder: s, size: l, hidden: c, disabled: u, showClearIcon: d, clearValue: p, className: f, step: m, noSelectOnFocus: g, decimalScale: b, fixedDecimalScale: h = !1, numberPrefix: v, numberSuffix: x, min: j, max: w, hint: y }) => {
|
|
1694
1694
|
const D = P(() => {
|
|
@@ -1699,9 +1699,9 @@ const Fp = ({ InputContainer: e = xn, value: t, onChange: n, debounceMs: r, labe
|
|
|
1699
1699
|
}, [p, n]), S = re(null), [O, E] = B((t == null ? void 0 : t.toString()) ?? ""), _ = P((L) => {
|
|
1700
1700
|
const C = L;
|
|
1701
1701
|
n && n(C == null || C === "" ? null : Number(C));
|
|
1702
|
-
}, [n]),
|
|
1703
|
-
var T,
|
|
1704
|
-
let C = parseFloat(((
|
|
1702
|
+
}, [n]), A = P((L) => {
|
|
1703
|
+
var T, z;
|
|
1704
|
+
let C = parseFloat(((z = (T = L.target) == null ? void 0 : T.value) == null ? void 0 : z.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
|
|
1705
1705
|
if (Number.isNaN(C) && (C = 0), !r) {
|
|
1706
1706
|
_(C.toString());
|
|
1707
1707
|
return;
|
|
@@ -1710,19 +1710,19 @@ const Fp = ({ InputContainer: e = xn, value: t, onChange: n, debounceMs: r, labe
|
|
|
1710
1710
|
_(C.toString());
|
|
1711
1711
|
}, r);
|
|
1712
1712
|
}, [r, _]);
|
|
1713
|
-
return
|
|
1713
|
+
return H(() => {
|
|
1714
1714
|
E(t === null ? "" : t.toString());
|
|
1715
|
-
}, [w, j, t]),
|
|
1715
|
+
}, [w, j, t]), H(() => {
|
|
1716
1716
|
w !== void 0 && Number(O) > w && E(w.toString()), j !== void 0 && Number(O) < j && E(j.toString());
|
|
1717
|
-
}, [O, w, j, E]),
|
|
1717
|
+
}, [O, w, j, E]), H(() => {
|
|
1718
1718
|
!n || t === null || (w !== void 0 && t > w && n(w), j !== void 0 && t < j && n(j));
|
|
1719
1719
|
}, [t, w, j, n]), /* @__PURE__ */ a.jsxs(e, { withoutLabel: o, label: i ?? "", hidden: c, className: f, hint: y, disabled: u, children: [
|
|
1720
1720
|
/* @__PURE__ */ a.jsx(ii, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: b, fixedDecimalScale: h, prefix: v, suffix: x, defaultValue: "", value: r ? O : (t == null ? void 0 : t.toString()) ?? "", placeholder: s ?? i, onFocus: (L) => {
|
|
1721
1721
|
!g && L.target.select();
|
|
1722
|
-
}, onChange:
|
|
1722
|
+
}, onChange: A, hidden: c, disabled: u, className: I("form-control text-end w-100", {
|
|
1723
1723
|
[`form-control-${l}`]: l
|
|
1724
1724
|
}), step: m, min: j, max: w }),
|
|
1725
|
-
d && t !== null && n && !u && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ a.jsx(
|
|
1725
|
+
d && t !== null && n && !u && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ a.jsx(te, { color: "secondary", size: "sm", onClick: D, children: /* @__PURE__ */ a.jsx(Bt, {}) }) })
|
|
1726
1726
|
] });
|
|
1727
1727
|
}, Vp = ({ InputContainer: e = Te, label: t, options: n, disabled: r, hidden: i, className: o, value: s, onChange: l }) => {
|
|
1728
1728
|
const c = P((u) => {
|
|
@@ -1731,7 +1731,7 @@ const Fp = ({ InputContainer: e = xn, value: t, onChange: n, debounceMs: r, labe
|
|
|
1731
1731
|
return /* @__PURE__ */ a.jsx(e, { isForRadioInput: !0, hidden: i, withoutLabel: !t, label: `${t}`, className: o, disabled: r, children: n.map((u) => /* @__PURE__ */ a.jsx(he.Check, { id: `radio-${u.id}`, label: u.name, type: "radio", value: u.id ?? "", checked: s === u.id, onChange: c, hidden: i, disabled: r, className: "w-100" }, u.id)) });
|
|
1732
1732
|
}, tN = ({ InputContainer: e = Te, formField: t, label: n, resetsFields: r, type: i, required: o, hidden: s, disabled: l, withoutLabel: c, hint: u, onChange: d, className: p }) => {
|
|
1733
1733
|
const { register: f, formState: m, setValue: g } = Ct(), b = Dt({ falseIfNotInit: !0 }), [h, v] = B(void 0), [x, j] = B(!1);
|
|
1734
|
-
|
|
1734
|
+
H(() => {
|
|
1735
1735
|
const D = t.split(".");
|
|
1736
1736
|
let S = m.errors;
|
|
1737
1737
|
D.forEach((O) => {
|
|
@@ -1739,7 +1739,7 @@ const Fp = ({ InputContainer: e = xn, value: t, onChange: n, debounceMs: r, labe
|
|
|
1739
1739
|
}), v(S);
|
|
1740
1740
|
}, [m, t]);
|
|
1741
1741
|
const w = k(() => l || b, [l, b]), y = h !== void 0;
|
|
1742
|
-
return
|
|
1742
|
+
return H(() => {
|
|
1743
1743
|
m.isSubmitted && j(!0);
|
|
1744
1744
|
}, [m]), /* @__PURE__ */ a.jsxs(e, { isForCheckInput: !0, hidden: s, label: n ?? "", required: o, disabled: w, isInvalid: y, withoutLabel: c, hint: u, className: p, children: [
|
|
1745
1745
|
/* @__PURE__ */ a.jsx(he.Check, { id: `check-${t}`, type: i ?? "checkbox", label: `${n}${o ? " *" : ""}`, ...f(t, {
|
|
@@ -1751,13 +1751,13 @@ const Fp = ({ InputContainer: e = xn, value: t, onChange: n, debounceMs: r, labe
|
|
|
1751
1751
|
] });
|
|
1752
1752
|
}, nN = ({ InputContainer: e = Te, label: t, formField: n, options: r, resetsFields: i, required: o, disabled: s, hidden: l, onChange: c, className: u }) => {
|
|
1753
1753
|
const { register: d, formState: p, setValue: f, watch: m } = Ct(), g = Dt({ falseIfNotInit: !0 }), [b, h] = B(void 0), [v, x] = B(!1), j = k(() => r, [r]), w = k(() => s || g, [s, g]);
|
|
1754
|
-
|
|
1754
|
+
H(() => {
|
|
1755
1755
|
const D = n.split(".");
|
|
1756
1756
|
let S = p.errors;
|
|
1757
1757
|
D.forEach((O) => {
|
|
1758
1758
|
S !== void 0 && (S = S[O]);
|
|
1759
1759
|
}), h(S);
|
|
1760
|
-
}, [p, n]),
|
|
1760
|
+
}, [p, n]), H(() => {
|
|
1761
1761
|
p.isSubmitted && x(!0);
|
|
1762
1762
|
}, [p]);
|
|
1763
1763
|
const y = b !== void 0;
|
|
@@ -1773,96 +1773,96 @@ const Fp = ({ InputContainer: e = xn, value: t, onChange: n, debounceMs: r, labe
|
|
|
1773
1773
|
}, rN = ({ label: e, InputContainer: t = Te, className: n, withoutLabel: r, hidden: i, disabled: o, contactType: s, formField: l, ...c }) => {
|
|
1774
1774
|
const { watch: u } = Ct(), d = u(l), p = Dt({ falseIfNotInit: !0 }), f = k(() => o || p, [o, p]);
|
|
1775
1775
|
return i ? null : /* @__PURE__ */ a.jsx(ml, { contactType: s, value: d, withoutLabel: r, label: e, className: n, children: /* @__PURE__ */ a.jsx(fn, { type: "text", formField: l, InputContainer: t, size: "sm", withoutLabel: !0, className: "flex-grow-1", disabled: f, ...c }) });
|
|
1776
|
-
}, aN = ({ InputContainer: e = Te, formField: t, label: n, size: r, defaultSelection: i, resetsFields: o, isNumber: s, required: l, hidden: c, disabled: u, items: d, onSearchQueryChange: p, selectedItemNavigateTo: f, texts: m, dropdownItemsNameWidth: g, isLoading: b, withoutLabel: h, additionalColumns: v, CustomOnChangeComponent: x, icon: j, displayIdAsName: w, onSelect: y, className: D, archiveColumn: S, hint: O, addNewOptionPath: E, refreshOptions: _, MiniDetailComponent:
|
|
1777
|
-
const { formState:
|
|
1776
|
+
}, aN = ({ InputContainer: e = Te, formField: t, label: n, size: r, defaultSelection: i, resetsFields: o, isNumber: s, required: l, hidden: c, disabled: u, items: d, onSearchQueryChange: p, selectedItemNavigateTo: f, texts: m, dropdownItemsNameWidth: g, isLoading: b, withoutLabel: h, additionalColumns: v, CustomOnChangeComponent: x, icon: j, displayIdAsName: w, onSelect: y, className: D, archiveColumn: S, hint: O, addNewOptionPath: E, refreshOptions: _, MiniDetailComponent: A, miniDetailPlacement: L, suggestedItems: C, suggestedItemsTitle: T }) => {
|
|
1777
|
+
const { formState: z, setValue: $, watch: F, control: q } = Ct(), W = Dt({ falseIfNotInit: !0 }), [R, U] = B(void 0), [X, ee] = B(!1), [se, we] = B(!1), oe = F(t) ?? null, Q = oe === (i == null ? void 0 : i.id) ? i == null ? void 0 : i.name : F(`${t}-DropdownName`), le = k(() => oe == null ? null : { id: oe ?? null, name: Q ?? "" }, [oe, Q]), Ce = P(() => {
|
|
1778
1778
|
const G = t.split(".");
|
|
1779
|
-
let ae =
|
|
1779
|
+
let ae = z.errors;
|
|
1780
1780
|
G.forEach((ge) => {
|
|
1781
1781
|
ae !== void 0 && (ae = ae[ge]);
|
|
1782
|
-
}),
|
|
1783
|
-
}, [
|
|
1784
|
-
if ((G == null ? void 0 : G.id) ===
|
|
1782
|
+
}), U(ae);
|
|
1783
|
+
}, [z, t]), me = P((G) => {
|
|
1784
|
+
if ((G == null ? void 0 : G.id) === oe)
|
|
1785
1785
|
return;
|
|
1786
|
-
if (y && y(G), o && o.forEach((ge) => $(ge, null, { shouldDirty: !0, shouldValidate:
|
|
1786
|
+
if (y && y(G), o && o.forEach((ge) => $(ge, null, { shouldDirty: !0, shouldValidate: se })), G === null) {
|
|
1787
1787
|
$(t, null, {
|
|
1788
1788
|
shouldDirty: !0,
|
|
1789
|
-
shouldValidate:
|
|
1789
|
+
shouldValidate: se
|
|
1790
1790
|
}), $(`${t}-DropdownName`, null);
|
|
1791
1791
|
return;
|
|
1792
1792
|
}
|
|
1793
1793
|
let ae = null;
|
|
1794
1794
|
s ? ae = (G == null ? void 0 : G.id) !== null && (G == null ? void 0 : G.id) !== "" ? parseInt(G.id.toString(), 10) : null : ae = G.id === null || G.id === void 0 || G.id === "" ? null : G.id, $(t, ae, {
|
|
1795
1795
|
shouldDirty: !0,
|
|
1796
|
-
shouldValidate:
|
|
1796
|
+
shouldValidate: se
|
|
1797
1797
|
}), $(`${t}-DropdownName`, G.name ?? "");
|
|
1798
|
-
}, [$, t,
|
|
1799
|
-
|
|
1798
|
+
}, [$, t, se, s, o, oe, y]), J = P((G) => {
|
|
1799
|
+
ee(!1), me(G);
|
|
1800
1800
|
}, [me]), ne = P(() => {
|
|
1801
|
-
|
|
1802
|
-
}, []),
|
|
1803
|
-
return
|
|
1804
|
-
|
|
1805
|
-
}, [
|
|
1806
|
-
|
|
1807
|
-
}, [
|
|
1808
|
-
/* @__PURE__ */ a.jsxs(za, { currentSelection:
|
|
1809
|
-
w && (
|
|
1810
|
-
/* @__PURE__ */ a.jsx(Za, { control: q, name: t, render: () => /* @__PURE__ */ a.jsx(qa, { value:
|
|
1801
|
+
ee(!1);
|
|
1802
|
+
}, []), pe = re(null), Pe = R !== void 0, Ze = f !== void 0, xt = Ze && le !== null, Y = k(() => u || W, [u, W]);
|
|
1803
|
+
return H(() => {
|
|
1804
|
+
Ce();
|
|
1805
|
+
}, [Ce]), H(() => {
|
|
1806
|
+
z.isSubmitted && we(!0);
|
|
1807
|
+
}, [z]), /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsxs(e, { label: n ?? "", required: l, disabled: Y, hidden: c, withoutLabel: h, isInvalid: Pe, inputContainerClassName: I({ "luminus-dropdown-select-open": X }), hint: O, className: D, children: [
|
|
1808
|
+
/* @__PURE__ */ a.jsxs(za, { currentSelection: le, selectedItemNavigateTo: f, children: [
|
|
1809
|
+
w && (le == null ? void 0 : le.name) && /* @__PURE__ */ a.jsx(M, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: le.name }),
|
|
1810
|
+
/* @__PURE__ */ a.jsx(Za, { control: q, name: t, render: () => /* @__PURE__ */ a.jsx(qa, { value: oe, MiniDetailComponent: A, miniDetailPlacement: L, children: /* @__PURE__ */ a.jsx(he.Select, { size: r, onMouseDown: (G) => {
|
|
1811
1811
|
G.currentTarget.focus(), G.preventDefault();
|
|
1812
1812
|
}, onClick: () => {
|
|
1813
|
-
!Ze && !
|
|
1814
|
-
}, ref:
|
|
1813
|
+
!Ze && !Y && ee(!0);
|
|
1814
|
+
}, ref: pe, value: oe ?? "", onChange: () => {
|
|
1815
1815
|
}, isInvalid: Pe, hidden: c, className: I("w-100", {
|
|
1816
|
-
"luminus-dropdown-picker-disabled":
|
|
1816
|
+
"luminus-dropdown-picker-disabled": Y,
|
|
1817
1817
|
"luminus-dropdown-picker-link": xt
|
|
1818
|
-
}), children: /* @__PURE__ */ a.jsx("option", { value:
|
|
1819
|
-
x || !
|
|
1820
|
-
!x && !
|
|
1821
|
-
G.preventDefault(), G.stopPropagation(),
|
|
1818
|
+
}), children: /* @__PURE__ */ a.jsx("option", { value: oe, children: w ? oe : (Q == null ? void 0 : Q.length) > 0 ? Q : oe }) }) }) }),
|
|
1819
|
+
x || !Y && Ze ? /* @__PURE__ */ a.jsxs("div", { className: "custom-picker-button", children: [
|
|
1820
|
+
!x && !Y && Ze && /* @__PURE__ */ a.jsx(te, { size: "sm", color: "secondary", onClick: (G) => {
|
|
1821
|
+
G.preventDefault(), G.stopPropagation(), ee(!0);
|
|
1822
1822
|
}, children: j ?? /* @__PURE__ */ a.jsx(Rs, {}) }),
|
|
1823
1823
|
x ?? null
|
|
1824
1824
|
] }) : null
|
|
1825
1825
|
] }),
|
|
1826
|
-
|
|
1827
|
-
|
|
1826
|
+
R && /* @__PURE__ */ a.jsx(Zt, { message: R.message }),
|
|
1827
|
+
pe.current && /* @__PURE__ */ a.jsx(Ya, { show: X, onCancel: ne, items: d, currentSelection: le, onSelectionChange: J, onSearchQueryChange: p, texts: m, itemsNameWidth: g, additionalColumns: v, displayIdAsName: w, isLoading: b, disabled: Y, inputRef: pe, archiveColumn: S, addNewOptionPath: E, refreshOptions: _, suggestedItems: C, suggestedItemsTitle: T })
|
|
1828
1828
|
] }) });
|
|
1829
1829
|
}, iN = ({ InputContainer: e = Te, label: t, formField: n, hidden: r, required: i, placeholder: o, disabled: s, showClearIcon: l, resetsFields: c, multiple: u, accept: d, withoutLabel: p, hint: f, className: m }) => {
|
|
1830
1830
|
const { watch: g, setValue: b, register: h, formState: v } = Ct(), x = Dt({ falseIfNotInit: !0 }), [j, w] = B(!1), [y, D] = B(void 0), S = P(() => {
|
|
1831
1831
|
b(n, "");
|
|
1832
1832
|
}, [b, n]), O = P(() => {
|
|
1833
|
-
const
|
|
1833
|
+
const A = n.split(".");
|
|
1834
1834
|
let L = v.errors;
|
|
1835
|
-
|
|
1835
|
+
A.forEach((C) => {
|
|
1836
1836
|
L !== void 0 && (L = L[C]);
|
|
1837
1837
|
}), D(L);
|
|
1838
1838
|
}, [v, n]);
|
|
1839
|
-
|
|
1839
|
+
H(O, [O]), H(() => {
|
|
1840
1840
|
v.isSubmitted && w(!0);
|
|
1841
1841
|
}, [v]);
|
|
1842
1842
|
const E = k(() => s || x, [s, x]), _ = y !== void 0;
|
|
1843
1843
|
return /* @__PURE__ */ a.jsxs(e, { label: t ?? "", required: i, disabled: E, hidden: r, withoutLabel: p, isInvalid: _, hint: f, className: m, children: [
|
|
1844
1844
|
/* @__PURE__ */ a.jsx(yd, { type: "file", multiple: u, accept: d.join(", "), placeholder: o ?? t, isInvalid: _, hidden: r, disabled: E, className: "w-100", ...h(n, {
|
|
1845
1845
|
onChange: () => {
|
|
1846
|
-
c && c.forEach((
|
|
1846
|
+
c && c.forEach((A) => b(A, null, { shouldDirty: !0, shouldValidate: j }));
|
|
1847
1847
|
}
|
|
1848
1848
|
}) }),
|
|
1849
|
-
l && g(n) && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ a.jsx(
|
|
1849
|
+
l && g(n) && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ a.jsx(te, { color: "secondary", size: "sm", onClick: S, children: /* @__PURE__ */ a.jsx(Bt, {}) }) }),
|
|
1850
1850
|
y && /* @__PURE__ */ a.jsx(Zt, { message: y.message })
|
|
1851
1851
|
] });
|
|
1852
1852
|
}, $p = ({ children: e, onStorno: t, noSpacer: n }) => {
|
|
1853
1853
|
const { formState: r } = Ct(), i = Dt({ falseIfNotInit: !0 }), [o, s] = B(!1);
|
|
1854
|
-
return
|
|
1854
|
+
return H(() => {
|
|
1855
1855
|
s(Object.keys(r.dirtyFields).length > 0);
|
|
1856
1856
|
}, [r]), o ? /* @__PURE__ */ a.jsx(zu, { onStorno: t, noSpacer: n, disabled: i, children: e }) : null;
|
|
1857
1857
|
}, Pa = ({ InputContainer: e = Te, options: t, formField: n, label: r, size: i, resetsFields: o, isNumber: s, required: l, hidden: c, disabled: u, withoutLabel: d, noSortOptions: p, suffixIdToName: f, onSelect: m, className: g, appendCurrentSelectionWithName: b, hint: h, addNewOptionPath: v, refreshOptions: x, MiniDetailComponent: j, miniDetailPlacement: w, selectedItemNavigateTo: y, noRemoveButton: D }) => {
|
|
1858
|
-
const { texts: { customSelect: S } } = V(
|
|
1858
|
+
const { texts: { customSelect: S } } = V(K), { formState: O, setValue: E, watch: _, control: A } = Ct(), L = Dt({ falseIfNotInit: !0 }), [C, T] = B(void 0), [z, $] = B(!1), [F, q] = B(!1), [W, R] = B(""), U = _(n), X = k(() => t.find((ne) => ne.id === U) ?? null, [t, U]), ee = P(() => {
|
|
1859
1859
|
const ne = n.split(".");
|
|
1860
|
-
let
|
|
1860
|
+
let pe = O.errors;
|
|
1861
1861
|
ne.forEach((Pe) => {
|
|
1862
|
-
|
|
1863
|
-
}), T(
|
|
1864
|
-
}, [O, n]),
|
|
1865
|
-
if ((ne == null ? void 0 : ne.id) ===
|
|
1862
|
+
pe !== void 0 && (pe = pe[Pe]);
|
|
1863
|
+
}), T(pe);
|
|
1864
|
+
}, [O, n]), se = P((ne) => {
|
|
1865
|
+
if ((ne == null ? void 0 : ne.id) === U)
|
|
1866
1866
|
return;
|
|
1867
1867
|
if (m && m(ne), o && o.forEach((Pe) => E(Pe, null, { shouldDirty: !0, shouldValidate: F })), ne === null) {
|
|
1868
1868
|
E(n, null, {
|
|
@@ -1871,51 +1871,51 @@ const Fp = ({ InputContainer: e = xn, value: t, onChange: n, debounceMs: r, labe
|
|
|
1871
1871
|
});
|
|
1872
1872
|
return;
|
|
1873
1873
|
}
|
|
1874
|
-
let
|
|
1875
|
-
s ?
|
|
1874
|
+
let pe = null;
|
|
1875
|
+
s ? pe = (ne == null ? void 0 : ne.id) !== null && (ne == null ? void 0 : ne.id) !== "" ? parseInt(ne.id.toString(), 10) : null : pe = ne.id === null || ne.id === void 0 || ne.id === "" ? null : ne.id, E(n, pe, {
|
|
1876
1876
|
shouldDirty: !0,
|
|
1877
1877
|
shouldValidate: F
|
|
1878
1878
|
});
|
|
1879
|
-
}, [E, n, s, o,
|
|
1880
|
-
$(!1),
|
|
1881
|
-
}, [
|
|
1882
|
-
|
|
1883
|
-
}, []),
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
}, [
|
|
1879
|
+
}, [E, n, s, o, U, F, m]), we = P((ne) => {
|
|
1880
|
+
$(!1), se(ne);
|
|
1881
|
+
}, [se]), oe = P((ne) => {
|
|
1882
|
+
R(ne);
|
|
1883
|
+
}, []), Q = k(() => u || L, [u, L]);
|
|
1884
|
+
H(() => {
|
|
1885
|
+
ee();
|
|
1886
|
+
}, [ee]), H(() => {
|
|
1887
1887
|
O.isSubmitted && q(!0);
|
|
1888
1888
|
}, [O]);
|
|
1889
|
-
const
|
|
1890
|
-
var
|
|
1891
|
-
return ne === null ? "" : !ne.name || ne.name.length === 0 ? ((
|
|
1892
|
-
}, [f]),
|
|
1889
|
+
const le = P((ne) => {
|
|
1890
|
+
var pe;
|
|
1891
|
+
return ne === null ? "" : !ne.name || ne.name.length === 0 ? ((pe = ne.id) == null ? void 0 : pe.toString()) ?? "" : f ? `${ne.name} (${ne.id})` : ne.name;
|
|
1892
|
+
}, [f]), Ce = k(() => {
|
|
1893
1893
|
const ne = t ? [...t] : [];
|
|
1894
|
-
return b !== void 0 &&
|
|
1895
|
-
id:
|
|
1896
|
-
name:
|
|
1897
|
-
})).filter((
|
|
1894
|
+
return b !== void 0 && U && (ne.some((pe) => pe.id === U) || ne.push({ id: U, name: b })), ne.map((pe) => ({
|
|
1895
|
+
id: pe.id,
|
|
1896
|
+
name: le(pe)
|
|
1897
|
+
})).filter((pe) => qe(pe.name, W)).sort((pe, Pe) => p ? 0 : (pe.name ?? "").localeCompare(Pe.name ?? ""));
|
|
1898
1898
|
}, [
|
|
1899
1899
|
t,
|
|
1900
1900
|
p,
|
|
1901
|
-
|
|
1902
|
-
|
|
1901
|
+
W,
|
|
1902
|
+
le,
|
|
1903
1903
|
b,
|
|
1904
|
-
|
|
1904
|
+
U
|
|
1905
1905
|
]), me = re(null), J = C !== void 0;
|
|
1906
|
-
return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsxs(e, { label: r ?? "", required: l, disabled:
|
|
1907
|
-
/* @__PURE__ */ a.jsx(za, { currentSelection: X, selectedItemNavigateTo: y, children: /* @__PURE__ */ a.jsx(Za, { control:
|
|
1906
|
+
return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsxs(e, { label: r ?? "", required: l, disabled: Q, hidden: c, withoutLabel: d, isInvalid: J, inputContainerClassName: I({ "luminus-dropdown-select-open": z }), hint: h, className: g, children: [
|
|
1907
|
+
/* @__PURE__ */ a.jsx(za, { currentSelection: X, selectedItemNavigateTo: y, children: /* @__PURE__ */ a.jsx(Za, { control: A, name: n, render: () => /* @__PURE__ */ a.jsx(qa, { value: U, MiniDetailComponent: j, miniDetailPlacement: w, children: /* @__PURE__ */ a.jsx(he.Select, { size: i, onMouseDown: (ne) => {
|
|
1908
1908
|
ne.currentTarget.focus(), ne.preventDefault();
|
|
1909
1909
|
}, onClick: () => {
|
|
1910
1910
|
$(!0);
|
|
1911
|
-
}, ref: me, value:
|
|
1912
|
-
}, isInvalid: J, hidden: c, disabled:
|
|
1911
|
+
}, ref: me, value: U ?? "", onChange: () => {
|
|
1912
|
+
}, isInvalid: J, hidden: c, disabled: Q, className: "w-100", children: /* @__PURE__ */ a.jsx("option", { value: (X == null ? void 0 : X.id) ?? "", children: le(X) }) }) }) }) }),
|
|
1913
1913
|
C && /* @__PURE__ */ a.jsx(Zt, { message: C.message }),
|
|
1914
|
-
me.current && /* @__PURE__ */ a.jsx(Ya, { show:
|
|
1914
|
+
me.current && /* @__PURE__ */ a.jsx(Ya, { show: z, onCancel: () => $(!1), items: Ce, currentSelection: X ?? null, onSelectionChange: we, onSearchQueryChange: oe, texts: S, disabled: Q, inputRef: me, autoHideSearch: !0, allItemsLength: t.length, addNewOptionPath: v, refreshOptions: x, noRemoveButton: D })
|
|
1915
1915
|
] }) });
|
|
1916
1916
|
}, oN = ({ InputContainer: e = Te, formField: t, label: n, placeholder: r, size: i, resetsFields: o, showClearIcon: s, clearValue: l, required: c, hidden: u, disabled: d, withoutLabel: p, step: f, stepperStep: m = 1, className: g, min: b, max: h, onChange: v, hint: x }) => {
|
|
1917
|
-
const { register: j, formState: w, setValue: y, watch: D } = Ct(), S = Dt({ falseIfNotInit: !0 }), [O, E] = B(void 0), [_,
|
|
1918
|
-
y(q, kn(
|
|
1917
|
+
const { register: j, formState: w, setValue: y, watch: D } = Ct(), S = Dt({ falseIfNotInit: !0 }), [O, E] = B(void 0), [_, A] = B(!1), L = P((q, W, R) => {
|
|
1918
|
+
y(q, kn(W, b, h), R);
|
|
1919
1919
|
}, [h, b, y]), C = P(() => {
|
|
1920
1920
|
const q = l ?? null;
|
|
1921
1921
|
L(t, q !== null ? Number(q) : null, {
|
|
@@ -1924,80 +1924,80 @@ const Fp = ({ InputContainer: e = xn, value: t, onChange: n, debounceMs: r, labe
|
|
|
1924
1924
|
});
|
|
1925
1925
|
}, [l, L, t, _]), T = P(() => {
|
|
1926
1926
|
const q = t.split(".");
|
|
1927
|
-
let
|
|
1928
|
-
q.forEach((
|
|
1929
|
-
|
|
1930
|
-
}), E(
|
|
1931
|
-
}, [w, t]),
|
|
1932
|
-
|
|
1927
|
+
let W = w.errors;
|
|
1928
|
+
q.forEach((R) => {
|
|
1929
|
+
W !== void 0 && (W = W[R]);
|
|
1930
|
+
}), E(W);
|
|
1931
|
+
}, [w, t]), z = k(() => d || S, [d, S]);
|
|
1932
|
+
H(() => {
|
|
1933
1933
|
T();
|
|
1934
|
-
}, [T]),
|
|
1935
|
-
w.isSubmitted &&
|
|
1934
|
+
}, [T]), H(() => {
|
|
1935
|
+
w.isSubmitted && A(!0);
|
|
1936
1936
|
}, [w]);
|
|
1937
1937
|
const $ = O !== void 0, F = D(t);
|
|
1938
|
-
return /* @__PURE__ */ a.jsxs(e, { label: n ?? "", required: c, disabled:
|
|
1938
|
+
return /* @__PURE__ */ a.jsxs(e, { label: n ?? "", required: c, disabled: z, hidden: u, withoutLabel: p, isInvalid: $, hint: x, className: g, children: [
|
|
1939
1939
|
/* @__PURE__ */ a.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
1940
1940
|
/* @__PURE__ */ a.jsx(he.Control, { type: "number", placeholder: r ?? n, size: i, ...j(t, {
|
|
1941
1941
|
setValueAs: (q) => q == null || q === "" ? null : kn(Number(q), b, h),
|
|
1942
1942
|
min: b,
|
|
1943
1943
|
max: h,
|
|
1944
1944
|
onChange: (q) => {
|
|
1945
|
-
var
|
|
1946
|
-
o && o.forEach((
|
|
1945
|
+
var W;
|
|
1946
|
+
o && o.forEach((R) => y(R, null, { shouldDirty: !0, shouldValidate: _ })), v && v((W = q.target) != null && W.value ? Number(q.target.value) ?? null : null);
|
|
1947
1947
|
}
|
|
1948
|
-
}), isInvalid: $, hidden: u, disabled:
|
|
1949
|
-
/* @__PURE__ */ a.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ a.jsx(
|
|
1948
|
+
}), isInvalid: $, hidden: u, disabled: z, className: "w-100 luminus-numeric-stepper", step: f, min: b, max: h }),
|
|
1949
|
+
/* @__PURE__ */ a.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ a.jsx(te, { size: "sm", onClick: (q) => {
|
|
1950
1950
|
q.preventDefault(), q.stopPropagation(), L(t, ((F ? Number(F) : 0) - m).toString(), { shouldDirty: !0, shouldValidate: _ });
|
|
1951
1951
|
}, children: /* @__PURE__ */ a.jsx(ks, {}) }) }),
|
|
1952
|
-
/* @__PURE__ */ a.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ a.jsx(
|
|
1952
|
+
/* @__PURE__ */ a.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ a.jsx(te, { size: "sm", onClick: (q) => {
|
|
1953
1953
|
q.preventDefault(), q.stopPropagation(), L(t, ((F ? Number(F) : 0) + m).toString(), { shouldDirty: !0, shouldValidate: _ });
|
|
1954
1954
|
}, children: /* @__PURE__ */ a.jsx(Bs, {}) }) })
|
|
1955
1955
|
] }),
|
|
1956
|
-
s && D(t) && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ a.jsx(
|
|
1956
|
+
s && D(t) && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ a.jsx(te, { color: "secondary", size: "sm", onClick: C, children: /* @__PURE__ */ a.jsx(Bt, {}) }) }),
|
|
1957
1957
|
O && /* @__PURE__ */ a.jsx(Zt, { message: O.message })
|
|
1958
1958
|
] });
|
|
1959
1959
|
}, sN = ({ InputContainer: e = Te, formField: t, label: n, placeholder: r, resetsFields: i, showClearIcon: o, clearValue: s, required: l, hidden: c, disabled: u, withoutLabel: d, step: p, size: f, CustomOnChangeComponent: m, noSelectOnFocus: g, className: b, decimalScale: h = 2, fixedDecimalScale: v = !1, numberPrefix: x, numberSuffix: j, min: w, max: y, onChange: D, hint: S }) => {
|
|
1960
|
-
const { formState: O, setValue: E, watch: _, control:
|
|
1960
|
+
const { formState: O, setValue: E, watch: _, control: A } = Ct(), L = Dt({ falseIfNotInit: !0 }), [C, T] = B(void 0), [z, $] = B(!1), F = P(() => {
|
|
1961
1961
|
const X = s ?? null;
|
|
1962
1962
|
E(t, X !== null ? Number(X) : null, {
|
|
1963
1963
|
shouldDirty: !0,
|
|
1964
|
-
shouldValidate:
|
|
1964
|
+
shouldValidate: z
|
|
1965
1965
|
});
|
|
1966
|
-
}, [s, E, t,
|
|
1966
|
+
}, [s, E, t, z]), q = P(() => {
|
|
1967
1967
|
const X = t.split(".");
|
|
1968
|
-
let
|
|
1969
|
-
X.forEach((
|
|
1970
|
-
|
|
1971
|
-
}), T(
|
|
1972
|
-
}, [O, t]),
|
|
1973
|
-
|
|
1968
|
+
let ee = O.errors;
|
|
1969
|
+
X.forEach((se) => {
|
|
1970
|
+
ee !== void 0 && (ee = ee[se]);
|
|
1971
|
+
}), T(ee);
|
|
1972
|
+
}, [O, t]), W = k(() => u || L, [u, L]);
|
|
1973
|
+
H(() => {
|
|
1974
1974
|
q();
|
|
1975
|
-
}, [q]),
|
|
1975
|
+
}, [q]), H(() => {
|
|
1976
1976
|
O.isSubmitted && $(!0);
|
|
1977
1977
|
}, [O]);
|
|
1978
|
-
const
|
|
1979
|
-
|
|
1980
|
-
y !== void 0 &&
|
|
1981
|
-
}, [t,
|
|
1982
|
-
const
|
|
1983
|
-
return /* @__PURE__ */ a.jsxs(e, { label: n ?? "", required: l, disabled:
|
|
1978
|
+
const R = _(t);
|
|
1979
|
+
H(() => {
|
|
1980
|
+
y !== void 0 && R > y && E(t, y), w !== void 0 && R < w && E(t, w);
|
|
1981
|
+
}, [t, R, y, w, E]);
|
|
1982
|
+
const U = C !== void 0;
|
|
1983
|
+
return /* @__PURE__ */ a.jsxs(e, { label: n ?? "", required: l, disabled: W, hidden: c, withoutLabel: d, isInvalid: U, hint: S, className: b, children: [
|
|
1984
1984
|
/* @__PURE__ */ a.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
1985
|
-
/* @__PURE__ */ a.jsx(Za, { control:
|
|
1986
|
-
!g &&
|
|
1987
|
-
}, onChange: (
|
|
1988
|
-
var
|
|
1989
|
-
const
|
|
1990
|
-
i && i.forEach((J) => E(J, null, { shouldDirty: !0, shouldValidate:
|
|
1991
|
-
const
|
|
1992
|
-
|
|
1993
|
-
}, hidden: c, disabled:
|
|
1994
|
-
"is-invalid":
|
|
1985
|
+
/* @__PURE__ */ a.jsx(Za, { control: A, name: t, render: ({ field: { ref: X, onChange: ee, name: se, value: we } }) => /* @__PURE__ */ a.jsx(ii, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: h, fixedDecimalScale: v, prefix: x, suffix: j, defaultValue: "", name: se, value: we ?? "", placeholder: r ?? n, onFocus: (oe) => {
|
|
1986
|
+
!g && oe.target.select();
|
|
1987
|
+
}, onChange: (oe) => {
|
|
1988
|
+
var Ce, me;
|
|
1989
|
+
const Q = parseFloat(((me = (Ce = oe.target) == null ? void 0 : Ce.value) == null ? void 0 : me.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
|
|
1990
|
+
i && i.forEach((J) => E(J, null, { shouldDirty: !0, shouldValidate: z }));
|
|
1991
|
+
const le = Q == null || Number.isNaN(Q) ? null : Number(Q);
|
|
1992
|
+
ee(le), D && D(le);
|
|
1993
|
+
}, hidden: c, disabled: W, className: I("form-control text-end w-100", {
|
|
1994
|
+
"is-invalid": U
|
|
1995
1995
|
}, {
|
|
1996
1996
|
[`form-control-${f}`]: f
|
|
1997
1997
|
}), step: p, getInputRef: X, min: w, max: y }) }),
|
|
1998
1998
|
m && /* @__PURE__ */ a.jsx("div", { className: "custom-picker-button", children: m })
|
|
1999
1999
|
] }),
|
|
2000
|
-
o && _(t) && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ a.jsx(
|
|
2000
|
+
o && _(t) && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ a.jsx(te, { color: "secondary", size: "sm", onClick: F, children: /* @__PURE__ */ a.jsx(Bt, {}) }) }),
|
|
2001
2001
|
C && /* @__PURE__ */ a.jsx(Zt, { message: C.message })
|
|
2002
2002
|
] });
|
|
2003
2003
|
}, lN = ({ color: e = "primary", icon: t = /* @__PURE__ */ a.jsx(jd, { size: 12 }), inputId: n = "context-file-input", accept: r = "*", onUpload: i, multiple: o, className: s, children: l, ...c }) => {
|
|
@@ -2034,7 +2034,7 @@ const Fp = ({ InputContainer: e = xn, value: t, onChange: n, debounceMs: r, labe
|
|
|
2034
2034
|
}), t;
|
|
2035
2035
|
}, Hp = (e) => e && e.type === "header" && e.member && e.member.caption !== "All" && // collapsed groups have this in continuing cells
|
|
2036
2036
|
e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo = (e) => !e.member && !e.isDrillThrough, co = (e, t) => typeof e == "function" ? e(t) : e.replace(":id", t), Wp = ({ dataSource: e, settings: t, pivotRef: n, localization: r, licenseKey: i, hyperlinkColumn: o, roomPasportization: s, enabled: l = !0 }) => {
|
|
2037
|
-
const { texts: { reports: c } } = V(
|
|
2037
|
+
const { texts: { reports: c } } = V(K), [u, d] = B(!1), p = re(null), f = n ?? p, m = k(() => ({
|
|
2038
2038
|
localization: r
|
|
2039
2039
|
}), [r]), g = P((w) => {
|
|
2040
2040
|
delete w[0], delete w[1], delete w[2];
|
|
@@ -2090,7 +2090,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2090
2090
|
]
|
|
2091
2091
|
} : null;
|
|
2092
2092
|
}, [h, f]);
|
|
2093
|
-
|
|
2093
|
+
H(() => {
|
|
2094
2094
|
var w, y, D, S;
|
|
2095
2095
|
if (u && l) {
|
|
2096
2096
|
if (s && v) {
|
|
@@ -2108,9 +2108,9 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2108
2108
|
(S = f.current) == null || S.flexmonster.updateData(e);
|
|
2109
2109
|
console.log("Updating flexmonster dataSource to: ", e);
|
|
2110
2110
|
}
|
|
2111
|
-
}, [e, l, u, h, f, s, v]),
|
|
2111
|
+
}, [e, l, u, h, f, s, v]), H(() => {
|
|
2112
2112
|
var w, y, D, S, O;
|
|
2113
|
-
if (u && l) {
|
|
2113
|
+
if (u && l && t !== void 0) {
|
|
2114
2114
|
const E = (w = f.current) == null ? void 0 : w.flexmonster.getReport();
|
|
2115
2115
|
if (E === void 0 || typeof E == "string")
|
|
2116
2116
|
return;
|
|
@@ -2131,16 +2131,16 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2131
2131
|
...h
|
|
2132
2132
|
]
|
|
2133
2133
|
});
|
|
2134
|
-
const
|
|
2135
|
-
(O = f.current) == null || O.flexmonster.setReport(
|
|
2134
|
+
const A = { ...E, ..._ };
|
|
2135
|
+
(O = f.current) == null || O.flexmonster.setReport(A), console.log("Refreshing flexmonster settings. New report: ", A);
|
|
2136
2136
|
}
|
|
2137
2137
|
}, [l, u, h, f, s, t]);
|
|
2138
2138
|
const x = P((w, y) => {
|
|
2139
2139
|
var L, C;
|
|
2140
2140
|
if (Hp(y)) {
|
|
2141
2141
|
w.text = ((L = y.member) == null ? void 0 : L.caption) ?? "";
|
|
2142
|
-
const T = w.style["padding-left"] ?? "4px",
|
|
2143
|
-
w.style["padding-left"] =
|
|
2142
|
+
const T = w.style["padding-left"] ?? "4px", z = parseInt(T, 10);
|
|
2143
|
+
w.style["padding-left"] = z + 11 + "px";
|
|
2144
2144
|
}
|
|
2145
2145
|
if (!o || !so(y, o.idColumn) || lo(y))
|
|
2146
2146
|
return;
|
|
@@ -2149,8 +2149,8 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2149
2149
|
return;
|
|
2150
2150
|
const S = co(o.url, D), O = "style='color: #00a45a; text-decoration: underline; cursor: pointer;'", E = y.type === "header" ? "onclick='event.stopImmediatePropagation()'" : "", _ = y.isDrillThrough || y.type === "header" ? `href='${S}' target='_blank'` : "";
|
|
2151
2151
|
w.style && (w.style["z-index"] = 1);
|
|
2152
|
-
const
|
|
2153
|
-
w.text =
|
|
2152
|
+
const A = `<a ${_} ${O} ${E}>${y.escapedLabel}</a>`;
|
|
2153
|
+
w.text = A;
|
|
2154
2154
|
}, [o]), j = P((w) => {
|
|
2155
2155
|
if (!o || !so(w, o.idColumn) || lo(w))
|
|
2156
2156
|
return;
|
|
@@ -2175,7 +2175,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2175
2175
|
}
|
|
2176
2176
|
) });
|
|
2177
2177
|
}, zp = (e, t, n, r) => {
|
|
2178
|
-
const { texts: { reports: i } } = V(
|
|
2178
|
+
const { texts: { reports: i } } = V(K), { prompt: o } = Nd(), { confirm: s } = St(), l = Ke(), { user: c } = V(Lt), { startLoading: u, stopLoading: d } = V(bt), { addNotification: p } = en(), f = P(async (v) => {
|
|
2179
2179
|
u("report-versionSavingAs");
|
|
2180
2180
|
try {
|
|
2181
2181
|
const x = await l.post("/reports/version", v);
|
|
@@ -2279,7 +2279,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2279
2279
|
return l;
|
|
2280
2280
|
}, [t, e, n, r]) };
|
|
2281
2281
|
}, Yp = ({ isOpen: e, onHide: t, usersData: n, reportVersionId: r, EmployeePicker: i, setReportVersion: o }) => {
|
|
2282
|
-
const { ProjectIconComponent: s, texts: { reports: l } } = V(
|
|
2282
|
+
const { ProjectIconComponent: s, texts: { reports: l } } = V(K), { confirm: c } = St(), [u, d] = B(null), { changeEmployeeRights: p } = qp(r), f = P((b) => {
|
|
2283
2283
|
o((h) => h === null ? null : {
|
|
2284
2284
|
...h,
|
|
2285
2285
|
users: b.filter((v) => v.isReportOwner === !1)
|
|
@@ -2295,9 +2295,9 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2295
2295
|
const v = await p(b, !1);
|
|
2296
2296
|
f(v);
|
|
2297
2297
|
}, [p, c, l, f]);
|
|
2298
|
-
return /* @__PURE__ */ a.jsxs(
|
|
2299
|
-
/* @__PURE__ */ a.jsx(
|
|
2300
|
-
/* @__PURE__ */ a.jsxs(
|
|
2298
|
+
return /* @__PURE__ */ a.jsxs(ue, { show: e, onHide: t, children: [
|
|
2299
|
+
/* @__PURE__ */ a.jsx(ue.Header, { closeButton: !0, children: /* @__PURE__ */ a.jsx(ue.Title, { children: l.reportSharing }) }),
|
|
2300
|
+
/* @__PURE__ */ a.jsxs(ue.Body, { children: [
|
|
2301
2301
|
/* @__PURE__ */ a.jsx(M, { variant: "h6", children: l.sharedWith }),
|
|
2302
2302
|
/* @__PURE__ */ a.jsxs(Fn, { variant: "flush", children: [
|
|
2303
2303
|
n && n.length === 0 ? /* @__PURE__ */ a.jsx("div", { className: "px-2 text-muted", children: l.noone.toLowerCase() }) : null,
|
|
@@ -2308,7 +2308,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2308
2308
|
" [",
|
|
2309
2309
|
b.id,
|
|
2310
2310
|
"]",
|
|
2311
|
-
/* @__PURE__ */ a.jsx(
|
|
2311
|
+
/* @__PURE__ */ a.jsx(te, { color: "danger", onClick: () => g(b.id), children: /* @__PURE__ */ a.jsx(s, { icon: "delete" }) })
|
|
2312
2312
|
] }, b.id))
|
|
2313
2313
|
] }),
|
|
2314
2314
|
/* @__PURE__ */ a.jsx(M, { variant: "h6", className: "mt-2 mb-2", children: l.addSharing }),
|
|
@@ -2326,78 +2326,86 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2326
2326
|
] });
|
|
2327
2327
|
}, Kp = (e, t) => {
|
|
2328
2328
|
const [n, r] = B(null);
|
|
2329
|
-
return
|
|
2329
|
+
return H(() => {
|
|
2330
2330
|
e.then(({ default: i }) => {
|
|
2331
2331
|
const o = t !== void 0 ? t(i) : i;
|
|
2332
2332
|
r(o);
|
|
2333
2333
|
});
|
|
2334
2334
|
}, [t, e]), { mappings: n };
|
|
2335
2335
|
}, cN = ({ reportType: e, title: t, data: n, filterElements: r, getReportRoute: i, localization: o, licenseKey: s, EmployeePicker: l, localizationJsonFile: c, localizationTransformer: u, hyperlinkColumn: d, roomPasportization: p = !1 }) => {
|
|
2336
|
-
const { texts: { reports: f } } = V(
|
|
2337
|
-
const
|
|
2338
|
-
g(gn(i(e), { id:
|
|
2336
|
+
const { texts: { reports: f } } = V(K), { confirm: m } = St(), g = Mr(), [b] = gu(), { id: h } = qs(), v = k(() => h === void 0 ? null : Number(h), [h]), x = P((Q) => {
|
|
2337
|
+
const le = Q === null ? "" : Q.toString();
|
|
2338
|
+
g(gn(i(e), { id: le }) + "?" + b.toString(), {
|
|
2339
2339
|
replace: !0,
|
|
2340
2340
|
flushSync: !0
|
|
2341
2341
|
});
|
|
2342
|
-
}, [i, g, e, b]), [j, w] = B(!1), y = re(null), { user: D } = V(Lt), { data: S, reloadData: O } = Be(`/reports/${e}`), { mappings: E } = Kp(c, u), [_,
|
|
2343
|
-
const
|
|
2344
|
-
x(
|
|
2345
|
-
}, [x]), C = P(async (
|
|
2346
|
-
await O(), x(
|
|
2347
|
-
}, [O, x]), { data: T, setData:
|
|
2348
|
-
|
|
2349
|
-
|
|
2342
|
+
}, [i, g, e, b]), [j, w] = B(!1), y = re(null), { user: D } = V(Lt), { data: S, reloadData: O } = Be(`/reports/${e}`), { mappings: E } = Kp(c, u), [_, A] = B(void 0), L = P((Q) => {
|
|
2343
|
+
const le = Q.target.value, Ce = le === "" ? null : Number(le);
|
|
2344
|
+
x(Ce);
|
|
2345
|
+
}, [x]), C = P(async (Q) => {
|
|
2346
|
+
await O(), x(Q);
|
|
2347
|
+
}, [O, x]), { data: T, setData: z, isLoading: $ } = Be(`/reports/version/${v}`, {
|
|
2348
|
+
enabled: v !== null,
|
|
2349
|
+
nullStateBeforeLoad: !1,
|
|
2350
|
+
nullStateOnFail: !0
|
|
2351
|
+
});
|
|
2352
|
+
H(() => {
|
|
2353
|
+
var le;
|
|
2354
|
+
if ($) {
|
|
2355
|
+
A(void 0);
|
|
2356
|
+
return;
|
|
2357
|
+
}
|
|
2350
2358
|
if (T === null) {
|
|
2351
|
-
|
|
2359
|
+
A({});
|
|
2352
2360
|
return;
|
|
2353
2361
|
}
|
|
2354
|
-
const
|
|
2355
|
-
|
|
2356
|
-
}, [T]);
|
|
2357
|
-
const { save:
|
|
2362
|
+
const Q = Gp(T) ?? {};
|
|
2363
|
+
A(Q), (le = y.current) == null || le.flexmonster.refresh();
|
|
2364
|
+
}, [T, $]);
|
|
2365
|
+
const { save: F, saveAs: q, archive: W, detach: R } = zp(e, y, v, C), U = k(() => ({
|
|
2358
2366
|
data: n ?? [],
|
|
2359
2367
|
mapping: E ?? void 0
|
|
2360
|
-
}), [n, E]),
|
|
2361
|
-
var
|
|
2362
|
-
await m(f.confirmRevertChanges) && ((
|
|
2363
|
-
}, [m,
|
|
2364
|
-
var
|
|
2365
|
-
return (
|
|
2366
|
-
}, [T == null ? void 0 : T.users, D.personalNumber]),
|
|
2367
|
-
await m(f.confirmDelete(T == null ? void 0 : T.name)) && (await
|
|
2368
|
-
}, [
|
|
2369
|
-
await m(f.confirmDetach(T == null ? void 0 : T.name)) && (await
|
|
2370
|
-
}, [m,
|
|
2371
|
-
return
|
|
2372
|
-
var
|
|
2373
|
-
v === null && x(((
|
|
2368
|
+
}), [n, E]), X = P(async () => {
|
|
2369
|
+
var le;
|
|
2370
|
+
await m(f.confirmRevertChanges) && ((le = y.current) == null || le.flexmonster.setReport({ dataSource: U, ..._ }));
|
|
2371
|
+
}, [m, U, f.confirmRevertChanges, _]), ee = k(() => (T == null ? void 0 : T.ownerId) === D.personalNumber, [T == null ? void 0 : T.ownerId, D.personalNumber]), se = k(() => {
|
|
2372
|
+
var Q;
|
|
2373
|
+
return (Q = T == null ? void 0 : T.users) == null ? void 0 : Q.some((le) => le.id === D.personalNumber && !le.isReportOwner);
|
|
2374
|
+
}, [T == null ? void 0 : T.users, D.personalNumber]), we = P(async () => {
|
|
2375
|
+
await m(f.confirmDelete(T == null ? void 0 : T.name)) && (await W(), x(null), await O());
|
|
2376
|
+
}, [W, m, O, T == null ? void 0 : T.name, f, x]), oe = P(async () => {
|
|
2377
|
+
await m(f.confirmDetach(T == null ? void 0 : T.name)) && (await R(), x(null), await O());
|
|
2378
|
+
}, [m, R, O, T == null ? void 0 : T.name, f, x]);
|
|
2379
|
+
return H(() => {
|
|
2380
|
+
var Q, le;
|
|
2381
|
+
v === null && x(((Q = S == null ? void 0 : S.reportVersions.find((Ce) => Ce.isSystem === !0)) == null ? void 0 : Q.reportVersionId) ?? ((le = S == null ? void 0 : S.reportVersions[0]) == null ? void 0 : le.reportVersionId) ?? null);
|
|
2374
2382
|
}, [S == null ? void 0 : S.reportVersions, v, x]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2375
2383
|
/* @__PURE__ */ a.jsx(Nt, { variant: "fullScreen", title: /* @__PURE__ */ a.jsxs("div", { className: "d-flex justify-content-start gap-3", children: [
|
|
2376
2384
|
/* @__PURE__ */ a.jsx(M, { variant: "h3", children: t }),
|
|
2377
2385
|
r,
|
|
2378
2386
|
/* @__PURE__ */ a.jsxs("div", { className: "d-flex gap-1 align-items-center", children: [
|
|
2379
2387
|
/* @__PURE__ */ a.jsxs(Dd, { size: "sm", value: v ?? void 0, onChange: L, children: [
|
|
2380
|
-
/* @__PURE__ */ a.jsx("optgroup", { label: f.versionSelectSystem, children: S == null ? void 0 : S.reportVersions.filter((
|
|
2381
|
-
/* @__PURE__ */ a.jsx("optgroup", { label: f.versionSelectYour, children: S == null ? void 0 : S.reportVersions.filter((
|
|
2382
|
-
/* @__PURE__ */ a.jsx("optgroup", { label: f.versionSelectSharedWithYou, children: S == null ? void 0 : S.reportVersions.filter((
|
|
2388
|
+
/* @__PURE__ */ a.jsx("optgroup", { label: f.versionSelectSystem, children: S == null ? void 0 : S.reportVersions.filter((Q) => Q.isSystem === !0).map((Q) => /* @__PURE__ */ a.jsx("option", { value: Q.reportVersionId, children: Q.name }, Q.reportVersionId)) }),
|
|
2389
|
+
/* @__PURE__ */ a.jsx("optgroup", { label: f.versionSelectYour, children: S == null ? void 0 : S.reportVersions.filter((Q) => Q.ownerId === D.personalNumber).map((Q) => /* @__PURE__ */ a.jsx("option", { value: Q.reportVersionId, children: Q.name }, Q.reportVersionId)) }),
|
|
2390
|
+
/* @__PURE__ */ a.jsx("optgroup", { label: f.versionSelectSharedWithYou, children: S == null ? void 0 : S.reportVersions.filter((Q) => Q.isSystem === !1 && Q.ownerId !== D.personalNumber).map((Q) => /* @__PURE__ */ a.jsx("option", { value: Q.reportVersionId, children: `${Q.name} [${Q.ownerId}]` }, Q.reportVersionId)) })
|
|
2383
2391
|
] }),
|
|
2384
|
-
/* @__PURE__ */ a.jsx(dt, { icon: /* @__PURE__ */ a.jsx(Sd, {}), onClick:
|
|
2385
|
-
/* @__PURE__ */ a.jsx(dt, { icon: /* @__PURE__ */ a.jsx(Cd, {}), onClick:
|
|
2392
|
+
/* @__PURE__ */ a.jsx(dt, { icon: /* @__PURE__ */ a.jsx(Sd, {}), onClick: F, disabled: v === null || (T == null ? void 0 : T.isSystem) || !ee, children: f.save }),
|
|
2393
|
+
/* @__PURE__ */ a.jsx(dt, { icon: /* @__PURE__ */ a.jsx(Cd, {}), onClick: q, className: "flex-shrink-0", children: f.saveAs }),
|
|
2386
2394
|
/* @__PURE__ */ a.jsxs(Mt, { toggle: /* @__PURE__ */ a.jsx(Ft, { as: tn }), children: [
|
|
2387
|
-
/* @__PURE__ */ a.jsx(Ye, { onClick:
|
|
2388
|
-
/* @__PURE__ */ a.jsx(Ye, { onClick: () => w(!0), disabled: !
|
|
2389
|
-
|
|
2390
|
-
|
|
2395
|
+
/* @__PURE__ */ a.jsx(Ye, { onClick: X, children: f.revertChanges }),
|
|
2396
|
+
/* @__PURE__ */ a.jsx(Ye, { onClick: () => w(!0), disabled: !ee || (T == null ? void 0 : T.isSystem), children: f.share }),
|
|
2397
|
+
ee && !(T != null && T.isSystem) ? /* @__PURE__ */ a.jsx(Ye, { color: "danger", onClick: we, children: f.delete }) : null,
|
|
2398
|
+
se && !(T != null && T.isSystem) ? /* @__PURE__ */ a.jsx(Ye, { color: "danger", onClick: oe, children: f.detach }) : null
|
|
2391
2399
|
] })
|
|
2392
2400
|
] })
|
|
2393
|
-
] }), children: /* @__PURE__ */ a.jsx("div", { className: I("h-100 w-100",
|
|
2401
|
+
] }), children: /* @__PURE__ */ a.jsx("div", { className: I("h-100 w-100", U.data && U.data.length > 0 ? "" : "d-none"), children: /* @__PURE__ */ a.jsx(Wp, { dataSource: U, settings: _, pivotRef: y, enabled: U.data && U.data.length > 0, roomPasportization: p, localization: o, licenseKey: s, hyperlinkColumn: d }) }) }),
|
|
2394
2402
|
T !== null ? /* @__PURE__ */ a.jsx(
|
|
2395
2403
|
Yp,
|
|
2396
2404
|
{
|
|
2397
2405
|
isOpen: j,
|
|
2398
2406
|
onHide: () => w(!1),
|
|
2399
2407
|
usersData: T.users ?? null,
|
|
2400
|
-
setReportVersion:
|
|
2408
|
+
setReportVersion: z,
|
|
2401
2409
|
reportVersionId: T == null ? void 0 : T.reportVersionId,
|
|
2402
2410
|
EmployeePicker: l
|
|
2403
2411
|
}
|
|
@@ -2412,7 +2420,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2412
2420
|
}, className: I(`border-${r}`, t.includes(r) && `bg-${r}`), onClick: () => {
|
|
2413
2421
|
t.includes(r) ? n(t.filter((i) => i !== r)) : n([...t, r]);
|
|
2414
2422
|
} }, r)) }), Qp = ({ linksTo: e, onClick: t, children: n }) => e ? /* @__PURE__ */ a.jsx(He, { to: e, className: "text-decoration-none", onClick: t, children: n }) : /* @__PURE__ */ a.jsx(a.Fragment, { children: n }), Jp = ({ message: e, onDeleteMessage: t, onClickMessage: n, getIcon: r, getLinksTo: i }) => {
|
|
2415
|
-
const { ProjectIconComponent: o, localizationContext: s } = V(
|
|
2423
|
+
const { ProjectIconComponent: o, localizationContext: s } = V(K), { dateFnsLocale: l } = V(s), c = e.dateTime ? pt(e.dateTime) : null, u = c ? Eu(new Date(Date.now()), c) : 0;
|
|
2416
2424
|
return /* @__PURE__ */ a.jsxs("div", { children: [
|
|
2417
2425
|
c && /* @__PURE__ */ a.jsx("div", { className: "d-flex justify-content-end", children: /* @__PURE__ */ a.jsx(ze, { text: jt(c, "dd.MM.yyyy HH:mm"), placement: "left", children: /* @__PURE__ */ a.jsx("div", { children: /* @__PURE__ */ a.jsx(M, { variant: "caption", children: u > 2 ? jt(c, "dd.MM.yyyy") : _u(c, new Date(Date.now()), {
|
|
2418
2426
|
locale: l.code
|
|
@@ -2422,7 +2430,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2422
2430
|
/* @__PURE__ */ a.jsxs("div", { className: "d-flex flex-column gap-1 w-100", children: [
|
|
2423
2431
|
/* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-start justify-content-between gap-3", children: [
|
|
2424
2432
|
/* @__PURE__ */ a.jsx(M, { variant: "body2", className: "fw-bold", children: e.subject }),
|
|
2425
|
-
/* @__PURE__ */ a.jsx(
|
|
2433
|
+
/* @__PURE__ */ a.jsx(te, { size: "sm", onClick: (d) => {
|
|
2426
2434
|
d.preventDefault(), d.stopPropagation(), t(e.id);
|
|
2427
2435
|
}, children: /* @__PURE__ */ a.jsx(o, { icon: "delete" }) })
|
|
2428
2436
|
] }),
|
|
@@ -2431,7 +2439,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2431
2439
|
] }) }) })
|
|
2432
2440
|
] });
|
|
2433
2441
|
}, uo = ["info", "warning", "danger"], po = ({ messages: e, isLoading: t, onDeleteMessage: n, onClickMessage: r, getIcon: i, getLinksTo: o }) => {
|
|
2434
|
-
const { texts: { messageBoard: s } } = V(
|
|
2442
|
+
const { texts: { messageBoard: s } } = V(K), [l, c] = B(uo), u = k(() => e.filter((d) => l.includes(d.type ?? "")), [l, e]);
|
|
2435
2443
|
return /* @__PURE__ */ a.jsxs("div", { className: "h-100 d-flex flex-column overflow-hidden", children: [
|
|
2436
2444
|
/* @__PURE__ */ a.jsx(Xp, { knownTypes: uo, typeFilters: l, onChangeTypeFilters: (d) => c(d) }),
|
|
2437
2445
|
t && /* @__PURE__ */ a.jsxs("div", { className: "p-3 w-100", children: [
|
|
@@ -2468,7 +2476,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2468
2476
|
D && u(c.filter((S) => S.id !== y));
|
|
2469
2477
|
});
|
|
2470
2478
|
}, [v, c]);
|
|
2471
|
-
|
|
2479
|
+
H(() => {
|
|
2472
2480
|
h();
|
|
2473
2481
|
const y = setInterval(() => h(), 60 * 1e3);
|
|
2474
2482
|
return () => {
|
|
@@ -2478,7 +2486,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2478
2486
|
const j = c.filter((y) => y.type === "danger").length, w = d ? !1 : f;
|
|
2479
2487
|
return e ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2480
2488
|
/* @__PURE__ */ a.jsxs("div", { className: "position-relative", children: [
|
|
2481
|
-
/* @__PURE__ */ a.jsx(
|
|
2489
|
+
/* @__PURE__ */ a.jsx(te, { size: "md", onClick: () => b(!g), children: t }),
|
|
2482
2490
|
j > 0 && /* @__PURE__ */ a.jsx("div", { className: "badge rounded-pill bg-danger p-1 px-2 text-white", style: { position: "absolute", top: "-6px", right: "-10px", fontSize: "10px" }, children: j })
|
|
2483
2491
|
] }),
|
|
2484
2492
|
/* @__PURE__ */ a.jsx(Qi, { show: g, onHide: () => b(!1), placement: "end", children: /* @__PURE__ */ a.jsx(Qi.Body, { children: /* @__PURE__ */ a.jsx(po, { messages: c, isLoading: w, onDeleteMessage: x, onClickMessage: () => b(!1), getIcon: i, getLinksTo: o }) }) })
|
|
@@ -2499,7 +2507,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2499
2507
|
if (!c)
|
|
2500
2508
|
return null;
|
|
2501
2509
|
const u = c.eventKey, d = c.children, p = c.className, f = c.onClick;
|
|
2502
|
-
return /* @__PURE__ */ a.jsxs(
|
|
2510
|
+
return /* @__PURE__ */ a.jsxs(de.Fragment, { children: [
|
|
2503
2511
|
/* @__PURE__ */ a.jsx(l, { ...c, className: I({ active: e === u }, p), onClick: () => {
|
|
2504
2512
|
t(u), f && f(u);
|
|
2505
2513
|
}, vertical: r || i, children: d }),
|
|
@@ -2513,7 +2521,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2513
2521
|
disabled: r
|
|
2514
2522
|
}, { [ra.disabled]: r }, { vertical: i }, { [ra.vertical]: i }), onClick: () => n && !r && n(e), children: typeof o == "string" ? /* @__PURE__ */ a.jsx(M, { variant: i ? "body" : "h6", className: i ? "" : "text-primary", children: o }) : o }), pN = ({ tabs: e, activeTab: t, onSelect: n, ...r }) => {
|
|
2515
2523
|
var s;
|
|
2516
|
-
const { ProjectIconComponent: i } = V(
|
|
2524
|
+
const { ProjectIconComponent: i } = V(K), { isMobile: o } = kr();
|
|
2517
2525
|
return o ? /* @__PURE__ */ a.jsx(Mt, { toggle: /* @__PURE__ */ a.jsx(Ft, { as: tn, text: ((s = e.find((l) => l.id === t)) == null ? void 0 : s.name) ?? "", icon: /* @__PURE__ */ a.jsx(i, { icon: "chevron-down" }) }), ...r, children: e.map((l) => /* @__PURE__ */ a.jsx(Ye, { onClick: () => n(l.id), children: l.name }, l.id)) }) : /* @__PURE__ */ a.jsx(jl, { activeTab: t, onSelect: (l) => n(l), ...r, children: e.map((l) => /* @__PURE__ */ a.jsx(Nl, { eventKey: l.id, children: l.name }, l.id)) });
|
|
2518
2526
|
}, cf = "_selection_1dtmm_1", df = "_selectionBg_1dtmm_10", uf = "_selectionItemsContainer_1dtmm_18", pf = "_selectionItems_1dtmm_18", cr = {
|
|
2519
2527
|
selection: cf,
|
|
@@ -2525,10 +2533,10 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2525
2533
|
t(l), o(!1);
|
|
2526
2534
|
};
|
|
2527
2535
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2528
|
-
/* @__PURE__ */ a.jsx(
|
|
2536
|
+
/* @__PURE__ */ a.jsx(te, { className: "rounded m-1", onClick: () => o(!0), children: /* @__PURE__ */ a.jsx(n, { icon: e }) }),
|
|
2529
2537
|
i && /* @__PURE__ */ a.jsxs("div", { className: cr.selection, children: [
|
|
2530
2538
|
/* @__PURE__ */ a.jsx("div", { className: cr.selectionBg, onClick: () => o(!1) }),
|
|
2531
|
-
/* @__PURE__ */ a.jsx("div", { className: cr.selectionItemsContainer, children: /* @__PURE__ */ a.jsx("div", { className: cr.selectionItems, children: r.filter((l, c, u) => u.indexOf(l) === c).map((l) => /* @__PURE__ */ a.jsx(
|
|
2539
|
+
/* @__PURE__ */ a.jsx("div", { className: cr.selectionItemsContainer, children: /* @__PURE__ */ a.jsx("div", { className: cr.selectionItems, children: r.filter((l, c, u) => u.indexOf(l) === c).map((l) => /* @__PURE__ */ a.jsx(te, { className: "rounded", onClick: () => s(l), children: /* @__PURE__ */ a.jsx(n, { icon: l }) }, l)) }) })
|
|
2532
2540
|
] })
|
|
2533
2541
|
] });
|
|
2534
2542
|
}, Sl = () => {
|
|
@@ -2537,7 +2545,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2537
2545
|
throw new Error("ShortcutLinksProvider not initilized. Probably tried to use useShortcutLinks outside ShortcutLinksProvider.");
|
|
2538
2546
|
return e;
|
|
2539
2547
|
}, ff = ({ shortcutLink: e, IconComponent: t, IconTypeArray: n, editShortcutLink: r, deleteLocation: i }) => {
|
|
2540
|
-
const { ProjectIconComponent: o } = V(
|
|
2548
|
+
const { ProjectIconComponent: o } = V(K), [s, l] = B(e.icon), [c, u] = B(e.name);
|
|
2541
2549
|
console.log(s, typeof s);
|
|
2542
2550
|
const d = k(() => !(s === e.icon && c === e.name), [s, c, e.icon, e.name]), p = P(() => {
|
|
2543
2551
|
l(e.icon), u(e.name);
|
|
@@ -2549,10 +2557,10 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2549
2557
|
/* @__PURE__ */ a.jsx("td", { className: "align-middle", children: /* @__PURE__ */ a.jsx("div", { className: "d-flex justify-content-center align-items-center", children: /* @__PURE__ */ a.jsx(Dl, { icon: s, setIcon: l, IconComponent: t, IconTypeArray: n }) }) }),
|
|
2550
2558
|
/* @__PURE__ */ a.jsx("td", { className: "align-middle", style: { width: "7em" }, children: /* @__PURE__ */ a.jsxs("div", { className: "d-flex gap-2 align-items-center justify-content-end", children: [
|
|
2551
2559
|
d && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2552
|
-
/* @__PURE__ */ a.jsx(
|
|
2553
|
-
/* @__PURE__ */ a.jsx(
|
|
2560
|
+
/* @__PURE__ */ a.jsx(te, { onClick: p, color: "secondary", className: "d-inline", children: /* @__PURE__ */ a.jsx(o, { icon: "cancel" }) }),
|
|
2561
|
+
/* @__PURE__ */ a.jsx(te, { onClick: f, color: "success", className: "d-inline", children: /* @__PURE__ */ a.jsx(o, { icon: "check" }) })
|
|
2554
2562
|
] }),
|
|
2555
|
-
/* @__PURE__ */ a.jsx(
|
|
2563
|
+
/* @__PURE__ */ a.jsx(te, { onClick: i, color: "danger", children: /* @__PURE__ */ a.jsx(o, { icon: "delete" }) })
|
|
2556
2564
|
] }) })
|
|
2557
2565
|
] });
|
|
2558
2566
|
}, mf = ({ shortcutLink: e, IconComponent: t, IconTypeArray: n, editShortcutLink: r, deleteShortcutLink: i }) => {
|
|
@@ -2567,7 +2575,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2567
2575
|
/* @__PURE__ */ a.jsx(ff, { shortcutLink: e, IconComponent: t, IconTypeArray: n, editShortcutLink: r, deleteLocation: o })
|
|
2568
2576
|
] }) });
|
|
2569
2577
|
}, fN = ({ IconComponent: e, IconTypeArray: t }) => {
|
|
2570
|
-
const { texts: n } = V(
|
|
2578
|
+
const { texts: n } = V(K), { shortcutLinks: r, editShortcutLink: i, deleteShortcutLink: o } = Sl();
|
|
2571
2579
|
return /* @__PURE__ */ a.jsx(a.Fragment, { children: r !== null && r.length > 0 ? /* @__PURE__ */ a.jsxs(Wu, { size: "sm", title: n.shortcutLinks.shortcutLinksSetting, children: [
|
|
2572
2580
|
/* @__PURE__ */ a.jsx("thead", { className: "fw-bold", children: /* @__PURE__ */ a.jsxs("tr", { children: [
|
|
2573
2581
|
/* @__PURE__ */ a.jsx("th", { children: /* @__PURE__ */ a.jsx(M, { variant: "body2", children: n.shortcutLinks.target }) }),
|
|
@@ -2582,14 +2590,14 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2582
2590
|
linkAddButton: vf,
|
|
2583
2591
|
createLinkRow: hf
|
|
2584
2592
|
}, bf = ({ shortcutLink: e, IconComponent: t }) => /* @__PURE__ */ a.jsx(ze, { text: e.name, placement: "bottom", children: /* @__PURE__ */ a.jsx(He, { to: e.url, className: pn.linkButton, children: /* @__PURE__ */ a.jsx(t, { icon: e.icon }) }) }), xf = ({ closeModal: e, isOpen: t, createLink: n, pageTitlePrefix: r, IconComponent: i, IconTypeArray: o }) => {
|
|
2585
|
-
const s = vu(), { texts: l } = V(
|
|
2593
|
+
const s = vu(), { texts: l } = V(K), [c, u] = B("star-outline"), [d, p] = B(r ? document.title.replace(r, "") : document.title), f = P(async () => {
|
|
2586
2594
|
await n({ icon: c, name: d, url: s.pathname + s.search }), e();
|
|
2587
2595
|
}, [e, n, c, s.pathname, s.search, d]), m = k(() => s.pathname + s.search, [s.pathname, s.search]);
|
|
2588
|
-
return /* @__PURE__ */ a.jsx(
|
|
2596
|
+
return /* @__PURE__ */ a.jsx(ue, { show: t, onHide: e, size: "sm", children: /* @__PURE__ */ a.jsxs("div", { onKeyDown: (g) => {
|
|
2589
2597
|
g.code !== "Escape" && g.stopPropagation();
|
|
2590
2598
|
}, children: [
|
|
2591
|
-
/* @__PURE__ */ a.jsx(
|
|
2592
|
-
/* @__PURE__ */ a.jsxs(
|
|
2599
|
+
/* @__PURE__ */ a.jsx(ue.Header, { closeButton: !0, children: /* @__PURE__ */ a.jsx(ue.Title, { children: l.shortcutLinks.newShortcut }) }),
|
|
2600
|
+
/* @__PURE__ */ a.jsxs(ue.Body, { children: [
|
|
2593
2601
|
/* @__PURE__ */ a.jsxs("div", { className: pn.createLinkRow, children: [
|
|
2594
2602
|
/* @__PURE__ */ a.jsx(M, { variant: "form-label", className: "pe-3 text-end", children: l.shortcutLinks.target }),
|
|
2595
2603
|
/* @__PURE__ */ a.jsx("div", { className: "d-flex align-items-middle fw-bold text-muted", children: m.length <= 23 ? m : /* @__PURE__ */ a.jsx(ze, { placement: "bottom", text: m, children: /* @__PURE__ */ a.jsxs("span", { children: [
|
|
@@ -2606,10 +2614,10 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2606
2614
|
/* @__PURE__ */ a.jsx("div", { className: "d-flex align-items-middle fw-bold", children: /* @__PURE__ */ a.jsx(Dl, { icon: c, setIcon: u, IconComponent: i, IconTypeArray: o }) })
|
|
2607
2615
|
] })
|
|
2608
2616
|
] }),
|
|
2609
|
-
/* @__PURE__ */ a.jsx(
|
|
2617
|
+
/* @__PURE__ */ a.jsx(ue.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ a.jsx(mt, { onClick: f, children: l.shortcutLinks.addShortcut }) })
|
|
2610
2618
|
] }) });
|
|
2611
2619
|
}, yf = ({ IconComponent: e, IconTypeArray: t, pageTitlePrefix: n, createLink: r }) => {
|
|
2612
|
-
const { ProjectIconComponent: i, texts: o } = V(
|
|
2620
|
+
const { ProjectIconComponent: i, texts: o } = V(K), [s, l] = B(!1), [c] = Ka(s, 100);
|
|
2613
2621
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2614
2622
|
/* @__PURE__ */ a.jsx(ze, { text: o.shortcutLinks.addShortcut, placement: "bottom", children: /* @__PURE__ */ a.jsx("button", { type: "button", className: I(pn.linkButton, pn.linkAddButton), onClick: () => l(!0), children: /* @__PURE__ */ a.jsx(i, { icon: "add" }) }) }),
|
|
2615
2623
|
(s || c) && /* @__PURE__ */ a.jsx(xf, { IconComponent: e, IconTypeArray: t, closeModal: () => l(!1), createLink: r, isOpen: s, pageTitlePrefix: n })
|
|
@@ -2675,7 +2683,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2675
2683
|
}), [u, p, d, i]);
|
|
2676
2684
|
return /* @__PURE__ */ a.jsx(Ms.Provider, { value: f, children: e });
|
|
2677
2685
|
}, Nf = ({ targets: e, removeNotifTarget: t }) => {
|
|
2678
|
-
const { ProjectIconComponent: n } = V(
|
|
2686
|
+
const { ProjectIconComponent: n } = V(K);
|
|
2679
2687
|
return /* @__PURE__ */ a.jsx(a.Fragment, { children: e && e.sort((r, i) => (r.employeeId ?? 0) - (i.employeeId ?? 0)).map((r) => /* @__PURE__ */ a.jsxs("div", { className: "d-flex gap-2 align-items-center justify-content-between mb-1", children: [
|
|
2680
2688
|
/* @__PURE__ */ a.jsx("div", { className: "text-secondary", children: /* @__PURE__ */ a.jsx("span", { className: "d-flex gap-2 ", children: r.employeeId && r.roleName === null ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2681
2689
|
/* @__PURE__ */ a.jsx(n, { icon: "user" }),
|
|
@@ -2684,22 +2692,22 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2684
2692
|
/* @__PURE__ */ a.jsx(n, { icon: "role" }),
|
|
2685
2693
|
/* @__PURE__ */ a.jsx(M, { variant: "subtitle", children: r.roleName })
|
|
2686
2694
|
] }) }) }),
|
|
2687
|
-
/* @__PURE__ */ a.jsx(
|
|
2695
|
+
/* @__PURE__ */ a.jsx(te, { size: "sm", color: "danger", onClick: () => t(r.id), children: /* @__PURE__ */ a.jsx(n, { icon: "delete" }) })
|
|
2688
2696
|
] }, r.id)) });
|
|
2689
2697
|
}, Df = ({ show: e, onHide: t, roles: n, onAddTarget: r, EmployeePicker: i, templateId: o }) => {
|
|
2690
|
-
const { texts: { notifCentrum: s } } = V(
|
|
2698
|
+
const { texts: { notifCentrum: s } } = V(K), [l, c] = B(null), [u, d] = B(null), [p, f] = B("R"), m = P(() => {
|
|
2691
2699
|
c(null), d(null), t();
|
|
2692
2700
|
}, [t]);
|
|
2693
|
-
return /* @__PURE__ */ a.jsxs(
|
|
2694
|
-
/* @__PURE__ */ a.jsx(
|
|
2695
|
-
/* @__PURE__ */ a.jsxs(
|
|
2701
|
+
return /* @__PURE__ */ a.jsxs(ue, { show: e, onHide: () => m(), children: [
|
|
2702
|
+
/* @__PURE__ */ a.jsx(ue.Header, { closeButton: !0, children: /* @__PURE__ */ a.jsx(ue.Title, { children: s.addNewTarget }) }),
|
|
2703
|
+
/* @__PURE__ */ a.jsxs(ue.Body, { children: [
|
|
2696
2704
|
/* @__PURE__ */ a.jsx(Vp, { options: [
|
|
2697
2705
|
{ id: "E", name: s.employee },
|
|
2698
2706
|
{ id: "R", name: s.role }
|
|
2699
2707
|
], value: p, onChange: (g) => f(g), InputContainer: Te }),
|
|
2700
2708
|
p === "E" ? /* @__PURE__ */ a.jsx(i, { InputContainer: Te, label: s.employee, value: { id: (l == null ? void 0 : l.id) ?? null, name: (l == null ? void 0 : l.name) ?? "" }, onSelect: (g) => c({ id: Number(g == null ? void 0 : g.id) ?? null, name: (g == null ? void 0 : g.name) ?? "" }) }) : /* @__PURE__ */ a.jsx(ft, { InputContainer: Te, label: s.role, options: n.map((g) => ({ id: g, name: g })), value: u, onChange: (g) => d((g == null ? void 0 : g.toString()) ?? "") })
|
|
2701
2709
|
] }),
|
|
2702
|
-
/* @__PURE__ */ a.jsx(
|
|
2710
|
+
/* @__PURE__ */ a.jsx(ue.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ a.jsx(mt, { onClick: () => {
|
|
2703
2711
|
r({
|
|
2704
2712
|
templateId: o ?? 0,
|
|
2705
2713
|
targetId: null,
|
|
@@ -2709,20 +2717,20 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2709
2717
|
}, children: s.add }) })
|
|
2710
2718
|
] });
|
|
2711
2719
|
}, Sf = ({ templates: e, selectedTemplateId: t, setSelectedTemplateId: n, roles: r, onAddNotifTarget: i, onRemoveNotifTarget: o, EmployeePicker: s }) => {
|
|
2712
|
-
const { texts: { notifCentrum: l }, ProjectIconComponent: c } = V(
|
|
2720
|
+
const { texts: { notifCentrum: l }, ProjectIconComponent: c } = V(K), [u, d] = B(!1);
|
|
2713
2721
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2714
2722
|
/* @__PURE__ */ a.jsx(Fn, { className: "overflow-auto h-max-100 p-2", children: e.map((p) => /* @__PURE__ */ a.jsxs(Fn.Item, { action: t !== p.id, className: `p-0 mb-2 border rounded shadow-sm ${t === p.id ? "border-1 border-primary" : ""}`, onClick: () => n(p.id), children: [
|
|
2715
2723
|
/* @__PURE__ */ a.jsxs("div", { className: "d-flex gap-2 justify-content-between align-items-center border-1 border-bottom border-primary p-2", children: [
|
|
2716
2724
|
/* @__PURE__ */ a.jsx("div", { className: "text-primary", children: p.destinationId === 1 ? /* @__PURE__ */ a.jsx(c, { icon: "mail-envelope" }) : /* @__PURE__ */ a.jsx(c, { icon: "dashboard" }) }),
|
|
2717
2725
|
/* @__PURE__ */ a.jsx(M, { className: "text-truncate text-primary", variant: "subtitle", children: p.subjectTemplate }),
|
|
2718
|
-
/* @__PURE__ */ a.jsx(
|
|
2726
|
+
/* @__PURE__ */ a.jsx(te, { size: "sm", onClick: () => d(!0), children: /* @__PURE__ */ a.jsx(c, { icon: "add" }) })
|
|
2719
2727
|
] }),
|
|
2720
2728
|
/* @__PURE__ */ a.jsx("div", { className: "my-2 ps-3 pe-2", children: p.targets.length > 0 ? /* @__PURE__ */ a.jsx(Nf, { targets: p.targets, removeNotifTarget: o }) : /* @__PURE__ */ a.jsx(it, { size: "sm", variant: "warning", children: l.noTargets }) })
|
|
2721
2729
|
] }, p.id)) }),
|
|
2722
2730
|
/* @__PURE__ */ a.jsx(Df, { show: u, onHide: () => d(!1), roles: r ?? [], onAddTarget: i, EmployeePicker: s, templateId: t })
|
|
2723
2731
|
] });
|
|
2724
2732
|
}, Cf = ({ data: e, onClick: t, BnfTableComponent: n }) => {
|
|
2725
|
-
const { texts: { notifCentrum: r } } = V(
|
|
2733
|
+
const { texts: { notifCentrum: r } } = V(K), i = k(() => e == null ? void 0 : e.map((l) => {
|
|
2726
2734
|
var c;
|
|
2727
2735
|
return {
|
|
2728
2736
|
...l,
|
|
@@ -2756,16 +2764,16 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2756
2764
|
}, [t]);
|
|
2757
2765
|
return /* @__PURE__ */ a.jsx(n, { columnsDef: o, data: i, useScrollableContainer: !0, onRowClick: s });
|
|
2758
2766
|
}, Ef = ({ show: e, onHide: t, template: n, onEdit: r }) => {
|
|
2759
|
-
const { texts: { notifCentrum: i } } = V(
|
|
2760
|
-
|
|
2767
|
+
const { texts: { notifCentrum: i } } = V(K), [o, s] = B(null), [l, c] = B(null);
|
|
2768
|
+
H(() => {
|
|
2761
2769
|
n && (s(n.subjectTemplate), c(n.textTemplate));
|
|
2762
2770
|
}, [n]);
|
|
2763
2771
|
const u = P(() => {
|
|
2764
2772
|
!o || !l || (r(o, l), t());
|
|
2765
2773
|
}, [l, r, t, o]);
|
|
2766
|
-
return /* @__PURE__ */ a.jsx(a.Fragment, { children: n && /* @__PURE__ */ a.jsxs(
|
|
2767
|
-
/* @__PURE__ */ a.jsx(
|
|
2768
|
-
/* @__PURE__ */ a.jsxs(
|
|
2774
|
+
return /* @__PURE__ */ a.jsx(a.Fragment, { children: n && /* @__PURE__ */ a.jsxs(ue, { show: e, onHide: t, size: "lg", scrollable: !0, children: [
|
|
2775
|
+
/* @__PURE__ */ a.jsx(ue.Header, { children: /* @__PURE__ */ a.jsx(ue.Title, { children: i.editTemplate }) }),
|
|
2776
|
+
/* @__PURE__ */ a.jsxs(ue.Body, { style: { minHeight: "50vh" }, children: [
|
|
2769
2777
|
/* @__PURE__ */ a.jsxs(he.Group, { controlId: "subject", children: [
|
|
2770
2778
|
/* @__PURE__ */ a.jsx(he.Label, { children: /* @__PURE__ */ a.jsx(M, { variant: "form-label", className: "text-primary", children: i.subject }) }),
|
|
2771
2779
|
/* @__PURE__ */ a.jsx(he.Control, { value: o ?? "", onChange: (d) => s(d.target.value) })
|
|
@@ -2778,72 +2786,72 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2778
2786
|
} })
|
|
2779
2787
|
] })
|
|
2780
2788
|
] }),
|
|
2781
|
-
/* @__PURE__ */ a.jsx(
|
|
2789
|
+
/* @__PURE__ */ a.jsx(ue.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ a.jsx(mt, { onClick: () => {
|
|
2782
2790
|
console.log(o), console.log(l), u();
|
|
2783
2791
|
}, children: i.save }) })
|
|
2784
2792
|
] }) });
|
|
2785
2793
|
}, vN = ({ kinds: e, targetSystem: t, reloadActions: n, reloadHistory: r, reloadRoles: i, onRemoveTarget: o, onPostTarget: s, onTemplateEdit: l, EmployeePicker: c, BnfTableComponent: u }) => {
|
|
2786
|
-
var F, q,
|
|
2787
|
-
const { texts: { notifCentrum: d }, ProjectIconComponent: p } = V(
|
|
2788
|
-
|
|
2789
|
-
var
|
|
2790
|
-
e.length > 0 ? w(((
|
|
2794
|
+
var F, q, W;
|
|
2795
|
+
const { texts: { notifCentrum: d }, ProjectIconComponent: p } = V(K), { confirm: f } = St(), [m, g] = B(null), [b, h] = B(null), [v, x] = B(!1), [j, w] = $n("notif-kind-id", null);
|
|
2796
|
+
H(() => {
|
|
2797
|
+
var R;
|
|
2798
|
+
e.length > 0 ? w(((R = e.at(0)) == null ? void 0 : R.id) ?? null) : w(null);
|
|
2791
2799
|
}, [e, w]);
|
|
2792
2800
|
const [y, D] = B([]);
|
|
2793
|
-
|
|
2794
|
-
j && n(j).then((
|
|
2795
|
-
D(
|
|
2796
|
-
}).catch((
|
|
2797
|
-
console.log(
|
|
2801
|
+
H(() => {
|
|
2802
|
+
j && n(j).then((R) => {
|
|
2803
|
+
D(R);
|
|
2804
|
+
}).catch((R) => {
|
|
2805
|
+
console.log(R), D([]);
|
|
2798
2806
|
});
|
|
2799
2807
|
}, [n, j]);
|
|
2800
2808
|
const [S, O] = $n("notif-action-id", ((F = y == null ? void 0 : y.at(0)) == null ? void 0 : F.id) ?? null), [E, _] = B([]);
|
|
2801
|
-
|
|
2802
|
-
S === null || m === null || r(S, m).then((
|
|
2803
|
-
_(
|
|
2804
|
-
}).catch((
|
|
2805
|
-
console.log(
|
|
2809
|
+
H(() => {
|
|
2810
|
+
S === null || m === null || r(S, m).then((R) => {
|
|
2811
|
+
_(R);
|
|
2812
|
+
}).catch((R) => {
|
|
2813
|
+
console.log(R), _([]);
|
|
2806
2814
|
});
|
|
2807
2815
|
}, [n, r, S, j, m]);
|
|
2808
|
-
const [
|
|
2809
|
-
|
|
2810
|
-
S !== null && i(S).then((
|
|
2811
|
-
L(
|
|
2812
|
-
}).catch((
|
|
2813
|
-
console.log(
|
|
2816
|
+
const [A, L] = B([]);
|
|
2817
|
+
H(() => {
|
|
2818
|
+
S !== null && i(S).then((R) => {
|
|
2819
|
+
L(R);
|
|
2820
|
+
}).catch((R) => {
|
|
2821
|
+
console.log(R), L([]);
|
|
2814
2822
|
});
|
|
2815
2823
|
}, [i, S]);
|
|
2816
2824
|
const C = k(() => {
|
|
2817
|
-
var
|
|
2818
|
-
return !y || !S ? [] : ((
|
|
2819
|
-
}, [y, S]), T = P((
|
|
2820
|
-
s(
|
|
2825
|
+
var R;
|
|
2826
|
+
return !y || !S ? [] : ((R = y.find((U) => U.id === S)) == null ? void 0 : R.templates) ?? [];
|
|
2827
|
+
}, [y, S]), T = P((R, U) => {
|
|
2828
|
+
s(R, U).then((X) => {
|
|
2821
2829
|
D(y ? [
|
|
2822
|
-
...y.map((
|
|
2823
|
-
...
|
|
2830
|
+
...y.map((ee) => ee.id !== S ? ee : {
|
|
2831
|
+
...ee,
|
|
2824
2832
|
templates: [
|
|
2825
|
-
...
|
|
2833
|
+
...ee.templates.map((se) => se.id !== m ? se : { ...se, targets: [...se.targets, X] })
|
|
2826
2834
|
]
|
|
2827
2835
|
})
|
|
2828
2836
|
] : []);
|
|
2829
2837
|
}).catch((X) => console.log(X));
|
|
2830
|
-
}, [y, s, S, m, D]),
|
|
2831
|
-
m && l(m,
|
|
2838
|
+
}, [y, s, S, m, D]), z = P((R, U) => {
|
|
2839
|
+
m && l(m, R, U).then(() => {
|
|
2832
2840
|
D(y ? [
|
|
2833
2841
|
...y.map((X) => X.id !== S ? X : {
|
|
2834
2842
|
...X,
|
|
2835
2843
|
templates: [
|
|
2836
|
-
...X.templates.map((
|
|
2844
|
+
...X.templates.map((ee) => ee.id !== m ? ee : { ...ee, subjectTemplate: R, textTemplate: U })
|
|
2837
2845
|
]
|
|
2838
2846
|
})
|
|
2839
2847
|
] : []);
|
|
2840
2848
|
}).catch((X) => console.log(X));
|
|
2841
|
-
}, [y, l, S, m]), $ = P(async (
|
|
2842
|
-
await f(d.confirmTargetDelete) && o(
|
|
2843
|
-
...y.map((
|
|
2844
|
-
...
|
|
2849
|
+
}, [y, l, S, m]), $ = P(async (R) => {
|
|
2850
|
+
await f(d.confirmTargetDelete) && o(R).then(() => D(y ? [
|
|
2851
|
+
...y.map((U) => U.id !== S ? U : {
|
|
2852
|
+
...U,
|
|
2845
2853
|
templates: [
|
|
2846
|
-
...
|
|
2854
|
+
...U.templates.map((X) => X.id !== m ? X : { ...X, targets: X.targets.filter((ee) => ee.id !== R) })
|
|
2847
2855
|
]
|
|
2848
2856
|
})
|
|
2849
2857
|
] : []));
|
|
@@ -2851,22 +2859,22 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2851
2859
|
return /* @__PURE__ */ a.jsxs("div", { className: "h-100 overflow-hidden", children: [
|
|
2852
2860
|
/* @__PURE__ */ a.jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [
|
|
2853
2861
|
/* @__PURE__ */ a.jsxs("div", { className: "row w-100", children: [
|
|
2854
|
-
/* @__PURE__ */ a.jsx("div", { className: "col-2", children: /* @__PURE__ */ a.jsx(ft, { label: d.kind, size: "sm", noEmptyOption: !0, options: ((q = e.filter((
|
|
2855
|
-
/* @__PURE__ */ a.jsx("div", { className: "col-3", children: /* @__PURE__ */ a.jsx(ft, { label: d.subkind, size: "sm", noEmptyOption: !0, options: (y == null ? void 0 : y.map((
|
|
2862
|
+
/* @__PURE__ */ a.jsx("div", { className: "col-2", children: /* @__PURE__ */ a.jsx(ft, { label: d.kind, size: "sm", noEmptyOption: !0, options: ((q = e.filter((R) => (R.targetSystem & t) > 0)) == null ? void 0 : q.map((R) => ({ id: R.id, name: R.name }))) ?? [], value: j ?? null, onChange: (R) => w(Number(R)), dropdownWidth: 200 }) }),
|
|
2863
|
+
/* @__PURE__ */ a.jsx("div", { className: "col-3", children: /* @__PURE__ */ a.jsx(ft, { label: d.subkind, size: "sm", noEmptyOption: !0, options: (y == null ? void 0 : y.map((R) => ({ id: R.id, name: R.name }))) ?? [], value: S ?? null, onChange: (R) => O(Number(R)), dropdownWidth: 250 }) })
|
|
2856
2864
|
] }),
|
|
2857
2865
|
/* @__PURE__ */ a.jsx(Xa, { children: /* @__PURE__ */ a.jsx(Nr, { hideOn: "always", cKey: "template-edit", onClick: () => x(!0), disabled: m === null, icon: /* @__PURE__ */ a.jsx(p, { icon: "edit" }), children: d.editTemplate }) })
|
|
2858
2866
|
] }),
|
|
2859
2867
|
/* @__PURE__ */ a.jsxs("div", { className: "vh-100 overflow-hidden d-flex gap-1", children: [
|
|
2860
|
-
/* @__PURE__ */ a.jsx("div", { className: "h-75 w-25 overflow-hidden", children: /* @__PURE__ */ a.jsx(Sf, { templates: C, roles:
|
|
2861
|
-
g(
|
|
2868
|
+
/* @__PURE__ */ a.jsx("div", { className: "h-75 w-25 overflow-hidden", children: /* @__PURE__ */ a.jsx(Sf, { templates: C, roles: A ?? [], onAddNotifTarget: T, onRemoveNotifTarget: $, selectedTemplateId: m, setSelectedTemplateId: (R) => {
|
|
2869
|
+
g(R), h(null);
|
|
2862
2870
|
}, EmployeePicker: c }) }),
|
|
2863
|
-
/* @__PURE__ */ a.jsx("div", { className: "w-25 h-75 overflow-hidden", children: m && /* @__PURE__ */ a.jsx(Cf, { data: E ?? [], onClick: (
|
|
2864
|
-
m && /* @__PURE__ */ a.jsx("div", { className: "h-75 w-75 overflow-hidden border rounded bg-white", children: /* @__PURE__ */ a.jsx("iframe", { title: "notification", className: "w-100 h-100", srcDoc: (b == null ? void 0 : b.message) ?? ((
|
|
2871
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-25 h-75 overflow-hidden", children: m && /* @__PURE__ */ a.jsx(Cf, { data: E ?? [], onClick: (R) => h((E == null ? void 0 : E.find((U) => U.id === R)) ?? null), BnfTableComponent: u }) }),
|
|
2872
|
+
m && /* @__PURE__ */ a.jsx("div", { className: "h-75 w-75 overflow-hidden border rounded bg-white", children: /* @__PURE__ */ a.jsx("iframe", { title: "notification", className: "w-100 h-100", srcDoc: (b == null ? void 0 : b.message) ?? ((W = C.find((R) => R.id === m)) == null ? void 0 : W.textTemplate) }) })
|
|
2865
2873
|
] }),
|
|
2866
|
-
/* @__PURE__ */ a.jsx(Ef, { show: v, onHide: () => x(!1), template: C.find((
|
|
2874
|
+
/* @__PURE__ */ a.jsx(Ef, { show: v, onHide: () => x(!1), template: C.find((R) => R.id === m) ?? null, onEdit: z })
|
|
2867
2875
|
] });
|
|
2868
2876
|
}, If = ({ history: e, onClick: t, BnfTableComponent: n }) => {
|
|
2869
|
-
const { texts: { notifCentrum: r } } = V(
|
|
2877
|
+
const { texts: { notifCentrum: r } } = V(K), i = k(() => [
|
|
2870
2878
|
{
|
|
2871
2879
|
caption: "notificationHistory.id",
|
|
2872
2880
|
fieldName: "id",
|
|
@@ -2930,8 +2938,8 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2930
2938
|
}, [t]);
|
|
2931
2939
|
return /* @__PURE__ */ a.jsx(n, { columnsDef: i, data: e, useScrollableContainer: !0, paginationMode: "enabled", bottomBarProps: { hideFullScreen: !0 }, onRowClick: o });
|
|
2932
2940
|
}, hN = ({ reloadUserHistory: e, EmployeePicker: t, BnfTableComponent: n }) => {
|
|
2933
|
-
const { texts: { notifCentrum: r } } = V(
|
|
2934
|
-
return
|
|
2941
|
+
const { texts: { notifCentrum: r } } = V(K), [i, o] = B(null), [s, l] = $n("notif-user", null), [c, u] = B([]);
|
|
2942
|
+
return H(() => {
|
|
2935
2943
|
s !== null && e(s.id).then((d) => {
|
|
2936
2944
|
u(d);
|
|
2937
2945
|
}).catch((d) => {
|
|
@@ -2946,7 +2954,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2946
2954
|
] });
|
|
2947
2955
|
}, _f = ({ result: e, onClose: t, tableIdentifier: n, BnfTableComponent: r }) => {
|
|
2948
2956
|
var l, c, u, d, p;
|
|
2949
|
-
const { texts: { imports: i }, ProjectIconComponent: o } = V(
|
|
2957
|
+
const { texts: { imports: i }, ProjectIconComponent: o } = V(K), s = k(() => [
|
|
2950
2958
|
{
|
|
2951
2959
|
fieldName: "row",
|
|
2952
2960
|
caption: i.row,
|
|
@@ -2985,7 +2993,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2985
2993
|
] }) }) : null,
|
|
2986
2994
|
!e.success && ((p = (d = e.data) == null ? void 0 : d.errors) == null ? void 0 : p.length) > 0 ? /* @__PURE__ */ a.jsx("div", { className: "mt-3", children: /* @__PURE__ */ a.jsx(r, { columnsDef: s, data: e.data.errors, useScrollableContainer: !0, tableId: n }) }) : null
|
|
2987
2995
|
] }),
|
|
2988
|
-
t !== void 0 ? /* @__PURE__ */ a.jsx(
|
|
2996
|
+
t !== void 0 ? /* @__PURE__ */ a.jsx(te, { color: e.success ? "success" : "danger", className: I("hover-darken", e.success ? "bg-success-subtle" : "bg-danger-subtle"), onClick: t, children: /* @__PURE__ */ a.jsx(o, { icon: "close" }) }) : null
|
|
2989
2997
|
] }) }) }) : null;
|
|
2990
2998
|
}, Of = "_upload-box_9ka79_1", Pf = "_browse-btn_9ka79_15", aa = {
|
|
2991
2999
|
"upload-box": "_upload-box_9ka79_1",
|
|
@@ -2993,7 +3001,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
2993
3001
|
"browse-btn": "_browse-btn_9ka79_15",
|
|
2994
3002
|
browseBtn: Pf
|
|
2995
3003
|
}, Tf = ({ file: e, onFileChange: t, onImport: n, children: r, multiple: i, accept: o }) => {
|
|
2996
|
-
const { ProjectIconComponent: s, texts: { imports: l } } = V(
|
|
3004
|
+
const { ProjectIconComponent: s, texts: { imports: l } } = V(K), c = P(async (d) => {
|
|
2997
3005
|
d.length > 0 && t(i === !0 ? [...d] : d[0]);
|
|
2998
3006
|
}, [e, i, t]), u = P((d) => {
|
|
2999
3007
|
var f;
|
|
@@ -3022,7 +3030,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3022
3030
|
] })
|
|
3023
3031
|
] });
|
|
3024
3032
|
}, bN = ({ otherSettingId: e, languageOptions: t, tableIdentifier: n, SettingsOutlet: r, BnfTableComponent: i, importLocalization: o }) => {
|
|
3025
|
-
const { texts: { localizations: s } } = V(
|
|
3033
|
+
const { texts: { localizations: s } } = V(K), [l, c] = B(t[0].id), [u, d] = B(null), [p, f] = B(null), m = P(async () => {
|
|
3026
3034
|
if (u === null)
|
|
3027
3035
|
return;
|
|
3028
3036
|
const g = await o({ file: u, lang: l });
|
|
@@ -3041,7 +3049,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3041
3049
|
r = s;
|
|
3042
3050
|
}
|
|
3043
3051
|
}, Rf = ({ selLng: e, lngsData: t, localizationKey: n, reloadData: r, saveChanges: i }) => {
|
|
3044
|
-
const { ProjectIconComponent: o } = V(
|
|
3052
|
+
const { ProjectIconComponent: o } = V(K), s = k(() => {
|
|
3045
3053
|
const p = t.get(e);
|
|
3046
3054
|
if (p === void 0)
|
|
3047
3055
|
return "";
|
|
@@ -3055,8 +3063,8 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3055
3063
|
c(typeof p != "string" ? "" : p);
|
|
3056
3064
|
}, InputContainer: Te, withoutLabel: !0, className: "flex-grow-1" }),
|
|
3057
3065
|
d ? /* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
3058
|
-
/* @__PURE__ */ a.jsx(
|
|
3059
|
-
/* @__PURE__ */ a.jsx(
|
|
3066
|
+
/* @__PURE__ */ a.jsx(te, { color: "danger", onClick: () => c(s), children: /* @__PURE__ */ a.jsx(o, { icon: "cancel" }) }),
|
|
3067
|
+
/* @__PURE__ */ a.jsx(te, { onClick: u, children: /* @__PURE__ */ a.jsx(o, { icon: "check" }) })
|
|
3060
3068
|
] }) : null
|
|
3061
3069
|
] });
|
|
3062
3070
|
}, kf = "_keysTable_1j6ns_1", Bf = "_subgrid_1j6ns_14", Lf = "_lngSelectRow_1j6ns_19", Mf = "_tableItem_1j6ns_26", Ff = "_tableFooter_1j6ns_29", Vf = "_tableFullWidth_1j6ns_35", $f = "_tableBody_1j6ns_39", Gf = "_lngSelect_1j6ns_19", Uf = "_addLng_1j6ns_52", Hf = "_fileSelect_1j6ns_57", Wf = "_searchBox_1j6ns_61", $e = {
|
|
@@ -3083,32 +3091,32 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3083
3091
|
r = s;
|
|
3084
3092
|
}
|
|
3085
3093
|
}, xN = ({ languageOptions: e, envMode: t, getOtherSettingsUrl: n, downloadXls: r, saveChanges: i, localizationFilesOptions: o, remoteLocalesRoot: s }) => {
|
|
3086
|
-
const { texts: { localizations: l }, ProjectIconComponent: c } = V(
|
|
3094
|
+
const { texts: { localizations: l }, ProjectIconComponent: c } = V(K), [u, d] = B(1), [p, f] = B(/* @__PURE__ */ new Map()), [m, g] = B(null), [b, h] = B(""), [v, x] = B(/* @__PURE__ */ new Set()), j = P((C) => {
|
|
3087
3095
|
f(/* @__PURE__ */ new Map()), x(C);
|
|
3088
3096
|
}, []), w = k(() => e.filter((C) => !v.has(C.id)), [v, e]), y = k(() => {
|
|
3089
3097
|
if (p.size === 0)
|
|
3090
3098
|
return [];
|
|
3091
|
-
const C = /* @__PURE__ */ new Set(), T = (
|
|
3092
|
-
if (typeof
|
|
3093
|
-
Object.entries(
|
|
3099
|
+
const C = /* @__PURE__ */ new Set(), T = (W, R = "") => {
|
|
3100
|
+
if (typeof W[1] == "object") {
|
|
3101
|
+
Object.entries(W[1]).forEach((U) => T(U, R + W[0] + "."));
|
|
3094
3102
|
return;
|
|
3095
3103
|
}
|
|
3096
|
-
C.add(
|
|
3104
|
+
C.add(R + W[0]);
|
|
3097
3105
|
};
|
|
3098
|
-
Array.from(p).forEach((
|
|
3099
|
-
Object.entries(
|
|
3106
|
+
Array.from(p).forEach((W) => {
|
|
3107
|
+
Object.entries(W[1]).forEach((R) => T(R));
|
|
3100
3108
|
});
|
|
3101
|
-
const
|
|
3102
|
-
return (($ == null ? void 0 : $.type) === "report" ?
|
|
3103
|
-
const
|
|
3104
|
-
return
|
|
3105
|
-
}) :
|
|
3106
|
-
key:
|
|
3107
|
-
lngData: new Map(Array.from(v).map((
|
|
3108
|
-
const
|
|
3109
|
+
const z = Array.from(C), $ = o.find((W) => W.path === m);
|
|
3110
|
+
return (($ == null ? void 0 : $.type) === "report" ? z.filter((W) => {
|
|
3111
|
+
const R = W.split(".");
|
|
3112
|
+
return R[R.length - 1] === "caption";
|
|
3113
|
+
}) : z).map((W) => ({
|
|
3114
|
+
key: W,
|
|
3115
|
+
lngData: new Map(Array.from(v).map((R) => {
|
|
3116
|
+
const U = p.get(R);
|
|
3109
3117
|
return [
|
|
3110
|
-
|
|
3111
|
-
(
|
|
3118
|
+
R,
|
|
3119
|
+
(U === void 0 ? void 0 : zf(U, W)) ?? ""
|
|
3112
3120
|
];
|
|
3113
3121
|
}))
|
|
3114
3122
|
}));
|
|
@@ -3117,21 +3125,21 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3117
3125
|
}, [S]), E = P(async () => {
|
|
3118
3126
|
if (m === null)
|
|
3119
3127
|
return;
|
|
3120
|
-
const C = Array.from(v).map((
|
|
3128
|
+
const C = Array.from(v).map((z) => (async () => {
|
|
3121
3129
|
const $ = await Ed.get(
|
|
3122
|
-
`${s}${m == null ? void 0 : m.replace("{{lng}}",
|
|
3130
|
+
`${s}${m == null ? void 0 : m.replace("{{lng}}", z)}&v=${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
3123
3131
|
// &v to not hit browser cache
|
|
3124
3132
|
{ responseType: "json" }
|
|
3125
3133
|
);
|
|
3126
|
-
return [
|
|
3134
|
+
return [z, $.data];
|
|
3127
3135
|
})()), T = await Promise.allSettled(C);
|
|
3128
|
-
f(new Map(T.map((
|
|
3136
|
+
f(new Map(T.map((z) => z.status === "fulfilled" ? z.value : ["", {}])));
|
|
3129
3137
|
}, [s, m, v]), _ = P(async () => {
|
|
3130
3138
|
E();
|
|
3131
|
-
}, [E]),
|
|
3132
|
-
return
|
|
3139
|
+
}, [E]), A = k(() => w.length > 0, [w.length]), L = k(() => v.size + 1 + (A ? 1 : 0), [A, v.size]);
|
|
3140
|
+
return H(() => {
|
|
3133
3141
|
O(u);
|
|
3134
|
-
}, [O, u, D]),
|
|
3142
|
+
}, [O, u, D]), H(() => {
|
|
3135
3143
|
E();
|
|
3136
3144
|
}, [E]), s === void 0 ? /* @__PURE__ */ a.jsx(Nt, { children: /* @__PURE__ */ a.jsxs(it, { variant: "danger", className: "fw-bold", children: [
|
|
3137
3145
|
l.cantRunLocalizationSettings,
|
|
@@ -3140,7 +3148,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3140
3148
|
l.envNotConnectedToRemote(t.toUpperCase())
|
|
3141
3149
|
] }) }) : /* @__PURE__ */ a.jsx(Nt, { title: /* @__PURE__ */ a.jsx("div", { className: "d-flex gap-4", children: /* @__PURE__ */ a.jsx(M, { variant: "h3", children: l.localizationSettings }) }), helmet: l.localizationSettings, variant: "fullScreen", children: /* @__PURE__ */ a.jsxs("div", { className: $e.keysTable, style: {
|
|
3142
3150
|
"--keys-table-columns": L,
|
|
3143
|
-
"--adding-column":
|
|
3151
|
+
"--adding-column": A ? 1 : 0
|
|
3144
3152
|
}, children: [
|
|
3145
3153
|
/* @__PURE__ */ a.jsxs("div", { className: I($e.tableFullWidth, "d-flex align-items-center justify-content-between gap-2 px-2 mt-1"), children: [
|
|
3146
3154
|
/* @__PURE__ */ a.jsx(ft, { options: o.map((C) => ({
|
|
@@ -3158,8 +3166,8 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3158
3166
|
] }),
|
|
3159
3167
|
/* @__PURE__ */ a.jsxs("div", { className: I($e.subgrid, $e.lngSelectRow), children: [
|
|
3160
3168
|
/* @__PURE__ */ a.jsx(M, { variant: "body", children: l.key }),
|
|
3161
|
-
Array.from(v).map((C, T) => /* @__PURE__ */ a.jsx(ft, { options: e.filter((
|
|
3162
|
-
|
|
3169
|
+
Array.from(v).map((C, T) => /* @__PURE__ */ a.jsx(ft, { options: e.filter((z) => z.id === C || !v.has(z.id)), value: C, onChange: (z) => j(($) => z === null ? ($.delete(C), new Set($)) : (typeof z == "string" && ($.delete(C), $.add(z)), new Set($))), size: "sm", label: `${l.language} ${T + 1}`, withoutLabel: !0, InputContainer: Te, className: I($e.lngSelect) }, C)),
|
|
3170
|
+
A ? /* @__PURE__ */ a.jsx(ft, { options: w, value: null, onChange: (C) => j((T) => (typeof C == "string" && T.add(C), new Set(T))), size: "sm", label: l.addLanguage, InputContainer: Te, className: I($e.lngSelect, $e.addLng) }) : null
|
|
3163
3171
|
] }),
|
|
3164
3172
|
/* @__PURE__ */ a.jsxs("div", { className: I($e.subgrid, $e.tableBody), children: [
|
|
3165
3173
|
y.length === 0 || D.length === 0 ? /* @__PURE__ */ a.jsx(it, { variant: "warning", className: I($e.tableFullWidth, $e.emptyTableAlert, "my-n1"), children: y.length === 0 ? l.noDataLoaded : D.length === 0 ? l.noDataFiltered : null }) : null,
|
|
@@ -3181,13 +3189,13 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3181
3189
|
": "
|
|
3182
3190
|
] }),
|
|
3183
3191
|
/* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
3184
|
-
/* @__PURE__ */ a.jsx(
|
|
3192
|
+
/* @__PURE__ */ a.jsx(te, { size: "sm", onClick: () => O(u - 1), children: /* @__PURE__ */ a.jsx(c, { icon: "minus" }) }),
|
|
3185
3193
|
/* @__PURE__ */ a.jsx("div", { style: { width: 30 }, children: /* @__PURE__ */ a.jsx(Fp, { value: u, onChange: O, InputContainer: Te, withoutLabel: !0, size: "sm" }) }),
|
|
3186
3194
|
/* @__PURE__ */ a.jsxs(M, { variant: "body", children: [
|
|
3187
3195
|
"/",
|
|
3188
3196
|
Math.ceil(D.length / dr)
|
|
3189
3197
|
] }),
|
|
3190
|
-
/* @__PURE__ */ a.jsx(
|
|
3198
|
+
/* @__PURE__ */ a.jsx(te, { size: "sm", onClick: () => O(u + 1), children: /* @__PURE__ */ a.jsx(c, { icon: "plus" }) })
|
|
3191
3199
|
] })
|
|
3192
3200
|
] })
|
|
3193
3201
|
] })
|
|
@@ -3228,7 +3236,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3228
3236
|
});
|
|
3229
3237
|
}), g;
|
|
3230
3238
|
}, [t, i, e]), m = k(() => f.concat(c), [c, f]);
|
|
3231
|
-
return
|
|
3239
|
+
return H(() => {
|
|
3232
3240
|
p();
|
|
3233
3241
|
}, [p]), { isLoading: s, searchItems: m };
|
|
3234
3242
|
}, qf = "_input-group_1hcpm_1", Yf = "_input-group-text_1hcpm_5", Kf = "_left_1hcpm_9", Xf = "_right_1hcpm_13", Qf = "_input_1hcpm_1", Jf = "_submit-button_1hcpm_20", $t = {
|
|
@@ -3266,7 +3274,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3266
3274
|
}
|
|
3267
3275
|
);
|
|
3268
3276
|
}, lm = ({ show: e, query: t, onCancel: n, groups: r, isLoading: i, searchTypes: o }) => {
|
|
3269
|
-
const { texts: { appSearch: s } } = V(
|
|
3277
|
+
const { texts: { appSearch: s } } = V(K), l = re(null);
|
|
3270
3278
|
return Od([l], n), /* @__PURE__ */ a.jsx("div", { ref: l, className: I("luminus-app-search-dropdown shadow rounded", zt.dropdown, {
|
|
3271
3279
|
[zt.open]: e
|
|
3272
3280
|
}), children: i ? /* @__PURE__ */ a.jsx("div", { className: zt.loadingContainer, children: /* @__PURE__ */ a.jsx(Pd, { animation: "border", variant: "primary" }) }) : /* @__PURE__ */ a.jsx("div", { className: zt.groupsContainer, children: r == null ? void 0 : r.map((c) => {
|
|
@@ -3295,12 +3303,12 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3295
3303
|
}) }) });
|
|
3296
3304
|
}, yN = ({ searchTypes: e, navigateFunction: t, currentPath: n, homePath: r = "/", className: i, staticAppItems: o, searchEndpointUri: s }) => {
|
|
3297
3305
|
var w;
|
|
3298
|
-
const { texts: { appSearch: l } } = V(
|
|
3299
|
-
|
|
3306
|
+
const { texts: { appSearch: l } } = V(K), [c, u] = B(e.length > 0 ? ((w = e.at(0)) == null ? void 0 : w.key) ?? null : null), d = k(() => e.find((y) => y.key === c) ?? null, [e, c]), [p, f] = B(""), [m, g] = Ka(encodeURIComponent(p), 500), { isLoading: b, searchItems: h } = Il(c, m, s, !1, o), [v, x] = B(!1);
|
|
3307
|
+
H(() => {
|
|
3300
3308
|
(h.length > 0 || b) && x(!0);
|
|
3301
3309
|
}, [h, b]);
|
|
3302
3310
|
const j = re(null);
|
|
3303
|
-
return
|
|
3311
|
+
return H(() => {
|
|
3304
3312
|
var y;
|
|
3305
3313
|
f(""), n === r && ((y = j.current) == null || y.focus());
|
|
3306
3314
|
}, [n, r]), /* @__PURE__ */ a.jsx(he, { className: "w-100 d-flex align-items-center justify-content-center", onSubmit: (y) => {
|
|
@@ -3315,7 +3323,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3315
3323
|
/* @__PURE__ */ a.jsx(lm, { query: m, searchTypes: e, show: v, onCancel: () => x(!1), groups: h, isLoading: b })
|
|
3316
3324
|
] }) });
|
|
3317
3325
|
}, cm = ({ item: e, searchTypes: t }) => {
|
|
3318
|
-
const { ProjectIconComponent: n } = V(
|
|
3326
|
+
const { ProjectIconComponent: n } = V(K), r = k(() => t.find((s) => s.key === e.type), [e.type, t]), i = k(() => Cl(e, r, t), [e, r, t]), o = k(() => El(e, r), [e, r]);
|
|
3319
3327
|
return /* @__PURE__ */ a.jsxs(
|
|
3320
3328
|
He,
|
|
3321
3329
|
{
|
|
@@ -3329,8 +3337,8 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3329
3337
|
);
|
|
3330
3338
|
}, wN = ({ query: e, type: t, appSearchTypes: n, searchEndpointUri: r, staticAppItems: i }) => {
|
|
3331
3339
|
var d, p;
|
|
3332
|
-
const { texts: { appSearch: o } } = V(
|
|
3333
|
-
return
|
|
3340
|
+
const { texts: { appSearch: o } } = V(K), [s, l] = B(""), { searchItems: c, isLoading: u } = Il(t, e, r, !0, i);
|
|
3341
|
+
return H(() => {
|
|
3334
3342
|
var f;
|
|
3335
3343
|
s || c === null || c.length === 0 || l(((f = c[0].key) == null ? void 0 : f.category) ?? "");
|
|
3336
3344
|
}, [c, s]), c === null ? null : /* @__PURE__ */ a.jsx(Nt, { variant: "fullScreen", children: u ? /* @__PURE__ */ a.jsx(Ea, {}) : c.length === 0 ? /* @__PURE__ */ a.jsx("div", { className: "alert alert-warning", children: /* @__PURE__ */ a.jsx(M, { variant: "body", children: o.noResultsFor(e) }) }) : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -3344,10 +3352,10 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3344
3352
|
)) }) })
|
|
3345
3353
|
] }) });
|
|
3346
3354
|
}, jN = () => {
|
|
3347
|
-
const { texts: { userSettings: e } } = V(
|
|
3355
|
+
const { texts: { userSettings: e } } = V(K), [t, n] = $n("file-download-try-opening", !0);
|
|
3348
3356
|
return /* @__PURE__ */ a.jsx(Qt, { collapsible: !0, title: e.downloads, defaultOpen: !0, children: /* @__PURE__ */ a.jsx(Gn, { type: "switch", value: t === void 0 ? !0 : t, onChange: n, label: e.tryOpenFileLabel }) });
|
|
3349
3357
|
}, dm = ({ show: e, handleClose: t, onConfirm: n, apiCreateBackup: r }) => {
|
|
3350
|
-
const { texts: { userSettings: i } } = V(
|
|
3358
|
+
const { texts: { userSettings: i } } = V(K), { zStringRequired: o } = Br(), { addNotification: s } = en(), l = Ke(), { startLoading: c, stopLoading: u } = V(bt), [d, p] = B(null), f = cn.object({
|
|
3351
3359
|
name: o()
|
|
3352
3360
|
}), m = Fr({ resolver: Lr(f) }), g = P(async (h, v) => (c("localStorageSettingPost"), l.post(r, {
|
|
3353
3361
|
name: h,
|
|
@@ -3355,16 +3363,16 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3355
3363
|
}).then(() => !0).catch(() => !1).finally(() => u("localStorageSettingPost"))), [l, r, c, u]), b = async (h) => {
|
|
3356
3364
|
await g(h.name, JSON.stringify(d)) && (s(i.localStorageCreateBackupSuccess, "success"), n());
|
|
3357
3365
|
};
|
|
3358
|
-
return
|
|
3366
|
+
return H(() => {
|
|
3359
3367
|
e && p(ju());
|
|
3360
|
-
}, [e]), /* @__PURE__ */ a.jsxs(
|
|
3361
|
-
/* @__PURE__ */ a.jsx(
|
|
3368
|
+
}, [e]), /* @__PURE__ */ a.jsxs(ue, { show: e, onHide: () => t(), children: [
|
|
3369
|
+
/* @__PURE__ */ a.jsx(ue.Header, { closeButton: !0, children: /* @__PURE__ */ a.jsx(ue.Title, { children: i.localStorageCreateBackup }) }),
|
|
3362
3370
|
/* @__PURE__ */ a.jsx(Vr, { ...m, children: /* @__PURE__ */ a.jsxs(he, { onSubmit: m.handleSubmit(b), noValidate: !0, children: [
|
|
3363
|
-
/* @__PURE__ */ a.jsxs(
|
|
3371
|
+
/* @__PURE__ */ a.jsxs(ue.Body, { children: [
|
|
3364
3372
|
/* @__PURE__ */ a.jsx(it, { variant: "info", size: "sm", children: i.localStorageCreateBackupInfo(Object.keys(d || {}).length) }),
|
|
3365
3373
|
/* @__PURE__ */ a.jsx(fn, { required: !0, label: i.localStorageCreateBackupName, formField: "name", type: "text" })
|
|
3366
3374
|
] }),
|
|
3367
|
-
/* @__PURE__ */ a.jsx(
|
|
3375
|
+
/* @__PURE__ */ a.jsx(ue.Footer, { className: "justify-content-end", children: /* @__PURE__ */ a.jsx(mt, { type: "submit", children: i.localStorageCreateBackupSave }) })
|
|
3368
3376
|
] }) })
|
|
3369
3377
|
] });
|
|
3370
3378
|
}, ur = {
|
|
@@ -3372,7 +3380,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3372
3380
|
apiCreateBackup: "/localStorageSettings",
|
|
3373
3381
|
apiDeleteBackup: "/localStorageSettings"
|
|
3374
3382
|
}, NN = ({ apiUrls: { apiGetBackups: e = ur.apiGetBackups, apiCreateBackup: t = ur.apiCreateBackup, apiDeleteBackup: n = ur.apiDeleteBackup } = ur }) => {
|
|
3375
|
-
const { ProjectIconComponent: r, texts: { userSettings: i } } = V(
|
|
3383
|
+
const { ProjectIconComponent: r, texts: { userSettings: i } } = V(K), { confirm: o } = St(), s = Ke(), { startLoading: l, stopLoading: c } = V(bt), { addNotification: u } = en(), [d, p] = B(!1), { data: f, setData: m, reloadData: g } = Be(e), b = P(async (x) => (l("localStorageSettingDelete"), s.delete(`${n}/${x}`).then(() => !0).catch(() => !1).finally(() => c("localStorageSettingDelete"))), [s, n, l, c]), h = P(async (x) => {
|
|
3376
3384
|
await o(i.localStorageDeleteBackupConfirm) && await b(x) && (u(i.localStorageDeleteBackupSuccess, "success"), m((j) => (j == null ? void 0 : j.filter((w) => w.id !== x)) ?? null));
|
|
3377
3385
|
}, [o, i, b, u, m]), v = P(async (x) => {
|
|
3378
3386
|
x.setting && await o(i.localStorageLoadBackup) && (Nu(x.setting) ? u(i.localStorageLoadBackupSuccess, "success") : u(i.localStorageLoadBackupError, "danger"));
|
|
@@ -3389,7 +3397,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3389
3397
|
/* @__PURE__ */ a.jsx(M, { variant: "body2", children: x.name }),
|
|
3390
3398
|
/* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-center gap-3", children: [
|
|
3391
3399
|
/* @__PURE__ */ a.jsx(M, { variant: "body2", className: "text-muted", children: x.date ? mn(x.date) : "" }),
|
|
3392
|
-
/* @__PURE__ */ a.jsx(
|
|
3400
|
+
/* @__PURE__ */ a.jsx(te, { size: "sm", color: "danger", onClick: (w) => {
|
|
3393
3401
|
w.stopPropagation(), h(x.id);
|
|
3394
3402
|
}, children: /* @__PURE__ */ a.jsx(r, { icon: "delete" }) })
|
|
3395
3403
|
] })
|
|
@@ -3402,7 +3410,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3402
3410
|
}, apiCreateBackup: t })
|
|
3403
3411
|
] });
|
|
3404
3412
|
}, DN = () => {
|
|
3405
|
-
const { texts: { userSettings: e } } = V(
|
|
3413
|
+
const { texts: { userSettings: e } } = V(K), [t, n] = $n("search-use-asterisk", !0);
|
|
3406
3414
|
return /* @__PURE__ */ a.jsx(Qt, { collapsible: !0, title: e.searchSettings, defaultOpen: !0, children: /* @__PURE__ */ a.jsx(Gn, { type: "switch", value: t === void 0 ? !0 : t, onChange: n, label: e.searchSettingsUseAsterisk }) });
|
|
3407
3415
|
}, um = "_widgets-row_13gg1_1", pm = "_widget_13gg1_1", fm = "_widget-img_13gg1_5", mm = "_widget-title-spacer_13gg1_14", gm = "_widget-title_13gg1_14", vm = "_title_13gg1_28", et = {
|
|
3408
3416
|
"widgets-row": "_widgets-row_13gg1_1",
|
|
@@ -3417,15 +3425,15 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3417
3425
|
title: vm
|
|
3418
3426
|
}, hm = ({ show: e, widgetGroups: t, widgets: n, handleClose: r, onWidgetPicked: i, texts: o }) => {
|
|
3419
3427
|
const [s, l] = B(""), c = k(() => n.filter((d) => d.id !== -1 && qe(d.name, s)), [n, s]), u = k(() => t.filter((d) => c.some((p) => p.group === d.id)), [t, c]);
|
|
3420
|
-
return /* @__PURE__ */ a.jsxs(
|
|
3421
|
-
/* @__PURE__ */ a.jsxs(
|
|
3422
|
-
/* @__PURE__ */ a.jsx(
|
|
3428
|
+
return /* @__PURE__ */ a.jsxs(ue, { show: e, onHide: () => r(), size: "lg", children: [
|
|
3429
|
+
/* @__PURE__ */ a.jsxs(ue.Header, { closeButton: !0, children: [
|
|
3430
|
+
/* @__PURE__ */ a.jsx(ue.Title, { className: "w-100", children: o.pickWidgetToAdd }),
|
|
3423
3431
|
/* @__PURE__ */ a.jsx(he.Control, { type: "search", size: "sm", value: s, placeholder: o.searchPlaceholder, onChange: (d) => {
|
|
3424
3432
|
var p;
|
|
3425
3433
|
return l(((p = d.target) == null ? void 0 : p.value) ?? "");
|
|
3426
3434
|
}, className: "me-3", style: { maxWidth: "200px" } })
|
|
3427
3435
|
] }),
|
|
3428
|
-
/* @__PURE__ */ a.jsx(
|
|
3436
|
+
/* @__PURE__ */ a.jsx(ue.Body, { className: "flex-column gap-3", children: c.length === 0 ? /* @__PURE__ */ a.jsx(it, { variant: "warning", children: o.noWidgets }) : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3429
3437
|
u.map((d) => /* @__PURE__ */ a.jsx(Cr, { defaultOpen: !0, title: d.name ?? "", children: /* @__PURE__ */ a.jsx("div", { className: "p-1", children: /* @__PURE__ */ a.jsx("div", { className: I("row gx-3 gy-3", et.widgetsRow), children: c.filter((p) => p.group === d.id).map((p) => /* @__PURE__ */ a.jsx("div", { className: "col col-4", children: /* @__PURE__ */ a.jsxs("div", { role: "button", className: I("p-0 pt-2 bg-white rounded shadow-sm", et.widget), onClick: () => i(p.id), children: [
|
|
3430
3438
|
/* @__PURE__ */ a.jsx("div", { className: et.widgetImg, style: {
|
|
3431
3439
|
backgroundImage: p.img ? `url(${p.img})` : void 0
|
|
@@ -3450,7 +3458,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3450
3458
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3451
3459
|
/* @__PURE__ */ a.jsx("div", { className: I("luminus-empty-widget", go.widget, {
|
|
3452
3460
|
[go.mobile]: s
|
|
3453
|
-
}), children: /* @__PURE__ */ a.jsx(
|
|
3461
|
+
}), children: /* @__PURE__ */ a.jsx(te, { onClick: () => o(!0), children: /* @__PURE__ */ a.jsx(Ad, {}) }) }),
|
|
3454
3462
|
/* @__PURE__ */ a.jsx(hm, { show: i, widgetGroups: e, widgets: t, handleClose: () => o(!1), onWidgetPicked: (l) => {
|
|
3455
3463
|
o(!1), n(l);
|
|
3456
3464
|
}, texts: r })
|
|
@@ -3474,7 +3482,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3474
3482
|
mobile: Im
|
|
3475
3483
|
}, _m = (e, t = "dashboardConfig") => {
|
|
3476
3484
|
const [n, r] = B({ widgets: [] });
|
|
3477
|
-
|
|
3485
|
+
H(() => {
|
|
3478
3486
|
const o = localStorage.getItem(t);
|
|
3479
3487
|
o ? r(JSON.parse(o)) : e && r(e);
|
|
3480
3488
|
}, [e, t]);
|
|
@@ -3484,7 +3492,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3484
3492
|
return { dashboardConfig: n, onChangeDashboardConfig: i };
|
|
3485
3493
|
}, SN = ({ widgetGroups: e, availableWidgets: t, editMode: n, defaultDashboardConfig: r, dashboardConfigKey: i }) => {
|
|
3486
3494
|
var m;
|
|
3487
|
-
const { texts: { homeDashboard: o } } = V(
|
|
3495
|
+
const { texts: { homeDashboard: o } } = V(K), { dashboardConfig: s, onChangeDashboardConfig: l } = _m(r, i), c = P((g, b) => {
|
|
3488
3496
|
var h, v;
|
|
3489
3497
|
g === ((h = s.widgets) == null ? void 0 : h.length) ? l({
|
|
3490
3498
|
...s,
|
|
@@ -3509,8 +3517,8 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3509
3517
|
[vt.widgetEdit]: n && g.id !== -1
|
|
3510
3518
|
}, { [vt.fullWidth]: h }), children: [
|
|
3511
3519
|
n && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3512
|
-
/* @__PURE__ */ a.jsx(
|
|
3513
|
-
/* @__PURE__ */ a.jsx(
|
|
3520
|
+
/* @__PURE__ */ a.jsx(te, { color: "danger", onClick: () => u(b), className: I(vt.removeIcon), children: /* @__PURE__ */ a.jsx(Rd, {}) }),
|
|
3521
|
+
/* @__PURE__ */ a.jsx(te, { color: h ? "danger" : "primary", onClick: () => d(b), className: I(vt.fullWidthIcon), children: /* @__PURE__ */ a.jsx(kd, {}) })
|
|
3514
3522
|
] }),
|
|
3515
3523
|
g.id === -1 ? n && /* @__PURE__ */ a.jsx("div", { className: vt.widgetWrapper, children: /* @__PURE__ */ a.jsx(vo, { widgetGroups: e, availableWidgets: t, onAdd: (v) => c(b, v), texts: o }) }) : /* @__PURE__ */ a.jsx(ip, { title: g.title, children: /* @__PURE__ */ a.jsx(g.WidgetElement, { title: g.title }) }),
|
|
3516
3524
|
g.id > -1 && n && /* @__PURE__ */ a.jsx("div", { className: vt.widgetEditOverlay })
|
|
@@ -3545,7 +3553,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3545
3553
|
collapsed: Bm
|
|
3546
3554
|
}, Cr = ({ title: e, children: t, className: n, ...r }) => {
|
|
3547
3555
|
const i = r.controlled ? !1 : r.defaultOpen ?? !1, [o, s] = B(i), l = r.controlled ? r.isOpen : o;
|
|
3548
|
-
return
|
|
3556
|
+
return H(() => {
|
|
3549
3557
|
s(i);
|
|
3550
3558
|
}, [i]), /* @__PURE__ */ a.jsxs("div", { className: n ?? "", children: [
|
|
3551
3559
|
/* @__PURE__ */ a.jsxs("div", { role: "button", className: "d-flex align-items-center justify-content-between pb-3 pt-2", onClick: () => r.controlled ? r.onToggle(!r.isOpen) : s(!o), children: [
|
|
@@ -3569,7 +3577,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
|
|
|
3569
3577
|
content: Um
|
|
3570
3578
|
}, Qt = ({ title: e, headerContent: t, children: n, className: r, headerClassName: i, contentClassName: o, dontRenderIfNoChildren: s, ...l }) => {
|
|
3571
3579
|
const c = l.collapsible ? l.controlled ? !1 : l.defaultOpen ?? !1 : !0, [u, d] = B(c), p = l.collapsible ? l.controlled ? l.isOpen : u : !0;
|
|
3572
|
-
|
|
3580
|
+
H(() => {
|
|
3573
3581
|
d(c);
|
|
3574
3582
|
}, [c]);
|
|
3575
3583
|
const f = k(() => !n || !n.toString() || n.toString().split(",").filter((m) => m && m !== "false").length === 0, [n]);
|
|
@@ -3851,7 +3859,7 @@ function Jm() {
|
|
|
3851
3859
|
};
|
|
3852
3860
|
};
|
|
3853
3861
|
}
|
|
3854
|
-
var si = /* @__PURE__ */
|
|
3862
|
+
var si = /* @__PURE__ */ de.createContext(null);
|
|
3855
3863
|
process.env.NODE_ENV !== "production" && (si.displayName = "ReactRedux");
|
|
3856
3864
|
function Zm(e) {
|
|
3857
3865
|
e();
|
|
@@ -3930,7 +3938,7 @@ function Tl(e, t) {
|
|
|
3930
3938
|
};
|
|
3931
3939
|
return d;
|
|
3932
3940
|
}
|
|
3933
|
-
var Al = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? Ja :
|
|
3941
|
+
var Al = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? Ja : H;
|
|
3934
3942
|
function Rl(e) {
|
|
3935
3943
|
var t = e.store, n = e.context, r = e.children, i = k(function() {
|
|
3936
3944
|
var l = Tl(t);
|
|
@@ -3948,7 +3956,7 @@ function Rl(e) {
|
|
|
3948
3956
|
};
|
|
3949
3957
|
}, [i, o]);
|
|
3950
3958
|
var s = n || si;
|
|
3951
|
-
return /* @__PURE__ */
|
|
3959
|
+
return /* @__PURE__ */ de.createElement(s.Provider, {
|
|
3952
3960
|
value: i
|
|
3953
3961
|
}, r);
|
|
3954
3962
|
}
|
|
@@ -4071,8 +4079,8 @@ function ug() {
|
|
|
4071
4079
|
}
|
|
4072
4080
|
}
|
|
4073
4081
|
}
|
|
4074
|
-
var j = o, w = e, y = l, D = n, S = p, O = d, E = t, _ = i,
|
|
4075
|
-
return je.ContextConsumer = s, je.ContextProvider = j, je.Element = w, je.ForwardRef = y, je.Fragment = D, je.Lazy = S, je.Memo = O, je.Portal = E, je.Profiler = _, je.StrictMode =
|
|
4082
|
+
var j = o, w = e, y = l, D = n, S = p, O = d, E = t, _ = i, A = r, L = c;
|
|
4083
|
+
return je.ContextConsumer = s, je.ContextProvider = j, je.Element = w, je.ForwardRef = y, je.Fragment = D, je.Lazy = S, je.Memo = O, je.Portal = E, je.Profiler = _, je.StrictMode = A, je.Suspense = L, je.isAsyncMode = function() {
|
|
4076
4084
|
return !1;
|
|
4077
4085
|
}, je.isConcurrentMode = function() {
|
|
4078
4086
|
return !1;
|
|
@@ -4128,16 +4136,16 @@ function pg() {
|
|
|
4128
4136
|
var ne = J.$$typeof;
|
|
4129
4137
|
switch (ne) {
|
|
4130
4138
|
case e:
|
|
4131
|
-
var
|
|
4132
|
-
switch (
|
|
4139
|
+
var pe = J.type;
|
|
4140
|
+
switch (pe) {
|
|
4133
4141
|
case n:
|
|
4134
4142
|
case i:
|
|
4135
4143
|
case r:
|
|
4136
4144
|
case c:
|
|
4137
4145
|
case u:
|
|
4138
|
-
return
|
|
4146
|
+
return pe;
|
|
4139
4147
|
default:
|
|
4140
|
-
var Pe =
|
|
4148
|
+
var Pe = pe && pe.$$typeof;
|
|
4141
4149
|
switch (Pe) {
|
|
4142
4150
|
case s:
|
|
4143
4151
|
case l:
|
|
@@ -4154,47 +4162,47 @@ function pg() {
|
|
|
4154
4162
|
}
|
|
4155
4163
|
}
|
|
4156
4164
|
}
|
|
4157
|
-
var y = s, D = o, S = e, O = l, E = n, _ = p,
|
|
4165
|
+
var y = s, D = o, S = e, O = l, E = n, _ = p, A = d, L = t, C = i, T = r, z = c, $ = !1, F = !1;
|
|
4158
4166
|
function q(J) {
|
|
4159
4167
|
return $ || ($ = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
4160
4168
|
}
|
|
4161
|
-
function
|
|
4169
|
+
function W(J) {
|
|
4162
4170
|
return F || (F = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
4163
4171
|
}
|
|
4164
|
-
function
|
|
4172
|
+
function R(J) {
|
|
4165
4173
|
return w(J) === s;
|
|
4166
4174
|
}
|
|
4167
|
-
function
|
|
4175
|
+
function U(J) {
|
|
4168
4176
|
return w(J) === o;
|
|
4169
4177
|
}
|
|
4170
4178
|
function X(J) {
|
|
4171
4179
|
return typeof J == "object" && J !== null && J.$$typeof === e;
|
|
4172
4180
|
}
|
|
4173
|
-
function
|
|
4181
|
+
function ee(J) {
|
|
4174
4182
|
return w(J) === l;
|
|
4175
4183
|
}
|
|
4176
|
-
function
|
|
4184
|
+
function se(J) {
|
|
4177
4185
|
return w(J) === n;
|
|
4178
4186
|
}
|
|
4179
4187
|
function we(J) {
|
|
4180
4188
|
return w(J) === p;
|
|
4181
4189
|
}
|
|
4182
|
-
function
|
|
4190
|
+
function oe(J) {
|
|
4183
4191
|
return w(J) === d;
|
|
4184
4192
|
}
|
|
4185
|
-
function
|
|
4193
|
+
function Q(J) {
|
|
4186
4194
|
return w(J) === t;
|
|
4187
4195
|
}
|
|
4188
|
-
function
|
|
4196
|
+
function le(J) {
|
|
4189
4197
|
return w(J) === i;
|
|
4190
4198
|
}
|
|
4191
|
-
function
|
|
4199
|
+
function Ce(J) {
|
|
4192
4200
|
return w(J) === r;
|
|
4193
4201
|
}
|
|
4194
4202
|
function me(J) {
|
|
4195
4203
|
return w(J) === c;
|
|
4196
4204
|
}
|
|
4197
|
-
Ne.ContextConsumer = y, Ne.ContextProvider = D, Ne.Element = S, Ne.ForwardRef = O, Ne.Fragment = E, Ne.Lazy = _, Ne.Memo =
|
|
4205
|
+
Ne.ContextConsumer = y, Ne.ContextProvider = D, Ne.Element = S, Ne.ForwardRef = O, Ne.Fragment = E, Ne.Lazy = _, Ne.Memo = A, Ne.Portal = L, Ne.Profiler = C, Ne.StrictMode = T, Ne.Suspense = z, Ne.isAsyncMode = q, Ne.isConcurrentMode = W, Ne.isContextConsumer = R, Ne.isContextProvider = U, Ne.isElement = X, Ne.isForwardRef = ee, Ne.isFragment = se, Ne.isLazy = we, Ne.isMemo = oe, Ne.isPortal = Q, Ne.isProfiler = le, Ne.isStrictMode = Ce, Ne.isSuspense = me, Ne.isValidElementType = j, Ne.typeOf = w;
|
|
4198
4206
|
}()), Ne;
|
|
4199
4207
|
}
|
|
4200
4208
|
process.env.NODE_ENV === "production" ? Aa.exports = ug() : Aa.exports = pg();
|
|
@@ -4273,60 +4281,60 @@ function jg(e, t) {
|
|
|
4273
4281
|
displayName: E,
|
|
4274
4282
|
wrappedComponentName: O,
|
|
4275
4283
|
WrappedComponent: S
|
|
4276
|
-
}),
|
|
4284
|
+
}), A = j.pure;
|
|
4277
4285
|
function L(F) {
|
|
4278
4286
|
return e(F.dispatch, _);
|
|
4279
4287
|
}
|
|
4280
|
-
var C =
|
|
4288
|
+
var C = A ? k : function(F) {
|
|
4281
4289
|
return F();
|
|
4282
4290
|
};
|
|
4283
4291
|
function T(F) {
|
|
4284
4292
|
var q = k(function() {
|
|
4285
|
-
var
|
|
4286
|
-
return [F.context,
|
|
4287
|
-
}, [F]),
|
|
4288
|
-
return
|
|
4289
|
-
}, [
|
|
4290
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
4293
|
+
var fe = F.reactReduxForwardedRef, Ve = Dr(F, mg);
|
|
4294
|
+
return [F.context, fe, Ve];
|
|
4295
|
+
}, [F]), W = q[0], R = q[1], U = q[2], X = k(function() {
|
|
4296
|
+
return W && W.Consumer && Po.isContextConsumer(/* @__PURE__ */ de.createElement(W.Consumer, null)) ? W : y;
|
|
4297
|
+
}, [W, y]), ee = V(X), se = !!F.store && !!F.store.getState && !!F.store.dispatch, we = !!ee && !!ee.store;
|
|
4298
|
+
if (process.env.NODE_ENV !== "production" && !se && !we)
|
|
4291
4299
|
throw new Error('Could not find "store" in the context of ' + ('"' + E + '". Either wrap the root component in a <Provider>, ') + "or pass a custom React context provider to <Provider> and the corresponding " + ("React context consumer to " + E + " in connect options."));
|
|
4292
|
-
var
|
|
4293
|
-
return L(
|
|
4294
|
-
}, [
|
|
4300
|
+
var oe = se ? F.store : ee.store, Q = k(function() {
|
|
4301
|
+
return L(oe);
|
|
4302
|
+
}, [oe]), le = k(function() {
|
|
4295
4303
|
if (!d) return vg;
|
|
4296
|
-
var
|
|
4297
|
-
return [
|
|
4298
|
-
}, [
|
|
4299
|
-
return
|
|
4300
|
-
subscription:
|
|
4304
|
+
var fe = Tl(oe, se ? null : ee.subscription), Ve = fe.notifyNestedSubs.bind(fe);
|
|
4305
|
+
return [fe, Ve];
|
|
4306
|
+
}, [oe, se, ee]), Ce = le[0], me = le[1], J = k(function() {
|
|
4307
|
+
return se ? ee : ie({}, ee, {
|
|
4308
|
+
subscription: Ce
|
|
4301
4309
|
});
|
|
4302
|
-
}, [
|
|
4310
|
+
}, [se, ee, Ce]), ne = lu(bg, gg, wg), pe = ne[0], Pe = pe[0], Ze = ne[1];
|
|
4303
4311
|
if (Pe && Pe.error)
|
|
4304
4312
|
throw Pe.error;
|
|
4305
|
-
var xt = re(),
|
|
4306
|
-
return G.current &&
|
|
4307
|
-
}, [
|
|
4308
|
-
To(xg, [
|
|
4309
|
-
var
|
|
4310
|
-
return /* @__PURE__ */
|
|
4311
|
-
ref:
|
|
4313
|
+
var xt = re(), Y = re(U), G = re(), ae = re(!1), ge = C(function() {
|
|
4314
|
+
return G.current && U === Y.current ? G.current : Q(oe.getState(), U);
|
|
4315
|
+
}, [oe, Pe, U]);
|
|
4316
|
+
To(xg, [Y, xt, ae, U, ge, G, me]), To(yg, [d, oe, Ce, Q, Y, xt, ae, G, me, Ze], [oe, Ce, Q]);
|
|
4317
|
+
var Ie = k(function() {
|
|
4318
|
+
return /* @__PURE__ */ de.createElement(S, ie({}, ge, {
|
|
4319
|
+
ref: R
|
|
4312
4320
|
}));
|
|
4313
|
-
}, [
|
|
4314
|
-
return d ? /* @__PURE__ */
|
|
4321
|
+
}, [R, S, ge]), be = k(function() {
|
|
4322
|
+
return d ? /* @__PURE__ */ de.createElement(X.Provider, {
|
|
4315
4323
|
value: J
|
|
4316
|
-
},
|
|
4317
|
-
}, [X,
|
|
4324
|
+
}, Ie) : Ie;
|
|
4325
|
+
}, [X, Ie, J]);
|
|
4318
4326
|
return be;
|
|
4319
4327
|
}
|
|
4320
|
-
var
|
|
4321
|
-
if (
|
|
4322
|
-
var $ =
|
|
4323
|
-
return /* @__PURE__ */
|
|
4324
|
-
reactReduxForwardedRef:
|
|
4328
|
+
var z = A ? de.memo(T) : T;
|
|
4329
|
+
if (z.WrappedComponent = S, z.displayName = T.displayName = E, h) {
|
|
4330
|
+
var $ = de.forwardRef(function(q, W) {
|
|
4331
|
+
return /* @__PURE__ */ de.createElement(z, ie({}, q, {
|
|
4332
|
+
reactReduxForwardedRef: W
|
|
4325
4333
|
}));
|
|
4326
4334
|
});
|
|
4327
4335
|
return $.displayName = E, $.WrappedComponent = S, Io($, S);
|
|
4328
4336
|
}
|
|
4329
|
-
return Io(
|
|
4337
|
+
return Io(z, S);
|
|
4330
4338
|
};
|
|
4331
4339
|
}
|
|
4332
4340
|
function Ao(e, t) {
|
|
@@ -4502,7 +4510,7 @@ function Hg(e) {
|
|
|
4502
4510
|
var t = {}, n = t.connectHOC, r = n === void 0 ? jg : n, i = t.mapStateToPropsFactories, o = i === void 0 ? Pg : i, s = t.mapDispatchToPropsFactories, l = s === void 0 ? Ig : s, c = t.mergePropsFactories, u = c === void 0 ? Bg : c, d = t.selectorFactory, p = d === void 0 ? $g : d;
|
|
4503
4511
|
return function(m, g, b, h) {
|
|
4504
4512
|
h === void 0 && (h = {});
|
|
4505
|
-
var v = h, x = v.pure, j = x === void 0 ? !0 : x, w = v.areStatesEqual, y = w === void 0 ? Ug : w, D = v.areOwnPropsEqual, S = D === void 0 ? sa : D, O = v.areStatePropsEqual, E = O === void 0 ? sa : O, _ = v.areMergedPropsEqual,
|
|
4513
|
+
var v = h, x = v.pure, j = x === void 0 ? !0 : x, w = v.areStatesEqual, y = w === void 0 ? Ug : w, D = v.areOwnPropsEqual, S = D === void 0 ? sa : D, O = v.areStatePropsEqual, E = O === void 0 ? sa : O, _ = v.areMergedPropsEqual, A = _ === void 0 ? sa : _, L = Dr(v, Gg), C = ca(m, o, "mapStateToProps"), T = ca(g, l, "mapDispatchToProps"), z = ca(b, u, "mergeProps");
|
|
4506
4514
|
return r(p, ie({
|
|
4507
4515
|
// used in error messages
|
|
4508
4516
|
methodName: "connect",
|
|
@@ -4515,12 +4523,12 @@ function Hg(e) {
|
|
|
4515
4523
|
// passed through to selectorFactory
|
|
4516
4524
|
initMapStateToProps: C,
|
|
4517
4525
|
initMapDispatchToProps: T,
|
|
4518
|
-
initMergeProps:
|
|
4526
|
+
initMergeProps: z,
|
|
4519
4527
|
pure: j,
|
|
4520
4528
|
areStatesEqual: y,
|
|
4521
4529
|
areOwnPropsEqual: S,
|
|
4522
4530
|
areStatePropsEqual: E,
|
|
4523
|
-
areMergedPropsEqual:
|
|
4531
|
+
areMergedPropsEqual: A
|
|
4524
4532
|
}, L));
|
|
4525
4533
|
};
|
|
4526
4534
|
}
|
|
@@ -4544,7 +4552,7 @@ function $l(e, t) {
|
|
|
4544
4552
|
inputs: t,
|
|
4545
4553
|
result: e()
|
|
4546
4554
|
};
|
|
4547
|
-
return
|
|
4555
|
+
return H(function() {
|
|
4548
4556
|
r.current = !1, i.current = s;
|
|
4549
4557
|
}, [s]), s.result;
|
|
4550
4558
|
}
|
|
@@ -4779,7 +4787,7 @@ var ov = function(e) {
|
|
|
4779
4787
|
}, n.render = function() {
|
|
4780
4788
|
return this.props.children(this.setCallbacks);
|
|
4781
4789
|
}, t;
|
|
4782
|
-
}(
|
|
4790
|
+
}(de.Component), sv = `
|
|
4783
4791
|
Press space bar to start a drag.
|
|
4784
4792
|
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
4785
4793
|
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
@@ -6250,10 +6258,10 @@ var Yo = {
|
|
|
6250
6258
|
if (e.phase === "DROP_PENDING")
|
|
6251
6259
|
return e;
|
|
6252
6260
|
Yt(e) || (process.env.NODE_ENV !== "production" ? N(!1, "Attempting to move in an unsupported phase " + e.phase) : N());
|
|
6253
|
-
var O = t.payload, E = O.id, _ = O.isEnabled,
|
|
6254
|
-
|
|
6255
|
-
but it is already ` + String(
|
|
6256
|
-
var L = ie({},
|
|
6261
|
+
var O = t.payload, E = O.id, _ = O.isEnabled, A = e.dimensions.droppables[E];
|
|
6262
|
+
A || (process.env.NODE_ENV !== "production" ? N(!1, "Cannot find Droppable[id: " + E + "] to toggle its enabled state") : N()), A.isEnabled === _ && (process.env.NODE_ENV !== "production" ? N(!1, "Trying to set droppable isEnabled to " + String(_) + `
|
|
6263
|
+
but it is already ` + String(A.isEnabled)) : N());
|
|
6264
|
+
var L = ie({}, A, {
|
|
6257
6265
|
isEnabled: _
|
|
6258
6266
|
});
|
|
6259
6267
|
return pa(e, L, !0);
|
|
@@ -6262,11 +6270,11 @@ var Yo = {
|
|
|
6262
6270
|
if (e.phase === "DROP_PENDING")
|
|
6263
6271
|
return e;
|
|
6264
6272
|
Yt(e) || (process.env.NODE_ENV !== "production" ? N(!1, "Attempting to move in an unsupported phase " + e.phase) : N());
|
|
6265
|
-
var C = t.payload, T = C.id,
|
|
6266
|
-
$ || (process.env.NODE_ENV !== "production" ? N(!1, "Cannot find Droppable[id: " + T + "] to toggle its isCombineEnabled state") : N()), $.isCombineEnabled ===
|
|
6273
|
+
var C = t.payload, T = C.id, z = C.isCombineEnabled, $ = e.dimensions.droppables[T];
|
|
6274
|
+
$ || (process.env.NODE_ENV !== "production" ? N(!1, "Cannot find Droppable[id: " + T + "] to toggle its isCombineEnabled state") : N()), $.isCombineEnabled === z && (process.env.NODE_ENV !== "production" ? N(!1, "Trying to set droppable isCombineEnabled to " + String(z) + `
|
|
6267
6275
|
but it is already ` + String($.isCombineEnabled)) : N());
|
|
6268
6276
|
var F = ie({}, $, {
|
|
6269
|
-
isCombineEnabled:
|
|
6277
|
+
isCombineEnabled: z
|
|
6270
6278
|
});
|
|
6271
6279
|
return pa(e, F, !0);
|
|
6272
6280
|
}
|
|
@@ -6277,30 +6285,30 @@ var Yo = {
|
|
|
6277
6285
|
var q = t.payload.newScroll;
|
|
6278
6286
|
if (At(e.viewport.scroll.current, q))
|
|
6279
6287
|
return fa(e);
|
|
6280
|
-
var
|
|
6288
|
+
var W = nc(e.viewport, q);
|
|
6281
6289
|
return Ba(e) ? pc({
|
|
6282
6290
|
state: e,
|
|
6283
|
-
viewport:
|
|
6291
|
+
viewport: W
|
|
6284
6292
|
}) : Bn({
|
|
6285
6293
|
state: e,
|
|
6286
|
-
viewport:
|
|
6294
|
+
viewport: W
|
|
6287
6295
|
});
|
|
6288
6296
|
}
|
|
6289
6297
|
if (t.type === "UPDATE_VIEWPORT_MAX_SCROLL") {
|
|
6290
6298
|
if (!Yt(e))
|
|
6291
6299
|
return e;
|
|
6292
|
-
var
|
|
6293
|
-
if (At(
|
|
6300
|
+
var R = t.payload.maxScroll;
|
|
6301
|
+
if (At(R, e.viewport.scroll.max))
|
|
6294
6302
|
return e;
|
|
6295
|
-
var
|
|
6303
|
+
var U = ie({}, e.viewport, {
|
|
6296
6304
|
scroll: ie({}, e.viewport.scroll, {
|
|
6297
|
-
max:
|
|
6305
|
+
max: R
|
|
6298
6306
|
})
|
|
6299
6307
|
});
|
|
6300
6308
|
return ie({
|
|
6301
6309
|
phase: "DRAGGING"
|
|
6302
6310
|
}, e, {
|
|
6303
|
-
viewport:
|
|
6311
|
+
viewport: U
|
|
6304
6312
|
});
|
|
6305
6313
|
}
|
|
6306
6314
|
if (t.type === "MOVE_UP" || t.type === "MOVE_DOWN" || t.type === "MOVE_LEFT" || t.type === "MOVE_RIGHT") {
|
|
@@ -6319,28 +6327,28 @@ var Yo = {
|
|
|
6319
6327
|
}) : e;
|
|
6320
6328
|
}
|
|
6321
6329
|
if (t.type === "DROP_PENDING") {
|
|
6322
|
-
var
|
|
6330
|
+
var ee = t.payload.reason;
|
|
6323
6331
|
e.phase !== "COLLECTING" && (process.env.NODE_ENV !== "production" ? N(!1, "Can only move into the DROP_PENDING phase from the COLLECTING phase") : N());
|
|
6324
|
-
var
|
|
6332
|
+
var se = ie({
|
|
6325
6333
|
phase: "DROP_PENDING"
|
|
6326
6334
|
}, e, {
|
|
6327
6335
|
phase: "DROP_PENDING",
|
|
6328
6336
|
isWaiting: !0,
|
|
6329
|
-
reason:
|
|
6337
|
+
reason: ee
|
|
6330
6338
|
});
|
|
6331
|
-
return
|
|
6339
|
+
return se;
|
|
6332
6340
|
}
|
|
6333
6341
|
if (t.type === "DROP_ANIMATE") {
|
|
6334
|
-
var we = t.payload,
|
|
6342
|
+
var we = t.payload, oe = we.completed, Q = we.dropDuration, le = we.newHomeClientOffset;
|
|
6335
6343
|
e.phase === "DRAGGING" || e.phase === "DROP_PENDING" || (process.env.NODE_ENV !== "production" ? N(!1, "Cannot animate drop from phase " + e.phase) : N());
|
|
6336
|
-
var
|
|
6344
|
+
var Ce = {
|
|
6337
6345
|
phase: "DROP_ANIMATING",
|
|
6338
|
-
completed:
|
|
6339
|
-
dropDuration:
|
|
6340
|
-
newHomeClientOffset:
|
|
6346
|
+
completed: oe,
|
|
6347
|
+
dropDuration: Q,
|
|
6348
|
+
newHomeClientOffset: le,
|
|
6341
6349
|
dimensions: e.dimensions
|
|
6342
6350
|
};
|
|
6343
|
-
return
|
|
6351
|
+
return Ce;
|
|
6344
6352
|
}
|
|
6345
6353
|
if (t.type === "DROP_COMPLETE") {
|
|
6346
6354
|
var me = t.payload.completed;
|
|
@@ -7599,7 +7607,7 @@ var ub = function(e, t) {
|
|
|
7599
7607
|
dropAnimating: Tn(s, "dropAnimating"),
|
|
7600
7608
|
userCancel: Tn(s, "userCancel")
|
|
7601
7609
|
};
|
|
7602
|
-
}, Je = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? Ja :
|
|
7610
|
+
}, Je = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? Ja : H, va = function() {
|
|
7603
7611
|
var t = document.querySelector("head");
|
|
7604
7612
|
return t || (process.env.NODE_ENV !== "production" ? N(!1, "Cannot find the head to append a style to") : N()), t;
|
|
7605
7613
|
}, as = function(t) {
|
|
@@ -7794,13 +7802,13 @@ function kb() {
|
|
|
7794
7802
|
}
|
|
7795
7803
|
function Bb() {
|
|
7796
7804
|
var e = ve(kb, []);
|
|
7797
|
-
return
|
|
7805
|
+
return H(function() {
|
|
7798
7806
|
return function() {
|
|
7799
7807
|
requestAnimationFrame(e.clean);
|
|
7800
7808
|
};
|
|
7801
7809
|
}, [e]), e;
|
|
7802
7810
|
}
|
|
7803
|
-
var _i =
|
|
7811
|
+
var _i = de.createContext(null), Jn = function() {
|
|
7804
7812
|
var e = document.body;
|
|
7805
7813
|
return e || (process.env.NODE_ENV !== "production" ? N(!1, "Cannot find document.body") : N()), e;
|
|
7806
7814
|
}, Lb = {
|
|
@@ -7820,7 +7828,7 @@ function Fb(e) {
|
|
|
7820
7828
|
var t = ve(function() {
|
|
7821
7829
|
return Mb(e);
|
|
7822
7830
|
}, [e]), n = re(null);
|
|
7823
|
-
|
|
7831
|
+
H(function() {
|
|
7824
7832
|
var o = document.createElement("div");
|
|
7825
7833
|
return n.current = o, o.id = t, o.setAttribute("aria-live", "assertive"), o.setAttribute("aria-atomic", "true"), ie(o.style, Lb), Jn().appendChild(o), function() {
|
|
7826
7834
|
setTimeout(function() {
|
|
@@ -7869,7 +7877,7 @@ function Ub(e) {
|
|
|
7869
7877
|
uniqueId: r
|
|
7870
7878
|
});
|
|
7871
7879
|
}, [r, t]);
|
|
7872
|
-
return
|
|
7880
|
+
return H(function() {
|
|
7873
7881
|
var s = document.createElement("div");
|
|
7874
7882
|
return s.id = i, s.textContent = n, s.style.display = "none", Jn().appendChild(s), function() {
|
|
7875
7883
|
var c = Jn();
|
|
@@ -7877,7 +7885,7 @@ function Ub(e) {
|
|
|
7877
7885
|
};
|
|
7878
7886
|
}, [i, n]), i;
|
|
7879
7887
|
}
|
|
7880
|
-
var qr =
|
|
7888
|
+
var qr = de.createContext(null), Hb = {
|
|
7881
7889
|
react: "^16.8.5 || ^17.0.0 || ^18.0.0",
|
|
7882
7890
|
"react-dom": "^16.8.5 || ^17.0.0 || ^18.0.0"
|
|
7883
7891
|
}, Wb = /(\d+)\.(\d+)\.(\d+)/, is = function(t) {
|
|
@@ -7931,7 +7939,7 @@ function Pi(e) {
|
|
|
7931
7939
|
}
|
|
7932
7940
|
function ar(e, t) {
|
|
7933
7941
|
Pi(function() {
|
|
7934
|
-
|
|
7942
|
+
H(function() {
|
|
7935
7943
|
try {
|
|
7936
7944
|
e();
|
|
7937
7945
|
} catch (n) {
|
|
@@ -7946,12 +7954,12 @@ function ar(e, t) {
|
|
|
7946
7954
|
}
|
|
7947
7955
|
function Kb() {
|
|
7948
7956
|
ar(function() {
|
|
7949
|
-
qb(Hb.react,
|
|
7957
|
+
qb(Hb.react, de.version), Yb(document);
|
|
7950
7958
|
}, []);
|
|
7951
7959
|
}
|
|
7952
7960
|
function Ti(e) {
|
|
7953
7961
|
var t = re(e);
|
|
7954
|
-
return
|
|
7962
|
+
return H(function() {
|
|
7955
7963
|
t.current = e;
|
|
7956
7964
|
}), t;
|
|
7957
7965
|
}
|
|
@@ -8609,7 +8617,7 @@ function Tx(e) {
|
|
|
8609
8617
|
if (_ === void 0 && (_ = {
|
|
8610
8618
|
shouldBlockNextClick: !1
|
|
8611
8619
|
}), D.cleanup(), _.shouldBlockNextClick) {
|
|
8612
|
-
var
|
|
8620
|
+
var A = nt(window, [{
|
|
8613
8621
|
eventName: "click",
|
|
8614
8622
|
fn: Px,
|
|
8615
8623
|
options: {
|
|
@@ -8618,7 +8626,7 @@ function Tx(e) {
|
|
|
8618
8626
|
capture: !0
|
|
8619
8627
|
}
|
|
8620
8628
|
}]);
|
|
8621
|
-
setTimeout(
|
|
8629
|
+
setTimeout(A);
|
|
8622
8630
|
}
|
|
8623
8631
|
S(), r.dispatch(gc({
|
|
8624
8632
|
reason: E
|
|
@@ -8854,11 +8862,11 @@ function Bx(e) {
|
|
|
8854
8862
|
registry: g,
|
|
8855
8863
|
customSensors: r,
|
|
8856
8864
|
enableDefaultSensors: e.enableDefaultSensors !== !1
|
|
8857
|
-
}),
|
|
8865
|
+
}), H(function() {
|
|
8858
8866
|
return j;
|
|
8859
|
-
}, [j]),
|
|
8867
|
+
}, [j]), de.createElement(qr.Provider, {
|
|
8860
8868
|
value: O
|
|
8861
|
-
},
|
|
8869
|
+
}, de.createElement(Rl, {
|
|
8862
8870
|
context: _i,
|
|
8863
8871
|
store: x
|
|
8864
8872
|
}, e.children));
|
|
@@ -8871,8 +8879,8 @@ function Mx() {
|
|
|
8871
8879
|
}
|
|
8872
8880
|
function Fx(e) {
|
|
8873
8881
|
var t = Mx(), n = e.dragHandleUsageInstructions || wr.dragHandleUsageInstructions;
|
|
8874
|
-
return
|
|
8875
|
-
return
|
|
8882
|
+
return de.createElement(ov, null, function(r) {
|
|
8883
|
+
return de.createElement(Bx, {
|
|
8876
8884
|
nonce: e.nonce,
|
|
8877
8885
|
contextId: t,
|
|
8878
8886
|
setCallbacks: r,
|
|
@@ -9101,8 +9109,8 @@ function Zx(e) {
|
|
|
9101
9109
|
isDropDisabled: D.isDropDisabled,
|
|
9102
9110
|
isCombineEnabled: D.isCombineEnabled,
|
|
9103
9111
|
shouldClipSubject: !D.ignoreContainerClipping
|
|
9104
|
-
}),
|
|
9105
|
-
return
|
|
9112
|
+
}), A = O.closestScrollable;
|
|
9113
|
+
return A && (A.setAttribute(rs.contextId, n.contextId), A.addEventListener("scroll", m, cs(E.scrollOptions)), process.env.NODE_ENV !== "production" && Wx(A)), _;
|
|
9106
9114
|
}, [n.contextId, l, m, s]), b = Z(function() {
|
|
9107
9115
|
var w = t.current, y = gr(w);
|
|
9108
9116
|
return w && y || (process.env.NODE_ENV !== "production" ? N(!1, "Can only recollect Droppable client for Droppables that have a scroll container") : N()), Va(y);
|
|
@@ -9178,7 +9186,7 @@ function ny(e) {
|
|
|
9178
9186
|
var t = re(null), n = Z(function() {
|
|
9179
9187
|
t.current && (clearTimeout(t.current), t.current = null);
|
|
9180
9188
|
}, []), r = e.animate, i = e.onTransitionEnd, o = e.onClose, s = e.contextId, l = B(e.animate === "open"), c = l[0], u = l[1];
|
|
9181
|
-
|
|
9189
|
+
H(function() {
|
|
9182
9190
|
return c ? r !== "open" ? (n(), u(!1), xa) : t.current ? xa : (t.current = setTimeout(function() {
|
|
9183
9191
|
t.current = null, u(!1);
|
|
9184
9192
|
}), n) : xa;
|
|
@@ -9190,14 +9198,14 @@ function ny(e) {
|
|
|
9190
9198
|
animate: e.animate,
|
|
9191
9199
|
placeholder: e.placeholder
|
|
9192
9200
|
});
|
|
9193
|
-
return
|
|
9201
|
+
return de.createElement(e.placeholder.tagName, {
|
|
9194
9202
|
style: p,
|
|
9195
9203
|
"data-rbd-placeholder-context-id": s,
|
|
9196
9204
|
onTransitionEnd: d,
|
|
9197
9205
|
ref: e.innerRef
|
|
9198
9206
|
});
|
|
9199
9207
|
}
|
|
9200
|
-
var ry =
|
|
9208
|
+
var ry = de.memo(ny), ki = de.createContext(null);
|
|
9201
9209
|
function Bc(e) {
|
|
9202
9210
|
e && rr(e) || (process.env.NODE_ENV !== "production" ? N(!1, `
|
|
9203
9211
|
provided.innerRef has not been provided with a HTMLElement.
|
|
@@ -9292,7 +9300,7 @@ var ly = function(e) {
|
|
|
9292
9300
|
};
|
|
9293
9301
|
return this.props.children(i);
|
|
9294
9302
|
}, t;
|
|
9295
|
-
}(
|
|
9303
|
+
}(de.PureComponent), us = {
|
|
9296
9304
|
dragging: 5e3,
|
|
9297
9305
|
dropAnimating: 4500
|
|
9298
9306
|
}, cy = function(t, n) {
|
|
@@ -9436,7 +9444,7 @@ function yy(e) {
|
|
|
9436
9444
|
}, [o, s, m, g]), D = Z(function(E) {
|
|
9437
9445
|
x.type === "DRAGGING" && x.dropping && E.propertyName === "transform" && j();
|
|
9438
9446
|
}, [j, x]), S = ve(function() {
|
|
9439
|
-
var E = my(x), _ = x.type === "DRAGGING" && x.dropping ? D : null,
|
|
9447
|
+
var E = my(x), _ = x.type === "DRAGGING" && x.dropping ? D : null, A = {
|
|
9440
9448
|
innerRef: n,
|
|
9441
9449
|
draggableProps: {
|
|
9442
9450
|
"data-rbd-draggable-context-id": o,
|
|
@@ -9446,7 +9454,7 @@ function yy(e) {
|
|
|
9446
9454
|
},
|
|
9447
9455
|
dragHandleProps: y
|
|
9448
9456
|
};
|
|
9449
|
-
return
|
|
9457
|
+
return A;
|
|
9450
9458
|
}, [o, y, m, x, D, n]), O = ve(function() {
|
|
9451
9459
|
return {
|
|
9452
9460
|
draggableId: p.id,
|
|
@@ -9614,11 +9622,11 @@ var Cy = function() {
|
|
|
9614
9622
|
})(yy);
|
|
9615
9623
|
function Vc(e) {
|
|
9616
9624
|
var t = Tr(ki), n = t.isUsingCloneFor;
|
|
9617
|
-
return n === e.draggableId && !e.isClone ? null :
|
|
9625
|
+
return n === e.draggableId && !e.isClone ? null : de.createElement(Iy, e);
|
|
9618
9626
|
}
|
|
9619
9627
|
function _y(e) {
|
|
9620
9628
|
var t = typeof e.isDragDisabled == "boolean" ? !e.isDragDisabled : !0, n = !!e.disableInteractiveElementBlocking, r = !!e.shouldRespectForcePress;
|
|
9621
|
-
return
|
|
9629
|
+
return de.createElement(Vc, ie({}, e, {
|
|
9622
9630
|
isClone: !1,
|
|
9623
9631
|
isEnabled: t,
|
|
9624
9632
|
canDragInteractiveElements: n,
|
|
@@ -9657,16 +9665,16 @@ function Oy(e) {
|
|
|
9657
9665
|
ignoreContainerClipping: p,
|
|
9658
9666
|
getDroppableRef: x
|
|
9659
9667
|
});
|
|
9660
|
-
var S =
|
|
9668
|
+
var S = de.createElement(ly, {
|
|
9661
9669
|
on: e.placeholder,
|
|
9662
9670
|
shouldAnimate: e.shouldAnimatePlaceholder
|
|
9663
9671
|
}, function(L) {
|
|
9664
|
-
var C = L.onClose, T = L.data,
|
|
9665
|
-
return
|
|
9672
|
+
var C = L.onClose, T = L.data, z = L.animate;
|
|
9673
|
+
return de.createElement(ry, {
|
|
9666
9674
|
placeholder: T,
|
|
9667
9675
|
onClose: C,
|
|
9668
9676
|
innerRef: y,
|
|
9669
|
-
animate:
|
|
9677
|
+
animate: z,
|
|
9670
9678
|
contextId: n,
|
|
9671
9679
|
onTransitionEnd: D
|
|
9672
9680
|
});
|
|
@@ -9686,24 +9694,24 @@ function Oy(e) {
|
|
|
9686
9694
|
isUsingCloneFor: E
|
|
9687
9695
|
};
|
|
9688
9696
|
}, [l, E, c]);
|
|
9689
|
-
function
|
|
9697
|
+
function A() {
|
|
9690
9698
|
if (!b)
|
|
9691
9699
|
return null;
|
|
9692
|
-
var L = b.dragging, C = b.render, T =
|
|
9700
|
+
var L = b.dragging, C = b.render, T = de.createElement(Vc, {
|
|
9693
9701
|
draggableId: L.draggableId,
|
|
9694
9702
|
index: L.source.index,
|
|
9695
9703
|
isClone: !0,
|
|
9696
9704
|
isEnabled: !0,
|
|
9697
9705
|
shouldRespectForcePress: !1,
|
|
9698
9706
|
canDragInteractiveElements: !0
|
|
9699
|
-
}, function(
|
|
9700
|
-
return C(
|
|
9707
|
+
}, function(z, $) {
|
|
9708
|
+
return C(z, $, L);
|
|
9701
9709
|
});
|
|
9702
9710
|
return Vn.createPortal(T, v());
|
|
9703
9711
|
}
|
|
9704
|
-
return
|
|
9712
|
+
return de.createElement(ki.Provider, {
|
|
9705
9713
|
value: _
|
|
9706
|
-
}, s(O, g),
|
|
9714
|
+
}, s(O, g), A());
|
|
9707
9715
|
}
|
|
9708
9716
|
var ja = function(t, n) {
|
|
9709
9717
|
return t === n.droppable.type;
|
|
@@ -9854,7 +9862,7 @@ var Gc = function(e) {
|
|
|
9854
9862
|
return ky ? (!this.props.node && !this.defaultNode && (this.defaultNode = document.createElement("div"), document.body.appendChild(this.defaultNode)), Vn.createPortal(this.props.children, this.props.node || this.defaultNode)) : null;
|
|
9855
9863
|
}
|
|
9856
9864
|
}]), t;
|
|
9857
|
-
}(
|
|
9865
|
+
}(de.Component);
|
|
9858
9866
|
Gc.propTypes = {
|
|
9859
9867
|
children: ht.node.isRequired,
|
|
9860
9868
|
node: ht.any
|
|
@@ -9909,7 +9917,7 @@ var Uc = function(e) {
|
|
|
9909
9917
|
value: function(r) {
|
|
9910
9918
|
!this.props.node && !this.defaultNode && (this.defaultNode = document.createElement("div"), document.body.appendChild(this.defaultNode));
|
|
9911
9919
|
var i = this.props.children;
|
|
9912
|
-
typeof this.props.children.type == "function" && (i =
|
|
9920
|
+
typeof this.props.children.type == "function" && (i = de.cloneElement(this.props.children)), this.portal = Vn.unstable_renderSubtreeIntoContainer(this, i, this.props.node || this.defaultNode);
|
|
9913
9921
|
}
|
|
9914
9922
|
}, {
|
|
9915
9923
|
key: "render",
|
|
@@ -9917,7 +9925,7 @@ var Uc = function(e) {
|
|
|
9917
9925
|
return null;
|
|
9918
9926
|
}
|
|
9919
9927
|
}]), t;
|
|
9920
|
-
}(
|
|
9928
|
+
}(de.Component);
|
|
9921
9929
|
Uc.propTypes = {
|
|
9922
9930
|
children: ht.node.isRequired,
|
|
9923
9931
|
node: ht.any
|
|
@@ -9931,7 +9939,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
9931
9939
|
backgroundSize: "contain"
|
|
9932
9940
|
} }) : /* @__PURE__ */ a.jsx("img", { ...s, alt: t ?? "", src: e ?? i }), Hy = ({ children: e, ...t }) => {
|
|
9933
9941
|
const [n, r] = B(!1);
|
|
9934
|
-
return
|
|
9942
|
+
return H(() => {
|
|
9935
9943
|
const i = requestAnimationFrame(() => r(!0));
|
|
9936
9944
|
return () => {
|
|
9937
9945
|
cancelAnimationFrame(i), r(!1);
|
|
@@ -9960,13 +9968,13 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
9960
9968
|
right: aw
|
|
9961
9969
|
}, iw = ({ show: e, onClose: t, photos: n, defaultIndex: r, uploadPhotosText: i, noPhotosText: o, onUploadPhotos: s, photoActions: l, baseUrl: c, customToken: u, placeholder: d, ImgComponent: p = Hc, onChangeOrder: f }) => {
|
|
9962
9970
|
const m = xu(), [g, b] = B(n);
|
|
9963
|
-
|
|
9971
|
+
H(() => {
|
|
9964
9972
|
b(n);
|
|
9965
9973
|
}, [n]);
|
|
9966
9974
|
const [h, v] = B(r), x = g.at(h), j = h > 0, w = h < g.length - 1;
|
|
9967
|
-
|
|
9975
|
+
H(() => {
|
|
9968
9976
|
e && v(r);
|
|
9969
|
-
}, [r, e]),
|
|
9977
|
+
}, [r, e]), H(() => {
|
|
9970
9978
|
h >= g.length && v(g.length - 1);
|
|
9971
9979
|
}, [g, h]);
|
|
9972
9980
|
const y = P((E) => {
|
|
@@ -9982,8 +9990,8 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
9982
9990
|
break;
|
|
9983
9991
|
}
|
|
9984
9992
|
}, [w, j, t]), D = (E, _) => {
|
|
9985
|
-
const
|
|
9986
|
-
return
|
|
9993
|
+
const A = Array.from(g), [L] = A.splice(E, 1);
|
|
9994
|
+
return A.splice(_, 0, L), A;
|
|
9987
9995
|
}, S = (E) => {
|
|
9988
9996
|
if (!E.destination)
|
|
9989
9997
|
return;
|
|
@@ -10010,13 +10018,13 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10010
10018
|
s && /* @__PURE__ */ a.jsx($s, { accept: ".jpg,.jpeg,.png", onUpload: (E) => {
|
|
10011
10019
|
E.length > 0 && s(Array.from(E));
|
|
10012
10020
|
}, icon: /* @__PURE__ */ a.jsx(Gs, { style: { fontSize: 18 } }), multiple: !0, className: "me-1 me-lg-3", children: i ?? null }),
|
|
10013
|
-
/* @__PURE__ */ a.jsx(Xa, { children: x && (l == null ? void 0 : l.map(({ label: E, onClick: _, ...
|
|
10021
|
+
/* @__PURE__ */ a.jsx(Xa, { children: x && (l == null ? void 0 : l.map(({ label: E, onClick: _, ...A }, L) => /* @__PURE__ */ a.jsx(
|
|
10014
10022
|
Nr,
|
|
10015
10023
|
{
|
|
10016
10024
|
hideOn: "sm",
|
|
10017
10025
|
cKey: `action-${L}`,
|
|
10018
10026
|
onClick: () => _(x.id),
|
|
10019
|
-
...
|
|
10027
|
+
...A,
|
|
10020
10028
|
children: typeof E == "string" ? E : E(x.id)
|
|
10021
10029
|
},
|
|
10022
10030
|
`action-${L}`
|
|
@@ -10031,17 +10039,17 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10031
10039
|
/* @__PURE__ */ a.jsx("div", { role: w ? "button" : void 0, className: I("align-items-end", Ge.navButton, Ge.right), onClick: () => w && v((E) => E + 1), children: w && /* @__PURE__ */ a.jsx(Wa, { style: { fontSize: "40px" } }) })
|
|
10032
10040
|
] }),
|
|
10033
10041
|
/* @__PURE__ */ a.jsx("div", { className: I("d-flex justify-content-center", Ge.photosPreviewContainer), children: /* @__PURE__ */ a.jsx(Fx, { onDragEnd: S, children: /* @__PURE__ */ a.jsx(Hy, { droppableId: "droppable", direction: "horizontal", children: (E) => /* @__PURE__ */ a.jsxs("div", { ...E.droppableProps, ref: E.innerRef, className: Ge.photosPreview, children: [
|
|
10034
|
-
g.map((_,
|
|
10042
|
+
g.map((_, A) => /* @__PURE__ */ a.jsx(_y, { draggableId: _.id, index: A, isDragDisabled: f === void 0, children: m((L) => {
|
|
10035
10043
|
var C;
|
|
10036
|
-
return /* @__PURE__ */ a.jsxs("div", { ref: L.innerRef, ...L.draggableProps, ...L.dragHandleProps, role: "button", onClick: () => v(
|
|
10037
|
-
/* @__PURE__ */ a.jsx(p, { role:
|
|
10038
|
-
[Ge.selected]:
|
|
10044
|
+
return /* @__PURE__ */ a.jsxs("div", { ref: L.innerRef, ...L.draggableProps, ...L.dragHandleProps, role: "button", onClick: () => v(A), className: I(Ge.lightboxDraggablePhoto), children: [
|
|
10045
|
+
/* @__PURE__ */ a.jsx(p, { role: A !== h ? "button" : void 0, src: _.smSrc, alt: _.alt, className: I("rounded", Ge.photo, {
|
|
10046
|
+
[Ge.selected]: A === h
|
|
10039
10047
|
}), baseUrl: c, customToken: u, placeholder: d }, _.id),
|
|
10040
10048
|
_.isDefault || _.customIndicators && _.customIndicators.length > 0 ? /* @__PURE__ */ a.jsxs("div", { className: I(Ge.indicators, "gap-1"), children: [
|
|
10041
10049
|
_.isDefault && /* @__PURE__ */ a.jsx("div", { className: "text-primary", children: /* @__PURE__ */ a.jsx($d, {}) }),
|
|
10042
|
-
(C = _.customIndicators) == null ? void 0 : C.map((T,
|
|
10050
|
+
(C = _.customIndicators) == null ? void 0 : C.map((T, z) => (
|
|
10043
10051
|
// eslint-disable-next-line react/no-array-index-key
|
|
10044
|
-
/* @__PURE__ */ a.jsx("div", { className: T.className, children: T.content },
|
|
10052
|
+
/* @__PURE__ */ a.jsx("div", { className: T.className, children: T.content }, z)
|
|
10045
10053
|
))
|
|
10046
10054
|
] }) : null
|
|
10047
10055
|
] });
|
|
@@ -10052,7 +10060,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10052
10060
|
] });
|
|
10053
10061
|
}, ow = ({ photos: e, onUploadPhotos: t, uploadPhotosText: n, noPhotosText: r, photoActions: i, baseUrl: o, customToken: s, placeholder: l, ImgComponent: c = Hc, noLightboxOnlyButtonOnEmpty: u = !1, hideLightbox: d = !1, onChangeOrder: p }) => {
|
|
10054
10062
|
const [f, m] = B(null), g = f !== null ? e[f] : null, [b, h] = B(!1);
|
|
10055
|
-
return
|
|
10063
|
+
return H(() => {
|
|
10056
10064
|
if (e.length === 0) {
|
|
10057
10065
|
m(null);
|
|
10058
10066
|
return;
|
|
@@ -10091,7 +10099,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10091
10099
|
"type-icon": "_type-icon_z9z4m_28",
|
|
10092
10100
|
typeIcon: pw
|
|
10093
10101
|
}, fw = ({ level: e, children: t, customIcon: n, noIcon: r }) => {
|
|
10094
|
-
const { ProjectIconComponent: i } = V(
|
|
10102
|
+
const { ProjectIconComponent: i } = V(K), o = P(() => {
|
|
10095
10103
|
switch (e) {
|
|
10096
10104
|
case "info":
|
|
10097
10105
|
return /* @__PURE__ */ a.jsx(i, { icon: "info" });
|
|
@@ -10163,7 +10171,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10163
10171
|
s(!1), c(null);
|
|
10164
10172
|
});
|
|
10165
10173
|
}, [i, e]);
|
|
10166
|
-
return
|
|
10174
|
+
return H(() => {
|
|
10167
10175
|
const d = new AbortController();
|
|
10168
10176
|
return u(d.signal), () => {
|
|
10169
10177
|
d.abort();
|
|
@@ -10171,7 +10179,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10171
10179
|
}, [u]), { data: l, setData: c, reloadData: u, isLoading: o };
|
|
10172
10180
|
}, ms = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, renderAsDivBg: o, ...s }) => {
|
|
10173
10181
|
const { data: l } = Sw(e, n, r), [c, u] = B(null);
|
|
10174
|
-
return
|
|
10182
|
+
return H(() => {
|
|
10175
10183
|
let d = null;
|
|
10176
10184
|
return l !== null ? (d = URL.createObjectURL(l), u(d)) : u(null), () => {
|
|
10177
10185
|
d !== null && URL.revokeObjectURL(d);
|
|
@@ -10279,14 +10287,14 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10279
10287
|
}, [n, t]);
|
|
10280
10288
|
return { setFromToProp: r, handleArrowClick: i, handleRangeChange: o };
|
|
10281
10289
|
}, ON = ({ fromtoState: [e, t], className: n, size: r }) => {
|
|
10282
|
-
const { texts: { date: i }, ProjectIconComponent: o } = V(
|
|
10283
|
-
return
|
|
10290
|
+
const { texts: { date: i }, ProjectIconComponent: o } = V(K), [s, l] = B("C"), { handleArrowClick: c, handleRangeChange: u, setFromToProp: d } = Pw(s, l, t), p = k(() => s === "C", [s]), f = re(!0);
|
|
10291
|
+
return H(() => {
|
|
10284
10292
|
if (f.current) {
|
|
10285
10293
|
const m = Ow(e.from, e.to);
|
|
10286
10294
|
l(m), f.current = !1;
|
|
10287
10295
|
}
|
|
10288
10296
|
}, [e.from, e.to]), /* @__PURE__ */ a.jsxs("div", { className: I("d-inline-flex align-items-center gap-1", vs.wrapper, vs[r ?? "md"], n), children: [
|
|
10289
|
-
/* @__PURE__ */ a.jsx(
|
|
10297
|
+
/* @__PURE__ */ a.jsx(te, { disabled: p, onClick: () => {
|
|
10290
10298
|
c(-1);
|
|
10291
10299
|
}, children: /* @__PURE__ */ a.jsx(o, { icon: "chevron-left" }) }),
|
|
10292
10300
|
/* @__PURE__ */ a.jsx("div", { children: /* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
@@ -10294,12 +10302,12 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10294
10302
|
/* @__PURE__ */ a.jsx(Mt, { toggle: /* @__PURE__ */ a.jsx(Ft, { text: i[gs.find((m) => m[0] === s)[1]].substring(0, 1), as: Kd }), children: gs.map((m) => /* @__PURE__ */ a.jsx(Ye, { disabled: m[0] === s, className: I(m[0] === s ? "text-black-50" : ""), onClick: () => u(m[0]), role: "button", children: i[m[1]] }, m[0])) }),
|
|
10295
10303
|
/* @__PURE__ */ a.jsx(rt, { type: "date", value: e.to, onChange: (m) => d("to", m === null ? null : m.toString()), InputContainer: ct, size: r })
|
|
10296
10304
|
] }) }),
|
|
10297
|
-
/* @__PURE__ */ a.jsx(
|
|
10305
|
+
/* @__PURE__ */ a.jsx(te, { disabled: p, onClick: () => {
|
|
10298
10306
|
c(1);
|
|
10299
10307
|
}, children: /* @__PURE__ */ a.jsx(o, { icon: "chevron-right" }) })
|
|
10300
10308
|
] });
|
|
10301
10309
|
}, PN = ({ defaultMonth: e, searchKey: t = "monthFrom", yearMin: n, yearMax: r }) => {
|
|
10302
|
-
const { localizationContext: i } = V(
|
|
10310
|
+
const { localizationContext: i } = V(K), { dateFnsLocale: o } = V(i), { searchParams: s, setSearch: l } = yu(), c = s.get(t), u = c ? pt(c) : e, d = P((p) => {
|
|
10303
10311
|
l(t, dn(p, { representation: "date" }));
|
|
10304
10312
|
}, [t, l]);
|
|
10305
10313
|
return /* @__PURE__ */ a.jsx(Xu, { month: u, onChangeMonth: d, locale: o, yearMin: n, yearMax: r });
|
|
@@ -10309,7 +10317,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10309
10317
|
}, [i]);
|
|
10310
10318
|
return /* @__PURE__ */ a.jsx(Zu, { year: o, onChangeYear: s, ...n });
|
|
10311
10319
|
}, AN = ({ data: e, showLegend: t = !1, legendPosition: n = "left", onClick: r }) => {
|
|
10312
|
-
const { chartColorPalette: i } = V(
|
|
10320
|
+
const { chartColorPalette: i } = V(K);
|
|
10313
10321
|
return /* @__PURE__ */ a.jsx(Xd, { data: e, margin: {
|
|
10314
10322
|
top: 50,
|
|
10315
10323
|
right: t && n === "right" ? 200 : 100,
|
|
@@ -10356,9 +10364,9 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10356
10364
|
] })
|
|
10357
10365
|
] });
|
|
10358
10366
|
}, RN = ({ data: e, xKey: t, yKeys: n, translateKey: r, usePercentageValue: i = !1, variant: o = "default", legendPosition: s, noSort: l = !1, unit: c }) => {
|
|
10359
|
-
const { confirm: u } = St(), { chartColorPalette: d, texts: { chart: p } } = V(
|
|
10360
|
-
var
|
|
10361
|
-
const _ = (
|
|
10367
|
+
const { confirm: u } = St(), { chartColorPalette: d, texts: { chart: p } } = V(K), [f, m] = B(/* @__PURE__ */ new Set()), g = re(null), b = async () => {
|
|
10368
|
+
var A;
|
|
10369
|
+
const _ = (A = g.current) == null ? void 0 : A.querySelector("svg");
|
|
10362
10370
|
if (_ && await u(p.confirmExport)) {
|
|
10363
10371
|
const L = _.cloneNode(!0);
|
|
10364
10372
|
L.setAttribute("fill", "none");
|
|
@@ -10368,39 +10376,39 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10368
10376
|
}), "graf.svg");
|
|
10369
10377
|
}
|
|
10370
10378
|
}, h = (_) => {
|
|
10371
|
-
m((
|
|
10372
|
-
const L = new Set(
|
|
10379
|
+
m((A) => {
|
|
10380
|
+
const L = new Set(A);
|
|
10373
10381
|
return L.has(_.id) ? L.delete(_.id) : L.add(_.id), L;
|
|
10374
10382
|
});
|
|
10375
|
-
}, v = k(() => l ? e : e.toSorted((_,
|
|
10383
|
+
}, v = k(() => l ? e : e.toSorted((_, A) => {
|
|
10376
10384
|
var L;
|
|
10377
|
-
return typeof
|
|
10385
|
+
return typeof A[t] == "number" && typeof _[t] == "number" ? _[t] - A[t] : (_[t] ?? "").toString().localeCompare(((L = A[t]) == null ? void 0 : L.toString()) ?? "");
|
|
10378
10386
|
}), [e, l, t]), x = k(() => {
|
|
10379
10387
|
const _ = [];
|
|
10380
|
-
return n.forEach((
|
|
10388
|
+
return n.forEach((A) => {
|
|
10381
10389
|
if (i) {
|
|
10382
|
-
const L = Math.max(...v.map((T) => T[
|
|
10390
|
+
const L = Math.max(...v.map((T) => T[A.key] ?? -1 / 0));
|
|
10383
10391
|
if (L === -1 / 0)
|
|
10384
10392
|
return;
|
|
10385
10393
|
const C = [];
|
|
10386
10394
|
v.forEach((T) => {
|
|
10387
|
-
T[
|
|
10395
|
+
T[A.key] != null && C.push({ x: T[t], y: L === 0 ? 0 : T[A.key] / L });
|
|
10388
10396
|
}), _.push({
|
|
10389
|
-
id:
|
|
10397
|
+
id: A.key,
|
|
10390
10398
|
data: C
|
|
10391
10399
|
});
|
|
10392
10400
|
} else
|
|
10393
10401
|
_.push({
|
|
10394
|
-
id:
|
|
10395
|
-
data: v.map((L) => ({ x: L[t], y: L[
|
|
10402
|
+
id: A.key,
|
|
10403
|
+
data: v.map((L) => ({ x: L[t], y: L[A.key] }))
|
|
10396
10404
|
});
|
|
10397
10405
|
}), _;
|
|
10398
10406
|
}, [v, i, t, n]), j = P((_) => {
|
|
10399
|
-
var
|
|
10400
|
-
return /* @__PURE__ */ a.jsx(Tw, { data: v, translateKey: r, val: _, unit: ((
|
|
10407
|
+
var A;
|
|
10408
|
+
return /* @__PURE__ */ a.jsx(Tw, { data: v, translateKey: r, val: _, unit: ((A = n.find((L) => {
|
|
10401
10409
|
var C;
|
|
10402
10410
|
return L.key === ((C = _.point) == null ? void 0 : C.serieId);
|
|
10403
|
-
})) == null ? void 0 :
|
|
10411
|
+
})) == null ? void 0 : A.unit) ?? c ?? void 0 });
|
|
10404
10412
|
}, [v, r, c, n]), w = k(() => Math.min(...e.map((_) => _[t] ?? 1 / 0)), [e, t]), y = k(() => Math.max(...e.map((_) => _[t] ?? -1 / 0)), [e, t]), D = k(() => {
|
|
10405
10413
|
var _;
|
|
10406
10414
|
return typeof ((_ = e == null ? void 0 : e[0]) == null ? void 0 : _[t]);
|
|
@@ -10418,10 +10426,10 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10418
10426
|
tickValues: o === "sideContent" ? E : void 0
|
|
10419
10427
|
}, gridYValues: o === "sideContent" ? [0] : void 0, legends: S !== "none" ? [
|
|
10420
10428
|
{
|
|
10421
|
-
data: n.map((_,
|
|
10429
|
+
data: n.map((_, A) => ({
|
|
10422
10430
|
id: _.key,
|
|
10423
10431
|
label: r(_.key),
|
|
10424
|
-
color: d == null ? void 0 : d[
|
|
10432
|
+
color: d == null ? void 0 : d[A],
|
|
10425
10433
|
hidden: f.has(_.key)
|
|
10426
10434
|
})),
|
|
10427
10435
|
onClick: h,
|
|
@@ -10527,7 +10535,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10527
10535
|
specialOption: Xw
|
|
10528
10536
|
}, bs = 10, xs = ({ value: e, field: t, disabled: n, valuesForSelect: r, onChangeHandler: i, separator: o }) => {
|
|
10529
10537
|
var h, v, x, j;
|
|
10530
|
-
const { texts: { dynamicForms: s } } = V(
|
|
10538
|
+
const { texts: { dynamicForms: s } } = V(K), [l, c] = B("");
|
|
10531
10539
|
r == null || r.sort((w, y) => (w.name ?? "").localeCompare(y.name ?? ""));
|
|
10532
10540
|
const u = k(() => {
|
|
10533
10541
|
var w;
|
|
@@ -10555,9 +10563,9 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10555
10563
|
});
|
|
10556
10564
|
}), w;
|
|
10557
10565
|
}, [r, s, o]), f = re(null), m = re(null), [g, b] = B(!1);
|
|
10558
|
-
return
|
|
10566
|
+
return H(() => {
|
|
10559
10567
|
g && m.current && m.current.focus();
|
|
10560
|
-
}, [g]),
|
|
10568
|
+
}, [g]), H(() => {
|
|
10561
10569
|
p.length < bs && c("");
|
|
10562
10570
|
}, [p]), /* @__PURE__ */ a.jsxs(In, { autoClose: "outside", onToggle: (w) => b(w), children: [
|
|
10563
10571
|
/* @__PURE__ */ a.jsx(In.Toggle, { variant: "light", ref: f, id: `multiselect-${t}`, size: "sm", className: I("bg-white border", on.multiselect), onKeyDown: (w) => {
|
|
@@ -10611,7 +10619,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10611
10619
|
}
|
|
10612
10620
|
}
|
|
10613
10621
|
}, Qw = ({ schema: e, columns: t, setColumns: n, initialItem: r, onEdit: i, onDelete: o, customPickers: s, appDetail: l }) => {
|
|
10614
|
-
const { ProjectIconComponent: c } = V(
|
|
10622
|
+
const { ProjectIconComponent: c } = V(K), [u, d] = B(r), p = P((g, b) => {
|
|
10615
10623
|
console.log("changeValue", g, b), d((h) => ({
|
|
10616
10624
|
...h,
|
|
10617
10625
|
[g]: {
|
|
@@ -10620,10 +10628,10 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10620
10628
|
}
|
|
10621
10629
|
}));
|
|
10622
10630
|
}, []), f = (g) => (g == null ? void 0 : g.value) !== (g == null ? void 0 : g.defaultValue), m = P(() => Object.keys(u).some((g) => f(u[g])), [u]);
|
|
10623
|
-
return
|
|
10631
|
+
return H(() => {
|
|
10624
10632
|
d(r);
|
|
10625
10633
|
}, [r]), /* @__PURE__ */ a.jsxs("tr", { className: I("table-row", De.tableRow), children: [
|
|
10626
|
-
e.userCanModify && /* @__PURE__ */ a.jsx("td", { className: I("table-cell", De.tableCell, De.stickyFirst), children: m() && /* @__PURE__ */ a.jsx(
|
|
10634
|
+
e.userCanModify && /* @__PURE__ */ a.jsx("td", { className: I("table-cell", De.tableCell, De.stickyFirst), children: m() && /* @__PURE__ */ a.jsx(te, { color: "success", onClick: () => i(Wc(u)), children: /* @__PURE__ */ a.jsx(c, { icon: "check" }) }) }),
|
|
10627
10635
|
t.map((g) => {
|
|
10628
10636
|
var b, h;
|
|
10629
10637
|
return /* @__PURE__ */ a.jsx("td", { className: I("table-cell", De.tableCell), children: /* @__PURE__ */ a.jsx(zc, { type: g.type, value: (b = u[g.field ?? ""]) == null ? void 0 : b.value, field: g.field, isReadonly: g.readOnly, isPrimary: e.primaryKey === g.field, valuesForSelect: g.valuesForSelect, addValueToValuesForSelect: (v) => {
|
|
@@ -10633,16 +10641,16 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10633
10641
|
/* @__PURE__ */ a.jsxs("td", { className: I("table-cell d-flex gap-1", De.tableCell, De.stickyLast), children: [
|
|
10634
10642
|
e != null && e.slaves && e.slaves.length > 0 ? e.slaves.map((g, b) => {
|
|
10635
10643
|
var h, v;
|
|
10636
|
-
return /* @__PURE__ */ a.jsx(
|
|
10644
|
+
return /* @__PURE__ */ a.jsx(te, { as: "link", href: `${gn(l, { id: (h = g.id) == null ? void 0 : h.toString() })}?type=dynamic-form&masterId=${(v = u.id) == null ? void 0 : v.value}`, children: /* @__PURE__ */ a.jsx(ze, { text: g.name ?? "", placement: "left", children: /* @__PURE__ */ a.jsx("div", { children: /* @__PURE__ */ a.jsxs(M, { variant: "body", className: "d-flex align-items-center text-primary", children: [
|
|
10637
10645
|
e.slaves.length > 1 ? /* @__PURE__ */ a.jsx(M, { variant: "caption", className: "text-primary", children: b + 1 }) : null,
|
|
10638
10646
|
/* @__PURE__ */ a.jsx(Us, {})
|
|
10639
10647
|
] }) }) }) }, g.id);
|
|
10640
10648
|
}) : null,
|
|
10641
|
-
e.userCanModify && /* @__PURE__ */ a.jsx(
|
|
10649
|
+
e.userCanModify && /* @__PURE__ */ a.jsx(te, { color: "danger", onClick: () => o(u[e.primaryKey ?? ""].value), children: /* @__PURE__ */ a.jsx(c, { icon: "delete" }) })
|
|
10642
10650
|
] })
|
|
10643
10651
|
] });
|
|
10644
10652
|
}, Jw = ({ schema: e, columns: t, setColumns: n, onCreate: r, customPickers: i }) => {
|
|
10645
|
-
const { ProjectIconComponent: o } = V(
|
|
10653
|
+
const { ProjectIconComponent: o } = V(K), [s, l] = B(null), c = P(() => {
|
|
10646
10654
|
var p;
|
|
10647
10655
|
const d = {};
|
|
10648
10656
|
(p = e.columns) == null || p.forEach((f) => {
|
|
@@ -10662,16 +10670,16 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10662
10670
|
});
|
|
10663
10671
|
}, []);
|
|
10664
10672
|
return s ? /* @__PURE__ */ a.jsxs("tr", { className: "sticky-bottom shadow", children: [
|
|
10665
|
-
e.userCanModify && /* @__PURE__ */ a.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ a.jsx(
|
|
10673
|
+
e.userCanModify && /* @__PURE__ */ a.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ a.jsx(te, { color: "success", onClick: async () => {
|
|
10666
10674
|
const d = Wc(s);
|
|
10667
10675
|
d && await r(d) && l(null);
|
|
10668
10676
|
}, children: /* @__PURE__ */ a.jsx(o, { icon: "check" }) }) }),
|
|
10669
10677
|
t.map((d) => /* @__PURE__ */ a.jsx("td", { children: /* @__PURE__ */ a.jsx(zc, { type: d.type, value: s[d.field ?? ""].value, field: d.field, isReadonly: d.readOnly, isPrimary: e.primaryKey === d.field, valuesForSelect: d.valuesForSelect, addValueToValuesForSelect: (p) => {
|
|
10670
10678
|
n(t.map((f) => f.field === d.field ? { ...f, valuesForSelect: [...f.valuesForSelect ?? [], p] } : f));
|
|
10671
10679
|
}, onChangeHandler: u, primaryEditable: !0, customPickers: i, isMultiChoice: d.multiChoice ?? !1, multiChoiceSeparator: d.multiChoiceSeparator ?? null, disabled: !e.userCanModify }) }, `${e.id}-${d.field}`)),
|
|
10672
|
-
e.userCanModify && /* @__PURE__ */ a.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ a.jsx(
|
|
10680
|
+
e.userCanModify && /* @__PURE__ */ a.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ a.jsx(te, { color: "danger", onClick: () => l(null), children: /* @__PURE__ */ a.jsx(o, { icon: "cancel" }) }) })
|
|
10673
10681
|
] }) : e.userCanModify && /* @__PURE__ */ a.jsxs("tr", { className: "sticky-bottom shadow", children: [
|
|
10674
|
-
/* @__PURE__ */ a.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ a.jsx(
|
|
10682
|
+
/* @__PURE__ */ a.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ a.jsx(te, { onClick: c, children: /* @__PURE__ */ a.jsx(o, { icon: "add" }) }) }),
|
|
10675
10683
|
/* @__PURE__ */ a.jsx("td", { colSpan: t.length + 1 })
|
|
10676
10684
|
] });
|
|
10677
10685
|
}, Zw = "_resizer_ref0b_1", ej = "_content_ref0b_11", tj = "_dragging_ref0b_16", vr = {
|
|
@@ -10680,9 +10688,9 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10680
10688
|
dragging: tj
|
|
10681
10689
|
}, nj = ({ cellRef: e, defaultWidth: t }) => {
|
|
10682
10690
|
const [n, r] = B(t), [, i] = B(null);
|
|
10683
|
-
return
|
|
10691
|
+
return H(() => {
|
|
10684
10692
|
r(t);
|
|
10685
|
-
}, [t]),
|
|
10693
|
+
}, [t]), H(() => {
|
|
10686
10694
|
e.current && (e.current.style.minWidth = `${n}px`);
|
|
10687
10695
|
}, [n, e]), /* @__PURE__ */ a.jsx("div", { className: I("luminus-column-resizer", vr.resizer), draggable: !0, onDragStart: (o) => {
|
|
10688
10696
|
i(o.currentTarget.getBoundingClientRect().x), o.currentTarget.classList.add(vr.dragging);
|
|
@@ -10692,13 +10700,13 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10692
10700
|
i(null), o.currentTarget.classList.remove(vr.dragging);
|
|
10693
10701
|
}, children: /* @__PURE__ */ a.jsx("div", { className: I("content", vr.content) }) });
|
|
10694
10702
|
}, rj = ({ column: e, children: t }) => {
|
|
10695
|
-
const { ProjectIconComponent: n } = V(
|
|
10703
|
+
const { ProjectIconComponent: n } = V(K);
|
|
10696
10704
|
return e.description ? /* @__PURE__ */ a.jsx(ze, { placement: "bottom", text: e.description ?? "", children: /* @__PURE__ */ a.jsxs("div", { className: "d-flex justify-content-between", children: [
|
|
10697
10705
|
t,
|
|
10698
10706
|
/* @__PURE__ */ a.jsx(n, { icon: "info" })
|
|
10699
10707
|
] }) }) : /* @__PURE__ */ a.jsx(a.Fragment, { children: t });
|
|
10700
10708
|
}, aj = ({ column: e, sortByField: t, sortByType: n, setSortBy: r }) => {
|
|
10701
|
-
const { ProjectIconComponent: i } = V(
|
|
10709
|
+
const { ProjectIconComponent: i } = V(K), o = re(null), s = k(() => {
|
|
10702
10710
|
if (e.valuesForSelect && e.valuesForSelect.length > 0)
|
|
10703
10711
|
return 200;
|
|
10704
10712
|
switch (e.type) {
|
|
@@ -10733,8 +10741,8 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10733
10741
|
/* @__PURE__ */ a.jsx(nj, { cellRef: o, defaultWidth: s })
|
|
10734
10742
|
] });
|
|
10735
10743
|
}, ij = ({ schema: e, items: t, onEditItem: n, onDeleteItem: r, onCreateItem: i, filters: o, setFilter: s, sortByField: l, sortByType: c, setSortBy: u, selectedMaster: d, customPickers: p, appDetail: f }) => {
|
|
10736
|
-
const { texts: { dynamicForms: m } } = V(
|
|
10737
|
-
return
|
|
10744
|
+
const { texts: { dynamicForms: m } } = V(K), [g, b] = B([]);
|
|
10745
|
+
return H(() => {
|
|
10738
10746
|
var h, v, x;
|
|
10739
10747
|
b([
|
|
10740
10748
|
...((x = (v = (h = e.columns) == null ? void 0 : h.filter((j) => !j.hidden)) == null ? void 0 : v.filter((j) => e.masterReference ? j.field !== e.masterReferenceColumn : !0)) == null ? void 0 : x.map((j) => {
|
|
@@ -10786,74 +10794,74 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10786
10794
|
apiExportGet: "/dynamicForms/export"
|
|
10787
10795
|
}, kN = ({ id: e, page: t, setPage: n, filters: r, setFilter: i, sortByField: o, sortByType: s, setSortBy: l, appUrls: { appDetail: c = ws.appDetail } = ws, apiUrls: { apiSchemaGet: u = Wt.apiSchemaGet, apiDataGet: d = Wt.apiDataGet, apiItemPost: p = Wt.apiItemPost, apiItemDelete: f = Wt.apiItemDelete, apiItemCreate: m = Wt.apiItemCreate, apiExportGet: g = Wt.apiExportGet } = Wt, customPickers: b }) => {
|
|
10788
10796
|
var Ve, ot, st, rn, Bi, Li, Mi;
|
|
10789
|
-
const { texts: { dynamicForms: h }, ProjectIconComponent: v } = V(
|
|
10790
|
-
|
|
10797
|
+
const { texts: { dynamicForms: h }, ProjectIconComponent: v } = V(K), x = Ke(), { startLoading: j, stopLoading: w } = V(bt), [y, D] = B(null), [S, O] = B(null), [E, _] = B(null), [A, L] = B(null), [C, T] = B(!1), { addNotification: z } = en(), [$, F] = B([]), { confirm: q } = St(), W = 20, R = W + 1, U = A ? Math.ceil(A.length / W) : 1, X = t ? t > 1 : !1, ee = t ? t < U : !1, se = t ? (t - 1) * W : 0, we = t ? t * W : W, oe = k(() => A ? A.length > R : !1, [A, R]), Q = k(() => oe ? (A == null ? void 0 : A.slice(se, we)) ?? null : A ?? null, [oe, A, se, we]), [le, Ce] = Xt("masterId", null, "string"), [me, J] = B(le);
|
|
10798
|
+
H(() => {
|
|
10791
10799
|
D(null), O(null), T(!1), F([]);
|
|
10792
|
-
}, [e]),
|
|
10793
|
-
|
|
10794
|
-
}, [
|
|
10800
|
+
}, [e]), H(() => {
|
|
10801
|
+
le !== null && (J(le), Ce(null));
|
|
10802
|
+
}, [le, e, Ce]);
|
|
10795
10803
|
const ne = P(async () => {
|
|
10796
|
-
j("dynamicFormSchema"), await x.get(`${u}?id=${e}`).then(({ data:
|
|
10797
|
-
D(
|
|
10804
|
+
j("dynamicFormSchema"), await x.get(`${u}?id=${e}`).then(({ data: ce }) => {
|
|
10805
|
+
D(ce), w("dynamicFormSchema");
|
|
10798
10806
|
}).catch(() => w("dynamicFormSchema"));
|
|
10799
|
-
}, [x, e, j, w, u]),
|
|
10800
|
-
var
|
|
10801
|
-
if (!(y === null || ((
|
|
10807
|
+
}, [x, e, j, w, u]), pe = P(async () => {
|
|
10808
|
+
var ce;
|
|
10809
|
+
if (!(y === null || ((ce = y.id) == null ? void 0 : ce.toString()) !== e)) {
|
|
10802
10810
|
if (y.masterReference && !me) {
|
|
10803
10811
|
O([]);
|
|
10804
10812
|
return;
|
|
10805
10813
|
}
|
|
10806
10814
|
j("dynamicFormData"), await x.get(`${d}?id=${e}&showArchive=${C}${y.masterReference ? `&master=${me}` : ""}`).then(({ data: xe }) => {
|
|
10807
|
-
const
|
|
10815
|
+
const Ee = xe.map((ye) => {
|
|
10808
10816
|
var Oe;
|
|
10809
10817
|
return Object.fromEntries(((Oe = y.columns) == null ? void 0 : Oe.filter((ke) => ke.field).map((ke) => [
|
|
10810
10818
|
ke.field,
|
|
10811
10819
|
{ value: ye[ke.field ?? ""], defaultValue: ye[ke.field ?? ""] }
|
|
10812
10820
|
])) ?? []);
|
|
10813
10821
|
});
|
|
10814
|
-
O(
|
|
10822
|
+
O(Ee), w("dynamicFormData");
|
|
10815
10823
|
}).catch(() => w("dynamicFormData"));
|
|
10816
10824
|
}
|
|
10817
10825
|
}, [x, e, y, j, w, C, me, d]), Pe = P(async () => {
|
|
10818
|
-
var
|
|
10819
|
-
y === null || ((
|
|
10826
|
+
var ce;
|
|
10827
|
+
y === null || ((ce = y.id) == null ? void 0 : ce.toString()) !== e || y.masterReference && !me || (j("dynamicFormExport"), await x.get(`${g}?id=${e}&showArchive=${C}${y.masterReference ? `&master=${me}` : ""}`, {
|
|
10820
10828
|
responseType: "blob"
|
|
10821
10829
|
}).then((xe) => Zd(xe, { fallbackName: `export-${e}` })).finally(() => w("dynamicFormExport")));
|
|
10822
|
-
}, [x, e, y, j, w, C, me, g]), Ze = P(async (
|
|
10823
|
-
y && await Ze(y.masterReference ? { ...
|
|
10830
|
+
}, [x, e, y, j, w, C, me, g]), Ze = P(async (ce) => (j("dynamicFormEdit"), x.post(`${p}?id=${e}`, ce).then(() => (w("dynamicFormEdit"), F([]), !0)).catch((xe) => (w("dynamicFormEdit"), F(Xr(xe)), !1))), [x, e, j, w, p]), xt = P(async (ce) => (j("dynamicFormDelete"), x.delete(`${f}?id=${e}&pk=${ce}`).then(() => (w("dynamicFormDelete"), F([]), !0)).catch((xe) => (w("dynamicFormDelete"), F(Xr(xe)), !1))), [x, e, j, w, f]), Y = P(async (ce) => (j("dynamicFormCreate"), x.post(`${m}?id=${e}`, ce).then(({ data: xe }) => (w("dynamicFormCreate"), F([]), xe)).catch((xe) => (w("dynamicFormCreate"), F(Xr(xe)), null))), [x, e, j, w, m]), G = P(async (ce) => {
|
|
10831
|
+
y && await Ze(y.masterReference ? { ...ce, [y.masterReferenceColumn ?? ""]: me } : ce) && (z(h.editSuccess, "success"), O((xe) => xe && xe.map((Ee) => {
|
|
10824
10832
|
var ye;
|
|
10825
|
-
return ((ye =
|
|
10833
|
+
return ((ye = Ee[(y == null ? void 0 : y.primaryKey) ?? ""]) == null ? void 0 : ye.value) === ce[(y == null ? void 0 : y.primaryKey) ?? ""] ? hs(ce, y) : Ee;
|
|
10826
10834
|
})));
|
|
10827
|
-
}, [
|
|
10828
|
-
await q(h.deleteConfirm) && await xt(
|
|
10835
|
+
}, [z, Ze, y, me, h]), ae = P(async (ce) => {
|
|
10836
|
+
await q(h.deleteConfirm) && await xt(ce) && (z(h.deleteSuccess, "success"), O((xe) => xe && xe.filter((Ee) => {
|
|
10829
10837
|
var ye;
|
|
10830
|
-
return ((ye =
|
|
10838
|
+
return ((ye = Ee[(y == null ? void 0 : y.primaryKey) ?? ""]) == null ? void 0 : ye.value) !== ce;
|
|
10831
10839
|
})));
|
|
10832
|
-
}, [
|
|
10840
|
+
}, [z, xt, h, q, y]), ge = P(async (ce) => {
|
|
10833
10841
|
if (!y)
|
|
10834
10842
|
return !1;
|
|
10835
|
-
const xe = await
|
|
10843
|
+
const xe = await Y(y.masterReference ? { ...ce, [y.masterReferenceColumn ?? ""]: me } : ce);
|
|
10836
10844
|
if (xe !== null) {
|
|
10837
|
-
|
|
10838
|
-
const
|
|
10839
|
-
return
|
|
10845
|
+
z(h.createSuccess, "success");
|
|
10846
|
+
const Ee = hs(ce, y);
|
|
10847
|
+
return Ee[(y == null ? void 0 : y.primaryKey) ?? ""] = { value: xe, defaultValue: xe }, O((ye) => [...ye ?? [], Ee]), !0;
|
|
10840
10848
|
}
|
|
10841
10849
|
return !1;
|
|
10842
|
-
}, [
|
|
10843
|
-
|
|
10850
|
+
}, [z, Y, h, y, me]), Ie = (ce) => {
|
|
10851
|
+
ce > U ? n(U) : ce < 1 && n(1), n(ce);
|
|
10844
10852
|
}, be = P(() => {
|
|
10845
10853
|
if (!S || !y) {
|
|
10846
10854
|
_(null);
|
|
10847
10855
|
return;
|
|
10848
10856
|
}
|
|
10849
|
-
const
|
|
10857
|
+
const ce = S.filter((xe) => Object.entries(r).every(([Ee, ye]) => {
|
|
10850
10858
|
var Dn, Sn, Cn;
|
|
10851
10859
|
if (ye === null)
|
|
10852
10860
|
return !0;
|
|
10853
|
-
const Oe = (Dn = xe[
|
|
10861
|
+
const Oe = (Dn = xe[Ee]) == null ? void 0 : Dn.value;
|
|
10854
10862
|
if (Oe == null)
|
|
10855
10863
|
return !1;
|
|
10856
|
-
const ke = (Sn = y.columns) == null ? void 0 : Sn.find((ir) => ir.field ===
|
|
10864
|
+
const ke = (Sn = y.columns) == null ? void 0 : Sn.find((ir) => ir.field === Ee), jn = ke == null ? void 0 : ke.type, Nn = (ke == null ? void 0 : ke.values) && ((Cn = ke == null ? void 0 : ke.values) == null ? void 0 : Cn.length) > 0;
|
|
10857
10865
|
if (!jn)
|
|
10858
10866
|
return !1;
|
|
10859
10867
|
switch (jn) {
|
|
@@ -10869,8 +10877,8 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10869
10877
|
return Oe.toString().toLowerCase().includes(ye.toLowerCase());
|
|
10870
10878
|
}
|
|
10871
10879
|
}));
|
|
10872
|
-
_(
|
|
10873
|
-
}, [S, r, y]),
|
|
10880
|
+
_(ce);
|
|
10881
|
+
}, [S, r, y]), fe = P(() => {
|
|
10874
10882
|
if (!E || !y) {
|
|
10875
10883
|
L([]);
|
|
10876
10884
|
return;
|
|
@@ -10879,19 +10887,19 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10879
10887
|
L(E);
|
|
10880
10888
|
return;
|
|
10881
10889
|
}
|
|
10882
|
-
L([...E].sort((
|
|
10890
|
+
L([...E].sort((ce, xe) => {
|
|
10883
10891
|
var jn, Nn, Dn, Sn, Cn, ir;
|
|
10884
|
-
const
|
|
10885
|
-
if (!Oe || !ke || !
|
|
10892
|
+
const Ee = ((Nn = (jn = ce[o]) == null ? void 0 : jn.value) == null ? void 0 : Nn.toString()) ?? "", ye = ((Sn = (Dn = xe[o]) == null ? void 0 : Dn.value) == null ? void 0 : Sn.toString()) ?? "", Oe = y.columns.find((gt) => gt.field === o), ke = Oe == null ? void 0 : Oe.type;
|
|
10893
|
+
if (!Oe || !ke || !Ee && !ye)
|
|
10886
10894
|
return 0;
|
|
10887
|
-
if (!
|
|
10895
|
+
if (!Ee)
|
|
10888
10896
|
return 1;
|
|
10889
10897
|
if (!ye)
|
|
10890
10898
|
return -1;
|
|
10891
10899
|
if (Oe.values && Oe.values.length > 0) {
|
|
10892
10900
|
const gt = ((Cn = Oe.values.find((Kr) => {
|
|
10893
10901
|
var En;
|
|
10894
|
-
return ((En = Kr.id) == null ? void 0 : En.toString()) ===
|
|
10902
|
+
return ((En = Kr.id) == null ? void 0 : En.toString()) === Ee;
|
|
10895
10903
|
})) == null ? void 0 : Cn.name) ?? "", Et = ((ir = Oe.values.find((Kr) => {
|
|
10896
10904
|
var En;
|
|
10897
10905
|
return ((En = Kr.id) == null ? void 0 : En.toString()) === ye;
|
|
@@ -10899,44 +10907,44 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10899
10907
|
return s === "asc" ? gt.localeCompare(Et) : Et.localeCompare(gt);
|
|
10900
10908
|
}
|
|
10901
10909
|
if (ke === "NUM") {
|
|
10902
|
-
const gt = Number(
|
|
10910
|
+
const gt = Number(Ee), Et = Number(ye);
|
|
10903
10911
|
return s === "asc" ? gt - Et : Et - gt;
|
|
10904
10912
|
}
|
|
10905
10913
|
if (ke === "DT") {
|
|
10906
|
-
const gt = pt(
|
|
10914
|
+
const gt = pt(Ee == null ? void 0 : Ee.toString()).getTime(), Et = pt(ye == null ? void 0 : ye.toString()).getTime();
|
|
10907
10915
|
return s === "asc" ? gt - Et : Et - gt;
|
|
10908
10916
|
}
|
|
10909
|
-
return s === "asc" ?
|
|
10917
|
+
return s === "asc" ? Ee.toString().localeCompare(ye.toString()) : ye.toString().localeCompare(Ee.toString());
|
|
10910
10918
|
}));
|
|
10911
10919
|
}, [E, y, o, s]);
|
|
10912
|
-
return
|
|
10920
|
+
return H(() => {
|
|
10913
10921
|
ne();
|
|
10914
|
-
}, [ne]),
|
|
10915
|
-
ue();
|
|
10916
|
-
}, [ue]), U(() => {
|
|
10917
|
-
be();
|
|
10918
|
-
}, [be]), U(() => {
|
|
10922
|
+
}, [ne]), H(() => {
|
|
10919
10923
|
pe();
|
|
10920
|
-
}, [pe]),
|
|
10921
|
-
|
|
10922
|
-
}, [
|
|
10923
|
-
|
|
10924
|
-
}, [
|
|
10924
|
+
}, [pe]), H(() => {
|
|
10925
|
+
be();
|
|
10926
|
+
}, [be]), H(() => {
|
|
10927
|
+
fe();
|
|
10928
|
+
}, [fe]), H(() => {
|
|
10929
|
+
oe ? t || n(1) : A && n(null);
|
|
10930
|
+
}, [A, oe, t, n]), H(() => {
|
|
10931
|
+
!oe || !t || (t > U && n(U), t < 1 && n(1));
|
|
10932
|
+
}, [t, oe, U, n]), /* @__PURE__ */ a.jsxs("div", { className: "h-100 w-100 d-flex flex-column", children: [
|
|
10925
10933
|
/* @__PURE__ */ a.jsxs("div", { className: "mb-3 d-flex justify-content-between align-items-start", children: [
|
|
10926
10934
|
/* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-center gap-3", children: [
|
|
10927
10935
|
/* @__PURE__ */ a.jsx(M, { variant: "h3", children: (y == null ? void 0 : y.name) ?? "" }),
|
|
10928
|
-
(y == null ? void 0 : y.masterReference) && /* @__PURE__ */ a.jsx(oj, { label: ((ot = (Ve = y.columns) == null ? void 0 : Ve.find((
|
|
10936
|
+
(y == null ? void 0 : y.masterReference) && /* @__PURE__ */ a.jsx(oj, { label: ((ot = (Ve = y.columns) == null ? void 0 : Ve.find((ce) => ce.field === y.masterReferenceColumn)) == null ? void 0 : ot.caption) ?? "", options: ((rn = (st = y.columns) == null ? void 0 : st.find((ce) => ce.field === y.masterReferenceColumn)) == null ? void 0 : rn.values) ?? [], master: me, onChange: (ce) => J(ce) })
|
|
10929
10937
|
] }),
|
|
10930
10938
|
/* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
10931
|
-
(Bi = y == null ? void 0 : y.slaves) == null ? void 0 : Bi.map((
|
|
10932
|
-
var
|
|
10933
|
-
return /* @__PURE__ */ a.jsxs(dt, { as: "link", href: `${gn(c, { id: (
|
|
10939
|
+
(Bi = y == null ? void 0 : y.slaves) == null ? void 0 : Bi.map((ce, xe) => {
|
|
10940
|
+
var Ee;
|
|
10941
|
+
return /* @__PURE__ */ a.jsxs(dt, { as: "link", href: `${gn(c, { id: (Ee = ce.id) == null ? void 0 : Ee.toString() })}?type=dynamic-form`, children: [
|
|
10934
10942
|
/* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-center", children: [
|
|
10935
10943
|
y.slaves.length > 1 ? /* @__PURE__ */ a.jsx(M, { variant: "caption", className: "text-primary", children: xe + 1 }) : null,
|
|
10936
10944
|
/* @__PURE__ */ a.jsx(Us, {})
|
|
10937
10945
|
] }),
|
|
10938
|
-
|
|
10939
|
-
] },
|
|
10946
|
+
ce.name
|
|
10947
|
+
] }, ce.id);
|
|
10940
10948
|
}),
|
|
10941
10949
|
/* @__PURE__ */ a.jsxs(Mt, { toggle: /* @__PURE__ */ a.jsx(Ft, { as: tn }), children: [
|
|
10942
10950
|
/* @__PURE__ */ a.jsx(Ye, { onClick: () => T(!C), children: C ? h.hideArchived : h.showArchived }),
|
|
@@ -10946,16 +10954,16 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10946
10954
|
] })
|
|
10947
10955
|
] }),
|
|
10948
10956
|
(y == null ? void 0 : y.description) && /* @__PURE__ */ a.jsx(M, { variant: "body2", className: "mb-3", children: y == null ? void 0 : y.description }),
|
|
10949
|
-
y != null && y.masterReference && !me ? /* @__PURE__ */ a.jsx(it, { variant: "warning", children: h.selectMaster(((Mi = (Li = y.columns) == null ? void 0 : Li.find((
|
|
10957
|
+
y != null && y.masterReference && !me ? /* @__PURE__ */ a.jsx(it, { variant: "warning", children: h.selectMaster(((Mi = (Li = y.columns) == null ? void 0 : Li.find((ce) => ce.field === y.masterReferenceColumn)) == null ? void 0 : Mi.caption) ?? "").toLowerCase() }) : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
10950
10958
|
y && $.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "mb-2", children: /* @__PURE__ */ a.jsx(Aw, { errors: $, schema: y }) }),
|
|
10951
10959
|
y && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
10952
|
-
/* @__PURE__ */ a.jsx("div", { className: I("rounded border overflow-auto", ys.tableContainer), children: /* @__PURE__ */ a.jsx(ij, { schema: y, items: !
|
|
10953
|
-
|
|
10960
|
+
/* @__PURE__ */ a.jsx("div", { className: I("rounded border overflow-auto", ys.tableContainer), children: /* @__PURE__ */ a.jsx(ij, { schema: y, items: !oe && A && (A == null ? void 0 : A.length) > R ? [] : (oe ? Q : A) ?? [], onEditItem: G, onDeleteItem: ae, onCreateItem: ge, filters: r, setFilter: i, sortByField: o, sortByType: s, setSortBy: l, selectedMaster: (me == null ? void 0 : me.toString()) ?? null, customPickers: b, appDetail: c }) }),
|
|
10961
|
+
oe && t && /* @__PURE__ */ a.jsxs("div", { className: I(ys.pagination, "d-flex align-items-center gap-3 p-1 border-bottom border-start border-end rounded"), children: [
|
|
10954
10962
|
/* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
10955
|
-
/* @__PURE__ */ a.jsx(
|
|
10956
|
-
/* @__PURE__ */ a.jsx(
|
|
10957
|
-
/* @__PURE__ */ a.jsx(
|
|
10958
|
-
/* @__PURE__ */ a.jsx(
|
|
10963
|
+
/* @__PURE__ */ a.jsx(te, { color: "primary", onClick: () => Ie(1), disabled: !X, children: /* @__PURE__ */ a.jsx(v, { icon: "chevron-double-left" }) }),
|
|
10964
|
+
/* @__PURE__ */ a.jsx(te, { color: "primary", onClick: () => Ie(t - 1), disabled: !X, children: /* @__PURE__ */ a.jsx(v, { icon: "chevron-left" }) }),
|
|
10965
|
+
/* @__PURE__ */ a.jsx(te, { color: "primary", onClick: () => Ie(t + 1), disabled: !ee, children: /* @__PURE__ */ a.jsx(v, { icon: "chevron-right" }) }),
|
|
10966
|
+
/* @__PURE__ */ a.jsx(te, { color: "primary", onClick: () => Ie(U), disabled: !ee, children: /* @__PURE__ */ a.jsx(v, { icon: "chevron-double-right" }) })
|
|
10959
10967
|
] }),
|
|
10960
10968
|
/* @__PURE__ */ a.jsxs(M, { variant: "body", children: [
|
|
10961
10969
|
h.tablePage,
|
|
@@ -10964,7 +10972,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10964
10972
|
" ",
|
|
10965
10973
|
h.tablePageFrom,
|
|
10966
10974
|
" ",
|
|
10967
|
-
|
|
10975
|
+
U
|
|
10968
10976
|
] })
|
|
10969
10977
|
] })
|
|
10970
10978
|
] })
|
|
@@ -10996,7 +11004,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
10996
11004
|
f(x), d("dynamicForms");
|
|
10997
11005
|
}).catch(() => d("dynamicForms"));
|
|
10998
11006
|
}, [c, u, d, l]);
|
|
10999
|
-
return
|
|
11007
|
+
return H(() => {
|
|
11000
11008
|
!p && v();
|
|
11001
11009
|
}, [v, p]), [...g, ...b].length > 0 ? /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsxs("div", { className: "w-auto list-group forms-items overflow-x-hidden", children: [
|
|
11002
11010
|
g.length > 0 ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -11009,7 +11017,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11009
11017
|
/* @__PURE__ */ a.jsx("input", { disabled: !0, className: "form-control d-none" }),
|
|
11010
11018
|
t ? /* @__PURE__ */ a.jsx(He, { to: t, className: "border-bottom luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center", children: n }) : /* @__PURE__ */ a.jsx("div", { className: "luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center", children: n })
|
|
11011
11019
|
] }), MN = () => {
|
|
11012
|
-
const { localizationContext: e } = V(
|
|
11020
|
+
const { localizationContext: e } = V(K), { language: t, setLanguage: n } = V(e), r = (o) => {
|
|
11013
11021
|
n(o);
|
|
11014
11022
|
}, i = (o, s) => {
|
|
11015
11023
|
r(s), o.stopPropagation();
|
|
@@ -11078,7 +11086,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11078
11086
|
"card-title-link": "_card-title-link_1gvpy_22",
|
|
11079
11087
|
cardTitleLink: vj
|
|
11080
11088
|
}, hj = ({ reportsLastUsedGet: e, getReportRoute: t, getReportName: n }) => {
|
|
11081
|
-
const { texts: { reports: r } } = V(
|
|
11089
|
+
const { texts: { reports: r } } = V(K), { data: i } = Be(e);
|
|
11082
11090
|
return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(Cr, { defaultOpen: !0, title: r.index.lastUsedReports, children: /* @__PURE__ */ a.jsx(Fn, { children: i && i.map((o) => o.versions.map((s) => /* @__PURE__ */ a.jsxs(Rr, { as: He, to: t(o, s.id), className: "p-1 px-2", action: !0, children: [
|
|
11083
11091
|
/* @__PURE__ */ a.jsx(M, { variant: "body2", className: "text-uppercase", children: n(o) }),
|
|
11084
11092
|
/* @__PURE__ */ a.jsxs(M, { variant: "caption", className: "d-flex justify-content-between align-items-center gap-3 text-dark", children: [
|
|
@@ -11087,7 +11095,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11087
11095
|
] })
|
|
11088
11096
|
] }))) }) }) });
|
|
11089
11097
|
}, Cs = ({ reportVersion: e, getReportRoute: t, report: n }) => /* @__PURE__ */ a.jsx(Rr, { as: He, to: t(n, e.id), className: "p-1 px-2", action: !0, children: /* @__PURE__ */ a.jsx(M, { variant: "body2", className: "d-flex justify-content-between align-items-center gap-3", children: /* @__PURE__ */ a.jsx("div", { className: "link", children: e.name }) }) }), hr = 5, Es = ({ versionsList: e, getReportRoute: t, report: n }) => {
|
|
11090
|
-
const { ProjectIconComponent: r } = V(
|
|
11098
|
+
const { ProjectIconComponent: r } = V(K), [i, o] = B(!0), s = k(() => e.length <= hr ? e : e.slice(0, hr - 1), [e]), l = k(() => e.length <= hr ? [] : e.slice(hr - 1), [e]);
|
|
11091
11099
|
return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsxs(Fn, { children: [
|
|
11092
11100
|
s.map((c) => /* @__PURE__ */ a.jsx(Cs, { reportVersion: c, getReportRoute: t, report: n })),
|
|
11093
11101
|
i ? null : l.map((c) => /* @__PURE__ */ a.jsx(Cs, { reportVersion: c, getReportRoute: t, report: n })),
|
|
@@ -11115,7 +11123,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11115
11123
|
reportsGet: "/reports",
|
|
11116
11124
|
reportsLastUsedGet: "/reports/last-used"
|
|
11117
11125
|
}, HN = ({ groups: e, apiUrls: { reportsGet: t = Da.reportsGet, reportsLastUsedGet: n = Da.reportsLastUsedGet } = Da, getReportName: r, getReportDescription: i, getGroupTitle: o, getReportRoute: s }) => {
|
|
11118
|
-
const { texts: { reports: l } } = V(
|
|
11126
|
+
const { texts: { reports: l } } = V(K), [c, u] = B(""), [d] = Ka(c, 500), p = P((h) => h.map((v) => ({
|
|
11119
11127
|
...v,
|
|
11120
11128
|
groupId: !v.groupId || v.groupId === 0 || !e.some((x) => x === v.groupId) ? 999 : v.groupId
|
|
11121
11129
|
})), [e]), { data: f } = Be(t, { dataTransformer: p }), m = k(() => {
|
|
@@ -11186,7 +11194,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11186
11194
|
case "contextButton":
|
|
11187
11195
|
return dt;
|
|
11188
11196
|
case "iconButton":
|
|
11189
|
-
return
|
|
11197
|
+
return te;
|
|
11190
11198
|
default:
|
|
11191
11199
|
return cu;
|
|
11192
11200
|
}
|
|
@@ -11194,7 +11202,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11194
11202
|
return t === "link" ? /* @__PURE__ */ a.jsx(He, { to: Ia(e.route, o), className: I("link font-size-14", l ? "disabled" : void 0, r), children: c }) : /* @__PURE__ */ a.jsx(u, { as: "link", href: Ia(e.route, o), className: I(l ? "disabled" : void 0, r), children: c });
|
|
11195
11203
|
}, YN = ({ id: e, getTimelineApiPath: t }) => {
|
|
11196
11204
|
var s;
|
|
11197
|
-
const { texts: { approval: n }, ProjectIconComponent: r } = V(
|
|
11205
|
+
const { texts: { approval: n }, ProjectIconComponent: r } = V(K), { data: i } = Be(t(e)), o = P((l, c = !1) => {
|
|
11198
11206
|
switch (l) {
|
|
11199
11207
|
case or.Zamitnuto:
|
|
11200
11208
|
return /* @__PURE__ */ a.jsx(ze, { placement: "left", text: n.stateRejected, children: /* @__PURE__ */ a.jsx("div", { children: /* @__PURE__ */ a.jsx(r, { icon: "cancel-simple", className: c ? "text-danger" : "bg-danger rounded-circle p-1", iconProps: { fontSize: "14px", color: c ? void 0 : "white" } }) }) });
|
|
@@ -11266,7 +11274,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11266
11274
|
/* @__PURE__ */ a.jsx("div", { className: lt.textLayer, children: r })
|
|
11267
11275
|
] })
|
|
11268
11276
|
] }), XN = ({ showArchived: e, BnfTableComponent: t, tableIdentifier: n, detailRoute: r }) => {
|
|
11269
|
-
const { texts: { substitutions: i } } = V(
|
|
11277
|
+
const { texts: { substitutions: i } } = V(K), { data: o } = Be(`/permissions/substitutions?archived=${e}`), s = k(() => ({ enable: !0, column: "archived" }), []), l = k(() => [
|
|
11270
11278
|
{
|
|
11271
11279
|
fieldName: "employeeName",
|
|
11272
11280
|
caption: i.index.employeeName,
|
|
@@ -11309,7 +11317,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11309
11317
|
}), [r]);
|
|
11310
11318
|
return /* @__PURE__ */ a.jsx(t, { data: o ?? [], columnsDef: l, tableId: n, useSearchState: !0, paginationMode: "enabled", useScrollableContainer: !0, archiveHighlighting: s, rowNavigation: c });
|
|
11311
11319
|
}, _j = (e, t) => {
|
|
11312
|
-
const n = Ke(), r = Mr(), { startLoading: i, stopLoading: o } = V(bt), { zDateRequired: s, zNumberRequired: l } = Br(), { addNotification: c } = en(), { refreshAvailableDelegations: u } = V(zs), { user: d } = V(Lt), { texts: { substitutions: { detail: p } } } = V(
|
|
11320
|
+
const n = Ke(), r = Mr(), { startLoading: i, stopLoading: o } = V(bt), { zDateRequired: s, zNumberRequired: l } = Br(), { addNotification: c } = en(), { refreshAvailableDelegations: u } = V(zs), { user: d } = V(Lt), { texts: { substitutions: { detail: p } } } = V(K), f = cn.object({
|
|
11313
11321
|
id: l(),
|
|
11314
11322
|
employeeId: l(),
|
|
11315
11323
|
substituteId: l(),
|
|
@@ -11354,12 +11362,12 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11354
11362
|
t,
|
|
11355
11363
|
p
|
|
11356
11364
|
]);
|
|
11357
|
-
return
|
|
11365
|
+
return H(() => {
|
|
11358
11366
|
g.reset(m);
|
|
11359
11367
|
}, [m, g]), { formSchema: f, onSubmit: b, formMethods: g };
|
|
11360
11368
|
}, QN = ({ indexRoute: e }) => {
|
|
11361
11369
|
var w;
|
|
11362
|
-
const { id: t } = qs(), { user: n } = V(Lt), r = Ke(), i = Mr(), { confirm: o } = St(), { texts: { substitutions: { detail: s } } } = V(
|
|
11370
|
+
const { id: t } = qs(), { user: n } = V(Lt), r = Ke(), i = Mr(), { confirm: o } = St(), { texts: { substitutions: { detail: s } } } = V(K), { data: l } = Be(`/permissions/substitutions/${t}`, {
|
|
11363
11371
|
enabled: t !== void 0
|
|
11364
11372
|
}), { data: c } = Be("/permissions/users"), { onSubmit: u, formMethods: d } = _j(l, e), p = d.watch("employeeId"), { data: f } = Be(`/permissions/roles?userName=${(w = c == null ? void 0 : c.find((y) => y.employeeId === p)) == null ? void 0 : w.name}`, { enabled: p > 0 && !!c }), { refreshAvailableDelegations: m } = V(zs), { checkUserHasPermissions: g } = Ws(), b = P(async () => {
|
|
11365
11373
|
await o(s.deleteConfirm) && (await r.delete(`/permissions/substitutions/${t}`), m(), i(e));
|
|
@@ -11403,7 +11411,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11403
11411
|
/* @__PURE__ */ a.jsx($p, { onStorno: () => d.reset(), children: s.save })
|
|
11404
11412
|
] }) }) }) });
|
|
11405
11413
|
}, Oj = ({ BnfTableComponent: e, items: t, onEditItem: n, tableIdentifier: r }) => {
|
|
11406
|
-
const { texts: { approval: i } } = V(
|
|
11414
|
+
const { texts: { approval: i } } = V(K), o = k(() => t.map((c) => ({ ...c, archive: !!(c.dateTo && ru(pt(c.dateTo))) })), [t]), s = k(() => [
|
|
11407
11415
|
{
|
|
11408
11416
|
caption: "Id",
|
|
11409
11417
|
fieldName: "id",
|
|
@@ -11465,21 +11473,21 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11465
11473
|
return { getHasRunningProcesses: l, postEditDelegation: c, postDeleteDelegation: u };
|
|
11466
11474
|
}, Tj = ({ model: e, handleClose: t, onConfirm: n, apiApprovalDefinitions: r, apiHasRunningProcess: i, apiPostEditDelegation: o, apiDeleteDelegation: s, EmployeePickerComponent: l }) => {
|
|
11467
11475
|
var S, O;
|
|
11468
|
-
const { ProjectIconComponent: c, texts: { approval: u } } = V(
|
|
11476
|
+
const { ProjectIconComponent: c, texts: { approval: u } } = V(K), { zDate: d, zObjectIdIntRequired: p, zDateRequired: f } = Br(), { addNotification: m } = en(), { confirm: g } = St(), { data: b } = Be(r), h = cn.object({
|
|
11469
11477
|
employee: p(),
|
|
11470
11478
|
delegate: p(),
|
|
11471
11479
|
dateFrom: f(),
|
|
11472
11480
|
dateTo: d(),
|
|
11473
11481
|
approval: p()
|
|
11474
11482
|
}), v = Fr({ resolver: Lr(h) }), { getHasRunningProcesses: x, postEditDelegation: j, postDeleteDelegation: w } = Pj(e, i, o, s);
|
|
11475
|
-
|
|
11476
|
-
var E, _,
|
|
11483
|
+
H(() => {
|
|
11484
|
+
var E, _, A, L, C, T;
|
|
11477
11485
|
e && (v.reset({
|
|
11478
11486
|
...e,
|
|
11479
11487
|
employee: { id: ((E = e.employee) == null ? void 0 : E.id) ?? 0 },
|
|
11480
11488
|
delegate: { id: ((_ = e.delegate) == null ? void 0 : _.id) ?? 0 },
|
|
11481
11489
|
dateFrom: e.dateFrom ?? "",
|
|
11482
|
-
approval: { id: ((
|
|
11490
|
+
approval: { id: ((A = e.approval) == null ? void 0 : A.id) ?? 0 }
|
|
11483
11491
|
}, { keepDirty: !1 }), (L = e.employee) != null && L.id || xr(v, "employee.id"), (C = e.delegate) != null && C.id || xr(v, "delegate.id"), (T = e.approval) != null && T.id || xr(v, "approval.id"));
|
|
11484
11492
|
}, [e, v]);
|
|
11485
11493
|
const y = async (E) => {
|
|
@@ -11487,25 +11495,25 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11487
11495
|
return;
|
|
11488
11496
|
const _ = { ...e };
|
|
11489
11497
|
Object.assign(_, E), au(_);
|
|
11490
|
-
const
|
|
11491
|
-
_.includeExisting =
|
|
11498
|
+
const A = await x(_.employee.id, _.approval.id);
|
|
11499
|
+
_.includeExisting = A && !!await g(u.delegations.delegateExistingsConfirmMessage), await j(_, v) && (m(e.id ? u.delegations.editSuccess : u.delegations.createSuccess, "success"), n());
|
|
11492
11500
|
}, D = P(async () => {
|
|
11493
11501
|
await g(u.delegations.deleteConfirm) && await w() && (m(u.delegations.deleteSuccess, "success"), n());
|
|
11494
11502
|
}, [g, u, w, m, n]);
|
|
11495
|
-
return /* @__PURE__ */ a.jsxs(
|
|
11496
|
-
/* @__PURE__ */ a.jsxs(
|
|
11497
|
-
/* @__PURE__ */ a.jsx(
|
|
11503
|
+
return /* @__PURE__ */ a.jsxs(ue, { show: e !== null, onHide: () => t(), children: [
|
|
11504
|
+
/* @__PURE__ */ a.jsxs(ue.Header, { closeButton: !0, children: [
|
|
11505
|
+
/* @__PURE__ */ a.jsx(ue.Title, { className: "w-100", children: e != null && e.id ? u.delegations.detailTitle : u.delegations.newTitle }),
|
|
11498
11506
|
e != null && e.id ? /* @__PURE__ */ a.jsx(Mt, { toggle: /* @__PURE__ */ a.jsx(Ft, { as: tn }), className: "modalHeaderDropdown", children: /* @__PURE__ */ a.jsx(Ye, { color: "danger", icon: /* @__PURE__ */ a.jsx(c, { icon: "delete" }), onClick: D, children: u.delegations.delete }) }) : null
|
|
11499
11507
|
] }),
|
|
11500
11508
|
/* @__PURE__ */ a.jsx(Vr, { ...v, children: /* @__PURE__ */ a.jsxs(he, { onSubmit: v.handleSubmit(y), noValidate: !0, children: [
|
|
11501
|
-
/* @__PURE__ */ a.jsxs(
|
|
11509
|
+
/* @__PURE__ */ a.jsxs(ue.Body, { children: [
|
|
11502
11510
|
/* @__PURE__ */ a.jsx(Pa, { label: u.delegations.detail.approval, isNumber: !0, formField: "approval.id", options: b ?? [], required: !0 }),
|
|
11503
11511
|
/* @__PURE__ */ a.jsx(l, { label: u.delegations.detail.employee, formField: "employee.id", defaultSelection: (S = e == null ? void 0 : e.employee) != null && S.id ? { id: e.employee.id, name: e.employee.name } : null, required: !0 }),
|
|
11504
11512
|
/* @__PURE__ */ a.jsx(l, { label: u.delegations.detail.delegate, formField: "delegate.id", defaultSelection: (O = e == null ? void 0 : e.delegate) != null && O.id ? { id: e.delegate.id, name: e.delegate.name } : null, required: !0 }),
|
|
11505
11513
|
/* @__PURE__ */ a.jsx(fn, { label: u.delegations.detail.dateFrom, formField: "dateFrom", type: "date", required: !0 }),
|
|
11506
11514
|
/* @__PURE__ */ a.jsx(fn, { label: u.delegations.detail.dateTo, formField: "dateTo", type: "date" })
|
|
11507
11515
|
] }),
|
|
11508
|
-
/* @__PURE__ */ a.jsx(
|
|
11516
|
+
/* @__PURE__ */ a.jsx(ue.Footer, { className: "justify-content-end", children: /* @__PURE__ */ a.jsx(mt, { type: "submit", children: e != null && e.id ? u.delegations.save : u.delegations.create }) })
|
|
11509
11517
|
] }) })
|
|
11510
11518
|
] });
|
|
11511
11519
|
}, sn = {
|
|
@@ -11515,7 +11523,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11515
11523
|
apiDeleteDelegation: (e) => `/approval/delegation/${e}`,
|
|
11516
11524
|
apiApprovalDefinitions: "/approval/definition"
|
|
11517
11525
|
}, JN = ({ apiUrls: { apiApprovalDelegations: e = sn.apiApprovalDelegations, apiHasRunningProcess: t = sn.apiHasRunningProcess, apiPostEditDelegation: n = sn.apiPostEditDelegation, apiDeleteDelegation: r = sn.apiDeleteDelegation, apiApprovalDefinitions: i = sn.apiApprovalDefinitions } = sn, BnfTableComponent: o, tableIdentifier: s, EmployeePickerComponent: l }) => {
|
|
11518
|
-
const { texts: { approval: c } } = V(
|
|
11526
|
+
const { texts: { approval: c } } = V(K), [u, d] = Xt("archive", !1), [p, f] = B(null), { data: m, reloadData: g } = Be(`${e}?archive=${u}`);
|
|
11519
11527
|
return /* @__PURE__ */ a.jsxs(Nt, { variant: "fullScreen", title: /* @__PURE__ */ a.jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [
|
|
11520
11528
|
/* @__PURE__ */ a.jsx(M, { variant: "h3", children: c.delegations.title }),
|
|
11521
11529
|
/* @__PURE__ */ a.jsxs(Mt, { toggle: /* @__PURE__ */ a.jsx(Ft, { as: tn }), children: [
|
|
@@ -11538,12 +11546,12 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11538
11546
|
}, EmployeePickerComponent: l, apiApprovalDefinitions: i, apiHasRunningProcess: t, apiPostEditDelegation: n, apiDeleteDelegation: r })
|
|
11539
11547
|
] });
|
|
11540
11548
|
}, Aj = ({ show: e, handleClose: t, onConfirm: n, currentEmployee: r, approvalApproverId: i, apiPostChangeEmployee: o, EmployeePickerComponent: s }) => {
|
|
11541
|
-
const { texts: { approval: l } } = V(
|
|
11549
|
+
const { texts: { approval: l } } = V(K), { zNumberRequired: c } = Br(), u = Ke(), { startLoading: d, stopLoading: p } = V(bt), { addNotification: f } = en(), m = cn.object({
|
|
11542
11550
|
employeeId: c()
|
|
11543
11551
|
}), g = Fr({
|
|
11544
11552
|
resolver: Lr(m)
|
|
11545
11553
|
});
|
|
11546
|
-
|
|
11554
|
+
H(() => {
|
|
11547
11555
|
e && (g.reset({ employeeId: r == null ? void 0 : r.id }), !(r != null && r.id) && xr(g, "employeeId"));
|
|
11548
11556
|
}, [e, r, g]);
|
|
11549
11557
|
const b = P(async (v) => (d("approvalChangeEmployee"), u.post(o, {
|
|
@@ -11552,16 +11560,16 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11552
11560
|
}).then(() => !0).catch((x) => (Qa(g, x), !1)).finally(() => p("approvalChangeEmployee"))), [u, i, g, d, p, o]), h = async (v) => {
|
|
11553
11561
|
await b(v.employeeId) && (f(l.definitions.changeEmployeeSuccess, "success"), n());
|
|
11554
11562
|
};
|
|
11555
|
-
return /* @__PURE__ */ a.jsxs(
|
|
11556
|
-
/* @__PURE__ */ a.jsx(
|
|
11563
|
+
return /* @__PURE__ */ a.jsxs(ue, { show: e, onHide: () => t(), children: [
|
|
11564
|
+
/* @__PURE__ */ a.jsx(ue.Header, { closeButton: !0, children: /* @__PURE__ */ a.jsx(ue.Title, { children: l.definitions.changeEmployeeTitle }) }),
|
|
11557
11565
|
/* @__PURE__ */ a.jsx(Vr, { ...g, children: /* @__PURE__ */ a.jsxs(he, { onSubmit: g.handleSubmit(h), noValidate: !0, children: [
|
|
11558
|
-
/* @__PURE__ */ a.jsx(
|
|
11559
|
-
/* @__PURE__ */ a.jsx(
|
|
11566
|
+
/* @__PURE__ */ a.jsx(ue.Body, { children: /* @__PURE__ */ a.jsx(s, { formField: "employeeId", defaultSelection: r, label: l.definitions.changeEmployeeNewEmployee, required: !0 }) }),
|
|
11567
|
+
/* @__PURE__ */ a.jsx(ue.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ a.jsx(mt, { type: "submit", children: l.definitions.changeEmployeeConfirm }) })
|
|
11560
11568
|
] }) })
|
|
11561
11569
|
] });
|
|
11562
11570
|
}, Rj = ({ level: e, reloadApproval: t, appEmployeeDetail: n, apiPostChangeEmployee: r, EmployeePickerComponent: i }) => {
|
|
11563
11571
|
var u;
|
|
11564
|
-
const { ProjectIconComponent: o, texts: { approval: s } } = V(
|
|
11572
|
+
const { ProjectIconComponent: o, texts: { approval: s } } = V(K), [l, c] = B(null);
|
|
11565
11573
|
return /* @__PURE__ */ a.jsxs("div", { className: "bg-white rounded p-2 px-3 d-flex flex-column gap-2 shadow-sm", children: [
|
|
11566
11574
|
/* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-center justify-content-between", children: [
|
|
11567
11575
|
/* @__PURE__ */ a.jsx(M, { variant: "body", children: s.definitions.nthLevel(e.index + 1) }),
|
|
@@ -11571,7 +11579,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11571
11579
|
/* @__PURE__ */ a.jsxs(M, { variant: "body2", className: "d-flex align-items-center justify-content-between gap-2", children: [
|
|
11572
11580
|
d.employeeId ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
11573
11581
|
/* @__PURE__ */ a.jsx(o, { icon: "user" }),
|
|
11574
|
-
/* @__PURE__ */ a.jsx(
|
|
11582
|
+
/* @__PURE__ */ a.jsx(te, { size: "sm", onClick: () => c({
|
|
11575
11583
|
id: d.id,
|
|
11576
11584
|
employee: {
|
|
11577
11585
|
id: d.employeeId ?? 0,
|
|
@@ -11593,7 +11601,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11593
11601
|
}, apiPostChangeEmployee: r, EmployeePickerComponent: i })
|
|
11594
11602
|
] });
|
|
11595
11603
|
}, kj = ({ approval: e, apiApprovalDelegations: t, appEmployeeDetail: n }) => {
|
|
11596
|
-
const { ProjectIconComponent: r, texts: { approval: i } } = V(
|
|
11604
|
+
const { ProjectIconComponent: r, texts: { approval: i } } = V(K), { data: o } = Be(t), s = k(() => o ? o.filter((l) => {
|
|
11597
11605
|
var c;
|
|
11598
11606
|
return ((c = l.approval) == null ? void 0 : c.id) === e.id;
|
|
11599
11607
|
}) : null, [o, e]);
|
|
@@ -11619,7 +11627,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11619
11627
|
] });
|
|
11620
11628
|
}, Bj = ({ approval: e, reloadApproval: t, appEmployeeDetail: n, apiPostChangeEmployee: r, apiApprovalDelegations: i, EmployeePickerComponent: o }) => {
|
|
11621
11629
|
var l, c;
|
|
11622
|
-
const { texts: { approval: s } } = V(
|
|
11630
|
+
const { texts: { approval: s } } = V(K);
|
|
11623
11631
|
return /* @__PURE__ */ a.jsxs("div", { className: "row g-0 overflow-hidden h-100", children: [
|
|
11624
11632
|
/* @__PURE__ */ a.jsx("div", { className: "col-7 overflow-hidden h-100", children: /* @__PURE__ */ a.jsxs("div", { className: "d-flex flex-column gap-0 overflow-hidden h-100", children: [
|
|
11625
11633
|
/* @__PURE__ */ a.jsxs("div", { className: "px-4 pt-1 d-flex align-items-center justify-content-between", children: [
|
|
@@ -11643,10 +11651,10 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11643
11651
|
appApprovalsDelegations: "/approvals/delegations",
|
|
11644
11652
|
appEmployeeDetail: (e) => `/employees/${e}`
|
|
11645
11653
|
}, ZN = ({ appUrls: { appApprovalsDelegations: e = Sa.appApprovalsDelegations, appEmployeeDetail: t = Sa.appEmployeeDetail } = Sa, apiUrls: { apiApprovalDefinitions: n = Rn.apiApprovalDefinitions, apiApprovalDefinitionDetail: r = Rn.apiApprovalDefinitionDetail, apiPostChangeEmployee: i = Rn.apiPostChangeEmployee, apiApprovalDelegations: o = Rn.apiApprovalDelegations } = Rn, EmployeePickerComponent: s }) => {
|
|
11646
|
-
const { ProjectIconComponent: l, texts: { approval: c } } = V(
|
|
11654
|
+
const { ProjectIconComponent: l, texts: { approval: c } } = V(K), { data: u } = Be(n), [d, p] = Xt("approval", null), { data: f, reloadData: m } = Be(r(d ?? 0), {
|
|
11647
11655
|
enabled: d !== null
|
|
11648
11656
|
});
|
|
11649
|
-
return
|
|
11657
|
+
return H(() => {
|
|
11650
11658
|
var g;
|
|
11651
11659
|
d || p(((g = u == null ? void 0 : u.at(0)) == null ? void 0 : g.id) ?? null);
|
|
11652
11660
|
}, [u, d, p]), /* @__PURE__ */ a.jsx(Nt, { variant: "fullScreen", title: /* @__PURE__ */ a.jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [
|
|
@@ -11665,15 +11673,15 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
|
|
|
11665
11673
|
/* @__PURE__ */ a.jsx("div", { className: "col-10 overflow-hidden h-100", children: f ? /* @__PURE__ */ a.jsx(Bj, { approval: f, reloadApproval: m, appEmployeeDetail: t, apiPostChangeEmployee: i, EmployeePickerComponent: s, apiApprovalDelegations: o }) : null })
|
|
11666
11674
|
] }) });
|
|
11667
11675
|
}, eD = ({ overviewApiPath: e = (t) => `/notification/email/overview?date=${t}` }) => {
|
|
11668
|
-
const { ProjectIconComponent: t, texts: { emailOverview: n } } = V(
|
|
11676
|
+
const { ProjectIconComponent: t, texts: { emailOverview: n } } = V(K), [r, i] = Xt("date", dn(/* @__PURE__ */ new Date(), { representation: "date" })), o = k(() => r ? pt(r) : /* @__PURE__ */ new Date(), [r]), { data: s } = Be(e(dn(o, { representation: "date" }))), l = P((p) => {
|
|
11669
11677
|
i(dn(Su(o, p), { representation: "date" }));
|
|
11670
11678
|
}, [o, i]), [c, u] = Xt("email", null), d = k(() => c ? s == null ? void 0 : s.find((p) => p.id === c) : null, [c, s]);
|
|
11671
11679
|
return /* @__PURE__ */ a.jsx(Nt, { variant: "fullScreen", title: /* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-center gap-3", children: [
|
|
11672
11680
|
/* @__PURE__ */ a.jsx(M, { variant: "h3", children: n.title }),
|
|
11673
11681
|
/* @__PURE__ */ a.jsxs("div", { className: "d-flex gap-1 align-items-center justify-content-start", children: [
|
|
11674
|
-
/* @__PURE__ */ a.jsx(
|
|
11682
|
+
/* @__PURE__ */ a.jsx(te, { onClick: () => l(-1), children: /* @__PURE__ */ a.jsx(t, { icon: "chevron-left" }) }),
|
|
11675
11683
|
/* @__PURE__ */ a.jsx(rt, { type: "date", withoutLabel: !0, value: r, onChange: (p) => i((p == null ? void 0 : p.toString()) ?? ""), size: "sm", className: "mb-1" }),
|
|
11676
|
-
/* @__PURE__ */ a.jsx(
|
|
11684
|
+
/* @__PURE__ */ a.jsx(te, { onClick: () => l(1), children: /* @__PURE__ */ a.jsx(t, { icon: "chevron-right" }) })
|
|
11677
11685
|
] })
|
|
11678
11686
|
] }), children: s !== null && s.length < 1 ? /* @__PURE__ */ a.jsx(it, { variant: "warning", children: n.noMails }) : /* @__PURE__ */ a.jsxs("div", { className: "d-flex overflow-hidden gap-3 h-100", children: [
|
|
11679
11687
|
/* @__PURE__ */ a.jsx("div", { className: "h-100 overflow-y-auto overflow-x-hidden", style: { minWidth: "260px" }, children: /* @__PURE__ */ a.jsx("div", { className: "list-group", children: s == null ? void 0 : s.map((p) => /* @__PURE__ */ a.jsxs("div", { role: "button", onClick: () => u(p.id), className: I("list-group-item list-group-item-action d-flex gap-3 justify-content-between p-2", { active: c === p.id }), children: [
|
|
@@ -11757,7 +11765,7 @@ export {
|
|
|
11757
11765
|
fn as HookFormTextInput,
|
|
11758
11766
|
uj as HrWithText,
|
|
11759
11767
|
nu as HtmlTooltip,
|
|
11760
|
-
|
|
11768
|
+
te as IconButton,
|
|
11761
11769
|
Dl as IconPicker,
|
|
11762
11770
|
ms as ImgApi,
|
|
11763
11771
|
_N as ImgBlob,
|