unifyedx-storybook-new 0.2.92 → 0.2.94
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.css +1 -1
- package/dist/unifyedx-storybook-new.css.br +0 -0
- package/dist/unifyedx-storybook-new.css.gz +0 -0
- package/dist/unifyedx-storybook-new.es.js +226 -226
- package/dist/unifyedx-storybook-new.es.js.br +0 -0
- package/dist/unifyedx-storybook-new.es.js.gz +0 -0
- package/dist/{vendor-DPyu0wpu.js → vendor-j6TpyJEY.js} +110 -113
- package/dist/vendor-j6TpyJEY.js.br +0 -0
- package/dist/vendor-j6TpyJEY.js.gz +0 -0
- package/dist/vendor-lodash-DUUkOZG4.js +645 -0
- package/dist/vendor-lodash-DUUkOZG4.js.br +0 -0
- package/dist/vendor-lodash-DUUkOZG4.js.gz +0 -0
- package/package.json +12 -7
- package/dist/vendor-DPyu0wpu.js.br +0 -0
- package/dist/vendor-DPyu0wpu.js.gz +0 -0
- package/dist/vendor-lodash-C6XpDdXw.js +0 -843
- package/dist/vendor-lodash-C6XpDdXw.js.br +0 -0
- package/dist/vendor-lodash-C6XpDdXw.js.gz +0 -0
- package/dist/vendor-syncfusion-BHkXI8Em.js +0 -64222
- package/dist/vendor-syncfusion-BHkXI8Em.js.br +0 -0
- package/dist/vendor-syncfusion-BHkXI8Em.js.gz +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e, Fragment as re } from "react/jsx-runtime";
|
|
2
2
|
import ne, { useState as B, useMemo as ae, useId as Ze, Fragment as ee, useEffect as te, useCallback as K, useRef as ge } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { c as Z, U as ct, X as Ne, P as c, L as Ra, C as ve, a as tt, D as dt, f as Ct, b as Wt, F as Ia, d as Oa, e as Ma, T as Be, u as Pa, I as Jt, g as Xt, h as La, i as Ba, j as Va, k as Qt, S as yt, l as Ht, M as ja, m as _a, n as xt, o as Ga, A as Ua, E as Zt, p as qa, q as Ya, r as Wa, s as Ja, t as Kt, v as Xa, w as Qa, x as Ha, y as Za, z as Ka, B as er, G as Ve, H as zt, J as St, K as tr, N as ea, O as ar, Q as vt, R as rr, V as nr, W as je, Y as sr, Z as lr, _ as ir, $ as or, a0 as cr, a1 as dr, a2 as Dt, a3 as mr, a4 as ur, a5 as hr, a6 as pr, a7 as gr, a8 as br, a9 as fr, aa as yr, ab as Te, ac as ta, ad as xr, ae as vr, af as Nr, ag as wr, ah as kr, ai as aa, aj as Cr, ak as zr, al as ra, am as Sr, an as mt, ao as na, ap as Dr } from "./vendor-j6TpyJEY.js";
|
|
4
4
|
import { Popover as $r, PopoverButton as Ar, PopoverPanel as Tr, Transition as fe, Dialog as xe, TransitionChild as ke, DialogPanel as Fe, DialogTitle as at, TabGroup as Fr, TabList as Er, Tab as le, TabPanels as Rr, RadioGroup as qe, Listbox as oe, ListboxButton as Ir, ListboxOptions as Or, ListboxOption as Mr, SwitchGroup as Pr, Switch as it, Menu as Lr, MenuButton as Br, Portal as Vr, MenuItems as jr, MenuItem as _r, DialogBackdrop as Gr } from "@headlessui/react";
|
|
5
5
|
import { motion as ce, AnimatePresence as De } from "framer-motion";
|
|
6
|
-
import
|
|
6
|
+
import Ur from "lodash/debounce";
|
|
7
7
|
import { useFloating as qr, offset as Yr, flip as Wr, shift as Jr, autoUpdate as Xr } from "@floating-ui/react";
|
|
8
8
|
import ot, { debounce as Qr } from "lodash";
|
|
9
9
|
import { ToastContainer as Hr, Slide as Zr, toast as Me } from "react-toastify";
|
|
10
10
|
import "react-toastify/dist/ReactToastify.css";
|
|
11
|
-
import {
|
|
11
|
+
import { Page as Kr, Selection as en, Sort as tn, Filter as an, Group as rn, Search as nn, ExcelExport as sn, PdfExport as ln, ColumnChooser as on, Resize as cn, Reorder as dn, Print as mn, GridComponent as un, ColumnsDirective as hn, Inject as pn, ColumnDirective as $t } from "@syncfusion/ej2-react-grids";
|
|
12
12
|
const gn = (t) => {
|
|
13
13
|
let a = 2166136261;
|
|
14
14
|
for (let s = 0; s < t.length; s++)
|
|
@@ -910,9 +910,9 @@ const vn = {
|
|
|
910
910
|
"select",
|
|
911
911
|
{
|
|
912
912
|
value: F.operator || "in",
|
|
913
|
-
onChange: (
|
|
913
|
+
onChange: (z) => T.setFieldValue(`${E}.operator`, z.target.value),
|
|
914
914
|
className: "filter-select",
|
|
915
|
-
children: U.operators.map((
|
|
915
|
+
children: U.operators.map((z) => /* @__PURE__ */ e("option", { value: z, children: z === "in" ? "Includes" : "Excludes" }, z))
|
|
916
916
|
}
|
|
917
917
|
)
|
|
918
918
|
] }),
|
|
@@ -925,8 +925,8 @@ const vn = {
|
|
|
925
925
|
id: `select-all-${E}`,
|
|
926
926
|
className: "filter-checkbox-input",
|
|
927
927
|
checked: U.options.length > 0 && m.length === U.options.length,
|
|
928
|
-
onChange: (
|
|
929
|
-
const M =
|
|
928
|
+
onChange: (z) => {
|
|
929
|
+
const M = z.target.checked ? U.options.map((q) => q.value) : [];
|
|
930
930
|
T.setFieldValue(`${E}.values`, M);
|
|
931
931
|
}
|
|
932
932
|
}
|
|
@@ -940,16 +940,16 @@ const vn = {
|
|
|
940
940
|
}
|
|
941
941
|
)
|
|
942
942
|
] }),
|
|
943
|
-
U.options.map((
|
|
943
|
+
U.options.map((z) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
|
|
944
944
|
/* @__PURE__ */ e(
|
|
945
945
|
"input",
|
|
946
946
|
{
|
|
947
947
|
type: "checkbox",
|
|
948
|
-
id: `${E}-${
|
|
948
|
+
id: `${E}-${z.value}`,
|
|
949
949
|
className: "filter-checkbox-input",
|
|
950
|
-
checked: m.includes(
|
|
950
|
+
checked: m.includes(z.value),
|
|
951
951
|
onChange: (M) => {
|
|
952
|
-
const q = M.target.checked ? [...m,
|
|
952
|
+
const q = M.target.checked ? [...m, z.value] : m.filter((X) => X !== z.value);
|
|
953
953
|
T.setFieldValue(`${E}.values`, q);
|
|
954
954
|
}
|
|
955
955
|
}
|
|
@@ -957,12 +957,12 @@ const vn = {
|
|
|
957
957
|
/* @__PURE__ */ e(
|
|
958
958
|
"label",
|
|
959
959
|
{
|
|
960
|
-
htmlFor: `${E}-${
|
|
960
|
+
htmlFor: `${E}-${z.value}`,
|
|
961
961
|
className: "filter-checkbox-label",
|
|
962
|
-
children:
|
|
962
|
+
children: z.label
|
|
963
963
|
}
|
|
964
964
|
)
|
|
965
|
-
] },
|
|
965
|
+
] }, z.value))
|
|
966
966
|
] })
|
|
967
967
|
] });
|
|
968
968
|
case "multiselect-users":
|
|
@@ -974,9 +974,9 @@ const vn = {
|
|
|
974
974
|
"select",
|
|
975
975
|
{
|
|
976
976
|
value: F.operator || "in",
|
|
977
|
-
onChange: (
|
|
977
|
+
onChange: (z) => T.setFieldValue(`${E}.operator`, z.target.value),
|
|
978
978
|
className: "filter-select",
|
|
979
|
-
children: U.operators.map((
|
|
979
|
+
children: U.operators.map((z) => /* @__PURE__ */ e("option", { value: z, children: z === "in" ? "Includes" : "Excludes" }, z))
|
|
980
980
|
}
|
|
981
981
|
)
|
|
982
982
|
] }),
|
|
@@ -989,8 +989,8 @@ const vn = {
|
|
|
989
989
|
id: `select-all-users-${E}`,
|
|
990
990
|
className: "filter-checkbox-input",
|
|
991
991
|
checked: k.length > 0 && m.length === k.length,
|
|
992
|
-
onChange: (
|
|
993
|
-
const M =
|
|
992
|
+
onChange: (z) => {
|
|
993
|
+
const M = z.target.checked ? k.map((q) => q.email) : [];
|
|
994
994
|
T.setFieldValue(
|
|
995
995
|
`${E}.values`,
|
|
996
996
|
M
|
|
@@ -1007,16 +1007,16 @@ const vn = {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
)
|
|
1009
1009
|
] }),
|
|
1010
|
-
k.map((
|
|
1010
|
+
k.map((z) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
|
|
1011
1011
|
/* @__PURE__ */ e(
|
|
1012
1012
|
"input",
|
|
1013
1013
|
{
|
|
1014
1014
|
type: "checkbox",
|
|
1015
|
-
id: `${E}-${
|
|
1015
|
+
id: `${E}-${z.email}`,
|
|
1016
1016
|
className: "filter-checkbox-input",
|
|
1017
|
-
checked: m.includes(
|
|
1017
|
+
checked: m.includes(z.email),
|
|
1018
1018
|
onChange: (M) => {
|
|
1019
|
-
const q = M.target.checked ? [...m,
|
|
1019
|
+
const q = M.target.checked ? [...m, z.email] : m.filter((X) => X !== z.email);
|
|
1020
1020
|
T.setFieldValue(
|
|
1021
1021
|
`${E}.values`,
|
|
1022
1022
|
q
|
|
@@ -1027,19 +1027,19 @@ const vn = {
|
|
|
1027
1027
|
/* @__PURE__ */ n(
|
|
1028
1028
|
"label",
|
|
1029
1029
|
{
|
|
1030
|
-
htmlFor: `${E}-${
|
|
1030
|
+
htmlFor: `${E}-${z.email}`,
|
|
1031
1031
|
className: "filter-checkbox-label",
|
|
1032
1032
|
children: [
|
|
1033
|
-
/* @__PURE__ */ e("span", { className: "user-label-name", children:
|
|
1034
|
-
/* @__PURE__ */ e("span", { className: "user-label-email", children:
|
|
1033
|
+
/* @__PURE__ */ e("span", { className: "user-label-name", children: z.name }),
|
|
1034
|
+
/* @__PURE__ */ e("span", { className: "user-label-email", children: z.email })
|
|
1035
1035
|
]
|
|
1036
1036
|
}
|
|
1037
1037
|
)
|
|
1038
|
-
] },
|
|
1038
|
+
] }, z.email))
|
|
1039
1039
|
] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
|
|
1040
1040
|
] });
|
|
1041
1041
|
case "date":
|
|
1042
|
-
const P = F.values || [], [$, p] = P,
|
|
1042
|
+
const P = F.values || [], [$, p] = P, S = $ && p, I = P[0] || null, w = P[1] || null, D = {
|
|
1043
1043
|
startDate: I instanceof Date ? I.toISOString().slice(0, 10) : null,
|
|
1044
1044
|
endDate: I instanceof Date ? I.toISOString().slice(0, 10) : null
|
|
1045
1045
|
}, y = {
|
|
@@ -1053,17 +1053,17 @@ const vn = {
|
|
|
1053
1053
|
{ key: "this_month", label: "This Month" },
|
|
1054
1054
|
{ key: "last_month", label: "Last Month" },
|
|
1055
1055
|
{ key: "custom", label: "Custom" }
|
|
1056
|
-
], R = (
|
|
1057
|
-
if (
|
|
1056
|
+
], R = (z) => {
|
|
1057
|
+
if (z === "anytime") {
|
|
1058
1058
|
T.setFieldValue(`${E}.values`, []), T.setFieldValue(`${E}.range`, "anytime");
|
|
1059
1059
|
return;
|
|
1060
1060
|
}
|
|
1061
|
-
if (
|
|
1061
|
+
if (z === "custom") {
|
|
1062
1062
|
T.setFieldValue(`${E}.range`, "custom");
|
|
1063
1063
|
return;
|
|
1064
1064
|
}
|
|
1065
|
-
const [M, q] = Tn(
|
|
1066
|
-
T.setFieldValue(`${E}.values`, M && q ? [M, q] : []), T.setFieldValue(`${E}.range`,
|
|
1065
|
+
const [M, q] = Tn(z);
|
|
1066
|
+
T.setFieldValue(`${E}.values`, M && q ? [M, q] : []), T.setFieldValue(`${E}.range`, z);
|
|
1067
1067
|
};
|
|
1068
1068
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
1069
1069
|
/* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
|
|
@@ -1072,12 +1072,12 @@ const vn = {
|
|
|
1072
1072
|
"select",
|
|
1073
1073
|
{
|
|
1074
1074
|
value: F.operator,
|
|
1075
|
-
onChange: (
|
|
1075
|
+
onChange: (z) => T.setFieldValue(`${E}.operator`, z.target.value),
|
|
1076
1076
|
className: "filter-select",
|
|
1077
|
-
children: U.operators.map((
|
|
1077
|
+
children: U.operators.map((z) => /* @__PURE__ */ e("option", { value: z, children: z === "in" ? "Is" : "Is not" }, z))
|
|
1078
1078
|
}
|
|
1079
1079
|
),
|
|
1080
|
-
|
|
1080
|
+
S && /* @__PURE__ */ e(
|
|
1081
1081
|
"button",
|
|
1082
1082
|
{
|
|
1083
1083
|
type: "button",
|
|
@@ -1092,8 +1092,8 @@ const vn = {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
)
|
|
1094
1094
|
] }),
|
|
1095
|
-
/* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: N.map((
|
|
1096
|
-
const M = F.range ===
|
|
1095
|
+
/* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: N.map((z) => {
|
|
1096
|
+
const M = F.range === z.key || z.key === "anytime" && (!Array.isArray(F.values) || F.values.length === 0);
|
|
1097
1097
|
return /* @__PURE__ */ n(
|
|
1098
1098
|
"label",
|
|
1099
1099
|
{
|
|
@@ -1105,15 +1105,15 @@ const vn = {
|
|
|
1105
1105
|
type: "radio",
|
|
1106
1106
|
name: `preset-${E}`,
|
|
1107
1107
|
checked: M,
|
|
1108
|
-
onChange: () => R(
|
|
1108
|
+
onChange: () => R(z.key),
|
|
1109
1109
|
className: "h-4 w-4"
|
|
1110
1110
|
}
|
|
1111
1111
|
),
|
|
1112
|
-
/* @__PURE__ */ e("span", { className: "text-sm text-[#222]", children:
|
|
1113
|
-
|
|
1112
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-[#222]", children: z.label }),
|
|
1113
|
+
z.key === "anytime" && M && /* @__PURE__ */ e("span", { className: "ml-2 text-xs bg-yellow-100 text-yellow-800 px-2 py-0.5 rounded", children: "Default" })
|
|
1114
1114
|
]
|
|
1115
1115
|
},
|
|
1116
|
-
|
|
1116
|
+
z.key
|
|
1117
1117
|
);
|
|
1118
1118
|
}) }) }),
|
|
1119
1119
|
/* @__PURE__ */ n("div", { className: "", children: [
|
|
@@ -1125,9 +1125,9 @@ const vn = {
|
|
|
1125
1125
|
{
|
|
1126
1126
|
asSingle: !0,
|
|
1127
1127
|
useRange: !1,
|
|
1128
|
-
value:
|
|
1129
|
-
onChange: (
|
|
1130
|
-
const M =
|
|
1128
|
+
value: D,
|
|
1129
|
+
onChange: (z) => {
|
|
1130
|
+
const M = z?.startDate ? _e(new Date(z.startDate)) : null, q = P[1] || null;
|
|
1131
1131
|
M && (T.setFieldValue(`${E}.values`, [M, q]), T.setFieldValue(`${E}.range`, "custom"));
|
|
1132
1132
|
},
|
|
1133
1133
|
inputClassName: "w-full rounded-xl border border-[#767676] px-4 py-2 text-sm font-normal text-[#101112] focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500",
|
|
@@ -1150,8 +1150,8 @@ const vn = {
|
|
|
1150
1150
|
asSingle: !0,
|
|
1151
1151
|
useRange: !1,
|
|
1152
1152
|
value: y,
|
|
1153
|
-
onChange: (
|
|
1154
|
-
const M =
|
|
1153
|
+
onChange: (z) => {
|
|
1154
|
+
const M = z?.startDate ? Ge(new Date(z.startDate)) : null, q = P[0] || null;
|
|
1155
1155
|
M && (T.setFieldValue(`${E}.values`, [q, M]), T.setFieldValue(`${E}.range`, "custom"));
|
|
1156
1156
|
},
|
|
1157
1157
|
inputClassName: "w-full rounded-xl border border-[#767676] px-4 py-2 text-sm font-normal text-[#101112] focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500",
|
|
@@ -2694,17 +2694,17 @@ const Ee = qn(), Ke = Ee.axiosGet, Ml = Ee.axiosDelete, ft = Ee.axiosPost, Pl =
|
|
|
2694
2694
|
d.filter((y) => C.has(y.id)).forEach((y) => {
|
|
2695
2695
|
F.find((N) => N.id === y.id) || m({ ...y, permission: V.name });
|
|
2696
2696
|
}), T(/* @__PURE__ */ new Set()), r("");
|
|
2697
|
-
},
|
|
2697
|
+
}, S = (y) => {
|
|
2698
2698
|
_(y), F.forEach(
|
|
2699
2699
|
(N, R) => L(R, { ...F[R], permission: y.name })
|
|
2700
2700
|
);
|
|
2701
2701
|
}, I = async (y) => {
|
|
2702
2702
|
try {
|
|
2703
2703
|
if (l === pe.DRIVE) {
|
|
2704
|
-
const N = y.pendingInvites.map((
|
|
2705
|
-
id:
|
|
2706
|
-
permission:
|
|
2707
|
-
type:
|
|
2704
|
+
const N = y.pendingInvites.map((z) => ({
|
|
2705
|
+
id: z.id,
|
|
2706
|
+
permission: z.permission,
|
|
2707
|
+
type: z.type.toLowerCase()
|
|
2708
2708
|
}));
|
|
2709
2709
|
o({
|
|
2710
2710
|
entity: t,
|
|
@@ -2724,10 +2724,10 @@ const Ee = qn(), Ke = Ee.axiosGet, Ml = Ee.axiosDelete, ft = Ee.axiosPost, Pl =
|
|
|
2724
2724
|
}));
|
|
2725
2725
|
o(N, i);
|
|
2726
2726
|
} else if (l === pe.ARTICLE) {
|
|
2727
|
-
const N = y.pendingInvites.map((
|
|
2728
|
-
id:
|
|
2729
|
-
permission:
|
|
2730
|
-
type:
|
|
2727
|
+
const N = y.pendingInvites.map((z) => ({
|
|
2728
|
+
id: z.id,
|
|
2729
|
+
permission: z.permission,
|
|
2730
|
+
type: z.type.toLowerCase()
|
|
2731
2731
|
}));
|
|
2732
2732
|
o({
|
|
2733
2733
|
entity: t,
|
|
@@ -2745,7 +2745,7 @@ const Ee = qn(), Ke = Ee.axiosGet, Ml = Ee.axiosDelete, ft = Ee.axiosPost, Pl =
|
|
|
2745
2745
|
}, w = (y) => {
|
|
2746
2746
|
const N = i[f.code].find((R) => R.name === y.name && R.permission !== "remove") || P.find((R) => R.name === y.name);
|
|
2747
2747
|
return N ? `${N.permission}` : "";
|
|
2748
|
-
},
|
|
2748
|
+
}, D = () => {
|
|
2749
2749
|
switch (l) {
|
|
2750
2750
|
case pe.DRIVE:
|
|
2751
2751
|
return "Share with others";
|
|
@@ -2759,7 +2759,7 @@ const Ee = qn(), Ke = Ee.axiosGet, Ml = Ee.axiosDelete, ft = Ee.axiosPost, Pl =
|
|
|
2759
2759
|
};
|
|
2760
2760
|
return ae(() => (console.log("InviteFlow - isChanged:", h, "pendingInvites.length:", P.length), P.length === 0 && !h), [P.length, h]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
|
|
2761
2761
|
/* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
|
|
2762
|
-
/* @__PURE__ */ e(xe.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children:
|
|
2762
|
+
/* @__PURE__ */ e(xe.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: D() }),
|
|
2763
2763
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
|
|
2764
2764
|
l === pe.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: [
|
|
2765
2765
|
/* @__PURE__ */ e(er, { className: "h-5 w-5" }),
|
|
@@ -2919,7 +2919,7 @@ const Ee = qn(), Ke = Ee.axiosGet, Ml = Ee.axiosDelete, ft = Ee.axiosPost, Pl =
|
|
|
2919
2919
|
oe,
|
|
2920
2920
|
{
|
|
2921
2921
|
value: V,
|
|
2922
|
-
onChange:
|
|
2922
|
+
onChange: S,
|
|
2923
2923
|
children: /* @__PURE__ */ n("div", { className: "relative", children: [
|
|
2924
2924
|
/* @__PURE__ */ n(oe.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: [
|
|
2925
2925
|
/* @__PURE__ */ n("span", { className: "flex items-center", children: [
|
|
@@ -3361,7 +3361,7 @@ const Ee = qn(), Ke = Ee.axiosGet, Ml = Ee.axiosDelete, ft = Ee.axiosPost, Pl =
|
|
|
3361
3361
|
b({ id: F, type: k, name: m }), _(v), g(be.MEMBERS);
|
|
3362
3362
|
}, E = (F, m = !1) => {
|
|
3363
3363
|
console.log("changedExistingShares", F), x(F);
|
|
3364
|
-
const k = ot.mapValues(t, ($) => $.map((p) => ({ id: p.id, permission: p.permission })).sort((p,
|
|
3364
|
+
const k = ot.mapValues(t, ($) => $.map((p) => ({ id: p.id, permission: p.permission })).sort((p, S) => p.id - S.id)), L = ot.mapValues(F, ($) => $.map((p) => ({ id: p.id, permission: p.permission })).sort((p, S) => p.id - S.id));
|
|
3365
3365
|
console.log("Existing data:", k), console.log("Changed data:", L);
|
|
3366
3366
|
const P = !ot.isEqual(k, L);
|
|
3367
3367
|
console.log("hasPermissionChanged:", P), T(P), P && (console.log("[AddUserGroupsRolesModal] Immediately syncing changes with parent"), s({ pendingInvites: [] }, F)), m && v === be.MANAGE ? console.log("[AddUserGroupsRolesModal] Staying in ManageFlow after removal") : g(v === be.MEMBERS ? V : be.INVITE);
|
|
@@ -3565,7 +3565,7 @@ function rt({
|
|
|
3565
3565
|
$ ? " text-gray-400 bg-white cursor-not-allowed" : p ? " bg-gray-200 text-gray-900" : " text-gray-900",
|
|
3566
3566
|
" relative cursor-default select-none py-2 pl-3 pr-9"
|
|
3567
3567
|
),
|
|
3568
|
-
children: ({ selected: p, active:
|
|
3568
|
+
children: ({ selected: p, active: S }) => /* @__PURE__ */ n(re, { children: [
|
|
3569
3569
|
/* @__PURE__ */ e(
|
|
3570
3570
|
"span",
|
|
3571
3571
|
{
|
|
@@ -3580,7 +3580,7 @@ function rt({
|
|
|
3580
3580
|
"span",
|
|
3581
3581
|
{
|
|
3582
3582
|
className: Ye(
|
|
3583
|
-
|
|
3583
|
+
S ? " text-gray-900" : " text-gray-600",
|
|
3584
3584
|
" absolute inset-y-0 right-0 flex items-center pr-4"
|
|
3585
3585
|
),
|
|
3586
3586
|
children: /* @__PURE__ */ e(tt, { className: "w-5 h-5", "aria-hidden": "true" })
|
|
@@ -3899,9 +3899,9 @@ function jl({
|
|
|
3899
3899
|
{ rootId: a, getId: i, getParent: l, getName: u }
|
|
3900
3900
|
), [t, a, i, l, u]), [T, A] = B({}), O = K(($) => {
|
|
3901
3901
|
const p = {};
|
|
3902
|
-
return (function
|
|
3902
|
+
return (function S(I) {
|
|
3903
3903
|
I.forEach((w) => {
|
|
3904
|
-
p[w.id] = !0, w.children?.length &&
|
|
3904
|
+
p[w.id] = !0, w.children?.length && S(w.children);
|
|
3905
3905
|
});
|
|
3906
3906
|
})($), p;
|
|
3907
3907
|
}, []);
|
|
@@ -3920,62 +3920,62 @@ function jl({
|
|
|
3920
3920
|
F.current = $?.x ?? 0;
|
|
3921
3921
|
}, L = K(
|
|
3922
3922
|
({ active: $, over: p }) => {
|
|
3923
|
-
const
|
|
3923
|
+
const S = F.current;
|
|
3924
3924
|
if (F.current = 0, U(null), !$ || !p) return;
|
|
3925
3925
|
const I = String($.id).replace(/^drag-/, ""), w = String(p.id).replace(/^drop-/, "");
|
|
3926
3926
|
if (!I || !w || I === w) return;
|
|
3927
|
-
let
|
|
3928
|
-
const y = Math.max(0, Math.floor(-
|
|
3927
|
+
let D = w;
|
|
3928
|
+
const y = Math.max(0, Math.floor(-S / b));
|
|
3929
3929
|
if (y > 0) {
|
|
3930
3930
|
let q = w;
|
|
3931
3931
|
for (let X = 0; X < y; X++) {
|
|
3932
3932
|
const Y = xa(_, q, null);
|
|
3933
3933
|
if (!Y) break;
|
|
3934
3934
|
if (!Y.parentId) {
|
|
3935
|
-
|
|
3935
|
+
D = a;
|
|
3936
3936
|
break;
|
|
3937
3937
|
}
|
|
3938
|
-
|
|
3938
|
+
D = Y.parentId, q = Y.parentId;
|
|
3939
3939
|
}
|
|
3940
3940
|
}
|
|
3941
|
-
if (d &&
|
|
3941
|
+
if (d && D === a) {
|
|
3942
3942
|
G(Le(C));
|
|
3943
3943
|
return;
|
|
3944
3944
|
}
|
|
3945
|
-
const N = Le(_), { newRoots: R, removed:
|
|
3946
|
-
if (!
|
|
3947
|
-
const M = ds(R,
|
|
3948
|
-
G(M), r?.({ sourceId: I, destParentId:
|
|
3945
|
+
const N = Le(_), { newRoots: R, removed: z } = cs(N, I);
|
|
3946
|
+
if (!z) return;
|
|
3947
|
+
const M = ds(R, D, z);
|
|
3948
|
+
G(M), r?.({ sourceId: I, destParentId: D, newTree: M });
|
|
3949
3949
|
},
|
|
3950
3950
|
[_, C, a, d, b, r]
|
|
3951
3951
|
), P = K(
|
|
3952
|
-
($, p = 0) => $.map((
|
|
3952
|
+
($, p = 0) => $.map((S) => /* @__PURE__ */ n(ne.Fragment, { children: [
|
|
3953
3953
|
/* @__PURE__ */ e(
|
|
3954
3954
|
as,
|
|
3955
3955
|
{
|
|
3956
|
-
node:
|
|
3956
|
+
node: S,
|
|
3957
3957
|
depth: p,
|
|
3958
|
-
expanded: !!T[
|
|
3959
|
-
onToggle: () => V(
|
|
3958
|
+
expanded: !!T[S.id],
|
|
3959
|
+
onToggle: () => V(S.id),
|
|
3960
3960
|
onSelect: o,
|
|
3961
3961
|
onCreateChild: f,
|
|
3962
3962
|
onRename: v,
|
|
3963
3963
|
onDelete: g,
|
|
3964
3964
|
renderActions: x,
|
|
3965
|
-
dragId: `drag-${
|
|
3966
|
-
dropId: `drop-${
|
|
3965
|
+
dragId: `drag-${S.id}`,
|
|
3966
|
+
dropId: `drop-${S.id}`,
|
|
3967
3967
|
indent: b
|
|
3968
3968
|
}
|
|
3969
3969
|
),
|
|
3970
|
-
T[
|
|
3971
|
-
] },
|
|
3970
|
+
T[S.id] && S.children?.length > 0 ? P(S.children, p + 1) : null
|
|
3971
|
+
] }, S.id)),
|
|
3972
3972
|
[T, b, f, g, v, o, x, V]
|
|
3973
3973
|
);
|
|
3974
3974
|
return ne.useMemo(() => {
|
|
3975
3975
|
if (!E) return null;
|
|
3976
3976
|
const $ = String(E).replace(/^drag-/, "");
|
|
3977
|
-
function p(
|
|
3978
|
-
for (const I of
|
|
3977
|
+
function p(S) {
|
|
3978
|
+
for (const I of S) {
|
|
3979
3979
|
if (I.id === $) return I;
|
|
3980
3980
|
const w = I.children?.length ? p(I.children) : null;
|
|
3981
3981
|
if (w) return w;
|
|
@@ -4249,7 +4249,7 @@ function ms({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4249
4249
|
{
|
|
4250
4250
|
name: r.key,
|
|
4251
4251
|
defaultValue: r.default,
|
|
4252
|
-
value: o[r.key]
|
|
4252
|
+
value: o[r.key] !== void 0 && o[r.key] !== null ? o[r.key] : r.default !== void 0 ? r.default : "",
|
|
4253
4253
|
onChange: (d) => {
|
|
4254
4254
|
const b = { ...o, [r.key]: d };
|
|
4255
4255
|
h(b);
|
|
@@ -4604,8 +4604,8 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4604
4604
|
}, []);
|
|
4605
4605
|
const A = (m) => {
|
|
4606
4606
|
const k = ($, p) => {
|
|
4607
|
-
r((
|
|
4608
|
-
const I = [...
|
|
4607
|
+
r((S) => {
|
|
4608
|
+
const I = [...S];
|
|
4609
4609
|
return I[$][m.key] = p, I;
|
|
4610
4610
|
});
|
|
4611
4611
|
}, L = ($) => i[l.key]?.[$]?.[m.key], P = ($) => {
|
|
@@ -4619,7 +4619,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4619
4619
|
H,
|
|
4620
4620
|
{
|
|
4621
4621
|
value: $[m.key] || "",
|
|
4622
|
-
onChange: (
|
|
4622
|
+
onChange: (S) => k(p, S.target.value),
|
|
4623
4623
|
placeholder: m.placeholder || `Enter ${m.label}`,
|
|
4624
4624
|
required: m.required,
|
|
4625
4625
|
className: `w-full ${L(p) ? "border-red-500" : ""}`
|
|
@@ -4633,7 +4633,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4633
4633
|
da,
|
|
4634
4634
|
{
|
|
4635
4635
|
value: $[m.key] || "",
|
|
4636
|
-
onChange: (
|
|
4636
|
+
onChange: (S) => k(p, S.target.value),
|
|
4637
4637
|
placeholder: m.placeholder || `Enter ${m.label}`,
|
|
4638
4638
|
required: m.required,
|
|
4639
4639
|
className: `w-full ${L(p) ? "border-red-500" : ""}`,
|
|
@@ -4652,12 +4652,12 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4652
4652
|
min: m.min,
|
|
4653
4653
|
max: m.max,
|
|
4654
4654
|
step: m.step,
|
|
4655
|
-
onChange: (
|
|
4656
|
-
onBlur: (
|
|
4657
|
-
const I =
|
|
4655
|
+
onChange: (S) => k(p, S.target.value),
|
|
4656
|
+
onBlur: (S) => {
|
|
4657
|
+
const I = S.target.value;
|
|
4658
4658
|
if (I !== "" && I !== null && I !== void 0) {
|
|
4659
4659
|
const w = Number(I);
|
|
4660
|
-
isNaN(w) || (m.min !== void 0 && w < m.min ? (
|
|
4660
|
+
isNaN(w) || (m.min !== void 0 && w < m.min ? (S.target.setCustomValidity(`${m.label} must be at least ${m.min}`), S.target.reportValidity()) : m.max !== void 0 && w > m.max ? (S.target.setCustomValidity(`${m.label} must not exceed ${m.max}`), S.target.reportValidity()) : S.target.setCustomValidity(""));
|
|
4661
4661
|
}
|
|
4662
4662
|
},
|
|
4663
4663
|
placeholder: m.placeholder || `Enter ${m.label}`,
|
|
@@ -4682,7 +4682,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4682
4682
|
{
|
|
4683
4683
|
type: "email",
|
|
4684
4684
|
value: $[m.key] || "",
|
|
4685
|
-
onChange: (
|
|
4685
|
+
onChange: (S) => k(p, S.target.value),
|
|
4686
4686
|
placeholder: m.placeholder || "Enter email address",
|
|
4687
4687
|
required: m.required,
|
|
4688
4688
|
className: `w-full ${L(p) ? "border-red-500" : ""}`
|
|
@@ -4697,7 +4697,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4697
4697
|
{
|
|
4698
4698
|
type: "url",
|
|
4699
4699
|
value: $[m.key] || "",
|
|
4700
|
-
onChange: (
|
|
4700
|
+
onChange: (S) => k(p, S.target.value),
|
|
4701
4701
|
placeholder: m.placeholder || "Enter URL",
|
|
4702
4702
|
required: m.required,
|
|
4703
4703
|
className: `w-full ${L(p) ? "border-red-500" : ""}`
|
|
@@ -4712,7 +4712,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4712
4712
|
{
|
|
4713
4713
|
type: "password",
|
|
4714
4714
|
value: $[m.key] || "",
|
|
4715
|
-
onChange: (
|
|
4715
|
+
onChange: (S) => k(p, S.target.value),
|
|
4716
4716
|
placeholder: m.placeholder || "Enter password",
|
|
4717
4717
|
required: m.required,
|
|
4718
4718
|
className: `w-full ${L(p) ? "border-red-500" : ""}`
|
|
@@ -4726,8 +4726,8 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4726
4726
|
/* @__PURE__ */ e(
|
|
4727
4727
|
gt,
|
|
4728
4728
|
{
|
|
4729
|
-
value: $[m.key] || "",
|
|
4730
|
-
onChange: (
|
|
4729
|
+
value: $[m.key] !== void 0 && $[m.key] !== null && $[m.key] !== "" ? $[m.key] : m.default || "",
|
|
4730
|
+
onChange: (S) => k(p, S),
|
|
4731
4731
|
options: m.options || [],
|
|
4732
4732
|
placeholder: m.placeholder || `Select ${m.label}`,
|
|
4733
4733
|
required: m.required,
|
|
@@ -4738,14 +4738,14 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4738
4738
|
] });
|
|
4739
4739
|
case "selectDynamic":
|
|
4740
4740
|
return ($, p) => {
|
|
4741
|
-
const
|
|
4741
|
+
const S = () => {
|
|
4742
4742
|
if (m.optionsFrom && a) {
|
|
4743
|
-
const { config: I, valueField: w, labelField:
|
|
4743
|
+
const { config: I, valueField: w, labelField: D } = m.optionsFrom, y = a[I] || [];
|
|
4744
4744
|
if (Array.isArray(y))
|
|
4745
4745
|
return y.map((N) => ({
|
|
4746
4746
|
id: N[w] || "",
|
|
4747
4747
|
value: N[w] || "",
|
|
4748
|
-
label: N[
|
|
4748
|
+
label: N[D] || ""
|
|
4749
4749
|
}));
|
|
4750
4750
|
}
|
|
4751
4751
|
return m.options || [];
|
|
@@ -4757,7 +4757,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4757
4757
|
index: p,
|
|
4758
4758
|
value: $[m.key] || "",
|
|
4759
4759
|
onChange: (I) => k(p, I),
|
|
4760
|
-
options:
|
|
4760
|
+
options: S(),
|
|
4761
4761
|
placeholder: m.placeholder || `Select ${m.label}`,
|
|
4762
4762
|
required: m.required,
|
|
4763
4763
|
className: `w-full ${L(p) ? "border-red-500" : ""}`
|
|
@@ -4769,11 +4769,11 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4769
4769
|
};
|
|
4770
4770
|
case "multiselect":
|
|
4771
4771
|
return ($, p) => {
|
|
4772
|
-
const
|
|
4772
|
+
const S = $[m.key] || [];
|
|
4773
4773
|
return /* @__PURE__ */ e(
|
|
4774
4774
|
rt,
|
|
4775
4775
|
{
|
|
4776
|
-
selectedItems:
|
|
4776
|
+
selectedItems: S,
|
|
4777
4777
|
onSelectionChange: (I) => k(p, I),
|
|
4778
4778
|
options: m.options || [],
|
|
4779
4779
|
placeholder: m.placeholder || `Select ${m.label}`,
|
|
@@ -4787,7 +4787,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4787
4787
|
ut,
|
|
4788
4788
|
{
|
|
4789
4789
|
checked: !!$[m.key],
|
|
4790
|
-
onChange: (
|
|
4790
|
+
onChange: (S) => k(p, S),
|
|
4791
4791
|
label: m.placeholder || m.label,
|
|
4792
4792
|
className: "w-full"
|
|
4793
4793
|
}
|
|
@@ -4798,7 +4798,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4798
4798
|
ma,
|
|
4799
4799
|
{
|
|
4800
4800
|
isOn: !!$[m.key],
|
|
4801
|
-
onToggle: (
|
|
4801
|
+
onToggle: (S) => k(p, S),
|
|
4802
4802
|
label: m.placeholder || m.label,
|
|
4803
4803
|
className: "w-full"
|
|
4804
4804
|
}
|
|
@@ -4808,7 +4808,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4808
4808
|
la,
|
|
4809
4809
|
{
|
|
4810
4810
|
selectedDate: $[m.key] ? new Date($[m.key]) : null,
|
|
4811
|
-
onDateChange: (
|
|
4811
|
+
onDateChange: (S) => k(p, S ? S.toISOString().split("T")[0] : ""),
|
|
4812
4812
|
placeholder: m.placeholder || "Select date",
|
|
4813
4813
|
className: "w-full"
|
|
4814
4814
|
}
|
|
@@ -4819,7 +4819,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4819
4819
|
{
|
|
4820
4820
|
type: "datetime-local",
|
|
4821
4821
|
value: $[m.key] || "",
|
|
4822
|
-
onChange: (
|
|
4822
|
+
onChange: (S) => k(p, S.target.value),
|
|
4823
4823
|
placeholder: m.placeholder || "Select date and time",
|
|
4824
4824
|
required: m.required,
|
|
4825
4825
|
className: "w-full"
|
|
@@ -4831,7 +4831,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4831
4831
|
{
|
|
4832
4832
|
type: "time",
|
|
4833
4833
|
value: $[m.key] || "",
|
|
4834
|
-
onChange: (
|
|
4834
|
+
onChange: (S) => k(p, S.target.value),
|
|
4835
4835
|
placeholder: m.placeholder || "Select time",
|
|
4836
4836
|
required: m.required,
|
|
4837
4837
|
className: "w-full"
|
|
@@ -4842,7 +4842,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4842
4842
|
ia,
|
|
4843
4843
|
{
|
|
4844
4844
|
selectedValue: $[m.key] || "",
|
|
4845
|
-
onValueChange: (
|
|
4845
|
+
onValueChange: (S) => k(p, S),
|
|
4846
4846
|
options: m.options || [],
|
|
4847
4847
|
className: "w-full"
|
|
4848
4848
|
}
|
|
@@ -4852,27 +4852,27 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4852
4852
|
ye,
|
|
4853
4853
|
{
|
|
4854
4854
|
value: $[m.key] || "",
|
|
4855
|
-
onChange: (
|
|
4855
|
+
onChange: (S) => k(p, S),
|
|
4856
4856
|
placeholder: m.placeholder || `Search ${m.label}`,
|
|
4857
4857
|
className: "w-full"
|
|
4858
4858
|
}
|
|
4859
4859
|
);
|
|
4860
4860
|
case "audience":
|
|
4861
4861
|
return ($, p) => {
|
|
4862
|
-
const
|
|
4863
|
-
...
|
|
4864
|
-
...
|
|
4865
|
-
...
|
|
4862
|
+
const S = $[m.key] || { users: [], groups: [], roles: [] }, I = [
|
|
4863
|
+
...S.users || [],
|
|
4864
|
+
...S.groups || [],
|
|
4865
|
+
...S.roles || []
|
|
4866
4866
|
];
|
|
4867
4867
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
4868
|
-
/* @__PURE__ */ e(us, { children: I.length > 0 ? I.slice(0, 3).map((w,
|
|
4868
|
+
/* @__PURE__ */ e(us, { children: I.length > 0 ? I.slice(0, 3).map((w, D) => /* @__PURE__ */ e(
|
|
4869
4869
|
we,
|
|
4870
4870
|
{
|
|
4871
4871
|
size: "small",
|
|
4872
4872
|
name: w.name || w.displayName || w.id,
|
|
4873
4873
|
src: w.avatarUrl
|
|
4874
4874
|
},
|
|
4875
|
-
|
|
4875
|
+
D
|
|
4876
4876
|
)) : null }),
|
|
4877
4877
|
/* @__PURE__ */ e(
|
|
4878
4878
|
"button",
|
|
@@ -4892,7 +4892,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4892
4892
|
{
|
|
4893
4893
|
type: "color",
|
|
4894
4894
|
value: $[m.key] || "#000000",
|
|
4895
|
-
onChange: (
|
|
4895
|
+
onChange: (S) => k(p, S.target.value),
|
|
4896
4896
|
className: "w-full h-10"
|
|
4897
4897
|
}
|
|
4898
4898
|
);
|
|
@@ -4903,7 +4903,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4903
4903
|
{
|
|
4904
4904
|
type: "range",
|
|
4905
4905
|
value: $[m.key] || m.min || 0,
|
|
4906
|
-
onChange: (
|
|
4906
|
+
onChange: (S) => k(p, S.target.value),
|
|
4907
4907
|
min: m.min || 0,
|
|
4908
4908
|
max: m.max || 100,
|
|
4909
4909
|
step: m.step || 1,
|
|
@@ -4917,8 +4917,8 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4917
4917
|
H,
|
|
4918
4918
|
{
|
|
4919
4919
|
type: "file",
|
|
4920
|
-
onChange: (
|
|
4921
|
-
const I =
|
|
4920
|
+
onChange: (S) => {
|
|
4921
|
+
const I = S.target.files[0];
|
|
4922
4922
|
k(p, I ? I.name : "");
|
|
4923
4923
|
},
|
|
4924
4924
|
accept: m.accept,
|
|
@@ -4931,7 +4931,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4931
4931
|
{
|
|
4932
4932
|
type: "hidden",
|
|
4933
4933
|
value: $[m.key] || "",
|
|
4934
|
-
onChange: (
|
|
4934
|
+
onChange: (S) => k(p, S.target.value)
|
|
4935
4935
|
}
|
|
4936
4936
|
);
|
|
4937
4937
|
// Default fallback for unknown field types
|
|
@@ -4941,7 +4941,7 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4941
4941
|
H,
|
|
4942
4942
|
{
|
|
4943
4943
|
value: $[m.key] || "",
|
|
4944
|
-
onChange: (
|
|
4944
|
+
onChange: (S) => k(p, S.target.value),
|
|
4945
4945
|
placeholder: m.placeholder || `Enter ${m.label}`,
|
|
4946
4946
|
required: m.required,
|
|
4947
4947
|
className: `w-full ${L(p) ? "border-red-500" : ""}`
|
|
@@ -4984,11 +4984,11 @@ function hs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4984
4984
|
if (o !== null && f && $[o]) {
|
|
4985
4985
|
const p = m?.pendingInvites || [];
|
|
4986
4986
|
if (p.length > 0) {
|
|
4987
|
-
const
|
|
4987
|
+
const S = p.filter((y) => y.type === "User"), I = p.filter((y) => y.type === "Group"), w = p.filter((y) => y.type === "Role"), D = $[o][f] || { users: [], groups: [], roles: [] };
|
|
4988
4988
|
$[o][f] = {
|
|
4989
|
-
users: [...
|
|
4990
|
-
groups: [...
|
|
4991
|
-
roles: [...
|
|
4989
|
+
users: [...D.users || [], ...S],
|
|
4990
|
+
groups: [...D.groups || [], ...I],
|
|
4991
|
+
roles: [...D.roles || [], ...w]
|
|
4992
4992
|
};
|
|
4993
4993
|
} else k && ($[o][f] = {
|
|
4994
4994
|
users: k.users || [],
|
|
@@ -5105,13 +5105,13 @@ function fs({
|
|
|
5105
5105
|
const w = (R) => {
|
|
5106
5106
|
if (R == null || typeof R != "object") return R;
|
|
5107
5107
|
if (Array.isArray(R)) return R.map(w);
|
|
5108
|
-
const
|
|
5108
|
+
const z = {};
|
|
5109
5109
|
return Object.keys(R).sort().forEach((M) => {
|
|
5110
|
-
|
|
5111
|
-
}),
|
|
5112
|
-
},
|
|
5110
|
+
z[M] = w(R[M]);
|
|
5111
|
+
}), z;
|
|
5112
|
+
}, D = w(x), y = w(g), N = JSON.stringify(D) !== JSON.stringify(y);
|
|
5113
5113
|
return console.log("[DynamicConfig] hasUnsavedChanges:", N, {
|
|
5114
|
-
originalData:
|
|
5114
|
+
originalData: D,
|
|
5115
5115
|
currentData: y,
|
|
5116
5116
|
originalRaw: x,
|
|
5117
5117
|
currentRaw: g
|
|
@@ -5119,10 +5119,10 @@ function fs({
|
|
|
5119
5119
|
}, m = (w) => {
|
|
5120
5120
|
if (!a || !a.configuration)
|
|
5121
5121
|
return w;
|
|
5122
|
-
const
|
|
5122
|
+
const D = {}, y = w?.configuration || {};
|
|
5123
5123
|
return a.configuration.forEach((N) => {
|
|
5124
5124
|
if (N.key && N.type === "datatable") {
|
|
5125
|
-
const
|
|
5125
|
+
const z = (y[N.key] || []).map((M, q) => {
|
|
5126
5126
|
const X = { id: M.id || 0 };
|
|
5127
5127
|
return N.fields && N.fields.forEach((Y) => {
|
|
5128
5128
|
if (Y.fieldtype === "audience") {
|
|
@@ -5135,37 +5135,37 @@ function fs({
|
|
|
5135
5135
|
} else Y.fieldtype === "select" ? X[Y.key] = M[Y.key] !== void 0 && M[Y.key] !== "" ? M[Y.key] : Y.default || "" : X[Y.key] = M[Y.key] || Y.default || "";
|
|
5136
5136
|
}), X;
|
|
5137
5137
|
});
|
|
5138
|
-
if (
|
|
5138
|
+
if (z.length === 0) {
|
|
5139
5139
|
const M = { id: 0 };
|
|
5140
5140
|
N.fields && N.fields.forEach((q) => {
|
|
5141
5141
|
q.fieldtype === "audience" ? M[q.key] = { users: [], groups: [], roles: [] } : M[q.key] = q.default || "";
|
|
5142
|
-
}),
|
|
5142
|
+
}), z.push(M);
|
|
5143
5143
|
}
|
|
5144
|
-
|
|
5144
|
+
D[N.key] = z;
|
|
5145
5145
|
} else if (N.key) {
|
|
5146
5146
|
const R = y[N.key] || {};
|
|
5147
|
-
N.type === "section" && N.fields && N.fields.forEach((
|
|
5148
|
-
|
|
5149
|
-
}),
|
|
5147
|
+
N.type === "section" && N.fields && N.fields.forEach((z) => {
|
|
5148
|
+
z.key && (z.fieldtype === "managecollectionlist" ? (!R[z.key] || !Array.isArray(R[z.key])) && (R[z.key] = z.initialData || []) : (R[z.key] === void 0 || R[z.key] === null) && (R[z.key] = z.default !== void 0 ? z.default : z.value !== void 0 ? z.value : ""));
|
|
5149
|
+
}), D[N.key] = R;
|
|
5150
5150
|
}
|
|
5151
|
-
}),
|
|
5151
|
+
}), D;
|
|
5152
5152
|
}, k = () => {
|
|
5153
5153
|
if (a && a.configuration) {
|
|
5154
5154
|
const w = {};
|
|
5155
|
-
a.configuration.forEach((
|
|
5156
|
-
if (
|
|
5157
|
-
if (
|
|
5155
|
+
a.configuration.forEach((D) => {
|
|
5156
|
+
if (D.key)
|
|
5157
|
+
if (D.type === "datatable") {
|
|
5158
5158
|
const y = { id: 0 };
|
|
5159
|
-
|
|
5159
|
+
D.fields && D.fields.forEach((N) => {
|
|
5160
5160
|
N.fieldtype === "audience" ? y[N.key] = { users: [], groups: [], roles: [] } : (N.fieldtype, y[N.key] = N.default || "");
|
|
5161
|
-
}), w[
|
|
5162
|
-
} else if (
|
|
5161
|
+
}), w[D.key] = [y];
|
|
5162
|
+
} else if (D.type === "section") {
|
|
5163
5163
|
const y = {};
|
|
5164
|
-
|
|
5164
|
+
D.fields && Array.isArray(D.fields) && D.fields.forEach((N) => {
|
|
5165
5165
|
N.key && (N.fieldtype === "managecollectionlist" ? y[N.key] = N.initialData || [] : y[N.key] = N.default || "");
|
|
5166
|
-
}), w[
|
|
5166
|
+
}), w[D.key] = y;
|
|
5167
5167
|
} else
|
|
5168
|
-
w[
|
|
5168
|
+
w[D.key] = {};
|
|
5169
5169
|
}), r(w), d(w);
|
|
5170
5170
|
}
|
|
5171
5171
|
};
|
|
@@ -5177,19 +5177,19 @@ function fs({
|
|
|
5177
5177
|
const w = async () => {
|
|
5178
5178
|
try {
|
|
5179
5179
|
C(!0);
|
|
5180
|
-
let
|
|
5181
|
-
if (
|
|
5182
|
-
const y = m(
|
|
5180
|
+
let D = await Ke(W);
|
|
5181
|
+
if (D) {
|
|
5182
|
+
const y = m(D);
|
|
5183
5183
|
r(y), d(y);
|
|
5184
5184
|
} else
|
|
5185
5185
|
k();
|
|
5186
|
-
} catch (
|
|
5187
|
-
console.error("Error fetching configuration:",
|
|
5186
|
+
} catch (D) {
|
|
5187
|
+
console.error("Error fetching configuration:", D);
|
|
5188
5188
|
let y = "Failed to load configuration";
|
|
5189
|
-
if (
|
|
5190
|
-
const N =
|
|
5189
|
+
if (D.response) {
|
|
5190
|
+
const N = D.response.status, R = D.response.data?.message || D.response.data?.error;
|
|
5191
5191
|
N === 400 ? y = R || "Invalid request. Please check the application ID." : N === 401 ? y = "You are not authorized to access this configuration." : N === 403 ? y = "Access denied. You don't have permission to view this configuration." : N === 404 ? y = "Configuration not found. It may not exist yet or the application ID is incorrect." : N >= 500 ? y = R || "Server error. Please try again later." : y = R || `Failed to load configuration (Error ${N})`;
|
|
5192
|
-
} else
|
|
5192
|
+
} else D.request ? y = "Network error. Please check your connection and try again." : y = D.message || "An unexpected error occurred while loading configuration.";
|
|
5193
5193
|
We.error(y), k();
|
|
5194
5194
|
} finally {
|
|
5195
5195
|
C(!1);
|
|
@@ -5197,41 +5197,41 @@ function fs({
|
|
|
5197
5197
|
};
|
|
5198
5198
|
a && (v(a), t ? w() : k());
|
|
5199
5199
|
}, [a, E, t, s]);
|
|
5200
|
-
const L = (w,
|
|
5200
|
+
const L = (w, D) => {
|
|
5201
5201
|
r((y) => ({
|
|
5202
5202
|
...y,
|
|
5203
|
-
[w]:
|
|
5203
|
+
[w]: D
|
|
5204
5204
|
})), V((y) => {
|
|
5205
5205
|
const N = { ...y };
|
|
5206
5206
|
return N[w] && delete N[w], N;
|
|
5207
5207
|
});
|
|
5208
5208
|
}, P = () => {
|
|
5209
5209
|
const w = {};
|
|
5210
|
-
return !f || !g || f.configuration.forEach((
|
|
5211
|
-
if (
|
|
5212
|
-
|
|
5213
|
-
const N = g[
|
|
5210
|
+
return !f || !g || f.configuration.forEach((D) => {
|
|
5211
|
+
if (D.type === "section")
|
|
5212
|
+
D.fields.forEach((y) => {
|
|
5213
|
+
const N = g[D.key]?.[y.key];
|
|
5214
5214
|
if (y.required && (!N || typeof N == "string" && N.trim() === "")) {
|
|
5215
|
-
w[
|
|
5215
|
+
w[D.key] || (w[D.key] = {}), w[D.key][y.key] = `${y.label} is required`;
|
|
5216
5216
|
return;
|
|
5217
5217
|
}
|
|
5218
5218
|
if (y.fieldtype === "number" && N !== "" && N !== null && N !== void 0) {
|
|
5219
5219
|
const R = Number(N);
|
|
5220
|
-
isNaN(R) ? (w[
|
|
5220
|
+
isNaN(R) ? (w[D.key] || (w[D.key] = {}), w[D.key][y.key] = `${y.label} must be a valid number`) : (y.min !== void 0 && R < y.min && (w[D.key] || (w[D.key] = {}), w[D.key][y.key] = `${y.label} must be at least ${y.min}`), y.max !== void 0 && R > y.max && (w[D.key] || (w[D.key] = {}), w[D.key][y.key] = `${y.label} must not exceed ${y.max}`));
|
|
5221
5221
|
}
|
|
5222
5222
|
});
|
|
5223
|
-
else if (
|
|
5224
|
-
const y = g[
|
|
5223
|
+
else if (D.type === "datatable") {
|
|
5224
|
+
const y = g[D.key];
|
|
5225
5225
|
Array.isArray(y) && y.forEach((N, R) => {
|
|
5226
|
-
|
|
5227
|
-
const M = N[
|
|
5228
|
-
if (
|
|
5229
|
-
w[
|
|
5226
|
+
D.fields.forEach((z) => {
|
|
5227
|
+
const M = N[z.key];
|
|
5228
|
+
if (z.required && (!M || typeof M == "string" && M.trim() === "")) {
|
|
5229
|
+
w[D.key] || (w[D.key] = {}), w[D.key][R] || (w[D.key][R] = {}), w[D.key][R][z.key] = `${z.label} is required`;
|
|
5230
5230
|
return;
|
|
5231
5231
|
}
|
|
5232
|
-
if (
|
|
5232
|
+
if (z.fieldtype === "number" && M !== "" && M !== null && M !== void 0) {
|
|
5233
5233
|
const q = Number(M);
|
|
5234
|
-
isNaN(q) ? (w[
|
|
5234
|
+
isNaN(q) ? (w[D.key] || (w[D.key] = {}), w[D.key][R] || (w[D.key][R] = {}), w[D.key][R][z.key] = `${z.label} must be a valid number`) : (z.min !== void 0 && q < z.min && (w[D.key] || (w[D.key] = {}), w[D.key][R] || (w[D.key][R] = {}), w[D.key][R][z.key] = `${z.label} must be at least ${z.min}`), z.max !== void 0 && q > z.max && (w[D.key] || (w[D.key] = {}), w[D.key][R] || (w[D.key][R] = {}), w[D.key][R][z.key] = `${z.label} must not exceed ${z.max}`));
|
|
5235
5235
|
}
|
|
5236
5236
|
});
|
|
5237
5237
|
});
|
|
@@ -5245,8 +5245,8 @@ function fs({
|
|
|
5245
5245
|
let y = [];
|
|
5246
5246
|
Object.keys(w).forEach((N) => {
|
|
5247
5247
|
typeof w[N] == "object" && Object.keys(w[N]).forEach((R) => {
|
|
5248
|
-
typeof w[N][R] == "object" ? Object.keys(w[N][R]).forEach((
|
|
5249
|
-
y.push(`${N} row ${parseInt(R) + 1}: ${w[N][R][
|
|
5248
|
+
typeof w[N][R] == "object" ? Object.keys(w[N][R]).forEach((z) => {
|
|
5249
|
+
y.push(`${N} row ${parseInt(R) + 1}: ${w[N][R][z]}`);
|
|
5250
5250
|
}) : y.push(`${N}: ${w[N][R]}`);
|
|
5251
5251
|
});
|
|
5252
5252
|
});
|
|
@@ -5257,12 +5257,12 @@ function fs({
|
|
|
5257
5257
|
A(!0);
|
|
5258
5258
|
const y = {};
|
|
5259
5259
|
g && Object.keys(g).forEach((R) => {
|
|
5260
|
-
const
|
|
5260
|
+
const z = a?.configuration?.find(
|
|
5261
5261
|
(M) => M.key === R && M.type === "datatable"
|
|
5262
5262
|
);
|
|
5263
|
-
|
|
5263
|
+
z && Array.isArray(g[R]) ? y[R] = g[R].map((M) => {
|
|
5264
5264
|
const q = { id: M.id || 0 };
|
|
5265
|
-
return
|
|
5265
|
+
return z.fields && z.fields.forEach((X) => {
|
|
5266
5266
|
if (X.fieldtype === "audience") {
|
|
5267
5267
|
let Y = { users: [], groups: [], roles: [] };
|
|
5268
5268
|
M[X.key] && typeof M[X.key] == "object" && !Array.isArray(M[X.key]) && (Y = {
|
|
@@ -5288,7 +5288,7 @@ function fs({
|
|
|
5288
5288
|
A(!1);
|
|
5289
5289
|
}
|
|
5290
5290
|
})();
|
|
5291
|
-
},
|
|
5291
|
+
}, S = () => {
|
|
5292
5292
|
F() ? l ? l() : console.warn("[DynamicConfig] onShowCancelModal not provided, cannot show modal") : u ? u() : window.history.back();
|
|
5293
5293
|
};
|
|
5294
5294
|
if (!f?.configuration && !a?.configuration)
|
|
@@ -5304,7 +5304,7 @@ function fs({
|
|
|
5304
5304
|
style: { padding: "0px 20px 0px 0px" },
|
|
5305
5305
|
children: [
|
|
5306
5306
|
b && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(ca, { size: "large" }) }),
|
|
5307
|
-
!b && I?.map((w,
|
|
5307
|
+
!b && I?.map((w, D) => {
|
|
5308
5308
|
const y = {
|
|
5309
5309
|
...w,
|
|
5310
5310
|
fields: Array.isArray(w.fields) ? w.fields.filter((R) => !R.hidden) : w.fields
|
|
@@ -5318,7 +5318,7 @@ function fs({
|
|
|
5318
5318
|
updateHandler: L,
|
|
5319
5319
|
validationErrors: O
|
|
5320
5320
|
},
|
|
5321
|
-
|
|
5321
|
+
D
|
|
5322
5322
|
);
|
|
5323
5323
|
})
|
|
5324
5324
|
]
|
|
@@ -5329,7 +5329,7 @@ function fs({
|
|
|
5329
5329
|
ie,
|
|
5330
5330
|
{
|
|
5331
5331
|
category: "secondary",
|
|
5332
|
-
onClick:
|
|
5332
|
+
onClick: S,
|
|
5333
5333
|
label: "Cancel",
|
|
5334
5334
|
disabled: T,
|
|
5335
5335
|
type: "button"
|
|
@@ -5373,11 +5373,11 @@ const Ul = ({
|
|
|
5373
5373
|
placeholder: a,
|
|
5374
5374
|
disabled: !1
|
|
5375
5375
|
}, k.some((p) => p.key === "displayname")) {
|
|
5376
|
-
const p = k.findIndex((I) => I.key === "displayname"),
|
|
5376
|
+
const p = k.findIndex((I) => I.key === "displayname"), S = k[p] || {};
|
|
5377
5377
|
k[p] = {
|
|
5378
|
-
...
|
|
5379
|
-
default:
|
|
5380
|
-
placeholder:
|
|
5378
|
+
...S,
|
|
5379
|
+
default: S.default || S.value || a,
|
|
5380
|
+
placeholder: S.placeholder || "Enter display name"
|
|
5381
5381
|
};
|
|
5382
5382
|
} else {
|
|
5383
5383
|
const p = {
|
|
@@ -5567,18 +5567,18 @@ const Ul = ({
|
|
|
5567
5567
|
l && (v(p._id), r(p.categoryName || ""));
|
|
5568
5568
|
}, G = () => {
|
|
5569
5569
|
if (!i || f !== null) return;
|
|
5570
|
-
const
|
|
5570
|
+
const S = (x.length > 0 ? Math.max(...x.map((I) => typeof I._id == "number" ? I._id : 0)) : 0) + 1;
|
|
5571
5571
|
d((I) => [
|
|
5572
5572
|
...I,
|
|
5573
5573
|
{
|
|
5574
|
-
_id:
|
|
5574
|
+
_id: S,
|
|
5575
5575
|
categoryName: "",
|
|
5576
5576
|
links: [],
|
|
5577
5577
|
order: (I.at(-1)?.order ?? 0) + 1,
|
|
5578
5578
|
protected: !1,
|
|
5579
5579
|
_class: "com.unifyed.model.Collection"
|
|
5580
5580
|
}
|
|
5581
|
-
]), v(
|
|
5581
|
+
]), v(S), r("");
|
|
5582
5582
|
}, W = () => {
|
|
5583
5583
|
f != null && (d((p) => {
|
|
5584
5584
|
const I = !Array.isArray(h) || !h.some((w) => w._id === f) ? p.filter((w) => w._id !== f) : p;
|
|
@@ -5586,35 +5586,35 @@ const Ul = ({
|
|
|
5586
5586
|
}), v(null), r(""));
|
|
5587
5587
|
}, J = () => {
|
|
5588
5588
|
f == null || !g.trim() || (d((p) => {
|
|
5589
|
-
const
|
|
5589
|
+
const S = p.map((I) => I._id === f ? {
|
|
5590
5590
|
...I,
|
|
5591
5591
|
categoryName: g.trim()
|
|
5592
5592
|
} : I);
|
|
5593
|
-
return a?.(
|
|
5593
|
+
return a?.(S), S;
|
|
5594
5594
|
}), v(null), r(""));
|
|
5595
5595
|
}, E = (p) => {
|
|
5596
|
-
u && d((
|
|
5597
|
-
const I =
|
|
5596
|
+
u && d((S) => {
|
|
5597
|
+
const I = S.filter((w) => w._id !== p._id);
|
|
5598
5598
|
return a?.(I), I;
|
|
5599
5599
|
});
|
|
5600
|
-
}, U = (p,
|
|
5601
|
-
const w = Number(
|
|
5602
|
-
if (!o || w ===
|
|
5603
|
-
const y = p.findIndex((M) => Number(M._id) === w), N = p.findIndex((M) => Number(M._id) ===
|
|
5600
|
+
}, U = (p, S, I) => {
|
|
5601
|
+
const w = Number(S), D = Number(I);
|
|
5602
|
+
if (!o || w === D) return p;
|
|
5603
|
+
const y = p.findIndex((M) => Number(M._id) === w), N = p.findIndex((M) => Number(M._id) === D);
|
|
5604
5604
|
if (y === -1 || N === -1) return p;
|
|
5605
|
-
const R = [...p], [
|
|
5606
|
-
return R.splice(N, 0,
|
|
5607
|
-
}, F = (p,
|
|
5608
|
-
o && (p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", String(
|
|
5605
|
+
const R = [...p], [z] = R.splice(y, 1);
|
|
5606
|
+
return R.splice(N, 0, z), R.map((M, q) => ({ ...M, order: q + 1 }));
|
|
5607
|
+
}, F = (p, S) => {
|
|
5608
|
+
o && (p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", String(S)), C(Number(S)));
|
|
5609
5609
|
}, m = (p) => {
|
|
5610
5610
|
b && p !== T && A(p);
|
|
5611
5611
|
}, k = (p) => {
|
|
5612
5612
|
p.preventDefault();
|
|
5613
|
-
}, L = (p,
|
|
5613
|
+
}, L = (p, S) => {
|
|
5614
5614
|
p.preventDefault();
|
|
5615
|
-
const I = p.dataTransfer.getData("text/plain"), w = I === "0" ? 0 : Number(I),
|
|
5616
|
-
w === void 0 ||
|
|
5617
|
-
const N = U(y, w,
|
|
5615
|
+
const I = p.dataTransfer.getData("text/plain"), w = I === "0" ? 0 : Number(I), D = S === "0" ? 0 : Number(S);
|
|
5616
|
+
w === void 0 || D === void 0 || (d((y) => {
|
|
5617
|
+
const N = U(y, w, D);
|
|
5618
5618
|
return a?.(N), N;
|
|
5619
5619
|
}), C(null), A(null));
|
|
5620
5620
|
}, P = () => {
|
|
@@ -5647,7 +5647,7 @@ const Ul = ({
|
|
|
5647
5647
|
)
|
|
5648
5648
|
] }) }),
|
|
5649
5649
|
/* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: $.map((p) => {
|
|
5650
|
-
const
|
|
5650
|
+
const S = f === p._id, I = p?.links?.length ?? 0, w = b === p._id, D = T === p._id && b !== p._id;
|
|
5651
5651
|
return /* @__PURE__ */ e(
|
|
5652
5652
|
"div",
|
|
5653
5653
|
{
|
|
@@ -5658,10 +5658,10 @@ const Ul = ({
|
|
|
5658
5658
|
className: [
|
|
5659
5659
|
"flex items-center justify-between p-3 border rounded-2xl mb-3",
|
|
5660
5660
|
"border-gray-300",
|
|
5661
|
-
|
|
5661
|
+
D ? "ring-2 ring-gray-800/20" : "",
|
|
5662
5662
|
w ? "opacity-60" : ""
|
|
5663
5663
|
].join(" "),
|
|
5664
|
-
children:
|
|
5664
|
+
children: S ? /* @__PURE__ */ n(re, { children: [
|
|
5665
5665
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 flex-1", children: /* @__PURE__ */ e(
|
|
5666
5666
|
"input",
|
|
5667
5667
|
{
|
|
@@ -5851,19 +5851,19 @@ const Bt = () => {
|
|
|
5851
5851
|
searchIconClass: U,
|
|
5852
5852
|
inputStyle: F
|
|
5853
5853
|
}) => {
|
|
5854
|
-
const m = () => l?.current || i?.current, [k, L] = ne.useState(""), P = (t || "export").toString().trim() || "export", $ = `${W || P}.xlsx`, p = `${J || P}.pdf`,
|
|
5855
|
-
(
|
|
5854
|
+
const m = () => l?.current || i?.current, [k, L] = ne.useState(""), P = (t || "export").toString().trim() || "export", $ = `${W || P}.xlsx`, p = `${J || P}.pdf`, S = (D, y, N) => Math.max(y, Math.min(D, N)), I = K(
|
|
5855
|
+
(D) => {
|
|
5856
5856
|
const y = m();
|
|
5857
5857
|
if (y?.openColumnChooser) {
|
|
5858
|
-
if (typeof window > "u" || !
|
|
5858
|
+
if (typeof window > "u" || !D?.currentTarget) {
|
|
5859
5859
|
y.openColumnChooser();
|
|
5860
5860
|
return;
|
|
5861
5861
|
}
|
|
5862
5862
|
try {
|
|
5863
|
-
const N =
|
|
5864
|
-
let M = R - 120, q =
|
|
5863
|
+
const N = D.currentTarget.getBoundingClientRect(), R = N.left + window.scrollX, z = N.bottom + window.scrollY;
|
|
5864
|
+
let M = R - 120, q = z - 120;
|
|
5865
5865
|
const X = window.innerWidth, Y = window.innerHeight;
|
|
5866
|
-
M =
|
|
5866
|
+
M = S(M, window.scrollX + 8, window.scrollX + X - 340), q = S(q, window.scrollY, window.scrollY + Y - 120), y.openColumnChooser(M, q);
|
|
5867
5867
|
} catch (N) {
|
|
5868
5868
|
console.log("coloumn choose error", N);
|
|
5869
5869
|
}
|
|
@@ -5872,10 +5872,10 @@ const Bt = () => {
|
|
|
5872
5872
|
[]
|
|
5873
5873
|
// no external deps; reads ref at call time
|
|
5874
5874
|
), w = K(
|
|
5875
|
-
(
|
|
5875
|
+
(D, y) => {
|
|
5876
5876
|
const N = m();
|
|
5877
5877
|
if (N)
|
|
5878
|
-
switch (
|
|
5878
|
+
switch (D) {
|
|
5879
5879
|
case "Delete": {
|
|
5880
5880
|
if (v) {
|
|
5881
5881
|
const R = N.getSelectedRecords();
|
|
@@ -5917,8 +5917,8 @@ const Bt = () => {
|
|
|
5917
5917
|
{
|
|
5918
5918
|
placeholder: O,
|
|
5919
5919
|
value: k,
|
|
5920
|
-
onDebouncedChange: (
|
|
5921
|
-
L(
|
|
5920
|
+
onDebouncedChange: (D) => {
|
|
5921
|
+
L(D), _(D);
|
|
5922
5922
|
},
|
|
5923
5923
|
searchIconSize: E || 16,
|
|
5924
5924
|
searchIconClass: U || "",
|
|
@@ -5940,7 +5940,7 @@ const Bt = () => {
|
|
|
5940
5940
|
ze,
|
|
5941
5941
|
{
|
|
5942
5942
|
icon: hr,
|
|
5943
|
-
onClick: (
|
|
5943
|
+
onClick: (D) => w("ColumnChooser", D),
|
|
5944
5944
|
ariaLabel: "Column Chooser"
|
|
5945
5945
|
}
|
|
5946
5946
|
),
|
|
@@ -6031,7 +6031,7 @@ function Wl(t) {
|
|
|
6031
6031
|
pageSettings: m,
|
|
6032
6032
|
sortSettings: k,
|
|
6033
6033
|
...L
|
|
6034
|
-
} = U || {}, [P, $] = ne.useState(m?.page || l), [p,
|
|
6034
|
+
} = U || {}, [P, $] = ne.useState(m?.page || l), [p, S] = ne.useState(m?.pageSize || u), [I, w] = ne.useState(k?.sortKey || "updatedDate"), [D, y] = ne.useState(k?.direction || "Descending"), N = ae(() => {
|
|
6035
6035
|
const j = A || {
|
|
6036
6036
|
type: "Multiple",
|
|
6037
6037
|
mode: "Row"
|
|
@@ -6060,7 +6060,7 @@ function Wl(t) {
|
|
|
6060
6060
|
g,
|
|
6061
6061
|
O,
|
|
6062
6062
|
A
|
|
6063
|
-
]),
|
|
6063
|
+
]), z = ae(() => {
|
|
6064
6064
|
const j = () => F.current, se = (Q, me) => {
|
|
6065
6065
|
!me && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${Q} requested but related service/feature is disabled.`);
|
|
6066
6066
|
};
|
|
@@ -6091,8 +6091,8 @@ function Wl(t) {
|
|
|
6091
6091
|
};
|
|
6092
6092
|
}, [C, x, d, b]);
|
|
6093
6093
|
te(() => {
|
|
6094
|
-
E && (E.current =
|
|
6095
|
-
}, [E,
|
|
6094
|
+
E && (E.current = z);
|
|
6095
|
+
}, [E, z]), te(() => () => {
|
|
6096
6096
|
E && (E.current = null);
|
|
6097
6097
|
}, [E]);
|
|
6098
6098
|
const M = (j) => {
|
|
@@ -6119,7 +6119,7 @@ function Wl(t) {
|
|
|
6119
6119
|
}, X = (j) => {
|
|
6120
6120
|
setTimeout(() => {
|
|
6121
6121
|
F?.current?.hideSpinner();
|
|
6122
|
-
}, 1e3), j.requestType === "paging" && ($(j.currentPage),
|
|
6122
|
+
}, 1e3), j.requestType === "paging" && ($(j.currentPage), S(j.pageSize)), j.requestType === "sorting" && (w(j.columnName || "updatedDate"), y(j.direction)), _?.(q(j), j);
|
|
6123
6123
|
}, Y = (j) => {
|
|
6124
6124
|
J?.(j?.rowData, j);
|
|
6125
6125
|
}, Re = () => {
|
|
@@ -6187,9 +6187,9 @@ function Wl(t) {
|
|
|
6187
6187
|
pageSizes: m?.pageSizes ?? [10, 20, 40, 60, 80, 100],
|
|
6188
6188
|
totalCount: s
|
|
6189
6189
|
}), [P, p, m?.pageSizes, s]), ka = ae(() => k ?? {
|
|
6190
|
-
columns: [{ field: I, direction: M(
|
|
6190
|
+
columns: [{ field: I, direction: M(D) }],
|
|
6191
6191
|
allowUnsort: !1
|
|
6192
|
-
}, [k, I,
|
|
6192
|
+
}, [k, I, D]);
|
|
6193
6193
|
return /* @__PURE__ */ n(
|
|
6194
6194
|
un,
|
|
6195
6195
|
{
|