react-luminus-components 1.5.11 → 1.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as i, c as I, t as Re, s as Fi, g as Vi, m as qc, d as br, a as Yc, b as Kc, e as St, f as Ga, h as Xc, i as Qc, k as Jc, l as Zc, n as ed, o as td, p as nd, T as Is, q as _s, r as $i, E as rd, u as Os, v as Ua, w as Ps, x as ad, y as Ae, z as Wa, F as As, A as id, B as od, C as sd, D as ld, M as cd, G as dd, H as ud, I as pd, J as fd, K as md, L as Da, N as gd, O as vd, P as X, Q as vt, R as hd, S as bd, U as Kt, V as te, W as Ha, X as Se, Y as za, Z as lt, _ as qe, $ as de, a0 as pt, a1 as F, a2 as Ar, a3 as xd, a4 as yd, a5 as wd, a6 as Ts, a7 as Nd, a8 as jd, a9 as gt, aa as Dd, ab as Sd, ac as jr, ad as re, ae as Rs, af as Cd, ag as Ed, ah as Id, ai as ks, aj as Bs, ak as Ls, al as Sa, am as kt, an as _d, ao as ze, ap as Od, aq as Pd, ar as Ad, as as Bt, at as Td, au as Ms, av as Rd, aw as Ke, ax as bn, ay as kd, az as dt, aA as qa, aB as Ya, aC as Fs, aD as Ka, aE as Vs, aF as $s, aG as Pe, aH as It, aI as Bd, aJ as Ld, aK as st, aL as Lt, aM as Mt, aN as Md, aO as Ye, aP as At, aQ as Fd, aR as wt, aS as Vd, aT as $d, aU as En, aV as ut, aW as Gs, aX as ht, aY as Jt, aZ as Gd, a_ as Yr, a$ as Zt, b0 as Us, b1 as rn, b2 as Ud, b3 as Wd, b4 as Mn, b5 as Tr, b6 as pn, b7 as Dr, b8 as Xa, b9 as Tt, ba as Hd, bb as Ws, bc as or, bd as Nt, be as en, bf as fn, bg as zd, bh as Rr, bi as Hs, bj as cn, bk as kr, bl as Qa, bm as qd, bn as Yd, bo as Kd, bp as Xd, bq as Qd, br as Jd, bs as zs, bt as Zd, bu as eu, bv as tu, bw as nu, bx as ru, by as au } from "./ShortcutLinksContext-Dm-_MK1U.js";
|
|
2
2
|
import { bB as eD, bz as tD, bA as nD } from "./ShortcutLinksContext-Dm-_MK1U.js";
|
|
3
3
|
import * as Ie from "react";
|
|
4
|
-
import le, { useCallback as A, useMemo as R, useState as
|
|
4
|
+
import le, { useCallback as A, useMemo as R, useState as B, useRef as Z, useEffect as z, useContext as V, useId as iu, Component as ou, isValidElement as Gi, Suspense as su, useLayoutEffect as Ja, useReducer as lu, Fragment as cu } from "react";
|
|
5
5
|
import { c as xt, a as du, b as uu, L as Ca, F as pu } from "./FormDisabledProvider-L1ULwQ3L.js";
|
|
6
6
|
import { InteractionType as fu } from "@azure/msal-browser";
|
|
7
7
|
import { MsalAuthenticationTemplate as mu } from "@azure/msal-react";
|
|
@@ -96,8 +96,8 @@ function Ia(e, t) {
|
|
|
96
96
|
if (a !== "date") {
|
|
97
97
|
const u = n.getTimezoneOffset();
|
|
98
98
|
if (u !== 0) {
|
|
99
|
-
const b = Math.abs(u),
|
|
100
|
-
s = `${u < 0 ? "+" : "-"}${
|
|
99
|
+
const b = Math.abs(u), h = St(Math.trunc(b / 60), 2), v = St(b % 60, 2);
|
|
100
|
+
s = `${u < 0 ? "+" : "-"}${h}:${v}`;
|
|
101
101
|
} else
|
|
102
102
|
s = "Z";
|
|
103
103
|
const d = St(n.getHours(), 2), p = St(n.getMinutes(), 2), f = St(n.getSeconds(), 2), m = o === "" ? "" : "T", g = [d, p, f].join(c);
|
|
@@ -175,24 +175,24 @@ const Au = {
|
|
|
175
175
|
getDimensionValue: m = Pu,
|
|
176
176
|
...g
|
|
177
177
|
}, b) => {
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
}, e), [
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
}, t), [
|
|
184
|
-
|
|
185
|
-
}, n), [
|
|
186
|
-
|
|
187
|
-
}, r), [r, m,
|
|
188
|
-
|
|
189
|
-
}, a), [
|
|
178
|
+
const h = typeof l == "function" ? l() : l, v = R(() => In((S) => {
|
|
179
|
+
S.style[h] = "0";
|
|
180
|
+
}, e), [h, e]), x = R(() => In((S) => {
|
|
181
|
+
const C = `scroll${h[0].toUpperCase()}${h.slice(1)}`;
|
|
182
|
+
S.style[h] = `${S[C]}px`;
|
|
183
|
+
}, t), [h, t]), N = R(() => In((S) => {
|
|
184
|
+
S.style[h] = null;
|
|
185
|
+
}, n), [h, n]), y = R(() => In((S) => {
|
|
186
|
+
S.style[h] = `${m(h, S)}px`, ad(S);
|
|
187
|
+
}, r), [r, m, h]), w = R(() => In((S) => {
|
|
188
|
+
S.style[h] = null;
|
|
189
|
+
}, a), [h, a]);
|
|
190
190
|
return /* @__PURE__ */ i.jsx(Is, {
|
|
191
191
|
ref: b,
|
|
192
192
|
addEndListener: _s,
|
|
193
193
|
...g,
|
|
194
194
|
"aria-expanded": g.role ? c : null,
|
|
195
|
-
onEnter:
|
|
195
|
+
onEnter: v,
|
|
196
196
|
onEntering: x,
|
|
197
197
|
onEntered: N,
|
|
198
198
|
onExit: y,
|
|
@@ -203,9 +203,9 @@ const Au = {
|
|
|
203
203
|
mountOnEnter: d,
|
|
204
204
|
unmountOnExit: p,
|
|
205
205
|
appear: f,
|
|
206
|
-
children: (
|
|
207
|
-
...
|
|
208
|
-
className: I(o, s.props.className, Au[
|
|
206
|
+
children: (S, C) => /* @__PURE__ */ le.cloneElement(s, {
|
|
207
|
+
...C,
|
|
208
|
+
className: I(o, s.props.className, Au[S], h === "width" && "collapse-horizontal")
|
|
209
209
|
})
|
|
210
210
|
});
|
|
211
211
|
}), ni = /* @__PURE__ */ Ie.forwardRef(({
|
|
@@ -412,7 +412,7 @@ const yr = Object.assign(il, {
|
|
|
412
412
|
return r || (r = t.matchMedia(e), r.refCount = 0, n.set(r.media, r)), r;
|
|
413
413
|
};
|
|
414
414
|
function Lu(e, t = typeof window > "u" ? void 0 : window) {
|
|
415
|
-
const n = Xi(e, t), [r, a] =
|
|
415
|
+
const n = Xi(e, t), [r, a] = B(() => n ? n.matches : !1);
|
|
416
416
|
return od(() => {
|
|
417
417
|
let o = Xi(e, t);
|
|
418
418
|
if (!o)
|
|
@@ -551,37 +551,37 @@ const dl = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
551
551
|
container: m,
|
|
552
552
|
autoFocus: g = !0,
|
|
553
553
|
enforceFocus: b = !0,
|
|
554
|
-
restoreFocus:
|
|
555
|
-
restoreFocusOptions:
|
|
554
|
+
restoreFocus: h = !0,
|
|
555
|
+
restoreFocusOptions: v,
|
|
556
556
|
onEntered: x,
|
|
557
557
|
onExit: N,
|
|
558
558
|
onExiting: y,
|
|
559
559
|
onEnter: w,
|
|
560
|
-
onEntering:
|
|
561
|
-
onExited:
|
|
560
|
+
onEntering: S,
|
|
561
|
+
onExited: C,
|
|
562
562
|
backdropClassName: _,
|
|
563
|
-
manager:
|
|
563
|
+
manager: E,
|
|
564
564
|
renderStaticNode: O = !1,
|
|
565
565
|
...T
|
|
566
|
-
},
|
|
566
|
+
}, k) => {
|
|
567
567
|
const j = Z();
|
|
568
568
|
e = Ae(e, "offcanvas");
|
|
569
|
-
const [P, W] =
|
|
569
|
+
const [P, W] = B(!1), M = ld(f), $ = Fu(o || "xs", "up");
|
|
570
570
|
z(() => {
|
|
571
571
|
W(o ? s && !$ : s);
|
|
572
572
|
}, [s, o, $]);
|
|
573
573
|
const Y = R(() => ({
|
|
574
|
-
onHide:
|
|
575
|
-
}), [
|
|
574
|
+
onHide: M
|
|
575
|
+
}), [M]);
|
|
576
576
|
function U() {
|
|
577
|
-
return
|
|
577
|
+
return E || (u ? (j.current || (j.current = new pd({
|
|
578
578
|
handleContainerOverflow: !1
|
|
579
579
|
})), j.current) : fd());
|
|
580
580
|
}
|
|
581
581
|
const q = (se, ...xe) => {
|
|
582
582
|
se && (se.style.visibility = "visible"), w == null || w(se, ...xe);
|
|
583
583
|
}, Q = (se, ...xe) => {
|
|
584
|
-
se && (se.style.visibility = ""),
|
|
584
|
+
se && (se.style.visibility = ""), C == null || C(...xe);
|
|
585
585
|
}, ne = A((se) => /* @__PURE__ */ i.jsx("div", {
|
|
586
586
|
...se,
|
|
587
587
|
className: I(`${e}-backdrop`, _)
|
|
@@ -597,19 +597,19 @@ const dl = /* @__PURE__ */ Ie.forwardRef(({
|
|
|
597
597
|
value: Y,
|
|
598
598
|
children: /* @__PURE__ */ i.jsx(dd, {
|
|
599
599
|
show: P,
|
|
600
|
-
ref:
|
|
600
|
+
ref: k,
|
|
601
601
|
backdrop: l,
|
|
602
602
|
container: m,
|
|
603
603
|
keyboard: c,
|
|
604
604
|
autoFocus: g,
|
|
605
605
|
enforceFocus: b && !u,
|
|
606
|
-
restoreFocus:
|
|
607
|
-
restoreFocusOptions:
|
|
606
|
+
restoreFocus: h,
|
|
607
|
+
restoreFocusOptions: v,
|
|
608
608
|
onEscapeKeyDown: d,
|
|
609
609
|
onShow: p,
|
|
610
|
-
onHide:
|
|
610
|
+
onHide: M,
|
|
611
611
|
onEnter: q,
|
|
612
|
-
onEntering:
|
|
612
|
+
onEntering: S,
|
|
613
613
|
onEntered: x,
|
|
614
614
|
onExit: N,
|
|
615
615
|
onExiting: y,
|
|
@@ -877,7 +877,7 @@ const ep = (e) => (n) => {
|
|
|
877
877
|
widgetTitle: cp,
|
|
878
878
|
title: dp
|
|
879
879
|
}, up = ({ show: e, widgetGroups: t, widgets: n, handleClose: r, onWidgetPicked: a, texts: o }) => {
|
|
880
|
-
const [s, l] =
|
|
880
|
+
const [s, l] = B(""), c = R(() => n.filter((d) => d.id !== -1 && qe(d.name, s)), [n, s]), u = R(() => t.filter((d) => c.some((p) => p.group === d.id)), [t, c]);
|
|
881
881
|
return /* @__PURE__ */ i.jsxs(de, { show: e, onHide: () => r(), size: "lg", children: [
|
|
882
882
|
/* @__PURE__ */ i.jsxs(de.Header, { closeButton: !0, children: [
|
|
883
883
|
/* @__PURE__ */ i.jsx(de.Title, { className: "w-100", children: o.pickWidgetToAdd }),
|
|
@@ -907,7 +907,7 @@ const ep = (e) => (n) => {
|
|
|
907
907
|
widget: pp,
|
|
908
908
|
mobile: fp
|
|
909
909
|
}, no = ({ widgetGroups: e, availableWidgets: t, onAdd: n, texts: r }) => {
|
|
910
|
-
const [a, o] =
|
|
910
|
+
const [a, o] = B(!1), { isMobile: s } = Ar();
|
|
911
911
|
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
912
912
|
/* @__PURE__ */ i.jsx("div", { className: I("luminus-empty-widget", to.widget, {
|
|
913
913
|
[to.mobile]: s
|
|
@@ -934,7 +934,7 @@ const ep = (e) => (n) => {
|
|
|
934
934
|
widgetEditOverlay: wp,
|
|
935
935
|
mobile: Np
|
|
936
936
|
}, jp = (e, t = "dashboardConfig") => {
|
|
937
|
-
const [n, r] =
|
|
937
|
+
const [n, r] = B({ widgets: [] });
|
|
938
938
|
z(() => {
|
|
939
939
|
const o = localStorage.getItem(t);
|
|
940
940
|
o ? r(JSON.parse(o)) : e && r(e);
|
|
@@ -946,34 +946,34 @@ const ep = (e) => (n) => {
|
|
|
946
946
|
}, KN = ({ widgetGroups: e, availableWidgets: t, editMode: n, defaultDashboardConfig: r, dashboardConfigKey: a }) => {
|
|
947
947
|
var m;
|
|
948
948
|
const { texts: { homeDashboard: o } } = V(X), { dashboardConfig: s, onChangeDashboardConfig: l } = jp(r, a), c = A((g, b) => {
|
|
949
|
-
var
|
|
950
|
-
g === ((
|
|
949
|
+
var h, v;
|
|
950
|
+
g === ((h = s.widgets) == null ? void 0 : h.length) ? l({
|
|
951
951
|
...s,
|
|
952
952
|
widgets: [...s.widgets, { widgetId: b, fullWidth: !1 }]
|
|
953
953
|
}) : l({
|
|
954
954
|
...s,
|
|
955
|
-
widgets: ((
|
|
955
|
+
widgets: ((v = s.widgets) == null ? void 0 : v.map((x, N) => N === g ? { widgetId: b, fullWidth: !1 } : x)) ?? []
|
|
956
956
|
});
|
|
957
957
|
}, [s, l]), u = A((g) => {
|
|
958
|
-
var b,
|
|
958
|
+
var b, h;
|
|
959
959
|
((b = s.widgets[g]) == null ? void 0 : b.widgetId) === -1 ? l({
|
|
960
960
|
...s,
|
|
961
|
-
widgets: ((
|
|
961
|
+
widgets: ((h = s.widgets) == null ? void 0 : h.filter((v, x) => x !== g)) ?? []
|
|
962
962
|
}) : c(g, -1);
|
|
963
963
|
}, [s, l, c]), d = A((g) => {
|
|
964
964
|
var b;
|
|
965
965
|
l({
|
|
966
966
|
...s,
|
|
967
|
-
widgets: ((b = s.widgets) == null ? void 0 : b.map((
|
|
967
|
+
widgets: ((b = s.widgets) == null ? void 0 : b.map((h, v) => v === g ? { ...h, fullWidth: !h.fullWidth } : h)) ?? []
|
|
968
968
|
});
|
|
969
|
-
}, [s, l]), p = A((g, b,
|
|
969
|
+
}, [s, l]), p = A((g, b, h) => g ? /* @__PURE__ */ i.jsxs("div", { className: I(mt.widgetWrapper, {
|
|
970
970
|
[mt.widgetEdit]: n && g.id !== -1
|
|
971
|
-
}, { [mt.fullWidth]:
|
|
971
|
+
}, { [mt.fullWidth]: h }), children: [
|
|
972
972
|
n && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
973
973
|
/* @__PURE__ */ i.jsx(te, { color: "danger", onClick: () => u(b), className: I(mt.removeIcon), children: /* @__PURE__ */ i.jsx(yd, {}) }),
|
|
974
|
-
/* @__PURE__ */ i.jsx(te, { color:
|
|
974
|
+
/* @__PURE__ */ i.jsx(te, { color: h ? "danger" : "primary", onClick: () => d(b), className: I(mt.fullWidthIcon), children: /* @__PURE__ */ i.jsx(wd, {}) })
|
|
975
975
|
] }),
|
|
976
|
-
g.id === -1 ? n && /* @__PURE__ */ i.jsx("div", { className: mt.widgetWrapper, children: /* @__PURE__ */ i.jsx(no, { widgetGroups: e, availableWidgets: t, onAdd: (
|
|
976
|
+
g.id === -1 ? n && /* @__PURE__ */ i.jsx("div", { className: mt.widgetWrapper, children: /* @__PURE__ */ i.jsx(no, { widgetGroups: e, availableWidgets: t, onAdd: (v) => c(b, v), texts: o }) }) : /* @__PURE__ */ i.jsx(ap, { title: g.title, children: /* @__PURE__ */ i.jsx(g.WidgetElement, { title: g.title }) }),
|
|
977
977
|
g.id > -1 && n && /* @__PURE__ */ i.jsx("div", { className: mt.widgetEditOverlay })
|
|
978
978
|
] }, b) : /* @__PURE__ */ i.jsx(i.Fragment, {}), [
|
|
979
979
|
n,
|
|
@@ -985,7 +985,7 @@ const ep = (e) => (n) => {
|
|
|
985
985
|
o
|
|
986
986
|
]), { isMobile: f } = Ar();
|
|
987
987
|
return /* @__PURE__ */ i.jsx("div", { className: I(mt.dashboard, { [mt.mobile]: f }), children: /* @__PURE__ */ i.jsxs("div", { className: I(mt.widgetsGrid), children: [
|
|
988
|
-
(m = s.widgets) == null ? void 0 : m.map((g, b) => p(t.find((
|
|
988
|
+
(m = s.widgets) == null ? void 0 : m.map((g, b) => p(t.find((h) => h.id === g.widgetId), b, g.fullWidth)),
|
|
989
989
|
n && /* @__PURE__ */ i.jsx(no, { widgetGroups: e, availableWidgets: t, onAdd: (g) => {
|
|
990
990
|
var b;
|
|
991
991
|
return c((b = s.widgets) == null ? void 0 : b.length, g);
|
|
@@ -1005,7 +1005,7 @@ const ep = (e) => (n) => {
|
|
|
1005
1005
|
collapseIcon: _p,
|
|
1006
1006
|
collapsed: Op
|
|
1007
1007
|
}, Sr = ({ title: e, children: t, className: n, ...r }) => {
|
|
1008
|
-
const a = r.controlled ? !1 : r.defaultOpen ?? !1, [o, s] =
|
|
1008
|
+
const a = r.controlled ? !1 : r.defaultOpen ?? !1, [o, s] = B(a), l = r.controlled ? r.isOpen : o;
|
|
1009
1009
|
return z(() => {
|
|
1010
1010
|
s(a);
|
|
1011
1011
|
}, [a]), /* @__PURE__ */ i.jsxs("div", { className: n ?? "", children: [
|
|
@@ -1040,7 +1040,7 @@ const ep = (e) => (n) => {
|
|
|
1040
1040
|
collapsed: Bp,
|
|
1041
1041
|
content: Lp
|
|
1042
1042
|
}, Xt = ({ title: e, headerContent: t, children: n, className: r, headerClassName: a, contentClassName: o, dontRenderIfNoChildren: s, ...l }) => {
|
|
1043
|
-
const c = l.collapsible ? l.controlled ? !1 : l.defaultOpen ?? !1 : !0, [u, d] =
|
|
1043
|
+
const c = l.collapsible ? l.controlled ? !1 : l.defaultOpen ?? !1 : !0, [u, d] = B(c), p = l.collapsible ? l.controlled ? l.isOpen : u : !0;
|
|
1044
1044
|
z(() => {
|
|
1045
1045
|
d(c);
|
|
1046
1046
|
}, [c]);
|
|
@@ -1202,12 +1202,12 @@ function ml(e, t, n) {
|
|
|
1202
1202
|
throw new Error(process.env.NODE_ENV === "production" ? He(4) : "Expected the listener to be a function. Instead, received: '" + Ht(b) + "'");
|
|
1203
1203
|
if (c)
|
|
1204
1204
|
throw new Error(process.env.NODE_ENV === "production" ? He(5) : "You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");
|
|
1205
|
-
var
|
|
1205
|
+
var h = !0;
|
|
1206
1206
|
return u(), l.push(b), function() {
|
|
1207
|
-
if (
|
|
1207
|
+
if (h) {
|
|
1208
1208
|
if (c)
|
|
1209
1209
|
throw new Error(process.env.NODE_ENV === "production" ? He(6) : "You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");
|
|
1210
|
-
|
|
1210
|
+
h = !1, u();
|
|
1211
1211
|
var x = l.indexOf(b);
|
|
1212
1212
|
l.splice(x, 1), s = null;
|
|
1213
1213
|
}
|
|
@@ -1225,8 +1225,8 @@ function ml(e, t, n) {
|
|
|
1225
1225
|
} finally {
|
|
1226
1226
|
c = !1;
|
|
1227
1227
|
}
|
|
1228
|
-
for (var
|
|
1229
|
-
var x = v
|
|
1228
|
+
for (var h = s = l, v = 0; v < h.length; v++) {
|
|
1229
|
+
var x = h[v];
|
|
1230
1230
|
x();
|
|
1231
1231
|
}
|
|
1232
1232
|
return b;
|
|
@@ -1239,7 +1239,7 @@ function ml(e, t, n) {
|
|
|
1239
1239
|
});
|
|
1240
1240
|
}
|
|
1241
1241
|
function g() {
|
|
1242
|
-
var b,
|
|
1242
|
+
var b, h = p;
|
|
1243
1243
|
return b = {
|
|
1244
1244
|
/**
|
|
1245
1245
|
* The minimal observable subscription method.
|
|
@@ -1256,7 +1256,7 @@ function ml(e, t, n) {
|
|
|
1256
1256
|
x.next && x.next(d());
|
|
1257
1257
|
}
|
|
1258
1258
|
N();
|
|
1259
|
-
var y =
|
|
1259
|
+
var y = h(N);
|
|
1260
1260
|
return {
|
|
1261
1261
|
unsubscribe: y
|
|
1262
1262
|
};
|
|
@@ -1509,10 +1509,10 @@ var vo;
|
|
|
1509
1509
|
function of() {
|
|
1510
1510
|
if (vo) return ye;
|
|
1511
1511
|
vo = 1;
|
|
1512
|
-
var e = 60103, t = 60106, n = 60107, r = 60108, a = 60114, o = 60109, s = 60110, l = 60112, c = 60113, u = 60120, d = 60115, p = 60116, f = 60121, m = 60122, g = 60117, b = 60129,
|
|
1512
|
+
var e = 60103, t = 60106, n = 60107, r = 60108, a = 60114, o = 60109, s = 60110, l = 60112, c = 60113, u = 60120, d = 60115, p = 60116, f = 60121, m = 60122, g = 60117, b = 60129, h = 60131;
|
|
1513
1513
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
1514
|
-
var
|
|
1515
|
-
e =
|
|
1514
|
+
var v = Symbol.for;
|
|
1515
|
+
e = v("react.element"), t = v("react.portal"), n = v("react.fragment"), r = v("react.strict_mode"), a = v("react.profiler"), o = v("react.provider"), s = v("react.context"), l = v("react.forward_ref"), c = v("react.suspense"), u = v("react.suspense_list"), d = v("react.memo"), p = v("react.lazy"), f = v("react.block"), m = v("react.server.block"), g = v("react.fundamental"), b = v("react.debug_trace_mode"), h = v("react.legacy_hidden");
|
|
1516
1516
|
}
|
|
1517
1517
|
function x(j) {
|
|
1518
1518
|
if (typeof j == "object" && j !== null) {
|
|
@@ -1543,8 +1543,8 @@ function of() {
|
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
|
-
var N = o, y = e, w = l,
|
|
1547
|
-
return ye.ContextConsumer = s, ye.ContextProvider = N, ye.Element = y, ye.ForwardRef = w, ye.Fragment =
|
|
1546
|
+
var N = o, y = e, w = l, S = n, C = p, _ = d, E = t, O = a, T = r, k = c;
|
|
1547
|
+
return ye.ContextConsumer = s, ye.ContextProvider = N, ye.Element = y, ye.ForwardRef = w, ye.Fragment = S, ye.Lazy = C, ye.Memo = _, ye.Portal = E, ye.Profiler = O, ye.StrictMode = T, ye.Suspense = k, ye.isAsyncMode = function() {
|
|
1548
1548
|
return !1;
|
|
1549
1549
|
}, ye.isConcurrentMode = function() {
|
|
1550
1550
|
return !1;
|
|
@@ -1571,7 +1571,7 @@ function of() {
|
|
|
1571
1571
|
}, ye.isSuspense = function(j) {
|
|
1572
1572
|
return x(j) === c;
|
|
1573
1573
|
}, ye.isValidElementType = function(j) {
|
|
1574
|
-
return typeof j == "string" || typeof j == "function" || j === n || j === a || j === b || j === r || j === c || j === u || j ===
|
|
1574
|
+
return typeof j == "string" || typeof j == "function" || j === n || j === a || j === b || j === r || j === c || j === u || j === h || typeof j == "object" && j !== null && (j.$$typeof === p || j.$$typeof === d || j.$$typeof === o || j.$$typeof === s || j.$$typeof === l || j.$$typeof === g || j.$$typeof === f || j[0] === m);
|
|
1575
1575
|
}, ye.typeOf = x, ye;
|
|
1576
1576
|
}
|
|
1577
1577
|
var we = {};
|
|
@@ -1586,21 +1586,21 @@ var we = {};
|
|
|
1586
1586
|
var ho;
|
|
1587
1587
|
function sf() {
|
|
1588
1588
|
return ho || (ho = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1589
|
-
var e = 60103, t = 60106, n = 60107, r = 60108, a = 60114, o = 60109, s = 60110, l = 60112, c = 60113, u = 60120, d = 60115, p = 60116, f = 60121, m = 60122, g = 60117, b = 60129,
|
|
1589
|
+
var e = 60103, t = 60106, n = 60107, r = 60108, a = 60114, o = 60109, s = 60110, l = 60112, c = 60113, u = 60120, d = 60115, p = 60116, f = 60121, m = 60122, g = 60117, b = 60129, h = 60131;
|
|
1590
1590
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
1591
|
-
var
|
|
1592
|
-
e =
|
|
1591
|
+
var v = Symbol.for;
|
|
1592
|
+
e = v("react.element"), t = v("react.portal"), n = v("react.fragment"), r = v("react.strict_mode"), a = v("react.profiler"), o = v("react.provider"), s = v("react.context"), l = v("react.forward_ref"), c = v("react.suspense"), u = v("react.suspense_list"), d = v("react.memo"), p = v("react.lazy"), f = v("react.block"), m = v("react.server.block"), g = v("react.fundamental"), v("react.scope"), v("react.opaque.id"), b = v("react.debug_trace_mode"), v("react.offscreen"), h = v("react.legacy_hidden");
|
|
1593
1593
|
}
|
|
1594
1594
|
var x = !1;
|
|
1595
|
-
function N(
|
|
1596
|
-
return !!(typeof
|
|
1595
|
+
function N(L) {
|
|
1596
|
+
return !!(typeof L == "string" || typeof L == "function" || L === n || L === a || L === b || L === r || L === c || L === u || L === h || x || typeof L == "object" && L !== null && (L.$$typeof === p || L.$$typeof === d || L.$$typeof === o || L.$$typeof === s || L.$$typeof === l || L.$$typeof === g || L.$$typeof === f || L[0] === m));
|
|
1597
1597
|
}
|
|
1598
|
-
function y(
|
|
1599
|
-
if (typeof
|
|
1600
|
-
var ue =
|
|
1598
|
+
function y(L) {
|
|
1599
|
+
if (typeof L == "object" && L !== null) {
|
|
1600
|
+
var ue = L.$$typeof;
|
|
1601
1601
|
switch (ue) {
|
|
1602
1602
|
case e:
|
|
1603
|
-
var _e =
|
|
1603
|
+
var _e = L.type;
|
|
1604
1604
|
switch (_e) {
|
|
1605
1605
|
case n:
|
|
1606
1606
|
case a:
|
|
@@ -1626,47 +1626,47 @@ function sf() {
|
|
|
1626
1626
|
}
|
|
1627
1627
|
}
|
|
1628
1628
|
}
|
|
1629
|
-
var w = s,
|
|
1630
|
-
function Y(
|
|
1631
|
-
return
|
|
1629
|
+
var w = s, S = o, C = e, _ = l, E = n, O = p, T = d, k = t, j = a, P = r, W = c, M = !1, $ = !1;
|
|
1630
|
+
function Y(L) {
|
|
1631
|
+
return M || (M = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
1632
1632
|
}
|
|
1633
|
-
function U(
|
|
1633
|
+
function U(L) {
|
|
1634
1634
|
return $ || ($ = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
1635
1635
|
}
|
|
1636
|
-
function q(
|
|
1637
|
-
return y(
|
|
1636
|
+
function q(L) {
|
|
1637
|
+
return y(L) === s;
|
|
1638
1638
|
}
|
|
1639
|
-
function Q(
|
|
1640
|
-
return y(
|
|
1639
|
+
function Q(L) {
|
|
1640
|
+
return y(L) === o;
|
|
1641
1641
|
}
|
|
1642
|
-
function ne(
|
|
1643
|
-
return typeof
|
|
1642
|
+
function ne(L) {
|
|
1643
|
+
return typeof L == "object" && L !== null && L.$$typeof === e;
|
|
1644
1644
|
}
|
|
1645
|
-
function oe(
|
|
1646
|
-
return y(
|
|
1645
|
+
function oe(L) {
|
|
1646
|
+
return y(L) === l;
|
|
1647
1647
|
}
|
|
1648
|
-
function se(
|
|
1649
|
-
return y(
|
|
1648
|
+
function se(L) {
|
|
1649
|
+
return y(L) === n;
|
|
1650
1650
|
}
|
|
1651
|
-
function xe(
|
|
1652
|
-
return y(
|
|
1651
|
+
function xe(L) {
|
|
1652
|
+
return y(L) === p;
|
|
1653
1653
|
}
|
|
1654
|
-
function H(
|
|
1655
|
-
return y(
|
|
1654
|
+
function H(L) {
|
|
1655
|
+
return y(L) === d;
|
|
1656
1656
|
}
|
|
1657
|
-
function ae(
|
|
1658
|
-
return y(
|
|
1657
|
+
function ae(L) {
|
|
1658
|
+
return y(L) === t;
|
|
1659
1659
|
}
|
|
1660
|
-
function ge(
|
|
1661
|
-
return y(
|
|
1660
|
+
function ge(L) {
|
|
1661
|
+
return y(L) === a;
|
|
1662
1662
|
}
|
|
1663
|
-
function Ce(
|
|
1664
|
-
return y(
|
|
1663
|
+
function Ce(L) {
|
|
1664
|
+
return y(L) === r;
|
|
1665
1665
|
}
|
|
1666
|
-
function fe(
|
|
1667
|
-
return y(
|
|
1666
|
+
function fe(L) {
|
|
1667
|
+
return y(L) === c;
|
|
1668
1668
|
}
|
|
1669
|
-
we.ContextConsumer = w, we.ContextProvider =
|
|
1669
|
+
we.ContextConsumer = w, we.ContextProvider = S, we.Element = C, we.ForwardRef = _, we.Fragment = E, we.Lazy = O, we.Memo = T, we.Portal = k, we.Profiler = j, we.StrictMode = P, we.Suspense = W, we.isAsyncMode = Y, we.isConcurrentMode = U, we.isContextConsumer = q, we.isContextProvider = Q, we.isElement = ne, we.isForwardRef = oe, we.isFragment = se, we.isLazy = xe, we.isMemo = H, we.isPortal = ae, we.isProfiler = ge, we.isStrictMode = Ce, we.isSuspense = fe, we.isValidElementType = N, we.typeOf = y;
|
|
1670
1670
|
}()), we;
|
|
1671
1671
|
}
|
|
1672
1672
|
process.env.NODE_ENV === "production" ? Pa.exports = of() : Pa.exports = sf();
|
|
@@ -1693,16 +1693,16 @@ function gf(e, t, n, r, a, o, s, l, c, u) {
|
|
|
1693
1693
|
if (e) {
|
|
1694
1694
|
var d = !1, p = null, f = function() {
|
|
1695
1695
|
if (!d) {
|
|
1696
|
-
var b = t.getState(),
|
|
1696
|
+
var b = t.getState(), h, v;
|
|
1697
1697
|
try {
|
|
1698
|
-
|
|
1698
|
+
h = r(b, a.current);
|
|
1699
1699
|
} catch (x) {
|
|
1700
|
-
|
|
1700
|
+
v = x, p = x;
|
|
1701
1701
|
}
|
|
1702
|
-
|
|
1702
|
+
v || (p = null), h === o.current ? s.current || c() : (o.current = h, l.current = h, s.current = !0, u({
|
|
1703
1703
|
type: "STORE_UPDATED",
|
|
1704
1704
|
payload: {
|
|
1705
|
-
error:
|
|
1705
|
+
error: v
|
|
1706
1706
|
}
|
|
1707
1707
|
}));
|
|
1708
1708
|
}
|
|
@@ -1720,9 +1720,9 @@ var vf = function() {
|
|
|
1720
1720
|
};
|
|
1721
1721
|
function hf(e, t) {
|
|
1722
1722
|
t === void 0 && (t = {});
|
|
1723
|
-
var n = t, r = n.getDisplayName, a = r === void 0 ? function(
|
|
1724
|
-
return "ConnectAdvanced(" +
|
|
1725
|
-
} : r, o = n.methodName, s = o === void 0 ? "connectAdvanced" : o, l = n.renderCountProp, c = l === void 0 ? void 0 : l, u = n.shouldHandleStateChanges, d = u === void 0 ? !0 : u, p = n.storeKey, f = p === void 0 ? "store" : p, m = n.withRef, g = m === void 0 ? !1 : m, b = n.forwardRef,
|
|
1723
|
+
var n = t, r = n.getDisplayName, a = r === void 0 ? function(S) {
|
|
1724
|
+
return "ConnectAdvanced(" + S + ")";
|
|
1725
|
+
} : r, o = n.methodName, s = o === void 0 ? "connectAdvanced" : o, l = n.renderCountProp, c = l === void 0 ? void 0 : l, u = n.shouldHandleStateChanges, d = u === void 0 ? !0 : u, p = n.storeKey, f = p === void 0 ? "store" : p, m = n.withRef, g = m === void 0 ? !1 : m, b = n.forwardRef, h = b === void 0 ? !1 : b, v = n.context, x = v === void 0 ? ai : v, N = jr(n, lf);
|
|
1726
1726
|
if (process.env.NODE_ENV !== "production") {
|
|
1727
1727
|
if (c !== void 0)
|
|
1728
1728
|
throw new Error("renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension");
|
|
@@ -1733,20 +1733,20 @@ function hf(e, t) {
|
|
|
1733
1733
|
throw new Error("storeKey has been removed and does not do anything. " + y);
|
|
1734
1734
|
}
|
|
1735
1735
|
var w = x;
|
|
1736
|
-
return function(
|
|
1737
|
-
if (process.env.NODE_ENV !== "production" && !bo.isValidElementType(
|
|
1738
|
-
throw new Error("You must pass a component to the function returned by " + (s + ". Instead received " + pf(
|
|
1739
|
-
var _ =
|
|
1736
|
+
return function(C) {
|
|
1737
|
+
if (process.env.NODE_ENV !== "production" && !bo.isValidElementType(C))
|
|
1738
|
+
throw new Error("You must pass a component to the function returned by " + (s + ". Instead received " + pf(C)));
|
|
1739
|
+
var _ = C.displayName || C.name || "Component", E = a(_), O = re({}, N, {
|
|
1740
1740
|
getDisplayName: a,
|
|
1741
1741
|
methodName: s,
|
|
1742
1742
|
renderCountProp: c,
|
|
1743
1743
|
shouldHandleStateChanges: d,
|
|
1744
1744
|
storeKey: f,
|
|
1745
|
-
displayName:
|
|
1745
|
+
displayName: E,
|
|
1746
1746
|
wrappedComponentName: _,
|
|
1747
|
-
WrappedComponent:
|
|
1747
|
+
WrappedComponent: C
|
|
1748
1748
|
}), T = N.pure;
|
|
1749
|
-
function
|
|
1749
|
+
function k($) {
|
|
1750
1750
|
return e($.dispatch, O);
|
|
1751
1751
|
}
|
|
1752
1752
|
var j = T ? R : function($) {
|
|
@@ -1760,14 +1760,14 @@ function hf(e, t) {
|
|
|
1760
1760
|
return U && U.Consumer && bo.isContextConsumer(/* @__PURE__ */ le.createElement(U.Consumer, null)) ? U : w;
|
|
1761
1761
|
}, [U, w]), oe = V(ne), se = !!$.store && !!$.store.getState && !!$.store.dispatch, xe = !!oe && !!oe.store;
|
|
1762
1762
|
if (process.env.NODE_ENV !== "production" && !se && !xe)
|
|
1763
|
-
throw new Error('Could not find "store" in the context of ' + ('"' +
|
|
1763
|
+
throw new Error('Could not find "store" in the context of ' + ('"' + E + '". Either wrap the root component in a <Provider>, ') + "or pass a custom React context provider to <Provider> and the corresponding " + ("React context consumer to " + E + " in connect options."));
|
|
1764
1764
|
var H = se ? $.store : oe.store, ae = R(function() {
|
|
1765
|
-
return
|
|
1765
|
+
return k(H);
|
|
1766
1766
|
}, [H]), ge = R(function() {
|
|
1767
1767
|
if (!d) return uf;
|
|
1768
1768
|
var ce = hl(H, se ? null : oe.subscription), Fe = ce.notifyNestedSubs.bind(ce);
|
|
1769
1769
|
return [ce, Fe];
|
|
1770
|
-
}, [H, se, oe]), Ce = ge[0], fe = ge[1],
|
|
1770
|
+
}, [H, se, oe]), Ce = ge[0], fe = ge[1], L = R(function() {
|
|
1771
1771
|
return se ? oe : re({}, oe, {
|
|
1772
1772
|
subscription: Ce
|
|
1773
1773
|
});
|
|
@@ -1779,26 +1779,26 @@ function hf(e, t) {
|
|
|
1779
1779
|
}, [H, We, Q]);
|
|
1780
1780
|
xo(mf, [K, bt, ee, Q, pe, G, fe]), xo(gf, [d, H, Ce, ae, K, bt, ee, G, fe, Ze], [H, Ce, ae]);
|
|
1781
1781
|
var Ee = R(function() {
|
|
1782
|
-
return /* @__PURE__ */ le.createElement(
|
|
1782
|
+
return /* @__PURE__ */ le.createElement(C, re({}, pe, {
|
|
1783
1783
|
ref: q
|
|
1784
1784
|
}));
|
|
1785
|
-
}, [q,
|
|
1785
|
+
}, [q, C, pe]), ve = R(function() {
|
|
1786
1786
|
return d ? /* @__PURE__ */ le.createElement(ne.Provider, {
|
|
1787
|
-
value:
|
|
1787
|
+
value: L
|
|
1788
1788
|
}, Ee) : Ee;
|
|
1789
|
-
}, [ne, Ee,
|
|
1789
|
+
}, [ne, Ee, L]);
|
|
1790
1790
|
return ve;
|
|
1791
1791
|
}
|
|
1792
1792
|
var W = T ? le.memo(P) : P;
|
|
1793
|
-
if (W.WrappedComponent =
|
|
1794
|
-
var
|
|
1793
|
+
if (W.WrappedComponent = C, W.displayName = P.displayName = E, h) {
|
|
1794
|
+
var M = le.forwardRef(function(Y, U) {
|
|
1795
1795
|
return /* @__PURE__ */ le.createElement(W, re({}, Y, {
|
|
1796
1796
|
reactReduxForwardedRef: U
|
|
1797
1797
|
}));
|
|
1798
1798
|
});
|
|
1799
|
-
return
|
|
1799
|
+
return M.displayName = E, M.WrappedComponent = C, go(M, C);
|
|
1800
1800
|
}
|
|
1801
|
-
return go(W,
|
|
1801
|
+
return go(W, C);
|
|
1802
1802
|
};
|
|
1803
1803
|
}
|
|
1804
1804
|
function yo(e, t) {
|
|
@@ -1936,16 +1936,16 @@ function kf(e, t, n, r, a) {
|
|
|
1936
1936
|
function b() {
|
|
1937
1937
|
return p = e(u, d), t.dependsOnOwnProps && (f = t(r, d)), m = n(p, f, d), m;
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1939
|
+
function h() {
|
|
1940
1940
|
return e.dependsOnOwnProps && (p = e(u, d)), t.dependsOnOwnProps && (f = t(r, d)), m = n(p, f, d), m;
|
|
1941
1941
|
}
|
|
1942
|
-
function
|
|
1942
|
+
function v() {
|
|
1943
1943
|
var N = e(u, d), y = !l(N, p);
|
|
1944
1944
|
return p = N, y && (m = n(p, f, d)), m;
|
|
1945
1945
|
}
|
|
1946
1946
|
function x(N, y) {
|
|
1947
|
-
var w = !s(y, d),
|
|
1948
|
-
return u = N, d = y, w &&
|
|
1947
|
+
var w = !s(y, d), S = !o(N, u, y, d);
|
|
1948
|
+
return u = N, d = y, w && S ? b() : w ? h() : S ? v() : m;
|
|
1949
1949
|
}
|
|
1950
1950
|
return function(y, w) {
|
|
1951
1951
|
return c ? x(y, w) : g(y, w);
|
|
@@ -1972,9 +1972,9 @@ function Mf(e, t) {
|
|
|
1972
1972
|
}
|
|
1973
1973
|
function Ff(e) {
|
|
1974
1974
|
var t = {}, n = t.connectHOC, r = n === void 0 ? hf : n, a = t.mapStateToPropsFactories, o = a === void 0 ? Cf : a, s = t.mapDispatchToPropsFactories, l = s === void 0 ? jf : s, c = t.mergePropsFactories, u = c === void 0 ? Pf : c, d = t.selectorFactory, p = d === void 0 ? Bf : d;
|
|
1975
|
-
return function(m, g, b,
|
|
1976
|
-
|
|
1977
|
-
var
|
|
1975
|
+
return function(m, g, b, h) {
|
|
1976
|
+
h === void 0 && (h = {});
|
|
1977
|
+
var v = h, x = v.pure, N = x === void 0 ? !0 : x, y = v.areStatesEqual, w = y === void 0 ? Mf : y, S = v.areOwnPropsEqual, C = S === void 0 ? ea : S, _ = v.areStatePropsEqual, E = _ === void 0 ? ea : _, O = v.areMergedPropsEqual, T = O === void 0 ? ea : O, k = jr(v, Lf), j = na(m, o, "mapStateToProps"), P = na(g, l, "mapDispatchToProps"), W = na(b, u, "mergeProps");
|
|
1978
1978
|
return r(p, re({
|
|
1979
1979
|
// used in error messages
|
|
1980
1980
|
methodName: "connect",
|
|
@@ -1990,10 +1990,10 @@ function Ff(e) {
|
|
|
1990
1990
|
initMergeProps: W,
|
|
1991
1991
|
pure: N,
|
|
1992
1992
|
areStatesEqual: w,
|
|
1993
|
-
areOwnPropsEqual:
|
|
1994
|
-
areStatePropsEqual:
|
|
1993
|
+
areOwnPropsEqual: C,
|
|
1994
|
+
areStatePropsEqual: E,
|
|
1995
1995
|
areMergedPropsEqual: T
|
|
1996
|
-
},
|
|
1996
|
+
}, k));
|
|
1997
1997
|
};
|
|
1998
1998
|
}
|
|
1999
1999
|
const Sl = /* @__PURE__ */ Ff();
|
|
@@ -2007,7 +2007,7 @@ function Vf(e, t) {
|
|
|
2007
2007
|
return !0;
|
|
2008
2008
|
}
|
|
2009
2009
|
function Cl(e, t) {
|
|
2010
|
-
var n =
|
|
2010
|
+
var n = B(function() {
|
|
2011
2011
|
return {
|
|
2012
2012
|
inputs: t,
|
|
2013
2013
|
result: e()
|
|
@@ -2489,7 +2489,7 @@ var Gr = ke(function(e, t) {
|
|
|
2489
2489
|
if (!s)
|
|
2490
2490
|
return null;
|
|
2491
2491
|
function l(b) {
|
|
2492
|
-
var
|
|
2492
|
+
var h = {
|
|
2493
2493
|
type: "COMBINE",
|
|
2494
2494
|
combine: {
|
|
2495
2495
|
draggableId: b,
|
|
@@ -2497,7 +2497,7 @@ var Gr = ke(function(e, t) {
|
|
|
2497
2497
|
}
|
|
2498
2498
|
};
|
|
2499
2499
|
return re({}, o, {
|
|
2500
|
-
at:
|
|
2500
|
+
at: h
|
|
2501
2501
|
});
|
|
2502
2502
|
}
|
|
2503
2503
|
var c = o.displaced.all, u = c.length ? c[0] : null;
|
|
@@ -2899,9 +2899,9 @@ var km = function(e) {
|
|
|
2899
2899
|
forceShouldAnimate: !1
|
|
2900
2900
|
}), p = {}, f = {}, m = [c, u, d];
|
|
2901
2901
|
c.all.forEach(function(b) {
|
|
2902
|
-
var
|
|
2903
|
-
if (
|
|
2904
|
-
f[b] =
|
|
2902
|
+
var h = Rm(b, m);
|
|
2903
|
+
if (h) {
|
|
2904
|
+
f[b] = h;
|
|
2905
2905
|
return;
|
|
2906
2906
|
}
|
|
2907
2907
|
p[b] = !0;
|
|
@@ -2976,17 +2976,17 @@ var km = function(e) {
|
|
|
2976
2976
|
scrollJumpRequest: null
|
|
2977
2977
|
};
|
|
2978
2978
|
}
|
|
2979
|
-
var
|
|
2979
|
+
var h = Xe(m, l), v = km({
|
|
2980
2980
|
impact: f,
|
|
2981
2981
|
viewport: s,
|
|
2982
2982
|
destination: r,
|
|
2983
2983
|
draggables: a,
|
|
2984
|
-
maxScrollChange:
|
|
2984
|
+
maxScrollChange: h
|
|
2985
2985
|
});
|
|
2986
2986
|
return {
|
|
2987
2987
|
clientSelection: c,
|
|
2988
|
-
impact:
|
|
2989
|
-
scrollJumpRequest:
|
|
2988
|
+
impact: v,
|
|
2989
|
+
scrollJumpRequest: h
|
|
2990
2990
|
};
|
|
2991
2991
|
}, Ue = function(t) {
|
|
2992
2992
|
var n = t.subject.active;
|
|
@@ -3156,8 +3156,8 @@ var km = function(e) {
|
|
|
3156
3156
|
return f ? u : null;
|
|
3157
3157
|
}
|
|
3158
3158
|
var m = t[s.axis.line] <= n.page.borderBox.center[s.axis.line], g = function() {
|
|
3159
|
-
var
|
|
3160
|
-
return n.descriptor.id === a.descriptor.id || m ?
|
|
3159
|
+
var h = n.descriptor.index;
|
|
3160
|
+
return n.descriptor.id === a.descriptor.id || m ? h : h + 1;
|
|
3161
3161
|
}(), b = er(s.axis, a.displaceBy);
|
|
3162
3162
|
return Or({
|
|
3163
3163
|
draggable: a,
|
|
@@ -3301,10 +3301,10 @@ function Qm(e) {
|
|
|
3301
3301
|
return n ? r && n.descriptor.index > t.descriptor.index ? n.descriptor.index - 1 : n.descriptor.index : null;
|
|
3302
3302
|
}
|
|
3303
3303
|
var Jm = function(e) {
|
|
3304
|
-
var t = e.pageBorderBoxWithDroppableScroll, n = e.draggable, r = e.destination, a = e.insideDestination, o = e.last, s = e.viewport, l = e.afterCritical, c = r.axis, u = er(r.axis, n.displaceBy), d = u.value, p = t[c.start], f = t[c.end], m = Gr(n, a), g = Ft(m, function(
|
|
3305
|
-
var
|
|
3304
|
+
var t = e.pageBorderBoxWithDroppableScroll, n = e.draggable, r = e.destination, a = e.insideDestination, o = e.last, s = e.viewport, l = e.afterCritical, c = r.axis, u = er(r.axis, n.displaceBy), d = u.value, p = t[c.start], f = t[c.end], m = Gr(n, a), g = Ft(m, function(h) {
|
|
3305
|
+
var v = h.descriptor.id, x = h.page.borderBox.center[c.line], N = Rt(v, l), y = ql({
|
|
3306
3306
|
displaced: o,
|
|
3307
|
-
id:
|
|
3307
|
+
id: v
|
|
3308
3308
|
});
|
|
3309
3309
|
return N ? y ? f <= x : p < x - d : y ? f <= x + d : p < x;
|
|
3310
3310
|
}), b = Qm({
|
|
@@ -3326,11 +3326,11 @@ var Jm = function(e) {
|
|
|
3326
3326
|
if (!a.isCombineEnabled)
|
|
3327
3327
|
return null;
|
|
3328
3328
|
var l = a.axis, c = er(a.axis, t.displaceBy), u = c.value, d = n[l.start], p = n[l.end], f = Gr(t, o), m = Ft(f, function(b) {
|
|
3329
|
-
var
|
|
3329
|
+
var h = b.descriptor.id, v = b.page.borderBox, x = v[l.size], N = x / Zm, y = Rt(h, s), w = ql({
|
|
3330
3330
|
displaced: r.displaced,
|
|
3331
|
-
id:
|
|
3331
|
+
id: h
|
|
3332
3332
|
});
|
|
3333
|
-
return y ? w ? p >
|
|
3333
|
+
return y ? w ? p > v[l.start] + N && p < v[l.end] - N : d > v[l.start] - u + N && d < v[l.end] - u - N : w ? p > v[l.start] + u + N && p < v[l.end] + u - N : d > v[l.start] + N && d < v[l.end] - N;
|
|
3334
3334
|
});
|
|
3335
3335
|
if (!m)
|
|
3336
3336
|
return null;
|
|
@@ -3425,24 +3425,24 @@ var Jm = function(e) {
|
|
|
3425
3425
|
previousImpact: t.impact,
|
|
3426
3426
|
viewport: l,
|
|
3427
3427
|
afterCritical: t.afterCritical
|
|
3428
|
-
}),
|
|
3428
|
+
}), h = ng({
|
|
3429
3429
|
draggable: g,
|
|
3430
3430
|
impact: b,
|
|
3431
3431
|
previousImpact: t.impact,
|
|
3432
3432
|
draggables: c.draggables,
|
|
3433
3433
|
droppables: c.droppables
|
|
3434
|
-
}),
|
|
3434
|
+
}), v = re({}, t, {
|
|
3435
3435
|
current: m,
|
|
3436
3436
|
dimensions: {
|
|
3437
3437
|
draggables: c.draggables,
|
|
3438
|
-
droppables:
|
|
3438
|
+
droppables: h
|
|
3439
3439
|
},
|
|
3440
3440
|
impact: b,
|
|
3441
3441
|
viewport: l,
|
|
3442
3442
|
scrollJumpRequest: s || null,
|
|
3443
3443
|
forceShouldAnimate: s ? !1 : null
|
|
3444
3444
|
});
|
|
3445
|
-
return
|
|
3445
|
+
return v;
|
|
3446
3446
|
};
|
|
3447
3447
|
function rg(e, t) {
|
|
3448
3448
|
return e.map(function(n) {
|
|
@@ -3585,7 +3585,7 @@ var Kl = function(e) {
|
|
|
3585
3585
|
home: p,
|
|
3586
3586
|
draggables: s,
|
|
3587
3587
|
viewport: t.viewport
|
|
3588
|
-
}), m = f.impact, g = f.afterCritical, b = u && u.isCombineEnabled ? t.impact : m,
|
|
3588
|
+
}), m = f.impact, g = f.afterCritical, b = u && u.isCombineEnabled ? t.impact : m, h = Yl({
|
|
3589
3589
|
pageOffset: t.current.page.offset,
|
|
3590
3590
|
draggable: l.draggables[t.critical.draggable.id],
|
|
3591
3591
|
draggables: l.draggables,
|
|
@@ -3595,21 +3595,21 @@ var Kl = function(e) {
|
|
|
3595
3595
|
afterCritical: g
|
|
3596
3596
|
});
|
|
3597
3597
|
nr();
|
|
3598
|
-
var
|
|
3598
|
+
var v = re({
|
|
3599
3599
|
phase: "DRAGGING"
|
|
3600
3600
|
}, t, {
|
|
3601
3601
|
phase: "DRAGGING",
|
|
3602
|
-
impact:
|
|
3602
|
+
impact: h,
|
|
3603
3603
|
onLiftImpact: m,
|
|
3604
3604
|
dimensions: l,
|
|
3605
3605
|
afterCritical: g,
|
|
3606
3606
|
forceShouldAnimate: !1
|
|
3607
3607
|
});
|
|
3608
3608
|
if (t.phase === "COLLECTING")
|
|
3609
|
-
return
|
|
3609
|
+
return v;
|
|
3610
3610
|
var x = re({
|
|
3611
3611
|
phase: "DROP_PENDING"
|
|
3612
|
-
},
|
|
3612
|
+
}, v, {
|
|
3613
3613
|
phase: "DROP_PENDING",
|
|
3614
3614
|
reason: t.reason,
|
|
3615
3615
|
isWaiting: !1
|
|
@@ -3656,14 +3656,14 @@ var ko = {
|
|
|
3656
3656
|
borderBoxCenter: Le(d.selection, o.scroll.initial),
|
|
3657
3657
|
offset: Le(d.selection, o.scroll.diff.value)
|
|
3658
3658
|
}
|
|
3659
|
-
}, f = Vr(s.droppables).every(function(
|
|
3660
|
-
return !
|
|
3659
|
+
}, f = Vr(s.droppables).every(function(L) {
|
|
3660
|
+
return !L.isFixedOnPage;
|
|
3661
3661
|
}), m = Jl({
|
|
3662
3662
|
draggable: c,
|
|
3663
3663
|
home: u,
|
|
3664
3664
|
draggables: s.draggables,
|
|
3665
3665
|
viewport: o
|
|
3666
|
-
}), g = m.impact, b = m.afterCritical,
|
|
3666
|
+
}), g = m.impact, b = m.afterCritical, h = {
|
|
3667
3667
|
phase: "DRAGGING",
|
|
3668
3668
|
isDragging: !0,
|
|
3669
3669
|
critical: r,
|
|
@@ -3679,18 +3679,18 @@ var ko = {
|
|
|
3679
3679
|
scrollJumpRequest: null,
|
|
3680
3680
|
forceShouldAnimate: null
|
|
3681
3681
|
};
|
|
3682
|
-
return
|
|
3682
|
+
return h;
|
|
3683
3683
|
}
|
|
3684
3684
|
if (t.type === "COLLECTION_STARTING") {
|
|
3685
3685
|
if (e.phase === "COLLECTING" || e.phase === "DROP_PENDING")
|
|
3686
3686
|
return e;
|
|
3687
3687
|
e.phase !== "DRAGGING" && (process.env.NODE_ENV !== "production" ? D(!1, "Collection cannot start from phase " + e.phase) : D());
|
|
3688
|
-
var
|
|
3688
|
+
var v = re({
|
|
3689
3689
|
phase: "COLLECTING"
|
|
3690
3690
|
}, e, {
|
|
3691
3691
|
phase: "COLLECTING"
|
|
3692
3692
|
});
|
|
3693
|
-
return
|
|
3693
|
+
return v;
|
|
3694
3694
|
}
|
|
3695
3695
|
if (t.type === "PUBLISH_WHILE_DRAGGING")
|
|
3696
3696
|
return e.phase === "COLLECTING" || e.phase === "DROP_PENDING" || (process.env.NODE_ENV !== "production" ? D(!1, "Unexpected " + t.type + " received in phase " + e.phase) : D()), cg({
|
|
@@ -3712,32 +3712,32 @@ var ko = {
|
|
|
3712
3712
|
if (e.phase === "DROP_PENDING" || e.phase === "COLLECTING")
|
|
3713
3713
|
return oa(e);
|
|
3714
3714
|
zt(e) || (process.env.NODE_ENV !== "production" ? D(!1, t.type + " not permitted in phase " + e.phase) : D());
|
|
3715
|
-
var N = t.payload, y = N.id, w = N.newScroll,
|
|
3716
|
-
if (!
|
|
3715
|
+
var N = t.payload, y = N.id, w = N.newScroll, S = e.dimensions.droppables[y];
|
|
3716
|
+
if (!S)
|
|
3717
3717
|
return e;
|
|
3718
|
-
var
|
|
3719
|
-
return ia(e,
|
|
3718
|
+
var C = di(S, w);
|
|
3719
|
+
return ia(e, C, !1);
|
|
3720
3720
|
}
|
|
3721
3721
|
if (t.type === "UPDATE_DROPPABLE_IS_ENABLED") {
|
|
3722
3722
|
if (e.phase === "DROP_PENDING")
|
|
3723
3723
|
return e;
|
|
3724
3724
|
zt(e) || (process.env.NODE_ENV !== "production" ? D(!1, "Attempting to move in an unsupported phase " + e.phase) : D());
|
|
3725
|
-
var _ = t.payload,
|
|
3726
|
-
T || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot find Droppable[id: " +
|
|
3725
|
+
var _ = t.payload, E = _.id, O = _.isEnabled, T = e.dimensions.droppables[E];
|
|
3726
|
+
T || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot find Droppable[id: " + E + "] to toggle its enabled state") : D()), T.isEnabled === O && (process.env.NODE_ENV !== "production" ? D(!1, "Trying to set droppable isEnabled to " + String(O) + `
|
|
3727
3727
|
but it is already ` + String(T.isEnabled)) : D());
|
|
3728
|
-
var
|
|
3728
|
+
var k = re({}, T, {
|
|
3729
3729
|
isEnabled: O
|
|
3730
3730
|
});
|
|
3731
|
-
return ia(e,
|
|
3731
|
+
return ia(e, k, !0);
|
|
3732
3732
|
}
|
|
3733
3733
|
if (t.type === "UPDATE_DROPPABLE_IS_COMBINE_ENABLED") {
|
|
3734
3734
|
if (e.phase === "DROP_PENDING")
|
|
3735
3735
|
return e;
|
|
3736
3736
|
zt(e) || (process.env.NODE_ENV !== "production" ? D(!1, "Attempting to move in an unsupported phase " + e.phase) : D());
|
|
3737
|
-
var j = t.payload, P = j.id, W = j.isCombineEnabled,
|
|
3738
|
-
|
|
3739
|
-
but it is already ` + String(
|
|
3740
|
-
var $ = re({},
|
|
3737
|
+
var j = t.payload, P = j.id, W = j.isCombineEnabled, M = e.dimensions.droppables[P];
|
|
3738
|
+
M || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot find Droppable[id: " + P + "] to toggle its isCombineEnabled state") : D()), M.isCombineEnabled === W && (process.env.NODE_ENV !== "production" ? D(!1, "Trying to set droppable isCombineEnabled to " + String(W) + `
|
|
3739
|
+
but it is already ` + String(M.isCombineEnabled)) : D());
|
|
3740
|
+
var $ = re({}, M, {
|
|
3741
3741
|
isCombineEnabled: W
|
|
3742
3742
|
});
|
|
3743
3743
|
return ia(e, $, !0);
|
|
@@ -3979,13 +3979,13 @@ var _g = function(e) {
|
|
|
3979
3979
|
}, f = {
|
|
3980
3980
|
draggableId: l,
|
|
3981
3981
|
scrollOptions: p
|
|
3982
|
-
}, m = e.startPublishing(f), g = m.critical, b = m.dimensions,
|
|
3982
|
+
}, m = e.startPublishing(f), g = m.critical, b = m.dimensions, h = m.viewport;
|
|
3983
3983
|
Ig(g, b), r(fg({
|
|
3984
3984
|
critical: g,
|
|
3985
3985
|
dimensions: b,
|
|
3986
3986
|
clientSelection: c,
|
|
3987
3987
|
movementMode: u,
|
|
3988
|
-
viewport:
|
|
3988
|
+
viewport: h
|
|
3989
3989
|
}));
|
|
3990
3990
|
};
|
|
3991
3991
|
};
|
|
@@ -4101,13 +4101,13 @@ var _g = function(e) {
|
|
|
4101
4101
|
home: o.dimensions.droppables[o.critical.droppable.id],
|
|
4102
4102
|
viewport: o.viewport,
|
|
4103
4103
|
draggables: o.dimensions.draggables
|
|
4104
|
-
}), f = p.impact, m = p.didDropInsideDroppable, g = m ? pi(f) : null, b = m ? $r(f) : null,
|
|
4104
|
+
}), f = p.impact, m = p.didDropInsideDroppable, g = m ? pi(f) : null, b = m ? $r(f) : null, h = {
|
|
4105
4105
|
index: c.draggable.index,
|
|
4106
4106
|
droppableId: c.droppable.id
|
|
4107
|
-
},
|
|
4107
|
+
}, v = {
|
|
4108
4108
|
draggableId: d.descriptor.id,
|
|
4109
4109
|
type: d.descriptor.type,
|
|
4110
|
-
source:
|
|
4110
|
+
source: h,
|
|
4111
4111
|
reason: s,
|
|
4112
4112
|
mode: o.movementMode,
|
|
4113
4113
|
destination: g,
|
|
@@ -4121,9 +4121,9 @@ var _g = function(e) {
|
|
|
4121
4121
|
}), N = {
|
|
4122
4122
|
critical: o.critical,
|
|
4123
4123
|
afterCritical: o.afterCritical,
|
|
4124
|
-
result:
|
|
4124
|
+
result: v,
|
|
4125
4125
|
impact: f
|
|
4126
|
-
}, y = !Ot(o.current.client.offset, x) || !!
|
|
4126
|
+
}, y = !Ot(o.current.client.offset, x) || !!v.combine;
|
|
4127
4127
|
if (!y) {
|
|
4128
4128
|
n(xi({
|
|
4129
4129
|
completed: N
|
|
@@ -4134,12 +4134,12 @@ var _g = function(e) {
|
|
|
4134
4134
|
current: o.current.client.offset,
|
|
4135
4135
|
destination: x,
|
|
4136
4136
|
reason: s
|
|
4137
|
-
}),
|
|
4137
|
+
}), S = {
|
|
4138
4138
|
newHomeClientOffset: x,
|
|
4139
4139
|
dropDuration: w,
|
|
4140
4140
|
completed: N
|
|
4141
4141
|
};
|
|
4142
|
-
n(Sg(
|
|
4142
|
+
n(Sg(S));
|
|
4143
4143
|
}
|
|
4144
4144
|
};
|
|
4145
4145
|
};
|
|
@@ -4308,12 +4308,12 @@ var Fg = function(t) {
|
|
|
4308
4308
|
}, l = function(f, m) {
|
|
4309
4309
|
var g = pi(m), b = $r(m);
|
|
4310
4310
|
r || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot fire onDragMove when onDragStart has not been called") : D());
|
|
4311
|
-
var
|
|
4312
|
-
|
|
4313
|
-
var
|
|
4314
|
-
|
|
4311
|
+
var h = !Hg(f, r.lastCritical);
|
|
4312
|
+
h && (r.lastCritical = f);
|
|
4313
|
+
var v = !Ug(r.lastLocation, g);
|
|
4314
|
+
v && (r.lastLocation = g);
|
|
4315
4315
|
var x = !Wg(r.lastCombine, b);
|
|
4316
|
-
if (x && (r.lastCombine = b), !(!
|
|
4316
|
+
if (x && (r.lastCombine = b), !(!h && !v && !x)) {
|
|
4317
4317
|
var N = re({}, cr(f, r.mode), {
|
|
4318
4318
|
combine: b,
|
|
4319
4319
|
destination: g
|
|
@@ -4494,22 +4494,22 @@ function rv(e) {
|
|
|
4494
4494
|
var t = e.registry, n = e.callbacks, r = la(), a = null, o = function() {
|
|
4495
4495
|
a || (n.collectionStarting(), a = requestAnimationFrame(function() {
|
|
4496
4496
|
a = null, tr();
|
|
4497
|
-
var d = r, p = d.additions, f = d.removals, m = d.modified, g = Object.keys(p).map(function(
|
|
4498
|
-
return t.draggable.getById(
|
|
4499
|
-
}).sort(function(
|
|
4500
|
-
return
|
|
4501
|
-
}), b = Object.keys(m).map(function(
|
|
4502
|
-
var x = t.droppable.getById(
|
|
4497
|
+
var d = r, p = d.additions, f = d.removals, m = d.modified, g = Object.keys(p).map(function(v) {
|
|
4498
|
+
return t.draggable.getById(v).getDimension(Be);
|
|
4499
|
+
}).sort(function(v, x) {
|
|
4500
|
+
return v.descriptor.index - x.descriptor.index;
|
|
4501
|
+
}), b = Object.keys(m).map(function(v) {
|
|
4502
|
+
var x = t.droppable.getById(v), N = x.callbacks.getScrollWhileDragging();
|
|
4503
4503
|
return {
|
|
4504
|
-
droppableId:
|
|
4504
|
+
droppableId: v,
|
|
4505
4505
|
scroll: N
|
|
4506
4506
|
};
|
|
4507
|
-
}),
|
|
4507
|
+
}), h = {
|
|
4508
4508
|
additions: g,
|
|
4509
4509
|
removals: Object.keys(f),
|
|
4510
4510
|
modified: b
|
|
4511
4511
|
};
|
|
4512
|
-
r = la(), nr(), n.publish(
|
|
4512
|
+
r = la(), nr(), n.publish(h);
|
|
4513
4513
|
}));
|
|
4514
4514
|
}, s = function(d) {
|
|
4515
4515
|
var p = d.descriptor.id;
|
|
@@ -4636,15 +4636,15 @@ var ov = function(e, t) {
|
|
|
4636
4636
|
m.type === "ADDITION" && Mo(e, g, m.value) && r.add(m.value), m.type === "REMOVAL" && Mo(e, g, m.value) && r.remove(m.value);
|
|
4637
4637
|
}, d = function(m) {
|
|
4638
4638
|
n && (process.env.NODE_ENV !== "production" ? D(!1, "Cannot start capturing critical dimensions as there is already a collection") : D());
|
|
4639
|
-
var g = e.draggable.getById(m.draggableId), b = e.droppable.getById(g.descriptor.droppableId),
|
|
4639
|
+
var g = e.draggable.getById(m.draggableId), b = e.droppable.getById(g.descriptor.droppableId), h = {
|
|
4640
4640
|
draggable: g.descriptor,
|
|
4641
4641
|
droppable: b.descriptor
|
|
4642
|
-
},
|
|
4642
|
+
}, v = e.subscribe(u);
|
|
4643
4643
|
return n = {
|
|
4644
|
-
critical:
|
|
4645
|
-
unsubscribe:
|
|
4644
|
+
critical: h,
|
|
4645
|
+
unsubscribe: v
|
|
4646
4646
|
}, iv({
|
|
4647
|
-
critical:
|
|
4647
|
+
critical: h,
|
|
4648
4648
|
registry: e,
|
|
4649
4649
|
scrollOptions: m.scrollOptions
|
|
4650
4650
|
});
|
|
@@ -5093,8 +5093,8 @@ function Iv(e, t) {
|
|
|
5093
5093
|
var p = Ho(t), f = Ho(t);
|
|
5094
5094
|
return r.current = p, a.current = f, p.setAttribute(vn + "-always", e), f.setAttribute(vn + "-dynamic", e), ca().appendChild(p), ca().appendChild(f), s(n.always), o(n.resting), function() {
|
|
5095
5095
|
var m = function(b) {
|
|
5096
|
-
var
|
|
5097
|
-
|
|
5096
|
+
var h = b.current;
|
|
5097
|
+
h || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot unmount ref as it is not set") : D()), ca().removeChild(h), b.current = null;
|
|
5098
5098
|
};
|
|
5099
5099
|
m(r), m(a);
|
|
5100
5100
|
};
|
|
@@ -5140,8 +5140,8 @@ function _v(e) {
|
|
|
5140
5140
|
focus: m
|
|
5141
5141
|
};
|
|
5142
5142
|
return t.current[f] = g, function() {
|
|
5143
|
-
var
|
|
5144
|
-
|
|
5143
|
+
var h = t.current, v = h[f];
|
|
5144
|
+
v !== g && delete h[f];
|
|
5145
5145
|
};
|
|
5146
5146
|
}, []), s = J(function(f) {
|
|
5147
5147
|
var m = pc(e, f);
|
|
@@ -5864,8 +5864,8 @@ function mh(e) {
|
|
|
5864
5864
|
sourceEvent: m
|
|
5865
5865
|
});
|
|
5866
5866
|
if (b) {
|
|
5867
|
-
var
|
|
5868
|
-
x:
|
|
5867
|
+
var h = m.touches[0], v = h.clientX, x = h.clientY, N = {
|
|
5868
|
+
x: v,
|
|
5869
5869
|
y: x
|
|
5870
5870
|
};
|
|
5871
5871
|
n.current(), p(b, N);
|
|
@@ -5896,9 +5896,9 @@ function mh(e) {
|
|
|
5896
5896
|
cancel: c,
|
|
5897
5897
|
completed: l,
|
|
5898
5898
|
getPhase: r
|
|
5899
|
-
}, b = nt(window, fh(g), m),
|
|
5899
|
+
}, b = nt(window, fh(g), m), h = nt(window, ph(g), m);
|
|
5900
5900
|
n.current = function() {
|
|
5901
|
-
b(),
|
|
5901
|
+
b(), h();
|
|
5902
5902
|
};
|
|
5903
5903
|
}, [c, r, l]), d = J(function() {
|
|
5904
5904
|
var m = r();
|
|
@@ -6063,24 +6063,24 @@ function Eh(e) {
|
|
|
6063
6063
|
function g() {
|
|
6064
6064
|
return t.isActive(p);
|
|
6065
6065
|
}
|
|
6066
|
-
function b(
|
|
6066
|
+
function b(S, C) {
|
|
6067
6067
|
ur({
|
|
6068
|
-
expected:
|
|
6068
|
+
expected: S,
|
|
6069
6069
|
phase: f,
|
|
6070
6070
|
isLockActive: g,
|
|
6071
6071
|
shouldWarn: !0
|
|
6072
|
-
}) && r.dispatch(
|
|
6072
|
+
}) && r.dispatch(C());
|
|
6073
6073
|
}
|
|
6074
|
-
var
|
|
6075
|
-
function
|
|
6076
|
-
function
|
|
6074
|
+
var h = b.bind(null, "DRAGGING");
|
|
6075
|
+
function v(S) {
|
|
6076
|
+
function C() {
|
|
6077
6077
|
t.release(), f = "COMPLETED";
|
|
6078
6078
|
}
|
|
6079
|
-
f !== "PRE_DRAG" && (
|
|
6080
|
-
function _(
|
|
6079
|
+
f !== "PRE_DRAG" && (C(), f !== "PRE_DRAG" && (process.env.NODE_ENV !== "production" ? D(!1, "Cannot lift in phase " + f) : D())), r.dispatch(pg(S.liftActionArgs)), f = "DRAGGING";
|
|
6080
|
+
function _(E, O) {
|
|
6081
6081
|
if (O === void 0 && (O = {
|
|
6082
6082
|
shouldBlockNextClick: !1
|
|
6083
|
-
}),
|
|
6083
|
+
}), S.cleanup(), O.shouldBlockNextClick) {
|
|
6084
6084
|
var T = nt(window, [{
|
|
6085
6085
|
eventName: "click",
|
|
6086
6086
|
fn: Ch,
|
|
@@ -6092,8 +6092,8 @@ function Eh(e) {
|
|
|
6092
6092
|
}]);
|
|
6093
6093
|
setTimeout(T);
|
|
6094
6094
|
}
|
|
6095
|
-
|
|
6096
|
-
reason:
|
|
6095
|
+
C(), r.dispatch(ec({
|
|
6096
|
+
reason: E
|
|
6097
6097
|
}));
|
|
6098
6098
|
}
|
|
6099
6099
|
return re({
|
|
@@ -6112,65 +6112,65 @@ function Eh(e) {
|
|
|
6112
6112
|
cancel: function(O) {
|
|
6113
6113
|
return _("CANCEL", O);
|
|
6114
6114
|
}
|
|
6115
|
-
},
|
|
6115
|
+
}, S.actions);
|
|
6116
6116
|
}
|
|
6117
|
-
function x(
|
|
6118
|
-
var
|
|
6119
|
-
|
|
6117
|
+
function x(S) {
|
|
6118
|
+
var C = Gn(function(E) {
|
|
6119
|
+
h(function() {
|
|
6120
6120
|
return Zl({
|
|
6121
|
-
client:
|
|
6121
|
+
client: E
|
|
6122
6122
|
});
|
|
6123
6123
|
});
|
|
6124
|
-
}), _ =
|
|
6124
|
+
}), _ = v({
|
|
6125
6125
|
liftActionArgs: {
|
|
6126
6126
|
id: o,
|
|
6127
|
-
clientSelection:
|
|
6127
|
+
clientSelection: S,
|
|
6128
6128
|
movementMode: "FLUID"
|
|
6129
6129
|
},
|
|
6130
6130
|
cleanup: function() {
|
|
6131
|
-
return
|
|
6131
|
+
return C.cancel();
|
|
6132
6132
|
},
|
|
6133
6133
|
actions: {
|
|
6134
|
-
move:
|
|
6134
|
+
move: C
|
|
6135
6135
|
}
|
|
6136
6136
|
});
|
|
6137
6137
|
return re({}, _, {
|
|
6138
|
-
move:
|
|
6138
|
+
move: C
|
|
6139
6139
|
});
|
|
6140
6140
|
}
|
|
6141
6141
|
function N() {
|
|
6142
|
-
var
|
|
6142
|
+
var S = {
|
|
6143
6143
|
moveUp: function() {
|
|
6144
|
-
return
|
|
6144
|
+
return h(wg);
|
|
6145
6145
|
},
|
|
6146
6146
|
moveRight: function() {
|
|
6147
|
-
return
|
|
6147
|
+
return h(jg);
|
|
6148
6148
|
},
|
|
6149
6149
|
moveDown: function() {
|
|
6150
|
-
return
|
|
6150
|
+
return h(Ng);
|
|
6151
6151
|
},
|
|
6152
6152
|
moveLeft: function() {
|
|
6153
|
-
return
|
|
6153
|
+
return h(Dg);
|
|
6154
6154
|
}
|
|
6155
6155
|
};
|
|
6156
|
-
return
|
|
6156
|
+
return v({
|
|
6157
6157
|
liftActionArgs: {
|
|
6158
6158
|
id: o,
|
|
6159
6159
|
clientSelection: bh(d),
|
|
6160
6160
|
movementMode: "SNAP"
|
|
6161
6161
|
},
|
|
6162
6162
|
cleanup: _t,
|
|
6163
|
-
actions:
|
|
6163
|
+
actions: S
|
|
6164
6164
|
});
|
|
6165
6165
|
}
|
|
6166
6166
|
function y() {
|
|
6167
|
-
var
|
|
6167
|
+
var S = ur({
|
|
6168
6168
|
expected: "PRE_DRAG",
|
|
6169
6169
|
phase: f,
|
|
6170
6170
|
isLockActive: g,
|
|
6171
6171
|
shouldWarn: !0
|
|
6172
6172
|
});
|
|
6173
|
-
|
|
6173
|
+
S && t.release();
|
|
6174
6174
|
}
|
|
6175
6175
|
var w = {
|
|
6176
6176
|
isActive: function() {
|
|
@@ -6190,7 +6190,7 @@ function Eh(e) {
|
|
|
6190
6190
|
}
|
|
6191
6191
|
var Ih = [ih, ch, mh];
|
|
6192
6192
|
function _h(e) {
|
|
6193
|
-
var t = e.contextId, n = e.store, r = e.registry, a = e.customSensors, o = e.enableDefaultSensors, s = [].concat(o ? Ih : [], a || []), l =
|
|
6193
|
+
var t = e.contextId, n = e.store, r = e.registry, a = e.customSensors, o = e.enableDefaultSensors, s = [].concat(o ? Ih : [], a || []), l = B(function() {
|
|
6194
6194
|
return Hv();
|
|
6195
6195
|
})[0], c = J(function(x, N) {
|
|
6196
6196
|
x.isDragging && !N.isDragging && l.tryAbandon();
|
|
@@ -6204,27 +6204,27 @@ function _h(e) {
|
|
|
6204
6204
|
}, [l, n, c]), Je(function() {
|
|
6205
6205
|
return l.tryAbandon;
|
|
6206
6206
|
}, [l.tryAbandon]);
|
|
6207
|
-
var u = J(function(
|
|
6207
|
+
var u = J(function(v) {
|
|
6208
6208
|
return bc({
|
|
6209
6209
|
lockAPI: l,
|
|
6210
6210
|
registry: r,
|
|
6211
6211
|
store: n,
|
|
6212
|
-
draggableId:
|
|
6212
|
+
draggableId: v
|
|
6213
6213
|
});
|
|
6214
|
-
}, [l, r, n]), d = J(function(
|
|
6214
|
+
}, [l, r, n]), d = J(function(v, x, N) {
|
|
6215
6215
|
return Eh({
|
|
6216
6216
|
lockAPI: l,
|
|
6217
6217
|
registry: r,
|
|
6218
6218
|
contextId: t,
|
|
6219
6219
|
store: n,
|
|
6220
|
-
draggableId:
|
|
6220
|
+
draggableId: v,
|
|
6221
6221
|
forceSensorStop: x,
|
|
6222
6222
|
sourceEvent: N && N.sourceEvent ? N.sourceEvent : null
|
|
6223
6223
|
});
|
|
6224
|
-
}, [t, l, r, n]), p = J(function(
|
|
6225
|
-
return Dh(t,
|
|
6226
|
-
}, [t]), f = J(function(
|
|
6227
|
-
var x = r.draggable.findById(
|
|
6224
|
+
}, [t, l, r, n]), p = J(function(v) {
|
|
6225
|
+
return Dh(t, v);
|
|
6226
|
+
}, [t]), f = J(function(v) {
|
|
6227
|
+
var x = r.draggable.findById(v);
|
|
6228
6228
|
return x ? x.options : null;
|
|
6229
6229
|
}, [r.draggable]), m = J(function() {
|
|
6230
6230
|
l.isClaimed() && (l.tryAbandon(), n.getState().phase !== "IDLE" && n.dispatch(bi()));
|
|
@@ -6239,8 +6239,8 @@ function _h(e) {
|
|
|
6239
6239
|
};
|
|
6240
6240
|
}, [u, d, p, f, m, g]);
|
|
6241
6241
|
gh(s);
|
|
6242
|
-
for (var
|
|
6243
|
-
s[
|
|
6242
|
+
for (var h = 0; h < s.length; h++)
|
|
6243
|
+
s[h](b);
|
|
6244
6244
|
}
|
|
6245
6245
|
var Oh = function(t) {
|
|
6246
6246
|
return {
|
|
@@ -6262,8 +6262,8 @@ function Ph(e) {
|
|
|
6262
6262
|
}, [l]), u = Rv(t), d = Mv({
|
|
6263
6263
|
contextId: t,
|
|
6264
6264
|
text: o
|
|
6265
|
-
}), p = Iv(t, a), f = J(function(
|
|
6266
|
-
Pn(s).dispatch(
|
|
6265
|
+
}), p = Iv(t, a), f = J(function(E) {
|
|
6266
|
+
Pn(s).dispatch(E);
|
|
6267
6267
|
}, []), m = me(function() {
|
|
6268
6268
|
return co({
|
|
6269
6269
|
publishWhileDragging: mg,
|
|
@@ -6274,30 +6274,30 @@ function Ph(e) {
|
|
|
6274
6274
|
}, f);
|
|
6275
6275
|
}, [f]), g = Pv(), b = me(function() {
|
|
6276
6276
|
return ov(g, m);
|
|
6277
|
-
}, [g, m]),
|
|
6277
|
+
}, [g, m]), h = me(function() {
|
|
6278
6278
|
return jv(re({
|
|
6279
6279
|
scrollWindow: sv,
|
|
6280
6280
|
scrollDroppable: b.scrollDroppable
|
|
6281
6281
|
}, co({
|
|
6282
6282
|
move: Zl
|
|
6283
6283
|
}, f)));
|
|
6284
|
-
}, [b.scrollDroppable, f]),
|
|
6284
|
+
}, [b.scrollDroppable, f]), v = _v(t), x = me(function() {
|
|
6285
6285
|
return nv({
|
|
6286
6286
|
announce: u,
|
|
6287
|
-
autoScroller:
|
|
6287
|
+
autoScroller: h,
|
|
6288
6288
|
dimensionMarshal: b,
|
|
6289
|
-
focusMarshal:
|
|
6289
|
+
focusMarshal: v,
|
|
6290
6290
|
getResponders: c,
|
|
6291
6291
|
styleMarshal: p
|
|
6292
6292
|
});
|
|
6293
|
-
}, [u,
|
|
6293
|
+
}, [u, h, b, v, c, p]);
|
|
6294
6294
|
process.env.NODE_ENV !== "production" && s.current && s.current !== x && process.env.NODE_ENV !== "production" && je("unexpected store change"), s.current = x;
|
|
6295
6295
|
var N = J(function() {
|
|
6296
|
-
var
|
|
6297
|
-
O.phase !== "IDLE" &&
|
|
6296
|
+
var E = Pn(s), O = E.getState();
|
|
6297
|
+
O.phase !== "IDLE" && E.dispatch(bi());
|
|
6298
6298
|
}, []), y = J(function() {
|
|
6299
|
-
var
|
|
6300
|
-
return
|
|
6299
|
+
var E = Pn(s).getState();
|
|
6300
|
+
return E.isDragging || E.phase === "DROP_ANIMATING";
|
|
6301
6301
|
}, []), w = me(function() {
|
|
6302
6302
|
return {
|
|
6303
6303
|
isDragging: y,
|
|
@@ -6305,21 +6305,21 @@ function Ph(e) {
|
|
|
6305
6305
|
};
|
|
6306
6306
|
}, [y, N]);
|
|
6307
6307
|
n(w);
|
|
6308
|
-
var
|
|
6309
|
-
return sc(Pn(s).getState(),
|
|
6310
|
-
}, []),
|
|
6308
|
+
var S = J(function(E) {
|
|
6309
|
+
return sc(Pn(s).getState(), E);
|
|
6310
|
+
}, []), C = J(function() {
|
|
6311
6311
|
return zt(Pn(s).getState());
|
|
6312
6312
|
}, []), _ = me(function() {
|
|
6313
6313
|
return {
|
|
6314
6314
|
marshal: b,
|
|
6315
|
-
focus:
|
|
6315
|
+
focus: v,
|
|
6316
6316
|
contextId: t,
|
|
6317
|
-
canLift:
|
|
6318
|
-
isMovementAllowed:
|
|
6317
|
+
canLift: S,
|
|
6318
|
+
isMovementAllowed: C,
|
|
6319
6319
|
dragHandleUsageInstructionsId: d,
|
|
6320
6320
|
registry: g
|
|
6321
6321
|
};
|
|
6322
|
-
}, [t, b, d,
|
|
6322
|
+
}, [t, b, d, v, S, C, g]);
|
|
6323
6323
|
return _h({
|
|
6324
6324
|
contextId: t,
|
|
6325
6325
|
store: x,
|
|
@@ -6530,11 +6530,11 @@ function Yh(e) {
|
|
|
6530
6530
|
}, [e.droppableId, e.mode, e.type]), c = Z(l), u = me(function() {
|
|
6531
6531
|
return ke(function(y, w) {
|
|
6532
6532
|
t.current || (process.env.NODE_ENV !== "production" ? D(!1, "Can only update scroll when dragging") : D());
|
|
6533
|
-
var
|
|
6533
|
+
var S = {
|
|
6534
6534
|
x: y,
|
|
6535
6535
|
y: w
|
|
6536
6536
|
};
|
|
6537
|
-
o.updateDroppableScroll(l.id,
|
|
6537
|
+
o.updateDroppableScroll(l.id, S);
|
|
6538
6538
|
});
|
|
6539
6539
|
}, [l.id, o]), d = J(function() {
|
|
6540
6540
|
var y = t.current;
|
|
@@ -6547,55 +6547,55 @@ function Yh(e) {
|
|
|
6547
6547
|
}, [p]), m = J(function() {
|
|
6548
6548
|
var y = t.current, w = pr(y);
|
|
6549
6549
|
y && w || (process.env.NODE_ENV !== "production" ? D(!1, "Could not find scroll options while scrolling") : D());
|
|
6550
|
-
var
|
|
6551
|
-
if (
|
|
6550
|
+
var S = y.scrollOptions;
|
|
6551
|
+
if (S.shouldPublishImmediately) {
|
|
6552
6552
|
p();
|
|
6553
6553
|
return;
|
|
6554
6554
|
}
|
|
6555
6555
|
f();
|
|
6556
6556
|
}, [f, p]), g = J(function(y, w) {
|
|
6557
6557
|
t.current && (process.env.NODE_ENV !== "production" ? D(!1, "Cannot collect a droppable while a drag is occurring") : D());
|
|
6558
|
-
var
|
|
6559
|
-
|
|
6560
|
-
var _ = Gh(
|
|
6561
|
-
ref:
|
|
6558
|
+
var S = s.current, C = S.getDroppableRef();
|
|
6559
|
+
C || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot collect without a droppable ref") : D());
|
|
6560
|
+
var _ = Gh(C), E = {
|
|
6561
|
+
ref: C,
|
|
6562
6562
|
descriptor: l,
|
|
6563
6563
|
env: _,
|
|
6564
6564
|
scrollOptions: w
|
|
6565
6565
|
};
|
|
6566
|
-
t.current =
|
|
6566
|
+
t.current = E;
|
|
6567
6567
|
var O = Hh({
|
|
6568
|
-
ref:
|
|
6568
|
+
ref: C,
|
|
6569
6569
|
descriptor: l,
|
|
6570
6570
|
env: _,
|
|
6571
6571
|
windowScroll: y,
|
|
6572
|
-
direction:
|
|
6573
|
-
isDropDisabled:
|
|
6574
|
-
isCombineEnabled:
|
|
6575
|
-
shouldClipSubject: !
|
|
6572
|
+
direction: S.direction,
|
|
6573
|
+
isDropDisabled: S.isDropDisabled,
|
|
6574
|
+
isCombineEnabled: S.isCombineEnabled,
|
|
6575
|
+
shouldClipSubject: !S.ignoreContainerClipping
|
|
6576
6576
|
}), T = _.closestScrollable;
|
|
6577
|
-
return T && (T.setAttribute(Wo.contextId, n.contextId), T.addEventListener("scroll", m, Xo(
|
|
6577
|
+
return T && (T.setAttribute(Wo.contextId, n.contextId), T.addEventListener("scroll", m, Xo(E.scrollOptions)), process.env.NODE_ENV !== "production" && Vh(T)), O;
|
|
6578
6578
|
}, [n.contextId, l, m, s]), b = J(function() {
|
|
6579
6579
|
var y = t.current, w = pr(y);
|
|
6580
6580
|
return y && w || (process.env.NODE_ENV !== "production" ? D(!1, "Can only recollect Droppable client for Droppables that have a scroll container") : D()), Ma(w);
|
|
6581
|
-
}, []),
|
|
6581
|
+
}, []), h = J(function() {
|
|
6582
6582
|
var y = t.current;
|
|
6583
6583
|
y || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot stop drag when no active drag") : D());
|
|
6584
6584
|
var w = pr(y);
|
|
6585
6585
|
t.current = null, w && (f.cancel(), w.removeAttribute(Wo.contextId), w.removeEventListener("scroll", m, Xo(y.scrollOptions)));
|
|
6586
|
-
}, [m, f]),
|
|
6586
|
+
}, [m, f]), v = J(function(y) {
|
|
6587
6587
|
var w = t.current;
|
|
6588
6588
|
w || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot scroll when there is no drag") : D());
|
|
6589
|
-
var
|
|
6590
|
-
|
|
6589
|
+
var S = pr(w);
|
|
6590
|
+
S || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot scroll a droppable with no closest scrollable") : D()), S.scrollTop += y.y, S.scrollLeft += y.x;
|
|
6591
6591
|
}, []), x = me(function() {
|
|
6592
6592
|
return {
|
|
6593
6593
|
getDimensionAndWatchScroll: g,
|
|
6594
6594
|
getScrollWhileDragging: b,
|
|
6595
|
-
dragStopped:
|
|
6596
|
-
scroll:
|
|
6595
|
+
dragStopped: h,
|
|
6596
|
+
scroll: v
|
|
6597
6597
|
};
|
|
6598
|
-
}, [
|
|
6598
|
+
}, [h, g, b, v]), N = me(function() {
|
|
6599
6599
|
return {
|
|
6600
6600
|
uniqueId: r,
|
|
6601
6601
|
descriptor: l,
|
|
@@ -6604,9 +6604,9 @@ function Yh(e) {
|
|
|
6604
6604
|
}, [x, l, r]);
|
|
6605
6605
|
Je(function() {
|
|
6606
6606
|
return c.current = N.descriptor, a.droppable.register(N), function() {
|
|
6607
|
-
t.current && (process.env.NODE_ENV !== "production" && je("Unsupported: changing the droppableId or type of a Droppable during a drag"),
|
|
6607
|
+
t.current && (process.env.NODE_ENV !== "production" && je("Unsupported: changing the droppableId or type of a Droppable during a drag"), h()), a.droppable.unregister(N);
|
|
6608
6608
|
};
|
|
6609
|
-
}, [x, l,
|
|
6609
|
+
}, [x, l, h, N, o, a.droppable]), Je(function() {
|
|
6610
6610
|
t.current && o.updateDroppableIsEnabled(c.current.id, !e.isDropDisabled);
|
|
6611
6611
|
}, [e.isDropDisabled, o]), Je(function() {
|
|
6612
6612
|
t.current && o.updateDroppableIsCombineEnabled(c.current.id, e.isCombineEnabled);
|
|
@@ -6649,7 +6649,7 @@ var Qo = {
|
|
|
6649
6649
|
function Qh(e) {
|
|
6650
6650
|
var t = Z(null), n = J(function() {
|
|
6651
6651
|
t.current && (clearTimeout(t.current), t.current = null);
|
|
6652
|
-
}, []), r = e.animate, a = e.onTransitionEnd, o = e.onClose, s = e.contextId, l =
|
|
6652
|
+
}, []), r = e.animate, a = e.onTransitionEnd, o = e.onClose, s = e.contextId, l = B(e.animate === "open"), c = l[0], u = l[1];
|
|
6653
6653
|
z(function() {
|
|
6654
6654
|
return c ? r !== "open" ? (n(), u(!1), pa) : t.current ? pa : (t.current = setTimeout(function() {
|
|
6655
6655
|
t.current = null, u(!1);
|
|
@@ -6870,8 +6870,8 @@ function mb(e) {
|
|
|
6870
6870
|
e.preventDefault();
|
|
6871
6871
|
}
|
|
6872
6872
|
function gb(e) {
|
|
6873
|
-
var t = Z(null), n = J(function(
|
|
6874
|
-
t.current =
|
|
6873
|
+
var t = Z(null), n = J(function(E) {
|
|
6874
|
+
t.current = E;
|
|
6875
6875
|
}, []), r = J(function() {
|
|
6876
6876
|
return t.current;
|
|
6877
6877
|
}, []), a = Pr(Wr), o = a.contextId, s = a.dragHandleUsageInstructionsId, l = a.registry, c = Pr(Ai), u = c.type, d = c.droppableId, p = me(function() {
|
|
@@ -6881,18 +6881,18 @@ function gb(e) {
|
|
|
6881
6881
|
type: u,
|
|
6882
6882
|
droppableId: d
|
|
6883
6883
|
};
|
|
6884
|
-
}, [e.draggableId, e.index, u, d]), f = e.children, m = e.draggableId, g = e.isEnabled, b = e.shouldRespectForcePress,
|
|
6885
|
-
if (pb(e, o, r), fb(
|
|
6884
|
+
}, [e.draggableId, e.index, u, d]), f = e.children, m = e.draggableId, g = e.isEnabled, b = e.shouldRespectForcePress, h = e.canDragInteractiveElements, v = e.isClone, x = e.mapped, N = e.dropAnimationFinished;
|
|
6885
|
+
if (pb(e, o, r), fb(v), !v) {
|
|
6886
6886
|
var y = me(function() {
|
|
6887
6887
|
return {
|
|
6888
6888
|
descriptor: p,
|
|
6889
6889
|
registry: l,
|
|
6890
6890
|
getDraggableRef: r,
|
|
6891
|
-
canDragInteractiveElements:
|
|
6891
|
+
canDragInteractiveElements: h,
|
|
6892
6892
|
shouldRespectForcePress: b,
|
|
6893
6893
|
isEnabled: g
|
|
6894
6894
|
};
|
|
6895
|
-
}, [p, l, r,
|
|
6895
|
+
}, [p, l, r, h, b, g]);
|
|
6896
6896
|
ub(y);
|
|
6897
6897
|
}
|
|
6898
6898
|
var w = me(function() {
|
|
@@ -6905,21 +6905,21 @@ function gb(e) {
|
|
|
6905
6905
|
draggable: !1,
|
|
6906
6906
|
onDragStart: mb
|
|
6907
6907
|
} : null;
|
|
6908
|
-
}, [o, s, m, g]),
|
|
6909
|
-
x.type === "DRAGGING" && x.dropping &&
|
|
6910
|
-
}, [N, x]),
|
|
6911
|
-
var
|
|
6908
|
+
}, [o, s, m, g]), S = J(function(E) {
|
|
6909
|
+
x.type === "DRAGGING" && x.dropping && E.propertyName === "transform" && N();
|
|
6910
|
+
}, [N, x]), C = me(function() {
|
|
6911
|
+
var E = cb(x), O = x.type === "DRAGGING" && x.dropping ? S : null, T = {
|
|
6912
6912
|
innerRef: n,
|
|
6913
6913
|
draggableProps: {
|
|
6914
6914
|
"data-rbd-draggable-context-id": o,
|
|
6915
6915
|
"data-rbd-draggable-id": m,
|
|
6916
|
-
style:
|
|
6916
|
+
style: E,
|
|
6917
6917
|
onTransitionEnd: O
|
|
6918
6918
|
},
|
|
6919
6919
|
dragHandleProps: w
|
|
6920
6920
|
};
|
|
6921
6921
|
return T;
|
|
6922
|
-
}, [o, w, m, x,
|
|
6922
|
+
}, [o, w, m, x, S, n]), _ = me(function() {
|
|
6923
6923
|
return {
|
|
6924
6924
|
draggableId: p.id,
|
|
6925
6925
|
type: p.type,
|
|
@@ -6929,7 +6929,7 @@ function gb(e) {
|
|
|
6929
6929
|
}
|
|
6930
6930
|
};
|
|
6931
6931
|
}, [p.droppableId, p.id, p.index, p.type]);
|
|
6932
|
-
return f(
|
|
6932
|
+
return f(C, x.snapshot, _);
|
|
6933
6933
|
}
|
|
6934
6934
|
var Nc = function(e, t) {
|
|
6935
6935
|
return e === t;
|
|
@@ -6983,7 +6983,7 @@ function bb() {
|
|
|
6983
6983
|
var f = o.completed;
|
|
6984
6984
|
if (f.result.draggableId !== s.draggableId)
|
|
6985
6985
|
return null;
|
|
6986
|
-
var m = s.isClone, g = o.dimensions.draggables[s.draggableId], b = f.result,
|
|
6986
|
+
var m = s.isClone, g = o.dimensions.draggables[s.draggableId], b = f.result, h = b.mode, v = jc(b), x = vb(b), N = o.dropDuration, y = {
|
|
6987
6987
|
duration: N,
|
|
6988
6988
|
curve: yi.drop,
|
|
6989
6989
|
moveTo: o.newHomeClientOffset,
|
|
@@ -6996,11 +6996,11 @@ function bb() {
|
|
|
6996
6996
|
offset: o.newHomeClientOffset,
|
|
6997
6997
|
dimension: g,
|
|
6998
6998
|
dropping: y,
|
|
6999
|
-
draggingOver:
|
|
6999
|
+
draggingOver: v,
|
|
7000
7000
|
combineWith: x,
|
|
7001
|
-
mode:
|
|
7001
|
+
mode: h,
|
|
7002
7002
|
forceShouldAnimate: null,
|
|
7003
|
-
snapshot: t(
|
|
7003
|
+
snapshot: t(h, m, v, x, y)
|
|
7004
7004
|
}
|
|
7005
7005
|
};
|
|
7006
7006
|
}
|
|
@@ -7054,12 +7054,12 @@ function yb() {
|
|
|
7054
7054
|
return r(g);
|
|
7055
7055
|
if (u.displaced.invisible[l])
|
|
7056
7056
|
return null;
|
|
7057
|
-
var b = xn(d.displacedBy.point),
|
|
7058
|
-
return n(
|
|
7057
|
+
var b = xn(d.displacedBy.point), h = e(b.x, b.y);
|
|
7058
|
+
return n(h, g, !0);
|
|
7059
7059
|
}
|
|
7060
7060
|
if (f)
|
|
7061
7061
|
return r(g);
|
|
7062
|
-
var
|
|
7062
|
+
var v = u.displacedBy.point, x = e(v.x, v.y);
|
|
7063
7063
|
return n(x, g, p.shouldAnimate);
|
|
7064
7064
|
}, o = function(l, c) {
|
|
7065
7065
|
if (l.isDragging)
|
|
@@ -7100,25 +7100,25 @@ function Db(e) {
|
|
|
7100
7100
|
function Sb(e) {
|
|
7101
7101
|
var t = V(Wr);
|
|
7102
7102
|
t || (process.env.NODE_ENV !== "production" ? D(!1, "Could not find app context") : D());
|
|
7103
|
-
var n = t.contextId, r = t.isMovementAllowed, a = Z(null), o = Z(null), s = e.children, l = e.droppableId, c = e.type, u = e.mode, d = e.direction, p = e.ignoreContainerClipping, f = e.isDropDisabled, m = e.isCombineEnabled, g = e.snapshot, b = e.useClone,
|
|
7103
|
+
var n = t.contextId, r = t.isMovementAllowed, a = Z(null), o = Z(null), s = e.children, l = e.droppableId, c = e.type, u = e.mode, d = e.direction, p = e.ignoreContainerClipping, f = e.isDropDisabled, m = e.isCombineEnabled, g = e.snapshot, b = e.useClone, h = e.updateViewportMaxScroll, v = e.getContainerForClone, x = J(function() {
|
|
7104
7104
|
return a.current;
|
|
7105
|
-
}, []), N = J(function(
|
|
7106
|
-
a.current =
|
|
7105
|
+
}, []), N = J(function(k) {
|
|
7106
|
+
a.current = k;
|
|
7107
7107
|
}, []), y = J(function() {
|
|
7108
7108
|
return o.current;
|
|
7109
|
-
}, []), w = J(function(
|
|
7110
|
-
o.current =
|
|
7109
|
+
}, []), w = J(function(k) {
|
|
7110
|
+
o.current = k;
|
|
7111
7111
|
}, []);
|
|
7112
7112
|
nb({
|
|
7113
7113
|
props: e,
|
|
7114
7114
|
getDroppableRef: x,
|
|
7115
7115
|
getPlaceholderRef: y
|
|
7116
7116
|
});
|
|
7117
|
-
var
|
|
7118
|
-
r() &&
|
|
7117
|
+
var S = J(function() {
|
|
7118
|
+
r() && h({
|
|
7119
7119
|
maxScroll: oc()
|
|
7120
7120
|
});
|
|
7121
|
-
}, [r,
|
|
7121
|
+
}, [r, h]);
|
|
7122
7122
|
Yh({
|
|
7123
7123
|
droppableId: l,
|
|
7124
7124
|
type: c,
|
|
@@ -7129,49 +7129,49 @@ function Sb(e) {
|
|
|
7129
7129
|
ignoreContainerClipping: p,
|
|
7130
7130
|
getDroppableRef: x
|
|
7131
7131
|
});
|
|
7132
|
-
var
|
|
7132
|
+
var C = le.createElement(rb, {
|
|
7133
7133
|
on: e.placeholder,
|
|
7134
7134
|
shouldAnimate: e.shouldAnimatePlaceholder
|
|
7135
|
-
}, function(
|
|
7136
|
-
var j =
|
|
7135
|
+
}, function(k) {
|
|
7136
|
+
var j = k.onClose, P = k.data, W = k.animate;
|
|
7137
7137
|
return le.createElement(Jh, {
|
|
7138
7138
|
placeholder: P,
|
|
7139
7139
|
onClose: j,
|
|
7140
7140
|
innerRef: w,
|
|
7141
7141
|
animate: W,
|
|
7142
7142
|
contextId: n,
|
|
7143
|
-
onTransitionEnd:
|
|
7143
|
+
onTransitionEnd: S
|
|
7144
7144
|
});
|
|
7145
7145
|
}), _ = me(function() {
|
|
7146
7146
|
return {
|
|
7147
7147
|
innerRef: N,
|
|
7148
|
-
placeholder:
|
|
7148
|
+
placeholder: C,
|
|
7149
7149
|
droppableProps: {
|
|
7150
7150
|
"data-rbd-droppable-id": l,
|
|
7151
7151
|
"data-rbd-droppable-context-id": n
|
|
7152
7152
|
}
|
|
7153
7153
|
};
|
|
7154
|
-
}, [n, l,
|
|
7154
|
+
}, [n, l, C, N]), E = b ? b.dragging.draggableId : null, O = me(function() {
|
|
7155
7155
|
return {
|
|
7156
7156
|
droppableId: l,
|
|
7157
7157
|
type: c,
|
|
7158
|
-
isUsingCloneFor:
|
|
7158
|
+
isUsingCloneFor: E
|
|
7159
7159
|
};
|
|
7160
|
-
}, [l,
|
|
7160
|
+
}, [l, E, c]);
|
|
7161
7161
|
function T() {
|
|
7162
7162
|
if (!b)
|
|
7163
7163
|
return null;
|
|
7164
|
-
var
|
|
7165
|
-
draggableId:
|
|
7166
|
-
index:
|
|
7164
|
+
var k = b.dragging, j = b.render, P = le.createElement(Sc, {
|
|
7165
|
+
draggableId: k.draggableId,
|
|
7166
|
+
index: k.source.index,
|
|
7167
7167
|
isClone: !0,
|
|
7168
7168
|
isEnabled: !0,
|
|
7169
7169
|
shouldRespectForcePress: !1,
|
|
7170
7170
|
canDragInteractiveElements: !0
|
|
7171
|
-
}, function(W,
|
|
7172
|
-
return j(W,
|
|
7171
|
+
}, function(W, M) {
|
|
7172
|
+
return j(W, M, k);
|
|
7173
7173
|
});
|
|
7174
|
-
return Fn.createPortal(P,
|
|
7174
|
+
return Fn.createPortal(P, v());
|
|
7175
7175
|
}
|
|
7176
7176
|
return le.createElement(Ai.Provider, {
|
|
7177
7177
|
value: O
|
|
@@ -7226,7 +7226,7 @@ var ga = function(t, n) {
|
|
|
7226
7226
|
return n;
|
|
7227
7227
|
if (!u)
|
|
7228
7228
|
return t;
|
|
7229
|
-
var
|
|
7229
|
+
var h = {
|
|
7230
7230
|
isDraggingOver: c,
|
|
7231
7231
|
draggingOverWith: f,
|
|
7232
7232
|
draggingFromThisWith: null,
|
|
@@ -7235,7 +7235,7 @@ var ga = function(t, n) {
|
|
|
7235
7235
|
return {
|
|
7236
7236
|
placeholder: d.placeholder,
|
|
7237
7237
|
shouldAnimatePlaceholder: !0,
|
|
7238
|
-
snapshot:
|
|
7238
|
+
snapshot: h,
|
|
7239
7239
|
useClone: null
|
|
7240
7240
|
};
|
|
7241
7241
|
}), o = function(l, c) {
|
|
@@ -7248,11 +7248,11 @@ var ga = function(t, n) {
|
|
|
7248
7248
|
return a(u, p, b, b, g, f);
|
|
7249
7249
|
}
|
|
7250
7250
|
if (l.phase === "DROP_ANIMATING") {
|
|
7251
|
-
var
|
|
7252
|
-
if (!ga(d,
|
|
7251
|
+
var h = l.completed;
|
|
7252
|
+
if (!ga(d, h.critical))
|
|
7253
7253
|
return n;
|
|
7254
|
-
var
|
|
7255
|
-
return a(u, p, jc(
|
|
7254
|
+
var v = Zo(h.critical, l.dimensions);
|
|
7255
|
+
return a(u, p, jc(h.result) === u, Qe(h.impact) === u, v, f);
|
|
7256
7256
|
}
|
|
7257
7257
|
if (l.phase === "IDLE" && l.completed && !l.shouldFlush) {
|
|
7258
7258
|
var x = l.completed;
|
|
@@ -7402,7 +7402,7 @@ const _c = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: a, render
|
|
|
7402
7402
|
backgroundPosition: "center",
|
|
7403
7403
|
backgroundSize: "contain"
|
|
7404
7404
|
} }) : /* @__PURE__ */ i.jsx("img", { ...s, alt: t ?? "", src: e ?? a }), Fb = ({ children: e, ...t }) => {
|
|
7405
|
-
const [n, r] =
|
|
7405
|
+
const [n, r] = B(!1);
|
|
7406
7406
|
return z(() => {
|
|
7407
7407
|
const a = requestAnimationFrame(() => r(!0));
|
|
7408
7408
|
return () => {
|
|
@@ -7431,44 +7431,44 @@ const _c = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: a, render
|
|
|
7431
7431
|
left: Jb,
|
|
7432
7432
|
right: Zb
|
|
7433
7433
|
}, ex = ({ show: e, onClose: t, photos: n, defaultIndex: r, uploadPhotosText: a, noPhotosText: o, onUploadPhotos: s, photoActions: l, baseUrl: c, customToken: u, placeholder: d, ImgComponent: p = _c, onChangeOrder: f }) => {
|
|
7434
|
-
const m = xu(), [g, b] =
|
|
7434
|
+
const m = xu(), [g, b] = B(n);
|
|
7435
7435
|
z(() => {
|
|
7436
7436
|
b(n);
|
|
7437
7437
|
}, [n]);
|
|
7438
|
-
const [
|
|
7438
|
+
const [h, v] = B(r), x = g.at(h), N = h > 0, y = h < g.length - 1;
|
|
7439
7439
|
z(() => {
|
|
7440
|
-
e &&
|
|
7440
|
+
e && v(r);
|
|
7441
7441
|
}, [r, e]), z(() => {
|
|
7442
|
-
|
|
7443
|
-
}, [g,
|
|
7444
|
-
const w = A((
|
|
7445
|
-
switch (
|
|
7442
|
+
h >= g.length && v(g.length - 1);
|
|
7443
|
+
}, [g, h]);
|
|
7444
|
+
const w = A((E) => {
|
|
7445
|
+
switch (E.key) {
|
|
7446
7446
|
case "ArrowLeft":
|
|
7447
|
-
|
|
7447
|
+
E.stopPropagation(), N && v((O) => O - 1);
|
|
7448
7448
|
break;
|
|
7449
7449
|
case "ArrowRight":
|
|
7450
|
-
|
|
7450
|
+
E.stopPropagation(), y && v((O) => O + 1);
|
|
7451
7451
|
break;
|
|
7452
7452
|
case "Escape":
|
|
7453
|
-
|
|
7453
|
+
E.stopPropagation(), t();
|
|
7454
7454
|
break;
|
|
7455
7455
|
}
|
|
7456
|
-
}, [y, N, t]),
|
|
7457
|
-
const T = Array.from(g), [
|
|
7458
|
-
return T.splice(O, 0,
|
|
7459
|
-
},
|
|
7460
|
-
if (!
|
|
7456
|
+
}, [y, N, t]), S = (E, O) => {
|
|
7457
|
+
const T = Array.from(g), [k] = T.splice(E, 1);
|
|
7458
|
+
return T.splice(O, 0, k), T;
|
|
7459
|
+
}, C = (E) => {
|
|
7460
|
+
if (!E.destination)
|
|
7461
7461
|
return;
|
|
7462
|
-
const O =
|
|
7463
|
-
f && f(
|
|
7462
|
+
const O = S(E.source.index, E.destination.index);
|
|
7463
|
+
f && f(E.draggableId, E.destination.index), b(O);
|
|
7464
7464
|
};
|
|
7465
7465
|
Cd(w);
|
|
7466
7466
|
const _ = Ed({
|
|
7467
|
-
onSwipedLeft: (
|
|
7468
|
-
|
|
7467
|
+
onSwipedLeft: (E) => {
|
|
7468
|
+
E.velocity > 0.8 && y && v((O) => O + 1);
|
|
7469
7469
|
},
|
|
7470
|
-
onSwipedRight: (
|
|
7471
|
-
|
|
7470
|
+
onSwipedRight: (E) => {
|
|
7471
|
+
E.velocity > 0.8 && N && v((O) => O - 1);
|
|
7472
7472
|
},
|
|
7473
7473
|
delta: 100
|
|
7474
7474
|
});
|
|
@@ -7479,35 +7479,35 @@ const _c = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: a, render
|
|
|
7479
7479
|
}), ..._, children: e && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
7480
7480
|
/* @__PURE__ */ i.jsxs("div", { className: Ve.header, children: [
|
|
7481
7481
|
/* @__PURE__ */ i.jsxs("div", { className: I("rounded", Ve.photoActions), children: [
|
|
7482
|
-
s && /* @__PURE__ */ i.jsx(ks, { accept: ".jpg,.jpeg,.png", onUpload: (
|
|
7483
|
-
|
|
7482
|
+
s && /* @__PURE__ */ i.jsx(ks, { accept: ".jpg,.jpeg,.png", onUpload: (E) => {
|
|
7483
|
+
E.length > 0 && s(Array.from(E));
|
|
7484
7484
|
}, icon: /* @__PURE__ */ i.jsx(Bs, { style: { fontSize: 18 } }), multiple: !0, className: "me-1 me-lg-3", children: a ?? null }),
|
|
7485
|
-
/* @__PURE__ */ i.jsx(Ls, { children: x && (l == null ? void 0 : l.map(({ label:
|
|
7485
|
+
/* @__PURE__ */ i.jsx(Ls, { children: x && (l == null ? void 0 : l.map(({ label: E, onClick: O, ...T }, k) => /* @__PURE__ */ i.jsx(
|
|
7486
7486
|
Sa,
|
|
7487
7487
|
{
|
|
7488
7488
|
hideOn: "sm",
|
|
7489
|
-
cKey: `action-${
|
|
7489
|
+
cKey: `action-${k}`,
|
|
7490
7490
|
onClick: () => O(x.id),
|
|
7491
7491
|
...T,
|
|
7492
|
-
children: typeof
|
|
7492
|
+
children: typeof E == "string" ? E : E(x.id)
|
|
7493
7493
|
},
|
|
7494
|
-
`action-${
|
|
7494
|
+
`action-${k}`
|
|
7495
7495
|
))) })
|
|
7496
7496
|
] }),
|
|
7497
7497
|
/* @__PURE__ */ i.jsx("div", { role: "button", onClick: t, children: /* @__PURE__ */ i.jsx(kt, { style: { fontSize: "32px" } }) })
|
|
7498
7498
|
] }),
|
|
7499
7499
|
g.length === 0 && /* @__PURE__ */ i.jsx("div", { className: "w-100 h-100 d-flex align-items-center justify-content-center", children: /* @__PURE__ */ i.jsx(F, { variant: "body", children: o ?? "No photos available" }) }),
|
|
7500
7500
|
x && /* @__PURE__ */ i.jsxs("div", { className: Ve.photoContainer, children: [
|
|
7501
|
-
/* @__PURE__ */ i.jsx("div", { role: N ? "button" : void 0, className: I("align-items-start", Ve.navButton, Ve.left), onClick: () => N &&
|
|
7501
|
+
/* @__PURE__ */ i.jsx("div", { role: N ? "button" : void 0, className: I("align-items-start", Ve.navButton, Ve.left), onClick: () => N && v((E) => E - 1), children: N && /* @__PURE__ */ i.jsx(Ha, { style: { fontSize: "40px" } }) }),
|
|
7502
7502
|
/* @__PURE__ */ i.jsx(p, { src: x.lgSrc, alt: x.alt, className: I("rounded", Ve.photo), baseUrl: c, customToken: u, placeholder: d, renderAsDivBg: !0 }),
|
|
7503
|
-
/* @__PURE__ */ i.jsx("div", { role: y ? "button" : void 0, className: I("align-items-end", Ve.navButton, Ve.right), onClick: () => y &&
|
|
7503
|
+
/* @__PURE__ */ i.jsx("div", { role: y ? "button" : void 0, className: I("align-items-end", Ve.navButton, Ve.right), onClick: () => y && v((E) => E + 1), children: y && /* @__PURE__ */ i.jsx(za, { style: { fontSize: "40px" } }) })
|
|
7504
7504
|
] }),
|
|
7505
|
-
/* @__PURE__ */ i.jsx("div", { className: I("d-flex justify-content-center", Ve.photosPreviewContainer), children: /* @__PURE__ */ i.jsx(Rh, { onDragEnd:
|
|
7506
|
-
g.map((O, T) => /* @__PURE__ */ i.jsx(Db, { draggableId: O.id, index: T, isDragDisabled: f === void 0, children: m((
|
|
7505
|
+
/* @__PURE__ */ i.jsx("div", { className: I("d-flex justify-content-center", Ve.photosPreviewContainer), children: /* @__PURE__ */ i.jsx(Rh, { onDragEnd: C, children: /* @__PURE__ */ i.jsx(Fb, { droppableId: "droppable", direction: "horizontal", children: (E) => /* @__PURE__ */ i.jsxs("div", { ...E.droppableProps, ref: E.innerRef, className: Ve.photosPreview, children: [
|
|
7506
|
+
g.map((O, T) => /* @__PURE__ */ i.jsx(Db, { draggableId: O.id, index: T, isDragDisabled: f === void 0, children: m((k) => {
|
|
7507
7507
|
var j;
|
|
7508
|
-
return /* @__PURE__ */ i.jsxs("div", { ref:
|
|
7509
|
-
/* @__PURE__ */ i.jsx(p, { role: T !==
|
|
7510
|
-
[Ve.selected]: T ===
|
|
7508
|
+
return /* @__PURE__ */ i.jsxs("div", { ref: k.innerRef, ...k.draggableProps, ...k.dragHandleProps, role: "button", onClick: () => v(T), className: I(Ve.lightboxDraggablePhoto), children: [
|
|
7509
|
+
/* @__PURE__ */ i.jsx(p, { role: T !== h ? "button" : void 0, src: O.smSrc, alt: O.alt, className: I("rounded", Ve.photo, {
|
|
7510
|
+
[Ve.selected]: T === h
|
|
7511
7511
|
}), baseUrl: c, customToken: u, placeholder: d }, O.id),
|
|
7512
7512
|
O.isDefault || O.customIndicators && O.customIndicators.length > 0 ? /* @__PURE__ */ i.jsxs("div", { className: I(Ve.indicators, "gap-1"), children: [
|
|
7513
7513
|
O.isDefault && /* @__PURE__ */ i.jsx("div", { className: "text-primary", children: /* @__PURE__ */ i.jsx(_d, {}) }),
|
|
@@ -7518,23 +7518,23 @@ const _c = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: a, render
|
|
|
7518
7518
|
] }) : null
|
|
7519
7519
|
] });
|
|
7520
7520
|
}) }, O.id)),
|
|
7521
|
-
|
|
7521
|
+
E.placeholder
|
|
7522
7522
|
] }) }) }) })
|
|
7523
7523
|
] }) })
|
|
7524
7524
|
] });
|
|
7525
7525
|
}, tx = ({ photos: e, onUploadPhotos: t, uploadPhotosText: n, noPhotosText: r, photoActions: a, baseUrl: o, customToken: s, placeholder: l, ImgComponent: c = _c, noLightboxOnlyButtonOnEmpty: u = !1, hideLightbox: d = !1, onChangeOrder: p }) => {
|
|
7526
|
-
const [f, m] =
|
|
7526
|
+
const [f, m] = B(null), g = f !== null ? e[f] : null, [b, h] = B(!1);
|
|
7527
7527
|
return z(() => {
|
|
7528
7528
|
if (e.length === 0) {
|
|
7529
7529
|
m(null);
|
|
7530
7530
|
return;
|
|
7531
7531
|
}
|
|
7532
|
-
const
|
|
7533
|
-
m(
|
|
7534
|
-
}, [e]), !g && t && u ? /* @__PURE__ */ i.jsx(ks, { accept: ".jpg,.jpeg,.png", onUpload: (
|
|
7535
|
-
|
|
7532
|
+
const v = e.findIndex((x) => x.isDefault);
|
|
7533
|
+
m(v > -1 ? v : 0);
|
|
7534
|
+
}, [e]), !g && t && u ? /* @__PURE__ */ i.jsx(ks, { accept: ".jpg,.jpeg,.png", onUpload: (v) => {
|
|
7535
|
+
v.length > 0 && t(Array.from(v));
|
|
7536
7536
|
}, icon: /* @__PURE__ */ i.jsx(Bs, { style: { fontSize: 18 } }), multiple: !0, children: n ?? null }) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
7537
|
-
g ? /* @__PURE__ */ i.jsxs("div", { role: "button", className: "w-100 position-relative", onClick: () =>
|
|
7537
|
+
g ? /* @__PURE__ */ i.jsxs("div", { role: "button", className: "w-100 position-relative", onClick: () => h(!0), children: [
|
|
7538
7538
|
/* @__PURE__ */ i.jsx(c, { src: g.smSrc, alt: g.alt, className: "rounded w-100", baseUrl: o, customToken: s, placeholder: l }),
|
|
7539
7539
|
e.length > 1 && /* @__PURE__ */ i.jsx("div", { className: "position-absolute rounded p-1", style: {
|
|
7540
7540
|
top: 0,
|
|
@@ -7543,8 +7543,8 @@ const _c = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: a, render
|
|
|
7543
7543
|
textShadow: "-2px 2px 4px #696969",
|
|
7544
7544
|
background: "rgba(105,105,105,0.5)"
|
|
7545
7545
|
}, children: /* @__PURE__ */ i.jsx(Od, { fontSize: 24 }) })
|
|
7546
|
-
] }) : /* @__PURE__ */ i.jsx(ze, { text: n ?? "", placement: "left", children: /* @__PURE__ */ i.jsx("div", { role: "button", className: I("rounded p-3 d-flex justify-content-center"), onClick: () =>
|
|
7547
|
-
/* @__PURE__ */ i.jsx(ex, { show: b && !d, onClose: () =>
|
|
7546
|
+
] }) : /* @__PURE__ */ i.jsx(ze, { text: n ?? "", placement: "left", children: /* @__PURE__ */ i.jsx("div", { role: "button", className: I("rounded p-3 d-flex justify-content-center"), onClick: () => h(!0), children: /* @__PURE__ */ i.jsx("img", { src: l, alt: "placeholder", className: "rounded w-25" }) }) }),
|
|
7547
|
+
/* @__PURE__ */ i.jsx(ex, { show: b && !d, onClose: () => h(!1), photos: e, defaultIndex: f ?? 0, uploadPhotosText: n, noPhotosText: r, onUploadPhotos: t, photoActions: a, baseUrl: o, customToken: s, placeholder: l, ImgComponent: c, onChangeOrder: p })
|
|
7548
7548
|
] });
|
|
7549
7549
|
}, JN = ({ children: e }) => {
|
|
7550
7550
|
var c, u, d;
|
|
@@ -7625,7 +7625,7 @@ const _c = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: a, render
|
|
|
7625
7625
|
/* @__PURE__ */ i.jsx("div", { className: I("text-primary", Gt.stepIcon), children: n.icon ?? /* @__PURE__ */ i.jsx(Rd, {}) })
|
|
7626
7626
|
] }) })
|
|
7627
7627
|
] }, r)) }), yx = (e, t, n, r = !0) => {
|
|
7628
|
-
const a = Ke({ silent: r, differentBaseUrl: t, customToken: n }), [o, s] =
|
|
7628
|
+
const a = Ke({ silent: r, differentBaseUrl: t, customToken: n }), [o, s] = B(!1), [l, c] = B(null), u = A(async (d) => {
|
|
7629
7629
|
s(!0), c(null), a.get(e, {
|
|
7630
7630
|
signal: d,
|
|
7631
7631
|
responseType: "blob"
|
|
@@ -7642,7 +7642,7 @@ const _c = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: a, render
|
|
|
7642
7642
|
};
|
|
7643
7643
|
}, [u]), { data: l, setData: c, reloadData: u, isLoading: o };
|
|
7644
7644
|
}, ts = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: a, renderAsDivBg: o, ...s }) => {
|
|
7645
|
-
const { data: l } = yx(e, n, r), [c, u] =
|
|
7645
|
+
const { data: l } = yx(e, n, r), [c, u] = B(null);
|
|
7646
7646
|
return z(() => {
|
|
7647
7647
|
let d = null;
|
|
7648
7648
|
return l !== null ? (d = URL.createObjectURL(l), u(d)) : u(null), () => {
|
|
@@ -7755,7 +7755,7 @@ const _c = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: a, render
|
|
|
7755
7755
|
qrStyle: "dots"
|
|
7756
7756
|
}
|
|
7757
7757
|
}, Nx = wx, jx = ({ value: e, qrRef: t, variant: n = "blackRedEyes" }) => /* @__PURE__ */ i.jsx(kd, { ref: t, value: e, eyeColor: ns["eon-red"], fgColor: ns["eon-turquoise"], logoHeight: 32, logoWidth: 32, removeQrCodeBehindLogo: !0, logoPadding: 5, logoPaddingStyle: "circle", ecLevel: "Q", ...Nx[n] }), Dx = ({ value: e, contactType: t, className: n }) => {
|
|
7758
|
-
const { ProjectIconComponent: r } = V(X), [a, o] =
|
|
7758
|
+
const { ProjectIconComponent: r } = V(X), [a, o] = B(!1), s = A(() => {
|
|
7759
7759
|
o(!0);
|
|
7760
7760
|
}, []), l = A(() => {
|
|
7761
7761
|
o(!1);
|
|
@@ -7824,19 +7824,19 @@ const _c = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: a, render
|
|
|
7824
7824
|
] })
|
|
7825
7825
|
] })
|
|
7826
7826
|
] });
|
|
7827
|
-
}, tj = ({ value: e, label: t, InputContainer: n = bn, className: r, withoutLabel: a, hidden: o, disabled: s, contactType: l, ...c }) => o ? null : /* @__PURE__ */ i.jsx(Oc, { contactType: l, value: e, withoutLabel: a, label: t, className: r, children: /* @__PURE__ */ i.jsx(dt, { type: "text", value: e, disabled: s, InputContainer: n, size: "sm", withoutLabel: !0, ...c }) }), nj = ({ InputContainer: e = bn, items: t, selectedItemNavigateTo: n, onSearchQueryChange: r, texts: a, isLoading: o, value: s, onSelect: l, label: c, withoutLabel: u, size: d, dropdownItemsNameWidth: p, additionalColumns: f, hidden: m, disabled: g, displayIdAsName: b, CustomOnChangeComponent:
|
|
7828
|
-
const [T,
|
|
7827
|
+
}, tj = ({ value: e, label: t, InputContainer: n = bn, className: r, withoutLabel: a, hidden: o, disabled: s, contactType: l, ...c }) => o ? null : /* @__PURE__ */ i.jsx(Oc, { contactType: l, value: e, withoutLabel: a, label: t, className: r, children: /* @__PURE__ */ i.jsx(dt, { type: "text", value: e, disabled: s, InputContainer: n, size: "sm", withoutLabel: !0, ...c }) }), nj = ({ InputContainer: e = bn, items: t, selectedItemNavigateTo: n, onSearchQueryChange: r, texts: a, isLoading: o, value: s, onSelect: l, label: c, withoutLabel: u, size: d, dropdownItemsNameWidth: p, additionalColumns: f, hidden: m, disabled: g, displayIdAsName: b, CustomOnChangeComponent: h, className: v, archiveColumn: x, icon: N, hint: y, addNewOptionPath: w, refreshOptions: S, MiniDetailComponent: C, miniDetailPlacement: _, suggestedItems: E, suggestedItemsTitle: O }) => {
|
|
7828
|
+
const [T, k] = B(!1), j = A((U) => {
|
|
7829
7829
|
l && l(U);
|
|
7830
7830
|
}, [l]), P = A((U) => {
|
|
7831
|
-
|
|
7832
|
-
}, [j]), W = Z(null),
|
|
7831
|
+
k(!1), j(U);
|
|
7832
|
+
}, [j]), W = Z(null), M = n !== void 0, $ = M && s !== null, Y = R(() => {
|
|
7833
7833
|
var U, q;
|
|
7834
7834
|
return b ? ((U = s == null ? void 0 : s.id) == null ? void 0 : U.toString()) ?? "" : s != null && s.name && s.name.length > 0 ? s.name : ((q = s == null ? void 0 : s.id) == null ? void 0 : q.toString()) ?? "";
|
|
7835
7835
|
}, [s, b]);
|
|
7836
|
-
return /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsxs(e, { withoutLabel: u, label: c ?? "", hidden: m, inputContainerClassName: I({ "luminus-dropdown-select-open": T }), className:
|
|
7836
|
+
return /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsxs(e, { withoutLabel: u, label: c ?? "", hidden: m, inputContainerClassName: I({ "luminus-dropdown-select-open": T }), className: v, hint: y, disabled: g, children: [
|
|
7837
7837
|
/* @__PURE__ */ i.jsxs(qa, { currentSelection: s, selectedItemNavigateTo: n, children: [
|
|
7838
7838
|
b && (s == null ? void 0 : s.name) && /* @__PURE__ */ i.jsx(F, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: s.name }),
|
|
7839
|
-
/* @__PURE__ */ i.jsx(Ya, { value: (s == null ? void 0 : s.id) ?? null, MiniDetailComponent:
|
|
7839
|
+
/* @__PURE__ */ i.jsx(Ya, { value: (s == null ? void 0 : s.id) ?? null, MiniDetailComponent: C, miniDetailPlacement: _, children: /* @__PURE__ */ i.jsxs(
|
|
7840
7840
|
Se.Select,
|
|
7841
7841
|
{
|
|
7842
7842
|
ref: W,
|
|
@@ -7846,7 +7846,7 @@ const _c = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: a, render
|
|
|
7846
7846
|
U.currentTarget.focus(), U.preventDefault();
|
|
7847
7847
|
},
|
|
7848
7848
|
onClick: () => {
|
|
7849
|
-
!
|
|
7849
|
+
!M && !g && k(!0);
|
|
7850
7850
|
},
|
|
7851
7851
|
onChange: () => {
|
|
7852
7852
|
},
|
|
@@ -7861,70 +7861,70 @@ const _c = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: a, render
|
|
|
7861
7861
|
]
|
|
7862
7862
|
}
|
|
7863
7863
|
) }),
|
|
7864
|
-
|
|
7865
|
-
!
|
|
7866
|
-
U.preventDefault(), U.stopPropagation(),
|
|
7864
|
+
h || !g && M ? /* @__PURE__ */ i.jsxs("div", { className: "custom-picker-button", children: [
|
|
7865
|
+
!h && !g && M && /* @__PURE__ */ i.jsx(te, { size: "sm", color: "secondary", onClick: (U) => {
|
|
7866
|
+
U.preventDefault(), U.stopPropagation(), k(!0);
|
|
7867
7867
|
}, children: N ?? /* @__PURE__ */ i.jsx(Fs, {}) }),
|
|
7868
|
-
|
|
7868
|
+
h ?? null
|
|
7869
7869
|
] }) : null
|
|
7870
7870
|
] }),
|
|
7871
|
-
W.current && /* @__PURE__ */ i.jsx(Ka, { show: T, onCancel: () =>
|
|
7871
|
+
W.current && /* @__PURE__ */ i.jsx(Ka, { show: T, onCancel: () => k(!1), items: t, currentSelection: s, onSelectionChange: P, onSearchQueryChange: r, texts: a, itemsNameWidth: p, additionalColumns: f, isLoading: o, disabled: g, inputRef: W, archiveColumn: x, displayIdAsName: b, addNewOptionPath: w, refreshOptions: S, suggestedItems: E, suggestedItemsTitle: O })
|
|
7872
7872
|
] }) });
|
|
7873
7873
|
}, rj = ({ InputContainer: e = bn, value: t, onChange: n, label: r, size: a, showClearIcon: o, clearValue: s, hidden: l, disabled: c, rows: u, withoutLabel: d, debounceMs: p, minLength: f, maxLength: m, className: g, hint: b }) => {
|
|
7874
|
-
const
|
|
7874
|
+
const h = A(() => {
|
|
7875
7875
|
if (!n)
|
|
7876
7876
|
return;
|
|
7877
|
-
const
|
|
7878
|
-
n((
|
|
7879
|
-
}, [s, n]),
|
|
7880
|
-
const
|
|
7881
|
-
n && n(
|
|
7882
|
-
}, [n]), w = A((
|
|
7877
|
+
const S = s ?? null;
|
|
7878
|
+
n((S == null ? void 0 : S.toString()) ?? "");
|
|
7879
|
+
}, [s, n]), v = Z(null), [x, N] = B((t == null ? void 0 : t.toString()) ?? ""), y = A((S) => {
|
|
7880
|
+
const C = S;
|
|
7881
|
+
n && n(C || null);
|
|
7882
|
+
}, [n]), w = A((S) => {
|
|
7883
7883
|
var _;
|
|
7884
|
-
const
|
|
7884
|
+
const C = (_ = S.target) == null ? void 0 : _.value;
|
|
7885
7885
|
if (!p) {
|
|
7886
|
-
y(
|
|
7886
|
+
y(C);
|
|
7887
7887
|
return;
|
|
7888
7888
|
}
|
|
7889
|
-
N(
|
|
7890
|
-
y(
|
|
7889
|
+
N(C), v.current !== null && window.clearTimeout(v.current), v.current = window.setTimeout(() => {
|
|
7890
|
+
y(C);
|
|
7891
7891
|
}, p);
|
|
7892
7892
|
}, [p, y]);
|
|
7893
7893
|
return z(() => {
|
|
7894
7894
|
N(t === null ? "" : t.toString());
|
|
7895
7895
|
}, [t]), /* @__PURE__ */ i.jsxs(e, { label: r ?? "", hidden: l, withoutLabel: d, className: g, isForTextAreaInput: !0, hint: b, disabled: c, children: [
|
|
7896
7896
|
/* @__PURE__ */ i.jsx(Se.Control, { as: "textarea", size: a, value: p ? x : t ?? "", onChange: w, hidden: l, disabled: c, rows: u ?? 2, className: "w-100", minLength: f, maxLength: m }),
|
|
7897
|
-
o && t && n && !c && /* @__PURE__ */ i.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ i.jsx(te, { color: "secondary", size: "sm", onClick:
|
|
7897
|
+
o && t && n && !c && /* @__PURE__ */ i.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ i.jsx(te, { color: "secondary", size: "sm", onClick: h, children: /* @__PURE__ */ i.jsx(kt, {}) }) })
|
|
7898
7898
|
] });
|
|
7899
|
-
}, aj = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, label: a, withoutLabel: o, placeholder: s, size: l, hidden: c, disabled: u, showClearIcon: d, clearValue: p, className: f, step: m, stepperStep: g = 1, min: b, max:
|
|
7899
|
+
}, aj = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, label: a, withoutLabel: o, placeholder: s, size: l, hidden: c, disabled: u, showClearIcon: d, clearValue: p, className: f, step: m, stepperStep: g = 1, min: b, max: h, hint: v }) => {
|
|
7900
7900
|
const x = A(() => {
|
|
7901
7901
|
if (!n)
|
|
7902
7902
|
return;
|
|
7903
7903
|
const _ = p ?? null;
|
|
7904
7904
|
n(_ ? Number(_) : null);
|
|
7905
|
-
}, [p, n]), N = Z(null), [y, w] =
|
|
7906
|
-
const
|
|
7907
|
-
n && n(
|
|
7908
|
-
}, [
|
|
7905
|
+
}, [p, n]), N = Z(null), [y, w] = B((t == null ? void 0 : t.toString()) ?? ""), S = A((_) => {
|
|
7906
|
+
const E = _;
|
|
7907
|
+
n && n(E == null || E === "" ? null : Rn(Number(E), b, h));
|
|
7908
|
+
}, [h, b, n]), C = A((_) => {
|
|
7909
7909
|
var O;
|
|
7910
|
-
const
|
|
7910
|
+
const E = (O = _.target) == null ? void 0 : O.value;
|
|
7911
7911
|
if (!r) {
|
|
7912
|
-
|
|
7912
|
+
S(E);
|
|
7913
7913
|
return;
|
|
7914
7914
|
}
|
|
7915
|
-
w(Rn(Number(
|
|
7916
|
-
|
|
7915
|
+
w(Rn(Number(E), b, h).toString()), N.current !== null && window.clearTimeout(N.current), N.current = window.setTimeout(() => {
|
|
7916
|
+
S(E);
|
|
7917
7917
|
}, r);
|
|
7918
|
-
}, [r,
|
|
7918
|
+
}, [r, S, h, b]);
|
|
7919
7919
|
return z(() => {
|
|
7920
|
-
w(t === null ? "" : Rn(t, b,
|
|
7921
|
-
}, [
|
|
7922
|
-
/* @__PURE__ */ i.jsx(Se.Control, { type: "number", placeholder: s ?? a, size: l, value: r ? y : t ?? "", onChange:
|
|
7920
|
+
w(t === null ? "" : Rn(t, b, h).toString());
|
|
7921
|
+
}, [h, b, t]), /* @__PURE__ */ i.jsx(e, { withoutLabel: o, label: a ?? "", hidden: c, hint: v, className: f, disabled: u, children: /* @__PURE__ */ i.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
7922
|
+
/* @__PURE__ */ i.jsx(Se.Control, { type: "number", placeholder: s ?? a, size: l, value: r ? y : t ?? "", onChange: C, className: `luminus-numeric-stepper ${f ?? ""}`, hidden: c, disabled: u ?? !1, step: m }),
|
|
7923
7923
|
/* @__PURE__ */ i.jsx("div", { className: "stepper-icon left", children: !u && /* @__PURE__ */ i.jsx(te, { size: "sm", onClick: (_) => {
|
|
7924
|
-
_.preventDefault(), _.stopPropagation(),
|
|
7924
|
+
_.preventDefault(), _.stopPropagation(), S(((t ?? 0) - g).toString());
|
|
7925
7925
|
}, children: /* @__PURE__ */ i.jsx(Vs, {}) }) }),
|
|
7926
7926
|
/* @__PURE__ */ i.jsx("div", { className: "stepper-icon right", children: !u && /* @__PURE__ */ i.jsx(te, { size: "sm", onClick: (_) => {
|
|
7927
|
-
_.preventDefault(), _.stopPropagation(),
|
|
7927
|
+
_.preventDefault(), _.stopPropagation(), S(((t ?? 0) + g).toString());
|
|
7928
7928
|
}, children: /* @__PURE__ */ i.jsx($s, {}) }) }),
|
|
7929
7929
|
d && t && n && !u && /* @__PURE__ */ i.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ i.jsx(te, { color: "secondary", size: "sm", onClick: x, children: /* @__PURE__ */ i.jsx(kt, {}) }) })
|
|
7930
7930
|
] }) });
|
|
@@ -8034,8 +8034,8 @@ function as(e, t, n) {
|
|
|
8034
8034
|
if (["", "-"].indexOf(e) !== -1)
|
|
8035
8035
|
return e;
|
|
8036
8036
|
var r = (e.indexOf(".") !== -1 || n) && t, a = Ti(e), o = a.beforeDecimal, s = a.afterDecimal, l = a.hasNegation, c = parseFloat("0." + (s || "0")), u = s.length <= t ? "0." + s : c.toFixed(t), d = u.split("."), p = o;
|
|
8037
|
-
o && Number(d[0]) && (p = o.split("").reverse().reduce(function(b,
|
|
8038
|
-
return b.length >
|
|
8037
|
+
o && Number(d[0]) && (p = o.split("").reverse().reduce(function(b, h, v) {
|
|
8038
|
+
return b.length > v ? (Number(b[0]) + Number(h)).toString() + b.substring(1, b.length) : h + b;
|
|
8039
8039
|
}, d[0]));
|
|
8040
8040
|
var f = Rc(d[1] || "", t, n), m = l ? "-" : "", g = r ? "." : "";
|
|
8041
8041
|
return "" + m + p + g + f;
|
|
@@ -8100,25 +8100,25 @@ function Gx(e, t, n, r, a, o, s) {
|
|
|
8100
8100
|
for (var u = n.length, d = e.length, p = {}, f = new Array(u), m = 0; m < u; m++) {
|
|
8101
8101
|
f[m] = -1;
|
|
8102
8102
|
for (var g = 0, b = d; g < b; g++) {
|
|
8103
|
-
var
|
|
8103
|
+
var h = s({
|
|
8104
8104
|
currentValue: n,
|
|
8105
8105
|
lastValue: t,
|
|
8106
8106
|
formattedValue: e,
|
|
8107
8107
|
currentValueIndex: m,
|
|
8108
8108
|
formattedValueIndex: g
|
|
8109
8109
|
});
|
|
8110
|
-
if (
|
|
8110
|
+
if (h && p[g] !== !0) {
|
|
8111
8111
|
f[m] = g, p[g] = !0;
|
|
8112
8112
|
break;
|
|
8113
8113
|
}
|
|
8114
8114
|
}
|
|
8115
8115
|
}
|
|
8116
|
-
for (var
|
|
8117
|
-
|
|
8118
|
-
var x =
|
|
8119
|
-
for (
|
|
8120
|
-
|
|
8121
|
-
var N =
|
|
8116
|
+
for (var v = r; v < u && (f[v] === -1 || !o(n[v])); )
|
|
8117
|
+
v++;
|
|
8118
|
+
var x = v === u || f[v] === -1 ? d : f[v];
|
|
8119
|
+
for (v = r - 1; v > 0 && f[v] === -1; )
|
|
8120
|
+
v--;
|
|
8121
|
+
var N = v === -1 || f[v] === -1 ? 0 : f[v] + 1;
|
|
8122
8122
|
return N > x ? x : r - N < x - r ? N : x;
|
|
8123
8123
|
}
|
|
8124
8124
|
function is(e, t, n, r) {
|
|
@@ -8144,9 +8144,9 @@ function Ux(e) {
|
|
|
8144
8144
|
function Lc(e, t, n, r, a, o) {
|
|
8145
8145
|
o === void 0 && (o = Et);
|
|
8146
8146
|
var s = kx(function(g, b) {
|
|
8147
|
-
var
|
|
8148
|
-
return Ac(g) ? (
|
|
8149
|
-
}), l =
|
|
8147
|
+
var h, v;
|
|
8148
|
+
return Ac(g) ? (v = "", h = "") : typeof g == "number" || b ? (v = typeof g == "number" ? kc(g) : g, h = r(v)) : (v = a(g, void 0), h = r(v)), { formattedValue: h, numAsString: v };
|
|
8149
|
+
}), l = B(function() {
|
|
8150
8150
|
return s(dn(e) ? t : e, n);
|
|
8151
8151
|
}), c = l[0], u = l[1], d = function(g, b) {
|
|
8152
8152
|
g.formattedValue !== c.formattedValue && u({
|
|
@@ -8183,20 +8183,20 @@ function zx(e) {
|
|
|
8183
8183
|
g === void 0 && (g = Et);
|
|
8184
8184
|
var b = e.onFocus;
|
|
8185
8185
|
b === void 0 && (b = Et);
|
|
8186
|
-
var
|
|
8187
|
-
|
|
8188
|
-
var
|
|
8186
|
+
var h = e.onBlur;
|
|
8187
|
+
h === void 0 && (h = Et);
|
|
8188
|
+
var v = e.value, x = e.getCaretBoundary;
|
|
8189
8189
|
x === void 0 && (x = Ux);
|
|
8190
8190
|
var N = e.isValidInputCharacter;
|
|
8191
8191
|
N === void 0 && (N = Qn);
|
|
8192
|
-
var y = e.isCharacterSame, w = Pc(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]),
|
|
8193
|
-
|
|
8194
|
-
}, P =
|
|
8192
|
+
var y = e.isCharacterSame, w = Pc(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), S = Lc(v, c, !!u, s, l, d), C = S[0], _ = C.formattedValue, E = C.numAsString, O = S[1], T = Z(), k = Z({ formattedValue: _, numAsString: E }), j = function(K, G) {
|
|
8193
|
+
k.current = { formattedValue: K.formattedValue, numAsString: K.value }, O(K, G);
|
|
8194
|
+
}, P = B(!1), W = P[0], M = P[1], $ = Z(null), Y = Z({
|
|
8195
8195
|
setCaretTimeout: null,
|
|
8196
8196
|
focusTimeout: null
|
|
8197
8197
|
});
|
|
8198
8198
|
z(function() {
|
|
8199
|
-
return
|
|
8199
|
+
return M(!0), function() {
|
|
8200
8200
|
clearTimeout(Y.current.setCaretTimeout), clearTimeout(Y.current.focusTimeout);
|
|
8201
8201
|
};
|
|
8202
8202
|
}, []);
|
|
@@ -8227,17 +8227,17 @@ function zx(e) {
|
|
|
8227
8227
|
G !== _ && j(q(G, ve), { event: Ee, source: pe });
|
|
8228
8228
|
};
|
|
8229
8229
|
z(function() {
|
|
8230
|
-
var K =
|
|
8231
|
-
(_ !== G ||
|
|
8230
|
+
var K = k.current, G = K.formattedValue, ee = K.numAsString;
|
|
8231
|
+
(_ !== G || E !== ee) && j(q(_, E), {
|
|
8232
8232
|
event: void 0,
|
|
8233
8233
|
source: Xn.props
|
|
8234
8234
|
});
|
|
8235
|
-
}, [_,
|
|
8235
|
+
}, [_, E]);
|
|
8236
8236
|
var xe = $.current ? ha($.current) : void 0, H = typeof window < "u" ? Ja : z;
|
|
8237
8237
|
H(function() {
|
|
8238
8238
|
var K = $.current;
|
|
8239
|
-
if (_ !==
|
|
8240
|
-
var G = oe(
|
|
8239
|
+
if (_ !== k.current.formattedValue && K) {
|
|
8240
|
+
var G = oe(k.current.formattedValue, _, xe);
|
|
8241
8241
|
K.value = _, Q(K, G, _);
|
|
8242
8242
|
}
|
|
8243
8243
|
}, [_]);
|
|
@@ -8280,7 +8280,7 @@ function zx(e) {
|
|
|
8280
8280
|
it = ne(ve, ce, nn), it !== ce && K.preventDefault();
|
|
8281
8281
|
} else ee === "Delete" && !N(ve[ce]) ? it = ne(ve, ce, "right") : ee === "Backspace" && !N(ve[ce]) && (it = ne(ve, ce, "left"));
|
|
8282
8282
|
it !== ce && Q(G, it, ve), m(K), ge(G, Fe);
|
|
8283
|
-
},
|
|
8283
|
+
}, L = function(K) {
|
|
8284
8284
|
var G = K.target, ee = function() {
|
|
8285
8285
|
var pe = G.selectionStart, Ee = G.selectionEnd, ve = G.value;
|
|
8286
8286
|
if (ve === void 0 && (ve = ""), pe === Ee) {
|
|
@@ -8301,13 +8301,13 @@ function zx(e) {
|
|
|
8301
8301
|
ce !== pe && !(pe === 0 && Ee === ve.length) && Q(G, ce, ve), b(Object.assign(Object.assign({}, K), { currentTarget: ee }));
|
|
8302
8302
|
}, 0);
|
|
8303
8303
|
}, _e = function(K) {
|
|
8304
|
-
$.current = null, clearTimeout(Y.current.focusTimeout), clearTimeout(Y.current.setCaretTimeout),
|
|
8304
|
+
$.current = null, clearTimeout(Y.current.focusTimeout), clearTimeout(Y.current.setCaretTimeout), h(K);
|
|
8305
8305
|
}, We = W && Fx() ? "numeric" : void 0, Ze = Object.assign({ inputMode: We }, w, {
|
|
8306
8306
|
type: t,
|
|
8307
8307
|
value: _,
|
|
8308
8308
|
onChange: Ce,
|
|
8309
8309
|
onKeyDown: fe,
|
|
8310
|
-
onMouseUp:
|
|
8310
|
+
onMouseUp: L,
|
|
8311
8311
|
onFocus: ue,
|
|
8312
8312
|
onBlur: _e
|
|
8313
8313
|
});
|
|
@@ -8362,28 +8362,28 @@ function Xx(e, t, n) {
|
|
|
8362
8362
|
if (Qn(e) && (e === o || e === s) && t.lastValue === "")
|
|
8363
8363
|
return e;
|
|
8364
8364
|
if (p - d === 1 && m.indexOf(e[d]) !== -1) {
|
|
8365
|
-
var
|
|
8366
|
-
e = e.substring(0, d) +
|
|
8365
|
+
var h = l === 0 ? "" : g;
|
|
8366
|
+
e = e.substring(0, d) + h + e.substring(d + 1, e.length);
|
|
8367
8367
|
}
|
|
8368
|
-
var
|
|
8368
|
+
var v = function($, Y, U) {
|
|
8369
8369
|
var q = !1, Q = !1;
|
|
8370
8370
|
o.startsWith("-") ? q = !1 : $.startsWith("--") ? (q = !1, Q = !0) : s.startsWith("-") && $.length === s.length ? q = !1 : $[0] === "-" && (q = !0);
|
|
8371
8371
|
var ne = q ? 1 : 0;
|
|
8372
8372
|
return Q && (ne = 2), ne && ($ = $.substring(ne), Y -= ne, U -= ne), { value: $, start: Y, end: U, hasNegation: q };
|
|
8373
|
-
}, x =
|
|
8373
|
+
}, x = v(e, d, p), N = x.hasNegation;
|
|
8374
8374
|
r = x, e = r.value, d = r.start, p = r.end;
|
|
8375
|
-
var y =
|
|
8376
|
-
e.length &&
|
|
8377
|
-
var
|
|
8378
|
-
e.startsWith(o) ?
|
|
8375
|
+
var y = v(t.lastValue, c.start, c.end), w = y.start, S = y.end, C = y.value, _ = e.substring(d, p);
|
|
8376
|
+
e.length && C.length && (w > C.length - s.length || S < o.length) && !(_ && s.startsWith(_)) && (e = C);
|
|
8377
|
+
var E = 0;
|
|
8378
|
+
e.startsWith(o) ? E += o.length : d < o.length && (E = d), e = e.substring(E), p -= E;
|
|
8379
8379
|
var O = e.length, T = e.length - s.length;
|
|
8380
8380
|
e.endsWith(s) ? O = T : (p > T || p > e.length - s.length) && (O = p), e = e.substring(0, O), e = qx(N ? "-" + e : e, a), e = (e.match(Yx(g)) || []).join("");
|
|
8381
|
-
var
|
|
8381
|
+
var k = e.indexOf(g);
|
|
8382
8382
|
e = e.replace(new RegExp(Tc(g), "g"), function($, Y) {
|
|
8383
|
-
return Y ===
|
|
8383
|
+
return Y === k ? "." : "";
|
|
8384
8384
|
});
|
|
8385
|
-
var j = Ti(e, a), P = j.beforeDecimal, W = j.afterDecimal,
|
|
8386
|
-
return u.end - u.start < c.end - c.start && P === "" && b && !parseFloat(W) && (e =
|
|
8385
|
+
var j = Ti(e, a), P = j.beforeDecimal, W = j.afterDecimal, M = j.addNegation;
|
|
8386
|
+
return u.end - u.start < c.end - c.start && P === "" && b && !parseFloat(W) && (e = M ? "-" : ""), e;
|
|
8387
8387
|
}
|
|
8388
8388
|
function Qx(e, t) {
|
|
8389
8389
|
var n = t.prefix;
|
|
@@ -8421,48 +8421,48 @@ function Zx(e) {
|
|
|
8421
8421
|
o === void 0 && (o = Et);
|
|
8422
8422
|
var s = e.thousandSeparator, l = e.decimalScale, c = e.fixedDecimalScale, u = e.prefix;
|
|
8423
8423
|
u === void 0 && (u = "");
|
|
8424
|
-
var d = e.defaultValue, p = e.value, f = e.valueIsNumericString, m = e.onValueChange, g = Pc(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), b = zr(e),
|
|
8425
|
-
return os(
|
|
8426
|
-
}, N = function(
|
|
8427
|
-
return Xx(
|
|
8424
|
+
var d = e.defaultValue, p = e.value, f = e.valueIsNumericString, m = e.onValueChange, g = Pc(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), b = zr(e), h = b.decimalSeparator, v = b.allowedDecimalSeparators, x = function(M) {
|
|
8425
|
+
return os(M, e);
|
|
8426
|
+
}, N = function(M, $) {
|
|
8427
|
+
return Xx(M, $, e);
|
|
8428
8428
|
}, y = dn(p) ? d : p, w = f ?? Kx(y, u, t);
|
|
8429
8429
|
dn(p) ? dn(d) || (w = w || typeof d == "number") : w = w || typeof p == "number";
|
|
8430
|
-
var
|
|
8431
|
-
return Ac(
|
|
8432
|
-
},
|
|
8433
|
-
var $ =
|
|
8430
|
+
var S = function(M) {
|
|
8431
|
+
return Ac(M) ? M : (typeof M == "number" && (M = kc(M)), w && typeof l == "number" ? as(M, l, !!c) : M);
|
|
8432
|
+
}, C = Lc(S(p), S(d), !!w, x, N, m), _ = C[0], E = _.numAsString, O = _.formattedValue, T = C[1], k = function(M) {
|
|
8433
|
+
var $ = M.target, Y = M.key, U = $.selectionStart, q = $.selectionEnd, Q = $.value;
|
|
8434
8434
|
if (Q === void 0 && (Q = ""), (Y === "Backspace" || Y === "Delete") && q < u.length) {
|
|
8435
|
-
|
|
8435
|
+
M.preventDefault();
|
|
8436
8436
|
return;
|
|
8437
8437
|
}
|
|
8438
8438
|
if (U !== q) {
|
|
8439
|
-
a(
|
|
8439
|
+
a(M);
|
|
8440
8440
|
return;
|
|
8441
8441
|
}
|
|
8442
|
-
Y === "Backspace" && Q[0] === "-" && U === u.length + 1 && n && Yt($, 1), l && c && (Y === "Backspace" && Q[U - 1] ===
|
|
8442
|
+
Y === "Backspace" && Q[0] === "-" && U === u.length + 1 && n && Yt($, 1), l && c && (Y === "Backspace" && Q[U - 1] === h ? (Yt($, U - 1), M.preventDefault()) : Y === "Delete" && Q[U] === h && M.preventDefault()), v != null && v.includes(Y) && Q[U] === h && Yt($, U + 1);
|
|
8443
8443
|
var ne = s === !0 ? "," : s;
|
|
8444
|
-
Y === "Backspace" && Q[U - 1] === ne && Yt($, U - 1), Y === "Delete" && Q[U] === ne && Yt($, U + 1), a(
|
|
8445
|
-
}, j = function(
|
|
8446
|
-
var $ =
|
|
8447
|
-
if ($.match(/\d/g) || ($ = ""), r || ($ = Bx($)), c && l && ($ = as($, l, c)), $ !==
|
|
8444
|
+
Y === "Backspace" && Q[U - 1] === ne && Yt($, U - 1), Y === "Delete" && Q[U] === ne && Yt($, U + 1), a(M);
|
|
8445
|
+
}, j = function(M) {
|
|
8446
|
+
var $ = E;
|
|
8447
|
+
if ($.match(/\d/g) || ($ = ""), r || ($ = Bx($)), c && l && ($ = as($, l, c)), $ !== E) {
|
|
8448
8448
|
var Y = os($, e);
|
|
8449
8449
|
T({
|
|
8450
8450
|
formattedValue: Y,
|
|
8451
8451
|
value: $,
|
|
8452
8452
|
floatValue: parseFloat($)
|
|
8453
8453
|
}, {
|
|
8454
|
-
event:
|
|
8454
|
+
event: M,
|
|
8455
8455
|
source: Xn.event
|
|
8456
8456
|
});
|
|
8457
8457
|
}
|
|
8458
|
-
o(
|
|
8459
|
-
}, P = function(
|
|
8460
|
-
return
|
|
8461
|
-
}, W = function(
|
|
8462
|
-
var $ =
|
|
8458
|
+
o(M);
|
|
8459
|
+
}, P = function(M) {
|
|
8460
|
+
return M === h ? !0 : Qn(M);
|
|
8461
|
+
}, W = function(M) {
|
|
8462
|
+
var $ = M.currentValue, Y = M.lastValue, U = M.formattedValue, q = M.currentValueIndex, Q = M.formattedValueIndex, ne = $[q], oe = U[Q], se = Bc(Y, $), xe = se.to, H = function(ae) {
|
|
8463
8463
|
return N(ae).indexOf(".") + u.length;
|
|
8464
8464
|
};
|
|
8465
|
-
return p === 0 && c && l && $[xe.start] ===
|
|
8465
|
+
return p === 0 && c && l && $[xe.start] === h && H($) < q && H(U) > Q ? !1 : q >= xe.start && q < xe.end && v && v.includes(ne) && oe === h ? !0 : ne === oe;
|
|
8466
8466
|
};
|
|
8467
8467
|
return Object.assign(Object.assign({}, g), {
|
|
8468
8468
|
value: O,
|
|
@@ -8472,10 +8472,10 @@ function Zx(e) {
|
|
|
8472
8472
|
onValueChange: T,
|
|
8473
8473
|
format: x,
|
|
8474
8474
|
removeFormatting: N,
|
|
8475
|
-
getCaretBoundary: function(
|
|
8476
|
-
return Qx(
|
|
8475
|
+
getCaretBoundary: function(M) {
|
|
8476
|
+
return Qx(M, e);
|
|
8477
8477
|
},
|
|
8478
|
-
onKeyDown:
|
|
8478
|
+
onKeyDown: k,
|
|
8479
8479
|
onBlur: j
|
|
8480
8480
|
});
|
|
8481
8481
|
}
|
|
@@ -8483,39 +8483,39 @@ function Ri(e) {
|
|
|
8483
8483
|
var t = Zx(e);
|
|
8484
8484
|
return le.createElement(zx, Object.assign({}, t));
|
|
8485
8485
|
}
|
|
8486
|
-
const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, label: a, withoutLabel: o, placeholder: s, size: l, hidden: c, disabled: u, showClearIcon: d, clearValue: p, className: f, step: m, noSelectOnFocus: g, decimalScale: b, fixedDecimalScale:
|
|
8487
|
-
const
|
|
8486
|
+
const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, label: a, withoutLabel: o, placeholder: s, size: l, hidden: c, disabled: u, showClearIcon: d, clearValue: p, className: f, step: m, noSelectOnFocus: g, decimalScale: b, fixedDecimalScale: h = !1, numberPrefix: v, numberSuffix: x, min: N, max: y, hint: w }) => {
|
|
8487
|
+
const S = A(() => {
|
|
8488
8488
|
if (!n)
|
|
8489
8489
|
return;
|
|
8490
|
-
const
|
|
8491
|
-
n(
|
|
8492
|
-
}, [p, n]),
|
|
8493
|
-
const j =
|
|
8490
|
+
const k = p ?? null;
|
|
8491
|
+
n(k ? Number(k) : null);
|
|
8492
|
+
}, [p, n]), C = Z(null), [_, E] = B((t == null ? void 0 : t.toString()) ?? ""), O = A((k) => {
|
|
8493
|
+
const j = k;
|
|
8494
8494
|
n && n(j == null || j === "" ? null : Number(j));
|
|
8495
|
-
}, [n]), T = A((
|
|
8495
|
+
}, [n]), T = A((k) => {
|
|
8496
8496
|
var P, W;
|
|
8497
|
-
let j = parseFloat(((W = (P =
|
|
8497
|
+
let j = parseFloat(((W = (P = k.target) == null ? void 0 : P.value) == null ? void 0 : W.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
|
|
8498
8498
|
if (Number.isNaN(j) && (j = 0), !r) {
|
|
8499
8499
|
O(j.toString());
|
|
8500
8500
|
return;
|
|
8501
8501
|
}
|
|
8502
|
-
|
|
8502
|
+
E(j.toString()), C.current !== null && window.clearTimeout(C.current), C.current = window.setTimeout(() => {
|
|
8503
8503
|
O(j.toString());
|
|
8504
8504
|
}, r);
|
|
8505
8505
|
}, [r, O]);
|
|
8506
8506
|
return z(() => {
|
|
8507
|
-
|
|
8507
|
+
E(t === null ? "" : t.toString());
|
|
8508
8508
|
}, [y, N, t]), z(() => {
|
|
8509
|
-
y !== void 0 && Number(_) > y &&
|
|
8510
|
-
}, [_, y, N,
|
|
8509
|
+
y !== void 0 && Number(_) > y && E(y.toString()), N !== void 0 && Number(_) < N && E(N.toString());
|
|
8510
|
+
}, [_, y, N, E]), z(() => {
|
|
8511
8511
|
!n || t === null || (y !== void 0 && t > y && n(y), N !== void 0 && t < N && n(N));
|
|
8512
8512
|
}, [t, y, N, n]), /* @__PURE__ */ i.jsxs(e, { withoutLabel: o, label: a ?? "", hidden: c, className: f, hint: w, disabled: u, children: [
|
|
8513
|
-
/* @__PURE__ */ i.jsx(Ri, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: b, fixedDecimalScale:
|
|
8514
|
-
!g &&
|
|
8513
|
+
/* @__PURE__ */ i.jsx(Ri, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: b, fixedDecimalScale: h, prefix: v, suffix: x, defaultValue: "", value: r ? _ : (t == null ? void 0 : t.toString()) ?? "", placeholder: s ?? a, onFocus: (k) => {
|
|
8514
|
+
!g && k.target.select();
|
|
8515
8515
|
}, onChange: T, hidden: c, disabled: u, className: I("form-control text-end w-100", {
|
|
8516
8516
|
[`form-control-${l}`]: l
|
|
8517
8517
|
}), step: m, min: N, max: y }),
|
|
8518
|
-
d && t !== null && n && !u && /* @__PURE__ */ i.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ i.jsx(te, { color: "secondary", size: "sm", onClick:
|
|
8518
|
+
d && t !== null && n && !u && /* @__PURE__ */ i.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ i.jsx(te, { color: "secondary", size: "sm", onClick: S, children: /* @__PURE__ */ i.jsx(kt, {}) }) })
|
|
8519
8519
|
] });
|
|
8520
8520
|
}, ty = ({ InputContainer: e = Pe, label: t, options: n, disabled: r, hidden: a, className: o, value: s, onChange: l }) => {
|
|
8521
8521
|
const c = A((u) => {
|
|
@@ -8611,7 +8611,7 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
8611
8611
|
}, [n, t]);
|
|
8612
8612
|
return { setFromToProp: r, handleArrowClick: a, handleRangeChange: o };
|
|
8613
8613
|
}, ij = ({ fromtoState: [e, t], className: n, size: r }) => {
|
|
8614
|
-
const { texts: { date: a }, ProjectIconComponent: o } = V(X), [s, l] =
|
|
8614
|
+
const { texts: { date: a }, ProjectIconComponent: o } = V(X), [s, l] = B("C"), { handleArrowClick: c, handleRangeChange: u, setFromToProp: d } = sy(s, l, t), p = R(() => s === "C", [s]), f = Z(!0);
|
|
8615
8615
|
return z(() => {
|
|
8616
8616
|
if (f.current) {
|
|
8617
8617
|
const m = oy(e.from, e.to);
|
|
@@ -8668,67 +8668,70 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
8668
8668
|
padding: 10
|
|
8669
8669
|
}
|
|
8670
8670
|
] : [], onClick: (o) => r && r(o.data) });
|
|
8671
|
-
}, ly = ({ val: e, translateKey: t, data: n }) => {
|
|
8672
|
-
var
|
|
8673
|
-
const
|
|
8674
|
-
const
|
|
8675
|
-
return { transform: `translate(${
|
|
8671
|
+
}, ly = ({ val: e, translateKey: t, data: n, unit: r }) => {
|
|
8672
|
+
var c, u;
|
|
8673
|
+
const a = e.point.id.split("."), o = a[0], s = Number(a[1]), l = R(() => {
|
|
8674
|
+
const d = e.point.x < 100 ? "56%" : "-56%", p = e.point.y < 60 ? "70px" : "8px";
|
|
8675
|
+
return { transform: `translate(${d}, ${p})` };
|
|
8676
8676
|
}, [e.point.x, e.point.y]);
|
|
8677
|
-
return /* @__PURE__ */ i.jsxs("div", { className: "bg-white shadow-sm px-2 py-1 rounded", style:
|
|
8677
|
+
return /* @__PURE__ */ i.jsxs("div", { className: "bg-white shadow-sm px-2 py-1 rounded", style: l, children: [
|
|
8678
8678
|
/* @__PURE__ */ i.jsx(F, { variant: "body", children: t(e.point.serieId) }),
|
|
8679
8679
|
/* @__PURE__ */ i.jsxs("div", { className: "d-flex", children: [
|
|
8680
8680
|
/* @__PURE__ */ i.jsxs(F, { variant: "body", className: "pe-1", children: [
|
|
8681
|
-
(
|
|
8681
|
+
(c = e.point.data.x) == null ? void 0 : c.toString(),
|
|
8682
8682
|
":"
|
|
8683
8683
|
] }),
|
|
8684
|
-
/* @__PURE__ */ i.
|
|
8684
|
+
/* @__PURE__ */ i.jsxs(F, { variant: "body", className: "fw-bold", children: [
|
|
8685
|
+
(u = n == null ? void 0 : n[s]) == null ? void 0 : u[o],
|
|
8686
|
+
r && /* @__PURE__ */ i.jsx("span", { className: "ms-1", children: r })
|
|
8687
|
+
] })
|
|
8685
8688
|
] })
|
|
8686
8689
|
] });
|
|
8687
|
-
}, cj = ({ data: e, xKey: t, yKeys: n, translateKey: r, usePercentageValue: a = !1, variant: o = "default", legendPosition: s, noSort: l = !1 }) => {
|
|
8688
|
-
const { confirm:
|
|
8689
|
-
var
|
|
8690
|
-
const
|
|
8691
|
-
if (
|
|
8692
|
-
const
|
|
8693
|
-
|
|
8694
|
-
const
|
|
8695
|
-
$d(new Blob([
|
|
8690
|
+
}, cj = ({ data: e, xKey: t, yKeys: n, translateKey: r, usePercentageValue: a = !1, variant: o = "default", legendPosition: s, noSort: l = !1, unit: c }) => {
|
|
8691
|
+
const { confirm: u } = wt(), { chartColorPalette: d, texts: { chart: p } } = V(X), [f, m] = B(/* @__PURE__ */ new Set()), g = Z(null), b = async () => {
|
|
8692
|
+
var T;
|
|
8693
|
+
const O = (T = g.current) == null ? void 0 : T.querySelector("svg");
|
|
8694
|
+
if (O && await u(p.confirmExport)) {
|
|
8695
|
+
const k = O.cloneNode(!0);
|
|
8696
|
+
k.setAttribute("fill", "none");
|
|
8697
|
+
const P = new XMLSerializer().serializeToString(k);
|
|
8698
|
+
$d(new Blob([P], {
|
|
8696
8699
|
type: "image/svg+xml"
|
|
8697
8700
|
}), "graf.svg");
|
|
8698
8701
|
}
|
|
8699
|
-
},
|
|
8700
|
-
|
|
8701
|
-
const
|
|
8702
|
-
return
|
|
8702
|
+
}, h = (O) => {
|
|
8703
|
+
m((T) => {
|
|
8704
|
+
const k = new Set(T);
|
|
8705
|
+
return k.has(O.id) ? k.delete(O.id) : k.add(O.id), k;
|
|
8703
8706
|
});
|
|
8704
|
-
}, v = R(() => l ? e : e.toSorted((
|
|
8705
|
-
var
|
|
8706
|
-
return typeof
|
|
8707
|
-
}), [e, l, t]),
|
|
8708
|
-
const
|
|
8709
|
-
return n.forEach((
|
|
8707
|
+
}, v = R(() => l ? e : e.toSorted((O, T) => {
|
|
8708
|
+
var k;
|
|
8709
|
+
return typeof T[t] == "number" && typeof O[t] == "number" ? O[t] - T[t] : (O[t] ?? "").toString().localeCompare(((k = T[t]) == null ? void 0 : k.toString()) ?? "");
|
|
8710
|
+
}), [e, l, t]), x = R(() => {
|
|
8711
|
+
const O = [];
|
|
8712
|
+
return n.forEach((T) => {
|
|
8710
8713
|
if (a) {
|
|
8711
|
-
const
|
|
8712
|
-
if (
|
|
8714
|
+
const k = Math.max(...v.map((P) => P[T] ?? -1 / 0));
|
|
8715
|
+
if (k === -1 / 0)
|
|
8713
8716
|
return;
|
|
8714
|
-
const
|
|
8715
|
-
v.forEach((
|
|
8716
|
-
|
|
8717
|
-
}),
|
|
8718
|
-
id:
|
|
8719
|
-
data:
|
|
8717
|
+
const j = [];
|
|
8718
|
+
v.forEach((P) => {
|
|
8719
|
+
P[T] != null && j.push({ x: P[t], y: k === 0 ? 0 : P[T] / k });
|
|
8720
|
+
}), O.push({
|
|
8721
|
+
id: T,
|
|
8722
|
+
data: j
|
|
8720
8723
|
});
|
|
8721
8724
|
} else
|
|
8722
|
-
|
|
8723
|
-
id:
|
|
8724
|
-
data: v.map((
|
|
8725
|
+
O.push({
|
|
8726
|
+
id: T,
|
|
8727
|
+
data: v.map((k) => ({ x: k[t], y: k[T] }))
|
|
8725
8728
|
});
|
|
8726
|
-
}),
|
|
8727
|
-
}, [v, a, t, n]),
|
|
8728
|
-
var
|
|
8729
|
-
return typeof ((
|
|
8730
|
-
}, [e, t]), C = s ?? (o === "sideContent" ? "bottom" : "right"),
|
|
8731
|
-
return /* @__PURE__ */ i.jsx("div", { ref:
|
|
8729
|
+
}), O;
|
|
8730
|
+
}, [v, a, t, n]), N = A((O) => /* @__PURE__ */ i.jsx(ly, { data: v, translateKey: r, val: O, unit: c }), [v, r, c]), y = R(() => Math.min(...e.map((O) => O[t] ?? 1 / 0)), [e, t]), w = R(() => Math.max(...e.map((O) => O[t] ?? -1 / 0)), [e, t]), S = R(() => {
|
|
8731
|
+
var O;
|
|
8732
|
+
return typeof ((O = e == null ? void 0 : e[0]) == null ? void 0 : O[t]);
|
|
8733
|
+
}, [e, t]), C = s ?? (o === "sideContent" ? "bottom" : "right"), _ = R(() => !a && o !== "sideContent", [a, o]), E = R(() => [y, w], [w, y]);
|
|
8734
|
+
return /* @__PURE__ */ i.jsx("div", { ref: g, className: "d-flex h-100 w-100", children: /* @__PURE__ */ i.jsx(Vd, { onClick: () => b(), data: x, xScale: S === "string" ? { type: "point" } : { type: "linear", min: y }, yScale: { type: "linear", nice: !0 }, axisLeft: _ ? {
|
|
8732
8735
|
tickSize: 5,
|
|
8733
8736
|
tickPadding: 5,
|
|
8734
8737
|
tickRotation: 0,
|
|
@@ -8738,16 +8741,16 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
8738
8741
|
truncateTickAt: 0
|
|
8739
8742
|
// format: val => `${val * 100} %`,
|
|
8740
8743
|
} : null, axisBottom: {
|
|
8741
|
-
tickValues: o === "sideContent" ?
|
|
8744
|
+
tickValues: o === "sideContent" ? E : void 0
|
|
8742
8745
|
}, gridYValues: o === "sideContent" ? [0] : void 0, legends: C !== "none" ? [
|
|
8743
8746
|
{
|
|
8744
|
-
data: n.map((
|
|
8745
|
-
id:
|
|
8746
|
-
label: r(
|
|
8747
|
-
color:
|
|
8748
|
-
hidden:
|
|
8747
|
+
data: n.map((O, T) => ({
|
|
8748
|
+
id: O,
|
|
8749
|
+
label: r(O),
|
|
8750
|
+
color: d == null ? void 0 : d[T],
|
|
8751
|
+
hidden: f.has(O)
|
|
8749
8752
|
})),
|
|
8750
|
-
onClick:
|
|
8753
|
+
onClick: h,
|
|
8751
8754
|
anchor: C,
|
|
8752
8755
|
direction: C === "right" ? "column" : "row",
|
|
8753
8756
|
toggleSerie: !0,
|
|
@@ -8776,8 +8779,8 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
8776
8779
|
top: 10,
|
|
8777
8780
|
right: C === "right" ? 130 : 20,
|
|
8778
8781
|
bottom: C === "bottom" ? 44 : 20,
|
|
8779
|
-
left:
|
|
8780
|
-
}, colors:
|
|
8782
|
+
left: _ ? 50 : 20
|
|
8783
|
+
}, colors: d, isInteractive: !0, enableCrosshair: !0, enableTouchCrosshair: !0, useMesh: !0, animate: !1, tooltip: N }) });
|
|
8781
8784
|
}, cy = ({ errors: e, schema: t }) => {
|
|
8782
8785
|
const n = (r) => {
|
|
8783
8786
|
var a, o;
|
|
@@ -8849,35 +8852,35 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
8849
8852
|
"special-option": "_special-option_134m5_24",
|
|
8850
8853
|
specialOption: Cy
|
|
8851
8854
|
}, ds = 10, us = ({ value: e, field: t, disabled: n, valuesForSelect: r, onChangeHandler: a, separator: o }) => {
|
|
8852
|
-
var
|
|
8853
|
-
const { texts: { dynamicForms: s } } = V(X), [l, c] =
|
|
8855
|
+
var h, v, x, N;
|
|
8856
|
+
const { texts: { dynamicForms: s } } = V(X), [l, c] = B("");
|
|
8854
8857
|
r == null || r.sort((y, w) => (y.name ?? "").localeCompare(w.name ?? ""));
|
|
8855
8858
|
const u = R(() => {
|
|
8856
8859
|
var y;
|
|
8857
8860
|
return e ? (y = e == null ? void 0 : e.toString()) == null ? void 0 : y.split(o) : [];
|
|
8858
8861
|
}, [e, o]), d = A((y, w) => {
|
|
8859
|
-
const
|
|
8860
|
-
a(
|
|
8862
|
+
const S = y.split(o), C = w ? S.every((_) => u.includes(_)) && u.length === S.length ? null : S : y === "" ? void 0 : u.includes(y) ? u.filter((_) => _ !== y) : [...u, y];
|
|
8863
|
+
a(C != null && C.length ? C.join(o) : null);
|
|
8861
8864
|
}, [a, u, o]), p = R(() => {
|
|
8862
8865
|
const y = [
|
|
8863
8866
|
{
|
|
8864
8867
|
value: r.map((w) => {
|
|
8865
|
-
var
|
|
8866
|
-
return ((
|
|
8868
|
+
var S;
|
|
8869
|
+
return ((S = w.id) == null ? void 0 : S.toString()) ?? "";
|
|
8867
8870
|
}).join(o),
|
|
8868
8871
|
label: s.allOptionsMultiselect,
|
|
8869
8872
|
specialOption: !0
|
|
8870
8873
|
}
|
|
8871
8874
|
];
|
|
8872
8875
|
return r.forEach((w) => {
|
|
8873
|
-
var
|
|
8876
|
+
var S, C;
|
|
8874
8877
|
y.push({
|
|
8875
|
-
value: ((
|
|
8876
|
-
label: ((
|
|
8878
|
+
value: ((S = w.id) == null ? void 0 : S.toString()) ?? "",
|
|
8879
|
+
label: ((C = w.name) == null ? void 0 : C.toString()) ?? "",
|
|
8877
8880
|
specialOption: !1
|
|
8878
8881
|
});
|
|
8879
8882
|
}), y;
|
|
8880
|
-
}, [r, s, o]), f = Z(null), m = Z(null), [g, b] =
|
|
8883
|
+
}, [r, s, o]), f = Z(null), m = Z(null), [g, b] = B(!1);
|
|
8881
8884
|
return z(() => {
|
|
8882
8885
|
g && m.current && m.current.focus();
|
|
8883
8886
|
}, [g]), z(() => {
|
|
@@ -8885,9 +8888,9 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
8885
8888
|
}, [p]), /* @__PURE__ */ i.jsxs(En, { autoClose: "outside", onToggle: (y) => b(y), children: [
|
|
8886
8889
|
/* @__PURE__ */ i.jsx(En.Toggle, { variant: "light", ref: f, id: `multiselect-${t}`, size: "sm", className: I("bg-white border", on.multiselect), onKeyDown: (y) => {
|
|
8887
8890
|
n || y.key === "Escape" && a(null);
|
|
8888
|
-
}, children: u.length > 1 || u.length === 0 ? s.xValuesMultiselect(u.length) : u.length === 1 ? (
|
|
8891
|
+
}, children: u.length > 1 || u.length === 0 ? s.xValuesMultiselect(u.length) : u.length === 1 ? (h = p.find((y) => y.value === u.at(0))) == null ? void 0 : h.label : s.allOptionsMultiselect }),
|
|
8889
8892
|
/* @__PURE__ */ i.jsxs(En.Menu, { className: I(on.multiselectMenu), style: {
|
|
8890
|
-
left: (
|
|
8893
|
+
left: (v = f.current) == null ? void 0 : v.getBoundingClientRect().left,
|
|
8891
8894
|
top: (x = f.current) == null ? void 0 : x.getBoundingClientRect().bottom,
|
|
8892
8895
|
maxWidth: `max(300px, ${(N = f.current) == null ? void 0 : N.getBoundingClientRect().width}px)`
|
|
8893
8896
|
}, children: [
|
|
@@ -8910,22 +8913,22 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
8910
8913
|
case "DT":
|
|
8911
8914
|
return /* @__PURE__ */ i.jsx(dt, { withoutLabel: !0, InputContainer: st, className: yt.input, size: "sm", type: "date", value: t ? t.toString().split("T")[0] ?? "" : "", onChange: (b) => c(n, (b == null ? void 0 : b.toString()) ?? null), disabled: a ? !0 : r ? !o : !1, showClearIcon: !u, clearValue: d });
|
|
8912
8915
|
default: {
|
|
8913
|
-
const b = p == null ? void 0 : p.find((
|
|
8916
|
+
const b = p == null ? void 0 : p.find((h) => h.type === e);
|
|
8914
8917
|
return b ? /* @__PURE__ */ i.jsx(b.picker, { className: I(yt.input, yt.longer), value: t ? {
|
|
8915
8918
|
id: (t == null ? void 0 : t.toString()) ?? null,
|
|
8916
|
-
name: ((g = s == null ? void 0 : s.find((
|
|
8917
|
-
var
|
|
8918
|
-
return ((
|
|
8919
|
+
name: ((g = s == null ? void 0 : s.find((h) => {
|
|
8920
|
+
var v;
|
|
8921
|
+
return ((v = h.id) == null ? void 0 : v.toString()) === (t == null ? void 0 : t.toString());
|
|
8919
8922
|
})) == null ? void 0 : g.name) ?? ""
|
|
8920
|
-
} : null, onChange: (
|
|
8921
|
-
var
|
|
8922
|
-
c(n, (
|
|
8923
|
+
} : null, onChange: (h) => {
|
|
8924
|
+
var v;
|
|
8925
|
+
c(n, (h == null ? void 0 : h.id) ?? null), console.log(h, s == null ? void 0 : s.some((x) => {
|
|
8923
8926
|
var N, y;
|
|
8924
|
-
return ((N = x.id) == null ? void 0 : N.toString()) === ((y =
|
|
8925
|
-
}), l),
|
|
8927
|
+
return ((N = x.id) == null ? void 0 : N.toString()) === ((y = h == null ? void 0 : h.id) == null ? void 0 : y.toString());
|
|
8928
|
+
}), l), h && !(s != null && s.some((x) => {
|
|
8926
8929
|
var N, y;
|
|
8927
|
-
return ((N = x.id) == null ? void 0 : N.toString()) === ((y =
|
|
8928
|
-
})) && l && (console.log("adding to values for select"), l({ id: ((
|
|
8930
|
+
return ((N = x.id) == null ? void 0 : N.toString()) === ((y = h == null ? void 0 : h.id) == null ? void 0 : y.toString());
|
|
8931
|
+
})) && l && (console.log("adding to values for select"), l({ id: ((v = h.id) == null ? void 0 : v.toString()) ?? "", name: h.name }));
|
|
8929
8932
|
}, disabled: a ? !0 : r ? !o : !1 }) : /* @__PURE__ */ i.jsx("div", { className: "alert alert-warning p-1 m-0", children: /* @__PURE__ */ i.jsxs(F, { variant: "body", children: [
|
|
8930
8933
|
"Neznámý typ ",
|
|
8931
8934
|
e
|
|
@@ -8933,11 +8936,11 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
8933
8936
|
}
|
|
8934
8937
|
}
|
|
8935
8938
|
}, Ey = ({ schema: e, columns: t, setColumns: n, initialItem: r, onEdit: a, onDelete: o, customPickers: s, appDetail: l }) => {
|
|
8936
|
-
const { ProjectIconComponent: c } = V(X), [u, d] =
|
|
8937
|
-
console.log("changeValue", g, b), d((
|
|
8938
|
-
...
|
|
8939
|
+
const { ProjectIconComponent: c } = V(X), [u, d] = B(r), p = A((g, b) => {
|
|
8940
|
+
console.log("changeValue", g, b), d((h) => ({
|
|
8941
|
+
...h,
|
|
8939
8942
|
[g]: {
|
|
8940
|
-
...
|
|
8943
|
+
...h[g],
|
|
8941
8944
|
value: b
|
|
8942
8945
|
}
|
|
8943
8946
|
}));
|
|
@@ -8947,15 +8950,15 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
8947
8950
|
}, [r]), /* @__PURE__ */ i.jsxs("tr", { className: I("table-row", Ne.tableRow), children: [
|
|
8948
8951
|
/* @__PURE__ */ i.jsx("td", { className: I("table-cell", Ne.tableCell, Ne.stickyFirst), children: m() && /* @__PURE__ */ i.jsx(te, { color: "success", onClick: () => a(Mc(u)), children: /* @__PURE__ */ i.jsx(c, { icon: "check" }) }) }),
|
|
8949
8952
|
t.map((g) => {
|
|
8950
|
-
var b,
|
|
8951
|
-
return /* @__PURE__ */ i.jsx("td", { className: I("table-cell", Ne.tableCell), children: /* @__PURE__ */ i.jsx(Fc, { type: g.type, value: (b = u[g.field ?? ""]) == null ? void 0 : b.value, field: g.field, isReadonly: g.readOnly, isPrimary: e.primaryKey === g.field, valuesForSelect: g.valuesForSelect, addValueToValuesForSelect: (
|
|
8952
|
-
n(t.map((x) => x.field === g.field ? { ...x, valuesForSelect: [...x.valuesForSelect ?? [],
|
|
8953
|
-
}, onChangeHandler: p, hideClearIcon: !f(u[g.field ?? ""]), clearValue: (
|
|
8953
|
+
var b, h;
|
|
8954
|
+
return /* @__PURE__ */ i.jsx("td", { className: I("table-cell", Ne.tableCell), children: /* @__PURE__ */ i.jsx(Fc, { type: g.type, value: (b = u[g.field ?? ""]) == null ? void 0 : b.value, field: g.field, isReadonly: g.readOnly, isPrimary: e.primaryKey === g.field, valuesForSelect: g.valuesForSelect, addValueToValuesForSelect: (v) => {
|
|
8955
|
+
n(t.map((x) => x.field === g.field ? { ...x, valuesForSelect: [...x.valuesForSelect ?? [], v] } : x));
|
|
8956
|
+
}, onChangeHandler: p, hideClearIcon: !f(u[g.field ?? ""]), clearValue: (h = u[g.field ?? ""].defaultValue) == null ? void 0 : h.toString(), customPickers: s, isMultiChoice: g.multiChoice ?? !1, multiChoiceSeparator: g.multiChoiceSeparator ?? null }) }, `${e.id}-${g.field}`);
|
|
8954
8957
|
}),
|
|
8955
8958
|
/* @__PURE__ */ i.jsxs("td", { className: I("table-cell d-flex gap-1", Ne.tableCell, Ne.stickyLast), children: [
|
|
8956
8959
|
e != null && e.slaves && e.slaves.length > 0 ? e.slaves.map((g, b) => {
|
|
8957
|
-
var
|
|
8958
|
-
return /* @__PURE__ */ i.jsx(te, { as: "link", href: `${mn(l, { id: (
|
|
8960
|
+
var h, v;
|
|
8961
|
+
return /* @__PURE__ */ i.jsx(te, { as: "link", href: `${mn(l, { id: (h = g.id) == null ? void 0 : h.toString() })}?type=dynamic-form&masterId=${(v = u.id) == null ? void 0 : v.value}`, children: /* @__PURE__ */ i.jsx(ze, { text: g.name ?? "", placement: "left", children: /* @__PURE__ */ i.jsx("div", { children: /* @__PURE__ */ i.jsxs(F, { variant: "body", className: "d-flex align-items-center text-primary", children: [
|
|
8959
8962
|
e.slaves.length > 1 ? /* @__PURE__ */ i.jsx(F, { variant: "caption", className: "text-primary", children: b + 1 }) : null,
|
|
8960
8963
|
/* @__PURE__ */ i.jsx(Gs, {})
|
|
8961
8964
|
] }) }) }) }, g.id);
|
|
@@ -8964,7 +8967,7 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
8964
8967
|
] })
|
|
8965
8968
|
] });
|
|
8966
8969
|
}, Iy = ({ schema: e, columns: t, setColumns: n, onCreate: r, customPickers: a }) => {
|
|
8967
|
-
const { ProjectIconComponent: o } = V(X), [s, l] =
|
|
8970
|
+
const { ProjectIconComponent: o } = V(X), [s, l] = B(null), c = A(() => {
|
|
8968
8971
|
var p;
|
|
8969
8972
|
const d = {};
|
|
8970
8973
|
(p = e.columns) == null || p.forEach((f) => {
|
|
@@ -9001,7 +9004,7 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9001
9004
|
content: Oy,
|
|
9002
9005
|
dragging: Py
|
|
9003
9006
|
}, Ay = ({ cellRef: e, defaultWidth: t }) => {
|
|
9004
|
-
const [n, r] =
|
|
9007
|
+
const [n, r] = B(t), [, a] = B(null);
|
|
9005
9008
|
return z(() => {
|
|
9006
9009
|
r(t);
|
|
9007
9010
|
}, [t]), z(() => {
|
|
@@ -9055,11 +9058,11 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9055
9058
|
/* @__PURE__ */ i.jsx(Ay, { cellRef: o, defaultWidth: s })
|
|
9056
9059
|
] });
|
|
9057
9060
|
}, ky = ({ schema: e, items: t, onEditItem: n, onDeleteItem: r, onCreateItem: a, filters: o, setFilter: s, sortByField: l, sortByType: c, setSortBy: u, selectedMaster: d, customPickers: p, appDetail: f }) => {
|
|
9058
|
-
const { texts: { dynamicForms: m } } = V(X), [g, b] =
|
|
9061
|
+
const { texts: { dynamicForms: m } } = V(X), [g, b] = B([]);
|
|
9059
9062
|
return z(() => {
|
|
9060
|
-
var
|
|
9063
|
+
var h, v, x;
|
|
9061
9064
|
b([
|
|
9062
|
-
...((x = (
|
|
9065
|
+
...((x = (v = (h = e.columns) == null ? void 0 : h.filter((N) => !N.hidden)) == null ? void 0 : v.filter((N) => e.masterReference ? N.field !== e.masterReferenceColumn : !0)) == null ? void 0 : x.map((N) => {
|
|
9063
9066
|
var y;
|
|
9064
9067
|
return {
|
|
9065
9068
|
label: N.caption ?? "",
|
|
@@ -9078,20 +9081,20 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9078
9081
|
/* @__PURE__ */ i.jsxs("thead", { className: I("text-nowrap table-header", Ne.stickyTop, Ne.tableHeader), children: [
|
|
9079
9082
|
/* @__PURE__ */ i.jsxs("tr", { className: I("table-row", Ne.tableRow), children: [
|
|
9080
9083
|
/* @__PURE__ */ i.jsx("th", { className: I("table-head", Ne.tableHead, Ne.actionColumn, Ne.stickyFirst) }),
|
|
9081
|
-
g.map((
|
|
9084
|
+
g.map((h) => /* @__PURE__ */ i.jsx(Ry, { column: h, sortByField: l, sortByType: c, setSortBy: u }, `${e.id}-${h.field}`)),
|
|
9082
9085
|
/* @__PURE__ */ i.jsx("th", { className: I("table-head", Ne.tableHead, Ne.actionColumn, Ne.stickyLast) })
|
|
9083
9086
|
] }),
|
|
9084
9087
|
/* @__PURE__ */ i.jsxs("tr", { className: I("table-row filters-row", Ne.tableRow, Ne.filtersRow), children: [
|
|
9085
9088
|
/* @__PURE__ */ i.jsx("th", { className: I("table-head", Ne.tableHead, Ne.actionColumn, Ne.stickyFirst) }),
|
|
9086
|
-
g.map((
|
|
9089
|
+
g.map((h) => /* @__PURE__ */ i.jsx("th", { className: I("table-head", Ne.tableHead), children: h.valuesForSelect && h.valuesForSelect.length > 0 || h.type === "BIT" ? /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsx(ut, { InputContainer: st, withoutLabel: !0, size: "sm", value: o[h.field] ?? "", onChange: (v) => s(h.field, (v == null ? void 0 : v.toString()) ?? null), options: h.type === "BIT" ? [
|
|
9087
9090
|
{ id: 1, name: m.yes },
|
|
9088
9091
|
{ id: 0, name: m.no }
|
|
9089
|
-
] :
|
|
9092
|
+
] : h.valuesForSelect ?? [], isNumber: h.type === "BIT", showClearIcon: !0, dropdownWidth: 200 }) }) : /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsx(dt, { InputContainer: st, withoutLabel: !0, size: "sm", type: h.type === "NUM" ? "number" : h.type === "DT" ? "date" : "text", value: o[h.field] ?? "", onChange: (v) => s(h.field, (v == null ? void 0 : v.toString()) ?? null) }) }) }, `${e.id}-${h.field}`)),
|
|
9090
9093
|
/* @__PURE__ */ i.jsx("th", { className: I("table-head", Ne.tableHead, Ne.actionColumn, Ne.stickyLast) })
|
|
9091
9094
|
] })
|
|
9092
9095
|
] }),
|
|
9093
9096
|
/* @__PURE__ */ i.jsxs("tbody", { className: I("table-body", Ne.tableBody), children: [
|
|
9094
|
-
t.filter((
|
|
9097
|
+
t.filter((h) => h[e.primaryKey ?? ""]).map((h) => /* @__PURE__ */ i.jsx(Ey, { schema: e, columns: g, setColumns: b, initialItem: h, onEdit: n, onDelete: r, customPickers: p, appDetail: f }, `${e.id}-${h[e.primaryKey ?? ""].value}`)),
|
|
9095
9098
|
/* @__PURE__ */ i.jsx(Iy, { schema: e, columns: g, setColumns: b, onCreate: a, customPickers: p })
|
|
9096
9099
|
] })
|
|
9097
9100
|
] });
|
|
@@ -9108,15 +9111,15 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9108
9111
|
apiExportGet: "/dynamicForms/export"
|
|
9109
9112
|
}, dj = ({ id: e, page: t, setPage: n, filters: r, setFilter: a, sortByField: o, sortByType: s, setSortBy: l, appUrls: { appDetail: c = fs.appDetail } = fs, apiUrls: { apiSchemaGet: u = Ut.apiSchemaGet, apiDataGet: d = Ut.apiDataGet, apiItemPost: p = Ut.apiItemPost, apiItemDelete: f = Ut.apiItemDelete, apiItemCreate: m = Ut.apiItemCreate, apiExportGet: g = Ut.apiExportGet } = Ut, customPickers: b }) => {
|
|
9110
9113
|
var Fe, at, it, nn, Bi, Li, Mi;
|
|
9111
|
-
const { texts: { dynamicForms:
|
|
9114
|
+
const { texts: { dynamicForms: h }, ProjectIconComponent: v } = V(X), x = Ke(), { startLoading: N, stopLoading: y } = V(ht), [w, S] = B(null), [C, _] = B(null), [E, O] = B(null), [T, k] = B(null), [j, P] = B(!1), { addNotification: W } = Jt(), [M, $] = B([]), { confirm: Y } = wt(), U = 20, q = U + 1, Q = T ? Math.ceil(T.length / U) : 1, ne = t ? t > 1 : !1, oe = t ? t < Q : !1, se = t ? (t - 1) * U : 0, xe = t ? t * U : U, H = R(() => T ? T.length > q : !1, [T, q]), ae = R(() => H ? (T == null ? void 0 : T.slice(se, xe)) ?? null : T ?? null, [H, T, se, xe]), [ge, Ce] = Jn("masterId", null, "string"), [fe, L] = B(ge);
|
|
9112
9115
|
z(() => {
|
|
9113
|
-
|
|
9116
|
+
S(null), _(null), P(!1), $([]);
|
|
9114
9117
|
}, [e]), z(() => {
|
|
9115
|
-
ge !== null && (
|
|
9118
|
+
ge !== null && (L(ge), Ce(null));
|
|
9116
9119
|
}, [ge, e, Ce]);
|
|
9117
9120
|
const ue = A(async () => {
|
|
9118
9121
|
N("dynamicFormSchema"), await x.get(`${u}?id=${e}`).then(({ data: ie }) => {
|
|
9119
|
-
|
|
9122
|
+
S(ie), y("dynamicFormSchema");
|
|
9120
9123
|
}).catch(() => y("dynamicFormSchema"));
|
|
9121
9124
|
}, [x, e, N, y, u]), _e = A(async () => {
|
|
9122
9125
|
var ie;
|
|
@@ -9142,33 +9145,33 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9142
9145
|
responseType: "blob"
|
|
9143
9146
|
}).then((he) => Gd(he, { fallbackName: `export-${e}` })).finally(() => y("dynamicFormExport")));
|
|
9144
9147
|
}, [x, e, w, N, y, j, fe, g]), Ze = A(async (ie) => (N("dynamicFormEdit"), x.post(`${p}?id=${e}`, ie).then(() => (y("dynamicFormEdit"), $([]), !0)).catch((he) => (y("dynamicFormEdit"), $(Yr(he)), !1))), [x, e, N, y, p]), bt = A(async (ie) => (N("dynamicFormDelete"), x.delete(`${f}?id=${e}&pk=${ie}`).then(() => (y("dynamicFormDelete"), $([]), !0)).catch((he) => (y("dynamicFormDelete"), $(Yr(he)), !1))), [x, e, N, y, f]), K = A(async (ie) => (N("dynamicFormCreate"), x.post(`${m}?id=${e}`, ie).then(({ data: he }) => (y("dynamicFormCreate"), $([]), he)).catch((he) => (y("dynamicFormCreate"), $(Yr(he)), null))), [x, e, N, y, m]), G = A(async (ie) => {
|
|
9145
|
-
w && await Ze(w.masterReference ? { ...ie, [w.masterReferenceColumn ?? ""]: fe } : ie) && (W(
|
|
9148
|
+
w && await Ze(w.masterReference ? { ...ie, [w.masterReferenceColumn ?? ""]: fe } : ie) && (W(h.editSuccess, "success"), _((he) => he && he.map((De) => {
|
|
9146
9149
|
var be;
|
|
9147
9150
|
return ((be = De[(w == null ? void 0 : w.primaryKey) ?? ""]) == null ? void 0 : be.value) === ie[(w == null ? void 0 : w.primaryKey) ?? ""] ? cs(ie, w) : De;
|
|
9148
9151
|
})));
|
|
9149
|
-
}, [W, Ze, w, fe,
|
|
9150
|
-
await Y(
|
|
9152
|
+
}, [W, Ze, w, fe, h]), ee = A(async (ie) => {
|
|
9153
|
+
await Y(h.deleteConfirm) && await bt(ie) && (W(h.deleteSuccess, "success"), _((he) => he && he.filter((De) => {
|
|
9151
9154
|
var be;
|
|
9152
9155
|
return ((be = De[(w == null ? void 0 : w.primaryKey) ?? ""]) == null ? void 0 : be.value) !== ie;
|
|
9153
9156
|
})));
|
|
9154
|
-
}, [W, bt,
|
|
9157
|
+
}, [W, bt, h, Y, w]), pe = A(async (ie) => {
|
|
9155
9158
|
if (!w)
|
|
9156
9159
|
return !1;
|
|
9157
9160
|
const he = await K(w.masterReference ? { ...ie, [w.masterReferenceColumn ?? ""]: fe } : ie);
|
|
9158
9161
|
if (he !== null) {
|
|
9159
|
-
W(
|
|
9162
|
+
W(h.createSuccess, "success");
|
|
9160
9163
|
const De = cs(ie, w);
|
|
9161
9164
|
return De[(w == null ? void 0 : w.primaryKey) ?? ""] = { value: he, defaultValue: he }, _((be) => [...be ?? [], De]), !0;
|
|
9162
9165
|
}
|
|
9163
9166
|
return !1;
|
|
9164
|
-
}, [W, K,
|
|
9167
|
+
}, [W, K, h, w, fe]), Ee = (ie) => {
|
|
9165
9168
|
ie > Q ? n(Q) : ie < 1 && n(1), n(ie);
|
|
9166
9169
|
}, ve = A(() => {
|
|
9167
|
-
if (!
|
|
9170
|
+
if (!C || !w) {
|
|
9168
9171
|
O(null);
|
|
9169
9172
|
return;
|
|
9170
9173
|
}
|
|
9171
|
-
const ie =
|
|
9174
|
+
const ie = C.filter((he) => Object.entries(r).every(([De, be]) => {
|
|
9172
9175
|
var jn, Dn, Sn;
|
|
9173
9176
|
if (be === null)
|
|
9174
9177
|
return !0;
|
|
@@ -9192,16 +9195,16 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9192
9195
|
}
|
|
9193
9196
|
}));
|
|
9194
9197
|
O(ie);
|
|
9195
|
-
}, [
|
|
9196
|
-
if (!
|
|
9197
|
-
|
|
9198
|
+
}, [C, r, w]), ce = A(() => {
|
|
9199
|
+
if (!E || !w) {
|
|
9200
|
+
k([]);
|
|
9198
9201
|
return;
|
|
9199
9202
|
}
|
|
9200
9203
|
if (!o) {
|
|
9201
|
-
|
|
9204
|
+
k(E);
|
|
9202
9205
|
return;
|
|
9203
9206
|
}
|
|
9204
|
-
|
|
9207
|
+
k([...E].sort((ie, he) => {
|
|
9205
9208
|
var wn, Nn, jn, Dn, Sn, ir;
|
|
9206
9209
|
const De = ((Nn = (wn = ie[o]) == null ? void 0 : wn.value) == null ? void 0 : Nn.toString()) ?? "", be = ((Dn = (jn = he[o]) == null ? void 0 : jn.value) == null ? void 0 : Dn.toString()) ?? "", Oe = w.columns.find((ft) => ft.field === o), Te = Oe == null ? void 0 : Oe.type;
|
|
9207
9210
|
if (!Oe || !Te || !De && !be)
|
|
@@ -9230,7 +9233,7 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9230
9233
|
}
|
|
9231
9234
|
return s === "asc" ? De.toString().localeCompare(be.toString()) : be.toString().localeCompare(De.toString());
|
|
9232
9235
|
}));
|
|
9233
|
-
}, [
|
|
9236
|
+
}, [E, w, o, s]);
|
|
9234
9237
|
return z(() => {
|
|
9235
9238
|
ue();
|
|
9236
9239
|
}, [ue]), z(() => {
|
|
@@ -9247,7 +9250,7 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9247
9250
|
/* @__PURE__ */ i.jsxs("div", { className: "mb-3 d-flex justify-content-between align-items-start", children: [
|
|
9248
9251
|
/* @__PURE__ */ i.jsxs("div", { className: "d-flex align-items-center gap-3", children: [
|
|
9249
9252
|
/* @__PURE__ */ i.jsx(F, { variant: "h3", children: (w == null ? void 0 : w.name) ?? "" }),
|
|
9250
|
-
(w == null ? void 0 : w.masterReference) && /* @__PURE__ */ i.jsx(By, { label: ((at = (Fe = w.columns) == null ? void 0 : Fe.find((ie) => ie.field === w.masterReferenceColumn)) == null ? void 0 : at.caption) ?? "", options: ((nn = (it = w.columns) == null ? void 0 : it.find((ie) => ie.field === w.masterReferenceColumn)) == null ? void 0 : nn.values) ?? [], master: fe, onChange: (ie) =>
|
|
9253
|
+
(w == null ? void 0 : w.masterReference) && /* @__PURE__ */ i.jsx(By, { label: ((at = (Fe = w.columns) == null ? void 0 : Fe.find((ie) => ie.field === w.masterReferenceColumn)) == null ? void 0 : at.caption) ?? "", options: ((nn = (it = w.columns) == null ? void 0 : it.find((ie) => ie.field === w.masterReferenceColumn)) == null ? void 0 : nn.values) ?? [], master: fe, onChange: (ie) => L(ie) })
|
|
9251
9254
|
] }),
|
|
9252
9255
|
/* @__PURE__ */ i.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
9253
9256
|
(Bi = w == null ? void 0 : w.slaves) == null ? void 0 : Bi.map((ie, he) => {
|
|
@@ -9261,30 +9264,30 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9261
9264
|
] }, ie.id);
|
|
9262
9265
|
}),
|
|
9263
9266
|
/* @__PURE__ */ i.jsxs(Lt, { toggle: /* @__PURE__ */ i.jsx(Mt, { as: Zt }), children: [
|
|
9264
|
-
/* @__PURE__ */ i.jsx(Ye, { onClick: () => P(!j), children: j ?
|
|
9267
|
+
/* @__PURE__ */ i.jsx(Ye, { onClick: () => P(!j), children: j ? h.hideArchived : h.showArchived }),
|
|
9265
9268
|
/* @__PURE__ */ i.jsx(Us, {}),
|
|
9266
|
-
/* @__PURE__ */ i.jsx(Ye, { onClick: We, icon: /* @__PURE__ */ i.jsx(
|
|
9269
|
+
/* @__PURE__ */ i.jsx(Ye, { onClick: We, icon: /* @__PURE__ */ i.jsx(v, { icon: "file-download" }), children: h.downloadExport })
|
|
9267
9270
|
] })
|
|
9268
9271
|
] })
|
|
9269
9272
|
] }),
|
|
9270
9273
|
(w == null ? void 0 : w.description) && /* @__PURE__ */ i.jsx(F, { variant: "body2", className: "mb-3", children: w == null ? void 0 : w.description }),
|
|
9271
|
-
w != null && w.masterReference && !fe ? /* @__PURE__ */ i.jsx(pt, { variant: "warning", children:
|
|
9272
|
-
w &&
|
|
9274
|
+
w != null && w.masterReference && !fe ? /* @__PURE__ */ i.jsx(pt, { variant: "warning", children: h.selectMaster(((Mi = (Li = w.columns) == null ? void 0 : Li.find((ie) => ie.field === w.masterReferenceColumn)) == null ? void 0 : Mi.caption) ?? "").toLowerCase() }) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
9275
|
+
w && M.length > 0 && /* @__PURE__ */ i.jsx("div", { className: "mb-2", children: /* @__PURE__ */ i.jsx(cy, { errors: M, schema: w }) }),
|
|
9273
9276
|
w && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
9274
9277
|
/* @__PURE__ */ i.jsx("div", { className: I("rounded border overflow-auto", ps.tableContainer), children: /* @__PURE__ */ i.jsx(ky, { schema: w, items: !H && T && (T == null ? void 0 : T.length) > q ? [] : (H ? ae : T) ?? [], onEditItem: G, onDeleteItem: ee, onCreateItem: pe, filters: r, setFilter: a, sortByField: o, sortByType: s, setSortBy: l, selectedMaster: (fe == null ? void 0 : fe.toString()) ?? null, customPickers: b, appDetail: c }) }),
|
|
9275
9278
|
H && t && /* @__PURE__ */ i.jsxs("div", { className: I(ps.pagination, "d-flex align-items-center gap-3 p-1 border-bottom border-start border-end rounded"), children: [
|
|
9276
9279
|
/* @__PURE__ */ i.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
|
|
9277
|
-
/* @__PURE__ */ i.jsx(te, { color: "primary", onClick: () => Ee(1), disabled: !ne, children: /* @__PURE__ */ i.jsx(
|
|
9278
|
-
/* @__PURE__ */ i.jsx(te, { color: "primary", onClick: () => Ee(t - 1), disabled: !ne, children: /* @__PURE__ */ i.jsx(
|
|
9279
|
-
/* @__PURE__ */ i.jsx(te, { color: "primary", onClick: () => Ee(t + 1), disabled: !oe, children: /* @__PURE__ */ i.jsx(
|
|
9280
|
-
/* @__PURE__ */ i.jsx(te, { color: "primary", onClick: () => Ee(Q), disabled: !oe, children: /* @__PURE__ */ i.jsx(
|
|
9280
|
+
/* @__PURE__ */ i.jsx(te, { color: "primary", onClick: () => Ee(1), disabled: !ne, children: /* @__PURE__ */ i.jsx(v, { icon: "chevron-double-left" }) }),
|
|
9281
|
+
/* @__PURE__ */ i.jsx(te, { color: "primary", onClick: () => Ee(t - 1), disabled: !ne, children: /* @__PURE__ */ i.jsx(v, { icon: "chevron-left" }) }),
|
|
9282
|
+
/* @__PURE__ */ i.jsx(te, { color: "primary", onClick: () => Ee(t + 1), disabled: !oe, children: /* @__PURE__ */ i.jsx(v, { icon: "chevron-right" }) }),
|
|
9283
|
+
/* @__PURE__ */ i.jsx(te, { color: "primary", onClick: () => Ee(Q), disabled: !oe, children: /* @__PURE__ */ i.jsx(v, { icon: "chevron-double-right" }) })
|
|
9281
9284
|
] }),
|
|
9282
9285
|
/* @__PURE__ */ i.jsxs(F, { variant: "body", children: [
|
|
9283
|
-
|
|
9286
|
+
h.tablePage,
|
|
9284
9287
|
" ",
|
|
9285
9288
|
t,
|
|
9286
9289
|
" ",
|
|
9287
|
-
|
|
9290
|
+
h.tablePageFrom,
|
|
9288
9291
|
" ",
|
|
9289
9292
|
Q
|
|
9290
9293
|
] })
|
|
@@ -9303,29 +9306,29 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9303
9306
|
e.description && /* @__PURE__ */ i.jsx(F, { variant: "body2", className: "text-muted mt-2", children: e.description })
|
|
9304
9307
|
] }) : /* @__PURE__ */ i.jsx(My, { item: e, children: /* @__PURE__ */ i.jsx(Ge, { to: `${mn(n, { id: (l = e.id) == null ? void 0 : l.toString() })}?type=${e.type}&search=${r ?? ""}`, className: `text-nowrap list-group-item list-group-item-action ${(a == null ? void 0 : a.toString()) === ((c = e.id) == null ? void 0 : c.toString()) ? "active" : ""}`, children: /* @__PURE__ */ i.jsx(F, { variant: "body2", children: e.name }) }) }, e.id);
|
|
9305
9308
|
}, uj = ({ activeId: e, anchoredForms: t, otherForms: n = [], groupsDefs: r = [], searchQuery: a, fullSize: o, appUrls: { appDetail: s = ms.appDetail } = ms, apiUrls: { apiDynamicFormsGet: l = gs.apiDynamicFormsGet } = gs }) => {
|
|
9306
|
-
const c = Ke(), { startLoading: u, stopLoading: d } = V(ht), [p, f] =
|
|
9309
|
+
const c = Ke(), { startLoading: u, stopLoading: d } = V(ht), [p, f] = B(null), [m] = Jn("search", ""), g = R(() => (t == null ? void 0 : t.filter((x) => qe(x.name, a) || qe(x.description, a)).sort((x, N) => (x.name ?? "").localeCompare(N.name ?? ""))) ?? [], [t, a]), b = R(() => [
|
|
9307
9310
|
...(p == null ? void 0 : p.map((x) => ({
|
|
9308
9311
|
...x,
|
|
9309
9312
|
type: "dynamic-form"
|
|
9310
9313
|
}))) ?? [],
|
|
9311
9314
|
...n
|
|
9312
|
-
].filter((x) => qe(x.name, a) || qe(x.description, a)).sort((x, N) => (x.name ?? "").localeCompare(N.name ?? "")) ?? [], [p, n, a]),
|
|
9315
|
+
].filter((x) => qe(x.name, a) || qe(x.description, a)).sort((x, N) => (x.name ?? "").localeCompare(N.name ?? "")) ?? [], [p, n, a]), h = R(() => r.map((x) => ({
|
|
9313
9316
|
id: x.id,
|
|
9314
9317
|
name: x.name ?? "",
|
|
9315
9318
|
items: b.filter((N) => N.group === x.id)
|
|
9316
|
-
})).filter((x) => x.items.length > 0), [r, b]),
|
|
9319
|
+
})).filter((x) => x.items.length > 0), [r, b]), v = A(async () => {
|
|
9317
9320
|
u("dynamicForms"), await c.get(l).then(({ data: x }) => {
|
|
9318
9321
|
f(x), d("dynamicForms");
|
|
9319
9322
|
}).catch(() => d("dynamicForms"));
|
|
9320
9323
|
}, [c, u, d, l]);
|
|
9321
9324
|
return z(() => {
|
|
9322
|
-
!p &&
|
|
9323
|
-
}, [
|
|
9325
|
+
!p && v();
|
|
9326
|
+
}, [v, p]), [...g, ...b].length > 0 ? /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsxs("div", { className: "w-auto list-group forms-items overflow-x-hidden", children: [
|
|
9324
9327
|
g.length > 0 ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
9325
9328
|
g.map((x) => /* @__PURE__ */ i.jsx(vs, { item: x, fullSize: o ?? !1, appDetail: s, search: m, activeId: e }, x.id)),
|
|
9326
9329
|
/* @__PURE__ */ i.jsx("hr", { className: "mb-0" })
|
|
9327
9330
|
] }) : null,
|
|
9328
|
-
|
|
9331
|
+
h.map((x) => /* @__PURE__ */ i.jsx(Sr, { title: x.name, defaultOpen: !0, children: x.items.map((N) => /* @__PURE__ */ i.jsx(vs, { item: N, fullSize: o ?? !1, appDetail: s, search: m, activeId: e }, N.id)) }, x.id))
|
|
9329
9332
|
] }) }) : null;
|
|
9330
9333
|
}, pj = ({ label: e, to: t, value: n }) => /* @__PURE__ */ i.jsxs(Pe, { label: e, children: [
|
|
9331
9334
|
/* @__PURE__ */ i.jsx("input", { disabled: !0, className: "form-control d-none" }),
|
|
@@ -9417,7 +9420,7 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9417
9420
|
] })
|
|
9418
9421
|
] }))) }) }) });
|
|
9419
9422
|
}, hs = ({ reportVersion: e, getReportRoute: t, report: n }) => /* @__PURE__ */ i.jsx(Tr, { as: Ge, to: t(n, e.id), className: "p-1 px-2", action: !0, children: /* @__PURE__ */ i.jsx(F, { variant: "body2", className: "d-flex justify-content-between align-items-center gap-3", children: /* @__PURE__ */ i.jsx("div", { className: "link", children: e.name }) }) }), mr = 5, bs = ({ versionsList: e, getReportRoute: t, report: n }) => {
|
|
9420
|
-
const { ProjectIconComponent: r } = V(X), [a, o] =
|
|
9423
|
+
const { ProjectIconComponent: r } = V(X), [a, o] = B(!0), s = R(() => e.length <= mr ? e : e.slice(0, mr - 1), [e]), l = R(() => e.length <= mr ? [] : e.slice(mr - 1), [e]);
|
|
9421
9424
|
return /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsxs(Mn, { children: [
|
|
9422
9425
|
s.map((c) => /* @__PURE__ */ i.jsx(hs, { reportVersion: c, getReportRoute: t, report: n })),
|
|
9423
9426
|
a ? null : l.map((c) => /* @__PURE__ */ i.jsx(hs, { reportVersion: c, getReportRoute: t, report: n })),
|
|
@@ -9445,29 +9448,29 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9445
9448
|
reportsGet: "/reports",
|
|
9446
9449
|
reportsLastUsedGet: "/reports/last-used"
|
|
9447
9450
|
}, xj = ({ groups: e, apiUrls: { reportsGet: t = ba.reportsGet, reportsLastUsedGet: n = ba.reportsLastUsedGet } = ba, getReportName: r, getReportDescription: a, getGroupTitle: o, getReportRoute: s }) => {
|
|
9448
|
-
const { texts: { reports: l } } = V(X), [c, u] =
|
|
9449
|
-
...
|
|
9450
|
-
groupId: !
|
|
9451
|
+
const { texts: { reports: l } } = V(X), [c, u] = B(""), [d] = Xa(c, 500), p = A((h) => h.map((v) => ({
|
|
9452
|
+
...v,
|
|
9453
|
+
groupId: !v.groupId || v.groupId === 0 || !e.some((x) => x === v.groupId) ? 999 : v.groupId
|
|
9451
9454
|
})), [e]), { data: f } = Me(t, { dataTransformer: p }), m = R(() => {
|
|
9452
9455
|
if (f === null)
|
|
9453
9456
|
return {};
|
|
9454
|
-
const
|
|
9455
|
-
return e.forEach((
|
|
9456
|
-
v
|
|
9457
|
-
}),
|
|
9458
|
-
}, [d, e, f, a, r]), g = R(() => e.filter((
|
|
9459
|
-
var
|
|
9460
|
-
return ((
|
|
9457
|
+
const h = {};
|
|
9458
|
+
return e.forEach((v) => {
|
|
9459
|
+
h[v] = f.filter((x) => x.groupId === v && (qe(r(x), d) || qe(a(x), d) || x.versions.some((N) => qe(N.name, d)) || x.versionsCustom.some((N) => qe(N.name, d))));
|
|
9460
|
+
}), h;
|
|
9461
|
+
}, [d, e, f, a, r]), g = R(() => e.filter((h) => {
|
|
9462
|
+
var v;
|
|
9463
|
+
return ((v = m[h]) == null ? void 0 : v.length) > 0;
|
|
9461
9464
|
}), [m, e]), { isMobile: b } = Ar();
|
|
9462
9465
|
return /* @__PURE__ */ i.jsxs(Tt, { unavailableOnMobile: !0, variant: "fullScreen", sideContent: /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsx(qy, { reportsLastUsedGet: n, getReportName: r, getReportRoute: s }) }), children: [
|
|
9463
|
-
/* @__PURE__ */ i.jsx("div", { children: /* @__PURE__ */ i.jsx(Se.Control, { className: "mb-3", type: "search", value: c, onChange: (
|
|
9464
|
-
var
|
|
9465
|
-
return u(((
|
|
9466
|
+
/* @__PURE__ */ i.jsx("div", { children: /* @__PURE__ */ i.jsx(Se.Control, { className: "mb-3", type: "search", value: c, onChange: (h) => {
|
|
9467
|
+
var v;
|
|
9468
|
+
return u(((v = h.target) == null ? void 0 : v.value) ?? "");
|
|
9466
9469
|
}, placeholder: l.index.search }) }),
|
|
9467
|
-
/* @__PURE__ */ i.jsx("div", { className: "overflow-x-hidden luminus-thin-scrollbar luminus-reports-index", children: g.map((
|
|
9468
|
-
/* @__PURE__ */ i.jsx("div", { className: I("group-title z-1", ln.groupTitle), children: /* @__PURE__ */ i.jsx($y, { text: o(
|
|
9469
|
-
/* @__PURE__ */ i.jsx("div", { className: I(ln.groupContent), children: /* @__PURE__ */ i.jsx("div", { className: I("row gx-3 gy-3"), children: m[
|
|
9470
|
-
] },
|
|
9470
|
+
/* @__PURE__ */ i.jsx("div", { className: "overflow-x-hidden luminus-thin-scrollbar luminus-reports-index", children: g.map((h) => /* @__PURE__ */ i.jsxs("div", { className: I(ln.cardsGroup, { [ln.mobile]: b }), children: [
|
|
9471
|
+
/* @__PURE__ */ i.jsx("div", { className: I("group-title z-1", ln.groupTitle), children: /* @__PURE__ */ i.jsx($y, { text: o(h) }) }),
|
|
9472
|
+
/* @__PURE__ */ i.jsx("div", { className: I(ln.groupContent), children: /* @__PURE__ */ i.jsx("div", { className: I("row gx-3 gy-3"), children: m[h].map((v) => /* @__PURE__ */ i.jsx(Yy, { report: v, getReportRoute: s, getReportName: r, getReportDescription: a })) }) })
|
|
9473
|
+
] }, h)) })
|
|
9471
9474
|
] });
|
|
9472
9475
|
}, Ky = "_mini-detail-popover_obryf_1", Xy = "_sm_obryf_5", Qy = "_lg_obryf_9", xs = {
|
|
9473
9476
|
"mini-detail-popover": "_mini-detail-popover_obryf_1",
|
|
@@ -9475,7 +9478,7 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9475
9478
|
sm: Xy,
|
|
9476
9479
|
lg: Qy
|
|
9477
9480
|
}, yj = ({ children: e, useMiniDetail: t, miniDetailProps: n, placement: r = "bottom", trigger: a = ["hover"], delayMs: o = 500 }) => {
|
|
9478
|
-
const { user: s } = V(Bt), [l, c] =
|
|
9481
|
+
const { user: s } = V(Bt), [l, c] = B(!1), { isLoading: u, detail: d, heading: p, tooltipWidth: f } = t({
|
|
9479
9482
|
...n,
|
|
9480
9483
|
enabled: l && !(s != null && s.external)
|
|
9481
9484
|
}), m = Z(null);
|
|
@@ -9639,51 +9642,51 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9639
9642
|
}), [r]);
|
|
9640
9643
|
return /* @__PURE__ */ i.jsx(t, { data: o ?? [], columnsDef: l, tableId: n, useSearchState: !0, paginationMode: "enabled", useScrollableContainer: !0, archiveHighlighting: s, rowNavigation: c });
|
|
9641
9644
|
}, Cj = ({ InputContainer: e = Pe, formField: t, label: n, resetsFields: r, type: a, required: o, hidden: s, disabled: l, withoutLabel: c, hint: u, onChange: d, className: p }) => {
|
|
9642
|
-
const { register: f, formState: m, setValue: g } = jt(), b = Nt({ falseIfNotInit: !0 }), [
|
|
9645
|
+
const { register: f, formState: m, setValue: g } = jt(), b = Nt({ falseIfNotInit: !0 }), [h, v] = B(void 0), [x, N] = B(!1);
|
|
9643
9646
|
z(() => {
|
|
9644
|
-
const
|
|
9645
|
-
let
|
|
9646
|
-
|
|
9647
|
-
|
|
9648
|
-
}),
|
|
9647
|
+
const S = t.split(".");
|
|
9648
|
+
let C = m.errors;
|
|
9649
|
+
S.forEach((_) => {
|
|
9650
|
+
C !== void 0 && (C = C[_]);
|
|
9651
|
+
}), v(C);
|
|
9649
9652
|
}, [m, t]);
|
|
9650
|
-
const y = R(() => l || b, [l, b]), w =
|
|
9653
|
+
const y = R(() => l || b, [l, b]), w = h !== void 0;
|
|
9651
9654
|
return z(() => {
|
|
9652
9655
|
m.isSubmitted && N(!0);
|
|
9653
9656
|
}, [m]), /* @__PURE__ */ i.jsxs(e, { isForCheckInput: !0, hidden: s, label: n ?? "", required: o, disabled: y, isInvalid: w, withoutLabel: c, hint: u, className: p, children: [
|
|
9654
9657
|
/* @__PURE__ */ i.jsx(Se.Check, { id: `check-${t}`, type: a ?? "checkbox", label: `${n}${o ? " *" : ""}`, ...f(t, {
|
|
9655
|
-
onChange: (
|
|
9656
|
-
r && r.forEach((
|
|
9658
|
+
onChange: (S) => {
|
|
9659
|
+
r && r.forEach((C) => g(C, null, { shouldDirty: !0, shouldValidate: x })), d && d(S.target.value ?? null);
|
|
9657
9660
|
}
|
|
9658
9661
|
}), isInvalid: w, hidden: s, disabled: y, className: "w-100" }),
|
|
9659
|
-
|
|
9662
|
+
h && /* @__PURE__ */ i.jsx(en, { message: h.message })
|
|
9660
9663
|
] });
|
|
9661
9664
|
}, Ej = ({ InputContainer: e = Pe, label: t, formField: n, options: r, resetsFields: a, required: o, disabled: s, hidden: l, onChange: c, className: u }) => {
|
|
9662
|
-
const { register: d, formState: p, setValue: f, watch: m } = jt(), g = Nt({ falseIfNotInit: !0 }), [b,
|
|
9665
|
+
const { register: d, formState: p, setValue: f, watch: m } = jt(), g = Nt({ falseIfNotInit: !0 }), [b, h] = B(void 0), [v, x] = B(!1), N = R(() => r, [r]), y = R(() => s || g, [s, g]);
|
|
9663
9666
|
z(() => {
|
|
9664
|
-
const
|
|
9665
|
-
let
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
}),
|
|
9667
|
+
const S = n.split(".");
|
|
9668
|
+
let C = p.errors;
|
|
9669
|
+
S.forEach((_) => {
|
|
9670
|
+
C !== void 0 && (C = C[_]);
|
|
9671
|
+
}), h(C);
|
|
9669
9672
|
}, [p, n]), z(() => {
|
|
9670
9673
|
p.isSubmitted && x(!0);
|
|
9671
9674
|
}, [p]);
|
|
9672
9675
|
const w = b !== void 0;
|
|
9673
9676
|
return /* @__PURE__ */ i.jsxs(e, { isForRadioInput: !0, hidden: l, withoutLabel: !t, label: t ?? "", required: o, disabled: y, isInvalid: w, className: u, children: [
|
|
9674
|
-
N.map((
|
|
9675
|
-
onChange: (
|
|
9677
|
+
N.map((S) => /* @__PURE__ */ i.jsx(Se.Check, { id: `radio-${S.id}`, label: S.name, type: "radio", value: S.id ?? "", checked: m(n) === S.id, ...d(n, {
|
|
9678
|
+
onChange: (C) => {
|
|
9676
9679
|
var _;
|
|
9677
|
-
a && a.forEach((
|
|
9680
|
+
a && a.forEach((E) => f(E, null, { shouldDirty: !0, shouldValidate: v })), c && c((_ = C.target) != null && _.value ? C.target.value.toString() : null);
|
|
9678
9681
|
}
|
|
9679
|
-
}), isInvalid: w, hidden: l, disabled: y, className: "w-100" },
|
|
9682
|
+
}), isInvalid: w, hidden: l, disabled: y, className: "w-100" }, S.id)),
|
|
9680
9683
|
b && /* @__PURE__ */ i.jsx(en, { message: b.message })
|
|
9681
9684
|
] });
|
|
9682
9685
|
}, Ij = ({ label: e, InputContainer: t = Pe, className: n, withoutLabel: r, hidden: a, disabled: o, contactType: s, formField: l, ...c }) => {
|
|
9683
9686
|
const { watch: u } = jt(), d = u(l), p = Nt({ falseIfNotInit: !0 }), f = R(() => o || p, [o, p]);
|
|
9684
9687
|
return a ? null : /* @__PURE__ */ i.jsx(Oc, { contactType: s, value: d, withoutLabel: r, label: e, className: n, children: /* @__PURE__ */ i.jsx(fn, { type: "text", formField: l, InputContainer: t, size: "sm", withoutLabel: !0, className: "flex-grow-1", disabled: f, ...c }) });
|
|
9685
|
-
}, _j = ({ InputContainer: e = Pe, formField: t, label: n, size: r, defaultSelection: a, resetsFields: o, isNumber: s, required: l, hidden: c, disabled: u, items: d, onSearchQueryChange: p, selectedItemNavigateTo: f, texts: m, dropdownItemsNameWidth: g, isLoading: b, withoutLabel:
|
|
9686
|
-
const { formState: W, setValue:
|
|
9688
|
+
}, _j = ({ InputContainer: e = Pe, formField: t, label: n, size: r, defaultSelection: a, resetsFields: o, isNumber: s, required: l, hidden: c, disabled: u, items: d, onSearchQueryChange: p, selectedItemNavigateTo: f, texts: m, dropdownItemsNameWidth: g, isLoading: b, withoutLabel: h, additionalColumns: v, CustomOnChangeComponent: x, icon: N, displayIdAsName: y, onSelect: w, className: S, archiveColumn: C, hint: _, addNewOptionPath: E, refreshOptions: O, MiniDetailComponent: T, miniDetailPlacement: k, suggestedItems: j, suggestedItemsTitle: P }) => {
|
|
9689
|
+
const { formState: W, setValue: M, watch: $, control: Y } = jt(), U = Nt({ falseIfNotInit: !0 }), [q, Q] = B(void 0), [ne, oe] = B(!1), [se, xe] = B(!1), H = $(t) ?? null, ae = H === (a == null ? void 0 : a.id) ? a == null ? void 0 : a.name : $(`${t}-DropdownName`), ge = R(() => H == null ? null : { id: H ?? null, name: ae ?? "" }, [H, ae]), Ce = A(() => {
|
|
9687
9690
|
const G = t.split(".");
|
|
9688
9691
|
let ee = W.errors;
|
|
9689
9692
|
G.forEach((pe) => {
|
|
@@ -9692,19 +9695,19 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9692
9695
|
}, [W, t]), fe = A((G) => {
|
|
9693
9696
|
if ((G == null ? void 0 : G.id) === H)
|
|
9694
9697
|
return;
|
|
9695
|
-
if (w && w(G), o && o.forEach((pe) =>
|
|
9696
|
-
|
|
9698
|
+
if (w && w(G), o && o.forEach((pe) => M(pe, null, { shouldDirty: !0, shouldValidate: se })), G === null) {
|
|
9699
|
+
M(t, null, {
|
|
9697
9700
|
shouldDirty: !0,
|
|
9698
9701
|
shouldValidate: se
|
|
9699
|
-
}),
|
|
9702
|
+
}), M(`${t}-DropdownName`, null);
|
|
9700
9703
|
return;
|
|
9701
9704
|
}
|
|
9702
9705
|
let ee = null;
|
|
9703
|
-
s ? ee = (G == null ? void 0 : G.id) !== null && (G == null ? void 0 : G.id) !== "" ? parseInt(G.id.toString(), 10) : null : ee = G.id === null || G.id === void 0 || G.id === "" ? null : G.id,
|
|
9706
|
+
s ? ee = (G == null ? void 0 : G.id) !== null && (G == null ? void 0 : G.id) !== "" ? parseInt(G.id.toString(), 10) : null : ee = G.id === null || G.id === void 0 || G.id === "" ? null : G.id, M(t, ee, {
|
|
9704
9707
|
shouldDirty: !0,
|
|
9705
9708
|
shouldValidate: se
|
|
9706
|
-
}),
|
|
9707
|
-
}, [
|
|
9709
|
+
}), M(`${t}-DropdownName`, G.name ?? "");
|
|
9710
|
+
}, [M, t, se, s, o, H, w]), L = A((G) => {
|
|
9708
9711
|
oe(!1), fe(G);
|
|
9709
9712
|
}, [fe]), ue = A(() => {
|
|
9710
9713
|
oe(!1);
|
|
@@ -9713,10 +9716,10 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9713
9716
|
Ce();
|
|
9714
9717
|
}, [Ce]), z(() => {
|
|
9715
9718
|
W.isSubmitted && xe(!0);
|
|
9716
|
-
}, [W]), /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsxs(e, { label: n ?? "", required: l, disabled: K, hidden: c, withoutLabel:
|
|
9719
|
+
}, [W]), /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsxs(e, { label: n ?? "", required: l, disabled: K, hidden: c, withoutLabel: h, isInvalid: We, inputContainerClassName: I({ "luminus-dropdown-select-open": ne }), hint: _, className: S, children: [
|
|
9717
9720
|
/* @__PURE__ */ i.jsxs(qa, { currentSelection: ge, selectedItemNavigateTo: f, children: [
|
|
9718
9721
|
y && (ge == null ? void 0 : ge.name) && /* @__PURE__ */ i.jsx(F, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: ge.name }),
|
|
9719
|
-
/* @__PURE__ */ i.jsx(Za, { control: Y, name: t, render: () => /* @__PURE__ */ i.jsx(Ya, { value: H, MiniDetailComponent: T, miniDetailPlacement:
|
|
9722
|
+
/* @__PURE__ */ i.jsx(Za, { control: Y, name: t, render: () => /* @__PURE__ */ i.jsx(Ya, { value: H, MiniDetailComponent: T, miniDetailPlacement: k, children: /* @__PURE__ */ i.jsx(Se.Select, { size: r, onMouseDown: (G) => {
|
|
9720
9723
|
G.currentTarget.focus(), G.preventDefault();
|
|
9721
9724
|
}, onClick: () => {
|
|
9722
9725
|
!Ze && !K && oe(!0);
|
|
@@ -9733,74 +9736,74 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9733
9736
|
] }) : null
|
|
9734
9737
|
] }),
|
|
9735
9738
|
q && /* @__PURE__ */ i.jsx(en, { message: q.message }),
|
|
9736
|
-
_e.current && /* @__PURE__ */ i.jsx(Ka, { show: ne, onCancel: ue, items: d, currentSelection: ge, onSelectionChange:
|
|
9739
|
+
_e.current && /* @__PURE__ */ i.jsx(Ka, { show: ne, onCancel: ue, items: d, currentSelection: ge, onSelectionChange: L, onSearchQueryChange: p, texts: m, itemsNameWidth: g, additionalColumns: v, displayIdAsName: y, isLoading: b, disabled: K, inputRef: _e, archiveColumn: C, addNewOptionPath: E, refreshOptions: O, suggestedItems: j, suggestedItemsTitle: P })
|
|
9737
9740
|
] }) });
|
|
9738
9741
|
}, Oj = ({ InputContainer: e = Pe, label: t, formField: n, hidden: r, required: a, placeholder: o, disabled: s, showClearIcon: l, resetsFields: c, multiple: u, accept: d, withoutLabel: p, hint: f, className: m }) => {
|
|
9739
|
-
const { watch: g, setValue: b, register:
|
|
9742
|
+
const { watch: g, setValue: b, register: h, formState: v } = jt(), x = Nt({ falseIfNotInit: !0 }), [N, y] = B(!1), [w, S] = B(void 0), C = A(() => {
|
|
9740
9743
|
b(n, "");
|
|
9741
9744
|
}, [b, n]), _ = A(() => {
|
|
9742
9745
|
const T = n.split(".");
|
|
9743
|
-
let
|
|
9746
|
+
let k = v.errors;
|
|
9744
9747
|
T.forEach((j) => {
|
|
9745
|
-
|
|
9746
|
-
}),
|
|
9747
|
-
}, [
|
|
9748
|
+
k !== void 0 && (k = k[j]);
|
|
9749
|
+
}), S(k);
|
|
9750
|
+
}, [v, n]);
|
|
9748
9751
|
z(_, [_]), z(() => {
|
|
9749
|
-
|
|
9750
|
-
}, [
|
|
9751
|
-
const
|
|
9752
|
-
return /* @__PURE__ */ i.jsxs(e, { label: t ?? "", required: a, disabled:
|
|
9753
|
-
/* @__PURE__ */ i.jsx(zd, { type: "file", multiple: u, accept: d.join(", "), placeholder: o ?? t, isInvalid: O, hidden: r, disabled:
|
|
9752
|
+
v.isSubmitted && y(!0);
|
|
9753
|
+
}, [v]);
|
|
9754
|
+
const E = R(() => s || x, [s, x]), O = w !== void 0;
|
|
9755
|
+
return /* @__PURE__ */ i.jsxs(e, { label: t ?? "", required: a, disabled: E, hidden: r, withoutLabel: p, isInvalid: O, hint: f, className: m, children: [
|
|
9756
|
+
/* @__PURE__ */ i.jsx(zd, { type: "file", multiple: u, accept: d.join(", "), placeholder: o ?? t, isInvalid: O, hidden: r, disabled: E, className: "w-100", ...h(n, {
|
|
9754
9757
|
onChange: () => {
|
|
9755
9758
|
c && c.forEach((T) => b(T, null, { shouldDirty: !0, shouldValidate: N }));
|
|
9756
9759
|
}
|
|
9757
9760
|
}) }),
|
|
9758
|
-
l && g(n) && /* @__PURE__ */ i.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ i.jsx(te, { color: "secondary", size: "sm", onClick:
|
|
9761
|
+
l && g(n) && /* @__PURE__ */ i.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ i.jsx(te, { color: "secondary", size: "sm", onClick: C, children: /* @__PURE__ */ i.jsx(kt, {}) }) }),
|
|
9759
9762
|
w && /* @__PURE__ */ i.jsx(en, { message: w.message })
|
|
9760
9763
|
] });
|
|
9761
9764
|
}, iw = ({ children: e, onStorno: t, noSpacer: n }) => {
|
|
9762
|
-
const { formState: r } = jt(), a = Nt({ falseIfNotInit: !0 }), [o, s] =
|
|
9765
|
+
const { formState: r } = jt(), a = Nt({ falseIfNotInit: !0 }), [o, s] = B(!1);
|
|
9763
9766
|
return z(() => {
|
|
9764
9767
|
s(Object.keys(r.dirtyFields).length > 0);
|
|
9765
9768
|
}, [r]), o ? /* @__PURE__ */ i.jsx(Hu, { onStorno: t, noSpacer: n, disabled: a, children: e }) : null;
|
|
9766
|
-
}, Va = ({ InputContainer: e = Pe, options: t, formField: n, label: r, size: a, resetsFields: o, isNumber: s, required: l, hidden: c, disabled: u, withoutLabel: d, noSortOptions: p, suffixIdToName: f, onSelect: m, className: g, appendCurrentSelectionWithName: b, hint:
|
|
9767
|
-
const { texts: { customSelect:
|
|
9768
|
-
const
|
|
9769
|
-
let ue =
|
|
9770
|
-
|
|
9769
|
+
}, Va = ({ InputContainer: e = Pe, options: t, formField: n, label: r, size: a, resetsFields: o, isNumber: s, required: l, hidden: c, disabled: u, withoutLabel: d, noSortOptions: p, suffixIdToName: f, onSelect: m, className: g, appendCurrentSelectionWithName: b, hint: h, addNewOptionPath: v, refreshOptions: x, MiniDetailComponent: N, miniDetailPlacement: y, selectedItemNavigateTo: w }) => {
|
|
9770
|
+
const { texts: { customSelect: S } } = V(X), { formState: C, setValue: _, watch: E, control: O } = jt(), T = Nt({ falseIfNotInit: !0 }), [k, j] = B(void 0), [P, W] = B(!1), [M, $] = B(!1), [Y, U] = B(""), q = E(n), Q = R(() => t.find((L) => L.id === q) ?? null, [t, q]), ne = A(() => {
|
|
9771
|
+
const L = n.split(".");
|
|
9772
|
+
let ue = C.errors;
|
|
9773
|
+
L.forEach((_e) => {
|
|
9771
9774
|
ue !== void 0 && (ue = ue[_e]);
|
|
9772
9775
|
}), j(ue);
|
|
9773
|
-
}, [
|
|
9774
|
-
if ((
|
|
9776
|
+
}, [C, n]), oe = A((L) => {
|
|
9777
|
+
if ((L == null ? void 0 : L.id) === q)
|
|
9775
9778
|
return;
|
|
9776
|
-
if (m && m(
|
|
9779
|
+
if (m && m(L), o && o.forEach((_e) => _(_e, null, { shouldDirty: !0, shouldValidate: M })), L === null) {
|
|
9777
9780
|
_(n, null, {
|
|
9778
9781
|
shouldDirty: !0,
|
|
9779
|
-
shouldValidate:
|
|
9782
|
+
shouldValidate: M
|
|
9780
9783
|
});
|
|
9781
9784
|
return;
|
|
9782
9785
|
}
|
|
9783
9786
|
let ue = null;
|
|
9784
|
-
s ? ue = (
|
|
9787
|
+
s ? ue = (L == null ? void 0 : L.id) !== null && (L == null ? void 0 : L.id) !== "" ? parseInt(L.id.toString(), 10) : null : ue = L.id === null || L.id === void 0 || L.id === "" ? null : L.id, _(n, ue, {
|
|
9785
9788
|
shouldDirty: !0,
|
|
9786
|
-
shouldValidate:
|
|
9789
|
+
shouldValidate: M
|
|
9787
9790
|
});
|
|
9788
|
-
}, [_, n, s, o, q,
|
|
9789
|
-
W(!1), oe(
|
|
9790
|
-
}, [oe]), xe = A((
|
|
9791
|
-
U(
|
|
9791
|
+
}, [_, n, s, o, q, M, m]), se = A((L) => {
|
|
9792
|
+
W(!1), oe(L);
|
|
9793
|
+
}, [oe]), xe = A((L) => {
|
|
9794
|
+
U(L);
|
|
9792
9795
|
}, []), H = R(() => u || T, [u, T]);
|
|
9793
9796
|
z(() => {
|
|
9794
9797
|
ne();
|
|
9795
9798
|
}, [ne]), z(() => {
|
|
9796
|
-
|
|
9797
|
-
}, [
|
|
9798
|
-
const ae = A((
|
|
9799
|
+
C.isSubmitted && $(!0);
|
|
9800
|
+
}, [C]);
|
|
9801
|
+
const ae = A((L) => {
|
|
9799
9802
|
var ue;
|
|
9800
|
-
return
|
|
9803
|
+
return L === null ? "" : !L.name || L.name.length === 0 ? ((ue = L.id) == null ? void 0 : ue.toString()) ?? "" : f ? `${L.name} (${L.id})` : L.name;
|
|
9801
9804
|
}, [f]), ge = R(() => {
|
|
9802
|
-
const
|
|
9803
|
-
return b !== void 0 && q && (
|
|
9805
|
+
const L = t ? [...t] : [];
|
|
9806
|
+
return b !== void 0 && q && (L.some((ue) => ue.id === q) || L.push({ id: q, name: b })), L.map((ue) => ({
|
|
9804
9807
|
id: ue.id,
|
|
9805
9808
|
name: ae(ue)
|
|
9806
9809
|
})).filter((ue) => qe(ue.name, Y)).sort((ue, _e) => p ? 0 : (ue.name ?? "").localeCompare(_e.name ?? ""));
|
|
@@ -9811,94 +9814,94 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9811
9814
|
ae,
|
|
9812
9815
|
b,
|
|
9813
9816
|
q
|
|
9814
|
-
]), Ce = Z(null), fe =
|
|
9815
|
-
return /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsxs(e, { label: r ?? "", required: l, disabled: H, hidden: c, withoutLabel: d, isInvalid: fe, inputContainerClassName: I({ "luminus-dropdown-select-open": P }), hint:
|
|
9816
|
-
/* @__PURE__ */ i.jsx(qa, { currentSelection: Q, selectedItemNavigateTo: w, children: /* @__PURE__ */ i.jsx(Za, { control: O, name: n, render: () => /* @__PURE__ */ i.jsx(Ya, { value: q, MiniDetailComponent: N, miniDetailPlacement: y, children: /* @__PURE__ */ i.jsx(Se.Select, { size: a, onMouseDown: (
|
|
9817
|
-
|
|
9817
|
+
]), Ce = Z(null), fe = k !== void 0;
|
|
9818
|
+
return /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsxs(e, { label: r ?? "", required: l, disabled: H, hidden: c, withoutLabel: d, isInvalid: fe, inputContainerClassName: I({ "luminus-dropdown-select-open": P }), hint: h, className: g, children: [
|
|
9819
|
+
/* @__PURE__ */ i.jsx(qa, { currentSelection: Q, selectedItemNavigateTo: w, children: /* @__PURE__ */ i.jsx(Za, { control: O, name: n, render: () => /* @__PURE__ */ i.jsx(Ya, { value: q, MiniDetailComponent: N, miniDetailPlacement: y, children: /* @__PURE__ */ i.jsx(Se.Select, { size: a, onMouseDown: (L) => {
|
|
9820
|
+
L.currentTarget.focus(), L.preventDefault();
|
|
9818
9821
|
}, onClick: () => {
|
|
9819
9822
|
W(!0);
|
|
9820
9823
|
}, ref: Ce, value: q ?? "", onChange: () => {
|
|
9821
9824
|
}, isInvalid: fe, hidden: c, disabled: H, className: "w-100", children: /* @__PURE__ */ i.jsx("option", { value: (Q == null ? void 0 : Q.id) ?? "", children: ae(Q) }) }) }) }) }),
|
|
9822
|
-
|
|
9823
|
-
Ce.current && /* @__PURE__ */ i.jsx(Ka, { show: P, onCancel: () => W(!1), items: ge, currentSelection: Q ?? null, onSelectionChange: se, onSearchQueryChange: xe, texts:
|
|
9825
|
+
k && /* @__PURE__ */ i.jsx(en, { message: k.message }),
|
|
9826
|
+
Ce.current && /* @__PURE__ */ i.jsx(Ka, { show: P, onCancel: () => W(!1), items: ge, currentSelection: Q ?? null, onSelectionChange: se, onSearchQueryChange: xe, texts: S, disabled: H, inputRef: Ce, autoHideSearch: !0, allItemsLength: t.length, addNewOptionPath: v, refreshOptions: x })
|
|
9824
9827
|
] }) });
|
|
9825
|
-
}, Pj = ({ InputContainer: e = Pe, formField: t, label: n, placeholder: r, size: a, resetsFields: o, showClearIcon: s, clearValue: l, required: c, hidden: u, disabled: d, withoutLabel: p, step: f, stepperStep: m = 1, className: g, min: b, max:
|
|
9826
|
-
const { register: N, formState: y, setValue: w, watch:
|
|
9827
|
-
w(Y, Rn(U, b,
|
|
9828
|
-
}, [
|
|
9828
|
+
}, Pj = ({ InputContainer: e = Pe, formField: t, label: n, placeholder: r, size: a, resetsFields: o, showClearIcon: s, clearValue: l, required: c, hidden: u, disabled: d, withoutLabel: p, step: f, stepperStep: m = 1, className: g, min: b, max: h, onChange: v, hint: x }) => {
|
|
9829
|
+
const { register: N, formState: y, setValue: w, watch: S } = jt(), C = Nt({ falseIfNotInit: !0 }), [_, E] = B(void 0), [O, T] = B(!1), k = A((Y, U, q) => {
|
|
9830
|
+
w(Y, Rn(U, b, h), q);
|
|
9831
|
+
}, [h, b, w]), j = A(() => {
|
|
9829
9832
|
const Y = l ?? null;
|
|
9830
|
-
|
|
9833
|
+
k(t, Y !== null ? Number(Y) : null, {
|
|
9831
9834
|
shouldDirty: !0,
|
|
9832
9835
|
shouldValidate: O
|
|
9833
9836
|
});
|
|
9834
|
-
}, [l,
|
|
9837
|
+
}, [l, k, t, O]), P = A(() => {
|
|
9835
9838
|
const Y = t.split(".");
|
|
9836
9839
|
let U = y.errors;
|
|
9837
9840
|
Y.forEach((q) => {
|
|
9838
9841
|
U !== void 0 && (U = U[q]);
|
|
9839
|
-
}),
|
|
9840
|
-
}, [y, t]), W = R(() => d ||
|
|
9842
|
+
}), E(U);
|
|
9843
|
+
}, [y, t]), W = R(() => d || C, [d, C]);
|
|
9841
9844
|
z(() => {
|
|
9842
9845
|
P();
|
|
9843
9846
|
}, [P]), z(() => {
|
|
9844
9847
|
y.isSubmitted && T(!0);
|
|
9845
9848
|
}, [y]);
|
|
9846
|
-
const
|
|
9847
|
-
return /* @__PURE__ */ i.jsxs(e, { label: n ?? "", required: c, disabled: W, hidden: u, withoutLabel: p, isInvalid:
|
|
9849
|
+
const M = _ !== void 0, $ = S(t);
|
|
9850
|
+
return /* @__PURE__ */ i.jsxs(e, { label: n ?? "", required: c, disabled: W, hidden: u, withoutLabel: p, isInvalid: M, hint: x, className: g, children: [
|
|
9848
9851
|
/* @__PURE__ */ i.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
9849
9852
|
/* @__PURE__ */ i.jsx(Se.Control, { type: "number", placeholder: r ?? n, size: a, ...N(t, {
|
|
9850
|
-
setValueAs: (Y) => Y == null || Y === "" ? null : Rn(Number(Y), b,
|
|
9853
|
+
setValueAs: (Y) => Y == null || Y === "" ? null : Rn(Number(Y), b, h),
|
|
9851
9854
|
min: b,
|
|
9852
|
-
max:
|
|
9855
|
+
max: h,
|
|
9853
9856
|
onChange: (Y) => {
|
|
9854
9857
|
var U;
|
|
9855
|
-
o && o.forEach((q) => w(q, null, { shouldDirty: !0, shouldValidate: O })),
|
|
9858
|
+
o && o.forEach((q) => w(q, null, { shouldDirty: !0, shouldValidate: O })), v && v((U = Y.target) != null && U.value ? Number(Y.target.value) ?? null : null);
|
|
9856
9859
|
}
|
|
9857
|
-
}), isInvalid:
|
|
9860
|
+
}), isInvalid: M, hidden: u, disabled: W, className: "w-100 luminus-numeric-stepper", step: f, min: b, max: h }),
|
|
9858
9861
|
/* @__PURE__ */ i.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ i.jsx(te, { size: "sm", onClick: (Y) => {
|
|
9859
|
-
Y.preventDefault(), Y.stopPropagation(),
|
|
9862
|
+
Y.preventDefault(), Y.stopPropagation(), k(t, (($ ? Number($) : 0) - m).toString(), { shouldDirty: !0, shouldValidate: O });
|
|
9860
9863
|
}, children: /* @__PURE__ */ i.jsx(Vs, {}) }) }),
|
|
9861
9864
|
/* @__PURE__ */ i.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ i.jsx(te, { size: "sm", onClick: (Y) => {
|
|
9862
|
-
Y.preventDefault(), Y.stopPropagation(),
|
|
9865
|
+
Y.preventDefault(), Y.stopPropagation(), k(t, (($ ? Number($) : 0) + m).toString(), { shouldDirty: !0, shouldValidate: O });
|
|
9863
9866
|
}, children: /* @__PURE__ */ i.jsx($s, {}) }) })
|
|
9864
9867
|
] }),
|
|
9865
|
-
s &&
|
|
9868
|
+
s && S(t) && /* @__PURE__ */ i.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ i.jsx(te, { color: "secondary", size: "sm", onClick: j, children: /* @__PURE__ */ i.jsx(kt, {}) }) }),
|
|
9866
9869
|
_ && /* @__PURE__ */ i.jsx(en, { message: _.message })
|
|
9867
9870
|
] });
|
|
9868
|
-
}, Aj = ({ InputContainer: e = Pe, formField: t, label: n, placeholder: r, resetsFields: a, showClearIcon: o, clearValue: s, required: l, hidden: c, disabled: u, withoutLabel: d, step: p, size: f, CustomOnChangeComponent: m, noSelectOnFocus: g, className: b, decimalScale:
|
|
9869
|
-
const { formState: _, setValue:
|
|
9871
|
+
}, Aj = ({ InputContainer: e = Pe, formField: t, label: n, placeholder: r, resetsFields: a, showClearIcon: o, clearValue: s, required: l, hidden: c, disabled: u, withoutLabel: d, step: p, size: f, CustomOnChangeComponent: m, noSelectOnFocus: g, className: b, decimalScale: h = 2, fixedDecimalScale: v = !1, numberPrefix: x, numberSuffix: N, min: y, max: w, onChange: S, hint: C }) => {
|
|
9872
|
+
const { formState: _, setValue: E, watch: O, control: T } = jt(), k = Nt({ falseIfNotInit: !0 }), [j, P] = B(void 0), [W, M] = B(!1), $ = A(() => {
|
|
9870
9873
|
const ne = s ?? null;
|
|
9871
|
-
|
|
9874
|
+
E(t, ne !== null ? Number(ne) : null, {
|
|
9872
9875
|
shouldDirty: !0,
|
|
9873
9876
|
shouldValidate: W
|
|
9874
9877
|
});
|
|
9875
|
-
}, [s,
|
|
9878
|
+
}, [s, E, t, W]), Y = A(() => {
|
|
9876
9879
|
const ne = t.split(".");
|
|
9877
9880
|
let oe = _.errors;
|
|
9878
9881
|
ne.forEach((se) => {
|
|
9879
9882
|
oe !== void 0 && (oe = oe[se]);
|
|
9880
9883
|
}), P(oe);
|
|
9881
|
-
}, [_, t]), U = R(() => u ||
|
|
9884
|
+
}, [_, t]), U = R(() => u || k, [u, k]);
|
|
9882
9885
|
z(() => {
|
|
9883
9886
|
Y();
|
|
9884
9887
|
}, [Y]), z(() => {
|
|
9885
|
-
_.isSubmitted &&
|
|
9888
|
+
_.isSubmitted && M(!0);
|
|
9886
9889
|
}, [_]);
|
|
9887
9890
|
const q = O(t);
|
|
9888
9891
|
z(() => {
|
|
9889
|
-
w !== void 0 && q > w &&
|
|
9890
|
-
}, [t, q, w, y,
|
|
9892
|
+
w !== void 0 && q > w && E(t, w), y !== void 0 && q < y && E(t, y);
|
|
9893
|
+
}, [t, q, w, y, E]);
|
|
9891
9894
|
const Q = j !== void 0;
|
|
9892
|
-
return /* @__PURE__ */ i.jsxs(e, { label: n ?? "", required: l, disabled: U, hidden: c, withoutLabel: d, isInvalid: Q, hint:
|
|
9895
|
+
return /* @__PURE__ */ i.jsxs(e, { label: n ?? "", required: l, disabled: U, hidden: c, withoutLabel: d, isInvalid: Q, hint: C, className: b, children: [
|
|
9893
9896
|
/* @__PURE__ */ i.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
9894
|
-
/* @__PURE__ */ i.jsx(Za, { control: T, name: t, render: ({ field: { ref: ne, onChange: oe, name: se, value: xe } }) => /* @__PURE__ */ i.jsx(Ri, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale:
|
|
9897
|
+
/* @__PURE__ */ i.jsx(Za, { control: T, name: t, render: ({ field: { ref: ne, onChange: oe, name: se, value: xe } }) => /* @__PURE__ */ i.jsx(Ri, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: h, fixedDecimalScale: v, prefix: x, suffix: N, defaultValue: "", name: se, value: xe ?? "", placeholder: r ?? n, onFocus: (H) => {
|
|
9895
9898
|
!g && H.target.select();
|
|
9896
9899
|
}, onChange: (H) => {
|
|
9897
9900
|
var Ce, fe;
|
|
9898
9901
|
const ae = parseFloat(((fe = (Ce = H.target) == null ? void 0 : Ce.value) == null ? void 0 : fe.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
|
|
9899
|
-
a && a.forEach((
|
|
9902
|
+
a && a.forEach((L) => E(L, null, { shouldDirty: !0, shouldValidate: W }));
|
|
9900
9903
|
const ge = ae == null || Number.isNaN(ae) ? null : Number(ae);
|
|
9901
|
-
oe(ge),
|
|
9904
|
+
oe(ge), S && S(ge);
|
|
9902
9905
|
}, hidden: c, disabled: U, className: I("form-control text-end w-100", {
|
|
9903
9906
|
"is-invalid": Q
|
|
9904
9907
|
}, {
|
|
@@ -9935,12 +9938,12 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9935
9938
|
]), g = Lr({
|
|
9936
9939
|
resolver: kr(f),
|
|
9937
9940
|
defaultValues: m
|
|
9938
|
-
}), b = A(async (
|
|
9941
|
+
}), b = A(async (h) => {
|
|
9939
9942
|
a("premissions-substitute-submit");
|
|
9940
9943
|
try {
|
|
9941
|
-
await n.post("permissions/substitutions",
|
|
9942
|
-
} catch (
|
|
9943
|
-
Qa(g,
|
|
9944
|
+
await n.post("permissions/substitutions", h), c(p.updateSuccess, "success"), u(), r(t);
|
|
9945
|
+
} catch (v) {
|
|
9946
|
+
Qa(g, v);
|
|
9944
9947
|
} finally {
|
|
9945
9948
|
o("premissions-substitute-submit");
|
|
9946
9949
|
}
|
|
@@ -9964,11 +9967,11 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9964
9967
|
enabled: t !== void 0
|
|
9965
9968
|
}), { data: c } = Me("/permissions/users"), { onSubmit: u, formMethods: d } = ow(l, e), p = d.watch("employeeId"), { data: f } = Me(`/permissions/roles?userName=${(y = c == null ? void 0 : c.find((w) => w.employeeId === p)) == null ? void 0 : y.name}`, { enabled: p > 0 && !!c }), { refreshAvailableDelegations: m } = V(Hs), { checkUserHasPermissions: g } = Ws(), b = A(async () => {
|
|
9966
9969
|
await o(s.deleteConfirm) && (await r.delete(`/permissions/substitutions/${t}`), m(), a(e));
|
|
9967
|
-
}, [r, o, t, a, m, s, e]),
|
|
9970
|
+
}, [r, o, t, a, m, s, e]), h = R(() => p !== (n == null ? void 0 : n.personalNumber) && !g(["ZASTUP_MODIFY"]), [g, p, n == null ? void 0 : n.personalNumber]), v = d.watch("roles"), x = R(() => f == null ? void 0 : f.filter((w) => w.canBeRepresented), [f]), N = R(() => (x == null ? void 0 : x.every((w) => v == null ? void 0 : v.includes(w.name))) ?? !1, [x, v]);
|
|
9968
9971
|
return /* @__PURE__ */ i.jsx(Tt, { title: /* @__PURE__ */ i.jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [
|
|
9969
9972
|
/* @__PURE__ */ i.jsx(F, { variant: "h3", children: s.title }),
|
|
9970
9973
|
/* @__PURE__ */ i.jsx(Lt, { toggle: /* @__PURE__ */ i.jsx(Mt, { as: Zt }), children: /* @__PURE__ */ i.jsx(Ye, { onClick: () => b(), children: s.delete }) })
|
|
9971
|
-
] }), children: /* @__PURE__ */ i.jsx(Mr, { ...d, children: /* @__PURE__ */ i.jsx(pu, { disabled:
|
|
9974
|
+
] }), children: /* @__PURE__ */ i.jsx(Mr, { ...d, children: /* @__PURE__ */ i.jsx(pu, { disabled: h, children: /* @__PURE__ */ i.jsxs(Se, { onSubmit: d.handleSubmit(u), className: "h-100", children: [
|
|
9972
9975
|
/* @__PURE__ */ i.jsxs(ri, { className: "h-100 gx-3 gy-3", children: [
|
|
9973
9976
|
/* @__PURE__ */ i.jsx(Dr, { sm: 12, md: 4, children: /* @__PURE__ */ i.jsxs(Xt, { title: s.title, children: [
|
|
9974
9977
|
/* @__PURE__ */ i.jsx(Va, { formField: "employeeId", options: (c == null ? void 0 : c.map((w) => ({
|
|
@@ -9982,13 +9985,13 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9982
9985
|
/* @__PURE__ */ i.jsx(fn, { formField: "from", label: s.from, type: "date", required: !0 }),
|
|
9983
9986
|
/* @__PURE__ */ i.jsx(fn, { formField: "to", label: s.to, type: "date", required: !0 })
|
|
9984
9987
|
] }) }),
|
|
9985
|
-
/* @__PURE__ */ i.jsx(Dr, { sm: 12, md: 4, children: /* @__PURE__ */ i.jsxs(Xt, { title: s.roles(`${(
|
|
9986
|
-
|
|
9988
|
+
/* @__PURE__ */ i.jsx(Dr, { sm: 12, md: 4, children: /* @__PURE__ */ i.jsxs(Xt, { title: s.roles(`${(v == null ? void 0 : v.length) ?? 0}/${(x == null ? void 0 : x.length) ?? 0}`), className: "h-max-100", contentClassName: "d-flex flex-column overflow-hidden", children: [
|
|
9989
|
+
h ? null : /* @__PURE__ */ i.jsx("div", { className: "bg-darker", style: {
|
|
9987
9990
|
marginLeft: "-12px",
|
|
9988
9991
|
marginRight: "-12px",
|
|
9989
9992
|
marginTop: "-12px",
|
|
9990
9993
|
padding: "0px 12px"
|
|
9991
|
-
}, children: /* @__PURE__ */ i.jsx(Kn, { label: N ? s.uncheckAllRoles : s.checkAllRoles, indeterminate: !N && (
|
|
9994
|
+
}, children: /* @__PURE__ */ i.jsx(Kn, { label: N ? s.uncheckAllRoles : s.checkAllRoles, indeterminate: !N && (v == null ? void 0 : v.length) > 0, value: N, disabled: h, onChange: () => {
|
|
9992
9995
|
d.setValue("roles", N ? [] : (x == null ? void 0 : x.map((w) => w.name)) ?? [], { shouldDirty: !0 });
|
|
9993
9996
|
}, InputContainer: Pe }) }),
|
|
9994
9997
|
/* @__PURE__ */ i.jsx("div", { className: "overflow-auto", style: {
|
|
@@ -9996,8 +9999,8 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
9996
9999
|
marginLeft: "-12px",
|
|
9997
10000
|
marginRight: "-12px",
|
|
9998
10001
|
padding: "0px 12px"
|
|
9999
|
-
}, children: f == null ? void 0 : f.map((w) => /* @__PURE__ */ i.jsx(Kn, { label: w.name, value: (
|
|
10000
|
-
d.setValue("roles",
|
|
10002
|
+
}, children: f == null ? void 0 : f.map((w) => /* @__PURE__ */ i.jsx(Kn, { label: w.name, value: (v == null ? void 0 : v.find((S) => S === w.name)) !== void 0, disabled: h || !w.canBeRepresented, onChange: (S) => {
|
|
10003
|
+
d.setValue("roles", S ? [...v ?? [], w.name] : (v == null ? void 0 : v.filter((C) => C !== w.name)) ?? [], { shouldDirty: !0 });
|
|
10001
10004
|
}, InputContainer: Pe }, w.name)) })
|
|
10002
10005
|
] }) })
|
|
10003
10006
|
] }),
|
|
@@ -10065,43 +10068,43 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
10065
10068
|
), u = A(async () => e != null && e.id ? (o("approvalDelegationDelete"), a.delete(r(e.id)).then(() => !0).catch(() => !1).finally(() => s("approvalDelegationDelete"))) : !1, [a, e, o, s, r]);
|
|
10066
10069
|
return { getHasRunningProcesses: l, postEditDelegation: c, postDeleteDelegation: u };
|
|
10067
10070
|
}, cw = ({ model: e, handleClose: t, onConfirm: n, apiApprovalDefinitions: r, apiHasRunningProcess: a, apiPostEditDelegation: o, apiDeleteDelegation: s, EmployeePickerComponent: l }) => {
|
|
10068
|
-
var
|
|
10069
|
-
const { ProjectIconComponent: c, texts: { approval: u } } = V(X), { zDate: d, zObjectIdIntRequired: p, zDateRequired: f } = Rr(), { addNotification: m } = Jt(), { confirm: g } = wt(), { data: b } = Me(r),
|
|
10071
|
+
var C, _;
|
|
10072
|
+
const { ProjectIconComponent: c, texts: { approval: u } } = V(X), { zDate: d, zObjectIdIntRequired: p, zDateRequired: f } = Rr(), { addNotification: m } = Jt(), { confirm: g } = wt(), { data: b } = Me(r), h = cn.object({
|
|
10070
10073
|
employee: p(),
|
|
10071
10074
|
delegate: p(),
|
|
10072
10075
|
dateFrom: f(),
|
|
10073
10076
|
dateTo: d(),
|
|
10074
10077
|
approval: p()
|
|
10075
|
-
}),
|
|
10078
|
+
}), v = Lr({ resolver: kr(h) }), { getHasRunningProcesses: x, postEditDelegation: N, postDeleteDelegation: y } = lw(e, a, o, s);
|
|
10076
10079
|
z(() => {
|
|
10077
|
-
var
|
|
10078
|
-
e && (
|
|
10080
|
+
var E, O, T, k, j, P;
|
|
10081
|
+
e && (v.reset({
|
|
10079
10082
|
...e,
|
|
10080
|
-
employee: { id: ((
|
|
10083
|
+
employee: { id: ((E = e.employee) == null ? void 0 : E.id) ?? 0 },
|
|
10081
10084
|
delegate: { id: ((O = e.delegate) == null ? void 0 : O.id) ?? 0 },
|
|
10082
10085
|
dateFrom: e.dateFrom ?? "",
|
|
10083
10086
|
approval: { id: ((T = e.approval) == null ? void 0 : T.id) ?? 0 }
|
|
10084
|
-
}, { keepDirty: !1 }), (
|
|
10085
|
-
}, [e,
|
|
10086
|
-
const w = async (
|
|
10087
|
+
}, { keepDirty: !1 }), (k = e.employee) != null && k.id || xr(v, "employee.id"), (j = e.delegate) != null && j.id || xr(v, "delegate.id"), (P = e.approval) != null && P.id || xr(v, "approval.id"));
|
|
10088
|
+
}, [e, v]);
|
|
10089
|
+
const w = async (E) => {
|
|
10087
10090
|
if (!e)
|
|
10088
10091
|
return;
|
|
10089
10092
|
const O = { ...e };
|
|
10090
|
-
Object.assign(O,
|
|
10093
|
+
Object.assign(O, E), Yd(O);
|
|
10091
10094
|
const T = await x(O.employee.id, O.approval.id);
|
|
10092
|
-
O.includeExisting = T && !!await g(u.delegations.delegateExistingsConfirmMessage), await N(O,
|
|
10093
|
-
},
|
|
10095
|
+
O.includeExisting = T && !!await g(u.delegations.delegateExistingsConfirmMessage), await N(O, v) && (m(e.id ? u.delegations.editSuccess : u.delegations.createSuccess, "success"), n());
|
|
10096
|
+
}, S = A(async () => {
|
|
10094
10097
|
await g(u.delegations.deleteConfirm) && await y() && (m(u.delegations.deleteSuccess, "success"), n());
|
|
10095
10098
|
}, [g, u, y, m, n]);
|
|
10096
10099
|
return /* @__PURE__ */ i.jsxs(de, { show: e !== null, onHide: () => t(), children: [
|
|
10097
10100
|
/* @__PURE__ */ i.jsxs(de.Header, { closeButton: !0, children: [
|
|
10098
10101
|
/* @__PURE__ */ i.jsx(de.Title, { className: "w-100", children: e != null && e.id ? u.delegations.detailTitle : u.delegations.newTitle }),
|
|
10099
|
-
e != null && e.id ? /* @__PURE__ */ i.jsx(Lt, { toggle: /* @__PURE__ */ i.jsx(Mt, { as: Zt }), className: "modalHeaderDropdown", children: /* @__PURE__ */ i.jsx(Ye, { color: "danger", icon: /* @__PURE__ */ i.jsx(c, { icon: "delete" }), onClick:
|
|
10102
|
+
e != null && e.id ? /* @__PURE__ */ i.jsx(Lt, { toggle: /* @__PURE__ */ i.jsx(Mt, { as: Zt }), className: "modalHeaderDropdown", children: /* @__PURE__ */ i.jsx(Ye, { color: "danger", icon: /* @__PURE__ */ i.jsx(c, { icon: "delete" }), onClick: S, children: u.delegations.delete }) }) : null
|
|
10100
10103
|
] }),
|
|
10101
|
-
/* @__PURE__ */ i.jsx(Mr, { ...
|
|
10104
|
+
/* @__PURE__ */ i.jsx(Mr, { ...v, children: /* @__PURE__ */ i.jsxs(Se, { onSubmit: v.handleSubmit(w), noValidate: !0, children: [
|
|
10102
10105
|
/* @__PURE__ */ i.jsxs(de.Body, { children: [
|
|
10103
10106
|
/* @__PURE__ */ i.jsx(Va, { label: u.delegations.detail.approval, isNumber: !0, formField: "approval.id", options: b ?? [], required: !0 }),
|
|
10104
|
-
/* @__PURE__ */ i.jsx(l, { label: u.delegations.detail.employee, formField: "employee.id", defaultSelection: (
|
|
10107
|
+
/* @__PURE__ */ i.jsx(l, { label: u.delegations.detail.employee, formField: "employee.id", defaultSelection: (C = e == null ? void 0 : e.employee) != null && C.id ? { id: e.employee.id, name: e.employee.name } : null, required: !0 }),
|
|
10105
10108
|
/* @__PURE__ */ i.jsx(l, { label: u.delegations.detail.delegate, formField: "delegate.id", defaultSelection: (_ = e == null ? void 0 : e.delegate) != null && _.id ? { id: e.delegate.id, name: e.delegate.name } : null, required: !0 }),
|
|
10106
10109
|
/* @__PURE__ */ i.jsx(fn, { label: u.delegations.detail.dateFrom, formField: "dateFrom", type: "date", required: !0 }),
|
|
10107
10110
|
/* @__PURE__ */ i.jsx(fn, { label: u.delegations.detail.dateTo, formField: "dateTo", type: "date" })
|
|
@@ -10116,7 +10119,7 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
10116
10119
|
apiDeleteDelegation: (e) => `/approval/delegation/${e}`,
|
|
10117
10120
|
apiApprovalDefinitions: "/approval/definition"
|
|
10118
10121
|
}, Rj = ({ apiUrls: { apiApprovalDelegations: e = sn.apiApprovalDelegations, apiHasRunningProcess: t = sn.apiHasRunningProcess, apiPostEditDelegation: n = sn.apiPostEditDelegation, apiDeleteDelegation: r = sn.apiDeleteDelegation, apiApprovalDefinitions: a = sn.apiApprovalDefinitions } = sn, BnfTableComponent: o, tableIdentifier: s, EmployeePickerComponent: l }) => {
|
|
10119
|
-
const { texts: { approval: c } } = V(X), [u, d] = Jn("archive", !1), [p, f] =
|
|
10122
|
+
const { texts: { approval: c } } = V(X), [u, d] = Jn("archive", !1), [p, f] = B(null), { data: m, reloadData: g } = Me(`${e}?archive=${u}`);
|
|
10120
10123
|
return /* @__PURE__ */ i.jsxs(Tt, { variant: "fullScreen", title: /* @__PURE__ */ i.jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [
|
|
10121
10124
|
/* @__PURE__ */ i.jsx(F, { variant: "h3", children: c.delegations.title }),
|
|
10122
10125
|
/* @__PURE__ */ i.jsxs(Lt, { toggle: /* @__PURE__ */ i.jsx(Mt, { as: Zt }), children: [
|
|
@@ -10147,22 +10150,22 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
10147
10150
|
z(() => {
|
|
10148
10151
|
e && (g.reset({ employeeId: r == null ? void 0 : r.id }), !(r != null && r.id) && xr(g, "employeeId"));
|
|
10149
10152
|
}, [e, r, g]);
|
|
10150
|
-
const b = A(async (
|
|
10153
|
+
const b = A(async (v) => (d("approvalChangeEmployee"), u.post(o, {
|
|
10151
10154
|
id: a,
|
|
10152
|
-
employeeId:
|
|
10153
|
-
}).then(() => !0).catch((x) => (Qa(g, x), !1)).finally(() => p("approvalChangeEmployee"))), [u, a, g, d, p, o]),
|
|
10154
|
-
await b(
|
|
10155
|
+
employeeId: v
|
|
10156
|
+
}).then(() => !0).catch((x) => (Qa(g, x), !1)).finally(() => p("approvalChangeEmployee"))), [u, a, g, d, p, o]), h = async (v) => {
|
|
10157
|
+
await b(v.employeeId) && (f(l.definitions.changeEmployeeSuccess, "success"), n());
|
|
10155
10158
|
};
|
|
10156
10159
|
return /* @__PURE__ */ i.jsxs(de, { show: e, onHide: () => t(), children: [
|
|
10157
10160
|
/* @__PURE__ */ i.jsx(de.Header, { closeButton: !0, children: /* @__PURE__ */ i.jsx(de.Title, { children: l.definitions.changeEmployeeTitle }) }),
|
|
10158
|
-
/* @__PURE__ */ i.jsx(Mr, { ...g, children: /* @__PURE__ */ i.jsxs(Se, { onSubmit: g.handleSubmit(
|
|
10161
|
+
/* @__PURE__ */ i.jsx(Mr, { ...g, children: /* @__PURE__ */ i.jsxs(Se, { onSubmit: g.handleSubmit(h), noValidate: !0, children: [
|
|
10159
10162
|
/* @__PURE__ */ i.jsx(de.Body, { children: /* @__PURE__ */ i.jsx(s, { formField: "employeeId", defaultSelection: r, label: l.definitions.changeEmployeeNewEmployee, required: !0 }) }),
|
|
10160
10163
|
/* @__PURE__ */ i.jsx(de.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ i.jsx(vt, { type: "submit", children: l.definitions.changeEmployeeConfirm }) })
|
|
10161
10164
|
] }) })
|
|
10162
10165
|
] });
|
|
10163
10166
|
}, uw = ({ level: e, reloadApproval: t, appEmployeeDetail: n, apiPostChangeEmployee: r, EmployeePickerComponent: a }) => {
|
|
10164
10167
|
var u;
|
|
10165
|
-
const { ProjectIconComponent: o, texts: { approval: s } } = V(X), [l, c] =
|
|
10168
|
+
const { ProjectIconComponent: o, texts: { approval: s } } = V(X), [l, c] = B(null);
|
|
10166
10169
|
return /* @__PURE__ */ i.jsxs("div", { className: "bg-white rounded p-2 px-3 d-flex flex-column gap-2 shadow-sm", children: [
|
|
10167
10170
|
/* @__PURE__ */ i.jsxs("div", { className: "d-flex align-items-center justify-content-between", children: [
|
|
10168
10171
|
/* @__PURE__ */ i.jsx(F, { variant: "body", children: s.definitions.nthLevel(e.index + 1) }),
|
|
@@ -10288,7 +10291,7 @@ const ey = ({ InputContainer: e = bn, value: t, onChange: n, debounceMs: r, labe
|
|
|
10288
10291
|
}), t;
|
|
10289
10292
|
}, vw = (e) => e && e.type === "header" && e.member && e.member.caption !== "All" && // collapsed groups have this in continuing cells
|
|
10290
10293
|
e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns = (e) => !e.member && !e.isDrillThrough, js = (e, t) => typeof e == "function" ? e(t) : e.replace(":id", t), hw = ({ dataSource: e, settings: t, pivotRef: n, localization: r, licenseKey: a, hyperlinkColumn: o, roomPasportization: s, enabled: l = !0 }) => {
|
|
10291
|
-
const { texts: { reports: c } } = V(X), [u, d] =
|
|
10294
|
+
const { texts: { reports: c } } = V(X), [u, d] = B(!1), p = Z(null), f = n ?? p, m = R(() => ({
|
|
10292
10295
|
localization: r
|
|
10293
10296
|
}), [r]), g = A((y) => {
|
|
10294
10297
|
delete y[0], delete y[1], delete y[2];
|
|
@@ -10316,57 +10319,57 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10316
10319
|
}, [f, c.collapseAll, c.expand, c.expandAll]), b = (y) => {
|
|
10317
10320
|
const w = y.getTabs();
|
|
10318
10321
|
y.getTabs = () => g(w);
|
|
10319
|
-
},
|
|
10320
|
-
var w,
|
|
10322
|
+
}, h = R(() => e && e.mapping ? Object.values(e.mapping).filter((y) => y.caption.includes("P:")).map((y) => ({ uniqueName: y.caption.replace("P:", ""), caption: y.caption })) : [], [e]), v = R(() => {
|
|
10323
|
+
var w, S, C, _;
|
|
10321
10324
|
const y = (w = f.current) == null ? void 0 : w.flexmonster.getReport();
|
|
10322
10325
|
return y && y.slice ? {
|
|
10323
10326
|
...y.slice,
|
|
10324
10327
|
rows: [
|
|
10325
|
-
...((
|
|
10328
|
+
...((S = y.slice.rows) == null ? void 0 : S.filter((E) => {
|
|
10326
10329
|
var O;
|
|
10327
|
-
return !((O =
|
|
10330
|
+
return !((O = E.caption) != null && O.includes("P:"));
|
|
10328
10331
|
})) ?? [],
|
|
10329
|
-
...
|
|
10332
|
+
...h
|
|
10330
10333
|
],
|
|
10331
10334
|
columns: [
|
|
10332
|
-
...((
|
|
10335
|
+
...((C = y.slice.columns) == null ? void 0 : C.filter((E) => {
|
|
10333
10336
|
var O;
|
|
10334
|
-
return !((O =
|
|
10337
|
+
return !((O = E.caption) != null && O.includes("P:"));
|
|
10335
10338
|
})) ?? [],
|
|
10336
|
-
...
|
|
10339
|
+
...h
|
|
10337
10340
|
],
|
|
10338
10341
|
measures: [
|
|
10339
|
-
...((_ = y.slice.measures) == null ? void 0 : _.filter((
|
|
10342
|
+
...((_ = y.slice.measures) == null ? void 0 : _.filter((E) => {
|
|
10340
10343
|
var O;
|
|
10341
|
-
return !((O =
|
|
10344
|
+
return !((O = E.caption) != null && O.includes("P:"));
|
|
10342
10345
|
})) ?? [],
|
|
10343
|
-
...
|
|
10346
|
+
...h
|
|
10344
10347
|
]
|
|
10345
10348
|
} : null;
|
|
10346
|
-
}, [
|
|
10349
|
+
}, [h, f]);
|
|
10347
10350
|
z(() => {
|
|
10348
|
-
var y, w,
|
|
10351
|
+
var y, w, S, C;
|
|
10349
10352
|
if (u && l) {
|
|
10350
|
-
if (s &&
|
|
10351
|
-
const _ = (y = f.current) == null ? void 0 : y.flexmonster.getReport(),
|
|
10353
|
+
if (s && v) {
|
|
10354
|
+
const _ = (y = f.current) == null ? void 0 : y.flexmonster.getReport(), E = _ && _.options ? {
|
|
10352
10355
|
..._.options,
|
|
10353
10356
|
grid: { ...(w = _.options) == null ? void 0 : w.grid, autoSwitchToCompact: !1 }
|
|
10354
10357
|
} : {};
|
|
10355
|
-
(
|
|
10358
|
+
(S = f.current) == null || S.flexmonster.setReport({
|
|
10356
10359
|
..._,
|
|
10357
10360
|
dataSource: e,
|
|
10358
|
-
slice:
|
|
10359
|
-
options:
|
|
10361
|
+
slice: v,
|
|
10362
|
+
options: E
|
|
10360
10363
|
});
|
|
10361
10364
|
} else
|
|
10362
|
-
(
|
|
10365
|
+
(C = f.current) == null || C.flexmonster.updateData(e);
|
|
10363
10366
|
console.log("Updating flexmonster dataSource to: ", e);
|
|
10364
10367
|
}
|
|
10365
|
-
}, [e, l, u,
|
|
10366
|
-
var y, w,
|
|
10368
|
+
}, [e, l, u, h, f, s, v]), z(() => {
|
|
10369
|
+
var y, w, S, C, _;
|
|
10367
10370
|
if (u && l) {
|
|
10368
|
-
const
|
|
10369
|
-
if (
|
|
10371
|
+
const E = (y = f.current) == null ? void 0 : y.flexmonster.getReport();
|
|
10372
|
+
if (E === void 0 || typeof E == "string")
|
|
10370
10373
|
return;
|
|
10371
10374
|
const O = gw(t);
|
|
10372
10375
|
O.options = {
|
|
@@ -10378,32 +10381,32 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10378
10381
|
}, s && (O.slice = {
|
|
10379
10382
|
...t == null ? void 0 : t.slice,
|
|
10380
10383
|
rows: [
|
|
10381
|
-
...((
|
|
10384
|
+
...((C = (S = t == null ? void 0 : t.slice) == null ? void 0 : S.rows) == null ? void 0 : C.filter((k) => {
|
|
10382
10385
|
var j;
|
|
10383
|
-
return !((j =
|
|
10386
|
+
return !((j = k.caption) != null && j.includes("P:"));
|
|
10384
10387
|
})) ?? [],
|
|
10385
|
-
...
|
|
10388
|
+
...h
|
|
10386
10389
|
]
|
|
10387
10390
|
});
|
|
10388
|
-
const T = { ...
|
|
10391
|
+
const T = { ...E, ...O };
|
|
10389
10392
|
(_ = f.current) == null || _.flexmonster.setReport(T), console.log("Refreshing flexmonster settings. New report: ", T);
|
|
10390
10393
|
}
|
|
10391
|
-
}, [l, u,
|
|
10394
|
+
}, [l, u, h, f, s, t]);
|
|
10392
10395
|
const x = A((y, w) => {
|
|
10393
|
-
var
|
|
10396
|
+
var k, j;
|
|
10394
10397
|
if (vw(w)) {
|
|
10395
|
-
y.text = ((
|
|
10398
|
+
y.text = ((k = w.member) == null ? void 0 : k.caption) ?? "";
|
|
10396
10399
|
const P = y.style["padding-left"] ?? "4px", W = parseInt(P, 10);
|
|
10397
10400
|
y.style["padding-left"] = W + 11 + "px";
|
|
10398
10401
|
}
|
|
10399
10402
|
if (!o || !ws(w, o.idColumn) || Ns(w))
|
|
10400
10403
|
return;
|
|
10401
|
-
const
|
|
10402
|
-
if (
|
|
10404
|
+
const S = (j = w.escapedLabel) == null ? void 0 : j.toString();
|
|
10405
|
+
if (S === void 0)
|
|
10403
10406
|
return;
|
|
10404
|
-
const
|
|
10407
|
+
const C = js(o.url, S), _ = "style='color: #00a45a; text-decoration: underline; cursor: pointer;'", E = w.type === "header" ? "onclick='event.stopImmediatePropagation()'" : "", O = w.isDrillThrough || w.type === "header" ? `href='${C}' target='_blank'` : "";
|
|
10405
10408
|
y.style && (y.style["z-index"] = 1);
|
|
10406
|
-
const T = `<a ${O} ${_} ${
|
|
10409
|
+
const T = `<a ${O} ${_} ${E}>${w.escapedLabel}</a>`;
|
|
10407
10410
|
y.text = T;
|
|
10408
10411
|
}, [o]), N = A((y) => {
|
|
10409
10412
|
if (!o || !ws(y, o.idColumn) || Ns(y))
|
|
@@ -10429,10 +10432,10 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10429
10432
|
}
|
|
10430
10433
|
) });
|
|
10431
10434
|
}, bw = (e, t, n, r) => {
|
|
10432
|
-
const { texts: { reports: a } } = V(X), { prompt: o } = Kd(), { confirm: s } = wt(), l = Ke(), { user: c } = V(Bt), { startLoading: u, stopLoading: d } = V(ht), { addNotification: p } = Jt(), f = A(async (
|
|
10435
|
+
const { texts: { reports: a } } = V(X), { prompt: o } = Kd(), { confirm: s } = wt(), l = Ke(), { user: c } = V(Bt), { startLoading: u, stopLoading: d } = V(ht), { addNotification: p } = Jt(), f = A(async (v) => {
|
|
10433
10436
|
u("report-versionSavingAs");
|
|
10434
10437
|
try {
|
|
10435
|
-
const x = await l.post("/reports/version",
|
|
10438
|
+
const x = await l.post("/reports/version", v);
|
|
10436
10439
|
p(a.saveSuccessful, "success"), await r(x.data);
|
|
10437
10440
|
} finally {
|
|
10438
10441
|
d("report-versionSavingAs");
|
|
@@ -10459,13 +10462,13 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10459
10462
|
f,
|
|
10460
10463
|
n
|
|
10461
10464
|
]), g = A(async () => {
|
|
10462
|
-
const
|
|
10463
|
-
if (
|
|
10465
|
+
const v = await o(a.enterName, { input: "input", required: !0 });
|
|
10466
|
+
if (v === null)
|
|
10464
10467
|
return;
|
|
10465
10468
|
const x = ys(t);
|
|
10466
10469
|
f({
|
|
10467
10470
|
reportSourceName: e,
|
|
10468
|
-
name:
|
|
10471
|
+
name: v,
|
|
10469
10472
|
settings: x
|
|
10470
10473
|
});
|
|
10471
10474
|
}, [t, o, e, a.enterName, f]), b = A(async () => {
|
|
@@ -10487,7 +10490,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10487
10490
|
n,
|
|
10488
10491
|
u,
|
|
10489
10492
|
d
|
|
10490
|
-
]),
|
|
10493
|
+
]), h = A(async () => {
|
|
10491
10494
|
u("report-versionSavingAs");
|
|
10492
10495
|
try {
|
|
10493
10496
|
await l.post("/reports/version-restrictions", {
|
|
@@ -10511,7 +10514,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10511
10514
|
d,
|
|
10512
10515
|
c.personalNumber
|
|
10513
10516
|
]);
|
|
10514
|
-
return { saveAs: g, save: m, archive: b, detach:
|
|
10517
|
+
return { saveAs: g, save: m, archive: b, detach: h };
|
|
10515
10518
|
}, xw = (e) => {
|
|
10516
10519
|
const t = Ke(), { startLoading: n, stopLoading: r } = V(ht);
|
|
10517
10520
|
return { changeEmployeeRights: A(async (o, s) => {
|
|
@@ -10533,10 +10536,10 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10533
10536
|
return l;
|
|
10534
10537
|
}, [t, e, n, r]) };
|
|
10535
10538
|
}, yw = ({ isOpen: e, onHide: t, usersData: n, reportVersionId: r, EmployeePicker: a, setReportVersion: o }) => {
|
|
10536
|
-
const { ProjectIconComponent: s, texts: { reports: l } } = V(X), { confirm: c } = wt(), [u, d] =
|
|
10537
|
-
o((
|
|
10538
|
-
...
|
|
10539
|
-
users: b.filter((
|
|
10539
|
+
const { ProjectIconComponent: s, texts: { reports: l } } = V(X), { confirm: c } = wt(), [u, d] = B(null), { changeEmployeeRights: p } = xw(r), f = A((b) => {
|
|
10540
|
+
o((h) => h === null ? null : {
|
|
10541
|
+
...h,
|
|
10542
|
+
users: b.filter((v) => v.isReportOwner === !1)
|
|
10540
10543
|
});
|
|
10541
10544
|
}, [o]), m = A(async () => {
|
|
10542
10545
|
if (u === null)
|
|
@@ -10546,8 +10549,8 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10546
10549
|
}, [u, p, f]), g = A(async (b) => {
|
|
10547
10550
|
if (!await c(l.removeSharingWith(b)))
|
|
10548
10551
|
return;
|
|
10549
|
-
const
|
|
10550
|
-
f(
|
|
10552
|
+
const v = await p(b, !1);
|
|
10553
|
+
f(v);
|
|
10551
10554
|
}, [p, c, l, f]);
|
|
10552
10555
|
return /* @__PURE__ */ i.jsxs(de, { show: e, onHide: t, children: [
|
|
10553
10556
|
/* @__PURE__ */ i.jsx(de.Header, { closeButton: !0, children: /* @__PURE__ */ i.jsx(de.Title, { children: l.reportSharing }) }),
|
|
@@ -10579,7 +10582,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10579
10582
|
] })
|
|
10580
10583
|
] });
|
|
10581
10584
|
}, ww = (e, t) => {
|
|
10582
|
-
const [n, r] =
|
|
10585
|
+
const [n, r] = B(null);
|
|
10583
10586
|
return z(() => {
|
|
10584
10587
|
e.then(({ default: a }) => {
|
|
10585
10588
|
const o = t !== void 0 ? t(a) : a;
|
|
@@ -10587,18 +10590,18 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10587
10590
|
});
|
|
10588
10591
|
}, [t, e]), { mappings: n };
|
|
10589
10592
|
}, Bj = ({ reportType: e, title: t, data: n, filterElements: r, getReportRoute: a, localization: o, licenseKey: s, EmployeePicker: l, localizationJsonFile: c, localizationTransformer: u, hyperlinkColumn: d, roomPasportization: p = !1 }) => {
|
|
10590
|
-
const { texts: { reports: f } } = V(X), { confirm: m } = wt(), g = Br(), [b] = gu(), { id:
|
|
10593
|
+
const { texts: { reports: f } } = V(X), { confirm: m } = wt(), g = Br(), [b] = gu(), { id: h } = qs(), v = R(() => h === void 0 ? null : Number(h), [h]), x = A((H) => {
|
|
10591
10594
|
const ae = H === null ? "" : H.toString();
|
|
10592
10595
|
g(mn(a(e), { id: ae }) + "?" + b.toString(), {
|
|
10593
10596
|
replace: !0,
|
|
10594
10597
|
flushSync: !0
|
|
10595
10598
|
});
|
|
10596
|
-
}, [a, g, e, b]), [N, y] =
|
|
10599
|
+
}, [a, g, e, b]), [N, y] = B(!1), w = Z(null), { user: S } = V(Bt), { data: C, reloadData: _ } = Me(`/reports/${e}`), { mappings: E } = ww(c, u), [O, T] = B({}), k = A((H) => {
|
|
10597
10600
|
const ae = H.target.value, ge = ae === "" ? null : Number(ae);
|
|
10598
10601
|
x(ge);
|
|
10599
10602
|
}, [x]), j = A(async (H) => {
|
|
10600
10603
|
await _(), x(H);
|
|
10601
|
-
}, [_, x]), { data: P, setData: W } = Me(`/reports/version/${
|
|
10604
|
+
}, [_, x]), { data: P, setData: W } = Me(`/reports/version/${v}`, { enabled: v !== null, nullStateBeforeLoad: !1, nullStateOnFail: !0 });
|
|
10602
10605
|
z(() => {
|
|
10603
10606
|
var ae;
|
|
10604
10607
|
if (P === null) {
|
|
@@ -10608,34 +10611,34 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10608
10611
|
const H = mw(P) ?? {};
|
|
10609
10612
|
T(H), (ae = w.current) == null || ae.flexmonster.refresh();
|
|
10610
10613
|
}, [P]);
|
|
10611
|
-
const { save:
|
|
10614
|
+
const { save: M, saveAs: $, archive: Y, detach: U } = bw(e, w, v, j), q = R(() => ({
|
|
10612
10615
|
data: n ?? [],
|
|
10613
|
-
mapping:
|
|
10614
|
-
}), [n,
|
|
10616
|
+
mapping: E ?? void 0
|
|
10617
|
+
}), [n, E]), Q = A(async () => {
|
|
10615
10618
|
var ae;
|
|
10616
10619
|
await m(f.confirmRevertChanges) && ((ae = w.current) == null || ae.flexmonster.setReport({ dataSource: q, ...O }));
|
|
10617
|
-
}, [m, q, f.confirmRevertChanges, O]), ne = R(() => (P == null ? void 0 : P.ownerId) ===
|
|
10620
|
+
}, [m, q, f.confirmRevertChanges, O]), ne = R(() => (P == null ? void 0 : P.ownerId) === S.personalNumber, [P == null ? void 0 : P.ownerId, S.personalNumber]), oe = R(() => {
|
|
10618
10621
|
var H;
|
|
10619
|
-
return (H = P == null ? void 0 : P.users) == null ? void 0 : H.some((ae) => ae.id ===
|
|
10620
|
-
}, [P == null ? void 0 : P.users,
|
|
10622
|
+
return (H = P == null ? void 0 : P.users) == null ? void 0 : H.some((ae) => ae.id === S.personalNumber && !ae.isReportOwner);
|
|
10623
|
+
}, [P == null ? void 0 : P.users, S.personalNumber]), se = A(async () => {
|
|
10621
10624
|
await m(f.confirmDelete(P == null ? void 0 : P.name)) && (await Y(), x(null), await _());
|
|
10622
10625
|
}, [Y, m, _, P == null ? void 0 : P.name, f, x]), xe = A(async () => {
|
|
10623
10626
|
await m(f.confirmDetach(P == null ? void 0 : P.name)) && (await U(), x(null), await _());
|
|
10624
10627
|
}, [m, U, _, P == null ? void 0 : P.name, f, x]);
|
|
10625
10628
|
return z(() => {
|
|
10626
10629
|
var H, ae;
|
|
10627
|
-
|
|
10628
|
-
}, [
|
|
10630
|
+
v === null && x(((H = C == null ? void 0 : C.reportVersions.find((ge) => ge.isSystem === !0)) == null ? void 0 : H.reportVersionId) ?? ((ae = C == null ? void 0 : C.reportVersions[0]) == null ? void 0 : ae.reportVersionId) ?? null);
|
|
10631
|
+
}, [C == null ? void 0 : C.reportVersions, v, x]), /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
10629
10632
|
/* @__PURE__ */ i.jsx(Tt, { variant: "fullScreen", title: /* @__PURE__ */ i.jsxs("div", { className: "d-flex justify-content-start gap-3", children: [
|
|
10630
10633
|
/* @__PURE__ */ i.jsx(F, { variant: "h3", children: t }),
|
|
10631
10634
|
r,
|
|
10632
10635
|
/* @__PURE__ */ i.jsxs("div", { className: "d-flex gap-1 align-items-center", children: [
|
|
10633
|
-
/* @__PURE__ */ i.jsxs(Xd, { size: "sm", value:
|
|
10634
|
-
/* @__PURE__ */ i.jsx("optgroup", { label: f.versionSelectSystem, children:
|
|
10635
|
-
/* @__PURE__ */ i.jsx("optgroup", { label: f.versionSelectYour, children:
|
|
10636
|
-
/* @__PURE__ */ i.jsx("optgroup", { label: f.versionSelectSharedWithYou, children:
|
|
10636
|
+
/* @__PURE__ */ i.jsxs(Xd, { size: "sm", value: v ?? void 0, onChange: k, children: [
|
|
10637
|
+
/* @__PURE__ */ i.jsx("optgroup", { label: f.versionSelectSystem, children: C == null ? void 0 : C.reportVersions.filter((H) => H.isSystem === !0).map((H) => /* @__PURE__ */ i.jsx("option", { value: H.reportVersionId, children: H.name }, H.reportVersionId)) }),
|
|
10638
|
+
/* @__PURE__ */ i.jsx("optgroup", { label: f.versionSelectYour, children: C == null ? void 0 : C.reportVersions.filter((H) => H.ownerId === S.personalNumber).map((H) => /* @__PURE__ */ i.jsx("option", { value: H.reportVersionId, children: H.name }, H.reportVersionId)) }),
|
|
10639
|
+
/* @__PURE__ */ i.jsx("optgroup", { label: f.versionSelectSharedWithYou, children: C == null ? void 0 : C.reportVersions.filter((H) => H.isSystem === !1 && H.ownerId !== S.personalNumber).map((H) => /* @__PURE__ */ i.jsx("option", { value: H.reportVersionId, children: `${H.name} [${H.ownerId}]` }, H.reportVersionId)) })
|
|
10637
10640
|
] }),
|
|
10638
|
-
/* @__PURE__ */ i.jsx(lt, { icon: /* @__PURE__ */ i.jsx(Qd, {}), onClick:
|
|
10641
|
+
/* @__PURE__ */ i.jsx(lt, { icon: /* @__PURE__ */ i.jsx(Qd, {}), onClick: M, disabled: v === null || (P == null ? void 0 : P.isSystem) || !ne, children: f.save }),
|
|
10639
10642
|
/* @__PURE__ */ i.jsx(lt, { icon: /* @__PURE__ */ i.jsx(Jd, {}), onClick: $, className: "flex-shrink-0", children: f.saveAs }),
|
|
10640
10643
|
/* @__PURE__ */ i.jsxs(Lt, { toggle: /* @__PURE__ */ i.jsx(Mt, { as: Zt }), children: [
|
|
10641
10644
|
/* @__PURE__ */ i.jsx(Ye, { onClick: Q, children: f.revertChanges }),
|
|
@@ -10685,7 +10688,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10685
10688
|
] }) }) })
|
|
10686
10689
|
] });
|
|
10687
10690
|
}, Ds = ["info", "warning", "danger"], Ss = ({ messages: e, isLoading: t, onDeleteMessage: n, onClickMessage: r, getIcon: a, getLinksTo: o }) => {
|
|
10688
|
-
const { texts: { messageBoard: s } } = V(X), [l, c] =
|
|
10691
|
+
const { texts: { messageBoard: s } } = V(X), [l, c] = B(Ds), u = R(() => e.filter((d) => l.includes(d.type ?? "")), [l, e]);
|
|
10689
10692
|
return /* @__PURE__ */ i.jsxs("div", { className: "h-100 d-flex flex-column overflow-hidden", children: [
|
|
10690
10693
|
/* @__PURE__ */ i.jsx(Nw, { knownTypes: Ds, typeFilters: l, onChangeTypeFilters: (d) => c(d) }),
|
|
10691
10694
|
t && /* @__PURE__ */ i.jsxs("div", { className: "p-3 w-100", children: [
|
|
@@ -10711,24 +10714,24 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10711
10714
|
apiGet: "/messageBoard",
|
|
10712
10715
|
apiDelete: "/messageBoard/"
|
|
10713
10716
|
}, Mj = ({ renderAsNotifPanel: e, notifIcon: t, apiUrls: { apiGet: n = ya.apiGet, apiDelete: r = ya.apiDelete } = ya, getIcon: a, getLinksTo: o }) => {
|
|
10714
|
-
const l = Ke(), [c, u] =
|
|
10717
|
+
const l = Ke(), [c, u] = B([]), [d, p] = B(!1), [f, m] = B(!1), [g, b] = B(!1), h = A(async () => {
|
|
10715
10718
|
m(!0), await l.get(n).then(({ data: w }) => {
|
|
10716
10719
|
u(w), p(!0), m(!1);
|
|
10717
10720
|
}).catch(() => {
|
|
10718
10721
|
u([]), m(!1);
|
|
10719
10722
|
});
|
|
10720
|
-
}, [n, l]),
|
|
10721
|
-
|
|
10722
|
-
|
|
10723
|
+
}, [n, l]), v = A(async (w) => l.delete(`${r}${w}`).then(() => !0).catch(() => !1), [r, l]), x = A((w) => {
|
|
10724
|
+
v(w).then((S) => {
|
|
10725
|
+
S && u(c.filter((C) => C.id !== w));
|
|
10723
10726
|
});
|
|
10724
|
-
}, [
|
|
10727
|
+
}, [v, c]);
|
|
10725
10728
|
z(() => {
|
|
10726
|
-
|
|
10727
|
-
const w = setInterval(() =>
|
|
10729
|
+
h();
|
|
10730
|
+
const w = setInterval(() => h(), 60 * 1e3);
|
|
10728
10731
|
return () => {
|
|
10729
10732
|
clearInterval(w);
|
|
10730
10733
|
};
|
|
10731
|
-
}, [
|
|
10734
|
+
}, [h]);
|
|
10732
10735
|
const N = c.filter((w) => w.type === "danger").length, y = d ? !1 : f;
|
|
10733
10736
|
return e ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
10734
10737
|
/* @__PURE__ */ i.jsxs("div", { className: "position-relative", children: [
|
|
@@ -10775,7 +10778,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10775
10778
|
selectionItemsContainer: Bw,
|
|
10776
10779
|
selectionItems: Lw
|
|
10777
10780
|
}, Gc = ({ icon: e, setIcon: t, IconComponent: n, IconTypeArray: r }) => {
|
|
10778
|
-
const [a, o] =
|
|
10781
|
+
const [a, o] = B(!1), s = (l) => {
|
|
10779
10782
|
t(l), o(!1);
|
|
10780
10783
|
};
|
|
10781
10784
|
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
@@ -10791,7 +10794,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10791
10794
|
throw new Error("ShortcutLinksProvider not initilized. Probably tried to use useShortcutLinks outside ShortcutLinksProvider.");
|
|
10792
10795
|
return e;
|
|
10793
10796
|
}, Mw = ({ shortcutLink: e, IconComponent: t, IconTypeArray: n, editShortcutLink: r, deleteLocation: a }) => {
|
|
10794
|
-
const { ProjectIconComponent: o } = V(X), [s, l] =
|
|
10797
|
+
const { ProjectIconComponent: o } = V(X), [s, l] = B(e.icon), [c, u] = B(e.name);
|
|
10795
10798
|
console.log(s, typeof s);
|
|
10796
10799
|
const d = R(() => !(s === e.icon && c === e.name), [s, c, e.icon, e.name]), p = A(() => {
|
|
10797
10800
|
l(e.icon), u(e.name);
|
|
@@ -10836,7 +10839,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10836
10839
|
linkAddButton: $w,
|
|
10837
10840
|
createLinkRow: Gw
|
|
10838
10841
|
}, Uw = ({ shortcutLink: e, IconComponent: t }) => /* @__PURE__ */ i.jsx(ze, { text: e.name, placement: "bottom", children: /* @__PURE__ */ i.jsx(Ge, { to: e.url, className: un.linkButton, children: /* @__PURE__ */ i.jsx(t, { icon: e.icon }) }) }), Ww = ({ closeModal: e, isOpen: t, createLink: n, pageTitlePrefix: r, IconComponent: a, IconTypeArray: o }) => {
|
|
10839
|
-
const s = vu(), { texts: l } = V(X), [c, u] =
|
|
10842
|
+
const s = vu(), { texts: l } = V(X), [c, u] = B("star-outline"), [d, p] = B(r ? document.title.replace(r, "") : document.title), f = A(async () => {
|
|
10840
10843
|
await n({ icon: c, name: d, url: s.pathname + s.search }), e();
|
|
10841
10844
|
}, [e, n, c, s.pathname, s.search, d]), m = R(() => s.pathname + s.search, [s.pathname, s.search]);
|
|
10842
10845
|
return /* @__PURE__ */ i.jsx(de, { show: t, onHide: e, size: "sm", children: /* @__PURE__ */ i.jsxs("div", { onKeyDown: (g) => {
|
|
@@ -10863,7 +10866,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10863
10866
|
/* @__PURE__ */ i.jsx(de.Footer, { className: "d-flex justify-content-end", children: /* @__PURE__ */ i.jsx(vt, { onClick: f, children: l.shortcutLinks.addShortcut }) })
|
|
10864
10867
|
] }) });
|
|
10865
10868
|
}, Hw = ({ IconComponent: e, IconTypeArray: t, pageTitlePrefix: n, createLink: r }) => {
|
|
10866
|
-
const { ProjectIconComponent: a, texts: o } = V(X), [s, l] =
|
|
10869
|
+
const { ProjectIconComponent: a, texts: o } = V(X), [s, l] = B(!1), [c] = Xa(s, 100);
|
|
10867
10870
|
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
10868
10871
|
/* @__PURE__ */ i.jsx(ze, { text: o.shortcutLinks.addShortcut, placement: "bottom", children: /* @__PURE__ */ i.jsx("button", { type: "button", className: I(un.linkButton, un.linkAddButton), onClick: () => l(!0), children: /* @__PURE__ */ i.jsx(a, { icon: "add" }) }) }),
|
|
10869
10872
|
(s || c) && /* @__PURE__ */ i.jsx(Ww, { IconComponent: e, IconTypeArray: t, closeModal: () => l(!1), createLink: r, isOpen: s, pageTitlePrefix: n })
|
|
@@ -10941,7 +10944,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10941
10944
|
/* @__PURE__ */ i.jsx(te, { size: "sm", color: "danger", onClick: () => t(r.id), children: /* @__PURE__ */ i.jsx(n, { icon: "delete" }) })
|
|
10942
10945
|
] }, r.id)) });
|
|
10943
10946
|
}, Kw = ({ show: e, onHide: t, roles: n, onAddTarget: r, EmployeePicker: a, templateId: o }) => {
|
|
10944
|
-
const { texts: { notifCentrum: s } } = V(X), [l, c] =
|
|
10947
|
+
const { texts: { notifCentrum: s } } = V(X), [l, c] = B(null), [u, d] = B(null), [p, f] = B("R"), m = A(() => {
|
|
10945
10948
|
c(null), d(null), t();
|
|
10946
10949
|
}, [t]);
|
|
10947
10950
|
return /* @__PURE__ */ i.jsxs(de, { show: e, onHide: () => m(), children: [
|
|
@@ -10963,7 +10966,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
10963
10966
|
}, children: s.add }) })
|
|
10964
10967
|
] });
|
|
10965
10968
|
}, Xw = ({ templates: e, selectedTemplateId: t, setSelectedTemplateId: n, roles: r, onAddNotifTarget: a, onRemoveNotifTarget: o, EmployeePicker: s }) => {
|
|
10966
|
-
const { texts: { notifCentrum: l }, ProjectIconComponent: c } = V(X), [u, d] =
|
|
10969
|
+
const { texts: { notifCentrum: l }, ProjectIconComponent: c } = V(X), [u, d] = B(!1);
|
|
10967
10970
|
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
10968
10971
|
/* @__PURE__ */ i.jsx(Mn, { className: "overflow-auto h-max-100 p-2", children: e.map((p) => /* @__PURE__ */ i.jsxs(Mn.Item, { action: t !== p.id, className: `p-0 mb-2 border rounded shadow-sm ${t === p.id ? "border-1 border-primary" : ""}`, onClick: () => n(p.id), children: [
|
|
10969
10972
|
/* @__PURE__ */ i.jsxs("div", { className: "d-flex gap-2 justify-content-between align-items-center border-1 border-bottom border-primary p-2", children: [
|
|
@@ -11010,21 +11013,21 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11010
11013
|
}, [t]);
|
|
11011
11014
|
return /* @__PURE__ */ i.jsx(n, { columnsDef: o, data: a, useScrollableContainer: !0, onRowClick: s, bottomBarProps: { hidden: !0 } });
|
|
11012
11015
|
}, Uj = ({ kinds: e, reloadActions: t, reloadHistory: n, reloadRoles: r, onRemoveTarget: a, onPostTarget: o, EmployeePicker: s, BnfTableComponent: l }) => {
|
|
11013
|
-
var T,
|
|
11014
|
-
const { texts: { notifCentrum: c } } = V(X), { confirm: u } = wt(), [d, p] =
|
|
11016
|
+
var T, k;
|
|
11017
|
+
const { texts: { notifCentrum: c } } = V(X), { confirm: u } = wt(), [d, p] = B(null), [f, m] = B(null), [g, b] = Vn("notif-kind-id", null);
|
|
11015
11018
|
z(() => {
|
|
11016
11019
|
var j;
|
|
11017
11020
|
e.length > 0 ? b(((j = e.at(0)) == null ? void 0 : j.id) ?? null) : b(null);
|
|
11018
11021
|
}, [e, b]);
|
|
11019
|
-
const [
|
|
11022
|
+
const [h, v] = B([]);
|
|
11020
11023
|
z(() => {
|
|
11021
11024
|
g && t(g).then((j) => {
|
|
11022
|
-
|
|
11025
|
+
v(j);
|
|
11023
11026
|
}).catch((j) => {
|
|
11024
|
-
console.log(j),
|
|
11027
|
+
console.log(j), v([]);
|
|
11025
11028
|
});
|
|
11026
11029
|
}, [t, g]);
|
|
11027
|
-
const [x, N] = Vn("notif-action-id", ((T =
|
|
11030
|
+
const [x, N] = Vn("notif-action-id", ((T = h == null ? void 0 : h.at(0)) == null ? void 0 : T.id) ?? null), [y, w] = B([]);
|
|
11028
11031
|
z(() => {
|
|
11029
11032
|
x === null || d === null || n(x, d).then((j) => {
|
|
11030
11033
|
w(j);
|
|
@@ -11032,49 +11035,49 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11032
11035
|
console.log(j), w([]);
|
|
11033
11036
|
});
|
|
11034
11037
|
}, [t, n, x, g, d]);
|
|
11035
|
-
const [
|
|
11038
|
+
const [S, C] = B([]);
|
|
11036
11039
|
z(() => {
|
|
11037
11040
|
x !== null && r(x).then((j) => {
|
|
11038
|
-
|
|
11041
|
+
C(j);
|
|
11039
11042
|
}).catch((j) => {
|
|
11040
|
-
console.log(j),
|
|
11043
|
+
console.log(j), C([]);
|
|
11041
11044
|
});
|
|
11042
11045
|
}, [r, x]);
|
|
11043
11046
|
const _ = R(() => {
|
|
11044
11047
|
var j;
|
|
11045
|
-
return !
|
|
11046
|
-
}, [
|
|
11048
|
+
return !h || !x ? [] : ((j = h.find((P) => P.id === x)) == null ? void 0 : j.templates) ?? [];
|
|
11049
|
+
}, [h, x]), E = A((j, P) => {
|
|
11047
11050
|
o(j, P).then((W) => {
|
|
11048
|
-
h
|
|
11049
|
-
...
|
|
11050
|
-
...
|
|
11051
|
+
v(h ? [
|
|
11052
|
+
...h.map((M) => M.id !== x ? M : {
|
|
11053
|
+
...M,
|
|
11051
11054
|
templates: [
|
|
11052
|
-
...
|
|
11055
|
+
...M.templates.map(($) => $.id !== d ? $ : { ...$, targets: [...$.targets, W] })
|
|
11053
11056
|
]
|
|
11054
11057
|
})
|
|
11055
11058
|
] : []);
|
|
11056
11059
|
}).catch((W) => console.log(W));
|
|
11057
|
-
}, [
|
|
11058
|
-
await u(c.confirmTargetDelete) && a(j).then(() => h
|
|
11059
|
-
...
|
|
11060
|
+
}, [h, o, x, d, v]), O = A(async (j) => {
|
|
11061
|
+
await u(c.confirmTargetDelete) && a(j).then(() => v(h ? [
|
|
11062
|
+
...h.map((P) => P.id !== x ? P : {
|
|
11060
11063
|
...P,
|
|
11061
11064
|
templates: [
|
|
11062
|
-
...P.templates.map((W) => W.id !== d ? W : { ...W, targets: W.targets.filter((
|
|
11065
|
+
...P.templates.map((W) => W.id !== d ? W : { ...W, targets: W.targets.filter((M) => M.id !== j) })
|
|
11063
11066
|
]
|
|
11064
11067
|
})
|
|
11065
11068
|
] : []));
|
|
11066
|
-
}, [
|
|
11069
|
+
}, [h, u, c, a, x, d]);
|
|
11067
11070
|
return /* @__PURE__ */ i.jsxs("div", { className: "h-100 overflow-hidden", children: [
|
|
11068
11071
|
/* @__PURE__ */ i.jsxs("div", { className: "row mb-2", children: [
|
|
11069
11072
|
/* @__PURE__ */ i.jsx("div", { className: "col-2", children: /* @__PURE__ */ i.jsx(ut, { label: c.kind, size: "sm", noEmptyOption: !0, options: (e == null ? void 0 : e.map((j) => ({ id: j.id, name: j.name }))) ?? [], value: g ?? null, onChange: (j) => b(Number(j)), dropdownWidth: 200 }) }),
|
|
11070
|
-
/* @__PURE__ */ i.jsx("div", { className: "col-3", children: /* @__PURE__ */ i.jsx(ut, { label: c.subkind, size: "sm", noEmptyOption: !0, options: (
|
|
11073
|
+
/* @__PURE__ */ i.jsx("div", { className: "col-3", children: /* @__PURE__ */ i.jsx(ut, { label: c.subkind, size: "sm", noEmptyOption: !0, options: (h == null ? void 0 : h.map((j) => ({ id: j.id, name: j.name }))) ?? [], value: x ?? null, onChange: (j) => N(Number(j)), dropdownWidth: 250 }) })
|
|
11071
11074
|
] }),
|
|
11072
11075
|
/* @__PURE__ */ i.jsxs("div", { className: "vh-100 overflow-hidden d-flex gap-1", children: [
|
|
11073
|
-
/* @__PURE__ */ i.jsx("div", { className: "h-75 w-25 overflow-hidden", children: /* @__PURE__ */ i.jsx(Xw, { templates: _, roles:
|
|
11076
|
+
/* @__PURE__ */ i.jsx("div", { className: "h-75 w-25 overflow-hidden", children: /* @__PURE__ */ i.jsx(Xw, { templates: _, roles: S ?? [], onAddNotifTarget: E, onRemoveNotifTarget: O, selectedTemplateId: d, setSelectedTemplateId: (j) => {
|
|
11074
11077
|
p(j), m(null);
|
|
11075
11078
|
}, EmployeePicker: s }) }),
|
|
11076
11079
|
/* @__PURE__ */ i.jsx("div", { className: "w-25 h-75 overflow-hidden", children: d && /* @__PURE__ */ i.jsx(Qw, { data: y ?? [], onClick: (j) => m((y == null ? void 0 : y.find((P) => P.id === j)) ?? null), BnfTableComponent: l }) }),
|
|
11077
|
-
d && /* @__PURE__ */ i.jsx("div", { className: "h-75 w-75 overflow-hidden bg-darker", children: /* @__PURE__ */ i.jsx("iframe", { title: "notification", className: "w-100 h-100", srcDoc: (f == null ? void 0 : f.message) ?? ((
|
|
11080
|
+
d && /* @__PURE__ */ i.jsx("div", { className: "h-75 w-75 overflow-hidden bg-darker", children: /* @__PURE__ */ i.jsx("iframe", { title: "notification", className: "w-100 h-100", srcDoc: (f == null ? void 0 : f.message) ?? ((k = _.find((j) => j.id === d)) == null ? void 0 : k.textTemplate) }) })
|
|
11078
11081
|
] })
|
|
11079
11082
|
] });
|
|
11080
11083
|
}, Jw = ({ history: e, onClick: t, BnfTableComponent: n }) => {
|
|
@@ -11142,7 +11145,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11142
11145
|
}, [t]);
|
|
11143
11146
|
return /* @__PURE__ */ i.jsx(n, { columnsDef: a, data: e, useScrollableContainer: !0, paginationMode: "enabled", bottomBarProps: { hideFullScreen: !0 }, onRowClick: o });
|
|
11144
11147
|
}, Wj = ({ reloadUserHistory: e, EmployeePicker: t, BnfTableComponent: n }) => {
|
|
11145
|
-
const { texts: { notifCentrum: r } } = V(X), [a, o] =
|
|
11148
|
+
const { texts: { notifCentrum: r } } = V(X), [a, o] = B(null), [s, l] = Vn("notif-user", null), [c, u] = B([]);
|
|
11146
11149
|
return z(() => {
|
|
11147
11150
|
s !== null && e(s.id).then((d) => {
|
|
11148
11151
|
u(d);
|
|
@@ -11234,7 +11237,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11234
11237
|
] })
|
|
11235
11238
|
] });
|
|
11236
11239
|
}, Hj = ({ otherSettingId: e, languageOptions: t, tableIdentifier: n, SettingsOutlet: r, BnfTableComponent: a, importLocalization: o }) => {
|
|
11237
|
-
const { texts: { localizations: s } } = V(X), [l, c] =
|
|
11240
|
+
const { texts: { localizations: s } } = V(X), [l, c] = B(t[0].id), [u, d] = B(null), [p, f] = B(null), m = A(async () => {
|
|
11238
11241
|
if (u === null)
|
|
11239
11242
|
return;
|
|
11240
11243
|
const g = await o({ file: u, lang: l });
|
|
@@ -11259,7 +11262,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11259
11262
|
return "";
|
|
11260
11263
|
const f = rN(p, n);
|
|
11261
11264
|
return p !== void 0 && f !== void 0 ? f : "";
|
|
11262
|
-
}, [t, n, e]), [l, c] =
|
|
11265
|
+
}, [t, n, e]), [l, c] = B(s), u = A(async () => {
|
|
11263
11266
|
await a([{ fileName: e + ".json", items: [{ key: n, value: l }] }]), await r();
|
|
11264
11267
|
}, [n, r, a, e, l]), d = R(() => l !== s, [s, l]);
|
|
11265
11268
|
return /* @__PURE__ */ i.jsxs("div", { className: "d-flex", children: [
|
|
@@ -11295,9 +11298,9 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11295
11298
|
r = s;
|
|
11296
11299
|
}
|
|
11297
11300
|
}, zj = ({ languageOptions: e, envMode: t, getOtherSettingsUrl: n, downloadXls: r, saveChanges: a, localizationFilesOptions: o, remoteLocalesRoot: s }) => {
|
|
11298
|
-
const { texts: { localizations: l }, ProjectIconComponent: c } = V(X), [u, d] =
|
|
11301
|
+
const { texts: { localizations: l }, ProjectIconComponent: c } = V(X), [u, d] = B(1), [p, f] = B(/* @__PURE__ */ new Map()), [m, g] = B(null), [b, h] = B(""), [v, x] = B(/* @__PURE__ */ new Set()), N = A((j) => {
|
|
11299
11302
|
f(/* @__PURE__ */ new Map()), x(j);
|
|
11300
|
-
}, []), y = R(() => e.filter((j) => !
|
|
11303
|
+
}, []), y = R(() => e.filter((j) => !v.has(j.id)), [v, e]), w = R(() => {
|
|
11301
11304
|
if (p.size === 0)
|
|
11302
11305
|
return [];
|
|
11303
11306
|
const j = /* @__PURE__ */ new Set(), P = (U, q = "") => {
|
|
@@ -11310,13 +11313,13 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11310
11313
|
Array.from(p).forEach((U) => {
|
|
11311
11314
|
Object.entries(U[1]).forEach((q) => P(q));
|
|
11312
11315
|
});
|
|
11313
|
-
const W = Array.from(j),
|
|
11314
|
-
return ((
|
|
11316
|
+
const W = Array.from(j), M = o.find((U) => U.path === m);
|
|
11317
|
+
return ((M == null ? void 0 : M.type) === "report" ? W.filter((U) => {
|
|
11315
11318
|
const q = U.split(".");
|
|
11316
11319
|
return q[q.length - 1] === "caption";
|
|
11317
11320
|
}) : W).map((U) => ({
|
|
11318
11321
|
key: U,
|
|
11319
|
-
lngData: new Map(Array.from(
|
|
11322
|
+
lngData: new Map(Array.from(v).map((q) => {
|
|
11320
11323
|
const Q = p.get(q);
|
|
11321
11324
|
return [
|
|
11322
11325
|
q,
|
|
@@ -11324,34 +11327,34 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11324
11327
|
];
|
|
11325
11328
|
}))
|
|
11326
11329
|
}));
|
|
11327
|
-
}, [p, o, m,
|
|
11328
|
-
j !== null && d(() => Math.max(1, Math.min(j,
|
|
11329
|
-
}, [
|
|
11330
|
+
}, [p, o, m, v]), S = R(() => w.filter((j) => qe(j.key, b) || Array.from(j.lngData).some((P) => typeof (P == null ? void 0 : P[1]) != "string" ? !1 : qe((P == null ? void 0 : P[1]) ?? "", b))), [b, w]), C = R(() => Math.ceil(S.length / vr), [S.length]), _ = A((j) => {
|
|
11331
|
+
j !== null && d(() => Math.max(1, Math.min(j, C)));
|
|
11332
|
+
}, [C]), E = A(async () => {
|
|
11330
11333
|
if (m === null)
|
|
11331
11334
|
return;
|
|
11332
|
-
const j = Array.from(
|
|
11333
|
-
const
|
|
11335
|
+
const j = Array.from(v).map((W) => (async () => {
|
|
11336
|
+
const M = await Zd.get(
|
|
11334
11337
|
`${s}${m == null ? void 0 : m.replace("{{lng}}", W)}&v=${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
11335
11338
|
// &v to not hit browser cache
|
|
11336
11339
|
{ responseType: "json" }
|
|
11337
11340
|
);
|
|
11338
|
-
return [W,
|
|
11341
|
+
return [W, M.data];
|
|
11339
11342
|
})()), P = await Promise.allSettled(j);
|
|
11340
11343
|
f(new Map(P.map((W) => W.status === "fulfilled" ? W.value : ["", {}])));
|
|
11341
|
-
}, [s, m,
|
|
11342
|
-
|
|
11343
|
-
}, [
|
|
11344
|
+
}, [s, m, v]), O = A(async () => {
|
|
11345
|
+
E();
|
|
11346
|
+
}, [E]), T = R(() => y.length > 0, [y.length]), k = R(() => v.size + 1 + (T ? 1 : 0), [T, v.size]);
|
|
11344
11347
|
return z(() => {
|
|
11345
11348
|
_(u);
|
|
11346
|
-
}, [_, u,
|
|
11347
|
-
|
|
11348
|
-
}, [
|
|
11349
|
+
}, [_, u, S]), z(() => {
|
|
11350
|
+
E();
|
|
11351
|
+
}, [E]), s === void 0 ? /* @__PURE__ */ i.jsx(Tt, { children: /* @__PURE__ */ i.jsxs(pt, { variant: "danger", className: "fw-bold", children: [
|
|
11349
11352
|
l.cantRunLocalizationSettings,
|
|
11350
11353
|
/* @__PURE__ */ i.jsx("br", {}),
|
|
11351
11354
|
/* @__PURE__ */ i.jsx("br", {}),
|
|
11352
11355
|
l.envNotConnectedToRemote(t.toUpperCase())
|
|
11353
11356
|
] }) }) : /* @__PURE__ */ i.jsx(Tt, { title: /* @__PURE__ */ i.jsx("div", { className: "d-flex gap-4", children: /* @__PURE__ */ i.jsx(F, { variant: "h3", children: l.localizationSettings }) }), helmet: l.localizationSettings, variant: "fullScreen", children: /* @__PURE__ */ i.jsxs("div", { className: $e.keysTable, style: {
|
|
11354
|
-
"--keys-table-columns":
|
|
11357
|
+
"--keys-table-columns": k,
|
|
11355
11358
|
"--adding-column": T ? 1 : 0
|
|
11356
11359
|
}, children: [
|
|
11357
11360
|
/* @__PURE__ */ i.jsxs("div", { className: I($e.tableFullWidth, "d-flex align-items-center justify-content-between gap-2 px-2 mt-1"), children: [
|
|
@@ -11361,7 +11364,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11361
11364
|
})), value: m, onChange: (j) => typeof j != "number" ? g(j) : null, size: "sm", label: l.localizationFile, className: $e.fileSelect, noSortOptions: !0 }),
|
|
11362
11365
|
/* @__PURE__ */ i.jsxs("div", { className: I($e.searchBox, "d-flex align-items-center gap-2 border rounded"), children: [
|
|
11363
11366
|
/* @__PURE__ */ i.jsx(c, { icon: "search", className: "text-muted", size: 18, iconProps: { className: "mt- me-n4" } }),
|
|
11364
|
-
/* @__PURE__ */ i.jsx(dt, { type: "text", value: b, onChange: (j) =>
|
|
11367
|
+
/* @__PURE__ */ i.jsx(dt, { type: "text", value: b, onChange: (j) => h(typeof j == "string" ? j : ""), size: "sm", showClearIcon: b !== "", withoutLabel: !0, placeholder: "vyhledávat...", className: "placeholder-muted bg-transparent border-0 my-0 py-0 w-100" })
|
|
11365
11368
|
] }),
|
|
11366
11369
|
/* @__PURE__ */ i.jsxs(Ls, { children: [
|
|
11367
11370
|
/* @__PURE__ */ i.jsx(Sa, { cKey: "export", hideOn: "always", onClick: r, icon: /* @__PURE__ */ i.jsx(eu, { fileExtension: "xls" }), children: l.xlsExport }),
|
|
@@ -11370,14 +11373,14 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11370
11373
|
] }),
|
|
11371
11374
|
/* @__PURE__ */ i.jsxs("div", { className: I($e.subgrid, $e.lngSelectRow), children: [
|
|
11372
11375
|
/* @__PURE__ */ i.jsx(F, { variant: "body", children: l.key }),
|
|
11373
|
-
Array.from(
|
|
11376
|
+
Array.from(v).map((j, P) => /* @__PURE__ */ i.jsx(ut, { options: e.filter((W) => W.id === j || !v.has(W.id)), value: j, onChange: (W) => N((M) => W === null ? (M.delete(j), new Set(M)) : (typeof W == "string" && (M.delete(j), M.add(W)), new Set(M))), size: "sm", label: `${l.language} ${P + 1}`, withoutLabel: !0, InputContainer: Pe, className: I($e.lngSelect) }, j)),
|
|
11374
11377
|
T ? /* @__PURE__ */ i.jsx(ut, { options: y, value: null, onChange: (j) => N((P) => (typeof j == "string" && P.add(j), new Set(P))), size: "sm", label: l.addLanguage, InputContainer: Pe, className: I($e.lngSelect, $e.addLng) }) : null
|
|
11375
11378
|
] }),
|
|
11376
11379
|
/* @__PURE__ */ i.jsxs("div", { className: I($e.subgrid, $e.tableBody), children: [
|
|
11377
|
-
w.length === 0 ||
|
|
11378
|
-
|
|
11380
|
+
w.length === 0 || S.length === 0 ? /* @__PURE__ */ i.jsx(pt, { variant: "warning", className: I($e.tableFullWidth, $e.emptyTableAlert, "my-n1"), children: w.length === 0 ? l.noDataLoaded : S.length === 0 ? l.noDataFiltered : null }) : null,
|
|
11381
|
+
S.slice(vr * (u - 1), vr * u).map((j) => /* @__PURE__ */ i.jsxs("div", { className: I($e.subgrid, $e.tableItem), children: [
|
|
11379
11382
|
/* @__PURE__ */ i.jsx(F, { variant: "form-label", children: j.key }),
|
|
11380
|
-
Array.from(
|
|
11383
|
+
Array.from(v).map((P) => /* @__PURE__ */ i.jsx(aN, { localizationKey: j.key, lngsData: p, selLng: P, reloadData: O, saveChanges: a }, P))
|
|
11381
11384
|
] }, j.key))
|
|
11382
11385
|
] }),
|
|
11383
11386
|
/* @__PURE__ */ i.jsxs("div", { className: I("d-flex align-items-center justify-content-around gap-3 px-2 py-0", $e.tableFooter), children: [
|
|
@@ -11385,7 +11388,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11385
11388
|
l.keyCount,
|
|
11386
11389
|
":",
|
|
11387
11390
|
" ",
|
|
11388
|
-
/* @__PURE__ */ i.jsx("span", { className: "fw-bold", children:
|
|
11391
|
+
/* @__PURE__ */ i.jsx("span", { className: "fw-bold", children: S.length })
|
|
11389
11392
|
] }) }),
|
|
11390
11393
|
/* @__PURE__ */ i.jsxs("div", { className: "d-flex gap-1 align-items-center", children: [
|
|
11391
11394
|
/* @__PURE__ */ i.jsxs(F, { variant: "body", children: [
|
|
@@ -11397,7 +11400,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11397
11400
|
/* @__PURE__ */ i.jsx("div", { style: { width: 30 }, children: /* @__PURE__ */ i.jsx(ey, { value: u, onChange: _, InputContainer: Pe, withoutLabel: !0, size: "sm" }) }),
|
|
11398
11401
|
/* @__PURE__ */ i.jsxs(F, { variant: "body", children: [
|
|
11399
11402
|
"/",
|
|
11400
|
-
Math.ceil(
|
|
11403
|
+
Math.ceil(S.length / vr)
|
|
11401
11404
|
] }),
|
|
11402
11405
|
/* @__PURE__ */ i.jsx(te, { size: "sm", onClick: () => _(u + 1), children: /* @__PURE__ */ i.jsx(c, { icon: "plus" }) })
|
|
11403
11406
|
] })
|
|
@@ -11414,7 +11417,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11414
11417
|
var n;
|
|
11415
11418
|
return ((n = t == null ? void 0 : t.customNameBuilder) == null ? void 0 : n.call(t, e)) ?? e.name;
|
|
11416
11419
|
}, zc = (e, t, n, r, a) => {
|
|
11417
|
-
const o = Ke(), [s, l] =
|
|
11420
|
+
const o = Ke(), [s, l] = B(!1), [c, u] = B([]), d = e === "", p = A(() => {
|
|
11418
11421
|
u([]), !(t.length < Es) && (l(!0), o.get(Ea(n, {
|
|
11419
11422
|
path: { query: t },
|
|
11420
11423
|
query: {
|
|
@@ -11433,10 +11436,10 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11433
11436
|
return [];
|
|
11434
11437
|
const g = [];
|
|
11435
11438
|
return a.forEach((b) => {
|
|
11436
|
-
const
|
|
11437
|
-
|
|
11438
|
-
key: { ...b.key, totalCount:
|
|
11439
|
-
items:
|
|
11439
|
+
const h = b.items.filter((v) => qe(v.name, decodeURIComponent(t)));
|
|
11440
|
+
h.length > 0 && g.push({
|
|
11441
|
+
key: { ...b.key, totalCount: h.length },
|
|
11442
|
+
items: h
|
|
11440
11443
|
});
|
|
11441
11444
|
}), g;
|
|
11442
11445
|
}, [t, a, e]), m = R(() => f.concat(c), [c, f]);
|
|
@@ -11507,10 +11510,10 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11507
11510
|
}) }) });
|
|
11508
11511
|
}, qj = ({ searchTypes: e, navigateFunction: t, currentPath: n, homePath: r = "/", className: a, staticAppItems: o, searchEndpointUri: s }) => {
|
|
11509
11512
|
var y;
|
|
11510
|
-
const { texts: { appSearch: l } } = V(X), [c, u] =
|
|
11513
|
+
const { texts: { appSearch: l } } = V(X), [c, u] = B(e.length > 0 ? ((y = e.at(0)) == null ? void 0 : y.key) ?? null : null), d = R(() => e.find((w) => w.key === c) ?? null, [e, c]), [p, f] = B(""), [m, g] = Xa(encodeURIComponent(p), 500), { isLoading: b, searchItems: h } = zc(c, m, s, !1, o), [v, x] = B(!1);
|
|
11511
11514
|
z(() => {
|
|
11512
|
-
(
|
|
11513
|
-
}, [
|
|
11515
|
+
(h.length > 0 || b) && x(!0);
|
|
11516
|
+
}, [h, b]);
|
|
11514
11517
|
const N = Z(null);
|
|
11515
11518
|
return z(() => {
|
|
11516
11519
|
var w;
|
|
@@ -11520,11 +11523,11 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11520
11523
|
}, children: /* @__PURE__ */ i.jsxs(yr, { className: I(Wt.inputGroup, a), children: [
|
|
11521
11524
|
/* @__PURE__ */ i.jsx(yr.Text, { className: I("p-1 rounded", Wt.inputGroupText, Wt.left), children: /* @__PURE__ */ i.jsx(jN, { searchTypes: e, selectedType: d, setSelectedType: u }) }),
|
|
11522
11525
|
/* @__PURE__ */ i.jsx(Se.Control, { ref: N, placeholder: l.searchPlaceholder, type: "text", size: "sm", className: I("luminus-app-search-input", Wt.input), value: p, onChange: (w) => {
|
|
11523
|
-
var
|
|
11524
|
-
return f(((
|
|
11525
|
-
}, onFocus: () =>
|
|
11526
|
+
var S;
|
|
11527
|
+
return f(((S = w.target) == null ? void 0 : S.value) ?? "");
|
|
11528
|
+
}, onFocus: () => h.length > 0 && x(!0) }),
|
|
11526
11529
|
/* @__PURE__ */ i.jsx(yr.Text, { className: I("p-0 rounded", Wt.inputGroupText, Wt.right), children: /* @__PURE__ */ i.jsx("button", { type: "submit", className: I("text-primary", Wt.submitButton), children: /* @__PURE__ */ i.jsx(au, {}) }) }),
|
|
11527
|
-
/* @__PURE__ */ i.jsx(AN, { query: m, searchTypes: e, show:
|
|
11530
|
+
/* @__PURE__ */ i.jsx(AN, { query: m, searchTypes: e, show: v, onCancel: () => x(!1), groups: h, isLoading: b })
|
|
11528
11531
|
] }) });
|
|
11529
11532
|
}, TN = ({ item: e, searchTypes: t }) => {
|
|
11530
11533
|
const { ProjectIconComponent: n } = V(X), r = R(() => t.find((s) => s.key === e.type), [e.type, t]), a = R(() => Wc(e, r, t), [e, r, t]), o = R(() => Hc(e, r), [e, r]);
|
|
@@ -11541,7 +11544,7 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11541
11544
|
);
|
|
11542
11545
|
}, Yj = ({ query: e, type: t, appSearchTypes: n, searchEndpointUri: r, staticAppItems: a }) => {
|
|
11543
11546
|
var d, p;
|
|
11544
|
-
const { texts: { appSearch: o } } = V(X), [s, l] =
|
|
11547
|
+
const { texts: { appSearch: o } } = V(X), [s, l] = B(""), { searchItems: c, isLoading: u } = zc(t, e, r, !0, a);
|
|
11545
11548
|
return z(() => {
|
|
11546
11549
|
var f;
|
|
11547
11550
|
s || c === null || c.length === 0 || l(((f = c[0].key) == null ? void 0 : f.category) ?? "");
|
|
@@ -11559,13 +11562,13 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11559
11562
|
const { texts: { userSettings: e } } = V(X), [t, n] = Vn("file-download-try-opening", !0);
|
|
11560
11563
|
return /* @__PURE__ */ i.jsx(Xt, { collapsible: !0, title: e.downloads, defaultOpen: !0, children: /* @__PURE__ */ i.jsx(Kn, { type: "switch", value: t === void 0 ? !0 : t, onChange: n, label: e.tryOpenFileLabel }) });
|
|
11561
11564
|
}, RN = ({ show: e, handleClose: t, onConfirm: n, apiCreateBackup: r }) => {
|
|
11562
|
-
const { texts: { userSettings: a } } = V(X), { zStringRequired: o } = Rr(), { addNotification: s } = Jt(), l = Ke(), { startLoading: c, stopLoading: u } = V(ht), [d, p] =
|
|
11565
|
+
const { texts: { userSettings: a } } = V(X), { zStringRequired: o } = Rr(), { addNotification: s } = Jt(), l = Ke(), { startLoading: c, stopLoading: u } = V(ht), [d, p] = B(null), f = cn.object({
|
|
11563
11566
|
name: o()
|
|
11564
|
-
}), m = Lr({ resolver: kr(f) }), g = A(async (
|
|
11565
|
-
name:
|
|
11566
|
-
setting:
|
|
11567
|
-
}).then(() => !0).catch(() => !1).finally(() => u("localStorageSettingPost"))), [l, r, c, u]), b = async (
|
|
11568
|
-
await g(
|
|
11567
|
+
}), m = Lr({ resolver: kr(f) }), g = A(async (h, v) => (c("localStorageSettingPost"), l.post(r, {
|
|
11568
|
+
name: h,
|
|
11569
|
+
setting: v
|
|
11570
|
+
}).then(() => !0).catch(() => !1).finally(() => u("localStorageSettingPost"))), [l, r, c, u]), b = async (h) => {
|
|
11571
|
+
await g(h.name, JSON.stringify(d)) && (s(a.localStorageCreateBackupSuccess, "success"), n());
|
|
11569
11572
|
};
|
|
11570
11573
|
return z(() => {
|
|
11571
11574
|
e && p(Nu());
|
|
@@ -11584,9 +11587,9 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11584
11587
|
apiCreateBackup: "/localStorageSettings",
|
|
11585
11588
|
apiDeleteBackup: "/localStorageSettings"
|
|
11586
11589
|
}, Xj = ({ apiUrls: { apiGetBackups: e = hr.apiGetBackups, apiCreateBackup: t = hr.apiCreateBackup, apiDeleteBackup: n = hr.apiDeleteBackup } = hr }) => {
|
|
11587
|
-
const { ProjectIconComponent: r, texts: { userSettings: a } } = V(X), { confirm: o } = wt(), s = Ke(), { startLoading: l, stopLoading: c } = V(ht), { addNotification: u } = Jt(), [d, p] =
|
|
11590
|
+
const { ProjectIconComponent: r, texts: { userSettings: a } } = V(X), { confirm: o } = wt(), s = Ke(), { startLoading: l, stopLoading: c } = V(ht), { addNotification: u } = Jt(), [d, p] = B(!1), { data: f, setData: m, reloadData: g } = Me(e), b = A(async (x) => (l("localStorageSettingDelete"), s.delete(`${n}/${x}`).then(() => !0).catch(() => !1).finally(() => c("localStorageSettingDelete"))), [s, n, l, c]), h = A(async (x) => {
|
|
11588
11591
|
await o(a.localStorageDeleteBackupConfirm) && await b(x) && (u(a.localStorageDeleteBackupSuccess, "success"), m((N) => (N == null ? void 0 : N.filter((y) => y.id !== x)) ?? null));
|
|
11589
|
-
}, [o, a, b, u, m]),
|
|
11592
|
+
}, [o, a, b, u, m]), v = A(async (x) => {
|
|
11590
11593
|
x.setting && await o(a.localStorageLoadBackup) && (ju(x.setting) ? u(a.localStorageLoadBackupSuccess, "success") : u(a.localStorageLoadBackupError, "danger"));
|
|
11591
11594
|
}, [o, a, u]);
|
|
11592
11595
|
return /* @__PURE__ */ i.jsxs(Xt, { collapsible: !0, title: a.localStorage, defaultOpen: !0, children: [
|
|
@@ -11596,13 +11599,13 @@ e.label === "", ws = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, Ns =
|
|
|
11596
11599
|
{
|
|
11597
11600
|
role: "button",
|
|
11598
11601
|
className: "list-group-item list-group-item-action d-flex justify-content-between align-items-center",
|
|
11599
|
-
onClick: () =>
|
|
11602
|
+
onClick: () => v(x),
|
|
11600
11603
|
children: [
|
|
11601
11604
|
/* @__PURE__ */ i.jsx(F, { variant: "body2", children: x.name }),
|
|
11602
11605
|
/* @__PURE__ */ i.jsxs("div", { className: "d-flex align-items-center gap-3", children: [
|
|
11603
11606
|
/* @__PURE__ */ i.jsx(F, { variant: "body2", className: "text-muted", children: x.date ? pn(x.date) : "" }),
|
|
11604
11607
|
/* @__PURE__ */ i.jsx(te, { size: "sm", color: "danger", onClick: (y) => {
|
|
11605
|
-
y.stopPropagation(),
|
|
11608
|
+
y.stopPropagation(), h(x.id);
|
|
11606
11609
|
}, children: /* @__PURE__ */ i.jsx(r, { icon: "delete" }) })
|
|
11607
11610
|
] })
|
|
11608
11611
|
]
|