unifyedx-storybook-new 0.2.83 → 0.2.84
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.
|
@@ -157,10 +157,10 @@ const Nn = {
|
|
|
157
157
|
iconHeight: m,
|
|
158
158
|
iconColor: y,
|
|
159
159
|
strokeWidth: z,
|
|
160
|
-
onClick:
|
|
161
|
-
|
|
160
|
+
onClick: $,
|
|
161
|
+
...D
|
|
162
162
|
}) => {
|
|
163
|
-
const E = g || h, L = p && !x,
|
|
163
|
+
const E = g || h, L = p && !x, j = Q(
|
|
164
164
|
"btn-base",
|
|
165
165
|
Nn[v],
|
|
166
166
|
wn[o],
|
|
@@ -175,12 +175,12 @@ const Nn = {
|
|
|
175
175
|
{
|
|
176
176
|
"data-testid": t,
|
|
177
177
|
type: s,
|
|
178
|
-
className:
|
|
178
|
+
className: j,
|
|
179
179
|
disabled: E,
|
|
180
|
-
onClick:
|
|
180
|
+
onClick: $,
|
|
181
181
|
title: a || L && i || (typeof x == "string" ? x : void 0),
|
|
182
182
|
"aria-label": i || L && a || (typeof x == "string" ? x : void 0),
|
|
183
|
-
|
|
183
|
+
...D,
|
|
184
184
|
children: h ? /* @__PURE__ */ e(Ra, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(te, { children: [
|
|
185
185
|
p && /* @__PURE__ */ e(p, { size: v === "large" ? 20 : 16, width: N || 16, height: m || 16, color: y || "#767676", strokeWidth: z || 2 }),
|
|
186
186
|
x,
|
|
@@ -645,7 +645,7 @@ const Nn = {
|
|
|
645
645
|
Fe,
|
|
646
646
|
{
|
|
647
647
|
className: "dialog-panel",
|
|
648
|
-
onClick: (
|
|
648
|
+
onClick: ($) => $.stopPropagation(),
|
|
649
649
|
children: [
|
|
650
650
|
/* @__PURE__ */ e("input", { ...i() }),
|
|
651
651
|
/* @__PURE__ */ n("form", { onSubmit: x, className: "form-wrapper", children: [
|
|
@@ -688,7 +688,7 @@ const Nn = {
|
|
|
688
688
|
z && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
|
|
689
689
|
/* @__PURE__ */ e("h3", { children: "Upload Queue" }),
|
|
690
690
|
/* @__PURE__ */ n("ul", { className: "file-list", children: [
|
|
691
|
-
o.map((
|
|
691
|
+
o.map(($, D) => /* @__PURE__ */ n(
|
|
692
692
|
"li",
|
|
693
693
|
{
|
|
694
694
|
className: "file-item",
|
|
@@ -697,28 +697,28 @@ const Nn = {
|
|
|
697
697
|
/* @__PURE__ */ e(
|
|
698
698
|
Tt,
|
|
699
699
|
{
|
|
700
|
-
extension:
|
|
700
|
+
extension: $.name.split(".").pop()
|
|
701
701
|
}
|
|
702
702
|
),
|
|
703
703
|
/* @__PURE__ */ n("div", { children: [
|
|
704
|
-
/* @__PURE__ */ e("p", { className: "file-item-name", children:
|
|
705
|
-
/* @__PURE__ */ e("p", { className: "file-item-size", children: At(
|
|
704
|
+
/* @__PURE__ */ e("p", { className: "file-item-name", children: $.name }),
|
|
705
|
+
/* @__PURE__ */ e("p", { className: "file-item-size", children: At($.size) })
|
|
706
706
|
] })
|
|
707
707
|
] }),
|
|
708
708
|
/* @__PURE__ */ e(
|
|
709
709
|
"button",
|
|
710
710
|
{
|
|
711
711
|
type: "button",
|
|
712
|
-
onClick: () => g(
|
|
712
|
+
onClick: () => g(D),
|
|
713
713
|
className: "remove-file-button",
|
|
714
714
|
children: /* @__PURE__ */ e(Le, { size: 16 })
|
|
715
715
|
}
|
|
716
716
|
)
|
|
717
717
|
]
|
|
718
718
|
},
|
|
719
|
-
`${
|
|
719
|
+
`${$.name}-${D}`
|
|
720
720
|
)),
|
|
721
|
-
p.map(({ file:
|
|
721
|
+
p.map(({ file: $, message: D }, E) => /* @__PURE__ */ n(
|
|
722
722
|
"li",
|
|
723
723
|
{
|
|
724
724
|
className: "file-item file-item--rejected",
|
|
@@ -727,13 +727,13 @@ const Nn = {
|
|
|
727
727
|
/* @__PURE__ */ e(
|
|
728
728
|
Tt,
|
|
729
729
|
{
|
|
730
|
-
extension:
|
|
730
|
+
extension: $.name.split(".").pop()
|
|
731
731
|
}
|
|
732
732
|
),
|
|
733
733
|
/* @__PURE__ */ n("div", { children: [
|
|
734
|
-
/* @__PURE__ */ e("p", { className: "file-item-name", children:
|
|
735
|
-
/* @__PURE__ */ e("p", { className: "file-item-size", children: At(
|
|
736
|
-
/* @__PURE__ */ e("p", { className: "rejection-reason", children:
|
|
734
|
+
/* @__PURE__ */ e("p", { className: "file-item-name", children: $.name }),
|
|
735
|
+
/* @__PURE__ */ e("p", { className: "file-item-size", children: At($.size) }),
|
|
736
|
+
/* @__PURE__ */ e("p", { className: "rejection-reason", children: D })
|
|
737
737
|
] })
|
|
738
738
|
] }),
|
|
739
739
|
/* @__PURE__ */ e(
|
|
@@ -747,7 +747,7 @@ const Nn = {
|
|
|
747
747
|
)
|
|
748
748
|
]
|
|
749
749
|
},
|
|
750
|
-
`${
|
|
750
|
+
`${$.name}-${E}`
|
|
751
751
|
))
|
|
752
752
|
] })
|
|
753
753
|
] })
|
|
@@ -842,16 +842,16 @@ const Nn = {
|
|
|
842
842
|
startDate: null
|
|
843
843
|
}), [y, z] = P({
|
|
844
844
|
endDate: null
|
|
845
|
-
}),
|
|
845
|
+
}), $ = Pa({
|
|
846
846
|
initialValues: JSON.parse(JSON.stringify(h)),
|
|
847
847
|
// Deep copy
|
|
848
|
-
onSubmit: (
|
|
848
|
+
onSubmit: (T) => {
|
|
849
849
|
const _ = {};
|
|
850
|
-
Object.keys(
|
|
851
|
-
_[
|
|
852
|
-
operator: A
|
|
853
|
-
values: Array.isArray(A
|
|
854
|
-
range: A
|
|
850
|
+
Object.keys(T).forEach((A) => {
|
|
851
|
+
_[A] = {
|
|
852
|
+
operator: T[A].operator || "in",
|
|
853
|
+
values: Array.isArray(T[A].values) ? T[A].values : [],
|
|
854
|
+
range: T[A].range || null
|
|
855
855
|
};
|
|
856
856
|
}), console.log("[storybook filter] Applied Filters:", _), typeof s == "function" && s({
|
|
857
857
|
filters: _,
|
|
@@ -859,47 +859,47 @@ const Nn = {
|
|
|
859
859
|
}), a();
|
|
860
860
|
},
|
|
861
861
|
enableReinitialize: !0
|
|
862
|
-
}),
|
|
863
|
-
const
|
|
864
|
-
let
|
|
862
|
+
}), D = ee(() => l.reduce((T, _) => {
|
|
863
|
+
const A = _.key, u = $.values[A];
|
|
864
|
+
let C = !1;
|
|
865
865
|
if (u)
|
|
866
866
|
switch (_.type) {
|
|
867
867
|
case "multiselect":
|
|
868
868
|
case "multiselect-users":
|
|
869
|
-
|
|
869
|
+
C = Array.isArray(u.values) && u.values.length > 0;
|
|
870
870
|
break;
|
|
871
871
|
case "date":
|
|
872
|
-
(u.range && u.range !== "" || Array.isArray(u.values) && u.values.length > 0) && (
|
|
872
|
+
(u.range && u.range !== "" || Array.isArray(u.values) && u.values.length > 0) && (C = !0);
|
|
873
873
|
break;
|
|
874
874
|
}
|
|
875
|
-
return A
|
|
876
|
-
}, {}), [l,
|
|
877
|
-
if (
|
|
878
|
-
const _ =
|
|
875
|
+
return T[A] = C, T;
|
|
876
|
+
}, {}), [l, $.values]), E = Object.values(D).filter(Boolean).length, L = ee(() => l.some((T) => {
|
|
877
|
+
if (T.type !== "date") return !1;
|
|
878
|
+
const _ = $.values?.[T.key]?.values;
|
|
879
879
|
if (!Array.isArray(_) || _.length < 2) return !1;
|
|
880
|
-
const [
|
|
881
|
-
if (!
|
|
882
|
-
const
|
|
883
|
-
return
|
|
884
|
-
}), [l,
|
|
880
|
+
const [A, u] = _;
|
|
881
|
+
if (!A || !u) return !1;
|
|
882
|
+
const C = A instanceof Date ? A : new Date(A), M = u instanceof Date ? u : new Date(u);
|
|
883
|
+
return C > M;
|
|
884
|
+
}), [l, $.values]), j = async (T, _) => {
|
|
885
885
|
try {
|
|
886
|
-
r((u) => ({ ...u, [
|
|
887
|
-
const
|
|
888
|
-
v((u) => ({ ...u, [
|
|
889
|
-
} catch (
|
|
890
|
-
console.error(`Error fetching ${
|
|
886
|
+
r((u) => ({ ...u, [T]: !0 }));
|
|
887
|
+
const A = await p(T, _);
|
|
888
|
+
v((u) => ({ ...u, [T]: A }));
|
|
889
|
+
} catch (A) {
|
|
890
|
+
console.error(`Error fetching ${T} users:`, A);
|
|
891
891
|
} finally {
|
|
892
|
-
r((
|
|
892
|
+
r((A) => ({ ...A, [T]: !1 }));
|
|
893
893
|
}
|
|
894
|
-
}, U = (
|
|
895
|
-
const _ = l[
|
|
896
|
-
l[
|
|
894
|
+
}, U = (T) => {
|
|
895
|
+
const _ = l[T].key, A = l[T].url;
|
|
896
|
+
l[T].type === "multiselect-users" && g[_].length === 0 && !x[_] && j(_, A);
|
|
897
897
|
}, Y = () => {
|
|
898
|
-
|
|
899
|
-
}, q = (
|
|
900
|
-
const _ = l.find((
|
|
898
|
+
$.resetForm(), v({ createdBy: [], updatedBy: [] }), i();
|
|
899
|
+
}, q = (T) => {
|
|
900
|
+
const _ = l.find((C) => C.key === T);
|
|
901
901
|
if (!_) return null;
|
|
902
|
-
const
|
|
902
|
+
const A = $.values[T] || h[T], u = Array.isArray(A.values) ? A.values : [];
|
|
903
903
|
switch (_.type) {
|
|
904
904
|
case "multiselect":
|
|
905
905
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
@@ -908,8 +908,8 @@ const Nn = {
|
|
|
908
908
|
/* @__PURE__ */ e(
|
|
909
909
|
"select",
|
|
910
910
|
{
|
|
911
|
-
value:
|
|
912
|
-
onChange: (F) =>
|
|
911
|
+
value: A.operator || "in",
|
|
912
|
+
onChange: (F) => $.setFieldValue(`${T}.operator`, F.target.value),
|
|
913
913
|
className: "filter-select",
|
|
914
914
|
children: _.operators.map((F) => /* @__PURE__ */ e("option", { value: F, children: F === "in" ? "Includes" : "Excludes" }, F))
|
|
915
915
|
}
|
|
@@ -921,19 +921,19 @@ const Nn = {
|
|
|
921
921
|
"input",
|
|
922
922
|
{
|
|
923
923
|
type: "checkbox",
|
|
924
|
-
id: `select-all-${
|
|
924
|
+
id: `select-all-${T}`,
|
|
925
925
|
className: "filter-checkbox-input",
|
|
926
926
|
checked: _.options.length > 0 && u.length === _.options.length,
|
|
927
927
|
onChange: (F) => {
|
|
928
928
|
const G = F.target.checked ? _.options.map((W) => W.value) : [];
|
|
929
|
-
|
|
929
|
+
$.setFieldValue(`${T}.values`, G);
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
),
|
|
933
933
|
/* @__PURE__ */ e(
|
|
934
934
|
"label",
|
|
935
935
|
{
|
|
936
|
-
htmlFor: `select-all-${
|
|
936
|
+
htmlFor: `select-all-${T}`,
|
|
937
937
|
className: "filter-checkbox-label",
|
|
938
938
|
children: "Select All"
|
|
939
939
|
}
|
|
@@ -944,19 +944,19 @@ const Nn = {
|
|
|
944
944
|
"input",
|
|
945
945
|
{
|
|
946
946
|
type: "checkbox",
|
|
947
|
-
id: `${
|
|
947
|
+
id: `${T}-${F.value}`,
|
|
948
948
|
className: "filter-checkbox-input",
|
|
949
949
|
checked: u.includes(F.value),
|
|
950
950
|
onChange: (G) => {
|
|
951
951
|
const W = G.target.checked ? [...u, F.value] : u.filter((pe) => pe !== F.value);
|
|
952
|
-
|
|
952
|
+
$.setFieldValue(`${T}.values`, W);
|
|
953
953
|
}
|
|
954
954
|
}
|
|
955
955
|
),
|
|
956
956
|
/* @__PURE__ */ e(
|
|
957
957
|
"label",
|
|
958
958
|
{
|
|
959
|
-
htmlFor: `${
|
|
959
|
+
htmlFor: `${T}-${F.value}`,
|
|
960
960
|
className: "filter-checkbox-label",
|
|
961
961
|
children: F.label
|
|
962
962
|
}
|
|
@@ -965,33 +965,33 @@ const Nn = {
|
|
|
965
965
|
] })
|
|
966
966
|
] });
|
|
967
967
|
case "multiselect-users":
|
|
968
|
-
const
|
|
968
|
+
const C = g[T] || [], M = x[T];
|
|
969
969
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
970
970
|
/* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
|
|
971
971
|
/* @__PURE__ */ e("label", { className: "filter-label", children: "Operator:" }),
|
|
972
972
|
/* @__PURE__ */ e(
|
|
973
973
|
"select",
|
|
974
974
|
{
|
|
975
|
-
value:
|
|
976
|
-
onChange: (F) =>
|
|
975
|
+
value: A.operator || "in",
|
|
976
|
+
onChange: (F) => $.setFieldValue(`${T}.operator`, F.target.value),
|
|
977
977
|
className: "filter-select",
|
|
978
978
|
children: _.operators.map((F) => /* @__PURE__ */ e("option", { value: F, children: F === "in" ? "Includes" : "Excludes" }, F))
|
|
979
979
|
}
|
|
980
980
|
)
|
|
981
981
|
] }),
|
|
982
|
-
M ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children:
|
|
982
|
+
M ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: C.length > 0 ? /* @__PURE__ */ n(te, { children: [
|
|
983
983
|
/* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
|
|
984
984
|
/* @__PURE__ */ e(
|
|
985
985
|
"input",
|
|
986
986
|
{
|
|
987
987
|
type: "checkbox",
|
|
988
|
-
id: `select-all-users-${
|
|
988
|
+
id: `select-all-users-${T}`,
|
|
989
989
|
className: "filter-checkbox-input",
|
|
990
|
-
checked:
|
|
990
|
+
checked: C.length > 0 && u.length === C.length,
|
|
991
991
|
onChange: (F) => {
|
|
992
|
-
const G = F.target.checked ?
|
|
993
|
-
|
|
994
|
-
`${
|
|
992
|
+
const G = F.target.checked ? C.map((W) => W.email) : [];
|
|
993
|
+
$.setFieldValue(
|
|
994
|
+
`${T}.values`,
|
|
995
995
|
G
|
|
996
996
|
);
|
|
997
997
|
}
|
|
@@ -1000,24 +1000,24 @@ const Nn = {
|
|
|
1000
1000
|
/* @__PURE__ */ e(
|
|
1001
1001
|
"label",
|
|
1002
1002
|
{
|
|
1003
|
-
htmlFor: `select-all-users-${
|
|
1003
|
+
htmlFor: `select-all-users-${T}`,
|
|
1004
1004
|
className: "filter-checkbox-label",
|
|
1005
1005
|
children: "Select All Users"
|
|
1006
1006
|
}
|
|
1007
1007
|
)
|
|
1008
1008
|
] }),
|
|
1009
|
-
|
|
1009
|
+
C.map((F) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
|
|
1010
1010
|
/* @__PURE__ */ e(
|
|
1011
1011
|
"input",
|
|
1012
1012
|
{
|
|
1013
1013
|
type: "checkbox",
|
|
1014
|
-
id: `${
|
|
1014
|
+
id: `${T}-${F.email}`,
|
|
1015
1015
|
className: "filter-checkbox-input",
|
|
1016
1016
|
checked: u.includes(F.email),
|
|
1017
1017
|
onChange: (G) => {
|
|
1018
1018
|
const W = G.target.checked ? [...u, F.email] : u.filter((pe) => pe !== F.email);
|
|
1019
|
-
|
|
1020
|
-
`${
|
|
1019
|
+
$.setFieldValue(
|
|
1020
|
+
`${T}.values`,
|
|
1021
1021
|
W
|
|
1022
1022
|
);
|
|
1023
1023
|
}
|
|
@@ -1026,7 +1026,7 @@ const Nn = {
|
|
|
1026
1026
|
/* @__PURE__ */ n(
|
|
1027
1027
|
"label",
|
|
1028
1028
|
{
|
|
1029
|
-
htmlFor: `${
|
|
1029
|
+
htmlFor: `${T}-${F.email}`,
|
|
1030
1030
|
className: "filter-checkbox-label",
|
|
1031
1031
|
children: [
|
|
1032
1032
|
/* @__PURE__ */ e("span", { className: "user-label-name", children: F.name }),
|
|
@@ -1038,12 +1038,12 @@ const Nn = {
|
|
|
1038
1038
|
] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
|
|
1039
1039
|
] });
|
|
1040
1040
|
case "date":
|
|
1041
|
-
const O =
|
|
1041
|
+
const O = A.values || [], [b, c] = O, f = b && c, w = O[0] || null, S = O[1] || null, I = {
|
|
1042
1042
|
startDate: w instanceof Date ? w.toISOString().slice(0, 10) : null,
|
|
1043
1043
|
endDate: w instanceof Date ? w.toISOString().slice(0, 10) : null
|
|
1044
1044
|
}, k = {
|
|
1045
|
-
startDate:
|
|
1046
|
-
endDate:
|
|
1045
|
+
startDate: S instanceof Date ? S.toISOString().slice(0, 10) : null,
|
|
1046
|
+
endDate: S instanceof Date ? S.toISOString().slice(0, 10) : null
|
|
1047
1047
|
}, R = [
|
|
1048
1048
|
{ key: "anytime", label: "Anytime" },
|
|
1049
1049
|
{ key: "today", label: "Today" },
|
|
@@ -1052,17 +1052,17 @@ const Nn = {
|
|
|
1052
1052
|
{ key: "this_month", label: "This Month" },
|
|
1053
1053
|
{ key: "last_month", label: "Last Month" },
|
|
1054
1054
|
{ key: "custom", label: "Custom" }
|
|
1055
|
-
],
|
|
1055
|
+
], V = (F) => {
|
|
1056
1056
|
if (F === "anytime") {
|
|
1057
|
-
|
|
1057
|
+
$.setFieldValue(`${T}.values`, []), $.setFieldValue(`${T}.range`, "anytime");
|
|
1058
1058
|
return;
|
|
1059
1059
|
}
|
|
1060
1060
|
if (F === "custom") {
|
|
1061
|
-
|
|
1061
|
+
$.setFieldValue(`${T}.range`, "custom");
|
|
1062
1062
|
return;
|
|
1063
1063
|
}
|
|
1064
1064
|
const [G, W] = Fn(F);
|
|
1065
|
-
|
|
1065
|
+
$.setFieldValue(`${T}.values`, G && W ? [G, W] : []), $.setFieldValue(`${T}.range`, F);
|
|
1066
1066
|
};
|
|
1067
1067
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
1068
1068
|
/* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
|
|
@@ -1070,8 +1070,8 @@ const Nn = {
|
|
|
1070
1070
|
/* @__PURE__ */ e(
|
|
1071
1071
|
"select",
|
|
1072
1072
|
{
|
|
1073
|
-
value:
|
|
1074
|
-
onChange: (F) =>
|
|
1073
|
+
value: A.operator,
|
|
1074
|
+
onChange: (F) => $.setFieldValue(`${T}.operator`, F.target.value),
|
|
1075
1075
|
className: "filter-select",
|
|
1076
1076
|
children: _.operators.map((F) => /* @__PURE__ */ e("option", { value: F, children: F === "in" ? "Is" : "Is not" }, F))
|
|
1077
1077
|
}
|
|
@@ -1081,9 +1081,9 @@ const Nn = {
|
|
|
1081
1081
|
{
|
|
1082
1082
|
type: "button",
|
|
1083
1083
|
onClick: () => {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
h[
|
|
1084
|
+
$.setFieldValue(
|
|
1085
|
+
T,
|
|
1086
|
+
h[T]
|
|
1087
1087
|
);
|
|
1088
1088
|
},
|
|
1089
1089
|
className: "filter-clear-selection-button",
|
|
@@ -1092,7 +1092,7 @@ const Nn = {
|
|
|
1092
1092
|
)
|
|
1093
1093
|
] }),
|
|
1094
1094
|
/* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: R.map((F) => {
|
|
1095
|
-
const G =
|
|
1095
|
+
const G = A.range === F.key || F.key === "anytime" && (!Array.isArray(A.values) || A.values.length === 0);
|
|
1096
1096
|
return /* @__PURE__ */ n(
|
|
1097
1097
|
"label",
|
|
1098
1098
|
{
|
|
@@ -1102,9 +1102,9 @@ const Nn = {
|
|
|
1102
1102
|
"input",
|
|
1103
1103
|
{
|
|
1104
1104
|
type: "radio",
|
|
1105
|
-
name: `preset-${
|
|
1105
|
+
name: `preset-${T}`,
|
|
1106
1106
|
checked: G,
|
|
1107
|
-
onChange: () =>
|
|
1107
|
+
onChange: () => V(F.key),
|
|
1108
1108
|
className: "h-4 w-4"
|
|
1109
1109
|
}
|
|
1110
1110
|
),
|
|
@@ -1127,7 +1127,7 @@ const Nn = {
|
|
|
1127
1127
|
value: I,
|
|
1128
1128
|
onChange: (F) => {
|
|
1129
1129
|
const G = F?.startDate ? je(new Date(F.startDate)) : null, W = O[1] || null;
|
|
1130
|
-
G && (
|
|
1130
|
+
G && ($.setFieldValue(`${T}.values`, [G, W]), $.setFieldValue(`${T}.range`, "custom"));
|
|
1131
1131
|
},
|
|
1132
1132
|
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",
|
|
1133
1133
|
primaryColor: "violet",
|
|
@@ -1151,7 +1151,7 @@ const Nn = {
|
|
|
1151
1151
|
value: k,
|
|
1152
1152
|
onChange: (F) => {
|
|
1153
1153
|
const G = F?.startDate ? _e(new Date(F.startDate)) : null, W = O[0] || null;
|
|
1154
|
-
G && (
|
|
1154
|
+
G && ($.setFieldValue(`${T}.values`, [W, G]), $.setFieldValue(`${T}.range`, "custom"));
|
|
1155
1155
|
},
|
|
1156
1156
|
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",
|
|
1157
1157
|
primaryColor: "violet",
|
|
@@ -1164,7 +1164,7 @@ const Nn = {
|
|
|
1164
1164
|
}
|
|
1165
1165
|
)
|
|
1166
1166
|
] }),
|
|
1167
|
-
w &&
|
|
1167
|
+
w && S && w > S && /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-2", children: "End date must be after start date" })
|
|
1168
1168
|
] })
|
|
1169
1169
|
] });
|
|
1170
1170
|
default:
|
|
@@ -1208,7 +1208,7 @@ const Nn = {
|
|
|
1208
1208
|
}
|
|
1209
1209
|
)
|
|
1210
1210
|
] }),
|
|
1211
|
-
/* @__PURE__ */ n("form", { onSubmit:
|
|
1211
|
+
/* @__PURE__ */ n("form", { onSubmit: $.handleSubmit, className: "filter-form", children: [
|
|
1212
1212
|
/* @__PURE__ */ e("div", { className: "filter-content-wrapper", children: /* @__PURE__ */ n(
|
|
1213
1213
|
Er,
|
|
1214
1214
|
{
|
|
@@ -1219,11 +1219,11 @@ const Nn = {
|
|
|
1219
1219
|
flexGrow: 1
|
|
1220
1220
|
},
|
|
1221
1221
|
children: [
|
|
1222
|
-
/* @__PURE__ */ e(Rr, { className: "filter-tabs-list", children: l.map((
|
|
1222
|
+
/* @__PURE__ */ e(Rr, { className: "filter-tabs-list", children: l.map((T) => /* @__PURE__ */ n(ne, { className: "filter-tab-item", children: [
|
|
1223
1223
|
/* @__PURE__ */ e("div", { className: "filter-selection-horizontal-indicator" }),
|
|
1224
1224
|
/* @__PURE__ */ n("div", { className: "filter-lbl-indicator-wrapper", children: [
|
|
1225
|
-
|
|
1226
|
-
|
|
1225
|
+
T.label,
|
|
1226
|
+
D[T.key] && /* @__PURE__ */ e(
|
|
1227
1227
|
"span",
|
|
1228
1228
|
{
|
|
1229
1229
|
className: "filter-active-indicator",
|
|
@@ -1231,8 +1231,8 @@ const Nn = {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
)
|
|
1233
1233
|
] })
|
|
1234
|
-
] },
|
|
1235
|
-
/* @__PURE__ */ e(Ir, { className: "filter-tabs-panels", children: l.map((
|
|
1234
|
+
] }, T.key)) }),
|
|
1235
|
+
/* @__PURE__ */ e(Ir, { className: "filter-tabs-panels", children: l.map((T) => /* @__PURE__ */ e(
|
|
1236
1236
|
ne.Panel,
|
|
1237
1237
|
{
|
|
1238
1238
|
className: "filter-tab-panel",
|
|
@@ -1243,12 +1243,12 @@ const Nn = {
|
|
|
1243
1243
|
animate: { opacity: 1, x: 0 },
|
|
1244
1244
|
transition: { duration: 0.3 },
|
|
1245
1245
|
className: "h-full",
|
|
1246
|
-
children: q(
|
|
1246
|
+
children: q(T.key)
|
|
1247
1247
|
},
|
|
1248
|
-
|
|
1248
|
+
T.key
|
|
1249
1249
|
)
|
|
1250
1250
|
},
|
|
1251
|
-
|
|
1251
|
+
T.key
|
|
1252
1252
|
)) })
|
|
1253
1253
|
]
|
|
1254
1254
|
}
|
|
@@ -1267,7 +1267,7 @@ const Nn = {
|
|
|
1267
1267
|
"button",
|
|
1268
1268
|
{
|
|
1269
1269
|
type: "submit",
|
|
1270
|
-
disabled:
|
|
1270
|
+
disabled: !$.dirty || L,
|
|
1271
1271
|
className: "filter-button apply",
|
|
1272
1272
|
children: [
|
|
1273
1273
|
"Apply Filters",
|
|
@@ -2666,35 +2666,35 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2666
2666
|
},
|
|
2667
2667
|
isChanged: p = !1
|
|
2668
2668
|
}) => {
|
|
2669
|
-
const [g, v] = P(Mt[0]), [x, r] = P(""), N = wt(x, 400), [m, y] = P([]), [z,
|
|
2669
|
+
const [g, v] = P(Mt[0]), [x, r] = P(""), N = wt(x, 400), [m, y] = P([]), [z, $] = P(/* @__PURE__ */ new Set()), [D, E] = P(!1), [L, j] = P(Pt[0]), {
|
|
2670
2670
|
control: U,
|
|
2671
2671
|
handleSubmit: Y,
|
|
2672
2672
|
watch: q,
|
|
2673
|
-
formState: { errors:
|
|
2673
|
+
formState: { errors: T, isSubmitting: _ }
|
|
2674
2674
|
} = Za({
|
|
2675
2675
|
defaultValues: { pendingInvites: [] },
|
|
2676
2676
|
resolver: tr(Hn)
|
|
2677
|
-
}), { fields:
|
|
2677
|
+
}), { fields: A, append: u, remove: C, update: M } = Ka({
|
|
2678
2678
|
control: U,
|
|
2679
2679
|
name: "pendingInvites"
|
|
2680
2680
|
}), O = q("pendingInvites");
|
|
2681
2681
|
K(() => {
|
|
2682
2682
|
N.length > 1 ? (E(!0), Jn(g.name, N).then((k) => {
|
|
2683
2683
|
y(k);
|
|
2684
|
-
}).catch((k) => console.error("Search failed:", k)).finally(() => E(!1))) : (y([]),
|
|
2684
|
+
}).catch((k) => console.error("Search failed:", k)).finally(() => E(!1))) : (y([]), $(/* @__PURE__ */ new Set()));
|
|
2685
2685
|
}, [N, g]);
|
|
2686
2686
|
const b = (k) => {
|
|
2687
|
-
|
|
2688
|
-
const
|
|
2689
|
-
return
|
|
2687
|
+
$((R) => {
|
|
2688
|
+
const V = new Set(R);
|
|
2689
|
+
return V.has(k) ? V.delete(k) : V.add(k), V;
|
|
2690
2690
|
});
|
|
2691
2691
|
}, c = () => {
|
|
2692
2692
|
m.filter((k) => z.has(k.id)).forEach((k) => {
|
|
2693
|
-
|
|
2694
|
-
}),
|
|
2693
|
+
A.find((R) => R.id === k.id) || u({ ...k, permission: L.name });
|
|
2694
|
+
}), $(/* @__PURE__ */ new Set()), r("");
|
|
2695
2695
|
}, f = (k) => {
|
|
2696
|
-
|
|
2697
|
-
(R,
|
|
2696
|
+
j(k), A.forEach(
|
|
2697
|
+
(R, V) => M(V, { ...A[V], permission: k.name })
|
|
2698
2698
|
);
|
|
2699
2699
|
}, w = async (k) => {
|
|
2700
2700
|
try {
|
|
@@ -2711,13 +2711,13 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2711
2711
|
// Always send updated existing shares
|
|
2712
2712
|
}, i);
|
|
2713
2713
|
} else if (l === ue.INTEREST) {
|
|
2714
|
-
const R = k.pendingInvites.map((
|
|
2715
|
-
identity:
|
|
2716
|
-
type:
|
|
2714
|
+
const R = k.pendingInvites.map((V) => ({
|
|
2715
|
+
identity: V.id,
|
|
2716
|
+
type: V.type.toLowerCase(),
|
|
2717
2717
|
opt: !0,
|
|
2718
2718
|
lock: !1,
|
|
2719
2719
|
moderator: !1,
|
|
2720
|
-
userName:
|
|
2720
|
+
userName: V.name,
|
|
2721
2721
|
interestId: t?.data?.id
|
|
2722
2722
|
}));
|
|
2723
2723
|
o(R, i);
|
|
@@ -2740,8 +2740,8 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2740
2740
|
} catch (R) {
|
|
2741
2741
|
throw console.error("Failed to submit invites:", R), R;
|
|
2742
2742
|
}
|
|
2743
|
-
},
|
|
2744
|
-
const R = i[g.code].find((
|
|
2743
|
+
}, S = (k) => {
|
|
2744
|
+
const R = i[g.code].find((V) => V.name === k.name && V.permission !== "remove") || O.find((V) => V.name === k.name);
|
|
2745
2745
|
return R ? `${R.permission}` : "";
|
|
2746
2746
|
}, I = () => {
|
|
2747
2747
|
switch (l) {
|
|
@@ -2836,7 +2836,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2836
2836
|
value: x
|
|
2837
2837
|
}
|
|
2838
2838
|
) }),
|
|
2839
|
-
/* @__PURE__ */ e(Se, { children: (m?.length > 0 ||
|
|
2839
|
+
/* @__PURE__ */ e(Se, { children: (m?.length > 0 || D) && /* @__PURE__ */ e(
|
|
2840
2840
|
ie.div,
|
|
2841
2841
|
{
|
|
2842
2842
|
initial: { opacity: 0, y: -10 },
|
|
@@ -2844,9 +2844,9 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2844
2844
|
exit: { opacity: 0, y: -10 },
|
|
2845
2845
|
transition: { duration: 0.2 },
|
|
2846
2846
|
className: "absolute top-full mt-2 w-full col-span-3 bg-white border border-gray-300 rounded-lg shadow-lg z-10",
|
|
2847
|
-
children:
|
|
2847
|
+
children: D ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500", children: "Loading..." }) : /* @__PURE__ */ n(te, { children: [
|
|
2848
2848
|
/* @__PURE__ */ e("div", { className: "max-h-60 overflow-y-auto p-2 space-y-1", children: m.map((k) => {
|
|
2849
|
-
const R =
|
|
2849
|
+
const R = S(k);
|
|
2850
2850
|
return /* @__PURE__ */ n(
|
|
2851
2851
|
"div",
|
|
2852
2852
|
{
|
|
@@ -2900,7 +2900,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2900
2900
|
}
|
|
2901
2901
|
) })
|
|
2902
2902
|
] }),
|
|
2903
|
-
/* @__PURE__ */ e(Se, { children:
|
|
2903
|
+
/* @__PURE__ */ e(Se, { children: A.length > 0 && /* @__PURE__ */ n(
|
|
2904
2904
|
ie.div,
|
|
2905
2905
|
{
|
|
2906
2906
|
initial: { opacity: 0, y: 20 },
|
|
@@ -2910,7 +2910,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2910
2910
|
/* @__PURE__ */ n("div", { className: "flex justify-between items-center", children: [
|
|
2911
2911
|
/* @__PURE__ */ n("div", { className: "font-semibold text-gray-800", children: [
|
|
2912
2912
|
"Pending Invites (",
|
|
2913
|
-
|
|
2913
|
+
A.length,
|
|
2914
2914
|
")"
|
|
2915
2915
|
] }),
|
|
2916
2916
|
l === ue.DRIVE && /* @__PURE__ */ e(
|
|
@@ -2941,7 +2941,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2941
2941
|
{
|
|
2942
2942
|
value: k,
|
|
2943
2943
|
className: ({ active: R }) => `${R ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
|
|
2944
|
-
children: ({ selected: R, active:
|
|
2944
|
+
children: ({ selected: R, active: V }) => /* @__PURE__ */ n(te, { children: [
|
|
2945
2945
|
/* @__PURE__ */ n(
|
|
2946
2946
|
"span",
|
|
2947
2947
|
{
|
|
@@ -2950,7 +2950,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2950
2950
|
/* @__PURE__ */ e(
|
|
2951
2951
|
k.icon,
|
|
2952
2952
|
{
|
|
2953
|
-
className: `h-5 w-5 mr-2 ${
|
|
2953
|
+
className: `h-5 w-5 mr-2 ${V ? "text-white" : "text-gray-400"}`
|
|
2954
2954
|
}
|
|
2955
2955
|
),
|
|
2956
2956
|
"Can ",
|
|
@@ -2975,7 +2975,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
2975
2975
|
}
|
|
2976
2976
|
)
|
|
2977
2977
|
] }),
|
|
2978
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(Se, { children:
|
|
2978
|
+
/* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(Se, { children: A.map((k, R) => /* @__PURE__ */ n(
|
|
2979
2979
|
ie.div,
|
|
2980
2980
|
{
|
|
2981
2981
|
layout: !0,
|
|
@@ -3003,7 +3003,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3003
3003
|
/* @__PURE__ */ e(
|
|
3004
3004
|
"button",
|
|
3005
3005
|
{
|
|
3006
|
-
onClick: () =>
|
|
3006
|
+
onClick: () => C(R),
|
|
3007
3007
|
className: "text-gray-400 hover:text-red-500 hover:cursor-pointer",
|
|
3008
3008
|
children: /* @__PURE__ */ e(Be, { className: "h-5 w-5" })
|
|
3009
3009
|
}
|
|
@@ -3055,22 +3055,22 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3055
3055
|
}) => {
|
|
3056
3056
|
const [o, p] = P(l), [g, v] = P(0), [x, r] = P(""), N = wt(x, 300), m = {
|
|
3057
3057
|
users: o.users.filter(
|
|
3058
|
-
(
|
|
3058
|
+
(D) => D.name.toLowerCase().includes(N.toLowerCase())
|
|
3059
3059
|
),
|
|
3060
3060
|
groups: o.groups.filter(
|
|
3061
|
-
(
|
|
3061
|
+
(D) => D.name.toLowerCase().includes(N.toLowerCase())
|
|
3062
3062
|
),
|
|
3063
3063
|
roles: o.roles.filter(
|
|
3064
|
-
(
|
|
3064
|
+
(D) => D.name.toLowerCase().includes(N.toLowerCase())
|
|
3065
3065
|
)
|
|
3066
|
-
}, y = (
|
|
3067
|
-
console.log("[ManageFlow] Removing item:", { itemToRemove:
|
|
3066
|
+
}, y = (D, E) => {
|
|
3067
|
+
console.log("[ManageFlow] Removing item:", { itemToRemove: D, listKey: E });
|
|
3068
3068
|
const L = {
|
|
3069
3069
|
...o,
|
|
3070
|
-
[E]: o[E].filter((
|
|
3070
|
+
[E]: o[E].filter((j) => j.id !== D.id)
|
|
3071
3071
|
};
|
|
3072
3072
|
p(L), console.log("[ManageFlow] Syncing updated shares with parent:", L), a(L, !0);
|
|
3073
|
-
}, z = ["users", "groups", "roles"],
|
|
3073
|
+
}, z = ["users", "groups", "roles"], $ = ["Users", "Groups", "Roles"];
|
|
3074
3074
|
return (
|
|
3075
3075
|
// The main structure remains the same...
|
|
3076
3076
|
/* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-gray-50", children: [
|
|
@@ -3098,7 +3098,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3098
3098
|
] }),
|
|
3099
3099
|
/* @__PURE__ */ e("div", { className: "flex flex-col flex-grow", children: /* @__PURE__ */ n(ne.Group, { selectedIndex: g, onChange: v, children: [
|
|
3100
3100
|
/* @__PURE__ */ n("div", { className: "p-4 bg-white border-b border-gray-300", children: [
|
|
3101
|
-
/* @__PURE__ */ e(ne.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children:
|
|
3101
|
+
/* @__PURE__ */ e(ne.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: $.map((D) => /* @__PURE__ */ e(
|
|
3102
3102
|
ne,
|
|
3103
3103
|
{
|
|
3104
3104
|
className: ({
|
|
@@ -3106,16 +3106,16 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3106
3106
|
}) => `w-full py-2 text-sm font-medium leading-5 rounded-md
|
|
3107
3107
|
focus:outline-none focus:ring-2 ring-offset-2 ring-offset-blue-400 ring-white ring-opacity-60
|
|
3108
3108
|
${E ? "bg-white shadow text-blue-700" : "text-gray-600 hover:bg-white/[0.6]"}`,
|
|
3109
|
-
children:
|
|
3109
|
+
children: D
|
|
3110
3110
|
},
|
|
3111
|
-
|
|
3111
|
+
D
|
|
3112
3112
|
)) }),
|
|
3113
3113
|
/* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ e(
|
|
3114
3114
|
fe,
|
|
3115
3115
|
{
|
|
3116
3116
|
onDebouncedChange: r,
|
|
3117
3117
|
value: x,
|
|
3118
|
-
placeholder: `Search in ${
|
|
3118
|
+
placeholder: `Search in ${$[g]}...`
|
|
3119
3119
|
}
|
|
3120
3120
|
) })
|
|
3121
3121
|
] }),
|
|
@@ -3126,11 +3126,11 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3126
3126
|
animate: { y: 0, opacity: 1 },
|
|
3127
3127
|
exit: { y: -10, opacity: 0 },
|
|
3128
3128
|
transition: { duration: 0.2 },
|
|
3129
|
-
children: /* @__PURE__ */ e(ne.Panels, { as: Z, children: z.map((
|
|
3129
|
+
children: /* @__PURE__ */ e(ne.Panels, { as: Z, children: z.map((D) => /* @__PURE__ */ e(
|
|
3130
3130
|
ne.Panel,
|
|
3131
3131
|
{
|
|
3132
3132
|
className: "space-y-3 focus:outline-none",
|
|
3133
|
-
children: /* @__PURE__ */ e(Se, { children: m[
|
|
3133
|
+
children: /* @__PURE__ */ e(Se, { children: m[D].length > 0 ? m[D].map((E) => /* @__PURE__ */ n(
|
|
3134
3134
|
ie.div,
|
|
3135
3135
|
{
|
|
3136
3136
|
layout: !0,
|
|
@@ -3154,12 +3154,12 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3154
3154
|
),
|
|
3155
3155
|
/* @__PURE__ */ n("div", { className: "overflow-hidden", children: [
|
|
3156
3156
|
/* @__PURE__ */ e("p", { className: "font-medium text-gray-900 truncate", children: E.name }),
|
|
3157
|
-
|
|
3157
|
+
D !== "users" && /* @__PURE__ */ e(
|
|
3158
3158
|
"button",
|
|
3159
3159
|
{
|
|
3160
3160
|
onClick: () => i({
|
|
3161
3161
|
id: E.id,
|
|
3162
|
-
type:
|
|
3162
|
+
type: D,
|
|
3163
3163
|
name: E.name
|
|
3164
3164
|
}),
|
|
3165
3165
|
className: "text-sm text-blue-600 hover:underline hover:cursor-pointer",
|
|
@@ -3171,7 +3171,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3171
3171
|
/* @__PURE__ */ e(
|
|
3172
3172
|
"button",
|
|
3173
3173
|
{
|
|
3174
|
-
onClick: () => y(E,
|
|
3174
|
+
onClick: () => y(E, D),
|
|
3175
3175
|
className: "text-gray-400 hover:text-red-500 hover:cursor-pointer p-1 rounded-full hover:bg-red-50",
|
|
3176
3176
|
title: "Remove access",
|
|
3177
3177
|
children: /* @__PURE__ */ e(Be, { className: "h-5 w-5" })
|
|
@@ -3192,16 +3192,16 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3192
3192
|
/* @__PURE__ */ e(Zt, { className: "h-12 w-12 text-gray-400" }),
|
|
3193
3193
|
/* @__PURE__ */ n("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: [
|
|
3194
3194
|
"No ",
|
|
3195
|
-
|
|
3195
|
+
$[g],
|
|
3196
3196
|
" Found"
|
|
3197
3197
|
] }),
|
|
3198
|
-
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: x ? `No results for "${x}"` : `There are no ${
|
|
3198
|
+
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: x ? `No results for "${x}"` : `There are no ${$[g].toLowerCase()} with access.` })
|
|
3199
3199
|
]
|
|
3200
3200
|
}
|
|
3201
3201
|
)
|
|
3202
3202
|
) })
|
|
3203
3203
|
},
|
|
3204
|
-
|
|
3204
|
+
D
|
|
3205
3205
|
)) })
|
|
3206
3206
|
},
|
|
3207
3207
|
g
|
|
@@ -3343,12 +3343,12 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3343
3343
|
allowedPermissions: p = [],
|
|
3344
3344
|
...g
|
|
3345
3345
|
}) => {
|
|
3346
|
-
const [v, x] = P(ge.INVITE), [r, N] = P(t), [m, y] = P(null), [z,
|
|
3346
|
+
const [v, x] = P(ge.INVITE), [r, N] = P(t), [m, y] = P(null), [z, $] = P(!1), [D, E] = P([]), [L, j] = P(ge.MANAGE), U = () => {
|
|
3347
3347
|
x(ge.INVITE), y(null), h();
|
|
3348
3348
|
}, Y = () => {
|
|
3349
3349
|
x(ge.MANAGE);
|
|
3350
|
-
}, q = async ({ id:
|
|
3351
|
-
if (
|
|
3350
|
+
}, q = async ({ id: A, name: u, type: C }) => {
|
|
3351
|
+
if (C === "groups") {
|
|
3352
3352
|
try {
|
|
3353
3353
|
const M = await Ze(`${Xe.getMembersForGroup(u)}`);
|
|
3354
3354
|
} catch (M) {
|
|
@@ -3356,13 +3356,13 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3356
3356
|
}
|
|
3357
3357
|
E(resp);
|
|
3358
3358
|
}
|
|
3359
|
-
y({ id:
|
|
3360
|
-
},
|
|
3361
|
-
console.log("changedExistingShares",
|
|
3362
|
-
const
|
|
3363
|
-
console.log("Existing data:",
|
|
3364
|
-
const O = !it.isEqual(
|
|
3365
|
-
console.log("hasPermissionChanged:", O),
|
|
3359
|
+
y({ id: A, type: C, name: u }), j(v), x(ge.MEMBERS);
|
|
3360
|
+
}, T = (A, u = !1) => {
|
|
3361
|
+
console.log("changedExistingShares", A), N(A);
|
|
3362
|
+
const C = it.mapValues(t, (b) => b.map((c) => ({ id: c.id, permission: c.permission })).sort((c, f) => c.id - f.id)), M = it.mapValues(A, (b) => b.map((c) => ({ id: c.id, permission: c.permission })).sort((c, f) => c.id - f.id));
|
|
3363
|
+
console.log("Existing data:", C), console.log("Changed data:", M);
|
|
3364
|
+
const O = !it.isEqual(C, M);
|
|
3365
|
+
console.log("hasPermissionChanged:", O), $(O), O && (console.log("[AddUserGroupsRolesModal] Immediately syncing changes with parent"), s({ pendingInvites: [] }, A)), u && v === ge.MANAGE ? console.log("[AddUserGroupsRolesModal] Staying in ManageFlow after removal") : x(v === ge.MEMBERS ? L : ge.INVITE);
|
|
3366
3366
|
};
|
|
3367
3367
|
return /* @__PURE__ */ e(be, { appear: !0, show: a, as: Z, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose: U, children: [
|
|
3368
3368
|
/* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
|
|
@@ -3381,7 +3381,7 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3381
3381
|
Kn,
|
|
3382
3382
|
{
|
|
3383
3383
|
entity: i,
|
|
3384
|
-
onBack:
|
|
3384
|
+
onBack: T,
|
|
3385
3385
|
onClose: U,
|
|
3386
3386
|
onOpenMembers: q,
|
|
3387
3387
|
existingShares: r,
|
|
@@ -3405,11 +3405,11 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3405
3405
|
ts,
|
|
3406
3406
|
{
|
|
3407
3407
|
entity: m,
|
|
3408
|
-
onBack:
|
|
3408
|
+
onBack: T,
|
|
3409
3409
|
onClose: U,
|
|
3410
3410
|
calledBy: l,
|
|
3411
3411
|
existingShares: r,
|
|
3412
|
-
members:
|
|
3412
|
+
members: D
|
|
3413
3413
|
}
|
|
3414
3414
|
)
|
|
3415
3415
|
},
|
|
@@ -3433,8 +3433,8 @@ const Ee = Wn(), Ze = Ee.axiosGet, Ll = Ee.axiosDelete, bt = Ee.axiosPost, Bl =
|
|
|
3433
3433
|
existingShares: r,
|
|
3434
3434
|
calledBy: l,
|
|
3435
3435
|
showExistingShares: o,
|
|
3436
|
-
onFinalSubmit: (
|
|
3437
|
-
s(
|
|
3436
|
+
onFinalSubmit: (A) => {
|
|
3437
|
+
s(A, r);
|
|
3438
3438
|
},
|
|
3439
3439
|
isChanged: z
|
|
3440
3440
|
}
|
|
@@ -3472,30 +3472,30 @@ function at({
|
|
|
3472
3472
|
getOptionId: m = (z) => String(z.id),
|
|
3473
3473
|
getOptionLabel: y = (z) => z.name
|
|
3474
3474
|
}) {
|
|
3475
|
-
const z = He(),
|
|
3476
|
-
const
|
|
3477
|
-
for (const u of a)
|
|
3478
|
-
return
|
|
3479
|
-
}, [a, m]), U = ee(() => Array.isArray(s) ? s.map((
|
|
3480
|
-
if (
|
|
3481
|
-
const
|
|
3482
|
-
return a.filter((u) => y(u).toLowerCase().includes(
|
|
3483
|
-
}, [a,
|
|
3475
|
+
const z = He(), $ = He(), [D, E] = P(""), L = he(""), j = ee(() => {
|
|
3476
|
+
const A = /* @__PURE__ */ new Map();
|
|
3477
|
+
for (const u of a) A.set(m(u), u);
|
|
3478
|
+
return A;
|
|
3479
|
+
}, [a, m]), U = ee(() => Array.isArray(s) ? s.map((A) => A && typeof A == "object" ? j.get(m(A)) || null : j.get(String(A))).filter(Boolean) : [], [s, j, m]), Y = ee(() => {
|
|
3480
|
+
if (!D) return a;
|
|
3481
|
+
const A = D.toLowerCase();
|
|
3482
|
+
return a.filter((u) => y(u).toLowerCase().includes(A));
|
|
3483
|
+
}, [a, D, y]);
|
|
3484
3484
|
K(() => {
|
|
3485
|
-
v === "server" &&
|
|
3486
|
-
}, [
|
|
3487
|
-
const q = v === "client" ? Y : a,
|
|
3485
|
+
v === "server" && D.length >= N && D !== L.current && (L.current = D, x && x(D));
|
|
3486
|
+
}, [D, v, N, x]);
|
|
3487
|
+
const q = v === "client" ? Y : a, T = () => {
|
|
3488
3488
|
if (!U.length)
|
|
3489
3489
|
return /* @__PURE__ */ e("span", { className: "text-gray-500", children: h });
|
|
3490
|
-
const
|
|
3490
|
+
const A = U.slice(0, p), u = U.length - p;
|
|
3491
3491
|
return /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2", children: [
|
|
3492
|
-
|
|
3492
|
+
A.map((C) => /* @__PURE__ */ e(
|
|
3493
3493
|
"span",
|
|
3494
3494
|
{
|
|
3495
3495
|
className: "px-2 py-1 text-xs font-medium text-white bg-gray-800 rounded-full",
|
|
3496
|
-
children: y(
|
|
3496
|
+
children: y(C)
|
|
3497
3497
|
},
|
|
3498
|
-
m(
|
|
3498
|
+
m(C)
|
|
3499
3499
|
)),
|
|
3500
3500
|
u > 0 && /* @__PURE__ */ n("span", { className: "px-2 py-1 text-xs font-medium text-gray-600 bg-gray-200 rounded-full", children: [
|
|
3501
3501
|
"+",
|
|
@@ -3504,10 +3504,10 @@ function at({
|
|
|
3504
3504
|
] })
|
|
3505
3505
|
] });
|
|
3506
3506
|
};
|
|
3507
|
-
return /* @__PURE__ */ e(le, { value: U, onChange: (
|
|
3508
|
-
const u = Array.from(new Set(
|
|
3507
|
+
return /* @__PURE__ */ e(le, { value: U, onChange: (A) => {
|
|
3508
|
+
const u = Array.from(new Set(A.map((C) => m(C))));
|
|
3509
3509
|
g !== -1 && u.length > g || i(u);
|
|
3510
|
-
}, multiple: !0, by: "id", children: ({ open:
|
|
3510
|
+
}, multiple: !0, by: "id", children: ({ open: A }) => /* @__PURE__ */ n("div", { children: [
|
|
3511
3511
|
/* @__PURE__ */ e(
|
|
3512
3512
|
le.Label,
|
|
3513
3513
|
{
|
|
@@ -3522,14 +3522,14 @@ function at({
|
|
|
3522
3522
|
{
|
|
3523
3523
|
"aria-labelledby": z,
|
|
3524
3524
|
"aria-invalid": !!o,
|
|
3525
|
-
"aria-describedby": o ?
|
|
3525
|
+
"aria-describedby": o ? $ : void 0,
|
|
3526
3526
|
onBlur: l,
|
|
3527
3527
|
className: qe(
|
|
3528
3528
|
"relative w-full min-h-[38px] cursor-default rounded-md bg-white py-1.5 pl-3 pr-10 text-left text-gray-900 shadow-sm ring-1 ring-inset focus:outline-none focus:ring-2 focus:ring-gray-600 sm:text-sm sm:leading-6",
|
|
3529
3529
|
o ? "ring-red-500" : "ring-gray-300"
|
|
3530
3530
|
),
|
|
3531
3531
|
children: [
|
|
3532
|
-
/* @__PURE__ */ e("span", { className: "block truncate", children:
|
|
3532
|
+
/* @__PURE__ */ e("span", { className: "block truncate", children: T() }),
|
|
3533
3533
|
/* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(Qt, { className: "w-5 h-5 text-gray-400", "aria-hidden": "true" }) })
|
|
3534
3534
|
]
|
|
3535
3535
|
}
|
|
@@ -3538,7 +3538,7 @@ function at({
|
|
|
3538
3538
|
be,
|
|
3539
3539
|
{
|
|
3540
3540
|
as: Z,
|
|
3541
|
-
show:
|
|
3541
|
+
show: A,
|
|
3542
3542
|
leave: "transition ease-in duration-100",
|
|
3543
3543
|
leaveFrom: "opacity-100",
|
|
3544
3544
|
leaveTo: "opacity-0",
|
|
@@ -3546,14 +3546,14 @@ function at({
|
|
|
3546
3546
|
/* @__PURE__ */ e("div", { className: "p-2 sticky top-0 bg-white z-20 shadow-sm", children: /* @__PURE__ */ e(
|
|
3547
3547
|
fe,
|
|
3548
3548
|
{
|
|
3549
|
-
value:
|
|
3549
|
+
value: D,
|
|
3550
3550
|
onDebouncedChange: E,
|
|
3551
3551
|
placeholder: v === "server" ? `Search (min ${N})…` : "Search options…"
|
|
3552
3552
|
}
|
|
3553
3553
|
) }),
|
|
3554
3554
|
v === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
|
|
3555
|
-
q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: v === "server" ?
|
|
3556
|
-
const
|
|
3555
|
+
q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: v === "server" ? D.length < N ? `Type at least ${N} characters to search.` : "No results." : "No options found." }) : q.map((u) => {
|
|
3556
|
+
const C = m(u), M = y(u), O = U.some((c) => m(c) === C), b = g !== -1 && U.length >= g && !O;
|
|
3557
3557
|
return /* @__PURE__ */ e(
|
|
3558
3558
|
le.Option,
|
|
3559
3559
|
{
|
|
@@ -3586,13 +3586,13 @@ function at({
|
|
|
3586
3586
|
)
|
|
3587
3587
|
] })
|
|
3588
3588
|
},
|
|
3589
|
-
|
|
3589
|
+
C
|
|
3590
3590
|
);
|
|
3591
3591
|
})
|
|
3592
3592
|
] })
|
|
3593
3593
|
}
|
|
3594
3594
|
),
|
|
3595
|
-
o && /* @__PURE__ */ e("p", { id:
|
|
3595
|
+
o && /* @__PURE__ */ e("p", { id: $, className: "mt-1 text-sm text-red-600", children: o })
|
|
3596
3596
|
] })
|
|
3597
3597
|
] }) });
|
|
3598
3598
|
}
|
|
@@ -3750,9 +3750,9 @@ function ns({
|
|
|
3750
3750
|
dropId: x,
|
|
3751
3751
|
indent: r = 24
|
|
3752
3752
|
}) {
|
|
3753
|
-
const { setNodeRef: N, isOver: m } = rr({ id: x }), { attributes: y, listeners: z, setNodeRef:
|
|
3754
|
-
const
|
|
3755
|
-
U(!1),
|
|
3753
|
+
const { setNodeRef: N, isOver: m } = rr({ id: x }), { attributes: y, listeners: z, setNodeRef: $, transform: D, isDragging: E } = nr({ id: v }), L = D ? { transform: `translate3d(${Math.round(D.x)}px, ${Math.round(D.y)}px, 0)` } : void 0, [j, U] = P(!1), [Y, q] = P(t.name), T = () => {
|
|
3754
|
+
const A = Y.trim();
|
|
3755
|
+
U(!1), A && A !== t.name ? o?.(t, A) : q(t.name);
|
|
3756
3756
|
}, _ = ee(() => /* @__PURE__ */ e(
|
|
3757
3757
|
Ln,
|
|
3758
3758
|
{
|
|
@@ -3772,21 +3772,21 @@ function ns({
|
|
|
3772
3772
|
ref: N,
|
|
3773
3773
|
className: `tv-row ${m ? "tv-drop-over" : ""} ${E ? "dragging" : ""}`,
|
|
3774
3774
|
style: { ...L, paddingLeft: 8 + a * r },
|
|
3775
|
-
onClick: (
|
|
3776
|
-
|
|
3775
|
+
onClick: (A) => {
|
|
3776
|
+
A.target.closest(".tv-toggle") || A.target.tagName === "INPUT" || l?.(t);
|
|
3777
3777
|
},
|
|
3778
3778
|
children: [
|
|
3779
3779
|
/* @__PURE__ */ e("button", { className: "tv-toggle", onClick: i, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(yt, { size: 16 }) : /* @__PURE__ */ e(xe, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
|
|
3780
3780
|
/* @__PURE__ */ e(Ve, { size: 16, className: "tv-folder-ic" }),
|
|
3781
|
-
/* @__PURE__ */ e("div", { className: "tv-name", ref:
|
|
3781
|
+
/* @__PURE__ */ e("div", { className: "tv-name", ref: $, children: j ? /* @__PURE__ */ e(
|
|
3782
3782
|
"input",
|
|
3783
3783
|
{
|
|
3784
3784
|
className: "tv-input",
|
|
3785
3785
|
value: Y,
|
|
3786
|
-
onChange: (
|
|
3787
|
-
onBlur:
|
|
3788
|
-
onKeyDown: (
|
|
3789
|
-
|
|
3786
|
+
onChange: (A) => q(A.target.value),
|
|
3787
|
+
onBlur: T,
|
|
3788
|
+
onKeyDown: (A) => {
|
|
3789
|
+
A.key === "Enter" && T(), A.key === "Escape" && (U(!1), q(t.name));
|
|
3790
3790
|
},
|
|
3791
3791
|
autoFocus: !0
|
|
3792
3792
|
}
|
|
@@ -3895,39 +3895,39 @@ function Ul({
|
|
|
3895
3895
|
const { roots: z } = ee(() => os(t) ? ds(t, { rootId: a, getId: i, getName: h }) : cs(
|
|
3896
3896
|
t.map((b) => ({ ...b })),
|
|
3897
3897
|
{ rootId: a, getId: i, getParent: l, getName: h }
|
|
3898
|
-
), [t, a, i, l, h]), [
|
|
3898
|
+
), [t, a, i, l, h]), [$, D] = P({}), E = H((b) => {
|
|
3899
3899
|
const c = {};
|
|
3900
3900
|
return (function f(w) {
|
|
3901
|
-
w.forEach((
|
|
3902
|
-
c[
|
|
3901
|
+
w.forEach((S) => {
|
|
3902
|
+
c[S.id] = !0, S.children?.length && f(S.children);
|
|
3903
3903
|
});
|
|
3904
3904
|
})(b), c;
|
|
3905
3905
|
}, []);
|
|
3906
3906
|
ae.useEffect(() => {
|
|
3907
|
-
|
|
3907
|
+
D(E(z));
|
|
3908
3908
|
}, [z, E]);
|
|
3909
3909
|
const L = H(
|
|
3910
|
-
(b) =>
|
|
3910
|
+
(b) => D((c) => ({ ...c, [b]: !c[b] })),
|
|
3911
3911
|
[]
|
|
3912
|
-
), [
|
|
3912
|
+
), [j, U] = P(() => Pe(z));
|
|
3913
3913
|
ae.useEffect(() => U(Pe(z)), [z]);
|
|
3914
3914
|
const Y = sr(
|
|
3915
3915
|
lr(dr, { activationConstraint: { delay: 250, tolerance: 5 } })
|
|
3916
|
-
), q = he(null), [
|
|
3917
|
-
},
|
|
3918
|
-
|
|
3916
|
+
), q = he(null), [T, _] = P(null), A = he(0), u = () => {
|
|
3917
|
+
}, C = ({ delta: b }) => {
|
|
3918
|
+
A.current = b?.x ?? 0;
|
|
3919
3919
|
}, M = H(
|
|
3920
3920
|
({ active: b, over: c }) => {
|
|
3921
|
-
const f =
|
|
3922
|
-
if (
|
|
3923
|
-
const w = String(b.id).replace(/^drag-/, ""),
|
|
3924
|
-
if (!w || !
|
|
3925
|
-
let I =
|
|
3921
|
+
const f = A.current;
|
|
3922
|
+
if (A.current = 0, _(null), !b || !c) return;
|
|
3923
|
+
const w = String(b.id).replace(/^drag-/, ""), S = String(c.id).replace(/^drop-/, "");
|
|
3924
|
+
if (!w || !S || w === S) return;
|
|
3925
|
+
let I = S;
|
|
3926
3926
|
const k = Math.max(0, Math.floor(-f / y));
|
|
3927
3927
|
if (k > 0) {
|
|
3928
|
-
let W =
|
|
3928
|
+
let W = S;
|
|
3929
3929
|
for (let pe = 0; pe < k; pe++) {
|
|
3930
|
-
const Ne = ya(
|
|
3930
|
+
const Ne = ya(j, W, null);
|
|
3931
3931
|
if (!Ne) break;
|
|
3932
3932
|
if (!Ne.parentId) {
|
|
3933
3933
|
I = a;
|
|
@@ -3940,12 +3940,12 @@ function Ul({
|
|
|
3940
3940
|
U(Pe(z));
|
|
3941
3941
|
return;
|
|
3942
3942
|
}
|
|
3943
|
-
const R = Pe(
|
|
3943
|
+
const R = Pe(j), { newRoots: V, removed: F } = ms(R, w);
|
|
3944
3944
|
if (!F) return;
|
|
3945
|
-
const G = us(
|
|
3945
|
+
const G = us(V, I, F);
|
|
3946
3946
|
U(G), r?.({ sourceId: w, destParentId: I, newTree: G });
|
|
3947
3947
|
},
|
|
3948
|
-
[
|
|
3948
|
+
[j, z, a, m, y, r]
|
|
3949
3949
|
), O = H(
|
|
3950
3950
|
(b, c = 0) => b.map((f) => /* @__PURE__ */ n(ae.Fragment, { children: [
|
|
3951
3951
|
/* @__PURE__ */ e(
|
|
@@ -3953,7 +3953,7 @@ function Ul({
|
|
|
3953
3953
|
{
|
|
3954
3954
|
node: f,
|
|
3955
3955
|
depth: c,
|
|
3956
|
-
expanded:
|
|
3956
|
+
expanded: !!$[f.id],
|
|
3957
3957
|
onToggle: () => L(f.id),
|
|
3958
3958
|
onSelect: o,
|
|
3959
3959
|
onCreateChild: g,
|
|
@@ -3965,23 +3965,23 @@ function Ul({
|
|
|
3965
3965
|
indent: y
|
|
3966
3966
|
}
|
|
3967
3967
|
),
|
|
3968
|
-
|
|
3968
|
+
$[f.id] && f.children?.length > 0 ? O(f.children, c + 1) : null
|
|
3969
3969
|
] }, f.id)),
|
|
3970
|
-
[
|
|
3970
|
+
[$, y, g, x, v, o, N, L]
|
|
3971
3971
|
);
|
|
3972
3972
|
return ae.useMemo(() => {
|
|
3973
|
-
if (!
|
|
3974
|
-
const b = String(
|
|
3973
|
+
if (!T) return null;
|
|
3974
|
+
const b = String(T).replace(/^drag-/, "");
|
|
3975
3975
|
function c(f) {
|
|
3976
3976
|
for (const w of f) {
|
|
3977
3977
|
if (w.id === b) return w;
|
|
3978
|
-
const
|
|
3979
|
-
if (
|
|
3978
|
+
const S = w.children?.length ? c(w.children) : null;
|
|
3979
|
+
if (S) return S;
|
|
3980
3980
|
}
|
|
3981
3981
|
return null;
|
|
3982
3982
|
}
|
|
3983
|
-
return c(
|
|
3984
|
-
}, [
|
|
3983
|
+
return c(j);
|
|
3984
|
+
}, [T, j]), /* @__PURE__ */ n("div", { className: "tv", children: [
|
|
3985
3985
|
s !== !1 && /* @__PURE__ */ n("div", { className: "tv-header", children: [
|
|
3986
3986
|
/* @__PURE__ */ e("div", { className: "tv-title", children: s }),
|
|
3987
3987
|
/* @__PURE__ */ e("button", { className: "tv-btn", onClick: p, children: "+ New folder" })
|
|
@@ -3997,10 +3997,10 @@ function Ul({
|
|
|
3997
3997
|
collisionDetection: cr,
|
|
3998
3998
|
sensors: Y,
|
|
3999
3999
|
onDragStart: u,
|
|
4000
|
-
onDragMove:
|
|
4000
|
+
onDragMove: C,
|
|
4001
4001
|
onDragEnd: M,
|
|
4002
4002
|
modifiers: [or],
|
|
4003
|
-
children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: O(
|
|
4003
|
+
children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: O(j, 0) })
|
|
4004
4004
|
}
|
|
4005
4005
|
)
|
|
4006
4006
|
] });
|
|
@@ -4582,16 +4582,16 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4582
4582
|
console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
|
|
4583
4583
|
const [x, r] = P(() => {
|
|
4584
4584
|
const u = a && a[l.key] || [];
|
|
4585
|
-
let
|
|
4586
|
-
return u.length > 0 ?
|
|
4585
|
+
let C;
|
|
4586
|
+
return u.length > 0 ? C = u.map((M, O) => ({
|
|
4587
4587
|
...M,
|
|
4588
4588
|
id: M.id !== void 0 ? M.id : O
|
|
4589
|
-
})) :
|
|
4589
|
+
})) : C = [{ id: 0 }], console.log(`[DataTableRenderer] ${l.key} - Initial data:`, C), C;
|
|
4590
4590
|
}), N = he(a), m = he(null);
|
|
4591
4591
|
K(() => {
|
|
4592
|
-
const u = a && a[l.key] || [],
|
|
4593
|
-
if (JSON.stringify(u) !== JSON.stringify(
|
|
4594
|
-
console.log(`[DataTableRenderer] ${l.key} - Section data changed`), console.log(`[DataTableRenderer] ${l.key} - Previous:`,
|
|
4592
|
+
const u = a && a[l.key] || [], C = m.current;
|
|
4593
|
+
if (JSON.stringify(u) !== JSON.stringify(C)) {
|
|
4594
|
+
console.log(`[DataTableRenderer] ${l.key} - Section data changed`), console.log(`[DataTableRenderer] ${l.key} - Previous:`, C), console.log(`[DataTableRenderer] ${l.key} - Current:`, u), N.current = a, m.current = u;
|
|
4595
4595
|
let O;
|
|
4596
4596
|
u.length > 0 ? O = u.map((b, c) => ({
|
|
4597
4597
|
...b,
|
|
@@ -4599,16 +4599,16 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4599
4599
|
})) : O = [{ id: 0 }], console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, O), r(O);
|
|
4600
4600
|
}
|
|
4601
4601
|
}, [a, l.key]);
|
|
4602
|
-
const y = he(x), z = he(null),
|
|
4602
|
+
const y = he(x), z = he(null), $ = he(!1);
|
|
4603
4603
|
K(() => {
|
|
4604
|
-
y.current !== x && s && typeof s == "function" && (y.current = x, z.current && clearTimeout(z.current),
|
|
4604
|
+
y.current !== x && s && typeof s == "function" && (y.current = x, z.current && clearTimeout(z.current), $.current ? (console.log("[DataTableRenderer] Executing immediate update for audience change"), $.current = !1, s(l.key, x)) : z.current = setTimeout(() => {
|
|
4605
4605
|
s(l.key, x);
|
|
4606
4606
|
}, 300));
|
|
4607
4607
|
}, [l.key, x, s]), K(() => () => {
|
|
4608
4608
|
z.current && clearTimeout(z.current);
|
|
4609
4609
|
}, []);
|
|
4610
|
-
const
|
|
4611
|
-
const
|
|
4610
|
+
const D = (u) => {
|
|
4611
|
+
const C = (b, c) => {
|
|
4612
4612
|
console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: b, value: c, type: typeof c }), r((f) => {
|
|
4613
4613
|
const w = [...f];
|
|
4614
4614
|
return w[b][u.key] = c, w;
|
|
@@ -4624,7 +4624,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4624
4624
|
X,
|
|
4625
4625
|
{
|
|
4626
4626
|
value: b[u.key] || "",
|
|
4627
|
-
onChange: (f) =>
|
|
4627
|
+
onChange: (f) => C(c, f.target.value),
|
|
4628
4628
|
placeholder: u.placeholder || `Enter ${u.label}`,
|
|
4629
4629
|
required: u.required,
|
|
4630
4630
|
className: `w-full ${M(c) ? "border-red-500" : ""}`
|
|
@@ -4638,7 +4638,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4638
4638
|
ca,
|
|
4639
4639
|
{
|
|
4640
4640
|
value: b[u.key] || "",
|
|
4641
|
-
onChange: (f) =>
|
|
4641
|
+
onChange: (f) => C(c, f.target.value),
|
|
4642
4642
|
placeholder: u.placeholder || `Enter ${u.label}`,
|
|
4643
4643
|
required: u.required,
|
|
4644
4644
|
className: `w-full ${M(c) ? "border-red-500" : ""}`,
|
|
@@ -4657,12 +4657,12 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4657
4657
|
min: u.min,
|
|
4658
4658
|
max: u.max,
|
|
4659
4659
|
step: u.step,
|
|
4660
|
-
onChange: (f) =>
|
|
4660
|
+
onChange: (f) => C(c, f.target.value),
|
|
4661
4661
|
onBlur: (f) => {
|
|
4662
4662
|
const w = f.target.value;
|
|
4663
4663
|
if (w !== "" && w !== null && w !== void 0) {
|
|
4664
|
-
const
|
|
4665
|
-
isNaN(
|
|
4664
|
+
const S = Number(w);
|
|
4665
|
+
isNaN(S) || (u.min !== void 0 && S < u.min ? (f.target.setCustomValidity(`${u.label} must be at least ${u.min}`), f.target.reportValidity()) : u.max !== void 0 && S > u.max ? (f.target.setCustomValidity(`${u.label} must not exceed ${u.max}`), f.target.reportValidity()) : f.target.setCustomValidity(""));
|
|
4666
4666
|
}
|
|
4667
4667
|
},
|
|
4668
4668
|
placeholder: u.placeholder || `Enter ${u.label}`,
|
|
@@ -4687,7 +4687,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4687
4687
|
{
|
|
4688
4688
|
type: "email",
|
|
4689
4689
|
value: b[u.key] || "",
|
|
4690
|
-
onChange: (f) =>
|
|
4690
|
+
onChange: (f) => C(c, f.target.value),
|
|
4691
4691
|
placeholder: u.placeholder || "Enter email address",
|
|
4692
4692
|
required: u.required,
|
|
4693
4693
|
className: `w-full ${M(c) ? "border-red-500" : ""}`
|
|
@@ -4702,7 +4702,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4702
4702
|
{
|
|
4703
4703
|
type: "url",
|
|
4704
4704
|
value: b[u.key] || "",
|
|
4705
|
-
onChange: (f) =>
|
|
4705
|
+
onChange: (f) => C(c, f.target.value),
|
|
4706
4706
|
placeholder: u.placeholder || "Enter URL",
|
|
4707
4707
|
required: u.required,
|
|
4708
4708
|
className: `w-full ${M(c) ? "border-red-500" : ""}`
|
|
@@ -4717,7 +4717,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4717
4717
|
{
|
|
4718
4718
|
type: "password",
|
|
4719
4719
|
value: b[u.key] || "",
|
|
4720
|
-
onChange: (f) =>
|
|
4720
|
+
onChange: (f) => C(c, f.target.value),
|
|
4721
4721
|
placeholder: u.placeholder || "Enter password",
|
|
4722
4722
|
required: u.required,
|
|
4723
4723
|
className: `w-full ${M(c) ? "border-red-500" : ""}`
|
|
@@ -4732,7 +4732,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4732
4732
|
pt,
|
|
4733
4733
|
{
|
|
4734
4734
|
value: b[u.key] || "",
|
|
4735
|
-
onChange: (f) =>
|
|
4735
|
+
onChange: (f) => C(c, f),
|
|
4736
4736
|
options: u.options || [],
|
|
4737
4737
|
placeholder: u.placeholder || `Select ${u.label}`,
|
|
4738
4738
|
required: u.required,
|
|
@@ -4745,11 +4745,11 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4745
4745
|
return (b, c) => {
|
|
4746
4746
|
const f = () => {
|
|
4747
4747
|
if (u.optionsFrom && a) {
|
|
4748
|
-
const { config: w, valueField:
|
|
4748
|
+
const { config: w, valueField: S, labelField: I } = u.optionsFrom, k = a[w] || [];
|
|
4749
4749
|
if (Array.isArray(k))
|
|
4750
4750
|
return k.map((R) => ({
|
|
4751
|
-
id: R[
|
|
4752
|
-
value: R[
|
|
4751
|
+
id: R[S] || "",
|
|
4752
|
+
value: R[S] || "",
|
|
4753
4753
|
label: R[I] || ""
|
|
4754
4754
|
}));
|
|
4755
4755
|
}
|
|
@@ -4761,7 +4761,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4761
4761
|
{
|
|
4762
4762
|
index: c,
|
|
4763
4763
|
value: b[u.key] || "",
|
|
4764
|
-
onChange: (w) =>
|
|
4764
|
+
onChange: (w) => C(c, w),
|
|
4765
4765
|
options: f(),
|
|
4766
4766
|
placeholder: u.placeholder || `Select ${u.label}`,
|
|
4767
4767
|
required: u.required,
|
|
@@ -4779,7 +4779,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4779
4779
|
at,
|
|
4780
4780
|
{
|
|
4781
4781
|
selectedItems: f,
|
|
4782
|
-
onSelectionChange: (w) =>
|
|
4782
|
+
onSelectionChange: (w) => C(c, w),
|
|
4783
4783
|
options: u.options || [],
|
|
4784
4784
|
placeholder: u.placeholder || `Select ${u.label}`,
|
|
4785
4785
|
className: "w-full"
|
|
@@ -4792,7 +4792,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4792
4792
|
mt,
|
|
4793
4793
|
{
|
|
4794
4794
|
checked: !!b[u.key],
|
|
4795
|
-
onChange: (f) =>
|
|
4795
|
+
onChange: (f) => C(c, f),
|
|
4796
4796
|
label: u.placeholder || u.label,
|
|
4797
4797
|
className: "w-full"
|
|
4798
4798
|
}
|
|
@@ -4803,7 +4803,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4803
4803
|
da,
|
|
4804
4804
|
{
|
|
4805
4805
|
isOn: !!b[u.key],
|
|
4806
|
-
onToggle: (f) =>
|
|
4806
|
+
onToggle: (f) => C(c, f),
|
|
4807
4807
|
label: u.placeholder || u.label,
|
|
4808
4808
|
className: "w-full"
|
|
4809
4809
|
}
|
|
@@ -4813,7 +4813,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4813
4813
|
sa,
|
|
4814
4814
|
{
|
|
4815
4815
|
selectedDate: b[u.key] ? new Date(b[u.key]) : null,
|
|
4816
|
-
onDateChange: (f) =>
|
|
4816
|
+
onDateChange: (f) => C(c, f ? f.toISOString().split("T")[0] : ""),
|
|
4817
4817
|
placeholder: u.placeholder || "Select date",
|
|
4818
4818
|
className: "w-full"
|
|
4819
4819
|
}
|
|
@@ -4824,7 +4824,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4824
4824
|
{
|
|
4825
4825
|
type: "datetime-local",
|
|
4826
4826
|
value: b[u.key] || "",
|
|
4827
|
-
onChange: (f) =>
|
|
4827
|
+
onChange: (f) => C(c, f.target.value),
|
|
4828
4828
|
placeholder: u.placeholder || "Select date and time",
|
|
4829
4829
|
required: u.required,
|
|
4830
4830
|
className: "w-full"
|
|
@@ -4836,7 +4836,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4836
4836
|
{
|
|
4837
4837
|
type: "time",
|
|
4838
4838
|
value: b[u.key] || "",
|
|
4839
|
-
onChange: (f) =>
|
|
4839
|
+
onChange: (f) => C(c, f.target.value),
|
|
4840
4840
|
placeholder: u.placeholder || "Select time",
|
|
4841
4841
|
required: u.required,
|
|
4842
4842
|
className: "w-full"
|
|
@@ -4847,7 +4847,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4847
4847
|
la,
|
|
4848
4848
|
{
|
|
4849
4849
|
selectedValue: b[u.key] || "",
|
|
4850
|
-
onValueChange: (f) =>
|
|
4850
|
+
onValueChange: (f) => C(c, f),
|
|
4851
4851
|
options: u.options || [],
|
|
4852
4852
|
className: "w-full"
|
|
4853
4853
|
}
|
|
@@ -4857,7 +4857,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4857
4857
|
fe,
|
|
4858
4858
|
{
|
|
4859
4859
|
value: b[u.key] || "",
|
|
4860
|
-
onChange: (f) =>
|
|
4860
|
+
onChange: (f) => C(c, f),
|
|
4861
4861
|
placeholder: u.placeholder || `Search ${u.label}`,
|
|
4862
4862
|
className: "w-full"
|
|
4863
4863
|
}
|
|
@@ -4870,12 +4870,12 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4870
4870
|
...f.roles || []
|
|
4871
4871
|
];
|
|
4872
4872
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
4873
|
-
/* @__PURE__ */ e(ps, { children: w.length > 0 ? w.slice(0, 3).map((
|
|
4873
|
+
/* @__PURE__ */ e(ps, { children: w.length > 0 ? w.slice(0, 3).map((S, I) => /* @__PURE__ */ e(
|
|
4874
4874
|
we,
|
|
4875
4875
|
{
|
|
4876
4876
|
size: "small",
|
|
4877
|
-
name:
|
|
4878
|
-
src:
|
|
4877
|
+
name: S.name || S.displayName || S.id,
|
|
4878
|
+
src: S.avatarUrl
|
|
4879
4879
|
},
|
|
4880
4880
|
I
|
|
4881
4881
|
)) : null }),
|
|
@@ -4897,7 +4897,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4897
4897
|
{
|
|
4898
4898
|
type: "color",
|
|
4899
4899
|
value: b[u.key] || "#000000",
|
|
4900
|
-
onChange: (f) =>
|
|
4900
|
+
onChange: (f) => C(c, f.target.value),
|
|
4901
4901
|
className: "w-full h-10"
|
|
4902
4902
|
}
|
|
4903
4903
|
);
|
|
@@ -4908,7 +4908,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4908
4908
|
{
|
|
4909
4909
|
type: "range",
|
|
4910
4910
|
value: b[u.key] || u.min || 0,
|
|
4911
|
-
onChange: (f) =>
|
|
4911
|
+
onChange: (f) => C(c, f.target.value),
|
|
4912
4912
|
min: u.min || 0,
|
|
4913
4913
|
max: u.max || 100,
|
|
4914
4914
|
step: u.step || 1,
|
|
@@ -4924,7 +4924,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4924
4924
|
type: "file",
|
|
4925
4925
|
onChange: (f) => {
|
|
4926
4926
|
const w = f.target.files[0];
|
|
4927
|
-
|
|
4927
|
+
C(c, w ? w.name : "");
|
|
4928
4928
|
},
|
|
4929
4929
|
accept: u.accept,
|
|
4930
4930
|
className: "w-full"
|
|
@@ -4936,7 +4936,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4936
4936
|
{
|
|
4937
4937
|
type: "hidden",
|
|
4938
4938
|
value: b[u.key] || "",
|
|
4939
|
-
onChange: (f) =>
|
|
4939
|
+
onChange: (f) => C(c, f.target.value)
|
|
4940
4940
|
}
|
|
4941
4941
|
);
|
|
4942
4942
|
// Default fallback for unknown field types
|
|
@@ -4946,7 +4946,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4946
4946
|
X,
|
|
4947
4947
|
{
|
|
4948
4948
|
value: b[u.key] || "",
|
|
4949
|
-
onChange: (f) =>
|
|
4949
|
+
onChange: (f) => C(c, f.target.value),
|
|
4950
4950
|
placeholder: u.placeholder || `Enter ${u.label}`,
|
|
4951
4951
|
required: u.required,
|
|
4952
4952
|
className: `w-full ${M(c) ? "border-red-500" : ""}`
|
|
@@ -4969,42 +4969,42 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
4969
4969
|
return console.log("[DataTableRenderer] Updated data:", b), b;
|
|
4970
4970
|
});
|
|
4971
4971
|
}, [l.fields]), L = H((u) => {
|
|
4972
|
-
r((
|
|
4973
|
-
if (
|
|
4974
|
-
return
|
|
4975
|
-
const M = [...
|
|
4972
|
+
r((C) => {
|
|
4973
|
+
if (C.length <= 1)
|
|
4974
|
+
return C;
|
|
4975
|
+
const M = [...C];
|
|
4976
4976
|
return M.splice(u, 1), M;
|
|
4977
4977
|
});
|
|
4978
|
-
}, []), [
|
|
4979
|
-
U(
|
|
4978
|
+
}, []), [j, U] = P(null), Y = H((u, C) => {
|
|
4979
|
+
U(C), u.dataTransfer.effectAllowed = "move", u.dataTransfer.setData("text/html", "");
|
|
4980
4980
|
}, []), q = H((u) => {
|
|
4981
4981
|
u.preventDefault(), u.dataTransfer.dropEffect = "move";
|
|
4982
|
-
}, []),
|
|
4983
|
-
u.preventDefault(), !(
|
|
4984
|
-
const O = [...M], b = O[
|
|
4985
|
-
return O.splice(
|
|
4982
|
+
}, []), T = H((u, C) => {
|
|
4983
|
+
u.preventDefault(), !(j === null || j === C) && (r((M) => {
|
|
4984
|
+
const O = [...M], b = O[j];
|
|
4985
|
+
return O.splice(j, 1), O.splice(C, 0, b), O;
|
|
4986
4986
|
}), U(null));
|
|
4987
|
-
}, [
|
|
4987
|
+
}, [j]), _ = H(() => {
|
|
4988
4988
|
U(null);
|
|
4989
|
-
}, []),
|
|
4990
|
-
console.log("[DataTableRenderer] handleAddAudience called with:", { selectedEntities: u, existingShares:
|
|
4989
|
+
}, []), A = H((u, C) => {
|
|
4990
|
+
console.log("[DataTableRenderer] handleAddAudience called with:", { selectedEntities: u, existingShares: C }), r((O) => {
|
|
4991
4991
|
const b = [...O];
|
|
4992
4992
|
if (o !== null && g && b[o]) {
|
|
4993
4993
|
const c = u?.pendingInvites || [];
|
|
4994
4994
|
if (c.length > 0) {
|
|
4995
4995
|
console.log("[DataTableRenderer] Adding new pending invites:", c);
|
|
4996
|
-
const f = c.filter((k) => k.type === "User"), w = c.filter((k) => k.type === "Group"),
|
|
4996
|
+
const f = c.filter((k) => k.type === "User"), w = c.filter((k) => k.type === "Group"), S = c.filter((k) => k.type === "Role"), I = b[o][g] || { users: [], groups: [], roles: [] };
|
|
4997
4997
|
b[o][g] = {
|
|
4998
4998
|
users: [...I.users || [], ...f],
|
|
4999
4999
|
groups: [...I.groups || [], ...w],
|
|
5000
|
-
roles: [...I.roles || [], ...
|
|
5000
|
+
roles: [...I.roles || [], ...S]
|
|
5001
5001
|
}, console.log("[DataTableRenderer] Added new audience members:", b[o][g]);
|
|
5002
|
-
} else
|
|
5003
|
-
users:
|
|
5004
|
-
groups:
|
|
5005
|
-
roles:
|
|
5002
|
+
} else C && (console.log("[DataTableRenderer] Updating audience from ManageFlow with existing shares:", C), b[o][g] = {
|
|
5003
|
+
users: C.users || [],
|
|
5004
|
+
groups: C.groups || [],
|
|
5005
|
+
roles: C.roles || []
|
|
5006
5006
|
}, console.log("[DataTableRenderer] Updated audience from ManageFlow:", b[o][g]));
|
|
5007
|
-
console.log("[DataTableRenderer] Final audience data:", b[o][g]),
|
|
5007
|
+
console.log("[DataTableRenderer] Final audience data:", b[o][g]), $.current = !0;
|
|
5008
5008
|
}
|
|
5009
5009
|
return b;
|
|
5010
5010
|
}), (u?.pendingInvites || []).length > 0 && (p(null), v(null));
|
|
@@ -5027,32 +5027,32 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5027
5027
|
/* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ n("table", { className: "min-w-full bg-white border border-gray-300", style: { marginBottom: "20px" }, children: [
|
|
5028
5028
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { className: "bg-gray-50", children: [
|
|
5029
5029
|
/* @__PURE__ */ e("th", { className: "px-4 py-2 w-10" }),
|
|
5030
|
-
l.fields.map((u,
|
|
5030
|
+
l.fields.map((u, C) => /* @__PURE__ */ e(
|
|
5031
5031
|
"th",
|
|
5032
5032
|
{
|
|
5033
5033
|
className: "px-4 py-2 text-left text-sm font-medium text-gray-700",
|
|
5034
5034
|
children: u.label || u.key
|
|
5035
5035
|
},
|
|
5036
|
-
|
|
5036
|
+
C
|
|
5037
5037
|
)),
|
|
5038
5038
|
/* @__PURE__ */ e("th", { className: "px-4 py-2 w-16" })
|
|
5039
5039
|
] }) }),
|
|
5040
|
-
/* @__PURE__ */ e("tbody", { children: x.map((u,
|
|
5040
|
+
/* @__PURE__ */ e("tbody", { children: x.map((u, C) => /* @__PURE__ */ n(
|
|
5041
5041
|
"tr",
|
|
5042
5042
|
{
|
|
5043
|
-
className: `hover:bg-gray-50 ${
|
|
5043
|
+
className: `hover:bg-gray-50 ${j === C ? "opacity-50" : ""}`,
|
|
5044
5044
|
draggable: !0,
|
|
5045
|
-
onDragStart: (M) => Y(M,
|
|
5045
|
+
onDragStart: (M) => Y(M, C),
|
|
5046
5046
|
onDragOver: q,
|
|
5047
|
-
onDrop: (M) =>
|
|
5047
|
+
onDrop: (M) => T(M, C),
|
|
5048
5048
|
onDragEnd: _,
|
|
5049
5049
|
children: [
|
|
5050
5050
|
/* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e("div", { className: "cursor-move text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ e(xt, { size: 16 }) }) }),
|
|
5051
|
-
l.fields.map((M, O) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children:
|
|
5051
|
+
l.fields.map((M, O) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: D(M)(u, C) }, O)),
|
|
5052
5052
|
/* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
|
|
5053
5053
|
"button",
|
|
5054
5054
|
{
|
|
5055
|
-
onClick: () => L(
|
|
5055
|
+
onClick: () => L(C),
|
|
5056
5056
|
className: "text-red-500 hover:text-red-700",
|
|
5057
5057
|
title: "Delete row",
|
|
5058
5058
|
children: /* @__PURE__ */ e(mr, { size: 16 })
|
|
@@ -5060,7 +5060,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5060
5060
|
) })
|
|
5061
5061
|
]
|
|
5062
5062
|
},
|
|
5063
|
-
|
|
5063
|
+
C
|
|
5064
5064
|
)) })
|
|
5065
5065
|
] }) }),
|
|
5066
5066
|
o !== null && (() => {
|
|
@@ -5076,7 +5076,7 @@ function gs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5076
5076
|
onClose: () => {
|
|
5077
5077
|
p(null), v(null);
|
|
5078
5078
|
},
|
|
5079
|
-
onFinalSubmit:
|
|
5079
|
+
onFinalSubmit: A,
|
|
5080
5080
|
existingShares: u,
|
|
5081
5081
|
allowedPermissions: ["view", "remove"]
|
|
5082
5082
|
}
|
|
@@ -5106,15 +5106,15 @@ function xs({
|
|
|
5106
5106
|
onShowCancelModal: l,
|
|
5107
5107
|
onCancel: h
|
|
5108
5108
|
}) {
|
|
5109
|
-
const [o, p] = ae.useState(a), [g, v] = ae.useState(null), [x, r] = ae.useState(null), [N, m] = P(!1), [y, z] = P(!1), [
|
|
5109
|
+
const [o, p] = ae.useState(a), [g, v] = ae.useState(null), [x, r] = ae.useState(null), [N, m] = P(!1), [y, z] = P(!1), [$, D] = P({}), E = `${$e()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, L = E, [j, U] = P(1), Y = () => {
|
|
5110
5110
|
if (!x || !g)
|
|
5111
5111
|
return console.log("[DynamicConfig] hasUnsavedChanges: false (no data)", { originalData: x, data: g }), !1;
|
|
5112
|
-
const b = (
|
|
5113
|
-
if (
|
|
5114
|
-
if (Array.isArray(
|
|
5112
|
+
const b = (S) => {
|
|
5113
|
+
if (S == null || typeof S != "object") return S;
|
|
5114
|
+
if (Array.isArray(S)) return S.map(b);
|
|
5115
5115
|
const I = {};
|
|
5116
|
-
return Object.keys(
|
|
5117
|
-
I[k] = b(
|
|
5116
|
+
return Object.keys(S).sort().forEach((k) => {
|
|
5117
|
+
I[k] = b(S[k]);
|
|
5118
5118
|
}), I;
|
|
5119
5119
|
}, c = b(x), f = b(g), w = JSON.stringify(c) !== JSON.stringify(f);
|
|
5120
5120
|
return console.log("[DynamicConfig] hasUnsavedChanges:", w, {
|
|
@@ -5130,7 +5130,7 @@ function xs({
|
|
|
5130
5130
|
return a.configuration.forEach((w) => {
|
|
5131
5131
|
if (w.key && w.type === "datatable") {
|
|
5132
5132
|
const I = (f[w.key] || []).map((k, R) => {
|
|
5133
|
-
const
|
|
5133
|
+
const V = { id: k.id || 0 };
|
|
5134
5134
|
return w.fields && w.fields.forEach((F) => {
|
|
5135
5135
|
if (F.fieldtype === "audience") {
|
|
5136
5136
|
let G = { users: [], groups: [], roles: [] };
|
|
@@ -5138,9 +5138,9 @@ function xs({
|
|
|
5138
5138
|
users: k[F.key].users || [],
|
|
5139
5139
|
groups: k[F.key].groups || [],
|
|
5140
5140
|
roles: k[F.key].roles || []
|
|
5141
|
-
})),
|
|
5142
|
-
} else F.fieldtype === "select" ?
|
|
5143
|
-
}),
|
|
5141
|
+
})), V[F.key] = G;
|
|
5142
|
+
} else F.fieldtype === "select" ? V[F.key] = k[F.key] !== void 0 && k[F.key] !== "" ? k[F.key] : F.default || "" : V[F.key] = k[F.key] || F.default || "";
|
|
5143
|
+
}), V;
|
|
5144
5144
|
});
|
|
5145
5145
|
if (I.length === 0) {
|
|
5146
5146
|
const k = { id: 0 };
|
|
@@ -5150,13 +5150,13 @@ function xs({
|
|
|
5150
5150
|
}
|
|
5151
5151
|
c[w.key] = I;
|
|
5152
5152
|
} else if (w.key) {
|
|
5153
|
-
const
|
|
5153
|
+
const S = f[w.key] || {};
|
|
5154
5154
|
w.type === "section" && w.fields && w.fields.forEach((I) => {
|
|
5155
|
-
I.fieldtype === "managecollectionlist" && I.key && (!
|
|
5156
|
-
}), c[w.key] =
|
|
5155
|
+
I.fieldtype === "managecollectionlist" && I.key && (!S[I.key] || !Array.isArray(S[I.key])) && (S[I.key] = I.initialData || []);
|
|
5156
|
+
}), c[w.key] = S;
|
|
5157
5157
|
}
|
|
5158
5158
|
}), c;
|
|
5159
|
-
},
|
|
5159
|
+
}, T = () => {
|
|
5160
5160
|
if (a && a.configuration) {
|
|
5161
5161
|
const b = {};
|
|
5162
5162
|
a.configuration.forEach((c) => {
|
|
@@ -5189,21 +5189,21 @@ function xs({
|
|
|
5189
5189
|
const f = q(c);
|
|
5190
5190
|
v(f), r(f);
|
|
5191
5191
|
} else
|
|
5192
|
-
|
|
5192
|
+
T();
|
|
5193
5193
|
} catch (c) {
|
|
5194
5194
|
console.error("Error fetching configuration:", c);
|
|
5195
5195
|
let f = "Failed to load configuration";
|
|
5196
5196
|
if (c.response) {
|
|
5197
|
-
const w = c.response.status,
|
|
5198
|
-
w === 400 ? f =
|
|
5197
|
+
const w = c.response.status, S = c.response.data?.message || c.response.data?.error;
|
|
5198
|
+
w === 400 ? f = S || "Invalid request. Please check the application ID." : w === 401 ? f = "You are not authorized to access this configuration." : w === 403 ? f = "Access denied. You don't have permission to view this configuration." : w === 404 ? f = "Configuration not found. It may not exist yet or the application ID is incorrect." : w >= 500 ? f = S || "Server error. Please try again later." : f = S || `Failed to load configuration (Error ${w})`;
|
|
5199
5199
|
} else c.request ? f = "Network error. Please check your connection and try again." : f = c.message || "An unexpected error occurred while loading configuration.";
|
|
5200
|
-
Ye.error(f),
|
|
5200
|
+
Ye.error(f), T();
|
|
5201
5201
|
} finally {
|
|
5202
5202
|
m(!1);
|
|
5203
5203
|
}
|
|
5204
5204
|
};
|
|
5205
|
-
a && (p(a), t ? b() :
|
|
5206
|
-
}, [a,
|
|
5205
|
+
a && (p(a), t ? b() : T());
|
|
5206
|
+
}, [a, j, t, s]);
|
|
5207
5207
|
const _ = (b, c) => {
|
|
5208
5208
|
console.log(`[DynamicConfig] handleSectionChange called for ${b}:`, c), v((f) => {
|
|
5209
5209
|
const w = {
|
|
@@ -5211,11 +5211,11 @@ function xs({
|
|
|
5211
5211
|
[b]: c
|
|
5212
5212
|
};
|
|
5213
5213
|
return console.log("[DynamicConfig] Updated data state:", w), w;
|
|
5214
|
-
}),
|
|
5214
|
+
}), D((f) => {
|
|
5215
5215
|
const w = { ...f };
|
|
5216
5216
|
return w[b] && delete w[b], w;
|
|
5217
5217
|
});
|
|
5218
|
-
},
|
|
5218
|
+
}, A = () => {
|
|
5219
5219
|
const b = {};
|
|
5220
5220
|
return !o || !g || o.configuration.forEach((c) => {
|
|
5221
5221
|
if (c.type === "section")
|
|
@@ -5226,41 +5226,41 @@ function xs({
|
|
|
5226
5226
|
return;
|
|
5227
5227
|
}
|
|
5228
5228
|
if (f.fieldtype === "number" && w !== "" && w !== null && w !== void 0) {
|
|
5229
|
-
const
|
|
5230
|
-
isNaN(
|
|
5229
|
+
const S = Number(w);
|
|
5230
|
+
isNaN(S) ? (b[c.key] || (b[c.key] = {}), b[c.key][f.key] = `${f.label} must be a valid number`) : (f.min !== void 0 && S < f.min && (b[c.key] || (b[c.key] = {}), b[c.key][f.key] = `${f.label} must be at least ${f.min}`), f.max !== void 0 && S > f.max && (b[c.key] || (b[c.key] = {}), b[c.key][f.key] = `${f.label} must not exceed ${f.max}`));
|
|
5231
5231
|
}
|
|
5232
5232
|
});
|
|
5233
5233
|
else if (c.type === "datatable") {
|
|
5234
5234
|
const f = g[c.key];
|
|
5235
|
-
Array.isArray(f) && f.forEach((w,
|
|
5235
|
+
Array.isArray(f) && f.forEach((w, S) => {
|
|
5236
5236
|
c.fields.forEach((I) => {
|
|
5237
5237
|
const k = w[I.key];
|
|
5238
5238
|
if (I.required && (!k || typeof k == "string" && k.trim() === "")) {
|
|
5239
|
-
b[c.key] || (b[c.key] = {}), b[c.key][
|
|
5239
|
+
b[c.key] || (b[c.key] = {}), b[c.key][S] || (b[c.key][S] = {}), b[c.key][S][I.key] = `${I.label} is required`;
|
|
5240
5240
|
return;
|
|
5241
5241
|
}
|
|
5242
5242
|
if (I.fieldtype === "number" && k !== "" && k !== null && k !== void 0) {
|
|
5243
5243
|
const R = Number(k);
|
|
5244
|
-
isNaN(R) ? (b[c.key] || (b[c.key] = {}), b[c.key][
|
|
5244
|
+
isNaN(R) ? (b[c.key] || (b[c.key] = {}), b[c.key][S] || (b[c.key][S] = {}), b[c.key][S][I.key] = `${I.label} must be a valid number`) : (I.min !== void 0 && R < I.min && (b[c.key] || (b[c.key] = {}), b[c.key][S] || (b[c.key][S] = {}), b[c.key][S][I.key] = `${I.label} must be at least ${I.min}`), I.max !== void 0 && R > I.max && (b[c.key] || (b[c.key] = {}), b[c.key][S] || (b[c.key][S] = {}), b[c.key][S][I.key] = `${I.label} must not exceed ${I.max}`));
|
|
5245
5245
|
}
|
|
5246
5246
|
});
|
|
5247
5247
|
});
|
|
5248
5248
|
}
|
|
5249
5249
|
}), b;
|
|
5250
|
-
}, u = (b) => Object.keys(b).length > 0,
|
|
5250
|
+
}, u = (b) => Object.keys(b).length > 0, C = () => {
|
|
5251
5251
|
if (y) {
|
|
5252
5252
|
console.log("[handleSave] Already saving, ignoring duplicate call");
|
|
5253
5253
|
return;
|
|
5254
5254
|
}
|
|
5255
5255
|
console.log("[handleSave] Starting save process");
|
|
5256
|
-
const b =
|
|
5257
|
-
if (
|
|
5256
|
+
const b = A();
|
|
5257
|
+
if (D(b), u(b)) {
|
|
5258
5258
|
let f = [];
|
|
5259
5259
|
Object.keys(b).forEach((w) => {
|
|
5260
|
-
typeof b[w] == "object" && Object.keys(b[w]).forEach((
|
|
5261
|
-
typeof b[w][
|
|
5262
|
-
f.push(`${w} row ${parseInt(
|
|
5263
|
-
}) : f.push(`${w}: ${b[w][
|
|
5260
|
+
typeof b[w] == "object" && Object.keys(b[w]).forEach((S) => {
|
|
5261
|
+
typeof b[w][S] == "object" ? Object.keys(b[w][S]).forEach((I) => {
|
|
5262
|
+
f.push(`${w} row ${parseInt(S) + 1}: ${b[w][S][I]}`);
|
|
5263
|
+
}) : f.push(`${w}: ${b[w][S]}`);
|
|
5264
5264
|
});
|
|
5265
5265
|
});
|
|
5266
5266
|
return;
|
|
@@ -5269,30 +5269,30 @@ function xs({
|
|
|
5269
5269
|
try {
|
|
5270
5270
|
z(!0);
|
|
5271
5271
|
const f = {};
|
|
5272
|
-
g && Object.keys(g).forEach((
|
|
5272
|
+
g && Object.keys(g).forEach((S) => {
|
|
5273
5273
|
const I = a?.configuration?.find(
|
|
5274
|
-
(k) => k.key ===
|
|
5274
|
+
(k) => k.key === S && k.type === "datatable"
|
|
5275
5275
|
);
|
|
5276
|
-
I && Array.isArray(g[
|
|
5276
|
+
I && Array.isArray(g[S]) ? f[S] = g[S].map((k) => {
|
|
5277
5277
|
const R = { id: k.id || 0 };
|
|
5278
|
-
return I.fields && I.fields.forEach((
|
|
5279
|
-
if (
|
|
5278
|
+
return I.fields && I.fields.forEach((V) => {
|
|
5279
|
+
if (V.fieldtype === "audience") {
|
|
5280
5280
|
let F = { users: [], groups: [], roles: [] };
|
|
5281
|
-
k[
|
|
5282
|
-
users: k[
|
|
5283
|
-
groups: k[
|
|
5284
|
-
roles: k[
|
|
5285
|
-
}), R[
|
|
5281
|
+
k[V.key] && typeof k[V.key] == "object" && !Array.isArray(k[V.key]) && (F = {
|
|
5282
|
+
users: k[V.key].users || [],
|
|
5283
|
+
groups: k[V.key].groups || [],
|
|
5284
|
+
roles: k[V.key].roles || []
|
|
5285
|
+
}), R[V.key] = F;
|
|
5286
5286
|
} else
|
|
5287
|
-
R[
|
|
5287
|
+
R[V.key] = k[V.key] || "";
|
|
5288
5288
|
}), R;
|
|
5289
|
-
}) : f[
|
|
5289
|
+
}) : f[S] = g[S];
|
|
5290
5290
|
}), (!f.appkey || f.appkey === "") && (f.appkey = t);
|
|
5291
5291
|
let w = await bt(L, f);
|
|
5292
5292
|
if (w && w.status != "fail") {
|
|
5293
|
-
|
|
5294
|
-
const
|
|
5295
|
-
Ye.success(
|
|
5293
|
+
D({}), r(JSON.parse(JSON.stringify(g)));
|
|
5294
|
+
const S = w.message || "Configuration has been saved successfully";
|
|
5295
|
+
Ye.success(S), i && typeof i == "function" && i(g);
|
|
5296
5296
|
} else
|
|
5297
5297
|
throw Ye.error(w?.message || "Failed to save configuration"), new Error("No response received from server");
|
|
5298
5298
|
} catch (f) {
|
|
@@ -5308,7 +5308,7 @@ function xs({
|
|
|
5308
5308
|
return /* @__PURE__ */ e("div", { className: "min-h-screen flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "text-gray-500", children: "No configuration available" }) });
|
|
5309
5309
|
const O = a?.configuration || o?.configuration;
|
|
5310
5310
|
return K(() => {
|
|
5311
|
-
s && a ? (!g || Object.keys(g).length === 0) &&
|
|
5311
|
+
s && a ? (!g || Object.keys(g).length === 0) && T() : s && !a && T();
|
|
5312
5312
|
}, [s, a]), /* @__PURE__ */ n("div", { children: [
|
|
5313
5313
|
/* @__PURE__ */ n(
|
|
5314
5314
|
"div",
|
|
@@ -5326,7 +5326,7 @@ function xs({
|
|
|
5326
5326
|
item: b,
|
|
5327
5327
|
data: g,
|
|
5328
5328
|
updateHandler: _,
|
|
5329
|
-
validationErrors:
|
|
5329
|
+
validationErrors: $
|
|
5330
5330
|
},
|
|
5331
5331
|
c
|
|
5332
5332
|
);
|
|
@@ -5349,7 +5349,7 @@ function xs({
|
|
|
5349
5349
|
se,
|
|
5350
5350
|
{
|
|
5351
5351
|
category: "primary",
|
|
5352
|
-
onClick:
|
|
5352
|
+
onClick: C,
|
|
5353
5353
|
disabled: y,
|
|
5354
5354
|
label: y ? "Saving..." : "Save",
|
|
5355
5355
|
type: "submit"
|
|
@@ -5361,35 +5361,36 @@ function xs({
|
|
|
5361
5361
|
const Yl = ({
|
|
5362
5362
|
config: t,
|
|
5363
5363
|
appid: a = "Configuration-Page",
|
|
5364
|
-
disableApi: s = !1
|
|
5364
|
+
disableApi: s = !1,
|
|
5365
|
+
hasConfig: i = !1
|
|
5365
5366
|
}) => {
|
|
5366
|
-
const [
|
|
5367
|
-
pageHeader:
|
|
5368
|
-
appletHeader:
|
|
5369
|
-
breadcrumb:
|
|
5370
|
-
overview:
|
|
5371
|
-
configuration:
|
|
5372
|
-
} = t,
|
|
5373
|
-
if (
|
|
5374
|
-
const
|
|
5375
|
-
if (
|
|
5376
|
-
const
|
|
5377
|
-
if (
|
|
5378
|
-
...
|
|
5367
|
+
const [l, h] = P(0), [o, p] = P(!1), {
|
|
5368
|
+
pageHeader: g = {},
|
|
5369
|
+
appletHeader: v = {},
|
|
5370
|
+
breadcrumb: x = [],
|
|
5371
|
+
overview: r = {},
|
|
5372
|
+
configuration: N = []
|
|
5373
|
+
} = t, m = ee(() => N.map((u) => {
|
|
5374
|
+
if (u.type === "section" && u.fields) {
|
|
5375
|
+
const C = [...u.fields], M = C.findIndex((O) => O && O.key === "appkey");
|
|
5376
|
+
if (M !== -1) {
|
|
5377
|
+
const O = C[M];
|
|
5378
|
+
if (C[M] = {
|
|
5379
|
+
...O,
|
|
5379
5380
|
default: a,
|
|
5380
5381
|
value: a,
|
|
5381
5382
|
readonly: !0,
|
|
5382
5383
|
placeholder: a,
|
|
5383
5384
|
disabled: !1
|
|
5384
|
-
},
|
|
5385
|
-
const
|
|
5386
|
-
|
|
5387
|
-
...
|
|
5388
|
-
default:
|
|
5389
|
-
placeholder:
|
|
5385
|
+
}, C.some((c) => c.key === "displayname")) {
|
|
5386
|
+
const c = C.findIndex((w) => w.key === "displayname"), f = C[c] || {};
|
|
5387
|
+
C[c] = {
|
|
5388
|
+
...f,
|
|
5389
|
+
default: f.default || f.value || a,
|
|
5390
|
+
placeholder: f.placeholder || "Enter display name"
|
|
5390
5391
|
};
|
|
5391
5392
|
} else {
|
|
5392
|
-
const
|
|
5393
|
+
const c = {
|
|
5393
5394
|
key: "displayname",
|
|
5394
5395
|
label: "Display Name",
|
|
5395
5396
|
fieldtype: "text",
|
|
@@ -5398,56 +5399,56 @@ const Yl = ({
|
|
|
5398
5399
|
placeholder: "Enter display name",
|
|
5399
5400
|
required: !1
|
|
5400
5401
|
};
|
|
5401
|
-
|
|
5402
|
+
C.splice(M + 1, 0, c);
|
|
5402
5403
|
}
|
|
5403
5404
|
}
|
|
5404
5405
|
return {
|
|
5405
|
-
...
|
|
5406
|
-
fields:
|
|
5406
|
+
...u,
|
|
5407
|
+
fields: C
|
|
5407
5408
|
};
|
|
5408
5409
|
}
|
|
5409
|
-
return
|
|
5410
|
-
}), [
|
|
5410
|
+
return u;
|
|
5411
|
+
}), [N, a]), y = {
|
|
5411
5412
|
heading: "App Details",
|
|
5412
5413
|
subHeading: "View app details and customize configurations to align with institutional requirements.",
|
|
5413
5414
|
isLeftArrow: !0,
|
|
5414
5415
|
onBackClick: () => window.history.back(),
|
|
5415
|
-
...
|
|
5416
|
-
},
|
|
5417
|
-
label:
|
|
5418
|
-
href:
|
|
5419
|
-
})),
|
|
5420
|
-
|
|
5421
|
-
}, []),
|
|
5422
|
-
|
|
5423
|
-
}, []),
|
|
5424
|
-
console.log("Configuration changed:",
|
|
5425
|
-
}, []),
|
|
5416
|
+
...g
|
|
5417
|
+
}, z = x.map((u) => ({
|
|
5418
|
+
label: u.text,
|
|
5419
|
+
href: u.href || "#"
|
|
5420
|
+
})), $ = H(() => {
|
|
5421
|
+
p(!0);
|
|
5422
|
+
}, []), D = H((u) => {
|
|
5423
|
+
p(!1), u.primary && window.history.back();
|
|
5424
|
+
}, []), E = H((u) => {
|
|
5425
|
+
console.log("Configuration changed:", u);
|
|
5426
|
+
}, []), L = H(() => {
|
|
5426
5427
|
window.history.back();
|
|
5427
|
-
}, []),
|
|
5428
|
-
if (
|
|
5429
|
-
const
|
|
5430
|
-
if (
|
|
5431
|
-
const
|
|
5432
|
-
if (
|
|
5433
|
-
return
|
|
5428
|
+
}, []), j = (() => {
|
|
5429
|
+
if (v.headingKey && Array.isArray(N)) {
|
|
5430
|
+
const u = v.headingKey.split("."), C = u[0], M = u[1], O = N.find((b) => b && b.key === C);
|
|
5431
|
+
if (O && O.fields) {
|
|
5432
|
+
const b = O.fields.find((c) => c && c.key === M);
|
|
5433
|
+
if (b)
|
|
5434
|
+
return b.default ?? b.value ?? v.heading ?? a;
|
|
5434
5435
|
}
|
|
5435
5436
|
}
|
|
5436
|
-
if (Array.isArray(
|
|
5437
|
-
for (const
|
|
5438
|
-
if (
|
|
5439
|
-
const
|
|
5440
|
-
if (
|
|
5437
|
+
if (Array.isArray(N)) {
|
|
5438
|
+
for (const u of N)
|
|
5439
|
+
if (u && u.fields) {
|
|
5440
|
+
const C = u.fields.find((M) => M && M.key === "displayname");
|
|
5441
|
+
if (C) return C.default ?? C.value ?? a;
|
|
5441
5442
|
}
|
|
5442
5443
|
}
|
|
5443
|
-
return
|
|
5444
|
-
})(),
|
|
5444
|
+
return v.heading || a;
|
|
5445
|
+
})(), U = {
|
|
5445
5446
|
subHeading: "Application configuration and details",
|
|
5446
5447
|
tags: [],
|
|
5447
|
-
...
|
|
5448
|
-
heading:
|
|
5448
|
+
...v,
|
|
5449
|
+
heading: j
|
|
5449
5450
|
// Use resolvedDisplayName only
|
|
5450
|
-
},
|
|
5451
|
+
}, Y = {
|
|
5451
5452
|
about: "This application provides comprehensive functionality for your organization.",
|
|
5452
5453
|
images: {
|
|
5453
5454
|
desktop: "https://via.placeholder.com/600x400?text=Desktop+View",
|
|
@@ -5464,27 +5465,27 @@ const Yl = ({
|
|
|
5464
5465
|
description: "Description of feature 2"
|
|
5465
5466
|
}
|
|
5466
5467
|
],
|
|
5467
|
-
...
|
|
5468
|
-
},
|
|
5469
|
-
configuration:
|
|
5470
|
-
}), [
|
|
5471
|
-
{ label: "Overview", content:
|
|
5472
|
-
{ label: "Configuration", content: /* @__PURE__ */ e(xs, { appid: a, configdata:
|
|
5473
|
-
], [a,
|
|
5474
|
-
function
|
|
5475
|
-
return
|
|
5468
|
+
...r
|
|
5469
|
+
}, q = ee(() => ({
|
|
5470
|
+
configuration: m
|
|
5471
|
+
}), [m]), T = ee(() => [
|
|
5472
|
+
{ label: "Overview", content: A(Y) },
|
|
5473
|
+
i && { label: "Configuration", content: /* @__PURE__ */ e(xs, { appid: a, configdata: q, disableApi: s, onSave: E, onShowCancelModal: $, onCancel: L }) }
|
|
5474
|
+
].filter(Boolean), [a, q, s, E, $, L, Y]);
|
|
5475
|
+
function _(u) {
|
|
5476
|
+
return u ? u.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: u } }) : u : "📱";
|
|
5476
5477
|
}
|
|
5477
|
-
function
|
|
5478
|
+
function A(u) {
|
|
5478
5479
|
return /* @__PURE__ */ n("div", { className: "bg-white rounded-2xl p-1", children: [
|
|
5479
5480
|
/* @__PURE__ */ n("section", { className: "mb-8", children: [
|
|
5480
5481
|
/* @__PURE__ */ e("h2", { className: "text-xl font-semibold mb-2", children: "About" }),
|
|
5481
|
-
/* @__PURE__ */ e("p", { className: "text-gray-700 text-base", children:
|
|
5482
|
+
/* @__PURE__ */ e("p", { className: "text-gray-700 text-base", children: u.about })
|
|
5482
5483
|
] }),
|
|
5483
5484
|
/* @__PURE__ */ n("section", { className: "flex flex-row gap-6 justify-center items-center mb-8", children: [
|
|
5484
5485
|
/* @__PURE__ */ e(
|
|
5485
5486
|
"img",
|
|
5486
5487
|
{
|
|
5487
|
-
src:
|
|
5488
|
+
src: u.images.desktop,
|
|
5488
5489
|
alt: "Desktop View",
|
|
5489
5490
|
className: "rounded-xl border border-gray-200 w-[340px] h-[220px] object-cover"
|
|
5490
5491
|
}
|
|
@@ -5492,7 +5493,7 @@ const Yl = ({
|
|
|
5492
5493
|
/* @__PURE__ */ e(
|
|
5493
5494
|
"img",
|
|
5494
5495
|
{
|
|
5495
|
-
src:
|
|
5496
|
+
src: u.images.mobile1,
|
|
5496
5497
|
alt: "Mobile View 1",
|
|
5497
5498
|
className: "rounded-2xl border border-gray-200 w-[120px] h-[220px] object-cover"
|
|
5498
5499
|
}
|
|
@@ -5500,11 +5501,11 @@ const Yl = ({
|
|
|
5500
5501
|
] }),
|
|
5501
5502
|
/* @__PURE__ */ n("section", { children: [
|
|
5502
5503
|
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold mb-4", children: "Key Features" }),
|
|
5503
|
-
/* @__PURE__ */ e("ul", { className: "space-y-3", children:
|
|
5504
|
-
/* @__PURE__ */ e("span", { className: "font-semibold", children:
|
|
5504
|
+
/* @__PURE__ */ e("ul", { className: "space-y-3", children: u.features.map((C, M) => /* @__PURE__ */ n("li", { children: [
|
|
5505
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: C.title }),
|
|
5505
5506
|
/* @__PURE__ */ e("br", {}),
|
|
5506
|
-
/* @__PURE__ */ e("span", { className: "text-gray-700", children:
|
|
5507
|
-
] },
|
|
5507
|
+
/* @__PURE__ */ e("span", { className: "text-gray-700", children: C.description })
|
|
5508
|
+
] }, M)) })
|
|
5508
5509
|
] })
|
|
5509
5510
|
] });
|
|
5510
5511
|
}
|
|
@@ -5512,45 +5513,45 @@ const Yl = ({
|
|
|
5512
5513
|
/* @__PURE__ */ e(
|
|
5513
5514
|
Pn,
|
|
5514
5515
|
{
|
|
5515
|
-
heading:
|
|
5516
|
-
subHeading:
|
|
5517
|
-
breadcrumbItems:
|
|
5518
|
-
isLeftArrow:
|
|
5519
|
-
onBackClick:
|
|
5516
|
+
heading: y.heading,
|
|
5517
|
+
subHeading: z.length > 0 ? void 0 : y.subHeading,
|
|
5518
|
+
breadcrumbItems: z,
|
|
5519
|
+
isLeftArrow: y.isLeftArrow,
|
|
5520
|
+
onBackClick: y.onBackClick
|
|
5520
5521
|
}
|
|
5521
5522
|
),
|
|
5522
5523
|
/* @__PURE__ */ n("div", { className: "bg-[#ffffff] border border-[#eef2f6] rounded-[12px] px-6 py-5 flex gap-4 items-start mb-4 shadow-sm", children: [
|
|
5523
|
-
/* @__PURE__ */ e("div", { className: "icon w-[72px] h-[72px] rounded-full flex items-center justify-center bg-[#F5F5F6] text-[#1C274C] font-bold text-[18px]", children:
|
|
5524
|
+
/* @__PURE__ */ e("div", { className: "icon w-[72px] h-[72px] rounded-full flex items-center justify-center bg-[#F5F5F6] text-[#1C274C] font-bold text-[18px]", children: _(U.icon) }),
|
|
5524
5525
|
/* @__PURE__ */ n("div", { className: "flex flex-col min-w-0", children: [
|
|
5525
|
-
/* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children:
|
|
5526
|
-
/* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children:
|
|
5527
|
-
/* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children:
|
|
5526
|
+
/* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: U.heading }),
|
|
5527
|
+
/* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: U.subHeading }),
|
|
5528
|
+
/* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: U.tags && U.tags.map((u, C) => /* @__PURE__ */ e(
|
|
5528
5529
|
"span",
|
|
5529
5530
|
{
|
|
5530
5531
|
className: "pill inline-block px-[10px] py-[6px] rounded-[14px] text-[11px] border border-[#e6e9ee] text-[#767676] font-semibold mt-1",
|
|
5531
|
-
children:
|
|
5532
|
+
children: u
|
|
5532
5533
|
},
|
|
5533
|
-
|
|
5534
|
+
C
|
|
5534
5535
|
)) })
|
|
5535
5536
|
] })
|
|
5536
5537
|
] }),
|
|
5537
5538
|
/* @__PURE__ */ n("div", { className: "bg-white border border-gray-300 rounded-2xl w-full mt-5 ", children: [
|
|
5538
|
-
/* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children:
|
|
5539
|
+
/* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: T.map((u, C) => /* @__PURE__ */ e(
|
|
5539
5540
|
"button",
|
|
5540
5541
|
{
|
|
5541
|
-
onClick: () =>
|
|
5542
|
-
className: `${
|
|
5543
|
-
children:
|
|
5542
|
+
onClick: () => h(C),
|
|
5543
|
+
className: `${l === C ? "border-black text-black" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"} whitespace-nowrap py-3 px-6 border-b-2 font-medium text-sm transition-colors duration-200`,
|
|
5544
|
+
children: u.label
|
|
5544
5545
|
},
|
|
5545
|
-
|
|
5546
|
+
C
|
|
5546
5547
|
)) }) }),
|
|
5547
|
-
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children:
|
|
5548
|
+
/* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: T[l].content })
|
|
5548
5549
|
] }),
|
|
5549
5550
|
/* @__PURE__ */ e(
|
|
5550
5551
|
En,
|
|
5551
5552
|
{
|
|
5552
|
-
isOpen:
|
|
5553
|
-
onClose:
|
|
5553
|
+
isOpen: o,
|
|
5554
|
+
onClose: D,
|
|
5554
5555
|
variant: "warning",
|
|
5555
5556
|
title: "Are you sure you want to cancel?",
|
|
5556
5557
|
primaryButtonText: "Yes",
|
|
@@ -5569,11 +5570,11 @@ const Yl = ({
|
|
|
5569
5570
|
allowReorder: o = !0,
|
|
5570
5571
|
initialData: p = null
|
|
5571
5572
|
}) => {
|
|
5572
|
-
const [g, v] = P(null), [x, r] = P(""), [N, m] = P(() => Array.isArray(p) ? p : []), [y, z] = P(null), [
|
|
5573
|
+
const [g, v] = P(null), [x, r] = P(""), [N, m] = P(() => Array.isArray(p) ? p : []), [y, z] = P(null), [$, D] = P(null), [E, L] = P("");
|
|
5573
5574
|
K(() => {
|
|
5574
5575
|
Array.isArray(p) && m(p);
|
|
5575
5576
|
}, [p]);
|
|
5576
|
-
const
|
|
5577
|
+
const j = (c) => {
|
|
5577
5578
|
l && (v(c._id), r(c.categoryName || ""));
|
|
5578
5579
|
}, U = () => {
|
|
5579
5580
|
if (!i || g !== null) return;
|
|
@@ -5591,7 +5592,7 @@ const Yl = ({
|
|
|
5591
5592
|
]), v(f), r("");
|
|
5592
5593
|
}, Y = () => {
|
|
5593
5594
|
g != null && (m((c) => {
|
|
5594
|
-
const w = !Array.isArray(p) || !p.some((
|
|
5595
|
+
const w = !Array.isArray(p) || !p.some((S) => S._id === g) ? c.filter((S) => S._id !== g) : c;
|
|
5595
5596
|
return a?.(w), w;
|
|
5596
5597
|
}), v(null), r(""));
|
|
5597
5598
|
}, q = () => {
|
|
@@ -5602,33 +5603,33 @@ const Yl = ({
|
|
|
5602
5603
|
} : w);
|
|
5603
5604
|
return a?.(f), f;
|
|
5604
5605
|
}), v(null), r(""));
|
|
5605
|
-
},
|
|
5606
|
+
}, T = (c) => {
|
|
5606
5607
|
h && m((f) => {
|
|
5607
|
-
const w = f.filter((
|
|
5608
|
+
const w = f.filter((S) => S._id !== c._id);
|
|
5608
5609
|
return a?.(w), w;
|
|
5609
5610
|
});
|
|
5610
5611
|
}, _ = (c, f, w) => {
|
|
5611
|
-
const
|
|
5612
|
-
if (!o ||
|
|
5613
|
-
const k = c.findIndex((G) => Number(G._id) ===
|
|
5612
|
+
const S = Number(f), I = Number(w);
|
|
5613
|
+
if (!o || S === I) return c;
|
|
5614
|
+
const k = c.findIndex((G) => Number(G._id) === S), R = c.findIndex((G) => Number(G._id) === I);
|
|
5614
5615
|
if (k === -1 || R === -1) return c;
|
|
5615
|
-
const
|
|
5616
|
-
return
|
|
5617
|
-
},
|
|
5616
|
+
const V = [...c], [F] = V.splice(k, 1);
|
|
5617
|
+
return V.splice(R, 0, F), V.map((G, W) => ({ ...G, order: W + 1 }));
|
|
5618
|
+
}, A = (c, f) => {
|
|
5618
5619
|
o && (c.dataTransfer.effectAllowed = "move", c.dataTransfer.setData("text/plain", String(f)), z(Number(f)));
|
|
5619
5620
|
}, u = (c) => {
|
|
5620
|
-
y && c !==
|
|
5621
|
-
},
|
|
5621
|
+
y && c !== $ && D(c);
|
|
5622
|
+
}, C = (c) => {
|
|
5622
5623
|
c.preventDefault();
|
|
5623
5624
|
}, M = (c, f) => {
|
|
5624
5625
|
c.preventDefault();
|
|
5625
|
-
const w = c.dataTransfer.getData("text/plain"),
|
|
5626
|
-
|
|
5627
|
-
const R = _(k,
|
|
5626
|
+
const w = c.dataTransfer.getData("text/plain"), S = w === "0" ? 0 : Number(w), I = f === "0" ? 0 : Number(f);
|
|
5627
|
+
S === void 0 || I === void 0 || (m((k) => {
|
|
5628
|
+
const R = _(k, S, I);
|
|
5628
5629
|
return a?.(R), R;
|
|
5629
|
-
}), z(null),
|
|
5630
|
+
}), z(null), D(null));
|
|
5630
5631
|
}, O = () => {
|
|
5631
|
-
z(null),
|
|
5632
|
+
z(null), D(null);
|
|
5632
5633
|
}, b = Array.isArray(N) ? N.filter(
|
|
5633
5634
|
(c) => c.categoryName?.toLowerCase().includes(E.toLowerCase())
|
|
5634
5635
|
) : [];
|
|
@@ -5657,19 +5658,19 @@ const Yl = ({
|
|
|
5657
5658
|
)
|
|
5658
5659
|
] }) }),
|
|
5659
5660
|
/* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: b.map((c) => {
|
|
5660
|
-
const f = g === c._id, w = c?.links?.length ?? 0,
|
|
5661
|
+
const f = g === c._id, w = c?.links?.length ?? 0, S = y === c._id, I = $ === c._id && y !== c._id;
|
|
5661
5662
|
return /* @__PURE__ */ e(
|
|
5662
5663
|
"div",
|
|
5663
5664
|
{
|
|
5664
5665
|
onDragEnter: () => u(c._id),
|
|
5665
|
-
onDragOver:
|
|
5666
|
+
onDragOver: C,
|
|
5666
5667
|
onDrop: (k) => M(k, c._id),
|
|
5667
5668
|
onDragEnd: O,
|
|
5668
5669
|
className: [
|
|
5669
5670
|
"flex items-center justify-between p-3 border rounded-2xl mb-3",
|
|
5670
5671
|
"border-gray-300",
|
|
5671
5672
|
I ? "ring-2 ring-gray-800/20" : "",
|
|
5672
|
-
|
|
5673
|
+
S ? "opacity-60" : ""
|
|
5673
5674
|
].join(" "),
|
|
5674
5675
|
children: f ? /* @__PURE__ */ n(te, { children: [
|
|
5675
5676
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 flex-1", children: /* @__PURE__ */ e(
|
|
@@ -5720,7 +5721,7 @@ const Yl = ({
|
|
|
5720
5721
|
"aria-label": "Drag to reorder",
|
|
5721
5722
|
className: "cursor-grab active:cursor-grabbing p-1 -m-1 rounded-md hover:bg-gray-50",
|
|
5722
5723
|
draggable: !0,
|
|
5723
|
-
onDragStart: (k) =>
|
|
5724
|
+
onDragStart: (k) => A(k, c._id),
|
|
5724
5725
|
children: /* @__PURE__ */ e(xt, {})
|
|
5725
5726
|
}
|
|
5726
5727
|
),
|
|
@@ -5732,7 +5733,7 @@ const Yl = ({
|
|
|
5732
5733
|
"button",
|
|
5733
5734
|
{
|
|
5734
5735
|
className: "cursor-pointer",
|
|
5735
|
-
onClick: () =>
|
|
5736
|
+
onClick: () => j(c),
|
|
5736
5737
|
"aria-label": `Edit ${c.categoryName}`,
|
|
5737
5738
|
children: /* @__PURE__ */ e(ur, { color: "#767676" })
|
|
5738
5739
|
}
|
|
@@ -5742,7 +5743,7 @@ const Yl = ({
|
|
|
5742
5743
|
{
|
|
5743
5744
|
className: w === 0 && !c.protected ? "cursor-pointer" : "cursor-not-allowed",
|
|
5744
5745
|
title: w === 0 && !c.protected ? "Delete" : "Cannot delete a collection with linked items",
|
|
5745
|
-
onClick: w === 0 ? () =>
|
|
5746
|
+
onClick: w === 0 ? () => T(c) : null,
|
|
5746
5747
|
children: /* @__PURE__ */ e(Le, { color: w === 0 ? "#767676" : "#C2C2C2" })
|
|
5747
5748
|
}
|
|
5748
5749
|
)
|
|
@@ -5844,24 +5845,24 @@ const Lt = () => {
|
|
|
5844
5845
|
showExcel: m = !1,
|
|
5845
5846
|
showPdf: y = !1,
|
|
5846
5847
|
showRefresh: z = !1,
|
|
5847
|
-
showAdd:
|
|
5848
|
-
iSelectedRecords:
|
|
5848
|
+
showAdd: $ = !1,
|
|
5849
|
+
iSelectedRecords: D = 0,
|
|
5849
5850
|
// Additional props
|
|
5850
5851
|
searchPlaceholder: E = "Search...",
|
|
5851
5852
|
handleRefreshClick: L = () => {
|
|
5852
5853
|
},
|
|
5853
|
-
handleSearchChange:
|
|
5854
|
+
handleSearchChange: j = () => {
|
|
5854
5855
|
},
|
|
5855
5856
|
handleDeleteClick: U = () => {
|
|
5856
5857
|
},
|
|
5857
5858
|
// Optional: override export file names
|
|
5858
5859
|
excelFileName: Y,
|
|
5859
5860
|
pdfFileName: q,
|
|
5860
|
-
searchIconSize:
|
|
5861
|
+
searchIconSize: T,
|
|
5861
5862
|
searchIconClass: _,
|
|
5862
|
-
inputStyle:
|
|
5863
|
+
inputStyle: A
|
|
5863
5864
|
}) => {
|
|
5864
|
-
const u = () => l?.current || i?.current, [
|
|
5865
|
+
const u = () => l?.current || i?.current, [C, M] = ae.useState(""), O = (t || "export").toString().trim() || "export", b = `${Y || O}.xlsx`, c = `${q || O}.pdf`, f = (I, k, R) => Math.max(k, Math.min(I, R)), w = H(
|
|
5865
5866
|
(I) => {
|
|
5866
5867
|
const k = u();
|
|
5867
5868
|
if (k?.openColumnChooser) {
|
|
@@ -5870,8 +5871,8 @@ const Lt = () => {
|
|
|
5870
5871
|
return;
|
|
5871
5872
|
}
|
|
5872
5873
|
try {
|
|
5873
|
-
const R = I.currentTarget.getBoundingClientRect(),
|
|
5874
|
-
let G =
|
|
5874
|
+
const R = I.currentTarget.getBoundingClientRect(), V = R.left + window.scrollX, F = R.bottom + window.scrollY;
|
|
5875
|
+
let G = V - 120, W = F - 120;
|
|
5875
5876
|
const pe = window.innerWidth, Ne = window.innerHeight;
|
|
5876
5877
|
G = f(G, window.scrollX + 8, window.scrollX + pe - 340), W = f(W, window.scrollY, window.scrollY + Ne - 120), k.openColumnChooser(G, W);
|
|
5877
5878
|
} catch (R) {
|
|
@@ -5881,15 +5882,15 @@ const Lt = () => {
|
|
|
5881
5882
|
},
|
|
5882
5883
|
[]
|
|
5883
5884
|
// no external deps; reads ref at call time
|
|
5884
|
-
),
|
|
5885
|
+
), S = H(
|
|
5885
5886
|
(I, k) => {
|
|
5886
5887
|
const R = u();
|
|
5887
5888
|
if (R)
|
|
5888
5889
|
switch (I) {
|
|
5889
5890
|
case "Delete": {
|
|
5890
5891
|
if (v) {
|
|
5891
|
-
const
|
|
5892
|
-
return U(
|
|
5892
|
+
const V = R.getSelectedRecords();
|
|
5893
|
+
return U(V);
|
|
5893
5894
|
}
|
|
5894
5895
|
break;
|
|
5895
5896
|
}
|
|
@@ -5926,13 +5927,13 @@ const Lt = () => {
|
|
|
5926
5927
|
fe,
|
|
5927
5928
|
{
|
|
5928
5929
|
placeholder: E,
|
|
5929
|
-
value:
|
|
5930
|
+
value: C,
|
|
5930
5931
|
onDebouncedChange: (I) => {
|
|
5931
|
-
M(I),
|
|
5932
|
+
M(I), j(I);
|
|
5932
5933
|
},
|
|
5933
|
-
searchIconSize:
|
|
5934
|
+
searchIconSize: T || 16,
|
|
5934
5935
|
searchIconClass: _ || "",
|
|
5935
|
-
inputStyle:
|
|
5936
|
+
inputStyle: A || { paddingTop: "4px", paddingBottom: "4px" }
|
|
5936
5937
|
}
|
|
5937
5938
|
) }),
|
|
5938
5939
|
/* @__PURE__ */ n("div", { className: "flex gap-3", children: [
|
|
@@ -5941,16 +5942,16 @@ const Lt = () => {
|
|
|
5941
5942
|
Ce,
|
|
5942
5943
|
{
|
|
5943
5944
|
icon: Le,
|
|
5944
|
-
onClick: () =>
|
|
5945
|
+
onClick: () => S("Delete"),
|
|
5945
5946
|
ariaLabel: "Delete",
|
|
5946
|
-
disabled:
|
|
5947
|
+
disabled: D === 0
|
|
5947
5948
|
}
|
|
5948
5949
|
),
|
|
5949
5950
|
x && /* @__PURE__ */ e(
|
|
5950
5951
|
Ce,
|
|
5951
5952
|
{
|
|
5952
5953
|
icon: hr,
|
|
5953
|
-
onClick: (I) =>
|
|
5954
|
+
onClick: (I) => S("ColumnChooser", I),
|
|
5954
5955
|
ariaLabel: "Column Chooser"
|
|
5955
5956
|
}
|
|
5956
5957
|
),
|
|
@@ -5966,7 +5967,7 @@ const Lt = () => {
|
|
|
5966
5967
|
Ce,
|
|
5967
5968
|
{
|
|
5968
5969
|
icon: gr,
|
|
5969
|
-
onClick: () =>
|
|
5970
|
+
onClick: () => S("Print"),
|
|
5970
5971
|
ariaLabel: "Print"
|
|
5971
5972
|
}
|
|
5972
5973
|
),
|
|
@@ -5974,7 +5975,7 @@ const Lt = () => {
|
|
|
5974
5975
|
Ce,
|
|
5975
5976
|
{
|
|
5976
5977
|
icon: br,
|
|
5977
|
-
onClick: () =>
|
|
5978
|
+
onClick: () => S("Excel"),
|
|
5978
5979
|
ariaLabel: "Excel Download"
|
|
5979
5980
|
}
|
|
5980
5981
|
),
|
|
@@ -5982,7 +5983,7 @@ const Lt = () => {
|
|
|
5982
5983
|
Ce,
|
|
5983
5984
|
{
|
|
5984
5985
|
icon: fr,
|
|
5985
|
-
onClick: () =>
|
|
5986
|
+
onClick: () => S("Pdf"),
|
|
5986
5987
|
ariaLabel: "PDF Download"
|
|
5987
5988
|
}
|
|
5988
5989
|
),
|
|
@@ -5990,12 +5991,12 @@ const Lt = () => {
|
|
|
5990
5991
|
Ce,
|
|
5991
5992
|
{
|
|
5992
5993
|
icon: yr,
|
|
5993
|
-
onClick: () =>
|
|
5994
|
+
onClick: () => S("Refresh"),
|
|
5994
5995
|
ariaLabel: "Refresh"
|
|
5995
5996
|
}
|
|
5996
5997
|
)
|
|
5997
5998
|
] }),
|
|
5998
|
-
|
|
5999
|
+
$ && h && /* @__PURE__ */ e(
|
|
5999
6000
|
se,
|
|
6000
6001
|
{
|
|
6001
6002
|
label: p,
|
|
@@ -6028,22 +6029,22 @@ function Xl(t) {
|
|
|
6028
6029
|
allowPdfExport: m = !1,
|
|
6029
6030
|
showColumnChooser: y = !1,
|
|
6030
6031
|
enableSearchApi: z = !1,
|
|
6031
|
-
height:
|
|
6032
|
-
selectionSettings:
|
|
6032
|
+
height: $ = "600",
|
|
6033
|
+
selectionSettings: D,
|
|
6033
6034
|
enableCheckbox: E = !1,
|
|
6034
6035
|
columns: L = [],
|
|
6035
|
-
onGridStateChange:
|
|
6036
|
+
onGridStateChange: j,
|
|
6036
6037
|
onRowSelected: U,
|
|
6037
6038
|
onRowDeselected: Y,
|
|
6038
6039
|
onRowDoubleClick: q,
|
|
6039
|
-
apiRef:
|
|
6040
|
+
apiRef: T,
|
|
6040
6041
|
gridProps: _ = {}
|
|
6041
|
-
} = t,
|
|
6042
|
+
} = t, A = he(null), {
|
|
6042
6043
|
pageSettings: u,
|
|
6043
|
-
sortSettings:
|
|
6044
|
+
sortSettings: C,
|
|
6044
6045
|
...M
|
|
6045
|
-
} = _ || {}, [O, b] = ae.useState(u?.page || l), [c, f] = ae.useState(u?.pageSize || h), [w,
|
|
6046
|
-
const B =
|
|
6046
|
+
} = _ || {}, [O, b] = ae.useState(u?.page || l), [c, f] = ae.useState(u?.pageSize || h), [w, S] = ae.useState(C?.sortKey || "updatedDate"), [I, k] = ae.useState(C?.direction || "Descending"), R = ee(() => {
|
|
6047
|
+
const B = D || {
|
|
6047
6048
|
type: "Multiple",
|
|
6048
6049
|
mode: "Row"
|
|
6049
6050
|
};
|
|
@@ -6056,9 +6057,9 @@ function Xl(t) {
|
|
|
6056
6057
|
checkboxOnly: !1,
|
|
6057
6058
|
enableSimpleMultiRowSelection: !0
|
|
6058
6059
|
} : B;
|
|
6059
|
-
}, [
|
|
6060
|
+
}, [D, E]), V = ee(() => {
|
|
6060
6061
|
const B = [en];
|
|
6061
|
-
return (E ||
|
|
6062
|
+
return (E || D) && B.push(tn), p && B.push(an), g && B.push(rn), v && B.push(nn), z && B.push(sn), N && B.push(ln), m && B.push(on), y && B.push(cn), r && B.push(dn), x && B.push(mn), B.push(un), B;
|
|
6062
6063
|
}, [
|
|
6063
6064
|
p,
|
|
6064
6065
|
g,
|
|
@@ -6070,9 +6071,9 @@ function Xl(t) {
|
|
|
6070
6071
|
r,
|
|
6071
6072
|
x,
|
|
6072
6073
|
E,
|
|
6073
|
-
|
|
6074
|
+
D
|
|
6074
6075
|
]), F = ee(() => {
|
|
6075
|
-
const B = () =>
|
|
6076
|
+
const B = () => A.current, re = (J, ce) => {
|
|
6076
6077
|
!ce && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${J} requested but related service/feature is disabled.`);
|
|
6077
6078
|
};
|
|
6078
6079
|
return {
|
|
@@ -6102,15 +6103,15 @@ function Xl(t) {
|
|
|
6102
6103
|
};
|
|
6103
6104
|
}, [z, N, m, y]);
|
|
6104
6105
|
K(() => {
|
|
6105
|
-
|
|
6106
|
-
}, [
|
|
6107
|
-
|
|
6108
|
-
}, [
|
|
6106
|
+
T && (T.current = F);
|
|
6107
|
+
}, [T, F]), K(() => () => {
|
|
6108
|
+
T && (T.current = null);
|
|
6109
|
+
}, [T]);
|
|
6109
6110
|
const G = (B) => {
|
|
6110
6111
|
const re = String(B || "");
|
|
6111
6112
|
return re === "Ascending" || re === "Descending" ? re : re.toLowerCase() === "ascending" ? "Ascending" : "Descending";
|
|
6112
6113
|
}, W = (B) => {
|
|
6113
|
-
const re =
|
|
6114
|
+
const re = A.current, J = B?.requestType, ce = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Re = B?.pageSize ?? re?.pageSettings?.pageSize ?? c, Ue = B?.currentPage ?? re?.pageSettings?.currentPage ?? l, rt = B?.columnName && B?.direction ? [{ field: B.columnName, dir: G(B.direction) }] : (re?.sortSettings?.columns || []).map((Ie) => ({
|
|
6114
6115
|
field: Ie.field,
|
|
6115
6116
|
dir: G(Ie.direction ?? Ie.dir)
|
|
6116
6117
|
})), nt = B?.searchString ?? "", st = B?.columns ?? re?.filterSettings?.columns ?? [];
|
|
@@ -6129,8 +6130,8 @@ function Xl(t) {
|
|
|
6129
6130
|
};
|
|
6130
6131
|
}, pe = (B) => {
|
|
6131
6132
|
setTimeout(() => {
|
|
6132
|
-
|
|
6133
|
-
}, 1e3), B.requestType === "paging" && (b(B.currentPage), f(B.pageSize)), B.requestType === "sorting" && (
|
|
6133
|
+
A?.current?.hideSpinner();
|
|
6134
|
+
}, 1e3), B.requestType === "paging" && (b(B.currentPage), f(B.pageSize)), B.requestType === "sorting" && (S(B.columnName || "updatedDate"), k(B.direction)), j?.(W(B), B);
|
|
6134
6135
|
}, Ne = (B) => {
|
|
6135
6136
|
q?.(B?.rowData, B);
|
|
6136
6137
|
}, Na = () => {
|
|
@@ -6197,20 +6198,20 @@ function Xl(t) {
|
|
|
6197
6198
|
pageSize: c,
|
|
6198
6199
|
pageSizes: u?.pageSizes ?? [10, 20, 40, 60, 80, 100],
|
|
6199
6200
|
totalCount: s
|
|
6200
|
-
}), [O, c, u?.pageSizes, s]), ka = ee(() =>
|
|
6201
|
+
}), [O, c, u?.pageSizes, s]), ka = ee(() => C ?? {
|
|
6201
6202
|
columns: [{ field: w, direction: G(I) }],
|
|
6202
6203
|
allowUnsort: !1
|
|
6203
|
-
}, [
|
|
6204
|
+
}, [C, w, I]);
|
|
6204
6205
|
return /* @__PURE__ */ n(
|
|
6205
6206
|
hn,
|
|
6206
6207
|
{
|
|
6207
6208
|
id: i,
|
|
6208
|
-
ref:
|
|
6209
|
+
ref: A,
|
|
6209
6210
|
dataSource: {
|
|
6210
6211
|
result: a,
|
|
6211
6212
|
count: s
|
|
6212
6213
|
},
|
|
6213
|
-
height:
|
|
6214
|
+
height: $,
|
|
6214
6215
|
allowPaging: o,
|
|
6215
6216
|
allowSorting: p,
|
|
6216
6217
|
allowFiltering: g,
|
|
@@ -6229,7 +6230,7 @@ function Xl(t) {
|
|
|
6229
6230
|
...M,
|
|
6230
6231
|
children: [
|
|
6231
6232
|
/* @__PURE__ */ e(pn, { children: Na() }),
|
|
6232
|
-
/* @__PURE__ */ e(gn, { services:
|
|
6233
|
+
/* @__PURE__ */ e(gn, { services: V })
|
|
6233
6234
|
]
|
|
6234
6235
|
}
|
|
6235
6236
|
);
|
|
@@ -6746,7 +6747,7 @@ function Os({
|
|
|
6746
6747
|
// optional full embed URL override
|
|
6747
6748
|
...N
|
|
6748
6749
|
}) {
|
|
6749
|
-
const m = de(t), y = me[m], z = Es[m],
|
|
6750
|
+
const m = de(t), y = me[m], z = Es[m], $ = r || Is(v, x);
|
|
6750
6751
|
return /* @__PURE__ */ e(
|
|
6751
6752
|
oe,
|
|
6752
6753
|
{
|
|
@@ -6762,7 +6763,7 @@ function Os({
|
|
|
6762
6763
|
"iframe",
|
|
6763
6764
|
{
|
|
6764
6765
|
title: "Google Map",
|
|
6765
|
-
src:
|
|
6766
|
+
src: $,
|
|
6766
6767
|
className: "h-full w-full",
|
|
6767
6768
|
style: { border: 0 },
|
|
6768
6769
|
loading: "lazy",
|
|
@@ -6780,7 +6781,7 @@ function Os({
|
|
|
6780
6781
|
/* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
|
|
6781
6782
|
] })
|
|
6782
6783
|
] }),
|
|
6783
|
-
/* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${z.chipGap} overflow-x-auto scrollbar-none`, children: p.map((
|
|
6784
|
+
/* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${z.chipGap} overflow-x-auto scrollbar-none`, children: p.map((D) => /* @__PURE__ */ e(Rs, { label: D, active: D === g, size: m }, D)) }) }),
|
|
6784
6785
|
/* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-28 md:top-24 pointer-events-none", children: /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 px-4 ${z.searchH}`, children: [
|
|
6785
6786
|
/* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", "aria-hidden": "true", className: "opacity-60", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M15.5 14h-.79l-.28-.27a6.471 6.471 0 001.48-4.23C15.91 6.01 13.4 3.5 10.45 3.5S5 6.01 5 9.5 7.5 15.5 10.45 15.5c1.61 0 3.09-.59 4.23-1.48l.27.28v.79l4.25 4.25c.41.41 1.07.41 1.48 0s.41-1.07 0-1.48L15.5 14Zm-5.05 0C8.01 14 6 11.99 6 9.5S8.01 5 10.45 5s4.45 2.01 4.45 4.5-2.01 4.5-4.45 4.5Z" }) }),
|
|
6786
6787
|
/* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
|
|
@@ -6952,9 +6953,9 @@ function Vs({
|
|
|
6952
6953
|
selectedIndex: p = 0,
|
|
6953
6954
|
...g
|
|
6954
6955
|
}) {
|
|
6955
|
-
const [v, x] = P(p), r = de(t), N = me[r], m = Ps[r], y = o[v] || o[0], z = (
|
|
6956
|
-
x(E), i?.(
|
|
6957
|
-
},
|
|
6956
|
+
const [v, x] = P(p), r = de(t), N = me[r], m = Ps[r], y = o[v] || o[0], z = (D, E) => {
|
|
6957
|
+
x(E), i?.(D);
|
|
6958
|
+
}, $ = r === "lg";
|
|
6958
6959
|
return /* @__PURE__ */ n(
|
|
6959
6960
|
oe,
|
|
6960
6961
|
{
|
|
@@ -6970,35 +6971,35 @@ function Vs({
|
|
|
6970
6971
|
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${N.title}`, children: h }),
|
|
6971
6972
|
/* @__PURE__ */ e("button", { className: "text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" })
|
|
6972
6973
|
] }),
|
|
6973
|
-
|
|
6974
|
+
$ ? (
|
|
6974
6975
|
// Large: Two-column layout
|
|
6975
6976
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
6976
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((
|
|
6977
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((D, E) => /* @__PURE__ */ e(
|
|
6977
6978
|
jt,
|
|
6978
6979
|
{
|
|
6979
|
-
ev:
|
|
6980
|
+
ev: D,
|
|
6980
6981
|
sizeMeta: m,
|
|
6981
6982
|
isSelected: E === v,
|
|
6982
6983
|
onClick: (L) => z(L, E)
|
|
6983
6984
|
},
|
|
6984
|
-
|
|
6985
|
+
D._id || D.id || E
|
|
6985
6986
|
)) }),
|
|
6986
6987
|
/* @__PURE__ */ e(Bs, { ev: y, sizeMeta: m })
|
|
6987
6988
|
] })
|
|
6988
6989
|
) : (
|
|
6989
6990
|
// Small/Medium: Simple list only
|
|
6990
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((
|
|
6991
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((D, E) => /* @__PURE__ */ e(
|
|
6991
6992
|
jt,
|
|
6992
6993
|
{
|
|
6993
|
-
ev:
|
|
6994
|
+
ev: D,
|
|
6994
6995
|
sizeMeta: m,
|
|
6995
6996
|
isSelected: E === v,
|
|
6996
6997
|
onClick: (L) => z(L, E)
|
|
6997
6998
|
},
|
|
6998
|
-
|
|
6999
|
+
D._id || D.id || E
|
|
6999
7000
|
)) })
|
|
7000
7001
|
),
|
|
7001
|
-
|
|
7002
|
+
!$ && /* @__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" }) })
|
|
7002
7003
|
]
|
|
7003
7004
|
}
|
|
7004
7005
|
);
|
|
@@ -7169,14 +7170,14 @@ function Gs({
|
|
|
7169
7170
|
onPin: v,
|
|
7170
7171
|
...x
|
|
7171
7172
|
}) {
|
|
7172
|
-
const [r, N] = P(p), m = de(t), y = me[m], z = _s[m],
|
|
7173
|
-
N(
|
|
7174
|
-
},
|
|
7175
|
-
const
|
|
7176
|
-
g?.(
|
|
7173
|
+
const [r, N] = P(p), m = de(t), y = me[m], z = _s[m], $ = (L, j) => {
|
|
7174
|
+
N(j), i?.(L);
|
|
7175
|
+
}, D = (L) => {
|
|
7176
|
+
const j = { ...L, starred: !L.starred };
|
|
7177
|
+
g?.(j);
|
|
7177
7178
|
}, E = (L) => {
|
|
7178
|
-
const
|
|
7179
|
-
v?.(
|
|
7179
|
+
const j = { ...L, pinned: !L.pinned };
|
|
7180
|
+
v?.(j);
|
|
7180
7181
|
};
|
|
7181
7182
|
return /* @__PURE__ */ n(
|
|
7182
7183
|
oe,
|
|
@@ -7191,17 +7192,17 @@ function Gs({
|
|
|
7191
7192
|
children: [
|
|
7192
7193
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${y.title}`, children: h }) }),
|
|
7193
7194
|
/* @__PURE__ */ e(fe, { placeholder: "Type to search..." }),
|
|
7194
|
-
/* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((L,
|
|
7195
|
+
/* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((L, j) => /* @__PURE__ */ e(
|
|
7195
7196
|
Us,
|
|
7196
7197
|
{
|
|
7197
7198
|
email: L,
|
|
7198
7199
|
sizeMeta: z,
|
|
7199
|
-
isSelected:
|
|
7200
|
-
onClick: (U) =>
|
|
7201
|
-
onStar:
|
|
7200
|
+
isSelected: j === r,
|
|
7201
|
+
onClick: (U) => $(U, j),
|
|
7202
|
+
onStar: D,
|
|
7202
7203
|
onPin: E
|
|
7203
7204
|
},
|
|
7204
|
-
L._id || L.id ||
|
|
7205
|
+
L._id || L.id || j
|
|
7205
7206
|
)) }),
|
|
7206
7207
|
/* @__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" }) })
|
|
7207
7208
|
]
|
|
@@ -7421,9 +7422,9 @@ function Xs({
|
|
|
7421
7422
|
selectedIndex: p = 0,
|
|
7422
7423
|
...g
|
|
7423
7424
|
}) {
|
|
7424
|
-
const [v, x] = P(p), r = de(t), N = me[r], m = Ys[r], y = (
|
|
7425
|
-
x(E), i?.(
|
|
7426
|
-
}, z = o[v] || o[0],
|
|
7425
|
+
const [v, x] = P(p), r = de(t), N = me[r], m = Ys[r], y = (D, E) => {
|
|
7426
|
+
x(E), i?.(D);
|
|
7427
|
+
}, z = o[v] || o[0], $ = m.layout === "split";
|
|
7427
7428
|
return /* @__PURE__ */ n(
|
|
7428
7429
|
oe,
|
|
7429
7430
|
{
|
|
@@ -7437,16 +7438,16 @@ function Xs({
|
|
|
7437
7438
|
children: [
|
|
7438
7439
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between mb-4", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${N.title}`, children: h }) }),
|
|
7439
7440
|
/* @__PURE__ */ e(Js, { sizeMeta: m }),
|
|
7440
|
-
|
|
7441
|
-
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((
|
|
7441
|
+
$ ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
|
|
7442
|
+
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((D, E) => /* @__PURE__ */ e(
|
|
7442
7443
|
_t,
|
|
7443
7444
|
{
|
|
7444
|
-
contact:
|
|
7445
|
+
contact: D,
|
|
7445
7446
|
sizeMeta: m,
|
|
7446
7447
|
isSelected: E === v,
|
|
7447
7448
|
onClick: (L) => y(L, E)
|
|
7448
7449
|
},
|
|
7449
|
-
|
|
7450
|
+
D._id || D.id || E
|
|
7450
7451
|
)) }),
|
|
7451
7452
|
/* @__PURE__ */ e(
|
|
7452
7453
|
Ws,
|
|
@@ -7457,15 +7458,15 @@ function Xs({
|
|
|
7457
7458
|
)
|
|
7458
7459
|
] }) : (
|
|
7459
7460
|
// Single column layout for small screens
|
|
7460
|
-
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((
|
|
7461
|
+
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((D, E) => /* @__PURE__ */ e(
|
|
7461
7462
|
_t,
|
|
7462
7463
|
{
|
|
7463
|
-
contact:
|
|
7464
|
+
contact: D,
|
|
7464
7465
|
sizeMeta: m,
|
|
7465
7466
|
isSelected: E === v,
|
|
7466
7467
|
onClick: (L) => y(L, E)
|
|
7467
7468
|
},
|
|
7468
|
-
|
|
7469
|
+
D._id || D.id || E
|
|
7469
7470
|
)) })
|
|
7470
7471
|
),
|
|
7471
7472
|
/* @__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" }) })
|
|
@@ -7618,16 +7619,16 @@ function Zs({
|
|
|
7618
7619
|
/* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: Te(v) })
|
|
7619
7620
|
] })
|
|
7620
7621
|
] }),
|
|
7621
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: x.slice(0, 2).map((z,
|
|
7622
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: x.slice(0, 2).map((z, $) => /* @__PURE__ */ e(
|
|
7622
7623
|
Qs,
|
|
7623
7624
|
{
|
|
7624
|
-
side:
|
|
7625
|
+
side: $ === 0 ? "left" : "right",
|
|
7625
7626
|
date: z.date,
|
|
7626
7627
|
title: z.title,
|
|
7627
7628
|
amount: z.amount,
|
|
7628
7629
|
kind: z.kind
|
|
7629
7630
|
},
|
|
7630
|
-
z.id ||
|
|
7631
|
+
z.id || $
|
|
7631
7632
|
)) })
|
|
7632
7633
|
] })
|
|
7633
7634
|
] }),
|
|
@@ -7746,7 +7747,7 @@ function el({
|
|
|
7746
7747
|
term: o = "Fall 2025",
|
|
7747
7748
|
...p
|
|
7748
7749
|
}) {
|
|
7749
|
-
const [g, v] = P("vacation"), [x, r] = P(!1), N = de(t), m = me[N], y = Ks[N], z = We.find((
|
|
7750
|
+
const [g, v] = P("vacation"), [x, r] = P(!1), N = de(t), m = me[N], y = Ks[N], z = We.find(($) => $.id === g) || We[0];
|
|
7750
7751
|
return /* @__PURE__ */ n(
|
|
7751
7752
|
oe,
|
|
7752
7753
|
{
|
|
@@ -7782,18 +7783,18 @@ function el({
|
|
|
7782
7783
|
] })
|
|
7783
7784
|
] })
|
|
7784
7785
|
] }),
|
|
7785
|
-
y.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: We.map((
|
|
7786
|
+
y.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: We.map(($) => /* @__PURE__ */ e(
|
|
7786
7787
|
"button",
|
|
7787
7788
|
{
|
|
7788
|
-
className: `flex-1 py-2 px-4 text-center ${y.tab} font-medium border-b-2 transition-colors duration-200 ${g ===
|
|
7789
|
-
onClick: () => v(
|
|
7790
|
-
children:
|
|
7789
|
+
className: `flex-1 py-2 px-4 text-center ${y.tab} font-medium border-b-2 transition-colors duration-200 ${g === $.id ? "border-blue-500 text-blue-600 dark:text-blue-400" : "border-transparent text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100"}`,
|
|
7790
|
+
onClick: () => v($.id),
|
|
7791
|
+
children: $.name.split(" ")[0]
|
|
7791
7792
|
},
|
|
7792
|
-
|
|
7793
|
+
$.id
|
|
7793
7794
|
)) }),
|
|
7794
7795
|
/* @__PURE__ */ e("div", { className: "space-y-4 mb-6", children: y.showAllLeave ? (
|
|
7795
7796
|
// LG: Show all leave types
|
|
7796
|
-
We.map((
|
|
7797
|
+
We.map(($) => /* @__PURE__ */ e(Ut, { leave: $, sizeMeta: y }, $.id))
|
|
7797
7798
|
) : y.showSingleLeave ? (
|
|
7798
7799
|
// MD: Show active tab leave type
|
|
7799
7800
|
/* @__PURE__ */ e(Ut, { leave: z, sizeMeta: y })
|
|
@@ -8183,9 +8184,9 @@ function dl({
|
|
|
8183
8184
|
showBanner: p = !0,
|
|
8184
8185
|
...g
|
|
8185
8186
|
}) {
|
|
8186
|
-
const [v, x] = P(o), r = de(t), N = me[r], m = ll[r], y = (
|
|
8187
|
-
x((E) => E.filter((L) => L.id !==
|
|
8188
|
-
}, z = v.find((
|
|
8187
|
+
const [v, x] = P(o), r = de(t), N = me[r], m = ll[r], y = (D) => {
|
|
8188
|
+
x((E) => E.filter((L) => L.id !== D.id));
|
|
8189
|
+
}, z = v.find((D) => D.type === "banner"), $ = v.filter((D) => D.type !== "banner");
|
|
8189
8190
|
return /* @__PURE__ */ n(
|
|
8190
8191
|
oe,
|
|
8191
8192
|
{
|
|
@@ -8205,14 +8206,14 @@ function dl({
|
|
|
8205
8206
|
onDismiss: y
|
|
8206
8207
|
}
|
|
8207
8208
|
),
|
|
8208
|
-
/* @__PURE__ */ e("div", { className: "space-y-0.5", children:
|
|
8209
|
+
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: $.slice(0, 3).map((D) => /* @__PURE__ */ e(
|
|
8209
8210
|
ol,
|
|
8210
8211
|
{
|
|
8211
|
-
alert:
|
|
8212
|
+
alert: D,
|
|
8212
8213
|
sizeMeta: m,
|
|
8213
8214
|
onDismiss: y
|
|
8214
8215
|
},
|
|
8215
|
-
|
|
8216
|
+
D.id
|
|
8216
8217
|
)) }),
|
|
8217
8218
|
/* @__PURE__ */ e("button", { className: "w-full py-3 px-4 border border-zinc-300 dark:border-zinc-600 text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 font-medium rounded-lg transition-colors duration-200", children: "View All" })
|
|
8218
8219
|
]
|