unifyedx-storybook-new 0.2.73 → 0.2.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/unifyedx-storybook-new.css +1 -1
- package/dist/unifyedx-storybook-new.css.br +0 -0
- package/dist/unifyedx-storybook-new.css.gz +0 -0
- package/dist/unifyedx-storybook-new.es.js +218 -216
- package/dist/unifyedx-storybook-new.es.js.br +0 -0
- package/dist/unifyedx-storybook-new.es.js.gz +0 -0
- package/package.json +1 -1
|
@@ -157,8 +157,8 @@ const Dn = {
|
|
|
157
157
|
iconHeight: d,
|
|
158
158
|
iconColor: g,
|
|
159
159
|
strokeWidth: S,
|
|
160
|
-
onClick:
|
|
161
|
-
...
|
|
160
|
+
onClick: F,
|
|
161
|
+
...E
|
|
162
162
|
}) => {
|
|
163
163
|
const R = h || m, P = u && !y, j = H(
|
|
164
164
|
"btn-base",
|
|
@@ -177,10 +177,10 @@ const Dn = {
|
|
|
177
177
|
type: s,
|
|
178
178
|
className: j,
|
|
179
179
|
disabled: R,
|
|
180
|
-
onClick:
|
|
180
|
+
onClick: F,
|
|
181
181
|
title: a || P && i || (typeof y == "string" ? y : void 0),
|
|
182
182
|
"aria-label": i || P && a || (typeof y == "string" ? y : void 0),
|
|
183
|
-
...
|
|
183
|
+
...E,
|
|
184
184
|
children: m ? /* @__PURE__ */ e(ja, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(ee, { children: [
|
|
185
185
|
u && /* @__PURE__ */ e(u, { size: N === "large" ? 20 : 16, width: v || 16, height: d || 16, color: g || "#767676", strokeWidth: S || 2 }),
|
|
186
186
|
y,
|
|
@@ -645,7 +645,7 @@ const Dn = {
|
|
|
645
645
|
Fe,
|
|
646
646
|
{
|
|
647
647
|
className: "dialog-panel",
|
|
648
|
-
onClick: (
|
|
648
|
+
onClick: (F) => F.stopPropagation(),
|
|
649
649
|
children: [
|
|
650
650
|
/* @__PURE__ */ e("input", { ...i() }),
|
|
651
651
|
/* @__PURE__ */ n("form", { onSubmit: y, className: "form-wrapper", children: [
|
|
@@ -688,7 +688,7 @@ const Dn = {
|
|
|
688
688
|
S && /* @__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((F, E) => /* @__PURE__ */ n(
|
|
692
692
|
"li",
|
|
693
693
|
{
|
|
694
694
|
className: "file-item",
|
|
@@ -697,28 +697,28 @@ const Dn = {
|
|
|
697
697
|
/* @__PURE__ */ e(
|
|
698
698
|
At,
|
|
699
699
|
{
|
|
700
|
-
extension:
|
|
700
|
+
extension: F.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: Ft(
|
|
704
|
+
/* @__PURE__ */ e("p", { className: "file-item-name", children: F.name }),
|
|
705
|
+
/* @__PURE__ */ e("p", { className: "file-item-size", children: Ft(F.size) })
|
|
706
706
|
] })
|
|
707
707
|
] }),
|
|
708
708
|
/* @__PURE__ */ e(
|
|
709
709
|
"button",
|
|
710
710
|
{
|
|
711
711
|
type: "button",
|
|
712
|
-
onClick: () => h(
|
|
712
|
+
onClick: () => h(E),
|
|
713
713
|
className: "remove-file-button",
|
|
714
714
|
children: /* @__PURE__ */ e(Le, { size: 16 })
|
|
715
715
|
}
|
|
716
716
|
)
|
|
717
717
|
]
|
|
718
718
|
},
|
|
719
|
-
`${
|
|
719
|
+
`${F.name}-${E}`
|
|
720
720
|
)),
|
|
721
|
-
u.map(({ file:
|
|
721
|
+
u.map(({ file: F, message: E }, R) => /* @__PURE__ */ n(
|
|
722
722
|
"li",
|
|
723
723
|
{
|
|
724
724
|
className: "file-item file-item--rejected",
|
|
@@ -727,13 +727,13 @@ const Dn = {
|
|
|
727
727
|
/* @__PURE__ */ e(
|
|
728
728
|
At,
|
|
729
729
|
{
|
|
730
|
-
extension:
|
|
730
|
+
extension: F.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: Ft(
|
|
736
|
-
/* @__PURE__ */ e("p", { className: "rejection-reason", children:
|
|
734
|
+
/* @__PURE__ */ e("p", { className: "file-item-name", children: F.name }),
|
|
735
|
+
/* @__PURE__ */ e("p", { className: "file-item-size", children: Ft(F.size) }),
|
|
736
|
+
/* @__PURE__ */ e("p", { className: "rejection-reason", children: E })
|
|
737
737
|
] })
|
|
738
738
|
] }),
|
|
739
739
|
/* @__PURE__ */ e(
|
|
@@ -747,7 +747,7 @@ const Dn = {
|
|
|
747
747
|
)
|
|
748
748
|
]
|
|
749
749
|
},
|
|
750
|
-
`${
|
|
750
|
+
`${F.name}-${R}`
|
|
751
751
|
))
|
|
752
752
|
] })
|
|
753
753
|
] })
|
|
@@ -842,7 +842,7 @@ const Dn = {
|
|
|
842
842
|
startDate: null
|
|
843
843
|
}), [g, S] = B({
|
|
844
844
|
endDate: null
|
|
845
|
-
}),
|
|
845
|
+
}), F = qa({
|
|
846
846
|
initialValues: JSON.parse(JSON.stringify(m)),
|
|
847
847
|
// Deep copy
|
|
848
848
|
onSubmit: ($) => {
|
|
@@ -859,8 +859,8 @@ const Dn = {
|
|
|
859
859
|
}), a();
|
|
860
860
|
},
|
|
861
861
|
enableReinitialize: !0
|
|
862
|
-
}),
|
|
863
|
-
const f = x.key, z =
|
|
862
|
+
}), E = ae(() => l.reduce(($, x) => {
|
|
863
|
+
const f = x.key, z = F.values[f];
|
|
864
864
|
let O = !1;
|
|
865
865
|
if (z)
|
|
866
866
|
switch (x.type) {
|
|
@@ -873,15 +873,15 @@ const Dn = {
|
|
|
873
873
|
break;
|
|
874
874
|
}
|
|
875
875
|
return $[f] = O, $;
|
|
876
|
-
}, {}), [l,
|
|
876
|
+
}, {}), [l, F.values]), R = Object.values(E).filter(Boolean).length, P = ae(() => l.some(($) => {
|
|
877
877
|
if ($.type !== "date") return !1;
|
|
878
|
-
const x =
|
|
878
|
+
const x = F.values?.[$.key]?.values;
|
|
879
879
|
if (!Array.isArray(x) || x.length < 2) return !1;
|
|
880
880
|
const [f, z] = x;
|
|
881
881
|
if (!f || !z) return !1;
|
|
882
882
|
const O = f instanceof Date ? f : new Date(f), I = z instanceof Date ? z : new Date(z);
|
|
883
883
|
return O > I;
|
|
884
|
-
}), [l,
|
|
884
|
+
}), [l, F.values]), j = async ($, x) => {
|
|
885
885
|
try {
|
|
886
886
|
r((z) => ({ ...z, [$]: !0 }));
|
|
887
887
|
const f = await u($, x);
|
|
@@ -895,11 +895,11 @@ const Dn = {
|
|
|
895
895
|
const x = l[$].key, f = l[$].url;
|
|
896
896
|
l[$].type === "multiselect-users" && h[x].length === 0 && !y[x] && j(x, f);
|
|
897
897
|
}, Y = () => {
|
|
898
|
-
|
|
898
|
+
F.resetForm(), N({ createdBy: [], updatedBy: [] }), i();
|
|
899
899
|
}, q = ($) => {
|
|
900
900
|
const x = l.find((O) => O.key === $);
|
|
901
901
|
if (!x) return null;
|
|
902
|
-
const f =
|
|
902
|
+
const f = F.values[$] || m[$], z = Array.isArray(f.values) ? f.values : [];
|
|
903
903
|
switch (x.type) {
|
|
904
904
|
case "multiselect":
|
|
905
905
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
@@ -909,9 +909,9 @@ const Dn = {
|
|
|
909
909
|
"select",
|
|
910
910
|
{
|
|
911
911
|
value: f.operator || "in",
|
|
912
|
-
onChange: (
|
|
912
|
+
onChange: (A) => F.setFieldValue(`${$}.operator`, A.target.value),
|
|
913
913
|
className: "filter-select",
|
|
914
|
-
children: x.operators.map((
|
|
914
|
+
children: x.operators.map((A) => /* @__PURE__ */ e("option", { value: A, children: A === "in" ? "Includes" : "Excludes" }, A))
|
|
915
915
|
}
|
|
916
916
|
)
|
|
917
917
|
] }),
|
|
@@ -924,9 +924,9 @@ const Dn = {
|
|
|
924
924
|
id: `select-all-${$}`,
|
|
925
925
|
className: "filter-checkbox-input",
|
|
926
926
|
checked: x.options.length > 0 && z.length === x.options.length,
|
|
927
|
-
onChange: (
|
|
928
|
-
const G =
|
|
929
|
-
|
|
927
|
+
onChange: (A) => {
|
|
928
|
+
const G = A.target.checked ? x.options.map((W) => W.value) : [];
|
|
929
|
+
F.setFieldValue(`${$}.values`, G);
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
),
|
|
@@ -939,29 +939,29 @@ const Dn = {
|
|
|
939
939
|
}
|
|
940
940
|
)
|
|
941
941
|
] }),
|
|
942
|
-
x.options.map((
|
|
942
|
+
x.options.map((A) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
|
|
943
943
|
/* @__PURE__ */ e(
|
|
944
944
|
"input",
|
|
945
945
|
{
|
|
946
946
|
type: "checkbox",
|
|
947
|
-
id: `${$}-${
|
|
947
|
+
id: `${$}-${A.value}`,
|
|
948
948
|
className: "filter-checkbox-input",
|
|
949
|
-
checked: z.includes(
|
|
949
|
+
checked: z.includes(A.value),
|
|
950
950
|
onChange: (G) => {
|
|
951
|
-
const W = G.target.checked ? [...z,
|
|
952
|
-
|
|
951
|
+
const W = G.target.checked ? [...z, A.value] : z.filter((pe) => pe !== A.value);
|
|
952
|
+
F.setFieldValue(`${$}.values`, W);
|
|
953
953
|
}
|
|
954
954
|
}
|
|
955
955
|
),
|
|
956
956
|
/* @__PURE__ */ e(
|
|
957
957
|
"label",
|
|
958
958
|
{
|
|
959
|
-
htmlFor: `${$}-${
|
|
959
|
+
htmlFor: `${$}-${A.value}`,
|
|
960
960
|
className: "filter-checkbox-label",
|
|
961
|
-
children:
|
|
961
|
+
children: A.label
|
|
962
962
|
}
|
|
963
963
|
)
|
|
964
|
-
] },
|
|
964
|
+
] }, A.value))
|
|
965
965
|
] })
|
|
966
966
|
] });
|
|
967
967
|
case "multiselect-users":
|
|
@@ -973,9 +973,9 @@ const Dn = {
|
|
|
973
973
|
"select",
|
|
974
974
|
{
|
|
975
975
|
value: f.operator || "in",
|
|
976
|
-
onChange: (
|
|
976
|
+
onChange: (A) => F.setFieldValue(`${$}.operator`, A.target.value),
|
|
977
977
|
className: "filter-select",
|
|
978
|
-
children: x.operators.map((
|
|
978
|
+
children: x.operators.map((A) => /* @__PURE__ */ e("option", { value: A, children: A === "in" ? "Includes" : "Excludes" }, A))
|
|
979
979
|
}
|
|
980
980
|
)
|
|
981
981
|
] }),
|
|
@@ -988,9 +988,9 @@ const Dn = {
|
|
|
988
988
|
id: `select-all-users-${$}`,
|
|
989
989
|
className: "filter-checkbox-input",
|
|
990
990
|
checked: O.length > 0 && z.length === O.length,
|
|
991
|
-
onChange: (
|
|
992
|
-
const G =
|
|
993
|
-
|
|
991
|
+
onChange: (A) => {
|
|
992
|
+
const G = A.target.checked ? O.map((W) => W.email) : [];
|
|
993
|
+
F.setFieldValue(
|
|
994
994
|
`${$}.values`,
|
|
995
995
|
G
|
|
996
996
|
);
|
|
@@ -1006,17 +1006,17 @@ const Dn = {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
)
|
|
1008
1008
|
] }),
|
|
1009
|
-
O.map((
|
|
1009
|
+
O.map((A) => /* @__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: `${$}-${A.email}`,
|
|
1015
1015
|
className: "filter-checkbox-input",
|
|
1016
|
-
checked: z.includes(
|
|
1016
|
+
checked: z.includes(A.email),
|
|
1017
1017
|
onChange: (G) => {
|
|
1018
|
-
const W = G.target.checked ? [...z,
|
|
1019
|
-
|
|
1018
|
+
const W = G.target.checked ? [...z, A.email] : z.filter((pe) => pe !== A.email);
|
|
1019
|
+
F.setFieldValue(
|
|
1020
1020
|
`${$}.values`,
|
|
1021
1021
|
W
|
|
1022
1022
|
);
|
|
@@ -1026,15 +1026,15 @@ const Dn = {
|
|
|
1026
1026
|
/* @__PURE__ */ n(
|
|
1027
1027
|
"label",
|
|
1028
1028
|
{
|
|
1029
|
-
htmlFor: `${$}-${
|
|
1029
|
+
htmlFor: `${$}-${A.email}`,
|
|
1030
1030
|
className: "filter-checkbox-label",
|
|
1031
1031
|
children: [
|
|
1032
|
-
/* @__PURE__ */ e("span", { className: "user-label-name", children:
|
|
1033
|
-
/* @__PURE__ */ e("span", { className: "user-label-email", children:
|
|
1032
|
+
/* @__PURE__ */ e("span", { className: "user-label-name", children: A.name }),
|
|
1033
|
+
/* @__PURE__ */ e("span", { className: "user-label-email", children: A.email })
|
|
1034
1034
|
]
|
|
1035
1035
|
}
|
|
1036
1036
|
)
|
|
1037
|
-
] },
|
|
1037
|
+
] }, A.email))
|
|
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":
|
|
@@ -1052,17 +1052,17 @@ const Dn = {
|
|
|
1052
1052
|
{ key: "this_month", label: "This Month" },
|
|
1053
1053
|
{ key: "last_month", label: "Last Month" },
|
|
1054
1054
|
{ key: "custom", label: "Custom" }
|
|
1055
|
-
], _ = (
|
|
1056
|
-
if (
|
|
1057
|
-
|
|
1055
|
+
], _ = (A) => {
|
|
1056
|
+
if (A === "anytime") {
|
|
1057
|
+
F.setFieldValue(`${$}.values`, []), F.setFieldValue(`${$}.range`, "anytime");
|
|
1058
1058
|
return;
|
|
1059
1059
|
}
|
|
1060
|
-
if (
|
|
1061
|
-
|
|
1060
|
+
if (A === "custom") {
|
|
1061
|
+
F.setFieldValue(`${$}.range`, "custom");
|
|
1062
1062
|
return;
|
|
1063
1063
|
}
|
|
1064
|
-
const [G, W] = Mn(
|
|
1065
|
-
|
|
1064
|
+
const [G, W] = Mn(A);
|
|
1065
|
+
F.setFieldValue(`${$}.values`, G && W ? [G, W] : []), F.setFieldValue(`${$}.range`, A);
|
|
1066
1066
|
};
|
|
1067
1067
|
return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
|
|
1068
1068
|
/* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
|
|
@@ -1071,9 +1071,9 @@ const Dn = {
|
|
|
1071
1071
|
"select",
|
|
1072
1072
|
{
|
|
1073
1073
|
value: f.operator,
|
|
1074
|
-
onChange: (
|
|
1074
|
+
onChange: (A) => F.setFieldValue(`${$}.operator`, A.target.value),
|
|
1075
1075
|
className: "filter-select",
|
|
1076
|
-
children: x.operators.map((
|
|
1076
|
+
children: x.operators.map((A) => /* @__PURE__ */ e("option", { value: A, children: A === "in" ? "Is" : "Is not" }, A))
|
|
1077
1077
|
}
|
|
1078
1078
|
),
|
|
1079
1079
|
w && /* @__PURE__ */ e(
|
|
@@ -1081,7 +1081,7 @@ const Dn = {
|
|
|
1081
1081
|
{
|
|
1082
1082
|
type: "button",
|
|
1083
1083
|
onClick: () => {
|
|
1084
|
-
|
|
1084
|
+
F.setFieldValue(
|
|
1085
1085
|
$,
|
|
1086
1086
|
m[$]
|
|
1087
1087
|
);
|
|
@@ -1091,8 +1091,8 @@ const Dn = {
|
|
|
1091
1091
|
}
|
|
1092
1092
|
)
|
|
1093
1093
|
] }),
|
|
1094
|
-
/* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: M.map((
|
|
1095
|
-
const G = f.range ===
|
|
1094
|
+
/* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: M.map((A) => {
|
|
1095
|
+
const G = f.range === A.key || A.key === "anytime" && (!Array.isArray(f.values) || f.values.length === 0);
|
|
1096
1096
|
return /* @__PURE__ */ n(
|
|
1097
1097
|
"label",
|
|
1098
1098
|
{
|
|
@@ -1104,15 +1104,15 @@ const Dn = {
|
|
|
1104
1104
|
type: "radio",
|
|
1105
1105
|
name: `preset-${$}`,
|
|
1106
1106
|
checked: G,
|
|
1107
|
-
onChange: () => _(
|
|
1107
|
+
onChange: () => _(A.key),
|
|
1108
1108
|
className: "h-4 w-4"
|
|
1109
1109
|
}
|
|
1110
1110
|
),
|
|
1111
|
-
/* @__PURE__ */ e("span", { className: "text-sm text-[#222]", children:
|
|
1112
|
-
|
|
1111
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-[#222]", children: A.label }),
|
|
1112
|
+
A.key === "anytime" && G && /* @__PURE__ */ e("span", { className: "ml-2 text-xs bg-yellow-100 text-yellow-800 px-2 py-0.5 rounded", children: "Default" })
|
|
1113
1113
|
]
|
|
1114
1114
|
},
|
|
1115
|
-
|
|
1115
|
+
A.key
|
|
1116
1116
|
);
|
|
1117
1117
|
}) }) }),
|
|
1118
1118
|
/* @__PURE__ */ n("div", { className: "", children: [
|
|
@@ -1125,9 +1125,9 @@ const Dn = {
|
|
|
1125
1125
|
asSingle: !0,
|
|
1126
1126
|
useRange: !1,
|
|
1127
1127
|
value: L,
|
|
1128
|
-
onChange: (
|
|
1129
|
-
const G =
|
|
1130
|
-
G && (
|
|
1128
|
+
onChange: (A) => {
|
|
1129
|
+
const G = A?.startDate ? Ve(new Date(A.startDate)) : null, W = D[1] || null;
|
|
1130
|
+
G && (F.setFieldValue(`${$}.values`, [G, W]), F.setFieldValue(`${$}.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",
|
|
@@ -1149,9 +1149,9 @@ const Dn = {
|
|
|
1149
1149
|
asSingle: !0,
|
|
1150
1150
|
useRange: !1,
|
|
1151
1151
|
value: C,
|
|
1152
|
-
onChange: (
|
|
1153
|
-
const G =
|
|
1154
|
-
G && (
|
|
1152
|
+
onChange: (A) => {
|
|
1153
|
+
const G = A?.startDate ? je(new Date(A.startDate)) : null, W = D[0] || null;
|
|
1154
|
+
G && (F.setFieldValue(`${$}.values`, [W, G]), F.setFieldValue(`${$}.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",
|
|
@@ -1208,7 +1208,7 @@ const Dn = {
|
|
|
1208
1208
|
}
|
|
1209
1209
|
)
|
|
1210
1210
|
] }),
|
|
1211
|
-
/* @__PURE__ */ n("form", { onSubmit:
|
|
1211
|
+
/* @__PURE__ */ n("form", { onSubmit: F.handleSubmit, className: "filter-form", children: [
|
|
1212
1212
|
/* @__PURE__ */ e("div", { className: "filter-content-wrapper", children: /* @__PURE__ */ n(
|
|
1213
1213
|
Br,
|
|
1214
1214
|
{
|
|
@@ -1223,7 +1223,7 @@ const Dn = {
|
|
|
1223
1223
|
/* @__PURE__ */ e("div", { className: "filter-selection-horizontal-indicator" }),
|
|
1224
1224
|
/* @__PURE__ */ n("div", { className: "filter-lbl-indicator-wrapper", children: [
|
|
1225
1225
|
$.label,
|
|
1226
|
-
|
|
1226
|
+
E[$.key] && /* @__PURE__ */ e(
|
|
1227
1227
|
"span",
|
|
1228
1228
|
{
|
|
1229
1229
|
className: "filter-active-indicator",
|
|
@@ -1267,7 +1267,7 @@ const Dn = {
|
|
|
1267
1267
|
"button",
|
|
1268
1268
|
{
|
|
1269
1269
|
type: "submit",
|
|
1270
|
-
disabled: !
|
|
1270
|
+
disabled: !F.dirty || P,
|
|
1271
1271
|
className: "filter-button apply",
|
|
1272
1272
|
children: [
|
|
1273
1273
|
"Apply Filters",
|
|
@@ -1652,6 +1652,9 @@ const Dn = {
|
|
|
1652
1652
|
h && /* @__PURE__ */ e("div", { className: "search-input-wrapper", children: /* @__PURE__ */ e(
|
|
1653
1653
|
ge,
|
|
1654
1654
|
{
|
|
1655
|
+
onKeyDown: (d) => {
|
|
1656
|
+
d.stopPropagation();
|
|
1657
|
+
},
|
|
1655
1658
|
value: N,
|
|
1656
1659
|
onDebouncedChange: y,
|
|
1657
1660
|
placeholder: "Search..."
|
|
@@ -2663,7 +2666,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
|
|
|
2663
2666
|
},
|
|
2664
2667
|
isChanged: u = !1
|
|
2665
2668
|
}) => {
|
|
2666
|
-
const [h, N] = B(Mt[0]), [y, r] = B(""), v = zt(y, 400), [d, g] = B([]), [S,
|
|
2669
|
+
const [h, N] = B(Mt[0]), [y, r] = B(""), v = zt(y, 400), [d, g] = B([]), [S, F] = B(/* @__PURE__ */ new Set()), [E, R] = B(!1), [P, j] = B(Lt[0]), {
|
|
2667
2670
|
control: U,
|
|
2668
2671
|
handleSubmit: Y,
|
|
2669
2672
|
watch: q,
|
|
@@ -2678,17 +2681,17 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
|
|
|
2678
2681
|
te(() => {
|
|
2679
2682
|
v.length > 1 ? (R(!0), es(h.name, v).then((C) => {
|
|
2680
2683
|
g(C);
|
|
2681
|
-
}).catch((C) => console.error("Search failed:", C)).finally(() => R(!1))) : (g([]),
|
|
2684
|
+
}).catch((C) => console.error("Search failed:", C)).finally(() => R(!1))) : (g([]), F(/* @__PURE__ */ new Set()));
|
|
2682
2685
|
}, [v, h]);
|
|
2683
2686
|
const b = (C) => {
|
|
2684
|
-
|
|
2687
|
+
F((M) => {
|
|
2685
2688
|
const _ = new Set(M);
|
|
2686
2689
|
return _.has(C) ? _.delete(C) : _.add(C), _;
|
|
2687
2690
|
});
|
|
2688
2691
|
}, p = () => {
|
|
2689
2692
|
d.filter((C) => S.has(C.id)).forEach((C) => {
|
|
2690
2693
|
f.find((M) => M.id === C.id) || z({ ...C, permission: P.name });
|
|
2691
|
-
}),
|
|
2694
|
+
}), F(/* @__PURE__ */ new Set()), r("");
|
|
2692
2695
|
}, w = (C) => {
|
|
2693
2696
|
j(C), f.forEach(
|
|
2694
2697
|
(M, _) => I(_, { ...f[_], permission: C.name })
|
|
@@ -2696,10 +2699,10 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
|
|
|
2696
2699
|
}, k = async (C) => {
|
|
2697
2700
|
try {
|
|
2698
2701
|
if (l === ue.DRIVE) {
|
|
2699
|
-
const M = C.pendingInvites.map((
|
|
2700
|
-
id:
|
|
2701
|
-
permission:
|
|
2702
|
-
type:
|
|
2702
|
+
const M = C.pendingInvites.map((A) => ({
|
|
2703
|
+
id: A.id,
|
|
2704
|
+
permission: A.permission,
|
|
2705
|
+
type: A.type.toLowerCase()
|
|
2703
2706
|
}));
|
|
2704
2707
|
o({
|
|
2705
2708
|
entity: t,
|
|
@@ -2719,10 +2722,10 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
|
|
|
2719
2722
|
}));
|
|
2720
2723
|
o(M, i);
|
|
2721
2724
|
} else if (l === ue.ARTICLE) {
|
|
2722
|
-
const M = C.pendingInvites.map((
|
|
2723
|
-
id:
|
|
2724
|
-
permission:
|
|
2725
|
-
type:
|
|
2725
|
+
const M = C.pendingInvites.map((A) => ({
|
|
2726
|
+
id: A.id,
|
|
2727
|
+
permission: A.permission,
|
|
2728
|
+
type: A.type.toLowerCase()
|
|
2726
2729
|
}));
|
|
2727
2730
|
o({
|
|
2728
2731
|
entity: t,
|
|
@@ -2833,7 +2836,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
|
|
|
2833
2836
|
value: y
|
|
2834
2837
|
}
|
|
2835
2838
|
) }),
|
|
2836
|
-
/* @__PURE__ */ e(Se, { children: (d?.length > 0 ||
|
|
2839
|
+
/* @__PURE__ */ e(Se, { children: (d?.length > 0 || E) && /* @__PURE__ */ e(
|
|
2837
2840
|
ie.div,
|
|
2838
2841
|
{
|
|
2839
2842
|
initial: { opacity: 0, y: -10 },
|
|
@@ -2841,7 +2844,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
|
|
|
2841
2844
|
exit: { opacity: 0, y: -10 },
|
|
2842
2845
|
transition: { duration: 0.2 },
|
|
2843
2846
|
className: "absolute top-full mt-2 w-full col-span-3 bg-white border border-gray-300 rounded-lg shadow-lg z-10",
|
|
2844
|
-
children:
|
|
2847
|
+
children: E ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500", children: "Loading..." }) : /* @__PURE__ */ n(ee, { children: [
|
|
2845
2848
|
/* @__PURE__ */ e("div", { className: "max-h-60 overflow-y-auto p-2 space-y-1", children: d.map((C) => {
|
|
2846
2849
|
const M = T(C);
|
|
2847
2850
|
return /* @__PURE__ */ n(
|
|
@@ -3159,7 +3162,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
|
|
|
3159
3162
|
roles: o.roles.filter((P) => P.permission !== "remove")
|
|
3160
3163
|
};
|
|
3161
3164
|
a(R);
|
|
3162
|
-
},
|
|
3165
|
+
}, F = ["users", "groups", "roles"], E = ["Users", "Groups", "Roles"];
|
|
3163
3166
|
return (
|
|
3164
3167
|
// The main structure remains the same...
|
|
3165
3168
|
/* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-gray-50", children: [
|
|
@@ -3188,7 +3191,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
|
|
|
3188
3191
|
/* @__PURE__ */ n("div", { className: "flex flex-col flex-grow", children: [
|
|
3189
3192
|
/* @__PURE__ */ n(se.Group, { selectedIndex: h, onChange: N, children: [
|
|
3190
3193
|
/* @__PURE__ */ n("div", { className: "p-4 bg-white border-b border-gray-300", children: [
|
|
3191
|
-
/* @__PURE__ */ e(se.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children:
|
|
3194
|
+
/* @__PURE__ */ e(se.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: E.map((R) => /* @__PURE__ */ e(
|
|
3192
3195
|
se,
|
|
3193
3196
|
{
|
|
3194
3197
|
className: ({
|
|
@@ -3205,7 +3208,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
|
|
|
3205
3208
|
{
|
|
3206
3209
|
onDebouncedChange: r,
|
|
3207
3210
|
value: y,
|
|
3208
|
-
placeholder: `Search in ${
|
|
3211
|
+
placeholder: `Search in ${E[h]}...`
|
|
3209
3212
|
}
|
|
3210
3213
|
) })
|
|
3211
3214
|
] }),
|
|
@@ -3216,7 +3219,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
|
|
|
3216
3219
|
animate: { y: 0, opacity: 1 },
|
|
3217
3220
|
exit: { y: -10, opacity: 0 },
|
|
3218
3221
|
transition: { duration: 0.2 },
|
|
3219
|
-
children: /* @__PURE__ */ e(se.Panels, { as: Q, children:
|
|
3222
|
+
children: /* @__PURE__ */ e(se.Panels, { as: Q, children: F.map((R) => /* @__PURE__ */ e(
|
|
3220
3223
|
se.Panel,
|
|
3221
3224
|
{
|
|
3222
3225
|
className: "space-y-3 focus:outline-none",
|
|
@@ -3285,10 +3288,10 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
|
|
|
3285
3288
|
/* @__PURE__ */ e(Kt, { className: "h-12 w-12 text-gray-400" }),
|
|
3286
3289
|
/* @__PURE__ */ n("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: [
|
|
3287
3290
|
"No ",
|
|
3288
|
-
|
|
3291
|
+
E[h],
|
|
3289
3292
|
" Found"
|
|
3290
3293
|
] }),
|
|
3291
|
-
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: y ? `No results for "${y}"` : `There are no ${
|
|
3294
|
+
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: y ? `No results for "${y}"` : `There are no ${E[h].toLowerCase()} with access.` })
|
|
3292
3295
|
]
|
|
3293
3296
|
}
|
|
3294
3297
|
)
|
|
@@ -3445,7 +3448,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
|
|
|
3445
3448
|
allowedPermissions: u = [],
|
|
3446
3449
|
...h
|
|
3447
3450
|
}) => {
|
|
3448
|
-
const [N, y] = B(be.INVITE), [r, v] = B(t), [d, g] = B(null), [S,
|
|
3451
|
+
const [N, y] = B(be.INVITE), [r, v] = B(t), [d, g] = B(null), [S, F] = B(!1), [E, R] = B([]), [P, j] = B(be.MANAGE), U = () => {
|
|
3449
3452
|
y(be.INVITE), g(null), m();
|
|
3450
3453
|
}, Y = () => {
|
|
3451
3454
|
y(be.MANAGE);
|
|
@@ -3464,7 +3467,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
|
|
|
3464
3467
|
const z = it.mapValues(t, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id)), O = it.mapValues(f, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id));
|
|
3465
3468
|
console.log("Existing data:", z), console.log("Changed data:", O);
|
|
3466
3469
|
const I = !it.isEqual(z, O);
|
|
3467
|
-
console.log("hasPermissionChanged:", I),
|
|
3470
|
+
console.log("hasPermissionChanged:", I), F(I), y(N === be.MEMBERS ? P : be.INVITE);
|
|
3468
3471
|
};
|
|
3469
3472
|
return /* @__PURE__ */ e(he, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose: U, children: [
|
|
3470
3473
|
/* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
|
|
@@ -3511,7 +3514,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
|
|
|
3511
3514
|
onClose: U,
|
|
3512
3515
|
calledBy: l,
|
|
3513
3516
|
existingShares: r,
|
|
3514
|
-
members:
|
|
3517
|
+
members: E
|
|
3515
3518
|
}
|
|
3516
3519
|
)
|
|
3517
3520
|
},
|
|
@@ -3574,18 +3577,18 @@ function at({
|
|
|
3574
3577
|
getOptionId: d = (S) => String(S.id),
|
|
3575
3578
|
getOptionLabel: g = (S) => S.name
|
|
3576
3579
|
}) {
|
|
3577
|
-
const S = He(),
|
|
3580
|
+
const S = He(), F = He(), [E, R] = B(""), P = fe(""), j = ae(() => {
|
|
3578
3581
|
const f = /* @__PURE__ */ new Map();
|
|
3579
3582
|
for (const z of a) f.set(d(z), z);
|
|
3580
3583
|
return f;
|
|
3581
3584
|
}, [a, d]), U = ae(() => Array.isArray(s) ? s.map((f) => f && typeof f == "object" ? j.get(d(f)) || null : j.get(String(f))).filter(Boolean) : [], [s, j, d]), Y = ae(() => {
|
|
3582
|
-
if (!
|
|
3583
|
-
const f =
|
|
3585
|
+
if (!E) return a;
|
|
3586
|
+
const f = E.toLowerCase();
|
|
3584
3587
|
return a.filter((z) => g(z).toLowerCase().includes(f));
|
|
3585
|
-
}, [a,
|
|
3588
|
+
}, [a, E, g]);
|
|
3586
3589
|
te(() => {
|
|
3587
|
-
N === "server" &&
|
|
3588
|
-
}, [
|
|
3590
|
+
N === "server" && E.length >= v && E !== P.current && (P.current = E, y && y(E));
|
|
3591
|
+
}, [E, N, v, y]);
|
|
3589
3592
|
const q = N === "client" ? Y : a, $ = () => {
|
|
3590
3593
|
if (!U.length)
|
|
3591
3594
|
return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
|
|
@@ -3624,7 +3627,7 @@ function at({
|
|
|
3624
3627
|
{
|
|
3625
3628
|
"aria-labelledby": S,
|
|
3626
3629
|
"aria-invalid": !!o,
|
|
3627
|
-
"aria-describedby": o ?
|
|
3630
|
+
"aria-describedby": o ? F : void 0,
|
|
3628
3631
|
onBlur: l,
|
|
3629
3632
|
className: Ge(
|
|
3630
3633
|
"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",
|
|
@@ -3648,13 +3651,13 @@ function at({
|
|
|
3648
3651
|
/* @__PURE__ */ e("div", { className: "p-2 sticky top-0 bg-white z-20 shadow-sm", children: /* @__PURE__ */ e(
|
|
3649
3652
|
ge,
|
|
3650
3653
|
{
|
|
3651
|
-
value:
|
|
3654
|
+
value: E,
|
|
3652
3655
|
onDebouncedChange: R,
|
|
3653
3656
|
placeholder: N === "server" ? `Search (min ${v})…` : "Search options…"
|
|
3654
3657
|
}
|
|
3655
3658
|
) }),
|
|
3656
3659
|
N === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
|
|
3657
|
-
q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: N === "server" ?
|
|
3660
|
+
q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: N === "server" ? E.length < v ? `Type at least ${v} characters to search.` : "No results." : "No options found." }) : q.map((z) => {
|
|
3658
3661
|
const O = d(z), I = g(z), D = U.some((p) => d(p) === O), b = h !== -1 && U.length >= h && !D;
|
|
3659
3662
|
return /* @__PURE__ */ e(
|
|
3660
3663
|
Z.Option,
|
|
@@ -3694,7 +3697,7 @@ function at({
|
|
|
3694
3697
|
] })
|
|
3695
3698
|
}
|
|
3696
3699
|
),
|
|
3697
|
-
o && /* @__PURE__ */ e("p", { id:
|
|
3700
|
+
o && /* @__PURE__ */ e("p", { id: F, className: "mt-1 text-sm text-red-600", children: o })
|
|
3698
3701
|
] })
|
|
3699
3702
|
] }) });
|
|
3700
3703
|
}
|
|
@@ -3852,7 +3855,7 @@ function ms({
|
|
|
3852
3855
|
dropId: y,
|
|
3853
3856
|
indent: r = 24
|
|
3854
3857
|
}) {
|
|
3855
|
-
const { setNodeRef: v, isOver: d } = dr({ id: y }), { attributes: g, listeners: S, setNodeRef:
|
|
3858
|
+
const { setNodeRef: v, isOver: d } = dr({ id: y }), { attributes: g, listeners: S, setNodeRef: F, transform: E, isDragging: R } = mr({ id: N }), P = E ? { transform: `translate3d(${Math.round(E.x)}px, ${Math.round(E.y)}px, 0)` } : void 0, [j, U] = B(!1), [Y, q] = B(t.name), $ = () => {
|
|
3856
3859
|
const f = Y.trim();
|
|
3857
3860
|
U(!1), f && f !== t.name ? o?.(t, f) : q(t.name);
|
|
3858
3861
|
}, x = ae(() => /* @__PURE__ */ e(
|
|
@@ -3880,7 +3883,7 @@ function ms({
|
|
|
3880
3883
|
children: [
|
|
3881
3884
|
/* @__PURE__ */ e("button", { className: "tv-toggle", onClick: i, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(Nt, { size: 16 }) : /* @__PURE__ */ e(xe, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
|
|
3882
3885
|
/* @__PURE__ */ e(Be, { size: 16, className: "tv-folder-ic" }),
|
|
3883
|
-
/* @__PURE__ */ e("div", { className: "tv-name", ref:
|
|
3886
|
+
/* @__PURE__ */ e("div", { className: "tv-name", ref: F, children: j ? /* @__PURE__ */ e(
|
|
3884
3887
|
"input",
|
|
3885
3888
|
{
|
|
3886
3889
|
className: "tv-input",
|
|
@@ -3997,7 +4000,7 @@ function Hl({
|
|
|
3997
4000
|
const { roots: S } = ae(() => gs(t) ? fs(t, { rootId: a, getId: i, getName: m }) : bs(
|
|
3998
4001
|
t.map((b) => ({ ...b })),
|
|
3999
4002
|
{ rootId: a, getId: i, getParent: l, getName: m }
|
|
4000
|
-
), [t, a, i, l, m]), [
|
|
4003
|
+
), [t, a, i, l, m]), [F, E] = B({}), R = K((b) => {
|
|
4001
4004
|
const p = {};
|
|
4002
4005
|
return (function w(k) {
|
|
4003
4006
|
k.forEach((T) => {
|
|
@@ -4006,10 +4009,10 @@ function Hl({
|
|
|
4006
4009
|
})(b), p;
|
|
4007
4010
|
}, []);
|
|
4008
4011
|
re.useEffect(() => {
|
|
4009
|
-
|
|
4012
|
+
E(R(S));
|
|
4010
4013
|
}, [S, R]);
|
|
4011
4014
|
const P = K(
|
|
4012
|
-
(b) =>
|
|
4015
|
+
(b) => E((p) => ({ ...p, [b]: !p[b] })),
|
|
4013
4016
|
[]
|
|
4014
4017
|
), [j, U] = B(() => Me(S));
|
|
4015
4018
|
re.useEffect(() => U(Me(S)), [S]);
|
|
@@ -4042,9 +4045,9 @@ function Hl({
|
|
|
4042
4045
|
U(Me(S));
|
|
4043
4046
|
return;
|
|
4044
4047
|
}
|
|
4045
|
-
const M = Me(j), { newRoots: _, removed:
|
|
4046
|
-
if (!
|
|
4047
|
-
const G = xs(_, L,
|
|
4048
|
+
const M = Me(j), { newRoots: _, removed: A } = ys(M, k);
|
|
4049
|
+
if (!A) return;
|
|
4050
|
+
const G = xs(_, L, A);
|
|
4048
4051
|
U(G), r?.({ sourceId: k, destParentId: L, newTree: G });
|
|
4049
4052
|
},
|
|
4050
4053
|
[j, S, a, d, g, r]
|
|
@@ -4055,7 +4058,7 @@ function Hl({
|
|
|
4055
4058
|
{
|
|
4056
4059
|
node: w,
|
|
4057
4060
|
depth: p,
|
|
4058
|
-
expanded: !!
|
|
4061
|
+
expanded: !!F[w.id],
|
|
4059
4062
|
onToggle: () => P(w.id),
|
|
4060
4063
|
onSelect: o,
|
|
4061
4064
|
onCreateChild: h,
|
|
@@ -4067,9 +4070,9 @@ function Hl({
|
|
|
4067
4070
|
indent: g
|
|
4068
4071
|
}
|
|
4069
4072
|
),
|
|
4070
|
-
|
|
4073
|
+
F[w.id] && w.children?.length > 0 ? D(w.children, p + 1) : null
|
|
4071
4074
|
] }, w.id)),
|
|
4072
|
-
[
|
|
4075
|
+
[F, g, h, y, N, o, v, P]
|
|
4073
4076
|
);
|
|
4074
4077
|
return re.useMemo(() => {
|
|
4075
4078
|
if (!$) return null;
|
|
@@ -5049,7 +5052,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5049
5052
|
O(D)
|
|
5050
5053
|
] });
|
|
5051
5054
|
}
|
|
5052
|
-
},
|
|
5055
|
+
}, F = K(() => {
|
|
5053
5056
|
console.log("[DataTableRenderer] Adding blank row"), r((x) => {
|
|
5054
5057
|
console.log("[DataTableRenderer] Current data before add:", x);
|
|
5055
5058
|
const f = {
|
|
@@ -5062,7 +5065,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5062
5065
|
const z = [...x, f];
|
|
5063
5066
|
return console.log("[DataTableRenderer] Updated data:", z), z;
|
|
5064
5067
|
});
|
|
5065
|
-
}, [l.fields]),
|
|
5068
|
+
}, [l.fields]), E = K((x) => {
|
|
5066
5069
|
r((f) => {
|
|
5067
5070
|
if (f.length <= 1)
|
|
5068
5071
|
return f;
|
|
@@ -5102,7 +5105,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5102
5105
|
"button",
|
|
5103
5106
|
{
|
|
5104
5107
|
className: "btn btn-primary text-white px-6 py-2 rounded-2xl cursor-pointer hover:bg-gray-800",
|
|
5105
|
-
onClick:
|
|
5108
|
+
onClick: F,
|
|
5106
5109
|
children: "Add"
|
|
5107
5110
|
}
|
|
5108
5111
|
)
|
|
@@ -5137,7 +5140,7 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
|
|
|
5137
5140
|
/* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
|
|
5138
5141
|
"button",
|
|
5139
5142
|
{
|
|
5140
|
-
onClick: () =>
|
|
5143
|
+
onClick: () => E(f),
|
|
5141
5144
|
className: "text-red-500 hover:text-red-700",
|
|
5142
5145
|
title: "Delete row",
|
|
5143
5146
|
children: /* @__PURE__ */ e(yr, { size: 16 })
|
|
@@ -5191,7 +5194,7 @@ function Ss({
|
|
|
5191
5194
|
onShowCancelModal: l,
|
|
5192
5195
|
onCancel: m
|
|
5193
5196
|
}) {
|
|
5194
|
-
const [o, u] = re.useState(a), [h, N] = re.useState(null), [y, r] = re.useState(null), [v, d] = B(!1), [g, S] = B(!1), [
|
|
5197
|
+
const [o, u] = re.useState(a), [h, N] = re.useState(null), [y, r] = re.useState(null), [v, d] = B(!1), [g, S] = B(!1), [F, E] = B({}), R = `${$e()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, P = R, [j, U] = B(1), Y = () => {
|
|
5195
5198
|
if (!y || !h)
|
|
5196
5199
|
return console.log("[DynamicConfig] hasUnsavedChanges: false (no data)", { originalData: y, data: h }), !1;
|
|
5197
5200
|
const b = (T) => {
|
|
@@ -5216,16 +5219,15 @@ function Ss({
|
|
|
5216
5219
|
if (k.key && k.type === "datatable") {
|
|
5217
5220
|
const L = (w[k.key] || []).map((C, M) => {
|
|
5218
5221
|
const _ = { id: C.id || 0 };
|
|
5219
|
-
return k.fields && k.fields.forEach((
|
|
5220
|
-
if (
|
|
5222
|
+
return k.fields && k.fields.forEach((A) => {
|
|
5223
|
+
if (A.fieldtype === "audience") {
|
|
5221
5224
|
let G = { users: [], groups: [], roles: [] };
|
|
5222
|
-
C[
|
|
5223
|
-
users: C[
|
|
5224
|
-
groups: C[
|
|
5225
|
-
roles: C[
|
|
5226
|
-
})), _[
|
|
5227
|
-
} else
|
|
5228
|
-
_[E.key] = C[E.key] || E.default || "";
|
|
5225
|
+
C[A.key] && (Array.isArray(C[A.key]) ? G = { users: [], groups: [], roles: [] } : typeof C[A.key] == "object" && (G = {
|
|
5226
|
+
users: C[A.key].users || [],
|
|
5227
|
+
groups: C[A.key].groups || [],
|
|
5228
|
+
roles: C[A.key].roles || []
|
|
5229
|
+
})), _[A.key] = G;
|
|
5230
|
+
} else A.fieldtype === "select" ? _[A.key] = C[A.key] !== void 0 && C[A.key] !== "" ? C[A.key] : A.default || "" : _[A.key] = C[A.key] || A.default || "";
|
|
5229
5231
|
}), _;
|
|
5230
5232
|
});
|
|
5231
5233
|
if (L.length === 0) {
|
|
@@ -5250,7 +5252,7 @@ function Ss({
|
|
|
5250
5252
|
if (p.type === "datatable") {
|
|
5251
5253
|
const w = { id: 0 };
|
|
5252
5254
|
p.fields && p.fields.forEach((k) => {
|
|
5253
|
-
k.fieldtype === "audience" ? w[k.key] = { users: [], groups: [], roles: [] } : w[k.key] = k.default || "";
|
|
5255
|
+
k.fieldtype === "audience" ? w[k.key] = { users: [], groups: [], roles: [] } : (k.fieldtype, w[k.key] = k.default || "");
|
|
5254
5256
|
}), b[p.key] = [w];
|
|
5255
5257
|
} else if (p.type === "section") {
|
|
5256
5258
|
const w = {};
|
|
@@ -5297,7 +5299,7 @@ function Ss({
|
|
|
5297
5299
|
[b]: p
|
|
5298
5300
|
};
|
|
5299
5301
|
return console.log("[DynamicConfig] Updated data state:", k), k;
|
|
5300
|
-
}),
|
|
5302
|
+
}), E((w) => {
|
|
5301
5303
|
const k = { ...w };
|
|
5302
5304
|
return k[b] && delete k[b], k;
|
|
5303
5305
|
});
|
|
@@ -5340,7 +5342,7 @@ function Ss({
|
|
|
5340
5342
|
}
|
|
5341
5343
|
console.log("[handleSave] Starting save process");
|
|
5342
5344
|
const b = f();
|
|
5343
|
-
if (
|
|
5345
|
+
if (E(b), z(b)) {
|
|
5344
5346
|
let w = [];
|
|
5345
5347
|
Object.keys(b).forEach((k) => {
|
|
5346
5348
|
typeof b[k] == "object" && Object.keys(b[k]).forEach((T) => {
|
|
@@ -5363,12 +5365,12 @@ function Ss({
|
|
|
5363
5365
|
const M = { id: C.id || 0 };
|
|
5364
5366
|
return L.fields && L.fields.forEach((_) => {
|
|
5365
5367
|
if (_.fieldtype === "audience") {
|
|
5366
|
-
let
|
|
5367
|
-
C[_.key] && typeof C[_.key] == "object" && !Array.isArray(C[_.key]) && (
|
|
5368
|
+
let A = { users: [], groups: [], roles: [] };
|
|
5369
|
+
C[_.key] && typeof C[_.key] == "object" && !Array.isArray(C[_.key]) && (A = {
|
|
5368
5370
|
users: C[_.key].users || [],
|
|
5369
5371
|
groups: C[_.key].groups || [],
|
|
5370
5372
|
roles: C[_.key].roles || []
|
|
5371
|
-
}), M[_.key] =
|
|
5373
|
+
}), M[_.key] = A;
|
|
5372
5374
|
} else
|
|
5373
5375
|
M[_.key] = C[_.key] || "";
|
|
5374
5376
|
}), M;
|
|
@@ -5376,7 +5378,7 @@ function Ss({
|
|
|
5376
5378
|
}), (!w.appkey || w.appkey === "") && (w.appkey = t);
|
|
5377
5379
|
let k = await xt(P, w);
|
|
5378
5380
|
if (k && k.status != "fail") {
|
|
5379
|
-
|
|
5381
|
+
E({}), r(JSON.parse(JSON.stringify(h)));
|
|
5380
5382
|
const T = k.message || "Configuration has been saved successfully";
|
|
5381
5383
|
qe.success(T), i && typeof i == "function" && i(h);
|
|
5382
5384
|
} else
|
|
@@ -5399,7 +5401,7 @@ function Ss({
|
|
|
5399
5401
|
/* @__PURE__ */ n(
|
|
5400
5402
|
"div",
|
|
5401
5403
|
{
|
|
5402
|
-
className: "dynamic-config bg-white w-full h-[calc(100vh-
|
|
5404
|
+
className: "dynamic-config bg-white w-full h-[calc(100vh-500px)] overflow-y-auto",
|
|
5403
5405
|
style: { padding: "0px 20px 0px 0px" },
|
|
5404
5406
|
children: [
|
|
5405
5407
|
v && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(ba, { size: "large" }) }),
|
|
@@ -5412,7 +5414,7 @@ function Ss({
|
|
|
5412
5414
|
item: b,
|
|
5413
5415
|
data: h,
|
|
5414
5416
|
updateHandler: x,
|
|
5415
|
-
validationErrors:
|
|
5417
|
+
validationErrors: F
|
|
5416
5418
|
},
|
|
5417
5419
|
p
|
|
5418
5420
|
);
|
|
@@ -5504,9 +5506,9 @@ const Kl = ({
|
|
|
5504
5506
|
href: f.href || "#"
|
|
5505
5507
|
})), S = K(() => {
|
|
5506
5508
|
o(!0);
|
|
5507
|
-
}, []), A = K((f) => {
|
|
5508
|
-
o(!1), f.primary && window.history.back();
|
|
5509
5509
|
}, []), F = K((f) => {
|
|
5510
|
+
o(!1), f.primary && window.history.back();
|
|
5511
|
+
}, []), E = K((f) => {
|
|
5510
5512
|
console.log("Configuration changed:", f);
|
|
5511
5513
|
}, []), R = K(() => {
|
|
5512
5514
|
window.history.back();
|
|
@@ -5555,8 +5557,8 @@ const Kl = ({
|
|
|
5555
5557
|
configuration: v
|
|
5556
5558
|
}), [v]), q = ae(() => [
|
|
5557
5559
|
{ label: "Overview", content: x(U) },
|
|
5558
|
-
{ label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: Y, disableApi: s, onSave:
|
|
5559
|
-
], [a, Y, s,
|
|
5560
|
+
{ label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: Y, disableApi: s, onSave: E, onShowCancelModal: S, onCancel: R }) }
|
|
5561
|
+
], [a, Y, s, E, S, R, U]);
|
|
5560
5562
|
function $(f) {
|
|
5561
5563
|
return f ? f.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: f } }) : f : "📱";
|
|
5562
5564
|
}
|
|
@@ -5636,7 +5638,7 @@ const Kl = ({
|
|
|
5636
5638
|
Ln,
|
|
5637
5639
|
{
|
|
5638
5640
|
isOpen: m,
|
|
5639
|
-
onClose:
|
|
5641
|
+
onClose: F,
|
|
5640
5642
|
variant: "warning",
|
|
5641
5643
|
title: "Are you sure you want to cancel?",
|
|
5642
5644
|
primaryButtonText: "Yes",
|
|
@@ -5655,7 +5657,7 @@ const Kl = ({
|
|
|
5655
5657
|
allowReorder: o = !0,
|
|
5656
5658
|
initialData: u = null
|
|
5657
5659
|
}) => {
|
|
5658
|
-
const [h, N] = B(null), [y, r] = B(""), [v, d] = B(() => Array.isArray(u) ? u : []), [g, S] = B(null), [
|
|
5660
|
+
const [h, N] = B(null), [y, r] = B(""), [v, d] = B(() => Array.isArray(u) ? u : []), [g, S] = B(null), [F, E] = B(null), [R, P] = B("");
|
|
5659
5661
|
te(() => {
|
|
5660
5662
|
Array.isArray(u) && d(u);
|
|
5661
5663
|
}, [u]);
|
|
@@ -5698,12 +5700,12 @@ const Kl = ({
|
|
|
5698
5700
|
if (!o || T === L) return p;
|
|
5699
5701
|
const C = p.findIndex((G) => Number(G._id) === T), M = p.findIndex((G) => Number(G._id) === L);
|
|
5700
5702
|
if (C === -1 || M === -1) return p;
|
|
5701
|
-
const _ = [...p], [
|
|
5702
|
-
return _.splice(M, 0,
|
|
5703
|
+
const _ = [...p], [A] = _.splice(C, 1);
|
|
5704
|
+
return _.splice(M, 0, A), _.map((G, W) => ({ ...G, order: W + 1 }));
|
|
5703
5705
|
}, f = (p, w) => {
|
|
5704
5706
|
o && (p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", String(w)), S(Number(w)));
|
|
5705
5707
|
}, z = (p) => {
|
|
5706
|
-
g && p !==
|
|
5708
|
+
g && p !== F && E(p);
|
|
5707
5709
|
}, O = (p) => {
|
|
5708
5710
|
p.preventDefault();
|
|
5709
5711
|
}, I = (p, w) => {
|
|
@@ -5712,9 +5714,9 @@ const Kl = ({
|
|
|
5712
5714
|
T === void 0 || L === void 0 || (d((C) => {
|
|
5713
5715
|
const M = x(C, T, L);
|
|
5714
5716
|
return a?.(M), M;
|
|
5715
|
-
}), S(null),
|
|
5717
|
+
}), S(null), E(null));
|
|
5716
5718
|
}, D = () => {
|
|
5717
|
-
S(null),
|
|
5719
|
+
S(null), E(null);
|
|
5718
5720
|
}, b = Array.isArray(v) ? v.filter(
|
|
5719
5721
|
(p) => p.categoryName?.toLowerCase().includes(R.toLowerCase())
|
|
5720
5722
|
) : [];
|
|
@@ -5743,7 +5745,7 @@ const Kl = ({
|
|
|
5743
5745
|
)
|
|
5744
5746
|
] }) }),
|
|
5745
5747
|
/* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: b.map((p) => {
|
|
5746
|
-
const w = h === p._id, k = p?.links?.length ?? 0, T = g === p._id, L =
|
|
5748
|
+
const w = h === p._id, k = p?.links?.length ?? 0, T = g === p._id, L = F === p._id && g !== p._id;
|
|
5747
5749
|
return /* @__PURE__ */ e(
|
|
5748
5750
|
"div",
|
|
5749
5751
|
{
|
|
@@ -5930,8 +5932,8 @@ const Bt = () => {
|
|
|
5930
5932
|
showExcel: d = !1,
|
|
5931
5933
|
showPdf: g = !1,
|
|
5932
5934
|
showRefresh: S = !1,
|
|
5933
|
-
showAdd:
|
|
5934
|
-
iSelectedRecords:
|
|
5935
|
+
showAdd: F = !1,
|
|
5936
|
+
iSelectedRecords: E = 0,
|
|
5935
5937
|
// Additional props
|
|
5936
5938
|
searchPlaceholder: R = "Search...",
|
|
5937
5939
|
handleRefreshClick: P = () => {
|
|
@@ -5956,8 +5958,8 @@ const Bt = () => {
|
|
|
5956
5958
|
return;
|
|
5957
5959
|
}
|
|
5958
5960
|
try {
|
|
5959
|
-
const M = L.currentTarget.getBoundingClientRect(), _ = M.left + window.scrollX,
|
|
5960
|
-
let G = _ - 120, W =
|
|
5961
|
+
const M = L.currentTarget.getBoundingClientRect(), _ = M.left + window.scrollX, A = M.bottom + window.scrollY;
|
|
5962
|
+
let G = _ - 120, W = A - 120;
|
|
5961
5963
|
const pe = window.innerWidth, Ne = window.innerHeight;
|
|
5962
5964
|
G = w(G, window.scrollX + 8, window.scrollX + pe - 340), W = w(W, window.scrollY, window.scrollY + Ne - 120), C.openColumnChooser(G, W);
|
|
5963
5965
|
} catch (M) {
|
|
@@ -6029,7 +6031,7 @@ const Bt = () => {
|
|
|
6029
6031
|
icon: Le,
|
|
6030
6032
|
onClick: () => T("Delete"),
|
|
6031
6033
|
ariaLabel: "Delete",
|
|
6032
|
-
disabled:
|
|
6034
|
+
disabled: E === 0
|
|
6033
6035
|
}
|
|
6034
6036
|
),
|
|
6035
6037
|
y && /* @__PURE__ */ e(
|
|
@@ -6081,7 +6083,7 @@ const Bt = () => {
|
|
|
6081
6083
|
}
|
|
6082
6084
|
)
|
|
6083
6085
|
] }),
|
|
6084
|
-
|
|
6086
|
+
F && m && /* @__PURE__ */ e(
|
|
6085
6087
|
le,
|
|
6086
6088
|
{
|
|
6087
6089
|
label: u,
|
|
@@ -6114,8 +6116,8 @@ function ai(t) {
|
|
|
6114
6116
|
allowPdfExport: d = !1,
|
|
6115
6117
|
showColumnChooser: g = !1,
|
|
6116
6118
|
enableSearchApi: S = !1,
|
|
6117
|
-
height:
|
|
6118
|
-
selectionSettings:
|
|
6119
|
+
height: F = "600",
|
|
6120
|
+
selectionSettings: E,
|
|
6119
6121
|
enableCheckbox: R = !1,
|
|
6120
6122
|
columns: P = [],
|
|
6121
6123
|
onGridStateChange: j,
|
|
@@ -6129,7 +6131,7 @@ function ai(t) {
|
|
|
6129
6131
|
sortSettings: O,
|
|
6130
6132
|
...I
|
|
6131
6133
|
} = x || {}, [D, b] = re.useState(z?.page || l), [p, w] = re.useState(z?.pageSize || m), [k, T] = re.useState(O?.sortKey || "updatedDate"), [L, C] = re.useState(O?.direction || "Descending"), M = ae(() => {
|
|
6132
|
-
const V =
|
|
6134
|
+
const V = E || {
|
|
6133
6135
|
type: "Multiple",
|
|
6134
6136
|
mode: "Row"
|
|
6135
6137
|
};
|
|
@@ -6142,9 +6144,9 @@ function ai(t) {
|
|
|
6142
6144
|
checkboxOnly: !1,
|
|
6143
6145
|
enableSimpleMultiRowSelection: !0
|
|
6144
6146
|
} : V;
|
|
6145
|
-
}, [
|
|
6147
|
+
}, [E, R]), _ = ae(() => {
|
|
6146
6148
|
const V = [ln];
|
|
6147
|
-
return (R ||
|
|
6149
|
+
return (R || E) && V.push(on), u && V.push(cn), h && V.push(dn), N && V.push(mn), S && V.push(un), v && V.push(hn), d && V.push(pn), g && V.push(gn), r && V.push(bn), y && V.push(fn), V.push(yn), V;
|
|
6148
6150
|
}, [
|
|
6149
6151
|
u,
|
|
6150
6152
|
h,
|
|
@@ -6156,8 +6158,8 @@ function ai(t) {
|
|
|
6156
6158
|
r,
|
|
6157
6159
|
y,
|
|
6158
6160
|
R,
|
|
6159
|
-
|
|
6160
|
-
]),
|
|
6161
|
+
E
|
|
6162
|
+
]), A = ae(() => {
|
|
6161
6163
|
const V = () => f.current, ne = (J, ce) => {
|
|
6162
6164
|
!ce && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${J} requested but related service/feature is disabled.`);
|
|
6163
6165
|
};
|
|
@@ -6188,8 +6190,8 @@ function ai(t) {
|
|
|
6188
6190
|
};
|
|
6189
6191
|
}, [S, v, d, g]);
|
|
6190
6192
|
te(() => {
|
|
6191
|
-
$ && ($.current =
|
|
6192
|
-
}, [$,
|
|
6193
|
+
$ && ($.current = A);
|
|
6194
|
+
}, [$, A]), te(() => () => {
|
|
6193
6195
|
$ && ($.current = null);
|
|
6194
6196
|
}, [$]);
|
|
6195
6197
|
const G = (V) => {
|
|
@@ -6296,7 +6298,7 @@ function ai(t) {
|
|
|
6296
6298
|
result: a,
|
|
6297
6299
|
count: s
|
|
6298
6300
|
},
|
|
6299
|
-
height:
|
|
6301
|
+
height: F,
|
|
6300
6302
|
allowPaging: o,
|
|
6301
6303
|
allowSorting: u,
|
|
6302
6304
|
allowFiltering: h,
|
|
@@ -6832,7 +6834,7 @@ function _s({
|
|
|
6832
6834
|
// optional full embed URL override
|
|
6833
6835
|
...v
|
|
6834
6836
|
}) {
|
|
6835
|
-
const d = de(t), g = me[d], S = Bs[d],
|
|
6837
|
+
const d = de(t), g = me[d], S = Bs[d], F = r || js(N, y);
|
|
6836
6838
|
return /* @__PURE__ */ e(
|
|
6837
6839
|
oe,
|
|
6838
6840
|
{
|
|
@@ -6848,7 +6850,7 @@ function _s({
|
|
|
6848
6850
|
"iframe",
|
|
6849
6851
|
{
|
|
6850
6852
|
title: "Google Map",
|
|
6851
|
-
src:
|
|
6853
|
+
src: F,
|
|
6852
6854
|
className: "h-full w-full",
|
|
6853
6855
|
style: { border: 0 },
|
|
6854
6856
|
loading: "lazy",
|
|
@@ -6866,7 +6868,7 @@ function _s({
|
|
|
6866
6868
|
/* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
|
|
6867
6869
|
] })
|
|
6868
6870
|
] }),
|
|
6869
|
-
/* @__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 ${S.chipGap} overflow-x-auto scrollbar-none`, children: u.map((
|
|
6871
|
+
/* @__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 ${S.chipGap} overflow-x-auto scrollbar-none`, children: u.map((E) => /* @__PURE__ */ e(Vs, { label: E, active: E === h, size: d }, E)) }) }),
|
|
6870
6872
|
/* @__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 ${S.searchH}`, children: [
|
|
6871
6873
|
/* @__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" }) }),
|
|
6872
6874
|
/* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
|
|
@@ -7038,9 +7040,9 @@ function Ws({
|
|
|
7038
7040
|
selectedIndex: u = 0,
|
|
7039
7041
|
...h
|
|
7040
7042
|
}) {
|
|
7041
|
-
const [N, y] = B(u), r = de(t), v = me[r], d = Gs[r], g = o[N] || o[0], S = (
|
|
7042
|
-
y(R), i?.(
|
|
7043
|
-
},
|
|
7043
|
+
const [N, y] = B(u), r = de(t), v = me[r], d = Gs[r], g = o[N] || o[0], S = (E, R) => {
|
|
7044
|
+
y(R), i?.(E);
|
|
7045
|
+
}, F = r === "lg";
|
|
7044
7046
|
return /* @__PURE__ */ n(
|
|
7045
7047
|
oe,
|
|
7046
7048
|
{
|
|
@@ -7056,35 +7058,35 @@ function Ws({
|
|
|
7056
7058
|
/* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }),
|
|
7057
7059
|
/* @__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" })
|
|
7058
7060
|
] }),
|
|
7059
|
-
|
|
7061
|
+
F ? (
|
|
7060
7062
|
// Large: Two-column layout
|
|
7061
7063
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
7062
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((
|
|
7064
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((E, R) => /* @__PURE__ */ e(
|
|
7063
7065
|
_t,
|
|
7064
7066
|
{
|
|
7065
|
-
ev:
|
|
7067
|
+
ev: E,
|
|
7066
7068
|
sizeMeta: d,
|
|
7067
7069
|
isSelected: R === N,
|
|
7068
7070
|
onClick: (P) => S(P, R)
|
|
7069
7071
|
},
|
|
7070
|
-
|
|
7072
|
+
E._id || E.id || R
|
|
7071
7073
|
)) }),
|
|
7072
7074
|
/* @__PURE__ */ e(Ys, { ev: g, sizeMeta: d })
|
|
7073
7075
|
] })
|
|
7074
7076
|
) : (
|
|
7075
7077
|
// Small/Medium: Simple list only
|
|
7076
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((
|
|
7078
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((E, R) => /* @__PURE__ */ e(
|
|
7077
7079
|
_t,
|
|
7078
7080
|
{
|
|
7079
|
-
ev:
|
|
7081
|
+
ev: E,
|
|
7080
7082
|
sizeMeta: d,
|
|
7081
7083
|
isSelected: R === N,
|
|
7082
7084
|
onClick: (P) => S(P, R)
|
|
7083
7085
|
},
|
|
7084
|
-
|
|
7086
|
+
E._id || E.id || R
|
|
7085
7087
|
)) })
|
|
7086
7088
|
),
|
|
7087
|
-
!
|
|
7089
|
+
!F && /* @__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" }) })
|
|
7088
7090
|
]
|
|
7089
7091
|
}
|
|
7090
7092
|
);
|
|
@@ -7255,9 +7257,9 @@ function Qs({
|
|
|
7255
7257
|
onPin: N,
|
|
7256
7258
|
...y
|
|
7257
7259
|
}) {
|
|
7258
|
-
const [r, v] = B(u), d = de(t), g = me[d], S = Xs[d],
|
|
7260
|
+
const [r, v] = B(u), d = de(t), g = me[d], S = Xs[d], F = (P, j) => {
|
|
7259
7261
|
v(j), i?.(P);
|
|
7260
|
-
},
|
|
7262
|
+
}, E = (P) => {
|
|
7261
7263
|
const j = { ...P, starred: !P.starred };
|
|
7262
7264
|
h?.(j);
|
|
7263
7265
|
}, R = (P) => {
|
|
@@ -7283,8 +7285,8 @@ function Qs({
|
|
|
7283
7285
|
email: P,
|
|
7284
7286
|
sizeMeta: S,
|
|
7285
7287
|
isSelected: j === r,
|
|
7286
|
-
onClick: (U) =>
|
|
7287
|
-
onStar:
|
|
7288
|
+
onClick: (U) => F(U, j),
|
|
7289
|
+
onStar: E,
|
|
7288
7290
|
onPin: R
|
|
7289
7291
|
},
|
|
7290
7292
|
P._id || P.id || j
|
|
@@ -7507,9 +7509,9 @@ function al({
|
|
|
7507
7509
|
selectedIndex: u = 0,
|
|
7508
7510
|
...h
|
|
7509
7511
|
}) {
|
|
7510
|
-
const [N, y] = B(u), r = de(t), v = me[r], d = Ks[r], g = (
|
|
7511
|
-
y(R), i?.(
|
|
7512
|
-
}, S = o[N] || o[0],
|
|
7512
|
+
const [N, y] = B(u), r = de(t), v = me[r], d = Ks[r], g = (E, R) => {
|
|
7513
|
+
y(R), i?.(E);
|
|
7514
|
+
}, S = o[N] || o[0], F = d.layout === "split";
|
|
7513
7515
|
return /* @__PURE__ */ n(
|
|
7514
7516
|
oe,
|
|
7515
7517
|
{
|
|
@@ -7523,16 +7525,16 @@ function al({
|
|
|
7523
7525
|
children: [
|
|
7524
7526
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between mb-4", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }) }),
|
|
7525
7527
|
/* @__PURE__ */ e(tl, { sizeMeta: d }),
|
|
7526
|
-
|
|
7527
|
-
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((
|
|
7528
|
+
F ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
|
|
7529
|
+
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((E, R) => /* @__PURE__ */ e(
|
|
7528
7530
|
Ut,
|
|
7529
7531
|
{
|
|
7530
|
-
contact:
|
|
7532
|
+
contact: E,
|
|
7531
7533
|
sizeMeta: d,
|
|
7532
7534
|
isSelected: R === N,
|
|
7533
7535
|
onClick: (P) => g(P, R)
|
|
7534
7536
|
},
|
|
7535
|
-
|
|
7537
|
+
E._id || E.id || R
|
|
7536
7538
|
)) }),
|
|
7537
7539
|
/* @__PURE__ */ e(
|
|
7538
7540
|
el,
|
|
@@ -7543,15 +7545,15 @@ function al({
|
|
|
7543
7545
|
)
|
|
7544
7546
|
] }) : (
|
|
7545
7547
|
// Single column layout for small screens
|
|
7546
|
-
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((
|
|
7548
|
+
/* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((E, R) => /* @__PURE__ */ e(
|
|
7547
7549
|
Ut,
|
|
7548
7550
|
{
|
|
7549
|
-
contact:
|
|
7551
|
+
contact: E,
|
|
7550
7552
|
sizeMeta: d,
|
|
7551
7553
|
isSelected: R === N,
|
|
7552
7554
|
onClick: (P) => g(P, R)
|
|
7553
7555
|
},
|
|
7554
|
-
|
|
7556
|
+
E._id || E.id || R
|
|
7555
7557
|
)) })
|
|
7556
7558
|
),
|
|
7557
7559
|
/* @__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" }) })
|
|
@@ -7704,16 +7706,16 @@ function sl({
|
|
|
7704
7706
|
/* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: Te(N) })
|
|
7705
7707
|
] })
|
|
7706
7708
|
] }),
|
|
7707
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: y.slice(0, 2).map((S,
|
|
7709
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: y.slice(0, 2).map((S, F) => /* @__PURE__ */ e(
|
|
7708
7710
|
rl,
|
|
7709
7711
|
{
|
|
7710
|
-
side:
|
|
7712
|
+
side: F === 0 ? "left" : "right",
|
|
7711
7713
|
date: S.date,
|
|
7712
7714
|
title: S.title,
|
|
7713
7715
|
amount: S.amount,
|
|
7714
7716
|
kind: S.kind
|
|
7715
7717
|
},
|
|
7716
|
-
S.id ||
|
|
7718
|
+
S.id || F
|
|
7717
7719
|
)) })
|
|
7718
7720
|
] })
|
|
7719
7721
|
] }),
|
|
@@ -7832,7 +7834,7 @@ function il({
|
|
|
7832
7834
|
term: o = "Fall 2025",
|
|
7833
7835
|
...u
|
|
7834
7836
|
}) {
|
|
7835
|
-
const [h, N] = B("vacation"), [y, r] = B(!1), v = de(t), d = me[v], g = ll[v], S = Ye.find((
|
|
7837
|
+
const [h, N] = B("vacation"), [y, r] = B(!1), v = de(t), d = me[v], g = ll[v], S = Ye.find((F) => F.id === h) || Ye[0];
|
|
7836
7838
|
return /* @__PURE__ */ n(
|
|
7837
7839
|
oe,
|
|
7838
7840
|
{
|
|
@@ -7868,18 +7870,18 @@ function il({
|
|
|
7868
7870
|
] })
|
|
7869
7871
|
] })
|
|
7870
7872
|
] }),
|
|
7871
|
-
g.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: Ye.map((
|
|
7873
|
+
g.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: Ye.map((F) => /* @__PURE__ */ e(
|
|
7872
7874
|
"button",
|
|
7873
7875
|
{
|
|
7874
|
-
className: `flex-1 py-2 px-4 text-center ${g.tab} font-medium border-b-2 transition-colors duration-200 ${h ===
|
|
7875
|
-
onClick: () => N(
|
|
7876
|
-
children:
|
|
7876
|
+
className: `flex-1 py-2 px-4 text-center ${g.tab} font-medium border-b-2 transition-colors duration-200 ${h === F.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"}`,
|
|
7877
|
+
onClick: () => N(F.id),
|
|
7878
|
+
children: F.name.split(" ")[0]
|
|
7877
7879
|
},
|
|
7878
|
-
|
|
7880
|
+
F.id
|
|
7879
7881
|
)) }),
|
|
7880
7882
|
/* @__PURE__ */ e("div", { className: "space-y-4 mb-6", children: g.showAllLeave ? (
|
|
7881
7883
|
// LG: Show all leave types
|
|
7882
|
-
Ye.map((
|
|
7884
|
+
Ye.map((F) => /* @__PURE__ */ e(Gt, { leave: F, sizeMeta: g }, F.id))
|
|
7883
7885
|
) : g.showSingleLeave ? (
|
|
7884
7886
|
// MD: Show active tab leave type
|
|
7885
7887
|
/* @__PURE__ */ e(Gt, { leave: S, sizeMeta: g })
|
|
@@ -8269,9 +8271,9 @@ function fl({
|
|
|
8269
8271
|
showBanner: u = !0,
|
|
8270
8272
|
...h
|
|
8271
8273
|
}) {
|
|
8272
|
-
const [N, y] = B(o), r = de(t), v = me[r], d = hl[r], g = (
|
|
8273
|
-
y((R) => R.filter((P) => P.id !==
|
|
8274
|
-
}, S = N.find((
|
|
8274
|
+
const [N, y] = B(o), r = de(t), v = me[r], d = hl[r], g = (E) => {
|
|
8275
|
+
y((R) => R.filter((P) => P.id !== E.id));
|
|
8276
|
+
}, S = N.find((E) => E.type === "banner"), F = N.filter((E) => E.type !== "banner");
|
|
8275
8277
|
return /* @__PURE__ */ n(
|
|
8276
8278
|
oe,
|
|
8277
8279
|
{
|
|
@@ -8291,14 +8293,14 @@ function fl({
|
|
|
8291
8293
|
onDismiss: g
|
|
8292
8294
|
}
|
|
8293
8295
|
),
|
|
8294
|
-
/* @__PURE__ */ e("div", { className: "space-y-0.5", children:
|
|
8296
|
+
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: F.slice(0, 3).map((E) => /* @__PURE__ */ e(
|
|
8295
8297
|
gl,
|
|
8296
8298
|
{
|
|
8297
|
-
alert:
|
|
8299
|
+
alert: E,
|
|
8298
8300
|
sizeMeta: d,
|
|
8299
8301
|
onDismiss: g
|
|
8300
8302
|
},
|
|
8301
|
-
|
|
8303
|
+
E.id
|
|
8302
8304
|
)) }),
|
|
8303
8305
|
/* @__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" })
|
|
8304
8306
|
]
|