unifyedx-storybook-new 0.2.43 → 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,7 +1603,7 @@ const zn = {
|
|
|
1603
1603
|
// From RHF's <Controller>
|
|
1604
1604
|
showSearch: g = !0
|
|
1605
1605
|
}) => {
|
|
1606
|
-
const [f,
|
|
1606
|
+
const [f, y] = L("");
|
|
1607
1607
|
console.log("Select component - value:", a, "type:", typeof a), console.log("Select component - options:", o);
|
|
1608
1608
|
const r = f === "" ? o : o.filter(
|
|
1609
1609
|
(d) => d.label.toLowerCase().includes(f.toLowerCase())
|
|
@@ -1622,12 +1622,12 @@ const zn = {
|
|
|
1622
1622
|
/* @__PURE__ */ n(
|
|
1623
1623
|
Vr,
|
|
1624
1624
|
{
|
|
1625
|
-
className:
|
|
1625
|
+
className: Q("select-button", {
|
|
1626
1626
|
"select-button--error": !!i
|
|
1627
1627
|
}),
|
|
1628
1628
|
children: [
|
|
1629
1629
|
/* @__PURE__ */ e("span", { className: "select-value-display", children: N ? N.label : /* @__PURE__ */ e("span", { className: "placeholder", children: l }) }),
|
|
1630
|
-
/* @__PURE__ */ e(
|
|
1630
|
+
/* @__PURE__ */ e(Qt, { className: "select-chevron", "aria-hidden": "true" })
|
|
1631
1631
|
]
|
|
1632
1632
|
}
|
|
1633
1633
|
),
|
|
@@ -1642,7 +1642,7 @@ const zn = {
|
|
|
1642
1642
|
he,
|
|
1643
1643
|
{
|
|
1644
1644
|
value: f,
|
|
1645
|
-
onDebouncedChange:
|
|
1645
|
+
onDebouncedChange: y,
|
|
1646
1646
|
placeholder: "Search..."
|
|
1647
1647
|
}
|
|
1648
1648
|
) }),
|
|
@@ -1689,23 +1689,23 @@ const zn = {
|
|
|
1689
1689
|
window.removeEventListener("popstate", s);
|
|
1690
1690
|
};
|
|
1691
1691
|
}, []), { pathname: t };
|
|
1692
|
-
},
|
|
1692
|
+
}, xt = (t, a) => {
|
|
1693
1693
|
for (const s of t)
|
|
1694
|
-
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))
|
|
1695
1695
|
return s;
|
|
1696
1696
|
return null;
|
|
1697
1697
|
}, pa = ({ item: t, isCollapsed: a, level: s = 0 }) => {
|
|
1698
1698
|
const { pathname: o } = Mn(), l = t.href || t.url || t.path, [m, i] = L(!1), u = t.icon;
|
|
1699
1699
|
Z(() => {
|
|
1700
|
-
|
|
1700
|
+
xt([t], o) && i(!0);
|
|
1701
1701
|
}, [t, o]);
|
|
1702
|
-
const g = o === l, f = !g && !!
|
|
1702
|
+
const g = o === l, f = !g && !!xt([t], o), y = (r) => {
|
|
1703
1703
|
r.preventDefault(), i(!m);
|
|
1704
1704
|
};
|
|
1705
1705
|
return /* @__PURE__ */ n(
|
|
1706
1706
|
"div",
|
|
1707
1707
|
{
|
|
1708
|
-
className:
|
|
1708
|
+
className: Q("nav-item-container", {
|
|
1709
1709
|
"nav-item-container--parent-active": f,
|
|
1710
1710
|
[`nav-item-container--level-${s}`]: s > 0
|
|
1711
1711
|
}),
|
|
@@ -1716,7 +1716,7 @@ const zn = {
|
|
|
1716
1716
|
href: l,
|
|
1717
1717
|
target: t.target,
|
|
1718
1718
|
rel: t.target === "_blank" ? "noopener noreferrer" : void 0,
|
|
1719
|
-
className:
|
|
1719
|
+
className: Q("nav-item", {
|
|
1720
1720
|
"nav-item--active": g,
|
|
1721
1721
|
"nav-item--collapsed": a
|
|
1722
1722
|
}),
|
|
@@ -1728,13 +1728,13 @@ const zn = {
|
|
|
1728
1728
|
"button",
|
|
1729
1729
|
{
|
|
1730
1730
|
className: "nav-chevron-button",
|
|
1731
|
-
onClick:
|
|
1731
|
+
onClick: y,
|
|
1732
1732
|
"aria-expanded": m,
|
|
1733
1733
|
"aria-label": m ? "Collapse menu" : "Expand menu",
|
|
1734
1734
|
children: /* @__PURE__ */ e(
|
|
1735
|
-
|
|
1735
|
+
Nt,
|
|
1736
1736
|
{
|
|
1737
|
-
className:
|
|
1737
|
+
className: Q("nav-chevron", {
|
|
1738
1738
|
"nav-chevron--open": m
|
|
1739
1739
|
})
|
|
1740
1740
|
}
|
|
@@ -1747,7 +1747,7 @@ const zn = {
|
|
|
1747
1747
|
t.children && /* @__PURE__ */ e(
|
|
1748
1748
|
"div",
|
|
1749
1749
|
{
|
|
1750
|
-
className:
|
|
1750
|
+
className: Q("sub-menu", {
|
|
1751
1751
|
"sub-menu--open": m,
|
|
1752
1752
|
"sub-menu--collapsed": a
|
|
1753
1753
|
}),
|
|
@@ -1766,7 +1766,7 @@ const zn = {
|
|
|
1766
1766
|
]
|
|
1767
1767
|
}
|
|
1768
1768
|
);
|
|
1769
|
-
},
|
|
1769
|
+
}, Il = ({
|
|
1770
1770
|
navItems: t = [],
|
|
1771
1771
|
isCollapsed: a = !1,
|
|
1772
1772
|
onToggleCollapse: s,
|
|
@@ -1787,7 +1787,7 @@ const zn = {
|
|
|
1787
1787
|
/* @__PURE__ */ n(
|
|
1788
1788
|
"aside",
|
|
1789
1789
|
{
|
|
1790
|
-
className:
|
|
1790
|
+
className: Q("sidebar", {
|
|
1791
1791
|
"sidebar--collapsed": a,
|
|
1792
1792
|
"sidebar--mobile-open": o
|
|
1793
1793
|
}),
|
|
@@ -1796,7 +1796,7 @@ const zn = {
|
|
|
1796
1796
|
/* @__PURE__ */ n("div", { className: "sidebar-header", children: [
|
|
1797
1797
|
/* @__PURE__ */ e("div", { className: "sidebar-logo", children: a ? m : i }),
|
|
1798
1798
|
!a && /* @__PURE__ */ n("div", { className: "sidebar-search-container", children: [
|
|
1799
|
-
/* @__PURE__ */ e(
|
|
1799
|
+
/* @__PURE__ */ e(vt, { className: "sidebar-search-icon" }),
|
|
1800
1800
|
/* @__PURE__ */ e(
|
|
1801
1801
|
"input",
|
|
1802
1802
|
{
|
|
@@ -1845,7 +1845,7 @@ const zn = {
|
|
|
1845
1845
|
className: s,
|
|
1846
1846
|
...o
|
|
1847
1847
|
}) => {
|
|
1848
|
-
const l =
|
|
1848
|
+
const l = Q(
|
|
1849
1849
|
"spinner",
|
|
1850
1850
|
`spinner--size-${t}`,
|
|
1851
1851
|
`spinner--color-${a}`,
|
|
@@ -1870,7 +1870,7 @@ const zn = {
|
|
|
1870
1870
|
]
|
|
1871
1871
|
}
|
|
1872
1872
|
);
|
|
1873
|
-
},
|
|
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: [
|
|
1874
1874
|
/* @__PURE__ */ e(ga, { size: "large" }),
|
|
1875
1875
|
t && /* @__PURE__ */ e("span", { className: "loader-label", children: t })
|
|
1876
1876
|
] }) }), ba = ({
|
|
@@ -1885,10 +1885,10 @@ const zn = {
|
|
|
1885
1885
|
// ✅ New prop to control visibility
|
|
1886
1886
|
...u
|
|
1887
1887
|
}) => {
|
|
1888
|
-
const g = a || u.name, [f,
|
|
1888
|
+
const g = a || u.name, [f, y] = L(
|
|
1889
1889
|
u.value?.length || u.defaultValue?.length || 0
|
|
1890
1890
|
), r = (d) => {
|
|
1891
|
-
|
|
1891
|
+
y(d.target.value.length), u.onChange && u.onChange(d);
|
|
1892
1892
|
}, N = m - f;
|
|
1893
1893
|
return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${o || ""}`, children: [
|
|
1894
1894
|
/* @__PURE__ */ n("div", { className: "textarea-header", children: [
|
|
@@ -1903,7 +1903,7 @@ const zn = {
|
|
|
1903
1903
|
{
|
|
1904
1904
|
id: g,
|
|
1905
1905
|
ref: l,
|
|
1906
|
-
className:
|
|
1906
|
+
className: Q("textarea-field", {
|
|
1907
1907
|
"textarea-field--error": !!s
|
|
1908
1908
|
}),
|
|
1909
1909
|
maxLength: m,
|
|
@@ -1928,7 +1928,7 @@ const zn = {
|
|
|
1928
1928
|
{
|
|
1929
1929
|
checked: a,
|
|
1930
1930
|
onChange: s,
|
|
1931
|
-
className:
|
|
1931
|
+
className: Q("switch-element", {
|
|
1932
1932
|
// Renamed from switch-wrapper
|
|
1933
1933
|
"switch-element--error": !!l
|
|
1934
1934
|
}),
|
|
@@ -1956,7 +1956,7 @@ const zn = {
|
|
|
1956
1956
|
return /* @__PURE__ */ n(te, { children: [
|
|
1957
1957
|
se.cloneElement(t, { "data-tooltip-id": u }),
|
|
1958
1958
|
/* @__PURE__ */ e(
|
|
1959
|
-
|
|
1959
|
+
Qa,
|
|
1960
1960
|
{
|
|
1961
1961
|
id: u,
|
|
1962
1962
|
content: a,
|
|
@@ -1992,8 +1992,8 @@ const zn = {
|
|
|
1992
1992
|
showProgress: g = !0,
|
|
1993
1993
|
closeOnOverlayClick: f = !0
|
|
1994
1994
|
}) => {
|
|
1995
|
-
const
|
|
1996
|
-
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(
|
|
1997
1997
|
be,
|
|
1998
1998
|
{
|
|
1999
1999
|
as: "div",
|
|
@@ -2004,7 +2004,7 @@ const zn = {
|
|
|
2004
2004
|
/* @__PURE__ */ e(
|
|
2005
2005
|
Ne,
|
|
2006
2006
|
{
|
|
2007
|
-
as:
|
|
2007
|
+
as: H,
|
|
2008
2008
|
enter: "ease-out duration-300",
|
|
2009
2009
|
enterFrom: "opacity-0",
|
|
2010
2010
|
enterTo: "opacity-100",
|
|
@@ -2017,7 +2017,7 @@ const zn = {
|
|
|
2017
2017
|
/* @__PURE__ */ e("div", { className: "wizard-container", children: /* @__PURE__ */ e("div", { className: "wizard-positioner", children: /* @__PURE__ */ e(
|
|
2018
2018
|
Ne,
|
|
2019
2019
|
{
|
|
2020
|
-
as:
|
|
2020
|
+
as: H,
|
|
2021
2021
|
enter: "transform transition ease-in-out duration-500",
|
|
2022
2022
|
enterFrom: "translate-x-full",
|
|
2023
2023
|
enterTo: "translate-x-0",
|
|
@@ -2033,7 +2033,7 @@ const zn = {
|
|
|
2033
2033
|
onClick: m.onBack,
|
|
2034
2034
|
className: "wizard-back-button",
|
|
2035
2035
|
"aria-label": "Go back to previous step",
|
|
2036
|
-
children: /* @__PURE__ */ e(
|
|
2036
|
+
children: /* @__PURE__ */ e(Ha, { size: 20 })
|
|
2037
2037
|
}
|
|
2038
2038
|
),
|
|
2039
2039
|
/* @__PURE__ */ n("div", { className: "wizard-header-text", children: [
|
|
@@ -2079,7 +2079,7 @@ const zn = {
|
|
|
2079
2079
|
},
|
|
2080
2080
|
className: "wizard-step-motion-wrapper",
|
|
2081
2081
|
style: { overflowX: "hidden" },
|
|
2082
|
-
children:
|
|
2082
|
+
children: y && /* @__PURE__ */ e(y, { ...m })
|
|
2083
2083
|
},
|
|
2084
2084
|
o
|
|
2085
2085
|
)
|
|
@@ -2111,12 +2111,12 @@ const zn = {
|
|
|
2111
2111
|
disabled: u = !1,
|
|
2112
2112
|
size: g = "small",
|
|
2113
2113
|
label: f,
|
|
2114
|
-
children:
|
|
2114
|
+
children: y,
|
|
2115
2115
|
// ✅ Add children to the props list
|
|
2116
2116
|
onClick: r,
|
|
2117
2117
|
...N
|
|
2118
2118
|
}) => {
|
|
2119
|
-
const d = u, p =
|
|
2119
|
+
const d = u, p = Q(
|
|
2120
2120
|
"btn-base-icon",
|
|
2121
2121
|
"btn-icon-only",
|
|
2122
2122
|
Bn[g],
|
|
@@ -2148,7 +2148,7 @@ const zn = {
|
|
|
2148
2148
|
// A clearer prop name
|
|
2149
2149
|
...u
|
|
2150
2150
|
}) => {
|
|
2151
|
-
const g =
|
|
2151
|
+
const g = Q(
|
|
2152
2152
|
"page-layout",
|
|
2153
2153
|
{
|
|
2154
2154
|
"page-layout--with-footer": a,
|
|
@@ -2213,16 +2213,16 @@ const zn = {
|
|
|
2213
2213
|
onSelect: a,
|
|
2214
2214
|
triggerIcon: s = Ht
|
|
2215
2215
|
}) => {
|
|
2216
|
-
const { refs: o, floatingStyles: l } =
|
|
2217
|
-
whileElementsMounted:
|
|
2218
|
-
middleware: [
|
|
2216
|
+
const { refs: o, floatingStyles: l } = la({
|
|
2217
|
+
whileElementsMounted: da,
|
|
2218
|
+
middleware: [oa(5), ia(), ca({ padding: 5 })]
|
|
2219
2219
|
});
|
|
2220
2220
|
return /* @__PURE__ */ n(qr, { as: "div", className: "options-menu-wrapper", children: [
|
|
2221
2221
|
/* @__PURE__ */ e(Yr, { ref: o.setReference, className: "options-menu-trigger", children: /* @__PURE__ */ e(s, { size: 20 }) }),
|
|
2222
2222
|
/* @__PURE__ */ e(Wr, { children: /* @__PURE__ */ e(
|
|
2223
2223
|
ue,
|
|
2224
2224
|
{
|
|
2225
|
-
as:
|
|
2225
|
+
as: H,
|
|
2226
2226
|
enter: "transition ease-out duration-100",
|
|
2227
2227
|
enterFrom: "transform opacity-0 scale-95",
|
|
2228
2228
|
enterTo: "transform opacity-100 scale-100",
|
|
@@ -2366,14 +2366,14 @@ function Ca() {
|
|
|
2366
2366
|
function za() {
|
|
2367
2367
|
return `${Ca()}/search`;
|
|
2368
2368
|
}
|
|
2369
|
-
function
|
|
2369
|
+
function kt() {
|
|
2370
2370
|
return `${ze()}/unifyed-mydrive/v2`;
|
|
2371
2371
|
}
|
|
2372
2372
|
function Yn() {
|
|
2373
|
-
return `${
|
|
2373
|
+
return `${kt()}/directory/permissions`;
|
|
2374
2374
|
}
|
|
2375
2375
|
function Wn() {
|
|
2376
|
-
return `${
|
|
2376
|
+
return `${kt()}/file/permissions`;
|
|
2377
2377
|
}
|
|
2378
2378
|
function Ul() {
|
|
2379
2379
|
return Object.freeze({
|
|
@@ -2384,7 +2384,7 @@ function Ul() {
|
|
|
2384
2384
|
PROVISIONING_BASE: ka(),
|
|
2385
2385
|
RBAC_BASE: Ca(),
|
|
2386
2386
|
SEARCH_ROLES_API: za(),
|
|
2387
|
-
MY_DRIVE_GATEWAY_BASE_v2:
|
|
2387
|
+
MY_DRIVE_GATEWAY_BASE_v2: kt(),
|
|
2388
2388
|
DIRECTORY_PERMISSIONS_API: Yn(),
|
|
2389
2389
|
FILE_PERMISSIONS_API: Wn()
|
|
2390
2390
|
});
|
|
@@ -2397,7 +2397,7 @@ function Jn(t) {
|
|
|
2397
2397
|
return console.log("Error reading JSON from localStorage"), null;
|
|
2398
2398
|
}
|
|
2399
2399
|
}
|
|
2400
|
-
function
|
|
2400
|
+
function Ot() {
|
|
2401
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 || "";
|
|
2402
2402
|
return {
|
|
2403
2403
|
Authorization: a ? `Bearer ${a}` : void 0,
|
|
@@ -2437,7 +2437,7 @@ function Xn(t) {
|
|
|
2437
2437
|
request: null
|
|
2438
2438
|
};
|
|
2439
2439
|
}
|
|
2440
|
-
function
|
|
2440
|
+
function Qn({
|
|
2441
2441
|
enableAuthRedirect: t = !0,
|
|
2442
2442
|
defaultOpenHeaders: a = {}
|
|
2443
2443
|
} = {}) {
|
|
@@ -2452,37 +2452,37 @@ function Hn({
|
|
|
2452
2452
|
message: f?.statusText || "Request succeeded"
|
|
2453
2453
|
},
|
|
2454
2454
|
(f) => {
|
|
2455
|
-
const
|
|
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(
|
|
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);
|
|
2457
2457
|
}
|
|
2458
2458
|
);
|
|
2459
|
-
function o({ open: f = !1, customHeader:
|
|
2459
|
+
function o({ open: f = !1, customHeader: y = {} } = {}) {
|
|
2460
2460
|
if (f) {
|
|
2461
|
-
const { Authorization: r, ...N } =
|
|
2461
|
+
const { Authorization: r, ...N } = Ot();
|
|
2462
2462
|
return {
|
|
2463
|
-
headers: { ...N, ...a, ...
|
|
2463
|
+
headers: { ...N, ...a, ...y }
|
|
2464
2464
|
};
|
|
2465
2465
|
}
|
|
2466
|
-
return { headers: { ...
|
|
2466
|
+
return { headers: { ...Ot(), ...y } };
|
|
2467
2467
|
}
|
|
2468
|
-
async function l(f,
|
|
2468
|
+
async function l(f, y, r = !1, N = {}) {
|
|
2469
2469
|
return s.get(f, {
|
|
2470
|
-
params:
|
|
2470
|
+
params: y,
|
|
2471
2471
|
...o({ open: r, customHeader: N })
|
|
2472
2472
|
});
|
|
2473
2473
|
}
|
|
2474
|
-
async function m(f,
|
|
2474
|
+
async function m(f, y, r = !1, N = {}) {
|
|
2475
2475
|
const d = { ...o({ open: r, customHeader: N }) };
|
|
2476
|
-
return
|
|
2476
|
+
return y !== void 0 && (d.data = y), s.delete(f, d);
|
|
2477
2477
|
}
|
|
2478
|
-
async function i(f,
|
|
2479
|
-
return s.post(f,
|
|
2478
|
+
async function i(f, y = {}, r = !1, N = {}) {
|
|
2479
|
+
return s.post(f, y, o({ open: r, customHeader: N }));
|
|
2480
2480
|
}
|
|
2481
|
-
async function u(f,
|
|
2482
|
-
return s.put(f,
|
|
2481
|
+
async function u(f, y = {}, r = !1, N = {}) {
|
|
2482
|
+
return s.put(f, y, o({ open: r, customHeader: N }));
|
|
2483
2483
|
}
|
|
2484
|
-
async function g(f,
|
|
2485
|
-
return s.patch(f,
|
|
2484
|
+
async function g(f, y = {}, r = !1, N = {}) {
|
|
2485
|
+
return s.patch(f, y, o({ open: r, customHeader: N }));
|
|
2486
2486
|
}
|
|
2487
2487
|
return {
|
|
2488
2488
|
instance: s,
|
|
@@ -2494,7 +2494,7 @@ function Hn({
|
|
|
2494
2494
|
axiosPatch: g
|
|
2495
2495
|
};
|
|
2496
2496
|
}
|
|
2497
|
-
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) => {
|
|
2498
2498
|
try {
|
|
2499
2499
|
switch (t) {
|
|
2500
2500
|
case $e.USER: {
|
|
@@ -2521,7 +2521,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2521
2521
|
type: "User",
|
|
2522
2522
|
avatarUrl: a?.profileImage || Ye(l)
|
|
2523
2523
|
};
|
|
2524
|
-
}),
|
|
2524
|
+
}), It = (t) => {
|
|
2525
2525
|
try {
|
|
2526
2526
|
const a = JSON.parse(t);
|
|
2527
2527
|
return Array.isArray(a) ? a : [];
|
|
@@ -2572,14 +2572,14 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2572
2572
|
if (Array.isArray(s))
|
|
2573
2573
|
o = s;
|
|
2574
2574
|
else if (typeof s == "string")
|
|
2575
|
-
o =
|
|
2575
|
+
o = It(s.trim());
|
|
2576
2576
|
else if (s && typeof s == "object") {
|
|
2577
2577
|
const l = s.data;
|
|
2578
|
-
Array.isArray(l) ? o = l : typeof l == "string" && (o =
|
|
2578
|
+
Array.isArray(l) ? o = l : typeof l == "string" && (o = It(l.trim()));
|
|
2579
2579
|
}
|
|
2580
2580
|
return Kn(o);
|
|
2581
2581
|
}
|
|
2582
|
-
},
|
|
2582
|
+
}, Ct = (t, a) => {
|
|
2583
2583
|
const [s, o] = L(t);
|
|
2584
2584
|
return Z(
|
|
2585
2585
|
() => {
|
|
@@ -2616,15 +2616,15 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2616
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",
|
|
2617
2617
|
children: [
|
|
2618
2618
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
2619
|
-
/* @__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(
|
|
2620
2620
|
"img",
|
|
2621
2621
|
{
|
|
2622
2622
|
src: f.avatarUrl || `https://avatar.vercel.sh/${f.name}.svg?text=${f?.name?.charAt(0) || "U"}`,
|
|
2623
2623
|
alt: f.name,
|
|
2624
|
-
className: `w-10 h-10 rounded-full border-2 border-white ${
|
|
2625
|
-
style: { zIndex:
|
|
2624
|
+
className: `w-10 h-10 rounded-full border-2 border-white ${y > 0 ? "-ml-4" : ""}`,
|
|
2625
|
+
style: { zIndex: y }
|
|
2626
2626
|
},
|
|
2627
|
-
f.id ||
|
|
2627
|
+
f.id || y
|
|
2628
2628
|
)) }),
|
|
2629
2629
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-800 truncate", children: g })
|
|
2630
2630
|
] }),
|
|
@@ -2634,11 +2634,11 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2634
2634
|
);
|
|
2635
2635
|
}, Pt = [
|
|
2636
2636
|
{ id: 1, name: $e.USER, icon: tr, code: "users" },
|
|
2637
|
-
{ id: 2, name: $e.GROUP, icon:
|
|
2637
|
+
{ id: 2, name: $e.GROUP, icon: Zt, code: "groups" },
|
|
2638
2638
|
{ id: 3, name: $e.ROLE, icon: ar, code: "roles" }
|
|
2639
|
-
],
|
|
2640
|
-
{ id: 1, name:
|
|
2641
|
-
{ id: 2, name:
|
|
2639
|
+
], Mt = [
|
|
2640
|
+
{ id: 1, name: $t.View, icon: Kt },
|
|
2641
|
+
{ id: 2, name: $t.Manage, icon: ea }
|
|
2642
2642
|
], ts = Ka().shape({
|
|
2643
2643
|
pendingInvites: er().min(1, "You must add at least one person to invite.")
|
|
2644
2644
|
}), as = ({
|
|
@@ -2652,7 +2652,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2652
2652
|
},
|
|
2653
2653
|
isChanged: u = !1
|
|
2654
2654
|
}) => {
|
|
2655
|
-
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]), {
|
|
2656
2656
|
control: U,
|
|
2657
2657
|
handleSubmit: Y,
|
|
2658
2658
|
watch: G,
|
|
@@ -2665,30 +2665,30 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2665
2665
|
name: "pendingInvites"
|
|
2666
2666
|
}), b = G("pendingInvites");
|
|
2667
2667
|
Z(() => {
|
|
2668
|
-
N.length > 1 ? (R(!0), Zn(g.name, N).then((
|
|
2669
|
-
p(
|
|
2670
|
-
}).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()));
|
|
2671
2671
|
}, [N, g]);
|
|
2672
|
-
const
|
|
2672
|
+
const x = (D) => {
|
|
2673
2673
|
A((B) => {
|
|
2674
2674
|
const _ = new Set(B);
|
|
2675
|
-
return _.has(
|
|
2675
|
+
return _.has(D) ? _.delete(D) : _.add(D), _;
|
|
2676
2676
|
});
|
|
2677
|
-
},
|
|
2678
|
-
d.filter((
|
|
2679
|
-
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 });
|
|
2680
2680
|
}), A(/* @__PURE__ */ new Set()), r("");
|
|
2681
|
-
}, M = (
|
|
2682
|
-
V(
|
|
2683
|
-
(B, _) => v(_, { ...w[_], permission:
|
|
2681
|
+
}, M = (D) => {
|
|
2682
|
+
V(D), w.forEach(
|
|
2683
|
+
(B, _) => v(_, { ...w[_], permission: D.name })
|
|
2684
2684
|
);
|
|
2685
|
-
}, z = async (
|
|
2685
|
+
}, z = async (D) => {
|
|
2686
2686
|
try {
|
|
2687
2687
|
if (l === de.DRIVE) {
|
|
2688
|
-
const B =
|
|
2689
|
-
id:
|
|
2690
|
-
permission:
|
|
2691
|
-
type:
|
|
2688
|
+
const B = D.pendingInvites.map((P) => ({
|
|
2689
|
+
id: P.id,
|
|
2690
|
+
permission: P.permission,
|
|
2691
|
+
type: P.type.toLowerCase()
|
|
2692
2692
|
}));
|
|
2693
2693
|
i({
|
|
2694
2694
|
entity: t,
|
|
@@ -2697,7 +2697,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2697
2697
|
// Always send updated existing shares
|
|
2698
2698
|
}, o);
|
|
2699
2699
|
} else if (l === de.INTEREST) {
|
|
2700
|
-
const B =
|
|
2700
|
+
const B = D.pendingInvites.map((_) => ({
|
|
2701
2701
|
identity: _.id,
|
|
2702
2702
|
type: _.type.toLowerCase(),
|
|
2703
2703
|
opt: !0,
|
|
@@ -2708,10 +2708,10 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2708
2708
|
}));
|
|
2709
2709
|
i(B, o);
|
|
2710
2710
|
} else if (l === de.ARTICLE) {
|
|
2711
|
-
const B =
|
|
2712
|
-
id:
|
|
2713
|
-
permission:
|
|
2714
|
-
type:
|
|
2711
|
+
const B = D.pendingInvites.map((P) => ({
|
|
2712
|
+
id: P.id,
|
|
2713
|
+
permission: P.permission,
|
|
2714
|
+
type: P.type.toLowerCase()
|
|
2715
2715
|
}));
|
|
2716
2716
|
i({
|
|
2717
2717
|
entity: t,
|
|
@@ -2719,15 +2719,15 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2719
2719
|
existingShares: o
|
|
2720
2720
|
}, o);
|
|
2721
2721
|
} else
|
|
2722
|
-
i(
|
|
2722
|
+
i(D, o);
|
|
2723
2723
|
setTimeout(() => {
|
|
2724
2724
|
s();
|
|
2725
2725
|
}, 1e3);
|
|
2726
2726
|
} catch (B) {
|
|
2727
2727
|
throw console.error("Failed to submit invites:", B), B;
|
|
2728
2728
|
}
|
|
2729
|
-
},
|
|
2730
|
-
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);
|
|
2731
2731
|
return B ? `${B.permission}` : "";
|
|
2732
2732
|
}, F = () => {
|
|
2733
2733
|
switch (l) {
|
|
@@ -2754,7 +2754,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2754
2754
|
{
|
|
2755
2755
|
onClick: s,
|
|
2756
2756
|
className: "text-gray-500 hover:text-gray-800 hover:cursor-pointer",
|
|
2757
|
-
children: /* @__PURE__ */ e(
|
|
2757
|
+
children: /* @__PURE__ */ e(He, { className: "h-6 w-6" })
|
|
2758
2758
|
}
|
|
2759
2759
|
)
|
|
2760
2760
|
] })
|
|
@@ -2763,9 +2763,9 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2763
2763
|
(l === de.DRIVE || m) && /* @__PURE__ */ e(
|
|
2764
2764
|
es,
|
|
2765
2765
|
{
|
|
2766
|
-
users: o.users.filter((
|
|
2767
|
-
groups: o.groups.filter((
|
|
2768
|
-
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"),
|
|
2769
2769
|
onClick: a
|
|
2770
2770
|
}
|
|
2771
2771
|
),
|
|
@@ -2781,14 +2781,14 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2781
2781
|
/* @__PURE__ */ e(
|
|
2782
2782
|
ue,
|
|
2783
2783
|
{
|
|
2784
|
-
as:
|
|
2784
|
+
as: H,
|
|
2785
2785
|
leave: "transition ease-in duration-100",
|
|
2786
2786
|
leaveFrom: "opacity-100",
|
|
2787
2787
|
leaveTo: "opacity-0",
|
|
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((
|
|
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(
|
|
2789
2789
|
K.Option,
|
|
2790
2790
|
{
|
|
2791
|
-
value:
|
|
2791
|
+
value: D,
|
|
2792
2792
|
className: ({ active: B }) => `${B ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
|
|
2793
2793
|
children: ({ selected: B }) => /* @__PURE__ */ n(te, { children: [
|
|
2794
2794
|
/* @__PURE__ */ n(
|
|
@@ -2797,19 +2797,19 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2797
2797
|
className: `${B ? "font-medium" : "font-normal"} flex items-center`,
|
|
2798
2798
|
children: [
|
|
2799
2799
|
/* @__PURE__ */ e(
|
|
2800
|
-
|
|
2800
|
+
D.icon,
|
|
2801
2801
|
{
|
|
2802
2802
|
className: `h-5 w-5 mr-2 ${B ? "text-white" : "text-gray-400"}`
|
|
2803
2803
|
}
|
|
2804
2804
|
),
|
|
2805
|
-
|
|
2805
|
+
D.name
|
|
2806
2806
|
]
|
|
2807
2807
|
}
|
|
2808
2808
|
),
|
|
2809
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" }) })
|
|
2810
2810
|
] })
|
|
2811
2811
|
},
|
|
2812
|
-
|
|
2812
|
+
D.id
|
|
2813
2813
|
)) })
|
|
2814
2814
|
}
|
|
2815
2815
|
)
|
|
@@ -2818,8 +2818,8 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2818
2818
|
he,
|
|
2819
2819
|
{
|
|
2820
2820
|
placeholder: `Search by ${g.name.toLowerCase()}...`,
|
|
2821
|
-
onDebouncedChange: (
|
|
2822
|
-
value:
|
|
2821
|
+
onDebouncedChange: (D) => r(D),
|
|
2822
|
+
value: y
|
|
2823
2823
|
}
|
|
2824
2824
|
) }),
|
|
2825
2825
|
/* @__PURE__ */ e(ke, { children: (d?.length > 0 || E) && /* @__PURE__ */ e(
|
|
@@ -2831,19 +2831,19 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2831
2831
|
transition: { duration: 0.2 },
|
|
2832
2832
|
className: "absolute top-full mt-2 w-full col-span-3 bg-white border border-gray-300 rounded-lg shadow-lg z-10",
|
|
2833
2833
|
children: E ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500", children: "Loading..." }) : /* @__PURE__ */ n(te, { children: [
|
|
2834
|
-
/* @__PURE__ */ e("div", { className: "max-h-60 overflow-y-auto p-2 space-y-1", children: d.map((
|
|
2835
|
-
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);
|
|
2836
2836
|
return /* @__PURE__ */ n(
|
|
2837
2837
|
"div",
|
|
2838
2838
|
{
|
|
2839
|
-
onClick: () => B ? null :
|
|
2839
|
+
onClick: () => B ? null : x(D.id),
|
|
2840
2840
|
className: `flex items-center gap-3 p-2 rounded-md hover:bg-blue-50 ${B ? " hover:cursor-not-allowed" : "hover:cursor-pointer"}`,
|
|
2841
2841
|
children: [
|
|
2842
2842
|
/* @__PURE__ */ e(
|
|
2843
2843
|
"input",
|
|
2844
2844
|
{
|
|
2845
2845
|
type: "checkbox",
|
|
2846
|
-
checked:
|
|
2846
|
+
checked: S.has(D.id),
|
|
2847
2847
|
readOnly: !0,
|
|
2848
2848
|
className: "h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500",
|
|
2849
2849
|
disabled: !!B
|
|
@@ -2852,19 +2852,19 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2852
2852
|
/* @__PURE__ */ e(
|
|
2853
2853
|
"img",
|
|
2854
2854
|
{
|
|
2855
|
-
src:
|
|
2856
|
-
alt:
|
|
2855
|
+
src: D.avatarUrl || `https://avatar.vercel.sh/${D.name}.svg?text=${D.name.charAt(0)}`,
|
|
2856
|
+
alt: D.name,
|
|
2857
2857
|
className: "w-8 h-8 rounded-full"
|
|
2858
2858
|
}
|
|
2859
2859
|
),
|
|
2860
|
-
/* @__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 }),
|
|
2861
2861
|
B ? /* @__PURE__ */ n(te, { children: [
|
|
2862
2862
|
/* @__PURE__ */ e("span", { className: "text-sm px-[12px] py-[2px] border border-dashed rounded-xl bg-teal-100 text-teal-700", children: B }),
|
|
2863
2863
|
/* @__PURE__ */ e("span", { className: "text-sm text-gray-400", children: "Already added" })
|
|
2864
2864
|
] }) : ""
|
|
2865
2865
|
]
|
|
2866
2866
|
},
|
|
2867
|
-
|
|
2867
|
+
D.id
|
|
2868
2868
|
);
|
|
2869
2869
|
}) }),
|
|
2870
2870
|
/* @__PURE__ */ n("div", { className: "flex justify-end gap-2 p-2 border-t border-gray-300", children: [
|
|
@@ -2879,8 +2879,8 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2879
2879
|
/* @__PURE__ */ e(
|
|
2880
2880
|
"button",
|
|
2881
2881
|
{
|
|
2882
|
-
onClick:
|
|
2883
|
-
disabled:
|
|
2882
|
+
onClick: $,
|
|
2883
|
+
disabled: S.size === 0,
|
|
2884
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",
|
|
2885
2885
|
children: "Add"
|
|
2886
2886
|
}
|
|
@@ -2922,14 +2922,14 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2922
2922
|
/* @__PURE__ */ e(
|
|
2923
2923
|
ue,
|
|
2924
2924
|
{
|
|
2925
|
-
as:
|
|
2925
|
+
as: H,
|
|
2926
2926
|
leave: "transition ease-in duration-100",
|
|
2927
2927
|
leaveFrom: "opacity-100",
|
|
2928
2928
|
leaveTo: "opacity-0",
|
|
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:
|
|
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(
|
|
2930
2930
|
K.Option,
|
|
2931
2931
|
{
|
|
2932
|
-
value:
|
|
2932
|
+
value: D,
|
|
2933
2933
|
className: ({ active: B }) => `${B ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
|
|
2934
2934
|
children: ({ selected: B, active: _ }) => /* @__PURE__ */ n(te, { children: [
|
|
2935
2935
|
/* @__PURE__ */ n(
|
|
@@ -2938,13 +2938,13 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2938
2938
|
className: `${B ? "font-medium" : "font-normal"} flex items-center`,
|
|
2939
2939
|
children: [
|
|
2940
2940
|
/* @__PURE__ */ e(
|
|
2941
|
-
|
|
2941
|
+
D.icon,
|
|
2942
2942
|
{
|
|
2943
2943
|
className: `h-5 w-5 mr-2 ${_ ? "text-white" : "text-gray-400"}`
|
|
2944
2944
|
}
|
|
2945
2945
|
),
|
|
2946
2946
|
"Can ",
|
|
2947
|
-
|
|
2947
|
+
D.name
|
|
2948
2948
|
]
|
|
2949
2949
|
}
|
|
2950
2950
|
),
|
|
@@ -2957,7 +2957,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2957
2957
|
) })
|
|
2958
2958
|
] })
|
|
2959
2959
|
},
|
|
2960
|
-
|
|
2960
|
+
D.id
|
|
2961
2961
|
)) })
|
|
2962
2962
|
}
|
|
2963
2963
|
)
|
|
@@ -2965,7 +2965,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2965
2965
|
}
|
|
2966
2966
|
)
|
|
2967
2967
|
] }),
|
|
2968
|
-
/* @__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(
|
|
2969
2969
|
le.div,
|
|
2970
2970
|
{
|
|
2971
2971
|
layout: !0,
|
|
@@ -2979,29 +2979,29 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2979
2979
|
/* @__PURE__ */ e(
|
|
2980
2980
|
"img",
|
|
2981
2981
|
{
|
|
2982
|
-
src:
|
|
2982
|
+
src: D.avatarUrl || `https://avatar.vercel.sh/${D.name}.svg?text=${D.name.charAt(0)}`,
|
|
2983
2983
|
className: "w-8 h-8 rounded-full flex-shrink-0"
|
|
2984
2984
|
}
|
|
2985
2985
|
),
|
|
2986
|
-
/* @__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 })
|
|
2987
2987
|
] }),
|
|
2988
2988
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
2989
2989
|
l === de.DRIVE && /* @__PURE__ */ n("span", { className: "text-sm text-gray-500", children: [
|
|
2990
2990
|
"can ",
|
|
2991
|
-
|
|
2991
|
+
D.permission
|
|
2992
2992
|
] }),
|
|
2993
2993
|
/* @__PURE__ */ e(
|
|
2994
2994
|
"button",
|
|
2995
2995
|
{
|
|
2996
2996
|
onClick: () => k(B),
|
|
2997
2997
|
className: "text-gray-400 hover:text-red-500 hover:cursor-pointer",
|
|
2998
|
-
children: /* @__PURE__ */ e(
|
|
2998
|
+
children: /* @__PURE__ */ e(He, { className: "h-5 w-5" })
|
|
2999
2999
|
}
|
|
3000
3000
|
)
|
|
3001
3001
|
] })
|
|
3002
3002
|
]
|
|
3003
3003
|
},
|
|
3004
|
-
|
|
3004
|
+
D.id
|
|
3005
3005
|
)) }) })
|
|
3006
3006
|
]
|
|
3007
3007
|
}
|
|
@@ -3036,17 +3036,17 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3036
3036
|
] }) })
|
|
3037
3037
|
] });
|
|
3038
3038
|
}, it = [
|
|
3039
|
-
{ name: "Can view", icon:
|
|
3040
|
-
{ name: "Can manage", icon:
|
|
3039
|
+
{ name: "Can view", icon: Kt, value: "view" },
|
|
3040
|
+
{ name: "Can manage", icon: ea, value: "edit" },
|
|
3041
3041
|
{ name: "Remove", icon: or, isDestructive: !0, value: "remove" }
|
|
3042
3042
|
], rs = ({ item: t, allowedPermissions: a, onPermissionChange: s }) => {
|
|
3043
|
-
const [o, l] = L(!1), { refs: m, floatingStyles: i, context: u } =
|
|
3043
|
+
const [o, l] = L(!1), { refs: m, floatingStyles: i, context: u } = la({
|
|
3044
3044
|
open: o,
|
|
3045
3045
|
onOpenChange: l,
|
|
3046
|
-
middleware: [
|
|
3047
|
-
whileElementsMounted:
|
|
3046
|
+
middleware: [oa(8), ia(), ca({ padding: 8 })],
|
|
3047
|
+
whileElementsMounted: da,
|
|
3048
3048
|
placement: "bottom-end"
|
|
3049
|
-
}), g = Zr(u), f = Kr(u), { getReferenceProps:
|
|
3049
|
+
}), g = Zr(u), f = Kr(u), { getReferenceProps: y, getFloatingProps: r } = en([
|
|
3050
3050
|
g,
|
|
3051
3051
|
f
|
|
3052
3052
|
]), N = it.find((p) => p.name === t.permission || p.value === t.permission) || it[0];
|
|
@@ -3060,7 +3060,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3060
3060
|
K.Button,
|
|
3061
3061
|
{
|
|
3062
3062
|
ref: m.setReference,
|
|
3063
|
-
...
|
|
3063
|
+
...y(),
|
|
3064
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",
|
|
3065
3065
|
children: [
|
|
3066
3066
|
/* @__PURE__ */ e("span", { className: "block truncate", children: t.permission }),
|
|
@@ -3071,7 +3071,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3071
3071
|
/* @__PURE__ */ e(tn, { children: /* @__PURE__ */ e(
|
|
3072
3072
|
ue,
|
|
3073
3073
|
{
|
|
3074
|
-
as:
|
|
3074
|
+
as: H,
|
|
3075
3075
|
show: o,
|
|
3076
3076
|
enter: "transition ease-out duration-100",
|
|
3077
3077
|
enterFrom: "transform opacity-0 scale-95",
|
|
@@ -3091,24 +3091,24 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3091
3091
|
K.Option,
|
|
3092
3092
|
{
|
|
3093
3093
|
className: ({
|
|
3094
|
-
active:
|
|
3094
|
+
active: S
|
|
3095
3095
|
}) => `relative select-none py-2 pl-10 pr-4 hover:cursor-pointer
|
|
3096
|
-
${
|
|
3097
|
-
${p.isDestructive &&
|
|
3098
|
-
${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" : ""}`,
|
|
3099
3099
|
value: p,
|
|
3100
|
-
children: ({ selected:
|
|
3100
|
+
children: ({ selected: S }) => /* @__PURE__ */ n(te, { children: [
|
|
3101
3101
|
/* @__PURE__ */ n(
|
|
3102
3102
|
"span",
|
|
3103
3103
|
{
|
|
3104
|
-
className: `flex items-center gap-2 truncate ${
|
|
3104
|
+
className: `flex items-center gap-2 truncate ${S ? "font-medium" : "font-normal"}`,
|
|
3105
3105
|
children: [
|
|
3106
3106
|
/* @__PURE__ */ e(p.icon, { className: "h-5 w-5", "aria-hidden": "true" }),
|
|
3107
3107
|
p.name
|
|
3108
3108
|
]
|
|
3109
3109
|
}
|
|
3110
3110
|
),
|
|
3111
|
-
|
|
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" }) })
|
|
3112
3112
|
] })
|
|
3113
3113
|
},
|
|
3114
3114
|
p.name
|
|
@@ -3128,7 +3128,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3128
3128
|
existingShares: l,
|
|
3129
3129
|
allowedPermissions: m
|
|
3130
3130
|
}) => {
|
|
3131
|
-
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 = {
|
|
3132
3132
|
users: i.users.filter(
|
|
3133
3133
|
(R) => R.name.toLowerCase().includes(N.toLowerCase())
|
|
3134
3134
|
),
|
|
@@ -3146,7 +3146,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3146
3146
|
(C) => C.id === R.id ? { ...C, permission: Y } : C
|
|
3147
3147
|
)
|
|
3148
3148
|
}));
|
|
3149
|
-
},
|
|
3149
|
+
}, S = () => {
|
|
3150
3150
|
const R = {
|
|
3151
3151
|
users: i.users.filter((O) => O.permission !== "remove"),
|
|
3152
3152
|
groups: i.groups.filter((O) => O.permission !== "remove"),
|
|
@@ -3164,7 +3164,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3164
3164
|
onClick: () => a(i),
|
|
3165
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",
|
|
3166
3166
|
children: [
|
|
3167
|
-
/* @__PURE__ */ e(
|
|
3167
|
+
/* @__PURE__ */ e(ta, { className: "h-5 w-5" }),
|
|
3168
3168
|
" Back"
|
|
3169
3169
|
]
|
|
3170
3170
|
}
|
|
@@ -3175,7 +3175,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3175
3175
|
{
|
|
3176
3176
|
onClick: s,
|
|
3177
3177
|
className: "text-gray-500 hover:text-gray-800 p-2 rounded-full hover:bg-gray-100 hover:cursor-pointer",
|
|
3178
|
-
children: /* @__PURE__ */ e(
|
|
3178
|
+
children: /* @__PURE__ */ e(He, { className: "h-6 w-6" })
|
|
3179
3179
|
}
|
|
3180
3180
|
)
|
|
3181
3181
|
] }),
|
|
@@ -3198,7 +3198,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3198
3198
|
he,
|
|
3199
3199
|
{
|
|
3200
3200
|
onDebouncedChange: r,
|
|
3201
|
-
value:
|
|
3201
|
+
value: y,
|
|
3202
3202
|
placeholder: `Search in ${E[g]}...`
|
|
3203
3203
|
}
|
|
3204
3204
|
) })
|
|
@@ -3210,7 +3210,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3210
3210
|
animate: { y: 0, opacity: 1 },
|
|
3211
3211
|
exit: { y: -10, opacity: 0 },
|
|
3212
3212
|
transition: { duration: 0.2 },
|
|
3213
|
-
children: /* @__PURE__ */ e(ne.Panels, { as:
|
|
3213
|
+
children: /* @__PURE__ */ e(ne.Panels, { as: H, children: A.map((R) => /* @__PURE__ */ e(
|
|
3214
3214
|
ne.Panel,
|
|
3215
3215
|
{
|
|
3216
3216
|
className: "space-y-3 focus:outline-none",
|
|
@@ -3276,13 +3276,13 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3276
3276
|
animate: { opacity: 1 },
|
|
3277
3277
|
className: "flex flex-col items-center justify-center text-center p-8 mt-10 bg-white rounded-lg border border-gray-300",
|
|
3278
3278
|
children: [
|
|
3279
|
-
/* @__PURE__ */ e(
|
|
3279
|
+
/* @__PURE__ */ e(Zt, { className: "h-12 w-12 text-gray-400" }),
|
|
3280
3280
|
/* @__PURE__ */ n("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: [
|
|
3281
3281
|
"No ",
|
|
3282
3282
|
E[g],
|
|
3283
3283
|
" Found"
|
|
3284
3284
|
] }),
|
|
3285
|
-
/* @__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.` })
|
|
3286
3286
|
]
|
|
3287
3287
|
}
|
|
3288
3288
|
)
|
|
@@ -3297,7 +3297,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3297
3297
|
/* @__PURE__ */ e("div", { className: "p-4 bg-white border-t border-gray-300 flex justify-end", children: /* @__PURE__ */ e(
|
|
3298
3298
|
"button",
|
|
3299
3299
|
{
|
|
3300
|
-
onClick:
|
|
3300
|
+
onClick: S,
|
|
3301
3301
|
className: "px-4 py-2 bg-blue-600 text-white rounded-md shadow hover:bg-blue-700",
|
|
3302
3302
|
children: "Update"
|
|
3303
3303
|
}
|
|
@@ -3318,9 +3318,9 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3318
3318
|
onClose: s,
|
|
3319
3319
|
members: o
|
|
3320
3320
|
}) => {
|
|
3321
|
-
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(
|
|
3322
3322
|
(d) => d.name.toLowerCase().includes(g.toLowerCase())
|
|
3323
|
-
),
|
|
3323
|
+
), y = {
|
|
3324
3324
|
hidden: { opacity: 0 },
|
|
3325
3325
|
visible: {
|
|
3326
3326
|
opacity: 1,
|
|
@@ -3350,7 +3350,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3350
3350
|
) : /* @__PURE__ */ e(
|
|
3351
3351
|
le.ul,
|
|
3352
3352
|
{
|
|
3353
|
-
variants:
|
|
3353
|
+
variants: y,
|
|
3354
3354
|
initial: "hidden",
|
|
3355
3355
|
animate: "visible",
|
|
3356
3356
|
className: "divide-y divide-gray-200",
|
|
@@ -3390,7 +3390,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3390
3390
|
onClick: a,
|
|
3391
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",
|
|
3392
3392
|
children: [
|
|
3393
|
-
/* @__PURE__ */ e(
|
|
3393
|
+
/* @__PURE__ */ e(ta, { className: "h-5 w-5" }),
|
|
3394
3394
|
" Back"
|
|
3395
3395
|
]
|
|
3396
3396
|
}
|
|
@@ -3404,7 +3404,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3404
3404
|
{
|
|
3405
3405
|
onClick: s,
|
|
3406
3406
|
className: "text-gray-500 hover:text-gray-800 p-2 rounded-full hover:bg-gray-100 hover:cursor-pointer",
|
|
3407
|
-
children: /* @__PURE__ */ e(
|
|
3407
|
+
children: /* @__PURE__ */ e(He, { className: "h-6 w-6" })
|
|
3408
3408
|
}
|
|
3409
3409
|
)
|
|
3410
3410
|
] }),
|
|
@@ -3439,10 +3439,10 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3439
3439
|
allowedPermissions: u = [],
|
|
3440
3440
|
...g
|
|
3441
3441
|
}) => {
|
|
3442
|
-
const [f,
|
|
3443
|
-
|
|
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();
|
|
3444
3444
|
}, Y = () => {
|
|
3445
|
-
|
|
3445
|
+
y(pe.MANAGE);
|
|
3446
3446
|
}, G = async ({ id: w, name: T, type: k }) => {
|
|
3447
3447
|
if (k === "groups") {
|
|
3448
3448
|
try {
|
|
@@ -3452,15 +3452,15 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3452
3452
|
}
|
|
3453
3453
|
R(resp);
|
|
3454
3454
|
}
|
|
3455
|
-
p({ id: w, type: k, name: T }), V(f),
|
|
3455
|
+
p({ id: w, type: k, name: T }), V(f), y(pe.MEMBERS);
|
|
3456
3456
|
}, C = (w) => {
|
|
3457
3457
|
console.log("changedExistingShares", w), N(w);
|
|
3458
|
-
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));
|
|
3459
3459
|
console.log("Existing data:", T), console.log("Changed data:", k);
|
|
3460
3460
|
const v = !ot.isEqual(T, k);
|
|
3461
|
-
console.log("hasPermissionChanged:", v), A(v),
|
|
3461
|
+
console.log("hasPermissionChanged:", v), A(v), y(f === pe.MEMBERS ? O : pe.INVITE);
|
|
3462
3462
|
};
|
|
3463
|
-
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: [
|
|
3464
3464
|
/* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
|
|
3465
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: (() => {
|
|
3466
3466
|
switch (f) {
|
|
@@ -3532,7 +3532,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3532
3532
|
onFinalSubmit: (w) => {
|
|
3533
3533
|
s(w, r);
|
|
3534
3534
|
},
|
|
3535
|
-
isChanged:
|
|
3535
|
+
isChanged: S
|
|
3536
3536
|
}
|
|
3537
3537
|
)
|
|
3538
3538
|
},
|
|
@@ -3560,15 +3560,15 @@ function at({
|
|
|
3560
3560
|
// NEW: search behavior
|
|
3561
3561
|
searchMode: f = "client",
|
|
3562
3562
|
// "client" | "server"
|
|
3563
|
-
onSearch:
|
|
3563
|
+
onSearch: y,
|
|
3564
3564
|
// (query: string) => void (required if searchMode==="server")
|
|
3565
3565
|
serverLoading: r = !1,
|
|
3566
3566
|
minSearchChars: N = 2,
|
|
3567
3567
|
// NEW: mappers (id/label keys)
|
|
3568
|
-
getOptionId: d = (
|
|
3569
|
-
getOptionLabel: p = (
|
|
3568
|
+
getOptionId: d = (S) => String(S.id),
|
|
3569
|
+
getOptionLabel: p = (S) => S.name
|
|
3570
3570
|
}) {
|
|
3571
|
-
const
|
|
3571
|
+
const S = Xe(), A = Xe(), [E, R] = L(""), O = ge(""), V = me(() => {
|
|
3572
3572
|
const w = /* @__PURE__ */ new Map();
|
|
3573
3573
|
for (const T of a) w.set(d(T), T);
|
|
3574
3574
|
return w;
|
|
@@ -3578,8 +3578,8 @@ function at({
|
|
|
3578
3578
|
return a.filter((T) => p(T).toLowerCase().includes(w));
|
|
3579
3579
|
}, [a, E, p]);
|
|
3580
3580
|
Z(() => {
|
|
3581
|
-
f === "server" && E.length >= N && E !== O.current && (O.current = E,
|
|
3582
|
-
}, [E, f, N,
|
|
3581
|
+
f === "server" && E.length >= N && E !== O.current && (O.current = E, y && y(E));
|
|
3582
|
+
}, [E, f, N, y]);
|
|
3583
3583
|
const G = f === "client" ? Y : a, C = () => {
|
|
3584
3584
|
if (!U.length)
|
|
3585
3585
|
return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
|
|
@@ -3607,7 +3607,7 @@ function at({
|
|
|
3607
3607
|
/* @__PURE__ */ e(
|
|
3608
3608
|
K.Label,
|
|
3609
3609
|
{
|
|
3610
|
-
id:
|
|
3610
|
+
id: S,
|
|
3611
3611
|
className: "block text-sm font-medium leading-6 text-gray-900",
|
|
3612
3612
|
children: t
|
|
3613
3613
|
}
|
|
@@ -3616,7 +3616,7 @@ function at({
|
|
|
3616
3616
|
/* @__PURE__ */ n(
|
|
3617
3617
|
K.Button,
|
|
3618
3618
|
{
|
|
3619
|
-
"aria-labelledby":
|
|
3619
|
+
"aria-labelledby": S,
|
|
3620
3620
|
"aria-invalid": !!i,
|
|
3621
3621
|
"aria-describedby": i ? A : void 0,
|
|
3622
3622
|
onBlur: l,
|
|
@@ -3626,14 +3626,14 @@ function at({
|
|
|
3626
3626
|
),
|
|
3627
3627
|
children: [
|
|
3628
3628
|
/* @__PURE__ */ e("span", { className: "block truncate", children: C() }),
|
|
3629
|
-
/* @__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" }) })
|
|
3630
3630
|
]
|
|
3631
3631
|
}
|
|
3632
3632
|
),
|
|
3633
3633
|
/* @__PURE__ */ e(
|
|
3634
3634
|
ue,
|
|
3635
3635
|
{
|
|
3636
|
-
as:
|
|
3636
|
+
as: H,
|
|
3637
3637
|
show: w,
|
|
3638
3638
|
leave: "transition ease-in duration-100",
|
|
3639
3639
|
leaveFrom: "opacity-100",
|
|
@@ -3649,28 +3649,28 @@ function at({
|
|
|
3649
3649
|
) }),
|
|
3650
3650
|
f === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
|
|
3651
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) => {
|
|
3652
|
-
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;
|
|
3653
3653
|
return /* @__PURE__ */ e(
|
|
3654
3654
|
K.Option,
|
|
3655
3655
|
{
|
|
3656
3656
|
value: T,
|
|
3657
|
-
disabled:
|
|
3658
|
-
className: ({ active:
|
|
3659
|
-
|
|
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",
|
|
3660
3660
|
" relative cursor-default select-none py-2 pl-3 pr-9"
|
|
3661
3661
|
),
|
|
3662
|
-
children: ({ selected:
|
|
3662
|
+
children: ({ selected: $, active: M }) => /* @__PURE__ */ n(te, { children: [
|
|
3663
3663
|
/* @__PURE__ */ e(
|
|
3664
3664
|
"span",
|
|
3665
3665
|
{
|
|
3666
3666
|
className: Ge(
|
|
3667
|
-
|
|
3667
|
+
$ ? "font-semibold" : "font-normal",
|
|
3668
3668
|
"block truncate"
|
|
3669
3669
|
),
|
|
3670
3670
|
children: v
|
|
3671
3671
|
}
|
|
3672
3672
|
),
|
|
3673
|
-
|
|
3673
|
+
$ && /* @__PURE__ */ e(
|
|
3674
3674
|
"span",
|
|
3675
3675
|
{
|
|
3676
3676
|
className: Ge(
|
|
@@ -3744,10 +3744,10 @@ const Wl = ({
|
|
|
3744
3744
|
secondaryAction: i = { onCancel: null, label: "Cancel" },
|
|
3745
3745
|
dialogPanelClass: u = ""
|
|
3746
3746
|
}) => {
|
|
3747
|
-
const g = (
|
|
3748
|
-
|
|
3749
|
-
}, f = (
|
|
3750
|
-
|
|
3747
|
+
const g = (y) => {
|
|
3748
|
+
y.target === y.currentTarget && a(!1);
|
|
3749
|
+
}, f = (y) => {
|
|
3750
|
+
y.stopPropagation();
|
|
3751
3751
|
};
|
|
3752
3752
|
return /* @__PURE__ */ n(
|
|
3753
3753
|
be,
|
|
@@ -3757,7 +3757,7 @@ const Wl = ({
|
|
|
3757
3757
|
className: "relative z-50 overflow-y-auto",
|
|
3758
3758
|
children: [
|
|
3759
3759
|
/* @__PURE__ */ e(
|
|
3760
|
-
|
|
3760
|
+
Qr,
|
|
3761
3761
|
{
|
|
3762
3762
|
className: "fixed inset-0 bg-black/30",
|
|
3763
3763
|
onClick: g
|
|
@@ -3827,7 +3827,7 @@ function is({ listeners: t = {}, attributes: a = {} }) {
|
|
|
3827
3827
|
...a,
|
|
3828
3828
|
onMouseDown: (s) => s.stopPropagation(),
|
|
3829
3829
|
onClick: (s) => s.stopPropagation(),
|
|
3830
|
-
children: /* @__PURE__ */ e(
|
|
3830
|
+
children: /* @__PURE__ */ e(wt, { size: 14 })
|
|
3831
3831
|
}
|
|
3832
3832
|
);
|
|
3833
3833
|
}
|
|
@@ -3843,10 +3843,10 @@ function cs({
|
|
|
3843
3843
|
renderActions: g,
|
|
3844
3844
|
// optional override
|
|
3845
3845
|
dragId: f,
|
|
3846
|
-
dropId:
|
|
3846
|
+
dropId: y,
|
|
3847
3847
|
indent: r = 24
|
|
3848
3848
|
}) {
|
|
3849
|
-
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 = () => {
|
|
3850
3850
|
const w = Y.trim();
|
|
3851
3851
|
U(!1), w && w !== t.name ? i?.(t, w) : G(t.name);
|
|
3852
3852
|
}, h = me(() => /* @__PURE__ */ e(
|
|
@@ -3872,7 +3872,7 @@ function cs({
|
|
|
3872
3872
|
w.target.closest(".tv-toggle") || w.target.tagName === "INPUT" || l?.(t);
|
|
3873
3873
|
},
|
|
3874
3874
|
children: [
|
|
3875
|
-
/* @__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" }) }),
|
|
3876
3876
|
/* @__PURE__ */ e(Le, { size: 16, className: "tv-folder-ic" }),
|
|
3877
3877
|
/* @__PURE__ */ e("div", { className: "tv-name", ref: A, children: V ? /* @__PURE__ */ e(
|
|
3878
3878
|
"input",
|
|
@@ -3887,7 +3887,7 @@ function cs({
|
|
|
3887
3887
|
autoFocus: !0
|
|
3888
3888
|
}
|
|
3889
3889
|
) : /* @__PURE__ */ e("span", { onDoubleClick: () => U(!0), children: t.name }) }),
|
|
3890
|
-
/* @__PURE__ */ e(is, { listeners:
|
|
3890
|
+
/* @__PURE__ */ e(is, { listeners: S, attributes: p }),
|
|
3891
3891
|
/* @__PURE__ */ e("div", { className: "tv-actions", children: g ? g(t, {
|
|
3892
3892
|
onCreateChild: () => m?.(t),
|
|
3893
3893
|
onRename: () => U(!0),
|
|
@@ -3919,14 +3919,14 @@ function ps(t, { rootId: a, getId: s, getParent: o, getName: l }) {
|
|
|
3919
3919
|
function gs(t, { rootId: a, getId: s, getName: o }) {
|
|
3920
3920
|
const l = /* @__PURE__ */ new Map();
|
|
3921
3921
|
function m(u, g) {
|
|
3922
|
-
const f = s(u),
|
|
3922
|
+
const f = s(u), y = {
|
|
3923
3923
|
...u,
|
|
3924
3924
|
id: f,
|
|
3925
3925
|
name: o(u),
|
|
3926
3926
|
parentId: g || a,
|
|
3927
3927
|
children: (u.children || []).map((r) => m(r, f))
|
|
3928
3928
|
};
|
|
3929
|
-
return l.set(f,
|
|
3929
|
+
return l.set(f, y), y;
|
|
3930
3930
|
}
|
|
3931
3931
|
return { roots: t.map((u) => m(u, null)), byId: l };
|
|
3932
3932
|
}
|
|
@@ -3981,48 +3981,48 @@ function Jl({
|
|
|
3981
3981
|
onCreateRoot: u,
|
|
3982
3982
|
onCreateChild: g,
|
|
3983
3983
|
onRename: f,
|
|
3984
|
-
onDelete:
|
|
3984
|
+
onDelete: y,
|
|
3985
3985
|
onMove: r,
|
|
3986
3986
|
renderActions: N,
|
|
3987
3987
|
disableMoveToRoot: d = !1,
|
|
3988
3988
|
// ← allow root moves by default now
|
|
3989
3989
|
indentUnit: p = 24
|
|
3990
3990
|
}) {
|
|
3991
|
-
const { roots:
|
|
3992
|
-
t.map((
|
|
3991
|
+
const { roots: S } = me(() => hs(t) ? gs(t, { rootId: a, getId: o, getName: m }) : ps(
|
|
3992
|
+
t.map((x) => ({ ...x })),
|
|
3993
3993
|
{ rootId: a, getId: o, getParent: l, getName: m }
|
|
3994
|
-
), [t, a, o, l, m]), [A, E] = L({}), R = ae((
|
|
3995
|
-
const
|
|
3994
|
+
), [t, a, o, l, m]), [A, E] = L({}), R = ae((x) => {
|
|
3995
|
+
const $ = {};
|
|
3996
3996
|
return (function M(z) {
|
|
3997
|
-
z.forEach((
|
|
3998
|
-
|
|
3997
|
+
z.forEach((I) => {
|
|
3998
|
+
$[I.id] = !0, I.children?.length && M(I.children);
|
|
3999
3999
|
});
|
|
4000
|
-
})(
|
|
4000
|
+
})(x), $;
|
|
4001
4001
|
}, []);
|
|
4002
4002
|
se.useEffect(() => {
|
|
4003
|
-
E(R(
|
|
4004
|
-
}, [
|
|
4003
|
+
E(R(S));
|
|
4004
|
+
}, [S, R]);
|
|
4005
4005
|
const O = ae(
|
|
4006
|
-
(
|
|
4006
|
+
(x) => E(($) => ({ ...$, [x]: !$[x] })),
|
|
4007
4007
|
[]
|
|
4008
|
-
), [V, U] = L(() => Me(
|
|
4009
|
-
se.useEffect(() => U(Me(
|
|
4008
|
+
), [V, U] = L(() => Me(S));
|
|
4009
|
+
se.useEffect(() => U(Me(S)), [S]);
|
|
4010
4010
|
const Y = mr(
|
|
4011
4011
|
ur(br, { activationConstraint: { delay: 250, tolerance: 5 } })
|
|
4012
4012
|
), G = ge(null), [C, h] = L(null), w = ge(0), T = () => {
|
|
4013
|
-
}, k = ({ delta:
|
|
4014
|
-
w.current =
|
|
4013
|
+
}, k = ({ delta: x }) => {
|
|
4014
|
+
w.current = x?.x ?? 0;
|
|
4015
4015
|
}, v = ae(
|
|
4016
|
-
({ active:
|
|
4016
|
+
({ active: x, over: $ }) => {
|
|
4017
4017
|
const M = w.current;
|
|
4018
|
-
if (w.current = 0, h(null), !
|
|
4019
|
-
const z = String(
|
|
4020
|
-
if (!z || !
|
|
4021
|
-
let F =
|
|
4022
|
-
const
|
|
4023
|
-
if (
|
|
4024
|
-
let X =
|
|
4025
|
-
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++) {
|
|
4026
4026
|
const j = Sa(V, X, null);
|
|
4027
4027
|
if (!j) break;
|
|
4028
4028
|
if (!j.parentId) {
|
|
@@ -4033,50 +4033,50 @@ function Jl({
|
|
|
4033
4033
|
}
|
|
4034
4034
|
}
|
|
4035
4035
|
if (d && F === a) {
|
|
4036
|
-
U(Me(
|
|
4036
|
+
U(Me(S));
|
|
4037
4037
|
return;
|
|
4038
4038
|
}
|
|
4039
|
-
const B = Me(V), { newRoots: _, removed:
|
|
4040
|
-
if (!
|
|
4041
|
-
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);
|
|
4042
4042
|
U(q), r?.({ sourceId: z, destParentId: F, newTree: q });
|
|
4043
4043
|
},
|
|
4044
|
-
[V,
|
|
4044
|
+
[V, S, a, d, p, r]
|
|
4045
4045
|
), b = ae(
|
|
4046
|
-
(
|
|
4046
|
+
(x, $ = 0) => x.map((M) => /* @__PURE__ */ n(se.Fragment, { children: [
|
|
4047
4047
|
/* @__PURE__ */ e(
|
|
4048
4048
|
cs,
|
|
4049
4049
|
{
|
|
4050
4050
|
node: M,
|
|
4051
|
-
depth:
|
|
4051
|
+
depth: $,
|
|
4052
4052
|
expanded: !!A[M.id],
|
|
4053
4053
|
onToggle: () => O(M.id),
|
|
4054
4054
|
onSelect: i,
|
|
4055
4055
|
onCreateChild: g,
|
|
4056
4056
|
onRename: f,
|
|
4057
|
-
onDelete:
|
|
4057
|
+
onDelete: y,
|
|
4058
4058
|
renderActions: N,
|
|
4059
4059
|
dragId: `drag-${M.id}`,
|
|
4060
4060
|
dropId: `drop-${M.id}`,
|
|
4061
4061
|
indent: p
|
|
4062
4062
|
}
|
|
4063
4063
|
),
|
|
4064
|
-
A[M.id] && M.children?.length > 0 ? b(M.children,
|
|
4064
|
+
A[M.id] && M.children?.length > 0 ? b(M.children, $ + 1) : null
|
|
4065
4065
|
] }, M.id)),
|
|
4066
|
-
[A, p, g,
|
|
4066
|
+
[A, p, g, y, f, i, N, O]
|
|
4067
4067
|
);
|
|
4068
4068
|
return se.useMemo(() => {
|
|
4069
4069
|
if (!C) return null;
|
|
4070
|
-
const
|
|
4071
|
-
function
|
|
4070
|
+
const x = String(C).replace(/^drag-/, "");
|
|
4071
|
+
function $(M) {
|
|
4072
4072
|
for (const z of M) {
|
|
4073
|
-
if (z.id ===
|
|
4074
|
-
const
|
|
4075
|
-
if (
|
|
4073
|
+
if (z.id === x) return z;
|
|
4074
|
+
const I = z.children?.length ? $(z.children) : null;
|
|
4075
|
+
if (I) return I;
|
|
4076
4076
|
}
|
|
4077
4077
|
return null;
|
|
4078
4078
|
}
|
|
4079
|
-
return
|
|
4079
|
+
return $(V);
|
|
4080
4080
|
}, [C, V]), /* @__PURE__ */ n("div", { className: "tv", children: [
|
|
4081
4081
|
s !== !1 && /* @__PURE__ */ n("div", { className: "tv-header", children: [
|
|
4082
4082
|
/* @__PURE__ */ e("div", { className: "tv-title", children: s }),
|
|
@@ -4118,10 +4118,10 @@ const Xl = ({
|
|
|
4118
4118
|
const g = s === "vertical", f = (N) => we(
|
|
4119
4119
|
"py-2 -mb-px text-sm font-medium focus:outline-none border-b-2",
|
|
4120
4120
|
N ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
|
|
4121
|
-
),
|
|
4121
|
+
), y = (N) => we(
|
|
4122
4122
|
"text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
|
|
4123
4123
|
N ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
|
|
4124
|
-
), 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);
|
|
4125
4125
|
return /* @__PURE__ */ e(ne.Group, { vertical: g, ...u, children: g ? /* @__PURE__ */ n("div", { className: we("flex gap-4", o), children: [
|
|
4126
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)) }),
|
|
4127
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)) })
|
|
@@ -4133,8 +4133,8 @@ const Xl = ({
|
|
|
4133
4133
|
] })
|
|
4134
4134
|
) });
|
|
4135
4135
|
};
|
|
4136
|
-
function
|
|
4137
|
-
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;
|
|
4138
4138
|
}
|
|
4139
4139
|
c.string;
|
|
4140
4140
|
function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
@@ -4154,26 +4154,26 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4154
4154
|
Z(() => {
|
|
4155
4155
|
f.current !== i && s && typeof s == "function" && (f.current = i, s(l.key, i));
|
|
4156
4156
|
}, [l.key, i, s]);
|
|
4157
|
-
const
|
|
4157
|
+
const y = (r) => {
|
|
4158
4158
|
if (!r.dependsOn) return !0;
|
|
4159
|
-
const { field: N, value: d, operator: p = "equals" } = r.dependsOn,
|
|
4159
|
+
const { field: N, value: d, operator: p = "equals" } = r.dependsOn, S = i[N];
|
|
4160
4160
|
switch (p) {
|
|
4161
4161
|
case "equals":
|
|
4162
|
-
return
|
|
4162
|
+
return S === d;
|
|
4163
4163
|
case "notEquals":
|
|
4164
|
-
return
|
|
4164
|
+
return S !== d;
|
|
4165
4165
|
case "contains":
|
|
4166
|
-
return Array.isArray(
|
|
4166
|
+
return Array.isArray(S) && S.includes(d);
|
|
4167
4167
|
case "notContains":
|
|
4168
|
-
return !Array.isArray(
|
|
4168
|
+
return !Array.isArray(S) || !S.includes(d);
|
|
4169
4169
|
case "greaterThan":
|
|
4170
|
-
return Number(
|
|
4170
|
+
return Number(S) > Number(d);
|
|
4171
4171
|
case "lessThan":
|
|
4172
|
-
return Number(
|
|
4172
|
+
return Number(S) < Number(d);
|
|
4173
4173
|
case "isEmpty":
|
|
4174
|
-
return
|
|
4174
|
+
return !S || Array.isArray(S) && S.length === 0;
|
|
4175
4175
|
case "isNotEmpty":
|
|
4176
|
-
return
|
|
4176
|
+
return S && (!Array.isArray(S) || S.length > 0);
|
|
4177
4177
|
default:
|
|
4178
4178
|
return !0;
|
|
4179
4179
|
}
|
|
@@ -4191,8 +4191,45 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4191
4191
|
}
|
|
4192
4192
|
),
|
|
4193
4193
|
/* @__PURE__ */ e("p", { style: { fontSize: "14px", marginBottom: "10px" }, children: l.description }),
|
|
4194
|
-
|
|
4195
|
-
/* @__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(
|
|
4196
4233
|
"label",
|
|
4197
4234
|
{
|
|
4198
4235
|
style: {
|
|
@@ -4262,14 +4299,14 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4262
4299
|
max: r.max,
|
|
4263
4300
|
step: r.step,
|
|
4264
4301
|
onChange: (d) => {
|
|
4265
|
-
const p = d.target.value,
|
|
4266
|
-
u(
|
|
4302
|
+
const p = d.target.value, S = { ...i, [r.key]: p };
|
|
4303
|
+
u(S), s && s(l.key, S);
|
|
4267
4304
|
},
|
|
4268
4305
|
onBlur: (d) => {
|
|
4269
4306
|
const p = d.target.value;
|
|
4270
4307
|
if (p !== "" && p !== null && p !== void 0) {
|
|
4271
|
-
const
|
|
4272
|
-
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(""));
|
|
4273
4310
|
}
|
|
4274
4311
|
},
|
|
4275
4312
|
required: r.required,
|
|
@@ -4289,13 +4326,13 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4289
4326
|
] }),
|
|
4290
4327
|
r.fieldtype === "checkbox" && /* @__PURE__ */ n("div", { children: [
|
|
4291
4328
|
/* @__PURE__ */ e(
|
|
4292
|
-
|
|
4329
|
+
gt,
|
|
4293
4330
|
{
|
|
4294
4331
|
name: r.key,
|
|
4295
4332
|
checked: !!(i[r.key] || r.default),
|
|
4296
4333
|
onChange: (d) => {
|
|
4297
|
-
const p = { ...i, [r.key]:
|
|
4298
|
-
u(
|
|
4334
|
+
const p = d.target ? d.target.checked : d, S = { ...i, [r.key]: p };
|
|
4335
|
+
u(S), s && s(l.key, S);
|
|
4299
4336
|
},
|
|
4300
4337
|
label: r.placeholder || r.label,
|
|
4301
4338
|
disabled: r.disabled ? r.disabled : !1,
|
|
@@ -4306,7 +4343,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4306
4343
|
] }),
|
|
4307
4344
|
r.fieldtype === "select" && /* @__PURE__ */ n("div", { children: [
|
|
4308
4345
|
/* @__PURE__ */ e(
|
|
4309
|
-
|
|
4346
|
+
yt,
|
|
4310
4347
|
{
|
|
4311
4348
|
name: r.key,
|
|
4312
4349
|
defaultValue: r.default,
|
|
@@ -4473,8 +4510,8 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4473
4510
|
value: d.value,
|
|
4474
4511
|
checked: i[r.key] === d.value,
|
|
4475
4512
|
onChange: (p) => {
|
|
4476
|
-
const
|
|
4477
|
-
u(
|
|
4513
|
+
const S = { ...i, [r.key]: p.target.value };
|
|
4514
|
+
u(S), s && s(l.key, S);
|
|
4478
4515
|
},
|
|
4479
4516
|
disabled: r.disabled
|
|
4480
4517
|
}
|
|
@@ -4591,8 +4628,8 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4591
4628
|
type: "file",
|
|
4592
4629
|
name: r.key,
|
|
4593
4630
|
onChange: (d) => {
|
|
4594
|
-
const p = d.target.files[0],
|
|
4595
|
-
u(
|
|
4631
|
+
const p = d.target.files[0], S = { ...i, [r.key]: p ? p.name : "" };
|
|
4632
|
+
u(S), s && s(l.key, S);
|
|
4596
4633
|
},
|
|
4597
4634
|
accept: r.accept,
|
|
4598
4635
|
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
@@ -4639,7 +4676,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4639
4676
|
console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
|
|
4640
4677
|
const [l, m] = L(t), [i, u] = L(null), [g, f] = L(null);
|
|
4641
4678
|
console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
|
|
4642
|
-
const [
|
|
4679
|
+
const [y, r] = L(() => {
|
|
4643
4680
|
const h = a && a[l.key] || [], w = h.length > 0 ? h : [{ id: 0 }];
|
|
4644
4681
|
return console.log(`[DataTableRenderer] ${l.key} - Initial data:`, w), w;
|
|
4645
4682
|
}), N = ge(a);
|
|
@@ -4650,19 +4687,19 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4650
4687
|
console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, w), r(w);
|
|
4651
4688
|
}
|
|
4652
4689
|
}, [a, l.key]);
|
|
4653
|
-
const d = ge(
|
|
4690
|
+
const d = ge(y), p = ge(null);
|
|
4654
4691
|
Z(() => {
|
|
4655
|
-
d.current !==
|
|
4656
|
-
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);
|
|
4657
4694
|
}, 300));
|
|
4658
|
-
}, [l.key,
|
|
4695
|
+
}, [l.key, y, s]), Z(() => () => {
|
|
4659
4696
|
p.current && clearTimeout(p.current);
|
|
4660
4697
|
}, []);
|
|
4661
|
-
const
|
|
4698
|
+
const S = (h) => {
|
|
4662
4699
|
const w = (v, b) => {
|
|
4663
|
-
console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: v, value: b, type: typeof b }), r((
|
|
4664
|
-
const
|
|
4665
|
-
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, $;
|
|
4666
4703
|
});
|
|
4667
4704
|
}, T = (v) => o[l.key]?.[v]?.[h.key], k = (v) => {
|
|
4668
4705
|
const b = T(v);
|
|
@@ -4675,7 +4712,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4675
4712
|
J,
|
|
4676
4713
|
{
|
|
4677
4714
|
value: v[h.key] || "",
|
|
4678
|
-
onChange: (
|
|
4715
|
+
onChange: (x) => w(b, x.target.value),
|
|
4679
4716
|
placeholder: h.placeholder || `Enter ${h.label}`,
|
|
4680
4717
|
required: h.required,
|
|
4681
4718
|
className: `w-full ${T(b) ? "border-red-500" : ""}`
|
|
@@ -4689,7 +4726,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4689
4726
|
ba,
|
|
4690
4727
|
{
|
|
4691
4728
|
value: v[h.key] || "",
|
|
4692
|
-
onChange: (
|
|
4729
|
+
onChange: (x) => w(b, x.target.value),
|
|
4693
4730
|
placeholder: h.placeholder || `Enter ${h.label}`,
|
|
4694
4731
|
required: h.required,
|
|
4695
4732
|
className: `w-full ${T(b) ? "border-red-500" : ""}`,
|
|
@@ -4708,12 +4745,12 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4708
4745
|
min: h.min,
|
|
4709
4746
|
max: h.max,
|
|
4710
4747
|
step: h.step,
|
|
4711
|
-
onChange: (
|
|
4712
|
-
onBlur: (
|
|
4713
|
-
const
|
|
4714
|
-
if (
|
|
4715
|
-
const M = Number(
|
|
4716
|
-
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(""));
|
|
4717
4754
|
}
|
|
4718
4755
|
},
|
|
4719
4756
|
placeholder: h.placeholder || `Enter ${h.label}`,
|
|
@@ -4738,7 +4775,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4738
4775
|
{
|
|
4739
4776
|
type: "email",
|
|
4740
4777
|
value: v[h.key] || "",
|
|
4741
|
-
onChange: (
|
|
4778
|
+
onChange: (x) => w(b, x.target.value),
|
|
4742
4779
|
placeholder: h.placeholder || "Enter email address",
|
|
4743
4780
|
required: h.required,
|
|
4744
4781
|
className: `w-full ${T(b) ? "border-red-500" : ""}`
|
|
@@ -4753,7 +4790,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4753
4790
|
{
|
|
4754
4791
|
type: "url",
|
|
4755
4792
|
value: v[h.key] || "",
|
|
4756
|
-
onChange: (
|
|
4793
|
+
onChange: (x) => w(b, x.target.value),
|
|
4757
4794
|
placeholder: h.placeholder || "Enter URL",
|
|
4758
4795
|
required: h.required,
|
|
4759
4796
|
className: `w-full ${T(b) ? "border-red-500" : ""}`
|
|
@@ -4768,7 +4805,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4768
4805
|
{
|
|
4769
4806
|
type: "password",
|
|
4770
4807
|
value: v[h.key] || "",
|
|
4771
|
-
onChange: (
|
|
4808
|
+
onChange: (x) => w(b, x.target.value),
|
|
4772
4809
|
placeholder: h.placeholder || "Enter password",
|
|
4773
4810
|
required: h.required,
|
|
4774
4811
|
className: `w-full ${T(b) ? "border-red-500" : ""}`
|
|
@@ -4780,10 +4817,10 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4780
4817
|
case "dropdown":
|
|
4781
4818
|
return (v, b) => /* @__PURE__ */ n("div", { children: [
|
|
4782
4819
|
/* @__PURE__ */ e(
|
|
4783
|
-
|
|
4820
|
+
yt,
|
|
4784
4821
|
{
|
|
4785
4822
|
value: v[h.key] || "",
|
|
4786
|
-
onChange: (
|
|
4823
|
+
onChange: (x) => w(b, x),
|
|
4787
4824
|
options: h.options || [],
|
|
4788
4825
|
placeholder: h.placeholder || `Select ${h.label}`,
|
|
4789
4826
|
required: h.required,
|
|
@@ -4794,11 +4831,11 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4794
4831
|
] });
|
|
4795
4832
|
case "selectDynamic":
|
|
4796
4833
|
return (v, b) => {
|
|
4797
|
-
const
|
|
4834
|
+
const x = () => {
|
|
4798
4835
|
if (h.optionsFrom && a) {
|
|
4799
|
-
const { config:
|
|
4800
|
-
if (Array.isArray(
|
|
4801
|
-
return
|
|
4836
|
+
const { config: $, valueField: M, labelField: z } = h.optionsFrom, I = a[$] || [];
|
|
4837
|
+
if (Array.isArray(I))
|
|
4838
|
+
return I.map((F) => ({
|
|
4802
4839
|
id: F[M] || "",
|
|
4803
4840
|
value: F[M] || "",
|
|
4804
4841
|
label: F[z] || ""
|
|
@@ -4808,12 +4845,12 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4808
4845
|
};
|
|
4809
4846
|
return /* @__PURE__ */ n("div", { children: [
|
|
4810
4847
|
/* @__PURE__ */ e(
|
|
4811
|
-
|
|
4848
|
+
yt,
|
|
4812
4849
|
{
|
|
4813
4850
|
index: b,
|
|
4814
4851
|
value: v[h.key] || "",
|
|
4815
|
-
onChange: (
|
|
4816
|
-
options:
|
|
4852
|
+
onChange: ($) => w(b, $),
|
|
4853
|
+
options: x(),
|
|
4817
4854
|
placeholder: h.placeholder || `Select ${h.label}`,
|
|
4818
4855
|
required: h.required,
|
|
4819
4856
|
className: `w-full ${T(b) ? "border-red-500" : ""}`
|
|
@@ -4825,12 +4862,12 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4825
4862
|
};
|
|
4826
4863
|
case "multiselect":
|
|
4827
4864
|
return (v, b) => {
|
|
4828
|
-
const
|
|
4865
|
+
const x = v[h.key] || [];
|
|
4829
4866
|
return /* @__PURE__ */ e(
|
|
4830
4867
|
at,
|
|
4831
4868
|
{
|
|
4832
|
-
selectedItems:
|
|
4833
|
-
onSelectionChange: (
|
|
4869
|
+
selectedItems: x,
|
|
4870
|
+
onSelectionChange: ($) => w(b, $),
|
|
4834
4871
|
options: h.options || [],
|
|
4835
4872
|
placeholder: h.placeholder || `Select ${h.label}`,
|
|
4836
4873
|
className: "w-full"
|
|
@@ -4840,10 +4877,10 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4840
4877
|
case "checkbox":
|
|
4841
4878
|
case "boolean":
|
|
4842
4879
|
return (v, b) => /* @__PURE__ */ e(
|
|
4843
|
-
|
|
4880
|
+
gt,
|
|
4844
4881
|
{
|
|
4845
4882
|
checked: !!v[h.key],
|
|
4846
|
-
onChange: (
|
|
4883
|
+
onChange: (x) => w(b, x),
|
|
4847
4884
|
label: h.placeholder || h.label,
|
|
4848
4885
|
className: "w-full"
|
|
4849
4886
|
}
|
|
@@ -4854,7 +4891,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4854
4891
|
fa,
|
|
4855
4892
|
{
|
|
4856
4893
|
isOn: !!v[h.key],
|
|
4857
|
-
onToggle: (
|
|
4894
|
+
onToggle: (x) => w(b, x),
|
|
4858
4895
|
label: h.placeholder || h.label,
|
|
4859
4896
|
className: "w-full"
|
|
4860
4897
|
}
|
|
@@ -4864,7 +4901,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4864
4901
|
ua,
|
|
4865
4902
|
{
|
|
4866
4903
|
selectedDate: v[h.key] ? new Date(v[h.key]) : null,
|
|
4867
|
-
onDateChange: (
|
|
4904
|
+
onDateChange: (x) => w(b, x ? x.toISOString().split("T")[0] : ""),
|
|
4868
4905
|
placeholder: h.placeholder || "Select date",
|
|
4869
4906
|
className: "w-full"
|
|
4870
4907
|
}
|
|
@@ -4875,7 +4912,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4875
4912
|
{
|
|
4876
4913
|
type: "datetime-local",
|
|
4877
4914
|
value: v[h.key] || "",
|
|
4878
|
-
onChange: (
|
|
4915
|
+
onChange: (x) => w(b, x.target.value),
|
|
4879
4916
|
placeholder: h.placeholder || "Select date and time",
|
|
4880
4917
|
required: h.required,
|
|
4881
4918
|
className: "w-full"
|
|
@@ -4887,7 +4924,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4887
4924
|
{
|
|
4888
4925
|
type: "time",
|
|
4889
4926
|
value: v[h.key] || "",
|
|
4890
|
-
onChange: (
|
|
4927
|
+
onChange: (x) => w(b, x.target.value),
|
|
4891
4928
|
placeholder: h.placeholder || "Select time",
|
|
4892
4929
|
required: h.required,
|
|
4893
4930
|
className: "w-full"
|
|
@@ -4898,7 +4935,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4898
4935
|
ha,
|
|
4899
4936
|
{
|
|
4900
4937
|
selectedValue: v[h.key] || "",
|
|
4901
|
-
onValueChange: (
|
|
4938
|
+
onValueChange: (x) => w(b, x),
|
|
4902
4939
|
options: h.options || [],
|
|
4903
4940
|
className: "w-full"
|
|
4904
4941
|
}
|
|
@@ -4908,20 +4945,20 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4908
4945
|
he,
|
|
4909
4946
|
{
|
|
4910
4947
|
value: v[h.key] || "",
|
|
4911
|
-
onChange: (
|
|
4948
|
+
onChange: (x) => w(b, x),
|
|
4912
4949
|
placeholder: h.placeholder || `Search ${h.label}`,
|
|
4913
4950
|
className: "w-full"
|
|
4914
4951
|
}
|
|
4915
4952
|
);
|
|
4916
4953
|
case "audience":
|
|
4917
4954
|
return (v, b) => {
|
|
4918
|
-
const
|
|
4919
|
-
...
|
|
4920
|
-
...
|
|
4921
|
-
...
|
|
4955
|
+
const x = v[h.key] || { users: [], groups: [], roles: [] }, $ = [
|
|
4956
|
+
...x.users || [],
|
|
4957
|
+
...x.groups || [],
|
|
4958
|
+
...x.roles || []
|
|
4922
4959
|
];
|
|
4923
4960
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
4924
|
-
/* @__PURE__ */ e(xs, { children:
|
|
4961
|
+
/* @__PURE__ */ e(xs, { children: $.length > 0 ? $.slice(0, 3).map((M, z) => /* @__PURE__ */ e(
|
|
4925
4962
|
Ce,
|
|
4926
4963
|
{
|
|
4927
4964
|
size: "small",
|
|
@@ -4937,7 +4974,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4937
4974
|
onClick: () => {
|
|
4938
4975
|
f(h.key), u(b);
|
|
4939
4976
|
},
|
|
4940
|
-
children:
|
|
4977
|
+
children: $.length > 0 ? "Edit" : "Assign"
|
|
4941
4978
|
}
|
|
4942
4979
|
)
|
|
4943
4980
|
] });
|
|
@@ -4948,7 +4985,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4948
4985
|
{
|
|
4949
4986
|
type: "color",
|
|
4950
4987
|
value: v[h.key] || "#000000",
|
|
4951
|
-
onChange: (
|
|
4988
|
+
onChange: (x) => w(b, x.target.value),
|
|
4952
4989
|
className: "w-full h-10"
|
|
4953
4990
|
}
|
|
4954
4991
|
);
|
|
@@ -4959,7 +4996,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4959
4996
|
{
|
|
4960
4997
|
type: "range",
|
|
4961
4998
|
value: v[h.key] || h.min || 0,
|
|
4962
|
-
onChange: (
|
|
4999
|
+
onChange: (x) => w(b, x.target.value),
|
|
4963
5000
|
min: h.min || 0,
|
|
4964
5001
|
max: h.max || 100,
|
|
4965
5002
|
step: h.step || 1,
|
|
@@ -4973,9 +5010,9 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4973
5010
|
J,
|
|
4974
5011
|
{
|
|
4975
5012
|
type: "file",
|
|
4976
|
-
onChange: (
|
|
4977
|
-
const
|
|
4978
|
-
w(b,
|
|
5013
|
+
onChange: (x) => {
|
|
5014
|
+
const $ = x.target.files[0];
|
|
5015
|
+
w(b, $ ? $.name : "");
|
|
4979
5016
|
},
|
|
4980
5017
|
accept: h.accept,
|
|
4981
5018
|
className: "w-full"
|
|
@@ -4987,7 +5024,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4987
5024
|
{
|
|
4988
5025
|
type: "hidden",
|
|
4989
5026
|
value: v[h.key] || "",
|
|
4990
|
-
onChange: (
|
|
5027
|
+
onChange: (x) => w(b, x.target.value)
|
|
4991
5028
|
}
|
|
4992
5029
|
);
|
|
4993
5030
|
// Default fallback for unknown field types
|
|
@@ -4997,7 +5034,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
4997
5034
|
J,
|
|
4998
5035
|
{
|
|
4999
5036
|
value: v[h.key] || "",
|
|
5000
|
-
onChange: (
|
|
5037
|
+
onChange: (x) => w(b, x.target.value),
|
|
5001
5038
|
placeholder: h.placeholder || `Enter ${h.label}`,
|
|
5002
5039
|
required: h.required,
|
|
5003
5040
|
className: `w-full ${T(b) ? "border-red-500" : ""}`
|
|
@@ -5041,11 +5078,11 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
5041
5078
|
console.log("[DataTableRenderer] handleAddAudience called with:", h), r((w) => {
|
|
5042
5079
|
const T = [...w];
|
|
5043
5080
|
if (i !== null && g && T[i]) {
|
|
5044
|
-
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");
|
|
5045
5082
|
T[i][g] = {
|
|
5046
5083
|
users: [...T[i][g]?.users || [], ...v],
|
|
5047
5084
|
groups: [...T[i][g]?.groups || [], ...b],
|
|
5048
|
-
roles: [...T[i][g]?.roles || [], ...
|
|
5085
|
+
roles: [...T[i][g]?.roles || [], ...x]
|
|
5049
5086
|
}, console.log("[DataTableRenderer] Updated audience data:", T[i][g]);
|
|
5050
5087
|
}
|
|
5051
5088
|
return T;
|
|
@@ -5079,7 +5116,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
5079
5116
|
)),
|
|
5080
5117
|
/* @__PURE__ */ e("th", { className: "px-4 py-2 w-16" })
|
|
5081
5118
|
] }) }),
|
|
5082
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
5119
|
+
/* @__PURE__ */ e("tbody", { children: y.map((h, w) => /* @__PURE__ */ n(
|
|
5083
5120
|
"tr",
|
|
5084
5121
|
{
|
|
5085
5122
|
className: `hover:bg-gray-50 ${R === w ? "opacity-50" : ""}`,
|
|
@@ -5089,8 +5126,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
5089
5126
|
onDrop: (T) => Y(T, w),
|
|
5090
5127
|
onDragEnd: G,
|
|
5091
5128
|
children: [
|
|
5092
|
-
/* @__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(
|
|
5093
|
-
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)),
|
|
5094
5131
|
/* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
|
|
5095
5132
|
"button",
|
|
5096
5133
|
{
|
|
@@ -5106,12 +5143,12 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
5106
5143
|
)) })
|
|
5107
5144
|
] }) }),
|
|
5108
5145
|
i !== null && (() => {
|
|
5109
|
-
const h =
|
|
5110
|
-
users:
|
|
5111
|
-
groups:
|
|
5112
|
-
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 || []
|
|
5113
5150
|
} : { users: [], groups: [], roles: [] };
|
|
5114
|
-
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(
|
|
5115
5152
|
os,
|
|
5116
5153
|
{
|
|
5117
5154
|
isOpen: !0,
|
|
@@ -5126,7 +5163,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
|
5126
5163
|
})()
|
|
5127
5164
|
] });
|
|
5128
5165
|
}
|
|
5129
|
-
const
|
|
5166
|
+
const Ie = {
|
|
5130
5167
|
containerId: "ui-toast",
|
|
5131
5168
|
position: "bottom-right",
|
|
5132
5169
|
autoClose: 3500,
|
|
@@ -5135,22 +5172,22 @@ const Pe = {
|
|
|
5135
5172
|
closeOnClick: !0
|
|
5136
5173
|
};
|
|
5137
5174
|
let Je = 0;
|
|
5138
|
-
const
|
|
5175
|
+
const Lt = () => {
|
|
5139
5176
|
typeof document > "u" || (Je += 1, document.body.classList.add("toast-backdrop"));
|
|
5140
|
-
},
|
|
5177
|
+
}, Bt = () => {
|
|
5141
5178
|
typeof document > "u" || (Je = Math.max(0, Je - 1), Je === 0 && document.body.classList.remove("toast-backdrop"));
|
|
5142
|
-
},
|
|
5143
|
-
success: (t, a) => Se.success(t, { ...
|
|
5144
|
-
info: (t, a) => Se.info(t, { ...
|
|
5145
|
-
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 }),
|
|
5146
5183
|
// Error: no autoClose + modal-like behavior via backdrop
|
|
5147
5184
|
error: (t, a) => Se.error(t, {
|
|
5148
|
-
...
|
|
5185
|
+
...Ie,
|
|
5149
5186
|
autoClose: !1,
|
|
5150
5187
|
closeOnClick: !1,
|
|
5151
5188
|
draggable: !1,
|
|
5152
|
-
onOpen:
|
|
5153
|
-
onClose:
|
|
5189
|
+
onOpen: Lt,
|
|
5190
|
+
onClose: Bt,
|
|
5154
5191
|
...a
|
|
5155
5192
|
}),
|
|
5156
5193
|
// Promise helper (error branch inherits the modal behavior)
|
|
@@ -5164,11 +5201,11 @@ const Mt = () => {
|
|
|
5164
5201
|
autoClose: !1,
|
|
5165
5202
|
closeOnClick: !1,
|
|
5166
5203
|
draggable: !1,
|
|
5167
|
-
onOpen:
|
|
5168
|
-
onClose:
|
|
5204
|
+
onOpen: Lt,
|
|
5205
|
+
onClose: Bt
|
|
5169
5206
|
}
|
|
5170
5207
|
},
|
|
5171
|
-
{ ...
|
|
5208
|
+
{ ...Ie, ...s }
|
|
5172
5209
|
)
|
|
5173
5210
|
}, ct = (t) => {
|
|
5174
5211
|
try {
|
|
@@ -5192,15 +5229,15 @@ const Mt = () => {
|
|
|
5192
5229
|
initialData: g = null
|
|
5193
5230
|
// Add prop for initial demo data
|
|
5194
5231
|
}) => {
|
|
5195
|
-
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 () => {
|
|
5196
5233
|
try {
|
|
5197
5234
|
const z = await Ve(t.collectionList);
|
|
5198
5235
|
if (z) {
|
|
5199
|
-
const
|
|
5236
|
+
const I = z.map((F, D) => ({
|
|
5200
5237
|
...F,
|
|
5201
|
-
order: typeof F.order == "number" ? F.order :
|
|
5238
|
+
order: typeof F.order == "number" ? F.order : D + 1
|
|
5202
5239
|
}));
|
|
5203
|
-
|
|
5240
|
+
I.sort((F, D) => (F.order ?? 0) - (D.order ?? 0)), p(I), s?.(I);
|
|
5204
5241
|
}
|
|
5205
5242
|
} catch (z) {
|
|
5206
5243
|
console.log("Error loading collections:", z), typeof window < "u" && !window.location.pathname.includes("iframe.html") && Se.error("Failed to load collections");
|
|
@@ -5212,29 +5249,29 @@ const Mt = () => {
|
|
|
5212
5249
|
Array.isArray(g) && p(g);
|
|
5213
5250
|
}, [g]);
|
|
5214
5251
|
const Y = (z) => {
|
|
5215
|
-
m && (
|
|
5252
|
+
m && (y(z.id), N(z.categoryName || ""));
|
|
5216
5253
|
}, G = () => {
|
|
5217
5254
|
if (!l || f !== null) return;
|
|
5218
5255
|
const z = `temp-${Date.now()}`;
|
|
5219
|
-
p((
|
|
5220
|
-
...
|
|
5256
|
+
p((I) => [
|
|
5257
|
+
...I,
|
|
5221
5258
|
{
|
|
5222
5259
|
id: z,
|
|
5223
5260
|
categoryName: "",
|
|
5224
5261
|
links: [],
|
|
5225
|
-
order: (
|
|
5262
|
+
order: (I.at(-1)?.order ?? 0) + 1,
|
|
5226
5263
|
_temp: !0
|
|
5227
5264
|
}
|
|
5228
|
-
]),
|
|
5265
|
+
]), y(z), N("");
|
|
5229
5266
|
}, C = () => {
|
|
5230
5267
|
f != null && (p((z) => {
|
|
5231
|
-
const
|
|
5268
|
+
const I = z.find((D) => D.id === f), F = I && I._temp ? z.filter((D) => D.id !== f) : z;
|
|
5232
5269
|
return s?.(F), F;
|
|
5233
|
-
}),
|
|
5270
|
+
}), y(null), N(""));
|
|
5234
5271
|
}, h = () => {
|
|
5235
5272
|
if (f == null || !r.trim()) return;
|
|
5236
5273
|
if (typeof f == "string" && f.startsWith("temp-")) {
|
|
5237
|
-
const
|
|
5274
|
+
const I = {
|
|
5238
5275
|
id: f,
|
|
5239
5276
|
categoryName: r.trim(),
|
|
5240
5277
|
links: [],
|
|
@@ -5245,44 +5282,44 @@ const Mt = () => {
|
|
|
5245
5282
|
// Flag to indicate this is a draft change
|
|
5246
5283
|
};
|
|
5247
5284
|
p((F) => {
|
|
5248
|
-
const
|
|
5249
|
-
return s?.(
|
|
5285
|
+
const D = F.map((B) => B.id === f ? I : B);
|
|
5286
|
+
return s?.(D), D;
|
|
5250
5287
|
});
|
|
5251
5288
|
} else
|
|
5252
|
-
p((
|
|
5253
|
-
const F =
|
|
5254
|
-
(
|
|
5289
|
+
p((I) => {
|
|
5290
|
+
const F = I.map(
|
|
5291
|
+
(D) => D.id === f ? { ...D, categoryName: r.trim(), _isDraft: !0 } : D
|
|
5255
5292
|
);
|
|
5256
5293
|
return s?.(F), F;
|
|
5257
5294
|
});
|
|
5258
|
-
|
|
5295
|
+
y(null), N("");
|
|
5259
5296
|
}, w = (z) => {
|
|
5260
|
-
i && p((
|
|
5261
|
-
const F =
|
|
5297
|
+
i && p((I) => {
|
|
5298
|
+
const F = I.filter((D) => D.id !== z.id);
|
|
5262
5299
|
return s?.(F), F;
|
|
5263
5300
|
});
|
|
5264
|
-
}, T = (z,
|
|
5265
|
-
if (!u || !
|
|
5266
|
-
const
|
|
5267
|
-
if (
|
|
5268
|
-
const _ = [...z], [
|
|
5269
|
-
return _.splice(B, 0,
|
|
5270
|
-
}, k = (z,
|
|
5271
|
-
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));
|
|
5272
5309
|
}, v = (z) => {
|
|
5273
|
-
|
|
5310
|
+
S && z !== E && R(z);
|
|
5274
5311
|
}, b = (z) => {
|
|
5275
5312
|
z.preventDefault();
|
|
5276
|
-
},
|
|
5313
|
+
}, x = (z, I) => {
|
|
5277
5314
|
z.preventDefault();
|
|
5278
5315
|
const F = z.dataTransfer.getData("text/plain");
|
|
5279
|
-
F && (p((
|
|
5280
|
-
const B = T(
|
|
5316
|
+
F && (p((D) => {
|
|
5317
|
+
const B = T(D, F, I);
|
|
5281
5318
|
console.log("Reordered", B);
|
|
5282
|
-
const _ = B.map((
|
|
5319
|
+
const _ = B.map((P) => ({ ...P, _isDraft: !0 }));
|
|
5283
5320
|
return s?.(_), _;
|
|
5284
5321
|
}), A(null), R(null));
|
|
5285
|
-
},
|
|
5322
|
+
}, $ = () => {
|
|
5286
5323
|
A(null), R(null);
|
|
5287
5324
|
}, M = Array.isArray(d) ? d.filter(
|
|
5288
5325
|
(z) => z.categoryName?.toLowerCase().includes(O.toLowerCase())
|
|
@@ -5312,21 +5349,21 @@ const Mt = () => {
|
|
|
5312
5349
|
)
|
|
5313
5350
|
] }) }),
|
|
5314
5351
|
/* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: M.map((z) => {
|
|
5315
|
-
const
|
|
5352
|
+
const I = f === z.id, F = z?.links?.length ?? 0, D = S === z.id, B = E === z.id && S !== z.id;
|
|
5316
5353
|
return /* @__PURE__ */ e(
|
|
5317
5354
|
"div",
|
|
5318
5355
|
{
|
|
5319
5356
|
onDragEnter: () => v(z.id),
|
|
5320
5357
|
onDragOver: b,
|
|
5321
|
-
onDrop: (_) =>
|
|
5322
|
-
onDragEnd:
|
|
5358
|
+
onDrop: (_) => x(_, z.id),
|
|
5359
|
+
onDragEnd: $,
|
|
5323
5360
|
className: [
|
|
5324
5361
|
"flex items-center justify-between p-3 border rounded-2xl mb-3",
|
|
5325
5362
|
"border-gray-300",
|
|
5326
5363
|
B ? "ring-2 ring-gray-800/20" : "",
|
|
5327
|
-
|
|
5364
|
+
D ? "opacity-60" : ""
|
|
5328
5365
|
].join(" "),
|
|
5329
|
-
children:
|
|
5366
|
+
children: I ? /* @__PURE__ */ n(te, { children: [
|
|
5330
5367
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 flex-1", children: /* @__PURE__ */ e(
|
|
5331
5368
|
"input",
|
|
5332
5369
|
{
|
|
@@ -5376,7 +5413,7 @@ const Mt = () => {
|
|
|
5376
5413
|
className: "cursor-grab active:cursor-grabbing p-1 -m-1 rounded-md hover:bg-gray-50",
|
|
5377
5414
|
draggable: !0,
|
|
5378
5415
|
onDragStart: (_) => k(_, z.id),
|
|
5379
|
-
children: /* @__PURE__ */ e(
|
|
5416
|
+
children: /* @__PURE__ */ e(wt, {})
|
|
5380
5417
|
}
|
|
5381
5418
|
),
|
|
5382
5419
|
/* @__PURE__ */ e("span", { children: z.categoryName })
|
|
@@ -5398,7 +5435,7 @@ const Mt = () => {
|
|
|
5398
5435
|
className: F === 0 && !z.protected ? "cursor-pointer" : "cursor-not-allowed",
|
|
5399
5436
|
title: F === 0 && !z.protected ? "Delete" : "Cannot delete this collection",
|
|
5400
5437
|
onClick: F === 0 ? () => w(z) : null,
|
|
5401
|
-
children: /* @__PURE__ */ e(
|
|
5438
|
+
children: /* @__PURE__ */ e(Qe, { color: F === 0 ? "#767676" : "#C2C2C2" })
|
|
5402
5439
|
}
|
|
5403
5440
|
)
|
|
5404
5441
|
] })
|
|
@@ -5417,7 +5454,7 @@ const Mt = () => {
|
|
|
5417
5454
|
showSearch: u = !0,
|
|
5418
5455
|
allowAdd: g = !0,
|
|
5419
5456
|
allowEdit: f = !0,
|
|
5420
|
-
allowDelete:
|
|
5457
|
+
allowDelete: y = !0,
|
|
5421
5458
|
allowReorder: r = !0,
|
|
5422
5459
|
className: N = ""
|
|
5423
5460
|
} = t, d = a?.[t.key] || i || [], p = Array.isArray(d) ? d : [];
|
|
@@ -5438,7 +5475,7 @@ const Mt = () => {
|
|
|
5438
5475
|
showSearch: u,
|
|
5439
5476
|
allowAdd: g,
|
|
5440
5477
|
allowEdit: f,
|
|
5441
|
-
allowDelete:
|
|
5478
|
+
allowDelete: y,
|
|
5442
5479
|
allowReorder: r
|
|
5443
5480
|
}
|
|
5444
5481
|
)
|
|
@@ -5466,34 +5503,34 @@ function zs({
|
|
|
5466
5503
|
onCancel: o,
|
|
5467
5504
|
onSave: l
|
|
5468
5505
|
}) {
|
|
5469
|
-
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) => {
|
|
5470
5507
|
if (!a || !a.configuration)
|
|
5471
5508
|
return k;
|
|
5472
5509
|
const v = {}, b = k?.configuration || {};
|
|
5473
|
-
return a.configuration.forEach((
|
|
5474
|
-
if (
|
|
5475
|
-
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) => {
|
|
5476
5513
|
const F = { id: z.id || 0 };
|
|
5477
|
-
return
|
|
5478
|
-
if (
|
|
5514
|
+
return x.fields && x.fields.forEach((D) => {
|
|
5515
|
+
if (D.fieldtype === "audience") {
|
|
5479
5516
|
let B = { users: [], groups: [], roles: [] };
|
|
5480
|
-
z[
|
|
5481
|
-
users: z[
|
|
5482
|
-
groups: z[
|
|
5483
|
-
roles: z[
|
|
5484
|
-
})), 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;
|
|
5485
5522
|
} else
|
|
5486
|
-
F[
|
|
5523
|
+
F[D.key] = z[D.key] || D.default || "";
|
|
5487
5524
|
}), F;
|
|
5488
5525
|
});
|
|
5489
5526
|
if (M.length === 0) {
|
|
5490
5527
|
const z = { id: 0 };
|
|
5491
|
-
|
|
5492
|
-
|
|
5528
|
+
x.fields && x.fields.forEach((I) => {
|
|
5529
|
+
I.fieldtype === "audience" ? z[I.key] = { users: [], groups: [], roles: [] } : z[I.key] = I.default || "";
|
|
5493
5530
|
}), M.push(z);
|
|
5494
5531
|
}
|
|
5495
|
-
v[
|
|
5496
|
-
} else
|
|
5532
|
+
v[x.key] = M;
|
|
5533
|
+
} else x.key && (v[x.key] = b[x.key] || {});
|
|
5497
5534
|
}), v;
|
|
5498
5535
|
}, V = () => {
|
|
5499
5536
|
if (a && a.configuration) {
|
|
@@ -5502,13 +5539,13 @@ function zs({
|
|
|
5502
5539
|
if (v.key)
|
|
5503
5540
|
if (v.type === "datatable") {
|
|
5504
5541
|
const b = { id: 0 };
|
|
5505
|
-
v.fields && v.fields.forEach((
|
|
5506
|
-
|
|
5542
|
+
v.fields && v.fields.forEach((x) => {
|
|
5543
|
+
x.fieldtype === "audience" ? b[x.key] = { users: [], groups: [], roles: [] } : b[x.key] = x.default || "";
|
|
5507
5544
|
}), k[v.key] = [b];
|
|
5508
5545
|
} else if (v.type === "section") {
|
|
5509
5546
|
const b = {};
|
|
5510
|
-
v.fields && Array.isArray(v.fields) && v.fields.forEach((
|
|
5511
|
-
|
|
5547
|
+
v.fields && Array.isArray(v.fields) && v.fields.forEach((x) => {
|
|
5548
|
+
x.key && (b[x.key] = x.default || "");
|
|
5512
5549
|
}), k[v.key] = b;
|
|
5513
5550
|
} else
|
|
5514
5551
|
k[v.key] = {};
|
|
@@ -5517,13 +5554,13 @@ function zs({
|
|
|
5517
5554
|
};
|
|
5518
5555
|
Z(() => {
|
|
5519
5556
|
if (s) {
|
|
5520
|
-
|
|
5557
|
+
y(!1);
|
|
5521
5558
|
return;
|
|
5522
5559
|
}
|
|
5523
5560
|
const k = async () => {
|
|
5524
5561
|
try {
|
|
5525
|
-
|
|
5526
|
-
let v = await Ve(
|
|
5562
|
+
y(!0);
|
|
5563
|
+
let v = await Ve(S);
|
|
5527
5564
|
if (v) {
|
|
5528
5565
|
const b = O(v);
|
|
5529
5566
|
g(b);
|
|
@@ -5533,12 +5570,12 @@ function zs({
|
|
|
5533
5570
|
console.error("Error fetching configuration:", v);
|
|
5534
5571
|
let b = "Failed to load configuration";
|
|
5535
5572
|
if (v.response) {
|
|
5536
|
-
const
|
|
5537
|
-
|
|
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})`;
|
|
5538
5575
|
} else v.request ? b = "Network error. Please check your connection and try again." : b = v.message || "An unexpected error occurred while loading configuration.";
|
|
5539
|
-
|
|
5576
|
+
Pe.error(b), V();
|
|
5540
5577
|
} finally {
|
|
5541
|
-
|
|
5578
|
+
y(!1);
|
|
5542
5579
|
}
|
|
5543
5580
|
};
|
|
5544
5581
|
a && (i(a), t ? k() : V());
|
|
@@ -5548,36 +5585,36 @@ function zs({
|
|
|
5548
5585
|
...b,
|
|
5549
5586
|
[k]: v
|
|
5550
5587
|
})), p((b) => {
|
|
5551
|
-
const
|
|
5552
|
-
return
|
|
5588
|
+
const x = { ...b };
|
|
5589
|
+
return x[k] && delete x[k], x;
|
|
5553
5590
|
});
|
|
5554
5591
|
}, Y = () => {
|
|
5555
5592
|
const k = {};
|
|
5556
5593
|
return !m || !u || m.configuration.forEach((v) => {
|
|
5557
5594
|
if (v.type === "section")
|
|
5558
5595
|
v.fields.forEach((b) => {
|
|
5559
|
-
const
|
|
5560
|
-
if (b.required && (!
|
|
5596
|
+
const x = u[v.key]?.[b.key];
|
|
5597
|
+
if (b.required && (!x || typeof x == "string" && x.trim() === "")) {
|
|
5561
5598
|
k[v.key] || (k[v.key] = {}), k[v.key][b.key] = `${b.label} is required`;
|
|
5562
5599
|
return;
|
|
5563
5600
|
}
|
|
5564
|
-
if (b.fieldtype === "number" &&
|
|
5565
|
-
const
|
|
5566
|
-
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}`));
|
|
5567
5604
|
}
|
|
5568
5605
|
});
|
|
5569
5606
|
else if (v.type === "datatable") {
|
|
5570
5607
|
const b = u[v.key];
|
|
5571
|
-
Array.isArray(b) && b.forEach((
|
|
5608
|
+
Array.isArray(b) && b.forEach((x, $) => {
|
|
5572
5609
|
v.fields.forEach((M) => {
|
|
5573
|
-
const z =
|
|
5610
|
+
const z = x[M.key];
|
|
5574
5611
|
if (M.required && (!z || typeof z == "string" && z.trim() === "")) {
|
|
5575
|
-
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`;
|
|
5576
5613
|
return;
|
|
5577
5614
|
}
|
|
5578
5615
|
if (M.fieldtype === "number" && z !== "" && z !== null && z !== void 0) {
|
|
5579
|
-
const
|
|
5580
|
-
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}`));
|
|
5581
5618
|
}
|
|
5582
5619
|
});
|
|
5583
5620
|
});
|
|
@@ -5585,46 +5622,46 @@ function zs({
|
|
|
5585
5622
|
}), k;
|
|
5586
5623
|
}, G = (k) => Object.keys(k).length > 0, C = async (k) => {
|
|
5587
5624
|
const v = a?.configuration?.filter(
|
|
5588
|
-
(b) => b.fields?.some((
|
|
5625
|
+
(b) => b.fields?.some((x) => x.fieldtype === "managecollectionlist")
|
|
5589
5626
|
) || [];
|
|
5590
5627
|
for (const b of v) {
|
|
5591
|
-
const
|
|
5592
|
-
if (!
|
|
5593
|
-
const
|
|
5594
|
-
if (!Array.isArray(
|
|
5595
|
-
const M =
|
|
5596
|
-
let z = 0,
|
|
5597
|
-
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 $)
|
|
5598
5635
|
try {
|
|
5599
5636
|
if (F._temp && F._isDraft) {
|
|
5600
5637
|
console.log("Creating new collection:", F.categoryName);
|
|
5601
|
-
const
|
|
5638
|
+
const D = await Ze(M.collectionCreate, {
|
|
5602
5639
|
categoryName: F.categoryName,
|
|
5603
5640
|
order: F.order
|
|
5604
5641
|
});
|
|
5605
|
-
|
|
5642
|
+
D && (console.log("Collection created successfully:", D), z++);
|
|
5606
5643
|
} else if (F._isDraft && !F._temp) {
|
|
5607
5644
|
console.log("Updating collection:", F.id, F.categoryName);
|
|
5608
|
-
const
|
|
5609
|
-
|
|
5645
|
+
const D = await Hn(`${M.collectionUpdate}/${F.id}?newName=${encodeURIComponent(F.categoryName)}`);
|
|
5646
|
+
D && (console.log("Collection updated successfully:", D), I++);
|
|
5610
5647
|
}
|
|
5611
|
-
} catch (
|
|
5612
|
-
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}`);
|
|
5613
5650
|
}
|
|
5614
|
-
if (z > 0 ||
|
|
5651
|
+
if (z > 0 || I > 0) {
|
|
5615
5652
|
const F = [];
|
|
5616
|
-
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(", "));
|
|
5617
5654
|
}
|
|
5618
5655
|
}
|
|
5619
5656
|
}, h = () => {
|
|
5620
5657
|
const k = Y();
|
|
5621
5658
|
if (p(k), G(k)) {
|
|
5622
5659
|
let b = [];
|
|
5623
|
-
Object.keys(k).forEach((
|
|
5624
|
-
typeof k[
|
|
5625
|
-
typeof k[
|
|
5626
|
-
b.push(`${
|
|
5627
|
-
}) : 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][$]}`);
|
|
5628
5665
|
});
|
|
5629
5666
|
});
|
|
5630
5667
|
return;
|
|
@@ -5633,34 +5670,34 @@ function zs({
|
|
|
5633
5670
|
try {
|
|
5634
5671
|
N(!0);
|
|
5635
5672
|
const b = {};
|
|
5636
|
-
u && (await C(u), Object.keys(u).forEach((
|
|
5673
|
+
u && (await C(u), Object.keys(u).forEach(($) => {
|
|
5637
5674
|
const M = a?.configuration?.find(
|
|
5638
|
-
(z) => z.key ===
|
|
5675
|
+
(z) => z.key === $ && z.type === "datatable"
|
|
5639
5676
|
);
|
|
5640
|
-
M && Array.isArray(u[
|
|
5641
|
-
const
|
|
5677
|
+
M && Array.isArray(u[$]) ? b[$] = u[$].map((z) => {
|
|
5678
|
+
const I = { id: z.id || 0 };
|
|
5642
5679
|
return M.fields && M.fields.forEach((F) => {
|
|
5643
5680
|
if (F.fieldtype === "audience") {
|
|
5644
|
-
let
|
|
5645
|
-
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 = {
|
|
5646
5683
|
users: z[F.key].users || [],
|
|
5647
5684
|
groups: z[F.key].groups || [],
|
|
5648
5685
|
roles: z[F.key].roles || []
|
|
5649
|
-
}),
|
|
5686
|
+
}), I[F.key] = D;
|
|
5650
5687
|
} else
|
|
5651
|
-
|
|
5652
|
-
}),
|
|
5653
|
-
}) : b[
|
|
5688
|
+
I[F.key] = z[F.key] || "";
|
|
5689
|
+
}), I;
|
|
5690
|
+
}) : b[$] = u[$];
|
|
5654
5691
|
})), (!b.appkey || b.appkey === "") && (b.appkey = t);
|
|
5655
|
-
let
|
|
5656
|
-
if (
|
|
5692
|
+
let x = await Ze(A, b);
|
|
5693
|
+
if (x && x.status != "fail") {
|
|
5657
5694
|
p({});
|
|
5658
|
-
const
|
|
5659
|
-
|
|
5695
|
+
const $ = x.message || "Configuration has been saved successfully";
|
|
5696
|
+
Pe.success($), l && typeof l == "function" && l(u);
|
|
5660
5697
|
} else
|
|
5661
|
-
throw
|
|
5698
|
+
throw Pe.error(x?.message || "Failed to save configuration"), new Error("No response received from server");
|
|
5662
5699
|
} catch (b) {
|
|
5663
|
-
console.error("Error saving configuration:", b),
|
|
5700
|
+
console.error("Error saving configuration:", b), Pe.error(b?.message || "Failed to save configuration");
|
|
5664
5701
|
} finally {
|
|
5665
5702
|
N(!1);
|
|
5666
5703
|
}
|
|
@@ -5672,7 +5709,7 @@ function zs({
|
|
|
5672
5709
|
}
|
|
5673
5710
|
d && Object.keys(d).length > 0 && !window.confirm(
|
|
5674
5711
|
"You have validation errors that will be lost. Are you sure you want to cancel?"
|
|
5675
|
-
) || (p({}), g(null), R((v) => v + 1),
|
|
5712
|
+
) || (p({}), g(null), R((v) => v + 1), Pe.info("Configuration changes cancelled"));
|
|
5676
5713
|
};
|
|
5677
5714
|
if (!m?.configuration && !a?.configuration)
|
|
5678
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" }) });
|
|
@@ -5727,7 +5764,7 @@ function zs({
|
|
|
5727
5764
|
] })
|
|
5728
5765
|
] });
|
|
5729
5766
|
}
|
|
5730
|
-
const
|
|
5767
|
+
const Hl = ({
|
|
5731
5768
|
config: t,
|
|
5732
5769
|
appid: a = "Configuration-Page",
|
|
5733
5770
|
disableApi: s = !1
|
|
@@ -5736,7 +5773,7 @@ const Ql = ({
|
|
|
5736
5773
|
pageHeader: u = {},
|
|
5737
5774
|
appletHeader: g = {},
|
|
5738
5775
|
breadcrumb: f = [],
|
|
5739
|
-
overview:
|
|
5776
|
+
overview: y = {},
|
|
5740
5777
|
configuration: r = []
|
|
5741
5778
|
} = t, N = r.map((C) => {
|
|
5742
5779
|
if (C.type === "section" && C.fields) {
|
|
@@ -5751,7 +5788,7 @@ const Ql = ({
|
|
|
5751
5788
|
placeholder: a,
|
|
5752
5789
|
disabled: !1
|
|
5753
5790
|
}, h.some((v) => v.key === "displayname")) {
|
|
5754
|
-
const v = h.findIndex((
|
|
5791
|
+
const v = h.findIndex((x) => x.key === "displayname"), b = h[v] || {};
|
|
5755
5792
|
h[v] = {
|
|
5756
5793
|
...b,
|
|
5757
5794
|
default: b.default || b.value || a,
|
|
@@ -5785,7 +5822,7 @@ const Ql = ({
|
|
|
5785
5822
|
}, p = f.map((C) => ({
|
|
5786
5823
|
label: C.text,
|
|
5787
5824
|
href: C.href || "#"
|
|
5788
|
-
})),
|
|
5825
|
+
})), S = ae(() => {
|
|
5789
5826
|
console.log("handleCancelRequest called - showing modal"), i(!0);
|
|
5790
5827
|
}, []), A = ae((C) => {
|
|
5791
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");
|
|
@@ -5831,10 +5868,10 @@ const Ql = ({
|
|
|
5831
5868
|
description: "Description of feature 2"
|
|
5832
5869
|
}
|
|
5833
5870
|
],
|
|
5834
|
-
...
|
|
5871
|
+
...y
|
|
5835
5872
|
}, U = [
|
|
5836
5873
|
{ label: "Overview", content: G(V) },
|
|
5837
|
-
{ 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 }) }
|
|
5838
5875
|
];
|
|
5839
5876
|
function Y(C) {
|
|
5840
5877
|
return C ? C.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: C } }) : C : "📱";
|
|
@@ -5920,7 +5957,7 @@ const Ql = ({
|
|
|
5920
5957
|
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: U[o].content })
|
|
5921
5958
|
] }),
|
|
5922
5959
|
/* @__PURE__ */ e(
|
|
5923
|
-
|
|
5960
|
+
Pn,
|
|
5924
5961
|
{
|
|
5925
5962
|
isOpen: m,
|
|
5926
5963
|
onClose: A,
|
|
@@ -5973,12 +6010,12 @@ const Kl = ({
|
|
|
5973
6010
|
// Feature toggles
|
|
5974
6011
|
showSearch: g = !0,
|
|
5975
6012
|
showColumnChooser: f = !0,
|
|
5976
|
-
showFilter:
|
|
6013
|
+
showFilter: y = !1,
|
|
5977
6014
|
showPrint: r = !1,
|
|
5978
6015
|
showExcel: N = !1,
|
|
5979
6016
|
showPdf: d = !1,
|
|
5980
6017
|
showRefresh: p = !1,
|
|
5981
|
-
showAdd:
|
|
6018
|
+
showAdd: S = !1,
|
|
5982
6019
|
// Additional props
|
|
5983
6020
|
searchPlaceholder: A = "Search...",
|
|
5984
6021
|
handleRefreshClick: E = () => {
|
|
@@ -5989,42 +6026,42 @@ const Kl = ({
|
|
|
5989
6026
|
excelFileName: O,
|
|
5990
6027
|
pdfFileName: V
|
|
5991
6028
|
}) => {
|
|
5992
|
-
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(
|
|
5993
6030
|
(b) => {
|
|
5994
|
-
const
|
|
5995
|
-
if (console.log("openColumnChooserNear",
|
|
6031
|
+
const x = U();
|
|
6032
|
+
if (console.log("openColumnChooserNear", x), !!x?.openColumnChooser) {
|
|
5996
6033
|
if (typeof window > "u" || !b?.currentTarget) {
|
|
5997
|
-
|
|
6034
|
+
x.openColumnChooser();
|
|
5998
6035
|
return;
|
|
5999
6036
|
}
|
|
6000
6037
|
try {
|
|
6001
|
-
const
|
|
6002
|
-
let
|
|
6003
|
-
const
|
|
6004
|
-
|
|
6005
|
-
} catch (
|
|
6006
|
-
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", $);
|
|
6007
6044
|
}
|
|
6008
6045
|
}
|
|
6009
6046
|
},
|
|
6010
6047
|
[]
|
|
6011
6048
|
// no external deps; reads ref at call time
|
|
6012
6049
|
), v = ae(
|
|
6013
|
-
(b,
|
|
6014
|
-
const
|
|
6015
|
-
if (
|
|
6050
|
+
(b, x) => {
|
|
6051
|
+
const $ = U();
|
|
6052
|
+
if ($)
|
|
6016
6053
|
switch (b) {
|
|
6017
6054
|
case "ColumnChooser":
|
|
6018
|
-
f && (console.log("openColumnChooser",
|
|
6055
|
+
f && (console.log("openColumnChooser", x), x ? k(x) : $.openColumnChooser?.()), console.log("openColumnChooser out", x);
|
|
6019
6056
|
break;
|
|
6020
6057
|
case "Print":
|
|
6021
|
-
r &&
|
|
6058
|
+
r && $.print?.();
|
|
6022
6059
|
break;
|
|
6023
6060
|
case "Excel":
|
|
6024
|
-
N &&
|
|
6061
|
+
N && $.excelExport?.({ fileName: h });
|
|
6025
6062
|
break;
|
|
6026
6063
|
case "Pdf":
|
|
6027
|
-
d &&
|
|
6064
|
+
d && $.pdfExport?.({ fileName: w });
|
|
6028
6065
|
break;
|
|
6029
6066
|
case "Refresh":
|
|
6030
6067
|
p && E();
|
|
@@ -6066,7 +6103,7 @@ const Kl = ({
|
|
|
6066
6103
|
title: "Choose Columns"
|
|
6067
6104
|
}
|
|
6068
6105
|
),
|
|
6069
|
-
|
|
6106
|
+
y && /* @__PURE__ */ e(
|
|
6070
6107
|
ee,
|
|
6071
6108
|
{
|
|
6072
6109
|
icon: vr,
|
|
@@ -6122,7 +6159,7 @@ const Kl = ({
|
|
|
6122
6159
|
}
|
|
6123
6160
|
)
|
|
6124
6161
|
] }),
|
|
6125
|
-
|
|
6162
|
+
S && m && /* @__PURE__ */ e(
|
|
6126
6163
|
ee,
|
|
6127
6164
|
{
|
|
6128
6165
|
label: u,
|
|
@@ -6150,12 +6187,12 @@ function eo(t) {
|
|
|
6150
6187
|
allowFiltering: u = !1,
|
|
6151
6188
|
allowGrouping: g = !1,
|
|
6152
6189
|
allowReordering: f = !0,
|
|
6153
|
-
allowResizing:
|
|
6190
|
+
allowResizing: y = !0,
|
|
6154
6191
|
allowExcelExport: r = !1,
|
|
6155
6192
|
allowPdfExport: N = !1,
|
|
6156
6193
|
showColumnChooser: d = !1,
|
|
6157
6194
|
enableSearchApi: p = !1,
|
|
6158
|
-
height:
|
|
6195
|
+
height: S = "600",
|
|
6159
6196
|
selectionSettings: A = { type: "Multiple", mode: "Row" },
|
|
6160
6197
|
enableCheckbox: E = !1,
|
|
6161
6198
|
columns: R = [],
|
|
@@ -6169,10 +6206,10 @@ function eo(t) {
|
|
|
6169
6206
|
pageSettings: w,
|
|
6170
6207
|
sortSettings: T,
|
|
6171
6208
|
...k
|
|
6172
|
-
} = 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(() => {
|
|
6173
6210
|
const j = [sn];
|
|
6174
|
-
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),
|
|
6175
|
-
}, [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(() => {
|
|
6176
6213
|
const j = () => h.current, re = (W, ve) => {
|
|
6177
6214
|
!ve && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${W} requested but related service/feature is disabled.`);
|
|
6178
6215
|
};
|
|
@@ -6206,8 +6243,8 @@ function eo(t) {
|
|
|
6206
6243
|
const _ = (j) => {
|
|
6207
6244
|
const re = String(j || "");
|
|
6208
6245
|
return re === "Ascending" || re === "Descending" ? re : re.toLowerCase() === "ascending" ? "Ascending" : "Descending";
|
|
6209
|
-
},
|
|
6210
|
-
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) => ({
|
|
6211
6248
|
field: Oe.field,
|
|
6212
6249
|
dir: _(Oe.direction ?? Oe.dir)
|
|
6213
6250
|
})), nt = j?.searchString ?? "", st = j?.columns ?? re?.filterSettings?.columns ?? [];
|
|
@@ -6223,12 +6260,12 @@ function eo(t) {
|
|
|
6223
6260
|
}, q = (j) => {
|
|
6224
6261
|
setTimeout(() => {
|
|
6225
6262
|
h?.current?.hideSpinner();
|
|
6226
|
-
}, 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);
|
|
6227
6264
|
}, X = (j) => {
|
|
6228
6265
|
typeof Y == "function" && Y(j?.rowData, j);
|
|
6229
6266
|
}, xe = () => {
|
|
6230
6267
|
const j = [];
|
|
6231
|
-
return E && j.push(/* @__PURE__ */ e(
|
|
6268
|
+
return E && j.push(/* @__PURE__ */ e(Dt, { type: "checkbox", width: "50" }, "__checkbox__")), R.forEach((re, W) => {
|
|
6232
6269
|
const {
|
|
6233
6270
|
field: ve,
|
|
6234
6271
|
headerText: Re,
|
|
@@ -6241,15 +6278,15 @@ function eo(t) {
|
|
|
6241
6278
|
allowSorting: Ea = !0,
|
|
6242
6279
|
type: Ra,
|
|
6243
6280
|
format: Oa,
|
|
6244
|
-
visible:
|
|
6245
|
-
minWidth:
|
|
6281
|
+
visible: Ia = !0,
|
|
6282
|
+
minWidth: Pa,
|
|
6246
6283
|
maxWidth: Ma,
|
|
6247
6284
|
customAttributes: La,
|
|
6248
6285
|
...Ba
|
|
6249
6286
|
} = re || {};
|
|
6250
6287
|
j.push(
|
|
6251
6288
|
/* @__PURE__ */ e(
|
|
6252
|
-
|
|
6289
|
+
Dt,
|
|
6253
6290
|
{
|
|
6254
6291
|
field: ve,
|
|
6255
6292
|
headerText: Re,
|
|
@@ -6262,8 +6299,8 @@ function eo(t) {
|
|
|
6262
6299
|
allowSorting: Ea,
|
|
6263
6300
|
type: Ra,
|
|
6264
6301
|
format: Oa,
|
|
6265
|
-
visible:
|
|
6266
|
-
minWidth:
|
|
6302
|
+
visible: Ia,
|
|
6303
|
+
minWidth: Pa,
|
|
6267
6304
|
maxWidth: Ma,
|
|
6268
6305
|
customAttributes: La,
|
|
6269
6306
|
...Ba
|
|
@@ -6282,18 +6319,18 @@ function eo(t) {
|
|
|
6282
6319
|
result: a,
|
|
6283
6320
|
count: s
|
|
6284
6321
|
},
|
|
6285
|
-
height:
|
|
6322
|
+
height: S,
|
|
6286
6323
|
allowPaging: m,
|
|
6287
6324
|
allowSorting: i,
|
|
6288
6325
|
allowFiltering: u,
|
|
6289
6326
|
allowGrouping: g,
|
|
6290
6327
|
allowReordering: f,
|
|
6291
|
-
allowResizing:
|
|
6328
|
+
allowResizing: y,
|
|
6292
6329
|
showColumnChooser: d,
|
|
6293
6330
|
selectionSettings: A,
|
|
6294
6331
|
pageSettings: { pageSize: 10, pageSizes: w?.pageSizes ?? [20, 40, 60, 80, 100] },
|
|
6295
6332
|
sortSettings: T ?? {
|
|
6296
|
-
columns: [{ field: M, direction: _(
|
|
6333
|
+
columns: [{ field: M, direction: _(I) }],
|
|
6297
6334
|
allowUnsort: !1
|
|
6298
6335
|
},
|
|
6299
6336
|
actionBegin: q,
|
|
@@ -6303,7 +6340,7 @@ function eo(t) {
|
|
|
6303
6340
|
...k,
|
|
6304
6341
|
children: [
|
|
6305
6342
|
/* @__PURE__ */ e(yn, { children: xe() }),
|
|
6306
|
-
/* @__PURE__ */ e(xn, { services:
|
|
6343
|
+
/* @__PURE__ */ e(xn, { services: D })
|
|
6307
6344
|
]
|
|
6308
6345
|
}
|
|
6309
6346
|
);
|
|
@@ -6342,7 +6379,7 @@ function oe({
|
|
|
6342
6379
|
details: i = {},
|
|
6343
6380
|
...u
|
|
6344
6381
|
}) {
|
|
6345
|
-
const g = Xe(), f = Ss(u, m),
|
|
6382
|
+
const g = Xe(), f = Ss(u, m), y = (N) => {
|
|
6346
6383
|
l?.({
|
|
6347
6384
|
key: f,
|
|
6348
6385
|
checked: N.target.checked,
|
|
@@ -6362,7 +6399,7 @@ function oe({
|
|
|
6362
6399
|
id: g,
|
|
6363
6400
|
type: "checkbox",
|
|
6364
6401
|
className: "h-4 w-4 rounded border-zinc-300 focus:ring-[var(--primaryColor)]",
|
|
6365
|
-
onChange:
|
|
6402
|
+
onChange: y,
|
|
6366
6403
|
"aria-label": "Select card"
|
|
6367
6404
|
}
|
|
6368
6405
|
) }),
|
|
@@ -6390,7 +6427,7 @@ function Ds({
|
|
|
6390
6427
|
moreGroupsLabel: u = "+ 5 more",
|
|
6391
6428
|
author: g = "Judith Black",
|
|
6392
6429
|
timeLabel: f = "Just now",
|
|
6393
|
-
imageUrl:
|
|
6430
|
+
imageUrl: y = "https://images.unsplash.com/photo-1469980098053-382eb10ba017?q=80&w=1200&auto=format&fit=crop",
|
|
6394
6431
|
description: r = "Columbia University is a prestigious Ivy League institution located in the heart of New York City.",
|
|
6395
6432
|
// spread remaining props (_id, instanceId, etc.)
|
|
6396
6433
|
...N
|
|
@@ -6447,7 +6484,7 @@ function Ds({
|
|
|
6447
6484
|
"div",
|
|
6448
6485
|
{
|
|
6449
6486
|
className: `mt-3 overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800 ${p.media}`,
|
|
6450
|
-
children: /* @__PURE__ */ e("img", { src:
|
|
6487
|
+
children: /* @__PURE__ */ e("img", { src: y, alt: "", className: "h-full w-full object-cover" })
|
|
6451
6488
|
}
|
|
6452
6489
|
),
|
|
6453
6490
|
/* @__PURE__ */ e("div", { className: "mt-3 w-full flex justify-center", children: /* @__PURE__ */ e(
|
|
@@ -6514,11 +6551,11 @@ function Es({
|
|
|
6514
6551
|
// spread for identity (_id/instanceId/etc)
|
|
6515
6552
|
...g
|
|
6516
6553
|
}) {
|
|
6517
|
-
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"}`;
|
|
6518
6555
|
return /* @__PURE__ */ n(
|
|
6519
6556
|
oe,
|
|
6520
6557
|
{
|
|
6521
|
-
className: `flex flex-col ${
|
|
6558
|
+
className: `flex flex-col ${y.card} ${r.wrap}`,
|
|
6522
6559
|
showCheckbox: a,
|
|
6523
6560
|
checkboxPosition: s,
|
|
6524
6561
|
onSelect: o,
|
|
@@ -6527,7 +6564,7 @@ function Es({
|
|
|
6527
6564
|
...g,
|
|
6528
6565
|
children: [
|
|
6529
6566
|
/* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
|
|
6530
|
-
/* @__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 }),
|
|
6531
6568
|
/* @__PURE__ */ e(
|
|
6532
6569
|
"span",
|
|
6533
6570
|
{
|
|
@@ -6686,8 +6723,8 @@ const Rs = [
|
|
|
6686
6723
|
date: "text-sm",
|
|
6687
6724
|
excerpt: "text-sm text-zinc-600 dark:text-zinc-300 line-clamp-2"
|
|
6688
6725
|
}
|
|
6689
|
-
},
|
|
6690
|
-
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({
|
|
6691
6728
|
size: t = "md",
|
|
6692
6729
|
showCheckbox: a = !1,
|
|
6693
6730
|
checkboxPosition: s = "top-left",
|
|
@@ -6698,11 +6735,11 @@ function Ps({
|
|
|
6698
6735
|
// spread for identity fields: _id / id / instanceId etc.
|
|
6699
6736
|
...u
|
|
6700
6737
|
}) {
|
|
6701
|
-
const g = ie(t), f = ce[g],
|
|
6738
|
+
const g = ie(t), f = ce[g], y = Os[g];
|
|
6702
6739
|
return /* @__PURE__ */ n(
|
|
6703
6740
|
oe,
|
|
6704
6741
|
{
|
|
6705
|
-
className: `flex flex-col ${f.card} ${
|
|
6742
|
+
className: `flex flex-col ${f.card} ${y.wrap || ""}`,
|
|
6706
6743
|
showCheckbox: a,
|
|
6707
6744
|
checkboxPosition: s,
|
|
6708
6745
|
onSelect: o,
|
|
@@ -6716,12 +6753,12 @@ function Ps({
|
|
|
6716
6753
|
] }),
|
|
6717
6754
|
g === "lg" ? (
|
|
6718
6755
|
// Large: 3-up grid of image cards
|
|
6719
|
-
/* @__PURE__ */ e("div", { className: `mt-4 ${
|
|
6720
|
-
/* @__PURE__ */ e("img", { src: r.thumb, alt: "", className:
|
|
6721
|
-
/* @__PURE__ */ e("h4", { className: `mt-3 ${
|
|
6722
|
-
/* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${
|
|
6723
|
-
/* @__PURE__ */ e("div", { className: "mt-2", children: /* @__PURE__ */ e(
|
|
6724
|
-
/* @__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: [
|
|
6725
6762
|
r.excerpt,
|
|
6726
6763
|
" ",
|
|
6727
6764
|
/* @__PURE__ */ e("span", { className: "underline decoration-dotted text-indigo-700 cursor-default", children: "View more" })
|
|
@@ -6734,12 +6771,12 @@ function Ps({
|
|
|
6734
6771
|
{
|
|
6735
6772
|
className: "flex items-start gap-3 rounded-xl border border-zinc-200 dark:border-zinc-800 p-2",
|
|
6736
6773
|
children: [
|
|
6737
|
-
/* @__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" }) }),
|
|
6738
6775
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
|
|
6739
|
-
/* @__PURE__ */ e("h4", { className: `${
|
|
6740
|
-
/* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${
|
|
6741
|
-
/* @__PURE__ */ e("div", { className: "mt-1", children: /* @__PURE__ */ e(
|
|
6742
|
-
|
|
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: [
|
|
6743
6780
|
r.excerpt,
|
|
6744
6781
|
" ",
|
|
6745
6782
|
/* @__PURE__ */ e("span", { className: "underline decoration-dotted text-indigo-700 cursor-default", children: "View more" })
|
|
@@ -6755,7 +6792,7 @@ function Ps({
|
|
|
6755
6792
|
}
|
|
6756
6793
|
);
|
|
6757
6794
|
}
|
|
6758
|
-
|
|
6795
|
+
Is.propTypes = {
|
|
6759
6796
|
size: c.string,
|
|
6760
6797
|
showCheckbox: c.bool,
|
|
6761
6798
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -6773,7 +6810,7 @@ Ps.propTypes = {
|
|
|
6773
6810
|
})
|
|
6774
6811
|
)
|
|
6775
6812
|
};
|
|
6776
|
-
const
|
|
6813
|
+
const Ps = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Ms = {
|
|
6777
6814
|
sm: {
|
|
6778
6815
|
wrap: "max-w-md w-full md:w-auto flex-none justify-self-start",
|
|
6779
6816
|
mapH: "h-48",
|
|
@@ -6811,27 +6848,27 @@ function js({
|
|
|
6811
6848
|
identity: l = "_id",
|
|
6812
6849
|
title: m = "Campus Map",
|
|
6813
6850
|
campusName: i = "Morningside Heights Campus",
|
|
6814
|
-
filters: u =
|
|
6851
|
+
filters: u = Ps,
|
|
6815
6852
|
activeFilter: g = "All",
|
|
6816
6853
|
// NEW: iframe controls
|
|
6817
6854
|
mapQuery: f = "Florida",
|
|
6818
|
-
zoom:
|
|
6855
|
+
zoom: y = 12,
|
|
6819
6856
|
mapUrl: r,
|
|
6820
6857
|
// optional full embed URL override
|
|
6821
6858
|
...N
|
|
6822
6859
|
}) {
|
|
6823
|
-
const d = ie(t), p = ce[d],
|
|
6860
|
+
const d = ie(t), p = ce[d], S = Ms[d], A = r || Bs(f, y);
|
|
6824
6861
|
return /* @__PURE__ */ e(
|
|
6825
6862
|
oe,
|
|
6826
6863
|
{
|
|
6827
|
-
className: `flex flex-col ${p.card} ${
|
|
6864
|
+
className: `flex flex-col ${p.card} ${S.wrap}`,
|
|
6828
6865
|
showCheckbox: a,
|
|
6829
6866
|
checkboxPosition: s,
|
|
6830
6867
|
onSelect: o,
|
|
6831
6868
|
identity: l,
|
|
6832
|
-
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 },
|
|
6833
6870
|
...N,
|
|
6834
|
-
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: [
|
|
6835
6872
|
/* @__PURE__ */ e(
|
|
6836
6873
|
"iframe",
|
|
6837
6874
|
{
|
|
@@ -6845,7 +6882,7 @@ function js({
|
|
|
6845
6882
|
}
|
|
6846
6883
|
),
|
|
6847
6884
|
/* @__PURE__ */ n("div", { className: "absolute left-4 right-4 top-3 flex items-center justify-between pointer-events-none", children: [
|
|
6848
|
-
/* @__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: [
|
|
6849
6886
|
/* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children: i }),
|
|
6850
6887
|
/* @__PURE__ */ e("span", { className: "ml-2 text-zinc-400", children: "▾" })
|
|
6851
6888
|
] }),
|
|
@@ -6854,8 +6891,8 @@ function js({
|
|
|
6854
6891
|
/* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
|
|
6855
6892
|
] })
|
|
6856
6893
|
] }),
|
|
6857
|
-
/* @__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 ${
|
|
6858
|
-
/* @__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: [
|
|
6859
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" }) }),
|
|
6860
6897
|
/* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
|
|
6861
6898
|
] }) })
|
|
@@ -6955,7 +6992,7 @@ const Vs = [
|
|
|
6955
6992
|
time: a.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })
|
|
6956
6993
|
};
|
|
6957
6994
|
};
|
|
6958
|
-
function
|
|
6995
|
+
function Vt({ ev: t, sizeMeta: a, isSelected: s, onClick: o }) {
|
|
6959
6996
|
const { day: l, month: m, time: i } = Ta(t.date);
|
|
6960
6997
|
return /* @__PURE__ */ n(
|
|
6961
6998
|
"div",
|
|
@@ -7005,7 +7042,7 @@ function Gs({ ev: t, sizeMeta: a }) {
|
|
|
7005
7042
|
}
|
|
7006
7043
|
) }),
|
|
7007
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: [
|
|
7008
|
-
/* @__PURE__ */ e(
|
|
7045
|
+
/* @__PURE__ */ e(aa, { className: "h-4 w-4" }),
|
|
7009
7046
|
t.location
|
|
7010
7047
|
] }),
|
|
7011
7048
|
t.url && /* @__PURE__ */ n("div", { className: `flex items-center gap-2 mb-4 text-zinc-600 dark:text-zinc-400 ${a.meta}`, children: [
|
|
@@ -7026,8 +7063,8 @@ function qs({
|
|
|
7026
7063
|
selectedIndex: u = 0,
|
|
7027
7064
|
...g
|
|
7028
7065
|
}) {
|
|
7029
|
-
const [f,
|
|
7030
|
-
|
|
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);
|
|
7031
7068
|
}, A = r === "lg";
|
|
7032
7069
|
return /* @__PURE__ */ n(
|
|
7033
7070
|
oe,
|
|
@@ -7048,12 +7085,12 @@ function qs({
|
|
|
7048
7085
|
// Large: Two-column layout
|
|
7049
7086
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
7050
7087
|
/* @__PURE__ */ e("div", { className: "space-y-1", children: i.map((E, R) => /* @__PURE__ */ e(
|
|
7051
|
-
|
|
7088
|
+
Vt,
|
|
7052
7089
|
{
|
|
7053
7090
|
ev: E,
|
|
7054
7091
|
sizeMeta: d,
|
|
7055
7092
|
isSelected: R === f,
|
|
7056
|
-
onClick: (O) =>
|
|
7093
|
+
onClick: (O) => S(O, R)
|
|
7057
7094
|
},
|
|
7058
7095
|
E._id || E.id || R
|
|
7059
7096
|
)) }),
|
|
@@ -7062,12 +7099,12 @@ function qs({
|
|
|
7062
7099
|
) : (
|
|
7063
7100
|
// Small/Medium: Simple list only
|
|
7064
7101
|
/* @__PURE__ */ e("div", { className: "space-y-1", children: i.map((E, R) => /* @__PURE__ */ e(
|
|
7065
|
-
|
|
7102
|
+
Vt,
|
|
7066
7103
|
{
|
|
7067
7104
|
ev: E,
|
|
7068
7105
|
sizeMeta: d,
|
|
7069
7106
|
isSelected: R === f,
|
|
7070
|
-
onClick: (O) =>
|
|
7107
|
+
onClick: (O) => S(O, R)
|
|
7071
7108
|
},
|
|
7072
7109
|
E._id || E.id || R
|
|
7073
7110
|
)) })
|
|
@@ -7241,9 +7278,9 @@ function Xs({
|
|
|
7241
7278
|
selectedIndex: u = 0,
|
|
7242
7279
|
onStar: g,
|
|
7243
7280
|
onPin: f,
|
|
7244
|
-
...
|
|
7281
|
+
...y
|
|
7245
7282
|
}) {
|
|
7246
|
-
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) => {
|
|
7247
7284
|
N(V), o?.(O);
|
|
7248
7285
|
}, E = (O) => {
|
|
7249
7286
|
const V = { ...O, starred: !O.starred };
|
|
@@ -7255,13 +7292,13 @@ function Xs({
|
|
|
7255
7292
|
return /* @__PURE__ */ n(
|
|
7256
7293
|
oe,
|
|
7257
7294
|
{
|
|
7258
|
-
className: `flex flex-col ${p.card} ${
|
|
7295
|
+
className: `flex flex-col ${p.card} ${S.wrap}`,
|
|
7259
7296
|
showCheckbox: a,
|
|
7260
7297
|
checkboxPosition: s,
|
|
7261
7298
|
onSelect: o,
|
|
7262
7299
|
identity: l,
|
|
7263
7300
|
details: { type: "emails", title: m, count: i?.length ?? 0 },
|
|
7264
|
-
...
|
|
7301
|
+
...y,
|
|
7265
7302
|
children: [
|
|
7266
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 }) }),
|
|
7267
7304
|
/* @__PURE__ */ e(he, { placeholder: "Type to search..." }),
|
|
@@ -7269,7 +7306,7 @@ function Xs({
|
|
|
7269
7306
|
Js,
|
|
7270
7307
|
{
|
|
7271
7308
|
email: O,
|
|
7272
|
-
sizeMeta:
|
|
7309
|
+
sizeMeta: S,
|
|
7273
7310
|
isSelected: V === r,
|
|
7274
7311
|
onClick: (U) => A(U, V),
|
|
7275
7312
|
onStar: E,
|
|
@@ -7306,7 +7343,7 @@ Xs.propTypes = {
|
|
|
7306
7343
|
onStar: c.func,
|
|
7307
7344
|
onPin: c.func
|
|
7308
7345
|
};
|
|
7309
|
-
const
|
|
7346
|
+
const Qs = [
|
|
7310
7347
|
{
|
|
7311
7348
|
_id: "contact-1",
|
|
7312
7349
|
name: "Branden Baker",
|
|
@@ -7347,7 +7384,7 @@ const Hs = [
|
|
|
7347
7384
|
// building: "Security Building",
|
|
7348
7385
|
// initials: "AM"
|
|
7349
7386
|
// }
|
|
7350
|
-
],
|
|
7387
|
+
], Hs = {
|
|
7351
7388
|
sm: {
|
|
7352
7389
|
wrap: "max-w-sm w-full",
|
|
7353
7390
|
searchHeight: "h-8",
|
|
@@ -7394,7 +7431,7 @@ const Hs = [
|
|
|
7394
7431
|
// two columns for large screens
|
|
7395
7432
|
}
|
|
7396
7433
|
};
|
|
7397
|
-
function
|
|
7434
|
+
function _t({ contact: t, sizeMeta: a, isSelected: s, onClick: o }) {
|
|
7398
7435
|
return /* @__PURE__ */ n(
|
|
7399
7436
|
"div",
|
|
7400
7437
|
{
|
|
@@ -7406,7 +7443,7 @@ function Vt({ contact: t, sizeMeta: a, isSelected: s, onClick: o }) {
|
|
|
7406
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 }),
|
|
7407
7444
|
/* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
|
|
7408
7445
|
/* @__PURE__ */ n("div", { className: `flex items-center gap-1.5 ${a.details} text-zinc-600 dark:text-zinc-400`, children: [
|
|
7409
|
-
/* @__PURE__ */ e(
|
|
7446
|
+
/* @__PURE__ */ e(ra, { className: "h-3 w-3" }),
|
|
7410
7447
|
t.phone
|
|
7411
7448
|
] }),
|
|
7412
7449
|
/* @__PURE__ */ e("div", { className: `${a.department} text-zinc-500 dark:text-zinc-500 line-clamp-1`, children: t.department })
|
|
@@ -7431,7 +7468,7 @@ function Zs({ contact: t, sizeMeta: a }) {
|
|
|
7431
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" }),
|
|
7432
7469
|
/* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
7433
7470
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
7434
|
-
/* @__PURE__ */ e(
|
|
7471
|
+
/* @__PURE__ */ e(ra, { className: "h-4 w-4 text-zinc-500 dark:text-zinc-400 flex-shrink-0" }),
|
|
7435
7472
|
/* @__PURE__ */ n("div", { children: [
|
|
7436
7473
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-600 dark:text-zinc-400 font-medium`, children: "Phone Number" }),
|
|
7437
7474
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-900 dark:text-zinc-100`, children: t.phone })
|
|
@@ -7457,7 +7494,7 @@ function Zs({ contact: t, sizeMeta: a }) {
|
|
|
7457
7494
|
] })
|
|
7458
7495
|
] }),
|
|
7459
7496
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
7460
|
-
/* @__PURE__ */ e(
|
|
7497
|
+
/* @__PURE__ */ e(aa, { className: "h-4 w-4 text-zinc-500 dark:text-zinc-400 flex-shrink-0" }),
|
|
7461
7498
|
/* @__PURE__ */ n("div", { children: [
|
|
7462
7499
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-600 dark:text-zinc-400 font-medium`, children: "Campus" }),
|
|
7463
7500
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-900 dark:text-zinc-100`, children: t.campus })
|
|
@@ -7473,7 +7510,7 @@ function Zs({ contact: t, sizeMeta: a }) {
|
|
|
7473
7510
|
}
|
|
7474
7511
|
function Ks({ sizeMeta: t }) {
|
|
7475
7512
|
return /* @__PURE__ */ n("div", { className: `relative ${t.searchHeight} mb-4`, children: [
|
|
7476
|
-
/* @__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" }),
|
|
7477
7514
|
/* @__PURE__ */ e(
|
|
7478
7515
|
"input",
|
|
7479
7516
|
{
|
|
@@ -7491,13 +7528,13 @@ function el({
|
|
|
7491
7528
|
onSelect: o,
|
|
7492
7529
|
identity: l = "_id",
|
|
7493
7530
|
title: m = "Directory",
|
|
7494
|
-
contacts: i =
|
|
7531
|
+
contacts: i = Qs,
|
|
7495
7532
|
selectedIndex: u = 0,
|
|
7496
7533
|
...g
|
|
7497
7534
|
}) {
|
|
7498
|
-
const [f,
|
|
7499
|
-
|
|
7500
|
-
},
|
|
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";
|
|
7501
7538
|
return /* @__PURE__ */ n(
|
|
7502
7539
|
oe,
|
|
7503
7540
|
{
|
|
@@ -7513,7 +7550,7 @@ function el({
|
|
|
7513
7550
|
/* @__PURE__ */ e(Ks, { sizeMeta: d }),
|
|
7514
7551
|
A ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
|
|
7515
7552
|
/* @__PURE__ */ e("div", { className: "space-y-3", children: i.map((E, R) => /* @__PURE__ */ e(
|
|
7516
|
-
|
|
7553
|
+
_t,
|
|
7517
7554
|
{
|
|
7518
7555
|
contact: E,
|
|
7519
7556
|
sizeMeta: d,
|
|
@@ -7525,14 +7562,14 @@ function el({
|
|
|
7525
7562
|
/* @__PURE__ */ e(
|
|
7526
7563
|
Zs,
|
|
7527
7564
|
{
|
|
7528
|
-
contact:
|
|
7565
|
+
contact: S,
|
|
7529
7566
|
sizeMeta: d
|
|
7530
7567
|
}
|
|
7531
7568
|
)
|
|
7532
7569
|
] }) : (
|
|
7533
7570
|
// Single column layout for small screens
|
|
7534
7571
|
/* @__PURE__ */ e("div", { className: "space-y-3", children: i.map((E, R) => /* @__PURE__ */ e(
|
|
7535
|
-
|
|
7572
|
+
_t,
|
|
7536
7573
|
{
|
|
7537
7574
|
contact: E,
|
|
7538
7575
|
sizeMeta: d,
|
|
@@ -7629,7 +7666,7 @@ function rl({
|
|
|
7629
7666
|
balance: u = 3e3,
|
|
7630
7667
|
totalCharges: g = 4440,
|
|
7631
7668
|
totalPayments: f = 1568,
|
|
7632
|
-
transactions:
|
|
7669
|
+
transactions: y = [
|
|
7633
7670
|
{
|
|
7634
7671
|
id: "t1",
|
|
7635
7672
|
date: "February 16, 2025",
|
|
@@ -7663,7 +7700,7 @@ function rl({
|
|
|
7663
7700
|
/* @__PURE__ */ e("div", { className: `font-semibold ${d.title}`, children: m }),
|
|
7664
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: [
|
|
7665
7702
|
/* @__PURE__ */ e("span", { children: i }),
|
|
7666
|
-
/* @__PURE__ */ e(
|
|
7703
|
+
/* @__PURE__ */ e(Nt, { className: "h-4 w-4 opacity-70" })
|
|
7667
7704
|
] })
|
|
7668
7705
|
] }),
|
|
7669
7706
|
/* @__PURE__ */ n("div", { className: p.topGrid || p.grid, children: [
|
|
@@ -7692,16 +7729,16 @@ function rl({
|
|
|
7692
7729
|
/* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: De(f) })
|
|
7693
7730
|
] })
|
|
7694
7731
|
] }),
|
|
7695
|
-
/* @__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(
|
|
7696
7733
|
tl,
|
|
7697
7734
|
{
|
|
7698
7735
|
side: A === 0 ? "left" : "right",
|
|
7699
|
-
date:
|
|
7700
|
-
title:
|
|
7701
|
-
amount:
|
|
7702
|
-
kind:
|
|
7736
|
+
date: S.date,
|
|
7737
|
+
title: S.title,
|
|
7738
|
+
amount: S.amount,
|
|
7739
|
+
kind: S.kind
|
|
7703
7740
|
},
|
|
7704
|
-
|
|
7741
|
+
S.id || A
|
|
7705
7742
|
)) })
|
|
7706
7743
|
] })
|
|
7707
7744
|
] }),
|
|
@@ -7798,7 +7835,7 @@ const nl = {
|
|
|
7798
7835
|
]
|
|
7799
7836
|
}
|
|
7800
7837
|
];
|
|
7801
|
-
function
|
|
7838
|
+
function Ut({ leave: t, sizeMeta: a }) {
|
|
7802
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: [
|
|
7803
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: [
|
|
7804
7841
|
/* @__PURE__ */ e("span", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${a.table}`, children: t.name }),
|
|
@@ -7820,7 +7857,7 @@ function sl({
|
|
|
7820
7857
|
term: i = "Fall 2025",
|
|
7821
7858
|
...u
|
|
7822
7859
|
}) {
|
|
7823
|
-
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];
|
|
7824
7861
|
return /* @__PURE__ */ n(
|
|
7825
7862
|
oe,
|
|
7826
7863
|
{
|
|
@@ -7836,7 +7873,7 @@ function sl({
|
|
|
7836
7873
|
/* @__PURE__ */ n("div", { children: [
|
|
7837
7874
|
/* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${p.title} mb-1`, children: m }),
|
|
7838
7875
|
/* @__PURE__ */ n("div", { className: `text-zinc-600 dark:text-zinc-400 ${p.term} flex items-center gap-2`, children: [
|
|
7839
|
-
/* @__PURE__ */ e(
|
|
7876
|
+
/* @__PURE__ */ e(Yt, { className: "h-4 w-4" }),
|
|
7840
7877
|
"Term - ",
|
|
7841
7878
|
i
|
|
7842
7879
|
] })
|
|
@@ -7846,11 +7883,11 @@ function sl({
|
|
|
7846
7883
|
"button",
|
|
7847
7884
|
{
|
|
7848
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",
|
|
7849
|
-
onClick: () => r(!
|
|
7850
|
-
children: /* @__PURE__ */ e(
|
|
7886
|
+
onClick: () => r(!y),
|
|
7887
|
+
children: /* @__PURE__ */ e(na, { className: "h-4 w-4" })
|
|
7851
7888
|
}
|
|
7852
7889
|
),
|
|
7853
|
-
|
|
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: [
|
|
7854
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" }),
|
|
7855
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" })
|
|
7856
7893
|
] })
|
|
@@ -7867,17 +7904,17 @@ function sl({
|
|
|
7867
7904
|
)) }),
|
|
7868
7905
|
/* @__PURE__ */ e("div", { className: "space-y-4 mb-6", children: p.showAllLeave ? (
|
|
7869
7906
|
// LG: Show all leave types
|
|
7870
|
-
qe.map((A) => /* @__PURE__ */ e(
|
|
7907
|
+
qe.map((A) => /* @__PURE__ */ e(Ut, { leave: A, sizeMeta: p }, A.id))
|
|
7871
7908
|
) : p.showSingleLeave ? (
|
|
7872
7909
|
// MD: Show active tab leave type
|
|
7873
|
-
/* @__PURE__ */ e(
|
|
7910
|
+
/* @__PURE__ */ e(Ut, { leave: S, sizeMeta: p })
|
|
7874
7911
|
) : (
|
|
7875
7912
|
// SM: Show only available hours
|
|
7876
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: [
|
|
7877
7914
|
/* @__PURE__ */ e(Ae, { className: "h-5 w-5 text-blue-600 dark:text-blue-400" }),
|
|
7878
7915
|
/* @__PURE__ */ n("div", { children: [
|
|
7879
7916
|
/* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${p.table}`, children: "Available Leave" }),
|
|
7880
|
-
/* @__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 })
|
|
7881
7918
|
] })
|
|
7882
7919
|
] }) })
|
|
7883
7920
|
) }),
|
|
@@ -7990,7 +8027,7 @@ const ll = [
|
|
|
7990
8027
|
gridCols: "grid-cols-2"
|
|
7991
8028
|
}
|
|
7992
8029
|
};
|
|
7993
|
-
function
|
|
8030
|
+
function Gt({ item: t, sizeMeta: a, showDate: s = !1 }) {
|
|
7994
8031
|
const o = t.icon;
|
|
7995
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: [
|
|
7996
8033
|
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(o, { className: `h-6 w-6 ${t.color}` }) }),
|
|
@@ -8011,7 +8048,7 @@ function cl({
|
|
|
8011
8048
|
subtitle: i = "Drive Shared",
|
|
8012
8049
|
...u
|
|
8013
8050
|
}) {
|
|
8014
|
-
const [g, f] = L(!1),
|
|
8051
|
+
const [g, f] = L(!1), y = ie(t), r = ce[y], N = il[y];
|
|
8015
8052
|
return /* @__PURE__ */ n(
|
|
8016
8053
|
oe,
|
|
8017
8054
|
{
|
|
@@ -8039,7 +8076,7 @@ function cl({
|
|
|
8039
8076
|
),
|
|
8040
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: [
|
|
8041
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: [
|
|
8042
|
-
/* @__PURE__ */ e(
|
|
8079
|
+
/* @__PURE__ */ e(na, { className: "h-4 w-4" }),
|
|
8043
8080
|
"Download All"
|
|
8044
8081
|
] }),
|
|
8045
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: [
|
|
@@ -8050,7 +8087,7 @@ function cl({
|
|
|
8050
8087
|
] })
|
|
8051
8088
|
] }),
|
|
8052
8089
|
/* @__PURE__ */ e("div", { className: `grid ${N.gridCols} gap-3 `, children: ll.map((d) => /* @__PURE__ */ e(
|
|
8053
|
-
|
|
8090
|
+
Gt,
|
|
8054
8091
|
{
|
|
8055
8092
|
item: d,
|
|
8056
8093
|
sizeMeta: N
|
|
@@ -8060,7 +8097,7 @@ function cl({
|
|
|
8060
8097
|
N.showRecent && /* @__PURE__ */ n("div", { className: "", children: [
|
|
8061
8098
|
/* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${N.item}`, children: "Recent Files" }),
|
|
8062
8099
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: ol.map((d) => /* @__PURE__ */ e(
|
|
8063
|
-
|
|
8100
|
+
Gt,
|
|
8064
8101
|
{
|
|
8065
8102
|
item: d,
|
|
8066
8103
|
sizeMeta: N,
|
|
@@ -8155,20 +8192,20 @@ const dl = [
|
|
|
8155
8192
|
maxMessageWords: 25,
|
|
8156
8193
|
showMessage: !0
|
|
8157
8194
|
}
|
|
8158
|
-
},
|
|
8195
|
+
}, qt = (t, a) => {
|
|
8159
8196
|
if (!a || a === 0) return t;
|
|
8160
8197
|
const s = t.split(" ");
|
|
8161
8198
|
return s.length <= a ? t : s.slice(0, a).join(" ") + "...";
|
|
8162
8199
|
}, ul = (t) => {
|
|
8163
8200
|
switch (t) {
|
|
8164
8201
|
case "warning":
|
|
8165
|
-
return Wt;
|
|
8166
|
-
case "success":
|
|
8167
8202
|
return Jt;
|
|
8203
|
+
case "success":
|
|
8204
|
+
return Xt;
|
|
8168
8205
|
case "banner":
|
|
8169
|
-
return
|
|
8206
|
+
return sa;
|
|
8170
8207
|
default:
|
|
8171
|
-
return
|
|
8208
|
+
return Wt;
|
|
8172
8209
|
}
|
|
8173
8210
|
}, Aa = (t) => {
|
|
8174
8211
|
switch (t) {
|
|
@@ -8215,8 +8252,8 @@ function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: o }) {
|
|
|
8215
8252
|
/* @__PURE__ */ n("div", { className: "flex gap-3 pr-6", children: [
|
|
8216
8253
|
/* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(u, { className: `h-4 w-4 ${i.icon}` }) }),
|
|
8217
8254
|
/* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
|
|
8218
|
-
/* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-1 ${t.read ? "font-medium" : "font-semibold"}`, children:
|
|
8219
|
-
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) }),
|
|
8220
8257
|
/* @__PURE__ */ n("div", { className: `flex items-center gap-1 ${a.time} text-zinc-500 dark:text-zinc-400`, children: [
|
|
8221
8258
|
/* @__PURE__ */ e(Ae, { className: "h-3 w-3" }),
|
|
8222
8259
|
t.time
|
|
@@ -8231,7 +8268,7 @@ function pl({ alert: t, onDismiss: a }) {
|
|
|
8231
8268
|
o(!0), a?.(t);
|
|
8232
8269
|
};
|
|
8233
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: [
|
|
8234
|
-
/* @__PURE__ */ e(
|
|
8271
|
+
/* @__PURE__ */ e(sa, { className: `h-5 w-5 mt-0.5 ${l.icon}` }),
|
|
8235
8272
|
/* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
|
|
8236
8273
|
/* @__PURE__ */ e("div", { className: "font-semibold text-zinc-900 dark:text-zinc-100 text-sm mb-1", children: t.title }),
|
|
8237
8274
|
/* @__PURE__ */ e("div", { className: "text-zinc-600 dark:text-zinc-400 text-xs leading-relaxed", children: t.message })
|
|
@@ -8257,9 +8294,9 @@ function gl({
|
|
|
8257
8294
|
showBanner: u = !0,
|
|
8258
8295
|
...g
|
|
8259
8296
|
}) {
|
|
8260
|
-
const [f,
|
|
8261
|
-
|
|
8262
|
-
},
|
|
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");
|
|
8263
8300
|
return /* @__PURE__ */ n(
|
|
8264
8301
|
oe,
|
|
8265
8302
|
{
|
|
@@ -8272,10 +8309,10 @@ function gl({
|
|
|
8272
8309
|
...g,
|
|
8273
8310
|
children: [
|
|
8274
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 }) }),
|
|
8275
|
-
u &&
|
|
8312
|
+
u && S && t !== "sm" && /* @__PURE__ */ e(
|
|
8276
8313
|
pl,
|
|
8277
8314
|
{
|
|
8278
|
-
alert:
|
|
8315
|
+
alert: S,
|
|
8279
8316
|
onDismiss: p
|
|
8280
8317
|
}
|
|
8281
8318
|
),
|
|
@@ -8433,7 +8470,7 @@ function xl({
|
|
|
8433
8470
|
videos: i = bl,
|
|
8434
8471
|
...u
|
|
8435
8472
|
}) {
|
|
8436
|
-
const [g, f] = L(!1),
|
|
8473
|
+
const [g, f] = L(!1), y = ie(t), r = ce[y], N = fl[y];
|
|
8437
8474
|
return /* @__PURE__ */ n(
|
|
8438
8475
|
oe,
|
|
8439
8476
|
{
|
|
@@ -8512,7 +8549,7 @@ export {
|
|
|
8512
8549
|
Dn as Breadcrumbs,
|
|
8513
8550
|
Cn as Button,
|
|
8514
8551
|
js as CampusMapMock,
|
|
8515
|
-
|
|
8552
|
+
gt as Checkbox,
|
|
8516
8553
|
Es as CommunitiesMock,
|
|
8517
8554
|
eo as CustomDataGrid,
|
|
8518
8555
|
Wl as CustomDialog,
|
|
@@ -8525,16 +8562,16 @@ export {
|
|
|
8525
8562
|
zs as DynamicConfig,
|
|
8526
8563
|
qs as EventsMock,
|
|
8527
8564
|
El as FileUploadModal,
|
|
8528
|
-
|
|
8529
|
-
|
|
8565
|
+
Hl as FullConfigPage,
|
|
8566
|
+
Pl as FullScreenLoader,
|
|
8530
8567
|
Rl as GenericFilter,
|
|
8531
8568
|
Bl as IconButton,
|
|
8532
8569
|
J as Input,
|
|
8533
8570
|
sl as LeaveBalanceMock,
|
|
8534
8571
|
Da as ManageCollectionList,
|
|
8535
|
-
|
|
8572
|
+
Pn as Modal,
|
|
8536
8573
|
at as MultiSelect,
|
|
8537
|
-
|
|
8574
|
+
Is as NewsMock,
|
|
8538
8575
|
Xs as O365MailsMock,
|
|
8539
8576
|
_n as OptionsMenu,
|
|
8540
8577
|
Vn as PageHeader,
|
|
@@ -8542,9 +8579,9 @@ export {
|
|
|
8542
8579
|
Ol as Pagination,
|
|
8543
8580
|
ha as RadioGroup,
|
|
8544
8581
|
he as SearchBar,
|
|
8545
|
-
|
|
8582
|
+
yt as Select,
|
|
8546
8583
|
oe as SelectableCard,
|
|
8547
|
-
|
|
8584
|
+
Il as Sidebar,
|
|
8548
8585
|
ga as Spinner,
|
|
8549
8586
|
ba as Textarea,
|
|
8550
8587
|
Zl as ToastProvider,
|
|
@@ -8559,9 +8596,9 @@ export {
|
|
|
8559
8596
|
Ve as axiosGet,
|
|
8560
8597
|
ql as axiosPatch,
|
|
8561
8598
|
Ze as axiosPost,
|
|
8562
|
-
|
|
8599
|
+
Hn as axiosPut,
|
|
8563
8600
|
_l as cookies,
|
|
8564
|
-
|
|
8601
|
+
Qn as createHttpClient,
|
|
8565
8602
|
Yn as directoryPermissionsApi,
|
|
8566
8603
|
Wn as filePermissionsApi,
|
|
8567
8604
|
va as gateWayUrl,
|
|
@@ -8570,14 +8607,14 @@ export {
|
|
|
8570
8607
|
Ul as getSnapshot,
|
|
8571
8608
|
Yl as http,
|
|
8572
8609
|
qn as localStore,
|
|
8573
|
-
|
|
8610
|
+
kt as myDriveGatewayBaseV2,
|
|
8574
8611
|
ie as normalizeSize,
|
|
8575
|
-
|
|
8612
|
+
Pe as notify,
|
|
8576
8613
|
ka as provisioningBase,
|
|
8577
8614
|
Ca as rbacBase,
|
|
8578
8615
|
za as searchRolesApi,
|
|
8579
8616
|
Vl as sessionStore,
|
|
8580
8617
|
ce as sizeClasses,
|
|
8581
|
-
|
|
8618
|
+
Ql as toBrowserLocalTime,
|
|
8582
8619
|
Na as userSearchBase
|
|
8583
8620
|
};
|