unifyedx-storybook-new 0.2.28 → 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 se, { useState as M, useMemo as ue, useId as Qe, Fragment as Q, useEffect as Z, useCallback as
|
|
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";
|
|
@@ -15,8 +15,8 @@ const kn = (t) => {
|
|
|
15
15
|
a ^= t.charCodeAt(s), a += (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24);
|
|
16
16
|
return a >>> 0;
|
|
17
17
|
}, Cn = (t) => {
|
|
18
|
-
const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = kn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, u = 86 + (i >>> 24) % 8, p = `hsl(${l}, ${m}%, ${u}%)`,
|
|
19
|
-
return { bg: p, text:
|
|
18
|
+
const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = kn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, u = 86 + (i >>> 24) % 8, p = `hsl(${l}, ${m}%, ${u}%)`, b = `hsl(${l}, ${m}%, ${o}%)`;
|
|
19
|
+
return { bg: p, text: b };
|
|
20
20
|
}, zn = (t = "") => t.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase(), ze = ({
|
|
21
21
|
src: t,
|
|
22
22
|
name: a,
|
|
@@ -29,16 +29,16 @@ const kn = (t) => {
|
|
|
29
29
|
className: m,
|
|
30
30
|
...o
|
|
31
31
|
}) => {
|
|
32
|
-
const [u, p] = M(!1),
|
|
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 =
|
|
36
|
+
), h = f ? "transparent" : i || b.bg, $ = l || b.text;
|
|
37
37
|
return /* @__PURE__ */ n("div", { className: d, style: {
|
|
38
38
|
backgroundColor: h,
|
|
39
39
|
color: $
|
|
40
40
|
}, ...o, children: [
|
|
41
|
-
|
|
41
|
+
f && /* @__PURE__ */ e(
|
|
42
42
|
"img",
|
|
43
43
|
{
|
|
44
44
|
src: t,
|
|
@@ -74,14 +74,14 @@ const kn = (t) => {
|
|
|
74
74
|
className: u,
|
|
75
75
|
...p
|
|
76
76
|
}) => {
|
|
77
|
-
const
|
|
77
|
+
const b = H(
|
|
78
78
|
"badge",
|
|
79
79
|
`badge--variant-${a}`,
|
|
80
80
|
`badge--size-${s}`,
|
|
81
81
|
{ "badge--with-remove": !!l },
|
|
82
82
|
u
|
|
83
83
|
);
|
|
84
|
-
return /* @__PURE__ */ n("span", { className:
|
|
84
|
+
return /* @__PURE__ */ n("span", { className: b, style: m && o ? {
|
|
85
85
|
backgroundColor: m,
|
|
86
86
|
color: o,
|
|
87
87
|
borderColor: "#ff0000"
|
|
@@ -149,16 +149,16 @@ const $n = {
|
|
|
149
149
|
icon: u,
|
|
150
150
|
// Renamed for clarity, expecting a component type e.g., CheckCircle
|
|
151
151
|
disabled: p = !1,
|
|
152
|
-
size:
|
|
153
|
-
label:
|
|
152
|
+
size: b = "medium",
|
|
153
|
+
label: f,
|
|
154
154
|
children: r,
|
|
155
155
|
// ✅ Add children to the props list
|
|
156
156
|
onClick: y,
|
|
157
157
|
...d
|
|
158
158
|
}) => {
|
|
159
|
-
const h = p || m, $ = u && !
|
|
159
|
+
const h = p || m, $ = u && !f, T = H(
|
|
160
160
|
"btn-base",
|
|
161
|
-
$n[
|
|
161
|
+
$n[b],
|
|
162
162
|
Tn[o],
|
|
163
163
|
{
|
|
164
164
|
"is-loading": m,
|
|
@@ -174,12 +174,12 @@ const $n = {
|
|
|
174
174
|
className: T,
|
|
175
175
|
disabled: h,
|
|
176
176
|
onClick: y,
|
|
177
|
-
title: a || $ && i || (typeof
|
|
178
|
-
"aria-label": i || $ && a || (typeof
|
|
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
|
-
u && /* @__PURE__ */ e(u, { size:
|
|
182
|
-
|
|
181
|
+
u && /* @__PURE__ */ e(u, { size: b === "large" ? 20 : 16 }),
|
|
182
|
+
f,
|
|
183
183
|
r,
|
|
184
184
|
" "
|
|
185
185
|
] })
|
|
@@ -218,13 +218,13 @@ const $n = {
|
|
|
218
218
|
onChange: o,
|
|
219
219
|
...u
|
|
220
220
|
}) => {
|
|
221
|
-
const p = Qe(),
|
|
221
|
+
const p = Qe(), b = a || p;
|
|
222
222
|
return /* @__PURE__ */ n("div", { className: `checkbox-container ${i || ""}`, children: [
|
|
223
|
-
/* @__PURE__ */ n("label", { htmlFor:
|
|
223
|
+
/* @__PURE__ */ n("label", { htmlFor: b, className: "checkbox-wrapper", children: [
|
|
224
224
|
/* @__PURE__ */ e(
|
|
225
225
|
"input",
|
|
226
226
|
{
|
|
227
|
-
id:
|
|
227
|
+
id: b,
|
|
228
228
|
type: "checkbox",
|
|
229
229
|
ref: l,
|
|
230
230
|
className: "checkbox-input",
|
|
@@ -259,8 +259,8 @@ const $n = {
|
|
|
259
259
|
className: u,
|
|
260
260
|
...p
|
|
261
261
|
}) => {
|
|
262
|
-
const
|
|
263
|
-
|
|
262
|
+
const b = (f) => {
|
|
263
|
+
f.stopPropagation(), f.preventDefault(), s?.();
|
|
264
264
|
};
|
|
265
265
|
return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
|
|
266
266
|
l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "datepicker-input", children: l }),
|
|
@@ -287,7 +287,7 @@ const $n = {
|
|
|
287
287
|
"button",
|
|
288
288
|
{
|
|
289
289
|
type: "button",
|
|
290
|
-
onClick:
|
|
290
|
+
onClick: b,
|
|
291
291
|
className: "datepicker-clear-button",
|
|
292
292
|
"aria-label": "Clear selected date",
|
|
293
293
|
children: /* @__PURE__ */ e(ge, { size: 16 })
|
|
@@ -319,12 +319,12 @@ const $n = {
|
|
|
319
319
|
className: u,
|
|
320
320
|
...p
|
|
321
321
|
}) => {
|
|
322
|
-
const
|
|
322
|
+
const b = t?.from, f = t?.to, r = (d) => {
|
|
323
323
|
d.stopPropagation(), d.preventDefault(), s?.();
|
|
324
|
-
}, y =
|
|
325
|
-
Ze(
|
|
324
|
+
}, y = b && f ? /* @__PURE__ */ n(te, { children: [
|
|
325
|
+
Ze(b, "MMM d, y"),
|
|
326
326
|
" - ",
|
|
327
|
-
Ze(
|
|
327
|
+
Ze(f, "MMM d, y")
|
|
328
328
|
] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: i });
|
|
329
329
|
return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
|
|
330
330
|
l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "daterangepicker-input", children: l }),
|
|
@@ -340,14 +340,14 @@ const $n = {
|
|
|
340
340
|
"datepicker-trigger--disabled": o
|
|
341
341
|
}),
|
|
342
342
|
disabled: o,
|
|
343
|
-
"aria-label":
|
|
343
|
+
"aria-label": b && f ? `Selected range is ${y}` : i,
|
|
344
344
|
children: [
|
|
345
345
|
/* @__PURE__ */ e(yt, { className: "datepicker-icon" }),
|
|
346
346
|
/* @__PURE__ */ e("span", { className: "datepicker-value", children: y })
|
|
347
347
|
]
|
|
348
348
|
}
|
|
349
349
|
),
|
|
350
|
-
|
|
350
|
+
b && s && !o && /* @__PURE__ */ e(
|
|
351
351
|
"button",
|
|
352
352
|
{
|
|
353
353
|
type: "button",
|
|
@@ -627,8 +627,8 @@ const $n = {
|
|
|
627
627
|
validFiles: o = [],
|
|
628
628
|
rejectedFiles: u = [],
|
|
629
629
|
handleRemoveValidFile: p,
|
|
630
|
-
handleRemoveRejectedFile:
|
|
631
|
-
handleSubmit:
|
|
630
|
+
handleRemoveRejectedFile: b,
|
|
631
|
+
handleSubmit: f,
|
|
632
632
|
isSubmitting: r,
|
|
633
633
|
formErrors: y,
|
|
634
634
|
// --- UI Text ---
|
|
@@ -674,7 +674,7 @@ const $n = {
|
|
|
674
674
|
onClick: (T) => T.stopPropagation(),
|
|
675
675
|
children: [
|
|
676
676
|
/* @__PURE__ */ e("input", { ...i() }),
|
|
677
|
-
/* @__PURE__ */ n("form", { onSubmit:
|
|
677
|
+
/* @__PURE__ */ n("form", { onSubmit: f, className: "form-wrapper", children: [
|
|
678
678
|
/* @__PURE__ */ n("div", { className: "dialog-header", children: [
|
|
679
679
|
/* @__PURE__ */ e(at, { as: "h3", className: "dialog-title-text", children: d }),
|
|
680
680
|
/* @__PURE__ */ e(
|
|
@@ -714,7 +714,7 @@ const $n = {
|
|
|
714
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((T,
|
|
717
|
+
o.map((T, A) => /* @__PURE__ */ n(
|
|
718
718
|
"li",
|
|
719
719
|
{
|
|
720
720
|
className: "file-item",
|
|
@@ -735,16 +735,16 @@ const $n = {
|
|
|
735
735
|
"button",
|
|
736
736
|
{
|
|
737
737
|
type: "button",
|
|
738
|
-
onClick: () => p(
|
|
738
|
+
onClick: () => p(A),
|
|
739
739
|
className: "remove-file-button",
|
|
740
740
|
children: /* @__PURE__ */ e(Ke, { size: 16 })
|
|
741
741
|
}
|
|
742
742
|
)
|
|
743
743
|
]
|
|
744
744
|
},
|
|
745
|
-
`${T.name}-${
|
|
745
|
+
`${T.name}-${A}`
|
|
746
746
|
)),
|
|
747
|
-
u.map(({ file: T, message:
|
|
747
|
+
u.map(({ file: T, message: A }, E) => /* @__PURE__ */ n(
|
|
748
748
|
"li",
|
|
749
749
|
{
|
|
750
750
|
className: "file-item file-item--rejected",
|
|
@@ -759,21 +759,21 @@ const $n = {
|
|
|
759
759
|
/* @__PURE__ */ n("div", { children: [
|
|
760
760
|
/* @__PURE__ */ e("p", { className: "file-item-name", children: T.name }),
|
|
761
761
|
/* @__PURE__ */ e("p", { className: "file-item-size", children: At(T.size) }),
|
|
762
|
-
/* @__PURE__ */ e("p", { className: "rejection-reason", children:
|
|
762
|
+
/* @__PURE__ */ e("p", { className: "rejection-reason", children: A })
|
|
763
763
|
] })
|
|
764
764
|
] }),
|
|
765
765
|
/* @__PURE__ */ e(
|
|
766
766
|
"button",
|
|
767
767
|
{
|
|
768
768
|
type: "button",
|
|
769
|
-
onClick: () =>
|
|
769
|
+
onClick: () => b(E),
|
|
770
770
|
className: "remove-file-button",
|
|
771
771
|
children: /* @__PURE__ */ e(Ke, { size: 16 })
|
|
772
772
|
}
|
|
773
773
|
)
|
|
774
774
|
]
|
|
775
775
|
},
|
|
776
|
-
`${T.name}-${
|
|
776
|
+
`${T.name}-${E}`
|
|
777
777
|
))
|
|
778
778
|
] })
|
|
779
779
|
] })
|
|
@@ -858,10 +858,10 @@ const $n = {
|
|
|
858
858
|
fetchCreatedOrUpdatedByUsers: u = async () => []
|
|
859
859
|
// Mockable fetcher
|
|
860
860
|
}) => {
|
|
861
|
-
const [p,
|
|
861
|
+
const [p, b] = M({
|
|
862
862
|
createdBy: [],
|
|
863
863
|
updatedBy: []
|
|
864
|
-
}), [
|
|
864
|
+
}), [f, r] = M({
|
|
865
865
|
createdBy: !1,
|
|
866
866
|
updatedBy: !1
|
|
867
867
|
}), [y, d] = M({
|
|
@@ -871,62 +871,62 @@ const $n = {
|
|
|
871
871
|
}), T = Wa({
|
|
872
872
|
initialValues: JSON.parse(JSON.stringify(m)),
|
|
873
873
|
// Deep copy
|
|
874
|
-
onSubmit: (
|
|
875
|
-
const
|
|
876
|
-
Object.keys(
|
|
877
|
-
|
|
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:
|
|
884
|
-
activeCount:
|
|
882
|
+
}), console.log("[storybook filter] Applied Filters:", g), typeof s == "function" && s({
|
|
883
|
+
filters: g,
|
|
884
|
+
activeCount: E
|
|
885
885
|
}), a();
|
|
886
886
|
},
|
|
887
887
|
enableReinitialize: !0
|
|
888
|
-
}),
|
|
889
|
-
const v =
|
|
890
|
-
let
|
|
888
|
+
}), A = ue(() => l.reduce((C, g) => {
|
|
889
|
+
const v = g.key, w = T.values[v];
|
|
890
|
+
let z = !1;
|
|
891
891
|
if (w)
|
|
892
|
-
switch (
|
|
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
|
-
(w.range && w.range !== "" || Array.isArray(w.values) && w.values.length > 0) && (
|
|
898
|
+
(w.range && w.range !== "" || Array.isArray(w.values) && w.values.length > 0) && (z = !0);
|
|
899
899
|
break;
|
|
900
900
|
}
|
|
901
|
-
return
|
|
902
|
-
}, {}), [l, T.values]),
|
|
903
|
-
if (
|
|
904
|
-
const
|
|
905
|
-
if (!Array.isArray(
|
|
906
|
-
const [v, w] =
|
|
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
907
|
if (!v || !w) return !1;
|
|
908
|
-
const
|
|
909
|
-
return
|
|
910
|
-
}), [l, T.values]),
|
|
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((w) => ({ ...w, [
|
|
913
|
-
const v = await u(
|
|
914
|
-
|
|
912
|
+
r((w) => ({ ...w, [C]: !0 }));
|
|
913
|
+
const v = await u(C, g);
|
|
914
|
+
b((w) => ({ ...w, [C]: v }));
|
|
915
915
|
} catch (v) {
|
|
916
|
-
console.error(`Error fetching ${
|
|
916
|
+
console.error(`Error fetching ${C} users:`, v);
|
|
917
917
|
} finally {
|
|
918
|
-
r((v) => ({ ...v, [
|
|
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
|
-
T.resetForm(),
|
|
925
|
-
},
|
|
926
|
-
const
|
|
927
|
-
if (!
|
|
928
|
-
const v = T.values[
|
|
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: [
|
|
@@ -935,9 +935,9 @@ const $n = {
|
|
|
935
935
|
"select",
|
|
936
936
|
{
|
|
937
937
|
value: v.operator || "in",
|
|
938
|
-
onChange: (R) => T.setFieldValue(`${
|
|
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
|
-
T.setFieldValue(`${
|
|
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
975
|
checked: w.includes(R.value),
|
|
976
976
|
onChange: (Y) => {
|
|
977
977
|
const W = Y.target.checked ? [...w, R.value] : w.filter((pe) => pe !== R.value);
|
|
978
|
-
T.setFieldValue(`${
|
|
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,7 +991,7 @@ 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:" }),
|
|
@@ -999,25 +999,25 @@ const $n = {
|
|
|
999
999
|
"select",
|
|
1000
1000
|
{
|
|
1001
1001
|
value: v.operator || "in",
|
|
1002
|
-
onChange: (R) => T.setFieldValue(`${
|
|
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 ?
|
|
1018
|
+
const Y = R.target.checked ? z.map((W) => W.email) : [];
|
|
1019
1019
|
T.setFieldValue(
|
|
1020
|
-
`${
|
|
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
1042
|
checked: w.includes(R.email),
|
|
1043
1043
|
onChange: (Y) => {
|
|
1044
1044
|
const W = Y.target.checked ? [...w, R.email] : w.filter((pe) => pe !== R.email);
|
|
1045
1045
|
T.setFieldValue(
|
|
1046
|
-
`${
|
|
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,9 +1064,9 @@ 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 x = v.values || [], [k,
|
|
1068
|
-
startDate:
|
|
1069
|
-
endDate:
|
|
1067
|
+
const x = v.values || [], [k, F] = x, L = k && F, U = x[0] || null, S = x[1] || null, O = {
|
|
1068
|
+
startDate: U instanceof Date ? U.toISOString().slice(0, 10) : null,
|
|
1069
|
+
endDate: U instanceof Date ? U.toISOString().slice(0, 10) : null
|
|
1070
1070
|
}, D = {
|
|
1071
1071
|
startDate: S instanceof Date ? S.toISOString().slice(0, 10) : null,
|
|
1072
1072
|
endDate: S instanceof Date ? S.toISOString().slice(0, 10) : null
|
|
@@ -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
|
-
T.setFieldValue(`${
|
|
1083
|
+
T.setFieldValue(`${C}.values`, []), T.setFieldValue(`${C}.range`, "anytime");
|
|
1084
1084
|
return;
|
|
1085
1085
|
}
|
|
1086
1086
|
if (R === "custom") {
|
|
1087
|
-
T.setFieldValue(`${
|
|
1087
|
+
T.setFieldValue(`${C}.range`, "custom");
|
|
1088
1088
|
return;
|
|
1089
1089
|
}
|
|
1090
1090
|
const [Y, W] = On(R);
|
|
1091
|
-
T.setFieldValue(`${
|
|
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: [
|
|
@@ -1097,9 +1097,9 @@ const $n = {
|
|
|
1097
1097
|
"select",
|
|
1098
1098
|
{
|
|
1099
1099
|
value: v.operator,
|
|
1100
|
-
onChange: (R) => T.setFieldValue(`${
|
|
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(
|
|
@@ -1108,8 +1108,8 @@ const $n = {
|
|
|
1108
1108
|
type: "button",
|
|
1109
1109
|
onClick: () => {
|
|
1110
1110
|
T.setFieldValue(
|
|
1111
|
-
|
|
1112
|
-
m[
|
|
1111
|
+
C,
|
|
1112
|
+
m[C]
|
|
1113
1113
|
);
|
|
1114
1114
|
},
|
|
1115
1115
|
className: "filter-clear-selection-button",
|
|
@@ -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
|
),
|
|
@@ -1153,7 +1153,7 @@ const $n = {
|
|
|
1153
1153
|
value: O,
|
|
1154
1154
|
onChange: (R) => {
|
|
1155
1155
|
const Y = R?.startDate ? Be(new Date(R.startDate)) : null, W = x[1] || null;
|
|
1156
|
-
Y && (T.setFieldValue(`${
|
|
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",
|
|
@@ -1177,7 +1177,7 @@ const $n = {
|
|
|
1177
1177
|
value: D,
|
|
1178
1178
|
onChange: (R) => {
|
|
1179
1179
|
const Y = R?.startDate ? je(new Date(R.startDate)) : null, W = x[0] || null;
|
|
1180
|
-
Y && (T.setFieldValue(`${
|
|
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",
|
|
@@ -1190,7 +1190,7 @@ const $n = {
|
|
|
1190
1190
|
}
|
|
1191
1191
|
)
|
|
1192
1192
|
] }),
|
|
1193
|
-
|
|
1193
|
+
U && S && U > S && /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-2", children: "End date must be after start date" })
|
|
1194
1194
|
] })
|
|
1195
1195
|
] });
|
|
1196
1196
|
default:
|
|
@@ -1239,17 +1239,17 @@ const $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
|
-
|
|
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:
|
|
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
|
}
|
|
@@ -1298,7 +1298,7 @@ const $n = {
|
|
|
1298
1298
|
children: [
|
|
1299
1299
|
"Apply Filters",
|
|
1300
1300
|
" ",
|
|
1301
|
-
|
|
1301
|
+
E > 0 ? `(${E})` : ""
|
|
1302
1302
|
]
|
|
1303
1303
|
}
|
|
1304
1304
|
)
|
|
@@ -1372,10 +1372,10 @@ const $n = {
|
|
|
1372
1372
|
// 'info', 'warning', 'delete'
|
|
1373
1373
|
loading: u = !1,
|
|
1374
1374
|
buttonProps: p = {},
|
|
1375
|
-
size:
|
|
1375
|
+
size: b
|
|
1376
1376
|
// Add size prop
|
|
1377
1377
|
}) => {
|
|
1378
|
-
const
|
|
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 });
|
|
@@ -1404,9 +1404,9 @@ const $n = {
|
|
|
1404
1404
|
leave: "ease-in duration-200",
|
|
1405
1405
|
leaveFrom: "opacity-100 scale-100",
|
|
1406
1406
|
leaveTo: "opacity-0 scale-95",
|
|
1407
|
-
children: /* @__PURE__ */ n(Ee, { className:
|
|
1407
|
+
children: /* @__PURE__ */ n(Ee, { className: b === "large" ? "modal-panel modal-panel--large" : "modal-panel", children: [
|
|
1408
1408
|
/* @__PURE__ */ n("div", { className: "modal-content-wrapper", children: [
|
|
1409
|
-
/* @__PURE__ */ e("div", { className: `modal-icon-container ${
|
|
1409
|
+
/* @__PURE__ */ e("div", { className: `modal-icon-container ${f.iconClass}`, children: /* @__PURE__ */ e(r, { size: 24, "aria-hidden": "true" }) }),
|
|
1410
1410
|
/* @__PURE__ */ n("div", { className: "modal-text-content", children: [
|
|
1411
1411
|
/* @__PURE__ */ e(at, { as: "h3", className: "modal-title", children: s }),
|
|
1412
1412
|
/* @__PURE__ */ e("div", { className: "modal-description", children: i })
|
|
@@ -1446,7 +1446,7 @@ const $n = {
|
|
|
1446
1446
|
Z(() => {
|
|
1447
1447
|
p(t);
|
|
1448
1448
|
}, [t]);
|
|
1449
|
-
const
|
|
1449
|
+
const b = Math.min((t - 1) * s + 1, a), f = Math.min(t * s, a), r = (y) => {
|
|
1450
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);
|
|
@@ -1465,9 +1465,9 @@ const $n = {
|
|
|
1465
1465
|
}
|
|
1466
1466
|
),
|
|
1467
1467
|
/* @__PURE__ */ n("span", { className: "pagination-info", children: [
|
|
1468
|
-
g,
|
|
1469
|
-
"-",
|
|
1470
1468
|
b,
|
|
1469
|
+
"-",
|
|
1470
|
+
f,
|
|
1471
1471
|
" of ",
|
|
1472
1472
|
a,
|
|
1473
1473
|
" items"
|
|
@@ -1590,16 +1590,16 @@ const $n = {
|
|
|
1590
1590
|
Z(() => {
|
|
1591
1591
|
p(t);
|
|
1592
1592
|
}, [t]);
|
|
1593
|
-
const
|
|
1593
|
+
const b = ae(
|
|
1594
1594
|
en((r) => {
|
|
1595
1595
|
a?.(r);
|
|
1596
1596
|
}, s),
|
|
1597
1597
|
[s, a]
|
|
1598
1598
|
);
|
|
1599
|
-
Z(() => (u !== t &&
|
|
1600
|
-
|
|
1601
|
-
}), [u,
|
|
1602
|
-
const
|
|
1599
|
+
Z(() => (u !== t && b(u), () => {
|
|
1600
|
+
b.cancel();
|
|
1601
|
+
}), [u, b, t]);
|
|
1602
|
+
const f = (r) => {
|
|
1603
1603
|
p(r.target.value);
|
|
1604
1604
|
};
|
|
1605
1605
|
return /* @__PURE__ */ n("div", { className: `search-bar-wrapper ${m}`, children: [
|
|
@@ -1614,7 +1614,7 @@ const $n = {
|
|
|
1614
1614
|
type: "search",
|
|
1615
1615
|
name: "search",
|
|
1616
1616
|
value: u,
|
|
1617
|
-
onChange:
|
|
1617
|
+
onChange: f,
|
|
1618
1618
|
...o
|
|
1619
1619
|
}
|
|
1620
1620
|
)
|
|
@@ -1633,8 +1633,8 @@ const $n = {
|
|
|
1633
1633
|
// From RHF's <Controller>
|
|
1634
1634
|
showSearch: p = !0
|
|
1635
1635
|
}) => {
|
|
1636
|
-
const [
|
|
1637
|
-
(d) => d.label.toLowerCase().includes(
|
|
1636
|
+
const [b, f] = M(""), r = b === "" ? i : i.filter(
|
|
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 }),
|
|
@@ -1661,12 +1661,12 @@ const $n = {
|
|
|
1661
1661
|
p && /* @__PURE__ */ e("div", { className: "search-input-wrapper", children: /* @__PURE__ */ e(
|
|
1662
1662
|
be,
|
|
1663
1663
|
{
|
|
1664
|
-
value:
|
|
1665
|
-
onDebouncedChange:
|
|
1664
|
+
value: b,
|
|
1665
|
+
onDebouncedChange: f,
|
|
1666
1666
|
placeholder: "Search..."
|
|
1667
1667
|
}
|
|
1668
1668
|
) }),
|
|
1669
|
-
/* @__PURE__ */ e("div", { className: "select-options-list", children: r.length === 0 &&
|
|
1669
|
+
/* @__PURE__ */ e("div", { className: "select-options-list", children: r.length === 0 && b !== "" ? /* @__PURE__ */ e("div", { className: "no-results", children: "No results found." }) : r.map((d) => /* @__PURE__ */ e(
|
|
1670
1670
|
Yr,
|
|
1671
1671
|
{
|
|
1672
1672
|
className: ({ active: h }) => `select-option ${h ? "active" : ""}`,
|
|
@@ -1719,14 +1719,14 @@ const $n = {
|
|
|
1719
1719
|
Z(() => {
|
|
1720
1720
|
xt([t], i) && o(!0);
|
|
1721
1721
|
}, [t, i]);
|
|
1722
|
-
const p = i === l,
|
|
1722
|
+
const p = i === l, b = !p && !!xt([t], i), f = (r) => {
|
|
1723
1723
|
r.preventDefault(), o(!m);
|
|
1724
1724
|
};
|
|
1725
1725
|
return /* @__PURE__ */ n(
|
|
1726
1726
|
"div",
|
|
1727
1727
|
{
|
|
1728
1728
|
className: H("nav-item-container", {
|
|
1729
|
-
"nav-item-container--parent-active":
|
|
1729
|
+
"nav-item-container--parent-active": b,
|
|
1730
1730
|
[`nav-item-container--level-${s}`]: s > 0
|
|
1731
1731
|
}),
|
|
1732
1732
|
children: [
|
|
@@ -1748,7 +1748,7 @@ const $n = {
|
|
|
1748
1748
|
"button",
|
|
1749
1749
|
{
|
|
1750
1750
|
className: "nav-chevron-button",
|
|
1751
|
-
onClick:
|
|
1751
|
+
onClick: f,
|
|
1752
1752
|
"aria-expanded": m,
|
|
1753
1753
|
"aria-label": m ? "Collapse menu" : "Expand menu",
|
|
1754
1754
|
children: /* @__PURE__ */ e(
|
|
@@ -1905,11 +1905,11 @@ const $n = {
|
|
|
1905
1905
|
// ✅ New prop to control visibility
|
|
1906
1906
|
...u
|
|
1907
1907
|
}) => {
|
|
1908
|
-
const p = a || u.name, [
|
|
1908
|
+
const p = a || u.name, [b, f] = M(
|
|
1909
1909
|
u.value?.length || u.defaultValue?.length || 0
|
|
1910
1910
|
), r = (d) => {
|
|
1911
|
-
|
|
1912
|
-
}, y = m -
|
|
1911
|
+
f(d.target.value.length), u.onChange && u.onChange(d);
|
|
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 }),
|
|
@@ -2010,15 +2010,15 @@ const $n = {
|
|
|
2010
2010
|
title: o,
|
|
2011
2011
|
description: u,
|
|
2012
2012
|
showProgress: p = !0,
|
|
2013
|
-
closeOnOverlayClick:
|
|
2013
|
+
closeOnOverlayClick: b = !0
|
|
2014
2014
|
}) => {
|
|
2015
|
-
const
|
|
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
|
{
|
|
2019
2019
|
as: "div",
|
|
2020
2020
|
className: "wizard-dialog",
|
|
2021
|
-
onClose:
|
|
2021
|
+
onClose: b ? a : () => {
|
|
2022
2022
|
},
|
|
2023
2023
|
children: [
|
|
2024
2024
|
/* @__PURE__ */ e(
|
|
@@ -2099,7 +2099,7 @@ const $n = {
|
|
|
2099
2099
|
},
|
|
2100
2100
|
className: "wizard-step-motion-wrapper",
|
|
2101
2101
|
style: { overflowX: "hidden" },
|
|
2102
|
-
children:
|
|
2102
|
+
children: f && /* @__PURE__ */ e(f, { ...m })
|
|
2103
2103
|
},
|
|
2104
2104
|
i
|
|
2105
2105
|
)
|
|
@@ -2130,8 +2130,8 @@ const $n = {
|
|
|
2130
2130
|
// Renamed for clarity, expecting a component type e.g., CheckCircle
|
|
2131
2131
|
disabled: u = !1,
|
|
2132
2132
|
size: p = "small",
|
|
2133
|
-
label:
|
|
2134
|
-
children:
|
|
2133
|
+
label: b,
|
|
2134
|
+
children: f,
|
|
2135
2135
|
// ✅ Add children to the props list
|
|
2136
2136
|
onClick: r,
|
|
2137
2137
|
...y
|
|
@@ -2468,41 +2468,41 @@ function Hn({
|
|
|
2468
2468
|
// timeout: 20000,
|
|
2469
2469
|
});
|
|
2470
2470
|
s.interceptors.response.use(
|
|
2471
|
-
(
|
|
2472
|
-
message:
|
|
2471
|
+
(b) => b?.data ?? {
|
|
2472
|
+
message: b?.statusText || "Request succeeded"
|
|
2473
2473
|
},
|
|
2474
|
-
(
|
|
2475
|
-
const
|
|
2476
|
-
return t && (r === 401 || r === 403) && (window.location.href.includes("/login") || (window.historyPath = window.location.pathname, localStorage.clear(), sessionStorage.clear(), window.location.href = "/login")), Promise.reject(
|
|
2474
|
+
(b) => {
|
|
2475
|
+
const f = Xn(b), r = f.status;
|
|
2476
|
+
return t && (r === 401 || r === 403) && (window.location.href.includes("/login") || (window.historyPath = window.location.pathname, localStorage.clear(), sessionStorage.clear(), window.location.href = "/login")), Promise.reject(f);
|
|
2477
2477
|
}
|
|
2478
2478
|
);
|
|
2479
|
-
function i({ open:
|
|
2480
|
-
if (
|
|
2479
|
+
function i({ open: b = !1, customHeader: f = {} } = {}) {
|
|
2480
|
+
if (b) {
|
|
2481
2481
|
const { Authorization: r, ...y } = It();
|
|
2482
2482
|
return {
|
|
2483
|
-
headers: { ...y, ...a, ...
|
|
2483
|
+
headers: { ...y, ...a, ...f }
|
|
2484
2484
|
};
|
|
2485
2485
|
}
|
|
2486
|
-
return { headers: { ...It(), ...
|
|
2486
|
+
return { headers: { ...It(), ...f } };
|
|
2487
2487
|
}
|
|
2488
|
-
async function l(
|
|
2489
|
-
return s.get(
|
|
2490
|
-
params:
|
|
2488
|
+
async function l(b, f, r = !1, y = {}) {
|
|
2489
|
+
return s.get(b, {
|
|
2490
|
+
params: f,
|
|
2491
2491
|
...i({ open: r, customHeader: y })
|
|
2492
2492
|
});
|
|
2493
2493
|
}
|
|
2494
|
-
async function m(
|
|
2494
|
+
async function m(b, f, r = !1, y = {}) {
|
|
2495
2495
|
const d = { ...i({ open: r, customHeader: y }) };
|
|
2496
|
-
return
|
|
2496
|
+
return f !== void 0 && (d.data = f), s.delete(b, d);
|
|
2497
2497
|
}
|
|
2498
|
-
async function o(
|
|
2499
|
-
return s.post(
|
|
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(
|
|
2502
|
-
return s.put(
|
|
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(
|
|
2505
|
-
return s.patch(
|
|
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,
|
|
@@ -2636,15 +2636,15 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2636
2636
|
className: "flex items-center justify-between p-3 border border-gray-300 rounded-lg hover:bg-gray-50 hover:cursor-pointer transition-colors duration-150",
|
|
2637
2637
|
children: [
|
|
2638
2638
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
2639
|
-
/* @__PURE__ */ e("div", { className: "flex items-center", children: l.map((
|
|
2639
|
+
/* @__PURE__ */ e("div", { className: "flex items-center", children: l.map((b, f) => /* @__PURE__ */ e(
|
|
2640
2640
|
"img",
|
|
2641
2641
|
{
|
|
2642
|
-
src:
|
|
2643
|
-
alt:
|
|
2644
|
-
className: `w-10 h-10 rounded-full border-2 border-white ${
|
|
2645
|
-
style: { zIndex:
|
|
2642
|
+
src: b.avatarUrl || `https://avatar.vercel.sh/${b.name}.svg?text=${b?.name?.charAt(0) || "U"}`,
|
|
2643
|
+
alt: b.name,
|
|
2644
|
+
className: `w-10 h-10 rounded-full border-2 border-white ${f > 0 ? "-ml-4" : ""}`,
|
|
2645
|
+
style: { zIndex: f }
|
|
2646
2646
|
},
|
|
2647
|
-
|
|
2647
|
+
b.id || f
|
|
2648
2648
|
)) }),
|
|
2649
2649
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-800 truncate", children: p })
|
|
2650
2650
|
] }),
|
|
@@ -2672,37 +2672,37 @@ 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,
|
|
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
|
-
watch:
|
|
2679
|
-
formState: { errors:
|
|
2678
|
+
watch: q,
|
|
2679
|
+
formState: { errors: C, isSubmitting: g }
|
|
2680
2680
|
} = lr({
|
|
2681
2681
|
defaultValues: { pendingInvites: [] },
|
|
2682
2682
|
resolver: cr(as)
|
|
2683
|
-
}), { fields: v, append: w, remove:
|
|
2684
|
-
control:
|
|
2683
|
+
}), { fields: v, append: w, remove: z, update: N } = ir({
|
|
2684
|
+
control: _,
|
|
2685
2685
|
name: "pendingInvites"
|
|
2686
|
-
}), x =
|
|
2686
|
+
}), x = q("pendingInvites");
|
|
2687
2687
|
Z(() => {
|
|
2688
|
-
y.length > 1 ? (
|
|
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(() =>
|
|
2690
|
+
}).catch((D) => console.error("Search failed:", D)).finally(() => E(!1))) : (h([]), T(/* @__PURE__ */ new Set()));
|
|
2691
2691
|
}, [y, p]);
|
|
2692
2692
|
const k = (D) => {
|
|
2693
2693
|
T((P) => {
|
|
2694
|
-
const
|
|
2695
|
-
return
|
|
2694
|
+
const V = new Set(P);
|
|
2695
|
+
return V.has(D) ? V.delete(D) : V.add(D), V;
|
|
2696
2696
|
});
|
|
2697
|
-
},
|
|
2697
|
+
}, F = () => {
|
|
2698
2698
|
d.filter((D) => $.has(D.id)).forEach((D) => {
|
|
2699
2699
|
v.find((P) => P.id === D.id) || w({ ...D, permission: I.name });
|
|
2700
2700
|
}), T(/* @__PURE__ */ new Set()), r("");
|
|
2701
2701
|
}, L = (D) => {
|
|
2702
|
-
|
|
2703
|
-
(P,
|
|
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 {
|
|
2707
2707
|
if (l === de.DRIVE) {
|
|
2708
2708
|
const P = D.pendingInvites.map((R) => ({
|
|
@@ -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) {
|
|
@@ -2790,7 +2790,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2790
2790
|
}
|
|
2791
2791
|
),
|
|
2792
2792
|
/* @__PURE__ */ n("div", { className: "relative grid grid-cols-3 gap-2 items-start", children: [
|
|
2793
|
-
/* @__PURE__ */ e("div", { className: "col-span-1", children: /* @__PURE__ */ e(K, { value: p, onChange:
|
|
2793
|
+
/* @__PURE__ */ e("div", { className: "col-span-1", children: /* @__PURE__ */ e(K, { value: p, onChange: b, children: /* @__PURE__ */ n("div", { className: "relative", children: [
|
|
2794
2794
|
/* @__PURE__ */ n(K.Button, { className: "relative w-full border border-gray-300 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: [
|
|
2795
2795
|
/* @__PURE__ */ n("span", { className: "flex items-center", children: [
|
|
2796
2796
|
/* @__PURE__ */ e(p.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
|
|
@@ -2839,10 +2839,10 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2839
2839
|
{
|
|
2840
2840
|
placeholder: `Search by ${p.name.toLowerCase()}...`,
|
|
2841
2841
|
onDebouncedChange: (D) => r(D),
|
|
2842
|
-
value:
|
|
2842
|
+
value: f
|
|
2843
2843
|
}
|
|
2844
2844
|
) }),
|
|
2845
|
-
/* @__PURE__ */ e(Ce, { children: (d?.length > 0 ||
|
|
2845
|
+
/* @__PURE__ */ e(Ce, { children: (d?.length > 0 || A) && /* @__PURE__ */ e(
|
|
2846
2846
|
le.div,
|
|
2847
2847
|
{
|
|
2848
2848
|
initial: { opacity: 0, y: -10 },
|
|
@@ -2850,7 +2850,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2850
2850
|
exit: { opacity: 0, y: -10 },
|
|
2851
2851
|
transition: { duration: 0.2 },
|
|
2852
2852
|
className: "absolute top-full mt-2 w-full col-span-3 bg-white border border-gray-300 rounded-lg shadow-lg z-10",
|
|
2853
|
-
children:
|
|
2853
|
+
children: A ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500", children: "Loading..." }) : /* @__PURE__ */ n(te, { children: [
|
|
2854
2854
|
/* @__PURE__ */ e("div", { className: "max-h-60 overflow-y-auto p-2 space-y-1", children: d.map((D) => {
|
|
2855
2855
|
const P = S(D);
|
|
2856
2856
|
return /* @__PURE__ */ n(
|
|
@@ -2899,7 +2899,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
2899
2899
|
/* @__PURE__ */ e(
|
|
2900
2900
|
"button",
|
|
2901
2901
|
{
|
|
2902
|
-
onClick:
|
|
2902
|
+
onClick: F,
|
|
2903
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"
|
|
@@ -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 ",
|
|
@@ -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
|
}
|
|
@@ -3046,10 +3046,10 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3046
3046
|
/* @__PURE__ */ e(
|
|
3047
3047
|
"button",
|
|
3048
3048
|
{
|
|
3049
|
-
onClick: () => G(
|
|
3050
|
-
disabled:
|
|
3049
|
+
onClick: () => G(U)(),
|
|
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
|
] })
|
|
@@ -3066,9 +3066,9 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3066
3066
|
middleware: [ia(8), oa(), ca({ padding: 8 })],
|
|
3067
3067
|
whileElementsMounted: da,
|
|
3068
3068
|
placement: "bottom-end"
|
|
3069
|
-
}), p = tn(u),
|
|
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.
|
|
@@ -3080,7 +3080,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3080
3080
|
K.Button,
|
|
3081
3081
|
{
|
|
3082
3082
|
ref: m.setReference,
|
|
3083
|
-
...
|
|
3083
|
+
...f(),
|
|
3084
3084
|
className: "relative min-w-[120px] text-left text-sm p-2 border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-opacity-75 hover:cursor-pointer",
|
|
3085
3085
|
children: [
|
|
3086
3086
|
/* @__PURE__ */ e("span", { className: "block truncate", children: t.permission }),
|
|
@@ -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] = M(l), [p,
|
|
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
|
-
(
|
|
3153
|
+
(E) => E.name.toLowerCase().includes(y.toLowerCase())
|
|
3154
3154
|
),
|
|
3155
3155
|
groups: o.groups.filter(
|
|
3156
|
-
(
|
|
3156
|
+
(E) => E.name.toLowerCase().includes(y.toLowerCase())
|
|
3157
3157
|
),
|
|
3158
3158
|
roles: o.roles.filter(
|
|
3159
|
-
(
|
|
3159
|
+
(E) => E.name.toLowerCase().includes(y.toLowerCase())
|
|
3160
3160
|
)
|
|
3161
|
-
}, h = async (
|
|
3161
|
+
}, h = async (E, I, j, _) => {
|
|
3162
3162
|
const G = I.value;
|
|
3163
|
-
u((
|
|
3164
|
-
...
|
|
3165
|
-
[
|
|
3166
|
-
(
|
|
3163
|
+
u((q) => ({
|
|
3164
|
+
...q,
|
|
3165
|
+
[j]: q[j].map(
|
|
3166
|
+
(C) => C.id === E.id ? { ...C, permission: G } : C
|
|
3167
3167
|
)
|
|
3168
3168
|
}));
|
|
3169
3169
|
}, $ = () => {
|
|
3170
|
-
const
|
|
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
|
-
a(
|
|
3176
|
-
}, T = ["users", "groups", "roles"],
|
|
3175
|
+
a(E);
|
|
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,26 +3200,26 @@ 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
|
|
3210
3210
|
}) => `w-full py-2 text-sm font-medium leading-5 rounded-md
|
|
3211
3211
|
focus:outline-none focus:ring-2 ring-offset-2 ring-offset-blue-400 ring-white ring-opacity-60
|
|
3212
3212
|
${I ? "bg-white shadow text-blue-700" : "text-gray-600 hover:bg-white/[0.6]"}`,
|
|
3213
|
-
children:
|
|
3213
|
+
children: E
|
|
3214
3214
|
},
|
|
3215
|
-
|
|
3215
|
+
E
|
|
3216
3216
|
)) }),
|
|
3217
3217
|
/* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ e(
|
|
3218
3218
|
be,
|
|
3219
3219
|
{
|
|
3220
3220
|
onDebouncedChange: r,
|
|
3221
|
-
value:
|
|
3222
|
-
placeholder: `Search in ${
|
|
3221
|
+
value: f,
|
|
3222
|
+
placeholder: `Search in ${A[p]}...`
|
|
3223
3223
|
}
|
|
3224
3224
|
) })
|
|
3225
3225
|
] }),
|
|
@@ -3230,11 +3230,11 @@ 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
|
-
children: /* @__PURE__ */ e(Ce, { children: d[
|
|
3237
|
+
children: /* @__PURE__ */ e(Ce, { children: d[E].length > 0 ? d[E].map((I) => /* @__PURE__ */ n(
|
|
3238
3238
|
le.div,
|
|
3239
3239
|
{
|
|
3240
3240
|
layout: !0,
|
|
@@ -3258,12 +3258,12 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3258
3258
|
),
|
|
3259
3259
|
/* @__PURE__ */ n("div", { className: "overflow-hidden", children: [
|
|
3260
3260
|
/* @__PURE__ */ e("p", { className: "font-medium text-gray-900 truncate", children: I.name }),
|
|
3261
|
-
|
|
3261
|
+
E !== "users" && /* @__PURE__ */ e(
|
|
3262
3262
|
"button",
|
|
3263
3263
|
{
|
|
3264
3264
|
onClick: () => i({
|
|
3265
3265
|
id: I.id,
|
|
3266
|
-
type:
|
|
3266
|
+
type: E,
|
|
3267
3267
|
name: I.name
|
|
3268
3268
|
}),
|
|
3269
3269
|
className: "text-sm text-blue-600 hover:underline hover:cursor-pointer",
|
|
@@ -3277,10 +3277,10 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3277
3277
|
{
|
|
3278
3278
|
item: I,
|
|
3279
3279
|
allowedPermissions: m,
|
|
3280
|
-
onPermissionChange: (
|
|
3280
|
+
onPermissionChange: (j) => h(
|
|
3281
3281
|
I,
|
|
3282
|
-
|
|
3283
|
-
|
|
3282
|
+
j,
|
|
3283
|
+
E
|
|
3284
3284
|
)
|
|
3285
3285
|
}
|
|
3286
3286
|
)
|
|
@@ -3299,16 +3299,16 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3299
3299
|
/* @__PURE__ */ e(Zt, { className: "h-12 w-12 text-gray-400" }),
|
|
3300
3300
|
/* @__PURE__ */ n("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: [
|
|
3301
3301
|
"No ",
|
|
3302
|
-
|
|
3302
|
+
A[p],
|
|
3303
3303
|
" Found"
|
|
3304
3304
|
] }),
|
|
3305
|
-
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children:
|
|
3305
|
+
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: f ? `No results for "${f}"` : `There are no ${A[p].toLowerCase()} with access.` })
|
|
3306
3306
|
]
|
|
3307
3307
|
}
|
|
3308
3308
|
)
|
|
3309
3309
|
) })
|
|
3310
3310
|
},
|
|
3311
|
-
|
|
3311
|
+
E
|
|
3312
3312
|
)) })
|
|
3313
3313
|
},
|
|
3314
3314
|
p
|
|
@@ -3338,9 +3338,9 @@ 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] = M(!0), [o, u] = M(""), p = Ct(o, 300),
|
|
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 },
|
|
3345
3345
|
visible: {
|
|
3346
3346
|
opacity: 1,
|
|
@@ -3355,7 +3355,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
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(
|
|
3359
3359
|
le.div,
|
|
3360
3360
|
{
|
|
3361
3361
|
initial: { opacity: 0, scale: 0.95 },
|
|
@@ -3370,11 +3370,11 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3370
3370
|
) : /* @__PURE__ */ e(
|
|
3371
3371
|
le.ul,
|
|
3372
3372
|
{
|
|
3373
|
-
variants:
|
|
3373
|
+
variants: f,
|
|
3374
3374
|
initial: "hidden",
|
|
3375
3375
|
animate: "visible",
|
|
3376
3376
|
className: "divide-y divide-gray-200",
|
|
3377
|
-
children: /* @__PURE__ */ e(Ce, { children:
|
|
3377
|
+
children: /* @__PURE__ */ e(Ce, { children: b.map((d) => /* @__PURE__ */ n(
|
|
3378
3378
|
le.li,
|
|
3379
3379
|
{
|
|
3380
3380
|
layout: !0,
|
|
@@ -3459,31 +3459,31 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
|
|
|
3459
3459
|
allowedPermissions: u = [],
|
|
3460
3460
|
...p
|
|
3461
3461
|
}) => {
|
|
3462
|
-
const [
|
|
3463
|
-
|
|
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
|
+
f(fe.INVITE), h(null), m();
|
|
3464
3464
|
}, G = () => {
|
|
3465
|
-
|
|
3466
|
-
},
|
|
3467
|
-
if (
|
|
3465
|
+
f(fe.MANAGE);
|
|
3466
|
+
}, q = async ({ id: v, name: w, type: z }) => {
|
|
3467
|
+
if (z === "groups") {
|
|
3468
3468
|
try {
|
|
3469
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: v, type:
|
|
3476
|
-
},
|
|
3475
|
+
h({ id: v, type: z, name: w }), j(b), f(fe.MEMBERS);
|
|
3476
|
+
}, C = (v) => {
|
|
3477
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,
|
|
3479
|
-
console.log("Existing data:", w), console.log("Changed data:",
|
|
3480
|
-
const N = !ct.isEqual(w,
|
|
3481
|
-
console.log("hasPermissionChanged:", N), T(N), b
|
|
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
|
-
switch (
|
|
3486
|
+
switch (b) {
|
|
3487
3487
|
case fe.MANAGE:
|
|
3488
3488
|
return /* @__PURE__ */ e(
|
|
3489
3489
|
le.div,
|
|
@@ -3497,9 +3497,9 @@ 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:
|
|
3502
|
-
onOpenMembers:
|
|
3500
|
+
onBack: C,
|
|
3501
|
+
onClose: _,
|
|
3502
|
+
onOpenMembers: q,
|
|
3503
3503
|
existingShares: r,
|
|
3504
3504
|
calledBy: l,
|
|
3505
3505
|
allowedPermissions: u
|
|
@@ -3521,11 +3521,11 @@ 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
|
-
members:
|
|
3528
|
+
members: A
|
|
3529
3529
|
}
|
|
3530
3530
|
)
|
|
3531
3531
|
},
|
|
@@ -3545,7 +3545,7 @@ 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,
|
|
@@ -3578,9 +3578,9 @@ function nt({
|
|
|
3578
3578
|
displayLimit: u = 3,
|
|
3579
3579
|
selectionLimit: p = -1,
|
|
3580
3580
|
// NEW: search behavior
|
|
3581
|
-
searchMode:
|
|
3581
|
+
searchMode: b = "client",
|
|
3582
3582
|
// "client" | "server"
|
|
3583
|
-
onSearch:
|
|
3583
|
+
onSearch: f,
|
|
3584
3584
|
// (query: string) => void (required if searchMode==="server")
|
|
3585
3585
|
serverLoading: r = !1,
|
|
3586
3586
|
minSearchChars: y = 2,
|
|
@@ -3588,30 +3588,30 @@ function nt({
|
|
|
3588
3588
|
getOptionId: d = ($) => String($.id),
|
|
3589
3589
|
getOptionLabel: h = ($) => $.name
|
|
3590
3590
|
}) {
|
|
3591
|
-
const $ = Qe(), T = Qe(), [
|
|
3591
|
+
const $ = Qe(), T = Qe(), [A, E] = M(""), I = xe(""), j = ue(() => {
|
|
3592
3592
|
const v = /* @__PURE__ */ new Map();
|
|
3593
3593
|
for (const w of a) v.set(d(w), w);
|
|
3594
3594
|
return v;
|
|
3595
|
-
}, [a, d]),
|
|
3596
|
-
if (!
|
|
3597
|
-
const 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
|
+
if (!A) return a;
|
|
3597
|
+
const v = A.toLowerCase();
|
|
3598
3598
|
return a.filter((w) => h(w).toLowerCase().includes(v));
|
|
3599
|
-
}, [a,
|
|
3599
|
+
}, [a, A, h]);
|
|
3600
3600
|
Z(() => {
|
|
3601
|
-
|
|
3602
|
-
}, [
|
|
3603
|
-
const
|
|
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 v =
|
|
3606
|
+
const v = _.slice(0, u), w = _.length - u;
|
|
3607
3607
|
return /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2", children: [
|
|
3608
|
-
v.map((
|
|
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
|
"+",
|
|
@@ -3620,8 +3620,8 @@ function nt({
|
|
|
3620
3620
|
] })
|
|
3621
3621
|
] });
|
|
3622
3622
|
};
|
|
3623
|
-
return /* @__PURE__ */ e(K, { value:
|
|
3624
|
-
const w = Array.from(new Set(v.map((
|
|
3623
|
+
return /* @__PURE__ */ e(K, { value: _, onChange: (v) => {
|
|
3624
|
+
const w = Array.from(new Set(v.map((z) => d(z))));
|
|
3625
3625
|
p !== -1 && w.length > p || i(w);
|
|
3626
3626
|
}, multiple: !0, by: "id", children: ({ open: v }) => /* @__PURE__ */ n("div", { children: [
|
|
3627
3627
|
/* @__PURE__ */ e(
|
|
@@ -3645,7 +3645,7 @@ function nt({
|
|
|
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
|
}
|
|
@@ -3662,35 +3662,35 @@ function nt({
|
|
|
3662
3662
|
/* @__PURE__ */ e("div", { className: "p-2 sticky top-0 bg-white z-20 shadow-sm", children: /* @__PURE__ */ e(
|
|
3663
3663
|
be,
|
|
3664
3664
|
{
|
|
3665
|
-
value:
|
|
3666
|
-
onDebouncedChange:
|
|
3667
|
-
placeholder:
|
|
3665
|
+
value: A,
|
|
3666
|
+
onDebouncedChange: E,
|
|
3667
|
+
placeholder: b === "server" ? `Search (min ${y})…` : "Search options…"
|
|
3668
3668
|
}
|
|
3669
3669
|
) }),
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
const
|
|
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 < 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
3676
|
value: w,
|
|
3677
3677
|
disabled: k,
|
|
3678
|
-
className: ({ active:
|
|
3679
|
-
k ? " text-gray-400 bg-white cursor-not-allowed" :
|
|
3678
|
+
className: ({ active: F }) => Ge(
|
|
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:
|
|
3682
|
+
children: ({ selected: F, active: L }) => /* @__PURE__ */ n(te, { children: [
|
|
3683
3683
|
/* @__PURE__ */ e(
|
|
3684
3684
|
"span",
|
|
3685
3685
|
{
|
|
3686
3686
|
className: Ge(
|
|
3687
|
-
|
|
3687
|
+
F ? "font-semibold" : "font-normal",
|
|
3688
3688
|
"block truncate"
|
|
3689
3689
|
),
|
|
3690
3690
|
children: N
|
|
3691
3691
|
}
|
|
3692
3692
|
),
|
|
3693
|
-
|
|
3693
|
+
F && /* @__PURE__ */ e(
|
|
3694
3694
|
"span",
|
|
3695
3695
|
{
|
|
3696
3696
|
className: Ge(
|
|
@@ -3702,7 +3702,7 @@ function nt({
|
|
|
3702
3702
|
)
|
|
3703
3703
|
] })
|
|
3704
3704
|
},
|
|
3705
|
-
|
|
3705
|
+
z
|
|
3706
3706
|
);
|
|
3707
3707
|
})
|
|
3708
3708
|
] })
|
|
@@ -3764,10 +3764,10 @@ const Wl = ({
|
|
|
3764
3764
|
secondaryAction: o = { onCancel: null, label: "Cancel" },
|
|
3765
3765
|
dialogPanelClass: u = ""
|
|
3766
3766
|
}) => {
|
|
3767
|
-
const p = (
|
|
3768
|
-
|
|
3769
|
-
},
|
|
3770
|
-
|
|
3767
|
+
const p = (f) => {
|
|
3768
|
+
f.target === f.currentTarget && a(!1);
|
|
3769
|
+
}, b = (f) => {
|
|
3770
|
+
f.stopPropagation();
|
|
3771
3771
|
};
|
|
3772
3772
|
return /* @__PURE__ */ n(
|
|
3773
3773
|
ye,
|
|
@@ -3787,7 +3787,7 @@ const Wl = ({
|
|
|
3787
3787
|
Ee,
|
|
3788
3788
|
{
|
|
3789
3789
|
className: `${u} relative bg-white align-middle w-full lg:w-[36rem] mx-5 lg:mx-0 transform overflow-hidden rounded-2xl text-left shadow-xl lg:min-w-[36rem] md:min-w-96 transition-all`,
|
|
3790
|
-
onClick:
|
|
3790
|
+
onClick: b,
|
|
3791
3791
|
children: [
|
|
3792
3792
|
/* @__PURE__ */ n("div", { className: "flex justify-between items-center border-b border-gray-200 p-6 flex-shrink-0", children: [
|
|
3793
3793
|
i?.customHeader && i.customHeader,
|
|
@@ -3798,7 +3798,7 @@ const Wl = ({
|
|
|
3798
3798
|
"div",
|
|
3799
3799
|
{
|
|
3800
3800
|
className: "px-5 mb-5",
|
|
3801
|
-
onClick:
|
|
3801
|
+
onClick: b,
|
|
3802
3802
|
children: s
|
|
3803
3803
|
}
|
|
3804
3804
|
),
|
|
@@ -3862,14 +3862,14 @@ function ds({
|
|
|
3862
3862
|
onDelete: u,
|
|
3863
3863
|
renderActions: p,
|
|
3864
3864
|
// optional override
|
|
3865
|
-
dragId:
|
|
3866
|
-
dropId:
|
|
3865
|
+
dragId: b,
|
|
3866
|
+
dropId: f,
|
|
3867
3867
|
indent: r = 24
|
|
3868
3868
|
}) {
|
|
3869
|
-
const { setNodeRef: y, isOver: d } = ur({ id:
|
|
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
3870
|
const v = G.trim();
|
|
3871
|
-
|
|
3872
|
-
},
|
|
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: [
|
|
@@ -3878,7 +3878,7 @@ function ds({
|
|
|
3878
3878
|
{ action: "delete", label: "Delete" }
|
|
3879
3879
|
],
|
|
3880
3880
|
onSelect: (w) => {
|
|
3881
|
-
w.action === "create" ? m?.(t) : w.action === "rename" ?
|
|
3881
|
+
w.action === "create" ? m?.(t) : w.action === "rename" ? _(!0) : w.action === "delete" && u?.(t);
|
|
3882
3882
|
}
|
|
3883
3883
|
}
|
|
3884
3884
|
), [t, m, u]);
|
|
@@ -3886,7 +3886,7 @@ function ds({
|
|
|
3886
3886
|
"div",
|
|
3887
3887
|
{
|
|
3888
3888
|
ref: y,
|
|
3889
|
-
className: `tv-row ${d ? "tv-drop-over" : ""} ${
|
|
3889
|
+
className: `tv-row ${d ? "tv-drop-over" : ""} ${E ? "dragging" : ""}`,
|
|
3890
3890
|
style: { ...I, paddingLeft: 8 + a * r },
|
|
3891
3891
|
onClick: (v) => {
|
|
3892
3892
|
v.target.closest(".tv-toggle") || v.target.tagName === "INPUT" || l?.(t);
|
|
@@ -3894,25 +3894,25 @@ function ds({
|
|
|
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: T, children:
|
|
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: (v) =>
|
|
3903
|
-
onBlur:
|
|
3902
|
+
onChange: (v) => q(v.target.value),
|
|
3903
|
+
onBlur: C,
|
|
3904
3904
|
onKeyDown: (v) => {
|
|
3905
|
-
v.key === "Enter" &&
|
|
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: () =>
|
|
3909
|
+
) : /* @__PURE__ */ e("span", { onDoubleClick: () => _(!0), children: t.name }) }),
|
|
3910
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
|
);
|
|
@@ -3939,14 +3939,14 @@ function gs(t, { rootId: a, getId: s, getParent: i, getName: l }) {
|
|
|
3939
3939
|
function bs(t, { rootId: a, getId: s, getName: i }) {
|
|
3940
3940
|
const l = /* @__PURE__ */ new Map();
|
|
3941
3941
|
function m(u, p) {
|
|
3942
|
-
const
|
|
3942
|
+
const b = s(u), f = {
|
|
3943
3943
|
...u,
|
|
3944
|
-
id:
|
|
3944
|
+
id: b,
|
|
3945
3945
|
name: i(u),
|
|
3946
3946
|
parentId: p || a,
|
|
3947
|
-
children: (u.children || []).map((r) => m(r,
|
|
3947
|
+
children: (u.children || []).map((r) => m(r, b))
|
|
3948
3948
|
};
|
|
3949
|
-
return l.set(
|
|
3949
|
+
return l.set(b, f), f;
|
|
3950
3950
|
}
|
|
3951
3951
|
return { roots: t.map((u) => m(u, null)), byId: l };
|
|
3952
3952
|
}
|
|
@@ -4000,8 +4000,8 @@ function Jl({
|
|
|
4000
4000
|
onSelect: o,
|
|
4001
4001
|
onCreateRoot: u,
|
|
4002
4002
|
onCreateChild: p,
|
|
4003
|
-
onRename:
|
|
4004
|
-
onDelete:
|
|
4003
|
+
onRename: b,
|
|
4004
|
+
onDelete: f,
|
|
4005
4005
|
onMove: r,
|
|
4006
4006
|
renderActions: y,
|
|
4007
4007
|
disableMoveToRoot: d = !1,
|
|
@@ -4011,93 +4011,93 @@ function Jl({
|
|
|
4011
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]), [T,
|
|
4015
|
-
const
|
|
4016
|
-
return (function L(
|
|
4017
|
-
|
|
4018
|
-
|
|
4014
|
+
), [t, a, i, l, m]), [T, A] = M({}), E = ae((k) => {
|
|
4015
|
+
const F = {};
|
|
4016
|
+
return (function L(U) {
|
|
4017
|
+
U.forEach((S) => {
|
|
4018
|
+
F[S.id] = !0, S.children?.length && L(S.children);
|
|
4019
4019
|
});
|
|
4020
|
-
})(k),
|
|
4020
|
+
})(k), F;
|
|
4021
4021
|
}, []);
|
|
4022
4022
|
se.useEffect(() => {
|
|
4023
|
-
|
|
4024
|
-
}, [$,
|
|
4025
|
-
const I =
|
|
4026
|
-
(k) =>
|
|
4023
|
+
A(E($));
|
|
4024
|
+
}, [$, E]);
|
|
4025
|
+
const I = ae(
|
|
4026
|
+
(k) => A((F) => ({ ...F, [k]: !F[k] })),
|
|
4027
4027
|
[]
|
|
4028
|
-
), [
|
|
4029
|
-
se.useEffect(() =>
|
|
4028
|
+
), [j, _] = M(() => Le($));
|
|
4029
|
+
se.useEffect(() => _(Le($)), [$]);
|
|
4030
4030
|
const G = pr(
|
|
4031
4031
|
gr(yr, { activationConstraint: { delay: 250, tolerance: 5 } })
|
|
4032
|
-
),
|
|
4033
|
-
},
|
|
4032
|
+
), q = xe(null), [C, g] = M(null), v = xe(0), w = () => {
|
|
4033
|
+
}, z = ({ delta: k }) => {
|
|
4034
4034
|
v.current = k?.x ?? 0;
|
|
4035
|
-
}, N =
|
|
4036
|
-
({ active: k, over:
|
|
4035
|
+
}, N = ae(
|
|
4036
|
+
({ active: k, over: F }) => {
|
|
4037
4037
|
const L = v.current;
|
|
4038
|
-
if (v.current = 0,
|
|
4039
|
-
const
|
|
4040
|
-
if (!
|
|
4038
|
+
if (v.current = 0, g(null), !k || !F) return;
|
|
4039
|
+
const U = String(k.id).replace(/^drag-/, ""), S = String(F.id).replace(/^drop-/, "");
|
|
4040
|
+
if (!U || !S || U === S) return;
|
|
4041
4041
|
let O = S;
|
|
4042
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++) {
|
|
4046
|
-
const
|
|
4047
|
-
if (!
|
|
4048
|
-
if (!
|
|
4046
|
+
const B = Ta(j, W, null);
|
|
4047
|
+
if (!B) break;
|
|
4048
|
+
if (!B.parentId) {
|
|
4049
4049
|
O = a;
|
|
4050
4050
|
break;
|
|
4051
4051
|
}
|
|
4052
|
-
O =
|
|
4052
|
+
O = B.parentId, W = B.parentId;
|
|
4053
4053
|
}
|
|
4054
4054
|
}
|
|
4055
4055
|
if (d && O === a) {
|
|
4056
|
-
|
|
4056
|
+
_(Le($));
|
|
4057
4057
|
return;
|
|
4058
4058
|
}
|
|
4059
|
-
const P = Le(
|
|
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
|
-
[
|
|
4065
|
-
), x =
|
|
4066
|
-
(k,
|
|
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
4070
|
node: L,
|
|
4071
|
-
depth:
|
|
4071
|
+
depth: F,
|
|
4072
4072
|
expanded: !!T[L.id],
|
|
4073
4073
|
onToggle: () => I(L.id),
|
|
4074
4074
|
onSelect: o,
|
|
4075
4075
|
onCreateChild: p,
|
|
4076
|
-
onRename:
|
|
4077
|
-
onDelete:
|
|
4076
|
+
onRename: b,
|
|
4077
|
+
onDelete: f,
|
|
4078
4078
|
renderActions: y,
|
|
4079
4079
|
dragId: `drag-${L.id}`,
|
|
4080
4080
|
dropId: `drop-${L.id}`,
|
|
4081
4081
|
indent: h
|
|
4082
4082
|
}
|
|
4083
4083
|
),
|
|
4084
|
-
T[L.id] && L.children?.length > 0 ? x(L.children,
|
|
4084
|
+
T[L.id] && L.children?.length > 0 ? x(L.children, F + 1) : null
|
|
4085
4085
|
] }, L.id)),
|
|
4086
|
-
[T, h, p,
|
|
4086
|
+
[T, h, p, f, b, o, y, I]
|
|
4087
4087
|
);
|
|
4088
4088
|
return se.useMemo(() => {
|
|
4089
|
-
if (!
|
|
4090
|
-
const k = String(
|
|
4091
|
-
function
|
|
4092
|
-
for (const
|
|
4093
|
-
if (
|
|
4094
|
-
const S =
|
|
4089
|
+
if (!C) return null;
|
|
4090
|
+
const k = String(C).replace(/^drag-/, "");
|
|
4091
|
+
function F(L) {
|
|
4092
|
+
for (const U of L) {
|
|
4093
|
+
if (U.id === k) return U;
|
|
4094
|
+
const S = U.children?.length ? F(U.children) : null;
|
|
4095
4095
|
if (S) return S;
|
|
4096
4096
|
}
|
|
4097
4097
|
return null;
|
|
4098
4098
|
}
|
|
4099
|
-
return
|
|
4100
|
-
}, [
|
|
4099
|
+
return F(j);
|
|
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" })
|
|
@@ -4113,10 +4113,10 @@ function Jl({
|
|
|
4113
4113
|
collisionDetection: xr,
|
|
4114
4114
|
sensors: G,
|
|
4115
4115
|
onDragStart: w,
|
|
4116
|
-
onDragMove:
|
|
4116
|
+
onDragMove: z,
|
|
4117
4117
|
onDragEnd: N,
|
|
4118
4118
|
modifiers: [fr],
|
|
4119
|
-
children: /* @__PURE__ */ e("div", { ref:
|
|
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",
|
|
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
4140
|
y ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
|
|
4141
|
-
),
|
|
4141
|
+
), f = (y) => ke(
|
|
4142
4142
|
"text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
|
|
4143
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 ?
|
|
4145
|
-
return /* @__PURE__ */ e(
|
|
4146
|
-
/* @__PURE__ */ e(
|
|
4147
|
-
/* @__PURE__ */ e(
|
|
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
|
};
|
|
@@ -4170,11 +4170,11 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4170
4170
|
console.log("Updated Section data for", t.key, r), u(r);
|
|
4171
4171
|
}
|
|
4172
4172
|
}, [a, t.key]), console.log("Section data", o);
|
|
4173
|
-
const
|
|
4173
|
+
const b = xe(o);
|
|
4174
4174
|
Z(() => {
|
|
4175
|
-
|
|
4175
|
+
b.current !== o && s && typeof s == "function" && (b.current = o, s(l.key, o));
|
|
4176
4176
|
}, [l.key, o, s]);
|
|
4177
|
-
const
|
|
4177
|
+
const f = (r) => {
|
|
4178
4178
|
if (!r.dependsOn) return !0;
|
|
4179
4179
|
const { field: y, value: d, operator: h = "equals" } = r.dependsOn, $ = o[y];
|
|
4180
4180
|
switch (h) {
|
|
@@ -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, y) =>
|
|
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
|
{
|
|
@@ -4637,66 +4637,66 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4637
4637
|
const vs = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
|
|
4638
4638
|
function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
4639
4639
|
console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
|
|
4640
|
-
const [l, m] = M(t), [o, u] = M(null), [p,
|
|
4640
|
+
const [l, m] = M(t), [o, u] = M(null), [p, b] = M(null);
|
|
4641
4641
|
console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
|
|
4642
|
-
const [
|
|
4643
|
-
const
|
|
4642
|
+
const [f, r] = M(() => {
|
|
4643
|
+
const g = a && a[l.key] || [], v = g.length > 0 ? g : [{ id: 0 }];
|
|
4644
4644
|
return console.log(`[DataTableRenderer] ${l.key} - Initial data:`, v), v;
|
|
4645
4645
|
}), y = xe(a);
|
|
4646
4646
|
Z(() => {
|
|
4647
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
4648
|
y.current = a;
|
|
4649
|
-
const
|
|
4649
|
+
const g = a && a[l.key] || [], v = g.length > 0 ? g : [{ id: 0 }];
|
|
4650
4650
|
console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, v), r(v);
|
|
4651
4651
|
}
|
|
4652
4652
|
}, [a, l.key]);
|
|
4653
|
-
const d = xe(
|
|
4653
|
+
const d = xe(f), h = xe(null);
|
|
4654
4654
|
Z(() => {
|
|
4655
|
-
d.current !==
|
|
4656
|
-
s(l.key,
|
|
4655
|
+
d.current !== f && s && typeof s == "function" && (d.current = f, h.current && clearTimeout(h.current), h.current = setTimeout(() => {
|
|
4656
|
+
s(l.key, f);
|
|
4657
4657
|
}, 300));
|
|
4658
|
-
}, [l.key,
|
|
4658
|
+
}, [l.key, f, s]), Z(() => () => {
|
|
4659
4659
|
h.current && clearTimeout(h.current);
|
|
4660
4660
|
}, []);
|
|
4661
|
-
const $ = (
|
|
4661
|
+
const $ = (g) => {
|
|
4662
4662
|
const v = (N, x) => {
|
|
4663
4663
|
console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: N, value: x, type: typeof x }), r((k) => {
|
|
4664
|
-
const
|
|
4665
|
-
return
|
|
4664
|
+
const F = [...k];
|
|
4665
|
+
return F[N][g.key] = x, F;
|
|
4666
4666
|
});
|
|
4667
|
-
}, w = (N) => i[l.key]?.[N]?.[
|
|
4667
|
+
}, w = (N) => i[l.key]?.[N]?.[g.key], z = (N) => {
|
|
4668
4668
|
const x = w(N);
|
|
4669
4669
|
return x ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: x }) : null;
|
|
4670
4670
|
};
|
|
4671
|
-
switch (
|
|
4671
|
+
switch (g.fieldtype) {
|
|
4672
4672
|
case "text":
|
|
4673
4673
|
return (N, x) => /* @__PURE__ */ n("div", { children: [
|
|
4674
4674
|
/* @__PURE__ */ e(
|
|
4675
4675
|
X,
|
|
4676
4676
|
{
|
|
4677
|
-
value: N[
|
|
4677
|
+
value: N[g.key] || "",
|
|
4678
4678
|
onChange: (k) => v(x, k.target.value),
|
|
4679
|
-
placeholder:
|
|
4680
|
-
required:
|
|
4679
|
+
placeholder: g.placeholder || `Enter ${g.label}`,
|
|
4680
|
+
required: g.required,
|
|
4681
4681
|
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4682
4682
|
}
|
|
4683
4683
|
),
|
|
4684
|
-
|
|
4684
|
+
z(x)
|
|
4685
4685
|
] });
|
|
4686
4686
|
case "textarea":
|
|
4687
4687
|
return (N, x) => /* @__PURE__ */ n("div", { children: [
|
|
4688
4688
|
/* @__PURE__ */ e(
|
|
4689
4689
|
ya,
|
|
4690
4690
|
{
|
|
4691
|
-
value: N[
|
|
4691
|
+
value: N[g.key] || "",
|
|
4692
4692
|
onChange: (k) => v(x, k.target.value),
|
|
4693
|
-
placeholder:
|
|
4694
|
-
required:
|
|
4693
|
+
placeholder: g.placeholder || `Enter ${g.label}`,
|
|
4694
|
+
required: g.required,
|
|
4695
4695
|
className: `w-full ${w(x) ? "border-red-500" : ""}`,
|
|
4696
4696
|
rows: 3
|
|
4697
4697
|
}
|
|
4698
4698
|
),
|
|
4699
|
-
|
|
4699
|
+
z(x)
|
|
4700
4700
|
] });
|
|
4701
4701
|
case "number":
|
|
4702
4702
|
return (N, x) => /* @__PURE__ */ n("div", { children: [
|
|
@@ -4704,14 +4704,14 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4704
4704
|
X,
|
|
4705
4705
|
{
|
|
4706
4706
|
type: "number",
|
|
4707
|
-
value: N[
|
|
4707
|
+
value: N[g.key] || "",
|
|
4708
4708
|
onChange: (k) => v(x, k.target.value),
|
|
4709
|
-
placeholder:
|
|
4710
|
-
required:
|
|
4709
|
+
placeholder: g.placeholder || `Enter ${g.label}`,
|
|
4710
|
+
required: g.required,
|
|
4711
4711
|
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4712
4712
|
}
|
|
4713
4713
|
),
|
|
4714
|
-
|
|
4714
|
+
z(x)
|
|
4715
4715
|
] });
|
|
4716
4716
|
case "email":
|
|
4717
4717
|
return (N, x) => /* @__PURE__ */ n("div", { children: [
|
|
@@ -4719,14 +4719,14 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4719
4719
|
X,
|
|
4720
4720
|
{
|
|
4721
4721
|
type: "email",
|
|
4722
|
-
value: N[
|
|
4722
|
+
value: N[g.key] || "",
|
|
4723
4723
|
onChange: (k) => v(x, k.target.value),
|
|
4724
|
-
placeholder:
|
|
4725
|
-
required:
|
|
4724
|
+
placeholder: g.placeholder || "Enter email address",
|
|
4725
|
+
required: g.required,
|
|
4726
4726
|
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4727
4727
|
}
|
|
4728
4728
|
),
|
|
4729
|
-
|
|
4729
|
+
z(x)
|
|
4730
4730
|
] });
|
|
4731
4731
|
case "url":
|
|
4732
4732
|
return (N, x) => /* @__PURE__ */ n("div", { children: [
|
|
@@ -4734,14 +4734,14 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4734
4734
|
X,
|
|
4735
4735
|
{
|
|
4736
4736
|
type: "url",
|
|
4737
|
-
value: N[
|
|
4737
|
+
value: N[g.key] || "",
|
|
4738
4738
|
onChange: (k) => v(x, k.target.value),
|
|
4739
|
-
placeholder:
|
|
4740
|
-
required:
|
|
4739
|
+
placeholder: g.placeholder || "Enter URL",
|
|
4740
|
+
required: g.required,
|
|
4741
4741
|
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4742
4742
|
}
|
|
4743
4743
|
),
|
|
4744
|
-
|
|
4744
|
+
z(x)
|
|
4745
4745
|
] });
|
|
4746
4746
|
case "password":
|
|
4747
4747
|
return (N, x) => /* @__PURE__ */ n("div", { children: [
|
|
@@ -4749,14 +4749,14 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4749
4749
|
X,
|
|
4750
4750
|
{
|
|
4751
4751
|
type: "password",
|
|
4752
|
-
value: N[
|
|
4752
|
+
value: N[g.key] || "",
|
|
4753
4753
|
onChange: (k) => v(x, k.target.value),
|
|
4754
|
-
placeholder:
|
|
4755
|
-
required:
|
|
4754
|
+
placeholder: g.placeholder || "Enter password",
|
|
4755
|
+
required: g.required,
|
|
4756
4756
|
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4757
4757
|
}
|
|
4758
4758
|
),
|
|
4759
|
-
|
|
4759
|
+
z(x)
|
|
4760
4760
|
] });
|
|
4761
4761
|
case "select":
|
|
4762
4762
|
case "dropdown":
|
|
@@ -4764,57 +4764,57 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4764
4764
|
/* @__PURE__ */ e(
|
|
4765
4765
|
ft,
|
|
4766
4766
|
{
|
|
4767
|
-
value: N[
|
|
4767
|
+
value: N[g.key] || "",
|
|
4768
4768
|
onChange: (k) => v(x, k),
|
|
4769
|
-
options:
|
|
4770
|
-
placeholder:
|
|
4771
|
-
required:
|
|
4769
|
+
options: g.options || [],
|
|
4770
|
+
placeholder: g.placeholder || `Select ${g.label}`,
|
|
4771
|
+
required: g.required,
|
|
4772
4772
|
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4773
4773
|
}
|
|
4774
4774
|
),
|
|
4775
|
-
|
|
4775
|
+
z(x)
|
|
4776
4776
|
] });
|
|
4777
4777
|
case "selectDynamic":
|
|
4778
4778
|
return (N, x) => {
|
|
4779
4779
|
const k = () => {
|
|
4780
|
-
if (
|
|
4781
|
-
const { config:
|
|
4780
|
+
if (g.optionsFrom && a) {
|
|
4781
|
+
const { config: F, valueField: L, labelField: U } = g.optionsFrom, S = a[F] || [];
|
|
4782
4782
|
if (Array.isArray(S))
|
|
4783
4783
|
return S.map((O) => ({
|
|
4784
4784
|
id: O[L] || "",
|
|
4785
4785
|
value: O[L] || "",
|
|
4786
|
-
label: O[
|
|
4786
|
+
label: O[U] || ""
|
|
4787
4787
|
}));
|
|
4788
4788
|
}
|
|
4789
|
-
return
|
|
4789
|
+
return g.options || [];
|
|
4790
4790
|
};
|
|
4791
4791
|
return /* @__PURE__ */ n("div", { children: [
|
|
4792
4792
|
/* @__PURE__ */ e(
|
|
4793
4793
|
ft,
|
|
4794
4794
|
{
|
|
4795
4795
|
index: x,
|
|
4796
|
-
value: N[
|
|
4797
|
-
onChange: (
|
|
4796
|
+
value: N[g.key] || "",
|
|
4797
|
+
onChange: (F) => v(x, F),
|
|
4798
4798
|
options: k(),
|
|
4799
|
-
placeholder:
|
|
4800
|
-
required:
|
|
4799
|
+
placeholder: g.placeholder || `Select ${g.label}`,
|
|
4800
|
+
required: g.required,
|
|
4801
4801
|
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4802
4802
|
},
|
|
4803
4803
|
Math.random()
|
|
4804
4804
|
),
|
|
4805
|
-
|
|
4805
|
+
z(x)
|
|
4806
4806
|
] });
|
|
4807
4807
|
};
|
|
4808
4808
|
case "multiselect":
|
|
4809
4809
|
return (N, x) => {
|
|
4810
|
-
const k = N[
|
|
4810
|
+
const k = N[g.key] || [];
|
|
4811
4811
|
return /* @__PURE__ */ e(
|
|
4812
4812
|
nt,
|
|
4813
4813
|
{
|
|
4814
4814
|
selectedItems: k,
|
|
4815
|
-
onSelectionChange: (
|
|
4816
|
-
options:
|
|
4817
|
-
placeholder:
|
|
4815
|
+
onSelectionChange: (F) => v(x, F),
|
|
4816
|
+
options: g.options || [],
|
|
4817
|
+
placeholder: g.placeholder || `Select ${g.label}`,
|
|
4818
4818
|
className: "w-full"
|
|
4819
4819
|
}
|
|
4820
4820
|
);
|
|
@@ -4824,9 +4824,9 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4824
4824
|
return (N, x) => /* @__PURE__ */ e(
|
|
4825
4825
|
ma,
|
|
4826
4826
|
{
|
|
4827
|
-
checked: !!N[
|
|
4827
|
+
checked: !!N[g.key],
|
|
4828
4828
|
onChange: (k) => v(x, k),
|
|
4829
|
-
label:
|
|
4829
|
+
label: g.placeholder || g.label,
|
|
4830
4830
|
className: "w-full"
|
|
4831
4831
|
}
|
|
4832
4832
|
);
|
|
@@ -4835,9 +4835,9 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4835
4835
|
return (N, x) => /* @__PURE__ */ e(
|
|
4836
4836
|
va,
|
|
4837
4837
|
{
|
|
4838
|
-
isOn: !!N[
|
|
4838
|
+
isOn: !!N[g.key],
|
|
4839
4839
|
onToggle: (k) => v(x, k),
|
|
4840
|
-
label:
|
|
4840
|
+
label: g.placeholder || g.label,
|
|
4841
4841
|
className: "w-full"
|
|
4842
4842
|
}
|
|
4843
4843
|
);
|
|
@@ -4845,9 +4845,9 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4845
4845
|
return (N, x) => /* @__PURE__ */ e(
|
|
4846
4846
|
ga,
|
|
4847
4847
|
{
|
|
4848
|
-
selectedDate: N[
|
|
4848
|
+
selectedDate: N[g.key] ? new Date(N[g.key]) : null,
|
|
4849
4849
|
onDateChange: (k) => v(x, k ? k.toISOString().split("T")[0] : ""),
|
|
4850
|
-
placeholder:
|
|
4850
|
+
placeholder: g.placeholder || "Select date",
|
|
4851
4851
|
className: "w-full"
|
|
4852
4852
|
}
|
|
4853
4853
|
);
|
|
@@ -4856,10 +4856,10 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4856
4856
|
X,
|
|
4857
4857
|
{
|
|
4858
4858
|
type: "datetime-local",
|
|
4859
|
-
value: N[
|
|
4859
|
+
value: N[g.key] || "",
|
|
4860
4860
|
onChange: (k) => v(x, k.target.value),
|
|
4861
|
-
placeholder:
|
|
4862
|
-
required:
|
|
4861
|
+
placeholder: g.placeholder || "Select date and time",
|
|
4862
|
+
required: g.required,
|
|
4863
4863
|
className: "w-full"
|
|
4864
4864
|
}
|
|
4865
4865
|
);
|
|
@@ -4868,10 +4868,10 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4868
4868
|
X,
|
|
4869
4869
|
{
|
|
4870
4870
|
type: "time",
|
|
4871
|
-
value: N[
|
|
4871
|
+
value: N[g.key] || "",
|
|
4872
4872
|
onChange: (k) => v(x, k.target.value),
|
|
4873
|
-
placeholder:
|
|
4874
|
-
required:
|
|
4873
|
+
placeholder: g.placeholder || "Select time",
|
|
4874
|
+
required: g.required,
|
|
4875
4875
|
className: "w-full"
|
|
4876
4876
|
}
|
|
4877
4877
|
);
|
|
@@ -4879,9 +4879,9 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4879
4879
|
return (N, x) => /* @__PURE__ */ e(
|
|
4880
4880
|
ba,
|
|
4881
4881
|
{
|
|
4882
|
-
selectedValue: N[
|
|
4882
|
+
selectedValue: N[g.key] || "",
|
|
4883
4883
|
onValueChange: (k) => v(x, k),
|
|
4884
|
-
options:
|
|
4884
|
+
options: g.options || [],
|
|
4885
4885
|
className: "w-full"
|
|
4886
4886
|
}
|
|
4887
4887
|
);
|
|
@@ -4889,37 +4889,37 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4889
4889
|
return (N, x) => /* @__PURE__ */ e(
|
|
4890
4890
|
be,
|
|
4891
4891
|
{
|
|
4892
|
-
value: N[
|
|
4892
|
+
value: N[g.key] || "",
|
|
4893
4893
|
onChange: (k) => v(x, k),
|
|
4894
|
-
placeholder:
|
|
4894
|
+
placeholder: g.placeholder || `Search ${g.label}`,
|
|
4895
4895
|
className: "w-full"
|
|
4896
4896
|
}
|
|
4897
4897
|
);
|
|
4898
4898
|
case "audience":
|
|
4899
4899
|
return (N, x) => {
|
|
4900
|
-
const k = N[
|
|
4900
|
+
const k = N[g.key] || { users: [], groups: [], roles: [] }, F = [
|
|
4901
4901
|
...k.users || [],
|
|
4902
4902
|
...k.groups || [],
|
|
4903
4903
|
...k.roles || []
|
|
4904
4904
|
];
|
|
4905
4905
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
4906
|
-
/* @__PURE__ */ e(vs, { children:
|
|
4906
|
+
/* @__PURE__ */ e(vs, { children: F.length > 0 ? F.slice(0, 3).map((L, U) => /* @__PURE__ */ e(
|
|
4907
4907
|
ze,
|
|
4908
4908
|
{
|
|
4909
4909
|
size: "small",
|
|
4910
4910
|
name: L.name || L.displayName || L.id,
|
|
4911
4911
|
src: L.avatarUrl
|
|
4912
4912
|
},
|
|
4913
|
-
|
|
4913
|
+
U
|
|
4914
4914
|
)) : null }),
|
|
4915
4915
|
/* @__PURE__ */ e(
|
|
4916
4916
|
"button",
|
|
4917
4917
|
{
|
|
4918
4918
|
className: "text-blue-600 font-semibold hover:text-blue-800",
|
|
4919
4919
|
onClick: () => {
|
|
4920
|
-
g
|
|
4920
|
+
b(g.key), u(x);
|
|
4921
4921
|
},
|
|
4922
|
-
children:
|
|
4922
|
+
children: F.length > 0 ? "Edit" : "Assign"
|
|
4923
4923
|
}
|
|
4924
4924
|
)
|
|
4925
4925
|
] });
|
|
@@ -4929,7 +4929,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4929
4929
|
X,
|
|
4930
4930
|
{
|
|
4931
4931
|
type: "color",
|
|
4932
|
-
value: N[
|
|
4932
|
+
value: N[g.key] || "#000000",
|
|
4933
4933
|
onChange: (k) => v(x, k.target.value),
|
|
4934
4934
|
className: "w-full h-10"
|
|
4935
4935
|
}
|
|
@@ -4940,15 +4940,15 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4940
4940
|
X,
|
|
4941
4941
|
{
|
|
4942
4942
|
type: "range",
|
|
4943
|
-
value: N[
|
|
4943
|
+
value: N[g.key] || g.min || 0,
|
|
4944
4944
|
onChange: (k) => v(x, k.target.value),
|
|
4945
|
-
min:
|
|
4946
|
-
max:
|
|
4947
|
-
step:
|
|
4945
|
+
min: g.min || 0,
|
|
4946
|
+
max: g.max || 100,
|
|
4947
|
+
step: g.step || 1,
|
|
4948
4948
|
className: "w-full"
|
|
4949
4949
|
}
|
|
4950
4950
|
),
|
|
4951
|
-
/* @__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 })
|
|
4952
4952
|
] });
|
|
4953
4953
|
case "file":
|
|
4954
4954
|
return (N, x) => /* @__PURE__ */ e(
|
|
@@ -4956,10 +4956,10 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4956
4956
|
{
|
|
4957
4957
|
type: "file",
|
|
4958
4958
|
onChange: (k) => {
|
|
4959
|
-
const
|
|
4960
|
-
v(x,
|
|
4959
|
+
const F = k.target.files[0];
|
|
4960
|
+
v(x, F ? F.name : "");
|
|
4961
4961
|
},
|
|
4962
|
-
accept:
|
|
4962
|
+
accept: g.accept,
|
|
4963
4963
|
className: "w-full"
|
|
4964
4964
|
}
|
|
4965
4965
|
);
|
|
@@ -4968,7 +4968,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4968
4968
|
X,
|
|
4969
4969
|
{
|
|
4970
4970
|
type: "hidden",
|
|
4971
|
-
value: N[
|
|
4971
|
+
value: N[g.key] || "",
|
|
4972
4972
|
onChange: (k) => v(x, k.target.value)
|
|
4973
4973
|
}
|
|
4974
4974
|
);
|
|
@@ -4978,52 +4978,52 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4978
4978
|
/* @__PURE__ */ e(
|
|
4979
4979
|
X,
|
|
4980
4980
|
{
|
|
4981
|
-
value: N[
|
|
4981
|
+
value: N[g.key] || "",
|
|
4982
4982
|
onChange: (k) => v(x, k.target.value),
|
|
4983
|
-
placeholder:
|
|
4984
|
-
required:
|
|
4983
|
+
placeholder: g.placeholder || `Enter ${g.label}`,
|
|
4984
|
+
required: g.required,
|
|
4985
4985
|
className: `w-full ${w(x) ? "border-red-500" : ""}`
|
|
4986
4986
|
}
|
|
4987
4987
|
),
|
|
4988
|
-
|
|
4988
|
+
z(x)
|
|
4989
4989
|
] });
|
|
4990
4990
|
}
|
|
4991
|
-
}, T =
|
|
4992
|
-
console.log("[DataTableRenderer] Adding blank row"), r((
|
|
4993
|
-
console.log("[DataTableRenderer] Current data before add:",
|
|
4991
|
+
}, T = ae(() => {
|
|
4992
|
+
console.log("[DataTableRenderer] Adding blank row"), r((g) => {
|
|
4993
|
+
console.log("[DataTableRenderer] Current data before add:", g);
|
|
4994
4994
|
const v = {
|
|
4995
|
-
id:
|
|
4995
|
+
id: g.length
|
|
4996
4996
|
// Assign next available ID
|
|
4997
4997
|
};
|
|
4998
|
-
l.fields.forEach((
|
|
4999
|
-
|
|
4998
|
+
l.fields.forEach((z) => {
|
|
4999
|
+
z.fieldtype === "audience" ? v[z.key] = { users: [], groups: [], roles: [] } : v[z.key] = z.default || "";
|
|
5000
5000
|
}), console.log("[DataTableRenderer] New blank row:", v);
|
|
5001
|
-
const w = [...
|
|
5001
|
+
const w = [...g, v];
|
|
5002
5002
|
return console.log("[DataTableRenderer] Updated data:", w), w;
|
|
5003
5003
|
});
|
|
5004
|
-
}, [l.fields]),
|
|
5004
|
+
}, [l.fields]), A = ae((g) => {
|
|
5005
5005
|
r((v) => {
|
|
5006
5006
|
if (v.length <= 1)
|
|
5007
5007
|
return v;
|
|
5008
5008
|
const w = [...v];
|
|
5009
|
-
return w.splice(
|
|
5009
|
+
return w.splice(g, 1), w;
|
|
5010
5010
|
});
|
|
5011
|
-
}, []), [
|
|
5012
|
-
I(v),
|
|
5013
|
-
}, []),
|
|
5014
|
-
|
|
5015
|
-
}, []), G =
|
|
5016
|
-
|
|
5017
|
-
const
|
|
5018
|
-
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;
|
|
5019
5019
|
}), I(null));
|
|
5020
|
-
}, [
|
|
5020
|
+
}, [E]), q = ae(() => {
|
|
5021
5021
|
I(null);
|
|
5022
|
-
}, []),
|
|
5023
|
-
console.log("[DataTableRenderer] handleAddAudience called with:",
|
|
5022
|
+
}, []), C = ae((g) => {
|
|
5023
|
+
console.log("[DataTableRenderer] handleAddAudience called with:", g), r((v) => {
|
|
5024
5024
|
const w = [...v];
|
|
5025
5025
|
if (o !== null && p && w[o]) {
|
|
5026
|
-
const
|
|
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
5027
|
w[o][p] = {
|
|
5028
5028
|
users: [...w[o][p]?.users || [], ...N],
|
|
5029
5029
|
groups: [...w[o][p]?.groups || [], ...x],
|
|
@@ -5031,7 +5031,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5031
5031
|
}, console.log("[DataTableRenderer] Updated audience data:", w[o][p]);
|
|
5032
5032
|
}
|
|
5033
5033
|
return w;
|
|
5034
|
-
}), u(null),
|
|
5034
|
+
}), u(null), b(null);
|
|
5035
5035
|
}, [o, p]);
|
|
5036
5036
|
return /* @__PURE__ */ n("div", { children: [
|
|
5037
5037
|
/* @__PURE__ */ n("div", { style: { marginBottom: "20px" }, children: [
|
|
@@ -5051,32 +5051,32 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5051
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: [
|
|
5052
5052
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { className: "bg-gray-50", children: [
|
|
5053
5053
|
/* @__PURE__ */ e("th", { className: "px-4 py-2 w-10" }),
|
|
5054
|
-
l.fields.map((
|
|
5054
|
+
l.fields.map((g, v) => /* @__PURE__ */ e(
|
|
5055
5055
|
"th",
|
|
5056
5056
|
{
|
|
5057
5057
|
className: "px-4 py-2 text-left text-sm font-medium text-gray-700",
|
|
5058
|
-
children:
|
|
5058
|
+
children: g.label || g.key
|
|
5059
5059
|
},
|
|
5060
5060
|
v
|
|
5061
5061
|
)),
|
|
5062
5062
|
/* @__PURE__ */ e("th", { className: "px-4 py-2 w-16" })
|
|
5063
5063
|
] }) }),
|
|
5064
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
5064
|
+
/* @__PURE__ */ e("tbody", { children: f.map((g, v) => /* @__PURE__ */ n(
|
|
5065
5065
|
"tr",
|
|
5066
5066
|
{
|
|
5067
|
-
className: `hover:bg-gray-50 ${
|
|
5067
|
+
className: `hover:bg-gray-50 ${E === v ? "opacity-50" : ""}`,
|
|
5068
5068
|
draggable: !0,
|
|
5069
|
-
onDragStart: (w) =>
|
|
5070
|
-
onDragOver:
|
|
5069
|
+
onDragStart: (w) => j(w, v),
|
|
5070
|
+
onDragOver: _,
|
|
5071
5071
|
onDrop: (w) => G(w, v),
|
|
5072
|
-
onDragEnd:
|
|
5072
|
+
onDragEnd: q,
|
|
5073
5073
|
children: [
|
|
5074
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 }) }) }),
|
|
5075
|
-
l.fields.map((w,
|
|
5075
|
+
l.fields.map((w, z) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: $(w)(g, v) }, z)),
|
|
5076
5076
|
/* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
|
|
5077
5077
|
"button",
|
|
5078
5078
|
{
|
|
5079
|
-
onClick: () =>
|
|
5079
|
+
onClick: () => A(v),
|
|
5080
5080
|
className: "text-red-500 hover:text-red-700",
|
|
5081
5081
|
title: "Delete row",
|
|
5082
5082
|
children: /* @__PURE__ */ e(vr, { size: 16 })
|
|
@@ -5088,20 +5088,20 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5088
5088
|
)) })
|
|
5089
5089
|
] }) }),
|
|
5090
5090
|
o !== null && (() => {
|
|
5091
|
-
const
|
|
5092
|
-
users:
|
|
5093
|
-
groups:
|
|
5094
|
-
roles:
|
|
5091
|
+
const g = f[o] && f[o][p] ? {
|
|
5092
|
+
users: f[o][p].users || [],
|
|
5093
|
+
groups: f[o][p].groups || [],
|
|
5094
|
+
roles: f[o][p].roles || []
|
|
5095
5095
|
} : { users: [], groups: [], roles: [] };
|
|
5096
|
-
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(
|
|
5097
5097
|
os,
|
|
5098
5098
|
{
|
|
5099
5099
|
isOpen: !0,
|
|
5100
5100
|
onClose: () => {
|
|
5101
|
-
u(null),
|
|
5101
|
+
u(null), b(null);
|
|
5102
5102
|
},
|
|
5103
|
-
onFinalSubmit:
|
|
5104
|
-
existingShares:
|
|
5103
|
+
onFinalSubmit: C,
|
|
5104
|
+
existingShares: g,
|
|
5105
5105
|
allowedPermissions: ["view", "remove"]
|
|
5106
5106
|
}
|
|
5107
5107
|
);
|
|
@@ -5175,7 +5175,7 @@ const Mt = () => {
|
|
|
5175
5175
|
initialData: p = null
|
|
5176
5176
|
// Add prop for initial demo data
|
|
5177
5177
|
}) => {
|
|
5178
|
-
const [
|
|
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 () => {
|
|
5179
5179
|
try {
|
|
5180
5180
|
const S = await Ve(t.collectionList);
|
|
5181
5181
|
if (S) {
|
|
@@ -5190,14 +5190,14 @@ const Mt = () => {
|
|
|
5190
5190
|
}
|
|
5191
5191
|
};
|
|
5192
5192
|
Z(() => {
|
|
5193
|
-
(!p || p.length === 0) &&
|
|
5193
|
+
(!p || p.length === 0) && _();
|
|
5194
5194
|
}, [p]), Z(() => {
|
|
5195
5195
|
Array.isArray(p) && h(p);
|
|
5196
5196
|
}, [p]);
|
|
5197
5197
|
const G = (S) => {
|
|
5198
|
-
m && (
|
|
5199
|
-
},
|
|
5200
|
-
if (!l ||
|
|
5198
|
+
m && (f(S.id), y(S.categoryName || ""));
|
|
5199
|
+
}, q = () => {
|
|
5200
|
+
if (!l || b !== null) return;
|
|
5201
5201
|
const S = `temp-${Date.now()}`;
|
|
5202
5202
|
h((O) => [
|
|
5203
5203
|
...O,
|
|
@@ -5208,15 +5208,15 @@ const Mt = () => {
|
|
|
5208
5208
|
order: (O.at(-1)?.order ?? 0) + 1,
|
|
5209
5209
|
_temp: !0
|
|
5210
5210
|
}
|
|
5211
|
-
]),
|
|
5212
|
-
},
|
|
5213
|
-
|
|
5214
|
-
const O = S.find((P) => P.id ===
|
|
5211
|
+
]), f(S), y("");
|
|
5212
|
+
}, C = () => {
|
|
5213
|
+
b != null && (h((S) => {
|
|
5214
|
+
const O = S.find((P) => P.id === b), D = O && O._temp ? S.filter((P) => P.id !== b) : S;
|
|
5215
5215
|
return s?.(D), D;
|
|
5216
|
-
}),
|
|
5217
|
-
},
|
|
5218
|
-
if (
|
|
5219
|
-
const S = typeof
|
|
5216
|
+
}), f(null), y(""));
|
|
5217
|
+
}, g = async () => {
|
|
5218
|
+
if (b == null || !r.trim()) return;
|
|
5219
|
+
const S = typeof b == "string" && b.startsWith("temp-");
|
|
5220
5220
|
try {
|
|
5221
5221
|
if (S) {
|
|
5222
5222
|
const O = await _e(t.collectionCreate, {
|
|
@@ -5224,38 +5224,38 @@ const Mt = () => {
|
|
|
5224
5224
|
order: (Array.isArray(d) && d.length > 0 ? d.at(-1)?.order ?? 0 : 0) + 1
|
|
5225
5225
|
});
|
|
5226
5226
|
O && (h((D) => {
|
|
5227
|
-
const P = D.map((
|
|
5227
|
+
const P = D.map((V) => V.id === b ? O : V);
|
|
5228
5228
|
return s?.(P), P;
|
|
5229
5229
|
}), De.success("Collection created successfully"));
|
|
5230
5230
|
} else {
|
|
5231
5231
|
const O = await Zn(
|
|
5232
|
-
`${t.collectionUpdate}/${
|
|
5232
|
+
`${t.collectionUpdate}/${b}?newName=${r.trim()}`
|
|
5233
5233
|
);
|
|
5234
5234
|
h((D) => {
|
|
5235
5235
|
const P = D.map(
|
|
5236
|
-
(
|
|
5236
|
+
(V) => V.id === b ? O && O.id ? { ...V, ...O } : { ...V, categoryName: r.trim() } : V
|
|
5237
5237
|
);
|
|
5238
5238
|
return s?.(P), P;
|
|
5239
5239
|
}), me.success("Collection updated successfully");
|
|
5240
5240
|
}
|
|
5241
|
-
|
|
5241
|
+
f(null), y("");
|
|
5242
5242
|
} catch (O) {
|
|
5243
5243
|
console.log(O), me.error("Failed to save collection");
|
|
5244
5244
|
}
|
|
5245
5245
|
}, v = async (S) => {
|
|
5246
5246
|
if (o)
|
|
5247
5247
|
try {
|
|
5248
|
-
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 }), _());
|
|
5249
5249
|
} catch (O) {
|
|
5250
5250
|
console.log(O), me.error("Failed to delete collection");
|
|
5251
5251
|
}
|
|
5252
5252
|
}, w = (S, O, D) => {
|
|
5253
5253
|
if (!u || !O || !D || O === D) return S;
|
|
5254
|
-
const P = S.findIndex((W) => W.id === O),
|
|
5255
|
-
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;
|
|
5256
5256
|
const R = [...S], [Y] = R.splice(P, 1);
|
|
5257
|
-
return R.splice(
|
|
5258
|
-
},
|
|
5257
|
+
return R.splice(V, 0, Y), R.map((W, pe) => ({ ...W, order: pe + 1 }));
|
|
5258
|
+
}, z = async (S) => {
|
|
5259
5259
|
const O = S.map((D) => ({
|
|
5260
5260
|
id: D.id,
|
|
5261
5261
|
order: D.order,
|
|
@@ -5269,19 +5269,19 @@ const Mt = () => {
|
|
|
5269
5269
|
}, N = (S, O) => {
|
|
5270
5270
|
u && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", String(O)), T(O));
|
|
5271
5271
|
}, x = (S) => {
|
|
5272
|
-
$ && S !==
|
|
5272
|
+
$ && S !== A && E(S);
|
|
5273
5273
|
}, k = (S) => {
|
|
5274
5274
|
S.preventDefault();
|
|
5275
|
-
},
|
|
5275
|
+
}, F = async (S, O) => {
|
|
5276
5276
|
S.preventDefault();
|
|
5277
5277
|
const D = S.dataTransfer.getData("text/plain");
|
|
5278
5278
|
D && (h((P) => {
|
|
5279
|
-
const
|
|
5280
|
-
return console.log("Reordered",
|
|
5281
|
-
}), T(null),
|
|
5279
|
+
const V = w(P, D, O);
|
|
5280
|
+
return console.log("Reordered", V), z(V), s?.(V), V;
|
|
5281
|
+
}), T(null), E(null));
|
|
5282
5282
|
}, L = () => {
|
|
5283
|
-
T(null),
|
|
5284
|
-
},
|
|
5283
|
+
T(null), E(null);
|
|
5284
|
+
}, U = Array.isArray(d) ? d.filter(
|
|
5285
5285
|
(S) => S.categoryName?.toLowerCase().includes(I.toLowerCase())
|
|
5286
5286
|
) : [];
|
|
5287
5287
|
return /* @__PURE__ */ n("div", { className: `manage-collection-list ${a}`, children: [
|
|
@@ -5290,7 +5290,7 @@ const Mt = () => {
|
|
|
5290
5290
|
be,
|
|
5291
5291
|
{
|
|
5292
5292
|
value: I,
|
|
5293
|
-
onDebouncedChange:
|
|
5293
|
+
onDebouncedChange: j,
|
|
5294
5294
|
placeholder: "Search Collection",
|
|
5295
5295
|
customClass: "mr-4 searchmanagecollection"
|
|
5296
5296
|
}
|
|
@@ -5300,27 +5300,27 @@ const Mt = () => {
|
|
|
5300
5300
|
{
|
|
5301
5301
|
className: [
|
|
5302
5302
|
"px-4 py-3 bg-black text-white rounded-2xl ml-4",
|
|
5303
|
-
|
|
5303
|
+
b !== null ? "opacity-60 cursor-not-allowed" : "cursor-pointer"
|
|
5304
5304
|
].join(" "),
|
|
5305
|
-
onClick:
|
|
5306
|
-
disabled:
|
|
5305
|
+
onClick: q,
|
|
5306
|
+
disabled: b !== null,
|
|
5307
5307
|
children: "Add a Collection"
|
|
5308
5308
|
}
|
|
5309
5309
|
)
|
|
5310
5310
|
] }) }),
|
|
5311
|
-
/* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children:
|
|
5312
|
-
const O =
|
|
5311
|
+
/* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: U.map((S) => {
|
|
5312
|
+
const O = b === S.id, D = S?.links?.length ?? 0, P = $ === S.id, V = A === S.id && $ !== S.id;
|
|
5313
5313
|
return /* @__PURE__ */ e(
|
|
5314
5314
|
"div",
|
|
5315
5315
|
{
|
|
5316
5316
|
onDragEnter: () => x(S.id),
|
|
5317
5317
|
onDragOver: k,
|
|
5318
|
-
onDrop: (R) =>
|
|
5318
|
+
onDrop: (R) => F(R, S.id),
|
|
5319
5319
|
onDragEnd: L,
|
|
5320
5320
|
className: [
|
|
5321
5321
|
"flex items-center justify-between p-3 border rounded-2xl mb-3",
|
|
5322
5322
|
"border-gray-300",
|
|
5323
|
-
|
|
5323
|
+
V ? "ring-2 ring-gray-800/20" : "",
|
|
5324
5324
|
P ? "opacity-60" : ""
|
|
5325
5325
|
].join(" "),
|
|
5326
5326
|
children: O ? /* @__PURE__ */ n(te, { children: [
|
|
@@ -5333,7 +5333,7 @@ const Mt = () => {
|
|
|
5333
5333
|
placeholder: S._temp ? "New collection name" : "Edit collection name",
|
|
5334
5334
|
onChange: (R) => y(R.target.value),
|
|
5335
5335
|
onKeyDown: (R) => {
|
|
5336
|
-
R.key === "Enter" &&
|
|
5336
|
+
R.key === "Enter" && g(), R.key === "Escape" && C();
|
|
5337
5337
|
},
|
|
5338
5338
|
autoFocus: !0
|
|
5339
5339
|
}
|
|
@@ -5343,7 +5343,7 @@ const Mt = () => {
|
|
|
5343
5343
|
"button",
|
|
5344
5344
|
{
|
|
5345
5345
|
className: "cursor-pointer border border-gray-300 p-2 rounded-2xl",
|
|
5346
|
-
onClick:
|
|
5346
|
+
onClick: C,
|
|
5347
5347
|
"aria-label": "Cancel edit",
|
|
5348
5348
|
children: /* @__PURE__ */ e(ge, { color: "#767676" })
|
|
5349
5349
|
}
|
|
@@ -5355,7 +5355,7 @@ const Mt = () => {
|
|
|
5355
5355
|
"border p-2 rounded-2xl",
|
|
5356
5356
|
r.trim() ? "cursor-pointer border-gray-300" : "cursor-not-allowed border-gray-200"
|
|
5357
5357
|
].join(" "),
|
|
5358
|
-
onClick:
|
|
5358
|
+
onClick: g,
|
|
5359
5359
|
"aria-label": "Save",
|
|
5360
5360
|
disabled: !r.trim(),
|
|
5361
5361
|
title: r.trim() ? "Save" : "Name required",
|
|
@@ -5413,8 +5413,8 @@ const Mt = () => {
|
|
|
5413
5413
|
initialData: o = null,
|
|
5414
5414
|
showSearch: u = !0,
|
|
5415
5415
|
allowAdd: p = !0,
|
|
5416
|
-
allowEdit:
|
|
5417
|
-
allowDelete:
|
|
5416
|
+
allowEdit: b = !0,
|
|
5417
|
+
allowDelete: f = !0,
|
|
5418
5418
|
allowReorder: r = !0,
|
|
5419
5419
|
className: y = ""
|
|
5420
5420
|
} = t, d = a?.[t.key] || o || [], h = Array.isArray(d) ? d : [];
|
|
@@ -5434,8 +5434,8 @@ const Mt = () => {
|
|
|
5434
5434
|
},
|
|
5435
5435
|
showSearch: u,
|
|
5436
5436
|
allowAdd: p,
|
|
5437
|
-
allowEdit:
|
|
5438
|
-
allowDelete:
|
|
5437
|
+
allowEdit: b,
|
|
5438
|
+
allowDelete: f,
|
|
5439
5439
|
allowReorder: r
|
|
5440
5440
|
}
|
|
5441
5441
|
)
|
|
@@ -5463,13 +5463,13 @@ function Ss({
|
|
|
5463
5463
|
onCancel: i,
|
|
5464
5464
|
onSave: l
|
|
5465
5465
|
}) {
|
|
5466
|
-
const [m, o] = se.useState(a), [u, p] = se.useState(null), [
|
|
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) => {
|
|
5467
5467
|
if (!a || !a.configuration)
|
|
5468
5468
|
return w;
|
|
5469
|
-
const
|
|
5469
|
+
const z = {}, N = w?.configuration || {};
|
|
5470
5470
|
return a.configuration.forEach((x) => {
|
|
5471
5471
|
if (x.key && x.type === "datatable") {
|
|
5472
|
-
const
|
|
5472
|
+
const F = (N[x.key] || []).map((L, U) => {
|
|
5473
5473
|
const S = { id: L.id || 0 };
|
|
5474
5474
|
return x.fields && x.fields.forEach((O) => {
|
|
5475
5475
|
if (O.fieldtype === "audience") {
|
|
@@ -5483,101 +5483,101 @@ function Ss({
|
|
|
5483
5483
|
S[O.key] = L[O.key] || O.default || "";
|
|
5484
5484
|
}), S;
|
|
5485
5485
|
});
|
|
5486
|
-
if (
|
|
5486
|
+
if (F.length === 0) {
|
|
5487
5487
|
const L = { id: 0 };
|
|
5488
|
-
x.fields && x.fields.forEach((
|
|
5489
|
-
|
|
5490
|
-
}),
|
|
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);
|
|
5491
5491
|
}
|
|
5492
|
-
|
|
5493
|
-
} else x.key && (
|
|
5494
|
-
}),
|
|
5495
|
-
},
|
|
5492
|
+
z[x.key] = F;
|
|
5493
|
+
} else x.key && (z[x.key] = N[x.key] || {});
|
|
5494
|
+
}), z;
|
|
5495
|
+
}, j = () => {
|
|
5496
5496
|
if (a && a.configuration) {
|
|
5497
5497
|
const w = {};
|
|
5498
|
-
a.configuration.forEach((
|
|
5499
|
-
if (
|
|
5500
|
-
if (
|
|
5498
|
+
a.configuration.forEach((z) => {
|
|
5499
|
+
if (z.key)
|
|
5500
|
+
if (z.type === "datatable") {
|
|
5501
5501
|
const N = { id: 0 };
|
|
5502
|
-
|
|
5502
|
+
z.fields && z.fields.forEach((x) => {
|
|
5503
5503
|
x.fieldtype === "audience" ? N[x.key] = { users: [], groups: [], roles: [] } : N[x.key] = x.default || "";
|
|
5504
|
-
}), w[
|
|
5505
|
-
} else if (
|
|
5504
|
+
}), w[z.key] = [N];
|
|
5505
|
+
} else if (z.type === "section") {
|
|
5506
5506
|
const N = {};
|
|
5507
|
-
|
|
5507
|
+
z.fields && Array.isArray(z.fields) && z.fields.forEach((x) => {
|
|
5508
5508
|
x.key && (N[x.key] = x.default || "");
|
|
5509
|
-
}), w[
|
|
5509
|
+
}), w[z.key] = N;
|
|
5510
5510
|
} else
|
|
5511
|
-
w[
|
|
5511
|
+
w[z.key] = {};
|
|
5512
5512
|
}), p(w);
|
|
5513
5513
|
}
|
|
5514
5514
|
};
|
|
5515
5515
|
Z(() => {
|
|
5516
5516
|
if (s) {
|
|
5517
|
-
|
|
5517
|
+
f(!1);
|
|
5518
5518
|
return;
|
|
5519
5519
|
}
|
|
5520
5520
|
const w = async () => {
|
|
5521
5521
|
try {
|
|
5522
|
-
|
|
5523
|
-
let
|
|
5524
|
-
if (
|
|
5525
|
-
const N = I(
|
|
5522
|
+
f(!0);
|
|
5523
|
+
let z = await Ve($);
|
|
5524
|
+
if (z) {
|
|
5525
|
+
const N = I(z);
|
|
5526
5526
|
p(N);
|
|
5527
5527
|
} else
|
|
5528
|
-
|
|
5529
|
-
} catch (
|
|
5530
|
-
console.error("Error fetching configuration:",
|
|
5528
|
+
j();
|
|
5529
|
+
} catch (z) {
|
|
5530
|
+
console.error("Error fetching configuration:", z);
|
|
5531
5531
|
let N = "Failed to load configuration";
|
|
5532
|
-
if (
|
|
5533
|
-
const x =
|
|
5532
|
+
if (z.response) {
|
|
5533
|
+
const x = z.response.status, k = z.response.data?.message || z.response.data?.error;
|
|
5534
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
|
|
5536
|
-
De.error(N),
|
|
5535
|
+
} else z.request ? N = "Network error. Please check your connection and try again." : N = z.message || "An unexpected error occurred while loading configuration.";
|
|
5536
|
+
De.error(N), j();
|
|
5537
5537
|
} finally {
|
|
5538
|
-
|
|
5538
|
+
f(!1);
|
|
5539
5539
|
}
|
|
5540
5540
|
};
|
|
5541
|
-
a && (o(a), t ? w() :
|
|
5542
|
-
}, [a,
|
|
5543
|
-
const
|
|
5541
|
+
a && (o(a), t ? w() : j());
|
|
5542
|
+
}, [a, A, t, s]);
|
|
5543
|
+
const _ = (w, z) => {
|
|
5544
5544
|
p((N) => ({
|
|
5545
5545
|
...N,
|
|
5546
|
-
[w]:
|
|
5546
|
+
[w]: z
|
|
5547
5547
|
})), h((N) => {
|
|
5548
5548
|
const x = { ...N };
|
|
5549
5549
|
return x[w] && delete x[w], x;
|
|
5550
5550
|
});
|
|
5551
5551
|
}, G = () => {
|
|
5552
5552
|
const w = {};
|
|
5553
|
-
return !m || !u || m.configuration.forEach((
|
|
5554
|
-
if (
|
|
5555
|
-
|
|
5553
|
+
return !m || !u || m.configuration.forEach((z) => {
|
|
5554
|
+
if (z.type === "section")
|
|
5555
|
+
z.fields.forEach((N) => {
|
|
5556
5556
|
if (N.required) {
|
|
5557
|
-
const x = u[
|
|
5558
|
-
(!x || typeof x == "string" && x.trim() === "") && (w[
|
|
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`);
|
|
5559
5559
|
}
|
|
5560
5560
|
});
|
|
5561
|
-
else if (
|
|
5562
|
-
const N = u[
|
|
5561
|
+
else if (z.type === "datatable") {
|
|
5562
|
+
const N = u[z.key];
|
|
5563
5563
|
Array.isArray(N) && N.forEach((x, k) => {
|
|
5564
|
-
|
|
5565
|
-
if (
|
|
5566
|
-
const L = x[
|
|
5567
|
-
(!L || typeof L == "string" && L.trim() === "") && (w[
|
|
5564
|
+
z.fields.forEach((F) => {
|
|
5565
|
+
if (F.required) {
|
|
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`);
|
|
5568
5568
|
}
|
|
5569
5569
|
});
|
|
5570
5570
|
});
|
|
5571
5571
|
}
|
|
5572
5572
|
}), w;
|
|
5573
|
-
},
|
|
5573
|
+
}, q = (w) => Object.keys(w).length > 0, C = () => {
|
|
5574
5574
|
const w = G();
|
|
5575
|
-
if (h(w),
|
|
5575
|
+
if (h(w), q(w)) {
|
|
5576
5576
|
let N = [];
|
|
5577
5577
|
Object.keys(w).forEach((x) => {
|
|
5578
5578
|
typeof w[x] == "object" && Object.keys(w[x]).forEach((k) => {
|
|
5579
|
-
typeof w[x][k] == "object" ? Object.keys(w[x][k]).forEach((
|
|
5580
|
-
N.push(`${x} row ${parseInt(k) + 1}: ${w[x][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
5581
|
}) : N.push(`${x}: ${w[x][k]}`);
|
|
5582
5582
|
});
|
|
5583
5583
|
});
|
|
@@ -5588,22 +5588,22 @@ function Ss({
|
|
|
5588
5588
|
y(!0);
|
|
5589
5589
|
const N = {};
|
|
5590
5590
|
u && Object.keys(u).forEach((k) => {
|
|
5591
|
-
const
|
|
5591
|
+
const F = a?.configuration?.find(
|
|
5592
5592
|
(L) => L.key === k && L.type === "datatable"
|
|
5593
5593
|
);
|
|
5594
|
-
|
|
5595
|
-
const
|
|
5596
|
-
return
|
|
5594
|
+
F && Array.isArray(u[k]) ? N[k] = u[k].map((L) => {
|
|
5595
|
+
const U = { id: L.id || 0 };
|
|
5596
|
+
return F.fields && F.fields.forEach((S) => {
|
|
5597
5597
|
if (S.fieldtype === "audience") {
|
|
5598
5598
|
let O = { users: [], groups: [], roles: [] };
|
|
5599
5599
|
L[S.key] && typeof L[S.key] == "object" && !Array.isArray(L[S.key]) && (O = {
|
|
5600
5600
|
users: L[S.key].users || [],
|
|
5601
5601
|
groups: L[S.key].groups || [],
|
|
5602
5602
|
roles: L[S.key].roles || []
|
|
5603
|
-
}),
|
|
5603
|
+
}), U[S.key] = O;
|
|
5604
5604
|
} else
|
|
5605
|
-
|
|
5606
|
-
}),
|
|
5605
|
+
U[S.key] = L[S.key] || "";
|
|
5606
|
+
}), U;
|
|
5607
5607
|
}) : N[k] = u[k];
|
|
5608
5608
|
});
|
|
5609
5609
|
let x = await _e(T, N);
|
|
@@ -5619,20 +5619,20 @@ function Ss({
|
|
|
5619
5619
|
y(!1);
|
|
5620
5620
|
}
|
|
5621
5621
|
})();
|
|
5622
|
-
},
|
|
5622
|
+
}, g = () => {
|
|
5623
5623
|
if (i) {
|
|
5624
5624
|
i();
|
|
5625
5625
|
return;
|
|
5626
5626
|
}
|
|
5627
5627
|
d && Object.keys(d).length > 0 && !window.confirm(
|
|
5628
5628
|
"You have validation errors that will be lost. Are you sure you want to cancel?"
|
|
5629
|
-
) || (h({}), p(null),
|
|
5629
|
+
) || (h({}), p(null), E((z) => z + 1), De.info("Configuration changes cancelled"));
|
|
5630
5630
|
};
|
|
5631
5631
|
if (!m?.configuration && !a?.configuration)
|
|
5632
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" }) });
|
|
5633
5633
|
const v = a?.configuration || m?.configuration;
|
|
5634
5634
|
return Z(() => {
|
|
5635
|
-
s && a ? (!u || Object.keys(u).length === 0) &&
|
|
5635
|
+
s && a ? (!u || Object.keys(u).length === 0) && j() : s && !a && j();
|
|
5636
5636
|
}, [s, a]), /* @__PURE__ */ n("div", { children: [
|
|
5637
5637
|
/* @__PURE__ */ n(
|
|
5638
5638
|
"div",
|
|
@@ -5640,8 +5640,8 @@ function Ss({
|
|
|
5640
5640
|
className: "dynamic-config bg-white w-full h-[calc(100vh-350px)] overflow-y-auto",
|
|
5641
5641
|
style: { padding: "0px 20px 0px 0px" },
|
|
5642
5642
|
children: [
|
|
5643
|
-
|
|
5644
|
-
!
|
|
5643
|
+
b && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(xa, { size: "large" }) }),
|
|
5644
|
+
!b && v?.map((w, z) => {
|
|
5645
5645
|
const N = zs(w.type);
|
|
5646
5646
|
if (N && N !== "UnknownType")
|
|
5647
5647
|
return /* @__PURE__ */ e(
|
|
@@ -5649,10 +5649,10 @@ function Ss({
|
|
|
5649
5649
|
{
|
|
5650
5650
|
item: w,
|
|
5651
5651
|
data: u,
|
|
5652
|
-
updateHandler:
|
|
5652
|
+
updateHandler: _,
|
|
5653
5653
|
validationErrors: d
|
|
5654
5654
|
},
|
|
5655
|
-
|
|
5655
|
+
z
|
|
5656
5656
|
);
|
|
5657
5657
|
})
|
|
5658
5658
|
]
|
|
@@ -5663,7 +5663,7 @@ function Ss({
|
|
|
5663
5663
|
ee,
|
|
5664
5664
|
{
|
|
5665
5665
|
category: "secondary",
|
|
5666
|
-
onClick:
|
|
5666
|
+
onClick: g,
|
|
5667
5667
|
label: "Cancel",
|
|
5668
5668
|
disabled: r
|
|
5669
5669
|
}
|
|
@@ -5672,7 +5672,7 @@ function Ss({
|
|
|
5672
5672
|
ee,
|
|
5673
5673
|
{
|
|
5674
5674
|
category: "primary",
|
|
5675
|
-
onClick:
|
|
5675
|
+
onClick: C,
|
|
5676
5676
|
disabled: r,
|
|
5677
5677
|
label: r ? "Saving..." : "Apply",
|
|
5678
5678
|
type: "submit"
|
|
@@ -5689,29 +5689,29 @@ const Ql = ({
|
|
|
5689
5689
|
const [i, l] = M(0), [m, o] = M(!1), {
|
|
5690
5690
|
pageHeader: u = {},
|
|
5691
5691
|
appletHeader: p = {},
|
|
5692
|
-
breadcrumb:
|
|
5693
|
-
overview:
|
|
5692
|
+
breadcrumb: b = [],
|
|
5693
|
+
overview: f = {},
|
|
5694
5694
|
configuration: r = []
|
|
5695
|
-
} = t, y = r.map((
|
|
5696
|
-
if (
|
|
5697
|
-
const
|
|
5698
|
-
if (
|
|
5699
|
-
const
|
|
5700
|
-
if (
|
|
5701
|
-
...
|
|
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,
|
|
5702
5702
|
default: a,
|
|
5703
5703
|
value: a,
|
|
5704
5704
|
disabled: !0,
|
|
5705
5705
|
placeholder: a
|
|
5706
|
-
},
|
|
5707
|
-
const
|
|
5708
|
-
|
|
5709
|
-
...
|
|
5710
|
-
default:
|
|
5711
|
-
placeholder:
|
|
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"
|
|
5712
5712
|
};
|
|
5713
5713
|
} else {
|
|
5714
|
-
const
|
|
5714
|
+
const N = {
|
|
5715
5715
|
key: "displayname",
|
|
5716
5716
|
label: "Display Name",
|
|
5717
5717
|
fieldtype: "text",
|
|
@@ -5720,44 +5720,46 @@ const Ql = ({
|
|
|
5720
5720
|
placeholder: "Enter display name",
|
|
5721
5721
|
required: !1
|
|
5722
5722
|
};
|
|
5723
|
-
|
|
5723
|
+
g.splice(v + 1, 0, N);
|
|
5724
5724
|
}
|
|
5725
5725
|
}
|
|
5726
5726
|
return {
|
|
5727
|
-
...
|
|
5728
|
-
fields:
|
|
5727
|
+
...C,
|
|
5728
|
+
fields: g
|
|
5729
5729
|
};
|
|
5730
5730
|
}
|
|
5731
|
-
return
|
|
5731
|
+
return C;
|
|
5732
5732
|
}), d = {
|
|
5733
5733
|
heading: "App Details",
|
|
5734
5734
|
subHeading: "View app details and customize configurations to align with institutional requirements.",
|
|
5735
5735
|
isLeftArrow: !0,
|
|
5736
5736
|
onBackClick: () => window.history.back(),
|
|
5737
5737
|
...u
|
|
5738
|
-
}, h =
|
|
5739
|
-
label:
|
|
5740
|
-
href:
|
|
5741
|
-
})), $ =
|
|
5738
|
+
}, h = b.map((C) => ({
|
|
5739
|
+
label: C.text,
|
|
5740
|
+
href: C.href || "#"
|
|
5741
|
+
})), $ = ae(() => {
|
|
5742
5742
|
console.log("handleCancelRequest called - showing modal"), o(!0);
|
|
5743
|
-
}, []), T =
|
|
5744
|
-
o(!1),
|
|
5745
|
-
}, []),
|
|
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 = (() => {
|
|
5746
5748
|
if (Array.isArray(r)) {
|
|
5747
|
-
for (const
|
|
5748
|
-
if (
|
|
5749
|
-
const
|
|
5750
|
-
if (
|
|
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;
|
|
5751
5753
|
}
|
|
5752
5754
|
}
|
|
5753
5755
|
return p.heading || a;
|
|
5754
|
-
})(),
|
|
5756
|
+
})(), I = {
|
|
5755
5757
|
subHeading: "Application configuration and details",
|
|
5756
5758
|
tags: [],
|
|
5757
5759
|
...p,
|
|
5758
|
-
heading:
|
|
5760
|
+
heading: E
|
|
5759
5761
|
// Use resolvedDisplayName only
|
|
5760
|
-
},
|
|
5762
|
+
}, j = {
|
|
5761
5763
|
about: "This application provides comprehensive functionality for your organization.",
|
|
5762
5764
|
images: {
|
|
5763
5765
|
desktop: "https://via.placeholder.com/600x400?text=Desktop+View",
|
|
@@ -5774,25 +5776,25 @@ const Ql = ({
|
|
|
5774
5776
|
description: "Description of feature 2"
|
|
5775
5777
|
}
|
|
5776
5778
|
],
|
|
5777
|
-
...
|
|
5778
|
-
},
|
|
5779
|
-
{ label: "Overview", content:
|
|
5780
|
-
{ label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: { configuration: y }, disableApi: s, onCancel: $, onSave:
|
|
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 }) }
|
|
5781
5783
|
];
|
|
5782
|
-
function
|
|
5783
|
-
return
|
|
5784
|
+
function G(C) {
|
|
5785
|
+
return C ? C.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: C } }) : C : "📱";
|
|
5784
5786
|
}
|
|
5785
|
-
function
|
|
5787
|
+
function q(C) {
|
|
5786
5788
|
return /* @__PURE__ */ n("div", { className: "bg-white rounded-2xl p-1", children: [
|
|
5787
5789
|
/* @__PURE__ */ n("section", { className: "mb-8", children: [
|
|
5788
5790
|
/* @__PURE__ */ e("h2", { className: "text-xl font-semibold mb-2", children: "About" }),
|
|
5789
|
-
/* @__PURE__ */ e("p", { className: "text-gray-700 text-base", children:
|
|
5791
|
+
/* @__PURE__ */ e("p", { className: "text-gray-700 text-base", children: C.about })
|
|
5790
5792
|
] }),
|
|
5791
5793
|
/* @__PURE__ */ n("section", { className: "flex flex-row gap-6 justify-center items-center mb-8", children: [
|
|
5792
5794
|
/* @__PURE__ */ e(
|
|
5793
5795
|
"img",
|
|
5794
5796
|
{
|
|
5795
|
-
src:
|
|
5797
|
+
src: C.images.desktop,
|
|
5796
5798
|
alt: "Desktop View",
|
|
5797
5799
|
className: "rounded-xl border border-gray-200 w-[340px] h-[220px] object-cover"
|
|
5798
5800
|
}
|
|
@@ -5800,7 +5802,7 @@ const Ql = ({
|
|
|
5800
5802
|
/* @__PURE__ */ e(
|
|
5801
5803
|
"img",
|
|
5802
5804
|
{
|
|
5803
|
-
src:
|
|
5805
|
+
src: C.images.mobile1,
|
|
5804
5806
|
alt: "Mobile View 1",
|
|
5805
5807
|
className: "rounded-2xl border border-gray-200 w-[120px] h-[220px] object-cover"
|
|
5806
5808
|
}
|
|
@@ -5808,7 +5810,7 @@ const Ql = ({
|
|
|
5808
5810
|
/* @__PURE__ */ e(
|
|
5809
5811
|
"img",
|
|
5810
5812
|
{
|
|
5811
|
-
src:
|
|
5813
|
+
src: C.images.mobile2,
|
|
5812
5814
|
alt: "Mobile View 2",
|
|
5813
5815
|
className: "rounded-2xl border border-gray-200 w-[120px] h-[220px] object-cover"
|
|
5814
5816
|
}
|
|
@@ -5816,11 +5818,11 @@ const Ql = ({
|
|
|
5816
5818
|
] }),
|
|
5817
5819
|
/* @__PURE__ */ n("section", { children: [
|
|
5818
5820
|
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold mb-4", children: "Key Features" }),
|
|
5819
|
-
/* @__PURE__ */ e("ul", { className: "space-y-3", children:
|
|
5820
|
-
/* @__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 }),
|
|
5821
5823
|
/* @__PURE__ */ e("br", {}),
|
|
5822
|
-
/* @__PURE__ */ e("span", { className: "text-gray-700", children:
|
|
5823
|
-
] },
|
|
5824
|
+
/* @__PURE__ */ e("span", { className: "text-gray-700", children: g.description })
|
|
5825
|
+
] }, v)) })
|
|
5824
5826
|
] })
|
|
5825
5827
|
] });
|
|
5826
5828
|
}
|
|
@@ -5836,31 +5838,31 @@ const Ql = ({
|
|
|
5836
5838
|
}
|
|
5837
5839
|
),
|
|
5838
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: [
|
|
5839
|
-
/* @__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) }),
|
|
5840
5842
|
/* @__PURE__ */ n("div", { className: "flex flex-col min-w-0", children: [
|
|
5841
|
-
/* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children:
|
|
5842
|
-
/* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children:
|
|
5843
|
-
/* @__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(
|
|
5844
5846
|
"span",
|
|
5845
5847
|
{
|
|
5846
5848
|
className: "pill inline-block px-[10px] py-[6px] rounded-[14px] text-[11px] border border-[#e6e9ee] text-[#767676] font-semibold mt-1",
|
|
5847
|
-
children:
|
|
5849
|
+
children: C
|
|
5848
5850
|
},
|
|
5849
|
-
|
|
5851
|
+
g
|
|
5850
5852
|
)) })
|
|
5851
5853
|
] })
|
|
5852
5854
|
] }),
|
|
5853
5855
|
/* @__PURE__ */ n("div", { className: "bg-white border border-gray-300 rounded-2xl w-full mt-5 ", children: [
|
|
5854
|
-
/* @__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(
|
|
5855
5857
|
"button",
|
|
5856
5858
|
{
|
|
5857
|
-
onClick: () => l(
|
|
5858
|
-
className: `${i ===
|
|
5859
|
-
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
|
|
5860
5862
|
},
|
|
5861
|
-
|
|
5863
|
+
g
|
|
5862
5864
|
)) }) }),
|
|
5863
|
-
/* @__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 })
|
|
5864
5866
|
] }),
|
|
5865
5867
|
/* @__PURE__ */ e(
|
|
5866
5868
|
Pn,
|
|
@@ -5915,8 +5917,8 @@ const Kl = ({
|
|
|
5915
5917
|
addBtnText: u = "Add",
|
|
5916
5918
|
// Feature toggles
|
|
5917
5919
|
showSearch: p = !0,
|
|
5918
|
-
showColumnChooser:
|
|
5919
|
-
showFilter:
|
|
5920
|
+
showColumnChooser: b = !0,
|
|
5921
|
+
showFilter: f = !1,
|
|
5920
5922
|
showPrint: r = !1,
|
|
5921
5923
|
showExcel: y = !1,
|
|
5922
5924
|
showPdf: d = !1,
|
|
@@ -5924,57 +5926,57 @@ const Kl = ({
|
|
|
5924
5926
|
showAdd: $ = !1,
|
|
5925
5927
|
// Additional props
|
|
5926
5928
|
searchPlaceholder: T = "Search...",
|
|
5927
|
-
handleRefreshClick:
|
|
5929
|
+
handleRefreshClick: A = () => {
|
|
5928
5930
|
},
|
|
5929
|
-
handleSearchChange:
|
|
5931
|
+
handleSearchChange: E = () => {
|
|
5930
5932
|
},
|
|
5931
5933
|
// Optional: override export file names
|
|
5932
5934
|
excelFileName: I,
|
|
5933
|
-
pdfFileName:
|
|
5935
|
+
pdfFileName: j
|
|
5934
5936
|
}) => {
|
|
5935
|
-
const
|
|
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(
|
|
5936
5938
|
(x) => {
|
|
5937
|
-
const k =
|
|
5939
|
+
const k = _();
|
|
5938
5940
|
if (console.log("openColumnChooserNear", k), !!k?.openColumnChooser) {
|
|
5939
5941
|
if (typeof window > "u" || !x?.currentTarget) {
|
|
5940
5942
|
k.openColumnChooser();
|
|
5941
5943
|
return;
|
|
5942
5944
|
}
|
|
5943
5945
|
try {
|
|
5944
|
-
const
|
|
5945
|
-
let S = L - 120, O =
|
|
5946
|
+
const F = x.currentTarget.getBoundingClientRect(), L = F.left + window.scrollX, U = F.bottom + window.scrollY;
|
|
5947
|
+
let S = L - 120, O = U - 120;
|
|
5946
5948
|
const D = window.innerWidth, P = window.innerHeight;
|
|
5947
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);
|
|
5948
|
-
} catch (
|
|
5949
|
-
console.log("coloumn choose error",
|
|
5950
|
+
} catch (F) {
|
|
5951
|
+
console.log("coloumn choose error", F);
|
|
5950
5952
|
}
|
|
5951
5953
|
}
|
|
5952
5954
|
},
|
|
5953
5955
|
[]
|
|
5954
5956
|
// no external deps; reads ref at call time
|
|
5955
|
-
), N =
|
|
5957
|
+
), N = ae(
|
|
5956
5958
|
(x, k) => {
|
|
5957
|
-
const
|
|
5958
|
-
if (
|
|
5959
|
+
const F = _();
|
|
5960
|
+
if (F)
|
|
5959
5961
|
switch (x) {
|
|
5960
5962
|
case "ColumnChooser":
|
|
5961
|
-
|
|
5963
|
+
b && (console.log("openColumnChooser", k), k ? z(k) : F.openColumnChooser?.()), console.log("openColumnChooser out", k);
|
|
5962
5964
|
break;
|
|
5963
5965
|
case "Print":
|
|
5964
|
-
r &&
|
|
5966
|
+
r && F.print?.();
|
|
5965
5967
|
break;
|
|
5966
5968
|
case "Excel":
|
|
5967
|
-
y &&
|
|
5969
|
+
y && F.excelExport?.({ fileName: g });
|
|
5968
5970
|
break;
|
|
5969
5971
|
case "Pdf":
|
|
5970
|
-
d &&
|
|
5972
|
+
d && F.pdfExport?.({ fileName: v });
|
|
5971
5973
|
break;
|
|
5972
5974
|
case "Refresh":
|
|
5973
|
-
h &&
|
|
5975
|
+
h && A();
|
|
5974
5976
|
break;
|
|
5975
5977
|
}
|
|
5976
5978
|
},
|
|
5977
|
-
[
|
|
5979
|
+
[b, r, y, d, h, g, v, A, z]
|
|
5978
5980
|
);
|
|
5979
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: [
|
|
5980
5982
|
/* @__PURE__ */ n("div", { className: "flex flex-col", children: [
|
|
@@ -5992,13 +5994,13 @@ const Kl = ({
|
|
|
5992
5994
|
placeholder: T,
|
|
5993
5995
|
value: G,
|
|
5994
5996
|
onDebouncedChange: (x) => {
|
|
5995
|
-
|
|
5997
|
+
q(x), E(x);
|
|
5996
5998
|
}
|
|
5997
5999
|
}
|
|
5998
6000
|
) }),
|
|
5999
6001
|
/* @__PURE__ */ n("div", { className: "flex gap-3", children: [
|
|
6000
6002
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
|
|
6001
|
-
|
|
6003
|
+
b && /* @__PURE__ */ e(
|
|
6002
6004
|
ee,
|
|
6003
6005
|
{
|
|
6004
6006
|
icon: Nr,
|
|
@@ -6009,7 +6011,7 @@ const Kl = ({
|
|
|
6009
6011
|
title: "Choose Columns"
|
|
6010
6012
|
}
|
|
6011
6013
|
),
|
|
6012
|
-
|
|
6014
|
+
f && /* @__PURE__ */ e(
|
|
6013
6015
|
ee,
|
|
6014
6016
|
{
|
|
6015
6017
|
icon: kr,
|
|
@@ -6039,7 +6041,7 @@ const Kl = ({
|
|
|
6039
6041
|
ariaLabel: "Excel Download",
|
|
6040
6042
|
size: "small",
|
|
6041
6043
|
category: "secondary",
|
|
6042
|
-
title: `Export Excel (${
|
|
6044
|
+
title: `Export Excel (${g})`
|
|
6043
6045
|
}
|
|
6044
6046
|
),
|
|
6045
6047
|
d && /* @__PURE__ */ e(
|
|
@@ -6092,68 +6094,68 @@ function ei(t) {
|
|
|
6092
6094
|
allowSorting: o = !0,
|
|
6093
6095
|
allowFiltering: u = !1,
|
|
6094
6096
|
allowGrouping: p = !1,
|
|
6095
|
-
allowReordering:
|
|
6096
|
-
allowResizing:
|
|
6097
|
+
allowReordering: b = !0,
|
|
6098
|
+
allowResizing: f = !0,
|
|
6097
6099
|
allowExcelExport: r = !1,
|
|
6098
6100
|
allowPdfExport: y = !1,
|
|
6099
6101
|
showColumnChooser: d = !1,
|
|
6100
6102
|
enableSearchApi: h = !1,
|
|
6101
6103
|
height: $ = "600",
|
|
6102
6104
|
selectionSettings: T = { type: "Multiple", mode: "Row" },
|
|
6103
|
-
enableCheckbox:
|
|
6104
|
-
columns:
|
|
6105
|
+
enableCheckbox: A = !1,
|
|
6106
|
+
columns: E = [],
|
|
6105
6107
|
onGridStateChange: I,
|
|
6106
|
-
onRowSelected:
|
|
6107
|
-
onRowDeselected:
|
|
6108
|
+
onRowSelected: j,
|
|
6109
|
+
onRowDeselected: _,
|
|
6108
6110
|
onRowDoubleClick: G,
|
|
6109
|
-
apiRef:
|
|
6110
|
-
gridProps:
|
|
6111
|
-
} = t,
|
|
6111
|
+
apiRef: q,
|
|
6112
|
+
gridProps: C = {}
|
|
6113
|
+
} = t, g = xe(null), {
|
|
6112
6114
|
pageSettings: v,
|
|
6113
6115
|
sortSettings: w,
|
|
6114
|
-
...
|
|
6115
|
-
} =
|
|
6116
|
-
const
|
|
6117
|
-
return o &&
|
|
6118
|
-
}, [o, u, p, h, r, y, d,
|
|
6119
|
-
const
|
|
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(() => {
|
|
6118
|
+
const B = [cn];
|
|
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) => {
|
|
6120
6122
|
!we && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${J} requested but related service/feature is disabled.`);
|
|
6121
6123
|
};
|
|
6122
6124
|
return {
|
|
6123
|
-
getInstance: () =>
|
|
6124
|
-
refresh: () =>
|
|
6125
|
-
getSelectedRecords: () =>
|
|
6126
|
-
clearSelection: () =>
|
|
6127
|
-
selectRow: (J) =>
|
|
6128
|
-
selectRows: (J) =>
|
|
6125
|
+
getInstance: () => B(),
|
|
6126
|
+
refresh: () => B()?.refresh?.(),
|
|
6127
|
+
getSelectedRecords: () => B()?.getSelectedRecords?.() ?? [],
|
|
6128
|
+
clearSelection: () => B()?.clearSelection?.(),
|
|
6129
|
+
selectRow: (J) => B()?.selectRow?.(J),
|
|
6130
|
+
selectRows: (J) => B()?.selectRows?.(J),
|
|
6129
6131
|
search: (J) => {
|
|
6130
|
-
|
|
6132
|
+
re("search()", h), B()?.search?.(J);
|
|
6131
6133
|
},
|
|
6132
|
-
print: () =>
|
|
6134
|
+
print: () => B()?.print?.(),
|
|
6133
6135
|
excelExport: (J) => {
|
|
6134
|
-
|
|
6136
|
+
re("excelExport()", r), B()?.excelExport?.(J);
|
|
6135
6137
|
},
|
|
6136
6138
|
pdfExport: (J) => {
|
|
6137
|
-
|
|
6139
|
+
re("pdfExport()", y), B()?.pdfExport?.(J);
|
|
6138
6140
|
},
|
|
6139
6141
|
openColumnChooser: (J, we) => {
|
|
6140
|
-
|
|
6142
|
+
re("openColumnChooser()", d), B()?.columnChooserModule?.openColumnChooser?.(J, we);
|
|
6141
6143
|
}
|
|
6142
6144
|
};
|
|
6143
6145
|
}, []);
|
|
6144
6146
|
Z(() => {
|
|
6145
|
-
|
|
6146
|
-
}, [
|
|
6147
|
-
|
|
6147
|
+
q && (q.current = P);
|
|
6148
|
+
}, [q, P]), Z(() => () => {
|
|
6149
|
+
q && (q.current = null);
|
|
6148
6150
|
}, []);
|
|
6149
|
-
const
|
|
6150
|
-
const
|
|
6151
|
-
return
|
|
6152
|
-
}, R = (
|
|
6153
|
-
const
|
|
6151
|
+
const V = (B) => {
|
|
6152
|
+
const re = String(B || "");
|
|
6153
|
+
return re === "Ascending" || re === "Descending" ? re : re.toLowerCase() === "ascending" ? "Ascending" : "Descending";
|
|
6154
|
+
}, R = (B) => {
|
|
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) => ({
|
|
6154
6156
|
field: Oe.field,
|
|
6155
|
-
dir:
|
|
6156
|
-
})), lt =
|
|
6157
|
+
dir: V(Oe.direction ?? Oe.dir)
|
|
6158
|
+
})), lt = B?.searchString ?? "", it = B?.columns ?? re?.filterSettings?.columns ?? [];
|
|
6157
6159
|
return {
|
|
6158
6160
|
reason: we,
|
|
6159
6161
|
page: { index: Ue, size: Ie, skip: (Ue - 1) * Ie, take: Ie },
|
|
@@ -6161,17 +6163,17 @@ function ei(t) {
|
|
|
6161
6163
|
// [{ field, dir: 'Ascending'|'Descending' }]
|
|
6162
6164
|
search: lt,
|
|
6163
6165
|
filters: it,
|
|
6164
|
-
rawEvent:
|
|
6166
|
+
rawEvent: B
|
|
6165
6167
|
};
|
|
6166
|
-
}, Y = (
|
|
6168
|
+
}, Y = (B) => {
|
|
6167
6169
|
setTimeout(() => {
|
|
6168
|
-
|
|
6169
|
-
}, 1e3),
|
|
6170
|
-
}, W = (
|
|
6171
|
-
typeof G == "function" && G(
|
|
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);
|
|
6172
|
+
}, W = (B) => {
|
|
6173
|
+
typeof G == "function" && G(B?.rowData, B);
|
|
6172
6174
|
}, pe = () => {
|
|
6173
|
-
const
|
|
6174
|
-
return
|
|
6175
|
+
const B = [];
|
|
6176
|
+
return A && B.push(/* @__PURE__ */ e(Dt, { type: "checkbox", width: "50" }, "__checkbox__")), E.forEach((re, J) => {
|
|
6175
6177
|
const {
|
|
6176
6178
|
field: we,
|
|
6177
6179
|
headerText: Ie,
|
|
@@ -6189,8 +6191,8 @@ function ei(t) {
|
|
|
6189
6191
|
maxWidth: ja,
|
|
6190
6192
|
customAttributes: Va,
|
|
6191
6193
|
..._a
|
|
6192
|
-
} =
|
|
6193
|
-
|
|
6194
|
+
} = re || {};
|
|
6195
|
+
B.push(
|
|
6194
6196
|
/* @__PURE__ */ e(
|
|
6195
6197
|
Dt,
|
|
6196
6198
|
{
|
|
@@ -6214,13 +6216,13 @@ function ei(t) {
|
|
|
6214
6216
|
we || `col-${J}`
|
|
6215
6217
|
)
|
|
6216
6218
|
);
|
|
6217
|
-
}),
|
|
6219
|
+
}), B;
|
|
6218
6220
|
};
|
|
6219
6221
|
return /* @__PURE__ */ n(
|
|
6220
6222
|
vn,
|
|
6221
6223
|
{
|
|
6222
6224
|
id: i,
|
|
6223
|
-
ref:
|
|
6225
|
+
ref: g,
|
|
6224
6226
|
dataSource: {
|
|
6225
6227
|
result: a,
|
|
6226
6228
|
count: s
|
|
@@ -6230,20 +6232,20 @@ function ei(t) {
|
|
|
6230
6232
|
allowSorting: o,
|
|
6231
6233
|
allowFiltering: u,
|
|
6232
6234
|
allowGrouping: p,
|
|
6233
|
-
allowReordering:
|
|
6234
|
-
allowResizing:
|
|
6235
|
+
allowReordering: b,
|
|
6236
|
+
allowResizing: f,
|
|
6235
6237
|
showColumnChooser: d,
|
|
6236
6238
|
selectionSettings: T,
|
|
6237
6239
|
pageSettings: { pageSize: 10, pageSizes: v?.pageSizes ?? [20, 40, 60, 80, 100] },
|
|
6238
6240
|
sortSettings: w ?? {
|
|
6239
|
-
columns: [{ field: L, direction:
|
|
6241
|
+
columns: [{ field: L, direction: V(S) }],
|
|
6240
6242
|
allowUnsort: !1
|
|
6241
6243
|
},
|
|
6242
6244
|
actionBegin: Y,
|
|
6243
|
-
rowSelected:
|
|
6244
|
-
rowDeselected:
|
|
6245
|
+
rowSelected: j,
|
|
6246
|
+
rowDeselected: _,
|
|
6245
6247
|
recordDoubleClick: W,
|
|
6246
|
-
...
|
|
6248
|
+
...z,
|
|
6247
6249
|
children: [
|
|
6248
6250
|
/* @__PURE__ */ e(wn, { children: pe() }),
|
|
6249
6251
|
/* @__PURE__ */ e(Nn, { services: D })
|
|
@@ -6285,9 +6287,9 @@ function ie({
|
|
|
6285
6287
|
details: o = {},
|
|
6286
6288
|
...u
|
|
6287
6289
|
}) {
|
|
6288
|
-
const p = Qe(),
|
|
6290
|
+
const p = Qe(), b = Ds(u, m), f = (y) => {
|
|
6289
6291
|
l?.({
|
|
6290
|
-
key:
|
|
6292
|
+
key: b,
|
|
6291
6293
|
checked: y.target.checked,
|
|
6292
6294
|
details: o,
|
|
6293
6295
|
props: u
|
|
@@ -6305,7 +6307,7 @@ function ie({
|
|
|
6305
6307
|
id: p,
|
|
6306
6308
|
type: "checkbox",
|
|
6307
6309
|
className: "h-4 w-4 rounded border-zinc-300 focus:ring-[var(--primaryColor)]",
|
|
6308
|
-
onChange:
|
|
6310
|
+
onChange: f,
|
|
6309
6311
|
"aria-label": "Select card"
|
|
6310
6312
|
}
|
|
6311
6313
|
) }),
|
|
@@ -6332,8 +6334,8 @@ function $s({
|
|
|
6332
6334
|
group: o = "Global",
|
|
6333
6335
|
moreGroupsLabel: u = "+ 5 more",
|
|
6334
6336
|
author: p = "Judith Black",
|
|
6335
|
-
timeLabel:
|
|
6336
|
-
imageUrl:
|
|
6337
|
+
timeLabel: b = "Just now",
|
|
6338
|
+
imageUrl: f = "https://images.unsplash.com/photo-1469980098053-382eb10ba017?q=80&w=1200&auto=format&fit=crop",
|
|
6337
6339
|
description: r = "Columbia University is a prestigious Ivy League institution located in the heart of New York City.",
|
|
6338
6340
|
// spread remaining props (_id, instanceId, etc.)
|
|
6339
6341
|
...y
|
|
@@ -6366,13 +6368,13 @@ function $s({
|
|
|
6366
6368
|
)
|
|
6367
6369
|
] }) : null,
|
|
6368
6370
|
/* @__PURE__ */ e("span", { "aria-hidden": "true", className: "px-2", children: "•" }),
|
|
6369
|
-
/* @__PURE__ */ e("span", { children:
|
|
6371
|
+
/* @__PURE__ */ e("span", { children: b })
|
|
6370
6372
|
] }),
|
|
6371
6373
|
/* @__PURE__ */ n("div", { className: "mt-2 flex items-center gap-3", children: [
|
|
6372
6374
|
/* @__PURE__ */ e(ze, { name: "John", size: "medium" }),
|
|
6373
6375
|
/* @__PURE__ */ n("div", { className: "leading-tight", children: [
|
|
6374
6376
|
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-800 dark:text-zinc-100", children: p }),
|
|
6375
|
-
/* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${h.meta}`, children:
|
|
6377
|
+
/* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${h.meta}`, children: b })
|
|
6376
6378
|
] })
|
|
6377
6379
|
] }),
|
|
6378
6380
|
/* @__PURE__ */ n("p", { className: "mt-2 text-zinc-700 dark:text-zinc-300", children: [
|
|
@@ -6390,7 +6392,7 @@ function $s({
|
|
|
6390
6392
|
"div",
|
|
6391
6393
|
{
|
|
6392
6394
|
className: `mt-3 overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800 ${h.media}`,
|
|
6393
|
-
children: /* @__PURE__ */ e("img", { src:
|
|
6395
|
+
children: /* @__PURE__ */ e("img", { src: f, alt: "", className: "h-full w-full object-cover" })
|
|
6394
6396
|
}
|
|
6395
6397
|
),
|
|
6396
6398
|
/* @__PURE__ */ e("div", { className: "mt-3 w-full flex justify-center", children: /* @__PURE__ */ e(
|
|
@@ -6457,11 +6459,11 @@ function Rs({
|
|
|
6457
6459
|
// spread for identity (_id/instanceId/etc)
|
|
6458
6460
|
...p
|
|
6459
6461
|
}) {
|
|
6460
|
-
const
|
|
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"}`;
|
|
6461
6463
|
return /* @__PURE__ */ n(
|
|
6462
6464
|
ie,
|
|
6463
6465
|
{
|
|
6464
|
-
className: `flex flex-col ${
|
|
6466
|
+
className: `flex flex-col ${f.card} ${r.wrap}`,
|
|
6465
6467
|
showCheckbox: a,
|
|
6466
6468
|
checkboxPosition: s,
|
|
6467
6469
|
onSelect: i,
|
|
@@ -6470,7 +6472,7 @@ function Rs({
|
|
|
6470
6472
|
...p,
|
|
6471
6473
|
children: [
|
|
6472
6474
|
/* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
|
|
6473
|
-
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${
|
|
6475
|
+
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${f.title}`, children: m }),
|
|
6474
6476
|
/* @__PURE__ */ e(
|
|
6475
6477
|
"span",
|
|
6476
6478
|
{
|
|
@@ -6641,11 +6643,11 @@ function Ps({
|
|
|
6641
6643
|
// spread for identity fields: _id / id / instanceId etc.
|
|
6642
6644
|
...u
|
|
6643
6645
|
}) {
|
|
6644
|
-
const p = oe(t),
|
|
6646
|
+
const p = oe(t), b = ce[p], f = Os[p];
|
|
6645
6647
|
return /* @__PURE__ */ n(
|
|
6646
6648
|
ie,
|
|
6647
6649
|
{
|
|
6648
|
-
className: `flex flex-col ${
|
|
6650
|
+
className: `flex flex-col ${b.card} ${f.wrap || ""}`,
|
|
6649
6651
|
showCheckbox: a,
|
|
6650
6652
|
checkboxPosition: s,
|
|
6651
6653
|
onSelect: i,
|
|
@@ -6654,17 +6656,17 @@ function Ps({
|
|
|
6654
6656
|
...u,
|
|
6655
6657
|
children: [
|
|
6656
6658
|
/* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
|
|
6657
|
-
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${
|
|
6659
|
+
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${b.title}`, children: m }),
|
|
6658
6660
|
/* @__PURE__ */ e("span", { className: "text-sm text-indigo-700 cursor-default select-none", children: "View All" })
|
|
6659
6661
|
] }),
|
|
6660
6662
|
p === "lg" ? (
|
|
6661
6663
|
// Large: 3-up grid of image cards
|
|
6662
|
-
/* @__PURE__ */ e("div", { className: `mt-4 ${
|
|
6663
|
-
/* @__PURE__ */ e("img", { src: r.thumb, alt: "", className:
|
|
6664
|
-
/* @__PURE__ */ e("h4", { className: `mt-3 ${
|
|
6665
|
-
/* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${
|
|
6664
|
+
/* @__PURE__ */ e("div", { className: `mt-4 ${f.grid}`, children: o.slice(0, 3).map((r) => /* @__PURE__ */ n("article", { children: [
|
|
6665
|
+
/* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: f.cardImg }),
|
|
6666
|
+
/* @__PURE__ */ e("h4", { className: `mt-3 ${f.title} text-zinc-900 dark:text-zinc-100`, children: r.title }),
|
|
6667
|
+
/* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${f.date}`, children: r.date }),
|
|
6666
6668
|
/* @__PURE__ */ e("div", { className: "mt-2", children: /* @__PURE__ */ e(jt, { label: r.tag }) }),
|
|
6667
|
-
/* @__PURE__ */ n("p", { className: `mt-2 ${
|
|
6669
|
+
/* @__PURE__ */ n("p", { className: `mt-2 ${f.excerpt}`, children: [
|
|
6668
6670
|
r.excerpt,
|
|
6669
6671
|
" ",
|
|
6670
6672
|
/* @__PURE__ */ e("span", { className: "underline decoration-dotted text-indigo-700 cursor-default", children: "View more" })
|
|
@@ -6677,12 +6679,12 @@ function Ps({
|
|
|
6677
6679
|
{
|
|
6678
6680
|
className: "flex items-start gap-3 rounded-xl border border-zinc-200 dark:border-zinc-800 p-2",
|
|
6679
6681
|
children: [
|
|
6680
|
-
/* @__PURE__ */ e("div", { className: `overflow-hidden rounded-lg ${
|
|
6682
|
+
/* @__PURE__ */ e("div", { className: `overflow-hidden rounded-lg ${f.itemThumb} flex-shrink-0`, children: /* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: "h-full w-full object-cover" }) }),
|
|
6681
6683
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
|
|
6682
|
-
/* @__PURE__ */ e("h4", { className: `${
|
|
6683
|
-
/* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${
|
|
6684
|
+
/* @__PURE__ */ e("h4", { className: `${f.title} text-zinc-900 dark:text-zinc-100 line-clamp-2`, children: r.title }),
|
|
6685
|
+
/* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${f.date}`, children: r.date }),
|
|
6684
6686
|
/* @__PURE__ */ e("div", { className: "mt-1", children: /* @__PURE__ */ e(jt, { label: r.tag }) }),
|
|
6685
|
-
|
|
6687
|
+
f.excerpt !== "hidden" && /* @__PURE__ */ n("p", { className: `mt-2 ${f.excerpt}`, children: [
|
|
6686
6688
|
r.excerpt,
|
|
6687
6689
|
" ",
|
|
6688
6690
|
/* @__PURE__ */ e("span", { className: "underline decoration-dotted text-indigo-700 cursor-default", children: "View more" })
|
|
@@ -6757,13 +6759,13 @@ function Vs({
|
|
|
6757
6759
|
filters: u = Ls,
|
|
6758
6760
|
activeFilter: p = "All",
|
|
6759
6761
|
// NEW: iframe controls
|
|
6760
|
-
mapQuery:
|
|
6761
|
-
zoom:
|
|
6762
|
+
mapQuery: b = "Florida",
|
|
6763
|
+
zoom: f = 12,
|
|
6762
6764
|
mapUrl: r,
|
|
6763
6765
|
// optional full embed URL override
|
|
6764
6766
|
...y
|
|
6765
6767
|
}) {
|
|
6766
|
-
const d = oe(t), h = ce[d], $ = Ms[d], T = r || js(
|
|
6768
|
+
const d = oe(t), h = ce[d], $ = Ms[d], T = r || js(b, f);
|
|
6767
6769
|
return /* @__PURE__ */ e(
|
|
6768
6770
|
ie,
|
|
6769
6771
|
{
|
|
@@ -6772,7 +6774,7 @@ function Vs({
|
|
|
6772
6774
|
checkboxPosition: s,
|
|
6773
6775
|
onSelect: i,
|
|
6774
6776
|
identity: l,
|
|
6775
|
-
details: { type: "campus-map", title: m, campusName: o, activeFilter: p, mapQuery:
|
|
6777
|
+
details: { type: "campus-map", title: m, campusName: o, activeFilter: p, mapQuery: b, zoom: f },
|
|
6776
6778
|
...y,
|
|
6777
6779
|
children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${$.mapH}`, children: [
|
|
6778
6780
|
/* @__PURE__ */ e(
|
|
@@ -6797,7 +6799,7 @@ function Vs({
|
|
|
6797
6799
|
/* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
|
|
6798
6800
|
] })
|
|
6799
6801
|
] }),
|
|
6800
|
-
/* @__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((
|
|
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)) }) }),
|
|
6801
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: [
|
|
6802
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" }) }),
|
|
6803
6805
|
/* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
|
|
@@ -6969,8 +6971,8 @@ function Ys({
|
|
|
6969
6971
|
selectedIndex: u = 0,
|
|
6970
6972
|
...p
|
|
6971
6973
|
}) {
|
|
6972
|
-
const [
|
|
6973
|
-
|
|
6974
|
+
const [b, f] = M(u), r = oe(t), y = ce[r], d = Us[r], h = o[b] || o[0], $ = (A, E) => {
|
|
6975
|
+
f(E), i?.(A);
|
|
6974
6976
|
}, T = r === "lg";
|
|
6975
6977
|
return /* @__PURE__ */ n(
|
|
6976
6978
|
ie,
|
|
@@ -6990,29 +6992,29 @@ function Ys({
|
|
|
6990
6992
|
T ? (
|
|
6991
6993
|
// Large: Two-column layout
|
|
6992
6994
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
6993
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((
|
|
6995
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((A, E) => /* @__PURE__ */ e(
|
|
6994
6996
|
Vt,
|
|
6995
6997
|
{
|
|
6996
|
-
ev:
|
|
6998
|
+
ev: A,
|
|
6997
6999
|
sizeMeta: d,
|
|
6998
|
-
isSelected:
|
|
6999
|
-
onClick: (I) => $(I,
|
|
7000
|
+
isSelected: E === b,
|
|
7001
|
+
onClick: (I) => $(I, E)
|
|
7000
7002
|
},
|
|
7001
|
-
|
|
7003
|
+
A._id || A.id || E
|
|
7002
7004
|
)) }),
|
|
7003
7005
|
/* @__PURE__ */ e(Gs, { ev: h, sizeMeta: d })
|
|
7004
7006
|
] })
|
|
7005
7007
|
) : (
|
|
7006
7008
|
// Small/Medium: Simple list only
|
|
7007
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((
|
|
7009
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((A, E) => /* @__PURE__ */ e(
|
|
7008
7010
|
Vt,
|
|
7009
7011
|
{
|
|
7010
|
-
ev:
|
|
7012
|
+
ev: A,
|
|
7011
7013
|
sizeMeta: d,
|
|
7012
|
-
isSelected:
|
|
7013
|
-
onClick: (I) => $(I,
|
|
7014
|
+
isSelected: E === b,
|
|
7015
|
+
onClick: (I) => $(I, E)
|
|
7014
7016
|
},
|
|
7015
|
-
|
|
7017
|
+
A._id || A.id || E
|
|
7016
7018
|
)) })
|
|
7017
7019
|
),
|
|
7018
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" }) })
|
|
@@ -7183,17 +7185,17 @@ function Hs({
|
|
|
7183
7185
|
emails: o = Ws,
|
|
7184
7186
|
selectedIndex: u = 0,
|
|
7185
7187
|
onStar: p,
|
|
7186
|
-
onPin:
|
|
7187
|
-
...
|
|
7188
|
+
onPin: b,
|
|
7189
|
+
...f
|
|
7188
7190
|
}) {
|
|
7189
|
-
const [r, y] = M(u), d = oe(t), h = ce[d], $ = Js[d], T = (I,
|
|
7190
|
-
y(
|
|
7191
|
-
}, F = (I) => {
|
|
7192
|
-
const V = { ...I, starred: !I.starred };
|
|
7193
|
-
p?.(V);
|
|
7191
|
+
const [r, y] = M(u), d = oe(t), h = ce[d], $ = Js[d], T = (I, j) => {
|
|
7192
|
+
y(j), i?.(I);
|
|
7194
7193
|
}, A = (I) => {
|
|
7195
|
-
const
|
|
7196
|
-
|
|
7194
|
+
const j = { ...I, starred: !I.starred };
|
|
7195
|
+
p?.(j);
|
|
7196
|
+
}, E = (I) => {
|
|
7197
|
+
const j = { ...I, pinned: !I.pinned };
|
|
7198
|
+
b?.(j);
|
|
7197
7199
|
};
|
|
7198
7200
|
return /* @__PURE__ */ n(
|
|
7199
7201
|
ie,
|
|
@@ -7204,21 +7206,21 @@ function Hs({
|
|
|
7204
7206
|
onSelect: i,
|
|
7205
7207
|
identity: l,
|
|
7206
7208
|
details: { type: "emails", title: m, count: o?.length ?? 0 },
|
|
7207
|
-
...
|
|
7209
|
+
...f,
|
|
7208
7210
|
children: [
|
|
7209
7211
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${h.title}`, children: m }) }),
|
|
7210
7212
|
/* @__PURE__ */ e(be, { placeholder: "Type to search..." }),
|
|
7211
|
-
/* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((I,
|
|
7213
|
+
/* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((I, j) => /* @__PURE__ */ e(
|
|
7212
7214
|
Xs,
|
|
7213
7215
|
{
|
|
7214
7216
|
email: I,
|
|
7215
7217
|
sizeMeta: $,
|
|
7216
|
-
isSelected:
|
|
7217
|
-
onClick: (
|
|
7218
|
-
onStar:
|
|
7219
|
-
onPin:
|
|
7218
|
+
isSelected: j === r,
|
|
7219
|
+
onClick: (_) => T(_, j),
|
|
7220
|
+
onStar: A,
|
|
7221
|
+
onPin: E
|
|
7220
7222
|
},
|
|
7221
|
-
I._id || I.id ||
|
|
7223
|
+
I._id || I.id || j
|
|
7222
7224
|
)) }),
|
|
7223
7225
|
/* @__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" }) })
|
|
7224
7226
|
]
|
|
@@ -7438,9 +7440,9 @@ function tl({
|
|
|
7438
7440
|
selectedIndex: u = 0,
|
|
7439
7441
|
...p
|
|
7440
7442
|
}) {
|
|
7441
|
-
const [
|
|
7442
|
-
|
|
7443
|
-
}, $ = o[
|
|
7443
|
+
const [b, f] = M(u), r = oe(t), y = ce[r], d = Zs[r], h = (A, E) => {
|
|
7444
|
+
f(E), i?.(A);
|
|
7445
|
+
}, $ = o[b] || o[0], T = d.layout === "split";
|
|
7444
7446
|
return /* @__PURE__ */ n(
|
|
7445
7447
|
ie,
|
|
7446
7448
|
{
|
|
@@ -7455,15 +7457,15 @@ function tl({
|
|
|
7455
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 }) }),
|
|
7456
7458
|
/* @__PURE__ */ e(el, { sizeMeta: d }),
|
|
7457
7459
|
T ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
|
|
7458
|
-
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((
|
|
7460
|
+
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((A, E) => /* @__PURE__ */ e(
|
|
7459
7461
|
_t,
|
|
7460
7462
|
{
|
|
7461
|
-
contact:
|
|
7463
|
+
contact: A,
|
|
7462
7464
|
sizeMeta: d,
|
|
7463
|
-
isSelected:
|
|
7464
|
-
onClick: (I) => h(I,
|
|
7465
|
+
isSelected: E === b,
|
|
7466
|
+
onClick: (I) => h(I, E)
|
|
7465
7467
|
},
|
|
7466
|
-
|
|
7468
|
+
A._id || A.id || E
|
|
7467
7469
|
)) }),
|
|
7468
7470
|
/* @__PURE__ */ e(
|
|
7469
7471
|
Ks,
|
|
@@ -7474,15 +7476,15 @@ function tl({
|
|
|
7474
7476
|
)
|
|
7475
7477
|
] }) : (
|
|
7476
7478
|
// Single column layout for small screens
|
|
7477
|
-
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((
|
|
7479
|
+
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((A, E) => /* @__PURE__ */ e(
|
|
7478
7480
|
_t,
|
|
7479
7481
|
{
|
|
7480
|
-
contact:
|
|
7482
|
+
contact: A,
|
|
7481
7483
|
sizeMeta: d,
|
|
7482
|
-
isSelected:
|
|
7483
|
-
onClick: (I) => h(I,
|
|
7484
|
+
isSelected: E === b,
|
|
7485
|
+
onClick: (I) => h(I, E)
|
|
7484
7486
|
},
|
|
7485
|
-
|
|
7487
|
+
A._id || A.id || E
|
|
7486
7488
|
)) })
|
|
7487
7489
|
),
|
|
7488
7490
|
/* @__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" }) })
|
|
@@ -7571,8 +7573,8 @@ function nl({
|
|
|
7571
7573
|
termLabel: o = "Spring 2024",
|
|
7572
7574
|
balance: u = 3e3,
|
|
7573
7575
|
totalCharges: p = 4440,
|
|
7574
|
-
totalPayments:
|
|
7575
|
-
transactions:
|
|
7576
|
+
totalPayments: b = 1568,
|
|
7577
|
+
transactions: f = [
|
|
7576
7578
|
{
|
|
7577
7579
|
id: "t1",
|
|
7578
7580
|
date: "February 16, 2025",
|
|
@@ -7599,7 +7601,7 @@ function nl({
|
|
|
7599
7601
|
checkboxPosition: s,
|
|
7600
7602
|
onSelect: i,
|
|
7601
7603
|
identity: l,
|
|
7602
|
-
details: { type: "account-summary", termLabel: o, balance: u, totalCharges: p, totalPayments:
|
|
7604
|
+
details: { type: "account-summary", termLabel: o, balance: u, totalCharges: p, totalPayments: b },
|
|
7603
7605
|
...r,
|
|
7604
7606
|
children: [
|
|
7605
7607
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
@@ -7620,7 +7622,7 @@ function nl({
|
|
|
7620
7622
|
] }),
|
|
7621
7623
|
/* @__PURE__ */ n("div", { children: [
|
|
7622
7624
|
/* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Payments" }),
|
|
7623
|
-
/* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: $e(
|
|
7625
|
+
/* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: $e(b) })
|
|
7624
7626
|
] })
|
|
7625
7627
|
] })
|
|
7626
7628
|
] }),
|
|
@@ -7632,10 +7634,10 @@ function nl({
|
|
|
7632
7634
|
] }),
|
|
7633
7635
|
/* @__PURE__ */ n("div", { children: [
|
|
7634
7636
|
/* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Payments" }),
|
|
7635
|
-
/* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: $e(
|
|
7637
|
+
/* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: $e(b) })
|
|
7636
7638
|
] })
|
|
7637
7639
|
] }),
|
|
7638
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children:
|
|
7640
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: f.slice(0, 2).map(($, T) => /* @__PURE__ */ e(
|
|
7639
7641
|
al,
|
|
7640
7642
|
{
|
|
7641
7643
|
side: T === 0 ? "left" : "right",
|
|
@@ -7763,7 +7765,7 @@ function ll({
|
|
|
7763
7765
|
term: o = "Fall 2025",
|
|
7764
7766
|
...u
|
|
7765
7767
|
}) {
|
|
7766
|
-
const [p,
|
|
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];
|
|
7767
7769
|
return /* @__PURE__ */ n(
|
|
7768
7770
|
ie,
|
|
7769
7771
|
{
|
|
@@ -7789,11 +7791,11 @@ function ll({
|
|
|
7789
7791
|
"button",
|
|
7790
7792
|
{
|
|
7791
7793
|
className: "flex items-center gap-1 p-2 text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors duration-200",
|
|
7792
|
-
onClick: () => r(!
|
|
7794
|
+
onClick: () => r(!f),
|
|
7793
7795
|
children: /* @__PURE__ */ e(na, { className: "h-4 w-4" })
|
|
7794
7796
|
}
|
|
7795
7797
|
),
|
|
7796
|
-
|
|
7798
|
+
f && /* @__PURE__ */ n("div", { className: "absolute right-0 top-full mt-1 w-48 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md shadow-lg z-10 py-1", children: [
|
|
7797
7799
|
/* @__PURE__ */ e("button", { className: "w-full px-4 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left", children: "Download Pay Stub" }),
|
|
7798
7800
|
/* @__PURE__ */ e("button", { className: "w-full px-4 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left", children: "View Leave History" })
|
|
7799
7801
|
] })
|
|
@@ -7803,7 +7805,7 @@ function ll({
|
|
|
7803
7805
|
"button",
|
|
7804
7806
|
{
|
|
7805
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"}`,
|
|
7806
|
-
onClick: () =>
|
|
7808
|
+
onClick: () => b(T.id),
|
|
7807
7809
|
children: T.name.split(" ")[0]
|
|
7808
7810
|
},
|
|
7809
7811
|
T.id
|
|
@@ -7954,7 +7956,7 @@ function dl({
|
|
|
7954
7956
|
subtitle: o = "Drive Shared",
|
|
7955
7957
|
...u
|
|
7956
7958
|
}) {
|
|
7957
|
-
const [p,
|
|
7959
|
+
const [p, b] = M(!1), f = oe(t), r = ce[f], y = cl[f];
|
|
7958
7960
|
return /* @__PURE__ */ n(
|
|
7959
7961
|
ie,
|
|
7960
7962
|
{
|
|
@@ -7976,7 +7978,7 @@ function dl({
|
|
|
7976
7978
|
"button",
|
|
7977
7979
|
{
|
|
7978
7980
|
className: "flex items-center gap-1 p-2 text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors duration-200",
|
|
7979
|
-
onClick: () =>
|
|
7981
|
+
onClick: () => b(!p),
|
|
7980
7982
|
children: /* @__PURE__ */ e(Qt, { className: "h-4 w-4" })
|
|
7981
7983
|
}
|
|
7982
7984
|
),
|
|
@@ -8200,9 +8202,9 @@ function bl({
|
|
|
8200
8202
|
showBanner: u = !0,
|
|
8201
8203
|
...p
|
|
8202
8204
|
}) {
|
|
8203
|
-
const [
|
|
8204
|
-
|
|
8205
|
-
}, $ =
|
|
8205
|
+
const [b, f] = M(o), r = oe(t), y = ce[r], d = ul[r], h = (A) => {
|
|
8206
|
+
f((E) => E.filter((I) => I.id !== A.id));
|
|
8207
|
+
}, $ = b.find((A) => A.type === "banner"), T = b.filter((A) => A.type !== "banner");
|
|
8206
8208
|
return /* @__PURE__ */ n(
|
|
8207
8209
|
ie,
|
|
8208
8210
|
{
|
|
@@ -8211,7 +8213,7 @@ function bl({
|
|
|
8211
8213
|
checkboxPosition: s,
|
|
8212
8214
|
onSelect: i,
|
|
8213
8215
|
identity: l,
|
|
8214
|
-
details: { type: "alerts", title: m, count:
|
|
8216
|
+
details: { type: "alerts", title: m, count: b.length },
|
|
8215
8217
|
...p,
|
|
8216
8218
|
children: [
|
|
8217
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 }) }),
|
|
@@ -8222,14 +8224,14 @@ function bl({
|
|
|
8222
8224
|
onDismiss: h
|
|
8223
8225
|
}
|
|
8224
8226
|
),
|
|
8225
|
-
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: T.slice(0, 3).map((
|
|
8227
|
+
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: T.slice(0, 3).map((A) => /* @__PURE__ */ e(
|
|
8226
8228
|
pl,
|
|
8227
8229
|
{
|
|
8228
|
-
alert:
|
|
8230
|
+
alert: A,
|
|
8229
8231
|
sizeMeta: d,
|
|
8230
8232
|
onDismiss: h
|
|
8231
8233
|
},
|
|
8232
|
-
|
|
8234
|
+
A.id
|
|
8233
8235
|
)) }),
|
|
8234
8236
|
/* @__PURE__ */ e("button", { className: "w-full py-3 px-4 border border-zinc-300 dark:border-zinc-600 text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 font-medium rounded-lg transition-colors duration-200", children: "View All" })
|
|
8235
8237
|
]
|
|
@@ -8376,7 +8378,7 @@ function vl({
|
|
|
8376
8378
|
videos: o = fl,
|
|
8377
8379
|
...u
|
|
8378
8380
|
}) {
|
|
8379
|
-
const [p,
|
|
8381
|
+
const [p, b] = M(!1), f = oe(t), r = ce[f], y = xl[f];
|
|
8380
8382
|
return /* @__PURE__ */ n(
|
|
8381
8383
|
ie,
|
|
8382
8384
|
{
|
|
@@ -8395,7 +8397,7 @@ function vl({
|
|
|
8395
8397
|
"button",
|
|
8396
8398
|
{
|
|
8397
8399
|
className: "flex items-center gap-1 px-3 py-1.5 text-sm text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 border border-zinc-300 dark:border-zinc-600 rounded-md transition-colors duration-200",
|
|
8398
|
-
onClick: () =>
|
|
8400
|
+
onClick: () => b(!p),
|
|
8399
8401
|
children: [
|
|
8400
8402
|
"Filter",
|
|
8401
8403
|
/* @__PURE__ */ e(ve, { className: "h-4 w-4 transform rotate-90" })
|