unifyedx-storybook-new 0.2.39 → 0.2.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e, Fragment as te } from "react/jsx-runtime";
|
|
2
2
|
import se, { useState as L, useMemo as me, useId as Xe, Fragment as Q, useEffect as Z, useCallback as ae, useRef as ge } from "react";
|
|
3
|
-
import { a as H, U as dt, X as ye, P as c, L as ja, C as fe, b as Ke, D as mt, f as Ct, d as qt, F as Va, e as _a, h as Ua, T as He, u as Ga, I as Yt, i as Wt, j as qa, k as Ya, l as Wa, m as Jt, S as xt, n as Xt, M as Ja, o as Xa, p as vt, q as Ha, A as Qa, E as Ht, r as Za, s as Ka, t as er, v as tr, w as Qt, x as ar, y as Zt, z as Kt, B as rr, G as nr, H as sr, J as Qe, K as ut, N as ht, O as lr, Q as
|
|
3
|
+
import { a as H, U as dt, X as ye, P as c, L as ja, C as fe, b as Ke, D as mt, f as Ct, d as qt, F as Va, e as _a, h as Ua, T as He, u as Ga, I as Yt, i as Wt, j as qa, k as Ya, l as Wa, m as Jt, S as xt, n as Xt, M as Ja, o as Xa, p as vt, q as Ha, A as Qa, E as Ht, r as Za, s as Ka, t as er, v as tr, w as Qt, x as ar, y as Zt, z as Kt, B as rr, G as nr, H as sr, J as Qe, K as ut, N as ht, O as lr, Q as or, R as ea, V as ir, W as Nt, Y as cr, Z as dr, _ as Le, $ as mr, a0 as ur, a1 as hr, a2 as pr, a3 as gr, a4 as br, a5 as zt, a6 as fr, a7 as yr, a8 as xr, a9 as vr, aa as Nr, ab as wr, ac as kr, ad as Cr, ae as zr, af as Ae, ag as ta, ah as Sr, ai as Dr, aj as $r, ak as Tr, al as Ar, am as aa, an as Fr, ao as Er, ap as ra, aq as Rr, ar as pt, as as na, at as Or } from "./vendor-DoYRzmYd.js";
|
|
4
4
|
import { Popover as Pr, PopoverButton as Ir, PopoverPanel as Mr, Transition as ue, Dialog as be, TransitionChild as Ne, DialogPanel as Fe, DialogTitle as et, TabGroup as Lr, TabList as Br, Tab as ne, TabPanels as jr, RadioGroup as Ue, Listbox as K, ListboxButton as Vr, ListboxOptions as _r, ListboxOption as Ur, SwitchGroup as Gr, Switch as lt, Menu as qr, MenuButton as Yr, Portal as Wr, MenuItems as Jr, MenuItem as Xr, DialogBackdrop as Hr } from "@headlessui/react";
|
|
5
5
|
import { motion as le, AnimatePresence as ke } from "framer-motion";
|
|
6
6
|
import { d as Qr } from "./vendor-lodash-DUMS_goM.js";
|
|
7
|
-
import { useFloating as sa, offset as la, flip as
|
|
8
|
-
import
|
|
7
|
+
import { useFloating as sa, offset as la, flip as oa, shift as ia, autoUpdate as ca, useClick as Zr, useDismiss as Kr, useInteractions as en, FloatingPortal as tn } from "@floating-ui/react";
|
|
8
|
+
import ot, { debounce as an } from "lodash";
|
|
9
9
|
import { toast as Se, ToastContainer as rn, Slide as nn } from "react-toastify";
|
|
10
10
|
import "react-toastify/dist/ReactToastify.css";
|
|
11
11
|
import { P as sn, S as ln, F as on, G as cn, a as dn, E as mn, b as un, C as hn, R as pn, c as gn, d as bn, e as fn, f as yn, I as xn, g as St } from "./vendor-syncfusion-v-M3ddHK.js";
|
|
@@ -15,29 +15,29 @@ const vn = (t) => {
|
|
|
15
15
|
a ^= t.charCodeAt(s), a += (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24);
|
|
16
16
|
return a >>> 0;
|
|
17
17
|
}, Nn = (t) => {
|
|
18
|
-
const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0,
|
|
18
|
+
const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, o = vn(a), l = (o % 360 + 37 * s) % 360, m = 55 + (o >>> 8) % 20, i = 30 + (o >>> 16) % 10, u = 86 + (o >>> 24) % 8, g = `hsl(${l}, ${m}%, ${u}%)`, f = `hsl(${l}, ${m}%, ${i}%)`;
|
|
19
19
|
return { bg: g, text: f };
|
|
20
20
|
}, wn = (t = "") => t.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase(), Ce = ({
|
|
21
21
|
src: t,
|
|
22
22
|
name: a,
|
|
23
23
|
size: s = "medium",
|
|
24
24
|
// 'small', 'medium', 'large', 'xlarge'
|
|
25
|
-
bgColor:
|
|
25
|
+
bgColor: o,
|
|
26
26
|
// ✅ New prop for background color
|
|
27
27
|
textColor: l,
|
|
28
28
|
// ✅ New prop for text/icon color
|
|
29
29
|
className: m,
|
|
30
|
-
...
|
|
30
|
+
...i
|
|
31
31
|
}) => {
|
|
32
32
|
const [u, g] = L(!1), f = me(() => Nn(a), []), x = t && !u, r = !x && a, N = !x && !a, d = H(
|
|
33
33
|
"avatar-container",
|
|
34
34
|
`avatar--size-${s}`,
|
|
35
35
|
m
|
|
36
|
-
), p = x ? "transparent" :
|
|
36
|
+
), p = x ? "transparent" : o || f.bg, $ = l || f.text;
|
|
37
37
|
return /* @__PURE__ */ n("div", { className: d, style: {
|
|
38
38
|
backgroundColor: p,
|
|
39
39
|
color: $
|
|
40
|
-
}, ...
|
|
40
|
+
}, ...i, children: [
|
|
41
41
|
x && /* @__PURE__ */ e(
|
|
42
42
|
"img",
|
|
43
43
|
{
|
|
@@ -50,13 +50,13 @@ const vn = (t) => {
|
|
|
50
50
|
r && /* @__PURE__ */ e("span", { className: "avatar-initials", "aria-label": a, children: wn(a) }),
|
|
51
51
|
N && /* @__PURE__ */ e("span", { className: "avatar-icon", children: /* @__PURE__ */ e(dt, {}) })
|
|
52
52
|
] });
|
|
53
|
-
}, kn = ({ children: t, max: a = 4, truncatedMessage: s = "Members", ...
|
|
54
|
-
const l = se.Children.toArray(t), m = l.slice(0, a),
|
|
55
|
-
return /* @__PURE__ */ n("div", { className: "avatar-group-container", ...
|
|
53
|
+
}, kn = ({ children: t, max: a = 4, truncatedMessage: s = "Members", ...o }) => {
|
|
54
|
+
const l = se.Children.toArray(t), m = l.slice(0, a), i = l.length - a;
|
|
55
|
+
return /* @__PURE__ */ n("div", { className: "avatar-group-container", ...o, children: [
|
|
56
56
|
m,
|
|
57
|
-
|
|
57
|
+
i > 0 && /* @__PURE__ */ n("div", { className: "avatar-container avatar--size-medium avatar-excess", children: [
|
|
58
58
|
"+",
|
|
59
|
-
|
|
59
|
+
i,
|
|
60
60
|
" ",
|
|
61
61
|
s
|
|
62
62
|
] })
|
|
@@ -67,10 +67,10 @@ const vn = (t) => {
|
|
|
67
67
|
// 'default', 'primary', 'success', 'warning', 'danger'
|
|
68
68
|
size: s = "medium",
|
|
69
69
|
// 'small', 'medium', 'large'
|
|
70
|
-
icon:
|
|
70
|
+
icon: o,
|
|
71
71
|
onRemove: l,
|
|
72
72
|
bgColor: m,
|
|
73
|
-
textColor:
|
|
73
|
+
textColor: i,
|
|
74
74
|
className: u,
|
|
75
75
|
...g
|
|
76
76
|
}) => {
|
|
@@ -81,12 +81,12 @@ const vn = (t) => {
|
|
|
81
81
|
{ "badge--with-remove": !!l },
|
|
82
82
|
u
|
|
83
83
|
);
|
|
84
|
-
return /* @__PURE__ */ n("span", { className: f, style: m &&
|
|
84
|
+
return /* @__PURE__ */ n("span", { className: f, style: m && i ? {
|
|
85
85
|
backgroundColor: m,
|
|
86
|
-
color:
|
|
86
|
+
color: i,
|
|
87
87
|
borderColor: "#ff0000"
|
|
88
88
|
} : {}, ...g, children: [
|
|
89
|
-
|
|
89
|
+
o && /* @__PURE__ */ e(o, { className: "badge-icon" }),
|
|
90
90
|
/* @__PURE__ */ e("span", { className: "badge-label", children: t }),
|
|
91
91
|
l && /* @__PURE__ */ e(
|
|
92
92
|
"button",
|
|
@@ -103,7 +103,7 @@ const vn = (t) => {
|
|
|
103
103
|
primary: t = !1,
|
|
104
104
|
backgroundColor: a = null,
|
|
105
105
|
size: s = "medium",
|
|
106
|
-
label:
|
|
106
|
+
label: o,
|
|
107
107
|
...l
|
|
108
108
|
}) => {
|
|
109
109
|
const m = t ? "storybook-button--primary" : "storybook-button--secondary";
|
|
@@ -114,7 +114,7 @@ const vn = (t) => {
|
|
|
114
114
|
className: ["storybook-button", `storybook-button--${s}`, m].join(" "),
|
|
115
115
|
style: a && { backgroundColor: a },
|
|
116
116
|
...l,
|
|
117
|
-
children:
|
|
117
|
+
children: o
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
120
|
};
|
|
@@ -141,11 +141,11 @@ const zn = {
|
|
|
141
141
|
dataTestId: t,
|
|
142
142
|
title: a,
|
|
143
143
|
type: s = "button",
|
|
144
|
-
ariaLabel:
|
|
144
|
+
ariaLabel: o,
|
|
145
145
|
className: l = "",
|
|
146
146
|
// ✅ Default is now empty
|
|
147
147
|
loader: m = !1,
|
|
148
|
-
category:
|
|
148
|
+
category: i = "primary",
|
|
149
149
|
icon: u,
|
|
150
150
|
// Renamed for clarity, expecting a component type e.g., CheckCircle
|
|
151
151
|
disabled: g = !1,
|
|
@@ -159,7 +159,7 @@ const zn = {
|
|
|
159
159
|
const p = g || m, $ = u && !x, A = H(
|
|
160
160
|
"btn-base",
|
|
161
161
|
zn[f],
|
|
162
|
-
Sn[
|
|
162
|
+
Sn[i],
|
|
163
163
|
{
|
|
164
164
|
"is-loading": m,
|
|
165
165
|
"btn-icon-only": $
|
|
@@ -174,8 +174,8 @@ const zn = {
|
|
|
174
174
|
className: A,
|
|
175
175
|
disabled: p,
|
|
176
176
|
onClick: N,
|
|
177
|
-
title: a || $ &&
|
|
178
|
-
"aria-label":
|
|
177
|
+
title: a || $ && o || (typeof x == "string" ? x : void 0),
|
|
178
|
+
"aria-label": o || $ && a || (typeof x == "string" ? x : void 0),
|
|
179
179
|
...d,
|
|
180
180
|
children: m ? /* @__PURE__ */ e(ja, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(te, { children: [
|
|
181
181
|
u && /* @__PURE__ */ e(u, { size: f === "large" ? 20 : 16 }),
|
|
@@ -185,8 +185,8 @@ const zn = {
|
|
|
185
185
|
] })
|
|
186
186
|
}
|
|
187
187
|
);
|
|
188
|
-
}, Dn = ({ crumbs: t = [], ...a }) => /* @__PURE__ */ e("nav", { "aria-label": "Breadcrumb", className: "breadcrumbs-nav", ...a, children: /* @__PURE__ */ e("ol", { className: "breadcrumbs-list", children: t.map((s,
|
|
189
|
-
const l =
|
|
188
|
+
}, Dn = ({ crumbs: t = [], ...a }) => /* @__PURE__ */ e("nav", { "aria-label": "Breadcrumb", className: "breadcrumbs-nav", ...a, children: /* @__PURE__ */ e("ol", { className: "breadcrumbs-list", children: t.map((s, o) => {
|
|
189
|
+
const l = o === t.length - 1;
|
|
190
190
|
return /* @__PURE__ */ n("li", { className: "breadcrumb-item", children: [
|
|
191
191
|
/* @__PURE__ */ n(
|
|
192
192
|
"a",
|
|
@@ -207,19 +207,19 @@ const zn = {
|
|
|
207
207
|
"aria-hidden": "true"
|
|
208
208
|
}
|
|
209
209
|
)
|
|
210
|
-
] },
|
|
210
|
+
] }, o);
|
|
211
211
|
}) }) }), da = ({
|
|
212
212
|
label: t,
|
|
213
213
|
id: a,
|
|
214
214
|
error: s,
|
|
215
|
-
className:
|
|
215
|
+
className: o,
|
|
216
216
|
ref: l,
|
|
217
217
|
checked: m,
|
|
218
|
-
onChange:
|
|
218
|
+
onChange: i,
|
|
219
219
|
...u
|
|
220
220
|
}) => {
|
|
221
221
|
const g = Xe(), f = a || g;
|
|
222
|
-
return /* @__PURE__ */ n("div", { className: `checkbox-container ${
|
|
222
|
+
return /* @__PURE__ */ n("div", { className: `checkbox-container ${o || ""}`, children: [
|
|
223
223
|
/* @__PURE__ */ n("label", { htmlFor: f, className: "checkbox-wrapper", children: [
|
|
224
224
|
/* @__PURE__ */ e(
|
|
225
225
|
"input",
|
|
@@ -229,7 +229,7 @@ const zn = {
|
|
|
229
229
|
ref: l,
|
|
230
230
|
className: "checkbox-input",
|
|
231
231
|
checked: m,
|
|
232
|
-
onChange:
|
|
232
|
+
onChange: i,
|
|
233
233
|
...u
|
|
234
234
|
}
|
|
235
235
|
),
|
|
@@ -252,10 +252,10 @@ const zn = {
|
|
|
252
252
|
value: t,
|
|
253
253
|
onChange: a,
|
|
254
254
|
onClear: s,
|
|
255
|
-
placeholder:
|
|
255
|
+
placeholder: o = "Select a date",
|
|
256
256
|
label: l,
|
|
257
257
|
error: m,
|
|
258
|
-
disabled:
|
|
258
|
+
disabled: i = !1,
|
|
259
259
|
className: u,
|
|
260
260
|
...g
|
|
261
261
|
}) => /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
|
|
@@ -280,10 +280,10 @@ const zn = {
|
|
|
280
280
|
value: t,
|
|
281
281
|
onChange: a,
|
|
282
282
|
onClear: s,
|
|
283
|
-
placeholder:
|
|
283
|
+
placeholder: o = "Select a date range",
|
|
284
284
|
label: l,
|
|
285
285
|
error: m,
|
|
286
|
-
disabled:
|
|
286
|
+
disabled: i = !1,
|
|
287
287
|
className: u,
|
|
288
288
|
...g
|
|
289
289
|
}) => {
|
|
@@ -293,7 +293,7 @@ const zn = {
|
|
|
293
293
|
Ct(f, "MMM d, y"),
|
|
294
294
|
" - ",
|
|
295
295
|
Ct(x, "MMM d, y")
|
|
296
|
-
] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children:
|
|
296
|
+
] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: o });
|
|
297
297
|
return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
|
|
298
298
|
l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "daterangepicker-input", children: l }),
|
|
299
299
|
/* @__PURE__ */ n($n, { children: [
|
|
@@ -305,17 +305,17 @@ const zn = {
|
|
|
305
305
|
type: "button",
|
|
306
306
|
className: H("datepicker-trigger", {
|
|
307
307
|
"datepicker-trigger--error": !!m,
|
|
308
|
-
"datepicker-trigger--disabled":
|
|
308
|
+
"datepicker-trigger--disabled": i
|
|
309
309
|
}),
|
|
310
|
-
disabled:
|
|
311
|
-
"aria-label": f && x ? `Selected range is ${N}` :
|
|
310
|
+
disabled: i,
|
|
311
|
+
"aria-label": f && x ? `Selected range is ${N}` : o,
|
|
312
312
|
children: [
|
|
313
313
|
/* @__PURE__ */ e(qt, { className: "datepicker-icon" }),
|
|
314
314
|
/* @__PURE__ */ e("span", { className: "datepicker-value", children: N })
|
|
315
315
|
]
|
|
316
316
|
}
|
|
317
317
|
),
|
|
318
|
-
f && s && !
|
|
318
|
+
f && s && !i && /* @__PURE__ */ e(
|
|
319
319
|
"button",
|
|
320
320
|
{
|
|
321
321
|
type: "button",
|
|
@@ -559,12 +559,12 @@ const zn = {
|
|
|
559
559
|
View: "view",
|
|
560
560
|
Manage: "edit"
|
|
561
561
|
}, $t = ({ extension: t, size: a = 36 }) => {
|
|
562
|
-
const s = (t || "").toLowerCase(),
|
|
563
|
-
return
|
|
562
|
+
const s = (t || "").toLowerCase(), o = En[s];
|
|
563
|
+
return o ? /* @__PURE__ */ e("div", { style: { width: a }, className: "flex-shrink-0", children: /* @__PURE__ */ e(
|
|
564
564
|
Va,
|
|
565
565
|
{
|
|
566
566
|
extension: s,
|
|
567
|
-
...
|
|
567
|
+
...o,
|
|
568
568
|
radius: 2,
|
|
569
569
|
fold: !0,
|
|
570
570
|
foldColor: "#E5E7EB",
|
|
@@ -582,19 +582,19 @@ const zn = {
|
|
|
582
582
|
);
|
|
583
583
|
}, Rn = (t) => /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: t.width || 24, height: t.height || 24, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ e("path", { d: "M20 12H4M4 12L10 18M4 12L10 6", stroke: "#767676", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), Tt = (t, a = 2) => {
|
|
584
584
|
if (!+t) return "0 Bytes";
|
|
585
|
-
const s = 1024,
|
|
586
|
-
return `${parseFloat((t / Math.pow(s, m)).toFixed(
|
|
585
|
+
const s = 1024, o = a < 0 ? 0 : a, l = ["Bytes", "KB", "MB", "GB", "TB"], m = Math.floor(Math.log(t) / Math.log(s));
|
|
586
|
+
return `${parseFloat((t / Math.pow(s, m)).toFixed(o))} ${l[m]}`;
|
|
587
587
|
}, El = ({
|
|
588
588
|
// --- Modal Control ---
|
|
589
589
|
isOpen: t,
|
|
590
590
|
onClose: a,
|
|
591
591
|
// --- Dropzone Props ---
|
|
592
592
|
getRootProps: s,
|
|
593
|
-
getInputProps:
|
|
593
|
+
getInputProps: o,
|
|
594
594
|
isDragActive: l,
|
|
595
595
|
open: m,
|
|
596
596
|
// --- Form and File State ---
|
|
597
|
-
validFiles:
|
|
597
|
+
validFiles: i = [],
|
|
598
598
|
rejectedFiles: u = [],
|
|
599
599
|
handleRemoveValidFile: g,
|
|
600
600
|
handleRemoveRejectedFile: f,
|
|
@@ -605,7 +605,7 @@ const zn = {
|
|
|
605
605
|
title: d = "Upload Files",
|
|
606
606
|
subHeading: p = "Supports PNG, JPG, PDF. Max size: 50MB."
|
|
607
607
|
}) => {
|
|
608
|
-
const $ =
|
|
608
|
+
const $ = i.length > 0 || u.length > 0;
|
|
609
609
|
return /* @__PURE__ */ e(ue, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(
|
|
610
610
|
be,
|
|
611
611
|
{
|
|
@@ -643,7 +643,7 @@ const zn = {
|
|
|
643
643
|
className: "dialog-panel",
|
|
644
644
|
onClick: (A) => A.stopPropagation(),
|
|
645
645
|
children: [
|
|
646
|
-
/* @__PURE__ */ e("input", { ...
|
|
646
|
+
/* @__PURE__ */ e("input", { ...o() }),
|
|
647
647
|
/* @__PURE__ */ n("form", { onSubmit: x, className: "form-wrapper", children: [
|
|
648
648
|
/* @__PURE__ */ n("div", { className: "dialog-header", children: [
|
|
649
649
|
/* @__PURE__ */ e(et, { as: "h3", className: "dialog-title-text", children: d }),
|
|
@@ -684,7 +684,7 @@ const zn = {
|
|
|
684
684
|
$ && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
|
|
685
685
|
/* @__PURE__ */ e("h3", { children: "Upload Queue" }),
|
|
686
686
|
/* @__PURE__ */ n("ul", { className: "file-list", children: [
|
|
687
|
-
|
|
687
|
+
i.map((A, E) => /* @__PURE__ */ n(
|
|
688
688
|
"li",
|
|
689
689
|
{
|
|
690
690
|
className: "file-item",
|
|
@@ -764,7 +764,7 @@ const zn = {
|
|
|
764
764
|
type: "submit",
|
|
765
765
|
label: r ? "Uploading..." : "Upload Files",
|
|
766
766
|
loader: r,
|
|
767
|
-
disabled:
|
|
767
|
+
disabled: i.length === 0 || r
|
|
768
768
|
}
|
|
769
769
|
)
|
|
770
770
|
] })
|
|
@@ -787,8 +787,8 @@ const zn = {
|
|
|
787
787
|
const s = new Date(t);
|
|
788
788
|
return s.setDate(s.getDate() + a), s;
|
|
789
789
|
}, bt = (t) => {
|
|
790
|
-
const a = new Date(t), s = a.getDay(),
|
|
791
|
-
return Be(new Date(a.setDate(
|
|
790
|
+
const a = new Date(t), s = a.getDay(), o = a.getDate() - s;
|
|
791
|
+
return Be(new Date(a.setDate(o)));
|
|
792
792
|
}, On = (t) => je(gt(bt(t), 6)), At = (t) => {
|
|
793
793
|
const a = new Date(t);
|
|
794
794
|
return Be(new Date(a.getFullYear(), a.getMonth(), 1));
|
|
@@ -811,8 +811,8 @@ const zn = {
|
|
|
811
811
|
case "this_month":
|
|
812
812
|
return [At(a), Ft(a)];
|
|
813
813
|
case "last_month": {
|
|
814
|
-
const s = /* @__PURE__ */ new Date(),
|
|
815
|
-
return [At(
|
|
814
|
+
const s = /* @__PURE__ */ new Date(), o = new Date(s.getFullYear(), s.getMonth() - 1, 1);
|
|
815
|
+
return [At(o), Ft(o)];
|
|
816
816
|
}
|
|
817
817
|
default:
|
|
818
818
|
return [null, null];
|
|
@@ -821,10 +821,10 @@ const zn = {
|
|
|
821
821
|
isOpen: t,
|
|
822
822
|
onClose: a,
|
|
823
823
|
onApplyFilters: s,
|
|
824
|
-
resetFilters:
|
|
824
|
+
resetFilters: o,
|
|
825
825
|
filterConfig: l = [],
|
|
826
826
|
initialFormikValues: m,
|
|
827
|
-
customStyles:
|
|
827
|
+
customStyles: i = "",
|
|
828
828
|
fetchCreatedOrUpdatedByUsers: u = async () => []
|
|
829
829
|
// Mockable fetcher
|
|
830
830
|
}) => {
|
|
@@ -891,7 +891,7 @@ const zn = {
|
|
|
891
891
|
const h = l[C].key, w = l[C].url;
|
|
892
892
|
l[C].type === "multiselect-users" && g[h].length === 0 && !x[h] && V(h, w);
|
|
893
893
|
}, Y = () => {
|
|
894
|
-
A.resetForm(), f({ createdBy: [], updatedBy: [] }),
|
|
894
|
+
A.resetForm(), f({ createdBy: [], updatedBy: [] }), o();
|
|
895
895
|
}, G = (C) => {
|
|
896
896
|
const h = l.find((k) => k.key === C);
|
|
897
897
|
if (!h) return null;
|
|
@@ -1191,7 +1191,7 @@ const zn = {
|
|
|
1191
1191
|
leave: "ease-in duration-200",
|
|
1192
1192
|
leaveFrom: "opacity-100 translate-x-0",
|
|
1193
1193
|
leaveTo: "opacity-0 translate-x-full",
|
|
1194
|
-
children: /* @__PURE__ */ n(Fe, { className: `filter-modal-panel ${
|
|
1194
|
+
children: /* @__PURE__ */ n(Fe, { className: `filter-modal-panel ${i}`, children: [
|
|
1195
1195
|
/* @__PURE__ */ n("div", { className: "filter-header", children: [
|
|
1196
1196
|
/* @__PURE__ */ e(et, { as: "h3", className: "filter-title", children: "Filters" }),
|
|
1197
1197
|
/* @__PURE__ */ e(
|
|
@@ -1282,10 +1282,10 @@ const zn = {
|
|
|
1282
1282
|
label: t,
|
|
1283
1283
|
id: a,
|
|
1284
1284
|
type: s = "text",
|
|
1285
|
-
icon:
|
|
1285
|
+
icon: o,
|
|
1286
1286
|
error: l,
|
|
1287
1287
|
className: m,
|
|
1288
|
-
ref:
|
|
1288
|
+
ref: i,
|
|
1289
1289
|
// ✅ 'ref' is now received directly as a prop
|
|
1290
1290
|
...u
|
|
1291
1291
|
}) => {
|
|
@@ -1293,16 +1293,16 @@ const zn = {
|
|
|
1293
1293
|
return /* @__PURE__ */ n("div", { className: `input-wrapper ${m || ""}`, children: [
|
|
1294
1294
|
t && /* @__PURE__ */ e("label", { htmlFor: g, className: "input-label", children: t }),
|
|
1295
1295
|
/* @__PURE__ */ n("div", { className: "input-field-container", children: [
|
|
1296
|
-
|
|
1296
|
+
o && /* @__PURE__ */ e(o, { className: "input-icon", size: 20 }),
|
|
1297
1297
|
/* @__PURE__ */ e(
|
|
1298
1298
|
"input",
|
|
1299
1299
|
{
|
|
1300
1300
|
id: g,
|
|
1301
1301
|
type: s,
|
|
1302
|
-
ref:
|
|
1302
|
+
ref: i,
|
|
1303
1303
|
className: H("input-field", {
|
|
1304
1304
|
"input-field--error": !!l,
|
|
1305
|
-
"input-field--with-icon": !!
|
|
1305
|
+
"input-field--with-icon": !!o
|
|
1306
1306
|
}),
|
|
1307
1307
|
...u
|
|
1308
1308
|
}
|
|
@@ -1332,20 +1332,20 @@ const zn = {
|
|
|
1332
1332
|
isOpen: t,
|
|
1333
1333
|
onClose: a,
|
|
1334
1334
|
title: s,
|
|
1335
|
-
children:
|
|
1335
|
+
children: o,
|
|
1336
1336
|
// For the description/body content
|
|
1337
1337
|
primaryButtonText: l,
|
|
1338
1338
|
// No default
|
|
1339
1339
|
secondaryButtonText: m,
|
|
1340
1340
|
// No default
|
|
1341
|
-
variant:
|
|
1341
|
+
variant: i = "info",
|
|
1342
1342
|
// 'info', 'warning', 'delete'
|
|
1343
1343
|
loading: u = !1,
|
|
1344
1344
|
buttonProps: g = {},
|
|
1345
1345
|
size: f
|
|
1346
1346
|
// Add size prop
|
|
1347
1347
|
}) => {
|
|
1348
|
-
const x = Et[
|
|
1348
|
+
const x = Et[i] || Et.info, r = x.icon, N = () => {
|
|
1349
1349
|
a({ primary: !0, secondary: !1 });
|
|
1350
1350
|
}, d = () => {
|
|
1351
1351
|
a({ primary: !1, secondary: !0 });
|
|
@@ -1379,7 +1379,7 @@ const zn = {
|
|
|
1379
1379
|
/* @__PURE__ */ e("div", { className: `modal-icon-container ${x.iconClass}`, children: /* @__PURE__ */ e(r, { size: 24, "aria-hidden": "true" }) }),
|
|
1380
1380
|
/* @__PURE__ */ n("div", { className: "modal-text-content", children: [
|
|
1381
1381
|
/* @__PURE__ */ e(et, { as: "h3", className: "modal-title", children: s }),
|
|
1382
|
-
/* @__PURE__ */ e("div", { className: "modal-description", children:
|
|
1382
|
+
/* @__PURE__ */ e("div", { className: "modal-description", children: o })
|
|
1383
1383
|
] })
|
|
1384
1384
|
] }),
|
|
1385
1385
|
(l || m) && /* @__PURE__ */ n("div", { className: "modal-footer", children: [
|
|
@@ -1408,18 +1408,18 @@ const zn = {
|
|
|
1408
1408
|
currentPage: t,
|
|
1409
1409
|
totalItems: a,
|
|
1410
1410
|
itemsPerPage: s,
|
|
1411
|
-
onPageChange:
|
|
1411
|
+
onPageChange: o,
|
|
1412
1412
|
onItemsPerPageChange: l,
|
|
1413
1413
|
itemsPerPageOptions: m = [10, 15, 20]
|
|
1414
1414
|
}) => {
|
|
1415
|
-
const
|
|
1415
|
+
const i = Math.ceil(a / s), [u, g] = L(t);
|
|
1416
1416
|
Z(() => {
|
|
1417
1417
|
g(t);
|
|
1418
1418
|
}, [t]);
|
|
1419
1419
|
const f = Math.min((t - 1) * s + 1, a), x = Math.min(t * s, a), r = (N) => {
|
|
1420
1420
|
N.preventDefault();
|
|
1421
1421
|
let d = parseInt(u, 10);
|
|
1422
|
-
isNaN(d) || d < 1 ? d = 1 : d >
|
|
1422
|
+
isNaN(d) || d < 1 ? d = 1 : d > i && (d = i), g(d), d !== t && o(d);
|
|
1423
1423
|
};
|
|
1424
1424
|
return /* @__PURE__ */ n("div", { className: "pagination-container", children: [
|
|
1425
1425
|
/* @__PURE__ */ n("div", { className: "pagination-left", children: [
|
|
@@ -1448,7 +1448,7 @@ const zn = {
|
|
|
1448
1448
|
"button",
|
|
1449
1449
|
{
|
|
1450
1450
|
className: "pagination-button",
|
|
1451
|
-
onClick: () =>
|
|
1451
|
+
onClick: () => o(1),
|
|
1452
1452
|
disabled: t === 1,
|
|
1453
1453
|
children: /* @__PURE__ */ e(qa, { size: 16 })
|
|
1454
1454
|
}
|
|
@@ -1457,7 +1457,7 @@ const zn = {
|
|
|
1457
1457
|
"button",
|
|
1458
1458
|
{
|
|
1459
1459
|
className: "pagination-button",
|
|
1460
|
-
onClick: () =>
|
|
1460
|
+
onClick: () => o(t - 1),
|
|
1461
1461
|
disabled: t === 1,
|
|
1462
1462
|
children: /* @__PURE__ */ e(Ya, { size: 16 })
|
|
1463
1463
|
}
|
|
@@ -1477,15 +1477,15 @@ const zn = {
|
|
|
1477
1477
|
),
|
|
1478
1478
|
/* @__PURE__ */ n("span", { className: "page-input-total", children: [
|
|
1479
1479
|
"of ",
|
|
1480
|
-
|
|
1480
|
+
i
|
|
1481
1481
|
] })
|
|
1482
1482
|
] }),
|
|
1483
1483
|
/* @__PURE__ */ e(
|
|
1484
1484
|
"button",
|
|
1485
1485
|
{
|
|
1486
1486
|
className: "pagination-button",
|
|
1487
|
-
onClick: () =>
|
|
1488
|
-
disabled: t ===
|
|
1487
|
+
onClick: () => o(t + 1),
|
|
1488
|
+
disabled: t === i,
|
|
1489
1489
|
children: /* @__PURE__ */ e(fe, { size: 16 })
|
|
1490
1490
|
}
|
|
1491
1491
|
),
|
|
@@ -1493,8 +1493,8 @@ const zn = {
|
|
|
1493
1493
|
"button",
|
|
1494
1494
|
{
|
|
1495
1495
|
className: "pagination-button",
|
|
1496
|
-
onClick: () => i
|
|
1497
|
-
disabled: t ===
|
|
1496
|
+
onClick: () => o(i),
|
|
1497
|
+
disabled: t === i,
|
|
1498
1498
|
children: /* @__PURE__ */ e(Wa, { size: 16 })
|
|
1499
1499
|
}
|
|
1500
1500
|
)
|
|
@@ -1505,7 +1505,7 @@ const zn = {
|
|
|
1505
1505
|
value: a,
|
|
1506
1506
|
// The currently selected option's value (e.g., 'work')
|
|
1507
1507
|
onChange: s,
|
|
1508
|
-
options:
|
|
1508
|
+
options: o = [],
|
|
1509
1509
|
error: l,
|
|
1510
1510
|
...m
|
|
1511
1511
|
}) => /* @__PURE__ */ n("div", { className: "radiogroup-wrapper", children: [
|
|
@@ -1517,10 +1517,10 @@ const zn = {
|
|
|
1517
1517
|
onChange: s,
|
|
1518
1518
|
className: "radiogroup-container",
|
|
1519
1519
|
...m,
|
|
1520
|
-
children:
|
|
1520
|
+
children: o.map((i) => /* @__PURE__ */ e(
|
|
1521
1521
|
Ue.Option,
|
|
1522
1522
|
{
|
|
1523
|
-
value:
|
|
1523
|
+
value: i.value,
|
|
1524
1524
|
className: ({ active: u, checked: g }) => H("radiogroup-option", {
|
|
1525
1525
|
"radiogroup-option--active": u,
|
|
1526
1526
|
"radiogroup-option--checked": g,
|
|
@@ -1528,20 +1528,20 @@ const zn = {
|
|
|
1528
1528
|
}),
|
|
1529
1529
|
children: ({ checked: u }) => /* @__PURE__ */ n(te, { children: [
|
|
1530
1530
|
/* @__PURE__ */ n("div", { className: "radiogroup-option-content", children: [
|
|
1531
|
-
/* @__PURE__ */ e(Ue.Label, { as: "p", className: "option-label", children:
|
|
1532
|
-
|
|
1531
|
+
/* @__PURE__ */ e(Ue.Label, { as: "p", className: "option-label", children: i.label }),
|
|
1532
|
+
i.description && /* @__PURE__ */ e(
|
|
1533
1533
|
Ue.Description,
|
|
1534
1534
|
{
|
|
1535
1535
|
as: "span",
|
|
1536
1536
|
className: "option-description",
|
|
1537
|
-
children:
|
|
1537
|
+
children: i.description
|
|
1538
1538
|
}
|
|
1539
1539
|
)
|
|
1540
1540
|
] }),
|
|
1541
1541
|
u && /* @__PURE__ */ e("div", { className: "option-checkmark", children: /* @__PURE__ */ e(Jt, { size: 20 }) })
|
|
1542
1542
|
] })
|
|
1543
1543
|
},
|
|
1544
|
-
|
|
1544
|
+
i.value
|
|
1545
1545
|
))
|
|
1546
1546
|
}
|
|
1547
1547
|
),
|
|
@@ -1550,11 +1550,11 @@ const zn = {
|
|
|
1550
1550
|
value: t = "",
|
|
1551
1551
|
onDebouncedChange: a,
|
|
1552
1552
|
debounceDelay: s = 400,
|
|
1553
|
-
placeholder:
|
|
1553
|
+
placeholder: o = "Enter text...",
|
|
1554
1554
|
label: l = "Search",
|
|
1555
1555
|
// Added a default label for accessibility
|
|
1556
1556
|
customClass: m = "",
|
|
1557
|
-
...
|
|
1557
|
+
...i
|
|
1558
1558
|
}) => {
|
|
1559
1559
|
const [u, g] = L(t);
|
|
1560
1560
|
Z(() => {
|
|
@@ -1580,12 +1580,12 @@ const zn = {
|
|
|
1580
1580
|
{
|
|
1581
1581
|
id: "search-field",
|
|
1582
1582
|
className: "search-bar-input",
|
|
1583
|
-
placeholder:
|
|
1583
|
+
placeholder: o,
|
|
1584
1584
|
type: "search",
|
|
1585
1585
|
name: "search",
|
|
1586
1586
|
value: u,
|
|
1587
1587
|
onChange: x,
|
|
1588
|
-
...
|
|
1588
|
+
...i
|
|
1589
1589
|
}
|
|
1590
1590
|
)
|
|
1591
1591
|
] });
|
|
@@ -1595,17 +1595,17 @@ const zn = {
|
|
|
1595
1595
|
// From RHF's <Controller>
|
|
1596
1596
|
onChange: s,
|
|
1597
1597
|
// From RHF's <Controller>
|
|
1598
|
-
options:
|
|
1598
|
+
options: o = [],
|
|
1599
1599
|
placeholder: l = "Select an option...",
|
|
1600
1600
|
disabled: m = !1,
|
|
1601
|
-
error:
|
|
1601
|
+
error: i,
|
|
1602
1602
|
ref: u,
|
|
1603
1603
|
// From RHF's <Controller>
|
|
1604
1604
|
showSearch: g = !0
|
|
1605
1605
|
}) => {
|
|
1606
|
-
const [f, x] = L(""), r = f === "" ?
|
|
1606
|
+
const [f, x] = L(""), r = f === "" ? o : o.filter(
|
|
1607
1607
|
(d) => d.label.toLowerCase().includes(f.toLowerCase())
|
|
1608
|
-
), N =
|
|
1608
|
+
), N = o.find((d) => a?.id ? d.id === a.id : d.id === a || d.value === a);
|
|
1609
1609
|
return /* @__PURE__ */ e(K, { value: a, onChange: s, disabled: m, children: /* @__PURE__ */ n("div", { className: "select-wrapper", ref: u, children: [
|
|
1610
1610
|
t && /* @__PURE__ */ e("label", { className: "select-label", children: t }),
|
|
1611
1611
|
/* @__PURE__ */ n("div", { className: "select-button-container", children: [
|
|
@@ -1613,7 +1613,7 @@ const zn = {
|
|
|
1613
1613
|
Vr,
|
|
1614
1614
|
{
|
|
1615
1615
|
className: H("select-button", {
|
|
1616
|
-
"select-button--error": !!
|
|
1616
|
+
"select-button--error": !!i
|
|
1617
1617
|
}),
|
|
1618
1618
|
children: [
|
|
1619
1619
|
/* @__PURE__ */ e("span", { className: "select-value-display", children: N ? N.label : /* @__PURE__ */ e("span", { className: "placeholder", children: l }) }),
|
|
@@ -1667,7 +1667,7 @@ const zn = {
|
|
|
1667
1667
|
}
|
|
1668
1668
|
)
|
|
1669
1669
|
] }),
|
|
1670
|
-
|
|
1670
|
+
i && /* @__PURE__ */ e("p", { className: "select-error-message", children: i })
|
|
1671
1671
|
] }) });
|
|
1672
1672
|
}, Mn = () => {
|
|
1673
1673
|
const [t, a] = L(window.location.pathname);
|
|
@@ -1685,12 +1685,12 @@ const zn = {
|
|
|
1685
1685
|
return s;
|
|
1686
1686
|
return null;
|
|
1687
1687
|
}, pa = ({ item: t, isCollapsed: a, level: s = 0 }) => {
|
|
1688
|
-
const { pathname:
|
|
1688
|
+
const { pathname: o } = Mn(), l = t.href || t.url || t.path, [m, i] = L(!1), u = t.icon;
|
|
1689
1689
|
Z(() => {
|
|
1690
|
-
yt([t],
|
|
1691
|
-
}, [t,
|
|
1692
|
-
const g =
|
|
1693
|
-
r.preventDefault(),
|
|
1690
|
+
yt([t], o) && i(!0);
|
|
1691
|
+
}, [t, o]);
|
|
1692
|
+
const g = o === l, f = !g && !!yt([t], o), x = (r) => {
|
|
1693
|
+
r.preventDefault(), i(!m);
|
|
1694
1694
|
};
|
|
1695
1695
|
return /* @__PURE__ */ n(
|
|
1696
1696
|
"div",
|
|
@@ -1760,13 +1760,13 @@ const zn = {
|
|
|
1760
1760
|
navItems: t = [],
|
|
1761
1761
|
isCollapsed: a = !1,
|
|
1762
1762
|
onToggleCollapse: s,
|
|
1763
|
-
isMobileOpen:
|
|
1763
|
+
isMobileOpen: o = !1,
|
|
1764
1764
|
onToggleMobile: l,
|
|
1765
1765
|
logoSmall: m,
|
|
1766
|
-
logoLarge:
|
|
1766
|
+
logoLarge: i,
|
|
1767
1767
|
user: u = { name: "", email: "" }
|
|
1768
1768
|
}) => /* @__PURE__ */ n(te, { children: [
|
|
1769
|
-
|
|
1769
|
+
o && /* @__PURE__ */ e(
|
|
1770
1770
|
"div",
|
|
1771
1771
|
{
|
|
1772
1772
|
className: "sidebar-overlay",
|
|
@@ -1779,12 +1779,12 @@ const zn = {
|
|
|
1779
1779
|
{
|
|
1780
1780
|
className: H("sidebar", {
|
|
1781
1781
|
"sidebar--collapsed": a,
|
|
1782
|
-
"sidebar--mobile-open":
|
|
1782
|
+
"sidebar--mobile-open": o
|
|
1783
1783
|
}),
|
|
1784
1784
|
"aria-label": "Main navigation",
|
|
1785
1785
|
children: [
|
|
1786
1786
|
/* @__PURE__ */ n("div", { className: "sidebar-header", children: [
|
|
1787
|
-
/* @__PURE__ */ e("div", { className: "sidebar-logo", children: a ? m :
|
|
1787
|
+
/* @__PURE__ */ e("div", { className: "sidebar-logo", children: a ? m : i }),
|
|
1788
1788
|
!a && /* @__PURE__ */ n("div", { className: "sidebar-search-container", children: [
|
|
1789
1789
|
/* @__PURE__ */ e(xt, { className: "sidebar-search-icon" }),
|
|
1790
1790
|
/* @__PURE__ */ e(
|
|
@@ -1833,7 +1833,7 @@ const zn = {
|
|
|
1833
1833
|
color: a = "primary",
|
|
1834
1834
|
// 'primary', 'white'
|
|
1835
1835
|
className: s,
|
|
1836
|
-
...
|
|
1836
|
+
...o
|
|
1837
1837
|
}) => {
|
|
1838
1838
|
const l = H(
|
|
1839
1839
|
"spinner",
|
|
@@ -1845,7 +1845,7 @@ const zn = {
|
|
|
1845
1845
|
"div",
|
|
1846
1846
|
{
|
|
1847
1847
|
className: l,
|
|
1848
|
-
...
|
|
1848
|
+
...o,
|
|
1849
1849
|
role: "status",
|
|
1850
1850
|
"aria-label": "Loading...",
|
|
1851
1851
|
children: [
|
|
@@ -1867,11 +1867,11 @@ const zn = {
|
|
|
1867
1867
|
label: t,
|
|
1868
1868
|
id: a,
|
|
1869
1869
|
error: s,
|
|
1870
|
-
className:
|
|
1870
|
+
className: o,
|
|
1871
1871
|
ref: l,
|
|
1872
1872
|
maxLength: m,
|
|
1873
1873
|
// ✅ New prop for max length
|
|
1874
|
-
showCharCount:
|
|
1874
|
+
showCharCount: i = !1,
|
|
1875
1875
|
// ✅ New prop to control visibility
|
|
1876
1876
|
...u
|
|
1877
1877
|
}) => {
|
|
@@ -1880,10 +1880,10 @@ const zn = {
|
|
|
1880
1880
|
), r = (d) => {
|
|
1881
1881
|
x(d.target.value.length), u.onChange && u.onChange(d);
|
|
1882
1882
|
}, N = m - f;
|
|
1883
|
-
return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${
|
|
1883
|
+
return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${o || ""}`, children: [
|
|
1884
1884
|
/* @__PURE__ */ n("div", { className: "textarea-header", children: [
|
|
1885
1885
|
t && /* @__PURE__ */ e("label", { htmlFor: g, className: "textarea-label", children: t }),
|
|
1886
|
-
|
|
1886
|
+
i && m && /* @__PURE__ */ n("span", { className: "char-counter", children: [
|
|
1887
1887
|
N,
|
|
1888
1888
|
" characters remaining"
|
|
1889
1889
|
] })
|
|
@@ -1907,12 +1907,12 @@ const zn = {
|
|
|
1907
1907
|
label: t,
|
|
1908
1908
|
checked: a,
|
|
1909
1909
|
onChange: s,
|
|
1910
|
-
labelPosition:
|
|
1910
|
+
labelPosition: o = "right",
|
|
1911
1911
|
error: l,
|
|
1912
1912
|
...m
|
|
1913
1913
|
}) => /* @__PURE__ */ n("div", { className: "switch-container", children: [
|
|
1914
1914
|
/* @__PURE__ */ n(Gr, { as: "div", className: "switch-group", children: [
|
|
1915
|
-
t &&
|
|
1915
|
+
t && o === "left" && /* @__PURE__ */ e(lt.Label, { className: "switch-label", passive: !0, children: t }),
|
|
1916
1916
|
/* @__PURE__ */ e(
|
|
1917
1917
|
lt,
|
|
1918
1918
|
{
|
|
@@ -1926,7 +1926,7 @@ const zn = {
|
|
|
1926
1926
|
children: /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "switch-thumb" })
|
|
1927
1927
|
}
|
|
1928
1928
|
),
|
|
1929
|
-
t &&
|
|
1929
|
+
t && o === "right" && /* @__PURE__ */ e(lt.Label, { className: "switch-label", passive: !0, children: t })
|
|
1930
1930
|
] }),
|
|
1931
1931
|
l && /* @__PURE__ */ e("p", { className: "switch-error-message", children: l })
|
|
1932
1932
|
] }), Ml = ({
|
|
@@ -1934,13 +1934,13 @@ const zn = {
|
|
|
1934
1934
|
content: a,
|
|
1935
1935
|
variant: s = "dark",
|
|
1936
1936
|
// 'dark', 'light', 'info', 'success', 'error'
|
|
1937
|
-
size:
|
|
1937
|
+
size: o = "medium",
|
|
1938
1938
|
// 'small', 'medium'
|
|
1939
1939
|
place: l = "top",
|
|
1940
1940
|
// 'top', 'bottom', 'left', 'right'
|
|
1941
1941
|
className: m,
|
|
1942
1942
|
// For external styling of the tooltip itself
|
|
1943
|
-
...
|
|
1943
|
+
...i
|
|
1944
1944
|
}) => {
|
|
1945
1945
|
const u = se.useId();
|
|
1946
1946
|
return /* @__PURE__ */ n(te, { children: [
|
|
@@ -1952,8 +1952,8 @@ const zn = {
|
|
|
1952
1952
|
content: a,
|
|
1953
1953
|
place: l,
|
|
1954
1954
|
variant: s,
|
|
1955
|
-
className: `custom-tooltip custom-tooltip--size-${
|
|
1956
|
-
...
|
|
1955
|
+
className: `custom-tooltip custom-tooltip--size-${o} ${m || ""}`,
|
|
1956
|
+
...i
|
|
1957
1957
|
}
|
|
1958
1958
|
)
|
|
1959
1959
|
] });
|
|
@@ -1974,15 +1974,15 @@ const zn = {
|
|
|
1974
1974
|
isOpen: t,
|
|
1975
1975
|
onClose: a,
|
|
1976
1976
|
steps: s = {},
|
|
1977
|
-
currentStep:
|
|
1977
|
+
currentStep: o,
|
|
1978
1978
|
direction: l = 1,
|
|
1979
1979
|
stepProps: m = {},
|
|
1980
|
-
title:
|
|
1980
|
+
title: i,
|
|
1981
1981
|
description: u,
|
|
1982
1982
|
showProgress: g = !0,
|
|
1983
1983
|
closeOnOverlayClick: f = !0
|
|
1984
1984
|
}) => {
|
|
1985
|
-
const x = s[
|
|
1985
|
+
const x = s[o], r = Object.keys(s), N = r.indexOf(o), d = (N + 1) / r.length * 100, p = N > 0 && m.onBack;
|
|
1986
1986
|
return /* @__PURE__ */ e(ue, { show: t, as: Q, children: /* @__PURE__ */ n(
|
|
1987
1987
|
be,
|
|
1988
1988
|
{
|
|
@@ -2027,7 +2027,7 @@ const zn = {
|
|
|
2027
2027
|
}
|
|
2028
2028
|
),
|
|
2029
2029
|
/* @__PURE__ */ n("div", { className: "wizard-header-text", children: [
|
|
2030
|
-
/* @__PURE__ */ e(be.Title, { as: "h3", className: "wizard-title", children:
|
|
2030
|
+
/* @__PURE__ */ e(be.Title, { as: "h3", className: "wizard-title", children: i }),
|
|
2031
2031
|
u && /* @__PURE__ */ e(be.Description, { className: "wizard-description", children: u })
|
|
2032
2032
|
] })
|
|
2033
2033
|
] }),
|
|
@@ -2071,7 +2071,7 @@ const zn = {
|
|
|
2071
2071
|
style: { overflowX: "hidden" },
|
|
2072
2072
|
children: x && /* @__PURE__ */ e(x, { ...m })
|
|
2073
2073
|
},
|
|
2074
|
-
|
|
2074
|
+
o
|
|
2075
2075
|
)
|
|
2076
2076
|
}
|
|
2077
2077
|
) })
|
|
@@ -2092,11 +2092,11 @@ const zn = {
|
|
|
2092
2092
|
dataTestId: t,
|
|
2093
2093
|
title: a,
|
|
2094
2094
|
type: s = "button",
|
|
2095
|
-
ariaLabel:
|
|
2095
|
+
ariaLabel: o,
|
|
2096
2096
|
className: l = "",
|
|
2097
2097
|
// ✅ Default is now empty
|
|
2098
2098
|
category: m = "secondary",
|
|
2099
|
-
icon:
|
|
2099
|
+
icon: i,
|
|
2100
2100
|
// Renamed for clarity, expecting a component type e.g., CheckCircle
|
|
2101
2101
|
disabled: u = !1,
|
|
2102
2102
|
size: g = "small",
|
|
@@ -2121,20 +2121,20 @@ const zn = {
|
|
|
2121
2121
|
className: p,
|
|
2122
2122
|
disabled: d,
|
|
2123
2123
|
onClick: r,
|
|
2124
|
-
title:
|
|
2125
|
-
"aria-label":
|
|
2124
|
+
title: o,
|
|
2125
|
+
"aria-label": o,
|
|
2126
2126
|
...N,
|
|
2127
|
-
children:
|
|
2127
|
+
children: i && /* @__PURE__ */ e(i, { size: g === "large" ? 20 : 16 })
|
|
2128
2128
|
}
|
|
2129
2129
|
);
|
|
2130
2130
|
}, jl = ({
|
|
2131
2131
|
content: t,
|
|
2132
2132
|
isFooter: a = !1,
|
|
2133
2133
|
footerContent: s,
|
|
2134
|
-
save:
|
|
2134
|
+
save: o,
|
|
2135
2135
|
cancel: l,
|
|
2136
2136
|
tertiary: m,
|
|
2137
|
-
fullHeight:
|
|
2137
|
+
fullHeight: i = !1,
|
|
2138
2138
|
// A clearer prop name
|
|
2139
2139
|
...u
|
|
2140
2140
|
}) => {
|
|
@@ -2142,7 +2142,7 @@ const zn = {
|
|
|
2142
2142
|
"page-layout",
|
|
2143
2143
|
{
|
|
2144
2144
|
"page-layout--with-footer": a,
|
|
2145
|
-
"page-layout--full-height":
|
|
2145
|
+
"page-layout--full-height": i
|
|
2146
2146
|
},
|
|
2147
2147
|
u.className
|
|
2148
2148
|
);
|
|
@@ -2165,12 +2165,12 @@ const zn = {
|
|
|
2165
2165
|
...l
|
|
2166
2166
|
}
|
|
2167
2167
|
),
|
|
2168
|
-
|
|
2168
|
+
o?.show && /* @__PURE__ */ e(
|
|
2169
2169
|
ee,
|
|
2170
2170
|
{
|
|
2171
2171
|
category: "primary",
|
|
2172
|
-
label:
|
|
2173
|
-
...
|
|
2172
|
+
label: o.label || "Save",
|
|
2173
|
+
...o
|
|
2174
2174
|
}
|
|
2175
2175
|
)
|
|
2176
2176
|
] }) })
|
|
@@ -2180,12 +2180,12 @@ const zn = {
|
|
|
2180
2180
|
subHeading: a,
|
|
2181
2181
|
breadcrumbItems: s = [],
|
|
2182
2182
|
// Expects the breadcrumb data as a prop
|
|
2183
|
-
isLeftArrow:
|
|
2183
|
+
isLeftArrow: o = !1,
|
|
2184
2184
|
onBackClick: l,
|
|
2185
2185
|
// Expects a handler for the back button
|
|
2186
2186
|
...m
|
|
2187
2187
|
}) => /* @__PURE__ */ n("div", { className: "page-header-wrapper", ...m, children: [
|
|
2188
|
-
|
|
2188
|
+
o && l && /* @__PURE__ */ e(
|
|
2189
2189
|
"button",
|
|
2190
2190
|
{
|
|
2191
2191
|
className: "page-header-back-button",
|
|
@@ -2203,12 +2203,12 @@ const zn = {
|
|
|
2203
2203
|
onSelect: a,
|
|
2204
2204
|
triggerIcon: s = Ht
|
|
2205
2205
|
}) => {
|
|
2206
|
-
const { refs:
|
|
2206
|
+
const { refs: o, floatingStyles: l } = sa({
|
|
2207
2207
|
whileElementsMounted: ca,
|
|
2208
|
-
middleware: [la(5),
|
|
2208
|
+
middleware: [la(5), oa(), ia({ padding: 5 })]
|
|
2209
2209
|
});
|
|
2210
2210
|
return /* @__PURE__ */ n(qr, { as: "div", className: "options-menu-wrapper", children: [
|
|
2211
|
-
/* @__PURE__ */ e(Yr, { ref:
|
|
2211
|
+
/* @__PURE__ */ e(Yr, { ref: o.setReference, className: "options-menu-trigger", children: /* @__PURE__ */ e(s, { size: 20 }) }),
|
|
2212
2212
|
/* @__PURE__ */ e(Wr, { children: /* @__PURE__ */ e(
|
|
2213
2213
|
ue,
|
|
2214
2214
|
{
|
|
@@ -2222,16 +2222,16 @@ const zn = {
|
|
|
2222
2222
|
children: /* @__PURE__ */ e(
|
|
2223
2223
|
Jr,
|
|
2224
2224
|
{
|
|
2225
|
-
ref:
|
|
2225
|
+
ref: o.setFloating,
|
|
2226
2226
|
style: l,
|
|
2227
2227
|
className: "options-menu-panel",
|
|
2228
2228
|
children: t.map((m) => /* @__PURE__ */ n("div", { className: "options-menu-item-wrapper", children: [
|
|
2229
2229
|
m.dividerBefore && /* @__PURE__ */ e("div", { className: "menu-divider" }),
|
|
2230
|
-
/* @__PURE__ */ e(Xr, { children: ({ active:
|
|
2230
|
+
/* @__PURE__ */ e(Xr, { children: ({ active: i }) => /* @__PURE__ */ n(
|
|
2231
2231
|
"button",
|
|
2232
2232
|
{
|
|
2233
2233
|
onClick: () => a(m),
|
|
2234
|
-
className: `options-menu-item ${
|
|
2234
|
+
className: `options-menu-item ${i ? "active bg-gray-200 text-gray-900" : ""}`,
|
|
2235
2235
|
disabled: m.disabled,
|
|
2236
2236
|
children: [
|
|
2237
2237
|
m.icon && /* @__PURE__ */ e("span", { className: "item-icon", children: m.icon }),
|
|
@@ -2292,8 +2292,8 @@ function ya(t) {
|
|
|
2292
2292
|
all() {
|
|
2293
2293
|
const a = {};
|
|
2294
2294
|
for (let s = 0; s < t.length; s++) {
|
|
2295
|
-
const
|
|
2296
|
-
a[
|
|
2295
|
+
const o = t.key(s);
|
|
2296
|
+
a[o] = this.get(o);
|
|
2297
2297
|
}
|
|
2298
2298
|
return a;
|
|
2299
2299
|
}
|
|
@@ -2306,19 +2306,19 @@ const qn = ya(localStorage), Vl = ya(sessionStorage), _l = {
|
|
|
2306
2306
|
);
|
|
2307
2307
|
return a ? decodeURIComponent(a[2]) : null;
|
|
2308
2308
|
},
|
|
2309
|
-
set(t, a, s = 7,
|
|
2309
|
+
set(t, a, s = 7, o = "/") {
|
|
2310
2310
|
const l = /* @__PURE__ */ new Date();
|
|
2311
2311
|
l.setDate(l.getDate() + s), document.cookie = `${t}=${encodeURIComponent(
|
|
2312
2312
|
a
|
|
2313
|
-
)}; expires=${l.toUTCString()}; path=${
|
|
2313
|
+
)}; expires=${l.toUTCString()}; path=${o}`;
|
|
2314
2314
|
},
|
|
2315
2315
|
remove(t, a = "/") {
|
|
2316
2316
|
document.cookie = `${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${a}`;
|
|
2317
2317
|
},
|
|
2318
2318
|
all() {
|
|
2319
2319
|
return document.cookie.split(";").filter(Boolean).reduce((t, a) => {
|
|
2320
|
-
const [s,
|
|
2321
|
-
return t[s] = decodeURIComponent(
|
|
2320
|
+
const [s, o] = a.split("=").map((l) => l.trim());
|
|
2321
|
+
return t[s] = decodeURIComponent(o), t;
|
|
2322
2322
|
}, {});
|
|
2323
2323
|
},
|
|
2324
2324
|
clear() {
|
|
@@ -2388,27 +2388,27 @@ function Jn(t) {
|
|
|
2388
2388
|
}
|
|
2389
2389
|
}
|
|
2390
2390
|
function Rt() {
|
|
2391
|
-
const t = Jn("userProfile") || {}, a = localStorage.getItem("access_token") || t.accessToken || "", s = localStorage.getItem("siteId") || t.siteId || "",
|
|
2391
|
+
const t = Jn("userProfile") || {}, a = localStorage.getItem("access_token") || t.accessToken || "", s = localStorage.getItem("siteId") || t.siteId || "", o = t.tenant || "", l = t.tenantdomain || "", m = t.username || t.displayName || "", i = t.email || "";
|
|
2392
2392
|
return {
|
|
2393
2393
|
Authorization: a ? `Bearer ${a}` : void 0,
|
|
2394
|
-
"x-tenant-id":
|
|
2394
|
+
"x-tenant-id": o || void 0,
|
|
2395
2395
|
"x-tenant-domain": l || void 0,
|
|
2396
2396
|
"site-id": s || void 0,
|
|
2397
2397
|
"Content-Type": "application/json",
|
|
2398
2398
|
"principal-user": m || void 0,
|
|
2399
|
-
"x-user-email":
|
|
2399
|
+
"x-user-email": i || void 0
|
|
2400
2400
|
};
|
|
2401
2401
|
}
|
|
2402
2402
|
function Xn(t) {
|
|
2403
2403
|
if (t && t.isAxiosError) {
|
|
2404
|
-
const { response: a, config: s, message:
|
|
2404
|
+
const { response: a, config: s, message: o } = t, l = a?.status ?? null, m = a?.statusText ?? null, i = a?.data ?? null, u = typeof i == "string" && i || i?.message || i?.msg || i?.error || i?.errors?.[0]?.message || null;
|
|
2405
2405
|
return {
|
|
2406
2406
|
ok: !1,
|
|
2407
2407
|
status: l,
|
|
2408
2408
|
statusText: m,
|
|
2409
|
-
code:
|
|
2410
|
-
message: u ||
|
|
2411
|
-
details:
|
|
2409
|
+
code: i?.code || null,
|
|
2410
|
+
message: u || o || "Request failed",
|
|
2411
|
+
details: i || null,
|
|
2412
2412
|
request: {
|
|
2413
2413
|
url: s?.url || null,
|
|
2414
2414
|
method: s?.method || null,
|
|
@@ -2446,7 +2446,7 @@ function Hn({
|
|
|
2446
2446
|
return t && (r === 401 || r === 403) && (window.location.href.includes("/login") || (window.historyPath = window.location.pathname, localStorage.clear(), sessionStorage.clear(), window.location.href = "/login")), Promise.reject(x);
|
|
2447
2447
|
}
|
|
2448
2448
|
);
|
|
2449
|
-
function
|
|
2449
|
+
function o({ open: f = !1, customHeader: x = {} } = {}) {
|
|
2450
2450
|
if (f) {
|
|
2451
2451
|
const { Authorization: r, ...N } = Rt();
|
|
2452
2452
|
return {
|
|
@@ -2458,28 +2458,28 @@ function Hn({
|
|
|
2458
2458
|
async function l(f, x, r = !1, N = {}) {
|
|
2459
2459
|
return s.get(f, {
|
|
2460
2460
|
params: x,
|
|
2461
|
-
...
|
|
2461
|
+
...o({ open: r, customHeader: N })
|
|
2462
2462
|
});
|
|
2463
2463
|
}
|
|
2464
2464
|
async function m(f, x, r = !1, N = {}) {
|
|
2465
|
-
const d = { ...
|
|
2465
|
+
const d = { ...o({ open: r, customHeader: N }) };
|
|
2466
2466
|
return x !== void 0 && (d.data = x), s.delete(f, d);
|
|
2467
2467
|
}
|
|
2468
|
-
async function
|
|
2469
|
-
return s.post(f, x,
|
|
2468
|
+
async function i(f, x = {}, r = !1, N = {}) {
|
|
2469
|
+
return s.post(f, x, o({ open: r, customHeader: N }));
|
|
2470
2470
|
}
|
|
2471
2471
|
async function u(f, x = {}, r = !1, N = {}) {
|
|
2472
|
-
return s.put(f, x,
|
|
2472
|
+
return s.put(f, x, o({ open: r, customHeader: N }));
|
|
2473
2473
|
}
|
|
2474
2474
|
async function g(f, x = {}, r = !1, N = {}) {
|
|
2475
|
-
return s.patch(f, x,
|
|
2475
|
+
return s.patch(f, x, o({ open: r, customHeader: N }));
|
|
2476
2476
|
}
|
|
2477
2477
|
return {
|
|
2478
2478
|
instance: s,
|
|
2479
2479
|
// exported in case you want advanced usage
|
|
2480
2480
|
axiosGet: l,
|
|
2481
2481
|
axiosDelete: m,
|
|
2482
|
-
axiosPost:
|
|
2482
|
+
axiosPost: i,
|
|
2483
2483
|
axiosPut: u,
|
|
2484
2484
|
axiosPatch: g
|
|
2485
2485
|
};
|
|
@@ -2504,7 +2504,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2504
2504
|
console.log("Error searching entities:", s);
|
|
2505
2505
|
}
|
|
2506
2506
|
}, Kn = (t) => t.filter((a) => !!a?.email).map((a) => {
|
|
2507
|
-
const s = (a?.firstName ?? "").trim(),
|
|
2507
|
+
const s = (a?.firstName ?? "").trim(), o = (a?.lastName ?? "").trim(), l = `${s} ${o}`.trim() || (a.email?.split("@")[0] ?? "Unknown");
|
|
2508
2508
|
return {
|
|
2509
2509
|
id: a.email,
|
|
2510
2510
|
name: l,
|
|
@@ -2558,23 +2558,23 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2558
2558
|
},
|
|
2559
2559
|
getMembersForGroup: async (t) => {
|
|
2560
2560
|
const a = `${ze()}/unifydidentity/open/usersforgroup?groupName=${encodeURIComponent(t)}&isGroupWithSpecChar=true&isPaging=true&page=0&size=999&deepSearch=`, { data: s } = await Ve(a);
|
|
2561
|
-
let
|
|
2561
|
+
let o = [];
|
|
2562
2562
|
if (Array.isArray(s))
|
|
2563
|
-
|
|
2563
|
+
o = s;
|
|
2564
2564
|
else if (typeof s == "string")
|
|
2565
|
-
|
|
2565
|
+
o = Ot(s.trim());
|
|
2566
2566
|
else if (s && typeof s == "object") {
|
|
2567
2567
|
const l = s.data;
|
|
2568
|
-
Array.isArray(l) ?
|
|
2568
|
+
Array.isArray(l) ? o = l : typeof l == "string" && (o = Ot(l.trim()));
|
|
2569
2569
|
}
|
|
2570
|
-
return Kn(
|
|
2570
|
+
return Kn(o);
|
|
2571
2571
|
}
|
|
2572
2572
|
}, kt = (t, a) => {
|
|
2573
|
-
const [s,
|
|
2573
|
+
const [s, o] = L(t);
|
|
2574
2574
|
return Z(
|
|
2575
2575
|
() => {
|
|
2576
2576
|
const l = an(() => {
|
|
2577
|
-
|
|
2577
|
+
o(t);
|
|
2578
2578
|
}, a);
|
|
2579
2579
|
return l(), () => {
|
|
2580
2580
|
l.cancel();
|
|
@@ -2587,13 +2587,13 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2587
2587
|
users: t = [],
|
|
2588
2588
|
groups: a = [],
|
|
2589
2589
|
roles: s = [],
|
|
2590
|
-
onClick:
|
|
2590
|
+
onClick: o
|
|
2591
2591
|
}) => {
|
|
2592
2592
|
const l = t.slice(0, 2), m = [];
|
|
2593
2593
|
t.length > 0 && m.push(t[0].name), a.length > 0 && m.push(a[0].name), s.length > 0 && m.length < 2 && m.push(s[0].name);
|
|
2594
|
-
const
|
|
2594
|
+
const i = t.length + a.length + s.length, u = i - m.length;
|
|
2595
2595
|
let g = m.join(", ");
|
|
2596
|
-
return u > 0 && (g += ` and ${u} others`),
|
|
2596
|
+
return u > 0 && (g += ` and ${u} others`), i === 0 ? /* @__PURE__ */ e(
|
|
2597
2597
|
"div",
|
|
2598
2598
|
{
|
|
2599
2599
|
className: "flex items-center justify-between p-3 border border-dashed border-gray-400 rounded-lg hover:bg-gray-50",
|
|
@@ -2602,7 +2602,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2602
2602
|
) : /* @__PURE__ */ n(
|
|
2603
2603
|
"div",
|
|
2604
2604
|
{
|
|
2605
|
-
onClick:
|
|
2605
|
+
onClick: o,
|
|
2606
2606
|
className: "flex items-center justify-between p-3 border border-gray-300 rounded-lg hover:bg-gray-50 hover:cursor-pointer transition-colors duration-150",
|
|
2607
2607
|
children: [
|
|
2608
2608
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
@@ -2635,10 +2635,10 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2635
2635
|
entity: t,
|
|
2636
2636
|
onManage: a,
|
|
2637
2637
|
onClose: s,
|
|
2638
|
-
existingShares:
|
|
2638
|
+
existingShares: o = { users: [], groups: [], roles: [] },
|
|
2639
2639
|
calledBy: l,
|
|
2640
2640
|
showExistingShares: m = !1,
|
|
2641
|
-
onFinalSubmit:
|
|
2641
|
+
onFinalSubmit: i = () => {
|
|
2642
2642
|
},
|
|
2643
2643
|
isChanged: u = !1
|
|
2644
2644
|
}) => {
|
|
@@ -2680,12 +2680,12 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2680
2680
|
permission: I.permission,
|
|
2681
2681
|
type: I.type.toLowerCase()
|
|
2682
2682
|
}));
|
|
2683
|
-
|
|
2683
|
+
i({
|
|
2684
2684
|
entity: t,
|
|
2685
2685
|
userGroupRolesObj: B,
|
|
2686
|
-
existingShares:
|
|
2686
|
+
existingShares: o
|
|
2687
2687
|
// Always send updated existing shares
|
|
2688
|
-
},
|
|
2688
|
+
}, o);
|
|
2689
2689
|
} else if (l === de.INTEREST) {
|
|
2690
2690
|
const B = S.pendingInvites.map((_) => ({
|
|
2691
2691
|
identity: _.id,
|
|
@@ -2696,20 +2696,20 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2696
2696
|
userName: _.name,
|
|
2697
2697
|
interestId: t?.data?.id
|
|
2698
2698
|
}));
|
|
2699
|
-
|
|
2699
|
+
i(B, o);
|
|
2700
2700
|
} else if (l === de.ARTICLE) {
|
|
2701
2701
|
const B = S.pendingInvites.map((I) => ({
|
|
2702
2702
|
id: I.id,
|
|
2703
2703
|
permission: I.permission,
|
|
2704
2704
|
type: I.type.toLowerCase()
|
|
2705
2705
|
}));
|
|
2706
|
-
|
|
2706
|
+
i({
|
|
2707
2707
|
entity: t,
|
|
2708
2708
|
userGroupRolesObj: B,
|
|
2709
|
-
existingShares:
|
|
2710
|
-
},
|
|
2709
|
+
existingShares: o
|
|
2710
|
+
}, o);
|
|
2711
2711
|
} else
|
|
2712
|
-
|
|
2712
|
+
i(S, o);
|
|
2713
2713
|
setTimeout(() => {
|
|
2714
2714
|
s();
|
|
2715
2715
|
}, 1e3);
|
|
@@ -2717,7 +2717,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2717
2717
|
throw console.error("Failed to submit invites:", B), B;
|
|
2718
2718
|
}
|
|
2719
2719
|
}, P = (S) => {
|
|
2720
|
-
const B =
|
|
2720
|
+
const B = o[g.code].find((_) => _.name === S.name && _.permission !== "remove") || b.find((_) => _.name === S.name);
|
|
2721
2721
|
return B ? `${B.permission}` : "";
|
|
2722
2722
|
}, F = () => {
|
|
2723
2723
|
switch (l) {
|
|
@@ -2753,9 +2753,9 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
2753
2753
|
(l === de.DRIVE || m) && /* @__PURE__ */ e(
|
|
2754
2754
|
es,
|
|
2755
2755
|
{
|
|
2756
|
-
users:
|
|
2757
|
-
groups:
|
|
2758
|
-
roles:
|
|
2756
|
+
users: o.users.filter((S) => S.permission !== "remove"),
|
|
2757
|
+
groups: o.groups.filter((S) => S.permission !== "remove"),
|
|
2758
|
+
roles: o.roles.filter((S) => S.permission !== "remove"),
|
|
2759
2759
|
onClick: a
|
|
2760
2760
|
}
|
|
2761
2761
|
),
|
|
@@ -3025,21 +3025,21 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3025
3025
|
] })
|
|
3026
3026
|
] }) })
|
|
3027
3027
|
] });
|
|
3028
|
-
},
|
|
3028
|
+
}, it = [
|
|
3029
3029
|
{ name: "Can view", icon: Zt, value: "view" },
|
|
3030
3030
|
{ name: "Can manage", icon: Kt, value: "edit" },
|
|
3031
|
-
{ name: "Remove", icon:
|
|
3031
|
+
{ name: "Remove", icon: or, isDestructive: !0, value: "remove" }
|
|
3032
3032
|
], rs = ({ item: t, allowedPermissions: a, onPermissionChange: s }) => {
|
|
3033
|
-
const [
|
|
3034
|
-
open:
|
|
3033
|
+
const [o, l] = L(!1), { refs: m, floatingStyles: i, context: u } = sa({
|
|
3034
|
+
open: o,
|
|
3035
3035
|
onOpenChange: l,
|
|
3036
|
-
middleware: [la(8),
|
|
3036
|
+
middleware: [la(8), oa(), ia({ padding: 8 })],
|
|
3037
3037
|
whileElementsMounted: ca,
|
|
3038
3038
|
placement: "bottom-end"
|
|
3039
3039
|
}), g = Zr(u), f = Kr(u), { getReferenceProps: x, getFloatingProps: r } = en([
|
|
3040
3040
|
g,
|
|
3041
3041
|
f
|
|
3042
|
-
]), N =
|
|
3042
|
+
]), N = it.find((p) => p.name === t.permission || p.value === t.permission) || it[0];
|
|
3043
3043
|
return (
|
|
3044
3044
|
// FIX: The <Listbox> component now wraps both the button and the portal.
|
|
3045
3045
|
// This provides the necessary context for both children.
|
|
@@ -3062,7 +3062,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3062
3062
|
ue,
|
|
3063
3063
|
{
|
|
3064
3064
|
as: Q,
|
|
3065
|
-
show:
|
|
3065
|
+
show: o,
|
|
3066
3066
|
enter: "transition ease-out duration-100",
|
|
3067
3067
|
enterFrom: "transform opacity-0 scale-95",
|
|
3068
3068
|
enterTo: "transform opacity-100 scale-100",
|
|
@@ -3073,11 +3073,11 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3073
3073
|
K.Options,
|
|
3074
3074
|
{
|
|
3075
3075
|
ref: m.setFloating,
|
|
3076
|
-
style:
|
|
3076
|
+
style: i,
|
|
3077
3077
|
...r(),
|
|
3078
3078
|
static: !0,
|
|
3079
3079
|
className: "z-50 w-48 bg-white shadow-lg rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm",
|
|
3080
|
-
children:
|
|
3080
|
+
children: it.filter((p) => a.includes(p.value)).map((p) => /* @__PURE__ */ e(
|
|
3081
3081
|
K.Option,
|
|
3082
3082
|
{
|
|
3083
3083
|
className: ({
|
|
@@ -3114,18 +3114,18 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3114
3114
|
//entire file or folder details
|
|
3115
3115
|
onBack: a,
|
|
3116
3116
|
onClose: s,
|
|
3117
|
-
onOpenMembers:
|
|
3117
|
+
onOpenMembers: o,
|
|
3118
3118
|
existingShares: l,
|
|
3119
3119
|
allowedPermissions: m
|
|
3120
3120
|
}) => {
|
|
3121
|
-
const [
|
|
3122
|
-
users:
|
|
3121
|
+
const [i, u] = L(l), [g, f] = L(0), [x, r] = L(""), N = kt(x, 300), d = {
|
|
3122
|
+
users: i.users.filter(
|
|
3123
3123
|
(R) => R.name.toLowerCase().includes(N.toLowerCase())
|
|
3124
3124
|
),
|
|
3125
|
-
groups:
|
|
3125
|
+
groups: i.groups.filter(
|
|
3126
3126
|
(R) => R.name.toLowerCase().includes(N.toLowerCase())
|
|
3127
3127
|
),
|
|
3128
|
-
roles:
|
|
3128
|
+
roles: i.roles.filter(
|
|
3129
3129
|
(R) => R.name.toLowerCase().includes(N.toLowerCase())
|
|
3130
3130
|
)
|
|
3131
3131
|
}, p = async (R, O, V, U) => {
|
|
@@ -3138,9 +3138,9 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3138
3138
|
}));
|
|
3139
3139
|
}, $ = () => {
|
|
3140
3140
|
const R = {
|
|
3141
|
-
users:
|
|
3142
|
-
groups:
|
|
3143
|
-
roles:
|
|
3141
|
+
users: i.users.filter((O) => O.permission !== "remove"),
|
|
3142
|
+
groups: i.groups.filter((O) => O.permission !== "remove"),
|
|
3143
|
+
roles: i.roles.filter((O) => O.permission !== "remove")
|
|
3144
3144
|
};
|
|
3145
3145
|
a(R);
|
|
3146
3146
|
}, A = ["users", "groups", "roles"], E = ["Users", "Groups", "Roles"];
|
|
@@ -3151,7 +3151,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3151
3151
|
/* @__PURE__ */ n(
|
|
3152
3152
|
"button",
|
|
3153
3153
|
{
|
|
3154
|
-
onClick: () => a(
|
|
3154
|
+
onClick: () => a(i),
|
|
3155
3155
|
className: "flex items-center gap-1 text-sm font-medium text-gray-600 hover:text-gray-900 hover:cursor-pointer p-2 rounded-md hover:bg-gray-100",
|
|
3156
3156
|
children: [
|
|
3157
3157
|
/* @__PURE__ */ e(ea, { className: "h-5 w-5" }),
|
|
@@ -3231,7 +3231,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3231
3231
|
R !== "users" && /* @__PURE__ */ e(
|
|
3232
3232
|
"button",
|
|
3233
3233
|
{
|
|
3234
|
-
onClick: () =>
|
|
3234
|
+
onClick: () => o({
|
|
3235
3235
|
id: O.id,
|
|
3236
3236
|
type: R,
|
|
3237
3237
|
name: O.name
|
|
@@ -3306,9 +3306,9 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3306
3306
|
// { id, name, type: "group" | "role" }
|
|
3307
3307
|
onBack: a,
|
|
3308
3308
|
onClose: s,
|
|
3309
|
-
members:
|
|
3309
|
+
members: o
|
|
3310
3310
|
}) => {
|
|
3311
|
-
const [l, m] = L(!0), [
|
|
3311
|
+
const [l, m] = L(!0), [i, u] = L(""), g = kt(i, 300), f = o.filter(
|
|
3312
3312
|
(d) => d.name.toLowerCase().includes(g.toLowerCase())
|
|
3313
3313
|
), x = {
|
|
3314
3314
|
hidden: { opacity: 0 },
|
|
@@ -3332,7 +3332,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3332
3332
|
animate: { opacity: 1, scale: 1 },
|
|
3333
3333
|
className: "flex flex-col items-center justify-center text-center p-8 mt-10",
|
|
3334
3334
|
children: [
|
|
3335
|
-
/* @__PURE__ */ e(
|
|
3335
|
+
/* @__PURE__ */ e(ir, { className: "h-12 w-12 text-gray-400" }),
|
|
3336
3336
|
/* @__PURE__ */ e("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: "No Users Found" }),
|
|
3337
3337
|
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: g ? `No one found matching "${g}"` : `There are no users in this ${t.type}.` })
|
|
3338
3338
|
]
|
|
@@ -3402,7 +3402,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3402
3402
|
he,
|
|
3403
3403
|
{
|
|
3404
3404
|
onDebouncedChange: u,
|
|
3405
|
-
value:
|
|
3405
|
+
value: i,
|
|
3406
3406
|
placeholder: "Search members..."
|
|
3407
3407
|
}
|
|
3408
3408
|
) }),
|
|
@@ -3412,7 +3412,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3412
3412
|
INVITE: "invite",
|
|
3413
3413
|
MANAGE: "manage",
|
|
3414
3414
|
MEMBERS: "members"
|
|
3415
|
-
},
|
|
3415
|
+
}, os = ({
|
|
3416
3416
|
existingShares: t = {
|
|
3417
3417
|
users: [],
|
|
3418
3418
|
groups: [],
|
|
@@ -3421,11 +3421,11 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3421
3421
|
isOpen: a,
|
|
3422
3422
|
onFinalSubmit: s = () => {
|
|
3423
3423
|
},
|
|
3424
|
-
mainEntity:
|
|
3424
|
+
mainEntity: o,
|
|
3425
3425
|
calledBy: l,
|
|
3426
3426
|
onClose: m = () => {
|
|
3427
3427
|
},
|
|
3428
|
-
showExistingShares:
|
|
3428
|
+
showExistingShares: i = !0,
|
|
3429
3429
|
allowedPermissions: u = [],
|
|
3430
3430
|
...g
|
|
3431
3431
|
}) => {
|
|
@@ -3445,9 +3445,9 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3445
3445
|
p({ id: w, type: k, name: T }), V(f), x(pe.MEMBERS);
|
|
3446
3446
|
}, C = (w) => {
|
|
3447
3447
|
console.log("changedExistingShares", w), N(w);
|
|
3448
|
-
const T =
|
|
3448
|
+
const T = ot.mapValues(t, (b) => b.map((y) => ({ id: y.id, permission: y.permission })).sort((y, D) => y.id - D.id)), k = ot.mapValues(w, (b) => b.map((y) => ({ id: y.id, permission: y.permission })).sort((y, D) => y.id - D.id));
|
|
3449
3449
|
console.log("Existing data:", T), console.log("Changed data:", k);
|
|
3450
|
-
const v = !
|
|
3450
|
+
const v = !ot.isEqual(T, k);
|
|
3451
3451
|
console.log("hasPermissionChanged:", v), A(v), x(f === pe.MEMBERS ? O : pe.INVITE);
|
|
3452
3452
|
};
|
|
3453
3453
|
return /* @__PURE__ */ e(ue, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(be, { as: "div", className: "relative z-50", onClose: U, children: [
|
|
@@ -3466,7 +3466,7 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3466
3466
|
children: /* @__PURE__ */ e(
|
|
3467
3467
|
ns,
|
|
3468
3468
|
{
|
|
3469
|
-
entity:
|
|
3469
|
+
entity: o,
|
|
3470
3470
|
onBack: C,
|
|
3471
3471
|
onClose: U,
|
|
3472
3472
|
onOpenMembers: G,
|
|
@@ -3513,12 +3513,12 @@ const Ee = Hn(), Ve = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Qn =
|
|
|
3513
3513
|
children: /* @__PURE__ */ e(
|
|
3514
3514
|
as,
|
|
3515
3515
|
{
|
|
3516
|
-
entity:
|
|
3516
|
+
entity: o,
|
|
3517
3517
|
onManage: Y,
|
|
3518
3518
|
onClose: U,
|
|
3519
3519
|
existingShares: r,
|
|
3520
3520
|
calledBy: l,
|
|
3521
|
-
showExistingShares:
|
|
3521
|
+
showExistingShares: i,
|
|
3522
3522
|
onFinalSubmit: (w) => {
|
|
3523
3523
|
s(w, r);
|
|
3524
3524
|
},
|
|
@@ -3539,12 +3539,12 @@ function at({
|
|
|
3539
3539
|
label: t,
|
|
3540
3540
|
options: a = [],
|
|
3541
3541
|
selected: s = [],
|
|
3542
|
-
onChange:
|
|
3542
|
+
onChange: o = () => {
|
|
3543
3543
|
},
|
|
3544
3544
|
onBlur: l = () => {
|
|
3545
3545
|
},
|
|
3546
3546
|
placeholder: m = "Select options",
|
|
3547
|
-
error:
|
|
3547
|
+
error: i = null,
|
|
3548
3548
|
displayLimit: u = 3,
|
|
3549
3549
|
selectionLimit: g = -1,
|
|
3550
3550
|
// NEW: search behavior
|
|
@@ -3592,7 +3592,7 @@ function at({
|
|
|
3592
3592
|
};
|
|
3593
3593
|
return /* @__PURE__ */ e(K, { value: U, onChange: (w) => {
|
|
3594
3594
|
const T = Array.from(new Set(w.map((k) => d(k))));
|
|
3595
|
-
g !== -1 && T.length > g ||
|
|
3595
|
+
g !== -1 && T.length > g || o(T);
|
|
3596
3596
|
}, multiple: !0, by: "id", children: ({ open: w }) => /* @__PURE__ */ n("div", { children: [
|
|
3597
3597
|
/* @__PURE__ */ e(
|
|
3598
3598
|
K.Label,
|
|
@@ -3607,12 +3607,12 @@ function at({
|
|
|
3607
3607
|
K.Button,
|
|
3608
3608
|
{
|
|
3609
3609
|
"aria-labelledby": $,
|
|
3610
|
-
"aria-invalid": !!
|
|
3611
|
-
"aria-describedby":
|
|
3610
|
+
"aria-invalid": !!i,
|
|
3611
|
+
"aria-describedby": i ? A : void 0,
|
|
3612
3612
|
onBlur: l,
|
|
3613
3613
|
className: Ge(
|
|
3614
3614
|
"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",
|
|
3615
|
-
|
|
3615
|
+
i ? "ring-red-500" : "ring-gray-300"
|
|
3616
3616
|
),
|
|
3617
3617
|
children: [
|
|
3618
3618
|
/* @__PURE__ */ e("span", { className: "block truncate", children: C() }),
|
|
@@ -3678,7 +3678,7 @@ function at({
|
|
|
3678
3678
|
] })
|
|
3679
3679
|
}
|
|
3680
3680
|
),
|
|
3681
|
-
|
|
3681
|
+
i && /* @__PURE__ */ e("p", { id: A, className: "mt-1 text-sm text-red-600", children: i })
|
|
3682
3682
|
] })
|
|
3683
3683
|
] }) });
|
|
3684
3684
|
}
|
|
@@ -3728,10 +3728,10 @@ const Wl = ({
|
|
|
3728
3728
|
isOpen: t = !1,
|
|
3729
3729
|
setIsOpen: a,
|
|
3730
3730
|
content: s,
|
|
3731
|
-
header:
|
|
3731
|
+
header: o = { title: "", customHeader: null, isCrossShow: !0 },
|
|
3732
3732
|
footer: l = { show: !0, customFooter: null },
|
|
3733
3733
|
primaryAction: m = { onSubmit: null, label: "Save", loader: !1, disabled: !1 },
|
|
3734
|
-
secondaryAction:
|
|
3734
|
+
secondaryAction: i = { onCancel: null, label: "Cancel" },
|
|
3735
3735
|
dialogPanelClass: u = ""
|
|
3736
3736
|
}) => {
|
|
3737
3737
|
const g = (x) => {
|
|
@@ -3760,9 +3760,9 @@ const Wl = ({
|
|
|
3760
3760
|
onClick: f,
|
|
3761
3761
|
children: [
|
|
3762
3762
|
/* @__PURE__ */ n("div", { className: "flex justify-between items-center border-b border-gray-200 p-6 flex-shrink-0", children: [
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3763
|
+
o?.customHeader && o.customHeader,
|
|
3764
|
+
o?.title && !o?.customHeader && /* @__PURE__ */ e(et, { className: "text-lg font-bold", children: o?.title }),
|
|
3765
|
+
o?.isCrossShow && /* @__PURE__ */ e("button", { onClick: () => a(!1), className: "p-2", children: /* @__PURE__ */ e(ye, { className: "w-5 h-5" }) })
|
|
3766
3766
|
] }),
|
|
3767
3767
|
/* @__PURE__ */ e(
|
|
3768
3768
|
"div",
|
|
@@ -3773,15 +3773,15 @@ const Wl = ({
|
|
|
3773
3773
|
}
|
|
3774
3774
|
),
|
|
3775
3775
|
l?.show && !l?.customFooter && /* @__PURE__ */ n("div", { className: "border-t flex justify-end border-gray-200 p-6 flex-shrink-0", children: [
|
|
3776
|
-
|
|
3776
|
+
i?.onCancel && /* @__PURE__ */ e(
|
|
3777
3777
|
ee,
|
|
3778
3778
|
{
|
|
3779
3779
|
"data-testid": "cancel-button",
|
|
3780
|
-
label:
|
|
3780
|
+
label: i?.label,
|
|
3781
3781
|
loader: !1,
|
|
3782
3782
|
ariaLabel: "Cancel Button",
|
|
3783
3783
|
className: "p-3 mr-3 secondaryButton !w-[70px]",
|
|
3784
|
-
onClick: () =>
|
|
3784
|
+
onClick: () => i?.onCancel(),
|
|
3785
3785
|
category: "secondary"
|
|
3786
3786
|
}
|
|
3787
3787
|
),
|
|
@@ -3807,7 +3807,7 @@ const Wl = ({
|
|
|
3807
3807
|
}
|
|
3808
3808
|
);
|
|
3809
3809
|
};
|
|
3810
|
-
function
|
|
3810
|
+
function is({ listeners: t = {}, attributes: a = {} }) {
|
|
3811
3811
|
return /* @__PURE__ */ e(
|
|
3812
3812
|
"button",
|
|
3813
3813
|
{
|
|
@@ -3825,10 +3825,10 @@ function cs({
|
|
|
3825
3825
|
node: t,
|
|
3826
3826
|
depth: a,
|
|
3827
3827
|
expanded: s,
|
|
3828
|
-
onToggle:
|
|
3828
|
+
onToggle: o,
|
|
3829
3829
|
onSelect: l,
|
|
3830
3830
|
onCreateChild: m,
|
|
3831
|
-
onRename:
|
|
3831
|
+
onRename: i,
|
|
3832
3832
|
onDelete: u,
|
|
3833
3833
|
renderActions: g,
|
|
3834
3834
|
// optional override
|
|
@@ -3838,7 +3838,7 @@ function cs({
|
|
|
3838
3838
|
}) {
|
|
3839
3839
|
const { setNodeRef: N, isOver: d } = cr({ id: x }), { attributes: p, listeners: $, setNodeRef: A, transform: E, isDragging: R } = dr({ id: f }), O = E ? { transform: `translate3d(${Math.round(E.x)}px, ${Math.round(E.y)}px, 0)` } : void 0, [V, U] = L(!1), [Y, G] = L(t.name), C = () => {
|
|
3840
3840
|
const w = Y.trim();
|
|
3841
|
-
U(!1), w && w !== t.name ?
|
|
3841
|
+
U(!1), w && w !== t.name ? i?.(t, w) : G(t.name);
|
|
3842
3842
|
}, h = me(() => /* @__PURE__ */ e(
|
|
3843
3843
|
_n,
|
|
3844
3844
|
{
|
|
@@ -3862,7 +3862,7 @@ function cs({
|
|
|
3862
3862
|
w.target.closest(".tv-toggle") || w.target.tagName === "INPUT" || l?.(t);
|
|
3863
3863
|
},
|
|
3864
3864
|
children: [
|
|
3865
|
-
/* @__PURE__ */ e("button", { className: "tv-toggle", onClick:
|
|
3865
|
+
/* @__PURE__ */ e("button", { className: "tv-toggle", onClick: o, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(vt, { size: 16 }) : /* @__PURE__ */ e(fe, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
|
|
3866
3866
|
/* @__PURE__ */ e(Le, { size: 16, className: "tv-folder-ic" }),
|
|
3867
3867
|
/* @__PURE__ */ e("div", { className: "tv-name", ref: A, children: V ? /* @__PURE__ */ e(
|
|
3868
3868
|
"input",
|
|
@@ -3877,7 +3877,7 @@ function cs({
|
|
|
3877
3877
|
autoFocus: !0
|
|
3878
3878
|
}
|
|
3879
3879
|
) : /* @__PURE__ */ e("span", { onDoubleClick: () => U(!0), children: t.name }) }),
|
|
3880
|
-
/* @__PURE__ */ e(
|
|
3880
|
+
/* @__PURE__ */ e(is, { listeners: $, attributes: p }),
|
|
3881
3881
|
/* @__PURE__ */ e("div", { className: "tv-actions", children: g ? g(t, {
|
|
3882
3882
|
onCreateChild: () => m?.(t),
|
|
3883
3883
|
onRename: () => U(!0),
|
|
@@ -3888,7 +3888,7 @@ function cs({
|
|
|
3888
3888
|
);
|
|
3889
3889
|
}
|
|
3890
3890
|
const ds = (t) => String(t.id ?? t._id), ms = (t) => t.parent !== void 0 ? String(t.parent) : t.parentId != null ? String(t.parentId) : "root", us = (t) => t.name ?? t.label ?? "", hs = (t) => Array.isArray(t) && t.some((a) => Array.isArray(a.children));
|
|
3891
|
-
function ps(t, { rootId: a, getId: s, getParent:
|
|
3891
|
+
function ps(t, { rootId: a, getId: s, getParent: o, getName: l }) {
|
|
3892
3892
|
const m = /* @__PURE__ */ new Map();
|
|
3893
3893
|
t.forEach((u) => {
|
|
3894
3894
|
const g = s(u);
|
|
@@ -3896,23 +3896,23 @@ function ps(t, { rootId: a, getId: s, getParent: i, getName: l }) {
|
|
|
3896
3896
|
...u,
|
|
3897
3897
|
id: g,
|
|
3898
3898
|
name: l(u),
|
|
3899
|
-
parentId:
|
|
3899
|
+
parentId: o(u) || a,
|
|
3900
3900
|
children: []
|
|
3901
3901
|
});
|
|
3902
3902
|
});
|
|
3903
|
-
const
|
|
3903
|
+
const i = [];
|
|
3904
3904
|
return m.forEach((u) => {
|
|
3905
3905
|
const g = u.parentId || a;
|
|
3906
|
-
g !== a && m.has(g) ? m.get(g).children.push(u) :
|
|
3907
|
-
}), { roots:
|
|
3906
|
+
g !== a && m.has(g) ? m.get(g).children.push(u) : i.push(u);
|
|
3907
|
+
}), { roots: i, byId: m };
|
|
3908
3908
|
}
|
|
3909
|
-
function gs(t, { rootId: a, getId: s, getName:
|
|
3909
|
+
function gs(t, { rootId: a, getId: s, getName: o }) {
|
|
3910
3910
|
const l = /* @__PURE__ */ new Map();
|
|
3911
3911
|
function m(u, g) {
|
|
3912
3912
|
const f = s(u), x = {
|
|
3913
3913
|
...u,
|
|
3914
3914
|
id: f,
|
|
3915
|
-
name:
|
|
3915
|
+
name: o(u),
|
|
3916
3916
|
parentId: g || a,
|
|
3917
3917
|
children: (u.children || []).map((r) => m(r, f))
|
|
3918
3918
|
};
|
|
@@ -3923,38 +3923,38 @@ function gs(t, { rootId: a, getId: s, getName: i }) {
|
|
|
3923
3923
|
const Me = (t) => t.map((a) => ({ ...a, children: Me(a.children || []) }));
|
|
3924
3924
|
function bs(t, a) {
|
|
3925
3925
|
let s = null;
|
|
3926
|
-
function
|
|
3927
|
-
return m.map((
|
|
3928
|
-
if (
|
|
3929
|
-
return s =
|
|
3930
|
-
if (
|
|
3931
|
-
const u = i
|
|
3932
|
-
if (u !==
|
|
3926
|
+
function o(m) {
|
|
3927
|
+
return m.map((i) => {
|
|
3928
|
+
if (i.id === a)
|
|
3929
|
+
return s = i, null;
|
|
3930
|
+
if (i.children?.length) {
|
|
3931
|
+
const u = o(i.children);
|
|
3932
|
+
if (u !== i.children) return { ...i, children: u };
|
|
3933
3933
|
}
|
|
3934
|
-
return
|
|
3934
|
+
return i;
|
|
3935
3935
|
}).filter(Boolean);
|
|
3936
3936
|
}
|
|
3937
|
-
return { newRoots:
|
|
3937
|
+
return { newRoots: o(t), removed: s };
|
|
3938
3938
|
}
|
|
3939
3939
|
function fs(t, a, s) {
|
|
3940
|
-
function
|
|
3940
|
+
function o(l) {
|
|
3941
3941
|
return l.map((m) => {
|
|
3942
3942
|
if (m.id === a)
|
|
3943
3943
|
return { ...m, children: [...m.children || [], { ...s, parentId: a }] };
|
|
3944
3944
|
if (m.children?.length) {
|
|
3945
|
-
const
|
|
3946
|
-
if (
|
|
3945
|
+
const i = o(m.children);
|
|
3946
|
+
if (i !== m.children) return { ...m, children: i };
|
|
3947
3947
|
}
|
|
3948
3948
|
return m;
|
|
3949
3949
|
});
|
|
3950
3950
|
}
|
|
3951
|
-
return
|
|
3951
|
+
return o(t);
|
|
3952
3952
|
}
|
|
3953
3953
|
function Sa(t, a, s = null) {
|
|
3954
|
-
for (const
|
|
3955
|
-
if (
|
|
3956
|
-
if (
|
|
3957
|
-
const l = Sa(
|
|
3954
|
+
for (const o of t) {
|
|
3955
|
+
if (o.id === a) return { node: o, parentId: s };
|
|
3956
|
+
if (o.children?.length) {
|
|
3957
|
+
const l = Sa(o.children, a, o.id);
|
|
3958
3958
|
if (l) return l;
|
|
3959
3959
|
}
|
|
3960
3960
|
}
|
|
@@ -3964,10 +3964,10 @@ function Jl({
|
|
|
3964
3964
|
data: t = [],
|
|
3965
3965
|
rootId: a = "root",
|
|
3966
3966
|
title: s = "Folders",
|
|
3967
|
-
getId:
|
|
3967
|
+
getId: o = ds,
|
|
3968
3968
|
getParent: l = ms,
|
|
3969
3969
|
getName: m = us,
|
|
3970
|
-
onSelect:
|
|
3970
|
+
onSelect: i,
|
|
3971
3971
|
onCreateRoot: u,
|
|
3972
3972
|
onCreateChild: g,
|
|
3973
3973
|
onRename: f,
|
|
@@ -3978,10 +3978,10 @@ function Jl({
|
|
|
3978
3978
|
// ← allow root moves by default now
|
|
3979
3979
|
indentUnit: p = 24
|
|
3980
3980
|
}) {
|
|
3981
|
-
const { roots: $ } = me(() => hs(t) ? gs(t, { rootId: a, getId:
|
|
3981
|
+
const { roots: $ } = me(() => hs(t) ? gs(t, { rootId: a, getId: o, getName: m }) : ps(
|
|
3982
3982
|
t.map((y) => ({ ...y })),
|
|
3983
|
-
{ rootId: a, getId:
|
|
3984
|
-
), [t, a,
|
|
3983
|
+
{ rootId: a, getId: o, getParent: l, getName: m }
|
|
3984
|
+
), [t, a, o, l, m]), [A, E] = L({}), R = ae((y) => {
|
|
3985
3985
|
const D = {};
|
|
3986
3986
|
return (function M(z) {
|
|
3987
3987
|
z.forEach((P) => {
|
|
@@ -4041,7 +4041,7 @@ function Jl({
|
|
|
4041
4041
|
depth: D,
|
|
4042
4042
|
expanded: !!A[M.id],
|
|
4043
4043
|
onToggle: () => O(M.id),
|
|
4044
|
-
onSelect:
|
|
4044
|
+
onSelect: i,
|
|
4045
4045
|
onCreateChild: g,
|
|
4046
4046
|
onRename: f,
|
|
4047
4047
|
onDelete: x,
|
|
@@ -4053,7 +4053,7 @@ function Jl({
|
|
|
4053
4053
|
),
|
|
4054
4054
|
A[M.id] && M.children?.length > 0 ? b(M.children, D + 1) : null
|
|
4055
4055
|
] }, M.id)),
|
|
4056
|
-
[A, p, g, x, f,
|
|
4056
|
+
[A, p, g, x, f, i, N, O]
|
|
4057
4057
|
);
|
|
4058
4058
|
return se.useMemo(() => {
|
|
4059
4059
|
if (!C) return null;
|
|
@@ -4098,10 +4098,10 @@ const Xl = ({
|
|
|
4098
4098
|
tabs: t = [],
|
|
4099
4099
|
keepMounted: a = !0,
|
|
4100
4100
|
orientation: s = "horizontal",
|
|
4101
|
-
containerClassName:
|
|
4101
|
+
containerClassName: o = "",
|
|
4102
4102
|
listClassName: l = "",
|
|
4103
4103
|
panelClassName: m = "",
|
|
4104
|
-
tabClassName:
|
|
4104
|
+
tabClassName: i,
|
|
4105
4105
|
...u
|
|
4106
4106
|
// Pass remaining props to Tab.Group
|
|
4107
4107
|
}) => {
|
|
@@ -4111,8 +4111,8 @@ const Xl = ({
|
|
|
4111
4111
|
), x = (N) => we(
|
|
4112
4112
|
"text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
|
|
4113
4113
|
N ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
|
|
4114
|
-
), r = ({ selected: N }) =>
|
|
4115
|
-
return /* @__PURE__ */ e(ne.Group, { vertical: g, ...u, children: g ? /* @__PURE__ */ n("div", { className: we("flex gap-4",
|
|
4114
|
+
), r = ({ selected: N }) => i ? typeof i == "function" ? i(N) : i : g ? x(N) : f(N);
|
|
4115
|
+
return /* @__PURE__ */ e(ne.Group, { vertical: g, ...u, children: g ? /* @__PURE__ */ n("div", { className: we("flex gap-4", o), children: [
|
|
4116
4116
|
/* @__PURE__ */ e(ne.List, { className: we("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((N) => /* @__PURE__ */ e(ne, { className: r, children: N.label }, N.key)) }),
|
|
4117
4117
|
/* @__PURE__ */ e(ne.Panels, { unmount: !a, className: we("flex-1", m), children: t.map((N) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: N.content }) }, N.key)) })
|
|
4118
4118
|
] }) : (
|
|
@@ -4127,9 +4127,9 @@ function Hl(t, a = "YYYY-MM-DD HH:mm:ss") {
|
|
|
4127
4127
|
return t ? (t.endsWith("Z") || /[+\-]\d{2}:?\d{2}$/.test(t) ? zt.parseZone(t) : zt.utc(t)).local().format(a) : null;
|
|
4128
4128
|
}
|
|
4129
4129
|
c.string;
|
|
4130
|
-
function ys({ item: t, data: a, updateHandler: s, validationErrors:
|
|
4130
|
+
function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
4131
4131
|
console.log(t);
|
|
4132
|
-
const [l, m] = se.useState(t), [
|
|
4132
|
+
const [l, m] = se.useState(t), [i, u] = se.useState(() => {
|
|
4133
4133
|
const r = a && a[t.key] || {};
|
|
4134
4134
|
return console.log("Initial Section data for", t.key, r), r;
|
|
4135
4135
|
}), g = ge(a);
|
|
@@ -4139,14 +4139,14 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4139
4139
|
const r = a && a[t.key] || {};
|
|
4140
4140
|
console.log("Updated Section data for", t.key, r), u(r);
|
|
4141
4141
|
}
|
|
4142
|
-
}, [a, t.key]), console.log("Section data",
|
|
4143
|
-
const f = ge(
|
|
4142
|
+
}, [a, t.key]), console.log("Section data", i);
|
|
4143
|
+
const f = ge(i);
|
|
4144
4144
|
Z(() => {
|
|
4145
|
-
f.current !==
|
|
4146
|
-
}, [l.key,
|
|
4145
|
+
f.current !== i && s && typeof s == "function" && (f.current = i, s(l.key, i));
|
|
4146
|
+
}, [l.key, i, s]);
|
|
4147
4147
|
const x = (r) => {
|
|
4148
4148
|
if (!r.dependsOn) return !0;
|
|
4149
|
-
const { field: N, value: d, operator: p = "equals" } = r.dependsOn, $ =
|
|
4149
|
+
const { field: N, value: d, operator: p = "equals" } = r.dependsOn, $ = i[N];
|
|
4150
4150
|
switch (p) {
|
|
4151
4151
|
case "equals":
|
|
4152
4152
|
return $ === d;
|
|
@@ -4205,17 +4205,17 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4205
4205
|
name: r.key,
|
|
4206
4206
|
defaultValue: r.default,
|
|
4207
4207
|
placeholder: r.placeholder,
|
|
4208
|
-
value:
|
|
4208
|
+
value: i[r.key] || "",
|
|
4209
4209
|
onChange: (d) => {
|
|
4210
|
-
const p = { ...
|
|
4210
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4211
4211
|
u(p), s && s(l.key, p);
|
|
4212
4212
|
},
|
|
4213
4213
|
required: r.required,
|
|
4214
4214
|
disabled: r.disabled ? r.disabled : !1,
|
|
4215
|
-
className: `w-full ${
|
|
4215
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4216
4216
|
}
|
|
4217
4217
|
),
|
|
4218
|
-
|
|
4218
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4219
4219
|
] }),
|
|
4220
4220
|
r.fieldtype === "textarea" && /* @__PURE__ */ n("div", { children: [
|
|
4221
4221
|
/* @__PURE__ */ e(
|
|
@@ -4224,18 +4224,18 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4224
4224
|
name: r.key,
|
|
4225
4225
|
defaultValue: r.default,
|
|
4226
4226
|
placeholder: r.placeholder,
|
|
4227
|
-
value:
|
|
4227
|
+
value: i[r.key] || "",
|
|
4228
4228
|
onChange: (d) => {
|
|
4229
|
-
const p = { ...
|
|
4229
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4230
4230
|
u(p), s && s(l.key, p);
|
|
4231
4231
|
},
|
|
4232
4232
|
rows: 3,
|
|
4233
4233
|
required: r.required,
|
|
4234
4234
|
disabled: r.disabled ? r.disabled : !1,
|
|
4235
|
-
className: `w-full ${
|
|
4235
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4236
4236
|
}
|
|
4237
4237
|
),
|
|
4238
|
-
|
|
4238
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4239
4239
|
] }),
|
|
4240
4240
|
r.fieldtype === "number" && /* @__PURE__ */ n("div", { children: [
|
|
4241
4241
|
/* @__PURE__ */ e(
|
|
@@ -4245,12 +4245,12 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4245
4245
|
name: r.key,
|
|
4246
4246
|
defaultValue: r.default,
|
|
4247
4247
|
placeholder: r.placeholder,
|
|
4248
|
-
value:
|
|
4248
|
+
value: i[r.key] || "",
|
|
4249
4249
|
min: r.min,
|
|
4250
4250
|
max: r.max,
|
|
4251
4251
|
step: r.step,
|
|
4252
4252
|
onChange: (d) => {
|
|
4253
|
-
const p = d.target.value, $ = { ...
|
|
4253
|
+
const p = d.target.value, $ = { ...i, [r.key]: p };
|
|
4254
4254
|
u($), s && s(l.key, $);
|
|
4255
4255
|
},
|
|
4256
4256
|
onBlur: (d) => {
|
|
@@ -4262,7 +4262,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4262
4262
|
},
|
|
4263
4263
|
required: r.required,
|
|
4264
4264
|
disabled: r.disabled ? r.disabled : !1,
|
|
4265
|
-
className: `w-full ${
|
|
4265
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4266
4266
|
}
|
|
4267
4267
|
),
|
|
4268
4268
|
r.min !== void 0 && /* @__PURE__ */ n("div", { style: { color: "#6b7280", fontSize: "11px", marginTop: "2px" }, children: [
|
|
@@ -4273,16 +4273,16 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4273
4273
|
"Maximum value: ",
|
|
4274
4274
|
r.max
|
|
4275
4275
|
] }),
|
|
4276
|
-
|
|
4276
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4277
4277
|
] }),
|
|
4278
4278
|
r.fieldtype === "checkbox" && /* @__PURE__ */ n("div", { children: [
|
|
4279
4279
|
/* @__PURE__ */ e(
|
|
4280
4280
|
da,
|
|
4281
4281
|
{
|
|
4282
4282
|
name: r.key,
|
|
4283
|
-
checked: !!(
|
|
4283
|
+
checked: !!(i[r.key] || r.default),
|
|
4284
4284
|
onChange: (d) => {
|
|
4285
|
-
const p = { ...
|
|
4285
|
+
const p = { ...i, [r.key]: d };
|
|
4286
4286
|
u(p), s && s(l.key, p);
|
|
4287
4287
|
},
|
|
4288
4288
|
label: r.placeholder || r.label,
|
|
@@ -4290,7 +4290,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4290
4290
|
className: "w-full"
|
|
4291
4291
|
}
|
|
4292
4292
|
),
|
|
4293
|
-
|
|
4293
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4294
4294
|
] }),
|
|
4295
4295
|
r.fieldtype === "select" && /* @__PURE__ */ n("div", { children: [
|
|
4296
4296
|
/* @__PURE__ */ e(
|
|
@@ -4298,19 +4298,19 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4298
4298
|
{
|
|
4299
4299
|
name: r.key,
|
|
4300
4300
|
defaultValue: r.default,
|
|
4301
|
-
value:
|
|
4301
|
+
value: i[r.key] || "",
|
|
4302
4302
|
onChange: (d) => {
|
|
4303
|
-
const p = { ...
|
|
4303
|
+
const p = { ...i, [r.key]: d };
|
|
4304
4304
|
u(p);
|
|
4305
4305
|
},
|
|
4306
4306
|
options: r.options || [],
|
|
4307
4307
|
placeholder: r.placeholder || `Select ${r.label}`,
|
|
4308
4308
|
required: r.required,
|
|
4309
4309
|
disabled: r.disabled ? r.disabled : !1,
|
|
4310
|
-
className: `w-full ${
|
|
4310
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4311
4311
|
}
|
|
4312
4312
|
),
|
|
4313
|
-
|
|
4313
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4314
4314
|
] }),
|
|
4315
4315
|
r.fieldtype === "email" && /* @__PURE__ */ n("div", { children: [
|
|
4316
4316
|
/* @__PURE__ */ e(
|
|
@@ -4320,17 +4320,17 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4320
4320
|
name: r.key,
|
|
4321
4321
|
defaultValue: r.default,
|
|
4322
4322
|
placeholder: r.placeholder || "Enter email address",
|
|
4323
|
-
value:
|
|
4323
|
+
value: i[r.key] || "",
|
|
4324
4324
|
onChange: (d) => {
|
|
4325
|
-
const p = { ...
|
|
4325
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4326
4326
|
u(p), s && s(l.key, p);
|
|
4327
4327
|
},
|
|
4328
4328
|
required: r.required,
|
|
4329
4329
|
disabled: r.disabled ? r.disabled : !1,
|
|
4330
|
-
className: `w-full ${
|
|
4330
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4331
4331
|
}
|
|
4332
4332
|
),
|
|
4333
|
-
|
|
4333
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4334
4334
|
] }),
|
|
4335
4335
|
r.fieldtype === "url" && /* @__PURE__ */ n("div", { children: [
|
|
4336
4336
|
/* @__PURE__ */ e(
|
|
@@ -4340,17 +4340,17 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4340
4340
|
name: r.key,
|
|
4341
4341
|
defaultValue: r.default,
|
|
4342
4342
|
placeholder: r.placeholder || "Enter URL",
|
|
4343
|
-
value:
|
|
4343
|
+
value: i[r.key] || "",
|
|
4344
4344
|
onChange: (d) => {
|
|
4345
|
-
const p = { ...
|
|
4345
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4346
4346
|
u(p), s && s(l.key, p);
|
|
4347
4347
|
},
|
|
4348
4348
|
required: r.required,
|
|
4349
4349
|
disabled: r.disabled ? r.disabled : !1,
|
|
4350
|
-
className: `w-full ${
|
|
4350
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4351
4351
|
}
|
|
4352
4352
|
),
|
|
4353
|
-
|
|
4353
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4354
4354
|
] }),
|
|
4355
4355
|
r.fieldtype === "password" && /* @__PURE__ */ n("div", { children: [
|
|
4356
4356
|
/* @__PURE__ */ e(
|
|
@@ -4360,62 +4360,62 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4360
4360
|
name: r.key,
|
|
4361
4361
|
defaultValue: r.default,
|
|
4362
4362
|
placeholder: r.placeholder || "Enter password",
|
|
4363
|
-
value:
|
|
4363
|
+
value: i[r.key] || "",
|
|
4364
4364
|
onChange: (d) => {
|
|
4365
|
-
const p = { ...
|
|
4365
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4366
4366
|
u(p), s && s(l.key, p);
|
|
4367
4367
|
},
|
|
4368
4368
|
required: r.required,
|
|
4369
4369
|
disabled: r.disabled ? r.disabled : !1,
|
|
4370
|
-
className: `w-full ${
|
|
4370
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4371
4371
|
}
|
|
4372
4372
|
),
|
|
4373
|
-
|
|
4373
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4374
4374
|
] }),
|
|
4375
4375
|
r.fieldtype === "multiselect" && /* @__PURE__ */ n("div", { children: [
|
|
4376
4376
|
/* @__PURE__ */ e(
|
|
4377
4377
|
at,
|
|
4378
4378
|
{
|
|
4379
|
-
selectedItems:
|
|
4379
|
+
selectedItems: i[r.key] || [],
|
|
4380
4380
|
onSelectionChange: (d) => {
|
|
4381
|
-
const p = { ...
|
|
4381
|
+
const p = { ...i, [r.key]: d };
|
|
4382
4382
|
u(p), s && s(l.key, p);
|
|
4383
4383
|
},
|
|
4384
4384
|
options: r.options || [],
|
|
4385
4385
|
placeholder: r.placeholder || `Select ${r.label}`,
|
|
4386
4386
|
disabled: r.disabled ? r.disabled : !1,
|
|
4387
|
-
className: `w-full ${
|
|
4387
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4388
4388
|
}
|
|
4389
4389
|
),
|
|
4390
|
-
|
|
4390
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4391
4391
|
] }),
|
|
4392
4392
|
r.fieldtype === "toggle" && /* @__PURE__ */ n("div", { children: [
|
|
4393
4393
|
/* @__PURE__ */ e(
|
|
4394
4394
|
fa,
|
|
4395
4395
|
{
|
|
4396
|
-
checked: typeof
|
|
4396
|
+
checked: typeof i[r.key] == "boolean" ? i[r.key] : r.default,
|
|
4397
4397
|
onChange: (d) => {
|
|
4398
4398
|
console.log("Toggle changed:", r.key, d);
|
|
4399
|
-
const p = { ...
|
|
4399
|
+
const p = { ...i, [r.key]: d };
|
|
4400
4400
|
u(p), s && s(l.key, p);
|
|
4401
4401
|
},
|
|
4402
4402
|
disabled: r.disabled ? r.disabled : !1
|
|
4403
4403
|
}
|
|
4404
4404
|
),
|
|
4405
|
-
|
|
4405
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4406
4406
|
] }),
|
|
4407
4407
|
r.fieldtype === "date" && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
4408
4408
|
ua,
|
|
4409
4409
|
{
|
|
4410
4410
|
label: r.label,
|
|
4411
|
-
value:
|
|
4411
|
+
value: i[r.key] ? new Date(i[r.key]) : null,
|
|
4412
4412
|
onChange: (d) => {
|
|
4413
|
-
const p = { ...
|
|
4413
|
+
const p = { ...i, [r.key]: d ? d.toISOString().split("T")[0] : "" };
|
|
4414
4414
|
u(p), s && s(l.key, p);
|
|
4415
4415
|
},
|
|
4416
4416
|
placeholder: r.placeholder || "Select date",
|
|
4417
4417
|
disabled: r.disabled ? r.disabled : !1,
|
|
4418
|
-
error:
|
|
4418
|
+
error: o[l.key]?.[r.key],
|
|
4419
4419
|
className: "w-full"
|
|
4420
4420
|
}
|
|
4421
4421
|
) }),
|
|
@@ -4423,14 +4423,14 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4423
4423
|
Fn,
|
|
4424
4424
|
{
|
|
4425
4425
|
label: r.label,
|
|
4426
|
-
value:
|
|
4426
|
+
value: i[r.key] || { from: null, to: null },
|
|
4427
4427
|
onChange: (d) => {
|
|
4428
|
-
const p = { ...
|
|
4428
|
+
const p = { ...i, [r.key]: d };
|
|
4429
4429
|
u(p), s && s(l.key, p);
|
|
4430
4430
|
},
|
|
4431
4431
|
placeholder: r.placeholder || "Select date range",
|
|
4432
4432
|
disabled: r.disabled ? r.disabled : !1,
|
|
4433
|
-
error:
|
|
4433
|
+
error: o[l.key]?.[r.key],
|
|
4434
4434
|
className: "w-full"
|
|
4435
4435
|
}
|
|
4436
4436
|
) }),
|
|
@@ -4438,9 +4438,9 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4438
4438
|
/* @__PURE__ */ e(
|
|
4439
4439
|
ha,
|
|
4440
4440
|
{
|
|
4441
|
-
selectedValue: typeof
|
|
4441
|
+
selectedValue: typeof i[r.key] < "u" ? i[r.key] : r.default || "",
|
|
4442
4442
|
onValueChange: (d) => {
|
|
4443
|
-
const p = { ...
|
|
4443
|
+
const p = { ...i, [r.key]: d };
|
|
4444
4444
|
u(p), s && s(l.key, p);
|
|
4445
4445
|
},
|
|
4446
4446
|
options: r.options || [],
|
|
@@ -4448,7 +4448,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4448
4448
|
className: "w-full"
|
|
4449
4449
|
}
|
|
4450
4450
|
),
|
|
4451
|
-
|
|
4451
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4452
4452
|
] }),
|
|
4453
4453
|
r.fieldtype === "native-radio" && /* @__PURE__ */ n("div", { className: "native-radiogroup-container", children: [
|
|
4454
4454
|
(r.options || []).map((d) => /* @__PURE__ */ n("div", { className: "native-radio-option", children: [
|
|
@@ -4459,9 +4459,9 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4459
4459
|
id: `${r.key}-${d.value}`,
|
|
4460
4460
|
name: r.key,
|
|
4461
4461
|
value: d.value,
|
|
4462
|
-
checked:
|
|
4462
|
+
checked: i[r.key] === d.value,
|
|
4463
4463
|
onChange: (p) => {
|
|
4464
|
-
const $ = { ...
|
|
4464
|
+
const $ = { ...i, [r.key]: p.target.value };
|
|
4465
4465
|
u($), s && s(l.key, $);
|
|
4466
4466
|
},
|
|
4467
4467
|
disabled: r.disabled
|
|
@@ -4472,22 +4472,22 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4472
4472
|
d.description && /* @__PURE__ */ e("span", { className: "native-radio-description", children: d.description })
|
|
4473
4473
|
] })
|
|
4474
4474
|
] }, d.value)),
|
|
4475
|
-
|
|
4475
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4476
4476
|
] }),
|
|
4477
4477
|
r.fieldtype === "search" && /* @__PURE__ */ n("div", { children: [
|
|
4478
4478
|
/* @__PURE__ */ e(
|
|
4479
4479
|
he,
|
|
4480
4480
|
{
|
|
4481
|
-
value:
|
|
4481
|
+
value: i[r.key] || "",
|
|
4482
4482
|
onChange: (d) => {
|
|
4483
|
-
const p = { ...
|
|
4483
|
+
const p = { ...i, [r.key]: d };
|
|
4484
4484
|
u(p), s && s(l.key, p);
|
|
4485
4485
|
},
|
|
4486
4486
|
placeholder: r.placeholder || `Search ${r.label}`,
|
|
4487
|
-
className: `w-full ${
|
|
4487
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4488
4488
|
}
|
|
4489
4489
|
),
|
|
4490
|
-
|
|
4490
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4491
4491
|
] }),
|
|
4492
4492
|
(r.fieldtype === "datetime" || r.fieldtype === "datetime-local") && /* @__PURE__ */ n("div", { children: [
|
|
4493
4493
|
/* @__PURE__ */ e(
|
|
@@ -4497,16 +4497,16 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4497
4497
|
name: r.key,
|
|
4498
4498
|
defaultValue: r.default,
|
|
4499
4499
|
placeholder: r.placeholder || "Select date and time",
|
|
4500
|
-
value:
|
|
4500
|
+
value: i[r.key] || "",
|
|
4501
4501
|
onChange: (d) => {
|
|
4502
|
-
const p = { ...
|
|
4502
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4503
4503
|
u(p), s && s(l.key, p);
|
|
4504
4504
|
},
|
|
4505
4505
|
required: r.required,
|
|
4506
|
-
className: `w-full ${
|
|
4506
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4507
4507
|
}
|
|
4508
4508
|
),
|
|
4509
|
-
|
|
4509
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4510
4510
|
] }),
|
|
4511
4511
|
r.fieldtype === "time" && /* @__PURE__ */ n("div", { children: [
|
|
4512
4512
|
/* @__PURE__ */ e(
|
|
@@ -4516,16 +4516,16 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4516
4516
|
name: r.key,
|
|
4517
4517
|
defaultValue: r.default,
|
|
4518
4518
|
placeholder: r.placeholder || "Select time",
|
|
4519
|
-
value:
|
|
4519
|
+
value: i[r.key] || "",
|
|
4520
4520
|
onChange: (d) => {
|
|
4521
|
-
const p = { ...
|
|
4521
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4522
4522
|
u(p), s && s(l.key, p);
|
|
4523
4523
|
},
|
|
4524
4524
|
required: r.required,
|
|
4525
|
-
className: `w-full ${
|
|
4525
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4526
4526
|
}
|
|
4527
4527
|
),
|
|
4528
|
-
|
|
4528
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4529
4529
|
] }),
|
|
4530
4530
|
r.fieldtype === "color" && /* @__PURE__ */ n("div", { children: [
|
|
4531
4531
|
/* @__PURE__ */ e(
|
|
@@ -4534,15 +4534,15 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4534
4534
|
type: "color",
|
|
4535
4535
|
name: r.key,
|
|
4536
4536
|
defaultValue: r.default || "#000000",
|
|
4537
|
-
value:
|
|
4537
|
+
value: i[r.key] || "#000000",
|
|
4538
4538
|
onChange: (d) => {
|
|
4539
|
-
const p = { ...
|
|
4539
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4540
4540
|
u(p), s && s(l.key, p);
|
|
4541
4541
|
},
|
|
4542
|
-
className: `w-full h-10 ${
|
|
4542
|
+
className: `w-full h-10 ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4543
4543
|
}
|
|
4544
4544
|
),
|
|
4545
|
-
|
|
4545
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4546
4546
|
] }),
|
|
4547
4547
|
r.fieldtype === "range" && /* @__PURE__ */ n("div", { children: [
|
|
4548
4548
|
/* @__PURE__ */ e(
|
|
@@ -4551,26 +4551,26 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4551
4551
|
type: "range",
|
|
4552
4552
|
name: r.key,
|
|
4553
4553
|
defaultValue: r.default || r.min || 0,
|
|
4554
|
-
value:
|
|
4554
|
+
value: i[r.key] || r.min || 0,
|
|
4555
4555
|
onChange: (d) => {
|
|
4556
|
-
const p = { ...
|
|
4556
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4557
4557
|
u(p), s && s(l.key, p);
|
|
4558
4558
|
},
|
|
4559
4559
|
min: r.min || 0,
|
|
4560
4560
|
max: r.max || 100,
|
|
4561
4561
|
step: r.step || 1,
|
|
4562
|
-
className: `w-full ${
|
|
4562
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4563
4563
|
}
|
|
4564
4564
|
),
|
|
4565
4565
|
/* @__PURE__ */ n("div", { className: "flex justify-between text-sm text-gray-500 mt-1", children: [
|
|
4566
4566
|
/* @__PURE__ */ e("span", { children: r.min || 0 }),
|
|
4567
4567
|
/* @__PURE__ */ n("span", { children: [
|
|
4568
4568
|
"Current: ",
|
|
4569
|
-
|
|
4569
|
+
i[r.key] || r.min || 0
|
|
4570
4570
|
] }),
|
|
4571
4571
|
/* @__PURE__ */ e("span", { children: r.max || 100 })
|
|
4572
4572
|
] }),
|
|
4573
|
-
|
|
4573
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4574
4574
|
] }),
|
|
4575
4575
|
r.fieldtype === "file" && /* @__PURE__ */ n("div", { children: [
|
|
4576
4576
|
/* @__PURE__ */ e(
|
|
@@ -4579,24 +4579,24 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4579
4579
|
type: "file",
|
|
4580
4580
|
name: r.key,
|
|
4581
4581
|
onChange: (d) => {
|
|
4582
|
-
const p = d.target.files[0], $ = { ...
|
|
4582
|
+
const p = d.target.files[0], $ = { ...i, [r.key]: p ? p.name : "" };
|
|
4583
4583
|
u($), s && s(l.key, $);
|
|
4584
4584
|
},
|
|
4585
4585
|
accept: r.accept,
|
|
4586
|
-
className: `w-full ${
|
|
4586
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4587
4587
|
}
|
|
4588
4588
|
),
|
|
4589
|
-
|
|
4589
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4590
4590
|
] }),
|
|
4591
4591
|
r.fieldtype === "managecollectionlist" && /* @__PURE__ */ n("div", { children: [
|
|
4592
4592
|
/* @__PURE__ */ e(
|
|
4593
4593
|
Da,
|
|
4594
4594
|
{
|
|
4595
4595
|
endpoints: r.endpoints || {},
|
|
4596
|
-
initialData:
|
|
4596
|
+
initialData: i[r.key] || r.initialData || [],
|
|
4597
4597
|
className: r.className || "",
|
|
4598
4598
|
onCollectionChange: (d) => {
|
|
4599
|
-
const p = { ...
|
|
4599
|
+
const p = { ...i, [r.key]: d };
|
|
4600
4600
|
u(p), s && s(l.key, p);
|
|
4601
4601
|
},
|
|
4602
4602
|
showSearch: r.showSearch !== !1,
|
|
@@ -4606,7 +4606,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4606
4606
|
allowReorder: r.allowReorder !== !1
|
|
4607
4607
|
}
|
|
4608
4608
|
),
|
|
4609
|
-
|
|
4609
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4610
4610
|
] }),
|
|
4611
4611
|
r.info && /* @__PURE__ */ e(
|
|
4612
4612
|
"p",
|
|
@@ -4623,9 +4623,9 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4623
4623
|
] }) });
|
|
4624
4624
|
}
|
|
4625
4625
|
const xs = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
|
|
4626
|
-
function vs({ item: t, data: a, updateHandler: s, validationErrors:
|
|
4626
|
+
function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
4627
4627
|
console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
|
|
4628
|
-
const [l, m] = L(t), [
|
|
4628
|
+
const [l, m] = L(t), [i, u] = L(null), [g, f] = L(null);
|
|
4629
4629
|
console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
|
|
4630
4630
|
const [x, r] = L(() => {
|
|
4631
4631
|
const h = a && a[l.key] || [], w = h.length > 0 ? h : [{ id: 0 }];
|
|
@@ -4652,7 +4652,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4652
4652
|
const D = [...y];
|
|
4653
4653
|
return D[v][h.key] = b, D;
|
|
4654
4654
|
});
|
|
4655
|
-
}, T = (v) =>
|
|
4655
|
+
}, T = (v) => o[l.key]?.[v]?.[h.key], k = (v) => {
|
|
4656
4656
|
const b = T(v);
|
|
4657
4657
|
return b ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: b }) : null;
|
|
4658
4658
|
};
|
|
@@ -5028,17 +5028,17 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5028
5028
|
}, []), C = ae((h) => {
|
|
5029
5029
|
console.log("[DataTableRenderer] handleAddAudience called with:", h), r((w) => {
|
|
5030
5030
|
const T = [...w];
|
|
5031
|
-
if (
|
|
5031
|
+
if (i !== null && g && T[i]) {
|
|
5032
5032
|
const k = h.pendingInvites || [], v = k.filter((D) => D.type === "User"), b = k.filter((D) => D.type === "Group"), y = k.filter((D) => D.type === "Role");
|
|
5033
|
-
T[
|
|
5034
|
-
users: [...T[
|
|
5035
|
-
groups: [...T[
|
|
5036
|
-
roles: [...T[
|
|
5037
|
-
}, console.log("[DataTableRenderer] Updated audience data:", T[
|
|
5033
|
+
T[i][g] = {
|
|
5034
|
+
users: [...T[i][g]?.users || [], ...v],
|
|
5035
|
+
groups: [...T[i][g]?.groups || [], ...b],
|
|
5036
|
+
roles: [...T[i][g]?.roles || [], ...y]
|
|
5037
|
+
}, console.log("[DataTableRenderer] Updated audience data:", T[i][g]);
|
|
5038
5038
|
}
|
|
5039
5039
|
return T;
|
|
5040
5040
|
}), u(null), f(null);
|
|
5041
|
-
}, [
|
|
5041
|
+
}, [i, g]);
|
|
5042
5042
|
return /* @__PURE__ */ n("div", { children: [
|
|
5043
5043
|
/* @__PURE__ */ n("div", { style: { marginBottom: "20px" }, children: [
|
|
5044
5044
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
@@ -5093,14 +5093,14 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5093
5093
|
w
|
|
5094
5094
|
)) })
|
|
5095
5095
|
] }) }),
|
|
5096
|
-
|
|
5097
|
-
const h = x[
|
|
5098
|
-
users: x[
|
|
5099
|
-
groups: x[
|
|
5100
|
-
roles: x[
|
|
5096
|
+
i !== null && (() => {
|
|
5097
|
+
const h = x[i] && x[i][g] ? {
|
|
5098
|
+
users: x[i][g].users || [],
|
|
5099
|
+
groups: x[i][g].groups || [],
|
|
5100
|
+
roles: x[i][g].roles || []
|
|
5101
5101
|
} : { users: [], groups: [], roles: [] };
|
|
5102
|
-
return console.log("[DataTableRenderer] Opening modal with existing data:", h), console.log("[DataTableRenderer] Row data:", x[
|
|
5103
|
-
|
|
5102
|
+
return console.log("[DataTableRenderer] Opening modal with existing data:", h), console.log("[DataTableRenderer] Row data:", x[i]), console.log("[DataTableRenderer] Field name:", g), /* @__PURE__ */ e(
|
|
5103
|
+
os,
|
|
5104
5104
|
{
|
|
5105
5105
|
isOpen: !0,
|
|
5106
5106
|
onClose: () => {
|
|
@@ -5172,10 +5172,10 @@ const Mt = () => {
|
|
|
5172
5172
|
endpoints: t = Ns,
|
|
5173
5173
|
className: a = "",
|
|
5174
5174
|
onCollectionChange: s,
|
|
5175
|
-
showSearch:
|
|
5175
|
+
showSearch: o = !0,
|
|
5176
5176
|
allowAdd: l = !0,
|
|
5177
5177
|
allowEdit: m = !0,
|
|
5178
|
-
allowDelete:
|
|
5178
|
+
allowDelete: i = !0,
|
|
5179
5179
|
allowReorder: u = !0,
|
|
5180
5180
|
initialData: g = null
|
|
5181
5181
|
// Add prop for initial demo data
|
|
@@ -5245,7 +5245,7 @@ const Mt = () => {
|
|
|
5245
5245
|
});
|
|
5246
5246
|
x(null), N("");
|
|
5247
5247
|
}, w = (z) => {
|
|
5248
|
-
|
|
5248
|
+
i && p((P) => {
|
|
5249
5249
|
const F = P.filter((S) => S.id !== z.id);
|
|
5250
5250
|
return s?.(F), F;
|
|
5251
5251
|
});
|
|
@@ -5277,7 +5277,7 @@ const Mt = () => {
|
|
|
5277
5277
|
) : [];
|
|
5278
5278
|
return /* @__PURE__ */ n("div", { className: `manage-collection-list ${a}`, children: [
|
|
5279
5279
|
/* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ n("div", { className: "w-1/2 flex justify-end", children: [
|
|
5280
|
-
|
|
5280
|
+
o && /* @__PURE__ */ e(
|
|
5281
5281
|
he,
|
|
5282
5282
|
{
|
|
5283
5283
|
value: O,
|
|
@@ -5380,7 +5380,7 @@ const Mt = () => {
|
|
|
5380
5380
|
children: /* @__PURE__ */ e(yr, { color: "#767676" })
|
|
5381
5381
|
}
|
|
5382
5382
|
),
|
|
5383
|
-
|
|
5383
|
+
i && /* @__PURE__ */ e(
|
|
5384
5384
|
"span",
|
|
5385
5385
|
{
|
|
5386
5386
|
className: F === 0 && !z.protected ? "cursor-pointer" : "cursor-not-allowed",
|
|
@@ -5398,20 +5398,20 @@ const Mt = () => {
|
|
|
5398
5398
|
] });
|
|
5399
5399
|
}, $a = ({ item: t, data: a, updateHandler: s }) => {
|
|
5400
5400
|
const {
|
|
5401
|
-
label:
|
|
5401
|
+
label: o = "Manage Collections",
|
|
5402
5402
|
description: l = "",
|
|
5403
5403
|
endpoints: m = {},
|
|
5404
|
-
initialData:
|
|
5404
|
+
initialData: i = null,
|
|
5405
5405
|
showSearch: u = !0,
|
|
5406
5406
|
allowAdd: g = !0,
|
|
5407
5407
|
allowEdit: f = !0,
|
|
5408
5408
|
allowDelete: x = !0,
|
|
5409
5409
|
allowReorder: r = !0,
|
|
5410
5410
|
className: N = ""
|
|
5411
|
-
} = t, d = a?.[t.key] ||
|
|
5411
|
+
} = t, d = a?.[t.key] || i || [], p = Array.isArray(d) ? d : [];
|
|
5412
5412
|
return /* @__PURE__ */ n("div", { className: "dynamic-config-manage-collection-list", children: [
|
|
5413
|
-
(
|
|
5414
|
-
|
|
5413
|
+
(o || l) && /* @__PURE__ */ n("div", { className: "mb-4", children: [
|
|
5414
|
+
o && /* @__PURE__ */ e("h3", { className: "text-lg font-medium text-gray-900 mb-1", children: o }),
|
|
5415
5415
|
l && /* @__PURE__ */ e("p", { className: "text-sm text-gray-600", children: l })
|
|
5416
5416
|
] }),
|
|
5417
5417
|
/* @__PURE__ */ e(
|
|
@@ -5451,10 +5451,10 @@ function zs({
|
|
|
5451
5451
|
appid: t,
|
|
5452
5452
|
configdata: a = null,
|
|
5453
5453
|
disableApi: s = !1,
|
|
5454
|
-
onCancel:
|
|
5454
|
+
onCancel: o,
|
|
5455
5455
|
onSave: l
|
|
5456
5456
|
}) {
|
|
5457
|
-
const [m,
|
|
5457
|
+
const [m, i] = se.useState(a), [u, g] = se.useState(null), [f, x] = L(!1), [r, N] = L(!1), [d, p] = L({}), $ = `${ze()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, A = $, [E, R] = L(1), O = (k) => {
|
|
5458
5458
|
if (!a || !a.configuration)
|
|
5459
5459
|
return k;
|
|
5460
5460
|
const v = {}, b = k?.configuration || {};
|
|
@@ -5529,7 +5529,7 @@ function zs({
|
|
|
5529
5529
|
x(!1);
|
|
5530
5530
|
}
|
|
5531
5531
|
};
|
|
5532
|
-
a && (
|
|
5532
|
+
a && (i(a), t ? k() : V());
|
|
5533
5533
|
}, [a, E, t, s]);
|
|
5534
5534
|
const U = (k, v) => {
|
|
5535
5535
|
g((b) => ({
|
|
@@ -5654,8 +5654,8 @@ function zs({
|
|
|
5654
5654
|
}
|
|
5655
5655
|
})();
|
|
5656
5656
|
}, w = () => {
|
|
5657
|
-
if (
|
|
5658
|
-
|
|
5657
|
+
if (o) {
|
|
5658
|
+
o();
|
|
5659
5659
|
return;
|
|
5660
5660
|
}
|
|
5661
5661
|
d && Object.keys(d).length > 0 && !window.confirm(
|
|
@@ -5720,7 +5720,7 @@ const Ql = ({
|
|
|
5720
5720
|
appid: a = "Configuration-Page",
|
|
5721
5721
|
disableApi: s = !1
|
|
5722
5722
|
}) => {
|
|
5723
|
-
const [
|
|
5723
|
+
const [o, l] = L(0), [m, i] = L(!1), {
|
|
5724
5724
|
pageHeader: u = {},
|
|
5725
5725
|
appletHeader: g = {},
|
|
5726
5726
|
breadcrumb: f = [],
|
|
@@ -5728,14 +5728,14 @@ const Ql = ({
|
|
|
5728
5728
|
configuration: r = []
|
|
5729
5729
|
} = t, N = r.map((C) => {
|
|
5730
5730
|
if (C.type === "section" && C.fields) {
|
|
5731
|
-
const h = [...C.fields], w = h.findIndex((T) => T.key === "appkey");
|
|
5731
|
+
const h = [...C.fields], w = h.findIndex((T) => T && T.key === "appkey");
|
|
5732
5732
|
if (w !== -1) {
|
|
5733
5733
|
const T = h[w];
|
|
5734
5734
|
if (h[w] = {
|
|
5735
5735
|
...T,
|
|
5736
5736
|
default: a,
|
|
5737
5737
|
value: a,
|
|
5738
|
-
|
|
5738
|
+
readonly: !0,
|
|
5739
5739
|
placeholder: a
|
|
5740
5740
|
}, h.some((v) => v.key === "displayname")) {
|
|
5741
5741
|
const v = h.findIndex((y) => y.key === "displayname"), b = h[v] || {};
|
|
@@ -5773,9 +5773,9 @@ const Ql = ({
|
|
|
5773
5773
|
label: C.text,
|
|
5774
5774
|
href: C.href || "#"
|
|
5775
5775
|
})), $ = ae(() => {
|
|
5776
|
-
console.log("handleCancelRequest called - showing modal"),
|
|
5776
|
+
console.log("handleCancelRequest called - showing modal"), i(!0);
|
|
5777
5777
|
}, []), A = ae((C) => {
|
|
5778
|
-
|
|
5778
|
+
i(!1), C.primary ? (console.log("User confirmed cancel - navigating back"), window.history.back()) : console.log("User cancelled the cancel action - modal closed, data preserved");
|
|
5779
5779
|
}, []), E = ae((C) => {
|
|
5780
5780
|
console.log("Configuration changed:", C);
|
|
5781
5781
|
}, []), R = (() => {
|
|
@@ -5899,12 +5899,12 @@ const Ql = ({
|
|
|
5899
5899
|
"button",
|
|
5900
5900
|
{
|
|
5901
5901
|
onClick: () => l(h),
|
|
5902
|
-
className: `${
|
|
5902
|
+
className: `${o === h ? "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`,
|
|
5903
5903
|
children: C.label
|
|
5904
5904
|
},
|
|
5905
5905
|
h
|
|
5906
5906
|
)) }) }),
|
|
5907
|
-
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: U[
|
|
5907
|
+
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: U[o].content })
|
|
5908
5908
|
] }),
|
|
5909
5909
|
/* @__PURE__ */ e(
|
|
5910
5910
|
In,
|
|
@@ -5950,12 +5950,12 @@ const Kl = ({
|
|
|
5950
5950
|
subheading: a = "",
|
|
5951
5951
|
totalCount: s = 0,
|
|
5952
5952
|
// Prefer "apiRef" naming for clarity (it's the wrapper API, not the raw grid instance)
|
|
5953
|
-
gridRef:
|
|
5953
|
+
gridRef: o,
|
|
5954
5954
|
// backward compat
|
|
5955
5955
|
apiRef: l,
|
|
5956
5956
|
// preferred
|
|
5957
5957
|
onAdd: m,
|
|
5958
|
-
onFilterOpen:
|
|
5958
|
+
onFilterOpen: i,
|
|
5959
5959
|
addBtnText: u = "Add",
|
|
5960
5960
|
// Feature toggles
|
|
5961
5961
|
showSearch: g = !0,
|
|
@@ -5976,7 +5976,7 @@ const Kl = ({
|
|
|
5976
5976
|
excelFileName: O,
|
|
5977
5977
|
pdfFileName: V
|
|
5978
5978
|
}) => {
|
|
5979
|
-
const U = () => l?.current ||
|
|
5979
|
+
const U = () => l?.current || o?.current, [Y, G] = se.useState(""), C = (t || "export").toString().trim() || "export", h = `${O || C}.xlsx`, w = `${V || C}.pdf`, T = (b, y, D) => Math.max(y, Math.min(b, D)), k = ae(
|
|
5980
5980
|
(b) => {
|
|
5981
5981
|
const y = U();
|
|
5982
5982
|
if (console.log("openColumnChooserNear", y), !!y?.openColumnChooser) {
|
|
@@ -6057,7 +6057,7 @@ const Kl = ({
|
|
|
6057
6057
|
ee,
|
|
6058
6058
|
{
|
|
6059
6059
|
icon: vr,
|
|
6060
|
-
onClick:
|
|
6060
|
+
onClick: i,
|
|
6061
6061
|
size: "small",
|
|
6062
6062
|
ariaLabel: "Filters",
|
|
6063
6063
|
category: "secondary",
|
|
@@ -6124,16 +6124,16 @@ const Kl = ({
|
|
|
6124
6124
|
] })
|
|
6125
6125
|
] });
|
|
6126
6126
|
};
|
|
6127
|
-
function
|
|
6127
|
+
function eo(t) {
|
|
6128
6128
|
const {
|
|
6129
6129
|
data: a = [],
|
|
6130
6130
|
totalCount: s = 0,
|
|
6131
|
-
uniqueId:
|
|
6131
|
+
uniqueId: o = "grid",
|
|
6132
6132
|
pageIndex: l = 1,
|
|
6133
6133
|
// 1-based
|
|
6134
6134
|
// pageSize = 10,
|
|
6135
6135
|
allowPaging: m = !0,
|
|
6136
|
-
allowSorting:
|
|
6136
|
+
allowSorting: i = !0,
|
|
6137
6137
|
allowFiltering: u = !1,
|
|
6138
6138
|
allowGrouping: g = !1,
|
|
6139
6139
|
allowReordering: f = !0,
|
|
@@ -6158,8 +6158,8 @@ function ei(t) {
|
|
|
6158
6158
|
...k
|
|
6159
6159
|
} = C || {}, [v, b] = se.useState(w?.page || 1), [y, D] = se.useState(T?.pageSize || 20), [M, z] = se.useState(T?.sortKey || "updatedDate"), [P, F] = se.useState(T?.direction || "Descending"), S = me(() => {
|
|
6160
6160
|
const j = [sn];
|
|
6161
|
-
return
|
|
6162
|
-
}, [
|
|
6161
|
+
return i && j.push(ln), u && j.push(on), g && j.push(cn), p && j.push(dn), r && j.push(mn), N && j.push(un), d && j.push(hn), x && j.push(pn), f && j.push(gn), j.push(bn), j;
|
|
6162
|
+
}, [i, u, g, p, r, N, d, x, f]), B = me(() => {
|
|
6163
6163
|
const j = () => h.current, re = (W, ve) => {
|
|
6164
6164
|
!ve && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${W} requested but related service/feature is disabled.`);
|
|
6165
6165
|
};
|
|
@@ -6263,7 +6263,7 @@ function ei(t) {
|
|
|
6263
6263
|
return /* @__PURE__ */ n(
|
|
6264
6264
|
fn,
|
|
6265
6265
|
{
|
|
6266
|
-
id:
|
|
6266
|
+
id: o,
|
|
6267
6267
|
ref: h,
|
|
6268
6268
|
dataSource: {
|
|
6269
6269
|
result: a,
|
|
@@ -6271,7 +6271,7 @@ function ei(t) {
|
|
|
6271
6271
|
},
|
|
6272
6272
|
height: $,
|
|
6273
6273
|
allowPaging: m,
|
|
6274
|
-
allowSorting:
|
|
6274
|
+
allowSorting: i,
|
|
6275
6275
|
allowFiltering: u,
|
|
6276
6276
|
allowGrouping: g,
|
|
6277
6277
|
allowReordering: f,
|
|
@@ -6295,7 +6295,7 @@ function ei(t) {
|
|
|
6295
6295
|
}
|
|
6296
6296
|
);
|
|
6297
6297
|
}
|
|
6298
|
-
const
|
|
6298
|
+
const ie = (t) => {
|
|
6299
6299
|
const a = String(t || "md").toLowerCase();
|
|
6300
6300
|
return a === "xs" ? "sm" : a === "2lg" || a === "xlg" || a === "xl" ? "lg" : ["sm", "md", "lg"].includes(a) ? a : "md";
|
|
6301
6301
|
}, ce = {
|
|
@@ -6318,25 +6318,25 @@ const oe = (t) => {
|
|
|
6318
6318
|
meta: "text-sm"
|
|
6319
6319
|
}
|
|
6320
6320
|
}, Ss = (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;
|
|
6321
|
-
function
|
|
6321
|
+
function oe({
|
|
6322
6322
|
children: t,
|
|
6323
6323
|
className: a = "",
|
|
6324
6324
|
showCheckbox: s = !1,
|
|
6325
|
-
checkboxPosition:
|
|
6325
|
+
checkboxPosition: o = "top-left",
|
|
6326
6326
|
// "top-left" | "top-right"
|
|
6327
6327
|
onSelect: l,
|
|
6328
6328
|
identity: m = "_id",
|
|
6329
|
-
details:
|
|
6329
|
+
details: i = {},
|
|
6330
6330
|
...u
|
|
6331
6331
|
}) {
|
|
6332
6332
|
const g = Xe(), f = Ss(u, m), x = (N) => {
|
|
6333
6333
|
l?.({
|
|
6334
6334
|
key: f,
|
|
6335
6335
|
checked: N.target.checked,
|
|
6336
|
-
details:
|
|
6336
|
+
details: i,
|
|
6337
6337
|
props: u
|
|
6338
6338
|
});
|
|
6339
|
-
}, r =
|
|
6339
|
+
}, r = o === "top-right" ? "top-3 right-3" : "top-3 left-3";
|
|
6340
6340
|
return /* @__PURE__ */ n(
|
|
6341
6341
|
"div",
|
|
6342
6342
|
{
|
|
@@ -6358,7 +6358,7 @@ function ie({
|
|
|
6358
6358
|
}
|
|
6359
6359
|
);
|
|
6360
6360
|
}
|
|
6361
|
-
|
|
6361
|
+
oe.propTypes = {
|
|
6362
6362
|
showCheckbox: c.bool,
|
|
6363
6363
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
6364
6364
|
onSelect: c.func,
|
|
@@ -6369,11 +6369,11 @@ function Ds({
|
|
|
6369
6369
|
size: t = "md",
|
|
6370
6370
|
showCheckbox: a = !1,
|
|
6371
6371
|
checkboxPosition: s = "top-left",
|
|
6372
|
-
onSelect:
|
|
6372
|
+
onSelect: o,
|
|
6373
6373
|
identity: l = "_id",
|
|
6374
6374
|
// content
|
|
6375
6375
|
title: m = "Activity",
|
|
6376
|
-
group:
|
|
6376
|
+
group: i = "Global",
|
|
6377
6377
|
moreGroupsLabel: u = "+ 5 more",
|
|
6378
6378
|
author: g = "Judith Black",
|
|
6379
6379
|
timeLabel: f = "Just now",
|
|
@@ -6382,16 +6382,16 @@ function Ds({
|
|
|
6382
6382
|
// spread remaining props (_id, instanceId, etc.)
|
|
6383
6383
|
...N
|
|
6384
6384
|
}) {
|
|
6385
|
-
const d =
|
|
6385
|
+
const d = ie(t), p = ce[d];
|
|
6386
6386
|
return /* @__PURE__ */ n(
|
|
6387
|
-
|
|
6387
|
+
oe,
|
|
6388
6388
|
{
|
|
6389
6389
|
className: `flex flex-col ${p.card}`,
|
|
6390
6390
|
showCheckbox: a,
|
|
6391
6391
|
checkboxPosition: s,
|
|
6392
|
-
onSelect:
|
|
6392
|
+
onSelect: o,
|
|
6393
6393
|
identity: l,
|
|
6394
|
-
details: { type: "activity", title: m, group:
|
|
6394
|
+
details: { type: "activity", title: m, group: i, author: g },
|
|
6395
6395
|
...N,
|
|
6396
6396
|
children: [
|
|
6397
6397
|
/* @__PURE__ */ e("div", { className: "flex items-start justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${p.title} ml-3`, children: m }) }),
|
|
@@ -6492,25 +6492,25 @@ function Es({
|
|
|
6492
6492
|
size: t = "md",
|
|
6493
6493
|
showCheckbox: a = !1,
|
|
6494
6494
|
checkboxPosition: s = "top-left",
|
|
6495
|
-
onSelect:
|
|
6495
|
+
onSelect: o,
|
|
6496
6496
|
identity: l = "_id",
|
|
6497
6497
|
title: m = "Communities",
|
|
6498
|
-
activeTab:
|
|
6498
|
+
activeTab: i = "joined",
|
|
6499
6499
|
// "joined" | "suggested"
|
|
6500
6500
|
items: u = As,
|
|
6501
6501
|
// spread for identity (_id/instanceId/etc)
|
|
6502
6502
|
...g
|
|
6503
6503
|
}) {
|
|
6504
|
-
const f =
|
|
6504
|
+
const f = ie(t), x = ce[f], r = Fs[f], N = (d) => `px-1 pb-2 text-sm font-medium ${d === i ? "text-zinc-900 dark:text-zinc-100 border-b-2" : "text-zinc-500 dark:text-zinc-400"}`;
|
|
6505
6505
|
return /* @__PURE__ */ n(
|
|
6506
|
-
|
|
6506
|
+
oe,
|
|
6507
6507
|
{
|
|
6508
6508
|
className: `flex flex-col ${x.card} ${r.wrap}`,
|
|
6509
6509
|
showCheckbox: a,
|
|
6510
6510
|
checkboxPosition: s,
|
|
6511
|
-
onSelect:
|
|
6511
|
+
onSelect: o,
|
|
6512
6512
|
identity: l,
|
|
6513
|
-
details: { type: "communities", title: m, activeTab:
|
|
6513
|
+
details: { type: "communities", title: m, activeTab: i, count: u?.length ?? 0 },
|
|
6514
6514
|
...g,
|
|
6515
6515
|
children: [
|
|
6516
6516
|
/* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
|
|
@@ -6528,14 +6528,14 @@ function Es({
|
|
|
6528
6528
|
/* @__PURE__ */ e(
|
|
6529
6529
|
"span",
|
|
6530
6530
|
{
|
|
6531
|
-
className: `${N("joined")} ${
|
|
6531
|
+
className: `${N("joined")} ${i === "joined" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
|
|
6532
6532
|
children: "Joined"
|
|
6533
6533
|
}
|
|
6534
6534
|
),
|
|
6535
6535
|
/* @__PURE__ */ e(
|
|
6536
6536
|
"span",
|
|
6537
6537
|
{
|
|
6538
|
-
className: `${N("suggested")} ${
|
|
6538
|
+
className: `${N("suggested")} ${i === "suggested" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
|
|
6539
6539
|
children: "Suggested"
|
|
6540
6540
|
}
|
|
6541
6541
|
)
|
|
@@ -6678,23 +6678,23 @@ function Ps({
|
|
|
6678
6678
|
size: t = "md",
|
|
6679
6679
|
showCheckbox: a = !1,
|
|
6680
6680
|
checkboxPosition: s = "top-left",
|
|
6681
|
-
onSelect:
|
|
6681
|
+
onSelect: o,
|
|
6682
6682
|
identity: l = "_id",
|
|
6683
6683
|
title: m = "News",
|
|
6684
|
-
items:
|
|
6684
|
+
items: i = Rs,
|
|
6685
6685
|
// spread for identity fields: _id / id / instanceId etc.
|
|
6686
6686
|
...u
|
|
6687
6687
|
}) {
|
|
6688
|
-
const g =
|
|
6688
|
+
const g = ie(t), f = ce[g], x = Os[g];
|
|
6689
6689
|
return /* @__PURE__ */ n(
|
|
6690
|
-
|
|
6690
|
+
oe,
|
|
6691
6691
|
{
|
|
6692
6692
|
className: `flex flex-col ${f.card} ${x.wrap || ""}`,
|
|
6693
6693
|
showCheckbox: a,
|
|
6694
6694
|
checkboxPosition: s,
|
|
6695
|
-
onSelect:
|
|
6695
|
+
onSelect: o,
|
|
6696
6696
|
identity: l,
|
|
6697
|
-
details: { type: "news", title: m, count:
|
|
6697
|
+
details: { type: "news", title: m, count: i?.length ?? 0 },
|
|
6698
6698
|
...u,
|
|
6699
6699
|
children: [
|
|
6700
6700
|
/* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
|
|
@@ -6703,7 +6703,7 @@ function Ps({
|
|
|
6703
6703
|
] }),
|
|
6704
6704
|
g === "lg" ? (
|
|
6705
6705
|
// Large: 3-up grid of image cards
|
|
6706
|
-
/* @__PURE__ */ e("div", { className: `mt-4 ${x.grid}`, children:
|
|
6706
|
+
/* @__PURE__ */ e("div", { className: `mt-4 ${x.grid}`, children: i.slice(0, 3).map((r) => /* @__PURE__ */ n("article", { children: [
|
|
6707
6707
|
/* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: x.cardImg }),
|
|
6708
6708
|
/* @__PURE__ */ e("h4", { className: `mt-3 ${x.title} text-zinc-900 dark:text-zinc-100`, children: r.title }),
|
|
6709
6709
|
/* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${x.date}`, children: r.date }),
|
|
@@ -6716,7 +6716,7 @@ function Ps({
|
|
|
6716
6716
|
] }, r._id || r.id || r.instanceId)) })
|
|
6717
6717
|
) : (
|
|
6718
6718
|
// Small/Medium: list rows with thumb left
|
|
6719
|
-
/* @__PURE__ */ e("ul", { className: "mt-4 grid gap-3", children:
|
|
6719
|
+
/* @__PURE__ */ e("ul", { className: "mt-4 grid gap-3", children: i.slice(0, 3).map((r) => /* @__PURE__ */ n(
|
|
6720
6720
|
"li",
|
|
6721
6721
|
{
|
|
6722
6722
|
className: "flex items-start gap-3 rounded-xl border border-zinc-200 dark:border-zinc-800 p-2",
|
|
@@ -6782,22 +6782,22 @@ const Is = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Ms = {
|
|
|
6782
6782
|
searchH: "h-11 text-base",
|
|
6783
6783
|
chipGap: "gap-3.5"
|
|
6784
6784
|
}
|
|
6785
|
-
}, Ls = ({ label: t, active: a = !1, size: s = "md", className:
|
|
6785
|
+
}, Ls = ({ label: t, active: a = !1, size: s = "md", className: o = "" }) => {
|
|
6786
6786
|
const l = "inline-flex items-center justify-center whitespace-nowrap rounded-full border transition-colors duration-150 shadow-[0_0.5px_0_rgba(0,0,0,0.04)]", m = {
|
|
6787
6787
|
sm: "h-8 px-3 text-[11px] font-semibold",
|
|
6788
6788
|
md: "h-9 px-3.5 text-[13px] font-semibold",
|
|
6789
6789
|
lg: "h-10 px-4 text-sm font-semibold"
|
|
6790
|
-
},
|
|
6791
|
-
return /* @__PURE__ */ e("span", { className: `${l} ${m[s] ?? m.md} ${
|
|
6790
|
+
}, i = 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";
|
|
6791
|
+
return /* @__PURE__ */ e("span", { className: `${l} ${m[s] ?? m.md} ${i} ${o}`, children: t });
|
|
6792
6792
|
}, Bs = (t, a = 12) => `https://www.google.com/maps?q=${encodeURIComponent(t)}&z=${a}&output=embed`;
|
|
6793
6793
|
function js({
|
|
6794
6794
|
size: t = "md",
|
|
6795
6795
|
showCheckbox: a = !1,
|
|
6796
6796
|
checkboxPosition: s = "top-left",
|
|
6797
|
-
onSelect:
|
|
6797
|
+
onSelect: o,
|
|
6798
6798
|
identity: l = "_id",
|
|
6799
6799
|
title: m = "Campus Map",
|
|
6800
|
-
campusName:
|
|
6800
|
+
campusName: i = "Morningside Heights Campus",
|
|
6801
6801
|
filters: u = Is,
|
|
6802
6802
|
activeFilter: g = "All",
|
|
6803
6803
|
// NEW: iframe controls
|
|
@@ -6807,16 +6807,16 @@ function js({
|
|
|
6807
6807
|
// optional full embed URL override
|
|
6808
6808
|
...N
|
|
6809
6809
|
}) {
|
|
6810
|
-
const d =
|
|
6810
|
+
const d = ie(t), p = ce[d], $ = Ms[d], A = r || Bs(f, x);
|
|
6811
6811
|
return /* @__PURE__ */ e(
|
|
6812
|
-
|
|
6812
|
+
oe,
|
|
6813
6813
|
{
|
|
6814
6814
|
className: `flex flex-col ${p.card} ${$.wrap}`,
|
|
6815
6815
|
showCheckbox: a,
|
|
6816
6816
|
checkboxPosition: s,
|
|
6817
|
-
onSelect:
|
|
6817
|
+
onSelect: o,
|
|
6818
6818
|
identity: l,
|
|
6819
|
-
details: { type: "campus-map", title: m, campusName:
|
|
6819
|
+
details: { type: "campus-map", title: m, campusName: i, activeFilter: g, mapQuery: f, zoom: x },
|
|
6820
6820
|
...N,
|
|
6821
6821
|
children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${$.mapH}`, children: [
|
|
6822
6822
|
/* @__PURE__ */ e(
|
|
@@ -6833,7 +6833,7 @@ function js({
|
|
|
6833
6833
|
),
|
|
6834
6834
|
/* @__PURE__ */ n("div", { className: "absolute left-4 right-4 top-3 flex items-center justify-between pointer-events-none", children: [
|
|
6835
6835
|
/* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${$.campusPill}`, children: [
|
|
6836
|
-
/* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children:
|
|
6836
|
+
/* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children: i }),
|
|
6837
6837
|
/* @__PURE__ */ e("span", { className: "ml-2 text-zinc-400", children: "▾" })
|
|
6838
6838
|
] }),
|
|
6839
6839
|
/* @__PURE__ */ n("div", { className: "hidden md:flex items-center gap-2", "aria-hidden": "true", children: [
|
|
@@ -6942,13 +6942,13 @@ const Vs = [
|
|
|
6942
6942
|
time: a.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })
|
|
6943
6943
|
};
|
|
6944
6944
|
};
|
|
6945
|
-
function jt({ ev: t, sizeMeta: a, isSelected: s, onClick:
|
|
6946
|
-
const { day: l, month: m, time:
|
|
6945
|
+
function jt({ ev: t, sizeMeta: a, isSelected: s, onClick: o }) {
|
|
6946
|
+
const { day: l, month: m, time: i } = Ta(t.date);
|
|
6947
6947
|
return /* @__PURE__ */ n(
|
|
6948
6948
|
"div",
|
|
6949
6949
|
{
|
|
6950
6950
|
className: `flex items-start gap-4 py-3 cursor-pointer group ${s ? "bg-blue-50 dark:bg-blue-900/20 rounded-lg -mx-2 px-2" : ""}`,
|
|
6951
|
-
onClick: () =>
|
|
6951
|
+
onClick: () => o(t),
|
|
6952
6952
|
children: [
|
|
6953
6953
|
/* @__PURE__ */ e("div", { className: "flex-shrink-0 min-w-12", children: /* @__PURE__ */ n("div", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${a.dateSize}`, children: [
|
|
6954
6954
|
l,
|
|
@@ -6959,7 +6959,7 @@ function jt({ ev: t, sizeMeta: a, isSelected: s, onClick: i }) {
|
|
|
6959
6959
|
/* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 line-clamp-2 group-hover:text-blue-600 dark:group-hover:text-blue-400`, children: t.title }),
|
|
6960
6960
|
/* @__PURE__ */ n("div", { className: `flex items-center gap-1.5 mt-1 text-zinc-500 dark:text-zinc-400 ${a.meta}`, children: [
|
|
6961
6961
|
/* @__PURE__ */ e(Ae, { className: "h-3 w-3" }),
|
|
6962
|
-
t.allDayNote ? t.allDayNote :
|
|
6962
|
+
t.allDayNote ? t.allDayNote : i
|
|
6963
6963
|
] })
|
|
6964
6964
|
] })
|
|
6965
6965
|
]
|
|
@@ -6968,12 +6968,12 @@ function jt({ ev: t, sizeMeta: a, isSelected: s, onClick: i }) {
|
|
|
6968
6968
|
}
|
|
6969
6969
|
function Gs({ ev: t, sizeMeta: a }) {
|
|
6970
6970
|
if (!t) return null;
|
|
6971
|
-
const { day: s, month:
|
|
6971
|
+
const { day: s, month: o, time: l } = Ta(t.date);
|
|
6972
6972
|
return /* @__PURE__ */ n("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 p-6", children: [
|
|
6973
6973
|
/* @__PURE__ */ n("div", { className: "flex items-start gap-4 mb-4", children: [
|
|
6974
6974
|
/* @__PURE__ */ n("div", { className: "flex-shrink-0", children: [
|
|
6975
6975
|
/* @__PURE__ */ e("div", { className: "text-2xl font-bold text-zinc-900 dark:text-zinc-100", children: s }),
|
|
6976
|
-
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wide", children:
|
|
6976
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wide", children: o })
|
|
6977
6977
|
] }),
|
|
6978
6978
|
/* @__PURE__ */ n("div", { className: "flex-grow", children: [
|
|
6979
6979
|
/* @__PURE__ */ e("h3", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-2`, children: t.title }),
|
|
@@ -7006,25 +7006,25 @@ function qs({
|
|
|
7006
7006
|
size: t = "md",
|
|
7007
7007
|
showCheckbox: a = !1,
|
|
7008
7008
|
checkboxPosition: s = "top-left",
|
|
7009
|
-
onSelect:
|
|
7009
|
+
onSelect: o,
|
|
7010
7010
|
identity: l = "_id",
|
|
7011
7011
|
title: m = "Upcoming Events",
|
|
7012
|
-
events:
|
|
7012
|
+
events: i = Vs,
|
|
7013
7013
|
selectedIndex: u = 0,
|
|
7014
7014
|
...g
|
|
7015
7015
|
}) {
|
|
7016
|
-
const [f, x] = L(u), r =
|
|
7017
|
-
x(R),
|
|
7016
|
+
const [f, x] = L(u), r = ie(t), N = ce[r], d = _s[r], p = i[f] || i[0], $ = (E, R) => {
|
|
7017
|
+
x(R), o?.(E);
|
|
7018
7018
|
}, A = r === "lg";
|
|
7019
7019
|
return /* @__PURE__ */ n(
|
|
7020
|
-
|
|
7020
|
+
oe,
|
|
7021
7021
|
{
|
|
7022
7022
|
className: `flex flex-col ${N.card} ${d.wrap}`,
|
|
7023
7023
|
showCheckbox: a,
|
|
7024
7024
|
checkboxPosition: s,
|
|
7025
|
-
onSelect:
|
|
7025
|
+
onSelect: o,
|
|
7026
7026
|
identity: l,
|
|
7027
|
-
details: { type: "events", title: m, count:
|
|
7027
|
+
details: { type: "events", title: m, count: i?.length ?? 0 },
|
|
7028
7028
|
...g,
|
|
7029
7029
|
children: [
|
|
7030
7030
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between mb-4", children: [
|
|
@@ -7034,7 +7034,7 @@ function qs({
|
|
|
7034
7034
|
A ? (
|
|
7035
7035
|
// Large: Two-column layout
|
|
7036
7036
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
7037
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children:
|
|
7037
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: i.map((E, R) => /* @__PURE__ */ e(
|
|
7038
7038
|
jt,
|
|
7039
7039
|
{
|
|
7040
7040
|
ev: E,
|
|
@@ -7048,7 +7048,7 @@ function qs({
|
|
|
7048
7048
|
] })
|
|
7049
7049
|
) : (
|
|
7050
7050
|
// Small/Medium: Simple list only
|
|
7051
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children:
|
|
7051
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: i.map((E, R) => /* @__PURE__ */ e(
|
|
7052
7052
|
jt,
|
|
7053
7053
|
{
|
|
7054
7054
|
ev: E,
|
|
@@ -7168,8 +7168,8 @@ const Ys = [
|
|
|
7168
7168
|
searchHeight: "h-10"
|
|
7169
7169
|
}
|
|
7170
7170
|
};
|
|
7171
|
-
function Js({ email: t, sizeMeta: a, isSelected: s, onClick:
|
|
7172
|
-
const
|
|
7171
|
+
function Js({ email: t, sizeMeta: a, isSelected: s, onClick: o, onStar: l, onPin: m }) {
|
|
7172
|
+
const i = (g) => {
|
|
7173
7173
|
g.stopPropagation(), l?.(t);
|
|
7174
7174
|
}, u = (g) => {
|
|
7175
7175
|
g.stopPropagation(), m?.(t);
|
|
@@ -7178,13 +7178,13 @@ function Js({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin
|
|
|
7178
7178
|
"div",
|
|
7179
7179
|
{
|
|
7180
7180
|
className: `flex items-start gap-3 p-3 cursor-pointer border-b border-zinc-200 dark:border-zinc-800 last:border-b-0 group ${s ? "bg-blue-50 dark:bg-blue-900/20 border-l-4 border-l-blue-500 -ml-1 pl-4" : "hover:bg-zinc-50 dark:hover:bg-zinc-800/50 border-l-4 border-l-transparent"} ${t.unread ? "bg-blue-25 dark:bg-blue-900/10" : ""}`,
|
|
7181
|
-
onClick: () =>
|
|
7181
|
+
onClick: () => o(t),
|
|
7182
7182
|
children: [
|
|
7183
7183
|
/* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-1 pt-0.5", children: [
|
|
7184
7184
|
/* @__PURE__ */ e(
|
|
7185
7185
|
"button",
|
|
7186
7186
|
{
|
|
7187
|
-
onClick:
|
|
7187
|
+
onClick: i,
|
|
7188
7188
|
className: "p-1 rounded hover:bg-zinc-200 dark:hover:bg-zinc-700 transition-colors duration-200",
|
|
7189
7189
|
children: t.starred ? /* @__PURE__ */ e(Dr, { className: "h-4 w-4 fill-yellow-400 text-yellow-400" }) : /* @__PURE__ */ e($r, { className: "h-4 w-4 text-zinc-400 group-hover:text-yellow-400" })
|
|
7190
7190
|
}
|
|
@@ -7221,17 +7221,17 @@ function Xs({
|
|
|
7221
7221
|
size: t = "md",
|
|
7222
7222
|
showCheckbox: a = !1,
|
|
7223
7223
|
checkboxPosition: s = "top-left",
|
|
7224
|
-
onSelect:
|
|
7224
|
+
onSelect: o,
|
|
7225
7225
|
identity: l = "_id",
|
|
7226
7226
|
title: m = "0365 Mails",
|
|
7227
|
-
emails:
|
|
7227
|
+
emails: i = Ys,
|
|
7228
7228
|
selectedIndex: u = 0,
|
|
7229
7229
|
onStar: g,
|
|
7230
7230
|
onPin: f,
|
|
7231
7231
|
...x
|
|
7232
7232
|
}) {
|
|
7233
|
-
const [r, N] = L(u), d =
|
|
7234
|
-
N(V),
|
|
7233
|
+
const [r, N] = L(u), d = ie(t), p = ce[d], $ = Ws[d], A = (O, V) => {
|
|
7234
|
+
N(V), o?.(O);
|
|
7235
7235
|
}, E = (O) => {
|
|
7236
7236
|
const V = { ...O, starred: !O.starred };
|
|
7237
7237
|
g?.(V);
|
|
@@ -7240,19 +7240,19 @@ function Xs({
|
|
|
7240
7240
|
f?.(V);
|
|
7241
7241
|
};
|
|
7242
7242
|
return /* @__PURE__ */ n(
|
|
7243
|
-
|
|
7243
|
+
oe,
|
|
7244
7244
|
{
|
|
7245
7245
|
className: `flex flex-col ${p.card} ${$.wrap}`,
|
|
7246
7246
|
showCheckbox: a,
|
|
7247
7247
|
checkboxPosition: s,
|
|
7248
|
-
onSelect:
|
|
7248
|
+
onSelect: o,
|
|
7249
7249
|
identity: l,
|
|
7250
|
-
details: { type: "emails", title: m, count:
|
|
7250
|
+
details: { type: "emails", title: m, count: i?.length ?? 0 },
|
|
7251
7251
|
...x,
|
|
7252
7252
|
children: [
|
|
7253
7253
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${p.title}`, children: m }) }),
|
|
7254
7254
|
/* @__PURE__ */ e(he, { placeholder: "Type to search..." }),
|
|
7255
|
-
/* @__PURE__ */ e("div", { className: "space-y-0", children:
|
|
7255
|
+
/* @__PURE__ */ e("div", { className: "space-y-0", children: i.map((O, V) => /* @__PURE__ */ e(
|
|
7256
7256
|
Js,
|
|
7257
7257
|
{
|
|
7258
7258
|
email: O,
|
|
@@ -7381,12 +7381,12 @@ const Hs = [
|
|
|
7381
7381
|
// two columns for large screens
|
|
7382
7382
|
}
|
|
7383
7383
|
};
|
|
7384
|
-
function Vt({ contact: t, sizeMeta: a, isSelected: s, onClick:
|
|
7384
|
+
function Vt({ contact: t, sizeMeta: a, isSelected: s, onClick: o }) {
|
|
7385
7385
|
return /* @__PURE__ */ n(
|
|
7386
7386
|
"div",
|
|
7387
7387
|
{
|
|
7388
7388
|
className: `flex items-center gap-4 p-4 cursor-pointer rounded-lg border transition-all duration-200 group ${s ? "bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800 shadow-sm" : "border-zinc-200 dark:border-zinc-800 hover:bg-zinc-50 dark:hover:bg-zinc-800/50 hover:border-zinc-300 dark:hover:border-zinc-700"}`,
|
|
7389
|
-
onClick: () =>
|
|
7389
|
+
onClick: () => o(t),
|
|
7390
7390
|
children: [
|
|
7391
7391
|
/* @__PURE__ */ e("div", { className: `${a.avatarSize} flex-shrink-0 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 }),
|
|
7392
7392
|
/* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
|
|
@@ -7475,31 +7475,31 @@ function el({
|
|
|
7475
7475
|
size: t = "md",
|
|
7476
7476
|
showCheckbox: a = !1,
|
|
7477
7477
|
checkboxPosition: s = "top-left",
|
|
7478
|
-
onSelect:
|
|
7478
|
+
onSelect: o,
|
|
7479
7479
|
identity: l = "_id",
|
|
7480
7480
|
title: m = "Directory",
|
|
7481
|
-
contacts:
|
|
7481
|
+
contacts: i = Hs,
|
|
7482
7482
|
selectedIndex: u = 0,
|
|
7483
7483
|
...g
|
|
7484
7484
|
}) {
|
|
7485
|
-
const [f, x] = L(u), r =
|
|
7486
|
-
x(R),
|
|
7487
|
-
}, $ =
|
|
7485
|
+
const [f, x] = L(u), r = ie(t), N = ce[r], d = Qs[r], p = (E, R) => {
|
|
7486
|
+
x(R), o?.(E);
|
|
7487
|
+
}, $ = i[f] || i[0], A = d.layout === "split";
|
|
7488
7488
|
return /* @__PURE__ */ n(
|
|
7489
|
-
|
|
7489
|
+
oe,
|
|
7490
7490
|
{
|
|
7491
7491
|
className: `flex flex-col ${N.card} ${d.wrap}`,
|
|
7492
7492
|
showCheckbox: a,
|
|
7493
7493
|
checkboxPosition: s,
|
|
7494
|
-
onSelect:
|
|
7494
|
+
onSelect: o,
|
|
7495
7495
|
identity: l,
|
|
7496
|
-
details: { type: "directory", title: m, count:
|
|
7496
|
+
details: { type: "directory", title: m, count: i?.length ?? 0 },
|
|
7497
7497
|
...g,
|
|
7498
7498
|
children: [
|
|
7499
7499
|
/* @__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: m }) }),
|
|
7500
7500
|
/* @__PURE__ */ e(Ks, { sizeMeta: d }),
|
|
7501
7501
|
A ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
|
|
7502
|
-
/* @__PURE__ */ e("div", { className: "space-y-3", children:
|
|
7502
|
+
/* @__PURE__ */ e("div", { className: "space-y-3", children: i.map((E, R) => /* @__PURE__ */ e(
|
|
7503
7503
|
Vt,
|
|
7504
7504
|
{
|
|
7505
7505
|
contact: E,
|
|
@@ -7518,7 +7518,7 @@ function el({
|
|
|
7518
7518
|
)
|
|
7519
7519
|
] }) : (
|
|
7520
7520
|
// Single column layout for small screens
|
|
7521
|
-
/* @__PURE__ */ e("div", { className: "space-y-3", children:
|
|
7521
|
+
/* @__PURE__ */ e("div", { className: "space-y-3", children: i.map((E, R) => /* @__PURE__ */ e(
|
|
7522
7522
|
Vt,
|
|
7523
7523
|
{
|
|
7524
7524
|
contact: E,
|
|
@@ -7556,12 +7556,12 @@ el.propTypes = {
|
|
|
7556
7556
|
selectedIndex: c.number
|
|
7557
7557
|
};
|
|
7558
7558
|
const De = (t) => new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" }).format(Number(t || 0));
|
|
7559
|
-
function tl({ side: t = "left", date: a, title: s, amount:
|
|
7559
|
+
function tl({ side: t = "left", date: a, title: s, amount: o, kind: l = "payment" }) {
|
|
7560
7560
|
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: [
|
|
7561
7561
|
/* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: a }),
|
|
7562
7562
|
/* @__PURE__ */ e("div", { className: "mt-1 text-sm text-zinc-700 dark:text-zinc-200", children: s }),
|
|
7563
7563
|
/* @__PURE__ */ n("div", { className: "mt-2 flex items-center justify-between", children: [
|
|
7564
|
-
/* @__PURE__ */ e("div", { className: "text-sm font-semibold", children: De(
|
|
7564
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-semibold", children: De(o) }),
|
|
7565
7565
|
/* @__PURE__ */ e(
|
|
7566
7566
|
"div",
|
|
7567
7567
|
{
|
|
@@ -7608,11 +7608,11 @@ function rl({
|
|
|
7608
7608
|
size: t = "md",
|
|
7609
7609
|
showCheckbox: a = !1,
|
|
7610
7610
|
checkboxPosition: s = "top-left",
|
|
7611
|
-
onSelect:
|
|
7611
|
+
onSelect: o,
|
|
7612
7612
|
identity: l = "_id",
|
|
7613
7613
|
// content
|
|
7614
7614
|
title: m = "Account Summary",
|
|
7615
|
-
termLabel:
|
|
7615
|
+
termLabel: i = "Spring 2024",
|
|
7616
7616
|
balance: u = 3e3,
|
|
7617
7617
|
totalCharges: g = 4440,
|
|
7618
7618
|
totalPayments: f = 1568,
|
|
@@ -7634,22 +7634,22 @@ function rl({
|
|
|
7634
7634
|
],
|
|
7635
7635
|
...r
|
|
7636
7636
|
}) {
|
|
7637
|
-
const N =
|
|
7637
|
+
const N = ie(t), d = ce[N], p = al[N];
|
|
7638
7638
|
return /* @__PURE__ */ n(
|
|
7639
|
-
|
|
7639
|
+
oe,
|
|
7640
7640
|
{
|
|
7641
7641
|
className: `flex flex-col ${d.card} ${p.wrap}`,
|
|
7642
7642
|
showCheckbox: a,
|
|
7643
7643
|
checkboxPosition: s,
|
|
7644
|
-
onSelect:
|
|
7644
|
+
onSelect: o,
|
|
7645
7645
|
identity: l,
|
|
7646
|
-
details: { type: "account-summary", termLabel:
|
|
7646
|
+
details: { type: "account-summary", termLabel: i, balance: u, totalCharges: g, totalPayments: f },
|
|
7647
7647
|
...r,
|
|
7648
7648
|
children: [
|
|
7649
7649
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
7650
7650
|
/* @__PURE__ */ e("div", { className: `font-semibold ${d.title}`, children: m }),
|
|
7651
7651
|
/* @__PURE__ */ n("div", { className: "rounded-full border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-900 px-3 py-1 text-sm flex items-center gap-2", children: [
|
|
7652
|
-
/* @__PURE__ */ e("span", { children:
|
|
7652
|
+
/* @__PURE__ */ e("span", { children: i }),
|
|
7653
7653
|
/* @__PURE__ */ e(vt, { className: "h-4 w-4 opacity-70" })
|
|
7654
7654
|
] })
|
|
7655
7655
|
] }),
|
|
@@ -7791,30 +7791,30 @@ function _t({ leave: t, sizeMeta: a }) {
|
|
|
7791
7791
|
/* @__PURE__ */ e("span", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${a.table}`, children: t.name }),
|
|
7792
7792
|
/* @__PURE__ */ e("span", { className: `text-zinc-600 dark:text-zinc-400 ${a.table}`, children: t.available })
|
|
7793
7793
|
] }) }),
|
|
7794
|
-
/* @__PURE__ */ e("div", { className: "divide-y divide-zinc-200 dark:divide-zinc-800", children: t.breakdown.map((s,
|
|
7794
|
+
/* @__PURE__ */ e("div", { className: "divide-y divide-zinc-200 dark:divide-zinc-800", children: t.breakdown.map((s, o) => /* @__PURE__ */ n("div", { className: "flex justify-between items-center px-4 py-3", children: [
|
|
7795
7795
|
/* @__PURE__ */ e("span", { className: `text-zinc-700 dark:text-zinc-300 ${a.table}`, children: s.label }),
|
|
7796
7796
|
/* @__PURE__ */ e("span", { className: `font-medium ${s.change === "positive" ? "text-green-600 dark:text-green-400" : s.change === "negative" ? "text-red-600 dark:text-red-400" : "text-zinc-900 dark:text-zinc-100"} ${a.table}`, children: s.value })
|
|
7797
|
-
] },
|
|
7797
|
+
] }, o)) })
|
|
7798
7798
|
] });
|
|
7799
7799
|
}
|
|
7800
7800
|
function sl({
|
|
7801
7801
|
size: t = "md",
|
|
7802
7802
|
showCheckbox: a = !1,
|
|
7803
7803
|
checkboxPosition: s = "top-left",
|
|
7804
|
-
onSelect:
|
|
7804
|
+
onSelect: o,
|
|
7805
7805
|
identity: l = "_id",
|
|
7806
7806
|
title: m = "Pay Stub and Leave Balance",
|
|
7807
|
-
term:
|
|
7807
|
+
term: i = "Fall 2025",
|
|
7808
7808
|
...u
|
|
7809
7809
|
}) {
|
|
7810
|
-
const [g, f] = L("vacation"), [x, r] = L(!1), N =
|
|
7810
|
+
const [g, f] = L("vacation"), [x, r] = L(!1), N = ie(t), d = ce[N], p = nl[N], $ = qe.find((A) => A.id === g) || qe[0];
|
|
7811
7811
|
return /* @__PURE__ */ n(
|
|
7812
|
-
|
|
7812
|
+
oe,
|
|
7813
7813
|
{
|
|
7814
7814
|
className: `flex flex-col ${d.card} ${p.wrap}`,
|
|
7815
7815
|
showCheckbox: a,
|
|
7816
7816
|
checkboxPosition: s,
|
|
7817
|
-
onSelect:
|
|
7817
|
+
onSelect: o,
|
|
7818
7818
|
identity: l,
|
|
7819
7819
|
details: { type: "leave-balance", title: m },
|
|
7820
7820
|
...u,
|
|
@@ -7825,7 +7825,7 @@ function sl({
|
|
|
7825
7825
|
/* @__PURE__ */ n("div", { className: `text-zinc-600 dark:text-zinc-400 ${p.term} flex items-center gap-2`, children: [
|
|
7826
7826
|
/* @__PURE__ */ e(qt, { className: "h-4 w-4" }),
|
|
7827
7827
|
"Term - ",
|
|
7828
|
-
|
|
7828
|
+
i
|
|
7829
7829
|
] })
|
|
7830
7830
|
] }),
|
|
7831
7831
|
/* @__PURE__ */ n("div", { className: "relative", children: [
|
|
@@ -7915,7 +7915,7 @@ const ll = [
|
|
|
7915
7915
|
// icon: Video,
|
|
7916
7916
|
// color: "text-purple-500"
|
|
7917
7917
|
// }
|
|
7918
|
-
],
|
|
7918
|
+
], ol = [
|
|
7919
7919
|
{
|
|
7920
7920
|
id: "file-1",
|
|
7921
7921
|
name: "2024 - Taurus",
|
|
@@ -7948,7 +7948,7 @@ const ll = [
|
|
|
7948
7948
|
icon: pt,
|
|
7949
7949
|
color: "text-orange-500"
|
|
7950
7950
|
}
|
|
7951
|
-
],
|
|
7951
|
+
], il = {
|
|
7952
7952
|
sm: {
|
|
7953
7953
|
wrap: "max-w-xs w-full",
|
|
7954
7954
|
title: "text-base font-semibold",
|
|
@@ -7978,9 +7978,9 @@ const ll = [
|
|
|
7978
7978
|
}
|
|
7979
7979
|
};
|
|
7980
7980
|
function Ut({ item: t, sizeMeta: a, showDate: s = !1 }) {
|
|
7981
|
-
const
|
|
7981
|
+
const o = t.icon;
|
|
7982
7982
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-3 p-3 rounded-lg border border-zinc-200 dark:border-zinc-800 hover:bg-zinc-50 dark:hover:bg-zinc-800/50 cursor-pointer transition-colors duration-200 group", children: [
|
|
7983
|
-
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(
|
|
7983
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(o, { className: `h-6 w-6 ${t.color}` }) }),
|
|
7984
7984
|
/* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
|
|
7985
7985
|
/* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 truncate ${a.item}`, children: t.name }),
|
|
7986
7986
|
s ? /* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${a.count}`, children: t.date }) : /* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${a.count}`, children: t.count })
|
|
@@ -7992,20 +7992,20 @@ function cl({
|
|
|
7992
7992
|
size: t = "md",
|
|
7993
7993
|
showCheckbox: a = !1,
|
|
7994
7994
|
checkboxPosition: s = "top-left",
|
|
7995
|
-
onSelect:
|
|
7995
|
+
onSelect: o,
|
|
7996
7996
|
identity: l = "_id",
|
|
7997
7997
|
title: m = "Drive",
|
|
7998
|
-
subtitle:
|
|
7998
|
+
subtitle: i = "Drive Shared",
|
|
7999
7999
|
...u
|
|
8000
8000
|
}) {
|
|
8001
|
-
const [g, f] = L(!1), x =
|
|
8001
|
+
const [g, f] = L(!1), x = ie(t), r = ce[x], N = il[x];
|
|
8002
8002
|
return /* @__PURE__ */ n(
|
|
8003
|
-
|
|
8003
|
+
oe,
|
|
8004
8004
|
{
|
|
8005
8005
|
className: `flex flex-col ${r.card} ${N.wrap}`,
|
|
8006
8006
|
showCheckbox: a,
|
|
8007
8007
|
checkboxPosition: s,
|
|
8008
|
-
onSelect:
|
|
8008
|
+
onSelect: o,
|
|
8009
8009
|
identity: l,
|
|
8010
8010
|
details: { type: "drive", title: m },
|
|
8011
8011
|
...u,
|
|
@@ -8013,7 +8013,7 @@ function cl({
|
|
|
8013
8013
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
8014
8014
|
/* @__PURE__ */ n("div", { children: [
|
|
8015
8015
|
/* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${N.title} mb-1`, children: m }),
|
|
8016
|
-
/* @__PURE__ */ e("div", { className: "text-zinc-600 dark:text-zinc-400 text-sm", children:
|
|
8016
|
+
/* @__PURE__ */ e("div", { className: "text-zinc-600 dark:text-zinc-400 text-sm", children: i })
|
|
8017
8017
|
] }),
|
|
8018
8018
|
/* @__PURE__ */ n("div", { className: "relative", children: [
|
|
8019
8019
|
/* @__PURE__ */ e(
|
|
@@ -8046,7 +8046,7 @@ function cl({
|
|
|
8046
8046
|
)) }),
|
|
8047
8047
|
N.showRecent && /* @__PURE__ */ n("div", { className: "", children: [
|
|
8048
8048
|
/* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${N.item}`, children: "Recent Files" }),
|
|
8049
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children:
|
|
8049
|
+
/* @__PURE__ */ e("div", { className: "space-y-2", children: ol.map((d) => /* @__PURE__ */ e(
|
|
8050
8050
|
Ut,
|
|
8051
8051
|
{
|
|
8052
8052
|
item: d,
|
|
@@ -8189,9 +8189,9 @@ const dl = [
|
|
|
8189
8189
|
};
|
|
8190
8190
|
}
|
|
8191
8191
|
};
|
|
8192
|
-
function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead:
|
|
8193
|
-
const [l, m] = L(!1),
|
|
8194
|
-
return l ? null : /* @__PURE__ */ n("div", { className: `relative rounded-lg border-l-4 p-4 transition-all duration-200 ${
|
|
8192
|
+
function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: o }) {
|
|
8193
|
+
const [l, m] = L(!1), i = Aa(t.type), u = ul(t.type);
|
|
8194
|
+
return l ? null : /* @__PURE__ */ n("div", { className: `relative rounded-lg border-l-4 p-4 transition-all duration-200 ${i.bg} ${i.border} ${t.read ? "border-l-2 opacity-80" : "border-l-4"}`, style: { borderLeftColor: i.accent }, children: [
|
|
8195
8195
|
/* @__PURE__ */ e(
|
|
8196
8196
|
"button",
|
|
8197
8197
|
{
|
|
@@ -8200,7 +8200,7 @@ function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
|
|
|
8200
8200
|
}
|
|
8201
8201
|
),
|
|
8202
8202
|
/* @__PURE__ */ n("div", { className: "flex gap-3 pr-6", children: [
|
|
8203
|
-
/* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(u, { className: `h-4 w-4 ${
|
|
8203
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(u, { className: `h-4 w-4 ${i.icon}` }) }),
|
|
8204
8204
|
/* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
|
|
8205
8205
|
/* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-1 ${t.read ? "font-medium" : "font-semibold"}`, children: Gt(t.title, a.maxTitleWords) }),
|
|
8206
8206
|
a.showMessage && t.message && /* @__PURE__ */ e("div", { className: `${a.message} text-zinc-600 dark:text-zinc-400 mb-2 leading-relaxed`, children: Gt(t.message, a.maxMessageWords) }),
|
|
@@ -8214,8 +8214,8 @@ function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
|
|
|
8214
8214
|
] });
|
|
8215
8215
|
}
|
|
8216
8216
|
function pl({ alert: t, onDismiss: a }) {
|
|
8217
|
-
const [s,
|
|
8218
|
-
|
|
8217
|
+
const [s, o] = L(!1), l = Aa("banner"), m = () => {
|
|
8218
|
+
o(!0), a?.(t);
|
|
8219
8219
|
};
|
|
8220
8220
|
return s ? null : /* @__PURE__ */ e("div", { className: `rounded-lg border p-4 ${l.bg} ${l.border} relative`, children: /* @__PURE__ */ n("div", { className: "flex items-start gap-3", children: [
|
|
8221
8221
|
/* @__PURE__ */ e(na, { className: `h-5 w-5 mt-0.5 ${l.icon}` }),
|
|
@@ -8237,23 +8237,23 @@ function gl({
|
|
|
8237
8237
|
size: t = "md",
|
|
8238
8238
|
showCheckbox: a = !1,
|
|
8239
8239
|
checkboxPosition: s = "top-left",
|
|
8240
|
-
onSelect:
|
|
8240
|
+
onSelect: o,
|
|
8241
8241
|
identity: l = "_id",
|
|
8242
8242
|
title: m = "Alerts",
|
|
8243
|
-
alerts:
|
|
8243
|
+
alerts: i = dl,
|
|
8244
8244
|
showBanner: u = !0,
|
|
8245
8245
|
...g
|
|
8246
8246
|
}) {
|
|
8247
|
-
const [f, x] = L(
|
|
8247
|
+
const [f, x] = L(i), r = ie(t), N = ce[r], d = ml[r], p = (E) => {
|
|
8248
8248
|
x((R) => R.filter((O) => O.id !== E.id));
|
|
8249
8249
|
}, $ = f.find((E) => E.type === "banner"), A = f.filter((E) => E.type !== "banner");
|
|
8250
8250
|
return /* @__PURE__ */ n(
|
|
8251
|
-
|
|
8251
|
+
oe,
|
|
8252
8252
|
{
|
|
8253
8253
|
className: `flex flex-col ${N.card} ${d.wrap}`,
|
|
8254
8254
|
showCheckbox: a,
|
|
8255
8255
|
checkboxPosition: s,
|
|
8256
|
-
onSelect:
|
|
8256
|
+
onSelect: o,
|
|
8257
8257
|
identity: l,
|
|
8258
8258
|
details: { type: "alerts", title: m, count: f.length },
|
|
8259
8259
|
...g,
|
|
@@ -8378,7 +8378,7 @@ const bl = [
|
|
|
8378
8378
|
}
|
|
8379
8379
|
};
|
|
8380
8380
|
function yl({ video: t, sizeMeta: a }) {
|
|
8381
|
-
const [s,
|
|
8381
|
+
const [s, o] = L(!1);
|
|
8382
8382
|
return /* @__PURE__ */ n("div", { className: "group cursor-pointer", children: [
|
|
8383
8383
|
/* @__PURE__ */ n("div", { className: `relative ${a.thumbnailHeight} rounded-lg overflow-hidden bg-zinc-200 dark:bg-zinc-800`, children: [
|
|
8384
8384
|
/* @__PURE__ */ e(
|
|
@@ -8414,22 +8414,22 @@ function xl({
|
|
|
8414
8414
|
size: t = "md",
|
|
8415
8415
|
showCheckbox: a = !1,
|
|
8416
8416
|
checkboxPosition: s = "top-left",
|
|
8417
|
-
onSelect:
|
|
8417
|
+
onSelect: o,
|
|
8418
8418
|
identity: l = "_id",
|
|
8419
8419
|
title: m = "Videos",
|
|
8420
|
-
videos:
|
|
8420
|
+
videos: i = bl,
|
|
8421
8421
|
...u
|
|
8422
8422
|
}) {
|
|
8423
|
-
const [g, f] = L(!1), x =
|
|
8423
|
+
const [g, f] = L(!1), x = ie(t), r = ce[x], N = fl[x];
|
|
8424
8424
|
return /* @__PURE__ */ n(
|
|
8425
|
-
|
|
8425
|
+
oe,
|
|
8426
8426
|
{
|
|
8427
8427
|
className: `flex flex-col ${r.card} ${N.wrap}`,
|
|
8428
8428
|
showCheckbox: a,
|
|
8429
8429
|
checkboxPosition: s,
|
|
8430
|
-
onSelect:
|
|
8430
|
+
onSelect: o,
|
|
8431
8431
|
identity: l,
|
|
8432
|
-
details: { type: "videos", title: m, count:
|
|
8432
|
+
details: { type: "videos", title: m, count: i.length },
|
|
8433
8433
|
...u,
|
|
8434
8434
|
children: [
|
|
8435
8435
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between ", children: [
|
|
@@ -8454,7 +8454,7 @@ function xl({
|
|
|
8454
8454
|
] })
|
|
8455
8455
|
] })
|
|
8456
8456
|
] }),
|
|
8457
|
-
/* @__PURE__ */ e("div", { className: `grid ${N.gridCols} gap-4 `, children:
|
|
8457
|
+
/* @__PURE__ */ e("div", { className: `grid ${N.gridCols} gap-4 `, children: i.slice(0, N.gridCols === "grid-cols-3" ? 6 : 4).map((d) => /* @__PURE__ */ e(
|
|
8458
8458
|
yl,
|
|
8459
8459
|
{
|
|
8460
8460
|
video: d,
|
|
@@ -8491,7 +8491,7 @@ xl.propTypes = {
|
|
|
8491
8491
|
export {
|
|
8492
8492
|
rl as AccountSummaryMock,
|
|
8493
8493
|
Ds as ActivityMock,
|
|
8494
|
-
|
|
8494
|
+
os as AddUserGroupsRolesModal,
|
|
8495
8495
|
gl as AlertsMock,
|
|
8496
8496
|
Ce as Avatar,
|
|
8497
8497
|
kn as AvatarGroup,
|
|
@@ -8501,7 +8501,7 @@ export {
|
|
|
8501
8501
|
js as CampusMapMock,
|
|
8502
8502
|
da as Checkbox,
|
|
8503
8503
|
Es as CommunitiesMock,
|
|
8504
|
-
|
|
8504
|
+
eo as CustomDataGrid,
|
|
8505
8505
|
Wl as CustomDialog,
|
|
8506
8506
|
Kl as CustomGridToolbar,
|
|
8507
8507
|
Xl as CustomTab,
|
|
@@ -8530,7 +8530,7 @@ export {
|
|
|
8530
8530
|
ha as RadioGroup,
|
|
8531
8531
|
he as SearchBar,
|
|
8532
8532
|
ft as Select,
|
|
8533
|
-
|
|
8533
|
+
oe as SelectableCard,
|
|
8534
8534
|
Pl as Sidebar,
|
|
8535
8535
|
ga as Spinner,
|
|
8536
8536
|
ba as Textarea,
|
|
@@ -8558,7 +8558,7 @@ export {
|
|
|
8558
8558
|
Yl as http,
|
|
8559
8559
|
qn as localStore,
|
|
8560
8560
|
wt as myDriveGatewayBaseV2,
|
|
8561
|
-
|
|
8561
|
+
ie as normalizeSize,
|
|
8562
8562
|
Ie as notify,
|
|
8563
8563
|
ka as provisioningBase,
|
|
8564
8564
|
Ca as rbacBase,
|