unifyedx-storybook-new 0.2.56 → 0.2.57
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.
|
@@ -15,8 +15,8 @@ const pn = (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
|
}, gn = (t) => {
|
|
18
|
-
const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = pn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10,
|
|
19
|
-
return { bg: u, text:
|
|
18
|
+
const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = pn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, h = 86 + (i >>> 24) % 8, u = `hsl(${l}, ${m}%, ${h}%)`, w = `hsl(${l}, ${m}%, ${o}%)`;
|
|
19
|
+
return { bg: u, text: w };
|
|
20
20
|
}, bn = (t = "") => t.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase(), Ce = ({
|
|
21
21
|
src: t,
|
|
22
22
|
name: a,
|
|
@@ -29,11 +29,11 @@ const pn = (t) => {
|
|
|
29
29
|
className: m,
|
|
30
30
|
...o
|
|
31
31
|
}) => {
|
|
32
|
-
const [
|
|
32
|
+
const [h, u] = L(!1), w = le(() => gn(a), []), y = t && !h, r = !y && a, v = !y && !a, d = H(
|
|
33
33
|
"avatar-container",
|
|
34
34
|
`avatar--size-${s}`,
|
|
35
35
|
m
|
|
36
|
-
), g = y ? "transparent" : i ||
|
|
36
|
+
), g = y ? "transparent" : i || w.bg, z = l || w.text;
|
|
37
37
|
return /* @__PURE__ */ n("div", { className: d, style: {
|
|
38
38
|
backgroundColor: g,
|
|
39
39
|
color: z
|
|
@@ -48,7 +48,7 @@ const pn = (t) => {
|
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
50
|
r && /* @__PURE__ */ e("span", { className: "avatar-initials", "aria-label": a, children: bn(a) }),
|
|
51
|
-
|
|
51
|
+
v && /* @__PURE__ */ e("span", { className: "avatar-icon", children: /* @__PURE__ */ e(it, {}) })
|
|
52
52
|
] });
|
|
53
53
|
}, fn = ({ children: t, max: a = 4, truncatedMessage: s = "Members", ...i }) => {
|
|
54
54
|
const l = ae.Children.toArray(t), m = l.slice(0, a), o = l.length - a;
|
|
@@ -71,17 +71,17 @@ const pn = (t) => {
|
|
|
71
71
|
onRemove: l,
|
|
72
72
|
bgColor: m,
|
|
73
73
|
textColor: o,
|
|
74
|
-
className:
|
|
74
|
+
className: h,
|
|
75
75
|
...u
|
|
76
76
|
}) => {
|
|
77
|
-
const
|
|
77
|
+
const w = H(
|
|
78
78
|
"badge",
|
|
79
79
|
`badge--variant-${a}`,
|
|
80
80
|
`badge--size-${s}`,
|
|
81
81
|
{ "badge--with-remove": !!l },
|
|
82
|
-
|
|
82
|
+
h
|
|
83
83
|
);
|
|
84
|
-
return /* @__PURE__ */ n("span", { className:
|
|
84
|
+
return /* @__PURE__ */ n("span", { className: w, style: m && o ? {
|
|
85
85
|
backgroundColor: m,
|
|
86
86
|
color: o,
|
|
87
87
|
borderColor: "#ff0000"
|
|
@@ -146,19 +146,19 @@ const xn = {
|
|
|
146
146
|
// ✅ Default is now empty
|
|
147
147
|
loader: m = !1,
|
|
148
148
|
category: o = "primary",
|
|
149
|
-
icon:
|
|
149
|
+
icon: h,
|
|
150
150
|
// Renamed for clarity, expecting a component type e.g., CheckCircle
|
|
151
151
|
disabled: u = !1,
|
|
152
|
-
size:
|
|
152
|
+
size: w = "medium",
|
|
153
153
|
label: y,
|
|
154
154
|
children: r,
|
|
155
155
|
// ✅ Add children to the props list
|
|
156
|
-
onClick:
|
|
156
|
+
onClick: v,
|
|
157
157
|
...d
|
|
158
158
|
}) => {
|
|
159
|
-
const g = u || m, z =
|
|
159
|
+
const g = u || m, z = h && !y, A = H(
|
|
160
160
|
"btn-base",
|
|
161
|
-
xn[
|
|
161
|
+
xn[w],
|
|
162
162
|
vn[o],
|
|
163
163
|
{
|
|
164
164
|
"is-loading": m,
|
|
@@ -173,12 +173,12 @@ const xn = {
|
|
|
173
173
|
type: s,
|
|
174
174
|
className: A,
|
|
175
175
|
disabled: g,
|
|
176
|
-
onClick:
|
|
176
|
+
onClick: v,
|
|
177
177
|
title: a || z && i || (typeof y == "string" ? y : void 0),
|
|
178
178
|
"aria-label": i || z && a || (typeof y == "string" ? y : void 0),
|
|
179
179
|
...d,
|
|
180
180
|
children: m ? /* @__PURE__ */ e(Pa, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(ee, { children: [
|
|
181
|
-
|
|
181
|
+
h && /* @__PURE__ */ e(h, { size: w === "large" ? 20 : 16 }),
|
|
182
182
|
y,
|
|
183
183
|
r,
|
|
184
184
|
" "
|
|
@@ -216,21 +216,21 @@ const xn = {
|
|
|
216
216
|
ref: l,
|
|
217
217
|
checked: m,
|
|
218
218
|
onChange: o,
|
|
219
|
-
...
|
|
219
|
+
...h
|
|
220
220
|
}) => {
|
|
221
|
-
const u = We(),
|
|
221
|
+
const u = We(), w = a || u;
|
|
222
222
|
return /* @__PURE__ */ n("div", { className: `checkbox-container ${i || ""}`, children: [
|
|
223
|
-
/* @__PURE__ */ n("label", { htmlFor:
|
|
223
|
+
/* @__PURE__ */ n("label", { htmlFor: w, className: "checkbox-wrapper", children: [
|
|
224
224
|
/* @__PURE__ */ e(
|
|
225
225
|
"input",
|
|
226
226
|
{
|
|
227
|
-
id:
|
|
227
|
+
id: w,
|
|
228
228
|
type: "checkbox",
|
|
229
229
|
ref: l,
|
|
230
230
|
className: "checkbox-input",
|
|
231
231
|
checked: m,
|
|
232
232
|
onChange: o,
|
|
233
|
-
...
|
|
233
|
+
...h
|
|
234
234
|
}
|
|
235
235
|
),
|
|
236
236
|
/* @__PURE__ */ e(
|
|
@@ -256,9 +256,9 @@ const xn = {
|
|
|
256
256
|
label: l,
|
|
257
257
|
error: m,
|
|
258
258
|
disabled: o = !1,
|
|
259
|
-
className:
|
|
259
|
+
className: h,
|
|
260
260
|
...u
|
|
261
|
-
}) => /* @__PURE__ */ n("div", { className: H("datepicker-wrapper",
|
|
261
|
+
}) => /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", h), children: [
|
|
262
262
|
l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "datepicker-input", children: l }),
|
|
263
263
|
/* @__PURE__ */ e(
|
|
264
264
|
da,
|
|
@@ -284,17 +284,17 @@ const xn = {
|
|
|
284
284
|
label: l,
|
|
285
285
|
error: m,
|
|
286
286
|
disabled: o = !1,
|
|
287
|
-
className:
|
|
287
|
+
className: h,
|
|
288
288
|
...u
|
|
289
289
|
}) => {
|
|
290
|
-
const
|
|
290
|
+
const w = t?.from, y = t?.to, r = (d) => {
|
|
291
291
|
d.stopPropagation(), d.preventDefault(), s?.();
|
|
292
|
-
},
|
|
293
|
-
Ct(
|
|
292
|
+
}, v = w && y ? /* @__PURE__ */ n(ee, { children: [
|
|
293
|
+
Ct(w, "MMM d, y"),
|
|
294
294
|
" - ",
|
|
295
295
|
Ct(y, "MMM d, y")
|
|
296
296
|
] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: i });
|
|
297
|
-
return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper",
|
|
297
|
+
return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", h), children: [
|
|
298
298
|
l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "daterangepicker-input", children: l }),
|
|
299
299
|
/* @__PURE__ */ n(Nn, { children: [
|
|
300
300
|
/* @__PURE__ */ e(kn, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "datepicker-input-container", children: [
|
|
@@ -308,14 +308,14 @@ const xn = {
|
|
|
308
308
|
"datepicker-trigger--disabled": o
|
|
309
309
|
}),
|
|
310
310
|
disabled: o,
|
|
311
|
-
"aria-label":
|
|
311
|
+
"aria-label": w && y ? `Selected range is ${v}` : i,
|
|
312
312
|
children: [
|
|
313
313
|
/* @__PURE__ */ e(qt, { className: "datepicker-icon" }),
|
|
314
|
-
/* @__PURE__ */ e("span", { className: "datepicker-value", children:
|
|
314
|
+
/* @__PURE__ */ e("span", { className: "datepicker-value", children: v })
|
|
315
315
|
]
|
|
316
316
|
}
|
|
317
317
|
),
|
|
318
|
-
|
|
318
|
+
w && s && !o && /* @__PURE__ */ e(
|
|
319
319
|
"button",
|
|
320
320
|
{
|
|
321
321
|
type: "button",
|
|
@@ -621,17 +621,17 @@ const xn = {
|
|
|
621
621
|
open: m,
|
|
622
622
|
// --- Form and File State ---
|
|
623
623
|
validFiles: o = [],
|
|
624
|
-
rejectedFiles:
|
|
624
|
+
rejectedFiles: h = [],
|
|
625
625
|
handleRemoveValidFile: u,
|
|
626
|
-
handleRemoveRejectedFile:
|
|
626
|
+
handleRemoveRejectedFile: w,
|
|
627
627
|
handleSubmit: y,
|
|
628
628
|
isSubmitting: r,
|
|
629
|
-
formErrors:
|
|
629
|
+
formErrors: v,
|
|
630
630
|
// --- UI Text ---
|
|
631
631
|
title: d = "Upload Files",
|
|
632
632
|
subHeading: g = "Supports PNG, JPG, PDF. Max size: 50MB."
|
|
633
633
|
}) => {
|
|
634
|
-
const z = o.length > 0 ||
|
|
634
|
+
const z = o.length > 0 || h.length > 0;
|
|
635
635
|
return /* @__PURE__ */ e(ue, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(
|
|
636
636
|
be,
|
|
637
637
|
{
|
|
@@ -706,7 +706,7 @@ const xn = {
|
|
|
706
706
|
]
|
|
707
707
|
}
|
|
708
708
|
),
|
|
709
|
-
|
|
709
|
+
v.filesToUpload && /* @__PURE__ */ e("p", { className: "form-error-message", children: v.filesToUpload.message }),
|
|
710
710
|
z && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
|
|
711
711
|
/* @__PURE__ */ e("h3", { children: "Upload Queue" }),
|
|
712
712
|
/* @__PURE__ */ n("ul", { className: "file-list", children: [
|
|
@@ -740,7 +740,7 @@ const xn = {
|
|
|
740
740
|
},
|
|
741
741
|
`${A.name}-${F}`
|
|
742
742
|
)),
|
|
743
|
-
|
|
743
|
+
h.map(({ file: A, message: F }, O) => /* @__PURE__ */ n(
|
|
744
744
|
"li",
|
|
745
745
|
{
|
|
746
746
|
className: "file-item file-item--rejected",
|
|
@@ -762,7 +762,7 @@ const xn = {
|
|
|
762
762
|
"button",
|
|
763
763
|
{
|
|
764
764
|
type: "button",
|
|
765
|
-
onClick: () =>
|
|
765
|
+
onClick: () => w(O),
|
|
766
766
|
className: "remove-file-button",
|
|
767
767
|
children: /* @__PURE__ */ e(Je, { size: 16 })
|
|
768
768
|
}
|
|
@@ -851,16 +851,16 @@ const xn = {
|
|
|
851
851
|
filterConfig: l = [],
|
|
852
852
|
initialFormikValues: m,
|
|
853
853
|
customStyles: o = "",
|
|
854
|
-
fetchCreatedOrUpdatedByUsers:
|
|
854
|
+
fetchCreatedOrUpdatedByUsers: h = async () => []
|
|
855
855
|
// Mockable fetcher
|
|
856
856
|
}) => {
|
|
857
|
-
const [u,
|
|
857
|
+
const [u, w] = L({
|
|
858
858
|
createdBy: [],
|
|
859
859
|
updatedBy: []
|
|
860
860
|
}), [y, r] = L({
|
|
861
861
|
createdBy: !1,
|
|
862
862
|
updatedBy: !1
|
|
863
|
-
}), [
|
|
863
|
+
}), [v, d] = L({
|
|
864
864
|
startDate: null
|
|
865
865
|
}), [g, z] = L({
|
|
866
866
|
endDate: null
|
|
@@ -906,8 +906,8 @@ const xn = {
|
|
|
906
906
|
}), [l, A.values]), _ = async (T, x) => {
|
|
907
907
|
try {
|
|
908
908
|
r((C) => ({ ...C, [T]: !0 }));
|
|
909
|
-
const f = await
|
|
910
|
-
|
|
909
|
+
const f = await h(T, x);
|
|
910
|
+
w((C) => ({ ...C, [T]: f }));
|
|
911
911
|
} catch (f) {
|
|
912
912
|
console.error(`Error fetching ${T} users:`, f);
|
|
913
913
|
} finally {
|
|
@@ -917,7 +917,7 @@ const xn = {
|
|
|
917
917
|
const x = l[T].key, f = l[T].url;
|
|
918
918
|
l[T].type === "multiselect-users" && u[x].length === 0 && !y[x] && _(x, f);
|
|
919
919
|
}, Y = () => {
|
|
920
|
-
A.resetForm(),
|
|
920
|
+
A.resetForm(), w({ createdBy: [], updatedBy: [] }), i();
|
|
921
921
|
}, G = (T) => {
|
|
922
922
|
const x = l.find((I) => I.key === T);
|
|
923
923
|
if (!x) return null;
|
|
@@ -1060,7 +1060,7 @@ const xn = {
|
|
|
1060
1060
|
] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
|
|
1061
1061
|
] });
|
|
1062
1062
|
case "date":
|
|
1063
|
-
const D = f.values || [], [b,
|
|
1063
|
+
const D = f.values || [], [b, p] = D, N = b && p, k = D[0] || null, $ = D[1] || null, M = {
|
|
1064
1064
|
startDate: k instanceof Date ? k.toISOString().slice(0, 10) : null,
|
|
1065
1065
|
endDate: k instanceof Date ? k.toISOString().slice(0, 10) : null
|
|
1066
1066
|
}, S = {
|
|
@@ -1313,9 +1313,9 @@ const xn = {
|
|
|
1313
1313
|
className: m,
|
|
1314
1314
|
ref: o,
|
|
1315
1315
|
// ✅ 'ref' is now received directly as a prop
|
|
1316
|
-
...
|
|
1316
|
+
...h
|
|
1317
1317
|
}) => {
|
|
1318
|
-
const u = a ||
|
|
1318
|
+
const u = a || h.name;
|
|
1319
1319
|
return /* @__PURE__ */ n("div", { className: `input-wrapper ${m || ""}`, children: [
|
|
1320
1320
|
t && /* @__PURE__ */ e("label", { htmlFor: u, className: "input-label", children: t }),
|
|
1321
1321
|
/* @__PURE__ */ n("div", { className: "input-field-container", children: [
|
|
@@ -1330,7 +1330,7 @@ const xn = {
|
|
|
1330
1330
|
"input-field--error": !!l,
|
|
1331
1331
|
"input-field--with-icon": !!i
|
|
1332
1332
|
}),
|
|
1333
|
-
...
|
|
1333
|
+
...h
|
|
1334
1334
|
}
|
|
1335
1335
|
)
|
|
1336
1336
|
] }),
|
|
@@ -1366,12 +1366,12 @@ const xn = {
|
|
|
1366
1366
|
// No default
|
|
1367
1367
|
variant: o = "info",
|
|
1368
1368
|
// 'info', 'warning', 'delete'
|
|
1369
|
-
loading:
|
|
1369
|
+
loading: h = !1,
|
|
1370
1370
|
buttonProps: u = {},
|
|
1371
|
-
size:
|
|
1371
|
+
size: w
|
|
1372
1372
|
// Add size prop
|
|
1373
1373
|
}) => {
|
|
1374
|
-
const y = Et[o] || Et.info, r = y.icon,
|
|
1374
|
+
const y = Et[o] || Et.info, r = y.icon, v = () => {
|
|
1375
1375
|
a({ primary: !0, secondary: !1 });
|
|
1376
1376
|
}, d = () => {
|
|
1377
1377
|
a({ primary: !1, secondary: !0 });
|
|
@@ -1400,7 +1400,7 @@ const xn = {
|
|
|
1400
1400
|
leave: "ease-in duration-200",
|
|
1401
1401
|
leaveFrom: "opacity-100 scale-100",
|
|
1402
1402
|
leaveTo: "opacity-0 scale-95",
|
|
1403
|
-
children: /* @__PURE__ */ n(Te, { className:
|
|
1403
|
+
children: /* @__PURE__ */ n(Te, { className: w === "large" ? "modal-panel modal-panel--large" : "modal-panel", children: [
|
|
1404
1404
|
/* @__PURE__ */ n("div", { className: "modal-content-wrapper", children: [
|
|
1405
1405
|
/* @__PURE__ */ e("div", { className: `modal-icon-container ${y.iconClass}`, children: /* @__PURE__ */ e(r, { size: 24, "aria-hidden": "true" }) }),
|
|
1406
1406
|
/* @__PURE__ */ n("div", { className: "modal-text-content", children: [
|
|
@@ -1422,7 +1422,7 @@ const xn = {
|
|
|
1422
1422
|
se,
|
|
1423
1423
|
{
|
|
1424
1424
|
type: "button",
|
|
1425
|
-
onClick:
|
|
1425
|
+
onClick: v,
|
|
1426
1426
|
label: l,
|
|
1427
1427
|
...u
|
|
1428
1428
|
}
|
|
@@ -1440,13 +1440,13 @@ const xn = {
|
|
|
1440
1440
|
onItemsPerPageChange: l,
|
|
1441
1441
|
itemsPerPageOptions: m = [10, 15, 20]
|
|
1442
1442
|
}) => {
|
|
1443
|
-
const o = Math.ceil(a / s), [
|
|
1443
|
+
const o = Math.ceil(a / s), [h, u] = L(t);
|
|
1444
1444
|
te(() => {
|
|
1445
1445
|
u(t);
|
|
1446
1446
|
}, [t]);
|
|
1447
|
-
const
|
|
1448
|
-
|
|
1449
|
-
let d = parseInt(
|
|
1447
|
+
const w = Math.min((t - 1) * s + 1, a), y = Math.min(t * s, a), r = (v) => {
|
|
1448
|
+
v.preventDefault();
|
|
1449
|
+
let d = parseInt(h, 10);
|
|
1450
1450
|
isNaN(d) || d < 1 ? d = 1 : d > o && (d = o), u(d), d !== t && i(d);
|
|
1451
1451
|
};
|
|
1452
1452
|
return /* @__PURE__ */ n("div", { className: "pagination-container", children: [
|
|
@@ -1458,12 +1458,12 @@ const xn = {
|
|
|
1458
1458
|
id: "items-per-page",
|
|
1459
1459
|
className: "pagination-select",
|
|
1460
1460
|
value: s,
|
|
1461
|
-
onChange: (
|
|
1462
|
-
children: m.map((
|
|
1461
|
+
onChange: (v) => l(Number(v.target.value)),
|
|
1462
|
+
children: m.map((v) => /* @__PURE__ */ e("option", { value: v, children: v }, v))
|
|
1463
1463
|
}
|
|
1464
1464
|
),
|
|
1465
1465
|
/* @__PURE__ */ n("span", { className: "pagination-info", children: [
|
|
1466
|
-
|
|
1466
|
+
w,
|
|
1467
1467
|
"-",
|
|
1468
1468
|
y,
|
|
1469
1469
|
" of ",
|
|
@@ -1497,8 +1497,8 @@ const xn = {
|
|
|
1497
1497
|
{
|
|
1498
1498
|
type: "number",
|
|
1499
1499
|
className: "page-input",
|
|
1500
|
-
value:
|
|
1501
|
-
onChange: (
|
|
1500
|
+
value: h,
|
|
1501
|
+
onChange: (v) => u(v.target.value),
|
|
1502
1502
|
onBlur: r,
|
|
1503
1503
|
"aria-label": `Current page, Page ${t}`
|
|
1504
1504
|
}
|
|
@@ -1549,12 +1549,12 @@ const xn = {
|
|
|
1549
1549
|
Ve.Option,
|
|
1550
1550
|
{
|
|
1551
1551
|
value: o.value,
|
|
1552
|
-
className: ({ active:
|
|
1553
|
-
"radiogroup-option--active":
|
|
1552
|
+
className: ({ active: h, checked: u }) => H("radiogroup-option", {
|
|
1553
|
+
"radiogroup-option--active": h,
|
|
1554
1554
|
"radiogroup-option--checked": u,
|
|
1555
1555
|
"radiogroup-option--error": !!l
|
|
1556
1556
|
}),
|
|
1557
|
-
children: ({ checked:
|
|
1557
|
+
children: ({ checked: h }) => /* @__PURE__ */ n(ee, { children: [
|
|
1558
1558
|
/* @__PURE__ */ n("div", { className: "radiogroup-option-content", children: [
|
|
1559
1559
|
/* @__PURE__ */ e(Ve.Label, { as: "p", className: "option-label", children: o.label }),
|
|
1560
1560
|
o.description && /* @__PURE__ */ e(
|
|
@@ -1566,7 +1566,7 @@ const xn = {
|
|
|
1566
1566
|
}
|
|
1567
1567
|
)
|
|
1568
1568
|
] }),
|
|
1569
|
-
|
|
1569
|
+
h && /* @__PURE__ */ e("div", { className: "option-checkmark", children: /* @__PURE__ */ e(Jt, { size: 20 }) })
|
|
1570
1570
|
] })
|
|
1571
1571
|
},
|
|
1572
1572
|
o.value
|
|
@@ -1583,14 +1583,14 @@ const xn = {
|
|
|
1583
1583
|
// Added a default label for accessibility
|
|
1584
1584
|
customClass: m = "",
|
|
1585
1585
|
inputStyle: o = {},
|
|
1586
|
-
placeholderClass:
|
|
1586
|
+
placeholderClass: h = "",
|
|
1587
1587
|
searchIconSize: u = 16,
|
|
1588
|
-
searchIconClass:
|
|
1588
|
+
searchIconClass: w = "",
|
|
1589
1589
|
...y
|
|
1590
1590
|
}) => {
|
|
1591
|
-
const [r,
|
|
1591
|
+
const [r, v] = L(t);
|
|
1592
1592
|
te(() => {
|
|
1593
|
-
|
|
1593
|
+
v(t);
|
|
1594
1594
|
}, [t]);
|
|
1595
1595
|
const d = K(
|
|
1596
1596
|
qr((z) => {
|
|
@@ -1602,16 +1602,16 @@ const xn = {
|
|
|
1602
1602
|
d.cancel();
|
|
1603
1603
|
}), [r, d, t]);
|
|
1604
1604
|
const g = (z) => {
|
|
1605
|
-
|
|
1605
|
+
v(z.target.value);
|
|
1606
1606
|
};
|
|
1607
1607
|
return /* @__PURE__ */ n("div", { className: `search-bar-wrapper ${m}`, children: [
|
|
1608
1608
|
l && /* @__PURE__ */ e("label", { htmlFor: "search-field", className: "sr-only", children: l }),
|
|
1609
|
-
/* @__PURE__ */ e("div", { className: "search-bar-icon-wrapper", children: /* @__PURE__ */ e(yt, { size: u || 16, className: `search-bar-icon ${
|
|
1609
|
+
/* @__PURE__ */ e("div", { className: "search-bar-icon-wrapper", children: /* @__PURE__ */ e(yt, { size: u || 16, className: `search-bar-icon ${w}`, "aria-hidden": "true" }) }),
|
|
1610
1610
|
/* @__PURE__ */ e(
|
|
1611
1611
|
"input",
|
|
1612
1612
|
{
|
|
1613
1613
|
id: "search-field",
|
|
1614
|
-
className: `search-bar-input ${
|
|
1614
|
+
className: `search-bar-input ${h}`,
|
|
1615
1615
|
placeholder: i,
|
|
1616
1616
|
type: "search",
|
|
1617
1617
|
name: "search",
|
|
@@ -1632,15 +1632,15 @@ const xn = {
|
|
|
1632
1632
|
placeholder: l = "Select an option...",
|
|
1633
1633
|
disabled: m = !1,
|
|
1634
1634
|
error: o,
|
|
1635
|
-
ref:
|
|
1635
|
+
ref: h,
|
|
1636
1636
|
// From RHF's <Controller>
|
|
1637
1637
|
showSearch: u = !0
|
|
1638
1638
|
}) => {
|
|
1639
|
-
const [
|
|
1639
|
+
const [w, y] = L("");
|
|
1640
1640
|
console.log("Select component - value:", a, "type:", typeof a), console.log("Select component - options:", i);
|
|
1641
|
-
const r =
|
|
1642
|
-
(d) => d.label.toLowerCase().includes(
|
|
1643
|
-
),
|
|
1641
|
+
const r = w === "" ? i : i.filter(
|
|
1642
|
+
(d) => d.label.toLowerCase().includes(w.toLowerCase())
|
|
1643
|
+
), v = i.find((d) => {
|
|
1644
1644
|
if (typeof a == "object" && a !== null) {
|
|
1645
1645
|
if (a === d) return !0;
|
|
1646
1646
|
if (a.id && d.id) return d.id === a.id;
|
|
@@ -1649,7 +1649,7 @@ const xn = {
|
|
|
1649
1649
|
}
|
|
1650
1650
|
return d.id === a || d.value === a || d.label === a;
|
|
1651
1651
|
});
|
|
1652
|
-
return /* @__PURE__ */ e(Z, { value: a, onChange: s, disabled: m, children: /* @__PURE__ */ n("div", { className: "select-wrapper", ref:
|
|
1652
|
+
return /* @__PURE__ */ e(Z, { value: a, onChange: s, disabled: m, children: /* @__PURE__ */ n("div", { className: "select-wrapper", ref: h, children: [
|
|
1653
1653
|
t && /* @__PURE__ */ e("label", { className: "select-label", children: t }),
|
|
1654
1654
|
/* @__PURE__ */ n("div", { className: "select-button-container", children: [
|
|
1655
1655
|
/* @__PURE__ */ n(
|
|
@@ -1659,7 +1659,7 @@ const xn = {
|
|
|
1659
1659
|
"select-button--error": !!o
|
|
1660
1660
|
}),
|
|
1661
1661
|
children: [
|
|
1662
|
-
/* @__PURE__ */ e("span", { className: "select-value-display", children:
|
|
1662
|
+
/* @__PURE__ */ e("span", { className: "select-value-display", children: v ? v.label : /* @__PURE__ */ e("span", { className: "placeholder", children: l }) }),
|
|
1663
1663
|
/* @__PURE__ */ e(Ht, { className: "select-chevron", "aria-hidden": "true" })
|
|
1664
1664
|
]
|
|
1665
1665
|
}
|
|
@@ -1674,12 +1674,12 @@ const xn = {
|
|
|
1674
1674
|
u && /* @__PURE__ */ e("div", { className: "search-input-wrapper", children: /* @__PURE__ */ e(
|
|
1675
1675
|
he,
|
|
1676
1676
|
{
|
|
1677
|
-
value:
|
|
1677
|
+
value: w,
|
|
1678
1678
|
onDebouncedChange: y,
|
|
1679
1679
|
placeholder: "Search..."
|
|
1680
1680
|
}
|
|
1681
1681
|
) }),
|
|
1682
|
-
/* @__PURE__ */ e("div", { className: "select-options-list", children: r.length === 0 &&
|
|
1682
|
+
/* @__PURE__ */ e("div", { className: "select-options-list", children: r.length === 0 && w !== "" ? /* @__PURE__ */ e("div", { className: "no-results", children: "No results found." }) : r.map((d) => /* @__PURE__ */ e(
|
|
1683
1683
|
Mr,
|
|
1684
1684
|
{
|
|
1685
1685
|
className: ({ active: g }) => `select-option ${g ? "active" : ""}`,
|
|
@@ -1728,18 +1728,18 @@ const xn = {
|
|
|
1728
1728
|
return s;
|
|
1729
1729
|
return null;
|
|
1730
1730
|
}, ha = ({ item: t, isCollapsed: a, level: s = 0 }) => {
|
|
1731
|
-
const { pathname: i } = Rn(), l = t.href || t.url || t.path, [m, o] = L(!1),
|
|
1731
|
+
const { pathname: i } = Rn(), l = t.href || t.url || t.path, [m, o] = L(!1), h = t.icon;
|
|
1732
1732
|
te(() => {
|
|
1733
1733
|
bt([t], i) && o(!0);
|
|
1734
1734
|
}, [t, i]);
|
|
1735
|
-
const u = i === l,
|
|
1735
|
+
const u = i === l, w = !u && !!bt([t], i), y = (r) => {
|
|
1736
1736
|
r.preventDefault(), o(!m);
|
|
1737
1737
|
};
|
|
1738
1738
|
return /* @__PURE__ */ n(
|
|
1739
1739
|
"div",
|
|
1740
1740
|
{
|
|
1741
1741
|
className: H("nav-item-container", {
|
|
1742
|
-
"nav-item-container--parent-active":
|
|
1742
|
+
"nav-item-container--parent-active": w,
|
|
1743
1743
|
[`nav-item-container--level-${s}`]: s > 0
|
|
1744
1744
|
}),
|
|
1745
1745
|
children: [
|
|
@@ -1755,7 +1755,7 @@ const xn = {
|
|
|
1755
1755
|
}),
|
|
1756
1756
|
"aria-current": u ? "page" : void 0,
|
|
1757
1757
|
children: [
|
|
1758
|
-
|
|
1758
|
+
h && /* @__PURE__ */ e(h, { className: "nav-icon", "aria-hidden": "true" }),
|
|
1759
1759
|
/* @__PURE__ */ e("span", { className: "nav-label", children: t.label || t.name }),
|
|
1760
1760
|
t.children && /* @__PURE__ */ e(
|
|
1761
1761
|
"button",
|
|
@@ -1807,7 +1807,7 @@ const xn = {
|
|
|
1807
1807
|
onToggleMobile: l,
|
|
1808
1808
|
logoSmall: m,
|
|
1809
1809
|
logoLarge: o,
|
|
1810
|
-
user:
|
|
1810
|
+
user: h = { name: "", email: "" }
|
|
1811
1811
|
}) => /* @__PURE__ */ n(ee, { children: [
|
|
1812
1812
|
i && /* @__PURE__ */ e(
|
|
1813
1813
|
"div",
|
|
@@ -1852,10 +1852,10 @@ const xn = {
|
|
|
1852
1852
|
] }),
|
|
1853
1853
|
/* @__PURE__ */ e("nav", { className: "sidebar-nav", "aria-label": "Primary", children: /* @__PURE__ */ e("ul", { className: "sidebar-nav-list", children: t.map((u) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(ha, { item: u, isCollapsed: a }) }, u.label || u.name)) }) }),
|
|
1854
1854
|
/* @__PURE__ */ n("div", { className: "sidebar-footer", children: [
|
|
1855
|
-
/* @__PURE__ */ e(Ce, { src:
|
|
1855
|
+
/* @__PURE__ */ e(Ce, { src: h.avatar, name: h.name, size: "medium" }),
|
|
1856
1856
|
/* @__PURE__ */ n("div", { className: "user-info", children: [
|
|
1857
|
-
/* @__PURE__ */ e("span", { className: "user-name", children:
|
|
1858
|
-
/* @__PURE__ */ e("span", { className: "user-email", children:
|
|
1857
|
+
/* @__PURE__ */ e("span", { className: "user-name", children: h.name }),
|
|
1858
|
+
/* @__PURE__ */ e("span", { className: "user-email", children: h.email })
|
|
1859
1859
|
] }),
|
|
1860
1860
|
/* @__PURE__ */ e(
|
|
1861
1861
|
"button",
|
|
@@ -1916,18 +1916,18 @@ const xn = {
|
|
|
1916
1916
|
// ✅ New prop for max length
|
|
1917
1917
|
showCharCount: o = !1,
|
|
1918
1918
|
// ✅ New prop to control visibility
|
|
1919
|
-
...
|
|
1919
|
+
...h
|
|
1920
1920
|
}) => {
|
|
1921
|
-
const u = a ||
|
|
1922
|
-
|
|
1921
|
+
const u = a || h.name, [w, y] = L(
|
|
1922
|
+
h.value?.length || h.defaultValue?.length || 0
|
|
1923
1923
|
), r = (d) => {
|
|
1924
|
-
y(d.target.value.length),
|
|
1925
|
-
},
|
|
1924
|
+
y(d.target.value.length), h.onChange && h.onChange(d);
|
|
1925
|
+
}, v = m - w;
|
|
1926
1926
|
return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${i || ""}`, children: [
|
|
1927
1927
|
/* @__PURE__ */ n("div", { className: "textarea-header", children: [
|
|
1928
1928
|
t && /* @__PURE__ */ e("label", { htmlFor: u, className: "textarea-label", children: t }),
|
|
1929
1929
|
o && m && /* @__PURE__ */ n("span", { className: "char-counter", children: [
|
|
1930
|
-
|
|
1930
|
+
v,
|
|
1931
1931
|
" characters remaining"
|
|
1932
1932
|
] })
|
|
1933
1933
|
] }),
|
|
@@ -1941,7 +1941,7 @@ const xn = {
|
|
|
1941
1941
|
}),
|
|
1942
1942
|
maxLength: m,
|
|
1943
1943
|
onChange: r,
|
|
1944
|
-
...
|
|
1944
|
+
...h
|
|
1945
1945
|
}
|
|
1946
1946
|
),
|
|
1947
1947
|
s && /* @__PURE__ */ e("p", { className: "textarea-error-message", children: s })
|
|
@@ -1985,13 +1985,13 @@ const xn = {
|
|
|
1985
1985
|
// For external styling of the tooltip itself
|
|
1986
1986
|
...o
|
|
1987
1987
|
}) => {
|
|
1988
|
-
const
|
|
1988
|
+
const h = ae.useId();
|
|
1989
1989
|
return /* @__PURE__ */ n(ee, { children: [
|
|
1990
|
-
ae.cloneElement(t, { "data-tooltip-id":
|
|
1990
|
+
ae.cloneElement(t, { "data-tooltip-id": h }),
|
|
1991
1991
|
/* @__PURE__ */ e(
|
|
1992
1992
|
Ya,
|
|
1993
1993
|
{
|
|
1994
|
-
id:
|
|
1994
|
+
id: h,
|
|
1995
1995
|
content: a,
|
|
1996
1996
|
place: l,
|
|
1997
1997
|
variant: s,
|
|
@@ -2021,17 +2021,17 @@ const xn = {
|
|
|
2021
2021
|
direction: l = 1,
|
|
2022
2022
|
stepProps: m = {},
|
|
2023
2023
|
title: o,
|
|
2024
|
-
description:
|
|
2024
|
+
description: h,
|
|
2025
2025
|
showProgress: u = !0,
|
|
2026
|
-
closeOnOverlayClick:
|
|
2026
|
+
closeOnOverlayClick: w = !0
|
|
2027
2027
|
}) => {
|
|
2028
|
-
const y = s[i], r = Object.keys(s),
|
|
2028
|
+
const y = s[i], r = Object.keys(s), v = r.indexOf(i), d = (v + 1) / r.length * 100, g = v > 0 && m.onBack;
|
|
2029
2029
|
return /* @__PURE__ */ e(ue, { show: t, as: Q, children: /* @__PURE__ */ n(
|
|
2030
2030
|
be,
|
|
2031
2031
|
{
|
|
2032
2032
|
as: "div",
|
|
2033
2033
|
className: "wizard-dialog",
|
|
2034
|
-
onClose:
|
|
2034
|
+
onClose: w ? a : () => {
|
|
2035
2035
|
},
|
|
2036
2036
|
children: [
|
|
2037
2037
|
/* @__PURE__ */ e(
|
|
@@ -2071,7 +2071,7 @@ const xn = {
|
|
|
2071
2071
|
),
|
|
2072
2072
|
/* @__PURE__ */ n("div", { className: "wizard-header-text", children: [
|
|
2073
2073
|
/* @__PURE__ */ e(be.Title, { as: "h3", className: "wizard-title", children: o }),
|
|
2074
|
-
|
|
2074
|
+
h && /* @__PURE__ */ e(be.Description, { className: "wizard-description", children: h })
|
|
2075
2075
|
] })
|
|
2076
2076
|
] }),
|
|
2077
2077
|
/* @__PURE__ */ e(
|
|
@@ -2141,15 +2141,15 @@ const xn = {
|
|
|
2141
2141
|
category: m = "secondary",
|
|
2142
2142
|
icon: o,
|
|
2143
2143
|
// Renamed for clarity, expecting a component type e.g., CheckCircle
|
|
2144
|
-
disabled:
|
|
2144
|
+
disabled: h = !1,
|
|
2145
2145
|
size: u = "small",
|
|
2146
|
-
label:
|
|
2146
|
+
label: w,
|
|
2147
2147
|
children: y,
|
|
2148
2148
|
// ✅ Add children to the props list
|
|
2149
2149
|
onClick: r,
|
|
2150
|
-
...
|
|
2150
|
+
...v
|
|
2151
2151
|
}) => {
|
|
2152
|
-
const d =
|
|
2152
|
+
const d = h, g = H(
|
|
2153
2153
|
"btn-base-icon",
|
|
2154
2154
|
"btn-icon-only",
|
|
2155
2155
|
In[u],
|
|
@@ -2166,7 +2166,7 @@ const xn = {
|
|
|
2166
2166
|
onClick: r,
|
|
2167
2167
|
title: i,
|
|
2168
2168
|
"aria-label": i,
|
|
2169
|
-
...
|
|
2169
|
+
...v,
|
|
2170
2170
|
children: o && /* @__PURE__ */ e(o, { size: u === "large" ? 20 : 16 })
|
|
2171
2171
|
}
|
|
2172
2172
|
);
|
|
@@ -2179,7 +2179,7 @@ const xn = {
|
|
|
2179
2179
|
tertiary: m,
|
|
2180
2180
|
fullHeight: o = !1,
|
|
2181
2181
|
// A clearer prop name
|
|
2182
|
-
...
|
|
2182
|
+
...h
|
|
2183
2183
|
}) => {
|
|
2184
2184
|
const u = H(
|
|
2185
2185
|
"page-layout",
|
|
@@ -2187,9 +2187,9 @@ const xn = {
|
|
|
2187
2187
|
"page-layout--with-footer": a,
|
|
2188
2188
|
"page-layout--full-height": o
|
|
2189
2189
|
},
|
|
2190
|
-
|
|
2190
|
+
h.className
|
|
2191
2191
|
);
|
|
2192
|
-
return /* @__PURE__ */ n("div", { className: u, ...
|
|
2192
|
+
return /* @__PURE__ */ n("div", { className: u, ...h, children: [
|
|
2193
2193
|
/* @__PURE__ */ e("div", { className: "page-layout-content", children: t }),
|
|
2194
2194
|
a && /* @__PURE__ */ e("footer", { className: "page-layout-footer", children: s || /* @__PURE__ */ n("div", { className: "footer-actions", children: [
|
|
2195
2195
|
m?.show && /* @__PURE__ */ e(
|
|
@@ -2444,13 +2444,13 @@ function Rt() {
|
|
|
2444
2444
|
}
|
|
2445
2445
|
function Yn(t) {
|
|
2446
2446
|
if (t && t.isAxiosError) {
|
|
2447
|
-
const { response: a, config: s, message: i } = t, l = a?.status ?? null, m = a?.statusText ?? null, o = a?.data ?? null,
|
|
2447
|
+
const { response: a, config: s, message: i } = t, l = a?.status ?? null, m = a?.statusText ?? null, o = a?.data ?? null, h = typeof o == "string" && o || o?.message || o?.msg || o?.error || o?.errors?.[0]?.message || null;
|
|
2448
2448
|
return {
|
|
2449
2449
|
ok: !1,
|
|
2450
2450
|
status: l,
|
|
2451
2451
|
statusText: m,
|
|
2452
2452
|
code: o?.code || null,
|
|
2453
|
-
message:
|
|
2453
|
+
message: h || i || "Request failed",
|
|
2454
2454
|
details: o || null,
|
|
2455
2455
|
request: {
|
|
2456
2456
|
url: s?.url || null,
|
|
@@ -2481,41 +2481,41 @@ function Wn({
|
|
|
2481
2481
|
// timeout: 20000,
|
|
2482
2482
|
});
|
|
2483
2483
|
s.interceptors.response.use(
|
|
2484
|
-
(
|
|
2485
|
-
message:
|
|
2484
|
+
(w) => w?.data ?? {
|
|
2485
|
+
message: w?.statusText || "Request succeeded"
|
|
2486
2486
|
},
|
|
2487
|
-
(
|
|
2488
|
-
const y = Yn(
|
|
2487
|
+
(w) => {
|
|
2488
|
+
const y = Yn(w), r = y.status;
|
|
2489
2489
|
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);
|
|
2490
2490
|
}
|
|
2491
2491
|
);
|
|
2492
|
-
function i({ open:
|
|
2493
|
-
if (
|
|
2494
|
-
const { Authorization: r, ...
|
|
2492
|
+
function i({ open: w = !1, customHeader: y = {} } = {}) {
|
|
2493
|
+
if (w) {
|
|
2494
|
+
const { Authorization: r, ...v } = Rt();
|
|
2495
2495
|
return {
|
|
2496
|
-
headers: { ...
|
|
2496
|
+
headers: { ...v, ...a, ...y }
|
|
2497
2497
|
};
|
|
2498
2498
|
}
|
|
2499
2499
|
return { headers: { ...Rt(), ...y } };
|
|
2500
2500
|
}
|
|
2501
|
-
async function l(
|
|
2502
|
-
return s.get(
|
|
2501
|
+
async function l(w, y, r = !1, v = {}) {
|
|
2502
|
+
return s.get(w, {
|
|
2503
2503
|
params: y,
|
|
2504
|
-
...i({ open: r, customHeader:
|
|
2504
|
+
...i({ open: r, customHeader: v })
|
|
2505
2505
|
});
|
|
2506
2506
|
}
|
|
2507
|
-
async function m(
|
|
2508
|
-
const d = { ...i({ open: r, customHeader:
|
|
2509
|
-
return y !== void 0 && (d.data = y), s.delete(
|
|
2507
|
+
async function m(w, y, r = !1, v = {}) {
|
|
2508
|
+
const d = { ...i({ open: r, customHeader: v }) };
|
|
2509
|
+
return y !== void 0 && (d.data = y), s.delete(w, d);
|
|
2510
2510
|
}
|
|
2511
|
-
async function o(
|
|
2512
|
-
return s.post(
|
|
2511
|
+
async function o(w, y = {}, r = !1, v = {}) {
|
|
2512
|
+
return s.post(w, y, i({ open: r, customHeader: v }));
|
|
2513
2513
|
}
|
|
2514
|
-
async function
|
|
2515
|
-
return s.put(
|
|
2514
|
+
async function h(w, y = {}, r = !1, v = {}) {
|
|
2515
|
+
return s.put(w, y, i({ open: r, customHeader: v }));
|
|
2516
2516
|
}
|
|
2517
|
-
async function u(
|
|
2518
|
-
return s.patch(
|
|
2517
|
+
async function u(w, y = {}, r = !1, v = {}) {
|
|
2518
|
+
return s.patch(w, y, i({ open: r, customHeader: v }));
|
|
2519
2519
|
}
|
|
2520
2520
|
return {
|
|
2521
2521
|
instance: s,
|
|
@@ -2523,7 +2523,7 @@ function Wn({
|
|
|
2523
2523
|
axiosGet: l,
|
|
2524
2524
|
axiosDelete: m,
|
|
2525
2525
|
axiosPost: o,
|
|
2526
|
-
axiosPut:
|
|
2526
|
+
axiosPut: h,
|
|
2527
2527
|
axiosPatch: u
|
|
2528
2528
|
};
|
|
2529
2529
|
}
|
|
@@ -2634,9 +2634,9 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
2634
2634
|
}) => {
|
|
2635
2635
|
const l = t.slice(0, 2), m = [];
|
|
2636
2636
|
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);
|
|
2637
|
-
const o = t.length + a.length + s.length,
|
|
2637
|
+
const o = t.length + a.length + s.length, h = o - m.length;
|
|
2638
2638
|
let u = m.join(", ");
|
|
2639
|
-
return
|
|
2639
|
+
return h > 0 && (u += ` and ${h} others`), o === 0 ? /* @__PURE__ */ e(
|
|
2640
2640
|
"div",
|
|
2641
2641
|
{
|
|
2642
2642
|
className: "flex items-center justify-between p-3 border border-dashed border-gray-400 rounded-lg hover:bg-gray-50",
|
|
@@ -2649,15 +2649,15 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
2649
2649
|
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",
|
|
2650
2650
|
children: [
|
|
2651
2651
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
2652
|
-
/* @__PURE__ */ e("div", { className: "flex items-center", children: l.map((
|
|
2652
|
+
/* @__PURE__ */ e("div", { className: "flex items-center", children: l.map((w, y) => /* @__PURE__ */ e(
|
|
2653
2653
|
"img",
|
|
2654
2654
|
{
|
|
2655
|
-
src:
|
|
2656
|
-
alt:
|
|
2655
|
+
src: w.avatarUrl || `https://avatar.vercel.sh/${w.name}.svg?text=${w?.name?.charAt(0) || "U"}`,
|
|
2656
|
+
alt: w.name,
|
|
2657
2657
|
className: `w-10 h-10 rounded-full border-2 border-white ${y > 0 ? "-ml-4" : ""}`,
|
|
2658
2658
|
style: { zIndex: y }
|
|
2659
2659
|
},
|
|
2660
|
-
|
|
2660
|
+
w.id || y
|
|
2661
2661
|
)) }),
|
|
2662
2662
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-800 truncate", children: u })
|
|
2663
2663
|
] }),
|
|
@@ -2683,9 +2683,9 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
2683
2683
|
showExistingShares: m = !1,
|
|
2684
2684
|
onFinalSubmit: o = () => {
|
|
2685
2685
|
},
|
|
2686
|
-
isChanged:
|
|
2686
|
+
isChanged: h = !1
|
|
2687
2687
|
}) => {
|
|
2688
|
-
const [u,
|
|
2688
|
+
const [u, w] = L(It[0]), [y, r] = L(""), v = kt(y, 400), [d, g] = L([]), [z, A] = L(/* @__PURE__ */ new Set()), [F, O] = L(!1), [P, _] = L(Pt[0]), {
|
|
2689
2689
|
control: U,
|
|
2690
2690
|
handleSubmit: Y,
|
|
2691
2691
|
watch: G,
|
|
@@ -2698,16 +2698,16 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
2698
2698
|
name: "pendingInvites"
|
|
2699
2699
|
}), D = G("pendingInvites");
|
|
2700
2700
|
te(() => {
|
|
2701
|
-
|
|
2701
|
+
v.length > 1 ? (O(!0), Jn(u.name, v).then((S) => {
|
|
2702
2702
|
g(S);
|
|
2703
2703
|
}).catch((S) => console.error("Search failed:", S)).finally(() => O(!1))) : (g([]), A(/* @__PURE__ */ new Set()));
|
|
2704
|
-
}, [
|
|
2704
|
+
}, [v, u]);
|
|
2705
2705
|
const b = (S) => {
|
|
2706
2706
|
A((B) => {
|
|
2707
2707
|
const j = new Set(B);
|
|
2708
2708
|
return j.has(S) ? j.delete(S) : j.add(S), j;
|
|
2709
2709
|
});
|
|
2710
|
-
},
|
|
2710
|
+
}, p = () => {
|
|
2711
2711
|
d.filter((S) => z.has(S.id)).forEach((S) => {
|
|
2712
2712
|
f.find((B) => B.id === S.id) || C({ ...S, permission: P.name });
|
|
2713
2713
|
}), A(/* @__PURE__ */ new Set()), r("");
|
|
@@ -2774,7 +2774,7 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
2774
2774
|
return "Add User, Groups or Roles test";
|
|
2775
2775
|
}
|
|
2776
2776
|
};
|
|
2777
|
-
return le(() => (console.log("InviteFlow - isChanged:",
|
|
2777
|
+
return le(() => (console.log("InviteFlow - isChanged:", h, "pendingInvites.length:", D.length), D.length === 0 && !h), [D.length, h]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
|
|
2778
2778
|
/* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
|
|
2779
2779
|
/* @__PURE__ */ e(be.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: M() }),
|
|
2780
2780
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
|
|
@@ -2803,7 +2803,7 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
2803
2803
|
}
|
|
2804
2804
|
),
|
|
2805
2805
|
/* @__PURE__ */ n("div", { className: "relative grid grid-cols-3 gap-2 items-start", children: [
|
|
2806
|
-
/* @__PURE__ */ e("div", { className: "col-span-1", children: /* @__PURE__ */ e(Z, { value: u, onChange:
|
|
2806
|
+
/* @__PURE__ */ e("div", { className: "col-span-1", children: /* @__PURE__ */ e(Z, { value: u, onChange: w, children: /* @__PURE__ */ n("div", { className: "relative", children: [
|
|
2807
2807
|
/* @__PURE__ */ n(Z.Button, { className: "relative w-full border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left hover:cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm", children: [
|
|
2808
2808
|
/* @__PURE__ */ n("span", { className: "flex items-center", children: [
|
|
2809
2809
|
/* @__PURE__ */ e(u.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
|
|
@@ -2912,7 +2912,7 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
2912
2912
|
/* @__PURE__ */ e(
|
|
2913
2913
|
"button",
|
|
2914
2914
|
{
|
|
2915
|
-
onClick:
|
|
2915
|
+
onClick: p,
|
|
2916
2916
|
disabled: z.size === 0,
|
|
2917
2917
|
className: "px-3 py-1 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:bg-blue-300 disabled:cursor-not-allowed hover:cursor-pointer",
|
|
2918
2918
|
children: "Add"
|
|
@@ -3060,7 +3060,7 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
3060
3060
|
"button",
|
|
3061
3061
|
{
|
|
3062
3062
|
onClick: () => Y(k)(),
|
|
3063
|
-
disabled: x || D.length === 0 && !
|
|
3063
|
+
disabled: x || D.length === 0 && !h,
|
|
3064
3064
|
className: "px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md shadow-sm hover:bg-blue-700 hover:cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:bg-blue-300 disabled:cursor-not-allowed",
|
|
3065
3065
|
children: x ? "Inviting..." : l === me.DRIVE ? "Send Invites" : "Add"
|
|
3066
3066
|
}
|
|
@@ -3073,20 +3073,20 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
3073
3073
|
{ name: "Can manage", icon: Kt, value: "edit" },
|
|
3074
3074
|
{ name: "Remove", icon: rr, isDestructive: !0, value: "remove" }
|
|
3075
3075
|
], Kn = ({ item: t, allowedPermissions: a, onPermissionChange: s }) => {
|
|
3076
|
-
const [i, l] = L(!1), { refs: m, floatingStyles: o, context:
|
|
3076
|
+
const [i, l] = L(!1), { refs: m, floatingStyles: o, context: h } = sa({
|
|
3077
3077
|
open: i,
|
|
3078
3078
|
onOpenChange: l,
|
|
3079
3079
|
middleware: [la(8), ia(), oa({ padding: 8 })],
|
|
3080
3080
|
whileElementsMounted: ca,
|
|
3081
3081
|
placement: "bottom-end"
|
|
3082
|
-
}), u = Yr(
|
|
3082
|
+
}), u = Yr(h), w = Wr(h), { getReferenceProps: y, getFloatingProps: r } = Jr([
|
|
3083
3083
|
u,
|
|
3084
|
-
|
|
3085
|
-
]),
|
|
3084
|
+
w
|
|
3085
|
+
]), v = lt.find((g) => g.name === t.permission || g.value === t.permission) || lt[0];
|
|
3086
3086
|
return (
|
|
3087
3087
|
// FIX: The <Listbox> component now wraps both the button and the portal.
|
|
3088
3088
|
// This provides the necessary context for both children.
|
|
3089
|
-
/* @__PURE__ */ n(Z, { value:
|
|
3089
|
+
/* @__PURE__ */ n(Z, { value: v, onChange: (g) => {
|
|
3090
3090
|
s(g), l(!1);
|
|
3091
3091
|
}, children: [
|
|
3092
3092
|
/* @__PURE__ */ n(
|
|
@@ -3161,19 +3161,19 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
3161
3161
|
existingShares: l,
|
|
3162
3162
|
allowedPermissions: m
|
|
3163
3163
|
}) => {
|
|
3164
|
-
const [o,
|
|
3164
|
+
const [o, h] = L(l), [u, w] = L(0), [y, r] = L(""), v = kt(y, 300), d = {
|
|
3165
3165
|
users: o.users.filter(
|
|
3166
|
-
(O) => O.name.toLowerCase().includes(
|
|
3166
|
+
(O) => O.name.toLowerCase().includes(v.toLowerCase())
|
|
3167
3167
|
),
|
|
3168
3168
|
groups: o.groups.filter(
|
|
3169
|
-
(O) => O.name.toLowerCase().includes(
|
|
3169
|
+
(O) => O.name.toLowerCase().includes(v.toLowerCase())
|
|
3170
3170
|
),
|
|
3171
3171
|
roles: o.roles.filter(
|
|
3172
|
-
(O) => O.name.toLowerCase().includes(
|
|
3172
|
+
(O) => O.name.toLowerCase().includes(v.toLowerCase())
|
|
3173
3173
|
)
|
|
3174
3174
|
}, g = async (O, P, _, U) => {
|
|
3175
3175
|
const Y = P.value;
|
|
3176
|
-
|
|
3176
|
+
h((G) => ({
|
|
3177
3177
|
...G,
|
|
3178
3178
|
[_]: G[_].map(
|
|
3179
3179
|
(T) => T.id === O.id ? { ...T, permission: Y } : T
|
|
@@ -3213,7 +3213,7 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
3213
3213
|
)
|
|
3214
3214
|
] }),
|
|
3215
3215
|
/* @__PURE__ */ n("div", { className: "flex flex-col flex-grow", children: [
|
|
3216
|
-
/* @__PURE__ */ n(ne.Group, { selectedIndex: u, onChange:
|
|
3216
|
+
/* @__PURE__ */ n(ne.Group, { selectedIndex: u, onChange: w, children: [
|
|
3217
3217
|
/* @__PURE__ */ n("div", { className: "p-4 bg-white border-b border-gray-300", children: [
|
|
3218
3218
|
/* @__PURE__ */ e(ne.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: F.map((O) => /* @__PURE__ */ e(
|
|
3219
3219
|
ne,
|
|
@@ -3351,7 +3351,7 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
3351
3351
|
onClose: s,
|
|
3352
3352
|
members: i
|
|
3353
3353
|
}) => {
|
|
3354
|
-
const [l, m] = L(!0), [o,
|
|
3354
|
+
const [l, m] = L(!0), [o, h] = L(""), u = kt(o, 300), w = i.filter(
|
|
3355
3355
|
(d) => d.name.toLowerCase().includes(u.toLowerCase())
|
|
3356
3356
|
), y = {
|
|
3357
3357
|
hidden: { opacity: 0 },
|
|
@@ -3365,10 +3365,10 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
3365
3365
|
hidden: { y: 20, opacity: 0 },
|
|
3366
3366
|
visible: { y: 0, opacity: 1 },
|
|
3367
3367
|
exit: { opacity: 0, x: -20 }
|
|
3368
|
-
},
|
|
3368
|
+
}, v = () => l ? (
|
|
3369
3369
|
// Show 5 skeleton items while loading
|
|
3370
3370
|
/* @__PURE__ */ e("div", { children: Array.from({ length: 5 }).map((d, g) => /* @__PURE__ */ e(ts, {}, g)) })
|
|
3371
|
-
) :
|
|
3371
|
+
) : w.length === 0 ? /* @__PURE__ */ n(
|
|
3372
3372
|
ie.div,
|
|
3373
3373
|
{
|
|
3374
3374
|
initial: { opacity: 0, scale: 0.95 },
|
|
@@ -3387,7 +3387,7 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
3387
3387
|
initial: "hidden",
|
|
3388
3388
|
animate: "visible",
|
|
3389
3389
|
className: "divide-y divide-gray-200",
|
|
3390
|
-
children: /* @__PURE__ */ e(ke, { children:
|
|
3390
|
+
children: /* @__PURE__ */ e(ke, { children: w.map((d) => /* @__PURE__ */ n(
|
|
3391
3391
|
ie.li,
|
|
3392
3392
|
{
|
|
3393
3393
|
layout: !0,
|
|
@@ -3444,12 +3444,12 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
3444
3444
|
/* @__PURE__ */ e("div", { className: "p-4 border-b border-gray-200 flex-shrink-0", children: /* @__PURE__ */ e(
|
|
3445
3445
|
he,
|
|
3446
3446
|
{
|
|
3447
|
-
onDebouncedChange:
|
|
3447
|
+
onDebouncedChange: h,
|
|
3448
3448
|
value: o,
|
|
3449
3449
|
placeholder: "Search members..."
|
|
3450
3450
|
}
|
|
3451
3451
|
) }),
|
|
3452
|
-
/* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto", children:
|
|
3452
|
+
/* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto", children: v() })
|
|
3453
3453
|
] });
|
|
3454
3454
|
}, pe = {
|
|
3455
3455
|
INVITE: "invite",
|
|
@@ -3469,10 +3469,10 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
3469
3469
|
onClose: m = () => {
|
|
3470
3470
|
},
|
|
3471
3471
|
showExistingShares: o = !0,
|
|
3472
|
-
allowedPermissions:
|
|
3472
|
+
allowedPermissions: h = [],
|
|
3473
3473
|
...u
|
|
3474
3474
|
}) => {
|
|
3475
|
-
const [
|
|
3475
|
+
const [w, y] = L(pe.INVITE), [r, v] = L(t), [d, g] = L(null), [z, A] = L(!1), [F, O] = L([]), [P, _] = L(pe.MANAGE), U = () => {
|
|
3476
3476
|
y(pe.INVITE), g(null), m();
|
|
3477
3477
|
}, Y = () => {
|
|
3478
3478
|
y(pe.MANAGE);
|
|
@@ -3485,18 +3485,18 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
3485
3485
|
}
|
|
3486
3486
|
O(resp);
|
|
3487
3487
|
}
|
|
3488
|
-
g({ id: f, type: I, name: C }), _(
|
|
3488
|
+
g({ id: f, type: I, name: C }), _(w), y(pe.MEMBERS);
|
|
3489
3489
|
}, T = (f) => {
|
|
3490
|
-
console.log("changedExistingShares", f),
|
|
3491
|
-
const C = st.mapValues(t, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b,
|
|
3490
|
+
console.log("changedExistingShares", f), v(f);
|
|
3491
|
+
const C = st.mapValues(t, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id)), I = st.mapValues(f, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id));
|
|
3492
3492
|
console.log("Existing data:", C), console.log("Changed data:", I);
|
|
3493
3493
|
const E = !st.isEqual(C, I);
|
|
3494
|
-
console.log("hasPermissionChanged:", E), A(E), y(
|
|
3494
|
+
console.log("hasPermissionChanged:", E), A(E), y(w === pe.MEMBERS ? P : pe.INVITE);
|
|
3495
3495
|
};
|
|
3496
3496
|
return /* @__PURE__ */ e(ue, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(be, { as: "div", className: "relative z-50", onClose: U, children: [
|
|
3497
3497
|
/* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
|
|
3498
3498
|
/* @__PURE__ */ e("div", { className: "filter-modal-container", children: /* @__PURE__ */ e("div", { className: "filter-modal-positioner", children: /* @__PURE__ */ e(Te, { className: "filter-modal-panel", style: { background: "white" }, children: (() => {
|
|
3499
|
-
switch (
|
|
3499
|
+
switch (w) {
|
|
3500
3500
|
case pe.MANAGE:
|
|
3501
3501
|
return /* @__PURE__ */ e(
|
|
3502
3502
|
ie.div,
|
|
@@ -3515,7 +3515,7 @@ const Ae = Wn(), Xe = Ae.axiosGet, Vl = Ae.axiosDelete, ft = Ae.axiosPost, jl =
|
|
|
3515
3515
|
onOpenMembers: G,
|
|
3516
3516
|
existingShares: r,
|
|
3517
3517
|
calledBy: l,
|
|
3518
|
-
allowedPermissions:
|
|
3518
|
+
allowedPermissions: h
|
|
3519
3519
|
}
|
|
3520
3520
|
)
|
|
3521
3521
|
},
|
|
@@ -3588,15 +3588,15 @@ function et({
|
|
|
3588
3588
|
},
|
|
3589
3589
|
placeholder: m = "Select options",
|
|
3590
3590
|
error: o = null,
|
|
3591
|
-
displayLimit:
|
|
3591
|
+
displayLimit: h = 3,
|
|
3592
3592
|
selectionLimit: u = -1,
|
|
3593
3593
|
// NEW: search behavior
|
|
3594
|
-
searchMode:
|
|
3594
|
+
searchMode: w = "client",
|
|
3595
3595
|
// "client" | "server"
|
|
3596
3596
|
onSearch: y,
|
|
3597
3597
|
// (query: string) => void (required if searchMode==="server")
|
|
3598
3598
|
serverLoading: r = !1,
|
|
3599
|
-
minSearchChars:
|
|
3599
|
+
minSearchChars: v = 2,
|
|
3600
3600
|
// NEW: mappers (id/label keys)
|
|
3601
3601
|
getOptionId: d = (z) => String(z.id),
|
|
3602
3602
|
getOptionLabel: g = (z) => z.name
|
|
@@ -3611,12 +3611,12 @@ function et({
|
|
|
3611
3611
|
return a.filter((C) => g(C).toLowerCase().includes(f));
|
|
3612
3612
|
}, [a, F, g]);
|
|
3613
3613
|
te(() => {
|
|
3614
|
-
|
|
3615
|
-
}, [F,
|
|
3616
|
-
const G =
|
|
3614
|
+
w === "server" && F.length >= v && F !== P.current && (P.current = F, y && y(F));
|
|
3615
|
+
}, [F, w, v, y]);
|
|
3616
|
+
const G = w === "client" ? Y : a, T = () => {
|
|
3617
3617
|
if (!U.length)
|
|
3618
3618
|
return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
|
|
3619
|
-
const f = U.slice(0,
|
|
3619
|
+
const f = U.slice(0, h), C = U.length - h;
|
|
3620
3620
|
return /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2", children: [
|
|
3621
3621
|
f.map((I) => /* @__PURE__ */ e(
|
|
3622
3622
|
"span",
|
|
@@ -3677,33 +3677,33 @@ function et({
|
|
|
3677
3677
|
{
|
|
3678
3678
|
value: F,
|
|
3679
3679
|
onDebouncedChange: O,
|
|
3680
|
-
placeholder:
|
|
3680
|
+
placeholder: w === "server" ? `Search (min ${v})…` : "Search options…"
|
|
3681
3681
|
}
|
|
3682
3682
|
) }),
|
|
3683
|
-
|
|
3684
|
-
G.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children:
|
|
3685
|
-
const I = d(C), E = g(C), D = U.some((
|
|
3683
|
+
w === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
|
|
3684
|
+
G.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: w === "server" ? F.length < v ? `Type at least ${v} characters to search.` : "No results." : "No options found." }) : G.map((C) => {
|
|
3685
|
+
const I = d(C), E = g(C), D = U.some((p) => d(p) === I), b = u !== -1 && U.length >= u && !D;
|
|
3686
3686
|
return /* @__PURE__ */ e(
|
|
3687
3687
|
Z.Option,
|
|
3688
3688
|
{
|
|
3689
3689
|
value: C,
|
|
3690
3690
|
disabled: b,
|
|
3691
|
-
className: ({ active:
|
|
3692
|
-
b ? " text-gray-400 bg-white cursor-not-allowed" :
|
|
3691
|
+
className: ({ active: p }) => je(
|
|
3692
|
+
b ? " text-gray-400 bg-white cursor-not-allowed" : p ? " bg-gray-200 text-gray-900" : " text-gray-900",
|
|
3693
3693
|
" relative cursor-default select-none py-2 pl-3 pr-9"
|
|
3694
3694
|
),
|
|
3695
|
-
children: ({ selected:
|
|
3695
|
+
children: ({ selected: p, active: N }) => /* @__PURE__ */ n(ee, { children: [
|
|
3696
3696
|
/* @__PURE__ */ e(
|
|
3697
3697
|
"span",
|
|
3698
3698
|
{
|
|
3699
3699
|
className: je(
|
|
3700
|
-
|
|
3700
|
+
p ? "font-semibold" : "font-normal",
|
|
3701
3701
|
"block truncate"
|
|
3702
3702
|
),
|
|
3703
3703
|
children: E
|
|
3704
3704
|
}
|
|
3705
3705
|
),
|
|
3706
|
-
|
|
3706
|
+
p && /* @__PURE__ */ e(
|
|
3707
3707
|
"span",
|
|
3708
3708
|
{
|
|
3709
3709
|
className: je(
|
|
@@ -3775,11 +3775,11 @@ const Gl = ({
|
|
|
3775
3775
|
footer: l = { show: !0, customFooter: null },
|
|
3776
3776
|
primaryAction: m = { onSubmit: null, label: "Save", loader: !1, disabled: !1 },
|
|
3777
3777
|
secondaryAction: o = { onCancel: null, label: "Cancel" },
|
|
3778
|
-
dialogPanelClass:
|
|
3778
|
+
dialogPanelClass: h = ""
|
|
3779
3779
|
}) => {
|
|
3780
3780
|
const u = (y) => {
|
|
3781
3781
|
y.target === y.currentTarget && a(!1);
|
|
3782
|
-
},
|
|
3782
|
+
}, w = (y) => {
|
|
3783
3783
|
y.stopPropagation();
|
|
3784
3784
|
};
|
|
3785
3785
|
return /* @__PURE__ */ n(
|
|
@@ -3799,8 +3799,8 @@ const Gl = ({
|
|
|
3799
3799
|
/* @__PURE__ */ e("div", { className: "fixed inset-0 overflow-y-auto", children: /* @__PURE__ */ e("div", { className: "flex min-h-full items-center justify-center p-4", children: /* @__PURE__ */ n(
|
|
3800
3800
|
Te,
|
|
3801
3801
|
{
|
|
3802
|
-
className: `${
|
|
3803
|
-
onClick:
|
|
3802
|
+
className: `${h} relative bg-white align-middle w-full lg:w-[36rem] mx-5 lg:mx-0 transform overflow-hidden rounded-2xl text-left shadow-xl lg:min-w-[36rem] md:min-w-96 transition-all`,
|
|
3803
|
+
onClick: w,
|
|
3804
3804
|
children: [
|
|
3805
3805
|
/* @__PURE__ */ n("div", { className: "flex justify-between items-center border-b border-gray-200 p-6 flex-shrink-0", children: [
|
|
3806
3806
|
i?.customHeader && i.customHeader,
|
|
@@ -3811,7 +3811,7 @@ const Gl = ({
|
|
|
3811
3811
|
"div",
|
|
3812
3812
|
{
|
|
3813
3813
|
className: "px-5 mb-5",
|
|
3814
|
-
onClick:
|
|
3814
|
+
onClick: w,
|
|
3815
3815
|
children: s
|
|
3816
3816
|
}
|
|
3817
3817
|
),
|
|
@@ -3872,14 +3872,14 @@ function ss({
|
|
|
3872
3872
|
onSelect: l,
|
|
3873
3873
|
onCreateChild: m,
|
|
3874
3874
|
onRename: o,
|
|
3875
|
-
onDelete:
|
|
3875
|
+
onDelete: h,
|
|
3876
3876
|
renderActions: u,
|
|
3877
3877
|
// optional override
|
|
3878
|
-
dragId:
|
|
3878
|
+
dragId: w,
|
|
3879
3879
|
dropId: y,
|
|
3880
3880
|
indent: r = 24
|
|
3881
3881
|
}) {
|
|
3882
|
-
const { setNodeRef:
|
|
3882
|
+
const { setNodeRef: v, isOver: d } = sr({ id: y }), { attributes: g, listeners: z, setNodeRef: A, transform: F, isDragging: O } = lr({ id: w }), P = F ? { transform: `translate3d(${Math.round(F.x)}px, ${Math.round(F.y)}px, 0)` } : void 0, [_, U] = L(!1), [Y, G] = L(t.name), T = () => {
|
|
3883
3883
|
const f = Y.trim();
|
|
3884
3884
|
U(!1), f && f !== t.name ? o?.(t, f) : G(t.name);
|
|
3885
3885
|
}, x = le(() => /* @__PURE__ */ e(
|
|
@@ -3891,14 +3891,14 @@ function ss({
|
|
|
3891
3891
|
{ action: "delete", label: "Delete" }
|
|
3892
3892
|
],
|
|
3893
3893
|
onSelect: (C) => {
|
|
3894
|
-
C.action === "create" ? m?.(t) : C.action === "rename" ? U(!0) : C.action === "delete" &&
|
|
3894
|
+
C.action === "create" ? m?.(t) : C.action === "rename" ? U(!0) : C.action === "delete" && h?.(t);
|
|
3895
3895
|
}
|
|
3896
3896
|
}
|
|
3897
|
-
), [t, m,
|
|
3897
|
+
), [t, m, h]);
|
|
3898
3898
|
return /* @__PURE__ */ n(
|
|
3899
3899
|
"div",
|
|
3900
3900
|
{
|
|
3901
|
-
ref:
|
|
3901
|
+
ref: v,
|
|
3902
3902
|
className: `tv-row ${d ? "tv-drop-over" : ""} ${O ? "dragging" : ""}`,
|
|
3903
3903
|
style: { ...P, paddingLeft: 8 + a * r },
|
|
3904
3904
|
onClick: (f) => {
|
|
@@ -3924,7 +3924,7 @@ function ss({
|
|
|
3924
3924
|
/* @__PURE__ */ e("div", { className: "tv-actions", children: u ? u(t, {
|
|
3925
3925
|
onCreateChild: () => m?.(t),
|
|
3926
3926
|
onRename: () => U(!0),
|
|
3927
|
-
onDelete: () =>
|
|
3927
|
+
onDelete: () => h?.(t)
|
|
3928
3928
|
}) : x })
|
|
3929
3929
|
]
|
|
3930
3930
|
}
|
|
@@ -3933,35 +3933,35 @@ function ss({
|
|
|
3933
3933
|
const ls = (t) => String(t.id ?? t._id), is = (t) => t.parent !== void 0 ? String(t.parent) : t.parentId != null ? String(t.parentId) : "root", os = (t) => t.name ?? t.label ?? "", cs = (t) => Array.isArray(t) && t.some((a) => Array.isArray(a.children));
|
|
3934
3934
|
function ds(t, { rootId: a, getId: s, getParent: i, getName: l }) {
|
|
3935
3935
|
const m = /* @__PURE__ */ new Map();
|
|
3936
|
-
t.forEach((
|
|
3937
|
-
const u = s(
|
|
3936
|
+
t.forEach((h) => {
|
|
3937
|
+
const u = s(h);
|
|
3938
3938
|
m.set(u, {
|
|
3939
|
-
...
|
|
3939
|
+
...h,
|
|
3940
3940
|
id: u,
|
|
3941
|
-
name: l(
|
|
3942
|
-
parentId: i(
|
|
3941
|
+
name: l(h),
|
|
3942
|
+
parentId: i(h) || a,
|
|
3943
3943
|
children: []
|
|
3944
3944
|
});
|
|
3945
3945
|
});
|
|
3946
3946
|
const o = [];
|
|
3947
|
-
return m.forEach((
|
|
3948
|
-
const u =
|
|
3949
|
-
u !== a && m.has(u) ? m.get(u).children.push(
|
|
3947
|
+
return m.forEach((h) => {
|
|
3948
|
+
const u = h.parentId || a;
|
|
3949
|
+
u !== a && m.has(u) ? m.get(u).children.push(h) : o.push(h);
|
|
3950
3950
|
}), { roots: o, byId: m };
|
|
3951
3951
|
}
|
|
3952
3952
|
function ms(t, { rootId: a, getId: s, getName: i }) {
|
|
3953
3953
|
const l = /* @__PURE__ */ new Map();
|
|
3954
|
-
function m(
|
|
3955
|
-
const
|
|
3956
|
-
...
|
|
3957
|
-
id:
|
|
3958
|
-
name: i(
|
|
3954
|
+
function m(h, u) {
|
|
3955
|
+
const w = s(h), y = {
|
|
3956
|
+
...h,
|
|
3957
|
+
id: w,
|
|
3958
|
+
name: i(h),
|
|
3959
3959
|
parentId: u || a,
|
|
3960
|
-
children: (
|
|
3960
|
+
children: (h.children || []).map((r) => m(r, w))
|
|
3961
3961
|
};
|
|
3962
|
-
return l.set(
|
|
3962
|
+
return l.set(w, y), y;
|
|
3963
3963
|
}
|
|
3964
|
-
return { roots: t.map((
|
|
3964
|
+
return { roots: t.map((h) => m(h, null)), byId: l };
|
|
3965
3965
|
}
|
|
3966
3966
|
const Ie = (t) => t.map((a) => ({ ...a, children: Ie(a.children || []) }));
|
|
3967
3967
|
function us(t, a) {
|
|
@@ -3971,8 +3971,8 @@ function us(t, a) {
|
|
|
3971
3971
|
if (o.id === a)
|
|
3972
3972
|
return s = o, null;
|
|
3973
3973
|
if (o.children?.length) {
|
|
3974
|
-
const
|
|
3975
|
-
if (
|
|
3974
|
+
const h = i(o.children);
|
|
3975
|
+
if (h !== o.children) return { ...o, children: h };
|
|
3976
3976
|
}
|
|
3977
3977
|
return o;
|
|
3978
3978
|
}).filter(Boolean);
|
|
@@ -4011,12 +4011,12 @@ function ql({
|
|
|
4011
4011
|
getParent: l = is,
|
|
4012
4012
|
getName: m = os,
|
|
4013
4013
|
onSelect: o,
|
|
4014
|
-
onCreateRoot:
|
|
4014
|
+
onCreateRoot: h,
|
|
4015
4015
|
onCreateChild: u,
|
|
4016
|
-
onRename:
|
|
4016
|
+
onRename: w,
|
|
4017
4017
|
onDelete: y,
|
|
4018
4018
|
onMove: r,
|
|
4019
|
-
renderActions:
|
|
4019
|
+
renderActions: v,
|
|
4020
4020
|
disableMoveToRoot: d = !1,
|
|
4021
4021
|
// ← allow root moves by default now
|
|
4022
4022
|
indentUnit: g = 24
|
|
@@ -4025,18 +4025,18 @@ function ql({
|
|
|
4025
4025
|
t.map((b) => ({ ...b })),
|
|
4026
4026
|
{ rootId: a, getId: i, getParent: l, getName: m }
|
|
4027
4027
|
), [t, a, i, l, m]), [A, F] = L({}), O = K((b) => {
|
|
4028
|
-
const
|
|
4028
|
+
const p = {};
|
|
4029
4029
|
return (function N(k) {
|
|
4030
4030
|
k.forEach(($) => {
|
|
4031
|
-
|
|
4031
|
+
p[$.id] = !0, $.children?.length && N($.children);
|
|
4032
4032
|
});
|
|
4033
|
-
})(b),
|
|
4033
|
+
})(b), p;
|
|
4034
4034
|
}, []);
|
|
4035
4035
|
ae.useEffect(() => {
|
|
4036
4036
|
F(O(z));
|
|
4037
4037
|
}, [z, O]);
|
|
4038
4038
|
const P = K(
|
|
4039
|
-
(b) => F((
|
|
4039
|
+
(b) => F((p) => ({ ...p, [b]: !p[b] })),
|
|
4040
4040
|
[]
|
|
4041
4041
|
), [_, U] = L(() => Ie(z));
|
|
4042
4042
|
ae.useEffect(() => U(Ie(z)), [z]);
|
|
@@ -4046,10 +4046,10 @@ function ql({
|
|
|
4046
4046
|
}, I = ({ delta: b }) => {
|
|
4047
4047
|
f.current = b?.x ?? 0;
|
|
4048
4048
|
}, E = K(
|
|
4049
|
-
({ active: b, over:
|
|
4049
|
+
({ active: b, over: p }) => {
|
|
4050
4050
|
const N = f.current;
|
|
4051
|
-
if (f.current = 0, x(null), !b || !
|
|
4052
|
-
const k = String(b.id).replace(/^drag-/, ""), $ = String(
|
|
4051
|
+
if (f.current = 0, x(null), !b || !p) return;
|
|
4052
|
+
const k = String(b.id).replace(/^drag-/, ""), $ = String(p.id).replace(/^drop-/, "");
|
|
4053
4053
|
if (!k || !$ || k === $) return;
|
|
4054
4054
|
let M = $;
|
|
4055
4055
|
const S = Math.max(0, Math.floor(-N / g));
|
|
@@ -4076,49 +4076,49 @@ function ql({
|
|
|
4076
4076
|
},
|
|
4077
4077
|
[_, z, a, d, g, r]
|
|
4078
4078
|
), D = K(
|
|
4079
|
-
(b,
|
|
4079
|
+
(b, p = 0) => b.map((N) => /* @__PURE__ */ n(ae.Fragment, { children: [
|
|
4080
4080
|
/* @__PURE__ */ e(
|
|
4081
4081
|
ss,
|
|
4082
4082
|
{
|
|
4083
4083
|
node: N,
|
|
4084
|
-
depth:
|
|
4084
|
+
depth: p,
|
|
4085
4085
|
expanded: !!A[N.id],
|
|
4086
4086
|
onToggle: () => P(N.id),
|
|
4087
4087
|
onSelect: o,
|
|
4088
4088
|
onCreateChild: u,
|
|
4089
|
-
onRename:
|
|
4089
|
+
onRename: w,
|
|
4090
4090
|
onDelete: y,
|
|
4091
|
-
renderActions:
|
|
4091
|
+
renderActions: v,
|
|
4092
4092
|
dragId: `drag-${N.id}`,
|
|
4093
4093
|
dropId: `drop-${N.id}`,
|
|
4094
4094
|
indent: g
|
|
4095
4095
|
}
|
|
4096
4096
|
),
|
|
4097
|
-
A[N.id] && N.children?.length > 0 ? D(N.children,
|
|
4097
|
+
A[N.id] && N.children?.length > 0 ? D(N.children, p + 1) : null
|
|
4098
4098
|
] }, N.id)),
|
|
4099
|
-
[A, g, u, y,
|
|
4099
|
+
[A, g, u, y, w, o, v, P]
|
|
4100
4100
|
);
|
|
4101
4101
|
return ae.useMemo(() => {
|
|
4102
4102
|
if (!T) return null;
|
|
4103
4103
|
const b = String(T).replace(/^drag-/, "");
|
|
4104
|
-
function
|
|
4104
|
+
function p(N) {
|
|
4105
4105
|
for (const k of N) {
|
|
4106
4106
|
if (k.id === b) return k;
|
|
4107
|
-
const $ = k.children?.length ?
|
|
4107
|
+
const $ = k.children?.length ? p(k.children) : null;
|
|
4108
4108
|
if ($) return $;
|
|
4109
4109
|
}
|
|
4110
4110
|
return null;
|
|
4111
4111
|
}
|
|
4112
|
-
return
|
|
4112
|
+
return p(_);
|
|
4113
4113
|
}, [T, _]), /* @__PURE__ */ n("div", { className: "tv", children: [
|
|
4114
4114
|
s !== !1 && /* @__PURE__ */ n("div", { className: "tv-header", children: [
|
|
4115
4115
|
/* @__PURE__ */ e("div", { className: "tv-title", children: s }),
|
|
4116
|
-
/* @__PURE__ */ e("button", { className: "tv-btn", onClick:
|
|
4116
|
+
/* @__PURE__ */ e("button", { className: "tv-btn", onClick: h, children: "+ New folder" })
|
|
4117
4117
|
] }),
|
|
4118
4118
|
/* @__PURE__ */ n("div", { className: "tv-root-row", children: [
|
|
4119
4119
|
/* @__PURE__ */ e(Pe, { size: 16, className: "tv-folder-ic" }),
|
|
4120
4120
|
/* @__PURE__ */ e("strong", { children: "ROOT" }),
|
|
4121
|
-
/* @__PURE__ */ e("button", { className: "tv-icon", title: "Create top-level", onClick:
|
|
4121
|
+
/* @__PURE__ */ e("button", { className: "tv-icon", title: "Create top-level", onClick: h, children: "+" })
|
|
4122
4122
|
] }),
|
|
4123
4123
|
/* @__PURE__ */ e(
|
|
4124
4124
|
cr,
|
|
@@ -4145,24 +4145,24 @@ const Yl = ({
|
|
|
4145
4145
|
listClassName: l = "",
|
|
4146
4146
|
panelClassName: m = "",
|
|
4147
4147
|
tabClassName: o,
|
|
4148
|
-
...
|
|
4148
|
+
...h
|
|
4149
4149
|
// Pass remaining props to Tab.Group
|
|
4150
4150
|
}) => {
|
|
4151
|
-
const u = s === "vertical",
|
|
4151
|
+
const u = s === "vertical", w = (v) => Ne(
|
|
4152
4152
|
"py-2 -mb-px text-sm font-medium focus:outline-none border-b-2",
|
|
4153
|
-
|
|
4154
|
-
), y = (
|
|
4153
|
+
v ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
|
|
4154
|
+
), y = (v) => Ne(
|
|
4155
4155
|
"text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
|
|
4156
|
-
|
|
4157
|
-
), r = ({ selected:
|
|
4158
|
-
return /* @__PURE__ */ e(ne.Group, { vertical: u, ...
|
|
4159
|
-
/* @__PURE__ */ e(ne.List, { className: Ne("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((
|
|
4160
|
-
/* @__PURE__ */ e(ne.Panels, { unmount: !a, className: Ne("flex-1", m), children: t.map((
|
|
4156
|
+
v ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
|
|
4157
|
+
), r = ({ selected: v }) => o ? typeof o == "function" ? o(v) : o : u ? y(v) : w(v);
|
|
4158
|
+
return /* @__PURE__ */ e(ne.Group, { vertical: u, ...h, children: u ? /* @__PURE__ */ n("div", { className: Ne("flex gap-4", i), children: [
|
|
4159
|
+
/* @__PURE__ */ e(ne.List, { className: Ne("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((v) => /* @__PURE__ */ e(ne, { className: r, children: v.label }, v.key)) }),
|
|
4160
|
+
/* @__PURE__ */ e(ne.Panels, { unmount: !a, className: Ne("flex-1", m), children: t.map((v) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: v.content }) }, v.key)) })
|
|
4161
4161
|
] }) : (
|
|
4162
4162
|
// mostly this part is used : horizontal
|
|
4163
4163
|
/* @__PURE__ */ n(ee, { children: [
|
|
4164
|
-
/* @__PURE__ */ e(ne.List, { className: Ne("flex gap-6 border rounded-t-2xl px-1.5 border-gray-300 mb-3 ", l), children: t.map((
|
|
4165
|
-
/* @__PURE__ */ e(ne.Panels, { unmount: !a, className: Ne("mt-2", m), children: t.map((
|
|
4164
|
+
/* @__PURE__ */ e(ne.List, { className: Ne("flex gap-6 border rounded-t-2xl px-1.5 border-gray-300 mb-3 ", l), children: t.map((v) => /* @__PURE__ */ e(ne, { className: r, children: v.label }, v.key)) }),
|
|
4165
|
+
/* @__PURE__ */ e(ne.Panels, { unmount: !a, className: Ne("mt-2", m), children: t.map((v) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: v.content }) }, v.key)) })
|
|
4166
4166
|
] })
|
|
4167
4167
|
) });
|
|
4168
4168
|
};
|
|
@@ -4172,7 +4172,7 @@ function Wl(t, a = "YYYY-MM-DD HH:mm:ss") {
|
|
|
4172
4172
|
c.string;
|
|
4173
4173
|
function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
4174
4174
|
console.log(t);
|
|
4175
|
-
const [l, m] = ae.useState(t), [o,
|
|
4175
|
+
const [l, m] = ae.useState(t), [o, h] = ae.useState(() => {
|
|
4176
4176
|
const r = a && a[t.key] || {};
|
|
4177
4177
|
return console.log("Initial Section data for", t.key, r), r;
|
|
4178
4178
|
}), u = ge(a);
|
|
@@ -4180,16 +4180,16 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4180
4180
|
if (u.current !== a) {
|
|
4181
4181
|
u.current = a;
|
|
4182
4182
|
const r = a && a[t.key] || {};
|
|
4183
|
-
console.log("Updated Section data for", t.key, r),
|
|
4183
|
+
console.log("Updated Section data for", t.key, r), h(r);
|
|
4184
4184
|
}
|
|
4185
4185
|
}, [a, t.key]), console.log("Section data", o);
|
|
4186
|
-
const
|
|
4186
|
+
const w = ge(o);
|
|
4187
4187
|
te(() => {
|
|
4188
|
-
|
|
4188
|
+
w.current !== o && s && typeof s == "function" && (w.current = o, s(l.key, o));
|
|
4189
4189
|
}, [l.key, o, s]);
|
|
4190
4190
|
const y = (r) => {
|
|
4191
4191
|
if (!r.dependsOn) return !0;
|
|
4192
|
-
const { field:
|
|
4192
|
+
const { field: v, value: d, operator: g = "equals" } = r.dependsOn, z = o[v];
|
|
4193
4193
|
switch (g) {
|
|
4194
4194
|
case "equals":
|
|
4195
4195
|
return z === d;
|
|
@@ -4225,7 +4225,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4225
4225
|
),
|
|
4226
4226
|
/* @__PURE__ */ e("p", { style: { fontSize: "14px", marginBottom: "10px" }, children: l.description }),
|
|
4227
4227
|
l.layout === "inline-checkboxes" ? /* @__PURE__ */ n("div", { style: { marginBottom: "20px" }, children: [
|
|
4228
|
-
/* @__PURE__ */ e("div", { style: { display: "flex", flexWrap: "wrap", gap: "20px", alignItems: "center" }, children: l.fields.map((r,
|
|
4228
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", flexWrap: "wrap", gap: "20px", alignItems: "center" }, children: l.fields.map((r, v) => y(r) && r.fieldtype === "checkbox" && /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
4229
4229
|
/* @__PURE__ */ e(
|
|
4230
4230
|
ut,
|
|
4231
4231
|
{
|
|
@@ -4233,7 +4233,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4233
4233
|
checked: !!(o[r.key] || r.default),
|
|
4234
4234
|
onChange: (d) => {
|
|
4235
4235
|
const g = d.target ? d.target.checked : d, z = { ...o, [r.key]: g };
|
|
4236
|
-
|
|
4236
|
+
h(z), s && s(l.key, z);
|
|
4237
4237
|
},
|
|
4238
4238
|
label: r.label,
|
|
4239
4239
|
disabled: r.disabled ? r.disabled : !1
|
|
@@ -4251,17 +4251,17 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4251
4251
|
children: "ℹ️"
|
|
4252
4252
|
}
|
|
4253
4253
|
)
|
|
4254
|
-
] },
|
|
4254
|
+
] }, v)) }),
|
|
4255
4255
|
l.fields.some(
|
|
4256
4256
|
(r) => r.fieldtype === "checkbox" && i[l.key]?.[r.key]
|
|
4257
4257
|
) && /* @__PURE__ */ e("div", { style: { marginTop: "10px" }, children: l.fields.map(
|
|
4258
|
-
(r,
|
|
4258
|
+
(r, v) => r.fieldtype === "checkbox" && i[l.key]?.[r.key] && /* @__PURE__ */ n("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: [
|
|
4259
4259
|
r.label,
|
|
4260
4260
|
": ",
|
|
4261
4261
|
i[l.key][r.key]
|
|
4262
|
-
] },
|
|
4262
|
+
] }, v)
|
|
4263
4263
|
) })
|
|
4264
|
-
] }) : /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: l.fields.map((r,
|
|
4264
|
+
] }) : /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: l.fields.map((r, v) => y(r) && /* @__PURE__ */ n("div", { className: r.fullWidth ? "col-span-full" : "", style: { marginBottom: "10px" }, children: [
|
|
4265
4265
|
r.fieldtype !== "checkbox" && /* @__PURE__ */ n(
|
|
4266
4266
|
"label",
|
|
4267
4267
|
{
|
|
@@ -4288,7 +4288,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4288
4288
|
value: o[r.key] || "",
|
|
4289
4289
|
onChange: (d) => {
|
|
4290
4290
|
const g = { ...o, [r.key]: d.target.value };
|
|
4291
|
-
|
|
4291
|
+
h(g), s && s(l.key, g);
|
|
4292
4292
|
},
|
|
4293
4293
|
required: r.required,
|
|
4294
4294
|
disabled: r.disabled ? r.disabled : !1,
|
|
@@ -4308,7 +4308,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4308
4308
|
value: o[r.key] || "",
|
|
4309
4309
|
onChange: (d) => {
|
|
4310
4310
|
const g = { ...o, [r.key]: d.target.value };
|
|
4311
|
-
|
|
4311
|
+
h(g), s && s(l.key, g);
|
|
4312
4312
|
},
|
|
4313
4313
|
rows: 3,
|
|
4314
4314
|
required: r.required,
|
|
@@ -4333,7 +4333,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4333
4333
|
step: r.step,
|
|
4334
4334
|
onChange: (d) => {
|
|
4335
4335
|
const g = d.target.value, z = { ...o, [r.key]: g };
|
|
4336
|
-
|
|
4336
|
+
h(z), s && s(l.key, z);
|
|
4337
4337
|
},
|
|
4338
4338
|
onBlur: (d) => {
|
|
4339
4339
|
const g = d.target.value;
|
|
@@ -4365,7 +4365,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4365
4365
|
checked: !!(o[r.key] || r.default),
|
|
4366
4366
|
onChange: (d) => {
|
|
4367
4367
|
const g = d.target ? d.target.checked : d, z = { ...o, [r.key]: g };
|
|
4368
|
-
|
|
4368
|
+
h(z), s && s(l.key, z);
|
|
4369
4369
|
},
|
|
4370
4370
|
label: r.placeholder || r.label,
|
|
4371
4371
|
disabled: r.disabled ? r.disabled : !1,
|
|
@@ -4383,7 +4383,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4383
4383
|
value: o[r.key] || "",
|
|
4384
4384
|
onChange: (d) => {
|
|
4385
4385
|
const g = { ...o, [r.key]: d };
|
|
4386
|
-
|
|
4386
|
+
h(g);
|
|
4387
4387
|
},
|
|
4388
4388
|
options: r.options || [],
|
|
4389
4389
|
placeholder: r.placeholder || `Select ${r.label}`,
|
|
@@ -4405,7 +4405,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4405
4405
|
value: o[r.key] || "",
|
|
4406
4406
|
onChange: (d) => {
|
|
4407
4407
|
const g = { ...o, [r.key]: d.target.value };
|
|
4408
|
-
|
|
4408
|
+
h(g), s && s(l.key, g);
|
|
4409
4409
|
},
|
|
4410
4410
|
required: r.required,
|
|
4411
4411
|
disabled: r.disabled ? r.disabled : !1,
|
|
@@ -4425,7 +4425,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4425
4425
|
value: o[r.key] || "",
|
|
4426
4426
|
onChange: (d) => {
|
|
4427
4427
|
const g = { ...o, [r.key]: d.target.value };
|
|
4428
|
-
|
|
4428
|
+
h(g), s && s(l.key, g);
|
|
4429
4429
|
},
|
|
4430
4430
|
required: r.required,
|
|
4431
4431
|
disabled: r.disabled ? r.disabled : !1,
|
|
@@ -4445,7 +4445,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4445
4445
|
value: o[r.key] || "",
|
|
4446
4446
|
onChange: (d) => {
|
|
4447
4447
|
const g = { ...o, [r.key]: d.target.value };
|
|
4448
|
-
|
|
4448
|
+
h(g), s && s(l.key, g);
|
|
4449
4449
|
},
|
|
4450
4450
|
required: r.required,
|
|
4451
4451
|
disabled: r.disabled ? r.disabled : !1,
|
|
@@ -4461,7 +4461,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4461
4461
|
selectedItems: o[r.key] || [],
|
|
4462
4462
|
onSelectionChange: (d) => {
|
|
4463
4463
|
const g = { ...o, [r.key]: d };
|
|
4464
|
-
|
|
4464
|
+
h(g), s && s(l.key, g);
|
|
4465
4465
|
},
|
|
4466
4466
|
options: r.options || [],
|
|
4467
4467
|
placeholder: r.placeholder || `Select ${r.label}`,
|
|
@@ -4479,7 +4479,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4479
4479
|
onChange: (d) => {
|
|
4480
4480
|
console.log("Toggle changed:", r.key, d);
|
|
4481
4481
|
const g = { ...o, [r.key]: d };
|
|
4482
|
-
|
|
4482
|
+
h(g), s && s(l.key, g);
|
|
4483
4483
|
},
|
|
4484
4484
|
disabled: r.disabled ? r.disabled : !1
|
|
4485
4485
|
}
|
|
@@ -4493,7 +4493,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4493
4493
|
value: o[r.key] ? new Date(o[r.key]) : null,
|
|
4494
4494
|
onChange: (d) => {
|
|
4495
4495
|
const g = { ...o, [r.key]: d ? d.toISOString().split("T")[0] : "" };
|
|
4496
|
-
|
|
4496
|
+
h(g), s && s(l.key, g);
|
|
4497
4497
|
},
|
|
4498
4498
|
placeholder: r.placeholder || "Select date",
|
|
4499
4499
|
disabled: r.disabled ? r.disabled : !1,
|
|
@@ -4508,7 +4508,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4508
4508
|
value: o[r.key] || { from: null, to: null },
|
|
4509
4509
|
onChange: (d) => {
|
|
4510
4510
|
const g = { ...o, [r.key]: d };
|
|
4511
|
-
|
|
4511
|
+
h(g), s && s(l.key, g);
|
|
4512
4512
|
},
|
|
4513
4513
|
placeholder: r.placeholder || "Select date range",
|
|
4514
4514
|
disabled: r.disabled ? r.disabled : !1,
|
|
@@ -4523,7 +4523,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4523
4523
|
selectedValue: typeof o[r.key] < "u" ? o[r.key] : r.default || "",
|
|
4524
4524
|
onValueChange: (d) => {
|
|
4525
4525
|
const g = { ...o, [r.key]: d };
|
|
4526
|
-
|
|
4526
|
+
h(g), s && s(l.key, g);
|
|
4527
4527
|
},
|
|
4528
4528
|
options: r.options || [],
|
|
4529
4529
|
disabled: r.disabled ? r.disabled : !1,
|
|
@@ -4544,7 +4544,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4544
4544
|
checked: o[r.key] === d.value,
|
|
4545
4545
|
onChange: (g) => {
|
|
4546
4546
|
const z = { ...o, [r.key]: g.target.value };
|
|
4547
|
-
|
|
4547
|
+
h(z), s && s(l.key, z);
|
|
4548
4548
|
},
|
|
4549
4549
|
disabled: r.disabled
|
|
4550
4550
|
}
|
|
@@ -4563,7 +4563,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4563
4563
|
value: o[r.key] || "",
|
|
4564
4564
|
onChange: (d) => {
|
|
4565
4565
|
const g = { ...o, [r.key]: d };
|
|
4566
|
-
|
|
4566
|
+
h(g), s && s(l.key, g);
|
|
4567
4567
|
},
|
|
4568
4568
|
placeholder: r.placeholder || `Search ${r.label}`,
|
|
4569
4569
|
className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
@@ -4582,7 +4582,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4582
4582
|
value: o[r.key] || "",
|
|
4583
4583
|
onChange: (d) => {
|
|
4584
4584
|
const g = { ...o, [r.key]: d.target.value };
|
|
4585
|
-
|
|
4585
|
+
h(g), s && s(l.key, g);
|
|
4586
4586
|
},
|
|
4587
4587
|
required: r.required,
|
|
4588
4588
|
className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
@@ -4601,7 +4601,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4601
4601
|
value: o[r.key] || "",
|
|
4602
4602
|
onChange: (d) => {
|
|
4603
4603
|
const g = { ...o, [r.key]: d.target.value };
|
|
4604
|
-
|
|
4604
|
+
h(g), s && s(l.key, g);
|
|
4605
4605
|
},
|
|
4606
4606
|
required: r.required,
|
|
4607
4607
|
className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
@@ -4619,7 +4619,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4619
4619
|
value: o[r.key] || "#000000",
|
|
4620
4620
|
onChange: (d) => {
|
|
4621
4621
|
const g = { ...o, [r.key]: d.target.value };
|
|
4622
|
-
|
|
4622
|
+
h(g), s && s(l.key, g);
|
|
4623
4623
|
},
|
|
4624
4624
|
className: `w-full h-10 ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
4625
4625
|
}
|
|
@@ -4636,7 +4636,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4636
4636
|
value: o[r.key] || r.min || 0,
|
|
4637
4637
|
onChange: (d) => {
|
|
4638
4638
|
const g = { ...o, [r.key]: d.target.value };
|
|
4639
|
-
|
|
4639
|
+
h(g), s && s(l.key, g);
|
|
4640
4640
|
},
|
|
4641
4641
|
min: r.min || 0,
|
|
4642
4642
|
max: r.max || 100,
|
|
@@ -4662,7 +4662,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4662
4662
|
name: r.key,
|
|
4663
4663
|
onChange: (d) => {
|
|
4664
4664
|
const g = d.target.files[0], z = { ...o, [r.key]: g ? g.name : "" };
|
|
4665
|
-
|
|
4665
|
+
h(z), s && s(l.key, z);
|
|
4666
4666
|
},
|
|
4667
4667
|
accept: r.accept,
|
|
4668
4668
|
className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
|
|
@@ -4679,7 +4679,7 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4679
4679
|
className: r.className || "",
|
|
4680
4680
|
onCollectionChange: (d) => {
|
|
4681
4681
|
const g = { ...o, [r.key]: d };
|
|
4682
|
-
|
|
4682
|
+
h(g), s && s(l.key, g);
|
|
4683
4683
|
},
|
|
4684
4684
|
showSearch: r.showSearch !== !1,
|
|
4685
4685
|
allowAdd: r.allowAdd !== !1,
|
|
@@ -4701,21 +4701,21 @@ function ps({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4701
4701
|
children: r.info
|
|
4702
4702
|
}
|
|
4703
4703
|
)
|
|
4704
|
-
] },
|
|
4704
|
+
] }, v)) })
|
|
4705
4705
|
] }) });
|
|
4706
4706
|
}
|
|
4707
4707
|
const gs = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
|
|
4708
4708
|
function bs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
4709
4709
|
console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
|
|
4710
|
-
const [l, m] = L(t), [o,
|
|
4710
|
+
const [l, m] = L(t), [o, h] = L(null), [u, w] = L(null);
|
|
4711
4711
|
console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
|
|
4712
4712
|
const [y, r] = L(() => {
|
|
4713
4713
|
const x = a && a[l.key] || [], f = x.length > 0 ? x : [{ id: 0 }];
|
|
4714
4714
|
return console.log(`[DataTableRenderer] ${l.key} - Initial data:`, f), f;
|
|
4715
|
-
}),
|
|
4715
|
+
}), v = ge(a);
|
|
4716
4716
|
te(() => {
|
|
4717
|
-
if (console.log(`[DataTableRenderer] ${l.key} - Checking for initialData changes`), console.log(`[DataTableRenderer] ${l.key} - Previous:`,
|
|
4718
|
-
|
|
4717
|
+
if (console.log(`[DataTableRenderer] ${l.key} - Checking for initialData changes`), console.log(`[DataTableRenderer] ${l.key} - Previous:`, v.current), console.log(`[DataTableRenderer] ${l.key} - Current:`, a), v.current !== a) {
|
|
4718
|
+
v.current = a;
|
|
4719
4719
|
const x = a && a[l.key] || [], f = x.length > 0 ? x : [{ id: 0 }];
|
|
4720
4720
|
console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, f), r(f);
|
|
4721
4721
|
}
|
|
@@ -4731,8 +4731,8 @@ function bs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4731
4731
|
const z = (x) => {
|
|
4732
4732
|
const f = (E, D) => {
|
|
4733
4733
|
console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: E, value: D, type: typeof D }), r((b) => {
|
|
4734
|
-
const
|
|
4735
|
-
return
|
|
4734
|
+
const p = [...b];
|
|
4735
|
+
return p[E][x.key] = D, p;
|
|
4736
4736
|
});
|
|
4737
4737
|
}, C = (E) => i[l.key]?.[E]?.[x.key], I = (E) => {
|
|
4738
4738
|
const D = C(E);
|
|
@@ -4780,9 +4780,9 @@ function bs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4780
4780
|
step: x.step,
|
|
4781
4781
|
onChange: (b) => f(D, b.target.value),
|
|
4782
4782
|
onBlur: (b) => {
|
|
4783
|
-
const
|
|
4784
|
-
if (
|
|
4785
|
-
const N = Number(
|
|
4783
|
+
const p = b.target.value;
|
|
4784
|
+
if (p !== "" && p !== null && p !== void 0) {
|
|
4785
|
+
const N = Number(p);
|
|
4786
4786
|
isNaN(N) || (x.min !== void 0 && N < x.min ? (b.target.setCustomValidity(`${x.label} must be at least ${x.min}`), b.target.reportValidity()) : x.max !== void 0 && N > x.max ? (b.target.setCustomValidity(`${x.label} must not exceed ${x.max}`), b.target.reportValidity()) : b.target.setCustomValidity(""));
|
|
4787
4787
|
}
|
|
4788
4788
|
},
|
|
@@ -4866,7 +4866,7 @@ function bs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4866
4866
|
return (E, D) => {
|
|
4867
4867
|
const b = () => {
|
|
4868
4868
|
if (x.optionsFrom && a) {
|
|
4869
|
-
const { config:
|
|
4869
|
+
const { config: p, valueField: N, labelField: k } = x.optionsFrom, $ = a[p] || [];
|
|
4870
4870
|
if (Array.isArray($))
|
|
4871
4871
|
return $.map((M) => ({
|
|
4872
4872
|
id: M[N] || "",
|
|
@@ -4882,7 +4882,7 @@ function bs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4882
4882
|
{
|
|
4883
4883
|
index: D,
|
|
4884
4884
|
value: E[x.key] || "",
|
|
4885
|
-
onChange: (
|
|
4885
|
+
onChange: (p) => f(D, p),
|
|
4886
4886
|
options: b(),
|
|
4887
4887
|
placeholder: x.placeholder || `Select ${x.label}`,
|
|
4888
4888
|
required: x.required,
|
|
@@ -4900,7 +4900,7 @@ function bs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4900
4900
|
et,
|
|
4901
4901
|
{
|
|
4902
4902
|
selectedItems: b,
|
|
4903
|
-
onSelectionChange: (
|
|
4903
|
+
onSelectionChange: (p) => f(D, p),
|
|
4904
4904
|
options: x.options || [],
|
|
4905
4905
|
placeholder: x.placeholder || `Select ${x.label}`,
|
|
4906
4906
|
className: "w-full"
|
|
@@ -4985,13 +4985,13 @@ function bs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4985
4985
|
);
|
|
4986
4986
|
case "audience":
|
|
4987
4987
|
return (E, D) => {
|
|
4988
|
-
const b = E[x.key] || { users: [], groups: [], roles: [] },
|
|
4988
|
+
const b = E[x.key] || { users: [], groups: [], roles: [] }, p = [
|
|
4989
4989
|
...b.users || [],
|
|
4990
4990
|
...b.groups || [],
|
|
4991
4991
|
...b.roles || []
|
|
4992
4992
|
];
|
|
4993
4993
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
4994
|
-
/* @__PURE__ */ e(gs, { children:
|
|
4994
|
+
/* @__PURE__ */ e(gs, { children: p.length > 0 ? p.slice(0, 3).map((N, k) => /* @__PURE__ */ e(
|
|
4995
4995
|
Ce,
|
|
4996
4996
|
{
|
|
4997
4997
|
size: "small",
|
|
@@ -5005,9 +5005,9 @@ function bs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5005
5005
|
{
|
|
5006
5006
|
className: "text-blue-600 font-semibold hover:text-blue-800",
|
|
5007
5007
|
onClick: () => {
|
|
5008
|
-
|
|
5008
|
+
w(x.key), h(D);
|
|
5009
5009
|
},
|
|
5010
|
-
children:
|
|
5010
|
+
children: p.length > 0 ? "Edit" : "Assign"
|
|
5011
5011
|
}
|
|
5012
5012
|
)
|
|
5013
5013
|
] });
|
|
@@ -5044,8 +5044,8 @@ function bs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5044
5044
|
{
|
|
5045
5045
|
type: "file",
|
|
5046
5046
|
onChange: (b) => {
|
|
5047
|
-
const
|
|
5048
|
-
f(D,
|
|
5047
|
+
const p = b.target.files[0];
|
|
5048
|
+
f(D, p ? p.name : "");
|
|
5049
5049
|
},
|
|
5050
5050
|
accept: x.accept,
|
|
5051
5051
|
className: "w-full"
|
|
@@ -5111,7 +5111,7 @@ function bs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5111
5111
|
console.log("[DataTableRenderer] handleAddAudience called with:", x), r((f) => {
|
|
5112
5112
|
const C = [...f];
|
|
5113
5113
|
if (o !== null && u && C[o]) {
|
|
5114
|
-
const I = x.pendingInvites || [], E = I.filter((
|
|
5114
|
+
const I = x.pendingInvites || [], E = I.filter((p) => p.type === "User"), D = I.filter((p) => p.type === "Group"), b = I.filter((p) => p.type === "Role");
|
|
5115
5115
|
C[o][u] = {
|
|
5116
5116
|
users: [...C[o][u]?.users || [], ...E],
|
|
5117
5117
|
groups: [...C[o][u]?.groups || [], ...D],
|
|
@@ -5119,7 +5119,7 @@ function bs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5119
5119
|
}, console.log("[DataTableRenderer] Updated audience data:", C[o][u]);
|
|
5120
5120
|
}
|
|
5121
5121
|
return C;
|
|
5122
|
-
}),
|
|
5122
|
+
}), h(null), w(null);
|
|
5123
5123
|
}, [o, u]);
|
|
5124
5124
|
return /* @__PURE__ */ n("div", { children: [
|
|
5125
5125
|
/* @__PURE__ */ n("div", { style: { marginBottom: "20px" }, children: [
|
|
@@ -5186,7 +5186,7 @@ function bs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5186
5186
|
{
|
|
5187
5187
|
isOpen: !0,
|
|
5188
5188
|
onClose: () => {
|
|
5189
|
-
|
|
5189
|
+
h(null), w(null);
|
|
5190
5190
|
},
|
|
5191
5191
|
onFinalSubmit: T,
|
|
5192
5192
|
existingShares: x,
|
|
@@ -5218,7 +5218,7 @@ function vs({
|
|
|
5218
5218
|
onShowCancelModal: l,
|
|
5219
5219
|
onCancel: m
|
|
5220
5220
|
}) {
|
|
5221
|
-
const [o,
|
|
5221
|
+
const [o, h] = ae.useState(a), [u, w] = ae.useState(null), [y, r] = ae.useState(null), [v, d] = L(!1), [g, z] = L(!1), [A, F] = L({}), O = `${ze()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, P = O, [_, U] = L(1), Y = () => {
|
|
5222
5222
|
if (!y || !u)
|
|
5223
5223
|
return console.log("[DynamicConfig] hasUnsavedChanges: false (no data)", { originalData: y, data: u }), !1;
|
|
5224
5224
|
const b = ($) => {
|
|
@@ -5228,9 +5228,9 @@ function vs({
|
|
|
5228
5228
|
return Object.keys($).sort().forEach((S) => {
|
|
5229
5229
|
M[S] = b($[S]);
|
|
5230
5230
|
}), M;
|
|
5231
|
-
},
|
|
5231
|
+
}, p = b(y), N = b(u), k = JSON.stringify(p) !== JSON.stringify(N);
|
|
5232
5232
|
return console.log("[DynamicConfig] hasUnsavedChanges:", k, {
|
|
5233
|
-
originalData:
|
|
5233
|
+
originalData: p,
|
|
5234
5234
|
currentData: N,
|
|
5235
5235
|
originalRaw: y,
|
|
5236
5236
|
currentRaw: u
|
|
@@ -5238,7 +5238,7 @@ function vs({
|
|
|
5238
5238
|
}, G = (b) => {
|
|
5239
5239
|
if (!a || !a.configuration)
|
|
5240
5240
|
return b;
|
|
5241
|
-
const
|
|
5241
|
+
const p = {}, N = b?.configuration || {};
|
|
5242
5242
|
return a.configuration.forEach((k) => {
|
|
5243
5243
|
if (k.key && k.type === "datatable") {
|
|
5244
5244
|
const M = (N[k.key] || []).map((S, B) => {
|
|
@@ -5261,32 +5261,32 @@ function vs({
|
|
|
5261
5261
|
B.fieldtype === "audience" ? S[B.key] = { users: [], groups: [], roles: [] } : S[B.key] = B.default || "";
|
|
5262
5262
|
}), M.push(S);
|
|
5263
5263
|
}
|
|
5264
|
-
|
|
5264
|
+
p[k.key] = M;
|
|
5265
5265
|
} else if (k.key) {
|
|
5266
5266
|
const $ = N[k.key] || {};
|
|
5267
5267
|
k.type === "section" && k.fields && k.fields.forEach((M) => {
|
|
5268
5268
|
M.fieldtype === "managecollectionlist" && M.key && (!$[M.key] || !Array.isArray($[M.key])) && ($[M.key] = M.initialData || []);
|
|
5269
|
-
}),
|
|
5269
|
+
}), p[k.key] = $;
|
|
5270
5270
|
}
|
|
5271
|
-
}),
|
|
5271
|
+
}), p;
|
|
5272
5272
|
}, T = () => {
|
|
5273
5273
|
if (a && a.configuration) {
|
|
5274
5274
|
const b = {};
|
|
5275
|
-
a.configuration.forEach((
|
|
5276
|
-
if (
|
|
5277
|
-
if (
|
|
5275
|
+
a.configuration.forEach((p) => {
|
|
5276
|
+
if (p.key)
|
|
5277
|
+
if (p.type === "datatable") {
|
|
5278
5278
|
const N = { id: 0 };
|
|
5279
|
-
|
|
5279
|
+
p.fields && p.fields.forEach((k) => {
|
|
5280
5280
|
k.fieldtype === "audience" ? N[k.key] = { users: [], groups: [], roles: [] } : N[k.key] = k.default || "";
|
|
5281
|
-
}), b[
|
|
5282
|
-
} else if (
|
|
5281
|
+
}), b[p.key] = [N];
|
|
5282
|
+
} else if (p.type === "section") {
|
|
5283
5283
|
const N = {};
|
|
5284
|
-
|
|
5284
|
+
p.fields && Array.isArray(p.fields) && p.fields.forEach((k) => {
|
|
5285
5285
|
k.key && (k.fieldtype === "managecollectionlist" ? N[k.key] = k.initialData || [] : N[k.key] = k.default || "");
|
|
5286
|
-
}), b[
|
|
5286
|
+
}), b[p.key] = N;
|
|
5287
5287
|
} else
|
|
5288
|
-
b[
|
|
5289
|
-
}),
|
|
5288
|
+
b[p.key] = {};
|
|
5289
|
+
}), w(b), r(b);
|
|
5290
5290
|
}
|
|
5291
5291
|
};
|
|
5292
5292
|
te(() => {
|
|
@@ -5297,31 +5297,31 @@ function vs({
|
|
|
5297
5297
|
const b = async () => {
|
|
5298
5298
|
try {
|
|
5299
5299
|
d(!0);
|
|
5300
|
-
let
|
|
5301
|
-
if (
|
|
5302
|
-
const N = G(
|
|
5303
|
-
|
|
5300
|
+
let p = await Xe(O);
|
|
5301
|
+
if (p) {
|
|
5302
|
+
const N = G(p);
|
|
5303
|
+
w(N), r(N);
|
|
5304
5304
|
} else
|
|
5305
5305
|
T();
|
|
5306
|
-
} catch (
|
|
5307
|
-
console.error("Error fetching configuration:",
|
|
5306
|
+
} catch (p) {
|
|
5307
|
+
console.error("Error fetching configuration:", p);
|
|
5308
5308
|
let N = "Failed to load configuration";
|
|
5309
|
-
if (
|
|
5310
|
-
const k =
|
|
5309
|
+
if (p.response) {
|
|
5310
|
+
const k = p.response.status, $ = p.response.data?.message || p.response.data?.error;
|
|
5311
5311
|
k === 400 ? N = $ || "Invalid request. Please check the application ID." : k === 401 ? N = "You are not authorized to access this configuration." : k === 403 ? N = "Access denied. You don't have permission to view this configuration." : k === 404 ? N = "Configuration not found. It may not exist yet or the application ID is incorrect." : k >= 500 ? N = $ || "Server error. Please try again later." : N = $ || `Failed to load configuration (Error ${k})`;
|
|
5312
|
-
} else
|
|
5312
|
+
} else p.request ? N = "Network error. Please check your connection and try again." : N = p.message || "An unexpected error occurred while loading configuration.";
|
|
5313
5313
|
_e.error(N), T();
|
|
5314
5314
|
} finally {
|
|
5315
5315
|
d(!1);
|
|
5316
5316
|
}
|
|
5317
5317
|
};
|
|
5318
|
-
a && (
|
|
5318
|
+
a && (h(a), t ? b() : T());
|
|
5319
5319
|
}, [a, _, t, s]);
|
|
5320
|
-
const x = (b,
|
|
5321
|
-
console.log(`[DynamicConfig] handleSectionChange called for ${b}:`,
|
|
5320
|
+
const x = (b, p) => {
|
|
5321
|
+
console.log(`[DynamicConfig] handleSectionChange called for ${b}:`, p), w((N) => {
|
|
5322
5322
|
const k = {
|
|
5323
5323
|
...N,
|
|
5324
|
-
[b]:
|
|
5324
|
+
[b]: p
|
|
5325
5325
|
};
|
|
5326
5326
|
return console.log("[DynamicConfig] Updated data state:", k), k;
|
|
5327
5327
|
}), F((N) => {
|
|
@@ -5330,31 +5330,31 @@ function vs({
|
|
|
5330
5330
|
});
|
|
5331
5331
|
}, f = () => {
|
|
5332
5332
|
const b = {};
|
|
5333
|
-
return !o || !u || o.configuration.forEach((
|
|
5334
|
-
if (
|
|
5335
|
-
|
|
5336
|
-
const k = u[
|
|
5333
|
+
return !o || !u || o.configuration.forEach((p) => {
|
|
5334
|
+
if (p.type === "section")
|
|
5335
|
+
p.fields.forEach((N) => {
|
|
5336
|
+
const k = u[p.key]?.[N.key];
|
|
5337
5337
|
if (N.required && (!k || typeof k == "string" && k.trim() === "")) {
|
|
5338
|
-
b[
|
|
5338
|
+
b[p.key] || (b[p.key] = {}), b[p.key][N.key] = `${N.label} is required`;
|
|
5339
5339
|
return;
|
|
5340
5340
|
}
|
|
5341
5341
|
if (N.fieldtype === "number" && k !== "" && k !== null && k !== void 0) {
|
|
5342
5342
|
const $ = Number(k);
|
|
5343
|
-
isNaN($) ? (b[
|
|
5343
|
+
isNaN($) ? (b[p.key] || (b[p.key] = {}), b[p.key][N.key] = `${N.label} must be a valid number`) : (N.min !== void 0 && $ < N.min && (b[p.key] || (b[p.key] = {}), b[p.key][N.key] = `${N.label} must be at least ${N.min}`), N.max !== void 0 && $ > N.max && (b[p.key] || (b[p.key] = {}), b[p.key][N.key] = `${N.label} must not exceed ${N.max}`));
|
|
5344
5344
|
}
|
|
5345
5345
|
});
|
|
5346
|
-
else if (
|
|
5347
|
-
const N = u[
|
|
5346
|
+
else if (p.type === "datatable") {
|
|
5347
|
+
const N = u[p.key];
|
|
5348
5348
|
Array.isArray(N) && N.forEach((k, $) => {
|
|
5349
|
-
|
|
5349
|
+
p.fields.forEach((M) => {
|
|
5350
5350
|
const S = k[M.key];
|
|
5351
5351
|
if (M.required && (!S || typeof S == "string" && S.trim() === "")) {
|
|
5352
|
-
b[
|
|
5352
|
+
b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][M.key] = `${M.label} is required`;
|
|
5353
5353
|
return;
|
|
5354
5354
|
}
|
|
5355
5355
|
if (M.fieldtype === "number" && S !== "" && S !== null && S !== void 0) {
|
|
5356
5356
|
const B = Number(S);
|
|
5357
|
-
isNaN(B) ? (b[
|
|
5357
|
+
isNaN(B) ? (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][M.key] = `${M.label} must be a valid number`) : (M.min !== void 0 && B < M.min && (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][M.key] = `${M.label} must be at least ${M.min}`), M.max !== void 0 && B > M.max && (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][M.key] = `${M.label} must not exceed ${M.max}`));
|
|
5358
5358
|
}
|
|
5359
5359
|
});
|
|
5360
5360
|
});
|
|
@@ -5429,8 +5429,8 @@ function vs({
|
|
|
5429
5429
|
className: "dynamic-config bg-white w-full h-[calc(100vh-450px)] overflow-y-auto",
|
|
5430
5430
|
style: { padding: "0px 20px 0px 0px" },
|
|
5431
5431
|
children: [
|
|
5432
|
-
|
|
5433
|
-
!
|
|
5432
|
+
v && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(pa, { size: "large" }) }),
|
|
5433
|
+
!v && D?.map((b, p) => {
|
|
5434
5434
|
const N = xs(b.type);
|
|
5435
5435
|
if (N && N !== "UnknownType")
|
|
5436
5436
|
return /* @__PURE__ */ e(
|
|
@@ -5441,7 +5441,7 @@ function vs({
|
|
|
5441
5441
|
updateHandler: x,
|
|
5442
5442
|
validationErrors: A
|
|
5443
5443
|
},
|
|
5444
|
-
|
|
5444
|
+
p
|
|
5445
5445
|
);
|
|
5446
5446
|
})
|
|
5447
5447
|
]
|
|
@@ -5477,12 +5477,12 @@ const Jl = ({
|
|
|
5477
5477
|
disableApi: s = !1
|
|
5478
5478
|
}) => {
|
|
5479
5479
|
const [i, l] = L(0), [m, o] = L(!1), {
|
|
5480
|
-
pageHeader:
|
|
5480
|
+
pageHeader: h = {},
|
|
5481
5481
|
appletHeader: u = {},
|
|
5482
|
-
breadcrumb:
|
|
5482
|
+
breadcrumb: w = [],
|
|
5483
5483
|
overview: y = {},
|
|
5484
5484
|
configuration: r = []
|
|
5485
|
-
} = t,
|
|
5485
|
+
} = t, v = le(() => r.map((f) => {
|
|
5486
5486
|
if (f.type === "section" && f.fields) {
|
|
5487
5487
|
const C = [...f.fields], I = C.findIndex((E) => E && E.key === "appkey");
|
|
5488
5488
|
if (I !== -1) {
|
|
@@ -5495,11 +5495,11 @@ const Jl = ({
|
|
|
5495
5495
|
placeholder: a,
|
|
5496
5496
|
disabled: !1
|
|
5497
5497
|
}, C.some((b) => b.key === "displayname")) {
|
|
5498
|
-
const b = C.findIndex((N) => N.key === "displayname"),
|
|
5498
|
+
const b = C.findIndex((N) => N.key === "displayname"), p = C[b] || {};
|
|
5499
5499
|
C[b] = {
|
|
5500
|
-
...
|
|
5501
|
-
default:
|
|
5502
|
-
placeholder:
|
|
5500
|
+
...p,
|
|
5501
|
+
default: p.default || p.value || a,
|
|
5502
|
+
placeholder: p.placeholder || "Enter display name"
|
|
5503
5503
|
};
|
|
5504
5504
|
} else {
|
|
5505
5505
|
const b = {
|
|
@@ -5525,8 +5525,8 @@ const Jl = ({
|
|
|
5525
5525
|
subHeading: "View app details and customize configurations to align with institutional requirements.",
|
|
5526
5526
|
isLeftArrow: !0,
|
|
5527
5527
|
onBackClick: () => window.history.back(),
|
|
5528
|
-
...
|
|
5529
|
-
}, g =
|
|
5528
|
+
...h
|
|
5529
|
+
}, g = w.map((f) => ({
|
|
5530
5530
|
label: f.text,
|
|
5531
5531
|
href: f.href || "#"
|
|
5532
5532
|
})), z = K(() => {
|
|
@@ -5579,8 +5579,8 @@ const Jl = ({
|
|
|
5579
5579
|
],
|
|
5580
5580
|
...y
|
|
5581
5581
|
}, Y = le(() => ({
|
|
5582
|
-
configuration:
|
|
5583
|
-
}), [
|
|
5582
|
+
configuration: v
|
|
5583
|
+
}), [v]), G = le(() => [
|
|
5584
5584
|
{ label: "Overview", content: x(U) },
|
|
5585
5585
|
{ label: "Configuration", content: /* @__PURE__ */ e(vs, { appid: a, configdata: Y, disableApi: s, onSave: F, onShowCancelModal: z, onCancel: O }) }
|
|
5586
5586
|
], [a, Y, s, F, z, O, U]);
|
|
@@ -5680,67 +5680,69 @@ const Jl = ({
|
|
|
5680
5680
|
allowEdit: l = !0,
|
|
5681
5681
|
allowDelete: m = !0,
|
|
5682
5682
|
allowReorder: o = !0,
|
|
5683
|
-
initialData:
|
|
5683
|
+
initialData: h = null
|
|
5684
5684
|
}) => {
|
|
5685
|
-
const [u,
|
|
5685
|
+
const [u, w] = L(null), [y, r] = L(""), [v, d] = L(() => Array.isArray(h) ? h : []), [g, z] = L(null), [A, F] = L(null), [O, P] = L("");
|
|
5686
5686
|
te(() => {
|
|
5687
|
-
Array.isArray(
|
|
5688
|
-
}, [
|
|
5689
|
-
const _ = (
|
|
5690
|
-
l && (
|
|
5687
|
+
Array.isArray(h) && d(h);
|
|
5688
|
+
}, [h]);
|
|
5689
|
+
const _ = (p) => {
|
|
5690
|
+
l && (w(p.id), r(p.categoryName || ""));
|
|
5691
5691
|
}, U = () => {
|
|
5692
5692
|
if (!i || u !== null) return;
|
|
5693
|
-
const
|
|
5694
|
-
d((
|
|
5695
|
-
...
|
|
5693
|
+
const N = (v.length > 0 ? Math.max(...v.map((k) => k.id)) : 0) + 1;
|
|
5694
|
+
d((k) => [
|
|
5695
|
+
...k,
|
|
5696
5696
|
{
|
|
5697
|
-
|
|
5697
|
+
_id: { $oid: N },
|
|
5698
5698
|
categoryName: "",
|
|
5699
5699
|
links: [],
|
|
5700
|
-
order: (
|
|
5700
|
+
order: (k.at(-1)?.order ?? 0) + 1,
|
|
5701
|
+
isProtected: !1,
|
|
5702
|
+
_class: "com.unifyed.model.Collection"
|
|
5701
5703
|
}
|
|
5702
|
-
]),
|
|
5704
|
+
]), w(N), r("");
|
|
5703
5705
|
}, Y = () => {
|
|
5704
|
-
u != null && (d((
|
|
5705
|
-
const
|
|
5706
|
-
return a?.(
|
|
5707
|
-
}),
|
|
5706
|
+
u != null && (d((p) => {
|
|
5707
|
+
const k = !collections.some(($) => $.id === u) ? p.filter(($) => $.id !== u) : p;
|
|
5708
|
+
return a?.(k), k;
|
|
5709
|
+
}), w(null), r(""));
|
|
5708
5710
|
}, G = () => {
|
|
5709
|
-
u == null || !y.trim() || (d((
|
|
5710
|
-
const N =
|
|
5711
|
+
u == null || !y.trim() || (d((p) => {
|
|
5712
|
+
const N = p.map((k) => k.id === u ? {
|
|
5711
5713
|
...k,
|
|
5712
5714
|
categoryName: y.trim()
|
|
5713
5715
|
} : k);
|
|
5714
5716
|
return a?.(N), N;
|
|
5715
|
-
}),
|
|
5716
|
-
}, T = (
|
|
5717
|
+
}), w(null), r(""));
|
|
5718
|
+
}, T = (p) => {
|
|
5717
5719
|
m && d((N) => {
|
|
5718
|
-
const k = N.filter(($) => $.id !==
|
|
5720
|
+
const k = N.filter(($) => $.id !== p.id);
|
|
5719
5721
|
return a?.(k), k;
|
|
5720
5722
|
});
|
|
5721
|
-
}, x = (
|
|
5722
|
-
if (!o || !N || !k || N === k) return
|
|
5723
|
-
const $ =
|
|
5724
|
-
if ($ === -1 || M === -1) return
|
|
5725
|
-
const S = [...
|
|
5723
|
+
}, x = (p, N, k) => {
|
|
5724
|
+
if (!o || !N || !k || N === k) return p;
|
|
5725
|
+
const $ = p.findIndex((j) => j.id === N), M = p.findIndex((j) => j.id === k);
|
|
5726
|
+
if ($ === -1 || M === -1) return p;
|
|
5727
|
+
const S = [...p], [B] = S.splice($, 1);
|
|
5726
5728
|
return S.splice(M, 0, B), S.map((j, R) => ({ ...j, order: R + 1 }));
|
|
5727
|
-
}, f = (
|
|
5728
|
-
o && (
|
|
5729
|
-
}, C = (
|
|
5730
|
-
g &&
|
|
5731
|
-
}, I = (
|
|
5732
|
-
|
|
5733
|
-
}, E = (
|
|
5734
|
-
|
|
5735
|
-
const k =
|
|
5729
|
+
}, f = (p, N) => {
|
|
5730
|
+
o && (p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", String(N)), z(N));
|
|
5731
|
+
}, C = (p) => {
|
|
5732
|
+
g && p !== A && F(p);
|
|
5733
|
+
}, I = (p) => {
|
|
5734
|
+
p.preventDefault();
|
|
5735
|
+
}, E = (p, N) => {
|
|
5736
|
+
p.preventDefault();
|
|
5737
|
+
const k = p.dataTransfer.getData("text/plain");
|
|
5736
5738
|
k && (d(($) => {
|
|
5737
5739
|
const M = x($, k, N);
|
|
5738
5740
|
return console.log("Reordered", M), a?.(M), M;
|
|
5739
5741
|
}), z(null), F(null));
|
|
5740
5742
|
}, D = () => {
|
|
5741
5743
|
z(null), F(null);
|
|
5742
|
-
}, b = Array.isArray(
|
|
5743
|
-
(
|
|
5744
|
+
}, b = Array.isArray(v) ? v.filter(
|
|
5745
|
+
(p) => p.categoryName?.toLowerCase().includes(O.toLowerCase())
|
|
5744
5746
|
) : [];
|
|
5745
5747
|
return /* @__PURE__ */ n("div", { className: `manage-collection-list ${t}`, children: [
|
|
5746
5748
|
/* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ n("div", { className: "w-1/2 flex justify-end", children: [
|
|
@@ -5766,14 +5768,14 @@ const Jl = ({
|
|
|
5766
5768
|
}
|
|
5767
5769
|
)
|
|
5768
5770
|
] }) }),
|
|
5769
|
-
/* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: b.map((
|
|
5770
|
-
const N = u ===
|
|
5771
|
+
/* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: b.map((p) => {
|
|
5772
|
+
const N = u === p.id, k = p?.links?.length ?? 0, $ = g === p.id, M = A === p.id && g !== p.id;
|
|
5771
5773
|
return /* @__PURE__ */ e(
|
|
5772
5774
|
"div",
|
|
5773
5775
|
{
|
|
5774
|
-
onDragEnter: () => C(
|
|
5776
|
+
onDragEnter: () => C(p.id),
|
|
5775
5777
|
onDragOver: I,
|
|
5776
|
-
onDrop: (S) => E(S,
|
|
5778
|
+
onDrop: (S) => E(S, p.id),
|
|
5777
5779
|
className: [
|
|
5778
5780
|
"flex items-center justify-between p-3 border rounded-2xl mb-3",
|
|
5779
5781
|
"border-gray-300",
|
|
@@ -5787,7 +5789,7 @@ const Jl = ({
|
|
|
5787
5789
|
type: "text",
|
|
5788
5790
|
className: "flex-1 h-10 px-3 max-w-[200px] border border-gray-300 rounded-2xl outline-none focus:ring-2 focus:ring-gray-800/20",
|
|
5789
5791
|
value: y,
|
|
5790
|
-
placeholder:
|
|
5792
|
+
placeholder: collections.some((S) => S.id === p.id) ? "Edit collection name" : "New collection name",
|
|
5791
5793
|
onChange: (S) => r(S.target.value),
|
|
5792
5794
|
onKeyDown: (S) => {
|
|
5793
5795
|
S.key === "Enter" && G(), S.key === "Escape" && Y();
|
|
@@ -5829,37 +5831,37 @@ const Jl = ({
|
|
|
5829
5831
|
"aria-label": "Drag to reorder",
|
|
5830
5832
|
className: "cursor-grab active:cursor-grabbing p-1 -m-1 rounded-md hover:bg-gray-50",
|
|
5831
5833
|
draggable: !0,
|
|
5832
|
-
onDragStart: (S) => f(S,
|
|
5834
|
+
onDragStart: (S) => f(S, p.id),
|
|
5833
5835
|
onDragEnd: D,
|
|
5834
5836
|
children: /* @__PURE__ */ e(vt, {})
|
|
5835
5837
|
}
|
|
5836
5838
|
),
|
|
5837
|
-
/* @__PURE__ */ e("span", { children:
|
|
5839
|
+
/* @__PURE__ */ e("span", { children: p.categoryName })
|
|
5838
5840
|
] }),
|
|
5839
5841
|
/* @__PURE__ */ n("div", { className: "flex gap-2 items-center", children: [
|
|
5840
|
-
|
|
5842
|
+
p.protected ? /* @__PURE__ */ e("span", { className: "text-sm text-gray-600 cursor-default", children: p.qlAppName }) : /* @__PURE__ */ e("span", { className: "text-sm text-blue-600 cursor-default", children: `${k} ${k === 1 ? "link" : "links"}` }),
|
|
5841
5843
|
l && /* @__PURE__ */ e(
|
|
5842
5844
|
"button",
|
|
5843
5845
|
{
|
|
5844
5846
|
className: "cursor-pointer",
|
|
5845
|
-
onClick: () => _(
|
|
5846
|
-
"aria-label": `Edit ${
|
|
5847
|
+
onClick: () => _(p),
|
|
5848
|
+
"aria-label": `Edit ${p.categoryName}`,
|
|
5847
5849
|
children: /* @__PURE__ */ e(pr, { color: "#767676" })
|
|
5848
5850
|
}
|
|
5849
5851
|
),
|
|
5850
5852
|
m && /* @__PURE__ */ e(
|
|
5851
5853
|
"span",
|
|
5852
5854
|
{
|
|
5853
|
-
className: k === 0 && !
|
|
5854
|
-
title: k === 0 && !
|
|
5855
|
-
onClick: k === 0 ? () => T(
|
|
5855
|
+
className: k === 0 && !p.protected ? "cursor-pointer" : "cursor-not-allowed",
|
|
5856
|
+
title: k === 0 && !p.protected ? "Delete" : "Cannot delete this collection",
|
|
5857
|
+
onClick: k === 0 ? () => T(p) : null,
|
|
5856
5858
|
children: /* @__PURE__ */ e(Je, { color: k === 0 ? "#767676" : "#C2C2C2" })
|
|
5857
5859
|
}
|
|
5858
5860
|
)
|
|
5859
5861
|
] })
|
|
5860
5862
|
] })
|
|
5861
5863
|
},
|
|
5862
|
-
|
|
5864
|
+
p.id
|
|
5863
5865
|
);
|
|
5864
5866
|
}) })
|
|
5865
5867
|
] });
|
|
@@ -5944,13 +5946,13 @@ const Mt = () => {
|
|
|
5944
5946
|
// preferred
|
|
5945
5947
|
onAdd: m,
|
|
5946
5948
|
onFilterOpen: o,
|
|
5947
|
-
addBtnText:
|
|
5949
|
+
addBtnText: h = "Add",
|
|
5948
5950
|
// Feature toggles
|
|
5949
5951
|
showSearch: u = !0,
|
|
5950
|
-
showColumnChooser:
|
|
5952
|
+
showColumnChooser: w = !0,
|
|
5951
5953
|
showFilter: y = !1,
|
|
5952
5954
|
showPrint: r = !1,
|
|
5953
|
-
showExcel:
|
|
5955
|
+
showExcel: v = !1,
|
|
5954
5956
|
showPdf: d = !1,
|
|
5955
5957
|
showRefresh: g = !1,
|
|
5956
5958
|
showAdd: z = !1,
|
|
@@ -5987,19 +5989,19 @@ const Mt = () => {
|
|
|
5987
5989
|
},
|
|
5988
5990
|
[]
|
|
5989
5991
|
// no external deps; reads ref at call time
|
|
5990
|
-
),
|
|
5992
|
+
), p = K(
|
|
5991
5993
|
(N, k) => {
|
|
5992
5994
|
const $ = T();
|
|
5993
5995
|
if ($)
|
|
5994
5996
|
switch (N) {
|
|
5995
5997
|
case "ColumnChooser":
|
|
5996
|
-
|
|
5998
|
+
w && (console.log("openColumnChooser", k), k ? b(k) : $.openColumnChooser?.()), console.log("openColumnChooser out", k);
|
|
5997
5999
|
break;
|
|
5998
6000
|
case "Print":
|
|
5999
6001
|
r && $.print?.();
|
|
6000
6002
|
break;
|
|
6001
6003
|
case "Excel":
|
|
6002
|
-
|
|
6004
|
+
v && $.excelExport?.({ fileName: I });
|
|
6003
6005
|
break;
|
|
6004
6006
|
case "Pdf":
|
|
6005
6007
|
d && $.pdfExport?.({ fileName: E });
|
|
@@ -6009,7 +6011,7 @@ const Mt = () => {
|
|
|
6009
6011
|
break;
|
|
6010
6012
|
}
|
|
6011
6013
|
},
|
|
6012
|
-
[
|
|
6014
|
+
[w, r, v, d, g, I, E, F, b]
|
|
6013
6015
|
);
|
|
6014
6016
|
return /* @__PURE__ */ n("div", { className: "flex items-center flex-wrap justify-between w-full px-4 py-2 bg-white border border-gray-200 rounded-t-2xl mb-0", children: [
|
|
6015
6017
|
/* @__PURE__ */ n("div", { className: "flex flex-col", children: [
|
|
@@ -6036,7 +6038,7 @@ const Mt = () => {
|
|
|
6036
6038
|
) }),
|
|
6037
6039
|
/* @__PURE__ */ n("div", { className: "flex gap-3", children: [
|
|
6038
6040
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
|
|
6039
|
-
|
|
6041
|
+
w && // <UnifyedCoreButton
|
|
6040
6042
|
// icon={<Columns03IconSvg width={20} height={20} color="red" strokeWidth={2} />}
|
|
6041
6043
|
// onClick={(e) => handleAction("ColumnChooser", e)}
|
|
6042
6044
|
// size="small"
|
|
@@ -6048,7 +6050,7 @@ const Mt = () => {
|
|
|
6048
6050
|
"button",
|
|
6049
6051
|
{
|
|
6050
6052
|
"aria-label": "Column Chooser",
|
|
6051
|
-
onClick: (N) =>
|
|
6053
|
+
onClick: (N) => p("ColumnChooser", N),
|
|
6052
6054
|
title: "Choose Columns",
|
|
6053
6055
|
className: "p-1.5 text-gray-500 rounded-md border border-[#1e1e1e] hover:text-gray-600",
|
|
6054
6056
|
children: /* @__PURE__ */ e($n, { width: 16, height: 16, color: "#767676" })
|
|
@@ -6076,18 +6078,18 @@ const Mt = () => {
|
|
|
6076
6078
|
se,
|
|
6077
6079
|
{
|
|
6078
6080
|
icon: gr,
|
|
6079
|
-
onClick: () =>
|
|
6081
|
+
onClick: () => p("Print"),
|
|
6080
6082
|
ariaLabel: "Print",
|
|
6081
6083
|
size: "small",
|
|
6082
6084
|
category: "secondary",
|
|
6083
6085
|
title: "Print Grid"
|
|
6084
6086
|
}
|
|
6085
6087
|
),
|
|
6086
|
-
|
|
6088
|
+
v && /* @__PURE__ */ e(
|
|
6087
6089
|
se,
|
|
6088
6090
|
{
|
|
6089
6091
|
icon: br,
|
|
6090
|
-
onClick: () =>
|
|
6092
|
+
onClick: () => p("Excel"),
|
|
6091
6093
|
ariaLabel: "Excel Download",
|
|
6092
6094
|
size: "small",
|
|
6093
6095
|
category: "secondary",
|
|
@@ -6098,7 +6100,7 @@ const Mt = () => {
|
|
|
6098
6100
|
se,
|
|
6099
6101
|
{
|
|
6100
6102
|
icon: fr,
|
|
6101
|
-
onClick: () =>
|
|
6103
|
+
onClick: () => p("Pdf"),
|
|
6102
6104
|
ariaLabel: "PDF Download",
|
|
6103
6105
|
size: "small",
|
|
6104
6106
|
category: "secondary",
|
|
@@ -6109,7 +6111,7 @@ const Mt = () => {
|
|
|
6109
6111
|
se,
|
|
6110
6112
|
{
|
|
6111
6113
|
icon: yr,
|
|
6112
|
-
onClick: () =>
|
|
6114
|
+
onClick: () => p("Refresh"),
|
|
6113
6115
|
ariaLabel: "Refresh",
|
|
6114
6116
|
size: "small",
|
|
6115
6117
|
category: "secondary",
|
|
@@ -6120,12 +6122,12 @@ const Mt = () => {
|
|
|
6120
6122
|
z && m && /* @__PURE__ */ e(
|
|
6121
6123
|
se,
|
|
6122
6124
|
{
|
|
6123
|
-
label:
|
|
6125
|
+
label: h,
|
|
6124
6126
|
icon: xr,
|
|
6125
6127
|
onClick: m,
|
|
6126
6128
|
size: "small",
|
|
6127
6129
|
ariaLabel: "Add New",
|
|
6128
|
-
title:
|
|
6130
|
+
title: h
|
|
6129
6131
|
}
|
|
6130
6132
|
)
|
|
6131
6133
|
] })
|
|
@@ -6142,12 +6144,12 @@ function Ql(t) {
|
|
|
6142
6144
|
// pageSize = 10,
|
|
6143
6145
|
allowPaging: m = !0,
|
|
6144
6146
|
allowSorting: o = !0,
|
|
6145
|
-
allowFiltering:
|
|
6147
|
+
allowFiltering: h = !1,
|
|
6146
6148
|
allowGrouping: u = !1,
|
|
6147
|
-
allowReordering:
|
|
6149
|
+
allowReordering: w = !0,
|
|
6148
6150
|
allowResizing: y = !0,
|
|
6149
6151
|
allowExcelExport: r = !1,
|
|
6150
|
-
allowPdfExport:
|
|
6152
|
+
allowPdfExport: v = !1,
|
|
6151
6153
|
showColumnChooser: d = !1,
|
|
6152
6154
|
enableSearchApi: g = !1,
|
|
6153
6155
|
height: z = "600",
|
|
@@ -6164,10 +6166,10 @@ function Ql(t) {
|
|
|
6164
6166
|
pageSettings: f,
|
|
6165
6167
|
sortSettings: C,
|
|
6166
6168
|
...I
|
|
6167
|
-
} = T || {}, [E, D] = ae.useState(f?.page || 1), [b,
|
|
6169
|
+
} = T || {}, [E, D] = ae.useState(f?.page || 1), [b, p] = ae.useState(C?.pageSize || 20), [N, k] = ae.useState(C?.sortKey || "updatedDate"), [$, M] = ae.useState(C?.direction || "Descending"), S = le(() => {
|
|
6168
6170
|
const V = [Kr];
|
|
6169
|
-
return o && V.push(en),
|
|
6170
|
-
}, [o,
|
|
6171
|
+
return o && V.push(en), h && V.push(tn), u && V.push(an), g && V.push(rn), r && V.push(nn), v && V.push(sn), d && V.push(ln), y && V.push(on), w && V.push(cn), V.push(dn), V;
|
|
6172
|
+
}, [o, h, u, g, r, v, d, y, w]), B = le(() => {
|
|
6171
6173
|
const V = () => x.current, re = (W, ve) => {
|
|
6172
6174
|
!ve && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${W} requested but related service/feature is disabled.`);
|
|
6173
6175
|
};
|
|
@@ -6186,7 +6188,7 @@ function Ql(t) {
|
|
|
6186
6188
|
re("excelExport()", r), V()?.excelExport?.(W);
|
|
6187
6189
|
},
|
|
6188
6190
|
pdfExport: (W) => {
|
|
6189
|
-
re("pdfExport()",
|
|
6191
|
+
re("pdfExport()", v), V()?.pdfExport?.(W);
|
|
6190
6192
|
},
|
|
6191
6193
|
openColumnChooser: (W, ve) => {
|
|
6192
6194
|
re("openColumnChooser()", d), V()?.columnChooserModule?.openColumnChooser?.(W, ve);
|
|
@@ -6218,7 +6220,7 @@ function Ql(t) {
|
|
|
6218
6220
|
}, q = (V) => {
|
|
6219
6221
|
setTimeout(() => {
|
|
6220
6222
|
x?.current?.hideSpinner();
|
|
6221
|
-
}, 1e3), V.requestType === "paging" && (D(V.currentPage),
|
|
6223
|
+
}, 1e3), V.requestType === "paging" && (D(V.currentPage), p(V.pageSize)), V.requestType === "sorting" && (k(V.columnName || "updatedDate"), M(V.direction === "Ascending" ? "ASC" : "DESC")), P && P(R(V), V);
|
|
6222
6224
|
}, X = (V) => {
|
|
6223
6225
|
typeof Y == "function" && Y(V?.rowData, V);
|
|
6224
6226
|
}, xe = () => {
|
|
@@ -6280,9 +6282,9 @@ function Ql(t) {
|
|
|
6280
6282
|
height: z,
|
|
6281
6283
|
allowPaging: m,
|
|
6282
6284
|
allowSorting: o,
|
|
6283
|
-
allowFiltering:
|
|
6285
|
+
allowFiltering: h,
|
|
6284
6286
|
allowGrouping: u,
|
|
6285
|
-
allowReordering:
|
|
6287
|
+
allowReordering: w,
|
|
6286
6288
|
allowResizing: y,
|
|
6287
6289
|
showColumnChooser: d,
|
|
6288
6290
|
selectionSettings: A,
|
|
@@ -6335,14 +6337,14 @@ function oe({
|
|
|
6335
6337
|
onSelect: l,
|
|
6336
6338
|
identity: m = "_id",
|
|
6337
6339
|
details: o = {},
|
|
6338
|
-
...
|
|
6340
|
+
...h
|
|
6339
6341
|
}) {
|
|
6340
|
-
const u = We(),
|
|
6342
|
+
const u = We(), w = Ns(h, m), y = (v) => {
|
|
6341
6343
|
l?.({
|
|
6342
|
-
key:
|
|
6343
|
-
checked:
|
|
6344
|
+
key: w,
|
|
6345
|
+
checked: v.target.checked,
|
|
6344
6346
|
details: o,
|
|
6345
|
-
props:
|
|
6347
|
+
props: h
|
|
6346
6348
|
});
|
|
6347
6349
|
}, r = i === "top-right" ? "top-3 right-3" : "top-3 left-3";
|
|
6348
6350
|
return /* @__PURE__ */ n(
|
|
@@ -6382,13 +6384,13 @@ function ks({
|
|
|
6382
6384
|
// content
|
|
6383
6385
|
title: m = "Activity",
|
|
6384
6386
|
group: o = "Global",
|
|
6385
|
-
moreGroupsLabel:
|
|
6387
|
+
moreGroupsLabel: h = "+ 5 more",
|
|
6386
6388
|
author: u = "Judith Black",
|
|
6387
|
-
timeLabel:
|
|
6389
|
+
timeLabel: w = "Just now",
|
|
6388
6390
|
imageUrl: y = "https://images.unsplash.com/photo-1469980098053-382eb10ba017?q=80&w=1200&auto=format&fit=crop",
|
|
6389
6391
|
description: r = "Columbia University is a prestigious Ivy League institution located in the heart of New York City.",
|
|
6390
6392
|
// spread remaining props (_id, instanceId, etc.)
|
|
6391
|
-
...
|
|
6393
|
+
...v
|
|
6392
6394
|
}) {
|
|
6393
6395
|
const d = ce(t), g = de[d];
|
|
6394
6396
|
return /* @__PURE__ */ n(
|
|
@@ -6400,31 +6402,31 @@ function ks({
|
|
|
6400
6402
|
onSelect: i,
|
|
6401
6403
|
identity: l,
|
|
6402
6404
|
details: { type: "activity", title: m, group: o, author: u },
|
|
6403
|
-
...
|
|
6405
|
+
...v,
|
|
6404
6406
|
children: [
|
|
6405
6407
|
/* @__PURE__ */ e("div", { className: "flex items-start justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${g.title} ml-3`, children: m }) }),
|
|
6406
6408
|
/* @__PURE__ */ n("div", { className: `text-zinc-500 dark:text-zinc-400 ${g.meta}`, children: [
|
|
6407
6409
|
"Posted in ",
|
|
6408
6410
|
/* @__PURE__ */ e("span", { className: "font-medium", children: "Global" }),
|
|
6409
|
-
|
|
6411
|
+
h ? /* @__PURE__ */ n(ee, { children: [
|
|
6410
6412
|
",",
|
|
6411
6413
|
" ",
|
|
6412
6414
|
/* @__PURE__ */ e(
|
|
6413
6415
|
"span",
|
|
6414
6416
|
{
|
|
6415
6417
|
className: "font-medium text-indigo-700",
|
|
6416
|
-
children:
|
|
6418
|
+
children: h
|
|
6417
6419
|
}
|
|
6418
6420
|
)
|
|
6419
6421
|
] }) : null,
|
|
6420
6422
|
/* @__PURE__ */ e("span", { "aria-hidden": "true", className: "px-2", children: "•" }),
|
|
6421
|
-
/* @__PURE__ */ e("span", { children:
|
|
6423
|
+
/* @__PURE__ */ e("span", { children: w })
|
|
6422
6424
|
] }),
|
|
6423
6425
|
/* @__PURE__ */ n("div", { className: "mt-2 flex items-center gap-3", children: [
|
|
6424
6426
|
/* @__PURE__ */ e(Ce, { name: "John", size: "medium" }),
|
|
6425
6427
|
/* @__PURE__ */ n("div", { className: "leading-tight", children: [
|
|
6426
6428
|
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-800 dark:text-zinc-100", children: u }),
|
|
6427
|
-
/* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${g.meta}`, children:
|
|
6429
|
+
/* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${g.meta}`, children: w })
|
|
6428
6430
|
] })
|
|
6429
6431
|
] }),
|
|
6430
6432
|
/* @__PURE__ */ n("p", { className: "mt-2 text-zinc-700 dark:text-zinc-300", children: [
|
|
@@ -6505,11 +6507,11 @@ function $s({
|
|
|
6505
6507
|
title: m = "Communities",
|
|
6506
6508
|
activeTab: o = "joined",
|
|
6507
6509
|
// "joined" | "suggested"
|
|
6508
|
-
items:
|
|
6510
|
+
items: h = Ss,
|
|
6509
6511
|
// spread for identity (_id/instanceId/etc)
|
|
6510
6512
|
...u
|
|
6511
6513
|
}) {
|
|
6512
|
-
const
|
|
6514
|
+
const w = ce(t), y = de[w], r = Ds[w], v = (d) => `px-1 pb-2 text-sm font-medium ${d === o ? "text-zinc-900 dark:text-zinc-100 border-b-2" : "text-zinc-500 dark:text-zinc-400"}`;
|
|
6513
6515
|
return /* @__PURE__ */ n(
|
|
6514
6516
|
oe,
|
|
6515
6517
|
{
|
|
@@ -6518,7 +6520,7 @@ function $s({
|
|
|
6518
6520
|
checkboxPosition: s,
|
|
6519
6521
|
onSelect: i,
|
|
6520
6522
|
identity: l,
|
|
6521
|
-
details: { type: "communities", title: m, activeTab: o, count:
|
|
6523
|
+
details: { type: "communities", title: m, activeTab: o, count: h?.length ?? 0 },
|
|
6522
6524
|
...u,
|
|
6523
6525
|
children: [
|
|
6524
6526
|
/* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
|
|
@@ -6536,19 +6538,19 @@ function $s({
|
|
|
6536
6538
|
/* @__PURE__ */ e(
|
|
6537
6539
|
"span",
|
|
6538
6540
|
{
|
|
6539
|
-
className: `${
|
|
6541
|
+
className: `${v("joined")} ${o === "joined" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
|
|
6540
6542
|
children: "Joined"
|
|
6541
6543
|
}
|
|
6542
6544
|
),
|
|
6543
6545
|
/* @__PURE__ */ e(
|
|
6544
6546
|
"span",
|
|
6545
6547
|
{
|
|
6546
|
-
className: `${
|
|
6548
|
+
className: `${v("suggested")} ${o === "suggested" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
|
|
6547
6549
|
children: "Suggested"
|
|
6548
6550
|
}
|
|
6549
6551
|
)
|
|
6550
6552
|
] }),
|
|
6551
|
-
/* @__PURE__ */ e("div", { className: "grid gap-4 md:gap-5", children:
|
|
6553
|
+
/* @__PURE__ */ e("div", { className: "grid gap-4 md:gap-5", children: h.map((d) => /* @__PURE__ */ e(
|
|
6552
6554
|
"div",
|
|
6553
6555
|
{
|
|
6554
6556
|
className: "rounded-2xl border border-zinc-200 dark:border-zinc-800 p-3 md:p-4",
|
|
@@ -6691,22 +6693,22 @@ function Fs({
|
|
|
6691
6693
|
title: m = "News",
|
|
6692
6694
|
items: o = Ts,
|
|
6693
6695
|
// spread for identity fields: _id / id / instanceId etc.
|
|
6694
|
-
...
|
|
6696
|
+
...h
|
|
6695
6697
|
}) {
|
|
6696
|
-
const u = ce(t),
|
|
6698
|
+
const u = ce(t), w = de[u], y = As[u];
|
|
6697
6699
|
return /* @__PURE__ */ n(
|
|
6698
6700
|
oe,
|
|
6699
6701
|
{
|
|
6700
|
-
className: `flex flex-col ${
|
|
6702
|
+
className: `flex flex-col ${w.card} ${y.wrap || ""}`,
|
|
6701
6703
|
showCheckbox: a,
|
|
6702
6704
|
checkboxPosition: s,
|
|
6703
6705
|
onSelect: i,
|
|
6704
6706
|
identity: l,
|
|
6705
6707
|
details: { type: "news", title: m, count: o?.length ?? 0 },
|
|
6706
|
-
...
|
|
6708
|
+
...h,
|
|
6707
6709
|
children: [
|
|
6708
6710
|
/* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
|
|
6709
|
-
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${
|
|
6711
|
+
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${w.title}`, children: m }),
|
|
6710
6712
|
/* @__PURE__ */ e("span", { className: "text-sm text-indigo-700 cursor-default select-none", children: "View All" })
|
|
6711
6713
|
] }),
|
|
6712
6714
|
u === "lg" ? (
|
|
@@ -6806,16 +6808,16 @@ function Ps({
|
|
|
6806
6808
|
identity: l = "_id",
|
|
6807
6809
|
title: m = "Campus Map",
|
|
6808
6810
|
campusName: o = "Morningside Heights Campus",
|
|
6809
|
-
filters:
|
|
6811
|
+
filters: h = Es,
|
|
6810
6812
|
activeFilter: u = "All",
|
|
6811
6813
|
// NEW: iframe controls
|
|
6812
|
-
mapQuery:
|
|
6814
|
+
mapQuery: w = "Florida",
|
|
6813
6815
|
zoom: y = 12,
|
|
6814
6816
|
mapUrl: r,
|
|
6815
6817
|
// optional full embed URL override
|
|
6816
|
-
...
|
|
6818
|
+
...v
|
|
6817
6819
|
}) {
|
|
6818
|
-
const d = ce(t), g = de[d], z = Rs[d], A = r || Is(
|
|
6820
|
+
const d = ce(t), g = de[d], z = Rs[d], A = r || Is(w, y);
|
|
6819
6821
|
return /* @__PURE__ */ e(
|
|
6820
6822
|
oe,
|
|
6821
6823
|
{
|
|
@@ -6824,8 +6826,8 @@ function Ps({
|
|
|
6824
6826
|
checkboxPosition: s,
|
|
6825
6827
|
onSelect: i,
|
|
6826
6828
|
identity: l,
|
|
6827
|
-
details: { type: "campus-map", title: m, campusName: o, activeFilter: u, mapQuery:
|
|
6828
|
-
...
|
|
6829
|
+
details: { type: "campus-map", title: m, campusName: o, activeFilter: u, mapQuery: w, zoom: y },
|
|
6830
|
+
...v,
|
|
6829
6831
|
children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${z.mapH}`, children: [
|
|
6830
6832
|
/* @__PURE__ */ e(
|
|
6831
6833
|
"iframe",
|
|
@@ -6849,7 +6851,7 @@ function Ps({
|
|
|
6849
6851
|
/* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
|
|
6850
6852
|
] })
|
|
6851
6853
|
] }),
|
|
6852
|
-
/* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${z.chipGap} overflow-x-auto scrollbar-none`, children:
|
|
6854
|
+
/* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${z.chipGap} overflow-x-auto scrollbar-none`, children: h.map((F) => /* @__PURE__ */ e(Os, { label: F, active: F === u, size: d }, F)) }) }),
|
|
6853
6855
|
/* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-28 md:top-24 pointer-events-none", children: /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 px-4 ${z.searchH}`, children: [
|
|
6854
6856
|
/* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", "aria-hidden": "true", className: "opacity-60", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M15.5 14h-.79l-.28-.27a6.471 6.471 0 001.48-4.23C15.91 6.01 13.4 3.5 10.45 3.5S5 6.01 5 9.5 7.5 15.5 10.45 15.5c1.61 0 3.09-.59 4.23-1.48l.27.28v.79l4.25 4.25c.41.41 1.07.41 1.48 0s.41-1.07 0-1.48L15.5 14Zm-5.05 0C8.01 14 6 11.99 6 9.5S8.01 5 10.45 5s4.45 2.01 4.45 4.5-2.01 4.5-4.45 4.5Z" }) }),
|
|
6855
6857
|
/* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
|
|
@@ -7018,16 +7020,16 @@ function js({
|
|
|
7018
7020
|
identity: l = "_id",
|
|
7019
7021
|
title: m = "Upcoming Events",
|
|
7020
7022
|
events: o = Ms,
|
|
7021
|
-
selectedIndex:
|
|
7023
|
+
selectedIndex: h = 0,
|
|
7022
7024
|
...u
|
|
7023
7025
|
}) {
|
|
7024
|
-
const [
|
|
7026
|
+
const [w, y] = L(h), r = ce(t), v = de[r], d = Ls[r], g = o[w] || o[0], z = (F, O) => {
|
|
7025
7027
|
y(O), i?.(F);
|
|
7026
7028
|
}, A = r === "lg";
|
|
7027
7029
|
return /* @__PURE__ */ n(
|
|
7028
7030
|
oe,
|
|
7029
7031
|
{
|
|
7030
|
-
className: `flex flex-col ${
|
|
7032
|
+
className: `flex flex-col ${v.card} ${d.wrap}`,
|
|
7031
7033
|
showCheckbox: a,
|
|
7032
7034
|
checkboxPosition: s,
|
|
7033
7035
|
onSelect: i,
|
|
@@ -7036,7 +7038,7 @@ function js({
|
|
|
7036
7038
|
...u,
|
|
7037
7039
|
children: [
|
|
7038
7040
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between mb-4", children: [
|
|
7039
|
-
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${
|
|
7041
|
+
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }),
|
|
7040
7042
|
/* @__PURE__ */ e("button", { className: "text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" })
|
|
7041
7043
|
] }),
|
|
7042
7044
|
A ? (
|
|
@@ -7047,7 +7049,7 @@ function js({
|
|
|
7047
7049
|
{
|
|
7048
7050
|
ev: F,
|
|
7049
7051
|
sizeMeta: d,
|
|
7050
|
-
isSelected: O ===
|
|
7052
|
+
isSelected: O === w,
|
|
7051
7053
|
onClick: (P) => z(P, O)
|
|
7052
7054
|
},
|
|
7053
7055
|
F._id || F.id || O
|
|
@@ -7061,7 +7063,7 @@ function js({
|
|
|
7061
7063
|
{
|
|
7062
7064
|
ev: F,
|
|
7063
7065
|
sizeMeta: d,
|
|
7064
|
-
isSelected: O ===
|
|
7066
|
+
isSelected: O === w,
|
|
7065
7067
|
onClick: (P) => z(P, O)
|
|
7066
7068
|
},
|
|
7067
7069
|
F._id || F.id || O
|
|
@@ -7179,7 +7181,7 @@ const _s = [
|
|
|
7179
7181
|
function Gs({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin: m }) {
|
|
7180
7182
|
const o = (u) => {
|
|
7181
7183
|
u.stopPropagation(), l?.(t);
|
|
7182
|
-
},
|
|
7184
|
+
}, h = (u) => {
|
|
7183
7185
|
u.stopPropagation(), m?.(t);
|
|
7184
7186
|
};
|
|
7185
7187
|
return /* @__PURE__ */ n(
|
|
@@ -7200,7 +7202,7 @@ function Gs({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin
|
|
|
7200
7202
|
/* @__PURE__ */ e(
|
|
7201
7203
|
"button",
|
|
7202
7204
|
{
|
|
7203
|
-
onClick:
|
|
7205
|
+
onClick: h,
|
|
7204
7206
|
className: "p-1 rounded hover:bg-zinc-200 dark:hover:bg-zinc-700 transition-colors duration-200",
|
|
7205
7207
|
children: t.pinned ? /* @__PURE__ */ e(kr, { className: "h-4 w-4 fill-blue-500 text-blue-500" }) : /* @__PURE__ */ e(Cr, { className: "h-4 w-4 text-zinc-400 group-hover:text-blue-500" })
|
|
7206
7208
|
}
|
|
@@ -7233,19 +7235,19 @@ function qs({
|
|
|
7233
7235
|
identity: l = "_id",
|
|
7234
7236
|
title: m = "0365 Mails",
|
|
7235
7237
|
emails: o = _s,
|
|
7236
|
-
selectedIndex:
|
|
7238
|
+
selectedIndex: h = 0,
|
|
7237
7239
|
onStar: u,
|
|
7238
|
-
onPin:
|
|
7240
|
+
onPin: w,
|
|
7239
7241
|
...y
|
|
7240
7242
|
}) {
|
|
7241
|
-
const [r,
|
|
7242
|
-
|
|
7243
|
+
const [r, v] = L(h), d = ce(t), g = de[d], z = Us[d], A = (P, _) => {
|
|
7244
|
+
v(_), i?.(P);
|
|
7243
7245
|
}, F = (P) => {
|
|
7244
7246
|
const _ = { ...P, starred: !P.starred };
|
|
7245
7247
|
u?.(_);
|
|
7246
7248
|
}, O = (P) => {
|
|
7247
7249
|
const _ = { ...P, pinned: !P.pinned };
|
|
7248
|
-
|
|
7250
|
+
w?.(_);
|
|
7249
7251
|
};
|
|
7250
7252
|
return /* @__PURE__ */ n(
|
|
7251
7253
|
oe,
|
|
@@ -7487,16 +7489,16 @@ function Xs({
|
|
|
7487
7489
|
identity: l = "_id",
|
|
7488
7490
|
title: m = "Directory",
|
|
7489
7491
|
contacts: o = Ys,
|
|
7490
|
-
selectedIndex:
|
|
7492
|
+
selectedIndex: h = 0,
|
|
7491
7493
|
...u
|
|
7492
7494
|
}) {
|
|
7493
|
-
const [
|
|
7495
|
+
const [w, y] = L(h), r = ce(t), v = de[r], d = Ws[r], g = (F, O) => {
|
|
7494
7496
|
y(O), i?.(F);
|
|
7495
|
-
}, z = o[
|
|
7497
|
+
}, z = o[w] || o[0], A = d.layout === "split";
|
|
7496
7498
|
return /* @__PURE__ */ n(
|
|
7497
7499
|
oe,
|
|
7498
7500
|
{
|
|
7499
|
-
className: `flex flex-col ${
|
|
7501
|
+
className: `flex flex-col ${v.card} ${d.wrap}`,
|
|
7500
7502
|
showCheckbox: a,
|
|
7501
7503
|
checkboxPosition: s,
|
|
7502
7504
|
onSelect: i,
|
|
@@ -7504,7 +7506,7 @@ function Xs({
|
|
|
7504
7506
|
details: { type: "directory", title: m, count: o?.length ?? 0 },
|
|
7505
7507
|
...u,
|
|
7506
7508
|
children: [
|
|
7507
|
-
/* @__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 ${
|
|
7509
|
+
/* @__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 ${v.title}`, children: m }) }),
|
|
7508
7510
|
/* @__PURE__ */ e(Hs, { sizeMeta: d }),
|
|
7509
7511
|
A ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
|
|
7510
7512
|
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((F, O) => /* @__PURE__ */ e(
|
|
@@ -7512,7 +7514,7 @@ function Xs({
|
|
|
7512
7514
|
{
|
|
7513
7515
|
contact: F,
|
|
7514
7516
|
sizeMeta: d,
|
|
7515
|
-
isSelected: O ===
|
|
7517
|
+
isSelected: O === w,
|
|
7516
7518
|
onClick: (P) => g(P, O)
|
|
7517
7519
|
},
|
|
7518
7520
|
F._id || F.id || O
|
|
@@ -7531,7 +7533,7 @@ function Xs({
|
|
|
7531
7533
|
{
|
|
7532
7534
|
contact: F,
|
|
7533
7535
|
sizeMeta: d,
|
|
7534
|
-
isSelected: O ===
|
|
7536
|
+
isSelected: O === w,
|
|
7535
7537
|
onClick: (P) => g(P, O)
|
|
7536
7538
|
},
|
|
7537
7539
|
F._id || F.id || O
|
|
@@ -7621,9 +7623,9 @@ function Ks({
|
|
|
7621
7623
|
// content
|
|
7622
7624
|
title: m = "Account Summary",
|
|
7623
7625
|
termLabel: o = "Spring 2024",
|
|
7624
|
-
balance:
|
|
7626
|
+
balance: h = 3e3,
|
|
7625
7627
|
totalCharges: u = 4440,
|
|
7626
|
-
totalPayments:
|
|
7628
|
+
totalPayments: w = 1568,
|
|
7627
7629
|
transactions: y = [
|
|
7628
7630
|
{
|
|
7629
7631
|
id: "t1",
|
|
@@ -7642,7 +7644,7 @@ function Ks({
|
|
|
7642
7644
|
],
|
|
7643
7645
|
...r
|
|
7644
7646
|
}) {
|
|
7645
|
-
const
|
|
7647
|
+
const v = ce(t), d = de[v], g = Zs[v];
|
|
7646
7648
|
return /* @__PURE__ */ n(
|
|
7647
7649
|
oe,
|
|
7648
7650
|
{
|
|
@@ -7651,7 +7653,7 @@ function Ks({
|
|
|
7651
7653
|
checkboxPosition: s,
|
|
7652
7654
|
onSelect: i,
|
|
7653
7655
|
identity: l,
|
|
7654
|
-
details: { type: "account-summary", termLabel: o, balance:
|
|
7656
|
+
details: { type: "account-summary", termLabel: o, balance: h, totalCharges: u, totalPayments: w },
|
|
7655
7657
|
...r,
|
|
7656
7658
|
children: [
|
|
7657
7659
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
@@ -7664,7 +7666,7 @@ function Ks({
|
|
|
7664
7666
|
/* @__PURE__ */ n("div", { className: g.topGrid || g.grid, children: [
|
|
7665
7667
|
/* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
7666
7668
|
/* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Account Balance" }),
|
|
7667
|
-
/* @__PURE__ */ e("div", { className: g.balance, children: Se(
|
|
7669
|
+
/* @__PURE__ */ e("div", { className: g.balance, children: Se(h) }),
|
|
7668
7670
|
!g.showTxns && /* @__PURE__ */ n("div", { className: g.totalsRow, children: [
|
|
7669
7671
|
/* @__PURE__ */ n("div", { children: [
|
|
7670
7672
|
/* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Charges" }),
|
|
@@ -7672,7 +7674,7 @@ function Ks({
|
|
|
7672
7674
|
] }),
|
|
7673
7675
|
/* @__PURE__ */ n("div", { children: [
|
|
7674
7676
|
/* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Payments" }),
|
|
7675
|
-
/* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: Se(
|
|
7677
|
+
/* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: Se(w) })
|
|
7676
7678
|
] })
|
|
7677
7679
|
] })
|
|
7678
7680
|
] }),
|
|
@@ -7684,7 +7686,7 @@ function Ks({
|
|
|
7684
7686
|
] }),
|
|
7685
7687
|
/* @__PURE__ */ n("div", { children: [
|
|
7686
7688
|
/* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Payments" }),
|
|
7687
|
-
/* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: Se(
|
|
7689
|
+
/* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: Se(w) })
|
|
7688
7690
|
] })
|
|
7689
7691
|
] }),
|
|
7690
7692
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: y.slice(0, 2).map((z, A) => /* @__PURE__ */ e(
|
|
@@ -7813,9 +7815,9 @@ function tl({
|
|
|
7813
7815
|
identity: l = "_id",
|
|
7814
7816
|
title: m = "Pay Stub and Leave Balance",
|
|
7815
7817
|
term: o = "Fall 2025",
|
|
7816
|
-
...
|
|
7818
|
+
...h
|
|
7817
7819
|
}) {
|
|
7818
|
-
const [u,
|
|
7820
|
+
const [u, w] = L("vacation"), [y, r] = L(!1), v = ce(t), d = de[v], g = el[v], z = Ue.find((A) => A.id === u) || Ue[0];
|
|
7819
7821
|
return /* @__PURE__ */ n(
|
|
7820
7822
|
oe,
|
|
7821
7823
|
{
|
|
@@ -7825,7 +7827,7 @@ function tl({
|
|
|
7825
7827
|
onSelect: i,
|
|
7826
7828
|
identity: l,
|
|
7827
7829
|
details: { type: "leave-balance", title: m },
|
|
7828
|
-
...
|
|
7830
|
+
...h,
|
|
7829
7831
|
children: [
|
|
7830
7832
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
7831
7833
|
/* @__PURE__ */ n("div", { children: [
|
|
@@ -7855,7 +7857,7 @@ function tl({
|
|
|
7855
7857
|
"button",
|
|
7856
7858
|
{
|
|
7857
7859
|
className: `flex-1 py-2 px-4 text-center ${g.tab} font-medium border-b-2 transition-colors duration-200 ${u === A.id ? "border-blue-500 text-blue-600 dark:text-blue-400" : "border-transparent text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100"}`,
|
|
7858
|
-
onClick: () =>
|
|
7860
|
+
onClick: () => w(A.id),
|
|
7859
7861
|
children: A.name.split(" ")[0]
|
|
7860
7862
|
},
|
|
7861
7863
|
A.id
|
|
@@ -8004,23 +8006,23 @@ function sl({
|
|
|
8004
8006
|
identity: l = "_id",
|
|
8005
8007
|
title: m = "Drive",
|
|
8006
8008
|
subtitle: o = "Drive Shared",
|
|
8007
|
-
...
|
|
8009
|
+
...h
|
|
8008
8010
|
}) {
|
|
8009
|
-
const [u,
|
|
8011
|
+
const [u, w] = L(!1), y = ce(t), r = de[y], v = nl[y];
|
|
8010
8012
|
return /* @__PURE__ */ n(
|
|
8011
8013
|
oe,
|
|
8012
8014
|
{
|
|
8013
|
-
className: `flex flex-col ${r.card} ${
|
|
8015
|
+
className: `flex flex-col ${r.card} ${v.wrap}`,
|
|
8014
8016
|
showCheckbox: a,
|
|
8015
8017
|
checkboxPosition: s,
|
|
8016
8018
|
onSelect: i,
|
|
8017
8019
|
identity: l,
|
|
8018
8020
|
details: { type: "drive", title: m },
|
|
8019
|
-
...
|
|
8021
|
+
...h,
|
|
8020
8022
|
children: [
|
|
8021
8023
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
8022
8024
|
/* @__PURE__ */ n("div", { children: [
|
|
8023
|
-
/* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${
|
|
8025
|
+
/* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${v.title} mb-1`, children: m }),
|
|
8024
8026
|
/* @__PURE__ */ e("div", { className: "text-zinc-600 dark:text-zinc-400 text-sm", children: o })
|
|
8025
8027
|
] }),
|
|
8026
8028
|
/* @__PURE__ */ n("div", { className: "relative", children: [
|
|
@@ -8028,7 +8030,7 @@ function sl({
|
|
|
8028
8030
|
"button",
|
|
8029
8031
|
{
|
|
8030
8032
|
className: "flex items-center gap-1 p-2 text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors duration-200",
|
|
8031
|
-
onClick: () =>
|
|
8033
|
+
onClick: () => w(!u),
|
|
8032
8034
|
children: /* @__PURE__ */ e(Xt, { className: "h-4 w-4" })
|
|
8033
8035
|
}
|
|
8034
8036
|
),
|
|
@@ -8044,21 +8046,21 @@ function sl({
|
|
|
8044
8046
|
] })
|
|
8045
8047
|
] })
|
|
8046
8048
|
] }),
|
|
8047
|
-
/* @__PURE__ */ e("div", { className: `grid ${
|
|
8049
|
+
/* @__PURE__ */ e("div", { className: `grid ${v.gridCols} gap-3 `, children: al.map((d) => /* @__PURE__ */ e(
|
|
8048
8050
|
Ut,
|
|
8049
8051
|
{
|
|
8050
8052
|
item: d,
|
|
8051
|
-
sizeMeta:
|
|
8053
|
+
sizeMeta: v
|
|
8052
8054
|
},
|
|
8053
8055
|
d.id
|
|
8054
8056
|
)) }),
|
|
8055
|
-
|
|
8056
|
-
/* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${
|
|
8057
|
+
v.showRecent && /* @__PURE__ */ n("div", { className: "", children: [
|
|
8058
|
+
/* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${v.item}`, children: "Recent Files" }),
|
|
8057
8059
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: rl.map((d) => /* @__PURE__ */ e(
|
|
8058
8060
|
Ut,
|
|
8059
8061
|
{
|
|
8060
8062
|
item: d,
|
|
8061
|
-
sizeMeta:
|
|
8063
|
+
sizeMeta: v,
|
|
8062
8064
|
showDate: !0
|
|
8063
8065
|
},
|
|
8064
8066
|
d.id
|
|
@@ -8198,7 +8200,7 @@ const ll = [
|
|
|
8198
8200
|
}
|
|
8199
8201
|
};
|
|
8200
8202
|
function cl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
|
|
8201
|
-
const [l, m] = L(!1), o = Sa(t.type),
|
|
8203
|
+
const [l, m] = L(!1), o = Sa(t.type), h = ol(t.type);
|
|
8202
8204
|
return l ? null : /* @__PURE__ */ n("div", { className: `relative rounded-lg border-l-4 p-4 transition-all duration-200 ${o.bg} ${o.border} ${t.read ? "border-l-2 opacity-80" : "border-l-4"}`, style: { borderLeftColor: o.accent }, children: [
|
|
8203
8205
|
/* @__PURE__ */ e(
|
|
8204
8206
|
"button",
|
|
@@ -8208,7 +8210,7 @@ function cl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
|
|
|
8208
8210
|
}
|
|
8209
8211
|
),
|
|
8210
8212
|
/* @__PURE__ */ n("div", { className: "flex gap-3 pr-6", children: [
|
|
8211
|
-
/* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(
|
|
8213
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(h, { className: `h-4 w-4 ${o.icon}` }) }),
|
|
8212
8214
|
/* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
|
|
8213
8215
|
/* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-1 ${t.read ? "font-medium" : "font-semibold"}`, children: Gt(t.title, a.maxTitleWords) }),
|
|
8214
8216
|
a.showMessage && t.message && /* @__PURE__ */ e("div", { className: `${a.message} text-zinc-600 dark:text-zinc-400 mb-2 leading-relaxed`, children: Gt(t.message, a.maxMessageWords) }),
|
|
@@ -8249,25 +8251,25 @@ function ml({
|
|
|
8249
8251
|
identity: l = "_id",
|
|
8250
8252
|
title: m = "Alerts",
|
|
8251
8253
|
alerts: o = ll,
|
|
8252
|
-
showBanner:
|
|
8254
|
+
showBanner: h = !0,
|
|
8253
8255
|
...u
|
|
8254
8256
|
}) {
|
|
8255
|
-
const [
|
|
8257
|
+
const [w, y] = L(o), r = ce(t), v = de[r], d = il[r], g = (F) => {
|
|
8256
8258
|
y((O) => O.filter((P) => P.id !== F.id));
|
|
8257
|
-
}, z =
|
|
8259
|
+
}, z = w.find((F) => F.type === "banner"), A = w.filter((F) => F.type !== "banner");
|
|
8258
8260
|
return /* @__PURE__ */ n(
|
|
8259
8261
|
oe,
|
|
8260
8262
|
{
|
|
8261
|
-
className: `flex flex-col ${
|
|
8263
|
+
className: `flex flex-col ${v.card} ${d.wrap}`,
|
|
8262
8264
|
showCheckbox: a,
|
|
8263
8265
|
checkboxPosition: s,
|
|
8264
8266
|
onSelect: i,
|
|
8265
8267
|
identity: l,
|
|
8266
|
-
details: { type: "alerts", title: m, count:
|
|
8268
|
+
details: { type: "alerts", title: m, count: w.length },
|
|
8267
8269
|
...u,
|
|
8268
8270
|
children: [
|
|
8269
|
-
/* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${
|
|
8270
|
-
|
|
8271
|
+
/* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }) }),
|
|
8272
|
+
h && z && t !== "sm" && /* @__PURE__ */ e(
|
|
8271
8273
|
dl,
|
|
8272
8274
|
{
|
|
8273
8275
|
alert: z,
|
|
@@ -8426,19 +8428,19 @@ function gl({
|
|
|
8426
8428
|
identity: l = "_id",
|
|
8427
8429
|
title: m = "Videos",
|
|
8428
8430
|
videos: o = ul,
|
|
8429
|
-
...
|
|
8431
|
+
...h
|
|
8430
8432
|
}) {
|
|
8431
|
-
const [u,
|
|
8433
|
+
const [u, w] = L(!1), y = ce(t), r = de[y], v = hl[y];
|
|
8432
8434
|
return /* @__PURE__ */ n(
|
|
8433
8435
|
oe,
|
|
8434
8436
|
{
|
|
8435
|
-
className: `flex flex-col ${r.card} ${
|
|
8437
|
+
className: `flex flex-col ${r.card} ${v.wrap}`,
|
|
8436
8438
|
showCheckbox: a,
|
|
8437
8439
|
checkboxPosition: s,
|
|
8438
8440
|
onSelect: i,
|
|
8439
8441
|
identity: l,
|
|
8440
8442
|
details: { type: "videos", title: m, count: o.length },
|
|
8441
|
-
...
|
|
8443
|
+
...h,
|
|
8442
8444
|
children: [
|
|
8443
8445
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between ", children: [
|
|
8444
8446
|
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${r.title}`, children: m }),
|
|
@@ -8447,7 +8449,7 @@ function gl({
|
|
|
8447
8449
|
"button",
|
|
8448
8450
|
{
|
|
8449
8451
|
className: "flex items-center gap-1 px-3 py-1.5 text-sm text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 border border-zinc-300 dark:border-zinc-600 rounded-md transition-colors duration-200",
|
|
8450
|
-
onClick: () =>
|
|
8452
|
+
onClick: () => w(!u),
|
|
8451
8453
|
children: [
|
|
8452
8454
|
"Filter",
|
|
8453
8455
|
/* @__PURE__ */ e(fe, { className: "h-4 w-4 transform rotate-90" })
|
|
@@ -8462,11 +8464,11 @@ function gl({
|
|
|
8462
8464
|
] })
|
|
8463
8465
|
] })
|
|
8464
8466
|
] }),
|
|
8465
|
-
/* @__PURE__ */ e("div", { className: `grid ${
|
|
8467
|
+
/* @__PURE__ */ e("div", { className: `grid ${v.gridCols} gap-4 `, children: o.slice(0, v.gridCols === "grid-cols-3" ? 6 : 4).map((d) => /* @__PURE__ */ e(
|
|
8466
8468
|
pl,
|
|
8467
8469
|
{
|
|
8468
8470
|
video: d,
|
|
8469
|
-
sizeMeta:
|
|
8471
|
+
sizeMeta: v
|
|
8470
8472
|
},
|
|
8471
8473
|
d.id
|
|
8472
8474
|
)) }),
|