unifyedx-storybook-new 0.2.24 → 0.2.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/unifyedx-storybook-new.es.js +663 -658
- package/dist/unifyedx-storybook-new.es.js.br +0 -0
- package/dist/unifyedx-storybook-new.es.js.gz +0 -0
- package/dist/{vendor-lodash-CWJBBGzd.js → vendor-lodash-C6Pmit-j.js} +1 -1
- package/dist/vendor-lodash-C6Pmit-j.js.br +0 -0
- package/dist/vendor-lodash-C6Pmit-j.js.gz +0 -0
- package/dist/vendor-wRQnjUYv.js +33464 -0
- package/dist/vendor-wRQnjUYv.js.br +0 -0
- package/dist/vendor-wRQnjUYv.js.gz +0 -0
- package/package.json +3 -1
- package/dist/vendor-D6FgPLRJ.js +0 -30580
- package/dist/vendor-D6FgPLRJ.js.br +0 -0
- package/dist/vendor-D6FgPLRJ.js.gz +0 -0
- package/dist/vendor-lodash-CWJBBGzd.js.br +0 -0
- package/dist/vendor-lodash-CWJBBGzd.js.gz +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e, Fragment as te } from "react/jsx-runtime";
|
|
2
|
-
import re, { useState as L, useMemo as ue, useId as
|
|
3
|
-
import { a as
|
|
4
|
-
import { Popover as
|
|
2
|
+
import re, { useState as L, useMemo as ue, useId as Qe, Fragment as Q, useEffect as Z, useCallback as ae, useRef as xe } from "react";
|
|
3
|
+
import { a as H, U as mt, X as ge, P as c, L as Ua, C as ve, b as tt, f as Ze, d as yt, D as Yt, F as qa, e as Ga, h as Ya, T as Ke, u as Wa, i as zt, I as Wt, j as Jt, k as Ja, l as Xa, m as Ha, n as Xt, S as vt, o as Ht, M as Qa, p as Za, q as wt, r as Ka, A as er, E as Qt, s as tr, t as ar, v as rr, w as nr, x as Zt, y as sr, z as Kt, B as ea, G as lr, H as ir, J as or, K as et, N as ut, O as ht, Q as cr, R as dr, V as ta, W as mr, Y as Nt, Z as ur, _ as hr, $ as Me, a0 as pr, a1 as gr, a2 as br, a3 as fr, a4 as xr, a5 as yr, a6 as St, a7 as vr, a8 as wr, a9 as Nr, aa as kr, ab as Cr, ac as zr, ad as Sr, ae as Dr, af as $r, ag as Fe, ah as aa, ai as Tr, aj as Ar, ak as Fr, al as Er, am as Rr, an as ra, ao as Ir, ap as Or, aq as na, ar as Pr, as as pt, at as sa, au as Lr } from "./vendor-wRQnjUYv.js";
|
|
4
|
+
import { Popover as Mr, PopoverButton as Br, PopoverPanel as jr, Transition as he, Dialog as ye, TransitionChild as Ne, DialogPanel as Ee, DialogTitle as at, TabGroup as Vr, TabList as _r, Tab as se, TabPanels as Ur, RadioGroup as qe, Listbox as K, ListboxButton as qr, ListboxOptions as Gr, ListboxOption as Yr, SwitchGroup as Wr, Switch as ot, Menu as Jr, MenuButton as Xr, Portal as Hr, MenuItems as Qr, MenuItem as Zr, DialogBackdrop as Kr } from "@headlessui/react";
|
|
5
5
|
import { motion as le, AnimatePresence as Ce } from "framer-motion";
|
|
6
|
-
import { d as
|
|
7
|
-
import { useFloating as
|
|
8
|
-
import ct, { debounce as
|
|
9
|
-
import { toast as me, ToastContainer as
|
|
6
|
+
import { d as en } from "./vendor-lodash-C6Pmit-j.js";
|
|
7
|
+
import { useFloating as la, offset as ia, flip as oa, shift as ca, autoUpdate as da, useClick as tn, useDismiss as an, useInteractions as rn, FloatingPortal as nn } from "@floating-ui/react";
|
|
8
|
+
import ct, { debounce as sn } from "lodash";
|
|
9
|
+
import { toast as me, ToastContainer as ln, Slide as on } from "react-toastify";
|
|
10
10
|
import "react-toastify/dist/ReactToastify.css";
|
|
11
|
-
import { P as
|
|
12
|
-
const
|
|
11
|
+
import { P as cn, S as dn, F as mn, G as un, a as hn, E as pn, b as gn, C as bn, R as fn, c as xn, d as yn, e as vn, f as wn, I as Nn, g as Dt } from "./vendor-syncfusion-DGcZfoFG.js";
|
|
12
|
+
const kn = (t) => {
|
|
13
13
|
let a = 2166136261;
|
|
14
14
|
for (let s = 0; s < t.length; s++)
|
|
15
15
|
a ^= t.charCodeAt(s), a += (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24);
|
|
16
16
|
return a >>> 0;
|
|
17
|
-
},
|
|
18
|
-
const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i =
|
|
17
|
+
}, Cn = (t) => {
|
|
18
|
+
const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = kn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, u = 86 + (i >>> 24) % 8, p = `hsl(${l}, ${m}%, ${u}%)`, b = `hsl(${l}, ${m}%, ${o}%)`;
|
|
19
19
|
return { bg: p, text: b };
|
|
20
|
-
},
|
|
20
|
+
}, zn = (t = "") => t.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase(), ze = ({
|
|
21
21
|
src: t,
|
|
22
22
|
name: a,
|
|
23
23
|
size: s = "medium",
|
|
@@ -29,7 +29,7 @@ const Nn = (t) => {
|
|
|
29
29
|
className: m,
|
|
30
30
|
...o
|
|
31
31
|
}) => {
|
|
32
|
-
const [u, p] = L(!1), b = ue(() =>
|
|
32
|
+
const [u, p] = L(!1), b = ue(() => Cn(a), []), f = t && !u, r = !f && a, w = !f && !a, d = H(
|
|
33
33
|
"avatar-container",
|
|
34
34
|
`avatar--size-${s}`,
|
|
35
35
|
m
|
|
@@ -47,10 +47,10 @@ const Nn = (t) => {
|
|
|
47
47
|
onError: () => p(!0)
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
|
-
r && /* @__PURE__ */ e("span", { className: "avatar-initials", "aria-label": a, children:
|
|
50
|
+
r && /* @__PURE__ */ e("span", { className: "avatar-initials", "aria-label": a, children: zn(a) }),
|
|
51
51
|
w && /* @__PURE__ */ e("span", { className: "avatar-icon", children: /* @__PURE__ */ e(mt, {}) })
|
|
52
52
|
] });
|
|
53
|
-
},
|
|
53
|
+
}, Sn = ({ children: t, max: a = 4, truncatedMessage: s = "Members", ...i }) => {
|
|
54
54
|
const l = re.Children.toArray(t), m = l.slice(0, a), o = l.length - a;
|
|
55
55
|
return /* @__PURE__ */ n("div", { className: "avatar-group-container", ...i, children: [
|
|
56
56
|
m,
|
|
@@ -61,7 +61,7 @@ const Nn = (t) => {
|
|
|
61
61
|
s
|
|
62
62
|
] })
|
|
63
63
|
] });
|
|
64
|
-
},
|
|
64
|
+
}, El = ({
|
|
65
65
|
label: t,
|
|
66
66
|
variant: a = "default",
|
|
67
67
|
// 'default', 'primary', 'success', 'warning', 'danger'
|
|
@@ -74,7 +74,7 @@ const Nn = (t) => {
|
|
|
74
74
|
className: u,
|
|
75
75
|
...p
|
|
76
76
|
}) => {
|
|
77
|
-
const b =
|
|
77
|
+
const b = H(
|
|
78
78
|
"badge",
|
|
79
79
|
`badge--variant-${a}`,
|
|
80
80
|
`badge--size-${s}`,
|
|
@@ -99,7 +99,7 @@ const Nn = (t) => {
|
|
|
99
99
|
}
|
|
100
100
|
)
|
|
101
101
|
] });
|
|
102
|
-
},
|
|
102
|
+
}, Dn = ({
|
|
103
103
|
primary: t = !1,
|
|
104
104
|
backgroundColor: a = null,
|
|
105
105
|
size: s = "medium",
|
|
@@ -118,7 +118,7 @@ const Nn = (t) => {
|
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
120
|
};
|
|
121
|
-
|
|
121
|
+
Dn.propTypes = {
|
|
122
122
|
/** Is this the principal call to action on the page? */
|
|
123
123
|
primary: c.bool,
|
|
124
124
|
/** What background color to use */
|
|
@@ -130,11 +130,11 @@ Sn.propTypes = {
|
|
|
130
130
|
/** Optional click handler */
|
|
131
131
|
onClick: c.func
|
|
132
132
|
};
|
|
133
|
-
const
|
|
133
|
+
const $n = {
|
|
134
134
|
small: "btn-sm",
|
|
135
135
|
medium: "btn-md",
|
|
136
136
|
large: "btn-lg"
|
|
137
|
-
},
|
|
137
|
+
}, Tn = {
|
|
138
138
|
primary: "btn-primary",
|
|
139
139
|
secondary: "btn-secondary"
|
|
140
140
|
}, ee = ({
|
|
@@ -156,10 +156,10 @@ const Dn = {
|
|
|
156
156
|
onClick: w,
|
|
157
157
|
...d
|
|
158
158
|
}) => {
|
|
159
|
-
const h = p || m, z = u && !f, $ =
|
|
159
|
+
const h = p || m, z = u && !f, $ = H(
|
|
160
160
|
"btn-base",
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
$n[b],
|
|
162
|
+
Tn[o],
|
|
163
163
|
{
|
|
164
164
|
"is-loading": m,
|
|
165
165
|
"btn-icon-only": z
|
|
@@ -177,7 +177,7 @@ const Dn = {
|
|
|
177
177
|
title: a || z && i || (typeof f == "string" ? f : void 0),
|
|
178
178
|
"aria-label": i || z && a || (typeof f == "string" ? f : void 0),
|
|
179
179
|
...d,
|
|
180
|
-
children: m ? /* @__PURE__ */ e(
|
|
180
|
+
children: m ? /* @__PURE__ */ e(Ua, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(te, { children: [
|
|
181
181
|
u && /* @__PURE__ */ e(u, { size: b === "large" ? 20 : 16 }),
|
|
182
182
|
f,
|
|
183
183
|
r,
|
|
@@ -185,7 +185,7 @@ const Dn = {
|
|
|
185
185
|
] })
|
|
186
186
|
}
|
|
187
187
|
);
|
|
188
|
-
},
|
|
188
|
+
}, An = ({ crumbs: t = [], ...a }) => /* @__PURE__ */ e("nav", { "aria-label": "Breadcrumb", className: "breadcrumbs-nav", ...a, children: /* @__PURE__ */ e("ol", { className: "breadcrumbs-list", children: t.map((s, i) => {
|
|
189
189
|
const l = i === t.length - 1;
|
|
190
190
|
return /* @__PURE__ */ n("li", { className: "breadcrumb-item", children: [
|
|
191
191
|
/* @__PURE__ */ n(
|
|
@@ -208,7 +208,7 @@ const Dn = {
|
|
|
208
208
|
}
|
|
209
209
|
)
|
|
210
210
|
] }, i);
|
|
211
|
-
}) }) }),
|
|
211
|
+
}) }) }), ma = ({
|
|
212
212
|
label: t,
|
|
213
213
|
id: a,
|
|
214
214
|
error: s,
|
|
@@ -218,7 +218,7 @@ const Dn = {
|
|
|
218
218
|
onChange: o,
|
|
219
219
|
...u
|
|
220
220
|
}) => {
|
|
221
|
-
const p =
|
|
221
|
+
const p = Qe(), b = a || p;
|
|
222
222
|
return /* @__PURE__ */ n("div", { className: `checkbox-container ${i || ""}`, children: [
|
|
223
223
|
/* @__PURE__ */ n("label", { htmlFor: b, className: "checkbox-wrapper", children: [
|
|
224
224
|
/* @__PURE__ */ e(
|
|
@@ -236,7 +236,7 @@ const Dn = {
|
|
|
236
236
|
/* @__PURE__ */ e(
|
|
237
237
|
"div",
|
|
238
238
|
{
|
|
239
|
-
className:
|
|
239
|
+
className: H("checkbox-box", {
|
|
240
240
|
"checkbox-box--checked": m,
|
|
241
241
|
"checkbox-box--error": !!s
|
|
242
242
|
}),
|
|
@@ -248,7 +248,7 @@ const Dn = {
|
|
|
248
248
|
] }),
|
|
249
249
|
s && /* @__PURE__ */ e("p", { className: "checkbox-error-message", children: s })
|
|
250
250
|
] });
|
|
251
|
-
},
|
|
251
|
+
}, ua = ({ children: t }) => /* @__PURE__ */ e(Mr, { className: "popover-container", children: t }), ha = ({ children: t }) => /* @__PURE__ */ e(Br, { as: "div", children: t }), pa = ({ children: t, className: a }) => /* @__PURE__ */ e(jr, { className: `popover-panel ${a || ""}`, children: t }), ga = ({
|
|
252
252
|
value: t,
|
|
253
253
|
onChange: a,
|
|
254
254
|
onClear: s,
|
|
@@ -262,16 +262,16 @@ const Dn = {
|
|
|
262
262
|
const b = (f) => {
|
|
263
263
|
f.stopPropagation(), f.preventDefault(), s?.();
|
|
264
264
|
};
|
|
265
|
-
return /* @__PURE__ */ n("div", { className:
|
|
265
|
+
return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
|
|
266
266
|
l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "datepicker-input", children: l }),
|
|
267
|
-
/* @__PURE__ */ n(
|
|
268
|
-
/* @__PURE__ */ e(
|
|
267
|
+
/* @__PURE__ */ n(ua, { children: [
|
|
268
|
+
/* @__PURE__ */ e(ha, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "datepicker-input-container", children: [
|
|
269
269
|
/* @__PURE__ */ n(
|
|
270
270
|
"button",
|
|
271
271
|
{
|
|
272
272
|
id: "datepicker-input",
|
|
273
273
|
type: "button",
|
|
274
|
-
className:
|
|
274
|
+
className: H("datepicker-trigger", {
|
|
275
275
|
"datepicker-trigger--error": !!m,
|
|
276
276
|
"datepicker-trigger--disabled": o
|
|
277
277
|
}),
|
|
@@ -294,8 +294,8 @@ const Dn = {
|
|
|
294
294
|
}
|
|
295
295
|
)
|
|
296
296
|
] }) }),
|
|
297
|
-
/* @__PURE__ */ e(
|
|
298
|
-
|
|
297
|
+
/* @__PURE__ */ e(pa, { className: "datepicker-popover-content", align: "start", children: /* @__PURE__ */ e(
|
|
298
|
+
Yt,
|
|
299
299
|
{
|
|
300
300
|
mode: "single",
|
|
301
301
|
selected: t,
|
|
@@ -308,7 +308,7 @@ const Dn = {
|
|
|
308
308
|
] }),
|
|
309
309
|
m && /* @__PURE__ */ e("p", { className: "datepicker-error-message", children: m })
|
|
310
310
|
] });
|
|
311
|
-
},
|
|
311
|
+
}, Fn = ({
|
|
312
312
|
value: t,
|
|
313
313
|
onChange: a,
|
|
314
314
|
onClear: s,
|
|
@@ -326,16 +326,16 @@ const Dn = {
|
|
|
326
326
|
" - ",
|
|
327
327
|
Ze(f, "MMM d, y")
|
|
328
328
|
] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: i });
|
|
329
|
-
return /* @__PURE__ */ n("div", { className:
|
|
329
|
+
return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
|
|
330
330
|
l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "daterangepicker-input", children: l }),
|
|
331
|
-
/* @__PURE__ */ n(
|
|
332
|
-
/* @__PURE__ */ e(
|
|
331
|
+
/* @__PURE__ */ n(ua, { children: [
|
|
332
|
+
/* @__PURE__ */ e(ha, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "datepicker-input-container", children: [
|
|
333
333
|
/* @__PURE__ */ n(
|
|
334
334
|
"button",
|
|
335
335
|
{
|
|
336
336
|
id: "daterangepicker-input",
|
|
337
337
|
type: "button",
|
|
338
|
-
className:
|
|
338
|
+
className: H("datepicker-trigger", {
|
|
339
339
|
"datepicker-trigger--error": !!m,
|
|
340
340
|
"datepicker-trigger--disabled": o
|
|
341
341
|
}),
|
|
@@ -358,8 +358,8 @@ const Dn = {
|
|
|
358
358
|
}
|
|
359
359
|
)
|
|
360
360
|
] }) }),
|
|
361
|
-
/* @__PURE__ */ e(
|
|
362
|
-
|
|
361
|
+
/* @__PURE__ */ e(pa, { className: "datepicker-popover-content", align: "start", children: /* @__PURE__ */ e(
|
|
362
|
+
Yt,
|
|
363
363
|
{
|
|
364
364
|
mode: "range",
|
|
365
365
|
selected: t,
|
|
@@ -373,7 +373,7 @@ const Dn = {
|
|
|
373
373
|
] }),
|
|
374
374
|
m && /* @__PURE__ */ e("p", { className: "datepicker-error-message", children: m })
|
|
375
375
|
] });
|
|
376
|
-
},
|
|
376
|
+
}, En = {
|
|
377
377
|
// Documents
|
|
378
378
|
doc: {
|
|
379
379
|
type: "document",
|
|
@@ -585,13 +585,13 @@ const Dn = {
|
|
|
585
585
|
DRIVE: "drive",
|
|
586
586
|
INTEREST: "interest",
|
|
587
587
|
ARTICLE: "article"
|
|
588
|
-
},
|
|
588
|
+
}, $t = {
|
|
589
589
|
View: "view",
|
|
590
590
|
Manage: "edit"
|
|
591
|
-
},
|
|
592
|
-
const s = (t || "").toLowerCase(), i =
|
|
591
|
+
}, Tt = ({ extension: t, size: a = 36 }) => {
|
|
592
|
+
const s = (t || "").toLowerCase(), i = En[s];
|
|
593
593
|
return i ? /* @__PURE__ */ e("div", { style: { width: a }, className: "flex-shrink-0", children: /* @__PURE__ */ e(
|
|
594
|
-
|
|
594
|
+
qa,
|
|
595
595
|
{
|
|
596
596
|
extension: s,
|
|
597
597
|
...i,
|
|
@@ -607,14 +607,14 @@ const Dn = {
|
|
|
607
607
|
{
|
|
608
608
|
style: { width: a, height: a },
|
|
609
609
|
className: "flex items-center justify-center bg-gray-100 rounded-sm border border-gray-300",
|
|
610
|
-
children: /* @__PURE__ */ e(
|
|
610
|
+
children: /* @__PURE__ */ e(Ga, { className: "text-gray-400", size: a * 0.75 })
|
|
611
611
|
}
|
|
612
612
|
);
|
|
613
|
-
},
|
|
613
|
+
}, 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) => {
|
|
614
614
|
if (!+t) return "0 Bytes";
|
|
615
615
|
const s = 1024, i = a < 0 ? 0 : a, l = ["Bytes", "KB", "MB", "GB", "TB"], m = Math.floor(Math.log(t) / Math.log(s));
|
|
616
616
|
return `${parseFloat((t / Math.pow(s, m)).toFixed(i))} ${l[m]}`;
|
|
617
|
-
},
|
|
617
|
+
}, Rl = ({
|
|
618
618
|
// --- Modal Control ---
|
|
619
619
|
isOpen: t,
|
|
620
620
|
onClose: a,
|
|
@@ -636,7 +636,7 @@ const Dn = {
|
|
|
636
636
|
subHeading: h = "Supports PNG, JPG, PDF. Max size: 50MB."
|
|
637
637
|
}) => {
|
|
638
638
|
const z = o.length > 0 || u.length > 0;
|
|
639
|
-
return /* @__PURE__ */ e(he, { appear: !0, show: t, as:
|
|
639
|
+
return /* @__PURE__ */ e(he, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(
|
|
640
640
|
ye,
|
|
641
641
|
{
|
|
642
642
|
as: "div",
|
|
@@ -647,7 +647,7 @@ const Dn = {
|
|
|
647
647
|
/* @__PURE__ */ e(
|
|
648
648
|
Ne,
|
|
649
649
|
{
|
|
650
|
-
as:
|
|
650
|
+
as: Q,
|
|
651
651
|
enter: "ease-out duration-300",
|
|
652
652
|
enterFrom: "opacity-0",
|
|
653
653
|
enterTo: "opacity-100",
|
|
@@ -660,7 +660,7 @@ const Dn = {
|
|
|
660
660
|
/* @__PURE__ */ e("div", { className: "dialog-positioner", children: /* @__PURE__ */ e(
|
|
661
661
|
Ne,
|
|
662
662
|
{
|
|
663
|
-
as:
|
|
663
|
+
as: Q,
|
|
664
664
|
enter: "ease-out duration-300",
|
|
665
665
|
enterFrom: "opacity-0 scale-95",
|
|
666
666
|
enterTo: "opacity-100 scale-100",
|
|
@@ -693,7 +693,7 @@ const Dn = {
|
|
|
693
693
|
{
|
|
694
694
|
className: `dropzone-ui ${l ? "dropzone-ui--active" : ""}`,
|
|
695
695
|
children: [
|
|
696
|
-
/* @__PURE__ */ e(
|
|
696
|
+
/* @__PURE__ */ e(Ya, { size: 48, className: "text-gray-400" }),
|
|
697
697
|
/* @__PURE__ */ e("p", { children: "Drag and drop files here" }),
|
|
698
698
|
/* @__PURE__ */ e("p", { className: "sub-heading", children: h }),
|
|
699
699
|
/* @__PURE__ */ e("hr", {}),
|
|
@@ -721,14 +721,14 @@ const Dn = {
|
|
|
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: $.name.split(".").pop()
|
|
727
727
|
}
|
|
728
728
|
),
|
|
729
729
|
/* @__PURE__ */ n("div", { children: [
|
|
730
730
|
/* @__PURE__ */ e("p", { className: "file-item-name", children: $.name }),
|
|
731
|
-
/* @__PURE__ */ e("p", { className: "file-item-size", children:
|
|
731
|
+
/* @__PURE__ */ e("p", { className: "file-item-size", children: At($.size) })
|
|
732
732
|
] })
|
|
733
733
|
] }),
|
|
734
734
|
/* @__PURE__ */ e(
|
|
@@ -751,14 +751,14 @@ const Dn = {
|
|
|
751
751
|
children: [
|
|
752
752
|
/* @__PURE__ */ n("div", { className: "file-item-details", children: [
|
|
753
753
|
/* @__PURE__ */ e(
|
|
754
|
-
|
|
754
|
+
Tt,
|
|
755
755
|
{
|
|
756
756
|
extension: $.name.split(".").pop()
|
|
757
757
|
}
|
|
758
758
|
),
|
|
759
759
|
/* @__PURE__ */ n("div", { children: [
|
|
760
760
|
/* @__PURE__ */ e("p", { className: "file-item-name", children: $.name }),
|
|
761
|
-
/* @__PURE__ */ e("p", { className: "file-item-size", children:
|
|
761
|
+
/* @__PURE__ */ e("p", { className: "file-item-size", children: At($.size) }),
|
|
762
762
|
/* @__PURE__ */ e("p", { className: "rejection-reason", children: A })
|
|
763
763
|
] })
|
|
764
764
|
] }),
|
|
@@ -819,10 +819,10 @@ const Dn = {
|
|
|
819
819
|
}, bt = (t) => {
|
|
820
820
|
const a = new Date(t), s = a.getDay(), i = a.getDate() - s;
|
|
821
821
|
return Be(new Date(a.setDate(i)));
|
|
822
|
-
},
|
|
822
|
+
}, In = (t) => je(gt(bt(t), 6)), Ft = (t) => {
|
|
823
823
|
const a = new Date(t);
|
|
824
824
|
return Be(new Date(a.getFullYear(), a.getMonth(), 1));
|
|
825
|
-
},
|
|
825
|
+
}, Et = (t) => {
|
|
826
826
|
const a = new Date(t);
|
|
827
827
|
return je(new Date(a.getFullYear(), a.getMonth() + 1, 0));
|
|
828
828
|
}, On = (t) => {
|
|
@@ -833,21 +833,21 @@ const Dn = {
|
|
|
833
833
|
case "today":
|
|
834
834
|
return [Be(a), je(a)];
|
|
835
835
|
case "this_week":
|
|
836
|
-
return [bt(a),
|
|
836
|
+
return [bt(a), In(a)];
|
|
837
837
|
case "last_week": {
|
|
838
838
|
const s = gt(bt(a), -7);
|
|
839
839
|
return [Be(s), je(gt(s, 6))];
|
|
840
840
|
}
|
|
841
841
|
case "this_month":
|
|
842
|
-
return [
|
|
842
|
+
return [Ft(a), Et(a)];
|
|
843
843
|
case "last_month": {
|
|
844
844
|
const s = /* @__PURE__ */ new Date(), i = new Date(s.getFullYear(), s.getMonth() - 1, 1);
|
|
845
|
-
return [
|
|
845
|
+
return [Ft(i), Et(i)];
|
|
846
846
|
}
|
|
847
847
|
default:
|
|
848
848
|
return [null, null];
|
|
849
849
|
}
|
|
850
|
-
},
|
|
850
|
+
}, Il = ({
|
|
851
851
|
isOpen: t,
|
|
852
852
|
onClose: a,
|
|
853
853
|
onApplyFilters: s,
|
|
@@ -868,7 +868,7 @@ const Dn = {
|
|
|
868
868
|
startDate: null
|
|
869
869
|
}), [h, z] = L({
|
|
870
870
|
endDate: null
|
|
871
|
-
}), $ =
|
|
871
|
+
}), $ = Wa({
|
|
872
872
|
initialValues: JSON.parse(JSON.stringify(m)),
|
|
873
873
|
// Deep copy
|
|
874
874
|
onSubmit: (T) => {
|
|
@@ -899,7 +899,7 @@ const Dn = {
|
|
|
899
899
|
break;
|
|
900
900
|
}
|
|
901
901
|
return T[g] = C, T;
|
|
902
|
-
}, {}), [l, $.values]), E = Object.values(A).filter(Boolean).length,
|
|
902
|
+
}, {}), [l, $.values]), E = Object.values(A).filter(Boolean).length, I = ue(() => l.some((T) => {
|
|
903
903
|
if (T.type !== "date") return !1;
|
|
904
904
|
const v = $.values?.[T.key]?.values;
|
|
905
905
|
if (!Array.isArray(v) || v.length < 2) return !1;
|
|
@@ -1064,7 +1064,7 @@ const Dn = {
|
|
|
1064
1064
|
] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
|
|
1065
1065
|
] });
|
|
1066
1066
|
case "date":
|
|
1067
|
-
const y = g.values || [], [k, F] = y, M = k && F, U = y[0] || null, S = y[1] || null,
|
|
1067
|
+
const y = g.values || [], [k, F] = y, M = k && F, U = y[0] || null, S = y[1] || null, O = {
|
|
1068
1068
|
startDate: U instanceof Date ? U.toISOString().slice(0, 10) : null,
|
|
1069
1069
|
endDate: U instanceof Date ? U.toISOString().slice(0, 10) : null
|
|
1070
1070
|
}, D = {
|
|
@@ -1150,7 +1150,7 @@ const Dn = {
|
|
|
1150
1150
|
{
|
|
1151
1151
|
asSingle: !0,
|
|
1152
1152
|
useRange: !1,
|
|
1153
|
-
value:
|
|
1153
|
+
value: O,
|
|
1154
1154
|
onChange: (R) => {
|
|
1155
1155
|
const Y = R?.startDate ? Be(new Date(R.startDate)) : null, W = y[1] || null;
|
|
1156
1156
|
Y && ($.setFieldValue(`${T}.values`, [Y, W]), $.setFieldValue(`${T}.range`, "custom"));
|
|
@@ -1197,11 +1197,11 @@ const Dn = {
|
|
|
1197
1197
|
return null;
|
|
1198
1198
|
}
|
|
1199
1199
|
};
|
|
1200
|
-
return /* @__PURE__ */ e(he, { appear: !0, show: t, as:
|
|
1200
|
+
return /* @__PURE__ */ e(he, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose: a, children: [
|
|
1201
1201
|
/* @__PURE__ */ e(
|
|
1202
1202
|
Ne,
|
|
1203
1203
|
{
|
|
1204
|
-
as:
|
|
1204
|
+
as: Q,
|
|
1205
1205
|
enter: "ease-out duration-300",
|
|
1206
1206
|
enterFrom: "opacity-0",
|
|
1207
1207
|
enterTo: "opacity-100",
|
|
@@ -1214,7 +1214,7 @@ const Dn = {
|
|
|
1214
1214
|
/* @__PURE__ */ e("div", { className: "filter-modal-container", children: /* @__PURE__ */ e("div", { className: "filter-modal-positioner", children: /* @__PURE__ */ e(
|
|
1215
1215
|
Ne,
|
|
1216
1216
|
{
|
|
1217
|
-
as:
|
|
1217
|
+
as: Q,
|
|
1218
1218
|
enter: "ease-out duration-300",
|
|
1219
1219
|
enterFrom: "opacity-0 translate-x-full",
|
|
1220
1220
|
enterTo: "opacity-100 translate-x-0",
|
|
@@ -1236,7 +1236,7 @@ const Dn = {
|
|
|
1236
1236
|
] }),
|
|
1237
1237
|
/* @__PURE__ */ n("form", { onSubmit: $.handleSubmit, className: "filter-form", children: [
|
|
1238
1238
|
/* @__PURE__ */ e("div", { className: "filter-content-wrapper", children: /* @__PURE__ */ n(
|
|
1239
|
-
|
|
1239
|
+
Vr,
|
|
1240
1240
|
{
|
|
1241
1241
|
vertical: !0,
|
|
1242
1242
|
onChange: V,
|
|
@@ -1245,7 +1245,7 @@ const Dn = {
|
|
|
1245
1245
|
flexGrow: 1
|
|
1246
1246
|
},
|
|
1247
1247
|
children: [
|
|
1248
|
-
/* @__PURE__ */ e(
|
|
1248
|
+
/* @__PURE__ */ e(_r, { className: "filter-tabs-list", children: l.map((T) => /* @__PURE__ */ n(se, { className: "filter-tab-item", children: [
|
|
1249
1249
|
/* @__PURE__ */ e("div", { className: "filter-selection-horizontal-indicator" }),
|
|
1250
1250
|
/* @__PURE__ */ n("div", { className: "filter-lbl-indicator-wrapper", children: [
|
|
1251
1251
|
T.label,
|
|
@@ -1258,7 +1258,7 @@ const Dn = {
|
|
|
1258
1258
|
)
|
|
1259
1259
|
] })
|
|
1260
1260
|
] }, T.key)) }),
|
|
1261
|
-
/* @__PURE__ */ e(
|
|
1261
|
+
/* @__PURE__ */ e(Ur, { className: "filter-tabs-panels", children: l.map((T) => /* @__PURE__ */ e(
|
|
1262
1262
|
se.Panel,
|
|
1263
1263
|
{
|
|
1264
1264
|
className: "filter-tab-panel",
|
|
@@ -1293,7 +1293,7 @@ const Dn = {
|
|
|
1293
1293
|
"button",
|
|
1294
1294
|
{
|
|
1295
1295
|
type: "submit",
|
|
1296
|
-
disabled: !$.dirty ||
|
|
1296
|
+
disabled: !$.dirty || I,
|
|
1297
1297
|
className: "filter-button apply",
|
|
1298
1298
|
children: [
|
|
1299
1299
|
"Apply Filters",
|
|
@@ -1330,7 +1330,7 @@ const Dn = {
|
|
|
1330
1330
|
id: p,
|
|
1331
1331
|
type: s,
|
|
1332
1332
|
ref: o,
|
|
1333
|
-
className:
|
|
1333
|
+
className: H("input-field", {
|
|
1334
1334
|
"input-field--error": !!l,
|
|
1335
1335
|
"input-field--with-icon": !!i
|
|
1336
1336
|
}),
|
|
@@ -1340,7 +1340,7 @@ const Dn = {
|
|
|
1340
1340
|
] }),
|
|
1341
1341
|
l && /* @__PURE__ */ e("p", { className: "input-error-message", children: l })
|
|
1342
1342
|
] });
|
|
1343
|
-
},
|
|
1343
|
+
}, Rt = {
|
|
1344
1344
|
delete: {
|
|
1345
1345
|
icon: Ke,
|
|
1346
1346
|
iconClass: "icon--delete",
|
|
@@ -1348,17 +1348,17 @@ const Dn = {
|
|
|
1348
1348
|
// Assuming you add a 'danger' category to your Button
|
|
1349
1349
|
},
|
|
1350
1350
|
warning: {
|
|
1351
|
-
icon:
|
|
1351
|
+
icon: Jt,
|
|
1352
1352
|
iconClass: "icon--warning",
|
|
1353
1353
|
primaryButtonCategory: "warning"
|
|
1354
1354
|
// Assuming a 'warning' category
|
|
1355
1355
|
},
|
|
1356
1356
|
info: {
|
|
1357
|
-
icon:
|
|
1357
|
+
icon: Wt,
|
|
1358
1358
|
iconClass: "icon--info",
|
|
1359
1359
|
primaryButtonCategory: "primary"
|
|
1360
1360
|
}
|
|
1361
|
-
},
|
|
1361
|
+
}, Pn = ({
|
|
1362
1362
|
isOpen: t,
|
|
1363
1363
|
onClose: a,
|
|
1364
1364
|
title: s,
|
|
@@ -1375,16 +1375,16 @@ const Dn = {
|
|
|
1375
1375
|
size: b
|
|
1376
1376
|
// Add size prop
|
|
1377
1377
|
}) => {
|
|
1378
|
-
const f =
|
|
1378
|
+
const f = Rt[o] || Rt.info, r = f.icon, w = () => {
|
|
1379
1379
|
a({ primary: !0, secondary: !1 });
|
|
1380
1380
|
}, d = () => {
|
|
1381
1381
|
a({ primary: !1, secondary: !0 });
|
|
1382
1382
|
};
|
|
1383
|
-
return /* @__PURE__ */ e(he, { appear: !0, show: t, as:
|
|
1383
|
+
return /* @__PURE__ */ e(he, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(ye, { as: "div", className: "modal-dialog", onClose: () => a({}), children: [
|
|
1384
1384
|
/* @__PURE__ */ e(
|
|
1385
1385
|
Ne,
|
|
1386
1386
|
{
|
|
1387
|
-
as:
|
|
1387
|
+
as: Q,
|
|
1388
1388
|
enter: "ease-out duration-300",
|
|
1389
1389
|
enterFrom: "opacity-0",
|
|
1390
1390
|
enterTo: "opacity-100",
|
|
@@ -1397,7 +1397,7 @@ const Dn = {
|
|
|
1397
1397
|
/* @__PURE__ */ e("div", { className: "modal-positioner", children: /* @__PURE__ */ e(
|
|
1398
1398
|
Ne,
|
|
1399
1399
|
{
|
|
1400
|
-
as:
|
|
1400
|
+
as: Q,
|
|
1401
1401
|
enter: "ease-out duration-300",
|
|
1402
1402
|
enterFrom: "opacity-0 scale-95",
|
|
1403
1403
|
enterTo: "opacity-100 scale-100",
|
|
@@ -1480,7 +1480,7 @@ const Dn = {
|
|
|
1480
1480
|
className: "pagination-button",
|
|
1481
1481
|
onClick: () => i(1),
|
|
1482
1482
|
disabled: t === 1,
|
|
1483
|
-
children: /* @__PURE__ */ e(
|
|
1483
|
+
children: /* @__PURE__ */ e(Ja, { size: 16 })
|
|
1484
1484
|
}
|
|
1485
1485
|
),
|
|
1486
1486
|
/* @__PURE__ */ e(
|
|
@@ -1489,7 +1489,7 @@ const Dn = {
|
|
|
1489
1489
|
className: "pagination-button",
|
|
1490
1490
|
onClick: () => i(t - 1),
|
|
1491
1491
|
disabled: t === 1,
|
|
1492
|
-
children: /* @__PURE__ */ e(
|
|
1492
|
+
children: /* @__PURE__ */ e(Xa, { size: 16 })
|
|
1493
1493
|
}
|
|
1494
1494
|
),
|
|
1495
1495
|
/* @__PURE__ */ n("form", { onSubmit: r, className: "page-input-form", children: [
|
|
@@ -1525,12 +1525,12 @@ const Dn = {
|
|
|
1525
1525
|
className: "pagination-button",
|
|
1526
1526
|
onClick: () => i(o),
|
|
1527
1527
|
disabled: t === o,
|
|
1528
|
-
children: /* @__PURE__ */ e(
|
|
1528
|
+
children: /* @__PURE__ */ e(Ha, { size: 16 })
|
|
1529
1529
|
}
|
|
1530
1530
|
)
|
|
1531
1531
|
] })
|
|
1532
1532
|
] });
|
|
1533
|
-
},
|
|
1533
|
+
}, ba = ({
|
|
1534
1534
|
label: t,
|
|
1535
1535
|
value: a,
|
|
1536
1536
|
// The currently selected option's value (e.g., 'work')
|
|
@@ -1551,7 +1551,7 @@ const Dn = {
|
|
|
1551
1551
|
qe.Option,
|
|
1552
1552
|
{
|
|
1553
1553
|
value: o.value,
|
|
1554
|
-
className: ({ active: u, checked: p }) =>
|
|
1554
|
+
className: ({ active: u, checked: p }) => H("radiogroup-option", {
|
|
1555
1555
|
"radiogroup-option--active": u,
|
|
1556
1556
|
"radiogroup-option--checked": p,
|
|
1557
1557
|
"radiogroup-option--error": !!l
|
|
@@ -1568,7 +1568,7 @@ const Dn = {
|
|
|
1568
1568
|
}
|
|
1569
1569
|
)
|
|
1570
1570
|
] }),
|
|
1571
|
-
u && /* @__PURE__ */ e("div", { className: "option-checkmark", children: /* @__PURE__ */ e(
|
|
1571
|
+
u && /* @__PURE__ */ e("div", { className: "option-checkmark", children: /* @__PURE__ */ e(Xt, { size: 20 }) })
|
|
1572
1572
|
] })
|
|
1573
1573
|
},
|
|
1574
1574
|
o.value
|
|
@@ -1591,7 +1591,7 @@ const Dn = {
|
|
|
1591
1591
|
p(t);
|
|
1592
1592
|
}, [t]);
|
|
1593
1593
|
const b = ae(
|
|
1594
|
-
|
|
1594
|
+
en((r) => {
|
|
1595
1595
|
a?.(r);
|
|
1596
1596
|
}, s),
|
|
1597
1597
|
[s, a]
|
|
@@ -1640,14 +1640,14 @@ const Dn = {
|
|
|
1640
1640
|
t && /* @__PURE__ */ e("label", { className: "select-label", children: t }),
|
|
1641
1641
|
/* @__PURE__ */ n("div", { className: "select-button-container", children: [
|
|
1642
1642
|
/* @__PURE__ */ n(
|
|
1643
|
-
|
|
1643
|
+
qr,
|
|
1644
1644
|
{
|
|
1645
|
-
className:
|
|
1645
|
+
className: H("select-button", {
|
|
1646
1646
|
"select-button--error": !!o
|
|
1647
1647
|
}),
|
|
1648
1648
|
children: [
|
|
1649
1649
|
/* @__PURE__ */ e("span", { className: "select-value-display", children: w ? w.label : /* @__PURE__ */ e("span", { className: "placeholder", children: l }) }),
|
|
1650
|
-
/* @__PURE__ */ e(
|
|
1650
|
+
/* @__PURE__ */ e(Ht, { className: "select-chevron", "aria-hidden": "true" })
|
|
1651
1651
|
]
|
|
1652
1652
|
}
|
|
1653
1653
|
),
|
|
@@ -1657,7 +1657,7 @@ const Dn = {
|
|
|
1657
1657
|
leave: "transition ease-in duration-100",
|
|
1658
1658
|
leaveFrom: "opacity-100",
|
|
1659
1659
|
leaveTo: "opacity-0",
|
|
1660
|
-
children: /* @__PURE__ */ n(
|
|
1660
|
+
children: /* @__PURE__ */ n(Gr, { className: "select-options", children: [
|
|
1661
1661
|
p && /* @__PURE__ */ e("div", { className: "search-input-wrapper", children: /* @__PURE__ */ e(
|
|
1662
1662
|
be,
|
|
1663
1663
|
{
|
|
@@ -1667,7 +1667,7 @@ const Dn = {
|
|
|
1667
1667
|
}
|
|
1668
1668
|
) }),
|
|
1669
1669
|
/* @__PURE__ */ e("div", { className: "select-options-list", children: r.length === 0 && b !== "" ? /* @__PURE__ */ e("div", { className: "no-results", children: "No results found." }) : r.map((d) => /* @__PURE__ */ e(
|
|
1670
|
-
|
|
1670
|
+
Yr,
|
|
1671
1671
|
{
|
|
1672
1672
|
className: ({ active: h }) => `select-option ${h ? "active" : ""}`,
|
|
1673
1673
|
value: d,
|
|
@@ -1699,7 +1699,7 @@ const Dn = {
|
|
|
1699
1699
|
] }),
|
|
1700
1700
|
o && /* @__PURE__ */ e("p", { className: "select-error-message", children: o })
|
|
1701
1701
|
] }) });
|
|
1702
|
-
},
|
|
1702
|
+
}, Ln = () => {
|
|
1703
1703
|
const [t, a] = L(window.location.pathname);
|
|
1704
1704
|
return Z(() => {
|
|
1705
1705
|
const s = () => {
|
|
@@ -1714,8 +1714,8 @@ const Dn = {
|
|
|
1714
1714
|
if ((s.href || s.url || s.path) === a || s.children && xt(s.children, a))
|
|
1715
1715
|
return s;
|
|
1716
1716
|
return null;
|
|
1717
|
-
},
|
|
1718
|
-
const { pathname: i } =
|
|
1717
|
+
}, fa = ({ item: t, isCollapsed: a, level: s = 0 }) => {
|
|
1718
|
+
const { pathname: i } = Ln(), l = t.href || t.url || t.path, [m, o] = L(!1), u = t.icon;
|
|
1719
1719
|
Z(() => {
|
|
1720
1720
|
xt([t], i) && o(!0);
|
|
1721
1721
|
}, [t, i]);
|
|
@@ -1725,7 +1725,7 @@ const Dn = {
|
|
|
1725
1725
|
return /* @__PURE__ */ n(
|
|
1726
1726
|
"div",
|
|
1727
1727
|
{
|
|
1728
|
-
className:
|
|
1728
|
+
className: H("nav-item-container", {
|
|
1729
1729
|
"nav-item-container--parent-active": b,
|
|
1730
1730
|
[`nav-item-container--level-${s}`]: s > 0
|
|
1731
1731
|
}),
|
|
@@ -1736,7 +1736,7 @@ const Dn = {
|
|
|
1736
1736
|
href: l,
|
|
1737
1737
|
target: t.target,
|
|
1738
1738
|
rel: t.target === "_blank" ? "noopener noreferrer" : void 0,
|
|
1739
|
-
className:
|
|
1739
|
+
className: H("nav-item", {
|
|
1740
1740
|
"nav-item--active": p,
|
|
1741
1741
|
"nav-item--collapsed": a
|
|
1742
1742
|
}),
|
|
@@ -1754,7 +1754,7 @@ const Dn = {
|
|
|
1754
1754
|
children: /* @__PURE__ */ e(
|
|
1755
1755
|
wt,
|
|
1756
1756
|
{
|
|
1757
|
-
className:
|
|
1757
|
+
className: H("nav-chevron", {
|
|
1758
1758
|
"nav-chevron--open": m
|
|
1759
1759
|
})
|
|
1760
1760
|
}
|
|
@@ -1767,13 +1767,13 @@ const Dn = {
|
|
|
1767
1767
|
t.children && /* @__PURE__ */ e(
|
|
1768
1768
|
"div",
|
|
1769
1769
|
{
|
|
1770
|
-
className:
|
|
1770
|
+
className: H("sub-menu", {
|
|
1771
1771
|
"sub-menu--open": m,
|
|
1772
1772
|
"sub-menu--collapsed": a
|
|
1773
1773
|
}),
|
|
1774
1774
|
"aria-hidden": !m || a,
|
|
1775
1775
|
children: t.children.map((r) => /* @__PURE__ */ e(
|
|
1776
|
-
|
|
1776
|
+
fa,
|
|
1777
1777
|
{
|
|
1778
1778
|
item: r,
|
|
1779
1779
|
isCollapsed: a,
|
|
@@ -1786,7 +1786,7 @@ const Dn = {
|
|
|
1786
1786
|
]
|
|
1787
1787
|
}
|
|
1788
1788
|
);
|
|
1789
|
-
},
|
|
1789
|
+
}, Pl = ({
|
|
1790
1790
|
navItems: t = [],
|
|
1791
1791
|
isCollapsed: a = !1,
|
|
1792
1792
|
onToggleCollapse: s,
|
|
@@ -1807,7 +1807,7 @@ const Dn = {
|
|
|
1807
1807
|
/* @__PURE__ */ n(
|
|
1808
1808
|
"aside",
|
|
1809
1809
|
{
|
|
1810
|
-
className:
|
|
1810
|
+
className: H("sidebar", {
|
|
1811
1811
|
"sidebar--collapsed": a,
|
|
1812
1812
|
"sidebar--mobile-open": i
|
|
1813
1813
|
}),
|
|
@@ -1837,7 +1837,7 @@ const Dn = {
|
|
|
1837
1837
|
}
|
|
1838
1838
|
)
|
|
1839
1839
|
] }),
|
|
1840
|
-
/* @__PURE__ */ e("nav", { className: "sidebar-nav", "aria-label": "Primary", children: /* @__PURE__ */ e("ul", { className: "sidebar-nav-list", children: t.map((p) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
1840
|
+
/* @__PURE__ */ e("nav", { className: "sidebar-nav", "aria-label": "Primary", children: /* @__PURE__ */ e("ul", { className: "sidebar-nav-list", children: t.map((p) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(fa, { item: p, isCollapsed: a }) }, p.label || p.name)) }) }),
|
|
1841
1841
|
/* @__PURE__ */ n("div", { className: "sidebar-footer", children: [
|
|
1842
1842
|
/* @__PURE__ */ e(ze, { src: u.avatar, name: u.name, size: "medium" }),
|
|
1843
1843
|
/* @__PURE__ */ n("div", { className: "user-info", children: [
|
|
@@ -1850,14 +1850,14 @@ const Dn = {
|
|
|
1850
1850
|
className: "logout-button",
|
|
1851
1851
|
"aria-label": "Log out",
|
|
1852
1852
|
onClick: () => console.log("Logout clicked"),
|
|
1853
|
-
children: /* @__PURE__ */ e(
|
|
1853
|
+
children: /* @__PURE__ */ e(Za, {})
|
|
1854
1854
|
}
|
|
1855
1855
|
)
|
|
1856
1856
|
] })
|
|
1857
1857
|
]
|
|
1858
1858
|
}
|
|
1859
1859
|
)
|
|
1860
|
-
] }),
|
|
1860
|
+
] }), xa = ({
|
|
1861
1861
|
size: t = "medium",
|
|
1862
1862
|
// 'small', 'medium', 'large'
|
|
1863
1863
|
color: a = "primary",
|
|
@@ -1865,7 +1865,7 @@ const Dn = {
|
|
|
1865
1865
|
className: s,
|
|
1866
1866
|
...i
|
|
1867
1867
|
}) => {
|
|
1868
|
-
const l =
|
|
1868
|
+
const l = H(
|
|
1869
1869
|
"spinner",
|
|
1870
1870
|
`spinner--size-${t}`,
|
|
1871
1871
|
`spinner--color-${a}`,
|
|
@@ -1890,10 +1890,10 @@ const Dn = {
|
|
|
1890
1890
|
]
|
|
1891
1891
|
}
|
|
1892
1892
|
);
|
|
1893
|
-
},
|
|
1894
|
-
/* @__PURE__ */ e(
|
|
1893
|
+
}, Ll = ({ label: t = "Loading..." }) => /* @__PURE__ */ e("div", { className: "fullscreen-loader-overlay", role: "alert", "aria-busy": "true", children: /* @__PURE__ */ n("div", { className: "loader-content", children: [
|
|
1894
|
+
/* @__PURE__ */ e(xa, { size: "large" }),
|
|
1895
1895
|
t && /* @__PURE__ */ e("span", { className: "loader-label", children: t })
|
|
1896
|
-
] }) }),
|
|
1896
|
+
] }) }), ya = ({
|
|
1897
1897
|
label: t,
|
|
1898
1898
|
id: a,
|
|
1899
1899
|
error: s,
|
|
@@ -1923,7 +1923,7 @@ const Dn = {
|
|
|
1923
1923
|
{
|
|
1924
1924
|
id: p,
|
|
1925
1925
|
ref: l,
|
|
1926
|
-
className:
|
|
1926
|
+
className: H("textarea-field", {
|
|
1927
1927
|
"textarea-field--error": !!s
|
|
1928
1928
|
}),
|
|
1929
1929
|
maxLength: m,
|
|
@@ -1933,7 +1933,7 @@ const Dn = {
|
|
|
1933
1933
|
),
|
|
1934
1934
|
s && /* @__PURE__ */ e("p", { className: "textarea-error-message", children: s })
|
|
1935
1935
|
] });
|
|
1936
|
-
},
|
|
1936
|
+
}, va = ({
|
|
1937
1937
|
label: t,
|
|
1938
1938
|
checked: a,
|
|
1939
1939
|
onChange: s,
|
|
@@ -1941,14 +1941,14 @@ const Dn = {
|
|
|
1941
1941
|
error: l,
|
|
1942
1942
|
...m
|
|
1943
1943
|
}) => /* @__PURE__ */ n("div", { className: "switch-container", children: [
|
|
1944
|
-
/* @__PURE__ */ n(
|
|
1944
|
+
/* @__PURE__ */ n(Wr, { as: "div", className: "switch-group", children: [
|
|
1945
1945
|
t && i === "left" && /* @__PURE__ */ e(ot.Label, { className: "switch-label", passive: !0, children: t }),
|
|
1946
1946
|
/* @__PURE__ */ e(
|
|
1947
1947
|
ot,
|
|
1948
1948
|
{
|
|
1949
1949
|
checked: a,
|
|
1950
1950
|
onChange: s,
|
|
1951
|
-
className:
|
|
1951
|
+
className: H("switch-element", {
|
|
1952
1952
|
// Renamed from switch-wrapper
|
|
1953
1953
|
"switch-element--error": !!l
|
|
1954
1954
|
}),
|
|
@@ -1959,7 +1959,7 @@ const Dn = {
|
|
|
1959
1959
|
t && i === "right" && /* @__PURE__ */ e(ot.Label, { className: "switch-label", passive: !0, children: t })
|
|
1960
1960
|
] }),
|
|
1961
1961
|
l && /* @__PURE__ */ e("p", { className: "switch-error-message", children: l })
|
|
1962
|
-
] }),
|
|
1962
|
+
] }), Ml = ({
|
|
1963
1963
|
children: t,
|
|
1964
1964
|
content: a,
|
|
1965
1965
|
variant: s = "dark",
|
|
@@ -1976,7 +1976,7 @@ const Dn = {
|
|
|
1976
1976
|
return /* @__PURE__ */ n(te, { children: [
|
|
1977
1977
|
re.cloneElement(t, { "data-tooltip-id": u }),
|
|
1978
1978
|
/* @__PURE__ */ e(
|
|
1979
|
-
|
|
1979
|
+
Ka,
|
|
1980
1980
|
{
|
|
1981
1981
|
id: u,
|
|
1982
1982
|
content: a,
|
|
@@ -1987,7 +1987,7 @@ const Dn = {
|
|
|
1987
1987
|
}
|
|
1988
1988
|
)
|
|
1989
1989
|
] });
|
|
1990
|
-
},
|
|
1990
|
+
}, Mn = {
|
|
1991
1991
|
enter: (t) => ({
|
|
1992
1992
|
x: t > 0 ? "100%" : "-100%",
|
|
1993
1993
|
opacity: 0
|
|
@@ -2000,7 +2000,7 @@ const Dn = {
|
|
|
2000
2000
|
x: t < 0 ? "100%" : "-100%",
|
|
2001
2001
|
opacity: 0
|
|
2002
2002
|
})
|
|
2003
|
-
},
|
|
2003
|
+
}, Bl = ({
|
|
2004
2004
|
isOpen: t,
|
|
2005
2005
|
onClose: a,
|
|
2006
2006
|
steps: s = {},
|
|
@@ -2013,7 +2013,7 @@ const Dn = {
|
|
|
2013
2013
|
closeOnOverlayClick: b = !0
|
|
2014
2014
|
}) => {
|
|
2015
2015
|
const f = s[i], r = Object.keys(s), w = r.indexOf(i), d = (w + 1) / r.length * 100, h = w > 0 && m.onBack;
|
|
2016
|
-
return /* @__PURE__ */ e(he, { show: t, as:
|
|
2016
|
+
return /* @__PURE__ */ e(he, { show: t, as: Q, children: /* @__PURE__ */ n(
|
|
2017
2017
|
ye,
|
|
2018
2018
|
{
|
|
2019
2019
|
as: "div",
|
|
@@ -2024,7 +2024,7 @@ const Dn = {
|
|
|
2024
2024
|
/* @__PURE__ */ e(
|
|
2025
2025
|
Ne,
|
|
2026
2026
|
{
|
|
2027
|
-
as:
|
|
2027
|
+
as: Q,
|
|
2028
2028
|
enter: "ease-out duration-300",
|
|
2029
2029
|
enterFrom: "opacity-0",
|
|
2030
2030
|
enterTo: "opacity-100",
|
|
@@ -2037,7 +2037,7 @@ const Dn = {
|
|
|
2037
2037
|
/* @__PURE__ */ e("div", { className: "wizard-container", children: /* @__PURE__ */ e("div", { className: "wizard-positioner", children: /* @__PURE__ */ e(
|
|
2038
2038
|
Ne,
|
|
2039
2039
|
{
|
|
2040
|
-
as:
|
|
2040
|
+
as: Q,
|
|
2041
2041
|
enter: "transform transition ease-in-out duration-500",
|
|
2042
2042
|
enterFrom: "translate-x-full",
|
|
2043
2043
|
enterTo: "translate-x-0",
|
|
@@ -2053,7 +2053,7 @@ const Dn = {
|
|
|
2053
2053
|
onClick: m.onBack,
|
|
2054
2054
|
className: "wizard-back-button",
|
|
2055
2055
|
"aria-label": "Go back to previous step",
|
|
2056
|
-
children: /* @__PURE__ */ e(
|
|
2056
|
+
children: /* @__PURE__ */ e(er, { size: 20 })
|
|
2057
2057
|
}
|
|
2058
2058
|
),
|
|
2059
2059
|
/* @__PURE__ */ n("div", { className: "wizard-header-text", children: [
|
|
@@ -2088,7 +2088,7 @@ const Dn = {
|
|
|
2088
2088
|
le.div,
|
|
2089
2089
|
{
|
|
2090
2090
|
custom: l,
|
|
2091
|
-
variants:
|
|
2091
|
+
variants: Mn,
|
|
2092
2092
|
initial: "enter",
|
|
2093
2093
|
animate: "center",
|
|
2094
2094
|
exit: "exit",
|
|
@@ -2111,14 +2111,14 @@ const Dn = {
|
|
|
2111
2111
|
]
|
|
2112
2112
|
}
|
|
2113
2113
|
) });
|
|
2114
|
-
},
|
|
2114
|
+
}, Bn = {
|
|
2115
2115
|
small: "btn-sm",
|
|
2116
2116
|
medium: "btn-md",
|
|
2117
2117
|
large: "btn-lg"
|
|
2118
|
-
},
|
|
2118
|
+
}, jn = {
|
|
2119
2119
|
primary: "btn-primary",
|
|
2120
2120
|
secondary: "btn-secondary"
|
|
2121
|
-
},
|
|
2121
|
+
}, jl = ({
|
|
2122
2122
|
dataTestId: t,
|
|
2123
2123
|
title: a,
|
|
2124
2124
|
type: s = "button",
|
|
@@ -2136,11 +2136,11 @@ const Dn = {
|
|
|
2136
2136
|
onClick: r,
|
|
2137
2137
|
...w
|
|
2138
2138
|
}) => {
|
|
2139
|
-
const d = u, h =
|
|
2139
|
+
const d = u, h = H(
|
|
2140
2140
|
"btn-base",
|
|
2141
2141
|
"btn-icon-only",
|
|
2142
|
-
|
|
2143
|
-
|
|
2142
|
+
Bn[p],
|
|
2143
|
+
jn[m],
|
|
2144
2144
|
l
|
|
2145
2145
|
);
|
|
2146
2146
|
return /* @__PURE__ */ e(
|
|
@@ -2157,7 +2157,7 @@ const Dn = {
|
|
|
2157
2157
|
children: o && /* @__PURE__ */ e(o, { size: p === "large" ? 20 : 16 })
|
|
2158
2158
|
}
|
|
2159
2159
|
);
|
|
2160
|
-
},
|
|
2160
|
+
}, Vl = ({
|
|
2161
2161
|
content: t,
|
|
2162
2162
|
isFooter: a = !1,
|
|
2163
2163
|
footerContent: s,
|
|
@@ -2168,7 +2168,7 @@ const Dn = {
|
|
|
2168
2168
|
// A clearer prop name
|
|
2169
2169
|
...u
|
|
2170
2170
|
}) => {
|
|
2171
|
-
const p =
|
|
2171
|
+
const p = H(
|
|
2172
2172
|
"page-layout",
|
|
2173
2173
|
{
|
|
2174
2174
|
"page-layout--with-footer": a,
|
|
@@ -2205,7 +2205,7 @@ const Dn = {
|
|
|
2205
2205
|
)
|
|
2206
2206
|
] }) })
|
|
2207
2207
|
] });
|
|
2208
|
-
},
|
|
2208
|
+
}, Vn = ({
|
|
2209
2209
|
heading: t,
|
|
2210
2210
|
subHeading: a,
|
|
2211
2211
|
breadcrumbItems: s = [],
|
|
@@ -2221,28 +2221,28 @@ const Dn = {
|
|
|
2221
2221
|
className: "page-header-back-button",
|
|
2222
2222
|
"aria-label": "Go back",
|
|
2223
2223
|
onClick: l,
|
|
2224
|
-
children: /* @__PURE__ */ e(
|
|
2224
|
+
children: /* @__PURE__ */ e(Rn, { width: 30, height: 30 })
|
|
2225
2225
|
}
|
|
2226
2226
|
),
|
|
2227
2227
|
/* @__PURE__ */ n("div", { className: "page-header-content", children: [
|
|
2228
2228
|
/* @__PURE__ */ e("h1", { className: "page-header-heading", children: t }),
|
|
2229
|
-
s.length > 1 ? /* @__PURE__ */ e(
|
|
2229
|
+
s.length > 1 ? /* @__PURE__ */ e(An, { crumbs: s }) : a ? /* @__PURE__ */ e("p", { className: "page-header-subheading", children: a }) : null
|
|
2230
2230
|
] })
|
|
2231
|
-
] }),
|
|
2231
|
+
] }), _n = ({
|
|
2232
2232
|
options: t = [],
|
|
2233
2233
|
onSelect: a,
|
|
2234
2234
|
triggerIcon: s = Qt
|
|
2235
2235
|
}) => {
|
|
2236
|
-
const { refs: i, floatingStyles: l } =
|
|
2237
|
-
whileElementsMounted:
|
|
2238
|
-
middleware: [
|
|
2236
|
+
const { refs: i, floatingStyles: l } = la({
|
|
2237
|
+
whileElementsMounted: da,
|
|
2238
|
+
middleware: [ia(5), oa(), ca({ padding: 5 })]
|
|
2239
2239
|
});
|
|
2240
|
-
return /* @__PURE__ */ n(
|
|
2241
|
-
/* @__PURE__ */ e(
|
|
2242
|
-
/* @__PURE__ */ e(
|
|
2240
|
+
return /* @__PURE__ */ n(Jr, { as: "div", className: "options-menu-wrapper", children: [
|
|
2241
|
+
/* @__PURE__ */ e(Xr, { ref: i.setReference, className: "options-menu-trigger", children: /* @__PURE__ */ e(s, { size: 20 }) }),
|
|
2242
|
+
/* @__PURE__ */ e(Hr, { children: /* @__PURE__ */ e(
|
|
2243
2243
|
he,
|
|
2244
2244
|
{
|
|
2245
|
-
as:
|
|
2245
|
+
as: Q,
|
|
2246
2246
|
enter: "transition ease-out duration-100",
|
|
2247
2247
|
enterFrom: "transform opacity-0 scale-95",
|
|
2248
2248
|
enterTo: "transform opacity-100 scale-100",
|
|
@@ -2257,7 +2257,7 @@ const Dn = {
|
|
|
2257
2257
|
className: "options-menu-panel",
|
|
2258
2258
|
children: t.map((m) => /* @__PURE__ */ n("div", { className: "options-menu-item-wrapper", children: [
|
|
2259
2259
|
m.dividerBefore && /* @__PURE__ */ e("div", { className: "menu-divider" }),
|
|
2260
|
-
/* @__PURE__ */ e(
|
|
2260
|
+
/* @__PURE__ */ e(Zr, { children: ({ active: o }) => /* @__PURE__ */ n(
|
|
2261
2261
|
"button",
|
|
2262
2262
|
{
|
|
2263
2263
|
onClick: () => a(m),
|
|
@@ -2276,33 +2276,33 @@ const Dn = {
|
|
|
2276
2276
|
) })
|
|
2277
2277
|
] });
|
|
2278
2278
|
};
|
|
2279
|
-
function
|
|
2279
|
+
function Un(t) {
|
|
2280
2280
|
try {
|
|
2281
2281
|
return typeof t == "string" ? t : JSON.stringify(t);
|
|
2282
2282
|
} catch {
|
|
2283
2283
|
return "";
|
|
2284
2284
|
}
|
|
2285
2285
|
}
|
|
2286
|
-
function
|
|
2286
|
+
function qn(t) {
|
|
2287
2287
|
try {
|
|
2288
2288
|
return JSON.parse(t);
|
|
2289
2289
|
} catch {
|
|
2290
2290
|
return t;
|
|
2291
2291
|
}
|
|
2292
2292
|
}
|
|
2293
|
-
function
|
|
2293
|
+
function wa(t) {
|
|
2294
2294
|
return {
|
|
2295
2295
|
/**
|
|
2296
2296
|
* Get an item (parsed if JSON).
|
|
2297
2297
|
*/
|
|
2298
2298
|
get(a) {
|
|
2299
|
-
return
|
|
2299
|
+
return qn(t.getItem(a));
|
|
2300
2300
|
},
|
|
2301
2301
|
/**
|
|
2302
2302
|
* Set an item (string or object).
|
|
2303
2303
|
*/
|
|
2304
2304
|
set(a, s) {
|
|
2305
|
-
t.setItem(a,
|
|
2305
|
+
t.setItem(a, Un(s));
|
|
2306
2306
|
},
|
|
2307
2307
|
/**
|
|
2308
2308
|
* Delete/remove an item.
|
|
@@ -2329,7 +2329,7 @@ function va(t) {
|
|
|
2329
2329
|
}
|
|
2330
2330
|
};
|
|
2331
2331
|
}
|
|
2332
|
-
const
|
|
2332
|
+
const Gn = wa(localStorage), _l = wa(sessionStorage), Ul = {
|
|
2333
2333
|
get(t) {
|
|
2334
2334
|
const a = document.cookie.match(
|
|
2335
2335
|
new RegExp("(^| )" + t + "=([^;]+)")
|
|
@@ -2355,61 +2355,61 @@ const qn = va(localStorage), Vl = va(sessionStorage), _l = {
|
|
|
2355
2355
|
const t = this.all();
|
|
2356
2356
|
Object.keys(t).forEach((a) => this.remove(a));
|
|
2357
2357
|
}
|
|
2358
|
-
},
|
|
2358
|
+
}, Na = () => typeof window < "u";
|
|
2359
2359
|
function rt() {
|
|
2360
|
-
return
|
|
2360
|
+
return Na() ? window.location.hostname === "localhost" ? "https://dev.unifyed.com" : `${window.location.protocol}//${window.location.hostname}` : "https://dev.unifyed.com";
|
|
2361
2361
|
}
|
|
2362
|
-
function
|
|
2363
|
-
if (!
|
|
2362
|
+
function ka() {
|
|
2363
|
+
if (!Na()) return "";
|
|
2364
2364
|
try {
|
|
2365
|
-
const t =
|
|
2365
|
+
const t = Gn.get("userProfile");
|
|
2366
2366
|
return !t && window.location.hostname === "localhost" ? "/unifyd-gateway/api" : (t && typeof t == "object" ? t : {})?.gatewaypath ?? "";
|
|
2367
2367
|
} catch {
|
|
2368
2368
|
return "";
|
|
2369
2369
|
}
|
|
2370
2370
|
}
|
|
2371
2371
|
function Se() {
|
|
2372
|
-
return `${rt()}${
|
|
2373
|
-
}
|
|
2374
|
-
function ka() {
|
|
2375
|
-
return `${Se()}/unifyedstudioutility/commonutility/users/list?sortkey=firstName&sortorder=false&page=0&size=999&onlineusersonly=false`;
|
|
2372
|
+
return `${rt()}${ka()}`;
|
|
2376
2373
|
}
|
|
2377
2374
|
function Ca() {
|
|
2378
|
-
return `${Se()}/unifyedstudioutility/commonutility/
|
|
2375
|
+
return `${Se()}/unifyedstudioutility/commonutility/users/list?sortkey=firstName&sortorder=false&page=0&size=999&onlineusersonly=false`;
|
|
2379
2376
|
}
|
|
2380
2377
|
function za() {
|
|
2381
|
-
return `${Se()}/
|
|
2378
|
+
return `${Se()}/unifyedstudioutility/commonutility/groupusers/list?type=All&page=0&size=20&sortkey=name&sorder=1&createdbyme=false`;
|
|
2382
2379
|
}
|
|
2383
2380
|
function Sa() {
|
|
2384
|
-
return `${
|
|
2381
|
+
return `${Se()}/unifyedusergroupprovisioning/api`;
|
|
2385
2382
|
}
|
|
2386
2383
|
function Da() {
|
|
2387
|
-
return `${Sa()}/
|
|
2384
|
+
return `${Sa()}/v2/roles`;
|
|
2385
|
+
}
|
|
2386
|
+
function $a() {
|
|
2387
|
+
return `${Da()}/search`;
|
|
2388
2388
|
}
|
|
2389
2389
|
function kt() {
|
|
2390
2390
|
return `${Se()}/unifyed-mydrive/v2`;
|
|
2391
2391
|
}
|
|
2392
|
-
function
|
|
2392
|
+
function Yn() {
|
|
2393
2393
|
return `${kt()}/directory/permissions`;
|
|
2394
2394
|
}
|
|
2395
|
-
function
|
|
2395
|
+
function Wn() {
|
|
2396
2396
|
return `${kt()}/file/permissions`;
|
|
2397
2397
|
}
|
|
2398
|
-
function
|
|
2398
|
+
function ql() {
|
|
2399
2399
|
return Object.freeze({
|
|
2400
2400
|
REACT_APP_BASE_URL: rt(),
|
|
2401
2401
|
GATEWAY_BASE: Se(),
|
|
2402
|
-
USER_SEARCH_BASE:
|
|
2403
|
-
AD_GROUPS_LIST_SEARCH_API:
|
|
2404
|
-
PROVISIONING_BASE:
|
|
2405
|
-
RBAC_BASE:
|
|
2406
|
-
SEARCH_ROLES_API:
|
|
2402
|
+
USER_SEARCH_BASE: Ca(),
|
|
2403
|
+
AD_GROUPS_LIST_SEARCH_API: za(),
|
|
2404
|
+
PROVISIONING_BASE: Sa(),
|
|
2405
|
+
RBAC_BASE: Da(),
|
|
2406
|
+
SEARCH_ROLES_API: $a(),
|
|
2407
2407
|
MY_DRIVE_GATEWAY_BASE_v2: kt(),
|
|
2408
|
-
DIRECTORY_PERMISSIONS_API:
|
|
2409
|
-
FILE_PERMISSIONS_API:
|
|
2408
|
+
DIRECTORY_PERMISSIONS_API: Yn(),
|
|
2409
|
+
FILE_PERMISSIONS_API: Wn()
|
|
2410
2410
|
});
|
|
2411
2411
|
}
|
|
2412
|
-
function
|
|
2412
|
+
function Jn(t) {
|
|
2413
2413
|
try {
|
|
2414
2414
|
const a = localStorage.getItem(t);
|
|
2415
2415
|
return a ? JSON.parse(a) : null;
|
|
@@ -2417,8 +2417,8 @@ function Wn(t) {
|
|
|
2417
2417
|
return console.log("Error reading JSON from localStorage"), null;
|
|
2418
2418
|
}
|
|
2419
2419
|
}
|
|
2420
|
-
function
|
|
2421
|
-
const t =
|
|
2420
|
+
function It() {
|
|
2421
|
+
const t = Jn("userProfile") || {}, a = localStorage.getItem("access_token") || t.accessToken || "", s = localStorage.getItem("siteId") || t.siteId || "", i = t.tenant || "", l = t.tenantdomain || "", m = t.username || t.displayName || "", o = t.email || "";
|
|
2422
2422
|
return {
|
|
2423
2423
|
Authorization: a ? `Bearer ${a}` : void 0,
|
|
2424
2424
|
"x-tenant-id": i || void 0,
|
|
@@ -2429,7 +2429,7 @@ function Rt() {
|
|
|
2429
2429
|
"x-user-email": o || void 0
|
|
2430
2430
|
};
|
|
2431
2431
|
}
|
|
2432
|
-
function
|
|
2432
|
+
function Xn(t) {
|
|
2433
2433
|
if (t && t.isAxiosError) {
|
|
2434
2434
|
const { response: a, config: s, message: i } = t, l = a?.status ?? null, m = a?.statusText ?? null, o = a?.data ?? null, u = typeof o == "string" && o || o?.message || o?.msg || o?.error || o?.errors?.[0]?.message || null;
|
|
2435
2435
|
return {
|
|
@@ -2457,11 +2457,11 @@ function Jn(t) {
|
|
|
2457
2457
|
request: null
|
|
2458
2458
|
};
|
|
2459
2459
|
}
|
|
2460
|
-
function
|
|
2460
|
+
function Hn({
|
|
2461
2461
|
enableAuthRedirect: t = !0,
|
|
2462
2462
|
defaultOpenHeaders: a = {}
|
|
2463
2463
|
} = {}) {
|
|
2464
|
-
const s =
|
|
2464
|
+
const s = tr.create({
|
|
2465
2465
|
baseURL: rt()
|
|
2466
2466
|
// ✅ base URL here
|
|
2467
2467
|
// You can set general timeouts/etc. here
|
|
@@ -2472,18 +2472,18 @@ function Xn({
|
|
|
2472
2472
|
message: b?.statusText || "Request succeeded"
|
|
2473
2473
|
},
|
|
2474
2474
|
(b) => {
|
|
2475
|
-
const f =
|
|
2475
|
+
const f = Xn(b), r = f.status;
|
|
2476
2476
|
return t && (r === 401 || r === 403) && (window.location.href.includes("/login") || (window.historyPath = window.location.pathname, localStorage.clear(), sessionStorage.clear(), window.location.href = "/login")), Promise.reject(f);
|
|
2477
2477
|
}
|
|
2478
2478
|
);
|
|
2479
2479
|
function i({ open: b = !1, customHeader: f = {} } = {}) {
|
|
2480
2480
|
if (b) {
|
|
2481
|
-
const { Authorization: r, ...w } =
|
|
2481
|
+
const { Authorization: r, ...w } = It();
|
|
2482
2482
|
return {
|
|
2483
2483
|
headers: { ...w, ...a, ...f }
|
|
2484
2484
|
};
|
|
2485
2485
|
}
|
|
2486
|
-
return { headers: { ...
|
|
2486
|
+
return { headers: { ...It(), ...f } };
|
|
2487
2487
|
}
|
|
2488
2488
|
async function l(b, f, r = !1, w = {}) {
|
|
2489
2489
|
return s.get(b, {
|
|
@@ -2514,7 +2514,7 @@ function Xn({
|
|
|
2514
2514
|
axiosPatch: p
|
|
2515
2515
|
};
|
|
2516
2516
|
}
|
|
2517
|
-
const Re =
|
|
2517
|
+
const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn = Re.axiosPut, Gl = Re.axiosPatch, Yl = Re.instance, Kn = async (t, a) => {
|
|
2518
2518
|
try {
|
|
2519
2519
|
switch (t) {
|
|
2520
2520
|
case Te.USER: {
|
|
@@ -2533,7 +2533,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2533
2533
|
} catch (s) {
|
|
2534
2534
|
console.log("Error searching entities:", s);
|
|
2535
2535
|
}
|
|
2536
|
-
},
|
|
2536
|
+
}, es = (t) => t.filter((a) => !!a?.email).map((a) => {
|
|
2537
2537
|
const s = (a?.firstName ?? "").trim(), i = (a?.lastName ?? "").trim(), l = `${s} ${i}`.trim() || (a.email?.split("@")[0] ?? "Unknown");
|
|
2538
2538
|
return {
|
|
2539
2539
|
id: a.email,
|
|
@@ -2550,7 +2550,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2550
2550
|
}
|
|
2551
2551
|
}, Xe = {
|
|
2552
2552
|
userSearch: async (t) => {
|
|
2553
|
-
const { data: a } = await Ve(`${
|
|
2553
|
+
const { data: a } = await Ve(`${Ca()}`, t);
|
|
2554
2554
|
return console.log("User search response:", a), a.length ? a.map((s) => ({
|
|
2555
2555
|
id: s.email,
|
|
2556
2556
|
name: `${s?.firstName} ${s?.lastName}`.trim(),
|
|
@@ -2559,7 +2559,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2559
2559
|
})) : [];
|
|
2560
2560
|
},
|
|
2561
2561
|
getAdGroups: async (t) => {
|
|
2562
|
-
const { data: a } = await _e(`${
|
|
2562
|
+
const { data: a } = await _e(`${za()}`, {
|
|
2563
2563
|
q: t
|
|
2564
2564
|
});
|
|
2565
2565
|
if (a.length)
|
|
@@ -2571,7 +2571,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2571
2571
|
}));
|
|
2572
2572
|
},
|
|
2573
2573
|
searchRoles: async (t) => {
|
|
2574
|
-
const { data: a } = await _e(`${
|
|
2574
|
+
const { data: a } = await _e(`${$a()}`, {
|
|
2575
2575
|
page: 0,
|
|
2576
2576
|
size: 20,
|
|
2577
2577
|
q: t ?? "",
|
|
@@ -2597,13 +2597,13 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2597
2597
|
const l = s.data;
|
|
2598
2598
|
Array.isArray(l) ? i = l : typeof l == "string" && (i = Ot(l.trim()));
|
|
2599
2599
|
}
|
|
2600
|
-
return
|
|
2600
|
+
return es(i);
|
|
2601
2601
|
}
|
|
2602
2602
|
}, Ct = (t, a) => {
|
|
2603
2603
|
const [s, i] = L(t);
|
|
2604
2604
|
return Z(
|
|
2605
2605
|
() => {
|
|
2606
|
-
const l =
|
|
2606
|
+
const l = sn(() => {
|
|
2607
2607
|
i(t);
|
|
2608
2608
|
}, a);
|
|
2609
2609
|
return l(), () => {
|
|
@@ -2613,7 +2613,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2613
2613
|
[t, a]
|
|
2614
2614
|
// Only re-call effect if value or delay changes
|
|
2615
2615
|
), s;
|
|
2616
|
-
},
|
|
2616
|
+
}, ts = ({
|
|
2617
2617
|
users: t = [],
|
|
2618
2618
|
groups: a = [],
|
|
2619
2619
|
roles: s = [],
|
|
@@ -2652,16 +2652,16 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2652
2652
|
]
|
|
2653
2653
|
}
|
|
2654
2654
|
);
|
|
2655
|
-
},
|
|
2656
|
-
{ id: 1, name: Te.USER, icon:
|
|
2657
|
-
{ id: 2, name: Te.GROUP, icon:
|
|
2658
|
-
{ id: 3, name: Te.ROLE, icon:
|
|
2659
|
-
],
|
|
2660
|
-
{ id: 1, name:
|
|
2661
|
-
{ id: 2, name:
|
|
2662
|
-
],
|
|
2663
|
-
pendingInvites:
|
|
2664
|
-
}),
|
|
2655
|
+
}, Pt = [
|
|
2656
|
+
{ id: 1, name: Te.USER, icon: nr, code: "users" },
|
|
2657
|
+
{ id: 2, name: Te.GROUP, icon: Zt, code: "groups" },
|
|
2658
|
+
{ id: 3, name: Te.ROLE, icon: sr, code: "roles" }
|
|
2659
|
+
], Lt = [
|
|
2660
|
+
{ id: 1, name: $t.View, icon: Kt },
|
|
2661
|
+
{ id: 2, name: $t.Manage, icon: ea }
|
|
2662
|
+
], as = ar().shape({
|
|
2663
|
+
pendingInvites: rr().min(1, "You must add at least one person to invite.")
|
|
2664
|
+
}), rs = ({
|
|
2665
2665
|
entity: t,
|
|
2666
2666
|
onManage: a,
|
|
2667
2667
|
onClose: s,
|
|
@@ -2672,20 +2672,20 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2672
2672
|
},
|
|
2673
2673
|
isChanged: u = !1
|
|
2674
2674
|
}) => {
|
|
2675
|
-
const [p, b] = L(
|
|
2675
|
+
const [p, b] = L(Pt[0]), [f, r] = L(""), w = Ct(f, 400), [d, h] = L([]), [z, $] = L(/* @__PURE__ */ new Set()), [A, E] = L(!1), [I, j] = L(Lt[0]), {
|
|
2676
2676
|
control: V,
|
|
2677
2677
|
handleSubmit: G,
|
|
2678
2678
|
watch: q,
|
|
2679
2679
|
formState: { errors: T, isSubmitting: v }
|
|
2680
|
-
} =
|
|
2680
|
+
} = lr({
|
|
2681
2681
|
defaultValues: { pendingInvites: [] },
|
|
2682
|
-
resolver:
|
|
2683
|
-
}), { fields: g, append: x, remove: C, update: N } =
|
|
2682
|
+
resolver: cr(as)
|
|
2683
|
+
}), { fields: g, append: x, remove: C, update: N } = ir({
|
|
2684
2684
|
control: V,
|
|
2685
2685
|
name: "pendingInvites"
|
|
2686
2686
|
}), y = q("pendingInvites");
|
|
2687
2687
|
Z(() => {
|
|
2688
|
-
w.length > 1 ? (E(!0),
|
|
2688
|
+
w.length > 1 ? (E(!0), Kn(p.name, w).then((D) => {
|
|
2689
2689
|
h(D);
|
|
2690
2690
|
}).catch((D) => console.error("Search failed:", D)).finally(() => E(!1))) : (h([]), $(/* @__PURE__ */ new Set()));
|
|
2691
2691
|
}, [w, p]);
|
|
@@ -2696,7 +2696,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2696
2696
|
});
|
|
2697
2697
|
}, F = () => {
|
|
2698
2698
|
d.filter((D) => z.has(D.id)).forEach((D) => {
|
|
2699
|
-
g.find((P) => P.id === D.id) || x({ ...D, permission:
|
|
2699
|
+
g.find((P) => P.id === D.id) || x({ ...D, permission: I.name });
|
|
2700
2700
|
}), $(/* @__PURE__ */ new Set()), r("");
|
|
2701
2701
|
}, M = (D) => {
|
|
2702
2702
|
j(D), g.forEach(
|
|
@@ -2749,7 +2749,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2749
2749
|
}, S = (D) => {
|
|
2750
2750
|
const P = i[p.code].find((_) => _.name === D.name && _.permission !== "remove") || y.find((_) => _.name === D.name);
|
|
2751
2751
|
return P ? `${P.permission}` : "";
|
|
2752
|
-
},
|
|
2752
|
+
}, O = () => {
|
|
2753
2753
|
switch (l) {
|
|
2754
2754
|
case de.DRIVE:
|
|
2755
2755
|
return "Share with others";
|
|
@@ -2763,10 +2763,10 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2763
2763
|
};
|
|
2764
2764
|
return ue(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:", y.length), y.length === 0 && !u), [y.length, u]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
|
|
2765
2765
|
/* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
|
|
2766
|
-
/* @__PURE__ */ e(ye.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children:
|
|
2766
|
+
/* @__PURE__ */ e(ye.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: O() }),
|
|
2767
2767
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
|
|
2768
2768
|
l === de.DRIVE && /* @__PURE__ */ n("button", { className: "flex items-center gap-2 text-sm text-blue-600 hover:text-blue-800 font-semibold hover:cursor-pointer", children: [
|
|
2769
|
-
/* @__PURE__ */ e(
|
|
2769
|
+
/* @__PURE__ */ e(or, { className: "h-5 w-5" }),
|
|
2770
2770
|
" Copy Link"
|
|
2771
2771
|
] }),
|
|
2772
2772
|
/* @__PURE__ */ e(
|
|
@@ -2781,7 +2781,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2781
2781
|
] }),
|
|
2782
2782
|
/* @__PURE__ */ n("main", { className: "flex-grow p-4 space-y-6 overflow-y-auto", children: [
|
|
2783
2783
|
(l === de.DRIVE || m) && /* @__PURE__ */ e(
|
|
2784
|
-
|
|
2784
|
+
ts,
|
|
2785
2785
|
{
|
|
2786
2786
|
users: i.users.filter((D) => D.permission !== "remove"),
|
|
2787
2787
|
groups: i.groups.filter((D) => D.permission !== "remove"),
|
|
@@ -2801,11 +2801,11 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2801
2801
|
/* @__PURE__ */ e(
|
|
2802
2802
|
he,
|
|
2803
2803
|
{
|
|
2804
|
-
as:
|
|
2804
|
+
as: Q,
|
|
2805
2805
|
leave: "transition ease-in duration-100",
|
|
2806
2806
|
leaveFrom: "opacity-100",
|
|
2807
2807
|
leaveTo: "opacity-0",
|
|
2808
|
-
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:
|
|
2808
|
+
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(
|
|
2809
2809
|
K.Option,
|
|
2810
2810
|
{
|
|
2811
2811
|
value: D,
|
|
@@ -2926,15 +2926,15 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2926
2926
|
l === de.DRIVE && /* @__PURE__ */ e(
|
|
2927
2927
|
K,
|
|
2928
2928
|
{
|
|
2929
|
-
value:
|
|
2929
|
+
value: I,
|
|
2930
2930
|
onChange: M,
|
|
2931
2931
|
children: /* @__PURE__ */ n("div", { className: "relative", children: [
|
|
2932
2932
|
/* @__PURE__ */ n(K.Button, { className: "relative w-full border border-gray-300 bg-white rounded-md shadow-sm pl-3 pr-10 py-2 text-left hover:cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm", children: [
|
|
2933
2933
|
/* @__PURE__ */ n("span", { className: "flex items-center", children: [
|
|
2934
|
-
/* @__PURE__ */ e(
|
|
2934
|
+
/* @__PURE__ */ e(I.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
|
|
2935
2935
|
/* @__PURE__ */ n("span", { className: "truncate", children: [
|
|
2936
2936
|
"Can ",
|
|
2937
|
-
|
|
2937
|
+
I.name
|
|
2938
2938
|
] })
|
|
2939
2939
|
] }),
|
|
2940
2940
|
/* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(ut, { className: "h-5 w-5 text-gray-400" }) })
|
|
@@ -2942,11 +2942,11 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2942
2942
|
/* @__PURE__ */ e(
|
|
2943
2943
|
he,
|
|
2944
2944
|
{
|
|
2945
|
-
as:
|
|
2945
|
+
as: Q,
|
|
2946
2946
|
leave: "transition ease-in duration-100",
|
|
2947
2947
|
leaveFrom: "opacity-100",
|
|
2948
2948
|
leaveTo: "opacity-0",
|
|
2949
|
-
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:
|
|
2949
|
+
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: Lt.map((D) => /* @__PURE__ */ e(
|
|
2950
2950
|
K.Option,
|
|
2951
2951
|
{
|
|
2952
2952
|
value: D,
|
|
@@ -3056,17 +3056,17 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3056
3056
|
] }) })
|
|
3057
3057
|
] });
|
|
3058
3058
|
}, dt = [
|
|
3059
|
-
{ name: "Can view", icon:
|
|
3060
|
-
{ name: "Can manage", icon:
|
|
3061
|
-
{ name: "Remove", icon:
|
|
3062
|
-
],
|
|
3063
|
-
const [i, l] = L(!1), { refs: m, floatingStyles: o, context: u } =
|
|
3059
|
+
{ name: "Can view", icon: Kt, value: "view" },
|
|
3060
|
+
{ name: "Can manage", icon: ea, value: "edit" },
|
|
3061
|
+
{ name: "Remove", icon: dr, isDestructive: !0, value: "remove" }
|
|
3062
|
+
], ns = ({ item: t, allowedPermissions: a, onPermissionChange: s }) => {
|
|
3063
|
+
const [i, l] = L(!1), { refs: m, floatingStyles: o, context: u } = la({
|
|
3064
3064
|
open: i,
|
|
3065
3065
|
onOpenChange: l,
|
|
3066
|
-
middleware: [
|
|
3067
|
-
whileElementsMounted:
|
|
3066
|
+
middleware: [ia(8), oa(), ca({ padding: 8 })],
|
|
3067
|
+
whileElementsMounted: da,
|
|
3068
3068
|
placement: "bottom-end"
|
|
3069
|
-
}), p =
|
|
3069
|
+
}), p = tn(u), b = an(u), { getReferenceProps: f, getFloatingProps: r } = rn([
|
|
3070
3070
|
p,
|
|
3071
3071
|
b
|
|
3072
3072
|
]), w = dt.find((h) => h.name === t.permission || h.value === t.permission) || dt[0];
|
|
@@ -3088,10 +3088,10 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3088
3088
|
]
|
|
3089
3089
|
}
|
|
3090
3090
|
),
|
|
3091
|
-
/* @__PURE__ */ e(
|
|
3091
|
+
/* @__PURE__ */ e(nn, { children: /* @__PURE__ */ e(
|
|
3092
3092
|
he,
|
|
3093
3093
|
{
|
|
3094
|
-
as:
|
|
3094
|
+
as: Q,
|
|
3095
3095
|
show: i,
|
|
3096
3096
|
enter: "transition ease-out duration-100",
|
|
3097
3097
|
enterFrom: "transform opacity-0 scale-95",
|
|
@@ -3139,7 +3139,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3139
3139
|
) })
|
|
3140
3140
|
] })
|
|
3141
3141
|
);
|
|
3142
|
-
},
|
|
3142
|
+
}, ss = ({
|
|
3143
3143
|
entity: t,
|
|
3144
3144
|
//entire file or folder details
|
|
3145
3145
|
onBack: a,
|
|
@@ -3158,8 +3158,8 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3158
3158
|
roles: o.roles.filter(
|
|
3159
3159
|
(E) => E.name.toLowerCase().includes(w.toLowerCase())
|
|
3160
3160
|
)
|
|
3161
|
-
}, h = async (E,
|
|
3162
|
-
const G =
|
|
3161
|
+
}, h = async (E, I, j, V) => {
|
|
3162
|
+
const G = I.value;
|
|
3163
3163
|
u((q) => ({
|
|
3164
3164
|
...q,
|
|
3165
3165
|
[j]: q[j].map(
|
|
@@ -3168,9 +3168,9 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3168
3168
|
}));
|
|
3169
3169
|
}, z = () => {
|
|
3170
3170
|
const E = {
|
|
3171
|
-
users: o.users.filter((
|
|
3172
|
-
groups: o.groups.filter((
|
|
3173
|
-
roles: o.roles.filter((
|
|
3171
|
+
users: o.users.filter((I) => I.permission !== "remove"),
|
|
3172
|
+
groups: o.groups.filter((I) => I.permission !== "remove"),
|
|
3173
|
+
roles: o.roles.filter((I) => I.permission !== "remove")
|
|
3174
3174
|
};
|
|
3175
3175
|
a(E);
|
|
3176
3176
|
}, $ = ["users", "groups", "roles"], A = ["Users", "Groups", "Roles"];
|
|
@@ -3184,7 +3184,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3184
3184
|
onClick: () => a(o),
|
|
3185
3185
|
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",
|
|
3186
3186
|
children: [
|
|
3187
|
-
/* @__PURE__ */ e(
|
|
3187
|
+
/* @__PURE__ */ e(ta, { className: "h-5 w-5" }),
|
|
3188
3188
|
" Back"
|
|
3189
3189
|
]
|
|
3190
3190
|
}
|
|
@@ -3206,10 +3206,10 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3206
3206
|
se,
|
|
3207
3207
|
{
|
|
3208
3208
|
className: ({
|
|
3209
|
-
selected:
|
|
3209
|
+
selected: I
|
|
3210
3210
|
}) => `w-full py-2 text-sm font-medium leading-5 rounded-md
|
|
3211
3211
|
focus:outline-none focus:ring-2 ring-offset-2 ring-offset-blue-400 ring-white ring-opacity-60
|
|
3212
|
-
${
|
|
3212
|
+
${I ? "bg-white shadow text-blue-700" : "text-gray-600 hover:bg-white/[0.6]"}`,
|
|
3213
3213
|
children: E
|
|
3214
3214
|
},
|
|
3215
3215
|
E
|
|
@@ -3230,11 +3230,11 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3230
3230
|
animate: { y: 0, opacity: 1 },
|
|
3231
3231
|
exit: { y: -10, opacity: 0 },
|
|
3232
3232
|
transition: { duration: 0.2 },
|
|
3233
|
-
children: /* @__PURE__ */ e(se.Panels, { as:
|
|
3233
|
+
children: /* @__PURE__ */ e(se.Panels, { as: Q, children: $.map((E) => /* @__PURE__ */ e(
|
|
3234
3234
|
se.Panel,
|
|
3235
3235
|
{
|
|
3236
3236
|
className: "space-y-3 focus:outline-none",
|
|
3237
|
-
children: /* @__PURE__ */ e(Ce, { children: d[E].length > 0 ? d[E].map((
|
|
3237
|
+
children: /* @__PURE__ */ e(Ce, { children: d[E].length > 0 ? d[E].map((I) => /* @__PURE__ */ n(
|
|
3238
3238
|
le.div,
|
|
3239
3239
|
{
|
|
3240
3240
|
layout: !0,
|
|
@@ -3251,20 +3251,20 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3251
3251
|
/* @__PURE__ */ e(
|
|
3252
3252
|
"img",
|
|
3253
3253
|
{
|
|
3254
|
-
src:
|
|
3255
|
-
alt:
|
|
3254
|
+
src: I.avatarUrl || `https://avatar.vercel.sh/${I.name}.svg?text=${I.name.charAt(0)}`,
|
|
3255
|
+
alt: I.name,
|
|
3256
3256
|
className: "w-10 h-10 rounded-full flex-shrink-0"
|
|
3257
3257
|
}
|
|
3258
3258
|
),
|
|
3259
3259
|
/* @__PURE__ */ n("div", { className: "overflow-hidden", children: [
|
|
3260
|
-
/* @__PURE__ */ e("p", { className: "font-medium text-gray-900 truncate", children:
|
|
3260
|
+
/* @__PURE__ */ e("p", { className: "font-medium text-gray-900 truncate", children: I.name }),
|
|
3261
3261
|
E !== "users" && /* @__PURE__ */ e(
|
|
3262
3262
|
"button",
|
|
3263
3263
|
{
|
|
3264
3264
|
onClick: () => i({
|
|
3265
|
-
id:
|
|
3265
|
+
id: I.id,
|
|
3266
3266
|
type: E,
|
|
3267
|
-
name:
|
|
3267
|
+
name: I.name
|
|
3268
3268
|
}),
|
|
3269
3269
|
className: "text-sm text-blue-600 hover:underline hover:cursor-pointer",
|
|
3270
3270
|
children: "View Members"
|
|
@@ -3273,12 +3273,12 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3273
3273
|
] })
|
|
3274
3274
|
] }),
|
|
3275
3275
|
/* @__PURE__ */ e(
|
|
3276
|
-
|
|
3276
|
+
ns,
|
|
3277
3277
|
{
|
|
3278
|
-
item:
|
|
3278
|
+
item: I,
|
|
3279
3279
|
allowedPermissions: m,
|
|
3280
3280
|
onPermissionChange: (j) => h(
|
|
3281
|
-
|
|
3281
|
+
I,
|
|
3282
3282
|
j,
|
|
3283
3283
|
E
|
|
3284
3284
|
)
|
|
@@ -3286,7 +3286,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3286
3286
|
)
|
|
3287
3287
|
]
|
|
3288
3288
|
},
|
|
3289
|
-
|
|
3289
|
+
I.id
|
|
3290
3290
|
)) : (
|
|
3291
3291
|
// Empty state is unchanged
|
|
3292
3292
|
/* @__PURE__ */ n(
|
|
@@ -3296,7 +3296,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3296
3296
|
animate: { opacity: 1 },
|
|
3297
3297
|
className: "flex flex-col items-center justify-center text-center p-8 mt-10 bg-white rounded-lg border border-gray-300",
|
|
3298
3298
|
children: [
|
|
3299
|
-
/* @__PURE__ */ e(
|
|
3299
|
+
/* @__PURE__ */ e(Zt, { className: "h-12 w-12 text-gray-400" }),
|
|
3300
3300
|
/* @__PURE__ */ n("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: [
|
|
3301
3301
|
"No ",
|
|
3302
3302
|
A[p],
|
|
@@ -3325,13 +3325,13 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3325
3325
|
] })
|
|
3326
3326
|
] })
|
|
3327
3327
|
);
|
|
3328
|
-
},
|
|
3328
|
+
}, ls = () => /* @__PURE__ */ n("div", { className: "flex items-center gap-4 p-4", children: [
|
|
3329
3329
|
/* @__PURE__ */ e("div", { className: "h-10 w-10 rounded-full bg-gray-200 animate-pulse" }),
|
|
3330
3330
|
/* @__PURE__ */ n("div", { className: "flex-grow space-y-2", children: [
|
|
3331
3331
|
/* @__PURE__ */ e("div", { className: "h-4 w-3/5 rounded bg-gray-200 animate-pulse" }),
|
|
3332
3332
|
/* @__PURE__ */ e("div", { className: "h-3 w-4/5 rounded bg-gray-200 animate-pulse" })
|
|
3333
3333
|
] })
|
|
3334
|
-
] }),
|
|
3334
|
+
] }), is = ({
|
|
3335
3335
|
entity: t,
|
|
3336
3336
|
// { id, name, type: "group" | "role" }
|
|
3337
3337
|
onBack: a,
|
|
@@ -3354,7 +3354,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3354
3354
|
exit: { opacity: 0, x: -20 }
|
|
3355
3355
|
}, w = () => l ? (
|
|
3356
3356
|
// Show 5 skeleton items while loading
|
|
3357
|
-
/* @__PURE__ */ e("div", { children: Array.from({ length: 5 }).map((d, h) => /* @__PURE__ */ e(
|
|
3357
|
+
/* @__PURE__ */ e("div", { children: Array.from({ length: 5 }).map((d, h) => /* @__PURE__ */ e(ls, {}, h)) })
|
|
3358
3358
|
) : b.length === 0 ? /* @__PURE__ */ n(
|
|
3359
3359
|
le.div,
|
|
3360
3360
|
{
|
|
@@ -3362,7 +3362,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3362
3362
|
animate: { opacity: 1, scale: 1 },
|
|
3363
3363
|
className: "flex flex-col items-center justify-center text-center p-8 mt-10",
|
|
3364
3364
|
children: [
|
|
3365
|
-
/* @__PURE__ */ e(
|
|
3365
|
+
/* @__PURE__ */ e(mr, { className: "h-12 w-12 text-gray-400" }),
|
|
3366
3366
|
/* @__PURE__ */ e("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: "No Users Found" }),
|
|
3367
3367
|
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: p ? `No one found matching "${p}"` : `There are no users in this ${t.type}.` })
|
|
3368
3368
|
]
|
|
@@ -3410,7 +3410,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3410
3410
|
onClick: a,
|
|
3411
3411
|
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",
|
|
3412
3412
|
children: [
|
|
3413
|
-
/* @__PURE__ */ e(
|
|
3413
|
+
/* @__PURE__ */ e(ta, { className: "h-5 w-5" }),
|
|
3414
3414
|
" Back"
|
|
3415
3415
|
]
|
|
3416
3416
|
}
|
|
@@ -3442,7 +3442,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3442
3442
|
INVITE: "invite",
|
|
3443
3443
|
MANAGE: "manage",
|
|
3444
3444
|
MEMBERS: "members"
|
|
3445
|
-
},
|
|
3445
|
+
}, os = ({
|
|
3446
3446
|
existingShares: t = {
|
|
3447
3447
|
users: [],
|
|
3448
3448
|
groups: [],
|
|
@@ -3459,7 +3459,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3459
3459
|
allowedPermissions: u = [],
|
|
3460
3460
|
...p
|
|
3461
3461
|
}) => {
|
|
3462
|
-
const [b, f] = L(fe.INVITE), [r, w] = L(t), [d, h] = L(null), [z, $] = L(!1), [A, E] = L([]), [
|
|
3462
|
+
const [b, f] = L(fe.INVITE), [r, w] = L(t), [d, h] = L(null), [z, $] = L(!1), [A, E] = L([]), [I, j] = L(fe.MANAGE), V = () => {
|
|
3463
3463
|
f(fe.INVITE), h(null), m();
|
|
3464
3464
|
}, G = () => {
|
|
3465
3465
|
f(fe.MANAGE);
|
|
@@ -3478,9 +3478,9 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3478
3478
|
const x = ct.mapValues(t, (y) => y.map((k) => ({ id: k.id, permission: k.permission })).sort((k, F) => k.id - F.id)), C = ct.mapValues(g, (y) => y.map((k) => ({ id: k.id, permission: k.permission })).sort((k, F) => k.id - F.id));
|
|
3479
3479
|
console.log("Existing data:", x), console.log("Changed data:", C);
|
|
3480
3480
|
const N = !ct.isEqual(x, C);
|
|
3481
|
-
console.log("hasPermissionChanged:", N), $(N), f(b === fe.MEMBERS ?
|
|
3481
|
+
console.log("hasPermissionChanged:", N), $(N), f(b === fe.MEMBERS ? I : fe.INVITE);
|
|
3482
3482
|
};
|
|
3483
|
-
return /* @__PURE__ */ e(he, { appear: !0, show: a, as:
|
|
3483
|
+
return /* @__PURE__ */ e(he, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose: V, children: [
|
|
3484
3484
|
/* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
|
|
3485
3485
|
/* @__PURE__ */ e("div", { className: "filter-modal-container", children: /* @__PURE__ */ e("div", { className: "filter-modal-positioner", children: /* @__PURE__ */ e(Ee, { className: "filter-modal-panel", style: { background: "white" }, children: (() => {
|
|
3486
3486
|
switch (b) {
|
|
@@ -3494,7 +3494,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3494
3494
|
transition: { duration: 0.3, ease: "easeInOut" },
|
|
3495
3495
|
className: "absolute top-0 left-0 w-full h-full",
|
|
3496
3496
|
children: /* @__PURE__ */ e(
|
|
3497
|
-
|
|
3497
|
+
ss,
|
|
3498
3498
|
{
|
|
3499
3499
|
entity: i,
|
|
3500
3500
|
onBack: T,
|
|
@@ -3518,7 +3518,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3518
3518
|
transition: { duration: 0.3, ease: "easeInOut" },
|
|
3519
3519
|
className: "absolute top-0 left-0 w-full h-full",
|
|
3520
3520
|
children: /* @__PURE__ */ e(
|
|
3521
|
-
|
|
3521
|
+
is,
|
|
3522
3522
|
{
|
|
3523
3523
|
entity: d,
|
|
3524
3524
|
onBack: T,
|
|
@@ -3541,7 +3541,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3541
3541
|
transition: { duration: 0.3, ease: "easeInOut" },
|
|
3542
3542
|
className: "absolute top-0 left-0 w-full h-full",
|
|
3543
3543
|
children: /* @__PURE__ */ e(
|
|
3544
|
-
|
|
3544
|
+
rs,
|
|
3545
3545
|
{
|
|
3546
3546
|
entity: i,
|
|
3547
3547
|
onManage: G,
|
|
@@ -3588,7 +3588,7 @@ function nt({
|
|
|
3588
3588
|
getOptionId: d = (z) => String(z.id),
|
|
3589
3589
|
getOptionLabel: h = (z) => z.name
|
|
3590
3590
|
}) {
|
|
3591
|
-
const z =
|
|
3591
|
+
const z = Qe(), $ = Qe(), [A, E] = L(""), I = xe(""), j = ue(() => {
|
|
3592
3592
|
const g = /* @__PURE__ */ new Map();
|
|
3593
3593
|
for (const x of a) g.set(d(x), x);
|
|
3594
3594
|
return g;
|
|
@@ -3598,7 +3598,7 @@ function nt({
|
|
|
3598
3598
|
return a.filter((x) => h(x).toLowerCase().includes(g));
|
|
3599
3599
|
}, [a, A, h]);
|
|
3600
3600
|
Z(() => {
|
|
3601
|
-
b === "server" && A.length >= w && A !==
|
|
3601
|
+
b === "server" && A.length >= w && A !== I.current && (I.current = A, f && f(A));
|
|
3602
3602
|
}, [A, b, w, f]);
|
|
3603
3603
|
const q = b === "client" ? G : a, T = () => {
|
|
3604
3604
|
if (!V.length)
|
|
@@ -3646,14 +3646,14 @@ function nt({
|
|
|
3646
3646
|
),
|
|
3647
3647
|
children: [
|
|
3648
3648
|
/* @__PURE__ */ e("span", { className: "block truncate", children: T() }),
|
|
3649
|
-
/* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(
|
|
3649
|
+
/* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(Ht, { className: "w-5 h-5 text-gray-400", "aria-hidden": "true" }) })
|
|
3650
3650
|
]
|
|
3651
3651
|
}
|
|
3652
3652
|
),
|
|
3653
3653
|
/* @__PURE__ */ e(
|
|
3654
3654
|
he,
|
|
3655
3655
|
{
|
|
3656
|
-
as:
|
|
3656
|
+
as: Q,
|
|
3657
3657
|
show: g,
|
|
3658
3658
|
leave: "transition ease-in duration-100",
|
|
3659
3659
|
leaveFrom: "opacity-100",
|
|
@@ -3754,7 +3754,7 @@ nt.defaultProps = {
|
|
|
3754
3754
|
getOptionId: (t) => String(t.id),
|
|
3755
3755
|
getOptionLabel: (t) => t.name
|
|
3756
3756
|
};
|
|
3757
|
-
const
|
|
3757
|
+
const Wl = ({
|
|
3758
3758
|
isOpen: t = !1,
|
|
3759
3759
|
setIsOpen: a,
|
|
3760
3760
|
content: s,
|
|
@@ -3777,7 +3777,7 @@ const Yl = ({
|
|
|
3777
3777
|
className: "relative z-50 overflow-y-auto",
|
|
3778
3778
|
children: [
|
|
3779
3779
|
/* @__PURE__ */ e(
|
|
3780
|
-
|
|
3780
|
+
Kr,
|
|
3781
3781
|
{
|
|
3782
3782
|
className: "fixed inset-0 bg-black/30",
|
|
3783
3783
|
onClick: p
|
|
@@ -3837,7 +3837,7 @@ const Yl = ({
|
|
|
3837
3837
|
}
|
|
3838
3838
|
);
|
|
3839
3839
|
};
|
|
3840
|
-
function
|
|
3840
|
+
function cs({ listeners: t = {}, attributes: a = {} }) {
|
|
3841
3841
|
return /* @__PURE__ */ e(
|
|
3842
3842
|
"button",
|
|
3843
3843
|
{
|
|
@@ -3851,7 +3851,7 @@ function os({ listeners: t = {}, attributes: a = {} }) {
|
|
|
3851
3851
|
}
|
|
3852
3852
|
);
|
|
3853
3853
|
}
|
|
3854
|
-
function
|
|
3854
|
+
function ds({
|
|
3855
3855
|
node: t,
|
|
3856
3856
|
depth: a,
|
|
3857
3857
|
expanded: s,
|
|
@@ -3866,11 +3866,11 @@ function cs({
|
|
|
3866
3866
|
dropId: f,
|
|
3867
3867
|
indent: r = 24
|
|
3868
3868
|
}) {
|
|
3869
|
-
const { setNodeRef: w, isOver: d } =
|
|
3869
|
+
const { setNodeRef: w, isOver: d } = ur({ id: f }), { attributes: h, listeners: z, setNodeRef: $, transform: A, isDragging: E } = hr({ id: b }), I = A ? { transform: `translate3d(${Math.round(A.x)}px, ${Math.round(A.y)}px, 0)` } : void 0, [j, V] = L(!1), [G, q] = L(t.name), T = () => {
|
|
3870
3870
|
const g = G.trim();
|
|
3871
3871
|
V(!1), g && g !== t.name ? o?.(t, g) : q(t.name);
|
|
3872
3872
|
}, v = ue(() => /* @__PURE__ */ e(
|
|
3873
|
-
|
|
3873
|
+
_n,
|
|
3874
3874
|
{
|
|
3875
3875
|
options: [
|
|
3876
3876
|
{ action: "create", label: "Create sub-folder" },
|
|
@@ -3887,7 +3887,7 @@ function cs({
|
|
|
3887
3887
|
{
|
|
3888
3888
|
ref: w,
|
|
3889
3889
|
className: `tv-row ${d ? "tv-drop-over" : ""} ${E ? "dragging" : ""}`,
|
|
3890
|
-
style: { ...
|
|
3890
|
+
style: { ...I, paddingLeft: 8 + a * r },
|
|
3891
3891
|
onClick: (g) => {
|
|
3892
3892
|
g.target.closest(".tv-toggle") || g.target.tagName === "INPUT" || l?.(t);
|
|
3893
3893
|
},
|
|
@@ -3907,7 +3907,7 @@ function cs({
|
|
|
3907
3907
|
autoFocus: !0
|
|
3908
3908
|
}
|
|
3909
3909
|
) : /* @__PURE__ */ e("span", { onDoubleClick: () => V(!0), children: t.name }) }),
|
|
3910
|
-
/* @__PURE__ */ e(
|
|
3910
|
+
/* @__PURE__ */ e(cs, { listeners: z, attributes: h }),
|
|
3911
3911
|
/* @__PURE__ */ e("div", { className: "tv-actions", children: p ? p(t, {
|
|
3912
3912
|
onCreateChild: () => m?.(t),
|
|
3913
3913
|
onRename: () => V(!0),
|
|
@@ -3917,8 +3917,8 @@ function cs({
|
|
|
3917
3917
|
}
|
|
3918
3918
|
);
|
|
3919
3919
|
}
|
|
3920
|
-
const
|
|
3921
|
-
function
|
|
3920
|
+
const ms = (t) => String(t.id ?? t._id), us = (t) => t.parent !== void 0 ? String(t.parent) : t.parentId != null ? String(t.parentId) : "root", hs = (t) => t.name ?? t.label ?? "", ps = (t) => Array.isArray(t) && t.some((a) => Array.isArray(a.children));
|
|
3921
|
+
function gs(t, { rootId: a, getId: s, getParent: i, getName: l }) {
|
|
3922
3922
|
const m = /* @__PURE__ */ new Map();
|
|
3923
3923
|
t.forEach((u) => {
|
|
3924
3924
|
const p = s(u);
|
|
@@ -3936,7 +3936,7 @@ function ps(t, { rootId: a, getId: s, getParent: i, getName: l }) {
|
|
|
3936
3936
|
p !== a && m.has(p) ? m.get(p).children.push(u) : o.push(u);
|
|
3937
3937
|
}), { roots: o, byId: m };
|
|
3938
3938
|
}
|
|
3939
|
-
function
|
|
3939
|
+
function bs(t, { rootId: a, getId: s, getName: i }) {
|
|
3940
3940
|
const l = /* @__PURE__ */ new Map();
|
|
3941
3941
|
function m(u, p) {
|
|
3942
3942
|
const b = s(u), f = {
|
|
@@ -3951,7 +3951,7 @@ function gs(t, { rootId: a, getId: s, getName: i }) {
|
|
|
3951
3951
|
return { roots: t.map((u) => m(u, null)), byId: l };
|
|
3952
3952
|
}
|
|
3953
3953
|
const Le = (t) => t.map((a) => ({ ...a, children: Le(a.children || []) }));
|
|
3954
|
-
function
|
|
3954
|
+
function fs(t, a) {
|
|
3955
3955
|
let s = null;
|
|
3956
3956
|
function i(m) {
|
|
3957
3957
|
return m.map((o) => {
|
|
@@ -3966,7 +3966,7 @@ function bs(t, a) {
|
|
|
3966
3966
|
}
|
|
3967
3967
|
return { newRoots: i(t), removed: s };
|
|
3968
3968
|
}
|
|
3969
|
-
function
|
|
3969
|
+
function xs(t, a, s) {
|
|
3970
3970
|
function i(l) {
|
|
3971
3971
|
return l.map((m) => {
|
|
3972
3972
|
if (m.id === a)
|
|
@@ -3980,23 +3980,23 @@ function fs(t, a, s) {
|
|
|
3980
3980
|
}
|
|
3981
3981
|
return i(t);
|
|
3982
3982
|
}
|
|
3983
|
-
function
|
|
3983
|
+
function Ta(t, a, s = null) {
|
|
3984
3984
|
for (const i of t) {
|
|
3985
3985
|
if (i.id === a) return { node: i, parentId: s };
|
|
3986
3986
|
if (i.children?.length) {
|
|
3987
|
-
const l =
|
|
3987
|
+
const l = Ta(i.children, a, i.id);
|
|
3988
3988
|
if (l) return l;
|
|
3989
3989
|
}
|
|
3990
3990
|
}
|
|
3991
3991
|
return null;
|
|
3992
3992
|
}
|
|
3993
|
-
function
|
|
3993
|
+
function Jl({
|
|
3994
3994
|
data: t = [],
|
|
3995
3995
|
rootId: a = "root",
|
|
3996
3996
|
title: s = "Folders",
|
|
3997
|
-
getId: i =
|
|
3998
|
-
getParent: l =
|
|
3999
|
-
getName: m =
|
|
3997
|
+
getId: i = ms,
|
|
3998
|
+
getParent: l = us,
|
|
3999
|
+
getName: m = hs,
|
|
4000
4000
|
onSelect: o,
|
|
4001
4001
|
onCreateRoot: u,
|
|
4002
4002
|
onCreateChild: p,
|
|
@@ -4008,7 +4008,7 @@ function Wl({
|
|
|
4008
4008
|
// ← allow root moves by default now
|
|
4009
4009
|
indentUnit: h = 24
|
|
4010
4010
|
}) {
|
|
4011
|
-
const { roots: z } = ue(() =>
|
|
4011
|
+
const { roots: z } = ue(() => ps(t) ? bs(t, { rootId: a, getId: i, getName: m }) : gs(
|
|
4012
4012
|
t.map((k) => ({ ...k })),
|
|
4013
4013
|
{ rootId: a, getId: i, getParent: l, getName: m }
|
|
4014
4014
|
), [t, a, i, l, m]), [$, A] = L({}), E = ae((k) => {
|
|
@@ -4022,13 +4022,13 @@ function Wl({
|
|
|
4022
4022
|
re.useEffect(() => {
|
|
4023
4023
|
A(E(z));
|
|
4024
4024
|
}, [z, E]);
|
|
4025
|
-
const
|
|
4025
|
+
const I = ae(
|
|
4026
4026
|
(k) => A((F) => ({ ...F, [k]: !F[k] })),
|
|
4027
4027
|
[]
|
|
4028
4028
|
), [j, V] = L(() => Le(z));
|
|
4029
4029
|
re.useEffect(() => V(Le(z)), [z]);
|
|
4030
|
-
const G =
|
|
4031
|
-
|
|
4030
|
+
const G = pr(
|
|
4031
|
+
gr(yr, { activationConstraint: { delay: 250, tolerance: 5 } })
|
|
4032
4032
|
), q = xe(null), [T, v] = L(null), g = xe(0), x = () => {
|
|
4033
4033
|
}, C = ({ delta: k }) => {
|
|
4034
4034
|
g.current = k?.x ?? 0;
|
|
@@ -4038,39 +4038,39 @@ function Wl({
|
|
|
4038
4038
|
if (g.current = 0, v(null), !k || !F) return;
|
|
4039
4039
|
const U = String(k.id).replace(/^drag-/, ""), S = String(F.id).replace(/^drop-/, "");
|
|
4040
4040
|
if (!U || !S || U === S) return;
|
|
4041
|
-
let
|
|
4041
|
+
let O = S;
|
|
4042
4042
|
const D = Math.max(0, Math.floor(-M / h));
|
|
4043
4043
|
if (D > 0) {
|
|
4044
4044
|
let W = S;
|
|
4045
4045
|
for (let pe = 0; pe < D; pe++) {
|
|
4046
|
-
const B =
|
|
4046
|
+
const B = Ta(j, W, null);
|
|
4047
4047
|
if (!B) break;
|
|
4048
4048
|
if (!B.parentId) {
|
|
4049
|
-
|
|
4049
|
+
O = a;
|
|
4050
4050
|
break;
|
|
4051
4051
|
}
|
|
4052
|
-
|
|
4052
|
+
O = B.parentId, W = B.parentId;
|
|
4053
4053
|
}
|
|
4054
4054
|
}
|
|
4055
|
-
if (d &&
|
|
4055
|
+
if (d && O === a) {
|
|
4056
4056
|
V(Le(z));
|
|
4057
4057
|
return;
|
|
4058
4058
|
}
|
|
4059
|
-
const P = Le(j), { newRoots: _, removed: R } =
|
|
4059
|
+
const P = Le(j), { newRoots: _, removed: R } = fs(P, U);
|
|
4060
4060
|
if (!R) return;
|
|
4061
|
-
const Y =
|
|
4062
|
-
V(Y), r?.({ sourceId: U, destParentId:
|
|
4061
|
+
const Y = xs(_, O, R);
|
|
4062
|
+
V(Y), r?.({ sourceId: U, destParentId: O, newTree: Y });
|
|
4063
4063
|
},
|
|
4064
4064
|
[j, z, a, d, h, r]
|
|
4065
4065
|
), y = ae(
|
|
4066
4066
|
(k, F = 0) => k.map((M) => /* @__PURE__ */ n(re.Fragment, { children: [
|
|
4067
4067
|
/* @__PURE__ */ e(
|
|
4068
|
-
|
|
4068
|
+
ds,
|
|
4069
4069
|
{
|
|
4070
4070
|
node: M,
|
|
4071
4071
|
depth: F,
|
|
4072
4072
|
expanded: !!$[M.id],
|
|
4073
|
-
onToggle: () =>
|
|
4073
|
+
onToggle: () => I(M.id),
|
|
4074
4074
|
onSelect: o,
|
|
4075
4075
|
onCreateChild: p,
|
|
4076
4076
|
onRename: b,
|
|
@@ -4083,7 +4083,7 @@ function Wl({
|
|
|
4083
4083
|
),
|
|
4084
4084
|
$[M.id] && M.children?.length > 0 ? y(M.children, F + 1) : null
|
|
4085
4085
|
] }, M.id)),
|
|
4086
|
-
[$, h, p, f, b, o, w,
|
|
4086
|
+
[$, h, p, f, b, o, w, I]
|
|
4087
4087
|
);
|
|
4088
4088
|
return re.useMemo(() => {
|
|
4089
4089
|
if (!T) return null;
|
|
@@ -4108,14 +4108,14 @@ function Wl({
|
|
|
4108
4108
|
/* @__PURE__ */ e("button", { className: "tv-icon", title: "Create top-level", onClick: u, children: "+" })
|
|
4109
4109
|
] }),
|
|
4110
4110
|
/* @__PURE__ */ e(
|
|
4111
|
-
|
|
4111
|
+
br,
|
|
4112
4112
|
{
|
|
4113
|
-
collisionDetection:
|
|
4113
|
+
collisionDetection: xr,
|
|
4114
4114
|
sensors: G,
|
|
4115
4115
|
onDragStart: x,
|
|
4116
4116
|
onDragMove: C,
|
|
4117
4117
|
onDragEnd: N,
|
|
4118
|
-
modifiers: [
|
|
4118
|
+
modifiers: [fr],
|
|
4119
4119
|
children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: y(j, 0) })
|
|
4120
4120
|
}
|
|
4121
4121
|
)
|
|
@@ -4124,7 +4124,7 @@ function Wl({
|
|
|
4124
4124
|
function ke(...t) {
|
|
4125
4125
|
return t.filter(Boolean).join(" ");
|
|
4126
4126
|
}
|
|
4127
|
-
const
|
|
4127
|
+
const Xl = ({
|
|
4128
4128
|
tabs: t = [],
|
|
4129
4129
|
keepMounted: a = !0,
|
|
4130
4130
|
orientation: s = "horizontal",
|
|
@@ -4153,7 +4153,11 @@ const Jl = ({
|
|
|
4153
4153
|
] })
|
|
4154
4154
|
) });
|
|
4155
4155
|
};
|
|
4156
|
-
function
|
|
4156
|
+
function Hl(t, a = "YYYY-MM-DD HH:mm:ss") {
|
|
4157
|
+
return t ? (t.endsWith("Z") || /[+\-]\d{2}:?\d{2}$/.test(t) ? St.parseZone(t) : St.utc(t)).local().format(a) : null;
|
|
4158
|
+
}
|
|
4159
|
+
c.string;
|
|
4160
|
+
function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
4157
4161
|
console.log(t);
|
|
4158
4162
|
const [l, m] = re.useState(t), [o, u] = re.useState(() => {
|
|
4159
4163
|
const r = a && a[t.key] || {};
|
|
@@ -4245,7 +4249,7 @@ function xs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4245
4249
|
] }),
|
|
4246
4250
|
r.fieldtype === "textarea" && /* @__PURE__ */ n("div", { children: [
|
|
4247
4251
|
/* @__PURE__ */ e(
|
|
4248
|
-
|
|
4252
|
+
ya,
|
|
4249
4253
|
{
|
|
4250
4254
|
name: r.key,
|
|
4251
4255
|
defaultValue: r.default,
|
|
@@ -4285,7 +4289,7 @@ function xs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4285
4289
|
] }),
|
|
4286
4290
|
r.fieldtype === "checkbox" && /* @__PURE__ */ n("div", { children: [
|
|
4287
4291
|
/* @__PURE__ */ e(
|
|
4288
|
-
|
|
4292
|
+
ma,
|
|
4289
4293
|
{
|
|
4290
4294
|
name: r.key,
|
|
4291
4295
|
checked: !!(o[r.key] || r.default),
|
|
@@ -4399,7 +4403,7 @@ function xs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4399
4403
|
] }),
|
|
4400
4404
|
r.fieldtype === "toggle" && /* @__PURE__ */ n("div", { children: [
|
|
4401
4405
|
/* @__PURE__ */ e(
|
|
4402
|
-
|
|
4406
|
+
va,
|
|
4403
4407
|
{
|
|
4404
4408
|
checked: typeof o[r.key] == "boolean" ? o[r.key] : r.default,
|
|
4405
4409
|
onChange: (d) => {
|
|
@@ -4414,7 +4418,7 @@ function xs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4414
4418
|
i[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: i[l.key][r.key] })
|
|
4415
4419
|
] }),
|
|
4416
4420
|
r.fieldtype === "date" && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
4417
|
-
|
|
4421
|
+
ga,
|
|
4418
4422
|
{
|
|
4419
4423
|
label: r.label,
|
|
4420
4424
|
value: o[r.key] ? new Date(o[r.key]) : null,
|
|
@@ -4429,7 +4433,7 @@ function xs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4429
4433
|
}
|
|
4430
4434
|
) }),
|
|
4431
4435
|
r.fieldtype === "daterange" && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
4432
|
-
|
|
4436
|
+
Fn,
|
|
4433
4437
|
{
|
|
4434
4438
|
label: r.label,
|
|
4435
4439
|
value: o[r.key] || { from: null, to: null },
|
|
@@ -4445,7 +4449,7 @@ function xs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4445
4449
|
) }),
|
|
4446
4450
|
r.fieldtype === "radio" && /* @__PURE__ */ n("div", { children: [
|
|
4447
4451
|
/* @__PURE__ */ e(
|
|
4448
|
-
|
|
4452
|
+
ba,
|
|
4449
4453
|
{
|
|
4450
4454
|
selectedValue: typeof o[r.key] < "u" ? o[r.key] : r.default || "",
|
|
4451
4455
|
onValueChange: (d) => {
|
|
@@ -4599,7 +4603,7 @@ function xs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4599
4603
|
] }),
|
|
4600
4604
|
r.fieldtype === "managecollectionlist" && /* @__PURE__ */ n("div", { children: [
|
|
4601
4605
|
/* @__PURE__ */ e(
|
|
4602
|
-
|
|
4606
|
+
Aa,
|
|
4603
4607
|
{
|
|
4604
4608
|
endpoints: r.endpoints || {},
|
|
4605
4609
|
initialData: o[r.key] || r.initialData || [],
|
|
@@ -4631,8 +4635,8 @@ function xs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4631
4635
|
] }, w)) })
|
|
4632
4636
|
] }) });
|
|
4633
4637
|
}
|
|
4634
|
-
const
|
|
4635
|
-
function
|
|
4638
|
+
const vs = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
|
|
4639
|
+
function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
4636
4640
|
console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
|
|
4637
4641
|
const [l, m] = L(t), [o, u] = L(null), [p, b] = L(null);
|
|
4638
4642
|
console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
|
|
@@ -4683,7 +4687,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4683
4687
|
case "textarea":
|
|
4684
4688
|
return (N, y) => /* @__PURE__ */ n("div", { children: [
|
|
4685
4689
|
/* @__PURE__ */ e(
|
|
4686
|
-
|
|
4690
|
+
ya,
|
|
4687
4691
|
{
|
|
4688
4692
|
value: N[v.key] || "",
|
|
4689
4693
|
onChange: (k) => g(y, k.target.value),
|
|
@@ -4777,10 +4781,10 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4777
4781
|
if (v.optionsFrom && a) {
|
|
4778
4782
|
const { config: F, valueField: M, labelField: U } = v.optionsFrom, S = a[F] || [];
|
|
4779
4783
|
if (Array.isArray(S))
|
|
4780
|
-
return S.map((
|
|
4781
|
-
id:
|
|
4782
|
-
value:
|
|
4783
|
-
label:
|
|
4784
|
+
return S.map((O) => ({
|
|
4785
|
+
id: O[M] || "",
|
|
4786
|
+
value: O[M] || "",
|
|
4787
|
+
label: O[U] || ""
|
|
4784
4788
|
}));
|
|
4785
4789
|
}
|
|
4786
4790
|
return v.options || [];
|
|
@@ -4819,7 +4823,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4819
4823
|
case "checkbox":
|
|
4820
4824
|
case "boolean":
|
|
4821
4825
|
return (N, y) => /* @__PURE__ */ e(
|
|
4822
|
-
|
|
4826
|
+
ma,
|
|
4823
4827
|
{
|
|
4824
4828
|
checked: !!N[v.key],
|
|
4825
4829
|
onChange: (k) => g(y, k),
|
|
@@ -4830,7 +4834,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4830
4834
|
case "toggle":
|
|
4831
4835
|
case "switch":
|
|
4832
4836
|
return (N, y) => /* @__PURE__ */ e(
|
|
4833
|
-
|
|
4837
|
+
va,
|
|
4834
4838
|
{
|
|
4835
4839
|
isOn: !!N[v.key],
|
|
4836
4840
|
onToggle: (k) => g(y, k),
|
|
@@ -4840,7 +4844,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4840
4844
|
);
|
|
4841
4845
|
case "date":
|
|
4842
4846
|
return (N, y) => /* @__PURE__ */ e(
|
|
4843
|
-
|
|
4847
|
+
ga,
|
|
4844
4848
|
{
|
|
4845
4849
|
selectedDate: N[v.key] ? new Date(N[v.key]) : null,
|
|
4846
4850
|
onDateChange: (k) => g(y, k ? k.toISOString().split("T")[0] : ""),
|
|
@@ -4874,7 +4878,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4874
4878
|
);
|
|
4875
4879
|
case "radio":
|
|
4876
4880
|
return (N, y) => /* @__PURE__ */ e(
|
|
4877
|
-
|
|
4881
|
+
ba,
|
|
4878
4882
|
{
|
|
4879
4883
|
selectedValue: N[v.key] || "",
|
|
4880
4884
|
onValueChange: (k) => g(y, k),
|
|
@@ -4900,7 +4904,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4900
4904
|
...k.roles || []
|
|
4901
4905
|
];
|
|
4902
4906
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
4903
|
-
/* @__PURE__ */ e(
|
|
4907
|
+
/* @__PURE__ */ e(vs, { children: F.length > 0 ? F.slice(0, 3).map((M, U) => /* @__PURE__ */ e(
|
|
4904
4908
|
ze,
|
|
4905
4909
|
{
|
|
4906
4910
|
size: "small",
|
|
@@ -5005,17 +5009,17 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5005
5009
|
const x = [...g];
|
|
5006
5010
|
return x.splice(v, 1), x;
|
|
5007
5011
|
});
|
|
5008
|
-
}, []), [E,
|
|
5009
|
-
|
|
5012
|
+
}, []), [E, I] = L(null), j = ae((v, g) => {
|
|
5013
|
+
I(g), v.dataTransfer.effectAllowed = "move", v.dataTransfer.setData("text/html", "");
|
|
5010
5014
|
}, []), V = ae((v) => {
|
|
5011
5015
|
v.preventDefault(), v.dataTransfer.dropEffect = "move";
|
|
5012
5016
|
}, []), G = ae((v, g) => {
|
|
5013
5017
|
v.preventDefault(), !(E === null || E === g) && (r((x) => {
|
|
5014
5018
|
const C = [...x], N = C[E];
|
|
5015
5019
|
return C.splice(E, 1), C.splice(g, 0, N), C;
|
|
5016
|
-
}),
|
|
5020
|
+
}), I(null));
|
|
5017
5021
|
}, [E]), q = ae(() => {
|
|
5018
|
-
|
|
5022
|
+
I(null);
|
|
5019
5023
|
}, []), T = ae((v) => {
|
|
5020
5024
|
console.log("[DataTableRenderer] handleAddAudience called with:", v), r((g) => {
|
|
5021
5025
|
const x = [...g];
|
|
@@ -5076,7 +5080,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5076
5080
|
onClick: () => A(g),
|
|
5077
5081
|
className: "text-red-500 hover:text-red-700",
|
|
5078
5082
|
title: "Delete row",
|
|
5079
|
-
children: /* @__PURE__ */ e(
|
|
5083
|
+
children: /* @__PURE__ */ e(vr, { size: 16 })
|
|
5080
5084
|
}
|
|
5081
5085
|
) })
|
|
5082
5086
|
]
|
|
@@ -5091,7 +5095,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5091
5095
|
roles: f[o][p].roles || []
|
|
5092
5096
|
} : { users: [], groups: [], roles: [] };
|
|
5093
5097
|
return console.log("[DataTableRenderer] Opening modal with existing data:", v), console.log("[DataTableRenderer] Row data:", f[o]), console.log("[DataTableRenderer] Field name:", p), /* @__PURE__ */ e(
|
|
5094
|
-
|
|
5098
|
+
os,
|
|
5095
5099
|
{
|
|
5096
5100
|
isOpen: !0,
|
|
5097
5101
|
onClose: () => {
|
|
@@ -5113,11 +5117,11 @@ const Pe = {
|
|
|
5113
5117
|
pauseOnFocusLoss: !1,
|
|
5114
5118
|
closeOnClick: !0
|
|
5115
5119
|
};
|
|
5116
|
-
let
|
|
5117
|
-
const
|
|
5118
|
-
typeof document > "u" || (
|
|
5119
|
-
},
|
|
5120
|
-
typeof document > "u" || (
|
|
5120
|
+
let He = 0;
|
|
5121
|
+
const Mt = () => {
|
|
5122
|
+
typeof document > "u" || (He += 1, document.body.classList.add("toast-backdrop"));
|
|
5123
|
+
}, Bt = () => {
|
|
5124
|
+
typeof document > "u" || (He = Math.max(0, He - 1), He === 0 && document.body.classList.remove("toast-backdrop"));
|
|
5121
5125
|
}, De = {
|
|
5122
5126
|
success: (t, a) => me.success(t, { ...Pe, ...a }),
|
|
5123
5127
|
info: (t, a) => me.info(t, { ...Pe, ...a }),
|
|
@@ -5128,8 +5132,8 @@ const Lt = () => {
|
|
|
5128
5132
|
autoClose: !1,
|
|
5129
5133
|
closeOnClick: !1,
|
|
5130
5134
|
draggable: !1,
|
|
5131
|
-
onOpen:
|
|
5132
|
-
onClose:
|
|
5135
|
+
onOpen: Mt,
|
|
5136
|
+
onClose: Bt,
|
|
5133
5137
|
...a
|
|
5134
5138
|
}),
|
|
5135
5139
|
// Promise helper (error branch inherits the modal behavior)
|
|
@@ -5143,25 +5147,25 @@ const Lt = () => {
|
|
|
5143
5147
|
autoClose: !1,
|
|
5144
5148
|
closeOnClick: !1,
|
|
5145
5149
|
draggable: !1,
|
|
5146
|
-
onOpen:
|
|
5147
|
-
onClose:
|
|
5150
|
+
onOpen: Mt,
|
|
5151
|
+
onClose: Bt
|
|
5148
5152
|
}
|
|
5149
5153
|
},
|
|
5150
5154
|
{ ...Pe, ...s }
|
|
5151
5155
|
)
|
|
5152
5156
|
}, Ye = (t) => {
|
|
5153
5157
|
try {
|
|
5154
|
-
return `${rt()}${
|
|
5158
|
+
return `${rt()}${ka()}${t}`;
|
|
5155
5159
|
} catch {
|
|
5156
5160
|
return t;
|
|
5157
5161
|
}
|
|
5158
|
-
},
|
|
5162
|
+
}, Ns = {
|
|
5159
5163
|
collectionList: Ye("/unifyedxmanagedquicklinks/config/collection/list"),
|
|
5160
5164
|
collectionCreate: Ye("/unifyedxmanagedquicklinks/config/collection/create"),
|
|
5161
5165
|
collectionUpdate: Ye("/unifyedxmanagedquicklinks/config/collection"),
|
|
5162
5166
|
updateCollection: Ye("/unifyedxmanagedquicklinks/config/collection/updateOrder")
|
|
5163
|
-
},
|
|
5164
|
-
endpoints: t =
|
|
5167
|
+
}, Aa = ({
|
|
5168
|
+
endpoints: t = Ns,
|
|
5165
5169
|
className: a = "",
|
|
5166
5170
|
onCollectionChange: s,
|
|
5167
5171
|
showSearch: i = !0,
|
|
@@ -5172,15 +5176,15 @@ const Lt = () => {
|
|
|
5172
5176
|
initialData: p = null
|
|
5173
5177
|
// Add prop for initial demo data
|
|
5174
5178
|
}) => {
|
|
5175
|
-
const [b, f] = L(null), [r, w] = L(""), [d, h] = L(() => Array.isArray(p) ? p : []), [z, $] = L(null), [A, E] = L(null), [
|
|
5179
|
+
const [b, f] = L(null), [r, w] = L(""), [d, h] = L(() => Array.isArray(p) ? p : []), [z, $] = L(null), [A, E] = L(null), [I, j] = L(""), V = async () => {
|
|
5176
5180
|
try {
|
|
5177
5181
|
const S = await Ve(t.collectionList);
|
|
5178
5182
|
if (S) {
|
|
5179
|
-
const
|
|
5183
|
+
const O = S.map((D, P) => ({
|
|
5180
5184
|
...D,
|
|
5181
5185
|
order: typeof D.order == "number" ? D.order : P + 1
|
|
5182
5186
|
}));
|
|
5183
|
-
|
|
5187
|
+
O.sort((D, P) => (D.order ?? 0) - (P.order ?? 0)), h(O), s?.(O);
|
|
5184
5188
|
}
|
|
5185
5189
|
} catch (S) {
|
|
5186
5190
|
console.log("Error loading collections:", S), typeof window < "u" && !window.location.pathname.includes("iframe.html") && me.error("Failed to load collections");
|
|
@@ -5196,19 +5200,19 @@ const Lt = () => {
|
|
|
5196
5200
|
}, q = () => {
|
|
5197
5201
|
if (!l || b !== null) return;
|
|
5198
5202
|
const S = `temp-${Date.now()}`;
|
|
5199
|
-
h((
|
|
5200
|
-
...
|
|
5203
|
+
h((O) => [
|
|
5204
|
+
...O,
|
|
5201
5205
|
{
|
|
5202
5206
|
id: S,
|
|
5203
5207
|
categoryName: "",
|
|
5204
5208
|
links: [],
|
|
5205
|
-
order: (
|
|
5209
|
+
order: (O.at(-1)?.order ?? 0) + 1,
|
|
5206
5210
|
_temp: !0
|
|
5207
5211
|
}
|
|
5208
5212
|
]), f(S), w("");
|
|
5209
5213
|
}, T = () => {
|
|
5210
5214
|
b != null && (h((S) => {
|
|
5211
|
-
const
|
|
5215
|
+
const O = S.find((P) => P.id === b), D = O && O._temp ? S.filter((P) => P.id !== b) : S;
|
|
5212
5216
|
return s?.(D), D;
|
|
5213
5217
|
}), f(null), w(""));
|
|
5214
5218
|
}, v = async () => {
|
|
@@ -5216,77 +5220,77 @@ const Lt = () => {
|
|
|
5216
5220
|
const S = typeof b == "string" && b.startsWith("temp-");
|
|
5217
5221
|
try {
|
|
5218
5222
|
if (S) {
|
|
5219
|
-
const
|
|
5223
|
+
const O = await _e(t.collectionCreate, {
|
|
5220
5224
|
categoryName: r.trim(),
|
|
5221
5225
|
order: (Array.isArray(d) && d.length > 0 ? d.at(-1)?.order ?? 0 : 0) + 1
|
|
5222
5226
|
});
|
|
5223
|
-
|
|
5224
|
-
const P = D.map((_) => _.id === b ?
|
|
5227
|
+
O && (h((D) => {
|
|
5228
|
+
const P = D.map((_) => _.id === b ? O : _);
|
|
5225
5229
|
return s?.(P), P;
|
|
5226
5230
|
}), De.success("Collection created successfully"));
|
|
5227
5231
|
} else {
|
|
5228
|
-
const
|
|
5232
|
+
const O = await Zn(
|
|
5229
5233
|
`${t.collectionUpdate}/${b}?newName=${r.trim()}`
|
|
5230
5234
|
);
|
|
5231
5235
|
h((D) => {
|
|
5232
5236
|
const P = D.map(
|
|
5233
|
-
(_) => _.id === b ?
|
|
5237
|
+
(_) => _.id === b ? O && O.id ? { ..._, ...O } : { ..._, categoryName: r.trim() } : _
|
|
5234
5238
|
);
|
|
5235
5239
|
return s?.(P), P;
|
|
5236
5240
|
}), me.success("Collection updated successfully");
|
|
5237
5241
|
}
|
|
5238
5242
|
f(null), w("");
|
|
5239
|
-
} catch (
|
|
5240
|
-
console.log(
|
|
5243
|
+
} catch (O) {
|
|
5244
|
+
console.log(O), me.error("Failed to save collection");
|
|
5241
5245
|
}
|
|
5242
5246
|
}, g = async (S) => {
|
|
5243
5247
|
if (o)
|
|
5244
5248
|
try {
|
|
5245
5249
|
await Qn(`${t.collectionUpdate}/${S.id}`) && (me.success("Deleted successfully", { autoClose: 3e3 }), V());
|
|
5246
|
-
} catch (
|
|
5247
|
-
console.log(
|
|
5250
|
+
} catch (O) {
|
|
5251
|
+
console.log(O), me.error("Failed to delete collection");
|
|
5248
5252
|
}
|
|
5249
|
-
}, x = (S,
|
|
5250
|
-
if (!u || !
|
|
5251
|
-
const P = S.findIndex((W) => W.id ===
|
|
5253
|
+
}, x = (S, O, D) => {
|
|
5254
|
+
if (!u || !O || !D || O === D) return S;
|
|
5255
|
+
const P = S.findIndex((W) => W.id === O), _ = S.findIndex((W) => W.id === D);
|
|
5252
5256
|
if (P === -1 || _ === -1) return S;
|
|
5253
5257
|
const R = [...S], [Y] = R.splice(P, 1);
|
|
5254
5258
|
return R.splice(_, 0, Y), R.map((W, pe) => ({ ...W, order: pe + 1 }));
|
|
5255
5259
|
}, C = async (S) => {
|
|
5256
|
-
const
|
|
5260
|
+
const O = S.map((D) => ({
|
|
5257
5261
|
id: D.id,
|
|
5258
5262
|
order: D.order,
|
|
5259
5263
|
categoryName: D.categoryName
|
|
5260
5264
|
}));
|
|
5261
5265
|
try {
|
|
5262
|
-
await _e(t.updateCollection,
|
|
5266
|
+
await _e(t.updateCollection, O);
|
|
5263
5267
|
} catch (D) {
|
|
5264
5268
|
console.log(D), me.error("Failed to save order", { autoClose: 2500 });
|
|
5265
5269
|
}
|
|
5266
|
-
}, N = (S,
|
|
5267
|
-
u && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", String(
|
|
5270
|
+
}, N = (S, O) => {
|
|
5271
|
+
u && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", String(O)), $(O));
|
|
5268
5272
|
}, y = (S) => {
|
|
5269
5273
|
z && S !== A && E(S);
|
|
5270
5274
|
}, k = (S) => {
|
|
5271
5275
|
S.preventDefault();
|
|
5272
|
-
}, F = async (S,
|
|
5276
|
+
}, F = async (S, O) => {
|
|
5273
5277
|
S.preventDefault();
|
|
5274
5278
|
const D = S.dataTransfer.getData("text/plain");
|
|
5275
5279
|
D && (h((P) => {
|
|
5276
|
-
const _ = x(P, D,
|
|
5280
|
+
const _ = x(P, D, O);
|
|
5277
5281
|
return console.log("Reordered", _), C(_), s?.(_), _;
|
|
5278
5282
|
}), $(null), E(null));
|
|
5279
5283
|
}, M = () => {
|
|
5280
5284
|
$(null), E(null);
|
|
5281
5285
|
}, U = Array.isArray(d) ? d.filter(
|
|
5282
|
-
(S) => S.categoryName?.toLowerCase().includes(
|
|
5286
|
+
(S) => S.categoryName?.toLowerCase().includes(I.toLowerCase())
|
|
5283
5287
|
) : [];
|
|
5284
5288
|
return /* @__PURE__ */ n("div", { className: `manage-collection-list ${a}`, children: [
|
|
5285
5289
|
/* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ n("div", { className: "w-1/2 flex justify-end", children: [
|
|
5286
5290
|
i && /* @__PURE__ */ e(
|
|
5287
5291
|
be,
|
|
5288
5292
|
{
|
|
5289
|
-
value:
|
|
5293
|
+
value: I,
|
|
5290
5294
|
onDebouncedChange: j,
|
|
5291
5295
|
placeholder: "Search Collection",
|
|
5292
5296
|
customClass: "mr-4 searchmanagecollection"
|
|
@@ -5306,7 +5310,7 @@ const Lt = () => {
|
|
|
5306
5310
|
)
|
|
5307
5311
|
] }) }),
|
|
5308
5312
|
/* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: U.map((S) => {
|
|
5309
|
-
const
|
|
5313
|
+
const O = b === S.id, D = S?.links?.length ?? 0, P = z === S.id, _ = A === S.id && z !== S.id;
|
|
5310
5314
|
return /* @__PURE__ */ e(
|
|
5311
5315
|
"div",
|
|
5312
5316
|
{
|
|
@@ -5320,7 +5324,7 @@ const Lt = () => {
|
|
|
5320
5324
|
_ ? "ring-2 ring-gray-800/20" : "",
|
|
5321
5325
|
P ? "opacity-60" : ""
|
|
5322
5326
|
].join(" "),
|
|
5323
|
-
children:
|
|
5327
|
+
children: O ? /* @__PURE__ */ n(te, { children: [
|
|
5324
5328
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 flex-1", children: /* @__PURE__ */ e(
|
|
5325
5329
|
"input",
|
|
5326
5330
|
{
|
|
@@ -5383,7 +5387,7 @@ const Lt = () => {
|
|
|
5383
5387
|
className: "cursor-pointer",
|
|
5384
5388
|
onClick: () => G(S),
|
|
5385
5389
|
"aria-label": `Edit ${S.categoryName}`,
|
|
5386
|
-
children: /* @__PURE__ */ e(
|
|
5390
|
+
children: /* @__PURE__ */ e(wr, { color: "#767676" })
|
|
5387
5391
|
}
|
|
5388
5392
|
),
|
|
5389
5393
|
o && /* @__PURE__ */ e(
|
|
@@ -5402,7 +5406,7 @@ const Lt = () => {
|
|
|
5402
5406
|
);
|
|
5403
5407
|
}) })
|
|
5404
5408
|
] });
|
|
5405
|
-
},
|
|
5409
|
+
}, Fa = ({ item: t, data: a, updateHandler: s }) => {
|
|
5406
5410
|
const {
|
|
5407
5411
|
label: i = "Manage Collections",
|
|
5408
5412
|
description: l = "",
|
|
@@ -5421,7 +5425,7 @@ const Lt = () => {
|
|
|
5421
5425
|
l && /* @__PURE__ */ e("p", { className: "text-sm text-gray-600", children: l })
|
|
5422
5426
|
] }),
|
|
5423
5427
|
/* @__PURE__ */ e(
|
|
5424
|
-
|
|
5428
|
+
Aa,
|
|
5425
5429
|
{
|
|
5426
5430
|
endpoints: m,
|
|
5427
5431
|
initialData: h,
|
|
@@ -5437,30 +5441,30 @@ const Lt = () => {
|
|
|
5437
5441
|
}
|
|
5438
5442
|
)
|
|
5439
5443
|
] });
|
|
5440
|
-
},
|
|
5444
|
+
}, ks = ({ item: t }) => /* @__PURE__ */ n("div", { className: "p-3 rounded-xl border border-dashed text-sm opacity-70", children: [
|
|
5441
5445
|
"Unknown type:",
|
|
5442
5446
|
" ",
|
|
5443
5447
|
/* @__PURE__ */ e("span", { className: "font-mono", children: String(t?.type ?? "N/A") })
|
|
5444
5448
|
] }), Ae = /* @__PURE__ */ Object.create(null);
|
|
5445
|
-
Ae.section =
|
|
5446
|
-
Ae.datatable =
|
|
5447
|
-
Ae.managecollectionlist =
|
|
5448
|
-
Ae["manage-collection-list"] =
|
|
5449
|
-
function
|
|
5449
|
+
Ae.section = ys;
|
|
5450
|
+
Ae.datatable = ws;
|
|
5451
|
+
Ae.managecollectionlist = Fa;
|
|
5452
|
+
Ae["manage-collection-list"] = Fa;
|
|
5453
|
+
function Cs(t) {
|
|
5450
5454
|
return typeof t == "string" ? t.trim() : t && typeof t == "object" ? String(t.type || "").trim() : "";
|
|
5451
5455
|
}
|
|
5452
|
-
function
|
|
5453
|
-
const a =
|
|
5454
|
-
return Ae[a] || Ae[a.toLowerCase?.()] ||
|
|
5456
|
+
function zs(t) {
|
|
5457
|
+
const a = Cs(t);
|
|
5458
|
+
return Ae[a] || Ae[a.toLowerCase?.()] || ks;
|
|
5455
5459
|
}
|
|
5456
|
-
function
|
|
5460
|
+
function Ss({
|
|
5457
5461
|
appid: t,
|
|
5458
5462
|
configdata: a = null,
|
|
5459
5463
|
disableApi: s = !1,
|
|
5460
5464
|
onCancel: i,
|
|
5461
5465
|
onSave: l
|
|
5462
5466
|
}) {
|
|
5463
|
-
const [m, o] = re.useState(a), [u, p] = re.useState(null), [b, f] = L(!1), [r, w] = L(!1), [d, h] = L({}), z = `${Se()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, $ = z, [A, E] = L(1),
|
|
5467
|
+
const [m, o] = re.useState(a), [u, p] = re.useState(null), [b, f] = L(!1), [r, w] = L(!1), [d, h] = L({}), z = `${Se()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, $ = z, [A, E] = L(1), I = (x) => {
|
|
5464
5468
|
if (!a || !a.configuration)
|
|
5465
5469
|
return x;
|
|
5466
5470
|
const C = {}, N = x?.configuration || {};
|
|
@@ -5468,16 +5472,16 @@ function zs({
|
|
|
5468
5472
|
if (y.key && y.type === "datatable") {
|
|
5469
5473
|
const F = (N[y.key] || []).map((M, U) => {
|
|
5470
5474
|
const S = { id: M.id || 0 };
|
|
5471
|
-
return y.fields && y.fields.forEach((
|
|
5472
|
-
if (
|
|
5475
|
+
return y.fields && y.fields.forEach((O) => {
|
|
5476
|
+
if (O.fieldtype === "audience") {
|
|
5473
5477
|
let D = { users: [], groups: [], roles: [] };
|
|
5474
|
-
M[
|
|
5475
|
-
users: M[
|
|
5476
|
-
groups: M[
|
|
5477
|
-
roles: M[
|
|
5478
|
-
})), S[
|
|
5478
|
+
M[O.key] && (Array.isArray(M[O.key]) ? D = { users: [], groups: [], roles: [] } : typeof M[O.key] == "object" && (D = {
|
|
5479
|
+
users: M[O.key].users || [],
|
|
5480
|
+
groups: M[O.key].groups || [],
|
|
5481
|
+
roles: M[O.key].roles || []
|
|
5482
|
+
})), S[O.key] = D;
|
|
5479
5483
|
} else
|
|
5480
|
-
S[
|
|
5484
|
+
S[O.key] = M[O.key] || O.default || "";
|
|
5481
5485
|
}), S;
|
|
5482
5486
|
});
|
|
5483
5487
|
if (F.length === 0) {
|
|
@@ -5519,7 +5523,7 @@ function zs({
|
|
|
5519
5523
|
f(!0);
|
|
5520
5524
|
let C = await Ve(z);
|
|
5521
5525
|
if (C) {
|
|
5522
|
-
const N =
|
|
5526
|
+
const N = I(C);
|
|
5523
5527
|
p(N);
|
|
5524
5528
|
} else
|
|
5525
5529
|
j();
|
|
@@ -5592,12 +5596,12 @@ function zs({
|
|
|
5592
5596
|
const U = { id: M.id || 0 };
|
|
5593
5597
|
return F.fields && F.fields.forEach((S) => {
|
|
5594
5598
|
if (S.fieldtype === "audience") {
|
|
5595
|
-
let
|
|
5596
|
-
M[S.key] && typeof M[S.key] == "object" && !Array.isArray(M[S.key]) && (
|
|
5599
|
+
let O = { users: [], groups: [], roles: [] };
|
|
5600
|
+
M[S.key] && typeof M[S.key] == "object" && !Array.isArray(M[S.key]) && (O = {
|
|
5597
5601
|
users: M[S.key].users || [],
|
|
5598
5602
|
groups: M[S.key].groups || [],
|
|
5599
5603
|
roles: M[S.key].roles || []
|
|
5600
|
-
}), U[S.key] =
|
|
5604
|
+
}), U[S.key] = O;
|
|
5601
5605
|
} else
|
|
5602
5606
|
U[S.key] = M[S.key] || "";
|
|
5603
5607
|
}), U;
|
|
@@ -5637,9 +5641,9 @@ function zs({
|
|
|
5637
5641
|
className: "dynamic-config bg-white w-full h-[calc(100vh-350px)] overflow-y-auto",
|
|
5638
5642
|
style: { padding: "0px 20px 0px 0px" },
|
|
5639
5643
|
children: [
|
|
5640
|
-
b && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(
|
|
5644
|
+
b && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(xa, { size: "large" }) }),
|
|
5641
5645
|
!b && g?.map((x, C) => {
|
|
5642
|
-
const N =
|
|
5646
|
+
const N = zs(x.type);
|
|
5643
5647
|
if (N && N !== "UnknownType")
|
|
5644
5648
|
return /* @__PURE__ */ e(
|
|
5645
5649
|
N,
|
|
@@ -5678,7 +5682,7 @@ function zs({
|
|
|
5678
5682
|
] })
|
|
5679
5683
|
] });
|
|
5680
5684
|
}
|
|
5681
|
-
const
|
|
5685
|
+
const Ql = ({
|
|
5682
5686
|
config: t,
|
|
5683
5687
|
appid: a = "Configuration-Page",
|
|
5684
5688
|
disableApi: s = !1
|
|
@@ -5739,7 +5743,7 @@ const Xl = ({
|
|
|
5739
5743
|
console.log("handleCancelRequest called - showing modal"), o(!0);
|
|
5740
5744
|
}, []), E = ae((g) => {
|
|
5741
5745
|
o(!1), g.primary ? (console.log("User confirmed cancel - navigating back"), window.history.back()) : console.log("User cancelled the cancel action - modal closed, data preserved");
|
|
5742
|
-
}, []),
|
|
5746
|
+
}, []), I = () => {
|
|
5743
5747
|
for (const g of h)
|
|
5744
5748
|
if (g.type === "section" && g.fields) {
|
|
5745
5749
|
const x = g.fields.find((C) => C.key === "displayname");
|
|
@@ -5749,7 +5753,7 @@ const Xl = ({
|
|
|
5749
5753
|
return a;
|
|
5750
5754
|
};
|
|
5751
5755
|
re.useEffect(() => {
|
|
5752
|
-
p(
|
|
5756
|
+
p(I());
|
|
5753
5757
|
}, [h]);
|
|
5754
5758
|
const j = ae((g) => {
|
|
5755
5759
|
console.log("Config saved with data:", g), Object.keys(g).forEach((x) => {
|
|
@@ -5782,7 +5786,7 @@ const Xl = ({
|
|
|
5782
5786
|
...w
|
|
5783
5787
|
}, q = [
|
|
5784
5788
|
{ label: "Overview", content: v(G) },
|
|
5785
|
-
{ label: "Configuration", content: /* @__PURE__ */ e(
|
|
5789
|
+
{ label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: { configuration: h }, disableApi: s, onCancel: A, onSave: j }) }
|
|
5786
5790
|
];
|
|
5787
5791
|
function T(g) {
|
|
5788
5792
|
return g ? g.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: g } }) : g : "📱";
|
|
@@ -5831,7 +5835,7 @@ const Xl = ({
|
|
|
5831
5835
|
}
|
|
5832
5836
|
return /* @__PURE__ */ n("div", { className: "full-config-page", children: [
|
|
5833
5837
|
/* @__PURE__ */ e(
|
|
5834
|
-
|
|
5838
|
+
Vn,
|
|
5835
5839
|
{
|
|
5836
5840
|
heading: z.heading,
|
|
5837
5841
|
subHeading: $.length > 0 ? void 0 : z.subHeading,
|
|
@@ -5868,7 +5872,7 @@ const Xl = ({
|
|
|
5868
5872
|
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: q[i].content })
|
|
5869
5873
|
] }),
|
|
5870
5874
|
/* @__PURE__ */ e(
|
|
5871
|
-
|
|
5875
|
+
Pn,
|
|
5872
5876
|
{
|
|
5873
5877
|
isOpen: m,
|
|
5874
5878
|
onClose: E,
|
|
@@ -5881,11 +5885,11 @@ const Xl = ({
|
|
|
5881
5885
|
)
|
|
5882
5886
|
] });
|
|
5883
5887
|
};
|
|
5884
|
-
function
|
|
5888
|
+
function Zl({ children: t }) {
|
|
5885
5889
|
return /* @__PURE__ */ n(te, { children: [
|
|
5886
5890
|
t,
|
|
5887
5891
|
/* @__PURE__ */ e(
|
|
5888
|
-
|
|
5892
|
+
ln,
|
|
5889
5893
|
{
|
|
5890
5894
|
position: "bottom-right",
|
|
5891
5895
|
autoClose: 3500,
|
|
@@ -5895,7 +5899,7 @@ function Ql({ children: t }) {
|
|
|
5895
5899
|
pauseOnFocusLoss: !1,
|
|
5896
5900
|
draggable: !0,
|
|
5897
5901
|
pauseOnHover: !0,
|
|
5898
|
-
transition:
|
|
5902
|
+
transition: on,
|
|
5899
5903
|
limit: 4,
|
|
5900
5904
|
closeButton: !0,
|
|
5901
5905
|
bodyClassName: "ui-toast__body",
|
|
@@ -5906,7 +5910,7 @@ function Ql({ children: t }) {
|
|
|
5906
5910
|
/* @__PURE__ */ e("div", { id: "ui-toast-backdrop", "aria-hidden": "true" })
|
|
5907
5911
|
] });
|
|
5908
5912
|
}
|
|
5909
|
-
const
|
|
5913
|
+
const Kl = ({
|
|
5910
5914
|
heading: t = "Data Grid",
|
|
5911
5915
|
subheading: a = "",
|
|
5912
5916
|
totalCount: s = 0,
|
|
@@ -5934,10 +5938,10 @@ const Hl = ({
|
|
|
5934
5938
|
handleSearchChange: E = () => {
|
|
5935
5939
|
},
|
|
5936
5940
|
// Optional: override export file names
|
|
5937
|
-
excelFileName:
|
|
5941
|
+
excelFileName: I,
|
|
5938
5942
|
pdfFileName: j
|
|
5939
5943
|
}) => {
|
|
5940
|
-
const V = () => l?.current || i?.current, [G, q] = re.useState(""), T = (t || "export").toString().trim() || "export", v = `${
|
|
5944
|
+
const V = () => l?.current || i?.current, [G, q] = re.useState(""), T = (t || "export").toString().trim() || "export", v = `${I || T}.xlsx`, g = `${j || T}.pdf`, x = (y, k, F) => Math.max(k, Math.min(y, F)), C = ae(
|
|
5941
5945
|
(y) => {
|
|
5942
5946
|
const k = V();
|
|
5943
5947
|
if (console.log("openColumnChooserNear", k), !!k?.openColumnChooser) {
|
|
@@ -5947,9 +5951,9 @@ const Hl = ({
|
|
|
5947
5951
|
}
|
|
5948
5952
|
try {
|
|
5949
5953
|
const F = y.currentTarget.getBoundingClientRect(), M = F.left + window.scrollX, U = F.bottom + window.scrollY;
|
|
5950
|
-
let S = M - 120,
|
|
5954
|
+
let S = M - 120, O = U - 120;
|
|
5951
5955
|
const D = window.innerWidth, P = window.innerHeight;
|
|
5952
|
-
S = x(S, window.scrollX + 8, window.scrollX + D - 340),
|
|
5956
|
+
S = x(S, window.scrollX + 8, window.scrollX + D - 340), O = x(O, window.scrollY, window.scrollY + P - 120), console.log("openColumnChooserNear", S, O), k.openColumnChooser(S, O);
|
|
5953
5957
|
} catch (F) {
|
|
5954
5958
|
console.log("coloumn choose error", F);
|
|
5955
5959
|
}
|
|
@@ -6006,7 +6010,7 @@ const Hl = ({
|
|
|
6006
6010
|
b && /* @__PURE__ */ e(
|
|
6007
6011
|
ee,
|
|
6008
6012
|
{
|
|
6009
|
-
icon:
|
|
6013
|
+
icon: Nr,
|
|
6010
6014
|
onClick: (y) => N("ColumnChooser", y),
|
|
6011
6015
|
size: "small",
|
|
6012
6016
|
ariaLabel: "Column Chooser",
|
|
@@ -6017,7 +6021,7 @@ const Hl = ({
|
|
|
6017
6021
|
f && /* @__PURE__ */ e(
|
|
6018
6022
|
ee,
|
|
6019
6023
|
{
|
|
6020
|
-
icon:
|
|
6024
|
+
icon: kr,
|
|
6021
6025
|
onClick: o,
|
|
6022
6026
|
size: "small",
|
|
6023
6027
|
ariaLabel: "Filters",
|
|
@@ -6028,7 +6032,7 @@ const Hl = ({
|
|
|
6028
6032
|
r && /* @__PURE__ */ e(
|
|
6029
6033
|
ee,
|
|
6030
6034
|
{
|
|
6031
|
-
icon:
|
|
6035
|
+
icon: Cr,
|
|
6032
6036
|
onClick: () => N("Print"),
|
|
6033
6037
|
ariaLabel: "Print",
|
|
6034
6038
|
size: "small",
|
|
@@ -6039,7 +6043,7 @@ const Hl = ({
|
|
|
6039
6043
|
w && /* @__PURE__ */ e(
|
|
6040
6044
|
ee,
|
|
6041
6045
|
{
|
|
6042
|
-
icon:
|
|
6046
|
+
icon: zr,
|
|
6043
6047
|
onClick: () => N("Excel"),
|
|
6044
6048
|
ariaLabel: "Excel Download",
|
|
6045
6049
|
size: "small",
|
|
@@ -6050,7 +6054,7 @@ const Hl = ({
|
|
|
6050
6054
|
d && /* @__PURE__ */ e(
|
|
6051
6055
|
ee,
|
|
6052
6056
|
{
|
|
6053
|
-
icon:
|
|
6057
|
+
icon: Sr,
|
|
6054
6058
|
onClick: () => N("Pdf"),
|
|
6055
6059
|
ariaLabel: "PDF Download",
|
|
6056
6060
|
size: "small",
|
|
@@ -6061,7 +6065,7 @@ const Hl = ({
|
|
|
6061
6065
|
h && /* @__PURE__ */ e(
|
|
6062
6066
|
ee,
|
|
6063
6067
|
{
|
|
6064
|
-
icon:
|
|
6068
|
+
icon: Dr,
|
|
6065
6069
|
onClick: () => N("Refresh"),
|
|
6066
6070
|
ariaLabel: "Refresh",
|
|
6067
6071
|
size: "small",
|
|
@@ -6074,7 +6078,7 @@ const Hl = ({
|
|
|
6074
6078
|
ee,
|
|
6075
6079
|
{
|
|
6076
6080
|
label: u,
|
|
6077
|
-
icon:
|
|
6081
|
+
icon: $r,
|
|
6078
6082
|
onClick: m,
|
|
6079
6083
|
size: "small",
|
|
6080
6084
|
ariaLabel: "Add New",
|
|
@@ -6085,7 +6089,7 @@ const Hl = ({
|
|
|
6085
6089
|
] })
|
|
6086
6090
|
] });
|
|
6087
6091
|
};
|
|
6088
|
-
function
|
|
6092
|
+
function ei(t) {
|
|
6089
6093
|
const {
|
|
6090
6094
|
data: a = [],
|
|
6091
6095
|
totalCount: s = 0,
|
|
@@ -6107,7 +6111,7 @@ function Zl(t) {
|
|
|
6107
6111
|
selectionSettings: $ = { type: "Multiple", mode: "Row" },
|
|
6108
6112
|
enableCheckbox: A = !1,
|
|
6109
6113
|
columns: E = [],
|
|
6110
|
-
onGridStateChange:
|
|
6114
|
+
onGridStateChange: I,
|
|
6111
6115
|
onRowSelected: j,
|
|
6112
6116
|
onRowDeselected: V,
|
|
6113
6117
|
onRowDoubleClick: G,
|
|
@@ -6117,9 +6121,9 @@ function Zl(t) {
|
|
|
6117
6121
|
pageSettings: g,
|
|
6118
6122
|
sortSettings: x,
|
|
6119
6123
|
...C
|
|
6120
|
-
} = T || {}, [N, y] = re.useState(g?.page || 1), [k, F] = re.useState(x?.pageSize || 20), [M, U] = re.useState(x?.sortKey || "updatedDate"), [S,
|
|
6121
|
-
const B = [
|
|
6122
|
-
return o && B.push(
|
|
6124
|
+
} = T || {}, [N, y] = re.useState(g?.page || 1), [k, F] = re.useState(x?.pageSize || 20), [M, U] = re.useState(x?.sortKey || "updatedDate"), [S, O] = re.useState(x?.direction || "Descending"), D = ue(() => {
|
|
6125
|
+
const B = [cn];
|
|
6126
|
+
return o && B.push(dn), u && B.push(mn), p && B.push(un), h && B.push(hn), r && B.push(pn), w && B.push(gn), d && B.push(bn), f && B.push(fn), b && B.push(xn), B.push(yn), B;
|
|
6123
6127
|
}, [o, u, p, h, r, w, d, f, b]), P = ue(() => {
|
|
6124
6128
|
const B = () => v.current, ne = (J, we) => {
|
|
6125
6129
|
!we && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${J} requested but related service/feature is disabled.`);
|
|
@@ -6155,13 +6159,13 @@ function Zl(t) {
|
|
|
6155
6159
|
const ne = String(B || "");
|
|
6156
6160
|
return ne === "Ascending" || ne === "Descending" ? ne : ne.toLowerCase() === "ascending" ? "Ascending" : "Descending";
|
|
6157
6161
|
}, R = (B) => {
|
|
6158
|
-
const ne = v.current, J = B?.requestType, we = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other",
|
|
6159
|
-
field:
|
|
6160
|
-
dir: _(
|
|
6162
|
+
const ne = v.current, J = B?.requestType, we = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Ie = B?.pageSize ?? ne?.pageSettings?.pageSize ?? k, Ue = B?.currentPage ?? ne?.pageSettings?.currentPage ?? l, st = B?.columnName && B?.direction ? [{ field: B.columnName, dir: _(B.direction) }] : (ne?.sortSettings?.columns || []).map((Oe) => ({
|
|
6163
|
+
field: Oe.field,
|
|
6164
|
+
dir: _(Oe.direction ?? Oe.dir)
|
|
6161
6165
|
})), lt = B?.searchString ?? "", it = B?.columns ?? ne?.filterSettings?.columns ?? [];
|
|
6162
6166
|
return {
|
|
6163
6167
|
reason: we,
|
|
6164
|
-
page: { index: Ue, size:
|
|
6168
|
+
page: { index: Ue, size: Ie, skip: (Ue - 1) * Ie, take: Ie },
|
|
6165
6169
|
sort: st,
|
|
6166
6170
|
// [{ field, dir: 'Ascending'|'Descending' }]
|
|
6167
6171
|
search: lt,
|
|
@@ -6171,50 +6175,50 @@ function Zl(t) {
|
|
|
6171
6175
|
}, Y = (B) => {
|
|
6172
6176
|
setTimeout(() => {
|
|
6173
6177
|
v?.current?.hideSpinner();
|
|
6174
|
-
}, 1e3), B.requestType === "paging" && (y(B.currentPage), F(B.pageSize)), B.requestType === "sorting" && (U(B.columnName || "updatedDate"),
|
|
6178
|
+
}, 1e3), B.requestType === "paging" && (y(B.currentPage), F(B.pageSize)), B.requestType === "sorting" && (U(B.columnName || "updatedDate"), O(B.direction === "Ascending" ? "ASC" : "DESC")), I && I(R(B), B);
|
|
6175
6179
|
}, W = (B) => {
|
|
6176
6180
|
typeof G == "function" && G(B?.rowData, B);
|
|
6177
6181
|
}, pe = () => {
|
|
6178
6182
|
const B = [];
|
|
6179
|
-
return A && B.push(/* @__PURE__ */ e(
|
|
6183
|
+
return A && B.push(/* @__PURE__ */ e(Dt, { type: "checkbox", width: "50" }, "__checkbox__")), E.forEach((ne, J) => {
|
|
6180
6184
|
const {
|
|
6181
6185
|
field: we,
|
|
6182
|
-
headerText:
|
|
6186
|
+
headerText: Ie,
|
|
6183
6187
|
width: Ue,
|
|
6184
6188
|
textAlign: st = "Left",
|
|
6185
6189
|
template: lt,
|
|
6186
6190
|
isPrimaryKey: it,
|
|
6187
|
-
showInColumnChooser:
|
|
6188
|
-
allowFiltering:
|
|
6191
|
+
showInColumnChooser: Oe = !0,
|
|
6192
|
+
allowFiltering: Ia = !0,
|
|
6189
6193
|
allowSorting: Oa = !0,
|
|
6190
|
-
type:
|
|
6191
|
-
format:
|
|
6192
|
-
visible:
|
|
6193
|
-
minWidth:
|
|
6194
|
-
maxWidth:
|
|
6195
|
-
customAttributes:
|
|
6196
|
-
...
|
|
6194
|
+
type: Pa,
|
|
6195
|
+
format: La,
|
|
6196
|
+
visible: Ma = !0,
|
|
6197
|
+
minWidth: Ba,
|
|
6198
|
+
maxWidth: ja,
|
|
6199
|
+
customAttributes: Va,
|
|
6200
|
+
..._a
|
|
6197
6201
|
} = ne || {};
|
|
6198
6202
|
B.push(
|
|
6199
6203
|
/* @__PURE__ */ e(
|
|
6200
|
-
|
|
6204
|
+
Dt,
|
|
6201
6205
|
{
|
|
6202
6206
|
field: we,
|
|
6203
|
-
headerText:
|
|
6207
|
+
headerText: Ie,
|
|
6204
6208
|
width: Ue,
|
|
6205
6209
|
textAlign: st,
|
|
6206
6210
|
template: lt,
|
|
6207
6211
|
isPrimaryKey: it,
|
|
6208
|
-
showInColumnChooser:
|
|
6209
|
-
allowFiltering:
|
|
6212
|
+
showInColumnChooser: Oe,
|
|
6213
|
+
allowFiltering: Ia,
|
|
6210
6214
|
allowSorting: Oa,
|
|
6211
|
-
type:
|
|
6212
|
-
format:
|
|
6213
|
-
visible:
|
|
6214
|
-
minWidth:
|
|
6215
|
-
maxWidth:
|
|
6216
|
-
customAttributes:
|
|
6217
|
-
...
|
|
6215
|
+
type: Pa,
|
|
6216
|
+
format: La,
|
|
6217
|
+
visible: Ma,
|
|
6218
|
+
minWidth: Ba,
|
|
6219
|
+
maxWidth: ja,
|
|
6220
|
+
customAttributes: Va,
|
|
6221
|
+
..._a
|
|
6218
6222
|
},
|
|
6219
6223
|
we || `col-${J}`
|
|
6220
6224
|
)
|
|
@@ -6222,7 +6226,7 @@ function Zl(t) {
|
|
|
6222
6226
|
}), B;
|
|
6223
6227
|
};
|
|
6224
6228
|
return /* @__PURE__ */ n(
|
|
6225
|
-
|
|
6229
|
+
vn,
|
|
6226
6230
|
{
|
|
6227
6231
|
id: i,
|
|
6228
6232
|
ref: v,
|
|
@@ -6250,8 +6254,8 @@ function Zl(t) {
|
|
|
6250
6254
|
recordDoubleClick: W,
|
|
6251
6255
|
...C,
|
|
6252
6256
|
children: [
|
|
6253
|
-
/* @__PURE__ */ e(
|
|
6254
|
-
/* @__PURE__ */ e(
|
|
6257
|
+
/* @__PURE__ */ e(wn, { children: pe() }),
|
|
6258
|
+
/* @__PURE__ */ e(Nn, { services: D })
|
|
6255
6259
|
]
|
|
6256
6260
|
}
|
|
6257
6261
|
);
|
|
@@ -6278,7 +6282,7 @@ const oe = (t) => {
|
|
|
6278
6282
|
title: "text-lg",
|
|
6279
6283
|
meta: "text-sm"
|
|
6280
6284
|
}
|
|
6281
|
-
},
|
|
6285
|
+
}, Ds = (t, a) => typeof a == "function" ? a(t) : typeof a == "string" && t?.[a] != null ? t[a] : t?._id ?? t?.id ?? t?.instanceId ?? t?.legacyId ?? t?.key ?? null;
|
|
6282
6286
|
function ie({
|
|
6283
6287
|
children: t,
|
|
6284
6288
|
className: a = "",
|
|
@@ -6290,7 +6294,7 @@ function ie({
|
|
|
6290
6294
|
details: o = {},
|
|
6291
6295
|
...u
|
|
6292
6296
|
}) {
|
|
6293
|
-
const p =
|
|
6297
|
+
const p = Qe(), b = Ds(u, m), f = (w) => {
|
|
6294
6298
|
l?.({
|
|
6295
6299
|
key: b,
|
|
6296
6300
|
checked: w.target.checked,
|
|
@@ -6326,7 +6330,7 @@ ie.propTypes = {
|
|
|
6326
6330
|
identity: c.oneOfType([c.string, c.func]),
|
|
6327
6331
|
details: c.object
|
|
6328
6332
|
};
|
|
6329
|
-
function
|
|
6333
|
+
function $s({
|
|
6330
6334
|
size: t = "md",
|
|
6331
6335
|
showCheckbox: a = !1,
|
|
6332
6336
|
checkboxPosition: s = "top-left",
|
|
@@ -6410,7 +6414,7 @@ function Ds({
|
|
|
6410
6414
|
}
|
|
6411
6415
|
);
|
|
6412
6416
|
}
|
|
6413
|
-
|
|
6417
|
+
$s.propTypes = {
|
|
6414
6418
|
size: c.string,
|
|
6415
6419
|
showCheckbox: c.bool,
|
|
6416
6420
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -6424,7 +6428,7 @@ Ds.propTypes = {
|
|
|
6424
6428
|
imageUrl: c.string,
|
|
6425
6429
|
description: c.string
|
|
6426
6430
|
};
|
|
6427
|
-
const
|
|
6431
|
+
const Ts = "px-2 py-1 rounded-full text-[11px] font-semibold tracking-wide border border-zinc-200 dark:border-zinc-700 bg-white dark:bg-zinc-800 text-zinc-700 dark:text-zinc-200", As = () => /* @__PURE__ */ e("span", { className: "ml-1 inline-block h-2.5 w-2.5 rounded-full bg-emerald-500 align-middle", "aria-label": "verified" }), Fs = [
|
|
6428
6432
|
{
|
|
6429
6433
|
_id: "cm-1",
|
|
6430
6434
|
name: "All Students",
|
|
@@ -6443,13 +6447,13 @@ const $s = "px-2 py-1 rounded-full text-[11px] font-semibold tracking-wide borde
|
|
|
6443
6447
|
joined: !0,
|
|
6444
6448
|
description: "What is Academic Advising? The mission of the Academic Advising Department at..."
|
|
6445
6449
|
}
|
|
6446
|
-
],
|
|
6450
|
+
], Es = {
|
|
6447
6451
|
sm: { wrap: "max-w-md", thumb: "h-14 w-14", name: "text-sm", desc: "text-[13px]" },
|
|
6448
6452
|
md: { wrap: "max-w-3xl", thumb: "h-16 w-16", name: "text-base", desc: "text-sm" },
|
|
6449
6453
|
lg: { wrap: "w-full", thumb: "h-20 w-20", name: "text-lg", desc: "text-base" }
|
|
6450
6454
|
// lg occupies full width
|
|
6451
6455
|
};
|
|
6452
|
-
function
|
|
6456
|
+
function Rs({
|
|
6453
6457
|
size: t = "md",
|
|
6454
6458
|
showCheckbox: a = !1,
|
|
6455
6459
|
checkboxPosition: s = "top-left",
|
|
@@ -6458,11 +6462,11 @@ function Es({
|
|
|
6458
6462
|
title: m = "Communities",
|
|
6459
6463
|
activeTab: o = "joined",
|
|
6460
6464
|
// "joined" | "suggested"
|
|
6461
|
-
items: u =
|
|
6465
|
+
items: u = Fs,
|
|
6462
6466
|
// spread for identity (_id/instanceId/etc)
|
|
6463
6467
|
...p
|
|
6464
6468
|
}) {
|
|
6465
|
-
const b = oe(t), f = ce[b], r =
|
|
6469
|
+
const b = oe(t), f = ce[b], r = Es[b], w = (d) => `px-1 pb-2 text-sm font-medium ${d === o ? "text-zinc-900 dark:text-zinc-100 border-b-2" : "text-zinc-500 dark:text-zinc-400"}`;
|
|
6466
6470
|
return /* @__PURE__ */ n(
|
|
6467
6471
|
ie,
|
|
6468
6472
|
{
|
|
@@ -6512,10 +6516,10 @@ function Es({
|
|
|
6512
6516
|
/* @__PURE__ */ n("div", { className: "min-w-0", children: [
|
|
6513
6517
|
/* @__PURE__ */ n("div", { className: `flex items-center gap-1 font-semibold ${r.name}`, children: [
|
|
6514
6518
|
/* @__PURE__ */ e("span", { className: "truncate", children: d.name }),
|
|
6515
|
-
/* @__PURE__ */ e(
|
|
6519
|
+
/* @__PURE__ */ e(As, {})
|
|
6516
6520
|
] }),
|
|
6517
6521
|
/* @__PURE__ */ n("div", { className: "flex gap-1 justify-center items-center", children: [
|
|
6518
|
-
/* @__PURE__ */ n(
|
|
6522
|
+
/* @__PURE__ */ n(Sn, { children: [
|
|
6519
6523
|
/* @__PURE__ */ e(ze, { size: "small", src: d.avatar, name: "John" }),
|
|
6520
6524
|
/* @__PURE__ */ e(ze, { size: "small", src: d.avatar, name: "Omi" }),
|
|
6521
6525
|
/* @__PURE__ */ e(ze, { size: "small", src: d.avatar, name: "Raj" })
|
|
@@ -6526,7 +6530,7 @@ function Es({
|
|
|
6526
6530
|
" Members"
|
|
6527
6531
|
] })
|
|
6528
6532
|
] }),
|
|
6529
|
-
/* @__PURE__ */ e("div", { className: "mt-2", children: /* @__PURE__ */ e("span", { className:
|
|
6533
|
+
/* @__PURE__ */ e("div", { className: "mt-2", children: /* @__PURE__ */ e("span", { className: Ts, children: d.category }) })
|
|
6530
6534
|
] }),
|
|
6531
6535
|
d.joined && /* @__PURE__ */ e(
|
|
6532
6536
|
"span",
|
|
@@ -6565,7 +6569,7 @@ function Es({
|
|
|
6565
6569
|
}
|
|
6566
6570
|
);
|
|
6567
6571
|
}
|
|
6568
|
-
|
|
6572
|
+
Rs.propTypes = {
|
|
6569
6573
|
size: c.string,
|
|
6570
6574
|
showCheckbox: c.bool,
|
|
6571
6575
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -6585,7 +6589,7 @@ Es.propTypes = {
|
|
|
6585
6589
|
})
|
|
6586
6590
|
)
|
|
6587
6591
|
};
|
|
6588
|
-
const
|
|
6592
|
+
const Is = [
|
|
6589
6593
|
{
|
|
6590
6594
|
_id: "nw-1",
|
|
6591
6595
|
title: "KCC’s 3rd Annual Community & Business Partners Luncheon",
|
|
@@ -6634,15 +6638,15 @@ const Rs = [
|
|
|
6634
6638
|
date: "text-sm",
|
|
6635
6639
|
excerpt: "text-sm text-zinc-600 dark:text-zinc-300 line-clamp-2"
|
|
6636
6640
|
}
|
|
6637
|
-
},
|
|
6638
|
-
function
|
|
6641
|
+
}, 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 });
|
|
6642
|
+
function Ps({
|
|
6639
6643
|
size: t = "md",
|
|
6640
6644
|
showCheckbox: a = !1,
|
|
6641
6645
|
checkboxPosition: s = "top-left",
|
|
6642
6646
|
onSelect: i,
|
|
6643
6647
|
identity: l = "_id",
|
|
6644
6648
|
title: m = "News",
|
|
6645
|
-
items: o =
|
|
6649
|
+
items: o = Is,
|
|
6646
6650
|
// spread for identity fields: _id / id / instanceId etc.
|
|
6647
6651
|
...u
|
|
6648
6652
|
}) {
|
|
@@ -6668,7 +6672,7 @@ function Is({
|
|
|
6668
6672
|
/* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: f.cardImg }),
|
|
6669
6673
|
/* @__PURE__ */ e("h4", { className: `mt-3 ${f.title} text-zinc-900 dark:text-zinc-100`, children: r.title }),
|
|
6670
6674
|
/* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${f.date}`, children: r.date }),
|
|
6671
|
-
/* @__PURE__ */ e("div", { className: "mt-2", children: /* @__PURE__ */ e(
|
|
6675
|
+
/* @__PURE__ */ e("div", { className: "mt-2", children: /* @__PURE__ */ e(jt, { label: r.tag }) }),
|
|
6672
6676
|
/* @__PURE__ */ n("p", { className: `mt-2 ${f.excerpt}`, children: [
|
|
6673
6677
|
r.excerpt,
|
|
6674
6678
|
" ",
|
|
@@ -6686,7 +6690,7 @@ function Is({
|
|
|
6686
6690
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
|
|
6687
6691
|
/* @__PURE__ */ e("h4", { className: `${f.title} text-zinc-900 dark:text-zinc-100 line-clamp-2`, children: r.title }),
|
|
6688
6692
|
/* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${f.date}`, children: r.date }),
|
|
6689
|
-
/* @__PURE__ */ e("div", { className: "mt-1", children: /* @__PURE__ */ e(
|
|
6693
|
+
/* @__PURE__ */ e("div", { className: "mt-1", children: /* @__PURE__ */ e(jt, { label: r.tag }) }),
|
|
6690
6694
|
f.excerpt !== "hidden" && /* @__PURE__ */ n("p", { className: `mt-2 ${f.excerpt}`, children: [
|
|
6691
6695
|
r.excerpt,
|
|
6692
6696
|
" ",
|
|
@@ -6703,7 +6707,7 @@ function Is({
|
|
|
6703
6707
|
}
|
|
6704
6708
|
);
|
|
6705
6709
|
}
|
|
6706
|
-
|
|
6710
|
+
Ps.propTypes = {
|
|
6707
6711
|
size: c.string,
|
|
6708
6712
|
showCheckbox: c.bool,
|
|
6709
6713
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -6721,7 +6725,7 @@ Is.propTypes = {
|
|
|
6721
6725
|
})
|
|
6722
6726
|
)
|
|
6723
6727
|
};
|
|
6724
|
-
const
|
|
6728
|
+
const Ls = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Ms = {
|
|
6725
6729
|
sm: {
|
|
6726
6730
|
wrap: "max-w-md w-full md:w-auto flex-none justify-self-start",
|
|
6727
6731
|
mapH: "h-48",
|
|
@@ -6743,15 +6747,15 @@ const Ps = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Ls = {
|
|
|
6743
6747
|
searchH: "h-11 text-base",
|
|
6744
6748
|
chipGap: "gap-3.5"
|
|
6745
6749
|
}
|
|
6746
|
-
},
|
|
6750
|
+
}, Bs = ({ label: t, active: a = !1, size: s = "md", className: i = "" }) => {
|
|
6747
6751
|
const l = "inline-flex items-center justify-center whitespace-nowrap rounded-full border transition-colors duration-150 shadow-[0_0.5px_0_rgba(0,0,0,0.04)]", m = {
|
|
6748
6752
|
sm: "h-8 px-3 text-[11px] font-semibold",
|
|
6749
6753
|
md: "h-9 px-3.5 text-[13px] font-semibold",
|
|
6750
6754
|
lg: "h-10 px-4 text-sm font-semibold"
|
|
6751
6755
|
}, o = a ? "bg-indigo-700 border-indigo-700 text-white" : "bg-white/95 dark:bg-zinc-900/90 border-zinc-300 dark:border-zinc-700 text-zinc-700 dark:text-zinc-200";
|
|
6752
6756
|
return /* @__PURE__ */ e("span", { className: `${l} ${m[s] ?? m.md} ${o} ${i}`, children: t });
|
|
6753
|
-
},
|
|
6754
|
-
function
|
|
6757
|
+
}, js = (t, a = 12) => `https://www.google.com/maps?q=${encodeURIComponent(t)}&z=${a}&output=embed`;
|
|
6758
|
+
function Vs({
|
|
6755
6759
|
size: t = "md",
|
|
6756
6760
|
showCheckbox: a = !1,
|
|
6757
6761
|
checkboxPosition: s = "top-left",
|
|
@@ -6759,7 +6763,7 @@ function js({
|
|
|
6759
6763
|
identity: l = "_id",
|
|
6760
6764
|
title: m = "Campus Map",
|
|
6761
6765
|
campusName: o = "Morningside Heights Campus",
|
|
6762
|
-
filters: u =
|
|
6766
|
+
filters: u = Ls,
|
|
6763
6767
|
activeFilter: p = "All",
|
|
6764
6768
|
// NEW: iframe controls
|
|
6765
6769
|
mapQuery: b = "Florida",
|
|
@@ -6768,7 +6772,7 @@ function js({
|
|
|
6768
6772
|
// optional full embed URL override
|
|
6769
6773
|
...w
|
|
6770
6774
|
}) {
|
|
6771
|
-
const d = oe(t), h = ce[d], z =
|
|
6775
|
+
const d = oe(t), h = ce[d], z = Ms[d], $ = r || js(b, f);
|
|
6772
6776
|
return /* @__PURE__ */ e(
|
|
6773
6777
|
ie,
|
|
6774
6778
|
{
|
|
@@ -6802,7 +6806,7 @@ function js({
|
|
|
6802
6806
|
/* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
|
|
6803
6807
|
] })
|
|
6804
6808
|
] }),
|
|
6805
|
-
/* @__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 ${z.chipGap} overflow-x-auto scrollbar-none`, children: u.map((A) => /* @__PURE__ */ e(
|
|
6809
|
+
/* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${z.chipGap} overflow-x-auto scrollbar-none`, children: u.map((A) => /* @__PURE__ */ e(Bs, { label: A, active: A === p, size: d }, A)) }) }),
|
|
6806
6810
|
/* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-28 md:top-24 pointer-events-none", children: /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 px-4 ${z.searchH}`, children: [
|
|
6807
6811
|
/* @__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" }) }),
|
|
6808
6812
|
/* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
|
|
@@ -6811,7 +6815,7 @@ function js({
|
|
|
6811
6815
|
}
|
|
6812
6816
|
);
|
|
6813
6817
|
}
|
|
6814
|
-
|
|
6818
|
+
Vs.propTypes = {
|
|
6815
6819
|
size: c.string,
|
|
6816
6820
|
showCheckbox: c.bool,
|
|
6817
6821
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -6827,7 +6831,7 @@ js.propTypes = {
|
|
|
6827
6831
|
mapUrl: c.string
|
|
6828
6832
|
// optional full embed URL override
|
|
6829
6833
|
};
|
|
6830
|
-
const
|
|
6834
|
+
const _s = [
|
|
6831
6835
|
{
|
|
6832
6836
|
_id: "ev-1",
|
|
6833
6837
|
title: "Warhawk Weekly 10-1: Master the future; Rolling out 'Red'",
|
|
@@ -6858,7 +6862,7 @@ const Vs = [
|
|
|
6858
6862
|
image: "https://images.unsplash.com/photo-1492684223066-81342ee5ff30?q=80&w=1200&auto=format&fit=crop",
|
|
6859
6863
|
description: ""
|
|
6860
6864
|
}
|
|
6861
|
-
],
|
|
6865
|
+
], Us = {
|
|
6862
6866
|
sm: {
|
|
6863
6867
|
wrap: "max-w-sm w-full",
|
|
6864
6868
|
listGap: "gap-3",
|
|
@@ -6895,16 +6899,16 @@ const Vs = [
|
|
|
6895
6899
|
showImage: !0,
|
|
6896
6900
|
compact: !1
|
|
6897
6901
|
}
|
|
6898
|
-
},
|
|
6902
|
+
}, qs = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Ea = (t) => {
|
|
6899
6903
|
const a = new Date(t);
|
|
6900
6904
|
return {
|
|
6901
6905
|
day: a.getDate(),
|
|
6902
|
-
month:
|
|
6906
|
+
month: qs[a.getMonth()] || "",
|
|
6903
6907
|
time: a.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })
|
|
6904
6908
|
};
|
|
6905
6909
|
};
|
|
6906
|
-
function
|
|
6907
|
-
const { day: l, month: m, time: o } =
|
|
6910
|
+
function Vt({ ev: t, sizeMeta: a, isSelected: s, onClick: i }) {
|
|
6911
|
+
const { day: l, month: m, time: o } = Ea(t.date);
|
|
6908
6912
|
return /* @__PURE__ */ n(
|
|
6909
6913
|
"div",
|
|
6910
6914
|
{
|
|
@@ -6927,9 +6931,9 @@ function jt({ ev: t, sizeMeta: a, isSelected: s, onClick: i }) {
|
|
|
6927
6931
|
}
|
|
6928
6932
|
);
|
|
6929
6933
|
}
|
|
6930
|
-
function
|
|
6934
|
+
function Gs({ ev: t, sizeMeta: a }) {
|
|
6931
6935
|
if (!t) return null;
|
|
6932
|
-
const { day: s, month: i, time: l } =
|
|
6936
|
+
const { day: s, month: i, time: l } = Ea(t.date);
|
|
6933
6937
|
return /* @__PURE__ */ n("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 p-6", children: [
|
|
6934
6938
|
/* @__PURE__ */ n("div", { className: "flex items-start gap-4 mb-4", children: [
|
|
6935
6939
|
/* @__PURE__ */ n("div", { className: "flex-shrink-0", children: [
|
|
@@ -6953,28 +6957,28 @@ function qs({ ev: t, sizeMeta: a }) {
|
|
|
6953
6957
|
}
|
|
6954
6958
|
) }),
|
|
6955
6959
|
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: [
|
|
6956
|
-
/* @__PURE__ */ e(
|
|
6960
|
+
/* @__PURE__ */ e(aa, { className: "h-4 w-4" }),
|
|
6957
6961
|
t.location
|
|
6958
6962
|
] }),
|
|
6959
6963
|
t.url && /* @__PURE__ */ n("div", { className: `flex items-center gap-2 mb-4 text-zinc-600 dark:text-zinc-400 ${a.meta}`, children: [
|
|
6960
|
-
/* @__PURE__ */ e(
|
|
6964
|
+
/* @__PURE__ */ e(Tr, { className: "h-4 w-4" }),
|
|
6961
6965
|
/* @__PURE__ */ e("span", { className: "text-blue-600 dark:text-blue-400 underline break-all", children: t.url })
|
|
6962
6966
|
] }),
|
|
6963
6967
|
a.showDescription && t.description && /* @__PURE__ */ e("div", { className: "mt-4 pt-4 border-t border-zinc-200 dark:border-zinc-800", children: /* @__PURE__ */ e("p", { className: "text-sm text-zinc-700 dark:text-zinc-300 leading-relaxed", children: t.description }) })
|
|
6964
6968
|
] });
|
|
6965
6969
|
}
|
|
6966
|
-
function
|
|
6970
|
+
function Ys({
|
|
6967
6971
|
size: t = "md",
|
|
6968
6972
|
showCheckbox: a = !1,
|
|
6969
6973
|
checkboxPosition: s = "top-left",
|
|
6970
6974
|
onSelect: i,
|
|
6971
6975
|
identity: l = "_id",
|
|
6972
6976
|
title: m = "Upcoming Events",
|
|
6973
|
-
events: o =
|
|
6977
|
+
events: o = _s,
|
|
6974
6978
|
selectedIndex: u = 0,
|
|
6975
6979
|
...p
|
|
6976
6980
|
}) {
|
|
6977
|
-
const [b, f] = L(u), r = oe(t), w = ce[r], d =
|
|
6981
|
+
const [b, f] = L(u), r = oe(t), w = ce[r], d = Us[r], h = o[b] || o[0], z = (A, E) => {
|
|
6978
6982
|
f(E), i?.(A);
|
|
6979
6983
|
}, $ = r === "lg";
|
|
6980
6984
|
return /* @__PURE__ */ n(
|
|
@@ -6996,26 +7000,26 @@ function Gs({
|
|
|
6996
7000
|
// Large: Two-column layout
|
|
6997
7001
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
6998
7002
|
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((A, E) => /* @__PURE__ */ e(
|
|
6999
|
-
|
|
7003
|
+
Vt,
|
|
7000
7004
|
{
|
|
7001
7005
|
ev: A,
|
|
7002
7006
|
sizeMeta: d,
|
|
7003
7007
|
isSelected: E === b,
|
|
7004
|
-
onClick: (
|
|
7008
|
+
onClick: (I) => z(I, E)
|
|
7005
7009
|
},
|
|
7006
7010
|
A._id || A.id || E
|
|
7007
7011
|
)) }),
|
|
7008
|
-
/* @__PURE__ */ e(
|
|
7012
|
+
/* @__PURE__ */ e(Gs, { ev: h, sizeMeta: d })
|
|
7009
7013
|
] })
|
|
7010
7014
|
) : (
|
|
7011
7015
|
// Small/Medium: Simple list only
|
|
7012
7016
|
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((A, E) => /* @__PURE__ */ e(
|
|
7013
|
-
|
|
7017
|
+
Vt,
|
|
7014
7018
|
{
|
|
7015
7019
|
ev: A,
|
|
7016
7020
|
sizeMeta: d,
|
|
7017
7021
|
isSelected: E === b,
|
|
7018
|
-
onClick: (
|
|
7022
|
+
onClick: (I) => z(I, E)
|
|
7019
7023
|
},
|
|
7020
7024
|
A._id || A.id || E
|
|
7021
7025
|
)) })
|
|
@@ -7025,7 +7029,7 @@ function Gs({
|
|
|
7025
7029
|
}
|
|
7026
7030
|
);
|
|
7027
7031
|
}
|
|
7028
|
-
|
|
7032
|
+
Ys.propTypes = {
|
|
7029
7033
|
size: c.string,
|
|
7030
7034
|
showCheckbox: c.bool,
|
|
7031
7035
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -7046,7 +7050,7 @@ Gs.propTypes = {
|
|
|
7046
7050
|
),
|
|
7047
7051
|
selectedIndex: c.number
|
|
7048
7052
|
};
|
|
7049
|
-
const
|
|
7053
|
+
const Ws = [
|
|
7050
7054
|
{
|
|
7051
7055
|
_id: "mail-1",
|
|
7052
7056
|
sender: "Sender Name",
|
|
@@ -7091,7 +7095,7 @@ const Ys = [
|
|
|
7091
7095
|
// pinned: false,
|
|
7092
7096
|
// important: false,
|
|
7093
7097
|
// },
|
|
7094
|
-
],
|
|
7098
|
+
], Js = {
|
|
7095
7099
|
sm: {
|
|
7096
7100
|
wrap: "max-w-sm w-full",
|
|
7097
7101
|
listGap: "gap-2",
|
|
@@ -7129,7 +7133,7 @@ const Ys = [
|
|
|
7129
7133
|
searchHeight: "h-10"
|
|
7130
7134
|
}
|
|
7131
7135
|
};
|
|
7132
|
-
function
|
|
7136
|
+
function Xs({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin: m }) {
|
|
7133
7137
|
const o = (p) => {
|
|
7134
7138
|
p.stopPropagation(), l?.(t);
|
|
7135
7139
|
}, u = (p) => {
|
|
@@ -7147,7 +7151,7 @@ function Js({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin
|
|
|
7147
7151
|
{
|
|
7148
7152
|
onClick: o,
|
|
7149
7153
|
className: "p-1 rounded hover:bg-zinc-200 dark:hover:bg-zinc-700 transition-colors duration-200",
|
|
7150
|
-
children: t.starred ? /* @__PURE__ */ e(
|
|
7154
|
+
children: t.starred ? /* @__PURE__ */ e(Ar, { className: "h-4 w-4 fill-yellow-400 text-yellow-400" }) : /* @__PURE__ */ e(Fr, { className: "h-4 w-4 text-zinc-400 group-hover:text-yellow-400" })
|
|
7151
7155
|
}
|
|
7152
7156
|
),
|
|
7153
7157
|
/* @__PURE__ */ e(
|
|
@@ -7155,7 +7159,7 @@ function Js({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin
|
|
|
7155
7159
|
{
|
|
7156
7160
|
onClick: u,
|
|
7157
7161
|
className: "p-1 rounded hover:bg-zinc-200 dark:hover:bg-zinc-700 transition-colors duration-200",
|
|
7158
|
-
children: t.pinned ? /* @__PURE__ */ e(
|
|
7162
|
+
children: t.pinned ? /* @__PURE__ */ e(Er, { className: "h-4 w-4 fill-blue-500 text-blue-500" }) : /* @__PURE__ */ e(Rr, { className: "h-4 w-4 text-zinc-400 group-hover:text-blue-500" })
|
|
7159
7163
|
}
|
|
7160
7164
|
)
|
|
7161
7165
|
] }),
|
|
@@ -7178,26 +7182,26 @@ function Js({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin
|
|
|
7178
7182
|
}
|
|
7179
7183
|
);
|
|
7180
7184
|
}
|
|
7181
|
-
function
|
|
7185
|
+
function Hs({
|
|
7182
7186
|
size: t = "md",
|
|
7183
7187
|
showCheckbox: a = !1,
|
|
7184
7188
|
checkboxPosition: s = "top-left",
|
|
7185
7189
|
onSelect: i,
|
|
7186
7190
|
identity: l = "_id",
|
|
7187
7191
|
title: m = "0365 Mails",
|
|
7188
|
-
emails: o =
|
|
7192
|
+
emails: o = Ws,
|
|
7189
7193
|
selectedIndex: u = 0,
|
|
7190
7194
|
onStar: p,
|
|
7191
7195
|
onPin: b,
|
|
7192
7196
|
...f
|
|
7193
7197
|
}) {
|
|
7194
|
-
const [r, w] = L(u), d = oe(t), h = ce[d], z =
|
|
7195
|
-
w(j), i?.(
|
|
7196
|
-
}, A = (
|
|
7197
|
-
const j = { ...
|
|
7198
|
+
const [r, w] = L(u), d = oe(t), h = ce[d], z = Js[d], $ = (I, j) => {
|
|
7199
|
+
w(j), i?.(I);
|
|
7200
|
+
}, A = (I) => {
|
|
7201
|
+
const j = { ...I, starred: !I.starred };
|
|
7198
7202
|
p?.(j);
|
|
7199
|
-
}, E = (
|
|
7200
|
-
const j = { ...
|
|
7203
|
+
}, E = (I) => {
|
|
7204
|
+
const j = { ...I, pinned: !I.pinned };
|
|
7201
7205
|
b?.(j);
|
|
7202
7206
|
};
|
|
7203
7207
|
return /* @__PURE__ */ n(
|
|
@@ -7213,24 +7217,24 @@ function Xs({
|
|
|
7213
7217
|
children: [
|
|
7214
7218
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${h.title}`, children: m }) }),
|
|
7215
7219
|
/* @__PURE__ */ e(be, { placeholder: "Type to search..." }),
|
|
7216
|
-
/* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((
|
|
7217
|
-
|
|
7220
|
+
/* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((I, j) => /* @__PURE__ */ e(
|
|
7221
|
+
Xs,
|
|
7218
7222
|
{
|
|
7219
|
-
email:
|
|
7223
|
+
email: I,
|
|
7220
7224
|
sizeMeta: z,
|
|
7221
7225
|
isSelected: j === r,
|
|
7222
7226
|
onClick: (V) => $(V, j),
|
|
7223
7227
|
onStar: A,
|
|
7224
7228
|
onPin: E
|
|
7225
7229
|
},
|
|
7226
|
-
|
|
7230
|
+
I._id || I.id || j
|
|
7227
7231
|
)) }),
|
|
7228
7232
|
/* @__PURE__ */ e("div", { className: "mt-4 pt-3 border-t border-zinc-200 dark:border-zinc-800", children: /* @__PURE__ */ e("button", { className: "w-full text-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" }) })
|
|
7229
7233
|
]
|
|
7230
7234
|
}
|
|
7231
7235
|
);
|
|
7232
7236
|
}
|
|
7233
|
-
|
|
7237
|
+
Hs.propTypes = {
|
|
7234
7238
|
size: c.string,
|
|
7235
7239
|
showCheckbox: c.bool,
|
|
7236
7240
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -7295,7 +7299,7 @@ const Qs = [
|
|
|
7295
7299
|
// building: "Security Building",
|
|
7296
7300
|
// initials: "AM"
|
|
7297
7301
|
// }
|
|
7298
|
-
],
|
|
7302
|
+
], Zs = {
|
|
7299
7303
|
sm: {
|
|
7300
7304
|
wrap: "max-w-sm w-full",
|
|
7301
7305
|
searchHeight: "h-8",
|
|
@@ -7342,7 +7346,7 @@ const Qs = [
|
|
|
7342
7346
|
// two columns for large screens
|
|
7343
7347
|
}
|
|
7344
7348
|
};
|
|
7345
|
-
function
|
|
7349
|
+
function _t({ contact: t, sizeMeta: a, isSelected: s, onClick: i }) {
|
|
7346
7350
|
return /* @__PURE__ */ n(
|
|
7347
7351
|
"div",
|
|
7348
7352
|
{
|
|
@@ -7354,7 +7358,7 @@ function Vt({ contact: t, sizeMeta: a, isSelected: s, onClick: i }) {
|
|
|
7354
7358
|
/* @__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 }),
|
|
7355
7359
|
/* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
|
|
7356
7360
|
/* @__PURE__ */ n("div", { className: `flex items-center gap-1.5 ${a.details} text-zinc-600 dark:text-zinc-400`, children: [
|
|
7357
|
-
/* @__PURE__ */ e(
|
|
7361
|
+
/* @__PURE__ */ e(ra, { className: "h-3 w-3" }),
|
|
7358
7362
|
t.phone
|
|
7359
7363
|
] }),
|
|
7360
7364
|
/* @__PURE__ */ e("div", { className: `${a.department} text-zinc-500 dark:text-zinc-500 line-clamp-1`, children: t.department })
|
|
@@ -7365,7 +7369,7 @@ function Vt({ contact: t, sizeMeta: a, isSelected: s, onClick: i }) {
|
|
|
7365
7369
|
}
|
|
7366
7370
|
);
|
|
7367
7371
|
}
|
|
7368
|
-
function
|
|
7372
|
+
function Ks({ contact: t, sizeMeta: a }) {
|
|
7369
7373
|
return t ? /* @__PURE__ */ n("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 p-6 h-full", children: [
|
|
7370
7374
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-4 mb-6", children: [
|
|
7371
7375
|
/* @__PURE__ */ e("div", { className: `${a.avatarSize} flex items-center justify-center bg-gradient-to-br from-blue-500 to-blue-600 rounded-full text-white font-semibold ${a.avatarText} shadow-sm`, children: t.initials }),
|
|
@@ -7379,14 +7383,14 @@ function Zs({ contact: t, sizeMeta: a }) {
|
|
|
7379
7383
|
/* @__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" }),
|
|
7380
7384
|
/* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
7381
7385
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
7382
|
-
/* @__PURE__ */ e(
|
|
7386
|
+
/* @__PURE__ */ e(ra, { className: "h-4 w-4 text-zinc-500 dark:text-zinc-400 flex-shrink-0" }),
|
|
7383
7387
|
/* @__PURE__ */ n("div", { children: [
|
|
7384
7388
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-600 dark:text-zinc-400 font-medium`, children: "Phone Number" }),
|
|
7385
7389
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-900 dark:text-zinc-100`, children: t.phone })
|
|
7386
7390
|
] })
|
|
7387
7391
|
] }),
|
|
7388
7392
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
7389
|
-
/* @__PURE__ */ e(
|
|
7393
|
+
/* @__PURE__ */ e(Ir, { className: "h-4 w-4 text-zinc-500 dark:text-zinc-400 flex-shrink-0" }),
|
|
7390
7394
|
/* @__PURE__ */ n("div", { children: [
|
|
7391
7395
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-600 dark:text-zinc-400 font-medium`, children: "Email Address" }),
|
|
7392
7396
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-900 dark:text-zinc-100`, children: t.email })
|
|
@@ -7405,7 +7409,7 @@ function Zs({ contact: t, sizeMeta: a }) {
|
|
|
7405
7409
|
] })
|
|
7406
7410
|
] }),
|
|
7407
7411
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
7408
|
-
/* @__PURE__ */ e(
|
|
7412
|
+
/* @__PURE__ */ e(aa, { className: "h-4 w-4 text-zinc-500 dark:text-zinc-400 flex-shrink-0" }),
|
|
7409
7413
|
/* @__PURE__ */ n("div", { children: [
|
|
7410
7414
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-600 dark:text-zinc-400 font-medium`, children: "Campus" }),
|
|
7411
7415
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-900 dark:text-zinc-100`, children: t.campus })
|
|
@@ -7419,7 +7423,7 @@ function Zs({ contact: t, sizeMeta: a }) {
|
|
|
7419
7423
|
/* @__PURE__ */ e("p", { className: "text-sm", children: "Select a contact to view details" })
|
|
7420
7424
|
] }) });
|
|
7421
7425
|
}
|
|
7422
|
-
function
|
|
7426
|
+
function el({ sizeMeta: t }) {
|
|
7423
7427
|
return /* @__PURE__ */ n("div", { className: `relative ${t.searchHeight} mb-4`, children: [
|
|
7424
7428
|
/* @__PURE__ */ e(vt, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-zinc-400" }),
|
|
7425
7429
|
/* @__PURE__ */ e(
|
|
@@ -7432,7 +7436,7 @@ function Ks({ sizeMeta: t }) {
|
|
|
7432
7436
|
)
|
|
7433
7437
|
] });
|
|
7434
7438
|
}
|
|
7435
|
-
function
|
|
7439
|
+
function tl({
|
|
7436
7440
|
size: t = "md",
|
|
7437
7441
|
showCheckbox: a = !1,
|
|
7438
7442
|
checkboxPosition: s = "top-left",
|
|
@@ -7443,7 +7447,7 @@ function el({
|
|
|
7443
7447
|
selectedIndex: u = 0,
|
|
7444
7448
|
...p
|
|
7445
7449
|
}) {
|
|
7446
|
-
const [b, f] = L(u), r = oe(t), w = ce[r], d =
|
|
7450
|
+
const [b, f] = L(u), r = oe(t), w = ce[r], d = Zs[r], h = (A, E) => {
|
|
7447
7451
|
f(E), i?.(A);
|
|
7448
7452
|
}, z = o[b] || o[0], $ = d.layout === "split";
|
|
7449
7453
|
return /* @__PURE__ */ n(
|
|
@@ -7458,20 +7462,20 @@ function el({
|
|
|
7458
7462
|
...p,
|
|
7459
7463
|
children: [
|
|
7460
7464
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between mb-4", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${w.title}`, children: m }) }),
|
|
7461
|
-
/* @__PURE__ */ e(
|
|
7465
|
+
/* @__PURE__ */ e(el, { sizeMeta: d }),
|
|
7462
7466
|
$ ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
|
|
7463
7467
|
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((A, E) => /* @__PURE__ */ e(
|
|
7464
|
-
|
|
7468
|
+
_t,
|
|
7465
7469
|
{
|
|
7466
7470
|
contact: A,
|
|
7467
7471
|
sizeMeta: d,
|
|
7468
7472
|
isSelected: E === b,
|
|
7469
|
-
onClick: (
|
|
7473
|
+
onClick: (I) => h(I, E)
|
|
7470
7474
|
},
|
|
7471
7475
|
A._id || A.id || E
|
|
7472
7476
|
)) }),
|
|
7473
7477
|
/* @__PURE__ */ e(
|
|
7474
|
-
|
|
7478
|
+
Ks,
|
|
7475
7479
|
{
|
|
7476
7480
|
contact: z,
|
|
7477
7481
|
sizeMeta: d
|
|
@@ -7480,12 +7484,12 @@ function el({
|
|
|
7480
7484
|
] }) : (
|
|
7481
7485
|
// Single column layout for small screens
|
|
7482
7486
|
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((A, E) => /* @__PURE__ */ e(
|
|
7483
|
-
|
|
7487
|
+
_t,
|
|
7484
7488
|
{
|
|
7485
7489
|
contact: A,
|
|
7486
7490
|
sizeMeta: d,
|
|
7487
7491
|
isSelected: E === b,
|
|
7488
|
-
onClick: (
|
|
7492
|
+
onClick: (I) => h(I, E)
|
|
7489
7493
|
},
|
|
7490
7494
|
A._id || A.id || E
|
|
7491
7495
|
)) })
|
|
@@ -7495,7 +7499,7 @@ function el({
|
|
|
7495
7499
|
}
|
|
7496
7500
|
);
|
|
7497
7501
|
}
|
|
7498
|
-
|
|
7502
|
+
tl.propTypes = {
|
|
7499
7503
|
size: c.string,
|
|
7500
7504
|
showCheckbox: c.bool,
|
|
7501
7505
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -7517,7 +7521,7 @@ el.propTypes = {
|
|
|
7517
7521
|
selectedIndex: c.number
|
|
7518
7522
|
};
|
|
7519
7523
|
const $e = (t) => new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" }).format(Number(t || 0));
|
|
7520
|
-
function
|
|
7524
|
+
function al({ side: t = "left", date: a, title: s, amount: i, kind: l = "payment" }) {
|
|
7521
7525
|
return /* @__PURE__ */ n("div", { className: `rounded-xl border border-zinc-200 dark:border-zinc-800 p-3 ${l === "payment" ? "border-l-4 border-green-500" : "border-l-4 border-rose-500"}`, children: [
|
|
7522
7526
|
/* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: a }),
|
|
7523
7527
|
/* @__PURE__ */ e("div", { className: "mt-1 text-sm text-zinc-700 dark:text-zinc-200", children: s }),
|
|
@@ -7533,7 +7537,7 @@ function tl({ side: t = "left", date: a, title: s, amount: i, kind: l = "payment
|
|
|
7533
7537
|
] })
|
|
7534
7538
|
] });
|
|
7535
7539
|
}
|
|
7536
|
-
const
|
|
7540
|
+
const rl = {
|
|
7537
7541
|
sm: {
|
|
7538
7542
|
// was: "max-w-md w-full md:w-auto flex-none justify-self-start"
|
|
7539
7543
|
wrap: "max-w-md w-auto inline-block align-top flex-none justify-self-start",
|
|
@@ -7565,7 +7569,7 @@ const al = {
|
|
|
7565
7569
|
buttonPad: "py-3.5"
|
|
7566
7570
|
}
|
|
7567
7571
|
};
|
|
7568
|
-
function
|
|
7572
|
+
function nl({
|
|
7569
7573
|
size: t = "md",
|
|
7570
7574
|
showCheckbox: a = !1,
|
|
7571
7575
|
checkboxPosition: s = "top-left",
|
|
@@ -7595,7 +7599,7 @@ function rl({
|
|
|
7595
7599
|
],
|
|
7596
7600
|
...r
|
|
7597
7601
|
}) {
|
|
7598
|
-
const w = oe(t), d = ce[w], h =
|
|
7602
|
+
const w = oe(t), d = ce[w], h = rl[w];
|
|
7599
7603
|
return /* @__PURE__ */ n(
|
|
7600
7604
|
ie,
|
|
7601
7605
|
{
|
|
@@ -7641,7 +7645,7 @@ function rl({
|
|
|
7641
7645
|
] })
|
|
7642
7646
|
] }),
|
|
7643
7647
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: f.slice(0, 2).map((z, $) => /* @__PURE__ */ e(
|
|
7644
|
-
|
|
7648
|
+
al,
|
|
7645
7649
|
{
|
|
7646
7650
|
side: $ === 0 ? "left" : "right",
|
|
7647
7651
|
date: z.date,
|
|
@@ -7670,7 +7674,7 @@ function rl({
|
|
|
7670
7674
|
}
|
|
7671
7675
|
);
|
|
7672
7676
|
}
|
|
7673
|
-
|
|
7677
|
+
nl.propTypes = {
|
|
7674
7678
|
size: c.string,
|
|
7675
7679
|
showCheckbox: c.bool,
|
|
7676
7680
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -7691,7 +7695,7 @@ rl.propTypes = {
|
|
|
7691
7695
|
})
|
|
7692
7696
|
)
|
|
7693
7697
|
};
|
|
7694
|
-
const
|
|
7698
|
+
const sl = {
|
|
7695
7699
|
sm: {
|
|
7696
7700
|
wrap: "max-w-xs w-full",
|
|
7697
7701
|
title: "text-base font-semibold",
|
|
@@ -7746,7 +7750,7 @@ const nl = {
|
|
|
7746
7750
|
]
|
|
7747
7751
|
}
|
|
7748
7752
|
];
|
|
7749
|
-
function
|
|
7753
|
+
function Ut({ leave: t, sizeMeta: a }) {
|
|
7750
7754
|
return /* @__PURE__ */ n("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 overflow-hidden", children: [
|
|
7751
7755
|
/* @__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: [
|
|
7752
7756
|
/* @__PURE__ */ e("span", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${a.table}`, children: t.name }),
|
|
@@ -7758,7 +7762,7 @@ function _t({ leave: t, sizeMeta: a }) {
|
|
|
7758
7762
|
] }, i)) })
|
|
7759
7763
|
] });
|
|
7760
7764
|
}
|
|
7761
|
-
function
|
|
7765
|
+
function ll({
|
|
7762
7766
|
size: t = "md",
|
|
7763
7767
|
showCheckbox: a = !1,
|
|
7764
7768
|
checkboxPosition: s = "top-left",
|
|
@@ -7768,7 +7772,7 @@ function sl({
|
|
|
7768
7772
|
term: o = "Fall 2025",
|
|
7769
7773
|
...u
|
|
7770
7774
|
}) {
|
|
7771
|
-
const [p, b] = L("vacation"), [f, r] = L(!1), w = oe(t), d = ce[w], h =
|
|
7775
|
+
const [p, b] = L("vacation"), [f, r] = L(!1), w = oe(t), d = ce[w], h = sl[w], z = We.find(($) => $.id === p) || We[0];
|
|
7772
7776
|
return /* @__PURE__ */ n(
|
|
7773
7777
|
ie,
|
|
7774
7778
|
{
|
|
@@ -7795,7 +7799,7 @@ function sl({
|
|
|
7795
7799
|
{
|
|
7796
7800
|
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",
|
|
7797
7801
|
onClick: () => r(!f),
|
|
7798
|
-
children: /* @__PURE__ */ e(
|
|
7802
|
+
children: /* @__PURE__ */ e(na, { className: "h-4 w-4" })
|
|
7799
7803
|
}
|
|
7800
7804
|
),
|
|
7801
7805
|
f && /* @__PURE__ */ n("div", { className: "absolute right-0 top-full mt-1 w-48 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md shadow-lg z-10 py-1", children: [
|
|
@@ -7815,10 +7819,10 @@ function sl({
|
|
|
7815
7819
|
)) }),
|
|
7816
7820
|
/* @__PURE__ */ e("div", { className: "space-y-4 mb-6", children: h.showAllLeave ? (
|
|
7817
7821
|
// LG: Show all leave types
|
|
7818
|
-
We.map(($) => /* @__PURE__ */ e(
|
|
7822
|
+
We.map(($) => /* @__PURE__ */ e(Ut, { leave: $, sizeMeta: h }, $.id))
|
|
7819
7823
|
) : h.showSingleLeave ? (
|
|
7820
7824
|
// MD: Show active tab leave type
|
|
7821
|
-
/* @__PURE__ */ e(
|
|
7825
|
+
/* @__PURE__ */ e(Ut, { leave: z, sizeMeta: h })
|
|
7822
7826
|
) : (
|
|
7823
7827
|
// SM: Show only available hours
|
|
7824
7828
|
/* @__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: [
|
|
@@ -7834,7 +7838,7 @@ function sl({
|
|
|
7834
7838
|
}
|
|
7835
7839
|
);
|
|
7836
7840
|
}
|
|
7837
|
-
|
|
7841
|
+
ll.propTypes = {
|
|
7838
7842
|
size: c.string,
|
|
7839
7843
|
showCheckbox: c.bool,
|
|
7840
7844
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -7843,7 +7847,7 @@ sl.propTypes = {
|
|
|
7843
7847
|
title: c.string,
|
|
7844
7848
|
term: c.string
|
|
7845
7849
|
};
|
|
7846
|
-
const
|
|
7850
|
+
const il = [
|
|
7847
7851
|
{
|
|
7848
7852
|
id: "admin-files",
|
|
7849
7853
|
name: "Admin Files",
|
|
@@ -7876,7 +7880,7 @@ const ll = [
|
|
|
7876
7880
|
// icon: Video,
|
|
7877
7881
|
// color: "text-purple-500"
|
|
7878
7882
|
// }
|
|
7879
|
-
],
|
|
7883
|
+
], ol = [
|
|
7880
7884
|
{
|
|
7881
7885
|
id: "file-1",
|
|
7882
7886
|
name: "2024 - Taurus",
|
|
@@ -7909,7 +7913,7 @@ const ll = [
|
|
|
7909
7913
|
icon: pt,
|
|
7910
7914
|
color: "text-orange-500"
|
|
7911
7915
|
}
|
|
7912
|
-
],
|
|
7916
|
+
], cl = {
|
|
7913
7917
|
sm: {
|
|
7914
7918
|
wrap: "max-w-xs w-full",
|
|
7915
7919
|
title: "text-base font-semibold",
|
|
@@ -7938,7 +7942,7 @@ const ll = [
|
|
|
7938
7942
|
gridCols: "grid-cols-2"
|
|
7939
7943
|
}
|
|
7940
7944
|
};
|
|
7941
|
-
function
|
|
7945
|
+
function qt({ item: t, sizeMeta: a, showDate: s = !1 }) {
|
|
7942
7946
|
const i = t.icon;
|
|
7943
7947
|
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: [
|
|
7944
7948
|
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(i, { className: `h-6 w-6 ${t.color}` }) }),
|
|
@@ -7949,7 +7953,7 @@ function Ut({ item: t, sizeMeta: a, showDate: s = !1 }) {
|
|
|
7949
7953
|
/* @__PURE__ */ e(ve, { className: "h-4 w-4 text-zinc-400 group-hover:text-zinc-600 dark:group-hover:text-zinc-300 transition-colors duration-200" })
|
|
7950
7954
|
] });
|
|
7951
7955
|
}
|
|
7952
|
-
function
|
|
7956
|
+
function dl({
|
|
7953
7957
|
size: t = "md",
|
|
7954
7958
|
showCheckbox: a = !1,
|
|
7955
7959
|
checkboxPosition: s = "top-left",
|
|
@@ -7959,7 +7963,7 @@ function cl({
|
|
|
7959
7963
|
subtitle: o = "Drive Shared",
|
|
7960
7964
|
...u
|
|
7961
7965
|
}) {
|
|
7962
|
-
const [p, b] = L(!1), f = oe(t), r = ce[f], w =
|
|
7966
|
+
const [p, b] = L(!1), f = oe(t), r = ce[f], w = cl[f];
|
|
7963
7967
|
return /* @__PURE__ */ n(
|
|
7964
7968
|
ie,
|
|
7965
7969
|
{
|
|
@@ -7987,18 +7991,18 @@ function cl({
|
|
|
7987
7991
|
),
|
|
7988
7992
|
p && /* @__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: [
|
|
7989
7993
|
/* @__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: [
|
|
7990
|
-
/* @__PURE__ */ e(
|
|
7994
|
+
/* @__PURE__ */ e(na, { className: "h-4 w-4" }),
|
|
7991
7995
|
"Download All"
|
|
7992
7996
|
] }),
|
|
7993
7997
|
/* @__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: [
|
|
7994
|
-
/* @__PURE__ */ e(
|
|
7998
|
+
/* @__PURE__ */ e(Pr, { className: "h-4 w-4" }),
|
|
7995
7999
|
"Share Drive"
|
|
7996
8000
|
] })
|
|
7997
8001
|
] })
|
|
7998
8002
|
] })
|
|
7999
8003
|
] }),
|
|
8000
|
-
/* @__PURE__ */ e("div", { className: `grid ${w.gridCols} gap-3 `, children:
|
|
8001
|
-
|
|
8004
|
+
/* @__PURE__ */ e("div", { className: `grid ${w.gridCols} gap-3 `, children: il.map((d) => /* @__PURE__ */ e(
|
|
8005
|
+
qt,
|
|
8002
8006
|
{
|
|
8003
8007
|
item: d,
|
|
8004
8008
|
sizeMeta: w
|
|
@@ -8007,8 +8011,8 @@ function cl({
|
|
|
8007
8011
|
)) }),
|
|
8008
8012
|
w.showRecent && /* @__PURE__ */ n("div", { className: "", children: [
|
|
8009
8013
|
/* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${w.item}`, children: "Recent Files" }),
|
|
8010
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children:
|
|
8011
|
-
|
|
8014
|
+
/* @__PURE__ */ e("div", { className: "space-y-2", children: ol.map((d) => /* @__PURE__ */ e(
|
|
8015
|
+
qt,
|
|
8012
8016
|
{
|
|
8013
8017
|
item: d,
|
|
8014
8018
|
sizeMeta: w,
|
|
@@ -8025,7 +8029,7 @@ function cl({
|
|
|
8025
8029
|
}
|
|
8026
8030
|
);
|
|
8027
8031
|
}
|
|
8028
|
-
|
|
8032
|
+
dl.propTypes = {
|
|
8029
8033
|
size: c.string,
|
|
8030
8034
|
showCheckbox: c.bool,
|
|
8031
8035
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -8034,7 +8038,7 @@ cl.propTypes = {
|
|
|
8034
8038
|
title: c.string,
|
|
8035
8039
|
subtitle: c.string
|
|
8036
8040
|
};
|
|
8037
|
-
const
|
|
8041
|
+
const ml = [
|
|
8038
8042
|
{
|
|
8039
8043
|
id: "alert-1",
|
|
8040
8044
|
type: "warning",
|
|
@@ -8071,7 +8075,7 @@ const dl = [
|
|
|
8071
8075
|
// read: true,
|
|
8072
8076
|
// priority: "medium"
|
|
8073
8077
|
// }
|
|
8074
|
-
],
|
|
8078
|
+
], ul = {
|
|
8075
8079
|
sm: {
|
|
8076
8080
|
wrap: "max-w-sm w-full",
|
|
8077
8081
|
title: "text-sm font-semibold",
|
|
@@ -8103,22 +8107,22 @@ const dl = [
|
|
|
8103
8107
|
maxMessageWords: 25,
|
|
8104
8108
|
showMessage: !0
|
|
8105
8109
|
}
|
|
8106
|
-
},
|
|
8110
|
+
}, Gt = (t, a) => {
|
|
8107
8111
|
if (!a || a === 0) return t;
|
|
8108
8112
|
const s = t.split(" ");
|
|
8109
8113
|
return s.length <= a ? t : s.slice(0, a).join(" ") + "...";
|
|
8110
|
-
},
|
|
8114
|
+
}, hl = (t) => {
|
|
8111
8115
|
switch (t) {
|
|
8112
8116
|
case "warning":
|
|
8113
|
-
return Wt;
|
|
8114
|
-
case "success":
|
|
8115
8117
|
return Jt;
|
|
8118
|
+
case "success":
|
|
8119
|
+
return Xt;
|
|
8116
8120
|
case "banner":
|
|
8117
|
-
return
|
|
8121
|
+
return sa;
|
|
8118
8122
|
default:
|
|
8119
|
-
return
|
|
8123
|
+
return Wt;
|
|
8120
8124
|
}
|
|
8121
|
-
},
|
|
8125
|
+
}, Ra = (t) => {
|
|
8122
8126
|
switch (t) {
|
|
8123
8127
|
case "warning":
|
|
8124
8128
|
return {
|
|
@@ -8150,8 +8154,8 @@ const dl = [
|
|
|
8150
8154
|
};
|
|
8151
8155
|
}
|
|
8152
8156
|
};
|
|
8153
|
-
function
|
|
8154
|
-
const [l, m] = L(!1), o =
|
|
8157
|
+
function pl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
|
|
8158
|
+
const [l, m] = L(!1), o = Ra(t.type), u = hl(t.type);
|
|
8155
8159
|
return l ? null : /* @__PURE__ */ n("div", { className: `relative rounded-lg border-l-4 p-4 transition-all duration-200 ${o.bg} ${o.border} ${t.read ? "border-l-2 opacity-80" : "border-l-4"}`, style: { borderLeftColor: o.accent }, children: [
|
|
8156
8160
|
/* @__PURE__ */ e(
|
|
8157
8161
|
"button",
|
|
@@ -8163,8 +8167,8 @@ function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
|
|
|
8163
8167
|
/* @__PURE__ */ n("div", { className: "flex gap-3 pr-6", children: [
|
|
8164
8168
|
/* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(u, { className: `h-4 w-4 ${o.icon}` }) }),
|
|
8165
8169
|
/* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
|
|
8166
|
-
/* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-1 ${t.read ? "font-medium" : "font-semibold"}`, children:
|
|
8167
|
-
a.showMessage && t.message && /* @__PURE__ */ e("div", { className: `${a.message} text-zinc-600 dark:text-zinc-400 mb-2 leading-relaxed`, children:
|
|
8170
|
+
/* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-1 ${t.read ? "font-medium" : "font-semibold"}`, children: Gt(t.title, a.maxTitleWords) }),
|
|
8171
|
+
a.showMessage && t.message && /* @__PURE__ */ e("div", { className: `${a.message} text-zinc-600 dark:text-zinc-400 mb-2 leading-relaxed`, children: Gt(t.message, a.maxMessageWords) }),
|
|
8168
8172
|
/* @__PURE__ */ n("div", { className: `flex items-center gap-1 ${a.time} text-zinc-500 dark:text-zinc-400`, children: [
|
|
8169
8173
|
/* @__PURE__ */ e(Fe, { className: "h-3 w-3" }),
|
|
8170
8174
|
t.time
|
|
@@ -8174,12 +8178,12 @@ function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
|
|
|
8174
8178
|
!t.read && /* @__PURE__ */ e("div", { className: "absolute top-3 left-0 w-1 h-1 rounded-full bg-blue-500 transform -translate-x-1/2" })
|
|
8175
8179
|
] });
|
|
8176
8180
|
}
|
|
8177
|
-
function
|
|
8178
|
-
const [s, i] = L(!1), l =
|
|
8181
|
+
function gl({ alert: t, onDismiss: a }) {
|
|
8182
|
+
const [s, i] = L(!1), l = Ra("banner"), m = () => {
|
|
8179
8183
|
i(!0), a?.(t);
|
|
8180
8184
|
};
|
|
8181
8185
|
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: [
|
|
8182
|
-
/* @__PURE__ */ e(
|
|
8186
|
+
/* @__PURE__ */ e(sa, { className: `h-5 w-5 mt-0.5 ${l.icon}` }),
|
|
8183
8187
|
/* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
|
|
8184
8188
|
/* @__PURE__ */ e("div", { className: "font-semibold text-zinc-900 dark:text-zinc-100 text-sm mb-1", children: t.title }),
|
|
8185
8189
|
/* @__PURE__ */ e("div", { className: "text-zinc-600 dark:text-zinc-400 text-xs leading-relaxed", children: t.message })
|
|
@@ -8194,19 +8198,19 @@ function pl({ alert: t, onDismiss: a }) {
|
|
|
8194
8198
|
)
|
|
8195
8199
|
] }) });
|
|
8196
8200
|
}
|
|
8197
|
-
function
|
|
8201
|
+
function bl({
|
|
8198
8202
|
size: t = "md",
|
|
8199
8203
|
showCheckbox: a = !1,
|
|
8200
8204
|
checkboxPosition: s = "top-left",
|
|
8201
8205
|
onSelect: i,
|
|
8202
8206
|
identity: l = "_id",
|
|
8203
8207
|
title: m = "Alerts",
|
|
8204
|
-
alerts: o =
|
|
8208
|
+
alerts: o = ml,
|
|
8205
8209
|
showBanner: u = !0,
|
|
8206
8210
|
...p
|
|
8207
8211
|
}) {
|
|
8208
|
-
const [b, f] = L(o), r = oe(t), w = ce[r], d =
|
|
8209
|
-
f((E) => E.filter((
|
|
8212
|
+
const [b, f] = L(o), r = oe(t), w = ce[r], d = ul[r], h = (A) => {
|
|
8213
|
+
f((E) => E.filter((I) => I.id !== A.id));
|
|
8210
8214
|
}, z = b.find((A) => A.type === "banner"), $ = b.filter((A) => A.type !== "banner");
|
|
8211
8215
|
return /* @__PURE__ */ n(
|
|
8212
8216
|
ie,
|
|
@@ -8221,14 +8225,14 @@ function gl({
|
|
|
8221
8225
|
children: [
|
|
8222
8226
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${w.title}`, children: m }) }),
|
|
8223
8227
|
u && z && t !== "sm" && /* @__PURE__ */ e(
|
|
8224
|
-
|
|
8228
|
+
gl,
|
|
8225
8229
|
{
|
|
8226
8230
|
alert: z,
|
|
8227
8231
|
onDismiss: h
|
|
8228
8232
|
}
|
|
8229
8233
|
),
|
|
8230
8234
|
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: $.slice(0, 3).map((A) => /* @__PURE__ */ e(
|
|
8231
|
-
|
|
8235
|
+
pl,
|
|
8232
8236
|
{
|
|
8233
8237
|
alert: A,
|
|
8234
8238
|
sizeMeta: d,
|
|
@@ -8241,7 +8245,7 @@ function gl({
|
|
|
8241
8245
|
}
|
|
8242
8246
|
);
|
|
8243
8247
|
}
|
|
8244
|
-
|
|
8248
|
+
bl.propTypes = {
|
|
8245
8249
|
size: c.string,
|
|
8246
8250
|
showCheckbox: c.bool,
|
|
8247
8251
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -8261,7 +8265,7 @@ gl.propTypes = {
|
|
|
8261
8265
|
),
|
|
8262
8266
|
showBanner: c.bool
|
|
8263
8267
|
};
|
|
8264
|
-
const
|
|
8268
|
+
const fl = [
|
|
8265
8269
|
{
|
|
8266
8270
|
id: "video-1",
|
|
8267
8271
|
title: "ALMA MATER",
|
|
@@ -8306,7 +8310,7 @@ const bl = [
|
|
|
8306
8310
|
// duration: "2:10",
|
|
8307
8311
|
// category: "Campus Life"
|
|
8308
8312
|
// }
|
|
8309
|
-
],
|
|
8313
|
+
], xl = {
|
|
8310
8314
|
sm: {
|
|
8311
8315
|
wrap: "max-w-sm w-full",
|
|
8312
8316
|
title: "text-sm font-bold",
|
|
@@ -8338,7 +8342,7 @@ const bl = [
|
|
|
8338
8342
|
maxTitleLines: 3
|
|
8339
8343
|
}
|
|
8340
8344
|
};
|
|
8341
|
-
function
|
|
8345
|
+
function yl({ video: t, sizeMeta: a }) {
|
|
8342
8346
|
const [s, i] = L(!1);
|
|
8343
8347
|
return /* @__PURE__ */ n("div", { className: "group cursor-pointer", children: [
|
|
8344
8348
|
/* @__PURE__ */ n("div", { className: `relative ${a.thumbnailHeight} rounded-lg overflow-hidden bg-zinc-200 dark:bg-zinc-800`, children: [
|
|
@@ -8350,7 +8354,7 @@ function xl({ video: t, sizeMeta: a }) {
|
|
|
8350
8354
|
className: "w-full h-full object-cover transition-transform duration-300 group-hover:scale-105"
|
|
8351
8355
|
}
|
|
8352
8356
|
),
|
|
8353
|
-
/* @__PURE__ */ e("div", { className: "absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-12 h-12 bg-white/90 rounded-full flex items-center justify-center transform scale-90 group-hover:scale-100 transition-transform duration-300", children: /* @__PURE__ */ e(
|
|
8357
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-12 h-12 bg-white/90 rounded-full flex items-center justify-center transform scale-90 group-hover:scale-100 transition-transform duration-300", children: /* @__PURE__ */ e(Lr, { className: "h-5 w-5 text-zinc-900 ml-1" }) }) }),
|
|
8354
8358
|
/* @__PURE__ */ e("div", { className: "absolute bottom-2 right-2 bg-black/80 text-white text-xs px-1.5 py-1 rounded", children: t.duration }),
|
|
8355
8359
|
s && /* @__PURE__ */ n("div", { className: "absolute top-10 right-2 w-32 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md shadow-lg z-10 py-1", children: [
|
|
8356
8360
|
/* @__PURE__ */ e("button", { className: "w-full px-3 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left", children: "Save" }),
|
|
@@ -8371,17 +8375,17 @@ function xl({ video: t, sizeMeta: a }) {
|
|
|
8371
8375
|
] })
|
|
8372
8376
|
] });
|
|
8373
8377
|
}
|
|
8374
|
-
function
|
|
8378
|
+
function vl({
|
|
8375
8379
|
size: t = "md",
|
|
8376
8380
|
showCheckbox: a = !1,
|
|
8377
8381
|
checkboxPosition: s = "top-left",
|
|
8378
8382
|
onSelect: i,
|
|
8379
8383
|
identity: l = "_id",
|
|
8380
8384
|
title: m = "Videos",
|
|
8381
|
-
videos: o =
|
|
8385
|
+
videos: o = fl,
|
|
8382
8386
|
...u
|
|
8383
8387
|
}) {
|
|
8384
|
-
const [p, b] = L(!1), f = oe(t), r = ce[f], w =
|
|
8388
|
+
const [p, b] = L(!1), f = oe(t), r = ce[f], w = xl[f];
|
|
8385
8389
|
return /* @__PURE__ */ n(
|
|
8386
8390
|
ie,
|
|
8387
8391
|
{
|
|
@@ -8416,7 +8420,7 @@ function yl({
|
|
|
8416
8420
|
] })
|
|
8417
8421
|
] }),
|
|
8418
8422
|
/* @__PURE__ */ e("div", { className: `grid ${w.gridCols} gap-4 `, children: o.slice(0, w.gridCols === "grid-cols-3" ? 6 : 4).map((d) => /* @__PURE__ */ e(
|
|
8419
|
-
|
|
8423
|
+
yl,
|
|
8420
8424
|
{
|
|
8421
8425
|
video: d,
|
|
8422
8426
|
sizeMeta: w
|
|
@@ -8431,7 +8435,7 @@ function yl({
|
|
|
8431
8435
|
}
|
|
8432
8436
|
);
|
|
8433
8437
|
}
|
|
8434
|
-
|
|
8438
|
+
vl.propTypes = {
|
|
8435
8439
|
size: c.string,
|
|
8436
8440
|
showCheckbox: c.bool,
|
|
8437
8441
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -8450,81 +8454,82 @@ yl.propTypes = {
|
|
|
8450
8454
|
)
|
|
8451
8455
|
};
|
|
8452
8456
|
export {
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
+
nl as AccountSummaryMock,
|
|
8458
|
+
$s as ActivityMock,
|
|
8459
|
+
os as AddUserGroupsRolesModal,
|
|
8460
|
+
bl as AlertsMock,
|
|
8457
8461
|
ze as Avatar,
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8462
|
+
Sn as AvatarGroup,
|
|
8463
|
+
El as Badge,
|
|
8464
|
+
An as Breadcrumbs,
|
|
8465
|
+
Dn as Button,
|
|
8466
|
+
Vs as CampusMapMock,
|
|
8467
|
+
ma as Checkbox,
|
|
8468
|
+
Rs as CommunitiesMock,
|
|
8469
|
+
ei as CustomDataGrid,
|
|
8470
|
+
Wl as CustomDialog,
|
|
8471
|
+
Kl as CustomGridToolbar,
|
|
8472
|
+
Xl as CustomTab,
|
|
8473
|
+
ga as DatePicker,
|
|
8474
|
+
Fn as DateRangePicker,
|
|
8475
|
+
tl as DirectoryMock,
|
|
8476
|
+
dl as DriveMock,
|
|
8477
|
+
Ss as DynamicConfig,
|
|
8478
|
+
Ys as EventsMock,
|
|
8479
|
+
Rl as FileUploadModal,
|
|
8480
|
+
Ql as FullConfigPage,
|
|
8481
|
+
Ll as FullScreenLoader,
|
|
8482
|
+
Il as GenericFilter,
|
|
8483
|
+
jl as IconButton,
|
|
8480
8484
|
X as Input,
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
|
|
8485
|
+
ll as LeaveBalanceMock,
|
|
8486
|
+
Aa as ManageCollectionList,
|
|
8487
|
+
Pn as Modal,
|
|
8484
8488
|
nt as MultiSelect,
|
|
8485
|
-
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8489
|
+
Ps as NewsMock,
|
|
8490
|
+
Hs as O365MailsMock,
|
|
8491
|
+
_n as OptionsMenu,
|
|
8492
|
+
Vn as PageHeader,
|
|
8493
|
+
Vl as PageLayout,
|
|
8490
8494
|
Ol as Pagination,
|
|
8491
|
-
|
|
8495
|
+
ba as RadioGroup,
|
|
8492
8496
|
be as SearchBar,
|
|
8493
8497
|
ft as Select,
|
|
8494
8498
|
ie as SelectableCard,
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8499
|
+
Pl as Sidebar,
|
|
8500
|
+
xa as Spinner,
|
|
8501
|
+
ya as Textarea,
|
|
8502
|
+
Zl as ToastProvider,
|
|
8503
|
+
va as ToggleSwitch,
|
|
8504
|
+
Ml as Tooltip,
|
|
8505
|
+
Jl as TreeView,
|
|
8502
8506
|
ee as UnifyedCoreButton,
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8507
|
+
vl as VideosMock,
|
|
8508
|
+
Bl as WizardModal,
|
|
8509
|
+
za as adGroupsListSearchApi,
|
|
8506
8510
|
Qn as axiosDelete,
|
|
8507
8511
|
Ve as axiosGet,
|
|
8508
|
-
|
|
8512
|
+
Gl as axiosPatch,
|
|
8509
8513
|
_e as axiosPost,
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8514
|
+
Zn as axiosPut,
|
|
8515
|
+
Ul as cookies,
|
|
8516
|
+
Hn as createHttpClient,
|
|
8517
|
+
Yn as directoryPermissionsApi,
|
|
8518
|
+
Wn as filePermissionsApi,
|
|
8519
|
+
ka as gateWayUrl,
|
|
8516
8520
|
Se as gatewayBase,
|
|
8517
8521
|
rt as getBaseUrl,
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8522
|
+
ql as getSnapshot,
|
|
8523
|
+
Yl as http,
|
|
8524
|
+
Gn as localStore,
|
|
8521
8525
|
kt as myDriveGatewayBaseV2,
|
|
8522
8526
|
oe as normalizeSize,
|
|
8523
8527
|
De as notify,
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
+
Sa as provisioningBase,
|
|
8529
|
+
Da as rbacBase,
|
|
8530
|
+
$a as searchRolesApi,
|
|
8531
|
+
_l as sessionStore,
|
|
8528
8532
|
ce as sizeClasses,
|
|
8529
|
-
|
|
8533
|
+
Hl as toBrowserLocalTime,
|
|
8534
|
+
Ca as userSearchBase
|
|
8530
8535
|
};
|