react-luminus-components 1.2.79 → 1.2.81
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/README.md +355 -355
- package/dist/.vite/manifest.json +65 -65
- package/dist/{EventType-DyGsWo_d.cjs → EventType-BD9A1JYV.cjs} +1 -1
- package/dist/{EventType-CpXqyU6N.js → EventType-CFrd7EyJ.js} +1 -1
- package/dist/{UserAvatarToggle-ByG1NTlM.js → NoInputContainer-6brUvTDa.js} +640 -640
- package/dist/{UserAvatarToggle-cJKNvqKT.cjs → NoInputContainer-84nW-1Nk.cjs} +16 -16
- package/dist/SimpleTooltip-Vvq6ctZK.cjs +1 -0
- package/dist/SimpleTooltip-_bjk41Zj.js +5 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +42 -42
- package/dist/{dateUtils-Crak7ii9.js → dateUtils-Clmwz8MD.js} +1 -1
- package/dist/{dateUtils-CWKBTsx7.cjs → dateUtils-DjdXQqjK.cjs} +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +44 -44
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +13 -13
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +967 -967
- package/dist/models/texts/AxiosTexts.d.ts +1 -0
- package/dist/models/types/ApiErrorResult.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/textUtils-BZyf3rh0.js +41 -0
- package/dist/textUtils-DPetpRXS.cjs +1 -0
- package/dist/{useConfirm-C2tLxO-b.js → useConfirm-BN5n6cbc.js} +1 -1
- package/dist/useConfirm-OHtTp5zx.cjs +1 -0
- package/dist/{useFormControlType-oJGqgThz.js → useFormControlType-BAFqxupC.js} +3 -3
- package/dist/{usePermissions-CPbQAr2_.js → usePermissions--yvVao7K.js} +1 -1
- package/dist/usePermissions-L7MvTSTx.cjs +1 -0
- package/dist/utils/apiErrorFields/apiErrorFieldsUtils.d.ts +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +15 -14
- package/package.json +100 -100
- package/dist/SimpleTooltip-CWolhOb-.cjs +0 -1
- package/dist/SimpleTooltip-Dlu42YM6.js +0 -5
- package/dist/textUtils-BbxuIsKq.js +0 -36
- package/dist/textUtils-CHVVh2oi.cjs +0 -1
- package/dist/useConfirm-HYlAqd-s.cjs +0 -1
- package/dist/usePermissions-BlYpl_RP.cjs +0 -1
package/dist/main.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { j as s, c as w, t as re, a as ie, g as cr, T as lr, b as ur, s as jt, E as dr, d as hr, e as mr, f as fr, h as pr, u as V, i as de, k as Qt, F as kt, l as gr, m as wr, n as xr, o as yr, p as br, q as vr, r as _r, v as jr, w as lt, x as ut, y as kr, z as Cr, P as _e, A as he, B as Nr, C as $r, D as dt, S as Ct, G as Pe, H as Ae, I as ht, J as Ir, K as Xt, L as Ie, M as qe, O as Nt, N as Sr, Q as oe, R as Tr, U as Er, V as Jt, W as mt, X as ft, Y as
|
|
2
|
-
import { ai as yl, ah as bl } from "./
|
|
1
|
+
import { j as s, c as w, t as re, a as ie, g as cr, T as lr, b as ur, s as jt, E as dr, d as hr, e as mr, f as fr, h as pr, u as V, i as de, k as Qt, F as kt, l as gr, m as wr, n as xr, o as yr, p as br, q as vr, r as _r, v as jr, w as lt, x as ut, y as kr, z as Cr, P as _e, A as he, B as Nr, C as $r, D as dt, S as Ct, G as Pe, H as Ae, I as ht, J as Ir, K as Xt, L as Ie, M as qe, O as Nt, N as Sr, Q as oe, R as Tr, U as Er, V as Jt, W as mt, X as ft, Y as z, Z as Or, _ as Zt, $ as Mr, a0 as en, a1 as Dr, a2 as Pr, a3 as Ar, a4 as Fr, a5 as tn, a6 as ke, a7 as Wr, a8 as Rr, a9 as Lr, aa as qr, ab as Yr, ac as Ze, ad as Ve, ae as nn, af as xe, ag as Br } from "./NoInputContainer-6brUvTDa.js";
|
|
2
|
+
import { ai as yl, ah as bl } from "./NoInputContainer-6brUvTDa.js";
|
|
3
3
|
import * as A from "react";
|
|
4
|
-
import J, { useCallback as O, useMemo as Q, useEffect as D, useRef as Y, useState as P, useReducer as rn, useContext as F,
|
|
5
|
-
import { c as le, d as zr, C as Kr, a as on, u as Qr, q as $t, E as Fe, M as We, L as Xr } from "./EventType-
|
|
4
|
+
import J, { useCallback as O, useMemo as Q, useEffect as D, useRef as Y, useState as P, useReducer as rn, useContext as F, Component as Hr, isValidElement as Gr, Suspense as Vr, createElement as Ur } from "react";
|
|
5
|
+
import { c as le, d as zr, C as Kr, a as on, u as Qr, q as $t, E as Fe, M as We, L as Xr } from "./EventType-CFrd7EyJ.js";
|
|
6
6
|
import { useFormContext as me, Controller as sn } from "react-hook-form";
|
|
7
|
-
import { m as Jr, a as an } from "./textUtils-
|
|
8
|
-
import { u as cn, a as ln, b as un } from "./useFormControlType-
|
|
9
|
-
import { S as _l } from "./SimpleTooltip-
|
|
7
|
+
import { m as Jr, a as an } from "./textUtils-BZyf3rh0.js";
|
|
8
|
+
import { u as cn, a as ln, b as un } from "./useFormControlType-BAFqxupC.js";
|
|
9
|
+
import { S as _l } from "./SimpleTooltip-_bjk41Zj.js";
|
|
10
10
|
const qc = ({ fileLoader: t, fileName: e, children: n }) => {
|
|
11
11
|
const r = O(async () => {
|
|
12
12
|
var l;
|
|
@@ -2963,1016 +2963,1016 @@ const Fa = "_button_1wjon_1", Wa = "_filled_1wjon_7", Ra = "_sm_1wjon_13", La =
|
|
|
2963
2963
|
] });
|
|
2964
2964
|
}, Qa = "_widget_etgh3_1", Xa = {
|
|
2965
2965
|
widget: Qa
|
|
2966
|
-
},
|
|
2967
|
-
/* @__PURE__ */ s.jsx(
|
|
2968
|
-
/* @__PURE__ */ s.jsx(
|
|
2969
|
-
] }),
|
|
2970
|
-
const
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
},
|
|
2976
|
-
var d;
|
|
2977
|
-
r && r(((d = u.target) == null ? void 0 : d.checked) ?? !1);
|
|
2978
|
-
}, className: i ?? "", hidden: o ?? !1, disabled: a ?? !1 }) }), Vc = ({ InputContainer: t = Ve, type: e, value: n, onChange: r, debounceMs: o, label: a, withoutLabel: i, placeholder: l, size: c, hidden: u, disabled: d, showClearIcon: h, clearValue: m, list: p, className: v, step: x }) => {
|
|
2979
|
-
const f = e === "number", j = O(() => {
|
|
2980
|
-
if (!r)
|
|
2981
|
-
return;
|
|
2982
|
-
const N = m ?? null;
|
|
2983
|
-
r(f ? N ? Number(N) : null : (N == null ? void 0 : N.toString()) ?? "");
|
|
2984
|
-
}, [m, f, r]), b = Y(null), [g, C] = P((n == null ? void 0 : n.toString()) ?? ""), k = O((N) => {
|
|
2985
|
-
const _ = N;
|
|
2986
|
-
r && (f && r(_ == null || _ === "" ? null : Number(_)), r(_ || null));
|
|
2987
|
-
}, [f, r]), y = O((N) => {
|
|
2988
|
-
var T;
|
|
2989
|
-
const _ = (T = N.target) == null ? void 0 : T.value;
|
|
2990
|
-
if (!o) {
|
|
2991
|
-
k(_);
|
|
2992
|
-
return;
|
|
2993
|
-
}
|
|
2994
|
-
C(_), b.current !== null && window.clearTimeout(b.current), b.current = window.setTimeout(() => {
|
|
2995
|
-
k(_);
|
|
2996
|
-
}, o);
|
|
2997
|
-
}, [o, k]);
|
|
2998
|
-
D(() => {
|
|
2999
|
-
C(n === null ? "" : n.toString());
|
|
3000
|
-
}, [n]);
|
|
3001
|
-
const [$, M] = P(!1), S = cn(e, n ? n.toString() ?? null : null, $);
|
|
3002
|
-
return /* @__PURE__ */ s.jsxs(t, { withoutLabel: i, label: a ?? "", hidden: u, className: v, children: [
|
|
3003
|
-
/* @__PURE__ */ s.jsx(ee.Control, { type: S, placeholder: l ?? a, size: c, value: o ? g : n ?? "", onChange: y, className: v ?? "", hidden: u, disabled: d ?? !1, list: p, onFocus: () => M(!0), onBlur: () => M(!1), step: x }),
|
|
3004
|
-
h && n && r && !d && /* @__PURE__ */ s.jsx("div", { className: `luminus-input-remove-icon ${e !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ s.jsx(Z, { color: "secondary", size: "sm", onClick: j, children: /* @__PURE__ */ s.jsx(ke, {}) }) })
|
|
3005
|
-
] });
|
|
3006
|
-
}, Uc = ({
|
|
3007
|
-
InputContainer: t = Ve,
|
|
3008
|
-
value: e,
|
|
3009
|
-
options: n,
|
|
3010
|
-
onChange: r,
|
|
3011
|
-
label: o,
|
|
3012
|
-
withoutLabel: a,
|
|
3013
|
-
isNumber: i,
|
|
3014
|
-
size: l,
|
|
3015
|
-
hidden: c,
|
|
3016
|
-
disabled: u,
|
|
3017
|
-
showClearIcon: d,
|
|
3018
|
-
clearValue: h,
|
|
3019
|
-
noSortOptions: m,
|
|
3020
|
-
className: p,
|
|
3021
|
-
noEmptyOption: v
|
|
3022
|
-
// it will still add the empty option if there is no value provided or value is empty string or null
|
|
3023
|
-
}) => {
|
|
3024
|
-
const x = O(() => {
|
|
3025
|
-
if (!r)
|
|
3026
|
-
return;
|
|
3027
|
-
const f = h ?? null;
|
|
3028
|
-
r(i ? f ? Number(f) : null : (f == null ? void 0 : f.toString()) ?? "");
|
|
3029
|
-
}, [h, i, r]);
|
|
3030
|
-
return /* @__PURE__ */ s.jsxs(t, { withoutLabel: a, label: o ?? "", hidden: c, className: p, children: [
|
|
3031
|
-
/* @__PURE__ */ s.jsxs(ee.Select, { size: l, value: e ?? "", onChange: (f) => {
|
|
3032
|
-
var b;
|
|
3033
|
-
if (!r)
|
|
3034
|
-
return;
|
|
3035
|
-
const j = (b = f.target) == null ? void 0 : b.value;
|
|
3036
|
-
i && r(j ? parseInt(j, 10) : null), r(j || null);
|
|
3037
|
-
}, className: p ?? "", hidden: c, disabled: u ?? !1, children: [
|
|
3038
|
-
v && !(e == null || e === "") ? void 0 : /* @__PURE__ */ s.jsx("option", { value: "" }),
|
|
3039
|
-
n == null ? void 0 : n.sort((f, j) => m ? 0 : (f.name ?? "").localeCompare(j.name ?? "")).map((f) => /* @__PURE__ */ s.jsx("option", { value: f.id ?? "", children: f.name }, f.id))
|
|
3040
|
-
] }),
|
|
3041
|
-
d && e && r && !u && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ s.jsx(Z, { color: "secondary", size: "sm", onClick: x, children: /* @__PURE__ */ s.jsx(ke, {}) }) })
|
|
2966
|
+
}, Ja = ({ show: t, widgets: e, handleClose: n, onWidgetPicked: r, texts: o }) => /* @__PURE__ */ s.jsxs(We, { show: t, onHide: () => n(), children: [
|
|
2967
|
+
/* @__PURE__ */ s.jsx(We.Header, { closeButton: !0, children: /* @__PURE__ */ s.jsx(We.Title, { children: o.pickWidgetToAdd }) }),
|
|
2968
|
+
/* @__PURE__ */ s.jsx(We.Body, { children: /* @__PURE__ */ s.jsx("div", { className: "list-group", children: e.filter((a) => a.id >= 0).map((a) => /* @__PURE__ */ s.jsx("div", { role: "button", className: "list-group-item bg-white", onClick: () => r(a.id), children: /* @__PURE__ */ s.jsx(z, { variant: "body", children: a.name }) })) }) })
|
|
2969
|
+
] }), Bt = ({ availableWidgets: t, onAdd: e, texts: n }) => {
|
|
2970
|
+
const [r, o] = P(!1);
|
|
2971
|
+
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2972
|
+
/* @__PURE__ */ s.jsx("div", { className: w("luminus-empty-widget", Xa.widget), children: /* @__PURE__ */ s.jsx(Z, { onClick: () => o(!0), children: /* @__PURE__ */ s.jsx(Or, {}) }) }),
|
|
2973
|
+
/* @__PURE__ */ s.jsx(Ja, { show: r, widgets: t, handleClose: () => o(!1), onWidgetPicked: (a) => {
|
|
2974
|
+
o(!1), e(a);
|
|
2975
|
+
}, texts: n })
|
|
3042
2976
|
] });
|
|
3043
|
-
},
|
|
3044
|
-
|
|
3045
|
-
const [g, C] = P(n), [k, y] = P(!1);
|
|
3046
|
-
D(() => {
|
|
3047
|
-
C(n);
|
|
3048
|
-
}, [n]);
|
|
3049
|
-
const $ = O((R) => {
|
|
3050
|
-
C(R);
|
|
3051
|
-
}, []), M = O((R) => {
|
|
3052
|
-
y(!1), $(R);
|
|
3053
|
-
}, [$]);
|
|
2977
|
+
}, Za = (t) => {
|
|
2978
|
+
const [e, n] = P({ widgets: [] });
|
|
3054
2979
|
D(() => {
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
2980
|
+
const o = localStorage.getItem("dashboardConfig");
|
|
2981
|
+
o ? n(JSON.parse(o)) : t && n(t);
|
|
2982
|
+
}, [t]);
|
|
2983
|
+
const r = O((o) => {
|
|
2984
|
+
n(o), localStorage.setItem("dashboardConfig", JSON.stringify(o));
|
|
2985
|
+
}, []);
|
|
2986
|
+
return { dashboardConfig: e, onChangeDashboardConfig: r };
|
|
2987
|
+
}, ei = "_dashboard_16plm_1", ti = "_widgets-grid_16plm_1", ni = "_widget-wrapper_16plm_8", ri = "_full-width_16plm_13", oi = "_widget-edit_16plm_16", si = "_remove-icon_16plm_19", ai = "_full-width-icon_16plm_26", ii = "_widget-edit-overlay_16plm_36", ae = {
|
|
2988
|
+
dashboard: ei,
|
|
2989
|
+
"widgets-grid": "_widgets-grid_16plm_1",
|
|
2990
|
+
widgetsGrid: ti,
|
|
2991
|
+
"widget-wrapper": "_widget-wrapper_16plm_8",
|
|
2992
|
+
widgetWrapper: ni,
|
|
2993
|
+
"full-width": "_full-width_16plm_13",
|
|
2994
|
+
fullWidth: ri,
|
|
2995
|
+
"widget-edit": "_widget-edit_16plm_16",
|
|
2996
|
+
widgetEdit: oi,
|
|
2997
|
+
"remove-icon": "_remove-icon_16plm_19",
|
|
2998
|
+
removeIcon: si,
|
|
2999
|
+
"full-width-icon": "_full-width-icon_16plm_26",
|
|
3000
|
+
fullWidthIcon: ai,
|
|
3001
|
+
"widget-edit-overlay": "_widget-edit-overlay_16plm_36",
|
|
3002
|
+
widgetEditOverlay: ii
|
|
3003
|
+
};
|
|
3004
|
+
class ci extends Hr {
|
|
3005
|
+
constructor(e) {
|
|
3006
|
+
super(e), this.state = { hasError: !1 }, this.reload = this.reload.bind(this);
|
|
3007
|
+
}
|
|
3008
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3009
|
+
static getDerivedStateFromError(e) {
|
|
3010
|
+
return { hasError: !0 };
|
|
3011
|
+
}
|
|
3012
|
+
componentDidCatch(e, n) {
|
|
3013
|
+
console.error("Error:", e, n);
|
|
3014
|
+
}
|
|
3015
|
+
reload() {
|
|
3016
|
+
this.setState({ hasError: !1 });
|
|
3017
|
+
}
|
|
3018
|
+
render() {
|
|
3019
|
+
const { fallback: e, children: n, texts: r, reloadButtonDisplay: o = "append-after-child" } = this.props;
|
|
3020
|
+
return this.state.hasError ? o === "inject-to-child" && Gr(e) ? J.cloneElement(e, {
|
|
3021
|
+
...e.props
|
|
3022
|
+
}, /* @__PURE__ */ s.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
3023
|
+
...e.props.children,
|
|
3024
|
+
/* @__PURE__ */ s.jsx(ct, { type: "button", onClick: this.reload, children: r.reloadButtonContent })
|
|
3025
|
+
] })) : /* @__PURE__ */ s.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
3026
|
+
e,
|
|
3027
|
+
o === "none" ? null : /* @__PURE__ */ s.jsx(ct, { type: "button", onClick: this.reload, children: r.reloadButtonContent })
|
|
3028
|
+
] }) : n;
|
|
3029
|
+
}
|
|
3030
|
+
}
|
|
3031
|
+
const li = (t) => (n) => {
|
|
3032
|
+
const { errorBoundaryTexts: r } = F(oe);
|
|
3033
|
+
return /* @__PURE__ */ s.jsx(t, { texts: r, ...n });
|
|
3034
|
+
}, ui = li(ci), di = "_widget-card_e9tsb_1", hi = {
|
|
3035
|
+
"widget-card": "_widget-card_e9tsb_1",
|
|
3036
|
+
widgetCard: di
|
|
3037
|
+
}, Ht = ({ children: t, title: e, headerContent: n }) => /* @__PURE__ */ s.jsx(gc, { className: w(hi.widgetCard, "luminus-widget"), title: e, headerContent: n, contentClassName: "h-100 overflow-auto", children: t }), mi = ({ children: t, title: e }) => {
|
|
3038
|
+
const { widgetTexts: n } = F(oe);
|
|
3039
|
+
return /* @__PURE__ */ s.jsx(ui, { fallback: /* @__PURE__ */ s.jsx(Ht, { title: e, children: n.fallbackError }), reloadButtonDisplay: "inject-to-child", children: /* @__PURE__ */ s.jsx(Vr, { fallback: /* @__PURE__ */ s.jsx(Ht, { title: e, children: /* @__PURE__ */ s.jsx(Zr, {}) }), children: t }) });
|
|
3040
|
+
}, Hc = ({ availableWidgets: t, editMode: e, defaultDashboardConfig: n }) => {
|
|
3041
|
+
var d;
|
|
3042
|
+
const { homeDashboardTexts: r } = F(oe), { dashboardConfig: o, onChangeDashboardConfig: a } = Za(n), i = O((h, m) => {
|
|
3043
|
+
var p, v;
|
|
3044
|
+
h === ((p = o.widgets) == null ? void 0 : p.length) ? a({
|
|
3045
|
+
...o,
|
|
3046
|
+
widgets: [...o.widgets, { widgetId: m, fullWidth: !1 }]
|
|
3047
|
+
}) : a({
|
|
3048
|
+
...o,
|
|
3049
|
+
widgets: ((v = o.widgets) == null ? void 0 : v.map((x, f) => f === h ? { widgetId: m, fullWidth: !1 } : x)) ?? []
|
|
3050
|
+
});
|
|
3051
|
+
}, [o, a]), l = O((h) => {
|
|
3052
|
+
var m, p;
|
|
3053
|
+
((m = o.widgets[h]) == null ? void 0 : m.widgetId) === -1 ? a({
|
|
3054
|
+
...o,
|
|
3055
|
+
widgets: ((p = o.widgets) == null ? void 0 : p.filter((v, x) => x !== h)) ?? []
|
|
3056
|
+
}) : i(h, -1);
|
|
3057
|
+
}, [o, a, i]), c = O((h) => {
|
|
3058
|
+
var m;
|
|
3059
|
+
a({
|
|
3060
|
+
...o,
|
|
3061
|
+
widgets: ((m = o.widgets) == null ? void 0 : m.map((p, v) => v === h ? { ...p, fullWidth: !p.fullWidth } : p)) ?? []
|
|
3062
|
+
});
|
|
3063
|
+
}, [o, a]), u = O((h, m, p) => h ? /* @__PURE__ */ s.jsxs("div", { className: w(ae.widgetWrapper, {
|
|
3064
|
+
[ae.widgetEdit]: e && h.id !== -1
|
|
3065
|
+
}, { [ae.fullWidth]: p }), children: [
|
|
3066
|
+
e && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3067
|
+
/* @__PURE__ */ s.jsx(Z, { color: "danger", onClick: () => l(m), className: w(ae.removeIcon), children: /* @__PURE__ */ s.jsx(Zt, {}) }),
|
|
3068
|
+
/* @__PURE__ */ s.jsx(Z, { color: p ? "danger" : "primary", onClick: () => c(m), className: w(ae.fullWidthIcon), children: /* @__PURE__ */ s.jsx(Mr, {}) })
|
|
3082
3069
|
] }),
|
|
3083
|
-
|
|
3070
|
+
h.id === -1 ? e && /* @__PURE__ */ s.jsx("div", { className: ae.widgetWrapper, children: /* @__PURE__ */ s.jsx(Bt, { availableWidgets: t, onAdd: (v) => i(m, v), texts: r }) }) : /* @__PURE__ */ s.jsx(mi, { title: h.title, children: /* @__PURE__ */ s.jsx(h.WidgetElement, { title: h.title }) }),
|
|
3071
|
+
h.id > -1 && e && /* @__PURE__ */ s.jsx("div", { className: ae.widgetEditOverlay })
|
|
3072
|
+
] }, m) : /* @__PURE__ */ s.jsx(s.Fragment, {}), [
|
|
3073
|
+
e,
|
|
3074
|
+
i,
|
|
3075
|
+
l,
|
|
3076
|
+
c,
|
|
3077
|
+
t,
|
|
3078
|
+
r
|
|
3079
|
+
]);
|
|
3080
|
+
return /* @__PURE__ */ s.jsx("div", { className: ae.dashboard, children: /* @__PURE__ */ s.jsxs("div", { className: ae.widgetsGrid, children: [
|
|
3081
|
+
(d = o.widgets) == null ? void 0 : d.map((h, m) => u(t.find((p) => p.id === h.widgetId), m, h.fullWidth)),
|
|
3082
|
+
e && /* @__PURE__ */ s.jsx(Bt, { availableWidgets: t, onAdd: (h) => {
|
|
3083
|
+
var m;
|
|
3084
|
+
return i((m = o.widgets) == null ? void 0 : m.length, h);
|
|
3085
|
+
}, texts: r })
|
|
3084
3086
|
] }) });
|
|
3085
|
-
},
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
D(() => {
|
|
3108
|
-
const g = n.split(".");
|
|
3109
|
-
let C = d.errors;
|
|
3110
|
-
g.forEach((k) => {
|
|
3111
|
-
C !== void 0 && (C = C[k]);
|
|
3112
|
-
}), v(C);
|
|
3113
|
-
}, [d, n]), D(() => {
|
|
3114
|
-
d.isSubmitted && f(!0);
|
|
3115
|
-
}, [d]);
|
|
3116
|
-
const b = p !== void 0;
|
|
3117
|
-
return /* @__PURE__ */ s.jsxs(t, { isForRadioInput: !0, hidden: l, withoutLabel: !e, label: `${e}${a ? " *" : ""}`, isInvalid: b, className: c, children: [
|
|
3118
|
-
j.map((g) => /* @__PURE__ */ s.jsx(ee.Check, { id: `radio-${g.id}`, label: g.name, type: "radio", value: g.id ?? "", checked: m(n) === g.id, ...u(n, {
|
|
3119
|
-
onChange: () => {
|
|
3120
|
-
o && o.forEach((C) => h(C, null, { shouldDirty: !0, shouldValidate: x }));
|
|
3121
|
-
}
|
|
3122
|
-
}), isInvalid: b, hidden: l, disabled: i, className: "w-100" }, g.id)),
|
|
3123
|
-
p && /* @__PURE__ */ s.jsx(ye, { message: p.message })
|
|
3087
|
+
}, fi = "_badge_nhser_1", pi = "_sm_nhser_1", gi = "_md_nhser_4", wi = "_lg_nhser_7", Gt = {
|
|
3088
|
+
badge: fi,
|
|
3089
|
+
sm: pi,
|
|
3090
|
+
md: gi,
|
|
3091
|
+
lg: wi
|
|
3092
|
+
}, Gc = ({ children: t, color: e = "primary", size: n = "md", className: r }) => /* @__PURE__ */ s.jsx("span", { className: w(`luminus-badge badge bg-${e} ${r ?? ""}`, Gt.badge, Gt[n]), children: t }), xi = "_collapse-icon_1ahhn_1", yi = "_collapsed_1ahhn_6", Vt = {
|
|
3093
|
+
"collapse-icon": "_collapse-icon_1ahhn_1",
|
|
3094
|
+
collapseIcon: xi,
|
|
3095
|
+
collapsed: yi
|
|
3096
|
+
}, Vc = ({ title: t, children: e, className: n, ...r }) => {
|
|
3097
|
+
const o = r.controlled ? !1 : r.defaultOpen ?? !1, [a, i] = P(o), l = r.controlled ? r.isOpen : a;
|
|
3098
|
+
return D(() => {
|
|
3099
|
+
i(o);
|
|
3100
|
+
}, [o]), /* @__PURE__ */ s.jsxs("div", { className: n ?? "", children: [
|
|
3101
|
+
/* @__PURE__ */ s.jsxs("div", { role: "button", className: "d-flex align-items-center justify-content-between pb-3 pt-2", onClick: () => r.controlled ? r.onToggle(!r.isOpen) : i(!a), children: [
|
|
3102
|
+
/* @__PURE__ */ s.jsx(z, { variant: "h6", children: t }),
|
|
3103
|
+
/* @__PURE__ */ s.jsx(en, { className: w(Vt.collapseIcon, {
|
|
3104
|
+
[Vt.collapsed]: l
|
|
3105
|
+
}) })
|
|
3106
|
+
] }),
|
|
3107
|
+
/* @__PURE__ */ s.jsx(gn, { in: l, children: /* @__PURE__ */ s.jsx("div", { children: e }) }),
|
|
3108
|
+
/* @__PURE__ */ s.jsx("hr", { className: `my-0 ${l ? "mt-3" : ""}` })
|
|
3124
3109
|
] });
|
|
3125
|
-
},
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
},
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3110
|
+
}, bi = "_feedback_esh1j_1", vi = "_feedback-spacer_esh1j_8", Ut = {
|
|
3111
|
+
feedback: bi,
|
|
3112
|
+
"feedback-spacer": "_feedback-spacer_esh1j_8",
|
|
3113
|
+
feedbackSpacer: vi
|
|
3114
|
+
}, ye = ({ message: t }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3115
|
+
/* @__PURE__ */ s.jsx("div", { className: w("invalid-feedback luminus-invalid-feedback", Ut.feedback), children: t }),
|
|
3116
|
+
/* @__PURE__ */ s.jsx("div", { className: w("invalid-feedback-spacer", Ut.feedbackSpacer), children: t })
|
|
3117
|
+
] });
|
|
3118
|
+
function _i(t, e, n) {
|
|
3119
|
+
var r = this, o = Y(null), a = Y(0), i = Y(null), l = Y([]), c = Y(), u = Y(), d = Y(t), h = Y(!0);
|
|
3120
|
+
d.current = t;
|
|
3121
|
+
var m = typeof window < "u", p = !e && e !== 0 && m;
|
|
3122
|
+
if (typeof t != "function")
|
|
3123
|
+
throw new TypeError("Expected a function");
|
|
3124
|
+
e = +e || 0;
|
|
3125
|
+
var v = !!(n = n || {}).leading, x = !("trailing" in n) || !!n.trailing, f = "maxWait" in n, j = "debounceOnServer" in n && !!n.debounceOnServer, b = f ? Math.max(+n.maxWait || 0, e) : null;
|
|
3126
|
+
D(function() {
|
|
3127
|
+
return h.current = !0, function() {
|
|
3128
|
+
h.current = !1;
|
|
3129
|
+
};
|
|
3130
|
+
}, []);
|
|
3131
|
+
var g = Q(function() {
|
|
3132
|
+
var C = function(N) {
|
|
3133
|
+
var _ = l.current, T = c.current;
|
|
3134
|
+
return l.current = c.current = null, a.current = N, u.current = d.current.apply(T, _);
|
|
3135
|
+
}, k = function(N, _) {
|
|
3136
|
+
p && cancelAnimationFrame(i.current), i.current = p ? requestAnimationFrame(N) : setTimeout(N, _);
|
|
3137
|
+
}, y = function(N) {
|
|
3138
|
+
if (!h.current)
|
|
3139
|
+
return !1;
|
|
3140
|
+
var _ = N - o.current;
|
|
3141
|
+
return !o.current || _ >= e || _ < 0 || f && N - a.current >= b;
|
|
3142
|
+
}, $ = function(N) {
|
|
3143
|
+
return i.current = null, x && l.current ? C(N) : (l.current = c.current = null, u.current);
|
|
3144
|
+
}, M = function N() {
|
|
3145
|
+
var _ = Date.now();
|
|
3146
|
+
if (y(_))
|
|
3147
|
+
return $(_);
|
|
3148
|
+
if (h.current) {
|
|
3149
|
+
var T = e - (_ - o.current), W = f ? Math.min(T, b - (_ - a.current)) : T;
|
|
3150
|
+
k(N, W);
|
|
3146
3151
|
}
|
|
3147
|
-
}
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
}
|
|
3164
|
-
|
|
3152
|
+
}, S = function() {
|
|
3153
|
+
if (m || j) {
|
|
3154
|
+
var N = Date.now(), _ = y(N);
|
|
3155
|
+
if (l.current = [].slice.call(arguments), c.current = r, o.current = N, _) {
|
|
3156
|
+
if (!i.current && h.current)
|
|
3157
|
+
return a.current = o.current, k(M, e), v ? C(o.current) : u.current;
|
|
3158
|
+
if (f)
|
|
3159
|
+
return k(M, e), C(o.current);
|
|
3160
|
+
}
|
|
3161
|
+
return i.current || k(M, e), u.current;
|
|
3162
|
+
}
|
|
3163
|
+
};
|
|
3164
|
+
return S.cancel = function() {
|
|
3165
|
+
i.current && (p ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), a.current = 0, l.current = o.current = c.current = i.current = null;
|
|
3166
|
+
}, S.isPending = function() {
|
|
3167
|
+
return !!i.current;
|
|
3168
|
+
}, S.flush = function() {
|
|
3169
|
+
return i.current ? $(Date.now()) : u.current;
|
|
3170
|
+
}, S;
|
|
3171
|
+
}, [v, f, e, b, x, p, m, j]);
|
|
3172
|
+
return g;
|
|
3173
|
+
}
|
|
3174
|
+
function ji(t, e) {
|
|
3175
|
+
return t === e;
|
|
3176
|
+
}
|
|
3177
|
+
function ki(t, e) {
|
|
3178
|
+
return e;
|
|
3179
|
+
}
|
|
3180
|
+
function rr(t, e, n) {
|
|
3181
|
+
var r = ji, o = rn(ki, t), a = o[0], i = o[1], l = _i(O(function(u) {
|
|
3182
|
+
return i(u);
|
|
3183
|
+
}, [i]), e, n), c = Y(t);
|
|
3184
|
+
return r(c.current, t) || (l(t), c.current = t), [a, l];
|
|
3185
|
+
}
|
|
3186
|
+
const Ci = "_wrapper_uccrb_1", Ni = "_open_uccrb_9", $i = "_dropdown_uccrb_13", Ii = "_search-input-container_uccrb_19", Si = "_search-input_uccrb_19", Ti = "_loading-container_uccrb_25", Ei = "_items-container_uccrb_32", Oi = "_header-row_uccrb_38", Mi = "_item_uccrb_32", Di = "_name_uccrb_57", Pi = "_column-item_uccrb_62", Ai = "_icon_uccrb_66", Fi = "_clear-button_uccrb_74", X = {
|
|
3187
|
+
wrapper: Ci,
|
|
3188
|
+
open: Ni,
|
|
3189
|
+
dropdown: $i,
|
|
3190
|
+
"search-input-container": "_search-input-container_uccrb_19",
|
|
3191
|
+
searchInputContainer: Ii,
|
|
3192
|
+
"search-input": "_search-input_uccrb_19",
|
|
3193
|
+
searchInput: Si,
|
|
3194
|
+
"loading-container": "_loading-container_uccrb_25",
|
|
3195
|
+
loadingContainer: Ti,
|
|
3196
|
+
"items-container": "_items-container_uccrb_32",
|
|
3197
|
+
itemsContainer: Ei,
|
|
3198
|
+
"header-row": "_header-row_uccrb_38",
|
|
3199
|
+
headerRow: Oi,
|
|
3200
|
+
item: Mi,
|
|
3201
|
+
name: Di,
|
|
3202
|
+
"column-item": "_column-item_uccrb_62",
|
|
3203
|
+
columnItem: Pi,
|
|
3204
|
+
icon: Ai,
|
|
3205
|
+
"clear-button": "_clear-button_uccrb_74",
|
|
3206
|
+
clearButton: Fi
|
|
3207
|
+
}, _t = ({ show: t, onCancel: e, items: n, currentSelection: r, onSelectionChange: o, onSearchQueryChange: a, texts: i, itemsNameWidth: l, additionalColumns: c, displayIdAsName: u = !1, autoHideSearch: d = !1, allItemsLength: h, disabled: m, isLoading: p = !1, inputRef: v }) => {
|
|
3208
|
+
var I;
|
|
3209
|
+
const x = Y(null), f = Y(null), j = Y(null), [b, g] = P(""), [C] = rr(b, 500), [, k] = P(!1), y = (I = v.current) == null ? void 0 : I.getBoundingClientRect(), $ = (y == null ? void 0 : y.x) ?? 0, M = ((y == null ? void 0 : y.x) ?? 0) + ((y == null ? void 0 : y.width) ?? 0), S = (y == null ? void 0 : y.y) ?? 0, N = ((y == null ? void 0 : y.y) ?? 0) + ((y == null ? void 0 : y.height) ?? 0), _ = (y == null ? void 0 : y.width) ?? 0, T = (y == null ? void 0 : y.height) ?? 0, W = 5, R = Q(() => $ ? $ > window.innerWidth / 2 : !1, [$]), B = Q(() => S ? S > window.innerHeight / 2 : !1, [S]);
|
|
3165
3210
|
D(() => {
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3211
|
+
var E;
|
|
3212
|
+
t && ((E = j.current) == null || E.focus());
|
|
3213
|
+
}, [j, t]), D(() => {
|
|
3214
|
+
t || g("");
|
|
3215
|
+
}, [t]), D(() => {
|
|
3216
|
+
a(C);
|
|
3217
|
+
}, [C, a]);
|
|
3218
|
+
const L = O((E) => {
|
|
3219
|
+
switch (E.key) {
|
|
3220
|
+
case "Escape":
|
|
3221
|
+
E.stopPropagation(), e();
|
|
3222
|
+
break;
|
|
3223
|
+
}
|
|
3224
|
+
}, [e]), G = O(() => {
|
|
3225
|
+
k((E) => !E);
|
|
3226
|
+
}, []);
|
|
3227
|
+
D(() => (window.addEventListener("scroll", G), () => {
|
|
3228
|
+
window.removeEventListener("scroll", G);
|
|
3229
|
+
}), [G]), D(() => (window.addEventListener("resize", G), () => {
|
|
3230
|
+
window.removeEventListener("resize", G);
|
|
3231
|
+
}), [G]), cn(L), ln([x, f], e);
|
|
3232
|
+
const se = l ?? (c && c.length > 0 ? 250 : 0), te = (c == null ? void 0 : c.reduce((E, K) => E + (K.width ?? 100), 0)) ?? 0, U = `calc(max(${_}px, ${se}px + ${te}px))`;
|
|
3233
|
+
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3234
|
+
/* @__PURE__ */ s.jsx(sr, { show: t, onClick: e }),
|
|
3235
|
+
r && t && !m && /* @__PURE__ */ s.jsx("button", { ref: f, type: "button", className: w("luminus-dropdown-picker-clear-button", X.clearButton), onClick: () => !m && o(null), style: {
|
|
3236
|
+
top: `calc(${S}px + ${T / 2}px - 12px)`,
|
|
3237
|
+
left: `calc(${$}px - 24px - 8px)`
|
|
3238
|
+
}, children: /* @__PURE__ */ s.jsx(z, { variant: "caption", className: "text-danger", children: /* @__PURE__ */ s.jsx(Zt, { size: 16 }) }) }),
|
|
3239
|
+
/* @__PURE__ */ s.jsx("div", { className: w("luminus-dropdown-picker", X.wrapper, {
|
|
3240
|
+
[X.open]: t
|
|
3241
|
+
}), style: {
|
|
3242
|
+
top: B ? `calc(${S}px - 50vh - 8px)` : `calc(${N}px + 8px)`,
|
|
3243
|
+
left: R ? `calc(${M}px - ${U})` : $,
|
|
3244
|
+
right: R ? `${M}px` : `calc(${$}px + ${U})`,
|
|
3245
|
+
width: U,
|
|
3246
|
+
justifyContent: B ? "flex-end" : "flex-start"
|
|
3247
|
+
}, children: /* @__PURE__ */ s.jsx("div", { ref: x, className: w("shadow rounded", X.dropdown), children: !m && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3248
|
+
d && (h ?? n.length) <= W ? null : /* @__PURE__ */ s.jsx("div", { className: w("search-input-container border-bottom", X.searchInputContainer), children: /* @__PURE__ */ s.jsx(ee.Control, { ref: j, type: "search", size: "sm", className: X.searchInput, placeholder: i.searchPlaceholder, value: b, onChange: (E) => {
|
|
3249
|
+
var K;
|
|
3250
|
+
return g(((K = E.target) == null ? void 0 : K.value) ?? "");
|
|
3251
|
+
} }) }),
|
|
3252
|
+
p ? /* @__PURE__ */ s.jsx("div", { className: X.loadingContainer, children: /* @__PURE__ */ s.jsx(yt, { animation: "border", variant: "primary" }) }) : n.length > 0 && /* @__PURE__ */ s.jsxs("div", { className: w("items", X.itemsContainer), children: [
|
|
3253
|
+
c && c.length > 0 && /* @__PURE__ */ s.jsxs("div", { className: w("header-row border-bottom", X.headerRow), children: [
|
|
3254
|
+
/* @__PURE__ */ s.jsx("div", { className: X.name }),
|
|
3255
|
+
c == null ? void 0 : c.map((E) => /* @__PURE__ */ s.jsx("div", { className: X.columnItem, style: {
|
|
3256
|
+
width: `${E.width ?? 100}px`,
|
|
3257
|
+
minWidth: `${E.width ?? 100}px`,
|
|
3258
|
+
maxWidth: `${E.width ?? 100}px`
|
|
3259
|
+
}, children: /* @__PURE__ */ s.jsx(z, { variant: "caption", children: E.name }) }, E.key))
|
|
3260
|
+
] }),
|
|
3261
|
+
n == null ? void 0 : n.map((E) => /* @__PURE__ */ s.jsxs("button", { type: "button", className: w("item cursor-pointer", X.item), onClick: () => !m && o(E), children: [
|
|
3262
|
+
/* @__PURE__ */ s.jsx("div", { className: X.name, children: /* @__PURE__ */ s.jsx(z, { variant: "body2", children: u ? E.id : E.name }) }),
|
|
3263
|
+
c == null ? void 0 : c.map((K) => /* @__PURE__ */ s.jsx("div", { className: X.columnItem, style: {
|
|
3264
|
+
width: `${K.width ?? 100}px`,
|
|
3265
|
+
minWidth: `${K.width ?? 100}px`,
|
|
3266
|
+
maxWidth: `${K.width ?? 100}px`
|
|
3267
|
+
}, children: /* @__PURE__ */ s.jsx(z, { variant: "caption", className: w("text-muted"), children: E.additionalColumns && E.additionalColumns[K.key] }) }, K.key))
|
|
3268
|
+
] }, E.id))
|
|
3269
|
+
] })
|
|
3270
|
+
] }) }) })
|
|
3271
|
+
] });
|
|
3272
|
+
};
|
|
3273
|
+
function Wi(t) {
|
|
3274
|
+
return Dr({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z" }, child: [] }] })(t);
|
|
3275
|
+
}
|
|
3276
|
+
const Ri = "_item_1dy8x_1", or = {
|
|
3277
|
+
item: Ri
|
|
3278
|
+
}, Li = ({
|
|
3279
|
+
color: t = "primary",
|
|
3280
|
+
// icon = <MdOutlineArrowOutward />,
|
|
3281
|
+
icon: e,
|
|
3282
|
+
className: n,
|
|
3283
|
+
children: r,
|
|
3284
|
+
...o
|
|
3285
|
+
}) => /* @__PURE__ */ s.jsxs(Ee.Item, { className: w(`btn luminus-dropdown-item text-nowrap rounded text-${t} ${n ?? ""}`, or.item), ...o, children: [
|
|
3286
|
+
e,
|
|
3287
|
+
r
|
|
3288
|
+
] }), qi = (t) => /* @__PURE__ */ s.jsx(Ee.Toggle, { ...t }), Uc = ({ color: t = "primary", icon: e = /* @__PURE__ */ s.jsx(Jt, { size: 12 }), inputId: n = "context-file-input", accept: r = "*", onUpload: o, multiple: a, className: i, children: l, ...c }) => {
|
|
3289
|
+
const u = (d) => {
|
|
3290
|
+
d.target.files && (o(d.target.files), d.target.value = "");
|
|
3291
|
+
};
|
|
3292
|
+
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3293
|
+
/* @__PURE__ */ s.jsxs("label", { htmlFor: n, className: w(`btn luminus-dropdown-item text-nowrap rounded text-${t} ${i ?? ""}`, or.item), ...c, children: [
|
|
3294
|
+
e,
|
|
3295
|
+
l
|
|
3183
3296
|
] }),
|
|
3184
|
-
|
|
3185
|
-
k && /* @__PURE__ */ s.jsx(ye, { message: k.message })
|
|
3297
|
+
/* @__PURE__ */ s.jsx("input", { id: n, type: "file", accept: r, onChange: u, hidden: !0, multiple: a })
|
|
3186
3298
|
] });
|
|
3187
|
-
},
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3299
|
+
}, Yi = "_divider_1e6rk_1", Bi = {
|
|
3300
|
+
divider: Yi
|
|
3301
|
+
}, zc = ({ className: t }) => /* @__PURE__ */ s.jsx(Ee.Divider, { className: w("luminus-dropdown-divider", t, Bi.divider) }), Hi = "_dropdown_1lk66_1", Gi = {
|
|
3302
|
+
dropdown: Hi
|
|
3303
|
+
}, Vi = ({ toggle: t, children: e, ...n }) => /* @__PURE__ */ s.jsxs(Ee, { ...n, children: [
|
|
3304
|
+
t,
|
|
3305
|
+
/* @__PURE__ */ s.jsx(Ee.Menu, { className: w("luminus-dropdown rounded shadow", Gi.dropdown), children: e })
|
|
3306
|
+
] }), Ui = ({ searchTypes: t, selectedType: e, setSelectedType: n }) => /* @__PURE__ */ s.jsx(Vi, { toggle: /* @__PURE__ */ s.jsx(qi, { as: Pr, icon: null, text: e == null ? void 0 : e.text }), children: t.map((r) => /* @__PURE__ */ s.jsx(Li, { icon: null, onClick: () => n(r), children: r.text }, r.key)) }), zi = "_dropdown_1ddrg_1", Ki = "_open_1ddrg_12", Qi = "_loading-container_1ddrg_15", Xi = "_groups-container_1ddrg_22", Ji = "_group_1ddrg_22", Zi = "_header_1ddrg_26", ec = "_item_1ddrg_33", fe = {
|
|
3307
|
+
dropdown: zi,
|
|
3308
|
+
open: Ki,
|
|
3309
|
+
"loading-container": "_loading-container_1ddrg_15",
|
|
3310
|
+
loadingContainer: Qi,
|
|
3311
|
+
"groups-container": "_groups-container_1ddrg_22",
|
|
3312
|
+
groupsContainer: Xi,
|
|
3313
|
+
group: Ji,
|
|
3314
|
+
header: Zi,
|
|
3315
|
+
item: ec
|
|
3316
|
+
}, tc = ({ show: t, query: e, onCancel: n, groups: r, isLoading: o, searchTypes: a }) => {
|
|
3317
|
+
const { LinkComponent: i, appSearchTexts: l } = F(oe), c = Y(null), u = O((d) => {
|
|
3318
|
+
var m;
|
|
3319
|
+
const h = (m = a.find((p) => p.key === d.type)) == null ? void 0 : m.toPath;
|
|
3320
|
+
return h ? `${h}/${d.searchKey}` : "/not-found";
|
|
3321
|
+
}, [a]);
|
|
3322
|
+
return ln([c], n), /* @__PURE__ */ s.jsx("div", { ref: c, className: w("luminus-app-search-dropdown shadow rounded", fe.dropdown, {
|
|
3323
|
+
[fe.open]: t
|
|
3324
|
+
}), children: o ? /* @__PURE__ */ s.jsx("div", { className: fe.loadingContainer, children: /* @__PURE__ */ s.jsx(yt, { animation: "border", variant: "primary" }) }) : /* @__PURE__ */ s.jsx("div", { className: fe.groupsContainer, children: r == null ? void 0 : r.map((d) => {
|
|
3325
|
+
var h;
|
|
3326
|
+
return /* @__PURE__ */ s.jsxs("div", { className: w(fe.group), children: [
|
|
3327
|
+
/* @__PURE__ */ s.jsxs(i, { to: `/search?query=${e}&type=${d.key.category}`, className: w("group-header", fe.header), onClick: n, children: [
|
|
3328
|
+
/* @__PURE__ */ s.jsx(z, { variant: "body", className: "text-primary", children: d.key.categoryName }),
|
|
3329
|
+
/* @__PURE__ */ s.jsxs(z, { variant: "caption", children: [
|
|
3330
|
+
d.items.length,
|
|
3331
|
+
" ",
|
|
3332
|
+
l.amountFrom,
|
|
3333
|
+
" ",
|
|
3334
|
+
d.key.totalCount
|
|
3335
|
+
] })
|
|
3336
|
+
] }),
|
|
3337
|
+
(h = d.items) == null ? void 0 : h.map((m, p) => /* @__PURE__ */ s.jsxs(
|
|
3338
|
+
i,
|
|
3339
|
+
{
|
|
3340
|
+
to: u(m),
|
|
3341
|
+
className: w("search-item d-flex gap-3 align-items-center justify-content-between", fe.item),
|
|
3342
|
+
onClick: n,
|
|
3343
|
+
children: [
|
|
3344
|
+
/* @__PURE__ */ s.jsx(z, { variant: "body2", className: "text-nowrap text-truncate", children: m.name }),
|
|
3345
|
+
/* @__PURE__ */ s.jsx(z, { variant: "caption", className: "text-primary", children: /* @__PURE__ */ s.jsx(Ar, {}) })
|
|
3346
|
+
]
|
|
3347
|
+
},
|
|
3348
|
+
p
|
|
3349
|
+
))
|
|
3350
|
+
] }, d.key.category);
|
|
3351
|
+
}) }) });
|
|
3352
|
+
}, nc = "_input-group_1lkfy_1", rc = "_input-group-text_1lkfy_5", oc = "_left_1lkfy_9", sc = "_right_1lkfy_13", ac = "_input_1lkfy_1", ic = "_submit-button_1lkfy_20", pe = {
|
|
3353
|
+
"input-group": "_input-group_1lkfy_1",
|
|
3354
|
+
inputGroup: nc,
|
|
3355
|
+
"input-group-text": "_input-group-text_1lkfy_5",
|
|
3356
|
+
inputGroupText: rc,
|
|
3357
|
+
left: oc,
|
|
3358
|
+
right: sc,
|
|
3359
|
+
input: ac,
|
|
3360
|
+
"submit-button": "_submit-button_1lkfy_20",
|
|
3361
|
+
submitButton: ic
|
|
3362
|
+
}, cc = (t, e) => {
|
|
3363
|
+
const n = Fr(), [r, o] = P(!1), [a, i] = P([]), l = !t || !t.key, c = O(() => {
|
|
3364
|
+
if (e.length < 3) {
|
|
3365
|
+
i([]);
|
|
3202
3366
|
return;
|
|
3203
3367
|
}
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
})
|
|
3209
|
-
}, [
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
/* @__PURE__ */ s.
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
}, ref: E, value: B ?? "", onChange: () => {
|
|
3228
|
-
}, isInvalid: K, hidden: c, className: w("w-100", {
|
|
3229
|
-
"luminus-dropdown-picker-disabled": u,
|
|
3230
|
-
"luminus-dropdown-picker-link": ir
|
|
3231
|
-
}), children: /* @__PURE__ */ s.jsx("option", { value: B, children: g ? B : (L == null ? void 0 : L.length) > 0 ? L : B }) }) }),
|
|
3232
|
-
b || !u && De ? /* @__PURE__ */ s.jsxs("div", { className: "custom-picker-button", children: [
|
|
3233
|
-
!b && !u && De && /* @__PURE__ */ s.jsx(Z, { size: "sm", color: "secondary", onClick: (H) => {
|
|
3234
|
-
H.preventDefault(), H.stopPropagation(), T(!0);
|
|
3235
|
-
}, children: /* @__PURE__ */ s.jsx(Zt, {}) }),
|
|
3236
|
-
b ?? null
|
|
3237
|
-
] }) : null
|
|
3238
|
-
] }),
|
|
3239
|
-
S && /* @__PURE__ */ s.jsx(ye, { message: S.message }),
|
|
3240
|
-
E.current && /* @__PURE__ */ s.jsx(_t, { show: _, onCancel: I, items: d, currentSelection: G, onSelectionChange: U, onSearchQueryChange: h, texts: p, itemsNameWidth: v, additionalColumns: j, displayIdAsName: g, isLoading: x, disabled: u, inputRef: E })
|
|
3368
|
+
o(!0), n.get(`/search/${e}?count=${l ? 5 : 20}${l ? "" : `&type=${t.key}`}`).then(({ data: u }) => {
|
|
3369
|
+
i(u), o(!1);
|
|
3370
|
+
}).catch(() => {
|
|
3371
|
+
o(!1);
|
|
3372
|
+
});
|
|
3373
|
+
}, [t, e, n, l]);
|
|
3374
|
+
return D(() => {
|
|
3375
|
+
c();
|
|
3376
|
+
}, [c]), { isLoading: r, searchItems: a };
|
|
3377
|
+
}, Kc = ({ searchTypes: t, navigateFunction: e }) => {
|
|
3378
|
+
const { appSearchTexts: n } = F(oe), [r, o] = P(t.length > 0 ? t[0] : null), [a, i] = P(""), [l, c] = rr(a, 500), { isLoading: u, searchItems: d } = cc(r, l), [h, m] = P(!1);
|
|
3379
|
+
return D(() => {
|
|
3380
|
+
(d.length > 0 || u) && m(!0);
|
|
3381
|
+
}, [d, u]), /* @__PURE__ */ s.jsx(ee, { onSubmit: (p) => {
|
|
3382
|
+
p.preventDefault(), p.stopPropagation(), c.flush(), m(!1), a.length > 2 && e(`/search?query=${a}${r && r.key && `&type=${r == null ? void 0 : r.key}`}`);
|
|
3383
|
+
}, children: /* @__PURE__ */ s.jsxs(nt, { className: pe.inputGroup, children: [
|
|
3384
|
+
/* @__PURE__ */ s.jsx(nt.Text, { className: w("p-1 rounded", pe.inputGroupText, pe.left), children: /* @__PURE__ */ s.jsx(Ui, { searchTypes: t, selectedType: r, setSelectedType: o }) }),
|
|
3385
|
+
/* @__PURE__ */ s.jsx(ee.Control, { placeholder: n.searchPlaceholder, type: "text", size: "sm", className: w("luminus-app-search-input", pe.input), value: a, onChange: (p) => {
|
|
3386
|
+
var v;
|
|
3387
|
+
return i(((v = p.target) == null ? void 0 : v.value) ?? "");
|
|
3388
|
+
}, onFocus: () => d.length > 0 && m(!0) }),
|
|
3389
|
+
/* @__PURE__ */ s.jsx(nt.Text, { className: w("p-0 rounded", pe.inputGroupText, pe.right), children: /* @__PURE__ */ s.jsx("button", { type: "submit", className: w("text-primary", pe.submitButton), children: /* @__PURE__ */ s.jsx(Wi, {}) }) }),
|
|
3390
|
+
/* @__PURE__ */ s.jsx(tc, { query: l, searchTypes: t, show: h, onCancel: () => m(!1), groups: d, isLoading: u })
|
|
3241
3391
|
] }) });
|
|
3242
|
-
},
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
})
|
|
3262
|
-
|
|
3263
|
-
|
|
3392
|
+
}, lc = "_card_19733_1", uc = "_header_19733_6", dc = "_header-content_19733_13", hc = "_title_19733_19", mc = "_collapse-icon_19733_22", fc = "_collapsed_19733_27", pc = "_content_19733_30", ge = {
|
|
3393
|
+
card: lc,
|
|
3394
|
+
header: uc,
|
|
3395
|
+
"header-content": "_header-content_19733_13",
|
|
3396
|
+
headerContent: dc,
|
|
3397
|
+
title: hc,
|
|
3398
|
+
"collapse-icon": "_collapse-icon_19733_22",
|
|
3399
|
+
collapseIcon: mc,
|
|
3400
|
+
collapsed: fc,
|
|
3401
|
+
content: pc
|
|
3402
|
+
}, gc = ({ title: t, headerContent: e, children: n, className: r, headerClassName: o, contentClassName: a, ...i }) => {
|
|
3403
|
+
const l = i.collapsible ? i.controlled ? !1 : i.defaultOpen ?? !1 : !0, [c, u] = P(l), d = i.collapsible ? i.controlled ? i.isOpen : c : !0;
|
|
3404
|
+
return D(() => {
|
|
3405
|
+
u(l);
|
|
3406
|
+
}, [l]), /* @__PURE__ */ s.jsxs("div", { className: w("luminus-card rounded shadow-sm", ge.card, {
|
|
3407
|
+
[r ?? ""]: r
|
|
3408
|
+
}), children: [
|
|
3409
|
+
/* @__PURE__ */ s.jsxs("div", { role: i.collapsible ? "button" : void 0, className: w("header", ge.header, {
|
|
3410
|
+
[o ?? ""]: o
|
|
3411
|
+
}), onClick: () => {
|
|
3412
|
+
i.collapsible && (i.controlled ? i.onToggle(!i.isOpen) : u(!c));
|
|
3413
|
+
}, children: [
|
|
3414
|
+
/* @__PURE__ */ s.jsxs("div", { className: w("header-content", ge.headerContent), children: [
|
|
3415
|
+
/* @__PURE__ */ s.jsx(z, { variant: "h6", className: w("text-primary", ge.title), children: t }),
|
|
3416
|
+
e ?? null
|
|
3417
|
+
] }),
|
|
3418
|
+
i.collapsible && /* @__PURE__ */ s.jsx(en, { className: w(ge.collapseIcon, {
|
|
3419
|
+
[ge.collapsed]: d
|
|
3420
|
+
}) })
|
|
3421
|
+
] }),
|
|
3422
|
+
/* @__PURE__ */ s.jsx(gn, { in: d, children: /* @__PURE__ */ s.jsx("div", { className: w("card-content border-top border-primary", ge.content, {
|
|
3423
|
+
[a ?? ""]: a
|
|
3424
|
+
}), children: n }) })
|
|
3264
3425
|
] });
|
|
3265
|
-
},
|
|
3266
|
-
|
|
3426
|
+
}, wc = "_lightbox_14acg_1", xc = "_show_14acg_16", yc = "_header_14acg_20", bc = "_photo-actions_14acg_26", vc = "_photo-container_14acg_31", _c = "_photo_14acg_26", jc = "_nav-button_14acg_41", kc = "_photos-preview_14acg_49", Cc = "_selected_14acg_62", Nc = "_default-indicator_14acg_66", ne = {
|
|
3427
|
+
lightbox: wc,
|
|
3428
|
+
show: xc,
|
|
3429
|
+
header: yc,
|
|
3430
|
+
"photo-actions": "_photo-actions_14acg_26",
|
|
3431
|
+
photoActions: bc,
|
|
3432
|
+
"photo-container": "_photo-container_14acg_31",
|
|
3433
|
+
photoContainer: vc,
|
|
3434
|
+
photo: _c,
|
|
3435
|
+
"nav-button": "_nav-button_14acg_41",
|
|
3436
|
+
navButton: jc,
|
|
3437
|
+
"photos-preview": "_photos-preview_14acg_49",
|
|
3438
|
+
photosPreview: kc,
|
|
3439
|
+
selected: Cc,
|
|
3440
|
+
"default-indicator": "_default-indicator_14acg_66",
|
|
3441
|
+
defaultIndicator: Nc
|
|
3442
|
+
}, $c = "_backdrop_3huvf_1", Ic = "_show_3huvf_11", zt = {
|
|
3443
|
+
backdrop: $c,
|
|
3444
|
+
show: Ic
|
|
3445
|
+
}, sr = ({ show: t, onClick: e }) => /* @__PURE__ */ s.jsx("div", { className: w("luminus-backdrop", zt.backdrop, {
|
|
3446
|
+
[zt.show]: t
|
|
3447
|
+
}), onClick: () => e && e() }), Sc = ({ show: t, onClose: e, photos: n, defaultIndex: r, uploadPhotosText: o, noPhotosText: a, onUploadPhotos: i, photoActions: l }) => {
|
|
3448
|
+
const c = Y(null), [u, d] = P(r), h = n.at(u), m = u > 0, p = u < n.length - 1;
|
|
3449
|
+
D(() => {
|
|
3450
|
+
t && d(r);
|
|
3451
|
+
}, [r, t]), D(() => {
|
|
3452
|
+
u >= n.length && d(n.length - 1);
|
|
3453
|
+
}, [n, u]);
|
|
3454
|
+
const v = O((x) => {
|
|
3455
|
+
switch (x.key) {
|
|
3456
|
+
case "ArrowLeft":
|
|
3457
|
+
x.stopPropagation(), m && d((f) => f - 1);
|
|
3458
|
+
break;
|
|
3459
|
+
case "ArrowRight":
|
|
3460
|
+
x.stopPropagation(), p && d((f) => f + 1);
|
|
3461
|
+
break;
|
|
3462
|
+
case "Escape":
|
|
3463
|
+
x.stopPropagation(), e();
|
|
3464
|
+
break;
|
|
3465
|
+
}
|
|
3466
|
+
}, [p, m, e]);
|
|
3467
|
+
return cn(v), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3468
|
+
/* @__PURE__ */ s.jsx(sr, { show: t, onClick: e }),
|
|
3469
|
+
/* @__PURE__ */ s.jsxs("div", { ref: c, className: w("luminus-lightbox rounded shadow", ne.lightbox, {
|
|
3470
|
+
[ne.show]: t
|
|
3471
|
+
}), children: [
|
|
3472
|
+
/* @__PURE__ */ s.jsxs("div", { className: ne.header, children: [
|
|
3473
|
+
/* @__PURE__ */ s.jsxs("div", { className: w("rounded", ne.photoActions), children: [
|
|
3474
|
+
i && /* @__PURE__ */ s.jsx(nr, { accept: ".jpg,.jpeg,.png", onUpload: (x) => {
|
|
3475
|
+
x.length > 0 && i(Array.from(x));
|
|
3476
|
+
}, icon: /* @__PURE__ */ s.jsx(tn, { style: { fontSize: 18 } }), multiple: !0, className: "me-3", children: o ?? null }),
|
|
3477
|
+
h && (l == null ? void 0 : l.map(({ label: x, onClick: f, ...j }, b) => /* @__PURE__ */ s.jsx(
|
|
3478
|
+
ct,
|
|
3479
|
+
{
|
|
3480
|
+
onClick: () => f(h.id),
|
|
3481
|
+
...j,
|
|
3482
|
+
children: x
|
|
3483
|
+
},
|
|
3484
|
+
`action-${b}`
|
|
3485
|
+
)))
|
|
3486
|
+
] }),
|
|
3487
|
+
/* @__PURE__ */ s.jsx("div", { role: "button", onClick: e, children: /* @__PURE__ */ s.jsx(ke, { style: { fontSize: "32px" } }) })
|
|
3488
|
+
] }),
|
|
3489
|
+
n.length === 0 && /* @__PURE__ */ s.jsx("div", { className: "w-100 h-100 d-flex align-items-center justify-content-center", children: /* @__PURE__ */ s.jsx(z, { variant: "body", children: a ?? "No photos available" }) }),
|
|
3490
|
+
h && /* @__PURE__ */ s.jsxs("div", { className: ne.photoContainer, children: [
|
|
3491
|
+
/* @__PURE__ */ s.jsx("div", { role: m ? "button" : void 0, className: w("align-items-start", ne.navButton), onClick: () => m && d((x) => x - 1), children: m && /* @__PURE__ */ s.jsx(mt, { style: { fontSize: "40px" } }) }),
|
|
3492
|
+
/* @__PURE__ */ s.jsx("img", { src: h.lgSrc, alt: h.alt, className: w("rounded", ne.photo) }),
|
|
3493
|
+
/* @__PURE__ */ s.jsx("div", { role: p ? "button" : void 0, className: w("align-items-end", ne.navButton), onClick: () => p && d((x) => x + 1), children: p && /* @__PURE__ */ s.jsx(ft, { style: { fontSize: "40px" } }) })
|
|
3494
|
+
] }),
|
|
3495
|
+
/* @__PURE__ */ s.jsx("div", { className: ne.photosPreview, children: n.map((x, f) => /* @__PURE__ */ s.jsxs("div", { role: "button", onClick: () => d(f), className: "position-relative", children: [
|
|
3496
|
+
/* @__PURE__ */ s.jsx("img", { role: f !== u ? "button" : void 0, src: x.smSrc, alt: x.alt, className: w("rounded", ne.photo, {
|
|
3497
|
+
[ne.selected]: f === u
|
|
3498
|
+
}) }, x.id),
|
|
3499
|
+
x.isDefault && /* @__PURE__ */ s.jsx("div", { className: w("text-primary", ne.defaultIndicator), children: /* @__PURE__ */ s.jsx(Wr, {}) })
|
|
3500
|
+
] })) })
|
|
3501
|
+
] })
|
|
3502
|
+
] });
|
|
3503
|
+
}, Qc = ({ photos: t, onUploadPhotos: e, uploadPhotosText: n, photoActions: r }) => {
|
|
3504
|
+
const [o, a] = P(null), i = o !== null ? t[o] : null, [l, c] = P(!1);
|
|
3267
3505
|
return D(() => {
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
}, nl = ({ InputContainer: t = xe, options: e, formField: n, label: r, size: o, resetsFields: a, isNumber: i, required: l, hidden: c, disabled: u, withoutLabel: d, noSortOptions: h, suffixIdToName: m, className: p }) => {
|
|
3271
|
-
const { customSelectTexts: v } = F(oe), { formState: x, setValue: f, watch: j, control: b } = me(), [g, C] = P(void 0), [k, y] = P(!1), [$, M] = P(!1), [S, N] = P(""), _ = j(n), T = Q(() => e.find((I) => I.id === _) ?? null, [e, _]), W = O(() => {
|
|
3272
|
-
const I = n.split(".");
|
|
3273
|
-
let E = x.errors;
|
|
3274
|
-
I.forEach((K) => {
|
|
3275
|
-
E !== void 0 && (E = E[K]);
|
|
3276
|
-
}), C(E);
|
|
3277
|
-
}, [x, n]), R = O((I) => {
|
|
3278
|
-
if ((I == null ? void 0 : I.id) === _)
|
|
3506
|
+
if (t.length === 0) {
|
|
3507
|
+
a(null), c(!1);
|
|
3279
3508
|
return;
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3509
|
+
}
|
|
3510
|
+
const u = t.findIndex((d) => d.isDefault);
|
|
3511
|
+
a(u > -1 ? u : 0);
|
|
3512
|
+
}, [t]), i ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3513
|
+
/* @__PURE__ */ s.jsx(
|
|
3514
|
+
"img",
|
|
3515
|
+
{
|
|
3516
|
+
role: "button",
|
|
3517
|
+
src: i.smSrc,
|
|
3518
|
+
alt: i.alt,
|
|
3519
|
+
className: "rounded w-100",
|
|
3520
|
+
onClick: () => c(!0)
|
|
3521
|
+
}
|
|
3522
|
+
),
|
|
3523
|
+
/* @__PURE__ */ s.jsx(Sc, { show: l, onClose: () => c(!1), photos: t, defaultIndex: o ?? 0, uploadPhotosText: n, onUploadPhotos: e, photoActions: r })
|
|
3524
|
+
] }) : e ? /* @__PURE__ */ s.jsx(nr, { accept: ".jpg,.jpeg,.png", onUpload: (u) => {
|
|
3525
|
+
u.length > 0 && e(Array.from(u));
|
|
3526
|
+
}, icon: /* @__PURE__ */ s.jsx(tn, { style: { fontSize: 18 } }), multiple: !0, children: n ?? null }) : null;
|
|
3527
|
+
}, Xc = ({ appAccessPermissions: t, children: e }) => {
|
|
3528
|
+
const { NavigateComponent: n } = F(oe), { useMsal: r, msalScopes: o } = F(Rr), { isAuthenticated: a } = Lr(), { user: i, loggingInProgress: l } = F(qr), c = i && (t == null ? void 0 : t.every((u) => {
|
|
3529
|
+
var d;
|
|
3530
|
+
return (d = i.permissions) == null ? void 0 : d.includes(u);
|
|
3531
|
+
}));
|
|
3532
|
+
return r ? /* @__PURE__ */ s.jsx(Aa, { interactionType: qe.Redirect, authenticationRequest: { scopes: o }, children: l || !a() ? /* @__PURE__ */ s.jsx(Xr, {}) : i ? c ? /* @__PURE__ */ s.jsx(s.Fragment, { children: e }) : /* @__PURE__ */ s.jsx(n, { to: "/user-not-permitted", replace: !0 }) : /* @__PURE__ */ s.jsx(n, { to: "/no-user-login", replace: !0 }) }) : !a() || !i ? /* @__PURE__ */ s.jsx(n, { to: "/login", replace: !0 }) : c ? e : /* @__PURE__ */ s.jsx(n, { to: "/user-not-permitted", replace: !0 });
|
|
3533
|
+
}, Jc = (t) => {
|
|
3534
|
+
const { variant: e, children: n, className: r, size: o = "md", typographyVariant: a = o === "sm" ? "body2" : "body", ...i } = { ...t };
|
|
3535
|
+
return /* @__PURE__ */ s.jsx(xs, { variant: e, className: `text-center ${o === "sm" ? "p-1" : o === "md" ? "p-3" : "p-4"} bg-${e} bg-opacity-10 border-none ${r ?? ""}`, ...i, children: /* @__PURE__ */ s.jsx(z, { variant: a, children: n }) });
|
|
3536
|
+
}, Zc = ({ version: t }) => /* @__PURE__ */ s.jsx("div", { className: "rounded", style: {
|
|
3537
|
+
position: "fixed",
|
|
3538
|
+
right: "0px",
|
|
3539
|
+
bottom: "0px",
|
|
3540
|
+
zIndex: "10000",
|
|
3541
|
+
backgroundColor: "rgba(255, 255, 255, 0.5)",
|
|
3542
|
+
padding: "4px",
|
|
3543
|
+
pointerEvents: "all"
|
|
3544
|
+
}, children: /* @__PURE__ */ s.jsxs(z, { variant: "caption", className: "w-100 text-end", children: [
|
|
3545
|
+
"verze ",
|
|
3546
|
+
t
|
|
3547
|
+
] }) }), el = ({ heading: t, content: e, placement: n, children: r, trigger: o }) => /* @__PURE__ */ s.jsx(Yr, { placement: n, overlay: /* @__PURE__ */ s.jsxs(Ze, { className: "luminus-popover", children: [
|
|
3548
|
+
/* @__PURE__ */ s.jsx(Ze.Header, { children: typeof t == "string" ? /* @__PURE__ */ s.jsx(z, { variant: "h6", className: "text-primary", children: t }) : t }),
|
|
3549
|
+
/* @__PURE__ */ s.jsx(Ze.Body, { children: e })
|
|
3550
|
+
] }), trigger: o ?? "hover", rootClose: !0, children: r }), ar = ({ currentSelection: t, selectedItemNavigateTo: e, children: n }) => {
|
|
3551
|
+
const { LinkComponent: r } = F(oe);
|
|
3552
|
+
if (!t || !t.id || !e)
|
|
3553
|
+
return /* @__PURE__ */ s.jsx("div", { className: "luminus-input-container position-relative w-100", children: n });
|
|
3554
|
+
const o = e(t);
|
|
3555
|
+
return /* @__PURE__ */ s.jsx(r, { to: o, className: "luminus-input-container position-relative w-100 text-decoration-none", children: n });
|
|
3556
|
+
}, tl = ({ InputContainer: t = Ve, label: e, value: n, onChange: r, hidden: o, disabled: a, className: i, type: l, withoutLabel: c }) => /* @__PURE__ */ s.jsx(t, { isForCheckInput: !0, hidden: o, label: e ?? "", withoutLabel: c, className: i, children: /* @__PURE__ */ s.jsx(ee.Check, { id: `check-${e}`, type: l ?? "checkbox", label: e ?? "", checked: n, onChange: (u) => {
|
|
3557
|
+
var d;
|
|
3558
|
+
r && r(((d = u.target) == null ? void 0 : d.checked) ?? !1);
|
|
3559
|
+
}, className: i ?? "", hidden: o ?? !1, disabled: a ?? !1 }) }), nl = ({ InputContainer: t = Ve, type: e, value: n, onChange: r, debounceMs: o, label: a, withoutLabel: i, placeholder: l, size: c, hidden: u, disabled: d, showClearIcon: h, clearValue: m, list: p, className: v, step: x }) => {
|
|
3560
|
+
const f = e === "number", j = O(() => {
|
|
3561
|
+
if (!r)
|
|
3562
|
+
return;
|
|
3563
|
+
const N = m ?? null;
|
|
3564
|
+
r(f ? N ? Number(N) : null : (N == null ? void 0 : N.toString()) ?? "");
|
|
3565
|
+
}, [m, f, r]), b = Y(null), [g, C] = P((n == null ? void 0 : n.toString()) ?? ""), k = O((N) => {
|
|
3566
|
+
const _ = N;
|
|
3567
|
+
r && (f && r(_ == null || _ === "" ? null : Number(_)), r(_ || null));
|
|
3568
|
+
}, [f, r]), y = O((N) => {
|
|
3569
|
+
var T;
|
|
3570
|
+
const _ = (T = N.target) == null ? void 0 : T.value;
|
|
3571
|
+
if (!o) {
|
|
3572
|
+
k(_);
|
|
3285
3573
|
return;
|
|
3286
3574
|
}
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
});
|
|
3292
|
-
}, [f, n, i, a, _, $]), B = O((I) => {
|
|
3293
|
-
y(!1), R(I);
|
|
3294
|
-
}, [R]), L = O((I) => {
|
|
3295
|
-
N(I);
|
|
3296
|
-
}, []);
|
|
3575
|
+
C(_), b.current !== null && window.clearTimeout(b.current), b.current = window.setTimeout(() => {
|
|
3576
|
+
k(_);
|
|
3577
|
+
}, o);
|
|
3578
|
+
}, [o, k]);
|
|
3297
3579
|
D(() => {
|
|
3298
|
-
|
|
3299
|
-
}, [
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
return I === null ? "" : !I.name || I.name.length === 0 ? ((E = I.id) == null ? void 0 : E.toString()) ?? "" : m ? `${I.name} (${I.id})` : I.name;
|
|
3305
|
-
}, [m]), se = Q(() => e.map((I) => ({
|
|
3306
|
-
id: I.id,
|
|
3307
|
-
name: G(I)
|
|
3308
|
-
})).filter((I) => {
|
|
3309
|
-
var E;
|
|
3310
|
-
return S ? (E = I.name) == null ? void 0 : E.toLowerCase().includes(S.toLowerCase()) : !0;
|
|
3311
|
-
}).sort((I, E) => h ? 0 : (I.name ?? "").localeCompare(E.name ?? "")), [e, h, S, G]), te = Y(null), U = g !== void 0;
|
|
3312
|
-
return /* @__PURE__ */ s.jsx(s.Fragment, { children: /* @__PURE__ */ s.jsxs(t, { label: `${r}${l ? " *" : ""}`, hidden: c, withoutLabel: d, isInvalid: U, inputContainerClassName: w({ "luminus-dropdown-select-open": k }), className: p, children: [
|
|
3313
|
-
/* @__PURE__ */ s.jsx(sn, { control: b, name: n, render: () => /* @__PURE__ */ s.jsx(ee.Select, { size: o, onMouseDown: (I) => {
|
|
3314
|
-
I.currentTarget.focus(), I.preventDefault();
|
|
3315
|
-
}, onClick: () => {
|
|
3316
|
-
y(!0);
|
|
3317
|
-
}, ref: te, value: _ ?? "", onChange: () => {
|
|
3318
|
-
}, isInvalid: U, hidden: c, disabled: u, className: "w-100", children: /* @__PURE__ */ s.jsx("option", { value: (T == null ? void 0 : T.id) ?? "", children: G(T) }) }) }),
|
|
3319
|
-
g && /* @__PURE__ */ s.jsx(ye, { message: g.message }),
|
|
3320
|
-
te.current && /* @__PURE__ */ s.jsx(_t, { show: k, onCancel: () => y(!1), items: se, currentSelection: T ?? null, onSelectionChange: B, onSearchQueryChange: L, texts: v, disabled: u, inputRef: te, autoHideSearch: !0, allItemsLength: e.length })
|
|
3321
|
-
] }) });
|
|
3322
|
-
}, Ja = "_item_1dy8x_1", or = {
|
|
3323
|
-
item: Ja
|
|
3324
|
-
}, Za = ({
|
|
3325
|
-
color: t = "primary",
|
|
3326
|
-
// icon = <MdOutlineArrowOutward />,
|
|
3327
|
-
icon: e,
|
|
3328
|
-
className: n,
|
|
3329
|
-
children: r,
|
|
3330
|
-
...o
|
|
3331
|
-
}) => /* @__PURE__ */ s.jsxs(Ee.Item, { className: w(`btn luminus-dropdown-item text-nowrap rounded text-${t} ${n ?? ""}`, or.item), ...o, children: [
|
|
3332
|
-
e,
|
|
3333
|
-
r
|
|
3334
|
-
] }), ei = (t) => /* @__PURE__ */ s.jsx(Ee.Toggle, { ...t }), rl = ({ color: t = "primary", icon: e = /* @__PURE__ */ s.jsx(Jt, { size: 12 }), inputId: n = "context-file-input", accept: r = "*", onUpload: o, multiple: a, className: i, children: l, ...c }) => {
|
|
3335
|
-
const u = (d) => {
|
|
3336
|
-
d.target.files && (o(d.target.files), d.target.value = "");
|
|
3337
|
-
};
|
|
3338
|
-
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3339
|
-
/* @__PURE__ */ s.jsxs("label", { htmlFor: n, className: w(`btn luminus-dropdown-item text-nowrap rounded text-${t} ${i ?? ""}`, or.item), ...c, children: [
|
|
3340
|
-
e,
|
|
3341
|
-
l
|
|
3342
|
-
] }),
|
|
3343
|
-
/* @__PURE__ */ s.jsx("input", { id: n, type: "file", accept: r, onChange: u, hidden: !0, multiple: a })
|
|
3580
|
+
C(n === null ? "" : n.toString());
|
|
3581
|
+
}, [n]);
|
|
3582
|
+
const [$, M] = P(!1), S = un(e, n ? n.toString() ?? null : null, $);
|
|
3583
|
+
return /* @__PURE__ */ s.jsxs(t, { withoutLabel: i, label: a ?? "", hidden: u, className: v, children: [
|
|
3584
|
+
/* @__PURE__ */ s.jsx(ee.Control, { type: S, placeholder: l ?? a, size: c, value: o ? g : n ?? "", onChange: y, className: v ?? "", hidden: u, disabled: d ?? !1, list: p, onFocus: () => M(!0), onBlur: () => M(!1), step: x }),
|
|
3585
|
+
h && n && r && !d && /* @__PURE__ */ s.jsx("div", { className: `luminus-input-remove-icon ${e !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ s.jsx(Z, { color: "secondary", size: "sm", onClick: j, children: /* @__PURE__ */ s.jsx(ke, {}) }) })
|
|
3344
3586
|
] });
|
|
3345
|
-
},
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3587
|
+
}, rl = ({
|
|
3588
|
+
InputContainer: t = Ve,
|
|
3589
|
+
value: e,
|
|
3590
|
+
options: n,
|
|
3591
|
+
onChange: r,
|
|
3592
|
+
label: o,
|
|
3593
|
+
withoutLabel: a,
|
|
3594
|
+
isNumber: i,
|
|
3595
|
+
size: l,
|
|
3596
|
+
hidden: c,
|
|
3597
|
+
disabled: u,
|
|
3598
|
+
showClearIcon: d,
|
|
3599
|
+
clearValue: h,
|
|
3600
|
+
noSortOptions: m,
|
|
3601
|
+
className: p,
|
|
3602
|
+
noEmptyOption: v
|
|
3603
|
+
// it will still add the empty option if there is no value provided or value is empty string or null
|
|
3604
|
+
}) => {
|
|
3605
|
+
const x = O(() => {
|
|
3606
|
+
if (!r)
|
|
3607
|
+
return;
|
|
3608
|
+
const f = h ?? null;
|
|
3609
|
+
r(i ? f ? Number(f) : null : (f == null ? void 0 : f.toString()) ?? "");
|
|
3610
|
+
}, [h, i, r]);
|
|
3611
|
+
return /* @__PURE__ */ s.jsxs(t, { withoutLabel: a, label: o ?? "", hidden: c, className: p, children: [
|
|
3612
|
+
/* @__PURE__ */ s.jsxs(ee.Select, { size: l, value: e ?? "", onChange: (f) => {
|
|
3613
|
+
var b;
|
|
3614
|
+
if (!r)
|
|
3615
|
+
return;
|
|
3616
|
+
const j = (b = f.target) == null ? void 0 : b.value;
|
|
3617
|
+
i && r(j ? parseInt(j, 10) : null), r(j || null);
|
|
3618
|
+
}, className: p ?? "", hidden: c, disabled: u ?? !1, children: [
|
|
3619
|
+
v && !(e == null || e === "") ? void 0 : /* @__PURE__ */ s.jsx("option", { value: "" }),
|
|
3620
|
+
n == null ? void 0 : n.sort((f, j) => m ? 0 : (f.name ?? "").localeCompare(j.name ?? "")).map((f) => /* @__PURE__ */ s.jsx("option", { value: f.id ?? "", children: f.name }, f.id))
|
|
3621
|
+
] }),
|
|
3622
|
+
d && e && r && !u && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ s.jsx(Z, { color: "secondary", size: "sm", onClick: x, children: /* @__PURE__ */ s.jsx(ke, {}) }) })
|
|
3381
3623
|
] });
|
|
3382
|
-
},
|
|
3383
|
-
|
|
3624
|
+
}, ol = ({ InputContainer: t = Ve, items: e, defaultSelection: n, selectedItemNavigateTo: r, onSearchQueryChange: o, texts: a, isLoading: i, isNumber: l, onSelect: c, label: u, withoutLabel: d, size: h, dropdownItemsNameWidth: m, additionalColumns: p, hidden: v, disabled: x, displayIdAsName: f, CustomOnChangeComponent: j, className: b }) => {
|
|
3625
|
+
var T, W;
|
|
3626
|
+
const [g, C] = P(n), [k, y] = P(!1);
|
|
3384
3627
|
D(() => {
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
"
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
reload() {
|
|
3421
|
-
this.setState({ hasError: !1 });
|
|
3422
|
-
}
|
|
3423
|
-
render() {
|
|
3424
|
-
const { fallback: e, children: n, texts: r, reloadButtonDisplay: o = "append-after-child" } = this.props;
|
|
3425
|
-
return this.state.hasError ? o === "inject-to-child" && Vr(e) ? J.cloneElement(e, {
|
|
3426
|
-
...e.props
|
|
3427
|
-
}, /* @__PURE__ */ s.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
3428
|
-
...e.props.children,
|
|
3429
|
-
/* @__PURE__ */ s.jsx(ct, { type: "button", onClick: this.reload, children: r.reloadButtonContent })
|
|
3430
|
-
] })) : /* @__PURE__ */ s.jsxs("div", { className: "translate-middle top-50 start-50 position-absolute d-flex flex-column align-items-center gap-2", children: [
|
|
3431
|
-
e,
|
|
3432
|
-
o === "none" ? null : /* @__PURE__ */ s.jsx(ct, { type: "button", onClick: this.reload, children: r.reloadButtonContent })
|
|
3433
|
-
] }) : n;
|
|
3434
|
-
}
|
|
3435
|
-
}
|
|
3436
|
-
const _i = (t) => (n) => {
|
|
3437
|
-
const { errorBoundaryTexts: r } = F(oe);
|
|
3438
|
-
return /* @__PURE__ */ s.jsx(t, { texts: r, ...n });
|
|
3439
|
-
}, ji = _i(vi), ki = "_widget-card_e9tsb_1", Ci = {
|
|
3440
|
-
"widget-card": "_widget-card_e9tsb_1",
|
|
3441
|
-
widgetCard: ki
|
|
3442
|
-
}, Gt = ({ children: t, title: e, headerContent: n }) => /* @__PURE__ */ s.jsx(vc, { className: w(Ci.widgetCard, "luminus-widget"), title: e, headerContent: n, contentClassName: "h-100 overflow-auto", children: t }), Ni = ({ children: t, title: e }) => {
|
|
3443
|
-
const { widgetTexts: n } = F(oe);
|
|
3444
|
-
return /* @__PURE__ */ s.jsx(ji, { fallback: /* @__PURE__ */ s.jsx(Gt, { title: e, children: n.fallbackError }), reloadButtonDisplay: "inject-to-child", children: /* @__PURE__ */ s.jsx(Ur, { fallback: /* @__PURE__ */ s.jsx(Gt, { title: e, children: /* @__PURE__ */ s.jsx(Zr, {}) }), children: t }) });
|
|
3445
|
-
}, ll = ({ availableWidgets: t, editMode: e, defaultDashboardConfig: n }) => {
|
|
3446
|
-
var d;
|
|
3447
|
-
const { homeDashboardTexts: r } = F(oe), { dashboardConfig: o, onChangeDashboardConfig: a } = hi(n), i = O((h, m) => {
|
|
3448
|
-
var p, v;
|
|
3449
|
-
h === ((p = o.widgets) == null ? void 0 : p.length) ? a({
|
|
3450
|
-
...o,
|
|
3451
|
-
widgets: [...o.widgets, { widgetId: m, fullWidth: !1 }]
|
|
3452
|
-
}) : a({
|
|
3453
|
-
...o,
|
|
3454
|
-
widgets: ((v = o.widgets) == null ? void 0 : v.map((x, f) => f === h ? { widgetId: m, fullWidth: !1 } : x)) ?? []
|
|
3455
|
-
});
|
|
3456
|
-
}, [o, a]), l = O((h) => {
|
|
3457
|
-
var m, p;
|
|
3458
|
-
((m = o.widgets[h]) == null ? void 0 : m.widgetId) === -1 ? a({
|
|
3459
|
-
...o,
|
|
3460
|
-
widgets: ((p = o.widgets) == null ? void 0 : p.filter((v, x) => x !== h)) ?? []
|
|
3461
|
-
}) : i(h, -1);
|
|
3462
|
-
}, [o, a, i]), c = O((h) => {
|
|
3463
|
-
var m;
|
|
3464
|
-
a({
|
|
3465
|
-
...o,
|
|
3466
|
-
widgets: ((m = o.widgets) == null ? void 0 : m.map((p, v) => v === h ? { ...p, fullWidth: !p.fullWidth } : p)) ?? []
|
|
3467
|
-
});
|
|
3468
|
-
}, [o, a]), u = O((h, m, p) => h ? /* @__PURE__ */ s.jsxs("div", { className: w(ae.widgetWrapper, {
|
|
3469
|
-
[ae.widgetEdit]: e && h.id !== -1
|
|
3470
|
-
}, { [ae.fullWidth]: p }), children: [
|
|
3471
|
-
e && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3472
|
-
/* @__PURE__ */ s.jsx(Z, { color: "danger", onClick: () => l(m), className: w(ae.removeIcon), children: /* @__PURE__ */ s.jsx(en, {}) }),
|
|
3473
|
-
/* @__PURE__ */ s.jsx(Z, { color: p ? "danger" : "primary", onClick: () => c(m), className: w(ae.fullWidthIcon), children: /* @__PURE__ */ s.jsx(Pr, {}) })
|
|
3628
|
+
C(n);
|
|
3629
|
+
}, [n]);
|
|
3630
|
+
const $ = O((R) => {
|
|
3631
|
+
C(R);
|
|
3632
|
+
}, []), M = O((R) => {
|
|
3633
|
+
y(!1), $(R);
|
|
3634
|
+
}, [$]);
|
|
3635
|
+
D(() => {
|
|
3636
|
+
c && c(g);
|
|
3637
|
+
}, [g, c]);
|
|
3638
|
+
const S = Y(null), N = r !== void 0, _ = N && g !== null;
|
|
3639
|
+
return /* @__PURE__ */ s.jsx(s.Fragment, { children: /* @__PURE__ */ s.jsxs(t, { withoutLabel: d, label: u ?? "", hidden: v, inputContainerClassName: w({ "luminus-dropdown-select-open": k }), className: b, children: [
|
|
3640
|
+
/* @__PURE__ */ s.jsxs(ar, { currentSelection: g, selectedItemNavigateTo: r, children: [
|
|
3641
|
+
f && (g == null ? void 0 : g.name) && /* @__PURE__ */ s.jsx(z, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: g.name }),
|
|
3642
|
+
/* @__PURE__ */ s.jsxs(ee.Select, { ref: S, size: h, value: (g == null ? void 0 : g.id) ?? "", onChange: (R) => C({
|
|
3643
|
+
id: l ? Number(R.target.value) ?? null : R.target.value,
|
|
3644
|
+
name: ""
|
|
3645
|
+
}), onMouseDown: (R) => {
|
|
3646
|
+
R.currentTarget.focus(), R.preventDefault();
|
|
3647
|
+
}, onClick: () => {
|
|
3648
|
+
!N && !x && y(!0);
|
|
3649
|
+
}, className: w("w-100", {
|
|
3650
|
+
"luminus-dropdown-picker-disabled": x,
|
|
3651
|
+
"luminus-dropdown-picker-link": _
|
|
3652
|
+
}), hidden: v, children: [
|
|
3653
|
+
/* @__PURE__ */ s.jsx("option", { value: "" }),
|
|
3654
|
+
n && /* @__PURE__ */ s.jsx("option", { value: n.id ?? void 0, children: n.name && ((T = n.name) == null ? void 0 : T.length) > 0 ? n.name : n.id }),
|
|
3655
|
+
g && /* @__PURE__ */ s.jsx("option", { value: g.id ?? void 0, children: g.name && ((W = g.name) == null ? void 0 : W.length) > 0 ? g.name : g.id })
|
|
3656
|
+
] }),
|
|
3657
|
+
j || !x && N ? /* @__PURE__ */ s.jsxs("div", { className: "custom-picker-button", children: [
|
|
3658
|
+
!j && !x && N && /* @__PURE__ */ s.jsx(Z, { size: "sm", color: "secondary", onClick: (R) => {
|
|
3659
|
+
R.preventDefault(), R.stopPropagation(), y(!0);
|
|
3660
|
+
}, children: /* @__PURE__ */ s.jsx(nn, {}) }),
|
|
3661
|
+
j ?? null
|
|
3662
|
+
] }) : null
|
|
3474
3663
|
] }),
|
|
3475
|
-
|
|
3476
|
-
h.id > -1 && e && /* @__PURE__ */ s.jsx("div", { className: ae.widgetEditOverlay })
|
|
3477
|
-
] }, m) : /* @__PURE__ */ s.jsx(s.Fragment, {}), [
|
|
3478
|
-
e,
|
|
3479
|
-
i,
|
|
3480
|
-
l,
|
|
3481
|
-
c,
|
|
3482
|
-
t,
|
|
3483
|
-
r
|
|
3484
|
-
]);
|
|
3485
|
-
return /* @__PURE__ */ s.jsx("div", { className: ae.dashboard, children: /* @__PURE__ */ s.jsxs("div", { className: ae.widgetsGrid, children: [
|
|
3486
|
-
(d = o.widgets) == null ? void 0 : d.map((h, m) => u(t.find((p) => p.id === h.widgetId), m, h.fullWidth)),
|
|
3487
|
-
e && /* @__PURE__ */ s.jsx(Ht, { availableWidgets: t, onAdd: (h) => {
|
|
3488
|
-
var m;
|
|
3489
|
-
return i((m = o.widgets) == null ? void 0 : m.length, h);
|
|
3490
|
-
}, texts: r })
|
|
3664
|
+
S.current && /* @__PURE__ */ s.jsx(_t, { show: k, onCancel: () => y(!1), items: e, currentSelection: g, onSelectionChange: M, onSearchQueryChange: o, texts: a, itemsNameWidth: m, additionalColumns: p, isLoading: i, disabled: x, inputRef: S })
|
|
3491
3665
|
] }) });
|
|
3492
|
-
},
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
/* @__PURE__ */ s.jsx(tn, { className: w(Ut.collapseIcon, {
|
|
3509
|
-
[Ut.collapsed]: l
|
|
3510
|
-
}) })
|
|
3511
|
-
] }),
|
|
3512
|
-
/* @__PURE__ */ s.jsx(gn, { in: l, children: /* @__PURE__ */ s.jsx("div", { children: e }) }),
|
|
3513
|
-
/* @__PURE__ */ s.jsx("hr", { className: `my-0 ${l ? "mt-3" : ""}` })
|
|
3514
|
-
] });
|
|
3515
|
-
}, Mi = "_feedback_esh1j_1", Di = "_feedback-spacer_esh1j_8", zt = {
|
|
3516
|
-
feedback: Mi,
|
|
3517
|
-
"feedback-spacer": "_feedback-spacer_esh1j_8",
|
|
3518
|
-
feedbackSpacer: Di
|
|
3519
|
-
}, ye = ({ message: t }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3520
|
-
/* @__PURE__ */ s.jsx("div", { className: w("invalid-feedback luminus-invalid-feedback", zt.feedback), children: t }),
|
|
3521
|
-
/* @__PURE__ */ s.jsx("div", { className: w("invalid-feedback-spacer", zt.feedbackSpacer), children: t })
|
|
3522
|
-
] });
|
|
3523
|
-
function Pi(t, e, n) {
|
|
3524
|
-
var r = this, o = Y(null), a = Y(0), i = Y(null), l = Y([]), c = Y(), u = Y(), d = Y(t), h = Y(!0);
|
|
3525
|
-
d.current = t;
|
|
3526
|
-
var m = typeof window < "u", p = !e && e !== 0 && m;
|
|
3527
|
-
if (typeof t != "function")
|
|
3528
|
-
throw new TypeError("Expected a function");
|
|
3529
|
-
e = +e || 0;
|
|
3530
|
-
var v = !!(n = n || {}).leading, x = !("trailing" in n) || !!n.trailing, f = "maxWait" in n, j = "debounceOnServer" in n && !!n.debounceOnServer, b = f ? Math.max(+n.maxWait || 0, e) : null;
|
|
3531
|
-
D(function() {
|
|
3532
|
-
return h.current = !0, function() {
|
|
3533
|
-
h.current = !1;
|
|
3534
|
-
};
|
|
3535
|
-
}, []);
|
|
3536
|
-
var g = Q(function() {
|
|
3537
|
-
var C = function(N) {
|
|
3538
|
-
var _ = l.current, T = c.current;
|
|
3539
|
-
return l.current = c.current = null, a.current = N, u.current = d.current.apply(T, _);
|
|
3540
|
-
}, k = function(N, _) {
|
|
3541
|
-
p && cancelAnimationFrame(i.current), i.current = p ? requestAnimationFrame(N) : setTimeout(N, _);
|
|
3542
|
-
}, y = function(N) {
|
|
3543
|
-
if (!h.current)
|
|
3544
|
-
return !1;
|
|
3545
|
-
var _ = N - o.current;
|
|
3546
|
-
return !o.current || _ >= e || _ < 0 || f && N - a.current >= b;
|
|
3547
|
-
}, $ = function(N) {
|
|
3548
|
-
return i.current = null, x && l.current ? C(N) : (l.current = c.current = null, u.current);
|
|
3549
|
-
}, M = function N() {
|
|
3550
|
-
var _ = Date.now();
|
|
3551
|
-
if (y(_))
|
|
3552
|
-
return $(_);
|
|
3553
|
-
if (h.current) {
|
|
3554
|
-
var T = e - (_ - o.current), W = f ? Math.min(T, b - (_ - a.current)) : T;
|
|
3555
|
-
k(N, W);
|
|
3556
|
-
}
|
|
3557
|
-
}, S = function() {
|
|
3558
|
-
if (m || j) {
|
|
3559
|
-
var N = Date.now(), _ = y(N);
|
|
3560
|
-
if (l.current = [].slice.call(arguments), c.current = r, o.current = N, _) {
|
|
3561
|
-
if (!i.current && h.current)
|
|
3562
|
-
return a.current = o.current, k(M, e), v ? C(o.current) : u.current;
|
|
3563
|
-
if (f)
|
|
3564
|
-
return k(M, e), C(o.current);
|
|
3565
|
-
}
|
|
3566
|
-
return i.current || k(M, e), u.current;
|
|
3666
|
+
}, sl = ({ InputContainer: t = xe, formField: e, label: n, resetsFields: r, type: o, required: a, hidden: i, disabled: l, withoutLabel: c, className: u }) => {
|
|
3667
|
+
const { register: d, formState: h, setValue: m } = me(), [p, v] = P(void 0), [x, f] = P(!1);
|
|
3668
|
+
D(() => {
|
|
3669
|
+
const b = e.split(".");
|
|
3670
|
+
let g = h.errors;
|
|
3671
|
+
b.forEach((C) => {
|
|
3672
|
+
g !== void 0 && (g = g[C]);
|
|
3673
|
+
}), v(g);
|
|
3674
|
+
}, [h, e]), D(() => {
|
|
3675
|
+
h.isSubmitted && f(!0);
|
|
3676
|
+
}, [h]);
|
|
3677
|
+
const j = p !== void 0;
|
|
3678
|
+
return /* @__PURE__ */ s.jsxs(t, { isForCheckInput: !0, hidden: i, label: `${n}${a ? " *" : ""}`, isInvalid: j, withoutLabel: c, className: u, children: [
|
|
3679
|
+
/* @__PURE__ */ s.jsx(ee.Check, { id: `check-${e}`, type: o ?? "checkbox", label: `${n}${a ? " *" : ""}`, ...d(e, {
|
|
3680
|
+
onChange: () => {
|
|
3681
|
+
r && r.forEach((b) => m(b, null, { shouldDirty: !0, shouldValidate: x }));
|
|
3567
3682
|
}
|
|
3568
|
-
}
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
}, S.flush = function() {
|
|
3574
|
-
return i.current ? $(Date.now()) : u.current;
|
|
3575
|
-
}, S;
|
|
3576
|
-
}, [v, f, e, b, x, p, m, j]);
|
|
3577
|
-
return g;
|
|
3578
|
-
}
|
|
3579
|
-
function Ai(t, e) {
|
|
3580
|
-
return t === e;
|
|
3581
|
-
}
|
|
3582
|
-
function Fi(t, e) {
|
|
3583
|
-
return e;
|
|
3584
|
-
}
|
|
3585
|
-
function sr(t, e, n) {
|
|
3586
|
-
var r = Ai, o = rn(Fi, t), a = o[0], i = o[1], l = Pi(O(function(u) {
|
|
3587
|
-
return i(u);
|
|
3588
|
-
}, [i]), e, n), c = Y(t);
|
|
3589
|
-
return r(c.current, t) || (l(t), c.current = t), [a, l];
|
|
3590
|
-
}
|
|
3591
|
-
const Wi = "_wrapper_uccrb_1", Ri = "_open_uccrb_9", Li = "_dropdown_uccrb_13", qi = "_search-input-container_uccrb_19", Yi = "_search-input_uccrb_19", Bi = "_loading-container_uccrb_25", Hi = "_items-container_uccrb_32", Gi = "_header-row_uccrb_38", Vi = "_item_uccrb_32", Ui = "_name_uccrb_57", zi = "_column-item_uccrb_62", Ki = "_icon_uccrb_66", Qi = "_clear-button_uccrb_74", X = {
|
|
3592
|
-
wrapper: Wi,
|
|
3593
|
-
open: Ri,
|
|
3594
|
-
dropdown: Li,
|
|
3595
|
-
"search-input-container": "_search-input-container_uccrb_19",
|
|
3596
|
-
searchInputContainer: qi,
|
|
3597
|
-
"search-input": "_search-input_uccrb_19",
|
|
3598
|
-
searchInput: Yi,
|
|
3599
|
-
"loading-container": "_loading-container_uccrb_25",
|
|
3600
|
-
loadingContainer: Bi,
|
|
3601
|
-
"items-container": "_items-container_uccrb_32",
|
|
3602
|
-
itemsContainer: Hi,
|
|
3603
|
-
"header-row": "_header-row_uccrb_38",
|
|
3604
|
-
headerRow: Gi,
|
|
3605
|
-
item: Vi,
|
|
3606
|
-
name: Ui,
|
|
3607
|
-
"column-item": "_column-item_uccrb_62",
|
|
3608
|
-
columnItem: zi,
|
|
3609
|
-
icon: Ki,
|
|
3610
|
-
"clear-button": "_clear-button_uccrb_74",
|
|
3611
|
-
clearButton: Qi
|
|
3612
|
-
}, _t = ({ show: t, onCancel: e, items: n, currentSelection: r, onSelectionChange: o, onSearchQueryChange: a, texts: i, itemsNameWidth: l, additionalColumns: c, displayIdAsName: u = !1, autoHideSearch: d = !1, allItemsLength: h, disabled: m, isLoading: p = !1, inputRef: v }) => {
|
|
3613
|
-
var I;
|
|
3614
|
-
const x = Y(null), f = Y(null), j = Y(null), [b, g] = P(""), [C] = sr(b, 500), [, k] = P(!1), y = (I = v.current) == null ? void 0 : I.getBoundingClientRect(), $ = (y == null ? void 0 : y.x) ?? 0, M = ((y == null ? void 0 : y.x) ?? 0) + ((y == null ? void 0 : y.width) ?? 0), S = (y == null ? void 0 : y.y) ?? 0, N = ((y == null ? void 0 : y.y) ?? 0) + ((y == null ? void 0 : y.height) ?? 0), _ = (y == null ? void 0 : y.width) ?? 0, T = (y == null ? void 0 : y.height) ?? 0, W = 5, R = Q(() => $ ? $ > window.innerWidth / 2 : !1, [$]), B = Q(() => S ? S > window.innerHeight / 2 : !1, [S]);
|
|
3683
|
+
}), isInvalid: j, hidden: i, disabled: l, className: "w-100" }),
|
|
3684
|
+
p && /* @__PURE__ */ s.jsx(ye, { message: p.message })
|
|
3685
|
+
] });
|
|
3686
|
+
}, al = ({ InputContainer: t = xe, label: e, formField: n, options: r, resetsFields: o, required: a, disabled: i, hidden: l, className: c }) => {
|
|
3687
|
+
const { register: u, formState: d, setValue: h, watch: m } = me(), [p, v] = P(void 0), [x, f] = P(!1), j = Q(() => r, [r]);
|
|
3615
3688
|
D(() => {
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
D(() => (window.addEventListener("scroll", G), () => {
|
|
3633
|
-
window.removeEventListener("scroll", G);
|
|
3634
|
-
}), [G]), D(() => (window.addEventListener("resize", G), () => {
|
|
3635
|
-
window.removeEventListener("resize", G);
|
|
3636
|
-
}), [G]), ln(L), un([x, f], e);
|
|
3637
|
-
const se = l ?? (c && c.length > 0 ? 250 : 0), te = (c == null ? void 0 : c.reduce((E, K) => E + (K.width ?? 100), 0)) ?? 0, U = `calc(max(${_}px, ${se}px + ${te}px))`;
|
|
3638
|
-
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3639
|
-
/* @__PURE__ */ s.jsx(ar, { show: t, onClick: e }),
|
|
3640
|
-
r && t && !m && /* @__PURE__ */ s.jsx("button", { ref: f, type: "button", className: w("luminus-dropdown-picker-clear-button", X.clearButton), onClick: () => !m && o(null), style: {
|
|
3641
|
-
top: `calc(${S}px + ${T / 2}px - 12px)`,
|
|
3642
|
-
left: `calc(${$}px - 24px - 8px)`
|
|
3643
|
-
}, children: /* @__PURE__ */ s.jsx(z, { variant: "caption", className: "text-danger", children: /* @__PURE__ */ s.jsx(en, { size: 16 }) }) }),
|
|
3644
|
-
/* @__PURE__ */ s.jsx("div", { className: w("luminus-dropdown-picker", X.wrapper, {
|
|
3645
|
-
[X.open]: t
|
|
3646
|
-
}), style: {
|
|
3647
|
-
top: B ? `calc(${S}px - 50vh - 8px)` : `calc(${N}px + 8px)`,
|
|
3648
|
-
left: R ? `calc(${M}px - ${U})` : $,
|
|
3649
|
-
right: R ? `${M}px` : `calc(${$}px + ${U})`,
|
|
3650
|
-
width: U,
|
|
3651
|
-
justifyContent: B ? "flex-end" : "flex-start"
|
|
3652
|
-
}, children: /* @__PURE__ */ s.jsx("div", { ref: x, className: w("shadow rounded", X.dropdown), children: !m && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3653
|
-
d && (h ?? n.length) <= W ? null : /* @__PURE__ */ s.jsx("div", { className: w("search-input-container border-bottom", X.searchInputContainer), children: /* @__PURE__ */ s.jsx(ee.Control, { ref: j, type: "search", size: "sm", className: X.searchInput, placeholder: i.searchPlaceholder, value: b, onChange: (E) => {
|
|
3654
|
-
var K;
|
|
3655
|
-
return g(((K = E.target) == null ? void 0 : K.value) ?? "");
|
|
3656
|
-
} }) }),
|
|
3657
|
-
p ? /* @__PURE__ */ s.jsx("div", { className: X.loadingContainer, children: /* @__PURE__ */ s.jsx(yt, { animation: "border", variant: "primary" }) }) : n.length > 0 && /* @__PURE__ */ s.jsxs("div", { className: w("items", X.itemsContainer), children: [
|
|
3658
|
-
c && c.length > 0 && /* @__PURE__ */ s.jsxs("div", { className: w("header-row border-bottom", X.headerRow), children: [
|
|
3659
|
-
/* @__PURE__ */ s.jsx("div", { className: X.name }),
|
|
3660
|
-
c == null ? void 0 : c.map((E) => /* @__PURE__ */ s.jsx("div", { className: X.columnItem, style: {
|
|
3661
|
-
width: `${E.width ?? 100}px`,
|
|
3662
|
-
minWidth: `${E.width ?? 100}px`,
|
|
3663
|
-
maxWidth: `${E.width ?? 100}px`
|
|
3664
|
-
}, children: /* @__PURE__ */ s.jsx(z, { variant: "caption", children: E.name }) }, E.key))
|
|
3665
|
-
] }),
|
|
3666
|
-
n == null ? void 0 : n.map((E) => /* @__PURE__ */ s.jsxs("button", { type: "button", className: w("item cursor-pointer", X.item), onClick: () => !m && o(E), children: [
|
|
3667
|
-
/* @__PURE__ */ s.jsx("div", { className: X.name, children: /* @__PURE__ */ s.jsx(z, { variant: "body2", children: u ? E.id : E.name }) }),
|
|
3668
|
-
c == null ? void 0 : c.map((K) => /* @__PURE__ */ s.jsx("div", { className: X.columnItem, style: {
|
|
3669
|
-
width: `${K.width ?? 100}px`,
|
|
3670
|
-
minWidth: `${K.width ?? 100}px`,
|
|
3671
|
-
maxWidth: `${K.width ?? 100}px`
|
|
3672
|
-
}, children: /* @__PURE__ */ s.jsx(z, { variant: "caption", className: w("text-muted"), children: E.additionalColumns && E.additionalColumns[K.key] }) }, K.key))
|
|
3673
|
-
] }, E.id))
|
|
3674
|
-
] })
|
|
3675
|
-
] }) }) })
|
|
3689
|
+
const g = n.split(".");
|
|
3690
|
+
let C = d.errors;
|
|
3691
|
+
g.forEach((k) => {
|
|
3692
|
+
C !== void 0 && (C = C[k]);
|
|
3693
|
+
}), v(C);
|
|
3694
|
+
}, [d, n]), D(() => {
|
|
3695
|
+
d.isSubmitted && f(!0);
|
|
3696
|
+
}, [d]);
|
|
3697
|
+
const b = p !== void 0;
|
|
3698
|
+
return /* @__PURE__ */ s.jsxs(t, { isForRadioInput: !0, hidden: l, withoutLabel: !e, label: `${e}${a ? " *" : ""}`, isInvalid: b, className: c, children: [
|
|
3699
|
+
j.map((g) => /* @__PURE__ */ s.jsx(ee.Check, { id: `radio-${g.id}`, label: g.name, type: "radio", value: g.id ?? "", checked: m(n) === g.id, ...u(n, {
|
|
3700
|
+
onChange: () => {
|
|
3701
|
+
o && o.forEach((C) => h(C, null, { shouldDirty: !0, shouldValidate: x }));
|
|
3702
|
+
}
|
|
3703
|
+
}), isInvalid: b, hidden: l, disabled: i, className: "w-100" }, g.id)),
|
|
3704
|
+
p && /* @__PURE__ */ s.jsx(ye, { message: p.message })
|
|
3676
3705
|
] });
|
|
3677
|
-
}
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
}
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
/* @__PURE__ */ s.jsxs(i, { to: `/search?query=${e}&type=${d.key.category}`, className: w("group-header", fe.header), onClick: n, children: [
|
|
3703
|
-
/* @__PURE__ */ s.jsx(z, { variant: "body", className: "text-primary", children: d.key.categoryName }),
|
|
3704
|
-
/* @__PURE__ */ s.jsxs(z, { variant: "caption", children: [
|
|
3705
|
-
d.items.length,
|
|
3706
|
-
" ",
|
|
3707
|
-
l.amountFrom,
|
|
3708
|
-
" ",
|
|
3709
|
-
d.key.totalCount
|
|
3710
|
-
] })
|
|
3711
|
-
] }),
|
|
3712
|
-
(h = d.items) == null ? void 0 : h.map((m, p) => /* @__PURE__ */ s.jsxs(
|
|
3713
|
-
i,
|
|
3714
|
-
{
|
|
3715
|
-
to: u(m),
|
|
3716
|
-
className: w("search-item d-flex gap-3 align-items-center justify-content-between", fe.item),
|
|
3717
|
-
onClick: n,
|
|
3718
|
-
children: [
|
|
3719
|
-
/* @__PURE__ */ s.jsx(z, { variant: "body2", className: "text-nowrap text-truncate", children: m.name }),
|
|
3720
|
-
/* @__PURE__ */ s.jsx(z, { variant: "caption", className: "text-primary", children: /* @__PURE__ */ s.jsx(Wr, {}) })
|
|
3721
|
-
]
|
|
3722
|
-
},
|
|
3723
|
-
p
|
|
3724
|
-
))
|
|
3725
|
-
] }, d.key.category);
|
|
3726
|
-
}) }) });
|
|
3727
|
-
}, ic = "_input-group_1lkfy_1", cc = "_input-group-text_1lkfy_5", lc = "_left_1lkfy_9", uc = "_right_1lkfy_13", dc = "_input_1lkfy_1", hc = "_submit-button_1lkfy_20", pe = {
|
|
3728
|
-
"input-group": "_input-group_1lkfy_1",
|
|
3729
|
-
inputGroup: ic,
|
|
3730
|
-
"input-group-text": "_input-group-text_1lkfy_5",
|
|
3731
|
-
inputGroupText: cc,
|
|
3732
|
-
left: lc,
|
|
3733
|
-
right: uc,
|
|
3734
|
-
input: dc,
|
|
3735
|
-
"submit-button": "_submit-button_1lkfy_20",
|
|
3736
|
-
submitButton: hc
|
|
3737
|
-
}, mc = (t, e) => {
|
|
3738
|
-
const n = Rr(), [r, o] = P(!1), [a, i] = P([]), l = !t || !t.key, c = O(() => {
|
|
3739
|
-
if (e.length < 3) {
|
|
3740
|
-
i([]);
|
|
3741
|
-
return;
|
|
3742
|
-
}
|
|
3743
|
-
o(!0), n.get(`/search/${e}?count=${l ? 5 : 20}${l ? "" : `&type=${t.key}`}`).then(({ data: u }) => {
|
|
3744
|
-
i(u), o(!1);
|
|
3745
|
-
}).catch(() => {
|
|
3746
|
-
o(!1);
|
|
3747
|
-
});
|
|
3748
|
-
}, [t, e, n, l]);
|
|
3749
|
-
return D(() => {
|
|
3750
|
-
c();
|
|
3751
|
-
}, [c]), { isLoading: r, searchItems: a };
|
|
3752
|
-
}, hl = ({ searchTypes: t, navigateFunction: e }) => {
|
|
3753
|
-
const { appSearchTexts: n } = F(oe), [r, o] = P(t.length > 0 ? t[0] : null), [a, i] = P(""), [l, c] = sr(a, 500), { isLoading: u, searchItems: d } = mc(r, l), [h, m] = P(!1);
|
|
3754
|
-
return D(() => {
|
|
3755
|
-
(d.length > 0 || u) && m(!0);
|
|
3756
|
-
}, [d, u]), /* @__PURE__ */ s.jsx(ee, { onSubmit: (p) => {
|
|
3757
|
-
p.preventDefault(), p.stopPropagation(), c.flush(), m(!1), a.length > 2 && e(`/search?query=${a}${r && r.key && `&type=${r == null ? void 0 : r.key}`}`);
|
|
3758
|
-
}, children: /* @__PURE__ */ s.jsxs(nt, { className: pe.inputGroup, children: [
|
|
3759
|
-
/* @__PURE__ */ s.jsx(nt.Text, { className: w("p-1 rounded", pe.inputGroupText, pe.left), children: /* @__PURE__ */ s.jsx(Ji, { searchTypes: t, selectedType: r, setSelectedType: o }) }),
|
|
3760
|
-
/* @__PURE__ */ s.jsx(ee.Control, { placeholder: n.searchPlaceholder, type: "text", size: "sm", className: w("luminus-app-search-input", pe.input), value: a, onChange: (p) => {
|
|
3761
|
-
var v;
|
|
3762
|
-
return i(((v = p.target) == null ? void 0 : v.value) ?? "");
|
|
3763
|
-
}, onFocus: () => d.length > 0 && m(!0) }),
|
|
3764
|
-
/* @__PURE__ */ s.jsx(nt.Text, { className: w("p-0 rounded", pe.inputGroupText, pe.right), children: /* @__PURE__ */ s.jsx("button", { type: "submit", className: w("text-primary", pe.submitButton), children: /* @__PURE__ */ s.jsx(Xi, {}) }) }),
|
|
3765
|
-
/* @__PURE__ */ s.jsx(ac, { query: l, searchTypes: t, show: h, onCancel: () => m(!1), groups: d, isLoading: u })
|
|
3766
|
-
] }) });
|
|
3767
|
-
}, fc = "_card_19733_1", pc = "_header_19733_6", gc = "_header-content_19733_13", wc = "_title_19733_19", xc = "_collapse-icon_19733_22", yc = "_collapsed_19733_27", bc = "_content_19733_30", ge = {
|
|
3768
|
-
card: fc,
|
|
3769
|
-
header: pc,
|
|
3770
|
-
"header-content": "_header-content_19733_13",
|
|
3771
|
-
headerContent: gc,
|
|
3772
|
-
title: wc,
|
|
3773
|
-
"collapse-icon": "_collapse-icon_19733_22",
|
|
3774
|
-
collapseIcon: xc,
|
|
3775
|
-
collapsed: yc,
|
|
3776
|
-
content: bc
|
|
3777
|
-
}, vc = ({ title: t, headerContent: e, children: n, className: r, headerClassName: o, contentClassName: a, ...i }) => {
|
|
3778
|
-
const l = i.collapsible ? i.controlled ? !1 : i.defaultOpen ?? !1 : !0, [c, u] = P(l), d = i.collapsible ? i.controlled ? i.isOpen : c : !0;
|
|
3779
|
-
return D(() => {
|
|
3780
|
-
u(l);
|
|
3781
|
-
}, [l]), /* @__PURE__ */ s.jsxs("div", { className: w("luminus-card rounded shadow-sm", ge.card, {
|
|
3782
|
-
[r ?? ""]: r
|
|
3783
|
-
}), children: [
|
|
3784
|
-
/* @__PURE__ */ s.jsxs("div", { role: i.collapsible ? "button" : void 0, className: w("header", ge.header, {
|
|
3785
|
-
[o ?? ""]: o
|
|
3786
|
-
}), onClick: () => {
|
|
3787
|
-
i.collapsible && (i.controlled ? i.onToggle(!i.isOpen) : u(!c));
|
|
3788
|
-
}, children: [
|
|
3789
|
-
/* @__PURE__ */ s.jsxs("div", { className: w("header-content", ge.headerContent), children: [
|
|
3790
|
-
/* @__PURE__ */ s.jsx(z, { variant: "h6", className: w("text-primary", ge.title), children: t }),
|
|
3791
|
-
e ?? null
|
|
3792
|
-
] }),
|
|
3793
|
-
i.collapsible && /* @__PURE__ */ s.jsx(tn, { className: w(ge.collapseIcon, {
|
|
3794
|
-
[ge.collapsed]: d
|
|
3795
|
-
}) })
|
|
3796
|
-
] }),
|
|
3797
|
-
/* @__PURE__ */ s.jsx(gn, { in: d, children: /* @__PURE__ */ s.jsx("div", { className: w("card-content border-top border-primary", ge.content, {
|
|
3798
|
-
[a ?? ""]: a
|
|
3799
|
-
}), children: n }) })
|
|
3706
|
+
}, il = ({ InputContainer: t = xe, formField: e, label: n, resetsFields: r, size: o, showClearIcon: a, clearValue: i, required: l, hidden: c, disabled: u, rows: d, withoutLabel: h, customFormControlProps: m, className: p }) => {
|
|
3707
|
+
const { register: v, formState: x, setValue: f, watch: j } = me(), [b, g] = P(void 0), [C, k] = P(!1), y = O(() => {
|
|
3708
|
+
const S = i ?? null;
|
|
3709
|
+
f(e, (S == null ? void 0 : S.toString()) ?? "", { shouldDirty: !0, shouldValidate: C });
|
|
3710
|
+
}, [i, f, e, C]), $ = O(() => {
|
|
3711
|
+
const S = e.split(".");
|
|
3712
|
+
let N = x.errors;
|
|
3713
|
+
S.forEach((_) => {
|
|
3714
|
+
N !== void 0 && (N = N[_]);
|
|
3715
|
+
}), g(N);
|
|
3716
|
+
}, [x, e]);
|
|
3717
|
+
D(() => {
|
|
3718
|
+
$();
|
|
3719
|
+
}, [$]), D(() => {
|
|
3720
|
+
x.isSubmitted && k(!0);
|
|
3721
|
+
}, [x]);
|
|
3722
|
+
const M = b !== void 0;
|
|
3723
|
+
return /* @__PURE__ */ s.jsxs(t, { label: `${n}${l ? " *" : ""}`, hidden: c, withoutLabel: h, isInvalid: M, className: p, children: [
|
|
3724
|
+
/* @__PURE__ */ s.jsx(ee.Control, { as: "textarea", size: o, ...v(e, {
|
|
3725
|
+
onChange: () => {
|
|
3726
|
+
r && r.forEach((S) => f(S, null, { shouldDirty: !0, shouldValidate: C }));
|
|
3727
|
+
}
|
|
3728
|
+
}), isInvalid: M, hidden: c, disabled: u, rows: d ?? 2, className: "w-100", ...m }),
|
|
3729
|
+
a && j(e) && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ s.jsx(Z, { color: "secondary", size: "sm", onClick: y, children: /* @__PURE__ */ s.jsx(ke, {}) }) }),
|
|
3730
|
+
b && /* @__PURE__ */ s.jsx(ye, { message: b.message })
|
|
3800
3731
|
] });
|
|
3801
|
-
},
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
"default-indicator": "_default-indicator_14acg_66",
|
|
3816
|
-
defaultIndicator: Ec
|
|
3817
|
-
}, Oc = "_backdrop_3huvf_1", Mc = "_show_3huvf_11", Kt = {
|
|
3818
|
-
backdrop: Oc,
|
|
3819
|
-
show: Mc
|
|
3820
|
-
}, ar = ({ show: t, onClick: e }) => /* @__PURE__ */ s.jsx("div", { className: w("luminus-backdrop", Kt.backdrop, {
|
|
3821
|
-
[Kt.show]: t
|
|
3822
|
-
}), onClick: () => e && e() }), Dc = ({ show: t, onClose: e, photos: n, defaultIndex: r, uploadPhotosText: o, noPhotosText: a, onUploadPhotos: i, photoActions: l }) => {
|
|
3823
|
-
const c = Y(null), [u, d] = P(r), h = n.at(u), m = u > 0, p = u < n.length - 1;
|
|
3732
|
+
}, cl = ({ InputContainer: t = xe, type: e, formField: n, label: r, placeholder: o, size: a, resetsFields: i, showClearIcon: l, clearValue: c, required: u, hidden: d, disabled: h, withoutLabel: m, list: p, step: v, CustomOnChangeComponent: x, className: f }) => {
|
|
3733
|
+
const { register: j, formState: b, setValue: g, watch: C } = me(), [k, y] = P(void 0), [$, M] = P(!1), S = O(() => {
|
|
3734
|
+
const L = c ?? null;
|
|
3735
|
+
e === "number" ? g(n, L !== null ? Number(L) : null, {
|
|
3736
|
+
shouldDirty: !0,
|
|
3737
|
+
shouldValidate: $
|
|
3738
|
+
}) : g(n, (L == null ? void 0 : L.toString()) ?? "", { shouldDirty: !0, shouldValidate: $ });
|
|
3739
|
+
}, [c, e, g, n, $]), N = O(() => {
|
|
3740
|
+
const L = n.split(".");
|
|
3741
|
+
let G = b.errors;
|
|
3742
|
+
L.forEach((se) => {
|
|
3743
|
+
G !== void 0 && (G = G[se]);
|
|
3744
|
+
}), y(G);
|
|
3745
|
+
}, [b, n]);
|
|
3824
3746
|
D(() => {
|
|
3825
|
-
|
|
3826
|
-
}, [
|
|
3827
|
-
|
|
3828
|
-
}, [
|
|
3829
|
-
const
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3747
|
+
N();
|
|
3748
|
+
}, [N]), D(() => {
|
|
3749
|
+
b.isSubmitted && M(!0);
|
|
3750
|
+
}, [b]);
|
|
3751
|
+
const _ = k !== void 0, [T, W] = P(!1), R = C(n), B = un(e, R ?? null, T);
|
|
3752
|
+
return /* @__PURE__ */ s.jsxs(t, { label: `${r}${u ? " *" : ""}`, hidden: d, withoutLabel: m, isInvalid: _, className: f, children: [
|
|
3753
|
+
/* @__PURE__ */ s.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
|
|
3754
|
+
/* @__PURE__ */ s.jsx(ee.Control, { type: B, placeholder: o ?? r, size: a, onFocus: () => {
|
|
3755
|
+
W(!0);
|
|
3756
|
+
}, ...j(n, {
|
|
3757
|
+
setValueAs: (L) => e === "number" ? L == null || L === "" ? null : Number(L) : L == null || L === "" ? null : L,
|
|
3758
|
+
onChange: () => {
|
|
3759
|
+
i && i.forEach((L) => g(L, null, { shouldDirty: !0, shouldValidate: $ }));
|
|
3760
|
+
},
|
|
3761
|
+
onBlur: () => W(!1)
|
|
3762
|
+
}), isInvalid: _, hidden: d, disabled: h, list: p, className: "w-100", step: v }),
|
|
3763
|
+
x && /* @__PURE__ */ s.jsx("div", { className: "custom-picker-button", children: x })
|
|
3764
|
+
] }),
|
|
3765
|
+
l && C(n) && /* @__PURE__ */ s.jsx("div", { className: `luminus-input-remove-icon ${e !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ s.jsx(Z, { color: "secondary", size: "sm", onClick: S, children: /* @__PURE__ */ s.jsx(ke, {}) }) }),
|
|
3766
|
+
k && /* @__PURE__ */ s.jsx(ye, { message: k.message })
|
|
3767
|
+
] });
|
|
3768
|
+
}, ll = ({ InputContainer: t = xe, formField: e, label: n, size: r, defaultSelection: o, resetsFields: a, isNumber: i, required: l, hidden: c, disabled: u, items: d, onSearchQueryChange: h, selectedItemNavigateTo: m, texts: p, dropdownItemsNameWidth: v, isLoading: x, withoutLabel: f, additionalColumns: j, CustomOnChangeComponent: b, displayIdAsName: g, className: C }) => {
|
|
3769
|
+
const { formState: k, setValue: y, watch: $, control: M } = me(), [S, N] = P(void 0), [_, T] = P(!1), [W, R] = P(!1), B = $(e) ?? null, L = B === (o == null ? void 0 : o.id) ? o == null ? void 0 : o.name : $(`${e}-DropdownName`), G = Q(() => B == null ? null : { id: B ?? null, name: L ?? "" }, [B, L]), se = O(() => {
|
|
3770
|
+
const H = e.split(".");
|
|
3771
|
+
let ce = k.errors;
|
|
3772
|
+
H.forEach((Je) => {
|
|
3773
|
+
ce !== void 0 && (ce = ce[Je]);
|
|
3774
|
+
}), N(ce);
|
|
3775
|
+
}, [k, e]), te = O((H) => {
|
|
3776
|
+
if ((H == null ? void 0 : H.id) === B)
|
|
3777
|
+
return;
|
|
3778
|
+
if (a && a.forEach((Je) => y(Je, null, { shouldDirty: !0, shouldValidate: W })), H === null) {
|
|
3779
|
+
y(e, null, {
|
|
3780
|
+
shouldDirty: !0,
|
|
3781
|
+
shouldValidate: W
|
|
3782
|
+
}), y(`${e}-DropdownName`, null);
|
|
3783
|
+
return;
|
|
3840
3784
|
}
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3785
|
+
let ce = null;
|
|
3786
|
+
i ? ce = (H == null ? void 0 : H.id) !== null && (H == null ? void 0 : H.id) !== "" ? parseInt(H.id.toString(), 10) : null : ce = H.id === null || H.id === void 0 || H.id === "" ? null : H.id, y(e, ce, {
|
|
3787
|
+
shouldDirty: !0,
|
|
3788
|
+
shouldValidate: W
|
|
3789
|
+
}), y(`${e}-DropdownName`, H.name ?? "");
|
|
3790
|
+
}, [y, e, W, i, a, B]), U = O((H) => {
|
|
3791
|
+
T(!1), te(H);
|
|
3792
|
+
}, [te]), I = O(() => {
|
|
3793
|
+
T(!1);
|
|
3794
|
+
}, []);
|
|
3795
|
+
D(() => {
|
|
3796
|
+
se();
|
|
3797
|
+
}, [se]), D(() => {
|
|
3798
|
+
k.isSubmitted && R(!0);
|
|
3799
|
+
}, [k]);
|
|
3800
|
+
const E = Y(null), K = S !== void 0, De = m !== void 0, ir = De && G !== null;
|
|
3801
|
+
return /* @__PURE__ */ s.jsx(s.Fragment, { children: /* @__PURE__ */ s.jsxs(t, { label: `${n}${l ? " *" : ""}`, hidden: c, withoutLabel: f, isInvalid: K, inputContainerClassName: w({ "luminus-dropdown-select-open": _ }), className: C, children: [
|
|
3802
|
+
/* @__PURE__ */ s.jsxs(ar, { currentSelection: G, selectedItemNavigateTo: m, children: [
|
|
3803
|
+
g && (G == null ? void 0 : G.name) && /* @__PURE__ */ s.jsx(z, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: G.name }),
|
|
3804
|
+
/* @__PURE__ */ s.jsx(sn, { control: M, name: e, render: () => /* @__PURE__ */ s.jsx(ee.Select, { size: r, onMouseDown: (H) => {
|
|
3805
|
+
H.currentTarget.focus(), H.preventDefault();
|
|
3806
|
+
}, onClick: () => {
|
|
3807
|
+
!De && !u && T(!0);
|
|
3808
|
+
}, ref: E, value: B ?? "", onChange: () => {
|
|
3809
|
+
}, isInvalid: K, hidden: c, className: w("w-100", {
|
|
3810
|
+
"luminus-dropdown-picker-disabled": u,
|
|
3811
|
+
"luminus-dropdown-picker-link": ir
|
|
3812
|
+
}), children: /* @__PURE__ */ s.jsx("option", { value: B, children: g ? B : (L == null ? void 0 : L.length) > 0 ? L : B }) }) }),
|
|
3813
|
+
b || !u && De ? /* @__PURE__ */ s.jsxs("div", { className: "custom-picker-button", children: [
|
|
3814
|
+
!b && !u && De && /* @__PURE__ */ s.jsx(Z, { size: "sm", color: "secondary", onClick: (H) => {
|
|
3815
|
+
H.preventDefault(), H.stopPropagation(), T(!0);
|
|
3816
|
+
}, children: /* @__PURE__ */ s.jsx(nn, {}) }),
|
|
3817
|
+
b ?? null
|
|
3818
|
+
] }) : null
|
|
3819
|
+
] }),
|
|
3820
|
+
S && /* @__PURE__ */ s.jsx(ye, { message: S.message }),
|
|
3821
|
+
E.current && /* @__PURE__ */ s.jsx(_t, { show: _, onCancel: I, items: d, currentSelection: G, onSelectionChange: U, onSearchQueryChange: h, texts: p, itemsNameWidth: v, additionalColumns: j, displayIdAsName: g, isLoading: x, disabled: u, inputRef: E })
|
|
3822
|
+
] }) });
|
|
3823
|
+
}, ul = ({ InputContainer: t = xe, label: e, formField: n, hidden: r, required: o, placeholder: a, disabled: i, showClearIcon: l, resetsFields: c, multiple: u, accept: d, withoutLabel: h, className: m }) => {
|
|
3824
|
+
const { watch: p, setValue: v, register: x, formState: f } = me(), [j, b] = P(!1), [g, C] = P(void 0), k = O(() => {
|
|
3825
|
+
v(n, "");
|
|
3826
|
+
}, [v, n]), y = O(() => {
|
|
3827
|
+
const M = n.split(".");
|
|
3828
|
+
let S = f.errors;
|
|
3829
|
+
M.forEach((N) => {
|
|
3830
|
+
S !== void 0 && (S = S[N]);
|
|
3831
|
+
}), C(S);
|
|
3832
|
+
}, [f, n]);
|
|
3833
|
+
D(y, [y]), D(() => {
|
|
3834
|
+
f.isSubmitted && b(!0);
|
|
3835
|
+
}, [f]);
|
|
3836
|
+
const $ = g !== void 0;
|
|
3837
|
+
return /* @__PURE__ */ s.jsxs(t, { label: `${e}${o ? "*" : ""}`, hidden: r, withoutLabel: h, isInvalid: $, className: m, children: [
|
|
3838
|
+
/* @__PURE__ */ s.jsx(Gn, { type: "file", multiple: u, accept: d.join(", "), placeholder: a ?? e, isInvalid: $, hidden: r, disabled: i, className: "w-100", ...x(n, {
|
|
3839
|
+
onChange: () => {
|
|
3840
|
+
c && c.forEach((M) => v(M, null, { shouldDirty: !0, shouldValidate: j }));
|
|
3841
|
+
}
|
|
3842
|
+
}) }),
|
|
3843
|
+
l && p(n) && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ s.jsx(Z, { color: "secondary", size: "sm", onClick: k, children: /* @__PURE__ */ s.jsx(ke, {}) }) }),
|
|
3844
|
+
g && /* @__PURE__ */ s.jsx(ye, { message: g.message })
|
|
3877
3845
|
] });
|
|
3878
|
-
},
|
|
3879
|
-
const
|
|
3846
|
+
}, dl = ({ children: t, onStorno: e }) => {
|
|
3847
|
+
const { formState: n } = me(), [r, o] = P(!1);
|
|
3880
3848
|
return D(() => {
|
|
3881
|
-
|
|
3882
|
-
|
|
3849
|
+
o(Object.keys(n.dirtyFields).length > 0);
|
|
3850
|
+
}, [n]), r ? /* @__PURE__ */ s.jsx(Ha, { onStorno: e, children: t }) : null;
|
|
3851
|
+
}, hl = ({ InputContainer: t = xe, options: e, formField: n, label: r, size: o, resetsFields: a, isNumber: i, required: l, hidden: c, disabled: u, withoutLabel: d, noSortOptions: h, suffixIdToName: m, className: p }) => {
|
|
3852
|
+
const { customSelectTexts: v } = F(oe), { formState: x, setValue: f, watch: j, control: b } = me(), [g, C] = P(void 0), [k, y] = P(!1), [$, M] = P(!1), [S, N] = P(""), _ = j(n), T = Q(() => e.find((I) => I.id === _) ?? null, [e, _]), W = O(() => {
|
|
3853
|
+
const I = n.split(".");
|
|
3854
|
+
let E = x.errors;
|
|
3855
|
+
I.forEach((K) => {
|
|
3856
|
+
E !== void 0 && (E = E[K]);
|
|
3857
|
+
}), C(E);
|
|
3858
|
+
}, [x, n]), R = O((I) => {
|
|
3859
|
+
if ((I == null ? void 0 : I.id) === _)
|
|
3860
|
+
return;
|
|
3861
|
+
if (a && a.forEach((K) => f(K, null, { shouldDirty: !0, shouldValidate: $ })), I === null) {
|
|
3862
|
+
f(n, null, {
|
|
3863
|
+
shouldDirty: !0,
|
|
3864
|
+
shouldValidate: $
|
|
3865
|
+
});
|
|
3883
3866
|
return;
|
|
3884
3867
|
}
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
}))
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
return /* @__PURE__ */ s.jsx(
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
}
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3868
|
+
let E = null;
|
|
3869
|
+
i ? E = (I == null ? void 0 : I.id) !== null && (I == null ? void 0 : I.id) !== "" ? parseInt(I.id.toString(), 10) : null : E = I.id === null || I.id === void 0 || I.id === "" ? null : I.id, f(n, E, {
|
|
3870
|
+
shouldDirty: !0,
|
|
3871
|
+
shouldValidate: $
|
|
3872
|
+
});
|
|
3873
|
+
}, [f, n, i, a, _, $]), B = O((I) => {
|
|
3874
|
+
y(!1), R(I);
|
|
3875
|
+
}, [R]), L = O((I) => {
|
|
3876
|
+
N(I);
|
|
3877
|
+
}, []);
|
|
3878
|
+
D(() => {
|
|
3879
|
+
W();
|
|
3880
|
+
}, [W]), D(() => {
|
|
3881
|
+
x.isSubmitted && M(!0);
|
|
3882
|
+
}, [x]);
|
|
3883
|
+
const G = O((I) => {
|
|
3884
|
+
var E;
|
|
3885
|
+
return I === null ? "" : !I.name || I.name.length === 0 ? ((E = I.id) == null ? void 0 : E.toString()) ?? "" : m ? `${I.name} (${I.id})` : I.name;
|
|
3886
|
+
}, [m]), se = Q(() => e.map((I) => ({
|
|
3887
|
+
id: I.id,
|
|
3888
|
+
name: G(I)
|
|
3889
|
+
})).filter((I) => {
|
|
3890
|
+
var E;
|
|
3891
|
+
return S ? (E = I.name) == null ? void 0 : E.toLowerCase().includes(S.toLowerCase()) : !0;
|
|
3892
|
+
}).sort((I, E) => h ? 0 : (I.name ?? "").localeCompare(E.name ?? "")), [e, h, S, G]), te = Y(null), U = g !== void 0;
|
|
3893
|
+
return /* @__PURE__ */ s.jsx(s.Fragment, { children: /* @__PURE__ */ s.jsxs(t, { label: `${r}${l ? " *" : ""}`, hidden: c, withoutLabel: d, isInvalid: U, inputContainerClassName: w({ "luminus-dropdown-select-open": k }), className: p, children: [
|
|
3894
|
+
/* @__PURE__ */ s.jsx(sn, { control: b, name: n, render: () => /* @__PURE__ */ s.jsx(ee.Select, { size: o, onMouseDown: (I) => {
|
|
3895
|
+
I.currentTarget.focus(), I.preventDefault();
|
|
3896
|
+
}, onClick: () => {
|
|
3897
|
+
y(!0);
|
|
3898
|
+
}, ref: te, value: _ ?? "", onChange: () => {
|
|
3899
|
+
}, isInvalid: U, hidden: c, disabled: u, className: "w-100", children: /* @__PURE__ */ s.jsx("option", { value: (T == null ? void 0 : T.id) ?? "", children: G(T) }) }) }),
|
|
3900
|
+
g && /* @__PURE__ */ s.jsx(ye, { message: g.message }),
|
|
3901
|
+
te.current && /* @__PURE__ */ s.jsx(_t, { show: k, onCancel: () => y(!1), items: se, currentSelection: T ?? null, onSelectionChange: B, onSearchQueryChange: L, texts: v, disabled: u, inputRef: te, autoHideSearch: !0, allItemsLength: e.length })
|
|
3902
|
+
] }) });
|
|
3903
|
+
}, ml = ({ cell: { value: t } }) => /* @__PURE__ */ s.jsx(s.Fragment, { children: t ? /* @__PURE__ */ s.jsx(Br, { name: t, size: 21, fontSize: 12 }) : /* @__PURE__ */ s.jsx(s.Fragment, {}) }), Tc = "_tab-panel_qgi9v_1", Ec = "_full-height-no-overflow_qgi9v_5", Oc = "_disabled_qgi9v_10", ot = {
|
|
3904
|
+
"tab-panel": "_tab-panel_qgi9v_1",
|
|
3905
|
+
tabPanel: Tc,
|
|
3906
|
+
"full-height-no-overflow": "_full-height-no-overflow_qgi9v_5",
|
|
3907
|
+
fullHeightNoOverflow: Ec,
|
|
3908
|
+
disabled: Oc
|
|
3909
|
+
}, fl = ({ eventKey: t, activeTab: e, fullHeightNoOverflow: n, disabled: r, className: o, children: a }) => t !== e ? null : /* @__PURE__ */ s.jsx("div", { className: w("luminus-tab-panel", ot.tabPanel, { [ot.fullHeightNoOverflow]: n }, { disabled: r }, { [ot.disabled]: r }, o), children: a }), pl = ({ activeTab: t, onSelect: e, children: n }) => /* @__PURE__ */ s.jsx("div", { className: w("luminus-tabs d-flex gap-1 mb-2"), children: n.map((r) => {
|
|
3910
|
+
const o = r.type, a = r.props;
|
|
3911
|
+
if (!a)
|
|
3912
|
+
return null;
|
|
3913
|
+
const i = a.eventKey, l = a.children, c = a.className, u = a.onClick;
|
|
3914
|
+
return /* @__PURE__ */ Ur(o, { ...a, key: a.eventKey, className: w({ active: t === i }, c), onClick: () => {
|
|
3915
|
+
e(i), u && u(i);
|
|
3916
|
+
} }, l);
|
|
3917
|
+
}) }), Mc = "_tab_1hdhk_1", Dc = "_disabled_1hdhk_8", Kt = {
|
|
3918
|
+
tab: Mc,
|
|
3919
|
+
disabled: Dc
|
|
3920
|
+
}, gl = ({ eventKey: t, className: e, onClick: n, disabled: r, children: o }) => /* @__PURE__ */ s.jsx("div", { role: "button", className: w("luminus-tab text-primary rounded", Kt.tab, e, {
|
|
3921
|
+
disabled: r
|
|
3922
|
+
}, { [Kt.disabled]: r }), onClick: () => n && !r && n(t), children: typeof o == "string" ? /* @__PURE__ */ s.jsx(z, { variant: "h6", className: "text-primary", children: o }) : o });
|
|
3923
3923
|
export {
|
|
3924
|
-
|
|
3924
|
+
Jc as Alert,
|
|
3925
3925
|
qc as ApiFileDownloadButton,
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3926
|
+
Kc as AppSearch,
|
|
3927
|
+
Xc as AuthTemplate,
|
|
3928
|
+
Br as AvatarIcon,
|
|
3929
|
+
sr as Backdrop,
|
|
3930
|
+
Gc as Badge,
|
|
3931
|
+
gc as Card,
|
|
3932
|
+
tl as CheckInput,
|
|
3933
|
+
Vc as Collapse,
|
|
3934
3934
|
ct as ContextButton,
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3935
|
+
Vi as Dropdown,
|
|
3936
|
+
zc as DropdownDivider,
|
|
3937
|
+
Li as DropdownItem,
|
|
3938
|
+
ol as DropdownPicker,
|
|
3939
|
+
qi as DropdownToggle,
|
|
3940
3940
|
nr as FileUploadContextButton,
|
|
3941
|
-
|
|
3941
|
+
Uc as FileUploadDropdownItem,
|
|
3942
3942
|
Ha as FloatingFormSubmit,
|
|
3943
3943
|
Ve as FloatingLabelInput,
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3944
|
+
Hc as HomeDashboard,
|
|
3945
|
+
sl as HookFormCheckInput,
|
|
3946
|
+
ll as HookFormDropdownPicker,
|
|
3947
|
+
ul as HookFormFileInput,
|
|
3948
|
+
dl as HookFormFloatingSubmit,
|
|
3949
|
+
al as HookFormRadioInput,
|
|
3950
|
+
hl as HookFormSelectInput,
|
|
3951
|
+
il as HookFormTextAreaInput,
|
|
3952
|
+
cl as HookFormTextInput,
|
|
3953
|
+
el as HtmlTooltip,
|
|
3954
3954
|
Z as IconButton,
|
|
3955
3955
|
ye as InvalidFeedback,
|
|
3956
3956
|
Xr as Loading,
|
|
3957
3957
|
Zr as LoadingBlock,
|
|
3958
3958
|
Yc as MonthPicker,
|
|
3959
3959
|
yl as NoInputContainer,
|
|
3960
|
-
|
|
3961
|
-
|
|
3960
|
+
Qc as PhotoLibrary,
|
|
3961
|
+
Sc as PhotoLightbox,
|
|
3962
3962
|
qt as PrimaryButton,
|
|
3963
3963
|
xe as RowLabelInput,
|
|
3964
|
-
|
|
3964
|
+
rl as SelectInput,
|
|
3965
3965
|
_t as SimplePicker,
|
|
3966
|
-
|
|
3966
|
+
Pr as SimpleToggle,
|
|
3967
3967
|
_l as SimpleTooltip,
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3968
|
+
gl as Tab,
|
|
3969
|
+
fl as TabPanel,
|
|
3970
|
+
pl as Tabs,
|
|
3971
|
+
nl as TextInput,
|
|
3972
3972
|
z as Typography,
|
|
3973
3973
|
bl as UserAvatarToggle,
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3974
|
+
ml as UserAvatarValueFormat,
|
|
3975
|
+
Zc as VersionInfo,
|
|
3976
|
+
Ht as WidgetCard,
|
|
3977
3977
|
Bc as YearPicker
|
|
3978
3978
|
};
|