unifyedx-storybook-new 0.2.24 → 0.2.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/unifyedx-storybook-new.es.js +151 -150
- package/dist/unifyedx-storybook-new.es.js.br +0 -0
- package/dist/unifyedx-storybook-new.es.js.gz +0 -0
- package/dist/vendor-dMueD5G_.js +33462 -0
- package/dist/vendor-dMueD5G_.js.br +0 -0
- package/dist/vendor-dMueD5G_.js.gz +0 -0
- package/dist/{vendor-lodash-CWJBBGzd.js → vendor-lodash-bQ1isuSp.js} +1 -1
- package/dist/vendor-lodash-bQ1isuSp.js.br +0 -0
- package/dist/vendor-lodash-bQ1isuSp.js.gz +0 -0
- package/package.json +3 -1
- package/dist/vendor-D6FgPLRJ.js +0 -30580
- package/dist/vendor-D6FgPLRJ.js.br +0 -0
- package/dist/vendor-D6FgPLRJ.js.gz +0 -0
- package/dist/vendor-lodash-CWJBBGzd.js.br +0 -0
- package/dist/vendor-lodash-CWJBBGzd.js.gz +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e, Fragment as te } from "react/jsx-runtime";
|
|
2
2
|
import re, { useState as L, useMemo as ue, useId as He, Fragment as H, useEffect as Z, useCallback as ae, useRef as xe } from "react";
|
|
3
|
-
import { a as Q, U as mt, X as ge, P as c, L as _a, C as ve, b as tt, f as Ze, d as yt, D as Gt, F as Ua, e as qa, h as Ga, T as Ke, u as Ya, i as zt, I as Yt, j as Wt, k as Wa, l as Ja, m as Xa, n as Jt, S as vt, o as Xt, M as Qa, p as Ha, q as wt, r as Za, A as Ka, E as Qt, s as er, t as tr, v as ar, w as rr, x as Ht, y as nr, z as Zt, B as Kt, G as sr, H as lr, J as ir, K as et, N as ut, O as ht, Q as or, R as cr, V as ea, W as dr, Y as Nt, Z as mr, _ as ur, $ as Me, a0 as hr, a1 as pr, a2 as gr, a3 as br, a4 as fr, a5 as xr, a6 as yr, a7 as vr, a8 as wr, a9 as Nr, aa as kr, ab as Cr, ac as zr, ad as Sr, ae as Dr, af as Fe, ag as ta, ah as $r, ai as Tr, aj as Ar, ak as Fr, al as Er, am as aa, an as Rr, ao as
|
|
3
|
+
import { a as Q, U as mt, X as ge, P as c, L as _a, C as ve, b as tt, f as Ze, d as yt, D as Gt, F as Ua, e as qa, h as Ga, T as Ke, u as Ya, i as zt, I as Yt, j as Wt, k as Wa, l as Ja, m as Xa, n as Jt, S as vt, o as Xt, M as Qa, p as Ha, q as wt, r as Za, A as Ka, E as Qt, s as er, t as tr, v as ar, w as rr, x as Ht, y as nr, z as Zt, B as Kt, G as sr, H as lr, J as ir, K as et, N as ut, O as ht, Q as or, R as cr, V as ea, W as dr, Y as Nt, Z as mr, _ as ur, $ as Me, a0 as hr, a1 as pr, a2 as gr, a3 as br, a4 as fr, a5 as xr, a6 as yr, a7 as vr, a8 as wr, a9 as Nr, aa as kr, ab as Cr, ac as zr, ad as Sr, ae as Dr, af as Fe, ag as ta, ah as $r, ai as Tr, aj as Ar, ak as Fr, al as Er, am as aa, an as Rr, ao as Ir, ap as ra, aq as Or, ar as pt, as as na, at as Pr } from "./vendor-dMueD5G_.js";
|
|
4
4
|
import { Popover as Lr, PopoverButton as Mr, PopoverPanel as Br, Transition as he, Dialog as ye, TransitionChild as Ne, DialogPanel as Ee, DialogTitle as at, TabGroup as jr, TabList as Vr, Tab as se, TabPanels as _r, RadioGroup as qe, Listbox as K, ListboxButton as Ur, ListboxOptions as qr, ListboxOption as Gr, SwitchGroup as Yr, Switch as ot, Menu as Wr, MenuButton as Jr, Portal as Xr, MenuItems as Qr, MenuItem as Hr, DialogBackdrop as Zr } from "@headlessui/react";
|
|
5
5
|
import { motion as le, AnimatePresence as Ce } from "framer-motion";
|
|
6
|
-
import { d as Kr } from "./vendor-lodash-
|
|
6
|
+
import { d as Kr } from "./vendor-lodash-bQ1isuSp.js";
|
|
7
7
|
import { useFloating as sa, offset as la, flip as ia, shift as oa, autoUpdate as ca, useClick as en, useDismiss as tn, useInteractions as an, FloatingPortal as rn } from "@floating-ui/react";
|
|
8
8
|
import ct, { debounce as nn } from "lodash";
|
|
9
9
|
import { toast as me, ToastContainer as sn, Slide as ln } from "react-toastify";
|
|
@@ -825,7 +825,7 @@ const Dn = {
|
|
|
825
825
|
}, Ft = (t) => {
|
|
826
826
|
const a = new Date(t);
|
|
827
827
|
return je(new Date(a.getFullYear(), a.getMonth() + 1, 0));
|
|
828
|
-
},
|
|
828
|
+
}, In = (t) => {
|
|
829
829
|
const a = /* @__PURE__ */ new Date();
|
|
830
830
|
switch (t) {
|
|
831
831
|
case "anytime":
|
|
@@ -899,7 +899,7 @@ const Dn = {
|
|
|
899
899
|
break;
|
|
900
900
|
}
|
|
901
901
|
return T[g] = C, T;
|
|
902
|
-
}, {}), [l, $.values]), E = Object.values(A).filter(Boolean).length,
|
|
902
|
+
}, {}), [l, $.values]), E = Object.values(A).filter(Boolean).length, I = ue(() => l.some((T) => {
|
|
903
903
|
if (T.type !== "date") return !1;
|
|
904
904
|
const v = $.values?.[T.key]?.values;
|
|
905
905
|
if (!Array.isArray(v) || v.length < 2) return !1;
|
|
@@ -1064,7 +1064,7 @@ const Dn = {
|
|
|
1064
1064
|
] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
|
|
1065
1065
|
] });
|
|
1066
1066
|
case "date":
|
|
1067
|
-
const y = g.values || [], [k, F] = y, M = k && F, U = y[0] || null, S = y[1] || null,
|
|
1067
|
+
const y = g.values || [], [k, F] = y, M = k && F, U = y[0] || null, S = y[1] || null, O = {
|
|
1068
1068
|
startDate: U instanceof Date ? U.toISOString().slice(0, 10) : null,
|
|
1069
1069
|
endDate: U instanceof Date ? U.toISOString().slice(0, 10) : null
|
|
1070
1070
|
}, D = {
|
|
@@ -1087,7 +1087,7 @@ const Dn = {
|
|
|
1087
1087
|
$.setFieldValue(`${T}.range`, "custom");
|
|
1088
1088
|
return;
|
|
1089
1089
|
}
|
|
1090
|
-
const [Y, W] =
|
|
1090
|
+
const [Y, W] = In(R);
|
|
1091
1091
|
$.setFieldValue(`${T}.values`, Y && W ? [Y, W] : []), $.setFieldValue(`${T}.range`, R);
|
|
1092
1092
|
};
|
|
1093
1093
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
@@ -1150,7 +1150,7 @@ const Dn = {
|
|
|
1150
1150
|
{
|
|
1151
1151
|
asSingle: !0,
|
|
1152
1152
|
useRange: !1,
|
|
1153
|
-
value:
|
|
1153
|
+
value: O,
|
|
1154
1154
|
onChange: (R) => {
|
|
1155
1155
|
const Y = R?.startDate ? Be(new Date(R.startDate)) : null, W = y[1] || null;
|
|
1156
1156
|
Y && ($.setFieldValue(`${T}.values`, [Y, W]), $.setFieldValue(`${T}.range`, "custom"));
|
|
@@ -1293,7 +1293,7 @@ const Dn = {
|
|
|
1293
1293
|
"button",
|
|
1294
1294
|
{
|
|
1295
1295
|
type: "submit",
|
|
1296
|
-
disabled: !$.dirty ||
|
|
1296
|
+
disabled: !$.dirty || I,
|
|
1297
1297
|
className: "filter-button apply",
|
|
1298
1298
|
children: [
|
|
1299
1299
|
"Apply Filters",
|
|
@@ -1358,7 +1358,7 @@ const Dn = {
|
|
|
1358
1358
|
iconClass: "icon--info",
|
|
1359
1359
|
primaryButtonCategory: "primary"
|
|
1360
1360
|
}
|
|
1361
|
-
},
|
|
1361
|
+
}, On = ({
|
|
1362
1362
|
isOpen: t,
|
|
1363
1363
|
onClose: a,
|
|
1364
1364
|
title: s,
|
|
@@ -1434,7 +1434,7 @@ const Dn = {
|
|
|
1434
1434
|
}
|
|
1435
1435
|
) })
|
|
1436
1436
|
] }) });
|
|
1437
|
-
},
|
|
1437
|
+
}, Il = ({
|
|
1438
1438
|
currentPage: t,
|
|
1439
1439
|
totalItems: a,
|
|
1440
1440
|
itemsPerPage: s,
|
|
@@ -1786,7 +1786,7 @@ const Dn = {
|
|
|
1786
1786
|
]
|
|
1787
1787
|
}
|
|
1788
1788
|
);
|
|
1789
|
-
},
|
|
1789
|
+
}, Ol = ({
|
|
1790
1790
|
navItems: t = [],
|
|
1791
1791
|
isCollapsed: a = !1,
|
|
1792
1792
|
onToggleCollapse: s,
|
|
@@ -2541,7 +2541,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2541
2541
|
type: "User",
|
|
2542
2542
|
avatarUrl: a?.profileImage || Je(l)
|
|
2543
2543
|
};
|
|
2544
|
-
}),
|
|
2544
|
+
}), It = (t) => {
|
|
2545
2545
|
try {
|
|
2546
2546
|
const a = JSON.parse(t);
|
|
2547
2547
|
return Array.isArray(a) ? a : [];
|
|
@@ -2592,10 +2592,10 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2592
2592
|
if (Array.isArray(s))
|
|
2593
2593
|
i = s;
|
|
2594
2594
|
else if (typeof s == "string")
|
|
2595
|
-
i =
|
|
2595
|
+
i = It(s.trim());
|
|
2596
2596
|
else if (s && typeof s == "object") {
|
|
2597
2597
|
const l = s.data;
|
|
2598
|
-
Array.isArray(l) ? i = l : typeof l == "string" && (i =
|
|
2598
|
+
Array.isArray(l) ? i = l : typeof l == "string" && (i = It(l.trim()));
|
|
2599
2599
|
}
|
|
2600
2600
|
return Kn(i);
|
|
2601
2601
|
}
|
|
@@ -2652,7 +2652,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2652
2652
|
]
|
|
2653
2653
|
}
|
|
2654
2654
|
);
|
|
2655
|
-
},
|
|
2655
|
+
}, Ot = [
|
|
2656
2656
|
{ id: 1, name: Te.USER, icon: rr, code: "users" },
|
|
2657
2657
|
{ id: 2, name: Te.GROUP, icon: Ht, code: "groups" },
|
|
2658
2658
|
{ id: 3, name: Te.ROLE, icon: nr, code: "roles" }
|
|
@@ -2672,7 +2672,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2672
2672
|
},
|
|
2673
2673
|
isChanged: u = !1
|
|
2674
2674
|
}) => {
|
|
2675
|
-
const [p, b] = L(
|
|
2675
|
+
const [p, b] = L(Ot[0]), [f, r] = L(""), w = Ct(f, 400), [d, h] = L([]), [z, $] = L(/* @__PURE__ */ new Set()), [A, E] = L(!1), [I, j] = L(Pt[0]), {
|
|
2676
2676
|
control: V,
|
|
2677
2677
|
handleSubmit: G,
|
|
2678
2678
|
watch: q,
|
|
@@ -2696,7 +2696,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2696
2696
|
});
|
|
2697
2697
|
}, F = () => {
|
|
2698
2698
|
d.filter((D) => z.has(D.id)).forEach((D) => {
|
|
2699
|
-
g.find((P) => P.id === D.id) || x({ ...D, permission:
|
|
2699
|
+
g.find((P) => P.id === D.id) || x({ ...D, permission: I.name });
|
|
2700
2700
|
}), $(/* @__PURE__ */ new Set()), r("");
|
|
2701
2701
|
}, M = (D) => {
|
|
2702
2702
|
j(D), g.forEach(
|
|
@@ -2749,7 +2749,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2749
2749
|
}, S = (D) => {
|
|
2750
2750
|
const P = i[p.code].find((_) => _.name === D.name && _.permission !== "remove") || y.find((_) => _.name === D.name);
|
|
2751
2751
|
return P ? `${P.permission}` : "";
|
|
2752
|
-
},
|
|
2752
|
+
}, O = () => {
|
|
2753
2753
|
switch (l) {
|
|
2754
2754
|
case de.DRIVE:
|
|
2755
2755
|
return "Share with others";
|
|
@@ -2763,7 +2763,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2763
2763
|
};
|
|
2764
2764
|
return ue(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:", y.length), y.length === 0 && !u), [y.length, u]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
|
|
2765
2765
|
/* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
|
|
2766
|
-
/* @__PURE__ */ e(ye.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children:
|
|
2766
|
+
/* @__PURE__ */ e(ye.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: O() }),
|
|
2767
2767
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
|
|
2768
2768
|
l === de.DRIVE && /* @__PURE__ */ n("button", { className: "flex items-center gap-2 text-sm text-blue-600 hover:text-blue-800 font-semibold hover:cursor-pointer", children: [
|
|
2769
2769
|
/* @__PURE__ */ e(ir, { className: "h-5 w-5" }),
|
|
@@ -2805,7 +2805,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2805
2805
|
leave: "transition ease-in duration-100",
|
|
2806
2806
|
leaveFrom: "opacity-100",
|
|
2807
2807
|
leaveTo: "opacity-0",
|
|
2808
|
-
children: /* @__PURE__ */ e(K.Options, { className: "absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children:
|
|
2808
|
+
children: /* @__PURE__ */ e(K.Options, { className: "absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: Ot.map((D) => /* @__PURE__ */ e(
|
|
2809
2809
|
K.Option,
|
|
2810
2810
|
{
|
|
2811
2811
|
value: D,
|
|
@@ -2926,15 +2926,15 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
2926
2926
|
l === de.DRIVE && /* @__PURE__ */ e(
|
|
2927
2927
|
K,
|
|
2928
2928
|
{
|
|
2929
|
-
value:
|
|
2929
|
+
value: I,
|
|
2930
2930
|
onChange: M,
|
|
2931
2931
|
children: /* @__PURE__ */ n("div", { className: "relative", children: [
|
|
2932
2932
|
/* @__PURE__ */ n(K.Button, { className: "relative w-full border border-gray-300 bg-white rounded-md shadow-sm pl-3 pr-10 py-2 text-left hover:cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm", children: [
|
|
2933
2933
|
/* @__PURE__ */ n("span", { className: "flex items-center", children: [
|
|
2934
|
-
/* @__PURE__ */ e(
|
|
2934
|
+
/* @__PURE__ */ e(I.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
|
|
2935
2935
|
/* @__PURE__ */ n("span", { className: "truncate", children: [
|
|
2936
2936
|
"Can ",
|
|
2937
|
-
|
|
2937
|
+
I.name
|
|
2938
2938
|
] })
|
|
2939
2939
|
] }),
|
|
2940
2940
|
/* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(ut, { className: "h-5 w-5 text-gray-400" }) })
|
|
@@ -3158,8 +3158,8 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3158
3158
|
roles: o.roles.filter(
|
|
3159
3159
|
(E) => E.name.toLowerCase().includes(w.toLowerCase())
|
|
3160
3160
|
)
|
|
3161
|
-
}, h = async (E,
|
|
3162
|
-
const G =
|
|
3161
|
+
}, h = async (E, I, j, V) => {
|
|
3162
|
+
const G = I.value;
|
|
3163
3163
|
u((q) => ({
|
|
3164
3164
|
...q,
|
|
3165
3165
|
[j]: q[j].map(
|
|
@@ -3168,9 +3168,9 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3168
3168
|
}));
|
|
3169
3169
|
}, z = () => {
|
|
3170
3170
|
const E = {
|
|
3171
|
-
users: o.users.filter((
|
|
3172
|
-
groups: o.groups.filter((
|
|
3173
|
-
roles: o.roles.filter((
|
|
3171
|
+
users: o.users.filter((I) => I.permission !== "remove"),
|
|
3172
|
+
groups: o.groups.filter((I) => I.permission !== "remove"),
|
|
3173
|
+
roles: o.roles.filter((I) => I.permission !== "remove")
|
|
3174
3174
|
};
|
|
3175
3175
|
a(E);
|
|
3176
3176
|
}, $ = ["users", "groups", "roles"], A = ["Users", "Groups", "Roles"];
|
|
@@ -3206,10 +3206,10 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3206
3206
|
se,
|
|
3207
3207
|
{
|
|
3208
3208
|
className: ({
|
|
3209
|
-
selected:
|
|
3209
|
+
selected: I
|
|
3210
3210
|
}) => `w-full py-2 text-sm font-medium leading-5 rounded-md
|
|
3211
3211
|
focus:outline-none focus:ring-2 ring-offset-2 ring-offset-blue-400 ring-white ring-opacity-60
|
|
3212
|
-
${
|
|
3212
|
+
${I ? "bg-white shadow text-blue-700" : "text-gray-600 hover:bg-white/[0.6]"}`,
|
|
3213
3213
|
children: E
|
|
3214
3214
|
},
|
|
3215
3215
|
E
|
|
@@ -3234,7 +3234,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3234
3234
|
se.Panel,
|
|
3235
3235
|
{
|
|
3236
3236
|
className: "space-y-3 focus:outline-none",
|
|
3237
|
-
children: /* @__PURE__ */ e(Ce, { children: d[E].length > 0 ? d[E].map((
|
|
3237
|
+
children: /* @__PURE__ */ e(Ce, { children: d[E].length > 0 ? d[E].map((I) => /* @__PURE__ */ n(
|
|
3238
3238
|
le.div,
|
|
3239
3239
|
{
|
|
3240
3240
|
layout: !0,
|
|
@@ -3251,20 +3251,20 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3251
3251
|
/* @__PURE__ */ e(
|
|
3252
3252
|
"img",
|
|
3253
3253
|
{
|
|
3254
|
-
src:
|
|
3255
|
-
alt:
|
|
3254
|
+
src: I.avatarUrl || `https://avatar.vercel.sh/${I.name}.svg?text=${I.name.charAt(0)}`,
|
|
3255
|
+
alt: I.name,
|
|
3256
3256
|
className: "w-10 h-10 rounded-full flex-shrink-0"
|
|
3257
3257
|
}
|
|
3258
3258
|
),
|
|
3259
3259
|
/* @__PURE__ */ n("div", { className: "overflow-hidden", children: [
|
|
3260
|
-
/* @__PURE__ */ e("p", { className: "font-medium text-gray-900 truncate", children:
|
|
3260
|
+
/* @__PURE__ */ e("p", { className: "font-medium text-gray-900 truncate", children: I.name }),
|
|
3261
3261
|
E !== "users" && /* @__PURE__ */ e(
|
|
3262
3262
|
"button",
|
|
3263
3263
|
{
|
|
3264
3264
|
onClick: () => i({
|
|
3265
|
-
id:
|
|
3265
|
+
id: I.id,
|
|
3266
3266
|
type: E,
|
|
3267
|
-
name:
|
|
3267
|
+
name: I.name
|
|
3268
3268
|
}),
|
|
3269
3269
|
className: "text-sm text-blue-600 hover:underline hover:cursor-pointer",
|
|
3270
3270
|
children: "View Members"
|
|
@@ -3275,10 +3275,10 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3275
3275
|
/* @__PURE__ */ e(
|
|
3276
3276
|
rs,
|
|
3277
3277
|
{
|
|
3278
|
-
item:
|
|
3278
|
+
item: I,
|
|
3279
3279
|
allowedPermissions: m,
|
|
3280
3280
|
onPermissionChange: (j) => h(
|
|
3281
|
-
|
|
3281
|
+
I,
|
|
3282
3282
|
j,
|
|
3283
3283
|
E
|
|
3284
3284
|
)
|
|
@@ -3286,7 +3286,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3286
3286
|
)
|
|
3287
3287
|
]
|
|
3288
3288
|
},
|
|
3289
|
-
|
|
3289
|
+
I.id
|
|
3290
3290
|
)) : (
|
|
3291
3291
|
// Empty state is unchanged
|
|
3292
3292
|
/* @__PURE__ */ n(
|
|
@@ -3459,7 +3459,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3459
3459
|
allowedPermissions: u = [],
|
|
3460
3460
|
...p
|
|
3461
3461
|
}) => {
|
|
3462
|
-
const [b, f] = L(fe.INVITE), [r, w] = L(t), [d, h] = L(null), [z, $] = L(!1), [A, E] = L([]), [
|
|
3462
|
+
const [b, f] = L(fe.INVITE), [r, w] = L(t), [d, h] = L(null), [z, $] = L(!1), [A, E] = L([]), [I, j] = L(fe.MANAGE), V = () => {
|
|
3463
3463
|
f(fe.INVITE), h(null), m();
|
|
3464
3464
|
}, G = () => {
|
|
3465
3465
|
f(fe.MANAGE);
|
|
@@ -3478,7 +3478,7 @@ const Re = Xn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Hn =
|
|
|
3478
3478
|
const x = ct.mapValues(t, (y) => y.map((k) => ({ id: k.id, permission: k.permission })).sort((k, F) => k.id - F.id)), C = ct.mapValues(g, (y) => y.map((k) => ({ id: k.id, permission: k.permission })).sort((k, F) => k.id - F.id));
|
|
3479
3479
|
console.log("Existing data:", x), console.log("Changed data:", C);
|
|
3480
3480
|
const N = !ct.isEqual(x, C);
|
|
3481
|
-
console.log("hasPermissionChanged:", N), $(N), f(b === fe.MEMBERS ?
|
|
3481
|
+
console.log("hasPermissionChanged:", N), $(N), f(b === fe.MEMBERS ? I : fe.INVITE);
|
|
3482
3482
|
};
|
|
3483
3483
|
return /* @__PURE__ */ e(he, { appear: !0, show: a, as: H, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose: V, children: [
|
|
3484
3484
|
/* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
|
|
@@ -3588,7 +3588,7 @@ function nt({
|
|
|
3588
3588
|
getOptionId: d = (z) => String(z.id),
|
|
3589
3589
|
getOptionLabel: h = (z) => z.name
|
|
3590
3590
|
}) {
|
|
3591
|
-
const z = He(), $ = He(), [A, E] = L(""),
|
|
3591
|
+
const z = He(), $ = He(), [A, E] = L(""), I = xe(""), j = ue(() => {
|
|
3592
3592
|
const g = /* @__PURE__ */ new Map();
|
|
3593
3593
|
for (const x of a) g.set(d(x), x);
|
|
3594
3594
|
return g;
|
|
@@ -3598,7 +3598,7 @@ function nt({
|
|
|
3598
3598
|
return a.filter((x) => h(x).toLowerCase().includes(g));
|
|
3599
3599
|
}, [a, A, h]);
|
|
3600
3600
|
Z(() => {
|
|
3601
|
-
b === "server" && A.length >= w && A !==
|
|
3601
|
+
b === "server" && A.length >= w && A !== I.current && (I.current = A, f && f(A));
|
|
3602
3602
|
}, [A, b, w, f]);
|
|
3603
3603
|
const q = b === "client" ? G : a, T = () => {
|
|
3604
3604
|
if (!V.length)
|
|
@@ -3866,7 +3866,7 @@ function cs({
|
|
|
3866
3866
|
dropId: f,
|
|
3867
3867
|
indent: r = 24
|
|
3868
3868
|
}) {
|
|
3869
|
-
const { setNodeRef: w, isOver: d } = mr({ id: f }), { attributes: h, listeners: z, setNodeRef: $, transform: A, isDragging: E } = ur({ id: b }),
|
|
3869
|
+
const { setNodeRef: w, isOver: d } = mr({ id: f }), { attributes: h, listeners: z, setNodeRef: $, transform: A, isDragging: E } = ur({ id: b }), I = A ? { transform: `translate3d(${Math.round(A.x)}px, ${Math.round(A.y)}px, 0)` } : void 0, [j, V] = L(!1), [G, q] = L(t.name), T = () => {
|
|
3870
3870
|
const g = G.trim();
|
|
3871
3871
|
V(!1), g && g !== t.name ? o?.(t, g) : q(t.name);
|
|
3872
3872
|
}, v = ue(() => /* @__PURE__ */ e(
|
|
@@ -3887,7 +3887,7 @@ function cs({
|
|
|
3887
3887
|
{
|
|
3888
3888
|
ref: w,
|
|
3889
3889
|
className: `tv-row ${d ? "tv-drop-over" : ""} ${E ? "dragging" : ""}`,
|
|
3890
|
-
style: { ...
|
|
3890
|
+
style: { ...I, paddingLeft: 8 + a * r },
|
|
3891
3891
|
onClick: (g) => {
|
|
3892
3892
|
g.target.closest(".tv-toggle") || g.target.tagName === "INPUT" || l?.(t);
|
|
3893
3893
|
},
|
|
@@ -4022,7 +4022,7 @@ function Wl({
|
|
|
4022
4022
|
re.useEffect(() => {
|
|
4023
4023
|
A(E(z));
|
|
4024
4024
|
}, [z, E]);
|
|
4025
|
-
const
|
|
4025
|
+
const I = ae(
|
|
4026
4026
|
(k) => A((F) => ({ ...F, [k]: !F[k] })),
|
|
4027
4027
|
[]
|
|
4028
4028
|
), [j, V] = L(() => Le(z));
|
|
@@ -4038,7 +4038,7 @@ function Wl({
|
|
|
4038
4038
|
if (g.current = 0, v(null), !k || !F) return;
|
|
4039
4039
|
const U = String(k.id).replace(/^drag-/, ""), S = String(F.id).replace(/^drop-/, "");
|
|
4040
4040
|
if (!U || !S || U === S) return;
|
|
4041
|
-
let
|
|
4041
|
+
let O = S;
|
|
4042
4042
|
const D = Math.max(0, Math.floor(-M / h));
|
|
4043
4043
|
if (D > 0) {
|
|
4044
4044
|
let W = S;
|
|
@@ -4046,20 +4046,20 @@ function Wl({
|
|
|
4046
4046
|
const B = $a(j, W, null);
|
|
4047
4047
|
if (!B) break;
|
|
4048
4048
|
if (!B.parentId) {
|
|
4049
|
-
|
|
4049
|
+
O = a;
|
|
4050
4050
|
break;
|
|
4051
4051
|
}
|
|
4052
|
-
|
|
4052
|
+
O = B.parentId, W = B.parentId;
|
|
4053
4053
|
}
|
|
4054
4054
|
}
|
|
4055
|
-
if (d &&
|
|
4055
|
+
if (d && O === a) {
|
|
4056
4056
|
V(Le(z));
|
|
4057
4057
|
return;
|
|
4058
4058
|
}
|
|
4059
4059
|
const P = Le(j), { newRoots: _, removed: R } = bs(P, U);
|
|
4060
4060
|
if (!R) return;
|
|
4061
|
-
const Y = fs(_,
|
|
4062
|
-
V(Y), r?.({ sourceId: U, destParentId:
|
|
4061
|
+
const Y = fs(_, O, R);
|
|
4062
|
+
V(Y), r?.({ sourceId: U, destParentId: O, newTree: Y });
|
|
4063
4063
|
},
|
|
4064
4064
|
[j, z, a, d, h, r]
|
|
4065
4065
|
), y = ae(
|
|
@@ -4070,7 +4070,7 @@ function Wl({
|
|
|
4070
4070
|
node: M,
|
|
4071
4071
|
depth: F,
|
|
4072
4072
|
expanded: !!$[M.id],
|
|
4073
|
-
onToggle: () =>
|
|
4073
|
+
onToggle: () => I(M.id),
|
|
4074
4074
|
onSelect: o,
|
|
4075
4075
|
onCreateChild: p,
|
|
4076
4076
|
onRename: b,
|
|
@@ -4083,7 +4083,7 @@ function Wl({
|
|
|
4083
4083
|
),
|
|
4084
4084
|
$[M.id] && M.children?.length > 0 ? y(M.children, F + 1) : null
|
|
4085
4085
|
] }, M.id)),
|
|
4086
|
-
[$, h, p, f, b, o, w,
|
|
4086
|
+
[$, h, p, f, b, o, w, I]
|
|
4087
4087
|
);
|
|
4088
4088
|
return re.useMemo(() => {
|
|
4089
4089
|
if (!T) return null;
|
|
@@ -4153,6 +4153,7 @@ const Jl = ({
|
|
|
4153
4153
|
] })
|
|
4154
4154
|
) });
|
|
4155
4155
|
};
|
|
4156
|
+
c.string;
|
|
4156
4157
|
function xs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
4157
4158
|
console.log(t);
|
|
4158
4159
|
const [l, m] = re.useState(t), [o, u] = re.useState(() => {
|
|
@@ -4777,10 +4778,10 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4777
4778
|
if (v.optionsFrom && a) {
|
|
4778
4779
|
const { config: F, valueField: M, labelField: U } = v.optionsFrom, S = a[F] || [];
|
|
4779
4780
|
if (Array.isArray(S))
|
|
4780
|
-
return S.map((
|
|
4781
|
-
id:
|
|
4782
|
-
value:
|
|
4783
|
-
label:
|
|
4781
|
+
return S.map((O) => ({
|
|
4782
|
+
id: O[M] || "",
|
|
4783
|
+
value: O[M] || "",
|
|
4784
|
+
label: O[U] || ""
|
|
4784
4785
|
}));
|
|
4785
4786
|
}
|
|
4786
4787
|
return v.options || [];
|
|
@@ -5005,17 +5006,17 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5005
5006
|
const x = [...g];
|
|
5006
5007
|
return x.splice(v, 1), x;
|
|
5007
5008
|
});
|
|
5008
|
-
}, []), [E,
|
|
5009
|
-
|
|
5009
|
+
}, []), [E, I] = L(null), j = ae((v, g) => {
|
|
5010
|
+
I(g), v.dataTransfer.effectAllowed = "move", v.dataTransfer.setData("text/html", "");
|
|
5010
5011
|
}, []), V = ae((v) => {
|
|
5011
5012
|
v.preventDefault(), v.dataTransfer.dropEffect = "move";
|
|
5012
5013
|
}, []), G = ae((v, g) => {
|
|
5013
5014
|
v.preventDefault(), !(E === null || E === g) && (r((x) => {
|
|
5014
5015
|
const C = [...x], N = C[E];
|
|
5015
5016
|
return C.splice(E, 1), C.splice(g, 0, N), C;
|
|
5016
|
-
}),
|
|
5017
|
+
}), I(null));
|
|
5017
5018
|
}, [E]), q = ae(() => {
|
|
5018
|
-
|
|
5019
|
+
I(null);
|
|
5019
5020
|
}, []), T = ae((v) => {
|
|
5020
5021
|
console.log("[DataTableRenderer] handleAddAudience called with:", v), r((g) => {
|
|
5021
5022
|
const x = [...g];
|
|
@@ -5172,15 +5173,15 @@ const Lt = () => {
|
|
|
5172
5173
|
initialData: p = null
|
|
5173
5174
|
// Add prop for initial demo data
|
|
5174
5175
|
}) => {
|
|
5175
|
-
const [b, f] = L(null), [r, w] = L(""), [d, h] = L(() => Array.isArray(p) ? p : []), [z, $] = L(null), [A, E] = L(null), [
|
|
5176
|
+
const [b, f] = L(null), [r, w] = L(""), [d, h] = L(() => Array.isArray(p) ? p : []), [z, $] = L(null), [A, E] = L(null), [I, j] = L(""), V = async () => {
|
|
5176
5177
|
try {
|
|
5177
5178
|
const S = await Ve(t.collectionList);
|
|
5178
5179
|
if (S) {
|
|
5179
|
-
const
|
|
5180
|
+
const O = S.map((D, P) => ({
|
|
5180
5181
|
...D,
|
|
5181
5182
|
order: typeof D.order == "number" ? D.order : P + 1
|
|
5182
5183
|
}));
|
|
5183
|
-
|
|
5184
|
+
O.sort((D, P) => (D.order ?? 0) - (P.order ?? 0)), h(O), s?.(O);
|
|
5184
5185
|
}
|
|
5185
5186
|
} catch (S) {
|
|
5186
5187
|
console.log("Error loading collections:", S), typeof window < "u" && !window.location.pathname.includes("iframe.html") && me.error("Failed to load collections");
|
|
@@ -5196,19 +5197,19 @@ const Lt = () => {
|
|
|
5196
5197
|
}, q = () => {
|
|
5197
5198
|
if (!l || b !== null) return;
|
|
5198
5199
|
const S = `temp-${Date.now()}`;
|
|
5199
|
-
h((
|
|
5200
|
-
...
|
|
5200
|
+
h((O) => [
|
|
5201
|
+
...O,
|
|
5201
5202
|
{
|
|
5202
5203
|
id: S,
|
|
5203
5204
|
categoryName: "",
|
|
5204
5205
|
links: [],
|
|
5205
|
-
order: (
|
|
5206
|
+
order: (O.at(-1)?.order ?? 0) + 1,
|
|
5206
5207
|
_temp: !0
|
|
5207
5208
|
}
|
|
5208
5209
|
]), f(S), w("");
|
|
5209
5210
|
}, T = () => {
|
|
5210
5211
|
b != null && (h((S) => {
|
|
5211
|
-
const
|
|
5212
|
+
const O = S.find((P) => P.id === b), D = O && O._temp ? S.filter((P) => P.id !== b) : S;
|
|
5212
5213
|
return s?.(D), D;
|
|
5213
5214
|
}), f(null), w(""));
|
|
5214
5215
|
}, v = async () => {
|
|
@@ -5216,77 +5217,77 @@ const Lt = () => {
|
|
|
5216
5217
|
const S = typeof b == "string" && b.startsWith("temp-");
|
|
5217
5218
|
try {
|
|
5218
5219
|
if (S) {
|
|
5219
|
-
const
|
|
5220
|
+
const O = await _e(t.collectionCreate, {
|
|
5220
5221
|
categoryName: r.trim(),
|
|
5221
5222
|
order: (Array.isArray(d) && d.length > 0 ? d.at(-1)?.order ?? 0 : 0) + 1
|
|
5222
5223
|
});
|
|
5223
|
-
|
|
5224
|
-
const P = D.map((_) => _.id === b ?
|
|
5224
|
+
O && (h((D) => {
|
|
5225
|
+
const P = D.map((_) => _.id === b ? O : _);
|
|
5225
5226
|
return s?.(P), P;
|
|
5226
5227
|
}), De.success("Collection created successfully"));
|
|
5227
5228
|
} else {
|
|
5228
|
-
const
|
|
5229
|
+
const O = await Hn(
|
|
5229
5230
|
`${t.collectionUpdate}/${b}?newName=${r.trim()}`
|
|
5230
5231
|
);
|
|
5231
5232
|
h((D) => {
|
|
5232
5233
|
const P = D.map(
|
|
5233
|
-
(_) => _.id === b ?
|
|
5234
|
+
(_) => _.id === b ? O && O.id ? { ..._, ...O } : { ..._, categoryName: r.trim() } : _
|
|
5234
5235
|
);
|
|
5235
5236
|
return s?.(P), P;
|
|
5236
5237
|
}), me.success("Collection updated successfully");
|
|
5237
5238
|
}
|
|
5238
5239
|
f(null), w("");
|
|
5239
|
-
} catch (
|
|
5240
|
-
console.log(
|
|
5240
|
+
} catch (O) {
|
|
5241
|
+
console.log(O), me.error("Failed to save collection");
|
|
5241
5242
|
}
|
|
5242
5243
|
}, g = async (S) => {
|
|
5243
5244
|
if (o)
|
|
5244
5245
|
try {
|
|
5245
5246
|
await Qn(`${t.collectionUpdate}/${S.id}`) && (me.success("Deleted successfully", { autoClose: 3e3 }), V());
|
|
5246
|
-
} catch (
|
|
5247
|
-
console.log(
|
|
5247
|
+
} catch (O) {
|
|
5248
|
+
console.log(O), me.error("Failed to delete collection");
|
|
5248
5249
|
}
|
|
5249
|
-
}, x = (S,
|
|
5250
|
-
if (!u || !
|
|
5251
|
-
const P = S.findIndex((W) => W.id ===
|
|
5250
|
+
}, x = (S, O, D) => {
|
|
5251
|
+
if (!u || !O || !D || O === D) return S;
|
|
5252
|
+
const P = S.findIndex((W) => W.id === O), _ = S.findIndex((W) => W.id === D);
|
|
5252
5253
|
if (P === -1 || _ === -1) return S;
|
|
5253
5254
|
const R = [...S], [Y] = R.splice(P, 1);
|
|
5254
5255
|
return R.splice(_, 0, Y), R.map((W, pe) => ({ ...W, order: pe + 1 }));
|
|
5255
5256
|
}, C = async (S) => {
|
|
5256
|
-
const
|
|
5257
|
+
const O = S.map((D) => ({
|
|
5257
5258
|
id: D.id,
|
|
5258
5259
|
order: D.order,
|
|
5259
5260
|
categoryName: D.categoryName
|
|
5260
5261
|
}));
|
|
5261
5262
|
try {
|
|
5262
|
-
await _e(t.updateCollection,
|
|
5263
|
+
await _e(t.updateCollection, O);
|
|
5263
5264
|
} catch (D) {
|
|
5264
5265
|
console.log(D), me.error("Failed to save order", { autoClose: 2500 });
|
|
5265
5266
|
}
|
|
5266
|
-
}, N = (S,
|
|
5267
|
-
u && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", String(
|
|
5267
|
+
}, N = (S, O) => {
|
|
5268
|
+
u && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", String(O)), $(O));
|
|
5268
5269
|
}, y = (S) => {
|
|
5269
5270
|
z && S !== A && E(S);
|
|
5270
5271
|
}, k = (S) => {
|
|
5271
5272
|
S.preventDefault();
|
|
5272
|
-
}, F = async (S,
|
|
5273
|
+
}, F = async (S, O) => {
|
|
5273
5274
|
S.preventDefault();
|
|
5274
5275
|
const D = S.dataTransfer.getData("text/plain");
|
|
5275
5276
|
D && (h((P) => {
|
|
5276
|
-
const _ = x(P, D,
|
|
5277
|
+
const _ = x(P, D, O);
|
|
5277
5278
|
return console.log("Reordered", _), C(_), s?.(_), _;
|
|
5278
5279
|
}), $(null), E(null));
|
|
5279
5280
|
}, M = () => {
|
|
5280
5281
|
$(null), E(null);
|
|
5281
5282
|
}, U = Array.isArray(d) ? d.filter(
|
|
5282
|
-
(S) => S.categoryName?.toLowerCase().includes(
|
|
5283
|
+
(S) => S.categoryName?.toLowerCase().includes(I.toLowerCase())
|
|
5283
5284
|
) : [];
|
|
5284
5285
|
return /* @__PURE__ */ n("div", { className: `manage-collection-list ${a}`, children: [
|
|
5285
5286
|
/* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ n("div", { className: "w-1/2 flex justify-end", children: [
|
|
5286
5287
|
i && /* @__PURE__ */ e(
|
|
5287
5288
|
be,
|
|
5288
5289
|
{
|
|
5289
|
-
value:
|
|
5290
|
+
value: I,
|
|
5290
5291
|
onDebouncedChange: j,
|
|
5291
5292
|
placeholder: "Search Collection",
|
|
5292
5293
|
customClass: "mr-4 searchmanagecollection"
|
|
@@ -5306,7 +5307,7 @@ const Lt = () => {
|
|
|
5306
5307
|
)
|
|
5307
5308
|
] }) }),
|
|
5308
5309
|
/* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: U.map((S) => {
|
|
5309
|
-
const
|
|
5310
|
+
const O = b === S.id, D = S?.links?.length ?? 0, P = z === S.id, _ = A === S.id && z !== S.id;
|
|
5310
5311
|
return /* @__PURE__ */ e(
|
|
5311
5312
|
"div",
|
|
5312
5313
|
{
|
|
@@ -5320,7 +5321,7 @@ const Lt = () => {
|
|
|
5320
5321
|
_ ? "ring-2 ring-gray-800/20" : "",
|
|
5321
5322
|
P ? "opacity-60" : ""
|
|
5322
5323
|
].join(" "),
|
|
5323
|
-
children:
|
|
5324
|
+
children: O ? /* @__PURE__ */ n(te, { children: [
|
|
5324
5325
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 flex-1", children: /* @__PURE__ */ e(
|
|
5325
5326
|
"input",
|
|
5326
5327
|
{
|
|
@@ -5460,7 +5461,7 @@ function zs({
|
|
|
5460
5461
|
onCancel: i,
|
|
5461
5462
|
onSave: l
|
|
5462
5463
|
}) {
|
|
5463
|
-
const [m, o] = re.useState(a), [u, p] = re.useState(null), [b, f] = L(!1), [r, w] = L(!1), [d, h] = L({}), z = `${Se()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, $ = z, [A, E] = L(1),
|
|
5464
|
+
const [m, o] = re.useState(a), [u, p] = re.useState(null), [b, f] = L(!1), [r, w] = L(!1), [d, h] = L({}), z = `${Se()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, $ = z, [A, E] = L(1), I = (x) => {
|
|
5464
5465
|
if (!a || !a.configuration)
|
|
5465
5466
|
return x;
|
|
5466
5467
|
const C = {}, N = x?.configuration || {};
|
|
@@ -5468,16 +5469,16 @@ function zs({
|
|
|
5468
5469
|
if (y.key && y.type === "datatable") {
|
|
5469
5470
|
const F = (N[y.key] || []).map((M, U) => {
|
|
5470
5471
|
const S = { id: M.id || 0 };
|
|
5471
|
-
return y.fields && y.fields.forEach((
|
|
5472
|
-
if (
|
|
5472
|
+
return y.fields && y.fields.forEach((O) => {
|
|
5473
|
+
if (O.fieldtype === "audience") {
|
|
5473
5474
|
let D = { users: [], groups: [], roles: [] };
|
|
5474
|
-
M[
|
|
5475
|
-
users: M[
|
|
5476
|
-
groups: M[
|
|
5477
|
-
roles: M[
|
|
5478
|
-
})), S[
|
|
5475
|
+
M[O.key] && (Array.isArray(M[O.key]) ? D = { users: [], groups: [], roles: [] } : typeof M[O.key] == "object" && (D = {
|
|
5476
|
+
users: M[O.key].users || [],
|
|
5477
|
+
groups: M[O.key].groups || [],
|
|
5478
|
+
roles: M[O.key].roles || []
|
|
5479
|
+
})), S[O.key] = D;
|
|
5479
5480
|
} else
|
|
5480
|
-
S[
|
|
5481
|
+
S[O.key] = M[O.key] || O.default || "";
|
|
5481
5482
|
}), S;
|
|
5482
5483
|
});
|
|
5483
5484
|
if (F.length === 0) {
|
|
@@ -5519,7 +5520,7 @@ function zs({
|
|
|
5519
5520
|
f(!0);
|
|
5520
5521
|
let C = await Ve(z);
|
|
5521
5522
|
if (C) {
|
|
5522
|
-
const N =
|
|
5523
|
+
const N = I(C);
|
|
5523
5524
|
p(N);
|
|
5524
5525
|
} else
|
|
5525
5526
|
j();
|
|
@@ -5592,12 +5593,12 @@ function zs({
|
|
|
5592
5593
|
const U = { id: M.id || 0 };
|
|
5593
5594
|
return F.fields && F.fields.forEach((S) => {
|
|
5594
5595
|
if (S.fieldtype === "audience") {
|
|
5595
|
-
let
|
|
5596
|
-
M[S.key] && typeof M[S.key] == "object" && !Array.isArray(M[S.key]) && (
|
|
5596
|
+
let O = { users: [], groups: [], roles: [] };
|
|
5597
|
+
M[S.key] && typeof M[S.key] == "object" && !Array.isArray(M[S.key]) && (O = {
|
|
5597
5598
|
users: M[S.key].users || [],
|
|
5598
5599
|
groups: M[S.key].groups || [],
|
|
5599
5600
|
roles: M[S.key].roles || []
|
|
5600
|
-
}), U[S.key] =
|
|
5601
|
+
}), U[S.key] = O;
|
|
5601
5602
|
} else
|
|
5602
5603
|
U[S.key] = M[S.key] || "";
|
|
5603
5604
|
}), U;
|
|
@@ -5739,7 +5740,7 @@ const Xl = ({
|
|
|
5739
5740
|
console.log("handleCancelRequest called - showing modal"), o(!0);
|
|
5740
5741
|
}, []), E = ae((g) => {
|
|
5741
5742
|
o(!1), g.primary ? (console.log("User confirmed cancel - navigating back"), window.history.back()) : console.log("User cancelled the cancel action - modal closed, data preserved");
|
|
5742
|
-
}, []),
|
|
5743
|
+
}, []), I = () => {
|
|
5743
5744
|
for (const g of h)
|
|
5744
5745
|
if (g.type === "section" && g.fields) {
|
|
5745
5746
|
const x = g.fields.find((C) => C.key === "displayname");
|
|
@@ -5749,7 +5750,7 @@ const Xl = ({
|
|
|
5749
5750
|
return a;
|
|
5750
5751
|
};
|
|
5751
5752
|
re.useEffect(() => {
|
|
5752
|
-
p(
|
|
5753
|
+
p(I());
|
|
5753
5754
|
}, [h]);
|
|
5754
5755
|
const j = ae((g) => {
|
|
5755
5756
|
console.log("Config saved with data:", g), Object.keys(g).forEach((x) => {
|
|
@@ -5868,7 +5869,7 @@ const Xl = ({
|
|
|
5868
5869
|
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: q[i].content })
|
|
5869
5870
|
] }),
|
|
5870
5871
|
/* @__PURE__ */ e(
|
|
5871
|
-
|
|
5872
|
+
On,
|
|
5872
5873
|
{
|
|
5873
5874
|
isOpen: m,
|
|
5874
5875
|
onClose: E,
|
|
@@ -5934,10 +5935,10 @@ const Hl = ({
|
|
|
5934
5935
|
handleSearchChange: E = () => {
|
|
5935
5936
|
},
|
|
5936
5937
|
// Optional: override export file names
|
|
5937
|
-
excelFileName:
|
|
5938
|
+
excelFileName: I,
|
|
5938
5939
|
pdfFileName: j
|
|
5939
5940
|
}) => {
|
|
5940
|
-
const V = () => l?.current || i?.current, [G, q] = re.useState(""), T = (t || "export").toString().trim() || "export", v = `${
|
|
5941
|
+
const V = () => l?.current || i?.current, [G, q] = re.useState(""), T = (t || "export").toString().trim() || "export", v = `${I || T}.xlsx`, g = `${j || T}.pdf`, x = (y, k, F) => Math.max(k, Math.min(y, F)), C = ae(
|
|
5941
5942
|
(y) => {
|
|
5942
5943
|
const k = V();
|
|
5943
5944
|
if (console.log("openColumnChooserNear", k), !!k?.openColumnChooser) {
|
|
@@ -5947,9 +5948,9 @@ const Hl = ({
|
|
|
5947
5948
|
}
|
|
5948
5949
|
try {
|
|
5949
5950
|
const F = y.currentTarget.getBoundingClientRect(), M = F.left + window.scrollX, U = F.bottom + window.scrollY;
|
|
5950
|
-
let S = M - 120,
|
|
5951
|
+
let S = M - 120, O = U - 120;
|
|
5951
5952
|
const D = window.innerWidth, P = window.innerHeight;
|
|
5952
|
-
S = x(S, window.scrollX + 8, window.scrollX + D - 340),
|
|
5953
|
+
S = x(S, window.scrollX + 8, window.scrollX + D - 340), O = x(O, window.scrollY, window.scrollY + P - 120), console.log("openColumnChooserNear", S, O), k.openColumnChooser(S, O);
|
|
5953
5954
|
} catch (F) {
|
|
5954
5955
|
console.log("coloumn choose error", F);
|
|
5955
5956
|
}
|
|
@@ -6107,7 +6108,7 @@ function Zl(t) {
|
|
|
6107
6108
|
selectionSettings: $ = { type: "Multiple", mode: "Row" },
|
|
6108
6109
|
enableCheckbox: A = !1,
|
|
6109
6110
|
columns: E = [],
|
|
6110
|
-
onGridStateChange:
|
|
6111
|
+
onGridStateChange: I,
|
|
6111
6112
|
onRowSelected: j,
|
|
6112
6113
|
onRowDeselected: V,
|
|
6113
6114
|
onRowDoubleClick: G,
|
|
@@ -6117,7 +6118,7 @@ function Zl(t) {
|
|
|
6117
6118
|
pageSettings: g,
|
|
6118
6119
|
sortSettings: x,
|
|
6119
6120
|
...C
|
|
6120
|
-
} = T || {}, [N, y] = re.useState(g?.page || 1), [k, F] = re.useState(x?.pageSize || 20), [M, U] = re.useState(x?.sortKey || "updatedDate"), [S,
|
|
6121
|
+
} = T || {}, [N, y] = re.useState(g?.page || 1), [k, F] = re.useState(x?.pageSize || 20), [M, U] = re.useState(x?.sortKey || "updatedDate"), [S, O] = re.useState(x?.direction || "Descending"), D = ue(() => {
|
|
6121
6122
|
const B = [on];
|
|
6122
6123
|
return o && B.push(cn), u && B.push(dn), p && B.push(mn), h && B.push(un), r && B.push(hn), w && B.push(pn), d && B.push(gn), f && B.push(bn), b && B.push(fn), B.push(xn), B;
|
|
6123
6124
|
}, [o, u, p, h, r, w, d, f, b]), P = ue(() => {
|
|
@@ -6155,13 +6156,13 @@ function Zl(t) {
|
|
|
6155
6156
|
const ne = String(B || "");
|
|
6156
6157
|
return ne === "Ascending" || ne === "Descending" ? ne : ne.toLowerCase() === "ascending" ? "Ascending" : "Descending";
|
|
6157
6158
|
}, R = (B) => {
|
|
6158
|
-
const ne = v.current, J = B?.requestType, we = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other",
|
|
6159
|
-
field:
|
|
6160
|
-
dir: _(
|
|
6159
|
+
const ne = v.current, J = B?.requestType, we = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Ie = B?.pageSize ?? ne?.pageSettings?.pageSize ?? k, Ue = B?.currentPage ?? ne?.pageSettings?.currentPage ?? l, st = B?.columnName && B?.direction ? [{ field: B.columnName, dir: _(B.direction) }] : (ne?.sortSettings?.columns || []).map((Oe) => ({
|
|
6160
|
+
field: Oe.field,
|
|
6161
|
+
dir: _(Oe.direction ?? Oe.dir)
|
|
6161
6162
|
})), lt = B?.searchString ?? "", it = B?.columns ?? ne?.filterSettings?.columns ?? [];
|
|
6162
6163
|
return {
|
|
6163
6164
|
reason: we,
|
|
6164
|
-
page: { index: Ue, size:
|
|
6165
|
+
page: { index: Ue, size: Ie, skip: (Ue - 1) * Ie, take: Ie },
|
|
6165
6166
|
sort: st,
|
|
6166
6167
|
// [{ field, dir: 'Ascending'|'Descending' }]
|
|
6167
6168
|
search: lt,
|
|
@@ -6171,7 +6172,7 @@ function Zl(t) {
|
|
|
6171
6172
|
}, Y = (B) => {
|
|
6172
6173
|
setTimeout(() => {
|
|
6173
6174
|
v?.current?.hideSpinner();
|
|
6174
|
-
}, 1e3), B.requestType === "paging" && (y(B.currentPage), F(B.pageSize)), B.requestType === "sorting" && (U(B.columnName || "updatedDate"),
|
|
6175
|
+
}, 1e3), B.requestType === "paging" && (y(B.currentPage), F(B.pageSize)), B.requestType === "sorting" && (U(B.columnName || "updatedDate"), O(B.direction === "Ascending" ? "ASC" : "DESC")), I && I(R(B), B);
|
|
6175
6176
|
}, W = (B) => {
|
|
6176
6177
|
typeof G == "function" && G(B?.rowData, B);
|
|
6177
6178
|
}, pe = () => {
|
|
@@ -6179,15 +6180,15 @@ function Zl(t) {
|
|
|
6179
6180
|
return A && B.push(/* @__PURE__ */ e(St, { type: "checkbox", width: "50" }, "__checkbox__")), E.forEach((ne, J) => {
|
|
6180
6181
|
const {
|
|
6181
6182
|
field: we,
|
|
6182
|
-
headerText:
|
|
6183
|
+
headerText: Ie,
|
|
6183
6184
|
width: Ue,
|
|
6184
6185
|
textAlign: st = "Left",
|
|
6185
6186
|
template: lt,
|
|
6186
6187
|
isPrimaryKey: it,
|
|
6187
|
-
showInColumnChooser:
|
|
6188
|
+
showInColumnChooser: Oe = !0,
|
|
6188
6189
|
allowFiltering: Ra = !0,
|
|
6189
|
-
allowSorting:
|
|
6190
|
-
type:
|
|
6190
|
+
allowSorting: Ia = !0,
|
|
6191
|
+
type: Oa,
|
|
6191
6192
|
format: Pa,
|
|
6192
6193
|
visible: La = !0,
|
|
6193
6194
|
minWidth: Ma,
|
|
@@ -6200,15 +6201,15 @@ function Zl(t) {
|
|
|
6200
6201
|
St,
|
|
6201
6202
|
{
|
|
6202
6203
|
field: we,
|
|
6203
|
-
headerText:
|
|
6204
|
+
headerText: Ie,
|
|
6204
6205
|
width: Ue,
|
|
6205
6206
|
textAlign: st,
|
|
6206
6207
|
template: lt,
|
|
6207
6208
|
isPrimaryKey: it,
|
|
6208
|
-
showInColumnChooser:
|
|
6209
|
+
showInColumnChooser: Oe,
|
|
6209
6210
|
allowFiltering: Ra,
|
|
6210
|
-
allowSorting:
|
|
6211
|
-
type:
|
|
6211
|
+
allowSorting: Ia,
|
|
6212
|
+
type: Oa,
|
|
6212
6213
|
format: Pa,
|
|
6213
6214
|
visible: La,
|
|
6214
6215
|
minWidth: Ma,
|
|
@@ -6610,7 +6611,7 @@ const Rs = [
|
|
|
6610
6611
|
thumb: "https://images.unsplash.com/photo-1522202176988-66273c2fd55f?q=80&w=640&auto=format&fit=crop",
|
|
6611
6612
|
excerpt: "Community and business partners joined KCC leadership to recognize outstanding collaborations and celebrate student success…"
|
|
6612
6613
|
}
|
|
6613
|
-
],
|
|
6614
|
+
], Is = {
|
|
6614
6615
|
sm: {
|
|
6615
6616
|
wrap: "max-w-md",
|
|
6616
6617
|
itemThumb: "h-14 w-20",
|
|
@@ -6635,7 +6636,7 @@ const Rs = [
|
|
|
6635
6636
|
excerpt: "text-sm text-zinc-600 dark:text-zinc-300 line-clamp-2"
|
|
6636
6637
|
}
|
|
6637
6638
|
}, Bt = ({ label: t }) => /* @__PURE__ */ e("span", { className: "mt-1 inline-flex items-center rounded-full border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-900 px-2 py-0.5 text-[11px] font-semibold tracking-wide", children: t });
|
|
6638
|
-
function
|
|
6639
|
+
function Os({
|
|
6639
6640
|
size: t = "md",
|
|
6640
6641
|
showCheckbox: a = !1,
|
|
6641
6642
|
checkboxPosition: s = "top-left",
|
|
@@ -6646,7 +6647,7 @@ function Is({
|
|
|
6646
6647
|
// spread for identity fields: _id / id / instanceId etc.
|
|
6647
6648
|
...u
|
|
6648
6649
|
}) {
|
|
6649
|
-
const p = oe(t), b = ce[p], f =
|
|
6650
|
+
const p = oe(t), b = ce[p], f = Is[p];
|
|
6650
6651
|
return /* @__PURE__ */ n(
|
|
6651
6652
|
ie,
|
|
6652
6653
|
{
|
|
@@ -6703,7 +6704,7 @@ function Is({
|
|
|
6703
6704
|
}
|
|
6704
6705
|
);
|
|
6705
6706
|
}
|
|
6706
|
-
|
|
6707
|
+
Os.propTypes = {
|
|
6707
6708
|
size: c.string,
|
|
6708
6709
|
showCheckbox: c.bool,
|
|
6709
6710
|
checkboxPosition: c.oneOf(["top-left", "top-right"]),
|
|
@@ -7001,7 +7002,7 @@ function Gs({
|
|
|
7001
7002
|
ev: A,
|
|
7002
7003
|
sizeMeta: d,
|
|
7003
7004
|
isSelected: E === b,
|
|
7004
|
-
onClick: (
|
|
7005
|
+
onClick: (I) => z(I, E)
|
|
7005
7006
|
},
|
|
7006
7007
|
A._id || A.id || E
|
|
7007
7008
|
)) }),
|
|
@@ -7015,7 +7016,7 @@ function Gs({
|
|
|
7015
7016
|
ev: A,
|
|
7016
7017
|
sizeMeta: d,
|
|
7017
7018
|
isSelected: E === b,
|
|
7018
|
-
onClick: (
|
|
7019
|
+
onClick: (I) => z(I, E)
|
|
7019
7020
|
},
|
|
7020
7021
|
A._id || A.id || E
|
|
7021
7022
|
)) })
|
|
@@ -7191,13 +7192,13 @@ function Xs({
|
|
|
7191
7192
|
onPin: b,
|
|
7192
7193
|
...f
|
|
7193
7194
|
}) {
|
|
7194
|
-
const [r, w] = L(u), d = oe(t), h = ce[d], z = Ws[d], $ = (
|
|
7195
|
-
w(j), i?.(
|
|
7196
|
-
}, A = (
|
|
7197
|
-
const j = { ...
|
|
7195
|
+
const [r, w] = L(u), d = oe(t), h = ce[d], z = Ws[d], $ = (I, j) => {
|
|
7196
|
+
w(j), i?.(I);
|
|
7197
|
+
}, A = (I) => {
|
|
7198
|
+
const j = { ...I, starred: !I.starred };
|
|
7198
7199
|
p?.(j);
|
|
7199
|
-
}, E = (
|
|
7200
|
-
const j = { ...
|
|
7200
|
+
}, E = (I) => {
|
|
7201
|
+
const j = { ...I, pinned: !I.pinned };
|
|
7201
7202
|
b?.(j);
|
|
7202
7203
|
};
|
|
7203
7204
|
return /* @__PURE__ */ n(
|
|
@@ -7213,17 +7214,17 @@ function Xs({
|
|
|
7213
7214
|
children: [
|
|
7214
7215
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${h.title}`, children: m }) }),
|
|
7215
7216
|
/* @__PURE__ */ e(be, { placeholder: "Type to search..." }),
|
|
7216
|
-
/* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((
|
|
7217
|
+
/* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((I, j) => /* @__PURE__ */ e(
|
|
7217
7218
|
Js,
|
|
7218
7219
|
{
|
|
7219
|
-
email:
|
|
7220
|
+
email: I,
|
|
7220
7221
|
sizeMeta: z,
|
|
7221
7222
|
isSelected: j === r,
|
|
7222
7223
|
onClick: (V) => $(V, j),
|
|
7223
7224
|
onStar: A,
|
|
7224
7225
|
onPin: E
|
|
7225
7226
|
},
|
|
7226
|
-
|
|
7227
|
+
I._id || I.id || j
|
|
7227
7228
|
)) }),
|
|
7228
7229
|
/* @__PURE__ */ e("div", { className: "mt-4 pt-3 border-t border-zinc-200 dark:border-zinc-800", children: /* @__PURE__ */ e("button", { className: "w-full text-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" }) })
|
|
7229
7230
|
]
|
|
@@ -7466,7 +7467,7 @@ function el({
|
|
|
7466
7467
|
contact: A,
|
|
7467
7468
|
sizeMeta: d,
|
|
7468
7469
|
isSelected: E === b,
|
|
7469
|
-
onClick: (
|
|
7470
|
+
onClick: (I) => h(I, E)
|
|
7470
7471
|
},
|
|
7471
7472
|
A._id || A.id || E
|
|
7472
7473
|
)) }),
|
|
@@ -7485,7 +7486,7 @@ function el({
|
|
|
7485
7486
|
contact: A,
|
|
7486
7487
|
sizeMeta: d,
|
|
7487
7488
|
isSelected: E === b,
|
|
7488
|
-
onClick: (
|
|
7489
|
+
onClick: (I) => h(I, E)
|
|
7489
7490
|
},
|
|
7490
7491
|
A._id || A.id || E
|
|
7491
7492
|
)) })
|
|
@@ -7662,7 +7663,7 @@ function rl({
|
|
|
7662
7663
|
"aria-label": "View Transactions (mock)",
|
|
7663
7664
|
children: [
|
|
7664
7665
|
"View Transactions",
|
|
7665
|
-
/* @__PURE__ */ e(
|
|
7666
|
+
/* @__PURE__ */ e(Ir, { className: "h-4 w-4" })
|
|
7666
7667
|
]
|
|
7667
7668
|
}
|
|
7668
7669
|
)
|
|
@@ -7991,7 +7992,7 @@ function cl({
|
|
|
7991
7992
|
"Download All"
|
|
7992
7993
|
] }),
|
|
7993
7994
|
/* @__PURE__ */ n("button", { className: "w-full px-4 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left flex items-center gap-2", children: [
|
|
7994
|
-
/* @__PURE__ */ e(
|
|
7995
|
+
/* @__PURE__ */ e(Or, { className: "h-4 w-4" }),
|
|
7995
7996
|
"Share Drive"
|
|
7996
7997
|
] })
|
|
7997
7998
|
] })
|
|
@@ -8206,7 +8207,7 @@ function gl({
|
|
|
8206
8207
|
...p
|
|
8207
8208
|
}) {
|
|
8208
8209
|
const [b, f] = L(o), r = oe(t), w = ce[r], d = ml[r], h = (A) => {
|
|
8209
|
-
f((E) => E.filter((
|
|
8210
|
+
f((E) => E.filter((I) => I.id !== A.id));
|
|
8210
8211
|
}, z = b.find((A) => A.type === "banner"), $ = b.filter((A) => A.type !== "banner");
|
|
8211
8212
|
return /* @__PURE__ */ n(
|
|
8212
8213
|
ie,
|
|
@@ -8480,19 +8481,19 @@ export {
|
|
|
8480
8481
|
X as Input,
|
|
8481
8482
|
sl as LeaveBalanceMock,
|
|
8482
8483
|
Ta as ManageCollectionList,
|
|
8483
|
-
|
|
8484
|
+
On as Modal,
|
|
8484
8485
|
nt as MultiSelect,
|
|
8485
|
-
|
|
8486
|
+
Os as NewsMock,
|
|
8486
8487
|
Xs as O365MailsMock,
|
|
8487
8488
|
Vn as OptionsMenu,
|
|
8488
8489
|
jn as PageHeader,
|
|
8489
8490
|
jl as PageLayout,
|
|
8490
|
-
|
|
8491
|
+
Il as Pagination,
|
|
8491
8492
|
ga as RadioGroup,
|
|
8492
8493
|
be as SearchBar,
|
|
8493
8494
|
ft as Select,
|
|
8494
8495
|
ie as SelectableCard,
|
|
8495
|
-
|
|
8496
|
+
Ol as Sidebar,
|
|
8496
8497
|
fa as Spinner,
|
|
8497
8498
|
xa as Textarea,
|
|
8498
8499
|
Ql as ToastProvider,
|