unifyedx-storybook-new 0.2.27 → 0.2.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e, Fragment as te } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import se, { useState as M, useMemo as ue, useId as Qe, Fragment as Q, useEffect as Z, useCallback as ae, useRef as xe } from "react";
|
|
3
3
|
import { a as H, U as mt, X as ge, P as c, L as Ua, C as ve, b as tt, f as Ze, d as yt, D as Yt, F as qa, e as Ga, h as Ya, T as Ke, u as Wa, i as zt, I as Wt, j as Jt, k as Ja, l as Xa, m as Ha, n as Xt, S as vt, o as Ht, M as Qa, p as Za, q as wt, r as Ka, A as er, E as Qt, s as tr, t as ar, v as rr, w as nr, x as Zt, y as sr, z as Kt, B as ea, G as lr, H as ir, J as or, K as et, N as ut, O as ht, Q as cr, R as dr, V as ta, W as mr, Y as Nt, Z as ur, _ as hr, $ as Me, a0 as pr, a1 as gr, a2 as br, a3 as fr, a4 as xr, a5 as yr, a6 as St, a7 as vr, a8 as wr, a9 as Nr, aa as kr, ab as Cr, ac as zr, ad as Sr, ae as Dr, af as $r, ag as Fe, ah as aa, ai as Tr, aj as Ar, ak as Fr, al as Er, am as Rr, an as ra, ao as Ir, ap as Or, aq as na, ar as Pr, as as pt, at as sa, au as Lr } from "./vendor-wRQnjUYv.js";
|
|
4
|
-
import { Popover as Mr, PopoverButton as Br, PopoverPanel as jr, Transition as he, Dialog as ye, TransitionChild as Ne, DialogPanel as Ee, DialogTitle as at, TabGroup as Vr, TabList as _r, Tab as
|
|
4
|
+
import { Popover as Mr, PopoverButton as Br, PopoverPanel as jr, Transition as he, Dialog as ye, TransitionChild as Ne, DialogPanel as Ee, DialogTitle as at, TabGroup as Vr, TabList as _r, Tab as ne, TabPanels as Ur, RadioGroup as qe, Listbox as K, ListboxButton as qr, ListboxOptions as Gr, ListboxOption as Yr, SwitchGroup as Wr, Switch as ot, Menu as Jr, MenuButton as Xr, Portal as Hr, MenuItems as Qr, MenuItem as Zr, DialogBackdrop as Kr } from "@headlessui/react";
|
|
5
5
|
import { motion as le, AnimatePresence as Ce } from "framer-motion";
|
|
6
6
|
import { d as en } from "./vendor-lodash-C6Pmit-j.js";
|
|
7
7
|
import { useFloating as la, offset as ia, flip as oa, shift as ca, autoUpdate as da, useClick as tn, useDismiss as an, useInteractions as rn, FloatingPortal as nn } from "@floating-ui/react";
|
|
@@ -29,14 +29,14 @@ const kn = (t) => {
|
|
|
29
29
|
className: m,
|
|
30
30
|
...o
|
|
31
31
|
}) => {
|
|
32
|
-
const [u, p] =
|
|
32
|
+
const [u, p] = M(!1), b = ue(() => Cn(a), []), f = t && !u, r = !f && a, y = !f && !a, d = H(
|
|
33
33
|
"avatar-container",
|
|
34
34
|
`avatar--size-${s}`,
|
|
35
35
|
m
|
|
36
|
-
), h = f ? "transparent" : i || b.bg,
|
|
36
|
+
), h = f ? "transparent" : i || b.bg, $ = l || b.text;
|
|
37
37
|
return /* @__PURE__ */ n("div", { className: d, style: {
|
|
38
38
|
backgroundColor: h,
|
|
39
|
-
color:
|
|
39
|
+
color: $
|
|
40
40
|
}, ...o, children: [
|
|
41
41
|
f && /* @__PURE__ */ e(
|
|
42
42
|
"img",
|
|
@@ -48,10 +48,10 @@ const kn = (t) => {
|
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
50
|
r && /* @__PURE__ */ e("span", { className: "avatar-initials", "aria-label": a, children: zn(a) }),
|
|
51
|
-
|
|
51
|
+
y && /* @__PURE__ */ e("span", { className: "avatar-icon", children: /* @__PURE__ */ e(mt, {}) })
|
|
52
52
|
] });
|
|
53
53
|
}, Sn = ({ children: t, max: a = 4, truncatedMessage: s = "Members", ...i }) => {
|
|
54
|
-
const l =
|
|
54
|
+
const l = se.Children.toArray(t), m = l.slice(0, a), o = l.length - a;
|
|
55
55
|
return /* @__PURE__ */ n("div", { className: "avatar-group-container", ...i, children: [
|
|
56
56
|
m,
|
|
57
57
|
o > 0 && /* @__PURE__ */ n("div", { className: "avatar-container avatar--size-medium avatar-excess", children: [
|
|
@@ -153,16 +153,16 @@ const $n = {
|
|
|
153
153
|
label: f,
|
|
154
154
|
children: r,
|
|
155
155
|
// ✅ Add children to the props list
|
|
156
|
-
onClick:
|
|
156
|
+
onClick: y,
|
|
157
157
|
...d
|
|
158
158
|
}) => {
|
|
159
|
-
const h = p || m,
|
|
159
|
+
const h = p || m, $ = u && !f, T = H(
|
|
160
160
|
"btn-base",
|
|
161
161
|
$n[b],
|
|
162
162
|
Tn[o],
|
|
163
163
|
{
|
|
164
164
|
"is-loading": m,
|
|
165
|
-
"btn-icon-only":
|
|
165
|
+
"btn-icon-only": $
|
|
166
166
|
},
|
|
167
167
|
l
|
|
168
168
|
);
|
|
@@ -171,11 +171,11 @@ const $n = {
|
|
|
171
171
|
{
|
|
172
172
|
"data-testid": t,
|
|
173
173
|
type: s,
|
|
174
|
-
className:
|
|
174
|
+
className: T,
|
|
175
175
|
disabled: h,
|
|
176
|
-
onClick:
|
|
177
|
-
title: a ||
|
|
178
|
-
"aria-label": i ||
|
|
176
|
+
onClick: y,
|
|
177
|
+
title: a || $ && i || (typeof f == "string" ? f : void 0),
|
|
178
|
+
"aria-label": i || $ && a || (typeof f == "string" ? f : void 0),
|
|
179
179
|
...d,
|
|
180
180
|
children: m ? /* @__PURE__ */ e(Ua, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(te, { children: [
|
|
181
181
|
u && /* @__PURE__ */ e(u, { size: b === "large" ? 20 : 16 }),
|
|
@@ -321,7 +321,7 @@ const $n = {
|
|
|
321
321
|
}) => {
|
|
322
322
|
const b = t?.from, f = t?.to, r = (d) => {
|
|
323
323
|
d.stopPropagation(), d.preventDefault(), s?.();
|
|
324
|
-
},
|
|
324
|
+
}, y = b && f ? /* @__PURE__ */ n(te, { children: [
|
|
325
325
|
Ze(b, "MMM d, y"),
|
|
326
326
|
" - ",
|
|
327
327
|
Ze(f, "MMM d, y")
|
|
@@ -340,10 +340,10 @@ const $n = {
|
|
|
340
340
|
"datepicker-trigger--disabled": o
|
|
341
341
|
}),
|
|
342
342
|
disabled: o,
|
|
343
|
-
"aria-label": b && f ? `Selected range is ${
|
|
343
|
+
"aria-label": b && f ? `Selected range is ${y}` : i,
|
|
344
344
|
children: [
|
|
345
345
|
/* @__PURE__ */ e(yt, { className: "datepicker-icon" }),
|
|
346
|
-
/* @__PURE__ */ e("span", { className: "datepicker-value", children:
|
|
346
|
+
/* @__PURE__ */ e("span", { className: "datepicker-value", children: y })
|
|
347
347
|
]
|
|
348
348
|
}
|
|
349
349
|
),
|
|
@@ -630,12 +630,12 @@ const $n = {
|
|
|
630
630
|
handleRemoveRejectedFile: b,
|
|
631
631
|
handleSubmit: f,
|
|
632
632
|
isSubmitting: r,
|
|
633
|
-
formErrors:
|
|
633
|
+
formErrors: y,
|
|
634
634
|
// --- UI Text ---
|
|
635
635
|
title: d = "Upload Files",
|
|
636
636
|
subHeading: h = "Supports PNG, JPG, PDF. Max size: 50MB."
|
|
637
637
|
}) => {
|
|
638
|
-
const
|
|
638
|
+
const $ = o.length > 0 || u.length > 0;
|
|
639
639
|
return /* @__PURE__ */ e(he, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(
|
|
640
640
|
ye,
|
|
641
641
|
{
|
|
@@ -671,7 +671,7 @@ const $n = {
|
|
|
671
671
|
Ee,
|
|
672
672
|
{
|
|
673
673
|
className: "dialog-panel",
|
|
674
|
-
onClick: (
|
|
674
|
+
onClick: (T) => T.stopPropagation(),
|
|
675
675
|
children: [
|
|
676
676
|
/* @__PURE__ */ e("input", { ...i() }),
|
|
677
677
|
/* @__PURE__ */ n("form", { onSubmit: f, className: "form-wrapper", children: [
|
|
@@ -710,11 +710,11 @@ const $n = {
|
|
|
710
710
|
]
|
|
711
711
|
}
|
|
712
712
|
),
|
|
713
|
-
|
|
714
|
-
|
|
713
|
+
y.filesToUpload && /* @__PURE__ */ e("p", { className: "form-error-message", children: y.filesToUpload.message }),
|
|
714
|
+
$ && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
|
|
715
715
|
/* @__PURE__ */ e("h3", { children: "Upload Queue" }),
|
|
716
716
|
/* @__PURE__ */ n("ul", { className: "file-list", children: [
|
|
717
|
-
o.map((
|
|
717
|
+
o.map((T, A) => /* @__PURE__ */ n(
|
|
718
718
|
"li",
|
|
719
719
|
{
|
|
720
720
|
className: "file-item",
|
|
@@ -723,12 +723,12 @@ const $n = {
|
|
|
723
723
|
/* @__PURE__ */ e(
|
|
724
724
|
Tt,
|
|
725
725
|
{
|
|
726
|
-
extension:
|
|
726
|
+
extension: T.name.split(".").pop()
|
|
727
727
|
}
|
|
728
728
|
),
|
|
729
729
|
/* @__PURE__ */ n("div", { children: [
|
|
730
|
-
/* @__PURE__ */ e("p", { className: "file-item-name", children:
|
|
731
|
-
/* @__PURE__ */ e("p", { className: "file-item-size", children: At(
|
|
730
|
+
/* @__PURE__ */ e("p", { className: "file-item-name", children: T.name }),
|
|
731
|
+
/* @__PURE__ */ e("p", { className: "file-item-size", children: At(T.size) })
|
|
732
732
|
] })
|
|
733
733
|
] }),
|
|
734
734
|
/* @__PURE__ */ e(
|
|
@@ -742,9 +742,9 @@ const $n = {
|
|
|
742
742
|
)
|
|
743
743
|
]
|
|
744
744
|
},
|
|
745
|
-
`${
|
|
745
|
+
`${T.name}-${A}`
|
|
746
746
|
)),
|
|
747
|
-
u.map(({ file:
|
|
747
|
+
u.map(({ file: T, message: A }, E) => /* @__PURE__ */ n(
|
|
748
748
|
"li",
|
|
749
749
|
{
|
|
750
750
|
className: "file-item file-item--rejected",
|
|
@@ -753,12 +753,12 @@ const $n = {
|
|
|
753
753
|
/* @__PURE__ */ e(
|
|
754
754
|
Tt,
|
|
755
755
|
{
|
|
756
|
-
extension:
|
|
756
|
+
extension: T.name.split(".").pop()
|
|
757
757
|
}
|
|
758
758
|
),
|
|
759
759
|
/* @__PURE__ */ n("div", { children: [
|
|
760
|
-
/* @__PURE__ */ e("p", { className: "file-item-name", children:
|
|
761
|
-
/* @__PURE__ */ e("p", { className: "file-item-size", children: At(
|
|
760
|
+
/* @__PURE__ */ e("p", { className: "file-item-name", children: T.name }),
|
|
761
|
+
/* @__PURE__ */ e("p", { className: "file-item-size", children: At(T.size) }),
|
|
762
762
|
/* @__PURE__ */ e("p", { className: "rejection-reason", children: A })
|
|
763
763
|
] })
|
|
764
764
|
] }),
|
|
@@ -773,7 +773,7 @@ const $n = {
|
|
|
773
773
|
)
|
|
774
774
|
]
|
|
775
775
|
},
|
|
776
|
-
`${
|
|
776
|
+
`${T.name}-${E}`
|
|
777
777
|
))
|
|
778
778
|
] })
|
|
779
779
|
] })
|
|
@@ -858,75 +858,75 @@ const $n = {
|
|
|
858
858
|
fetchCreatedOrUpdatedByUsers: u = async () => []
|
|
859
859
|
// Mockable fetcher
|
|
860
860
|
}) => {
|
|
861
|
-
const [p, b] =
|
|
861
|
+
const [p, b] = M({
|
|
862
862
|
createdBy: [],
|
|
863
863
|
updatedBy: []
|
|
864
|
-
}), [f, r] =
|
|
864
|
+
}), [f, r] = M({
|
|
865
865
|
createdBy: !1,
|
|
866
866
|
updatedBy: !1
|
|
867
|
-
}), [
|
|
867
|
+
}), [y, d] = M({
|
|
868
868
|
startDate: null
|
|
869
|
-
}), [h,
|
|
869
|
+
}), [h, $] = M({
|
|
870
870
|
endDate: null
|
|
871
|
-
}),
|
|
871
|
+
}), T = Wa({
|
|
872
872
|
initialValues: JSON.parse(JSON.stringify(m)),
|
|
873
873
|
// Deep copy
|
|
874
|
-
onSubmit: (
|
|
875
|
-
const
|
|
876
|
-
Object.keys(
|
|
877
|
-
v
|
|
878
|
-
operator:
|
|
879
|
-
values: Array.isArray(
|
|
880
|
-
range:
|
|
874
|
+
onSubmit: (C) => {
|
|
875
|
+
const g = {};
|
|
876
|
+
Object.keys(C).forEach((v) => {
|
|
877
|
+
g[v] = {
|
|
878
|
+
operator: C[v].operator || "in",
|
|
879
|
+
values: Array.isArray(C[v].values) ? C[v].values : [],
|
|
880
|
+
range: C[v].range || null
|
|
881
881
|
};
|
|
882
|
-
}), console.log("[storybook filter] Applied Filters:",
|
|
883
|
-
filters:
|
|
882
|
+
}), console.log("[storybook filter] Applied Filters:", g), typeof s == "function" && s({
|
|
883
|
+
filters: g,
|
|
884
884
|
activeCount: E
|
|
885
885
|
}), a();
|
|
886
886
|
},
|
|
887
887
|
enableReinitialize: !0
|
|
888
|
-
}), A = ue(() => l.reduce((
|
|
889
|
-
const
|
|
890
|
-
let
|
|
891
|
-
if (
|
|
892
|
-
switch (
|
|
888
|
+
}), A = ue(() => l.reduce((C, g) => {
|
|
889
|
+
const v = g.key, w = T.values[v];
|
|
890
|
+
let z = !1;
|
|
891
|
+
if (w)
|
|
892
|
+
switch (g.type) {
|
|
893
893
|
case "multiselect":
|
|
894
894
|
case "multiselect-users":
|
|
895
|
-
|
|
895
|
+
z = Array.isArray(w.values) && w.values.length > 0;
|
|
896
896
|
break;
|
|
897
897
|
case "date":
|
|
898
|
-
(
|
|
898
|
+
(w.range && w.range !== "" || Array.isArray(w.values) && w.values.length > 0) && (z = !0);
|
|
899
899
|
break;
|
|
900
900
|
}
|
|
901
|
-
return
|
|
902
|
-
}, {}), [l,
|
|
903
|
-
if (
|
|
904
|
-
const
|
|
905
|
-
if (!Array.isArray(
|
|
906
|
-
const [
|
|
907
|
-
if (!
|
|
908
|
-
const
|
|
909
|
-
return
|
|
910
|
-
}), [l,
|
|
901
|
+
return C[v] = z, C;
|
|
902
|
+
}, {}), [l, T.values]), E = Object.values(A).filter(Boolean).length, I = ue(() => l.some((C) => {
|
|
903
|
+
if (C.type !== "date") return !1;
|
|
904
|
+
const g = T.values?.[C.key]?.values;
|
|
905
|
+
if (!Array.isArray(g) || g.length < 2) return !1;
|
|
906
|
+
const [v, w] = g;
|
|
907
|
+
if (!v || !w) return !1;
|
|
908
|
+
const z = v instanceof Date ? v : new Date(v), N = w instanceof Date ? w : new Date(w);
|
|
909
|
+
return z > N;
|
|
910
|
+
}), [l, T.values]), j = async (C, g) => {
|
|
911
911
|
try {
|
|
912
|
-
r((
|
|
913
|
-
const
|
|
914
|
-
b((
|
|
915
|
-
} catch (
|
|
916
|
-
console.error(`Error fetching ${
|
|
912
|
+
r((w) => ({ ...w, [C]: !0 }));
|
|
913
|
+
const v = await u(C, g);
|
|
914
|
+
b((w) => ({ ...w, [C]: v }));
|
|
915
|
+
} catch (v) {
|
|
916
|
+
console.error(`Error fetching ${C} users:`, v);
|
|
917
917
|
} finally {
|
|
918
|
-
r((
|
|
918
|
+
r((v) => ({ ...v, [C]: !1 }));
|
|
919
919
|
}
|
|
920
|
-
},
|
|
921
|
-
const
|
|
922
|
-
l[
|
|
920
|
+
}, _ = (C) => {
|
|
921
|
+
const g = l[C].key, v = l[C].url;
|
|
922
|
+
l[C].type === "multiselect-users" && p[g].length === 0 && !f[g] && j(g, v);
|
|
923
923
|
}, G = () => {
|
|
924
|
-
|
|
925
|
-
}, q = (
|
|
926
|
-
const
|
|
927
|
-
if (!
|
|
928
|
-
const
|
|
929
|
-
switch (
|
|
924
|
+
T.resetForm(), b({ createdBy: [], updatedBy: [] }), i();
|
|
925
|
+
}, q = (C) => {
|
|
926
|
+
const g = l.find((z) => z.key === C);
|
|
927
|
+
if (!g) return null;
|
|
928
|
+
const v = T.values[C] || m[C], w = Array.isArray(v.values) ? v.values : [];
|
|
929
|
+
switch (g.type) {
|
|
930
930
|
case "multiselect":
|
|
931
931
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
932
932
|
/* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
|
|
@@ -934,10 +934,10 @@ const $n = {
|
|
|
934
934
|
/* @__PURE__ */ e(
|
|
935
935
|
"select",
|
|
936
936
|
{
|
|
937
|
-
value:
|
|
938
|
-
onChange: (R) =>
|
|
937
|
+
value: v.operator || "in",
|
|
938
|
+
onChange: (R) => T.setFieldValue(`${C}.operator`, R.target.value),
|
|
939
939
|
className: "filter-select",
|
|
940
|
-
children:
|
|
940
|
+
children: g.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Includes" : "Excludes" }, R))
|
|
941
941
|
}
|
|
942
942
|
)
|
|
943
943
|
] }),
|
|
@@ -947,42 +947,42 @@ const $n = {
|
|
|
947
947
|
"input",
|
|
948
948
|
{
|
|
949
949
|
type: "checkbox",
|
|
950
|
-
id: `select-all-${
|
|
950
|
+
id: `select-all-${C}`,
|
|
951
951
|
className: "filter-checkbox-input",
|
|
952
|
-
checked:
|
|
952
|
+
checked: g.options.length > 0 && w.length === g.options.length,
|
|
953
953
|
onChange: (R) => {
|
|
954
|
-
const Y = R.target.checked ?
|
|
955
|
-
|
|
954
|
+
const Y = R.target.checked ? g.options.map((W) => W.value) : [];
|
|
955
|
+
T.setFieldValue(`${C}.values`, Y);
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
),
|
|
959
959
|
/* @__PURE__ */ e(
|
|
960
960
|
"label",
|
|
961
961
|
{
|
|
962
|
-
htmlFor: `select-all-${
|
|
962
|
+
htmlFor: `select-all-${C}`,
|
|
963
963
|
className: "filter-checkbox-label",
|
|
964
964
|
children: "Select All"
|
|
965
965
|
}
|
|
966
966
|
)
|
|
967
967
|
] }),
|
|
968
|
-
|
|
968
|
+
g.options.map((R) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
|
|
969
969
|
/* @__PURE__ */ e(
|
|
970
970
|
"input",
|
|
971
971
|
{
|
|
972
972
|
type: "checkbox",
|
|
973
|
-
id: `${
|
|
973
|
+
id: `${C}-${R.value}`,
|
|
974
974
|
className: "filter-checkbox-input",
|
|
975
|
-
checked:
|
|
975
|
+
checked: w.includes(R.value),
|
|
976
976
|
onChange: (Y) => {
|
|
977
|
-
const W = Y.target.checked ? [...
|
|
978
|
-
|
|
977
|
+
const W = Y.target.checked ? [...w, R.value] : w.filter((pe) => pe !== R.value);
|
|
978
|
+
T.setFieldValue(`${C}.values`, W);
|
|
979
979
|
}
|
|
980
980
|
}
|
|
981
981
|
),
|
|
982
982
|
/* @__PURE__ */ e(
|
|
983
983
|
"label",
|
|
984
984
|
{
|
|
985
|
-
htmlFor: `${
|
|
985
|
+
htmlFor: `${C}-${R.value}`,
|
|
986
986
|
className: "filter-checkbox-label",
|
|
987
987
|
children: R.label
|
|
988
988
|
}
|
|
@@ -991,33 +991,33 @@ const $n = {
|
|
|
991
991
|
] })
|
|
992
992
|
] });
|
|
993
993
|
case "multiselect-users":
|
|
994
|
-
const
|
|
994
|
+
const z = p[C] || [], N = f[C];
|
|
995
995
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
996
996
|
/* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
|
|
997
997
|
/* @__PURE__ */ e("label", { className: "filter-label", children: "Operator:" }),
|
|
998
998
|
/* @__PURE__ */ e(
|
|
999
999
|
"select",
|
|
1000
1000
|
{
|
|
1001
|
-
value:
|
|
1002
|
-
onChange: (R) =>
|
|
1001
|
+
value: v.operator || "in",
|
|
1002
|
+
onChange: (R) => T.setFieldValue(`${C}.operator`, R.target.value),
|
|
1003
1003
|
className: "filter-select",
|
|
1004
|
-
children:
|
|
1004
|
+
children: g.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Includes" : "Excludes" }, R))
|
|
1005
1005
|
}
|
|
1006
1006
|
)
|
|
1007
1007
|
] }),
|
|
1008
|
-
N ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children:
|
|
1008
|
+
N ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: z.length > 0 ? /* @__PURE__ */ n(te, { children: [
|
|
1009
1009
|
/* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
|
|
1010
1010
|
/* @__PURE__ */ e(
|
|
1011
1011
|
"input",
|
|
1012
1012
|
{
|
|
1013
1013
|
type: "checkbox",
|
|
1014
|
-
id: `select-all-users-${
|
|
1014
|
+
id: `select-all-users-${C}`,
|
|
1015
1015
|
className: "filter-checkbox-input",
|
|
1016
|
-
checked:
|
|
1016
|
+
checked: z.length > 0 && w.length === z.length,
|
|
1017
1017
|
onChange: (R) => {
|
|
1018
|
-
const Y = R.target.checked ?
|
|
1019
|
-
|
|
1020
|
-
`${
|
|
1018
|
+
const Y = R.target.checked ? z.map((W) => W.email) : [];
|
|
1019
|
+
T.setFieldValue(
|
|
1020
|
+
`${C}.values`,
|
|
1021
1021
|
Y
|
|
1022
1022
|
);
|
|
1023
1023
|
}
|
|
@@ -1026,24 +1026,24 @@ const $n = {
|
|
|
1026
1026
|
/* @__PURE__ */ e(
|
|
1027
1027
|
"label",
|
|
1028
1028
|
{
|
|
1029
|
-
htmlFor: `select-all-users-${
|
|
1029
|
+
htmlFor: `select-all-users-${C}`,
|
|
1030
1030
|
className: "filter-checkbox-label",
|
|
1031
1031
|
children: "Select All Users"
|
|
1032
1032
|
}
|
|
1033
1033
|
)
|
|
1034
1034
|
] }),
|
|
1035
|
-
|
|
1035
|
+
z.map((R) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
|
|
1036
1036
|
/* @__PURE__ */ e(
|
|
1037
1037
|
"input",
|
|
1038
1038
|
{
|
|
1039
1039
|
type: "checkbox",
|
|
1040
|
-
id: `${
|
|
1040
|
+
id: `${C}-${R.email}`,
|
|
1041
1041
|
className: "filter-checkbox-input",
|
|
1042
|
-
checked:
|
|
1042
|
+
checked: w.includes(R.email),
|
|
1043
1043
|
onChange: (Y) => {
|
|
1044
|
-
const W = Y.target.checked ? [...
|
|
1045
|
-
|
|
1046
|
-
`${
|
|
1044
|
+
const W = Y.target.checked ? [...w, R.email] : w.filter((pe) => pe !== R.email);
|
|
1045
|
+
T.setFieldValue(
|
|
1046
|
+
`${C}.values`,
|
|
1047
1047
|
W
|
|
1048
1048
|
);
|
|
1049
1049
|
}
|
|
@@ -1052,7 +1052,7 @@ const $n = {
|
|
|
1052
1052
|
/* @__PURE__ */ n(
|
|
1053
1053
|
"label",
|
|
1054
1054
|
{
|
|
1055
|
-
htmlFor: `${
|
|
1055
|
+
htmlFor: `${C}-${R.email}`,
|
|
1056
1056
|
className: "filter-checkbox-label",
|
|
1057
1057
|
children: [
|
|
1058
1058
|
/* @__PURE__ */ e("span", { className: "user-label-name", children: R.name }),
|
|
@@ -1064,7 +1064,7 @@ const $n = {
|
|
|
1064
1064
|
] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
|
|
1065
1065
|
] });
|
|
1066
1066
|
case "date":
|
|
1067
|
-
const
|
|
1067
|
+
const x = v.values || [], [k, F] = x, L = k && F, U = x[0] || null, S = x[1] || null, O = {
|
|
1068
1068
|
startDate: U instanceof Date ? U.toISOString().slice(0, 10) : null,
|
|
1069
1069
|
endDate: U instanceof Date ? U.toISOString().slice(0, 10) : null
|
|
1070
1070
|
}, D = {
|
|
@@ -1078,17 +1078,17 @@ const $n = {
|
|
|
1078
1078
|
{ key: "this_month", label: "This Month" },
|
|
1079
1079
|
{ key: "last_month", label: "Last Month" },
|
|
1080
1080
|
{ key: "custom", label: "Custom" }
|
|
1081
|
-
],
|
|
1081
|
+
], V = (R) => {
|
|
1082
1082
|
if (R === "anytime") {
|
|
1083
|
-
|
|
1083
|
+
T.setFieldValue(`${C}.values`, []), T.setFieldValue(`${C}.range`, "anytime");
|
|
1084
1084
|
return;
|
|
1085
1085
|
}
|
|
1086
1086
|
if (R === "custom") {
|
|
1087
|
-
|
|
1087
|
+
T.setFieldValue(`${C}.range`, "custom");
|
|
1088
1088
|
return;
|
|
1089
1089
|
}
|
|
1090
1090
|
const [Y, W] = On(R);
|
|
1091
|
-
|
|
1091
|
+
T.setFieldValue(`${C}.values`, Y && W ? [Y, W] : []), T.setFieldValue(`${C}.range`, R);
|
|
1092
1092
|
};
|
|
1093
1093
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
1094
1094
|
/* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
|
|
@@ -1096,20 +1096,20 @@ const $n = {
|
|
|
1096
1096
|
/* @__PURE__ */ e(
|
|
1097
1097
|
"select",
|
|
1098
1098
|
{
|
|
1099
|
-
value:
|
|
1100
|
-
onChange: (R) =>
|
|
1099
|
+
value: v.operator,
|
|
1100
|
+
onChange: (R) => T.setFieldValue(`${C}.operator`, R.target.value),
|
|
1101
1101
|
className: "filter-select",
|
|
1102
|
-
children:
|
|
1102
|
+
children: g.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Is" : "Is not" }, R))
|
|
1103
1103
|
}
|
|
1104
1104
|
),
|
|
1105
|
-
|
|
1105
|
+
L && /* @__PURE__ */ e(
|
|
1106
1106
|
"button",
|
|
1107
1107
|
{
|
|
1108
1108
|
type: "button",
|
|
1109
1109
|
onClick: () => {
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
m[
|
|
1110
|
+
T.setFieldValue(
|
|
1111
|
+
C,
|
|
1112
|
+
m[C]
|
|
1113
1113
|
);
|
|
1114
1114
|
},
|
|
1115
1115
|
className: "filter-clear-selection-button",
|
|
@@ -1118,7 +1118,7 @@ const $n = {
|
|
|
1118
1118
|
)
|
|
1119
1119
|
] }),
|
|
1120
1120
|
/* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: P.map((R) => {
|
|
1121
|
-
const Y =
|
|
1121
|
+
const Y = v.range === R.key || R.key === "anytime" && (!Array.isArray(v.values) || v.values.length === 0);
|
|
1122
1122
|
return /* @__PURE__ */ n(
|
|
1123
1123
|
"label",
|
|
1124
1124
|
{
|
|
@@ -1128,9 +1128,9 @@ const $n = {
|
|
|
1128
1128
|
"input",
|
|
1129
1129
|
{
|
|
1130
1130
|
type: "radio",
|
|
1131
|
-
name: `preset-${
|
|
1131
|
+
name: `preset-${C}`,
|
|
1132
1132
|
checked: Y,
|
|
1133
|
-
onChange: () =>
|
|
1133
|
+
onChange: () => V(R.key),
|
|
1134
1134
|
className: "h-4 w-4"
|
|
1135
1135
|
}
|
|
1136
1136
|
),
|
|
@@ -1152,8 +1152,8 @@ const $n = {
|
|
|
1152
1152
|
useRange: !1,
|
|
1153
1153
|
value: O,
|
|
1154
1154
|
onChange: (R) => {
|
|
1155
|
-
const Y = R?.startDate ? Be(new Date(R.startDate)) : null, W =
|
|
1156
|
-
Y && (
|
|
1155
|
+
const Y = R?.startDate ? Be(new Date(R.startDate)) : null, W = x[1] || null;
|
|
1156
|
+
Y && (T.setFieldValue(`${C}.values`, [Y, W]), T.setFieldValue(`${C}.range`, "custom"));
|
|
1157
1157
|
},
|
|
1158
1158
|
inputClassName: "w-full rounded-xl border border-[#767676] px-4 py-2 text-sm font-normal text-[#101112] focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500",
|
|
1159
1159
|
primaryColor: "violet",
|
|
@@ -1176,8 +1176,8 @@ const $n = {
|
|
|
1176
1176
|
useRange: !1,
|
|
1177
1177
|
value: D,
|
|
1178
1178
|
onChange: (R) => {
|
|
1179
|
-
const Y = R?.startDate ? je(new Date(R.startDate)) : null, W =
|
|
1180
|
-
Y && (
|
|
1179
|
+
const Y = R?.startDate ? je(new Date(R.startDate)) : null, W = x[0] || null;
|
|
1180
|
+
Y && (T.setFieldValue(`${C}.values`, [W, Y]), T.setFieldValue(`${C}.range`, "custom"));
|
|
1181
1181
|
},
|
|
1182
1182
|
inputClassName: "w-full rounded-xl border border-[#767676] px-4 py-2 text-sm font-normal text-[#101112] focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500",
|
|
1183
1183
|
primaryColor: "violet",
|
|
@@ -1234,22 +1234,22 @@ const $n = {
|
|
|
1234
1234
|
}
|
|
1235
1235
|
)
|
|
1236
1236
|
] }),
|
|
1237
|
-
/* @__PURE__ */ n("form", { onSubmit:
|
|
1237
|
+
/* @__PURE__ */ n("form", { onSubmit: T.handleSubmit, className: "filter-form", children: [
|
|
1238
1238
|
/* @__PURE__ */ e("div", { className: "filter-content-wrapper", children: /* @__PURE__ */ n(
|
|
1239
1239
|
Vr,
|
|
1240
1240
|
{
|
|
1241
1241
|
vertical: !0,
|
|
1242
|
-
onChange:
|
|
1242
|
+
onChange: _,
|
|
1243
1243
|
style: {
|
|
1244
1244
|
display: "flex",
|
|
1245
1245
|
flexGrow: 1
|
|
1246
1246
|
},
|
|
1247
1247
|
children: [
|
|
1248
|
-
/* @__PURE__ */ e(_r, { className: "filter-tabs-list", children: l.map((
|
|
1248
|
+
/* @__PURE__ */ e(_r, { className: "filter-tabs-list", children: l.map((C) => /* @__PURE__ */ n(ne, { className: "filter-tab-item", children: [
|
|
1249
1249
|
/* @__PURE__ */ e("div", { className: "filter-selection-horizontal-indicator" }),
|
|
1250
1250
|
/* @__PURE__ */ n("div", { className: "filter-lbl-indicator-wrapper", children: [
|
|
1251
|
-
|
|
1252
|
-
A[
|
|
1251
|
+
C.label,
|
|
1252
|
+
A[C.key] && /* @__PURE__ */ e(
|
|
1253
1253
|
"span",
|
|
1254
1254
|
{
|
|
1255
1255
|
className: "filter-active-indicator",
|
|
@@ -1257,9 +1257,9 @@ const $n = {
|
|
|
1257
1257
|
}
|
|
1258
1258
|
)
|
|
1259
1259
|
] })
|
|
1260
|
-
] },
|
|
1261
|
-
/* @__PURE__ */ e(Ur, { className: "filter-tabs-panels", children: l.map((
|
|
1262
|
-
|
|
1260
|
+
] }, C.key)) }),
|
|
1261
|
+
/* @__PURE__ */ e(Ur, { className: "filter-tabs-panels", children: l.map((C) => /* @__PURE__ */ e(
|
|
1262
|
+
ne.Panel,
|
|
1263
1263
|
{
|
|
1264
1264
|
className: "filter-tab-panel",
|
|
1265
1265
|
children: /* @__PURE__ */ e(
|
|
@@ -1269,12 +1269,12 @@ const $n = {
|
|
|
1269
1269
|
animate: { opacity: 1, x: 0 },
|
|
1270
1270
|
transition: { duration: 0.3 },
|
|
1271
1271
|
className: "h-full",
|
|
1272
|
-
children: q(
|
|
1272
|
+
children: q(C.key)
|
|
1273
1273
|
},
|
|
1274
|
-
|
|
1274
|
+
C.key
|
|
1275
1275
|
)
|
|
1276
1276
|
},
|
|
1277
|
-
|
|
1277
|
+
C.key
|
|
1278
1278
|
)) })
|
|
1279
1279
|
]
|
|
1280
1280
|
}
|
|
@@ -1293,7 +1293,7 @@ const $n = {
|
|
|
1293
1293
|
"button",
|
|
1294
1294
|
{
|
|
1295
1295
|
type: "submit",
|
|
1296
|
-
disabled:
|
|
1296
|
+
disabled: !T.dirty || I,
|
|
1297
1297
|
className: "filter-button apply",
|
|
1298
1298
|
children: [
|
|
1299
1299
|
"Apply Filters",
|
|
@@ -1375,7 +1375,7 @@ const $n = {
|
|
|
1375
1375
|
size: b
|
|
1376
1376
|
// Add size prop
|
|
1377
1377
|
}) => {
|
|
1378
|
-
const f = Rt[o] || Rt.info, r = f.icon,
|
|
1378
|
+
const f = Rt[o] || Rt.info, r = f.icon, y = () => {
|
|
1379
1379
|
a({ primary: !0, secondary: !1 });
|
|
1380
1380
|
}, d = () => {
|
|
1381
1381
|
a({ primary: !1, secondary: !0 });
|
|
@@ -1424,7 +1424,7 @@ const $n = {
|
|
|
1424
1424
|
l && /* @__PURE__ */ e(
|
|
1425
1425
|
ee,
|
|
1426
1426
|
{
|
|
1427
|
-
onClick:
|
|
1427
|
+
onClick: y,
|
|
1428
1428
|
label: l,
|
|
1429
1429
|
...p
|
|
1430
1430
|
}
|
|
@@ -1442,12 +1442,12 @@ const $n = {
|
|
|
1442
1442
|
onItemsPerPageChange: l,
|
|
1443
1443
|
itemsPerPageOptions: m = [10, 15, 20]
|
|
1444
1444
|
}) => {
|
|
1445
|
-
const o = Math.ceil(a / s), [u, p] =
|
|
1445
|
+
const o = Math.ceil(a / s), [u, p] = M(t);
|
|
1446
1446
|
Z(() => {
|
|
1447
1447
|
p(t);
|
|
1448
1448
|
}, [t]);
|
|
1449
|
-
const b = Math.min((t - 1) * s + 1, a), f = Math.min(t * s, a), r = (
|
|
1450
|
-
|
|
1449
|
+
const b = Math.min((t - 1) * s + 1, a), f = Math.min(t * s, a), r = (y) => {
|
|
1450
|
+
y.preventDefault();
|
|
1451
1451
|
let d = parseInt(u, 10);
|
|
1452
1452
|
isNaN(d) || d < 1 ? d = 1 : d > o && (d = o), p(d), d !== t && i(d);
|
|
1453
1453
|
};
|
|
@@ -1460,8 +1460,8 @@ const $n = {
|
|
|
1460
1460
|
id: "items-per-page",
|
|
1461
1461
|
className: "pagination-select",
|
|
1462
1462
|
value: s,
|
|
1463
|
-
onChange: (
|
|
1464
|
-
children: m.map((
|
|
1463
|
+
onChange: (y) => l(Number(y.target.value)),
|
|
1464
|
+
children: m.map((y) => /* @__PURE__ */ e("option", { value: y, children: y }, y))
|
|
1465
1465
|
}
|
|
1466
1466
|
),
|
|
1467
1467
|
/* @__PURE__ */ n("span", { className: "pagination-info", children: [
|
|
@@ -1500,7 +1500,7 @@ const $n = {
|
|
|
1500
1500
|
type: "number",
|
|
1501
1501
|
className: "page-input",
|
|
1502
1502
|
value: u,
|
|
1503
|
-
onChange: (
|
|
1503
|
+
onChange: (y) => p(y.target.value),
|
|
1504
1504
|
onBlur: r,
|
|
1505
1505
|
"aria-label": `Current page, Page ${t}`
|
|
1506
1506
|
}
|
|
@@ -1586,7 +1586,7 @@ const $n = {
|
|
|
1586
1586
|
customClass: m = "",
|
|
1587
1587
|
...o
|
|
1588
1588
|
}) => {
|
|
1589
|
-
const [u, p] =
|
|
1589
|
+
const [u, p] = M(t);
|
|
1590
1590
|
Z(() => {
|
|
1591
1591
|
p(t);
|
|
1592
1592
|
}, [t]);
|
|
@@ -1633,9 +1633,9 @@ const $n = {
|
|
|
1633
1633
|
// From RHF's <Controller>
|
|
1634
1634
|
showSearch: p = !0
|
|
1635
1635
|
}) => {
|
|
1636
|
-
const [b, f] =
|
|
1636
|
+
const [b, f] = M(""), r = b === "" ? i : i.filter(
|
|
1637
1637
|
(d) => d.label.toLowerCase().includes(b.toLowerCase())
|
|
1638
|
-
),
|
|
1638
|
+
), y = i.find((d) => a?.id ? d.id === a.id : d.id === a || d.value === a);
|
|
1639
1639
|
return /* @__PURE__ */ e(K, { value: a, onChange: s, disabled: m, children: /* @__PURE__ */ n("div", { className: "select-wrapper", ref: u, children: [
|
|
1640
1640
|
t && /* @__PURE__ */ e("label", { className: "select-label", children: t }),
|
|
1641
1641
|
/* @__PURE__ */ n("div", { className: "select-button-container", children: [
|
|
@@ -1646,7 +1646,7 @@ const $n = {
|
|
|
1646
1646
|
"select-button--error": !!o
|
|
1647
1647
|
}),
|
|
1648
1648
|
children: [
|
|
1649
|
-
/* @__PURE__ */ e("span", { className: "select-value-display", children:
|
|
1649
|
+
/* @__PURE__ */ e("span", { className: "select-value-display", children: y ? y.label : /* @__PURE__ */ e("span", { className: "placeholder", children: l }) }),
|
|
1650
1650
|
/* @__PURE__ */ e(Ht, { className: "select-chevron", "aria-hidden": "true" })
|
|
1651
1651
|
]
|
|
1652
1652
|
}
|
|
@@ -1700,7 +1700,7 @@ const $n = {
|
|
|
1700
1700
|
o && /* @__PURE__ */ e("p", { className: "select-error-message", children: o })
|
|
1701
1701
|
] }) });
|
|
1702
1702
|
}, Ln = () => {
|
|
1703
|
-
const [t, a] =
|
|
1703
|
+
const [t, a] = M(window.location.pathname);
|
|
1704
1704
|
return Z(() => {
|
|
1705
1705
|
const s = () => {
|
|
1706
1706
|
a(window.location.pathname);
|
|
@@ -1715,7 +1715,7 @@ const $n = {
|
|
|
1715
1715
|
return s;
|
|
1716
1716
|
return null;
|
|
1717
1717
|
}, fa = ({ item: t, isCollapsed: a, level: s = 0 }) => {
|
|
1718
|
-
const { pathname: i } = Ln(), l = t.href || t.url || t.path, [m, o] =
|
|
1718
|
+
const { pathname: i } = Ln(), l = t.href || t.url || t.path, [m, o] = M(!1), u = t.icon;
|
|
1719
1719
|
Z(() => {
|
|
1720
1720
|
xt([t], i) && o(!0);
|
|
1721
1721
|
}, [t, i]);
|
|
@@ -1905,16 +1905,16 @@ const $n = {
|
|
|
1905
1905
|
// ✅ New prop to control visibility
|
|
1906
1906
|
...u
|
|
1907
1907
|
}) => {
|
|
1908
|
-
const p = a || u.name, [b, f] =
|
|
1908
|
+
const p = a || u.name, [b, f] = M(
|
|
1909
1909
|
u.value?.length || u.defaultValue?.length || 0
|
|
1910
1910
|
), r = (d) => {
|
|
1911
1911
|
f(d.target.value.length), u.onChange && u.onChange(d);
|
|
1912
|
-
},
|
|
1912
|
+
}, y = m - b;
|
|
1913
1913
|
return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${i || ""}`, children: [
|
|
1914
1914
|
/* @__PURE__ */ n("div", { className: "textarea-header", children: [
|
|
1915
1915
|
t && /* @__PURE__ */ e("label", { htmlFor: p, className: "textarea-label", children: t }),
|
|
1916
1916
|
o && m && /* @__PURE__ */ n("span", { className: "char-counter", children: [
|
|
1917
|
-
|
|
1917
|
+
y,
|
|
1918
1918
|
" characters remaining"
|
|
1919
1919
|
] })
|
|
1920
1920
|
] }),
|
|
@@ -1972,9 +1972,9 @@ const $n = {
|
|
|
1972
1972
|
// For external styling of the tooltip itself
|
|
1973
1973
|
...o
|
|
1974
1974
|
}) => {
|
|
1975
|
-
const u =
|
|
1975
|
+
const u = se.useId();
|
|
1976
1976
|
return /* @__PURE__ */ n(te, { children: [
|
|
1977
|
-
|
|
1977
|
+
se.cloneElement(t, { "data-tooltip-id": u }),
|
|
1978
1978
|
/* @__PURE__ */ e(
|
|
1979
1979
|
Ka,
|
|
1980
1980
|
{
|
|
@@ -2012,7 +2012,7 @@ const $n = {
|
|
|
2012
2012
|
showProgress: p = !0,
|
|
2013
2013
|
closeOnOverlayClick: b = !0
|
|
2014
2014
|
}) => {
|
|
2015
|
-
const f = s[i], r = Object.keys(s),
|
|
2015
|
+
const f = s[i], r = Object.keys(s), y = r.indexOf(i), d = (y + 1) / r.length * 100, h = y > 0 && m.onBack;
|
|
2016
2016
|
return /* @__PURE__ */ e(he, { show: t, as: Q, children: /* @__PURE__ */ n(
|
|
2017
2017
|
ye,
|
|
2018
2018
|
{
|
|
@@ -2134,7 +2134,7 @@ const $n = {
|
|
|
2134
2134
|
children: f,
|
|
2135
2135
|
// ✅ Add children to the props list
|
|
2136
2136
|
onClick: r,
|
|
2137
|
-
...
|
|
2137
|
+
...y
|
|
2138
2138
|
}) => {
|
|
2139
2139
|
const d = u, h = H(
|
|
2140
2140
|
"btn-base",
|
|
@@ -2153,7 +2153,7 @@ const $n = {
|
|
|
2153
2153
|
onClick: r,
|
|
2154
2154
|
title: i,
|
|
2155
2155
|
"aria-label": i,
|
|
2156
|
-
...
|
|
2156
|
+
...y,
|
|
2157
2157
|
children: o && /* @__PURE__ */ e(o, { size: p === "large" ? 20 : 16 })
|
|
2158
2158
|
}
|
|
2159
2159
|
);
|
|
@@ -2478,31 +2478,31 @@ function Hn({
|
|
|
2478
2478
|
);
|
|
2479
2479
|
function i({ open: b = !1, customHeader: f = {} } = {}) {
|
|
2480
2480
|
if (b) {
|
|
2481
|
-
const { Authorization: r, ...
|
|
2481
|
+
const { Authorization: r, ...y } = It();
|
|
2482
2482
|
return {
|
|
2483
|
-
headers: { ...
|
|
2483
|
+
headers: { ...y, ...a, ...f }
|
|
2484
2484
|
};
|
|
2485
2485
|
}
|
|
2486
2486
|
return { headers: { ...It(), ...f } };
|
|
2487
2487
|
}
|
|
2488
|
-
async function l(b, f, r = !1,
|
|
2488
|
+
async function l(b, f, r = !1, y = {}) {
|
|
2489
2489
|
return s.get(b, {
|
|
2490
2490
|
params: f,
|
|
2491
|
-
...i({ open: r, customHeader:
|
|
2491
|
+
...i({ open: r, customHeader: y })
|
|
2492
2492
|
});
|
|
2493
2493
|
}
|
|
2494
|
-
async function m(b, f, r = !1,
|
|
2495
|
-
const d = { ...i({ open: r, customHeader:
|
|
2494
|
+
async function m(b, f, r = !1, y = {}) {
|
|
2495
|
+
const d = { ...i({ open: r, customHeader: y }) };
|
|
2496
2496
|
return f !== void 0 && (d.data = f), s.delete(b, d);
|
|
2497
2497
|
}
|
|
2498
|
-
async function o(b, f = {}, r = !1,
|
|
2499
|
-
return s.post(b, f, i({ open: r, customHeader:
|
|
2498
|
+
async function o(b, f = {}, r = !1, y = {}) {
|
|
2499
|
+
return s.post(b, f, i({ open: r, customHeader: y }));
|
|
2500
2500
|
}
|
|
2501
|
-
async function u(b, f = {}, r = !1,
|
|
2502
|
-
return s.put(b, f, i({ open: r, customHeader:
|
|
2501
|
+
async function u(b, f = {}, r = !1, y = {}) {
|
|
2502
|
+
return s.put(b, f, i({ open: r, customHeader: y }));
|
|
2503
2503
|
}
|
|
2504
|
-
async function p(b, f = {}, r = !1,
|
|
2505
|
-
return s.patch(b, f, i({ open: r, customHeader:
|
|
2504
|
+
async function p(b, f = {}, r = !1, y = {}) {
|
|
2505
|
+
return s.patch(b, f, i({ open: r, customHeader: y }));
|
|
2506
2506
|
}
|
|
2507
2507
|
return {
|
|
2508
2508
|
instance: s,
|
|
@@ -2600,7 +2600,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2600
2600
|
return es(i);
|
|
2601
2601
|
}
|
|
2602
2602
|
}, Ct = (t, a) => {
|
|
2603
|
-
const [s, i] =
|
|
2603
|
+
const [s, i] = M(t);
|
|
2604
2604
|
return Z(
|
|
2605
2605
|
() => {
|
|
2606
2606
|
const l = sn(() => {
|
|
@@ -2672,35 +2672,35 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2672
2672
|
},
|
|
2673
2673
|
isChanged: u = !1
|
|
2674
2674
|
}) => {
|
|
2675
|
-
const [p, b] =
|
|
2676
|
-
control:
|
|
2675
|
+
const [p, b] = M(Pt[0]), [f, r] = M(""), y = Ct(f, 400), [d, h] = M([]), [$, T] = M(/* @__PURE__ */ new Set()), [A, E] = M(!1), [I, j] = M(Lt[0]), {
|
|
2676
|
+
control: _,
|
|
2677
2677
|
handleSubmit: G,
|
|
2678
2678
|
watch: q,
|
|
2679
|
-
formState: { errors:
|
|
2679
|
+
formState: { errors: C, isSubmitting: g }
|
|
2680
2680
|
} = lr({
|
|
2681
2681
|
defaultValues: { pendingInvites: [] },
|
|
2682
2682
|
resolver: cr(as)
|
|
2683
|
-
}), { fields:
|
|
2684
|
-
control:
|
|
2683
|
+
}), { fields: v, append: w, remove: z, update: N } = ir({
|
|
2684
|
+
control: _,
|
|
2685
2685
|
name: "pendingInvites"
|
|
2686
|
-
}),
|
|
2686
|
+
}), x = q("pendingInvites");
|
|
2687
2687
|
Z(() => {
|
|
2688
|
-
|
|
2688
|
+
y.length > 1 ? (E(!0), Kn(p.name, y).then((D) => {
|
|
2689
2689
|
h(D);
|
|
2690
|
-
}).catch((D) => console.error("Search failed:", D)).finally(() => E(!1))) : (h([]),
|
|
2691
|
-
}, [
|
|
2690
|
+
}).catch((D) => console.error("Search failed:", D)).finally(() => E(!1))) : (h([]), T(/* @__PURE__ */ new Set()));
|
|
2691
|
+
}, [y, p]);
|
|
2692
2692
|
const k = (D) => {
|
|
2693
|
-
|
|
2694
|
-
const
|
|
2695
|
-
return
|
|
2693
|
+
T((P) => {
|
|
2694
|
+
const V = new Set(P);
|
|
2695
|
+
return V.has(D) ? V.delete(D) : V.add(D), V;
|
|
2696
2696
|
});
|
|
2697
2697
|
}, F = () => {
|
|
2698
|
-
d.filter((D) =>
|
|
2699
|
-
|
|
2700
|
-
}),
|
|
2701
|
-
},
|
|
2702
|
-
j(D),
|
|
2703
|
-
(P,
|
|
2698
|
+
d.filter((D) => $.has(D.id)).forEach((D) => {
|
|
2699
|
+
v.find((P) => P.id === D.id) || w({ ...D, permission: I.name });
|
|
2700
|
+
}), T(/* @__PURE__ */ new Set()), r("");
|
|
2701
|
+
}, L = (D) => {
|
|
2702
|
+
j(D), v.forEach(
|
|
2703
|
+
(P, V) => N(V, { ...v[V], permission: D.name })
|
|
2704
2704
|
);
|
|
2705
2705
|
}, U = async (D) => {
|
|
2706
2706
|
try {
|
|
@@ -2717,13 +2717,13 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2717
2717
|
// Always send updated existing shares
|
|
2718
2718
|
}, i);
|
|
2719
2719
|
} else if (l === de.INTEREST) {
|
|
2720
|
-
const P = D.pendingInvites.map((
|
|
2721
|
-
identity:
|
|
2722
|
-
type:
|
|
2720
|
+
const P = D.pendingInvites.map((V) => ({
|
|
2721
|
+
identity: V.id,
|
|
2722
|
+
type: V.type.toLowerCase(),
|
|
2723
2723
|
opt: !0,
|
|
2724
2724
|
lock: !1,
|
|
2725
2725
|
moderator: !1,
|
|
2726
|
-
userName:
|
|
2726
|
+
userName: V.name,
|
|
2727
2727
|
interestId: t?.data?.id
|
|
2728
2728
|
}));
|
|
2729
2729
|
o(P, i);
|
|
@@ -2747,7 +2747,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2747
2747
|
throw console.error("Failed to submit invites:", P), P;
|
|
2748
2748
|
}
|
|
2749
2749
|
}, S = (D) => {
|
|
2750
|
-
const P = i[p.code].find((
|
|
2750
|
+
const P = i[p.code].find((V) => V.name === D.name && V.permission !== "remove") || x.find((V) => V.name === D.name);
|
|
2751
2751
|
return P ? `${P.permission}` : "";
|
|
2752
2752
|
}, O = () => {
|
|
2753
2753
|
switch (l) {
|
|
@@ -2761,7 +2761,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2761
2761
|
return "Add User, Groups or Roles test";
|
|
2762
2762
|
}
|
|
2763
2763
|
};
|
|
2764
|
-
return ue(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:",
|
|
2764
|
+
return ue(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:", x.length), x.length === 0 && !u), [x.length, u]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
|
|
2765
2765
|
/* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
|
|
2766
2766
|
/* @__PURE__ */ e(ye.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: O() }),
|
|
2767
2767
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
|
|
@@ -2863,7 +2863,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2863
2863
|
"input",
|
|
2864
2864
|
{
|
|
2865
2865
|
type: "checkbox",
|
|
2866
|
-
checked:
|
|
2866
|
+
checked: $.has(D.id),
|
|
2867
2867
|
readOnly: !0,
|
|
2868
2868
|
className: "h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500",
|
|
2869
2869
|
disabled: !!P
|
|
@@ -2900,7 +2900,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2900
2900
|
"button",
|
|
2901
2901
|
{
|
|
2902
2902
|
onClick: F,
|
|
2903
|
-
disabled:
|
|
2903
|
+
disabled: $.size === 0,
|
|
2904
2904
|
className: "px-3 py-1 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:bg-blue-300 disabled:cursor-not-allowed hover:cursor-pointer",
|
|
2905
2905
|
children: "Add"
|
|
2906
2906
|
}
|
|
@@ -2910,7 +2910,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2910
2910
|
}
|
|
2911
2911
|
) })
|
|
2912
2912
|
] }),
|
|
2913
|
-
/* @__PURE__ */ e(Ce, { children:
|
|
2913
|
+
/* @__PURE__ */ e(Ce, { children: v.length > 0 && /* @__PURE__ */ n(
|
|
2914
2914
|
le.div,
|
|
2915
2915
|
{
|
|
2916
2916
|
initial: { opacity: 0, y: 20 },
|
|
@@ -2920,14 +2920,14 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2920
2920
|
/* @__PURE__ */ n("div", { className: "flex justify-between items-center", children: [
|
|
2921
2921
|
/* @__PURE__ */ n("div", { className: "font-semibold text-gray-800", children: [
|
|
2922
2922
|
"Pending Invites (",
|
|
2923
|
-
|
|
2923
|
+
v.length,
|
|
2924
2924
|
")"
|
|
2925
2925
|
] }),
|
|
2926
2926
|
l === de.DRIVE && /* @__PURE__ */ e(
|
|
2927
2927
|
K,
|
|
2928
2928
|
{
|
|
2929
2929
|
value: I,
|
|
2930
|
-
onChange:
|
|
2930
|
+
onChange: L,
|
|
2931
2931
|
children: /* @__PURE__ */ n("div", { className: "relative", children: [
|
|
2932
2932
|
/* @__PURE__ */ n(K.Button, { className: "relative w-full border border-gray-300 bg-white rounded-md shadow-sm pl-3 pr-10 py-2 text-left hover:cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm", children: [
|
|
2933
2933
|
/* @__PURE__ */ n("span", { className: "flex items-center", children: [
|
|
@@ -2951,7 +2951,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2951
2951
|
{
|
|
2952
2952
|
value: D,
|
|
2953
2953
|
className: ({ active: P }) => `${P ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
|
|
2954
|
-
children: ({ selected: P, active:
|
|
2954
|
+
children: ({ selected: P, active: V }) => /* @__PURE__ */ n(te, { children: [
|
|
2955
2955
|
/* @__PURE__ */ n(
|
|
2956
2956
|
"span",
|
|
2957
2957
|
{
|
|
@@ -2960,7 +2960,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2960
2960
|
/* @__PURE__ */ e(
|
|
2961
2961
|
D.icon,
|
|
2962
2962
|
{
|
|
2963
|
-
className: `h-5 w-5 mr-2 ${
|
|
2963
|
+
className: `h-5 w-5 mr-2 ${V ? "text-white" : "text-gray-400"}`
|
|
2964
2964
|
}
|
|
2965
2965
|
),
|
|
2966
2966
|
"Can ",
|
|
@@ -2985,7 +2985,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2985
2985
|
}
|
|
2986
2986
|
)
|
|
2987
2987
|
] }),
|
|
2988
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(Ce, { children:
|
|
2988
|
+
/* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(Ce, { children: v.map((D, P) => /* @__PURE__ */ n(
|
|
2989
2989
|
le.div,
|
|
2990
2990
|
{
|
|
2991
2991
|
layout: !0,
|
|
@@ -3013,7 +3013,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3013
3013
|
/* @__PURE__ */ e(
|
|
3014
3014
|
"button",
|
|
3015
3015
|
{
|
|
3016
|
-
onClick: () =>
|
|
3016
|
+
onClick: () => z(P),
|
|
3017
3017
|
className: "text-gray-400 hover:text-red-500 hover:cursor-pointer",
|
|
3018
3018
|
children: /* @__PURE__ */ e(et, { className: "h-5 w-5" })
|
|
3019
3019
|
}
|
|
@@ -3029,9 +3029,9 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3029
3029
|
] }),
|
|
3030
3030
|
/* @__PURE__ */ e("footer", { className: "p-4 border-t border-gray-300 flex-shrink-0", children: /* @__PURE__ */ n("div", { className: "flex justify-between items-center", children: [
|
|
3031
3031
|
/* @__PURE__ */ n("p", { className: "text-sm text-gray-600", children: [
|
|
3032
|
-
|
|
3032
|
+
x.length,
|
|
3033
3033
|
" invitation",
|
|
3034
|
-
|
|
3034
|
+
x.length !== 1 ? "s" : "",
|
|
3035
3035
|
" selected"
|
|
3036
3036
|
] }),
|
|
3037
3037
|
/* @__PURE__ */ n("div", { className: "flex gap-2", children: [
|
|
@@ -3047,9 +3047,9 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3047
3047
|
"button",
|
|
3048
3048
|
{
|
|
3049
3049
|
onClick: () => G(U)(),
|
|
3050
|
-
disabled:
|
|
3050
|
+
disabled: g || x.length === 0 && !u,
|
|
3051
3051
|
className: "px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md shadow-sm hover:bg-blue-700 hover:cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:bg-blue-300 disabled:cursor-not-allowed",
|
|
3052
|
-
children:
|
|
3052
|
+
children: g ? "Inviting..." : l === de.DRIVE ? "Send Invites" : "Add"
|
|
3053
3053
|
}
|
|
3054
3054
|
)
|
|
3055
3055
|
] })
|
|
@@ -3060,7 +3060,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3060
3060
|
{ name: "Can manage", icon: ea, value: "edit" },
|
|
3061
3061
|
{ name: "Remove", icon: dr, isDestructive: !0, value: "remove" }
|
|
3062
3062
|
], ns = ({ item: t, allowedPermissions: a, onPermissionChange: s }) => {
|
|
3063
|
-
const [i, l] =
|
|
3063
|
+
const [i, l] = M(!1), { refs: m, floatingStyles: o, context: u } = la({
|
|
3064
3064
|
open: i,
|
|
3065
3065
|
onOpenChange: l,
|
|
3066
3066
|
middleware: [ia(8), oa(), ca({ padding: 8 })],
|
|
@@ -3069,11 +3069,11 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3069
3069
|
}), p = tn(u), b = an(u), { getReferenceProps: f, getFloatingProps: r } = rn([
|
|
3070
3070
|
p,
|
|
3071
3071
|
b
|
|
3072
|
-
]),
|
|
3072
|
+
]), y = dt.find((h) => h.name === t.permission || h.value === t.permission) || dt[0];
|
|
3073
3073
|
return (
|
|
3074
3074
|
// FIX: The <Listbox> component now wraps both the button and the portal.
|
|
3075
3075
|
// This provides the necessary context for both children.
|
|
3076
|
-
/* @__PURE__ */ n(K, { value:
|
|
3076
|
+
/* @__PURE__ */ n(K, { value: y, onChange: (h) => {
|
|
3077
3077
|
s(h), l(!1);
|
|
3078
3078
|
}, children: [
|
|
3079
3079
|
/* @__PURE__ */ n(
|
|
@@ -3111,24 +3111,24 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3111
3111
|
K.Option,
|
|
3112
3112
|
{
|
|
3113
3113
|
className: ({
|
|
3114
|
-
active:
|
|
3114
|
+
active: $
|
|
3115
3115
|
}) => `relative select-none py-2 pl-10 pr-4 hover:cursor-pointer
|
|
3116
|
-
${
|
|
3117
|
-
${h.isDestructive &&
|
|
3118
|
-
${h.isDestructive &&
|
|
3116
|
+
${$ ? "bg-blue-100 text-blue-900" : "text-gray-900"}
|
|
3117
|
+
${h.isDestructive && $ ? "bg-red-100 text-red-900" : ""}
|
|
3118
|
+
${h.isDestructive && !$ ? "text-red-600" : ""}`,
|
|
3119
3119
|
value: h,
|
|
3120
|
-
children: ({ selected:
|
|
3120
|
+
children: ({ selected: $ }) => /* @__PURE__ */ n(te, { children: [
|
|
3121
3121
|
/* @__PURE__ */ n(
|
|
3122
3122
|
"span",
|
|
3123
3123
|
{
|
|
3124
|
-
className: `flex items-center gap-2 truncate ${
|
|
3124
|
+
className: `flex items-center gap-2 truncate ${$ ? "font-medium" : "font-normal"}`,
|
|
3125
3125
|
children: [
|
|
3126
3126
|
/* @__PURE__ */ e(h.icon, { className: "h-5 w-5", "aria-hidden": "true" }),
|
|
3127
3127
|
h.name
|
|
3128
3128
|
]
|
|
3129
3129
|
}
|
|
3130
3130
|
),
|
|
3131
|
-
|
|
3131
|
+
$ && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(ht, { className: "h-5 w-5", "aria-hidden": "true" }) })
|
|
3132
3132
|
] })
|
|
3133
3133
|
},
|
|
3134
3134
|
h.name
|
|
@@ -3148,32 +3148,32 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3148
3148
|
existingShares: l,
|
|
3149
3149
|
allowedPermissions: m
|
|
3150
3150
|
}) => {
|
|
3151
|
-
const [o, u] =
|
|
3151
|
+
const [o, u] = M(l), [p, b] = M(0), [f, r] = M(""), y = Ct(f, 300), d = {
|
|
3152
3152
|
users: o.users.filter(
|
|
3153
|
-
(E) => E.name.toLowerCase().includes(
|
|
3153
|
+
(E) => E.name.toLowerCase().includes(y.toLowerCase())
|
|
3154
3154
|
),
|
|
3155
3155
|
groups: o.groups.filter(
|
|
3156
|
-
(E) => E.name.toLowerCase().includes(
|
|
3156
|
+
(E) => E.name.toLowerCase().includes(y.toLowerCase())
|
|
3157
3157
|
),
|
|
3158
3158
|
roles: o.roles.filter(
|
|
3159
|
-
(E) => E.name.toLowerCase().includes(
|
|
3159
|
+
(E) => E.name.toLowerCase().includes(y.toLowerCase())
|
|
3160
3160
|
)
|
|
3161
|
-
}, h = async (E, I, j,
|
|
3161
|
+
}, h = async (E, I, j, _) => {
|
|
3162
3162
|
const G = I.value;
|
|
3163
3163
|
u((q) => ({
|
|
3164
3164
|
...q,
|
|
3165
3165
|
[j]: q[j].map(
|
|
3166
|
-
(
|
|
3166
|
+
(C) => C.id === E.id ? { ...C, permission: G } : C
|
|
3167
3167
|
)
|
|
3168
3168
|
}));
|
|
3169
|
-
},
|
|
3169
|
+
}, $ = () => {
|
|
3170
3170
|
const E = {
|
|
3171
3171
|
users: o.users.filter((I) => I.permission !== "remove"),
|
|
3172
3172
|
groups: o.groups.filter((I) => I.permission !== "remove"),
|
|
3173
3173
|
roles: o.roles.filter((I) => I.permission !== "remove")
|
|
3174
3174
|
};
|
|
3175
3175
|
a(E);
|
|
3176
|
-
},
|
|
3176
|
+
}, T = ["users", "groups", "roles"], A = ["Users", "Groups", "Roles"];
|
|
3177
3177
|
return (
|
|
3178
3178
|
// The main structure remains the same...
|
|
3179
3179
|
/* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-gray-50", children: [
|
|
@@ -3200,10 +3200,10 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3200
3200
|
)
|
|
3201
3201
|
] }),
|
|
3202
3202
|
/* @__PURE__ */ n("div", { className: "flex flex-col flex-grow", children: [
|
|
3203
|
-
/* @__PURE__ */ n(
|
|
3203
|
+
/* @__PURE__ */ n(ne.Group, { selectedIndex: p, onChange: b, children: [
|
|
3204
3204
|
/* @__PURE__ */ n("div", { className: "p-4 bg-white border-b border-gray-300", children: [
|
|
3205
|
-
/* @__PURE__ */ e(
|
|
3206
|
-
|
|
3205
|
+
/* @__PURE__ */ e(ne.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: A.map((E) => /* @__PURE__ */ e(
|
|
3206
|
+
ne,
|
|
3207
3207
|
{
|
|
3208
3208
|
className: ({
|
|
3209
3209
|
selected: I
|
|
@@ -3230,8 +3230,8 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3230
3230
|
animate: { y: 0, opacity: 1 },
|
|
3231
3231
|
exit: { y: -10, opacity: 0 },
|
|
3232
3232
|
transition: { duration: 0.2 },
|
|
3233
|
-
children: /* @__PURE__ */ e(
|
|
3234
|
-
|
|
3233
|
+
children: /* @__PURE__ */ e(ne.Panels, { as: Q, children: T.map((E) => /* @__PURE__ */ e(
|
|
3234
|
+
ne.Panel,
|
|
3235
3235
|
{
|
|
3236
3236
|
className: "space-y-3 focus:outline-none",
|
|
3237
3237
|
children: /* @__PURE__ */ e(Ce, { children: d[E].length > 0 ? d[E].map((I) => /* @__PURE__ */ n(
|
|
@@ -3317,7 +3317,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3317
3317
|
/* @__PURE__ */ e("div", { className: "p-4 bg-white border-t border-gray-300 flex justify-end", children: /* @__PURE__ */ e(
|
|
3318
3318
|
"button",
|
|
3319
3319
|
{
|
|
3320
|
-
onClick:
|
|
3320
|
+
onClick: $,
|
|
3321
3321
|
className: "px-4 py-2 bg-blue-600 text-white rounded-md shadow hover:bg-blue-700",
|
|
3322
3322
|
children: "Update"
|
|
3323
3323
|
}
|
|
@@ -3338,7 +3338,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3338
3338
|
onClose: s,
|
|
3339
3339
|
members: i
|
|
3340
3340
|
}) => {
|
|
3341
|
-
const [l, m] =
|
|
3341
|
+
const [l, m] = M(!0), [o, u] = M(""), p = Ct(o, 300), b = i.filter(
|
|
3342
3342
|
(d) => d.name.toLowerCase().includes(p.toLowerCase())
|
|
3343
3343
|
), f = {
|
|
3344
3344
|
hidden: { opacity: 0 },
|
|
@@ -3352,7 +3352,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3352
3352
|
hidden: { y: 20, opacity: 0 },
|
|
3353
3353
|
visible: { y: 0, opacity: 1 },
|
|
3354
3354
|
exit: { opacity: 0, x: -20 }
|
|
3355
|
-
},
|
|
3355
|
+
}, y = () => l ? (
|
|
3356
3356
|
// Show 5 skeleton items while loading
|
|
3357
3357
|
/* @__PURE__ */ e("div", { children: Array.from({ length: 5 }).map((d, h) => /* @__PURE__ */ e(ls, {}, h)) })
|
|
3358
3358
|
) : b.length === 0 ? /* @__PURE__ */ n(
|
|
@@ -3436,7 +3436,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3436
3436
|
placeholder: "Search members..."
|
|
3437
3437
|
}
|
|
3438
3438
|
) }),
|
|
3439
|
-
/* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto", children:
|
|
3439
|
+
/* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto", children: y() })
|
|
3440
3440
|
] });
|
|
3441
3441
|
}, fe = {
|
|
3442
3442
|
INVITE: "invite",
|
|
@@ -3459,28 +3459,28 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3459
3459
|
allowedPermissions: u = [],
|
|
3460
3460
|
...p
|
|
3461
3461
|
}) => {
|
|
3462
|
-
const [b, f] =
|
|
3462
|
+
const [b, f] = M(fe.INVITE), [r, y] = M(t), [d, h] = M(null), [$, T] = M(!1), [A, E] = M([]), [I, j] = M(fe.MANAGE), _ = () => {
|
|
3463
3463
|
f(fe.INVITE), h(null), m();
|
|
3464
3464
|
}, G = () => {
|
|
3465
3465
|
f(fe.MANAGE);
|
|
3466
|
-
}, q = async ({ id:
|
|
3467
|
-
if (
|
|
3466
|
+
}, q = async ({ id: v, name: w, type: z }) => {
|
|
3467
|
+
if (z === "groups") {
|
|
3468
3468
|
try {
|
|
3469
|
-
const N = await Ve(`${Xe.getMembersForGroup(
|
|
3469
|
+
const N = await Ve(`${Xe.getMembersForGroup(w)}`);
|
|
3470
3470
|
} catch (N) {
|
|
3471
3471
|
console.log("Error searching entities:", N);
|
|
3472
3472
|
}
|
|
3473
3473
|
E(resp);
|
|
3474
3474
|
}
|
|
3475
|
-
h({ id:
|
|
3476
|
-
},
|
|
3477
|
-
console.log("changedExistingShares",
|
|
3478
|
-
const
|
|
3479
|
-
console.log("Existing data:",
|
|
3480
|
-
const N = !ct.isEqual(
|
|
3481
|
-
console.log("hasPermissionChanged:", N),
|
|
3475
|
+
h({ id: v, type: z, name: w }), j(b), f(fe.MEMBERS);
|
|
3476
|
+
}, C = (v) => {
|
|
3477
|
+
console.log("changedExistingShares", v), y(v);
|
|
3478
|
+
const w = ct.mapValues(t, (x) => x.map((k) => ({ id: k.id, permission: k.permission })).sort((k, F) => k.id - F.id)), z = ct.mapValues(v, (x) => x.map((k) => ({ id: k.id, permission: k.permission })).sort((k, F) => k.id - F.id));
|
|
3479
|
+
console.log("Existing data:", w), console.log("Changed data:", z);
|
|
3480
|
+
const N = !ct.isEqual(w, z);
|
|
3481
|
+
console.log("hasPermissionChanged:", N), T(N), f(b === fe.MEMBERS ? I : fe.INVITE);
|
|
3482
3482
|
};
|
|
3483
|
-
return /* @__PURE__ */ e(he, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose:
|
|
3483
|
+
return /* @__PURE__ */ e(he, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose: _, children: [
|
|
3484
3484
|
/* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
|
|
3485
3485
|
/* @__PURE__ */ e("div", { className: "filter-modal-container", children: /* @__PURE__ */ e("div", { className: "filter-modal-positioner", children: /* @__PURE__ */ e(Ee, { className: "filter-modal-panel", style: { background: "white" }, children: (() => {
|
|
3486
3486
|
switch (b) {
|
|
@@ -3497,8 +3497,8 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3497
3497
|
ss,
|
|
3498
3498
|
{
|
|
3499
3499
|
entity: i,
|
|
3500
|
-
onBack:
|
|
3501
|
-
onClose:
|
|
3500
|
+
onBack: C,
|
|
3501
|
+
onClose: _,
|
|
3502
3502
|
onOpenMembers: q,
|
|
3503
3503
|
existingShares: r,
|
|
3504
3504
|
calledBy: l,
|
|
@@ -3521,8 +3521,8 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3521
3521
|
is,
|
|
3522
3522
|
{
|
|
3523
3523
|
entity: d,
|
|
3524
|
-
onBack:
|
|
3525
|
-
onClose:
|
|
3524
|
+
onBack: C,
|
|
3525
|
+
onClose: _,
|
|
3526
3526
|
calledBy: l,
|
|
3527
3527
|
existingShares: r,
|
|
3528
3528
|
members: A
|
|
@@ -3545,14 +3545,14 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3545
3545
|
{
|
|
3546
3546
|
entity: i,
|
|
3547
3547
|
onManage: G,
|
|
3548
|
-
onClose:
|
|
3548
|
+
onClose: _,
|
|
3549
3549
|
existingShares: r,
|
|
3550
3550
|
calledBy: l,
|
|
3551
3551
|
showExistingShares: o,
|
|
3552
|
-
onFinalSubmit: (
|
|
3553
|
-
s(
|
|
3552
|
+
onFinalSubmit: (v) => {
|
|
3553
|
+
s(v, r);
|
|
3554
3554
|
},
|
|
3555
|
-
isChanged:
|
|
3555
|
+
isChanged: $
|
|
3556
3556
|
}
|
|
3557
3557
|
)
|
|
3558
3558
|
},
|
|
@@ -3583,51 +3583,51 @@ function nt({
|
|
|
3583
3583
|
onSearch: f,
|
|
3584
3584
|
// (query: string) => void (required if searchMode==="server")
|
|
3585
3585
|
serverLoading: r = !1,
|
|
3586
|
-
minSearchChars:
|
|
3586
|
+
minSearchChars: y = 2,
|
|
3587
3587
|
// NEW: mappers (id/label keys)
|
|
3588
|
-
getOptionId: d = (
|
|
3589
|
-
getOptionLabel: h = (
|
|
3588
|
+
getOptionId: d = ($) => String($.id),
|
|
3589
|
+
getOptionLabel: h = ($) => $.name
|
|
3590
3590
|
}) {
|
|
3591
|
-
const
|
|
3592
|
-
const
|
|
3593
|
-
for (const
|
|
3594
|
-
return
|
|
3595
|
-
}, [a, d]),
|
|
3591
|
+
const $ = Qe(), T = Qe(), [A, E] = M(""), I = xe(""), j = ue(() => {
|
|
3592
|
+
const v = /* @__PURE__ */ new Map();
|
|
3593
|
+
for (const w of a) v.set(d(w), w);
|
|
3594
|
+
return v;
|
|
3595
|
+
}, [a, d]), _ = ue(() => Array.isArray(s) ? s.map((v) => v && typeof v == "object" ? j.get(d(v)) || null : j.get(String(v))).filter(Boolean) : [], [s, j, d]), G = ue(() => {
|
|
3596
3596
|
if (!A) return a;
|
|
3597
|
-
const
|
|
3598
|
-
return a.filter((
|
|
3597
|
+
const v = A.toLowerCase();
|
|
3598
|
+
return a.filter((w) => h(w).toLowerCase().includes(v));
|
|
3599
3599
|
}, [a, A, h]);
|
|
3600
3600
|
Z(() => {
|
|
3601
|
-
b === "server" && A.length >=
|
|
3602
|
-
}, [A, b,
|
|
3603
|
-
const q = b === "client" ? G : a,
|
|
3604
|
-
if (!
|
|
3601
|
+
b === "server" && A.length >= y && A !== I.current && (I.current = A, f && f(A));
|
|
3602
|
+
}, [A, b, y, f]);
|
|
3603
|
+
const q = b === "client" ? G : a, C = () => {
|
|
3604
|
+
if (!_.length)
|
|
3605
3605
|
return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
|
|
3606
|
-
const
|
|
3606
|
+
const v = _.slice(0, u), w = _.length - u;
|
|
3607
3607
|
return /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2", children: [
|
|
3608
|
-
|
|
3608
|
+
v.map((z) => /* @__PURE__ */ e(
|
|
3609
3609
|
"span",
|
|
3610
3610
|
{
|
|
3611
3611
|
className: "px-2 py-1 text-xs font-medium text-white bg-gray-800 rounded-full",
|
|
3612
|
-
children: h(
|
|
3612
|
+
children: h(z)
|
|
3613
3613
|
},
|
|
3614
|
-
d(
|
|
3614
|
+
d(z)
|
|
3615
3615
|
)),
|
|
3616
|
-
|
|
3616
|
+
w > 0 && /* @__PURE__ */ n("span", { className: "px-2 py-1 text-xs font-medium text-gray-600 bg-gray-200 rounded-full", children: [
|
|
3617
3617
|
"+",
|
|
3618
|
-
|
|
3618
|
+
w,
|
|
3619
3619
|
" more"
|
|
3620
3620
|
] })
|
|
3621
3621
|
] });
|
|
3622
3622
|
};
|
|
3623
|
-
return /* @__PURE__ */ e(K, { value:
|
|
3624
|
-
const
|
|
3625
|
-
p !== -1 &&
|
|
3626
|
-
}, multiple: !0, by: "id", children: ({ open:
|
|
3623
|
+
return /* @__PURE__ */ e(K, { value: _, onChange: (v) => {
|
|
3624
|
+
const w = Array.from(new Set(v.map((z) => d(z))));
|
|
3625
|
+
p !== -1 && w.length > p || i(w);
|
|
3626
|
+
}, multiple: !0, by: "id", children: ({ open: v }) => /* @__PURE__ */ n("div", { children: [
|
|
3627
3627
|
/* @__PURE__ */ e(
|
|
3628
3628
|
K.Label,
|
|
3629
3629
|
{
|
|
3630
|
-
id:
|
|
3630
|
+
id: $,
|
|
3631
3631
|
className: "block text-sm font-medium leading-6 text-gray-900",
|
|
3632
3632
|
children: t
|
|
3633
3633
|
}
|
|
@@ -3636,16 +3636,16 @@ function nt({
|
|
|
3636
3636
|
/* @__PURE__ */ n(
|
|
3637
3637
|
K.Button,
|
|
3638
3638
|
{
|
|
3639
|
-
"aria-labelledby":
|
|
3639
|
+
"aria-labelledby": $,
|
|
3640
3640
|
"aria-invalid": !!o,
|
|
3641
|
-
"aria-describedby": o ?
|
|
3641
|
+
"aria-describedby": o ? T : void 0,
|
|
3642
3642
|
onBlur: l,
|
|
3643
3643
|
className: Ge(
|
|
3644
3644
|
"relative w-full min-h-[38px] cursor-default rounded-md bg-white py-1.5 pl-3 pr-10 text-left text-gray-900 shadow-sm ring-1 ring-inset focus:outline-none focus:ring-2 focus:ring-gray-600 sm:text-sm sm:leading-6",
|
|
3645
3645
|
o ? "ring-red-500" : "ring-gray-300"
|
|
3646
3646
|
),
|
|
3647
3647
|
children: [
|
|
3648
|
-
/* @__PURE__ */ e("span", { className: "block truncate", children:
|
|
3648
|
+
/* @__PURE__ */ e("span", { className: "block truncate", children: C() }),
|
|
3649
3649
|
/* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(Ht, { className: "w-5 h-5 text-gray-400", "aria-hidden": "true" }) })
|
|
3650
3650
|
]
|
|
3651
3651
|
}
|
|
@@ -3654,7 +3654,7 @@ function nt({
|
|
|
3654
3654
|
he,
|
|
3655
3655
|
{
|
|
3656
3656
|
as: Q,
|
|
3657
|
-
show:
|
|
3657
|
+
show: v,
|
|
3658
3658
|
leave: "transition ease-in duration-100",
|
|
3659
3659
|
leaveFrom: "opacity-100",
|
|
3660
3660
|
leaveTo: "opacity-0",
|
|
@@ -3664,22 +3664,22 @@ function nt({
|
|
|
3664
3664
|
{
|
|
3665
3665
|
value: A,
|
|
3666
3666
|
onDebouncedChange: E,
|
|
3667
|
-
placeholder: b === "server" ? `Search (min ${
|
|
3667
|
+
placeholder: b === "server" ? `Search (min ${y})…` : "Search options…"
|
|
3668
3668
|
}
|
|
3669
3669
|
) }),
|
|
3670
3670
|
b === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
|
|
3671
|
-
q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: b === "server" ? A.length <
|
|
3672
|
-
const
|
|
3671
|
+
q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: b === "server" ? A.length < y ? `Type at least ${y} characters to search.` : "No results." : "No options found." }) : q.map((w) => {
|
|
3672
|
+
const z = d(w), N = h(w), x = _.some((F) => d(F) === z), k = p !== -1 && _.length >= p && !x;
|
|
3673
3673
|
return /* @__PURE__ */ e(
|
|
3674
3674
|
K.Option,
|
|
3675
3675
|
{
|
|
3676
|
-
value:
|
|
3676
|
+
value: w,
|
|
3677
3677
|
disabled: k,
|
|
3678
3678
|
className: ({ active: F }) => Ge(
|
|
3679
3679
|
k ? " text-gray-400 bg-white cursor-not-allowed" : F ? " bg-gray-200 text-gray-900" : " text-gray-900",
|
|
3680
3680
|
" relative cursor-default select-none py-2 pl-3 pr-9"
|
|
3681
3681
|
),
|
|
3682
|
-
children: ({ selected: F, active:
|
|
3682
|
+
children: ({ selected: F, active: L }) => /* @__PURE__ */ n(te, { children: [
|
|
3683
3683
|
/* @__PURE__ */ e(
|
|
3684
3684
|
"span",
|
|
3685
3685
|
{
|
|
@@ -3694,7 +3694,7 @@ function nt({
|
|
|
3694
3694
|
"span",
|
|
3695
3695
|
{
|
|
3696
3696
|
className: Ge(
|
|
3697
|
-
|
|
3697
|
+
L ? " text-gray-900" : " text-gray-600",
|
|
3698
3698
|
" absolute inset-y-0 right-0 flex items-center pr-4"
|
|
3699
3699
|
),
|
|
3700
3700
|
children: /* @__PURE__ */ e(tt, { className: "w-5 h-5", "aria-hidden": "true" })
|
|
@@ -3702,13 +3702,13 @@ function nt({
|
|
|
3702
3702
|
)
|
|
3703
3703
|
] })
|
|
3704
3704
|
},
|
|
3705
|
-
|
|
3705
|
+
z
|
|
3706
3706
|
);
|
|
3707
3707
|
})
|
|
3708
3708
|
] })
|
|
3709
3709
|
}
|
|
3710
3710
|
),
|
|
3711
|
-
o && /* @__PURE__ */ e("p", { id:
|
|
3711
|
+
o && /* @__PURE__ */ e("p", { id: T, className: "mt-1 text-sm text-red-600", children: o })
|
|
3712
3712
|
] })
|
|
3713
3713
|
] }) });
|
|
3714
3714
|
}
|
|
@@ -3866,10 +3866,10 @@ function ds({
|
|
|
3866
3866
|
dropId: f,
|
|
3867
3867
|
indent: r = 24
|
|
3868
3868
|
}) {
|
|
3869
|
-
const { setNodeRef:
|
|
3870
|
-
const
|
|
3871
|
-
|
|
3872
|
-
},
|
|
3869
|
+
const { setNodeRef: y, isOver: d } = ur({ id: f }), { attributes: h, listeners: $, setNodeRef: T, transform: A, isDragging: E } = hr({ id: b }), I = A ? { transform: `translate3d(${Math.round(A.x)}px, ${Math.round(A.y)}px, 0)` } : void 0, [j, _] = M(!1), [G, q] = M(t.name), C = () => {
|
|
3870
|
+
const v = G.trim();
|
|
3871
|
+
_(!1), v && v !== t.name ? o?.(t, v) : q(t.name);
|
|
3872
|
+
}, g = ue(() => /* @__PURE__ */ e(
|
|
3873
3873
|
_n,
|
|
3874
3874
|
{
|
|
3875
3875
|
options: [
|
|
@@ -3877,42 +3877,42 @@ function ds({
|
|
|
3877
3877
|
{ action: "rename", label: "Rename" },
|
|
3878
3878
|
{ action: "delete", label: "Delete" }
|
|
3879
3879
|
],
|
|
3880
|
-
onSelect: (
|
|
3881
|
-
|
|
3880
|
+
onSelect: (w) => {
|
|
3881
|
+
w.action === "create" ? m?.(t) : w.action === "rename" ? _(!0) : w.action === "delete" && u?.(t);
|
|
3882
3882
|
}
|
|
3883
3883
|
}
|
|
3884
3884
|
), [t, m, u]);
|
|
3885
3885
|
return /* @__PURE__ */ n(
|
|
3886
3886
|
"div",
|
|
3887
3887
|
{
|
|
3888
|
-
ref:
|
|
3888
|
+
ref: y,
|
|
3889
3889
|
className: `tv-row ${d ? "tv-drop-over" : ""} ${E ? "dragging" : ""}`,
|
|
3890
3890
|
style: { ...I, paddingLeft: 8 + a * r },
|
|
3891
|
-
onClick: (
|
|
3892
|
-
|
|
3891
|
+
onClick: (v) => {
|
|
3892
|
+
v.target.closest(".tv-toggle") || v.target.tagName === "INPUT" || l?.(t);
|
|
3893
3893
|
},
|
|
3894
3894
|
children: [
|
|
3895
3895
|
/* @__PURE__ */ e("button", { className: "tv-toggle", onClick: i, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(wt, { size: 16 }) : /* @__PURE__ */ e(ve, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
|
|
3896
3896
|
/* @__PURE__ */ e(Me, { size: 16, className: "tv-folder-ic" }),
|
|
3897
|
-
/* @__PURE__ */ e("div", { className: "tv-name", ref:
|
|
3897
|
+
/* @__PURE__ */ e("div", { className: "tv-name", ref: T, children: j ? /* @__PURE__ */ e(
|
|
3898
3898
|
"input",
|
|
3899
3899
|
{
|
|
3900
3900
|
className: "tv-input",
|
|
3901
3901
|
value: G,
|
|
3902
|
-
onChange: (
|
|
3903
|
-
onBlur:
|
|
3904
|
-
onKeyDown: (
|
|
3905
|
-
|
|
3902
|
+
onChange: (v) => q(v.target.value),
|
|
3903
|
+
onBlur: C,
|
|
3904
|
+
onKeyDown: (v) => {
|
|
3905
|
+
v.key === "Enter" && C(), v.key === "Escape" && (_(!1), q(t.name));
|
|
3906
3906
|
},
|
|
3907
3907
|
autoFocus: !0
|
|
3908
3908
|
}
|
|
3909
|
-
) : /* @__PURE__ */ e("span", { onDoubleClick: () =>
|
|
3910
|
-
/* @__PURE__ */ e(cs, { listeners:
|
|
3909
|
+
) : /* @__PURE__ */ e("span", { onDoubleClick: () => _(!0), children: t.name }) }),
|
|
3910
|
+
/* @__PURE__ */ e(cs, { listeners: $, attributes: h }),
|
|
3911
3911
|
/* @__PURE__ */ e("div", { className: "tv-actions", children: p ? p(t, {
|
|
3912
3912
|
onCreateChild: () => m?.(t),
|
|
3913
|
-
onRename: () =>
|
|
3913
|
+
onRename: () => _(!0),
|
|
3914
3914
|
onDelete: () => u?.(t)
|
|
3915
|
-
}) :
|
|
3915
|
+
}) : g })
|
|
3916
3916
|
]
|
|
3917
3917
|
}
|
|
3918
3918
|
);
|
|
@@ -4003,43 +4003,43 @@ function Jl({
|
|
|
4003
4003
|
onRename: b,
|
|
4004
4004
|
onDelete: f,
|
|
4005
4005
|
onMove: r,
|
|
4006
|
-
renderActions:
|
|
4006
|
+
renderActions: y,
|
|
4007
4007
|
disableMoveToRoot: d = !1,
|
|
4008
4008
|
// ← allow root moves by default now
|
|
4009
4009
|
indentUnit: h = 24
|
|
4010
4010
|
}) {
|
|
4011
|
-
const { roots:
|
|
4011
|
+
const { roots: $ } = ue(() => ps(t) ? bs(t, { rootId: a, getId: i, getName: m }) : gs(
|
|
4012
4012
|
t.map((k) => ({ ...k })),
|
|
4013
4013
|
{ rootId: a, getId: i, getParent: l, getName: m }
|
|
4014
|
-
), [t, a, i, l, m]), [
|
|
4014
|
+
), [t, a, i, l, m]), [T, A] = M({}), E = ae((k) => {
|
|
4015
4015
|
const F = {};
|
|
4016
|
-
return (function
|
|
4016
|
+
return (function L(U) {
|
|
4017
4017
|
U.forEach((S) => {
|
|
4018
|
-
F[S.id] = !0, S.children?.length &&
|
|
4018
|
+
F[S.id] = !0, S.children?.length && L(S.children);
|
|
4019
4019
|
});
|
|
4020
4020
|
})(k), F;
|
|
4021
4021
|
}, []);
|
|
4022
|
-
|
|
4023
|
-
A(E(
|
|
4024
|
-
}, [
|
|
4022
|
+
se.useEffect(() => {
|
|
4023
|
+
A(E($));
|
|
4024
|
+
}, [$, E]);
|
|
4025
4025
|
const I = ae(
|
|
4026
4026
|
(k) => A((F) => ({ ...F, [k]: !F[k] })),
|
|
4027
4027
|
[]
|
|
4028
|
-
), [j,
|
|
4029
|
-
|
|
4028
|
+
), [j, _] = M(() => Le($));
|
|
4029
|
+
se.useEffect(() => _(Le($)), [$]);
|
|
4030
4030
|
const G = pr(
|
|
4031
4031
|
gr(yr, { activationConstraint: { delay: 250, tolerance: 5 } })
|
|
4032
|
-
), q = xe(null), [
|
|
4033
|
-
},
|
|
4034
|
-
|
|
4032
|
+
), q = xe(null), [C, g] = M(null), v = xe(0), w = () => {
|
|
4033
|
+
}, z = ({ delta: k }) => {
|
|
4034
|
+
v.current = k?.x ?? 0;
|
|
4035
4035
|
}, N = ae(
|
|
4036
4036
|
({ active: k, over: F }) => {
|
|
4037
|
-
const
|
|
4038
|
-
if (
|
|
4037
|
+
const L = v.current;
|
|
4038
|
+
if (v.current = 0, g(null), !k || !F) return;
|
|
4039
4039
|
const U = String(k.id).replace(/^drag-/, ""), S = String(F.id).replace(/^drop-/, "");
|
|
4040
4040
|
if (!U || !S || U === S) return;
|
|
4041
4041
|
let O = S;
|
|
4042
|
-
const D = Math.max(0, Math.floor(-
|
|
4042
|
+
const D = Math.max(0, Math.floor(-L / h));
|
|
4043
4043
|
if (D > 0) {
|
|
4044
4044
|
let W = S;
|
|
4045
4045
|
for (let pe = 0; pe < D; pe++) {
|
|
@@ -4053,43 +4053,43 @@ function Jl({
|
|
|
4053
4053
|
}
|
|
4054
4054
|
}
|
|
4055
4055
|
if (d && O === a) {
|
|
4056
|
-
|
|
4056
|
+
_(Le($));
|
|
4057
4057
|
return;
|
|
4058
4058
|
}
|
|
4059
|
-
const P = Le(j), { newRoots:
|
|
4059
|
+
const P = Le(j), { newRoots: V, removed: R } = fs(P, U);
|
|
4060
4060
|
if (!R) return;
|
|
4061
|
-
const Y = xs(
|
|
4062
|
-
|
|
4061
|
+
const Y = xs(V, O, R);
|
|
4062
|
+
_(Y), r?.({ sourceId: U, destParentId: O, newTree: Y });
|
|
4063
4063
|
},
|
|
4064
|
-
[j,
|
|
4065
|
-
),
|
|
4066
|
-
(k, F = 0) => k.map((
|
|
4064
|
+
[j, $, a, d, h, r]
|
|
4065
|
+
), x = ae(
|
|
4066
|
+
(k, F = 0) => k.map((L) => /* @__PURE__ */ n(se.Fragment, { children: [
|
|
4067
4067
|
/* @__PURE__ */ e(
|
|
4068
4068
|
ds,
|
|
4069
4069
|
{
|
|
4070
|
-
node:
|
|
4070
|
+
node: L,
|
|
4071
4071
|
depth: F,
|
|
4072
|
-
expanded:
|
|
4073
|
-
onToggle: () => I(
|
|
4072
|
+
expanded: !!T[L.id],
|
|
4073
|
+
onToggle: () => I(L.id),
|
|
4074
4074
|
onSelect: o,
|
|
4075
4075
|
onCreateChild: p,
|
|
4076
4076
|
onRename: b,
|
|
4077
4077
|
onDelete: f,
|
|
4078
|
-
renderActions:
|
|
4079
|
-
dragId: `drag-${
|
|
4080
|
-
dropId: `drop-${
|
|
4078
|
+
renderActions: y,
|
|
4079
|
+
dragId: `drag-${L.id}`,
|
|
4080
|
+
dropId: `drop-${L.id}`,
|
|
4081
4081
|
indent: h
|
|
4082
4082
|
}
|
|
4083
4083
|
),
|
|
4084
|
-
|
|
4085
|
-
] },
|
|
4086
|
-
[
|
|
4084
|
+
T[L.id] && L.children?.length > 0 ? x(L.children, F + 1) : null
|
|
4085
|
+
] }, L.id)),
|
|
4086
|
+
[T, h, p, f, b, o, y, I]
|
|
4087
4087
|
);
|
|
4088
|
-
return
|
|
4089
|
-
if (!
|
|
4090
|
-
const k = String(
|
|
4091
|
-
function F(
|
|
4092
|
-
for (const U of
|
|
4088
|
+
return se.useMemo(() => {
|
|
4089
|
+
if (!C) return null;
|
|
4090
|
+
const k = String(C).replace(/^drag-/, "");
|
|
4091
|
+
function F(L) {
|
|
4092
|
+
for (const U of L) {
|
|
4093
4093
|
if (U.id === k) return U;
|
|
4094
4094
|
const S = U.children?.length ? F(U.children) : null;
|
|
4095
4095
|
if (S) return S;
|
|
@@ -4097,7 +4097,7 @@ function Jl({
|
|
|
4097
4097
|
return null;
|
|
4098
4098
|
}
|
|
4099
4099
|
return F(j);
|
|
4100
|
-
}, [
|
|
4100
|
+
}, [C, j]), /* @__PURE__ */ n("div", { className: "tv", children: [
|
|
4101
4101
|
s !== !1 && /* @__PURE__ */ n("div", { className: "tv-header", children: [
|
|
4102
4102
|
/* @__PURE__ */ e("div", { className: "tv-title", children: s }),
|
|
4103
4103
|
/* @__PURE__ */ e("button", { className: "tv-btn", onClick: u, children: "+ New folder" })
|
|
@@ -4112,11 +4112,11 @@ function Jl({
|
|
|
4112
4112
|
{
|
|
4113
4113
|
collisionDetection: xr,
|
|
4114
4114
|
sensors: G,
|
|
4115
|
-
onDragStart:
|
|
4116
|
-
onDragMove:
|
|
4115
|
+
onDragStart: w,
|
|
4116
|
+
onDragMove: z,
|
|
4117
4117
|
onDragEnd: N,
|
|
4118
4118
|
modifiers: [fr],
|
|
4119
|
-
children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children:
|
|
4119
|
+
children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: x(j, 0) })
|
|
4120
4120
|
}
|
|
4121
4121
|
)
|
|
4122
4122
|
] });
|
|
@@ -4135,21 +4135,21 @@ const Xl = ({
|
|
|
4135
4135
|
...u
|
|
4136
4136
|
// Pass remaining props to Tab.Group
|
|
4137
4137
|
}) => {
|
|
4138
|
-
const p = s === "vertical", b = (
|
|
4138
|
+
const p = s === "vertical", b = (y) => ke(
|
|
4139
4139
|
"py-2 -mb-px text-sm font-medium focus:outline-none border-b-2",
|
|
4140
|
-
|
|
4141
|
-
), f = (
|
|
4140
|
+
y ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
|
|
4141
|
+
), f = (y) => ke(
|
|
4142
4142
|
"text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
|
|
4143
|
-
|
|
4144
|
-
), r = ({ selected:
|
|
4145
|
-
return /* @__PURE__ */ e(
|
|
4146
|
-
/* @__PURE__ */ e(
|
|
4147
|
-
/* @__PURE__ */ e(
|
|
4143
|
+
y ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
|
|
4144
|
+
), r = ({ selected: y }) => o ? typeof o == "function" ? o(y) : o : p ? f(y) : b(y);
|
|
4145
|
+
return /* @__PURE__ */ e(ne.Group, { vertical: p, ...u, children: p ? /* @__PURE__ */ n("div", { className: ke("flex gap-4", i), children: [
|
|
4146
|
+
/* @__PURE__ */ e(ne.List, { className: ke("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((y) => /* @__PURE__ */ e(ne, { className: r, children: y.label }, y.key)) }),
|
|
4147
|
+
/* @__PURE__ */ e(ne.Panels, { unmount: !a, className: ke("flex-1", m), children: t.map((y) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: y.content }) }, y.key)) })
|
|
4148
4148
|
] }) : (
|
|
4149
4149
|
// mostly this part is used : horizontal
|
|
4150
4150
|
/* @__PURE__ */ n(te, { children: [
|
|
4151
|
-
/* @__PURE__ */ e(
|
|
4152
|
-
/* @__PURE__ */ e(
|
|
4151
|
+
/* @__PURE__ */ e(ne.List, { className: ke("flex gap-6 border rounded-t-2xl px-1.5 border-gray-300 mb-3 ", l), children: t.map((y) => /* @__PURE__ */ e(ne, { className: r, children: y.label }, y.key)) }),
|
|
4152
|
+
/* @__PURE__ */ e(ne.Panels, { unmount: !a, className: ke("mt-2", m), children: t.map((y) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: y.content }) }, y.key)) })
|
|
4153
4153
|
] })
|
|
4154
4154
|
) });
|
|
4155
4155
|
};
|
|
@@ -4159,7 +4159,7 @@ function Hl(t, a = "YYYY-MM-DD HH:mm:ss") {
|
|
|
4159
4159
|
c.string;
|
|
4160
4160
|
function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
4161
4161
|
console.log(t);
|
|
4162
|
-
const [l, m] =
|
|
4162
|
+
const [l, m] = se.useState(t), [o, u] = se.useState(() => {
|
|
4163
4163
|
const r = a && a[t.key] || {};
|
|
4164
4164
|
return console.log("Initial Section data for", t.key, r), r;
|
|
4165
4165
|
}), p = xe(a);
|
|
@@ -4176,24 +4176,24 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4176
4176
|
}, [l.key, o, s]);
|
|
4177
4177
|
const f = (r) => {
|
|
4178
4178
|
if (!r.dependsOn) return !0;
|
|
4179
|
-
const { field:
|
|
4179
|
+
const { field: y, value: d, operator: h = "equals" } = r.dependsOn, $ = o[y];
|
|
4180
4180
|
switch (h) {
|
|
4181
4181
|
case "equals":
|
|
4182
|
-
return
|
|
4182
|
+
return $ === d;
|
|
4183
4183
|
case "notEquals":
|
|
4184
|
-
return
|
|
4184
|
+
return $ !== d;
|
|
4185
4185
|
case "contains":
|
|
4186
|
-
return Array.isArray(
|
|
4186
|
+
return Array.isArray($) && $.includes(d);
|
|
4187
4187
|
case "notContains":
|
|
4188
|
-
return !Array.isArray(
|
|
4188
|
+
return !Array.isArray($) || !$.includes(d);
|
|
4189
4189
|
case "greaterThan":
|
|
4190
|
-
return Number(
|
|
4190
|
+
return Number($) > Number(d);
|
|
4191
4191
|
case "lessThan":
|
|
4192
|
-
return Number(
|
|
4192
|
+
return Number($) < Number(d);
|
|
4193
4193
|
case "isEmpty":
|
|
4194
|
-
return
|
|
4194
|
+
return !$ || Array.isArray($) && $.length === 0;
|
|
4195
4195
|
case "isNotEmpty":
|
|
4196
|
-
return
|
|
4196
|
+
return $ && (!Array.isArray($) || $.length > 0);
|
|
4197
4197
|
default:
|
|
4198
4198
|
return !0;
|
|
4199
4199
|
}
|
|
@@ -4211,7 +4211,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4211
4211
|
}
|
|
4212
4212
|
),
|
|
4213
4213
|
/* @__PURE__ */ e("p", { style: { fontSize: "14px", marginBottom: "10px" }, children: l.description }),
|
|
4214
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: l.fields.map((r,
|
|
4214
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: l.fields.map((r, y) => f(r) && /* @__PURE__ */ n("div", { style: { marginBottom: "10px" }, children: [
|
|
4215
4215
|
/* @__PURE__ */ n(
|
|
4216
4216
|
"label",
|
|
4217
4217
|
{
|
|
@@ -4411,7 +4411,6 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4411
4411
|
const h = { ...o, [r.key]: d };
|
|
4412
4412
|
u(h), s && s(l.key, h);
|
|
4413
4413
|
},
|
|
4414
|
-
label: r.placeholder || r.label,
|
|
4415
4414
|
disabled: r.disabled ? r.disabled : !1
|
|
4416
4415
|
}
|
|
4417
4416
|
),
|
|
@@ -4474,8 +4473,8 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4474
4473
|
value: d.value,
|
|
4475
4474
|
checked: o[r.key] === d.value,
|
|
4476
4475
|
onChange: (h) => {
|
|
4477
|
-
const
|
|
4478
|
-
u(
|
|
4476
|
+
const $ = { ...o, [r.key]: h.target.value };
|
|
4477
|
+
u($), s && s(l.key, $);
|
|
4479
4478
|
},
|
|
4480
4479
|
disabled: r.disabled
|
|
4481
4480
|
}
|
|
@@ -4592,8 +4591,8 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4592
4591
|
type: "file",
|
|
4593
4592
|
name: r.key,
|
|
4594
4593
|
onChange: (d) => {
|
|
4595
|
-
const h = d.target.files[0],
|
|
4596
|
-
u(
|
|
4594
|
+
const h = d.target.files[0], $ = { ...o, [r.key]: h ? h.name : "" };
|
|
4595
|
+
u($), s && s(l.key, $);
|
|
4597
4596
|
},
|
|
4598
4597
|
accept: r.accept,
|
|
4599
4598
|
className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
@@ -4632,23 +4631,23 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4632
4631
|
children: r.info
|
|
4633
4632
|
}
|
|
4634
4633
|
)
|
|
4635
|
-
] },
|
|
4634
|
+
] }, y)) })
|
|
4636
4635
|
] }) });
|
|
4637
4636
|
}
|
|
4638
4637
|
const vs = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
|
|
4639
4638
|
function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
4640
4639
|
console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
|
|
4641
|
-
const [l, m] =
|
|
4640
|
+
const [l, m] = M(t), [o, u] = M(null), [p, b] = M(null);
|
|
4642
4641
|
console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
|
|
4643
|
-
const [f, r] =
|
|
4644
|
-
const
|
|
4645
|
-
return console.log(`[DataTableRenderer] ${l.key} - Initial data:`,
|
|
4646
|
-
}),
|
|
4642
|
+
const [f, r] = M(() => {
|
|
4643
|
+
const g = a && a[l.key] || [], v = g.length > 0 ? g : [{ id: 0 }];
|
|
4644
|
+
return console.log(`[DataTableRenderer] ${l.key} - Initial data:`, v), v;
|
|
4645
|
+
}), y = xe(a);
|
|
4647
4646
|
Z(() => {
|
|
4648
|
-
if (console.log(`[DataTableRenderer] ${l.key} - Checking for initialData changes`), console.log(`[DataTableRenderer] ${l.key} - Previous:`,
|
|
4649
|
-
|
|
4650
|
-
const
|
|
4651
|
-
console.log(`[DataTableRenderer] ${l.key} - Setting new data:`,
|
|
4647
|
+
if (console.log(`[DataTableRenderer] ${l.key} - Checking for initialData changes`), console.log(`[DataTableRenderer] ${l.key} - Previous:`, y.current), console.log(`[DataTableRenderer] ${l.key} - Current:`, a), y.current !== a) {
|
|
4648
|
+
y.current = a;
|
|
4649
|
+
const g = a && a[l.key] || [], v = g.length > 0 ? g : [{ id: 0 }];
|
|
4650
|
+
console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, v), r(v);
|
|
4652
4651
|
}
|
|
4653
4652
|
}, [a, l.key]);
|
|
4654
4653
|
const d = xe(f), h = xe(null);
|
|
@@ -4659,257 +4658,257 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4659
4658
|
}, [l.key, f, s]), Z(() => () => {
|
|
4660
4659
|
h.current && clearTimeout(h.current);
|
|
4661
4660
|
}, []);
|
|
4662
|
-
const
|
|
4663
|
-
const
|
|
4664
|
-
console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: N, value:
|
|
4661
|
+
const $ = (g) => {
|
|
4662
|
+
const v = (N, x) => {
|
|
4663
|
+
console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: N, value: x, type: typeof x }), r((k) => {
|
|
4665
4664
|
const F = [...k];
|
|
4666
|
-
return F[N][
|
|
4665
|
+
return F[N][g.key] = x, F;
|
|
4667
4666
|
});
|
|
4668
|
-
},
|
|
4669
|
-
const
|
|
4670
|
-
return
|
|
4667
|
+
}, w = (N) => i[l.key]?.[N]?.[g.key], z = (N) => {
|
|
4668
|
+
const x = w(N);
|
|
4669
|
+
return x ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: x }) : null;
|
|
4671
4670
|
};
|
|
4672
|
-
switch (
|
|
4671
|
+
switch (g.fieldtype) {
|
|
4673
4672
|
case "text":
|
|
4674
|
-
return (N,
|
|
4673
|
+
return (N, x) => /* @__PURE__ */ n("div", { children: [
|
|
4675
4674
|
/* @__PURE__ */ e(
|
|
4676
4675
|
X,
|
|
4677
4676
|
{
|
|
4678
|
-
value: N[
|
|
4679
|
-
onChange: (k) =>
|
|
4680
|
-
placeholder:
|
|
4681
|
-
required:
|
|
4682
|
-
className: `w-full ${x
|
|
4677
|
+
value: N[g.key] || "",
|
|
4678
|
+
onChange: (k) => v(x, k.target.value),
|
|
4679
|
+
placeholder: g.placeholder || `Enter ${g.label}`,
|
|
4680
|
+
required: g.required,
|
|
4681
|
+
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4683
4682
|
}
|
|
4684
4683
|
),
|
|
4685
|
-
|
|
4684
|
+
z(x)
|
|
4686
4685
|
] });
|
|
4687
4686
|
case "textarea":
|
|
4688
|
-
return (N,
|
|
4687
|
+
return (N, x) => /* @__PURE__ */ n("div", { children: [
|
|
4689
4688
|
/* @__PURE__ */ e(
|
|
4690
4689
|
ya,
|
|
4691
4690
|
{
|
|
4692
|
-
value: N[
|
|
4693
|
-
onChange: (k) =>
|
|
4694
|
-
placeholder:
|
|
4695
|
-
required:
|
|
4696
|
-
className: `w-full ${x
|
|
4691
|
+
value: N[g.key] || "",
|
|
4692
|
+
onChange: (k) => v(x, k.target.value),
|
|
4693
|
+
placeholder: g.placeholder || `Enter ${g.label}`,
|
|
4694
|
+
required: g.required,
|
|
4695
|
+
className: `w-full ${w(x) ? "border-red-500" : ""}`,
|
|
4697
4696
|
rows: 3
|
|
4698
4697
|
}
|
|
4699
4698
|
),
|
|
4700
|
-
|
|
4699
|
+
z(x)
|
|
4701
4700
|
] });
|
|
4702
4701
|
case "number":
|
|
4703
|
-
return (N,
|
|
4702
|
+
return (N, x) => /* @__PURE__ */ n("div", { children: [
|
|
4704
4703
|
/* @__PURE__ */ e(
|
|
4705
4704
|
X,
|
|
4706
4705
|
{
|
|
4707
4706
|
type: "number",
|
|
4708
|
-
value: N[
|
|
4709
|
-
onChange: (k) =>
|
|
4710
|
-
placeholder:
|
|
4711
|
-
required:
|
|
4712
|
-
className: `w-full ${x
|
|
4707
|
+
value: N[g.key] || "",
|
|
4708
|
+
onChange: (k) => v(x, k.target.value),
|
|
4709
|
+
placeholder: g.placeholder || `Enter ${g.label}`,
|
|
4710
|
+
required: g.required,
|
|
4711
|
+
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4713
4712
|
}
|
|
4714
4713
|
),
|
|
4715
|
-
|
|
4714
|
+
z(x)
|
|
4716
4715
|
] });
|
|
4717
4716
|
case "email":
|
|
4718
|
-
return (N,
|
|
4717
|
+
return (N, x) => /* @__PURE__ */ n("div", { children: [
|
|
4719
4718
|
/* @__PURE__ */ e(
|
|
4720
4719
|
X,
|
|
4721
4720
|
{
|
|
4722
4721
|
type: "email",
|
|
4723
|
-
value: N[
|
|
4724
|
-
onChange: (k) =>
|
|
4725
|
-
placeholder:
|
|
4726
|
-
required:
|
|
4727
|
-
className: `w-full ${x
|
|
4722
|
+
value: N[g.key] || "",
|
|
4723
|
+
onChange: (k) => v(x, k.target.value),
|
|
4724
|
+
placeholder: g.placeholder || "Enter email address",
|
|
4725
|
+
required: g.required,
|
|
4726
|
+
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4728
4727
|
}
|
|
4729
4728
|
),
|
|
4730
|
-
|
|
4729
|
+
z(x)
|
|
4731
4730
|
] });
|
|
4732
4731
|
case "url":
|
|
4733
|
-
return (N,
|
|
4732
|
+
return (N, x) => /* @__PURE__ */ n("div", { children: [
|
|
4734
4733
|
/* @__PURE__ */ e(
|
|
4735
4734
|
X,
|
|
4736
4735
|
{
|
|
4737
4736
|
type: "url",
|
|
4738
|
-
value: N[
|
|
4739
|
-
onChange: (k) =>
|
|
4740
|
-
placeholder:
|
|
4741
|
-
required:
|
|
4742
|
-
className: `w-full ${x
|
|
4737
|
+
value: N[g.key] || "",
|
|
4738
|
+
onChange: (k) => v(x, k.target.value),
|
|
4739
|
+
placeholder: g.placeholder || "Enter URL",
|
|
4740
|
+
required: g.required,
|
|
4741
|
+
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4743
4742
|
}
|
|
4744
4743
|
),
|
|
4745
|
-
|
|
4744
|
+
z(x)
|
|
4746
4745
|
] });
|
|
4747
4746
|
case "password":
|
|
4748
|
-
return (N,
|
|
4747
|
+
return (N, x) => /* @__PURE__ */ n("div", { children: [
|
|
4749
4748
|
/* @__PURE__ */ e(
|
|
4750
4749
|
X,
|
|
4751
4750
|
{
|
|
4752
4751
|
type: "password",
|
|
4753
|
-
value: N[
|
|
4754
|
-
onChange: (k) =>
|
|
4755
|
-
placeholder:
|
|
4756
|
-
required:
|
|
4757
|
-
className: `w-full ${x
|
|
4752
|
+
value: N[g.key] || "",
|
|
4753
|
+
onChange: (k) => v(x, k.target.value),
|
|
4754
|
+
placeholder: g.placeholder || "Enter password",
|
|
4755
|
+
required: g.required,
|
|
4756
|
+
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4758
4757
|
}
|
|
4759
4758
|
),
|
|
4760
|
-
|
|
4759
|
+
z(x)
|
|
4761
4760
|
] });
|
|
4762
4761
|
case "select":
|
|
4763
4762
|
case "dropdown":
|
|
4764
|
-
return (N,
|
|
4763
|
+
return (N, x) => /* @__PURE__ */ n("div", { children: [
|
|
4765
4764
|
/* @__PURE__ */ e(
|
|
4766
4765
|
ft,
|
|
4767
4766
|
{
|
|
4768
|
-
value: N[
|
|
4769
|
-
onChange: (k) =>
|
|
4770
|
-
options:
|
|
4771
|
-
placeholder:
|
|
4772
|
-
required:
|
|
4773
|
-
className: `w-full ${x
|
|
4767
|
+
value: N[g.key] || "",
|
|
4768
|
+
onChange: (k) => v(x, k),
|
|
4769
|
+
options: g.options || [],
|
|
4770
|
+
placeholder: g.placeholder || `Select ${g.label}`,
|
|
4771
|
+
required: g.required,
|
|
4772
|
+
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4774
4773
|
}
|
|
4775
4774
|
),
|
|
4776
|
-
|
|
4775
|
+
z(x)
|
|
4777
4776
|
] });
|
|
4778
4777
|
case "selectDynamic":
|
|
4779
|
-
return (N,
|
|
4778
|
+
return (N, x) => {
|
|
4780
4779
|
const k = () => {
|
|
4781
|
-
if (
|
|
4782
|
-
const { config: F, valueField:
|
|
4780
|
+
if (g.optionsFrom && a) {
|
|
4781
|
+
const { config: F, valueField: L, labelField: U } = g.optionsFrom, S = a[F] || [];
|
|
4783
4782
|
if (Array.isArray(S))
|
|
4784
4783
|
return S.map((O) => ({
|
|
4785
|
-
id: O[
|
|
4786
|
-
value: O[
|
|
4784
|
+
id: O[L] || "",
|
|
4785
|
+
value: O[L] || "",
|
|
4787
4786
|
label: O[U] || ""
|
|
4788
4787
|
}));
|
|
4789
4788
|
}
|
|
4790
|
-
return
|
|
4789
|
+
return g.options || [];
|
|
4791
4790
|
};
|
|
4792
4791
|
return /* @__PURE__ */ n("div", { children: [
|
|
4793
4792
|
/* @__PURE__ */ e(
|
|
4794
4793
|
ft,
|
|
4795
4794
|
{
|
|
4796
|
-
index:
|
|
4797
|
-
value: N[
|
|
4798
|
-
onChange: (F) =>
|
|
4795
|
+
index: x,
|
|
4796
|
+
value: N[g.key] || "",
|
|
4797
|
+
onChange: (F) => v(x, F),
|
|
4799
4798
|
options: k(),
|
|
4800
|
-
placeholder:
|
|
4801
|
-
required:
|
|
4802
|
-
className: `w-full ${x
|
|
4799
|
+
placeholder: g.placeholder || `Select ${g.label}`,
|
|
4800
|
+
required: g.required,
|
|
4801
|
+
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4803
4802
|
},
|
|
4804
4803
|
Math.random()
|
|
4805
4804
|
),
|
|
4806
|
-
|
|
4805
|
+
z(x)
|
|
4807
4806
|
] });
|
|
4808
4807
|
};
|
|
4809
4808
|
case "multiselect":
|
|
4810
|
-
return (N,
|
|
4811
|
-
const k = N[
|
|
4809
|
+
return (N, x) => {
|
|
4810
|
+
const k = N[g.key] || [];
|
|
4812
4811
|
return /* @__PURE__ */ e(
|
|
4813
4812
|
nt,
|
|
4814
4813
|
{
|
|
4815
4814
|
selectedItems: k,
|
|
4816
|
-
onSelectionChange: (F) =>
|
|
4817
|
-
options:
|
|
4818
|
-
placeholder:
|
|
4815
|
+
onSelectionChange: (F) => v(x, F),
|
|
4816
|
+
options: g.options || [],
|
|
4817
|
+
placeholder: g.placeholder || `Select ${g.label}`,
|
|
4819
4818
|
className: "w-full"
|
|
4820
4819
|
}
|
|
4821
4820
|
);
|
|
4822
4821
|
};
|
|
4823
4822
|
case "checkbox":
|
|
4824
4823
|
case "boolean":
|
|
4825
|
-
return (N,
|
|
4824
|
+
return (N, x) => /* @__PURE__ */ e(
|
|
4826
4825
|
ma,
|
|
4827
4826
|
{
|
|
4828
|
-
checked: !!N[
|
|
4829
|
-
onChange: (k) =>
|
|
4830
|
-
label:
|
|
4827
|
+
checked: !!N[g.key],
|
|
4828
|
+
onChange: (k) => v(x, k),
|
|
4829
|
+
label: g.placeholder || g.label,
|
|
4831
4830
|
className: "w-full"
|
|
4832
4831
|
}
|
|
4833
4832
|
);
|
|
4834
4833
|
case "toggle":
|
|
4835
4834
|
case "switch":
|
|
4836
|
-
return (N,
|
|
4835
|
+
return (N, x) => /* @__PURE__ */ e(
|
|
4837
4836
|
va,
|
|
4838
4837
|
{
|
|
4839
|
-
isOn: !!N[
|
|
4840
|
-
onToggle: (k) =>
|
|
4841
|
-
label:
|
|
4838
|
+
isOn: !!N[g.key],
|
|
4839
|
+
onToggle: (k) => v(x, k),
|
|
4840
|
+
label: g.placeholder || g.label,
|
|
4842
4841
|
className: "w-full"
|
|
4843
4842
|
}
|
|
4844
4843
|
);
|
|
4845
4844
|
case "date":
|
|
4846
|
-
return (N,
|
|
4845
|
+
return (N, x) => /* @__PURE__ */ e(
|
|
4847
4846
|
ga,
|
|
4848
4847
|
{
|
|
4849
|
-
selectedDate: N[
|
|
4850
|
-
onDateChange: (k) =>
|
|
4851
|
-
placeholder:
|
|
4848
|
+
selectedDate: N[g.key] ? new Date(N[g.key]) : null,
|
|
4849
|
+
onDateChange: (k) => v(x, k ? k.toISOString().split("T")[0] : ""),
|
|
4850
|
+
placeholder: g.placeholder || "Select date",
|
|
4852
4851
|
className: "w-full"
|
|
4853
4852
|
}
|
|
4854
4853
|
);
|
|
4855
4854
|
case "datetime":
|
|
4856
|
-
return (N,
|
|
4855
|
+
return (N, x) => /* @__PURE__ */ e(
|
|
4857
4856
|
X,
|
|
4858
4857
|
{
|
|
4859
4858
|
type: "datetime-local",
|
|
4860
|
-
value: N[
|
|
4861
|
-
onChange: (k) =>
|
|
4862
|
-
placeholder:
|
|
4863
|
-
required:
|
|
4859
|
+
value: N[g.key] || "",
|
|
4860
|
+
onChange: (k) => v(x, k.target.value),
|
|
4861
|
+
placeholder: g.placeholder || "Select date and time",
|
|
4862
|
+
required: g.required,
|
|
4864
4863
|
className: "w-full"
|
|
4865
4864
|
}
|
|
4866
4865
|
);
|
|
4867
4866
|
case "time":
|
|
4868
|
-
return (N,
|
|
4867
|
+
return (N, x) => /* @__PURE__ */ e(
|
|
4869
4868
|
X,
|
|
4870
4869
|
{
|
|
4871
4870
|
type: "time",
|
|
4872
|
-
value: N[
|
|
4873
|
-
onChange: (k) =>
|
|
4874
|
-
placeholder:
|
|
4875
|
-
required:
|
|
4871
|
+
value: N[g.key] || "",
|
|
4872
|
+
onChange: (k) => v(x, k.target.value),
|
|
4873
|
+
placeholder: g.placeholder || "Select time",
|
|
4874
|
+
required: g.required,
|
|
4876
4875
|
className: "w-full"
|
|
4877
4876
|
}
|
|
4878
4877
|
);
|
|
4879
4878
|
case "radio":
|
|
4880
|
-
return (N,
|
|
4879
|
+
return (N, x) => /* @__PURE__ */ e(
|
|
4881
4880
|
ba,
|
|
4882
4881
|
{
|
|
4883
|
-
selectedValue: N[
|
|
4884
|
-
onValueChange: (k) =>
|
|
4885
|
-
options:
|
|
4882
|
+
selectedValue: N[g.key] || "",
|
|
4883
|
+
onValueChange: (k) => v(x, k),
|
|
4884
|
+
options: g.options || [],
|
|
4886
4885
|
className: "w-full"
|
|
4887
4886
|
}
|
|
4888
4887
|
);
|
|
4889
4888
|
case "search":
|
|
4890
|
-
return (N,
|
|
4889
|
+
return (N, x) => /* @__PURE__ */ e(
|
|
4891
4890
|
be,
|
|
4892
4891
|
{
|
|
4893
|
-
value: N[
|
|
4894
|
-
onChange: (k) =>
|
|
4895
|
-
placeholder:
|
|
4892
|
+
value: N[g.key] || "",
|
|
4893
|
+
onChange: (k) => v(x, k),
|
|
4894
|
+
placeholder: g.placeholder || `Search ${g.label}`,
|
|
4896
4895
|
className: "w-full"
|
|
4897
4896
|
}
|
|
4898
4897
|
);
|
|
4899
4898
|
case "audience":
|
|
4900
|
-
return (N,
|
|
4901
|
-
const k = N[
|
|
4899
|
+
return (N, x) => {
|
|
4900
|
+
const k = N[g.key] || { users: [], groups: [], roles: [] }, F = [
|
|
4902
4901
|
...k.users || [],
|
|
4903
4902
|
...k.groups || [],
|
|
4904
4903
|
...k.roles || []
|
|
4905
4904
|
];
|
|
4906
4905
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
4907
|
-
/* @__PURE__ */ e(vs, { children: F.length > 0 ? F.slice(0, 3).map((
|
|
4906
|
+
/* @__PURE__ */ e(vs, { children: F.length > 0 ? F.slice(0, 3).map((L, U) => /* @__PURE__ */ e(
|
|
4908
4907
|
ze,
|
|
4909
4908
|
{
|
|
4910
4909
|
size: "small",
|
|
4911
|
-
name:
|
|
4912
|
-
src:
|
|
4910
|
+
name: L.name || L.displayName || L.id,
|
|
4911
|
+
src: L.avatarUrl
|
|
4913
4912
|
},
|
|
4914
4913
|
U
|
|
4915
4914
|
)) : null }),
|
|
@@ -4918,7 +4917,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4918
4917
|
{
|
|
4919
4918
|
className: "text-blue-600 font-semibold hover:text-blue-800",
|
|
4920
4919
|
onClick: () => {
|
|
4921
|
-
b(
|
|
4920
|
+
b(g.key), u(x);
|
|
4922
4921
|
},
|
|
4923
4922
|
children: F.length > 0 ? "Edit" : "Assign"
|
|
4924
4923
|
}
|
|
@@ -4926,112 +4925,112 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4926
4925
|
] });
|
|
4927
4926
|
};
|
|
4928
4927
|
case "color":
|
|
4929
|
-
return (N,
|
|
4928
|
+
return (N, x) => /* @__PURE__ */ e(
|
|
4930
4929
|
X,
|
|
4931
4930
|
{
|
|
4932
4931
|
type: "color",
|
|
4933
|
-
value: N[
|
|
4934
|
-
onChange: (k) =>
|
|
4932
|
+
value: N[g.key] || "#000000",
|
|
4933
|
+
onChange: (k) => v(x, k.target.value),
|
|
4935
4934
|
className: "w-full h-10"
|
|
4936
4935
|
}
|
|
4937
4936
|
);
|
|
4938
4937
|
case "range":
|
|
4939
|
-
return (N,
|
|
4938
|
+
return (N, x) => /* @__PURE__ */ n("div", { className: "w-full", children: [
|
|
4940
4939
|
/* @__PURE__ */ e(
|
|
4941
4940
|
X,
|
|
4942
4941
|
{
|
|
4943
4942
|
type: "range",
|
|
4944
|
-
value: N[
|
|
4945
|
-
onChange: (k) =>
|
|
4946
|
-
min:
|
|
4947
|
-
max:
|
|
4948
|
-
step:
|
|
4943
|
+
value: N[g.key] || g.min || 0,
|
|
4944
|
+
onChange: (k) => v(x, k.target.value),
|
|
4945
|
+
min: g.min || 0,
|
|
4946
|
+
max: g.max || 100,
|
|
4947
|
+
step: g.step || 1,
|
|
4949
4948
|
className: "w-full"
|
|
4950
4949
|
}
|
|
4951
4950
|
),
|
|
4952
|
-
/* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: N[
|
|
4951
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: N[g.key] || g.min || 0 })
|
|
4953
4952
|
] });
|
|
4954
4953
|
case "file":
|
|
4955
|
-
return (N,
|
|
4954
|
+
return (N, x) => /* @__PURE__ */ e(
|
|
4956
4955
|
X,
|
|
4957
4956
|
{
|
|
4958
4957
|
type: "file",
|
|
4959
4958
|
onChange: (k) => {
|
|
4960
4959
|
const F = k.target.files[0];
|
|
4961
|
-
|
|
4960
|
+
v(x, F ? F.name : "");
|
|
4962
4961
|
},
|
|
4963
|
-
accept:
|
|
4962
|
+
accept: g.accept,
|
|
4964
4963
|
className: "w-full"
|
|
4965
4964
|
}
|
|
4966
4965
|
);
|
|
4967
4966
|
case "hidden":
|
|
4968
|
-
return (N,
|
|
4967
|
+
return (N, x) => /* @__PURE__ */ e(
|
|
4969
4968
|
X,
|
|
4970
4969
|
{
|
|
4971
4970
|
type: "hidden",
|
|
4972
|
-
value: N[
|
|
4973
|
-
onChange: (k) =>
|
|
4971
|
+
value: N[g.key] || "",
|
|
4972
|
+
onChange: (k) => v(x, k.target.value)
|
|
4974
4973
|
}
|
|
4975
4974
|
);
|
|
4976
4975
|
// Default fallback for unknown field types
|
|
4977
4976
|
default:
|
|
4978
|
-
return (N,
|
|
4977
|
+
return (N, x) => /* @__PURE__ */ n("div", { children: [
|
|
4979
4978
|
/* @__PURE__ */ e(
|
|
4980
4979
|
X,
|
|
4981
4980
|
{
|
|
4982
|
-
value: N[
|
|
4983
|
-
onChange: (k) =>
|
|
4984
|
-
placeholder:
|
|
4985
|
-
required:
|
|
4986
|
-
className: `w-full ${x
|
|
4981
|
+
value: N[g.key] || "",
|
|
4982
|
+
onChange: (k) => v(x, k.target.value),
|
|
4983
|
+
placeholder: g.placeholder || `Enter ${g.label}`,
|
|
4984
|
+
required: g.required,
|
|
4985
|
+
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4987
4986
|
}
|
|
4988
4987
|
),
|
|
4989
|
-
|
|
4988
|
+
z(x)
|
|
4990
4989
|
] });
|
|
4991
4990
|
}
|
|
4992
|
-
},
|
|
4993
|
-
console.log("[DataTableRenderer] Adding blank row"), r((
|
|
4994
|
-
console.log("[DataTableRenderer] Current data before add:",
|
|
4995
|
-
const
|
|
4996
|
-
id:
|
|
4991
|
+
}, T = ae(() => {
|
|
4992
|
+
console.log("[DataTableRenderer] Adding blank row"), r((g) => {
|
|
4993
|
+
console.log("[DataTableRenderer] Current data before add:", g);
|
|
4994
|
+
const v = {
|
|
4995
|
+
id: g.length
|
|
4997
4996
|
// Assign next available ID
|
|
4998
4997
|
};
|
|
4999
|
-
l.fields.forEach((
|
|
5000
|
-
|
|
5001
|
-
}), console.log("[DataTableRenderer] New blank row:",
|
|
5002
|
-
const
|
|
5003
|
-
return console.log("[DataTableRenderer] Updated data:",
|
|
4998
|
+
l.fields.forEach((z) => {
|
|
4999
|
+
z.fieldtype === "audience" ? v[z.key] = { users: [], groups: [], roles: [] } : v[z.key] = z.default || "";
|
|
5000
|
+
}), console.log("[DataTableRenderer] New blank row:", v);
|
|
5001
|
+
const w = [...g, v];
|
|
5002
|
+
return console.log("[DataTableRenderer] Updated data:", w), w;
|
|
5004
5003
|
});
|
|
5005
|
-
}, [l.fields]), A = ae((
|
|
5006
|
-
r((
|
|
5007
|
-
if (
|
|
5008
|
-
return
|
|
5009
|
-
const
|
|
5010
|
-
return
|
|
5004
|
+
}, [l.fields]), A = ae((g) => {
|
|
5005
|
+
r((v) => {
|
|
5006
|
+
if (v.length <= 1)
|
|
5007
|
+
return v;
|
|
5008
|
+
const w = [...v];
|
|
5009
|
+
return w.splice(g, 1), w;
|
|
5011
5010
|
});
|
|
5012
|
-
}, []), [E, I] =
|
|
5013
|
-
I(
|
|
5014
|
-
}, []),
|
|
5015
|
-
|
|
5016
|
-
}, []), G = ae((
|
|
5017
|
-
|
|
5018
|
-
const
|
|
5019
|
-
return
|
|
5011
|
+
}, []), [E, I] = M(null), j = ae((g, v) => {
|
|
5012
|
+
I(v), g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("text/html", "");
|
|
5013
|
+
}, []), _ = ae((g) => {
|
|
5014
|
+
g.preventDefault(), g.dataTransfer.dropEffect = "move";
|
|
5015
|
+
}, []), G = ae((g, v) => {
|
|
5016
|
+
g.preventDefault(), !(E === null || E === v) && (r((w) => {
|
|
5017
|
+
const z = [...w], N = z[E];
|
|
5018
|
+
return z.splice(E, 1), z.splice(v, 0, N), z;
|
|
5020
5019
|
}), I(null));
|
|
5021
5020
|
}, [E]), q = ae(() => {
|
|
5022
5021
|
I(null);
|
|
5023
|
-
}, []),
|
|
5024
|
-
console.log("[DataTableRenderer] handleAddAudience called with:",
|
|
5025
|
-
const
|
|
5026
|
-
if (o !== null && p &&
|
|
5027
|
-
const
|
|
5028
|
-
|
|
5029
|
-
users: [...
|
|
5030
|
-
groups: [...
|
|
5031
|
-
roles: [...
|
|
5032
|
-
}, console.log("[DataTableRenderer] Updated audience data:",
|
|
5022
|
+
}, []), C = ae((g) => {
|
|
5023
|
+
console.log("[DataTableRenderer] handleAddAudience called with:", g), r((v) => {
|
|
5024
|
+
const w = [...v];
|
|
5025
|
+
if (o !== null && p && w[o]) {
|
|
5026
|
+
const z = g.pendingInvites || [], N = z.filter((F) => F.type === "User"), x = z.filter((F) => F.type === "Group"), k = z.filter((F) => F.type === "Role");
|
|
5027
|
+
w[o][p] = {
|
|
5028
|
+
users: [...w[o][p]?.users || [], ...N],
|
|
5029
|
+
groups: [...w[o][p]?.groups || [], ...x],
|
|
5030
|
+
roles: [...w[o][p]?.roles || [], ...k]
|
|
5031
|
+
}, console.log("[DataTableRenderer] Updated audience data:", w[o][p]);
|
|
5033
5032
|
}
|
|
5034
|
-
return
|
|
5033
|
+
return w;
|
|
5035
5034
|
}), u(null), b(null);
|
|
5036
5035
|
}, [o, p]);
|
|
5037
5036
|
return /* @__PURE__ */ n("div", { children: [
|
|
@@ -5042,7 +5041,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5042
5041
|
"button",
|
|
5043
5042
|
{
|
|
5044
5043
|
className: "btn btn-primary text-white px-6 py-2 rounded-2xl cursor-pointer hover:bg-gray-800",
|
|
5045
|
-
onClick:
|
|
5044
|
+
onClick: T,
|
|
5046
5045
|
children: "Add"
|
|
5047
5046
|
}
|
|
5048
5047
|
)
|
|
@@ -5052,32 +5051,32 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5052
5051
|
/* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ n("table", { className: "min-w-full bg-white border border-gray-300", style: { marginBottom: "20px" }, children: [
|
|
5053
5052
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { className: "bg-gray-50", children: [
|
|
5054
5053
|
/* @__PURE__ */ e("th", { className: "px-4 py-2 w-10" }),
|
|
5055
|
-
l.fields.map((
|
|
5054
|
+
l.fields.map((g, v) => /* @__PURE__ */ e(
|
|
5056
5055
|
"th",
|
|
5057
5056
|
{
|
|
5058
5057
|
className: "px-4 py-2 text-left text-sm font-medium text-gray-700",
|
|
5059
|
-
children:
|
|
5058
|
+
children: g.label || g.key
|
|
5060
5059
|
},
|
|
5061
|
-
|
|
5060
|
+
v
|
|
5062
5061
|
)),
|
|
5063
5062
|
/* @__PURE__ */ e("th", { className: "px-4 py-2 w-16" })
|
|
5064
5063
|
] }) }),
|
|
5065
|
-
/* @__PURE__ */ e("tbody", { children: f.map((
|
|
5064
|
+
/* @__PURE__ */ e("tbody", { children: f.map((g, v) => /* @__PURE__ */ n(
|
|
5066
5065
|
"tr",
|
|
5067
5066
|
{
|
|
5068
|
-
className: `hover:bg-gray-50 ${E ===
|
|
5067
|
+
className: `hover:bg-gray-50 ${E === v ? "opacity-50" : ""}`,
|
|
5069
5068
|
draggable: !0,
|
|
5070
|
-
onDragStart: (
|
|
5071
|
-
onDragOver:
|
|
5072
|
-
onDrop: (
|
|
5069
|
+
onDragStart: (w) => j(w, v),
|
|
5070
|
+
onDragOver: _,
|
|
5071
|
+
onDrop: (w) => G(w, v),
|
|
5073
5072
|
onDragEnd: q,
|
|
5074
5073
|
children: [
|
|
5075
5074
|
/* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e("div", { className: "cursor-move text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ e(Nt, { size: 16 }) }) }),
|
|
5076
|
-
l.fields.map((
|
|
5075
|
+
l.fields.map((w, z) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: $(w)(g, v) }, z)),
|
|
5077
5076
|
/* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
|
|
5078
5077
|
"button",
|
|
5079
5078
|
{
|
|
5080
|
-
onClick: () => A(
|
|
5079
|
+
onClick: () => A(v),
|
|
5081
5080
|
className: "text-red-500 hover:text-red-700",
|
|
5082
5081
|
title: "Delete row",
|
|
5083
5082
|
children: /* @__PURE__ */ e(vr, { size: 16 })
|
|
@@ -5085,24 +5084,24 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5085
5084
|
) })
|
|
5086
5085
|
]
|
|
5087
5086
|
},
|
|
5088
|
-
|
|
5087
|
+
v
|
|
5089
5088
|
)) })
|
|
5090
5089
|
] }) }),
|
|
5091
5090
|
o !== null && (() => {
|
|
5092
|
-
const
|
|
5091
|
+
const g = f[o] && f[o][p] ? {
|
|
5093
5092
|
users: f[o][p].users || [],
|
|
5094
5093
|
groups: f[o][p].groups || [],
|
|
5095
5094
|
roles: f[o][p].roles || []
|
|
5096
5095
|
} : { users: [], groups: [], roles: [] };
|
|
5097
|
-
return console.log("[DataTableRenderer] Opening modal with existing data:",
|
|
5096
|
+
return console.log("[DataTableRenderer] Opening modal with existing data:", g), console.log("[DataTableRenderer] Row data:", f[o]), console.log("[DataTableRenderer] Field name:", p), /* @__PURE__ */ e(
|
|
5098
5097
|
os,
|
|
5099
5098
|
{
|
|
5100
5099
|
isOpen: !0,
|
|
5101
5100
|
onClose: () => {
|
|
5102
5101
|
u(null), b(null);
|
|
5103
5102
|
},
|
|
5104
|
-
onFinalSubmit:
|
|
5105
|
-
existingShares:
|
|
5103
|
+
onFinalSubmit: C,
|
|
5104
|
+
existingShares: g,
|
|
5106
5105
|
allowedPermissions: ["view", "remove"]
|
|
5107
5106
|
}
|
|
5108
5107
|
);
|
|
@@ -5176,7 +5175,7 @@ const Mt = () => {
|
|
|
5176
5175
|
initialData: p = null
|
|
5177
5176
|
// Add prop for initial demo data
|
|
5178
5177
|
}) => {
|
|
5179
|
-
const [b, f] =
|
|
5178
|
+
const [b, f] = M(null), [r, y] = M(""), [d, h] = M(() => Array.isArray(p) ? p : []), [$, T] = M(null), [A, E] = M(null), [I, j] = M(""), _ = async () => {
|
|
5180
5179
|
try {
|
|
5181
5180
|
const S = await Ve(t.collectionList);
|
|
5182
5181
|
if (S) {
|
|
@@ -5191,12 +5190,12 @@ const Mt = () => {
|
|
|
5191
5190
|
}
|
|
5192
5191
|
};
|
|
5193
5192
|
Z(() => {
|
|
5194
|
-
(!p || p.length === 0) &&
|
|
5193
|
+
(!p || p.length === 0) && _();
|
|
5195
5194
|
}, [p]), Z(() => {
|
|
5196
5195
|
Array.isArray(p) && h(p);
|
|
5197
5196
|
}, [p]);
|
|
5198
5197
|
const G = (S) => {
|
|
5199
|
-
m && (f(S.id),
|
|
5198
|
+
m && (f(S.id), y(S.categoryName || ""));
|
|
5200
5199
|
}, q = () => {
|
|
5201
5200
|
if (!l || b !== null) return;
|
|
5202
5201
|
const S = `temp-${Date.now()}`;
|
|
@@ -5209,13 +5208,13 @@ const Mt = () => {
|
|
|
5209
5208
|
order: (O.at(-1)?.order ?? 0) + 1,
|
|
5210
5209
|
_temp: !0
|
|
5211
5210
|
}
|
|
5212
|
-
]), f(S),
|
|
5213
|
-
},
|
|
5211
|
+
]), f(S), y("");
|
|
5212
|
+
}, C = () => {
|
|
5214
5213
|
b != null && (h((S) => {
|
|
5215
5214
|
const O = S.find((P) => P.id === b), D = O && O._temp ? S.filter((P) => P.id !== b) : S;
|
|
5216
5215
|
return s?.(D), D;
|
|
5217
|
-
}), f(null),
|
|
5218
|
-
},
|
|
5216
|
+
}), f(null), y(""));
|
|
5217
|
+
}, g = async () => {
|
|
5219
5218
|
if (b == null || !r.trim()) return;
|
|
5220
5219
|
const S = typeof b == "string" && b.startsWith("temp-");
|
|
5221
5220
|
try {
|
|
@@ -5225,7 +5224,7 @@ const Mt = () => {
|
|
|
5225
5224
|
order: (Array.isArray(d) && d.length > 0 ? d.at(-1)?.order ?? 0 : 0) + 1
|
|
5226
5225
|
});
|
|
5227
5226
|
O && (h((D) => {
|
|
5228
|
-
const P = D.map((
|
|
5227
|
+
const P = D.map((V) => V.id === b ? O : V);
|
|
5229
5228
|
return s?.(P), P;
|
|
5230
5229
|
}), De.success("Collection created successfully"));
|
|
5231
5230
|
} else {
|
|
@@ -5234,29 +5233,29 @@ const Mt = () => {
|
|
|
5234
5233
|
);
|
|
5235
5234
|
h((D) => {
|
|
5236
5235
|
const P = D.map(
|
|
5237
|
-
(
|
|
5236
|
+
(V) => V.id === b ? O && O.id ? { ...V, ...O } : { ...V, categoryName: r.trim() } : V
|
|
5238
5237
|
);
|
|
5239
5238
|
return s?.(P), P;
|
|
5240
5239
|
}), me.success("Collection updated successfully");
|
|
5241
5240
|
}
|
|
5242
|
-
f(null),
|
|
5241
|
+
f(null), y("");
|
|
5243
5242
|
} catch (O) {
|
|
5244
5243
|
console.log(O), me.error("Failed to save collection");
|
|
5245
5244
|
}
|
|
5246
|
-
},
|
|
5245
|
+
}, v = async (S) => {
|
|
5247
5246
|
if (o)
|
|
5248
5247
|
try {
|
|
5249
|
-
await Qn(`${t.collectionUpdate}/${S.id}`) && (me.success("Deleted successfully", { autoClose: 3e3 }),
|
|
5248
|
+
await Qn(`${t.collectionUpdate}/${S.id}`) && (me.success("Deleted successfully", { autoClose: 3e3 }), _());
|
|
5250
5249
|
} catch (O) {
|
|
5251
5250
|
console.log(O), me.error("Failed to delete collection");
|
|
5252
5251
|
}
|
|
5253
|
-
},
|
|
5252
|
+
}, w = (S, O, D) => {
|
|
5254
5253
|
if (!u || !O || !D || O === D) return S;
|
|
5255
|
-
const P = S.findIndex((W) => W.id === O),
|
|
5256
|
-
if (P === -1 ||
|
|
5254
|
+
const P = S.findIndex((W) => W.id === O), V = S.findIndex((W) => W.id === D);
|
|
5255
|
+
if (P === -1 || V === -1) return S;
|
|
5257
5256
|
const R = [...S], [Y] = R.splice(P, 1);
|
|
5258
|
-
return R.splice(
|
|
5259
|
-
},
|
|
5257
|
+
return R.splice(V, 0, Y), R.map((W, pe) => ({ ...W, order: pe + 1 }));
|
|
5258
|
+
}, z = async (S) => {
|
|
5260
5259
|
const O = S.map((D) => ({
|
|
5261
5260
|
id: D.id,
|
|
5262
5261
|
order: D.order,
|
|
@@ -5268,20 +5267,20 @@ const Mt = () => {
|
|
|
5268
5267
|
console.log(D), me.error("Failed to save order", { autoClose: 2500 });
|
|
5269
5268
|
}
|
|
5270
5269
|
}, N = (S, O) => {
|
|
5271
|
-
u && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", String(O)),
|
|
5272
|
-
},
|
|
5273
|
-
|
|
5270
|
+
u && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", String(O)), T(O));
|
|
5271
|
+
}, x = (S) => {
|
|
5272
|
+
$ && S !== A && E(S);
|
|
5274
5273
|
}, k = (S) => {
|
|
5275
5274
|
S.preventDefault();
|
|
5276
5275
|
}, F = async (S, O) => {
|
|
5277
5276
|
S.preventDefault();
|
|
5278
5277
|
const D = S.dataTransfer.getData("text/plain");
|
|
5279
5278
|
D && (h((P) => {
|
|
5280
|
-
const
|
|
5281
|
-
return console.log("Reordered",
|
|
5282
|
-
}),
|
|
5283
|
-
},
|
|
5284
|
-
|
|
5279
|
+
const V = w(P, D, O);
|
|
5280
|
+
return console.log("Reordered", V), z(V), s?.(V), V;
|
|
5281
|
+
}), T(null), E(null));
|
|
5282
|
+
}, L = () => {
|
|
5283
|
+
T(null), E(null);
|
|
5285
5284
|
}, U = Array.isArray(d) ? d.filter(
|
|
5286
5285
|
(S) => S.categoryName?.toLowerCase().includes(I.toLowerCase())
|
|
5287
5286
|
) : [];
|
|
@@ -5310,18 +5309,18 @@ const Mt = () => {
|
|
|
5310
5309
|
)
|
|
5311
5310
|
] }) }),
|
|
5312
5311
|
/* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: U.map((S) => {
|
|
5313
|
-
const O = b === S.id, D = S?.links?.length ?? 0, P =
|
|
5312
|
+
const O = b === S.id, D = S?.links?.length ?? 0, P = $ === S.id, V = A === S.id && $ !== S.id;
|
|
5314
5313
|
return /* @__PURE__ */ e(
|
|
5315
5314
|
"div",
|
|
5316
5315
|
{
|
|
5317
|
-
onDragEnter: () =>
|
|
5316
|
+
onDragEnter: () => x(S.id),
|
|
5318
5317
|
onDragOver: k,
|
|
5319
5318
|
onDrop: (R) => F(R, S.id),
|
|
5320
|
-
onDragEnd:
|
|
5319
|
+
onDragEnd: L,
|
|
5321
5320
|
className: [
|
|
5322
5321
|
"flex items-center justify-between p-3 border rounded-2xl mb-3",
|
|
5323
5322
|
"border-gray-300",
|
|
5324
|
-
|
|
5323
|
+
V ? "ring-2 ring-gray-800/20" : "",
|
|
5325
5324
|
P ? "opacity-60" : ""
|
|
5326
5325
|
].join(" "),
|
|
5327
5326
|
children: O ? /* @__PURE__ */ n(te, { children: [
|
|
@@ -5332,9 +5331,9 @@ const Mt = () => {
|
|
|
5332
5331
|
className: "flex-1 h-10 px-3 max-w-[200px] border border-gray-300 rounded-2xl outline-none focus:ring-2 focus:ring-gray-800/20",
|
|
5333
5332
|
value: r,
|
|
5334
5333
|
placeholder: S._temp ? "New collection name" : "Edit collection name",
|
|
5335
|
-
onChange: (R) =>
|
|
5334
|
+
onChange: (R) => y(R.target.value),
|
|
5336
5335
|
onKeyDown: (R) => {
|
|
5337
|
-
R.key === "Enter" &&
|
|
5336
|
+
R.key === "Enter" && g(), R.key === "Escape" && C();
|
|
5338
5337
|
},
|
|
5339
5338
|
autoFocus: !0
|
|
5340
5339
|
}
|
|
@@ -5344,7 +5343,7 @@ const Mt = () => {
|
|
|
5344
5343
|
"button",
|
|
5345
5344
|
{
|
|
5346
5345
|
className: "cursor-pointer border border-gray-300 p-2 rounded-2xl",
|
|
5347
|
-
onClick:
|
|
5346
|
+
onClick: C,
|
|
5348
5347
|
"aria-label": "Cancel edit",
|
|
5349
5348
|
children: /* @__PURE__ */ e(ge, { color: "#767676" })
|
|
5350
5349
|
}
|
|
@@ -5356,7 +5355,7 @@ const Mt = () => {
|
|
|
5356
5355
|
"border p-2 rounded-2xl",
|
|
5357
5356
|
r.trim() ? "cursor-pointer border-gray-300" : "cursor-not-allowed border-gray-200"
|
|
5358
5357
|
].join(" "),
|
|
5359
|
-
onClick:
|
|
5358
|
+
onClick: g,
|
|
5360
5359
|
"aria-label": "Save",
|
|
5361
5360
|
disabled: !r.trim(),
|
|
5362
5361
|
title: r.trim() ? "Save" : "Name required",
|
|
@@ -5395,7 +5394,7 @@ const Mt = () => {
|
|
|
5395
5394
|
{
|
|
5396
5395
|
className: D === 0 && !S.protected ? "cursor-pointer" : "cursor-not-allowed",
|
|
5397
5396
|
title: D === 0 && !S.protected ? "Delete" : "Cannot delete this collection",
|
|
5398
|
-
onClick: D === 0 ? () =>
|
|
5397
|
+
onClick: D === 0 ? () => v(S) : null,
|
|
5399
5398
|
children: /* @__PURE__ */ e(Ke, { color: D === 0 ? "#767676" : "#C2C2C2" })
|
|
5400
5399
|
}
|
|
5401
5400
|
)
|
|
@@ -5417,7 +5416,7 @@ const Mt = () => {
|
|
|
5417
5416
|
allowEdit: b = !0,
|
|
5418
5417
|
allowDelete: f = !0,
|
|
5419
5418
|
allowReorder: r = !0,
|
|
5420
|
-
className:
|
|
5419
|
+
className: y = ""
|
|
5421
5420
|
} = t, d = a?.[t.key] || o || [], h = Array.isArray(d) ? d : [];
|
|
5422
5421
|
return /* @__PURE__ */ n("div", { className: "dynamic-config-manage-collection-list", children: [
|
|
5423
5422
|
(i || l) && /* @__PURE__ */ n("div", { className: "mb-4", children: [
|
|
@@ -5429,9 +5428,9 @@ const Mt = () => {
|
|
|
5429
5428
|
{
|
|
5430
5429
|
endpoints: m,
|
|
5431
5430
|
initialData: h,
|
|
5432
|
-
className:
|
|
5433
|
-
onCollectionChange: (
|
|
5434
|
-
s && s(t.key,
|
|
5431
|
+
className: y,
|
|
5432
|
+
onCollectionChange: (T) => {
|
|
5433
|
+
s && s(t.key, T);
|
|
5435
5434
|
},
|
|
5436
5435
|
showSearch: u,
|
|
5437
5436
|
allowAdd: p,
|
|
@@ -5464,53 +5463,53 @@ function Ss({
|
|
|
5464
5463
|
onCancel: i,
|
|
5465
5464
|
onSave: l
|
|
5466
5465
|
}) {
|
|
5467
|
-
const [m, o] =
|
|
5466
|
+
const [m, o] = se.useState(a), [u, p] = se.useState(null), [b, f] = M(!1), [r, y] = M(!1), [d, h] = M({}), $ = `${Se()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, T = $, [A, E] = M(1), I = (w) => {
|
|
5468
5467
|
if (!a || !a.configuration)
|
|
5469
|
-
return
|
|
5470
|
-
const
|
|
5471
|
-
return a.configuration.forEach((
|
|
5472
|
-
if (
|
|
5473
|
-
const F = (N[
|
|
5474
|
-
const S = { id:
|
|
5475
|
-
return
|
|
5468
|
+
return w;
|
|
5469
|
+
const z = {}, N = w?.configuration || {};
|
|
5470
|
+
return a.configuration.forEach((x) => {
|
|
5471
|
+
if (x.key && x.type === "datatable") {
|
|
5472
|
+
const F = (N[x.key] || []).map((L, U) => {
|
|
5473
|
+
const S = { id: L.id || 0 };
|
|
5474
|
+
return x.fields && x.fields.forEach((O) => {
|
|
5476
5475
|
if (O.fieldtype === "audience") {
|
|
5477
5476
|
let D = { users: [], groups: [], roles: [] };
|
|
5478
|
-
|
|
5479
|
-
users:
|
|
5480
|
-
groups:
|
|
5481
|
-
roles:
|
|
5477
|
+
L[O.key] && (Array.isArray(L[O.key]) ? D = { users: [], groups: [], roles: [] } : typeof L[O.key] == "object" && (D = {
|
|
5478
|
+
users: L[O.key].users || [],
|
|
5479
|
+
groups: L[O.key].groups || [],
|
|
5480
|
+
roles: L[O.key].roles || []
|
|
5482
5481
|
})), S[O.key] = D;
|
|
5483
5482
|
} else
|
|
5484
|
-
S[O.key] =
|
|
5483
|
+
S[O.key] = L[O.key] || O.default || "";
|
|
5485
5484
|
}), S;
|
|
5486
5485
|
});
|
|
5487
5486
|
if (F.length === 0) {
|
|
5488
|
-
const
|
|
5489
|
-
|
|
5490
|
-
U.fieldtype === "audience" ?
|
|
5491
|
-
}), F.push(
|
|
5487
|
+
const L = { id: 0 };
|
|
5488
|
+
x.fields && x.fields.forEach((U) => {
|
|
5489
|
+
U.fieldtype === "audience" ? L[U.key] = { users: [], groups: [], roles: [] } : L[U.key] = U.default || "";
|
|
5490
|
+
}), F.push(L);
|
|
5492
5491
|
}
|
|
5493
|
-
|
|
5494
|
-
} else
|
|
5495
|
-
}),
|
|
5492
|
+
z[x.key] = F;
|
|
5493
|
+
} else x.key && (z[x.key] = N[x.key] || {});
|
|
5494
|
+
}), z;
|
|
5496
5495
|
}, j = () => {
|
|
5497
5496
|
if (a && a.configuration) {
|
|
5498
|
-
const
|
|
5499
|
-
a.configuration.forEach((
|
|
5500
|
-
if (
|
|
5501
|
-
if (
|
|
5497
|
+
const w = {};
|
|
5498
|
+
a.configuration.forEach((z) => {
|
|
5499
|
+
if (z.key)
|
|
5500
|
+
if (z.type === "datatable") {
|
|
5502
5501
|
const N = { id: 0 };
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
}),
|
|
5506
|
-
} else if (
|
|
5502
|
+
z.fields && z.fields.forEach((x) => {
|
|
5503
|
+
x.fieldtype === "audience" ? N[x.key] = { users: [], groups: [], roles: [] } : N[x.key] = x.default || "";
|
|
5504
|
+
}), w[z.key] = [N];
|
|
5505
|
+
} else if (z.type === "section") {
|
|
5507
5506
|
const N = {};
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
}),
|
|
5507
|
+
z.fields && Array.isArray(z.fields) && z.fields.forEach((x) => {
|
|
5508
|
+
x.key && (N[x.key] = x.default || "");
|
|
5509
|
+
}), w[z.key] = N;
|
|
5511
5510
|
} else
|
|
5512
|
-
|
|
5513
|
-
}), p(
|
|
5511
|
+
w[z.key] = {};
|
|
5512
|
+
}), p(w);
|
|
5514
5513
|
}
|
|
5515
5514
|
};
|
|
5516
5515
|
Z(() => {
|
|
@@ -5518,120 +5517,120 @@ function Ss({
|
|
|
5518
5517
|
f(!1);
|
|
5519
5518
|
return;
|
|
5520
5519
|
}
|
|
5521
|
-
const
|
|
5520
|
+
const w = async () => {
|
|
5522
5521
|
try {
|
|
5523
5522
|
f(!0);
|
|
5524
|
-
let
|
|
5525
|
-
if (
|
|
5526
|
-
const N = I(
|
|
5523
|
+
let z = await Ve($);
|
|
5524
|
+
if (z) {
|
|
5525
|
+
const N = I(z);
|
|
5527
5526
|
p(N);
|
|
5528
5527
|
} else
|
|
5529
5528
|
j();
|
|
5530
|
-
} catch (
|
|
5531
|
-
console.error("Error fetching configuration:",
|
|
5529
|
+
} catch (z) {
|
|
5530
|
+
console.error("Error fetching configuration:", z);
|
|
5532
5531
|
let N = "Failed to load configuration";
|
|
5533
|
-
if (
|
|
5534
|
-
const
|
|
5535
|
-
|
|
5536
|
-
} else
|
|
5532
|
+
if (z.response) {
|
|
5533
|
+
const x = z.response.status, k = z.response.data?.message || z.response.data?.error;
|
|
5534
|
+
x === 400 ? N = k || "Invalid request. Please check the application ID." : x === 401 ? N = "You are not authorized to access this configuration." : x === 403 ? N = "Access denied. You don't have permission to view this configuration." : x === 404 ? N = "Configuration not found. It may not exist yet or the application ID is incorrect." : x >= 500 ? N = k || "Server error. Please try again later." : N = k || `Failed to load configuration (Error ${x})`;
|
|
5535
|
+
} else z.request ? N = "Network error. Please check your connection and try again." : N = z.message || "An unexpected error occurred while loading configuration.";
|
|
5537
5536
|
De.error(N), j();
|
|
5538
5537
|
} finally {
|
|
5539
5538
|
f(!1);
|
|
5540
5539
|
}
|
|
5541
5540
|
};
|
|
5542
|
-
a && (o(a), t ?
|
|
5541
|
+
a && (o(a), t ? w() : j());
|
|
5543
5542
|
}, [a, A, t, s]);
|
|
5544
|
-
const
|
|
5543
|
+
const _ = (w, z) => {
|
|
5545
5544
|
p((N) => ({
|
|
5546
5545
|
...N,
|
|
5547
|
-
[
|
|
5546
|
+
[w]: z
|
|
5548
5547
|
})), h((N) => {
|
|
5549
|
-
const
|
|
5550
|
-
return
|
|
5548
|
+
const x = { ...N };
|
|
5549
|
+
return x[w] && delete x[w], x;
|
|
5551
5550
|
});
|
|
5552
5551
|
}, G = () => {
|
|
5553
|
-
const
|
|
5554
|
-
return !m || !u || m.configuration.forEach((
|
|
5555
|
-
if (
|
|
5556
|
-
|
|
5552
|
+
const w = {};
|
|
5553
|
+
return !m || !u || m.configuration.forEach((z) => {
|
|
5554
|
+
if (z.type === "section")
|
|
5555
|
+
z.fields.forEach((N) => {
|
|
5557
5556
|
if (N.required) {
|
|
5558
|
-
const
|
|
5559
|
-
(!
|
|
5557
|
+
const x = u[z.key]?.[N.key];
|
|
5558
|
+
(!x || typeof x == "string" && x.trim() === "") && (w[z.key] || (w[z.key] = {}), w[z.key][N.key] = `${N.label} is required`);
|
|
5560
5559
|
}
|
|
5561
5560
|
});
|
|
5562
|
-
else if (
|
|
5563
|
-
const N = u[
|
|
5564
|
-
Array.isArray(N) && N.forEach((
|
|
5565
|
-
|
|
5561
|
+
else if (z.type === "datatable") {
|
|
5562
|
+
const N = u[z.key];
|
|
5563
|
+
Array.isArray(N) && N.forEach((x, k) => {
|
|
5564
|
+
z.fields.forEach((F) => {
|
|
5566
5565
|
if (F.required) {
|
|
5567
|
-
const
|
|
5568
|
-
(!
|
|
5566
|
+
const L = x[F.key];
|
|
5567
|
+
(!L || typeof L == "string" && L.trim() === "") && (w[z.key] || (w[z.key] = {}), w[z.key][k] || (w[z.key][k] = {}), w[z.key][k][F.key] = `${F.label} is required`);
|
|
5569
5568
|
}
|
|
5570
5569
|
});
|
|
5571
5570
|
});
|
|
5572
5571
|
}
|
|
5573
|
-
}),
|
|
5574
|
-
}, q = (
|
|
5575
|
-
const
|
|
5576
|
-
if (h(
|
|
5572
|
+
}), w;
|
|
5573
|
+
}, q = (w) => Object.keys(w).length > 0, C = () => {
|
|
5574
|
+
const w = G();
|
|
5575
|
+
if (h(w), q(w)) {
|
|
5577
5576
|
let N = [];
|
|
5578
|
-
Object.keys(
|
|
5579
|
-
typeof x
|
|
5580
|
-
typeof x
|
|
5581
|
-
N.push(`${
|
|
5582
|
-
}) : N.push(`${
|
|
5577
|
+
Object.keys(w).forEach((x) => {
|
|
5578
|
+
typeof w[x] == "object" && Object.keys(w[x]).forEach((k) => {
|
|
5579
|
+
typeof w[x][k] == "object" ? Object.keys(w[x][k]).forEach((F) => {
|
|
5580
|
+
N.push(`${x} row ${parseInt(k) + 1}: ${w[x][k][F]}`);
|
|
5581
|
+
}) : N.push(`${x}: ${w[x][k]}`);
|
|
5583
5582
|
});
|
|
5584
5583
|
});
|
|
5585
5584
|
return;
|
|
5586
5585
|
}
|
|
5587
5586
|
(async () => {
|
|
5588
5587
|
try {
|
|
5589
|
-
|
|
5588
|
+
y(!0);
|
|
5590
5589
|
const N = {};
|
|
5591
5590
|
u && Object.keys(u).forEach((k) => {
|
|
5592
5591
|
const F = a?.configuration?.find(
|
|
5593
|
-
(
|
|
5592
|
+
(L) => L.key === k && L.type === "datatable"
|
|
5594
5593
|
);
|
|
5595
|
-
F && Array.isArray(u[k]) ? N[k] = u[k].map((
|
|
5596
|
-
const U = { id:
|
|
5594
|
+
F && Array.isArray(u[k]) ? N[k] = u[k].map((L) => {
|
|
5595
|
+
const U = { id: L.id || 0 };
|
|
5597
5596
|
return F.fields && F.fields.forEach((S) => {
|
|
5598
5597
|
if (S.fieldtype === "audience") {
|
|
5599
5598
|
let O = { users: [], groups: [], roles: [] };
|
|
5600
|
-
|
|
5601
|
-
users:
|
|
5602
|
-
groups:
|
|
5603
|
-
roles:
|
|
5599
|
+
L[S.key] && typeof L[S.key] == "object" && !Array.isArray(L[S.key]) && (O = {
|
|
5600
|
+
users: L[S.key].users || [],
|
|
5601
|
+
groups: L[S.key].groups || [],
|
|
5602
|
+
roles: L[S.key].roles || []
|
|
5604
5603
|
}), U[S.key] = O;
|
|
5605
5604
|
} else
|
|
5606
|
-
U[S.key] =
|
|
5605
|
+
U[S.key] = L[S.key] || "";
|
|
5607
5606
|
}), U;
|
|
5608
5607
|
}) : N[k] = u[k];
|
|
5609
5608
|
});
|
|
5610
|
-
let
|
|
5611
|
-
if (console.log(),
|
|
5609
|
+
let x = await _e(T, N);
|
|
5610
|
+
if (console.log(), x && x.status != "fail") {
|
|
5612
5611
|
h({});
|
|
5613
|
-
const k =
|
|
5612
|
+
const k = x.message || "Configuration has been saved successfully";
|
|
5614
5613
|
De.success(k), l && typeof l == "function" && l(u);
|
|
5615
5614
|
} else
|
|
5616
|
-
throw De.error(
|
|
5615
|
+
throw De.error(x?.message || "Failed to save configuration"), new Error("No response received from server");
|
|
5617
5616
|
} catch (N) {
|
|
5618
5617
|
console.error("Error saving configuration:", N), De.error(N?.message || "Failed to save configuration");
|
|
5619
5618
|
} finally {
|
|
5620
|
-
|
|
5619
|
+
y(!1);
|
|
5621
5620
|
}
|
|
5622
5621
|
})();
|
|
5623
|
-
},
|
|
5622
|
+
}, g = () => {
|
|
5624
5623
|
if (i) {
|
|
5625
5624
|
i();
|
|
5626
5625
|
return;
|
|
5627
5626
|
}
|
|
5628
5627
|
d && Object.keys(d).length > 0 && !window.confirm(
|
|
5629
5628
|
"You have validation errors that will be lost. Are you sure you want to cancel?"
|
|
5630
|
-
) || (h({}), p(null), E((
|
|
5629
|
+
) || (h({}), p(null), E((z) => z + 1), De.info("Configuration changes cancelled"));
|
|
5631
5630
|
};
|
|
5632
5631
|
if (!m?.configuration && !a?.configuration)
|
|
5633
5632
|
return /* @__PURE__ */ e("div", { className: "min-h-screen flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "text-gray-500", children: "No configuration available" }) });
|
|
5634
|
-
const
|
|
5633
|
+
const v = a?.configuration || m?.configuration;
|
|
5635
5634
|
return Z(() => {
|
|
5636
5635
|
s && a ? (!u || Object.keys(u).length === 0) && j() : s && !a && j();
|
|
5637
5636
|
}, [s, a]), /* @__PURE__ */ n("div", { children: [
|
|
@@ -5642,18 +5641,18 @@ function Ss({
|
|
|
5642
5641
|
style: { padding: "0px 20px 0px 0px" },
|
|
5643
5642
|
children: [
|
|
5644
5643
|
b && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(xa, { size: "large" }) }),
|
|
5645
|
-
!b &&
|
|
5646
|
-
const N = zs(
|
|
5644
|
+
!b && v?.map((w, z) => {
|
|
5645
|
+
const N = zs(w.type);
|
|
5647
5646
|
if (N && N !== "UnknownType")
|
|
5648
5647
|
return /* @__PURE__ */ e(
|
|
5649
5648
|
N,
|
|
5650
5649
|
{
|
|
5651
|
-
item:
|
|
5650
|
+
item: w,
|
|
5652
5651
|
data: u,
|
|
5653
|
-
updateHandler:
|
|
5652
|
+
updateHandler: _,
|
|
5654
5653
|
validationErrors: d
|
|
5655
5654
|
},
|
|
5656
|
-
|
|
5655
|
+
z
|
|
5657
5656
|
);
|
|
5658
5657
|
})
|
|
5659
5658
|
]
|
|
@@ -5664,7 +5663,7 @@ function Ss({
|
|
|
5664
5663
|
ee,
|
|
5665
5664
|
{
|
|
5666
5665
|
category: "secondary",
|
|
5667
|
-
onClick:
|
|
5666
|
+
onClick: g,
|
|
5668
5667
|
label: "Cancel",
|
|
5669
5668
|
disabled: r
|
|
5670
5669
|
}
|
|
@@ -5673,7 +5672,7 @@ function Ss({
|
|
|
5673
5672
|
ee,
|
|
5674
5673
|
{
|
|
5675
5674
|
category: "primary",
|
|
5676
|
-
onClick:
|
|
5675
|
+
onClick: C,
|
|
5677
5676
|
disabled: r,
|
|
5678
5677
|
label: r ? "Saving..." : "Apply",
|
|
5679
5678
|
type: "submit"
|
|
@@ -5687,32 +5686,32 @@ const Ql = ({
|
|
|
5687
5686
|
appid: a = "Configuration-Page",
|
|
5688
5687
|
disableApi: s = !1
|
|
5689
5688
|
}) => {
|
|
5690
|
-
const [i, l] =
|
|
5691
|
-
pageHeader:
|
|
5692
|
-
appletHeader:
|
|
5693
|
-
breadcrumb:
|
|
5694
|
-
overview:
|
|
5695
|
-
configuration:
|
|
5696
|
-
} = t,
|
|
5697
|
-
if (
|
|
5698
|
-
const
|
|
5699
|
-
if (
|
|
5700
|
-
const
|
|
5701
|
-
if (
|
|
5702
|
-
...
|
|
5689
|
+
const [i, l] = M(0), [m, o] = M(!1), {
|
|
5690
|
+
pageHeader: u = {},
|
|
5691
|
+
appletHeader: p = {},
|
|
5692
|
+
breadcrumb: b = [],
|
|
5693
|
+
overview: f = {},
|
|
5694
|
+
configuration: r = []
|
|
5695
|
+
} = t, y = r.map((C) => {
|
|
5696
|
+
if (C.type === "section" && C.fields) {
|
|
5697
|
+
const g = [...C.fields], v = g.findIndex((w) => w.key === "appkey");
|
|
5698
|
+
if (v !== -1) {
|
|
5699
|
+
const w = g[v];
|
|
5700
|
+
if (g[v] = {
|
|
5701
|
+
...w,
|
|
5703
5702
|
default: a,
|
|
5704
5703
|
value: a,
|
|
5705
5704
|
disabled: !0,
|
|
5706
5705
|
placeholder: a
|
|
5707
|
-
},
|
|
5708
|
-
const
|
|
5709
|
-
|
|
5710
|
-
...x
|
|
5711
|
-
default: a,
|
|
5712
|
-
|
|
5706
|
+
}, g.some((N) => N.key === "displayname")) {
|
|
5707
|
+
const N = g.findIndex((k) => k.key === "displayname"), x = g[N] || {};
|
|
5708
|
+
g[N] = {
|
|
5709
|
+
...x,
|
|
5710
|
+
default: x.default || x.value || a,
|
|
5711
|
+
placeholder: x.placeholder || "Enter display name"
|
|
5713
5712
|
};
|
|
5714
5713
|
} else {
|
|
5715
|
-
const
|
|
5714
|
+
const N = {
|
|
5716
5715
|
key: "displayname",
|
|
5717
5716
|
label: "Display Name",
|
|
5718
5717
|
fieldtype: "text",
|
|
@@ -5721,52 +5720,46 @@ const Ql = ({
|
|
|
5721
5720
|
placeholder: "Enter display name",
|
|
5722
5721
|
required: !1
|
|
5723
5722
|
};
|
|
5724
|
-
|
|
5723
|
+
g.splice(v + 1, 0, N);
|
|
5725
5724
|
}
|
|
5726
5725
|
}
|
|
5727
5726
|
return {
|
|
5728
|
-
...
|
|
5729
|
-
fields:
|
|
5727
|
+
...C,
|
|
5728
|
+
fields: g
|
|
5730
5729
|
};
|
|
5731
5730
|
}
|
|
5732
|
-
return
|
|
5733
|
-
}),
|
|
5731
|
+
return C;
|
|
5732
|
+
}), d = {
|
|
5734
5733
|
heading: "App Details",
|
|
5735
5734
|
subHeading: "View app details and customize configurations to align with institutional requirements.",
|
|
5736
5735
|
isLeftArrow: !0,
|
|
5737
5736
|
onBackClick: () => window.history.back(),
|
|
5738
|
-
...
|
|
5739
|
-
},
|
|
5740
|
-
label:
|
|
5741
|
-
href:
|
|
5742
|
-
})),
|
|
5737
|
+
...u
|
|
5738
|
+
}, h = b.map((C) => ({
|
|
5739
|
+
label: C.text,
|
|
5740
|
+
href: C.href || "#"
|
|
5741
|
+
})), $ = ae(() => {
|
|
5743
5742
|
console.log("handleCancelRequest called - showing modal"), o(!0);
|
|
5744
|
-
}, []),
|
|
5745
|
-
o(!1),
|
|
5746
|
-
}, []),
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
p
|
|
5757
|
-
},
|
|
5758
|
-
const j = ae((g) => {
|
|
5759
|
-
console.log("Config saved with data:", g), Object.keys(g).forEach((x) => {
|
|
5760
|
-
const C = g[x];
|
|
5761
|
-
console.log(`Checking section ${x}:`, C), C && C.displayname && (console.log("Found displayname:", C.displayname), p(C.displayname));
|
|
5762
|
-
});
|
|
5763
|
-
}, []), V = {
|
|
5743
|
+
}, []), T = ae((C) => {
|
|
5744
|
+
o(!1), C.primary ? (console.log("User confirmed cancel - navigating back"), window.history.back()) : console.log("User cancelled the cancel action - modal closed, data preserved");
|
|
5745
|
+
}, []), A = ae((C) => {
|
|
5746
|
+
console.log("Configuration changed:", C);
|
|
5747
|
+
}, []), E = (() => {
|
|
5748
|
+
if (Array.isArray(r)) {
|
|
5749
|
+
for (const C of r)
|
|
5750
|
+
if (C && C.fields) {
|
|
5751
|
+
const g = C.fields.find((v) => v && v.key === "displayname");
|
|
5752
|
+
if (g) return g.default ?? g.value ?? a;
|
|
5753
|
+
}
|
|
5754
|
+
}
|
|
5755
|
+
return p.heading || a;
|
|
5756
|
+
})(), I = {
|
|
5764
5757
|
subHeading: "Application configuration and details",
|
|
5765
5758
|
tags: [],
|
|
5766
|
-
...
|
|
5767
|
-
heading:
|
|
5768
|
-
//
|
|
5769
|
-
},
|
|
5759
|
+
...p,
|
|
5760
|
+
heading: E
|
|
5761
|
+
// Use resolvedDisplayName only
|
|
5762
|
+
}, j = {
|
|
5770
5763
|
about: "This application provides comprehensive functionality for your organization.",
|
|
5771
5764
|
images: {
|
|
5772
5765
|
desktop: "https://via.placeholder.com/600x400?text=Desktop+View",
|
|
@@ -5783,25 +5776,25 @@ const Ql = ({
|
|
|
5783
5776
|
description: "Description of feature 2"
|
|
5784
5777
|
}
|
|
5785
5778
|
],
|
|
5786
|
-
...
|
|
5787
|
-
},
|
|
5788
|
-
{ label: "Overview", content:
|
|
5789
|
-
{ label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: { configuration:
|
|
5779
|
+
...f
|
|
5780
|
+
}, _ = [
|
|
5781
|
+
{ label: "Overview", content: q(j) },
|
|
5782
|
+
{ label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: { configuration: y }, disableApi: s, onCancel: $, onSave: A }) }
|
|
5790
5783
|
];
|
|
5791
|
-
function
|
|
5792
|
-
return
|
|
5784
|
+
function G(C) {
|
|
5785
|
+
return C ? C.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: C } }) : C : "📱";
|
|
5793
5786
|
}
|
|
5794
|
-
function
|
|
5787
|
+
function q(C) {
|
|
5795
5788
|
return /* @__PURE__ */ n("div", { className: "bg-white rounded-2xl p-1", children: [
|
|
5796
5789
|
/* @__PURE__ */ n("section", { className: "mb-8", children: [
|
|
5797
5790
|
/* @__PURE__ */ e("h2", { className: "text-xl font-semibold mb-2", children: "About" }),
|
|
5798
|
-
/* @__PURE__ */ e("p", { className: "text-gray-700 text-base", children:
|
|
5791
|
+
/* @__PURE__ */ e("p", { className: "text-gray-700 text-base", children: C.about })
|
|
5799
5792
|
] }),
|
|
5800
5793
|
/* @__PURE__ */ n("section", { className: "flex flex-row gap-6 justify-center items-center mb-8", children: [
|
|
5801
5794
|
/* @__PURE__ */ e(
|
|
5802
5795
|
"img",
|
|
5803
5796
|
{
|
|
5804
|
-
src:
|
|
5797
|
+
src: C.images.desktop,
|
|
5805
5798
|
alt: "Desktop View",
|
|
5806
5799
|
className: "rounded-xl border border-gray-200 w-[340px] h-[220px] object-cover"
|
|
5807
5800
|
}
|
|
@@ -5809,7 +5802,7 @@ const Ql = ({
|
|
|
5809
5802
|
/* @__PURE__ */ e(
|
|
5810
5803
|
"img",
|
|
5811
5804
|
{
|
|
5812
|
-
src:
|
|
5805
|
+
src: C.images.mobile1,
|
|
5813
5806
|
alt: "Mobile View 1",
|
|
5814
5807
|
className: "rounded-2xl border border-gray-200 w-[120px] h-[220px] object-cover"
|
|
5815
5808
|
}
|
|
@@ -5817,7 +5810,7 @@ const Ql = ({
|
|
|
5817
5810
|
/* @__PURE__ */ e(
|
|
5818
5811
|
"img",
|
|
5819
5812
|
{
|
|
5820
|
-
src:
|
|
5813
|
+
src: C.images.mobile2,
|
|
5821
5814
|
alt: "Mobile View 2",
|
|
5822
5815
|
className: "rounded-2xl border border-gray-200 w-[120px] h-[220px] object-cover"
|
|
5823
5816
|
}
|
|
@@ -5825,11 +5818,11 @@ const Ql = ({
|
|
|
5825
5818
|
] }),
|
|
5826
5819
|
/* @__PURE__ */ n("section", { children: [
|
|
5827
5820
|
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold mb-4", children: "Key Features" }),
|
|
5828
|
-
/* @__PURE__ */ e("ul", { className: "space-y-3", children:
|
|
5829
|
-
/* @__PURE__ */ e("span", { className: "font-semibold", children:
|
|
5821
|
+
/* @__PURE__ */ e("ul", { className: "space-y-3", children: C.features.map((g, v) => /* @__PURE__ */ n("li", { children: [
|
|
5822
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: g.title }),
|
|
5830
5823
|
/* @__PURE__ */ e("br", {}),
|
|
5831
|
-
/* @__PURE__ */ e("span", { className: "text-gray-700", children:
|
|
5832
|
-
] },
|
|
5824
|
+
/* @__PURE__ */ e("span", { className: "text-gray-700", children: g.description })
|
|
5825
|
+
] }, v)) })
|
|
5833
5826
|
] })
|
|
5834
5827
|
] });
|
|
5835
5828
|
}
|
|
@@ -5837,45 +5830,45 @@ const Ql = ({
|
|
|
5837
5830
|
/* @__PURE__ */ e(
|
|
5838
5831
|
Vn,
|
|
5839
5832
|
{
|
|
5840
|
-
heading:
|
|
5841
|
-
subHeading:
|
|
5842
|
-
breadcrumbItems:
|
|
5843
|
-
isLeftArrow:
|
|
5844
|
-
onBackClick:
|
|
5833
|
+
heading: d.heading,
|
|
5834
|
+
subHeading: h.length > 0 ? void 0 : d.subHeading,
|
|
5835
|
+
breadcrumbItems: h,
|
|
5836
|
+
isLeftArrow: d.isLeftArrow,
|
|
5837
|
+
onBackClick: d.onBackClick
|
|
5845
5838
|
}
|
|
5846
5839
|
),
|
|
5847
5840
|
/* @__PURE__ */ n("div", { className: "bg-[#ffffff] border border-[#eef2f6] rounded-[12px] px-6 py-5 flex gap-4 items-start mb-4 shadow-sm", children: [
|
|
5848
|
-
/* @__PURE__ */ e("div", { className: "icon w-[72px] h-[72px] rounded-full flex items-center justify-center bg-[#F5F5F6] text-[#1C274C] font-bold text-[18px]", children:
|
|
5841
|
+
/* @__PURE__ */ e("div", { className: "icon w-[72px] h-[72px] rounded-full flex items-center justify-center bg-[#F5F5F6] text-[#1C274C] font-bold text-[18px]", children: G(I.icon) }),
|
|
5849
5842
|
/* @__PURE__ */ n("div", { className: "flex flex-col min-w-0", children: [
|
|
5850
|
-
/* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children:
|
|
5851
|
-
/* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children:
|
|
5852
|
-
/* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children:
|
|
5843
|
+
/* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: I.heading }),
|
|
5844
|
+
/* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: I.subHeading }),
|
|
5845
|
+
/* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: I.tags && I.tags.map((C, g) => /* @__PURE__ */ e(
|
|
5853
5846
|
"span",
|
|
5854
5847
|
{
|
|
5855
5848
|
className: "pill inline-block px-[10px] py-[6px] rounded-[14px] text-[11px] border border-[#e6e9ee] text-[#767676] font-semibold mt-1",
|
|
5856
|
-
children:
|
|
5849
|
+
children: C
|
|
5857
5850
|
},
|
|
5858
|
-
|
|
5851
|
+
g
|
|
5859
5852
|
)) })
|
|
5860
5853
|
] })
|
|
5861
5854
|
] }),
|
|
5862
5855
|
/* @__PURE__ */ n("div", { className: "bg-white border border-gray-300 rounded-2xl w-full mt-5 ", children: [
|
|
5863
|
-
/* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children:
|
|
5856
|
+
/* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: _.map((C, g) => /* @__PURE__ */ e(
|
|
5864
5857
|
"button",
|
|
5865
5858
|
{
|
|
5866
|
-
onClick: () => l(
|
|
5867
|
-
className: `${i ===
|
|
5868
|
-
children:
|
|
5859
|
+
onClick: () => l(g),
|
|
5860
|
+
className: `${i === g ? "border-black text-black" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"} whitespace-nowrap py-3 px-6 border-b-2 font-medium text-sm transition-colors duration-200`,
|
|
5861
|
+
children: C.label
|
|
5869
5862
|
},
|
|
5870
|
-
|
|
5863
|
+
g
|
|
5871
5864
|
)) }) }),
|
|
5872
|
-
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children:
|
|
5865
|
+
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: _[i].content })
|
|
5873
5866
|
] }),
|
|
5874
5867
|
/* @__PURE__ */ e(
|
|
5875
5868
|
Pn,
|
|
5876
5869
|
{
|
|
5877
5870
|
isOpen: m,
|
|
5878
|
-
onClose:
|
|
5871
|
+
onClose: T,
|
|
5879
5872
|
variant: "warning",
|
|
5880
5873
|
title: "Are you sure you want to cancel?",
|
|
5881
5874
|
primaryButtonText: "Proceed",
|
|
@@ -5927,12 +5920,12 @@ const Kl = ({
|
|
|
5927
5920
|
showColumnChooser: b = !0,
|
|
5928
5921
|
showFilter: f = !1,
|
|
5929
5922
|
showPrint: r = !1,
|
|
5930
|
-
showExcel:
|
|
5923
|
+
showExcel: y = !1,
|
|
5931
5924
|
showPdf: d = !1,
|
|
5932
5925
|
showRefresh: h = !1,
|
|
5933
|
-
showAdd:
|
|
5926
|
+
showAdd: $ = !1,
|
|
5934
5927
|
// Additional props
|
|
5935
|
-
searchPlaceholder:
|
|
5928
|
+
searchPlaceholder: T = "Search...",
|
|
5936
5929
|
handleRefreshClick: A = () => {
|
|
5937
5930
|
},
|
|
5938
5931
|
handleSearchChange: E = () => {
|
|
@@ -5941,19 +5934,19 @@ const Kl = ({
|
|
|
5941
5934
|
excelFileName: I,
|
|
5942
5935
|
pdfFileName: j
|
|
5943
5936
|
}) => {
|
|
5944
|
-
const
|
|
5945
|
-
(
|
|
5946
|
-
const k =
|
|
5937
|
+
const _ = () => l?.current || i?.current, [G, q] = se.useState(""), C = (t || "export").toString().trim() || "export", g = `${I || C}.xlsx`, v = `${j || C}.pdf`, w = (x, k, F) => Math.max(k, Math.min(x, F)), z = ae(
|
|
5938
|
+
(x) => {
|
|
5939
|
+
const k = _();
|
|
5947
5940
|
if (console.log("openColumnChooserNear", k), !!k?.openColumnChooser) {
|
|
5948
|
-
if (typeof window > "u" || !
|
|
5941
|
+
if (typeof window > "u" || !x?.currentTarget) {
|
|
5949
5942
|
k.openColumnChooser();
|
|
5950
5943
|
return;
|
|
5951
5944
|
}
|
|
5952
5945
|
try {
|
|
5953
|
-
const F =
|
|
5954
|
-
let S =
|
|
5946
|
+
const F = x.currentTarget.getBoundingClientRect(), L = F.left + window.scrollX, U = F.bottom + window.scrollY;
|
|
5947
|
+
let S = L - 120, O = U - 120;
|
|
5955
5948
|
const D = window.innerWidth, P = window.innerHeight;
|
|
5956
|
-
S =
|
|
5949
|
+
S = w(S, window.scrollX + 8, window.scrollX + D - 340), O = w(O, window.scrollY, window.scrollY + P - 120), console.log("openColumnChooserNear", S, O), k.openColumnChooser(S, O);
|
|
5957
5950
|
} catch (F) {
|
|
5958
5951
|
console.log("coloumn choose error", F);
|
|
5959
5952
|
}
|
|
@@ -5962,28 +5955,28 @@ const Kl = ({
|
|
|
5962
5955
|
[]
|
|
5963
5956
|
// no external deps; reads ref at call time
|
|
5964
5957
|
), N = ae(
|
|
5965
|
-
(
|
|
5966
|
-
const F =
|
|
5958
|
+
(x, k) => {
|
|
5959
|
+
const F = _();
|
|
5967
5960
|
if (F)
|
|
5968
|
-
switch (
|
|
5961
|
+
switch (x) {
|
|
5969
5962
|
case "ColumnChooser":
|
|
5970
|
-
b && (console.log("openColumnChooser", k), k ?
|
|
5963
|
+
b && (console.log("openColumnChooser", k), k ? z(k) : F.openColumnChooser?.()), console.log("openColumnChooser out", k);
|
|
5971
5964
|
break;
|
|
5972
5965
|
case "Print":
|
|
5973
5966
|
r && F.print?.();
|
|
5974
5967
|
break;
|
|
5975
5968
|
case "Excel":
|
|
5976
|
-
|
|
5969
|
+
y && F.excelExport?.({ fileName: g });
|
|
5977
5970
|
break;
|
|
5978
5971
|
case "Pdf":
|
|
5979
|
-
d && F.pdfExport?.({ fileName:
|
|
5972
|
+
d && F.pdfExport?.({ fileName: v });
|
|
5980
5973
|
break;
|
|
5981
5974
|
case "Refresh":
|
|
5982
5975
|
h && A();
|
|
5983
5976
|
break;
|
|
5984
5977
|
}
|
|
5985
5978
|
},
|
|
5986
|
-
[b, r,
|
|
5979
|
+
[b, r, y, d, h, g, v, A, z]
|
|
5987
5980
|
);
|
|
5988
5981
|
return /* @__PURE__ */ n("div", { className: "flex items-center flex-wrap justify-between w-full px-4 py-2 bg-white border border-gray-200 rounded-t-2xl mb-0", children: [
|
|
5989
5982
|
/* @__PURE__ */ n("div", { className: "flex flex-col", children: [
|
|
@@ -5998,10 +5991,10 @@ const Kl = ({
|
|
|
5998
5991
|
p && /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
|
|
5999
5992
|
be,
|
|
6000
5993
|
{
|
|
6001
|
-
placeholder:
|
|
5994
|
+
placeholder: T,
|
|
6002
5995
|
value: G,
|
|
6003
|
-
onDebouncedChange: (
|
|
6004
|
-
q(
|
|
5996
|
+
onDebouncedChange: (x) => {
|
|
5997
|
+
q(x), E(x);
|
|
6005
5998
|
}
|
|
6006
5999
|
}
|
|
6007
6000
|
) }),
|
|
@@ -6011,7 +6004,7 @@ const Kl = ({
|
|
|
6011
6004
|
ee,
|
|
6012
6005
|
{
|
|
6013
6006
|
icon: Nr,
|
|
6014
|
-
onClick: (
|
|
6007
|
+
onClick: (x) => N("ColumnChooser", x),
|
|
6015
6008
|
size: "small",
|
|
6016
6009
|
ariaLabel: "Column Chooser",
|
|
6017
6010
|
category: "secondary",
|
|
@@ -6040,7 +6033,7 @@ const Kl = ({
|
|
|
6040
6033
|
title: "Print Grid"
|
|
6041
6034
|
}
|
|
6042
6035
|
),
|
|
6043
|
-
|
|
6036
|
+
y && /* @__PURE__ */ e(
|
|
6044
6037
|
ee,
|
|
6045
6038
|
{
|
|
6046
6039
|
icon: zr,
|
|
@@ -6048,7 +6041,7 @@ const Kl = ({
|
|
|
6048
6041
|
ariaLabel: "Excel Download",
|
|
6049
6042
|
size: "small",
|
|
6050
6043
|
category: "secondary",
|
|
6051
|
-
title: `Export Excel (${
|
|
6044
|
+
title: `Export Excel (${g})`
|
|
6052
6045
|
}
|
|
6053
6046
|
),
|
|
6054
6047
|
d && /* @__PURE__ */ e(
|
|
@@ -6059,7 +6052,7 @@ const Kl = ({
|
|
|
6059
6052
|
ariaLabel: "PDF Download",
|
|
6060
6053
|
size: "small",
|
|
6061
6054
|
category: "secondary",
|
|
6062
|
-
title: `Export PDF (${
|
|
6055
|
+
title: `Export PDF (${v})`
|
|
6063
6056
|
}
|
|
6064
6057
|
),
|
|
6065
6058
|
h && /* @__PURE__ */ e(
|
|
@@ -6074,7 +6067,7 @@ const Kl = ({
|
|
|
6074
6067
|
}
|
|
6075
6068
|
)
|
|
6076
6069
|
] }),
|
|
6077
|
-
|
|
6070
|
+
$ && m && /* @__PURE__ */ e(
|
|
6078
6071
|
ee,
|
|
6079
6072
|
{
|
|
6080
6073
|
label: u,
|
|
@@ -6104,28 +6097,28 @@ function ei(t) {
|
|
|
6104
6097
|
allowReordering: b = !0,
|
|
6105
6098
|
allowResizing: f = !0,
|
|
6106
6099
|
allowExcelExport: r = !1,
|
|
6107
|
-
allowPdfExport:
|
|
6100
|
+
allowPdfExport: y = !1,
|
|
6108
6101
|
showColumnChooser: d = !1,
|
|
6109
6102
|
enableSearchApi: h = !1,
|
|
6110
|
-
height:
|
|
6111
|
-
selectionSettings:
|
|
6103
|
+
height: $ = "600",
|
|
6104
|
+
selectionSettings: T = { type: "Multiple", mode: "Row" },
|
|
6112
6105
|
enableCheckbox: A = !1,
|
|
6113
6106
|
columns: E = [],
|
|
6114
6107
|
onGridStateChange: I,
|
|
6115
6108
|
onRowSelected: j,
|
|
6116
|
-
onRowDeselected:
|
|
6109
|
+
onRowDeselected: _,
|
|
6117
6110
|
onRowDoubleClick: G,
|
|
6118
6111
|
apiRef: q,
|
|
6119
|
-
gridProps:
|
|
6120
|
-
} = t,
|
|
6121
|
-
pageSettings:
|
|
6122
|
-
sortSettings:
|
|
6123
|
-
...
|
|
6124
|
-
} =
|
|
6112
|
+
gridProps: C = {}
|
|
6113
|
+
} = t, g = xe(null), {
|
|
6114
|
+
pageSettings: v,
|
|
6115
|
+
sortSettings: w,
|
|
6116
|
+
...z
|
|
6117
|
+
} = C || {}, [N, x] = se.useState(v?.page || 1), [k, F] = se.useState(w?.pageSize || 20), [L, U] = se.useState(w?.sortKey || "updatedDate"), [S, O] = se.useState(w?.direction || "Descending"), D = ue(() => {
|
|
6125
6118
|
const B = [cn];
|
|
6126
|
-
return o && B.push(dn), u && B.push(mn), p && B.push(un), h && B.push(hn), r && B.push(pn),
|
|
6127
|
-
}, [o, u, p, h, r,
|
|
6128
|
-
const B = () =>
|
|
6119
|
+
return o && B.push(dn), u && B.push(mn), p && B.push(un), h && B.push(hn), r && B.push(pn), y && B.push(gn), d && B.push(bn), f && B.push(fn), b && B.push(xn), B.push(yn), B;
|
|
6120
|
+
}, [o, u, p, h, r, y, d, f, b]), P = ue(() => {
|
|
6121
|
+
const B = () => g.current, re = (J, we) => {
|
|
6129
6122
|
!we && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${J} requested but related service/feature is disabled.`);
|
|
6130
6123
|
};
|
|
6131
6124
|
return {
|
|
@@ -6136,17 +6129,17 @@ function ei(t) {
|
|
|
6136
6129
|
selectRow: (J) => B()?.selectRow?.(J),
|
|
6137
6130
|
selectRows: (J) => B()?.selectRows?.(J),
|
|
6138
6131
|
search: (J) => {
|
|
6139
|
-
|
|
6132
|
+
re("search()", h), B()?.search?.(J);
|
|
6140
6133
|
},
|
|
6141
6134
|
print: () => B()?.print?.(),
|
|
6142
6135
|
excelExport: (J) => {
|
|
6143
|
-
|
|
6136
|
+
re("excelExport()", r), B()?.excelExport?.(J);
|
|
6144
6137
|
},
|
|
6145
6138
|
pdfExport: (J) => {
|
|
6146
|
-
|
|
6139
|
+
re("pdfExport()", y), B()?.pdfExport?.(J);
|
|
6147
6140
|
},
|
|
6148
6141
|
openColumnChooser: (J, we) => {
|
|
6149
|
-
|
|
6142
|
+
re("openColumnChooser()", d), B()?.columnChooserModule?.openColumnChooser?.(J, we);
|
|
6150
6143
|
}
|
|
6151
6144
|
};
|
|
6152
6145
|
}, []);
|
|
@@ -6155,14 +6148,14 @@ function ei(t) {
|
|
|
6155
6148
|
}, [q, P]), Z(() => () => {
|
|
6156
6149
|
q && (q.current = null);
|
|
6157
6150
|
}, []);
|
|
6158
|
-
const
|
|
6159
|
-
const
|
|
6160
|
-
return
|
|
6151
|
+
const V = (B) => {
|
|
6152
|
+
const re = String(B || "");
|
|
6153
|
+
return re === "Ascending" || re === "Descending" ? re : re.toLowerCase() === "ascending" ? "Ascending" : "Descending";
|
|
6161
6154
|
}, R = (B) => {
|
|
6162
|
-
const
|
|
6155
|
+
const re = g.current, J = B?.requestType, we = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Ie = B?.pageSize ?? re?.pageSettings?.pageSize ?? k, Ue = B?.currentPage ?? re?.pageSettings?.currentPage ?? l, st = B?.columnName && B?.direction ? [{ field: B.columnName, dir: V(B.direction) }] : (re?.sortSettings?.columns || []).map((Oe) => ({
|
|
6163
6156
|
field: Oe.field,
|
|
6164
|
-
dir:
|
|
6165
|
-
})), lt = B?.searchString ?? "", it = B?.columns ??
|
|
6157
|
+
dir: V(Oe.direction ?? Oe.dir)
|
|
6158
|
+
})), lt = B?.searchString ?? "", it = B?.columns ?? re?.filterSettings?.columns ?? [];
|
|
6166
6159
|
return {
|
|
6167
6160
|
reason: we,
|
|
6168
6161
|
page: { index: Ue, size: Ie, skip: (Ue - 1) * Ie, take: Ie },
|
|
@@ -6174,13 +6167,13 @@ function ei(t) {
|
|
|
6174
6167
|
};
|
|
6175
6168
|
}, Y = (B) => {
|
|
6176
6169
|
setTimeout(() => {
|
|
6177
|
-
|
|
6178
|
-
}, 1e3), B.requestType === "paging" && (
|
|
6170
|
+
g?.current?.hideSpinner();
|
|
6171
|
+
}, 1e3), B.requestType === "paging" && (x(B.currentPage), F(B.pageSize)), B.requestType === "sorting" && (U(B.columnName || "updatedDate"), O(B.direction === "Ascending" ? "ASC" : "DESC")), I && I(R(B), B);
|
|
6179
6172
|
}, W = (B) => {
|
|
6180
6173
|
typeof G == "function" && G(B?.rowData, B);
|
|
6181
6174
|
}, pe = () => {
|
|
6182
6175
|
const B = [];
|
|
6183
|
-
return A && B.push(/* @__PURE__ */ e(Dt, { type: "checkbox", width: "50" }, "__checkbox__")), E.forEach((
|
|
6176
|
+
return A && B.push(/* @__PURE__ */ e(Dt, { type: "checkbox", width: "50" }, "__checkbox__")), E.forEach((re, J) => {
|
|
6184
6177
|
const {
|
|
6185
6178
|
field: we,
|
|
6186
6179
|
headerText: Ie,
|
|
@@ -6198,7 +6191,7 @@ function ei(t) {
|
|
|
6198
6191
|
maxWidth: ja,
|
|
6199
6192
|
customAttributes: Va,
|
|
6200
6193
|
..._a
|
|
6201
|
-
} =
|
|
6194
|
+
} = re || {};
|
|
6202
6195
|
B.push(
|
|
6203
6196
|
/* @__PURE__ */ e(
|
|
6204
6197
|
Dt,
|
|
@@ -6229,12 +6222,12 @@ function ei(t) {
|
|
|
6229
6222
|
vn,
|
|
6230
6223
|
{
|
|
6231
6224
|
id: i,
|
|
6232
|
-
ref:
|
|
6225
|
+
ref: g,
|
|
6233
6226
|
dataSource: {
|
|
6234
6227
|
result: a,
|
|
6235
6228
|
count: s
|
|
6236
6229
|
},
|
|
6237
|
-
height:
|
|
6230
|
+
height: $,
|
|
6238
6231
|
allowPaging: m,
|
|
6239
6232
|
allowSorting: o,
|
|
6240
6233
|
allowFiltering: u,
|
|
@@ -6242,17 +6235,17 @@ function ei(t) {
|
|
|
6242
6235
|
allowReordering: b,
|
|
6243
6236
|
allowResizing: f,
|
|
6244
6237
|
showColumnChooser: d,
|
|
6245
|
-
selectionSettings:
|
|
6246
|
-
pageSettings: { pageSize: 10, pageSizes:
|
|
6247
|
-
sortSettings:
|
|
6248
|
-
columns: [{ field:
|
|
6238
|
+
selectionSettings: T,
|
|
6239
|
+
pageSettings: { pageSize: 10, pageSizes: v?.pageSizes ?? [20, 40, 60, 80, 100] },
|
|
6240
|
+
sortSettings: w ?? {
|
|
6241
|
+
columns: [{ field: L, direction: V(S) }],
|
|
6249
6242
|
allowUnsort: !1
|
|
6250
6243
|
},
|
|
6251
6244
|
actionBegin: Y,
|
|
6252
6245
|
rowSelected: j,
|
|
6253
|
-
rowDeselected:
|
|
6246
|
+
rowDeselected: _,
|
|
6254
6247
|
recordDoubleClick: W,
|
|
6255
|
-
...
|
|
6248
|
+
...z,
|
|
6256
6249
|
children: [
|
|
6257
6250
|
/* @__PURE__ */ e(wn, { children: pe() }),
|
|
6258
6251
|
/* @__PURE__ */ e(Nn, { services: D })
|
|
@@ -6294,10 +6287,10 @@ function ie({
|
|
|
6294
6287
|
details: o = {},
|
|
6295
6288
|
...u
|
|
6296
6289
|
}) {
|
|
6297
|
-
const p = Qe(), b = Ds(u, m), f = (
|
|
6290
|
+
const p = Qe(), b = Ds(u, m), f = (y) => {
|
|
6298
6291
|
l?.({
|
|
6299
6292
|
key: b,
|
|
6300
|
-
checked:
|
|
6293
|
+
checked: y.target.checked,
|
|
6301
6294
|
details: o,
|
|
6302
6295
|
props: u
|
|
6303
6296
|
});
|
|
@@ -6345,7 +6338,7 @@ function $s({
|
|
|
6345
6338
|
imageUrl: f = "https://images.unsplash.com/photo-1469980098053-382eb10ba017?q=80&w=1200&auto=format&fit=crop",
|
|
6346
6339
|
description: r = "Columbia University is a prestigious Ivy League institution located in the heart of New York City.",
|
|
6347
6340
|
// spread remaining props (_id, instanceId, etc.)
|
|
6348
|
-
...
|
|
6341
|
+
...y
|
|
6349
6342
|
}) {
|
|
6350
6343
|
const d = oe(t), h = ce[d];
|
|
6351
6344
|
return /* @__PURE__ */ n(
|
|
@@ -6357,7 +6350,7 @@ function $s({
|
|
|
6357
6350
|
onSelect: i,
|
|
6358
6351
|
identity: l,
|
|
6359
6352
|
details: { type: "activity", title: m, group: o, author: p },
|
|
6360
|
-
...
|
|
6353
|
+
...y,
|
|
6361
6354
|
children: [
|
|
6362
6355
|
/* @__PURE__ */ e("div", { className: "flex items-start justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${h.title} ml-3`, children: m }) }),
|
|
6363
6356
|
/* @__PURE__ */ n("div", { className: `text-zinc-500 dark:text-zinc-400 ${h.meta}`, children: [
|
|
@@ -6466,7 +6459,7 @@ function Rs({
|
|
|
6466
6459
|
// spread for identity (_id/instanceId/etc)
|
|
6467
6460
|
...p
|
|
6468
6461
|
}) {
|
|
6469
|
-
const b = oe(t), f = ce[b], r = Es[b],
|
|
6462
|
+
const b = oe(t), f = ce[b], r = Es[b], y = (d) => `px-1 pb-2 text-sm font-medium ${d === o ? "text-zinc-900 dark:text-zinc-100 border-b-2" : "text-zinc-500 dark:text-zinc-400"}`;
|
|
6470
6463
|
return /* @__PURE__ */ n(
|
|
6471
6464
|
ie,
|
|
6472
6465
|
{
|
|
@@ -6493,14 +6486,14 @@ function Rs({
|
|
|
6493
6486
|
/* @__PURE__ */ e(
|
|
6494
6487
|
"span",
|
|
6495
6488
|
{
|
|
6496
|
-
className: `${
|
|
6489
|
+
className: `${y("joined")} ${o === "joined" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
|
|
6497
6490
|
children: "Joined"
|
|
6498
6491
|
}
|
|
6499
6492
|
),
|
|
6500
6493
|
/* @__PURE__ */ e(
|
|
6501
6494
|
"span",
|
|
6502
6495
|
{
|
|
6503
|
-
className: `${
|
|
6496
|
+
className: `${y("suggested")} ${o === "suggested" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
|
|
6504
6497
|
children: "Suggested"
|
|
6505
6498
|
}
|
|
6506
6499
|
)
|
|
@@ -6770,25 +6763,25 @@ function Vs({
|
|
|
6770
6763
|
zoom: f = 12,
|
|
6771
6764
|
mapUrl: r,
|
|
6772
6765
|
// optional full embed URL override
|
|
6773
|
-
...
|
|
6766
|
+
...y
|
|
6774
6767
|
}) {
|
|
6775
|
-
const d = oe(t), h = ce[d],
|
|
6768
|
+
const d = oe(t), h = ce[d], $ = Ms[d], T = r || js(b, f);
|
|
6776
6769
|
return /* @__PURE__ */ e(
|
|
6777
6770
|
ie,
|
|
6778
6771
|
{
|
|
6779
|
-
className: `flex flex-col ${h.card} ${
|
|
6772
|
+
className: `flex flex-col ${h.card} ${$.wrap}`,
|
|
6780
6773
|
showCheckbox: a,
|
|
6781
6774
|
checkboxPosition: s,
|
|
6782
6775
|
onSelect: i,
|
|
6783
6776
|
identity: l,
|
|
6784
6777
|
details: { type: "campus-map", title: m, campusName: o, activeFilter: p, mapQuery: b, zoom: f },
|
|
6785
|
-
...
|
|
6786
|
-
children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${
|
|
6778
|
+
...y,
|
|
6779
|
+
children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${$.mapH}`, children: [
|
|
6787
6780
|
/* @__PURE__ */ e(
|
|
6788
6781
|
"iframe",
|
|
6789
6782
|
{
|
|
6790
6783
|
title: "Google Map",
|
|
6791
|
-
src:
|
|
6784
|
+
src: T,
|
|
6792
6785
|
className: "h-full w-full",
|
|
6793
6786
|
style: { border: 0 },
|
|
6794
6787
|
loading: "lazy",
|
|
@@ -6797,7 +6790,7 @@ function Vs({
|
|
|
6797
6790
|
}
|
|
6798
6791
|
),
|
|
6799
6792
|
/* @__PURE__ */ n("div", { className: "absolute left-4 right-4 top-3 flex items-center justify-between pointer-events-none", children: [
|
|
6800
|
-
/* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${
|
|
6793
|
+
/* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${$.campusPill}`, children: [
|
|
6801
6794
|
/* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children: o }),
|
|
6802
6795
|
/* @__PURE__ */ e("span", { className: "ml-2 text-zinc-400", children: "▾" })
|
|
6803
6796
|
] }),
|
|
@@ -6806,8 +6799,8 @@ function Vs({
|
|
|
6806
6799
|
/* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
|
|
6807
6800
|
] })
|
|
6808
6801
|
] }),
|
|
6809
|
-
/* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${
|
|
6810
|
-
/* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-28 md:top-24 pointer-events-none", children: /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 px-4 ${
|
|
6802
|
+
/* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${$.chipGap} overflow-x-auto scrollbar-none`, children: u.map((A) => /* @__PURE__ */ e(Bs, { label: A, active: A === p, size: d }, A)) }) }),
|
|
6803
|
+
/* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-28 md:top-24 pointer-events-none", children: /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 px-4 ${$.searchH}`, children: [
|
|
6811
6804
|
/* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", "aria-hidden": "true", className: "opacity-60", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M15.5 14h-.79l-.28-.27a6.471 6.471 0 001.48-4.23C15.91 6.01 13.4 3.5 10.45 3.5S5 6.01 5 9.5 7.5 15.5 10.45 15.5c1.61 0 3.09-.59 4.23-1.48l.27.28v.79l4.25 4.25c.41.41 1.07.41 1.48 0s.41-1.07 0-1.48L15.5 14Zm-5.05 0C8.01 14 6 11.99 6 9.5S8.01 5 10.45 5s4.45 2.01 4.45 4.5-2.01 4.5-4.45 4.5Z" }) }),
|
|
6812
6805
|
/* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
|
|
6813
6806
|
] }) })
|
|
@@ -6978,13 +6971,13 @@ function Ys({
|
|
|
6978
6971
|
selectedIndex: u = 0,
|
|
6979
6972
|
...p
|
|
6980
6973
|
}) {
|
|
6981
|
-
const [b, f] =
|
|
6974
|
+
const [b, f] = M(u), r = oe(t), y = ce[r], d = Us[r], h = o[b] || o[0], $ = (A, E) => {
|
|
6982
6975
|
f(E), i?.(A);
|
|
6983
|
-
},
|
|
6976
|
+
}, T = r === "lg";
|
|
6984
6977
|
return /* @__PURE__ */ n(
|
|
6985
6978
|
ie,
|
|
6986
6979
|
{
|
|
6987
|
-
className: `flex flex-col ${
|
|
6980
|
+
className: `flex flex-col ${y.card} ${d.wrap}`,
|
|
6988
6981
|
showCheckbox: a,
|
|
6989
6982
|
checkboxPosition: s,
|
|
6990
6983
|
onSelect: i,
|
|
@@ -6993,10 +6986,10 @@ function Ys({
|
|
|
6993
6986
|
...p,
|
|
6994
6987
|
children: [
|
|
6995
6988
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between mb-4", children: [
|
|
6996
|
-
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${
|
|
6989
|
+
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${y.title}`, children: m }),
|
|
6997
6990
|
/* @__PURE__ */ e("button", { className: "text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" })
|
|
6998
6991
|
] }),
|
|
6999
|
-
|
|
6992
|
+
T ? (
|
|
7000
6993
|
// Large: Two-column layout
|
|
7001
6994
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
7002
6995
|
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((A, E) => /* @__PURE__ */ e(
|
|
@@ -7005,7 +6998,7 @@ function Ys({
|
|
|
7005
6998
|
ev: A,
|
|
7006
6999
|
sizeMeta: d,
|
|
7007
7000
|
isSelected: E === b,
|
|
7008
|
-
onClick: (I) =>
|
|
7001
|
+
onClick: (I) => $(I, E)
|
|
7009
7002
|
},
|
|
7010
7003
|
A._id || A.id || E
|
|
7011
7004
|
)) }),
|
|
@@ -7019,12 +7012,12 @@ function Ys({
|
|
|
7019
7012
|
ev: A,
|
|
7020
7013
|
sizeMeta: d,
|
|
7021
7014
|
isSelected: E === b,
|
|
7022
|
-
onClick: (I) =>
|
|
7015
|
+
onClick: (I) => $(I, E)
|
|
7023
7016
|
},
|
|
7024
7017
|
A._id || A.id || E
|
|
7025
7018
|
)) })
|
|
7026
7019
|
),
|
|
7027
|
-
|
|
7020
|
+
!T && /* @__PURE__ */ e("div", { className: "mt-4 pt-3 border-t border-zinc-200 dark:border-zinc-800", children: /* @__PURE__ */ e("button", { className: "w-full text-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" }) })
|
|
7028
7021
|
]
|
|
7029
7022
|
}
|
|
7030
7023
|
);
|
|
@@ -7195,8 +7188,8 @@ function Hs({
|
|
|
7195
7188
|
onPin: b,
|
|
7196
7189
|
...f
|
|
7197
7190
|
}) {
|
|
7198
|
-
const [r,
|
|
7199
|
-
|
|
7191
|
+
const [r, y] = M(u), d = oe(t), h = ce[d], $ = Js[d], T = (I, j) => {
|
|
7192
|
+
y(j), i?.(I);
|
|
7200
7193
|
}, A = (I) => {
|
|
7201
7194
|
const j = { ...I, starred: !I.starred };
|
|
7202
7195
|
p?.(j);
|
|
@@ -7207,7 +7200,7 @@ function Hs({
|
|
|
7207
7200
|
return /* @__PURE__ */ n(
|
|
7208
7201
|
ie,
|
|
7209
7202
|
{
|
|
7210
|
-
className: `flex flex-col ${h.card} ${
|
|
7203
|
+
className: `flex flex-col ${h.card} ${$.wrap}`,
|
|
7211
7204
|
showCheckbox: a,
|
|
7212
7205
|
checkboxPosition: s,
|
|
7213
7206
|
onSelect: i,
|
|
@@ -7221,9 +7214,9 @@ function Hs({
|
|
|
7221
7214
|
Xs,
|
|
7222
7215
|
{
|
|
7223
7216
|
email: I,
|
|
7224
|
-
sizeMeta:
|
|
7217
|
+
sizeMeta: $,
|
|
7225
7218
|
isSelected: j === r,
|
|
7226
|
-
onClick: (
|
|
7219
|
+
onClick: (_) => T(_, j),
|
|
7227
7220
|
onStar: A,
|
|
7228
7221
|
onPin: E
|
|
7229
7222
|
},
|
|
@@ -7447,13 +7440,13 @@ function tl({
|
|
|
7447
7440
|
selectedIndex: u = 0,
|
|
7448
7441
|
...p
|
|
7449
7442
|
}) {
|
|
7450
|
-
const [b, f] =
|
|
7443
|
+
const [b, f] = M(u), r = oe(t), y = ce[r], d = Zs[r], h = (A, E) => {
|
|
7451
7444
|
f(E), i?.(A);
|
|
7452
|
-
},
|
|
7445
|
+
}, $ = o[b] || o[0], T = d.layout === "split";
|
|
7453
7446
|
return /* @__PURE__ */ n(
|
|
7454
7447
|
ie,
|
|
7455
7448
|
{
|
|
7456
|
-
className: `flex flex-col ${
|
|
7449
|
+
className: `flex flex-col ${y.card} ${d.wrap}`,
|
|
7457
7450
|
showCheckbox: a,
|
|
7458
7451
|
checkboxPosition: s,
|
|
7459
7452
|
onSelect: i,
|
|
@@ -7461,9 +7454,9 @@ function tl({
|
|
|
7461
7454
|
details: { type: "directory", title: m, count: o?.length ?? 0 },
|
|
7462
7455
|
...p,
|
|
7463
7456
|
children: [
|
|
7464
|
-
/* @__PURE__ */ e("div", { className: "flex items-center justify-between mb-4", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${
|
|
7457
|
+
/* @__PURE__ */ e("div", { className: "flex items-center justify-between mb-4", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${y.title}`, children: m }) }),
|
|
7465
7458
|
/* @__PURE__ */ e(el, { sizeMeta: d }),
|
|
7466
|
-
|
|
7459
|
+
T ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
|
|
7467
7460
|
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((A, E) => /* @__PURE__ */ e(
|
|
7468
7461
|
_t,
|
|
7469
7462
|
{
|
|
@@ -7477,7 +7470,7 @@ function tl({
|
|
|
7477
7470
|
/* @__PURE__ */ e(
|
|
7478
7471
|
Ks,
|
|
7479
7472
|
{
|
|
7480
|
-
contact:
|
|
7473
|
+
contact: $,
|
|
7481
7474
|
sizeMeta: d
|
|
7482
7475
|
}
|
|
7483
7476
|
)
|
|
@@ -7599,7 +7592,7 @@ function nl({
|
|
|
7599
7592
|
],
|
|
7600
7593
|
...r
|
|
7601
7594
|
}) {
|
|
7602
|
-
const
|
|
7595
|
+
const y = oe(t), d = ce[y], h = rl[y];
|
|
7603
7596
|
return /* @__PURE__ */ n(
|
|
7604
7597
|
ie,
|
|
7605
7598
|
{
|
|
@@ -7644,16 +7637,16 @@ function nl({
|
|
|
7644
7637
|
/* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: $e(b) })
|
|
7645
7638
|
] })
|
|
7646
7639
|
] }),
|
|
7647
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: f.slice(0, 2).map((
|
|
7640
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: f.slice(0, 2).map(($, T) => /* @__PURE__ */ e(
|
|
7648
7641
|
al,
|
|
7649
7642
|
{
|
|
7650
|
-
side:
|
|
7651
|
-
date:
|
|
7652
|
-
title:
|
|
7653
|
-
amount:
|
|
7654
|
-
kind:
|
|
7643
|
+
side: T === 0 ? "left" : "right",
|
|
7644
|
+
date: $.date,
|
|
7645
|
+
title: $.title,
|
|
7646
|
+
amount: $.amount,
|
|
7647
|
+
kind: $.kind
|
|
7655
7648
|
},
|
|
7656
|
-
|
|
7649
|
+
$.id || T
|
|
7657
7650
|
)) })
|
|
7658
7651
|
] })
|
|
7659
7652
|
] }),
|
|
@@ -7772,7 +7765,7 @@ function ll({
|
|
|
7772
7765
|
term: o = "Fall 2025",
|
|
7773
7766
|
...u
|
|
7774
7767
|
}) {
|
|
7775
|
-
const [p, b] =
|
|
7768
|
+
const [p, b] = M("vacation"), [f, r] = M(!1), y = oe(t), d = ce[y], h = sl[y], $ = We.find((T) => T.id === p) || We[0];
|
|
7776
7769
|
return /* @__PURE__ */ n(
|
|
7777
7770
|
ie,
|
|
7778
7771
|
{
|
|
@@ -7808,28 +7801,28 @@ function ll({
|
|
|
7808
7801
|
] })
|
|
7809
7802
|
] })
|
|
7810
7803
|
] }),
|
|
7811
|
-
h.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: We.map((
|
|
7804
|
+
h.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: We.map((T) => /* @__PURE__ */ e(
|
|
7812
7805
|
"button",
|
|
7813
7806
|
{
|
|
7814
|
-
className: `flex-1 py-2 px-4 text-center ${h.tab} font-medium border-b-2 transition-colors duration-200 ${p ===
|
|
7815
|
-
onClick: () => b(
|
|
7816
|
-
children:
|
|
7807
|
+
className: `flex-1 py-2 px-4 text-center ${h.tab} font-medium border-b-2 transition-colors duration-200 ${p === T.id ? "border-blue-500 text-blue-600 dark:text-blue-400" : "border-transparent text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100"}`,
|
|
7808
|
+
onClick: () => b(T.id),
|
|
7809
|
+
children: T.name.split(" ")[0]
|
|
7817
7810
|
},
|
|
7818
|
-
|
|
7811
|
+
T.id
|
|
7819
7812
|
)) }),
|
|
7820
7813
|
/* @__PURE__ */ e("div", { className: "space-y-4 mb-6", children: h.showAllLeave ? (
|
|
7821
7814
|
// LG: Show all leave types
|
|
7822
|
-
We.map((
|
|
7815
|
+
We.map((T) => /* @__PURE__ */ e(Ut, { leave: T, sizeMeta: h }, T.id))
|
|
7823
7816
|
) : h.showSingleLeave ? (
|
|
7824
7817
|
// MD: Show active tab leave type
|
|
7825
|
-
/* @__PURE__ */ e(Ut, { leave:
|
|
7818
|
+
/* @__PURE__ */ e(Ut, { leave: $, sizeMeta: h })
|
|
7826
7819
|
) : (
|
|
7827
7820
|
// SM: Show only available hours
|
|
7828
7821
|
/* @__PURE__ */ e("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 p-4", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
7829
7822
|
/* @__PURE__ */ e(Fe, { className: "h-5 w-5 text-blue-600 dark:text-blue-400" }),
|
|
7830
7823
|
/* @__PURE__ */ n("div", { children: [
|
|
7831
7824
|
/* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${h.table}`, children: "Available Leave" }),
|
|
7832
|
-
/* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${h.table}`, children:
|
|
7825
|
+
/* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${h.table}`, children: $.available })
|
|
7833
7826
|
] })
|
|
7834
7827
|
] }) })
|
|
7835
7828
|
) }),
|
|
@@ -7963,11 +7956,11 @@ function dl({
|
|
|
7963
7956
|
subtitle: o = "Drive Shared",
|
|
7964
7957
|
...u
|
|
7965
7958
|
}) {
|
|
7966
|
-
const [p, b] =
|
|
7959
|
+
const [p, b] = M(!1), f = oe(t), r = ce[f], y = cl[f];
|
|
7967
7960
|
return /* @__PURE__ */ n(
|
|
7968
7961
|
ie,
|
|
7969
7962
|
{
|
|
7970
|
-
className: `flex flex-col ${r.card} ${
|
|
7963
|
+
className: `flex flex-col ${r.card} ${y.wrap}`,
|
|
7971
7964
|
showCheckbox: a,
|
|
7972
7965
|
checkboxPosition: s,
|
|
7973
7966
|
onSelect: i,
|
|
@@ -7977,7 +7970,7 @@ function dl({
|
|
|
7977
7970
|
children: [
|
|
7978
7971
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
7979
7972
|
/* @__PURE__ */ n("div", { children: [
|
|
7980
|
-
/* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${
|
|
7973
|
+
/* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${y.title} mb-1`, children: m }),
|
|
7981
7974
|
/* @__PURE__ */ e("div", { className: "text-zinc-600 dark:text-zinc-400 text-sm", children: o })
|
|
7982
7975
|
] }),
|
|
7983
7976
|
/* @__PURE__ */ n("div", { className: "relative", children: [
|
|
@@ -8001,21 +7994,21 @@ function dl({
|
|
|
8001
7994
|
] })
|
|
8002
7995
|
] })
|
|
8003
7996
|
] }),
|
|
8004
|
-
/* @__PURE__ */ e("div", { className: `grid ${
|
|
7997
|
+
/* @__PURE__ */ e("div", { className: `grid ${y.gridCols} gap-3 `, children: il.map((d) => /* @__PURE__ */ e(
|
|
8005
7998
|
qt,
|
|
8006
7999
|
{
|
|
8007
8000
|
item: d,
|
|
8008
|
-
sizeMeta:
|
|
8001
|
+
sizeMeta: y
|
|
8009
8002
|
},
|
|
8010
8003
|
d.id
|
|
8011
8004
|
)) }),
|
|
8012
|
-
|
|
8013
|
-
/* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${
|
|
8005
|
+
y.showRecent && /* @__PURE__ */ n("div", { className: "", children: [
|
|
8006
|
+
/* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${y.item}`, children: "Recent Files" }),
|
|
8014
8007
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: ol.map((d) => /* @__PURE__ */ e(
|
|
8015
8008
|
qt,
|
|
8016
8009
|
{
|
|
8017
8010
|
item: d,
|
|
8018
|
-
sizeMeta:
|
|
8011
|
+
sizeMeta: y,
|
|
8019
8012
|
showDate: !0
|
|
8020
8013
|
},
|
|
8021
8014
|
d.id
|
|
@@ -8155,7 +8148,7 @@ const ml = [
|
|
|
8155
8148
|
}
|
|
8156
8149
|
};
|
|
8157
8150
|
function pl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
|
|
8158
|
-
const [l, m] =
|
|
8151
|
+
const [l, m] = M(!1), o = Ra(t.type), u = hl(t.type);
|
|
8159
8152
|
return l ? null : /* @__PURE__ */ n("div", { className: `relative rounded-lg border-l-4 p-4 transition-all duration-200 ${o.bg} ${o.border} ${t.read ? "border-l-2 opacity-80" : "border-l-4"}`, style: { borderLeftColor: o.accent }, children: [
|
|
8160
8153
|
/* @__PURE__ */ e(
|
|
8161
8154
|
"button",
|
|
@@ -8179,7 +8172,7 @@ function pl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
|
|
|
8179
8172
|
] });
|
|
8180
8173
|
}
|
|
8181
8174
|
function gl({ alert: t, onDismiss: a }) {
|
|
8182
|
-
const [s, i] =
|
|
8175
|
+
const [s, i] = M(!1), l = Ra("banner"), m = () => {
|
|
8183
8176
|
i(!0), a?.(t);
|
|
8184
8177
|
};
|
|
8185
8178
|
return s ? null : /* @__PURE__ */ e("div", { className: `rounded-lg border p-4 ${l.bg} ${l.border} relative`, children: /* @__PURE__ */ n("div", { className: "flex items-start gap-3", children: [
|
|
@@ -8209,13 +8202,13 @@ function bl({
|
|
|
8209
8202
|
showBanner: u = !0,
|
|
8210
8203
|
...p
|
|
8211
8204
|
}) {
|
|
8212
|
-
const [b, f] =
|
|
8205
|
+
const [b, f] = M(o), r = oe(t), y = ce[r], d = ul[r], h = (A) => {
|
|
8213
8206
|
f((E) => E.filter((I) => I.id !== A.id));
|
|
8214
|
-
},
|
|
8207
|
+
}, $ = b.find((A) => A.type === "banner"), T = b.filter((A) => A.type !== "banner");
|
|
8215
8208
|
return /* @__PURE__ */ n(
|
|
8216
8209
|
ie,
|
|
8217
8210
|
{
|
|
8218
|
-
className: `flex flex-col ${
|
|
8211
|
+
className: `flex flex-col ${y.card} ${d.wrap}`,
|
|
8219
8212
|
showCheckbox: a,
|
|
8220
8213
|
checkboxPosition: s,
|
|
8221
8214
|
onSelect: i,
|
|
@@ -8223,15 +8216,15 @@ function bl({
|
|
|
8223
8216
|
details: { type: "alerts", title: m, count: b.length },
|
|
8224
8217
|
...p,
|
|
8225
8218
|
children: [
|
|
8226
|
-
/* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${
|
|
8227
|
-
u &&
|
|
8219
|
+
/* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${y.title}`, children: m }) }),
|
|
8220
|
+
u && $ && t !== "sm" && /* @__PURE__ */ e(
|
|
8228
8221
|
gl,
|
|
8229
8222
|
{
|
|
8230
|
-
alert:
|
|
8223
|
+
alert: $,
|
|
8231
8224
|
onDismiss: h
|
|
8232
8225
|
}
|
|
8233
8226
|
),
|
|
8234
|
-
/* @__PURE__ */ e("div", { className: "space-y-0.5", children:
|
|
8227
|
+
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: T.slice(0, 3).map((A) => /* @__PURE__ */ e(
|
|
8235
8228
|
pl,
|
|
8236
8229
|
{
|
|
8237
8230
|
alert: A,
|
|
@@ -8343,7 +8336,7 @@ const fl = [
|
|
|
8343
8336
|
}
|
|
8344
8337
|
};
|
|
8345
8338
|
function yl({ video: t, sizeMeta: a }) {
|
|
8346
|
-
const [s, i] =
|
|
8339
|
+
const [s, i] = M(!1);
|
|
8347
8340
|
return /* @__PURE__ */ n("div", { className: "group cursor-pointer", children: [
|
|
8348
8341
|
/* @__PURE__ */ n("div", { className: `relative ${a.thumbnailHeight} rounded-lg overflow-hidden bg-zinc-200 dark:bg-zinc-800`, children: [
|
|
8349
8342
|
/* @__PURE__ */ e(
|
|
@@ -8385,11 +8378,11 @@ function vl({
|
|
|
8385
8378
|
videos: o = fl,
|
|
8386
8379
|
...u
|
|
8387
8380
|
}) {
|
|
8388
|
-
const [p, b] =
|
|
8381
|
+
const [p, b] = M(!1), f = oe(t), r = ce[f], y = xl[f];
|
|
8389
8382
|
return /* @__PURE__ */ n(
|
|
8390
8383
|
ie,
|
|
8391
8384
|
{
|
|
8392
|
-
className: `flex flex-col ${r.card} ${
|
|
8385
|
+
className: `flex flex-col ${r.card} ${y.wrap}`,
|
|
8393
8386
|
showCheckbox: a,
|
|
8394
8387
|
checkboxPosition: s,
|
|
8395
8388
|
onSelect: i,
|
|
@@ -8419,11 +8412,11 @@ function vl({
|
|
|
8419
8412
|
] })
|
|
8420
8413
|
] })
|
|
8421
8414
|
] }),
|
|
8422
|
-
/* @__PURE__ */ e("div", { className: `grid ${
|
|
8415
|
+
/* @__PURE__ */ e("div", { className: `grid ${y.gridCols} gap-4 `, children: o.slice(0, y.gridCols === "grid-cols-3" ? 6 : 4).map((d) => /* @__PURE__ */ e(
|
|
8423
8416
|
yl,
|
|
8424
8417
|
{
|
|
8425
8418
|
video: d,
|
|
8426
|
-
sizeMeta:
|
|
8419
|
+
sizeMeta: y
|
|
8427
8420
|
},
|
|
8428
8421
|
d.id
|
|
8429
8422
|
)) }),
|