unifyedx-storybook-new 0.2.42 → 0.2.44
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,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e, Fragment as te } from "react/jsx-runtime";
|
|
2
|
-
import se, { useState as L, useMemo as me, useId as Xe, Fragment as
|
|
3
|
-
import { a as
|
|
4
|
-
import { Popover as
|
|
2
|
+
import se, { useState as L, useMemo as me, useId as Xe, Fragment as H, useEffect as Z, useCallback as ae, useRef as ge } from "react";
|
|
3
|
+
import { a as Q, U as dt, X as ye, P as c, L as ja, C as fe, b as Ke, D as mt, f as zt, d as Yt, F as Va, e as _a, h as Ua, T as Qe, u as Ga, I as Wt, i as Jt, j as qa, k as Ya, l as Wa, m as Xt, S as vt, n as Qt, M as Ja, o as Xa, p as Nt, q as Qa, A as Ha, E as Ht, r as Za, s as Ka, t as er, v as tr, w as Zt, x as ar, y as Kt, z as ea, B as rr, G as nr, H as sr, J as He, K as ut, N as ht, O as lr, Q as or, R as ta, V as ir, W as wt, Y as cr, Z as dr, _ as Le, $ as mr, a0 as ur, a1 as hr, a2 as pr, a3 as gr, a4 as br, a5 as St, a6 as fr, a7 as yr, a8 as xr, a9 as vr, aa as Nr, ab as wr, ac as kr, ad as Cr, ae as zr, af as Ae, ag as aa, ah as Sr, ai as Dr, aj as $r, ak as Tr, al as Ar, am as ra, an as Fr, ao as Er, ap as na, aq as Rr, ar as pt, as as sa, at as Or } from "./vendor-DoYRzmYd.js";
|
|
4
|
+
import { Popover as Ir, PopoverButton as Pr, PopoverPanel as Mr, Transition as ue, Dialog as be, TransitionChild as Ne, DialogPanel as Fe, DialogTitle as et, TabGroup as Lr, TabList as Br, Tab as ne, TabPanels as jr, RadioGroup as Ue, Listbox as K, ListboxButton as Vr, ListboxOptions as _r, ListboxOption as Ur, SwitchGroup as Gr, Switch as lt, Menu as qr, MenuButton as Yr, Portal as Wr, MenuItems as Jr, MenuItem as Xr, DialogBackdrop as Qr } from "@headlessui/react";
|
|
5
5
|
import { motion as le, AnimatePresence as ke } from "framer-motion";
|
|
6
|
-
import { d as
|
|
7
|
-
import { useFloating as
|
|
6
|
+
import { d as Hr } from "./vendor-lodash-DUMS_goM.js";
|
|
7
|
+
import { useFloating as la, offset as oa, flip as ia, shift as ca, autoUpdate as da, useClick as Zr, useDismiss as Kr, useInteractions as en, FloatingPortal as tn } from "@floating-ui/react";
|
|
8
8
|
import ot, { debounce as an } from "lodash";
|
|
9
9
|
import { toast as Se, ToastContainer as rn, Slide as nn } from "react-toastify";
|
|
10
10
|
import "react-toastify/dist/ReactToastify.css";
|
|
11
|
-
import { P as sn, S as ln, F as on, G as cn, a as dn, E as mn, b as un, C as hn, R as pn, c as gn, d as bn, e as fn, f as yn, I as xn, g as
|
|
11
|
+
import { P as sn, S as ln, F as on, G as cn, a as dn, E as mn, b as un, C as hn, R as pn, c as gn, d as bn, e as fn, f as yn, I as xn, g as Dt } from "./vendor-syncfusion-v-M3ddHK.js";
|
|
12
12
|
const vn = (t) => {
|
|
13
13
|
let a = 2166136261;
|
|
14
14
|
for (let s = 0; s < t.length; s++)
|
|
@@ -29,16 +29,16 @@ const vn = (t) => {
|
|
|
29
29
|
className: m,
|
|
30
30
|
...i
|
|
31
31
|
}) => {
|
|
32
|
-
const [u, g] = L(!1), f = me(() => Nn(a), []),
|
|
32
|
+
const [u, g] = L(!1), f = me(() => Nn(a), []), y = t && !u, r = !y && a, N = !y && !a, d = Q(
|
|
33
33
|
"avatar-container",
|
|
34
34
|
`avatar--size-${s}`,
|
|
35
35
|
m
|
|
36
|
-
), p =
|
|
36
|
+
), p = y ? "transparent" : o || f.bg, S = l || f.text;
|
|
37
37
|
return /* @__PURE__ */ n("div", { className: d, style: {
|
|
38
38
|
backgroundColor: p,
|
|
39
|
-
color:
|
|
39
|
+
color: S
|
|
40
40
|
}, ...i, children: [
|
|
41
|
-
|
|
41
|
+
y && /* @__PURE__ */ e(
|
|
42
42
|
"img",
|
|
43
43
|
{
|
|
44
44
|
src: t,
|
|
@@ -74,7 +74,7 @@ const vn = (t) => {
|
|
|
74
74
|
className: u,
|
|
75
75
|
...g
|
|
76
76
|
}) => {
|
|
77
|
-
const f =
|
|
77
|
+
const f = Q(
|
|
78
78
|
"badge",
|
|
79
79
|
`badge--variant-${a}`,
|
|
80
80
|
`badge--size-${s}`,
|
|
@@ -150,19 +150,19 @@ const zn = {
|
|
|
150
150
|
// Renamed for clarity, expecting a component type e.g., CheckCircle
|
|
151
151
|
disabled: g = !1,
|
|
152
152
|
size: f = "medium",
|
|
153
|
-
label:
|
|
153
|
+
label: y,
|
|
154
154
|
children: r,
|
|
155
155
|
// ✅ Add children to the props list
|
|
156
156
|
onClick: N,
|
|
157
157
|
...d
|
|
158
158
|
}) => {
|
|
159
|
-
const p = g || m,
|
|
159
|
+
const p = g || m, S = u && !y, A = Q(
|
|
160
160
|
"btn-base",
|
|
161
161
|
zn[f],
|
|
162
162
|
Sn[i],
|
|
163
163
|
{
|
|
164
164
|
"is-loading": m,
|
|
165
|
-
"btn-icon-only":
|
|
165
|
+
"btn-icon-only": S
|
|
166
166
|
},
|
|
167
167
|
l
|
|
168
168
|
);
|
|
@@ -174,12 +174,12 @@ const zn = {
|
|
|
174
174
|
className: A,
|
|
175
175
|
disabled: p,
|
|
176
176
|
onClick: N,
|
|
177
|
-
title: a ||
|
|
178
|
-
"aria-label": o ||
|
|
177
|
+
title: a || S && o || (typeof y == "string" ? y : void 0),
|
|
178
|
+
"aria-label": o || S && a || (typeof y == "string" ? y : void 0),
|
|
179
179
|
...d,
|
|
180
180
|
children: m ? /* @__PURE__ */ e(ja, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(te, { children: [
|
|
181
181
|
u && /* @__PURE__ */ e(u, { size: f === "large" ? 20 : 16 }),
|
|
182
|
-
|
|
182
|
+
y,
|
|
183
183
|
r,
|
|
184
184
|
" "
|
|
185
185
|
] })
|
|
@@ -208,7 +208,7 @@ const zn = {
|
|
|
208
208
|
}
|
|
209
209
|
)
|
|
210
210
|
] }, o);
|
|
211
|
-
}) }) }),
|
|
211
|
+
}) }) }), gt = ({
|
|
212
212
|
label: t,
|
|
213
213
|
id: a,
|
|
214
214
|
error: s,
|
|
@@ -236,7 +236,7 @@ const zn = {
|
|
|
236
236
|
/* @__PURE__ */ e(
|
|
237
237
|
"div",
|
|
238
238
|
{
|
|
239
|
-
className:
|
|
239
|
+
className: Q("checkbox-box", {
|
|
240
240
|
"checkbox-box--checked": m,
|
|
241
241
|
"checkbox-box--error": !!s
|
|
242
242
|
}),
|
|
@@ -248,7 +248,7 @@ const zn = {
|
|
|
248
248
|
] }),
|
|
249
249
|
s && /* @__PURE__ */ e("p", { className: "checkbox-error-message", children: s })
|
|
250
250
|
] });
|
|
251
|
-
}, $n = ({ children: t }) => /* @__PURE__ */ e(
|
|
251
|
+
}, $n = ({ children: t }) => /* @__PURE__ */ e(Ir, { className: "popover-container", children: t }), Tn = ({ children: t }) => /* @__PURE__ */ e(Pr, { as: "div", children: t }), An = ({ children: t, className: a }) => /* @__PURE__ */ e(Mr, { className: `popover-panel ${a || ""}`, children: t }), ma = mt, ua = ({
|
|
252
252
|
value: t,
|
|
253
253
|
onChange: a,
|
|
254
254
|
onClear: s,
|
|
@@ -258,7 +258,7 @@ const zn = {
|
|
|
258
258
|
disabled: i = !1,
|
|
259
259
|
className: u,
|
|
260
260
|
...g
|
|
261
|
-
}) => /* @__PURE__ */ n("div", { className:
|
|
261
|
+
}) => /* @__PURE__ */ n("div", { className: Q("datepicker-wrapper", u), children: [
|
|
262
262
|
l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "datepicker-input", children: l }),
|
|
263
263
|
/* @__PURE__ */ e(
|
|
264
264
|
ma,
|
|
@@ -287,14 +287,14 @@ const zn = {
|
|
|
287
287
|
className: u,
|
|
288
288
|
...g
|
|
289
289
|
}) => {
|
|
290
|
-
const f = t?.from,
|
|
290
|
+
const f = t?.from, y = t?.to, r = (d) => {
|
|
291
291
|
d.stopPropagation(), d.preventDefault(), s?.();
|
|
292
|
-
}, N = f &&
|
|
293
|
-
|
|
292
|
+
}, N = f && y ? /* @__PURE__ */ n(te, { children: [
|
|
293
|
+
zt(f, "MMM d, y"),
|
|
294
294
|
" - ",
|
|
295
|
-
|
|
295
|
+
zt(y, "MMM d, y")
|
|
296
296
|
] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: o });
|
|
297
|
-
return /* @__PURE__ */ n("div", { className:
|
|
297
|
+
return /* @__PURE__ */ n("div", { className: Q("datepicker-wrapper", u), children: [
|
|
298
298
|
l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "daterangepicker-input", children: l }),
|
|
299
299
|
/* @__PURE__ */ n($n, { children: [
|
|
300
300
|
/* @__PURE__ */ e(Tn, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "datepicker-input-container", children: [
|
|
@@ -303,14 +303,14 @@ const zn = {
|
|
|
303
303
|
{
|
|
304
304
|
id: "daterangepicker-input",
|
|
305
305
|
type: "button",
|
|
306
|
-
className:
|
|
306
|
+
className: Q("datepicker-trigger", {
|
|
307
307
|
"datepicker-trigger--error": !!m,
|
|
308
308
|
"datepicker-trigger--disabled": i
|
|
309
309
|
}),
|
|
310
310
|
disabled: i,
|
|
311
|
-
"aria-label": f &&
|
|
311
|
+
"aria-label": f && y ? `Selected range is ${N}` : o,
|
|
312
312
|
children: [
|
|
313
|
-
/* @__PURE__ */ e(
|
|
313
|
+
/* @__PURE__ */ e(Yt, { className: "datepicker-icon" }),
|
|
314
314
|
/* @__PURE__ */ e("span", { className: "datepicker-value", children: N })
|
|
315
315
|
]
|
|
316
316
|
}
|
|
@@ -555,10 +555,10 @@ const zn = {
|
|
|
555
555
|
DRIVE: "drive",
|
|
556
556
|
INTEREST: "interest",
|
|
557
557
|
ARTICLE: "article"
|
|
558
|
-
},
|
|
558
|
+
}, $t = {
|
|
559
559
|
View: "view",
|
|
560
560
|
Manage: "edit"
|
|
561
|
-
},
|
|
561
|
+
}, Tt = ({ extension: t, size: a = 36 }) => {
|
|
562
562
|
const s = (t || "").toLowerCase(), o = En[s];
|
|
563
563
|
return o ? /* @__PURE__ */ e("div", { style: { width: a }, className: "flex-shrink-0", children: /* @__PURE__ */ e(
|
|
564
564
|
Va,
|
|
@@ -580,7 +580,7 @@ const zn = {
|
|
|
580
580
|
children: /* @__PURE__ */ e(_a, { className: "text-gray-400", size: a * 0.75 })
|
|
581
581
|
}
|
|
582
582
|
);
|
|
583
|
-
}, Rn = (t) => /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: t.width || 24, height: t.height || 24, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ e("path", { d: "M20 12H4M4 12L10 18M4 12L10 6", stroke: "#767676", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }),
|
|
583
|
+
}, Rn = (t) => /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: t.width || 24, height: t.height || 24, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ e("path", { d: "M20 12H4M4 12L10 18M4 12L10 6", stroke: "#767676", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), At = (t, a = 2) => {
|
|
584
584
|
if (!+t) return "0 Bytes";
|
|
585
585
|
const s = 1024, o = a < 0 ? 0 : a, l = ["Bytes", "KB", "MB", "GB", "TB"], m = Math.floor(Math.log(t) / Math.log(s));
|
|
586
586
|
return `${parseFloat((t / Math.pow(s, m)).toFixed(o))} ${l[m]}`;
|
|
@@ -598,15 +598,15 @@ const zn = {
|
|
|
598
598
|
rejectedFiles: u = [],
|
|
599
599
|
handleRemoveValidFile: g,
|
|
600
600
|
handleRemoveRejectedFile: f,
|
|
601
|
-
handleSubmit:
|
|
601
|
+
handleSubmit: y,
|
|
602
602
|
isSubmitting: r,
|
|
603
603
|
formErrors: N,
|
|
604
604
|
// --- UI Text ---
|
|
605
605
|
title: d = "Upload Files",
|
|
606
606
|
subHeading: p = "Supports PNG, JPG, PDF. Max size: 50MB."
|
|
607
607
|
}) => {
|
|
608
|
-
const
|
|
609
|
-
return /* @__PURE__ */ e(ue, { appear: !0, show: t, as:
|
|
608
|
+
const S = i.length > 0 || u.length > 0;
|
|
609
|
+
return /* @__PURE__ */ e(ue, { appear: !0, show: t, as: H, children: /* @__PURE__ */ n(
|
|
610
610
|
be,
|
|
611
611
|
{
|
|
612
612
|
as: "div",
|
|
@@ -617,7 +617,7 @@ const zn = {
|
|
|
617
617
|
/* @__PURE__ */ e(
|
|
618
618
|
Ne,
|
|
619
619
|
{
|
|
620
|
-
as:
|
|
620
|
+
as: H,
|
|
621
621
|
enter: "ease-out duration-300",
|
|
622
622
|
enterFrom: "opacity-0",
|
|
623
623
|
enterTo: "opacity-100",
|
|
@@ -630,7 +630,7 @@ const zn = {
|
|
|
630
630
|
/* @__PURE__ */ e("div", { className: "dialog-positioner", children: /* @__PURE__ */ e(
|
|
631
631
|
Ne,
|
|
632
632
|
{
|
|
633
|
-
as:
|
|
633
|
+
as: H,
|
|
634
634
|
enter: "ease-out duration-300",
|
|
635
635
|
enterFrom: "opacity-0 scale-95",
|
|
636
636
|
enterTo: "opacity-100 scale-100",
|
|
@@ -644,7 +644,7 @@ const zn = {
|
|
|
644
644
|
onClick: (A) => A.stopPropagation(),
|
|
645
645
|
children: [
|
|
646
646
|
/* @__PURE__ */ e("input", { ...o() }),
|
|
647
|
-
/* @__PURE__ */ n("form", { onSubmit:
|
|
647
|
+
/* @__PURE__ */ n("form", { onSubmit: y, className: "form-wrapper", children: [
|
|
648
648
|
/* @__PURE__ */ n("div", { className: "dialog-header", children: [
|
|
649
649
|
/* @__PURE__ */ e(et, { as: "h3", className: "dialog-title-text", children: d }),
|
|
650
650
|
/* @__PURE__ */ e(
|
|
@@ -681,7 +681,7 @@ const zn = {
|
|
|
681
681
|
}
|
|
682
682
|
),
|
|
683
683
|
N.filesToUpload && /* @__PURE__ */ e("p", { className: "form-error-message", children: N.filesToUpload.message }),
|
|
684
|
-
|
|
684
|
+
S && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
|
|
685
685
|
/* @__PURE__ */ e("h3", { children: "Upload Queue" }),
|
|
686
686
|
/* @__PURE__ */ n("ul", { className: "file-list", children: [
|
|
687
687
|
i.map((A, E) => /* @__PURE__ */ n(
|
|
@@ -691,14 +691,14 @@ const zn = {
|
|
|
691
691
|
children: [
|
|
692
692
|
/* @__PURE__ */ n("div", { className: "file-item-details", children: [
|
|
693
693
|
/* @__PURE__ */ e(
|
|
694
|
-
|
|
694
|
+
Tt,
|
|
695
695
|
{
|
|
696
696
|
extension: A.name.split(".").pop()
|
|
697
697
|
}
|
|
698
698
|
),
|
|
699
699
|
/* @__PURE__ */ n("div", { children: [
|
|
700
700
|
/* @__PURE__ */ e("p", { className: "file-item-name", children: A.name }),
|
|
701
|
-
/* @__PURE__ */ e("p", { className: "file-item-size", children:
|
|
701
|
+
/* @__PURE__ */ e("p", { className: "file-item-size", children: At(A.size) })
|
|
702
702
|
] })
|
|
703
703
|
] }),
|
|
704
704
|
/* @__PURE__ */ e(
|
|
@@ -707,7 +707,7 @@ const zn = {
|
|
|
707
707
|
type: "button",
|
|
708
708
|
onClick: () => g(E),
|
|
709
709
|
className: "remove-file-button",
|
|
710
|
-
children: /* @__PURE__ */ e(
|
|
710
|
+
children: /* @__PURE__ */ e(Qe, { size: 16 })
|
|
711
711
|
}
|
|
712
712
|
)
|
|
713
713
|
]
|
|
@@ -721,14 +721,14 @@ const zn = {
|
|
|
721
721
|
children: [
|
|
722
722
|
/* @__PURE__ */ n("div", { className: "file-item-details", children: [
|
|
723
723
|
/* @__PURE__ */ e(
|
|
724
|
-
|
|
724
|
+
Tt,
|
|
725
725
|
{
|
|
726
726
|
extension: A.name.split(".").pop()
|
|
727
727
|
}
|
|
728
728
|
),
|
|
729
729
|
/* @__PURE__ */ n("div", { children: [
|
|
730
730
|
/* @__PURE__ */ e("p", { className: "file-item-name", children: A.name }),
|
|
731
|
-
/* @__PURE__ */ e("p", { className: "file-item-size", children:
|
|
731
|
+
/* @__PURE__ */ e("p", { className: "file-item-size", children: At(A.size) }),
|
|
732
732
|
/* @__PURE__ */ e("p", { className: "rejection-reason", children: E })
|
|
733
733
|
] })
|
|
734
734
|
] }),
|
|
@@ -738,7 +738,7 @@ const zn = {
|
|
|
738
738
|
type: "button",
|
|
739
739
|
onClick: () => f(R),
|
|
740
740
|
className: "remove-file-button",
|
|
741
|
-
children: /* @__PURE__ */ e(
|
|
741
|
+
children: /* @__PURE__ */ e(Qe, { size: 16 })
|
|
742
742
|
}
|
|
743
743
|
)
|
|
744
744
|
]
|
|
@@ -783,19 +783,19 @@ const zn = {
|
|
|
783
783
|
}, je = (t) => {
|
|
784
784
|
const a = new Date(t);
|
|
785
785
|
return a.setHours(23, 59, 59, 999), a;
|
|
786
|
-
},
|
|
786
|
+
}, bt = (t, a) => {
|
|
787
787
|
const s = new Date(t);
|
|
788
788
|
return s.setDate(s.getDate() + a), s;
|
|
789
|
-
},
|
|
789
|
+
}, ft = (t) => {
|
|
790
790
|
const a = new Date(t), s = a.getDay(), o = a.getDate() - s;
|
|
791
791
|
return Be(new Date(a.setDate(o)));
|
|
792
|
-
}, On = (t) => je(
|
|
792
|
+
}, On = (t) => je(bt(ft(t), 6)), Ft = (t) => {
|
|
793
793
|
const a = new Date(t);
|
|
794
794
|
return Be(new Date(a.getFullYear(), a.getMonth(), 1));
|
|
795
|
-
},
|
|
795
|
+
}, Et = (t) => {
|
|
796
796
|
const a = new Date(t);
|
|
797
797
|
return je(new Date(a.getFullYear(), a.getMonth() + 1, 0));
|
|
798
|
-
},
|
|
798
|
+
}, In = (t) => {
|
|
799
799
|
const a = /* @__PURE__ */ new Date();
|
|
800
800
|
switch (t) {
|
|
801
801
|
case "anytime":
|
|
@@ -803,16 +803,16 @@ const zn = {
|
|
|
803
803
|
case "today":
|
|
804
804
|
return [Be(a), je(a)];
|
|
805
805
|
case "this_week":
|
|
806
|
-
return [
|
|
806
|
+
return [ft(a), On(a)];
|
|
807
807
|
case "last_week": {
|
|
808
|
-
const s =
|
|
809
|
-
return [Be(s), je(
|
|
808
|
+
const s = bt(ft(a), -7);
|
|
809
|
+
return [Be(s), je(bt(s, 6))];
|
|
810
810
|
}
|
|
811
811
|
case "this_month":
|
|
812
|
-
return [
|
|
812
|
+
return [Ft(a), Et(a)];
|
|
813
813
|
case "last_month": {
|
|
814
814
|
const s = /* @__PURE__ */ new Date(), o = new Date(s.getFullYear(), s.getMonth() - 1, 1);
|
|
815
|
-
return [
|
|
815
|
+
return [Ft(o), Et(o)];
|
|
816
816
|
}
|
|
817
817
|
default:
|
|
818
818
|
return [null, null];
|
|
@@ -831,12 +831,12 @@ const zn = {
|
|
|
831
831
|
const [g, f] = L({
|
|
832
832
|
createdBy: [],
|
|
833
833
|
updatedBy: []
|
|
834
|
-
}), [
|
|
834
|
+
}), [y, r] = L({
|
|
835
835
|
createdBy: !1,
|
|
836
836
|
updatedBy: !1
|
|
837
837
|
}), [N, d] = L({
|
|
838
838
|
startDate: null
|
|
839
|
-
}), [p,
|
|
839
|
+
}), [p, S] = L({
|
|
840
840
|
endDate: null
|
|
841
841
|
}), A = Ga({
|
|
842
842
|
initialValues: JSON.parse(JSON.stringify(m)),
|
|
@@ -889,7 +889,7 @@ const zn = {
|
|
|
889
889
|
}
|
|
890
890
|
}, U = (C) => {
|
|
891
891
|
const h = l[C].key, w = l[C].url;
|
|
892
|
-
l[C].type === "multiselect-users" && g[h].length === 0 && !
|
|
892
|
+
l[C].type === "multiselect-users" && g[h].length === 0 && !y[h] && V(h, w);
|
|
893
893
|
}, Y = () => {
|
|
894
894
|
A.resetForm(), f({ createdBy: [], updatedBy: [] }), o();
|
|
895
895
|
}, G = (C) => {
|
|
@@ -905,9 +905,9 @@ const zn = {
|
|
|
905
905
|
"select",
|
|
906
906
|
{
|
|
907
907
|
value: w.operator || "in",
|
|
908
|
-
onChange: (
|
|
908
|
+
onChange: (P) => A.setFieldValue(`${C}.operator`, P.target.value),
|
|
909
909
|
className: "filter-select",
|
|
910
|
-
children: h.operators.map((
|
|
910
|
+
children: h.operators.map((P) => /* @__PURE__ */ e("option", { value: P, children: P === "in" ? "Includes" : "Excludes" }, P))
|
|
911
911
|
}
|
|
912
912
|
)
|
|
913
913
|
] }),
|
|
@@ -920,8 +920,8 @@ const zn = {
|
|
|
920
920
|
id: `select-all-${C}`,
|
|
921
921
|
className: "filter-checkbox-input",
|
|
922
922
|
checked: h.options.length > 0 && T.length === h.options.length,
|
|
923
|
-
onChange: (
|
|
924
|
-
const q =
|
|
923
|
+
onChange: (P) => {
|
|
924
|
+
const q = P.target.checked ? h.options.map((X) => X.value) : [];
|
|
925
925
|
A.setFieldValue(`${C}.values`, q);
|
|
926
926
|
}
|
|
927
927
|
}
|
|
@@ -935,16 +935,16 @@ const zn = {
|
|
|
935
935
|
}
|
|
936
936
|
)
|
|
937
937
|
] }),
|
|
938
|
-
h.options.map((
|
|
938
|
+
h.options.map((P) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
|
|
939
939
|
/* @__PURE__ */ e(
|
|
940
940
|
"input",
|
|
941
941
|
{
|
|
942
942
|
type: "checkbox",
|
|
943
|
-
id: `${C}-${
|
|
943
|
+
id: `${C}-${P.value}`,
|
|
944
944
|
className: "filter-checkbox-input",
|
|
945
|
-
checked: T.includes(
|
|
945
|
+
checked: T.includes(P.value),
|
|
946
946
|
onChange: (q) => {
|
|
947
|
-
const X = q.target.checked ? [...T,
|
|
947
|
+
const X = q.target.checked ? [...T, P.value] : T.filter((xe) => xe !== P.value);
|
|
948
948
|
A.setFieldValue(`${C}.values`, X);
|
|
949
949
|
}
|
|
950
950
|
}
|
|
@@ -952,16 +952,16 @@ const zn = {
|
|
|
952
952
|
/* @__PURE__ */ e(
|
|
953
953
|
"label",
|
|
954
954
|
{
|
|
955
|
-
htmlFor: `${C}-${
|
|
955
|
+
htmlFor: `${C}-${P.value}`,
|
|
956
956
|
className: "filter-checkbox-label",
|
|
957
|
-
children:
|
|
957
|
+
children: P.label
|
|
958
958
|
}
|
|
959
959
|
)
|
|
960
|
-
] },
|
|
960
|
+
] }, P.value))
|
|
961
961
|
] })
|
|
962
962
|
] });
|
|
963
963
|
case "multiselect-users":
|
|
964
|
-
const k = g[C] || [], v =
|
|
964
|
+
const k = g[C] || [], v = y[C];
|
|
965
965
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
966
966
|
/* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
|
|
967
967
|
/* @__PURE__ */ e("label", { className: "filter-label", children: "Operator:" }),
|
|
@@ -969,9 +969,9 @@ const zn = {
|
|
|
969
969
|
"select",
|
|
970
970
|
{
|
|
971
971
|
value: w.operator || "in",
|
|
972
|
-
onChange: (
|
|
972
|
+
onChange: (P) => A.setFieldValue(`${C}.operator`, P.target.value),
|
|
973
973
|
className: "filter-select",
|
|
974
|
-
children: h.operators.map((
|
|
974
|
+
children: h.operators.map((P) => /* @__PURE__ */ e("option", { value: P, children: P === "in" ? "Includes" : "Excludes" }, P))
|
|
975
975
|
}
|
|
976
976
|
)
|
|
977
977
|
] }),
|
|
@@ -984,8 +984,8 @@ const zn = {
|
|
|
984
984
|
id: `select-all-users-${C}`,
|
|
985
985
|
className: "filter-checkbox-input",
|
|
986
986
|
checked: k.length > 0 && T.length === k.length,
|
|
987
|
-
onChange: (
|
|
988
|
-
const q =
|
|
987
|
+
onChange: (P) => {
|
|
988
|
+
const q = P.target.checked ? k.map((X) => X.email) : [];
|
|
989
989
|
A.setFieldValue(
|
|
990
990
|
`${C}.values`,
|
|
991
991
|
q
|
|
@@ -1002,16 +1002,16 @@ const zn = {
|
|
|
1002
1002
|
}
|
|
1003
1003
|
)
|
|
1004
1004
|
] }),
|
|
1005
|
-
k.map((
|
|
1005
|
+
k.map((P) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
|
|
1006
1006
|
/* @__PURE__ */ e(
|
|
1007
1007
|
"input",
|
|
1008
1008
|
{
|
|
1009
1009
|
type: "checkbox",
|
|
1010
|
-
id: `${C}-${
|
|
1010
|
+
id: `${C}-${P.email}`,
|
|
1011
1011
|
className: "filter-checkbox-input",
|
|
1012
|
-
checked: T.includes(
|
|
1012
|
+
checked: T.includes(P.email),
|
|
1013
1013
|
onChange: (q) => {
|
|
1014
|
-
const X = q.target.checked ? [...T,
|
|
1014
|
+
const X = q.target.checked ? [...T, P.email] : T.filter((xe) => xe !== P.email);
|
|
1015
1015
|
A.setFieldValue(
|
|
1016
1016
|
`${C}.values`,
|
|
1017
1017
|
X
|
|
@@ -1022,24 +1022,24 @@ const zn = {
|
|
|
1022
1022
|
/* @__PURE__ */ n(
|
|
1023
1023
|
"label",
|
|
1024
1024
|
{
|
|
1025
|
-
htmlFor: `${C}-${
|
|
1025
|
+
htmlFor: `${C}-${P.email}`,
|
|
1026
1026
|
className: "filter-checkbox-label",
|
|
1027
1027
|
children: [
|
|
1028
|
-
/* @__PURE__ */ e("span", { className: "user-label-name", children:
|
|
1029
|
-
/* @__PURE__ */ e("span", { className: "user-label-email", children:
|
|
1028
|
+
/* @__PURE__ */ e("span", { className: "user-label-name", children: P.name }),
|
|
1029
|
+
/* @__PURE__ */ e("span", { className: "user-label-email", children: P.email })
|
|
1030
1030
|
]
|
|
1031
1031
|
}
|
|
1032
1032
|
)
|
|
1033
|
-
] },
|
|
1033
|
+
] }, P.email))
|
|
1034
1034
|
] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
|
|
1035
1035
|
] });
|
|
1036
1036
|
case "date":
|
|
1037
|
-
const b = w.values || [], [
|
|
1037
|
+
const b = w.values || [], [x, $] = b, M = x && $, z = b[0] || null, I = b[1] || null, F = {
|
|
1038
1038
|
startDate: z instanceof Date ? z.toISOString().slice(0, 10) : null,
|
|
1039
1039
|
endDate: z instanceof Date ? z.toISOString().slice(0, 10) : null
|
|
1040
|
-
},
|
|
1041
|
-
startDate:
|
|
1042
|
-
endDate:
|
|
1040
|
+
}, D = {
|
|
1041
|
+
startDate: I instanceof Date ? I.toISOString().slice(0, 10) : null,
|
|
1042
|
+
endDate: I instanceof Date ? I.toISOString().slice(0, 10) : null
|
|
1043
1043
|
}, B = [
|
|
1044
1044
|
{ key: "anytime", label: "Anytime" },
|
|
1045
1045
|
{ key: "today", label: "Today" },
|
|
@@ -1048,17 +1048,17 @@ const zn = {
|
|
|
1048
1048
|
{ key: "this_month", label: "This Month" },
|
|
1049
1049
|
{ key: "last_month", label: "Last Month" },
|
|
1050
1050
|
{ key: "custom", label: "Custom" }
|
|
1051
|
-
], _ = (
|
|
1052
|
-
if (
|
|
1051
|
+
], _ = (P) => {
|
|
1052
|
+
if (P === "anytime") {
|
|
1053
1053
|
A.setFieldValue(`${C}.values`, []), A.setFieldValue(`${C}.range`, "anytime");
|
|
1054
1054
|
return;
|
|
1055
1055
|
}
|
|
1056
|
-
if (
|
|
1056
|
+
if (P === "custom") {
|
|
1057
1057
|
A.setFieldValue(`${C}.range`, "custom");
|
|
1058
1058
|
return;
|
|
1059
1059
|
}
|
|
1060
|
-
const [q, X] =
|
|
1061
|
-
A.setFieldValue(`${C}.values`, q && X ? [q, X] : []), A.setFieldValue(`${C}.range`,
|
|
1060
|
+
const [q, X] = In(P);
|
|
1061
|
+
A.setFieldValue(`${C}.values`, q && X ? [q, X] : []), A.setFieldValue(`${C}.range`, P);
|
|
1062
1062
|
};
|
|
1063
1063
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
1064
1064
|
/* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
|
|
@@ -1067,9 +1067,9 @@ const zn = {
|
|
|
1067
1067
|
"select",
|
|
1068
1068
|
{
|
|
1069
1069
|
value: w.operator,
|
|
1070
|
-
onChange: (
|
|
1070
|
+
onChange: (P) => A.setFieldValue(`${C}.operator`, P.target.value),
|
|
1071
1071
|
className: "filter-select",
|
|
1072
|
-
children: h.operators.map((
|
|
1072
|
+
children: h.operators.map((P) => /* @__PURE__ */ e("option", { value: P, children: P === "in" ? "Is" : "Is not" }, P))
|
|
1073
1073
|
}
|
|
1074
1074
|
),
|
|
1075
1075
|
M && /* @__PURE__ */ e(
|
|
@@ -1087,8 +1087,8 @@ const zn = {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
)
|
|
1089
1089
|
] }),
|
|
1090
|
-
/* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: B.map((
|
|
1091
|
-
const q = w.range ===
|
|
1090
|
+
/* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: B.map((P) => {
|
|
1091
|
+
const q = w.range === P.key || P.key === "anytime" && (!Array.isArray(w.values) || w.values.length === 0);
|
|
1092
1092
|
return /* @__PURE__ */ n(
|
|
1093
1093
|
"label",
|
|
1094
1094
|
{
|
|
@@ -1100,15 +1100,15 @@ const zn = {
|
|
|
1100
1100
|
type: "radio",
|
|
1101
1101
|
name: `preset-${C}`,
|
|
1102
1102
|
checked: q,
|
|
1103
|
-
onChange: () => _(
|
|
1103
|
+
onChange: () => _(P.key),
|
|
1104
1104
|
className: "h-4 w-4"
|
|
1105
1105
|
}
|
|
1106
1106
|
),
|
|
1107
|
-
/* @__PURE__ */ e("span", { className: "text-sm text-[#222]", children:
|
|
1108
|
-
|
|
1107
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-[#222]", children: P.label }),
|
|
1108
|
+
P.key === "anytime" && q && /* @__PURE__ */ e("span", { className: "ml-2 text-xs bg-yellow-100 text-yellow-800 px-2 py-0.5 rounded", children: "Default" })
|
|
1109
1109
|
]
|
|
1110
1110
|
},
|
|
1111
|
-
|
|
1111
|
+
P.key
|
|
1112
1112
|
);
|
|
1113
1113
|
}) }) }),
|
|
1114
1114
|
/* @__PURE__ */ n("div", { className: "", children: [
|
|
@@ -1121,8 +1121,8 @@ const zn = {
|
|
|
1121
1121
|
asSingle: !0,
|
|
1122
1122
|
useRange: !1,
|
|
1123
1123
|
value: F,
|
|
1124
|
-
onChange: (
|
|
1125
|
-
const q =
|
|
1124
|
+
onChange: (P) => {
|
|
1125
|
+
const q = P?.startDate ? Be(new Date(P.startDate)) : null, X = b[1] || null;
|
|
1126
1126
|
q && (A.setFieldValue(`${C}.values`, [q, X]), A.setFieldValue(`${C}.range`, "custom"));
|
|
1127
1127
|
},
|
|
1128
1128
|
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",
|
|
@@ -1144,9 +1144,9 @@ const zn = {
|
|
|
1144
1144
|
{
|
|
1145
1145
|
asSingle: !0,
|
|
1146
1146
|
useRange: !1,
|
|
1147
|
-
value:
|
|
1148
|
-
onChange: (
|
|
1149
|
-
const q =
|
|
1147
|
+
value: D,
|
|
1148
|
+
onChange: (P) => {
|
|
1149
|
+
const q = P?.startDate ? je(new Date(P.startDate)) : null, X = b[0] || null;
|
|
1150
1150
|
q && (A.setFieldValue(`${C}.values`, [X, q]), A.setFieldValue(`${C}.range`, "custom"));
|
|
1151
1151
|
},
|
|
1152
1152
|
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",
|
|
@@ -1160,18 +1160,18 @@ const zn = {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
)
|
|
1162
1162
|
] }),
|
|
1163
|
-
z &&
|
|
1163
|
+
z && I && z > I && /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-2", children: "End date must be after start date" })
|
|
1164
1164
|
] })
|
|
1165
1165
|
] });
|
|
1166
1166
|
default:
|
|
1167
1167
|
return null;
|
|
1168
1168
|
}
|
|
1169
1169
|
};
|
|
1170
|
-
return /* @__PURE__ */ e(ue, { appear: !0, show: t, as:
|
|
1170
|
+
return /* @__PURE__ */ e(ue, { appear: !0, show: t, as: H, children: /* @__PURE__ */ n(be, { as: "div", className: "relative z-50", onClose: a, children: [
|
|
1171
1171
|
/* @__PURE__ */ e(
|
|
1172
1172
|
Ne,
|
|
1173
1173
|
{
|
|
1174
|
-
as:
|
|
1174
|
+
as: H,
|
|
1175
1175
|
enter: "ease-out duration-300",
|
|
1176
1176
|
enterFrom: "opacity-0",
|
|
1177
1177
|
enterTo: "opacity-100",
|
|
@@ -1184,7 +1184,7 @@ const zn = {
|
|
|
1184
1184
|
/* @__PURE__ */ e("div", { className: "filter-modal-container", children: /* @__PURE__ */ e("div", { className: "filter-modal-positioner", children: /* @__PURE__ */ e(
|
|
1185
1185
|
Ne,
|
|
1186
1186
|
{
|
|
1187
|
-
as:
|
|
1187
|
+
as: H,
|
|
1188
1188
|
enter: "ease-out duration-300",
|
|
1189
1189
|
enterFrom: "opacity-0 translate-x-full",
|
|
1190
1190
|
enterTo: "opacity-100 translate-x-0",
|
|
@@ -1300,7 +1300,7 @@ const zn = {
|
|
|
1300
1300
|
id: g,
|
|
1301
1301
|
type: s,
|
|
1302
1302
|
ref: i,
|
|
1303
|
-
className:
|
|
1303
|
+
className: Q("input-field", {
|
|
1304
1304
|
"input-field--error": !!l,
|
|
1305
1305
|
"input-field--with-icon": !!o
|
|
1306
1306
|
}),
|
|
@@ -1310,25 +1310,25 @@ const zn = {
|
|
|
1310
1310
|
] }),
|
|
1311
1311
|
l && /* @__PURE__ */ e("p", { className: "input-error-message", children: l })
|
|
1312
1312
|
] });
|
|
1313
|
-
},
|
|
1313
|
+
}, Rt = {
|
|
1314
1314
|
delete: {
|
|
1315
|
-
icon:
|
|
1315
|
+
icon: Qe,
|
|
1316
1316
|
iconClass: "icon--delete",
|
|
1317
1317
|
primaryButtonCategory: "danger"
|
|
1318
1318
|
// Assuming you add a 'danger' category to your Button
|
|
1319
1319
|
},
|
|
1320
1320
|
warning: {
|
|
1321
|
-
icon:
|
|
1321
|
+
icon: Jt,
|
|
1322
1322
|
iconClass: "icon--warning",
|
|
1323
1323
|
primaryButtonCategory: "warning"
|
|
1324
1324
|
// Assuming a 'warning' category
|
|
1325
1325
|
},
|
|
1326
1326
|
info: {
|
|
1327
|
-
icon:
|
|
1327
|
+
icon: Wt,
|
|
1328
1328
|
iconClass: "icon--info",
|
|
1329
1329
|
primaryButtonCategory: "primary"
|
|
1330
1330
|
}
|
|
1331
|
-
},
|
|
1331
|
+
}, Pn = ({
|
|
1332
1332
|
isOpen: t,
|
|
1333
1333
|
onClose: a,
|
|
1334
1334
|
title: s,
|
|
@@ -1345,16 +1345,16 @@ const zn = {
|
|
|
1345
1345
|
size: f
|
|
1346
1346
|
// Add size prop
|
|
1347
1347
|
}) => {
|
|
1348
|
-
const
|
|
1348
|
+
const y = Rt[i] || Rt.info, r = y.icon, N = () => {
|
|
1349
1349
|
a({ primary: !0, secondary: !1 });
|
|
1350
1350
|
}, d = () => {
|
|
1351
1351
|
a({ primary: !1, secondary: !0 });
|
|
1352
1352
|
};
|
|
1353
|
-
return /* @__PURE__ */ e(ue, { appear: !0, show: t, as:
|
|
1353
|
+
return /* @__PURE__ */ e(ue, { appear: !0, show: t, as: H, children: /* @__PURE__ */ n(be, { as: "div", className: "modal-dialog", onClose: () => a({}), children: [
|
|
1354
1354
|
/* @__PURE__ */ e(
|
|
1355
1355
|
Ne,
|
|
1356
1356
|
{
|
|
1357
|
-
as:
|
|
1357
|
+
as: H,
|
|
1358
1358
|
enter: "ease-out duration-300",
|
|
1359
1359
|
enterFrom: "opacity-0",
|
|
1360
1360
|
enterTo: "opacity-100",
|
|
@@ -1367,7 +1367,7 @@ const zn = {
|
|
|
1367
1367
|
/* @__PURE__ */ e("div", { className: "modal-positioner", children: /* @__PURE__ */ e(
|
|
1368
1368
|
Ne,
|
|
1369
1369
|
{
|
|
1370
|
-
as:
|
|
1370
|
+
as: H,
|
|
1371
1371
|
enter: "ease-out duration-300",
|
|
1372
1372
|
enterFrom: "opacity-0 scale-95",
|
|
1373
1373
|
enterTo: "opacity-100 scale-100",
|
|
@@ -1376,7 +1376,7 @@ const zn = {
|
|
|
1376
1376
|
leaveTo: "opacity-0 scale-95",
|
|
1377
1377
|
children: /* @__PURE__ */ n(Fe, { className: f === "large" ? "modal-panel modal-panel--large" : "modal-panel", children: [
|
|
1378
1378
|
/* @__PURE__ */ n("div", { className: "modal-content-wrapper", children: [
|
|
1379
|
-
/* @__PURE__ */ e("div", { className: `modal-icon-container ${
|
|
1379
|
+
/* @__PURE__ */ e("div", { className: `modal-icon-container ${y.iconClass}`, children: /* @__PURE__ */ e(r, { size: 24, "aria-hidden": "true" }) }),
|
|
1380
1380
|
/* @__PURE__ */ n("div", { className: "modal-text-content", children: [
|
|
1381
1381
|
/* @__PURE__ */ e(et, { as: "h3", className: "modal-title", children: s }),
|
|
1382
1382
|
/* @__PURE__ */ e("div", { className: "modal-description", children: o })
|
|
@@ -1416,7 +1416,7 @@ const zn = {
|
|
|
1416
1416
|
Z(() => {
|
|
1417
1417
|
g(t);
|
|
1418
1418
|
}, [t]);
|
|
1419
|
-
const f = Math.min((t - 1) * s + 1, a),
|
|
1419
|
+
const f = Math.min((t - 1) * s + 1, a), y = Math.min(t * s, a), r = (N) => {
|
|
1420
1420
|
N.preventDefault();
|
|
1421
1421
|
let d = parseInt(u, 10);
|
|
1422
1422
|
isNaN(d) || d < 1 ? d = 1 : d > i && (d = i), g(d), d !== t && o(d);
|
|
@@ -1437,7 +1437,7 @@ const zn = {
|
|
|
1437
1437
|
/* @__PURE__ */ n("span", { className: "pagination-info", children: [
|
|
1438
1438
|
f,
|
|
1439
1439
|
"-",
|
|
1440
|
-
|
|
1440
|
+
y,
|
|
1441
1441
|
" of ",
|
|
1442
1442
|
a,
|
|
1443
1443
|
" items"
|
|
@@ -1521,7 +1521,7 @@ const zn = {
|
|
|
1521
1521
|
Ue.Option,
|
|
1522
1522
|
{
|
|
1523
1523
|
value: i.value,
|
|
1524
|
-
className: ({ active: u, checked: g }) =>
|
|
1524
|
+
className: ({ active: u, checked: g }) => Q("radiogroup-option", {
|
|
1525
1525
|
"radiogroup-option--active": u,
|
|
1526
1526
|
"radiogroup-option--checked": g,
|
|
1527
1527
|
"radiogroup-option--error": !!l
|
|
@@ -1538,7 +1538,7 @@ const zn = {
|
|
|
1538
1538
|
}
|
|
1539
1539
|
)
|
|
1540
1540
|
] }),
|
|
1541
|
-
u && /* @__PURE__ */ e("div", { className: "option-checkmark", children: /* @__PURE__ */ e(
|
|
1541
|
+
u && /* @__PURE__ */ e("div", { className: "option-checkmark", children: /* @__PURE__ */ e(Xt, { size: 20 }) })
|
|
1542
1542
|
] })
|
|
1543
1543
|
},
|
|
1544
1544
|
i.value
|
|
@@ -1561,7 +1561,7 @@ const zn = {
|
|
|
1561
1561
|
g(t);
|
|
1562
1562
|
}, [t]);
|
|
1563
1563
|
const f = ae(
|
|
1564
|
-
|
|
1564
|
+
Hr((r) => {
|
|
1565
1565
|
a?.(r);
|
|
1566
1566
|
}, s),
|
|
1567
1567
|
[s, a]
|
|
@@ -1569,12 +1569,12 @@ const zn = {
|
|
|
1569
1569
|
Z(() => (u !== t && f(u), () => {
|
|
1570
1570
|
f.cancel();
|
|
1571
1571
|
}), [u, f, t]);
|
|
1572
|
-
const
|
|
1572
|
+
const y = (r) => {
|
|
1573
1573
|
g(r.target.value);
|
|
1574
1574
|
};
|
|
1575
1575
|
return /* @__PURE__ */ n("div", { className: `search-bar-wrapper ${m}`, children: [
|
|
1576
1576
|
l && /* @__PURE__ */ e("label", { htmlFor: "search-field", className: "sr-only", children: l }),
|
|
1577
|
-
/* @__PURE__ */ e("div", { className: "search-bar-icon-wrapper", children: /* @__PURE__ */ e(
|
|
1577
|
+
/* @__PURE__ */ e("div", { className: "search-bar-icon-wrapper", children: /* @__PURE__ */ e(vt, { size: 20, className: "search-bar-icon", "aria-hidden": "true" }) }),
|
|
1578
1578
|
/* @__PURE__ */ e(
|
|
1579
1579
|
"input",
|
|
1580
1580
|
{
|
|
@@ -1584,12 +1584,12 @@ const zn = {
|
|
|
1584
1584
|
type: "search",
|
|
1585
1585
|
name: "search",
|
|
1586
1586
|
value: u,
|
|
1587
|
-
onChange:
|
|
1587
|
+
onChange: y,
|
|
1588
1588
|
...i
|
|
1589
1589
|
}
|
|
1590
1590
|
)
|
|
1591
1591
|
] });
|
|
1592
|
-
},
|
|
1592
|
+
}, yt = ({
|
|
1593
1593
|
label: t,
|
|
1594
1594
|
value: a,
|
|
1595
1595
|
// From RHF's <Controller>
|
|
@@ -1603,21 +1603,31 @@ const zn = {
|
|
|
1603
1603
|
// From RHF's <Controller>
|
|
1604
1604
|
showSearch: g = !0
|
|
1605
1605
|
}) => {
|
|
1606
|
-
const [f,
|
|
1606
|
+
const [f, y] = L("");
|
|
1607
|
+
console.log("Select component - value:", a, "type:", typeof a), console.log("Select component - options:", o);
|
|
1608
|
+
const r = f === "" ? o : o.filter(
|
|
1607
1609
|
(d) => d.label.toLowerCase().includes(f.toLowerCase())
|
|
1608
|
-
), N = o.find((d) =>
|
|
1610
|
+
), N = o.find((d) => {
|
|
1611
|
+
if (typeof a == "object" && a !== null) {
|
|
1612
|
+
if (a === d) return !0;
|
|
1613
|
+
if (a.id && d.id) return d.id === a.id;
|
|
1614
|
+
if (a.value && d.value) return d.value === a.value;
|
|
1615
|
+
if (a.label && d.label) return d.label === a.label;
|
|
1616
|
+
}
|
|
1617
|
+
return d.id === a || d.value === a || d.label === a;
|
|
1618
|
+
});
|
|
1609
1619
|
return /* @__PURE__ */ e(K, { value: a, onChange: s, disabled: m, children: /* @__PURE__ */ n("div", { className: "select-wrapper", ref: u, children: [
|
|
1610
1620
|
t && /* @__PURE__ */ e("label", { className: "select-label", children: t }),
|
|
1611
1621
|
/* @__PURE__ */ n("div", { className: "select-button-container", children: [
|
|
1612
1622
|
/* @__PURE__ */ n(
|
|
1613
1623
|
Vr,
|
|
1614
1624
|
{
|
|
1615
|
-
className:
|
|
1625
|
+
className: Q("select-button", {
|
|
1616
1626
|
"select-button--error": !!i
|
|
1617
1627
|
}),
|
|
1618
1628
|
children: [
|
|
1619
1629
|
/* @__PURE__ */ e("span", { className: "select-value-display", children: N ? N.label : /* @__PURE__ */ e("span", { className: "placeholder", children: l }) }),
|
|
1620
|
-
/* @__PURE__ */ e(
|
|
1630
|
+
/* @__PURE__ */ e(Qt, { className: "select-chevron", "aria-hidden": "true" })
|
|
1621
1631
|
]
|
|
1622
1632
|
}
|
|
1623
1633
|
),
|
|
@@ -1632,7 +1642,7 @@ const zn = {
|
|
|
1632
1642
|
he,
|
|
1633
1643
|
{
|
|
1634
1644
|
value: f,
|
|
1635
|
-
onDebouncedChange:
|
|
1645
|
+
onDebouncedChange: y,
|
|
1636
1646
|
placeholder: "Search..."
|
|
1637
1647
|
}
|
|
1638
1648
|
) }),
|
|
@@ -1679,23 +1689,23 @@ const zn = {
|
|
|
1679
1689
|
window.removeEventListener("popstate", s);
|
|
1680
1690
|
};
|
|
1681
1691
|
}, []), { pathname: t };
|
|
1682
|
-
},
|
|
1692
|
+
}, xt = (t, a) => {
|
|
1683
1693
|
for (const s of t)
|
|
1684
|
-
if ((s.href || s.url || s.path) === a || s.children &&
|
|
1694
|
+
if ((s.href || s.url || s.path) === a || s.children && xt(s.children, a))
|
|
1685
1695
|
return s;
|
|
1686
1696
|
return null;
|
|
1687
1697
|
}, pa = ({ item: t, isCollapsed: a, level: s = 0 }) => {
|
|
1688
1698
|
const { pathname: o } = Mn(), l = t.href || t.url || t.path, [m, i] = L(!1), u = t.icon;
|
|
1689
1699
|
Z(() => {
|
|
1690
|
-
|
|
1700
|
+
xt([t], o) && i(!0);
|
|
1691
1701
|
}, [t, o]);
|
|
1692
|
-
const g = o === l, f = !g && !!
|
|
1702
|
+
const g = o === l, f = !g && !!xt([t], o), y = (r) => {
|
|
1693
1703
|
r.preventDefault(), i(!m);
|
|
1694
1704
|
};
|
|
1695
1705
|
return /* @__PURE__ */ n(
|
|
1696
1706
|
"div",
|
|
1697
1707
|
{
|
|
1698
|
-
className:
|
|
1708
|
+
className: Q("nav-item-container", {
|
|
1699
1709
|
"nav-item-container--parent-active": f,
|
|
1700
1710
|
[`nav-item-container--level-${s}`]: s > 0
|
|
1701
1711
|
}),
|
|
@@ -1706,7 +1716,7 @@ const zn = {
|
|
|
1706
1716
|
href: l,
|
|
1707
1717
|
target: t.target,
|
|
1708
1718
|
rel: t.target === "_blank" ? "noopener noreferrer" : void 0,
|
|
1709
|
-
className:
|
|
1719
|
+
className: Q("nav-item", {
|
|
1710
1720
|
"nav-item--active": g,
|
|
1711
1721
|
"nav-item--collapsed": a
|
|
1712
1722
|
}),
|
|
@@ -1718,13 +1728,13 @@ const zn = {
|
|
|
1718
1728
|
"button",
|
|
1719
1729
|
{
|
|
1720
1730
|
className: "nav-chevron-button",
|
|
1721
|
-
onClick:
|
|
1731
|
+
onClick: y,
|
|
1722
1732
|
"aria-expanded": m,
|
|
1723
1733
|
"aria-label": m ? "Collapse menu" : "Expand menu",
|
|
1724
1734
|
children: /* @__PURE__ */ e(
|
|
1725
|
-
|
|
1735
|
+
Nt,
|
|
1726
1736
|
{
|
|
1727
|
-
className:
|
|
1737
|
+
className: Q("nav-chevron", {
|
|
1728
1738
|
"nav-chevron--open": m
|
|
1729
1739
|
})
|
|
1730
1740
|
}
|
|
@@ -1737,7 +1747,7 @@ const zn = {
|
|
|
1737
1747
|
t.children && /* @__PURE__ */ e(
|
|
1738
1748
|
"div",
|
|
1739
1749
|
{
|
|
1740
|
-
className:
|
|
1750
|
+
className: Q("sub-menu", {
|
|
1741
1751
|
"sub-menu--open": m,
|
|
1742
1752
|
"sub-menu--collapsed": a
|
|
1743
1753
|
}),
|
|
@@ -1756,7 +1766,7 @@ const zn = {
|
|
|
1756
1766
|
]
|
|
1757
1767
|
}
|
|
1758
1768
|
);
|
|
1759
|
-
},
|
|
1769
|
+
}, Il = ({
|
|
1760
1770
|
navItems: t = [],
|
|
1761
1771
|
isCollapsed: a = !1,
|
|
1762
1772
|
onToggleCollapse: s,
|
|
@@ -1777,7 +1787,7 @@ const zn = {
|
|
|
1777
1787
|
/* @__PURE__ */ n(
|
|
1778
1788
|
"aside",
|
|
1779
1789
|
{
|
|
1780
|
-
className:
|
|
1790
|
+
className: Q("sidebar", {
|
|
1781
1791
|
"sidebar--collapsed": a,
|
|
1782
1792
|
"sidebar--mobile-open": o
|
|
1783
1793
|
}),
|
|
@@ -1786,7 +1796,7 @@ const zn = {
|
|
|
1786
1796
|
/* @__PURE__ */ n("div", { className: "sidebar-header", children: [
|
|
1787
1797
|
/* @__PURE__ */ e("div", { className: "sidebar-logo", children: a ? m : i }),
|
|
1788
1798
|
!a && /* @__PURE__ */ n("div", { className: "sidebar-search-container", children: [
|
|
1789
|
-
/* @__PURE__ */ e(
|
|
1799
|
+
/* @__PURE__ */ e(vt, { className: "sidebar-search-icon" }),
|
|
1790
1800
|
/* @__PURE__ */ e(
|
|
1791
1801
|
"input",
|
|
1792
1802
|
{
|
|
@@ -1835,7 +1845,7 @@ const zn = {
|
|
|
1835
1845
|
className: s,
|
|
1836
1846
|
...o
|
|
1837
1847
|
}) => {
|
|
1838
|
-
const l =
|
|
1848
|
+
const l = Q(
|
|
1839
1849
|
"spinner",
|
|
1840
1850
|
`spinner--size-${t}`,
|
|
1841
1851
|
`spinner--color-${a}`,
|
|
@@ -1860,7 +1870,7 @@ const zn = {
|
|
|
1860
1870
|
]
|
|
1861
1871
|
}
|
|
1862
1872
|
);
|
|
1863
|
-
},
|
|
1873
|
+
}, Pl = ({ label: t = "Loading..." }) => /* @__PURE__ */ e("div", { className: "fullscreen-loader-overlay", role: "alert", "aria-busy": "true", children: /* @__PURE__ */ n("div", { className: "loader-content", children: [
|
|
1864
1874
|
/* @__PURE__ */ e(ga, { size: "large" }),
|
|
1865
1875
|
t && /* @__PURE__ */ e("span", { className: "loader-label", children: t })
|
|
1866
1876
|
] }) }), ba = ({
|
|
@@ -1875,10 +1885,10 @@ const zn = {
|
|
|
1875
1885
|
// ✅ New prop to control visibility
|
|
1876
1886
|
...u
|
|
1877
1887
|
}) => {
|
|
1878
|
-
const g = a || u.name, [f,
|
|
1888
|
+
const g = a || u.name, [f, y] = L(
|
|
1879
1889
|
u.value?.length || u.defaultValue?.length || 0
|
|
1880
1890
|
), r = (d) => {
|
|
1881
|
-
|
|
1891
|
+
y(d.target.value.length), u.onChange && u.onChange(d);
|
|
1882
1892
|
}, N = m - f;
|
|
1883
1893
|
return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${o || ""}`, children: [
|
|
1884
1894
|
/* @__PURE__ */ n("div", { className: "textarea-header", children: [
|
|
@@ -1893,7 +1903,7 @@ const zn = {
|
|
|
1893
1903
|
{
|
|
1894
1904
|
id: g,
|
|
1895
1905
|
ref: l,
|
|
1896
|
-
className:
|
|
1906
|
+
className: Q("textarea-field", {
|
|
1897
1907
|
"textarea-field--error": !!s
|
|
1898
1908
|
}),
|
|
1899
1909
|
maxLength: m,
|
|
@@ -1918,7 +1928,7 @@ const zn = {
|
|
|
1918
1928
|
{
|
|
1919
1929
|
checked: a,
|
|
1920
1930
|
onChange: s,
|
|
1921
|
-
className:
|
|
1931
|
+
className: Q("switch-element", {
|
|
1922
1932
|
// Renamed from switch-wrapper
|
|
1923
1933
|
"switch-element--error": !!l
|
|
1924
1934
|
}),
|
|
@@ -1946,7 +1956,7 @@ const zn = {
|
|
|
1946
1956
|
return /* @__PURE__ */ n(te, { children: [
|
|
1947
1957
|
se.cloneElement(t, { "data-tooltip-id": u }),
|
|
1948
1958
|
/* @__PURE__ */ e(
|
|
1949
|
-
|
|
1959
|
+
Qa,
|
|
1950
1960
|
{
|
|
1951
1961
|
id: u,
|
|
1952
1962
|
content: a,
|
|
@@ -1982,8 +1992,8 @@ const zn = {
|
|
|
1982
1992
|
showProgress: g = !0,
|
|
1983
1993
|
closeOnOverlayClick: f = !0
|
|
1984
1994
|
}) => {
|
|
1985
|
-
const
|
|
1986
|
-
return /* @__PURE__ */ e(ue, { show: t, as:
|
|
1995
|
+
const y = s[o], r = Object.keys(s), N = r.indexOf(o), d = (N + 1) / r.length * 100, p = N > 0 && m.onBack;
|
|
1996
|
+
return /* @__PURE__ */ e(ue, { show: t, as: H, children: /* @__PURE__ */ n(
|
|
1987
1997
|
be,
|
|
1988
1998
|
{
|
|
1989
1999
|
as: "div",
|
|
@@ -1994,7 +2004,7 @@ const zn = {
|
|
|
1994
2004
|
/* @__PURE__ */ e(
|
|
1995
2005
|
Ne,
|
|
1996
2006
|
{
|
|
1997
|
-
as:
|
|
2007
|
+
as: H,
|
|
1998
2008
|
enter: "ease-out duration-300",
|
|
1999
2009
|
enterFrom: "opacity-0",
|
|
2000
2010
|
enterTo: "opacity-100",
|
|
@@ -2007,7 +2017,7 @@ const zn = {
|
|
|
2007
2017
|
/* @__PURE__ */ e("div", { className: "wizard-container", children: /* @__PURE__ */ e("div", { className: "wizard-positioner", children: /* @__PURE__ */ e(
|
|
2008
2018
|
Ne,
|
|
2009
2019
|
{
|
|
2010
|
-
as:
|
|
2020
|
+
as: H,
|
|
2011
2021
|
enter: "transform transition ease-in-out duration-500",
|
|
2012
2022
|
enterFrom: "translate-x-full",
|
|
2013
2023
|
enterTo: "translate-x-0",
|
|
@@ -2023,7 +2033,7 @@ const zn = {
|
|
|
2023
2033
|
onClick: m.onBack,
|
|
2024
2034
|
className: "wizard-back-button",
|
|
2025
2035
|
"aria-label": "Go back to previous step",
|
|
2026
|
-
children: /* @__PURE__ */ e(
|
|
2036
|
+
children: /* @__PURE__ */ e(Ha, { size: 20 })
|
|
2027
2037
|
}
|
|
2028
2038
|
),
|
|
2029
2039
|
/* @__PURE__ */ n("div", { className: "wizard-header-text", children: [
|
|
@@ -2069,7 +2079,7 @@ const zn = {
|
|
|
2069
2079
|
},
|
|
2070
2080
|
className: "wizard-step-motion-wrapper",
|
|
2071
2081
|
style: { overflowX: "hidden" },
|
|
2072
|
-
children:
|
|
2082
|
+
children: y && /* @__PURE__ */ e(y, { ...m })
|
|
2073
2083
|
},
|
|
2074
2084
|
o
|
|
2075
2085
|
)
|
|
@@ -2101,12 +2111,12 @@ const zn = {
|
|
|
2101
2111
|
disabled: u = !1,
|
|
2102
2112
|
size: g = "small",
|
|
2103
2113
|
label: f,
|
|
2104
|
-
children:
|
|
2114
|
+
children: y,
|
|
2105
2115
|
// ✅ Add children to the props list
|
|
2106
2116
|
onClick: r,
|
|
2107
2117
|
...N
|
|
2108
2118
|
}) => {
|
|
2109
|
-
const d = u, p =
|
|
2119
|
+
const d = u, p = Q(
|
|
2110
2120
|
"btn-base-icon",
|
|
2111
2121
|
"btn-icon-only",
|
|
2112
2122
|
Bn[g],
|
|
@@ -2138,7 +2148,7 @@ const zn = {
|
|
|
2138
2148
|
// A clearer prop name
|
|
2139
2149
|
...u
|
|
2140
2150
|
}) => {
|
|
2141
|
-
const g =
|
|
2151
|
+
const g = Q(
|
|
2142
2152
|
"page-layout",
|
|
2143
2153
|
{
|
|
2144
2154
|
"page-layout--with-footer": a,
|
|
@@ -2203,16 +2213,16 @@ const zn = {
|
|
|
2203
2213
|
onSelect: a,
|
|
2204
2214
|
triggerIcon: s = Ht
|
|
2205
2215
|
}) => {
|
|
2206
|
-
const { refs: o, floatingStyles: l } =
|
|
2207
|
-
whileElementsMounted:
|
|
2208
|
-
middleware: [
|
|
2216
|
+
const { refs: o, floatingStyles: l } = la({
|
|
2217
|
+
whileElementsMounted: da,
|
|
2218
|
+
middleware: [oa(5), ia(), ca({ padding: 5 })]
|
|
2209
2219
|
});
|
|
2210
2220
|
return /* @__PURE__ */ n(qr, { as: "div", className: "options-menu-wrapper", children: [
|
|
2211
2221
|
/* @__PURE__ */ e(Yr, { ref: o.setReference, className: "options-menu-trigger", children: /* @__PURE__ */ e(s, { size: 20 }) }),
|
|
2212
2222
|
/* @__PURE__ */ e(Wr, { children: /* @__PURE__ */ e(
|
|
2213
2223
|
ue,
|
|
2214
2224
|
{
|
|
2215
|
-
as:
|
|
2225
|
+
as: H,
|
|
2216
2226
|
enter: "transition ease-out duration-100",
|
|
2217
2227
|
enterFrom: "transform opacity-0 scale-95",
|
|
2218
2228
|
enterTo: "transform opacity-100 scale-100",
|
|
@@ -2356,14 +2366,14 @@ function Ca() {
|
|
|
2356
2366
|
function za() {
|
|
2357
2367
|
return `${Ca()}/search`;
|
|
2358
2368
|
}
|
|
2359
|
-
function
|
|
2369
|
+
function kt() {
|
|
2360
2370
|
return `${ze()}/unifyed-mydrive/v2`;
|
|
2361
2371
|
}
|
|
2362
2372
|
function Yn() {
|
|
2363
|
-
return `${
|
|
2373
|
+
return `${kt()}/directory/permissions`;
|
|
2364
2374
|
}
|
|
2365
2375
|
function Wn() {
|
|
2366
|
-
return `${
|
|
2376
|
+
return `${kt()}/file/permissions`;
|
|
2367
2377
|
}
|
|
2368
2378
|
function Ul() {
|
|
2369
2379
|
return Object.freeze({
|
|
@@ -2374,7 +2384,7 @@ function Ul() {
|
|
|
2374
2384
|
PROVISIONING_BASE: ka(),
|
|
2375
2385
|
RBAC_BASE: Ca(),
|
|
2376
2386
|
SEARCH_ROLES_API: za(),
|
|
2377
|
-
MY_DRIVE_GATEWAY_BASE_v2:
|
|
2387
|
+
MY_DRIVE_GATEWAY_BASE_v2: kt(),
|
|
2378
2388
|
DIRECTORY_PERMISSIONS_API: Yn(),
|
|
2379
2389
|
FILE_PERMISSIONS_API: Wn()
|
|
2380
2390
|
});
|
|
@@ -2387,7 +2397,7 @@ function Jn(t) {
|
|
|
2387
2397
|
return console.log("Error reading JSON from localStorage"), null;
|
|
2388
2398
|
}
|
|
2389
2399
|
}
|
|
2390
|
-
function
|
|
2400
|
+
function Ot() {
|
|
2391
2401
|
const t = Jn("userProfile") || {}, a = localStorage.getItem("access_token") || t.accessToken || "", s = localStorage.getItem("siteId") || t.siteId || "", o = t.tenant || "", l = t.tenantdomain || "", m = t.username || t.displayName || "", i = t.email || "";
|
|
2392
2402
|
return {
|
|
2393
2403
|
Authorization: a ? `Bearer ${a}` : void 0,
|
|
@@ -2427,7 +2437,7 @@ function Xn(t) {
|
|
|
2427
2437
|
request: null
|
|
2428
2438
|
};
|
|
2429
2439
|
}
|
|
2430
|
-
function
|
|
2440
|
+
function Qn({
|
|
2431
2441
|
enableAuthRedirect: t = !0,
|
|
2432
2442
|
defaultOpenHeaders: a = {}
|
|
2433
2443
|
} = {}) {
|
|
@@ -2442,37 +2452,37 @@ function Hn({
|
|
|
2442
2452
|
message: f?.statusText || "Request succeeded"
|
|
2443
2453
|
},
|
|
2444
2454
|
(f) => {
|
|
2445
|
-
const
|
|
2446
|
-
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(
|
|
2455
|
+
const y = Xn(f), r = y.status;
|
|
2456
|
+
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(y);
|
|
2447
2457
|
}
|
|
2448
2458
|
);
|
|
2449
|
-
function o({ open: f = !1, customHeader:
|
|
2459
|
+
function o({ open: f = !1, customHeader: y = {} } = {}) {
|
|
2450
2460
|
if (f) {
|
|
2451
|
-
const { Authorization: r, ...N } =
|
|
2461
|
+
const { Authorization: r, ...N } = Ot();
|
|
2452
2462
|
return {
|
|
2453
|
-
headers: { ...N, ...a, ...
|
|
2463
|
+
headers: { ...N, ...a, ...y }
|
|
2454
2464
|
};
|
|
2455
2465
|
}
|
|
2456
|
-
return { headers: { ...
|
|
2466
|
+
return { headers: { ...Ot(), ...y } };
|
|
2457
2467
|
}
|
|
2458
|
-
async function l(f,
|
|
2468
|
+
async function l(f, y, r = !1, N = {}) {
|
|
2459
2469
|
return s.get(f, {
|
|
2460
|
-
params:
|
|
2470
|
+
params: y,
|
|
2461
2471
|
...o({ open: r, customHeader: N })
|
|
2462
2472
|
});
|
|
2463
2473
|
}
|
|
2464
|
-
async function m(f,
|
|
2474
|
+
async function m(f, y, r = !1, N = {}) {
|
|
2465
2475
|
const d = { ...o({ open: r, customHeader: N }) };
|
|
2466
|
-
return
|
|
2476
|
+
return y !== void 0 && (d.data = y), s.delete(f, d);
|
|
2467
2477
|
}
|
|
2468
|
-
async function i(f,
|
|
2469
|
-
return s.post(f,
|
|
2478
|
+
async function i(f, y = {}, r = !1, N = {}) {
|
|
2479
|
+
return s.post(f, y, o({ open: r, customHeader: N }));
|
|
2470
2480
|
}
|
|
2471
|
-
async function u(f,
|
|
2472
|
-
return s.put(f,
|
|
2481
|
+
async function u(f, y = {}, r = !1, N = {}) {
|
|
2482
|
+
return s.put(f, y, o({ open: r, customHeader: N }));
|
|
2473
2483
|
}
|
|
2474
|
-
async function g(f,
|
|
2475
|
-
return s.patch(f,
|
|
2484
|
+
async function g(f, y = {}, r = !1, N = {}) {
|
|
2485
|
+
return s.patch(f, y, o({ open: r, customHeader: N }));
|
|
2476
2486
|
}
|
|
2477
2487
|
return {
|
|
2478
2488
|
instance: s,
|
|
@@ -2484,7 +2494,7 @@ function Hn({
|
|
|
2484
2494
|
axiosPatch: g
|
|
2485
2495
|
};
|
|
2486
2496
|
}
|
|
2487
|
-
const Ee =
|
|
2497
|
+
const Ee = Qn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn = Ee.axiosPut, ql = Ee.axiosPatch, Yl = Ee.instance, Zn = async (t, a) => {
|
|
2488
2498
|
try {
|
|
2489
2499
|
switch (t) {
|
|
2490
2500
|
case $e.USER: {
|
|
@@ -2511,7 +2521,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2511
2521
|
type: "User",
|
|
2512
2522
|
avatarUrl: a?.profileImage || Ye(l)
|
|
2513
2523
|
};
|
|
2514
|
-
}),
|
|
2524
|
+
}), It = (t) => {
|
|
2515
2525
|
try {
|
|
2516
2526
|
const a = JSON.parse(t);
|
|
2517
2527
|
return Array.isArray(a) ? a : [];
|
|
@@ -2562,14 +2572,14 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2562
2572
|
if (Array.isArray(s))
|
|
2563
2573
|
o = s;
|
|
2564
2574
|
else if (typeof s == "string")
|
|
2565
|
-
o =
|
|
2575
|
+
o = It(s.trim());
|
|
2566
2576
|
else if (s && typeof s == "object") {
|
|
2567
2577
|
const l = s.data;
|
|
2568
|
-
Array.isArray(l) ? o = l : typeof l == "string" && (o =
|
|
2578
|
+
Array.isArray(l) ? o = l : typeof l == "string" && (o = It(l.trim()));
|
|
2569
2579
|
}
|
|
2570
2580
|
return Kn(o);
|
|
2571
2581
|
}
|
|
2572
|
-
},
|
|
2582
|
+
}, Ct = (t, a) => {
|
|
2573
2583
|
const [s, o] = L(t);
|
|
2574
2584
|
return Z(
|
|
2575
2585
|
() => {
|
|
@@ -2606,15 +2616,15 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2606
2616
|
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",
|
|
2607
2617
|
children: [
|
|
2608
2618
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
2609
|
-
/* @__PURE__ */ e("div", { className: "flex items-center", children: l.map((f,
|
|
2619
|
+
/* @__PURE__ */ e("div", { className: "flex items-center", children: l.map((f, y) => /* @__PURE__ */ e(
|
|
2610
2620
|
"img",
|
|
2611
2621
|
{
|
|
2612
2622
|
src: f.avatarUrl || `https://avatar.vercel.sh/${f.name}.svg?text=${f?.name?.charAt(0) || "U"}`,
|
|
2613
2623
|
alt: f.name,
|
|
2614
|
-
className: `w-10 h-10 rounded-full border-2 border-white ${
|
|
2615
|
-
style: { zIndex:
|
|
2624
|
+
className: `w-10 h-10 rounded-full border-2 border-white ${y > 0 ? "-ml-4" : ""}`,
|
|
2625
|
+
style: { zIndex: y }
|
|
2616
2626
|
},
|
|
2617
|
-
f.id ||
|
|
2627
|
+
f.id || y
|
|
2618
2628
|
)) }),
|
|
2619
2629
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-800 truncate", children: g })
|
|
2620
2630
|
] }),
|
|
@@ -2624,11 +2634,11 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2624
2634
|
);
|
|
2625
2635
|
}, Pt = [
|
|
2626
2636
|
{ id: 1, name: $e.USER, icon: tr, code: "users" },
|
|
2627
|
-
{ id: 2, name: $e.GROUP, icon:
|
|
2637
|
+
{ id: 2, name: $e.GROUP, icon: Zt, code: "groups" },
|
|
2628
2638
|
{ id: 3, name: $e.ROLE, icon: ar, code: "roles" }
|
|
2629
|
-
],
|
|
2630
|
-
{ id: 1, name:
|
|
2631
|
-
{ id: 2, name:
|
|
2639
|
+
], Mt = [
|
|
2640
|
+
{ id: 1, name: $t.View, icon: Kt },
|
|
2641
|
+
{ id: 2, name: $t.Manage, icon: ea }
|
|
2632
2642
|
], ts = Ka().shape({
|
|
2633
2643
|
pendingInvites: er().min(1, "You must add at least one person to invite.")
|
|
2634
2644
|
}), as = ({
|
|
@@ -2642,7 +2652,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2642
2652
|
},
|
|
2643
2653
|
isChanged: u = !1
|
|
2644
2654
|
}) => {
|
|
2645
|
-
const [g, f] = L(Pt[0]), [
|
|
2655
|
+
const [g, f] = L(Pt[0]), [y, r] = L(""), N = Ct(y, 400), [d, p] = L([]), [S, A] = L(/* @__PURE__ */ new Set()), [E, R] = L(!1), [O, V] = L(Mt[0]), {
|
|
2646
2656
|
control: U,
|
|
2647
2657
|
handleSubmit: Y,
|
|
2648
2658
|
watch: G,
|
|
@@ -2655,30 +2665,30 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2655
2665
|
name: "pendingInvites"
|
|
2656
2666
|
}), b = G("pendingInvites");
|
|
2657
2667
|
Z(() => {
|
|
2658
|
-
N.length > 1 ? (R(!0), Zn(g.name, N).then((
|
|
2659
|
-
p(
|
|
2660
|
-
}).catch((
|
|
2668
|
+
N.length > 1 ? (R(!0), Zn(g.name, N).then((D) => {
|
|
2669
|
+
p(D);
|
|
2670
|
+
}).catch((D) => console.error("Search failed:", D)).finally(() => R(!1))) : (p([]), A(/* @__PURE__ */ new Set()));
|
|
2661
2671
|
}, [N, g]);
|
|
2662
|
-
const
|
|
2672
|
+
const x = (D) => {
|
|
2663
2673
|
A((B) => {
|
|
2664
2674
|
const _ = new Set(B);
|
|
2665
|
-
return _.has(
|
|
2675
|
+
return _.has(D) ? _.delete(D) : _.add(D), _;
|
|
2666
2676
|
});
|
|
2667
|
-
},
|
|
2668
|
-
d.filter((
|
|
2669
|
-
w.find((B) => B.id ===
|
|
2677
|
+
}, $ = () => {
|
|
2678
|
+
d.filter((D) => S.has(D.id)).forEach((D) => {
|
|
2679
|
+
w.find((B) => B.id === D.id) || T({ ...D, permission: O.name });
|
|
2670
2680
|
}), A(/* @__PURE__ */ new Set()), r("");
|
|
2671
|
-
}, M = (
|
|
2672
|
-
V(
|
|
2673
|
-
(B, _) => v(_, { ...w[_], permission:
|
|
2681
|
+
}, M = (D) => {
|
|
2682
|
+
V(D), w.forEach(
|
|
2683
|
+
(B, _) => v(_, { ...w[_], permission: D.name })
|
|
2674
2684
|
);
|
|
2675
|
-
}, z = async (
|
|
2685
|
+
}, z = async (D) => {
|
|
2676
2686
|
try {
|
|
2677
2687
|
if (l === de.DRIVE) {
|
|
2678
|
-
const B =
|
|
2679
|
-
id:
|
|
2680
|
-
permission:
|
|
2681
|
-
type:
|
|
2688
|
+
const B = D.pendingInvites.map((P) => ({
|
|
2689
|
+
id: P.id,
|
|
2690
|
+
permission: P.permission,
|
|
2691
|
+
type: P.type.toLowerCase()
|
|
2682
2692
|
}));
|
|
2683
2693
|
i({
|
|
2684
2694
|
entity: t,
|
|
@@ -2687,7 +2697,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2687
2697
|
// Always send updated existing shares
|
|
2688
2698
|
}, o);
|
|
2689
2699
|
} else if (l === de.INTEREST) {
|
|
2690
|
-
const B =
|
|
2700
|
+
const B = D.pendingInvites.map((_) => ({
|
|
2691
2701
|
identity: _.id,
|
|
2692
2702
|
type: _.type.toLowerCase(),
|
|
2693
2703
|
opt: !0,
|
|
@@ -2698,10 +2708,10 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2698
2708
|
}));
|
|
2699
2709
|
i(B, o);
|
|
2700
2710
|
} else if (l === de.ARTICLE) {
|
|
2701
|
-
const B =
|
|
2702
|
-
id:
|
|
2703
|
-
permission:
|
|
2704
|
-
type:
|
|
2711
|
+
const B = D.pendingInvites.map((P) => ({
|
|
2712
|
+
id: P.id,
|
|
2713
|
+
permission: P.permission,
|
|
2714
|
+
type: P.type.toLowerCase()
|
|
2705
2715
|
}));
|
|
2706
2716
|
i({
|
|
2707
2717
|
entity: t,
|
|
@@ -2709,15 +2719,15 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2709
2719
|
existingShares: o
|
|
2710
2720
|
}, o);
|
|
2711
2721
|
} else
|
|
2712
|
-
i(
|
|
2722
|
+
i(D, o);
|
|
2713
2723
|
setTimeout(() => {
|
|
2714
2724
|
s();
|
|
2715
2725
|
}, 1e3);
|
|
2716
2726
|
} catch (B) {
|
|
2717
2727
|
throw console.error("Failed to submit invites:", B), B;
|
|
2718
2728
|
}
|
|
2719
|
-
},
|
|
2720
|
-
const B = o[g.code].find((_) => _.name ===
|
|
2729
|
+
}, I = (D) => {
|
|
2730
|
+
const B = o[g.code].find((_) => _.name === D.name && _.permission !== "remove") || b.find((_) => _.name === D.name);
|
|
2721
2731
|
return B ? `${B.permission}` : "";
|
|
2722
2732
|
}, F = () => {
|
|
2723
2733
|
switch (l) {
|
|
@@ -2744,7 +2754,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2744
2754
|
{
|
|
2745
2755
|
onClick: s,
|
|
2746
2756
|
className: "text-gray-500 hover:text-gray-800 hover:cursor-pointer",
|
|
2747
|
-
children: /* @__PURE__ */ e(
|
|
2757
|
+
children: /* @__PURE__ */ e(He, { className: "h-6 w-6" })
|
|
2748
2758
|
}
|
|
2749
2759
|
)
|
|
2750
2760
|
] })
|
|
@@ -2753,9 +2763,9 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2753
2763
|
(l === de.DRIVE || m) && /* @__PURE__ */ e(
|
|
2754
2764
|
es,
|
|
2755
2765
|
{
|
|
2756
|
-
users: o.users.filter((
|
|
2757
|
-
groups: o.groups.filter((
|
|
2758
|
-
roles: o.roles.filter((
|
|
2766
|
+
users: o.users.filter((D) => D.permission !== "remove"),
|
|
2767
|
+
groups: o.groups.filter((D) => D.permission !== "remove"),
|
|
2768
|
+
roles: o.roles.filter((D) => D.permission !== "remove"),
|
|
2759
2769
|
onClick: a
|
|
2760
2770
|
}
|
|
2761
2771
|
),
|
|
@@ -2771,14 +2781,14 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2771
2781
|
/* @__PURE__ */ e(
|
|
2772
2782
|
ue,
|
|
2773
2783
|
{
|
|
2774
|
-
as:
|
|
2784
|
+
as: H,
|
|
2775
2785
|
leave: "transition ease-in duration-100",
|
|
2776
2786
|
leaveFrom: "opacity-100",
|
|
2777
2787
|
leaveTo: "opacity-0",
|
|
2778
|
-
children: /* @__PURE__ */ e(K.Options, { className: "absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: Pt.map((
|
|
2788
|
+
children: /* @__PURE__ */ e(K.Options, { className: "absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: Pt.map((D) => /* @__PURE__ */ e(
|
|
2779
2789
|
K.Option,
|
|
2780
2790
|
{
|
|
2781
|
-
value:
|
|
2791
|
+
value: D,
|
|
2782
2792
|
className: ({ active: B }) => `${B ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
|
|
2783
2793
|
children: ({ selected: B }) => /* @__PURE__ */ n(te, { children: [
|
|
2784
2794
|
/* @__PURE__ */ n(
|
|
@@ -2787,19 +2797,19 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2787
2797
|
className: `${B ? "font-medium" : "font-normal"} flex items-center`,
|
|
2788
2798
|
children: [
|
|
2789
2799
|
/* @__PURE__ */ e(
|
|
2790
|
-
|
|
2800
|
+
D.icon,
|
|
2791
2801
|
{
|
|
2792
2802
|
className: `h-5 w-5 mr-2 ${B ? "text-white" : "text-gray-400"}`
|
|
2793
2803
|
}
|
|
2794
2804
|
),
|
|
2795
|
-
|
|
2805
|
+
D.name
|
|
2796
2806
|
]
|
|
2797
2807
|
}
|
|
2798
2808
|
),
|
|
2799
2809
|
B && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-white", children: /* @__PURE__ */ e(ht, { className: "h-5 w-5" }) })
|
|
2800
2810
|
] })
|
|
2801
2811
|
},
|
|
2802
|
-
|
|
2812
|
+
D.id
|
|
2803
2813
|
)) })
|
|
2804
2814
|
}
|
|
2805
2815
|
)
|
|
@@ -2808,8 +2818,8 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2808
2818
|
he,
|
|
2809
2819
|
{
|
|
2810
2820
|
placeholder: `Search by ${g.name.toLowerCase()}...`,
|
|
2811
|
-
onDebouncedChange: (
|
|
2812
|
-
value:
|
|
2821
|
+
onDebouncedChange: (D) => r(D),
|
|
2822
|
+
value: y
|
|
2813
2823
|
}
|
|
2814
2824
|
) }),
|
|
2815
2825
|
/* @__PURE__ */ e(ke, { children: (d?.length > 0 || E) && /* @__PURE__ */ e(
|
|
@@ -2821,19 +2831,19 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2821
2831
|
transition: { duration: 0.2 },
|
|
2822
2832
|
className: "absolute top-full mt-2 w-full col-span-3 bg-white border border-gray-300 rounded-lg shadow-lg z-10",
|
|
2823
2833
|
children: E ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500", children: "Loading..." }) : /* @__PURE__ */ n(te, { children: [
|
|
2824
|
-
/* @__PURE__ */ e("div", { className: "max-h-60 overflow-y-auto p-2 space-y-1", children: d.map((
|
|
2825
|
-
const B =
|
|
2834
|
+
/* @__PURE__ */ e("div", { className: "max-h-60 overflow-y-auto p-2 space-y-1", children: d.map((D) => {
|
|
2835
|
+
const B = I(D);
|
|
2826
2836
|
return /* @__PURE__ */ n(
|
|
2827
2837
|
"div",
|
|
2828
2838
|
{
|
|
2829
|
-
onClick: () => B ? null :
|
|
2839
|
+
onClick: () => B ? null : x(D.id),
|
|
2830
2840
|
className: `flex items-center gap-3 p-2 rounded-md hover:bg-blue-50 ${B ? " hover:cursor-not-allowed" : "hover:cursor-pointer"}`,
|
|
2831
2841
|
children: [
|
|
2832
2842
|
/* @__PURE__ */ e(
|
|
2833
2843
|
"input",
|
|
2834
2844
|
{
|
|
2835
2845
|
type: "checkbox",
|
|
2836
|
-
checked:
|
|
2846
|
+
checked: S.has(D.id),
|
|
2837
2847
|
readOnly: !0,
|
|
2838
2848
|
className: "h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500",
|
|
2839
2849
|
disabled: !!B
|
|
@@ -2842,19 +2852,19 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2842
2852
|
/* @__PURE__ */ e(
|
|
2843
2853
|
"img",
|
|
2844
2854
|
{
|
|
2845
|
-
src:
|
|
2846
|
-
alt:
|
|
2855
|
+
src: D.avatarUrl || `https://avatar.vercel.sh/${D.name}.svg?text=${D.name.charAt(0)}`,
|
|
2856
|
+
alt: D.name,
|
|
2847
2857
|
className: "w-8 h-8 rounded-full"
|
|
2848
2858
|
}
|
|
2849
2859
|
),
|
|
2850
|
-
/* @__PURE__ */ e("span", { className: "text-md font-medium text-gray-800 truncate", children:
|
|
2860
|
+
/* @__PURE__ */ e("span", { className: "text-md font-medium text-gray-800 truncate", children: D.name }),
|
|
2851
2861
|
B ? /* @__PURE__ */ n(te, { children: [
|
|
2852
2862
|
/* @__PURE__ */ e("span", { className: "text-sm px-[12px] py-[2px] border border-dashed rounded-xl bg-teal-100 text-teal-700", children: B }),
|
|
2853
2863
|
/* @__PURE__ */ e("span", { className: "text-sm text-gray-400", children: "Already added" })
|
|
2854
2864
|
] }) : ""
|
|
2855
2865
|
]
|
|
2856
2866
|
},
|
|
2857
|
-
|
|
2867
|
+
D.id
|
|
2858
2868
|
);
|
|
2859
2869
|
}) }),
|
|
2860
2870
|
/* @__PURE__ */ n("div", { className: "flex justify-end gap-2 p-2 border-t border-gray-300", children: [
|
|
@@ -2869,8 +2879,8 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2869
2879
|
/* @__PURE__ */ e(
|
|
2870
2880
|
"button",
|
|
2871
2881
|
{
|
|
2872
|
-
onClick:
|
|
2873
|
-
disabled:
|
|
2882
|
+
onClick: $,
|
|
2883
|
+
disabled: S.size === 0,
|
|
2874
2884
|
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",
|
|
2875
2885
|
children: "Add"
|
|
2876
2886
|
}
|
|
@@ -2912,14 +2922,14 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2912
2922
|
/* @__PURE__ */ e(
|
|
2913
2923
|
ue,
|
|
2914
2924
|
{
|
|
2915
|
-
as:
|
|
2925
|
+
as: H,
|
|
2916
2926
|
leave: "transition ease-in duration-100",
|
|
2917
2927
|
leaveFrom: "opacity-100",
|
|
2918
2928
|
leaveTo: "opacity-0",
|
|
2919
|
-
children: /* @__PURE__ */ e(K.Options, { className: "absolute z-10 mt-1 w-auto min-w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children:
|
|
2929
|
+
children: /* @__PURE__ */ e(K.Options, { className: "absolute z-10 mt-1 w-auto min-w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: Mt.map((D) => /* @__PURE__ */ e(
|
|
2920
2930
|
K.Option,
|
|
2921
2931
|
{
|
|
2922
|
-
value:
|
|
2932
|
+
value: D,
|
|
2923
2933
|
className: ({ active: B }) => `${B ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
|
|
2924
2934
|
children: ({ selected: B, active: _ }) => /* @__PURE__ */ n(te, { children: [
|
|
2925
2935
|
/* @__PURE__ */ n(
|
|
@@ -2928,13 +2938,13 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2928
2938
|
className: `${B ? "font-medium" : "font-normal"} flex items-center`,
|
|
2929
2939
|
children: [
|
|
2930
2940
|
/* @__PURE__ */ e(
|
|
2931
|
-
|
|
2941
|
+
D.icon,
|
|
2932
2942
|
{
|
|
2933
2943
|
className: `h-5 w-5 mr-2 ${_ ? "text-white" : "text-gray-400"}`
|
|
2934
2944
|
}
|
|
2935
2945
|
),
|
|
2936
2946
|
"Can ",
|
|
2937
|
-
|
|
2947
|
+
D.name
|
|
2938
2948
|
]
|
|
2939
2949
|
}
|
|
2940
2950
|
),
|
|
@@ -2947,7 +2957,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2947
2957
|
) })
|
|
2948
2958
|
] })
|
|
2949
2959
|
},
|
|
2950
|
-
|
|
2960
|
+
D.id
|
|
2951
2961
|
)) })
|
|
2952
2962
|
}
|
|
2953
2963
|
)
|
|
@@ -2955,7 +2965,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2955
2965
|
}
|
|
2956
2966
|
)
|
|
2957
2967
|
] }),
|
|
2958
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(ke, { children: w.map((
|
|
2968
|
+
/* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(ke, { children: w.map((D, B) => /* @__PURE__ */ n(
|
|
2959
2969
|
le.div,
|
|
2960
2970
|
{
|
|
2961
2971
|
layout: !0,
|
|
@@ -2969,29 +2979,29 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2969
2979
|
/* @__PURE__ */ e(
|
|
2970
2980
|
"img",
|
|
2971
2981
|
{
|
|
2972
|
-
src:
|
|
2982
|
+
src: D.avatarUrl || `https://avatar.vercel.sh/${D.name}.svg?text=${D.name.charAt(0)}`,
|
|
2973
2983
|
className: "w-8 h-8 rounded-full flex-shrink-0"
|
|
2974
2984
|
}
|
|
2975
2985
|
),
|
|
2976
|
-
/* @__PURE__ */ e("span", { className: "font-medium text-sm text-gray-800 truncate", children:
|
|
2986
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-sm text-gray-800 truncate", children: D.name })
|
|
2977
2987
|
] }),
|
|
2978
2988
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
2979
2989
|
l === de.DRIVE && /* @__PURE__ */ n("span", { className: "text-sm text-gray-500", children: [
|
|
2980
2990
|
"can ",
|
|
2981
|
-
|
|
2991
|
+
D.permission
|
|
2982
2992
|
] }),
|
|
2983
2993
|
/* @__PURE__ */ e(
|
|
2984
2994
|
"button",
|
|
2985
2995
|
{
|
|
2986
2996
|
onClick: () => k(B),
|
|
2987
2997
|
className: "text-gray-400 hover:text-red-500 hover:cursor-pointer",
|
|
2988
|
-
children: /* @__PURE__ */ e(
|
|
2998
|
+
children: /* @__PURE__ */ e(He, { className: "h-5 w-5" })
|
|
2989
2999
|
}
|
|
2990
3000
|
)
|
|
2991
3001
|
] })
|
|
2992
3002
|
]
|
|
2993
3003
|
},
|
|
2994
|
-
|
|
3004
|
+
D.id
|
|
2995
3005
|
)) }) })
|
|
2996
3006
|
]
|
|
2997
3007
|
}
|
|
@@ -3026,17 +3036,17 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3026
3036
|
] }) })
|
|
3027
3037
|
] });
|
|
3028
3038
|
}, it = [
|
|
3029
|
-
{ name: "Can view", icon:
|
|
3030
|
-
{ name: "Can manage", icon:
|
|
3039
|
+
{ name: "Can view", icon: Kt, value: "view" },
|
|
3040
|
+
{ name: "Can manage", icon: ea, value: "edit" },
|
|
3031
3041
|
{ name: "Remove", icon: or, isDestructive: !0, value: "remove" }
|
|
3032
3042
|
], rs = ({ item: t, allowedPermissions: a, onPermissionChange: s }) => {
|
|
3033
|
-
const [o, l] = L(!1), { refs: m, floatingStyles: i, context: u } =
|
|
3043
|
+
const [o, l] = L(!1), { refs: m, floatingStyles: i, context: u } = la({
|
|
3034
3044
|
open: o,
|
|
3035
3045
|
onOpenChange: l,
|
|
3036
|
-
middleware: [
|
|
3037
|
-
whileElementsMounted:
|
|
3046
|
+
middleware: [oa(8), ia(), ca({ padding: 8 })],
|
|
3047
|
+
whileElementsMounted: da,
|
|
3038
3048
|
placement: "bottom-end"
|
|
3039
|
-
}), g = Zr(u), f = Kr(u), { getReferenceProps:
|
|
3049
|
+
}), g = Zr(u), f = Kr(u), { getReferenceProps: y, getFloatingProps: r } = en([
|
|
3040
3050
|
g,
|
|
3041
3051
|
f
|
|
3042
3052
|
]), N = it.find((p) => p.name === t.permission || p.value === t.permission) || it[0];
|
|
@@ -3050,7 +3060,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3050
3060
|
K.Button,
|
|
3051
3061
|
{
|
|
3052
3062
|
ref: m.setReference,
|
|
3053
|
-
...
|
|
3063
|
+
...y(),
|
|
3054
3064
|
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",
|
|
3055
3065
|
children: [
|
|
3056
3066
|
/* @__PURE__ */ e("span", { className: "block truncate", children: t.permission }),
|
|
@@ -3061,7 +3071,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3061
3071
|
/* @__PURE__ */ e(tn, { children: /* @__PURE__ */ e(
|
|
3062
3072
|
ue,
|
|
3063
3073
|
{
|
|
3064
|
-
as:
|
|
3074
|
+
as: H,
|
|
3065
3075
|
show: o,
|
|
3066
3076
|
enter: "transition ease-out duration-100",
|
|
3067
3077
|
enterFrom: "transform opacity-0 scale-95",
|
|
@@ -3081,24 +3091,24 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3081
3091
|
K.Option,
|
|
3082
3092
|
{
|
|
3083
3093
|
className: ({
|
|
3084
|
-
active:
|
|
3094
|
+
active: S
|
|
3085
3095
|
}) => `relative select-none py-2 pl-10 pr-4 hover:cursor-pointer
|
|
3086
|
-
${
|
|
3087
|
-
${p.isDestructive &&
|
|
3088
|
-
${p.isDestructive &&
|
|
3096
|
+
${S ? "bg-blue-100 text-blue-900" : "text-gray-900"}
|
|
3097
|
+
${p.isDestructive && S ? "bg-red-100 text-red-900" : ""}
|
|
3098
|
+
${p.isDestructive && !S ? "text-red-600" : ""}`,
|
|
3089
3099
|
value: p,
|
|
3090
|
-
children: ({ selected:
|
|
3100
|
+
children: ({ selected: S }) => /* @__PURE__ */ n(te, { children: [
|
|
3091
3101
|
/* @__PURE__ */ n(
|
|
3092
3102
|
"span",
|
|
3093
3103
|
{
|
|
3094
|
-
className: `flex items-center gap-2 truncate ${
|
|
3104
|
+
className: `flex items-center gap-2 truncate ${S ? "font-medium" : "font-normal"}`,
|
|
3095
3105
|
children: [
|
|
3096
3106
|
/* @__PURE__ */ e(p.icon, { className: "h-5 w-5", "aria-hidden": "true" }),
|
|
3097
3107
|
p.name
|
|
3098
3108
|
]
|
|
3099
3109
|
}
|
|
3100
3110
|
),
|
|
3101
|
-
|
|
3111
|
+
S && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(ht, { className: "h-5 w-5", "aria-hidden": "true" }) })
|
|
3102
3112
|
] })
|
|
3103
3113
|
},
|
|
3104
3114
|
p.name
|
|
@@ -3118,7 +3128,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3118
3128
|
existingShares: l,
|
|
3119
3129
|
allowedPermissions: m
|
|
3120
3130
|
}) => {
|
|
3121
|
-
const [i, u] = L(l), [g, f] = L(0), [
|
|
3131
|
+
const [i, u] = L(l), [g, f] = L(0), [y, r] = L(""), N = Ct(y, 300), d = {
|
|
3122
3132
|
users: i.users.filter(
|
|
3123
3133
|
(R) => R.name.toLowerCase().includes(N.toLowerCase())
|
|
3124
3134
|
),
|
|
@@ -3136,7 +3146,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3136
3146
|
(C) => C.id === R.id ? { ...C, permission: Y } : C
|
|
3137
3147
|
)
|
|
3138
3148
|
}));
|
|
3139
|
-
},
|
|
3149
|
+
}, S = () => {
|
|
3140
3150
|
const R = {
|
|
3141
3151
|
users: i.users.filter((O) => O.permission !== "remove"),
|
|
3142
3152
|
groups: i.groups.filter((O) => O.permission !== "remove"),
|
|
@@ -3154,7 +3164,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3154
3164
|
onClick: () => a(i),
|
|
3155
3165
|
className: "flex items-center gap-1 text-sm font-medium text-gray-600 hover:text-gray-900 hover:cursor-pointer p-2 rounded-md hover:bg-gray-100",
|
|
3156
3166
|
children: [
|
|
3157
|
-
/* @__PURE__ */ e(
|
|
3167
|
+
/* @__PURE__ */ e(ta, { className: "h-5 w-5" }),
|
|
3158
3168
|
" Back"
|
|
3159
3169
|
]
|
|
3160
3170
|
}
|
|
@@ -3165,7 +3175,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3165
3175
|
{
|
|
3166
3176
|
onClick: s,
|
|
3167
3177
|
className: "text-gray-500 hover:text-gray-800 p-2 rounded-full hover:bg-gray-100 hover:cursor-pointer",
|
|
3168
|
-
children: /* @__PURE__ */ e(
|
|
3178
|
+
children: /* @__PURE__ */ e(He, { className: "h-6 w-6" })
|
|
3169
3179
|
}
|
|
3170
3180
|
)
|
|
3171
3181
|
] }),
|
|
@@ -3188,7 +3198,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3188
3198
|
he,
|
|
3189
3199
|
{
|
|
3190
3200
|
onDebouncedChange: r,
|
|
3191
|
-
value:
|
|
3201
|
+
value: y,
|
|
3192
3202
|
placeholder: `Search in ${E[g]}...`
|
|
3193
3203
|
}
|
|
3194
3204
|
) })
|
|
@@ -3200,7 +3210,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3200
3210
|
animate: { y: 0, opacity: 1 },
|
|
3201
3211
|
exit: { y: -10, opacity: 0 },
|
|
3202
3212
|
transition: { duration: 0.2 },
|
|
3203
|
-
children: /* @__PURE__ */ e(ne.Panels, { as:
|
|
3213
|
+
children: /* @__PURE__ */ e(ne.Panels, { as: H, children: A.map((R) => /* @__PURE__ */ e(
|
|
3204
3214
|
ne.Panel,
|
|
3205
3215
|
{
|
|
3206
3216
|
className: "space-y-3 focus:outline-none",
|
|
@@ -3266,13 +3276,13 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3266
3276
|
animate: { opacity: 1 },
|
|
3267
3277
|
className: "flex flex-col items-center justify-center text-center p-8 mt-10 bg-white rounded-lg border border-gray-300",
|
|
3268
3278
|
children: [
|
|
3269
|
-
/* @__PURE__ */ e(
|
|
3279
|
+
/* @__PURE__ */ e(Zt, { className: "h-12 w-12 text-gray-400" }),
|
|
3270
3280
|
/* @__PURE__ */ n("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: [
|
|
3271
3281
|
"No ",
|
|
3272
3282
|
E[g],
|
|
3273
3283
|
" Found"
|
|
3274
3284
|
] }),
|
|
3275
|
-
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children:
|
|
3285
|
+
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: y ? `No results for "${y}"` : `There are no ${E[g].toLowerCase()} with access.` })
|
|
3276
3286
|
]
|
|
3277
3287
|
}
|
|
3278
3288
|
)
|
|
@@ -3287,7 +3297,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3287
3297
|
/* @__PURE__ */ e("div", { className: "p-4 bg-white border-t border-gray-300 flex justify-end", children: /* @__PURE__ */ e(
|
|
3288
3298
|
"button",
|
|
3289
3299
|
{
|
|
3290
|
-
onClick:
|
|
3300
|
+
onClick: S,
|
|
3291
3301
|
className: "px-4 py-2 bg-blue-600 text-white rounded-md shadow hover:bg-blue-700",
|
|
3292
3302
|
children: "Update"
|
|
3293
3303
|
}
|
|
@@ -3308,9 +3318,9 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3308
3318
|
onClose: s,
|
|
3309
3319
|
members: o
|
|
3310
3320
|
}) => {
|
|
3311
|
-
const [l, m] = L(!0), [i, u] = L(""), g =
|
|
3321
|
+
const [l, m] = L(!0), [i, u] = L(""), g = Ct(i, 300), f = o.filter(
|
|
3312
3322
|
(d) => d.name.toLowerCase().includes(g.toLowerCase())
|
|
3313
|
-
),
|
|
3323
|
+
), y = {
|
|
3314
3324
|
hidden: { opacity: 0 },
|
|
3315
3325
|
visible: {
|
|
3316
3326
|
opacity: 1,
|
|
@@ -3340,7 +3350,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3340
3350
|
) : /* @__PURE__ */ e(
|
|
3341
3351
|
le.ul,
|
|
3342
3352
|
{
|
|
3343
|
-
variants:
|
|
3353
|
+
variants: y,
|
|
3344
3354
|
initial: "hidden",
|
|
3345
3355
|
animate: "visible",
|
|
3346
3356
|
className: "divide-y divide-gray-200",
|
|
@@ -3380,7 +3390,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3380
3390
|
onClick: a,
|
|
3381
3391
|
className: "flex items-center gap-1 text-sm font-medium text-gray-600 hover:text-gray-900 p-2 rounded-md hover:bg-gray-100 hover:cursor-pointer",
|
|
3382
3392
|
children: [
|
|
3383
|
-
/* @__PURE__ */ e(
|
|
3393
|
+
/* @__PURE__ */ e(ta, { className: "h-5 w-5" }),
|
|
3384
3394
|
" Back"
|
|
3385
3395
|
]
|
|
3386
3396
|
}
|
|
@@ -3394,7 +3404,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3394
3404
|
{
|
|
3395
3405
|
onClick: s,
|
|
3396
3406
|
className: "text-gray-500 hover:text-gray-800 p-2 rounded-full hover:bg-gray-100 hover:cursor-pointer",
|
|
3397
|
-
children: /* @__PURE__ */ e(
|
|
3407
|
+
children: /* @__PURE__ */ e(He, { className: "h-6 w-6" })
|
|
3398
3408
|
}
|
|
3399
3409
|
)
|
|
3400
3410
|
] }),
|
|
@@ -3429,10 +3439,10 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3429
3439
|
allowedPermissions: u = [],
|
|
3430
3440
|
...g
|
|
3431
3441
|
}) => {
|
|
3432
|
-
const [f,
|
|
3433
|
-
|
|
3442
|
+
const [f, y] = L(pe.INVITE), [r, N] = L(t), [d, p] = L(null), [S, A] = L(!1), [E, R] = L([]), [O, V] = L(pe.MANAGE), U = () => {
|
|
3443
|
+
y(pe.INVITE), p(null), m();
|
|
3434
3444
|
}, Y = () => {
|
|
3435
|
-
|
|
3445
|
+
y(pe.MANAGE);
|
|
3436
3446
|
}, G = async ({ id: w, name: T, type: k }) => {
|
|
3437
3447
|
if (k === "groups") {
|
|
3438
3448
|
try {
|
|
@@ -3442,15 +3452,15 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3442
3452
|
}
|
|
3443
3453
|
R(resp);
|
|
3444
3454
|
}
|
|
3445
|
-
p({ id: w, type: k, name: T }), V(f),
|
|
3455
|
+
p({ id: w, type: k, name: T }), V(f), y(pe.MEMBERS);
|
|
3446
3456
|
}, C = (w) => {
|
|
3447
3457
|
console.log("changedExistingShares", w), N(w);
|
|
3448
|
-
const T = ot.mapValues(t, (b) => b.map((
|
|
3458
|
+
const T = ot.mapValues(t, (b) => b.map((x) => ({ id: x.id, permission: x.permission })).sort((x, $) => x.id - $.id)), k = ot.mapValues(w, (b) => b.map((x) => ({ id: x.id, permission: x.permission })).sort((x, $) => x.id - $.id));
|
|
3449
3459
|
console.log("Existing data:", T), console.log("Changed data:", k);
|
|
3450
3460
|
const v = !ot.isEqual(T, k);
|
|
3451
|
-
console.log("hasPermissionChanged:", v), A(v),
|
|
3461
|
+
console.log("hasPermissionChanged:", v), A(v), y(f === pe.MEMBERS ? O : pe.INVITE);
|
|
3452
3462
|
};
|
|
3453
|
-
return /* @__PURE__ */ e(ue, { appear: !0, show: a, as:
|
|
3463
|
+
return /* @__PURE__ */ e(ue, { appear: !0, show: a, as: H, children: /* @__PURE__ */ n(be, { as: "div", className: "relative z-50", onClose: U, children: [
|
|
3454
3464
|
/* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
|
|
3455
3465
|
/* @__PURE__ */ e("div", { className: "filter-modal-container", children: /* @__PURE__ */ e("div", { className: "filter-modal-positioner", children: /* @__PURE__ */ e(Fe, { className: "filter-modal-panel", style: { background: "white" }, children: (() => {
|
|
3456
3466
|
switch (f) {
|
|
@@ -3522,7 +3532,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3522
3532
|
onFinalSubmit: (w) => {
|
|
3523
3533
|
s(w, r);
|
|
3524
3534
|
},
|
|
3525
|
-
isChanged:
|
|
3535
|
+
isChanged: S
|
|
3526
3536
|
}
|
|
3527
3537
|
)
|
|
3528
3538
|
},
|
|
@@ -3550,15 +3560,15 @@ function at({
|
|
|
3550
3560
|
// NEW: search behavior
|
|
3551
3561
|
searchMode: f = "client",
|
|
3552
3562
|
// "client" | "server"
|
|
3553
|
-
onSearch:
|
|
3563
|
+
onSearch: y,
|
|
3554
3564
|
// (query: string) => void (required if searchMode==="server")
|
|
3555
3565
|
serverLoading: r = !1,
|
|
3556
3566
|
minSearchChars: N = 2,
|
|
3557
3567
|
// NEW: mappers (id/label keys)
|
|
3558
|
-
getOptionId: d = (
|
|
3559
|
-
getOptionLabel: p = (
|
|
3568
|
+
getOptionId: d = (S) => String(S.id),
|
|
3569
|
+
getOptionLabel: p = (S) => S.name
|
|
3560
3570
|
}) {
|
|
3561
|
-
const
|
|
3571
|
+
const S = Xe(), A = Xe(), [E, R] = L(""), O = ge(""), V = me(() => {
|
|
3562
3572
|
const w = /* @__PURE__ */ new Map();
|
|
3563
3573
|
for (const T of a) w.set(d(T), T);
|
|
3564
3574
|
return w;
|
|
@@ -3568,8 +3578,8 @@ function at({
|
|
|
3568
3578
|
return a.filter((T) => p(T).toLowerCase().includes(w));
|
|
3569
3579
|
}, [a, E, p]);
|
|
3570
3580
|
Z(() => {
|
|
3571
|
-
f === "server" && E.length >= N && E !== O.current && (O.current = E,
|
|
3572
|
-
}, [E, f, N,
|
|
3581
|
+
f === "server" && E.length >= N && E !== O.current && (O.current = E, y && y(E));
|
|
3582
|
+
}, [E, f, N, y]);
|
|
3573
3583
|
const G = f === "client" ? Y : a, C = () => {
|
|
3574
3584
|
if (!U.length)
|
|
3575
3585
|
return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
|
|
@@ -3597,7 +3607,7 @@ function at({
|
|
|
3597
3607
|
/* @__PURE__ */ e(
|
|
3598
3608
|
K.Label,
|
|
3599
3609
|
{
|
|
3600
|
-
id:
|
|
3610
|
+
id: S,
|
|
3601
3611
|
className: "block text-sm font-medium leading-6 text-gray-900",
|
|
3602
3612
|
children: t
|
|
3603
3613
|
}
|
|
@@ -3606,7 +3616,7 @@ function at({
|
|
|
3606
3616
|
/* @__PURE__ */ n(
|
|
3607
3617
|
K.Button,
|
|
3608
3618
|
{
|
|
3609
|
-
"aria-labelledby":
|
|
3619
|
+
"aria-labelledby": S,
|
|
3610
3620
|
"aria-invalid": !!i,
|
|
3611
3621
|
"aria-describedby": i ? A : void 0,
|
|
3612
3622
|
onBlur: l,
|
|
@@ -3616,14 +3626,14 @@ function at({
|
|
|
3616
3626
|
),
|
|
3617
3627
|
children: [
|
|
3618
3628
|
/* @__PURE__ */ e("span", { className: "block truncate", children: C() }),
|
|
3619
|
-
/* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(
|
|
3629
|
+
/* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(Qt, { className: "w-5 h-5 text-gray-400", "aria-hidden": "true" }) })
|
|
3620
3630
|
]
|
|
3621
3631
|
}
|
|
3622
3632
|
),
|
|
3623
3633
|
/* @__PURE__ */ e(
|
|
3624
3634
|
ue,
|
|
3625
3635
|
{
|
|
3626
|
-
as:
|
|
3636
|
+
as: H,
|
|
3627
3637
|
show: w,
|
|
3628
3638
|
leave: "transition ease-in duration-100",
|
|
3629
3639
|
leaveFrom: "opacity-100",
|
|
@@ -3639,28 +3649,28 @@ function at({
|
|
|
3639
3649
|
) }),
|
|
3640
3650
|
f === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
|
|
3641
3651
|
G.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: f === "server" ? E.length < N ? `Type at least ${N} characters to search.` : "No results." : "No options found." }) : G.map((T) => {
|
|
3642
|
-
const k = d(T), v = p(T), b = U.some((
|
|
3652
|
+
const k = d(T), v = p(T), b = U.some(($) => d($) === k), x = g !== -1 && U.length >= g && !b;
|
|
3643
3653
|
return /* @__PURE__ */ e(
|
|
3644
3654
|
K.Option,
|
|
3645
3655
|
{
|
|
3646
3656
|
value: T,
|
|
3647
|
-
disabled:
|
|
3648
|
-
className: ({ active:
|
|
3649
|
-
|
|
3657
|
+
disabled: x,
|
|
3658
|
+
className: ({ active: $ }) => Ge(
|
|
3659
|
+
x ? " text-gray-400 bg-white cursor-not-allowed" : $ ? " bg-gray-200 text-gray-900" : " text-gray-900",
|
|
3650
3660
|
" relative cursor-default select-none py-2 pl-3 pr-9"
|
|
3651
3661
|
),
|
|
3652
|
-
children: ({ selected:
|
|
3662
|
+
children: ({ selected: $, active: M }) => /* @__PURE__ */ n(te, { children: [
|
|
3653
3663
|
/* @__PURE__ */ e(
|
|
3654
3664
|
"span",
|
|
3655
3665
|
{
|
|
3656
3666
|
className: Ge(
|
|
3657
|
-
|
|
3667
|
+
$ ? "font-semibold" : "font-normal",
|
|
3658
3668
|
"block truncate"
|
|
3659
3669
|
),
|
|
3660
3670
|
children: v
|
|
3661
3671
|
}
|
|
3662
3672
|
),
|
|
3663
|
-
|
|
3673
|
+
$ && /* @__PURE__ */ e(
|
|
3664
3674
|
"span",
|
|
3665
3675
|
{
|
|
3666
3676
|
className: Ge(
|
|
@@ -3734,10 +3744,10 @@ const Wl = ({
|
|
|
3734
3744
|
secondaryAction: i = { onCancel: null, label: "Cancel" },
|
|
3735
3745
|
dialogPanelClass: u = ""
|
|
3736
3746
|
}) => {
|
|
3737
|
-
const g = (
|
|
3738
|
-
|
|
3739
|
-
}, f = (
|
|
3740
|
-
|
|
3747
|
+
const g = (y) => {
|
|
3748
|
+
y.target === y.currentTarget && a(!1);
|
|
3749
|
+
}, f = (y) => {
|
|
3750
|
+
y.stopPropagation();
|
|
3741
3751
|
};
|
|
3742
3752
|
return /* @__PURE__ */ n(
|
|
3743
3753
|
be,
|
|
@@ -3747,7 +3757,7 @@ const Wl = ({
|
|
|
3747
3757
|
className: "relative z-50 overflow-y-auto",
|
|
3748
3758
|
children: [
|
|
3749
3759
|
/* @__PURE__ */ e(
|
|
3750
|
-
|
|
3760
|
+
Qr,
|
|
3751
3761
|
{
|
|
3752
3762
|
className: "fixed inset-0 bg-black/30",
|
|
3753
3763
|
onClick: g
|
|
@@ -3817,7 +3827,7 @@ function is({ listeners: t = {}, attributes: a = {} }) {
|
|
|
3817
3827
|
...a,
|
|
3818
3828
|
onMouseDown: (s) => s.stopPropagation(),
|
|
3819
3829
|
onClick: (s) => s.stopPropagation(),
|
|
3820
|
-
children: /* @__PURE__ */ e(
|
|
3830
|
+
children: /* @__PURE__ */ e(wt, { size: 14 })
|
|
3821
3831
|
}
|
|
3822
3832
|
);
|
|
3823
3833
|
}
|
|
@@ -3833,10 +3843,10 @@ function cs({
|
|
|
3833
3843
|
renderActions: g,
|
|
3834
3844
|
// optional override
|
|
3835
3845
|
dragId: f,
|
|
3836
|
-
dropId:
|
|
3846
|
+
dropId: y,
|
|
3837
3847
|
indent: r = 24
|
|
3838
3848
|
}) {
|
|
3839
|
-
const { setNodeRef: N, isOver: d } = cr({ id:
|
|
3849
|
+
const { setNodeRef: N, isOver: d } = cr({ id: y }), { attributes: p, listeners: S, setNodeRef: A, transform: E, isDragging: R } = dr({ id: f }), O = E ? { transform: `translate3d(${Math.round(E.x)}px, ${Math.round(E.y)}px, 0)` } : void 0, [V, U] = L(!1), [Y, G] = L(t.name), C = () => {
|
|
3840
3850
|
const w = Y.trim();
|
|
3841
3851
|
U(!1), w && w !== t.name ? i?.(t, w) : G(t.name);
|
|
3842
3852
|
}, h = me(() => /* @__PURE__ */ e(
|
|
@@ -3862,7 +3872,7 @@ function cs({
|
|
|
3862
3872
|
w.target.closest(".tv-toggle") || w.target.tagName === "INPUT" || l?.(t);
|
|
3863
3873
|
},
|
|
3864
3874
|
children: [
|
|
3865
|
-
/* @__PURE__ */ e("button", { className: "tv-toggle", onClick: o, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(
|
|
3875
|
+
/* @__PURE__ */ e("button", { className: "tv-toggle", onClick: o, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(Nt, { size: 16 }) : /* @__PURE__ */ e(fe, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
|
|
3866
3876
|
/* @__PURE__ */ e(Le, { size: 16, className: "tv-folder-ic" }),
|
|
3867
3877
|
/* @__PURE__ */ e("div", { className: "tv-name", ref: A, children: V ? /* @__PURE__ */ e(
|
|
3868
3878
|
"input",
|
|
@@ -3877,7 +3887,7 @@ function cs({
|
|
|
3877
3887
|
autoFocus: !0
|
|
3878
3888
|
}
|
|
3879
3889
|
) : /* @__PURE__ */ e("span", { onDoubleClick: () => U(!0), children: t.name }) }),
|
|
3880
|
-
/* @__PURE__ */ e(is, { listeners:
|
|
3890
|
+
/* @__PURE__ */ e(is, { listeners: S, attributes: p }),
|
|
3881
3891
|
/* @__PURE__ */ e("div", { className: "tv-actions", children: g ? g(t, {
|
|
3882
3892
|
onCreateChild: () => m?.(t),
|
|
3883
3893
|
onRename: () => U(!0),
|
|
@@ -3909,14 +3919,14 @@ function ps(t, { rootId: a, getId: s, getParent: o, getName: l }) {
|
|
|
3909
3919
|
function gs(t, { rootId: a, getId: s, getName: o }) {
|
|
3910
3920
|
const l = /* @__PURE__ */ new Map();
|
|
3911
3921
|
function m(u, g) {
|
|
3912
|
-
const f = s(u),
|
|
3922
|
+
const f = s(u), y = {
|
|
3913
3923
|
...u,
|
|
3914
3924
|
id: f,
|
|
3915
3925
|
name: o(u),
|
|
3916
3926
|
parentId: g || a,
|
|
3917
3927
|
children: (u.children || []).map((r) => m(r, f))
|
|
3918
3928
|
};
|
|
3919
|
-
return l.set(f,
|
|
3929
|
+
return l.set(f, y), y;
|
|
3920
3930
|
}
|
|
3921
3931
|
return { roots: t.map((u) => m(u, null)), byId: l };
|
|
3922
3932
|
}
|
|
@@ -3971,48 +3981,48 @@ function Jl({
|
|
|
3971
3981
|
onCreateRoot: u,
|
|
3972
3982
|
onCreateChild: g,
|
|
3973
3983
|
onRename: f,
|
|
3974
|
-
onDelete:
|
|
3984
|
+
onDelete: y,
|
|
3975
3985
|
onMove: r,
|
|
3976
3986
|
renderActions: N,
|
|
3977
3987
|
disableMoveToRoot: d = !1,
|
|
3978
3988
|
// ← allow root moves by default now
|
|
3979
3989
|
indentUnit: p = 24
|
|
3980
3990
|
}) {
|
|
3981
|
-
const { roots:
|
|
3982
|
-
t.map((
|
|
3991
|
+
const { roots: S } = me(() => hs(t) ? gs(t, { rootId: a, getId: o, getName: m }) : ps(
|
|
3992
|
+
t.map((x) => ({ ...x })),
|
|
3983
3993
|
{ rootId: a, getId: o, getParent: l, getName: m }
|
|
3984
|
-
), [t, a, o, l, m]), [A, E] = L({}), R = ae((
|
|
3985
|
-
const
|
|
3994
|
+
), [t, a, o, l, m]), [A, E] = L({}), R = ae((x) => {
|
|
3995
|
+
const $ = {};
|
|
3986
3996
|
return (function M(z) {
|
|
3987
|
-
z.forEach((
|
|
3988
|
-
|
|
3997
|
+
z.forEach((I) => {
|
|
3998
|
+
$[I.id] = !0, I.children?.length && M(I.children);
|
|
3989
3999
|
});
|
|
3990
|
-
})(
|
|
4000
|
+
})(x), $;
|
|
3991
4001
|
}, []);
|
|
3992
4002
|
se.useEffect(() => {
|
|
3993
|
-
E(R(
|
|
3994
|
-
}, [
|
|
4003
|
+
E(R(S));
|
|
4004
|
+
}, [S, R]);
|
|
3995
4005
|
const O = ae(
|
|
3996
|
-
(
|
|
4006
|
+
(x) => E(($) => ({ ...$, [x]: !$[x] })),
|
|
3997
4007
|
[]
|
|
3998
|
-
), [V, U] = L(() => Me(
|
|
3999
|
-
se.useEffect(() => U(Me(
|
|
4008
|
+
), [V, U] = L(() => Me(S));
|
|
4009
|
+
se.useEffect(() => U(Me(S)), [S]);
|
|
4000
4010
|
const Y = mr(
|
|
4001
4011
|
ur(br, { activationConstraint: { delay: 250, tolerance: 5 } })
|
|
4002
4012
|
), G = ge(null), [C, h] = L(null), w = ge(0), T = () => {
|
|
4003
|
-
}, k = ({ delta:
|
|
4004
|
-
w.current =
|
|
4013
|
+
}, k = ({ delta: x }) => {
|
|
4014
|
+
w.current = x?.x ?? 0;
|
|
4005
4015
|
}, v = ae(
|
|
4006
|
-
({ active:
|
|
4016
|
+
({ active: x, over: $ }) => {
|
|
4007
4017
|
const M = w.current;
|
|
4008
|
-
if (w.current = 0, h(null), !
|
|
4009
|
-
const z = String(
|
|
4010
|
-
if (!z || !
|
|
4011
|
-
let F =
|
|
4012
|
-
const
|
|
4013
|
-
if (
|
|
4014
|
-
let X =
|
|
4015
|
-
for (let xe = 0; xe <
|
|
4018
|
+
if (w.current = 0, h(null), !x || !$) return;
|
|
4019
|
+
const z = String(x.id).replace(/^drag-/, ""), I = String($.id).replace(/^drop-/, "");
|
|
4020
|
+
if (!z || !I || z === I) return;
|
|
4021
|
+
let F = I;
|
|
4022
|
+
const D = Math.max(0, Math.floor(-M / p));
|
|
4023
|
+
if (D > 0) {
|
|
4024
|
+
let X = I;
|
|
4025
|
+
for (let xe = 0; xe < D; xe++) {
|
|
4016
4026
|
const j = Sa(V, X, null);
|
|
4017
4027
|
if (!j) break;
|
|
4018
4028
|
if (!j.parentId) {
|
|
@@ -4023,50 +4033,50 @@ function Jl({
|
|
|
4023
4033
|
}
|
|
4024
4034
|
}
|
|
4025
4035
|
if (d && F === a) {
|
|
4026
|
-
U(Me(
|
|
4036
|
+
U(Me(S));
|
|
4027
4037
|
return;
|
|
4028
4038
|
}
|
|
4029
|
-
const B = Me(V), { newRoots: _, removed:
|
|
4030
|
-
if (!
|
|
4031
|
-
const q = fs(_, F,
|
|
4039
|
+
const B = Me(V), { newRoots: _, removed: P } = bs(B, z);
|
|
4040
|
+
if (!P) return;
|
|
4041
|
+
const q = fs(_, F, P);
|
|
4032
4042
|
U(q), r?.({ sourceId: z, destParentId: F, newTree: q });
|
|
4033
4043
|
},
|
|
4034
|
-
[V,
|
|
4044
|
+
[V, S, a, d, p, r]
|
|
4035
4045
|
), b = ae(
|
|
4036
|
-
(
|
|
4046
|
+
(x, $ = 0) => x.map((M) => /* @__PURE__ */ n(se.Fragment, { children: [
|
|
4037
4047
|
/* @__PURE__ */ e(
|
|
4038
4048
|
cs,
|
|
4039
4049
|
{
|
|
4040
4050
|
node: M,
|
|
4041
|
-
depth:
|
|
4051
|
+
depth: $,
|
|
4042
4052
|
expanded: !!A[M.id],
|
|
4043
4053
|
onToggle: () => O(M.id),
|
|
4044
4054
|
onSelect: i,
|
|
4045
4055
|
onCreateChild: g,
|
|
4046
4056
|
onRename: f,
|
|
4047
|
-
onDelete:
|
|
4057
|
+
onDelete: y,
|
|
4048
4058
|
renderActions: N,
|
|
4049
4059
|
dragId: `drag-${M.id}`,
|
|
4050
4060
|
dropId: `drop-${M.id}`,
|
|
4051
4061
|
indent: p
|
|
4052
4062
|
}
|
|
4053
4063
|
),
|
|
4054
|
-
A[M.id] && M.children?.length > 0 ? b(M.children,
|
|
4064
|
+
A[M.id] && M.children?.length > 0 ? b(M.children, $ + 1) : null
|
|
4055
4065
|
] }, M.id)),
|
|
4056
|
-
[A, p, g,
|
|
4066
|
+
[A, p, g, y, f, i, N, O]
|
|
4057
4067
|
);
|
|
4058
4068
|
return se.useMemo(() => {
|
|
4059
4069
|
if (!C) return null;
|
|
4060
|
-
const
|
|
4061
|
-
function
|
|
4070
|
+
const x = String(C).replace(/^drag-/, "");
|
|
4071
|
+
function $(M) {
|
|
4062
4072
|
for (const z of M) {
|
|
4063
|
-
if (z.id ===
|
|
4064
|
-
const
|
|
4065
|
-
if (
|
|
4073
|
+
if (z.id === x) return z;
|
|
4074
|
+
const I = z.children?.length ? $(z.children) : null;
|
|
4075
|
+
if (I) return I;
|
|
4066
4076
|
}
|
|
4067
4077
|
return null;
|
|
4068
4078
|
}
|
|
4069
|
-
return
|
|
4079
|
+
return $(V);
|
|
4070
4080
|
}, [C, V]), /* @__PURE__ */ n("div", { className: "tv", children: [
|
|
4071
4081
|
s !== !1 && /* @__PURE__ */ n("div", { className: "tv-header", children: [
|
|
4072
4082
|
/* @__PURE__ */ e("div", { className: "tv-title", children: s }),
|
|
@@ -4108,10 +4118,10 @@ const Xl = ({
|
|
|
4108
4118
|
const g = s === "vertical", f = (N) => we(
|
|
4109
4119
|
"py-2 -mb-px text-sm font-medium focus:outline-none border-b-2",
|
|
4110
4120
|
N ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
|
|
4111
|
-
),
|
|
4121
|
+
), y = (N) => we(
|
|
4112
4122
|
"text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
|
|
4113
4123
|
N ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
|
|
4114
|
-
), r = ({ selected: N }) => i ? typeof i == "function" ? i(N) : i : g ?
|
|
4124
|
+
), r = ({ selected: N }) => i ? typeof i == "function" ? i(N) : i : g ? y(N) : f(N);
|
|
4115
4125
|
return /* @__PURE__ */ e(ne.Group, { vertical: g, ...u, children: g ? /* @__PURE__ */ n("div", { className: we("flex gap-4", o), children: [
|
|
4116
4126
|
/* @__PURE__ */ e(ne.List, { className: we("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((N) => /* @__PURE__ */ e(ne, { className: r, children: N.label }, N.key)) }),
|
|
4117
4127
|
/* @__PURE__ */ e(ne.Panels, { unmount: !a, className: we("flex-1", m), children: t.map((N) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: N.content }) }, N.key)) })
|
|
@@ -4123,8 +4133,8 @@ const Xl = ({
|
|
|
4123
4133
|
] })
|
|
4124
4134
|
) });
|
|
4125
4135
|
};
|
|
4126
|
-
function
|
|
4127
|
-
return t ? (t.endsWith("Z") || /[+\-]\d{2}:?\d{2}$/.test(t) ?
|
|
4136
|
+
function Ql(t, a = "YYYY-MM-DD HH:mm:ss") {
|
|
4137
|
+
return t ? (t.endsWith("Z") || /[+\-]\d{2}:?\d{2}$/.test(t) ? St.parseZone(t) : St.utc(t)).local().format(a) : null;
|
|
4128
4138
|
}
|
|
4129
4139
|
c.string;
|
|
4130
4140
|
function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
@@ -4144,26 +4154,26 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4144
4154
|
Z(() => {
|
|
4145
4155
|
f.current !== i && s && typeof s == "function" && (f.current = i, s(l.key, i));
|
|
4146
4156
|
}, [l.key, i, s]);
|
|
4147
|
-
const
|
|
4157
|
+
const y = (r) => {
|
|
4148
4158
|
if (!r.dependsOn) return !0;
|
|
4149
|
-
const { field: N, value: d, operator: p = "equals" } = r.dependsOn,
|
|
4159
|
+
const { field: N, value: d, operator: p = "equals" } = r.dependsOn, S = i[N];
|
|
4150
4160
|
switch (p) {
|
|
4151
4161
|
case "equals":
|
|
4152
|
-
return
|
|
4162
|
+
return S === d;
|
|
4153
4163
|
case "notEquals":
|
|
4154
|
-
return
|
|
4164
|
+
return S !== d;
|
|
4155
4165
|
case "contains":
|
|
4156
|
-
return Array.isArray(
|
|
4166
|
+
return Array.isArray(S) && S.includes(d);
|
|
4157
4167
|
case "notContains":
|
|
4158
|
-
return !Array.isArray(
|
|
4168
|
+
return !Array.isArray(S) || !S.includes(d);
|
|
4159
4169
|
case "greaterThan":
|
|
4160
|
-
return Number(
|
|
4170
|
+
return Number(S) > Number(d);
|
|
4161
4171
|
case "lessThan":
|
|
4162
|
-
return Number(
|
|
4172
|
+
return Number(S) < Number(d);
|
|
4163
4173
|
case "isEmpty":
|
|
4164
|
-
return
|
|
4174
|
+
return !S || Array.isArray(S) && S.length === 0;
|
|
4165
4175
|
case "isNotEmpty":
|
|
4166
|
-
return
|
|
4176
|
+
return S && (!Array.isArray(S) || S.length > 0);
|
|
4167
4177
|
default:
|
|
4168
4178
|
return !0;
|
|
4169
4179
|
}
|
|
@@ -4181,8 +4191,45 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4181
4191
|
}
|
|
4182
4192
|
),
|
|
4183
4193
|
/* @__PURE__ */ e("p", { style: { fontSize: "14px", marginBottom: "10px" }, children: l.description }),
|
|
4184
|
-
|
|
4185
|
-
/* @__PURE__ */ n(
|
|
4194
|
+
l.layout === "inline-checkboxes" ? /* @__PURE__ */ n("div", { style: { marginBottom: "20px" }, children: [
|
|
4195
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", flexWrap: "wrap", gap: "20px", alignItems: "center" }, children: l.fields.map((r, N) => y(r) && r.fieldtype === "checkbox" && /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
4196
|
+
/* @__PURE__ */ e(
|
|
4197
|
+
gt,
|
|
4198
|
+
{
|
|
4199
|
+
name: r.key,
|
|
4200
|
+
checked: !!(i[r.key] || r.default),
|
|
4201
|
+
onChange: (d) => {
|
|
4202
|
+
const p = d.target ? d.target.checked : d, S = { ...i, [r.key]: p };
|
|
4203
|
+
u(S), s && s(l.key, S);
|
|
4204
|
+
},
|
|
4205
|
+
label: r.label,
|
|
4206
|
+
disabled: r.disabled ? r.disabled : !1
|
|
4207
|
+
}
|
|
4208
|
+
),
|
|
4209
|
+
r.info && /* @__PURE__ */ e(
|
|
4210
|
+
"span",
|
|
4211
|
+
{
|
|
4212
|
+
style: {
|
|
4213
|
+
fontSize: "12px",
|
|
4214
|
+
color: "#666",
|
|
4215
|
+
marginLeft: "5px"
|
|
4216
|
+
},
|
|
4217
|
+
title: r.info,
|
|
4218
|
+
children: "ℹ️"
|
|
4219
|
+
}
|
|
4220
|
+
)
|
|
4221
|
+
] }, N)) }),
|
|
4222
|
+
l.fields.some(
|
|
4223
|
+
(r) => r.fieldtype === "checkbox" && o[l.key]?.[r.key]
|
|
4224
|
+
) && /* @__PURE__ */ e("div", { style: { marginTop: "10px" }, children: l.fields.map(
|
|
4225
|
+
(r, N) => r.fieldtype === "checkbox" && o[l.key]?.[r.key] && /* @__PURE__ */ n("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: [
|
|
4226
|
+
r.label,
|
|
4227
|
+
": ",
|
|
4228
|
+
o[l.key][r.key]
|
|
4229
|
+
] }, N)
|
|
4230
|
+
) })
|
|
4231
|
+
] }) : /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: l.fields.map((r, N) => y(r) && /* @__PURE__ */ n("div", { className: r.fullWidth ? "col-span-full" : "", style: { marginBottom: "10px" }, children: [
|
|
4232
|
+
r.fieldtype !== "checkbox" && /* @__PURE__ */ n(
|
|
4186
4233
|
"label",
|
|
4187
4234
|
{
|
|
4188
4235
|
style: {
|
|
@@ -4252,14 +4299,14 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4252
4299
|
max: r.max,
|
|
4253
4300
|
step: r.step,
|
|
4254
4301
|
onChange: (d) => {
|
|
4255
|
-
const p = d.target.value,
|
|
4256
|
-
u(
|
|
4302
|
+
const p = d.target.value, S = { ...i, [r.key]: p };
|
|
4303
|
+
u(S), s && s(l.key, S);
|
|
4257
4304
|
},
|
|
4258
4305
|
onBlur: (d) => {
|
|
4259
4306
|
const p = d.target.value;
|
|
4260
4307
|
if (p !== "" && p !== null && p !== void 0) {
|
|
4261
|
-
const
|
|
4262
|
-
isNaN(
|
|
4308
|
+
const S = Number(p);
|
|
4309
|
+
isNaN(S) || (r.min !== void 0 && S < r.min ? (d.target.setCustomValidity(`${r.label} must be at least ${r.min}`), d.target.reportValidity()) : r.max !== void 0 && S > r.max ? (d.target.setCustomValidity(`${r.label} must not exceed ${r.max}`), d.target.reportValidity()) : d.target.setCustomValidity(""));
|
|
4263
4310
|
}
|
|
4264
4311
|
},
|
|
4265
4312
|
required: r.required,
|
|
@@ -4279,13 +4326,13 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4279
4326
|
] }),
|
|
4280
4327
|
r.fieldtype === "checkbox" && /* @__PURE__ */ n("div", { children: [
|
|
4281
4328
|
/* @__PURE__ */ e(
|
|
4282
|
-
|
|
4329
|
+
gt,
|
|
4283
4330
|
{
|
|
4284
4331
|
name: r.key,
|
|
4285
4332
|
checked: !!(i[r.key] || r.default),
|
|
4286
4333
|
onChange: (d) => {
|
|
4287
|
-
const p = { ...i, [r.key]:
|
|
4288
|
-
u(
|
|
4334
|
+
const p = d.target ? d.target.checked : d, S = { ...i, [r.key]: p };
|
|
4335
|
+
u(S), s && s(l.key, S);
|
|
4289
4336
|
},
|
|
4290
4337
|
label: r.placeholder || r.label,
|
|
4291
4338
|
disabled: r.disabled ? r.disabled : !1,
|
|
@@ -4296,7 +4343,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4296
4343
|
] }),
|
|
4297
4344
|
r.fieldtype === "select" && /* @__PURE__ */ n("div", { children: [
|
|
4298
4345
|
/* @__PURE__ */ e(
|
|
4299
|
-
|
|
4346
|
+
yt,
|
|
4300
4347
|
{
|
|
4301
4348
|
name: r.key,
|
|
4302
4349
|
defaultValue: r.default,
|
|
@@ -4463,8 +4510,8 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4463
4510
|
value: d.value,
|
|
4464
4511
|
checked: i[r.key] === d.value,
|
|
4465
4512
|
onChange: (p) => {
|
|
4466
|
-
const
|
|
4467
|
-
u(
|
|
4513
|
+
const S = { ...i, [r.key]: p.target.value };
|
|
4514
|
+
u(S), s && s(l.key, S);
|
|
4468
4515
|
},
|
|
4469
4516
|
disabled: r.disabled
|
|
4470
4517
|
}
|
|
@@ -4581,8 +4628,8 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4581
4628
|
type: "file",
|
|
4582
4629
|
name: r.key,
|
|
4583
4630
|
onChange: (d) => {
|
|
4584
|
-
const p = d.target.files[0],
|
|
4585
|
-
u(
|
|
4631
|
+
const p = d.target.files[0], S = { ...i, [r.key]: p ? p.name : "" };
|
|
4632
|
+
u(S), s && s(l.key, S);
|
|
4586
4633
|
},
|
|
4587
4634
|
accept: r.accept,
|
|
4588
4635
|
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
@@ -4629,7 +4676,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4629
4676
|
console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
|
|
4630
4677
|
const [l, m] = L(t), [i, u] = L(null), [g, f] = L(null);
|
|
4631
4678
|
console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
|
|
4632
|
-
const [
|
|
4679
|
+
const [y, r] = L(() => {
|
|
4633
4680
|
const h = a && a[l.key] || [], w = h.length > 0 ? h : [{ id: 0 }];
|
|
4634
4681
|
return console.log(`[DataTableRenderer] ${l.key} - Initial data:`, w), w;
|
|
4635
4682
|
}), N = ge(a);
|
|
@@ -4640,19 +4687,19 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4640
4687
|
console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, w), r(w);
|
|
4641
4688
|
}
|
|
4642
4689
|
}, [a, l.key]);
|
|
4643
|
-
const d = ge(
|
|
4690
|
+
const d = ge(y), p = ge(null);
|
|
4644
4691
|
Z(() => {
|
|
4645
|
-
d.current !==
|
|
4646
|
-
s(l.key,
|
|
4692
|
+
d.current !== y && s && typeof s == "function" && (d.current = y, p.current && clearTimeout(p.current), p.current = setTimeout(() => {
|
|
4693
|
+
s(l.key, y);
|
|
4647
4694
|
}, 300));
|
|
4648
|
-
}, [l.key,
|
|
4695
|
+
}, [l.key, y, s]), Z(() => () => {
|
|
4649
4696
|
p.current && clearTimeout(p.current);
|
|
4650
4697
|
}, []);
|
|
4651
|
-
const
|
|
4698
|
+
const S = (h) => {
|
|
4652
4699
|
const w = (v, b) => {
|
|
4653
|
-
console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: v, value: b, type: typeof b }), r((
|
|
4654
|
-
const
|
|
4655
|
-
return
|
|
4700
|
+
console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: v, value: b, type: typeof b }), r((x) => {
|
|
4701
|
+
const $ = [...x];
|
|
4702
|
+
return $[v][h.key] = b, $;
|
|
4656
4703
|
});
|
|
4657
4704
|
}, T = (v) => o[l.key]?.[v]?.[h.key], k = (v) => {
|
|
4658
4705
|
const b = T(v);
|
|
@@ -4665,7 +4712,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4665
4712
|
J,
|
|
4666
4713
|
{
|
|
4667
4714
|
value: v[h.key] || "",
|
|
4668
|
-
onChange: (
|
|
4715
|
+
onChange: (x) => w(b, x.target.value),
|
|
4669
4716
|
placeholder: h.placeholder || `Enter ${h.label}`,
|
|
4670
4717
|
required: h.required,
|
|
4671
4718
|
className: `w-full ${T(b) ? "border-red-500" : ""}`
|
|
@@ -4679,7 +4726,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4679
4726
|
ba,
|
|
4680
4727
|
{
|
|
4681
4728
|
value: v[h.key] || "",
|
|
4682
|
-
onChange: (
|
|
4729
|
+
onChange: (x) => w(b, x.target.value),
|
|
4683
4730
|
placeholder: h.placeholder || `Enter ${h.label}`,
|
|
4684
4731
|
required: h.required,
|
|
4685
4732
|
className: `w-full ${T(b) ? "border-red-500" : ""}`,
|
|
@@ -4698,12 +4745,12 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4698
4745
|
min: h.min,
|
|
4699
4746
|
max: h.max,
|
|
4700
4747
|
step: h.step,
|
|
4701
|
-
onChange: (
|
|
4702
|
-
onBlur: (
|
|
4703
|
-
const
|
|
4704
|
-
if (
|
|
4705
|
-
const M = Number(
|
|
4706
|
-
isNaN(M) || (h.min !== void 0 && M < h.min ? (
|
|
4748
|
+
onChange: (x) => w(b, x.target.value),
|
|
4749
|
+
onBlur: (x) => {
|
|
4750
|
+
const $ = x.target.value;
|
|
4751
|
+
if ($ !== "" && $ !== null && $ !== void 0) {
|
|
4752
|
+
const M = Number($);
|
|
4753
|
+
isNaN(M) || (h.min !== void 0 && M < h.min ? (x.target.setCustomValidity(`${h.label} must be at least ${h.min}`), x.target.reportValidity()) : h.max !== void 0 && M > h.max ? (x.target.setCustomValidity(`${h.label} must not exceed ${h.max}`), x.target.reportValidity()) : x.target.setCustomValidity(""));
|
|
4707
4754
|
}
|
|
4708
4755
|
},
|
|
4709
4756
|
placeholder: h.placeholder || `Enter ${h.label}`,
|
|
@@ -4728,7 +4775,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4728
4775
|
{
|
|
4729
4776
|
type: "email",
|
|
4730
4777
|
value: v[h.key] || "",
|
|
4731
|
-
onChange: (
|
|
4778
|
+
onChange: (x) => w(b, x.target.value),
|
|
4732
4779
|
placeholder: h.placeholder || "Enter email address",
|
|
4733
4780
|
required: h.required,
|
|
4734
4781
|
className: `w-full ${T(b) ? "border-red-500" : ""}`
|
|
@@ -4743,7 +4790,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4743
4790
|
{
|
|
4744
4791
|
type: "url",
|
|
4745
4792
|
value: v[h.key] || "",
|
|
4746
|
-
onChange: (
|
|
4793
|
+
onChange: (x) => w(b, x.target.value),
|
|
4747
4794
|
placeholder: h.placeholder || "Enter URL",
|
|
4748
4795
|
required: h.required,
|
|
4749
4796
|
className: `w-full ${T(b) ? "border-red-500" : ""}`
|
|
@@ -4758,7 +4805,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4758
4805
|
{
|
|
4759
4806
|
type: "password",
|
|
4760
4807
|
value: v[h.key] || "",
|
|
4761
|
-
onChange: (
|
|
4808
|
+
onChange: (x) => w(b, x.target.value),
|
|
4762
4809
|
placeholder: h.placeholder || "Enter password",
|
|
4763
4810
|
required: h.required,
|
|
4764
4811
|
className: `w-full ${T(b) ? "border-red-500" : ""}`
|
|
@@ -4770,10 +4817,10 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4770
4817
|
case "dropdown":
|
|
4771
4818
|
return (v, b) => /* @__PURE__ */ n("div", { children: [
|
|
4772
4819
|
/* @__PURE__ */ e(
|
|
4773
|
-
|
|
4820
|
+
yt,
|
|
4774
4821
|
{
|
|
4775
4822
|
value: v[h.key] || "",
|
|
4776
|
-
onChange: (
|
|
4823
|
+
onChange: (x) => w(b, x),
|
|
4777
4824
|
options: h.options || [],
|
|
4778
4825
|
placeholder: h.placeholder || `Select ${h.label}`,
|
|
4779
4826
|
required: h.required,
|
|
@@ -4784,11 +4831,11 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4784
4831
|
] });
|
|
4785
4832
|
case "selectDynamic":
|
|
4786
4833
|
return (v, b) => {
|
|
4787
|
-
const
|
|
4834
|
+
const x = () => {
|
|
4788
4835
|
if (h.optionsFrom && a) {
|
|
4789
|
-
const { config:
|
|
4790
|
-
if (Array.isArray(
|
|
4791
|
-
return
|
|
4836
|
+
const { config: $, valueField: M, labelField: z } = h.optionsFrom, I = a[$] || [];
|
|
4837
|
+
if (Array.isArray(I))
|
|
4838
|
+
return I.map((F) => ({
|
|
4792
4839
|
id: F[M] || "",
|
|
4793
4840
|
value: F[M] || "",
|
|
4794
4841
|
label: F[z] || ""
|
|
@@ -4798,12 +4845,12 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4798
4845
|
};
|
|
4799
4846
|
return /* @__PURE__ */ n("div", { children: [
|
|
4800
4847
|
/* @__PURE__ */ e(
|
|
4801
|
-
|
|
4848
|
+
yt,
|
|
4802
4849
|
{
|
|
4803
4850
|
index: b,
|
|
4804
4851
|
value: v[h.key] || "",
|
|
4805
|
-
onChange: (
|
|
4806
|
-
options:
|
|
4852
|
+
onChange: ($) => w(b, $),
|
|
4853
|
+
options: x(),
|
|
4807
4854
|
placeholder: h.placeholder || `Select ${h.label}`,
|
|
4808
4855
|
required: h.required,
|
|
4809
4856
|
className: `w-full ${T(b) ? "border-red-500" : ""}`
|
|
@@ -4815,12 +4862,12 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4815
4862
|
};
|
|
4816
4863
|
case "multiselect":
|
|
4817
4864
|
return (v, b) => {
|
|
4818
|
-
const
|
|
4865
|
+
const x = v[h.key] || [];
|
|
4819
4866
|
return /* @__PURE__ */ e(
|
|
4820
4867
|
at,
|
|
4821
4868
|
{
|
|
4822
|
-
selectedItems:
|
|
4823
|
-
onSelectionChange: (
|
|
4869
|
+
selectedItems: x,
|
|
4870
|
+
onSelectionChange: ($) => w(b, $),
|
|
4824
4871
|
options: h.options || [],
|
|
4825
4872
|
placeholder: h.placeholder || `Select ${h.label}`,
|
|
4826
4873
|
className: "w-full"
|
|
@@ -4830,10 +4877,10 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4830
4877
|
case "checkbox":
|
|
4831
4878
|
case "boolean":
|
|
4832
4879
|
return (v, b) => /* @__PURE__ */ e(
|
|
4833
|
-
|
|
4880
|
+
gt,
|
|
4834
4881
|
{
|
|
4835
4882
|
checked: !!v[h.key],
|
|
4836
|
-
onChange: (
|
|
4883
|
+
onChange: (x) => w(b, x),
|
|
4837
4884
|
label: h.placeholder || h.label,
|
|
4838
4885
|
className: "w-full"
|
|
4839
4886
|
}
|
|
@@ -4844,7 +4891,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4844
4891
|
fa,
|
|
4845
4892
|
{
|
|
4846
4893
|
isOn: !!v[h.key],
|
|
4847
|
-
onToggle: (
|
|
4894
|
+
onToggle: (x) => w(b, x),
|
|
4848
4895
|
label: h.placeholder || h.label,
|
|
4849
4896
|
className: "w-full"
|
|
4850
4897
|
}
|
|
@@ -4854,7 +4901,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4854
4901
|
ua,
|
|
4855
4902
|
{
|
|
4856
4903
|
selectedDate: v[h.key] ? new Date(v[h.key]) : null,
|
|
4857
|
-
onDateChange: (
|
|
4904
|
+
onDateChange: (x) => w(b, x ? x.toISOString().split("T")[0] : ""),
|
|
4858
4905
|
placeholder: h.placeholder || "Select date",
|
|
4859
4906
|
className: "w-full"
|
|
4860
4907
|
}
|
|
@@ -4865,7 +4912,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4865
4912
|
{
|
|
4866
4913
|
type: "datetime-local",
|
|
4867
4914
|
value: v[h.key] || "",
|
|
4868
|
-
onChange: (
|
|
4915
|
+
onChange: (x) => w(b, x.target.value),
|
|
4869
4916
|
placeholder: h.placeholder || "Select date and time",
|
|
4870
4917
|
required: h.required,
|
|
4871
4918
|
className: "w-full"
|
|
@@ -4877,7 +4924,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4877
4924
|
{
|
|
4878
4925
|
type: "time",
|
|
4879
4926
|
value: v[h.key] || "",
|
|
4880
|
-
onChange: (
|
|
4927
|
+
onChange: (x) => w(b, x.target.value),
|
|
4881
4928
|
placeholder: h.placeholder || "Select time",
|
|
4882
4929
|
required: h.required,
|
|
4883
4930
|
className: "w-full"
|
|
@@ -4888,7 +4935,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4888
4935
|
ha,
|
|
4889
4936
|
{
|
|
4890
4937
|
selectedValue: v[h.key] || "",
|
|
4891
|
-
onValueChange: (
|
|
4938
|
+
onValueChange: (x) => w(b, x),
|
|
4892
4939
|
options: h.options || [],
|
|
4893
4940
|
className: "w-full"
|
|
4894
4941
|
}
|
|
@@ -4898,20 +4945,20 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4898
4945
|
he,
|
|
4899
4946
|
{
|
|
4900
4947
|
value: v[h.key] || "",
|
|
4901
|
-
onChange: (
|
|
4948
|
+
onChange: (x) => w(b, x),
|
|
4902
4949
|
placeholder: h.placeholder || `Search ${h.label}`,
|
|
4903
4950
|
className: "w-full"
|
|
4904
4951
|
}
|
|
4905
4952
|
);
|
|
4906
4953
|
case "audience":
|
|
4907
4954
|
return (v, b) => {
|
|
4908
|
-
const
|
|
4909
|
-
...
|
|
4910
|
-
...
|
|
4911
|
-
...
|
|
4955
|
+
const x = v[h.key] || { users: [], groups: [], roles: [] }, $ = [
|
|
4956
|
+
...x.users || [],
|
|
4957
|
+
...x.groups || [],
|
|
4958
|
+
...x.roles || []
|
|
4912
4959
|
];
|
|
4913
4960
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
4914
|
-
/* @__PURE__ */ e(xs, { children:
|
|
4961
|
+
/* @__PURE__ */ e(xs, { children: $.length > 0 ? $.slice(0, 3).map((M, z) => /* @__PURE__ */ e(
|
|
4915
4962
|
Ce,
|
|
4916
4963
|
{
|
|
4917
4964
|
size: "small",
|
|
@@ -4927,7 +4974,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4927
4974
|
onClick: () => {
|
|
4928
4975
|
f(h.key), u(b);
|
|
4929
4976
|
},
|
|
4930
|
-
children:
|
|
4977
|
+
children: $.length > 0 ? "Edit" : "Assign"
|
|
4931
4978
|
}
|
|
4932
4979
|
)
|
|
4933
4980
|
] });
|
|
@@ -4938,7 +4985,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4938
4985
|
{
|
|
4939
4986
|
type: "color",
|
|
4940
4987
|
value: v[h.key] || "#000000",
|
|
4941
|
-
onChange: (
|
|
4988
|
+
onChange: (x) => w(b, x.target.value),
|
|
4942
4989
|
className: "w-full h-10"
|
|
4943
4990
|
}
|
|
4944
4991
|
);
|
|
@@ -4949,7 +4996,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4949
4996
|
{
|
|
4950
4997
|
type: "range",
|
|
4951
4998
|
value: v[h.key] || h.min || 0,
|
|
4952
|
-
onChange: (
|
|
4999
|
+
onChange: (x) => w(b, x.target.value),
|
|
4953
5000
|
min: h.min || 0,
|
|
4954
5001
|
max: h.max || 100,
|
|
4955
5002
|
step: h.step || 1,
|
|
@@ -4963,9 +5010,9 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4963
5010
|
J,
|
|
4964
5011
|
{
|
|
4965
5012
|
type: "file",
|
|
4966
|
-
onChange: (
|
|
4967
|
-
const
|
|
4968
|
-
w(b,
|
|
5013
|
+
onChange: (x) => {
|
|
5014
|
+
const $ = x.target.files[0];
|
|
5015
|
+
w(b, $ ? $.name : "");
|
|
4969
5016
|
},
|
|
4970
5017
|
accept: h.accept,
|
|
4971
5018
|
className: "w-full"
|
|
@@ -4977,7 +5024,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4977
5024
|
{
|
|
4978
5025
|
type: "hidden",
|
|
4979
5026
|
value: v[h.key] || "",
|
|
4980
|
-
onChange: (
|
|
5027
|
+
onChange: (x) => w(b, x.target.value)
|
|
4981
5028
|
}
|
|
4982
5029
|
);
|
|
4983
5030
|
// Default fallback for unknown field types
|
|
@@ -4987,7 +5034,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4987
5034
|
J,
|
|
4988
5035
|
{
|
|
4989
5036
|
value: v[h.key] || "",
|
|
4990
|
-
onChange: (
|
|
5037
|
+
onChange: (x) => w(b, x.target.value),
|
|
4991
5038
|
placeholder: h.placeholder || `Enter ${h.label}`,
|
|
4992
5039
|
required: h.required,
|
|
4993
5040
|
className: `w-full ${T(b) ? "border-red-500" : ""}`
|
|
@@ -5031,11 +5078,11 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
5031
5078
|
console.log("[DataTableRenderer] handleAddAudience called with:", h), r((w) => {
|
|
5032
5079
|
const T = [...w];
|
|
5033
5080
|
if (i !== null && g && T[i]) {
|
|
5034
|
-
const k = h.pendingInvites || [], v = k.filter((
|
|
5081
|
+
const k = h.pendingInvites || [], v = k.filter(($) => $.type === "User"), b = k.filter(($) => $.type === "Group"), x = k.filter(($) => $.type === "Role");
|
|
5035
5082
|
T[i][g] = {
|
|
5036
5083
|
users: [...T[i][g]?.users || [], ...v],
|
|
5037
5084
|
groups: [...T[i][g]?.groups || [], ...b],
|
|
5038
|
-
roles: [...T[i][g]?.roles || [], ...
|
|
5085
|
+
roles: [...T[i][g]?.roles || [], ...x]
|
|
5039
5086
|
}, console.log("[DataTableRenderer] Updated audience data:", T[i][g]);
|
|
5040
5087
|
}
|
|
5041
5088
|
return T;
|
|
@@ -5069,7 +5116,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
5069
5116
|
)),
|
|
5070
5117
|
/* @__PURE__ */ e("th", { className: "px-4 py-2 w-16" })
|
|
5071
5118
|
] }) }),
|
|
5072
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
5119
|
+
/* @__PURE__ */ e("tbody", { children: y.map((h, w) => /* @__PURE__ */ n(
|
|
5073
5120
|
"tr",
|
|
5074
5121
|
{
|
|
5075
5122
|
className: `hover:bg-gray-50 ${R === w ? "opacity-50" : ""}`,
|
|
@@ -5079,8 +5126,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
5079
5126
|
onDrop: (T) => Y(T, w),
|
|
5080
5127
|
onDragEnd: G,
|
|
5081
5128
|
children: [
|
|
5082
|
-
/* @__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(
|
|
5083
|
-
l.fields.map((T, k) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children:
|
|
5129
|
+
/* @__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(wt, { size: 16 }) }) }),
|
|
5130
|
+
l.fields.map((T, k) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: S(T)(h, w) }, k)),
|
|
5084
5131
|
/* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
|
|
5085
5132
|
"button",
|
|
5086
5133
|
{
|
|
@@ -5096,12 +5143,12 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
5096
5143
|
)) })
|
|
5097
5144
|
] }) }),
|
|
5098
5145
|
i !== null && (() => {
|
|
5099
|
-
const h =
|
|
5100
|
-
users:
|
|
5101
|
-
groups:
|
|
5102
|
-
roles:
|
|
5146
|
+
const h = y[i] && y[i][g] ? {
|
|
5147
|
+
users: y[i][g].users || [],
|
|
5148
|
+
groups: y[i][g].groups || [],
|
|
5149
|
+
roles: y[i][g].roles || []
|
|
5103
5150
|
} : { users: [], groups: [], roles: [] };
|
|
5104
|
-
return console.log("[DataTableRenderer] Opening modal with existing data:", h), console.log("[DataTableRenderer] Row data:",
|
|
5151
|
+
return console.log("[DataTableRenderer] Opening modal with existing data:", h), console.log("[DataTableRenderer] Row data:", y[i]), console.log("[DataTableRenderer] Field name:", g), /* @__PURE__ */ e(
|
|
5105
5152
|
os,
|
|
5106
5153
|
{
|
|
5107
5154
|
isOpen: !0,
|
|
@@ -5116,7 +5163,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
5116
5163
|
})()
|
|
5117
5164
|
] });
|
|
5118
5165
|
}
|
|
5119
|
-
const
|
|
5166
|
+
const Ie = {
|
|
5120
5167
|
containerId: "ui-toast",
|
|
5121
5168
|
position: "bottom-right",
|
|
5122
5169
|
autoClose: 3500,
|
|
@@ -5125,22 +5172,22 @@ const Pe = {
|
|
|
5125
5172
|
closeOnClick: !0
|
|
5126
5173
|
};
|
|
5127
5174
|
let Je = 0;
|
|
5128
|
-
const
|
|
5175
|
+
const Lt = () => {
|
|
5129
5176
|
typeof document > "u" || (Je += 1, document.body.classList.add("toast-backdrop"));
|
|
5130
|
-
},
|
|
5177
|
+
}, Bt = () => {
|
|
5131
5178
|
typeof document > "u" || (Je = Math.max(0, Je - 1), Je === 0 && document.body.classList.remove("toast-backdrop"));
|
|
5132
|
-
},
|
|
5133
|
-
success: (t, a) => Se.success(t, { ...
|
|
5134
|
-
info: (t, a) => Se.info(t, { ...
|
|
5135
|
-
warn: (t, a) => Se.warn(t, { ...
|
|
5179
|
+
}, Pe = {
|
|
5180
|
+
success: (t, a) => Se.success(t, { ...Ie, ...a }),
|
|
5181
|
+
info: (t, a) => Se.info(t, { ...Ie, ...a }),
|
|
5182
|
+
warn: (t, a) => Se.warn(t, { ...Ie, ...a }),
|
|
5136
5183
|
// Error: no autoClose + modal-like behavior via backdrop
|
|
5137
5184
|
error: (t, a) => Se.error(t, {
|
|
5138
|
-
...
|
|
5185
|
+
...Ie,
|
|
5139
5186
|
autoClose: !1,
|
|
5140
5187
|
closeOnClick: !1,
|
|
5141
5188
|
draggable: !1,
|
|
5142
|
-
onOpen:
|
|
5143
|
-
onClose:
|
|
5189
|
+
onOpen: Lt,
|
|
5190
|
+
onClose: Bt,
|
|
5144
5191
|
...a
|
|
5145
5192
|
}),
|
|
5146
5193
|
// Promise helper (error branch inherits the modal behavior)
|
|
@@ -5154,11 +5201,11 @@ const Mt = () => {
|
|
|
5154
5201
|
autoClose: !1,
|
|
5155
5202
|
closeOnClick: !1,
|
|
5156
5203
|
draggable: !1,
|
|
5157
|
-
onOpen:
|
|
5158
|
-
onClose:
|
|
5204
|
+
onOpen: Lt,
|
|
5205
|
+
onClose: Bt
|
|
5159
5206
|
}
|
|
5160
5207
|
},
|
|
5161
|
-
{ ...
|
|
5208
|
+
{ ...Ie, ...s }
|
|
5162
5209
|
)
|
|
5163
5210
|
}, ct = (t) => {
|
|
5164
5211
|
try {
|
|
@@ -5182,15 +5229,15 @@ const Mt = () => {
|
|
|
5182
5229
|
initialData: g = null
|
|
5183
5230
|
// Add prop for initial demo data
|
|
5184
5231
|
}) => {
|
|
5185
|
-
const [f,
|
|
5232
|
+
const [f, y] = L(null), [r, N] = L(""), [d, p] = L(() => Array.isArray(g) ? g : []), [S, A] = L(null), [E, R] = L(null), [O, V] = L(""), U = async () => {
|
|
5186
5233
|
try {
|
|
5187
5234
|
const z = await Ve(t.collectionList);
|
|
5188
5235
|
if (z) {
|
|
5189
|
-
const
|
|
5236
|
+
const I = z.map((F, D) => ({
|
|
5190
5237
|
...F,
|
|
5191
|
-
order: typeof F.order == "number" ? F.order :
|
|
5238
|
+
order: typeof F.order == "number" ? F.order : D + 1
|
|
5192
5239
|
}));
|
|
5193
|
-
|
|
5240
|
+
I.sort((F, D) => (F.order ?? 0) - (D.order ?? 0)), p(I), s?.(I);
|
|
5194
5241
|
}
|
|
5195
5242
|
} catch (z) {
|
|
5196
5243
|
console.log("Error loading collections:", z), typeof window < "u" && !window.location.pathname.includes("iframe.html") && Se.error("Failed to load collections");
|
|
@@ -5202,29 +5249,29 @@ const Mt = () => {
|
|
|
5202
5249
|
Array.isArray(g) && p(g);
|
|
5203
5250
|
}, [g]);
|
|
5204
5251
|
const Y = (z) => {
|
|
5205
|
-
m && (
|
|
5252
|
+
m && (y(z.id), N(z.categoryName || ""));
|
|
5206
5253
|
}, G = () => {
|
|
5207
5254
|
if (!l || f !== null) return;
|
|
5208
5255
|
const z = `temp-${Date.now()}`;
|
|
5209
|
-
p((
|
|
5210
|
-
...
|
|
5256
|
+
p((I) => [
|
|
5257
|
+
...I,
|
|
5211
5258
|
{
|
|
5212
5259
|
id: z,
|
|
5213
5260
|
categoryName: "",
|
|
5214
5261
|
links: [],
|
|
5215
|
-
order: (
|
|
5262
|
+
order: (I.at(-1)?.order ?? 0) + 1,
|
|
5216
5263
|
_temp: !0
|
|
5217
5264
|
}
|
|
5218
|
-
]),
|
|
5265
|
+
]), y(z), N("");
|
|
5219
5266
|
}, C = () => {
|
|
5220
5267
|
f != null && (p((z) => {
|
|
5221
|
-
const
|
|
5268
|
+
const I = z.find((D) => D.id === f), F = I && I._temp ? z.filter((D) => D.id !== f) : z;
|
|
5222
5269
|
return s?.(F), F;
|
|
5223
|
-
}),
|
|
5270
|
+
}), y(null), N(""));
|
|
5224
5271
|
}, h = () => {
|
|
5225
5272
|
if (f == null || !r.trim()) return;
|
|
5226
5273
|
if (typeof f == "string" && f.startsWith("temp-")) {
|
|
5227
|
-
const
|
|
5274
|
+
const I = {
|
|
5228
5275
|
id: f,
|
|
5229
5276
|
categoryName: r.trim(),
|
|
5230
5277
|
links: [],
|
|
@@ -5235,44 +5282,44 @@ const Mt = () => {
|
|
|
5235
5282
|
// Flag to indicate this is a draft change
|
|
5236
5283
|
};
|
|
5237
5284
|
p((F) => {
|
|
5238
|
-
const
|
|
5239
|
-
return s?.(
|
|
5285
|
+
const D = F.map((B) => B.id === f ? I : B);
|
|
5286
|
+
return s?.(D), D;
|
|
5240
5287
|
});
|
|
5241
5288
|
} else
|
|
5242
|
-
p((
|
|
5243
|
-
const F =
|
|
5244
|
-
(
|
|
5289
|
+
p((I) => {
|
|
5290
|
+
const F = I.map(
|
|
5291
|
+
(D) => D.id === f ? { ...D, categoryName: r.trim(), _isDraft: !0 } : D
|
|
5245
5292
|
);
|
|
5246
5293
|
return s?.(F), F;
|
|
5247
5294
|
});
|
|
5248
|
-
|
|
5295
|
+
y(null), N("");
|
|
5249
5296
|
}, w = (z) => {
|
|
5250
|
-
i && p((
|
|
5251
|
-
const F =
|
|
5297
|
+
i && p((I) => {
|
|
5298
|
+
const F = I.filter((D) => D.id !== z.id);
|
|
5252
5299
|
return s?.(F), F;
|
|
5253
5300
|
});
|
|
5254
|
-
}, T = (z,
|
|
5255
|
-
if (!u || !
|
|
5256
|
-
const
|
|
5257
|
-
if (
|
|
5258
|
-
const _ = [...z], [
|
|
5259
|
-
return _.splice(B, 0,
|
|
5260
|
-
}, k = (z,
|
|
5261
|
-
u && (z.dataTransfer.effectAllowed = "move", z.dataTransfer.setData("text/plain", String(
|
|
5301
|
+
}, T = (z, I, F) => {
|
|
5302
|
+
if (!u || !I || !F || I === F) return z;
|
|
5303
|
+
const D = z.findIndex((q) => q.id === I), B = z.findIndex((q) => q.id === F);
|
|
5304
|
+
if (D === -1 || B === -1) return z;
|
|
5305
|
+
const _ = [...z], [P] = _.splice(D, 1);
|
|
5306
|
+
return _.splice(B, 0, P), _.map((q, X) => ({ ...q, order: X + 1 }));
|
|
5307
|
+
}, k = (z, I) => {
|
|
5308
|
+
u && (z.dataTransfer.effectAllowed = "move", z.dataTransfer.setData("text/plain", String(I)), A(I));
|
|
5262
5309
|
}, v = (z) => {
|
|
5263
|
-
|
|
5310
|
+
S && z !== E && R(z);
|
|
5264
5311
|
}, b = (z) => {
|
|
5265
5312
|
z.preventDefault();
|
|
5266
|
-
},
|
|
5313
|
+
}, x = (z, I) => {
|
|
5267
5314
|
z.preventDefault();
|
|
5268
5315
|
const F = z.dataTransfer.getData("text/plain");
|
|
5269
|
-
F && (p((
|
|
5270
|
-
const B = T(
|
|
5316
|
+
F && (p((D) => {
|
|
5317
|
+
const B = T(D, F, I);
|
|
5271
5318
|
console.log("Reordered", B);
|
|
5272
|
-
const _ = B.map((
|
|
5319
|
+
const _ = B.map((P) => ({ ...P, _isDraft: !0 }));
|
|
5273
5320
|
return s?.(_), _;
|
|
5274
5321
|
}), A(null), R(null));
|
|
5275
|
-
},
|
|
5322
|
+
}, $ = () => {
|
|
5276
5323
|
A(null), R(null);
|
|
5277
5324
|
}, M = Array.isArray(d) ? d.filter(
|
|
5278
5325
|
(z) => z.categoryName?.toLowerCase().includes(O.toLowerCase())
|
|
@@ -5302,21 +5349,21 @@ const Mt = () => {
|
|
|
5302
5349
|
)
|
|
5303
5350
|
] }) }),
|
|
5304
5351
|
/* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: M.map((z) => {
|
|
5305
|
-
const
|
|
5352
|
+
const I = f === z.id, F = z?.links?.length ?? 0, D = S === z.id, B = E === z.id && S !== z.id;
|
|
5306
5353
|
return /* @__PURE__ */ e(
|
|
5307
5354
|
"div",
|
|
5308
5355
|
{
|
|
5309
5356
|
onDragEnter: () => v(z.id),
|
|
5310
5357
|
onDragOver: b,
|
|
5311
|
-
onDrop: (_) =>
|
|
5312
|
-
onDragEnd:
|
|
5358
|
+
onDrop: (_) => x(_, z.id),
|
|
5359
|
+
onDragEnd: $,
|
|
5313
5360
|
className: [
|
|
5314
5361
|
"flex items-center justify-between p-3 border rounded-2xl mb-3",
|
|
5315
5362
|
"border-gray-300",
|
|
5316
5363
|
B ? "ring-2 ring-gray-800/20" : "",
|
|
5317
|
-
|
|
5364
|
+
D ? "opacity-60" : ""
|
|
5318
5365
|
].join(" "),
|
|
5319
|
-
children:
|
|
5366
|
+
children: I ? /* @__PURE__ */ n(te, { children: [
|
|
5320
5367
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 flex-1", children: /* @__PURE__ */ e(
|
|
5321
5368
|
"input",
|
|
5322
5369
|
{
|
|
@@ -5366,7 +5413,7 @@ const Mt = () => {
|
|
|
5366
5413
|
className: "cursor-grab active:cursor-grabbing p-1 -m-1 rounded-md hover:bg-gray-50",
|
|
5367
5414
|
draggable: !0,
|
|
5368
5415
|
onDragStart: (_) => k(_, z.id),
|
|
5369
|
-
children: /* @__PURE__ */ e(
|
|
5416
|
+
children: /* @__PURE__ */ e(wt, {})
|
|
5370
5417
|
}
|
|
5371
5418
|
),
|
|
5372
5419
|
/* @__PURE__ */ e("span", { children: z.categoryName })
|
|
@@ -5388,7 +5435,7 @@ const Mt = () => {
|
|
|
5388
5435
|
className: F === 0 && !z.protected ? "cursor-pointer" : "cursor-not-allowed",
|
|
5389
5436
|
title: F === 0 && !z.protected ? "Delete" : "Cannot delete this collection",
|
|
5390
5437
|
onClick: F === 0 ? () => w(z) : null,
|
|
5391
|
-
children: /* @__PURE__ */ e(
|
|
5438
|
+
children: /* @__PURE__ */ e(Qe, { color: F === 0 ? "#767676" : "#C2C2C2" })
|
|
5392
5439
|
}
|
|
5393
5440
|
)
|
|
5394
5441
|
] })
|
|
@@ -5407,7 +5454,7 @@ const Mt = () => {
|
|
|
5407
5454
|
showSearch: u = !0,
|
|
5408
5455
|
allowAdd: g = !0,
|
|
5409
5456
|
allowEdit: f = !0,
|
|
5410
|
-
allowDelete:
|
|
5457
|
+
allowDelete: y = !0,
|
|
5411
5458
|
allowReorder: r = !0,
|
|
5412
5459
|
className: N = ""
|
|
5413
5460
|
} = t, d = a?.[t.key] || i || [], p = Array.isArray(d) ? d : [];
|
|
@@ -5428,7 +5475,7 @@ const Mt = () => {
|
|
|
5428
5475
|
showSearch: u,
|
|
5429
5476
|
allowAdd: g,
|
|
5430
5477
|
allowEdit: f,
|
|
5431
|
-
allowDelete:
|
|
5478
|
+
allowDelete: y,
|
|
5432
5479
|
allowReorder: r
|
|
5433
5480
|
}
|
|
5434
5481
|
)
|
|
@@ -5456,34 +5503,34 @@ function zs({
|
|
|
5456
5503
|
onCancel: o,
|
|
5457
5504
|
onSave: l
|
|
5458
5505
|
}) {
|
|
5459
|
-
const [m, i] = se.useState(a), [u, g] = se.useState(null), [f,
|
|
5506
|
+
const [m, i] = se.useState(a), [u, g] = se.useState(null), [f, y] = L(!1), [r, N] = L(!1), [d, p] = L({}), S = `${ze()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, A = S, [E, R] = L(1), O = (k) => {
|
|
5460
5507
|
if (!a || !a.configuration)
|
|
5461
5508
|
return k;
|
|
5462
5509
|
const v = {}, b = k?.configuration || {};
|
|
5463
|
-
return a.configuration.forEach((
|
|
5464
|
-
if (
|
|
5465
|
-
const M = (b[
|
|
5510
|
+
return a.configuration.forEach((x) => {
|
|
5511
|
+
if (x.key && x.type === "datatable") {
|
|
5512
|
+
const M = (b[x.key] || []).map((z, I) => {
|
|
5466
5513
|
const F = { id: z.id || 0 };
|
|
5467
|
-
return
|
|
5468
|
-
if (
|
|
5514
|
+
return x.fields && x.fields.forEach((D) => {
|
|
5515
|
+
if (D.fieldtype === "audience") {
|
|
5469
5516
|
let B = { users: [], groups: [], roles: [] };
|
|
5470
|
-
z[
|
|
5471
|
-
users: z[
|
|
5472
|
-
groups: z[
|
|
5473
|
-
roles: z[
|
|
5474
|
-
})), F[
|
|
5517
|
+
z[D.key] && (Array.isArray(z[D.key]) ? B = { users: [], groups: [], roles: [] } : typeof z[D.key] == "object" && (B = {
|
|
5518
|
+
users: z[D.key].users || [],
|
|
5519
|
+
groups: z[D.key].groups || [],
|
|
5520
|
+
roles: z[D.key].roles || []
|
|
5521
|
+
})), F[D.key] = B;
|
|
5475
5522
|
} else
|
|
5476
|
-
F[
|
|
5523
|
+
F[D.key] = z[D.key] || D.default || "";
|
|
5477
5524
|
}), F;
|
|
5478
5525
|
});
|
|
5479
5526
|
if (M.length === 0) {
|
|
5480
5527
|
const z = { id: 0 };
|
|
5481
|
-
|
|
5482
|
-
|
|
5528
|
+
x.fields && x.fields.forEach((I) => {
|
|
5529
|
+
I.fieldtype === "audience" ? z[I.key] = { users: [], groups: [], roles: [] } : z[I.key] = I.default || "";
|
|
5483
5530
|
}), M.push(z);
|
|
5484
5531
|
}
|
|
5485
|
-
v[
|
|
5486
|
-
} else
|
|
5532
|
+
v[x.key] = M;
|
|
5533
|
+
} else x.key && (v[x.key] = b[x.key] || {});
|
|
5487
5534
|
}), v;
|
|
5488
5535
|
}, V = () => {
|
|
5489
5536
|
if (a && a.configuration) {
|
|
@@ -5492,13 +5539,13 @@ function zs({
|
|
|
5492
5539
|
if (v.key)
|
|
5493
5540
|
if (v.type === "datatable") {
|
|
5494
5541
|
const b = { id: 0 };
|
|
5495
|
-
v.fields && v.fields.forEach((
|
|
5496
|
-
|
|
5542
|
+
v.fields && v.fields.forEach((x) => {
|
|
5543
|
+
x.fieldtype === "audience" ? b[x.key] = { users: [], groups: [], roles: [] } : b[x.key] = x.default || "";
|
|
5497
5544
|
}), k[v.key] = [b];
|
|
5498
5545
|
} else if (v.type === "section") {
|
|
5499
5546
|
const b = {};
|
|
5500
|
-
v.fields && Array.isArray(v.fields) && v.fields.forEach((
|
|
5501
|
-
|
|
5547
|
+
v.fields && Array.isArray(v.fields) && v.fields.forEach((x) => {
|
|
5548
|
+
x.key && (b[x.key] = x.default || "");
|
|
5502
5549
|
}), k[v.key] = b;
|
|
5503
5550
|
} else
|
|
5504
5551
|
k[v.key] = {};
|
|
@@ -5507,13 +5554,13 @@ function zs({
|
|
|
5507
5554
|
};
|
|
5508
5555
|
Z(() => {
|
|
5509
5556
|
if (s) {
|
|
5510
|
-
|
|
5557
|
+
y(!1);
|
|
5511
5558
|
return;
|
|
5512
5559
|
}
|
|
5513
5560
|
const k = async () => {
|
|
5514
5561
|
try {
|
|
5515
|
-
|
|
5516
|
-
let v = await Ve(
|
|
5562
|
+
y(!0);
|
|
5563
|
+
let v = await Ve(S);
|
|
5517
5564
|
if (v) {
|
|
5518
5565
|
const b = O(v);
|
|
5519
5566
|
g(b);
|
|
@@ -5523,12 +5570,12 @@ function zs({
|
|
|
5523
5570
|
console.error("Error fetching configuration:", v);
|
|
5524
5571
|
let b = "Failed to load configuration";
|
|
5525
5572
|
if (v.response) {
|
|
5526
|
-
const
|
|
5527
|
-
|
|
5573
|
+
const x = v.response.status, $ = v.response.data?.message || v.response.data?.error;
|
|
5574
|
+
x === 400 ? b = $ || "Invalid request. Please check the application ID." : x === 401 ? b = "You are not authorized to access this configuration." : x === 403 ? b = "Access denied. You don't have permission to view this configuration." : x === 404 ? b = "Configuration not found. It may not exist yet or the application ID is incorrect." : x >= 500 ? b = $ || "Server error. Please try again later." : b = $ || `Failed to load configuration (Error ${x})`;
|
|
5528
5575
|
} else v.request ? b = "Network error. Please check your connection and try again." : b = v.message || "An unexpected error occurred while loading configuration.";
|
|
5529
|
-
|
|
5576
|
+
Pe.error(b), V();
|
|
5530
5577
|
} finally {
|
|
5531
|
-
|
|
5578
|
+
y(!1);
|
|
5532
5579
|
}
|
|
5533
5580
|
};
|
|
5534
5581
|
a && (i(a), t ? k() : V());
|
|
@@ -5538,36 +5585,36 @@ function zs({
|
|
|
5538
5585
|
...b,
|
|
5539
5586
|
[k]: v
|
|
5540
5587
|
})), p((b) => {
|
|
5541
|
-
const
|
|
5542
|
-
return
|
|
5588
|
+
const x = { ...b };
|
|
5589
|
+
return x[k] && delete x[k], x;
|
|
5543
5590
|
});
|
|
5544
5591
|
}, Y = () => {
|
|
5545
5592
|
const k = {};
|
|
5546
5593
|
return !m || !u || m.configuration.forEach((v) => {
|
|
5547
5594
|
if (v.type === "section")
|
|
5548
5595
|
v.fields.forEach((b) => {
|
|
5549
|
-
const
|
|
5550
|
-
if (b.required && (!
|
|
5596
|
+
const x = u[v.key]?.[b.key];
|
|
5597
|
+
if (b.required && (!x || typeof x == "string" && x.trim() === "")) {
|
|
5551
5598
|
k[v.key] || (k[v.key] = {}), k[v.key][b.key] = `${b.label} is required`;
|
|
5552
5599
|
return;
|
|
5553
5600
|
}
|
|
5554
|
-
if (b.fieldtype === "number" &&
|
|
5555
|
-
const
|
|
5556
|
-
isNaN(
|
|
5601
|
+
if (b.fieldtype === "number" && x !== "" && x !== null && x !== void 0) {
|
|
5602
|
+
const $ = Number(x);
|
|
5603
|
+
isNaN($) ? (k[v.key] || (k[v.key] = {}), k[v.key][b.key] = `${b.label} must be a valid number`) : (b.min !== void 0 && $ < b.min && (k[v.key] || (k[v.key] = {}), k[v.key][b.key] = `${b.label} must be at least ${b.min}`), b.max !== void 0 && $ > b.max && (k[v.key] || (k[v.key] = {}), k[v.key][b.key] = `${b.label} must not exceed ${b.max}`));
|
|
5557
5604
|
}
|
|
5558
5605
|
});
|
|
5559
5606
|
else if (v.type === "datatable") {
|
|
5560
5607
|
const b = u[v.key];
|
|
5561
|
-
Array.isArray(b) && b.forEach((
|
|
5608
|
+
Array.isArray(b) && b.forEach((x, $) => {
|
|
5562
5609
|
v.fields.forEach((M) => {
|
|
5563
|
-
const z =
|
|
5610
|
+
const z = x[M.key];
|
|
5564
5611
|
if (M.required && (!z || typeof z == "string" && z.trim() === "")) {
|
|
5565
|
-
k[v.key] || (k[v.key] = {}), k[v.key][
|
|
5612
|
+
k[v.key] || (k[v.key] = {}), k[v.key][$] || (k[v.key][$] = {}), k[v.key][$][M.key] = `${M.label} is required`;
|
|
5566
5613
|
return;
|
|
5567
5614
|
}
|
|
5568
5615
|
if (M.fieldtype === "number" && z !== "" && z !== null && z !== void 0) {
|
|
5569
|
-
const
|
|
5570
|
-
isNaN(
|
|
5616
|
+
const I = Number(z);
|
|
5617
|
+
isNaN(I) ? (k[v.key] || (k[v.key] = {}), k[v.key][$] || (k[v.key][$] = {}), k[v.key][$][M.key] = `${M.label} must be a valid number`) : (M.min !== void 0 && I < M.min && (k[v.key] || (k[v.key] = {}), k[v.key][$] || (k[v.key][$] = {}), k[v.key][$][M.key] = `${M.label} must be at least ${M.min}`), M.max !== void 0 && I > M.max && (k[v.key] || (k[v.key] = {}), k[v.key][$] || (k[v.key][$] = {}), k[v.key][$][M.key] = `${M.label} must not exceed ${M.max}`));
|
|
5571
5618
|
}
|
|
5572
5619
|
});
|
|
5573
5620
|
});
|
|
@@ -5575,46 +5622,46 @@ function zs({
|
|
|
5575
5622
|
}), k;
|
|
5576
5623
|
}, G = (k) => Object.keys(k).length > 0, C = async (k) => {
|
|
5577
5624
|
const v = a?.configuration?.filter(
|
|
5578
|
-
(b) => b.fields?.some((
|
|
5625
|
+
(b) => b.fields?.some((x) => x.fieldtype === "managecollectionlist")
|
|
5579
5626
|
) || [];
|
|
5580
5627
|
for (const b of v) {
|
|
5581
|
-
const
|
|
5582
|
-
if (!
|
|
5583
|
-
const
|
|
5584
|
-
if (!Array.isArray(
|
|
5585
|
-
const M =
|
|
5586
|
-
let z = 0,
|
|
5587
|
-
for (const F of
|
|
5628
|
+
const x = b.fields.find((F) => F.fieldtype === "managecollectionlist");
|
|
5629
|
+
if (!x || !k[b.key]) continue;
|
|
5630
|
+
const $ = k[b.key][x.key];
|
|
5631
|
+
if (!Array.isArray($)) continue;
|
|
5632
|
+
const M = x.endpoints || {};
|
|
5633
|
+
let z = 0, I = 0;
|
|
5634
|
+
for (const F of $)
|
|
5588
5635
|
try {
|
|
5589
5636
|
if (F._temp && F._isDraft) {
|
|
5590
5637
|
console.log("Creating new collection:", F.categoryName);
|
|
5591
|
-
const
|
|
5638
|
+
const D = await Ze(M.collectionCreate, {
|
|
5592
5639
|
categoryName: F.categoryName,
|
|
5593
5640
|
order: F.order
|
|
5594
5641
|
});
|
|
5595
|
-
|
|
5642
|
+
D && (console.log("Collection created successfully:", D), z++);
|
|
5596
5643
|
} else if (F._isDraft && !F._temp) {
|
|
5597
5644
|
console.log("Updating collection:", F.id, F.categoryName);
|
|
5598
|
-
const
|
|
5599
|
-
|
|
5645
|
+
const D = await Hn(`${M.collectionUpdate}/${F.id}?newName=${encodeURIComponent(F.categoryName)}`);
|
|
5646
|
+
D && (console.log("Collection updated successfully:", D), I++);
|
|
5600
5647
|
}
|
|
5601
|
-
} catch (
|
|
5602
|
-
throw console.error(`Failed to save collection ${F.categoryName}:`,
|
|
5648
|
+
} catch (D) {
|
|
5649
|
+
throw console.error(`Failed to save collection ${F.categoryName}:`, D), new Error(`Failed to save collection "${F.categoryName}": ${D.message}`);
|
|
5603
5650
|
}
|
|
5604
|
-
if (z > 0 ||
|
|
5651
|
+
if (z > 0 || I > 0) {
|
|
5605
5652
|
const F = [];
|
|
5606
|
-
z > 0 && F.push(`${z} collection${z > 1 ? "s" : ""} created`),
|
|
5653
|
+
z > 0 && F.push(`${z} collection${z > 1 ? "s" : ""} created`), I > 0 && F.push(`${I} collection${I > 1 ? "s" : ""} updated`), console.log("ManageCollectionList operations completed:", F.join(", "));
|
|
5607
5654
|
}
|
|
5608
5655
|
}
|
|
5609
5656
|
}, h = () => {
|
|
5610
5657
|
const k = Y();
|
|
5611
5658
|
if (p(k), G(k)) {
|
|
5612
5659
|
let b = [];
|
|
5613
|
-
Object.keys(k).forEach((
|
|
5614
|
-
typeof k[
|
|
5615
|
-
typeof k[
|
|
5616
|
-
b.push(`${
|
|
5617
|
-
}) : b.push(`${
|
|
5660
|
+
Object.keys(k).forEach((x) => {
|
|
5661
|
+
typeof k[x] == "object" && Object.keys(k[x]).forEach(($) => {
|
|
5662
|
+
typeof k[x][$] == "object" ? Object.keys(k[x][$]).forEach((M) => {
|
|
5663
|
+
b.push(`${x} row ${parseInt($) + 1}: ${k[x][$][M]}`);
|
|
5664
|
+
}) : b.push(`${x}: ${k[x][$]}`);
|
|
5618
5665
|
});
|
|
5619
5666
|
});
|
|
5620
5667
|
return;
|
|
@@ -5623,34 +5670,34 @@ function zs({
|
|
|
5623
5670
|
try {
|
|
5624
5671
|
N(!0);
|
|
5625
5672
|
const b = {};
|
|
5626
|
-
u && (await C(u), Object.keys(u).forEach((
|
|
5673
|
+
u && (await C(u), Object.keys(u).forEach(($) => {
|
|
5627
5674
|
const M = a?.configuration?.find(
|
|
5628
|
-
(z) => z.key ===
|
|
5675
|
+
(z) => z.key === $ && z.type === "datatable"
|
|
5629
5676
|
);
|
|
5630
|
-
M && Array.isArray(u[
|
|
5631
|
-
const
|
|
5677
|
+
M && Array.isArray(u[$]) ? b[$] = u[$].map((z) => {
|
|
5678
|
+
const I = { id: z.id || 0 };
|
|
5632
5679
|
return M.fields && M.fields.forEach((F) => {
|
|
5633
5680
|
if (F.fieldtype === "audience") {
|
|
5634
|
-
let
|
|
5635
|
-
z[F.key] && typeof z[F.key] == "object" && !Array.isArray(z[F.key]) && (
|
|
5681
|
+
let D = { users: [], groups: [], roles: [] };
|
|
5682
|
+
z[F.key] && typeof z[F.key] == "object" && !Array.isArray(z[F.key]) && (D = {
|
|
5636
5683
|
users: z[F.key].users || [],
|
|
5637
5684
|
groups: z[F.key].groups || [],
|
|
5638
5685
|
roles: z[F.key].roles || []
|
|
5639
|
-
}),
|
|
5686
|
+
}), I[F.key] = D;
|
|
5640
5687
|
} else
|
|
5641
|
-
|
|
5642
|
-
}),
|
|
5643
|
-
}) : b[
|
|
5688
|
+
I[F.key] = z[F.key] || "";
|
|
5689
|
+
}), I;
|
|
5690
|
+
}) : b[$] = u[$];
|
|
5644
5691
|
})), (!b.appkey || b.appkey === "") && (b.appkey = t);
|
|
5645
|
-
let
|
|
5646
|
-
if (
|
|
5692
|
+
let x = await Ze(A, b);
|
|
5693
|
+
if (x && x.status != "fail") {
|
|
5647
5694
|
p({});
|
|
5648
|
-
const
|
|
5649
|
-
|
|
5695
|
+
const $ = x.message || "Configuration has been saved successfully";
|
|
5696
|
+
Pe.success($), l && typeof l == "function" && l(u);
|
|
5650
5697
|
} else
|
|
5651
|
-
throw
|
|
5698
|
+
throw Pe.error(x?.message || "Failed to save configuration"), new Error("No response received from server");
|
|
5652
5699
|
} catch (b) {
|
|
5653
|
-
console.error("Error saving configuration:", b),
|
|
5700
|
+
console.error("Error saving configuration:", b), Pe.error(b?.message || "Failed to save configuration");
|
|
5654
5701
|
} finally {
|
|
5655
5702
|
N(!1);
|
|
5656
5703
|
}
|
|
@@ -5662,7 +5709,7 @@ function zs({
|
|
|
5662
5709
|
}
|
|
5663
5710
|
d && Object.keys(d).length > 0 && !window.confirm(
|
|
5664
5711
|
"You have validation errors that will be lost. Are you sure you want to cancel?"
|
|
5665
|
-
) || (p({}), g(null), R((v) => v + 1),
|
|
5712
|
+
) || (p({}), g(null), R((v) => v + 1), Pe.info("Configuration changes cancelled"));
|
|
5666
5713
|
};
|
|
5667
5714
|
if (!m?.configuration && !a?.configuration)
|
|
5668
5715
|
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" }) });
|
|
@@ -5717,7 +5764,7 @@ function zs({
|
|
|
5717
5764
|
] })
|
|
5718
5765
|
] });
|
|
5719
5766
|
}
|
|
5720
|
-
const
|
|
5767
|
+
const Hl = ({
|
|
5721
5768
|
config: t,
|
|
5722
5769
|
appid: a = "Configuration-Page",
|
|
5723
5770
|
disableApi: s = !1
|
|
@@ -5726,7 +5773,7 @@ const Ql = ({
|
|
|
5726
5773
|
pageHeader: u = {},
|
|
5727
5774
|
appletHeader: g = {},
|
|
5728
5775
|
breadcrumb: f = [],
|
|
5729
|
-
overview:
|
|
5776
|
+
overview: y = {},
|
|
5730
5777
|
configuration: r = []
|
|
5731
5778
|
} = t, N = r.map((C) => {
|
|
5732
5779
|
if (C.type === "section" && C.fields) {
|
|
@@ -5741,7 +5788,7 @@ const Ql = ({
|
|
|
5741
5788
|
placeholder: a,
|
|
5742
5789
|
disabled: !1
|
|
5743
5790
|
}, h.some((v) => v.key === "displayname")) {
|
|
5744
|
-
const v = h.findIndex((
|
|
5791
|
+
const v = h.findIndex((x) => x.key === "displayname"), b = h[v] || {};
|
|
5745
5792
|
h[v] = {
|
|
5746
5793
|
...b,
|
|
5747
5794
|
default: b.default || b.value || a,
|
|
@@ -5775,7 +5822,7 @@ const Ql = ({
|
|
|
5775
5822
|
}, p = f.map((C) => ({
|
|
5776
5823
|
label: C.text,
|
|
5777
5824
|
href: C.href || "#"
|
|
5778
|
-
})),
|
|
5825
|
+
})), S = ae(() => {
|
|
5779
5826
|
console.log("handleCancelRequest called - showing modal"), i(!0);
|
|
5780
5827
|
}, []), A = ae((C) => {
|
|
5781
5828
|
i(!1), C.primary ? (console.log("User confirmed cancel - navigating back"), window.history.back()) : console.log("User cancelled the cancel action - modal closed, data preserved");
|
|
@@ -5821,10 +5868,10 @@ const Ql = ({
|
|
|
5821
5868
|
description: "Description of feature 2"
|
|
5822
5869
|
}
|
|
5823
5870
|
],
|
|
5824
|
-
...
|
|
5871
|
+
...y
|
|
5825
5872
|
}, U = [
|
|
5826
5873
|
{ label: "Overview", content: G(V) },
|
|
5827
|
-
{ label: "Configuration", content: /* @__PURE__ */ e(zs, { appid: a, configdata: { configuration: N }, disableApi: s, onCancel:
|
|
5874
|
+
{ label: "Configuration", content: /* @__PURE__ */ e(zs, { appid: a, configdata: { configuration: N }, disableApi: s, onCancel: S, onSave: E }) }
|
|
5828
5875
|
];
|
|
5829
5876
|
function Y(C) {
|
|
5830
5877
|
return C ? C.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: C } }) : C : "📱";
|
|
@@ -5910,7 +5957,7 @@ const Ql = ({
|
|
|
5910
5957
|
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: U[o].content })
|
|
5911
5958
|
] }),
|
|
5912
5959
|
/* @__PURE__ */ e(
|
|
5913
|
-
|
|
5960
|
+
Pn,
|
|
5914
5961
|
{
|
|
5915
5962
|
isOpen: m,
|
|
5916
5963
|
onClose: A,
|
|
@@ -5963,12 +6010,12 @@ const Kl = ({
|
|
|
5963
6010
|
// Feature toggles
|
|
5964
6011
|
showSearch: g = !0,
|
|
5965
6012
|
showColumnChooser: f = !0,
|
|
5966
|
-
showFilter:
|
|
6013
|
+
showFilter: y = !1,
|
|
5967
6014
|
showPrint: r = !1,
|
|
5968
6015
|
showExcel: N = !1,
|
|
5969
6016
|
showPdf: d = !1,
|
|
5970
6017
|
showRefresh: p = !1,
|
|
5971
|
-
showAdd:
|
|
6018
|
+
showAdd: S = !1,
|
|
5972
6019
|
// Additional props
|
|
5973
6020
|
searchPlaceholder: A = "Search...",
|
|
5974
6021
|
handleRefreshClick: E = () => {
|
|
@@ -5979,42 +6026,42 @@ const Kl = ({
|
|
|
5979
6026
|
excelFileName: O,
|
|
5980
6027
|
pdfFileName: V
|
|
5981
6028
|
}) => {
|
|
5982
|
-
const U = () => l?.current || o?.current, [Y, G] = se.useState(""), C = (t || "export").toString().trim() || "export", h = `${O || C}.xlsx`, w = `${V || C}.pdf`, T = (b,
|
|
6029
|
+
const U = () => l?.current || o?.current, [Y, G] = se.useState(""), C = (t || "export").toString().trim() || "export", h = `${O || C}.xlsx`, w = `${V || C}.pdf`, T = (b, x, $) => Math.max(x, Math.min(b, $)), k = ae(
|
|
5983
6030
|
(b) => {
|
|
5984
|
-
const
|
|
5985
|
-
if (console.log("openColumnChooserNear",
|
|
6031
|
+
const x = U();
|
|
6032
|
+
if (console.log("openColumnChooserNear", x), !!x?.openColumnChooser) {
|
|
5986
6033
|
if (typeof window > "u" || !b?.currentTarget) {
|
|
5987
|
-
|
|
6034
|
+
x.openColumnChooser();
|
|
5988
6035
|
return;
|
|
5989
6036
|
}
|
|
5990
6037
|
try {
|
|
5991
|
-
const
|
|
5992
|
-
let
|
|
5993
|
-
const
|
|
5994
|
-
|
|
5995
|
-
} catch (
|
|
5996
|
-
console.log("coloumn choose error",
|
|
6038
|
+
const $ = b.currentTarget.getBoundingClientRect(), M = $.left + window.scrollX, z = $.bottom + window.scrollY;
|
|
6039
|
+
let I = M - 120, F = z - 120;
|
|
6040
|
+
const D = window.innerWidth, B = window.innerHeight;
|
|
6041
|
+
I = T(I, window.scrollX + 8, window.scrollX + D - 340), F = T(F, window.scrollY, window.scrollY + B - 120), console.log("openColumnChooserNear", I, F), x.openColumnChooser(I, F);
|
|
6042
|
+
} catch ($) {
|
|
6043
|
+
console.log("coloumn choose error", $);
|
|
5997
6044
|
}
|
|
5998
6045
|
}
|
|
5999
6046
|
},
|
|
6000
6047
|
[]
|
|
6001
6048
|
// no external deps; reads ref at call time
|
|
6002
6049
|
), v = ae(
|
|
6003
|
-
(b,
|
|
6004
|
-
const
|
|
6005
|
-
if (
|
|
6050
|
+
(b, x) => {
|
|
6051
|
+
const $ = U();
|
|
6052
|
+
if ($)
|
|
6006
6053
|
switch (b) {
|
|
6007
6054
|
case "ColumnChooser":
|
|
6008
|
-
f && (console.log("openColumnChooser",
|
|
6055
|
+
f && (console.log("openColumnChooser", x), x ? k(x) : $.openColumnChooser?.()), console.log("openColumnChooser out", x);
|
|
6009
6056
|
break;
|
|
6010
6057
|
case "Print":
|
|
6011
|
-
r &&
|
|
6058
|
+
r && $.print?.();
|
|
6012
6059
|
break;
|
|
6013
6060
|
case "Excel":
|
|
6014
|
-
N &&
|
|
6061
|
+
N && $.excelExport?.({ fileName: h });
|
|
6015
6062
|
break;
|
|
6016
6063
|
case "Pdf":
|
|
6017
|
-
d &&
|
|
6064
|
+
d && $.pdfExport?.({ fileName: w });
|
|
6018
6065
|
break;
|
|
6019
6066
|
case "Refresh":
|
|
6020
6067
|
p && E();
|
|
@@ -6056,7 +6103,7 @@ const Kl = ({
|
|
|
6056
6103
|
title: "Choose Columns"
|
|
6057
6104
|
}
|
|
6058
6105
|
),
|
|
6059
|
-
|
|
6106
|
+
y && /* @__PURE__ */ e(
|
|
6060
6107
|
ee,
|
|
6061
6108
|
{
|
|
6062
6109
|
icon: vr,
|
|
@@ -6112,7 +6159,7 @@ const Kl = ({
|
|
|
6112
6159
|
}
|
|
6113
6160
|
)
|
|
6114
6161
|
] }),
|
|
6115
|
-
|
|
6162
|
+
S && m && /* @__PURE__ */ e(
|
|
6116
6163
|
ee,
|
|
6117
6164
|
{
|
|
6118
6165
|
label: u,
|
|
@@ -6140,12 +6187,12 @@ function eo(t) {
|
|
|
6140
6187
|
allowFiltering: u = !1,
|
|
6141
6188
|
allowGrouping: g = !1,
|
|
6142
6189
|
allowReordering: f = !0,
|
|
6143
|
-
allowResizing:
|
|
6190
|
+
allowResizing: y = !0,
|
|
6144
6191
|
allowExcelExport: r = !1,
|
|
6145
6192
|
allowPdfExport: N = !1,
|
|
6146
6193
|
showColumnChooser: d = !1,
|
|
6147
6194
|
enableSearchApi: p = !1,
|
|
6148
|
-
height:
|
|
6195
|
+
height: S = "600",
|
|
6149
6196
|
selectionSettings: A = { type: "Multiple", mode: "Row" },
|
|
6150
6197
|
enableCheckbox: E = !1,
|
|
6151
6198
|
columns: R = [],
|
|
@@ -6159,10 +6206,10 @@ function eo(t) {
|
|
|
6159
6206
|
pageSettings: w,
|
|
6160
6207
|
sortSettings: T,
|
|
6161
6208
|
...k
|
|
6162
|
-
} = C || {}, [v, b] = se.useState(w?.page || 1), [
|
|
6209
|
+
} = C || {}, [v, b] = se.useState(w?.page || 1), [x, $] = se.useState(T?.pageSize || 20), [M, z] = se.useState(T?.sortKey || "updatedDate"), [I, F] = se.useState(T?.direction || "Descending"), D = me(() => {
|
|
6163
6210
|
const j = [sn];
|
|
6164
|
-
return i && j.push(ln), u && j.push(on), g && j.push(cn), p && j.push(dn), r && j.push(mn), N && j.push(un), d && j.push(hn),
|
|
6165
|
-
}, [i, u, g, p, r, N, d,
|
|
6211
|
+
return i && j.push(ln), u && j.push(on), g && j.push(cn), p && j.push(dn), r && j.push(mn), N && j.push(un), d && j.push(hn), y && j.push(pn), f && j.push(gn), j.push(bn), j;
|
|
6212
|
+
}, [i, u, g, p, r, N, d, y, f]), B = me(() => {
|
|
6166
6213
|
const j = () => h.current, re = (W, ve) => {
|
|
6167
6214
|
!ve && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${W} requested but related service/feature is disabled.`);
|
|
6168
6215
|
};
|
|
@@ -6196,8 +6243,8 @@ function eo(t) {
|
|
|
6196
6243
|
const _ = (j) => {
|
|
6197
6244
|
const re = String(j || "");
|
|
6198
6245
|
return re === "Ascending" || re === "Descending" ? re : re.toLowerCase() === "ascending" ? "Ascending" : "Descending";
|
|
6199
|
-
},
|
|
6200
|
-
const re = h.current, W = j?.requestType, ve = W === "paging" ? "paging" : W === "sorting" ? "sorting" : W === "searching" ? "searching" : W === "filtering" ? "filtering" : W === "grouping" ? "grouping" : W === "reorder" ? "reorder" : W === "columnstate" ? "columnstate" : "other", Re = j?.pageSize ?? re?.pageSettings?.pageSize ??
|
|
6246
|
+
}, P = (j) => {
|
|
6247
|
+
const re = h.current, W = j?.requestType, ve = W === "paging" ? "paging" : W === "sorting" ? "sorting" : W === "searching" ? "searching" : W === "filtering" ? "filtering" : W === "grouping" ? "grouping" : W === "reorder" ? "reorder" : W === "columnstate" ? "columnstate" : "other", Re = j?.pageSize ?? re?.pageSettings?.pageSize ?? x, _e = j?.currentPage ?? re?.pageSettings?.currentPage ?? l, rt = j?.columnName && j?.direction ? [{ field: j.columnName, dir: _(j.direction) }] : (re?.sortSettings?.columns || []).map((Oe) => ({
|
|
6201
6248
|
field: Oe.field,
|
|
6202
6249
|
dir: _(Oe.direction ?? Oe.dir)
|
|
6203
6250
|
})), nt = j?.searchString ?? "", st = j?.columns ?? re?.filterSettings?.columns ?? [];
|
|
@@ -6213,12 +6260,12 @@ function eo(t) {
|
|
|
6213
6260
|
}, q = (j) => {
|
|
6214
6261
|
setTimeout(() => {
|
|
6215
6262
|
h?.current?.hideSpinner();
|
|
6216
|
-
}, 1e3), j.requestType === "paging" && (b(j.currentPage),
|
|
6263
|
+
}, 1e3), j.requestType === "paging" && (b(j.currentPage), $(j.pageSize)), j.requestType === "sorting" && (z(j.columnName || "updatedDate"), F(j.direction === "Ascending" ? "ASC" : "DESC")), O && O(P(j), j);
|
|
6217
6264
|
}, X = (j) => {
|
|
6218
6265
|
typeof Y == "function" && Y(j?.rowData, j);
|
|
6219
6266
|
}, xe = () => {
|
|
6220
6267
|
const j = [];
|
|
6221
|
-
return E && j.push(/* @__PURE__ */ e(
|
|
6268
|
+
return E && j.push(/* @__PURE__ */ e(Dt, { type: "checkbox", width: "50" }, "__checkbox__")), R.forEach((re, W) => {
|
|
6222
6269
|
const {
|
|
6223
6270
|
field: ve,
|
|
6224
6271
|
headerText: Re,
|
|
@@ -6231,15 +6278,15 @@ function eo(t) {
|
|
|
6231
6278
|
allowSorting: Ea = !0,
|
|
6232
6279
|
type: Ra,
|
|
6233
6280
|
format: Oa,
|
|
6234
|
-
visible:
|
|
6235
|
-
minWidth:
|
|
6281
|
+
visible: Ia = !0,
|
|
6282
|
+
minWidth: Pa,
|
|
6236
6283
|
maxWidth: Ma,
|
|
6237
6284
|
customAttributes: La,
|
|
6238
6285
|
...Ba
|
|
6239
6286
|
} = re || {};
|
|
6240
6287
|
j.push(
|
|
6241
6288
|
/* @__PURE__ */ e(
|
|
6242
|
-
|
|
6289
|
+
Dt,
|
|
6243
6290
|
{
|
|
6244
6291
|
field: ve,
|
|
6245
6292
|
headerText: Re,
|
|
@@ -6252,8 +6299,8 @@ function eo(t) {
|
|
|
6252
6299
|
allowSorting: Ea,
|
|
6253
6300
|
type: Ra,
|
|
6254
6301
|
format: Oa,
|
|
6255
|
-
visible:
|
|
6256
|
-
minWidth:
|
|
6302
|
+
visible: Ia,
|
|
6303
|
+
minWidth: Pa,
|
|
6257
6304
|
maxWidth: Ma,
|
|
6258
6305
|
customAttributes: La,
|
|
6259
6306
|
...Ba
|
|
@@ -6272,18 +6319,18 @@ function eo(t) {
|
|
|
6272
6319
|
result: a,
|
|
6273
6320
|
count: s
|
|
6274
6321
|
},
|
|
6275
|
-
height:
|
|
6322
|
+
height: S,
|
|
6276
6323
|
allowPaging: m,
|
|
6277
6324
|
allowSorting: i,
|
|
6278
6325
|
allowFiltering: u,
|
|
6279
6326
|
allowGrouping: g,
|
|
6280
6327
|
allowReordering: f,
|
|
6281
|
-
allowResizing:
|
|
6328
|
+
allowResizing: y,
|
|
6282
6329
|
showColumnChooser: d,
|
|
6283
6330
|
selectionSettings: A,
|
|
6284
6331
|
pageSettings: { pageSize: 10, pageSizes: w?.pageSizes ?? [20, 40, 60, 80, 100] },
|
|
6285
6332
|
sortSettings: T ?? {
|
|
6286
|
-
columns: [{ field: M, direction: _(
|
|
6333
|
+
columns: [{ field: M, direction: _(I) }],
|
|
6287
6334
|
allowUnsort: !1
|
|
6288
6335
|
},
|
|
6289
6336
|
actionBegin: q,
|
|
@@ -6293,7 +6340,7 @@ function eo(t) {
|
|
|
6293
6340
|
...k,
|
|
6294
6341
|
children: [
|
|
6295
6342
|
/* @__PURE__ */ e(yn, { children: xe() }),
|
|
6296
|
-
/* @__PURE__ */ e(xn, { services:
|
|
6343
|
+
/* @__PURE__ */ e(xn, { services: D })
|
|
6297
6344
|
]
|
|
6298
6345
|
}
|
|
6299
6346
|
);
|
|
@@ -6332,7 +6379,7 @@ function oe({
|
|
|
6332
6379
|
details: i = {},
|
|
6333
6380
|
...u
|
|
6334
6381
|
}) {
|
|
6335
|
-
const g = Xe(), f = Ss(u, m),
|
|
6382
|
+
const g = Xe(), f = Ss(u, m), y = (N) => {
|
|
6336
6383
|
l?.({
|
|
6337
6384
|
key: f,
|
|
6338
6385
|
checked: N.target.checked,
|
|
@@ -6352,7 +6399,7 @@ function oe({
|
|
|
6352
6399
|
id: g,
|
|
6353
6400
|
type: "checkbox",
|
|
6354
6401
|
className: "h-4 w-4 rounded border-zinc-300 focus:ring-[var(--primaryColor)]",
|
|
6355
|
-
onChange:
|
|
6402
|
+
onChange: y,
|
|
6356
6403
|
"aria-label": "Select card"
|
|
6357
6404
|
}
|
|
6358
6405
|
) }),
|
|
@@ -6380,7 +6427,7 @@ function Ds({
|
|
|
6380
6427
|
moreGroupsLabel: u = "+ 5 more",
|
|
6381
6428
|
author: g = "Judith Black",
|
|
6382
6429
|
timeLabel: f = "Just now",
|
|
6383
|
-
imageUrl:
|
|
6430
|
+
imageUrl: y = "https://images.unsplash.com/photo-1469980098053-382eb10ba017?q=80&w=1200&auto=format&fit=crop",
|
|
6384
6431
|
description: r = "Columbia University is a prestigious Ivy League institution located in the heart of New York City.",
|
|
6385
6432
|
// spread remaining props (_id, instanceId, etc.)
|
|
6386
6433
|
...N
|
|
@@ -6437,7 +6484,7 @@ function Ds({
|
|
|
6437
6484
|
"div",
|
|
6438
6485
|
{
|
|
6439
6486
|
className: `mt-3 overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800 ${p.media}`,
|
|
6440
|
-
children: /* @__PURE__ */ e("img", { src:
|
|
6487
|
+
children: /* @__PURE__ */ e("img", { src: y, alt: "", className: "h-full w-full object-cover" })
|
|
6441
6488
|
}
|
|
6442
6489
|
),
|
|
6443
6490
|
/* @__PURE__ */ e("div", { className: "mt-3 w-full flex justify-center", children: /* @__PURE__ */ e(
|
|
@@ -6504,11 +6551,11 @@ function Es({
|
|
|
6504
6551
|
// spread for identity (_id/instanceId/etc)
|
|
6505
6552
|
...g
|
|
6506
6553
|
}) {
|
|
6507
|
-
const f = ie(t),
|
|
6554
|
+
const f = ie(t), y = ce[f], r = Fs[f], N = (d) => `px-1 pb-2 text-sm font-medium ${d === i ? "text-zinc-900 dark:text-zinc-100 border-b-2" : "text-zinc-500 dark:text-zinc-400"}`;
|
|
6508
6555
|
return /* @__PURE__ */ n(
|
|
6509
6556
|
oe,
|
|
6510
6557
|
{
|
|
6511
|
-
className: `flex flex-col ${
|
|
6558
|
+
className: `flex flex-col ${y.card} ${r.wrap}`,
|
|
6512
6559
|
showCheckbox: a,
|
|
6513
6560
|
checkboxPosition: s,
|
|
6514
6561
|
onSelect: o,
|
|
@@ -6517,7 +6564,7 @@ function Es({
|
|
|
6517
6564
|
...g,
|
|
6518
6565
|
children: [
|
|
6519
6566
|
/* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
|
|
6520
|
-
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${
|
|
6567
|
+
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${y.title}`, children: m }),
|
|
6521
6568
|
/* @__PURE__ */ e(
|
|
6522
6569
|
"span",
|
|
6523
6570
|
{
|
|
@@ -6676,8 +6723,8 @@ const Rs = [
|
|
|
6676
6723
|
date: "text-sm",
|
|
6677
6724
|
excerpt: "text-sm text-zinc-600 dark:text-zinc-300 line-clamp-2"
|
|
6678
6725
|
}
|
|
6679
|
-
},
|
|
6680
|
-
function
|
|
6726
|
+
}, jt = ({ label: t }) => /* @__PURE__ */ e("span", { className: "mt-1 inline-flex items-center rounded-full border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-900 px-2 py-0.5 text-[11px] font-semibold tracking-wide", children: t });
|
|
6727
|
+
function Is({
|
|
6681
6728
|
size: t = "md",
|
|
6682
6729
|
showCheckbox: a = !1,
|
|
6683
6730
|
checkboxPosition: s = "top-left",
|
|
@@ -6688,11 +6735,11 @@ function Ps({
|
|
|
6688
6735
|
// spread for identity fields: _id / id / instanceId etc.
|
|
6689
6736
|
...u
|
|
6690
6737
|
}) {
|
|
6691
|
-
const g = ie(t), f = ce[g],
|
|
6738
|
+
const g = ie(t), f = ce[g], y = Os[g];
|
|
6692
6739
|
return /* @__PURE__ */ n(
|
|
6693
6740
|
oe,
|
|
6694
6741
|
{
|
|
6695
|
-
className: `flex flex-col ${f.card} ${
|
|
6742
|
+
className: `flex flex-col ${f.card} ${y.wrap || ""}`,
|
|
6696
6743
|
showCheckbox: a,
|
|
6697
6744
|
checkboxPosition: s,
|
|
6698
6745
|
onSelect: o,
|
|
@@ -6706,12 +6753,12 @@ function Ps({
|
|
|
6706
6753
|
] }),
|
|
6707
6754
|
g === "lg" ? (
|
|
6708
6755
|
// Large: 3-up grid of image cards
|
|
6709
|
-
/* @__PURE__ */ e("div", { className: `mt-4 ${
|
|
6710
|
-
/* @__PURE__ */ e("img", { src: r.thumb, alt: "", className:
|
|
6711
|
-
/* @__PURE__ */ e("h4", { className: `mt-3 ${
|
|
6712
|
-
/* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${
|
|
6713
|
-
/* @__PURE__ */ e("div", { className: "mt-2", children: /* @__PURE__ */ e(
|
|
6714
|
-
/* @__PURE__ */ n("p", { className: `mt-2 ${
|
|
6756
|
+
/* @__PURE__ */ e("div", { className: `mt-4 ${y.grid}`, children: i.slice(0, 3).map((r) => /* @__PURE__ */ n("article", { children: [
|
|
6757
|
+
/* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: y.cardImg }),
|
|
6758
|
+
/* @__PURE__ */ e("h4", { className: `mt-3 ${y.title} text-zinc-900 dark:text-zinc-100`, children: r.title }),
|
|
6759
|
+
/* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${y.date}`, children: r.date }),
|
|
6760
|
+
/* @__PURE__ */ e("div", { className: "mt-2", children: /* @__PURE__ */ e(jt, { label: r.tag }) }),
|
|
6761
|
+
/* @__PURE__ */ n("p", { className: `mt-2 ${y.excerpt}`, children: [
|
|
6715
6762
|
r.excerpt,
|
|
6716
6763
|
" ",
|
|
6717
6764
|
/* @__PURE__ */ e("span", { className: "underline decoration-dotted text-indigo-700 cursor-default", children: "View more" })
|
|
@@ -6724,12 +6771,12 @@ function Ps({
|
|
|
6724
6771
|
{
|
|
6725
6772
|
className: "flex items-start gap-3 rounded-xl border border-zinc-200 dark:border-zinc-800 p-2",
|
|
6726
6773
|
children: [
|
|
6727
|
-
/* @__PURE__ */ e("div", { className: `overflow-hidden rounded-lg ${
|
|
6774
|
+
/* @__PURE__ */ e("div", { className: `overflow-hidden rounded-lg ${y.itemThumb} flex-shrink-0`, children: /* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: "h-full w-full object-cover" }) }),
|
|
6728
6775
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
|
|
6729
|
-
/* @__PURE__ */ e("h4", { className: `${
|
|
6730
|
-
/* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${
|
|
6731
|
-
/* @__PURE__ */ e("div", { className: "mt-1", children: /* @__PURE__ */ e(
|
|
6732
|
-
|
|
6776
|
+
/* @__PURE__ */ e("h4", { className: `${y.title} text-zinc-900 dark:text-zinc-100 line-clamp-2`, children: r.title }),
|
|
6777
|
+
/* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${y.date}`, children: r.date }),
|
|
6778
|
+
/* @__PURE__ */ e("div", { className: "mt-1", children: /* @__PURE__ */ e(jt, { label: r.tag }) }),
|
|
6779
|
+
y.excerpt !== "hidden" && /* @__PURE__ */ n("p", { className: `mt-2 ${y.excerpt}`, children: [
|
|
6733
6780
|
r.excerpt,
|
|
6734
6781
|
" ",
|
|
6735
6782
|
/* @__PURE__ */ e("span", { className: "underline decoration-dotted text-indigo-700 cursor-default", children: "View more" })
|
|
@@ -6745,7 +6792,7 @@ function Ps({
|
|
|
6745
6792
|
}
|
|
6746
6793
|
);
|
|
6747
6794
|
}
|
|
6748
|
-
|
|
6795
|
+
Is.propTypes = {
|
|
6749
6796
|
size: c.string,
|
|
6750
6797
|
showCheckbox: c.bool,
|
|
6751
6798
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -6763,7 +6810,7 @@ Ps.propTypes = {
|
|
|
6763
6810
|
})
|
|
6764
6811
|
)
|
|
6765
6812
|
};
|
|
6766
|
-
const
|
|
6813
|
+
const Ps = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Ms = {
|
|
6767
6814
|
sm: {
|
|
6768
6815
|
wrap: "max-w-md w-full md:w-auto flex-none justify-self-start",
|
|
6769
6816
|
mapH: "h-48",
|
|
@@ -6801,27 +6848,27 @@ function js({
|
|
|
6801
6848
|
identity: l = "_id",
|
|
6802
6849
|
title: m = "Campus Map",
|
|
6803
6850
|
campusName: i = "Morningside Heights Campus",
|
|
6804
|
-
filters: u =
|
|
6851
|
+
filters: u = Ps,
|
|
6805
6852
|
activeFilter: g = "All",
|
|
6806
6853
|
// NEW: iframe controls
|
|
6807
6854
|
mapQuery: f = "Florida",
|
|
6808
|
-
zoom:
|
|
6855
|
+
zoom: y = 12,
|
|
6809
6856
|
mapUrl: r,
|
|
6810
6857
|
// optional full embed URL override
|
|
6811
6858
|
...N
|
|
6812
6859
|
}) {
|
|
6813
|
-
const d = ie(t), p = ce[d],
|
|
6860
|
+
const d = ie(t), p = ce[d], S = Ms[d], A = r || Bs(f, y);
|
|
6814
6861
|
return /* @__PURE__ */ e(
|
|
6815
6862
|
oe,
|
|
6816
6863
|
{
|
|
6817
|
-
className: `flex flex-col ${p.card} ${
|
|
6864
|
+
className: `flex flex-col ${p.card} ${S.wrap}`,
|
|
6818
6865
|
showCheckbox: a,
|
|
6819
6866
|
checkboxPosition: s,
|
|
6820
6867
|
onSelect: o,
|
|
6821
6868
|
identity: l,
|
|
6822
|
-
details: { type: "campus-map", title: m, campusName: i, activeFilter: g, mapQuery: f, zoom:
|
|
6869
|
+
details: { type: "campus-map", title: m, campusName: i, activeFilter: g, mapQuery: f, zoom: y },
|
|
6823
6870
|
...N,
|
|
6824
|
-
children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${
|
|
6871
|
+
children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${S.mapH}`, children: [
|
|
6825
6872
|
/* @__PURE__ */ e(
|
|
6826
6873
|
"iframe",
|
|
6827
6874
|
{
|
|
@@ -6835,7 +6882,7 @@ function js({
|
|
|
6835
6882
|
}
|
|
6836
6883
|
),
|
|
6837
6884
|
/* @__PURE__ */ n("div", { className: "absolute left-4 right-4 top-3 flex items-center justify-between pointer-events-none", children: [
|
|
6838
|
-
/* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${
|
|
6885
|
+
/* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${S.campusPill}`, children: [
|
|
6839
6886
|
/* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children: i }),
|
|
6840
6887
|
/* @__PURE__ */ e("span", { className: "ml-2 text-zinc-400", children: "▾" })
|
|
6841
6888
|
] }),
|
|
@@ -6844,8 +6891,8 @@ function js({
|
|
|
6844
6891
|
/* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
|
|
6845
6892
|
] })
|
|
6846
6893
|
] }),
|
|
6847
|
-
/* @__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 ${
|
|
6848
|
-
/* @__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 ${
|
|
6894
|
+
/* @__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 ${S.chipGap} overflow-x-auto scrollbar-none`, children: u.map((E) => /* @__PURE__ */ e(Ls, { label: E, active: E === g, size: d }, E)) }) }),
|
|
6895
|
+
/* @__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 ${S.searchH}`, children: [
|
|
6849
6896
|
/* @__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" }) }),
|
|
6850
6897
|
/* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
|
|
6851
6898
|
] }) })
|
|
@@ -6945,7 +6992,7 @@ const Vs = [
|
|
|
6945
6992
|
time: a.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })
|
|
6946
6993
|
};
|
|
6947
6994
|
};
|
|
6948
|
-
function
|
|
6995
|
+
function Vt({ ev: t, sizeMeta: a, isSelected: s, onClick: o }) {
|
|
6949
6996
|
const { day: l, month: m, time: i } = Ta(t.date);
|
|
6950
6997
|
return /* @__PURE__ */ n(
|
|
6951
6998
|
"div",
|
|
@@ -6995,7 +7042,7 @@ function Gs({ ev: t, sizeMeta: a }) {
|
|
|
6995
7042
|
}
|
|
6996
7043
|
) }),
|
|
6997
7044
|
a.showLocation && t.location && /* @__PURE__ */ n("div", { className: `flex items-center gap-2 mb-3 text-zinc-600 dark:text-zinc-400 ${a.meta}`, children: [
|
|
6998
|
-
/* @__PURE__ */ e(
|
|
7045
|
+
/* @__PURE__ */ e(aa, { className: "h-4 w-4" }),
|
|
6999
7046
|
t.location
|
|
7000
7047
|
] }),
|
|
7001
7048
|
t.url && /* @__PURE__ */ n("div", { className: `flex items-center gap-2 mb-4 text-zinc-600 dark:text-zinc-400 ${a.meta}`, children: [
|
|
@@ -7016,8 +7063,8 @@ function qs({
|
|
|
7016
7063
|
selectedIndex: u = 0,
|
|
7017
7064
|
...g
|
|
7018
7065
|
}) {
|
|
7019
|
-
const [f,
|
|
7020
|
-
|
|
7066
|
+
const [f, y] = L(u), r = ie(t), N = ce[r], d = _s[r], p = i[f] || i[0], S = (E, R) => {
|
|
7067
|
+
y(R), o?.(E);
|
|
7021
7068
|
}, A = r === "lg";
|
|
7022
7069
|
return /* @__PURE__ */ n(
|
|
7023
7070
|
oe,
|
|
@@ -7038,12 +7085,12 @@ function qs({
|
|
|
7038
7085
|
// Large: Two-column layout
|
|
7039
7086
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
7040
7087
|
/* @__PURE__ */ e("div", { className: "space-y-1", children: i.map((E, R) => /* @__PURE__ */ e(
|
|
7041
|
-
|
|
7088
|
+
Vt,
|
|
7042
7089
|
{
|
|
7043
7090
|
ev: E,
|
|
7044
7091
|
sizeMeta: d,
|
|
7045
7092
|
isSelected: R === f,
|
|
7046
|
-
onClick: (O) =>
|
|
7093
|
+
onClick: (O) => S(O, R)
|
|
7047
7094
|
},
|
|
7048
7095
|
E._id || E.id || R
|
|
7049
7096
|
)) }),
|
|
@@ -7052,12 +7099,12 @@ function qs({
|
|
|
7052
7099
|
) : (
|
|
7053
7100
|
// Small/Medium: Simple list only
|
|
7054
7101
|
/* @__PURE__ */ e("div", { className: "space-y-1", children: i.map((E, R) => /* @__PURE__ */ e(
|
|
7055
|
-
|
|
7102
|
+
Vt,
|
|
7056
7103
|
{
|
|
7057
7104
|
ev: E,
|
|
7058
7105
|
sizeMeta: d,
|
|
7059
7106
|
isSelected: R === f,
|
|
7060
|
-
onClick: (O) =>
|
|
7107
|
+
onClick: (O) => S(O, R)
|
|
7061
7108
|
},
|
|
7062
7109
|
E._id || E.id || R
|
|
7063
7110
|
)) })
|
|
@@ -7231,9 +7278,9 @@ function Xs({
|
|
|
7231
7278
|
selectedIndex: u = 0,
|
|
7232
7279
|
onStar: g,
|
|
7233
7280
|
onPin: f,
|
|
7234
|
-
...
|
|
7281
|
+
...y
|
|
7235
7282
|
}) {
|
|
7236
|
-
const [r, N] = L(u), d = ie(t), p = ce[d],
|
|
7283
|
+
const [r, N] = L(u), d = ie(t), p = ce[d], S = Ws[d], A = (O, V) => {
|
|
7237
7284
|
N(V), o?.(O);
|
|
7238
7285
|
}, E = (O) => {
|
|
7239
7286
|
const V = { ...O, starred: !O.starred };
|
|
@@ -7245,13 +7292,13 @@ function Xs({
|
|
|
7245
7292
|
return /* @__PURE__ */ n(
|
|
7246
7293
|
oe,
|
|
7247
7294
|
{
|
|
7248
|
-
className: `flex flex-col ${p.card} ${
|
|
7295
|
+
className: `flex flex-col ${p.card} ${S.wrap}`,
|
|
7249
7296
|
showCheckbox: a,
|
|
7250
7297
|
checkboxPosition: s,
|
|
7251
7298
|
onSelect: o,
|
|
7252
7299
|
identity: l,
|
|
7253
7300
|
details: { type: "emails", title: m, count: i?.length ?? 0 },
|
|
7254
|
-
...
|
|
7301
|
+
...y,
|
|
7255
7302
|
children: [
|
|
7256
7303
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${p.title}`, children: m }) }),
|
|
7257
7304
|
/* @__PURE__ */ e(he, { placeholder: "Type to search..." }),
|
|
@@ -7259,7 +7306,7 @@ function Xs({
|
|
|
7259
7306
|
Js,
|
|
7260
7307
|
{
|
|
7261
7308
|
email: O,
|
|
7262
|
-
sizeMeta:
|
|
7309
|
+
sizeMeta: S,
|
|
7263
7310
|
isSelected: V === r,
|
|
7264
7311
|
onClick: (U) => A(U, V),
|
|
7265
7312
|
onStar: E,
|
|
@@ -7296,7 +7343,7 @@ Xs.propTypes = {
|
|
|
7296
7343
|
onStar: c.func,
|
|
7297
7344
|
onPin: c.func
|
|
7298
7345
|
};
|
|
7299
|
-
const
|
|
7346
|
+
const Qs = [
|
|
7300
7347
|
{
|
|
7301
7348
|
_id: "contact-1",
|
|
7302
7349
|
name: "Branden Baker",
|
|
@@ -7337,7 +7384,7 @@ const Hs = [
|
|
|
7337
7384
|
// building: "Security Building",
|
|
7338
7385
|
// initials: "AM"
|
|
7339
7386
|
// }
|
|
7340
|
-
],
|
|
7387
|
+
], Hs = {
|
|
7341
7388
|
sm: {
|
|
7342
7389
|
wrap: "max-w-sm w-full",
|
|
7343
7390
|
searchHeight: "h-8",
|
|
@@ -7384,7 +7431,7 @@ const Hs = [
|
|
|
7384
7431
|
// two columns for large screens
|
|
7385
7432
|
}
|
|
7386
7433
|
};
|
|
7387
|
-
function
|
|
7434
|
+
function _t({ contact: t, sizeMeta: a, isSelected: s, onClick: o }) {
|
|
7388
7435
|
return /* @__PURE__ */ n(
|
|
7389
7436
|
"div",
|
|
7390
7437
|
{
|
|
@@ -7396,7 +7443,7 @@ function Vt({ contact: t, sizeMeta: a, isSelected: s, onClick: o }) {
|
|
|
7396
7443
|
/* @__PURE__ */ e("h3", { className: `${a.name} text-zinc-900 dark:text-zinc-100 mb-1 group-hover:text-blue-600 dark:group-hover:text-blue-400`, children: t.name }),
|
|
7397
7444
|
/* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
|
|
7398
7445
|
/* @__PURE__ */ n("div", { className: `flex items-center gap-1.5 ${a.details} text-zinc-600 dark:text-zinc-400`, children: [
|
|
7399
|
-
/* @__PURE__ */ e(
|
|
7446
|
+
/* @__PURE__ */ e(ra, { className: "h-3 w-3" }),
|
|
7400
7447
|
t.phone
|
|
7401
7448
|
] }),
|
|
7402
7449
|
/* @__PURE__ */ e("div", { className: `${a.department} text-zinc-500 dark:text-zinc-500 line-clamp-1`, children: t.department })
|
|
@@ -7421,7 +7468,7 @@ function Zs({ contact: t, sizeMeta: a }) {
|
|
|
7421
7468
|
/* @__PURE__ */ e("h4", { className: `${a.details} font-semibold text-zinc-700 dark:text-zinc-300 mb-3 uppercase tracking-wide text-xs`, children: "Contact Information" }),
|
|
7422
7469
|
/* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
7423
7470
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
7424
|
-
/* @__PURE__ */ e(
|
|
7471
|
+
/* @__PURE__ */ e(ra, { className: "h-4 w-4 text-zinc-500 dark:text-zinc-400 flex-shrink-0" }),
|
|
7425
7472
|
/* @__PURE__ */ n("div", { children: [
|
|
7426
7473
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-600 dark:text-zinc-400 font-medium`, children: "Phone Number" }),
|
|
7427
7474
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-900 dark:text-zinc-100`, children: t.phone })
|
|
@@ -7447,7 +7494,7 @@ function Zs({ contact: t, sizeMeta: a }) {
|
|
|
7447
7494
|
] })
|
|
7448
7495
|
] }),
|
|
7449
7496
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
7450
|
-
/* @__PURE__ */ e(
|
|
7497
|
+
/* @__PURE__ */ e(aa, { className: "h-4 w-4 text-zinc-500 dark:text-zinc-400 flex-shrink-0" }),
|
|
7451
7498
|
/* @__PURE__ */ n("div", { children: [
|
|
7452
7499
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-600 dark:text-zinc-400 font-medium`, children: "Campus" }),
|
|
7453
7500
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-900 dark:text-zinc-100`, children: t.campus })
|
|
@@ -7463,7 +7510,7 @@ function Zs({ contact: t, sizeMeta: a }) {
|
|
|
7463
7510
|
}
|
|
7464
7511
|
function Ks({ sizeMeta: t }) {
|
|
7465
7512
|
return /* @__PURE__ */ n("div", { className: `relative ${t.searchHeight} mb-4`, children: [
|
|
7466
|
-
/* @__PURE__ */ e(
|
|
7513
|
+
/* @__PURE__ */ e(vt, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-zinc-400" }),
|
|
7467
7514
|
/* @__PURE__ */ e(
|
|
7468
7515
|
"input",
|
|
7469
7516
|
{
|
|
@@ -7481,13 +7528,13 @@ function el({
|
|
|
7481
7528
|
onSelect: o,
|
|
7482
7529
|
identity: l = "_id",
|
|
7483
7530
|
title: m = "Directory",
|
|
7484
|
-
contacts: i =
|
|
7531
|
+
contacts: i = Qs,
|
|
7485
7532
|
selectedIndex: u = 0,
|
|
7486
7533
|
...g
|
|
7487
7534
|
}) {
|
|
7488
|
-
const [f,
|
|
7489
|
-
|
|
7490
|
-
},
|
|
7535
|
+
const [f, y] = L(u), r = ie(t), N = ce[r], d = Hs[r], p = (E, R) => {
|
|
7536
|
+
y(R), o?.(E);
|
|
7537
|
+
}, S = i[f] || i[0], A = d.layout === "split";
|
|
7491
7538
|
return /* @__PURE__ */ n(
|
|
7492
7539
|
oe,
|
|
7493
7540
|
{
|
|
@@ -7503,7 +7550,7 @@ function el({
|
|
|
7503
7550
|
/* @__PURE__ */ e(Ks, { sizeMeta: d }),
|
|
7504
7551
|
A ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
|
|
7505
7552
|
/* @__PURE__ */ e("div", { className: "space-y-3", children: i.map((E, R) => /* @__PURE__ */ e(
|
|
7506
|
-
|
|
7553
|
+
_t,
|
|
7507
7554
|
{
|
|
7508
7555
|
contact: E,
|
|
7509
7556
|
sizeMeta: d,
|
|
@@ -7515,14 +7562,14 @@ function el({
|
|
|
7515
7562
|
/* @__PURE__ */ e(
|
|
7516
7563
|
Zs,
|
|
7517
7564
|
{
|
|
7518
|
-
contact:
|
|
7565
|
+
contact: S,
|
|
7519
7566
|
sizeMeta: d
|
|
7520
7567
|
}
|
|
7521
7568
|
)
|
|
7522
7569
|
] }) : (
|
|
7523
7570
|
// Single column layout for small screens
|
|
7524
7571
|
/* @__PURE__ */ e("div", { className: "space-y-3", children: i.map((E, R) => /* @__PURE__ */ e(
|
|
7525
|
-
|
|
7572
|
+
_t,
|
|
7526
7573
|
{
|
|
7527
7574
|
contact: E,
|
|
7528
7575
|
sizeMeta: d,
|
|
@@ -7619,7 +7666,7 @@ function rl({
|
|
|
7619
7666
|
balance: u = 3e3,
|
|
7620
7667
|
totalCharges: g = 4440,
|
|
7621
7668
|
totalPayments: f = 1568,
|
|
7622
|
-
transactions:
|
|
7669
|
+
transactions: y = [
|
|
7623
7670
|
{
|
|
7624
7671
|
id: "t1",
|
|
7625
7672
|
date: "February 16, 2025",
|
|
@@ -7653,7 +7700,7 @@ function rl({
|
|
|
7653
7700
|
/* @__PURE__ */ e("div", { className: `font-semibold ${d.title}`, children: m }),
|
|
7654
7701
|
/* @__PURE__ */ n("div", { className: "rounded-full border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-900 px-3 py-1 text-sm flex items-center gap-2", children: [
|
|
7655
7702
|
/* @__PURE__ */ e("span", { children: i }),
|
|
7656
|
-
/* @__PURE__ */ e(
|
|
7703
|
+
/* @__PURE__ */ e(Nt, { className: "h-4 w-4 opacity-70" })
|
|
7657
7704
|
] })
|
|
7658
7705
|
] }),
|
|
7659
7706
|
/* @__PURE__ */ n("div", { className: p.topGrid || p.grid, children: [
|
|
@@ -7682,16 +7729,16 @@ function rl({
|
|
|
7682
7729
|
/* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: De(f) })
|
|
7683
7730
|
] })
|
|
7684
7731
|
] }),
|
|
7685
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children:
|
|
7732
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: y.slice(0, 2).map((S, A) => /* @__PURE__ */ e(
|
|
7686
7733
|
tl,
|
|
7687
7734
|
{
|
|
7688
7735
|
side: A === 0 ? "left" : "right",
|
|
7689
|
-
date:
|
|
7690
|
-
title:
|
|
7691
|
-
amount:
|
|
7692
|
-
kind:
|
|
7736
|
+
date: S.date,
|
|
7737
|
+
title: S.title,
|
|
7738
|
+
amount: S.amount,
|
|
7739
|
+
kind: S.kind
|
|
7693
7740
|
},
|
|
7694
|
-
|
|
7741
|
+
S.id || A
|
|
7695
7742
|
)) })
|
|
7696
7743
|
] })
|
|
7697
7744
|
] }),
|
|
@@ -7788,7 +7835,7 @@ const nl = {
|
|
|
7788
7835
|
]
|
|
7789
7836
|
}
|
|
7790
7837
|
];
|
|
7791
|
-
function
|
|
7838
|
+
function Ut({ leave: t, sizeMeta: a }) {
|
|
7792
7839
|
return /* @__PURE__ */ n("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 overflow-hidden", children: [
|
|
7793
7840
|
/* @__PURE__ */ e("div", { className: "bg-zinc-50 dark:bg-zinc-800 px-4 py-3 border-b border-zinc-200 dark:border-zinc-700", children: /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
7794
7841
|
/* @__PURE__ */ e("span", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${a.table}`, children: t.name }),
|
|
@@ -7810,7 +7857,7 @@ function sl({
|
|
|
7810
7857
|
term: i = "Fall 2025",
|
|
7811
7858
|
...u
|
|
7812
7859
|
}) {
|
|
7813
|
-
const [g, f] = L("vacation"), [
|
|
7860
|
+
const [g, f] = L("vacation"), [y, r] = L(!1), N = ie(t), d = ce[N], p = nl[N], S = qe.find((A) => A.id === g) || qe[0];
|
|
7814
7861
|
return /* @__PURE__ */ n(
|
|
7815
7862
|
oe,
|
|
7816
7863
|
{
|
|
@@ -7826,7 +7873,7 @@ function sl({
|
|
|
7826
7873
|
/* @__PURE__ */ n("div", { children: [
|
|
7827
7874
|
/* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${p.title} mb-1`, children: m }),
|
|
7828
7875
|
/* @__PURE__ */ n("div", { className: `text-zinc-600 dark:text-zinc-400 ${p.term} flex items-center gap-2`, children: [
|
|
7829
|
-
/* @__PURE__ */ e(
|
|
7876
|
+
/* @__PURE__ */ e(Yt, { className: "h-4 w-4" }),
|
|
7830
7877
|
"Term - ",
|
|
7831
7878
|
i
|
|
7832
7879
|
] })
|
|
@@ -7836,11 +7883,11 @@ function sl({
|
|
|
7836
7883
|
"button",
|
|
7837
7884
|
{
|
|
7838
7885
|
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",
|
|
7839
|
-
onClick: () => r(!
|
|
7840
|
-
children: /* @__PURE__ */ e(
|
|
7886
|
+
onClick: () => r(!y),
|
|
7887
|
+
children: /* @__PURE__ */ e(na, { className: "h-4 w-4" })
|
|
7841
7888
|
}
|
|
7842
7889
|
),
|
|
7843
|
-
|
|
7890
|
+
y && /* @__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: [
|
|
7844
7891
|
/* @__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" }),
|
|
7845
7892
|
/* @__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" })
|
|
7846
7893
|
] })
|
|
@@ -7857,17 +7904,17 @@ function sl({
|
|
|
7857
7904
|
)) }),
|
|
7858
7905
|
/* @__PURE__ */ e("div", { className: "space-y-4 mb-6", children: p.showAllLeave ? (
|
|
7859
7906
|
// LG: Show all leave types
|
|
7860
|
-
qe.map((A) => /* @__PURE__ */ e(
|
|
7907
|
+
qe.map((A) => /* @__PURE__ */ e(Ut, { leave: A, sizeMeta: p }, A.id))
|
|
7861
7908
|
) : p.showSingleLeave ? (
|
|
7862
7909
|
// MD: Show active tab leave type
|
|
7863
|
-
/* @__PURE__ */ e(
|
|
7910
|
+
/* @__PURE__ */ e(Ut, { leave: S, sizeMeta: p })
|
|
7864
7911
|
) : (
|
|
7865
7912
|
// SM: Show only available hours
|
|
7866
7913
|
/* @__PURE__ */ e("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 p-4", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
7867
7914
|
/* @__PURE__ */ e(Ae, { className: "h-5 w-5 text-blue-600 dark:text-blue-400" }),
|
|
7868
7915
|
/* @__PURE__ */ n("div", { children: [
|
|
7869
7916
|
/* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${p.table}`, children: "Available Leave" }),
|
|
7870
|
-
/* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${p.table}`, children:
|
|
7917
|
+
/* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${p.table}`, children: S.available })
|
|
7871
7918
|
] })
|
|
7872
7919
|
] }) })
|
|
7873
7920
|
) }),
|
|
@@ -7980,7 +8027,7 @@ const ll = [
|
|
|
7980
8027
|
gridCols: "grid-cols-2"
|
|
7981
8028
|
}
|
|
7982
8029
|
};
|
|
7983
|
-
function
|
|
8030
|
+
function Gt({ item: t, sizeMeta: a, showDate: s = !1 }) {
|
|
7984
8031
|
const o = t.icon;
|
|
7985
8032
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-3 p-3 rounded-lg border border-zinc-200 dark:border-zinc-800 hover:bg-zinc-50 dark:hover:bg-zinc-800/50 cursor-pointer transition-colors duration-200 group", children: [
|
|
7986
8033
|
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(o, { className: `h-6 w-6 ${t.color}` }) }),
|
|
@@ -8001,7 +8048,7 @@ function cl({
|
|
|
8001
8048
|
subtitle: i = "Drive Shared",
|
|
8002
8049
|
...u
|
|
8003
8050
|
}) {
|
|
8004
|
-
const [g, f] = L(!1),
|
|
8051
|
+
const [g, f] = L(!1), y = ie(t), r = ce[y], N = il[y];
|
|
8005
8052
|
return /* @__PURE__ */ n(
|
|
8006
8053
|
oe,
|
|
8007
8054
|
{
|
|
@@ -8029,7 +8076,7 @@ function cl({
|
|
|
8029
8076
|
),
|
|
8030
8077
|
g && /* @__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: [
|
|
8031
8078
|
/* @__PURE__ */ n("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 flex items-center gap-2", children: [
|
|
8032
|
-
/* @__PURE__ */ e(
|
|
8079
|
+
/* @__PURE__ */ e(na, { className: "h-4 w-4" }),
|
|
8033
8080
|
"Download All"
|
|
8034
8081
|
] }),
|
|
8035
8082
|
/* @__PURE__ */ n("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 flex items-center gap-2", children: [
|
|
@@ -8040,7 +8087,7 @@ function cl({
|
|
|
8040
8087
|
] })
|
|
8041
8088
|
] }),
|
|
8042
8089
|
/* @__PURE__ */ e("div", { className: `grid ${N.gridCols} gap-3 `, children: ll.map((d) => /* @__PURE__ */ e(
|
|
8043
|
-
|
|
8090
|
+
Gt,
|
|
8044
8091
|
{
|
|
8045
8092
|
item: d,
|
|
8046
8093
|
sizeMeta: N
|
|
@@ -8050,7 +8097,7 @@ function cl({
|
|
|
8050
8097
|
N.showRecent && /* @__PURE__ */ n("div", { className: "", children: [
|
|
8051
8098
|
/* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${N.item}`, children: "Recent Files" }),
|
|
8052
8099
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: ol.map((d) => /* @__PURE__ */ e(
|
|
8053
|
-
|
|
8100
|
+
Gt,
|
|
8054
8101
|
{
|
|
8055
8102
|
item: d,
|
|
8056
8103
|
sizeMeta: N,
|
|
@@ -8145,20 +8192,20 @@ const dl = [
|
|
|
8145
8192
|
maxMessageWords: 25,
|
|
8146
8193
|
showMessage: !0
|
|
8147
8194
|
}
|
|
8148
|
-
},
|
|
8195
|
+
}, qt = (t, a) => {
|
|
8149
8196
|
if (!a || a === 0) return t;
|
|
8150
8197
|
const s = t.split(" ");
|
|
8151
8198
|
return s.length <= a ? t : s.slice(0, a).join(" ") + "...";
|
|
8152
8199
|
}, ul = (t) => {
|
|
8153
8200
|
switch (t) {
|
|
8154
8201
|
case "warning":
|
|
8155
|
-
return Wt;
|
|
8156
|
-
case "success":
|
|
8157
8202
|
return Jt;
|
|
8203
|
+
case "success":
|
|
8204
|
+
return Xt;
|
|
8158
8205
|
case "banner":
|
|
8159
|
-
return
|
|
8206
|
+
return sa;
|
|
8160
8207
|
default:
|
|
8161
|
-
return
|
|
8208
|
+
return Wt;
|
|
8162
8209
|
}
|
|
8163
8210
|
}, Aa = (t) => {
|
|
8164
8211
|
switch (t) {
|
|
@@ -8205,8 +8252,8 @@ function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: o }) {
|
|
|
8205
8252
|
/* @__PURE__ */ n("div", { className: "flex gap-3 pr-6", children: [
|
|
8206
8253
|
/* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(u, { className: `h-4 w-4 ${i.icon}` }) }),
|
|
8207
8254
|
/* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
|
|
8208
|
-
/* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-1 ${t.read ? "font-medium" : "font-semibold"}`, children:
|
|
8209
|
-
a.showMessage && t.message && /* @__PURE__ */ e("div", { className: `${a.message} text-zinc-600 dark:text-zinc-400 mb-2 leading-relaxed`, children:
|
|
8255
|
+
/* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-1 ${t.read ? "font-medium" : "font-semibold"}`, children: qt(t.title, a.maxTitleWords) }),
|
|
8256
|
+
a.showMessage && t.message && /* @__PURE__ */ e("div", { className: `${a.message} text-zinc-600 dark:text-zinc-400 mb-2 leading-relaxed`, children: qt(t.message, a.maxMessageWords) }),
|
|
8210
8257
|
/* @__PURE__ */ n("div", { className: `flex items-center gap-1 ${a.time} text-zinc-500 dark:text-zinc-400`, children: [
|
|
8211
8258
|
/* @__PURE__ */ e(Ae, { className: "h-3 w-3" }),
|
|
8212
8259
|
t.time
|
|
@@ -8221,7 +8268,7 @@ function pl({ alert: t, onDismiss: a }) {
|
|
|
8221
8268
|
o(!0), a?.(t);
|
|
8222
8269
|
};
|
|
8223
8270
|
return s ? null : /* @__PURE__ */ e("div", { className: `rounded-lg border p-4 ${l.bg} ${l.border} relative`, children: /* @__PURE__ */ n("div", { className: "flex items-start gap-3", children: [
|
|
8224
|
-
/* @__PURE__ */ e(
|
|
8271
|
+
/* @__PURE__ */ e(sa, { className: `h-5 w-5 mt-0.5 ${l.icon}` }),
|
|
8225
8272
|
/* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
|
|
8226
8273
|
/* @__PURE__ */ e("div", { className: "font-semibold text-zinc-900 dark:text-zinc-100 text-sm mb-1", children: t.title }),
|
|
8227
8274
|
/* @__PURE__ */ e("div", { className: "text-zinc-600 dark:text-zinc-400 text-xs leading-relaxed", children: t.message })
|
|
@@ -8247,9 +8294,9 @@ function gl({
|
|
|
8247
8294
|
showBanner: u = !0,
|
|
8248
8295
|
...g
|
|
8249
8296
|
}) {
|
|
8250
|
-
const [f,
|
|
8251
|
-
|
|
8252
|
-
},
|
|
8297
|
+
const [f, y] = L(i), r = ie(t), N = ce[r], d = ml[r], p = (E) => {
|
|
8298
|
+
y((R) => R.filter((O) => O.id !== E.id));
|
|
8299
|
+
}, S = f.find((E) => E.type === "banner"), A = f.filter((E) => E.type !== "banner");
|
|
8253
8300
|
return /* @__PURE__ */ n(
|
|
8254
8301
|
oe,
|
|
8255
8302
|
{
|
|
@@ -8262,10 +8309,10 @@ function gl({
|
|
|
8262
8309
|
...g,
|
|
8263
8310
|
children: [
|
|
8264
8311
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${N.title}`, children: m }) }),
|
|
8265
|
-
u &&
|
|
8312
|
+
u && S && t !== "sm" && /* @__PURE__ */ e(
|
|
8266
8313
|
pl,
|
|
8267
8314
|
{
|
|
8268
|
-
alert:
|
|
8315
|
+
alert: S,
|
|
8269
8316
|
onDismiss: p
|
|
8270
8317
|
}
|
|
8271
8318
|
),
|
|
@@ -8423,7 +8470,7 @@ function xl({
|
|
|
8423
8470
|
videos: i = bl,
|
|
8424
8471
|
...u
|
|
8425
8472
|
}) {
|
|
8426
|
-
const [g, f] = L(!1),
|
|
8473
|
+
const [g, f] = L(!1), y = ie(t), r = ce[y], N = fl[y];
|
|
8427
8474
|
return /* @__PURE__ */ n(
|
|
8428
8475
|
oe,
|
|
8429
8476
|
{
|
|
@@ -8502,7 +8549,7 @@ export {
|
|
|
8502
8549
|
Dn as Breadcrumbs,
|
|
8503
8550
|
Cn as Button,
|
|
8504
8551
|
js as CampusMapMock,
|
|
8505
|
-
|
|
8552
|
+
gt as Checkbox,
|
|
8506
8553
|
Es as CommunitiesMock,
|
|
8507
8554
|
eo as CustomDataGrid,
|
|
8508
8555
|
Wl as CustomDialog,
|
|
@@ -8515,16 +8562,16 @@ export {
|
|
|
8515
8562
|
zs as DynamicConfig,
|
|
8516
8563
|
qs as EventsMock,
|
|
8517
8564
|
El as FileUploadModal,
|
|
8518
|
-
|
|
8519
|
-
|
|
8565
|
+
Hl as FullConfigPage,
|
|
8566
|
+
Pl as FullScreenLoader,
|
|
8520
8567
|
Rl as GenericFilter,
|
|
8521
8568
|
Bl as IconButton,
|
|
8522
8569
|
J as Input,
|
|
8523
8570
|
sl as LeaveBalanceMock,
|
|
8524
8571
|
Da as ManageCollectionList,
|
|
8525
|
-
|
|
8572
|
+
Pn as Modal,
|
|
8526
8573
|
at as MultiSelect,
|
|
8527
|
-
|
|
8574
|
+
Is as NewsMock,
|
|
8528
8575
|
Xs as O365MailsMock,
|
|
8529
8576
|
_n as OptionsMenu,
|
|
8530
8577
|
Vn as PageHeader,
|
|
@@ -8532,9 +8579,9 @@ export {
|
|
|
8532
8579
|
Ol as Pagination,
|
|
8533
8580
|
ha as RadioGroup,
|
|
8534
8581
|
he as SearchBar,
|
|
8535
|
-
|
|
8582
|
+
yt as Select,
|
|
8536
8583
|
oe as SelectableCard,
|
|
8537
|
-
|
|
8584
|
+
Il as Sidebar,
|
|
8538
8585
|
ga as Spinner,
|
|
8539
8586
|
ba as Textarea,
|
|
8540
8587
|
Zl as ToastProvider,
|
|
@@ -8549,9 +8596,9 @@ export {
|
|
|
8549
8596
|
Ve as axiosGet,
|
|
8550
8597
|
ql as axiosPatch,
|
|
8551
8598
|
Ze as axiosPost,
|
|
8552
|
-
|
|
8599
|
+
Hn as axiosPut,
|
|
8553
8600
|
_l as cookies,
|
|
8554
|
-
|
|
8601
|
+
Qn as createHttpClient,
|
|
8555
8602
|
Yn as directoryPermissionsApi,
|
|
8556
8603
|
Wn as filePermissionsApi,
|
|
8557
8604
|
va as gateWayUrl,
|
|
@@ -8560,14 +8607,14 @@ export {
|
|
|
8560
8607
|
Ul as getSnapshot,
|
|
8561
8608
|
Yl as http,
|
|
8562
8609
|
qn as localStore,
|
|
8563
|
-
|
|
8610
|
+
kt as myDriveGatewayBaseV2,
|
|
8564
8611
|
ie as normalizeSize,
|
|
8565
|
-
|
|
8612
|
+
Pe as notify,
|
|
8566
8613
|
ka as provisioningBase,
|
|
8567
8614
|
Ca as rbacBase,
|
|
8568
8615
|
za as searchRolesApi,
|
|
8569
8616
|
Vl as sessionStore,
|
|
8570
8617
|
ce as sizeClasses,
|
|
8571
|
-
|
|
8618
|
+
Ql as toBrowserLocalTime,
|
|
8572
8619
|
Na as userSearchBase
|
|
8573
8620
|
};
|