unifyedx-storybook-new 0.2.83 → 0.2.85
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 +861 -861
- package/dist/unifyedx-storybook-new.es.js.br +0 -0
- package/dist/unifyedx-storybook-new.es.js.gz +0 -0
- package/dist/{vendor-DAjW_ynU.js → vendor-CU8ed0Ft.js} +2877 -2882
- package/dist/vendor-CU8ed0Ft.js.br +0 -0
- package/dist/vendor-CU8ed0Ft.js.gz +0 -0
- package/dist/{vendor-lodash-B0mISAV-.js → vendor-lodash-BV9sr8Va.js} +1 -1
- package/dist/vendor-lodash-BV9sr8Va.js.br +0 -0
- package/dist/vendor-lodash-BV9sr8Va.js.gz +0 -0
- package/package.json +1 -1
- package/dist/vendor-DAjW_ynU.js.br +0 -0
- package/dist/vendor-DAjW_ynU.js.gz +0 -0
- package/dist/vendor-lodash-B0mISAV-.js.br +0 -0
- package/dist/vendor-lodash-B0mISAV-.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
2
|
import ae, { useState as P, useMemo as ee, useId as He, Fragment as Z, useEffect as K, useCallback as H, useRef as he } from "react";
|
|
3
|
-
import { a as Q, U as ot, X as ve, P as d, L as Ra, C as xe, b as et, D as ct, f as kt, d as Yt, F as Ia, e as Oa, h as Ma, T as Le, u as Pa, I as Wt, i as Jt, j as La, k as Ba, l as Va, m as Xt, S as ft, n as Qt, M as ja, o as _a, p as yt, q as Ua, A as Ga, E as Ht, r as qa, s as Ya, t as Wa, v as Ja, w as Zt, x as Xa, y as Qa, z as Ha, B as Za, G as Ka, H as er, J as Be, K as Ct, N as zt, O as tr, Q as Kt, R as ar, V as xt, W as rr, Y as nr, Z as Ve, _ as sr, $ as lr, a0 as ir, a1 as or, a2 as cr, a3 as dr, a4 as St, a5 as mr, a6 as ur, a7 as hr, a8 as pr, a9 as gr, aa as br, ab as fr, ac as yr, ad as
|
|
4
|
-
import { Popover as
|
|
3
|
+
import { a as Q, U as ot, X as ve, P as d, L as Ra, C as xe, b as et, D as ct, f as kt, d as Yt, F as Ia, e as Oa, h as Ma, T as Le, u as Pa, I as Wt, i as Jt, j as La, k as Ba, l as Va, m as Xt, S as ft, n as Qt, M as ja, o as _a, p as yt, q as Ua, A as Ga, E as Ht, r as qa, s as Ya, t as Wa, v as Ja, w as Zt, x as Xa, y as Qa, z as Ha, B as Za, G as Ka, H as er, J as Be, K as Ct, N as zt, O as tr, Q as Kt, R as ar, V as xt, W as rr, Y as nr, Z as Ve, _ as sr, $ as lr, a0 as ir, a1 as or, a2 as cr, a3 as dr, a4 as St, a5 as mr, a6 as ur, a7 as hr, a8 as pr, a9 as gr, aa as br, ab as fr, ac as yr, ad as Ae, ae as ea, af as xr, ag as vr, ah as Nr, ai as wr, aj as kr, ak as ta, al as Cr, am as zr, an as aa, ao as Sr, ap as dt, aq as ra, ar as Dr } from "./vendor-CU8ed0Ft.js";
|
|
4
|
+
import { Popover as $r, PopoverButton as Tr, PopoverPanel as Ar, Transition as be, Dialog as ye, TransitionChild as ke, DialogPanel as Fe, DialogTitle as tt, TabGroup as Fr, TabList as Er, Tab as ne, TabPanels as Rr, RadioGroup as Ge, Listbox as le, ListboxButton as Ir, ListboxOptions as Or, ListboxOption as Mr, SwitchGroup as Pr, Switch as lt, Menu as Lr, MenuButton as Br, Portal as Vr, MenuItems as jr, MenuItem as _r, DialogBackdrop as Ur } from "@headlessui/react";
|
|
5
5
|
import { motion as ie, AnimatePresence as Se } from "framer-motion";
|
|
6
|
-
import { d as
|
|
7
|
-
import { useFloating as
|
|
8
|
-
import it, { debounce as
|
|
9
|
-
import { ToastContainer as
|
|
6
|
+
import { d as Gr } from "./vendor-lodash-BV9sr8Va.js";
|
|
7
|
+
import { useFloating as qr, offset as Yr, flip as Wr, shift as Jr, autoUpdate as Xr } from "@floating-ui/react";
|
|
8
|
+
import it, { debounce as Qr } from "lodash";
|
|
9
|
+
import { ToastContainer as Hr, Slide as Zr, toast as Oe } from "react-toastify";
|
|
10
10
|
import "react-toastify/dist/ReactToastify.css";
|
|
11
|
-
import { P as
|
|
12
|
-
const
|
|
11
|
+
import { P as Kr, S as en, a as tn, F as an, G as rn, b as nn, E as sn, c as ln, C as on, R as cn, d as dn, e as mn, f as un, g as hn, I as pn, h as Dt } from "./vendor-syncfusion-Ep1PWSou.js";
|
|
12
|
+
const gn = (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
|
+
}, bn = (t) => {
|
|
18
|
+
const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = gn(a), l = (i % 360 + 37 * s) % 360, h = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, p = 86 + (i >>> 24) % 8, g = `hsl(${l}, ${h}%, ${p}%)`, v = `hsl(${l}, ${h}%, ${o}%)`;
|
|
19
19
|
return { bg: g, text: v };
|
|
20
|
-
},
|
|
20
|
+
}, fn = (t = "") => t.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase(), we = ({
|
|
21
21
|
src: t,
|
|
22
22
|
name: a,
|
|
23
23
|
size: s = "medium",
|
|
@@ -29,7 +29,7 @@ const bn = (t) => {
|
|
|
29
29
|
className: h,
|
|
30
30
|
...o
|
|
31
31
|
}) => {
|
|
32
|
-
const [p, g] = P(!1), v = ee(() =>
|
|
32
|
+
const [p, g] = P(!1), v = ee(() => bn(a), []), x = t && !p, r = !x && a, N = !x && !a, m = Q(
|
|
33
33
|
"avatar-container",
|
|
34
34
|
`avatar--size-${s}`,
|
|
35
35
|
h
|
|
@@ -47,10 +47,10 @@ const bn = (t) => {
|
|
|
47
47
|
onError: () => g(!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: fn(a) }),
|
|
51
51
|
N && /* @__PURE__ */ e("span", { className: "avatar-icon", children: /* @__PURE__ */ e(ot, {}) })
|
|
52
52
|
] });
|
|
53
|
-
},
|
|
53
|
+
}, yn = ({ children: t, max: a = 4, truncatedMessage: s = "Members", ...i }) => {
|
|
54
54
|
const l = ae.Children.toArray(t), h = l.slice(0, a), o = l.length - a;
|
|
55
55
|
return /* @__PURE__ */ n("div", { className: "avatar-group-container", ...i, children: [
|
|
56
56
|
h,
|
|
@@ -61,7 +61,7 @@ const bn = (t) => {
|
|
|
61
61
|
s
|
|
62
62
|
] })
|
|
63
63
|
] });
|
|
64
|
-
},
|
|
64
|
+
}, zl = ({
|
|
65
65
|
label: t,
|
|
66
66
|
variant: a = "default",
|
|
67
67
|
// 'default', 'primary', 'success', 'warning', 'danger'
|
|
@@ -99,7 +99,7 @@ const bn = (t) => {
|
|
|
99
99
|
}
|
|
100
100
|
)
|
|
101
101
|
] });
|
|
102
|
-
},
|
|
102
|
+
}, xn = ({
|
|
103
103
|
primary: t = !1,
|
|
104
104
|
backgroundColor: a = null,
|
|
105
105
|
size: s = "medium",
|
|
@@ -118,7 +118,7 @@ const bn = (t) => {
|
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
120
|
};
|
|
121
|
-
|
|
121
|
+
xn.propTypes = {
|
|
122
122
|
/** Is this the principal call to action on the page? */
|
|
123
123
|
primary: d.bool,
|
|
124
124
|
/** What background color to use */
|
|
@@ -130,11 +130,11 @@ vn.propTypes = {
|
|
|
130
130
|
/** Optional click handler */
|
|
131
131
|
onClick: d.func
|
|
132
132
|
};
|
|
133
|
-
const
|
|
133
|
+
const vn = {
|
|
134
134
|
small: "btn-sm",
|
|
135
135
|
medium: "btn-md",
|
|
136
136
|
large: "btn-lg"
|
|
137
|
-
},
|
|
137
|
+
}, Nn = {
|
|
138
138
|
primary: "btn-primary",
|
|
139
139
|
secondary: "btn-secondary"
|
|
140
140
|
}, se = ({
|
|
@@ -157,13 +157,13 @@ const Nn = {
|
|
|
157
157
|
iconHeight: m,
|
|
158
158
|
iconColor: y,
|
|
159
159
|
strokeWidth: z,
|
|
160
|
-
onClick:
|
|
161
|
-
|
|
160
|
+
onClick: $,
|
|
161
|
+
...D
|
|
162
162
|
}) => {
|
|
163
|
-
const E = g || h, L = p && !x,
|
|
163
|
+
const E = g || h, L = p && !x, j = Q(
|
|
164
164
|
"btn-base",
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
vn[v],
|
|
166
|
+
Nn[o],
|
|
167
167
|
{
|
|
168
168
|
"is-loading": h,
|
|
169
169
|
"btn-icon-only": L
|
|
@@ -175,12 +175,12 @@ const Nn = {
|
|
|
175
175
|
{
|
|
176
176
|
"data-testid": t,
|
|
177
177
|
type: s,
|
|
178
|
-
className:
|
|
178
|
+
className: j,
|
|
179
179
|
disabled: E,
|
|
180
|
-
onClick:
|
|
180
|
+
onClick: $,
|
|
181
181
|
title: a || L && i || (typeof x == "string" ? x : void 0),
|
|
182
182
|
"aria-label": i || L && a || (typeof x == "string" ? x : void 0),
|
|
183
|
-
|
|
183
|
+
...D,
|
|
184
184
|
children: h ? /* @__PURE__ */ e(Ra, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(te, { children: [
|
|
185
185
|
p && /* @__PURE__ */ e(p, { size: v === "large" ? 20 : 16, width: N || 16, height: m || 16, color: y || "#767676", strokeWidth: z || 2 }),
|
|
186
186
|
x,
|
|
@@ -189,7 +189,7 @@ const Nn = {
|
|
|
189
189
|
] })
|
|
190
190
|
}
|
|
191
191
|
);
|
|
192
|
-
},
|
|
192
|
+
}, wn = ({ 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) => {
|
|
193
193
|
const l = i === t.length - 1;
|
|
194
194
|
return /* @__PURE__ */ n("li", { className: "breadcrumb-item", children: [
|
|
195
195
|
/* @__PURE__ */ n(
|
|
@@ -252,7 +252,7 @@ const Nn = {
|
|
|
252
252
|
] }),
|
|
253
253
|
s && /* @__PURE__ */ e("p", { className: "checkbox-error-message", children: s })
|
|
254
254
|
] });
|
|
255
|
-
},
|
|
255
|
+
}, kn = ({ children: t }) => /* @__PURE__ */ e($r, { className: "popover-container", children: t }), Cn = ({ children: t }) => /* @__PURE__ */ e(Tr, { as: "div", children: t }), zn = ({ children: t, className: a }) => /* @__PURE__ */ e(Ar, { className: `popover-panel ${a || ""}`, children: t }), na = ct, sa = ({
|
|
256
256
|
value: t,
|
|
257
257
|
onChange: a,
|
|
258
258
|
onClear: s,
|
|
@@ -280,7 +280,7 @@ const Nn = {
|
|
|
280
280
|
}
|
|
281
281
|
),
|
|
282
282
|
h && /* @__PURE__ */ e("p", { className: "datepicker-error-message", children: h })
|
|
283
|
-
] }),
|
|
283
|
+
] }), Sn = ({
|
|
284
284
|
value: t,
|
|
285
285
|
onChange: a,
|
|
286
286
|
onClear: s,
|
|
@@ -300,8 +300,8 @@ const Nn = {
|
|
|
300
300
|
] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: i });
|
|
301
301
|
return /* @__PURE__ */ n("div", { className: Q("datepicker-wrapper", p), children: [
|
|
302
302
|
l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "daterangepicker-input", children: l }),
|
|
303
|
-
/* @__PURE__ */ n(
|
|
304
|
-
/* @__PURE__ */ e(
|
|
303
|
+
/* @__PURE__ */ n(kn, { children: [
|
|
304
|
+
/* @__PURE__ */ e(Cn, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "datepicker-input-container", children: [
|
|
305
305
|
/* @__PURE__ */ n(
|
|
306
306
|
"button",
|
|
307
307
|
{
|
|
@@ -330,7 +330,7 @@ const Nn = {
|
|
|
330
330
|
}
|
|
331
331
|
)
|
|
332
332
|
] }) }),
|
|
333
|
-
/* @__PURE__ */ e(
|
|
333
|
+
/* @__PURE__ */ e(zn, { className: "datepicker-popover-content", align: "start", children: /* @__PURE__ */ e(
|
|
334
334
|
na,
|
|
335
335
|
{
|
|
336
336
|
asSingle: !0,
|
|
@@ -347,7 +347,7 @@ const Nn = {
|
|
|
347
347
|
] }),
|
|
348
348
|
h && /* @__PURE__ */ e("p", { className: "datepicker-error-message", children: h })
|
|
349
349
|
] });
|
|
350
|
-
},
|
|
350
|
+
}, Dn = {
|
|
351
351
|
// Documents
|
|
352
352
|
doc: {
|
|
353
353
|
type: "document",
|
|
@@ -563,7 +563,7 @@ const Nn = {
|
|
|
563
563
|
View: "view",
|
|
564
564
|
Manage: "edit"
|
|
565
565
|
}, Tt = ({ extension: t, size: a = 36 }) => {
|
|
566
|
-
const s = (t || "").toLowerCase(), i =
|
|
566
|
+
const s = (t || "").toLowerCase(), i = Dn[s];
|
|
567
567
|
return i ? /* @__PURE__ */ e("div", { style: { width: a }, className: "flex-shrink-0", children: /* @__PURE__ */ e(
|
|
568
568
|
Ia,
|
|
569
569
|
{
|
|
@@ -584,11 +584,11 @@ const Nn = {
|
|
|
584
584
|
children: /* @__PURE__ */ e(Oa, { className: "text-gray-400", size: a * 0.75 })
|
|
585
585
|
}
|
|
586
586
|
);
|
|
587
|
-
},
|
|
587
|
+
}, $n = (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) => {
|
|
588
588
|
if (!+t) return "0 Bytes";
|
|
589
589
|
const s = 1024, i = a < 0 ? 0 : a, l = ["Bytes", "KB", "MB", "GB", "TB"], h = Math.floor(Math.log(t) / Math.log(s));
|
|
590
590
|
return `${parseFloat((t / Math.pow(s, h)).toFixed(i))} ${l[h]}`;
|
|
591
|
-
},
|
|
591
|
+
}, Sl = ({
|
|
592
592
|
// --- Modal Control ---
|
|
593
593
|
isOpen: t,
|
|
594
594
|
onClose: a,
|
|
@@ -645,7 +645,7 @@ const Nn = {
|
|
|
645
645
|
Fe,
|
|
646
646
|
{
|
|
647
647
|
className: "dialog-panel",
|
|
648
|
-
onClick: (
|
|
648
|
+
onClick: ($) => $.stopPropagation(),
|
|
649
649
|
children: [
|
|
650
650
|
/* @__PURE__ */ e("input", { ...i() }),
|
|
651
651
|
/* @__PURE__ */ n("form", { onSubmit: x, className: "form-wrapper", children: [
|
|
@@ -688,7 +688,7 @@ const Nn = {
|
|
|
688
688
|
z && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
|
|
689
689
|
/* @__PURE__ */ e("h3", { children: "Upload Queue" }),
|
|
690
690
|
/* @__PURE__ */ n("ul", { className: "file-list", children: [
|
|
691
|
-
o.map((
|
|
691
|
+
o.map(($, D) => /* @__PURE__ */ n(
|
|
692
692
|
"li",
|
|
693
693
|
{
|
|
694
694
|
className: "file-item",
|
|
@@ -697,28 +697,28 @@ const Nn = {
|
|
|
697
697
|
/* @__PURE__ */ e(
|
|
698
698
|
Tt,
|
|
699
699
|
{
|
|
700
|
-
extension:
|
|
700
|
+
extension: $.name.split(".").pop()
|
|
701
701
|
}
|
|
702
702
|
),
|
|
703
703
|
/* @__PURE__ */ n("div", { children: [
|
|
704
|
-
/* @__PURE__ */ e("p", { className: "file-item-name", children:
|
|
705
|
-
/* @__PURE__ */ e("p", { className: "file-item-size", children: At(
|
|
704
|
+
/* @__PURE__ */ e("p", { className: "file-item-name", children: $.name }),
|
|
705
|
+
/* @__PURE__ */ e("p", { className: "file-item-size", children: At($.size) })
|
|
706
706
|
] })
|
|
707
707
|
] }),
|
|
708
708
|
/* @__PURE__ */ e(
|
|
709
709
|
"button",
|
|
710
710
|
{
|
|
711
711
|
type: "button",
|
|
712
|
-
onClick: () => g(
|
|
712
|
+
onClick: () => g(D),
|
|
713
713
|
className: "remove-file-button",
|
|
714
714
|
children: /* @__PURE__ */ e(Le, { size: 16 })
|
|
715
715
|
}
|
|
716
716
|
)
|
|
717
717
|
]
|
|
718
718
|
},
|
|
719
|
-
`${
|
|
719
|
+
`${$.name}-${D}`
|
|
720
720
|
)),
|
|
721
|
-
p.map(({ file:
|
|
721
|
+
p.map(({ file: $, message: D }, E) => /* @__PURE__ */ n(
|
|
722
722
|
"li",
|
|
723
723
|
{
|
|
724
724
|
className: "file-item file-item--rejected",
|
|
@@ -727,13 +727,13 @@ const Nn = {
|
|
|
727
727
|
/* @__PURE__ */ e(
|
|
728
728
|
Tt,
|
|
729
729
|
{
|
|
730
|
-
extension:
|
|
730
|
+
extension: $.name.split(".").pop()
|
|
731
731
|
}
|
|
732
732
|
),
|
|
733
733
|
/* @__PURE__ */ n("div", { children: [
|
|
734
|
-
/* @__PURE__ */ e("p", { className: "file-item-name", children:
|
|
735
|
-
/* @__PURE__ */ e("p", { className: "file-item-size", children: At(
|
|
736
|
-
/* @__PURE__ */ e("p", { className: "rejection-reason", children:
|
|
734
|
+
/* @__PURE__ */ e("p", { className: "file-item-name", children: $.name }),
|
|
735
|
+
/* @__PURE__ */ e("p", { className: "file-item-size", children: At($.size) }),
|
|
736
|
+
/* @__PURE__ */ e("p", { className: "rejection-reason", children: D })
|
|
737
737
|
] })
|
|
738
738
|
] }),
|
|
739
739
|
/* @__PURE__ */ e(
|
|
@@ -747,7 +747,7 @@ const Nn = {
|
|
|
747
747
|
)
|
|
748
748
|
]
|
|
749
749
|
},
|
|
750
|
-
`${
|
|
750
|
+
`${$.name}-${E}`
|
|
751
751
|
))
|
|
752
752
|
] })
|
|
753
753
|
] })
|
|
@@ -793,13 +793,13 @@ const Nn = {
|
|
|
793
793
|
}, ht = (t) => {
|
|
794
794
|
const a = new Date(t), s = a.getDay(), i = a.getDate() - s;
|
|
795
795
|
return je(new Date(a.setDate(i)));
|
|
796
|
-
},
|
|
796
|
+
}, Tn = (t) => _e(ut(ht(t), 6)), Ft = (t) => {
|
|
797
797
|
const a = new Date(t);
|
|
798
798
|
return je(new Date(a.getFullYear(), a.getMonth(), 1));
|
|
799
799
|
}, Et = (t) => {
|
|
800
800
|
const a = new Date(t);
|
|
801
801
|
return _e(new Date(a.getFullYear(), a.getMonth() + 1, 0));
|
|
802
|
-
},
|
|
802
|
+
}, An = (t) => {
|
|
803
803
|
const a = /* @__PURE__ */ new Date();
|
|
804
804
|
switch (t) {
|
|
805
805
|
case "anytime":
|
|
@@ -807,7 +807,7 @@ const Nn = {
|
|
|
807
807
|
case "today":
|
|
808
808
|
return [je(a), _e(a)];
|
|
809
809
|
case "this_week":
|
|
810
|
-
return [ht(a),
|
|
810
|
+
return [ht(a), Tn(a)];
|
|
811
811
|
case "last_week": {
|
|
812
812
|
const s = ut(ht(a), -7);
|
|
813
813
|
return [je(s), _e(ut(s, 6))];
|
|
@@ -821,7 +821,7 @@ const Nn = {
|
|
|
821
821
|
default:
|
|
822
822
|
return [null, null];
|
|
823
823
|
}
|
|
824
|
-
},
|
|
824
|
+
}, Dl = ({
|
|
825
825
|
isOpen: t,
|
|
826
826
|
onClose: a,
|
|
827
827
|
onApplyFilters: s,
|
|
@@ -842,16 +842,16 @@ const Nn = {
|
|
|
842
842
|
startDate: null
|
|
843
843
|
}), [y, z] = P({
|
|
844
844
|
endDate: null
|
|
845
|
-
}),
|
|
845
|
+
}), $ = Pa({
|
|
846
846
|
initialValues: JSON.parse(JSON.stringify(h)),
|
|
847
847
|
// Deep copy
|
|
848
|
-
onSubmit: (
|
|
848
|
+
onSubmit: (T) => {
|
|
849
849
|
const _ = {};
|
|
850
|
-
Object.keys(
|
|
851
|
-
_[
|
|
852
|
-
operator: A
|
|
853
|
-
values: Array.isArray(A
|
|
854
|
-
range: A
|
|
850
|
+
Object.keys(T).forEach((A) => {
|
|
851
|
+
_[A] = {
|
|
852
|
+
operator: T[A].operator || "in",
|
|
853
|
+
values: Array.isArray(T[A].values) ? T[A].values : [],
|
|
854
|
+
range: T[A].range || null
|
|
855
855
|
};
|
|
856
856
|
}), console.log("[storybook filter] Applied Filters:", _), typeof s == "function" && s({
|
|
857
857
|
filters: _,
|
|
@@ -859,47 +859,47 @@ const Nn = {
|
|
|
859
859
|
}), a();
|
|
860
860
|
},
|
|
861
861
|
enableReinitialize: !0
|
|
862
|
-
}),
|
|
863
|
-
const
|
|
864
|
-
let
|
|
862
|
+
}), D = ee(() => l.reduce((T, _) => {
|
|
863
|
+
const A = _.key, u = $.values[A];
|
|
864
|
+
let C = !1;
|
|
865
865
|
if (u)
|
|
866
866
|
switch (_.type) {
|
|
867
867
|
case "multiselect":
|
|
868
868
|
case "multiselect-users":
|
|
869
|
-
|
|
869
|
+
C = Array.isArray(u.values) && u.values.length > 0;
|
|
870
870
|
break;
|
|
871
871
|
case "date":
|
|
872
|
-
(u.range && u.range !== "" || Array.isArray(u.values) && u.values.length > 0) && (
|
|
872
|
+
(u.range && u.range !== "" || Array.isArray(u.values) && u.values.length > 0) && (C = !0);
|
|
873
873
|
break;
|
|
874
874
|
}
|
|
875
|
-
return A
|
|
876
|
-
}, {}), [l,
|
|
877
|
-
if (
|
|
878
|
-
const _ =
|
|
875
|
+
return T[A] = C, T;
|
|
876
|
+
}, {}), [l, $.values]), E = Object.values(D).filter(Boolean).length, L = ee(() => l.some((T) => {
|
|
877
|
+
if (T.type !== "date") return !1;
|
|
878
|
+
const _ = $.values?.[T.key]?.values;
|
|
879
879
|
if (!Array.isArray(_) || _.length < 2) return !1;
|
|
880
|
-
const [
|
|
881
|
-
if (!
|
|
882
|
-
const
|
|
883
|
-
return
|
|
884
|
-
}), [l,
|
|
880
|
+
const [A, u] = _;
|
|
881
|
+
if (!A || !u) return !1;
|
|
882
|
+
const C = A instanceof Date ? A : new Date(A), M = u instanceof Date ? u : new Date(u);
|
|
883
|
+
return C > M;
|
|
884
|
+
}), [l, $.values]), j = async (T, _) => {
|
|
885
885
|
try {
|
|
886
|
-
r((u) => ({ ...u, [
|
|
887
|
-
const
|
|
888
|
-
v((u) => ({ ...u, [
|
|
889
|
-
} catch (
|
|
890
|
-
console.error(`Error fetching ${
|
|
886
|
+
r((u) => ({ ...u, [T]: !0 }));
|
|
887
|
+
const A = await p(T, _);
|
|
888
|
+
v((u) => ({ ...u, [T]: A }));
|
|
889
|
+
} catch (A) {
|
|
890
|
+
console.error(`Error fetching ${T} users:`, A);
|
|
891
891
|
} finally {
|
|
892
|
-
r((
|
|
892
|
+
r((A) => ({ ...A, [T]: !1 }));
|
|
893
893
|
}
|
|
894
|
-
}, U = (
|
|
895
|
-
const _ = l[
|
|
896
|
-
l[
|
|
894
|
+
}, U = (T) => {
|
|
895
|
+
const _ = l[T].key, A = l[T].url;
|
|
896
|
+
l[T].type === "multiselect-users" && g[_].length === 0 && !x[_] && j(_, A);
|
|
897
897
|
}, Y = () => {
|
|
898
|
-
|
|
899
|
-
}, q = (
|
|
900
|
-
const _ = l.find((
|
|
898
|
+
$.resetForm(), v({ createdBy: [], updatedBy: [] }), i();
|
|
899
|
+
}, q = (T) => {
|
|
900
|
+
const _ = l.find((C) => C.key === T);
|
|
901
901
|
if (!_) return null;
|
|
902
|
-
const
|
|
902
|
+
const A = $.values[T] || h[T], u = Array.isArray(A.values) ? A.values : [];
|
|
903
903
|
switch (_.type) {
|
|
904
904
|
case "multiselect":
|
|
905
905
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
@@ -908,8 +908,8 @@ const Nn = {
|
|
|
908
908
|
/* @__PURE__ */ e(
|
|
909
909
|
"select",
|
|
910
910
|
{
|
|
911
|
-
value:
|
|
912
|
-
onChange: (F) =>
|
|
911
|
+
value: A.operator || "in",
|
|
912
|
+
onChange: (F) => $.setFieldValue(`${T}.operator`, F.target.value),
|
|
913
913
|
className: "filter-select",
|
|
914
914
|
children: _.operators.map((F) => /* @__PURE__ */ e("option", { value: F, children: F === "in" ? "Includes" : "Excludes" }, F))
|
|
915
915
|
}
|
|
@@ -921,19 +921,19 @@ const Nn = {
|
|
|
921
921
|
"input",
|
|
922
922
|
{
|
|
923
923
|
type: "checkbox",
|
|
924
|
-
id: `select-all-${
|
|
924
|
+
id: `select-all-${T}`,
|
|
925
925
|
className: "filter-checkbox-input",
|
|
926
926
|
checked: _.options.length > 0 && u.length === _.options.length,
|
|
927
927
|
onChange: (F) => {
|
|
928
928
|
const G = F.target.checked ? _.options.map((W) => W.value) : [];
|
|
929
|
-
|
|
929
|
+
$.setFieldValue(`${T}.values`, G);
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
),
|
|
933
933
|
/* @__PURE__ */ e(
|
|
934
934
|
"label",
|
|
935
935
|
{
|
|
936
|
-
htmlFor: `select-all-${
|
|
936
|
+
htmlFor: `select-all-${T}`,
|
|
937
937
|
className: "filter-checkbox-label",
|
|
938
938
|
children: "Select All"
|
|
939
939
|
}
|
|
@@ -944,19 +944,19 @@ const Nn = {
|
|
|
944
944
|
"input",
|
|
945
945
|
{
|
|
946
946
|
type: "checkbox",
|
|
947
|
-
id: `${
|
|
947
|
+
id: `${T}-${F.value}`,
|
|
948
948
|
className: "filter-checkbox-input",
|
|
949
949
|
checked: u.includes(F.value),
|
|
950
950
|
onChange: (G) => {
|
|
951
951
|
const W = G.target.checked ? [...u, F.value] : u.filter((pe) => pe !== F.value);
|
|
952
|
-
|
|
952
|
+
$.setFieldValue(`${T}.values`, W);
|
|
953
953
|
}
|
|
954
954
|
}
|
|
955
955
|
),
|
|
956
956
|
/* @__PURE__ */ e(
|
|
957
957
|
"label",
|
|
958
958
|
{
|
|
959
|
-
htmlFor: `${
|
|
959
|
+
htmlFor: `${T}-${F.value}`,
|
|
960
960
|
className: "filter-checkbox-label",
|
|
961
961
|
children: F.label
|
|
962
962
|
}
|
|
@@ -965,33 +965,33 @@ const Nn = {
|
|
|
965
965
|
] })
|
|
966
966
|
] });
|
|
967
967
|
case "multiselect-users":
|
|
968
|
-
const
|
|
968
|
+
const C = g[T] || [], M = x[T];
|
|
969
969
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
970
970
|
/* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
|
|
971
971
|
/* @__PURE__ */ e("label", { className: "filter-label", children: "Operator:" }),
|
|
972
972
|
/* @__PURE__ */ e(
|
|
973
973
|
"select",
|
|
974
974
|
{
|
|
975
|
-
value:
|
|
976
|
-
onChange: (F) =>
|
|
975
|
+
value: A.operator || "in",
|
|
976
|
+
onChange: (F) => $.setFieldValue(`${T}.operator`, F.target.value),
|
|
977
977
|
className: "filter-select",
|
|
978
978
|
children: _.operators.map((F) => /* @__PURE__ */ e("option", { value: F, children: F === "in" ? "Includes" : "Excludes" }, F))
|
|
979
979
|
}
|
|
980
980
|
)
|
|
981
981
|
] }),
|
|
982
|
-
M ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children:
|
|
982
|
+
M ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: C.length > 0 ? /* @__PURE__ */ n(te, { children: [
|
|
983
983
|
/* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
|
|
984
984
|
/* @__PURE__ */ e(
|
|
985
985
|
"input",
|
|
986
986
|
{
|
|
987
987
|
type: "checkbox",
|
|
988
|
-
id: `select-all-users-${
|
|
988
|
+
id: `select-all-users-${T}`,
|
|
989
989
|
className: "filter-checkbox-input",
|
|
990
|
-
checked:
|
|
990
|
+
checked: C.length > 0 && u.length === C.length,
|
|
991
991
|
onChange: (F) => {
|
|
992
|
-
const G = F.target.checked ?
|
|
993
|
-
|
|
994
|
-
`${
|
|
992
|
+
const G = F.target.checked ? C.map((W) => W.email) : [];
|
|
993
|
+
$.setFieldValue(
|
|
994
|
+
`${T}.values`,
|
|
995
995
|
G
|
|
996
996
|
);
|
|
997
997
|
}
|
|
@@ -1000,24 +1000,24 @@ const Nn = {
|
|
|
1000
1000
|
/* @__PURE__ */ e(
|
|
1001
1001
|
"label",
|
|
1002
1002
|
{
|
|
1003
|
-
htmlFor: `select-all-users-${
|
|
1003
|
+
htmlFor: `select-all-users-${T}`,
|
|
1004
1004
|
className: "filter-checkbox-label",
|
|
1005
1005
|
children: "Select All Users"
|
|
1006
1006
|
}
|
|
1007
1007
|
)
|
|
1008
1008
|
] }),
|
|
1009
|
-
|
|
1009
|
+
C.map((F) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
|
|
1010
1010
|
/* @__PURE__ */ e(
|
|
1011
1011
|
"input",
|
|
1012
1012
|
{
|
|
1013
1013
|
type: "checkbox",
|
|
1014
|
-
id: `${
|
|
1014
|
+
id: `${T}-${F.email}`,
|
|
1015
1015
|
className: "filter-checkbox-input",
|
|
1016
1016
|
checked: u.includes(F.email),
|
|
1017
1017
|
onChange: (G) => {
|
|
1018
1018
|
const W = G.target.checked ? [...u, F.email] : u.filter((pe) => pe !== F.email);
|
|
1019
|
-
|
|
1020
|
-
`${
|
|
1019
|
+
$.setFieldValue(
|
|
1020
|
+
`${T}.values`,
|
|
1021
1021
|
W
|
|
1022
1022
|
);
|
|
1023
1023
|
}
|
|
@@ -1026,7 +1026,7 @@ const Nn = {
|
|
|
1026
1026
|
/* @__PURE__ */ n(
|
|
1027
1027
|
"label",
|
|
1028
1028
|
{
|
|
1029
|
-
htmlFor: `${
|
|
1029
|
+
htmlFor: `${T}-${F.email}`,
|
|
1030
1030
|
className: "filter-checkbox-label",
|
|
1031
1031
|
children: [
|
|
1032
1032
|
/* @__PURE__ */ e("span", { className: "user-label-name", children: F.name }),
|
|
@@ -1038,12 +1038,12 @@ const Nn = {
|
|
|
1038
1038
|
] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
|
|
1039
1039
|
] });
|
|
1040
1040
|
case "date":
|
|
1041
|
-
const O =
|
|
1041
|
+
const O = A.values || [], [b, c] = O, f = b && c, w = O[0] || null, S = O[1] || null, I = {
|
|
1042
1042
|
startDate: w instanceof Date ? w.toISOString().slice(0, 10) : null,
|
|
1043
1043
|
endDate: w instanceof Date ? w.toISOString().slice(0, 10) : null
|
|
1044
1044
|
}, k = {
|
|
1045
|
-
startDate:
|
|
1046
|
-
endDate:
|
|
1045
|
+
startDate: S instanceof Date ? S.toISOString().slice(0, 10) : null,
|
|
1046
|
+
endDate: S instanceof Date ? S.toISOString().slice(0, 10) : null
|
|
1047
1047
|
}, R = [
|
|
1048
1048
|
{ key: "anytime", label: "Anytime" },
|
|
1049
1049
|
{ key: "today", label: "Today" },
|
|
@@ -1052,17 +1052,17 @@ const Nn = {
|
|
|
1052
1052
|
{ key: "this_month", label: "This Month" },
|
|
1053
1053
|
{ key: "last_month", label: "Last Month" },
|
|
1054
1054
|
{ key: "custom", label: "Custom" }
|
|
1055
|
-
],
|
|
1055
|
+
], V = (F) => {
|
|
1056
1056
|
if (F === "anytime") {
|
|
1057
|
-
|
|
1057
|
+
$.setFieldValue(`${T}.values`, []), $.setFieldValue(`${T}.range`, "anytime");
|
|
1058
1058
|
return;
|
|
1059
1059
|
}
|
|
1060
1060
|
if (F === "custom") {
|
|
1061
|
-
|
|
1061
|
+
$.setFieldValue(`${T}.range`, "custom");
|
|
1062
1062
|
return;
|
|
1063
1063
|
}
|
|
1064
|
-
const [G, W] =
|
|
1065
|
-
|
|
1064
|
+
const [G, W] = An(F);
|
|
1065
|
+
$.setFieldValue(`${T}.values`, G && W ? [G, W] : []), $.setFieldValue(`${T}.range`, F);
|
|
1066
1066
|
};
|
|
1067
1067
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
1068
1068
|
/* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
|
|
@@ -1070,8 +1070,8 @@ const Nn = {
|
|
|
1070
1070
|
/* @__PURE__ */ e(
|
|
1071
1071
|
"select",
|
|
1072
1072
|
{
|
|
1073
|
-
value:
|
|
1074
|
-
onChange: (F) =>
|
|
1073
|
+
value: A.operator,
|
|
1074
|
+
onChange: (F) => $.setFieldValue(`${T}.operator`, F.target.value),
|
|
1075
1075
|
className: "filter-select",
|
|
1076
1076
|
children: _.operators.map((F) => /* @__PURE__ */ e("option", { value: F, children: F === "in" ? "Is" : "Is not" }, F))
|
|
1077
1077
|
}
|
|
@@ -1081,9 +1081,9 @@ const Nn = {
|
|
|
1081
1081
|
{
|
|
1082
1082
|
type: "button",
|
|
1083
1083
|
onClick: () => {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
h[
|
|
1084
|
+
$.setFieldValue(
|
|
1085
|
+
T,
|
|
1086
|
+
h[T]
|
|
1087
1087
|
);
|
|
1088
1088
|
},
|
|
1089
1089
|
className: "filter-clear-selection-button",
|
|
@@ -1092,7 +1092,7 @@ const Nn = {
|
|
|
1092
1092
|
)
|
|
1093
1093
|
] }),
|
|
1094
1094
|
/* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: R.map((F) => {
|
|
1095
|
-
const G =
|
|
1095
|
+
const G = A.range === F.key || F.key === "anytime" && (!Array.isArray(A.values) || A.values.length === 0);
|
|
1096
1096
|
return /* @__PURE__ */ n(
|
|
1097
1097
|
"label",
|
|
1098
1098
|
{
|
|
@@ -1102,9 +1102,9 @@ const Nn = {
|
|
|
1102
1102
|
"input",
|
|
1103
1103
|
{
|
|
1104
1104
|
type: "radio",
|
|
1105
|
-
name: `preset-${
|
|
1105
|
+
name: `preset-${T}`,
|
|
1106
1106
|
checked: G,
|
|
1107
|
-
onChange: () =>
|
|
1107
|
+
onChange: () => V(F.key),
|
|
1108
1108
|
className: "h-4 w-4"
|
|
1109
1109
|
}
|
|
1110
1110
|
),
|
|
@@ -1127,7 +1127,7 @@ const Nn = {
|
|
|
1127
1127
|
value: I,
|
|
1128
1128
|
onChange: (F) => {
|
|
1129
1129
|
const G = F?.startDate ? je(new Date(F.startDate)) : null, W = O[1] || null;
|
|
1130
|
-
G && (
|
|
1130
|
+
G && ($.setFieldValue(`${T}.values`, [G, W]), $.setFieldValue(`${T}.range`, "custom"));
|
|
1131
1131
|
},
|
|
1132
1132
|
inputClassName: "w-full rounded-xl border border-[#767676] px-4 py-2 text-sm font-normal text-[#101112] focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500",
|
|
1133
1133
|
primaryColor: "violet",
|
|
@@ -1151,7 +1151,7 @@ const Nn = {
|
|
|
1151
1151
|
value: k,
|
|
1152
1152
|
onChange: (F) => {
|
|
1153
1153
|
const G = F?.startDate ? _e(new Date(F.startDate)) : null, W = O[0] || null;
|
|
1154
|
-
G && (
|
|
1154
|
+
G && ($.setFieldValue(`${T}.values`, [W, G]), $.setFieldValue(`${T}.range`, "custom"));
|
|
1155
1155
|
},
|
|
1156
1156
|
inputClassName: "w-full rounded-xl border border-[#767676] px-4 py-2 text-sm font-normal text-[#101112] focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500",
|
|
1157
1157
|
primaryColor: "violet",
|
|
@@ -1164,7 +1164,7 @@ const Nn = {
|
|
|
1164
1164
|
}
|
|
1165
1165
|
)
|
|
1166
1166
|
] }),
|
|
1167
|
-
w &&
|
|
1167
|
+
w && S && w > S && /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-2", children: "End date must be after start date" })
|
|
1168
1168
|
] })
|
|
1169
1169
|
] });
|
|
1170
1170
|
default:
|
|
@@ -1208,9 +1208,9 @@ const Nn = {
|
|
|
1208
1208
|
}
|
|
1209
1209
|
)
|
|
1210
1210
|
] }),
|
|
1211
|
-
/* @__PURE__ */ n("form", { onSubmit:
|
|
1211
|
+
/* @__PURE__ */ n("form", { onSubmit: $.handleSubmit, className: "filter-form", children: [
|
|
1212
1212
|
/* @__PURE__ */ e("div", { className: "filter-content-wrapper", children: /* @__PURE__ */ n(
|
|
1213
|
-
|
|
1213
|
+
Fr,
|
|
1214
1214
|
{
|
|
1215
1215
|
vertical: !0,
|
|
1216
1216
|
onChange: U,
|
|
@@ -1219,11 +1219,11 @@ const Nn = {
|
|
|
1219
1219
|
flexGrow: 1
|
|
1220
1220
|
},
|
|
1221
1221
|
children: [
|
|
1222
|
-
/* @__PURE__ */ e(
|
|
1222
|
+
/* @__PURE__ */ e(Er, { className: "filter-tabs-list", children: l.map((T) => /* @__PURE__ */ n(ne, { className: "filter-tab-item", children: [
|
|
1223
1223
|
/* @__PURE__ */ e("div", { className: "filter-selection-horizontal-indicator" }),
|
|
1224
1224
|
/* @__PURE__ */ n("div", { className: "filter-lbl-indicator-wrapper", children: [
|
|
1225
|
-
|
|
1226
|
-
|
|
1225
|
+
T.label,
|
|
1226
|
+
D[T.key] && /* @__PURE__ */ e(
|
|
1227
1227
|
"span",
|
|
1228
1228
|
{
|
|
1229
1229
|
className: "filter-active-indicator",
|
|
@@ -1231,8 +1231,8 @@ const Nn = {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
)
|
|
1233
1233
|
] })
|
|
1234
|
-
] },
|
|
1235
|
-
/* @__PURE__ */ e(
|
|
1234
|
+
] }, T.key)) }),
|
|
1235
|
+
/* @__PURE__ */ e(Rr, { className: "filter-tabs-panels", children: l.map((T) => /* @__PURE__ */ e(
|
|
1236
1236
|
ne.Panel,
|
|
1237
1237
|
{
|
|
1238
1238
|
className: "filter-tab-panel",
|
|
@@ -1243,12 +1243,12 @@ const Nn = {
|
|
|
1243
1243
|
animate: { opacity: 1, x: 0 },
|
|
1244
1244
|
transition: { duration: 0.3 },
|
|
1245
1245
|
className: "h-full",
|
|
1246
|
-
children: q(
|
|
1246
|
+
children: q(T.key)
|
|
1247
1247
|
},
|
|
1248
|
-
|
|
1248
|
+
T.key
|
|
1249
1249
|
)
|
|
1250
1250
|
},
|
|
1251
|
-
|
|
1251
|
+
T.key
|
|
1252
1252
|
)) })
|
|
1253
1253
|
]
|
|
1254
1254
|
}
|
|
@@ -1267,7 +1267,7 @@ const Nn = {
|
|
|
1267
1267
|
"button",
|
|
1268
1268
|
{
|
|
1269
1269
|
type: "submit",
|
|
1270
|
-
disabled:
|
|
1270
|
+
disabled: !$.dirty || L,
|
|
1271
1271
|
className: "filter-button apply",
|
|
1272
1272
|
children: [
|
|
1273
1273
|
"Apply Filters",
|
|
@@ -1332,7 +1332,7 @@ const Nn = {
|
|
|
1332
1332
|
iconClass: "icon--info",
|
|
1333
1333
|
primaryButtonCategory: "primary"
|
|
1334
1334
|
}
|
|
1335
|
-
},
|
|
1335
|
+
}, Fn = ({
|
|
1336
1336
|
isOpen: t,
|
|
1337
1337
|
onClose: a,
|
|
1338
1338
|
title: s,
|
|
@@ -1410,7 +1410,7 @@ const Nn = {
|
|
|
1410
1410
|
}
|
|
1411
1411
|
) })
|
|
1412
1412
|
] }) });
|
|
1413
|
-
},
|
|
1413
|
+
}, $l = ({
|
|
1414
1414
|
currentPage: t,
|
|
1415
1415
|
totalItems: a,
|
|
1416
1416
|
itemsPerPage: s,
|
|
@@ -1571,7 +1571,7 @@ const Nn = {
|
|
|
1571
1571
|
N(t);
|
|
1572
1572
|
}, [t]);
|
|
1573
1573
|
const m = H(
|
|
1574
|
-
|
|
1574
|
+
Gr((z) => {
|
|
1575
1575
|
a?.(z);
|
|
1576
1576
|
}, s),
|
|
1577
1577
|
[s, a]
|
|
@@ -1631,7 +1631,7 @@ const Nn = {
|
|
|
1631
1631
|
t && /* @__PURE__ */ e("label", { className: "select-label", children: t }),
|
|
1632
1632
|
/* @__PURE__ */ n("div", { className: "select-button-container", children: [
|
|
1633
1633
|
/* @__PURE__ */ n(
|
|
1634
|
-
|
|
1634
|
+
Ir,
|
|
1635
1635
|
{
|
|
1636
1636
|
className: Q("select-button", {
|
|
1637
1637
|
"select-button--error": !!o
|
|
@@ -1648,7 +1648,7 @@ const Nn = {
|
|
|
1648
1648
|
leave: "transition ease-in duration-100",
|
|
1649
1649
|
leaveFrom: "opacity-100",
|
|
1650
1650
|
leaveTo: "opacity-0",
|
|
1651
|
-
children: /* @__PURE__ */ n(
|
|
1651
|
+
children: /* @__PURE__ */ n(Or, { className: "select-options", children: [
|
|
1652
1652
|
g && /* @__PURE__ */ e("div", { className: "search-input-wrapper", children: /* @__PURE__ */ e(
|
|
1653
1653
|
fe,
|
|
1654
1654
|
{
|
|
@@ -1661,7 +1661,7 @@ const Nn = {
|
|
|
1661
1661
|
}
|
|
1662
1662
|
) }),
|
|
1663
1663
|
/* @__PURE__ */ e("div", { className: "select-options-list", children: r.length === 0 && v !== "" ? /* @__PURE__ */ e("div", { className: "no-results", children: "No results found." }) : r.map((m) => /* @__PURE__ */ e(
|
|
1664
|
-
|
|
1664
|
+
Mr,
|
|
1665
1665
|
{
|
|
1666
1666
|
className: ({ active: y }) => `select-option ${y ? "active" : ""}`,
|
|
1667
1667
|
value: m,
|
|
@@ -1693,7 +1693,7 @@ const Nn = {
|
|
|
1693
1693
|
] }),
|
|
1694
1694
|
o && /* @__PURE__ */ e("p", { className: "select-error-message", children: o })
|
|
1695
1695
|
] }) });
|
|
1696
|
-
},
|
|
1696
|
+
}, En = () => {
|
|
1697
1697
|
const [t, a] = P(window.location.pathname);
|
|
1698
1698
|
return K(() => {
|
|
1699
1699
|
const s = () => {
|
|
@@ -1709,7 +1709,7 @@ const Nn = {
|
|
|
1709
1709
|
return s;
|
|
1710
1710
|
return null;
|
|
1711
1711
|
}, ia = ({ item: t, isCollapsed: a, level: s = 0 }) => {
|
|
1712
|
-
const { pathname: i } =
|
|
1712
|
+
const { pathname: i } = En(), l = t.href || t.url || t.path, [h, o] = P(!1), p = t.icon;
|
|
1713
1713
|
K(() => {
|
|
1714
1714
|
gt([t], i) && o(!0);
|
|
1715
1715
|
}, [t, i]);
|
|
@@ -1780,7 +1780,7 @@ const Nn = {
|
|
|
1780
1780
|
]
|
|
1781
1781
|
}
|
|
1782
1782
|
);
|
|
1783
|
-
},
|
|
1783
|
+
}, Tl = ({
|
|
1784
1784
|
navItems: t = [],
|
|
1785
1785
|
isCollapsed: a = !1,
|
|
1786
1786
|
onToggleCollapse: s,
|
|
@@ -1884,7 +1884,7 @@ const Nn = {
|
|
|
1884
1884
|
]
|
|
1885
1885
|
}
|
|
1886
1886
|
);
|
|
1887
|
-
},
|
|
1887
|
+
}, Al = ({ label: t = "Loading..." }) => /* @__PURE__ */ e("div", { className: "fullscreen-loader-overlay", role: "alert", "aria-busy": "true", children: /* @__PURE__ */ n("div", { className: "loader-content", children: [
|
|
1888
1888
|
/* @__PURE__ */ e(oa, { size: "large" }),
|
|
1889
1889
|
t && /* @__PURE__ */ e("span", { className: "loader-label", children: t })
|
|
1890
1890
|
] }) }), ca = ({
|
|
@@ -1936,7 +1936,7 @@ const Nn = {
|
|
|
1936
1936
|
labelStyle: h = "",
|
|
1937
1937
|
...o
|
|
1938
1938
|
}) => /* @__PURE__ */ n("div", { className: "switch-container", children: [
|
|
1939
|
-
/* @__PURE__ */ n(
|
|
1939
|
+
/* @__PURE__ */ n(Pr, { as: "div", className: "switch-group", children: [
|
|
1940
1940
|
t && i === "left" && /* @__PURE__ */ e(lt.Label, { className: "switch-label", passive: !0, children: t }),
|
|
1941
1941
|
/* @__PURE__ */ e(
|
|
1942
1942
|
lt,
|
|
@@ -1954,7 +1954,7 @@ const Nn = {
|
|
|
1954
1954
|
t && i === "right" && /* @__PURE__ */ e(lt.Label, { className: `switch-label ${h}`, passive: !0, children: t })
|
|
1955
1955
|
] }),
|
|
1956
1956
|
l && /* @__PURE__ */ e("p", { className: "switch-error-message", children: l })
|
|
1957
|
-
] }),
|
|
1957
|
+
] }), Fl = ({
|
|
1958
1958
|
children: t,
|
|
1959
1959
|
content: a,
|
|
1960
1960
|
variant: s = "dark",
|
|
@@ -1982,7 +1982,7 @@ const Nn = {
|
|
|
1982
1982
|
}
|
|
1983
1983
|
)
|
|
1984
1984
|
] });
|
|
1985
|
-
},
|
|
1985
|
+
}, Rn = {
|
|
1986
1986
|
enter: (t) => ({
|
|
1987
1987
|
x: t > 0 ? "100%" : "-100%",
|
|
1988
1988
|
opacity: 0
|
|
@@ -1995,7 +1995,7 @@ const Nn = {
|
|
|
1995
1995
|
x: t < 0 ? "100%" : "-100%",
|
|
1996
1996
|
opacity: 0
|
|
1997
1997
|
})
|
|
1998
|
-
},
|
|
1998
|
+
}, El = ({
|
|
1999
1999
|
isOpen: t,
|
|
2000
2000
|
onClose: a,
|
|
2001
2001
|
steps: s = {},
|
|
@@ -2083,7 +2083,7 @@ const Nn = {
|
|
|
2083
2083
|
ie.div,
|
|
2084
2084
|
{
|
|
2085
2085
|
custom: l,
|
|
2086
|
-
variants:
|
|
2086
|
+
variants: Rn,
|
|
2087
2087
|
initial: "enter",
|
|
2088
2088
|
animate: "center",
|
|
2089
2089
|
exit: "exit",
|
|
@@ -2106,11 +2106,11 @@ const Nn = {
|
|
|
2106
2106
|
]
|
|
2107
2107
|
}
|
|
2108
2108
|
) });
|
|
2109
|
-
},
|
|
2109
|
+
}, In = {
|
|
2110
2110
|
small: "btn-sm",
|
|
2111
2111
|
medium: "btn-md",
|
|
2112
2112
|
large: "btn-lg"
|
|
2113
|
-
},
|
|
2113
|
+
}, On = {
|
|
2114
2114
|
primary: "btn-primary",
|
|
2115
2115
|
secondary: "btn-secondary-icon"
|
|
2116
2116
|
}, Ce = ({
|
|
@@ -2134,8 +2134,8 @@ const Nn = {
|
|
|
2134
2134
|
const m = p, y = Q(
|
|
2135
2135
|
"btn-base-icon",
|
|
2136
2136
|
"btn-icon-only",
|
|
2137
|
-
|
|
2138
|
-
|
|
2137
|
+
In[g],
|
|
2138
|
+
On[h],
|
|
2139
2139
|
l
|
|
2140
2140
|
);
|
|
2141
2141
|
return /* @__PURE__ */ e(
|
|
@@ -2152,7 +2152,7 @@ const Nn = {
|
|
|
2152
2152
|
children: o && /* @__PURE__ */ e(o, { size: g === "large" ? 20 : 16 })
|
|
2153
2153
|
}
|
|
2154
2154
|
);
|
|
2155
|
-
},
|
|
2155
|
+
}, Rl = ({
|
|
2156
2156
|
content: t,
|
|
2157
2157
|
isFooter: a = !1,
|
|
2158
2158
|
footerContent: s,
|
|
@@ -2199,7 +2199,7 @@ const Nn = {
|
|
|
2199
2199
|
)
|
|
2200
2200
|
] }) })
|
|
2201
2201
|
] });
|
|
2202
|
-
},
|
|
2202
|
+
}, Mn = ({
|
|
2203
2203
|
heading: t,
|
|
2204
2204
|
subHeading: a,
|
|
2205
2205
|
breadcrumbItems: s = [],
|
|
@@ -2215,25 +2215,25 @@ const Nn = {
|
|
|
2215
2215
|
className: "page-header-back-button",
|
|
2216
2216
|
"aria-label": "Go back",
|
|
2217
2217
|
onClick: l,
|
|
2218
|
-
children: /* @__PURE__ */ e(
|
|
2218
|
+
children: /* @__PURE__ */ e($n, { width: 30, height: 30 })
|
|
2219
2219
|
}
|
|
2220
2220
|
),
|
|
2221
2221
|
/* @__PURE__ */ n("div", { className: "page-header-content", children: [
|
|
2222
2222
|
/* @__PURE__ */ e("h1", { className: "page-header-heading", children: t }),
|
|
2223
|
-
s.length > 1 ? /* @__PURE__ */ e(
|
|
2223
|
+
s.length > 1 ? /* @__PURE__ */ e(wn, { crumbs: s }) : a ? /* @__PURE__ */ e("p", { className: "page-header-subheading", children: a }) : null
|
|
2224
2224
|
] })
|
|
2225
|
-
] }),
|
|
2225
|
+
] }), Pn = ({
|
|
2226
2226
|
options: t = [],
|
|
2227
2227
|
onSelect: a,
|
|
2228
2228
|
triggerIcon: s = Ht
|
|
2229
2229
|
}) => {
|
|
2230
|
-
const { refs: i, floatingStyles: l } =
|
|
2231
|
-
whileElementsMounted:
|
|
2232
|
-
middleware: [
|
|
2230
|
+
const { refs: i, floatingStyles: l } = qr({
|
|
2231
|
+
whileElementsMounted: Xr,
|
|
2232
|
+
middleware: [Yr(5), Wr(), Jr({ padding: 5 })]
|
|
2233
2233
|
});
|
|
2234
|
-
return /* @__PURE__ */ n(
|
|
2235
|
-
/* @__PURE__ */ e(
|
|
2236
|
-
/* @__PURE__ */ e(
|
|
2234
|
+
return /* @__PURE__ */ n(Lr, { as: "div", className: "options-menu-wrapper", children: [
|
|
2235
|
+
/* @__PURE__ */ e(Br, { ref: i.setReference, className: "options-menu-trigger", children: /* @__PURE__ */ e(s, { size: 20 }) }),
|
|
2236
|
+
/* @__PURE__ */ e(Vr, { children: /* @__PURE__ */ e(
|
|
2237
2237
|
be,
|
|
2238
2238
|
{
|
|
2239
2239
|
as: Z,
|
|
@@ -2244,14 +2244,14 @@ const Nn = {
|
|
|
2244
2244
|
leaveFrom: "transform opacity-100 scale-100",
|
|
2245
2245
|
leaveTo: "transform opacity-0 scale-95",
|
|
2246
2246
|
children: /* @__PURE__ */ e(
|
|
2247
|
-
|
|
2247
|
+
jr,
|
|
2248
2248
|
{
|
|
2249
2249
|
ref: i.setFloating,
|
|
2250
2250
|
style: l,
|
|
2251
2251
|
className: "options-menu-panel",
|
|
2252
2252
|
children: t.map((h) => /* @__PURE__ */ n("div", { className: "options-menu-item-wrapper", children: [
|
|
2253
2253
|
h.dividerBefore && /* @__PURE__ */ e("div", { className: "menu-divider" }),
|
|
2254
|
-
/* @__PURE__ */ e(
|
|
2254
|
+
/* @__PURE__ */ e(_r, { children: ({ active: o }) => /* @__PURE__ */ n(
|
|
2255
2255
|
"button",
|
|
2256
2256
|
{
|
|
2257
2257
|
onClick: () => a(h),
|
|
@@ -2270,14 +2270,14 @@ const Nn = {
|
|
|
2270
2270
|
) })
|
|
2271
2271
|
] });
|
|
2272
2272
|
};
|
|
2273
|
-
function
|
|
2273
|
+
function Ln(t) {
|
|
2274
2274
|
try {
|
|
2275
2275
|
return typeof t == "string" ? t : JSON.stringify(t);
|
|
2276
2276
|
} catch {
|
|
2277
2277
|
return "";
|
|
2278
2278
|
}
|
|
2279
2279
|
}
|
|
2280
|
-
function
|
|
2280
|
+
function Bn(t) {
|
|
2281
2281
|
try {
|
|
2282
2282
|
return JSON.parse(t);
|
|
2283
2283
|
} catch {
|
|
@@ -2290,13 +2290,13 @@ function ma(t) {
|
|
|
2290
2290
|
* Get an item (parsed if JSON).
|
|
2291
2291
|
*/
|
|
2292
2292
|
get(a) {
|
|
2293
|
-
return
|
|
2293
|
+
return Bn(t.getItem(a));
|
|
2294
2294
|
},
|
|
2295
2295
|
/**
|
|
2296
2296
|
* Set an item (string or object).
|
|
2297
2297
|
*/
|
|
2298
2298
|
set(a, s) {
|
|
2299
|
-
t.setItem(a,
|
|
2299
|
+
t.setItem(a, Ln(s));
|
|
2300
2300
|
},
|
|
2301
2301
|
/**
|
|
2302
2302
|
* Delete/remove an item.
|
|
@@ -2323,7 +2323,7 @@ function ma(t) {
|
|
|
2323
2323
|
}
|
|
2324
2324
|
};
|
|
2325
2325
|
}
|
|
2326
|
-
const
|
|
2326
|
+
const Vn = ma(localStorage), Il = ma(sessionStorage), Ol = {
|
|
2327
2327
|
get(t) {
|
|
2328
2328
|
const a = document.cookie.match(
|
|
2329
2329
|
new RegExp("(^| )" + t + "=([^;]+)")
|
|
@@ -2353,17 +2353,17 @@ const jn = ma(localStorage), Ol = ma(sessionStorage), Ml = {
|
|
|
2353
2353
|
function vt() {
|
|
2354
2354
|
return ua() ? window.location.hostname === "localhost" ? "https://dev.unifyed.com" : `${window.location.protocol}//${window.location.hostname}` : "https://dev.unifyed.com";
|
|
2355
2355
|
}
|
|
2356
|
-
function
|
|
2356
|
+
function jn() {
|
|
2357
2357
|
if (!ua()) return "";
|
|
2358
2358
|
try {
|
|
2359
|
-
const t =
|
|
2359
|
+
const t = Vn.get("userProfile");
|
|
2360
2360
|
return !t && window.location.hostname === "localhost" ? "/unifyd-gateway/api" : (t && typeof t == "object" ? t : {})?.gatewaypath ?? "";
|
|
2361
2361
|
} catch {
|
|
2362
2362
|
return "";
|
|
2363
2363
|
}
|
|
2364
2364
|
}
|
|
2365
2365
|
function $e() {
|
|
2366
|
-
return `${vt()}${
|
|
2366
|
+
return `${vt()}${jn()}`;
|
|
2367
2367
|
}
|
|
2368
2368
|
function ha() {
|
|
2369
2369
|
return `${$e()}/unifyedstudioutility/commonutility/users/list?sortkey=firstName&sortorder=false&page=0&size=999&onlineusersonly=false`;
|
|
@@ -2383,13 +2383,13 @@ function fa() {
|
|
|
2383
2383
|
function Nt() {
|
|
2384
2384
|
return `${$e()}/unifyed-mydrive/v2`;
|
|
2385
2385
|
}
|
|
2386
|
-
function
|
|
2386
|
+
function _n() {
|
|
2387
2387
|
return `${Nt()}/directory/permissions`;
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2389
|
+
function Un() {
|
|
2390
2390
|
return `${Nt()}/file/permissions`;
|
|
2391
2391
|
}
|
|
2392
|
-
function
|
|
2392
|
+
function Ml() {
|
|
2393
2393
|
return Object.freeze({
|
|
2394
2394
|
REACT_APP_BASE_URL: vt(),
|
|
2395
2395
|
GATEWAY_BASE: $e(),
|
|
@@ -2399,11 +2399,11 @@ function Pl() {
|
|
|
2399
2399
|
RBAC_BASE: ba(),
|
|
2400
2400
|
SEARCH_ROLES_API: fa(),
|
|
2401
2401
|
MY_DRIVE_GATEWAY_BASE_v2: Nt(),
|
|
2402
|
-
DIRECTORY_PERMISSIONS_API:
|
|
2403
|
-
FILE_PERMISSIONS_API:
|
|
2402
|
+
DIRECTORY_PERMISSIONS_API: _n(),
|
|
2403
|
+
FILE_PERMISSIONS_API: Un()
|
|
2404
2404
|
});
|
|
2405
2405
|
}
|
|
2406
|
-
function
|
|
2406
|
+
function Gn(t) {
|
|
2407
2407
|
try {
|
|
2408
2408
|
const a = localStorage.getItem(t);
|
|
2409
2409
|
return a ? JSON.parse(a) : null;
|
|
@@ -2412,7 +2412,7 @@ function qn(t) {
|
|
|
2412
2412
|
}
|
|
2413
2413
|
}
|
|
2414
2414
|
function It() {
|
|
2415
|
-
const t =
|
|
2415
|
+
const t = Gn("userProfile") || {}, a = localStorage.getItem("access_token") || t.accessToken || "", s = localStorage.getItem("siteId") || t.siteId || "", i = t.tenant || "", l = t.tenantdomain || "", h = t.username || t.displayName || "", o = t.email || "";
|
|
2416
2416
|
return {
|
|
2417
2417
|
Authorization: a ? `Bearer ${a}` : void 0,
|
|
2418
2418
|
"x-tenant-id": i || void 0,
|
|
@@ -2423,7 +2423,7 @@ function It() {
|
|
|
2423
2423
|
"x-user-email": o || void 0
|
|
2424
2424
|
};
|
|
2425
2425
|
}
|
|
2426
|
-
function
|
|
2426
|
+
function qn(t) {
|
|
2427
2427
|
if (t && t.isAxiosError) {
|
|
2428
2428
|
const { response: a, config: s, message: i } = t, l = a?.status ?? null, h = a?.statusText ?? null, o = a?.data ?? null, p = typeof o == "string" && o || o?.message || o?.msg || o?.error || o?.errors?.[0]?.message || null;
|
|
2429
2429
|
return {
|
|
@@ -2451,7 +2451,7 @@ function Yn(t) {
|
|
|
2451
2451
|
request: null
|
|
2452
2452
|
};
|
|
2453
2453
|
}
|
|
2454
|
-
function
|
|
2454
|
+
function Yn({
|
|
2455
2455
|
enableAuthRedirect: t = !0,
|
|
2456
2456
|
defaultOpenHeaders: a = {}
|
|
2457
2457
|
} = {}) {
|
|
@@ -2466,7 +2466,7 @@ function Wn({
|
|
|
2466
2466
|
message: v?.statusText || "Request succeeded"
|
|
2467
2467
|
},
|
|
2468
2468
|
(v) => {
|
|
2469
|
-
const x =
|
|
2469
|
+
const x = qn(v), r = x.status;
|
|
2470
2470
|
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(x);
|
|
2471
2471
|
}
|
|
2472
2472
|
);
|
|
@@ -2508,7 +2508,7 @@ function Wn({
|
|
|
2508
2508
|
axiosPatch: g
|
|
2509
2509
|
};
|
|
2510
2510
|
}
|
|
2511
|
-
const Ee =
|
|
2511
|
+
const Ee = Yn(), Ze = Ee.axiosGet, Pl = Ee.axiosDelete, bt = Ee.axiosPost, Ll = Ee.axiosPut, Bl = Ee.axiosPatch, Vl = Ee.instance, Wn = async (t, a) => {
|
|
2512
2512
|
try {
|
|
2513
2513
|
switch (t) {
|
|
2514
2514
|
case De.USER: {
|
|
@@ -2527,7 +2527,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2527
2527
|
} catch (s) {
|
|
2528
2528
|
console.log("Error searching entities:", s);
|
|
2529
2529
|
}
|
|
2530
|
-
},
|
|
2530
|
+
}, Jn = (t) => t.filter((a) => !!a?.email).map((a) => {
|
|
2531
2531
|
const s = (a?.firstName ?? "").trim(), i = (a?.lastName ?? "").trim(), l = `${s} ${i}`.trim() || (a.email?.split("@")[0] ?? "Unknown");
|
|
2532
2532
|
return {
|
|
2533
2533
|
id: a.email,
|
|
@@ -2591,13 +2591,13 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2591
2591
|
const l = s.data;
|
|
2592
2592
|
Array.isArray(l) ? i = l : typeof l == "string" && (i = Ot(l.trim()));
|
|
2593
2593
|
}
|
|
2594
|
-
return
|
|
2594
|
+
return Jn(i);
|
|
2595
2595
|
}
|
|
2596
2596
|
}, wt = (t, a) => {
|
|
2597
2597
|
const [s, i] = P(t);
|
|
2598
2598
|
return K(
|
|
2599
2599
|
() => {
|
|
2600
|
-
const l =
|
|
2600
|
+
const l = Qr(() => {
|
|
2601
2601
|
i(t);
|
|
2602
2602
|
}, a);
|
|
2603
2603
|
return l(), () => {
|
|
@@ -2607,7 +2607,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2607
2607
|
[t, a]
|
|
2608
2608
|
// Only re-call effect if value or delay changes
|
|
2609
2609
|
), s;
|
|
2610
|
-
},
|
|
2610
|
+
}, Xn = ({
|
|
2611
2611
|
users: t = [],
|
|
2612
2612
|
groups: a = [],
|
|
2613
2613
|
roles: s = [],
|
|
@@ -2653,9 +2653,9 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2653
2653
|
], Pt = [
|
|
2654
2654
|
{ id: 1, name: $t.View, icon: Qa },
|
|
2655
2655
|
{ id: 2, name: $t.Manage, icon: Ha }
|
|
2656
|
-
],
|
|
2656
|
+
], Qn = Ya().shape({
|
|
2657
2657
|
pendingInvites: Wa().min(1, "You must add at least one person to invite.")
|
|
2658
|
-
}),
|
|
2658
|
+
}), Hn = ({
|
|
2659
2659
|
entity: t,
|
|
2660
2660
|
onManage: a,
|
|
2661
2661
|
onClose: s,
|
|
@@ -2666,35 +2666,35 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2666
2666
|
},
|
|
2667
2667
|
isChanged: p = !1
|
|
2668
2668
|
}) => {
|
|
2669
|
-
const [g, v] = P(Mt[0]), [x, r] = P(""), N = wt(x, 400), [m, y] = P([]), [z,
|
|
2669
|
+
const [g, v] = P(Mt[0]), [x, r] = P(""), N = wt(x, 400), [m, y] = P([]), [z, $] = P(/* @__PURE__ */ new Set()), [D, E] = P(!1), [L, j] = P(Pt[0]), {
|
|
2670
2670
|
control: U,
|
|
2671
2671
|
handleSubmit: Y,
|
|
2672
2672
|
watch: q,
|
|
2673
|
-
formState: { errors:
|
|
2673
|
+
formState: { errors: T, isSubmitting: _ }
|
|
2674
2674
|
} = Za({
|
|
2675
2675
|
defaultValues: { pendingInvites: [] },
|
|
2676
|
-
resolver: tr(
|
|
2677
|
-
}), { fields:
|
|
2676
|
+
resolver: tr(Qn)
|
|
2677
|
+
}), { fields: A, append: u, remove: C, update: M } = Ka({
|
|
2678
2678
|
control: U,
|
|
2679
2679
|
name: "pendingInvites"
|
|
2680
2680
|
}), O = q("pendingInvites");
|
|
2681
2681
|
K(() => {
|
|
2682
|
-
N.length > 1 ? (E(!0),
|
|
2682
|
+
N.length > 1 ? (E(!0), Wn(g.name, N).then((k) => {
|
|
2683
2683
|
y(k);
|
|
2684
|
-
}).catch((k) => console.error("Search failed:", k)).finally(() => E(!1))) : (y([]),
|
|
2684
|
+
}).catch((k) => console.error("Search failed:", k)).finally(() => E(!1))) : (y([]), $(/* @__PURE__ */ new Set()));
|
|
2685
2685
|
}, [N, g]);
|
|
2686
2686
|
const b = (k) => {
|
|
2687
|
-
|
|
2688
|
-
const
|
|
2689
|
-
return
|
|
2687
|
+
$((R) => {
|
|
2688
|
+
const V = new Set(R);
|
|
2689
|
+
return V.has(k) ? V.delete(k) : V.add(k), V;
|
|
2690
2690
|
});
|
|
2691
2691
|
}, c = () => {
|
|
2692
2692
|
m.filter((k) => z.has(k.id)).forEach((k) => {
|
|
2693
|
-
|
|
2694
|
-
}),
|
|
2693
|
+
A.find((R) => R.id === k.id) || u({ ...k, permission: L.name });
|
|
2694
|
+
}), $(/* @__PURE__ */ new Set()), r("");
|
|
2695
2695
|
}, f = (k) => {
|
|
2696
|
-
|
|
2697
|
-
(R,
|
|
2696
|
+
j(k), A.forEach(
|
|
2697
|
+
(R, V) => M(V, { ...A[V], permission: k.name })
|
|
2698
2698
|
);
|
|
2699
2699
|
}, w = async (k) => {
|
|
2700
2700
|
try {
|
|
@@ -2711,13 +2711,13 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2711
2711
|
// Always send updated existing shares
|
|
2712
2712
|
}, i);
|
|
2713
2713
|
} else if (l === ue.INTEREST) {
|
|
2714
|
-
const R = k.pendingInvites.map((
|
|
2715
|
-
identity:
|
|
2716
|
-
type:
|
|
2714
|
+
const R = k.pendingInvites.map((V) => ({
|
|
2715
|
+
identity: V.id,
|
|
2716
|
+
type: V.type.toLowerCase(),
|
|
2717
2717
|
opt: !0,
|
|
2718
2718
|
lock: !1,
|
|
2719
2719
|
moderator: !1,
|
|
2720
|
-
userName:
|
|
2720
|
+
userName: V.name,
|
|
2721
2721
|
interestId: t?.data?.id
|
|
2722
2722
|
}));
|
|
2723
2723
|
o(R, i);
|
|
@@ -2740,8 +2740,8 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2740
2740
|
} catch (R) {
|
|
2741
2741
|
throw console.error("Failed to submit invites:", R), R;
|
|
2742
2742
|
}
|
|
2743
|
-
},
|
|
2744
|
-
const R = i[g.code].find((
|
|
2743
|
+
}, S = (k) => {
|
|
2744
|
+
const R = i[g.code].find((V) => V.name === k.name && V.permission !== "remove") || O.find((V) => V.name === k.name);
|
|
2745
2745
|
return R ? `${R.permission}` : "";
|
|
2746
2746
|
}, I = () => {
|
|
2747
2747
|
switch (l) {
|
|
@@ -2775,7 +2775,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2775
2775
|
] }),
|
|
2776
2776
|
/* @__PURE__ */ n("main", { className: "flex-grow p-4 space-y-6 overflow-y-auto", children: [
|
|
2777
2777
|
(l === ue.DRIVE || h) && /* @__PURE__ */ e(
|
|
2778
|
-
|
|
2778
|
+
Xn,
|
|
2779
2779
|
{
|
|
2780
2780
|
users: i.users.filter((k) => k.permission !== "remove"),
|
|
2781
2781
|
groups: i.groups.filter((k) => k.permission !== "remove"),
|
|
@@ -2836,7 +2836,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2836
2836
|
value: x
|
|
2837
2837
|
}
|
|
2838
2838
|
) }),
|
|
2839
|
-
/* @__PURE__ */ e(Se, { children: (m?.length > 0 ||
|
|
2839
|
+
/* @__PURE__ */ e(Se, { children: (m?.length > 0 || D) && /* @__PURE__ */ e(
|
|
2840
2840
|
ie.div,
|
|
2841
2841
|
{
|
|
2842
2842
|
initial: { opacity: 0, y: -10 },
|
|
@@ -2844,9 +2844,9 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2844
2844
|
exit: { opacity: 0, y: -10 },
|
|
2845
2845
|
transition: { duration: 0.2 },
|
|
2846
2846
|
className: "absolute top-full mt-2 w-full col-span-3 bg-white border border-gray-300 rounded-lg shadow-lg z-10",
|
|
2847
|
-
children:
|
|
2847
|
+
children: D ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500", children: "Loading..." }) : /* @__PURE__ */ n(te, { children: [
|
|
2848
2848
|
/* @__PURE__ */ e("div", { className: "max-h-60 overflow-y-auto p-2 space-y-1", children: m.map((k) => {
|
|
2849
|
-
const R =
|
|
2849
|
+
const R = S(k);
|
|
2850
2850
|
return /* @__PURE__ */ n(
|
|
2851
2851
|
"div",
|
|
2852
2852
|
{
|
|
@@ -2900,7 +2900,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2900
2900
|
}
|
|
2901
2901
|
) })
|
|
2902
2902
|
] }),
|
|
2903
|
-
/* @__PURE__ */ e(Se, { children:
|
|
2903
|
+
/* @__PURE__ */ e(Se, { children: A.length > 0 && /* @__PURE__ */ n(
|
|
2904
2904
|
ie.div,
|
|
2905
2905
|
{
|
|
2906
2906
|
initial: { opacity: 0, y: 20 },
|
|
@@ -2910,7 +2910,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2910
2910
|
/* @__PURE__ */ n("div", { className: "flex justify-between items-center", children: [
|
|
2911
2911
|
/* @__PURE__ */ n("div", { className: "font-semibold text-gray-800", children: [
|
|
2912
2912
|
"Pending Invites (",
|
|
2913
|
-
|
|
2913
|
+
A.length,
|
|
2914
2914
|
")"
|
|
2915
2915
|
] }),
|
|
2916
2916
|
l === ue.DRIVE && /* @__PURE__ */ e(
|
|
@@ -2941,7 +2941,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2941
2941
|
{
|
|
2942
2942
|
value: k,
|
|
2943
2943
|
className: ({ active: R }) => `${R ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
|
|
2944
|
-
children: ({ selected: R, active:
|
|
2944
|
+
children: ({ selected: R, active: V }) => /* @__PURE__ */ n(te, { children: [
|
|
2945
2945
|
/* @__PURE__ */ n(
|
|
2946
2946
|
"span",
|
|
2947
2947
|
{
|
|
@@ -2950,7 +2950,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2950
2950
|
/* @__PURE__ */ e(
|
|
2951
2951
|
k.icon,
|
|
2952
2952
|
{
|
|
2953
|
-
className: `h-5 w-5 mr-2 ${
|
|
2953
|
+
className: `h-5 w-5 mr-2 ${V ? "text-white" : "text-gray-400"}`
|
|
2954
2954
|
}
|
|
2955
2955
|
),
|
|
2956
2956
|
"Can ",
|
|
@@ -2975,7 +2975,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2975
2975
|
}
|
|
2976
2976
|
)
|
|
2977
2977
|
] }),
|
|
2978
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(Se, { children:
|
|
2978
|
+
/* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(Se, { children: A.map((k, R) => /* @__PURE__ */ n(
|
|
2979
2979
|
ie.div,
|
|
2980
2980
|
{
|
|
2981
2981
|
layout: !0,
|
|
@@ -3003,7 +3003,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3003
3003
|
/* @__PURE__ */ e(
|
|
3004
3004
|
"button",
|
|
3005
3005
|
{
|
|
3006
|
-
onClick: () =>
|
|
3006
|
+
onClick: () => C(R),
|
|
3007
3007
|
className: "text-gray-400 hover:text-red-500 hover:cursor-pointer",
|
|
3008
3008
|
children: /* @__PURE__ */ e(Be, { className: "h-5 w-5" })
|
|
3009
3009
|
}
|
|
@@ -3044,7 +3044,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3044
3044
|
] })
|
|
3045
3045
|
] }) })
|
|
3046
3046
|
] });
|
|
3047
|
-
},
|
|
3047
|
+
}, Zn = ({
|
|
3048
3048
|
entity: t,
|
|
3049
3049
|
//entire file or folder details
|
|
3050
3050
|
onBack: a,
|
|
@@ -3055,22 +3055,22 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3055
3055
|
}) => {
|
|
3056
3056
|
const [o, p] = P(l), [g, v] = P(0), [x, r] = P(""), N = wt(x, 300), m = {
|
|
3057
3057
|
users: o.users.filter(
|
|
3058
|
-
(
|
|
3058
|
+
(D) => D.name.toLowerCase().includes(N.toLowerCase())
|
|
3059
3059
|
),
|
|
3060
3060
|
groups: o.groups.filter(
|
|
3061
|
-
(
|
|
3061
|
+
(D) => D.name.toLowerCase().includes(N.toLowerCase())
|
|
3062
3062
|
),
|
|
3063
3063
|
roles: o.roles.filter(
|
|
3064
|
-
(
|
|
3064
|
+
(D) => D.name.toLowerCase().includes(N.toLowerCase())
|
|
3065
3065
|
)
|
|
3066
|
-
}, y = (
|
|
3067
|
-
console.log("[ManageFlow] Removing item:", { itemToRemove:
|
|
3066
|
+
}, y = (D, E) => {
|
|
3067
|
+
console.log("[ManageFlow] Removing item:", { itemToRemove: D, listKey: E });
|
|
3068
3068
|
const L = {
|
|
3069
3069
|
...o,
|
|
3070
|
-
[E]: o[E].filter((
|
|
3070
|
+
[E]: o[E].filter((j) => j.id !== D.id)
|
|
3071
3071
|
};
|
|
3072
3072
|
p(L), console.log("[ManageFlow] Syncing updated shares with parent:", L), a(L, !0);
|
|
3073
|
-
}, z = ["users", "groups", "roles"],
|
|
3073
|
+
}, z = ["users", "groups", "roles"], $ = ["Users", "Groups", "Roles"];
|
|
3074
3074
|
return (
|
|
3075
3075
|
// The main structure remains the same...
|
|
3076
3076
|
/* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-gray-50", children: [
|
|
@@ -3098,7 +3098,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3098
3098
|
] }),
|
|
3099
3099
|
/* @__PURE__ */ e("div", { className: "flex flex-col flex-grow", children: /* @__PURE__ */ n(ne.Group, { selectedIndex: g, onChange: v, children: [
|
|
3100
3100
|
/* @__PURE__ */ n("div", { className: "p-4 bg-white border-b border-gray-300", children: [
|
|
3101
|
-
/* @__PURE__ */ e(ne.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children:
|
|
3101
|
+
/* @__PURE__ */ e(ne.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: $.map((D) => /* @__PURE__ */ e(
|
|
3102
3102
|
ne,
|
|
3103
3103
|
{
|
|
3104
3104
|
className: ({
|
|
@@ -3106,16 +3106,16 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3106
3106
|
}) => `w-full py-2 text-sm font-medium leading-5 rounded-md
|
|
3107
3107
|
focus:outline-none focus:ring-2 ring-offset-2 ring-offset-blue-400 ring-white ring-opacity-60
|
|
3108
3108
|
${E ? "bg-white shadow text-blue-700" : "text-gray-600 hover:bg-white/[0.6]"}`,
|
|
3109
|
-
children:
|
|
3109
|
+
children: D
|
|
3110
3110
|
},
|
|
3111
|
-
|
|
3111
|
+
D
|
|
3112
3112
|
)) }),
|
|
3113
3113
|
/* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ e(
|
|
3114
3114
|
fe,
|
|
3115
3115
|
{
|
|
3116
3116
|
onDebouncedChange: r,
|
|
3117
3117
|
value: x,
|
|
3118
|
-
placeholder: `Search in ${
|
|
3118
|
+
placeholder: `Search in ${$[g]}...`
|
|
3119
3119
|
}
|
|
3120
3120
|
) })
|
|
3121
3121
|
] }),
|
|
@@ -3126,11 +3126,11 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3126
3126
|
animate: { y: 0, opacity: 1 },
|
|
3127
3127
|
exit: { y: -10, opacity: 0 },
|
|
3128
3128
|
transition: { duration: 0.2 },
|
|
3129
|
-
children: /* @__PURE__ */ e(ne.Panels, { as: Z, children: z.map((
|
|
3129
|
+
children: /* @__PURE__ */ e(ne.Panels, { as: Z, children: z.map((D) => /* @__PURE__ */ e(
|
|
3130
3130
|
ne.Panel,
|
|
3131
3131
|
{
|
|
3132
3132
|
className: "space-y-3 focus:outline-none",
|
|
3133
|
-
children: /* @__PURE__ */ e(Se, { children: m[
|
|
3133
|
+
children: /* @__PURE__ */ e(Se, { children: m[D].length > 0 ? m[D].map((E) => /* @__PURE__ */ n(
|
|
3134
3134
|
ie.div,
|
|
3135
3135
|
{
|
|
3136
3136
|
layout: !0,
|
|
@@ -3154,12 +3154,12 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3154
3154
|
),
|
|
3155
3155
|
/* @__PURE__ */ n("div", { className: "overflow-hidden", children: [
|
|
3156
3156
|
/* @__PURE__ */ e("p", { className: "font-medium text-gray-900 truncate", children: E.name }),
|
|
3157
|
-
|
|
3157
|
+
D !== "users" && /* @__PURE__ */ e(
|
|
3158
3158
|
"button",
|
|
3159
3159
|
{
|
|
3160
3160
|
onClick: () => i({
|
|
3161
3161
|
id: E.id,
|
|
3162
|
-
type:
|
|
3162
|
+
type: D,
|
|
3163
3163
|
name: E.name
|
|
3164
3164
|
}),
|
|
3165
3165
|
className: "text-sm text-blue-600 hover:underline hover:cursor-pointer",
|
|
@@ -3171,7 +3171,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3171
3171
|
/* @__PURE__ */ e(
|
|
3172
3172
|
"button",
|
|
3173
3173
|
{
|
|
3174
|
-
onClick: () => y(E,
|
|
3174
|
+
onClick: () => y(E, D),
|
|
3175
3175
|
className: "text-gray-400 hover:text-red-500 hover:cursor-pointer p-1 rounded-full hover:bg-red-50",
|
|
3176
3176
|
title: "Remove access",
|
|
3177
3177
|
children: /* @__PURE__ */ e(Be, { className: "h-5 w-5" })
|
|
@@ -3192,16 +3192,16 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3192
3192
|
/* @__PURE__ */ e(Zt, { className: "h-12 w-12 text-gray-400" }),
|
|
3193
3193
|
/* @__PURE__ */ n("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: [
|
|
3194
3194
|
"No ",
|
|
3195
|
-
|
|
3195
|
+
$[g],
|
|
3196
3196
|
" Found"
|
|
3197
3197
|
] }),
|
|
3198
|
-
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: x ? `No results for "${x}"` : `There are no ${
|
|
3198
|
+
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: x ? `No results for "${x}"` : `There are no ${$[g].toLowerCase()} with access.` })
|
|
3199
3199
|
]
|
|
3200
3200
|
}
|
|
3201
3201
|
)
|
|
3202
3202
|
) })
|
|
3203
3203
|
},
|
|
3204
|
-
|
|
3204
|
+
D
|
|
3205
3205
|
)) })
|
|
3206
3206
|
},
|
|
3207
3207
|
g
|
|
@@ -3209,13 +3209,13 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3209
3209
|
] }) })
|
|
3210
3210
|
] })
|
|
3211
3211
|
);
|
|
3212
|
-
},
|
|
3212
|
+
}, Kn = () => /* @__PURE__ */ n("div", { className: "flex items-center gap-4 p-4", children: [
|
|
3213
3213
|
/* @__PURE__ */ e("div", { className: "h-10 w-10 rounded-full bg-gray-200 animate-pulse" }),
|
|
3214
3214
|
/* @__PURE__ */ n("div", { className: "flex-grow space-y-2", children: [
|
|
3215
3215
|
/* @__PURE__ */ e("div", { className: "h-4 w-3/5 rounded bg-gray-200 animate-pulse" }),
|
|
3216
3216
|
/* @__PURE__ */ e("div", { className: "h-3 w-4/5 rounded bg-gray-200 animate-pulse" })
|
|
3217
3217
|
] })
|
|
3218
|
-
] }),
|
|
3218
|
+
] }), es = ({
|
|
3219
3219
|
entity: t,
|
|
3220
3220
|
// { id, name, type: "group" | "role" }
|
|
3221
3221
|
onBack: a,
|
|
@@ -3238,7 +3238,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3238
3238
|
exit: { opacity: 0, x: -20 }
|
|
3239
3239
|
}, N = () => l ? (
|
|
3240
3240
|
// Show 5 skeleton items while loading
|
|
3241
|
-
/* @__PURE__ */ e("div", { children: Array.from({ length: 5 }).map((m, y) => /* @__PURE__ */ e(
|
|
3241
|
+
/* @__PURE__ */ e("div", { children: Array.from({ length: 5 }).map((m, y) => /* @__PURE__ */ e(Kn, {}, y)) })
|
|
3242
3242
|
) : v.length === 0 ? /* @__PURE__ */ n(
|
|
3243
3243
|
ie.div,
|
|
3244
3244
|
{
|
|
@@ -3326,7 +3326,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3326
3326
|
INVITE: "invite",
|
|
3327
3327
|
MANAGE: "manage",
|
|
3328
3328
|
MEMBERS: "members"
|
|
3329
|
-
},
|
|
3329
|
+
}, ts = ({
|
|
3330
3330
|
existingShares: t = {
|
|
3331
3331
|
users: [],
|
|
3332
3332
|
groups: [],
|
|
@@ -3343,12 +3343,12 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3343
3343
|
allowedPermissions: p = [],
|
|
3344
3344
|
...g
|
|
3345
3345
|
}) => {
|
|
3346
|
-
const [v, x] = P(ge.INVITE), [r, N] = P(t), [m, y] = P(null), [z,
|
|
3346
|
+
const [v, x] = P(ge.INVITE), [r, N] = P(t), [m, y] = P(null), [z, $] = P(!1), [D, E] = P([]), [L, j] = P(ge.MANAGE), U = () => {
|
|
3347
3347
|
x(ge.INVITE), y(null), h();
|
|
3348
3348
|
}, Y = () => {
|
|
3349
3349
|
x(ge.MANAGE);
|
|
3350
|
-
}, q = async ({ id:
|
|
3351
|
-
if (
|
|
3350
|
+
}, q = async ({ id: A, name: u, type: C }) => {
|
|
3351
|
+
if (C === "groups") {
|
|
3352
3352
|
try {
|
|
3353
3353
|
const M = await Ze(`${Xe.getMembersForGroup(u)}`);
|
|
3354
3354
|
} catch (M) {
|
|
@@ -3356,13 +3356,13 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3356
3356
|
}
|
|
3357
3357
|
E(resp);
|
|
3358
3358
|
}
|
|
3359
|
-
y({ id:
|
|
3360
|
-
},
|
|
3361
|
-
console.log("changedExistingShares",
|
|
3362
|
-
const
|
|
3363
|
-
console.log("Existing data:",
|
|
3364
|
-
const O = !it.isEqual(
|
|
3365
|
-
console.log("hasPermissionChanged:", O),
|
|
3359
|
+
y({ id: A, type: C, name: u }), j(v), x(ge.MEMBERS);
|
|
3360
|
+
}, T = (A, u = !1) => {
|
|
3361
|
+
console.log("changedExistingShares", A), N(A);
|
|
3362
|
+
const C = it.mapValues(t, (b) => b.map((c) => ({ id: c.id, permission: c.permission })).sort((c, f) => c.id - f.id)), M = it.mapValues(A, (b) => b.map((c) => ({ id: c.id, permission: c.permission })).sort((c, f) => c.id - f.id));
|
|
3363
|
+
console.log("Existing data:", C), console.log("Changed data:", M);
|
|
3364
|
+
const O = !it.isEqual(C, M);
|
|
3365
|
+
console.log("hasPermissionChanged:", O), $(O), O && (console.log("[AddUserGroupsRolesModal] Immediately syncing changes with parent"), s({ pendingInvites: [] }, A)), u && v === ge.MANAGE ? console.log("[AddUserGroupsRolesModal] Staying in ManageFlow after removal") : x(v === ge.MEMBERS ? L : ge.INVITE);
|
|
3366
3366
|
};
|
|
3367
3367
|
return /* @__PURE__ */ e(be, { appear: !0, show: a, as: Z, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose: U, children: [
|
|
3368
3368
|
/* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
|
|
@@ -3378,10 +3378,10 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3378
3378
|
transition: { duration: 0.3, ease: "easeInOut" },
|
|
3379
3379
|
className: "absolute top-0 left-0 w-full h-full",
|
|
3380
3380
|
children: /* @__PURE__ */ e(
|
|
3381
|
-
|
|
3381
|
+
Zn,
|
|
3382
3382
|
{
|
|
3383
3383
|
entity: i,
|
|
3384
|
-
onBack:
|
|
3384
|
+
onBack: T,
|
|
3385
3385
|
onClose: U,
|
|
3386
3386
|
onOpenMembers: q,
|
|
3387
3387
|
existingShares: r,
|
|
@@ -3402,14 +3402,14 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3402
3402
|
transition: { duration: 0.3, ease: "easeInOut" },
|
|
3403
3403
|
className: "absolute top-0 left-0 w-full h-full",
|
|
3404
3404
|
children: /* @__PURE__ */ e(
|
|
3405
|
-
|
|
3405
|
+
es,
|
|
3406
3406
|
{
|
|
3407
3407
|
entity: m,
|
|
3408
|
-
onBack:
|
|
3408
|
+
onBack: T,
|
|
3409
3409
|
onClose: U,
|
|
3410
3410
|
calledBy: l,
|
|
3411
3411
|
existingShares: r,
|
|
3412
|
-
members:
|
|
3412
|
+
members: D
|
|
3413
3413
|
}
|
|
3414
3414
|
)
|
|
3415
3415
|
},
|
|
@@ -3425,7 +3425,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3425
3425
|
transition: { duration: 0.3, ease: "easeInOut" },
|
|
3426
3426
|
className: "absolute top-0 left-0 w-full h-full",
|
|
3427
3427
|
children: /* @__PURE__ */ e(
|
|
3428
|
-
|
|
3428
|
+
Hn,
|
|
3429
3429
|
{
|
|
3430
3430
|
entity: i,
|
|
3431
3431
|
onManage: Y,
|
|
@@ -3433,8 +3433,8 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3433
3433
|
existingShares: r,
|
|
3434
3434
|
calledBy: l,
|
|
3435
3435
|
showExistingShares: o,
|
|
3436
|
-
onFinalSubmit: (
|
|
3437
|
-
s(
|
|
3436
|
+
onFinalSubmit: (A) => {
|
|
3437
|
+
s(A, r);
|
|
3438
3438
|
},
|
|
3439
3439
|
isChanged: z
|
|
3440
3440
|
}
|
|
@@ -3472,30 +3472,30 @@ function at({
|
|
|
3472
3472
|
getOptionId: m = (z) => String(z.id),
|
|
3473
3473
|
getOptionLabel: y = (z) => z.name
|
|
3474
3474
|
}) {
|
|
3475
|
-
const z = He(),
|
|
3476
|
-
const
|
|
3477
|
-
for (const u of a)
|
|
3478
|
-
return
|
|
3479
|
-
}, [a, m]), U = ee(() => Array.isArray(s) ? s.map((
|
|
3480
|
-
if (
|
|
3481
|
-
const
|
|
3482
|
-
return a.filter((u) => y(u).toLowerCase().includes(
|
|
3483
|
-
}, [a,
|
|
3475
|
+
const z = He(), $ = He(), [D, E] = P(""), L = he(""), j = ee(() => {
|
|
3476
|
+
const A = /* @__PURE__ */ new Map();
|
|
3477
|
+
for (const u of a) A.set(m(u), u);
|
|
3478
|
+
return A;
|
|
3479
|
+
}, [a, m]), U = ee(() => Array.isArray(s) ? s.map((A) => A && typeof A == "object" ? j.get(m(A)) || null : j.get(String(A))).filter(Boolean) : [], [s, j, m]), Y = ee(() => {
|
|
3480
|
+
if (!D) return a;
|
|
3481
|
+
const A = D.toLowerCase();
|
|
3482
|
+
return a.filter((u) => y(u).toLowerCase().includes(A));
|
|
3483
|
+
}, [a, D, y]);
|
|
3484
3484
|
K(() => {
|
|
3485
|
-
v === "server" &&
|
|
3486
|
-
}, [
|
|
3487
|
-
const q = v === "client" ? Y : a,
|
|
3485
|
+
v === "server" && D.length >= N && D !== L.current && (L.current = D, x && x(D));
|
|
3486
|
+
}, [D, v, N, x]);
|
|
3487
|
+
const q = v === "client" ? Y : a, T = () => {
|
|
3488
3488
|
if (!U.length)
|
|
3489
3489
|
return /* @__PURE__ */ e("span", { className: "text-gray-500", children: h });
|
|
3490
|
-
const
|
|
3490
|
+
const A = U.slice(0, p), u = U.length - p;
|
|
3491
3491
|
return /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2", children: [
|
|
3492
|
-
|
|
3492
|
+
A.map((C) => /* @__PURE__ */ e(
|
|
3493
3493
|
"span",
|
|
3494
3494
|
{
|
|
3495
3495
|
className: "px-2 py-1 text-xs font-medium text-white bg-gray-800 rounded-full",
|
|
3496
|
-
children: y(
|
|
3496
|
+
children: y(C)
|
|
3497
3497
|
},
|
|
3498
|
-
m(
|
|
3498
|
+
m(C)
|
|
3499
3499
|
)),
|
|
3500
3500
|
u > 0 && /* @__PURE__ */ n("span", { className: "px-2 py-1 text-xs font-medium text-gray-600 bg-gray-200 rounded-full", children: [
|
|
3501
3501
|
"+",
|
|
@@ -3504,10 +3504,10 @@ function at({
|
|
|
3504
3504
|
] })
|
|
3505
3505
|
] });
|
|
3506
3506
|
};
|
|
3507
|
-
return /* @__PURE__ */ e(le, { value: U, onChange: (
|
|
3508
|
-
const u = Array.from(new Set(
|
|
3507
|
+
return /* @__PURE__ */ e(le, { value: U, onChange: (A) => {
|
|
3508
|
+
const u = Array.from(new Set(A.map((C) => m(C))));
|
|
3509
3509
|
g !== -1 && u.length > g || i(u);
|
|
3510
|
-
}, multiple: !0, by: "id", children: ({ open:
|
|
3510
|
+
}, multiple: !0, by: "id", children: ({ open: A }) => /* @__PURE__ */ n("div", { children: [
|
|
3511
3511
|
/* @__PURE__ */ e(
|
|
3512
3512
|
le.Label,
|
|
3513
3513
|
{
|
|
@@ -3522,14 +3522,14 @@ function at({
|
|
|
3522
3522
|
{
|
|
3523
3523
|
"aria-labelledby": z,
|
|
3524
3524
|
"aria-invalid": !!o,
|
|
3525
|
-
"aria-describedby": o ?
|
|
3525
|
+
"aria-describedby": o ? $ : void 0,
|
|
3526
3526
|
onBlur: l,
|
|
3527
3527
|
className: qe(
|
|
3528
3528
|
"relative w-full min-h-[38px] cursor-default rounded-md bg-white py-1.5 pl-3 pr-10 text-left text-gray-900 shadow-sm ring-1 ring-inset focus:outline-none focus:ring-2 focus:ring-gray-600 sm:text-sm sm:leading-6",
|
|
3529
3529
|
o ? "ring-red-500" : "ring-gray-300"
|
|
3530
3530
|
),
|
|
3531
3531
|
children: [
|
|
3532
|
-
/* @__PURE__ */ e("span", { className: "block truncate", children:
|
|
3532
|
+
/* @__PURE__ */ e("span", { className: "block truncate", children: T() }),
|
|
3533
3533
|
/* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(Qt, { className: "w-5 h-5 text-gray-400", "aria-hidden": "true" }) })
|
|
3534
3534
|
]
|
|
3535
3535
|
}
|
|
@@ -3538,7 +3538,7 @@ function at({
|
|
|
3538
3538
|
be,
|
|
3539
3539
|
{
|
|
3540
3540
|
as: Z,
|
|
3541
|
-
show:
|
|
3541
|
+
show: A,
|
|
3542
3542
|
leave: "transition ease-in duration-100",
|
|
3543
3543
|
leaveFrom: "opacity-100",
|
|
3544
3544
|
leaveTo: "opacity-0",
|
|
@@ -3546,14 +3546,14 @@ function at({
|
|
|
3546
3546
|
/* @__PURE__ */ e("div", { className: "p-2 sticky top-0 bg-white z-20 shadow-sm", children: /* @__PURE__ */ e(
|
|
3547
3547
|
fe,
|
|
3548
3548
|
{
|
|
3549
|
-
value:
|
|
3549
|
+
value: D,
|
|
3550
3550
|
onDebouncedChange: E,
|
|
3551
3551
|
placeholder: v === "server" ? `Search (min ${N})…` : "Search options…"
|
|
3552
3552
|
}
|
|
3553
3553
|
) }),
|
|
3554
3554
|
v === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
|
|
3555
|
-
q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: v === "server" ?
|
|
3556
|
-
const
|
|
3555
|
+
q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: v === "server" ? D.length < N ? `Type at least ${N} characters to search.` : "No results." : "No options found." }) : q.map((u) => {
|
|
3556
|
+
const C = m(u), M = y(u), O = U.some((c) => m(c) === C), b = g !== -1 && U.length >= g && !O;
|
|
3557
3557
|
return /* @__PURE__ */ e(
|
|
3558
3558
|
le.Option,
|
|
3559
3559
|
{
|
|
@@ -3586,13 +3586,13 @@ function at({
|
|
|
3586
3586
|
)
|
|
3587
3587
|
] })
|
|
3588
3588
|
},
|
|
3589
|
-
|
|
3589
|
+
C
|
|
3590
3590
|
);
|
|
3591
3591
|
})
|
|
3592
3592
|
] })
|
|
3593
3593
|
}
|
|
3594
3594
|
),
|
|
3595
|
-
o && /* @__PURE__ */ e("p", { id:
|
|
3595
|
+
o && /* @__PURE__ */ e("p", { id: $, className: "mt-1 text-sm text-red-600", children: o })
|
|
3596
3596
|
] })
|
|
3597
3597
|
] }) });
|
|
3598
3598
|
}
|
|
@@ -3638,7 +3638,7 @@ at.defaultProps = {
|
|
|
3638
3638
|
getOptionId: (t) => String(t.id),
|
|
3639
3639
|
getOptionLabel: (t) => t.name
|
|
3640
3640
|
};
|
|
3641
|
-
const
|
|
3641
|
+
const jl = ({
|
|
3642
3642
|
isOpen: t = !1,
|
|
3643
3643
|
setIsOpen: a,
|
|
3644
3644
|
content: s,
|
|
@@ -3661,7 +3661,7 @@ const _l = ({
|
|
|
3661
3661
|
className: "relative z-50 overflow-y-auto",
|
|
3662
3662
|
children: [
|
|
3663
3663
|
/* @__PURE__ */ e(
|
|
3664
|
-
|
|
3664
|
+
Ur,
|
|
3665
3665
|
{
|
|
3666
3666
|
className: "fixed inset-0 bg-black/30",
|
|
3667
3667
|
onClick: g
|
|
@@ -3721,7 +3721,7 @@ const _l = ({
|
|
|
3721
3721
|
}
|
|
3722
3722
|
);
|
|
3723
3723
|
};
|
|
3724
|
-
function
|
|
3724
|
+
function as({ listeners: t = {}, attributes: a = {} }) {
|
|
3725
3725
|
return /* @__PURE__ */ e(
|
|
3726
3726
|
"button",
|
|
3727
3727
|
{
|
|
@@ -3735,7 +3735,7 @@ function rs({ listeners: t = {}, attributes: a = {} }) {
|
|
|
3735
3735
|
}
|
|
3736
3736
|
);
|
|
3737
3737
|
}
|
|
3738
|
-
function
|
|
3738
|
+
function rs({
|
|
3739
3739
|
node: t,
|
|
3740
3740
|
depth: a,
|
|
3741
3741
|
expanded: s,
|
|
@@ -3750,11 +3750,11 @@ function ns({
|
|
|
3750
3750
|
dropId: x,
|
|
3751
3751
|
indent: r = 24
|
|
3752
3752
|
}) {
|
|
3753
|
-
const { setNodeRef: N, isOver: m } = rr({ id: x }), { attributes: y, listeners: z, setNodeRef:
|
|
3754
|
-
const
|
|
3755
|
-
U(!1),
|
|
3753
|
+
const { setNodeRef: N, isOver: m } = rr({ id: x }), { attributes: y, listeners: z, setNodeRef: $, transform: D, isDragging: E } = nr({ id: v }), L = D ? { transform: `translate3d(${Math.round(D.x)}px, ${Math.round(D.y)}px, 0)` } : void 0, [j, U] = P(!1), [Y, q] = P(t.name), T = () => {
|
|
3754
|
+
const A = Y.trim();
|
|
3755
|
+
U(!1), A && A !== t.name ? o?.(t, A) : q(t.name);
|
|
3756
3756
|
}, _ = ee(() => /* @__PURE__ */ e(
|
|
3757
|
-
|
|
3757
|
+
Pn,
|
|
3758
3758
|
{
|
|
3759
3759
|
options: [
|
|
3760
3760
|
{ action: "create", label: "Create sub-folder" },
|
|
@@ -3772,26 +3772,26 @@ function ns({
|
|
|
3772
3772
|
ref: N,
|
|
3773
3773
|
className: `tv-row ${m ? "tv-drop-over" : ""} ${E ? "dragging" : ""}`,
|
|
3774
3774
|
style: { ...L, paddingLeft: 8 + a * r },
|
|
3775
|
-
onClick: (
|
|
3776
|
-
|
|
3775
|
+
onClick: (A) => {
|
|
3776
|
+
A.target.closest(".tv-toggle") || A.target.tagName === "INPUT" || l?.(t);
|
|
3777
3777
|
},
|
|
3778
3778
|
children: [
|
|
3779
3779
|
/* @__PURE__ */ e("button", { className: "tv-toggle", onClick: i, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(yt, { size: 16 }) : /* @__PURE__ */ e(xe, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
|
|
3780
3780
|
/* @__PURE__ */ e(Ve, { size: 16, className: "tv-folder-ic" }),
|
|
3781
|
-
/* @__PURE__ */ e("div", { className: "tv-name", ref:
|
|
3781
|
+
/* @__PURE__ */ e("div", { className: "tv-name", ref: $, children: j ? /* @__PURE__ */ e(
|
|
3782
3782
|
"input",
|
|
3783
3783
|
{
|
|
3784
3784
|
className: "tv-input",
|
|
3785
3785
|
value: Y,
|
|
3786
|
-
onChange: (
|
|
3787
|
-
onBlur:
|
|
3788
|
-
onKeyDown: (
|
|
3789
|
-
|
|
3786
|
+
onChange: (A) => q(A.target.value),
|
|
3787
|
+
onBlur: T,
|
|
3788
|
+
onKeyDown: (A) => {
|
|
3789
|
+
A.key === "Enter" && T(), A.key === "Escape" && (U(!1), q(t.name));
|
|
3790
3790
|
},
|
|
3791
3791
|
autoFocus: !0
|
|
3792
3792
|
}
|
|
3793
3793
|
) : /* @__PURE__ */ e("span", { onDoubleClick: () => U(!0), children: t.name }) }),
|
|
3794
|
-
/* @__PURE__ */ e(
|
|
3794
|
+
/* @__PURE__ */ e(as, { listeners: z, attributes: y }),
|
|
3795
3795
|
/* @__PURE__ */ e("div", { className: "tv-actions", children: g ? g(t, {
|
|
3796
3796
|
onCreateChild: () => h?.(t),
|
|
3797
3797
|
onRename: () => U(!0),
|
|
@@ -3801,8 +3801,8 @@ function ns({
|
|
|
3801
3801
|
}
|
|
3802
3802
|
);
|
|
3803
3803
|
}
|
|
3804
|
-
const
|
|
3805
|
-
function
|
|
3804
|
+
const ns = (t) => String(t.id ?? t._id), ss = (t) => t.parent !== void 0 ? String(t.parent) : t.parentId != null ? String(t.parentId) : "root", ls = (t) => t.name ?? t.label ?? "", is = (t) => Array.isArray(t) && t.some((a) => Array.isArray(a.children));
|
|
3805
|
+
function os(t, { rootId: a, getId: s, getParent: i, getName: l }) {
|
|
3806
3806
|
const h = /* @__PURE__ */ new Map();
|
|
3807
3807
|
t.forEach((p) => {
|
|
3808
3808
|
const g = s(p);
|
|
@@ -3820,7 +3820,7 @@ function cs(t, { rootId: a, getId: s, getParent: i, getName: l }) {
|
|
|
3820
3820
|
g !== a && h.has(g) ? h.get(g).children.push(p) : o.push(p);
|
|
3821
3821
|
}), { roots: o, byId: h };
|
|
3822
3822
|
}
|
|
3823
|
-
function
|
|
3823
|
+
function cs(t, { rootId: a, getId: s, getName: i }) {
|
|
3824
3824
|
const l = /* @__PURE__ */ new Map();
|
|
3825
3825
|
function h(p, g) {
|
|
3826
3826
|
const v = s(p), x = {
|
|
@@ -3835,7 +3835,7 @@ function ds(t, { rootId: a, getId: s, getName: i }) {
|
|
|
3835
3835
|
return { roots: t.map((p) => h(p, null)), byId: l };
|
|
3836
3836
|
}
|
|
3837
3837
|
const Pe = (t) => t.map((a) => ({ ...a, children: Pe(a.children || []) }));
|
|
3838
|
-
function
|
|
3838
|
+
function ds(t, a) {
|
|
3839
3839
|
let s = null;
|
|
3840
3840
|
function i(h) {
|
|
3841
3841
|
return h.map((o) => {
|
|
@@ -3850,7 +3850,7 @@ function ms(t, a) {
|
|
|
3850
3850
|
}
|
|
3851
3851
|
return { newRoots: i(t), removed: s };
|
|
3852
3852
|
}
|
|
3853
|
-
function
|
|
3853
|
+
function ms(t, a, s) {
|
|
3854
3854
|
function i(l) {
|
|
3855
3855
|
return l.map((h) => {
|
|
3856
3856
|
if (h.id === a)
|
|
@@ -3874,13 +3874,13 @@ function ya(t, a, s = null) {
|
|
|
3874
3874
|
}
|
|
3875
3875
|
return null;
|
|
3876
3876
|
}
|
|
3877
|
-
function
|
|
3877
|
+
function _l({
|
|
3878
3878
|
data: t = [],
|
|
3879
3879
|
rootId: a = "root",
|
|
3880
3880
|
title: s = "Folders",
|
|
3881
|
-
getId: i =
|
|
3882
|
-
getParent: l =
|
|
3883
|
-
getName: h =
|
|
3881
|
+
getId: i = ns,
|
|
3882
|
+
getParent: l = ss,
|
|
3883
|
+
getName: h = ls,
|
|
3884
3884
|
onSelect: o,
|
|
3885
3885
|
onCreateRoot: p,
|
|
3886
3886
|
onCreateChild: g,
|
|
@@ -3892,42 +3892,42 @@ function Ul({
|
|
|
3892
3892
|
// ← allow root moves by default now
|
|
3893
3893
|
indentUnit: y = 24
|
|
3894
3894
|
}) {
|
|
3895
|
-
const { roots: z } = ee(() =>
|
|
3895
|
+
const { roots: z } = ee(() => is(t) ? cs(t, { rootId: a, getId: i, getName: h }) : os(
|
|
3896
3896
|
t.map((b) => ({ ...b })),
|
|
3897
3897
|
{ rootId: a, getId: i, getParent: l, getName: h }
|
|
3898
|
-
), [t, a, i, l, h]), [
|
|
3898
|
+
), [t, a, i, l, h]), [$, D] = P({}), E = H((b) => {
|
|
3899
3899
|
const c = {};
|
|
3900
3900
|
return (function f(w) {
|
|
3901
|
-
w.forEach((
|
|
3902
|
-
c[
|
|
3901
|
+
w.forEach((S) => {
|
|
3902
|
+
c[S.id] = !0, S.children?.length && f(S.children);
|
|
3903
3903
|
});
|
|
3904
3904
|
})(b), c;
|
|
3905
3905
|
}, []);
|
|
3906
3906
|
ae.useEffect(() => {
|
|
3907
|
-
|
|
3907
|
+
D(E(z));
|
|
3908
3908
|
}, [z, E]);
|
|
3909
3909
|
const L = H(
|
|
3910
|
-
(b) =>
|
|
3910
|
+
(b) => D((c) => ({ ...c, [b]: !c[b] })),
|
|
3911
3911
|
[]
|
|
3912
|
-
), [
|
|
3912
|
+
), [j, U] = P(() => Pe(z));
|
|
3913
3913
|
ae.useEffect(() => U(Pe(z)), [z]);
|
|
3914
3914
|
const Y = sr(
|
|
3915
3915
|
lr(dr, { activationConstraint: { delay: 250, tolerance: 5 } })
|
|
3916
|
-
), q = he(null), [
|
|
3917
|
-
},
|
|
3918
|
-
|
|
3916
|
+
), q = he(null), [T, _] = P(null), A = he(0), u = () => {
|
|
3917
|
+
}, C = ({ delta: b }) => {
|
|
3918
|
+
A.current = b?.x ?? 0;
|
|
3919
3919
|
}, M = H(
|
|
3920
3920
|
({ active: b, over: c }) => {
|
|
3921
|
-
const f =
|
|
3922
|
-
if (
|
|
3923
|
-
const w = String(b.id).replace(/^drag-/, ""),
|
|
3924
|
-
if (!w || !
|
|
3925
|
-
let I =
|
|
3921
|
+
const f = A.current;
|
|
3922
|
+
if (A.current = 0, _(null), !b || !c) return;
|
|
3923
|
+
const w = String(b.id).replace(/^drag-/, ""), S = String(c.id).replace(/^drop-/, "");
|
|
3924
|
+
if (!w || !S || w === S) return;
|
|
3925
|
+
let I = S;
|
|
3926
3926
|
const k = Math.max(0, Math.floor(-f / y));
|
|
3927
3927
|
if (k > 0) {
|
|
3928
|
-
let W =
|
|
3928
|
+
let W = S;
|
|
3929
3929
|
for (let pe = 0; pe < k; pe++) {
|
|
3930
|
-
const Ne = ya(
|
|
3930
|
+
const Ne = ya(j, W, null);
|
|
3931
3931
|
if (!Ne) break;
|
|
3932
3932
|
if (!Ne.parentId) {
|
|
3933
3933
|
I = a;
|
|
@@ -3940,20 +3940,20 @@ function Ul({
|
|
|
3940
3940
|
U(Pe(z));
|
|
3941
3941
|
return;
|
|
3942
3942
|
}
|
|
3943
|
-
const R = Pe(
|
|
3943
|
+
const R = Pe(j), { newRoots: V, removed: F } = ds(R, w);
|
|
3944
3944
|
if (!F) return;
|
|
3945
|
-
const G =
|
|
3945
|
+
const G = ms(V, I, F);
|
|
3946
3946
|
U(G), r?.({ sourceId: w, destParentId: I, newTree: G });
|
|
3947
3947
|
},
|
|
3948
|
-
[
|
|
3948
|
+
[j, z, a, m, y, r]
|
|
3949
3949
|
), O = H(
|
|
3950
3950
|
(b, c = 0) => b.map((f) => /* @__PURE__ */ n(ae.Fragment, { children: [
|
|
3951
3951
|
/* @__PURE__ */ e(
|
|
3952
|
-
|
|
3952
|
+
rs,
|
|
3953
3953
|
{
|
|
3954
3954
|
node: f,
|
|
3955
3955
|
depth: c,
|
|
3956
|
-
expanded:
|
|
3956
|
+
expanded: !!$[f.id],
|
|
3957
3957
|
onToggle: () => L(f.id),
|
|
3958
3958
|
onSelect: o,
|
|
3959
3959
|
onCreateChild: g,
|
|
@@ -3965,23 +3965,23 @@ function Ul({
|
|
|
3965
3965
|
indent: y
|
|
3966
3966
|
}
|
|
3967
3967
|
),
|
|
3968
|
-
|
|
3968
|
+
$[f.id] && f.children?.length > 0 ? O(f.children, c + 1) : null
|
|
3969
3969
|
] }, f.id)),
|
|
3970
|
-
[
|
|
3970
|
+
[$, y, g, x, v, o, N, L]
|
|
3971
3971
|
);
|
|
3972
3972
|
return ae.useMemo(() => {
|
|
3973
|
-
if (!
|
|
3974
|
-
const b = String(
|
|
3973
|
+
if (!T) return null;
|
|
3974
|
+
const b = String(T).replace(/^drag-/, "");
|
|
3975
3975
|
function c(f) {
|
|
3976
3976
|
for (const w of f) {
|
|
3977
3977
|
if (w.id === b) return w;
|
|
3978
|
-
const
|
|
3979
|
-
if (
|
|
3978
|
+
const S = w.children?.length ? c(w.children) : null;
|
|
3979
|
+
if (S) return S;
|
|
3980
3980
|
}
|
|
3981
3981
|
return null;
|
|
3982
3982
|
}
|
|
3983
|
-
return c(
|
|
3984
|
-
}, [
|
|
3983
|
+
return c(j);
|
|
3984
|
+
}, [T, j]), /* @__PURE__ */ n("div", { className: "tv", children: [
|
|
3985
3985
|
s !== !1 && /* @__PURE__ */ n("div", { className: "tv-header", children: [
|
|
3986
3986
|
/* @__PURE__ */ e("div", { className: "tv-title", children: s }),
|
|
3987
3987
|
/* @__PURE__ */ e("button", { className: "tv-btn", onClick: p, children: "+ New folder" })
|
|
@@ -3997,10 +3997,10 @@ function Ul({
|
|
|
3997
3997
|
collisionDetection: cr,
|
|
3998
3998
|
sensors: Y,
|
|
3999
3999
|
onDragStart: u,
|
|
4000
|
-
onDragMove:
|
|
4000
|
+
onDragMove: C,
|
|
4001
4001
|
onDragEnd: M,
|
|
4002
4002
|
modifiers: [or],
|
|
4003
|
-
children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: O(
|
|
4003
|
+
children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: O(j, 0) })
|
|
4004
4004
|
}
|
|
4005
4005
|
)
|
|
4006
4006
|
] });
|
|
@@ -4008,7 +4008,7 @@ function Ul({
|
|
|
4008
4008
|
function ze(...t) {
|
|
4009
4009
|
return t.filter(Boolean).join(" ");
|
|
4010
4010
|
}
|
|
4011
|
-
const
|
|
4011
|
+
const Ul = ({
|
|
4012
4012
|
tabs: t = [],
|
|
4013
4013
|
keepMounted: a = !0,
|
|
4014
4014
|
orientation: s = "horizontal",
|
|
@@ -4037,11 +4037,11 @@ const Gl = ({
|
|
|
4037
4037
|
] })
|
|
4038
4038
|
) });
|
|
4039
4039
|
};
|
|
4040
|
-
function
|
|
4040
|
+
function Gl(t, a = "YYYY-MM-DD HH:mm:ss") {
|
|
4041
4041
|
return t ? (t.endsWith("Z") || /[+\-]\d{2}:?\d{2}$/.test(t) ? St.parseZone(t) : St.utc(t)).local().format(a) : null;
|
|
4042
4042
|
}
|
|
4043
4043
|
d.string;
|
|
4044
|
-
function
|
|
4044
|
+
function us({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
4045
4045
|
console.log(t);
|
|
4046
4046
|
const [l, h] = ae.useState(t), [o, p] = ae.useState(() => {
|
|
4047
4047
|
const r = a && a[t.key] || {};
|
|
@@ -4373,7 +4373,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4373
4373
|
}
|
|
4374
4374
|
) }),
|
|
4375
4375
|
r.fieldtype === "daterange" && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
4376
|
-
|
|
4376
|
+
Sn,
|
|
4377
4377
|
{
|
|
4378
4378
|
label: r.label,
|
|
4379
4379
|
value: o[r.key] || { from: null, to: null },
|
|
@@ -4543,7 +4543,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4543
4543
|
] }),
|
|
4544
4544
|
r.fieldtype === "managecollectionlist" && /* @__PURE__ */ n("div", { children: [
|
|
4545
4545
|
/* @__PURE__ */ e(
|
|
4546
|
-
|
|
4546
|
+
xs,
|
|
4547
4547
|
{
|
|
4548
4548
|
endpoints: r.endpoints || {},
|
|
4549
4549
|
initialData: o[r.key] || r.initialData || [],
|
|
@@ -4575,23 +4575,23 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4575
4575
|
] }, N)) })
|
|
4576
4576
|
] }) });
|
|
4577
4577
|
}
|
|
4578
|
-
const
|
|
4579
|
-
function
|
|
4578
|
+
const hs = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
|
|
4579
|
+
function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
4580
4580
|
console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
|
|
4581
4581
|
const [l, h] = P(t), [o, p] = P(null), [g, v] = P(null);
|
|
4582
4582
|
console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
|
|
4583
4583
|
const [x, r] = P(() => {
|
|
4584
4584
|
const u = a && a[l.key] || [];
|
|
4585
|
-
let
|
|
4586
|
-
return u.length > 0 ?
|
|
4585
|
+
let C;
|
|
4586
|
+
return u.length > 0 ? C = u.map((M, O) => ({
|
|
4587
4587
|
...M,
|
|
4588
4588
|
id: M.id !== void 0 ? M.id : O
|
|
4589
|
-
})) :
|
|
4589
|
+
})) : C = [{ id: 0 }], console.log(`[DataTableRenderer] ${l.key} - Initial data:`, C), C;
|
|
4590
4590
|
}), N = he(a), m = he(null);
|
|
4591
4591
|
K(() => {
|
|
4592
|
-
const u = a && a[l.key] || [],
|
|
4593
|
-
if (JSON.stringify(u) !== JSON.stringify(
|
|
4594
|
-
console.log(`[DataTableRenderer] ${l.key} - Section data changed`), console.log(`[DataTableRenderer] ${l.key} - Previous:`,
|
|
4592
|
+
const u = a && a[l.key] || [], C = m.current;
|
|
4593
|
+
if (JSON.stringify(u) !== JSON.stringify(C)) {
|
|
4594
|
+
console.log(`[DataTableRenderer] ${l.key} - Section data changed`), console.log(`[DataTableRenderer] ${l.key} - Previous:`, C), console.log(`[DataTableRenderer] ${l.key} - Current:`, u), N.current = a, m.current = u;
|
|
4595
4595
|
let O;
|
|
4596
4596
|
u.length > 0 ? O = u.map((b, c) => ({
|
|
4597
4597
|
...b,
|
|
@@ -4599,16 +4599,16 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4599
4599
|
})) : O = [{ id: 0 }], console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, O), r(O);
|
|
4600
4600
|
}
|
|
4601
4601
|
}, [a, l.key]);
|
|
4602
|
-
const y = he(x), z = he(null),
|
|
4602
|
+
const y = he(x), z = he(null), $ = he(!1);
|
|
4603
4603
|
K(() => {
|
|
4604
|
-
y.current !== x && s && typeof s == "function" && (y.current = x, z.current && clearTimeout(z.current),
|
|
4604
|
+
y.current !== x && s && typeof s == "function" && (y.current = x, z.current && clearTimeout(z.current), $.current ? (console.log("[DataTableRenderer] Executing immediate update for audience change"), $.current = !1, s(l.key, x)) : z.current = setTimeout(() => {
|
|
4605
4605
|
s(l.key, x);
|
|
4606
4606
|
}, 300));
|
|
4607
4607
|
}, [l.key, x, s]), K(() => () => {
|
|
4608
4608
|
z.current && clearTimeout(z.current);
|
|
4609
4609
|
}, []);
|
|
4610
|
-
const
|
|
4611
|
-
const
|
|
4610
|
+
const D = (u) => {
|
|
4611
|
+
const C = (b, c) => {
|
|
4612
4612
|
console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: b, value: c, type: typeof c }), r((f) => {
|
|
4613
4613
|
const w = [...f];
|
|
4614
4614
|
return w[b][u.key] = c, w;
|
|
@@ -4624,7 +4624,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4624
4624
|
X,
|
|
4625
4625
|
{
|
|
4626
4626
|
value: b[u.key] || "",
|
|
4627
|
-
onChange: (f) =>
|
|
4627
|
+
onChange: (f) => C(c, f.target.value),
|
|
4628
4628
|
placeholder: u.placeholder || `Enter ${u.label}`,
|
|
4629
4629
|
required: u.required,
|
|
4630
4630
|
className: `w-full ${M(c) ? "border-red-500" : ""}`
|
|
@@ -4638,7 +4638,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4638
4638
|
ca,
|
|
4639
4639
|
{
|
|
4640
4640
|
value: b[u.key] || "",
|
|
4641
|
-
onChange: (f) =>
|
|
4641
|
+
onChange: (f) => C(c, f.target.value),
|
|
4642
4642
|
placeholder: u.placeholder || `Enter ${u.label}`,
|
|
4643
4643
|
required: u.required,
|
|
4644
4644
|
className: `w-full ${M(c) ? "border-red-500" : ""}`,
|
|
@@ -4657,12 +4657,12 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4657
4657
|
min: u.min,
|
|
4658
4658
|
max: u.max,
|
|
4659
4659
|
step: u.step,
|
|
4660
|
-
onChange: (f) =>
|
|
4660
|
+
onChange: (f) => C(c, f.target.value),
|
|
4661
4661
|
onBlur: (f) => {
|
|
4662
4662
|
const w = f.target.value;
|
|
4663
4663
|
if (w !== "" && w !== null && w !== void 0) {
|
|
4664
|
-
const
|
|
4665
|
-
isNaN(
|
|
4664
|
+
const S = Number(w);
|
|
4665
|
+
isNaN(S) || (u.min !== void 0 && S < u.min ? (f.target.setCustomValidity(`${u.label} must be at least ${u.min}`), f.target.reportValidity()) : u.max !== void 0 && S > u.max ? (f.target.setCustomValidity(`${u.label} must not exceed ${u.max}`), f.target.reportValidity()) : f.target.setCustomValidity(""));
|
|
4666
4666
|
}
|
|
4667
4667
|
},
|
|
4668
4668
|
placeholder: u.placeholder || `Enter ${u.label}`,
|
|
@@ -4687,7 +4687,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4687
4687
|
{
|
|
4688
4688
|
type: "email",
|
|
4689
4689
|
value: b[u.key] || "",
|
|
4690
|
-
onChange: (f) =>
|
|
4690
|
+
onChange: (f) => C(c, f.target.value),
|
|
4691
4691
|
placeholder: u.placeholder || "Enter email address",
|
|
4692
4692
|
required: u.required,
|
|
4693
4693
|
className: `w-full ${M(c) ? "border-red-500" : ""}`
|
|
@@ -4702,7 +4702,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4702
4702
|
{
|
|
4703
4703
|
type: "url",
|
|
4704
4704
|
value: b[u.key] || "",
|
|
4705
|
-
onChange: (f) =>
|
|
4705
|
+
onChange: (f) => C(c, f.target.value),
|
|
4706
4706
|
placeholder: u.placeholder || "Enter URL",
|
|
4707
4707
|
required: u.required,
|
|
4708
4708
|
className: `w-full ${M(c) ? "border-red-500" : ""}`
|
|
@@ -4717,7 +4717,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4717
4717
|
{
|
|
4718
4718
|
type: "password",
|
|
4719
4719
|
value: b[u.key] || "",
|
|
4720
|
-
onChange: (f) =>
|
|
4720
|
+
onChange: (f) => C(c, f.target.value),
|
|
4721
4721
|
placeholder: u.placeholder || "Enter password",
|
|
4722
4722
|
required: u.required,
|
|
4723
4723
|
className: `w-full ${M(c) ? "border-red-500" : ""}`
|
|
@@ -4732,7 +4732,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4732
4732
|
pt,
|
|
4733
4733
|
{
|
|
4734
4734
|
value: b[u.key] || "",
|
|
4735
|
-
onChange: (f) =>
|
|
4735
|
+
onChange: (f) => C(c, f),
|
|
4736
4736
|
options: u.options || [],
|
|
4737
4737
|
placeholder: u.placeholder || `Select ${u.label}`,
|
|
4738
4738
|
required: u.required,
|
|
@@ -4745,11 +4745,11 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4745
4745
|
return (b, c) => {
|
|
4746
4746
|
const f = () => {
|
|
4747
4747
|
if (u.optionsFrom && a) {
|
|
4748
|
-
const { config: w, valueField:
|
|
4748
|
+
const { config: w, valueField: S, labelField: I } = u.optionsFrom, k = a[w] || [];
|
|
4749
4749
|
if (Array.isArray(k))
|
|
4750
4750
|
return k.map((R) => ({
|
|
4751
|
-
id: R[
|
|
4752
|
-
value: R[
|
|
4751
|
+
id: R[S] || "",
|
|
4752
|
+
value: R[S] || "",
|
|
4753
4753
|
label: R[I] || ""
|
|
4754
4754
|
}));
|
|
4755
4755
|
}
|
|
@@ -4761,7 +4761,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4761
4761
|
{
|
|
4762
4762
|
index: c,
|
|
4763
4763
|
value: b[u.key] || "",
|
|
4764
|
-
onChange: (w) =>
|
|
4764
|
+
onChange: (w) => C(c, w),
|
|
4765
4765
|
options: f(),
|
|
4766
4766
|
placeholder: u.placeholder || `Select ${u.label}`,
|
|
4767
4767
|
required: u.required,
|
|
@@ -4779,7 +4779,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4779
4779
|
at,
|
|
4780
4780
|
{
|
|
4781
4781
|
selectedItems: f,
|
|
4782
|
-
onSelectionChange: (w) =>
|
|
4782
|
+
onSelectionChange: (w) => C(c, w),
|
|
4783
4783
|
options: u.options || [],
|
|
4784
4784
|
placeholder: u.placeholder || `Select ${u.label}`,
|
|
4785
4785
|
className: "w-full"
|
|
@@ -4792,7 +4792,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4792
4792
|
mt,
|
|
4793
4793
|
{
|
|
4794
4794
|
checked: !!b[u.key],
|
|
4795
|
-
onChange: (f) =>
|
|
4795
|
+
onChange: (f) => C(c, f),
|
|
4796
4796
|
label: u.placeholder || u.label,
|
|
4797
4797
|
className: "w-full"
|
|
4798
4798
|
}
|
|
@@ -4803,7 +4803,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4803
4803
|
da,
|
|
4804
4804
|
{
|
|
4805
4805
|
isOn: !!b[u.key],
|
|
4806
|
-
onToggle: (f) =>
|
|
4806
|
+
onToggle: (f) => C(c, f),
|
|
4807
4807
|
label: u.placeholder || u.label,
|
|
4808
4808
|
className: "w-full"
|
|
4809
4809
|
}
|
|
@@ -4813,7 +4813,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4813
4813
|
sa,
|
|
4814
4814
|
{
|
|
4815
4815
|
selectedDate: b[u.key] ? new Date(b[u.key]) : null,
|
|
4816
|
-
onDateChange: (f) =>
|
|
4816
|
+
onDateChange: (f) => C(c, f ? f.toISOString().split("T")[0] : ""),
|
|
4817
4817
|
placeholder: u.placeholder || "Select date",
|
|
4818
4818
|
className: "w-full"
|
|
4819
4819
|
}
|
|
@@ -4824,7 +4824,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4824
4824
|
{
|
|
4825
4825
|
type: "datetime-local",
|
|
4826
4826
|
value: b[u.key] || "",
|
|
4827
|
-
onChange: (f) =>
|
|
4827
|
+
onChange: (f) => C(c, f.target.value),
|
|
4828
4828
|
placeholder: u.placeholder || "Select date and time",
|
|
4829
4829
|
required: u.required,
|
|
4830
4830
|
className: "w-full"
|
|
@@ -4836,7 +4836,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4836
4836
|
{
|
|
4837
4837
|
type: "time",
|
|
4838
4838
|
value: b[u.key] || "",
|
|
4839
|
-
onChange: (f) =>
|
|
4839
|
+
onChange: (f) => C(c, f.target.value),
|
|
4840
4840
|
placeholder: u.placeholder || "Select time",
|
|
4841
4841
|
required: u.required,
|
|
4842
4842
|
className: "w-full"
|
|
@@ -4847,7 +4847,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4847
4847
|
la,
|
|
4848
4848
|
{
|
|
4849
4849
|
selectedValue: b[u.key] || "",
|
|
4850
|
-
onValueChange: (f) =>
|
|
4850
|
+
onValueChange: (f) => C(c, f),
|
|
4851
4851
|
options: u.options || [],
|
|
4852
4852
|
className: "w-full"
|
|
4853
4853
|
}
|
|
@@ -4857,7 +4857,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4857
4857
|
fe,
|
|
4858
4858
|
{
|
|
4859
4859
|
value: b[u.key] || "",
|
|
4860
|
-
onChange: (f) =>
|
|
4860
|
+
onChange: (f) => C(c, f),
|
|
4861
4861
|
placeholder: u.placeholder || `Search ${u.label}`,
|
|
4862
4862
|
className: "w-full"
|
|
4863
4863
|
}
|
|
@@ -4870,12 +4870,12 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4870
4870
|
...f.roles || []
|
|
4871
4871
|
];
|
|
4872
4872
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
4873
|
-
/* @__PURE__ */ e(
|
|
4873
|
+
/* @__PURE__ */ e(hs, { children: w.length > 0 ? w.slice(0, 3).map((S, I) => /* @__PURE__ */ e(
|
|
4874
4874
|
we,
|
|
4875
4875
|
{
|
|
4876
4876
|
size: "small",
|
|
4877
|
-
name:
|
|
4878
|
-
src:
|
|
4877
|
+
name: S.name || S.displayName || S.id,
|
|
4878
|
+
src: S.avatarUrl
|
|
4879
4879
|
},
|
|
4880
4880
|
I
|
|
4881
4881
|
)) : null }),
|
|
@@ -4897,7 +4897,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4897
4897
|
{
|
|
4898
4898
|
type: "color",
|
|
4899
4899
|
value: b[u.key] || "#000000",
|
|
4900
|
-
onChange: (f) =>
|
|
4900
|
+
onChange: (f) => C(c, f.target.value),
|
|
4901
4901
|
className: "w-full h-10"
|
|
4902
4902
|
}
|
|
4903
4903
|
);
|
|
@@ -4908,7 +4908,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4908
4908
|
{
|
|
4909
4909
|
type: "range",
|
|
4910
4910
|
value: b[u.key] || u.min || 0,
|
|
4911
|
-
onChange: (f) =>
|
|
4911
|
+
onChange: (f) => C(c, f.target.value),
|
|
4912
4912
|
min: u.min || 0,
|
|
4913
4913
|
max: u.max || 100,
|
|
4914
4914
|
step: u.step || 1,
|
|
@@ -4924,7 +4924,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4924
4924
|
type: "file",
|
|
4925
4925
|
onChange: (f) => {
|
|
4926
4926
|
const w = f.target.files[0];
|
|
4927
|
-
|
|
4927
|
+
C(c, w ? w.name : "");
|
|
4928
4928
|
},
|
|
4929
4929
|
accept: u.accept,
|
|
4930
4930
|
className: "w-full"
|
|
@@ -4936,7 +4936,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4936
4936
|
{
|
|
4937
4937
|
type: "hidden",
|
|
4938
4938
|
value: b[u.key] || "",
|
|
4939
|
-
onChange: (f) =>
|
|
4939
|
+
onChange: (f) => C(c, f.target.value)
|
|
4940
4940
|
}
|
|
4941
4941
|
);
|
|
4942
4942
|
// Default fallback for unknown field types
|
|
@@ -4946,7 +4946,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4946
4946
|
X,
|
|
4947
4947
|
{
|
|
4948
4948
|
value: b[u.key] || "",
|
|
4949
|
-
onChange: (f) =>
|
|
4949
|
+
onChange: (f) => C(c, f.target.value),
|
|
4950
4950
|
placeholder: u.placeholder || `Enter ${u.label}`,
|
|
4951
4951
|
required: u.required,
|
|
4952
4952
|
className: `w-full ${M(c) ? "border-red-500" : ""}`
|
|
@@ -4969,42 +4969,42 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4969
4969
|
return console.log("[DataTableRenderer] Updated data:", b), b;
|
|
4970
4970
|
});
|
|
4971
4971
|
}, [l.fields]), L = H((u) => {
|
|
4972
|
-
r((
|
|
4973
|
-
if (
|
|
4974
|
-
return
|
|
4975
|
-
const M = [...
|
|
4972
|
+
r((C) => {
|
|
4973
|
+
if (C.length <= 1)
|
|
4974
|
+
return C;
|
|
4975
|
+
const M = [...C];
|
|
4976
4976
|
return M.splice(u, 1), M;
|
|
4977
4977
|
});
|
|
4978
|
-
}, []), [
|
|
4979
|
-
U(
|
|
4978
|
+
}, []), [j, U] = P(null), Y = H((u, C) => {
|
|
4979
|
+
U(C), u.dataTransfer.effectAllowed = "move", u.dataTransfer.setData("text/html", "");
|
|
4980
4980
|
}, []), q = H((u) => {
|
|
4981
4981
|
u.preventDefault(), u.dataTransfer.dropEffect = "move";
|
|
4982
|
-
}, []),
|
|
4983
|
-
u.preventDefault(), !(
|
|
4984
|
-
const O = [...M], b = O[
|
|
4985
|
-
return O.splice(
|
|
4982
|
+
}, []), T = H((u, C) => {
|
|
4983
|
+
u.preventDefault(), !(j === null || j === C) && (r((M) => {
|
|
4984
|
+
const O = [...M], b = O[j];
|
|
4985
|
+
return O.splice(j, 1), O.splice(C, 0, b), O;
|
|
4986
4986
|
}), U(null));
|
|
4987
|
-
}, [
|
|
4987
|
+
}, [j]), _ = H(() => {
|
|
4988
4988
|
U(null);
|
|
4989
|
-
}, []),
|
|
4990
|
-
console.log("[DataTableRenderer] handleAddAudience called with:", { selectedEntities: u, existingShares:
|
|
4989
|
+
}, []), A = H((u, C) => {
|
|
4990
|
+
console.log("[DataTableRenderer] handleAddAudience called with:", { selectedEntities: u, existingShares: C }), r((O) => {
|
|
4991
4991
|
const b = [...O];
|
|
4992
4992
|
if (o !== null && g && b[o]) {
|
|
4993
4993
|
const c = u?.pendingInvites || [];
|
|
4994
4994
|
if (c.length > 0) {
|
|
4995
4995
|
console.log("[DataTableRenderer] Adding new pending invites:", c);
|
|
4996
|
-
const f = c.filter((k) => k.type === "User"), w = c.filter((k) => k.type === "Group"),
|
|
4996
|
+
const f = c.filter((k) => k.type === "User"), w = c.filter((k) => k.type === "Group"), S = c.filter((k) => k.type === "Role"), I = b[o][g] || { users: [], groups: [], roles: [] };
|
|
4997
4997
|
b[o][g] = {
|
|
4998
4998
|
users: [...I.users || [], ...f],
|
|
4999
4999
|
groups: [...I.groups || [], ...w],
|
|
5000
|
-
roles: [...I.roles || [], ...
|
|
5000
|
+
roles: [...I.roles || [], ...S]
|
|
5001
5001
|
}, console.log("[DataTableRenderer] Added new audience members:", b[o][g]);
|
|
5002
|
-
} else
|
|
5003
|
-
users:
|
|
5004
|
-
groups:
|
|
5005
|
-
roles:
|
|
5002
|
+
} else C && (console.log("[DataTableRenderer] Updating audience from ManageFlow with existing shares:", C), b[o][g] = {
|
|
5003
|
+
users: C.users || [],
|
|
5004
|
+
groups: C.groups || [],
|
|
5005
|
+
roles: C.roles || []
|
|
5006
5006
|
}, console.log("[DataTableRenderer] Updated audience from ManageFlow:", b[o][g]));
|
|
5007
|
-
console.log("[DataTableRenderer] Final audience data:", b[o][g]),
|
|
5007
|
+
console.log("[DataTableRenderer] Final audience data:", b[o][g]), $.current = !0;
|
|
5008
5008
|
}
|
|
5009
5009
|
return b;
|
|
5010
5010
|
}), (u?.pendingInvites || []).length > 0 && (p(null), v(null));
|
|
@@ -5027,32 +5027,32 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5027
5027
|
/* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ n("table", { className: "min-w-full bg-white border border-gray-300", style: { marginBottom: "20px" }, children: [
|
|
5028
5028
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { className: "bg-gray-50", children: [
|
|
5029
5029
|
/* @__PURE__ */ e("th", { className: "px-4 py-2 w-10" }),
|
|
5030
|
-
l.fields.map((u,
|
|
5030
|
+
l.fields.map((u, C) => /* @__PURE__ */ e(
|
|
5031
5031
|
"th",
|
|
5032
5032
|
{
|
|
5033
5033
|
className: "px-4 py-2 text-left text-sm font-medium text-gray-700",
|
|
5034
5034
|
children: u.label || u.key
|
|
5035
5035
|
},
|
|
5036
|
-
|
|
5036
|
+
C
|
|
5037
5037
|
)),
|
|
5038
5038
|
/* @__PURE__ */ e("th", { className: "px-4 py-2 w-16" })
|
|
5039
5039
|
] }) }),
|
|
5040
|
-
/* @__PURE__ */ e("tbody", { children: x.map((u,
|
|
5040
|
+
/* @__PURE__ */ e("tbody", { children: x.map((u, C) => /* @__PURE__ */ n(
|
|
5041
5041
|
"tr",
|
|
5042
5042
|
{
|
|
5043
|
-
className: `hover:bg-gray-50 ${
|
|
5043
|
+
className: `hover:bg-gray-50 ${j === C ? "opacity-50" : ""}`,
|
|
5044
5044
|
draggable: !0,
|
|
5045
|
-
onDragStart: (M) => Y(M,
|
|
5045
|
+
onDragStart: (M) => Y(M, C),
|
|
5046
5046
|
onDragOver: q,
|
|
5047
|
-
onDrop: (M) =>
|
|
5047
|
+
onDrop: (M) => T(M, C),
|
|
5048
5048
|
onDragEnd: _,
|
|
5049
5049
|
children: [
|
|
5050
5050
|
/* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e("div", { className: "cursor-move text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ e(xt, { size: 16 }) }) }),
|
|
5051
|
-
l.fields.map((M, O) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children:
|
|
5051
|
+
l.fields.map((M, O) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: D(M)(u, C) }, O)),
|
|
5052
5052
|
/* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
|
|
5053
5053
|
"button",
|
|
5054
5054
|
{
|
|
5055
|
-
onClick: () => L(
|
|
5055
|
+
onClick: () => L(C),
|
|
5056
5056
|
className: "text-red-500 hover:text-red-700",
|
|
5057
5057
|
title: "Delete row",
|
|
5058
5058
|
children: /* @__PURE__ */ e(mr, { size: 16 })
|
|
@@ -5060,7 +5060,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5060
5060
|
) })
|
|
5061
5061
|
]
|
|
5062
5062
|
},
|
|
5063
|
-
|
|
5063
|
+
C
|
|
5064
5064
|
)) })
|
|
5065
5065
|
] }) }),
|
|
5066
5066
|
o !== null && (() => {
|
|
@@ -5070,13 +5070,13 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5070
5070
|
roles: x[o][g].roles || []
|
|
5071
5071
|
} : { users: [], groups: [], roles: [] };
|
|
5072
5072
|
return console.log("[DataTableRenderer] Opening modal with existing data:", u), console.log("[DataTableRenderer] Row data:", x[o]), console.log("[DataTableRenderer] Field name:", g), /* @__PURE__ */ e(
|
|
5073
|
-
|
|
5073
|
+
ts,
|
|
5074
5074
|
{
|
|
5075
5075
|
isOpen: !0,
|
|
5076
5076
|
onClose: () => {
|
|
5077
5077
|
p(null), v(null);
|
|
5078
5078
|
},
|
|
5079
|
-
onFinalSubmit:
|
|
5079
|
+
onFinalSubmit: A,
|
|
5080
5080
|
existingShares: u,
|
|
5081
5081
|
allowedPermissions: ["view", "remove"]
|
|
5082
5082
|
}
|
|
@@ -5084,21 +5084,21 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5084
5084
|
})()
|
|
5085
5085
|
] });
|
|
5086
5086
|
}
|
|
5087
|
-
const
|
|
5087
|
+
const gs = ({ item: t }) => /* @__PURE__ */ n("div", { className: "p-3 rounded-xl border border-dashed text-sm opacity-70", children: [
|
|
5088
5088
|
"Unknown type:",
|
|
5089
5089
|
" ",
|
|
5090
5090
|
/* @__PURE__ */ e("span", { className: "font-mono", children: String(t?.type ?? "N/A") })
|
|
5091
5091
|
] }), Ke = /* @__PURE__ */ Object.create(null);
|
|
5092
|
-
Ke.section =
|
|
5093
|
-
Ke.datatable =
|
|
5094
|
-
function
|
|
5092
|
+
Ke.section = us;
|
|
5093
|
+
Ke.datatable = ps;
|
|
5094
|
+
function bs(t) {
|
|
5095
5095
|
return typeof t == "string" ? t.trim() : t && typeof t == "object" ? String(t.type || "").trim() : "";
|
|
5096
5096
|
}
|
|
5097
|
-
function
|
|
5098
|
-
const a =
|
|
5099
|
-
return Ke[a] || Ke[a.toLowerCase?.()] ||
|
|
5097
|
+
function fs(t) {
|
|
5098
|
+
const a = bs(t);
|
|
5099
|
+
return Ke[a] || Ke[a.toLowerCase?.()] || gs;
|
|
5100
5100
|
}
|
|
5101
|
-
function
|
|
5101
|
+
function ys({
|
|
5102
5102
|
appid: t,
|
|
5103
5103
|
configdata: a = null,
|
|
5104
5104
|
disableApi: s = !1,
|
|
@@ -5106,15 +5106,15 @@ function xs({
|
|
|
5106
5106
|
onShowCancelModal: l,
|
|
5107
5107
|
onCancel: h
|
|
5108
5108
|
}) {
|
|
5109
|
-
const [o, p] = ae.useState(a), [g, v] = ae.useState(null), [x, r] = ae.useState(null), [N, m] = P(!1), [y, z] = P(!1), [
|
|
5109
|
+
const [o, p] = ae.useState(a), [g, v] = ae.useState(null), [x, r] = ae.useState(null), [N, m] = P(!1), [y, z] = P(!1), [$, D] = P({}), E = `${$e()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, L = E, [j, U] = P(1), Y = () => {
|
|
5110
5110
|
if (!x || !g)
|
|
5111
5111
|
return console.log("[DynamicConfig] hasUnsavedChanges: false (no data)", { originalData: x, data: g }), !1;
|
|
5112
|
-
const b = (
|
|
5113
|
-
if (
|
|
5114
|
-
if (Array.isArray(
|
|
5112
|
+
const b = (S) => {
|
|
5113
|
+
if (S == null || typeof S != "object") return S;
|
|
5114
|
+
if (Array.isArray(S)) return S.map(b);
|
|
5115
5115
|
const I = {};
|
|
5116
|
-
return Object.keys(
|
|
5117
|
-
I[k] = b(
|
|
5116
|
+
return Object.keys(S).sort().forEach((k) => {
|
|
5117
|
+
I[k] = b(S[k]);
|
|
5118
5118
|
}), I;
|
|
5119
5119
|
}, c = b(x), f = b(g), w = JSON.stringify(c) !== JSON.stringify(f);
|
|
5120
5120
|
return console.log("[DynamicConfig] hasUnsavedChanges:", w, {
|
|
@@ -5130,7 +5130,7 @@ function xs({
|
|
|
5130
5130
|
return a.configuration.forEach((w) => {
|
|
5131
5131
|
if (w.key && w.type === "datatable") {
|
|
5132
5132
|
const I = (f[w.key] || []).map((k, R) => {
|
|
5133
|
-
const
|
|
5133
|
+
const V = { id: k.id || 0 };
|
|
5134
5134
|
return w.fields && w.fields.forEach((F) => {
|
|
5135
5135
|
if (F.fieldtype === "audience") {
|
|
5136
5136
|
let G = { users: [], groups: [], roles: [] };
|
|
@@ -5138,9 +5138,9 @@ function xs({
|
|
|
5138
5138
|
users: k[F.key].users || [],
|
|
5139
5139
|
groups: k[F.key].groups || [],
|
|
5140
5140
|
roles: k[F.key].roles || []
|
|
5141
|
-
})),
|
|
5142
|
-
} else F.fieldtype === "select" ?
|
|
5143
|
-
}),
|
|
5141
|
+
})), V[F.key] = G;
|
|
5142
|
+
} else F.fieldtype === "select" ? V[F.key] = k[F.key] !== void 0 && k[F.key] !== "" ? k[F.key] : F.default || "" : V[F.key] = k[F.key] || F.default || "";
|
|
5143
|
+
}), V;
|
|
5144
5144
|
});
|
|
5145
5145
|
if (I.length === 0) {
|
|
5146
5146
|
const k = { id: 0 };
|
|
@@ -5150,13 +5150,13 @@ function xs({
|
|
|
5150
5150
|
}
|
|
5151
5151
|
c[w.key] = I;
|
|
5152
5152
|
} else if (w.key) {
|
|
5153
|
-
const
|
|
5153
|
+
const S = f[w.key] || {};
|
|
5154
5154
|
w.type === "section" && w.fields && w.fields.forEach((I) => {
|
|
5155
|
-
I.fieldtype === "managecollectionlist" && I.key && (!
|
|
5156
|
-
}), c[w.key] =
|
|
5155
|
+
I.fieldtype === "managecollectionlist" && I.key && (!S[I.key] || !Array.isArray(S[I.key])) && (S[I.key] = I.initialData || []);
|
|
5156
|
+
}), c[w.key] = S;
|
|
5157
5157
|
}
|
|
5158
5158
|
}), c;
|
|
5159
|
-
},
|
|
5159
|
+
}, T = () => {
|
|
5160
5160
|
if (a && a.configuration) {
|
|
5161
5161
|
const b = {};
|
|
5162
5162
|
a.configuration.forEach((c) => {
|
|
@@ -5189,21 +5189,21 @@ function xs({
|
|
|
5189
5189
|
const f = q(c);
|
|
5190
5190
|
v(f), r(f);
|
|
5191
5191
|
} else
|
|
5192
|
-
|
|
5192
|
+
T();
|
|
5193
5193
|
} catch (c) {
|
|
5194
5194
|
console.error("Error fetching configuration:", c);
|
|
5195
5195
|
let f = "Failed to load configuration";
|
|
5196
5196
|
if (c.response) {
|
|
5197
|
-
const w = c.response.status,
|
|
5198
|
-
w === 400 ? f =
|
|
5197
|
+
const w = c.response.status, S = c.response.data?.message || c.response.data?.error;
|
|
5198
|
+
w === 400 ? f = S || "Invalid request. Please check the application ID." : w === 401 ? f = "You are not authorized to access this configuration." : w === 403 ? f = "Access denied. You don't have permission to view this configuration." : w === 404 ? f = "Configuration not found. It may not exist yet or the application ID is incorrect." : w >= 500 ? f = S || "Server error. Please try again later." : f = S || `Failed to load configuration (Error ${w})`;
|
|
5199
5199
|
} else c.request ? f = "Network error. Please check your connection and try again." : f = c.message || "An unexpected error occurred while loading configuration.";
|
|
5200
|
-
Ye.error(f),
|
|
5200
|
+
Ye.error(f), T();
|
|
5201
5201
|
} finally {
|
|
5202
5202
|
m(!1);
|
|
5203
5203
|
}
|
|
5204
5204
|
};
|
|
5205
|
-
a && (p(a), t ? b() :
|
|
5206
|
-
}, [a,
|
|
5205
|
+
a && (p(a), t ? b() : T());
|
|
5206
|
+
}, [a, j, t, s]);
|
|
5207
5207
|
const _ = (b, c) => {
|
|
5208
5208
|
console.log(`[DynamicConfig] handleSectionChange called for ${b}:`, c), v((f) => {
|
|
5209
5209
|
const w = {
|
|
@@ -5211,11 +5211,11 @@ function xs({
|
|
|
5211
5211
|
[b]: c
|
|
5212
5212
|
};
|
|
5213
5213
|
return console.log("[DynamicConfig] Updated data state:", w), w;
|
|
5214
|
-
}),
|
|
5214
|
+
}), D((f) => {
|
|
5215
5215
|
const w = { ...f };
|
|
5216
5216
|
return w[b] && delete w[b], w;
|
|
5217
5217
|
});
|
|
5218
|
-
},
|
|
5218
|
+
}, A = () => {
|
|
5219
5219
|
const b = {};
|
|
5220
5220
|
return !o || !g || o.configuration.forEach((c) => {
|
|
5221
5221
|
if (c.type === "section")
|
|
@@ -5226,41 +5226,41 @@ function xs({
|
|
|
5226
5226
|
return;
|
|
5227
5227
|
}
|
|
5228
5228
|
if (f.fieldtype === "number" && w !== "" && w !== null && w !== void 0) {
|
|
5229
|
-
const
|
|
5230
|
-
isNaN(
|
|
5229
|
+
const S = Number(w);
|
|
5230
|
+
isNaN(S) ? (b[c.key] || (b[c.key] = {}), b[c.key][f.key] = `${f.label} must be a valid number`) : (f.min !== void 0 && S < f.min && (b[c.key] || (b[c.key] = {}), b[c.key][f.key] = `${f.label} must be at least ${f.min}`), f.max !== void 0 && S > f.max && (b[c.key] || (b[c.key] = {}), b[c.key][f.key] = `${f.label} must not exceed ${f.max}`));
|
|
5231
5231
|
}
|
|
5232
5232
|
});
|
|
5233
5233
|
else if (c.type === "datatable") {
|
|
5234
5234
|
const f = g[c.key];
|
|
5235
|
-
Array.isArray(f) && f.forEach((w,
|
|
5235
|
+
Array.isArray(f) && f.forEach((w, S) => {
|
|
5236
5236
|
c.fields.forEach((I) => {
|
|
5237
5237
|
const k = w[I.key];
|
|
5238
5238
|
if (I.required && (!k || typeof k == "string" && k.trim() === "")) {
|
|
5239
|
-
b[c.key] || (b[c.key] = {}), b[c.key][
|
|
5239
|
+
b[c.key] || (b[c.key] = {}), b[c.key][S] || (b[c.key][S] = {}), b[c.key][S][I.key] = `${I.label} is required`;
|
|
5240
5240
|
return;
|
|
5241
5241
|
}
|
|
5242
5242
|
if (I.fieldtype === "number" && k !== "" && k !== null && k !== void 0) {
|
|
5243
5243
|
const R = Number(k);
|
|
5244
|
-
isNaN(R) ? (b[c.key] || (b[c.key] = {}), b[c.key][
|
|
5244
|
+
isNaN(R) ? (b[c.key] || (b[c.key] = {}), b[c.key][S] || (b[c.key][S] = {}), b[c.key][S][I.key] = `${I.label} must be a valid number`) : (I.min !== void 0 && R < I.min && (b[c.key] || (b[c.key] = {}), b[c.key][S] || (b[c.key][S] = {}), b[c.key][S][I.key] = `${I.label} must be at least ${I.min}`), I.max !== void 0 && R > I.max && (b[c.key] || (b[c.key] = {}), b[c.key][S] || (b[c.key][S] = {}), b[c.key][S][I.key] = `${I.label} must not exceed ${I.max}`));
|
|
5245
5245
|
}
|
|
5246
5246
|
});
|
|
5247
5247
|
});
|
|
5248
5248
|
}
|
|
5249
5249
|
}), b;
|
|
5250
|
-
}, u = (b) => Object.keys(b).length > 0,
|
|
5250
|
+
}, u = (b) => Object.keys(b).length > 0, C = () => {
|
|
5251
5251
|
if (y) {
|
|
5252
5252
|
console.log("[handleSave] Already saving, ignoring duplicate call");
|
|
5253
5253
|
return;
|
|
5254
5254
|
}
|
|
5255
5255
|
console.log("[handleSave] Starting save process");
|
|
5256
|
-
const b =
|
|
5257
|
-
if (
|
|
5256
|
+
const b = A();
|
|
5257
|
+
if (D(b), u(b)) {
|
|
5258
5258
|
let f = [];
|
|
5259
5259
|
Object.keys(b).forEach((w) => {
|
|
5260
|
-
typeof b[w] == "object" && Object.keys(b[w]).forEach((
|
|
5261
|
-
typeof b[w][
|
|
5262
|
-
f.push(`${w} row ${parseInt(
|
|
5263
|
-
}) : f.push(`${w}: ${b[w][
|
|
5260
|
+
typeof b[w] == "object" && Object.keys(b[w]).forEach((S) => {
|
|
5261
|
+
typeof b[w][S] == "object" ? Object.keys(b[w][S]).forEach((I) => {
|
|
5262
|
+
f.push(`${w} row ${parseInt(S) + 1}: ${b[w][S][I]}`);
|
|
5263
|
+
}) : f.push(`${w}: ${b[w][S]}`);
|
|
5264
5264
|
});
|
|
5265
5265
|
});
|
|
5266
5266
|
return;
|
|
@@ -5269,30 +5269,30 @@ function xs({
|
|
|
5269
5269
|
try {
|
|
5270
5270
|
z(!0);
|
|
5271
5271
|
const f = {};
|
|
5272
|
-
g && Object.keys(g).forEach((
|
|
5272
|
+
g && Object.keys(g).forEach((S) => {
|
|
5273
5273
|
const I = a?.configuration?.find(
|
|
5274
|
-
(k) => k.key ===
|
|
5274
|
+
(k) => k.key === S && k.type === "datatable"
|
|
5275
5275
|
);
|
|
5276
|
-
I && Array.isArray(g[
|
|
5276
|
+
I && Array.isArray(g[S]) ? f[S] = g[S].map((k) => {
|
|
5277
5277
|
const R = { id: k.id || 0 };
|
|
5278
|
-
return I.fields && I.fields.forEach((
|
|
5279
|
-
if (
|
|
5278
|
+
return I.fields && I.fields.forEach((V) => {
|
|
5279
|
+
if (V.fieldtype === "audience") {
|
|
5280
5280
|
let F = { users: [], groups: [], roles: [] };
|
|
5281
|
-
k[
|
|
5282
|
-
users: k[
|
|
5283
|
-
groups: k[
|
|
5284
|
-
roles: k[
|
|
5285
|
-
}), R[
|
|
5281
|
+
k[V.key] && typeof k[V.key] == "object" && !Array.isArray(k[V.key]) && (F = {
|
|
5282
|
+
users: k[V.key].users || [],
|
|
5283
|
+
groups: k[V.key].groups || [],
|
|
5284
|
+
roles: k[V.key].roles || []
|
|
5285
|
+
}), R[V.key] = F;
|
|
5286
5286
|
} else
|
|
5287
|
-
R[
|
|
5287
|
+
R[V.key] = k[V.key] || "";
|
|
5288
5288
|
}), R;
|
|
5289
|
-
}) : f[
|
|
5289
|
+
}) : f[S] = g[S];
|
|
5290
5290
|
}), (!f.appkey || f.appkey === "") && (f.appkey = t);
|
|
5291
5291
|
let w = await bt(L, f);
|
|
5292
5292
|
if (w && w.status != "fail") {
|
|
5293
|
-
|
|
5294
|
-
const
|
|
5295
|
-
Ye.success(
|
|
5293
|
+
D({}), r(JSON.parse(JSON.stringify(g)));
|
|
5294
|
+
const S = w.message || "Configuration has been saved successfully";
|
|
5295
|
+
Ye.success(S), i && typeof i == "function" && i(g);
|
|
5296
5296
|
} else
|
|
5297
5297
|
throw Ye.error(w?.message || "Failed to save configuration"), new Error("No response received from server");
|
|
5298
5298
|
} catch (f) {
|
|
@@ -5308,7 +5308,7 @@ function xs({
|
|
|
5308
5308
|
return /* @__PURE__ */ e("div", { className: "min-h-screen flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "text-gray-500", children: "No configuration available" }) });
|
|
5309
5309
|
const O = a?.configuration || o?.configuration;
|
|
5310
5310
|
return K(() => {
|
|
5311
|
-
s && a ? (!g || Object.keys(g).length === 0) &&
|
|
5311
|
+
s && a ? (!g || Object.keys(g).length === 0) && T() : s && !a && T();
|
|
5312
5312
|
}, [s, a]), /* @__PURE__ */ n("div", { children: [
|
|
5313
5313
|
/* @__PURE__ */ n(
|
|
5314
5314
|
"div",
|
|
@@ -5318,7 +5318,7 @@ function xs({
|
|
|
5318
5318
|
children: [
|
|
5319
5319
|
N && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(oa, { size: "large" }) }),
|
|
5320
5320
|
!N && O?.map((b, c) => {
|
|
5321
|
-
const f =
|
|
5321
|
+
const f = fs(b.type);
|
|
5322
5322
|
if (f && f !== "UnknownType")
|
|
5323
5323
|
return /* @__PURE__ */ e(
|
|
5324
5324
|
f,
|
|
@@ -5326,7 +5326,7 @@ function xs({
|
|
|
5326
5326
|
item: b,
|
|
5327
5327
|
data: g,
|
|
5328
5328
|
updateHandler: _,
|
|
5329
|
-
validationErrors:
|
|
5329
|
+
validationErrors: $
|
|
5330
5330
|
},
|
|
5331
5331
|
c
|
|
5332
5332
|
);
|
|
@@ -5349,7 +5349,7 @@ function xs({
|
|
|
5349
5349
|
se,
|
|
5350
5350
|
{
|
|
5351
5351
|
category: "primary",
|
|
5352
|
-
onClick:
|
|
5352
|
+
onClick: C,
|
|
5353
5353
|
disabled: y,
|
|
5354
5354
|
label: y ? "Saving..." : "Save",
|
|
5355
5355
|
type: "submit"
|
|
@@ -5358,38 +5358,39 @@ function xs({
|
|
|
5358
5358
|
] })
|
|
5359
5359
|
] });
|
|
5360
5360
|
}
|
|
5361
|
-
const
|
|
5361
|
+
const ql = ({
|
|
5362
5362
|
config: t,
|
|
5363
5363
|
appid: a = "Configuration-Page",
|
|
5364
|
-
disableApi: s = !1
|
|
5364
|
+
disableApi: s = !1,
|
|
5365
|
+
hasConfig: i = !1
|
|
5365
5366
|
}) => {
|
|
5366
|
-
const [
|
|
5367
|
-
pageHeader:
|
|
5368
|
-
appletHeader:
|
|
5369
|
-
breadcrumb:
|
|
5370
|
-
overview:
|
|
5371
|
-
configuration:
|
|
5372
|
-
} = t,
|
|
5373
|
-
if (
|
|
5374
|
-
const
|
|
5375
|
-
if (
|
|
5376
|
-
const
|
|
5377
|
-
if (
|
|
5378
|
-
...
|
|
5367
|
+
const [l, h] = P(0), [o, p] = P(!1), {
|
|
5368
|
+
pageHeader: g = {},
|
|
5369
|
+
appletHeader: v = {},
|
|
5370
|
+
breadcrumb: x = [],
|
|
5371
|
+
overview: r = {},
|
|
5372
|
+
configuration: N = []
|
|
5373
|
+
} = t, m = ee(() => N.map((u) => {
|
|
5374
|
+
if (u.type === "section" && u.fields) {
|
|
5375
|
+
const C = [...u.fields], M = C.findIndex((O) => O && O.key === "appkey");
|
|
5376
|
+
if (M !== -1) {
|
|
5377
|
+
const O = C[M];
|
|
5378
|
+
if (C[M] = {
|
|
5379
|
+
...O,
|
|
5379
5380
|
default: a,
|
|
5380
5381
|
value: a,
|
|
5381
5382
|
readonly: !0,
|
|
5382
5383
|
placeholder: a,
|
|
5383
5384
|
disabled: !1
|
|
5384
|
-
},
|
|
5385
|
-
const
|
|
5386
|
-
|
|
5387
|
-
...
|
|
5388
|
-
default:
|
|
5389
|
-
placeholder:
|
|
5385
|
+
}, C.some((c) => c.key === "displayname")) {
|
|
5386
|
+
const c = C.findIndex((w) => w.key === "displayname"), f = C[c] || {};
|
|
5387
|
+
C[c] = {
|
|
5388
|
+
...f,
|
|
5389
|
+
default: f.default || f.value || a,
|
|
5390
|
+
placeholder: f.placeholder || "Enter display name"
|
|
5390
5391
|
};
|
|
5391
5392
|
} else {
|
|
5392
|
-
const
|
|
5393
|
+
const c = {
|
|
5393
5394
|
key: "displayname",
|
|
5394
5395
|
label: "Display Name",
|
|
5395
5396
|
fieldtype: "text",
|
|
@@ -5398,56 +5399,56 @@ const Yl = ({
|
|
|
5398
5399
|
placeholder: "Enter display name",
|
|
5399
5400
|
required: !1
|
|
5400
5401
|
};
|
|
5401
|
-
|
|
5402
|
+
C.splice(M + 1, 0, c);
|
|
5402
5403
|
}
|
|
5403
5404
|
}
|
|
5404
5405
|
return {
|
|
5405
|
-
...
|
|
5406
|
-
fields:
|
|
5406
|
+
...u,
|
|
5407
|
+
fields: C
|
|
5407
5408
|
};
|
|
5408
5409
|
}
|
|
5409
|
-
return
|
|
5410
|
-
}), [
|
|
5410
|
+
return u;
|
|
5411
|
+
}), [N, a]), y = {
|
|
5411
5412
|
heading: "App Details",
|
|
5412
5413
|
subHeading: "View app details and customize configurations to align with institutional requirements.",
|
|
5413
5414
|
isLeftArrow: !0,
|
|
5414
5415
|
onBackClick: () => window.history.back(),
|
|
5415
|
-
...
|
|
5416
|
-
},
|
|
5417
|
-
label:
|
|
5418
|
-
href:
|
|
5419
|
-
})),
|
|
5420
|
-
|
|
5421
|
-
}, []),
|
|
5422
|
-
|
|
5423
|
-
}, []),
|
|
5424
|
-
console.log("Configuration changed:",
|
|
5425
|
-
}, []),
|
|
5416
|
+
...g
|
|
5417
|
+
}, z = x.map((u) => ({
|
|
5418
|
+
label: u.text,
|
|
5419
|
+
href: u.href || "#"
|
|
5420
|
+
})), $ = H(() => {
|
|
5421
|
+
p(!0);
|
|
5422
|
+
}, []), D = H((u) => {
|
|
5423
|
+
p(!1), u.primary && window.history.back();
|
|
5424
|
+
}, []), E = H((u) => {
|
|
5425
|
+
console.log("Configuration changed:", u);
|
|
5426
|
+
}, []), L = H(() => {
|
|
5426
5427
|
window.history.back();
|
|
5427
|
-
}, []),
|
|
5428
|
-
if (
|
|
5429
|
-
const
|
|
5430
|
-
if (
|
|
5431
|
-
const
|
|
5432
|
-
if (
|
|
5433
|
-
return
|
|
5428
|
+
}, []), j = (() => {
|
|
5429
|
+
if (v.headingKey && Array.isArray(N)) {
|
|
5430
|
+
const u = v.headingKey.split("."), C = u[0], M = u[1], O = N.find((b) => b && b.key === C);
|
|
5431
|
+
if (O && O.fields) {
|
|
5432
|
+
const b = O.fields.find((c) => c && c.key === M);
|
|
5433
|
+
if (b)
|
|
5434
|
+
return b.default ?? b.value ?? v.heading ?? a;
|
|
5434
5435
|
}
|
|
5435
5436
|
}
|
|
5436
|
-
if (Array.isArray(
|
|
5437
|
-
for (const
|
|
5438
|
-
if (
|
|
5439
|
-
const
|
|
5440
|
-
if (
|
|
5437
|
+
if (Array.isArray(N)) {
|
|
5438
|
+
for (const u of N)
|
|
5439
|
+
if (u && u.fields) {
|
|
5440
|
+
const C = u.fields.find((M) => M && M.key === "displayname");
|
|
5441
|
+
if (C) return C.default ?? C.value ?? a;
|
|
5441
5442
|
}
|
|
5442
5443
|
}
|
|
5443
|
-
return
|
|
5444
|
-
})(),
|
|
5444
|
+
return v.heading || a;
|
|
5445
|
+
})(), U = {
|
|
5445
5446
|
subHeading: "Application configuration and details",
|
|
5446
5447
|
tags: [],
|
|
5447
|
-
...
|
|
5448
|
-
heading:
|
|
5448
|
+
...v,
|
|
5449
|
+
heading: j
|
|
5449
5450
|
// Use resolvedDisplayName only
|
|
5450
|
-
},
|
|
5451
|
+
}, Y = {
|
|
5451
5452
|
about: "This application provides comprehensive functionality for your organization.",
|
|
5452
5453
|
images: {
|
|
5453
5454
|
desktop: "https://via.placeholder.com/600x400?text=Desktop+View",
|
|
@@ -5464,27 +5465,27 @@ const Yl = ({
|
|
|
5464
5465
|
description: "Description of feature 2"
|
|
5465
5466
|
}
|
|
5466
5467
|
],
|
|
5467
|
-
...
|
|
5468
|
-
},
|
|
5469
|
-
configuration:
|
|
5470
|
-
}), [
|
|
5471
|
-
{ label: "Overview", content:
|
|
5472
|
-
{ label: "Configuration", content: /* @__PURE__ */ e(
|
|
5473
|
-
], [a,
|
|
5474
|
-
function
|
|
5475
|
-
return
|
|
5468
|
+
...r
|
|
5469
|
+
}, q = ee(() => ({
|
|
5470
|
+
configuration: m
|
|
5471
|
+
}), [m]), T = ee(() => [
|
|
5472
|
+
{ label: "Overview", content: A(Y) },
|
|
5473
|
+
i && { label: "Configuration", content: /* @__PURE__ */ e(ys, { appid: a, configdata: q, disableApi: s, onSave: E, onShowCancelModal: $, onCancel: L }) }
|
|
5474
|
+
].filter(Boolean), [a, q, s, E, $, L, Y]);
|
|
5475
|
+
function _(u) {
|
|
5476
|
+
return u ? u.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: u } }) : u : "📱";
|
|
5476
5477
|
}
|
|
5477
|
-
function
|
|
5478
|
+
function A(u) {
|
|
5478
5479
|
return /* @__PURE__ */ n("div", { className: "bg-white rounded-2xl p-1", children: [
|
|
5479
5480
|
/* @__PURE__ */ n("section", { className: "mb-8", children: [
|
|
5480
5481
|
/* @__PURE__ */ e("h2", { className: "text-xl font-semibold mb-2", children: "About" }),
|
|
5481
|
-
/* @__PURE__ */ e("p", { className: "text-gray-700 text-base", children:
|
|
5482
|
+
/* @__PURE__ */ e("p", { className: "text-gray-700 text-base", children: u.about })
|
|
5482
5483
|
] }),
|
|
5483
5484
|
/* @__PURE__ */ n("section", { className: "flex flex-row gap-6 justify-center items-center mb-8", children: [
|
|
5484
5485
|
/* @__PURE__ */ e(
|
|
5485
5486
|
"img",
|
|
5486
5487
|
{
|
|
5487
|
-
src:
|
|
5488
|
+
src: u.images.desktop,
|
|
5488
5489
|
alt: "Desktop View",
|
|
5489
5490
|
className: "rounded-xl border border-gray-200 w-[340px] h-[220px] object-cover"
|
|
5490
5491
|
}
|
|
@@ -5492,7 +5493,7 @@ const Yl = ({
|
|
|
5492
5493
|
/* @__PURE__ */ e(
|
|
5493
5494
|
"img",
|
|
5494
5495
|
{
|
|
5495
|
-
src:
|
|
5496
|
+
src: u.images.mobile1,
|
|
5496
5497
|
alt: "Mobile View 1",
|
|
5497
5498
|
className: "rounded-2xl border border-gray-200 w-[120px] h-[220px] object-cover"
|
|
5498
5499
|
}
|
|
@@ -5500,57 +5501,57 @@ const Yl = ({
|
|
|
5500
5501
|
] }),
|
|
5501
5502
|
/* @__PURE__ */ n("section", { children: [
|
|
5502
5503
|
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold mb-4", children: "Key Features" }),
|
|
5503
|
-
/* @__PURE__ */ e("ul", { className: "space-y-3", children:
|
|
5504
|
-
/* @__PURE__ */ e("span", { className: "font-semibold", children:
|
|
5504
|
+
/* @__PURE__ */ e("ul", { className: "space-y-3", children: u.features.map((C, M) => /* @__PURE__ */ n("li", { children: [
|
|
5505
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: C.title }),
|
|
5505
5506
|
/* @__PURE__ */ e("br", {}),
|
|
5506
|
-
/* @__PURE__ */ e("span", { className: "text-gray-700", children:
|
|
5507
|
-
] },
|
|
5507
|
+
/* @__PURE__ */ e("span", { className: "text-gray-700", children: C.description })
|
|
5508
|
+
] }, M)) })
|
|
5508
5509
|
] })
|
|
5509
5510
|
] });
|
|
5510
5511
|
}
|
|
5511
5512
|
return /* @__PURE__ */ n("div", { className: "full-config-page", children: [
|
|
5512
5513
|
/* @__PURE__ */ e(
|
|
5513
|
-
|
|
5514
|
+
Mn,
|
|
5514
5515
|
{
|
|
5515
|
-
heading:
|
|
5516
|
-
subHeading:
|
|
5517
|
-
breadcrumbItems:
|
|
5518
|
-
isLeftArrow:
|
|
5519
|
-
onBackClick:
|
|
5516
|
+
heading: y.heading,
|
|
5517
|
+
subHeading: z.length > 0 ? void 0 : y.subHeading,
|
|
5518
|
+
breadcrumbItems: z,
|
|
5519
|
+
isLeftArrow: y.isLeftArrow,
|
|
5520
|
+
onBackClick: y.onBackClick
|
|
5520
5521
|
}
|
|
5521
5522
|
),
|
|
5522
5523
|
/* @__PURE__ */ n("div", { className: "bg-[#ffffff] border border-[#eef2f6] rounded-[12px] px-6 py-5 flex gap-4 items-start mb-4 shadow-sm", children: [
|
|
5523
|
-
/* @__PURE__ */ e("div", { className: "icon w-[72px] h-[72px] rounded-full flex items-center justify-center bg-[#F5F5F6] text-[#1C274C] font-bold text-[18px]", children:
|
|
5524
|
+
/* @__PURE__ */ e("div", { className: "icon w-[72px] h-[72px] rounded-full flex items-center justify-center bg-[#F5F5F6] text-[#1C274C] font-bold text-[18px]", children: _(U.icon) }),
|
|
5524
5525
|
/* @__PURE__ */ n("div", { className: "flex flex-col min-w-0", children: [
|
|
5525
|
-
/* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children:
|
|
5526
|
-
/* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children:
|
|
5527
|
-
/* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children:
|
|
5526
|
+
/* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: U.heading }),
|
|
5527
|
+
/* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: U.subHeading }),
|
|
5528
|
+
/* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: U.tags && U.tags.map((u, C) => /* @__PURE__ */ e(
|
|
5528
5529
|
"span",
|
|
5529
5530
|
{
|
|
5530
5531
|
className: "pill inline-block px-[10px] py-[6px] rounded-[14px] text-[11px] border border-[#e6e9ee] text-[#767676] font-semibold mt-1",
|
|
5531
|
-
children:
|
|
5532
|
+
children: u
|
|
5532
5533
|
},
|
|
5533
|
-
|
|
5534
|
+
C
|
|
5534
5535
|
)) })
|
|
5535
5536
|
] })
|
|
5536
5537
|
] }),
|
|
5537
5538
|
/* @__PURE__ */ n("div", { className: "bg-white border border-gray-300 rounded-2xl w-full mt-5 ", children: [
|
|
5538
|
-
/* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children:
|
|
5539
|
+
/* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: T.map((u, C) => /* @__PURE__ */ e(
|
|
5539
5540
|
"button",
|
|
5540
5541
|
{
|
|
5541
|
-
onClick: () =>
|
|
5542
|
-
className: `${
|
|
5543
|
-
children:
|
|
5542
|
+
onClick: () => h(C),
|
|
5543
|
+
className: `${l === C ? "border-black text-black" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"} whitespace-nowrap py-3 px-6 border-b-2 font-medium text-sm transition-colors duration-200`,
|
|
5544
|
+
children: u.label
|
|
5544
5545
|
},
|
|
5545
|
-
|
|
5546
|
+
C
|
|
5546
5547
|
)) }) }),
|
|
5547
|
-
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children:
|
|
5548
|
+
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: T[l].content })
|
|
5548
5549
|
] }),
|
|
5549
5550
|
/* @__PURE__ */ e(
|
|
5550
|
-
|
|
5551
|
+
Fn,
|
|
5551
5552
|
{
|
|
5552
|
-
isOpen:
|
|
5553
|
-
onClose:
|
|
5553
|
+
isOpen: o,
|
|
5554
|
+
onClose: D,
|
|
5554
5555
|
variant: "warning",
|
|
5555
5556
|
title: "Are you sure you want to cancel?",
|
|
5556
5557
|
primaryButtonText: "Yes",
|
|
@@ -5559,7 +5560,7 @@ const Yl = ({
|
|
|
5559
5560
|
}
|
|
5560
5561
|
)
|
|
5561
5562
|
] });
|
|
5562
|
-
},
|
|
5563
|
+
}, xs = ({
|
|
5563
5564
|
className: t = "",
|
|
5564
5565
|
onCollectionChange: a,
|
|
5565
5566
|
showSearch: s = !0,
|
|
@@ -5569,11 +5570,11 @@ const Yl = ({
|
|
|
5569
5570
|
allowReorder: o = !0,
|
|
5570
5571
|
initialData: p = null
|
|
5571
5572
|
}) => {
|
|
5572
|
-
const [g, v] = P(null), [x, r] = P(""), [N, m] = P(() => Array.isArray(p) ? p : []), [y, z] = P(null), [
|
|
5573
|
+
const [g, v] = P(null), [x, r] = P(""), [N, m] = P(() => Array.isArray(p) ? p : []), [y, z] = P(null), [$, D] = P(null), [E, L] = P("");
|
|
5573
5574
|
K(() => {
|
|
5574
5575
|
Array.isArray(p) && m(p);
|
|
5575
5576
|
}, [p]);
|
|
5576
|
-
const
|
|
5577
|
+
const j = (c) => {
|
|
5577
5578
|
l && (v(c._id), r(c.categoryName || ""));
|
|
5578
5579
|
}, U = () => {
|
|
5579
5580
|
if (!i || g !== null) return;
|
|
@@ -5591,7 +5592,7 @@ const Yl = ({
|
|
|
5591
5592
|
]), v(f), r("");
|
|
5592
5593
|
}, Y = () => {
|
|
5593
5594
|
g != null && (m((c) => {
|
|
5594
|
-
const w = !Array.isArray(p) || !p.some((
|
|
5595
|
+
const w = !Array.isArray(p) || !p.some((S) => S._id === g) ? c.filter((S) => S._id !== g) : c;
|
|
5595
5596
|
return a?.(w), w;
|
|
5596
5597
|
}), v(null), r(""));
|
|
5597
5598
|
}, q = () => {
|
|
@@ -5602,33 +5603,33 @@ const Yl = ({
|
|
|
5602
5603
|
} : w);
|
|
5603
5604
|
return a?.(f), f;
|
|
5604
5605
|
}), v(null), r(""));
|
|
5605
|
-
},
|
|
5606
|
+
}, T = (c) => {
|
|
5606
5607
|
h && m((f) => {
|
|
5607
|
-
const w = f.filter((
|
|
5608
|
+
const w = f.filter((S) => S._id !== c._id);
|
|
5608
5609
|
return a?.(w), w;
|
|
5609
5610
|
});
|
|
5610
5611
|
}, _ = (c, f, w) => {
|
|
5611
|
-
const
|
|
5612
|
-
if (!o ||
|
|
5613
|
-
const k = c.findIndex((G) => Number(G._id) ===
|
|
5612
|
+
const S = Number(f), I = Number(w);
|
|
5613
|
+
if (!o || S === I) return c;
|
|
5614
|
+
const k = c.findIndex((G) => Number(G._id) === S), R = c.findIndex((G) => Number(G._id) === I);
|
|
5614
5615
|
if (k === -1 || R === -1) return c;
|
|
5615
|
-
const
|
|
5616
|
-
return
|
|
5617
|
-
},
|
|
5616
|
+
const V = [...c], [F] = V.splice(k, 1);
|
|
5617
|
+
return V.splice(R, 0, F), V.map((G, W) => ({ ...G, order: W + 1 }));
|
|
5618
|
+
}, A = (c, f) => {
|
|
5618
5619
|
o && (c.dataTransfer.effectAllowed = "move", c.dataTransfer.setData("text/plain", String(f)), z(Number(f)));
|
|
5619
5620
|
}, u = (c) => {
|
|
5620
|
-
y && c !==
|
|
5621
|
-
},
|
|
5621
|
+
y && c !== $ && D(c);
|
|
5622
|
+
}, C = (c) => {
|
|
5622
5623
|
c.preventDefault();
|
|
5623
5624
|
}, M = (c, f) => {
|
|
5624
5625
|
c.preventDefault();
|
|
5625
|
-
const w = c.dataTransfer.getData("text/plain"),
|
|
5626
|
-
|
|
5627
|
-
const R = _(k,
|
|
5626
|
+
const w = c.dataTransfer.getData("text/plain"), S = w === "0" ? 0 : Number(w), I = f === "0" ? 0 : Number(f);
|
|
5627
|
+
S === void 0 || I === void 0 || (m((k) => {
|
|
5628
|
+
const R = _(k, S, I);
|
|
5628
5629
|
return a?.(R), R;
|
|
5629
|
-
}), z(null),
|
|
5630
|
+
}), z(null), D(null));
|
|
5630
5631
|
}, O = () => {
|
|
5631
|
-
z(null),
|
|
5632
|
+
z(null), D(null);
|
|
5632
5633
|
}, b = Array.isArray(N) ? N.filter(
|
|
5633
5634
|
(c) => c.categoryName?.toLowerCase().includes(E.toLowerCase())
|
|
5634
5635
|
) : [];
|
|
@@ -5657,19 +5658,19 @@ const Yl = ({
|
|
|
5657
5658
|
)
|
|
5658
5659
|
] }) }),
|
|
5659
5660
|
/* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: b.map((c) => {
|
|
5660
|
-
const f = g === c._id, w = c?.links?.length ?? 0,
|
|
5661
|
+
const f = g === c._id, w = c?.links?.length ?? 0, S = y === c._id, I = $ === c._id && y !== c._id;
|
|
5661
5662
|
return /* @__PURE__ */ e(
|
|
5662
5663
|
"div",
|
|
5663
5664
|
{
|
|
5664
5665
|
onDragEnter: () => u(c._id),
|
|
5665
|
-
onDragOver:
|
|
5666
|
+
onDragOver: C,
|
|
5666
5667
|
onDrop: (k) => M(k, c._id),
|
|
5667
5668
|
onDragEnd: O,
|
|
5668
5669
|
className: [
|
|
5669
5670
|
"flex items-center justify-between p-3 border rounded-2xl mb-3",
|
|
5670
5671
|
"border-gray-300",
|
|
5671
5672
|
I ? "ring-2 ring-gray-800/20" : "",
|
|
5672
|
-
|
|
5673
|
+
S ? "opacity-60" : ""
|
|
5673
5674
|
].join(" "),
|
|
5674
5675
|
children: f ? /* @__PURE__ */ n(te, { children: [
|
|
5675
5676
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 flex-1", children: /* @__PURE__ */ e(
|
|
@@ -5720,7 +5721,7 @@ const Yl = ({
|
|
|
5720
5721
|
"aria-label": "Drag to reorder",
|
|
5721
5722
|
className: "cursor-grab active:cursor-grabbing p-1 -m-1 rounded-md hover:bg-gray-50",
|
|
5722
5723
|
draggable: !0,
|
|
5723
|
-
onDragStart: (k) =>
|
|
5724
|
+
onDragStart: (k) => A(k, c._id),
|
|
5724
5725
|
children: /* @__PURE__ */ e(xt, {})
|
|
5725
5726
|
}
|
|
5726
5727
|
),
|
|
@@ -5732,7 +5733,7 @@ const Yl = ({
|
|
|
5732
5733
|
"button",
|
|
5733
5734
|
{
|
|
5734
5735
|
className: "cursor-pointer",
|
|
5735
|
-
onClick: () =>
|
|
5736
|
+
onClick: () => j(c),
|
|
5736
5737
|
"aria-label": `Edit ${c.categoryName}`,
|
|
5737
5738
|
children: /* @__PURE__ */ e(ur, { color: "#767676" })
|
|
5738
5739
|
}
|
|
@@ -5742,7 +5743,7 @@ const Yl = ({
|
|
|
5742
5743
|
{
|
|
5743
5744
|
className: w === 0 && !c.protected ? "cursor-pointer" : "cursor-not-allowed",
|
|
5744
5745
|
title: w === 0 && !c.protected ? "Delete" : "Cannot delete a collection with linked items",
|
|
5745
|
-
onClick: w === 0 ? () =>
|
|
5746
|
+
onClick: w === 0 ? () => T(c) : null,
|
|
5746
5747
|
children: /* @__PURE__ */ e(Le, { color: w === 0 ? "#767676" : "#C2C2C2" })
|
|
5747
5748
|
}
|
|
5748
5749
|
)
|
|
@@ -5754,11 +5755,11 @@ const Yl = ({
|
|
|
5754
5755
|
}) })
|
|
5755
5756
|
] });
|
|
5756
5757
|
};
|
|
5757
|
-
function
|
|
5758
|
+
function Yl({ children: t }) {
|
|
5758
5759
|
return /* @__PURE__ */ n(te, { children: [
|
|
5759
5760
|
t,
|
|
5760
5761
|
/* @__PURE__ */ e(
|
|
5761
|
-
|
|
5762
|
+
Hr,
|
|
5762
5763
|
{
|
|
5763
5764
|
position: "bottom-right",
|
|
5764
5765
|
autoClose: 3500,
|
|
@@ -5768,7 +5769,7 @@ function Wl({ children: t }) {
|
|
|
5768
5769
|
pauseOnFocusLoss: !1,
|
|
5769
5770
|
draggable: !0,
|
|
5770
5771
|
pauseOnHover: !0,
|
|
5771
|
-
transition:
|
|
5772
|
+
transition: Zr,
|
|
5772
5773
|
limit: 4,
|
|
5773
5774
|
closeButton: !0,
|
|
5774
5775
|
bodyClassName: "ui-toast__body",
|
|
@@ -5823,7 +5824,7 @@ const Lt = () => {
|
|
|
5823
5824
|
},
|
|
5824
5825
|
{ ...Me, ...s }
|
|
5825
5826
|
)
|
|
5826
|
-
},
|
|
5827
|
+
}, Wl = ({
|
|
5827
5828
|
heading: t = "Data Grid",
|
|
5828
5829
|
subheading: a = "",
|
|
5829
5830
|
totalCount: s = 0,
|
|
@@ -5844,24 +5845,24 @@ const Lt = () => {
|
|
|
5844
5845
|
showExcel: m = !1,
|
|
5845
5846
|
showPdf: y = !1,
|
|
5846
5847
|
showRefresh: z = !1,
|
|
5847
|
-
showAdd:
|
|
5848
|
-
iSelectedRecords:
|
|
5848
|
+
showAdd: $ = !1,
|
|
5849
|
+
iSelectedRecords: D = 0,
|
|
5849
5850
|
// Additional props
|
|
5850
5851
|
searchPlaceholder: E = "Search...",
|
|
5851
5852
|
handleRefreshClick: L = () => {
|
|
5852
5853
|
},
|
|
5853
|
-
handleSearchChange:
|
|
5854
|
+
handleSearchChange: j = () => {
|
|
5854
5855
|
},
|
|
5855
5856
|
handleDeleteClick: U = () => {
|
|
5856
5857
|
},
|
|
5857
5858
|
// Optional: override export file names
|
|
5858
5859
|
excelFileName: Y,
|
|
5859
5860
|
pdfFileName: q,
|
|
5860
|
-
searchIconSize:
|
|
5861
|
+
searchIconSize: T,
|
|
5861
5862
|
searchIconClass: _,
|
|
5862
|
-
inputStyle:
|
|
5863
|
+
inputStyle: A
|
|
5863
5864
|
}) => {
|
|
5864
|
-
const u = () => l?.current || i?.current, [
|
|
5865
|
+
const u = () => l?.current || i?.current, [C, M] = ae.useState(""), O = (t || "export").toString().trim() || "export", b = `${Y || O}.xlsx`, c = `${q || O}.pdf`, f = (I, k, R) => Math.max(k, Math.min(I, R)), w = H(
|
|
5865
5866
|
(I) => {
|
|
5866
5867
|
const k = u();
|
|
5867
5868
|
if (k?.openColumnChooser) {
|
|
@@ -5870,8 +5871,8 @@ const Lt = () => {
|
|
|
5870
5871
|
return;
|
|
5871
5872
|
}
|
|
5872
5873
|
try {
|
|
5873
|
-
const R = I.currentTarget.getBoundingClientRect(),
|
|
5874
|
-
let G =
|
|
5874
|
+
const R = I.currentTarget.getBoundingClientRect(), V = R.left + window.scrollX, F = R.bottom + window.scrollY;
|
|
5875
|
+
let G = V - 120, W = F - 120;
|
|
5875
5876
|
const pe = window.innerWidth, Ne = window.innerHeight;
|
|
5876
5877
|
G = f(G, window.scrollX + 8, window.scrollX + pe - 340), W = f(W, window.scrollY, window.scrollY + Ne - 120), k.openColumnChooser(G, W);
|
|
5877
5878
|
} catch (R) {
|
|
@@ -5881,15 +5882,15 @@ const Lt = () => {
|
|
|
5881
5882
|
},
|
|
5882
5883
|
[]
|
|
5883
5884
|
// no external deps; reads ref at call time
|
|
5884
|
-
),
|
|
5885
|
+
), S = H(
|
|
5885
5886
|
(I, k) => {
|
|
5886
5887
|
const R = u();
|
|
5887
5888
|
if (R)
|
|
5888
5889
|
switch (I) {
|
|
5889
5890
|
case "Delete": {
|
|
5890
5891
|
if (v) {
|
|
5891
|
-
const
|
|
5892
|
-
return U(
|
|
5892
|
+
const V = R.getSelectedRecords();
|
|
5893
|
+
return U(V);
|
|
5893
5894
|
}
|
|
5894
5895
|
break;
|
|
5895
5896
|
}
|
|
@@ -5926,13 +5927,13 @@ const Lt = () => {
|
|
|
5926
5927
|
fe,
|
|
5927
5928
|
{
|
|
5928
5929
|
placeholder: E,
|
|
5929
|
-
value:
|
|
5930
|
+
value: C,
|
|
5930
5931
|
onDebouncedChange: (I) => {
|
|
5931
|
-
M(I),
|
|
5932
|
+
M(I), j(I);
|
|
5932
5933
|
},
|
|
5933
|
-
searchIconSize:
|
|
5934
|
+
searchIconSize: T || 16,
|
|
5934
5935
|
searchIconClass: _ || "",
|
|
5935
|
-
inputStyle:
|
|
5936
|
+
inputStyle: A || { paddingTop: "4px", paddingBottom: "4px" }
|
|
5936
5937
|
}
|
|
5937
5938
|
) }),
|
|
5938
5939
|
/* @__PURE__ */ n("div", { className: "flex gap-3", children: [
|
|
@@ -5941,16 +5942,16 @@ const Lt = () => {
|
|
|
5941
5942
|
Ce,
|
|
5942
5943
|
{
|
|
5943
5944
|
icon: Le,
|
|
5944
|
-
onClick: () =>
|
|
5945
|
+
onClick: () => S("Delete"),
|
|
5945
5946
|
ariaLabel: "Delete",
|
|
5946
|
-
disabled:
|
|
5947
|
+
disabled: D === 0
|
|
5947
5948
|
}
|
|
5948
5949
|
),
|
|
5949
5950
|
x && /* @__PURE__ */ e(
|
|
5950
5951
|
Ce,
|
|
5951
5952
|
{
|
|
5952
5953
|
icon: hr,
|
|
5953
|
-
onClick: (I) =>
|
|
5954
|
+
onClick: (I) => S("ColumnChooser", I),
|
|
5954
5955
|
ariaLabel: "Column Chooser"
|
|
5955
5956
|
}
|
|
5956
5957
|
),
|
|
@@ -5966,7 +5967,7 @@ const Lt = () => {
|
|
|
5966
5967
|
Ce,
|
|
5967
5968
|
{
|
|
5968
5969
|
icon: gr,
|
|
5969
|
-
onClick: () =>
|
|
5970
|
+
onClick: () => S("Print"),
|
|
5970
5971
|
ariaLabel: "Print"
|
|
5971
5972
|
}
|
|
5972
5973
|
),
|
|
@@ -5974,7 +5975,7 @@ const Lt = () => {
|
|
|
5974
5975
|
Ce,
|
|
5975
5976
|
{
|
|
5976
5977
|
icon: br,
|
|
5977
|
-
onClick: () =>
|
|
5978
|
+
onClick: () => S("Excel"),
|
|
5978
5979
|
ariaLabel: "Excel Download"
|
|
5979
5980
|
}
|
|
5980
5981
|
),
|
|
@@ -5982,7 +5983,7 @@ const Lt = () => {
|
|
|
5982
5983
|
Ce,
|
|
5983
5984
|
{
|
|
5984
5985
|
icon: fr,
|
|
5985
|
-
onClick: () =>
|
|
5986
|
+
onClick: () => S("Pdf"),
|
|
5986
5987
|
ariaLabel: "PDF Download"
|
|
5987
5988
|
}
|
|
5988
5989
|
),
|
|
@@ -5990,16 +5991,15 @@ const Lt = () => {
|
|
|
5990
5991
|
Ce,
|
|
5991
5992
|
{
|
|
5992
5993
|
icon: yr,
|
|
5993
|
-
onClick: () =>
|
|
5994
|
+
onClick: () => S("Refresh"),
|
|
5994
5995
|
ariaLabel: "Refresh"
|
|
5995
5996
|
}
|
|
5996
5997
|
)
|
|
5997
5998
|
] }),
|
|
5998
|
-
|
|
5999
|
+
$ && h && /* @__PURE__ */ e(
|
|
5999
6000
|
se,
|
|
6000
6001
|
{
|
|
6001
6002
|
label: p,
|
|
6002
|
-
icon: xr,
|
|
6003
6003
|
onClick: h,
|
|
6004
6004
|
size: "small",
|
|
6005
6005
|
ariaLabel: "Add New",
|
|
@@ -6010,7 +6010,7 @@ const Lt = () => {
|
|
|
6010
6010
|
] })
|
|
6011
6011
|
] });
|
|
6012
6012
|
};
|
|
6013
|
-
function
|
|
6013
|
+
function Jl(t) {
|
|
6014
6014
|
const {
|
|
6015
6015
|
data: a = [],
|
|
6016
6016
|
totalCount: s = 0,
|
|
@@ -6028,22 +6028,22 @@ function Xl(t) {
|
|
|
6028
6028
|
allowPdfExport: m = !1,
|
|
6029
6029
|
showColumnChooser: y = !1,
|
|
6030
6030
|
enableSearchApi: z = !1,
|
|
6031
|
-
height:
|
|
6032
|
-
selectionSettings:
|
|
6031
|
+
height: $ = "600",
|
|
6032
|
+
selectionSettings: D,
|
|
6033
6033
|
enableCheckbox: E = !1,
|
|
6034
6034
|
columns: L = [],
|
|
6035
|
-
onGridStateChange:
|
|
6035
|
+
onGridStateChange: j,
|
|
6036
6036
|
onRowSelected: U,
|
|
6037
6037
|
onRowDeselected: Y,
|
|
6038
6038
|
onRowDoubleClick: q,
|
|
6039
|
-
apiRef:
|
|
6039
|
+
apiRef: T,
|
|
6040
6040
|
gridProps: _ = {}
|
|
6041
|
-
} = t,
|
|
6041
|
+
} = t, A = he(null), {
|
|
6042
6042
|
pageSettings: u,
|
|
6043
|
-
sortSettings:
|
|
6043
|
+
sortSettings: C,
|
|
6044
6044
|
...M
|
|
6045
|
-
} = _ || {}, [O, b] = ae.useState(u?.page || l), [c, f] = ae.useState(u?.pageSize || h), [w,
|
|
6046
|
-
const B =
|
|
6045
|
+
} = _ || {}, [O, b] = ae.useState(u?.page || l), [c, f] = ae.useState(u?.pageSize || h), [w, S] = ae.useState(C?.sortKey || "updatedDate"), [I, k] = ae.useState(C?.direction || "Descending"), R = ee(() => {
|
|
6046
|
+
const B = D || {
|
|
6047
6047
|
type: "Multiple",
|
|
6048
6048
|
mode: "Row"
|
|
6049
6049
|
};
|
|
@@ -6056,9 +6056,9 @@ function Xl(t) {
|
|
|
6056
6056
|
checkboxOnly: !1,
|
|
6057
6057
|
enableSimpleMultiRowSelection: !0
|
|
6058
6058
|
} : B;
|
|
6059
|
-
}, [
|
|
6060
|
-
const B = [
|
|
6061
|
-
return (E ||
|
|
6059
|
+
}, [D, E]), V = ee(() => {
|
|
6060
|
+
const B = [Kr];
|
|
6061
|
+
return (E || D) && B.push(en), p && B.push(tn), g && B.push(an), v && B.push(rn), z && B.push(nn), N && B.push(sn), m && B.push(ln), y && B.push(on), r && B.push(cn), x && B.push(dn), B.push(mn), B;
|
|
6062
6062
|
}, [
|
|
6063
6063
|
p,
|
|
6064
6064
|
g,
|
|
@@ -6070,9 +6070,9 @@ function Xl(t) {
|
|
|
6070
6070
|
r,
|
|
6071
6071
|
x,
|
|
6072
6072
|
E,
|
|
6073
|
-
|
|
6073
|
+
D
|
|
6074
6074
|
]), F = ee(() => {
|
|
6075
|
-
const B = () =>
|
|
6075
|
+
const B = () => A.current, re = (J, ce) => {
|
|
6076
6076
|
!ce && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${J} requested but related service/feature is disabled.`);
|
|
6077
6077
|
};
|
|
6078
6078
|
return {
|
|
@@ -6102,15 +6102,15 @@ function Xl(t) {
|
|
|
6102
6102
|
};
|
|
6103
6103
|
}, [z, N, m, y]);
|
|
6104
6104
|
K(() => {
|
|
6105
|
-
|
|
6106
|
-
}, [
|
|
6107
|
-
|
|
6108
|
-
}, [
|
|
6105
|
+
T && (T.current = F);
|
|
6106
|
+
}, [T, F]), K(() => () => {
|
|
6107
|
+
T && (T.current = null);
|
|
6108
|
+
}, [T]);
|
|
6109
6109
|
const G = (B) => {
|
|
6110
6110
|
const re = String(B || "");
|
|
6111
6111
|
return re === "Ascending" || re === "Descending" ? re : re.toLowerCase() === "ascending" ? "Ascending" : "Descending";
|
|
6112
6112
|
}, W = (B) => {
|
|
6113
|
-
const re =
|
|
6113
|
+
const re = A.current, J = B?.requestType, ce = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Re = B?.pageSize ?? re?.pageSettings?.pageSize ?? c, Ue = B?.currentPage ?? re?.pageSettings?.currentPage ?? l, rt = B?.columnName && B?.direction ? [{ field: B.columnName, dir: G(B.direction) }] : (re?.sortSettings?.columns || []).map((Ie) => ({
|
|
6114
6114
|
field: Ie.field,
|
|
6115
6115
|
dir: G(Ie.direction ?? Ie.dir)
|
|
6116
6116
|
})), nt = B?.searchString ?? "", st = B?.columns ?? re?.filterSettings?.columns ?? [];
|
|
@@ -6129,8 +6129,8 @@ function Xl(t) {
|
|
|
6129
6129
|
};
|
|
6130
6130
|
}, pe = (B) => {
|
|
6131
6131
|
setTimeout(() => {
|
|
6132
|
-
|
|
6133
|
-
}, 1e3), B.requestType === "paging" && (b(B.currentPage), f(B.pageSize)), B.requestType === "sorting" && (
|
|
6132
|
+
A?.current?.hideSpinner();
|
|
6133
|
+
}, 1e3), B.requestType === "paging" && (b(B.currentPage), f(B.pageSize)), B.requestType === "sorting" && (S(B.columnName || "updatedDate"), k(B.direction)), j?.(W(B), B);
|
|
6134
6134
|
}, Ne = (B) => {
|
|
6135
6135
|
q?.(B?.rowData, B);
|
|
6136
6136
|
}, Na = () => {
|
|
@@ -6197,20 +6197,20 @@ function Xl(t) {
|
|
|
6197
6197
|
pageSize: c,
|
|
6198
6198
|
pageSizes: u?.pageSizes ?? [10, 20, 40, 60, 80, 100],
|
|
6199
6199
|
totalCount: s
|
|
6200
|
-
}), [O, c, u?.pageSizes, s]), ka = ee(() =>
|
|
6200
|
+
}), [O, c, u?.pageSizes, s]), ka = ee(() => C ?? {
|
|
6201
6201
|
columns: [{ field: w, direction: G(I) }],
|
|
6202
6202
|
allowUnsort: !1
|
|
6203
|
-
}, [
|
|
6203
|
+
}, [C, w, I]);
|
|
6204
6204
|
return /* @__PURE__ */ n(
|
|
6205
|
-
|
|
6205
|
+
un,
|
|
6206
6206
|
{
|
|
6207
6207
|
id: i,
|
|
6208
|
-
ref:
|
|
6208
|
+
ref: A,
|
|
6209
6209
|
dataSource: {
|
|
6210
6210
|
result: a,
|
|
6211
6211
|
count: s
|
|
6212
6212
|
},
|
|
6213
|
-
height:
|
|
6213
|
+
height: $,
|
|
6214
6214
|
allowPaging: o,
|
|
6215
6215
|
allowSorting: p,
|
|
6216
6216
|
allowFiltering: g,
|
|
@@ -6228,8 +6228,8 @@ function Xl(t) {
|
|
|
6228
6228
|
cssClass: "custom-grid-padding",
|
|
6229
6229
|
...M,
|
|
6230
6230
|
children: [
|
|
6231
|
-
/* @__PURE__ */ e(
|
|
6232
|
-
/* @__PURE__ */ e(
|
|
6231
|
+
/* @__PURE__ */ e(hn, { children: Na() }),
|
|
6232
|
+
/* @__PURE__ */ e(pn, { services: V })
|
|
6233
6233
|
]
|
|
6234
6234
|
}
|
|
6235
6235
|
);
|
|
@@ -6256,7 +6256,7 @@ const de = (t) => {
|
|
|
6256
6256
|
title: "text-lg",
|
|
6257
6257
|
meta: "text-sm"
|
|
6258
6258
|
}
|
|
6259
|
-
},
|
|
6259
|
+
}, vs = (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;
|
|
6260
6260
|
function oe({
|
|
6261
6261
|
children: t,
|
|
6262
6262
|
className: a = "",
|
|
@@ -6268,7 +6268,7 @@ function oe({
|
|
|
6268
6268
|
details: o = {},
|
|
6269
6269
|
...p
|
|
6270
6270
|
}) {
|
|
6271
|
-
const g = He(), v =
|
|
6271
|
+
const g = He(), v = vs(p, h), x = (N) => {
|
|
6272
6272
|
l?.({
|
|
6273
6273
|
key: v,
|
|
6274
6274
|
checked: N.target.checked,
|
|
@@ -6304,7 +6304,7 @@ oe.propTypes = {
|
|
|
6304
6304
|
identity: d.oneOfType([d.string, d.func]),
|
|
6305
6305
|
details: d.object
|
|
6306
6306
|
};
|
|
6307
|
-
function
|
|
6307
|
+
function Ns({
|
|
6308
6308
|
size: t = "md",
|
|
6309
6309
|
showCheckbox: a = !1,
|
|
6310
6310
|
checkboxPosition: s = "top-left",
|
|
@@ -6388,7 +6388,7 @@ function ws({
|
|
|
6388
6388
|
}
|
|
6389
6389
|
);
|
|
6390
6390
|
}
|
|
6391
|
-
|
|
6391
|
+
Ns.propTypes = {
|
|
6392
6392
|
size: d.string,
|
|
6393
6393
|
showCheckbox: d.bool,
|
|
6394
6394
|
checkboxPosition: d.oneOf(["top-left", "top-right"]),
|
|
@@ -6402,7 +6402,7 @@ ws.propTypes = {
|
|
|
6402
6402
|
imageUrl: d.string,
|
|
6403
6403
|
description: d.string
|
|
6404
6404
|
};
|
|
6405
|
-
const
|
|
6405
|
+
const ws = "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", ks = () => /* @__PURE__ */ e("span", { className: "ml-1 inline-block h-2.5 w-2.5 rounded-full bg-emerald-500 align-middle", "aria-label": "verified" }), Cs = [
|
|
6406
6406
|
{
|
|
6407
6407
|
_id: "cm-1",
|
|
6408
6408
|
name: "All Students",
|
|
@@ -6421,13 +6421,13 @@ const ks = "px-2 py-1 rounded-full text-[11px] font-semibold tracking-wide borde
|
|
|
6421
6421
|
joined: !0,
|
|
6422
6422
|
description: "What is Academic Advising? The mission of the Academic Advising Department at..."
|
|
6423
6423
|
}
|
|
6424
|
-
],
|
|
6424
|
+
], zs = {
|
|
6425
6425
|
sm: { wrap: "max-w-md", thumb: "h-14 w-14", name: "text-sm", desc: "text-[13px]" },
|
|
6426
6426
|
md: { wrap: "max-w-3xl", thumb: "h-16 w-16", name: "text-base", desc: "text-sm" },
|
|
6427
6427
|
lg: { wrap: "w-full", thumb: "h-20 w-20", name: "text-lg", desc: "text-base" }
|
|
6428
6428
|
// lg occupies full width
|
|
6429
6429
|
};
|
|
6430
|
-
function
|
|
6430
|
+
function Ss({
|
|
6431
6431
|
size: t = "md",
|
|
6432
6432
|
showCheckbox: a = !1,
|
|
6433
6433
|
checkboxPosition: s = "top-left",
|
|
@@ -6436,11 +6436,11 @@ function Ds({
|
|
|
6436
6436
|
title: h = "Communities",
|
|
6437
6437
|
activeTab: o = "joined",
|
|
6438
6438
|
// "joined" | "suggested"
|
|
6439
|
-
items: p =
|
|
6439
|
+
items: p = Cs,
|
|
6440
6440
|
// spread for identity (_id/instanceId/etc)
|
|
6441
6441
|
...g
|
|
6442
6442
|
}) {
|
|
6443
|
-
const v = de(t), x = me[v], r =
|
|
6443
|
+
const v = de(t), x = me[v], r = zs[v], N = (m) => `px-1 pb-2 text-sm font-medium ${m === o ? "text-zinc-900 dark:text-zinc-100 border-b-2" : "text-zinc-500 dark:text-zinc-400"}`;
|
|
6444
6444
|
return /* @__PURE__ */ n(
|
|
6445
6445
|
oe,
|
|
6446
6446
|
{
|
|
@@ -6490,10 +6490,10 @@ function Ds({
|
|
|
6490
6490
|
/* @__PURE__ */ n("div", { className: "min-w-0", children: [
|
|
6491
6491
|
/* @__PURE__ */ n("div", { className: `flex items-center gap-1 font-semibold ${r.name}`, children: [
|
|
6492
6492
|
/* @__PURE__ */ e("span", { className: "truncate", children: m.name }),
|
|
6493
|
-
/* @__PURE__ */ e(
|
|
6493
|
+
/* @__PURE__ */ e(ks, {})
|
|
6494
6494
|
] }),
|
|
6495
6495
|
/* @__PURE__ */ n("div", { className: "flex gap-1 justify-center items-center", children: [
|
|
6496
|
-
/* @__PURE__ */ n(
|
|
6496
|
+
/* @__PURE__ */ n(yn, { children: [
|
|
6497
6497
|
/* @__PURE__ */ e(we, { size: "small", src: m.avatar, name: "John" }),
|
|
6498
6498
|
/* @__PURE__ */ e(we, { size: "small", src: m.avatar, name: "Omi" }),
|
|
6499
6499
|
/* @__PURE__ */ e(we, { size: "small", src: m.avatar, name: "Raj" })
|
|
@@ -6504,7 +6504,7 @@ function Ds({
|
|
|
6504
6504
|
" Members"
|
|
6505
6505
|
] })
|
|
6506
6506
|
] }),
|
|
6507
|
-
/* @__PURE__ */ e("div", { className: "mt-2", children: /* @__PURE__ */ e("span", { className:
|
|
6507
|
+
/* @__PURE__ */ e("div", { className: "mt-2", children: /* @__PURE__ */ e("span", { className: ws, children: m.category }) })
|
|
6508
6508
|
] }),
|
|
6509
6509
|
m.joined && /* @__PURE__ */ e(
|
|
6510
6510
|
"span",
|
|
@@ -6543,7 +6543,7 @@ function Ds({
|
|
|
6543
6543
|
}
|
|
6544
6544
|
);
|
|
6545
6545
|
}
|
|
6546
|
-
|
|
6546
|
+
Ss.propTypes = {
|
|
6547
6547
|
size: d.string,
|
|
6548
6548
|
showCheckbox: d.bool,
|
|
6549
6549
|
checkboxPosition: d.oneOf(["top-left", "top-right"]),
|
|
@@ -6563,7 +6563,7 @@ Ds.propTypes = {
|
|
|
6563
6563
|
})
|
|
6564
6564
|
)
|
|
6565
6565
|
};
|
|
6566
|
-
const
|
|
6566
|
+
const Ds = [
|
|
6567
6567
|
{
|
|
6568
6568
|
_id: "nw-1",
|
|
6569
6569
|
title: "KCC’s 3rd Annual Community & Business Partners Luncheon",
|
|
@@ -6588,7 +6588,7 @@ const $s = [
|
|
|
6588
6588
|
thumb: "https://images.unsplash.com/photo-1522202176988-66273c2fd55f?q=80&w=640&auto=format&fit=crop",
|
|
6589
6589
|
excerpt: "Community and business partners joined KCC leadership to recognize outstanding collaborations and celebrate student success…"
|
|
6590
6590
|
}
|
|
6591
|
-
],
|
|
6591
|
+
], $s = {
|
|
6592
6592
|
sm: {
|
|
6593
6593
|
wrap: "max-w-md",
|
|
6594
6594
|
itemThumb: "h-14 w-20",
|
|
@@ -6613,18 +6613,18 @@ const $s = [
|
|
|
6613
6613
|
excerpt: "text-sm text-zinc-600 dark:text-zinc-300 line-clamp-2"
|
|
6614
6614
|
}
|
|
6615
6615
|
}, Vt = ({ 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 });
|
|
6616
|
-
function
|
|
6616
|
+
function Ts({
|
|
6617
6617
|
size: t = "md",
|
|
6618
6618
|
showCheckbox: a = !1,
|
|
6619
6619
|
checkboxPosition: s = "top-left",
|
|
6620
6620
|
onSelect: i,
|
|
6621
6621
|
identity: l = "_id",
|
|
6622
6622
|
title: h = "News",
|
|
6623
|
-
items: o =
|
|
6623
|
+
items: o = Ds,
|
|
6624
6624
|
// spread for identity fields: _id / id / instanceId etc.
|
|
6625
6625
|
...p
|
|
6626
6626
|
}) {
|
|
6627
|
-
const g = de(t), v = me[g], x =
|
|
6627
|
+
const g = de(t), v = me[g], x = $s[g];
|
|
6628
6628
|
return /* @__PURE__ */ n(
|
|
6629
6629
|
oe,
|
|
6630
6630
|
{
|
|
@@ -6681,7 +6681,7 @@ function As({
|
|
|
6681
6681
|
}
|
|
6682
6682
|
);
|
|
6683
6683
|
}
|
|
6684
|
-
|
|
6684
|
+
Ts.propTypes = {
|
|
6685
6685
|
size: d.string,
|
|
6686
6686
|
showCheckbox: d.bool,
|
|
6687
6687
|
checkboxPosition: d.oneOf(["top-left", "top-right"]),
|
|
@@ -6699,7 +6699,7 @@ As.propTypes = {
|
|
|
6699
6699
|
})
|
|
6700
6700
|
)
|
|
6701
6701
|
};
|
|
6702
|
-
const
|
|
6702
|
+
const As = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Fs = {
|
|
6703
6703
|
sm: {
|
|
6704
6704
|
wrap: "max-w-md w-full md:w-auto flex-none justify-self-start",
|
|
6705
6705
|
mapH: "h-48",
|
|
@@ -6721,15 +6721,15 @@ const Fs = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Es = {
|
|
|
6721
6721
|
searchH: "h-11 text-base",
|
|
6722
6722
|
chipGap: "gap-3.5"
|
|
6723
6723
|
}
|
|
6724
|
-
},
|
|
6724
|
+
}, Es = ({ label: t, active: a = !1, size: s = "md", className: i = "" }) => {
|
|
6725
6725
|
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)]", h = {
|
|
6726
6726
|
sm: "h-8 px-3 text-[11px] font-semibold",
|
|
6727
6727
|
md: "h-9 px-3.5 text-[13px] font-semibold",
|
|
6728
6728
|
lg: "h-10 px-4 text-sm font-semibold"
|
|
6729
6729
|
}, 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";
|
|
6730
6730
|
return /* @__PURE__ */ e("span", { className: `${l} ${h[s] ?? h.md} ${o} ${i}`, children: t });
|
|
6731
|
-
},
|
|
6732
|
-
function
|
|
6731
|
+
}, Rs = (t, a = 12) => `https://www.google.com/maps?q=${encodeURIComponent(t)}&z=${a}&output=embed`;
|
|
6732
|
+
function Is({
|
|
6733
6733
|
size: t = "md",
|
|
6734
6734
|
showCheckbox: a = !1,
|
|
6735
6735
|
checkboxPosition: s = "top-left",
|
|
@@ -6737,7 +6737,7 @@ function Os({
|
|
|
6737
6737
|
identity: l = "_id",
|
|
6738
6738
|
title: h = "Campus Map",
|
|
6739
6739
|
campusName: o = "Morningside Heights Campus",
|
|
6740
|
-
filters: p =
|
|
6740
|
+
filters: p = As,
|
|
6741
6741
|
activeFilter: g = "All",
|
|
6742
6742
|
// NEW: iframe controls
|
|
6743
6743
|
mapQuery: v = "Florida",
|
|
@@ -6746,7 +6746,7 @@ function Os({
|
|
|
6746
6746
|
// optional full embed URL override
|
|
6747
6747
|
...N
|
|
6748
6748
|
}) {
|
|
6749
|
-
const m = de(t), y = me[m], z =
|
|
6749
|
+
const m = de(t), y = me[m], z = Fs[m], $ = r || Rs(v, x);
|
|
6750
6750
|
return /* @__PURE__ */ e(
|
|
6751
6751
|
oe,
|
|
6752
6752
|
{
|
|
@@ -6762,7 +6762,7 @@ function Os({
|
|
|
6762
6762
|
"iframe",
|
|
6763
6763
|
{
|
|
6764
6764
|
title: "Google Map",
|
|
6765
|
-
src:
|
|
6765
|
+
src: $,
|
|
6766
6766
|
className: "h-full w-full",
|
|
6767
6767
|
style: { border: 0 },
|
|
6768
6768
|
loading: "lazy",
|
|
@@ -6780,7 +6780,7 @@ function Os({
|
|
|
6780
6780
|
/* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
|
|
6781
6781
|
] })
|
|
6782
6782
|
] }),
|
|
6783
|
-
/* @__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: p.map((
|
|
6783
|
+
/* @__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: p.map((D) => /* @__PURE__ */ e(Es, { label: D, active: D === g, size: m }, D)) }) }),
|
|
6784
6784
|
/* @__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: [
|
|
6785
6785
|
/* @__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" }) }),
|
|
6786
6786
|
/* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
|
|
@@ -6789,7 +6789,7 @@ function Os({
|
|
|
6789
6789
|
}
|
|
6790
6790
|
);
|
|
6791
6791
|
}
|
|
6792
|
-
|
|
6792
|
+
Is.propTypes = {
|
|
6793
6793
|
size: d.string,
|
|
6794
6794
|
showCheckbox: d.bool,
|
|
6795
6795
|
checkboxPosition: d.oneOf(["top-left", "top-right"]),
|
|
@@ -6805,7 +6805,7 @@ Os.propTypes = {
|
|
|
6805
6805
|
mapUrl: d.string
|
|
6806
6806
|
// optional full embed URL override
|
|
6807
6807
|
};
|
|
6808
|
-
const
|
|
6808
|
+
const Os = [
|
|
6809
6809
|
{
|
|
6810
6810
|
_id: "ev-1",
|
|
6811
6811
|
title: "Warhawk Weekly 10-1: Master the future; Rolling out 'Red'",
|
|
@@ -6836,7 +6836,7 @@ const Ms = [
|
|
|
6836
6836
|
image: "https://images.unsplash.com/photo-1492684223066-81342ee5ff30?q=80&w=1200&auto=format&fit=crop",
|
|
6837
6837
|
description: ""
|
|
6838
6838
|
}
|
|
6839
|
-
],
|
|
6839
|
+
], Ms = {
|
|
6840
6840
|
sm: {
|
|
6841
6841
|
wrap: "max-w-sm w-full",
|
|
6842
6842
|
listGap: "gap-3",
|
|
@@ -6873,11 +6873,11 @@ const Ms = [
|
|
|
6873
6873
|
showImage: !0,
|
|
6874
6874
|
compact: !1
|
|
6875
6875
|
}
|
|
6876
|
-
},
|
|
6876
|
+
}, Ps = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], xa = (t) => {
|
|
6877
6877
|
const a = new Date(t);
|
|
6878
6878
|
return {
|
|
6879
6879
|
day: a.getDate(),
|
|
6880
|
-
month:
|
|
6880
|
+
month: Ps[a.getMonth()] || "",
|
|
6881
6881
|
time: a.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })
|
|
6882
6882
|
};
|
|
6883
6883
|
};
|
|
@@ -6905,7 +6905,7 @@ function jt({ ev: t, sizeMeta: a, isSelected: s, onClick: i }) {
|
|
|
6905
6905
|
}
|
|
6906
6906
|
);
|
|
6907
6907
|
}
|
|
6908
|
-
function
|
|
6908
|
+
function Ls({ ev: t, sizeMeta: a }) {
|
|
6909
6909
|
if (!t) return null;
|
|
6910
6910
|
const { day: s, month: i, time: l } = xa(t.date);
|
|
6911
6911
|
return /* @__PURE__ */ n("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 p-6", children: [
|
|
@@ -6935,26 +6935,26 @@ function Bs({ ev: t, sizeMeta: a }) {
|
|
|
6935
6935
|
t.location
|
|
6936
6936
|
] }),
|
|
6937
6937
|
t.url && /* @__PURE__ */ n("div", { className: `flex items-center gap-2 mb-4 text-zinc-600 dark:text-zinc-400 ${a.meta}`, children: [
|
|
6938
|
-
/* @__PURE__ */ e(
|
|
6938
|
+
/* @__PURE__ */ e(xr, { className: "h-4 w-4" }),
|
|
6939
6939
|
/* @__PURE__ */ e("span", { className: "text-blue-600 dark:text-blue-400 underline break-all", children: t.url })
|
|
6940
6940
|
] }),
|
|
6941
6941
|
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 }) })
|
|
6942
6942
|
] });
|
|
6943
6943
|
}
|
|
6944
|
-
function
|
|
6944
|
+
function Bs({
|
|
6945
6945
|
size: t = "md",
|
|
6946
6946
|
showCheckbox: a = !1,
|
|
6947
6947
|
checkboxPosition: s = "top-left",
|
|
6948
6948
|
onSelect: i,
|
|
6949
6949
|
identity: l = "_id",
|
|
6950
6950
|
title: h = "Upcoming Events",
|
|
6951
|
-
events: o =
|
|
6951
|
+
events: o = Os,
|
|
6952
6952
|
selectedIndex: p = 0,
|
|
6953
6953
|
...g
|
|
6954
6954
|
}) {
|
|
6955
|
-
const [v, x] = P(p), r = de(t), N = me[r], m =
|
|
6956
|
-
x(E), i?.(
|
|
6957
|
-
},
|
|
6955
|
+
const [v, x] = P(p), r = de(t), N = me[r], m = Ms[r], y = o[v] || o[0], z = (D, E) => {
|
|
6956
|
+
x(E), i?.(D);
|
|
6957
|
+
}, $ = r === "lg";
|
|
6958
6958
|
return /* @__PURE__ */ n(
|
|
6959
6959
|
oe,
|
|
6960
6960
|
{
|
|
@@ -6970,40 +6970,40 @@ function Vs({
|
|
|
6970
6970
|
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${N.title}`, children: h }),
|
|
6971
6971
|
/* @__PURE__ */ e("button", { className: "text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" })
|
|
6972
6972
|
] }),
|
|
6973
|
-
|
|
6973
|
+
$ ? (
|
|
6974
6974
|
// Large: Two-column layout
|
|
6975
6975
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
6976
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((
|
|
6976
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((D, E) => /* @__PURE__ */ e(
|
|
6977
6977
|
jt,
|
|
6978
6978
|
{
|
|
6979
|
-
ev:
|
|
6979
|
+
ev: D,
|
|
6980
6980
|
sizeMeta: m,
|
|
6981
6981
|
isSelected: E === v,
|
|
6982
6982
|
onClick: (L) => z(L, E)
|
|
6983
6983
|
},
|
|
6984
|
-
|
|
6984
|
+
D._id || D.id || E
|
|
6985
6985
|
)) }),
|
|
6986
|
-
/* @__PURE__ */ e(
|
|
6986
|
+
/* @__PURE__ */ e(Ls, { ev: y, sizeMeta: m })
|
|
6987
6987
|
] })
|
|
6988
6988
|
) : (
|
|
6989
6989
|
// Small/Medium: Simple list only
|
|
6990
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((
|
|
6990
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((D, E) => /* @__PURE__ */ e(
|
|
6991
6991
|
jt,
|
|
6992
6992
|
{
|
|
6993
|
-
ev:
|
|
6993
|
+
ev: D,
|
|
6994
6994
|
sizeMeta: m,
|
|
6995
6995
|
isSelected: E === v,
|
|
6996
6996
|
onClick: (L) => z(L, E)
|
|
6997
6997
|
},
|
|
6998
|
-
|
|
6998
|
+
D._id || D.id || E
|
|
6999
6999
|
)) })
|
|
7000
7000
|
),
|
|
7001
|
-
|
|
7001
|
+
!$ && /* @__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" }) })
|
|
7002
7002
|
]
|
|
7003
7003
|
}
|
|
7004
7004
|
);
|
|
7005
7005
|
}
|
|
7006
|
-
|
|
7006
|
+
Bs.propTypes = {
|
|
7007
7007
|
size: d.string,
|
|
7008
7008
|
showCheckbox: d.bool,
|
|
7009
7009
|
checkboxPosition: d.oneOf(["top-left", "top-right"]),
|
|
@@ -7024,7 +7024,7 @@ Vs.propTypes = {
|
|
|
7024
7024
|
),
|
|
7025
7025
|
selectedIndex: d.number
|
|
7026
7026
|
};
|
|
7027
|
-
const
|
|
7027
|
+
const Vs = [
|
|
7028
7028
|
{
|
|
7029
7029
|
_id: "mail-1",
|
|
7030
7030
|
sender: "Sender Name",
|
|
@@ -7069,7 +7069,7 @@ const js = [
|
|
|
7069
7069
|
// pinned: false,
|
|
7070
7070
|
// important: false,
|
|
7071
7071
|
// },
|
|
7072
|
-
],
|
|
7072
|
+
], js = {
|
|
7073
7073
|
sm: {
|
|
7074
7074
|
wrap: "max-w-sm w-full",
|
|
7075
7075
|
listGap: "gap-2",
|
|
@@ -7107,7 +7107,7 @@ const js = [
|
|
|
7107
7107
|
searchHeight: "h-10"
|
|
7108
7108
|
}
|
|
7109
7109
|
};
|
|
7110
|
-
function
|
|
7110
|
+
function _s({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin: h }) {
|
|
7111
7111
|
const o = (g) => {
|
|
7112
7112
|
g.stopPropagation(), l?.(t);
|
|
7113
7113
|
}, p = (g) => {
|
|
@@ -7125,7 +7125,7 @@ function Us({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin
|
|
|
7125
7125
|
{
|
|
7126
7126
|
onClick: o,
|
|
7127
7127
|
className: "p-1 rounded hover:bg-zinc-200 dark:hover:bg-zinc-700 transition-colors duration-200",
|
|
7128
|
-
children: t.starred ? /* @__PURE__ */ e(
|
|
7128
|
+
children: t.starred ? /* @__PURE__ */ e(vr, { className: "h-4 w-4 fill-yellow-400 text-yellow-400" }) : /* @__PURE__ */ e(Nr, { className: "h-4 w-4 text-zinc-400 group-hover:text-yellow-400" })
|
|
7129
7129
|
}
|
|
7130
7130
|
),
|
|
7131
7131
|
/* @__PURE__ */ e(
|
|
@@ -7133,7 +7133,7 @@ function Us({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin
|
|
|
7133
7133
|
{
|
|
7134
7134
|
onClick: p,
|
|
7135
7135
|
className: "p-1 rounded hover:bg-zinc-200 dark:hover:bg-zinc-700 transition-colors duration-200",
|
|
7136
|
-
children: t.pinned ? /* @__PURE__ */ e(
|
|
7136
|
+
children: t.pinned ? /* @__PURE__ */ e(wr, { className: "h-4 w-4 fill-blue-500 text-blue-500" }) : /* @__PURE__ */ e(kr, { className: "h-4 w-4 text-zinc-400 group-hover:text-blue-500" })
|
|
7137
7137
|
}
|
|
7138
7138
|
)
|
|
7139
7139
|
] }),
|
|
@@ -7156,27 +7156,27 @@ function Us({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin
|
|
|
7156
7156
|
}
|
|
7157
7157
|
);
|
|
7158
7158
|
}
|
|
7159
|
-
function
|
|
7159
|
+
function Us({
|
|
7160
7160
|
size: t = "md",
|
|
7161
7161
|
showCheckbox: a = !1,
|
|
7162
7162
|
checkboxPosition: s = "top-left",
|
|
7163
7163
|
onSelect: i,
|
|
7164
7164
|
identity: l = "_id",
|
|
7165
7165
|
title: h = "0365 Mails",
|
|
7166
|
-
emails: o =
|
|
7166
|
+
emails: o = Vs,
|
|
7167
7167
|
selectedIndex: p = 0,
|
|
7168
7168
|
onStar: g,
|
|
7169
7169
|
onPin: v,
|
|
7170
7170
|
...x
|
|
7171
7171
|
}) {
|
|
7172
|
-
const [r, N] = P(p), m = de(t), y = me[m], z =
|
|
7173
|
-
N(
|
|
7174
|
-
},
|
|
7175
|
-
const
|
|
7176
|
-
g?.(
|
|
7172
|
+
const [r, N] = P(p), m = de(t), y = me[m], z = js[m], $ = (L, j) => {
|
|
7173
|
+
N(j), i?.(L);
|
|
7174
|
+
}, D = (L) => {
|
|
7175
|
+
const j = { ...L, starred: !L.starred };
|
|
7176
|
+
g?.(j);
|
|
7177
7177
|
}, E = (L) => {
|
|
7178
|
-
const
|
|
7179
|
-
v?.(
|
|
7178
|
+
const j = { ...L, pinned: !L.pinned };
|
|
7179
|
+
v?.(j);
|
|
7180
7180
|
};
|
|
7181
7181
|
return /* @__PURE__ */ n(
|
|
7182
7182
|
oe,
|
|
@@ -7191,24 +7191,24 @@ function Gs({
|
|
|
7191
7191
|
children: [
|
|
7192
7192
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${y.title}`, children: h }) }),
|
|
7193
7193
|
/* @__PURE__ */ e(fe, { placeholder: "Type to search..." }),
|
|
7194
|
-
/* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((L,
|
|
7195
|
-
|
|
7194
|
+
/* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((L, j) => /* @__PURE__ */ e(
|
|
7195
|
+
_s,
|
|
7196
7196
|
{
|
|
7197
7197
|
email: L,
|
|
7198
7198
|
sizeMeta: z,
|
|
7199
|
-
isSelected:
|
|
7200
|
-
onClick: (U) =>
|
|
7201
|
-
onStar:
|
|
7199
|
+
isSelected: j === r,
|
|
7200
|
+
onClick: (U) => $(U, j),
|
|
7201
|
+
onStar: D,
|
|
7202
7202
|
onPin: E
|
|
7203
7203
|
},
|
|
7204
|
-
L._id || L.id ||
|
|
7204
|
+
L._id || L.id || j
|
|
7205
7205
|
)) }),
|
|
7206
7206
|
/* @__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" }) })
|
|
7207
7207
|
]
|
|
7208
7208
|
}
|
|
7209
7209
|
);
|
|
7210
7210
|
}
|
|
7211
|
-
|
|
7211
|
+
Us.propTypes = {
|
|
7212
7212
|
size: d.string,
|
|
7213
7213
|
showCheckbox: d.bool,
|
|
7214
7214
|
checkboxPosition: d.oneOf(["top-left", "top-right"]),
|
|
@@ -7232,7 +7232,7 @@ Gs.propTypes = {
|
|
|
7232
7232
|
onStar: d.func,
|
|
7233
7233
|
onPin: d.func
|
|
7234
7234
|
};
|
|
7235
|
-
const
|
|
7235
|
+
const Gs = [
|
|
7236
7236
|
{
|
|
7237
7237
|
_id: "contact-1",
|
|
7238
7238
|
name: "Branden Baker",
|
|
@@ -7273,7 +7273,7 @@ const qs = [
|
|
|
7273
7273
|
// building: "Security Building",
|
|
7274
7274
|
// initials: "AM"
|
|
7275
7275
|
// }
|
|
7276
|
-
],
|
|
7276
|
+
], qs = {
|
|
7277
7277
|
sm: {
|
|
7278
7278
|
wrap: "max-w-sm w-full",
|
|
7279
7279
|
searchHeight: "h-8",
|
|
@@ -7343,7 +7343,7 @@ function _t({ contact: t, sizeMeta: a, isSelected: s, onClick: i }) {
|
|
|
7343
7343
|
}
|
|
7344
7344
|
);
|
|
7345
7345
|
}
|
|
7346
|
-
function
|
|
7346
|
+
function Ys({ contact: t, sizeMeta: a }) {
|
|
7347
7347
|
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: [
|
|
7348
7348
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-4 mb-6", children: [
|
|
7349
7349
|
/* @__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 }),
|
|
@@ -7364,7 +7364,7 @@ function Ws({ contact: t, sizeMeta: a }) {
|
|
|
7364
7364
|
] })
|
|
7365
7365
|
] }),
|
|
7366
7366
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
7367
|
-
/* @__PURE__ */ e(
|
|
7367
|
+
/* @__PURE__ */ e(Cr, { className: "h-4 w-4 text-zinc-500 dark:text-zinc-400 flex-shrink-0" }),
|
|
7368
7368
|
/* @__PURE__ */ n("div", { children: [
|
|
7369
7369
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-600 dark:text-zinc-400 font-medium`, children: "Email Address" }),
|
|
7370
7370
|
/* @__PURE__ */ e("div", { className: `${a.details} text-zinc-900 dark:text-zinc-100`, children: t.email })
|
|
@@ -7397,7 +7397,7 @@ function Ws({ contact: t, sizeMeta: a }) {
|
|
|
7397
7397
|
/* @__PURE__ */ e("p", { className: "text-sm", children: "Select a contact to view details" })
|
|
7398
7398
|
] }) });
|
|
7399
7399
|
}
|
|
7400
|
-
function
|
|
7400
|
+
function Ws({ sizeMeta: t }) {
|
|
7401
7401
|
return /* @__PURE__ */ n("div", { className: `relative ${t.searchHeight} mb-4`, children: [
|
|
7402
7402
|
/* @__PURE__ */ e(ft, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-zinc-400" }),
|
|
7403
7403
|
/* @__PURE__ */ e(
|
|
@@ -7410,20 +7410,20 @@ function Js({ sizeMeta: t }) {
|
|
|
7410
7410
|
)
|
|
7411
7411
|
] });
|
|
7412
7412
|
}
|
|
7413
|
-
function
|
|
7413
|
+
function Js({
|
|
7414
7414
|
size: t = "md",
|
|
7415
7415
|
showCheckbox: a = !1,
|
|
7416
7416
|
checkboxPosition: s = "top-left",
|
|
7417
7417
|
onSelect: i,
|
|
7418
7418
|
identity: l = "_id",
|
|
7419
7419
|
title: h = "Directory",
|
|
7420
|
-
contacts: o =
|
|
7420
|
+
contacts: o = Gs,
|
|
7421
7421
|
selectedIndex: p = 0,
|
|
7422
7422
|
...g
|
|
7423
7423
|
}) {
|
|
7424
|
-
const [v, x] = P(p), r = de(t), N = me[r], m =
|
|
7425
|
-
x(E), i?.(
|
|
7426
|
-
}, z = o[v] || o[0],
|
|
7424
|
+
const [v, x] = P(p), r = de(t), N = me[r], m = qs[r], y = (D, E) => {
|
|
7425
|
+
x(E), i?.(D);
|
|
7426
|
+
}, z = o[v] || o[0], $ = m.layout === "split";
|
|
7427
7427
|
return /* @__PURE__ */ n(
|
|
7428
7428
|
oe,
|
|
7429
7429
|
{
|
|
@@ -7436,20 +7436,20 @@ function Xs({
|
|
|
7436
7436
|
...g,
|
|
7437
7437
|
children: [
|
|
7438
7438
|
/* @__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 ${N.title}`, children: h }) }),
|
|
7439
|
-
/* @__PURE__ */ e(
|
|
7440
|
-
|
|
7441
|
-
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((
|
|
7439
|
+
/* @__PURE__ */ e(Ws, { sizeMeta: m }),
|
|
7440
|
+
$ ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
|
|
7441
|
+
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((D, E) => /* @__PURE__ */ e(
|
|
7442
7442
|
_t,
|
|
7443
7443
|
{
|
|
7444
|
-
contact:
|
|
7444
|
+
contact: D,
|
|
7445
7445
|
sizeMeta: m,
|
|
7446
7446
|
isSelected: E === v,
|
|
7447
7447
|
onClick: (L) => y(L, E)
|
|
7448
7448
|
},
|
|
7449
|
-
|
|
7449
|
+
D._id || D.id || E
|
|
7450
7450
|
)) }),
|
|
7451
7451
|
/* @__PURE__ */ e(
|
|
7452
|
-
|
|
7452
|
+
Ys,
|
|
7453
7453
|
{
|
|
7454
7454
|
contact: z,
|
|
7455
7455
|
sizeMeta: m
|
|
@@ -7457,15 +7457,15 @@ function Xs({
|
|
|
7457
7457
|
)
|
|
7458
7458
|
] }) : (
|
|
7459
7459
|
// Single column layout for small screens
|
|
7460
|
-
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((
|
|
7460
|
+
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((D, E) => /* @__PURE__ */ e(
|
|
7461
7461
|
_t,
|
|
7462
7462
|
{
|
|
7463
|
-
contact:
|
|
7463
|
+
contact: D,
|
|
7464
7464
|
sizeMeta: m,
|
|
7465
7465
|
isSelected: E === v,
|
|
7466
7466
|
onClick: (L) => y(L, E)
|
|
7467
7467
|
},
|
|
7468
|
-
|
|
7468
|
+
D._id || D.id || E
|
|
7469
7469
|
)) })
|
|
7470
7470
|
),
|
|
7471
7471
|
/* @__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" }) })
|
|
@@ -7473,7 +7473,7 @@ function Xs({
|
|
|
7473
7473
|
}
|
|
7474
7474
|
);
|
|
7475
7475
|
}
|
|
7476
|
-
|
|
7476
|
+
Js.propTypes = {
|
|
7477
7477
|
size: d.string,
|
|
7478
7478
|
showCheckbox: d.bool,
|
|
7479
7479
|
checkboxPosition: d.oneOf(["top-left", "top-right"]),
|
|
@@ -7495,7 +7495,7 @@ Xs.propTypes = {
|
|
|
7495
7495
|
selectedIndex: d.number
|
|
7496
7496
|
};
|
|
7497
7497
|
const Te = (t) => new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" }).format(Number(t || 0));
|
|
7498
|
-
function
|
|
7498
|
+
function Xs({ side: t = "left", date: a, title: s, amount: i, kind: l = "payment" }) {
|
|
7499
7499
|
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: [
|
|
7500
7500
|
/* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: a }),
|
|
7501
7501
|
/* @__PURE__ */ e("div", { className: "mt-1 text-sm text-zinc-700 dark:text-zinc-200", children: s }),
|
|
@@ -7511,7 +7511,7 @@ function Qs({ side: t = "left", date: a, title: s, amount: i, kind: l = "payment
|
|
|
7511
7511
|
] })
|
|
7512
7512
|
] });
|
|
7513
7513
|
}
|
|
7514
|
-
const
|
|
7514
|
+
const Qs = {
|
|
7515
7515
|
sm: {
|
|
7516
7516
|
// was: "max-w-md w-full md:w-auto flex-none justify-self-start"
|
|
7517
7517
|
wrap: "max-w-md w-auto inline-block align-top flex-none justify-self-start",
|
|
@@ -7543,7 +7543,7 @@ const Hs = {
|
|
|
7543
7543
|
buttonPad: "py-3.5"
|
|
7544
7544
|
}
|
|
7545
7545
|
};
|
|
7546
|
-
function
|
|
7546
|
+
function Hs({
|
|
7547
7547
|
size: t = "md",
|
|
7548
7548
|
showCheckbox: a = !1,
|
|
7549
7549
|
checkboxPosition: s = "top-left",
|
|
@@ -7573,7 +7573,7 @@ function Zs({
|
|
|
7573
7573
|
],
|
|
7574
7574
|
...r
|
|
7575
7575
|
}) {
|
|
7576
|
-
const N = de(t), m = me[N], y =
|
|
7576
|
+
const N = de(t), m = me[N], y = Qs[N];
|
|
7577
7577
|
return /* @__PURE__ */ n(
|
|
7578
7578
|
oe,
|
|
7579
7579
|
{
|
|
@@ -7618,16 +7618,16 @@ function Zs({
|
|
|
7618
7618
|
/* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: Te(v) })
|
|
7619
7619
|
] })
|
|
7620
7620
|
] }),
|
|
7621
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: x.slice(0, 2).map((z,
|
|
7622
|
-
|
|
7621
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: x.slice(0, 2).map((z, $) => /* @__PURE__ */ e(
|
|
7622
|
+
Xs,
|
|
7623
7623
|
{
|
|
7624
|
-
side:
|
|
7624
|
+
side: $ === 0 ? "left" : "right",
|
|
7625
7625
|
date: z.date,
|
|
7626
7626
|
title: z.title,
|
|
7627
7627
|
amount: z.amount,
|
|
7628
7628
|
kind: z.kind
|
|
7629
7629
|
},
|
|
7630
|
-
z.id ||
|
|
7630
|
+
z.id || $
|
|
7631
7631
|
)) })
|
|
7632
7632
|
] })
|
|
7633
7633
|
] }),
|
|
@@ -7640,7 +7640,7 @@ function Zs({
|
|
|
7640
7640
|
"aria-label": "View Transactions (mock)",
|
|
7641
7641
|
children: [
|
|
7642
7642
|
"View Transactions",
|
|
7643
|
-
/* @__PURE__ */ e(
|
|
7643
|
+
/* @__PURE__ */ e(zr, { className: "h-4 w-4" })
|
|
7644
7644
|
]
|
|
7645
7645
|
}
|
|
7646
7646
|
)
|
|
@@ -7648,7 +7648,7 @@ function Zs({
|
|
|
7648
7648
|
}
|
|
7649
7649
|
);
|
|
7650
7650
|
}
|
|
7651
|
-
|
|
7651
|
+
Hs.propTypes = {
|
|
7652
7652
|
size: d.string,
|
|
7653
7653
|
showCheckbox: d.bool,
|
|
7654
7654
|
checkboxPosition: d.oneOf(["top-left", "top-right"]),
|
|
@@ -7669,7 +7669,7 @@ Zs.propTypes = {
|
|
|
7669
7669
|
})
|
|
7670
7670
|
)
|
|
7671
7671
|
};
|
|
7672
|
-
const
|
|
7672
|
+
const Zs = {
|
|
7673
7673
|
sm: {
|
|
7674
7674
|
wrap: "max-w-xs w-full",
|
|
7675
7675
|
title: "text-base font-semibold",
|
|
@@ -7736,7 +7736,7 @@ function Ut({ leave: t, sizeMeta: a }) {
|
|
|
7736
7736
|
] }, i)) })
|
|
7737
7737
|
] });
|
|
7738
7738
|
}
|
|
7739
|
-
function
|
|
7739
|
+
function Ks({
|
|
7740
7740
|
size: t = "md",
|
|
7741
7741
|
showCheckbox: a = !1,
|
|
7742
7742
|
checkboxPosition: s = "top-left",
|
|
@@ -7746,7 +7746,7 @@ function el({
|
|
|
7746
7746
|
term: o = "Fall 2025",
|
|
7747
7747
|
...p
|
|
7748
7748
|
}) {
|
|
7749
|
-
const [g, v] = P("vacation"), [x, r] = P(!1), N = de(t), m = me[N], y =
|
|
7749
|
+
const [g, v] = P("vacation"), [x, r] = P(!1), N = de(t), m = me[N], y = Zs[N], z = We.find(($) => $.id === g) || We[0];
|
|
7750
7750
|
return /* @__PURE__ */ n(
|
|
7751
7751
|
oe,
|
|
7752
7752
|
{
|
|
@@ -7782,18 +7782,18 @@ function el({
|
|
|
7782
7782
|
] })
|
|
7783
7783
|
] })
|
|
7784
7784
|
] }),
|
|
7785
|
-
y.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: We.map((
|
|
7785
|
+
y.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: We.map(($) => /* @__PURE__ */ e(
|
|
7786
7786
|
"button",
|
|
7787
7787
|
{
|
|
7788
|
-
className: `flex-1 py-2 px-4 text-center ${y.tab} font-medium border-b-2 transition-colors duration-200 ${g ===
|
|
7789
|
-
onClick: () => v(
|
|
7790
|
-
children:
|
|
7788
|
+
className: `flex-1 py-2 px-4 text-center ${y.tab} font-medium border-b-2 transition-colors duration-200 ${g === $.id ? "border-blue-500 text-blue-600 dark:text-blue-400" : "border-transparent text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100"}`,
|
|
7789
|
+
onClick: () => v($.id),
|
|
7790
|
+
children: $.name.split(" ")[0]
|
|
7791
7791
|
},
|
|
7792
|
-
|
|
7792
|
+
$.id
|
|
7793
7793
|
)) }),
|
|
7794
7794
|
/* @__PURE__ */ e("div", { className: "space-y-4 mb-6", children: y.showAllLeave ? (
|
|
7795
7795
|
// LG: Show all leave types
|
|
7796
|
-
We.map((
|
|
7796
|
+
We.map(($) => /* @__PURE__ */ e(Ut, { leave: $, sizeMeta: y }, $.id))
|
|
7797
7797
|
) : y.showSingleLeave ? (
|
|
7798
7798
|
// MD: Show active tab leave type
|
|
7799
7799
|
/* @__PURE__ */ e(Ut, { leave: z, sizeMeta: y })
|
|
@@ -7812,7 +7812,7 @@ function el({
|
|
|
7812
7812
|
}
|
|
7813
7813
|
);
|
|
7814
7814
|
}
|
|
7815
|
-
|
|
7815
|
+
Ks.propTypes = {
|
|
7816
7816
|
size: d.string,
|
|
7817
7817
|
showCheckbox: d.bool,
|
|
7818
7818
|
checkboxPosition: d.oneOf(["top-left", "top-right"]),
|
|
@@ -7821,7 +7821,7 @@ el.propTypes = {
|
|
|
7821
7821
|
title: d.string,
|
|
7822
7822
|
term: d.string
|
|
7823
7823
|
};
|
|
7824
|
-
const
|
|
7824
|
+
const el = [
|
|
7825
7825
|
{
|
|
7826
7826
|
id: "admin-files",
|
|
7827
7827
|
name: "Admin Files",
|
|
@@ -7854,7 +7854,7 @@ const tl = [
|
|
|
7854
7854
|
// icon: Video,
|
|
7855
7855
|
// color: "text-purple-500"
|
|
7856
7856
|
// }
|
|
7857
|
-
],
|
|
7857
|
+
], tl = [
|
|
7858
7858
|
{
|
|
7859
7859
|
id: "file-1",
|
|
7860
7860
|
name: "2024 - Taurus",
|
|
@@ -7887,7 +7887,7 @@ const tl = [
|
|
|
7887
7887
|
icon: dt,
|
|
7888
7888
|
color: "text-orange-500"
|
|
7889
7889
|
}
|
|
7890
|
-
],
|
|
7890
|
+
], al = {
|
|
7891
7891
|
sm: {
|
|
7892
7892
|
wrap: "max-w-xs w-full",
|
|
7893
7893
|
title: "text-base font-semibold",
|
|
@@ -7927,7 +7927,7 @@ function Gt({ item: t, sizeMeta: a, showDate: s = !1 }) {
|
|
|
7927
7927
|
/* @__PURE__ */ e(xe, { className: "h-4 w-4 text-zinc-400 group-hover:text-zinc-600 dark:group-hover:text-zinc-300 transition-colors duration-200" })
|
|
7928
7928
|
] });
|
|
7929
7929
|
}
|
|
7930
|
-
function
|
|
7930
|
+
function rl({
|
|
7931
7931
|
size: t = "md",
|
|
7932
7932
|
showCheckbox: a = !1,
|
|
7933
7933
|
checkboxPosition: s = "top-left",
|
|
@@ -7937,7 +7937,7 @@ function nl({
|
|
|
7937
7937
|
subtitle: o = "Drive Shared",
|
|
7938
7938
|
...p
|
|
7939
7939
|
}) {
|
|
7940
|
-
const [g, v] = P(!1), x = de(t), r = me[x], N =
|
|
7940
|
+
const [g, v] = P(!1), x = de(t), r = me[x], N = al[x];
|
|
7941
7941
|
return /* @__PURE__ */ n(
|
|
7942
7942
|
oe,
|
|
7943
7943
|
{
|
|
@@ -7969,13 +7969,13 @@ function nl({
|
|
|
7969
7969
|
"Download All"
|
|
7970
7970
|
] }),
|
|
7971
7971
|
/* @__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: [
|
|
7972
|
-
/* @__PURE__ */ e(
|
|
7972
|
+
/* @__PURE__ */ e(Sr, { className: "h-4 w-4" }),
|
|
7973
7973
|
"Share Drive"
|
|
7974
7974
|
] })
|
|
7975
7975
|
] })
|
|
7976
7976
|
] })
|
|
7977
7977
|
] }),
|
|
7978
|
-
/* @__PURE__ */ e("div", { className: `grid ${N.gridCols} gap-3 `, children:
|
|
7978
|
+
/* @__PURE__ */ e("div", { className: `grid ${N.gridCols} gap-3 `, children: el.map((m) => /* @__PURE__ */ e(
|
|
7979
7979
|
Gt,
|
|
7980
7980
|
{
|
|
7981
7981
|
item: m,
|
|
@@ -7985,7 +7985,7 @@ function nl({
|
|
|
7985
7985
|
)) }),
|
|
7986
7986
|
N.showRecent && /* @__PURE__ */ n("div", { className: "", children: [
|
|
7987
7987
|
/* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${N.item}`, children: "Recent Files" }),
|
|
7988
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children:
|
|
7988
|
+
/* @__PURE__ */ e("div", { className: "space-y-2", children: tl.map((m) => /* @__PURE__ */ e(
|
|
7989
7989
|
Gt,
|
|
7990
7990
|
{
|
|
7991
7991
|
item: m,
|
|
@@ -8003,7 +8003,7 @@ function nl({
|
|
|
8003
8003
|
}
|
|
8004
8004
|
);
|
|
8005
8005
|
}
|
|
8006
|
-
|
|
8006
|
+
rl.propTypes = {
|
|
8007
8007
|
size: d.string,
|
|
8008
8008
|
showCheckbox: d.bool,
|
|
8009
8009
|
checkboxPosition: d.oneOf(["top-left", "top-right"]),
|
|
@@ -8012,7 +8012,7 @@ nl.propTypes = {
|
|
|
8012
8012
|
title: d.string,
|
|
8013
8013
|
subtitle: d.string
|
|
8014
8014
|
};
|
|
8015
|
-
const
|
|
8015
|
+
const nl = [
|
|
8016
8016
|
{
|
|
8017
8017
|
id: "alert-1",
|
|
8018
8018
|
type: "warning",
|
|
@@ -8049,7 +8049,7 @@ const sl = [
|
|
|
8049
8049
|
// read: true,
|
|
8050
8050
|
// priority: "medium"
|
|
8051
8051
|
// }
|
|
8052
|
-
],
|
|
8052
|
+
], sl = {
|
|
8053
8053
|
sm: {
|
|
8054
8054
|
wrap: "max-w-sm w-full",
|
|
8055
8055
|
title: "text-sm font-semibold",
|
|
@@ -8085,7 +8085,7 @@ const sl = [
|
|
|
8085
8085
|
if (!a || a === 0) return t;
|
|
8086
8086
|
const s = t.split(" ");
|
|
8087
8087
|
return s.length <= a ? t : s.slice(0, a).join(" ") + "...";
|
|
8088
|
-
},
|
|
8088
|
+
}, ll = (t) => {
|
|
8089
8089
|
switch (t) {
|
|
8090
8090
|
case "warning":
|
|
8091
8091
|
return Jt;
|
|
@@ -8128,8 +8128,8 @@ const sl = [
|
|
|
8128
8128
|
};
|
|
8129
8129
|
}
|
|
8130
8130
|
};
|
|
8131
|
-
function
|
|
8132
|
-
const [l, h] = P(!1), o = va(t.type), p =
|
|
8131
|
+
function il({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
|
|
8132
|
+
const [l, h] = P(!1), o = va(t.type), p = ll(t.type);
|
|
8133
8133
|
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: [
|
|
8134
8134
|
/* @__PURE__ */ e(
|
|
8135
8135
|
"button",
|
|
@@ -8152,7 +8152,7 @@ function ol({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
|
|
|
8152
8152
|
!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" })
|
|
8153
8153
|
] });
|
|
8154
8154
|
}
|
|
8155
|
-
function
|
|
8155
|
+
function ol({ alert: t, onDismiss: a }) {
|
|
8156
8156
|
const [s, i] = P(!1), l = va("banner"), h = () => {
|
|
8157
8157
|
i(!0), a?.(t);
|
|
8158
8158
|
};
|
|
@@ -8172,20 +8172,20 @@ function cl({ alert: t, onDismiss: a }) {
|
|
|
8172
8172
|
)
|
|
8173
8173
|
] }) });
|
|
8174
8174
|
}
|
|
8175
|
-
function
|
|
8175
|
+
function cl({
|
|
8176
8176
|
size: t = "md",
|
|
8177
8177
|
showCheckbox: a = !1,
|
|
8178
8178
|
checkboxPosition: s = "top-left",
|
|
8179
8179
|
onSelect: i,
|
|
8180
8180
|
identity: l = "_id",
|
|
8181
8181
|
title: h = "Alerts",
|
|
8182
|
-
alerts: o =
|
|
8182
|
+
alerts: o = nl,
|
|
8183
8183
|
showBanner: p = !0,
|
|
8184
8184
|
...g
|
|
8185
8185
|
}) {
|
|
8186
|
-
const [v, x] = P(o), r = de(t), N = me[r], m =
|
|
8187
|
-
x((E) => E.filter((L) => L.id !==
|
|
8188
|
-
}, z = v.find((
|
|
8186
|
+
const [v, x] = P(o), r = de(t), N = me[r], m = sl[r], y = (D) => {
|
|
8187
|
+
x((E) => E.filter((L) => L.id !== D.id));
|
|
8188
|
+
}, z = v.find((D) => D.type === "banner"), $ = v.filter((D) => D.type !== "banner");
|
|
8189
8189
|
return /* @__PURE__ */ n(
|
|
8190
8190
|
oe,
|
|
8191
8191
|
{
|
|
@@ -8199,27 +8199,27 @@ function dl({
|
|
|
8199
8199
|
children: [
|
|
8200
8200
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${N.title}`, children: h }) }),
|
|
8201
8201
|
p && z && t !== "sm" && /* @__PURE__ */ e(
|
|
8202
|
-
|
|
8202
|
+
ol,
|
|
8203
8203
|
{
|
|
8204
8204
|
alert: z,
|
|
8205
8205
|
onDismiss: y
|
|
8206
8206
|
}
|
|
8207
8207
|
),
|
|
8208
|
-
/* @__PURE__ */ e("div", { className: "space-y-0.5", children:
|
|
8209
|
-
|
|
8208
|
+
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: $.slice(0, 3).map((D) => /* @__PURE__ */ e(
|
|
8209
|
+
il,
|
|
8210
8210
|
{
|
|
8211
|
-
alert:
|
|
8211
|
+
alert: D,
|
|
8212
8212
|
sizeMeta: m,
|
|
8213
8213
|
onDismiss: y
|
|
8214
8214
|
},
|
|
8215
|
-
|
|
8215
|
+
D.id
|
|
8216
8216
|
)) }),
|
|
8217
8217
|
/* @__PURE__ */ e("button", { className: "w-full py-3 px-4 border border-zinc-300 dark:border-zinc-600 text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 font-medium rounded-lg transition-colors duration-200", children: "View All" })
|
|
8218
8218
|
]
|
|
8219
8219
|
}
|
|
8220
8220
|
);
|
|
8221
8221
|
}
|
|
8222
|
-
|
|
8222
|
+
cl.propTypes = {
|
|
8223
8223
|
size: d.string,
|
|
8224
8224
|
showCheckbox: d.bool,
|
|
8225
8225
|
checkboxPosition: d.oneOf(["top-left", "top-right"]),
|
|
@@ -8239,7 +8239,7 @@ dl.propTypes = {
|
|
|
8239
8239
|
),
|
|
8240
8240
|
showBanner: d.bool
|
|
8241
8241
|
};
|
|
8242
|
-
const
|
|
8242
|
+
const dl = [
|
|
8243
8243
|
{
|
|
8244
8244
|
id: "video-1",
|
|
8245
8245
|
title: "ALMA MATER",
|
|
@@ -8284,7 +8284,7 @@ const ml = [
|
|
|
8284
8284
|
// duration: "2:10",
|
|
8285
8285
|
// category: "Campus Life"
|
|
8286
8286
|
// }
|
|
8287
|
-
],
|
|
8287
|
+
], ml = {
|
|
8288
8288
|
sm: {
|
|
8289
8289
|
wrap: "max-w-sm w-full",
|
|
8290
8290
|
title: "text-sm font-bold",
|
|
@@ -8316,7 +8316,7 @@ const ml = [
|
|
|
8316
8316
|
maxTitleLines: 3
|
|
8317
8317
|
}
|
|
8318
8318
|
};
|
|
8319
|
-
function
|
|
8319
|
+
function ul({ video: t, sizeMeta: a }) {
|
|
8320
8320
|
const [s, i] = P(!1);
|
|
8321
8321
|
return /* @__PURE__ */ n("div", { className: "group cursor-pointer", children: [
|
|
8322
8322
|
/* @__PURE__ */ n("div", { className: `relative ${a.thumbnailHeight} rounded-lg overflow-hidden bg-zinc-200 dark:bg-zinc-800`, children: [
|
|
@@ -8328,7 +8328,7 @@ function hl({ video: t, sizeMeta: a }) {
|
|
|
8328
8328
|
className: "w-full h-full object-cover transition-transform duration-300 group-hover:scale-105"
|
|
8329
8329
|
}
|
|
8330
8330
|
),
|
|
8331
|
-
/* @__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(
|
|
8331
|
+
/* @__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(Dr, { className: "h-5 w-5 text-zinc-900 ml-1" }) }) }),
|
|
8332
8332
|
/* @__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 }),
|
|
8333
8333
|
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: [
|
|
8334
8334
|
/* @__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" }),
|
|
@@ -8349,17 +8349,17 @@ function hl({ video: t, sizeMeta: a }) {
|
|
|
8349
8349
|
] })
|
|
8350
8350
|
] });
|
|
8351
8351
|
}
|
|
8352
|
-
function
|
|
8352
|
+
function hl({
|
|
8353
8353
|
size: t = "md",
|
|
8354
8354
|
showCheckbox: a = !1,
|
|
8355
8355
|
checkboxPosition: s = "top-left",
|
|
8356
8356
|
onSelect: i,
|
|
8357
8357
|
identity: l = "_id",
|
|
8358
8358
|
title: h = "Videos",
|
|
8359
|
-
videos: o =
|
|
8359
|
+
videos: o = dl,
|
|
8360
8360
|
...p
|
|
8361
8361
|
}) {
|
|
8362
|
-
const [g, v] = P(!1), x = de(t), r = me[x], N =
|
|
8362
|
+
const [g, v] = P(!1), x = de(t), r = me[x], N = ml[x];
|
|
8363
8363
|
return /* @__PURE__ */ n(
|
|
8364
8364
|
oe,
|
|
8365
8365
|
{
|
|
@@ -8394,7 +8394,7 @@ function pl({
|
|
|
8394
8394
|
] })
|
|
8395
8395
|
] }),
|
|
8396
8396
|
/* @__PURE__ */ e("div", { className: `grid ${N.gridCols} gap-4 `, children: o.slice(0, N.gridCols === "grid-cols-3" ? 6 : 4).map((m) => /* @__PURE__ */ e(
|
|
8397
|
-
|
|
8397
|
+
ul,
|
|
8398
8398
|
{
|
|
8399
8399
|
video: m,
|
|
8400
8400
|
sizeMeta: N
|
|
@@ -8409,7 +8409,7 @@ function pl({
|
|
|
8409
8409
|
}
|
|
8410
8410
|
);
|
|
8411
8411
|
}
|
|
8412
|
-
|
|
8412
|
+
hl.propTypes = {
|
|
8413
8413
|
size: d.string,
|
|
8414
8414
|
showCheckbox: d.bool,
|
|
8415
8415
|
checkboxPosition: d.oneOf(["top-left", "top-right"]),
|
|
@@ -8428,82 +8428,82 @@ pl.propTypes = {
|
|
|
8428
8428
|
)
|
|
8429
8429
|
};
|
|
8430
8430
|
export {
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8431
|
+
Hs as AccountSummaryMock,
|
|
8432
|
+
Ns as ActivityMock,
|
|
8433
|
+
ts as AddUserGroupsRolesModal,
|
|
8434
|
+
cl as AlertsMock,
|
|
8435
8435
|
we as Avatar,
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8436
|
+
yn as AvatarGroup,
|
|
8437
|
+
zl as Badge,
|
|
8438
|
+
wn as Breadcrumbs,
|
|
8439
|
+
xn as Button,
|
|
8440
|
+
Is as CampusMapMock,
|
|
8441
8441
|
mt as Checkbox,
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8442
|
+
Ss as CommunitiesMock,
|
|
8443
|
+
Jl as CustomDataGrid,
|
|
8444
|
+
jl as CustomDialog,
|
|
8445
|
+
Wl as CustomGridToolbar,
|
|
8446
|
+
Ul as CustomTab,
|
|
8447
8447
|
sa as DatePicker,
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8448
|
+
Sn as DateRangePicker,
|
|
8449
|
+
Js as DirectoryMock,
|
|
8450
|
+
rl as DriveMock,
|
|
8451
|
+
ys as DynamicConfig,
|
|
8452
|
+
Bs as EventsMock,
|
|
8453
|
+
Sl as FileUploadModal,
|
|
8454
|
+
ql as FullConfigPage,
|
|
8455
|
+
Al as FullScreenLoader,
|
|
8456
|
+
Dl as GenericFilter,
|
|
8457
8457
|
Ce as IconButton,
|
|
8458
8458
|
X as Input,
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8459
|
+
Ks as LeaveBalanceMock,
|
|
8460
|
+
xs as ManageCollectionList,
|
|
8461
|
+
Fn as Modal,
|
|
8462
8462
|
at as MultiSelect,
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8463
|
+
Ts as NewsMock,
|
|
8464
|
+
Us as O365MailsMock,
|
|
8465
|
+
Pn as OptionsMenu,
|
|
8466
|
+
Mn as PageHeader,
|
|
8467
|
+
Rl as PageLayout,
|
|
8468
|
+
$l as Pagination,
|
|
8469
8469
|
la as RadioGroup,
|
|
8470
8470
|
fe as SearchBar,
|
|
8471
8471
|
pt as Select,
|
|
8472
8472
|
oe as SelectableCard,
|
|
8473
|
-
|
|
8473
|
+
Tl as Sidebar,
|
|
8474
8474
|
oa as Spinner,
|
|
8475
8475
|
ca as Textarea,
|
|
8476
|
-
|
|
8476
|
+
Yl as ToastProvider,
|
|
8477
8477
|
da as ToggleSwitch,
|
|
8478
|
-
|
|
8479
|
-
|
|
8478
|
+
Fl as Tooltip,
|
|
8479
|
+
_l as TreeView,
|
|
8480
8480
|
se as UnifyedCoreButton,
|
|
8481
|
-
|
|
8482
|
-
|
|
8481
|
+
hl as VideosMock,
|
|
8482
|
+
El as WizardModal,
|
|
8483
8483
|
pa as adGroupsListSearchApi,
|
|
8484
|
-
|
|
8484
|
+
Pl as axiosDelete,
|
|
8485
8485
|
Ze as axiosGet,
|
|
8486
|
-
|
|
8486
|
+
Bl as axiosPatch,
|
|
8487
8487
|
bt as axiosPost,
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
|
|
8488
|
+
Ll as axiosPut,
|
|
8489
|
+
Ol as cookies,
|
|
8490
|
+
Yn as createHttpClient,
|
|
8491
|
+
_n as directoryPermissionsApi,
|
|
8492
|
+
Un as filePermissionsApi,
|
|
8493
|
+
jn as gateWayUrl,
|
|
8494
8494
|
$e as gatewayBase,
|
|
8495
8495
|
vt as getBaseUrl,
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8496
|
+
Ml as getSnapshot,
|
|
8497
|
+
Vl as http,
|
|
8498
|
+
Vn as localStore,
|
|
8499
8499
|
Nt as myDriveGatewayBaseV2,
|
|
8500
8500
|
de as normalizeSize,
|
|
8501
8501
|
Ye as notify,
|
|
8502
8502
|
ga as provisioningBase,
|
|
8503
8503
|
ba as rbacBase,
|
|
8504
8504
|
fa as searchRolesApi,
|
|
8505
|
-
|
|
8505
|
+
Il as sessionStore,
|
|
8506
8506
|
me as sizeClasses,
|
|
8507
|
-
|
|
8507
|
+
Gl as toBrowserLocalTime,
|
|
8508
8508
|
ha as userSearchBase
|
|
8509
8509
|
};
|