react-luminus-components 1.4.45 → 1.4.46
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/main.cjs.js +13 -13
- package/dist/main.es.js +963 -945
- package/package.json +1 -1
package/dist/main.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as o, c as _, t as Re, s as jo, g as Co, m as Cc, d as an, a as Sc, b as Ec, e as wt, f as Ca, h as Ic, i as _c, k as Oc, l as Pc, n as Tc, o as Ac, p as Rc, T as us, q as ps, r as So, E as kc, u as fs, v as Sa, w as ms, x as Bc, y as Te, z as Ea, F as gs, A as Mc, B as Lc, C as Fc, D as Vc, M as $c, G as Gc, H as Wc, I as Uc, J as Hc, K as zc, L as sa, N as qc, O as Yc, P as J, Q as Gt, R as Kc, S as Xc, U as Qc, V as Wt, W as te, X as Ia, Y as Pe, Z as _a, _ as Jc, $ as ht, a0 as Zc, a1 as _e, a2 as Y, a3 as ar, a4 as it, a5 as Oa, a6 as Pa, a7 as vs, a8 as Ta, a9 as Ot, aa as hs, ab as bs, ac as Oe, ad as bt, ae as zt, af as la, ag as ed, ah as ut, ai as td, aj as rd, ak as nd, al as or, am as ft, an as Pt, ao as ir, ap as Aa, aq as Sr, ar as xn, as as Er, at as ad, au as od, av as id, aw as sr, ax as lr, ay as Fr, az as at, aA as xs, aB as Ut, aC as Ue, aD as It, aE as yn, aF as ys, aG as nt, aH as Ra, aI as st, aJ as sd, aK as ws, aL as ca, aM as ld, aN as cd, aO as dd, aP as ud, aQ as Ns, aR as pd, aS as fd, aT as md, aU as gd, aV as dt, aW as vd, aX as hd, aY as cn, aZ as ne, a_ as Ds, a$ as bd, b0 as xd, b1 as yd, b2 as js, b3 as Cs, b4 as wd, b5 as Nd, b6 as Dd, b7 as jd, b8 as Cd, b9 as Sd, ba as jt, bb as Ed, bc as Id, bd as _d, be as Od, bf as Pd, bg as Ss, bh as Td, bi as Pn, bj as Ad, bk as Kt, bl as Rd, bm as kd, bn as Es, bo as dn, bp as Bd, bq as Is, br as qr, bs as Md, bt as _s, bu as Tn, bv as Ld, bw as Fd } from "./nivo-bar.es-CZIO12ob.js";
|
|
2
2
|
import { bz as gD, bx as vD, by as hD } from "./nivo-bar.es-CZIO12ob.js";
|
|
3
3
|
import * as Se from "react";
|
|
4
|
-
import le, { useCallback as P, useMemo as
|
|
4
|
+
import le, { useCallback as P, useMemo as M, useState as k, useRef as re, useEffect as q, useContext as z, useId as Vd, Component as $d, isValidElement as Eo, Suspense as Gd, useLayoutEffect as ka, useReducer as Wd, Fragment as Ud } from "react";
|
|
5
5
|
import { c as gt, L as Io, F as Hd } from "./FormDisabledProvider-CRvfN8Ti.js";
|
|
6
6
|
import { InteractionType as zd } from "@azure/msal-browser";
|
|
7
7
|
import { MsalAuthenticationTemplate as qd } from "@azure/msal-react";
|
|
@@ -175,17 +175,17 @@ const uu = {
|
|
|
175
175
|
getDimensionValue: m = du,
|
|
176
176
|
...g
|
|
177
177
|
}, b) => {
|
|
178
|
-
const h = typeof l == "function" ? l() : l, v =
|
|
179
|
-
|
|
180
|
-
}, e), [h, e]),
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
}, t), [h, t]),
|
|
184
|
-
|
|
185
|
-
}, r), [h, r]),
|
|
186
|
-
|
|
187
|
-
}, n), [n, m, h]),
|
|
188
|
-
|
|
178
|
+
const h = typeof l == "function" ? l() : l, v = M(() => hr((j) => {
|
|
179
|
+
j.style[h] = "0";
|
|
180
|
+
}, e), [h, e]), y = M(() => hr((j) => {
|
|
181
|
+
const C = `scroll${h[0].toUpperCase()}${h.slice(1)}`;
|
|
182
|
+
j.style[h] = `${j[C]}px`;
|
|
183
|
+
}, t), [h, t]), N = M(() => hr((j) => {
|
|
184
|
+
j.style[h] = null;
|
|
185
|
+
}, r), [h, r]), w = M(() => hr((j) => {
|
|
186
|
+
j.style[h] = `${m(h, j)}px`, Bc(j);
|
|
187
|
+
}, n), [n, m, h]), x = M(() => hr((j) => {
|
|
188
|
+
j.style[h] = null;
|
|
189
189
|
}, a), [h, a]);
|
|
190
190
|
return /* @__PURE__ */ o.jsx(us, {
|
|
191
191
|
ref: b,
|
|
@@ -193,19 +193,19 @@ const uu = {
|
|
|
193
193
|
...g,
|
|
194
194
|
"aria-expanded": g.role ? c : null,
|
|
195
195
|
onEnter: v,
|
|
196
|
-
onEntering:
|
|
197
|
-
onEntered:
|
|
198
|
-
onExit:
|
|
199
|
-
onExiting:
|
|
196
|
+
onEntering: y,
|
|
197
|
+
onEntered: N,
|
|
198
|
+
onExit: w,
|
|
199
|
+
onExiting: x,
|
|
200
200
|
childRef: s.ref,
|
|
201
201
|
in: c,
|
|
202
202
|
timeout: u,
|
|
203
203
|
mountOnEnter: d,
|
|
204
204
|
unmountOnExit: p,
|
|
205
205
|
appear: f,
|
|
206
|
-
children: (
|
|
207
|
-
...
|
|
208
|
-
className: _(i, s.props.className, uu[
|
|
206
|
+
children: (j, C) => /* @__PURE__ */ le.cloneElement(s, {
|
|
207
|
+
...C,
|
|
208
|
+
className: _(i, s.props.className, uu[j], h === "width" && "collapse-horizontal")
|
|
209
209
|
})
|
|
210
210
|
});
|
|
211
211
|
}), Va = /* @__PURE__ */ Se.forwardRef(({
|
|
@@ -239,7 +239,7 @@ const Rs = /* @__PURE__ */ Se.forwardRef(({
|
|
|
239
239
|
as: r = "div",
|
|
240
240
|
...n
|
|
241
241
|
}, a) => {
|
|
242
|
-
const i = Te(e, "card-header"), s =
|
|
242
|
+
const i = Te(e, "card-header"), s = M(() => ({
|
|
243
243
|
cardHeaderBsPrefix: i
|
|
244
244
|
}), [i]);
|
|
245
245
|
return /* @__PURE__ */ o.jsx(As.Provider, {
|
|
@@ -389,7 +389,7 @@ const mu = (e) => /* @__PURE__ */ o.jsx(Nn, {
|
|
|
389
389
|
...i
|
|
390
390
|
}, s) => {
|
|
391
391
|
e = Te(e, "input-group");
|
|
392
|
-
const l =
|
|
392
|
+
const l = M(() => ({}), []);
|
|
393
393
|
return /* @__PURE__ */ o.jsx(Mc.Provider, {
|
|
394
394
|
value: l,
|
|
395
395
|
children: /* @__PURE__ */ o.jsx(a, {
|
|
@@ -448,7 +448,7 @@ function hu(e) {
|
|
|
448
448
|
typeof l == "object" ? (d = l, u = c, c = !0) : (c = c || !0, d = {
|
|
449
449
|
[l]: c
|
|
450
450
|
});
|
|
451
|
-
let p =
|
|
451
|
+
let p = M(() => Object.entries(d).reduce((f, [m, g]) => ((g === "up" || g === !0) && (f = r(f, i(m))), (g === "down" || g === !0) && (f = r(f, a(m))), f), ""), [JSON.stringify(d)]);
|
|
452
452
|
return vu(p, u);
|
|
453
453
|
}
|
|
454
454
|
return s;
|
|
@@ -553,35 +553,35 @@ const qs = /* @__PURE__ */ Se.forwardRef(({
|
|
|
553
553
|
enforceFocus: b = !0,
|
|
554
554
|
restoreFocus: h = !0,
|
|
555
555
|
restoreFocusOptions: v,
|
|
556
|
-
onEntered:
|
|
557
|
-
onExit:
|
|
558
|
-
onExiting:
|
|
559
|
-
onEnter:
|
|
560
|
-
onEntering:
|
|
561
|
-
onExited:
|
|
556
|
+
onEntered: y,
|
|
557
|
+
onExit: N,
|
|
558
|
+
onExiting: w,
|
|
559
|
+
onEnter: x,
|
|
560
|
+
onEntering: j,
|
|
561
|
+
onExited: C,
|
|
562
562
|
backdropClassName: O,
|
|
563
563
|
manager: E,
|
|
564
564
|
renderStaticNode: T = !1,
|
|
565
565
|
...B
|
|
566
566
|
}, V) => {
|
|
567
|
-
const
|
|
567
|
+
const S = re();
|
|
568
568
|
e = Te(e, "offcanvas");
|
|
569
|
-
const [I,
|
|
569
|
+
const [I, $] = k(!1), A = Vc(f), L = bu(i || "xs", "up");
|
|
570
570
|
q(() => {
|
|
571
|
-
|
|
572
|
-
}, [s, i,
|
|
573
|
-
const U =
|
|
571
|
+
$(i ? s && !L : s);
|
|
572
|
+
}, [s, i, L]);
|
|
573
|
+
const U = M(() => ({
|
|
574
574
|
onHide: A
|
|
575
575
|
}), [A]);
|
|
576
|
-
function
|
|
577
|
-
return E || (u ? (
|
|
576
|
+
function G() {
|
|
577
|
+
return E || (u ? (S.current || (S.current = new Uc({
|
|
578
578
|
handleContainerOverflow: !1
|
|
579
|
-
})),
|
|
579
|
+
})), S.current) : Hc());
|
|
580
580
|
}
|
|
581
581
|
const H = (se, ...be) => {
|
|
582
|
-
se && (se.style.visibility = "visible"),
|
|
582
|
+
se && (se.style.visibility = "visible"), x == null || x(se, ...be);
|
|
583
583
|
}, X = (se, ...be) => {
|
|
584
|
-
se && (se.style.visibility = ""),
|
|
584
|
+
se && (se.style.visibility = ""), C == null || C(...be);
|
|
585
585
|
}, ee = P((se) => /* @__PURE__ */ o.jsx("div", {
|
|
586
586
|
...se,
|
|
587
587
|
className: _(`${e}-backdrop`, O)
|
|
@@ -609,12 +609,12 @@ const qs = /* @__PURE__ */ Se.forwardRef(({
|
|
|
609
609
|
onShow: p,
|
|
610
610
|
onHide: A,
|
|
611
611
|
onEnter: H,
|
|
612
|
-
onEntering:
|
|
613
|
-
onEntered:
|
|
614
|
-
onExit:
|
|
615
|
-
onExiting:
|
|
612
|
+
onEntering: j,
|
|
613
|
+
onEntered: y,
|
|
614
|
+
onExit: N,
|
|
615
|
+
onExiting: w,
|
|
616
616
|
onExited: X,
|
|
617
|
-
manager:
|
|
617
|
+
manager: G(),
|
|
618
618
|
transition: wu,
|
|
619
619
|
backdropTransition: Nu,
|
|
620
620
|
renderBackdrop: ee,
|
|
@@ -751,12 +751,12 @@ const Du = /* @__PURE__ */ Se.forwardRef(({
|
|
|
751
751
|
const u = P((f) => {
|
|
752
752
|
const m = Qc(e, f);
|
|
753
753
|
m.getFullYear() < n || m.getFullYear() > a || t(m);
|
|
754
|
-
}, [e, t, n, a]), d =
|
|
754
|
+
}, [e, t, n, a]), d = M(() => {
|
|
755
755
|
const f = [];
|
|
756
756
|
for (let m = n; m <= a; m++)
|
|
757
757
|
f.push(m);
|
|
758
758
|
return f;
|
|
759
|
-
}, [n, a]), p =
|
|
759
|
+
}, [n, a]), p = M(() => {
|
|
760
760
|
const g = [];
|
|
761
761
|
for (let b = 0; b <= 11; b++)
|
|
762
762
|
g.push({
|
|
@@ -782,13 +782,13 @@ const Du = /* @__PURE__ */ Se.forwardRef(({
|
|
|
782
782
|
}, _u = "_select_pywmr_1", Ou = {
|
|
783
783
|
select: _u
|
|
784
784
|
}, Fo = 2e3, Vo = 2050, Pu = ({ year: e, onChangeYear: t, className: r, variant: n = "standart", ...a }) => {
|
|
785
|
-
const i =
|
|
785
|
+
const i = M(() => {
|
|
786
786
|
var u;
|
|
787
787
|
return a.manualOptions ? ((u = a.options) == null ? void 0 : u.at(0)) ?? Fo : a.optionMin ?? Fo;
|
|
788
|
-
}, [a]), s =
|
|
788
|
+
}, [a]), s = M(() => {
|
|
789
789
|
var u;
|
|
790
790
|
return a.manualOptions ? ((u = a.options) == null ? void 0 : u.at(-1)) ?? Vo : a.optionMax ?? Vo;
|
|
791
|
-
}, [a]), l =
|
|
791
|
+
}, [a]), l = M(() => {
|
|
792
792
|
if (a.manualOptions)
|
|
793
793
|
return a.options;
|
|
794
794
|
const u = [];
|
|
@@ -954,7 +954,7 @@ const Au = (e) => (r) => {
|
|
|
954
954
|
i(!0);
|
|
955
955
|
}, []), l = P(() => {
|
|
956
956
|
i(!1);
|
|
957
|
-
}, []), c =
|
|
957
|
+
}, []), c = M(() => {
|
|
958
958
|
switch (t) {
|
|
959
959
|
case "email":
|
|
960
960
|
return "mailto";
|
|
@@ -972,7 +972,7 @@ const Au = (e) => (r) => {
|
|
|
972
972
|
] }) })
|
|
973
973
|
] });
|
|
974
974
|
}, Gu = ({ contactType: e, value: t, className: r, children: n, showIconWithChildren: a }) => {
|
|
975
|
-
const { ProjectIconComponent: i } = z(J), s =
|
|
975
|
+
const { ProjectIconComponent: i } = z(J), s = M(() => {
|
|
976
976
|
switch (e) {
|
|
977
977
|
case "email":
|
|
978
978
|
return "mailto";
|
|
@@ -981,7 +981,7 @@ const Au = (e) => (r) => {
|
|
|
981
981
|
default:
|
|
982
982
|
throw new Error("Incorrect type for ContactsLink");
|
|
983
983
|
}
|
|
984
|
-
}, [e]), l =
|
|
984
|
+
}, [e]), l = M(() => {
|
|
985
985
|
switch (e) {
|
|
986
986
|
case "email":
|
|
987
987
|
return "mail";
|
|
@@ -1027,26 +1027,26 @@ const Au = (e) => (r) => {
|
|
|
1027
1027
|
] })
|
|
1028
1028
|
] })
|
|
1029
1029
|
] });
|
|
1030
|
-
}, vN = ({ value: e, label: t, InputContainer: r = ar, className: n, withoutLabel: a, hidden: i, disabled: s, contactType: l, ...c }) => i ? null : /* @__PURE__ */ o.jsx(Qs, { contactType: l, value: e, withoutLabel: a, label: t, className: n, children: /* @__PURE__ */ o.jsx(it, { type: "text", value: e, disabled: s, InputContainer: r, size: "sm", withoutLabel: !0, ...c }) }), hN = ({ InputContainer: e = ar, items: t, selectedItemNavigateTo: r, onSearchQueryChange: n, texts: a, isLoading: i, 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:
|
|
1031
|
-
const [B, V] = k(!1),
|
|
1032
|
-
l && l(
|
|
1033
|
-
}, [l]), I = P((
|
|
1034
|
-
V(!1),
|
|
1035
|
-
}, [
|
|
1036
|
-
var
|
|
1037
|
-
return b ? ((
|
|
1030
|
+
}, vN = ({ value: e, label: t, InputContainer: r = ar, className: n, withoutLabel: a, hidden: i, disabled: s, contactType: l, ...c }) => i ? null : /* @__PURE__ */ o.jsx(Qs, { contactType: l, value: e, withoutLabel: a, label: t, className: n, children: /* @__PURE__ */ o.jsx(it, { type: "text", value: e, disabled: s, InputContainer: r, size: "sm", withoutLabel: !0, ...c }) }), hN = ({ InputContainer: e = ar, items: t, selectedItemNavigateTo: r, onSearchQueryChange: n, texts: a, isLoading: i, 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: y, icon: N, hint: w, addNewOptionPath: x, refreshOptions: j, MiniDetailComponent: C, miniDetailPlacement: O, suggestedItems: E, suggestedItemsTitle: T }) => {
|
|
1031
|
+
const [B, V] = k(!1), S = P((G) => {
|
|
1032
|
+
l && l(G);
|
|
1033
|
+
}, [l]), I = P((G) => {
|
|
1034
|
+
V(!1), S(G);
|
|
1035
|
+
}, [S]), $ = re(null), A = r !== void 0, L = A && s !== null, U = M(() => {
|
|
1036
|
+
var G, H;
|
|
1037
|
+
return b ? ((G = s == null ? void 0 : s.id) == null ? void 0 : G.toString()) ?? "" : s != null && s.name && s.name.length > 0 ? s.name : ((H = s == null ? void 0 : s.id) == null ? void 0 : H.toString()) ?? "";
|
|
1038
1038
|
}, [s, b]);
|
|
1039
|
-
return /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsxs(e, { withoutLabel: u, label: c ?? "", hidden: m, inputContainerClassName: _({ "luminus-dropdown-select-open": B }), className: v, hint:
|
|
1039
|
+
return /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsxs(e, { withoutLabel: u, label: c ?? "", hidden: m, inputContainerClassName: _({ "luminus-dropdown-select-open": B }), className: v, hint: w, disabled: g, children: [
|
|
1040
1040
|
/* @__PURE__ */ o.jsxs(Oa, { currentSelection: s, selectedItemNavigateTo: r, children: [
|
|
1041
1041
|
b && (s == null ? void 0 : s.name) && /* @__PURE__ */ o.jsx(Y, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: s.name }),
|
|
1042
|
-
/* @__PURE__ */ o.jsx(Pa, { value: (s == null ? void 0 : s.id) ?? null, MiniDetailComponent:
|
|
1042
|
+
/* @__PURE__ */ o.jsx(Pa, { value: (s == null ? void 0 : s.id) ?? null, MiniDetailComponent: C, miniDetailPlacement: O, children: /* @__PURE__ */ o.jsxs(
|
|
1043
1043
|
Pe.Select,
|
|
1044
1044
|
{
|
|
1045
|
-
ref:
|
|
1045
|
+
ref: $,
|
|
1046
1046
|
size: d,
|
|
1047
1047
|
value: (s == null ? void 0 : s.id) ?? "",
|
|
1048
|
-
onMouseDown: (
|
|
1049
|
-
|
|
1048
|
+
onMouseDown: (G) => {
|
|
1049
|
+
G.currentTarget.focus(), G.preventDefault();
|
|
1050
1050
|
},
|
|
1051
1051
|
onClick: () => {
|
|
1052
1052
|
!A && !g && V(!0);
|
|
@@ -1055,7 +1055,7 @@ const Au = (e) => (r) => {
|
|
|
1055
1055
|
},
|
|
1056
1056
|
className: _("w-100", {
|
|
1057
1057
|
"luminus-dropdown-picker-disabled": g,
|
|
1058
|
-
"luminus-dropdown-picker-link":
|
|
1058
|
+
"luminus-dropdown-picker-link": L
|
|
1059
1059
|
}),
|
|
1060
1060
|
hidden: m,
|
|
1061
1061
|
children: [
|
|
@@ -1065,71 +1065,71 @@ const Au = (e) => (r) => {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
) }),
|
|
1067
1067
|
h || !g && A ? /* @__PURE__ */ o.jsxs("div", { className: "custom-picker-button", children: [
|
|
1068
|
-
!h && !g && A && /* @__PURE__ */ o.jsx(te, { size: "sm", color: "secondary", onClick: (
|
|
1069
|
-
|
|
1070
|
-
}, children:
|
|
1068
|
+
!h && !g && A && /* @__PURE__ */ o.jsx(te, { size: "sm", color: "secondary", onClick: (G) => {
|
|
1069
|
+
G.preventDefault(), G.stopPropagation(), V(!0);
|
|
1070
|
+
}, children: N ?? /* @__PURE__ */ o.jsx(vs, {}) }),
|
|
1071
1071
|
h ?? null
|
|
1072
1072
|
] }) : null
|
|
1073
1073
|
] }),
|
|
1074
|
-
|
|
1074
|
+
$.current && /* @__PURE__ */ o.jsx(Ta, { show: B, onCancel: () => V(!1), items: t, currentSelection: s, onSelectionChange: I, onSearchQueryChange: n, texts: a, itemsNameWidth: p, additionalColumns: f, isLoading: i, disabled: g, inputRef: $, archiveColumn: y, displayIdAsName: b, addNewOptionPath: x, refreshOptions: j, suggestedItems: E, suggestedItemsTitle: T })
|
|
1075
1075
|
] }) });
|
|
1076
1076
|
}, bN = ({ InputContainer: e = ar, value: t, onChange: r, label: n, size: a, showClearIcon: i, clearValue: s, hidden: l, disabled: c, rows: u, withoutLabel: d, debounceMs: p, minLength: f, maxLength: m, className: g, hint: b }) => {
|
|
1077
1077
|
const h = P(() => {
|
|
1078
1078
|
if (!r)
|
|
1079
1079
|
return;
|
|
1080
|
-
const
|
|
1081
|
-
r((
|
|
1082
|
-
}, [s, r]), v = re(null), [
|
|
1083
|
-
const
|
|
1084
|
-
r && r(
|
|
1085
|
-
}, [r]),
|
|
1080
|
+
const j = s ?? null;
|
|
1081
|
+
r((j == null ? void 0 : j.toString()) ?? "");
|
|
1082
|
+
}, [s, r]), v = re(null), [y, N] = k((t == null ? void 0 : t.toString()) ?? ""), w = P((j) => {
|
|
1083
|
+
const C = j;
|
|
1084
|
+
r && r(C || null);
|
|
1085
|
+
}, [r]), x = P((j) => {
|
|
1086
1086
|
var O;
|
|
1087
|
-
const
|
|
1087
|
+
const C = (O = j.target) == null ? void 0 : O.value;
|
|
1088
1088
|
if (!p) {
|
|
1089
|
-
|
|
1089
|
+
w(C);
|
|
1090
1090
|
return;
|
|
1091
1091
|
}
|
|
1092
|
-
|
|
1093
|
-
|
|
1092
|
+
N(C), v.current !== null && window.clearTimeout(v.current), v.current = window.setTimeout(() => {
|
|
1093
|
+
w(C);
|
|
1094
1094
|
}, p);
|
|
1095
|
-
}, [p,
|
|
1095
|
+
}, [p, w]);
|
|
1096
1096
|
return q(() => {
|
|
1097
|
-
|
|
1097
|
+
N(t === null ? "" : t.toString());
|
|
1098
1098
|
}, [t]), /* @__PURE__ */ o.jsxs(e, { label: n ?? "", hidden: l, withoutLabel: d, className: g, isForTextAreaInput: !0, hint: b, disabled: c, children: [
|
|
1099
|
-
/* @__PURE__ */ o.jsx(Pe.Control, { as: "textarea", size: a, value: p ?
|
|
1099
|
+
/* @__PURE__ */ o.jsx(Pe.Control, { as: "textarea", size: a, value: p ? y : t ?? "", onChange: x, hidden: l, disabled: c, rows: u ?? 2, className: "w-100", minLength: f, maxLength: m }),
|
|
1100
1100
|
i && t && r && !c && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ o.jsx(te, { color: "secondary", size: "sm", onClick: h, children: /* @__PURE__ */ o.jsx(Ot, {}) }) })
|
|
1101
1101
|
] });
|
|
1102
1102
|
}, xN = ({ InputContainer: e = ar, value: t, onChange: r, debounceMs: n, label: a, withoutLabel: i, 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 }) => {
|
|
1103
|
-
const
|
|
1103
|
+
const y = P(() => {
|
|
1104
1104
|
if (!r)
|
|
1105
1105
|
return;
|
|
1106
1106
|
const O = p ?? null;
|
|
1107
1107
|
r(O ? Number(O) : null);
|
|
1108
|
-
}, [p, r]),
|
|
1108
|
+
}, [p, r]), N = re(null), [w, x] = k((t == null ? void 0 : t.toString()) ?? ""), j = P((O) => {
|
|
1109
1109
|
const E = O;
|
|
1110
1110
|
r && r(E == null || E === "" ? null : Nr(Number(E), b, h));
|
|
1111
|
-
}, [h, b, r]),
|
|
1111
|
+
}, [h, b, r]), C = P((O) => {
|
|
1112
1112
|
var T;
|
|
1113
1113
|
const E = (T = O.target) == null ? void 0 : T.value;
|
|
1114
1114
|
if (!n) {
|
|
1115
|
-
|
|
1115
|
+
j(E);
|
|
1116
1116
|
return;
|
|
1117
1117
|
}
|
|
1118
|
-
|
|
1119
|
-
|
|
1118
|
+
x(Nr(Number(E), b, h).toString()), N.current !== null && window.clearTimeout(N.current), N.current = window.setTimeout(() => {
|
|
1119
|
+
j(E);
|
|
1120
1120
|
}, n);
|
|
1121
|
-
}, [n,
|
|
1121
|
+
}, [n, j, h, b]);
|
|
1122
1122
|
return q(() => {
|
|
1123
|
-
|
|
1123
|
+
x(t === null ? "" : Nr(t, b, h).toString());
|
|
1124
1124
|
}, [h, b, t]), /* @__PURE__ */ o.jsx(e, { withoutLabel: i, label: a ?? "", hidden: c, hint: v, className: f, disabled: u, children: /* @__PURE__ */ o.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
1125
|
-
/* @__PURE__ */ o.jsx(Pe.Control, { type: "number", placeholder: s ?? a, size: l, value: n ?
|
|
1125
|
+
/* @__PURE__ */ o.jsx(Pe.Control, { type: "number", placeholder: s ?? a, size: l, value: n ? w : t ?? "", onChange: C, className: `luminus-numeric-stepper ${f ?? ""}`, hidden: c, disabled: u ?? !1, step: m }),
|
|
1126
1126
|
/* @__PURE__ */ o.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ o.jsx(te, { size: "sm", onClick: (O) => {
|
|
1127
|
-
O.preventDefault(), O.stopPropagation(),
|
|
1127
|
+
O.preventDefault(), O.stopPropagation(), j(((t ?? 0) - g).toString());
|
|
1128
1128
|
}, children: /* @__PURE__ */ o.jsx(hs, {}) }) }),
|
|
1129
1129
|
/* @__PURE__ */ o.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ o.jsx(te, { size: "sm", onClick: (O) => {
|
|
1130
|
-
O.preventDefault(), O.stopPropagation(),
|
|
1130
|
+
O.preventDefault(), O.stopPropagation(), j(((t ?? 0) + g).toString());
|
|
1131
1131
|
}, children: /* @__PURE__ */ o.jsx(bs, {}) }) }),
|
|
1132
|
-
d && t && r && !u && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ o.jsx(te, { color: "secondary", size: "sm", onClick:
|
|
1132
|
+
d && t && r && !u && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ o.jsx(te, { color: "secondary", size: "sm", onClick: y, children: /* @__PURE__ */ o.jsx(Ot, {}) }) })
|
|
1133
1133
|
] }) });
|
|
1134
1134
|
};
|
|
1135
1135
|
function Js(e, t) {
|
|
@@ -1296,8 +1296,8 @@ function ap(e) {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
function op(e, t, r, n, a, i, s) {
|
|
1298
1298
|
s === void 0 && (s = ap);
|
|
1299
|
-
var l = a.findIndex(function(
|
|
1300
|
-
return
|
|
1299
|
+
var l = a.findIndex(function(w) {
|
|
1300
|
+
return w;
|
|
1301
1301
|
}), c = e.slice(0, l);
|
|
1302
1302
|
!t && !r.startsWith(c) && (t = c, r = c + r, n = n + c.length);
|
|
1303
1303
|
for (var u = r.length, d = e.length, p = {}, f = new Array(u), m = 0; m < u; m++) {
|
|
@@ -1318,11 +1318,11 @@ function op(e, t, r, n, a, i, s) {
|
|
|
1318
1318
|
}
|
|
1319
1319
|
for (var v = n; v < u && (f[v] === -1 || !i(r[v])); )
|
|
1320
1320
|
v++;
|
|
1321
|
-
var
|
|
1321
|
+
var y = v === u || f[v] === -1 ? d : f[v];
|
|
1322
1322
|
for (v = n - 1; v > 0 && f[v] === -1; )
|
|
1323
1323
|
v--;
|
|
1324
|
-
var
|
|
1325
|
-
return
|
|
1324
|
+
var N = v === -1 || f[v] === -1 ? 0 : f[v] + 1;
|
|
1325
|
+
return N > y ? y : n - N < y - n ? N : y;
|
|
1326
1326
|
}
|
|
1327
1327
|
function Ho(e, t, r, n) {
|
|
1328
1328
|
var a = e.length;
|
|
@@ -1359,7 +1359,7 @@ function al(e, t, r, n, a, i) {
|
|
|
1359
1359
|
}, p = e, f = r;
|
|
1360
1360
|
Jt(e) && (p = c.numAsString, f = !0);
|
|
1361
1361
|
var m = s(p, f);
|
|
1362
|
-
return
|
|
1362
|
+
return M(function() {
|
|
1363
1363
|
u(m);
|
|
1364
1364
|
}, [m.formattedValue]), [c, d];
|
|
1365
1365
|
}
|
|
@@ -1388,13 +1388,13 @@ function cp(e) {
|
|
|
1388
1388
|
b === void 0 && (b = Dt);
|
|
1389
1389
|
var h = e.onBlur;
|
|
1390
1390
|
h === void 0 && (h = Dt);
|
|
1391
|
-
var v = e.value,
|
|
1392
|
-
|
|
1393
|
-
var
|
|
1394
|
-
|
|
1395
|
-
var
|
|
1391
|
+
var v = e.value, y = e.getCaretBoundary;
|
|
1392
|
+
y === void 0 && (y = ip);
|
|
1393
|
+
var N = e.isValidInputCharacter;
|
|
1394
|
+
N === void 0 && (N = Or);
|
|
1395
|
+
var w = e.isCharacterSame, x = Js(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), j = al(v, c, !!u, s, l, d), C = j[0], O = C.formattedValue, E = C.numAsString, T = j[1], B = re(), V = re({ formattedValue: O, numAsString: E }), S = function(K, F) {
|
|
1396
1396
|
V.current = { formattedValue: K.formattedValue, numAsString: K.value }, T(K, F);
|
|
1397
|
-
}, I = k(!1),
|
|
1397
|
+
}, I = k(!1), $ = I[0], A = I[1], L = re(null), U = re({
|
|
1398
1398
|
setCaretTimeout: null,
|
|
1399
1399
|
focusTimeout: null
|
|
1400
1400
|
});
|
|
@@ -1403,7 +1403,7 @@ function cp(e) {
|
|
|
1403
1403
|
clearTimeout(U.current.setCaretTimeout), clearTimeout(U.current.focusTimeout);
|
|
1404
1404
|
};
|
|
1405
1405
|
}, []);
|
|
1406
|
-
var
|
|
1406
|
+
var G = s, H = function(K, F) {
|
|
1407
1407
|
var Z = parseFloat(F);
|
|
1408
1408
|
return {
|
|
1409
1409
|
formattedValue: K,
|
|
@@ -1415,9 +1415,9 @@ function cp(e) {
|
|
|
1415
1415
|
K.value === Z && K.selectionStart !== F && $t(K, F);
|
|
1416
1416
|
}, 0));
|
|
1417
1417
|
}, ee = function(K, F, Z) {
|
|
1418
|
-
return Ho(K, F,
|
|
1418
|
+
return Ho(K, F, y(K), Z);
|
|
1419
1419
|
}, ie = function(K, F, Z) {
|
|
1420
|
-
var ue =
|
|
1420
|
+
var ue = y(F), Ce = op(F, O, K, Z, ue, N, w);
|
|
1421
1421
|
return Ce = Ho(F, Ce, ue), Ce;
|
|
1422
1422
|
}, se = function(K) {
|
|
1423
1423
|
var F = K.formattedValue;
|
|
@@ -1427,25 +1427,25 @@ function cp(e) {
|
|
|
1427
1427
|
var Le = K.inputValue || Z.value, et = Bn(Z);
|
|
1428
1428
|
Z.value = F, ce = ie(Le, F, et), ce !== void 0 && X(Z, ce, F);
|
|
1429
1429
|
}
|
|
1430
|
-
F !== O &&
|
|
1430
|
+
F !== O && S(H(F, ge), { event: Ce, source: ue });
|
|
1431
1431
|
};
|
|
1432
1432
|
q(function() {
|
|
1433
1433
|
var K = V.current, F = K.formattedValue, Z = K.numAsString;
|
|
1434
|
-
(O !== F || E !== Z) &&
|
|
1434
|
+
(O !== F || E !== Z) && S(H(O, E), {
|
|
1435
1435
|
event: void 0,
|
|
1436
1436
|
source: _r.props
|
|
1437
1437
|
});
|
|
1438
1438
|
}, [O, E]);
|
|
1439
|
-
var be =
|
|
1439
|
+
var be = L.current ? Bn(L.current) : void 0, W = typeof window < "u" ? ka : q;
|
|
1440
1440
|
W(function() {
|
|
1441
|
-
var K =
|
|
1441
|
+
var K = L.current;
|
|
1442
1442
|
if (O !== V.current.formattedValue && K) {
|
|
1443
1443
|
var F = ie(V.current.formattedValue, O, be);
|
|
1444
1444
|
K.value = O, X(K, F, O);
|
|
1445
1445
|
}
|
|
1446
1446
|
}, [O]);
|
|
1447
1447
|
var ae = function(K, F, Z) {
|
|
1448
|
-
var ue = F.target, Ce = B.current ? ep(B.current, ue.selectionEnd) : nl(O, K), ge = Object.assign(Object.assign({}, Ce), { lastValue: O }), ce = l(K, ge), Le =
|
|
1448
|
+
var ue = F.target, Ce = B.current ? ep(B.current, ue.selectionEnd) : nl(O, K), ge = Object.assign(Object.assign({}, Ce), { lastValue: O }), ce = l(K, ge), Le = G(ce);
|
|
1449
1449
|
if (ce = l(Le, void 0), p && !p(H(Le, ce))) {
|
|
1450
1450
|
var et = F.target, tt = Bn(et), Yt = ie(K, O, tt);
|
|
1451
1451
|
return et.value = O, X(et, Yt, O), !1;
|
|
@@ -1481,7 +1481,7 @@ function cp(e) {
|
|
|
1481
1481
|
if (et) {
|
|
1482
1482
|
var Yt = Z === "ArrowLeft" ? "left" : "right";
|
|
1483
1483
|
tt = ee(ge, ce, Yt), tt !== ce && K.preventDefault();
|
|
1484
|
-
} else Z === "Delete" && !
|
|
1484
|
+
} else Z === "Delete" && !N(ge[ce]) ? tt = ee(ge, ce, "right") : Z === "Backspace" && !N(ge[ce]) && (tt = ee(ge, ce, "left"));
|
|
1485
1485
|
tt !== ce && X(F, tt, ge), m(K), me(F, Le);
|
|
1486
1486
|
}, R = function(K) {
|
|
1487
1487
|
var F = K.target, Z = function() {
|
|
@@ -1497,15 +1497,15 @@ function cp(e) {
|
|
|
1497
1497
|
}, de = function(K) {
|
|
1498
1498
|
K.persist && K.persist();
|
|
1499
1499
|
var F = K.target, Z = K.currentTarget;
|
|
1500
|
-
|
|
1500
|
+
L.current = F, U.current.focusTimeout = setTimeout(function() {
|
|
1501
1501
|
var ue = F.selectionStart, Ce = F.selectionEnd, ge = F.value;
|
|
1502
1502
|
ge === void 0 && (ge = "");
|
|
1503
1503
|
var ce = ee(ge, ue);
|
|
1504
1504
|
ce !== ue && !(ue === 0 && Ce === ge.length) && X(F, ce, ge), b(Object.assign(Object.assign({}, K), { currentTarget: Z }));
|
|
1505
1505
|
}, 0);
|
|
1506
1506
|
}, Ee = function(K) {
|
|
1507
|
-
|
|
1508
|
-
}, Ge =
|
|
1507
|
+
L.current = null, clearTimeout(U.current.focusTimeout), clearTimeout(U.current.setCaretTimeout), h(K);
|
|
1508
|
+
}, Ge = $ && rp() ? "numeric" : void 0, Ye = Object.assign({ inputMode: Ge }, x, {
|
|
1509
1509
|
type: t,
|
|
1510
1510
|
value: O,
|
|
1511
1511
|
onChange: je,
|
|
@@ -1515,7 +1515,7 @@ function cp(e) {
|
|
|
1515
1515
|
onBlur: Ee
|
|
1516
1516
|
});
|
|
1517
1517
|
if (r === "text")
|
|
1518
|
-
return a ? le.createElement(le.Fragment, null, a(O,
|
|
1518
|
+
return a ? le.createElement(le.Fragment, null, a(O, x) || null) : le.createElement("span", Object.assign({}, x, { ref: i }), O);
|
|
1519
1519
|
if (n) {
|
|
1520
1520
|
var mt = n;
|
|
1521
1521
|
return le.createElement(mt, Object.assign({}, Ye, { ref: i }));
|
|
@@ -1568,25 +1568,25 @@ function fp(e, t, r) {
|
|
|
1568
1568
|
var h = l === 0 ? "" : g;
|
|
1569
1569
|
e = e.substring(0, d) + h + e.substring(d + 1, e.length);
|
|
1570
1570
|
}
|
|
1571
|
-
var v = function(
|
|
1571
|
+
var v = function(L, U, G) {
|
|
1572
1572
|
var H = !1, X = !1;
|
|
1573
|
-
i.startsWith("-") ? H = !1 :
|
|
1573
|
+
i.startsWith("-") ? H = !1 : L.startsWith("--") ? (H = !1, X = !0) : s.startsWith("-") && L.length === s.length ? H = !1 : L[0] === "-" && (H = !0);
|
|
1574
1574
|
var ee = H ? 1 : 0;
|
|
1575
|
-
return X && (ee = 2), ee && (
|
|
1576
|
-
},
|
|
1577
|
-
n =
|
|
1578
|
-
var
|
|
1579
|
-
e.length &&
|
|
1575
|
+
return X && (ee = 2), ee && (L = L.substring(ee), U -= ee, G -= ee), { value: L, start: U, end: G, hasNegation: H };
|
|
1576
|
+
}, y = v(e, d, p), N = y.hasNegation;
|
|
1577
|
+
n = y, e = n.value, d = n.start, p = n.end;
|
|
1578
|
+
var w = v(t.lastValue, c.start, c.end), x = w.start, j = w.end, C = w.value, O = e.substring(d, p);
|
|
1579
|
+
e.length && C.length && (x > C.length - s.length || j < i.length) && !(O && s.startsWith(O)) && (e = C);
|
|
1580
1580
|
var E = 0;
|
|
1581
1581
|
e.startsWith(i) ? E += i.length : d < i.length && (E = d), e = e.substring(E), p -= E;
|
|
1582
1582
|
var T = e.length, B = e.length - s.length;
|
|
1583
|
-
e.endsWith(s) ? T = B : (p > B || p > e.length - s.length) && (T = p), e = e.substring(0, T), e = dp(
|
|
1583
|
+
e.endsWith(s) ? T = B : (p > B || p > e.length - s.length) && (T = p), e = e.substring(0, T), e = dp(N ? "-" + e : e, a), e = (e.match(up(g)) || []).join("");
|
|
1584
1584
|
var V = e.indexOf(g);
|
|
1585
|
-
e = e.replace(new RegExp(el(g), "g"), function(
|
|
1585
|
+
e = e.replace(new RegExp(el(g), "g"), function(L, U) {
|
|
1586
1586
|
return U === V ? "." : "";
|
|
1587
1587
|
});
|
|
1588
|
-
var
|
|
1589
|
-
return u.end - u.start < c.end - c.start && I === "" && b && !parseFloat(
|
|
1588
|
+
var S = Ga(e, a), I = S.beforeDecimal, $ = S.afterDecimal, A = S.addNegation;
|
|
1589
|
+
return u.end - u.start < c.end - c.start && I === "" && b && !parseFloat($) && (e = A ? "-" : ""), e;
|
|
1590
1590
|
}
|
|
1591
1591
|
function mp(e, t) {
|
|
1592
1592
|
var r = t.prefix;
|
|
@@ -1624,35 +1624,35 @@ function vp(e) {
|
|
|
1624
1624
|
i === void 0 && (i = Dt);
|
|
1625
1625
|
var s = e.thousandSeparator, l = e.decimalScale, c = e.fixedDecimalScale, u = e.prefix;
|
|
1626
1626
|
u === void 0 && (u = "");
|
|
1627
|
-
var d = e.defaultValue, p = e.value, f = e.valueIsNumericString, m = e.onValueChange, g = Js(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), b = Dn(e), h = b.decimalSeparator, v = b.allowedDecimalSeparators,
|
|
1627
|
+
var d = e.defaultValue, p = e.value, f = e.valueIsNumericString, m = e.onValueChange, g = Js(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), b = Dn(e), h = b.decimalSeparator, v = b.allowedDecimalSeparators, y = function(A) {
|
|
1628
1628
|
return zo(A, e);
|
|
1629
|
-
},
|
|
1630
|
-
return fp(A,
|
|
1631
|
-
},
|
|
1632
|
-
Jt(p) ? Jt(d) || (
|
|
1633
|
-
var
|
|
1634
|
-
return Zs(A) ? A : (typeof A == "number" && (A = rl(A)),
|
|
1635
|
-
},
|
|
1636
|
-
var
|
|
1629
|
+
}, N = function(A, L) {
|
|
1630
|
+
return fp(A, L, e);
|
|
1631
|
+
}, w = Jt(p) ? d : p, x = f ?? pp(w, u, t);
|
|
1632
|
+
Jt(p) ? Jt(d) || (x = x || typeof d == "number") : x = x || typeof p == "number";
|
|
1633
|
+
var j = function(A) {
|
|
1634
|
+
return Zs(A) ? A : (typeof A == "number" && (A = rl(A)), x && typeof l == "number" ? Uo(A, l, !!c) : A);
|
|
1635
|
+
}, C = al(j(p), j(d), !!x, y, N, m), O = C[0], E = O.numAsString, T = O.formattedValue, B = C[1], V = function(A) {
|
|
1636
|
+
var L = A.target, U = A.key, G = L.selectionStart, H = L.selectionEnd, X = L.value;
|
|
1637
1637
|
if (X === void 0 && (X = ""), (U === "Backspace" || U === "Delete") && H < u.length) {
|
|
1638
1638
|
A.preventDefault();
|
|
1639
1639
|
return;
|
|
1640
1640
|
}
|
|
1641
|
-
if (
|
|
1641
|
+
if (G !== H) {
|
|
1642
1642
|
a(A);
|
|
1643
1643
|
return;
|
|
1644
1644
|
}
|
|
1645
|
-
U === "Backspace" && X[0] === "-" &&
|
|
1645
|
+
U === "Backspace" && X[0] === "-" && G === u.length + 1 && r && $t(L, 1), l && c && (U === "Backspace" && X[G - 1] === h ? ($t(L, G - 1), A.preventDefault()) : U === "Delete" && X[G] === h && A.preventDefault()), v != null && v.includes(U) && X[G] === h && $t(L, G + 1);
|
|
1646
1646
|
var ee = s === !0 ? "," : s;
|
|
1647
|
-
U === "Backspace" && X[
|
|
1648
|
-
},
|
|
1649
|
-
var
|
|
1650
|
-
if (
|
|
1651
|
-
var U = zo(
|
|
1647
|
+
U === "Backspace" && X[G - 1] === ee && $t(L, G - 1), U === "Delete" && X[G] === ee && $t(L, G + 1), a(A);
|
|
1648
|
+
}, S = function(A) {
|
|
1649
|
+
var L = E;
|
|
1650
|
+
if (L.match(/\d/g) || (L = ""), n || (L = Zu(L)), c && l && (L = Uo(L, l, c)), L !== E) {
|
|
1651
|
+
var U = zo(L, e);
|
|
1652
1652
|
B({
|
|
1653
1653
|
formattedValue: U,
|
|
1654
|
-
value:
|
|
1655
|
-
floatValue: parseFloat(
|
|
1654
|
+
value: L,
|
|
1655
|
+
floatValue: parseFloat(L)
|
|
1656
1656
|
}, {
|
|
1657
1657
|
event: A,
|
|
1658
1658
|
source: _r.event
|
|
@@ -1661,64 +1661,64 @@ function vp(e) {
|
|
|
1661
1661
|
i(A);
|
|
1662
1662
|
}, I = function(A) {
|
|
1663
1663
|
return A === h ? !0 : Or(A);
|
|
1664
|
-
},
|
|
1665
|
-
var
|
|
1666
|
-
return
|
|
1664
|
+
}, $ = function(A) {
|
|
1665
|
+
var L = A.currentValue, U = A.lastValue, G = A.formattedValue, H = A.currentValueIndex, X = A.formattedValueIndex, ee = L[H], ie = G[X], se = nl(U, L), be = se.to, W = function(ae) {
|
|
1666
|
+
return N(ae).indexOf(".") + u.length;
|
|
1667
1667
|
};
|
|
1668
|
-
return p === 0 && c && l &&
|
|
1668
|
+
return p === 0 && c && l && L[be.start] === h && W(L) < H && W(G) > X ? !1 : H >= be.start && H < be.end && v && v.includes(ee) && ie === h ? !0 : ee === ie;
|
|
1669
1669
|
};
|
|
1670
1670
|
return Object.assign(Object.assign({}, g), {
|
|
1671
1671
|
value: T,
|
|
1672
1672
|
valueIsNumericString: !1,
|
|
1673
1673
|
isValidInputCharacter: I,
|
|
1674
|
-
isCharacterSame:
|
|
1674
|
+
isCharacterSame: $,
|
|
1675
1675
|
onValueChange: B,
|
|
1676
|
-
format:
|
|
1677
|
-
removeFormatting:
|
|
1676
|
+
format: y,
|
|
1677
|
+
removeFormatting: N,
|
|
1678
1678
|
getCaretBoundary: function(A) {
|
|
1679
1679
|
return mp(A, e);
|
|
1680
1680
|
},
|
|
1681
1681
|
onKeyDown: V,
|
|
1682
|
-
onBlur:
|
|
1682
|
+
onBlur: S
|
|
1683
1683
|
});
|
|
1684
1684
|
}
|
|
1685
1685
|
function Wa(e) {
|
|
1686
1686
|
var t = vp(e);
|
|
1687
1687
|
return le.createElement(cp, Object.assign({}, t));
|
|
1688
1688
|
}
|
|
1689
|
-
const hp = ({ InputContainer: e = ar, value: t, onChange: r, debounceMs: n, label: a, withoutLabel: i, 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:
|
|
1690
|
-
const
|
|
1689
|
+
const hp = ({ InputContainer: e = ar, value: t, onChange: r, debounceMs: n, label: a, withoutLabel: i, 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: y, min: N, max: w, hint: x }) => {
|
|
1690
|
+
const j = P(() => {
|
|
1691
1691
|
if (!r)
|
|
1692
1692
|
return;
|
|
1693
1693
|
const V = p ?? null;
|
|
1694
1694
|
r(V ? Number(V) : null);
|
|
1695
|
-
}, [p, r]),
|
|
1696
|
-
const
|
|
1697
|
-
r && r(
|
|
1695
|
+
}, [p, r]), C = re(null), [O, E] = k((t == null ? void 0 : t.toString()) ?? ""), T = P((V) => {
|
|
1696
|
+
const S = V;
|
|
1697
|
+
r && r(S == null || S === "" ? null : Number(S));
|
|
1698
1698
|
}, [r]), B = P((V) => {
|
|
1699
|
-
var I,
|
|
1700
|
-
let
|
|
1701
|
-
if (Number.isNaN(
|
|
1702
|
-
T(
|
|
1699
|
+
var I, $;
|
|
1700
|
+
let S = parseFloat((($ = (I = V.target) == null ? void 0 : I.value) == null ? void 0 : $.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
|
|
1701
|
+
if (Number.isNaN(S) && (S = 0), !n) {
|
|
1702
|
+
T(S.toString());
|
|
1703
1703
|
return;
|
|
1704
1704
|
}
|
|
1705
|
-
E(
|
|
1706
|
-
T(
|
|
1705
|
+
E(S.toString()), C.current !== null && window.clearTimeout(C.current), C.current = window.setTimeout(() => {
|
|
1706
|
+
T(S.toString());
|
|
1707
1707
|
}, n);
|
|
1708
1708
|
}, [n, T]);
|
|
1709
1709
|
return q(() => {
|
|
1710
1710
|
E(t === null ? "" : t.toString());
|
|
1711
|
-
}, [
|
|
1712
|
-
|
|
1713
|
-
}, [O,
|
|
1714
|
-
!r || t === null || (
|
|
1715
|
-
}, [t,
|
|
1716
|
-
/* @__PURE__ */ o.jsx(Wa, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: b, fixedDecimalScale: h, prefix: v, suffix:
|
|
1711
|
+
}, [w, N, t]), q(() => {
|
|
1712
|
+
w !== void 0 && Number(O) > w && E(w.toString()), N !== void 0 && Number(O) < N && E(N.toString());
|
|
1713
|
+
}, [O, w, N, E]), q(() => {
|
|
1714
|
+
!r || t === null || (w !== void 0 && t > w && r(w), N !== void 0 && t < N && r(N));
|
|
1715
|
+
}, [t, w, N, r]), /* @__PURE__ */ o.jsxs(e, { withoutLabel: i, label: a ?? "", hidden: c, className: f, hint: x, disabled: u, children: [
|
|
1716
|
+
/* @__PURE__ */ o.jsx(Wa, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: b, fixedDecimalScale: h, prefix: v, suffix: y, defaultValue: "", value: n ? O : (t == null ? void 0 : t.toString()) ?? "", placeholder: s ?? a, onFocus: (V) => {
|
|
1717
1717
|
!g && V.target.select();
|
|
1718
1718
|
}, onChange: B, hidden: c, disabled: u, className: _("form-control text-end w-100", {
|
|
1719
1719
|
[`form-control-${l}`]: l
|
|
1720
|
-
}), step: m, min:
|
|
1721
|
-
d && t !== null && r && !u && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ o.jsx(te, { color: "secondary", size: "sm", onClick:
|
|
1720
|
+
}), step: m, min: N, max: w }),
|
|
1721
|
+
d && t !== null && r && !u && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ o.jsx(te, { color: "secondary", size: "sm", onClick: j, children: /* @__PURE__ */ o.jsx(Ot, {}) }) })
|
|
1722
1722
|
] });
|
|
1723
1723
|
}, bp = ({ InputContainer: e = Oe, label: t, options: r, disabled: n, hidden: a, className: i, value: s, onChange: l }) => {
|
|
1724
1724
|
const c = P((u) => {
|
|
@@ -1726,60 +1726,60 @@ const hp = ({ InputContainer: e = ar, value: t, onChange: r, debounceMs: n, labe
|
|
|
1726
1726
|
}, [l]);
|
|
1727
1727
|
return /* @__PURE__ */ o.jsx(e, { isForRadioInput: !0, hidden: a, withoutLabel: !t, label: `${t}`, className: i, disabled: n, children: r.map((u) => /* @__PURE__ */ o.jsx(Pe.Check, { id: `radio-${u.id}`, label: u.name, type: "radio", value: u.id ?? "", checked: s === u.id, onChange: c, hidden: a, disabled: n, className: "w-100" }, u.id)) });
|
|
1728
1728
|
}, yN = ({ InputContainer: e = Oe, formField: t, label: r, resetsFields: n, type: a, required: i, hidden: s, disabled: l, withoutLabel: c, hint: u, onChange: d, className: p }) => {
|
|
1729
|
-
const { register: f, formState: m, setValue: g } = xt(), b = bt({ falseIfNotInit: !0 }), [h, v] = k(void 0), [
|
|
1729
|
+
const { register: f, formState: m, setValue: g } = xt(), b = bt({ falseIfNotInit: !0 }), [h, v] = k(void 0), [y, N] = k(!1);
|
|
1730
1730
|
q(() => {
|
|
1731
|
-
const
|
|
1732
|
-
let
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
}), v(
|
|
1731
|
+
const j = t.split(".");
|
|
1732
|
+
let C = m.errors;
|
|
1733
|
+
j.forEach((O) => {
|
|
1734
|
+
C !== void 0 && (C = C[O]);
|
|
1735
|
+
}), v(C);
|
|
1736
1736
|
}, [m, t]);
|
|
1737
|
-
const
|
|
1737
|
+
const w = M(() => l || b, [l, b]), x = h !== void 0;
|
|
1738
1738
|
return q(() => {
|
|
1739
|
-
m.isSubmitted &&
|
|
1740
|
-
}, [m]), /* @__PURE__ */ o.jsxs(e, { isForCheckInput: !0, hidden: s, label: r ?? "", required: i, disabled:
|
|
1739
|
+
m.isSubmitted && N(!0);
|
|
1740
|
+
}, [m]), /* @__PURE__ */ o.jsxs(e, { isForCheckInput: !0, hidden: s, label: r ?? "", required: i, disabled: w, isInvalid: x, withoutLabel: c, hint: u, className: p, children: [
|
|
1741
1741
|
/* @__PURE__ */ o.jsx(Pe.Check, { id: `check-${t}`, type: a ?? "checkbox", label: `${r}${i ? " *" : ""}`, ...f(t, {
|
|
1742
|
-
onChange: (
|
|
1743
|
-
n && n.forEach((
|
|
1742
|
+
onChange: (j) => {
|
|
1743
|
+
n && n.forEach((C) => g(C, null, { shouldDirty: !0, shouldValidate: y })), d && d(j.target.value ?? null);
|
|
1744
1744
|
}
|
|
1745
|
-
}), isInvalid:
|
|
1745
|
+
}), isInvalid: x, hidden: s, disabled: w, className: "w-100" }),
|
|
1746
1746
|
h && /* @__PURE__ */ o.jsx(zt, { message: h.message })
|
|
1747
1747
|
] });
|
|
1748
1748
|
}, wN = ({ InputContainer: e = Oe, label: t, formField: r, options: n, resetsFields: a, required: i, disabled: s, hidden: l, onChange: c, className: u }) => {
|
|
1749
|
-
const { register: d, formState: p, setValue: f, watch: m } = xt(), g = bt({ falseIfNotInit: !0 }), [b, h] = k(void 0), [v,
|
|
1749
|
+
const { register: d, formState: p, setValue: f, watch: m } = xt(), g = bt({ falseIfNotInit: !0 }), [b, h] = k(void 0), [v, y] = k(!1), N = M(() => n, [n]), w = M(() => s || g, [s, g]);
|
|
1750
1750
|
q(() => {
|
|
1751
|
-
const
|
|
1752
|
-
let
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
}), h(
|
|
1751
|
+
const j = r.split(".");
|
|
1752
|
+
let C = p.errors;
|
|
1753
|
+
j.forEach((O) => {
|
|
1754
|
+
C !== void 0 && (C = C[O]);
|
|
1755
|
+
}), h(C);
|
|
1756
1756
|
}, [p, r]), q(() => {
|
|
1757
|
-
p.isSubmitted &&
|
|
1757
|
+
p.isSubmitted && y(!0);
|
|
1758
1758
|
}, [p]);
|
|
1759
|
-
const
|
|
1760
|
-
return /* @__PURE__ */ o.jsxs(e, { isForRadioInput: !0, hidden: l, withoutLabel: !t, label: t ?? "", required: i, disabled:
|
|
1761
|
-
|
|
1762
|
-
onChange: (
|
|
1759
|
+
const x = b !== void 0;
|
|
1760
|
+
return /* @__PURE__ */ o.jsxs(e, { isForRadioInput: !0, hidden: l, withoutLabel: !t, label: t ?? "", required: i, disabled: w, isInvalid: x, className: u, children: [
|
|
1761
|
+
N.map((j) => /* @__PURE__ */ o.jsx(Pe.Check, { id: `radio-${j.id}`, label: j.name, type: "radio", value: j.id ?? "", checked: m(r) === j.id, ...d(r, {
|
|
1762
|
+
onChange: (C) => {
|
|
1763
1763
|
var O;
|
|
1764
|
-
a && a.forEach((E) => f(E, null, { shouldDirty: !0, shouldValidate: v })), c && c((O =
|
|
1764
|
+
a && a.forEach((E) => f(E, null, { shouldDirty: !0, shouldValidate: v })), c && c((O = C.target) != null && O.value ? C.target.value.toString() : null);
|
|
1765
1765
|
}
|
|
1766
|
-
}), isInvalid:
|
|
1766
|
+
}), isInvalid: x, hidden: l, disabled: w, className: "w-100" }, j.id)),
|
|
1767
1767
|
b && /* @__PURE__ */ o.jsx(zt, { message: b.message })
|
|
1768
1768
|
] });
|
|
1769
1769
|
}, NN = ({ label: e, InputContainer: t = Oe, className: r, withoutLabel: n, hidden: a, disabled: i, contactType: s, formField: l, ...c }) => {
|
|
1770
|
-
const { watch: u } = xt(), d = u(l), p = bt({ falseIfNotInit: !0 }), f =
|
|
1770
|
+
const { watch: u } = xt(), d = u(l), p = bt({ falseIfNotInit: !0 }), f = M(() => i || p, [i, p]);
|
|
1771
1771
|
return a ? null : /* @__PURE__ */ o.jsx(Qs, { contactType: s, value: d, withoutLabel: n, label: e, className: r, children: /* @__PURE__ */ o.jsx(la, { type: "text", formField: l, InputContainer: t, size: "sm", withoutLabel: !0, className: "flex-grow-1", disabled: f, ...c }) });
|
|
1772
|
-
}, DN = ({ InputContainer: e = Oe, formField: t, label: r, size: n, defaultSelection: a, resetsFields: i, 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:
|
|
1773
|
-
const { formState:
|
|
1772
|
+
}, DN = ({ InputContainer: e = Oe, formField: t, label: r, size: n, defaultSelection: a, resetsFields: i, 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: y, icon: N, displayIdAsName: w, onSelect: x, className: j, archiveColumn: C, hint: O, addNewOptionPath: E, refreshOptions: T, MiniDetailComponent: B, miniDetailPlacement: V, suggestedItems: S, suggestedItemsTitle: I }) => {
|
|
1773
|
+
const { formState: $, setValue: A, watch: L, control: U } = xt(), G = bt({ falseIfNotInit: !0 }), [H, X] = k(void 0), [ee, ie] = k(!1), [se, be] = k(!1), W = L(t) ?? null, ae = W === (a == null ? void 0 : a.id) ? a == null ? void 0 : a.name : L(`${t}-DropdownName`), me = M(() => W == null ? null : { id: W ?? null, name: ae ?? "" }, [W, ae]), je = P(() => {
|
|
1774
1774
|
const F = t.split(".");
|
|
1775
|
-
let Z =
|
|
1775
|
+
let Z = $.errors;
|
|
1776
1776
|
F.forEach((ue) => {
|
|
1777
1777
|
Z !== void 0 && (Z = Z[ue]);
|
|
1778
1778
|
}), X(Z);
|
|
1779
|
-
}, [
|
|
1779
|
+
}, [$, t]), pe = P((F) => {
|
|
1780
1780
|
if ((F == null ? void 0 : F.id) === W)
|
|
1781
1781
|
return;
|
|
1782
|
-
if (
|
|
1782
|
+
if (x && x(F), i && i.forEach((ue) => A(ue, null, { shouldDirty: !0, shouldValidate: se })), F === null) {
|
|
1783
1783
|
A(t, null, {
|
|
1784
1784
|
shouldDirty: !0,
|
|
1785
1785
|
shouldValidate: se
|
|
@@ -1791,18 +1791,18 @@ const hp = ({ InputContainer: e = ar, value: t, onChange: r, debounceMs: n, labe
|
|
|
1791
1791
|
shouldDirty: !0,
|
|
1792
1792
|
shouldValidate: se
|
|
1793
1793
|
}), A(`${t}-DropdownName`, F.name ?? "");
|
|
1794
|
-
}, [A, t, se, s, i, W,
|
|
1794
|
+
}, [A, t, se, s, i, W, x]), R = P((F) => {
|
|
1795
1795
|
ie(!1), pe(F);
|
|
1796
1796
|
}, [pe]), de = P(() => {
|
|
1797
1797
|
ie(!1);
|
|
1798
|
-
}, []), Ee = re(null), Ge = H !== void 0, Ye = f !== void 0, mt = Ye && me !== null, K =
|
|
1798
|
+
}, []), Ee = re(null), Ge = H !== void 0, Ye = f !== void 0, mt = Ye && me !== null, K = M(() => u || G, [u, G]);
|
|
1799
1799
|
return q(() => {
|
|
1800
1800
|
je();
|
|
1801
1801
|
}, [je]), q(() => {
|
|
1802
|
-
|
|
1803
|
-
}, [
|
|
1802
|
+
$.isSubmitted && be(!0);
|
|
1803
|
+
}, [$]), /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsxs(e, { label: r ?? "", required: l, disabled: K, hidden: c, withoutLabel: h, isInvalid: Ge, inputContainerClassName: _({ "luminus-dropdown-select-open": ee }), hint: O, className: j, children: [
|
|
1804
1804
|
/* @__PURE__ */ o.jsxs(Oa, { currentSelection: me, selectedItemNavigateTo: f, children: [
|
|
1805
|
-
|
|
1805
|
+
w && (me == null ? void 0 : me.name) && /* @__PURE__ */ o.jsx(Y, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: me.name }),
|
|
1806
1806
|
/* @__PURE__ */ o.jsx(Ba, { control: U, name: t, render: () => /* @__PURE__ */ o.jsx(Pa, { value: W, MiniDetailComponent: B, miniDetailPlacement: V, children: /* @__PURE__ */ o.jsx(Pe.Select, { size: n, onMouseDown: (F) => {
|
|
1807
1807
|
F.currentTarget.focus(), F.preventDefault();
|
|
1808
1808
|
}, onClick: () => {
|
|
@@ -1811,53 +1811,53 @@ const hp = ({ InputContainer: e = ar, value: t, onChange: r, debounceMs: n, labe
|
|
|
1811
1811
|
}, isInvalid: Ge, hidden: c, className: _("w-100", {
|
|
1812
1812
|
"luminus-dropdown-picker-disabled": K,
|
|
1813
1813
|
"luminus-dropdown-picker-link": mt
|
|
1814
|
-
}), children: /* @__PURE__ */ o.jsx("option", { value: W, children:
|
|
1815
|
-
|
|
1816
|
-
!
|
|
1814
|
+
}), children: /* @__PURE__ */ o.jsx("option", { value: W, children: w ? W : (ae == null ? void 0 : ae.length) > 0 ? ae : W }) }) }) }),
|
|
1815
|
+
y || !K && Ye ? /* @__PURE__ */ o.jsxs("div", { className: "custom-picker-button", children: [
|
|
1816
|
+
!y && !K && Ye && /* @__PURE__ */ o.jsx(te, { size: "sm", color: "secondary", onClick: (F) => {
|
|
1817
1817
|
F.preventDefault(), F.stopPropagation(), ie(!0);
|
|
1818
|
-
}, children:
|
|
1819
|
-
|
|
1818
|
+
}, children: N ?? /* @__PURE__ */ o.jsx(vs, {}) }),
|
|
1819
|
+
y ?? null
|
|
1820
1820
|
] }) : null
|
|
1821
1821
|
] }),
|
|
1822
1822
|
H && /* @__PURE__ */ o.jsx(zt, { message: H.message }),
|
|
1823
|
-
Ee.current && /* @__PURE__ */ o.jsx(Ta, { show: ee, onCancel: de, items: d, currentSelection: me, onSelectionChange: R, onSearchQueryChange: p, texts: m, itemsNameWidth: g, additionalColumns: v, displayIdAsName:
|
|
1823
|
+
Ee.current && /* @__PURE__ */ o.jsx(Ta, { show: ee, onCancel: de, items: d, currentSelection: me, onSelectionChange: R, onSearchQueryChange: p, texts: m, itemsNameWidth: g, additionalColumns: v, displayIdAsName: w, isLoading: b, disabled: K, inputRef: Ee, archiveColumn: C, addNewOptionPath: E, refreshOptions: T, suggestedItems: S, suggestedItemsTitle: I })
|
|
1824
1824
|
] }) });
|
|
1825
1825
|
}, jN = ({ InputContainer: e = Oe, label: t, formField: r, hidden: n, required: a, placeholder: i, disabled: s, showClearIcon: l, resetsFields: c, multiple: u, accept: d, withoutLabel: p, hint: f, className: m }) => {
|
|
1826
|
-
const { watch: g, setValue: b, register: h, formState: v } = xt(),
|
|
1826
|
+
const { watch: g, setValue: b, register: h, formState: v } = xt(), y = bt({ falseIfNotInit: !0 }), [N, w] = k(!1), [x, j] = k(void 0), C = P(() => {
|
|
1827
1827
|
b(r, "");
|
|
1828
1828
|
}, [b, r]), O = P(() => {
|
|
1829
1829
|
const B = r.split(".");
|
|
1830
1830
|
let V = v.errors;
|
|
1831
|
-
B.forEach((
|
|
1832
|
-
V !== void 0 && (V = V[
|
|
1833
|
-
}),
|
|
1831
|
+
B.forEach((S) => {
|
|
1832
|
+
V !== void 0 && (V = V[S]);
|
|
1833
|
+
}), j(V);
|
|
1834
1834
|
}, [v, r]);
|
|
1835
1835
|
q(O, [O]), q(() => {
|
|
1836
|
-
v.isSubmitted &&
|
|
1836
|
+
v.isSubmitted && w(!0);
|
|
1837
1837
|
}, [v]);
|
|
1838
|
-
const E =
|
|
1838
|
+
const E = M(() => s || y, [s, y]), T = x !== void 0;
|
|
1839
1839
|
return /* @__PURE__ */ o.jsxs(e, { label: t ?? "", required: a, disabled: E, hidden: n, withoutLabel: p, isInvalid: T, hint: f, className: m, children: [
|
|
1840
1840
|
/* @__PURE__ */ o.jsx(ed, { type: "file", multiple: u, accept: d.join(", "), placeholder: i ?? t, isInvalid: T, hidden: n, disabled: E, className: "w-100", ...h(r, {
|
|
1841
1841
|
onChange: () => {
|
|
1842
|
-
c && c.forEach((B) => b(B, null, { shouldDirty: !0, shouldValidate:
|
|
1842
|
+
c && c.forEach((B) => b(B, null, { shouldDirty: !0, shouldValidate: N }));
|
|
1843
1843
|
}
|
|
1844
1844
|
}) }),
|
|
1845
|
-
l && g(r) && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ o.jsx(te, { color: "secondary", size: "sm", onClick:
|
|
1846
|
-
|
|
1845
|
+
l && g(r) && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ o.jsx(te, { color: "secondary", size: "sm", onClick: C, children: /* @__PURE__ */ o.jsx(Ot, {}) }) }),
|
|
1846
|
+
x && /* @__PURE__ */ o.jsx(zt, { message: x.message })
|
|
1847
1847
|
] });
|
|
1848
1848
|
}, xp = ({ children: e, onStorno: t, noSpacer: r }) => {
|
|
1849
1849
|
const { formState: n } = xt(), a = bt({ falseIfNotInit: !0 }), [i, s] = k(!1);
|
|
1850
1850
|
return q(() => {
|
|
1851
1851
|
s(Object.keys(n.dirtyFields).length > 0);
|
|
1852
1852
|
}, [n]), i ? /* @__PURE__ */ o.jsx(ju, { onStorno: t, noSpacer: r, disabled: a, children: e }) : null;
|
|
1853
|
-
}, qo = ({ InputContainer: e = Oe, options: t, formField: r, label: n, size: a, resetsFields: i, 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:
|
|
1854
|
-
const { texts: { customSelect:
|
|
1853
|
+
}, qo = ({ InputContainer: e = Oe, options: t, formField: r, label: n, size: a, resetsFields: i, 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: y, MiniDetailComponent: N, miniDetailPlacement: w, selectedItemNavigateTo: x }) => {
|
|
1854
|
+
const { texts: { customSelect: j } } = z(J), { formState: C, setValue: O, watch: E, control: T } = xt(), B = bt({ falseIfNotInit: !0 }), [V, S] = k(void 0), [I, $] = k(!1), [A, L] = k(!1), [U, G] = k(""), H = E(r), X = M(() => t.find((R) => R.id === H) ?? null, [t, H]), ee = P(() => {
|
|
1855
1855
|
const R = r.split(".");
|
|
1856
|
-
let de =
|
|
1856
|
+
let de = C.errors;
|
|
1857
1857
|
R.forEach((Ee) => {
|
|
1858
1858
|
de !== void 0 && (de = de[Ee]);
|
|
1859
|
-
}),
|
|
1860
|
-
}, [
|
|
1859
|
+
}), S(de);
|
|
1860
|
+
}, [C, r]), ie = P((R) => {
|
|
1861
1861
|
if ((R == null ? void 0 : R.id) === H)
|
|
1862
1862
|
return;
|
|
1863
1863
|
if (m && m(R), i && i.forEach((Ee) => O(Ee, null, { shouldDirty: !0, shouldValidate: A })), R === null) {
|
|
@@ -1873,19 +1873,19 @@ const hp = ({ InputContainer: e = ar, value: t, onChange: r, debounceMs: n, labe
|
|
|
1873
1873
|
shouldValidate: A
|
|
1874
1874
|
});
|
|
1875
1875
|
}, [O, r, s, i, H, A, m]), se = P((R) => {
|
|
1876
|
-
|
|
1876
|
+
$(!1), ie(R);
|
|
1877
1877
|
}, [ie]), be = P((R) => {
|
|
1878
|
-
|
|
1879
|
-
}, []), W =
|
|
1878
|
+
G(R);
|
|
1879
|
+
}, []), W = M(() => u || B, [u, B]);
|
|
1880
1880
|
q(() => {
|
|
1881
1881
|
ee();
|
|
1882
1882
|
}, [ee]), q(() => {
|
|
1883
|
-
|
|
1884
|
-
}, [
|
|
1883
|
+
C.isSubmitted && L(!0);
|
|
1884
|
+
}, [C]);
|
|
1885
1885
|
const ae = P((R) => {
|
|
1886
1886
|
var de;
|
|
1887
1887
|
return R === null ? "" : !R.name || R.name.length === 0 ? ((de = R.id) == null ? void 0 : de.toString()) ?? "" : f ? `${R.name} (${R.id})` : R.name;
|
|
1888
|
-
}, [f]), me =
|
|
1888
|
+
}, [f]), me = M(() => {
|
|
1889
1889
|
const R = t ? [...t] : [];
|
|
1890
1890
|
return b !== void 0 && H && (R.some((de) => de.id === H) || R.push({ id: H, name: b })), R.map((de) => ({
|
|
1891
1891
|
id: de.id,
|
|
@@ -1900,19 +1900,19 @@ const hp = ({ InputContainer: e = ar, value: t, onChange: r, debounceMs: n, labe
|
|
|
1900
1900
|
H
|
|
1901
1901
|
]), je = re(null), pe = V !== void 0;
|
|
1902
1902
|
return /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsxs(e, { label: n ?? "", required: l, disabled: W, hidden: c, withoutLabel: d, isInvalid: pe, inputContainerClassName: _({ "luminus-dropdown-select-open": I }), hint: h, className: g, children: [
|
|
1903
|
-
/* @__PURE__ */ o.jsx(Oa, { currentSelection: X, selectedItemNavigateTo:
|
|
1903
|
+
/* @__PURE__ */ o.jsx(Oa, { currentSelection: X, selectedItemNavigateTo: x, children: /* @__PURE__ */ o.jsx(Ba, { control: T, name: r, render: () => /* @__PURE__ */ o.jsx(Pa, { value: H, MiniDetailComponent: N, miniDetailPlacement: w, children: /* @__PURE__ */ o.jsx(Pe.Select, { size: a, onMouseDown: (R) => {
|
|
1904
1904
|
R.currentTarget.focus(), R.preventDefault();
|
|
1905
1905
|
}, onClick: () => {
|
|
1906
|
-
|
|
1906
|
+
$(!0);
|
|
1907
1907
|
}, ref: je, value: H ?? "", onChange: () => {
|
|
1908
1908
|
}, isInvalid: pe, hidden: c, disabled: W, className: "w-100", children: /* @__PURE__ */ o.jsx("option", { value: (X == null ? void 0 : X.id) ?? "", children: ae(X) }) }) }) }) }),
|
|
1909
1909
|
V && /* @__PURE__ */ o.jsx(zt, { message: V.message }),
|
|
1910
|
-
je.current && /* @__PURE__ */ o.jsx(Ta, { show: I, onCancel: () =>
|
|
1910
|
+
je.current && /* @__PURE__ */ o.jsx(Ta, { show: I, onCancel: () => $(!1), items: me, currentSelection: X ?? null, onSelectionChange: se, onSearchQueryChange: be, texts: j, disabled: W, inputRef: je, autoHideSearch: !0, allItemsLength: t.length, addNewOptionPath: v, refreshOptions: y })
|
|
1911
1911
|
] }) });
|
|
1912
|
-
}, CN = ({ InputContainer: e = Oe, formField: t, label: r, placeholder: n, size: a, resetsFields: i, 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:
|
|
1913
|
-
const { register:
|
|
1914
|
-
|
|
1915
|
-
}, [h, b,
|
|
1912
|
+
}, CN = ({ InputContainer: e = Oe, formField: t, label: r, placeholder: n, size: a, resetsFields: i, 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: y }) => {
|
|
1913
|
+
const { register: N, formState: w, setValue: x, watch: j } = xt(), C = bt({ falseIfNotInit: !0 }), [O, E] = k(void 0), [T, B] = k(!1), V = P((U, G, H) => {
|
|
1914
|
+
x(U, Nr(G, b, h), H);
|
|
1915
|
+
}, [h, b, x]), S = P(() => {
|
|
1916
1916
|
const U = l ?? null;
|
|
1917
1917
|
V(t, U !== null ? Number(U) : null, {
|
|
1918
1918
|
shouldDirty: !0,
|
|
@@ -1920,52 +1920,52 @@ const hp = ({ InputContainer: e = ar, value: t, onChange: r, debounceMs: n, labe
|
|
|
1920
1920
|
});
|
|
1921
1921
|
}, [l, V, t, T]), I = P(() => {
|
|
1922
1922
|
const U = t.split(".");
|
|
1923
|
-
let
|
|
1923
|
+
let G = w.errors;
|
|
1924
1924
|
U.forEach((H) => {
|
|
1925
|
-
|
|
1926
|
-
}), E(
|
|
1927
|
-
}, [
|
|
1925
|
+
G !== void 0 && (G = G[H]);
|
|
1926
|
+
}), E(G);
|
|
1927
|
+
}, [w, t]), $ = M(() => d || C, [d, C]);
|
|
1928
1928
|
q(() => {
|
|
1929
1929
|
I();
|
|
1930
1930
|
}, [I]), q(() => {
|
|
1931
|
-
|
|
1932
|
-
}, [
|
|
1933
|
-
const A = O !== void 0,
|
|
1934
|
-
return /* @__PURE__ */ o.jsxs(e, { label: r ?? "", required: c, disabled:
|
|
1931
|
+
w.isSubmitted && B(!0);
|
|
1932
|
+
}, [w]);
|
|
1933
|
+
const A = O !== void 0, L = j(t);
|
|
1934
|
+
return /* @__PURE__ */ o.jsxs(e, { label: r ?? "", required: c, disabled: $, hidden: u, withoutLabel: p, isInvalid: A, hint: y, className: g, children: [
|
|
1935
1935
|
/* @__PURE__ */ o.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
1936
|
-
/* @__PURE__ */ o.jsx(Pe.Control, { type: "number", placeholder: n ?? r, size: a, ...
|
|
1936
|
+
/* @__PURE__ */ o.jsx(Pe.Control, { type: "number", placeholder: n ?? r, size: a, ...N(t, {
|
|
1937
1937
|
setValueAs: (U) => U == null || U === "" ? null : Nr(Number(U), b, h),
|
|
1938
1938
|
min: b,
|
|
1939
1939
|
max: h,
|
|
1940
1940
|
onChange: (U) => {
|
|
1941
|
-
var
|
|
1942
|
-
i && i.forEach((H) =>
|
|
1941
|
+
var G;
|
|
1942
|
+
i && i.forEach((H) => x(H, null, { shouldDirty: !0, shouldValidate: T })), v && v((G = U.target) != null && G.value ? Number(U.target.value) ?? null : null);
|
|
1943
1943
|
}
|
|
1944
|
-
}), isInvalid: A, hidden: u, disabled:
|
|
1944
|
+
}), isInvalid: A, hidden: u, disabled: $, className: "w-100 luminus-numeric-stepper", step: f, min: b, max: h }),
|
|
1945
1945
|
/* @__PURE__ */ o.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ o.jsx(te, { size: "sm", onClick: (U) => {
|
|
1946
|
-
U.preventDefault(), U.stopPropagation(), V(t, ((
|
|
1946
|
+
U.preventDefault(), U.stopPropagation(), V(t, ((L ? Number(L) : 0) - m).toString(), { shouldDirty: !0, shouldValidate: T });
|
|
1947
1947
|
}, children: /* @__PURE__ */ o.jsx(hs, {}) }) }),
|
|
1948
1948
|
/* @__PURE__ */ o.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ o.jsx(te, { size: "sm", onClick: (U) => {
|
|
1949
|
-
U.preventDefault(), U.stopPropagation(), V(t, ((
|
|
1949
|
+
U.preventDefault(), U.stopPropagation(), V(t, ((L ? Number(L) : 0) + m).toString(), { shouldDirty: !0, shouldValidate: T });
|
|
1950
1950
|
}, children: /* @__PURE__ */ o.jsx(bs, {}) }) })
|
|
1951
1951
|
] }),
|
|
1952
|
-
s &&
|
|
1952
|
+
s && j(t) && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ o.jsx(te, { color: "secondary", size: "sm", onClick: S, children: /* @__PURE__ */ o.jsx(Ot, {}) }) }),
|
|
1953
1953
|
O && /* @__PURE__ */ o.jsx(zt, { message: O.message })
|
|
1954
1954
|
] });
|
|
1955
|
-
}, SN = ({ InputContainer: e = Oe, formField: t, label: r, placeholder: n, resetsFields: a, showClearIcon: i, 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:
|
|
1956
|
-
const { formState: O, setValue: E, watch: T, control: B } = xt(), V = bt({ falseIfNotInit: !0 }), [
|
|
1955
|
+
}, SN = ({ InputContainer: e = Oe, formField: t, label: r, placeholder: n, resetsFields: a, showClearIcon: i, 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: y, numberSuffix: N, min: w, max: x, onChange: j, hint: C }) => {
|
|
1956
|
+
const { formState: O, setValue: E, watch: T, control: B } = xt(), V = bt({ falseIfNotInit: !0 }), [S, I] = k(void 0), [$, A] = k(!1), L = P(() => {
|
|
1957
1957
|
const ee = s ?? null;
|
|
1958
1958
|
E(t, ee !== null ? Number(ee) : null, {
|
|
1959
1959
|
shouldDirty: !0,
|
|
1960
|
-
shouldValidate:
|
|
1960
|
+
shouldValidate: $
|
|
1961
1961
|
});
|
|
1962
|
-
}, [s, E, t,
|
|
1962
|
+
}, [s, E, t, $]), U = P(() => {
|
|
1963
1963
|
const ee = t.split(".");
|
|
1964
1964
|
let ie = O.errors;
|
|
1965
1965
|
ee.forEach((se) => {
|
|
1966
1966
|
ie !== void 0 && (ie = ie[se]);
|
|
1967
1967
|
}), I(ie);
|
|
1968
|
-
}, [O, t]),
|
|
1968
|
+
}, [O, t]), G = M(() => u || V, [u, V]);
|
|
1969
1969
|
q(() => {
|
|
1970
1970
|
U();
|
|
1971
1971
|
}, [U]), q(() => {
|
|
@@ -1973,28 +1973,28 @@ const hp = ({ InputContainer: e = ar, value: t, onChange: r, debounceMs: n, labe
|
|
|
1973
1973
|
}, [O]);
|
|
1974
1974
|
const H = T(t);
|
|
1975
1975
|
q(() => {
|
|
1976
|
-
|
|
1977
|
-
}, [t, H,
|
|
1978
|
-
const X =
|
|
1979
|
-
return /* @__PURE__ */ o.jsxs(e, { label: r ?? "", required: l, disabled:
|
|
1976
|
+
x !== void 0 && H > x && E(t, x), w !== void 0 && H < w && E(t, w);
|
|
1977
|
+
}, [t, H, x, w, E]);
|
|
1978
|
+
const X = S !== void 0;
|
|
1979
|
+
return /* @__PURE__ */ o.jsxs(e, { label: r ?? "", required: l, disabled: G, hidden: c, withoutLabel: d, isInvalid: X, hint: C, className: b, children: [
|
|
1980
1980
|
/* @__PURE__ */ o.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
1981
|
-
/* @__PURE__ */ o.jsx(Ba, { control: B, name: t, render: ({ field: { ref: ee, onChange: ie, name: se, value: be } }) => /* @__PURE__ */ o.jsx(Wa, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: h, fixedDecimalScale: v, prefix:
|
|
1981
|
+
/* @__PURE__ */ o.jsx(Ba, { control: B, name: t, render: ({ field: { ref: ee, onChange: ie, name: se, value: be } }) => /* @__PURE__ */ o.jsx(Wa, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: h, fixedDecimalScale: v, prefix: y, suffix: N, defaultValue: "", name: se, value: be ?? "", placeholder: n ?? r, onFocus: (W) => {
|
|
1982
1982
|
!g && W.target.select();
|
|
1983
1983
|
}, onChange: (W) => {
|
|
1984
1984
|
var je, pe;
|
|
1985
1985
|
const ae = parseFloat(((pe = (je = W.target) == null ? void 0 : je.value) == null ? void 0 : pe.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
|
|
1986
|
-
a && a.forEach((R) => E(R, null, { shouldDirty: !0, shouldValidate:
|
|
1986
|
+
a && a.forEach((R) => E(R, null, { shouldDirty: !0, shouldValidate: $ }));
|
|
1987
1987
|
const me = ae == null || Number.isNaN(ae) ? null : Number(ae);
|
|
1988
|
-
ie(me),
|
|
1989
|
-
}, hidden: c, disabled:
|
|
1988
|
+
ie(me), j && j(me);
|
|
1989
|
+
}, hidden: c, disabled: G, className: _("form-control text-end w-100", {
|
|
1990
1990
|
"is-invalid": X
|
|
1991
1991
|
}, {
|
|
1992
1992
|
[`form-control-${f}`]: f
|
|
1993
|
-
}), step: p, getInputRef: ee, min:
|
|
1993
|
+
}), step: p, getInputRef: ee, min: w, max: x }) }),
|
|
1994
1994
|
m && /* @__PURE__ */ o.jsx("div", { className: "custom-picker-button", children: m })
|
|
1995
1995
|
] }),
|
|
1996
|
-
i && T(t) && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ o.jsx(te, { color: "secondary", size: "sm", onClick:
|
|
1997
|
-
|
|
1996
|
+
i && T(t) && /* @__PURE__ */ o.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ o.jsx(te, { color: "secondary", size: "sm", onClick: L, children: /* @__PURE__ */ o.jsx(Ot, {}) }) }),
|
|
1997
|
+
S && /* @__PURE__ */ o.jsx(zt, { message: S.message })
|
|
1998
1998
|
] });
|
|
1999
1999
|
}, EN = ({ color: e = "primary", icon: t = /* @__PURE__ */ o.jsx(rd, { size: 12 }), inputId: r = "context-file-input", accept: n = "*", onUpload: a, multiple: i, className: s, children: l, ...c }) => {
|
|
2000
2000
|
const u = (d) => {
|
|
@@ -2030,11 +2030,11 @@ const hp = ({ InputContainer: e = ar, value: t, onChange: r, debounceMs: n, labe
|
|
|
2030
2030
|
}), t;
|
|
2031
2031
|
}, Np = (e) => e && e.type === "header" && e.member && e.member.caption !== "All" && // collapsed groups have this in continuing cells
|
|
2032
2032
|
e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo = (e) => !e.member && !e.isDrillThrough, Qo = (e, t) => typeof e == "function" ? e(t) : e.replace(":id", t), Dp = ({ dataSource: e, settings: t, pivotRef: r, localization: n, licenseKey: a, hyperlinkColumn: i, roomPasportization: s, enabled: l = !0 }) => {
|
|
2033
|
-
const { texts: { reports: c } } = z(J), [u, d] = k(!1), p = re(null), f = r ?? p, m =
|
|
2033
|
+
const { texts: { reports: c } } = z(J), [u, d] = k(!1), p = re(null), f = r ?? p, m = M(() => ({
|
|
2034
2034
|
localization: n
|
|
2035
|
-
}), [n]), g = P((
|
|
2036
|
-
delete
|
|
2037
|
-
const
|
|
2035
|
+
}), [n]), g = P((w) => {
|
|
2036
|
+
delete w[0], delete w[1], delete w[2];
|
|
2037
|
+
const x = [
|
|
2038
2038
|
{
|
|
2039
2039
|
id: "fm-tab-expand",
|
|
2040
2040
|
title: c.expandAll,
|
|
@@ -2048,92 +2048,110 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2048
2048
|
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'
|
|
2049
2049
|
}
|
|
2050
2050
|
];
|
|
2051
|
-
return
|
|
2051
|
+
return w.unshift({
|
|
2052
2052
|
id: "fm-tab-expand",
|
|
2053
2053
|
title: c.expand,
|
|
2054
2054
|
icon: '<svg height="42" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d=" M16 4 L28 4 L28 16 L24 12 L20 16 L16 12 L20 8z M4 16 L8 20 L12 16 L16 20 L12 24 L16 28 L4 28z "/></svg>',
|
|
2055
|
-
menu:
|
|
2055
|
+
menu: x,
|
|
2056
2056
|
rightGroup: !0
|
|
2057
|
-
}),
|
|
2058
|
-
}, [f, c.collapseAll, c.expand, c.expandAll]), b = (
|
|
2059
|
-
const
|
|
2060
|
-
|
|
2061
|
-
}
|
|
2057
|
+
}), w;
|
|
2058
|
+
}, [f, c.collapseAll, c.expand, c.expandAll]), b = (w) => {
|
|
2059
|
+
const x = w.getTabs();
|
|
2060
|
+
w.getTabs = () => g(x);
|
|
2061
|
+
}, h = M(() => e && e.mapping ? Object.values(e.mapping).filter((w) => w.caption.includes("P:")).map((w) => ({ uniqueName: w.caption.replace("P:", ""), caption: w.caption })) : [], [e]), v = M(() => {
|
|
2062
|
+
var x, j, C, O;
|
|
2063
|
+
const w = (x = f.current) == null ? void 0 : x.flexmonster.getReport();
|
|
2064
|
+
return w && w.slice ? {
|
|
2065
|
+
...w.slice,
|
|
2066
|
+
rows: [
|
|
2067
|
+
...((j = w.slice.rows) == null ? void 0 : j.filter((E) => {
|
|
2068
|
+
var T;
|
|
2069
|
+
return !((T = E.caption) != null && T.includes("P:"));
|
|
2070
|
+
})) ?? [],
|
|
2071
|
+
...h
|
|
2072
|
+
],
|
|
2073
|
+
columns: [
|
|
2074
|
+
...((C = w.slice.columns) == null ? void 0 : C.filter((E) => {
|
|
2075
|
+
var T;
|
|
2076
|
+
return !((T = E.caption) != null && T.includes("P:"));
|
|
2077
|
+
})) ?? [],
|
|
2078
|
+
...h
|
|
2079
|
+
],
|
|
2080
|
+
measures: [
|
|
2081
|
+
...((O = w.slice.measures) == null ? void 0 : O.filter((E) => {
|
|
2082
|
+
var T;
|
|
2083
|
+
return !((T = E.caption) != null && T.includes("P:"));
|
|
2084
|
+
})) ?? [],
|
|
2085
|
+
...h
|
|
2086
|
+
]
|
|
2087
|
+
} : null;
|
|
2088
|
+
}, [h, f]);
|
|
2062
2089
|
q(() => {
|
|
2063
|
-
var
|
|
2090
|
+
var w, x, j, C;
|
|
2064
2091
|
if (u && l) {
|
|
2065
|
-
if (s) {
|
|
2066
|
-
const
|
|
2067
|
-
...
|
|
2068
|
-
|
|
2069
|
-
...((w = E.slice.rows) == null ? void 0 : w.filter((j) => {
|
|
2070
|
-
var I;
|
|
2071
|
-
return !((I = j.caption) != null && I.includes("P:"));
|
|
2072
|
-
})) ?? [],
|
|
2073
|
-
...T
|
|
2074
|
-
],
|
|
2075
|
-
columns: [
|
|
2076
|
-
...((N = E.slice.columns) == null ? void 0 : N.filter((j) => {
|
|
2077
|
-
var I;
|
|
2078
|
-
return !((I = j.caption) != null && I.includes("P:"));
|
|
2079
|
-
})) ?? [],
|
|
2080
|
-
...T
|
|
2081
|
-
],
|
|
2082
|
-
measures: [
|
|
2083
|
-
...((y = E.slice.measures) == null ? void 0 : y.filter((j) => {
|
|
2084
|
-
var I;
|
|
2085
|
-
return !((I = j.caption) != null && I.includes("P:"));
|
|
2086
|
-
})) ?? [],
|
|
2087
|
-
...T
|
|
2088
|
-
]
|
|
2089
|
-
} : {}, V = E && E.options ? {
|
|
2090
|
-
...E.options,
|
|
2091
|
-
grid: { ...(C = E.options) == null ? void 0 : C.grid, autoSwitchToCompact: !1 }
|
|
2092
|
+
if (s && v) {
|
|
2093
|
+
const O = (w = f.current) == null ? void 0 : w.flexmonster.getReport(), E = O && O.options ? {
|
|
2094
|
+
...O.options,
|
|
2095
|
+
grid: { ...(x = O.options) == null ? void 0 : x.grid, autoSwitchToCompact: !1 }
|
|
2092
2096
|
} : {};
|
|
2093
|
-
(
|
|
2097
|
+
(j = f.current) == null || j.flexmonster.setReport({
|
|
2098
|
+
...O,
|
|
2099
|
+
dataSource: e,
|
|
2100
|
+
slice: v,
|
|
2101
|
+
options: E
|
|
2102
|
+
});
|
|
2094
2103
|
} else
|
|
2095
|
-
(
|
|
2104
|
+
(C = f.current) == null || C.flexmonster.updateData(e);
|
|
2096
2105
|
console.log("Updating flexmonster dataSource to: ", e);
|
|
2097
2106
|
}
|
|
2098
|
-
}, [e, l, u, f, s]), q(() => {
|
|
2099
|
-
var x,
|
|
2107
|
+
}, [e, l, u, h, f, s, v]), q(() => {
|
|
2108
|
+
var w, x, j, C, O;
|
|
2100
2109
|
if (u && l) {
|
|
2101
|
-
const
|
|
2102
|
-
if (
|
|
2110
|
+
const E = (w = f.current) == null ? void 0 : w.flexmonster.getReport();
|
|
2111
|
+
if (E === void 0 || typeof E == "string")
|
|
2103
2112
|
return;
|
|
2104
|
-
const
|
|
2105
|
-
|
|
2113
|
+
const T = wp(t);
|
|
2114
|
+
T.options = {
|
|
2106
2115
|
...t == null ? void 0 : t.options,
|
|
2107
|
-
grid: { ...(
|
|
2116
|
+
grid: { ...(x = t == null ? void 0 : t.options) == null ? void 0 : x.grid, autoSwitchToCompact: !1 },
|
|
2108
2117
|
showFieldListSearch: !0,
|
|
2109
2118
|
datePattern: "dd.MM.yyyy",
|
|
2110
2119
|
dateTimePattern: "dd.MM.yyyy HH:mm:ss"
|
|
2111
|
-
}
|
|
2112
|
-
|
|
2113
|
-
|
|
2120
|
+
}, s && (T.slice = {
|
|
2121
|
+
...t == null ? void 0 : t.slice,
|
|
2122
|
+
rows: [
|
|
2123
|
+
...((C = (j = t == null ? void 0 : t.slice) == null ? void 0 : j.rows) == null ? void 0 : C.filter((V) => {
|
|
2124
|
+
var S;
|
|
2125
|
+
return !((S = V.caption) != null && S.includes("P:"));
|
|
2126
|
+
})) ?? [],
|
|
2127
|
+
...h
|
|
2128
|
+
]
|
|
2129
|
+
});
|
|
2130
|
+
const B = { ...E, ...T };
|
|
2131
|
+
(O = f.current) == null || O.flexmonster.setReport(B), console.log("Refreshing flexmonster settings. New report: ", B);
|
|
2114
2132
|
}
|
|
2115
|
-
}, [l, u, f, t]);
|
|
2116
|
-
const
|
|
2117
|
-
var
|
|
2118
|
-
if (Np(
|
|
2119
|
-
|
|
2120
|
-
const
|
|
2121
|
-
|
|
2133
|
+
}, [l, u, h, f, s, t]);
|
|
2134
|
+
const y = P((w, x) => {
|
|
2135
|
+
var V, S;
|
|
2136
|
+
if (Np(x)) {
|
|
2137
|
+
w.text = ((V = x.member) == null ? void 0 : V.caption) ?? "";
|
|
2138
|
+
const I = w.style["padding-left"] ?? "4px", $ = parseInt(I, 10);
|
|
2139
|
+
w.style["padding-left"] = $ + 11 + "px";
|
|
2122
2140
|
}
|
|
2123
|
-
if (!i || !Ko(
|
|
2141
|
+
if (!i || !Ko(x, i.idColumn) || Xo(x))
|
|
2124
2142
|
return;
|
|
2125
|
-
const
|
|
2126
|
-
if (
|
|
2143
|
+
const j = (S = x.escapedLabel) == null ? void 0 : S.toString();
|
|
2144
|
+
if (j === void 0)
|
|
2127
2145
|
return;
|
|
2128
|
-
const
|
|
2129
|
-
|
|
2130
|
-
const
|
|
2131
|
-
|
|
2132
|
-
}, [i]),
|
|
2133
|
-
if (!i || !Ko(
|
|
2146
|
+
const C = Qo(i.url, j), O = "style='color: #00a45a; text-decoration: underline; cursor: pointer;'", E = x.type === "header" ? "onclick='event.stopImmediatePropagation()'" : "", T = x.isDrillThrough || x.type === "header" ? `href='${C}' target='_blank'` : "";
|
|
2147
|
+
w.style && (w.style["z-index"] = 1);
|
|
2148
|
+
const B = `<a ${T} ${O} ${E}>${x.escapedLabel}</a>`;
|
|
2149
|
+
w.text = B;
|
|
2150
|
+
}, [i]), N = P((w) => {
|
|
2151
|
+
if (!i || !Ko(w, i.idColumn) || Xo(w))
|
|
2134
2152
|
return;
|
|
2135
|
-
const
|
|
2136
|
-
window.open(
|
|
2153
|
+
const x = Qo(i.url, w.escapedLabel ?? "");
|
|
2154
|
+
window.open(x ?? "", "_blank", "noreferrer");
|
|
2137
2155
|
}, [i]);
|
|
2138
2156
|
return /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsx(
|
|
2139
2157
|
Zd,
|
|
@@ -2148,16 +2166,16 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2148
2166
|
d(!0);
|
|
2149
2167
|
},
|
|
2150
2168
|
width: "100%",
|
|
2151
|
-
customizeCell:
|
|
2152
|
-
cellclick:
|
|
2169
|
+
customizeCell: y,
|
|
2170
|
+
cellclick: N
|
|
2153
2171
|
}
|
|
2154
2172
|
) });
|
|
2155
2173
|
}, jp = (e, t, r, n) => {
|
|
2156
2174
|
const { texts: { reports: a } } = z(J), { prompt: i } = nd(), { confirm: s } = or(), l = ft(), { user: c } = z(Pt), { startLoading: u, stopLoading: d } = z(ir), { addNotification: p } = Aa(), f = P(async (v) => {
|
|
2157
2175
|
u("report-versionSavingAs");
|
|
2158
2176
|
try {
|
|
2159
|
-
const
|
|
2160
|
-
p(a.saveSuccessful, "success"), await n(
|
|
2177
|
+
const y = await l.post("/reports/version", v);
|
|
2178
|
+
p(a.saveSuccessful, "success"), await n(y.data);
|
|
2161
2179
|
} finally {
|
|
2162
2180
|
d("report-versionSavingAs");
|
|
2163
2181
|
}
|
|
@@ -2168,11 +2186,11 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2168
2186
|
}
|
|
2169
2187
|
if (!await s(a.confirmOverwriteSave))
|
|
2170
2188
|
return;
|
|
2171
|
-
const
|
|
2189
|
+
const y = Yo(t);
|
|
2172
2190
|
f({
|
|
2173
2191
|
reportSourceName: e,
|
|
2174
2192
|
reportVersionId: r,
|
|
2175
|
-
settings:
|
|
2193
|
+
settings: y
|
|
2176
2194
|
});
|
|
2177
2195
|
}, [
|
|
2178
2196
|
p,
|
|
@@ -2186,11 +2204,11 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2186
2204
|
const v = await i(a.enterName, { input: "input", required: !0 });
|
|
2187
2205
|
if (v === null)
|
|
2188
2206
|
return;
|
|
2189
|
-
const
|
|
2207
|
+
const y = Yo(t);
|
|
2190
2208
|
f({
|
|
2191
2209
|
reportSourceName: e,
|
|
2192
2210
|
name: v,
|
|
2193
|
-
settings:
|
|
2211
|
+
settings: y
|
|
2194
2212
|
});
|
|
2195
2213
|
}, [t, i, e, a.enterName, f]), b = P(async () => {
|
|
2196
2214
|
u("report-versionSavingAs");
|
|
@@ -2311,18 +2329,18 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2311
2329
|
});
|
|
2312
2330
|
}, [t, e]), { mappings: r };
|
|
2313
2331
|
}, IN = ({ reportType: e, title: t, data: r, filterElements: n, getReportRoute: a, localization: i, licenseKey: s, EmployeePicker: l, localizationJsonFile: c, localizationTransformer: u, hyperlinkColumn: d, roomPasportization: p = !1 }) => {
|
|
2314
|
-
const { texts: { reports: f } } = z(J), { confirm: m } = or(), g = wn(), [b] = Yd(), { id: h } = Os(), v =
|
|
2332
|
+
const { texts: { reports: f } } = z(J), { confirm: m } = or(), g = wn(), [b] = Yd(), { id: h } = Os(), v = M(() => h === void 0 ? null : Number(h), [h]), y = P((W) => {
|
|
2315
2333
|
const ae = W === null ? "" : W.toString();
|
|
2316
2334
|
g(er(a(e), { id: ae }) + "?" + b.toString(), {
|
|
2317
2335
|
replace: !0,
|
|
2318
2336
|
flushSync: !0
|
|
2319
2337
|
});
|
|
2320
|
-
}, [a, g, e, b]), [
|
|
2338
|
+
}, [a, g, e, b]), [N, w] = k(!1), x = re(null), { user: j } = z(Pt), { data: C, reloadData: O } = pt(`/reports/${e}`), { mappings: E } = Ep(c, u), [T, B] = k({}), V = P((W) => {
|
|
2321
2339
|
const ae = W.target.value, me = ae === "" ? null : Number(ae);
|
|
2322
|
-
|
|
2323
|
-
}, [
|
|
2324
|
-
await O(),
|
|
2325
|
-
}, [O,
|
|
2340
|
+
y(me);
|
|
2341
|
+
}, [y]), S = P(async (W) => {
|
|
2342
|
+
await O(), y(W);
|
|
2343
|
+
}, [O, y]), { data: I, setData: $ } = pt(`/reports/version/${v}`, { enabled: v !== null, nullStateBeforeLoad: !1, nullStateOnFail: !0 });
|
|
2326
2344
|
q(() => {
|
|
2327
2345
|
var ae;
|
|
2328
2346
|
if (I === null) {
|
|
@@ -2330,52 +2348,52 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2330
2348
|
return;
|
|
2331
2349
|
}
|
|
2332
2350
|
const W = yp(I) ?? {};
|
|
2333
|
-
B(W), (ae =
|
|
2351
|
+
B(W), (ae = x.current) == null || ae.flexmonster.refresh();
|
|
2334
2352
|
}, [I]);
|
|
2335
|
-
const { save: A, saveAs:
|
|
2353
|
+
const { save: A, saveAs: L, archive: U, detach: G } = jp(e, x, v, S), H = M(() => ({
|
|
2336
2354
|
data: r ?? [],
|
|
2337
2355
|
mapping: E ?? void 0
|
|
2338
2356
|
}), [r, E]), X = P(async () => {
|
|
2339
2357
|
var ae;
|
|
2340
|
-
await m(f.confirmRevertChanges) && ((ae =
|
|
2341
|
-
}, [m, H, f.confirmRevertChanges, T]), ee =
|
|
2358
|
+
await m(f.confirmRevertChanges) && ((ae = x.current) == null || ae.flexmonster.setReport({ dataSource: H, ...T }));
|
|
2359
|
+
}, [m, H, f.confirmRevertChanges, T]), ee = M(() => (I == null ? void 0 : I.ownerId) === j.personalNumber, [I == null ? void 0 : I.ownerId, j.personalNumber]), ie = M(() => {
|
|
2342
2360
|
var W;
|
|
2343
|
-
return (W = I == null ? void 0 : I.users) == null ? void 0 : W.some((ae) => ae.id ===
|
|
2344
|
-
}, [I == null ? void 0 : I.users,
|
|
2345
|
-
await m(f.confirmDelete(I == null ? void 0 : I.name)) && (await U(),
|
|
2346
|
-
}, [U, m, O, I == null ? void 0 : I.name, f,
|
|
2347
|
-
await m(f.confirmDetach(I == null ? void 0 : I.name)) && (await
|
|
2348
|
-
}, [m,
|
|
2361
|
+
return (W = I == null ? void 0 : I.users) == null ? void 0 : W.some((ae) => ae.id === j.personalNumber && !ae.isReportOwner);
|
|
2362
|
+
}, [I == null ? void 0 : I.users, j.personalNumber]), se = P(async () => {
|
|
2363
|
+
await m(f.confirmDelete(I == null ? void 0 : I.name)) && (await U(), y(null), await O());
|
|
2364
|
+
}, [U, m, O, I == null ? void 0 : I.name, f, y]), be = P(async () => {
|
|
2365
|
+
await m(f.confirmDetach(I == null ? void 0 : I.name)) && (await G(), y(null), await O());
|
|
2366
|
+
}, [m, G, O, I == null ? void 0 : I.name, f, y]);
|
|
2349
2367
|
return q(() => {
|
|
2350
2368
|
var W, ae;
|
|
2351
|
-
v === null &&
|
|
2352
|
-
}, [
|
|
2369
|
+
v === null && y(((W = C == null ? void 0 : C.reportVersions.find((me) => me.isSystem === !0)) == null ? void 0 : W.reportVersionId) ?? ((ae = C == null ? void 0 : C.reportVersions[0]) == null ? void 0 : ae.reportVersionId) ?? null);
|
|
2370
|
+
}, [C == null ? void 0 : C.reportVersions, v, y]), /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
2353
2371
|
/* @__PURE__ */ o.jsx(Er, { variant: "fullScreen", title: /* @__PURE__ */ o.jsxs("div", { className: "d-flex justify-content-start gap-3", children: [
|
|
2354
2372
|
/* @__PURE__ */ o.jsx(Y, { variant: "h3", children: t }),
|
|
2355
2373
|
n,
|
|
2356
2374
|
/* @__PURE__ */ o.jsxs("div", { className: "d-flex gap-1 align-items-center", children: [
|
|
2357
2375
|
/* @__PURE__ */ o.jsxs(ad, { size: "sm", value: v ?? void 0, onChange: V, children: [
|
|
2358
|
-
/* @__PURE__ */ o.jsx("optgroup", { label: f.versionSelectSystem, children:
|
|
2359
|
-
/* @__PURE__ */ o.jsx("optgroup", { label: f.versionSelectYour, children:
|
|
2360
|
-
/* @__PURE__ */ o.jsx("optgroup", { label: f.versionSelectSharedWithYou, children:
|
|
2376
|
+
/* @__PURE__ */ o.jsx("optgroup", { label: f.versionSelectSystem, children: C == null ? void 0 : C.reportVersions.filter((W) => W.isSystem === !0).map((W) => /* @__PURE__ */ o.jsx("option", { value: W.reportVersionId, children: W.name }, W.reportVersionId)) }),
|
|
2377
|
+
/* @__PURE__ */ o.jsx("optgroup", { label: f.versionSelectYour, children: C == null ? void 0 : C.reportVersions.filter((W) => W.ownerId === j.personalNumber).map((W) => /* @__PURE__ */ o.jsx("option", { value: W.reportVersionId, children: W.name }, W.reportVersionId)) }),
|
|
2378
|
+
/* @__PURE__ */ o.jsx("optgroup", { label: f.versionSelectSharedWithYou, children: C == null ? void 0 : C.reportVersions.filter((W) => W.isSystem === !1 && W.ownerId !== j.personalNumber).map((W) => /* @__PURE__ */ o.jsx("option", { value: W.reportVersionId, children: `${W.name} [${W.ownerId}]` }, W.reportVersionId)) })
|
|
2361
2379
|
] }),
|
|
2362
2380
|
/* @__PURE__ */ o.jsx(ht, { icon: /* @__PURE__ */ o.jsx(od, {}), onClick: A, disabled: v === null || (I == null ? void 0 : I.isSystem) || !ee, children: f.save }),
|
|
2363
|
-
/* @__PURE__ */ o.jsx(ht, { icon: /* @__PURE__ */ o.jsx(id, {}), onClick:
|
|
2381
|
+
/* @__PURE__ */ o.jsx(ht, { icon: /* @__PURE__ */ o.jsx(id, {}), onClick: L, className: "flex-shrink-0", children: f.saveAs }),
|
|
2364
2382
|
/* @__PURE__ */ o.jsxs(sr, { toggle: /* @__PURE__ */ o.jsx(lr, { as: Fr }), children: [
|
|
2365
2383
|
/* @__PURE__ */ o.jsx(at, { onClick: X, children: f.revertChanges }),
|
|
2366
|
-
/* @__PURE__ */ o.jsx(at, { onClick: () =>
|
|
2384
|
+
/* @__PURE__ */ o.jsx(at, { onClick: () => w(!0), disabled: !ee || (I == null ? void 0 : I.isSystem), children: f.share }),
|
|
2367
2385
|
ee && !(I != null && I.isSystem) ? /* @__PURE__ */ o.jsx(at, { color: "danger", onClick: se, children: f.delete }) : null,
|
|
2368
2386
|
ie && !(I != null && I.isSystem) ? /* @__PURE__ */ o.jsx(at, { color: "danger", onClick: be, children: f.detach }) : null
|
|
2369
2387
|
] })
|
|
2370
2388
|
] })
|
|
2371
|
-
] }), children: /* @__PURE__ */ o.jsx("div", { className: _("h-100 w-100", H.data && H.data.length > 0 ? "" : "d-none"), children: /* @__PURE__ */ o.jsx(Dp, { dataSource: H, settings: T, pivotRef:
|
|
2389
|
+
] }), children: /* @__PURE__ */ o.jsx("div", { className: _("h-100 w-100", H.data && H.data.length > 0 ? "" : "d-none"), children: /* @__PURE__ */ o.jsx(Dp, { dataSource: H, settings: T, pivotRef: x, enabled: H.data && H.data.length > 0, roomPasportization: p, localization: i, licenseKey: s, hyperlinkColumn: d }) }) }),
|
|
2372
2390
|
I !== null ? /* @__PURE__ */ o.jsx(
|
|
2373
2391
|
Sp,
|
|
2374
2392
|
{
|
|
2375
|
-
isOpen:
|
|
2376
|
-
onHide: () =>
|
|
2393
|
+
isOpen: N,
|
|
2394
|
+
onHide: () => w(!1),
|
|
2377
2395
|
usersData: I.users ?? null,
|
|
2378
|
-
setReportVersion:
|
|
2396
|
+
setReportVersion: $,
|
|
2379
2397
|
reportVersionId: I == null ? void 0 : I.reportVersionId,
|
|
2380
2398
|
EmployeePicker: l
|
|
2381
2399
|
}
|
|
@@ -2409,7 +2427,7 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2409
2427
|
] }) }) })
|
|
2410
2428
|
] });
|
|
2411
2429
|
}, Jo = ["info", "warning", "danger"], Zo = ({ messages: e, isLoading: t, onDeleteMessage: r, onClickMessage: n, getIcon: a, getLinksTo: i }) => {
|
|
2412
|
-
const { texts: { messageBoard: s } } = z(J), [l, c] = k(Jo), u =
|
|
2430
|
+
const { texts: { messageBoard: s } } = z(J), [l, c] = k(Jo), u = M(() => e.filter((d) => l.includes(d.type ?? "")), [l, e]);
|
|
2413
2431
|
return /* @__PURE__ */ o.jsxs("div", { className: "h-100 d-flex flex-column overflow-hidden", children: [
|
|
2414
2432
|
/* @__PURE__ */ o.jsx(Ip, { knownTypes: Jo, typeFilters: l, onChangeTypeFilters: (d) => c(d) }),
|
|
2415
2433
|
t && /* @__PURE__ */ o.jsxs("div", { className: "p-3 w-100", children: [
|
|
@@ -2436,31 +2454,31 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2436
2454
|
apiDelete: "/messageBoard/"
|
|
2437
2455
|
}, ON = ({ renderAsNotifPanel: e, notifIcon: t, apiUrls: { apiGet: r = Mn.apiGet, apiDelete: n = Mn.apiDelete } = Mn, getIcon: a, getLinksTo: i }) => {
|
|
2438
2456
|
const l = ft(), [c, u] = k([]), [d, p] = k(!1), [f, m] = k(!1), [g, b] = k(!1), h = P(async () => {
|
|
2439
|
-
m(!0), await l.get(r).then(({ data:
|
|
2440
|
-
u(
|
|
2457
|
+
m(!0), await l.get(r).then(({ data: x }) => {
|
|
2458
|
+
u(x), p(!0), m(!1);
|
|
2441
2459
|
}).catch(() => {
|
|
2442
2460
|
u([]), m(!1);
|
|
2443
2461
|
});
|
|
2444
|
-
}, [r, l]), v = P(async (
|
|
2445
|
-
v(
|
|
2446
|
-
|
|
2462
|
+
}, [r, l]), v = P(async (x) => l.delete(`${n}${x}`).then(() => !0).catch(() => !1), [n, l]), y = P((x) => {
|
|
2463
|
+
v(x).then((j) => {
|
|
2464
|
+
j && u(c.filter((C) => C.id !== x));
|
|
2447
2465
|
});
|
|
2448
2466
|
}, [v, c]);
|
|
2449
2467
|
q(() => {
|
|
2450
2468
|
h();
|
|
2451
|
-
const
|
|
2469
|
+
const x = setInterval(() => h(), 60 * 1e3);
|
|
2452
2470
|
return () => {
|
|
2453
|
-
clearInterval(
|
|
2471
|
+
clearInterval(x);
|
|
2454
2472
|
};
|
|
2455
2473
|
}, [h]);
|
|
2456
|
-
const
|
|
2474
|
+
const N = c.filter((x) => x.type === "danger").length, w = d ? !1 : f;
|
|
2457
2475
|
return e ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
2458
2476
|
/* @__PURE__ */ o.jsxs("div", { className: "position-relative", children: [
|
|
2459
2477
|
/* @__PURE__ */ o.jsx(te, { size: "md", onClick: () => b(!g), children: t }),
|
|
2460
|
-
|
|
2478
|
+
N > 0 && /* @__PURE__ */ o.jsx("div", { className: "badge rounded-pill bg-danger p-1 px-2 text-white", style: { position: "absolute", top: "-6px", right: "-10px", fontSize: "10px" }, children: N })
|
|
2461
2479
|
] }),
|
|
2462
|
-
/* @__PURE__ */ o.jsx(Lo, { show: g, onHide: () => b(!1), placement: "end", children: /* @__PURE__ */ o.jsx(Lo.Body, { children: /* @__PURE__ */ o.jsx(Zo, { messages: c, isLoading:
|
|
2463
|
-
] }) : /* @__PURE__ */ o.jsx(Zo, { messages: c, isLoading:
|
|
2480
|
+
/* @__PURE__ */ o.jsx(Lo, { show: g, onHide: () => b(!1), placement: "end", children: /* @__PURE__ */ o.jsx(Lo.Body, { children: /* @__PURE__ */ o.jsx(Zo, { messages: c, isLoading: w, onDeleteMessage: y, onClickMessage: () => b(!1), getIcon: a, getLinksTo: i }) }) })
|
|
2481
|
+
] }) : /* @__PURE__ */ o.jsx(Zo, { messages: c, isLoading: w, onDeleteMessage: y, getIcon: a, getLinksTo: i });
|
|
2464
2482
|
}, Pp = "_tab-panel_d8l8q_1", Tp = "_full-height-no-overflow_d8l8q_5", Ap = "_disabled_d8l8q_12", Ln = {
|
|
2465
2483
|
"tab-panel": "_tab-panel_d8l8q_1",
|
|
2466
2484
|
tabPanel: Pp,
|
|
@@ -2517,7 +2535,7 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2517
2535
|
}, Hp = ({ shortcutLink: e, IconComponent: t, IconTypeArray: r, editShortcutLink: n }) => {
|
|
2518
2536
|
const { ProjectIconComponent: a } = z(J), [i, s] = k(e.icon), [l, c] = k(e.name);
|
|
2519
2537
|
console.log(i, typeof i);
|
|
2520
|
-
const u =
|
|
2538
|
+
const u = M(() => !(i === e.icon && l === e.name), [i, l, e.icon, e.name]), d = P(() => {
|
|
2521
2539
|
s(e.icon), c(e.name);
|
|
2522
2540
|
}, [e]), p = P(() => {
|
|
2523
2541
|
n({ ...e, icon: i, name: l });
|
|
@@ -2561,7 +2579,7 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2561
2579
|
}, Xp = ({ shortcutLink: e, IconComponent: t }) => /* @__PURE__ */ o.jsx(Ue, { text: e.name, placement: "bottom", children: /* @__PURE__ */ o.jsx(Ze, { to: e.url, className: Zt.linkButton, children: /* @__PURE__ */ o.jsx(t, { icon: e.icon }) }) }), Qp = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: n, IconComponent: a, IconTypeArray: i }) => {
|
|
2562
2580
|
const s = Kd(), { texts: l } = z(J), [c, u] = k("star-outline"), [d, p] = k(n ? document.title.replace(n, "") : document.title), f = P(async () => {
|
|
2563
2581
|
await r({ icon: c, name: d, url: s.pathname + s.search }), e();
|
|
2564
|
-
}, [e, r, c, s.pathname, s.search, d]), m =
|
|
2582
|
+
}, [e, r, c, s.pathname, s.search, d]), m = M(() => s.pathname + s.search, [s.pathname, s.search]);
|
|
2565
2583
|
return /* @__PURE__ */ o.jsxs(_e, { show: t, onHide: e, size: "sm", children: [
|
|
2566
2584
|
/* @__PURE__ */ o.jsx(_e.Header, { closeButton: !0, children: /* @__PURE__ */ o.jsx(_e.Title, { children: l.shortcutLinks.newShortcut }) }),
|
|
2567
2585
|
/* @__PURE__ */ o.jsxs(_e.Body, { children: [
|
|
@@ -2590,7 +2608,7 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2590
2608
|
(s || c) && /* @__PURE__ */ o.jsx(Qp, { IconComponent: e, IconTypeArray: t, closeModal: () => l(!1), createLink: n, isOpen: s, pageTitlePrefix: r })
|
|
2591
2609
|
] });
|
|
2592
2610
|
}, RN = ({ IconComponent: e, IconTypeArray: t, pageTitlePrefix: r }) => {
|
|
2593
|
-
const { shortcutLinks: n, createShortcutLink: a } = il(), i =
|
|
2611
|
+
const { shortcutLinks: n, createShortcutLink: a } = il(), i = M(() => n !== null && n.length < ga, [n]);
|
|
2594
2612
|
return /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsxs("div", { className: "d-flex gap-2", children: [
|
|
2595
2613
|
n == null ? void 0 : n.slice(0, ga).map((s, l) => s !== null ? /* @__PURE__ */ o.jsx(Xp, { shortcutLink: s, IconComponent: e }, l) : null),
|
|
2596
2614
|
i && /* @__PURE__ */ o.jsx(Jp, { IconComponent: e, IconTypeArray: t, pageTitlePrefix: r, createLink: a })
|
|
@@ -2642,7 +2660,7 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2642
2660
|
await l({ ...m, employee: g.personalNumber }), await i();
|
|
2643
2661
|
}, [i, l, r]), p = P(async (m) => {
|
|
2644
2662
|
await c(m), await i();
|
|
2645
|
-
}, [i, c]), f =
|
|
2663
|
+
}, [i, c]), f = M(() => ({
|
|
2646
2664
|
shortcutLinks: a,
|
|
2647
2665
|
createShortcutLink: u,
|
|
2648
2666
|
editShortcutLink: d,
|
|
@@ -2697,13 +2715,13 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2697
2715
|
/* @__PURE__ */ o.jsx(rf, { show: u, onHide: () => d(!1), roles: n ?? [], onAddTarget: a, EmployeePicker: s, templateId: t })
|
|
2698
2716
|
] });
|
|
2699
2717
|
}, af = ({ data: e, onClick: t, BnfTableComponent: r }) => {
|
|
2700
|
-
const { texts: { notifCentrum: n } } = z(J), a =
|
|
2718
|
+
const { texts: { notifCentrum: n } } = z(J), a = M(() => e == null ? void 0 : e.map((l) => {
|
|
2701
2719
|
var c;
|
|
2702
2720
|
return {
|
|
2703
2721
|
...l,
|
|
2704
2722
|
recipientsString: ((c = l.recipients) == null ? void 0 : c.map((u) => u.name).join(", ")) ?? ""
|
|
2705
2723
|
};
|
|
2706
|
-
}), [e]), i =
|
|
2724
|
+
}), [e]), i = M(() => [
|
|
2707
2725
|
{
|
|
2708
2726
|
caption: n.date,
|
|
2709
2727
|
fieldName: "date",
|
|
@@ -2731,7 +2749,7 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2731
2749
|
}, [t]);
|
|
2732
2750
|
return /* @__PURE__ */ o.jsx(r, { columnsDef: i, data: a, useScrollableContainer: !0, onRowClick: s, bottomBarProps: { hidden: !0 } });
|
|
2733
2751
|
}, BN = ({ kinds: e, reloadActions: t, reloadHistory: r, reloadRoles: n, onRemoveTarget: a, onPostTarget: i, EmployeePicker: s, BnfTableComponent: l }) => {
|
|
2734
|
-
var B, V,
|
|
2752
|
+
var B, V, S;
|
|
2735
2753
|
const { texts: { notifCentrum: c } } = z(J), { confirm: u } = or(), [d, p] = k(null), [f, m] = k(null), [g, b] = da("notif-kind-id", ((B = e == null ? void 0 : e.at(0)) == null ? void 0 : B.id) ?? 1), [h, v] = k([]);
|
|
2736
2754
|
q(() => {
|
|
2737
2755
|
t(g).then((I) => {
|
|
@@ -2740,61 +2758,61 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2740
2758
|
console.log(I), v([]);
|
|
2741
2759
|
});
|
|
2742
2760
|
}, [t, g]);
|
|
2743
|
-
const [
|
|
2761
|
+
const [y, N] = da("notif-action-id", ((V = h == null ? void 0 : h.at(0)) == null ? void 0 : V.id) ?? null), [w, x] = k([]);
|
|
2744
2762
|
q(() => {
|
|
2745
|
-
|
|
2746
|
-
|
|
2763
|
+
y === null || d === null || r(y, d).then((I) => {
|
|
2764
|
+
x(I);
|
|
2747
2765
|
}).catch((I) => {
|
|
2748
|
-
console.log(I),
|
|
2766
|
+
console.log(I), x([]);
|
|
2749
2767
|
});
|
|
2750
|
-
}, [t, r,
|
|
2751
|
-
const [
|
|
2768
|
+
}, [t, r, y, g, d]);
|
|
2769
|
+
const [j, C] = k([]);
|
|
2752
2770
|
q(() => {
|
|
2753
|
-
|
|
2754
|
-
|
|
2771
|
+
y !== null && n(y).then((I) => {
|
|
2772
|
+
C(I);
|
|
2755
2773
|
}).catch((I) => {
|
|
2756
|
-
console.log(I),
|
|
2774
|
+
console.log(I), C([]);
|
|
2757
2775
|
});
|
|
2758
|
-
}, [n,
|
|
2759
|
-
const O =
|
|
2776
|
+
}, [n, y]);
|
|
2777
|
+
const O = M(() => {
|
|
2760
2778
|
var I;
|
|
2761
|
-
return !h || !
|
|
2762
|
-
}, [h,
|
|
2763
|
-
i(I,
|
|
2779
|
+
return !h || !y ? [] : ((I = h.find(($) => $.id === y)) == null ? void 0 : I.templates) ?? [];
|
|
2780
|
+
}, [h, y]), E = P((I, $) => {
|
|
2781
|
+
i(I, $).then((A) => {
|
|
2764
2782
|
v(h ? [
|
|
2765
|
-
...h.map((
|
|
2766
|
-
...
|
|
2783
|
+
...h.map((L) => L.id !== y ? L : {
|
|
2784
|
+
...L,
|
|
2767
2785
|
templates: [
|
|
2768
|
-
...
|
|
2786
|
+
...L.templates.map((U) => U.id !== d ? U : { ...U, targets: [...U.targets, A] })
|
|
2769
2787
|
]
|
|
2770
2788
|
})
|
|
2771
2789
|
] : []);
|
|
2772
2790
|
}).catch((A) => console.log(A));
|
|
2773
|
-
}, [h, i,
|
|
2791
|
+
}, [h, i, y, d, v]), T = P(async (I) => {
|
|
2774
2792
|
await u(c.confirmTargetDelete) && a(I).then(() => v(h ? [
|
|
2775
|
-
...h.map((
|
|
2776
|
-
|
|
2793
|
+
...h.map(($) => $.id !== y ? $ : {
|
|
2794
|
+
...$,
|
|
2777
2795
|
templates: [
|
|
2778
|
-
|
|
2796
|
+
...$.templates.map((A) => A.id !== d ? A : { ...A, targets: A.targets.filter((L) => L.id !== I) })
|
|
2779
2797
|
]
|
|
2780
2798
|
})
|
|
2781
2799
|
] : []));
|
|
2782
|
-
}, [h, u, c, a,
|
|
2800
|
+
}, [h, u, c, a, y, d]);
|
|
2783
2801
|
return /* @__PURE__ */ o.jsxs("div", { className: "h-100 overflow-hidden", children: [
|
|
2784
2802
|
/* @__PURE__ */ o.jsxs("div", { className: "row mb-2", children: [
|
|
2785
2803
|
/* @__PURE__ */ o.jsx("div", { className: "col-2", children: /* @__PURE__ */ o.jsx(st, { label: c.kind, size: "sm", noEmptyOption: !0, options: (e == null ? void 0 : e.map((I) => ({ id: I.id, name: I.name }))) ?? [], value: g ?? null, onChange: (I) => b(Number(I)), dropdownWidth: 200 }) }),
|
|
2786
|
-
/* @__PURE__ */ o.jsx("div", { className: "col-3", children: /* @__PURE__ */ o.jsx(st, { label: c.subkind, size: "sm", noEmptyOption: !0, options: (h == null ? void 0 : h.map((I) => ({ id: I.id, name: I.name }))) ?? [], value:
|
|
2804
|
+
/* @__PURE__ */ o.jsx("div", { className: "col-3", children: /* @__PURE__ */ o.jsx(st, { label: c.subkind, size: "sm", noEmptyOption: !0, options: (h == null ? void 0 : h.map((I) => ({ id: I.id, name: I.name }))) ?? [], value: y ?? null, onChange: (I) => N(Number(I)), dropdownWidth: 250 }) })
|
|
2787
2805
|
] }),
|
|
2788
2806
|
/* @__PURE__ */ o.jsxs("div", { className: "vh-100 overflow-hidden d-flex gap-1", children: [
|
|
2789
|
-
/* @__PURE__ */ o.jsx("div", { className: "h-75 w-25 overflow-hidden", children: /* @__PURE__ */ o.jsx(nf, { templates: O, roles:
|
|
2807
|
+
/* @__PURE__ */ o.jsx("div", { className: "h-75 w-25 overflow-hidden", children: /* @__PURE__ */ o.jsx(nf, { templates: O, roles: j ?? [], onAddNotifTarget: E, onRemoveNotifTarget: T, selectedTemplateId: d, setSelectedTemplateId: (I) => {
|
|
2790
2808
|
p(I), m(null);
|
|
2791
2809
|
}, EmployeePicker: s }) }),
|
|
2792
|
-
/* @__PURE__ */ o.jsx("div", { className: "w-25 h-75 overflow-hidden", children: d && /* @__PURE__ */ o.jsx(af, { data:
|
|
2793
|
-
d && /* @__PURE__ */ o.jsx("div", { className: "h-75 w-75 overflow-hidden bg-darker", children: /* @__PURE__ */ o.jsx("iframe", { title: "notification", className: "w-100 h-100", srcDoc: (f == null ? void 0 : f.message) ?? ((
|
|
2810
|
+
/* @__PURE__ */ o.jsx("div", { className: "w-25 h-75 overflow-hidden", children: d && /* @__PURE__ */ o.jsx(af, { data: w ?? [], onClick: (I) => m((w == null ? void 0 : w.find(($) => $.id === I)) ?? null), BnfTableComponent: l }) }),
|
|
2811
|
+
d && /* @__PURE__ */ o.jsx("div", { className: "h-75 w-75 overflow-hidden bg-darker", children: /* @__PURE__ */ o.jsx("iframe", { title: "notification", className: "w-100 h-100", srcDoc: (f == null ? void 0 : f.message) ?? ((S = O.find((I) => I.id === d)) == null ? void 0 : S.textTemplate) }) })
|
|
2794
2812
|
] })
|
|
2795
2813
|
] });
|
|
2796
2814
|
}, of = ({ history: e, onClick: t, BnfTableComponent: r }) => {
|
|
2797
|
-
const { texts: { notifCentrum: n } } = z(J), a =
|
|
2815
|
+
const { texts: { notifCentrum: n } } = z(J), a = M(() => [
|
|
2798
2816
|
{
|
|
2799
2817
|
caption: "notificationHistory.id",
|
|
2800
2818
|
fieldName: "id",
|
|
@@ -2874,7 +2892,7 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2874
2892
|
] });
|
|
2875
2893
|
}, sf = ({ result: e, onClose: t, tableIdentifier: r, BnfTableComponent: n }) => {
|
|
2876
2894
|
var l, c, u, d, p;
|
|
2877
|
-
const { texts: { imports: a }, ProjectIconComponent: i } = z(J), s =
|
|
2895
|
+
const { texts: { imports: a }, ProjectIconComponent: i } = z(J), s = M(() => [
|
|
2878
2896
|
{
|
|
2879
2897
|
fieldName: "row",
|
|
2880
2898
|
caption: a.row,
|
|
@@ -2969,7 +2987,7 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2969
2987
|
n = s;
|
|
2970
2988
|
}
|
|
2971
2989
|
}, pf = ({ selLng: e, lngsData: t, localizationKey: r, reloadData: n, saveChanges: a }) => {
|
|
2972
|
-
const { ProjectIconComponent: i } = z(J), s =
|
|
2990
|
+
const { ProjectIconComponent: i } = z(J), s = M(() => {
|
|
2973
2991
|
const p = t.get(e);
|
|
2974
2992
|
if (p === void 0)
|
|
2975
2993
|
return "";
|
|
@@ -2977,7 +2995,7 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
2977
2995
|
return p !== void 0 && f !== void 0 ? f : "";
|
|
2978
2996
|
}, [t, r, e]), [l, c] = k(s), u = P(async () => {
|
|
2979
2997
|
await a([{ fileName: e + ".json", items: [{ key: r, value: l }] }]), await n();
|
|
2980
|
-
}, [r, n, a, e, l]), d =
|
|
2998
|
+
}, [r, n, a, e, l]), d = M(() => l !== s, [s, l]);
|
|
2981
2999
|
return /* @__PURE__ */ o.jsxs("div", { className: "d-flex", children: [
|
|
2982
3000
|
/* @__PURE__ */ o.jsx(it, { label: e + r, type: "text", value: l, onChange: (p) => {
|
|
2983
3001
|
c(typeof p != "string" ? "" : p);
|
|
@@ -3011,53 +3029,53 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
3011
3029
|
n = s;
|
|
3012
3030
|
}
|
|
3013
3031
|
}, FN = ({ languageOptions: e, envMode: t, getOtherSettingsUrl: r, downloadXls: n, saveChanges: a, localizationFilesOptions: i, remoteLocalesRoot: s }) => {
|
|
3014
|
-
const { texts: { localizations: l }, ProjectIconComponent: c } = z(J), [u, d] = k(1), [p, f] = k(/* @__PURE__ */ new Map()), [m, g] = k(null), [b, h] = k(""), [v,
|
|
3015
|
-
f(/* @__PURE__ */ new Map()),
|
|
3016
|
-
}, []),
|
|
3032
|
+
const { texts: { localizations: l }, ProjectIconComponent: c } = z(J), [u, d] = k(1), [p, f] = k(/* @__PURE__ */ new Map()), [m, g] = k(null), [b, h] = k(""), [v, y] = k(/* @__PURE__ */ new Set()), N = P((S) => {
|
|
3033
|
+
f(/* @__PURE__ */ new Map()), y(S);
|
|
3034
|
+
}, []), w = M(() => e.filter((S) => !v.has(S.id)), [v, e]), x = M(() => {
|
|
3017
3035
|
if (p.size === 0)
|
|
3018
3036
|
return [];
|
|
3019
|
-
const
|
|
3020
|
-
if (typeof
|
|
3021
|
-
Object.entries(
|
|
3037
|
+
const S = /* @__PURE__ */ new Set(), I = (G, H = "") => {
|
|
3038
|
+
if (typeof G[1] == "object") {
|
|
3039
|
+
Object.entries(G[1]).forEach((X) => I(X, H + G[0] + "."));
|
|
3022
3040
|
return;
|
|
3023
3041
|
}
|
|
3024
|
-
|
|
3042
|
+
S.add(H + G[0]);
|
|
3025
3043
|
};
|
|
3026
|
-
Array.from(p).forEach((
|
|
3027
|
-
Object.entries(
|
|
3044
|
+
Array.from(p).forEach((G) => {
|
|
3045
|
+
Object.entries(G[1]).forEach((H) => I(H));
|
|
3028
3046
|
});
|
|
3029
|
-
const
|
|
3030
|
-
return ((A == null ? void 0 : A.type) === "report" ?
|
|
3031
|
-
const H =
|
|
3047
|
+
const $ = Array.from(S), A = i.find((G) => G.path === m);
|
|
3048
|
+
return ((A == null ? void 0 : A.type) === "report" ? $.filter((G) => {
|
|
3049
|
+
const H = G.split(".");
|
|
3032
3050
|
return H[H.length - 1] === "caption";
|
|
3033
|
-
}) :
|
|
3034
|
-
key:
|
|
3051
|
+
}) : $).map((G) => ({
|
|
3052
|
+
key: G,
|
|
3035
3053
|
lngData: new Map(Array.from(v).map((H) => {
|
|
3036
3054
|
const X = p.get(H);
|
|
3037
3055
|
return [
|
|
3038
3056
|
H,
|
|
3039
|
-
(X === void 0 ? void 0 : jf(X,
|
|
3057
|
+
(X === void 0 ? void 0 : jf(X, G)) ?? ""
|
|
3040
3058
|
];
|
|
3041
3059
|
}))
|
|
3042
3060
|
}));
|
|
3043
|
-
}, [p, i, m, v]),
|
|
3044
|
-
|
|
3045
|
-
}, [
|
|
3046
|
-
const
|
|
3061
|
+
}, [p, i, m, v]), j = M(() => x.filter((S) => ut(S.key, b) || Array.from(S.lngData).some((I) => typeof (I == null ? void 0 : I[1]) != "string" ? !1 : ut((I == null ? void 0 : I[1]) ?? "", b))), [b, x]), C = M(() => Math.ceil(j.length / Qr), [j.length]), O = P((S) => {
|
|
3062
|
+
S !== null && d(() => Math.max(1, Math.min(S, C)));
|
|
3063
|
+
}, [C]), E = P(async () => {
|
|
3064
|
+
const S = Array.from(v).map(($) => (async () => {
|
|
3047
3065
|
const A = await sd.get(
|
|
3048
|
-
`${s}${m == null ? void 0 : m.replace("{{lng}}",
|
|
3066
|
+
`${s}${m == null ? void 0 : m.replace("{{lng}}", $)}?v=${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
3049
3067
|
// ?v to not hit browser cache
|
|
3050
3068
|
{ responseType: "json" }
|
|
3051
3069
|
);
|
|
3052
|
-
return [
|
|
3053
|
-
})()), I = await Promise.allSettled(
|
|
3054
|
-
f(new Map(I.map((
|
|
3070
|
+
return [$, A.data];
|
|
3071
|
+
})()), I = await Promise.allSettled(S);
|
|
3072
|
+
f(new Map(I.map(($) => $.status === "fulfilled" ? $.value : ["", {}])));
|
|
3055
3073
|
}, [s, m, v]), T = P(async () => {
|
|
3056
3074
|
E();
|
|
3057
|
-
}, [E]), B =
|
|
3075
|
+
}, [E]), B = M(() => w.length > 0, [w.length]), V = M(() => v.size + 1 + (B ? 1 : 0), [B, v.size]);
|
|
3058
3076
|
return q(() => {
|
|
3059
3077
|
O(u);
|
|
3060
|
-
}, [O, u,
|
|
3078
|
+
}, [O, u, j]), q(() => {
|
|
3061
3079
|
E();
|
|
3062
3080
|
}, [E]), s === void 0 ? /* @__PURE__ */ o.jsx(Er, { children: /* @__PURE__ */ o.jsxs(It, { variant: "danger", className: "fw-bold", children: [
|
|
3063
3081
|
l.cantRunLocalizationSettings,
|
|
@@ -3069,13 +3087,13 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
3069
3087
|
"--adding-column": B ? 1 : 0
|
|
3070
3088
|
}, children: [
|
|
3071
3089
|
/* @__PURE__ */ o.jsxs("div", { className: _(Fe.tableFullWidth, "d-flex align-items-center justify-content-between gap-2 px-2 mt-1"), children: [
|
|
3072
|
-
/* @__PURE__ */ o.jsx(st, { options: i.map((
|
|
3073
|
-
id:
|
|
3074
|
-
name:
|
|
3075
|
-
})), value: m, onChange: (
|
|
3090
|
+
/* @__PURE__ */ o.jsx(st, { options: i.map((S) => ({
|
|
3091
|
+
id: S.path,
|
|
3092
|
+
name: S.nameTranslationKey
|
|
3093
|
+
})), value: m, onChange: (S) => typeof S != "number" ? g(S) : null, size: "sm", label: l.localizationFile, className: Fe.fileSelect, noSortOptions: !0 }),
|
|
3076
3094
|
/* @__PURE__ */ o.jsxs("div", { className: _(Fe.searchBox, "d-flex align-items-center gap-2 border rounded"), children: [
|
|
3077
3095
|
/* @__PURE__ */ o.jsx(c, { icon: "search", className: "text-muted", size: 18, iconProps: { className: "mt- me-n4" } }),
|
|
3078
|
-
/* @__PURE__ */ o.jsx(it, { type: "text", value: b, onChange: (
|
|
3096
|
+
/* @__PURE__ */ o.jsx(it, { type: "text", value: b, onChange: (S) => h(typeof S == "string" ? S : ""), size: "sm", showClearIcon: b !== "", withoutLabel: !0, placeholder: "vyhledávat...", className: "placeholder-muted bg-transparent border-0 my-0 py-0 w-100" })
|
|
3079
3097
|
] }),
|
|
3080
3098
|
/* @__PURE__ */ o.jsxs(ws, { children: [
|
|
3081
3099
|
/* @__PURE__ */ o.jsx(ca, { cKey: "export", hideOn: "always", onClick: n, icon: /* @__PURE__ */ o.jsx(ld, { fileExtension: "xls" }), children: l.xlsExport }),
|
|
@@ -3084,22 +3102,22 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
3084
3102
|
] }),
|
|
3085
3103
|
/* @__PURE__ */ o.jsxs("div", { className: _(Fe.subgrid, Fe.lngSelectRow), children: [
|
|
3086
3104
|
/* @__PURE__ */ o.jsx(Y, { variant: "body", children: l.key }),
|
|
3087
|
-
Array.from(v).map((
|
|
3088
|
-
B ? /* @__PURE__ */ o.jsx(st, { options:
|
|
3105
|
+
Array.from(v).map((S, I) => /* @__PURE__ */ o.jsx(st, { options: e.filter(($) => $.id === S || !v.has($.id)), value: S, onChange: ($) => N((A) => $ === null ? (A.delete(S), new Set(A)) : (typeof $ == "string" && (A.delete(S), A.add($)), new Set(A))), size: "sm", label: `${l.language} ${I + 1}`, withoutLabel: !0, InputContainer: Oe, className: _(Fe.lngSelect) }, S)),
|
|
3106
|
+
B ? /* @__PURE__ */ o.jsx(st, { options: w, value: null, onChange: (S) => N((I) => (typeof S == "string" && I.add(S), new Set(I))), size: "sm", label: l.addLanguage, InputContainer: Oe, className: _(Fe.lngSelect, Fe.addLng) }) : null
|
|
3089
3107
|
] }),
|
|
3090
3108
|
/* @__PURE__ */ o.jsxs("div", { className: _(Fe.subgrid, Fe.tableBody), children: [
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
/* @__PURE__ */ o.jsx(Y, { variant: "form-label", children:
|
|
3094
|
-
Array.from(v).map((I) => /* @__PURE__ */ o.jsx(pf, { localizationKey:
|
|
3095
|
-
] },
|
|
3109
|
+
x.length === 0 || j.length === 0 ? /* @__PURE__ */ o.jsx(It, { variant: "warning", className: _(Fe.tableFullWidth, Fe.emptyTableAlert, "my-n1"), children: x.length === 0 ? l.noDataLoaded : j.length === 0 ? l.noDataFiltered : null }) : null,
|
|
3110
|
+
j.slice(Qr * (u - 1), Qr * u).map((S) => /* @__PURE__ */ o.jsxs("div", { className: _(Fe.subgrid, Fe.tableItem), children: [
|
|
3111
|
+
/* @__PURE__ */ o.jsx(Y, { variant: "form-label", children: S.key }),
|
|
3112
|
+
Array.from(v).map((I) => /* @__PURE__ */ o.jsx(pf, { localizationKey: S.key, lngsData: p, selLng: I, reloadData: T, saveChanges: a }, I))
|
|
3113
|
+
] }, S.key))
|
|
3096
3114
|
] }),
|
|
3097
3115
|
/* @__PURE__ */ o.jsxs("div", { className: _("d-flex align-items-center justify-content-around gap-3 px-2 py-0", Fe.tableFooter), children: [
|
|
3098
3116
|
/* @__PURE__ */ o.jsx("div", { children: /* @__PURE__ */ o.jsxs(Y, { variant: "body", children: [
|
|
3099
3117
|
l.keyCount,
|
|
3100
3118
|
":",
|
|
3101
3119
|
" ",
|
|
3102
|
-
/* @__PURE__ */ o.jsx("span", { className: "fw-bold", children:
|
|
3120
|
+
/* @__PURE__ */ o.jsx("span", { className: "fw-bold", children: j.length })
|
|
3103
3121
|
] }) }),
|
|
3104
3122
|
/* @__PURE__ */ o.jsxs("div", { className: "d-flex gap-1 align-items-center", children: [
|
|
3105
3123
|
/* @__PURE__ */ o.jsxs(Y, { variant: "body", children: [
|
|
@@ -3111,7 +3129,7 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
3111
3129
|
/* @__PURE__ */ o.jsx("div", { style: { width: 30 }, children: /* @__PURE__ */ o.jsx(hp, { value: u, onChange: O, InputContainer: Oe, withoutLabel: !0, size: "sm" }) }),
|
|
3112
3130
|
/* @__PURE__ */ o.jsxs(Y, { variant: "body", children: [
|
|
3113
3131
|
"/",
|
|
3114
|
-
Math.ceil(
|
|
3132
|
+
Math.ceil(j.length / Qr)
|
|
3115
3133
|
] }),
|
|
3116
3134
|
/* @__PURE__ */ o.jsx(te, { size: "sm", onClick: () => O(u + 1), children: /* @__PURE__ */ o.jsx(c, { icon: "plus" }) })
|
|
3117
3135
|
] })
|
|
@@ -3130,7 +3148,7 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
3130
3148
|
widgetTitle: _f,
|
|
3131
3149
|
title: Of
|
|
3132
3150
|
}, Pf = ({ show: e, widgetGroups: t, widgets: r, handleClose: n, onWidgetPicked: a, texts: i }) => {
|
|
3133
|
-
const [s, l] = k(""), c =
|
|
3151
|
+
const [s, l] = k(""), c = M(() => r.filter((d) => d.id !== -1 && ut(d.name, s)), [r, s]), u = M(() => t.filter((d) => c.some((p) => p.group === d.id)), [t, c]);
|
|
3134
3152
|
return /* @__PURE__ */ o.jsxs(_e, { show: e, onHide: () => n(), size: "lg", children: [
|
|
3135
3153
|
/* @__PURE__ */ o.jsxs(_e.Header, { closeButton: !0, children: [
|
|
3136
3154
|
/* @__PURE__ */ o.jsx(_e.Title, { className: "w-100", children: i.pickWidgetToAdd }),
|
|
@@ -3205,13 +3223,13 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
3205
3223
|
widgets: [...s.widgets, { widgetId: b, fullWidth: !1 }]
|
|
3206
3224
|
}) : l({
|
|
3207
3225
|
...s,
|
|
3208
|
-
widgets: ((v = s.widgets) == null ? void 0 : v.map((
|
|
3226
|
+
widgets: ((v = s.widgets) == null ? void 0 : v.map((y, N) => N === g ? { widgetId: b, fullWidth: !1 } : y)) ?? []
|
|
3209
3227
|
});
|
|
3210
3228
|
}, [s, l]), u = P((g) => {
|
|
3211
3229
|
var b, h;
|
|
3212
3230
|
((b = s.widgets[g]) == null ? void 0 : b.widgetId) === -1 ? l({
|
|
3213
3231
|
...s,
|
|
3214
|
-
widgets: ((h = s.widgets) == null ? void 0 : h.filter((v,
|
|
3232
|
+
widgets: ((h = s.widgets) == null ? void 0 : h.filter((v, y) => y !== g)) ?? []
|
|
3215
3233
|
}) : c(g, -1);
|
|
3216
3234
|
}, [s, l, c]), d = P((g) => {
|
|
3217
3235
|
var b;
|
|
@@ -3251,7 +3269,7 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
3251
3269
|
lg: qf,
|
|
3252
3270
|
light: Yf
|
|
3253
3271
|
}, $N = ({ children: e, color: t = "primary", size: r = "md", rounded: n, className: a, variant: i = "filled", ...s }) => {
|
|
3254
|
-
const l =
|
|
3272
|
+
const l = M(() => i === "filled" ? _(`bg-${t}`) : i === "outline" ? _(`text-${t} border-${t} border bg-white`) : "", [t, i]);
|
|
3255
3273
|
return /* @__PURE__ */ o.jsx("span", { className: _("luminus-badge badge", l, a, { "rounded-pill": n }, { "text-dark": t === "light" }, { [$n.light]: t === "light" }, $n.badge, $n[r]), ...s, children: e });
|
|
3256
3274
|
}, Kf = "_collapse-icon_1ahhn_1", Xf = "_collapsed_1ahhn_6", ni = {
|
|
3257
3275
|
"collapse-icon": "_collapse-icon_1ahhn_1",
|
|
@@ -3343,22 +3361,22 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
3343
3361
|
c();
|
|
3344
3362
|
}, [c]), { isLoading: n, searchItems: i };
|
|
3345
3363
|
}, GN = ({ searchTypes: e, navigateFunction: t, currentPath: r, homePath: n = "/", className: a }) => {
|
|
3346
|
-
var
|
|
3347
|
-
const { texts: { appSearch: i } } = z(J), [s, l] = k(e.length > 0 ? ((
|
|
3364
|
+
var y;
|
|
3365
|
+
const { texts: { appSearch: i } } = z(J), [s, l] = k(e.length > 0 ? ((y = e.at(0)) == null ? void 0 : y.key) ?? null : null), c = M(() => e.find((N) => N.key === s) ?? null, [e, s]), [u, d] = k(""), [p, f] = Ra(encodeURIComponent(u), 500), { isLoading: m, searchItems: g } = pm(c, p), [b, h] = k(!1);
|
|
3348
3366
|
q(() => {
|
|
3349
3367
|
(g.length > 0 || m) && h(!0);
|
|
3350
3368
|
}, [g, m]);
|
|
3351
3369
|
const v = re(null);
|
|
3352
3370
|
return q(() => {
|
|
3353
|
-
var
|
|
3354
|
-
d(""), r === n && ((
|
|
3355
|
-
}, [r, n]), /* @__PURE__ */ o.jsx(Pe, { className: "w-100 d-flex align-items-center justify-content-center", onSubmit: (
|
|
3356
|
-
|
|
3371
|
+
var N;
|
|
3372
|
+
d(""), r === n && ((N = v.current) == null || N.focus());
|
|
3373
|
+
}, [r, n]), /* @__PURE__ */ o.jsx(Pe, { className: "w-100 d-flex align-items-center justify-content-center", onSubmit: (N) => {
|
|
3374
|
+
N.preventDefault(), N.stopPropagation(), f.flush(), h(!1), p.length > 2 && t(`/search?query=${p}${c && c.key && `&type=${c == null ? void 0 : c.key}`}`);
|
|
3357
3375
|
}, children: /* @__PURE__ */ o.jsxs(on, { className: _(At.inputGroup, a), children: [
|
|
3358
3376
|
/* @__PURE__ */ o.jsx(on.Text, { className: _("p-1 rounded", At.inputGroupText, At.left), children: /* @__PURE__ */ o.jsx(nm, { searchTypes: e, selectedType: c, setSelectedType: l }) }),
|
|
3359
|
-
/* @__PURE__ */ o.jsx(Pe.Control, { ref: v, placeholder: i.searchPlaceholder, type: "text", size: "sm", className: _("luminus-app-search-input", At.input), value: u, onChange: (
|
|
3360
|
-
var
|
|
3361
|
-
return d(((
|
|
3377
|
+
/* @__PURE__ */ o.jsx(Pe.Control, { ref: v, placeholder: i.searchPlaceholder, type: "text", size: "sm", className: _("luminus-app-search-input", At.input), value: u, onChange: (N) => {
|
|
3378
|
+
var w;
|
|
3379
|
+
return d(((w = N.target) == null ? void 0 : w.value) ?? "");
|
|
3362
3380
|
}, onFocus: () => g.length > 0 && h(!0) }),
|
|
3363
3381
|
/* @__PURE__ */ o.jsx(on.Text, { className: _("p-0 rounded", At.inputGroupText, At.right), children: /* @__PURE__ */ o.jsx("button", { type: "submit", className: _("text-primary", At.submitButton), children: /* @__PURE__ */ o.jsx(gd, {}) }) }),
|
|
3364
3382
|
/* @__PURE__ */ o.jsx(um, { query: p, searchTypes: e, show: b, onCancel: () => h(!1), groups: g, isLoading: m })
|
|
@@ -3378,7 +3396,7 @@ e.label === "", Ko = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Xo =
|
|
|
3378
3396
|
q(() => {
|
|
3379
3397
|
d(c);
|
|
3380
3398
|
}, [c]);
|
|
3381
|
-
const f =
|
|
3399
|
+
const f = M(() => !r || !r.toString() || r.toString().split(",").filter((m) => m && m !== "false").length === 0, [r]);
|
|
3382
3400
|
return s && f ? null : /* @__PURE__ */ o.jsxs("div", { className: _("luminus-card rounded shadow-sm", kt.card, {
|
|
3383
3401
|
[n ?? ""]: n
|
|
3384
3402
|
}), children: [
|
|
@@ -3542,8 +3560,8 @@ function sl(e, t, r) {
|
|
|
3542
3560
|
if (c)
|
|
3543
3561
|
throw new Error(process.env.NODE_ENV === "production" ? We(6) : "You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");
|
|
3544
3562
|
h = !1, u();
|
|
3545
|
-
var
|
|
3546
|
-
l.splice(
|
|
3563
|
+
var y = l.indexOf(b);
|
|
3564
|
+
l.splice(y, 1), s = null;
|
|
3547
3565
|
}
|
|
3548
3566
|
};
|
|
3549
3567
|
}
|
|
@@ -3560,8 +3578,8 @@ function sl(e, t, r) {
|
|
|
3560
3578
|
c = !1;
|
|
3561
3579
|
}
|
|
3562
3580
|
for (var h = s = l, v = 0; v < h.length; v++) {
|
|
3563
|
-
var
|
|
3564
|
-
|
|
3581
|
+
var y = h[v];
|
|
3582
|
+
y();
|
|
3565
3583
|
}
|
|
3566
3584
|
return b;
|
|
3567
3585
|
}
|
|
@@ -3583,16 +3601,16 @@ function sl(e, t, r) {
|
|
|
3583
3601
|
* be used to unsubscribe the observable from the store, and prevent further
|
|
3584
3602
|
* emission of values from the observable.
|
|
3585
3603
|
*/
|
|
3586
|
-
subscribe: function(
|
|
3587
|
-
if (typeof
|
|
3588
|
-
throw new Error(process.env.NODE_ENV === "production" ? We(11) : "Expected the observer to be an object. Instead, received: '" + Ft(
|
|
3589
|
-
function
|
|
3590
|
-
|
|
3604
|
+
subscribe: function(y) {
|
|
3605
|
+
if (typeof y != "object" || y === null)
|
|
3606
|
+
throw new Error(process.env.NODE_ENV === "production" ? We(11) : "Expected the observer to be an object. Instead, received: '" + Ft(y) + "'");
|
|
3607
|
+
function N() {
|
|
3608
|
+
y.next && y.next(d());
|
|
3591
3609
|
}
|
|
3592
|
-
|
|
3593
|
-
var
|
|
3610
|
+
N();
|
|
3611
|
+
var w = h(N);
|
|
3594
3612
|
return {
|
|
3595
|
-
unsubscribe:
|
|
3613
|
+
unsubscribe: w
|
|
3596
3614
|
};
|
|
3597
3615
|
}
|
|
3598
3616
|
}, b[ii] = function() {
|
|
@@ -3738,13 +3756,13 @@ function dl(e, t) {
|
|
|
3738
3756
|
}
|
|
3739
3757
|
var ul = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? ka : q;
|
|
3740
3758
|
function pl(e) {
|
|
3741
|
-
var t = e.store, r = e.context, n = e.children, a =
|
|
3759
|
+
var t = e.store, r = e.context, n = e.children, a = M(function() {
|
|
3742
3760
|
var l = dl(t);
|
|
3743
3761
|
return {
|
|
3744
3762
|
store: t,
|
|
3745
3763
|
subscription: l
|
|
3746
3764
|
};
|
|
3747
|
-
}, [t]), i =
|
|
3765
|
+
}, [t]), i = M(function() {
|
|
3748
3766
|
return t.getState();
|
|
3749
3767
|
}, [t]);
|
|
3750
3768
|
ul(function() {
|
|
@@ -3848,26 +3866,26 @@ function $m() {
|
|
|
3848
3866
|
var v = Symbol.for;
|
|
3849
3867
|
e = v("react.element"), t = v("react.portal"), r = v("react.fragment"), n = v("react.strict_mode"), a = v("react.profiler"), i = v("react.provider"), s = v("react.context"), l = v("react.forward_ref"), c = v("react.suspense"), u = v("react.suspense_list"), d = v("react.memo"), p = v("react.lazy"), f = v("react.block"), m = v("react.server.block"), g = v("react.fundamental"), b = v("react.debug_trace_mode"), h = v("react.legacy_hidden");
|
|
3850
3868
|
}
|
|
3851
|
-
function
|
|
3852
|
-
if (typeof
|
|
3853
|
-
var I =
|
|
3869
|
+
function y(S) {
|
|
3870
|
+
if (typeof S == "object" && S !== null) {
|
|
3871
|
+
var I = S.$$typeof;
|
|
3854
3872
|
switch (I) {
|
|
3855
3873
|
case e:
|
|
3856
|
-
switch (
|
|
3874
|
+
switch (S = S.type, S) {
|
|
3857
3875
|
case r:
|
|
3858
3876
|
case a:
|
|
3859
3877
|
case n:
|
|
3860
3878
|
case c:
|
|
3861
3879
|
case u:
|
|
3862
|
-
return
|
|
3880
|
+
return S;
|
|
3863
3881
|
default:
|
|
3864
|
-
switch (
|
|
3882
|
+
switch (S = S && S.$$typeof, S) {
|
|
3865
3883
|
case s:
|
|
3866
3884
|
case l:
|
|
3867
3885
|
case p:
|
|
3868
3886
|
case d:
|
|
3869
3887
|
case i:
|
|
3870
|
-
return
|
|
3888
|
+
return S;
|
|
3871
3889
|
default:
|
|
3872
3890
|
return I;
|
|
3873
3891
|
}
|
|
@@ -3877,36 +3895,36 @@ function $m() {
|
|
|
3877
3895
|
}
|
|
3878
3896
|
}
|
|
3879
3897
|
}
|
|
3880
|
-
var
|
|
3881
|
-
return xe.ContextConsumer = s, xe.ContextProvider =
|
|
3898
|
+
var N = i, w = e, x = l, j = r, C = p, O = d, E = t, T = a, B = n, V = c;
|
|
3899
|
+
return xe.ContextConsumer = s, xe.ContextProvider = N, xe.Element = w, xe.ForwardRef = x, xe.Fragment = j, xe.Lazy = C, xe.Memo = O, xe.Portal = E, xe.Profiler = T, xe.StrictMode = B, xe.Suspense = V, xe.isAsyncMode = function() {
|
|
3882
3900
|
return !1;
|
|
3883
3901
|
}, xe.isConcurrentMode = function() {
|
|
3884
3902
|
return !1;
|
|
3885
|
-
}, xe.isContextConsumer = function(
|
|
3886
|
-
return
|
|
3887
|
-
}, xe.isContextProvider = function(
|
|
3888
|
-
return
|
|
3889
|
-
}, xe.isElement = function(
|
|
3890
|
-
return typeof
|
|
3891
|
-
}, xe.isForwardRef = function(
|
|
3892
|
-
return
|
|
3893
|
-
}, xe.isFragment = function(
|
|
3894
|
-
return
|
|
3895
|
-
}, xe.isLazy = function(
|
|
3896
|
-
return
|
|
3897
|
-
}, xe.isMemo = function(
|
|
3898
|
-
return
|
|
3899
|
-
}, xe.isPortal = function(
|
|
3900
|
-
return
|
|
3901
|
-
}, xe.isProfiler = function(
|
|
3902
|
-
return
|
|
3903
|
-
}, xe.isStrictMode = function(
|
|
3904
|
-
return
|
|
3905
|
-
}, xe.isSuspense = function(
|
|
3906
|
-
return
|
|
3907
|
-
}, xe.isValidElementType = function(
|
|
3908
|
-
return typeof
|
|
3909
|
-
}, xe.typeOf =
|
|
3903
|
+
}, xe.isContextConsumer = function(S) {
|
|
3904
|
+
return y(S) === s;
|
|
3905
|
+
}, xe.isContextProvider = function(S) {
|
|
3906
|
+
return y(S) === i;
|
|
3907
|
+
}, xe.isElement = function(S) {
|
|
3908
|
+
return typeof S == "object" && S !== null && S.$$typeof === e;
|
|
3909
|
+
}, xe.isForwardRef = function(S) {
|
|
3910
|
+
return y(S) === l;
|
|
3911
|
+
}, xe.isFragment = function(S) {
|
|
3912
|
+
return y(S) === r;
|
|
3913
|
+
}, xe.isLazy = function(S) {
|
|
3914
|
+
return y(S) === p;
|
|
3915
|
+
}, xe.isMemo = function(S) {
|
|
3916
|
+
return y(S) === d;
|
|
3917
|
+
}, xe.isPortal = function(S) {
|
|
3918
|
+
return y(S) === t;
|
|
3919
|
+
}, xe.isProfiler = function(S) {
|
|
3920
|
+
return y(S) === a;
|
|
3921
|
+
}, xe.isStrictMode = function(S) {
|
|
3922
|
+
return y(S) === n;
|
|
3923
|
+
}, xe.isSuspense = function(S) {
|
|
3924
|
+
return y(S) === c;
|
|
3925
|
+
}, xe.isValidElementType = function(S) {
|
|
3926
|
+
return typeof S == "string" || typeof S == "function" || S === r || S === a || S === b || S === n || S === c || S === u || S === h || typeof S == "object" && S !== null && (S.$$typeof === p || S.$$typeof === d || S.$$typeof === i || S.$$typeof === s || S.$$typeof === l || S.$$typeof === g || S.$$typeof === f || S[0] === m);
|
|
3927
|
+
}, xe.typeOf = y, xe;
|
|
3910
3928
|
}
|
|
3911
3929
|
var ye = {};
|
|
3912
3930
|
/** @license React v17.0.2
|
|
@@ -3925,11 +3943,11 @@ function Gm() {
|
|
|
3925
3943
|
var v = Symbol.for;
|
|
3926
3944
|
e = v("react.element"), t = v("react.portal"), r = v("react.fragment"), n = v("react.strict_mode"), a = v("react.profiler"), i = v("react.provider"), s = v("react.context"), l = v("react.forward_ref"), c = v("react.suspense"), u = v("react.suspense_list"), d = v("react.memo"), p = v("react.lazy"), f = v("react.block"), m = v("react.server.block"), g = v("react.fundamental"), v("react.scope"), v("react.opaque.id"), b = v("react.debug_trace_mode"), v("react.offscreen"), h = v("react.legacy_hidden");
|
|
3927
3945
|
}
|
|
3928
|
-
var
|
|
3929
|
-
function w(R) {
|
|
3930
|
-
return !!(typeof R == "string" || typeof R == "function" || R === r || R === a || R === b || R === n || R === c || R === u || R === h || x || typeof R == "object" && R !== null && (R.$$typeof === p || R.$$typeof === d || R.$$typeof === i || R.$$typeof === s || R.$$typeof === l || R.$$typeof === g || R.$$typeof === f || R[0] === m));
|
|
3931
|
-
}
|
|
3946
|
+
var y = !1;
|
|
3932
3947
|
function N(R) {
|
|
3948
|
+
return !!(typeof R == "string" || typeof R == "function" || R === r || R === a || R === b || R === n || R === c || R === u || R === h || y || typeof R == "object" && R !== null && (R.$$typeof === p || R.$$typeof === d || R.$$typeof === i || R.$$typeof === s || R.$$typeof === l || R.$$typeof === g || R.$$typeof === f || R[0] === m));
|
|
3949
|
+
}
|
|
3950
|
+
function w(R) {
|
|
3933
3951
|
if (typeof R == "object" && R !== null) {
|
|
3934
3952
|
var de = R.$$typeof;
|
|
3935
3953
|
switch (de) {
|
|
@@ -3960,47 +3978,47 @@ function Gm() {
|
|
|
3960
3978
|
}
|
|
3961
3979
|
}
|
|
3962
3980
|
}
|
|
3963
|
-
var
|
|
3981
|
+
var x = s, j = i, C = e, O = l, E = r, T = p, B = d, V = t, S = a, I = n, $ = c, A = !1, L = !1;
|
|
3964
3982
|
function U(R) {
|
|
3965
3983
|
return A || (A = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
3966
3984
|
}
|
|
3967
|
-
function
|
|
3968
|
-
return
|
|
3985
|
+
function G(R) {
|
|
3986
|
+
return L || (L = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
3969
3987
|
}
|
|
3970
3988
|
function H(R) {
|
|
3971
|
-
return
|
|
3989
|
+
return w(R) === s;
|
|
3972
3990
|
}
|
|
3973
3991
|
function X(R) {
|
|
3974
|
-
return
|
|
3992
|
+
return w(R) === i;
|
|
3975
3993
|
}
|
|
3976
3994
|
function ee(R) {
|
|
3977
3995
|
return typeof R == "object" && R !== null && R.$$typeof === e;
|
|
3978
3996
|
}
|
|
3979
3997
|
function ie(R) {
|
|
3980
|
-
return
|
|
3998
|
+
return w(R) === l;
|
|
3981
3999
|
}
|
|
3982
4000
|
function se(R) {
|
|
3983
|
-
return
|
|
4001
|
+
return w(R) === r;
|
|
3984
4002
|
}
|
|
3985
4003
|
function be(R) {
|
|
3986
|
-
return
|
|
4004
|
+
return w(R) === p;
|
|
3987
4005
|
}
|
|
3988
4006
|
function W(R) {
|
|
3989
|
-
return
|
|
4007
|
+
return w(R) === d;
|
|
3990
4008
|
}
|
|
3991
4009
|
function ae(R) {
|
|
3992
|
-
return
|
|
4010
|
+
return w(R) === t;
|
|
3993
4011
|
}
|
|
3994
4012
|
function me(R) {
|
|
3995
|
-
return
|
|
4013
|
+
return w(R) === a;
|
|
3996
4014
|
}
|
|
3997
4015
|
function je(R) {
|
|
3998
|
-
return
|
|
4016
|
+
return w(R) === n;
|
|
3999
4017
|
}
|
|
4000
4018
|
function pe(R) {
|
|
4001
|
-
return
|
|
4019
|
+
return w(R) === c;
|
|
4002
4020
|
}
|
|
4003
|
-
ye.ContextConsumer =
|
|
4021
|
+
ye.ContextConsumer = x, ye.ContextProvider = j, ye.Element = C, ye.ForwardRef = O, ye.Fragment = E, ye.Lazy = T, ye.Memo = B, ye.Portal = V, ye.Profiler = S, ye.StrictMode = I, ye.Suspense = $, ye.isAsyncMode = U, ye.isConcurrentMode = G, ye.isContextConsumer = H, ye.isContextProvider = X, ye.isElement = ee, ye.isForwardRef = ie, ye.isFragment = se, ye.isLazy = be, ye.isMemo = W, ye.isPortal = ae, ye.isProfiler = me, ye.isStrictMode = je, ye.isSuspense = pe, ye.isValidElementType = N, ye.typeOf = w;
|
|
4004
4022
|
}()), ye;
|
|
4005
4023
|
}
|
|
4006
4024
|
process.env.NODE_ENV === "production" ? va.exports = $m() : va.exports = Gm();
|
|
@@ -4030,8 +4048,8 @@ function Xm(e, t, r, n, a, i, s, l, c, u) {
|
|
|
4030
4048
|
var b = t.getState(), h, v;
|
|
4031
4049
|
try {
|
|
4032
4050
|
h = n(b, a.current);
|
|
4033
|
-
} catch (
|
|
4034
|
-
v =
|
|
4051
|
+
} catch (y) {
|
|
4052
|
+
v = y, p = y;
|
|
4035
4053
|
}
|
|
4036
4054
|
v || (p = null), h === i.current ? s.current || c() : (i.current = h, l.current = h, s.current = !0, u({
|
|
4037
4055
|
type: "STORE_UPDATED",
|
|
@@ -4054,23 +4072,23 @@ var Qm = function() {
|
|
|
4054
4072
|
};
|
|
4055
4073
|
function Jm(e, t) {
|
|
4056
4074
|
t === void 0 && (t = {});
|
|
4057
|
-
var r = t, n = r.getDisplayName, a = n === void 0 ? function(
|
|
4058
|
-
return "ConnectAdvanced(" +
|
|
4059
|
-
} : n, i = r.methodName, s = i === void 0 ? "connectAdvanced" : i, l = r.renderCountProp, c = l === void 0 ? void 0 : l, u = r.shouldHandleStateChanges, d = u === void 0 ? !0 : u, p = r.storeKey, f = p === void 0 ? "store" : p, m = r.withRef, g = m === void 0 ? !1 : m, b = r.forwardRef, h = b === void 0 ? !1 : b, v = r.context,
|
|
4075
|
+
var r = t, n = r.getDisplayName, a = n === void 0 ? function(j) {
|
|
4076
|
+
return "ConnectAdvanced(" + j + ")";
|
|
4077
|
+
} : n, i = r.methodName, s = i === void 0 ? "connectAdvanced" : i, l = r.renderCountProp, c = l === void 0 ? void 0 : l, u = r.shouldHandleStateChanges, d = u === void 0 ? !0 : u, p = r.storeKey, f = p === void 0 ? "store" : p, m = r.withRef, g = m === void 0 ? !1 : m, b = r.forwardRef, h = b === void 0 ? !1 : b, v = r.context, y = v === void 0 ? Ha : v, N = cn(r, Wm);
|
|
4060
4078
|
if (process.env.NODE_ENV !== "production") {
|
|
4061
4079
|
if (c !== void 0)
|
|
4062
4080
|
throw new Error("renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension");
|
|
4063
4081
|
if (g)
|
|
4064
4082
|
throw new Error("withRef is removed. To access the wrapped instance, use a ref on the connected component");
|
|
4065
|
-
var
|
|
4083
|
+
var w = "To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect";
|
|
4066
4084
|
if (f !== "store")
|
|
4067
|
-
throw new Error("storeKey has been removed and does not do anything. " +
|
|
4085
|
+
throw new Error("storeKey has been removed and does not do anything. " + w);
|
|
4068
4086
|
}
|
|
4069
|
-
var
|
|
4070
|
-
return function(
|
|
4071
|
-
if (process.env.NODE_ENV !== "production" && !hi.isValidElementType(
|
|
4072
|
-
throw new Error("You must pass a component to the function returned by " + (s + ". Instead received " + qm(
|
|
4073
|
-
var O =
|
|
4087
|
+
var x = y;
|
|
4088
|
+
return function(C) {
|
|
4089
|
+
if (process.env.NODE_ENV !== "production" && !hi.isValidElementType(C))
|
|
4090
|
+
throw new Error("You must pass a component to the function returned by " + (s + ". Instead received " + qm(C)));
|
|
4091
|
+
var O = C.displayName || C.name || "Component", E = a(O), T = ne({}, N, {
|
|
4074
4092
|
getDisplayName: a,
|
|
4075
4093
|
methodName: s,
|
|
4076
4094
|
renderCountProp: c,
|
|
@@ -4078,61 +4096,61 @@ function Jm(e, t) {
|
|
|
4078
4096
|
storeKey: f,
|
|
4079
4097
|
displayName: E,
|
|
4080
4098
|
wrappedComponentName: O,
|
|
4081
|
-
WrappedComponent:
|
|
4082
|
-
}), B =
|
|
4083
|
-
function V(
|
|
4084
|
-
return e(
|
|
4099
|
+
WrappedComponent: C
|
|
4100
|
+
}), B = N.pure;
|
|
4101
|
+
function V(L) {
|
|
4102
|
+
return e(L.dispatch, T);
|
|
4085
4103
|
}
|
|
4086
|
-
var
|
|
4087
|
-
return
|
|
4104
|
+
var S = B ? M : function(L) {
|
|
4105
|
+
return L();
|
|
4088
4106
|
};
|
|
4089
|
-
function I(
|
|
4090
|
-
var U =
|
|
4091
|
-
var ce =
|
|
4092
|
-
return [
|
|
4093
|
-
}, [
|
|
4094
|
-
return
|
|
4095
|
-
}, [
|
|
4107
|
+
function I(L) {
|
|
4108
|
+
var U = M(function() {
|
|
4109
|
+
var ce = L.reactReduxForwardedRef, Le = cn(L, Um);
|
|
4110
|
+
return [L.context, ce, Le];
|
|
4111
|
+
}, [L]), G = U[0], H = U[1], X = U[2], ee = M(function() {
|
|
4112
|
+
return G && G.Consumer && hi.isContextConsumer(/* @__PURE__ */ le.createElement(G.Consumer, null)) ? G : x;
|
|
4113
|
+
}, [G, x]), ie = z(ee), se = !!L.store && !!L.store.getState && !!L.store.dispatch, be = !!ie && !!ie.store;
|
|
4096
4114
|
if (process.env.NODE_ENV !== "production" && !se && !be)
|
|
4097
4115
|
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."));
|
|
4098
|
-
var W = se ?
|
|
4116
|
+
var W = se ? L.store : ie.store, ae = M(function() {
|
|
4099
4117
|
return V(W);
|
|
4100
|
-
}, [W]), me =
|
|
4118
|
+
}, [W]), me = M(function() {
|
|
4101
4119
|
if (!d) return zm;
|
|
4102
4120
|
var ce = dl(W, se ? null : ie.subscription), Le = ce.notifyNestedSubs.bind(ce);
|
|
4103
4121
|
return [ce, Le];
|
|
4104
|
-
}, [W, se, ie]), je = me[0], pe = me[1], R =
|
|
4122
|
+
}, [W, se, ie]), je = me[0], pe = me[1], R = M(function() {
|
|
4105
4123
|
return se ? ie : ne({}, ie, {
|
|
4106
4124
|
subscription: je
|
|
4107
4125
|
});
|
|
4108
4126
|
}, [se, ie, je]), de = Wd(Ym, Hm, Qm), Ee = de[0], Ge = Ee[0], Ye = de[1];
|
|
4109
4127
|
if (Ge && Ge.error)
|
|
4110
4128
|
throw Ge.error;
|
|
4111
|
-
var mt = re(), K = re(X), F = re(), Z = re(!1), ue =
|
|
4129
|
+
var mt = re(), K = re(X), F = re(), Z = re(!1), ue = S(function() {
|
|
4112
4130
|
return F.current && X === K.current ? F.current : ae(W.getState(), X);
|
|
4113
4131
|
}, [W, Ge, X]);
|
|
4114
4132
|
bi(Km, [K, mt, Z, X, ue, F, pe]), bi(Xm, [d, W, je, ae, K, mt, Z, F, pe, Ye], [W, je, ae]);
|
|
4115
|
-
var Ce =
|
|
4116
|
-
return /* @__PURE__ */ le.createElement(
|
|
4133
|
+
var Ce = M(function() {
|
|
4134
|
+
return /* @__PURE__ */ le.createElement(C, ne({}, ue, {
|
|
4117
4135
|
ref: H
|
|
4118
4136
|
}));
|
|
4119
|
-
}, [H,
|
|
4137
|
+
}, [H, C, ue]), ge = M(function() {
|
|
4120
4138
|
return d ? /* @__PURE__ */ le.createElement(ee.Provider, {
|
|
4121
4139
|
value: R
|
|
4122
4140
|
}, Ce) : Ce;
|
|
4123
4141
|
}, [ee, Ce, R]);
|
|
4124
4142
|
return ge;
|
|
4125
4143
|
}
|
|
4126
|
-
var
|
|
4127
|
-
if (
|
|
4128
|
-
var A = le.forwardRef(function(U,
|
|
4129
|
-
return /* @__PURE__ */ le.createElement(
|
|
4130
|
-
reactReduxForwardedRef:
|
|
4144
|
+
var $ = B ? le.memo(I) : I;
|
|
4145
|
+
if ($.WrappedComponent = C, $.displayName = I.displayName = E, h) {
|
|
4146
|
+
var A = le.forwardRef(function(U, G) {
|
|
4147
|
+
return /* @__PURE__ */ le.createElement($, ne({}, U, {
|
|
4148
|
+
reactReduxForwardedRef: G
|
|
4131
4149
|
}));
|
|
4132
4150
|
});
|
|
4133
|
-
return A.displayName = E, A.WrappedComponent =
|
|
4151
|
+
return A.displayName = E, A.WrappedComponent = C, mi(A, C);
|
|
4134
4152
|
}
|
|
4135
|
-
return mi(
|
|
4153
|
+
return mi($, C);
|
|
4136
4154
|
};
|
|
4137
4155
|
}
|
|
4138
4156
|
function xi(e, t) {
|
|
@@ -4264,8 +4282,8 @@ function gg(e, t, r, n) {
|
|
|
4264
4282
|
}
|
|
4265
4283
|
function vg(e, t, r, n, a) {
|
|
4266
4284
|
var i = a.areStatesEqual, s = a.areOwnPropsEqual, l = a.areStatePropsEqual, c = !1, u, d, p, f, m;
|
|
4267
|
-
function g(
|
|
4268
|
-
return u =
|
|
4285
|
+
function g(N, w) {
|
|
4286
|
+
return u = N, d = w, p = e(u, d), f = t(n, d), m = r(p, f, d), c = !0, m;
|
|
4269
4287
|
}
|
|
4270
4288
|
function b() {
|
|
4271
4289
|
return p = e(u, d), t.dependsOnOwnProps && (f = t(n, d)), m = r(p, f, d), m;
|
|
@@ -4274,15 +4292,15 @@ function vg(e, t, r, n, a) {
|
|
|
4274
4292
|
return e.dependsOnOwnProps && (p = e(u, d)), t.dependsOnOwnProps && (f = t(n, d)), m = r(p, f, d), m;
|
|
4275
4293
|
}
|
|
4276
4294
|
function v() {
|
|
4277
|
-
var
|
|
4278
|
-
return p =
|
|
4295
|
+
var N = e(u, d), w = !l(N, p);
|
|
4296
|
+
return p = N, w && (m = r(p, f, d)), m;
|
|
4279
4297
|
}
|
|
4280
|
-
function
|
|
4281
|
-
var
|
|
4282
|
-
return u =
|
|
4298
|
+
function y(N, w) {
|
|
4299
|
+
var x = !s(w, d), j = !i(N, u, w, d);
|
|
4300
|
+
return u = N, d = w, x && j ? b() : x ? h() : j ? v() : m;
|
|
4283
4301
|
}
|
|
4284
|
-
return function(
|
|
4285
|
-
return c ?
|
|
4302
|
+
return function(w, x) {
|
|
4303
|
+
return c ? y(w, x) : g(w, x);
|
|
4286
4304
|
};
|
|
4287
4305
|
}
|
|
4288
4306
|
function hg(e, t) {
|
|
@@ -4308,23 +4326,23 @@ function yg(e) {
|
|
|
4308
4326
|
var t = {}, r = t.connectHOC, n = r === void 0 ? Jm : r, a = t.mapStateToPropsFactories, i = a === void 0 ? sg : a, s = t.mapDispatchToPropsFactories, l = s === void 0 ? ag : s, c = t.mergePropsFactories, u = c === void 0 ? pg : c, d = t.selectorFactory, p = d === void 0 ? hg : d;
|
|
4309
4327
|
return function(m, g, b, h) {
|
|
4310
4328
|
h === void 0 && (h = {});
|
|
4311
|
-
var v = h,
|
|
4329
|
+
var v = h, y = v.pure, N = y === void 0 ? !0 : y, w = v.areStatesEqual, x = w === void 0 ? xg : w, j = v.areOwnPropsEqual, C = j === void 0 ? Wn : j, O = v.areStatePropsEqual, E = O === void 0 ? Wn : O, T = v.areMergedPropsEqual, B = T === void 0 ? Wn : T, V = cn(v, bg), S = Hn(m, i, "mapStateToProps"), I = Hn(g, l, "mapDispatchToProps"), $ = Hn(b, u, "mergeProps");
|
|
4312
4330
|
return n(p, ne({
|
|
4313
4331
|
// used in error messages
|
|
4314
4332
|
methodName: "connect",
|
|
4315
4333
|
// used to compute Connect's displayName from the wrapped component's displayName.
|
|
4316
|
-
getDisplayName: function(
|
|
4317
|
-
return "Connect(" +
|
|
4334
|
+
getDisplayName: function(L) {
|
|
4335
|
+
return "Connect(" + L + ")";
|
|
4318
4336
|
},
|
|
4319
4337
|
// if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes
|
|
4320
4338
|
shouldHandleStateChanges: !!m,
|
|
4321
4339
|
// passed through to selectorFactory
|
|
4322
|
-
initMapStateToProps:
|
|
4340
|
+
initMapStateToProps: S,
|
|
4323
4341
|
initMapDispatchToProps: I,
|
|
4324
|
-
initMergeProps:
|
|
4325
|
-
pure:
|
|
4326
|
-
areStatesEqual:
|
|
4327
|
-
areOwnPropsEqual:
|
|
4342
|
+
initMergeProps: $,
|
|
4343
|
+
pure: N,
|
|
4344
|
+
areStatesEqual: x,
|
|
4345
|
+
areOwnPropsEqual: C,
|
|
4328
4346
|
areStatePropsEqual: E,
|
|
4329
4347
|
areMergedPropsEqual: B
|
|
4330
4348
|
}, V));
|
|
@@ -5636,11 +5654,11 @@ function Tv(e) {
|
|
|
5636
5654
|
}
|
|
5637
5655
|
var Av = function(e) {
|
|
5638
5656
|
var t = e.pageBorderBoxWithDroppableScroll, r = e.draggable, n = e.destination, a = e.insideDestination, i = e.last, s = e.viewport, l = e.afterCritical, c = n.axis, u = $r(n.axis, r.displaceBy), d = u.value, p = t[c.start], f = t[c.end], m = Sn(r, a), g = Tt(m, function(h) {
|
|
5639
|
-
var v = h.descriptor.id,
|
|
5657
|
+
var v = h.descriptor.id, y = h.page.borderBox.center[c.line], N = _t(v, l), w = Vl({
|
|
5640
5658
|
displaced: i,
|
|
5641
5659
|
id: v
|
|
5642
5660
|
});
|
|
5643
|
-
return
|
|
5661
|
+
return N ? w ? f <= y : p < y - d : w ? f <= y + d : p < y;
|
|
5644
5662
|
}), b = Tv({
|
|
5645
5663
|
draggable: r,
|
|
5646
5664
|
closest: g,
|
|
@@ -5660,11 +5678,11 @@ var Av = function(e) {
|
|
|
5660
5678
|
if (!a.isCombineEnabled)
|
|
5661
5679
|
return null;
|
|
5662
5680
|
var l = a.axis, c = $r(a.axis, t.displaceBy), u = c.value, d = r[l.start], p = r[l.end], f = Sn(t, i), m = Tt(f, function(b) {
|
|
5663
|
-
var h = b.descriptor.id, v = b.page.borderBox,
|
|
5681
|
+
var h = b.descriptor.id, v = b.page.borderBox, y = v[l.size], N = y / Rv, w = _t(h, s), x = Vl({
|
|
5664
5682
|
displaced: n.displaced,
|
|
5665
5683
|
id: h
|
|
5666
5684
|
});
|
|
5667
|
-
return
|
|
5685
|
+
return w ? x ? p > v[l.start] + N && p < v[l.end] - N : d > v[l.start] - u + N && d < v[l.end] - u - N : x ? p > v[l.start] + u + N && p < v[l.end] + u - N : d > v[l.start] + N && d < v[l.end] - N;
|
|
5668
5686
|
});
|
|
5669
5687
|
if (!m)
|
|
5670
5688
|
return null;
|
|
@@ -5900,16 +5918,16 @@ var Gl = function(e) {
|
|
|
5900
5918
|
}, Uv = function(e) {
|
|
5901
5919
|
var t = e.state, r = e.published;
|
|
5902
5920
|
Gr();
|
|
5903
|
-
var n = r.modified.map(function(
|
|
5904
|
-
var
|
|
5905
|
-
return
|
|
5921
|
+
var n = r.modified.map(function(N) {
|
|
5922
|
+
var w = t.dimensions.droppables[N.droppableId], x = Qa(w, N.scroll);
|
|
5923
|
+
return x;
|
|
5906
5924
|
}), a = ne({}, t.dimensions.droppables, {}, El(n)), i = Il(Wv({
|
|
5907
5925
|
additions: r.additions,
|
|
5908
5926
|
updatedDroppables: a,
|
|
5909
5927
|
viewport: t.viewport
|
|
5910
5928
|
})), s = ne({}, t.dimensions.draggables, {}, i);
|
|
5911
|
-
r.removals.forEach(function(
|
|
5912
|
-
delete s[
|
|
5929
|
+
r.removals.forEach(function(N) {
|
|
5930
|
+
delete s[N];
|
|
5913
5931
|
});
|
|
5914
5932
|
var l = {
|
|
5915
5933
|
droppables: a,
|
|
@@ -5941,14 +5959,14 @@ var Gl = function(e) {
|
|
|
5941
5959
|
});
|
|
5942
5960
|
if (t.phase === "COLLECTING")
|
|
5943
5961
|
return v;
|
|
5944
|
-
var
|
|
5962
|
+
var y = ne({
|
|
5945
5963
|
phase: "DROP_PENDING"
|
|
5946
5964
|
}, v, {
|
|
5947
5965
|
phase: "DROP_PENDING",
|
|
5948
5966
|
reason: t.reason,
|
|
5949
5967
|
isWaiting: !1
|
|
5950
5968
|
});
|
|
5951
|
-
return
|
|
5969
|
+
return y;
|
|
5952
5970
|
}, xa = function(t) {
|
|
5953
5971
|
return t.movementMode === "SNAP";
|
|
5954
5972
|
}, Yn = function(t, r, n) {
|
|
@@ -6035,10 +6053,10 @@ var Ri = {
|
|
|
6035
6053
|
if (e.phase === "DROP_PENDING")
|
|
6036
6054
|
return e;
|
|
6037
6055
|
Vt(e) || (process.env.NODE_ENV !== "production" ? D(!1, t.type + " not permitted in phase " + e.phase) : D());
|
|
6038
|
-
var
|
|
6039
|
-
return St(
|
|
6056
|
+
var y = t.payload.client;
|
|
6057
|
+
return St(y, e.current.client.selection) ? e : Dr({
|
|
6040
6058
|
state: e,
|
|
6041
|
-
clientSelection:
|
|
6059
|
+
clientSelection: y,
|
|
6042
6060
|
impact: xa(e) ? e.impact : null
|
|
6043
6061
|
});
|
|
6044
6062
|
}
|
|
@@ -6046,11 +6064,11 @@ var Ri = {
|
|
|
6046
6064
|
if (e.phase === "DROP_PENDING" || e.phase === "COLLECTING")
|
|
6047
6065
|
return Kn(e);
|
|
6048
6066
|
Vt(e) || (process.env.NODE_ENV !== "production" ? D(!1, t.type + " not permitted in phase " + e.phase) : D());
|
|
6049
|
-
var
|
|
6050
|
-
if (!
|
|
6067
|
+
var N = t.payload, w = N.id, x = N.newScroll, j = e.dimensions.droppables[w];
|
|
6068
|
+
if (!j)
|
|
6051
6069
|
return e;
|
|
6052
|
-
var
|
|
6053
|
-
return Yn(e,
|
|
6070
|
+
var C = Qa(j, x);
|
|
6071
|
+
return Yn(e, C, !1);
|
|
6054
6072
|
}
|
|
6055
6073
|
if (t.type === "UPDATE_DROPPABLE_IS_ENABLED") {
|
|
6056
6074
|
if (e.phase === "DROP_PENDING")
|
|
@@ -6068,13 +6086,13 @@ var Ri = {
|
|
|
6068
6086
|
if (e.phase === "DROP_PENDING")
|
|
6069
6087
|
return e;
|
|
6070
6088
|
Vt(e) || (process.env.NODE_ENV !== "production" ? D(!1, "Attempting to move in an unsupported phase " + e.phase) : D());
|
|
6071
|
-
var
|
|
6072
|
-
A || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot find Droppable[id: " + I + "] to toggle its isCombineEnabled state") : D()), A.isCombineEnabled ===
|
|
6089
|
+
var S = t.payload, I = S.id, $ = S.isCombineEnabled, A = e.dimensions.droppables[I];
|
|
6090
|
+
A || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot find Droppable[id: " + I + "] to toggle its isCombineEnabled state") : D()), A.isCombineEnabled === $ && (process.env.NODE_ENV !== "production" ? D(!1, "Trying to set droppable isCombineEnabled to " + String($) + `
|
|
6073
6091
|
but it is already ` + String(A.isCombineEnabled)) : D());
|
|
6074
|
-
var
|
|
6075
|
-
isCombineEnabled:
|
|
6092
|
+
var L = ne({}, A, {
|
|
6093
|
+
isCombineEnabled: $
|
|
6076
6094
|
});
|
|
6077
|
-
return Yn(e,
|
|
6095
|
+
return Yn(e, L, !0);
|
|
6078
6096
|
}
|
|
6079
6097
|
if (t.type === "MOVE_BY_WINDOW_SCROLL") {
|
|
6080
6098
|
if (e.phase === "DROP_PENDING" || e.phase === "DROP_ANIMATING")
|
|
@@ -6083,13 +6101,13 @@ var Ri = {
|
|
|
6083
6101
|
var U = t.payload.newScroll;
|
|
6084
6102
|
if (St(e.viewport.scroll.current, U))
|
|
6085
6103
|
return Kn(e);
|
|
6086
|
-
var
|
|
6104
|
+
var G = Rl(e.viewport, U);
|
|
6087
6105
|
return xa(e) ? Ul({
|
|
6088
6106
|
state: e,
|
|
6089
|
-
viewport:
|
|
6107
|
+
viewport: G
|
|
6090
6108
|
}) : Dr({
|
|
6091
6109
|
state: e,
|
|
6092
|
-
viewport:
|
|
6110
|
+
viewport: G
|
|
6093
6111
|
});
|
|
6094
6112
|
}
|
|
6095
6113
|
if (t.type === "UPDATE_VIEWPORT_MAX_SCROLL") {
|
|
@@ -6446,34 +6464,34 @@ var dh = function(e) {
|
|
|
6446
6464
|
mode: i.movementMode,
|
|
6447
6465
|
destination: g,
|
|
6448
6466
|
combine: b
|
|
6449
|
-
},
|
|
6467
|
+
}, y = gh({
|
|
6450
6468
|
impact: f,
|
|
6451
6469
|
draggable: d,
|
|
6452
6470
|
dimensions: u,
|
|
6453
6471
|
viewport: i.viewport,
|
|
6454
6472
|
afterCritical: i.afterCritical
|
|
6455
|
-
}),
|
|
6473
|
+
}), N = {
|
|
6456
6474
|
critical: i.critical,
|
|
6457
6475
|
afterCritical: i.afterCritical,
|
|
6458
6476
|
result: v,
|
|
6459
6477
|
impact: f
|
|
6460
|
-
},
|
|
6461
|
-
if (!
|
|
6478
|
+
}, w = !St(i.current.client.offset, y) || !!v.combine;
|
|
6479
|
+
if (!w) {
|
|
6462
6480
|
r(io({
|
|
6463
|
-
completed:
|
|
6481
|
+
completed: N
|
|
6464
6482
|
}));
|
|
6465
6483
|
return;
|
|
6466
6484
|
}
|
|
6467
|
-
var
|
|
6485
|
+
var x = mh({
|
|
6468
6486
|
current: i.current.client.offset,
|
|
6469
|
-
destination:
|
|
6487
|
+
destination: y,
|
|
6470
6488
|
reason: s
|
|
6471
|
-
}),
|
|
6472
|
-
newHomeClientOffset:
|
|
6473
|
-
dropDuration:
|
|
6474
|
-
completed:
|
|
6489
|
+
}), j = {
|
|
6490
|
+
newHomeClientOffset: y,
|
|
6491
|
+
dropDuration: x,
|
|
6492
|
+
completed: N
|
|
6475
6493
|
};
|
|
6476
|
-
r(ih(
|
|
6494
|
+
r(ih(j));
|
|
6477
6495
|
}
|
|
6478
6496
|
};
|
|
6479
6497
|
};
|
|
@@ -6646,15 +6664,15 @@ var yh = function(t) {
|
|
|
6646
6664
|
h && (n.lastCritical = f);
|
|
6647
6665
|
var v = !jh(n.lastLocation, g);
|
|
6648
6666
|
v && (n.lastLocation = g);
|
|
6649
|
-
var
|
|
6650
|
-
if (
|
|
6651
|
-
var
|
|
6667
|
+
var y = !Ch(n.lastCombine, b);
|
|
6668
|
+
if (y && (n.lastCombine = b), !(!h && !v && !y)) {
|
|
6669
|
+
var N = ne({}, Jr(f, n.mode), {
|
|
6652
6670
|
combine: b,
|
|
6653
6671
|
destination: g
|
|
6654
6672
|
});
|
|
6655
6673
|
r.add(function() {
|
|
6656
6674
|
xr("onDragUpdate", function() {
|
|
6657
|
-
return Xn(e().onDragUpdate,
|
|
6675
|
+
return Xn(e().onDragUpdate, N, t, sn.onDragUpdate);
|
|
6658
6676
|
});
|
|
6659
6677
|
});
|
|
6660
6678
|
}
|
|
@@ -6830,13 +6848,13 @@ function Lh(e) {
|
|
|
6830
6848
|
a = null, Gr();
|
|
6831
6849
|
var d = n, p = d.additions, f = d.removals, m = d.modified, g = Object.keys(p).map(function(v) {
|
|
6832
6850
|
return t.draggable.getById(v).getDimension(Be);
|
|
6833
|
-
}).sort(function(v,
|
|
6834
|
-
return v.descriptor.index -
|
|
6851
|
+
}).sort(function(v, y) {
|
|
6852
|
+
return v.descriptor.index - y.descriptor.index;
|
|
6835
6853
|
}), b = Object.keys(m).map(function(v) {
|
|
6836
|
-
var
|
|
6854
|
+
var y = t.droppable.getById(v), N = y.callbacks.getScrollWhileDragging();
|
|
6837
6855
|
return {
|
|
6838
6856
|
droppableId: v,
|
|
6839
|
-
scroll:
|
|
6857
|
+
scroll: N
|
|
6840
6858
|
};
|
|
6841
6859
|
}), h = {
|
|
6842
6860
|
additions: g,
|
|
@@ -8198,11 +8216,11 @@ function Kb(e) {
|
|
|
8198
8216
|
sourceEvent: m
|
|
8199
8217
|
});
|
|
8200
8218
|
if (b) {
|
|
8201
|
-
var h = m.touches[0], v = h.clientX,
|
|
8219
|
+
var h = m.touches[0], v = h.clientX, y = h.clientY, N = {
|
|
8202
8220
|
x: v,
|
|
8203
|
-
y
|
|
8221
|
+
y
|
|
8204
8222
|
};
|
|
8205
|
-
r.current(), p(b,
|
|
8223
|
+
r.current(), p(b, N);
|
|
8206
8224
|
}
|
|
8207
8225
|
}
|
|
8208
8226
|
}
|
|
@@ -8397,24 +8415,24 @@ function lx(e) {
|
|
|
8397
8415
|
function g() {
|
|
8398
8416
|
return t.isActive(p);
|
|
8399
8417
|
}
|
|
8400
|
-
function b(
|
|
8418
|
+
function b(j, C) {
|
|
8401
8419
|
en({
|
|
8402
|
-
expected:
|
|
8420
|
+
expected: j,
|
|
8403
8421
|
phase: f,
|
|
8404
8422
|
isLockActive: g,
|
|
8405
8423
|
shouldWarn: !0
|
|
8406
|
-
}) && n.dispatch(
|
|
8424
|
+
}) && n.dispatch(C());
|
|
8407
8425
|
}
|
|
8408
8426
|
var h = b.bind(null, "DRAGGING");
|
|
8409
|
-
function v(
|
|
8410
|
-
function
|
|
8427
|
+
function v(j) {
|
|
8428
|
+
function C() {
|
|
8411
8429
|
t.release(), f = "COMPLETED";
|
|
8412
8430
|
}
|
|
8413
|
-
f !== "PRE_DRAG" && (
|
|
8431
|
+
f !== "PRE_DRAG" && (C(), f !== "PRE_DRAG" && (process.env.NODE_ENV !== "production" ? D(!1, "Cannot lift in phase " + f) : D())), n.dispatch(qv(j.liftActionArgs)), f = "DRAGGING";
|
|
8414
8432
|
function O(E, T) {
|
|
8415
8433
|
if (T === void 0 && (T = {
|
|
8416
8434
|
shouldBlockNextClick: !1
|
|
8417
|
-
}),
|
|
8435
|
+
}), j.cleanup(), T.shouldBlockNextClick) {
|
|
8418
8436
|
var B = Qe(window, [{
|
|
8419
8437
|
eventName: "click",
|
|
8420
8438
|
fn: sx,
|
|
@@ -8426,7 +8444,7 @@ function lx(e) {
|
|
|
8426
8444
|
}]);
|
|
8427
8445
|
setTimeout(B);
|
|
8428
8446
|
}
|
|
8429
|
-
|
|
8447
|
+
C(), n.dispatch(ql({
|
|
8430
8448
|
reason: E
|
|
8431
8449
|
}));
|
|
8432
8450
|
}
|
|
@@ -8446,10 +8464,10 @@ function lx(e) {
|
|
|
8446
8464
|
cancel: function(T) {
|
|
8447
8465
|
return O("CANCEL", T);
|
|
8448
8466
|
}
|
|
8449
|
-
},
|
|
8467
|
+
}, j.actions);
|
|
8450
8468
|
}
|
|
8451
|
-
function
|
|
8452
|
-
var
|
|
8469
|
+
function y(j) {
|
|
8470
|
+
var C = Tr(function(E) {
|
|
8453
8471
|
h(function() {
|
|
8454
8472
|
return zl({
|
|
8455
8473
|
client: E
|
|
@@ -8458,22 +8476,22 @@ function lx(e) {
|
|
|
8458
8476
|
}), O = v({
|
|
8459
8477
|
liftActionArgs: {
|
|
8460
8478
|
id: i,
|
|
8461
|
-
clientSelection:
|
|
8479
|
+
clientSelection: j,
|
|
8462
8480
|
movementMode: "FLUID"
|
|
8463
8481
|
},
|
|
8464
8482
|
cleanup: function() {
|
|
8465
|
-
return
|
|
8483
|
+
return C.cancel();
|
|
8466
8484
|
},
|
|
8467
8485
|
actions: {
|
|
8468
|
-
move:
|
|
8486
|
+
move: C
|
|
8469
8487
|
}
|
|
8470
8488
|
});
|
|
8471
8489
|
return ne({}, O, {
|
|
8472
|
-
move:
|
|
8490
|
+
move: C
|
|
8473
8491
|
});
|
|
8474
8492
|
}
|
|
8475
|
-
function
|
|
8476
|
-
var
|
|
8493
|
+
function N() {
|
|
8494
|
+
var j = {
|
|
8477
8495
|
moveUp: function() {
|
|
8478
8496
|
return h(rh);
|
|
8479
8497
|
},
|
|
@@ -8494,19 +8512,19 @@ function lx(e) {
|
|
|
8494
8512
|
movementMode: "SNAP"
|
|
8495
8513
|
},
|
|
8496
8514
|
cleanup: Ct,
|
|
8497
|
-
actions:
|
|
8515
|
+
actions: j
|
|
8498
8516
|
});
|
|
8499
8517
|
}
|
|
8500
|
-
function
|
|
8501
|
-
var
|
|
8518
|
+
function w() {
|
|
8519
|
+
var j = en({
|
|
8502
8520
|
expected: "PRE_DRAG",
|
|
8503
8521
|
phase: f,
|
|
8504
8522
|
isLockActive: g,
|
|
8505
8523
|
shouldWarn: !0
|
|
8506
8524
|
});
|
|
8507
|
-
|
|
8525
|
+
j && t.release();
|
|
8508
8526
|
}
|
|
8509
|
-
var
|
|
8527
|
+
var x = {
|
|
8510
8528
|
isActive: function() {
|
|
8511
8529
|
return en({
|
|
8512
8530
|
expected: "PRE_DRAG",
|
|
@@ -8516,25 +8534,25 @@ function lx(e) {
|
|
|
8516
8534
|
});
|
|
8517
8535
|
},
|
|
8518
8536
|
shouldRespectForcePress: m,
|
|
8519
|
-
fluidLift:
|
|
8520
|
-
snapLift:
|
|
8521
|
-
abort:
|
|
8537
|
+
fluidLift: y,
|
|
8538
|
+
snapLift: N,
|
|
8539
|
+
abort: w
|
|
8522
8540
|
};
|
|
8523
|
-
return
|
|
8541
|
+
return x;
|
|
8524
8542
|
}
|
|
8525
8543
|
var cx = [Vb, Ub, Kb];
|
|
8526
8544
|
function dx(e) {
|
|
8527
8545
|
var t = e.contextId, r = e.store, n = e.registry, a = e.customSensors, i = e.enableDefaultSensors, s = [].concat(i ? cx : [], a || []), l = k(function() {
|
|
8528
8546
|
return Sb();
|
|
8529
|
-
})[0], c = Q(function(
|
|
8530
|
-
|
|
8547
|
+
})[0], c = Q(function(y, N) {
|
|
8548
|
+
y.isDragging && !N.isDragging && l.tryAbandon();
|
|
8531
8549
|
}, [l]);
|
|
8532
8550
|
qe(function() {
|
|
8533
|
-
var
|
|
8534
|
-
var
|
|
8535
|
-
c(
|
|
8551
|
+
var y = r.getState(), N = r.subscribe(function() {
|
|
8552
|
+
var w = r.getState();
|
|
8553
|
+
c(y, w), y = w;
|
|
8536
8554
|
});
|
|
8537
|
-
return
|
|
8555
|
+
return N;
|
|
8538
8556
|
}, [l, r, c]), qe(function() {
|
|
8539
8557
|
return l.tryAbandon;
|
|
8540
8558
|
}, [l.tryAbandon]);
|
|
@@ -8545,21 +8563,21 @@ function dx(e) {
|
|
|
8545
8563
|
store: r,
|
|
8546
8564
|
draggableId: v
|
|
8547
8565
|
});
|
|
8548
|
-
}, [l, n, r]), d = Q(function(v,
|
|
8566
|
+
}, [l, n, r]), d = Q(function(v, y, N) {
|
|
8549
8567
|
return lx({
|
|
8550
8568
|
lockAPI: l,
|
|
8551
8569
|
registry: n,
|
|
8552
8570
|
contextId: t,
|
|
8553
8571
|
store: r,
|
|
8554
8572
|
draggableId: v,
|
|
8555
|
-
forceSensorStop:
|
|
8556
|
-
sourceEvent:
|
|
8573
|
+
forceSensorStop: y,
|
|
8574
|
+
sourceEvent: N && N.sourceEvent ? N.sourceEvent : null
|
|
8557
8575
|
});
|
|
8558
8576
|
}, [t, l, n, r]), p = Q(function(v) {
|
|
8559
8577
|
return ox(t, v);
|
|
8560
8578
|
}, [t]), f = Q(function(v) {
|
|
8561
|
-
var
|
|
8562
|
-
return
|
|
8579
|
+
var y = n.draggable.findById(v);
|
|
8580
|
+
return y ? y.options : null;
|
|
8563
8581
|
}, [n.draggable]), m = Q(function() {
|
|
8564
8582
|
l.isClaimed() && (l.tryAbandon(), r.getState().phase !== "IDLE" && r.dispatch(oo()));
|
|
8565
8583
|
}, [l, r]), g = Q(l.isClaimed, [l]), b = fe(function() {
|
|
@@ -8615,7 +8633,7 @@ function px(e) {
|
|
|
8615
8633
|
}, ci({
|
|
8616
8634
|
move: zl
|
|
8617
8635
|
}, f)));
|
|
8618
|
-
}, [b.scrollDroppable, f]), v = db(t),
|
|
8636
|
+
}, [b.scrollDroppable, f]), v = db(t), y = fe(function() {
|
|
8619
8637
|
return Mh({
|
|
8620
8638
|
announce: u,
|
|
8621
8639
|
autoScroller: h,
|
|
@@ -8625,48 +8643,48 @@ function px(e) {
|
|
|
8625
8643
|
styleMarshal: p
|
|
8626
8644
|
});
|
|
8627
8645
|
}, [u, h, b, v, c, p]);
|
|
8628
|
-
process.env.NODE_ENV !== "production" && s.current && s.current !==
|
|
8629
|
-
var
|
|
8646
|
+
process.env.NODE_ENV !== "production" && s.current && s.current !== y && process.env.NODE_ENV !== "production" && Ne("unexpected store change"), s.current = y;
|
|
8647
|
+
var N = Q(function() {
|
|
8630
8648
|
var E = wr(s), T = E.getState();
|
|
8631
8649
|
T.phase !== "IDLE" && E.dispatch(oo());
|
|
8632
|
-
}, []),
|
|
8650
|
+
}, []), w = Q(function() {
|
|
8633
8651
|
var E = wr(s).getState();
|
|
8634
8652
|
return E.isDragging || E.phase === "DROP_ANIMATING";
|
|
8635
|
-
}, []),
|
|
8653
|
+
}, []), x = fe(function() {
|
|
8636
8654
|
return {
|
|
8637
|
-
isDragging:
|
|
8638
|
-
tryAbort:
|
|
8655
|
+
isDragging: w,
|
|
8656
|
+
tryAbort: N
|
|
8639
8657
|
};
|
|
8640
|
-
}, [
|
|
8641
|
-
r(
|
|
8642
|
-
var
|
|
8658
|
+
}, [w, N]);
|
|
8659
|
+
r(x);
|
|
8660
|
+
var j = Q(function(E) {
|
|
8643
8661
|
return ec(wr(s).getState(), E);
|
|
8644
|
-
}, []),
|
|
8662
|
+
}, []), C = Q(function() {
|
|
8645
8663
|
return Vt(wr(s).getState());
|
|
8646
8664
|
}, []), O = fe(function() {
|
|
8647
8665
|
return {
|
|
8648
8666
|
marshal: b,
|
|
8649
8667
|
focus: v,
|
|
8650
8668
|
contextId: t,
|
|
8651
|
-
canLift:
|
|
8652
|
-
isMovementAllowed:
|
|
8669
|
+
canLift: j,
|
|
8670
|
+
isMovementAllowed: C,
|
|
8653
8671
|
dragHandleUsageInstructionsId: d,
|
|
8654
8672
|
registry: g
|
|
8655
8673
|
};
|
|
8656
|
-
}, [t, b, d, v,
|
|
8674
|
+
}, [t, b, d, v, j, C, g]);
|
|
8657
8675
|
return dx({
|
|
8658
8676
|
contextId: t,
|
|
8659
|
-
store:
|
|
8677
|
+
store: y,
|
|
8660
8678
|
registry: g,
|
|
8661
8679
|
customSensors: n,
|
|
8662
8680
|
enableDefaultSensors: e.enableDefaultSensors !== !1
|
|
8663
8681
|
}), q(function() {
|
|
8664
|
-
return
|
|
8665
|
-
}, [
|
|
8682
|
+
return N;
|
|
8683
|
+
}, [N]), le.createElement(In.Provider, {
|
|
8666
8684
|
value: O
|
|
8667
8685
|
}, le.createElement(pl, {
|
|
8668
8686
|
context: mo,
|
|
8669
|
-
store:
|
|
8687
|
+
store: y
|
|
8670
8688
|
}, e.children));
|
|
8671
8689
|
}
|
|
8672
8690
|
var fx = 0;
|
|
@@ -8862,85 +8880,85 @@ function _x(e) {
|
|
|
8862
8880
|
mode: e.mode
|
|
8863
8881
|
};
|
|
8864
8882
|
}, [e.droppableId, e.mode, e.type]), c = re(l), u = fe(function() {
|
|
8865
|
-
return ke(function(
|
|
8883
|
+
return ke(function(w, x) {
|
|
8866
8884
|
t.current || (process.env.NODE_ENV !== "production" ? D(!1, "Can only update scroll when dragging") : D());
|
|
8867
|
-
var
|
|
8868
|
-
x:
|
|
8869
|
-
y
|
|
8885
|
+
var j = {
|
|
8886
|
+
x: w,
|
|
8887
|
+
y: x
|
|
8870
8888
|
};
|
|
8871
|
-
i.updateDroppableScroll(l.id,
|
|
8889
|
+
i.updateDroppableScroll(l.id, j);
|
|
8872
8890
|
});
|
|
8873
8891
|
}, [l.id, i]), d = Q(function() {
|
|
8874
|
-
var
|
|
8875
|
-
return !
|
|
8892
|
+
var w = t.current;
|
|
8893
|
+
return !w || !w.env.closestScrollable ? Be : Da(w.env.closestScrollable);
|
|
8876
8894
|
}, []), p = Q(function() {
|
|
8877
|
-
var
|
|
8878
|
-
u(
|
|
8895
|
+
var w = d();
|
|
8896
|
+
u(w.x, w.y);
|
|
8879
8897
|
}, [d, u]), f = fe(function() {
|
|
8880
8898
|
return Tr(p);
|
|
8881
8899
|
}, [p]), m = Q(function() {
|
|
8882
|
-
var
|
|
8883
|
-
|
|
8884
|
-
var
|
|
8885
|
-
if (
|
|
8900
|
+
var w = t.current, x = tn(w);
|
|
8901
|
+
w && x || (process.env.NODE_ENV !== "production" ? D(!1, "Could not find scroll options while scrolling") : D());
|
|
8902
|
+
var j = w.scrollOptions;
|
|
8903
|
+
if (j.shouldPublishImmediately) {
|
|
8886
8904
|
p();
|
|
8887
8905
|
return;
|
|
8888
8906
|
}
|
|
8889
8907
|
f();
|
|
8890
|
-
}, [f, p]), g = Q(function(
|
|
8908
|
+
}, [f, p]), g = Q(function(w, x) {
|
|
8891
8909
|
t.current && (process.env.NODE_ENV !== "production" ? D(!1, "Cannot collect a droppable while a drag is occurring") : D());
|
|
8892
|
-
var
|
|
8893
|
-
|
|
8894
|
-
var O = Dx(
|
|
8895
|
-
ref:
|
|
8910
|
+
var j = s.current, C = j.getDroppableRef();
|
|
8911
|
+
C || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot collect without a droppable ref") : D());
|
|
8912
|
+
var O = Dx(C), E = {
|
|
8913
|
+
ref: C,
|
|
8896
8914
|
descriptor: l,
|
|
8897
8915
|
env: O,
|
|
8898
|
-
scrollOptions:
|
|
8916
|
+
scrollOptions: x
|
|
8899
8917
|
};
|
|
8900
8918
|
t.current = E;
|
|
8901
8919
|
var T = Sx({
|
|
8902
|
-
ref:
|
|
8920
|
+
ref: C,
|
|
8903
8921
|
descriptor: l,
|
|
8904
8922
|
env: O,
|
|
8905
|
-
windowScroll:
|
|
8906
|
-
direction:
|
|
8907
|
-
isDropDisabled:
|
|
8908
|
-
isCombineEnabled:
|
|
8909
|
-
shouldClipSubject: !
|
|
8923
|
+
windowScroll: w,
|
|
8924
|
+
direction: j.direction,
|
|
8925
|
+
isDropDisabled: j.isDropDisabled,
|
|
8926
|
+
isCombineEnabled: j.isCombineEnabled,
|
|
8927
|
+
shouldClipSubject: !j.ignoreContainerClipping
|
|
8910
8928
|
}), B = O.closestScrollable;
|
|
8911
8929
|
return B && (B.setAttribute(Wi.contextId, r.contextId), B.addEventListener("scroll", m, Ki(E.scrollOptions)), process.env.NODE_ENV !== "production" && wx(B)), T;
|
|
8912
8930
|
}, [r.contextId, l, m, s]), b = Q(function() {
|
|
8913
|
-
var
|
|
8914
|
-
return
|
|
8931
|
+
var w = t.current, x = tn(w);
|
|
8932
|
+
return w && x || (process.env.NODE_ENV !== "production" ? D(!1, "Can only recollect Droppable client for Droppables that have a scroll container") : D()), Da(x);
|
|
8915
8933
|
}, []), h = Q(function() {
|
|
8916
|
-
var
|
|
8917
|
-
|
|
8918
|
-
var
|
|
8919
|
-
t.current = null,
|
|
8920
|
-
}, [m, f]), v = Q(function(
|
|
8921
|
-
var
|
|
8922
|
-
|
|
8923
|
-
var
|
|
8924
|
-
|
|
8925
|
-
}, []),
|
|
8934
|
+
var w = t.current;
|
|
8935
|
+
w || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot stop drag when no active drag") : D());
|
|
8936
|
+
var x = tn(w);
|
|
8937
|
+
t.current = null, x && (f.cancel(), x.removeAttribute(Wi.contextId), x.removeEventListener("scroll", m, Ki(w.scrollOptions)));
|
|
8938
|
+
}, [m, f]), v = Q(function(w) {
|
|
8939
|
+
var x = t.current;
|
|
8940
|
+
x || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot scroll when there is no drag") : D());
|
|
8941
|
+
var j = tn(x);
|
|
8942
|
+
j || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot scroll a droppable with no closest scrollable") : D()), j.scrollTop += w.y, j.scrollLeft += w.x;
|
|
8943
|
+
}, []), y = fe(function() {
|
|
8926
8944
|
return {
|
|
8927
8945
|
getDimensionAndWatchScroll: g,
|
|
8928
8946
|
getScrollWhileDragging: b,
|
|
8929
8947
|
dragStopped: h,
|
|
8930
8948
|
scroll: v
|
|
8931
8949
|
};
|
|
8932
|
-
}, [h, g, b, v]),
|
|
8950
|
+
}, [h, g, b, v]), N = fe(function() {
|
|
8933
8951
|
return {
|
|
8934
8952
|
uniqueId: n,
|
|
8935
8953
|
descriptor: l,
|
|
8936
|
-
callbacks:
|
|
8954
|
+
callbacks: y
|
|
8937
8955
|
};
|
|
8938
|
-
}, [
|
|
8956
|
+
}, [y, l, n]);
|
|
8939
8957
|
qe(function() {
|
|
8940
|
-
return c.current =
|
|
8941
|
-
t.current && (process.env.NODE_ENV !== "production" && Ne("Unsupported: changing the droppableId or type of a Droppable during a drag"), h()), a.droppable.unregister(
|
|
8958
|
+
return c.current = N.descriptor, a.droppable.register(N), function() {
|
|
8959
|
+
t.current && (process.env.NODE_ENV !== "production" && Ne("Unsupported: changing the droppableId or type of a Droppable during a drag"), h()), a.droppable.unregister(N);
|
|
8942
8960
|
};
|
|
8943
|
-
}, [
|
|
8961
|
+
}, [y, l, h, N, i, a.droppable]), qe(function() {
|
|
8944
8962
|
t.current && i.updateDroppableIsEnabled(c.current.id, !e.isDropDisabled);
|
|
8945
8963
|
}, [e.isDropDisabled, i]), qe(function() {
|
|
8946
8964
|
t.current && i.updateDroppableIsCombineEnabled(c.current.id, e.isCombineEnabled);
|
|
@@ -9215,9 +9233,9 @@ function Xx(e) {
|
|
|
9215
9233
|
type: u,
|
|
9216
9234
|
droppableId: d
|
|
9217
9235
|
};
|
|
9218
|
-
}, [e.draggableId, e.index, u, d]), f = e.children, m = e.draggableId, g = e.isEnabled, b = e.shouldRespectForcePress, h = e.canDragInteractiveElements, v = e.isClone,
|
|
9236
|
+
}, [e.draggableId, e.index, u, d]), f = e.children, m = e.draggableId, g = e.isEnabled, b = e.shouldRespectForcePress, h = e.canDragInteractiveElements, v = e.isClone, y = e.mapped, N = e.dropAnimationFinished;
|
|
9219
9237
|
if (qx(e, i, n), Yx(v), !v) {
|
|
9220
|
-
var
|
|
9238
|
+
var w = fe(function() {
|
|
9221
9239
|
return {
|
|
9222
9240
|
descriptor: p,
|
|
9223
9241
|
registry: l,
|
|
@@ -9227,9 +9245,9 @@ function Xx(e) {
|
|
|
9227
9245
|
isEnabled: g
|
|
9228
9246
|
};
|
|
9229
9247
|
}, [p, l, n, h, b, g]);
|
|
9230
|
-
zx(
|
|
9248
|
+
zx(w);
|
|
9231
9249
|
}
|
|
9232
|
-
var
|
|
9250
|
+
var x = fe(function() {
|
|
9233
9251
|
return g ? {
|
|
9234
9252
|
tabIndex: 0,
|
|
9235
9253
|
role: "button",
|
|
@@ -9239,10 +9257,10 @@ function Xx(e) {
|
|
|
9239
9257
|
draggable: !1,
|
|
9240
9258
|
onDragStart: Kx
|
|
9241
9259
|
} : null;
|
|
9242
|
-
}, [i, s, m, g]),
|
|
9243
|
-
|
|
9244
|
-
}, [
|
|
9245
|
-
var E = Ux(
|
|
9260
|
+
}, [i, s, m, g]), j = Q(function(E) {
|
|
9261
|
+
y.type === "DRAGGING" && y.dropping && E.propertyName === "transform" && N();
|
|
9262
|
+
}, [N, y]), C = fe(function() {
|
|
9263
|
+
var E = Ux(y), T = y.type === "DRAGGING" && y.dropping ? j : null, B = {
|
|
9246
9264
|
innerRef: r,
|
|
9247
9265
|
draggableProps: {
|
|
9248
9266
|
"data-rbd-draggable-context-id": i,
|
|
@@ -9250,10 +9268,10 @@ function Xx(e) {
|
|
|
9250
9268
|
style: E,
|
|
9251
9269
|
onTransitionEnd: T
|
|
9252
9270
|
},
|
|
9253
|
-
dragHandleProps:
|
|
9271
|
+
dragHandleProps: x
|
|
9254
9272
|
};
|
|
9255
9273
|
return B;
|
|
9256
|
-
}, [i,
|
|
9274
|
+
}, [i, x, m, y, j, r]), O = fe(function() {
|
|
9257
9275
|
return {
|
|
9258
9276
|
draggableId: p.id,
|
|
9259
9277
|
type: p.type,
|
|
@@ -9263,7 +9281,7 @@ function Xx(e) {
|
|
|
9263
9281
|
}
|
|
9264
9282
|
};
|
|
9265
9283
|
}, [p.droppableId, p.id, p.index, p.type]);
|
|
9266
|
-
return f(
|
|
9284
|
+
return f(C, y.snapshot, O);
|
|
9267
9285
|
}
|
|
9268
9286
|
var gc = function(e, t) {
|
|
9269
9287
|
return e === t;
|
|
@@ -9317,24 +9335,24 @@ function Zx() {
|
|
|
9317
9335
|
var f = i.completed;
|
|
9318
9336
|
if (f.result.draggableId !== s.draggableId)
|
|
9319
9337
|
return null;
|
|
9320
|
-
var m = s.isClone, g = i.dimensions.draggables[s.draggableId], b = f.result, h = b.mode, v = vc(b),
|
|
9321
|
-
duration:
|
|
9338
|
+
var m = s.isClone, g = i.dimensions.draggables[s.draggableId], b = f.result, h = b.mode, v = vc(b), y = Qx(b), N = i.dropDuration, w = {
|
|
9339
|
+
duration: N,
|
|
9322
9340
|
curve: so.drop,
|
|
9323
9341
|
moveTo: i.newHomeClientOffset,
|
|
9324
|
-
opacity:
|
|
9325
|
-
scale:
|
|
9342
|
+
opacity: y ? Mr.opacity.drop : null,
|
|
9343
|
+
scale: y ? Mr.scale.drop : null
|
|
9326
9344
|
};
|
|
9327
9345
|
return {
|
|
9328
9346
|
mapped: {
|
|
9329
9347
|
type: "DRAGGING",
|
|
9330
9348
|
offset: i.newHomeClientOffset,
|
|
9331
9349
|
dimension: g,
|
|
9332
|
-
dropping:
|
|
9350
|
+
dropping: w,
|
|
9333
9351
|
draggingOver: v,
|
|
9334
|
-
combineWith:
|
|
9352
|
+
combineWith: y,
|
|
9335
9353
|
mode: h,
|
|
9336
9354
|
forceShouldAnimate: null,
|
|
9337
|
-
snapshot: t(h, m, v,
|
|
9355
|
+
snapshot: t(h, m, v, y, w)
|
|
9338
9356
|
}
|
|
9339
9357
|
};
|
|
9340
9358
|
}
|
|
@@ -9393,8 +9411,8 @@ function ty() {
|
|
|
9393
9411
|
}
|
|
9394
9412
|
if (f)
|
|
9395
9413
|
return n(g);
|
|
9396
|
-
var v = u.displacedBy.point,
|
|
9397
|
-
return r(
|
|
9414
|
+
var v = u.displacedBy.point, y = e(v.x, v.y);
|
|
9415
|
+
return r(y, g, p.shouldAnimate);
|
|
9398
9416
|
}, i = function(l, c) {
|
|
9399
9417
|
if (l.isDragging)
|
|
9400
9418
|
return l.critical.draggable.id === c.draggableId ? null : a(c.draggableId, l.critical.draggable.id, l.impact, l.afterCritical);
|
|
@@ -9434,21 +9452,21 @@ function oy(e) {
|
|
|
9434
9452
|
function iy(e) {
|
|
9435
9453
|
var t = z(In);
|
|
9436
9454
|
t || (process.env.NODE_ENV !== "production" ? D(!1, "Could not find app context") : D());
|
|
9437
|
-
var r = t.contextId, n = t.isMovementAllowed, a = re(null), i = re(null), s = e.children, l = e.droppableId, c = e.type, u = e.mode, d = e.direction, p = e.ignoreContainerClipping, f = e.isDropDisabled, m = e.isCombineEnabled, g = e.snapshot, b = e.useClone, h = e.updateViewportMaxScroll, v = e.getContainerForClone,
|
|
9455
|
+
var r = t.contextId, n = t.isMovementAllowed, a = re(null), i = re(null), s = e.children, l = e.droppableId, c = e.type, u = e.mode, d = e.direction, p = e.ignoreContainerClipping, f = e.isDropDisabled, m = e.isCombineEnabled, g = e.snapshot, b = e.useClone, h = e.updateViewportMaxScroll, v = e.getContainerForClone, y = Q(function() {
|
|
9438
9456
|
return a.current;
|
|
9439
|
-
}, []),
|
|
9457
|
+
}, []), N = Q(function(V) {
|
|
9440
9458
|
a.current = V;
|
|
9441
|
-
}, []),
|
|
9459
|
+
}, []), w = Q(function() {
|
|
9442
9460
|
return i.current;
|
|
9443
|
-
}, []),
|
|
9461
|
+
}, []), x = Q(function(V) {
|
|
9444
9462
|
i.current = V;
|
|
9445
9463
|
}, []);
|
|
9446
9464
|
Mx({
|
|
9447
9465
|
props: e,
|
|
9448
|
-
getDroppableRef:
|
|
9449
|
-
getPlaceholderRef:
|
|
9466
|
+
getDroppableRef: y,
|
|
9467
|
+
getPlaceholderRef: w
|
|
9450
9468
|
});
|
|
9451
|
-
var
|
|
9469
|
+
var j = Q(function() {
|
|
9452
9470
|
n() && h({
|
|
9453
9471
|
maxScroll: Zl()
|
|
9454
9472
|
});
|
|
@@ -9461,31 +9479,31 @@ function iy(e) {
|
|
|
9461
9479
|
isDropDisabled: f,
|
|
9462
9480
|
isCombineEnabled: m,
|
|
9463
9481
|
ignoreContainerClipping: p,
|
|
9464
|
-
getDroppableRef:
|
|
9482
|
+
getDroppableRef: y
|
|
9465
9483
|
});
|
|
9466
|
-
var
|
|
9484
|
+
var C = le.createElement(Lx, {
|
|
9467
9485
|
on: e.placeholder,
|
|
9468
9486
|
shouldAnimate: e.shouldAnimatePlaceholder
|
|
9469
9487
|
}, function(V) {
|
|
9470
|
-
var
|
|
9488
|
+
var S = V.onClose, I = V.data, $ = V.animate;
|
|
9471
9489
|
return le.createElement(Ax, {
|
|
9472
9490
|
placeholder: I,
|
|
9473
|
-
onClose:
|
|
9474
|
-
innerRef:
|
|
9475
|
-
animate:
|
|
9491
|
+
onClose: S,
|
|
9492
|
+
innerRef: x,
|
|
9493
|
+
animate: $,
|
|
9476
9494
|
contextId: r,
|
|
9477
|
-
onTransitionEnd:
|
|
9495
|
+
onTransitionEnd: j
|
|
9478
9496
|
});
|
|
9479
9497
|
}), O = fe(function() {
|
|
9480
9498
|
return {
|
|
9481
|
-
innerRef:
|
|
9482
|
-
placeholder:
|
|
9499
|
+
innerRef: N,
|
|
9500
|
+
placeholder: C,
|
|
9483
9501
|
droppableProps: {
|
|
9484
9502
|
"data-rbd-droppable-id": l,
|
|
9485
9503
|
"data-rbd-droppable-context-id": r
|
|
9486
9504
|
}
|
|
9487
9505
|
};
|
|
9488
|
-
}, [r, l,
|
|
9506
|
+
}, [r, l, C, N]), E = b ? b.dragging.draggableId : null, T = fe(function() {
|
|
9489
9507
|
return {
|
|
9490
9508
|
droppableId: l,
|
|
9491
9509
|
type: c,
|
|
@@ -9495,15 +9513,15 @@ function iy(e) {
|
|
|
9495
9513
|
function B() {
|
|
9496
9514
|
if (!b)
|
|
9497
9515
|
return null;
|
|
9498
|
-
var V = b.dragging,
|
|
9516
|
+
var V = b.dragging, S = b.render, I = le.createElement(bc, {
|
|
9499
9517
|
draggableId: V.draggableId,
|
|
9500
9518
|
index: V.source.index,
|
|
9501
9519
|
isClone: !0,
|
|
9502
9520
|
isEnabled: !0,
|
|
9503
9521
|
shouldRespectForcePress: !1,
|
|
9504
9522
|
canDragInteractiveElements: !0
|
|
9505
|
-
}, function(
|
|
9506
|
-
return
|
|
9523
|
+
}, function($, A) {
|
|
9524
|
+
return S($, A, V);
|
|
9507
9525
|
});
|
|
9508
9526
|
return Ir.createPortal(I, v());
|
|
9509
9527
|
}
|
|
@@ -9589,11 +9607,11 @@ var aa = function(t, r) {
|
|
|
9589
9607
|
return a(u, p, vc(h.result) === u, ze(h.impact) === u, v, f);
|
|
9590
9608
|
}
|
|
9591
9609
|
if (l.phase === "IDLE" && l.completed && !l.shouldFlush) {
|
|
9592
|
-
var
|
|
9593
|
-
if (!aa(d,
|
|
9610
|
+
var y = l.completed;
|
|
9611
|
+
if (!aa(d, y.critical))
|
|
9594
9612
|
return r;
|
|
9595
|
-
var
|
|
9596
|
-
return
|
|
9613
|
+
var N = ze(y.impact) === u, w = !!(y.impact.at && y.impact.at.type === "COMBINE"), x = y.critical.droppable.id === u;
|
|
9614
|
+
return N ? w ? t : r : x ? t : r;
|
|
9597
9615
|
}
|
|
9598
9616
|
return r;
|
|
9599
9617
|
};
|
|
@@ -9769,40 +9787,40 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
9769
9787
|
q(() => {
|
|
9770
9788
|
b(r);
|
|
9771
9789
|
}, [r]);
|
|
9772
|
-
const [h, v] = k(n),
|
|
9790
|
+
const [h, v] = k(n), y = g.at(h), N = h > 0, w = h < g.length - 1;
|
|
9773
9791
|
q(() => {
|
|
9774
9792
|
e && v(n);
|
|
9775
9793
|
}, [n, e]), q(() => {
|
|
9776
9794
|
h >= g.length && v(g.length - 1);
|
|
9777
9795
|
}, [g, h]);
|
|
9778
|
-
const
|
|
9796
|
+
const x = P((E) => {
|
|
9779
9797
|
switch (E.key) {
|
|
9780
9798
|
case "ArrowLeft":
|
|
9781
|
-
E.stopPropagation(),
|
|
9799
|
+
E.stopPropagation(), N && v((T) => T - 1);
|
|
9782
9800
|
break;
|
|
9783
9801
|
case "ArrowRight":
|
|
9784
|
-
E.stopPropagation(),
|
|
9802
|
+
E.stopPropagation(), w && v((T) => T + 1);
|
|
9785
9803
|
break;
|
|
9786
9804
|
case "Escape":
|
|
9787
9805
|
E.stopPropagation(), t();
|
|
9788
9806
|
break;
|
|
9789
9807
|
}
|
|
9790
|
-
}, [
|
|
9808
|
+
}, [w, N, t]), j = (E, T) => {
|
|
9791
9809
|
const B = Array.from(g), [V] = B.splice(E, 1);
|
|
9792
9810
|
return B.splice(T, 0, V), B;
|
|
9793
|
-
},
|
|
9811
|
+
}, C = (E) => {
|
|
9794
9812
|
if (!E.destination)
|
|
9795
9813
|
return;
|
|
9796
|
-
const T =
|
|
9814
|
+
const T = j(E.source.index, E.destination.index);
|
|
9797
9815
|
f && f(E.draggableId, E.destination.index), b(T);
|
|
9798
9816
|
};
|
|
9799
|
-
bd(
|
|
9817
|
+
bd(x);
|
|
9800
9818
|
const O = xd({
|
|
9801
9819
|
onSwipedLeft: (E) => {
|
|
9802
|
-
E.velocity > 0.8 &&
|
|
9820
|
+
E.velocity > 0.8 && w && v((T) => T + 1);
|
|
9803
9821
|
},
|
|
9804
9822
|
onSwipedRight: (E) => {
|
|
9805
|
-
E.velocity > 0.8 &&
|
|
9823
|
+
E.velocity > 0.8 && N && v((T) => T - 1);
|
|
9806
9824
|
},
|
|
9807
9825
|
delta: 100
|
|
9808
9826
|
});
|
|
@@ -9816,14 +9834,14 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
9816
9834
|
s && /* @__PURE__ */ o.jsx(js, { accept: ".jpg,.jpeg,.png", onUpload: (E) => {
|
|
9817
9835
|
E.length > 0 && s(Array.from(E));
|
|
9818
9836
|
}, icon: /* @__PURE__ */ o.jsx(Cs, { style: { fontSize: 18 } }), multiple: !0, className: "me-1 me-lg-3", children: a ?? null }),
|
|
9819
|
-
/* @__PURE__ */ o.jsx(ws, { children:
|
|
9837
|
+
/* @__PURE__ */ o.jsx(ws, { children: y && (l == null ? void 0 : l.map(({ label: E, onClick: T, ...B }, V) => /* @__PURE__ */ o.jsx(
|
|
9820
9838
|
ca,
|
|
9821
9839
|
{
|
|
9822
9840
|
hideOn: "sm",
|
|
9823
9841
|
cKey: `action-${V}`,
|
|
9824
|
-
onClick: () => T(
|
|
9842
|
+
onClick: () => T(y.id),
|
|
9825
9843
|
...B,
|
|
9826
|
-
children: typeof E == "string" ? E : E(
|
|
9844
|
+
children: typeof E == "string" ? E : E(y.id)
|
|
9827
9845
|
},
|
|
9828
9846
|
`action-${V}`
|
|
9829
9847
|
))) })
|
|
@@ -9831,23 +9849,23 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
9831
9849
|
/* @__PURE__ */ o.jsx("div", { role: "button", onClick: t, children: /* @__PURE__ */ o.jsx(Ot, { style: { fontSize: "32px" } }) })
|
|
9832
9850
|
] }),
|
|
9833
9851
|
g.length === 0 && /* @__PURE__ */ o.jsx("div", { className: "w-100 h-100 d-flex align-items-center justify-content-center", children: /* @__PURE__ */ o.jsx(Y, { variant: "body", children: i ?? "No photos available" }) }),
|
|
9834
|
-
|
|
9835
|
-
/* @__PURE__ */ o.jsx("div", { role:
|
|
9836
|
-
/* @__PURE__ */ o.jsx(p, { src:
|
|
9837
|
-
/* @__PURE__ */ o.jsx("div", { role:
|
|
9852
|
+
y && /* @__PURE__ */ o.jsxs("div", { className: Ve.photoContainer, children: [
|
|
9853
|
+
/* @__PURE__ */ o.jsx("div", { role: N ? "button" : void 0, className: _("align-items-start", Ve.navButton, Ve.left), onClick: () => N && v((E) => E - 1), children: N && /* @__PURE__ */ o.jsx(Ia, { style: { fontSize: "40px" } }) }),
|
|
9854
|
+
/* @__PURE__ */ o.jsx(p, { src: y.lgSrc, alt: y.alt, className: _("rounded", Ve.photo), baseUrl: c, customToken: u, placeholder: d, renderAsDivBg: !0 }),
|
|
9855
|
+
/* @__PURE__ */ o.jsx("div", { role: w ? "button" : void 0, className: _("align-items-end", Ve.navButton, Ve.right), onClick: () => w && v((E) => E + 1), children: w && /* @__PURE__ */ o.jsx(_a, { style: { fontSize: "40px" } }) })
|
|
9838
9856
|
] }),
|
|
9839
|
-
/* @__PURE__ */ o.jsx("div", { className: _("d-flex justify-content-center", Ve.photosPreviewContainer), children: /* @__PURE__ */ o.jsx(gx, { onDragEnd:
|
|
9857
|
+
/* @__PURE__ */ o.jsx("div", { className: _("d-flex justify-content-center", Ve.photosPreviewContainer), children: /* @__PURE__ */ o.jsx(gx, { onDragEnd: C, children: /* @__PURE__ */ o.jsx(yy, { droppableId: "droppable", direction: "horizontal", children: (E) => /* @__PURE__ */ o.jsxs("div", { ...E.droppableProps, ref: E.innerRef, className: Ve.photosPreview, children: [
|
|
9840
9858
|
g.map((T, B) => /* @__PURE__ */ o.jsx(oy, { draggableId: T.id, index: B, isDragDisabled: f === void 0, children: m((V) => {
|
|
9841
|
-
var
|
|
9859
|
+
var S;
|
|
9842
9860
|
return /* @__PURE__ */ o.jsxs("div", { ref: V.innerRef, ...V.draggableProps, ...V.dragHandleProps, role: "button", onClick: () => v(B), className: _(Ve.lightboxDraggablePhoto), children: [
|
|
9843
9861
|
/* @__PURE__ */ o.jsx(p, { role: B !== h ? "button" : void 0, src: T.smSrc, alt: T.alt, className: _("rounded", Ve.photo, {
|
|
9844
9862
|
[Ve.selected]: B === h
|
|
9845
9863
|
}), baseUrl: c, customToken: u, placeholder: d }, T.id),
|
|
9846
9864
|
T.isDefault || T.customIndicators && T.customIndicators.length > 0 ? /* @__PURE__ */ o.jsxs("div", { className: _(Ve.indicators, "gap-1"), children: [
|
|
9847
9865
|
T.isDefault && /* @__PURE__ */ o.jsx("div", { className: "text-primary", children: /* @__PURE__ */ o.jsx(wd, {}) }),
|
|
9848
|
-
(
|
|
9866
|
+
(S = T.customIndicators) == null ? void 0 : S.map((I, $) => (
|
|
9849
9867
|
// eslint-disable-next-line react/no-array-index-key
|
|
9850
|
-
/* @__PURE__ */ o.jsx("div", { className: I.className, children: I.content },
|
|
9868
|
+
/* @__PURE__ */ o.jsx("div", { className: I.className, children: I.content }, $)
|
|
9851
9869
|
))
|
|
9852
9870
|
] }) : null
|
|
9853
9871
|
] });
|
|
@@ -9863,7 +9881,7 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
9863
9881
|
m(null);
|
|
9864
9882
|
return;
|
|
9865
9883
|
}
|
|
9866
|
-
const v = e.findIndex((
|
|
9884
|
+
const v = e.findIndex((y) => y.isDefault);
|
|
9867
9885
|
m(v > -1 ? v : 0);
|
|
9868
9886
|
}, [e]), !g && t && u ? /* @__PURE__ */ o.jsx(js, { accept: ".jpg,.jpeg,.png", onUpload: (v) => {
|
|
9869
9887
|
v.length > 0 && t(Array.from(v));
|
|
@@ -10077,7 +10095,7 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10077
10095
|
}, [r, t]);
|
|
10078
10096
|
return { setFromToProp: n, handleArrowClick: a, handleRangeChange: i };
|
|
10079
10097
|
}, HN = ({ fromtoState: [e, t], className: r, size: n }) => {
|
|
10080
|
-
const { texts: { date: a }, ProjectIconComponent: i } = z(J), [s, l] = k("C"), { handleArrowClick: c, handleRangeChange: u, setFromToProp: d } = sw(s, l, t), p =
|
|
10098
|
+
const { texts: { date: a }, ProjectIconComponent: i } = z(J), [s, l] = k("C"), { handleArrowClick: c, handleRangeChange: u, setFromToProp: d } = sw(s, l, t), p = M(() => s === "C", [s]), f = re(!0);
|
|
10081
10099
|
return q(() => {
|
|
10082
10100
|
if (f.current) {
|
|
10083
10101
|
const m = iw(e.from, e.to);
|
|
@@ -10136,7 +10154,7 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10136
10154
|
] : [], onClick: (i) => n && n(i.data) });
|
|
10137
10155
|
}, lw = ({ val: e, translateKey: t, data: r }) => {
|
|
10138
10156
|
var l, c;
|
|
10139
|
-
const n = e.point.id.split("."), a = n[0], i = Number(n[1]), s =
|
|
10157
|
+
const n = e.point.id.split("."), a = n[0], i = Number(n[1]), s = M(() => {
|
|
10140
10158
|
const u = e.point.x < 100 ? "56%" : "-56%", d = e.point.y < 60 ? "70px" : "8px";
|
|
10141
10159
|
return { transform: `translate(${u}, ${d})` };
|
|
10142
10160
|
}, [e.point.x, e.point.y]);
|
|
@@ -10151,39 +10169,39 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10151
10169
|
] })
|
|
10152
10170
|
] });
|
|
10153
10171
|
}, KN = ({ data: e, xKey: t, yKeys: r, translateKey: n, usePercentageValue: a = !1, variant: i = "default", legendPosition: s, noSort: l = !1 }) => {
|
|
10154
|
-
const { chartColorPalette: c } = z(J), [u, d] = k(/* @__PURE__ */ new Set()), p = (
|
|
10155
|
-
d((
|
|
10156
|
-
const
|
|
10157
|
-
return
|
|
10172
|
+
const { chartColorPalette: c } = z(J), [u, d] = k(/* @__PURE__ */ new Set()), p = (x) => {
|
|
10173
|
+
d((j) => {
|
|
10174
|
+
const C = new Set(j);
|
|
10175
|
+
return C.has(x.id) ? C.delete(x.id) : C.add(x.id), C;
|
|
10158
10176
|
});
|
|
10159
|
-
}, f =
|
|
10160
|
-
var
|
|
10161
|
-
return typeof
|
|
10162
|
-
}), [e, l, t]), m =
|
|
10163
|
-
const
|
|
10164
|
-
return r.forEach((
|
|
10177
|
+
}, f = M(() => l ? e : e.toSorted((x, j) => {
|
|
10178
|
+
var C;
|
|
10179
|
+
return typeof j[t] == "number" && typeof x[t] == "number" ? x[t] - j[t] : (x[t] ?? "").toString().localeCompare(((C = j[t]) == null ? void 0 : C.toString()) ?? "");
|
|
10180
|
+
}), [e, l, t]), m = M(() => {
|
|
10181
|
+
const x = [];
|
|
10182
|
+
return r.forEach((j) => {
|
|
10165
10183
|
if (a) {
|
|
10166
|
-
const
|
|
10167
|
-
if (
|
|
10184
|
+
const C = Math.max(...f.map((E) => E[j] ?? -1 / 0));
|
|
10185
|
+
if (C === -1 / 0)
|
|
10168
10186
|
return;
|
|
10169
10187
|
const O = [];
|
|
10170
10188
|
f.forEach((E) => {
|
|
10171
|
-
E[
|
|
10172
|
-
}),
|
|
10173
|
-
id:
|
|
10189
|
+
E[j] != null && O.push({ x: E[t], y: C === 0 ? 0 : E[j] / C });
|
|
10190
|
+
}), x.push({
|
|
10191
|
+
id: j,
|
|
10174
10192
|
data: O
|
|
10175
10193
|
});
|
|
10176
10194
|
} else
|
|
10177
|
-
|
|
10178
|
-
id:
|
|
10179
|
-
data: f.map((
|
|
10195
|
+
x.push({
|
|
10196
|
+
id: j,
|
|
10197
|
+
data: f.map((C) => ({ x: C[t], y: C[j] }))
|
|
10180
10198
|
});
|
|
10181
|
-
}),
|
|
10182
|
-
}, [f, a, t, r]), g = P((
|
|
10183
|
-
var
|
|
10184
|
-
return typeof ((
|
|
10185
|
-
}, [e, t]),
|
|
10186
|
-
return console.log(m), /* @__PURE__ */ o.jsx(Pd, { data: m, xScale: v === "string" ? { type: "point" } : { type: "linear", min: b }, yScale: { type: "linear", nice: !0 }, axisLeft:
|
|
10199
|
+
}), x;
|
|
10200
|
+
}, [f, a, t, r]), g = P((x) => /* @__PURE__ */ o.jsx(lw, { data: f, translateKey: n, val: x }), [f, n]), b = M(() => Math.min(...e.map((x) => x[t] ?? 1 / 0)), [e, t]), h = M(() => Math.max(...e.map((x) => x[t] ?? -1 / 0)), [e, t]), v = M(() => {
|
|
10201
|
+
var x;
|
|
10202
|
+
return typeof ((x = e == null ? void 0 : e[0]) == null ? void 0 : x[t]);
|
|
10203
|
+
}, [e, t]), y = s ?? (i === "sideContent" ? "bottom" : "right"), N = M(() => !a && i !== "sideContent", [a, i]), w = M(() => [b, h], [h, b]);
|
|
10204
|
+
return console.log(m), /* @__PURE__ */ o.jsx(Pd, { data: m, xScale: v === "string" ? { type: "point" } : { type: "linear", min: b }, yScale: { type: "linear", nice: !0 }, axisLeft: N ? {
|
|
10187
10205
|
tickSize: 5,
|
|
10188
10206
|
tickPadding: 5,
|
|
10189
10207
|
tickRotation: 0,
|
|
@@ -10193,22 +10211,22 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10193
10211
|
truncateTickAt: 0
|
|
10194
10212
|
// format: val => `${val * 100} %`,
|
|
10195
10213
|
} : null, axisBottom: {
|
|
10196
|
-
tickValues: i === "sideContent" ?
|
|
10197
|
-
}, gridYValues: i === "sideContent" ? [0] : void 0, legends:
|
|
10214
|
+
tickValues: i === "sideContent" ? w : void 0
|
|
10215
|
+
}, gridYValues: i === "sideContent" ? [0] : void 0, legends: y !== "none" ? [
|
|
10198
10216
|
{
|
|
10199
|
-
data: r.map((
|
|
10200
|
-
id:
|
|
10201
|
-
label: n(
|
|
10202
|
-
color: c == null ? void 0 : c[
|
|
10203
|
-
hidden: u.has(
|
|
10217
|
+
data: r.map((x, j) => ({
|
|
10218
|
+
id: x,
|
|
10219
|
+
label: n(x),
|
|
10220
|
+
color: c == null ? void 0 : c[j],
|
|
10221
|
+
hidden: u.has(x)
|
|
10204
10222
|
})),
|
|
10205
10223
|
onClick: p,
|
|
10206
|
-
anchor:
|
|
10207
|
-
direction:
|
|
10224
|
+
anchor: y,
|
|
10225
|
+
direction: y === "right" ? "column" : "row",
|
|
10208
10226
|
toggleSerie: !0,
|
|
10209
10227
|
justify: !1,
|
|
10210
|
-
translateX:
|
|
10211
|
-
translateY:
|
|
10228
|
+
translateX: y === "right" ? 120 : void 0,
|
|
10229
|
+
translateY: y === "right" ? 0 : y === "bottom" ? 44 : void 0,
|
|
10212
10230
|
itemsSpacing: 0,
|
|
10213
10231
|
itemDirection: "left-to-right",
|
|
10214
10232
|
itemWidth: 100,
|
|
@@ -10229,9 +10247,9 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10229
10247
|
}
|
|
10230
10248
|
] : void 0, pointSize: 6, pointColor: { theme: "background" }, pointBorderWidth: 2, pointBorderColor: { from: "serieColor" }, margin: {
|
|
10231
10249
|
top: 10,
|
|
10232
|
-
right:
|
|
10233
|
-
bottom:
|
|
10234
|
-
left:
|
|
10250
|
+
right: y === "right" ? 130 : 20,
|
|
10251
|
+
bottom: y === "bottom" ? 44 : 20,
|
|
10252
|
+
left: N ? 50 : 20
|
|
10235
10253
|
}, colors: c, isInteractive: !0, enableCrosshair: !0, enableTouchCrosshair: !0, useMesh: !0, animate: !1, tooltip: g });
|
|
10236
10254
|
}, cw = ({ errors: e, schema: t }) => {
|
|
10237
10255
|
const r = (n) => {
|
|
@@ -10317,11 +10335,11 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10317
10335
|
} : null, onChange: (g) => {
|
|
10318
10336
|
var b;
|
|
10319
10337
|
c(r, (g == null ? void 0 : g.id) ?? null), console.log(g, s == null ? void 0 : s.some((h) => {
|
|
10320
|
-
var v,
|
|
10321
|
-
return ((v = h.id) == null ? void 0 : v.toString()) === ((
|
|
10338
|
+
var v, y;
|
|
10339
|
+
return ((v = h.id) == null ? void 0 : v.toString()) === ((y = g == null ? void 0 : g.id) == null ? void 0 : y.toString());
|
|
10322
10340
|
}), l), g && !(s != null && s.some((h) => {
|
|
10323
|
-
var v,
|
|
10324
|
-
return ((v = h.id) == null ? void 0 : v.toString()) === ((
|
|
10341
|
+
var v, y;
|
|
10342
|
+
return ((v = h.id) == null ? void 0 : v.toString()) === ((y = g == null ? void 0 : g.id) == null ? void 0 : y.toString());
|
|
10325
10343
|
})) && l && (console.log("adding to values for select"), l({ id: ((b = g.id) == null ? void 0 : b.toString()) ?? "", name: g.name }));
|
|
10326
10344
|
}, disabled: a ? !0 : n ? !i : !1 }) : /* @__PURE__ */ o.jsx("div", { className: "alert alert-warning p-1 m-0", children: /* @__PURE__ */ o.jsxs(Y, { variant: "body", children: [
|
|
10327
10345
|
"Neznámý typ ",
|
|
@@ -10346,7 +10364,7 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10346
10364
|
t.map((g) => {
|
|
10347
10365
|
var b, h;
|
|
10348
10366
|
return /* @__PURE__ */ o.jsx("td", { className: _("table-cell", we.tableCell), children: /* @__PURE__ */ o.jsx(jc, { 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) => {
|
|
10349
|
-
r(t.map((
|
|
10367
|
+
r(t.map((y) => y.field === g.field ? { ...y, valuesForSelect: [...y.valuesForSelect ?? [], v] } : y));
|
|
10350
10368
|
}, onChangeHandler: p, hideClearIcon: !f(u[g.field ?? ""]), clearValue: (h = u[g.field ?? ""].defaultValue) == null ? void 0 : h.toString(), customPickers: s }) }, `${e.id}-${g.field}`);
|
|
10351
10369
|
}),
|
|
10352
10370
|
/* @__PURE__ */ o.jsxs("td", { className: _("table-cell d-flex gap-1", we.tableCell, we.stickyLast), children: [
|
|
@@ -10417,7 +10435,7 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10417
10435
|
/* @__PURE__ */ o.jsx(r, { icon: "info" })
|
|
10418
10436
|
] }) }) : /* @__PURE__ */ o.jsx(o.Fragment, { children: t });
|
|
10419
10437
|
}, Ow = ({ column: e, sortByField: t, sortByType: r, setSortBy: n }) => {
|
|
10420
|
-
const { ProjectIconComponent: a } = z(J), i = re(null), s =
|
|
10438
|
+
const { ProjectIconComponent: a } = z(J), i = re(null), s = M(() => {
|
|
10421
10439
|
if (e.valuesForSelect && e.valuesForSelect.length > 0)
|
|
10422
10440
|
return 200;
|
|
10423
10441
|
switch (e.type) {
|
|
@@ -10454,18 +10472,18 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10454
10472
|
}, Pw = ({ schema: e, items: t, onEditItem: r, onDeleteItem: n, onCreateItem: a, filters: i, setFilter: s, sortByField: l, sortByType: c, setSortBy: u, selectedMaster: d, customPickers: p, appDetail: f }) => {
|
|
10455
10473
|
const { texts: { dynamicForms: m } } = z(J), [g, b] = k([]);
|
|
10456
10474
|
return q(() => {
|
|
10457
|
-
var h, v,
|
|
10475
|
+
var h, v, y;
|
|
10458
10476
|
b([
|
|
10459
|
-
...((
|
|
10460
|
-
var
|
|
10477
|
+
...((y = (v = (h = e.columns) == null ? void 0 : h.filter((N) => !N.hidden)) == null ? void 0 : v.filter((N) => e.masterReference ? N.field !== e.masterReferenceColumn : !0)) == null ? void 0 : y.map((N) => {
|
|
10478
|
+
var w;
|
|
10461
10479
|
return {
|
|
10462
|
-
label:
|
|
10480
|
+
label: N.caption ?? "",
|
|
10463
10481
|
width: 100,
|
|
10464
|
-
description:
|
|
10465
|
-
field:
|
|
10466
|
-
type:
|
|
10467
|
-
readOnly:
|
|
10468
|
-
valuesForSelect: ((
|
|
10482
|
+
description: N.description ?? null,
|
|
10483
|
+
field: N.field ?? "",
|
|
10484
|
+
type: N.type,
|
|
10485
|
+
readOnly: N.readOnly,
|
|
10486
|
+
valuesForSelect: ((w = N.values) == null ? void 0 : w.filter((x) => N.valuesFilteredByMaster ? x.masterValue === d : !0).map((x) => ({ id: x.id ?? "", name: x.name }))) ?? void 0
|
|
10469
10487
|
};
|
|
10470
10488
|
})) ?? []
|
|
10471
10489
|
]);
|
|
@@ -10503,74 +10521,74 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10503
10521
|
apiExportGet: "/dynamicForms/export"
|
|
10504
10522
|
}, XN = ({ id: e, page: t, setPage: r, filters: n, setFilter: a, sortByField: i, sortByType: s, setSortBy: l, appUrls: { appDetail: c = os.appDetail } = os, apiUrls: { apiSchemaGet: u = Lt.apiSchemaGet, apiDataGet: d = Lt.apiDataGet, apiItemPost: p = Lt.apiItemPost, apiItemDelete: f = Lt.apiItemDelete, apiItemCreate: m = Lt.apiItemCreate, apiExportGet: g = Lt.apiExportGet } = Lt, customPickers: b }) => {
|
|
10505
10523
|
var Le, et, tt, Yt, wo, No, Do;
|
|
10506
|
-
const { texts: { dynamicForms: h }, ProjectIconComponent: v } = z(J),
|
|
10524
|
+
const { texts: { dynamicForms: h }, ProjectIconComponent: v } = z(J), y = ft(), { startLoading: N, stopLoading: w } = z(ir), [x, j] = k(null), [C, O] = k(null), [E, T] = k(null), [B, V] = k(null), [S, I] = k(!1), { addNotification: $ } = Aa(), [A, L] = k([]), { confirm: U } = or(), G = 20, H = G + 1, X = B ? Math.ceil(B.length / G) : 1, ee = t ? t > 1 : !1, ie = t ? t < X : !1, se = t ? (t - 1) * G : 0, be = t ? t * G : G, W = M(() => B ? B.length > H : !1, [B, H]), ae = M(() => W ? (B == null ? void 0 : B.slice(se, be)) ?? null : B ?? null, [W, B, se, be]), [me, je] = Ma("masterId", null, "string"), [pe, R] = k(me);
|
|
10507
10525
|
q(() => {
|
|
10508
|
-
|
|
10526
|
+
j(null), O(null), I(!1), L([]);
|
|
10509
10527
|
}, [e]), q(() => {
|
|
10510
10528
|
me !== null && (R(me), je(null));
|
|
10511
10529
|
}, [me, e, je]);
|
|
10512
10530
|
const de = P(async () => {
|
|
10513
|
-
|
|
10514
|
-
|
|
10515
|
-
}).catch(() =>
|
|
10516
|
-
}, [
|
|
10531
|
+
N("dynamicFormSchema"), await y.get(`${u}?id=${e}`).then(({ data: oe }) => {
|
|
10532
|
+
j(oe), w("dynamicFormSchema");
|
|
10533
|
+
}).catch(() => w("dynamicFormSchema"));
|
|
10534
|
+
}, [y, e, N, w, u]), Ee = P(async () => {
|
|
10517
10535
|
var oe;
|
|
10518
|
-
if (!(
|
|
10519
|
-
if (
|
|
10536
|
+
if (!(x === null || ((oe = x.id) == null ? void 0 : oe.toString()) !== e)) {
|
|
10537
|
+
if (x.masterReference && !pe) {
|
|
10520
10538
|
O([]);
|
|
10521
10539
|
return;
|
|
10522
10540
|
}
|
|
10523
|
-
|
|
10541
|
+
N("dynamicFormData"), await y.get(`${d}?id=${e}&showArchive=${S}${x.masterReference ? `&master=${pe}` : ""}`).then(({ data: ve }) => {
|
|
10524
10542
|
const De = ve.map((he) => {
|
|
10525
10543
|
var Ie;
|
|
10526
|
-
return Object.fromEntries(((Ie =
|
|
10544
|
+
return Object.fromEntries(((Ie = x.columns) == null ? void 0 : Ie.filter((Ae) => Ae.field).map((Ae) => [
|
|
10527
10545
|
Ae.field,
|
|
10528
10546
|
{ value: he[Ae.field ?? ""], defaultValue: he[Ae.field ?? ""] }
|
|
10529
10547
|
])) ?? []);
|
|
10530
10548
|
});
|
|
10531
|
-
O(De),
|
|
10532
|
-
}).catch(() =>
|
|
10549
|
+
O(De), w("dynamicFormData");
|
|
10550
|
+
}).catch(() => w("dynamicFormData"));
|
|
10533
10551
|
}
|
|
10534
|
-
}, [
|
|
10552
|
+
}, [y, e, x, N, w, S, pe, d]), Ge = P(async () => {
|
|
10535
10553
|
var oe;
|
|
10536
|
-
|
|
10554
|
+
x === null || ((oe = x.id) == null ? void 0 : oe.toString()) !== e || x.masterReference && !pe || (N("dynamicFormExport"), await y.get(`${g}?id=${e}&showArchive=${S}${x.masterReference ? `&master=${pe}` : ""}`, {
|
|
10537
10555
|
responseType: "blob"
|
|
10538
|
-
}).then((ve) => Td(ve, { fallbackName: `export-${e}` })).finally(() =>
|
|
10539
|
-
}, [
|
|
10540
|
-
|
|
10556
|
+
}).then((ve) => Td(ve, { fallbackName: `export-${e}` })).finally(() => w("dynamicFormExport")));
|
|
10557
|
+
}, [y, e, x, N, w, S, pe, g]), Ye = P(async (oe) => (N("dynamicFormEdit"), y.post(`${p}?id=${e}`, oe).then(() => (w("dynamicFormEdit"), L([]), !0)).catch((ve) => (w("dynamicFormEdit"), L(Pn(ve)), !1))), [y, e, N, w, p]), mt = P(async (oe) => (N("dynamicFormDelete"), y.delete(`${f}?id=${e}&pk=${oe}`).then(() => (w("dynamicFormDelete"), L([]), !0)).catch((ve) => (w("dynamicFormDelete"), L(Pn(ve)), !1))), [y, e, N, w, f]), K = P(async (oe) => (N("dynamicFormCreate"), y.post(`${m}?id=${e}`, oe).then(({ data: ve }) => (w("dynamicFormCreate"), L([]), ve)).catch((ve) => (w("dynamicFormCreate"), L(Pn(ve)), null))), [y, e, N, w, m]), F = P(async (oe) => {
|
|
10558
|
+
x && await Ye(x.masterReference ? { ...oe, [x.masterReferenceColumn ?? ""]: pe } : oe) && ($(h.editSuccess, "success"), O((ve) => ve && ve.map((De) => {
|
|
10541
10559
|
var he;
|
|
10542
|
-
return ((he = De[(
|
|
10560
|
+
return ((he = De[(x == null ? void 0 : x.primaryKey) ?? ""]) == null ? void 0 : he.value) === oe[(x == null ? void 0 : x.primaryKey) ?? ""] ? ns(oe, x) : De;
|
|
10543
10561
|
})));
|
|
10544
|
-
}, [
|
|
10545
|
-
await U(h.deleteConfirm) && await mt(oe) && (
|
|
10562
|
+
}, [$, Ye, x, pe, h]), Z = P(async (oe) => {
|
|
10563
|
+
await U(h.deleteConfirm) && await mt(oe) && ($(h.deleteSuccess, "success"), O((ve) => ve && ve.filter((De) => {
|
|
10546
10564
|
var he;
|
|
10547
|
-
return ((he = De[(
|
|
10565
|
+
return ((he = De[(x == null ? void 0 : x.primaryKey) ?? ""]) == null ? void 0 : he.value) !== oe;
|
|
10548
10566
|
})));
|
|
10549
|
-
}, [
|
|
10550
|
-
if (!
|
|
10567
|
+
}, [$, mt, h, U, x]), ue = P(async (oe) => {
|
|
10568
|
+
if (!x)
|
|
10551
10569
|
return !1;
|
|
10552
|
-
const ve = await K(
|
|
10570
|
+
const ve = await K(x.masterReference ? { ...oe, [x.masterReferenceColumn ?? ""]: pe } : oe);
|
|
10553
10571
|
if (ve !== null) {
|
|
10554
|
-
|
|
10555
|
-
const De = ns(oe,
|
|
10556
|
-
return De[(
|
|
10572
|
+
$(h.createSuccess, "success");
|
|
10573
|
+
const De = ns(oe, x);
|
|
10574
|
+
return De[(x == null ? void 0 : x.primaryKey) ?? ""] = { value: ve, defaultValue: ve }, O((he) => [...he ?? [], De]), !0;
|
|
10557
10575
|
}
|
|
10558
10576
|
return !1;
|
|
10559
|
-
}, [
|
|
10577
|
+
}, [$, K, h, x, pe]), Ce = (oe) => {
|
|
10560
10578
|
oe > X ? r(X) : oe < 1 && r(1), r(oe);
|
|
10561
10579
|
}, ge = P(() => {
|
|
10562
|
-
if (!
|
|
10580
|
+
if (!C || !x) {
|
|
10563
10581
|
T(null);
|
|
10564
10582
|
return;
|
|
10565
10583
|
}
|
|
10566
|
-
const oe =
|
|
10584
|
+
const oe = C.filter((ve) => Object.entries(n).every(([De, he]) => {
|
|
10567
10585
|
var fr, mr, gr;
|
|
10568
10586
|
if (he === null)
|
|
10569
10587
|
return !0;
|
|
10570
10588
|
const Ie = (fr = ve[De]) == null ? void 0 : fr.value;
|
|
10571
10589
|
if (Ie == null)
|
|
10572
10590
|
return !1;
|
|
10573
|
-
const Ae = (mr =
|
|
10591
|
+
const Ae = (mr = x.columns) == null ? void 0 : mr.find((zr) => zr.field === De), ur = Ae == null ? void 0 : Ae.type, pr = (Ae == null ? void 0 : Ae.values) && ((gr = Ae == null ? void 0 : Ae.values) == null ? void 0 : gr.length) > 0;
|
|
10574
10592
|
if (!ur)
|
|
10575
10593
|
return !1;
|
|
10576
10594
|
switch (ur) {
|
|
@@ -10587,8 +10605,8 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10587
10605
|
}
|
|
10588
10606
|
}));
|
|
10589
10607
|
T(oe);
|
|
10590
|
-
}, [
|
|
10591
|
-
if (!E || !
|
|
10608
|
+
}, [C, n, x]), ce = P(() => {
|
|
10609
|
+
if (!E || !x) {
|
|
10592
10610
|
V([]);
|
|
10593
10611
|
return;
|
|
10594
10612
|
}
|
|
@@ -10598,7 +10616,7 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10598
10616
|
}
|
|
10599
10617
|
V([...E].sort((oe, ve) => {
|
|
10600
10618
|
var ur, pr, fr, mr, gr, zr;
|
|
10601
|
-
const De = ((pr = (ur = oe[i]) == null ? void 0 : ur.value) == null ? void 0 : pr.toString()) ?? "", he = ((mr = (fr = ve[i]) == null ? void 0 : fr.value) == null ? void 0 : mr.toString()) ?? "", Ie =
|
|
10619
|
+
const De = ((pr = (ur = oe[i]) == null ? void 0 : ur.value) == null ? void 0 : pr.toString()) ?? "", he = ((mr = (fr = ve[i]) == null ? void 0 : fr.value) == null ? void 0 : mr.toString()) ?? "", Ie = x.columns.find((lt) => lt.field === i), Ae = Ie == null ? void 0 : Ie.type;
|
|
10602
10620
|
if (!Ie || !Ae || !De && !he)
|
|
10603
10621
|
return 0;
|
|
10604
10622
|
if (!De)
|
|
@@ -10625,7 +10643,7 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10625
10643
|
}
|
|
10626
10644
|
return s === "asc" ? De.toString().localeCompare(he.toString()) : he.toString().localeCompare(De.toString());
|
|
10627
10645
|
}));
|
|
10628
|
-
}, [E,
|
|
10646
|
+
}, [E, x, i, s]);
|
|
10629
10647
|
return q(() => {
|
|
10630
10648
|
de();
|
|
10631
10649
|
}, [de]), q(() => {
|
|
@@ -10641,32 +10659,32 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10641
10659
|
}, [t, W, X, r]), /* @__PURE__ */ o.jsxs("div", { className: "h-100 w-100 d-flex flex-column", children: [
|
|
10642
10660
|
/* @__PURE__ */ o.jsxs("div", { className: "mb-3 d-flex justify-content-between align-items-start", children: [
|
|
10643
10661
|
/* @__PURE__ */ o.jsxs("div", { className: "d-flex align-items-center gap-3", children: [
|
|
10644
|
-
/* @__PURE__ */ o.jsx(Y, { variant: "h3", children: (
|
|
10645
|
-
(
|
|
10662
|
+
/* @__PURE__ */ o.jsx(Y, { variant: "h3", children: (x == null ? void 0 : x.name) ?? "" }),
|
|
10663
|
+
(x == null ? void 0 : x.masterReference) && /* @__PURE__ */ o.jsx(Tw, { label: ((et = (Le = x.columns) == null ? void 0 : Le.find((oe) => oe.field === x.masterReferenceColumn)) == null ? void 0 : et.caption) ?? "", options: ((Yt = (tt = x.columns) == null ? void 0 : tt.find((oe) => oe.field === x.masterReferenceColumn)) == null ? void 0 : Yt.values) ?? [], master: pe, onChange: (oe) => R(oe) })
|
|
10646
10664
|
] }),
|
|
10647
10665
|
/* @__PURE__ */ o.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
10648
|
-
(wo =
|
|
10666
|
+
(wo = x == null ? void 0 : x.slaves) == null ? void 0 : wo.map((oe, ve) => {
|
|
10649
10667
|
var De;
|
|
10650
10668
|
return /* @__PURE__ */ o.jsxs(ht, { as: "link", href: `${er(c, { id: (De = oe.id) == null ? void 0 : De.toString() })}?type=dynamic-form`, children: [
|
|
10651
10669
|
/* @__PURE__ */ o.jsxs("div", { className: "d-flex align-items-center", children: [
|
|
10652
|
-
|
|
10670
|
+
x.slaves.length > 1 ? /* @__PURE__ */ o.jsx(Y, { variant: "caption", className: "text-primary", children: ve + 1 }) : null,
|
|
10653
10671
|
/* @__PURE__ */ o.jsx(Ss, {})
|
|
10654
10672
|
] }),
|
|
10655
10673
|
oe.name
|
|
10656
10674
|
] }, oe.id);
|
|
10657
10675
|
}),
|
|
10658
10676
|
/* @__PURE__ */ o.jsxs(sr, { toggle: /* @__PURE__ */ o.jsx(lr, { as: Fr }), children: [
|
|
10659
|
-
/* @__PURE__ */ o.jsx(at, { onClick: () => I(!
|
|
10677
|
+
/* @__PURE__ */ o.jsx(at, { onClick: () => I(!S), children: S ? h.hideArchived : h.showArchived }),
|
|
10660
10678
|
/* @__PURE__ */ o.jsx(Ad, {}),
|
|
10661
10679
|
/* @__PURE__ */ o.jsx(at, { onClick: Ge, icon: /* @__PURE__ */ o.jsx(v, { icon: "file-download" }), children: h.downloadExport })
|
|
10662
10680
|
] })
|
|
10663
10681
|
] })
|
|
10664
10682
|
] }),
|
|
10665
|
-
(
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
/* @__PURE__ */ o.jsx("div", { className: _("rounded border overflow-auto", as.tableContainer), children: /* @__PURE__ */ o.jsx(Pw, { schema:
|
|
10683
|
+
(x == null ? void 0 : x.description) && /* @__PURE__ */ o.jsx(Y, { variant: "body2", className: "mb-3", children: x == null ? void 0 : x.description }),
|
|
10684
|
+
x != null && x.masterReference && !pe ? /* @__PURE__ */ o.jsx(It, { variant: "warning", children: h.selectMaster(((Do = (No = x.columns) == null ? void 0 : No.find((oe) => oe.field === x.masterReferenceColumn)) == null ? void 0 : Do.caption) ?? "").toLowerCase() }) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
10685
|
+
x && A.length > 0 && /* @__PURE__ */ o.jsx("div", { className: "mb-2", children: /* @__PURE__ */ o.jsx(cw, { errors: A, schema: x }) }),
|
|
10686
|
+
x && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
10687
|
+
/* @__PURE__ */ o.jsx("div", { className: _("rounded border overflow-auto", as.tableContainer), children: /* @__PURE__ */ o.jsx(Pw, { schema: x, items: !W && B && (B == null ? void 0 : B.length) > H ? [] : (W ? ae : B) ?? [], onEditItem: F, onDeleteItem: Z, onCreateItem: ue, filters: n, setFilter: a, sortByField: i, sortByType: s, setSortBy: l, selectedMaster: (pe == null ? void 0 : pe.toString()) ?? null, customPickers: b, appDetail: c }) }),
|
|
10670
10688
|
W && t && /* @__PURE__ */ o.jsxs("div", { className: _(as.pagination, "d-flex align-items-center gap-3 p-1 border-bottom border-start border-end rounded"), children: [
|
|
10671
10689
|
/* @__PURE__ */ o.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
10672
10690
|
/* @__PURE__ */ o.jsx(te, { color: "primary", onClick: () => Ce(1), disabled: !ee, children: /* @__PURE__ */ o.jsx(v, { icon: "chevron-double-left" }) }),
|
|
@@ -10692,13 +10710,13 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10692
10710
|
}, ss = {
|
|
10693
10711
|
apiDynamicFormsGet: "/dynamicForms"
|
|
10694
10712
|
}, Rw = ({ item: e, children: t }) => e.description ? /* @__PURE__ */ o.jsx(Ue, { placement: "left", text: e.description ?? "", children: /* @__PURE__ */ o.jsx("div", { children: t }) }) : /* @__PURE__ */ o.jsx(o.Fragment, { children: t }), QN = ({ activeId: e, otherForms: t = [], groupsDefs: r = [], searchQuery: n, fullSize: a, appUrls: { appDetail: i = is.appDetail } = is, apiUrls: { apiDynamicFormsGet: s = ss.apiDynamicFormsGet } = ss }) => {
|
|
10695
|
-
const l = ft(), { startLoading: c, stopLoading: u } = z(ir), [d, p] = k(null), [f] = Ma("search", ""), m =
|
|
10713
|
+
const l = ft(), { startLoading: c, stopLoading: u } = z(ir), [d, p] = k(null), [f] = Ma("search", ""), m = M(() => [
|
|
10696
10714
|
...(d == null ? void 0 : d.map((h) => ({
|
|
10697
10715
|
...h,
|
|
10698
10716
|
type: "dynamic-form"
|
|
10699
10717
|
}))) ?? [],
|
|
10700
10718
|
...t
|
|
10701
|
-
].filter((h) => ut(h.name, n) || ut(h.description, n)).sort((h, v) => (h.name ?? "").localeCompare(v.name ?? "")) ?? [], [d, t, n]), g =
|
|
10719
|
+
].filter((h) => ut(h.name, n) || ut(h.description, n)).sort((h, v) => (h.name ?? "").localeCompare(v.name ?? "")) ?? [], [d, t, n]), g = M(() => r.map((h) => ({
|
|
10702
10720
|
id: h.id,
|
|
10703
10721
|
name: h.name ?? "",
|
|
10704
10722
|
items: m.filter((v) => v.group === h.id)
|
|
@@ -10710,11 +10728,11 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10710
10728
|
return q(() => {
|
|
10711
10729
|
!d && b();
|
|
10712
10730
|
}, [b, d]), m.length > 0 ? /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsx("div", { className: "w-auto list-group forms-items overflow-x-hidden", children: g.map((h) => /* @__PURE__ */ o.jsx(un, { title: h.name, defaultOpen: !0, children: h.items.map((v) => {
|
|
10713
|
-
var
|
|
10714
|
-
return a ? /* @__PURE__ */ o.jsxs(Ze, { to: `${er(i, { id: (
|
|
10731
|
+
var y, N, w, x;
|
|
10732
|
+
return a ? /* @__PURE__ */ o.jsxs(Ze, { to: `${er(i, { id: (y = v.id) == null ? void 0 : y.toString() })}?type=${v.type}&search=${f ?? ""}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((N = v.id) == null ? void 0 : N.toString()) ? "active" : ""}`, children: [
|
|
10715
10733
|
/* @__PURE__ */ o.jsx(Y, { variant: "body", children: v.name }),
|
|
10716
10734
|
v.description && /* @__PURE__ */ o.jsx(Y, { variant: "body2", className: "text-muted mt-2", children: v.description })
|
|
10717
|
-
] }, v.id) : /* @__PURE__ */ o.jsx(Rw, { item: v, children: /* @__PURE__ */ o.jsx(Ze, { to: `${er(i, { id: (
|
|
10735
|
+
] }, v.id) : /* @__PURE__ */ o.jsx(Rw, { item: v, children: /* @__PURE__ */ o.jsx(Ze, { to: `${er(i, { id: (w = v.id) == null ? void 0 : w.toString() })}?type=${v.type}&search=${f ?? ""}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((x = v.id) == null ? void 0 : x.toString()) ? "active" : ""}`, children: /* @__PURE__ */ o.jsx(Y, { variant: "body2", children: v.name }) }) }, v.id);
|
|
10718
10736
|
}) }, h.id)) }) }) : null;
|
|
10719
10737
|
}, JN = ({ label: e, to: t, value: r }) => /* @__PURE__ */ o.jsxs(Oe, { label: e, children: [
|
|
10720
10738
|
/* @__PURE__ */ o.jsx("input", { disabled: !0, className: "form-control d-none" }),
|
|
@@ -10806,14 +10824,14 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10806
10824
|
] })
|
|
10807
10825
|
] }))) }) }) });
|
|
10808
10826
|
}, ls = ({ reportVersion: e, getReportRoute: t, report: r }) => /* @__PURE__ */ o.jsx(xn, { as: Ze, to: t(r, e.id), className: "p-1 px-2", action: !0, children: /* @__PURE__ */ o.jsx(Y, { variant: "body2", className: "d-flex justify-content-between align-items-center gap-3", children: /* @__PURE__ */ o.jsx("div", { className: "link", children: e.name }) }) }), nn = 5, cs = ({ versionsList: e, getReportRoute: t, report: r }) => {
|
|
10809
|
-
const { ProjectIconComponent: n } = z(J), [a, i] = k(!0), s =
|
|
10827
|
+
const { ProjectIconComponent: n } = z(J), [a, i] = k(!0), s = M(() => e.length <= nn ? e : e.slice(0, nn - 1), [e]), l = M(() => e.length <= nn ? [] : e.slice(nn - 1), [e]);
|
|
10810
10828
|
return /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsxs(Sr, { children: [
|
|
10811
10829
|
s.map((c) => /* @__PURE__ */ o.jsx(ls, { reportVersion: c, getReportRoute: t, report: r })),
|
|
10812
10830
|
a ? null : l.map((c) => /* @__PURE__ */ o.jsx(ls, { reportVersion: c, getReportRoute: t, report: r })),
|
|
10813
10831
|
l.length > 0 && /* @__PURE__ */ o.jsx(xn, { onClick: () => i((c) => !c), className: "py-0 d-flex justify-content-center", children: a ? /* @__PURE__ */ o.jsx(n, { icon: "chevron-down" }) : /* @__PURE__ */ o.jsx(n, { icon: "chevron-up" }) })
|
|
10814
10832
|
] }) });
|
|
10815
10833
|
}, Uw = ({ report: e, getReportRoute: t, getReportName: r, getReportDescription: n }) => {
|
|
10816
|
-
const a =
|
|
10834
|
+
const a = M(() => e.versionsCustom.length === 0 ? { xs: 12 } : { xs: 12, sm: 6, md: 12, lg: 12, xl: 12, xxl: 6 }, [e.versionsCustom.length]);
|
|
10817
10835
|
return /* @__PURE__ */ o.jsx("div", { className: "col-12 col-lg-4", children: /* @__PURE__ */ o.jsxs(
|
|
10818
10836
|
pn,
|
|
10819
10837
|
{
|
|
@@ -10836,15 +10854,15 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10836
10854
|
}, oD = ({ groups: e, apiUrls: { reportsGet: t = ia.reportsGet, reportsLastUsedGet: r = ia.reportsLastUsedGet } = ia, getReportName: n, getReportDescription: a, getGroupTitle: i, getReportRoute: s }) => {
|
|
10837
10855
|
const { texts: { reports: l } } = z(J), [c, u] = k(""), [d] = Ra(c, 500), p = P((h) => h.map((v) => ({
|
|
10838
10856
|
...v,
|
|
10839
|
-
groupId: !v.groupId || v.groupId === 0 || !e.some((
|
|
10840
|
-
})), [e]), { data: f } = pt(t, { dataTransformer: p }), m =
|
|
10857
|
+
groupId: !v.groupId || v.groupId === 0 || !e.some((y) => y === v.groupId) ? 999 : v.groupId
|
|
10858
|
+
})), [e]), { data: f } = pt(t, { dataTransformer: p }), m = M(() => {
|
|
10841
10859
|
if (f === null)
|
|
10842
10860
|
return {};
|
|
10843
10861
|
const h = {};
|
|
10844
10862
|
return e.forEach((v) => {
|
|
10845
|
-
h[v] = f.filter((
|
|
10863
|
+
h[v] = f.filter((y) => y.groupId === v && (ut(n(y), d) || ut(a(y), d) || y.versions.some((N) => ut(N.name, d)) || y.versionsCustom.some((N) => ut(N.name, d))));
|
|
10846
10864
|
}), h;
|
|
10847
|
-
}, [d, e, f, a, n]), g =
|
|
10865
|
+
}, [d, e, f, a, n]), g = M(() => e.filter((h) => {
|
|
10848
10866
|
var v;
|
|
10849
10867
|
return ((v = m[h]) == null ? void 0 : v.length) > 0;
|
|
10850
10868
|
}), [m, e]), { isMobile: b } = yn();
|
|
@@ -10898,7 +10916,7 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10898
10916
|
/* @__PURE__ */ o.jsx(Y, { variant: "caption", children: e }),
|
|
10899
10917
|
/* @__PURE__ */ o.jsx(Y, { variant: "body2", className: "text-end", children: t ?? "-" })
|
|
10900
10918
|
] }), lD = ({ route: e, variant: t = "link", children: r, className: n, disabled: a = !1, routeParams: i }) => {
|
|
10901
|
-
const { checkUserHasPermissions: s } = Is(), l =
|
|
10919
|
+
const { checkUserHasPermissions: s } = Is(), l = M(() => a || !(e.permissions === void 0 || s(e.permissions)), [s, a, e.permissions]), c = r ?? e.name, u = M(() => {
|
|
10902
10920
|
switch (t) {
|
|
10903
10921
|
case "primaryButton":
|
|
10904
10922
|
return Gt;
|
|
@@ -10985,7 +11003,7 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
10985
11003
|
/* @__PURE__ */ o.jsx("div", { className: rt.textLayer, children: n })
|
|
10986
11004
|
] })
|
|
10987
11005
|
] }), uD = ({ showArchived: e, BnfTableComponent: t, tableIdentifier: r, detailRoute: n }) => {
|
|
10988
|
-
const { texts: { substitutions: a } } = z(J), { data: i } = pt(`/permissions/substitutions?archived=${e}`), s =
|
|
11006
|
+
const { texts: { substitutions: a } } = z(J), { data: i } = pt(`/permissions/substitutions?archived=${e}`), s = M(() => ({ enable: !0, column: "archived" }), []), l = M(() => [
|
|
10989
11007
|
{
|
|
10990
11008
|
fieldName: "employeeName",
|
|
10991
11009
|
caption: a.index.employeeName,
|
|
@@ -11031,7 +11049,7 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
11031
11049
|
from: s(),
|
|
11032
11050
|
to: s(),
|
|
11033
11051
|
roles: Tn.array(Tn.string())
|
|
11034
|
-
}), m =
|
|
11052
|
+
}), m = M(() => ({
|
|
11035
11053
|
id: (e == null ? void 0 : e.id) ?? 0,
|
|
11036
11054
|
employeeId: (e == null ? void 0 : e.employeeId) ?? (d == null ? void 0 : d.personalNumber) ?? void 0,
|
|
11037
11055
|
substituteId: (e == null ? void 0 : e.substituteId) ?? void 0,
|
|
@@ -11073,46 +11091,46 @@ const Nc = ({ src: e, alt: t, baseUrl: r, customToken: n, placeholder: a, render
|
|
|
11073
11091
|
g.reset(m);
|
|
11074
11092
|
}, [m, g]), { formSchema: f, onSubmit: b, formMethods: g };
|
|
11075
11093
|
}, pD = ({ indexRoute: e }) => {
|
|
11076
|
-
var
|
|
11094
|
+
var w;
|
|
11077
11095
|
const { id: t } = Os(), { user: r } = z(Pt), n = ft(), a = wn(), { confirm: i } = or(), { texts: { substitutions: { detail: s } } } = z(J), { data: l } = pt(`/permissions/substitutions/${t}`, {
|
|
11078
11096
|
enabled: t !== void 0
|
|
11079
|
-
}), { data: c } = pt("/permissions/users"), { onSubmit: u, formMethods: d } = tN(l, e), p = d.watch("employeeId"), { data: f } = pt(`/permissions/roles?userName=${(
|
|
11097
|
+
}), { data: c } = pt("/permissions/users"), { onSubmit: u, formMethods: d } = tN(l, e), p = d.watch("employeeId"), { data: f } = pt(`/permissions/roles?userName=${(w = c == null ? void 0 : c.find((x) => x.employeeId === p)) == null ? void 0 : w.name}`, { enabled: p > 0 && !!c }), { refreshAvailableDelegations: m } = z(_s), { checkUserHasPermissions: g } = Is(), b = P(async () => {
|
|
11080
11098
|
await i(s.deleteConfirm) && (await n.delete(`/permissions/substitutions/${t}`), m(), a(e));
|
|
11081
|
-
}, [n, i, t, a, m, s, e]), h =
|
|
11099
|
+
}, [n, i, t, a, m, s, e]), h = M(() => p !== (r == null ? void 0 : r.personalNumber) && !g(["ZASTUP_MODIFY"]), [g, p, r == null ? void 0 : r.personalNumber]), v = d.watch("roles"), y = M(() => f == null ? void 0 : f.filter((x) => x.canBeRepresented), [f]), N = M(() => (y == null ? void 0 : y.every((x) => v == null ? void 0 : v.includes(x.name))) ?? !1, [y, v]);
|
|
11082
11100
|
return /* @__PURE__ */ o.jsx(Er, { title: /* @__PURE__ */ o.jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [
|
|
11083
11101
|
/* @__PURE__ */ o.jsx(Y, { variant: "h3", children: s.title }),
|
|
11084
11102
|
/* @__PURE__ */ o.jsx(sr, { toggle: /* @__PURE__ */ o.jsx(lr, { as: Fr }), children: /* @__PURE__ */ o.jsx(at, { onClick: () => b(), children: s.delete }) })
|
|
11085
11103
|
] }), children: /* @__PURE__ */ o.jsx(Jd, { ...d, children: /* @__PURE__ */ o.jsx(Hd, { disabled: h, children: /* @__PURE__ */ o.jsxs(Pe, { onSubmit: d.handleSubmit(u), className: "h-100", children: [
|
|
11086
11104
|
/* @__PURE__ */ o.jsxs($a, { className: "h-100", children: [
|
|
11087
11105
|
/* @__PURE__ */ o.jsx(dn, { sm: 12, md: 4, children: /* @__PURE__ */ o.jsxs(pn, { title: s.title, children: [
|
|
11088
|
-
/* @__PURE__ */ o.jsx(qo, { formField: "employeeId", options: (c == null ? void 0 : c.map((
|
|
11089
|
-
id:
|
|
11090
|
-
name: `${
|
|
11106
|
+
/* @__PURE__ */ o.jsx(qo, { formField: "employeeId", options: (c == null ? void 0 : c.map((x) => ({
|
|
11107
|
+
id: x.employeeId,
|
|
11108
|
+
name: `${x.employeeName} (${x.name})`
|
|
11091
11109
|
}))) ?? [], label: s.employee, isNumber: !0, required: !0, disabled: !g(["ZASTUP_MODIFY"]), resetsFields: ["roles"] }),
|
|
11092
|
-
/* @__PURE__ */ o.jsx(qo, { formField: "substituteId", options: (c == null ? void 0 : c.map((
|
|
11093
|
-
id:
|
|
11094
|
-
name: `${
|
|
11110
|
+
/* @__PURE__ */ o.jsx(qo, { formField: "substituteId", options: (c == null ? void 0 : c.map((x) => ({
|
|
11111
|
+
id: x.employeeId,
|
|
11112
|
+
name: `${x.employeeName} (${x.name})`
|
|
11095
11113
|
}))) ?? [], label: s.substitute, isNumber: !0, required: !0 }),
|
|
11096
11114
|
/* @__PURE__ */ o.jsx(la, { formField: "from", label: s.from, type: "date", required: !0 }),
|
|
11097
11115
|
/* @__PURE__ */ o.jsx(la, { formField: "to", label: s.to, type: "date", required: !0 })
|
|
11098
11116
|
] }) }),
|
|
11099
|
-
/* @__PURE__ */ o.jsx(dn, { sm: 12, md: 4, children: /* @__PURE__ */ o.jsxs(pn, { title: s.roles(`${(v == null ? void 0 : v.length) ?? 0}/${(
|
|
11117
|
+
/* @__PURE__ */ o.jsx(dn, { sm: 12, md: 4, children: /* @__PURE__ */ o.jsxs(pn, { title: s.roles(`${(v == null ? void 0 : v.length) ?? 0}/${(y == null ? void 0 : y.length) ?? 0}`), className: "h-max-100", contentClassName: "d-flex flex-column overflow-hidden", children: [
|
|
11100
11118
|
h ? null : /* @__PURE__ */ o.jsx("div", { className: "bg-darker", style: {
|
|
11101
11119
|
marginLeft: "-12px",
|
|
11102
11120
|
marginRight: "-12px",
|
|
11103
11121
|
marginTop: "-12px",
|
|
11104
11122
|
padding: "0px 12px"
|
|
11105
|
-
}, children: /* @__PURE__ */ o.jsx(ma, { label:
|
|
11106
|
-
d.setValue("roles",
|
|
11123
|
+
}, children: /* @__PURE__ */ o.jsx(ma, { label: N ? s.uncheckAllRoles : s.checkAllRoles, indeterminate: !N && (v == null ? void 0 : v.length) > 0, value: N, disabled: h, onChange: () => {
|
|
11124
|
+
d.setValue("roles", N ? [] : (y == null ? void 0 : y.map((x) => x.name)) ?? [], { shouldDirty: !0 });
|
|
11107
11125
|
}, InputContainer: Oe }) }),
|
|
11108
11126
|
/* @__PURE__ */ o.jsx("div", { className: "overflow-auto", style: {
|
|
11109
11127
|
maxHeight: "60vh",
|
|
11110
11128
|
marginLeft: "-12px",
|
|
11111
11129
|
marginRight: "-12px",
|
|
11112
11130
|
padding: "0px 12px"
|
|
11113
|
-
}, children: f == null ? void 0 : f.map((
|
|
11114
|
-
d.setValue("roles",
|
|
11115
|
-
}, InputContainer: Oe },
|
|
11131
|
+
}, children: f == null ? void 0 : f.map((x) => /* @__PURE__ */ o.jsx(ma, { label: x.name, value: (v == null ? void 0 : v.find((j) => j === x.name)) !== void 0, disabled: h || !x.canBeRepresented, onChange: (j) => {
|
|
11132
|
+
d.setValue("roles", j ? [...v ?? [], x.name] : (v == null ? void 0 : v.filter((C) => C !== x.name)) ?? [], { shouldDirty: !0 });
|
|
11133
|
+
}, InputContainer: Oe }, x.name)) })
|
|
11116
11134
|
] }) })
|
|
11117
11135
|
] }),
|
|
11118
11136
|
/* @__PURE__ */ o.jsx(xp, { onStorno: () => d.reset(), children: s.save })
|