react-luminus-components 1.3.192 → 1.3.194
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +50 -50
- package/dist/{Loading-yCY9AH2X.js → Loading-BpA-vIRg.js} +1 -1
- package/dist/{Loading-C3LGHjpP.cjs → Loading-IHriJfGX.cjs} +1 -1
- package/dist/components/common/Badge/Badge.d.ts +2 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +3 -3
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +5 -5
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +2 -2
- package/dist/main.es.js +722 -719
- package/dist/{nivo-bar.es-D91s7Wa7.js → nivo-bar.es-CLWFfSRL.js} +2065 -2066
- package/dist/{nivo-bar.es-HMdrH0OB.cjs → nivo-bar.es-DdpHpxj4.cjs} +44 -44
- package/dist/{searchUtils-D9rZz8Yz.js → searchUtils-enBn_Tr3.js} +1 -1
- package/dist/{searchUtils-DTO-tXUX.cjs → searchUtils-uzZbgJ-w.cjs} +1 -1
- package/dist/{useClipboard-C4S7pjyu.cjs → useClipboard-C41fnREG.cjs} +1 -1
- package/dist/{useClipboard-DQSXQWLK.js → useClipboard-ClLHBiVH.js} +1 -1
- package/dist/{useGetApiData-BXrz8XiD.cjs → useGetApiData-KCE4VqhU.cjs} +1 -1
- package/dist/{useGetApiData-SjY4113z.js → useGetApiData-QT5sdkPY.js} +1 -1
- package/dist/{usePermissions-itDK0aJ8.cjs → usePermissions-Dan230rq.cjs} +1 -1
- package/dist/{usePermissions-CHsUtNlK.js → usePermissions-DtXc4gxc.js} +1 -1
- package/dist/utils/date/dateUtils.d.ts +0 -8
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +27 -28
- package/package.json +1 -1
package/dist/main.es.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { j as n, c as w, t as je, a as kt, s as An, g as Bn, m as qs, d as Bt, b as Qs, e as Zs, f as Ue, h as Js, i as Xs, k as ea, l as ta, n as na, o as ra, p as sa, T as $r, q as Dr, r as Vn, E as aa, u as Lr, v as kn, w as Tr, x as oa, y as he, z as Kt, A as ia, B as Er, C as qt, D as la, F as xn, G as Fr, H as ca, S as vn, N as Or, I as Sn, J as Cn, K as da, L as ua, M as fa, O as ma, P as ha, Q as Rr, R as pa, U as ga, V as xa, W as va, X as ja, Y as ya, Z as wa, _ as jn, $ as oe, a0 as zt, a1 as
|
|
2
|
-
import { bc as sf, bd as af, ba as of, b9 as lf, be as cf, bf as df, bb as uf } from "./nivo-bar.es-
|
|
1
|
+
import { j as n, c as w, t as je, a as kt, s as An, g as Bn, m as qs, d as Bt, b as Qs, e as Zs, f as Ue, h as Js, i as Xs, k as ea, l as ta, n as na, o as ra, p as sa, T as $r, q as Dr, r as Vn, E as aa, u as Lr, v as kn, w as Tr, x as oa, y as he, z as Kt, A as ia, B as Er, C as qt, D as la, F as xn, G as Fr, H as ca, S as vn, N as Or, I as Sn, J as Cn, K as da, L as ua, M as fa, O as ma, P as ha, Q as Rr, R as pa, U as ga, V as xa, W as va, X as ja, Y as ya, Z as wa, _ as jn, $ as oe, a0 as zt, a1 as ba, a2 as _a, a3 as Na, a4 as Mr, a5 as St, a6 as te, a7 as In, a8 as ge, a9 as $n, aa as Pe, ab as it, ac as ka, ad as ze, ae as K, af as Ar, ag as Br, ah as Vr, ai as Ae, aj as lt, ak as Sa, al as Ca, am as Ia, an as $a, ao as Qt, ap as Ze, aq as Lt, ar as Tt, as as Pr, at as Se, au as zr, av as Da, aw as La, ax as Ta, ay as ht, az as pt, aA as Et, aB as Ce, aC as Wr, aD as Ct, aE as Je, aF as Hr, aG as Fe, aH as Ea, aI as Ur, aJ as Fa, aK as Gr, aL as Oa, aM as Ra, aN as Ma, aO as Aa, aP as Ba, aQ as Va, aR as Wt, aS as Yr, aT as Pa, aU as za, aV as Wa, aW as Ha, aX as Ua, aY as Ga, aZ as Ke, a_ as Ya, a$ as Ka, b0 as qa, b1 as Qa, b2 as Za, b3 as sn, b4 as Pn, b5 as Ja, b6 as Xa, b7 as Kr, b8 as eo } from "./nivo-bar.es-CLWFfSRL.js";
|
|
2
|
+
import { bc as sf, bd as af, ba as of, b9 as lf, be as cf, bf as df, bb as uf } from "./nivo-bar.es-CLWFfSRL.js";
|
|
3
3
|
import * as ie from "react";
|
|
4
|
-
import ke, { useCallback as S, useMemo as
|
|
5
|
-
import { c as Be, L as Wn } from "./Loading-
|
|
4
|
+
import ke, { useCallback as S, useMemo as U, useContext as G, useRef as Z, useEffect as B, useState as E, useId as to, Component as no, isValidElement as zn, Suspense as ro, useLayoutEffect as so } from "react";
|
|
5
|
+
import { c as Be, L as Wn } from "./Loading-BpA-vIRg.js";
|
|
6
6
|
import { InteractionType as ao } from "@azure/msal-browser";
|
|
7
7
|
import { MsalAuthenticationTemplate as oo } from "@azure/msal-react";
|
|
8
8
|
import { useNavigate as qr, Link as Oe, useSearchParams as io, useParams as lo, generatePath as Ht, useLocation as co, Navigate as Rt } from "react-router-dom";
|
|
9
9
|
import { useFormContext as Xe, Controller as Dn } from "react-hook-form";
|
|
10
10
|
import { Pivot as uo } from "react-flexmonster";
|
|
11
11
|
import { u as Zt, a as Qr } from "./useWindowSize-OLYtjFv_.js";
|
|
12
|
-
import { s as qe, l as
|
|
13
|
-
import { u as fo, a as Zr, b as mo, c as Jr, d as ho } from "./useClipboard-
|
|
12
|
+
import { s as qe, l as _t } from "./searchUtils-enBn_Tr3.js";
|
|
13
|
+
import { u as fo, a as Zr, b as mo, c as Jr, d as ho } from "./useClipboard-ClLHBiVH.js";
|
|
14
14
|
import Ut from "react-dom";
|
|
15
|
-
import { u as It } from "./useGetApiData-
|
|
15
|
+
import { u as It } from "./useGetApiData-QT5sdkPY.js";
|
|
16
16
|
const du = ({ fileLoader: e, fileName: t, children: r }) => {
|
|
17
17
|
const s = S(async () => {
|
|
18
|
-
var
|
|
18
|
+
var l, c;
|
|
19
19
|
const a = await e();
|
|
20
20
|
if (!a)
|
|
21
21
|
return;
|
|
22
22
|
const o = window.URL.createObjectURL(new Blob([a])), i = document.createElement("a");
|
|
23
|
-
i.href = o, i.setAttribute("download", t), (
|
|
23
|
+
i.href = o, i.setAttribute("download", t), (l = document.body) == null || l.appendChild(i), i.click(), (c = document.body) == null || c.removeChild(i);
|
|
24
24
|
}, [e, t]);
|
|
25
25
|
return /* @__PURE__ */ n.jsx("div", { role: "button", onClick: s, children: r });
|
|
26
26
|
}, po = ({ className: e, size: t, ...r }) => /* @__PURE__ */ n.jsxs("div", { className: w("luminus-loading", Be.loading, Be.loadingBlock, t === "line" ? Be.sizeLine : void 0, t === "fill" ? Be.sizeFill : void 0, e), ...r, children: [
|
|
@@ -72,8 +72,8 @@ function on(e, t) {
|
|
|
72
72
|
function vo(e, t) {
|
|
73
73
|
const r = je(e), s = je(t), a = Yn(r, s), o = Math.abs(Bt(r, s));
|
|
74
74
|
r.setDate(r.getDate() - a * o);
|
|
75
|
-
const i = +(Yn(r, s) === -a),
|
|
76
|
-
return
|
|
75
|
+
const i = +(Yn(r, s) === -a), l = a * (o - i);
|
|
76
|
+
return l === 0 ? 0 : l;
|
|
77
77
|
}
|
|
78
78
|
function Yn(e, t) {
|
|
79
79
|
const r = e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate() || e.getHours() - t.getHours() || e.getMinutes() - t.getMinutes() || e.getSeconds() - t.getSeconds() || e.getMilliseconds() - t.getMilliseconds();
|
|
@@ -106,10 +106,10 @@ function yn(e, t) {
|
|
|
106
106
|
throw new RangeError("Invalid time value");
|
|
107
107
|
const s = (t == null ? void 0 : t.format) ?? "extended", a = (t == null ? void 0 : t.representation) ?? "complete";
|
|
108
108
|
let o = "", i = "";
|
|
109
|
-
const
|
|
109
|
+
const l = s === "extended" ? "-" : "", c = s === "extended" ? ":" : "";
|
|
110
110
|
if (a !== "time") {
|
|
111
111
|
const d = Ue(r.getDate(), 2), u = Ue(r.getMonth() + 1, 2);
|
|
112
|
-
o = `${Ue(r.getFullYear(), 4)}${
|
|
112
|
+
o = `${Ue(r.getFullYear(), 4)}${l}${u}${l}${d}`;
|
|
113
113
|
}
|
|
114
114
|
if (a !== "date") {
|
|
115
115
|
const d = r.getTimezoneOffset();
|
|
@@ -118,7 +118,7 @@ function yn(e, t) {
|
|
|
118
118
|
i = `${d < 0 ? "+" : "-"}${p}:${h}`;
|
|
119
119
|
} else
|
|
120
120
|
i = "Z";
|
|
121
|
-
const u = Ue(r.getHours(), 2), m = Ue(r.getMinutes(), 2), v = Ue(r.getSeconds(), 2), f = o === "" ? "" : "T", g = [u, m, v].join(
|
|
121
|
+
const u = Ue(r.getHours(), 2), m = Ue(r.getMinutes(), 2), v = Ue(r.getSeconds(), 2), f = o === "" ? "" : "T", g = [u, m, v].join(c);
|
|
122
122
|
o = `${o}${f}${g}${i}`;
|
|
123
123
|
}
|
|
124
124
|
return o;
|
|
@@ -133,8 +133,8 @@ function yo(e, t, r) {
|
|
|
133
133
|
if (r != null && r.unit)
|
|
134
134
|
a = r == null ? void 0 : r.unit, a === "second" ? s = ln(o, i) : a === "minute" ? s = qn(o, i) : a === "hour" ? s = Kn(o, i) : a === "day" ? s = Bt(o, i) : a === "week" ? s = Gn(o, i) : a === "month" ? s = Hn(o, i) : a === "quarter" ? s = an(o, i) : a === "year" && (s = on(o, i));
|
|
135
135
|
else {
|
|
136
|
-
const
|
|
137
|
-
Math.abs(
|
|
136
|
+
const c = ln(o, i);
|
|
137
|
+
Math.abs(c) < Js ? (s = ln(o, i), a = "second") : Math.abs(c) < Xs ? (s = qn(o, i), a = "minute") : Math.abs(c) < ea && Math.abs(Bt(o, i)) < 1 ? (s = Kn(o, i), a = "hour") : Math.abs(c) < ta && (s = Bt(o, i)) && Math.abs(s) < 7 ? a = "day" : Math.abs(c) < na ? (s = Gn(o, i), a = "week") : Math.abs(c) < ra ? (s = Hn(o, i), a = "month") : Math.abs(c) < sa && an(o, i) < 4 ? (s = an(o, i), a = "quarter") : (s = on(o, i), a = "year");
|
|
138
138
|
}
|
|
139
139
|
return new Intl.RelativeTimeFormat(r == null ? void 0 : r.locale, {
|
|
140
140
|
localeMatcher: r == null ? void 0 : r.localeMatcher,
|
|
@@ -152,7 +152,7 @@ function wn(e, t) {
|
|
|
152
152
|
const r = je(e);
|
|
153
153
|
return isNaN(+r) ? kt(e, NaN) : (r.setFullYear(t), r);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function bt(...e) {
|
|
156
156
|
return e.filter((t) => t != null).reduce((t, r) => {
|
|
157
157
|
if (typeof r != "function")
|
|
158
158
|
throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");
|
|
@@ -161,12 +161,12 @@ function _t(...e) {
|
|
|
161
161
|
};
|
|
162
162
|
}, null);
|
|
163
163
|
}
|
|
164
|
-
const
|
|
164
|
+
const bo = {
|
|
165
165
|
height: ["marginTop", "marginBottom"],
|
|
166
166
|
width: ["marginLeft", "marginRight"]
|
|
167
167
|
};
|
|
168
|
-
function
|
|
169
|
-
const r = `offset${e[0].toUpperCase()}${e.slice(1)}`, s = t[r], a =
|
|
168
|
+
function _o(e, t) {
|
|
169
|
+
const r = `offset${e[0].toUpperCase()}${e.slice(1)}`, s = t[r], a = bo[e];
|
|
170
170
|
return s + // @ts-ignore
|
|
171
171
|
parseInt(Vn(t, a[0]), 10) + // @ts-ignore
|
|
172
172
|
parseInt(Vn(t, a[1]), 10);
|
|
@@ -184,39 +184,39 @@ const No = {
|
|
|
184
184
|
onExiting: a,
|
|
185
185
|
className: o,
|
|
186
186
|
children: i,
|
|
187
|
-
dimension:
|
|
188
|
-
in:
|
|
187
|
+
dimension: l = "height",
|
|
188
|
+
in: c = !1,
|
|
189
189
|
timeout: d = 300,
|
|
190
190
|
mountOnEnter: u = !1,
|
|
191
191
|
unmountOnExit: m = !1,
|
|
192
192
|
appear: v = !1,
|
|
193
|
-
getDimensionValue: f =
|
|
193
|
+
getDimensionValue: f = _o,
|
|
194
194
|
...g
|
|
195
195
|
}, x) => {
|
|
196
|
-
const p = typeof
|
|
196
|
+
const p = typeof l == "function" ? l() : l, h = U(() => bt((C) => {
|
|
197
197
|
C.style[p] = "0";
|
|
198
|
-
}, e), [p, e]), y =
|
|
198
|
+
}, e), [p, e]), y = U(() => bt((C) => {
|
|
199
199
|
const T = `scroll${p[0].toUpperCase()}${p.slice(1)}`;
|
|
200
200
|
C.style[p] = `${C[T]}px`;
|
|
201
|
-
}, t), [p, t]),
|
|
201
|
+
}, t), [p, t]), b = U(() => bt((C) => {
|
|
202
202
|
C.style[p] = null;
|
|
203
|
-
}, r), [p, r]),
|
|
203
|
+
}, r), [p, r]), _ = U(() => bt((C) => {
|
|
204
204
|
C.style[p] = `${f(p, C)}px`, oa(C);
|
|
205
|
-
}, s), [s, f, p]), j =
|
|
205
|
+
}, s), [s, f, p]), j = U(() => bt((C) => {
|
|
206
206
|
C.style[p] = null;
|
|
207
207
|
}, a), [p, a]);
|
|
208
208
|
return /* @__PURE__ */ n.jsx($r, {
|
|
209
209
|
ref: x,
|
|
210
210
|
addEndListener: Dr,
|
|
211
211
|
...g,
|
|
212
|
-
"aria-expanded": g.role ?
|
|
212
|
+
"aria-expanded": g.role ? c : null,
|
|
213
213
|
onEnter: h,
|
|
214
214
|
onEntering: y,
|
|
215
|
-
onEntered:
|
|
216
|
-
onExit:
|
|
215
|
+
onEntered: b,
|
|
216
|
+
onExit: _,
|
|
217
217
|
onExiting: j,
|
|
218
218
|
childRef: i.ref,
|
|
219
|
-
in:
|
|
219
|
+
in: c,
|
|
220
220
|
timeout: d,
|
|
221
221
|
mountOnEnter: u,
|
|
222
222
|
unmountOnExit: m,
|
|
@@ -257,8 +257,8 @@ const ss = /* @__PURE__ */ ie.forwardRef((e, t) => {
|
|
|
257
257
|
closeLabel: a = "Close alert",
|
|
258
258
|
closeVariant: o,
|
|
259
259
|
className: i,
|
|
260
|
-
children:
|
|
261
|
-
variant:
|
|
260
|
+
children: l,
|
|
261
|
+
variant: c = "primary",
|
|
262
262
|
onClose: d,
|
|
263
263
|
dismissible: u,
|
|
264
264
|
transition: m = xn,
|
|
@@ -271,12 +271,12 @@ const ss = /* @__PURE__ */ ie.forwardRef((e, t) => {
|
|
|
271
271
|
role: "alert",
|
|
272
272
|
...x ? void 0 : v,
|
|
273
273
|
ref: t,
|
|
274
|
-
className: w(i, f,
|
|
274
|
+
className: w(i, f, c && `${f}-${c}`, u && `${f}-dismissible`),
|
|
275
275
|
children: [u && /* @__PURE__ */ n.jsx(la, {
|
|
276
276
|
onClick: g,
|
|
277
277
|
"aria-label": a,
|
|
278
278
|
variant: o
|
|
279
|
-
}),
|
|
279
|
+
}), l]
|
|
280
280
|
});
|
|
281
281
|
return x ? /* @__PURE__ */ n.jsx(x, {
|
|
282
282
|
unmountOnExit: !0,
|
|
@@ -321,7 +321,7 @@ const is = /* @__PURE__ */ ie.forwardRef(({
|
|
|
321
321
|
as: r = "div",
|
|
322
322
|
...s
|
|
323
323
|
}, a) => {
|
|
324
|
-
const o = he(e, "card-header"), i =
|
|
324
|
+
const o = he(e, "card-header"), i = U(() => ({
|
|
325
325
|
cardHeaderBsPrefix: o
|
|
326
326
|
}), [o]);
|
|
327
327
|
return /* @__PURE__ */ n.jsx(os.Provider, {
|
|
@@ -416,13 +416,13 @@ const hs = /* @__PURE__ */ ie.forwardRef(({
|
|
|
416
416
|
body: o = !1,
|
|
417
417
|
children: i,
|
|
418
418
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
419
|
-
as:
|
|
420
|
-
...
|
|
419
|
+
as: l = "div",
|
|
420
|
+
...c
|
|
421
421
|
}, d) => {
|
|
422
422
|
const u = he(e, "card");
|
|
423
|
-
return /* @__PURE__ */ n.jsx(
|
|
423
|
+
return /* @__PURE__ */ n.jsx(l, {
|
|
424
424
|
ref: d,
|
|
425
|
-
...
|
|
425
|
+
...c,
|
|
426
426
|
className: w(t, u, r && `bg-${r}`, s && `text-${s}`, a && `border-${a}`),
|
|
427
427
|
children: o ? /* @__PURE__ */ n.jsx(En, {
|
|
428
428
|
children: i
|
|
@@ -471,9 +471,9 @@ const Io = (e) => /* @__PURE__ */ n.jsx(Jt, {
|
|
|
471
471
|
...o
|
|
472
472
|
}, i) => {
|
|
473
473
|
e = he(e, "input-group");
|
|
474
|
-
const
|
|
474
|
+
const l = U(() => ({}), []);
|
|
475
475
|
return /* @__PURE__ */ n.jsx(ca.Provider, {
|
|
476
|
-
value:
|
|
476
|
+
value: l,
|
|
477
477
|
children: /* @__PURE__ */ n.jsx(a, {
|
|
478
478
|
ref: i,
|
|
479
479
|
...o,
|
|
@@ -504,15 +504,15 @@ function xs({
|
|
|
504
504
|
role: a,
|
|
505
505
|
disabled: o
|
|
506
506
|
}) {
|
|
507
|
-
const i =
|
|
507
|
+
const i = G(vn), l = G(Or), c = G(gs);
|
|
508
508
|
let d = r;
|
|
509
509
|
const u = {
|
|
510
510
|
role: a
|
|
511
511
|
};
|
|
512
|
-
if (
|
|
513
|
-
!a &&
|
|
514
|
-
const m =
|
|
515
|
-
u[Sn("event-key")] = e, u.id = m || s, d = r == null && e != null ?
|
|
512
|
+
if (l) {
|
|
513
|
+
!a && l.role === "tablist" && (u.role = "tab");
|
|
514
|
+
const m = l.getControllerId(e ?? null), v = l.getControlledId(e ?? null);
|
|
515
|
+
u[Sn("event-key")] = e, u.id = m || s, d = r == null && e != null ? l.activeKey === e : r, (d || !(c != null && c.unmountOnExit) && !(c != null && c.mountOnEnter)) && (u["aria-controls"] = v);
|
|
516
516
|
}
|
|
517
517
|
return u.role === "tab" && (u["aria-selected"] = d, d || (u.tabIndex = -1), o && (u.tabIndex = -1, u["aria-disabled"] = !0)), u.onClick = qt((m) => {
|
|
518
518
|
o || (t == null || t(m), e != null && i && !m.isPropagationStopped() && i(e, m));
|
|
@@ -526,11 +526,11 @@ const vs = /* @__PURE__ */ ie.forwardRef((e, t) => {
|
|
|
526
526
|
active: s,
|
|
527
527
|
eventKey: a
|
|
528
528
|
} = e, o = Lo(e, Do);
|
|
529
|
-
const [i,
|
|
529
|
+
const [i, l] = xs(Object.assign({
|
|
530
530
|
key: Cn(a, o.href),
|
|
531
531
|
active: s
|
|
532
532
|
}, o));
|
|
533
|
-
return i[Sn("active")] =
|
|
533
|
+
return i[Sn("active")] = l.isActive, /* @__PURE__ */ n.jsx(r, Object.assign({}, o, i, {
|
|
534
534
|
ref: t
|
|
535
535
|
}));
|
|
536
536
|
});
|
|
@@ -554,43 +554,43 @@ const Zn = () => {
|
|
|
554
554
|
activeKey: a,
|
|
555
555
|
role: o,
|
|
556
556
|
onKeyDown: i
|
|
557
|
-
} = e,
|
|
558
|
-
const
|
|
557
|
+
} = e, l = Eo(e, To);
|
|
558
|
+
const c = ua(), d = Z(!1), u = G(vn), m = G(gs);
|
|
559
559
|
let v, f;
|
|
560
560
|
m && (o = o || "tablist", a = m.activeKey, v = m.getControlledId, f = m.getControllerId);
|
|
561
|
-
const g = Z(null), x = (
|
|
562
|
-
const
|
|
563
|
-
if (!
|
|
564
|
-
const j = ha(
|
|
561
|
+
const g = Z(null), x = (b) => {
|
|
562
|
+
const _ = g.current;
|
|
563
|
+
if (!_) return null;
|
|
564
|
+
const j = ha(_, `[${Jn}]:not([aria-disabled=true])`), C = _.querySelector("[aria-selected=true]");
|
|
565
565
|
if (!C || C !== document.activeElement) return null;
|
|
566
566
|
const T = j.indexOf(C);
|
|
567
567
|
if (T === -1) return null;
|
|
568
|
-
let $ = T +
|
|
568
|
+
let $ = T + b;
|
|
569
569
|
return $ >= j.length && ($ = 0), $ < 0 && ($ = j.length - 1), j[$];
|
|
570
|
-
}, p = (
|
|
571
|
-
|
|
572
|
-
}, h = (
|
|
573
|
-
if (i == null || i(
|
|
570
|
+
}, p = (b, _) => {
|
|
571
|
+
b != null && (s == null || s(b, _), u == null || u(b, _));
|
|
572
|
+
}, h = (b) => {
|
|
573
|
+
if (i == null || i(b), !m)
|
|
574
574
|
return;
|
|
575
|
-
let
|
|
576
|
-
switch (
|
|
575
|
+
let _;
|
|
576
|
+
switch (b.key) {
|
|
577
577
|
case "ArrowLeft":
|
|
578
578
|
case "ArrowUp":
|
|
579
|
-
|
|
579
|
+
_ = x(-1);
|
|
580
580
|
break;
|
|
581
581
|
case "ArrowRight":
|
|
582
582
|
case "ArrowDown":
|
|
583
|
-
|
|
583
|
+
_ = x(1);
|
|
584
584
|
break;
|
|
585
585
|
default:
|
|
586
586
|
return;
|
|
587
587
|
}
|
|
588
|
-
|
|
588
|
+
_ && (b.preventDefault(), p(_.dataset[ma("EventKey")] || null, b), d.current = !0, c());
|
|
589
589
|
};
|
|
590
590
|
B(() => {
|
|
591
591
|
if (g.current && d.current) {
|
|
592
|
-
const
|
|
593
|
-
|
|
592
|
+
const b = g.current.querySelector(`[${Jn}][aria-selected=true]`);
|
|
593
|
+
b == null || b.focus();
|
|
594
594
|
}
|
|
595
595
|
d.current = !1;
|
|
596
596
|
});
|
|
@@ -605,7 +605,7 @@ const Zn = () => {
|
|
|
605
605
|
getControlledId: v || Zn,
|
|
606
606
|
getControllerId: f || Zn
|
|
607
607
|
},
|
|
608
|
-
children: /* @__PURE__ */ n.jsx(r, Object.assign({},
|
|
608
|
+
children: /* @__PURE__ */ n.jsx(r, Object.assign({}, l, {
|
|
609
609
|
onKeyDown: h,
|
|
610
610
|
ref: y,
|
|
611
611
|
role: o
|
|
@@ -624,14 +624,14 @@ const Fo = Object.assign(js, {
|
|
|
624
624
|
className: a,
|
|
625
625
|
variant: o,
|
|
626
626
|
action: i,
|
|
627
|
-
as:
|
|
628
|
-
...
|
|
627
|
+
as: l,
|
|
628
|
+
...c
|
|
629
629
|
}, d) => {
|
|
630
630
|
e = he(e, "list-group-item");
|
|
631
631
|
const [u, m] = xs({
|
|
632
|
-
key: Cn(s,
|
|
632
|
+
key: Cn(s, c.href),
|
|
633
633
|
active: t,
|
|
634
|
-
...
|
|
634
|
+
...c
|
|
635
635
|
}), v = qt((g) => {
|
|
636
636
|
if (r) {
|
|
637
637
|
g.preventDefault(), g.stopPropagation();
|
|
@@ -639,11 +639,11 @@ const Fo = Object.assign(js, {
|
|
|
639
639
|
}
|
|
640
640
|
u.onClick(g);
|
|
641
641
|
});
|
|
642
|
-
r &&
|
|
643
|
-
const f =
|
|
644
|
-
return process.env.NODE_ENV !== "production" && Rr(
|
|
642
|
+
r && c.tabIndex === void 0 && (c.tabIndex = -1, c["aria-disabled"] = !0);
|
|
643
|
+
const f = l || (i ? c.href ? "a" : "button" : "div");
|
|
644
|
+
return process.env.NODE_ENV !== "production" && Rr(l || !(!i && c.href), "`action=false` and `href` should not be used together."), /* @__PURE__ */ n.jsx(f, {
|
|
645
645
|
ref: d,
|
|
646
|
-
...
|
|
646
|
+
...c,
|
|
647
647
|
...u,
|
|
648
648
|
onClick: v,
|
|
649
649
|
className: w(a, e, m.isActive && "active", r && "disabled", o && `${e}-${o}`, i && `${e}-action`)
|
|
@@ -658,26 +658,26 @@ const ys = /* @__PURE__ */ ie.forwardRef((e, t) => {
|
|
|
658
658
|
horizontal: o,
|
|
659
659
|
numbered: i,
|
|
660
660
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
661
|
-
as:
|
|
662
|
-
...
|
|
661
|
+
as: l = "div",
|
|
662
|
+
...c
|
|
663
663
|
} = Er(e, {
|
|
664
664
|
activeKey: "onSelect"
|
|
665
665
|
}), d = he(s, "list-group");
|
|
666
666
|
let u;
|
|
667
667
|
return o && (u = o === !0 ? "horizontal" : `horizontal-${o}`), process.env.NODE_ENV !== "production" && Rr(!(o && a === "flush"), '`variant="flush"` and `horizontal` should not be used together.'), /* @__PURE__ */ n.jsx(Fo, {
|
|
668
668
|
ref: t,
|
|
669
|
-
...
|
|
670
|
-
as:
|
|
669
|
+
...c,
|
|
670
|
+
as: l,
|
|
671
671
|
className: w(r, d, a && `${d}-${a}`, u && `${d}-${u}`, i && `${d}-numbered`)
|
|
672
672
|
});
|
|
673
673
|
});
|
|
674
674
|
ys.displayName = "ListGroup";
|
|
675
675
|
const ws = Object.assign(ys, {
|
|
676
676
|
Item: Ft
|
|
677
|
-
}),
|
|
677
|
+
}), bn = /* @__PURE__ */ new WeakMap(), Xn = (e, t) => {
|
|
678
678
|
if (!e || !t) return;
|
|
679
|
-
const r =
|
|
680
|
-
|
|
679
|
+
const r = bn.get(t) || /* @__PURE__ */ new Map();
|
|
680
|
+
bn.set(t, r);
|
|
681
681
|
let s = r.get(e);
|
|
682
682
|
return s || (s = t.matchMedia(e), s.refCount = 0, r.set(s.media, s)), s;
|
|
683
683
|
};
|
|
@@ -687,38 +687,38 @@ function Oo(e, t = typeof window > "u" ? void 0 : window) {
|
|
|
687
687
|
let o = Xn(e, t);
|
|
688
688
|
if (!o)
|
|
689
689
|
return a(!1);
|
|
690
|
-
let i =
|
|
691
|
-
const
|
|
690
|
+
let i = bn.get(t);
|
|
691
|
+
const l = () => {
|
|
692
692
|
a(o.matches);
|
|
693
693
|
};
|
|
694
|
-
return o.refCount++, o.addListener(
|
|
695
|
-
o.removeListener(
|
|
694
|
+
return o.refCount++, o.addListener(l), l(), () => {
|
|
695
|
+
o.removeListener(l), o.refCount--, o.refCount <= 0 && (i == null || i.delete(o.media)), o = void 0;
|
|
696
696
|
};
|
|
697
697
|
}, [e]), s;
|
|
698
698
|
}
|
|
699
699
|
function Ro(e) {
|
|
700
700
|
const t = Object.keys(e);
|
|
701
|
-
function r(
|
|
702
|
-
return
|
|
701
|
+
function r(l, c) {
|
|
702
|
+
return l === c ? c : l ? `${l} and ${c}` : c;
|
|
703
703
|
}
|
|
704
|
-
function s(
|
|
705
|
-
return t[Math.min(t.indexOf(
|
|
704
|
+
function s(l) {
|
|
705
|
+
return t[Math.min(t.indexOf(l) + 1, t.length - 1)];
|
|
706
706
|
}
|
|
707
|
-
function a(
|
|
708
|
-
const
|
|
709
|
-
let d = e[
|
|
707
|
+
function a(l) {
|
|
708
|
+
const c = s(l);
|
|
709
|
+
let d = e[c];
|
|
710
710
|
return typeof d == "number" ? d = `${d - 0.2}px` : d = `calc(${d} - 0.2px)`, `(max-width: ${d})`;
|
|
711
711
|
}
|
|
712
|
-
function o(
|
|
713
|
-
let
|
|
714
|
-
return typeof
|
|
712
|
+
function o(l) {
|
|
713
|
+
let c = e[l];
|
|
714
|
+
return typeof c == "number" && (c = `${c}px`), `(min-width: ${c})`;
|
|
715
715
|
}
|
|
716
|
-
function i(
|
|
716
|
+
function i(l, c, d) {
|
|
717
717
|
let u;
|
|
718
|
-
typeof
|
|
719
|
-
[
|
|
718
|
+
typeof l == "object" ? (u = l, d = c, c = !0) : (c = c || !0, u = {
|
|
719
|
+
[l]: c
|
|
720
720
|
});
|
|
721
|
-
let m =
|
|
721
|
+
let m = U(() => Object.entries(u).reduce((v, [f, g]) => ((g === "up" || g === !0) && (v = r(v, o(f))), (g === "down" || g === !0) && (v = r(v, a(f))), v), ""), [JSON.stringify(u)]);
|
|
722
722
|
return Oo(m, d);
|
|
723
723
|
}
|
|
724
724
|
return i;
|
|
@@ -730,7 +730,7 @@ const Mo = Ro({
|
|
|
730
730
|
lg: 992,
|
|
731
731
|
xl: 1200,
|
|
732
732
|
xxl: 1400
|
|
733
|
-
}),
|
|
733
|
+
}), bs = /* @__PURE__ */ ie.forwardRef(({
|
|
734
734
|
className: e,
|
|
735
735
|
bsPrefix: t,
|
|
736
736
|
as: r = "div",
|
|
@@ -740,11 +740,11 @@ const Mo = Ro({
|
|
|
740
740
|
className: w(e, t),
|
|
741
741
|
...s
|
|
742
742
|
})));
|
|
743
|
-
|
|
743
|
+
bs.displayName = "OffcanvasBody";
|
|
744
744
|
const Ao = {
|
|
745
745
|
[kn]: "show",
|
|
746
746
|
[Tr]: "show"
|
|
747
|
-
},
|
|
747
|
+
}, _s = /* @__PURE__ */ ie.forwardRef(({
|
|
748
748
|
bsPrefix: e,
|
|
749
749
|
className: t,
|
|
750
750
|
children: r,
|
|
@@ -752,22 +752,22 @@ const Ao = {
|
|
|
752
752
|
mountOnEnter: a = !1,
|
|
753
753
|
unmountOnExit: o = !1,
|
|
754
754
|
appear: i = !1,
|
|
755
|
-
...
|
|
756
|
-
},
|
|
757
|
-
ref:
|
|
755
|
+
...l
|
|
756
|
+
}, c) => (e = he(e, "offcanvas"), /* @__PURE__ */ n.jsx($r, {
|
|
757
|
+
ref: c,
|
|
758
758
|
addEndListener: Dr,
|
|
759
759
|
in: s,
|
|
760
760
|
mountOnEnter: a,
|
|
761
761
|
unmountOnExit: o,
|
|
762
762
|
appear: i,
|
|
763
|
-
...
|
|
763
|
+
...l,
|
|
764
764
|
childRef: r.ref,
|
|
765
765
|
children: (d, u) => /* @__PURE__ */ ie.cloneElement(r, {
|
|
766
766
|
...u,
|
|
767
767
|
className: w(t, r.props.className, (d === kn || d === Lr) && `${e}-toggling`, Ao[d])
|
|
768
768
|
})
|
|
769
769
|
})));
|
|
770
|
-
|
|
770
|
+
_s.displayName = "OffcanvasToggling";
|
|
771
771
|
const Ns = /* @__PURE__ */ ie.forwardRef(({
|
|
772
772
|
bsPrefix: e,
|
|
773
773
|
className: t,
|
|
@@ -794,7 +794,7 @@ const Bo = Kt("h5"), ks = /* @__PURE__ */ ie.forwardRef(({
|
|
|
794
794
|
})));
|
|
795
795
|
ks.displayName = "OffcanvasTitle";
|
|
796
796
|
function Vo(e) {
|
|
797
|
-
return /* @__PURE__ */ n.jsx(
|
|
797
|
+
return /* @__PURE__ */ n.jsx(_s, {
|
|
798
798
|
...e
|
|
799
799
|
});
|
|
800
800
|
}
|
|
@@ -812,8 +812,8 @@ const Ss = /* @__PURE__ */ ie.forwardRef(({
|
|
|
812
812
|
responsive: o,
|
|
813
813
|
/* BaseModal props */
|
|
814
814
|
show: i = !1,
|
|
815
|
-
backdrop:
|
|
816
|
-
keyboard:
|
|
815
|
+
backdrop: l = !0,
|
|
816
|
+
keyboard: c = !0,
|
|
817
817
|
scroll: d = !1,
|
|
818
818
|
onEscapeKeyDown: u,
|
|
819
819
|
onShow: m,
|
|
@@ -824,8 +824,8 @@ const Ss = /* @__PURE__ */ ie.forwardRef(({
|
|
|
824
824
|
restoreFocus: p = !0,
|
|
825
825
|
restoreFocusOptions: h,
|
|
826
826
|
onEntered: y,
|
|
827
|
-
onExit:
|
|
828
|
-
onExiting:
|
|
827
|
+
onExit: b,
|
|
828
|
+
onExiting: _,
|
|
829
829
|
onEnter: j,
|
|
830
830
|
onEntering: C,
|
|
831
831
|
onExited: T,
|
|
@@ -840,10 +840,10 @@ const Ss = /* @__PURE__ */ ie.forwardRef(({
|
|
|
840
840
|
B(() => {
|
|
841
841
|
O(o ? i && !D : i);
|
|
842
842
|
}, [i, o, D]);
|
|
843
|
-
const H =
|
|
843
|
+
const H = U(() => ({
|
|
844
844
|
onHide: N
|
|
845
845
|
}), [N]);
|
|
846
|
-
function
|
|
846
|
+
function Y() {
|
|
847
847
|
return R || (d ? (k.current || (k.current = new ja({
|
|
848
848
|
handleContainerOverflow: !1
|
|
849
849
|
})), k.current) : ya());
|
|
@@ -868,9 +868,9 @@ const Ss = /* @__PURE__ */ ie.forwardRef(({
|
|
|
868
868
|
children: /* @__PURE__ */ n.jsx(va, {
|
|
869
869
|
show: Q,
|
|
870
870
|
ref: P,
|
|
871
|
-
backdrop:
|
|
871
|
+
backdrop: l,
|
|
872
872
|
container: f,
|
|
873
|
-
keyboard:
|
|
873
|
+
keyboard: c,
|
|
874
874
|
autoFocus: g,
|
|
875
875
|
enforceFocus: x && !d,
|
|
876
876
|
restoreFocus: p,
|
|
@@ -881,10 +881,10 @@ const Ss = /* @__PURE__ */ ie.forwardRef(({
|
|
|
881
881
|
onEnter: X,
|
|
882
882
|
onEntering: C,
|
|
883
883
|
onEntered: y,
|
|
884
|
-
onExit:
|
|
885
|
-
onExiting:
|
|
884
|
+
onExit: b,
|
|
885
|
+
onExiting: _,
|
|
886
886
|
onExited: z,
|
|
887
|
-
manager:
|
|
887
|
+
manager: Y(),
|
|
888
888
|
transition: Vo,
|
|
889
889
|
backdropTransition: Po,
|
|
890
890
|
renderBackdrop: J,
|
|
@@ -895,7 +895,7 @@ const Ss = /* @__PURE__ */ ie.forwardRef(({
|
|
|
895
895
|
});
|
|
896
896
|
Ss.displayName = "Offcanvas";
|
|
897
897
|
const er = Object.assign(Ss, {
|
|
898
|
-
Body:
|
|
898
|
+
Body: bs,
|
|
899
899
|
Header: Ns,
|
|
900
900
|
Title: ks
|
|
901
901
|
});
|
|
@@ -948,13 +948,13 @@ const Ge = Object.assign($s, {
|
|
|
948
948
|
as: a = "div",
|
|
949
949
|
className: o,
|
|
950
950
|
...i
|
|
951
|
-
},
|
|
951
|
+
}, l) => {
|
|
952
952
|
e = he(e, "spinner");
|
|
953
|
-
const
|
|
953
|
+
const c = `${e}-${r}`;
|
|
954
954
|
return /* @__PURE__ */ n.jsx(a, {
|
|
955
|
-
ref:
|
|
955
|
+
ref: l,
|
|
956
956
|
...i,
|
|
957
|
-
className: w(o,
|
|
957
|
+
className: w(o, c, s && `${c}-${s}`, t && `text-${t}`)
|
|
958
958
|
});
|
|
959
959
|
});
|
|
960
960
|
Fn.displayName = "Spinner";
|
|
@@ -966,53 +966,53 @@ const zo = /* @__PURE__ */ ie.forwardRef(({
|
|
|
966
966
|
borderless: a,
|
|
967
967
|
hover: o,
|
|
968
968
|
size: i,
|
|
969
|
-
variant:
|
|
970
|
-
responsive:
|
|
969
|
+
variant: l,
|
|
970
|
+
responsive: c,
|
|
971
971
|
...d
|
|
972
972
|
}, u) => {
|
|
973
|
-
const m = he(e, "table"), v = w(t, m,
|
|
973
|
+
const m = he(e, "table"), v = w(t, m, l && `${m}-${l}`, i && `${m}-${i}`, r && `${m}-${typeof r == "string" ? `striped-${r}` : "striped"}`, s && `${m}-bordered`, a && `${m}-borderless`, o && `${m}-hover`), f = /* @__PURE__ */ n.jsx("table", {
|
|
974
974
|
...d,
|
|
975
975
|
className: v,
|
|
976
976
|
ref: u
|
|
977
977
|
});
|
|
978
|
-
if (
|
|
978
|
+
if (c) {
|
|
979
979
|
let g = `${m}-responsive`;
|
|
980
|
-
return typeof
|
|
980
|
+
return typeof c == "string" && (g = `${g}-${c}`), /* @__PURE__ */ n.jsx("div", {
|
|
981
981
|
className: g,
|
|
982
982
|
children: f
|
|
983
983
|
});
|
|
984
984
|
}
|
|
985
985
|
return f;
|
|
986
986
|
}), Wo = ({ children: e, onStorno: t, noSpacer: r }) => {
|
|
987
|
-
const { texts: { formSubmit: s } } =
|
|
987
|
+
const { texts: { formSubmit: s } } = G(oe);
|
|
988
988
|
return /* @__PURE__ */ n.jsxs(Jc, { noSpacer: r, children: [
|
|
989
989
|
/* @__PURE__ */ n.jsxs(zt, { as: "button", color: "primary", size: "lg", type: "submit", children: [
|
|
990
|
-
/* @__PURE__ */ n.jsx(
|
|
990
|
+
/* @__PURE__ */ n.jsx(ba, {}),
|
|
991
991
|
e
|
|
992
992
|
] }),
|
|
993
993
|
t && /* @__PURE__ */ n.jsxs(zt, { as: "button", color: "secondary", variant: "outlined", size: "lg", onClick: t, children: [
|
|
994
|
-
/* @__PURE__ */ n.jsx(
|
|
994
|
+
/* @__PURE__ */ n.jsx(_a, {}),
|
|
995
995
|
s.storno
|
|
996
996
|
] })
|
|
997
997
|
] });
|
|
998
|
-
}, Ds = ({ color: e = "primary", icon: t = /* @__PURE__ */ n.jsx(Mr, { size: 12 }), inputId: r = "context-file-input", accept: s = "*", onUpload: a, className: o, children: i, multiple:
|
|
998
|
+
}, Ds = ({ color: e = "primary", icon: t = /* @__PURE__ */ n.jsx(Mr, { size: 12 }), inputId: r = "context-file-input", accept: s = "*", onUpload: a, className: o, children: i, multiple: l, ...c }) => {
|
|
999
999
|
const d = (u) => {
|
|
1000
1000
|
u.target.files && (a(u.target.files), u.target.value = "");
|
|
1001
1001
|
};
|
|
1002
1002
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1003
|
-
/* @__PURE__ */ n.jsxs("label", { htmlFor: r, className: w(`luminus-context-button btn text-${e} ${o ?? ""}`, Na.button), ...
|
|
1003
|
+
/* @__PURE__ */ n.jsxs("label", { htmlFor: r, className: w(`luminus-context-button btn text-${e} ${o ?? ""}`, Na.button), ...c, children: [
|
|
1004
1004
|
t,
|
|
1005
1005
|
i
|
|
1006
1006
|
] }),
|
|
1007
|
-
/* @__PURE__ */ n.jsx("input", { id: r, type: "file", accept: s, onChange: d, hidden: !0, multiple:
|
|
1007
|
+
/* @__PURE__ */ n.jsx("input", { id: r, type: "file", accept: s, onChange: d, hidden: !0, multiple: l })
|
|
1008
1008
|
] });
|
|
1009
1009
|
}, uu = ({ onUpload: e, accept: t, children: r, className: s, size: a = "md" }) => {
|
|
1010
|
-
const o = S(async (
|
|
1011
|
-
if (
|
|
1010
|
+
const o = S(async (l) => {
|
|
1011
|
+
if (l.target.files)
|
|
1012
1012
|
try {
|
|
1013
|
-
await e(
|
|
1013
|
+
await e(l.target.files);
|
|
1014
1014
|
} finally {
|
|
1015
|
-
|
|
1015
|
+
l.target.value = "";
|
|
1016
1016
|
}
|
|
1017
1017
|
}, [e]), i = to();
|
|
1018
1018
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
@@ -1022,15 +1022,15 @@ const zo = /* @__PURE__ */ ie.forwardRef(({
|
|
|
1022
1022
|
}, Ho = "_select_dlv1t_1", cn = {
|
|
1023
1023
|
select: Ho
|
|
1024
1024
|
}, Uo = ({ month: e, onChangeMonth: t, locale: r, yearMin: s = 2e3, yearMax: a = 2050 }) => {
|
|
1025
|
-
const o = S((
|
|
1026
|
-
const d = Xr(e,
|
|
1025
|
+
const o = S((c) => {
|
|
1026
|
+
const d = Xr(e, c);
|
|
1027
1027
|
d.getFullYear() < s || d.getFullYear() > a || t(d);
|
|
1028
|
-
}, [e, t, s, a]), i =
|
|
1029
|
-
const
|
|
1028
|
+
}, [e, t, s, a]), i = U(() => {
|
|
1029
|
+
const c = [];
|
|
1030
1030
|
for (let d = s; d <= a; d++)
|
|
1031
|
-
|
|
1032
|
-
return
|
|
1033
|
-
}, [s, a]),
|
|
1031
|
+
c.push(d);
|
|
1032
|
+
return c;
|
|
1033
|
+
}, [s, a]), l = U(() => {
|
|
1034
1034
|
const u = [];
|
|
1035
1035
|
for (let m = 0; m <= 11; m++)
|
|
1036
1036
|
u.push({
|
|
@@ -1041,51 +1041,51 @@ const zo = /* @__PURE__ */ ie.forwardRef(({
|
|
|
1041
1041
|
}, [r]);
|
|
1042
1042
|
return /* @__PURE__ */ n.jsxs("div", { className: "card d-flex flex-row align-items-center m-0 p-1 gap-2", children: [
|
|
1043
1043
|
/* @__PURE__ */ n.jsx(te, { onClick: () => o(-1), disabled: e.getFullYear() < s || e.getFullYear() === s && e.getMonth() <= 0, children: /* @__PURE__ */ n.jsx(In, {}) }),
|
|
1044
|
-
/* @__PURE__ */ n.jsx(ge.Select, { value: e.getMonth(), onChange: (
|
|
1044
|
+
/* @__PURE__ */ n.jsx(ge.Select, { value: e.getMonth(), onChange: (c) => {
|
|
1045
1045
|
var d;
|
|
1046
|
-
return ((d =
|
|
1047
|
-
}, className: w(cn.select, cn.month), children:
|
|
1048
|
-
/* @__PURE__ */ n.jsx(ge.Select, { value: e.getFullYear(), onChange: (
|
|
1046
|
+
return ((d = c.target) == null ? void 0 : d.value) && t(wo(e, Number(c.target.value)));
|
|
1047
|
+
}, className: w(cn.select, cn.month), children: l.map((c) => /* @__PURE__ */ n.jsx("option", { value: c.id, children: c.name }, c.id)) }),
|
|
1048
|
+
/* @__PURE__ */ n.jsx(ge.Select, { value: e.getFullYear(), onChange: (c) => {
|
|
1049
1049
|
var d;
|
|
1050
|
-
return ((d =
|
|
1051
|
-
}, className: w(cn.select), children: i.map((
|
|
1050
|
+
return ((d = c.target) == null ? void 0 : d.value) && t(wn(e, Number(c.target.value)));
|
|
1051
|
+
}, className: w(cn.select), children: i.map((c) => /* @__PURE__ */ n.jsx("option", { value: c, children: c }, c)) }),
|
|
1052
1052
|
/* @__PURE__ */ n.jsx(te, { onClick: () => o(1), disabled: e.getFullYear() > a || e.getFullYear() === a && e.getMonth() >= 11, children: /* @__PURE__ */ n.jsx($n, {}) })
|
|
1053
1053
|
] });
|
|
1054
1054
|
}, Go = "_select_pywmr_1", Yo = {
|
|
1055
1055
|
select: Go
|
|
1056
1056
|
}, tr = 2e3, nr = 2050, Ko = ({ year: e, onChangeYear: t, className: r, ...s }) => {
|
|
1057
|
-
const a =
|
|
1058
|
-
var
|
|
1059
|
-
return s.manualOptions ? ((
|
|
1060
|
-
}, [s]), o =
|
|
1061
|
-
var
|
|
1062
|
-
return s.manualOptions ? ((
|
|
1063
|
-
}, [s]), i =
|
|
1057
|
+
const a = U(() => {
|
|
1058
|
+
var c;
|
|
1059
|
+
return s.manualOptions ? ((c = s.options) == null ? void 0 : c.at(0)) ?? tr : s.optionMin ?? tr;
|
|
1060
|
+
}, [s]), o = U(() => {
|
|
1061
|
+
var c;
|
|
1062
|
+
return s.manualOptions ? ((c = s.options) == null ? void 0 : c.at(-1)) ?? nr : s.optionMax ?? nr;
|
|
1063
|
+
}, [s]), i = U(() => {
|
|
1064
1064
|
if (s.manualOptions)
|
|
1065
1065
|
return s.options;
|
|
1066
|
-
const
|
|
1066
|
+
const c = [];
|
|
1067
1067
|
for (let d = a; d <= o; d++)
|
|
1068
|
-
|
|
1069
|
-
return
|
|
1070
|
-
}, [s, o, a]),
|
|
1068
|
+
c.push(d);
|
|
1069
|
+
return c;
|
|
1070
|
+
}, [s, o, a]), l = S((c) => {
|
|
1071
1071
|
if (s.manualOptions) {
|
|
1072
1072
|
const d = i.findIndex((u) => u === e.getFullYear());
|
|
1073
1073
|
if (d !== -1) {
|
|
1074
|
-
const u = i.at(d +
|
|
1074
|
+
const u = i.at(d + c) ?? null;
|
|
1075
1075
|
u && t(wn(e, u));
|
|
1076
1076
|
}
|
|
1077
1077
|
} else {
|
|
1078
|
-
const d = e.getFullYear() +
|
|
1079
|
-
d >= a && d <= o && t(go(e,
|
|
1078
|
+
const d = e.getFullYear() + c;
|
|
1079
|
+
d >= a && d <= o && t(go(e, c));
|
|
1080
1080
|
}
|
|
1081
1081
|
}, [e, t, o, a, s, i]);
|
|
1082
1082
|
return /* @__PURE__ */ n.jsxs("div", { className: w("card d-flex flex-row align-items-center m-0 p-1 gap-2", r ?? ""), children: [
|
|
1083
|
-
/* @__PURE__ */ n.jsx(te, { onClick: () =>
|
|
1084
|
-
/* @__PURE__ */ n.jsx(ge.Select, { value: e.getFullYear(), onChange: (
|
|
1083
|
+
/* @__PURE__ */ n.jsx(te, { onClick: () => l(-1), disabled: e.getFullYear() <= a, children: /* @__PURE__ */ n.jsx(In, {}) }),
|
|
1084
|
+
/* @__PURE__ */ n.jsx(ge.Select, { value: e.getFullYear(), onChange: (c) => {
|
|
1085
1085
|
var d;
|
|
1086
|
-
return ((d =
|
|
1087
|
-
}, className: Yo.select, children: i.map((
|
|
1088
|
-
/* @__PURE__ */ n.jsx(te, { onClick: () =>
|
|
1086
|
+
return ((d = c.target) == null ? void 0 : d.value) && t(wn(e, Number(c.target.value)));
|
|
1087
|
+
}, className: Yo.select, children: i.map((c) => /* @__PURE__ */ n.jsx("option", { value: c, children: c }, c)) }),
|
|
1088
|
+
/* @__PURE__ */ n.jsx(te, { onClick: () => l(1), disabled: e.getFullYear() >= o, children: /* @__PURE__ */ n.jsx($n, {}) })
|
|
1089
1089
|
] });
|
|
1090
1090
|
};
|
|
1091
1091
|
class qo extends no {
|
|
@@ -1129,28 +1129,28 @@ class qo extends no {
|
|
|
1129
1129
|
}
|
|
1130
1130
|
}
|
|
1131
1131
|
const Qo = (e) => (r) => {
|
|
1132
|
-
const { texts: { errorBoundary: s } } =
|
|
1132
|
+
const { texts: { errorBoundary: s } } = G(oe);
|
|
1133
1133
|
return /* @__PURE__ */ n.jsx(e, { texts: s, ...r });
|
|
1134
1134
|
}, Zo = Qo(qo), Jo = "_widget-card_e9tsb_1", Xo = {
|
|
1135
1135
|
"widget-card": "_widget-card_e9tsb_1",
|
|
1136
1136
|
widgetCard: Jo
|
|
1137
1137
|
}, rr = ({ children: e, title: t, headerContent: r }) => /* @__PURE__ */ n.jsx(zs, { className: w(Xo.widgetCard, "luminus-widget"), title: t, headerContent: r, contentClassName: "h-100 overflow-auto", children: e }), ei = ({ children: e, title: t }) => {
|
|
1138
|
-
const { texts: { widget: r } } =
|
|
1138
|
+
const { texts: { widget: r } } = G(oe), s = qr();
|
|
1139
1139
|
return /* @__PURE__ */ n.jsx(Zo, { fallback: /* @__PURE__ */ n.jsx(rr, { title: t, children: r.fallbackError }), reloadButtonDisplay: "inject-to-child", navigateBack: () => s(-1), children: /* @__PURE__ */ n.jsx(ro, { fallback: /* @__PURE__ */ n.jsx(rr, { title: t, children: /* @__PURE__ */ n.jsx(po, {}) }), children: e }) });
|
|
1140
1140
|
}, Ls = ({ currentSelection: e, selectedItemNavigateTo: t, children: r }) => {
|
|
1141
1141
|
if (!e || !e.id || !t)
|
|
1142
1142
|
return /* @__PURE__ */ n.jsx("div", { className: "luminus-input-container position-relative w-100", children: r });
|
|
1143
1143
|
const s = t(e);
|
|
1144
1144
|
return /* @__PURE__ */ n.jsx(Oe, { to: s, className: "luminus-input-container position-relative w-100 text-decoration-none", children: r });
|
|
1145
|
-
}, ti = ({ InputContainer: e = it, label: t, value: r, onChange: s, hidden: a, disabled: o, className: i, type:
|
|
1145
|
+
}, ti = ({ InputContainer: e = it, label: t, value: r, onChange: s, hidden: a, disabled: o, className: i, type: l, withoutLabel: c, indeterminate: d, hint: u }) => {
|
|
1146
1146
|
const m = Z(null);
|
|
1147
1147
|
return B(() => {
|
|
1148
1148
|
m.current && (m.current.indeterminate = d ?? !1);
|
|
1149
|
-
}, [m, d]), /* @__PURE__ */ n.jsx(e, { isForCheckInput: !0, hidden: a, label: t ?? "", withoutLabel:
|
|
1149
|
+
}, [m, d]), /* @__PURE__ */ n.jsx(e, { isForCheckInput: !0, hidden: a, label: t ?? "", withoutLabel: c, className: i, hint: u, children: /* @__PURE__ */ n.jsx(ge.Check, { ref: m, id: `check-${t}`, type: l ?? "checkbox", label: t ?? "", checked: r, onChange: (v) => {
|
|
1150
1150
|
var f;
|
|
1151
1151
|
s && s(((f = v.target) == null ? void 0 : f.checked) ?? !1);
|
|
1152
1152
|
}, className: i ?? "", hidden: a ?? !1, disabled: o ?? !1 }) });
|
|
1153
|
-
}, Qe = ({ InputContainer: e = it, type: t, value: r, onChange: s, debounceMs: a, label: o, withoutLabel: i, placeholder:
|
|
1153
|
+
}, Qe = ({ InputContainer: e = it, type: t, value: r, onChange: s, debounceMs: a, label: o, withoutLabel: i, placeholder: l, size: c, hidden: d, disabled: u, showClearIcon: m, clearValue: v, list: f, className: g, step: x, minLength: p, maxLength: h, noSelectOnFocus: y, hint: b, onConfirm: _ }) => {
|
|
1154
1154
|
const j = t === "number", C = S(() => {
|
|
1155
1155
|
if (!s)
|
|
1156
1156
|
return;
|
|
@@ -1169,18 +1169,18 @@ const Qo = (e) => (r) => {
|
|
|
1169
1169
|
R(D), T.current !== null && window.clearTimeout(T.current), T.current = window.setTimeout(() => {
|
|
1170
1170
|
A(D);
|
|
1171
1171
|
}, a);
|
|
1172
|
-
}, [a, A]), P =
|
|
1173
|
-
if (
|
|
1172
|
+
}, [a, A]), P = U(() => {
|
|
1173
|
+
if (_ !== void 0)
|
|
1174
1174
|
return (N) => {
|
|
1175
|
-
N.key === "Enter" &&
|
|
1175
|
+
N.key === "Enter" && _ && _();
|
|
1176
1176
|
};
|
|
1177
|
-
}, [
|
|
1177
|
+
}, [_]);
|
|
1178
1178
|
B(() => {
|
|
1179
1179
|
R(r === null ? "" : r.toString());
|
|
1180
1180
|
}, [r]);
|
|
1181
1181
|
const [k, Q] = E(!1), O = ka(t, r ? r.toString() ?? null : null, k);
|
|
1182
|
-
return /* @__PURE__ */ n.jsxs(e, { withoutLabel: i, label: o ?? "", hidden: d, className: g, hint:
|
|
1183
|
-
/* @__PURE__ */ n.jsx(ge.Control, { type: O, placeholder:
|
|
1182
|
+
return /* @__PURE__ */ n.jsxs(e, { withoutLabel: i, label: o ?? "", hidden: d, className: g, hint: b, children: [
|
|
1183
|
+
/* @__PURE__ */ n.jsx(ge.Control, { type: O, placeholder: l ?? o, size: c, value: a ? $ : (r == null ? void 0 : r.toString()) ?? "", onChange: L, className: g ?? "", hidden: d, disabled: u ?? !1, list: f, onFocus: (N) => {
|
|
1184
1184
|
Q(!0), !y && N.target.select();
|
|
1185
1185
|
}, onBlur: () => Q(!1), onKeyDown: P, step: x, minLength: p, maxLength: h }),
|
|
1186
1186
|
m && r !== null && s && !u && /* @__PURE__ */ n.jsx("div", { className: `luminus-input-remove-icon ${t !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ n.jsx(te, { color: "secondary", size: "sm", onClick: C, children: /* @__PURE__ */ n.jsx(ze, {}) }) })
|
|
@@ -1193,8 +1193,8 @@ const Qo = (e) => (r) => {
|
|
|
1193
1193
|
label: a,
|
|
1194
1194
|
withoutLabel: o,
|
|
1195
1195
|
isNumber: i,
|
|
1196
|
-
size:
|
|
1197
|
-
hidden:
|
|
1196
|
+
size: l,
|
|
1197
|
+
hidden: c,
|
|
1198
1198
|
disabled: d,
|
|
1199
1199
|
noSortOptions: u,
|
|
1200
1200
|
className: m,
|
|
@@ -1207,12 +1207,12 @@ const Qo = (e) => (r) => {
|
|
|
1207
1207
|
addNewOptionPath: h,
|
|
1208
1208
|
refreshOptions: y
|
|
1209
1209
|
}) => {
|
|
1210
|
-
const { texts: { customSelect:
|
|
1210
|
+
const { texts: { customSelect: b } } = G(oe), [_, j] = E(!1), [C, T] = E(""), $ = S((O) => {
|
|
1211
1211
|
T(O);
|
|
1212
|
-
}, []), R =
|
|
1212
|
+
}, []), R = U(() => r.find((O) => O.id === t) ?? null, [r, t]), A = S((O) => {
|
|
1213
1213
|
var N;
|
|
1214
1214
|
return O === null ? "" : !O.name || O.name.length === 0 ? ((N = O.id) == null ? void 0 : N.toString()) ?? "" : v ? `${O.name} (${O.id})` : O.name;
|
|
1215
|
-
}, [v]), L =
|
|
1215
|
+
}, [v]), L = U(() => {
|
|
1216
1216
|
const O = r ?? [];
|
|
1217
1217
|
return g !== void 0 && t !== void 0 && t !== null && (O.some((N) => N.id === t) || O.push({ id: t, name: g })), O.map((N) => ({
|
|
1218
1218
|
id: N.id,
|
|
@@ -1224,30 +1224,30 @@ const Qo = (e) => (r) => {
|
|
|
1224
1224
|
}, [s, i]), k = S((O) => {
|
|
1225
1225
|
j(!1), P(O);
|
|
1226
1226
|
}, [P]), Q = Z(null);
|
|
1227
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden:
|
|
1228
|
-
/* @__PURE__ */ n.jsxs(ge.Select, { ref: Q, size:
|
|
1227
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: c, inputContainerClassName: w({ "luminus-dropdown-select-open": _ }), className: m, hint: p, children: [
|
|
1228
|
+
/* @__PURE__ */ n.jsxs(ge.Select, { ref: Q, size: l, value: t ?? "", onMouseDown: (O) => {
|
|
1229
1229
|
O.currentTarget.focus(), O.preventDefault();
|
|
1230
1230
|
}, onClick: () => {
|
|
1231
1231
|
!d && j(!0);
|
|
1232
1232
|
}, onChange: () => {
|
|
1233
1233
|
}, className: w("w-100", {
|
|
1234
1234
|
"luminus-dropdown-picker-disabled": d
|
|
1235
|
-
}), hidden:
|
|
1235
|
+
}), hidden: c, children: [
|
|
1236
1236
|
f && !(t == null || t === "") ? void 0 : /* @__PURE__ */ n.jsx("option", { value: "" }),
|
|
1237
1237
|
t != null && /* @__PURE__ */ n.jsx("option", { value: t, children: A(R) })
|
|
1238
1238
|
] }),
|
|
1239
|
-
Q.current && /* @__PURE__ */ n.jsx(tn, { show:
|
|
1239
|
+
Q.current && /* @__PURE__ */ n.jsx(tn, { show: _, onCancel: () => j(!1), items: L, currentSelection: R ?? null, onSelectionChange: k, onSearchQueryChange: $, texts: b, disabled: d, inputRef: Q, autoHideSearch: !0, allItemsLength: r.length, itemsNameWidth: x, addNewOptionPath: h, refreshOptions: y })
|
|
1240
1240
|
] }) });
|
|
1241
|
-
}, fu = ({ InputContainer: e = it, items: t, selectedItemNavigateTo: r, onSearchQueryChange: s, texts: a, isLoading: o, value: i, onSelect:
|
|
1241
|
+
}, fu = ({ InputContainer: e = it, items: t, selectedItemNavigateTo: r, onSearchQueryChange: s, texts: a, isLoading: o, value: i, onSelect: l, label: c, withoutLabel: d, size: u, dropdownItemsNameWidth: m, additionalColumns: v, hidden: f, disabled: g, displayIdAsName: x, CustomOnChangeComponent: p, className: h, archiveColumn: y, icon: b, hint: _, addNewOptionPath: j, refreshOptions: C }) => {
|
|
1242
1242
|
const [T, $] = E(!1), R = S((O) => {
|
|
1243
|
-
|
|
1244
|
-
}, [
|
|
1243
|
+
l && l(O);
|
|
1244
|
+
}, [l]), A = S((O) => {
|
|
1245
1245
|
$(!1), R(O);
|
|
1246
|
-
}, [R]), L = Z(null), P = r !== void 0, k = P && i !== null, Q =
|
|
1246
|
+
}, [R]), L = Z(null), P = r !== void 0, k = P && i !== null, Q = U(() => {
|
|
1247
1247
|
var O, N;
|
|
1248
1248
|
return x ? ((O = i == null ? void 0 : i.id) == null ? void 0 : O.toString()) ?? "" : i != null && i.name && i.name.length > 0 ? i.name : ((N = i == null ? void 0 : i.id) == null ? void 0 : N.toString()) ?? "";
|
|
1249
1249
|
}, [i, x]);
|
|
1250
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: d, label:
|
|
1250
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { withoutLabel: d, label: c ?? "", hidden: f, inputContainerClassName: w({ "luminus-dropdown-select-open": T }), className: h, hint: _, children: [
|
|
1251
1251
|
/* @__PURE__ */ n.jsxs(Ls, { currentSelection: i, selectedItemNavigateTo: r, children: [
|
|
1252
1252
|
x && (i == null ? void 0 : i.name) && /* @__PURE__ */ n.jsx(K, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: i.name }),
|
|
1253
1253
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -1278,47 +1278,47 @@ const Qo = (e) => (r) => {
|
|
|
1278
1278
|
p || !g && P ? /* @__PURE__ */ n.jsxs("div", { className: "custom-picker-button", children: [
|
|
1279
1279
|
!p && !g && P && /* @__PURE__ */ n.jsx(te, { size: "sm", color: "secondary", onClick: (O) => {
|
|
1280
1280
|
O.preventDefault(), O.stopPropagation(), $(!0);
|
|
1281
|
-
}, children:
|
|
1281
|
+
}, children: b ?? /* @__PURE__ */ n.jsx(Ar, {}) }),
|
|
1282
1282
|
p ?? null
|
|
1283
1283
|
] }) : null
|
|
1284
1284
|
] }),
|
|
1285
1285
|
L.current && /* @__PURE__ */ n.jsx(tn, { show: T, onCancel: () => $(!1), items: t, currentSelection: i, onSelectionChange: A, onSearchQueryChange: s, texts: a, itemsNameWidth: m, additionalColumns: v, isLoading: o, disabled: g, inputRef: L, archiveColumn: y, displayIdAsName: x, addNewOptionPath: j, refreshOptions: C })
|
|
1286
1286
|
] }) });
|
|
1287
|
-
}, mu = ({ InputContainer: e = it, value: t, onChange: r, label: s, size: a, showClearIcon: o, clearValue: i, hidden:
|
|
1287
|
+
}, mu = ({ InputContainer: e = it, value: t, onChange: r, label: s, size: a, showClearIcon: o, clearValue: i, hidden: l, disabled: c, rows: d, withoutLabel: u, debounceMs: m, minLength: v, maxLength: f, className: g, hint: x }) => {
|
|
1288
1288
|
const p = S(() => {
|
|
1289
1289
|
if (!r)
|
|
1290
1290
|
return;
|
|
1291
1291
|
const C = i ?? null;
|
|
1292
1292
|
r((C == null ? void 0 : C.toString()) ?? "");
|
|
1293
|
-
}, [i, r]), h = Z(null), [y,
|
|
1293
|
+
}, [i, r]), h = Z(null), [y, b] = E((t == null ? void 0 : t.toString()) ?? ""), _ = S((C) => {
|
|
1294
1294
|
const T = C;
|
|
1295
1295
|
r && r(T || null);
|
|
1296
1296
|
}, [r]), j = S((C) => {
|
|
1297
1297
|
var $;
|
|
1298
1298
|
const T = ($ = C.target) == null ? void 0 : $.value;
|
|
1299
1299
|
if (!m) {
|
|
1300
|
-
|
|
1300
|
+
_(T);
|
|
1301
1301
|
return;
|
|
1302
1302
|
}
|
|
1303
|
-
|
|
1304
|
-
|
|
1303
|
+
b(T), h.current !== null && window.clearTimeout(h.current), h.current = window.setTimeout(() => {
|
|
1304
|
+
_(T);
|
|
1305
1305
|
}, m);
|
|
1306
|
-
}, [m,
|
|
1306
|
+
}, [m, _]);
|
|
1307
1307
|
return B(() => {
|
|
1308
|
-
|
|
1309
|
-
}, [t]), /* @__PURE__ */ n.jsxs(e, { label: s ?? "", hidden:
|
|
1310
|
-
/* @__PURE__ */ n.jsx(ge.Control, { as: "textarea", size: a, value: m ? y : t ?? "", onChange: j, hidden:
|
|
1311
|
-
o && t && r && !
|
|
1308
|
+
b(t === null ? "" : t.toString());
|
|
1309
|
+
}, [t]), /* @__PURE__ */ n.jsxs(e, { label: s ?? "", hidden: l, withoutLabel: u, className: g, isForTextAreaInput: !0, hint: x, children: [
|
|
1310
|
+
/* @__PURE__ */ n.jsx(ge.Control, { as: "textarea", size: a, value: m ? y : t ?? "", onChange: j, hidden: l, disabled: c, rows: d ?? 2, className: "w-100", minLength: v, maxLength: f }),
|
|
1311
|
+
o && t && r && !c && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(te, { color: "secondary", size: "sm", onClick: p, children: /* @__PURE__ */ n.jsx(ze, {}) }) })
|
|
1312
1312
|
] });
|
|
1313
|
-
}, hu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size:
|
|
1313
|
+
}, hu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size: l, hidden: c, disabled: d, showClearIcon: u, clearValue: m, className: v, step: f, stepperStep: g = 1, min: x, max: p, hint: h }) => {
|
|
1314
1314
|
const y = S(() => {
|
|
1315
1315
|
if (!r)
|
|
1316
1316
|
return;
|
|
1317
1317
|
const $ = m ?? null;
|
|
1318
1318
|
r($ ? Number($) : null);
|
|
1319
|
-
}, [m, r]),
|
|
1319
|
+
}, [m, r]), b = Z(null), [_, j] = E((t == null ? void 0 : t.toString()) ?? ""), C = S(($) => {
|
|
1320
1320
|
const R = $;
|
|
1321
|
-
r && r(R == null || R === "" ? null :
|
|
1321
|
+
r && r(R == null || R === "" ? null : _t(Number(R), x, p));
|
|
1322
1322
|
}, [p, x, r]), T = S(($) => {
|
|
1323
1323
|
var A;
|
|
1324
1324
|
const R = (A = $.target) == null ? void 0 : A.value;
|
|
@@ -1326,14 +1326,14 @@ const Qo = (e) => (r) => {
|
|
|
1326
1326
|
C(R);
|
|
1327
1327
|
return;
|
|
1328
1328
|
}
|
|
1329
|
-
j(
|
|
1329
|
+
j(_t(Number(R), x, p).toString()), b.current !== null && window.clearTimeout(b.current), b.current = window.setTimeout(() => {
|
|
1330
1330
|
C(R);
|
|
1331
1331
|
}, s);
|
|
1332
1332
|
}, [s, C, p, x]);
|
|
1333
1333
|
return B(() => {
|
|
1334
|
-
j(t === null ? "" :
|
|
1335
|
-
}, [p, x, t]), /* @__PURE__ */ n.jsx(e, { withoutLabel: o, label: a ?? "", hidden:
|
|
1336
|
-
/* @__PURE__ */ n.jsx(ge.Control, { type: "number", placeholder: i ?? a, size:
|
|
1334
|
+
j(t === null ? "" : _t(t, x, p).toString());
|
|
1335
|
+
}, [p, x, t]), /* @__PURE__ */ n.jsx(e, { withoutLabel: o, label: a ?? "", hidden: c, hint: h, className: v, children: /* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
1336
|
+
/* @__PURE__ */ n.jsx(ge.Control, { type: "number", placeholder: i ?? a, size: l, value: s ? _ : t ?? "", onChange: T, className: `luminus-numeric-stepper ${v ?? ""}`, hidden: c, disabled: d ?? !1, step: f }),
|
|
1337
1337
|
/* @__PURE__ */ n.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ n.jsx(te, { size: "sm", onClick: ($) => {
|
|
1338
1338
|
$.preventDefault(), $.stopPropagation(), C(((t ?? 0) - g).toString());
|
|
1339
1339
|
}, children: /* @__PURE__ */ n.jsx(Br, {}) }) }),
|
|
@@ -1441,17 +1441,17 @@ function Rs(e) {
|
|
|
1441
1441
|
if (o = Number(o), !o)
|
|
1442
1442
|
return r + a;
|
|
1443
1443
|
a = a.replace(".", "");
|
|
1444
|
-
var i = 1 + o,
|
|
1445
|
-
return i < 0 ? a = "0." + sr("0", Math.abs(i)) + a : i >=
|
|
1444
|
+
var i = 1 + o, l = a.length;
|
|
1445
|
+
return i < 0 ? a = "0." + sr("0", Math.abs(i)) + a : i >= l ? a = a + sr("0", i - l) : a = (a.substring(0, i) || "0") + "." + a.substring(i), r + a;
|
|
1446
1446
|
}
|
|
1447
1447
|
function ar(e, t, r) {
|
|
1448
1448
|
if (["", "-"].indexOf(e) !== -1)
|
|
1449
1449
|
return e;
|
|
1450
|
-
var s = (e.indexOf(".") !== -1 || r) && t, a = On(e), o = a.beforeDecimal, i = a.afterDecimal,
|
|
1450
|
+
var s = (e.indexOf(".") !== -1 || r) && t, a = On(e), o = a.beforeDecimal, i = a.afterDecimal, l = a.hasNegation, c = parseFloat("0." + (i || "0")), d = i.length <= t ? "0." + i : c.toFixed(t), u = d.split("."), m = o;
|
|
1451
1451
|
o && Number(u[0]) && (m = o.split("").reverse().reduce(function(x, p, h) {
|
|
1452
1452
|
return x.length > h ? (Number(x[0]) + Number(p)).toString() + x.substring(1, x.length) : p + x;
|
|
1453
1453
|
}, u[0]));
|
|
1454
|
-
var v = Os(u[1] || "", t, r), f =
|
|
1454
|
+
var v = Os(u[1] || "", t, r), f = l ? "-" : "", g = s ? "." : "";
|
|
1455
1455
|
return "" + f + m + g + v;
|
|
1456
1456
|
}
|
|
1457
1457
|
function ot(e, t) {
|
|
@@ -1507,10 +1507,10 @@ function fi(e) {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
function mi(e, t, r, s, a, o, i) {
|
|
1509
1509
|
i === void 0 && (i = fi);
|
|
1510
|
-
var
|
|
1511
|
-
return
|
|
1512
|
-
}),
|
|
1513
|
-
!t && !r.startsWith(
|
|
1510
|
+
var l = a.findIndex(function(_) {
|
|
1511
|
+
return _;
|
|
1512
|
+
}), c = e.slice(0, l);
|
|
1513
|
+
!t && !r.startsWith(c) && (t = c, r = c + r, s = s + c.length);
|
|
1514
1514
|
for (var d = r.length, u = e.length, m = {}, v = new Array(d), f = 0; f < d; f++) {
|
|
1515
1515
|
v[f] = -1;
|
|
1516
1516
|
for (var g = 0, x = u; g < x; g++) {
|
|
@@ -1532,8 +1532,8 @@ function mi(e, t, r, s, a, o, i) {
|
|
|
1532
1532
|
var y = h === d || v[h] === -1 ? u : v[h];
|
|
1533
1533
|
for (h = s - 1; h > 0 && v[h] === -1; )
|
|
1534
1534
|
h--;
|
|
1535
|
-
var
|
|
1536
|
-
return
|
|
1535
|
+
var b = h === -1 || v[h] === -1 ? 0 : v[h] + 1;
|
|
1536
|
+
return b > y ? y : s - b < y - s ? b : y;
|
|
1537
1537
|
}
|
|
1538
1538
|
function or(e, t, r, s) {
|
|
1539
1539
|
var a = e.length;
|
|
@@ -1560,19 +1560,19 @@ function As(e, t, r, s, a, o) {
|
|
|
1560
1560
|
var i = oi(function(g, x) {
|
|
1561
1561
|
var p, h;
|
|
1562
1562
|
return Es(g) ? (h = "", p = "") : typeof g == "number" || x ? (h = typeof g == "number" ? Rs(g) : g, p = s(h)) : (h = a(g, void 0), p = s(h)), { formattedValue: p, numAsString: h };
|
|
1563
|
-
}),
|
|
1563
|
+
}), l = E(function() {
|
|
1564
1564
|
return i(ft(e) ? t : e, r);
|
|
1565
|
-
}),
|
|
1566
|
-
g.formattedValue !==
|
|
1565
|
+
}), c = l[0], d = l[1], u = function(g, x) {
|
|
1566
|
+
g.formattedValue !== c.formattedValue && d({
|
|
1567
1567
|
formattedValue: g.formattedValue,
|
|
1568
1568
|
numAsString: g.value
|
|
1569
1569
|
}), o(g, x);
|
|
1570
1570
|
}, m = e, v = r;
|
|
1571
|
-
ft(e) && (m =
|
|
1571
|
+
ft(e) && (m = c.numAsString, v = !0);
|
|
1572
1572
|
var f = i(m, v);
|
|
1573
|
-
return
|
|
1573
|
+
return U(function() {
|
|
1574
1574
|
d(f);
|
|
1575
|
-
}, [f.formattedValue]), [
|
|
1575
|
+
}, [f.formattedValue]), [c, u];
|
|
1576
1576
|
}
|
|
1577
1577
|
function pi(e) {
|
|
1578
1578
|
return e.replace(/[^0-9]/g, "");
|
|
@@ -1587,9 +1587,9 @@ function xi(e) {
|
|
|
1587
1587
|
r === void 0 && (r = "input");
|
|
1588
1588
|
var s = e.customInput, a = e.renderText, o = e.getInputRef, i = e.format;
|
|
1589
1589
|
i === void 0 && (i = gi);
|
|
1590
|
-
var
|
|
1591
|
-
|
|
1592
|
-
var
|
|
1590
|
+
var l = e.removeFormatting;
|
|
1591
|
+
l === void 0 && (l = pi);
|
|
1592
|
+
var c = e.defaultValue, d = e.valueIsNumericString, u = e.onValueChange, m = e.isAllowed, v = e.onChange;
|
|
1593
1593
|
v === void 0 && (v = Ye);
|
|
1594
1594
|
var f = e.onKeyDown;
|
|
1595
1595
|
f === void 0 && (f = Ye);
|
|
@@ -1601,9 +1601,9 @@ function xi(e) {
|
|
|
1601
1601
|
p === void 0 && (p = Ye);
|
|
1602
1602
|
var h = e.value, y = e.getCaretBoundary;
|
|
1603
1603
|
y === void 0 && (y = hi);
|
|
1604
|
-
var
|
|
1605
|
-
|
|
1606
|
-
var
|
|
1604
|
+
var b = e.isValidInputCharacter;
|
|
1605
|
+
b === void 0 && (b = Dt);
|
|
1606
|
+
var _ = e.isCharacterSame, j = Ts(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), C = As(h, c, !!d, i, l, u), T = C[0], $ = T.formattedValue, R = T.numAsString, A = C[1], L = Z(), P = Z({ formattedValue: $, numAsString: R }), k = function(I, M) {
|
|
1607
1607
|
P.current = { formattedValue: I.formattedValue, numAsString: I.value }, A(I, M);
|
|
1608
1608
|
}, Q = E(!1), O = Q[0], N = Q[1], D = Z(null), H = Z({
|
|
1609
1609
|
setCaretTimeout: null,
|
|
@@ -1614,7 +1614,7 @@ function xi(e) {
|
|
|
1614
1614
|
clearTimeout(H.current.setCaretTimeout), clearTimeout(H.current.focusTimeout);
|
|
1615
1615
|
};
|
|
1616
1616
|
}, []);
|
|
1617
|
-
var
|
|
1617
|
+
var Y = i, X = function(I, M) {
|
|
1618
1618
|
var W = parseFloat(M);
|
|
1619
1619
|
return {
|
|
1620
1620
|
formattedValue: I,
|
|
@@ -1628,7 +1628,7 @@ function xi(e) {
|
|
|
1628
1628
|
}, J = function(I, M, W) {
|
|
1629
1629
|
return or(I, M, y(I), W);
|
|
1630
1630
|
}, ne = function(I, M, W) {
|
|
1631
|
-
var le = y(M), ve = mi(M, $, I, W, le,
|
|
1631
|
+
var le = y(M), ve = mi(M, $, I, W, le, b, _);
|
|
1632
1632
|
return ve = or(M, ve, le), ve;
|
|
1633
1633
|
}, re = function(I) {
|
|
1634
1634
|
var M = I.formattedValue;
|
|
@@ -1656,8 +1656,8 @@ function xi(e) {
|
|
|
1656
1656
|
}
|
|
1657
1657
|
}, [$]);
|
|
1658
1658
|
var ee = function(I, M, W) {
|
|
1659
|
-
var le = M.target, ve = L.current ? li(L.current, le.selectionEnd) : Ms($, I), ce = Object.assign(Object.assign({}, ve), { lastValue: $ }), de =
|
|
1660
|
-
if (de =
|
|
1659
|
+
var le = M.target, ve = L.current ? li(L.current, le.selectionEnd) : Ms($, I), ce = Object.assign(Object.assign({}, ve), { lastValue: $ }), de = l(I, ce), Ie = Y(de);
|
|
1660
|
+
if (de = l(Ie, void 0), m && !m(X(Ie, de))) {
|
|
1661
1661
|
var Te = M.target, Ee = dn(Te), dt = ne(I, $, Ee);
|
|
1662
1662
|
return Te.value = $, z(Te, dt, $), !1;
|
|
1663
1663
|
}
|
|
@@ -1673,7 +1673,7 @@ function xi(e) {
|
|
|
1673
1673
|
M === void 0 && (M = 0);
|
|
1674
1674
|
var W = I.selectionStart, le = I.selectionEnd;
|
|
1675
1675
|
L.current = { selectionStart: W, selectionEnd: le + M };
|
|
1676
|
-
},
|
|
1676
|
+
}, _e = function(I) {
|
|
1677
1677
|
var M = I.target, W = M.value, le = ee(W, I, $t.event);
|
|
1678
1678
|
le && v(I), L.current = void 0;
|
|
1679
1679
|
}, Le = function(I) {
|
|
@@ -1692,7 +1692,7 @@ function xi(e) {
|
|
|
1692
1692
|
if (Te) {
|
|
1693
1693
|
var dt = W === "ArrowLeft" ? "left" : "right";
|
|
1694
1694
|
Ee = J(ce, de, dt), Ee !== de && I.preventDefault();
|
|
1695
|
-
} else W === "Delete" && !
|
|
1695
|
+
} else W === "Delete" && !b(ce[de]) ? Ee = J(ce, de, "right") : W === "Backspace" && !b(ce[de]) && (Ee = J(ce, de, "left"));
|
|
1696
1696
|
Ee !== de && z(M, Ee, ce), f(I), ae(M, Ie);
|
|
1697
1697
|
}, We = function(I) {
|
|
1698
1698
|
var M = I.target, W = function() {
|
|
@@ -1714,16 +1714,16 @@ function xi(e) {
|
|
|
1714
1714
|
var de = J(ce, le);
|
|
1715
1715
|
de !== le && !(le === 0 && ve === ce.length) && z(M, de, ce), x(Object.assign(Object.assign({}, I), { currentTarget: W }));
|
|
1716
1716
|
}, 0);
|
|
1717
|
-
},
|
|
1717
|
+
}, be = function(I) {
|
|
1718
1718
|
D.current = null, clearTimeout(H.current.focusTimeout), clearTimeout(H.current.setCaretTimeout), p(I);
|
|
1719
1719
|
}, Ne = O && di() ? "numeric" : void 0, et = Object.assign({ inputMode: Ne }, j, {
|
|
1720
1720
|
type: t,
|
|
1721
1721
|
value: $,
|
|
1722
|
-
onChange:
|
|
1722
|
+
onChange: _e,
|
|
1723
1723
|
onKeyDown: Le,
|
|
1724
1724
|
onMouseUp: We,
|
|
1725
1725
|
onFocus: se,
|
|
1726
|
-
onBlur:
|
|
1726
|
+
onBlur: be
|
|
1727
1727
|
});
|
|
1728
1728
|
if (r === "text")
|
|
1729
1729
|
return a ? ke.createElement(ke.Fragment, null, a($, j) || null) : ke.createElement("span", Object.assign({}, j, { ref: o }), $);
|
|
@@ -1738,11 +1738,11 @@ function ir(e, t) {
|
|
|
1738
1738
|
a === void 0 && (a = "");
|
|
1739
1739
|
var o = t.suffix;
|
|
1740
1740
|
o === void 0 && (o = "");
|
|
1741
|
-
var i = t.allowNegative,
|
|
1742
|
-
if (
|
|
1741
|
+
var i = t.allowNegative, l = t.thousandsGroupStyle;
|
|
1742
|
+
if (l === void 0 && (l = "thousand"), e === "" || e === "-")
|
|
1743
1743
|
return e;
|
|
1744
|
-
var
|
|
1745
|
-
return r !== void 0 && (g = Os(g, r, !!s)), d && (f = ai(f, d,
|
|
1744
|
+
var c = Xt(t), d = c.thousandSeparator, u = c.decimalSeparator, m = r !== 0 && e.indexOf(".") !== -1 || r && s, v = On(e, i), f = v.beforeDecimal, g = v.afterDecimal, x = v.addNegation;
|
|
1745
|
+
return r !== void 0 && (g = Os(g, r, !!s)), d && (f = ai(f, d, l)), a && (f = a + f), o && (g = g + o), x && (f = "-" + f), e = f + (m && u || "") + g, e;
|
|
1746
1746
|
}
|
|
1747
1747
|
function Xt(e) {
|
|
1748
1748
|
var t = e.decimalSeparator;
|
|
@@ -1772,34 +1772,34 @@ function wi(e, t, r) {
|
|
|
1772
1772
|
o === void 0 && (o = "");
|
|
1773
1773
|
var i = r.suffix;
|
|
1774
1774
|
i === void 0 && (i = "");
|
|
1775
|
-
var
|
|
1775
|
+
var l = r.decimalScale, c = t.from, d = t.to, u = d.start, m = d.end, v = Xt(r), f = v.allowedDecimalSeparators, g = v.decimalSeparator, x = e[m] === g;
|
|
1776
1776
|
if (Dt(e) && (e === o || e === i) && t.lastValue === "")
|
|
1777
1777
|
return e;
|
|
1778
1778
|
if (m - u === 1 && f.indexOf(e[u]) !== -1) {
|
|
1779
|
-
var p =
|
|
1779
|
+
var p = l === 0 ? "" : g;
|
|
1780
1780
|
e = e.substring(0, u) + p + e.substring(u + 1, e.length);
|
|
1781
1781
|
}
|
|
1782
|
-
var h = function(D, H,
|
|
1782
|
+
var h = function(D, H, Y) {
|
|
1783
1783
|
var X = !1, z = !1;
|
|
1784
1784
|
o.startsWith("-") ? X = !1 : D.startsWith("--") ? (X = !1, z = !0) : i.startsWith("-") && D.length === i.length ? X = !1 : D[0] === "-" && (X = !0);
|
|
1785
1785
|
var J = X ? 1 : 0;
|
|
1786
|
-
return z && (J = 2), J && (D = D.substring(J), H -= J,
|
|
1787
|
-
}, y = h(e, u, m),
|
|
1786
|
+
return z && (J = 2), J && (D = D.substring(J), H -= J, Y -= J), { value: D, start: H, end: Y, hasNegation: X };
|
|
1787
|
+
}, y = h(e, u, m), b = y.hasNegation;
|
|
1788
1788
|
s = y, e = s.value, u = s.start, m = s.end;
|
|
1789
|
-
var
|
|
1789
|
+
var _ = h(t.lastValue, c.start, c.end), j = _.start, C = _.end, T = _.value, $ = e.substring(u, m);
|
|
1790
1790
|
e.length && T.length && (j > T.length - i.length || C < o.length) && !($ && i.startsWith($)) && (e = T);
|
|
1791
1791
|
var R = 0;
|
|
1792
1792
|
e.startsWith(o) ? R += o.length : u < o.length && (R = u), e = e.substring(R), m -= R;
|
|
1793
1793
|
var A = e.length, L = e.length - i.length;
|
|
1794
|
-
e.endsWith(i) ? A = L : (m > L || m > e.length - i.length) && (A = m), e = e.substring(0, A), e = vi(
|
|
1794
|
+
e.endsWith(i) ? A = L : (m > L || m > e.length - i.length) && (A = m), e = e.substring(0, A), e = vi(b ? "-" + e : e, a), e = (e.match(ji(g)) || []).join("");
|
|
1795
1795
|
var P = e.indexOf(g);
|
|
1796
1796
|
e = e.replace(new RegExp(Fs(g), "g"), function(D, H) {
|
|
1797
1797
|
return H === P ? "." : "";
|
|
1798
1798
|
});
|
|
1799
1799
|
var k = On(e, a), Q = k.beforeDecimal, O = k.afterDecimal, N = k.addNegation;
|
|
1800
|
-
return d.end - d.start <
|
|
1800
|
+
return d.end - d.start < c.end - c.start && Q === "" && x && !parseFloat(O) && (e = N ? "-" : ""), e;
|
|
1801
1801
|
}
|
|
1802
|
-
function
|
|
1802
|
+
function bi(e, t) {
|
|
1803
1803
|
var r = t.prefix;
|
|
1804
1804
|
r === void 0 && (r = "");
|
|
1805
1805
|
var s = t.suffix;
|
|
@@ -1811,7 +1811,7 @@ function _i(e, t) {
|
|
|
1811
1811
|
var i = e.length;
|
|
1812
1812
|
return a.fill(!1, i - s.length + 1, i + 1), a;
|
|
1813
1813
|
}
|
|
1814
|
-
function
|
|
1814
|
+
function _i(e) {
|
|
1815
1815
|
var t = Xt(e), r = t.thousandSeparator, s = t.decimalSeparator, a = e.prefix;
|
|
1816
1816
|
a === void 0 && (a = "");
|
|
1817
1817
|
var o = e.allowNegative;
|
|
@@ -1828,37 +1828,37 @@ function bi(e) {
|
|
|
1828
1828
|
`), o = !1), Object.assign(Object.assign({}, e), { allowNegative: o });
|
|
1829
1829
|
}
|
|
1830
1830
|
function Ni(e) {
|
|
1831
|
-
e =
|
|
1831
|
+
e = _i(e), e.decimalSeparator, e.allowedDecimalSeparators, e.thousandsGroupStyle;
|
|
1832
1832
|
var t = e.suffix, r = e.allowNegative, s = e.allowLeadingZeros, a = e.onKeyDown;
|
|
1833
1833
|
a === void 0 && (a = Ye);
|
|
1834
1834
|
var o = e.onBlur;
|
|
1835
1835
|
o === void 0 && (o = Ye);
|
|
1836
|
-
var i = e.thousandSeparator,
|
|
1836
|
+
var i = e.thousandSeparator, l = e.decimalScale, c = e.fixedDecimalScale, d = e.prefix;
|
|
1837
1837
|
d === void 0 && (d = "");
|
|
1838
1838
|
var u = e.defaultValue, m = e.value, v = e.valueIsNumericString, f = e.onValueChange, g = Ts(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), x = Xt(e), p = x.decimalSeparator, h = x.allowedDecimalSeparators, y = function(N) {
|
|
1839
1839
|
return ir(N, e);
|
|
1840
|
-
},
|
|
1840
|
+
}, b = function(N, D) {
|
|
1841
1841
|
return wi(N, D, e);
|
|
1842
|
-
},
|
|
1842
|
+
}, _ = ft(m) ? u : m, j = v ?? yi(_, d, t);
|
|
1843
1843
|
ft(m) ? ft(u) || (j = j || typeof u == "number") : j = j || typeof m == "number";
|
|
1844
1844
|
var C = function(N) {
|
|
1845
|
-
return Es(N) ? N : (typeof N == "number" && (N = Rs(N)), j && typeof
|
|
1846
|
-
}, T = As(C(m), C(u), !!j, y,
|
|
1847
|
-
var D = N.target, H = N.key,
|
|
1845
|
+
return Es(N) ? N : (typeof N == "number" && (N = Rs(N)), j && typeof l == "number" ? ar(N, l, !!c) : N);
|
|
1846
|
+
}, T = As(C(m), C(u), !!j, y, b, f), $ = T[0], R = $.numAsString, A = $.formattedValue, L = T[1], P = function(N) {
|
|
1847
|
+
var D = N.target, H = N.key, Y = D.selectionStart, X = D.selectionEnd, z = D.value;
|
|
1848
1848
|
if (z === void 0 && (z = ""), (H === "Backspace" || H === "Delete") && X < d.length) {
|
|
1849
1849
|
N.preventDefault();
|
|
1850
1850
|
return;
|
|
1851
1851
|
}
|
|
1852
|
-
if (
|
|
1852
|
+
if (Y !== X) {
|
|
1853
1853
|
a(N);
|
|
1854
1854
|
return;
|
|
1855
1855
|
}
|
|
1856
|
-
H === "Backspace" && z[0] === "-" &&
|
|
1856
|
+
H === "Backspace" && z[0] === "-" && Y === d.length + 1 && r && ot(D, 1), l && c && (H === "Backspace" && z[Y - 1] === p ? (ot(D, Y - 1), N.preventDefault()) : H === "Delete" && z[Y] === p && N.preventDefault()), h != null && h.includes(H) && z[Y] === p && ot(D, Y + 1);
|
|
1857
1857
|
var J = i === !0 ? "," : i;
|
|
1858
|
-
H === "Backspace" && z[
|
|
1858
|
+
H === "Backspace" && z[Y - 1] === J && ot(D, Y - 1), H === "Delete" && z[Y] === J && ot(D, Y + 1), a(N);
|
|
1859
1859
|
}, k = function(N) {
|
|
1860
1860
|
var D = R;
|
|
1861
|
-
if (D.match(/\d/g) || (D = ""), s || (D = ii(D)),
|
|
1861
|
+
if (D.match(/\d/g) || (D = ""), s || (D = ii(D)), c && l && (D = ar(D, l, c)), D !== R) {
|
|
1862
1862
|
var H = ir(D, e);
|
|
1863
1863
|
L({
|
|
1864
1864
|
formattedValue: H,
|
|
@@ -1873,10 +1873,10 @@ function Ni(e) {
|
|
|
1873
1873
|
}, Q = function(N) {
|
|
1874
1874
|
return N === p ? !0 : Dt(N);
|
|
1875
1875
|
}, O = function(N) {
|
|
1876
|
-
var D = N.currentValue, H = N.lastValue,
|
|
1877
|
-
return
|
|
1876
|
+
var D = N.currentValue, H = N.lastValue, Y = N.formattedValue, X = N.currentValueIndex, z = N.formattedValueIndex, J = D[X], ne = Y[z], re = Ms(H, D), V = re.to, F = function(ee) {
|
|
1877
|
+
return b(ee).indexOf(".") + d.length;
|
|
1878
1878
|
};
|
|
1879
|
-
return m === 0 &&
|
|
1879
|
+
return m === 0 && c && l && D[V.start] === p && F(D) < X && F(Y) > z ? !1 : X >= V.start && X < V.end && h && h.includes(J) && ne === p ? !0 : J === ne;
|
|
1880
1880
|
};
|
|
1881
1881
|
return Object.assign(Object.assign({}, g), {
|
|
1882
1882
|
value: A,
|
|
@@ -1885,9 +1885,9 @@ function Ni(e) {
|
|
|
1885
1885
|
isCharacterSame: O,
|
|
1886
1886
|
onValueChange: L,
|
|
1887
1887
|
format: y,
|
|
1888
|
-
removeFormatting:
|
|
1888
|
+
removeFormatting: b,
|
|
1889
1889
|
getCaretBoundary: function(N) {
|
|
1890
|
-
return
|
|
1890
|
+
return bi(N, e);
|
|
1891
1891
|
},
|
|
1892
1892
|
onKeyDown: P,
|
|
1893
1893
|
onBlur: k
|
|
@@ -1897,7 +1897,7 @@ function Rn(e) {
|
|
|
1897
1897
|
var t = Ni(e);
|
|
1898
1898
|
return ke.createElement(xi, Object.assign({}, t));
|
|
1899
1899
|
}
|
|
1900
|
-
const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size:
|
|
1900
|
+
const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, label: a, withoutLabel: o, placeholder: i, size: l, hidden: c, disabled: d, showClearIcon: u, clearValue: m, className: v, step: f, noSelectOnFocus: g, decimalScale: x, numberPrefix: p, numberSuffix: h, min: y, max: b, hint: _ }) => {
|
|
1901
1901
|
const j = S(() => {
|
|
1902
1902
|
if (!r)
|
|
1903
1903
|
return;
|
|
@@ -1919,87 +1919,87 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
1919
1919
|
}, [s, R]);
|
|
1920
1920
|
return B(() => {
|
|
1921
1921
|
$(t === null ? "" : t.toString());
|
|
1922
|
-
}, [
|
|
1923
|
-
|
|
1924
|
-
}, [T,
|
|
1925
|
-
!r || t === null || (
|
|
1926
|
-
}, [t,
|
|
1922
|
+
}, [b, y, t]), B(() => {
|
|
1923
|
+
b !== void 0 && Number(T) > b && $(b.toString()), y !== void 0 && Number(T) < y && $(y.toString());
|
|
1924
|
+
}, [T, b, y, $]), B(() => {
|
|
1925
|
+
!r || t === null || (b !== void 0 && t > b && r(b), y !== void 0 && t < y && r(y));
|
|
1926
|
+
}, [t, b, y, r]), /* @__PURE__ */ n.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: c, className: v, hint: _, children: [
|
|
1927
1927
|
/* @__PURE__ */ n.jsx(Rn, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: x, prefix: p, suffix: h, defaultValue: "", value: s ? T : (t == null ? void 0 : t.toString()) ?? "", placeholder: i ?? a, onFocus: (L) => {
|
|
1928
1928
|
!g && L.target.select();
|
|
1929
|
-
}, onChange: A, hidden:
|
|
1930
|
-
[`form-control-${
|
|
1931
|
-
}), step: f, min: y, max:
|
|
1929
|
+
}, onChange: A, hidden: c, disabled: d, className: w("form-control text-end w-100", {
|
|
1930
|
+
[`form-control-${l}`]: l
|
|
1931
|
+
}), step: f, min: y, max: b }),
|
|
1932
1932
|
u && t !== null && r && !d && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(te, { color: "secondary", size: "sm", onClick: j, children: /* @__PURE__ */ n.jsx(ze, {}) }) })
|
|
1933
1933
|
] });
|
|
1934
|
-
}, gu = ({ InputContainer: e = Ae, label: t, options: r, disabled: s, hidden: a, className: o, value: i, onChange:
|
|
1935
|
-
const
|
|
1936
|
-
|
|
1937
|
-
}, [
|
|
1938
|
-
return /* @__PURE__ */ n.jsx(e, { isForRadioInput: !0, hidden: a, withoutLabel: !t, label: `${t}`, className: o, children: r.map((d) => /* @__PURE__ */ n.jsx(ge.Check, { id: `radio-${d.id}`, label: d.name, type: "radio", value: d.id ?? "", checked: i === d.id, onChange:
|
|
1939
|
-
}, xu = ({ InputContainer: e = Ae, formField: t, label: r, resetsFields: s, type: a, required: o, hidden: i, disabled:
|
|
1934
|
+
}, gu = ({ InputContainer: e = Ae, label: t, options: r, disabled: s, hidden: a, className: o, value: i, onChange: l }) => {
|
|
1935
|
+
const c = S((d) => {
|
|
1936
|
+
l && l(d.target.value);
|
|
1937
|
+
}, [l]);
|
|
1938
|
+
return /* @__PURE__ */ n.jsx(e, { isForRadioInput: !0, hidden: a, withoutLabel: !t, label: `${t}`, className: o, children: r.map((d) => /* @__PURE__ */ n.jsx(ge.Check, { id: `radio-${d.id}`, label: d.name, type: "radio", value: d.id ?? "", checked: i === d.id, onChange: c, hidden: a, disabled: s, className: "w-100" }, d.id)) });
|
|
1939
|
+
}, xu = ({ InputContainer: e = Ae, formField: t, label: r, resetsFields: s, type: a, required: o, hidden: i, disabled: l, withoutLabel: c, hint: d, onChange: u, className: m }) => {
|
|
1940
1940
|
const { register: v, formState: f, setValue: g } = Xe(), [x, p] = E(void 0), [h, y] = E(!1);
|
|
1941
1941
|
B(() => {
|
|
1942
|
-
const
|
|
1942
|
+
const _ = t.split(".");
|
|
1943
1943
|
let j = f.errors;
|
|
1944
|
-
|
|
1944
|
+
_.forEach((C) => {
|
|
1945
1945
|
j !== void 0 && (j = j[C]);
|
|
1946
1946
|
}), p(j);
|
|
1947
1947
|
}, [f, t]), B(() => {
|
|
1948
1948
|
f.isSubmitted && y(!0);
|
|
1949
1949
|
}, [f]);
|
|
1950
|
-
const
|
|
1951
|
-
return /* @__PURE__ */ n.jsxs(e, { isForCheckInput: !0, hidden: i, label: `${r}${o ? " *" : ""}`, isInvalid:
|
|
1950
|
+
const b = x !== void 0;
|
|
1951
|
+
return /* @__PURE__ */ n.jsxs(e, { isForCheckInput: !0, hidden: i, label: `${r}${o ? " *" : ""}`, isInvalid: b, withoutLabel: c, hint: d, className: m, children: [
|
|
1952
1952
|
/* @__PURE__ */ n.jsx(ge.Check, { id: `check-${t}`, type: a ?? "checkbox", label: `${r}${o ? " *" : ""}`, ...v(t, {
|
|
1953
|
-
onChange: (
|
|
1954
|
-
s && s.forEach((j) => g(j, null, { shouldDirty: !0, shouldValidate: h })), u && u(
|
|
1953
|
+
onChange: (_) => {
|
|
1954
|
+
s && s.forEach((j) => g(j, null, { shouldDirty: !0, shouldValidate: h })), u && u(_.target.value ?? null);
|
|
1955
1955
|
}
|
|
1956
|
-
}), isInvalid:
|
|
1956
|
+
}), isInvalid: b, hidden: i, disabled: l, className: "w-100" }),
|
|
1957
1957
|
x && /* @__PURE__ */ n.jsx(lt, { message: x.message })
|
|
1958
1958
|
] });
|
|
1959
|
-
}, vu = ({ InputContainer: e = Ae, label: t, formField: r, options: s, resetsFields: a, required: o, disabled: i, hidden:
|
|
1960
|
-
const { register: u, formState: m, setValue: v, watch: f } = Xe(), [g, x] = E(void 0), [p, h] = E(!1), y =
|
|
1959
|
+
}, vu = ({ InputContainer: e = Ae, label: t, formField: r, options: s, resetsFields: a, required: o, disabled: i, hidden: l, onChange: c, className: d }) => {
|
|
1960
|
+
const { register: u, formState: m, setValue: v, watch: f } = Xe(), [g, x] = E(void 0), [p, h] = E(!1), y = U(() => s, [s]);
|
|
1961
1961
|
B(() => {
|
|
1962
|
-
const
|
|
1962
|
+
const _ = r.split(".");
|
|
1963
1963
|
let j = m.errors;
|
|
1964
|
-
|
|
1964
|
+
_.forEach((C) => {
|
|
1965
1965
|
j !== void 0 && (j = j[C]);
|
|
1966
1966
|
}), x(j);
|
|
1967
1967
|
}, [m, r]), B(() => {
|
|
1968
1968
|
m.isSubmitted && h(!0);
|
|
1969
1969
|
}, [m]);
|
|
1970
|
-
const
|
|
1971
|
-
return /* @__PURE__ */ n.jsxs(e, { isForRadioInput: !0, hidden:
|
|
1972
|
-
y.map((
|
|
1970
|
+
const b = g !== void 0;
|
|
1971
|
+
return /* @__PURE__ */ n.jsxs(e, { isForRadioInput: !0, hidden: l, withoutLabel: !t, label: `${t}${o ? " *" : ""}`, isInvalid: b, className: d, children: [
|
|
1972
|
+
y.map((_) => /* @__PURE__ */ n.jsx(ge.Check, { id: `radio-${_.id}`, label: _.name, type: "radio", value: _.id ?? "", checked: f(r) === _.id, ...u(r, {
|
|
1973
1973
|
onChange: (j) => {
|
|
1974
1974
|
var C;
|
|
1975
|
-
a && a.forEach((T) => v(T, null, { shouldDirty: !0, shouldValidate: p })),
|
|
1975
|
+
a && a.forEach((T) => v(T, null, { shouldDirty: !0, shouldValidate: p })), c && c((C = j.target) != null && C.value ? j.target.value.toString() : null);
|
|
1976
1976
|
}
|
|
1977
|
-
}), isInvalid:
|
|
1977
|
+
}), isInvalid: b, hidden: l, disabled: i, className: "w-100" }, _.id)),
|
|
1978
1978
|
g && /* @__PURE__ */ n.jsx(lt, { message: g.message })
|
|
1979
1979
|
] });
|
|
1980
|
-
}, ju = ({ InputContainer: e = Ae, formField: t, label: r, size: s, defaultSelection: a, resetsFields: o, isNumber: i, required:
|
|
1981
|
-
const { formState: L, setValue: P, watch: k, control: Q } = Xe(), [O, N] = E(void 0), [D, H] = E(!1), [
|
|
1980
|
+
}, ju = ({ InputContainer: e = Ae, formField: t, label: r, size: s, defaultSelection: a, resetsFields: o, isNumber: i, required: l, hidden: c, disabled: d, items: u, onSearchQueryChange: m, selectedItemNavigateTo: v, texts: f, dropdownItemsNameWidth: g, isLoading: x, withoutLabel: p, additionalColumns: h, CustomOnChangeComponent: y, icon: b, displayIdAsName: _, onSelect: j, className: C, archiveColumn: T, hint: $, addNewOptionPath: R, refreshOptions: A }) => {
|
|
1981
|
+
const { formState: L, setValue: P, watch: k, control: Q } = Xe(), [O, N] = E(void 0), [D, H] = E(!1), [Y, X] = E(!1), z = k(t) ?? null, J = z === (a == null ? void 0 : a.id) ? a == null ? void 0 : a.name : k(`${t}-DropdownName`), ne = U(() => z == null ? null : { id: z ?? null, name: J ?? "" }, [z, J]), re = S(() => {
|
|
1982
1982
|
const se = t.split(".");
|
|
1983
|
-
let
|
|
1983
|
+
let be = L.errors;
|
|
1984
1984
|
se.forEach((Ne) => {
|
|
1985
|
-
|
|
1986
|
-
}), N(
|
|
1985
|
+
be !== void 0 && (be = be[Ne]);
|
|
1986
|
+
}), N(be);
|
|
1987
1987
|
}, [L, t]), V = S((se) => {
|
|
1988
1988
|
if ((se == null ? void 0 : se.id) === z)
|
|
1989
1989
|
return;
|
|
1990
|
-
if (j && j(se), o && o.forEach((Ne) => P(Ne, null, { shouldDirty: !0, shouldValidate:
|
|
1990
|
+
if (j && j(se), o && o.forEach((Ne) => P(Ne, null, { shouldDirty: !0, shouldValidate: Y })), se === null) {
|
|
1991
1991
|
P(t, null, {
|
|
1992
1992
|
shouldDirty: !0,
|
|
1993
|
-
shouldValidate:
|
|
1993
|
+
shouldValidate: Y
|
|
1994
1994
|
}), P(`${t}-DropdownName`, null);
|
|
1995
1995
|
return;
|
|
1996
1996
|
}
|
|
1997
|
-
let
|
|
1998
|
-
i ?
|
|
1997
|
+
let be = null;
|
|
1998
|
+
i ? be = (se == null ? void 0 : se.id) !== null && (se == null ? void 0 : se.id) !== "" ? parseInt(se.id.toString(), 10) : null : be = se.id === null || se.id === void 0 || se.id === "" ? null : se.id, P(t, be, {
|
|
1999
1999
|
shouldDirty: !0,
|
|
2000
|
-
shouldValidate:
|
|
2000
|
+
shouldValidate: Y
|
|
2001
2001
|
}), P(`${t}-DropdownName`, se.name ?? "");
|
|
2002
|
-
}, [P, t,
|
|
2002
|
+
}, [P, t, Y, i, o, z, j]), F = S((se) => {
|
|
2003
2003
|
H(!1), V(se);
|
|
2004
2004
|
}, [V]), ee = S(() => {
|
|
2005
2005
|
H(!1);
|
|
@@ -2009,31 +2009,31 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2009
2009
|
}, [re]), B(() => {
|
|
2010
2010
|
L.isSubmitted && X(!0);
|
|
2011
2011
|
}, [L]);
|
|
2012
|
-
const ae = Z(null),
|
|
2013
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${r}${
|
|
2012
|
+
const ae = Z(null), _e = O !== void 0, Le = v !== void 0, We = Le && ne !== null;
|
|
2013
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${r}${l ? " *" : ""}`, hidden: c, withoutLabel: p, isInvalid: _e, inputContainerClassName: w({ "luminus-dropdown-select-open": D }), hint: $, className: C, children: [
|
|
2014
2014
|
/* @__PURE__ */ n.jsxs(Ls, { currentSelection: ne, selectedItemNavigateTo: v, children: [
|
|
2015
|
-
|
|
2015
|
+
_ && (ne == null ? void 0 : ne.name) && /* @__PURE__ */ n.jsx(K, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: ne.name }),
|
|
2016
2016
|
/* @__PURE__ */ n.jsx(Dn, { control: Q, name: t, render: () => /* @__PURE__ */ n.jsx(ge.Select, { size: s, onMouseDown: (se) => {
|
|
2017
2017
|
se.currentTarget.focus(), se.preventDefault();
|
|
2018
2018
|
}, onClick: () => {
|
|
2019
2019
|
!Le && !d && H(!0);
|
|
2020
2020
|
}, ref: ae, value: z ?? "", onChange: () => {
|
|
2021
|
-
}, isInvalid:
|
|
2021
|
+
}, isInvalid: _e, hidden: c, className: w("w-100", {
|
|
2022
2022
|
"luminus-dropdown-picker-disabled": d,
|
|
2023
2023
|
"luminus-dropdown-picker-link": We
|
|
2024
|
-
}), children: /* @__PURE__ */ n.jsx("option", { value: z, children:
|
|
2024
|
+
}), children: /* @__PURE__ */ n.jsx("option", { value: z, children: _ ? z : (J == null ? void 0 : J.length) > 0 ? J : z }) }) }),
|
|
2025
2025
|
y || !d && Le ? /* @__PURE__ */ n.jsxs("div", { className: "custom-picker-button", children: [
|
|
2026
2026
|
!y && !d && Le && /* @__PURE__ */ n.jsx(te, { size: "sm", color: "secondary", onClick: (se) => {
|
|
2027
2027
|
se.preventDefault(), se.stopPropagation(), H(!0);
|
|
2028
|
-
}, children:
|
|
2028
|
+
}, children: b ?? /* @__PURE__ */ n.jsx(Ar, {}) }),
|
|
2029
2029
|
y ?? null
|
|
2030
2030
|
] }) : null
|
|
2031
2031
|
] }),
|
|
2032
2032
|
O && /* @__PURE__ */ n.jsx(lt, { message: O.message }),
|
|
2033
|
-
ae.current && /* @__PURE__ */ n.jsx(tn, { show: D, onCancel: ee, items: u, currentSelection: ne, onSelectionChange: F, onSearchQueryChange: m, texts: f, itemsNameWidth: g, additionalColumns: h, displayIdAsName:
|
|
2033
|
+
ae.current && /* @__PURE__ */ n.jsx(tn, { show: D, onCancel: ee, items: u, currentSelection: ne, onSelectionChange: F, onSearchQueryChange: m, texts: f, itemsNameWidth: g, additionalColumns: h, displayIdAsName: _, isLoading: x, disabled: d, inputRef: ae, archiveColumn: T, addNewOptionPath: R, refreshOptions: A })
|
|
2034
2034
|
] }) });
|
|
2035
|
-
}, yu = ({ InputContainer: e = Ae, label: t, formField: r, hidden: s, required: a, placeholder: o, disabled: i, showClearIcon:
|
|
2036
|
-
const { watch: g, setValue: x, register: p, formState: h } = Xe(), [y,
|
|
2035
|
+
}, yu = ({ InputContainer: e = Ae, label: t, formField: r, hidden: s, required: a, placeholder: o, disabled: i, showClearIcon: l, resetsFields: c, multiple: d, accept: u, withoutLabel: m, hint: v, className: f }) => {
|
|
2036
|
+
const { watch: g, setValue: x, register: p, formState: h } = Xe(), [y, b] = E(!1), [_, j] = E(void 0), C = S(() => {
|
|
2037
2037
|
x(r, "");
|
|
2038
2038
|
}, [x, r]), T = S(() => {
|
|
2039
2039
|
const R = r.split(".");
|
|
@@ -2043,31 +2043,31 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2043
2043
|
}), j(A);
|
|
2044
2044
|
}, [h, r]);
|
|
2045
2045
|
B(T, [T]), B(() => {
|
|
2046
|
-
h.isSubmitted &&
|
|
2046
|
+
h.isSubmitted && b(!0);
|
|
2047
2047
|
}, [h]);
|
|
2048
|
-
const $ =
|
|
2048
|
+
const $ = _ !== void 0;
|
|
2049
2049
|
return /* @__PURE__ */ n.jsxs(e, { label: `${t}${a ? "*" : ""}`, hidden: s, withoutLabel: m, isInvalid: $, hint: v, className: f, children: [
|
|
2050
2050
|
/* @__PURE__ */ n.jsx(Sa, { type: "file", multiple: d, accept: u.join(", "), placeholder: o ?? t, isInvalid: $, hidden: s, disabled: i, className: "w-100", ...p(r, {
|
|
2051
2051
|
onChange: () => {
|
|
2052
|
-
|
|
2052
|
+
c && c.forEach((R) => x(R, null, { shouldDirty: !0, shouldValidate: y }));
|
|
2053
2053
|
}
|
|
2054
2054
|
}) }),
|
|
2055
|
-
|
|
2056
|
-
|
|
2055
|
+
l && g(r) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(te, { color: "secondary", size: "sm", onClick: C, children: /* @__PURE__ */ n.jsx(ze, {}) }) }),
|
|
2056
|
+
_ && /* @__PURE__ */ n.jsx(lt, { message: _.message })
|
|
2057
2057
|
] });
|
|
2058
2058
|
}, wu = ({ children: e, onStorno: t, noSpacer: r }) => {
|
|
2059
2059
|
const { formState: s } = Xe(), [a, o] = E(!1);
|
|
2060
2060
|
return B(() => {
|
|
2061
2061
|
o(Object.keys(s.dirtyFields).length > 0);
|
|
2062
2062
|
}, [s]), a ? /* @__PURE__ */ n.jsx(Wo, { onStorno: t, noSpacer: r, children: e }) : null;
|
|
2063
|
-
},
|
|
2064
|
-
const { texts: { customSelect:
|
|
2063
|
+
}, bu = ({ InputContainer: e = Ae, options: t, formField: r, label: s, size: a, resetsFields: o, isNumber: i, required: l, hidden: c, disabled: d, withoutLabel: u, noSortOptions: m, suffixIdToName: v, onSelect: f, className: g, appendCurrentSelectionWithName: x, hint: p, addNewOptionPath: h, refreshOptions: y }) => {
|
|
2064
|
+
const { texts: { customSelect: b } } = G(oe), { formState: _, setValue: j, watch: C, control: T } = Xe(), [$, R] = E(void 0), [A, L] = E(!1), [P, k] = E(!1), [Q, O] = E(""), N = C(r), D = U(() => t.find((F) => F.id === N) ?? null, [t, N]), H = S(() => {
|
|
2065
2065
|
const F = r.split(".");
|
|
2066
|
-
let ee =
|
|
2066
|
+
let ee = _.errors;
|
|
2067
2067
|
F.forEach((ae) => {
|
|
2068
2068
|
ee !== void 0 && (ee = ee[ae]);
|
|
2069
2069
|
}), R(ee);
|
|
2070
|
-
}, [
|
|
2070
|
+
}, [_, r]), Y = S((F) => {
|
|
2071
2071
|
if ((F == null ? void 0 : F.id) === N)
|
|
2072
2072
|
return;
|
|
2073
2073
|
if (f && f(F), o && o.forEach((ae) => j(ae, null, { shouldDirty: !0, shouldValidate: P })), F === null) {
|
|
@@ -2083,19 +2083,19 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2083
2083
|
shouldValidate: P
|
|
2084
2084
|
});
|
|
2085
2085
|
}, [j, r, i, o, N, P, f]), X = S((F) => {
|
|
2086
|
-
L(!1),
|
|
2087
|
-
}, [
|
|
2086
|
+
L(!1), Y(F);
|
|
2087
|
+
}, [Y]), z = S((F) => {
|
|
2088
2088
|
O(F);
|
|
2089
2089
|
}, []);
|
|
2090
2090
|
B(() => {
|
|
2091
2091
|
H();
|
|
2092
2092
|
}, [H]), B(() => {
|
|
2093
|
-
|
|
2094
|
-
}, [
|
|
2093
|
+
_.isSubmitted && k(!0);
|
|
2094
|
+
}, [_]);
|
|
2095
2095
|
const J = S((F) => {
|
|
2096
2096
|
var ee;
|
|
2097
2097
|
return F === null ? "" : !F.name || F.name.length === 0 ? ((ee = F.id) == null ? void 0 : ee.toString()) ?? "" : v ? `${F.name} (${F.id})` : F.name;
|
|
2098
|
-
}, [v]), ne =
|
|
2098
|
+
}, [v]), ne = U(() => {
|
|
2099
2099
|
const F = t ?? [];
|
|
2100
2100
|
return x !== void 0 && N && (F.some((ee) => ee.id === N) || F.push({ id: N, name: x })), F.map((ee) => ({
|
|
2101
2101
|
id: ee.id,
|
|
@@ -2109,42 +2109,42 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2109
2109
|
x,
|
|
2110
2110
|
N
|
|
2111
2111
|
]), re = Z(null), V = $ !== void 0;
|
|
2112
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${s}${
|
|
2112
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(e, { label: `${s}${l ? " *" : ""}`, hidden: c, withoutLabel: u, isInvalid: V, inputContainerClassName: w({ "luminus-dropdown-select-open": A }), hint: p, className: g, children: [
|
|
2113
2113
|
/* @__PURE__ */ n.jsx(Dn, { control: T, name: r, render: () => /* @__PURE__ */ n.jsx(ge.Select, { size: a, onMouseDown: (F) => {
|
|
2114
2114
|
F.currentTarget.focus(), F.preventDefault();
|
|
2115
2115
|
}, onClick: () => {
|
|
2116
2116
|
L(!0);
|
|
2117
2117
|
}, ref: re, value: N ?? "", onChange: () => {
|
|
2118
|
-
}, isInvalid: V, hidden:
|
|
2118
|
+
}, isInvalid: V, hidden: c, disabled: d, className: "w-100", children: /* @__PURE__ */ n.jsx("option", { value: (D == null ? void 0 : D.id) ?? "", children: J(D) }) }) }),
|
|
2119
2119
|
$ && /* @__PURE__ */ n.jsx(lt, { message: $.message }),
|
|
2120
|
-
re.current && /* @__PURE__ */ n.jsx(tn, { show: A, onCancel: () => L(!1), items: ne, currentSelection: D ?? null, onSelectionChange: X, onSearchQueryChange: z, texts:
|
|
2120
|
+
re.current && /* @__PURE__ */ n.jsx(tn, { show: A, onCancel: () => L(!1), items: ne, currentSelection: D ?? null, onSelectionChange: X, onSearchQueryChange: z, texts: b, disabled: d, inputRef: re, autoHideSearch: !0, allItemsLength: t.length, addNewOptionPath: h, refreshOptions: y })
|
|
2121
2121
|
] }) });
|
|
2122
|
-
},
|
|
2123
|
-
const { register:
|
|
2124
|
-
j(N,
|
|
2122
|
+
}, _u = ({ InputContainer: e = Ae, formField: t, label: r, placeholder: s, size: a, resetsFields: o, showClearIcon: i, clearValue: l, required: c, hidden: d, disabled: u, withoutLabel: m, step: v, stepperStep: f = 1, className: g, min: x, max: p, onChange: h, hint: y }) => {
|
|
2123
|
+
const { register: b, formState: _, setValue: j, watch: C } = Xe(), [T, $] = E(void 0), [R, A] = E(!1), L = S((N, D, H) => {
|
|
2124
|
+
j(N, _t(D, x, p), H);
|
|
2125
2125
|
}, [p, x, j]), P = S(() => {
|
|
2126
|
-
const N =
|
|
2126
|
+
const N = l ?? null;
|
|
2127
2127
|
L(t, N !== null ? Number(N) : null, {
|
|
2128
2128
|
shouldDirty: !0,
|
|
2129
2129
|
shouldValidate: R
|
|
2130
2130
|
});
|
|
2131
|
-
}, [
|
|
2131
|
+
}, [l, L, t, R]), k = S(() => {
|
|
2132
2132
|
const N = t.split(".");
|
|
2133
|
-
let D =
|
|
2133
|
+
let D = _.errors;
|
|
2134
2134
|
N.forEach((H) => {
|
|
2135
2135
|
D !== void 0 && (D = D[H]);
|
|
2136
2136
|
}), $(D);
|
|
2137
|
-
}, [
|
|
2137
|
+
}, [_, t]);
|
|
2138
2138
|
B(() => {
|
|
2139
2139
|
k();
|
|
2140
2140
|
}, [k]), B(() => {
|
|
2141
|
-
|
|
2142
|
-
}, [
|
|
2141
|
+
_.isSubmitted && A(!0);
|
|
2142
|
+
}, [_]);
|
|
2143
2143
|
const Q = T !== void 0, O = C(t);
|
|
2144
|
-
return /* @__PURE__ */ n.jsxs(e, { label: `${r}${
|
|
2144
|
+
return /* @__PURE__ */ n.jsxs(e, { label: `${r}${c ? " *" : ""}`, hidden: d, withoutLabel: m, isInvalid: Q, hint: y, className: g, children: [
|
|
2145
2145
|
/* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
2146
|
-
/* @__PURE__ */ n.jsx(ge.Control, { type: "number", placeholder: s ?? r, size: a, ...
|
|
2147
|
-
setValueAs: (N) => N == null || N === "" ? null :
|
|
2146
|
+
/* @__PURE__ */ n.jsx(ge.Control, { type: "number", placeholder: s ?? r, size: a, ...b(t, {
|
|
2147
|
+
setValueAs: (N) => N == null || N === "" ? null : _t(Number(N), x, p),
|
|
2148
2148
|
min: x,
|
|
2149
2149
|
max: p,
|
|
2150
2150
|
onChange: (N) => {
|
|
@@ -2162,17 +2162,17 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2162
2162
|
i && C(t) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ n.jsx(te, { color: "secondary", size: "sm", onClick: P, children: /* @__PURE__ */ n.jsx(ze, {}) }) }),
|
|
2163
2163
|
T && /* @__PURE__ */ n.jsx(lt, { message: T.message })
|
|
2164
2164
|
] });
|
|
2165
|
-
}, Nu = ({ InputContainer: e = Ae, formField: t, label: r, placeholder: s, resetsFields: a, showClearIcon: o, clearValue: i, required:
|
|
2165
|
+
}, Nu = ({ InputContainer: e = Ae, formField: t, label: r, placeholder: s, resetsFields: a, showClearIcon: o, clearValue: i, required: l, hidden: c, disabled: d, withoutLabel: u, step: m, size: v, CustomOnChangeComponent: f, noSelectOnFocus: g, className: x, decimalScale: p = 2, numberPrefix: h, numberSuffix: y, min: b, max: _, onChange: j, hint: C }) => {
|
|
2166
2166
|
const { formState: T, setValue: $, watch: R, control: A } = Xe(), [L, P] = E(void 0), [k, Q] = E(!1), O = S(() => {
|
|
2167
|
-
const
|
|
2168
|
-
$(t,
|
|
2167
|
+
const Y = i ?? null;
|
|
2168
|
+
$(t, Y !== null ? Number(Y) : null, {
|
|
2169
2169
|
shouldDirty: !0,
|
|
2170
2170
|
shouldValidate: k
|
|
2171
2171
|
});
|
|
2172
2172
|
}, [i, $, t, k]), N = S(() => {
|
|
2173
|
-
const
|
|
2173
|
+
const Y = t.split(".");
|
|
2174
2174
|
let X = T.errors;
|
|
2175
|
-
|
|
2175
|
+
Y.forEach((z) => {
|
|
2176
2176
|
X !== void 0 && (X = X[z]);
|
|
2177
2177
|
}), P(X);
|
|
2178
2178
|
}, [T, t]);
|
|
@@ -2183,12 +2183,12 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2183
2183
|
}, [T]);
|
|
2184
2184
|
const D = R(t);
|
|
2185
2185
|
B(() => {
|
|
2186
|
-
|
|
2187
|
-
}, [t, D,
|
|
2186
|
+
_ !== void 0 && D > _ && $(t, _), b !== void 0 && D < b && $(t, b);
|
|
2187
|
+
}, [t, D, _, b, $]);
|
|
2188
2188
|
const H = L !== void 0;
|
|
2189
|
-
return /* @__PURE__ */ n.jsxs(e, { label: `${r}${
|
|
2189
|
+
return /* @__PURE__ */ n.jsxs(e, { label: `${r}${l ? " *" : ""}`, hidden: c, withoutLabel: u, isInvalid: H, hint: C, className: x, children: [
|
|
2190
2190
|
/* @__PURE__ */ n.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
2191
|
-
/* @__PURE__ */ n.jsx(Dn, { control: A, name: t, render: ({ field: { ref:
|
|
2191
|
+
/* @__PURE__ */ n.jsx(Dn, { control: A, name: t, render: ({ field: { ref: Y, onChange: X, name: z, value: J } }) => /* @__PURE__ */ n.jsx(Rn, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: p, prefix: h, suffix: y, defaultValue: "", name: z, value: J ?? "", placeholder: s ?? r, onFocus: (ne) => {
|
|
2192
2192
|
!g && ne.target.select();
|
|
2193
2193
|
}, onChange: (ne) => {
|
|
2194
2194
|
var F, ee;
|
|
@@ -2196,24 +2196,24 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2196
2196
|
a && a.forEach((ae) => $(ae, null, { shouldDirty: !0, shouldValidate: k }));
|
|
2197
2197
|
const V = re == null || Number.isNaN(re) ? null : Number(re);
|
|
2198
2198
|
X(V), j && j(V);
|
|
2199
|
-
}, hidden:
|
|
2199
|
+
}, hidden: c, disabled: d, className: w("form-control text-end w-100", {
|
|
2200
2200
|
"is-invalid": H
|
|
2201
2201
|
}, {
|
|
2202
2202
|
[`form-control-${v}`]: v
|
|
2203
|
-
}), step: m, getInputRef:
|
|
2203
|
+
}), step: m, getInputRef: Y, min: b, max: _ }) }),
|
|
2204
2204
|
f && /* @__PURE__ */ n.jsx("div", { className: "custom-picker-button", children: f })
|
|
2205
2205
|
] }),
|
|
2206
2206
|
o && R(t) && /* @__PURE__ */ n.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ n.jsx(te, { color: "secondary", size: "sm", onClick: O, children: /* @__PURE__ */ n.jsx(ze, {}) }) }),
|
|
2207
2207
|
L && /* @__PURE__ */ n.jsx(lt, { message: L.message })
|
|
2208
2208
|
] });
|
|
2209
|
-
}, ku = ({ color: e = "primary", icon: t = /* @__PURE__ */ n.jsx(Mr, { size: 12 }), inputId: r = "context-file-input", accept: s = "*", onUpload: a, multiple: o, className: i, children:
|
|
2209
|
+
}, ku = ({ color: e = "primary", icon: t = /* @__PURE__ */ n.jsx(Mr, { size: 12 }), inputId: r = "context-file-input", accept: s = "*", onUpload: a, multiple: o, className: i, children: l, ...c }) => {
|
|
2210
2210
|
const d = (u) => {
|
|
2211
2211
|
u.target.files && (a(u.target.files), u.target.value = "");
|
|
2212
2212
|
};
|
|
2213
2213
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2214
|
-
/* @__PURE__ */ n.jsxs("label", { htmlFor: r, className: w(`btn luminus-dropdown-item text-nowrap rounded text-${e} ${i ?? ""}`, Ca.item), ...
|
|
2214
|
+
/* @__PURE__ */ n.jsxs("label", { htmlFor: r, className: w(`btn luminus-dropdown-item text-nowrap rounded text-${e} ${i ?? ""}`, Ca.item), ...c, children: [
|
|
2215
2215
|
t,
|
|
2216
|
-
|
|
2216
|
+
l
|
|
2217
2217
|
] }),
|
|
2218
2218
|
/* @__PURE__ */ n.jsx("input", { id: r, type: "file", accept: s, onChange: d, hidden: !0, multiple: o })
|
|
2219
2219
|
] });
|
|
@@ -2241,42 +2241,42 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2241
2241
|
t[r] = (e == null ? void 0 : e[r]) ?? void 0;
|
|
2242
2242
|
}), t;
|
|
2243
2243
|
}, cr = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, dr = (e) => !e.member && !e.isDrillThrough, ur = (e, t) => typeof e == "function" ? e(t) : e.replace(":id", t), $i = ({ dataSource: e, settings: t, pivotRef: r, localization: s, licenseKey: a, hyperlinkColumn: o, enabled: i = !0 }) => {
|
|
2244
|
-
const { texts: { reports:
|
|
2244
|
+
const { texts: { reports: l } } = G(oe), [c, d] = E(!1), u = Z(null), m = r ?? u, v = U(() => ({
|
|
2245
2245
|
localization: s
|
|
2246
2246
|
}), [s]), f = S((h) => {
|
|
2247
2247
|
delete h[0], delete h[1], delete h[2];
|
|
2248
2248
|
const y = [
|
|
2249
2249
|
{
|
|
2250
2250
|
id: "fm-tab-expand",
|
|
2251
|
-
title:
|
|
2251
|
+
title: l.expandAll,
|
|
2252
2252
|
handler: m.current.flexmonster.expandAllData,
|
|
2253
2253
|
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/><path fill="none" d="M0 0h24v24H0V0z"/></svg>'
|
|
2254
2254
|
},
|
|
2255
2255
|
{
|
|
2256
2256
|
id: "fm-tab-collapse",
|
|
2257
|
-
title:
|
|
2257
|
+
title: l.collapseAll,
|
|
2258
2258
|
handler: m.current.flexmonster.collapseAllData,
|
|
2259
2259
|
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>'
|
|
2260
2260
|
}
|
|
2261
2261
|
];
|
|
2262
2262
|
return h.unshift({
|
|
2263
2263
|
id: "fm-tab-expand",
|
|
2264
|
-
title:
|
|
2264
|
+
title: l.expand,
|
|
2265
2265
|
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>',
|
|
2266
2266
|
menu: y,
|
|
2267
2267
|
rightGroup: !0
|
|
2268
2268
|
}), h;
|
|
2269
|
-
}, [m,
|
|
2269
|
+
}, [m, l.collapseAll, l.expand, l.expandAll]), g = (h) => {
|
|
2270
2270
|
const y = h.getTabs();
|
|
2271
2271
|
h.getTabs = () => f(y);
|
|
2272
2272
|
};
|
|
2273
2273
|
B(() => {
|
|
2274
2274
|
var h;
|
|
2275
|
-
|
|
2276
|
-
}, [e, i,
|
|
2277
|
-
var h, y,
|
|
2278
|
-
if (
|
|
2279
|
-
const { options:
|
|
2275
|
+
c && i && ((h = m.current) == null || h.flexmonster.updateData(e), console.log("Updating flexmonster dataSource to: ", e));
|
|
2276
|
+
}, [e, i, c, m]), B(() => {
|
|
2277
|
+
var h, y, b;
|
|
2278
|
+
if (c && i) {
|
|
2279
|
+
const { options: _, conditions: j, formats: C, slice: T, ...$ } = (h = m.current) == null ? void 0 : h.flexmonster.getReport();
|
|
2280
2280
|
if ($ === void 0 || typeof $ == "string")
|
|
2281
2281
|
return;
|
|
2282
2282
|
const R = Ii(t);
|
|
@@ -2286,17 +2286,17 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2286
2286
|
showFieldListSearch: !0
|
|
2287
2287
|
};
|
|
2288
2288
|
const A = { ...$, ...R };
|
|
2289
|
-
(
|
|
2289
|
+
(b = m.current) == null || b.flexmonster.setReport(A), console.log("Refreshing flexmonster settings. New report: ", A);
|
|
2290
2290
|
}
|
|
2291
|
-
}, [i,
|
|
2291
|
+
}, [i, c, m, t]);
|
|
2292
2292
|
const x = S((h, y) => {
|
|
2293
2293
|
var R;
|
|
2294
2294
|
if (!o || !cr(y, o.idColumn) || dr(y))
|
|
2295
2295
|
return;
|
|
2296
|
-
const
|
|
2297
|
-
if (
|
|
2296
|
+
const b = (R = y.escapedLabel) == null ? void 0 : R.toString();
|
|
2297
|
+
if (b === void 0)
|
|
2298
2298
|
return;
|
|
2299
|
-
const
|
|
2299
|
+
const _ = ur(o.url, b), j = "style='color: #00a45a; text-decoration: underline; cursor: pointer;'", C = y.type === "header" ? "onclick='event.stopImmediatePropagation()'" : "", T = y.isDrillThrough || y.type === "header" ? `href='${_}' target='_blank'` : "";
|
|
2300
2300
|
h.style && (h.style["z-index"] = 1);
|
|
2301
2301
|
const $ = `<a ${T} ${j} ${C}>${y.escapedLabel}</a>`;
|
|
2302
2302
|
h.text = $;
|
|
@@ -2324,15 +2324,15 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2324
2324
|
}
|
|
2325
2325
|
) });
|
|
2326
2326
|
}, Di = (e, t, r, s) => {
|
|
2327
|
-
const { texts: { reports: a } } =
|
|
2327
|
+
const { texts: { reports: a } } = G(oe), { prompt: o } = $a(), { confirm: i } = Qt(), l = Ze(), { user: c } = G(Lt), { startLoading: d, stopLoading: u } = G(Tt), { addNotification: m } = Pr(), v = S(async (h) => {
|
|
2328
2328
|
d("report-versionSavingAs");
|
|
2329
2329
|
try {
|
|
2330
|
-
const y = await
|
|
2330
|
+
const y = await l.post("/reports/version", h);
|
|
2331
2331
|
m(a.saveSuccessful, "success"), await s(y.data);
|
|
2332
2332
|
} finally {
|
|
2333
2333
|
u("report-versionSavingAs");
|
|
2334
2334
|
}
|
|
2335
|
-
}, [m, s,
|
|
2335
|
+
}, [m, s, l, a.saveSuccessful, d, u]), f = S(async () => {
|
|
2336
2336
|
if (r === null) {
|
|
2337
2337
|
m("none open", "warning");
|
|
2338
2338
|
return;
|
|
@@ -2366,7 +2366,7 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2366
2366
|
}, [t, o, e, a.enterName, v]), x = S(async () => {
|
|
2367
2367
|
d("report-versionSavingAs");
|
|
2368
2368
|
try {
|
|
2369
|
-
await
|
|
2369
|
+
await l.post("/reports/version", {
|
|
2370
2370
|
reportVersionId: r ?? void 0,
|
|
2371
2371
|
reportSourceName: e,
|
|
2372
2372
|
isArchived: !0
|
|
@@ -2376,7 +2376,7 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2376
2376
|
}
|
|
2377
2377
|
}, [
|
|
2378
2378
|
m,
|
|
2379
|
-
|
|
2379
|
+
l,
|
|
2380
2380
|
e,
|
|
2381
2381
|
a.deleteSuccessful,
|
|
2382
2382
|
r,
|
|
@@ -2385,11 +2385,11 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2385
2385
|
]), p = S(async () => {
|
|
2386
2386
|
d("report-versionSavingAs");
|
|
2387
2387
|
try {
|
|
2388
|
-
await
|
|
2388
|
+
await l.post("/reports/version-restrictions", {
|
|
2389
2389
|
reportVersionId: r ?? void 0,
|
|
2390
2390
|
userRestricts: [
|
|
2391
2391
|
{
|
|
2392
|
-
employeeId:
|
|
2392
|
+
employeeId: c.personalNumber,
|
|
2393
2393
|
addRights: !1
|
|
2394
2394
|
}
|
|
2395
2395
|
]
|
|
@@ -2399,21 +2399,21 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2399
2399
|
}
|
|
2400
2400
|
}, [
|
|
2401
2401
|
m,
|
|
2402
|
-
|
|
2402
|
+
l,
|
|
2403
2403
|
a.detachSuccessful,
|
|
2404
2404
|
r,
|
|
2405
2405
|
d,
|
|
2406
2406
|
u,
|
|
2407
|
-
|
|
2407
|
+
c.personalNumber
|
|
2408
2408
|
]);
|
|
2409
2409
|
return { saveAs: g, save: f, archive: x, detach: p };
|
|
2410
2410
|
}, Li = (e) => {
|
|
2411
|
-
const t = Ze(), { startLoading: r, stopLoading: s } =
|
|
2411
|
+
const t = Ze(), { startLoading: r, stopLoading: s } = G(Tt);
|
|
2412
2412
|
return { changeEmployeeRights: S(async (o, i) => {
|
|
2413
|
-
let
|
|
2413
|
+
let l = null;
|
|
2414
2414
|
r("reportSharing-addPerson");
|
|
2415
2415
|
try {
|
|
2416
|
-
|
|
2416
|
+
l = (await t.post("/reports/version-restrictions", {
|
|
2417
2417
|
reportVersionId: e,
|
|
2418
2418
|
userRestricts: [
|
|
2419
2419
|
{
|
|
@@ -2425,10 +2425,10 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2425
2425
|
} finally {
|
|
2426
2426
|
s("reportSharing-addPerson");
|
|
2427
2427
|
}
|
|
2428
|
-
return
|
|
2428
|
+
return l;
|
|
2429
2429
|
}, [t, e, r, s]) };
|
|
2430
2430
|
}, Ti = ({ isOpen: e, onHide: t, usersData: r, reportVersionId: s, EmployeePicker: a, setReportVersion: o }) => {
|
|
2431
|
-
const { ProjectIconComponent: i, texts: { reports:
|
|
2431
|
+
const { ProjectIconComponent: i, texts: { reports: l } } = G(oe), { confirm: c } = Qt(), [d, u] = E(null), { changeEmployeeRights: m } = Li(s), v = S((x) => {
|
|
2432
2432
|
o((p) => p === null ? null : {
|
|
2433
2433
|
...p,
|
|
2434
2434
|
users: x.filter((h) => h.isReportOwner === !1)
|
|
@@ -2439,17 +2439,17 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2439
2439
|
const x = await m(d.id, !0);
|
|
2440
2440
|
v(x), u(null);
|
|
2441
2441
|
}, [d, m, v]), g = S(async (x) => {
|
|
2442
|
-
if (!await l
|
|
2442
|
+
if (!await c(l.removeSharingWith(x)))
|
|
2443
2443
|
return;
|
|
2444
2444
|
const h = await m(x, !1);
|
|
2445
2445
|
v(h);
|
|
2446
|
-
}, [m,
|
|
2446
|
+
}, [m, c, l, v]);
|
|
2447
2447
|
return /* @__PURE__ */ n.jsxs(Se, { show: e, onHide: t, children: [
|
|
2448
|
-
/* @__PURE__ */ n.jsx(Se.Header, { closeButton: !0, children: /* @__PURE__ */ n.jsx(Se.Title, { children:
|
|
2448
|
+
/* @__PURE__ */ n.jsx(Se.Header, { closeButton: !0, children: /* @__PURE__ */ n.jsx(Se.Title, { children: l.reportSharing }) }),
|
|
2449
2449
|
/* @__PURE__ */ n.jsxs(Se.Body, { children: [
|
|
2450
|
-
/* @__PURE__ */ n.jsx(K, { variant: "h6", children:
|
|
2450
|
+
/* @__PURE__ */ n.jsx(K, { variant: "h6", children: l.sharedWith }),
|
|
2451
2451
|
/* @__PURE__ */ n.jsxs(ws, { variant: "flush", children: [
|
|
2452
|
-
r && r.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-2 text-muted", children:
|
|
2452
|
+
r && r.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-2 text-muted", children: l.noone.toLowerCase() }) : null,
|
|
2453
2453
|
r == null ? void 0 : r.map((x) => /* @__PURE__ */ n.jsxs(Ft, { className: "d-flex justify-content-between align-items-center gap-3 border-bottom px-2 py-1", children: [
|
|
2454
2454
|
x.lastName,
|
|
2455
2455
|
" ",
|
|
@@ -2460,16 +2460,16 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2460
2460
|
/* @__PURE__ */ n.jsx(te, { color: "danger", onClick: () => g(x.id), children: /* @__PURE__ */ n.jsx(i, { icon: "delete" }) })
|
|
2461
2461
|
] }, x.id))
|
|
2462
2462
|
] }),
|
|
2463
|
-
/* @__PURE__ */ n.jsx(K, { variant: "h6", className: "mt-2 mb-2", children:
|
|
2463
|
+
/* @__PURE__ */ n.jsx(K, { variant: "h6", className: "mt-2 mb-2", children: l.addSharing }),
|
|
2464
2464
|
/* @__PURE__ */ n.jsxs("div", { className: "d-flex gap-2 align-items-center", children: [
|
|
2465
|
-
/* @__PURE__ */ n.jsx("div", { className: "flex-grow-1", children: /* @__PURE__ */ n.jsx(a, { label:
|
|
2465
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex-grow-1", children: /* @__PURE__ */ n.jsx(a, { label: l.shareWith, onSelect: (x) => {
|
|
2466
2466
|
if (x === null || typeof x.id != "number") {
|
|
2467
2467
|
u(null);
|
|
2468
2468
|
return;
|
|
2469
2469
|
}
|
|
2470
2470
|
u(x);
|
|
2471
2471
|
}, value: d }) }),
|
|
2472
|
-
/* @__PURE__ */ n.jsx(zt, { onClick: f, disabled: d === null, children:
|
|
2472
|
+
/* @__PURE__ */ n.jsx(zt, { onClick: f, disabled: d === null, children: l.add })
|
|
2473
2473
|
] })
|
|
2474
2474
|
] })
|
|
2475
2475
|
] });
|
|
@@ -2481,14 +2481,14 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2481
2481
|
s(o);
|
|
2482
2482
|
});
|
|
2483
2483
|
}, [t, e]), { mappings: r };
|
|
2484
|
-
}, Su = ({ reportType: e, title: t, data: r, filterElements: s, getReportRoute: a, localization: o, licenseKey: i, EmployeePicker:
|
|
2485
|
-
const { texts: { reports: m } } =
|
|
2484
|
+
}, Su = ({ reportType: e, title: t, data: r, filterElements: s, getReportRoute: a, localization: o, licenseKey: i, EmployeePicker: l, localizationJsonFile: c, localizationTransformer: d, hyperlinkColumn: u }) => {
|
|
2485
|
+
const { texts: { reports: m } } = G(oe), { confirm: v } = Qt(), f = qr(), [g] = io(), { id: x } = lo(), p = U(() => x === void 0 ? null : Number(x), [x]), h = S((V) => {
|
|
2486
2486
|
const F = V === null ? "" : V.toString();
|
|
2487
2487
|
f(Ht(a(e), { id: F }) + "?" + g.toString(), {
|
|
2488
2488
|
replace: !0,
|
|
2489
2489
|
flushSync: !0
|
|
2490
2490
|
});
|
|
2491
|
-
}, [a, f, e, g]), [y,
|
|
2491
|
+
}, [a, f, e, g]), [y, b] = E(!1), _ = Z(null), { user: j } = G(Lt), { data: C, reloadData: T } = It(`/reports/${e}`), { mappings: $ } = Ei(c, d), [R, A] = E({}), L = S((V) => {
|
|
2492
2492
|
const F = V.target.value, ee = F === "" ? null : Number(F);
|
|
2493
2493
|
h(ee);
|
|
2494
2494
|
}, [h]), P = S(async (V) => {
|
|
@@ -2501,15 +2501,15 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2501
2501
|
return;
|
|
2502
2502
|
}
|
|
2503
2503
|
const V = Ci(k) ?? {};
|
|
2504
|
-
A(V), (F =
|
|
2504
|
+
A(V), (F = _.current) == null || F.flexmonster.refresh();
|
|
2505
2505
|
}, [k]);
|
|
2506
|
-
const { save: O, saveAs: N, archive: D, detach: H } = Di(e,
|
|
2506
|
+
const { save: O, saveAs: N, archive: D, detach: H } = Di(e, _, p, P), Y = U(() => ({
|
|
2507
2507
|
data: r ?? [],
|
|
2508
2508
|
mapping: $ ?? void 0
|
|
2509
2509
|
}), [r, $]), X = S(async () => {
|
|
2510
2510
|
var F;
|
|
2511
|
-
await v(m.confirmRevertChanges) && ((F =
|
|
2512
|
-
}, [v,
|
|
2511
|
+
await v(m.confirmRevertChanges) && ((F = _.current) == null || F.flexmonster.setReport({ dataSource: Y, ...R }));
|
|
2512
|
+
}, [v, Y, m.confirmRevertChanges, R]), z = U(() => (k == null ? void 0 : k.ownerId) === j.personalNumber, [k == null ? void 0 : k.ownerId, j.personalNumber]), J = U(() => {
|
|
2513
2513
|
var V;
|
|
2514
2514
|
return (V = k == null ? void 0 : k.users) == null ? void 0 : V.some((F) => F.id === j.personalNumber && !F.isReportOwner);
|
|
2515
2515
|
}, [k == null ? void 0 : k.users, j.personalNumber]), ne = S(async () => {
|
|
@@ -2534,21 +2534,21 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2534
2534
|
/* @__PURE__ */ n.jsx(Pe, { icon: /* @__PURE__ */ n.jsx(Ta, {}), onClick: N, className: "flex-shrink-0", children: m.saveAs }),
|
|
2535
2535
|
/* @__PURE__ */ n.jsxs(ht, { toggle: /* @__PURE__ */ n.jsx(pt, { as: Et }), children: [
|
|
2536
2536
|
/* @__PURE__ */ n.jsx(Ce, { onClick: X, children: m.revertChanges }),
|
|
2537
|
-
/* @__PURE__ */ n.jsx(Ce, { onClick: () =>
|
|
2537
|
+
/* @__PURE__ */ n.jsx(Ce, { onClick: () => b(!0), disabled: !z || (k == null ? void 0 : k.isSystem), children: m.share }),
|
|
2538
2538
|
z && !(k != null && k.isSystem) ? /* @__PURE__ */ n.jsx(Ce, { color: "danger", onClick: ne, children: m.delete }) : null,
|
|
2539
2539
|
J && !(k != null && k.isSystem) ? /* @__PURE__ */ n.jsx(Ce, { color: "danger", onClick: re, children: m.detach }) : null
|
|
2540
2540
|
] })
|
|
2541
2541
|
] })
|
|
2542
|
-
] }), children: /* @__PURE__ */ n.jsx("div", { className: w("h-100 w-100",
|
|
2542
|
+
] }), children: /* @__PURE__ */ n.jsx("div", { className: w("h-100 w-100", Y.data && Y.data.length > 0 ? "" : "d-none"), children: /* @__PURE__ */ n.jsx($i, { dataSource: Y, settings: R, pivotRef: _, enabled: Y.data && Y.data.length > 0, localization: o, licenseKey: i, hyperlinkColumn: u }) }) }),
|
|
2543
2543
|
k !== null ? /* @__PURE__ */ n.jsx(
|
|
2544
2544
|
Ti,
|
|
2545
2545
|
{
|
|
2546
2546
|
isOpen: y,
|
|
2547
|
-
onHide: () =>
|
|
2547
|
+
onHide: () => b(!1),
|
|
2548
2548
|
usersData: k.users ?? null,
|
|
2549
2549
|
setReportVersion: Q,
|
|
2550
2550
|
reportVersionId: k == null ? void 0 : k.reportVersionId,
|
|
2551
|
-
EmployeePicker:
|
|
2551
|
+
EmployeePicker: l
|
|
2552
2552
|
}
|
|
2553
2553
|
) : null
|
|
2554
2554
|
] });
|
|
@@ -2561,10 +2561,10 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2561
2561
|
}, className: w(`border-${s}`, t.includes(s) && `bg-${s}`), onClick: () => {
|
|
2562
2562
|
t.includes(s) ? r(t.filter((a) => a !== s)) : r([...t, s]);
|
|
2563
2563
|
} }, s)) }), Oi = ({ linksTo: e, onClick: t, children: r }) => e ? /* @__PURE__ */ n.jsx(Oe, { to: e, className: "text-decoration-none", onClick: t, children: r }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: r }), Ri = ({ message: e, onDeleteMessage: t, onClickMessage: r, getIcon: s, getLinksTo: a }) => {
|
|
2564
|
-
const { ProjectIconComponent: o, localizationContext: i } =
|
|
2564
|
+
const { ProjectIconComponent: o, localizationContext: i } = G(oe), { dateFnsLocale: l } = G(i), c = e.dateTime ? Ct(e.dateTime) : null, d = c ? vo(new Date(Date.now()), c) : 0;
|
|
2565
2565
|
return /* @__PURE__ */ n.jsxs("div", { children: [
|
|
2566
|
-
|
|
2567
|
-
locale:
|
|
2566
|
+
c && /* @__PURE__ */ n.jsx("div", { className: "d-flex justify-content-end", children: /* @__PURE__ */ n.jsx(Je, { text: St(c, "dd.MM.yyyy HH:mm"), placement: "left", children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(K, { variant: "caption", children: d > 2 ? St(c, "dd.MM.yyyy") : yo(c, new Date(Date.now()), {
|
|
2567
|
+
locale: l.code
|
|
2568
2568
|
}) }) }) }) }),
|
|
2569
2569
|
/* @__PURE__ */ n.jsx(Oi, { linksTo: a(e) ?? void 0, onClick: r, children: /* @__PURE__ */ n.jsx(qc, { level: e.type, noIcon: !0, children: /* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-start gap-2", children: [
|
|
2570
2570
|
s(e),
|
|
@@ -2580,9 +2580,9 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2580
2580
|
] }) }) })
|
|
2581
2581
|
] });
|
|
2582
2582
|
}, fr = ["info", "warning", "danger"], mr = ({ messages: e, isLoading: t, onDeleteMessage: r, onClickMessage: s, getIcon: a, getLinksTo: o }) => {
|
|
2583
|
-
const { texts: { messageBoard: i } } =
|
|
2583
|
+
const { texts: { messageBoard: i } } = G(oe), [l, c] = E(fr), d = U(() => e.filter((u) => l.includes(u.type ?? "")), [l, e]);
|
|
2584
2584
|
return /* @__PURE__ */ n.jsxs("div", { className: "h-100 d-flex flex-column overflow-hidden", children: [
|
|
2585
|
-
/* @__PURE__ */ n.jsx(Fi, { knownTypes: fr, typeFilters:
|
|
2585
|
+
/* @__PURE__ */ n.jsx(Fi, { knownTypes: fr, typeFilters: l, onChangeTypeFilters: (u) => c(u) }),
|
|
2586
2586
|
t && /* @__PURE__ */ n.jsxs("div", { className: "p-3 w-100", children: [
|
|
2587
2587
|
/* @__PURE__ */ n.jsx(Ge, { as: Qn.Title, animation: "glow", children: /* @__PURE__ */ n.jsx(Ge, { xs: 6 }) }),
|
|
2588
2588
|
/* @__PURE__ */ n.jsxs(Ge, { as: Qn.Text, animation: "glow", children: [
|
|
@@ -2606,17 +2606,17 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2606
2606
|
apiGet: "/messageBoard",
|
|
2607
2607
|
apiDelete: "/messageBoard/"
|
|
2608
2608
|
}, Iu = ({ renderAsNotifPanel: e, notifIcon: t, apiUrls: { apiGet: r = un.apiGet, apiDelete: s = un.apiDelete } = un, getIcon: a, getLinksTo: o }) => {
|
|
2609
|
-
const
|
|
2610
|
-
f(!0), await
|
|
2609
|
+
const l = Ze(), [c, d] = E([]), [u, m] = E(!1), [v, f] = E(!1), [g, x] = E(!1), p = S(async () => {
|
|
2610
|
+
f(!0), await l.get(r).then(({ data: j }) => {
|
|
2611
2611
|
d(j), m(!0), f(!1);
|
|
2612
2612
|
}).catch(() => {
|
|
2613
2613
|
d([]), f(!1);
|
|
2614
2614
|
});
|
|
2615
|
-
}, [r,
|
|
2615
|
+
}, [r, l]), h = S(async (j) => l.delete(`${s}${j}`).then(() => !0).catch(() => !1), [s, l]), y = S((j) => {
|
|
2616
2616
|
h(j).then((C) => {
|
|
2617
|
-
C && d(
|
|
2617
|
+
C && d(c.filter((T) => T.id !== j));
|
|
2618
2618
|
});
|
|
2619
|
-
}, [h,
|
|
2619
|
+
}, [h, c]);
|
|
2620
2620
|
B(() => {
|
|
2621
2621
|
p();
|
|
2622
2622
|
const j = setInterval(() => p(), 60 * 1e3);
|
|
@@ -2624,14 +2624,14 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2624
2624
|
clearInterval(j);
|
|
2625
2625
|
};
|
|
2626
2626
|
}, [p]);
|
|
2627
|
-
const
|
|
2627
|
+
const b = c.filter((j) => j.type === "danger").length, _ = u ? !1 : v;
|
|
2628
2628
|
return e ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2629
2629
|
/* @__PURE__ */ n.jsxs("div", { className: "position-relative", children: [
|
|
2630
2630
|
/* @__PURE__ */ n.jsx(te, { size: "md", onClick: () => x(!g), children: t }),
|
|
2631
|
-
|
|
2631
|
+
b > 0 && /* @__PURE__ */ n.jsx("div", { className: "badge rounded-pill bg-danger p-1 px-2 text-white", style: { position: "absolute", top: "-6px", right: "-10px", fontSize: "10px" }, children: b })
|
|
2632
2632
|
] }),
|
|
2633
|
-
/* @__PURE__ */ n.jsx(er, { show: g, onHide: () => x(!1), placement: "end", children: /* @__PURE__ */ n.jsx(er.Body, { children: /* @__PURE__ */ n.jsx(mr, { messages:
|
|
2634
|
-
] }) : /* @__PURE__ */ n.jsx(mr, { messages:
|
|
2633
|
+
/* @__PURE__ */ n.jsx(er, { show: g, onHide: () => x(!1), placement: "end", children: /* @__PURE__ */ n.jsx(er.Body, { children: /* @__PURE__ */ n.jsx(mr, { messages: c, isLoading: _, onDeleteMessage: y, onClickMessage: () => x(!1), getIcon: a, getLinksTo: o }) }) })
|
|
2634
|
+
] }) : /* @__PURE__ */ n.jsx(mr, { messages: c, isLoading: _, onDeleteMessage: y, getIcon: a, getLinksTo: o });
|
|
2635
2635
|
}, Mi = "_tab-panel_d8l8q_1", Ai = "_full-height-no-overflow_d8l8q_5", Bi = "_disabled_d8l8q_12", fn = {
|
|
2636
2636
|
"tab-panel": "_tab-panel_d8l8q_1",
|
|
2637
2637
|
tabPanel: Mi,
|
|
@@ -2644,16 +2644,16 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2644
2644
|
}, zi = ({ activeTab: e, onSelect: t, children: r, vertical: s, verticalStepper: a }) => /* @__PURE__ */ n.jsx("div", { className: w("luminus-tabs d-flex mb-2", { "gap-1": !a }, { "gap-0": a }, {
|
|
2645
2645
|
"flex-column": s || a
|
|
2646
2646
|
}), children: r.map((o, i) => {
|
|
2647
|
-
const
|
|
2648
|
-
if (!
|
|
2647
|
+
const l = o.type, c = o.props;
|
|
2648
|
+
if (!c)
|
|
2649
2649
|
return null;
|
|
2650
|
-
const d =
|
|
2650
|
+
const d = c.eventKey, u = c.children, m = c.className, v = c.onClick;
|
|
2651
2651
|
return /* @__PURE__ */ n.jsxs(ke.Fragment, { children: [
|
|
2652
|
-
/* @__PURE__ */ n.jsx(
|
|
2652
|
+
/* @__PURE__ */ n.jsx(l, { ...c, className: w({ active: e === d }, m), onClick: () => {
|
|
2653
2653
|
t(d), v && v(d);
|
|
2654
2654
|
}, vertical: s || a, children: u }),
|
|
2655
2655
|
a && i < r.length - 1 && /* @__PURE__ */ n.jsx("div", { className: w("join-line", Pi.joinLine) })
|
|
2656
|
-
] },
|
|
2656
|
+
] }, c.eventKey);
|
|
2657
2657
|
}) }), Wi = "_tab_1tbi7_1", Hi = "_disabled_1tbi7_7", Ui = "_vertical_1tbi7_13", mn = {
|
|
2658
2658
|
tab: Wi,
|
|
2659
2659
|
disabled: Hi,
|
|
@@ -2662,39 +2662,39 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2662
2662
|
disabled: s
|
|
2663
2663
|
}, { [mn.disabled]: s }, { vertical: a }, { [mn.vertical]: a }), onClick: () => r && !s && r(e), children: typeof o == "string" ? /* @__PURE__ */ n.jsx(K, { variant: a ? "body" : "h6", className: a ? "" : "text-primary", children: o }) : o }), Du = ({ tabs: e, activeTab: t, onSelect: r, ...s }) => {
|
|
2664
2664
|
var i;
|
|
2665
|
-
const { ProjectIconComponent: a } =
|
|
2666
|
-
return o ? /* @__PURE__ */ n.jsx(ht, { toggle: /* @__PURE__ */ n.jsx(pt, { as: Et, text: ((i = e.find((
|
|
2665
|
+
const { ProjectIconComponent: a } = G(oe), { isMobile: o } = Zt();
|
|
2666
|
+
return o ? /* @__PURE__ */ n.jsx(ht, { toggle: /* @__PURE__ */ n.jsx(pt, { as: Et, text: ((i = e.find((l) => l.id === t)) == null ? void 0 : i.name) ?? "", icon: /* @__PURE__ */ n.jsx(a, { icon: "chevron-down" }) }), ...s, children: e.map((l) => /* @__PURE__ */ n.jsx(Ce, { onClick: () => r(l.id), children: l.name }, l.id)) }) : /* @__PURE__ */ n.jsx(zi, { activeTab: t, onSelect: (l) => r(l), ...s, children: e.map((l) => /* @__PURE__ */ n.jsx(Gi, { eventKey: l.id, children: l.name }, l.id)) });
|
|
2667
2667
|
}, Yi = "_selection_1dtmm_1", Ki = "_selectionBg_1dtmm_10", qi = "_selectionItemsContainer_1dtmm_18", Qi = "_selectionItems_1dtmm_18", Mt = {
|
|
2668
2668
|
selection: Yi,
|
|
2669
2669
|
selectionBg: Ki,
|
|
2670
2670
|
selectionItemsContainer: qi,
|
|
2671
2671
|
selectionItems: Qi
|
|
2672
2672
|
}, Vs = ({ icon: e, setIcon: t, IconComponent: r, IconTypeArray: s }) => {
|
|
2673
|
-
const [a, o] = E(!1), i = (
|
|
2674
|
-
t(
|
|
2673
|
+
const [a, o] = E(!1), i = (l) => {
|
|
2674
|
+
t(l), o(!1);
|
|
2675
2675
|
};
|
|
2676
2676
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2677
2677
|
/* @__PURE__ */ n.jsx(te, { className: "rounded m-1", onClick: () => o(!0), children: /* @__PURE__ */ n.jsx(r, { icon: e }) }),
|
|
2678
2678
|
a && /* @__PURE__ */ n.jsxs("div", { className: Mt.selection, children: [
|
|
2679
2679
|
/* @__PURE__ */ n.jsx("div", { className: Mt.selectionBg, onClick: () => o(!1) }),
|
|
2680
|
-
/* @__PURE__ */ n.jsx("div", { className: Mt.selectionItemsContainer, children: /* @__PURE__ */ n.jsx("div", { className: Mt.selectionItems, children: s.filter((
|
|
2680
|
+
/* @__PURE__ */ n.jsx("div", { className: Mt.selectionItemsContainer, children: /* @__PURE__ */ n.jsx("div", { className: Mt.selectionItems, children: s.filter((l, c, d) => d.indexOf(l) === c).map((l) => /* @__PURE__ */ n.jsx(te, { className: "rounded", onClick: () => i(l), children: /* @__PURE__ */ n.jsx(r, { icon: l }) }, l)) }) })
|
|
2681
2681
|
] })
|
|
2682
2682
|
] });
|
|
2683
2683
|
}, Ps = () => {
|
|
2684
|
-
const e =
|
|
2684
|
+
const e = G(Hr);
|
|
2685
2685
|
if (e === void 0)
|
|
2686
2686
|
throw new Error("ShortcutLinksProvider not initilized. Probably tried to use useShortcutLinks outside ShortcutLinksProvider.");
|
|
2687
2687
|
return e;
|
|
2688
2688
|
}, Zi = ({ shortcutLink: e, IconComponent: t, IconTypeArray: r, editShortcutLink: s }) => {
|
|
2689
|
-
const { ProjectIconComponent: a } =
|
|
2689
|
+
const { ProjectIconComponent: a } = G(oe), [o, i] = E(e.icon), [l, c] = E(e.name);
|
|
2690
2690
|
console.log(o, typeof o);
|
|
2691
|
-
const d =
|
|
2692
|
-
i(e.icon),
|
|
2691
|
+
const d = U(() => !(o === e.icon && l === e.name), [o, l, e.icon, e.name]), u = S(() => {
|
|
2692
|
+
i(e.icon), c(e.name);
|
|
2693
2693
|
}, [e]), m = S(() => {
|
|
2694
|
-
s({ ...e, icon: o, name:
|
|
2695
|
-
}, [s, o,
|
|
2694
|
+
s({ ...e, icon: o, name: l });
|
|
2695
|
+
}, [s, o, l, e]);
|
|
2696
2696
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2697
|
-
/* @__PURE__ */ n.jsx("td", { className: "align-middle", children: /* @__PURE__ */ n.jsx(Qe, { type: "text", maxLength: 20, value:
|
|
2697
|
+
/* @__PURE__ */ n.jsx("td", { className: "align-middle", children: /* @__PURE__ */ n.jsx(Qe, { type: "text", maxLength: 20, value: l, onChange: c, className: "d-flex-grow-1", InputContainer: Fe }) }),
|
|
2698
2698
|
/* @__PURE__ */ n.jsx("td", { className: "align-middle text-center", children: /* @__PURE__ */ n.jsx(Vs, { icon: o, setIcon: i, IconComponent: t, IconTypeArray: r }) }),
|
|
2699
2699
|
/* @__PURE__ */ n.jsx("td", { className: "align-middle", style: { width: "7em" }, children: d && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2700
2700
|
/* @__PURE__ */ n.jsx(te, { onClick: u, color: "danger", className: "d-inline mx-2", children: /* @__PURE__ */ n.jsx(a, { icon: "cancel" }) }),
|
|
@@ -2702,7 +2702,7 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2702
2702
|
] }) })
|
|
2703
2703
|
] });
|
|
2704
2704
|
}, Ji = ({ shortcutLink: e, IconComponent: t, IconTypeArray: r, editShortcutLink: s, deleteShortcutLink: a }) => {
|
|
2705
|
-
const { ProjectIconComponent: o } =
|
|
2705
|
+
const { ProjectIconComponent: o } = G(oe), i = S(() => {
|
|
2706
2706
|
a(e.id);
|
|
2707
2707
|
}, [a, e.id]);
|
|
2708
2708
|
return /* @__PURE__ */ n.jsx("tr", { className: "mb-3", children: /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
@@ -2714,7 +2714,7 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2714
2714
|
/* @__PURE__ */ n.jsx(Zi, { shortcutLink: e, IconComponent: t, IconTypeArray: r, editShortcutLink: s })
|
|
2715
2715
|
] }) });
|
|
2716
2716
|
}, Lu = ({ IconComponent: e, IconTypeArray: t }) => {
|
|
2717
|
-
const { texts: r } =
|
|
2717
|
+
const { texts: r } = G(oe), { shortcutLinks: s, editShortcutLink: a, deleteShortcutLink: o } = Ps();
|
|
2718
2718
|
return /* @__PURE__ */ n.jsx(n.Fragment, { children: s !== null && s.length > 0 ? /* @__PURE__ */ n.jsxs(zo, { title: r.shortcutLinks.shortcutLinksSetting, children: [
|
|
2719
2719
|
/* @__PURE__ */ n.jsx("thead", { className: "fw-bold", children: /* @__PURE__ */ n.jsxs("tr", { children: [
|
|
2720
2720
|
/* @__PURE__ */ n.jsx("th", {}),
|
|
@@ -2725,13 +2725,13 @@ const pu = ({ InputContainer: e = it, value: t, onChange: r, debounceMs: s, labe
|
|
|
2725
2725
|
] }) }),
|
|
2726
2726
|
/* @__PURE__ */ n.jsx("tbody", { children: s == null ? void 0 : s.map((i) => /* @__PURE__ */ n.jsx(Ji, { shortcutLink: i, IconComponent: e, IconTypeArray: t, editShortcutLink: a, deleteShortcutLink: o }, i.id)) })
|
|
2727
2727
|
] }) : /* @__PURE__ */ n.jsx(nn, { variant: "info", children: r.shortcutLinks.addLinksToEditThemHereInfo }) });
|
|
2728
|
-
},
|
|
2728
|
+
}, _n = 5, Xi = "_linkButton_pnlvi_1", el = "_linkAddButton_pnlvi_31", tl = "_createLinkRow_pnlvi_39", mt = {
|
|
2729
2729
|
linkButton: Xi,
|
|
2730
2730
|
linkAddButton: el,
|
|
2731
2731
|
createLinkRow: tl
|
|
2732
2732
|
}, nl = ({ shortcutLink: e, IconComponent: t }) => /* @__PURE__ */ n.jsx(Je, { text: e.name, placement: "bottom", children: /* @__PURE__ */ n.jsx(Oe, { to: e.url, className: mt.linkButton, children: /* @__PURE__ */ n.jsx(t, { icon: e.icon }) }) });
|
|
2733
2733
|
function rl(e, t, r) {
|
|
2734
|
-
var s = this, a = Z(null), o = Z(0), i = Z(null),
|
|
2734
|
+
var s = this, a = Z(null), o = Z(0), i = Z(null), l = Z([]), c = Z(), d = Z(), u = Z(e), m = Z(!0);
|
|
2735
2735
|
u.current = e;
|
|
2736
2736
|
var v = typeof window < "u", f = !t && t !== 0 && v;
|
|
2737
2737
|
if (typeof e != "function") throw new TypeError("Expected a function");
|
|
@@ -2742,10 +2742,10 @@ function rl(e, t, r) {
|
|
|
2742
2742
|
m.current = !1;
|
|
2743
2743
|
};
|
|
2744
2744
|
}, []);
|
|
2745
|
-
var
|
|
2746
|
-
var
|
|
2747
|
-
var L =
|
|
2748
|
-
return
|
|
2745
|
+
var b = U(function() {
|
|
2746
|
+
var _ = function(A) {
|
|
2747
|
+
var L = l.current, P = c.current;
|
|
2748
|
+
return l.current = c.current = null, o.current = A, d.current = u.current.apply(P, L);
|
|
2749
2749
|
}, j = function(A, L) {
|
|
2750
2750
|
f && cancelAnimationFrame(i.current), i.current = f ? requestAnimationFrame(A) : setTimeout(A, L);
|
|
2751
2751
|
}, C = function(A) {
|
|
@@ -2753,7 +2753,7 @@ function rl(e, t, r) {
|
|
|
2753
2753
|
var L = A - a.current;
|
|
2754
2754
|
return !a.current || L >= t || L < 0 || p && A - o.current >= y;
|
|
2755
2755
|
}, T = function(A) {
|
|
2756
|
-
return i.current = null, x &&
|
|
2756
|
+
return i.current = null, x && l.current ? _(A) : (l.current = c.current = null, d.current);
|
|
2757
2757
|
}, $ = function A() {
|
|
2758
2758
|
var L = Date.now();
|
|
2759
2759
|
if (C(L)) return T(L);
|
|
@@ -2764,88 +2764,88 @@ function rl(e, t, r) {
|
|
|
2764
2764
|
}, R = function() {
|
|
2765
2765
|
if (v || h) {
|
|
2766
2766
|
var A = Date.now(), L = C(A);
|
|
2767
|
-
if (
|
|
2768
|
-
if (!i.current && m.current) return o.current = a.current, j($, t), g ?
|
|
2769
|
-
if (p) return j($, t),
|
|
2767
|
+
if (l.current = [].slice.call(arguments), c.current = s, a.current = A, L) {
|
|
2768
|
+
if (!i.current && m.current) return o.current = a.current, j($, t), g ? _(a.current) : d.current;
|
|
2769
|
+
if (p) return j($, t), _(a.current);
|
|
2770
2770
|
}
|
|
2771
2771
|
return i.current || j($, t), d.current;
|
|
2772
2772
|
}
|
|
2773
2773
|
};
|
|
2774
2774
|
return R.cancel = function() {
|
|
2775
|
-
i.current && (f ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), o.current = 0,
|
|
2775
|
+
i.current && (f ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), o.current = 0, l.current = a.current = c.current = i.current = null;
|
|
2776
2776
|
}, R.isPending = function() {
|
|
2777
2777
|
return !!i.current;
|
|
2778
2778
|
}, R.flush = function() {
|
|
2779
2779
|
return i.current ? T(Date.now()) : d.current;
|
|
2780
2780
|
}, R;
|
|
2781
2781
|
}, [g, p, t, y, x, f, v, h]);
|
|
2782
|
-
return
|
|
2782
|
+
return b;
|
|
2783
2783
|
}
|
|
2784
2784
|
function sl(e, t) {
|
|
2785
2785
|
return e === t;
|
|
2786
2786
|
}
|
|
2787
2787
|
function en(e, t, r) {
|
|
2788
|
-
var s = sl, a = Z(e), o = E({})[1], i = rl(S(function(
|
|
2789
|
-
a.current =
|
|
2790
|
-
}, [o]), t, r),
|
|
2791
|
-
return s(
|
|
2788
|
+
var s = sl, a = Z(e), o = E({})[1], i = rl(S(function(c) {
|
|
2789
|
+
a.current = c, o({});
|
|
2790
|
+
}, [o]), t, r), l = Z(e);
|
|
2791
|
+
return s(l.current, e) || (i(e), l.current = e), [a.current, i];
|
|
2792
2792
|
}
|
|
2793
2793
|
const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconComponent: a, IconTypeArray: o }) => {
|
|
2794
|
-
const i = co(), { texts:
|
|
2795
|
-
await r({ icon:
|
|
2796
|
-
}, [e, r,
|
|
2794
|
+
const i = co(), { texts: l } = G(oe), [c, d] = E("star-outline"), [u, m] = E(s ? document.title.replace(s, "") : document.title), v = S(async () => {
|
|
2795
|
+
await r({ icon: c, name: u, url: i.pathname + i.search }), e();
|
|
2796
|
+
}, [e, r, c, i.pathname, i.search, u]), f = U(() => i.pathname + i.search, [i.pathname, i.search]);
|
|
2797
2797
|
return /* @__PURE__ */ n.jsxs(Se, { show: t, onHide: e, size: "sm", children: [
|
|
2798
|
-
/* @__PURE__ */ n.jsx(Se.Header, { closeButton: !0, children: /* @__PURE__ */ n.jsx(Se.Title, { children:
|
|
2798
|
+
/* @__PURE__ */ n.jsx(Se.Header, { closeButton: !0, children: /* @__PURE__ */ n.jsx(Se.Title, { children: l.shortcutLinks.newShortcut }) }),
|
|
2799
2799
|
/* @__PURE__ */ n.jsxs(Se.Body, { children: [
|
|
2800
2800
|
/* @__PURE__ */ n.jsxs("div", { className: mt.createLinkRow, children: [
|
|
2801
|
-
/* @__PURE__ */ n.jsx(K, { variant: "form-label", className: "pe-3 text-end", children:
|
|
2801
|
+
/* @__PURE__ */ n.jsx(K, { variant: "form-label", className: "pe-3 text-end", children: l.shortcutLinks.target }),
|
|
2802
2802
|
/* @__PURE__ */ n.jsx("div", { className: "d-flex align-items-middle fw-bold text-muted", children: f.length <= 23 ? f : /* @__PURE__ */ n.jsx(Je, { placement: "bottom", text: f, children: /* @__PURE__ */ n.jsxs("span", { children: [
|
|
2803
2803
|
f.slice(0, 21),
|
|
2804
2804
|
"..."
|
|
2805
2805
|
] }) }) })
|
|
2806
2806
|
] }),
|
|
2807
2807
|
/* @__PURE__ */ n.jsxs("div", { className: mt.createLinkRow, children: [
|
|
2808
|
-
/* @__PURE__ */ n.jsx(K, { variant: "form-label", className: "pe-3 text-end", children:
|
|
2808
|
+
/* @__PURE__ */ n.jsx(K, { variant: "form-label", className: "pe-3 text-end", children: l.shortcutLinks.name }),
|
|
2809
2809
|
/* @__PURE__ */ n.jsx("div", { className: "d-flex align-items-middle fw-bold", children: /* @__PURE__ */ n.jsx(Qe, { type: "text", maxLength: 25, value: u, onChange: m, className: "w-100", InputContainer: Ae, withoutLabel: !0 }) })
|
|
2810
2810
|
] }),
|
|
2811
2811
|
/* @__PURE__ */ n.jsxs("div", { className: mt.createLinkRow, children: [
|
|
2812
|
-
/* @__PURE__ */ n.jsx(K, { variant: "form-label", className: "pe-3 text-end", children:
|
|
2813
|
-
/* @__PURE__ */ n.jsx("div", { className: "d-flex align-items-middle fw-bold", children: /* @__PURE__ */ n.jsx(Vs, { icon:
|
|
2812
|
+
/* @__PURE__ */ n.jsx(K, { variant: "form-label", className: "pe-3 text-end", children: l.shortcutLinks.icon }),
|
|
2813
|
+
/* @__PURE__ */ n.jsx("div", { className: "d-flex align-items-middle fw-bold", children: /* @__PURE__ */ n.jsx(Vs, { icon: c, setIcon: d, IconComponent: a, IconTypeArray: o }) })
|
|
2814
2814
|
] })
|
|
2815
2815
|
] }),
|
|
2816
|
-
/* @__PURE__ */ n.jsx(Se.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ n.jsx(zt, { onClick: v, children:
|
|
2816
|
+
/* @__PURE__ */ n.jsx(Se.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ n.jsx(zt, { onClick: v, children: l.shortcutLinks.addShortcut }) })
|
|
2817
2817
|
] });
|
|
2818
2818
|
}, ol = ({ IconComponent: e, IconTypeArray: t, pageTitlePrefix: r, createLink: s }) => {
|
|
2819
|
-
const { ProjectIconComponent: a, texts: o } =
|
|
2819
|
+
const { ProjectIconComponent: a, texts: o } = G(oe), [i, l] = E(!1), [c] = en(i, 100);
|
|
2820
2820
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2821
|
-
/* @__PURE__ */ n.jsx(Je, { text: o.shortcutLinks.addShortcut, placement: "bottom", children: /* @__PURE__ */ n.jsx("button", { type: "button", className: w(mt.linkButton, mt.linkAddButton), onClick: () =>
|
|
2822
|
-
(i ||
|
|
2821
|
+
/* @__PURE__ */ n.jsx(Je, { text: o.shortcutLinks.addShortcut, placement: "bottom", children: /* @__PURE__ */ n.jsx("button", { type: "button", className: w(mt.linkButton, mt.linkAddButton), onClick: () => l(!0), children: /* @__PURE__ */ n.jsx(a, { icon: "add" }) }) }),
|
|
2822
|
+
(i || c) && /* @__PURE__ */ n.jsx(al, { IconComponent: e, IconTypeArray: t, closeModal: () => l(!1), createLink: s, isOpen: i, pageTitlePrefix: r })
|
|
2823
2823
|
] });
|
|
2824
2824
|
}, Tu = ({ IconComponent: e, IconTypeArray: t, pageTitlePrefix: r }) => {
|
|
2825
|
-
const { shortcutLinks: s, createShortcutLink: a } = Ps(), o =
|
|
2825
|
+
const { shortcutLinks: s, createShortcutLink: a } = Ps(), o = U(() => s !== null && s.length < _n, [s]);
|
|
2826
2826
|
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs("div", { className: "d-flex gap-2", children: [
|
|
2827
|
-
s == null ? void 0 : s.slice(0,
|
|
2827
|
+
s == null ? void 0 : s.slice(0, _n).map((i, l) => i !== null ? /* @__PURE__ */ n.jsx(nl, { shortcutLink: i, IconComponent: e }, l) : null),
|
|
2828
2828
|
o && /* @__PURE__ */ n.jsx(ol, { IconComponent: e, IconTypeArray: t, pageTitlePrefix: r, createLink: a })
|
|
2829
2829
|
] }) });
|
|
2830
2830
|
}, il = (e) => {
|
|
2831
|
-
const t = Ze(), { startLoading: r, stopLoading: s } =
|
|
2831
|
+
const t = Ze(), { startLoading: r, stopLoading: s } = G(Tt), a = S(async (l) => {
|
|
2832
2832
|
r("submit-createShortcutLink");
|
|
2833
2833
|
try {
|
|
2834
|
-
await t.post(`/dynamicForms/insert?referenceId=${e}`,
|
|
2834
|
+
await t.post(`/dynamicForms/insert?referenceId=${e}`, l);
|
|
2835
2835
|
} finally {
|
|
2836
2836
|
s("submit-createShortcutLink");
|
|
2837
2837
|
}
|
|
2838
|
-
}, [t, e, r, s]), o = S(async (
|
|
2838
|
+
}, [t, e, r, s]), o = S(async (l) => {
|
|
2839
2839
|
r("submit-updateShortcutLink");
|
|
2840
2840
|
try {
|
|
2841
|
-
await t.post(`/dynamicForms/update?referenceId=${e}`,
|
|
2841
|
+
await t.post(`/dynamicForms/update?referenceId=${e}`, l);
|
|
2842
2842
|
} finally {
|
|
2843
2843
|
s("submit-updateShortcutLink");
|
|
2844
2844
|
}
|
|
2845
|
-
}, [t, e, r, s]), i = S(async (
|
|
2845
|
+
}, [t, e, r, s]), i = S(async (l) => {
|
|
2846
2846
|
r("delete-deleteShortcutLink");
|
|
2847
2847
|
try {
|
|
2848
|
-
await t.delete(`/dynamicForms/delete?referenceId=${e}&pk=${
|
|
2848
|
+
await t.delete(`/dynamicForms/delete?referenceId=${e}&pk=${l.toString()}`);
|
|
2849
2849
|
} finally {
|
|
2850
2850
|
s("delete-deleteShortcutLink");
|
|
2851
2851
|
}
|
|
@@ -2860,21 +2860,21 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
2860
2860
|
throw new Error("Tried to make operation on null shortcutLinks.");
|
|
2861
2861
|
return e;
|
|
2862
2862
|
}, Eu = ({ children: e, referenceId: t }) => {
|
|
2863
|
-
const { user: r } =
|
|
2863
|
+
const { user: r } = G(Lt), s = S((f) => f.map((g) => ({ id: g.id, icon: g.icon, name: g.name, url: g.url })), []), { data: a, reloadData: o } = It(`/dynamicForms/lookup-data-all?referenceId=${t}&employee=${r == null ? void 0 : r.personalNumber}`, {
|
|
2864
2864
|
silent: !0,
|
|
2865
2865
|
dataTransformer: s,
|
|
2866
2866
|
enabled: r !== null
|
|
2867
|
-
}), { create: i, update:
|
|
2867
|
+
}), { create: i, update: l, remove: c } = il(t), d = S(async (f) => {
|
|
2868
2868
|
const g = hr(r);
|
|
2869
|
-
if (ll(a).length >=
|
|
2869
|
+
if (ll(a).length >= _n)
|
|
2870
2870
|
throw new Error("Cannot add more shortcut links.");
|
|
2871
2871
|
await i({ ...f, employee: g.personalNumber }), await o();
|
|
2872
2872
|
}, [i, o, a, r]), u = S(async (f) => {
|
|
2873
2873
|
const g = hr(r);
|
|
2874
|
-
await
|
|
2875
|
-
}, [o,
|
|
2876
|
-
await
|
|
2877
|
-
}, [o,
|
|
2874
|
+
await l({ ...f, employee: g.personalNumber }), await o();
|
|
2875
|
+
}, [o, l, r]), m = S(async (f) => {
|
|
2876
|
+
await c(f), await o();
|
|
2877
|
+
}, [o, c]), v = U(() => ({
|
|
2878
2878
|
shortcutLinks: a,
|
|
2879
2879
|
createShortcutLink: d,
|
|
2880
2880
|
editShortcutLink: u,
|
|
@@ -2893,24 +2893,24 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
2893
2893
|
widgetTitle: ml,
|
|
2894
2894
|
title: hl
|
|
2895
2895
|
}, pl = ({ show: e, widgetGroups: t, widgets: r, handleClose: s, onWidgetPicked: a, texts: o }) => {
|
|
2896
|
-
const [i,
|
|
2896
|
+
const [i, l] = E(""), c = U(() => r.filter((u) => u.id !== -1 && qe(u.name, i)), [r, i]), d = U(() => t.filter((u) => c.some((m) => m.group === u.id)), [t, c]);
|
|
2897
2897
|
return /* @__PURE__ */ n.jsxs(Se, { show: e, onHide: () => s(), size: "lg", children: [
|
|
2898
2898
|
/* @__PURE__ */ n.jsxs(Se.Header, { closeButton: !0, children: [
|
|
2899
2899
|
/* @__PURE__ */ n.jsx(Se.Title, { className: "w-100", children: o.pickWidgetToAdd }),
|
|
2900
2900
|
/* @__PURE__ */ n.jsx(ge.Control, { type: "search", size: "sm", value: i, placeholder: o.searchPlaceholder, onChange: (u) => {
|
|
2901
2901
|
var m;
|
|
2902
|
-
return
|
|
2902
|
+
return l(((m = u.target) == null ? void 0 : m.value) ?? "");
|
|
2903
2903
|
}, className: "me-3", style: { maxWidth: "200px" } })
|
|
2904
2904
|
] }),
|
|
2905
|
-
/* @__PURE__ */ n.jsx(Se.Body, { className: "flex-column gap-3", children:
|
|
2906
|
-
d.map((u) => /* @__PURE__ */ n.jsx(Yt, { defaultOpen: !0, title: u.name ?? "", children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className: w("row gx-3 gy-3", $e.widgetsRow), children:
|
|
2905
|
+
/* @__PURE__ */ n.jsx(Se.Body, { className: "flex-column gap-3", children: c.length === 0 ? /* @__PURE__ */ n.jsx(nn, { variant: "warning", children: o.noWidgets }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2906
|
+
d.map((u) => /* @__PURE__ */ n.jsx(Yt, { defaultOpen: !0, title: u.name ?? "", children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className: w("row gx-3 gy-3", $e.widgetsRow), children: c.filter((m) => m.group === u.id).map((m) => /* @__PURE__ */ n.jsx("div", { className: "col col-4", children: /* @__PURE__ */ n.jsxs("div", { role: "button", className: w("p-0 pt-2 bg-white rounded shadow-sm", $e.widget), onClick: () => a(m.id), children: [
|
|
2907
2907
|
/* @__PURE__ */ n.jsx("div", { className: $e.widgetImg, style: {
|
|
2908
2908
|
backgroundImage: m.img ? `url(${m.img})` : void 0
|
|
2909
2909
|
} }),
|
|
2910
2910
|
/* @__PURE__ */ n.jsx("div", { className: $e.widgetTitleSpacer }),
|
|
2911
2911
|
/* @__PURE__ */ n.jsx("div", { className: w($e.widgetTitle, "rounded"), children: /* @__PURE__ */ n.jsx(K, { variant: "body", className: w($e.title, "text-white text-truncate"), children: m.name }) })
|
|
2912
2912
|
] }, m.id) })) }) }) }, u.id)),
|
|
2913
|
-
|
|
2913
|
+
c.some((u) => u.group === void 0) && /* @__PURE__ */ n.jsx(Yt, { defaultOpen: !0, title: o.otherWidgets, children: /* @__PURE__ */ n.jsx("div", { className: "p-1", children: /* @__PURE__ */ n.jsx("div", { className: w("row gx-3 gy-3", $e.widgetsRow), children: c.filter((u) => u.group === void 0).map((u) => /* @__PURE__ */ n.jsx("div", { className: "col col-4", children: /* @__PURE__ */ n.jsxs("div", { role: "button", className: w("p-0 pt-2 bg-white rounded shadow-sm", $e.widget), onClick: () => a(u.id), children: [
|
|
2914
2914
|
/* @__PURE__ */ n.jsx("div", { className: $e.widgetImg, style: {
|
|
2915
2915
|
backgroundImage: u.img ? `url(${u.img})` : void 0
|
|
2916
2916
|
} }),
|
|
@@ -2928,11 +2928,11 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
2928
2928
|
/* @__PURE__ */ n.jsx("div", { className: w("luminus-empty-widget", pr.widget, {
|
|
2929
2929
|
[pr.mobile]: i
|
|
2930
2930
|
}), children: /* @__PURE__ */ n.jsx(te, { onClick: () => o(!0), children: /* @__PURE__ */ n.jsx(Ea, {}) }) }),
|
|
2931
|
-
/* @__PURE__ */ n.jsx(pl, { show: a, widgetGroups: e, widgets: t, handleClose: () => o(!1), onWidgetPicked: (
|
|
2932
|
-
o(!1), r(
|
|
2931
|
+
/* @__PURE__ */ n.jsx(pl, { show: a, widgetGroups: e, widgets: t, handleClose: () => o(!1), onWidgetPicked: (l) => {
|
|
2932
|
+
o(!1), r(l);
|
|
2933
2933
|
}, texts: s })
|
|
2934
2934
|
] });
|
|
2935
|
-
}, vl = "_dashboard_if2cc_1", jl = "_widgets-grid_if2cc_1", yl = "_widget-wrapper_if2cc_8", wl = "_full-width_if2cc_13",
|
|
2935
|
+
}, vl = "_dashboard_if2cc_1", jl = "_widgets-grid_if2cc_1", yl = "_widget-wrapper_if2cc_8", wl = "_full-width_if2cc_13", bl = "_widget-edit_if2cc_16", _l = "_remove-icon_if2cc_19", Nl = "_full-width-icon_if2cc_26", kl = "_widget-edit-overlay_if2cc_36", Sl = "_mobile_if2cc_45", Me = {
|
|
2936
2936
|
dashboard: vl,
|
|
2937
2937
|
"widgets-grid": "_widgets-grid_if2cc_1",
|
|
2938
2938
|
widgetsGrid: jl,
|
|
@@ -2941,9 +2941,9 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
2941
2941
|
"full-width": "_full-width_if2cc_13",
|
|
2942
2942
|
fullWidth: wl,
|
|
2943
2943
|
"widget-edit": "_widget-edit_if2cc_16",
|
|
2944
|
-
widgetEdit:
|
|
2944
|
+
widgetEdit: bl,
|
|
2945
2945
|
"remove-icon": "_remove-icon_if2cc_19",
|
|
2946
|
-
removeIcon:
|
|
2946
|
+
removeIcon: _l,
|
|
2947
2947
|
"full-width-icon": "_full-width-icon_if2cc_26",
|
|
2948
2948
|
fullWidthIcon: Nl,
|
|
2949
2949
|
"widget-edit-overlay": "_widget-edit-overlay_if2cc_36",
|
|
@@ -2961,7 +2961,7 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
2961
2961
|
return { dashboardConfig: t, onChangeDashboardConfig: s };
|
|
2962
2962
|
}, Fu = ({ widgetGroups: e, availableWidgets: t, editMode: r, defaultDashboardConfig: s }) => {
|
|
2963
2963
|
var v;
|
|
2964
|
-
const { texts: { homeDashboard: a } } =
|
|
2964
|
+
const { texts: { homeDashboard: a } } = G(oe), { dashboardConfig: o, onChangeDashboardConfig: i } = Cl(s), l = S((f, g) => {
|
|
2965
2965
|
var x, p;
|
|
2966
2966
|
f === ((x = o.widgets) == null ? void 0 : x.length) ? i({
|
|
2967
2967
|
...o,
|
|
@@ -2970,13 +2970,13 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
2970
2970
|
...o,
|
|
2971
2971
|
widgets: ((p = o.widgets) == null ? void 0 : p.map((h, y) => y === f ? { widgetId: g, fullWidth: !1 } : h)) ?? []
|
|
2972
2972
|
});
|
|
2973
|
-
}, [o, i]),
|
|
2973
|
+
}, [o, i]), c = S((f) => {
|
|
2974
2974
|
var g, x;
|
|
2975
2975
|
((g = o.widgets[f]) == null ? void 0 : g.widgetId) === -1 ? i({
|
|
2976
2976
|
...o,
|
|
2977
2977
|
widgets: ((x = o.widgets) == null ? void 0 : x.filter((p, h) => h !== f)) ?? []
|
|
2978
|
-
}) :
|
|
2979
|
-
}, [o, i,
|
|
2978
|
+
}) : l(f, -1);
|
|
2979
|
+
}, [o, i, l]), d = S((f) => {
|
|
2980
2980
|
var g;
|
|
2981
2981
|
i({
|
|
2982
2982
|
...o,
|
|
@@ -2986,16 +2986,16 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
2986
2986
|
[Me.widgetEdit]: r && f.id !== -1
|
|
2987
2987
|
}, { [Me.fullWidth]: x }), children: [
|
|
2988
2988
|
r && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2989
|
-
/* @__PURE__ */ n.jsx(te, { color: "danger", onClick: () =>
|
|
2989
|
+
/* @__PURE__ */ n.jsx(te, { color: "danger", onClick: () => c(g), className: w(Me.removeIcon), children: /* @__PURE__ */ n.jsx(Ur, {}) }),
|
|
2990
2990
|
/* @__PURE__ */ n.jsx(te, { color: x ? "danger" : "primary", onClick: () => d(g), className: w(Me.fullWidthIcon), children: /* @__PURE__ */ n.jsx(Fa, {}) })
|
|
2991
2991
|
] }),
|
|
2992
|
-
f.id === -1 ? r && /* @__PURE__ */ n.jsx("div", { className: Me.widgetWrapper, children: /* @__PURE__ */ n.jsx(gr, { widgetGroups: e, availableWidgets: t, onAdd: (p) =>
|
|
2992
|
+
f.id === -1 ? r && /* @__PURE__ */ n.jsx("div", { className: Me.widgetWrapper, children: /* @__PURE__ */ n.jsx(gr, { widgetGroups: e, availableWidgets: t, onAdd: (p) => l(g, p), texts: a }) }) : /* @__PURE__ */ n.jsx(ei, { title: f.title, children: /* @__PURE__ */ n.jsx(f.WidgetElement, { title: f.title }) }),
|
|
2993
2993
|
f.id > -1 && r && /* @__PURE__ */ n.jsx("div", { className: Me.widgetEditOverlay })
|
|
2994
2994
|
] }, g) : /* @__PURE__ */ n.jsx(n.Fragment, {}), [
|
|
2995
2995
|
r,
|
|
2996
2996
|
e,
|
|
2997
|
-
c,
|
|
2998
2997
|
l,
|
|
2998
|
+
c,
|
|
2999
2999
|
d,
|
|
3000
3000
|
t,
|
|
3001
3001
|
a
|
|
@@ -3004,7 +3004,7 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
3004
3004
|
(v = o.widgets) == null ? void 0 : v.map((f, g) => u(t.find((x) => x.id === f.widgetId), g, f.fullWidth)),
|
|
3005
3005
|
r && /* @__PURE__ */ n.jsx(gr, { widgetGroups: e, availableWidgets: t, onAdd: (f) => {
|
|
3006
3006
|
var g;
|
|
3007
|
-
return
|
|
3007
|
+
return l((g = o.widgets) == null ? void 0 : g.length, f);
|
|
3008
3008
|
}, texts: a })
|
|
3009
3009
|
] }) });
|
|
3010
3010
|
}, Il = "_badge_193ci_1", $l = "_sm_193ci_6", Dl = "_md_193ci_10", Ll = "_lg_193ci_14", Tl = "_light_193ci_18", hn = {
|
|
@@ -3013,23 +3013,26 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
3013
3013
|
md: Dl,
|
|
3014
3014
|
lg: Ll,
|
|
3015
3015
|
light: Tl
|
|
3016
|
-
}, Ou = ({ children: e, color: t = "primary", size: r = "md", rounded: s, className: a,
|
|
3016
|
+
}, Ou = ({ children: e, color: t = "primary", size: r = "md", rounded: s, className: a, variant: o = "filled", ...i }) => {
|
|
3017
|
+
const l = U(() => o === "filled" ? w(`bg-${t}`) : o === "outline" ? w(`text-${t} border-${t} border bg-white`) : "", [t, o]);
|
|
3018
|
+
return /* @__PURE__ */ n.jsx("span", { className: w("luminus-badge badge", l, a, { "rounded-pill": s }, { "text-dark": t === "light" }, { [hn.light]: t === "light" }, hn.badge, hn[r]), ...i, children: e });
|
|
3019
|
+
}, El = "_collapse-icon_1ahhn_1", Fl = "_collapsed_1ahhn_6", xr = {
|
|
3017
3020
|
"collapse-icon": "_collapse-icon_1ahhn_1",
|
|
3018
3021
|
collapseIcon: El,
|
|
3019
3022
|
collapsed: Fl
|
|
3020
3023
|
}, Yt = ({ title: e, children: t, className: r, ...s }) => {
|
|
3021
|
-
const a = s.controlled ? !1 : s.defaultOpen ?? !1, [o, i] = E(a),
|
|
3024
|
+
const a = s.controlled ? !1 : s.defaultOpen ?? !1, [o, i] = E(a), l = s.controlled ? s.isOpen : o;
|
|
3022
3025
|
return B(() => {
|
|
3023
3026
|
i(a);
|
|
3024
3027
|
}, [a]), /* @__PURE__ */ n.jsxs("div", { className: r ?? "", children: [
|
|
3025
3028
|
/* @__PURE__ */ n.jsxs("div", { role: "button", className: "d-flex align-items-center justify-content-between pb-3 pt-2", onClick: () => s.controlled ? s.onToggle(!s.isOpen) : i(!o), children: [
|
|
3026
3029
|
/* @__PURE__ */ n.jsx(K, { variant: "h6", children: e }),
|
|
3027
3030
|
/* @__PURE__ */ n.jsx(Gr, { className: w(xr.collapseIcon, {
|
|
3028
|
-
[xr.collapsed]:
|
|
3031
|
+
[xr.collapsed]: l
|
|
3029
3032
|
}) })
|
|
3030
3033
|
] }),
|
|
3031
|
-
/* @__PURE__ */ n.jsx(es, { in:
|
|
3032
|
-
/* @__PURE__ */ n.jsx("hr", { className: `my-0 ${
|
|
3034
|
+
/* @__PURE__ */ n.jsx(es, { in: l, children: /* @__PURE__ */ n.jsx("div", { children: t }) }),
|
|
3035
|
+
/* @__PURE__ */ n.jsx("hr", { className: `my-0 ${l ? "mt-3" : ""}` })
|
|
3033
3036
|
] });
|
|
3034
3037
|
}, Ol = "_wrapper_1kmlk_1", Rl = "_open_1kmlk_9", Ml = "_dropdown_1kmlk_13", Al = "_search-input-container_1kmlk_19", Bl = "_search-input_1kmlk_19", Vl = "_loading-container_1kmlk_25", Pl = "_items-container_1kmlk_32", zl = "_header-row_1kmlk_38", Wl = "_item_1kmlk_32", Hl = "_name_1kmlk_57", Ul = "_column-item_1kmlk_62", Gl = "_icon_1kmlk_66", Yl = "_action-buttons-container_1kmlk_74", Kl = "_reverse_1kmlk_82", ql = "_action-button_1kmlk_74", Ql = "_actions-dropdown_1kmlk_95", we = {
|
|
3035
3038
|
wrapper: Ol,
|
|
@@ -3057,9 +3060,9 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
3057
3060
|
actionButton: ql,
|
|
3058
3061
|
"actions-dropdown": "_actions-dropdown_1kmlk_95",
|
|
3059
3062
|
actionsDropdown: Ql
|
|
3060
|
-
}, tn = ({ show: e, onCancel: t, items: r, currentSelection: s, onSelectionChange: a, onSearchQueryChange: o, texts: i, itemsNameWidth:
|
|
3063
|
+
}, tn = ({ show: e, onCancel: t, items: r, currentSelection: s, onSelectionChange: a, onSearchQueryChange: o, texts: i, itemsNameWidth: l, additionalColumns: c, displayIdAsName: d = !1, autoHideSearch: u = !1, allItemsLength: m, disabled: v, isLoading: f = !1, inputRef: g, archiveColumn: x = "archive", addNewOptionPath: p, refreshOptions: h }) => {
|
|
3061
3064
|
var ct;
|
|
3062
|
-
const { texts: { customSelect: y } } =
|
|
3065
|
+
const { texts: { customSelect: y } } = G(oe), b = Z(null), _ = Z(null), j = Z(null), C = Z(null), T = Z(null), [$, R] = E(""), [A] = en($, 500), [, L] = E(!1), { copyToClipboard: P } = fo(), k = (ct = g.current) == null ? void 0 : ct.getBoundingClientRect(), Q = (k == null ? void 0 : k.x) ?? 0, O = ((k == null ? void 0 : k.x) ?? 0) + ((k == null ? void 0 : k.width) ?? 0), N = (k == null ? void 0 : k.y) ?? 0, D = ((k == null ? void 0 : k.y) ?? 0) + ((k == null ? void 0 : k.height) ?? 0), H = (k == null ? void 0 : k.width) ?? 0, Y = (k == null ? void 0 : k.height) ?? 0, X = 5, z = U(() => Q ? Q > window.innerWidth / 2 : !1, [Q]), J = U(() => N ? N > window.innerHeight / 2 : !1, [N]);
|
|
3063
3066
|
B(() => {
|
|
3064
3067
|
var I;
|
|
3065
3068
|
e && ((I = j.current) == null || I.focus());
|
|
@@ -3072,7 +3075,7 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
3072
3075
|
B(() => {
|
|
3073
3076
|
e && r.length > 0 ? re(0) : re(null);
|
|
3074
3077
|
}, [r, e]);
|
|
3075
|
-
const V =
|
|
3078
|
+
const V = U(() => ne !== null ? r.at(ne) ?? null : null, [ne, r]), F = S((I, M) => {
|
|
3076
3079
|
var le, ve;
|
|
3077
3080
|
const W = document.getElementById(`item-${I}`);
|
|
3078
3081
|
if (W) {
|
|
@@ -3108,24 +3111,24 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
3108
3111
|
I.stopPropagation(), I.preventDefault(), ee(1);
|
|
3109
3112
|
break;
|
|
3110
3113
|
}
|
|
3111
|
-
}, [t, e, ee, V, v, a]),
|
|
3114
|
+
}, [t, e, ee, V, v, a]), _e = S(() => {
|
|
3112
3115
|
L((I) => !I);
|
|
3113
3116
|
}, []);
|
|
3114
|
-
B(() => (window.addEventListener("scroll",
|
|
3115
|
-
window.removeEventListener("scroll",
|
|
3116
|
-
}), [
|
|
3117
|
-
window.removeEventListener("resize",
|
|
3118
|
-
}), [
|
|
3119
|
-
const Le =
|
|
3117
|
+
B(() => (window.addEventListener("scroll", _e), () => {
|
|
3118
|
+
window.removeEventListener("scroll", _e);
|
|
3119
|
+
}), [_e]), B(() => (window.addEventListener("resize", _e), () => {
|
|
3120
|
+
window.removeEventListener("resize", _e);
|
|
3121
|
+
}), [_e]), Zr(ae), Qr([b, _, T], t);
|
|
3122
|
+
const Le = l ?? (c && c.length > 0 ? 250 : 0), We = (c == null ? void 0 : c.reduce((I, M) => I + (M.width ?? 100), 0)) ?? 0, se = `calc(max(${H}px, ${Le}px + ${We}px))`, be = U(() => (s && e && !v) ?? !1, [s, e, v]), Ne = U(() => (s && e) ?? !1, [s, e]), et = U(() => e && (Ne || p !== void 0 || h !== void 0), [e, Ne, p, h]);
|
|
3120
3123
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3121
3124
|
/* @__PURE__ */ n.jsx(Us, { show: e, onClick: t }),
|
|
3122
3125
|
/* @__PURE__ */ n.jsxs("div", { className: w("luminus-dropdown-picker-actions", we.actionButtonsContainer, {
|
|
3123
3126
|
[we.reverse]: z
|
|
3124
3127
|
}), style: {
|
|
3125
|
-
top: `calc(${N}px + ${
|
|
3126
|
-
left: z ?
|
|
3128
|
+
top: `calc(${N}px + ${Y / 2}px - 12px)`,
|
|
3129
|
+
left: z ? be && Ne ? `calc(${Q}px - 24px - 8px - 24px - 4px)` : `calc(${Q}px - 24px - 8px)` : `calc(${O}px + 8px)`
|
|
3127
3130
|
}, children: [
|
|
3128
|
-
|
|
3131
|
+
be && /* @__PURE__ */ n.jsx("button", { ref: _, type: "button", className: w("luminus-dropdown-picker-clear-button", we.actionButton), onClick: () => !v && a(null), children: /* @__PURE__ */ n.jsx(K, { variant: "caption", className: "text-danger", children: /* @__PURE__ */ n.jsx(Ur, { size: 16 }) }) }),
|
|
3129
3132
|
et ? /* @__PURE__ */ n.jsx("div", { ref: T, children: /* @__PURE__ */ n.jsxs(ht, { toggle: /* @__PURE__ */ n.jsx(pt, { as: Et, className: w("luminus-dropdown-picker-actions-dropdown", we.actionsDropdown), icon: /* @__PURE__ */ n.jsx(K, { variant: "caption", className: "text-primary", children: /* @__PURE__ */ n.jsx(Oa, { size: 16 }) }) }), children: [
|
|
3130
3133
|
Ne ? /* @__PURE__ */ n.jsx(Ce, { icon: /* @__PURE__ */ n.jsx(Ra, {}), onClick: () => {
|
|
3131
3134
|
var I, M;
|
|
@@ -3148,15 +3151,15 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
3148
3151
|
right: z ? `${O}px` : `calc(${Q}px + ${se})`,
|
|
3149
3152
|
width: se,
|
|
3150
3153
|
justifyContent: J ? "flex-end" : "flex-start"
|
|
3151
|
-
}, children: /* @__PURE__ */ n.jsx("div", { ref:
|
|
3154
|
+
}, children: /* @__PURE__ */ n.jsx("div", { ref: b, className: w("shadow rounded", we.dropdown), children: !v && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3152
3155
|
!o || u && (m ?? r.length) <= X ? null : /* @__PURE__ */ n.jsx("div", { className: w("search-input-container border-bottom", we.searchInputContainer), children: /* @__PURE__ */ n.jsx(ge.Control, { ref: j, type: "search", size: "sm", className: we.searchInput, placeholder: i.searchPlaceholder, value: $, onChange: (I) => {
|
|
3153
3156
|
var M;
|
|
3154
3157
|
return R(((M = I.target) == null ? void 0 : M.value) ?? "");
|
|
3155
3158
|
} }) }),
|
|
3156
3159
|
f ? /* @__PURE__ */ n.jsx("div", { className: we.loadingContainer, children: /* @__PURE__ */ n.jsx(Fn, { animation: "border", variant: "primary" }) }) : r.length > 0 && /* @__PURE__ */ n.jsxs("div", { ref: C, className: w("items", we.itemsContainer), children: [
|
|
3157
|
-
|
|
3160
|
+
c && c.length > 0 && /* @__PURE__ */ n.jsxs("div", { className: w("header-row border-bottom", we.headerRow), children: [
|
|
3158
3161
|
/* @__PURE__ */ n.jsx("div", { className: we.name }),
|
|
3159
|
-
|
|
3162
|
+
c == null ? void 0 : c.filter((I) => I.key !== x).map((I) => /* @__PURE__ */ n.jsx("div", { className: we.columnItem, style: {
|
|
3160
3163
|
width: `${I.width ?? 100}px`,
|
|
3161
3164
|
minWidth: `${I.width ?? 100}px`,
|
|
3162
3165
|
maxWidth: `${I.width ?? 100}px`
|
|
@@ -3170,7 +3173,7 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
3170
3173
|
archive: I.additionalColumns ? I.additionalColumns[x] : !1
|
|
3171
3174
|
}), onClick: () => !v && a(I), onMouseEnter: () => re(M), children: [
|
|
3172
3175
|
/* @__PURE__ */ n.jsx("div", { className: we.name, children: /* @__PURE__ */ n.jsx(K, { variant: "body2", children: d ? I.id : I.name }) }),
|
|
3173
|
-
|
|
3176
|
+
c == null ? void 0 : c.filter((W) => W.key !== x).map((W) => /* @__PURE__ */ n.jsx("div", { className: we.columnItem, style: {
|
|
3174
3177
|
width: `${W.width ?? 100}px`,
|
|
3175
3178
|
minWidth: `${W.width ?? 100}px`,
|
|
3176
3179
|
maxWidth: `${W.width ?? 100}px`
|
|
@@ -3200,12 +3203,12 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
3200
3203
|
header: cc,
|
|
3201
3204
|
item: dc
|
|
3202
3205
|
}, uc = ({ show: e, query: t, onCancel: r, groups: s, isLoading: a, searchTypes: o }) => {
|
|
3203
|
-
const { texts: { appSearch: i } } =
|
|
3206
|
+
const { texts: { appSearch: i } } = G(oe), l = Z(null), c = S((d) => {
|
|
3204
3207
|
var m;
|
|
3205
3208
|
const u = (m = o.find((v) => v.key === d.type)) == null ? void 0 : m.toPath;
|
|
3206
3209
|
return u ? `${u}/${d.searchKey}` : "/not-found";
|
|
3207
3210
|
}, [o]);
|
|
3208
|
-
return Qr([
|
|
3211
|
+
return Qr([l], r), /* @__PURE__ */ n.jsx("div", { ref: l, className: w("luminus-app-search-dropdown shadow rounded", nt.dropdown, {
|
|
3209
3212
|
[nt.open]: e
|
|
3210
3213
|
}), children: a ? /* @__PURE__ */ n.jsx("div", { className: nt.loadingContainer, children: /* @__PURE__ */ n.jsx(Fn, { animation: "border", variant: "primary" }) }) : /* @__PURE__ */ n.jsx("div", { className: nt.groupsContainer, children: s == null ? void 0 : s.map((d) => {
|
|
3211
3214
|
var u;
|
|
@@ -3223,7 +3226,7 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
3223
3226
|
(u = d.items) == null ? void 0 : u.map((m, v) => /* @__PURE__ */ n.jsxs(
|
|
3224
3227
|
Oe,
|
|
3225
3228
|
{
|
|
3226
|
-
to:
|
|
3229
|
+
to: c(m),
|
|
3227
3230
|
className: w("search-item d-flex gap-3 align-items-center justify-content-between", nt.item),
|
|
3228
3231
|
onClick: r,
|
|
3229
3232
|
children: [
|
|
@@ -3236,37 +3239,37 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
3236
3239
|
] }, d.key.category);
|
|
3237
3240
|
}) }) });
|
|
3238
3241
|
}, fc = (e, t) => {
|
|
3239
|
-
const r = Ze(), [s, a] = E(!1), [o, i] = E([]),
|
|
3242
|
+
const r = Ze(), [s, a] = E(!1), [o, i] = E([]), l = !e || !e.key, c = S(() => {
|
|
3240
3243
|
if (t.length < 3) {
|
|
3241
3244
|
i([]);
|
|
3242
3245
|
return;
|
|
3243
3246
|
}
|
|
3244
|
-
a(!0), r.get(`/search/${t}?count=${
|
|
3247
|
+
a(!0), r.get(`/search/${t}?count=${l ? 5 : 20}${l ? "" : `&type=${e.key}`}`).then(({ data: d }) => {
|
|
3245
3248
|
i(d), a(!1);
|
|
3246
3249
|
}).catch(() => {
|
|
3247
3250
|
a(!1);
|
|
3248
3251
|
});
|
|
3249
|
-
}, [e, t, r,
|
|
3252
|
+
}, [e, t, r, l]);
|
|
3250
3253
|
return B(() => {
|
|
3251
|
-
|
|
3252
|
-
}, [
|
|
3254
|
+
c();
|
|
3255
|
+
}, [c]), { isLoading: s, searchItems: o };
|
|
3253
3256
|
}, Ru = ({ searchTypes: e, navigateFunction: t, currentPath: r, homePath: s = "/", className: a }) => {
|
|
3254
3257
|
var y;
|
|
3255
|
-
const { texts: { appSearch: o } } =
|
|
3258
|
+
const { texts: { appSearch: o } } = G(oe), [i, l] = E(e.length > 0 ? ((y = e.at(0)) == null ? void 0 : y.key) ?? null : null), c = U(() => e.find((b) => b.key === i) ?? null, [e, i]), [d, u] = E(""), [m, v] = en(d, 500), { isLoading: f, searchItems: g } = fc(c, m), [x, p] = E(!1);
|
|
3256
3259
|
B(() => {
|
|
3257
3260
|
(g.length > 0 || f) && p(!0);
|
|
3258
3261
|
}, [g, f]);
|
|
3259
3262
|
const h = Z(null);
|
|
3260
3263
|
return B(() => {
|
|
3261
|
-
var
|
|
3262
|
-
u(""), r === s && ((
|
|
3263
|
-
}, [r, s]), /* @__PURE__ */ n.jsx(ge, { onSubmit: (
|
|
3264
|
-
|
|
3264
|
+
var b;
|
|
3265
|
+
u(""), r === s && ((b = h.current) == null || b.focus());
|
|
3266
|
+
}, [r, s]), /* @__PURE__ */ n.jsx(ge, { onSubmit: (b) => {
|
|
3267
|
+
b.preventDefault(), b.stopPropagation(), v.flush(), p(!1), d.length > 2 && t(`/search?query=${d}${c && c.key && `&type=${c == null ? void 0 : c.key}`}`);
|
|
3265
3268
|
}, children: /* @__PURE__ */ n.jsxs(Vt, { className: w(tt.inputGroup, a), children: [
|
|
3266
|
-
/* @__PURE__ */ n.jsx(Vt.Text, { className: w("p-1 rounded", tt.inputGroupText, tt.left), children: /* @__PURE__ */ n.jsx(rc, { searchTypes: e, selectedType:
|
|
3267
|
-
/* @__PURE__ */ n.jsx(ge.Control, { ref: h, placeholder: o.searchPlaceholder, type: "text", size: "sm", className: w("luminus-app-search-input", tt.input), value: d, onChange: (
|
|
3268
|
-
var
|
|
3269
|
-
return u(((
|
|
3269
|
+
/* @__PURE__ */ n.jsx(Vt.Text, { className: w("p-1 rounded", tt.inputGroupText, tt.left), children: /* @__PURE__ */ n.jsx(rc, { searchTypes: e, selectedType: c, setSelectedType: l }) }),
|
|
3270
|
+
/* @__PURE__ */ n.jsx(ge.Control, { ref: h, placeholder: o.searchPlaceholder, type: "text", size: "sm", className: w("luminus-app-search-input", tt.input), value: d, onChange: (b) => {
|
|
3271
|
+
var _;
|
|
3272
|
+
return u(((_ = b.target) == null ? void 0 : _.value) ?? "");
|
|
3270
3273
|
}, onFocus: () => g.length > 0 && p(!0) }),
|
|
3271
3274
|
/* @__PURE__ */ n.jsx(Vt.Text, { className: w("p-0 rounded", tt.inputGroupText, tt.right), children: /* @__PURE__ */ n.jsx("button", { type: "submit", className: w("text-primary", tt.submitButton), children: /* @__PURE__ */ n.jsx(Va, {}) }) }),
|
|
3272
3275
|
/* @__PURE__ */ n.jsx(uc, { query: m, searchTypes: e, show: x, onCancel: () => p(!1), groups: g, isLoading: f })
|
|
@@ -3281,25 +3284,25 @@ const al = ({ closeModal: e, isOpen: t, createLink: r, pageTitlePrefix: s, IconC
|
|
|
3281
3284
|
collapseIcon: xc,
|
|
3282
3285
|
collapsed: vc,
|
|
3283
3286
|
content: jc
|
|
3284
|
-
}, zs = ({ title: e, headerContent: t, children: r, className: s, headerClassName: a, contentClassName: o, dontRenderIfNoChildren: i, ...
|
|
3285
|
-
const
|
|
3287
|
+
}, zs = ({ title: e, headerContent: t, children: r, className: s, headerClassName: a, contentClassName: o, dontRenderIfNoChildren: i, ...l }) => {
|
|
3288
|
+
const c = l.collapsible ? l.controlled ? !1 : l.defaultOpen ?? !1 : !0, [d, u] = E(c), m = l.collapsible ? l.controlled ? l.isOpen : d : !0;
|
|
3286
3289
|
B(() => {
|
|
3287
|
-
u(
|
|
3288
|
-
}, [
|
|
3289
|
-
const v =
|
|
3290
|
+
u(c);
|
|
3291
|
+
}, [c]);
|
|
3292
|
+
const v = U(() => !r || !r.toString() || r.toString().split(",").filter((f) => f && f !== "false").length === 0, [r]);
|
|
3290
3293
|
return i && v ? null : /* @__PURE__ */ n.jsxs("div", { className: w("luminus-card rounded shadow-sm", rt.card, {
|
|
3291
3294
|
[s ?? ""]: s
|
|
3292
3295
|
}), children: [
|
|
3293
|
-
/* @__PURE__ */ n.jsxs("div", { role:
|
|
3296
|
+
/* @__PURE__ */ n.jsxs("div", { role: l.collapsible ? "button" : void 0, className: w("header", rt.header, {
|
|
3294
3297
|
[a ?? ""]: a
|
|
3295
3298
|
}), onClick: () => {
|
|
3296
|
-
|
|
3299
|
+
l.collapsible && (l.controlled ? l.onToggle(!l.isOpen) : u(!d));
|
|
3297
3300
|
}, children: [
|
|
3298
3301
|
/* @__PURE__ */ n.jsxs("div", { className: w("header-content", rt.headerContent), children: [
|
|
3299
3302
|
/* @__PURE__ */ n.jsx(K, { variant: "h6", className: w("text-primary", rt.title), children: e }),
|
|
3300
3303
|
t ?? null
|
|
3301
3304
|
] }),
|
|
3302
|
-
|
|
3305
|
+
l.collapsible && /* @__PURE__ */ n.jsx(Gr, { className: w(rt.collapseIcon, {
|
|
3303
3306
|
[rt.collapsed]: m
|
|
3304
3307
|
}) })
|
|
3305
3308
|
] }),
|
|
@@ -3319,11 +3322,11 @@ var yc = !!(typeof window < "u" && window.document && window.document.createElem
|
|
|
3319
3322
|
return r && e(t.prototype, r), s && e(t, s), t;
|
|
3320
3323
|
};
|
|
3321
3324
|
}();
|
|
3322
|
-
function
|
|
3325
|
+
function bc(e, t) {
|
|
3323
3326
|
if (!(e instanceof t))
|
|
3324
3327
|
throw new TypeError("Cannot call a class as a function");
|
|
3325
3328
|
}
|
|
3326
|
-
function
|
|
3329
|
+
function _c(e, t) {
|
|
3327
3330
|
if (!e)
|
|
3328
3331
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3329
3332
|
return t && (typeof t == "object" || typeof t == "function") ? t : e;
|
|
@@ -3336,7 +3339,7 @@ function Nc(e, t) {
|
|
|
3336
3339
|
var Ws = function(e) {
|
|
3337
3340
|
Nc(t, e);
|
|
3338
3341
|
function t() {
|
|
3339
|
-
return
|
|
3342
|
+
return bc(this, t), _c(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments));
|
|
3340
3343
|
}
|
|
3341
3344
|
return wc(t, [{
|
|
3342
3345
|
key: "componentWillUnmount",
|
|
@@ -3440,23 +3443,23 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3440
3443
|
show: Vc
|
|
3441
3444
|
}, Us = ({ show: e, onClick: t }) => /* @__PURE__ */ n.jsx("div", { className: w("luminus-backdrop", vr.backdrop, {
|
|
3442
3445
|
[vr.show]: e
|
|
3443
|
-
}), onClick: () => t && t() }), Gs = ({ src: e, alt: t, baseUrl: r, customToken: s, placeholder: a, ...o }) => /* @__PURE__ */ n.jsx("img", { ...o, alt: t ?? "", src: e ?? a }), Pc = ({ show: e, onClose: t, photos: r, defaultIndex: s, uploadPhotosText: a, noPhotosText: o, onUploadPhotos: i, photoActions:
|
|
3446
|
+
}), onClick: () => t && t() }), Gs = ({ src: e, alt: t, baseUrl: r, customToken: s, placeholder: a, ...o }) => /* @__PURE__ */ n.jsx("img", { ...o, alt: t ?? "", src: e ?? a }), Pc = ({ show: e, onClose: t, photos: r, defaultIndex: s, uploadPhotosText: a, noPhotosText: o, onUploadPhotos: i, photoActions: l, baseUrl: c, customToken: d, placeholder: u, ImgComponent: m = Gs }) => {
|
|
3444
3447
|
const v = Z(null), [f, g] = E(s), x = r.at(f), p = f > 0, h = f < r.length - 1;
|
|
3445
3448
|
B(() => {
|
|
3446
3449
|
e && g(s);
|
|
3447
3450
|
}, [s, e]), B(() => {
|
|
3448
3451
|
f >= r.length && g(r.length - 1);
|
|
3449
3452
|
}, [r, f]);
|
|
3450
|
-
const y = S((
|
|
3451
|
-
switch (
|
|
3453
|
+
const y = S((b) => {
|
|
3454
|
+
switch (b.key) {
|
|
3452
3455
|
case "ArrowLeft":
|
|
3453
|
-
|
|
3456
|
+
b.stopPropagation(), p && g((_) => _ - 1);
|
|
3454
3457
|
break;
|
|
3455
3458
|
case "ArrowRight":
|
|
3456
|
-
|
|
3459
|
+
b.stopPropagation(), h && g((_) => _ + 1);
|
|
3457
3460
|
break;
|
|
3458
3461
|
case "Escape":
|
|
3459
|
-
|
|
3462
|
+
b.stopPropagation(), t();
|
|
3460
3463
|
break;
|
|
3461
3464
|
}
|
|
3462
3465
|
}, [h, p, t]);
|
|
@@ -3467,15 +3470,15 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3467
3470
|
}), children: e && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3468
3471
|
/* @__PURE__ */ n.jsxs("div", { className: De.header, children: [
|
|
3469
3472
|
/* @__PURE__ */ n.jsxs("div", { className: w("rounded", De.photoActions), children: [
|
|
3470
|
-
i && /* @__PURE__ */ n.jsx(Ds, { accept: ".jpg,.jpeg,.png", onUpload: (
|
|
3471
|
-
|
|
3473
|
+
i && /* @__PURE__ */ n.jsx(Ds, { accept: ".jpg,.jpeg,.png", onUpload: (b) => {
|
|
3474
|
+
b.length > 0 && i(Array.from(b));
|
|
3472
3475
|
}, icon: /* @__PURE__ */ n.jsx(Yr, { style: { fontSize: 18 } }), multiple: !0, className: "me-3", children: a ?? null }),
|
|
3473
|
-
x && (
|
|
3476
|
+
x && (l == null ? void 0 : l.map(({ label: b, onClick: _, ...j }, C) => /* @__PURE__ */ n.jsx(
|
|
3474
3477
|
Pe,
|
|
3475
3478
|
{
|
|
3476
|
-
onClick: () =>
|
|
3479
|
+
onClick: () => _(x.id),
|
|
3477
3480
|
...j,
|
|
3478
|
-
children:
|
|
3481
|
+
children: b
|
|
3479
3482
|
},
|
|
3480
3483
|
`action-${C}`
|
|
3481
3484
|
)))
|
|
@@ -3484,19 +3487,19 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3484
3487
|
] }),
|
|
3485
3488
|
r.length === 0 && /* @__PURE__ */ n.jsx("div", { className: "w-100 h-100 d-flex align-items-center justify-content-center", children: /* @__PURE__ */ n.jsx(K, { variant: "body", children: o ?? "No photos available" }) }),
|
|
3486
3489
|
x && /* @__PURE__ */ n.jsxs("div", { className: De.photoContainer, children: [
|
|
3487
|
-
/* @__PURE__ */ n.jsx("div", { role: p ? "button" : void 0, className: w("align-items-start", De.navButton), onClick: () => p && g((
|
|
3488
|
-
/* @__PURE__ */ n.jsx(m, { src: x.lgSrc, alt: x.alt, className: w("rounded", De.photo), baseUrl:
|
|
3489
|
-
/* @__PURE__ */ n.jsx("div", { role: h ? "button" : void 0, className: w("align-items-end", De.navButton), onClick: () => h && g((
|
|
3490
|
+
/* @__PURE__ */ n.jsx("div", { role: p ? "button" : void 0, className: w("align-items-start", De.navButton), onClick: () => p && g((b) => b - 1), children: p && /* @__PURE__ */ n.jsx(In, { style: { fontSize: "40px" } }) }),
|
|
3491
|
+
/* @__PURE__ */ n.jsx(m, { src: x.lgSrc, alt: x.alt, className: w("rounded", De.photo), baseUrl: c, customToken: d, placeholder: u }),
|
|
3492
|
+
/* @__PURE__ */ n.jsx("div", { role: h ? "button" : void 0, className: w("align-items-end", De.navButton), onClick: () => h && g((b) => b + 1), children: h && /* @__PURE__ */ n.jsx($n, { style: { fontSize: "40px" } }) })
|
|
3490
3493
|
] }),
|
|
3491
|
-
/* @__PURE__ */ n.jsx("div", { className: De.photosPreview, children: r.map((
|
|
3492
|
-
/* @__PURE__ */ n.jsx(m, { role:
|
|
3493
|
-
[De.selected]:
|
|
3494
|
-
}), baseUrl:
|
|
3495
|
-
|
|
3494
|
+
/* @__PURE__ */ n.jsx("div", { className: De.photosPreview, children: r.map((b, _) => /* @__PURE__ */ n.jsxs("div", { role: "button", onClick: () => g(_), className: "position-relative", children: [
|
|
3495
|
+
/* @__PURE__ */ n.jsx(m, { role: _ !== f ? "button" : void 0, src: b.smSrc, alt: b.alt, className: w("rounded", De.photo, {
|
|
3496
|
+
[De.selected]: _ === f
|
|
3497
|
+
}), baseUrl: c, customToken: d, placeholder: u }, b.id),
|
|
3498
|
+
b.isDefault && /* @__PURE__ */ n.jsx("div", { className: w("text-primary", De.defaultIndicator), children: /* @__PURE__ */ n.jsx(Pa, {}) })
|
|
3496
3499
|
] })) })
|
|
3497
3500
|
] }) })
|
|
3498
3501
|
] });
|
|
3499
|
-
}, zc = ({ photos: e, onUploadPhotos: t, uploadPhotosText: r, noPhotosText: s, photoActions: a, baseUrl: o, customToken: i, placeholder:
|
|
3502
|
+
}, zc = ({ photos: e, onUploadPhotos: t, uploadPhotosText: r, noPhotosText: s, photoActions: a, baseUrl: o, customToken: i, placeholder: l, ImgComponent: c = Gs, noLightboxOnlyButtonOnEmpty: d = !1, hideLightbox: u = !1 }) => {
|
|
3500
3503
|
const [m, v] = E(null), f = m !== null ? e[m] : null, [g, x] = E(!1);
|
|
3501
3504
|
return B(() => {
|
|
3502
3505
|
if (e.length === 0) {
|
|
@@ -3509,7 +3512,7 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3509
3512
|
p.length > 0 && t(Array.from(p));
|
|
3510
3513
|
}, icon: /* @__PURE__ */ n.jsx(Yr, { style: { fontSize: 18 } }), multiple: !0, children: r ?? null }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3511
3514
|
f ? /* @__PURE__ */ n.jsxs("div", { role: "button", className: "w-100 position-relative", onClick: () => x(!0), children: [
|
|
3512
|
-
/* @__PURE__ */ n.jsx(
|
|
3515
|
+
/* @__PURE__ */ n.jsx(c, { src: f.smSrc, alt: f.alt, className: "rounded w-100", baseUrl: o, customToken: i, placeholder: l }),
|
|
3513
3516
|
e.length > 1 && /* @__PURE__ */ n.jsx("div", { className: "position-absolute rounded p-1", style: {
|
|
3514
3517
|
top: 0,
|
|
3515
3518
|
right: 0,
|
|
@@ -3517,13 +3520,13 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3517
3520
|
textShadow: "-2px 2px 4px #696969",
|
|
3518
3521
|
background: "rgba(105,105,105,0.5)"
|
|
3519
3522
|
}, children: /* @__PURE__ */ n.jsx(za, { fontSize: 24 }) })
|
|
3520
|
-
] }) : /* @__PURE__ */ n.jsx(Je, { text: r ?? "", placement: "left", children: /* @__PURE__ */ n.jsx("div", { role: "button", className: w("rounded p-3 d-flex justify-content-center"), onClick: () => x(!0), children: /* @__PURE__ */ n.jsx("img", { src:
|
|
3521
|
-
/* @__PURE__ */ n.jsx(Pc, { show: g && !u, onClose: () => x(!1), photos: e, defaultIndex: m ?? 0, uploadPhotosText: r, noPhotosText: s, onUploadPhotos: t, photoActions: a, baseUrl: o, customToken: i, placeholder:
|
|
3523
|
+
] }) : /* @__PURE__ */ n.jsx(Je, { text: r ?? "", placement: "left", children: /* @__PURE__ */ n.jsx("div", { role: "button", className: w("rounded p-3 d-flex justify-content-center"), onClick: () => x(!0), children: /* @__PURE__ */ n.jsx("img", { src: l, alt: "placeholder", className: "rounded w-25" }) }) }),
|
|
3524
|
+
/* @__PURE__ */ n.jsx(Pc, { show: g && !u, onClose: () => x(!1), photos: e, defaultIndex: m ?? 0, uploadPhotosText: r, noPhotosText: s, onUploadPhotos: t, photoActions: a, baseUrl: o, customToken: i, placeholder: l, ImgComponent: c })
|
|
3522
3525
|
] });
|
|
3523
3526
|
}, Mu = ({ children: e }) => {
|
|
3524
|
-
var
|
|
3525
|
-
const { useMsal: t, msalScopes: r, msalExtraScopes: s } =
|
|
3526
|
-
return t ? /* @__PURE__ */ n.jsx(oo, { interactionType: ao.Redirect, authenticationRequest: { scopes: r, extraScopesToConsent: s }, children: i || !a() ? /* @__PURE__ */ n.jsx(Wn, {}) : o.user ?
|
|
3527
|
+
var c, d, u;
|
|
3528
|
+
const { useMsal: t, msalScopes: r, msalExtraScopes: s } = G(Wa), { isAuthenticated: a } = Ha(), { userLoginState: o } = G(Lt), i = o.state === Ua.LOGGING_IN, l = o.user && ((c = o.user) == null ? void 0 : c.permissions) && ((u = (d = o.user) == null ? void 0 : d.permissions) == null ? void 0 : u.length) > 0;
|
|
3529
|
+
return t ? /* @__PURE__ */ n.jsx(oo, { interactionType: ao.Redirect, authenticationRequest: { scopes: r, extraScopesToConsent: s }, children: i || !a() ? /* @__PURE__ */ n.jsx(Wn, {}) : o.user ? l ? /* @__PURE__ */ n.jsx(n.Fragment, { children: e }) : /* @__PURE__ */ n.jsx(Rt, { to: "/user-not-permitted", replace: !0 }) : /* @__PURE__ */ n.jsx(Rt, { to: "/no-user-login", replace: !0 }) }) : i ? /* @__PURE__ */ n.jsx(Wn, {}) : !a() || !o.user ? /* @__PURE__ */ n.jsx(Rt, { to: "/login", replace: !0 }) : l ? e : /* @__PURE__ */ n.jsx(Rt, { to: "/user-not-permitted", replace: !0 });
|
|
3527
3530
|
}, nn = (e) => {
|
|
3528
3531
|
const { variant: t, children: r, className: s, size: a = "md", typographyVariant: o = a === "sm" ? "body2" : "body", ...i } = { ...e };
|
|
3529
3532
|
return /* @__PURE__ */ n.jsx(ko, { variant: t, className: `text-center ${a === "sm" ? "p-1" : a === "md" ? "p-3" : "p-4"} bg-${t} bg-opacity-10 border-none ${s ?? ""}`, ...i, children: /* @__PURE__ */ n.jsx(K, { variant: o, children: r }) });
|
|
@@ -3540,7 +3543,7 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3540
3543
|
"type-icon": "_type-icon_z9z4m_28",
|
|
3541
3544
|
typeIcon: Kc
|
|
3542
3545
|
}, qc = ({ level: e, children: t, customIcon: r, noIcon: s }) => {
|
|
3543
|
-
const { ProjectIconComponent: a } =
|
|
3546
|
+
const { ProjectIconComponent: a } = G(oe), o = S(() => {
|
|
3544
3547
|
switch (e) {
|
|
3545
3548
|
case "info":
|
|
3546
3549
|
return /* @__PURE__ */ n.jsx(a, { icon: "info" });
|
|
@@ -3602,14 +3605,14 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3602
3605
|
/* @__PURE__ */ n.jsx("div", { className: w("text-primary", st.stepIcon), children: t.icon ?? /* @__PURE__ */ n.jsx(Ga, {}) })
|
|
3603
3606
|
] }) })
|
|
3604
3607
|
] }, r)) }), od = (e, t, r, s = !0) => {
|
|
3605
|
-
const a = Ze({ silent: s, differentBaseUrl: t, customToken: r }), [o, i] = E(!1), [
|
|
3606
|
-
i(!0),
|
|
3608
|
+
const a = Ze({ silent: s, differentBaseUrl: t, customToken: r }), [o, i] = E(!1), [l, c] = E(null), d = S(async (u) => {
|
|
3609
|
+
i(!0), c(null), a.get(e, {
|
|
3607
3610
|
signal: u,
|
|
3608
3611
|
responseType: "blob"
|
|
3609
3612
|
}).then((m) => {
|
|
3610
|
-
i(!1),
|
|
3613
|
+
i(!1), c(m.data);
|
|
3611
3614
|
}).catch(() => {
|
|
3612
|
-
i(!1),
|
|
3615
|
+
i(!1), c(null);
|
|
3613
3616
|
});
|
|
3614
3617
|
}, [a, e]);
|
|
3615
3618
|
return B(() => {
|
|
@@ -3617,22 +3620,22 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3617
3620
|
return d(u.signal), () => {
|
|
3618
3621
|
u.abort();
|
|
3619
3622
|
};
|
|
3620
|
-
}, [d]), { data:
|
|
3623
|
+
}, [d]), { data: l, setData: c, reloadData: d, isLoading: o };
|
|
3621
3624
|
}, yr = ({ src: e, alt: t, baseUrl: r, customToken: s, placeholder: a, ...o }) => {
|
|
3622
|
-
const { data: i } = od(e, r, s), [
|
|
3625
|
+
const { data: i } = od(e, r, s), [l, c] = E(null);
|
|
3623
3626
|
return B(() => {
|
|
3624
3627
|
let d = null;
|
|
3625
|
-
return i !== null ? (d = URL.createObjectURL(i),
|
|
3628
|
+
return i !== null ? (d = URL.createObjectURL(i), c(d)) : c(null), () => {
|
|
3626
3629
|
d !== null && URL.revokeObjectURL(d);
|
|
3627
3630
|
};
|
|
3628
|
-
}, [i]),
|
|
3631
|
+
}, [i]), l === null && !a ? null : /* @__PURE__ */ n.jsx("img", { ...o, alt: t ?? "", src: l ?? a });
|
|
3629
3632
|
}, wr = [
|
|
3630
3633
|
["D", "day"],
|
|
3631
3634
|
// ['W', 'week'],
|
|
3632
3635
|
["M", "month"],
|
|
3633
3636
|
["Y", "year"],
|
|
3634
3637
|
["C", "custom"]
|
|
3635
|
-
], id = "_wrapper_qfqux_1", ld = "_lg_qfqux_7", cd = "_sm_qfqux_11", dd = "_md_qfqux_14",
|
|
3638
|
+
], id = "_wrapper_qfqux_1", ld = "_lg_qfqux_7", cd = "_sm_qfqux_11", dd = "_md_qfqux_14", br = {
|
|
3636
3639
|
wrapper: id,
|
|
3637
3640
|
lg: ld,
|
|
3638
3641
|
sm: cd,
|
|
@@ -3655,17 +3658,17 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3655
3658
|
const r = new Date(e);
|
|
3656
3659
|
return Pt(r).to === t ? "M" : Nt(r).to === t ? "Y" : (console.log(Nt(r), t), "C");
|
|
3657
3660
|
}, fd = (e, t, r) => {
|
|
3658
|
-
const s = S((i,
|
|
3661
|
+
const s = S((i, l) => {
|
|
3659
3662
|
if (e === "C") {
|
|
3660
|
-
r((
|
|
3663
|
+
r((c) => ({ ...c, [i]: l }));
|
|
3661
3664
|
return;
|
|
3662
3665
|
}
|
|
3663
3666
|
switch (i) {
|
|
3664
3667
|
case "from":
|
|
3665
|
-
r((
|
|
3666
|
-
if (
|
|
3667
|
-
return
|
|
3668
|
-
const d = new Date(
|
|
3668
|
+
r((c) => {
|
|
3669
|
+
if (l === null)
|
|
3670
|
+
return c;
|
|
3671
|
+
const d = new Date(l);
|
|
3669
3672
|
if (e === "D") {
|
|
3670
3673
|
const u = Ke(d.toISOString());
|
|
3671
3674
|
return {
|
|
@@ -3673,57 +3676,57 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3673
3676
|
to: u
|
|
3674
3677
|
};
|
|
3675
3678
|
}
|
|
3676
|
-
return e === "M" ? Pt(d) : e === "Y" ? Nt(d) :
|
|
3679
|
+
return e === "M" ? Pt(d) : e === "Y" ? Nt(d) : c;
|
|
3677
3680
|
});
|
|
3678
3681
|
break;
|
|
3679
3682
|
case "to":
|
|
3680
|
-
t("C"), r((
|
|
3683
|
+
t("C"), r((c) => ({ ...c, [i]: l }));
|
|
3681
3684
|
break;
|
|
3682
3685
|
}
|
|
3683
3686
|
}, [e, r, t]), a = S((i) => {
|
|
3684
|
-
r((
|
|
3685
|
-
if (
|
|
3686
|
-
return
|
|
3687
|
-
const
|
|
3688
|
-
|
|
3689
|
-
const d = new Date(
|
|
3687
|
+
r((l) => {
|
|
3688
|
+
if (l.from === null || l.to === null)
|
|
3689
|
+
return l;
|
|
3690
|
+
const c = new Date(l.from);
|
|
3691
|
+
c.setHours(c.getHours() - c.getTimezoneOffset() / 60);
|
|
3692
|
+
const d = new Date(l.to);
|
|
3690
3693
|
if (e === "D") {
|
|
3691
|
-
|
|
3692
|
-
const u = Ke(
|
|
3694
|
+
c.setDate(c.getDate() + i);
|
|
3695
|
+
const u = Ke(c.toISOString());
|
|
3693
3696
|
return {
|
|
3694
3697
|
from: u,
|
|
3695
3698
|
to: u
|
|
3696
3699
|
};
|
|
3697
3700
|
}
|
|
3698
|
-
return e === "M" ? (
|
|
3699
|
-
from: Ke(
|
|
3701
|
+
return e === "M" ? (c.setMonth(c.getMonth() + i), Pt(c)) : e === "Y" ? (c.setFullYear(c.getFullYear() + i), Nt(c)) : {
|
|
3702
|
+
from: Ke(c.toISOString()),
|
|
3700
3703
|
to: Ke(d.toISOString())
|
|
3701
3704
|
};
|
|
3702
3705
|
});
|
|
3703
3706
|
}, [e, r]), o = S((i) => {
|
|
3704
|
-
i === "D" ? r((
|
|
3705
|
-
if (
|
|
3706
|
-
return
|
|
3707
|
-
const
|
|
3708
|
-
return Pt(
|
|
3709
|
-
}) : i === "Y" && r((
|
|
3710
|
-
if (
|
|
3711
|
-
return
|
|
3712
|
-
const
|
|
3713
|
-
return Nt(
|
|
3707
|
+
i === "D" ? r((l) => ({ from: l.from, to: l.from })) : i === "M" ? r((l) => {
|
|
3708
|
+
if (l.from === null)
|
|
3709
|
+
return l;
|
|
3710
|
+
const c = Ya(l.from);
|
|
3711
|
+
return Pt(c);
|
|
3712
|
+
}) : i === "Y" && r((l) => {
|
|
3713
|
+
if (l.from === null)
|
|
3714
|
+
return l;
|
|
3715
|
+
const c = Ka(new Date(l.from).getFullYear());
|
|
3716
|
+
return Nt(c);
|
|
3714
3717
|
}), t(i);
|
|
3715
3718
|
}, [r, t]);
|
|
3716
3719
|
return { setFromToProp: s, handleArrowClick: a, handleRangeChange: o };
|
|
3717
3720
|
}, Vu = ({ fromtoState: [e, t], className: r, size: s }) => {
|
|
3718
|
-
const { texts: { date: a }, ProjectIconComponent: o } =
|
|
3721
|
+
const { texts: { date: a }, ProjectIconComponent: o } = G(oe), [i, l] = E("C"), { handleArrowClick: c, handleRangeChange: d, setFromToProp: u } = fd(i, l, t), m = U(() => i === "C", [i]), v = Z(!0);
|
|
3719
3722
|
return B(() => {
|
|
3720
3723
|
if (v.current) {
|
|
3721
3724
|
const f = ud(e.from, e.to);
|
|
3722
|
-
|
|
3725
|
+
l(f), v.current = !1;
|
|
3723
3726
|
}
|
|
3724
|
-
}, [e.from, e.to]), /* @__PURE__ */ n.jsxs("div", { className: w("d-inline-flex align-items-center gap-1",
|
|
3727
|
+
}, [e.from, e.to]), /* @__PURE__ */ n.jsxs("div", { className: w("d-inline-flex align-items-center gap-1", br.wrapper, br[s ?? "md"], r), children: [
|
|
3725
3728
|
/* @__PURE__ */ n.jsx(te, { disabled: m, onClick: () => {
|
|
3726
|
-
|
|
3729
|
+
c(-1);
|
|
3727
3730
|
}, children: /* @__PURE__ */ n.jsx(o, { icon: "chevron-left" }) }),
|
|
3728
3731
|
/* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
3729
3732
|
/* @__PURE__ */ n.jsx(Qe, { type: "date", value: e.from, onChange: (f) => u("from", f === null ? null : f.toString()), InputContainer: Fe, size: s }),
|
|
@@ -3731,21 +3734,21 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3731
3734
|
/* @__PURE__ */ n.jsx(Qe, { type: "date", value: e.to, onChange: (f) => u("to", f === null ? null : f.toString()), InputContainer: Fe, size: s })
|
|
3732
3735
|
] }) }),
|
|
3733
3736
|
/* @__PURE__ */ n.jsx(te, { disabled: m, onClick: () => {
|
|
3734
|
-
|
|
3737
|
+
c(1);
|
|
3735
3738
|
}, children: /* @__PURE__ */ n.jsx(o, { icon: "chevron-right" }) })
|
|
3736
3739
|
] });
|
|
3737
3740
|
}, Pu = ({ defaultMonth: e, searchKey: t = "monthFrom", yearMin: r, yearMax: s }) => {
|
|
3738
|
-
const { localizationContext: a } =
|
|
3739
|
-
|
|
3740
|
-
}, [t,
|
|
3741
|
+
const { localizationContext: a } = G(oe), { dateFnsLocale: o } = G(a), { searchParams: i, setSearch: l } = mo(), c = i.get(t), d = c ? Ct(c) : e, u = S((m) => {
|
|
3742
|
+
l(t, yn(m, { representation: "date" }));
|
|
3743
|
+
}, [t, l]);
|
|
3741
3744
|
return /* @__PURE__ */ n.jsx(Uo, { month: d, onChangeMonth: u, locale: o, yearMin: r, yearMax: s });
|
|
3742
3745
|
}, zu = ({ defaultYear: e, searchKey: t = "yearFrom", ...r }) => {
|
|
3743
|
-
const [s, a] = Jr(t, yn(e, { representation: "date" })), o = s ? Ct(s) : e, i = S((
|
|
3744
|
-
a(yn(
|
|
3746
|
+
const [s, a] = Jr(t, yn(e, { representation: "date" })), o = s ? Ct(s) : e, i = S((l) => {
|
|
3747
|
+
a(yn(l, { representation: "date" }));
|
|
3745
3748
|
}, [a]);
|
|
3746
3749
|
return /* @__PURE__ */ n.jsx(Ko, { year: o, onChangeYear: i, ...r });
|
|
3747
3750
|
}, Wu = ({ data: e, showLegend: t = !1, legendPosition: r = "left", onClick: s }) => {
|
|
3748
|
-
const { chartColorPalette: a } =
|
|
3751
|
+
const { chartColorPalette: a } = G(oe);
|
|
3749
3752
|
return /* @__PURE__ */ n.jsx(Qa, { data: e, margin: {
|
|
3750
3753
|
top: 50,
|
|
3751
3754
|
right: t && r === "right" ? 200 : 100,
|
|
@@ -3797,18 +3800,18 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3797
3800
|
}
|
|
3798
3801
|
t[r] = e[r].value;
|
|
3799
3802
|
}), t;
|
|
3800
|
-
},
|
|
3803
|
+
}, _r = (e, t) => {
|
|
3801
3804
|
const r = {};
|
|
3802
3805
|
return Object.keys(e).forEach((s) => {
|
|
3803
3806
|
var i;
|
|
3804
|
-
const a = e[s], o = (i = t.columns) == null ? void 0 : i.find((
|
|
3807
|
+
const a = e[s], o = (i = t.columns) == null ? void 0 : i.find((l) => l.field === s);
|
|
3805
3808
|
if ((o == null ? void 0 : o.type) === "BIT" && (a === 1 || a === 0)) {
|
|
3806
3809
|
r[s] = { value: a === 1, defaultValue: a === 1 };
|
|
3807
3810
|
return;
|
|
3808
3811
|
}
|
|
3809
3812
|
r[s] = { value: a, defaultValue: a };
|
|
3810
3813
|
}), r;
|
|
3811
|
-
}, hd = "_table_1klfy_1", pd = "_table-header_1klfy_10", gd = "_table-row_1klfy_10", xd = "_table-head_1klfy_10", vd = "_filters-row_1klfy_19", jd = "_table-body_1klfy_30", yd = "_table-cell_1klfy_30", wd = "_action-column_1klfy_43",
|
|
3814
|
+
}, hd = "_table_1klfy_1", pd = "_table-header_1klfy_10", gd = "_table-row_1klfy_10", xd = "_table-head_1klfy_10", vd = "_filters-row_1klfy_19", jd = "_table-body_1klfy_30", yd = "_table-cell_1klfy_30", wd = "_action-column_1klfy_43", bd = "_sticky-top_1klfy_47", _d = "_sticky-first_1klfy_54", Nd = "_sticky-last_1klfy_61", kd = "_sticky-bottom_1klfy_68", me = {
|
|
3812
3815
|
table: hd,
|
|
3813
3816
|
"table-header": "_table-header_1klfy_10",
|
|
3814
3817
|
tableHeader: pd,
|
|
@@ -3825,26 +3828,26 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3825
3828
|
"action-column": "_action-column_1klfy_43",
|
|
3826
3829
|
actionColumn: wd,
|
|
3827
3830
|
"sticky-top": "_sticky-top_1klfy_47",
|
|
3828
|
-
stickyTop:
|
|
3831
|
+
stickyTop: bd,
|
|
3829
3832
|
"sticky-first": "_sticky-first_1klfy_54",
|
|
3830
|
-
stickyFirst:
|
|
3833
|
+
stickyFirst: _d,
|
|
3831
3834
|
"sticky-last": "_sticky-last_1klfy_61",
|
|
3832
3835
|
stickyLast: Nd,
|
|
3833
3836
|
"sticky-bottom": "_sticky-bottom_1klfy_68",
|
|
3834
3837
|
stickyBottom: kd
|
|
3835
3838
|
}, Sd = "_input_pxkkh_1", Ve = {
|
|
3836
3839
|
input: Sd
|
|
3837
|
-
}, Ks = ({ type: e, value: t, field: r, isPrimary: s, isReadonly: a, primaryEditable: o = !1, valuesForSelect: i, addValueToValuesForSelect:
|
|
3840
|
+
}, Ks = ({ type: e, value: t, field: r, isPrimary: s, isReadonly: a, primaryEditable: o = !1, valuesForSelect: i, addValueToValuesForSelect: l, onChangeHandler: c, hideClearIcon: d, clearValue: u, customPickers: m }) => {
|
|
3838
3841
|
var v;
|
|
3839
3842
|
switch (e) {
|
|
3840
3843
|
case "NUM":
|
|
3841
|
-
return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Gt, { withoutLabel: !0, InputContainer: Fe, className: Ve.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) =>
|
|
3844
|
+
return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Gt, { withoutLabel: !0, InputContainer: Fe, className: Ve.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => c(r, f === null ? null : Number(f)), options: i, disabled: a ? !0 : s ? !o : !1, showClearIcon: !d, clearValue: u, dropdownWidth: 200 }) : /* @__PURE__ */ n.jsx(Qe, { withoutLabel: !0, InputContainer: Fe, className: Ve.input, size: "sm", type: "number", value: t === null ? null : Number(t), onChange: (f) => c(r, f === null ? null : Number(f)), disabled: a ? !0 : s ? !o : !1, showClearIcon: !d, clearValue: u });
|
|
3842
3845
|
case "STR":
|
|
3843
|
-
return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Gt, { withoutLabel: !0, InputContainer: Fe, className: Ve.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) =>
|
|
3846
|
+
return i && i.length > 0 ? /* @__PURE__ */ n.jsx(Gt, { withoutLabel: !0, InputContainer: Fe, className: Ve.input, size: "sm", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => c(r, (f == null ? void 0 : f.toString()) ?? null), options: i, disabled: a ? !0 : s ? !o : !1, showClearIcon: !d, clearValue: u, dropdownWidth: 200 }) : /* @__PURE__ */ n.jsx(Qe, { withoutLabel: !0, InputContainer: Fe, className: w(Ve.input, Ve.longer), size: "sm", type: "text", value: (t == null ? void 0 : t.toString()) ?? "", onChange: (f) => c(r, (f == null ? void 0 : f.toString()) ?? null), disabled: a ? !0 : s ? !o : !1, showClearIcon: !d, clearValue: u });
|
|
3844
3847
|
case "BIT":
|
|
3845
|
-
return /* @__PURE__ */ n.jsx(ti, { InputContainer: Fe, className: Ve.input, value: t === !0, onChange: (f) =>
|
|
3848
|
+
return /* @__PURE__ */ n.jsx(ti, { InputContainer: Fe, className: Ve.input, value: t === !0, onChange: (f) => c(r, f), disabled: a ? !0 : s ? !o : !1 });
|
|
3846
3849
|
case "DT":
|
|
3847
|
-
return /* @__PURE__ */ n.jsx(Qe, { withoutLabel: !0, InputContainer: Fe, className: Ve.input, size: "sm", type: "date", value: t ? t.toString().split("T")[0] ?? "" : "", onChange: (f) =>
|
|
3850
|
+
return /* @__PURE__ */ n.jsx(Qe, { withoutLabel: !0, InputContainer: Fe, className: Ve.input, size: "sm", type: "date", value: t ? t.toString().split("T")[0] ?? "" : "", onChange: (f) => c(r, (f == null ? void 0 : f.toString()) ?? null), disabled: a ? !0 : s ? !o : !1, showClearIcon: !d, clearValue: u });
|
|
3848
3851
|
default: {
|
|
3849
3852
|
const f = m == null ? void 0 : m.find((g) => g.type === e);
|
|
3850
3853
|
return f ? /* @__PURE__ */ n.jsx(f.picker, { className: w(Ve.input, Ve.longer), value: t ? {
|
|
@@ -3855,13 +3858,13 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3855
3858
|
})) == null ? void 0 : v.name) ?? ""
|
|
3856
3859
|
} : null, onChange: (g) => {
|
|
3857
3860
|
var x;
|
|
3858
|
-
|
|
3861
|
+
c(r, (g == null ? void 0 : g.id) ?? null), console.log(g, i == null ? void 0 : i.some((p) => {
|
|
3859
3862
|
var h, y;
|
|
3860
3863
|
return ((h = p.id) == null ? void 0 : h.toString()) === ((y = g == null ? void 0 : g.id) == null ? void 0 : y.toString());
|
|
3861
|
-
}),
|
|
3864
|
+
}), l), g && !(i != null && i.some((p) => {
|
|
3862
3865
|
var h, y;
|
|
3863
3866
|
return ((h = p.id) == null ? void 0 : h.toString()) === ((y = g == null ? void 0 : g.id) == null ? void 0 : y.toString());
|
|
3864
|
-
})) &&
|
|
3867
|
+
})) && l && (console.log("adding to values for select"), l({ id: ((x = g.id) == null ? void 0 : x.toString()) ?? "", name: g.name }));
|
|
3865
3868
|
}, disabled: a ? !0 : s ? !o : !1 }) : /* @__PURE__ */ n.jsx("div", { className: "alert alert-warning p-1 m-0", children: /* @__PURE__ */ n.jsxs(K, { variant: "body", children: [
|
|
3866
3869
|
"Neznámý typ ",
|
|
3867
3870
|
e
|
|
@@ -3869,7 +3872,7 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3869
3872
|
}
|
|
3870
3873
|
}
|
|
3871
3874
|
}, Cd = ({ schema: e, columns: t, setColumns: r, initialItem: s, onEdit: a, onDelete: o, customPickers: i }) => {
|
|
3872
|
-
const { ProjectIconComponent:
|
|
3875
|
+
const { ProjectIconComponent: l } = G(oe), [c, d] = E(s), u = S((f, g) => {
|
|
3873
3876
|
console.log("changeValue", f, g), d((x) => ({
|
|
3874
3877
|
...x,
|
|
3875
3878
|
[f]: {
|
|
@@ -3877,21 +3880,21 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3877
3880
|
value: g
|
|
3878
3881
|
}
|
|
3879
3882
|
}));
|
|
3880
|
-
}, []), m = (f) => (f == null ? void 0 : f.value) !== (f == null ? void 0 : f.defaultValue), v = S(() => Object.keys(
|
|
3883
|
+
}, []), m = (f) => (f == null ? void 0 : f.value) !== (f == null ? void 0 : f.defaultValue), v = S(() => Object.keys(c).some((f) => m(c[f])), [c]);
|
|
3881
3884
|
return B(() => {
|
|
3882
3885
|
d(s);
|
|
3883
3886
|
}, [s]), /* @__PURE__ */ n.jsxs("tr", { className: w("table-row", me.tableRow), children: [
|
|
3884
|
-
/* @__PURE__ */ n.jsx("td", { className: w("table-cell", me.tableCell, me.stickyFirst), children: v() && /* @__PURE__ */ n.jsx(te, { color: "success", onClick: () => a(Ys(
|
|
3887
|
+
/* @__PURE__ */ n.jsx("td", { className: w("table-cell", me.tableCell, me.stickyFirst), children: v() && /* @__PURE__ */ n.jsx(te, { color: "success", onClick: () => a(Ys(c)), children: /* @__PURE__ */ n.jsx(l, { icon: "check" }) }) }),
|
|
3885
3888
|
t.map((f) => {
|
|
3886
3889
|
var g, x;
|
|
3887
|
-
return /* @__PURE__ */ n.jsx("td", { className: w("table-cell", me.tableCell), children: /* @__PURE__ */ n.jsx(Ks, { type: f.type, value: (g =
|
|
3890
|
+
return /* @__PURE__ */ n.jsx("td", { className: w("table-cell", me.tableCell), children: /* @__PURE__ */ n.jsx(Ks, { type: f.type, value: (g = c[f.field ?? ""]) == null ? void 0 : g.value, field: f.field, isReadonly: f.readOnly, isPrimary: e.primaryKey === f.field, valuesForSelect: f.valuesForSelect, addValueToValuesForSelect: (p) => {
|
|
3888
3891
|
r(t.map((h) => h.field === f.field ? { ...h, valuesForSelect: [...h.valuesForSelect ?? [], p] } : h));
|
|
3889
|
-
}, onChangeHandler: u, hideClearIcon: !m(
|
|
3892
|
+
}, onChangeHandler: u, hideClearIcon: !m(c[f.field ?? ""]), clearValue: (x = c[f.field ?? ""].defaultValue) == null ? void 0 : x.toString(), customPickers: i }) }, `${e.id}-${f.field}`);
|
|
3890
3893
|
}),
|
|
3891
|
-
/* @__PURE__ */ n.jsx("td", { className: w("table-cell", me.tableCell, me.stickyLast), children: /* @__PURE__ */ n.jsx(te, { color: "danger", onClick: () => o(
|
|
3894
|
+
/* @__PURE__ */ n.jsx("td", { className: w("table-cell", me.tableCell, me.stickyLast), children: /* @__PURE__ */ n.jsx(te, { color: "danger", onClick: () => o(c[e.primaryKey ?? ""].value), children: /* @__PURE__ */ n.jsx(l, { icon: "delete" }) }) })
|
|
3892
3895
|
] });
|
|
3893
3896
|
}, Id = ({ schema: e, columns: t, setColumns: r, onCreate: s, customPickers: a }) => {
|
|
3894
|
-
const { ProjectIconComponent: o } =
|
|
3897
|
+
const { ProjectIconComponent: o } = G(oe), [i, l] = E(null), c = S(() => {
|
|
3895
3898
|
var m;
|
|
3896
3899
|
const u = {};
|
|
3897
3900
|
(m = e.columns) == null || m.forEach((v) => {
|
|
@@ -3900,9 +3903,9 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3900
3903
|
value: f,
|
|
3901
3904
|
defaultValue: f
|
|
3902
3905
|
};
|
|
3903
|
-
}),
|
|
3906
|
+
}), l(u);
|
|
3904
3907
|
}, [e]), d = S((u, m) => {
|
|
3905
|
-
|
|
3908
|
+
l((v) => v && {
|
|
3906
3909
|
...v,
|
|
3907
3910
|
[u]: {
|
|
3908
3911
|
...v[u],
|
|
@@ -3913,14 +3916,14 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3913
3916
|
return i ? /* @__PURE__ */ n.jsxs("tr", { className: "sticky-bottom shadow", children: [
|
|
3914
3917
|
/* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(te, { color: "success", onClick: async () => {
|
|
3915
3918
|
const u = Ys(i);
|
|
3916
|
-
u && await s(u) &&
|
|
3919
|
+
u && await s(u) && l(null);
|
|
3917
3920
|
}, children: /* @__PURE__ */ n.jsx(o, { icon: "check" }) }) }),
|
|
3918
3921
|
t.map((u) => /* @__PURE__ */ n.jsx("td", { children: /* @__PURE__ */ n.jsx(Ks, { type: u.type, value: i[u.field ?? ""].value, field: u.field, isReadonly: u.readOnly, isPrimary: e.primaryKey === u.field, valuesForSelect: u.valuesForSelect, addValueToValuesForSelect: (m) => {
|
|
3919
3922
|
r(t.map((v) => v.field === u.field ? { ...v, valuesForSelect: [...v.valuesForSelect ?? [], m] } : v));
|
|
3920
3923
|
}, onChangeHandler: d, primaryEditable: !0, customPickers: a }) }, `${e.id}-${u.field}`)),
|
|
3921
|
-
/* @__PURE__ */ n.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ n.jsx(te, { color: "danger", onClick: () =>
|
|
3924
|
+
/* @__PURE__ */ n.jsx("td", { className: "sticky-last", children: /* @__PURE__ */ n.jsx(te, { color: "danger", onClick: () => l(null), children: /* @__PURE__ */ n.jsx(o, { icon: "cancel" }) }) })
|
|
3922
3925
|
] }) : /* @__PURE__ */ n.jsxs("tr", { className: "sticky-bottom shadow", children: [
|
|
3923
|
-
/* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(te, { onClick:
|
|
3926
|
+
/* @__PURE__ */ n.jsx("td", { className: "sticky-first", children: /* @__PURE__ */ n.jsx(te, { onClick: c, children: /* @__PURE__ */ n.jsx(o, { icon: "add" }) }) }),
|
|
3924
3927
|
/* @__PURE__ */ n.jsx("td", { colSpan: t.length + 1 })
|
|
3925
3928
|
] });
|
|
3926
3929
|
}, $d = "_resizer_ref0b_1", Dd = "_content_ref0b_11", Ld = "_dragging_ref0b_16", At = {
|
|
@@ -3936,12 +3939,12 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3936
3939
|
}, [r, e]), /* @__PURE__ */ n.jsx("div", { className: w("luminus-column-resizer", At.resizer), draggable: !0, onDragStart: (o) => {
|
|
3937
3940
|
a(o.currentTarget.getBoundingClientRect().x), o.currentTarget.classList.add(At.dragging);
|
|
3938
3941
|
}, onDrag: (o) => {
|
|
3939
|
-
a((i) => (e.current && s((
|
|
3942
|
+
a((i) => (e.current && s((l) => l + o.clientX - (i ?? 0)), o.clientX));
|
|
3940
3943
|
}, onDragEnd: (o) => {
|
|
3941
3944
|
a(null), o.currentTarget.classList.remove(At.dragging);
|
|
3942
3945
|
}, children: /* @__PURE__ */ n.jsx("div", { className: w("content", At.content) }) });
|
|
3943
3946
|
}, Ed = ({ column: e, children: t }) => e.description ? /* @__PURE__ */ n.jsx(Je, { placement: "bottom", text: e.description ?? "", children: /* @__PURE__ */ n.jsx("div", { children: t }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: t }), Fd = ({ column: e, sortByField: t, sortByType: r, setSortBy: s }) => {
|
|
3944
|
-
const { ProjectIconComponent: a } =
|
|
3947
|
+
const { ProjectIconComponent: a } = G(oe), o = Z(null), i = U(() => {
|
|
3945
3948
|
if (e.valuesForSelect && e.valuesForSelect.length > 0)
|
|
3946
3949
|
return 200;
|
|
3947
3950
|
switch (e.type) {
|
|
@@ -3958,12 +3961,12 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3958
3961
|
}
|
|
3959
3962
|
}, [e.type, e.valuesForSelect]);
|
|
3960
3963
|
return /* @__PURE__ */ n.jsxs("th", { ref: o, className: w("table-head", me.tableHead), onClick: () => {
|
|
3961
|
-
const
|
|
3962
|
-
if (
|
|
3964
|
+
const l = t === e.field ? r : null;
|
|
3965
|
+
if (l === "asc") {
|
|
3963
3966
|
s(e.field, "desc");
|
|
3964
3967
|
return;
|
|
3965
3968
|
}
|
|
3966
|
-
if (
|
|
3969
|
+
if (l === "desc") {
|
|
3967
3970
|
s(e.field, null);
|
|
3968
3971
|
return;
|
|
3969
3972
|
}
|
|
@@ -3975,13 +3978,13 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3975
3978
|
] }) }),
|
|
3976
3979
|
/* @__PURE__ */ n.jsx(Td, { cellRef: o, defaultWidth: i })
|
|
3977
3980
|
] });
|
|
3978
|
-
}, Od = ({ schema: e, items: t, onEditItem: r, onDeleteItem: s, onCreateItem: a, filters: o, setFilter: i, sortByField:
|
|
3979
|
-
const { texts: { dynamicForms: v } } =
|
|
3981
|
+
}, Od = ({ schema: e, items: t, onEditItem: r, onDeleteItem: s, onCreateItem: a, filters: o, setFilter: i, sortByField: l, sortByType: c, setSortBy: d, selectedMaster: u, customPickers: m }) => {
|
|
3982
|
+
const { texts: { dynamicForms: v } } = G(oe), [f, g] = E([]);
|
|
3980
3983
|
return B(() => {
|
|
3981
3984
|
var x, p, h;
|
|
3982
3985
|
g([
|
|
3983
3986
|
...((h = (p = (x = e.columns) == null ? void 0 : x.filter((y) => !y.hidden)) == null ? void 0 : p.filter((y) => e.masterReference ? y.field !== e.masterReferenceColumn : !0)) == null ? void 0 : h.map((y) => {
|
|
3984
|
-
var
|
|
3987
|
+
var b;
|
|
3985
3988
|
return {
|
|
3986
3989
|
label: y.caption ?? "",
|
|
3987
3990
|
width: 100,
|
|
@@ -3989,7 +3992,7 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3989
3992
|
field: y.field ?? "",
|
|
3990
3993
|
type: y.type,
|
|
3991
3994
|
readOnly: y.readOnly,
|
|
3992
|
-
valuesForSelect: ((
|
|
3995
|
+
valuesForSelect: ((b = y.values) == null ? void 0 : b.filter((_) => y.valuesFilteredByMaster ? _.masterValue === u : !0).map((_) => ({ id: _.id ?? "", name: _.name }))) ?? void 0
|
|
3993
3996
|
};
|
|
3994
3997
|
})) ?? []
|
|
3995
3998
|
]);
|
|
@@ -3997,7 +4000,7 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
3997
4000
|
/* @__PURE__ */ n.jsxs("thead", { className: w("text-nowrap table-header", me.stickyTop, me.tableHeader), children: [
|
|
3998
4001
|
/* @__PURE__ */ n.jsxs("tr", { className: w("table-row", me.tableRow), children: [
|
|
3999
4002
|
/* @__PURE__ */ n.jsx("th", { className: w("table-head", me.tableHead, me.actionColumn, me.stickyFirst) }),
|
|
4000
|
-
f.map((x) => /* @__PURE__ */ n.jsx(Fd, { column: x, sortByField:
|
|
4003
|
+
f.map((x) => /* @__PURE__ */ n.jsx(Fd, { column: x, sortByField: l, sortByType: c, setSortBy: d }, `${e.id}-${x.field}`)),
|
|
4001
4004
|
/* @__PURE__ */ n.jsx("th", { className: w("table-head", me.tableHead, me.actionColumn, me.stickyLast) })
|
|
4002
4005
|
] }),
|
|
4003
4006
|
/* @__PURE__ */ n.jsxs("tr", { className: w("table-row filters-row", me.tableRow, me.filtersRow), children: [
|
|
@@ -4025,24 +4028,24 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
4025
4028
|
apiItemDelete: "/dynamicForms/delete",
|
|
4026
4029
|
apiItemCreate: "/dynamicForms/insert",
|
|
4027
4030
|
apiExportGet: "/dynamicForms/export"
|
|
4028
|
-
}, Hu = ({ id: e, page: t, setPage: r, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy:
|
|
4031
|
+
}, Hu = ({ id: e, page: t, setPage: r, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy: l, appUrls: { appDetail: c = kr.appDetail } = kr, apiUrls: { apiSchemaGet: d = at.apiSchemaGet, apiDataGet: u = at.apiDataGet, apiItemPost: m = at.apiItemPost, apiItemDelete: v = at.apiItemDelete, apiItemCreate: f = at.apiItemCreate, apiExportGet: g = at.apiExportGet } = at, customPickers: x }) => {
|
|
4029
4032
|
var ce, de, Ie, Te, Ee, dt;
|
|
4030
|
-
const { texts: { dynamicForms: p }, ProjectIconComponent: h } =
|
|
4033
|
+
const { texts: { dynamicForms: p }, ProjectIconComponent: h } = G(oe), y = Ze(), { startLoading: b, stopLoading: _ } = G(Tt), [j, C] = E(null), [T, $] = E(null), [R, A] = E(null), [L, P] = E(null), [k, Q] = E(!1), { addNotification: O } = Pr(), [N, D] = E([]), { confirm: H } = Qt(), Y = 20, X = Y + 1, z = L ? Math.ceil(L.length / Y) : 1, J = t ? t > 1 : !1, ne = t ? t < z : !1, re = t ? (t - 1) * Y : 0, V = t ? t * Y : Y, F = U(() => L ? L.length > X : !1, [L, X]), ee = U(() => F ? (L == null ? void 0 : L.slice(re, V)) ?? null : L ?? null, [F, L, re, V]), [ae, _e] = E(null);
|
|
4031
4034
|
B(() => {
|
|
4032
|
-
C(null), $(null), Q(!1), D([]),
|
|
4035
|
+
C(null), $(null), Q(!1), D([]), _e(null);
|
|
4033
4036
|
}, [e]);
|
|
4034
4037
|
const Le = S(async () => {
|
|
4035
|
-
|
|
4036
|
-
C(q),
|
|
4037
|
-
}).catch(() =>
|
|
4038
|
-
}, [y, e,
|
|
4038
|
+
b("dynamicFormSchema"), await y.get(`${d}?id=${e}`).then(({ data: q }) => {
|
|
4039
|
+
C(q), _("dynamicFormSchema");
|
|
4040
|
+
}).catch(() => _("dynamicFormSchema"));
|
|
4041
|
+
}, [y, e, b, _, d]), We = S(async () => {
|
|
4039
4042
|
var q;
|
|
4040
4043
|
if (!(j === null || ((q = j.id) == null ? void 0 : q.toString()) !== e)) {
|
|
4041
4044
|
if (j.masterReference && !ae) {
|
|
4042
4045
|
$([]);
|
|
4043
4046
|
return;
|
|
4044
4047
|
}
|
|
4045
|
-
|
|
4048
|
+
b("dynamicFormData"), await y.get(`${u}?id=${e}&showArchive=${k}${j.masterReference ? `&master=${ae}` : ""}`).then(({ data: ue }) => {
|
|
4046
4049
|
const pe = ue.map((fe) => {
|
|
4047
4050
|
var xe;
|
|
4048
4051
|
return Object.fromEntries(((xe = j.columns) == null ? void 0 : xe.filter((ye) => ye.field).map((ye) => [
|
|
@@ -4050,20 +4053,20 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
4050
4053
|
{ value: fe[ye.field ?? ""], defaultValue: fe[ye.field ?? ""] }
|
|
4051
4054
|
])) ?? []);
|
|
4052
4055
|
});
|
|
4053
|
-
$(pe),
|
|
4054
|
-
}).catch(() =>
|
|
4056
|
+
$(pe), _("dynamicFormData");
|
|
4057
|
+
}).catch(() => _("dynamicFormData"));
|
|
4055
4058
|
}
|
|
4056
|
-
}, [y, e, j,
|
|
4059
|
+
}, [y, e, j, b, _, k, ae, u]), se = S(async () => {
|
|
4057
4060
|
var q;
|
|
4058
|
-
j === null || ((q = j.id) == null ? void 0 : q.toString()) !== e || j.masterReference && !ae || (
|
|
4061
|
+
j === null || ((q = j.id) == null ? void 0 : q.toString()) !== e || j.masterReference && !ae || (b("dynamicFormExport"), await y.get(`${g}?id=${e}&showArchive=${k}${j.masterReference ? `&master=${ae}` : ""}`, {
|
|
4059
4062
|
responseType: "blob"
|
|
4060
|
-
}).then((ue) => Za(ue, { fallbackName: `export-${e}` })).finally(() =>
|
|
4061
|
-
}, [y, e, j,
|
|
4062
|
-
j && await
|
|
4063
|
+
}).then((ue) => Za(ue, { fallbackName: `export-${e}` })).finally(() => _("dynamicFormExport")));
|
|
4064
|
+
}, [y, e, j, b, _, k, ae, g]), be = S(async (q) => (b("dynamicFormEdit"), y.post(`${m}?id=${e}`, q).then(() => (_("dynamicFormEdit"), D([]), !0)).catch((ue) => (_("dynamicFormEdit"), D(sn(ue)), !1))), [y, e, b, _, m]), Ne = S(async (q) => (b("dynamicFormDelete"), y.delete(`${v}?id=${e}&pk=${q}`).then(() => (_("dynamicFormDelete"), D([]), !0)).catch((ue) => (_("dynamicFormDelete"), D(sn(ue)), !1))), [y, e, b, _, v]), et = S(async (q) => (b("dynamicFormCreate"), y.post(`${f}?id=${e}`, q).then(({ data: ue }) => (_("dynamicFormCreate"), D([]), ue)).catch((ue) => (_("dynamicFormCreate"), D(sn(ue)), null))), [y, e, b, _, f]), ct = S(async (q) => {
|
|
4065
|
+
j && await be(j.masterReference ? { ...q, [j.masterReferenceColumn ?? ""]: ae } : q) && (O(p.editSuccess, "success"), $((ue) => ue && ue.map((pe) => {
|
|
4063
4066
|
var fe;
|
|
4064
|
-
return ((fe = pe[(j == null ? void 0 : j.primaryKey) ?? ""]) == null ? void 0 : fe.value) === q[(j == null ? void 0 : j.primaryKey) ?? ""] ?
|
|
4067
|
+
return ((fe = pe[(j == null ? void 0 : j.primaryKey) ?? ""]) == null ? void 0 : fe.value) === q[(j == null ? void 0 : j.primaryKey) ?? ""] ? _r(q, j) : pe;
|
|
4065
4068
|
})));
|
|
4066
|
-
}, [O,
|
|
4069
|
+
}, [O, be, j, ae, p]), I = S(async (q) => {
|
|
4067
4070
|
await H(p.deleteConfirm) && await Ne(q) && (O(p.deleteSuccess, "success"), $((ue) => ue && ue.filter((pe) => {
|
|
4068
4071
|
var fe;
|
|
4069
4072
|
return ((fe = pe[(j == null ? void 0 : j.primaryKey) ?? ""]) == null ? void 0 : fe.value) !== q;
|
|
@@ -4074,7 +4077,7 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
4074
4077
|
const ue = await et(j.masterReference ? { ...q, [j.masterReferenceColumn ?? ""]: ae } : q);
|
|
4075
4078
|
if (ue !== null) {
|
|
4076
4079
|
O(p.createSuccess, "success");
|
|
4077
|
-
const pe =
|
|
4080
|
+
const pe = _r(q, j);
|
|
4078
4081
|
return pe[(j == null ? void 0 : j.primaryKey) ?? ""] = { value: ue, defaultValue: ue }, $((fe) => [...fe ?? [], pe]), !0;
|
|
4079
4082
|
}
|
|
4080
4083
|
return !1;
|
|
@@ -4170,15 +4173,15 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
4170
4173
|
] })
|
|
4171
4174
|
] }),
|
|
4172
4175
|
(j == null ? void 0 : j.description) && /* @__PURE__ */ n.jsx(K, { variant: "body2", className: "mb-3", children: j == null ? void 0 : j.description }),
|
|
4173
|
-
(j == null ? void 0 : j.masterReference) && /* @__PURE__ */ n.jsx("div", { className: "mb-3 d-flex", children: /* @__PURE__ */ n.jsx(Rd, { label: ((de = (ce = j.columns) == null ? void 0 : ce.find((q) => q.field === j.masterReferenceColumn)) == null ? void 0 : de.caption) ?? "", options: ((Te = (Ie = j.columns) == null ? void 0 : Ie.find((q) => q.field === j.masterReferenceColumn)) == null ? void 0 : Te.values) ?? [], master: ae, onChange: (q) =>
|
|
4176
|
+
(j == null ? void 0 : j.masterReference) && /* @__PURE__ */ n.jsx("div", { className: "mb-3 d-flex", children: /* @__PURE__ */ n.jsx(Rd, { label: ((de = (ce = j.columns) == null ? void 0 : ce.find((q) => q.field === j.masterReferenceColumn)) == null ? void 0 : de.caption) ?? "", options: ((Te = (Ie = j.columns) == null ? void 0 : Ie.find((q) => q.field === j.masterReferenceColumn)) == null ? void 0 : Te.values) ?? [], master: ae, onChange: (q) => _e(q) }) }),
|
|
4174
4177
|
(j == null ? void 0 : j.slaves) && j.slaves.length > 0 && /* @__PURE__ */ n.jsx("div", { className: "mb-3 d-flex align-items-center flex-start gap-1", children: j.slaves.map((q) => {
|
|
4175
4178
|
var ue;
|
|
4176
|
-
return /* @__PURE__ */ n.jsx(Pe, { as: "link", href: `${Ht(
|
|
4179
|
+
return /* @__PURE__ */ n.jsx(Pe, { as: "link", href: `${Ht(c, { id: (ue = q.id) == null ? void 0 : ue.toString() })}?type=dynamic-form`, children: q.name }, q.id);
|
|
4177
4180
|
}) }),
|
|
4178
4181
|
j != null && j.masterReference && !ae ? /* @__PURE__ */ n.jsx(nn, { variant: "warning", children: p.selectMaster(((dt = (Ee = j.columns) == null ? void 0 : Ee.find((q) => q.field === j.masterReferenceColumn)) == null ? void 0 : dt.caption) ?? "").toLowerCase() }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4179
4182
|
j && N.length > 0 && /* @__PURE__ */ n.jsx("div", { className: "mb-2", children: /* @__PURE__ */ n.jsx(md, { errors: N, schema: j }) }),
|
|
4180
4183
|
j && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4181
|
-
/* @__PURE__ */ n.jsx("div", { className: w("rounded border overflow-auto", Nr.tableContainer), children: /* @__PURE__ */ n.jsx(Od, { schema: j, items: !F && L && (L == null ? void 0 : L.length) > X ? [] : (F ? ee : L) ?? [], onEditItem: ct, onDeleteItem: I, onCreateItem: M, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy:
|
|
4184
|
+
/* @__PURE__ */ n.jsx("div", { className: w("rounded border overflow-auto", Nr.tableContainer), children: /* @__PURE__ */ n.jsx(Od, { schema: j, items: !F && L && (L == null ? void 0 : L.length) > X ? [] : (F ? ee : L) ?? [], onEditItem: ct, onDeleteItem: I, onCreateItem: M, filters: s, setFilter: a, sortByField: o, sortByType: i, setSortBy: l, selectedMaster: (ae == null ? void 0 : ae.toString()) ?? null, customPickers: x }) }),
|
|
4182
4185
|
F && t && /* @__PURE__ */ n.jsxs("div", { className: w(Nr.pagination, "d-flex align-items-center gap-3 p-1 border-bottom border-start border-end rounded"), children: [
|
|
4183
4186
|
/* @__PURE__ */ n.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
4184
4187
|
/* @__PURE__ */ n.jsx(te, { color: "primary", onClick: () => W(1), disabled: !J, children: /* @__PURE__ */ n.jsx(h, { icon: "chevron-double-left" }) }),
|
|
@@ -4204,35 +4207,35 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
4204
4207
|
}, Cr = {
|
|
4205
4208
|
apiDynamicFormsGet: "/dynamicForms"
|
|
4206
4209
|
}, Ad = ({ item: e, children: t }) => e.description ? /* @__PURE__ */ n.jsx(Je, { placement: "left", text: e.description ?? "", children: /* @__PURE__ */ n.jsx("div", { children: t }) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: t }), Uu = ({ activeId: e, otherForms: t = [], groupsDefs: r = [], searchQuery: s, fullSize: a, appUrls: { appDetail: o = Sr.appDetail } = Sr, apiUrls: { apiDynamicFormsGet: i = Cr.apiDynamicFormsGet } = Cr }) => {
|
|
4207
|
-
const
|
|
4210
|
+
const l = Ze(), { startLoading: c, stopLoading: d } = G(Tt), [u, m] = E(null), [v] = Jr("search", ""), f = U(() => [
|
|
4208
4211
|
...(u == null ? void 0 : u.map((p) => ({
|
|
4209
4212
|
...p,
|
|
4210
4213
|
type: "dynamic-form"
|
|
4211
4214
|
}))) ?? [],
|
|
4212
4215
|
...t
|
|
4213
|
-
].filter((p) => qe(p.name, s) || qe(p.description, s)).sort((p, h) => (p.name ?? "").localeCompare(h.name ?? "")) ?? [], [u, t, s]), g =
|
|
4216
|
+
].filter((p) => qe(p.name, s) || qe(p.description, s)).sort((p, h) => (p.name ?? "").localeCompare(h.name ?? "")) ?? [], [u, t, s]), g = U(() => r.map((p) => ({
|
|
4214
4217
|
id: p.id,
|
|
4215
4218
|
name: p.name ?? "",
|
|
4216
4219
|
items: f.filter((h) => h.group === p.id)
|
|
4217
4220
|
})).filter((p) => p.items.length > 0), [r, f]), x = S(async () => {
|
|
4218
|
-
|
|
4221
|
+
c("dynamicForms"), await l.get(i).then(({ data: p }) => {
|
|
4219
4222
|
m(p), d("dynamicForms");
|
|
4220
4223
|
}).catch(() => d("dynamicForms"));
|
|
4221
|
-
}, [
|
|
4224
|
+
}, [l, c, d, i]);
|
|
4222
4225
|
return B(() => {
|
|
4223
4226
|
!u && x();
|
|
4224
4227
|
}, [x, u]), f.length > 0 ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx("div", { className: "w-auto list-group forms-items overflow-x-hidden", children: g.map((p) => /* @__PURE__ */ n.jsx(Yt, { title: p.name, defaultOpen: !0, children: p.items.map((h) => {
|
|
4225
|
-
var y,
|
|
4226
|
-
return a ? /* @__PURE__ */ n.jsxs(Oe, { to: `${Ht(o, { id: (y = h.id) == null ? void 0 : y.toString() })}?type=${h.type}&search=${v ?? ""}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((
|
|
4228
|
+
var y, b, _, j;
|
|
4229
|
+
return a ? /* @__PURE__ */ n.jsxs(Oe, { to: `${Ht(o, { id: (y = h.id) == null ? void 0 : y.toString() })}?type=${h.type}&search=${v ?? ""}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((b = h.id) == null ? void 0 : b.toString()) ? "active" : ""}`, children: [
|
|
4227
4230
|
/* @__PURE__ */ n.jsx(K, { variant: "body", children: h.name }),
|
|
4228
4231
|
h.description && /* @__PURE__ */ n.jsx(K, { variant: "body2", className: "text-muted mt-2", children: h.description })
|
|
4229
|
-
] }, h.id) : /* @__PURE__ */ n.jsx(Ad, { item: h, children: /* @__PURE__ */ n.jsx(Oe, { to: `${Ht(o, { id: (
|
|
4232
|
+
] }, h.id) : /* @__PURE__ */ n.jsx(Ad, { item: h, children: /* @__PURE__ */ n.jsx(Oe, { to: `${Ht(o, { id: (_ = h.id) == null ? void 0 : _.toString() })}?type=${h.type}&search=${v ?? ""}`, className: `text-nowrap list-group-item list-group-item-action ${(e == null ? void 0 : e.toString()) === ((j = h.id) == null ? void 0 : j.toString()) ? "active" : ""}`, children: /* @__PURE__ */ n.jsx(K, { variant: "body2", children: h.name }) }) }, h.id);
|
|
4230
4233
|
}) }, p.id)) }) }) : null;
|
|
4231
4234
|
}, Gu = ({ label: e, to: t, value: r }) => /* @__PURE__ */ n.jsxs(Ae, { label: e, children: [
|
|
4232
4235
|
/* @__PURE__ */ n.jsx("input", { disabled: !0, className: "form-control d-none" }),
|
|
4233
4236
|
t ? /* @__PURE__ */ n.jsx(Oe, { to: t, className: "border-bottom luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center", children: r }) : /* @__PURE__ */ n.jsx("div", { className: "luminus-dropdown-picker-link form-control d-flex justify-content-end align-items-center", children: r })
|
|
4234
4237
|
] }), Yu = () => {
|
|
4235
|
-
const { localizationContext: e } =
|
|
4238
|
+
const { localizationContext: e } = G(oe), { language: t, setLanguage: r } = G(e), s = (a) => {
|
|
4236
4239
|
r(a);
|
|
4237
4240
|
};
|
|
4238
4241
|
return /* @__PURE__ */ n.jsx(Ce, { onClick: (a) => {
|
|
@@ -4247,16 +4250,16 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
4247
4250
|
/* @__PURE__ */ n.jsx("span", { children: "CZ" })
|
|
4248
4251
|
] }) });
|
|
4249
4252
|
}, Ku = ({ controlId: e, ...t }) => /* @__PURE__ */ n.jsx(ge.Group, { controlId: e, ...t }), qu = ({ employeeId: e, alt: t, noPhotoImage: r, cafmApiUrl: s, showLargeInLightBox: a = !1 }) => {
|
|
4250
|
-
const { user: o } =
|
|
4253
|
+
const { user: o } = G(Lt), { photoPath: i, photoPathSm: l } = ho(e);
|
|
4251
4254
|
return /* @__PURE__ */ n.jsx(n.Fragment, { children: e && /* @__PURE__ */ n.jsx(n.Fragment, { children: a ? /* @__PURE__ */ n.jsx(zc, { baseUrl: s, customToken: o.cafmToken ?? void 0, photos: [
|
|
4252
4255
|
{
|
|
4253
4256
|
id: e.toString(),
|
|
4254
4257
|
alt: t ?? "",
|
|
4255
4258
|
isDefault: !0,
|
|
4256
|
-
smSrc:
|
|
4259
|
+
smSrc: l,
|
|
4257
4260
|
lgSrc: i
|
|
4258
4261
|
}
|
|
4259
|
-
], placeholder: r, ImgComponent: yr }) : /* @__PURE__ */ n.jsx(yr, { baseUrl: s, customToken: o.cafmToken ?? void 0, src:
|
|
4262
|
+
], placeholder: r, ImgComponent: yr }) : /* @__PURE__ */ n.jsx(yr, { baseUrl: s, customToken: o.cafmToken ?? void 0, src: l, alt: t, placeholder: r, className: "rounded w-100" }) }) });
|
|
4260
4263
|
}, Qu = ({ text: e, setText: t, onSearchButtonClick: r, className: s }) => {
|
|
4261
4264
|
const a = (o) => {
|
|
4262
4265
|
t(o);
|
|
@@ -4299,7 +4302,7 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
4299
4302
|
"card-title-link": "_card-title-link_1gvpy_22",
|
|
4300
4303
|
cardTitleLink: Gd
|
|
4301
4304
|
}, Yd = ({ reportsLastUsedGet: e, getReportRoute: t, getReportName: r }) => {
|
|
4302
|
-
const { texts: { reports: s } } =
|
|
4305
|
+
const { texts: { reports: s } } = G(oe), { data: a } = It(e);
|
|
4303
4306
|
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(Yt, { defaultOpen: !0, title: s.index.lastUsedReports, children: /* @__PURE__ */ n.jsx(ws, { children: a && a.map((o) => o.versions.map((i) => /* @__PURE__ */ n.jsxs(Ft, { as: Oe, to: t(o, i.id), className: "p-1 px-2", action: !0, children: [
|
|
4304
4307
|
/* @__PURE__ */ n.jsx(K, { variant: "body2", className: "text-uppercase", children: r(o) }),
|
|
4305
4308
|
/* @__PURE__ */ n.jsxs(K, { variant: "caption", className: "d-flex justify-content-between align-items-center gap-3 text-dark", children: [
|
|
@@ -4311,25 +4314,25 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
4311
4314
|
reportsGet: "/reports",
|
|
4312
4315
|
reportsLastUsedGet: "/reports/last-used"
|
|
4313
4316
|
}, Xu = ({ groups: e, apiUrls: { reportsGet: t = gn.reportsGet, reportsLastUsedGet: r = gn.reportsLastUsedGet } = gn, getReportName: s, getReportDescription: a, getGroupTitle: o, getReportRoute: i }) => {
|
|
4314
|
-
const { texts: { reports:
|
|
4317
|
+
const { texts: { reports: l } } = G(oe), [c, d] = E(""), [u] = en(c, 500), m = S((p) => p.map((h) => ({
|
|
4315
4318
|
...h,
|
|
4316
4319
|
groupId: !h.groupId || h.groupId === 0 || !e.some((y) => y === h.groupId) ? 999 : h.groupId
|
|
4317
|
-
})), [e]), { data: v } = It(t, { dataTransformer: m }), f =
|
|
4320
|
+
})), [e]), { data: v } = It(t, { dataTransformer: m }), f = U(() => {
|
|
4318
4321
|
if (v === null)
|
|
4319
4322
|
return {};
|
|
4320
4323
|
const p = {};
|
|
4321
4324
|
return e.forEach((h) => {
|
|
4322
|
-
p[h] = v.filter((y) => y.groupId === h && (qe(s(y), u) || qe(a(y), u) || y.versions.some((
|
|
4325
|
+
p[h] = v.filter((y) => y.groupId === h && (qe(s(y), u) || qe(a(y), u) || y.versions.some((b) => qe(b.name, u))));
|
|
4323
4326
|
}), p;
|
|
4324
|
-
}, [u, e, v, a, s]), g =
|
|
4327
|
+
}, [u, e, v, a, s]), g = U(() => e.filter((p) => {
|
|
4325
4328
|
var h;
|
|
4326
4329
|
return ((h = f[p]) == null ? void 0 : h.length) > 0;
|
|
4327
4330
|
}), [f, e]), { isMobile: x } = Zt();
|
|
4328
4331
|
return /* @__PURE__ */ n.jsxs(zr, { variant: "fullScreen", sideContent: /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx(Yd, { reportsLastUsedGet: r, getReportName: s, getReportRoute: i }) }), children: [
|
|
4329
|
-
/* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(ge.Control, { className: "mb-3", type: "search", value:
|
|
4332
|
+
/* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(ge.Control, { className: "mb-3", type: "search", value: c, onChange: (p) => {
|
|
4330
4333
|
var h;
|
|
4331
4334
|
return d(((h = p.target) == null ? void 0 : h.value) ?? "");
|
|
4332
|
-
}, placeholder:
|
|
4335
|
+
}, placeholder: l.index.search }) }),
|
|
4333
4336
|
/* @__PURE__ */ n.jsx("div", { className: "overflow-x-hidden luminus-thin-scrollbar luminus-reports-index", children: g.map((p) => /* @__PURE__ */ n.jsxs("div", { className: w(ut.cardsGroup, { [ut.mobile]: x }), children: [
|
|
4334
4337
|
/* @__PURE__ */ n.jsx("div", { className: w("group-title", ut.groupTitle), children: /* @__PURE__ */ n.jsx(Pd, { text: o(p) }) }),
|
|
4335
4338
|
/* @__PURE__ */ n.jsx("div", { className: w(ut.groupContent), children: /* @__PURE__ */ n.jsx("div", { className: w("row gx-3 gy-3"), children: f[p].map((h) => /* @__PURE__ */ n.jsx("div", { className: "col-12 col-lg-4", children: /* @__PURE__ */ n.jsxs(
|
|
@@ -4356,15 +4359,15 @@ const $c = "_lightbox_18t5m_1", Dc = "_show_18t5m_16", Lc = "_header_18t5m_20",
|
|
|
4356
4359
|
sm: qd,
|
|
4357
4360
|
lg: Qd
|
|
4358
4361
|
}, ef = ({ children: e, useMiniDetail: t, miniDetailProps: r, placement: s = "bottom", trigger: a = ["hover"], delayMs: o = 500 }) => {
|
|
4359
|
-
const [i,
|
|
4362
|
+
const [i, l] = E(!1), { isLoading: c, detail: d, heading: u, tooltipWidth: m } = t({
|
|
4360
4363
|
...r,
|
|
4361
4364
|
enabled: i
|
|
4362
4365
|
}), v = Z(null);
|
|
4363
4366
|
return /* @__PURE__ */ n.jsx("div", { onMouseEnter: () => {
|
|
4364
|
-
v.current = window.setTimeout(() =>
|
|
4367
|
+
v.current = window.setTimeout(() => l(!0), o);
|
|
4365
4368
|
}, onMouseLeave: () => {
|
|
4366
|
-
v.current && clearTimeout(v.current),
|
|
4367
|
-
}, children: i ? /* @__PURE__ */ n.jsx(eo, { heading:
|
|
4369
|
+
v.current && clearTimeout(v.current), l(!1);
|
|
4370
|
+
}, children: i ? /* @__PURE__ */ n.jsx(eo, { heading: c ? /* @__PURE__ */ n.jsx(K, { variant: "body2", className: "placeholder-glow", children: /* @__PURE__ */ n.jsx("span", { className: "placeholder bg-primary col-6" }) }) : u, content: /* @__PURE__ */ n.jsx(n.Fragment, { children: c ? /* @__PURE__ */ n.jsxs(K, { variant: "body2", className: "placeholder-glow", children: [
|
|
4368
4371
|
/* @__PURE__ */ n.jsxs("div", { className: "d-flex justify-content-between py-1", children: [
|
|
4369
4372
|
/* @__PURE__ */ n.jsx("span", { className: "placeholder col-5" }),
|
|
4370
4373
|
/* @__PURE__ */ n.jsx("span", { className: "placeholder col-4" })
|
|
@@ -4429,10 +4432,10 @@ export {
|
|
|
4429
4432
|
ju as HookFormDropdownPicker,
|
|
4430
4433
|
yu as HookFormFileInput,
|
|
4431
4434
|
wu as HookFormFloatingSubmit,
|
|
4432
|
-
|
|
4435
|
+
_u as HookFormNumericStepperInput,
|
|
4433
4436
|
Nu as HookFormNumericTextInput,
|
|
4434
4437
|
vu as HookFormRadioInput,
|
|
4435
|
-
|
|
4438
|
+
bu as HookFormSelectInput,
|
|
4436
4439
|
of as HookFormTextAreaInput,
|
|
4437
4440
|
lf as HookFormTextInput,
|
|
4438
4441
|
Pd as HrWithText,
|