unifyedx-storybook-new 0.2.48 → 0.2.51
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
|
-
import ae, { useState as j, useMemo as
|
|
3
|
-
import { a as Q, U as dt, X as ye, P as c, L as ja, C as fe, b as Ke, D as mt, f as zt, d as Yt, F as Va, e as _a, h as Ua, T as Qe, u as Ga, I as Wt, i as Jt, j as qa, k as Ya, l as Wa, m as Xt, S as vt, n as Qt, M as Ja, o as Xa, p as Nt, q as Qa, A as Ha, E as Ht, r as Za, s as Ka, t as er, v as tr, w as Zt, x as ar, y as Kt, z as ea, B as rr, G as nr, H as sr, J as He, K as ut, N as ht, O as lr, Q as
|
|
2
|
+
import ae, { useState as j, useMemo as oe, useId as Xe, Fragment as H, useEffect as Z, useCallback as se, useRef as ge } from "react";
|
|
3
|
+
import { a as Q, U as dt, X as ye, P as c, L as ja, C as fe, b as Ke, D as mt, f as zt, d as Yt, F as Va, e as _a, h as Ua, T as Qe, u as Ga, I as Wt, i as Jt, j as qa, k as Ya, l as Wa, m as Xt, S as vt, n as Qt, M as Ja, o as Xa, p as Nt, q as Qa, A as Ha, E as Ht, r as Za, s as Ka, t as er, v as tr, w as Zt, x as ar, y as Kt, z as ea, B as rr, G as nr, H as sr, J as He, K as ut, N as ht, O as lr, Q as or, R as ta, V as ir, W as wt, Y as cr, Z as dr, _ as Le, $ as mr, a0 as ur, a1 as hr, a2 as pr, a3 as gr, a4 as br, a5 as St, a6 as fr, a7 as yr, a8 as xr, a9 as vr, aa as Nr, ab as wr, ac as kr, ad as Cr, ae as zr, af as Ae, ag as aa, ah as Sr, ai as Dr, aj as $r, ak as Tr, al as Ar, am as ra, an as Fr, ao as Er, ap as na, aq as Rr, ar as pt, as as sa, at as Or } from "./vendor-DoYRzmYd.js";
|
|
4
4
|
import { Popover as Ir, PopoverButton as Pr, PopoverPanel as Lr, Transition as ue, Dialog as be, TransitionChild as Ne, DialogPanel as Fe, DialogTitle as et, TabGroup as Mr, TabList as Br, Tab as ne, TabPanels as jr, RadioGroup as _e, Listbox as K, ListboxButton as Vr, ListboxOptions as _r, ListboxOption as Ur, SwitchGroup as Gr, Switch as lt, Menu as qr, MenuButton as Yr, Portal as Wr, MenuItems as Jr, MenuItem as Xr, DialogBackdrop as Qr } from "@headlessui/react";
|
|
5
5
|
import { motion as le, AnimatePresence as ke } from "framer-motion";
|
|
6
6
|
import { d as Hr } from "./vendor-lodash-DUMS_goM.js";
|
|
7
|
-
import { useFloating as la, offset as
|
|
8
|
-
import
|
|
7
|
+
import { useFloating as la, offset as oa, flip as ia, shift as ca, autoUpdate as da, useClick as Zr, useDismiss as Kr, useInteractions as en, FloatingPortal as tn } from "@floating-ui/react";
|
|
8
|
+
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 Dt } 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
|
-
const [u, g] = j(!1), f =
|
|
32
|
+
const [u, g] = j(!1), f = oe(() => Nn(a), []), y = t && !u, r = !y && a, x = !y && !a, d = Q(
|
|
33
33
|
"avatar-container",
|
|
34
34
|
`avatar--size-${s}`,
|
|
35
35
|
m
|
|
36
|
-
), p = y ? "transparent" :
|
|
36
|
+
), p = y ? "transparent" : o || f.bg, S = l || f.text;
|
|
37
37
|
return /* @__PURE__ */ n("div", { className: d, style: {
|
|
38
38
|
backgroundColor: p,
|
|
39
39
|
color: S
|
|
40
|
-
}, ...
|
|
40
|
+
}, ...i, children: [
|
|
41
41
|
y && /* @__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
|
x && /* @__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 = ae.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 = ae.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, S = u && !y, T = Q(
|
|
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": S
|
|
@@ -174,8 +174,8 @@ const zn = {
|
|
|
174
174
|
className: T,
|
|
175
175
|
disabled: p,
|
|
176
176
|
onClick: x,
|
|
177
|
-
title: a || S &&
|
|
178
|
-
"aria-label":
|
|
177
|
+
title: a || S && o || (typeof y == "string" ? y : void 0),
|
|
178
|
+
"aria-label": o || S && a || (typeof y == "string" ? y : void 0),
|
|
179
179
|
...d,
|
|
180
180
|
children: m ? /* @__PURE__ */ e(ja, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(te, { children: [
|
|
181
181
|
u && /* @__PURE__ */ e(u, { size: f === "large" ? 20 : 16 }),
|
|
@@ -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
|
}) }) }), gt = ({
|
|
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: Q("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
|
zt(f, "MMM d, y"),
|
|
294
294
|
" - ",
|
|
295
295
|
zt(y, "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: Q("datepicker-wrapper", u), children: [
|
|
298
298
|
l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "daterangepicker-input", children: l }),
|
|
299
299
|
/* @__PURE__ */ n($n, { children: [
|
|
@@ -305,17 +305,17 @@ const zn = {
|
|
|
305
305
|
type: "button",
|
|
306
306
|
className: Q("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 && y ? `Selected range is ${x}` :
|
|
310
|
+
disabled: i,
|
|
311
|
+
"aria-label": f && y ? `Selected range is ${x}` : o,
|
|
312
312
|
children: [
|
|
313
313
|
/* @__PURE__ */ e(Yt, { className: "datepicker-icon" }),
|
|
314
314
|
/* @__PURE__ */ e("span", { className: "datepicker-value", children: x })
|
|
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
|
}, Tt = ({ 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" }) }), At = (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 S =
|
|
608
|
+
const S = i.length > 0 || u.length > 0;
|
|
609
609
|
return /* @__PURE__ */ e(ue, { appear: !0, show: t, as: H, children: /* @__PURE__ */ n(
|
|
610
610
|
be,
|
|
611
611
|
{
|
|
@@ -643,7 +643,7 @@ const zn = {
|
|
|
643
643
|
className: "dialog-panel",
|
|
644
644
|
onClick: (T) => T.stopPropagation(),
|
|
645
645
|
children: [
|
|
646
|
-
/* @__PURE__ */ e("input", { ...
|
|
646
|
+
/* @__PURE__ */ e("input", { ...o() }),
|
|
647
647
|
/* @__PURE__ */ n("form", { onSubmit: y, className: "form-wrapper", children: [
|
|
648
648
|
/* @__PURE__ */ n("div", { className: "dialog-header", children: [
|
|
649
649
|
/* @__PURE__ */ e(et, { as: "h3", className: "dialog-title-text", children: d }),
|
|
@@ -684,7 +684,7 @@ const zn = {
|
|
|
684
684
|
S && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
|
|
685
685
|
/* @__PURE__ */ e("h3", { children: "Upload Queue" }),
|
|
686
686
|
/* @__PURE__ */ n("ul", { className: "file-list", children: [
|
|
687
|
-
|
|
687
|
+
i.map((T, R) => /* @__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
|
}, ft = (t) => {
|
|
790
|
-
const a = new Date(t), s = a.getDay(),
|
|
791
|
-
return Me(new Date(a.setDate(
|
|
790
|
+
const a = new Date(t), s = a.getDay(), o = a.getDate() - s;
|
|
791
|
+
return Me(new Date(a.setDate(o)));
|
|
792
792
|
}, On = (t) => Be(bt(ft(t), 6)), Ft = (t) => {
|
|
793
793
|
const a = new Date(t);
|
|
794
794
|
return Me(new Date(a.getFullYear(), a.getMonth(), 1));
|
|
@@ -811,8 +811,8 @@ const zn = {
|
|
|
811
811
|
case "this_month":
|
|
812
812
|
return [Ft(a), Et(a)];
|
|
813
813
|
case "last_month": {
|
|
814
|
-
const s = /* @__PURE__ */ new Date(),
|
|
815
|
-
return [Ft(
|
|
814
|
+
const s = /* @__PURE__ */ new Date(), o = new Date(s.getFullYear(), s.getMonth() - 1, 1);
|
|
815
|
+
return [Ft(o), Et(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
|
}) => {
|
|
@@ -855,7 +855,7 @@ const zn = {
|
|
|
855
855
|
}), a();
|
|
856
856
|
},
|
|
857
857
|
enableReinitialize: !0
|
|
858
|
-
}), R =
|
|
858
|
+
}), R = oe(() => l.reduce((C, h) => {
|
|
859
859
|
const v = h.key, $ = T.values[v];
|
|
860
860
|
let B = !1;
|
|
861
861
|
if ($)
|
|
@@ -869,7 +869,7 @@ const zn = {
|
|
|
869
869
|
break;
|
|
870
870
|
}
|
|
871
871
|
return C[v] = B, C;
|
|
872
|
-
}, {}), [l, T.values]), O = Object.values(R).filter(Boolean).length, L =
|
|
872
|
+
}, {}), [l, T.values]), O = Object.values(R).filter(Boolean).length, L = oe(() => l.some((C) => {
|
|
873
873
|
if (C.type !== "date") return !1;
|
|
874
874
|
const h = T.values?.[C.key]?.values;
|
|
875
875
|
if (!Array.isArray(h) || h.length < 2) return !1;
|
|
@@ -891,7 +891,7 @@ const zn = {
|
|
|
891
891
|
const h = l[C].key, v = l[C].url;
|
|
892
892
|
l[C].type === "multiselect-users" && g[h].length === 0 && !y[h] && _(h, v);
|
|
893
893
|
}, Y = () => {
|
|
894
|
-
T.resetForm(), f({ createdBy: [], updatedBy: [] }),
|
|
894
|
+
T.resetForm(), f({ createdBy: [], updatedBy: [] }), o();
|
|
895
895
|
}, G = (C) => {
|
|
896
896
|
const h = l.find((B) => B.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: Q("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 y = Rt[
|
|
1348
|
+
const y = Rt[i] || Rt.info, r = y.icon, x = () => {
|
|
1349
1349
|
a({ primary: !0, secondary: !1 });
|
|
1350
1350
|
}, d = () => {
|
|
1351
1351
|
a({ primary: !1, secondary: !0 });
|
|
@@ -1379,13 +1379,14 @@ const zn = {
|
|
|
1379
1379
|
/* @__PURE__ */ e("div", { className: `modal-icon-container ${y.iconClass}`, children: /* @__PURE__ */ e(r, { size: 24, "aria-hidden": "true" }) }),
|
|
1380
1380
|
/* @__PURE__ */ n("div", { className: "modal-text-content", children: [
|
|
1381
1381
|
/* @__PURE__ */ e(et, { as: "h3", className: "modal-title", children: s }),
|
|
1382
|
-
/* @__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: [
|
|
1386
1386
|
m && /* @__PURE__ */ e(
|
|
1387
1387
|
ee,
|
|
1388
1388
|
{
|
|
1389
|
+
type: "button",
|
|
1389
1390
|
onClick: d,
|
|
1390
1391
|
label: m,
|
|
1391
1392
|
category: "secondary"
|
|
@@ -1394,6 +1395,7 @@ const zn = {
|
|
|
1394
1395
|
l && /* @__PURE__ */ e(
|
|
1395
1396
|
ee,
|
|
1396
1397
|
{
|
|
1398
|
+
type: "button",
|
|
1397
1399
|
onClick: x,
|
|
1398
1400
|
label: l,
|
|
1399
1401
|
...g
|
|
@@ -1408,18 +1410,18 @@ const zn = {
|
|
|
1408
1410
|
currentPage: t,
|
|
1409
1411
|
totalItems: a,
|
|
1410
1412
|
itemsPerPage: s,
|
|
1411
|
-
onPageChange:
|
|
1413
|
+
onPageChange: o,
|
|
1412
1414
|
onItemsPerPageChange: l,
|
|
1413
1415
|
itemsPerPageOptions: m = [10, 15, 20]
|
|
1414
1416
|
}) => {
|
|
1415
|
-
const
|
|
1417
|
+
const i = Math.ceil(a / s), [u, g] = j(t);
|
|
1416
1418
|
Z(() => {
|
|
1417
1419
|
g(t);
|
|
1418
1420
|
}, [t]);
|
|
1419
1421
|
const f = Math.min((t - 1) * s + 1, a), y = Math.min(t * s, a), r = (x) => {
|
|
1420
1422
|
x.preventDefault();
|
|
1421
1423
|
let d = parseInt(u, 10);
|
|
1422
|
-
isNaN(d) || d < 1 ? d = 1 : d >
|
|
1424
|
+
isNaN(d) || d < 1 ? d = 1 : d > i && (d = i), g(d), d !== t && o(d);
|
|
1423
1425
|
};
|
|
1424
1426
|
return /* @__PURE__ */ n("div", { className: "pagination-container", children: [
|
|
1425
1427
|
/* @__PURE__ */ n("div", { className: "pagination-left", children: [
|
|
@@ -1448,7 +1450,7 @@ const zn = {
|
|
|
1448
1450
|
"button",
|
|
1449
1451
|
{
|
|
1450
1452
|
className: "pagination-button",
|
|
1451
|
-
onClick: () =>
|
|
1453
|
+
onClick: () => o(1),
|
|
1452
1454
|
disabled: t === 1,
|
|
1453
1455
|
children: /* @__PURE__ */ e(qa, { size: 16 })
|
|
1454
1456
|
}
|
|
@@ -1457,7 +1459,7 @@ const zn = {
|
|
|
1457
1459
|
"button",
|
|
1458
1460
|
{
|
|
1459
1461
|
className: "pagination-button",
|
|
1460
|
-
onClick: () =>
|
|
1462
|
+
onClick: () => o(t - 1),
|
|
1461
1463
|
disabled: t === 1,
|
|
1462
1464
|
children: /* @__PURE__ */ e(Ya, { size: 16 })
|
|
1463
1465
|
}
|
|
@@ -1477,15 +1479,15 @@ const zn = {
|
|
|
1477
1479
|
),
|
|
1478
1480
|
/* @__PURE__ */ n("span", { className: "page-input-total", children: [
|
|
1479
1481
|
"of ",
|
|
1480
|
-
|
|
1482
|
+
i
|
|
1481
1483
|
] })
|
|
1482
1484
|
] }),
|
|
1483
1485
|
/* @__PURE__ */ e(
|
|
1484
1486
|
"button",
|
|
1485
1487
|
{
|
|
1486
1488
|
className: "pagination-button",
|
|
1487
|
-
onClick: () =>
|
|
1488
|
-
disabled: t ===
|
|
1489
|
+
onClick: () => o(t + 1),
|
|
1490
|
+
disabled: t === i,
|
|
1489
1491
|
children: /* @__PURE__ */ e(fe, { size: 16 })
|
|
1490
1492
|
}
|
|
1491
1493
|
),
|
|
@@ -1493,8 +1495,8 @@ const zn = {
|
|
|
1493
1495
|
"button",
|
|
1494
1496
|
{
|
|
1495
1497
|
className: "pagination-button",
|
|
1496
|
-
onClick: () => i
|
|
1497
|
-
disabled: t ===
|
|
1498
|
+
onClick: () => o(i),
|
|
1499
|
+
disabled: t === i,
|
|
1498
1500
|
children: /* @__PURE__ */ e(Wa, { size: 16 })
|
|
1499
1501
|
}
|
|
1500
1502
|
)
|
|
@@ -1505,7 +1507,7 @@ const zn = {
|
|
|
1505
1507
|
value: a,
|
|
1506
1508
|
// The currently selected option's value (e.g., 'work')
|
|
1507
1509
|
onChange: s,
|
|
1508
|
-
options:
|
|
1510
|
+
options: o = [],
|
|
1509
1511
|
error: l,
|
|
1510
1512
|
...m
|
|
1511
1513
|
}) => /* @__PURE__ */ n("div", { className: "radiogroup-wrapper", children: [
|
|
@@ -1517,10 +1519,10 @@ const zn = {
|
|
|
1517
1519
|
onChange: s,
|
|
1518
1520
|
className: "radiogroup-container",
|
|
1519
1521
|
...m,
|
|
1520
|
-
children:
|
|
1522
|
+
children: o.map((i) => /* @__PURE__ */ e(
|
|
1521
1523
|
_e.Option,
|
|
1522
1524
|
{
|
|
1523
|
-
value:
|
|
1525
|
+
value: i.value,
|
|
1524
1526
|
className: ({ active: u, checked: g }) => Q("radiogroup-option", {
|
|
1525
1527
|
"radiogroup-option--active": u,
|
|
1526
1528
|
"radiogroup-option--checked": g,
|
|
@@ -1528,20 +1530,20 @@ const zn = {
|
|
|
1528
1530
|
}),
|
|
1529
1531
|
children: ({ checked: u }) => /* @__PURE__ */ n(te, { children: [
|
|
1530
1532
|
/* @__PURE__ */ n("div", { className: "radiogroup-option-content", children: [
|
|
1531
|
-
/* @__PURE__ */ e(_e.Label, { as: "p", className: "option-label", children:
|
|
1532
|
-
|
|
1533
|
+
/* @__PURE__ */ e(_e.Label, { as: "p", className: "option-label", children: i.label }),
|
|
1534
|
+
i.description && /* @__PURE__ */ e(
|
|
1533
1535
|
_e.Description,
|
|
1534
1536
|
{
|
|
1535
1537
|
as: "span",
|
|
1536
1538
|
className: "option-description",
|
|
1537
|
-
children:
|
|
1539
|
+
children: i.description
|
|
1538
1540
|
}
|
|
1539
1541
|
)
|
|
1540
1542
|
] }),
|
|
1541
1543
|
u && /* @__PURE__ */ e("div", { className: "option-checkmark", children: /* @__PURE__ */ e(Xt, { size: 20 }) })
|
|
1542
1544
|
] })
|
|
1543
1545
|
},
|
|
1544
|
-
|
|
1546
|
+
i.value
|
|
1545
1547
|
))
|
|
1546
1548
|
}
|
|
1547
1549
|
),
|
|
@@ -1550,11 +1552,11 @@ const zn = {
|
|
|
1550
1552
|
value: t = "",
|
|
1551
1553
|
onDebouncedChange: a,
|
|
1552
1554
|
debounceDelay: s = 400,
|
|
1553
|
-
placeholder:
|
|
1555
|
+
placeholder: o = "Enter text...",
|
|
1554
1556
|
label: l = "Search",
|
|
1555
1557
|
// Added a default label for accessibility
|
|
1556
1558
|
customClass: m = "",
|
|
1557
|
-
...
|
|
1559
|
+
...i
|
|
1558
1560
|
}) => {
|
|
1559
1561
|
const [u, g] = j(t);
|
|
1560
1562
|
Z(() => {
|
|
@@ -1580,12 +1582,12 @@ const zn = {
|
|
|
1580
1582
|
{
|
|
1581
1583
|
id: "search-field",
|
|
1582
1584
|
className: "search-bar-input",
|
|
1583
|
-
placeholder:
|
|
1585
|
+
placeholder: o,
|
|
1584
1586
|
type: "search",
|
|
1585
1587
|
name: "search",
|
|
1586
1588
|
value: u,
|
|
1587
1589
|
onChange: y,
|
|
1588
|
-
...
|
|
1590
|
+
...i
|
|
1589
1591
|
}
|
|
1590
1592
|
)
|
|
1591
1593
|
] });
|
|
@@ -1595,19 +1597,19 @@ const zn = {
|
|
|
1595
1597
|
// From RHF's <Controller>
|
|
1596
1598
|
onChange: s,
|
|
1597
1599
|
// From RHF's <Controller>
|
|
1598
|
-
options:
|
|
1600
|
+
options: o = [],
|
|
1599
1601
|
placeholder: l = "Select an option...",
|
|
1600
1602
|
disabled: m = !1,
|
|
1601
|
-
error:
|
|
1603
|
+
error: i,
|
|
1602
1604
|
ref: u,
|
|
1603
1605
|
// From RHF's <Controller>
|
|
1604
1606
|
showSearch: g = !0
|
|
1605
1607
|
}) => {
|
|
1606
1608
|
const [f, y] = j("");
|
|
1607
|
-
console.log("Select component - value:", a, "type:", typeof a), console.log("Select component - options:",
|
|
1608
|
-
const r = f === "" ?
|
|
1609
|
+
console.log("Select component - value:", a, "type:", typeof a), console.log("Select component - options:", o);
|
|
1610
|
+
const r = f === "" ? o : o.filter(
|
|
1609
1611
|
(d) => d.label.toLowerCase().includes(f.toLowerCase())
|
|
1610
|
-
), x =
|
|
1612
|
+
), x = o.find((d) => {
|
|
1611
1613
|
if (typeof a == "object" && a !== null) {
|
|
1612
1614
|
if (a === d) return !0;
|
|
1613
1615
|
if (a.id && d.id) return d.id === a.id;
|
|
@@ -1623,7 +1625,7 @@ const zn = {
|
|
|
1623
1625
|
Vr,
|
|
1624
1626
|
{
|
|
1625
1627
|
className: Q("select-button", {
|
|
1626
|
-
"select-button--error": !!
|
|
1628
|
+
"select-button--error": !!i
|
|
1627
1629
|
}),
|
|
1628
1630
|
children: [
|
|
1629
1631
|
/* @__PURE__ */ e("span", { className: "select-value-display", children: x ? x.label : /* @__PURE__ */ e("span", { className: "placeholder", children: l }) }),
|
|
@@ -1677,7 +1679,7 @@ const zn = {
|
|
|
1677
1679
|
}
|
|
1678
1680
|
)
|
|
1679
1681
|
] }),
|
|
1680
|
-
|
|
1682
|
+
i && /* @__PURE__ */ e("p", { className: "select-error-message", children: i })
|
|
1681
1683
|
] }) });
|
|
1682
1684
|
}, Ln = () => {
|
|
1683
1685
|
const [t, a] = j(window.location.pathname);
|
|
@@ -1695,12 +1697,12 @@ const zn = {
|
|
|
1695
1697
|
return s;
|
|
1696
1698
|
return null;
|
|
1697
1699
|
}, pa = ({ item: t, isCollapsed: a, level: s = 0 }) => {
|
|
1698
|
-
const { pathname:
|
|
1700
|
+
const { pathname: o } = Ln(), l = t.href || t.url || t.path, [m, i] = j(!1), u = t.icon;
|
|
1699
1701
|
Z(() => {
|
|
1700
|
-
xt([t],
|
|
1701
|
-
}, [t,
|
|
1702
|
-
const g =
|
|
1703
|
-
r.preventDefault(),
|
|
1702
|
+
xt([t], o) && i(!0);
|
|
1703
|
+
}, [t, o]);
|
|
1704
|
+
const g = o === l, f = !g && !!xt([t], o), y = (r) => {
|
|
1705
|
+
r.preventDefault(), i(!m);
|
|
1704
1706
|
};
|
|
1705
1707
|
return /* @__PURE__ */ n(
|
|
1706
1708
|
"div",
|
|
@@ -1770,13 +1772,13 @@ const zn = {
|
|
|
1770
1772
|
navItems: t = [],
|
|
1771
1773
|
isCollapsed: a = !1,
|
|
1772
1774
|
onToggleCollapse: s,
|
|
1773
|
-
isMobileOpen:
|
|
1775
|
+
isMobileOpen: o = !1,
|
|
1774
1776
|
onToggleMobile: l,
|
|
1775
1777
|
logoSmall: m,
|
|
1776
|
-
logoLarge:
|
|
1778
|
+
logoLarge: i,
|
|
1777
1779
|
user: u = { name: "", email: "" }
|
|
1778
1780
|
}) => /* @__PURE__ */ n(te, { children: [
|
|
1779
|
-
|
|
1781
|
+
o && /* @__PURE__ */ e(
|
|
1780
1782
|
"div",
|
|
1781
1783
|
{
|
|
1782
1784
|
className: "sidebar-overlay",
|
|
@@ -1789,12 +1791,12 @@ const zn = {
|
|
|
1789
1791
|
{
|
|
1790
1792
|
className: Q("sidebar", {
|
|
1791
1793
|
"sidebar--collapsed": a,
|
|
1792
|
-
"sidebar--mobile-open":
|
|
1794
|
+
"sidebar--mobile-open": o
|
|
1793
1795
|
}),
|
|
1794
1796
|
"aria-label": "Main navigation",
|
|
1795
1797
|
children: [
|
|
1796
1798
|
/* @__PURE__ */ n("div", { className: "sidebar-header", children: [
|
|
1797
|
-
/* @__PURE__ */ e("div", { className: "sidebar-logo", children: a ? m :
|
|
1799
|
+
/* @__PURE__ */ e("div", { className: "sidebar-logo", children: a ? m : i }),
|
|
1798
1800
|
!a && /* @__PURE__ */ n("div", { className: "sidebar-search-container", children: [
|
|
1799
1801
|
/* @__PURE__ */ e(vt, { className: "sidebar-search-icon" }),
|
|
1800
1802
|
/* @__PURE__ */ e(
|
|
@@ -1843,7 +1845,7 @@ const zn = {
|
|
|
1843
1845
|
color: a = "primary",
|
|
1844
1846
|
// 'primary', 'white'
|
|
1845
1847
|
className: s,
|
|
1846
|
-
...
|
|
1848
|
+
...o
|
|
1847
1849
|
}) => {
|
|
1848
1850
|
const l = Q(
|
|
1849
1851
|
"spinner",
|
|
@@ -1855,7 +1857,7 @@ const zn = {
|
|
|
1855
1857
|
"div",
|
|
1856
1858
|
{
|
|
1857
1859
|
className: l,
|
|
1858
|
-
...
|
|
1860
|
+
...o,
|
|
1859
1861
|
role: "status",
|
|
1860
1862
|
"aria-label": "Loading...",
|
|
1861
1863
|
children: [
|
|
@@ -1877,11 +1879,11 @@ const zn = {
|
|
|
1877
1879
|
label: t,
|
|
1878
1880
|
id: a,
|
|
1879
1881
|
error: s,
|
|
1880
|
-
className:
|
|
1882
|
+
className: o,
|
|
1881
1883
|
ref: l,
|
|
1882
1884
|
maxLength: m,
|
|
1883
1885
|
// ✅ New prop for max length
|
|
1884
|
-
showCharCount:
|
|
1886
|
+
showCharCount: i = !1,
|
|
1885
1887
|
// ✅ New prop to control visibility
|
|
1886
1888
|
...u
|
|
1887
1889
|
}) => {
|
|
@@ -1890,10 +1892,10 @@ const zn = {
|
|
|
1890
1892
|
), r = (d) => {
|
|
1891
1893
|
y(d.target.value.length), u.onChange && u.onChange(d);
|
|
1892
1894
|
}, x = m - f;
|
|
1893
|
-
return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${
|
|
1895
|
+
return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${o || ""}`, children: [
|
|
1894
1896
|
/* @__PURE__ */ n("div", { className: "textarea-header", children: [
|
|
1895
1897
|
t && /* @__PURE__ */ e("label", { htmlFor: g, className: "textarea-label", children: t }),
|
|
1896
|
-
|
|
1898
|
+
i && m && /* @__PURE__ */ n("span", { className: "char-counter", children: [
|
|
1897
1899
|
x,
|
|
1898
1900
|
" characters remaining"
|
|
1899
1901
|
] })
|
|
@@ -1917,12 +1919,12 @@ const zn = {
|
|
|
1917
1919
|
label: t,
|
|
1918
1920
|
checked: a,
|
|
1919
1921
|
onChange: s,
|
|
1920
|
-
labelPosition:
|
|
1922
|
+
labelPosition: o = "right",
|
|
1921
1923
|
error: l,
|
|
1922
1924
|
...m
|
|
1923
1925
|
}) => /* @__PURE__ */ n("div", { className: "switch-container", children: [
|
|
1924
1926
|
/* @__PURE__ */ n(Gr, { as: "div", className: "switch-group", children: [
|
|
1925
|
-
t &&
|
|
1927
|
+
t && o === "left" && /* @__PURE__ */ e(lt.Label, { className: "switch-label", passive: !0, children: t }),
|
|
1926
1928
|
/* @__PURE__ */ e(
|
|
1927
1929
|
lt,
|
|
1928
1930
|
{
|
|
@@ -1936,7 +1938,7 @@ const zn = {
|
|
|
1936
1938
|
children: /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "switch-thumb" })
|
|
1937
1939
|
}
|
|
1938
1940
|
),
|
|
1939
|
-
t &&
|
|
1941
|
+
t && o === "right" && /* @__PURE__ */ e(lt.Label, { className: "switch-label", passive: !0, children: t })
|
|
1940
1942
|
] }),
|
|
1941
1943
|
l && /* @__PURE__ */ e("p", { className: "switch-error-message", children: l })
|
|
1942
1944
|
] }), Ll = ({
|
|
@@ -1944,13 +1946,13 @@ const zn = {
|
|
|
1944
1946
|
content: a,
|
|
1945
1947
|
variant: s = "dark",
|
|
1946
1948
|
// 'dark', 'light', 'info', 'success', 'error'
|
|
1947
|
-
size:
|
|
1949
|
+
size: o = "medium",
|
|
1948
1950
|
// 'small', 'medium'
|
|
1949
1951
|
place: l = "top",
|
|
1950
1952
|
// 'top', 'bottom', 'left', 'right'
|
|
1951
1953
|
className: m,
|
|
1952
1954
|
// For external styling of the tooltip itself
|
|
1953
|
-
...
|
|
1955
|
+
...i
|
|
1954
1956
|
}) => {
|
|
1955
1957
|
const u = ae.useId();
|
|
1956
1958
|
return /* @__PURE__ */ n(te, { children: [
|
|
@@ -1962,8 +1964,8 @@ const zn = {
|
|
|
1962
1964
|
content: a,
|
|
1963
1965
|
place: l,
|
|
1964
1966
|
variant: s,
|
|
1965
|
-
className: `custom-tooltip custom-tooltip--size-${
|
|
1966
|
-
...
|
|
1967
|
+
className: `custom-tooltip custom-tooltip--size-${o} ${m || ""}`,
|
|
1968
|
+
...i
|
|
1967
1969
|
}
|
|
1968
1970
|
)
|
|
1969
1971
|
] });
|
|
@@ -1984,15 +1986,15 @@ const zn = {
|
|
|
1984
1986
|
isOpen: t,
|
|
1985
1987
|
onClose: a,
|
|
1986
1988
|
steps: s = {},
|
|
1987
|
-
currentStep:
|
|
1989
|
+
currentStep: o,
|
|
1988
1990
|
direction: l = 1,
|
|
1989
1991
|
stepProps: m = {},
|
|
1990
|
-
title:
|
|
1992
|
+
title: i,
|
|
1991
1993
|
description: u,
|
|
1992
1994
|
showProgress: g = !0,
|
|
1993
1995
|
closeOnOverlayClick: f = !0
|
|
1994
1996
|
}) => {
|
|
1995
|
-
const y = s[
|
|
1997
|
+
const y = s[o], r = Object.keys(s), x = r.indexOf(o), d = (x + 1) / r.length * 100, p = x > 0 && m.onBack;
|
|
1996
1998
|
return /* @__PURE__ */ e(ue, { show: t, as: H, children: /* @__PURE__ */ n(
|
|
1997
1999
|
be,
|
|
1998
2000
|
{
|
|
@@ -2037,7 +2039,7 @@ const zn = {
|
|
|
2037
2039
|
}
|
|
2038
2040
|
),
|
|
2039
2041
|
/* @__PURE__ */ n("div", { className: "wizard-header-text", children: [
|
|
2040
|
-
/* @__PURE__ */ e(be.Title, { as: "h3", className: "wizard-title", children:
|
|
2042
|
+
/* @__PURE__ */ e(be.Title, { as: "h3", className: "wizard-title", children: i }),
|
|
2041
2043
|
u && /* @__PURE__ */ e(be.Description, { className: "wizard-description", children: u })
|
|
2042
2044
|
] })
|
|
2043
2045
|
] }),
|
|
@@ -2081,7 +2083,7 @@ const zn = {
|
|
|
2081
2083
|
style: { overflowX: "hidden" },
|
|
2082
2084
|
children: y && /* @__PURE__ */ e(y, { ...m })
|
|
2083
2085
|
},
|
|
2084
|
-
|
|
2086
|
+
o
|
|
2085
2087
|
)
|
|
2086
2088
|
}
|
|
2087
2089
|
) })
|
|
@@ -2102,11 +2104,11 @@ const zn = {
|
|
|
2102
2104
|
dataTestId: t,
|
|
2103
2105
|
title: a,
|
|
2104
2106
|
type: s = "button",
|
|
2105
|
-
ariaLabel:
|
|
2107
|
+
ariaLabel: o,
|
|
2106
2108
|
className: l = "",
|
|
2107
2109
|
// ✅ Default is now empty
|
|
2108
2110
|
category: m = "secondary",
|
|
2109
|
-
icon:
|
|
2111
|
+
icon: i,
|
|
2110
2112
|
// Renamed for clarity, expecting a component type e.g., CheckCircle
|
|
2111
2113
|
disabled: u = !1,
|
|
2112
2114
|
size: g = "small",
|
|
@@ -2131,20 +2133,20 @@ const zn = {
|
|
|
2131
2133
|
className: p,
|
|
2132
2134
|
disabled: d,
|
|
2133
2135
|
onClick: r,
|
|
2134
|
-
title:
|
|
2135
|
-
"aria-label":
|
|
2136
|
+
title: o,
|
|
2137
|
+
"aria-label": o,
|
|
2136
2138
|
...x,
|
|
2137
|
-
children:
|
|
2139
|
+
children: i && /* @__PURE__ */ e(i, { size: g === "large" ? 20 : 16 })
|
|
2138
2140
|
}
|
|
2139
2141
|
);
|
|
2140
2142
|
}, jl = ({
|
|
2141
2143
|
content: t,
|
|
2142
2144
|
isFooter: a = !1,
|
|
2143
2145
|
footerContent: s,
|
|
2144
|
-
save:
|
|
2146
|
+
save: o,
|
|
2145
2147
|
cancel: l,
|
|
2146
2148
|
tertiary: m,
|
|
2147
|
-
fullHeight:
|
|
2149
|
+
fullHeight: i = !1,
|
|
2148
2150
|
// A clearer prop name
|
|
2149
2151
|
...u
|
|
2150
2152
|
}) => {
|
|
@@ -2152,7 +2154,7 @@ const zn = {
|
|
|
2152
2154
|
"page-layout",
|
|
2153
2155
|
{
|
|
2154
2156
|
"page-layout--with-footer": a,
|
|
2155
|
-
"page-layout--full-height":
|
|
2157
|
+
"page-layout--full-height": i
|
|
2156
2158
|
},
|
|
2157
2159
|
u.className
|
|
2158
2160
|
);
|
|
@@ -2175,12 +2177,12 @@ const zn = {
|
|
|
2175
2177
|
...l
|
|
2176
2178
|
}
|
|
2177
2179
|
),
|
|
2178
|
-
|
|
2180
|
+
o?.show && /* @__PURE__ */ e(
|
|
2179
2181
|
ee,
|
|
2180
2182
|
{
|
|
2181
2183
|
category: "primary",
|
|
2182
|
-
label:
|
|
2183
|
-
...
|
|
2184
|
+
label: o.label || "Save",
|
|
2185
|
+
...o
|
|
2184
2186
|
}
|
|
2185
2187
|
)
|
|
2186
2188
|
] }) })
|
|
@@ -2190,12 +2192,12 @@ const zn = {
|
|
|
2190
2192
|
subHeading: a,
|
|
2191
2193
|
breadcrumbItems: s = [],
|
|
2192
2194
|
// Expects the breadcrumb data as a prop
|
|
2193
|
-
isLeftArrow:
|
|
2195
|
+
isLeftArrow: o = !1,
|
|
2194
2196
|
onBackClick: l,
|
|
2195
2197
|
// Expects a handler for the back button
|
|
2196
2198
|
...m
|
|
2197
2199
|
}) => /* @__PURE__ */ n("div", { className: "page-header-wrapper", ...m, children: [
|
|
2198
|
-
|
|
2200
|
+
o && l && /* @__PURE__ */ e(
|
|
2199
2201
|
"button",
|
|
2200
2202
|
{
|
|
2201
2203
|
className: "page-header-back-button",
|
|
@@ -2213,12 +2215,12 @@ const zn = {
|
|
|
2213
2215
|
onSelect: a,
|
|
2214
2216
|
triggerIcon: s = Ht
|
|
2215
2217
|
}) => {
|
|
2216
|
-
const { refs:
|
|
2218
|
+
const { refs: o, floatingStyles: l } = la({
|
|
2217
2219
|
whileElementsMounted: da,
|
|
2218
|
-
middleware: [
|
|
2220
|
+
middleware: [oa(5), ia(), ca({ padding: 5 })]
|
|
2219
2221
|
});
|
|
2220
2222
|
return /* @__PURE__ */ n(qr, { as: "div", className: "options-menu-wrapper", children: [
|
|
2221
|
-
/* @__PURE__ */ e(Yr, { ref:
|
|
2223
|
+
/* @__PURE__ */ e(Yr, { ref: o.setReference, className: "options-menu-trigger", children: /* @__PURE__ */ e(s, { size: 20 }) }),
|
|
2222
2224
|
/* @__PURE__ */ e(Wr, { children: /* @__PURE__ */ e(
|
|
2223
2225
|
ue,
|
|
2224
2226
|
{
|
|
@@ -2232,16 +2234,16 @@ const zn = {
|
|
|
2232
2234
|
children: /* @__PURE__ */ e(
|
|
2233
2235
|
Jr,
|
|
2234
2236
|
{
|
|
2235
|
-
ref:
|
|
2237
|
+
ref: o.setFloating,
|
|
2236
2238
|
style: l,
|
|
2237
2239
|
className: "options-menu-panel",
|
|
2238
2240
|
children: t.map((m) => /* @__PURE__ */ n("div", { className: "options-menu-item-wrapper", children: [
|
|
2239
2241
|
m.dividerBefore && /* @__PURE__ */ e("div", { className: "menu-divider" }),
|
|
2240
|
-
/* @__PURE__ */ e(Xr, { children: ({ active:
|
|
2242
|
+
/* @__PURE__ */ e(Xr, { children: ({ active: i }) => /* @__PURE__ */ n(
|
|
2241
2243
|
"button",
|
|
2242
2244
|
{
|
|
2243
2245
|
onClick: () => a(m),
|
|
2244
|
-
className: `options-menu-item ${
|
|
2246
|
+
className: `options-menu-item ${i ? "active bg-gray-200 text-gray-900" : ""}`,
|
|
2245
2247
|
disabled: m.disabled,
|
|
2246
2248
|
children: [
|
|
2247
2249
|
m.icon && /* @__PURE__ */ e("span", { className: "item-icon", children: m.icon }),
|
|
@@ -2302,8 +2304,8 @@ function ya(t) {
|
|
|
2302
2304
|
all() {
|
|
2303
2305
|
const a = {};
|
|
2304
2306
|
for (let s = 0; s < t.length; s++) {
|
|
2305
|
-
const
|
|
2306
|
-
a[
|
|
2307
|
+
const o = t.key(s);
|
|
2308
|
+
a[o] = this.get(o);
|
|
2307
2309
|
}
|
|
2308
2310
|
return a;
|
|
2309
2311
|
}
|
|
@@ -2316,19 +2318,19 @@ const qn = ya(localStorage), Vl = ya(sessionStorage), _l = {
|
|
|
2316
2318
|
);
|
|
2317
2319
|
return a ? decodeURIComponent(a[2]) : null;
|
|
2318
2320
|
},
|
|
2319
|
-
set(t, a, s = 7,
|
|
2321
|
+
set(t, a, s = 7, o = "/") {
|
|
2320
2322
|
const l = /* @__PURE__ */ new Date();
|
|
2321
2323
|
l.setDate(l.getDate() + s), document.cookie = `${t}=${encodeURIComponent(
|
|
2322
2324
|
a
|
|
2323
|
-
)}; expires=${l.toUTCString()}; path=${
|
|
2325
|
+
)}; expires=${l.toUTCString()}; path=${o}`;
|
|
2324
2326
|
},
|
|
2325
2327
|
remove(t, a = "/") {
|
|
2326
2328
|
document.cookie = `${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${a}`;
|
|
2327
2329
|
},
|
|
2328
2330
|
all() {
|
|
2329
2331
|
return document.cookie.split(";").filter(Boolean).reduce((t, a) => {
|
|
2330
|
-
const [s,
|
|
2331
|
-
return t[s] = decodeURIComponent(
|
|
2332
|
+
const [s, o] = a.split("=").map((l) => l.trim());
|
|
2333
|
+
return t[s] = decodeURIComponent(o), t;
|
|
2332
2334
|
}, {});
|
|
2333
2335
|
},
|
|
2334
2336
|
clear() {
|
|
@@ -2398,27 +2400,27 @@ function Jn(t) {
|
|
|
2398
2400
|
}
|
|
2399
2401
|
}
|
|
2400
2402
|
function Ot() {
|
|
2401
|
-
const t = Jn("userProfile") || {}, a = localStorage.getItem("access_token") || t.accessToken || "", s = localStorage.getItem("siteId") || t.siteId || "",
|
|
2403
|
+
const t = Jn("userProfile") || {}, a = localStorage.getItem("access_token") || t.accessToken || "", s = localStorage.getItem("siteId") || t.siteId || "", o = t.tenant || "", l = t.tenantdomain || "", m = t.username || t.displayName || "", i = t.email || "";
|
|
2402
2404
|
return {
|
|
2403
2405
|
Authorization: a ? `Bearer ${a}` : void 0,
|
|
2404
|
-
"x-tenant-id":
|
|
2406
|
+
"x-tenant-id": o || void 0,
|
|
2405
2407
|
"x-tenant-domain": l || void 0,
|
|
2406
2408
|
"site-id": s || void 0,
|
|
2407
2409
|
"Content-Type": "application/json",
|
|
2408
2410
|
"principal-user": m || void 0,
|
|
2409
|
-
"x-user-email":
|
|
2411
|
+
"x-user-email": i || void 0
|
|
2410
2412
|
};
|
|
2411
2413
|
}
|
|
2412
2414
|
function Xn(t) {
|
|
2413
2415
|
if (t && t.isAxiosError) {
|
|
2414
|
-
const { response: a, config: s, message:
|
|
2416
|
+
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;
|
|
2415
2417
|
return {
|
|
2416
2418
|
ok: !1,
|
|
2417
2419
|
status: l,
|
|
2418
2420
|
statusText: m,
|
|
2419
|
-
code:
|
|
2420
|
-
message: u ||
|
|
2421
|
-
details:
|
|
2421
|
+
code: i?.code || null,
|
|
2422
|
+
message: u || o || "Request failed",
|
|
2423
|
+
details: i || null,
|
|
2422
2424
|
request: {
|
|
2423
2425
|
url: s?.url || null,
|
|
2424
2426
|
method: s?.method || null,
|
|
@@ -2456,7 +2458,7 @@ function Qn({
|
|
|
2456
2458
|
return t && (r === 401 || r === 403) && (window.location.href.includes("/login") || (window.historyPath = window.location.pathname, localStorage.clear(), sessionStorage.clear(), window.location.href = "/login")), Promise.reject(y);
|
|
2457
2459
|
}
|
|
2458
2460
|
);
|
|
2459
|
-
function
|
|
2461
|
+
function o({ open: f = !1, customHeader: y = {} } = {}) {
|
|
2460
2462
|
if (f) {
|
|
2461
2463
|
const { Authorization: r, ...x } = Ot();
|
|
2462
2464
|
return {
|
|
@@ -2468,28 +2470,28 @@ function Qn({
|
|
|
2468
2470
|
async function l(f, y, r = !1, x = {}) {
|
|
2469
2471
|
return s.get(f, {
|
|
2470
2472
|
params: y,
|
|
2471
|
-
...
|
|
2473
|
+
...o({ open: r, customHeader: x })
|
|
2472
2474
|
});
|
|
2473
2475
|
}
|
|
2474
2476
|
async function m(f, y, r = !1, x = {}) {
|
|
2475
|
-
const d = { ...
|
|
2477
|
+
const d = { ...o({ open: r, customHeader: x }) };
|
|
2476
2478
|
return y !== void 0 && (d.data = y), s.delete(f, d);
|
|
2477
2479
|
}
|
|
2478
|
-
async function
|
|
2479
|
-
return s.post(f, y,
|
|
2480
|
+
async function i(f, y = {}, r = !1, x = {}) {
|
|
2481
|
+
return s.post(f, y, o({ open: r, customHeader: x }));
|
|
2480
2482
|
}
|
|
2481
2483
|
async function u(f, y = {}, r = !1, x = {}) {
|
|
2482
|
-
return s.put(f, y,
|
|
2484
|
+
return s.put(f, y, o({ open: r, customHeader: x }));
|
|
2483
2485
|
}
|
|
2484
2486
|
async function g(f, y = {}, r = !1, x = {}) {
|
|
2485
|
-
return s.patch(f, y,
|
|
2487
|
+
return s.patch(f, y, o({ open: r, customHeader: x }));
|
|
2486
2488
|
}
|
|
2487
2489
|
return {
|
|
2488
2490
|
instance: s,
|
|
2489
2491
|
// exported in case you want advanced usage
|
|
2490
2492
|
axiosGet: l,
|
|
2491
2493
|
axiosDelete: m,
|
|
2492
|
-
axiosPost:
|
|
2494
|
+
axiosPost: i,
|
|
2493
2495
|
axiosPut: u,
|
|
2494
2496
|
axiosPatch: g
|
|
2495
2497
|
};
|
|
@@ -2514,7 +2516,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
2514
2516
|
console.log("Error searching entities:", s);
|
|
2515
2517
|
}
|
|
2516
2518
|
}, Kn = (t) => t.filter((a) => !!a?.email).map((a) => {
|
|
2517
|
-
const s = (a?.firstName ?? "").trim(),
|
|
2519
|
+
const s = (a?.firstName ?? "").trim(), o = (a?.lastName ?? "").trim(), l = `${s} ${o}`.trim() || (a.email?.split("@")[0] ?? "Unknown");
|
|
2518
2520
|
return {
|
|
2519
2521
|
id: a.email,
|
|
2520
2522
|
name: l,
|
|
@@ -2568,23 +2570,23 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
2568
2570
|
},
|
|
2569
2571
|
getMembersForGroup: async (t) => {
|
|
2570
2572
|
const a = `${ze()}/unifydidentity/open/usersforgroup?groupName=${encodeURIComponent(t)}&isGroupWithSpecChar=true&isPaging=true&page=0&size=999&deepSearch=`, { data: s } = await je(a);
|
|
2571
|
-
let
|
|
2573
|
+
let o = [];
|
|
2572
2574
|
if (Array.isArray(s))
|
|
2573
|
-
|
|
2575
|
+
o = s;
|
|
2574
2576
|
else if (typeof s == "string")
|
|
2575
|
-
|
|
2577
|
+
o = It(s.trim());
|
|
2576
2578
|
else if (s && typeof s == "object") {
|
|
2577
2579
|
const l = s.data;
|
|
2578
|
-
Array.isArray(l) ?
|
|
2580
|
+
Array.isArray(l) ? o = l : typeof l == "string" && (o = It(l.trim()));
|
|
2579
2581
|
}
|
|
2580
|
-
return Kn(
|
|
2582
|
+
return Kn(o);
|
|
2581
2583
|
}
|
|
2582
2584
|
}, Ct = (t, a) => {
|
|
2583
|
-
const [s,
|
|
2585
|
+
const [s, o] = j(t);
|
|
2584
2586
|
return Z(
|
|
2585
2587
|
() => {
|
|
2586
2588
|
const l = an(() => {
|
|
2587
|
-
|
|
2589
|
+
o(t);
|
|
2588
2590
|
}, a);
|
|
2589
2591
|
return l(), () => {
|
|
2590
2592
|
l.cancel();
|
|
@@ -2597,13 +2599,13 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
2597
2599
|
users: t = [],
|
|
2598
2600
|
groups: a = [],
|
|
2599
2601
|
roles: s = [],
|
|
2600
|
-
onClick:
|
|
2602
|
+
onClick: o
|
|
2601
2603
|
}) => {
|
|
2602
2604
|
const l = t.slice(0, 2), m = [];
|
|
2603
2605
|
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);
|
|
2604
|
-
const
|
|
2606
|
+
const i = t.length + a.length + s.length, u = i - m.length;
|
|
2605
2607
|
let g = m.join(", ");
|
|
2606
|
-
return u > 0 && (g += ` and ${u} others`),
|
|
2608
|
+
return u > 0 && (g += ` and ${u} others`), i === 0 ? /* @__PURE__ */ e(
|
|
2607
2609
|
"div",
|
|
2608
2610
|
{
|
|
2609
2611
|
className: "flex items-center justify-between p-3 border border-dashed border-gray-400 rounded-lg hover:bg-gray-50",
|
|
@@ -2612,7 +2614,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
2612
2614
|
) : /* @__PURE__ */ n(
|
|
2613
2615
|
"div",
|
|
2614
2616
|
{
|
|
2615
|
-
onClick:
|
|
2617
|
+
onClick: o,
|
|
2616
2618
|
className: "flex items-center justify-between p-3 border border-gray-300 rounded-lg hover:bg-gray-50 hover:cursor-pointer transition-colors duration-150",
|
|
2617
2619
|
children: [
|
|
2618
2620
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
@@ -2645,10 +2647,10 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
2645
2647
|
entity: t,
|
|
2646
2648
|
onManage: a,
|
|
2647
2649
|
onClose: s,
|
|
2648
|
-
existingShares:
|
|
2650
|
+
existingShares: o = { users: [], groups: [], roles: [] },
|
|
2649
2651
|
calledBy: l,
|
|
2650
2652
|
showExistingShares: m = !1,
|
|
2651
|
-
onFinalSubmit:
|
|
2653
|
+
onFinalSubmit: i = () => {
|
|
2652
2654
|
},
|
|
2653
2655
|
isChanged: u = !1
|
|
2654
2656
|
}) => {
|
|
@@ -2690,12 +2692,12 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
2690
2692
|
permission: F.permission,
|
|
2691
2693
|
type: F.type.toLowerCase()
|
|
2692
2694
|
}));
|
|
2693
|
-
|
|
2695
|
+
i({
|
|
2694
2696
|
entity: t,
|
|
2695
2697
|
userGroupRolesObj: M,
|
|
2696
|
-
existingShares:
|
|
2698
|
+
existingShares: o
|
|
2697
2699
|
// Always send updated existing shares
|
|
2698
|
-
},
|
|
2700
|
+
}, o);
|
|
2699
2701
|
} else if (l === me.INTEREST) {
|
|
2700
2702
|
const M = k.pendingInvites.map((P) => ({
|
|
2701
2703
|
identity: P.id,
|
|
@@ -2706,20 +2708,20 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
2706
2708
|
userName: P.name,
|
|
2707
2709
|
interestId: t?.data?.id
|
|
2708
2710
|
}));
|
|
2709
|
-
|
|
2711
|
+
i(M, o);
|
|
2710
2712
|
} else if (l === me.ARTICLE) {
|
|
2711
2713
|
const M = k.pendingInvites.map((F) => ({
|
|
2712
2714
|
id: F.id,
|
|
2713
2715
|
permission: F.permission,
|
|
2714
2716
|
type: F.type.toLowerCase()
|
|
2715
2717
|
}));
|
|
2716
|
-
|
|
2718
|
+
i({
|
|
2717
2719
|
entity: t,
|
|
2718
2720
|
userGroupRolesObj: M,
|
|
2719
|
-
existingShares:
|
|
2720
|
-
},
|
|
2721
|
+
existingShares: o
|
|
2722
|
+
}, o);
|
|
2721
2723
|
} else
|
|
2722
|
-
|
|
2724
|
+
i(k, o);
|
|
2723
2725
|
setTimeout(() => {
|
|
2724
2726
|
s();
|
|
2725
2727
|
}, 1e3);
|
|
@@ -2727,7 +2729,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
2727
2729
|
throw console.error("Failed to submit invites:", M), M;
|
|
2728
2730
|
}
|
|
2729
2731
|
}, A = (k) => {
|
|
2730
|
-
const M =
|
|
2732
|
+
const M = o[g.code].find((P) => P.name === k.name && P.permission !== "remove") || z.find((P) => P.name === k.name);
|
|
2731
2733
|
return M ? `${M.permission}` : "";
|
|
2732
2734
|
}, I = () => {
|
|
2733
2735
|
switch (l) {
|
|
@@ -2741,7 +2743,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
2741
2743
|
return "Add User, Groups or Roles test";
|
|
2742
2744
|
}
|
|
2743
2745
|
};
|
|
2744
|
-
return
|
|
2746
|
+
return oe(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:", z.length), z.length === 0 && !u), [z.length, u]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
|
|
2745
2747
|
/* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
|
|
2746
2748
|
/* @__PURE__ */ e(be.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: I() }),
|
|
2747
2749
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
|
|
@@ -2763,9 +2765,9 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
2763
2765
|
(l === me.DRIVE || m) && /* @__PURE__ */ e(
|
|
2764
2766
|
es,
|
|
2765
2767
|
{
|
|
2766
|
-
users:
|
|
2767
|
-
groups:
|
|
2768
|
-
roles:
|
|
2768
|
+
users: o.users.filter((k) => k.permission !== "remove"),
|
|
2769
|
+
groups: o.groups.filter((k) => k.permission !== "remove"),
|
|
2770
|
+
roles: o.roles.filter((k) => k.permission !== "remove"),
|
|
2769
2771
|
onClick: a
|
|
2770
2772
|
}
|
|
2771
2773
|
),
|
|
@@ -3035,21 +3037,21 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3035
3037
|
] })
|
|
3036
3038
|
] }) })
|
|
3037
3039
|
] });
|
|
3038
|
-
},
|
|
3040
|
+
}, it = [
|
|
3039
3041
|
{ name: "Can view", icon: Kt, value: "view" },
|
|
3040
3042
|
{ name: "Can manage", icon: ea, value: "edit" },
|
|
3041
|
-
{ name: "Remove", icon:
|
|
3043
|
+
{ name: "Remove", icon: or, isDestructive: !0, value: "remove" }
|
|
3042
3044
|
], rs = ({ item: t, allowedPermissions: a, onPermissionChange: s }) => {
|
|
3043
|
-
const [
|
|
3044
|
-
open:
|
|
3045
|
+
const [o, l] = j(!1), { refs: m, floatingStyles: i, context: u } = la({
|
|
3046
|
+
open: o,
|
|
3045
3047
|
onOpenChange: l,
|
|
3046
|
-
middleware: [
|
|
3048
|
+
middleware: [oa(8), ia(), ca({ padding: 8 })],
|
|
3047
3049
|
whileElementsMounted: da,
|
|
3048
3050
|
placement: "bottom-end"
|
|
3049
3051
|
}), g = Zr(u), f = Kr(u), { getReferenceProps: y, getFloatingProps: r } = en([
|
|
3050
3052
|
g,
|
|
3051
3053
|
f
|
|
3052
|
-
]), x =
|
|
3054
|
+
]), x = it.find((p) => p.name === t.permission || p.value === t.permission) || it[0];
|
|
3053
3055
|
return (
|
|
3054
3056
|
// FIX: The <Listbox> component now wraps both the button and the portal.
|
|
3055
3057
|
// This provides the necessary context for both children.
|
|
@@ -3072,7 +3074,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3072
3074
|
ue,
|
|
3073
3075
|
{
|
|
3074
3076
|
as: H,
|
|
3075
|
-
show:
|
|
3077
|
+
show: o,
|
|
3076
3078
|
enter: "transition ease-out duration-100",
|
|
3077
3079
|
enterFrom: "transform opacity-0 scale-95",
|
|
3078
3080
|
enterTo: "transform opacity-100 scale-100",
|
|
@@ -3083,11 +3085,11 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3083
3085
|
K.Options,
|
|
3084
3086
|
{
|
|
3085
3087
|
ref: m.setFloating,
|
|
3086
|
-
style:
|
|
3088
|
+
style: i,
|
|
3087
3089
|
...r(),
|
|
3088
3090
|
static: !0,
|
|
3089
3091
|
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",
|
|
3090
|
-
children:
|
|
3092
|
+
children: it.filter((p) => a.includes(p.value)).map((p) => /* @__PURE__ */ e(
|
|
3091
3093
|
K.Option,
|
|
3092
3094
|
{
|
|
3093
3095
|
className: ({
|
|
@@ -3124,18 +3126,18 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3124
3126
|
//entire file or folder details
|
|
3125
3127
|
onBack: a,
|
|
3126
3128
|
onClose: s,
|
|
3127
|
-
onOpenMembers:
|
|
3129
|
+
onOpenMembers: o,
|
|
3128
3130
|
existingShares: l,
|
|
3129
3131
|
allowedPermissions: m
|
|
3130
3132
|
}) => {
|
|
3131
|
-
const [
|
|
3132
|
-
users:
|
|
3133
|
+
const [i, u] = j(l), [g, f] = j(0), [y, r] = j(""), x = Ct(y, 300), d = {
|
|
3134
|
+
users: i.users.filter(
|
|
3133
3135
|
(O) => O.name.toLowerCase().includes(x.toLowerCase())
|
|
3134
3136
|
),
|
|
3135
|
-
groups:
|
|
3137
|
+
groups: i.groups.filter(
|
|
3136
3138
|
(O) => O.name.toLowerCase().includes(x.toLowerCase())
|
|
3137
3139
|
),
|
|
3138
|
-
roles:
|
|
3140
|
+
roles: i.roles.filter(
|
|
3139
3141
|
(O) => O.name.toLowerCase().includes(x.toLowerCase())
|
|
3140
3142
|
)
|
|
3141
3143
|
}, p = async (O, L, _, U) => {
|
|
@@ -3148,9 +3150,9 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3148
3150
|
}));
|
|
3149
3151
|
}, S = () => {
|
|
3150
3152
|
const O = {
|
|
3151
|
-
users:
|
|
3152
|
-
groups:
|
|
3153
|
-
roles:
|
|
3153
|
+
users: i.users.filter((L) => L.permission !== "remove"),
|
|
3154
|
+
groups: i.groups.filter((L) => L.permission !== "remove"),
|
|
3155
|
+
roles: i.roles.filter((L) => L.permission !== "remove")
|
|
3154
3156
|
};
|
|
3155
3157
|
a(O);
|
|
3156
3158
|
}, T = ["users", "groups", "roles"], R = ["Users", "Groups", "Roles"];
|
|
@@ -3161,7 +3163,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3161
3163
|
/* @__PURE__ */ n(
|
|
3162
3164
|
"button",
|
|
3163
3165
|
{
|
|
3164
|
-
onClick: () => a(
|
|
3166
|
+
onClick: () => a(i),
|
|
3165
3167
|
className: "flex items-center gap-1 text-sm font-medium text-gray-600 hover:text-gray-900 hover:cursor-pointer p-2 rounded-md hover:bg-gray-100",
|
|
3166
3168
|
children: [
|
|
3167
3169
|
/* @__PURE__ */ e(ta, { className: "h-5 w-5" }),
|
|
@@ -3241,7 +3243,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3241
3243
|
O !== "users" && /* @__PURE__ */ e(
|
|
3242
3244
|
"button",
|
|
3243
3245
|
{
|
|
3244
|
-
onClick: () =>
|
|
3246
|
+
onClick: () => o({
|
|
3245
3247
|
id: L.id,
|
|
3246
3248
|
type: O,
|
|
3247
3249
|
name: L.name
|
|
@@ -3316,9 +3318,9 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3316
3318
|
// { id, name, type: "group" | "role" }
|
|
3317
3319
|
onBack: a,
|
|
3318
3320
|
onClose: s,
|
|
3319
|
-
members:
|
|
3321
|
+
members: o
|
|
3320
3322
|
}) => {
|
|
3321
|
-
const [l, m] = j(!0), [
|
|
3323
|
+
const [l, m] = j(!0), [i, u] = j(""), g = Ct(i, 300), f = o.filter(
|
|
3322
3324
|
(d) => d.name.toLowerCase().includes(g.toLowerCase())
|
|
3323
3325
|
), y = {
|
|
3324
3326
|
hidden: { opacity: 0 },
|
|
@@ -3342,7 +3344,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3342
3344
|
animate: { opacity: 1, scale: 1 },
|
|
3343
3345
|
className: "flex flex-col items-center justify-center text-center p-8 mt-10",
|
|
3344
3346
|
children: [
|
|
3345
|
-
/* @__PURE__ */ e(
|
|
3347
|
+
/* @__PURE__ */ e(ir, { className: "h-12 w-12 text-gray-400" }),
|
|
3346
3348
|
/* @__PURE__ */ e("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: "No Users Found" }),
|
|
3347
3349
|
/* @__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}.` })
|
|
3348
3350
|
]
|
|
@@ -3412,7 +3414,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3412
3414
|
he,
|
|
3413
3415
|
{
|
|
3414
3416
|
onDebouncedChange: u,
|
|
3415
|
-
value:
|
|
3417
|
+
value: i,
|
|
3416
3418
|
placeholder: "Search members..."
|
|
3417
3419
|
}
|
|
3418
3420
|
) }),
|
|
@@ -3422,7 +3424,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3422
3424
|
INVITE: "invite",
|
|
3423
3425
|
MANAGE: "manage",
|
|
3424
3426
|
MEMBERS: "members"
|
|
3425
|
-
},
|
|
3427
|
+
}, os = ({
|
|
3426
3428
|
existingShares: t = {
|
|
3427
3429
|
users: [],
|
|
3428
3430
|
groups: [],
|
|
@@ -3431,11 +3433,11 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3431
3433
|
isOpen: a,
|
|
3432
3434
|
onFinalSubmit: s = () => {
|
|
3433
3435
|
},
|
|
3434
|
-
mainEntity:
|
|
3436
|
+
mainEntity: o,
|
|
3435
3437
|
calledBy: l,
|
|
3436
3438
|
onClose: m = () => {
|
|
3437
3439
|
},
|
|
3438
|
-
showExistingShares:
|
|
3440
|
+
showExistingShares: i = !0,
|
|
3439
3441
|
allowedPermissions: u = [],
|
|
3440
3442
|
...g
|
|
3441
3443
|
}) => {
|
|
@@ -3455,9 +3457,9 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3455
3457
|
p({ id: v, type: B, name: $ }), _(f), y(pe.MEMBERS);
|
|
3456
3458
|
}, C = (v) => {
|
|
3457
3459
|
console.log("changedExistingShares", v), x(v);
|
|
3458
|
-
const $ =
|
|
3460
|
+
const $ = ot.mapValues(t, (z) => z.map((b) => ({ id: b.id, permission: b.permission })).sort((b, w) => b.id - w.id)), B = ot.mapValues(v, (z) => z.map((b) => ({ id: b.id, permission: b.permission })).sort((b, w) => b.id - w.id));
|
|
3459
3461
|
console.log("Existing data:", $), console.log("Changed data:", B);
|
|
3460
|
-
const E = !
|
|
3462
|
+
const E = !ot.isEqual($, B);
|
|
3461
3463
|
console.log("hasPermissionChanged:", E), T(E), y(f === pe.MEMBERS ? L : pe.INVITE);
|
|
3462
3464
|
};
|
|
3463
3465
|
return /* @__PURE__ */ e(ue, { appear: !0, show: a, as: H, children: /* @__PURE__ */ n(be, { as: "div", className: "relative z-50", onClose: U, children: [
|
|
@@ -3476,7 +3478,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3476
3478
|
children: /* @__PURE__ */ e(
|
|
3477
3479
|
ns,
|
|
3478
3480
|
{
|
|
3479
|
-
entity:
|
|
3481
|
+
entity: o,
|
|
3480
3482
|
onBack: C,
|
|
3481
3483
|
onClose: U,
|
|
3482
3484
|
onOpenMembers: G,
|
|
@@ -3523,12 +3525,12 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
|
|
|
3523
3525
|
children: /* @__PURE__ */ e(
|
|
3524
3526
|
as,
|
|
3525
3527
|
{
|
|
3526
|
-
entity:
|
|
3528
|
+
entity: o,
|
|
3527
3529
|
onManage: Y,
|
|
3528
3530
|
onClose: U,
|
|
3529
3531
|
existingShares: r,
|
|
3530
3532
|
calledBy: l,
|
|
3531
|
-
showExistingShares:
|
|
3533
|
+
showExistingShares: i,
|
|
3532
3534
|
onFinalSubmit: (v) => {
|
|
3533
3535
|
s(v, r);
|
|
3534
3536
|
},
|
|
@@ -3549,12 +3551,12 @@ function at({
|
|
|
3549
3551
|
label: t,
|
|
3550
3552
|
options: a = [],
|
|
3551
3553
|
selected: s = [],
|
|
3552
|
-
onChange:
|
|
3554
|
+
onChange: o = () => {
|
|
3553
3555
|
},
|
|
3554
3556
|
onBlur: l = () => {
|
|
3555
3557
|
},
|
|
3556
3558
|
placeholder: m = "Select options",
|
|
3557
|
-
error:
|
|
3559
|
+
error: i = null,
|
|
3558
3560
|
displayLimit: u = 3,
|
|
3559
3561
|
selectionLimit: g = -1,
|
|
3560
3562
|
// NEW: search behavior
|
|
@@ -3568,11 +3570,11 @@ function at({
|
|
|
3568
3570
|
getOptionId: d = (S) => String(S.id),
|
|
3569
3571
|
getOptionLabel: p = (S) => S.name
|
|
3570
3572
|
}) {
|
|
3571
|
-
const S = Xe(), T = Xe(), [R, O] = j(""), L = ge(""), _ =
|
|
3573
|
+
const S = Xe(), T = Xe(), [R, O] = j(""), L = ge(""), _ = oe(() => {
|
|
3572
3574
|
const v = /* @__PURE__ */ new Map();
|
|
3573
3575
|
for (const $ of a) v.set(d($), $);
|
|
3574
3576
|
return v;
|
|
3575
|
-
}, [a, d]), U =
|
|
3577
|
+
}, [a, d]), U = oe(() => Array.isArray(s) ? s.map((v) => v && typeof v == "object" ? _.get(d(v)) || null : _.get(String(v))).filter(Boolean) : [], [s, _, d]), Y = oe(() => {
|
|
3576
3578
|
if (!R) return a;
|
|
3577
3579
|
const v = R.toLowerCase();
|
|
3578
3580
|
return a.filter(($) => p($).toLowerCase().includes(v));
|
|
@@ -3602,7 +3604,7 @@ function at({
|
|
|
3602
3604
|
};
|
|
3603
3605
|
return /* @__PURE__ */ e(K, { value: U, onChange: (v) => {
|
|
3604
3606
|
const $ = Array.from(new Set(v.map((B) => d(B))));
|
|
3605
|
-
g !== -1 && $.length > g ||
|
|
3607
|
+
g !== -1 && $.length > g || o($);
|
|
3606
3608
|
}, multiple: !0, by: "id", children: ({ open: v }) => /* @__PURE__ */ n("div", { children: [
|
|
3607
3609
|
/* @__PURE__ */ e(
|
|
3608
3610
|
K.Label,
|
|
@@ -3617,12 +3619,12 @@ function at({
|
|
|
3617
3619
|
K.Button,
|
|
3618
3620
|
{
|
|
3619
3621
|
"aria-labelledby": S,
|
|
3620
|
-
"aria-invalid": !!
|
|
3621
|
-
"aria-describedby":
|
|
3622
|
+
"aria-invalid": !!i,
|
|
3623
|
+
"aria-describedby": i ? T : void 0,
|
|
3622
3624
|
onBlur: l,
|
|
3623
3625
|
className: Ue(
|
|
3624
3626
|
"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",
|
|
3625
|
-
|
|
3627
|
+
i ? "ring-red-500" : "ring-gray-300"
|
|
3626
3628
|
),
|
|
3627
3629
|
children: [
|
|
3628
3630
|
/* @__PURE__ */ e("span", { className: "block truncate", children: C() }),
|
|
@@ -3688,7 +3690,7 @@ function at({
|
|
|
3688
3690
|
] })
|
|
3689
3691
|
}
|
|
3690
3692
|
),
|
|
3691
|
-
|
|
3693
|
+
i && /* @__PURE__ */ e("p", { id: T, className: "mt-1 text-sm text-red-600", children: i })
|
|
3692
3694
|
] })
|
|
3693
3695
|
] }) });
|
|
3694
3696
|
}
|
|
@@ -3738,10 +3740,10 @@ const Wl = ({
|
|
|
3738
3740
|
isOpen: t = !1,
|
|
3739
3741
|
setIsOpen: a,
|
|
3740
3742
|
content: s,
|
|
3741
|
-
header:
|
|
3743
|
+
header: o = { title: "", customHeader: null, isCrossShow: !0 },
|
|
3742
3744
|
footer: l = { show: !0, customFooter: null },
|
|
3743
3745
|
primaryAction: m = { onSubmit: null, label: "Save", loader: !1, disabled: !1 },
|
|
3744
|
-
secondaryAction:
|
|
3746
|
+
secondaryAction: i = { onCancel: null, label: "Cancel" },
|
|
3745
3747
|
dialogPanelClass: u = ""
|
|
3746
3748
|
}) => {
|
|
3747
3749
|
const g = (y) => {
|
|
@@ -3770,9 +3772,9 @@ const Wl = ({
|
|
|
3770
3772
|
onClick: f,
|
|
3771
3773
|
children: [
|
|
3772
3774
|
/* @__PURE__ */ n("div", { className: "flex justify-between items-center border-b border-gray-200 p-6 flex-shrink-0", children: [
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3775
|
+
o?.customHeader && o.customHeader,
|
|
3776
|
+
o?.title && !o?.customHeader && /* @__PURE__ */ e(et, { className: "text-lg font-bold", children: o?.title }),
|
|
3777
|
+
o?.isCrossShow && /* @__PURE__ */ e("button", { onClick: () => a(!1), className: "p-2", children: /* @__PURE__ */ e(ye, { className: "w-5 h-5" }) })
|
|
3776
3778
|
] }),
|
|
3777
3779
|
/* @__PURE__ */ e(
|
|
3778
3780
|
"div",
|
|
@@ -3783,15 +3785,15 @@ const Wl = ({
|
|
|
3783
3785
|
}
|
|
3784
3786
|
),
|
|
3785
3787
|
l?.show && !l?.customFooter && /* @__PURE__ */ n("div", { className: "border-t flex justify-end border-gray-200 p-6 flex-shrink-0", children: [
|
|
3786
|
-
|
|
3788
|
+
i?.onCancel && /* @__PURE__ */ e(
|
|
3787
3789
|
ee,
|
|
3788
3790
|
{
|
|
3789
3791
|
"data-testid": "cancel-button",
|
|
3790
|
-
label:
|
|
3792
|
+
label: i?.label,
|
|
3791
3793
|
loader: !1,
|
|
3792
3794
|
ariaLabel: "Cancel Button",
|
|
3793
3795
|
className: "p-3 mr-3 secondaryButton !w-[70px]",
|
|
3794
|
-
onClick: () =>
|
|
3796
|
+
onClick: () => i?.onCancel(),
|
|
3795
3797
|
category: "secondary"
|
|
3796
3798
|
}
|
|
3797
3799
|
),
|
|
@@ -3817,7 +3819,7 @@ const Wl = ({
|
|
|
3817
3819
|
}
|
|
3818
3820
|
);
|
|
3819
3821
|
};
|
|
3820
|
-
function
|
|
3822
|
+
function is({ listeners: t = {}, attributes: a = {} }) {
|
|
3821
3823
|
return /* @__PURE__ */ e(
|
|
3822
3824
|
"button",
|
|
3823
3825
|
{
|
|
@@ -3835,10 +3837,10 @@ function cs({
|
|
|
3835
3837
|
node: t,
|
|
3836
3838
|
depth: a,
|
|
3837
3839
|
expanded: s,
|
|
3838
|
-
onToggle:
|
|
3840
|
+
onToggle: o,
|
|
3839
3841
|
onSelect: l,
|
|
3840
3842
|
onCreateChild: m,
|
|
3841
|
-
onRename:
|
|
3843
|
+
onRename: i,
|
|
3842
3844
|
onDelete: u,
|
|
3843
3845
|
renderActions: g,
|
|
3844
3846
|
// optional override
|
|
@@ -3848,8 +3850,8 @@ function cs({
|
|
|
3848
3850
|
}) {
|
|
3849
3851
|
const { setNodeRef: x, isOver: d } = cr({ id: y }), { attributes: p, listeners: S, setNodeRef: T, transform: R, isDragging: O } = dr({ id: f }), L = R ? { transform: `translate3d(${Math.round(R.x)}px, ${Math.round(R.y)}px, 0)` } : void 0, [_, U] = j(!1), [Y, G] = j(t.name), C = () => {
|
|
3850
3852
|
const v = Y.trim();
|
|
3851
|
-
U(!1), v && v !== t.name ?
|
|
3852
|
-
}, h =
|
|
3853
|
+
U(!1), v && v !== t.name ? i?.(t, v) : G(t.name);
|
|
3854
|
+
}, h = oe(() => /* @__PURE__ */ e(
|
|
3853
3855
|
_n,
|
|
3854
3856
|
{
|
|
3855
3857
|
options: [
|
|
@@ -3872,7 +3874,7 @@ function cs({
|
|
|
3872
3874
|
v.target.closest(".tv-toggle") || v.target.tagName === "INPUT" || l?.(t);
|
|
3873
3875
|
},
|
|
3874
3876
|
children: [
|
|
3875
|
-
/* @__PURE__ */ e("button", { className: "tv-toggle", onClick:
|
|
3877
|
+
/* @__PURE__ */ e("button", { className: "tv-toggle", onClick: o, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(Nt, { size: 16 }) : /* @__PURE__ */ e(fe, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
|
|
3876
3878
|
/* @__PURE__ */ e(Le, { size: 16, className: "tv-folder-ic" }),
|
|
3877
3879
|
/* @__PURE__ */ e("div", { className: "tv-name", ref: T, children: _ ? /* @__PURE__ */ e(
|
|
3878
3880
|
"input",
|
|
@@ -3887,7 +3889,7 @@ function cs({
|
|
|
3887
3889
|
autoFocus: !0
|
|
3888
3890
|
}
|
|
3889
3891
|
) : /* @__PURE__ */ e("span", { onDoubleClick: () => U(!0), children: t.name }) }),
|
|
3890
|
-
/* @__PURE__ */ e(
|
|
3892
|
+
/* @__PURE__ */ e(is, { listeners: S, attributes: p }),
|
|
3891
3893
|
/* @__PURE__ */ e("div", { className: "tv-actions", children: g ? g(t, {
|
|
3892
3894
|
onCreateChild: () => m?.(t),
|
|
3893
3895
|
onRename: () => U(!0),
|
|
@@ -3898,7 +3900,7 @@ function cs({
|
|
|
3898
3900
|
);
|
|
3899
3901
|
}
|
|
3900
3902
|
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));
|
|
3901
|
-
function ps(t, { rootId: a, getId: s, getParent:
|
|
3903
|
+
function ps(t, { rootId: a, getId: s, getParent: o, getName: l }) {
|
|
3902
3904
|
const m = /* @__PURE__ */ new Map();
|
|
3903
3905
|
t.forEach((u) => {
|
|
3904
3906
|
const g = s(u);
|
|
@@ -3906,23 +3908,23 @@ function ps(t, { rootId: a, getId: s, getParent: i, getName: l }) {
|
|
|
3906
3908
|
...u,
|
|
3907
3909
|
id: g,
|
|
3908
3910
|
name: l(u),
|
|
3909
|
-
parentId:
|
|
3911
|
+
parentId: o(u) || a,
|
|
3910
3912
|
children: []
|
|
3911
3913
|
});
|
|
3912
3914
|
});
|
|
3913
|
-
const
|
|
3915
|
+
const i = [];
|
|
3914
3916
|
return m.forEach((u) => {
|
|
3915
3917
|
const g = u.parentId || a;
|
|
3916
|
-
g !== a && m.has(g) ? m.get(g).children.push(u) :
|
|
3917
|
-
}), { roots:
|
|
3918
|
+
g !== a && m.has(g) ? m.get(g).children.push(u) : i.push(u);
|
|
3919
|
+
}), { roots: i, byId: m };
|
|
3918
3920
|
}
|
|
3919
|
-
function gs(t, { rootId: a, getId: s, getName:
|
|
3921
|
+
function gs(t, { rootId: a, getId: s, getName: o }) {
|
|
3920
3922
|
const l = /* @__PURE__ */ new Map();
|
|
3921
3923
|
function m(u, g) {
|
|
3922
3924
|
const f = s(u), y = {
|
|
3923
3925
|
...u,
|
|
3924
3926
|
id: f,
|
|
3925
|
-
name:
|
|
3927
|
+
name: o(u),
|
|
3926
3928
|
parentId: g || a,
|
|
3927
3929
|
children: (u.children || []).map((r) => m(r, f))
|
|
3928
3930
|
};
|
|
@@ -3933,38 +3935,38 @@ function gs(t, { rootId: a, getId: s, getName: i }) {
|
|
|
3933
3935
|
const Pe = (t) => t.map((a) => ({ ...a, children: Pe(a.children || []) }));
|
|
3934
3936
|
function bs(t, a) {
|
|
3935
3937
|
let s = null;
|
|
3936
|
-
function
|
|
3937
|
-
return m.map((
|
|
3938
|
-
if (
|
|
3939
|
-
return s =
|
|
3940
|
-
if (
|
|
3941
|
-
const u = i
|
|
3942
|
-
if (u !==
|
|
3938
|
+
function o(m) {
|
|
3939
|
+
return m.map((i) => {
|
|
3940
|
+
if (i.id === a)
|
|
3941
|
+
return s = i, null;
|
|
3942
|
+
if (i.children?.length) {
|
|
3943
|
+
const u = o(i.children);
|
|
3944
|
+
if (u !== i.children) return { ...i, children: u };
|
|
3943
3945
|
}
|
|
3944
|
-
return
|
|
3946
|
+
return i;
|
|
3945
3947
|
}).filter(Boolean);
|
|
3946
3948
|
}
|
|
3947
|
-
return { newRoots:
|
|
3949
|
+
return { newRoots: o(t), removed: s };
|
|
3948
3950
|
}
|
|
3949
3951
|
function fs(t, a, s) {
|
|
3950
|
-
function
|
|
3952
|
+
function o(l) {
|
|
3951
3953
|
return l.map((m) => {
|
|
3952
3954
|
if (m.id === a)
|
|
3953
3955
|
return { ...m, children: [...m.children || [], { ...s, parentId: a }] };
|
|
3954
3956
|
if (m.children?.length) {
|
|
3955
|
-
const
|
|
3956
|
-
if (
|
|
3957
|
+
const i = o(m.children);
|
|
3958
|
+
if (i !== m.children) return { ...m, children: i };
|
|
3957
3959
|
}
|
|
3958
3960
|
return m;
|
|
3959
3961
|
});
|
|
3960
3962
|
}
|
|
3961
|
-
return
|
|
3963
|
+
return o(t);
|
|
3962
3964
|
}
|
|
3963
3965
|
function Sa(t, a, s = null) {
|
|
3964
|
-
for (const
|
|
3965
|
-
if (
|
|
3966
|
-
if (
|
|
3967
|
-
const l = Sa(
|
|
3966
|
+
for (const o of t) {
|
|
3967
|
+
if (o.id === a) return { node: o, parentId: s };
|
|
3968
|
+
if (o.children?.length) {
|
|
3969
|
+
const l = Sa(o.children, a, o.id);
|
|
3968
3970
|
if (l) return l;
|
|
3969
3971
|
}
|
|
3970
3972
|
}
|
|
@@ -3974,10 +3976,10 @@ function Jl({
|
|
|
3974
3976
|
data: t = [],
|
|
3975
3977
|
rootId: a = "root",
|
|
3976
3978
|
title: s = "Folders",
|
|
3977
|
-
getId:
|
|
3979
|
+
getId: o = ds,
|
|
3978
3980
|
getParent: l = ms,
|
|
3979
3981
|
getName: m = us,
|
|
3980
|
-
onSelect:
|
|
3982
|
+
onSelect: i,
|
|
3981
3983
|
onCreateRoot: u,
|
|
3982
3984
|
onCreateChild: g,
|
|
3983
3985
|
onRename: f,
|
|
@@ -3988,10 +3990,10 @@ function Jl({
|
|
|
3988
3990
|
// ← allow root moves by default now
|
|
3989
3991
|
indentUnit: p = 24
|
|
3990
3992
|
}) {
|
|
3991
|
-
const { roots: S } =
|
|
3993
|
+
const { roots: S } = oe(() => hs(t) ? gs(t, { rootId: a, getId: o, getName: m }) : ps(
|
|
3992
3994
|
t.map((b) => ({ ...b })),
|
|
3993
|
-
{ rootId: a, getId:
|
|
3994
|
-
), [t, a,
|
|
3995
|
+
{ rootId: a, getId: o, getParent: l, getName: m }
|
|
3996
|
+
), [t, a, o, l, m]), [T, R] = j({}), O = se((b) => {
|
|
3995
3997
|
const w = {};
|
|
3996
3998
|
return (function D(N) {
|
|
3997
3999
|
N.forEach((A) => {
|
|
@@ -4051,7 +4053,7 @@ function Jl({
|
|
|
4051
4053
|
depth: w,
|
|
4052
4054
|
expanded: !!T[D.id],
|
|
4053
4055
|
onToggle: () => L(D.id),
|
|
4054
|
-
onSelect:
|
|
4056
|
+
onSelect: i,
|
|
4055
4057
|
onCreateChild: g,
|
|
4056
4058
|
onRename: f,
|
|
4057
4059
|
onDelete: y,
|
|
@@ -4063,7 +4065,7 @@ function Jl({
|
|
|
4063
4065
|
),
|
|
4064
4066
|
T[D.id] && D.children?.length > 0 ? z(D.children, w + 1) : null
|
|
4065
4067
|
] }, D.id)),
|
|
4066
|
-
[T, p, g, y, f,
|
|
4068
|
+
[T, p, g, y, f, i, x, L]
|
|
4067
4069
|
);
|
|
4068
4070
|
return ae.useMemo(() => {
|
|
4069
4071
|
if (!C) return null;
|
|
@@ -4108,10 +4110,10 @@ const Xl = ({
|
|
|
4108
4110
|
tabs: t = [],
|
|
4109
4111
|
keepMounted: a = !0,
|
|
4110
4112
|
orientation: s = "horizontal",
|
|
4111
|
-
containerClassName:
|
|
4113
|
+
containerClassName: o = "",
|
|
4112
4114
|
listClassName: l = "",
|
|
4113
4115
|
panelClassName: m = "",
|
|
4114
|
-
tabClassName:
|
|
4116
|
+
tabClassName: i,
|
|
4115
4117
|
...u
|
|
4116
4118
|
// Pass remaining props to Tab.Group
|
|
4117
4119
|
}) => {
|
|
@@ -4121,8 +4123,8 @@ const Xl = ({
|
|
|
4121
4123
|
), y = (x) => we(
|
|
4122
4124
|
"text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
|
|
4123
4125
|
x ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
|
|
4124
|
-
), r = ({ selected: x }) =>
|
|
4125
|
-
return /* @__PURE__ */ e(ne.Group, { vertical: g, ...u, children: g ? /* @__PURE__ */ n("div", { className: we("flex gap-4",
|
|
4126
|
+
), r = ({ selected: x }) => i ? typeof i == "function" ? i(x) : i : g ? y(x) : f(x);
|
|
4127
|
+
return /* @__PURE__ */ e(ne.Group, { vertical: g, ...u, children: g ? /* @__PURE__ */ n("div", { className: we("flex gap-4", o), children: [
|
|
4126
4128
|
/* @__PURE__ */ e(ne.List, { className: we("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((x) => /* @__PURE__ */ e(ne, { className: r, children: x.label }, x.key)) }),
|
|
4127
4129
|
/* @__PURE__ */ e(ne.Panels, { unmount: !a, className: we("flex-1", m), children: t.map((x) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: x.content }) }, x.key)) })
|
|
4128
4130
|
] }) : (
|
|
@@ -4137,9 +4139,9 @@ function Ql(t, a = "YYYY-MM-DD HH:mm:ss") {
|
|
|
4137
4139
|
return t ? (t.endsWith("Z") || /[+\-]\d{2}:?\d{2}$/.test(t) ? St.parseZone(t) : St.utc(t)).local().format(a) : null;
|
|
4138
4140
|
}
|
|
4139
4141
|
c.string;
|
|
4140
|
-
function ys({ item: t, data: a, updateHandler: s, validationErrors:
|
|
4142
|
+
function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
4141
4143
|
console.log(t);
|
|
4142
|
-
const [l, m] = ae.useState(t), [
|
|
4144
|
+
const [l, m] = ae.useState(t), [i, u] = ae.useState(() => {
|
|
4143
4145
|
const r = a && a[t.key] || {};
|
|
4144
4146
|
return console.log("Initial Section data for", t.key, r), r;
|
|
4145
4147
|
}), g = ge(a);
|
|
@@ -4149,14 +4151,14 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4149
4151
|
const r = a && a[t.key] || {};
|
|
4150
4152
|
console.log("Updated Section data for", t.key, r), u(r);
|
|
4151
4153
|
}
|
|
4152
|
-
}, [a, t.key]), console.log("Section data",
|
|
4153
|
-
const f = ge(
|
|
4154
|
+
}, [a, t.key]), console.log("Section data", i);
|
|
4155
|
+
const f = ge(i);
|
|
4154
4156
|
Z(() => {
|
|
4155
|
-
f.current !==
|
|
4156
|
-
}, [l.key,
|
|
4157
|
+
f.current !== i && s && typeof s == "function" && (f.current = i, s(l.key, i));
|
|
4158
|
+
}, [l.key, i, s]);
|
|
4157
4159
|
const y = (r) => {
|
|
4158
4160
|
if (!r.dependsOn) return !0;
|
|
4159
|
-
const { field: x, value: d, operator: p = "equals" } = r.dependsOn, S =
|
|
4161
|
+
const { field: x, value: d, operator: p = "equals" } = r.dependsOn, S = i[x];
|
|
4160
4162
|
switch (p) {
|
|
4161
4163
|
case "equals":
|
|
4162
4164
|
return S === d;
|
|
@@ -4197,9 +4199,9 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4197
4199
|
gt,
|
|
4198
4200
|
{
|
|
4199
4201
|
name: r.key,
|
|
4200
|
-
checked: !!(
|
|
4202
|
+
checked: !!(i[r.key] || r.default),
|
|
4201
4203
|
onChange: (d) => {
|
|
4202
|
-
const p = d.target ? d.target.checked : d, S = { ...
|
|
4204
|
+
const p = d.target ? d.target.checked : d, S = { ...i, [r.key]: p };
|
|
4203
4205
|
u(S), s && s(l.key, S);
|
|
4204
4206
|
},
|
|
4205
4207
|
label: r.label,
|
|
@@ -4220,12 +4222,12 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4220
4222
|
)
|
|
4221
4223
|
] }, x)) }),
|
|
4222
4224
|
l.fields.some(
|
|
4223
|
-
(r) => r.fieldtype === "checkbox" &&
|
|
4225
|
+
(r) => r.fieldtype === "checkbox" && o[l.key]?.[r.key]
|
|
4224
4226
|
) && /* @__PURE__ */ e("div", { style: { marginTop: "10px" }, children: l.fields.map(
|
|
4225
|
-
(r, x) => r.fieldtype === "checkbox" &&
|
|
4227
|
+
(r, x) => r.fieldtype === "checkbox" && o[l.key]?.[r.key] && /* @__PURE__ */ n("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: [
|
|
4226
4228
|
r.label,
|
|
4227
4229
|
": ",
|
|
4228
|
-
|
|
4230
|
+
o[l.key][r.key]
|
|
4229
4231
|
] }, x)
|
|
4230
4232
|
) })
|
|
4231
4233
|
] }) : /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: l.fields.map((r, x) => y(r) && /* @__PURE__ */ n("div", { className: r.fullWidth ? "col-span-full" : "", style: { marginBottom: "10px" }, children: [
|
|
@@ -4252,18 +4254,18 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4252
4254
|
name: r.key,
|
|
4253
4255
|
defaultValue: r.default,
|
|
4254
4256
|
placeholder: r.placeholder,
|
|
4255
|
-
value:
|
|
4257
|
+
value: i[r.key] || "",
|
|
4256
4258
|
onChange: (d) => {
|
|
4257
|
-
const p = { ...
|
|
4259
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4258
4260
|
u(p), s && s(l.key, p);
|
|
4259
4261
|
},
|
|
4260
4262
|
required: r.required,
|
|
4261
4263
|
disabled: r.disabled ? r.disabled : !1,
|
|
4262
4264
|
readOnly: r.readonly ? r.readonly : !1,
|
|
4263
|
-
className: `w-full ${
|
|
4265
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4264
4266
|
}
|
|
4265
4267
|
),
|
|
4266
|
-
|
|
4268
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4267
4269
|
] }),
|
|
4268
4270
|
r.fieldtype === "textarea" && /* @__PURE__ */ n("div", { children: [
|
|
4269
4271
|
/* @__PURE__ */ e(
|
|
@@ -4272,19 +4274,19 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4272
4274
|
name: r.key,
|
|
4273
4275
|
defaultValue: r.default,
|
|
4274
4276
|
placeholder: r.placeholder,
|
|
4275
|
-
value:
|
|
4277
|
+
value: i[r.key] || "",
|
|
4276
4278
|
onChange: (d) => {
|
|
4277
|
-
const p = { ...
|
|
4279
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4278
4280
|
u(p), s && s(l.key, p);
|
|
4279
4281
|
},
|
|
4280
4282
|
rows: 3,
|
|
4281
4283
|
required: r.required,
|
|
4282
4284
|
disabled: r.disabled ? r.disabled : !1,
|
|
4283
4285
|
readOnly: r.readonly ? r.readonly : !1,
|
|
4284
|
-
className: `w-full ${
|
|
4286
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4285
4287
|
}
|
|
4286
4288
|
),
|
|
4287
|
-
|
|
4289
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4288
4290
|
] }),
|
|
4289
4291
|
r.fieldtype === "number" && /* @__PURE__ */ n("div", { children: [
|
|
4290
4292
|
/* @__PURE__ */ e(
|
|
@@ -4294,12 +4296,12 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4294
4296
|
name: r.key,
|
|
4295
4297
|
defaultValue: r.default,
|
|
4296
4298
|
placeholder: r.placeholder,
|
|
4297
|
-
value:
|
|
4299
|
+
value: i[r.key] || "",
|
|
4298
4300
|
min: r.min,
|
|
4299
4301
|
max: r.max,
|
|
4300
4302
|
step: r.step,
|
|
4301
4303
|
onChange: (d) => {
|
|
4302
|
-
const p = d.target.value, S = { ...
|
|
4304
|
+
const p = d.target.value, S = { ...i, [r.key]: p };
|
|
4303
4305
|
u(S), s && s(l.key, S);
|
|
4304
4306
|
},
|
|
4305
4307
|
onBlur: (d) => {
|
|
@@ -4311,7 +4313,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4311
4313
|
},
|
|
4312
4314
|
required: r.required,
|
|
4313
4315
|
disabled: r.disabled ? r.disabled : !1,
|
|
4314
|
-
className: `w-full ${
|
|
4316
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4315
4317
|
}
|
|
4316
4318
|
),
|
|
4317
4319
|
r.min !== void 0 && /* @__PURE__ */ n("div", { style: { color: "#6b7280", fontSize: "11px", marginTop: "2px" }, children: [
|
|
@@ -4322,16 +4324,16 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4322
4324
|
"Maximum value: ",
|
|
4323
4325
|
r.max
|
|
4324
4326
|
] }),
|
|
4325
|
-
|
|
4327
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4326
4328
|
] }),
|
|
4327
4329
|
r.fieldtype === "checkbox" && /* @__PURE__ */ n("div", { children: [
|
|
4328
4330
|
/* @__PURE__ */ e(
|
|
4329
4331
|
gt,
|
|
4330
4332
|
{
|
|
4331
4333
|
name: r.key,
|
|
4332
|
-
checked: !!(
|
|
4334
|
+
checked: !!(i[r.key] || r.default),
|
|
4333
4335
|
onChange: (d) => {
|
|
4334
|
-
const p = d.target ? d.target.checked : d, S = { ...
|
|
4336
|
+
const p = d.target ? d.target.checked : d, S = { ...i, [r.key]: p };
|
|
4335
4337
|
u(S), s && s(l.key, S);
|
|
4336
4338
|
},
|
|
4337
4339
|
label: r.placeholder || r.label,
|
|
@@ -4339,7 +4341,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4339
4341
|
className: "w-full"
|
|
4340
4342
|
}
|
|
4341
4343
|
),
|
|
4342
|
-
|
|
4344
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4343
4345
|
] }),
|
|
4344
4346
|
r.fieldtype === "select" && /* @__PURE__ */ n("div", { children: [
|
|
4345
4347
|
/* @__PURE__ */ e(
|
|
@@ -4347,19 +4349,19 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4347
4349
|
{
|
|
4348
4350
|
name: r.key,
|
|
4349
4351
|
defaultValue: r.default,
|
|
4350
|
-
value:
|
|
4352
|
+
value: i[r.key] || "",
|
|
4351
4353
|
onChange: (d) => {
|
|
4352
|
-
const p = { ...
|
|
4354
|
+
const p = { ...i, [r.key]: d };
|
|
4353
4355
|
u(p);
|
|
4354
4356
|
},
|
|
4355
4357
|
options: r.options || [],
|
|
4356
4358
|
placeholder: r.placeholder || `Select ${r.label}`,
|
|
4357
4359
|
required: r.required,
|
|
4358
4360
|
disabled: r.disabled ? r.disabled : !1,
|
|
4359
|
-
className: `w-full ${
|
|
4361
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4360
4362
|
}
|
|
4361
4363
|
),
|
|
4362
|
-
|
|
4364
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4363
4365
|
] }),
|
|
4364
4366
|
r.fieldtype === "email" && /* @__PURE__ */ n("div", { children: [
|
|
4365
4367
|
/* @__PURE__ */ e(
|
|
@@ -4369,17 +4371,17 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4369
4371
|
name: r.key,
|
|
4370
4372
|
defaultValue: r.default,
|
|
4371
4373
|
placeholder: r.placeholder || "Enter email address",
|
|
4372
|
-
value:
|
|
4374
|
+
value: i[r.key] || "",
|
|
4373
4375
|
onChange: (d) => {
|
|
4374
|
-
const p = { ...
|
|
4376
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4375
4377
|
u(p), s && s(l.key, p);
|
|
4376
4378
|
},
|
|
4377
4379
|
required: r.required,
|
|
4378
4380
|
disabled: r.disabled ? r.disabled : !1,
|
|
4379
|
-
className: `w-full ${
|
|
4381
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4380
4382
|
}
|
|
4381
4383
|
),
|
|
4382
|
-
|
|
4384
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4383
4385
|
] }),
|
|
4384
4386
|
r.fieldtype === "url" && /* @__PURE__ */ n("div", { children: [
|
|
4385
4387
|
/* @__PURE__ */ e(
|
|
@@ -4389,17 +4391,17 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4389
4391
|
name: r.key,
|
|
4390
4392
|
defaultValue: r.default,
|
|
4391
4393
|
placeholder: r.placeholder || "Enter URL",
|
|
4392
|
-
value:
|
|
4394
|
+
value: i[r.key] || "",
|
|
4393
4395
|
onChange: (d) => {
|
|
4394
|
-
const p = { ...
|
|
4396
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4395
4397
|
u(p), s && s(l.key, p);
|
|
4396
4398
|
},
|
|
4397
4399
|
required: r.required,
|
|
4398
4400
|
disabled: r.disabled ? r.disabled : !1,
|
|
4399
|
-
className: `w-full ${
|
|
4401
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4400
4402
|
}
|
|
4401
4403
|
),
|
|
4402
|
-
|
|
4404
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4403
4405
|
] }),
|
|
4404
4406
|
r.fieldtype === "password" && /* @__PURE__ */ n("div", { children: [
|
|
4405
4407
|
/* @__PURE__ */ e(
|
|
@@ -4409,62 +4411,62 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4409
4411
|
name: r.key,
|
|
4410
4412
|
defaultValue: r.default,
|
|
4411
4413
|
placeholder: r.placeholder || "Enter password",
|
|
4412
|
-
value:
|
|
4414
|
+
value: i[r.key] || "",
|
|
4413
4415
|
onChange: (d) => {
|
|
4414
|
-
const p = { ...
|
|
4416
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4415
4417
|
u(p), s && s(l.key, p);
|
|
4416
4418
|
},
|
|
4417
4419
|
required: r.required,
|
|
4418
4420
|
disabled: r.disabled ? r.disabled : !1,
|
|
4419
|
-
className: `w-full ${
|
|
4421
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4420
4422
|
}
|
|
4421
4423
|
),
|
|
4422
|
-
|
|
4424
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4423
4425
|
] }),
|
|
4424
4426
|
r.fieldtype === "multiselect" && /* @__PURE__ */ n("div", { children: [
|
|
4425
4427
|
/* @__PURE__ */ e(
|
|
4426
4428
|
at,
|
|
4427
4429
|
{
|
|
4428
|
-
selectedItems:
|
|
4430
|
+
selectedItems: i[r.key] || [],
|
|
4429
4431
|
onSelectionChange: (d) => {
|
|
4430
|
-
const p = { ...
|
|
4432
|
+
const p = { ...i, [r.key]: d };
|
|
4431
4433
|
u(p), s && s(l.key, p);
|
|
4432
4434
|
},
|
|
4433
4435
|
options: r.options || [],
|
|
4434
4436
|
placeholder: r.placeholder || `Select ${r.label}`,
|
|
4435
4437
|
disabled: r.disabled ? r.disabled : !1,
|
|
4436
|
-
className: `w-full ${
|
|
4438
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4437
4439
|
}
|
|
4438
4440
|
),
|
|
4439
|
-
|
|
4441
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4440
4442
|
] }),
|
|
4441
4443
|
r.fieldtype === "toggle" && /* @__PURE__ */ n("div", { children: [
|
|
4442
4444
|
/* @__PURE__ */ e(
|
|
4443
4445
|
fa,
|
|
4444
4446
|
{
|
|
4445
|
-
checked: typeof
|
|
4447
|
+
checked: typeof i[r.key] == "boolean" ? i[r.key] : r.default,
|
|
4446
4448
|
onChange: (d) => {
|
|
4447
4449
|
console.log("Toggle changed:", r.key, d);
|
|
4448
|
-
const p = { ...
|
|
4450
|
+
const p = { ...i, [r.key]: d };
|
|
4449
4451
|
u(p), s && s(l.key, p);
|
|
4450
4452
|
},
|
|
4451
4453
|
disabled: r.disabled ? r.disabled : !1
|
|
4452
4454
|
}
|
|
4453
4455
|
),
|
|
4454
|
-
|
|
4456
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4455
4457
|
] }),
|
|
4456
4458
|
r.fieldtype === "date" && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
4457
4459
|
ua,
|
|
4458
4460
|
{
|
|
4459
4461
|
label: r.label,
|
|
4460
|
-
value:
|
|
4462
|
+
value: i[r.key] ? new Date(i[r.key]) : null,
|
|
4461
4463
|
onChange: (d) => {
|
|
4462
|
-
const p = { ...
|
|
4464
|
+
const p = { ...i, [r.key]: d ? d.toISOString().split("T")[0] : "" };
|
|
4463
4465
|
u(p), s && s(l.key, p);
|
|
4464
4466
|
},
|
|
4465
4467
|
placeholder: r.placeholder || "Select date",
|
|
4466
4468
|
disabled: r.disabled ? r.disabled : !1,
|
|
4467
|
-
error:
|
|
4469
|
+
error: o[l.key]?.[r.key],
|
|
4468
4470
|
className: "w-full"
|
|
4469
4471
|
}
|
|
4470
4472
|
) }),
|
|
@@ -4472,14 +4474,14 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4472
4474
|
Fn,
|
|
4473
4475
|
{
|
|
4474
4476
|
label: r.label,
|
|
4475
|
-
value:
|
|
4477
|
+
value: i[r.key] || { from: null, to: null },
|
|
4476
4478
|
onChange: (d) => {
|
|
4477
|
-
const p = { ...
|
|
4479
|
+
const p = { ...i, [r.key]: d };
|
|
4478
4480
|
u(p), s && s(l.key, p);
|
|
4479
4481
|
},
|
|
4480
4482
|
placeholder: r.placeholder || "Select date range",
|
|
4481
4483
|
disabled: r.disabled ? r.disabled : !1,
|
|
4482
|
-
error:
|
|
4484
|
+
error: o[l.key]?.[r.key],
|
|
4483
4485
|
className: "w-full"
|
|
4484
4486
|
}
|
|
4485
4487
|
) }),
|
|
@@ -4487,9 +4489,9 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4487
4489
|
/* @__PURE__ */ e(
|
|
4488
4490
|
ha,
|
|
4489
4491
|
{
|
|
4490
|
-
selectedValue: typeof
|
|
4492
|
+
selectedValue: typeof i[r.key] < "u" ? i[r.key] : r.default || "",
|
|
4491
4493
|
onValueChange: (d) => {
|
|
4492
|
-
const p = { ...
|
|
4494
|
+
const p = { ...i, [r.key]: d };
|
|
4493
4495
|
u(p), s && s(l.key, p);
|
|
4494
4496
|
},
|
|
4495
4497
|
options: r.options || [],
|
|
@@ -4497,7 +4499,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4497
4499
|
className: "w-full"
|
|
4498
4500
|
}
|
|
4499
4501
|
),
|
|
4500
|
-
|
|
4502
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4501
4503
|
] }),
|
|
4502
4504
|
r.fieldtype === "native-radio" && /* @__PURE__ */ n("div", { className: "native-radiogroup-container", children: [
|
|
4503
4505
|
(r.options || []).map((d) => /* @__PURE__ */ n("div", { className: "native-radio-option", children: [
|
|
@@ -4508,9 +4510,9 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4508
4510
|
id: `${r.key}-${d.value}`,
|
|
4509
4511
|
name: r.key,
|
|
4510
4512
|
value: d.value,
|
|
4511
|
-
checked:
|
|
4513
|
+
checked: i[r.key] === d.value,
|
|
4512
4514
|
onChange: (p) => {
|
|
4513
|
-
const S = { ...
|
|
4515
|
+
const S = { ...i, [r.key]: p.target.value };
|
|
4514
4516
|
u(S), s && s(l.key, S);
|
|
4515
4517
|
},
|
|
4516
4518
|
disabled: r.disabled
|
|
@@ -4521,22 +4523,22 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4521
4523
|
d.description && /* @__PURE__ */ e("span", { className: "native-radio-description", children: d.description })
|
|
4522
4524
|
] })
|
|
4523
4525
|
] }, d.value)),
|
|
4524
|
-
|
|
4526
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4525
4527
|
] }),
|
|
4526
4528
|
r.fieldtype === "search" && /* @__PURE__ */ n("div", { children: [
|
|
4527
4529
|
/* @__PURE__ */ e(
|
|
4528
4530
|
he,
|
|
4529
4531
|
{
|
|
4530
|
-
value:
|
|
4532
|
+
value: i[r.key] || "",
|
|
4531
4533
|
onChange: (d) => {
|
|
4532
|
-
const p = { ...
|
|
4534
|
+
const p = { ...i, [r.key]: d };
|
|
4533
4535
|
u(p), s && s(l.key, p);
|
|
4534
4536
|
},
|
|
4535
4537
|
placeholder: r.placeholder || `Search ${r.label}`,
|
|
4536
|
-
className: `w-full ${
|
|
4538
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4537
4539
|
}
|
|
4538
4540
|
),
|
|
4539
|
-
|
|
4541
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4540
4542
|
] }),
|
|
4541
4543
|
(r.fieldtype === "datetime" || r.fieldtype === "datetime-local") && /* @__PURE__ */ n("div", { children: [
|
|
4542
4544
|
/* @__PURE__ */ e(
|
|
@@ -4546,16 +4548,16 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4546
4548
|
name: r.key,
|
|
4547
4549
|
defaultValue: r.default,
|
|
4548
4550
|
placeholder: r.placeholder || "Select date and time",
|
|
4549
|
-
value:
|
|
4551
|
+
value: i[r.key] || "",
|
|
4550
4552
|
onChange: (d) => {
|
|
4551
|
-
const p = { ...
|
|
4553
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4552
4554
|
u(p), s && s(l.key, p);
|
|
4553
4555
|
},
|
|
4554
4556
|
required: r.required,
|
|
4555
|
-
className: `w-full ${
|
|
4557
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4556
4558
|
}
|
|
4557
4559
|
),
|
|
4558
|
-
|
|
4560
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4559
4561
|
] }),
|
|
4560
4562
|
r.fieldtype === "time" && /* @__PURE__ */ n("div", { children: [
|
|
4561
4563
|
/* @__PURE__ */ e(
|
|
@@ -4565,16 +4567,16 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4565
4567
|
name: r.key,
|
|
4566
4568
|
defaultValue: r.default,
|
|
4567
4569
|
placeholder: r.placeholder || "Select time",
|
|
4568
|
-
value:
|
|
4570
|
+
value: i[r.key] || "",
|
|
4569
4571
|
onChange: (d) => {
|
|
4570
|
-
const p = { ...
|
|
4572
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4571
4573
|
u(p), s && s(l.key, p);
|
|
4572
4574
|
},
|
|
4573
4575
|
required: r.required,
|
|
4574
|
-
className: `w-full ${
|
|
4576
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4575
4577
|
}
|
|
4576
4578
|
),
|
|
4577
|
-
|
|
4579
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4578
4580
|
] }),
|
|
4579
4581
|
r.fieldtype === "color" && /* @__PURE__ */ n("div", { children: [
|
|
4580
4582
|
/* @__PURE__ */ e(
|
|
@@ -4583,15 +4585,15 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4583
4585
|
type: "color",
|
|
4584
4586
|
name: r.key,
|
|
4585
4587
|
defaultValue: r.default || "#000000",
|
|
4586
|
-
value:
|
|
4588
|
+
value: i[r.key] || "#000000",
|
|
4587
4589
|
onChange: (d) => {
|
|
4588
|
-
const p = { ...
|
|
4590
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4589
4591
|
u(p), s && s(l.key, p);
|
|
4590
4592
|
},
|
|
4591
|
-
className: `w-full h-10 ${
|
|
4593
|
+
className: `w-full h-10 ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4592
4594
|
}
|
|
4593
4595
|
),
|
|
4594
|
-
|
|
4596
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4595
4597
|
] }),
|
|
4596
4598
|
r.fieldtype === "range" && /* @__PURE__ */ n("div", { children: [
|
|
4597
4599
|
/* @__PURE__ */ e(
|
|
@@ -4600,26 +4602,26 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4600
4602
|
type: "range",
|
|
4601
4603
|
name: r.key,
|
|
4602
4604
|
defaultValue: r.default || r.min || 0,
|
|
4603
|
-
value:
|
|
4605
|
+
value: i[r.key] || r.min || 0,
|
|
4604
4606
|
onChange: (d) => {
|
|
4605
|
-
const p = { ...
|
|
4607
|
+
const p = { ...i, [r.key]: d.target.value };
|
|
4606
4608
|
u(p), s && s(l.key, p);
|
|
4607
4609
|
},
|
|
4608
4610
|
min: r.min || 0,
|
|
4609
4611
|
max: r.max || 100,
|
|
4610
4612
|
step: r.step || 1,
|
|
4611
|
-
className: `w-full ${
|
|
4613
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4612
4614
|
}
|
|
4613
4615
|
),
|
|
4614
4616
|
/* @__PURE__ */ n("div", { className: "flex justify-between text-sm text-gray-500 mt-1", children: [
|
|
4615
4617
|
/* @__PURE__ */ e("span", { children: r.min || 0 }),
|
|
4616
4618
|
/* @__PURE__ */ n("span", { children: [
|
|
4617
4619
|
"Current: ",
|
|
4618
|
-
|
|
4620
|
+
i[r.key] || r.min || 0
|
|
4619
4621
|
] }),
|
|
4620
4622
|
/* @__PURE__ */ e("span", { children: r.max || 100 })
|
|
4621
4623
|
] }),
|
|
4622
|
-
|
|
4624
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4623
4625
|
] }),
|
|
4624
4626
|
r.fieldtype === "file" && /* @__PURE__ */ n("div", { children: [
|
|
4625
4627
|
/* @__PURE__ */ e(
|
|
@@ -4628,24 +4630,24 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4628
4630
|
type: "file",
|
|
4629
4631
|
name: r.key,
|
|
4630
4632
|
onChange: (d) => {
|
|
4631
|
-
const p = d.target.files[0], S = { ...
|
|
4633
|
+
const p = d.target.files[0], S = { ...i, [r.key]: p ? p.name : "" };
|
|
4632
4634
|
u(S), s && s(l.key, S);
|
|
4633
4635
|
},
|
|
4634
4636
|
accept: r.accept,
|
|
4635
|
-
className: `w-full ${
|
|
4637
|
+
className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4636
4638
|
}
|
|
4637
4639
|
),
|
|
4638
|
-
|
|
4640
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4639
4641
|
] }),
|
|
4640
4642
|
r.fieldtype === "managecollectionlist" && /* @__PURE__ */ n("div", { children: [
|
|
4641
4643
|
/* @__PURE__ */ e(
|
|
4642
4644
|
Da,
|
|
4643
4645
|
{
|
|
4644
4646
|
endpoints: r.endpoints || {},
|
|
4645
|
-
initialData:
|
|
4647
|
+
initialData: i[r.key] || r.initialData || [],
|
|
4646
4648
|
className: r.className || "",
|
|
4647
4649
|
onCollectionChange: (d) => {
|
|
4648
|
-
const p = { ...
|
|
4650
|
+
const p = { ...i, [r.key]: d };
|
|
4649
4651
|
u(p), s && s(l.key, p);
|
|
4650
4652
|
},
|
|
4651
4653
|
showSearch: r.showSearch !== !1,
|
|
@@ -4655,7 +4657,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4655
4657
|
allowReorder: r.allowReorder !== !1
|
|
4656
4658
|
}
|
|
4657
4659
|
),
|
|
4658
|
-
|
|
4660
|
+
o[l.key]?.[r.key] && /* @__PURE__ */ e("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: o[l.key][r.key] })
|
|
4659
4661
|
] }),
|
|
4660
4662
|
r.info && /* @__PURE__ */ e(
|
|
4661
4663
|
"p",
|
|
@@ -4672,9 +4674,9 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4672
4674
|
] }) });
|
|
4673
4675
|
}
|
|
4674
4676
|
const xs = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
|
|
4675
|
-
function vs({ item: t, data: a, updateHandler: s, validationErrors:
|
|
4677
|
+
function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
|
|
4676
4678
|
console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
|
|
4677
|
-
const [l, m] = j(t), [
|
|
4679
|
+
const [l, m] = j(t), [i, u] = j(null), [g, f] = j(null);
|
|
4678
4680
|
console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
|
|
4679
4681
|
const [y, r] = j(() => {
|
|
4680
4682
|
const h = a && a[l.key] || [], v = h.length > 0 ? h : [{ id: 0 }];
|
|
@@ -4701,7 +4703,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4701
4703
|
const w = [...b];
|
|
4702
4704
|
return w[E][h.key] = z, w;
|
|
4703
4705
|
});
|
|
4704
|
-
}, $ = (E) =>
|
|
4706
|
+
}, $ = (E) => o[l.key]?.[E]?.[h.key], B = (E) => {
|
|
4705
4707
|
const z = $(E);
|
|
4706
4708
|
return z ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: z }) : null;
|
|
4707
4709
|
};
|
|
@@ -5077,17 +5079,17 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5077
5079
|
}, []), C = se((h) => {
|
|
5078
5080
|
console.log("[DataTableRenderer] handleAddAudience called with:", h), r((v) => {
|
|
5079
5081
|
const $ = [...v];
|
|
5080
|
-
if (
|
|
5082
|
+
if (i !== null && g && $[i]) {
|
|
5081
5083
|
const B = h.pendingInvites || [], E = B.filter((w) => w.type === "User"), z = B.filter((w) => w.type === "Group"), b = B.filter((w) => w.type === "Role");
|
|
5082
|
-
$[
|
|
5083
|
-
users: [...$[
|
|
5084
|
-
groups: [...$[
|
|
5085
|
-
roles: [...$[
|
|
5086
|
-
}, console.log("[DataTableRenderer] Updated audience data:", $[
|
|
5084
|
+
$[i][g] = {
|
|
5085
|
+
users: [...$[i][g]?.users || [], ...E],
|
|
5086
|
+
groups: [...$[i][g]?.groups || [], ...z],
|
|
5087
|
+
roles: [...$[i][g]?.roles || [], ...b]
|
|
5088
|
+
}, console.log("[DataTableRenderer] Updated audience data:", $[i][g]);
|
|
5087
5089
|
}
|
|
5088
5090
|
return $;
|
|
5089
5091
|
}), u(null), f(null);
|
|
5090
|
-
}, [
|
|
5092
|
+
}, [i, g]);
|
|
5091
5093
|
return /* @__PURE__ */ n("div", { children: [
|
|
5092
5094
|
/* @__PURE__ */ n("div", { style: { marginBottom: "20px" }, children: [
|
|
5093
5095
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
@@ -5142,14 +5144,14 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5142
5144
|
v
|
|
5143
5145
|
)) })
|
|
5144
5146
|
] }) }),
|
|
5145
|
-
|
|
5146
|
-
const h = y[
|
|
5147
|
-
users: y[
|
|
5148
|
-
groups: y[
|
|
5149
|
-
roles: y[
|
|
5147
|
+
i !== null && (() => {
|
|
5148
|
+
const h = y[i] && y[i][g] ? {
|
|
5149
|
+
users: y[i][g].users || [],
|
|
5150
|
+
groups: y[i][g].groups || [],
|
|
5151
|
+
roles: y[i][g].roles || []
|
|
5150
5152
|
} : { users: [], groups: [], roles: [] };
|
|
5151
|
-
return console.log("[DataTableRenderer] Opening modal with existing data:", h), console.log("[DataTableRenderer] Row data:", y[
|
|
5152
|
-
|
|
5153
|
+
return console.log("[DataTableRenderer] Opening modal with existing data:", h), console.log("[DataTableRenderer] Row data:", y[i]), console.log("[DataTableRenderer] Field name:", g), /* @__PURE__ */ e(
|
|
5154
|
+
os,
|
|
5153
5155
|
{
|
|
5154
5156
|
isOpen: !0,
|
|
5155
5157
|
onClose: () => {
|
|
@@ -5221,10 +5223,10 @@ const Mt = () => {
|
|
|
5221
5223
|
endpoints: t = Ns,
|
|
5222
5224
|
className: a = "",
|
|
5223
5225
|
onCollectionChange: s,
|
|
5224
|
-
showSearch:
|
|
5226
|
+
showSearch: o = !0,
|
|
5225
5227
|
allowAdd: l = !0,
|
|
5226
5228
|
allowEdit: m = !0,
|
|
5227
|
-
allowDelete:
|
|
5229
|
+
allowDelete: i = !0,
|
|
5228
5230
|
allowReorder: u = !0,
|
|
5229
5231
|
initialData: g = null
|
|
5230
5232
|
// Add prop for initial demo data
|
|
@@ -5294,7 +5296,7 @@ const Mt = () => {
|
|
|
5294
5296
|
});
|
|
5295
5297
|
y(null), x("");
|
|
5296
5298
|
}, v = (N) => {
|
|
5297
|
-
|
|
5299
|
+
i && p((A) => {
|
|
5298
5300
|
const I = A.filter((k) => k.id !== N.id);
|
|
5299
5301
|
return s?.(I), I;
|
|
5300
5302
|
});
|
|
@@ -5326,7 +5328,7 @@ const Mt = () => {
|
|
|
5326
5328
|
) : [];
|
|
5327
5329
|
return /* @__PURE__ */ n("div", { className: `manage-collection-list ${a}`, children: [
|
|
5328
5330
|
/* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ n("div", { className: "w-1/2 flex justify-end", children: [
|
|
5329
|
-
|
|
5331
|
+
o && /* @__PURE__ */ e(
|
|
5330
5332
|
he,
|
|
5331
5333
|
{
|
|
5332
5334
|
value: L,
|
|
@@ -5429,7 +5431,7 @@ const Mt = () => {
|
|
|
5429
5431
|
children: /* @__PURE__ */ e(yr, { color: "#767676" })
|
|
5430
5432
|
}
|
|
5431
5433
|
),
|
|
5432
|
-
|
|
5434
|
+
i && /* @__PURE__ */ e(
|
|
5433
5435
|
"span",
|
|
5434
5436
|
{
|
|
5435
5437
|
className: I === 0 && !N.protected ? "cursor-pointer" : "cursor-not-allowed",
|
|
@@ -5447,20 +5449,20 @@ const Mt = () => {
|
|
|
5447
5449
|
] });
|
|
5448
5450
|
}, $a = ({ item: t, data: a, updateHandler: s }) => {
|
|
5449
5451
|
const {
|
|
5450
|
-
label:
|
|
5452
|
+
label: o = "Manage Collections",
|
|
5451
5453
|
description: l = "",
|
|
5452
5454
|
endpoints: m = {},
|
|
5453
|
-
initialData:
|
|
5455
|
+
initialData: i = null,
|
|
5454
5456
|
showSearch: u = !0,
|
|
5455
5457
|
allowAdd: g = !0,
|
|
5456
5458
|
allowEdit: f = !0,
|
|
5457
5459
|
allowDelete: y = !0,
|
|
5458
5460
|
allowReorder: r = !0,
|
|
5459
5461
|
className: x = ""
|
|
5460
|
-
} = t, d = a?.[t.key] ||
|
|
5462
|
+
} = t, d = a?.[t.key] || i || [], p = Array.isArray(d) ? d : [];
|
|
5461
5463
|
return /* @__PURE__ */ n("div", { className: "dynamic-config-manage-collection-list", children: [
|
|
5462
|
-
(
|
|
5463
|
-
|
|
5464
|
+
(o || l) && /* @__PURE__ */ n("div", { className: "mb-4", children: [
|
|
5465
|
+
o && /* @__PURE__ */ e("h3", { className: "text-lg font-medium text-gray-900 mb-1", children: o }),
|
|
5464
5466
|
l && /* @__PURE__ */ e("p", { className: "text-sm text-gray-600", children: l })
|
|
5465
5467
|
] }),
|
|
5466
5468
|
/* @__PURE__ */ e(
|
|
@@ -5500,10 +5502,10 @@ function zs({
|
|
|
5500
5502
|
appid: t,
|
|
5501
5503
|
configdata: a = null,
|
|
5502
5504
|
disableApi: s = !1,
|
|
5503
|
-
onSave:
|
|
5505
|
+
onSave: o,
|
|
5504
5506
|
onShowCancelModal: l
|
|
5505
5507
|
}) {
|
|
5506
|
-
const [m,
|
|
5508
|
+
const [m, i] = ae.useState(a), [u, g] = ae.useState(null), [f, y] = ae.useState(null), [r, x] = j(!1), [d, p] = j(!1), [S, T] = j({}), R = `${ze()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, O = R, [L, _] = j(1), U = () => !f || !u ? !1 : JSON.stringify(f) !== JSON.stringify(u), Y = (b) => {
|
|
5507
5509
|
if (!a || !a.configuration)
|
|
5508
5510
|
return b;
|
|
5509
5511
|
const w = {}, D = b?.configuration || {};
|
|
@@ -5578,7 +5580,7 @@ function zs({
|
|
|
5578
5580
|
x(!1);
|
|
5579
5581
|
}
|
|
5580
5582
|
};
|
|
5581
|
-
a && (
|
|
5583
|
+
a && (i(a), t ? b() : G());
|
|
5582
5584
|
}, [a, L, t, s]);
|
|
5583
5585
|
const C = (b, w) => {
|
|
5584
5586
|
g((D) => ({
|
|
@@ -5693,7 +5695,7 @@ function zs({
|
|
|
5693
5695
|
if (N && N.status != "fail") {
|
|
5694
5696
|
T({});
|
|
5695
5697
|
const A = N.message || "Configuration has been saved successfully";
|
|
5696
|
-
Ge.success(A),
|
|
5698
|
+
Ge.success(A), o && typeof o == "function" && o(u);
|
|
5697
5699
|
} else
|
|
5698
5700
|
throw Ge.error(N?.message || "Failed to save configuration"), new Error("No response received from server");
|
|
5699
5701
|
} catch (D) {
|
|
@@ -5764,7 +5766,7 @@ const Hl = ({
|
|
|
5764
5766
|
appid: a = "Configuration-Page",
|
|
5765
5767
|
disableApi: s = !1
|
|
5766
5768
|
}) => {
|
|
5767
|
-
const [
|
|
5769
|
+
const [o, l] = j(0), [m, i] = j(!1), {
|
|
5768
5770
|
pageHeader: u = {},
|
|
5769
5771
|
appletHeader: g = {},
|
|
5770
5772
|
breadcrumb: f = [],
|
|
@@ -5818,7 +5820,7 @@ const Hl = ({
|
|
|
5818
5820
|
label: C.text,
|
|
5819
5821
|
href: C.href || "#"
|
|
5820
5822
|
})), S = se((C) => {
|
|
5821
|
-
|
|
5823
|
+
i(!1), C.primary && window.location.reload();
|
|
5822
5824
|
}, []), T = se((C) => {
|
|
5823
5825
|
console.log("Configuration changed:", C);
|
|
5824
5826
|
}, []), R = (() => {
|
|
@@ -5862,11 +5864,11 @@ const Hl = ({
|
|
|
5862
5864
|
}
|
|
5863
5865
|
],
|
|
5864
5866
|
...y
|
|
5865
|
-
}, _ =
|
|
5867
|
+
}, _ = oe(() => ({
|
|
5866
5868
|
configuration: x
|
|
5867
|
-
}), [x]), U =
|
|
5869
|
+
}), [x]), U = oe(() => [
|
|
5868
5870
|
{ label: "Overview", content: G(L) },
|
|
5869
|
-
{ label: "Configuration", content: /* @__PURE__ */ e(zs, { appid: a, configdata: _, disableApi: s, onSave: T, onShowCancelModal: () =>
|
|
5871
|
+
{ label: "Configuration", content: /* @__PURE__ */ e(zs, { appid: a, configdata: _, disableApi: s, onSave: T, onShowCancelModal: () => i(!0) }) }
|
|
5870
5872
|
], [a, _, s, T, L]);
|
|
5871
5873
|
function Y(C) {
|
|
5872
5874
|
return C ? C.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: C } }) : C : "📱";
|
|
@@ -5936,12 +5938,12 @@ const Hl = ({
|
|
|
5936
5938
|
"button",
|
|
5937
5939
|
{
|
|
5938
5940
|
onClick: () => l(h),
|
|
5939
|
-
className: `${
|
|
5941
|
+
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`,
|
|
5940
5942
|
children: C.label
|
|
5941
5943
|
},
|
|
5942
5944
|
h
|
|
5943
5945
|
)) }) }),
|
|
5944
|
-
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: U[
|
|
5946
|
+
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: U[o].content })
|
|
5945
5947
|
] }),
|
|
5946
5948
|
/* @__PURE__ */ e(
|
|
5947
5949
|
Pn,
|
|
@@ -5987,12 +5989,12 @@ const Kl = ({
|
|
|
5987
5989
|
subheading: a = "",
|
|
5988
5990
|
totalCount: s = 0,
|
|
5989
5991
|
// Prefer "apiRef" naming for clarity (it's the wrapper API, not the raw grid instance)
|
|
5990
|
-
gridRef:
|
|
5992
|
+
gridRef: o,
|
|
5991
5993
|
// backward compat
|
|
5992
5994
|
apiRef: l,
|
|
5993
5995
|
// preferred
|
|
5994
5996
|
onAdd: m,
|
|
5995
|
-
onFilterOpen:
|
|
5997
|
+
onFilterOpen: i,
|
|
5996
5998
|
addBtnText: u = "Add",
|
|
5997
5999
|
// Feature toggles
|
|
5998
6000
|
showSearch: g = !0,
|
|
@@ -6013,7 +6015,7 @@ const Kl = ({
|
|
|
6013
6015
|
excelFileName: L,
|
|
6014
6016
|
pdfFileName: _
|
|
6015
6017
|
}) => {
|
|
6016
|
-
const U = () => l?.current ||
|
|
6018
|
+
const U = () => l?.current || o?.current, [Y, G] = ae.useState(""), C = (t || "export").toString().trim() || "export", h = `${L || C}.xlsx`, v = `${_ || C}.pdf`, $ = (z, b, w) => Math.max(b, Math.min(z, w)), B = se(
|
|
6017
6019
|
(z) => {
|
|
6018
6020
|
const b = U();
|
|
6019
6021
|
if (console.log("openColumnChooserNear", b), !!b?.openColumnChooser) {
|
|
@@ -6094,7 +6096,7 @@ const Kl = ({
|
|
|
6094
6096
|
ee,
|
|
6095
6097
|
{
|
|
6096
6098
|
icon: vr,
|
|
6097
|
-
onClick:
|
|
6099
|
+
onClick: i,
|
|
6098
6100
|
size: "small",
|
|
6099
6101
|
ariaLabel: "Filters",
|
|
6100
6102
|
category: "secondary",
|
|
@@ -6161,16 +6163,16 @@ const Kl = ({
|
|
|
6161
6163
|
] })
|
|
6162
6164
|
] });
|
|
6163
6165
|
};
|
|
6164
|
-
function
|
|
6166
|
+
function eo(t) {
|
|
6165
6167
|
const {
|
|
6166
6168
|
data: a = [],
|
|
6167
6169
|
totalCount: s = 0,
|
|
6168
|
-
uniqueId:
|
|
6170
|
+
uniqueId: o = "grid",
|
|
6169
6171
|
pageIndex: l = 1,
|
|
6170
6172
|
// 1-based
|
|
6171
6173
|
// pageSize = 10,
|
|
6172
6174
|
allowPaging: m = !0,
|
|
6173
|
-
allowSorting:
|
|
6175
|
+
allowSorting: i = !0,
|
|
6174
6176
|
allowFiltering: u = !1,
|
|
6175
6177
|
allowGrouping: g = !1,
|
|
6176
6178
|
allowReordering: f = !0,
|
|
@@ -6193,10 +6195,10 @@ function ei(t) {
|
|
|
6193
6195
|
pageSettings: v,
|
|
6194
6196
|
sortSettings: $,
|
|
6195
6197
|
...B
|
|
6196
|
-
} = C || {}, [E, z] = ae.useState(v?.page || 1), [b, w] = ae.useState($?.pageSize || 20), [D, N] = ae.useState($?.sortKey || "updatedDate"), [A, I] = ae.useState($?.direction || "Descending"), k =
|
|
6198
|
+
} = C || {}, [E, z] = ae.useState(v?.page || 1), [b, w] = ae.useState($?.pageSize || 20), [D, N] = ae.useState($?.sortKey || "updatedDate"), [A, I] = ae.useState($?.direction || "Descending"), k = oe(() => {
|
|
6197
6199
|
const V = [sn];
|
|
6198
|
-
return
|
|
6199
|
-
}, [
|
|
6200
|
+
return i && V.push(ln), u && V.push(on), g && V.push(cn), p && V.push(dn), r && V.push(mn), x && V.push(un), d && V.push(hn), y && V.push(pn), f && V.push(gn), V.push(bn), V;
|
|
6201
|
+
}, [i, u, g, p, r, x, d, y, f]), M = oe(() => {
|
|
6200
6202
|
const V = () => h.current, re = (W, ve) => {
|
|
6201
6203
|
!ve && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${W} requested but related service/feature is disabled.`);
|
|
6202
6204
|
};
|
|
@@ -6300,7 +6302,7 @@ function ei(t) {
|
|
|
6300
6302
|
return /* @__PURE__ */ n(
|
|
6301
6303
|
fn,
|
|
6302
6304
|
{
|
|
6303
|
-
id:
|
|
6305
|
+
id: o,
|
|
6304
6306
|
ref: h,
|
|
6305
6307
|
dataSource: {
|
|
6306
6308
|
result: a,
|
|
@@ -6308,7 +6310,7 @@ function ei(t) {
|
|
|
6308
6310
|
},
|
|
6309
6311
|
height: S,
|
|
6310
6312
|
allowPaging: m,
|
|
6311
|
-
allowSorting:
|
|
6313
|
+
allowSorting: i,
|
|
6312
6314
|
allowFiltering: u,
|
|
6313
6315
|
allowGrouping: g,
|
|
6314
6316
|
allowReordering: f,
|
|
@@ -6355,25 +6357,25 @@ const ce = (t) => {
|
|
|
6355
6357
|
meta: "text-sm"
|
|
6356
6358
|
}
|
|
6357
6359
|
}, 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;
|
|
6358
|
-
function
|
|
6360
|
+
function ie({
|
|
6359
6361
|
children: t,
|
|
6360
6362
|
className: a = "",
|
|
6361
6363
|
showCheckbox: s = !1,
|
|
6362
|
-
checkboxPosition:
|
|
6364
|
+
checkboxPosition: o = "top-left",
|
|
6363
6365
|
// "top-left" | "top-right"
|
|
6364
6366
|
onSelect: l,
|
|
6365
6367
|
identity: m = "_id",
|
|
6366
|
-
details:
|
|
6368
|
+
details: i = {},
|
|
6367
6369
|
...u
|
|
6368
6370
|
}) {
|
|
6369
6371
|
const g = Xe(), f = Ss(u, m), y = (x) => {
|
|
6370
6372
|
l?.({
|
|
6371
6373
|
key: f,
|
|
6372
6374
|
checked: x.target.checked,
|
|
6373
|
-
details:
|
|
6375
|
+
details: i,
|
|
6374
6376
|
props: u
|
|
6375
6377
|
});
|
|
6376
|
-
}, r =
|
|
6378
|
+
}, r = o === "top-right" ? "top-3 right-3" : "top-3 left-3";
|
|
6377
6379
|
return /* @__PURE__ */ n(
|
|
6378
6380
|
"div",
|
|
6379
6381
|
{
|
|
@@ -6395,7 +6397,7 @@ function oe({
|
|
|
6395
6397
|
}
|
|
6396
6398
|
);
|
|
6397
6399
|
}
|
|
6398
|
-
|
|
6400
|
+
ie.propTypes = {
|
|
6399
6401
|
showCheckbox: c.bool,
|
|
6400
6402
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
6401
6403
|
onSelect: c.func,
|
|
@@ -6406,11 +6408,11 @@ function Ds({
|
|
|
6406
6408
|
size: t = "md",
|
|
6407
6409
|
showCheckbox: a = !1,
|
|
6408
6410
|
checkboxPosition: s = "top-left",
|
|
6409
|
-
onSelect:
|
|
6411
|
+
onSelect: o,
|
|
6410
6412
|
identity: l = "_id",
|
|
6411
6413
|
// content
|
|
6412
6414
|
title: m = "Activity",
|
|
6413
|
-
group:
|
|
6415
|
+
group: i = "Global",
|
|
6414
6416
|
moreGroupsLabel: u = "+ 5 more",
|
|
6415
6417
|
author: g = "Judith Black",
|
|
6416
6418
|
timeLabel: f = "Just now",
|
|
@@ -6421,14 +6423,14 @@ function Ds({
|
|
|
6421
6423
|
}) {
|
|
6422
6424
|
const d = ce(t), p = de[d];
|
|
6423
6425
|
return /* @__PURE__ */ n(
|
|
6424
|
-
|
|
6426
|
+
ie,
|
|
6425
6427
|
{
|
|
6426
6428
|
className: `flex flex-col ${p.card}`,
|
|
6427
6429
|
showCheckbox: a,
|
|
6428
6430
|
checkboxPosition: s,
|
|
6429
|
-
onSelect:
|
|
6431
|
+
onSelect: o,
|
|
6430
6432
|
identity: l,
|
|
6431
|
-
details: { type: "activity", title: m, group:
|
|
6433
|
+
details: { type: "activity", title: m, group: i, author: g },
|
|
6432
6434
|
...x,
|
|
6433
6435
|
children: [
|
|
6434
6436
|
/* @__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 }) }),
|
|
@@ -6529,25 +6531,25 @@ function Es({
|
|
|
6529
6531
|
size: t = "md",
|
|
6530
6532
|
showCheckbox: a = !1,
|
|
6531
6533
|
checkboxPosition: s = "top-left",
|
|
6532
|
-
onSelect:
|
|
6534
|
+
onSelect: o,
|
|
6533
6535
|
identity: l = "_id",
|
|
6534
6536
|
title: m = "Communities",
|
|
6535
|
-
activeTab:
|
|
6537
|
+
activeTab: i = "joined",
|
|
6536
6538
|
// "joined" | "suggested"
|
|
6537
6539
|
items: u = As,
|
|
6538
6540
|
// spread for identity (_id/instanceId/etc)
|
|
6539
6541
|
...g
|
|
6540
6542
|
}) {
|
|
6541
|
-
const f = ce(t), y = de[f], r = Fs[f], x = (d) => `px-1 pb-2 text-sm font-medium ${d ===
|
|
6543
|
+
const f = ce(t), y = de[f], r = Fs[f], x = (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"}`;
|
|
6542
6544
|
return /* @__PURE__ */ n(
|
|
6543
|
-
|
|
6545
|
+
ie,
|
|
6544
6546
|
{
|
|
6545
6547
|
className: `flex flex-col ${y.card} ${r.wrap}`,
|
|
6546
6548
|
showCheckbox: a,
|
|
6547
6549
|
checkboxPosition: s,
|
|
6548
|
-
onSelect:
|
|
6550
|
+
onSelect: o,
|
|
6549
6551
|
identity: l,
|
|
6550
|
-
details: { type: "communities", title: m, activeTab:
|
|
6552
|
+
details: { type: "communities", title: m, activeTab: i, count: u?.length ?? 0 },
|
|
6551
6553
|
...g,
|
|
6552
6554
|
children: [
|
|
6553
6555
|
/* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
|
|
@@ -6565,14 +6567,14 @@ function Es({
|
|
|
6565
6567
|
/* @__PURE__ */ e(
|
|
6566
6568
|
"span",
|
|
6567
6569
|
{
|
|
6568
|
-
className: `${x("joined")} ${
|
|
6570
|
+
className: `${x("joined")} ${i === "joined" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
|
|
6569
6571
|
children: "Joined"
|
|
6570
6572
|
}
|
|
6571
6573
|
),
|
|
6572
6574
|
/* @__PURE__ */ e(
|
|
6573
6575
|
"span",
|
|
6574
6576
|
{
|
|
6575
|
-
className: `${x("suggested")} ${
|
|
6577
|
+
className: `${x("suggested")} ${i === "suggested" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
|
|
6576
6578
|
children: "Suggested"
|
|
6577
6579
|
}
|
|
6578
6580
|
)
|
|
@@ -6715,23 +6717,23 @@ function Is({
|
|
|
6715
6717
|
size: t = "md",
|
|
6716
6718
|
showCheckbox: a = !1,
|
|
6717
6719
|
checkboxPosition: s = "top-left",
|
|
6718
|
-
onSelect:
|
|
6720
|
+
onSelect: o,
|
|
6719
6721
|
identity: l = "_id",
|
|
6720
6722
|
title: m = "News",
|
|
6721
|
-
items:
|
|
6723
|
+
items: i = Rs,
|
|
6722
6724
|
// spread for identity fields: _id / id / instanceId etc.
|
|
6723
6725
|
...u
|
|
6724
6726
|
}) {
|
|
6725
6727
|
const g = ce(t), f = de[g], y = Os[g];
|
|
6726
6728
|
return /* @__PURE__ */ n(
|
|
6727
|
-
|
|
6729
|
+
ie,
|
|
6728
6730
|
{
|
|
6729
6731
|
className: `flex flex-col ${f.card} ${y.wrap || ""}`,
|
|
6730
6732
|
showCheckbox: a,
|
|
6731
6733
|
checkboxPosition: s,
|
|
6732
|
-
onSelect:
|
|
6734
|
+
onSelect: o,
|
|
6733
6735
|
identity: l,
|
|
6734
|
-
details: { type: "news", title: m, count:
|
|
6736
|
+
details: { type: "news", title: m, count: i?.length ?? 0 },
|
|
6735
6737
|
...u,
|
|
6736
6738
|
children: [
|
|
6737
6739
|
/* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
|
|
@@ -6740,7 +6742,7 @@ function Is({
|
|
|
6740
6742
|
] }),
|
|
6741
6743
|
g === "lg" ? (
|
|
6742
6744
|
// Large: 3-up grid of image cards
|
|
6743
|
-
/* @__PURE__ */ e("div", { className: `mt-4 ${y.grid}`, children:
|
|
6745
|
+
/* @__PURE__ */ e("div", { className: `mt-4 ${y.grid}`, children: i.slice(0, 3).map((r) => /* @__PURE__ */ n("article", { children: [
|
|
6744
6746
|
/* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: y.cardImg }),
|
|
6745
6747
|
/* @__PURE__ */ e("h4", { className: `mt-3 ${y.title} text-zinc-900 dark:text-zinc-100`, children: r.title }),
|
|
6746
6748
|
/* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${y.date}`, children: r.date }),
|
|
@@ -6753,7 +6755,7 @@ function Is({
|
|
|
6753
6755
|
] }, r._id || r.id || r.instanceId)) })
|
|
6754
6756
|
) : (
|
|
6755
6757
|
// Small/Medium: list rows with thumb left
|
|
6756
|
-
/* @__PURE__ */ e("ul", { className: "mt-4 grid gap-3", children:
|
|
6758
|
+
/* @__PURE__ */ e("ul", { className: "mt-4 grid gap-3", children: i.slice(0, 3).map((r) => /* @__PURE__ */ n(
|
|
6757
6759
|
"li",
|
|
6758
6760
|
{
|
|
6759
6761
|
className: "flex items-start gap-3 rounded-xl border border-zinc-200 dark:border-zinc-800 p-2",
|
|
@@ -6819,22 +6821,22 @@ const Ps = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Ls = {
|
|
|
6819
6821
|
searchH: "h-11 text-base",
|
|
6820
6822
|
chipGap: "gap-3.5"
|
|
6821
6823
|
}
|
|
6822
|
-
}, Ms = ({ label: t, active: a = !1, size: s = "md", className:
|
|
6824
|
+
}, Ms = ({ label: t, active: a = !1, size: s = "md", className: o = "" }) => {
|
|
6823
6825
|
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 = {
|
|
6824
6826
|
sm: "h-8 px-3 text-[11px] font-semibold",
|
|
6825
6827
|
md: "h-9 px-3.5 text-[13px] font-semibold",
|
|
6826
6828
|
lg: "h-10 px-4 text-sm font-semibold"
|
|
6827
|
-
},
|
|
6828
|
-
return /* @__PURE__ */ e("span", { className: `${l} ${m[s] ?? m.md} ${
|
|
6829
|
+
}, 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";
|
|
6830
|
+
return /* @__PURE__ */ e("span", { className: `${l} ${m[s] ?? m.md} ${i} ${o}`, children: t });
|
|
6829
6831
|
}, Bs = (t, a = 12) => `https://www.google.com/maps?q=${encodeURIComponent(t)}&z=${a}&output=embed`;
|
|
6830
6832
|
function js({
|
|
6831
6833
|
size: t = "md",
|
|
6832
6834
|
showCheckbox: a = !1,
|
|
6833
6835
|
checkboxPosition: s = "top-left",
|
|
6834
|
-
onSelect:
|
|
6836
|
+
onSelect: o,
|
|
6835
6837
|
identity: l = "_id",
|
|
6836
6838
|
title: m = "Campus Map",
|
|
6837
|
-
campusName:
|
|
6839
|
+
campusName: i = "Morningside Heights Campus",
|
|
6838
6840
|
filters: u = Ps,
|
|
6839
6841
|
activeFilter: g = "All",
|
|
6840
6842
|
// NEW: iframe controls
|
|
@@ -6846,14 +6848,14 @@ function js({
|
|
|
6846
6848
|
}) {
|
|
6847
6849
|
const d = ce(t), p = de[d], S = Ls[d], T = r || Bs(f, y);
|
|
6848
6850
|
return /* @__PURE__ */ e(
|
|
6849
|
-
|
|
6851
|
+
ie,
|
|
6850
6852
|
{
|
|
6851
6853
|
className: `flex flex-col ${p.card} ${S.wrap}`,
|
|
6852
6854
|
showCheckbox: a,
|
|
6853
6855
|
checkboxPosition: s,
|
|
6854
|
-
onSelect:
|
|
6856
|
+
onSelect: o,
|
|
6855
6857
|
identity: l,
|
|
6856
|
-
details: { type: "campus-map", title: m, campusName:
|
|
6858
|
+
details: { type: "campus-map", title: m, campusName: i, activeFilter: g, mapQuery: f, zoom: y },
|
|
6857
6859
|
...x,
|
|
6858
6860
|
children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${S.mapH}`, children: [
|
|
6859
6861
|
/* @__PURE__ */ e(
|
|
@@ -6870,7 +6872,7 @@ function js({
|
|
|
6870
6872
|
),
|
|
6871
6873
|
/* @__PURE__ */ n("div", { className: "absolute left-4 right-4 top-3 flex items-center justify-between pointer-events-none", children: [
|
|
6872
6874
|
/* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${S.campusPill}`, children: [
|
|
6873
|
-
/* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children:
|
|
6875
|
+
/* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children: i }),
|
|
6874
6876
|
/* @__PURE__ */ e("span", { className: "ml-2 text-zinc-400", children: "▾" })
|
|
6875
6877
|
] }),
|
|
6876
6878
|
/* @__PURE__ */ n("div", { className: "hidden md:flex items-center gap-2", "aria-hidden": "true", children: [
|
|
@@ -6979,13 +6981,13 @@ const Vs = [
|
|
|
6979
6981
|
time: a.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })
|
|
6980
6982
|
};
|
|
6981
6983
|
};
|
|
6982
|
-
function Vt({ ev: t, sizeMeta: a, isSelected: s, onClick:
|
|
6983
|
-
const { day: l, month: m, time:
|
|
6984
|
+
function Vt({ ev: t, sizeMeta: a, isSelected: s, onClick: o }) {
|
|
6985
|
+
const { day: l, month: m, time: i } = Ta(t.date);
|
|
6984
6986
|
return /* @__PURE__ */ n(
|
|
6985
6987
|
"div",
|
|
6986
6988
|
{
|
|
6987
6989
|
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" : ""}`,
|
|
6988
|
-
onClick: () =>
|
|
6990
|
+
onClick: () => o(t),
|
|
6989
6991
|
children: [
|
|
6990
6992
|
/* @__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: [
|
|
6991
6993
|
l,
|
|
@@ -6996,7 +6998,7 @@ function Vt({ ev: t, sizeMeta: a, isSelected: s, onClick: i }) {
|
|
|
6996
6998
|
/* @__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 }),
|
|
6997
6999
|
/* @__PURE__ */ n("div", { className: `flex items-center gap-1.5 mt-1 text-zinc-500 dark:text-zinc-400 ${a.meta}`, children: [
|
|
6998
7000
|
/* @__PURE__ */ e(Ae, { className: "h-3 w-3" }),
|
|
6999
|
-
t.allDayNote ? t.allDayNote :
|
|
7001
|
+
t.allDayNote ? t.allDayNote : i
|
|
7000
7002
|
] })
|
|
7001
7003
|
] })
|
|
7002
7004
|
]
|
|
@@ -7005,12 +7007,12 @@ function Vt({ ev: t, sizeMeta: a, isSelected: s, onClick: i }) {
|
|
|
7005
7007
|
}
|
|
7006
7008
|
function Gs({ ev: t, sizeMeta: a }) {
|
|
7007
7009
|
if (!t) return null;
|
|
7008
|
-
const { day: s, month:
|
|
7010
|
+
const { day: s, month: o, time: l } = Ta(t.date);
|
|
7009
7011
|
return /* @__PURE__ */ n("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 p-6", children: [
|
|
7010
7012
|
/* @__PURE__ */ n("div", { className: "flex items-start gap-4 mb-4", children: [
|
|
7011
7013
|
/* @__PURE__ */ n("div", { className: "flex-shrink-0", children: [
|
|
7012
7014
|
/* @__PURE__ */ e("div", { className: "text-2xl font-bold text-zinc-900 dark:text-zinc-100", children: s }),
|
|
7013
|
-
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wide", children:
|
|
7015
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wide", children: o })
|
|
7014
7016
|
] }),
|
|
7015
7017
|
/* @__PURE__ */ n("div", { className: "flex-grow", children: [
|
|
7016
7018
|
/* @__PURE__ */ e("h3", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-2`, children: t.title }),
|
|
@@ -7043,25 +7045,25 @@ function qs({
|
|
|
7043
7045
|
size: t = "md",
|
|
7044
7046
|
showCheckbox: a = !1,
|
|
7045
7047
|
checkboxPosition: s = "top-left",
|
|
7046
|
-
onSelect:
|
|
7048
|
+
onSelect: o,
|
|
7047
7049
|
identity: l = "_id",
|
|
7048
7050
|
title: m = "Upcoming Events",
|
|
7049
|
-
events:
|
|
7051
|
+
events: i = Vs,
|
|
7050
7052
|
selectedIndex: u = 0,
|
|
7051
7053
|
...g
|
|
7052
7054
|
}) {
|
|
7053
|
-
const [f, y] = j(u), r = ce(t), x = de[r], d = _s[r], p =
|
|
7054
|
-
y(O),
|
|
7055
|
+
const [f, y] = j(u), r = ce(t), x = de[r], d = _s[r], p = i[f] || i[0], S = (R, O) => {
|
|
7056
|
+
y(O), o?.(R);
|
|
7055
7057
|
}, T = r === "lg";
|
|
7056
7058
|
return /* @__PURE__ */ n(
|
|
7057
|
-
|
|
7059
|
+
ie,
|
|
7058
7060
|
{
|
|
7059
7061
|
className: `flex flex-col ${x.card} ${d.wrap}`,
|
|
7060
7062
|
showCheckbox: a,
|
|
7061
7063
|
checkboxPosition: s,
|
|
7062
|
-
onSelect:
|
|
7064
|
+
onSelect: o,
|
|
7063
7065
|
identity: l,
|
|
7064
|
-
details: { type: "events", title: m, count:
|
|
7066
|
+
details: { type: "events", title: m, count: i?.length ?? 0 },
|
|
7065
7067
|
...g,
|
|
7066
7068
|
children: [
|
|
7067
7069
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between mb-4", children: [
|
|
@@ -7071,7 +7073,7 @@ function qs({
|
|
|
7071
7073
|
T ? (
|
|
7072
7074
|
// Large: Two-column layout
|
|
7073
7075
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
7074
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children:
|
|
7076
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: i.map((R, O) => /* @__PURE__ */ e(
|
|
7075
7077
|
Vt,
|
|
7076
7078
|
{
|
|
7077
7079
|
ev: R,
|
|
@@ -7085,7 +7087,7 @@ function qs({
|
|
|
7085
7087
|
] })
|
|
7086
7088
|
) : (
|
|
7087
7089
|
// Small/Medium: Simple list only
|
|
7088
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children:
|
|
7090
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: i.map((R, O) => /* @__PURE__ */ e(
|
|
7089
7091
|
Vt,
|
|
7090
7092
|
{
|
|
7091
7093
|
ev: R,
|
|
@@ -7205,8 +7207,8 @@ const Ys = [
|
|
|
7205
7207
|
searchHeight: "h-10"
|
|
7206
7208
|
}
|
|
7207
7209
|
};
|
|
7208
|
-
function Js({ email: t, sizeMeta: a, isSelected: s, onClick:
|
|
7209
|
-
const
|
|
7210
|
+
function Js({ email: t, sizeMeta: a, isSelected: s, onClick: o, onStar: l, onPin: m }) {
|
|
7211
|
+
const i = (g) => {
|
|
7210
7212
|
g.stopPropagation(), l?.(t);
|
|
7211
7213
|
}, u = (g) => {
|
|
7212
7214
|
g.stopPropagation(), m?.(t);
|
|
@@ -7215,13 +7217,13 @@ function Js({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin
|
|
|
7215
7217
|
"div",
|
|
7216
7218
|
{
|
|
7217
7219
|
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" : ""}`,
|
|
7218
|
-
onClick: () =>
|
|
7220
|
+
onClick: () => o(t),
|
|
7219
7221
|
children: [
|
|
7220
7222
|
/* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-1 pt-0.5", children: [
|
|
7221
7223
|
/* @__PURE__ */ e(
|
|
7222
7224
|
"button",
|
|
7223
7225
|
{
|
|
7224
|
-
onClick:
|
|
7226
|
+
onClick: i,
|
|
7225
7227
|
className: "p-1 rounded hover:bg-zinc-200 dark:hover:bg-zinc-700 transition-colors duration-200",
|
|
7226
7228
|
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" })
|
|
7227
7229
|
}
|
|
@@ -7258,17 +7260,17 @@ function Xs({
|
|
|
7258
7260
|
size: t = "md",
|
|
7259
7261
|
showCheckbox: a = !1,
|
|
7260
7262
|
checkboxPosition: s = "top-left",
|
|
7261
|
-
onSelect:
|
|
7263
|
+
onSelect: o,
|
|
7262
7264
|
identity: l = "_id",
|
|
7263
7265
|
title: m = "0365 Mails",
|
|
7264
|
-
emails:
|
|
7266
|
+
emails: i = Ys,
|
|
7265
7267
|
selectedIndex: u = 0,
|
|
7266
7268
|
onStar: g,
|
|
7267
7269
|
onPin: f,
|
|
7268
7270
|
...y
|
|
7269
7271
|
}) {
|
|
7270
7272
|
const [r, x] = j(u), d = ce(t), p = de[d], S = Ws[d], T = (L, _) => {
|
|
7271
|
-
x(_),
|
|
7273
|
+
x(_), o?.(L);
|
|
7272
7274
|
}, R = (L) => {
|
|
7273
7275
|
const _ = { ...L, starred: !L.starred };
|
|
7274
7276
|
g?.(_);
|
|
@@ -7277,19 +7279,19 @@ function Xs({
|
|
|
7277
7279
|
f?.(_);
|
|
7278
7280
|
};
|
|
7279
7281
|
return /* @__PURE__ */ n(
|
|
7280
|
-
|
|
7282
|
+
ie,
|
|
7281
7283
|
{
|
|
7282
7284
|
className: `flex flex-col ${p.card} ${S.wrap}`,
|
|
7283
7285
|
showCheckbox: a,
|
|
7284
7286
|
checkboxPosition: s,
|
|
7285
|
-
onSelect:
|
|
7287
|
+
onSelect: o,
|
|
7286
7288
|
identity: l,
|
|
7287
|
-
details: { type: "emails", title: m, count:
|
|
7289
|
+
details: { type: "emails", title: m, count: i?.length ?? 0 },
|
|
7288
7290
|
...y,
|
|
7289
7291
|
children: [
|
|
7290
7292
|
/* @__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 }) }),
|
|
7291
7293
|
/* @__PURE__ */ e(he, { placeholder: "Type to search..." }),
|
|
7292
|
-
/* @__PURE__ */ e("div", { className: "space-y-0", children:
|
|
7294
|
+
/* @__PURE__ */ e("div", { className: "space-y-0", children: i.map((L, _) => /* @__PURE__ */ e(
|
|
7293
7295
|
Js,
|
|
7294
7296
|
{
|
|
7295
7297
|
email: L,
|
|
@@ -7418,12 +7420,12 @@ const Qs = [
|
|
|
7418
7420
|
// two columns for large screens
|
|
7419
7421
|
}
|
|
7420
7422
|
};
|
|
7421
|
-
function _t({ contact: t, sizeMeta: a, isSelected: s, onClick:
|
|
7423
|
+
function _t({ contact: t, sizeMeta: a, isSelected: s, onClick: o }) {
|
|
7422
7424
|
return /* @__PURE__ */ n(
|
|
7423
7425
|
"div",
|
|
7424
7426
|
{
|
|
7425
7427
|
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"}`,
|
|
7426
|
-
onClick: () =>
|
|
7428
|
+
onClick: () => o(t),
|
|
7427
7429
|
children: [
|
|
7428
7430
|
/* @__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 }),
|
|
7429
7431
|
/* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
|
|
@@ -7512,31 +7514,31 @@ function el({
|
|
|
7512
7514
|
size: t = "md",
|
|
7513
7515
|
showCheckbox: a = !1,
|
|
7514
7516
|
checkboxPosition: s = "top-left",
|
|
7515
|
-
onSelect:
|
|
7517
|
+
onSelect: o,
|
|
7516
7518
|
identity: l = "_id",
|
|
7517
7519
|
title: m = "Directory",
|
|
7518
|
-
contacts:
|
|
7520
|
+
contacts: i = Qs,
|
|
7519
7521
|
selectedIndex: u = 0,
|
|
7520
7522
|
...g
|
|
7521
7523
|
}) {
|
|
7522
7524
|
const [f, y] = j(u), r = ce(t), x = de[r], d = Hs[r], p = (R, O) => {
|
|
7523
|
-
y(O),
|
|
7524
|
-
}, S =
|
|
7525
|
+
y(O), o?.(R);
|
|
7526
|
+
}, S = i[f] || i[0], T = d.layout === "split";
|
|
7525
7527
|
return /* @__PURE__ */ n(
|
|
7526
|
-
|
|
7528
|
+
ie,
|
|
7527
7529
|
{
|
|
7528
7530
|
className: `flex flex-col ${x.card} ${d.wrap}`,
|
|
7529
7531
|
showCheckbox: a,
|
|
7530
7532
|
checkboxPosition: s,
|
|
7531
|
-
onSelect:
|
|
7533
|
+
onSelect: o,
|
|
7532
7534
|
identity: l,
|
|
7533
|
-
details: { type: "directory", title: m, count:
|
|
7535
|
+
details: { type: "directory", title: m, count: i?.length ?? 0 },
|
|
7534
7536
|
...g,
|
|
7535
7537
|
children: [
|
|
7536
7538
|
/* @__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 ${x.title}`, children: m }) }),
|
|
7537
7539
|
/* @__PURE__ */ e(Ks, { sizeMeta: d }),
|
|
7538
7540
|
T ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
|
|
7539
|
-
/* @__PURE__ */ e("div", { className: "space-y-3", children:
|
|
7541
|
+
/* @__PURE__ */ e("div", { className: "space-y-3", children: i.map((R, O) => /* @__PURE__ */ e(
|
|
7540
7542
|
_t,
|
|
7541
7543
|
{
|
|
7542
7544
|
contact: R,
|
|
@@ -7555,7 +7557,7 @@ function el({
|
|
|
7555
7557
|
)
|
|
7556
7558
|
] }) : (
|
|
7557
7559
|
// Single column layout for small screens
|
|
7558
|
-
/* @__PURE__ */ e("div", { className: "space-y-3", children:
|
|
7560
|
+
/* @__PURE__ */ e("div", { className: "space-y-3", children: i.map((R, O) => /* @__PURE__ */ e(
|
|
7559
7561
|
_t,
|
|
7560
7562
|
{
|
|
7561
7563
|
contact: R,
|
|
@@ -7593,12 +7595,12 @@ el.propTypes = {
|
|
|
7593
7595
|
selectedIndex: c.number
|
|
7594
7596
|
};
|
|
7595
7597
|
const De = (t) => new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" }).format(Number(t || 0));
|
|
7596
|
-
function tl({ side: t = "left", date: a, title: s, amount:
|
|
7598
|
+
function tl({ side: t = "left", date: a, title: s, amount: o, kind: l = "payment" }) {
|
|
7597
7599
|
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: [
|
|
7598
7600
|
/* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: a }),
|
|
7599
7601
|
/* @__PURE__ */ e("div", { className: "mt-1 text-sm text-zinc-700 dark:text-zinc-200", children: s }),
|
|
7600
7602
|
/* @__PURE__ */ n("div", { className: "mt-2 flex items-center justify-between", children: [
|
|
7601
|
-
/* @__PURE__ */ e("div", { className: "text-sm font-semibold", children: De(
|
|
7603
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-semibold", children: De(o) }),
|
|
7602
7604
|
/* @__PURE__ */ e(
|
|
7603
7605
|
"div",
|
|
7604
7606
|
{
|
|
@@ -7645,11 +7647,11 @@ function rl({
|
|
|
7645
7647
|
size: t = "md",
|
|
7646
7648
|
showCheckbox: a = !1,
|
|
7647
7649
|
checkboxPosition: s = "top-left",
|
|
7648
|
-
onSelect:
|
|
7650
|
+
onSelect: o,
|
|
7649
7651
|
identity: l = "_id",
|
|
7650
7652
|
// content
|
|
7651
7653
|
title: m = "Account Summary",
|
|
7652
|
-
termLabel:
|
|
7654
|
+
termLabel: i = "Spring 2024",
|
|
7653
7655
|
balance: u = 3e3,
|
|
7654
7656
|
totalCharges: g = 4440,
|
|
7655
7657
|
totalPayments: f = 1568,
|
|
@@ -7673,20 +7675,20 @@ function rl({
|
|
|
7673
7675
|
}) {
|
|
7674
7676
|
const x = ce(t), d = de[x], p = al[x];
|
|
7675
7677
|
return /* @__PURE__ */ n(
|
|
7676
|
-
|
|
7678
|
+
ie,
|
|
7677
7679
|
{
|
|
7678
7680
|
className: `flex flex-col ${d.card} ${p.wrap}`,
|
|
7679
7681
|
showCheckbox: a,
|
|
7680
7682
|
checkboxPosition: s,
|
|
7681
|
-
onSelect:
|
|
7683
|
+
onSelect: o,
|
|
7682
7684
|
identity: l,
|
|
7683
|
-
details: { type: "account-summary", termLabel:
|
|
7685
|
+
details: { type: "account-summary", termLabel: i, balance: u, totalCharges: g, totalPayments: f },
|
|
7684
7686
|
...r,
|
|
7685
7687
|
children: [
|
|
7686
7688
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
7687
7689
|
/* @__PURE__ */ e("div", { className: `font-semibold ${d.title}`, children: m }),
|
|
7688
7690
|
/* @__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: [
|
|
7689
|
-
/* @__PURE__ */ e("span", { children:
|
|
7691
|
+
/* @__PURE__ */ e("span", { children: i }),
|
|
7690
7692
|
/* @__PURE__ */ e(Nt, { className: "h-4 w-4 opacity-70" })
|
|
7691
7693
|
] })
|
|
7692
7694
|
] }),
|
|
@@ -7828,30 +7830,30 @@ function Ut({ leave: t, sizeMeta: a }) {
|
|
|
7828
7830
|
/* @__PURE__ */ e("span", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${a.table}`, children: t.name }),
|
|
7829
7831
|
/* @__PURE__ */ e("span", { className: `text-zinc-600 dark:text-zinc-400 ${a.table}`, children: t.available })
|
|
7830
7832
|
] }) }),
|
|
7831
|
-
/* @__PURE__ */ e("div", { className: "divide-y divide-zinc-200 dark:divide-zinc-800", children: t.breakdown.map((s,
|
|
7833
|
+
/* @__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: [
|
|
7832
7834
|
/* @__PURE__ */ e("span", { className: `text-zinc-700 dark:text-zinc-300 ${a.table}`, children: s.label }),
|
|
7833
7835
|
/* @__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 })
|
|
7834
|
-
] },
|
|
7836
|
+
] }, o)) })
|
|
7835
7837
|
] });
|
|
7836
7838
|
}
|
|
7837
7839
|
function sl({
|
|
7838
7840
|
size: t = "md",
|
|
7839
7841
|
showCheckbox: a = !1,
|
|
7840
7842
|
checkboxPosition: s = "top-left",
|
|
7841
|
-
onSelect:
|
|
7843
|
+
onSelect: o,
|
|
7842
7844
|
identity: l = "_id",
|
|
7843
7845
|
title: m = "Pay Stub and Leave Balance",
|
|
7844
|
-
term:
|
|
7846
|
+
term: i = "Fall 2025",
|
|
7845
7847
|
...u
|
|
7846
7848
|
}) {
|
|
7847
7849
|
const [g, f] = j("vacation"), [y, r] = j(!1), x = ce(t), d = de[x], p = nl[x], S = qe.find((T) => T.id === g) || qe[0];
|
|
7848
7850
|
return /* @__PURE__ */ n(
|
|
7849
|
-
|
|
7851
|
+
ie,
|
|
7850
7852
|
{
|
|
7851
7853
|
className: `flex flex-col ${d.card} ${p.wrap}`,
|
|
7852
7854
|
showCheckbox: a,
|
|
7853
7855
|
checkboxPosition: s,
|
|
7854
|
-
onSelect:
|
|
7856
|
+
onSelect: o,
|
|
7855
7857
|
identity: l,
|
|
7856
7858
|
details: { type: "leave-balance", title: m },
|
|
7857
7859
|
...u,
|
|
@@ -7862,7 +7864,7 @@ function sl({
|
|
|
7862
7864
|
/* @__PURE__ */ n("div", { className: `text-zinc-600 dark:text-zinc-400 ${p.term} flex items-center gap-2`, children: [
|
|
7863
7865
|
/* @__PURE__ */ e(Yt, { className: "h-4 w-4" }),
|
|
7864
7866
|
"Term - ",
|
|
7865
|
-
|
|
7867
|
+
i
|
|
7866
7868
|
] })
|
|
7867
7869
|
] }),
|
|
7868
7870
|
/* @__PURE__ */ n("div", { className: "relative", children: [
|
|
@@ -7952,7 +7954,7 @@ const ll = [
|
|
|
7952
7954
|
// icon: Video,
|
|
7953
7955
|
// color: "text-purple-500"
|
|
7954
7956
|
// }
|
|
7955
|
-
],
|
|
7957
|
+
], ol = [
|
|
7956
7958
|
{
|
|
7957
7959
|
id: "file-1",
|
|
7958
7960
|
name: "2024 - Taurus",
|
|
@@ -7985,7 +7987,7 @@ const ll = [
|
|
|
7985
7987
|
icon: pt,
|
|
7986
7988
|
color: "text-orange-500"
|
|
7987
7989
|
}
|
|
7988
|
-
],
|
|
7990
|
+
], il = {
|
|
7989
7991
|
sm: {
|
|
7990
7992
|
wrap: "max-w-xs w-full",
|
|
7991
7993
|
title: "text-base font-semibold",
|
|
@@ -8015,9 +8017,9 @@ const ll = [
|
|
|
8015
8017
|
}
|
|
8016
8018
|
};
|
|
8017
8019
|
function Gt({ item: t, sizeMeta: a, showDate: s = !1 }) {
|
|
8018
|
-
const
|
|
8020
|
+
const o = t.icon;
|
|
8019
8021
|
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: [
|
|
8020
|
-
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(
|
|
8022
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(o, { className: `h-6 w-6 ${t.color}` }) }),
|
|
8021
8023
|
/* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
|
|
8022
8024
|
/* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 truncate ${a.item}`, children: t.name }),
|
|
8023
8025
|
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 })
|
|
@@ -8029,20 +8031,20 @@ function cl({
|
|
|
8029
8031
|
size: t = "md",
|
|
8030
8032
|
showCheckbox: a = !1,
|
|
8031
8033
|
checkboxPosition: s = "top-left",
|
|
8032
|
-
onSelect:
|
|
8034
|
+
onSelect: o,
|
|
8033
8035
|
identity: l = "_id",
|
|
8034
8036
|
title: m = "Drive",
|
|
8035
|
-
subtitle:
|
|
8037
|
+
subtitle: i = "Drive Shared",
|
|
8036
8038
|
...u
|
|
8037
8039
|
}) {
|
|
8038
|
-
const [g, f] = j(!1), y = ce(t), r = de[y], x =
|
|
8040
|
+
const [g, f] = j(!1), y = ce(t), r = de[y], x = il[y];
|
|
8039
8041
|
return /* @__PURE__ */ n(
|
|
8040
|
-
|
|
8042
|
+
ie,
|
|
8041
8043
|
{
|
|
8042
8044
|
className: `flex flex-col ${r.card} ${x.wrap}`,
|
|
8043
8045
|
showCheckbox: a,
|
|
8044
8046
|
checkboxPosition: s,
|
|
8045
|
-
onSelect:
|
|
8047
|
+
onSelect: o,
|
|
8046
8048
|
identity: l,
|
|
8047
8049
|
details: { type: "drive", title: m },
|
|
8048
8050
|
...u,
|
|
@@ -8050,7 +8052,7 @@ function cl({
|
|
|
8050
8052
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
8051
8053
|
/* @__PURE__ */ n("div", { children: [
|
|
8052
8054
|
/* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${x.title} mb-1`, children: m }),
|
|
8053
|
-
/* @__PURE__ */ e("div", { className: "text-zinc-600 dark:text-zinc-400 text-sm", children:
|
|
8055
|
+
/* @__PURE__ */ e("div", { className: "text-zinc-600 dark:text-zinc-400 text-sm", children: i })
|
|
8054
8056
|
] }),
|
|
8055
8057
|
/* @__PURE__ */ n("div", { className: "relative", children: [
|
|
8056
8058
|
/* @__PURE__ */ e(
|
|
@@ -8083,7 +8085,7 @@ function cl({
|
|
|
8083
8085
|
)) }),
|
|
8084
8086
|
x.showRecent && /* @__PURE__ */ n("div", { className: "", children: [
|
|
8085
8087
|
/* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${x.item}`, children: "Recent Files" }),
|
|
8086
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children:
|
|
8088
|
+
/* @__PURE__ */ e("div", { className: "space-y-2", children: ol.map((d) => /* @__PURE__ */ e(
|
|
8087
8089
|
Gt,
|
|
8088
8090
|
{
|
|
8089
8091
|
item: d,
|
|
@@ -8226,9 +8228,9 @@ const dl = [
|
|
|
8226
8228
|
};
|
|
8227
8229
|
}
|
|
8228
8230
|
};
|
|
8229
|
-
function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead:
|
|
8230
|
-
const [l, m] = j(!1),
|
|
8231
|
-
return l ? null : /* @__PURE__ */ n("div", { className: `relative rounded-lg border-l-4 p-4 transition-all duration-200 ${
|
|
8231
|
+
function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: o }) {
|
|
8232
|
+
const [l, m] = j(!1), i = Aa(t.type), u = ul(t.type);
|
|
8233
|
+
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: [
|
|
8232
8234
|
/* @__PURE__ */ e(
|
|
8233
8235
|
"button",
|
|
8234
8236
|
{
|
|
@@ -8237,7 +8239,7 @@ function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
|
|
|
8237
8239
|
}
|
|
8238
8240
|
),
|
|
8239
8241
|
/* @__PURE__ */ n("div", { className: "flex gap-3 pr-6", children: [
|
|
8240
|
-
/* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(u, { className: `h-4 w-4 ${
|
|
8242
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(u, { className: `h-4 w-4 ${i.icon}` }) }),
|
|
8241
8243
|
/* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
|
|
8242
8244
|
/* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-1 ${t.read ? "font-medium" : "font-semibold"}`, children: qt(t.title, a.maxTitleWords) }),
|
|
8243
8245
|
a.showMessage && t.message && /* @__PURE__ */ e("div", { className: `${a.message} text-zinc-600 dark:text-zinc-400 mb-2 leading-relaxed`, children: qt(t.message, a.maxMessageWords) }),
|
|
@@ -8251,8 +8253,8 @@ function hl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
|
|
|
8251
8253
|
] });
|
|
8252
8254
|
}
|
|
8253
8255
|
function pl({ alert: t, onDismiss: a }) {
|
|
8254
|
-
const [s,
|
|
8255
|
-
|
|
8256
|
+
const [s, o] = j(!1), l = Aa("banner"), m = () => {
|
|
8257
|
+
o(!0), a?.(t);
|
|
8256
8258
|
};
|
|
8257
8259
|
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: [
|
|
8258
8260
|
/* @__PURE__ */ e(sa, { className: `h-5 w-5 mt-0.5 ${l.icon}` }),
|
|
@@ -8274,23 +8276,23 @@ function gl({
|
|
|
8274
8276
|
size: t = "md",
|
|
8275
8277
|
showCheckbox: a = !1,
|
|
8276
8278
|
checkboxPosition: s = "top-left",
|
|
8277
|
-
onSelect:
|
|
8279
|
+
onSelect: o,
|
|
8278
8280
|
identity: l = "_id",
|
|
8279
8281
|
title: m = "Alerts",
|
|
8280
|
-
alerts:
|
|
8282
|
+
alerts: i = dl,
|
|
8281
8283
|
showBanner: u = !0,
|
|
8282
8284
|
...g
|
|
8283
8285
|
}) {
|
|
8284
|
-
const [f, y] = j(
|
|
8286
|
+
const [f, y] = j(i), r = ce(t), x = de[r], d = ml[r], p = (R) => {
|
|
8285
8287
|
y((O) => O.filter((L) => L.id !== R.id));
|
|
8286
8288
|
}, S = f.find((R) => R.type === "banner"), T = f.filter((R) => R.type !== "banner");
|
|
8287
8289
|
return /* @__PURE__ */ n(
|
|
8288
|
-
|
|
8290
|
+
ie,
|
|
8289
8291
|
{
|
|
8290
8292
|
className: `flex flex-col ${x.card} ${d.wrap}`,
|
|
8291
8293
|
showCheckbox: a,
|
|
8292
8294
|
checkboxPosition: s,
|
|
8293
|
-
onSelect:
|
|
8295
|
+
onSelect: o,
|
|
8294
8296
|
identity: l,
|
|
8295
8297
|
details: { type: "alerts", title: m, count: f.length },
|
|
8296
8298
|
...g,
|
|
@@ -8415,7 +8417,7 @@ const bl = [
|
|
|
8415
8417
|
}
|
|
8416
8418
|
};
|
|
8417
8419
|
function yl({ video: t, sizeMeta: a }) {
|
|
8418
|
-
const [s,
|
|
8420
|
+
const [s, o] = j(!1);
|
|
8419
8421
|
return /* @__PURE__ */ n("div", { className: "group cursor-pointer", children: [
|
|
8420
8422
|
/* @__PURE__ */ n("div", { className: `relative ${a.thumbnailHeight} rounded-lg overflow-hidden bg-zinc-200 dark:bg-zinc-800`, children: [
|
|
8421
8423
|
/* @__PURE__ */ e(
|
|
@@ -8451,22 +8453,22 @@ function xl({
|
|
|
8451
8453
|
size: t = "md",
|
|
8452
8454
|
showCheckbox: a = !1,
|
|
8453
8455
|
checkboxPosition: s = "top-left",
|
|
8454
|
-
onSelect:
|
|
8456
|
+
onSelect: o,
|
|
8455
8457
|
identity: l = "_id",
|
|
8456
8458
|
title: m = "Videos",
|
|
8457
|
-
videos:
|
|
8459
|
+
videos: i = bl,
|
|
8458
8460
|
...u
|
|
8459
8461
|
}) {
|
|
8460
8462
|
const [g, f] = j(!1), y = ce(t), r = de[y], x = fl[y];
|
|
8461
8463
|
return /* @__PURE__ */ n(
|
|
8462
|
-
|
|
8464
|
+
ie,
|
|
8463
8465
|
{
|
|
8464
8466
|
className: `flex flex-col ${r.card} ${x.wrap}`,
|
|
8465
8467
|
showCheckbox: a,
|
|
8466
8468
|
checkboxPosition: s,
|
|
8467
|
-
onSelect:
|
|
8469
|
+
onSelect: o,
|
|
8468
8470
|
identity: l,
|
|
8469
|
-
details: { type: "videos", title: m, count:
|
|
8471
|
+
details: { type: "videos", title: m, count: i.length },
|
|
8470
8472
|
...u,
|
|
8471
8473
|
children: [
|
|
8472
8474
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between ", children: [
|
|
@@ -8491,7 +8493,7 @@ function xl({
|
|
|
8491
8493
|
] })
|
|
8492
8494
|
] })
|
|
8493
8495
|
] }),
|
|
8494
|
-
/* @__PURE__ */ e("div", { className: `grid ${x.gridCols} gap-4 `, children:
|
|
8496
|
+
/* @__PURE__ */ e("div", { className: `grid ${x.gridCols} gap-4 `, children: i.slice(0, x.gridCols === "grid-cols-3" ? 6 : 4).map((d) => /* @__PURE__ */ e(
|
|
8495
8497
|
yl,
|
|
8496
8498
|
{
|
|
8497
8499
|
video: d,
|
|
@@ -8528,7 +8530,7 @@ xl.propTypes = {
|
|
|
8528
8530
|
export {
|
|
8529
8531
|
rl as AccountSummaryMock,
|
|
8530
8532
|
Ds as ActivityMock,
|
|
8531
|
-
|
|
8533
|
+
os as AddUserGroupsRolesModal,
|
|
8532
8534
|
gl as AlertsMock,
|
|
8533
8535
|
Ce as Avatar,
|
|
8534
8536
|
kn as AvatarGroup,
|
|
@@ -8538,7 +8540,7 @@ export {
|
|
|
8538
8540
|
js as CampusMapMock,
|
|
8539
8541
|
gt as Checkbox,
|
|
8540
8542
|
Es as CommunitiesMock,
|
|
8541
|
-
|
|
8543
|
+
eo as CustomDataGrid,
|
|
8542
8544
|
Wl as CustomDialog,
|
|
8543
8545
|
Kl as CustomGridToolbar,
|
|
8544
8546
|
Xl as CustomTab,
|
|
@@ -8567,7 +8569,7 @@ export {
|
|
|
8567
8569
|
ha as RadioGroup,
|
|
8568
8570
|
he as SearchBar,
|
|
8569
8571
|
yt as Select,
|
|
8570
|
-
|
|
8572
|
+
ie as SelectableCard,
|
|
8571
8573
|
Il as Sidebar,
|
|
8572
8574
|
ga as Spinner,
|
|
8573
8575
|
ba as Textarea,
|