unifyedx-storybook-new 0.2.64 → 0.2.65

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.
@@ -153,16 +153,20 @@ const wn = {
153
153
  label: y,
154
154
  children: r,
155
155
  // ✅ Add children to the props list
156
- onClick: v,
157
- ...d
156
+ iconWidth: v,
157
+ iconHeight: d,
158
+ iconColor: g,
159
+ strokeWidth: z,
160
+ onClick: A,
161
+ ...E
158
162
  }) => {
159
- const g = h || m, z = u && !y, A = H(
163
+ const I = h || m, O = u && !y, j = H(
160
164
  "btn-base",
161
165
  wn[N],
162
166
  kn[o],
163
167
  {
164
168
  "is-loading": m,
165
- "btn-icon-only": z
169
+ "btn-icon-only": O
166
170
  },
167
171
  l
168
172
  );
@@ -171,14 +175,14 @@ const wn = {
171
175
  {
172
176
  "data-testid": t,
173
177
  type: s,
174
- className: A,
175
- disabled: g,
176
- onClick: v,
177
- title: a || z && i || (typeof y == "string" ? y : void 0),
178
- "aria-label": i || z && a || (typeof y == "string" ? y : void 0),
179
- ...d,
178
+ className: j,
179
+ disabled: I,
180
+ onClick: A,
181
+ title: a || O && i || (typeof y == "string" ? y : void 0),
182
+ "aria-label": i || O && a || (typeof y == "string" ? y : void 0),
183
+ ...E,
180
184
  children: m ? /* @__PURE__ */ e(Ma, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(ee, { children: [
181
- u && /* @__PURE__ */ e(u, { size: N === "large" ? 20 : 16 }),
185
+ u && /* @__PURE__ */ e(u, { size: N === "large" ? 20 : 16, width: v || 16, height: d || 16, color: g || "#767676", strokeWidth: z || 2 }),
182
186
  y,
183
187
  r,
184
188
  " "
@@ -857,27 +861,27 @@ const wn = {
857
861
  enableReinitialize: !0
858
862
  }), E = se(() => l.reduce((T, x) => {
859
863
  const f = x.key, C = A.values[f];
860
- let O = !1;
864
+ let P = !1;
861
865
  if (C)
862
866
  switch (x.type) {
863
867
  case "multiselect":
864
868
  case "multiselect-users":
865
- O = Array.isArray(C.values) && C.values.length > 0;
869
+ P = Array.isArray(C.values) && C.values.length > 0;
866
870
  break;
867
871
  case "date":
868
- (C.range && C.range !== "" || Array.isArray(C.values) && C.values.length > 0) && (O = !0);
872
+ (C.range && C.range !== "" || Array.isArray(C.values) && C.values.length > 0) && (P = !0);
869
873
  break;
870
874
  }
871
- return T[f] = O, T;
872
- }, {}), [l, A.values]), I = Object.values(E).filter(Boolean).length, M = se(() => l.some((T) => {
875
+ return T[f] = P, T;
876
+ }, {}), [l, A.values]), I = Object.values(E).filter(Boolean).length, O = se(() => l.some((T) => {
873
877
  if (T.type !== "date") return !1;
874
878
  const x = A.values?.[T.key]?.values;
875
879
  if (!Array.isArray(x) || x.length < 2) return !1;
876
880
  const [f, C] = x;
877
881
  if (!f || !C) return !1;
878
- const O = f instanceof Date ? f : new Date(f), R = C instanceof Date ? C : new Date(C);
879
- return O > R;
880
- }), [l, A.values]), _ = async (T, x) => {
882
+ const P = f instanceof Date ? f : new Date(f), R = C instanceof Date ? C : new Date(C);
883
+ return P > R;
884
+ }), [l, A.values]), j = async (T, x) => {
881
885
  try {
882
886
  r((C) => ({ ...C, [T]: !0 }));
883
887
  const f = await u(T, x);
@@ -889,11 +893,11 @@ const wn = {
889
893
  }
890
894
  }, U = (T) => {
891
895
  const x = l[T].key, f = l[T].url;
892
- l[T].type === "multiselect-users" && h[x].length === 0 && !y[x] && _(x, f);
896
+ l[T].type === "multiselect-users" && h[x].length === 0 && !y[x] && j(x, f);
893
897
  }, Y = () => {
894
898
  A.resetForm(), N({ createdBy: [], updatedBy: [] }), i();
895
899
  }, q = (T) => {
896
- const x = l.find((O) => O.key === T);
900
+ const x = l.find((P) => P.key === T);
897
901
  if (!x) return null;
898
902
  const f = A.values[T] || m[T], C = Array.isArray(f.values) ? f.values : [];
899
903
  switch (x.type) {
@@ -961,7 +965,7 @@ const wn = {
961
965
  ] })
962
966
  ] });
963
967
  case "multiselect-users":
964
- const O = h[T] || [], R = y[T];
968
+ const P = h[T] || [], R = y[T];
965
969
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
966
970
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
967
971
  /* @__PURE__ */ e("label", { className: "filter-label", children: "Operator:" }),
@@ -975,7 +979,7 @@ const wn = {
975
979
  }
976
980
  )
977
981
  ] }),
978
- R ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: O.length > 0 ? /* @__PURE__ */ n(ee, { children: [
982
+ R ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: P.length > 0 ? /* @__PURE__ */ n(ee, { children: [
979
983
  /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
980
984
  /* @__PURE__ */ e(
981
985
  "input",
@@ -983,9 +987,9 @@ const wn = {
983
987
  type: "checkbox",
984
988
  id: `select-all-users-${T}`,
985
989
  className: "filter-checkbox-input",
986
- checked: O.length > 0 && C.length === O.length,
990
+ checked: P.length > 0 && C.length === P.length,
987
991
  onChange: (F) => {
988
- const G = F.target.checked ? O.map((W) => W.email) : [];
992
+ const G = F.target.checked ? P.map((W) => W.email) : [];
989
993
  A.setFieldValue(
990
994
  `${T}.values`,
991
995
  G
@@ -1002,7 +1006,7 @@ const wn = {
1002
1006
  }
1003
1007
  )
1004
1008
  ] }),
1005
- O.map((F) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
1009
+ P.map((F) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
1006
1010
  /* @__PURE__ */ e(
1007
1011
  "input",
1008
1012
  {
@@ -1034,7 +1038,7 @@ const wn = {
1034
1038
  ] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
1035
1039
  ] });
1036
1040
  case "date":
1037
- const D = f.values || [], [b, p] = D, k = b && p, w = D[0] || null, $ = D[1] || null, P = {
1041
+ const D = f.values || [], [b, p] = D, k = b && p, w = D[0] || null, $ = D[1] || null, M = {
1038
1042
  startDate: w instanceof Date ? w.toISOString().slice(0, 10) : null,
1039
1043
  endDate: w instanceof Date ? w.toISOString().slice(0, 10) : null
1040
1044
  }, S = {
@@ -1048,7 +1052,7 @@ const wn = {
1048
1052
  { key: "this_month", label: "This Month" },
1049
1053
  { key: "last_month", label: "Last Month" },
1050
1054
  { key: "custom", label: "Custom" }
1051
- ], j = (F) => {
1055
+ ], _ = (F) => {
1052
1056
  if (F === "anytime") {
1053
1057
  A.setFieldValue(`${T}.values`, []), A.setFieldValue(`${T}.range`, "anytime");
1054
1058
  return;
@@ -1100,7 +1104,7 @@ const wn = {
1100
1104
  type: "radio",
1101
1105
  name: `preset-${T}`,
1102
1106
  checked: G,
1103
- onChange: () => j(F.key),
1107
+ onChange: () => _(F.key),
1104
1108
  className: "h-4 w-4"
1105
1109
  }
1106
1110
  ),
@@ -1120,7 +1124,7 @@ const wn = {
1120
1124
  {
1121
1125
  asSingle: !0,
1122
1126
  useRange: !1,
1123
- value: P,
1127
+ value: M,
1124
1128
  onChange: (F) => {
1125
1129
  const G = F?.startDate ? Be(new Date(F.startDate)) : null, W = D[1] || null;
1126
1130
  G && (A.setFieldValue(`${T}.values`, [G, W]), A.setFieldValue(`${T}.range`, "custom"));
@@ -1263,7 +1267,7 @@ const wn = {
1263
1267
  "button",
1264
1268
  {
1265
1269
  type: "submit",
1266
- disabled: !A.dirty || M,
1270
+ disabled: !A.dirty || O,
1267
1271
  className: "filter-button apply",
1268
1272
  children: [
1269
1273
  "Apply Filters",
@@ -2658,7 +2662,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2658
2662
  },
2659
2663
  isChanged: u = !1
2660
2664
  }) => {
2661
- const [h, N] = B(Pt[0]), [y, r] = B(""), v = Ct(y, 400), [d, g] = B([]), [z, A] = B(/* @__PURE__ */ new Set()), [E, I] = B(!1), [M, _] = B(Mt[0]), {
2665
+ const [h, N] = B(Pt[0]), [y, r] = B(""), v = Ct(y, 400), [d, g] = B([]), [z, A] = B(/* @__PURE__ */ new Set()), [E, I] = B(!1), [O, j] = B(Mt[0]), {
2662
2666
  control: U,
2663
2667
  handleSubmit: Y,
2664
2668
  watch: q,
@@ -2666,7 +2670,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2666
2670
  } = er({
2667
2671
  defaultValues: { pendingInvites: [] },
2668
2672
  resolver: rr(Zn)
2669
- }), { fields: f, append: C, remove: O, update: R } = tr({
2673
+ }), { fields: f, append: C, remove: P, update: R } = tr({
2670
2674
  control: U,
2671
2675
  name: "pendingInvites"
2672
2676
  }), D = q("pendingInvites");
@@ -2677,16 +2681,16 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2677
2681
  }, [v, h]);
2678
2682
  const b = (S) => {
2679
2683
  A((L) => {
2680
- const j = new Set(L);
2681
- return j.has(S) ? j.delete(S) : j.add(S), j;
2684
+ const _ = new Set(L);
2685
+ return _.has(S) ? _.delete(S) : _.add(S), _;
2682
2686
  });
2683
2687
  }, p = () => {
2684
2688
  d.filter((S) => z.has(S.id)).forEach((S) => {
2685
- f.find((L) => L.id === S.id) || C({ ...S, permission: M.name });
2689
+ f.find((L) => L.id === S.id) || C({ ...S, permission: O.name });
2686
2690
  }), A(/* @__PURE__ */ new Set()), r("");
2687
2691
  }, k = (S) => {
2688
- _(S), f.forEach(
2689
- (L, j) => R(j, { ...f[j], permission: S.name })
2692
+ j(S), f.forEach(
2693
+ (L, _) => R(_, { ...f[_], permission: S.name })
2690
2694
  );
2691
2695
  }, w = async (S) => {
2692
2696
  try {
@@ -2703,13 +2707,13 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2703
2707
  // Always send updated existing shares
2704
2708
  }, i);
2705
2709
  } else if (l === me.INTEREST) {
2706
- const L = S.pendingInvites.map((j) => ({
2707
- identity: j.id,
2708
- type: j.type.toLowerCase(),
2710
+ const L = S.pendingInvites.map((_) => ({
2711
+ identity: _.id,
2712
+ type: _.type.toLowerCase(),
2709
2713
  opt: !0,
2710
2714
  lock: !1,
2711
2715
  moderator: !1,
2712
- userName: j.name,
2716
+ userName: _.name,
2713
2717
  interestId: t?.data?.id
2714
2718
  }));
2715
2719
  o(L, i);
@@ -2733,9 +2737,9 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2733
2737
  throw console.error("Failed to submit invites:", L), L;
2734
2738
  }
2735
2739
  }, $ = (S) => {
2736
- const L = i[h.code].find((j) => j.name === S.name && j.permission !== "remove") || D.find((j) => j.name === S.name);
2740
+ const L = i[h.code].find((_) => _.name === S.name && _.permission !== "remove") || D.find((_) => _.name === S.name);
2737
2741
  return L ? `${L.permission}` : "";
2738
- }, P = () => {
2742
+ }, M = () => {
2739
2743
  switch (l) {
2740
2744
  case me.DRIVE:
2741
2745
  return "Share with others";
@@ -2749,7 +2753,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2749
2753
  };
2750
2754
  return se(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:", D.length), D.length === 0 && !u), [D.length, u]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
2751
2755
  /* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
2752
- /* @__PURE__ */ e(be.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: P() }),
2756
+ /* @__PURE__ */ e(be.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: M() }),
2753
2757
  /* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
2754
2758
  l === me.DRIVE && /* @__PURE__ */ n("button", { className: "flex items-center gap-2 text-sm text-blue-600 hover:text-blue-800 font-semibold hover:cursor-pointer", children: [
2755
2759
  /* @__PURE__ */ e(ar, { className: "h-5 w-5" }),
@@ -2912,15 +2916,15 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2912
2916
  l === me.DRIVE && /* @__PURE__ */ e(
2913
2917
  Z,
2914
2918
  {
2915
- value: M,
2919
+ value: O,
2916
2920
  onChange: k,
2917
2921
  children: /* @__PURE__ */ n("div", { className: "relative", children: [
2918
2922
  /* @__PURE__ */ n(Z.Button, { className: "relative w-full border border-gray-300 bg-white rounded-md shadow-sm pl-3 pr-10 py-2 text-left hover:cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm", children: [
2919
2923
  /* @__PURE__ */ n("span", { className: "flex items-center", children: [
2920
- /* @__PURE__ */ e(M.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
2924
+ /* @__PURE__ */ e(O.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
2921
2925
  /* @__PURE__ */ n("span", { className: "truncate", children: [
2922
2926
  "Can ",
2923
- M.name
2927
+ O.name
2924
2928
  ] })
2925
2929
  ] }),
2926
2930
  /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(dt, { className: "h-5 w-5 text-gray-400" }) })
@@ -2937,7 +2941,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2937
2941
  {
2938
2942
  value: S,
2939
2943
  className: ({ active: L }) => `${L ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2940
- children: ({ selected: L, active: j }) => /* @__PURE__ */ n(ee, { children: [
2944
+ children: ({ selected: L, active: _ }) => /* @__PURE__ */ n(ee, { children: [
2941
2945
  /* @__PURE__ */ n(
2942
2946
  "span",
2943
2947
  {
@@ -2946,7 +2950,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2946
2950
  /* @__PURE__ */ e(
2947
2951
  S.icon,
2948
2952
  {
2949
- className: `h-5 w-5 mr-2 ${j ? "text-white" : "text-gray-400"}`
2953
+ className: `h-5 w-5 mr-2 ${_ ? "text-white" : "text-gray-400"}`
2950
2954
  }
2951
2955
  ),
2952
2956
  "Can ",
@@ -2999,7 +3003,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
2999
3003
  /* @__PURE__ */ e(
3000
3004
  "button",
3001
3005
  {
3002
- onClick: () => O(L),
3006
+ onClick: () => P(L),
3003
3007
  className: "text-gray-400 hover:text-red-500 hover:cursor-pointer",
3004
3008
  children: /* @__PURE__ */ e(He, { className: "h-5 w-5" })
3005
3009
  }
@@ -3144,19 +3148,19 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3144
3148
  roles: o.roles.filter(
3145
3149
  (I) => I.name.toLowerCase().includes(v.toLowerCase())
3146
3150
  )
3147
- }, g = async (I, M, _, U) => {
3148
- const Y = M.value;
3151
+ }, g = async (I, O, j, U) => {
3152
+ const Y = O.value;
3149
3153
  u((q) => ({
3150
3154
  ...q,
3151
- [_]: q[_].map(
3155
+ [j]: q[j].map(
3152
3156
  (T) => T.id === I.id ? { ...T, permission: Y } : T
3153
3157
  )
3154
3158
  }));
3155
3159
  }, z = () => {
3156
3160
  const I = {
3157
- users: o.users.filter((M) => M.permission !== "remove"),
3158
- groups: o.groups.filter((M) => M.permission !== "remove"),
3159
- roles: o.roles.filter((M) => M.permission !== "remove")
3161
+ users: o.users.filter((O) => O.permission !== "remove"),
3162
+ groups: o.groups.filter((O) => O.permission !== "remove"),
3163
+ roles: o.roles.filter((O) => O.permission !== "remove")
3160
3164
  };
3161
3165
  a(I);
3162
3166
  }, A = ["users", "groups", "roles"], E = ["Users", "Groups", "Roles"];
@@ -3192,10 +3196,10 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3192
3196
  ne,
3193
3197
  {
3194
3198
  className: ({
3195
- selected: M
3199
+ selected: O
3196
3200
  }) => `w-full py-2 text-sm font-medium leading-5 rounded-md
3197
3201
  focus:outline-none focus:ring-2 ring-offset-2 ring-offset-blue-400 ring-white ring-opacity-60
3198
- ${M ? "bg-white shadow text-blue-700" : "text-gray-600 hover:bg-white/[0.6]"}`,
3202
+ ${O ? "bg-white shadow text-blue-700" : "text-gray-600 hover:bg-white/[0.6]"}`,
3199
3203
  children: I
3200
3204
  },
3201
3205
  I
@@ -3220,7 +3224,7 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3220
3224
  ne.Panel,
3221
3225
  {
3222
3226
  className: "space-y-3 focus:outline-none",
3223
- children: /* @__PURE__ */ e(Ce, { children: d[I].length > 0 ? d[I].map((M) => /* @__PURE__ */ n(
3227
+ children: /* @__PURE__ */ e(Ce, { children: d[I].length > 0 ? d[I].map((O) => /* @__PURE__ */ n(
3224
3228
  le.div,
3225
3229
  {
3226
3230
  layout: !0,
@@ -3237,20 +3241,20 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3237
3241
  /* @__PURE__ */ e(
3238
3242
  "img",
3239
3243
  {
3240
- src: M.avatarUrl || `https://avatar.vercel.sh/${M.name}.svg?text=${M.name.charAt(0)}`,
3241
- alt: M.name,
3244
+ src: O.avatarUrl || `https://avatar.vercel.sh/${O.name}.svg?text=${O.name.charAt(0)}`,
3245
+ alt: O.name,
3242
3246
  className: "w-10 h-10 rounded-full flex-shrink-0"
3243
3247
  }
3244
3248
  ),
3245
3249
  /* @__PURE__ */ n("div", { className: "overflow-hidden", children: [
3246
- /* @__PURE__ */ e("p", { className: "font-medium text-gray-900 truncate", children: M.name }),
3250
+ /* @__PURE__ */ e("p", { className: "font-medium text-gray-900 truncate", children: O.name }),
3247
3251
  I !== "users" && /* @__PURE__ */ e(
3248
3252
  "button",
3249
3253
  {
3250
3254
  onClick: () => i({
3251
- id: M.id,
3255
+ id: O.id,
3252
3256
  type: I,
3253
- name: M.name
3257
+ name: O.name
3254
3258
  }),
3255
3259
  className: "text-sm text-blue-600 hover:underline hover:cursor-pointer",
3256
3260
  children: "View Members"
@@ -3261,18 +3265,18 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3261
3265
  /* @__PURE__ */ e(
3262
3266
  es,
3263
3267
  {
3264
- item: M,
3268
+ item: O,
3265
3269
  allowedPermissions: m,
3266
- onPermissionChange: (_) => g(
3267
- M,
3268
- _,
3270
+ onPermissionChange: (j) => g(
3271
+ O,
3272
+ j,
3269
3273
  I
3270
3274
  )
3271
3275
  }
3272
3276
  )
3273
3277
  ]
3274
3278
  },
3275
- M.id
3279
+ O.id
3276
3280
  )) : (
3277
3281
  // Empty state is unchanged
3278
3282
  /* @__PURE__ */ n(
@@ -3445,12 +3449,12 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3445
3449
  allowedPermissions: u = [],
3446
3450
  ...h
3447
3451
  }) => {
3448
- const [N, y] = B(pe.INVITE), [r, v] = B(t), [d, g] = B(null), [z, A] = B(!1), [E, I] = B([]), [M, _] = B(pe.MANAGE), U = () => {
3452
+ const [N, y] = B(pe.INVITE), [r, v] = B(t), [d, g] = B(null), [z, A] = B(!1), [E, I] = B([]), [O, j] = B(pe.MANAGE), U = () => {
3449
3453
  y(pe.INVITE), g(null), m();
3450
3454
  }, Y = () => {
3451
3455
  y(pe.MANAGE);
3452
- }, q = async ({ id: f, name: C, type: O }) => {
3453
- if (O === "groups") {
3456
+ }, q = async ({ id: f, name: C, type: P }) => {
3457
+ if (P === "groups") {
3454
3458
  try {
3455
3459
  const R = await Qe(`${We.getMembersForGroup(C)}`);
3456
3460
  } catch (R) {
@@ -3458,13 +3462,13 @@ const Fe = Jn(), Qe = Fe.axiosGet, Vl = Fe.axiosDelete, yt = Fe.axiosPost, jl =
3458
3462
  }
3459
3463
  I(resp);
3460
3464
  }
3461
- g({ id: f, type: O, name: C }), _(N), y(pe.MEMBERS);
3465
+ g({ id: f, type: P, name: C }), j(N), y(pe.MEMBERS);
3462
3466
  }, T = (f) => {
3463
3467
  console.log("changedExistingShares", f), v(f);
3464
- const C = lt.mapValues(t, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id)), O = lt.mapValues(f, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id));
3465
- console.log("Existing data:", C), console.log("Changed data:", O);
3466
- const R = !lt.isEqual(C, O);
3467
- console.log("hasPermissionChanged:", R), A(R), y(N === pe.MEMBERS ? M : pe.INVITE);
3468
+ const C = lt.mapValues(t, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id)), P = lt.mapValues(f, (D) => D.map((b) => ({ id: b.id, permission: b.permission })).sort((b, p) => b.id - p.id));
3469
+ console.log("Existing data:", C), console.log("Changed data:", P);
3470
+ const R = !lt.isEqual(C, P);
3471
+ console.log("hasPermissionChanged:", R), A(R), y(N === pe.MEMBERS ? O : pe.INVITE);
3468
3472
  };
3469
3473
  return /* @__PURE__ */ e(ue, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(be, { as: "div", className: "relative z-50", onClose: U, children: [
3470
3474
  /* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
@@ -3574,30 +3578,30 @@ function tt({
3574
3578
  getOptionId: d = (z) => String(z.id),
3575
3579
  getOptionLabel: g = (z) => z.name
3576
3580
  }) {
3577
- const z = Xe(), A = Xe(), [E, I] = B(""), M = ge(""), _ = se(() => {
3581
+ const z = Xe(), A = Xe(), [E, I] = B(""), O = ge(""), j = se(() => {
3578
3582
  const f = /* @__PURE__ */ new Map();
3579
3583
  for (const C of a) f.set(d(C), C);
3580
3584
  return f;
3581
- }, [a, d]), U = se(() => Array.isArray(s) ? s.map((f) => f && typeof f == "object" ? _.get(d(f)) || null : _.get(String(f))).filter(Boolean) : [], [s, _, d]), Y = se(() => {
3585
+ }, [a, d]), U = se(() => 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 = se(() => {
3582
3586
  if (!E) return a;
3583
3587
  const f = E.toLowerCase();
3584
3588
  return a.filter((C) => g(C).toLowerCase().includes(f));
3585
3589
  }, [a, E, g]);
3586
3590
  te(() => {
3587
- N === "server" && E.length >= v && E !== M.current && (M.current = E, y && y(E));
3591
+ N === "server" && E.length >= v && E !== O.current && (O.current = E, y && y(E));
3588
3592
  }, [E, N, v, y]);
3589
3593
  const q = N === "client" ? Y : a, T = () => {
3590
3594
  if (!U.length)
3591
3595
  return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
3592
3596
  const f = U.slice(0, u), C = U.length - u;
3593
3597
  return /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2", children: [
3594
- f.map((O) => /* @__PURE__ */ e(
3598
+ f.map((P) => /* @__PURE__ */ e(
3595
3599
  "span",
3596
3600
  {
3597
3601
  className: "px-2 py-1 text-xs font-medium text-white bg-gray-800 rounded-full",
3598
- children: g(O)
3602
+ children: g(P)
3599
3603
  },
3600
- d(O)
3604
+ d(P)
3601
3605
  )),
3602
3606
  C > 0 && /* @__PURE__ */ n("span", { className: "px-2 py-1 text-xs font-medium text-gray-600 bg-gray-200 rounded-full", children: [
3603
3607
  "+",
@@ -3607,7 +3611,7 @@ function tt({
3607
3611
  ] });
3608
3612
  };
3609
3613
  return /* @__PURE__ */ e(Z, { value: U, onChange: (f) => {
3610
- const C = Array.from(new Set(f.map((O) => d(O))));
3614
+ const C = Array.from(new Set(f.map((P) => d(P))));
3611
3615
  h !== -1 && C.length > h || i(C);
3612
3616
  }, multiple: !0, by: "id", children: ({ open: f }) => /* @__PURE__ */ n("div", { children: [
3613
3617
  /* @__PURE__ */ e(
@@ -3655,7 +3659,7 @@ function tt({
3655
3659
  ) }),
3656
3660
  N === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
3657
3661
  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((C) => {
3658
- const O = d(C), R = g(C), D = U.some((p) => d(p) === O), b = h !== -1 && U.length >= h && !D;
3662
+ const P = d(C), R = g(C), D = U.some((p) => d(p) === P), b = h !== -1 && U.length >= h && !D;
3659
3663
  return /* @__PURE__ */ e(
3660
3664
  Z.Option,
3661
3665
  {
@@ -3688,7 +3692,7 @@ function tt({
3688
3692
  )
3689
3693
  ] })
3690
3694
  },
3691
- O
3695
+ P
3692
3696
  );
3693
3697
  })
3694
3698
  ] })
@@ -3852,7 +3856,7 @@ function ls({
3852
3856
  dropId: y,
3853
3857
  indent: r = 24
3854
3858
  }) {
3855
- const { setNodeRef: v, isOver: d } = lr({ id: y }), { attributes: g, listeners: z, setNodeRef: A, transform: E, isDragging: I } = ir({ id: N }), M = E ? { transform: `translate3d(${Math.round(E.x)}px, ${Math.round(E.y)}px, 0)` } : void 0, [_, U] = B(!1), [Y, q] = B(t.name), T = () => {
3859
+ const { setNodeRef: v, isOver: d } = lr({ id: y }), { attributes: g, listeners: z, setNodeRef: A, transform: E, isDragging: I } = ir({ id: N }), O = 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), T = () => {
3856
3860
  const f = Y.trim();
3857
3861
  U(!1), f && f !== t.name ? o?.(t, f) : q(t.name);
3858
3862
  }, x = se(() => /* @__PURE__ */ e(
@@ -3873,14 +3877,14 @@ function ls({
3873
3877
  {
3874
3878
  ref: v,
3875
3879
  className: `tv-row ${d ? "tv-drop-over" : ""} ${I ? "dragging" : ""}`,
3876
- style: { ...M, paddingLeft: 8 + a * r },
3880
+ style: { ...O, paddingLeft: 8 + a * r },
3877
3881
  onClick: (f) => {
3878
3882
  f.target.closest(".tv-toggle") || f.target.tagName === "INPUT" || l?.(t);
3879
3883
  },
3880
3884
  children: [
3881
3885
  /* @__PURE__ */ e("button", { className: "tv-toggle", onClick: i, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(vt, { size: 16 }) : /* @__PURE__ */ e(fe, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
3882
3886
  /* @__PURE__ */ e(Le, { size: 16, className: "tv-folder-ic" }),
3883
- /* @__PURE__ */ e("div", { className: "tv-name", ref: A, children: _ ? /* @__PURE__ */ e(
3887
+ /* @__PURE__ */ e("div", { className: "tv-name", ref: A, children: j ? /* @__PURE__ */ e(
3884
3888
  "input",
3885
3889
  {
3886
3890
  className: "tv-input",
@@ -4008,15 +4012,15 @@ function ql({
4008
4012
  ae.useEffect(() => {
4009
4013
  E(I(z));
4010
4014
  }, [z, I]);
4011
- const M = K(
4015
+ const O = K(
4012
4016
  (b) => E((p) => ({ ...p, [b]: !p[b] })),
4013
4017
  []
4014
- ), [_, U] = B(() => Pe(z));
4018
+ ), [j, U] = B(() => Pe(z));
4015
4019
  ae.useEffect(() => U(Pe(z)), [z]);
4016
4020
  const Y = or(
4017
4021
  cr(hr, { activationConstraint: { delay: 250, tolerance: 5 } })
4018
4022
  ), q = ge(null), [T, x] = B(null), f = ge(0), C = () => {
4019
- }, O = ({ delta: b }) => {
4023
+ }, P = ({ delta: b }) => {
4020
4024
  f.current = b?.x ?? 0;
4021
4025
  }, R = K(
4022
4026
  ({ active: b, over: p }) => {
@@ -4024,30 +4028,30 @@ function ql({
4024
4028
  if (f.current = 0, x(null), !b || !p) return;
4025
4029
  const w = String(b.id).replace(/^drag-/, ""), $ = String(p.id).replace(/^drop-/, "");
4026
4030
  if (!w || !$ || w === $) return;
4027
- let P = $;
4031
+ let M = $;
4028
4032
  const S = Math.max(0, Math.floor(-k / g));
4029
4033
  if (S > 0) {
4030
4034
  let W = $;
4031
4035
  for (let xe = 0; xe < S; xe++) {
4032
- const V = za(_, W, null);
4036
+ const V = za(j, W, null);
4033
4037
  if (!V) break;
4034
4038
  if (!V.parentId) {
4035
- P = a;
4039
+ M = a;
4036
4040
  break;
4037
4041
  }
4038
- P = V.parentId, W = V.parentId;
4042
+ M = V.parentId, W = V.parentId;
4039
4043
  }
4040
4044
  }
4041
- if (d && P === a) {
4045
+ if (d && M === a) {
4042
4046
  U(Pe(z));
4043
4047
  return;
4044
4048
  }
4045
- const L = Pe(_), { newRoots: j, removed: F } = hs(L, w);
4049
+ const L = Pe(j), { newRoots: _, removed: F } = hs(L, w);
4046
4050
  if (!F) return;
4047
- const G = ps(j, P, F);
4048
- U(G), r?.({ sourceId: w, destParentId: P, newTree: G });
4051
+ const G = ps(_, M, F);
4052
+ U(G), r?.({ sourceId: w, destParentId: M, newTree: G });
4049
4053
  },
4050
- [_, z, a, d, g, r]
4054
+ [j, z, a, d, g, r]
4051
4055
  ), D = K(
4052
4056
  (b, p = 0) => b.map((k) => /* @__PURE__ */ n(ae.Fragment, { children: [
4053
4057
  /* @__PURE__ */ e(
@@ -4056,7 +4060,7 @@ function ql({
4056
4060
  node: k,
4057
4061
  depth: p,
4058
4062
  expanded: !!A[k.id],
4059
- onToggle: () => M(k.id),
4063
+ onToggle: () => O(k.id),
4060
4064
  onSelect: o,
4061
4065
  onCreateChild: h,
4062
4066
  onRename: N,
@@ -4069,7 +4073,7 @@ function ql({
4069
4073
  ),
4070
4074
  A[k.id] && k.children?.length > 0 ? D(k.children, p + 1) : null
4071
4075
  ] }, k.id)),
4072
- [A, g, h, y, N, o, v, M]
4076
+ [A, g, h, y, N, o, v, O]
4073
4077
  );
4074
4078
  return ae.useMemo(() => {
4075
4079
  if (!T) return null;
@@ -4082,8 +4086,8 @@ function ql({
4082
4086
  }
4083
4087
  return null;
4084
4088
  }
4085
- return p(_);
4086
- }, [T, _]), /* @__PURE__ */ n("div", { className: "tv", children: [
4089
+ return p(j);
4090
+ }, [T, j]), /* @__PURE__ */ n("div", { className: "tv", children: [
4087
4091
  s !== !1 && /* @__PURE__ */ n("div", { className: "tv-header", children: [
4088
4092
  /* @__PURE__ */ e("div", { className: "tv-title", children: s }),
4089
4093
  /* @__PURE__ */ e("button", { className: "tv-btn", onClick: u, children: "+ New folder" })
@@ -4099,10 +4103,10 @@ function ql({
4099
4103
  collisionDetection: ur,
4100
4104
  sensors: Y,
4101
4105
  onDragStart: C,
4102
- onDragMove: O,
4106
+ onDragMove: P,
4103
4107
  onDragEnd: R,
4104
4108
  modifiers: [mr],
4105
- children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: D(_, 0) })
4109
+ children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: D(j, 0) })
4106
4110
  }
4107
4111
  )
4108
4112
  ] });
@@ -4707,7 +4711,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4707
4711
  const p = [...b];
4708
4712
  return p[R][x.key] = D, p;
4709
4713
  });
4710
- }, C = (R) => i[l.key]?.[R]?.[x.key], O = (R) => {
4714
+ }, C = (R) => i[l.key]?.[R]?.[x.key], P = (R) => {
4711
4715
  const D = C(R);
4712
4716
  return D ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: D }) : null;
4713
4717
  };
@@ -4724,7 +4728,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4724
4728
  className: `w-full ${C(D) ? "border-red-500" : ""}`
4725
4729
  }
4726
4730
  ),
4727
- O(D)
4731
+ P(D)
4728
4732
  ] });
4729
4733
  case "textarea":
4730
4734
  return (R, D) => /* @__PURE__ */ n("div", { children: [
@@ -4739,7 +4743,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4739
4743
  rows: 3
4740
4744
  }
4741
4745
  ),
4742
- O(D)
4746
+ P(D)
4743
4747
  ] });
4744
4748
  case "number":
4745
4749
  return (R, D) => /* @__PURE__ */ n("div", { children: [
@@ -4772,7 +4776,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4772
4776
  "Max: ",
4773
4777
  x.max
4774
4778
  ] }),
4775
- O(D)
4779
+ P(D)
4776
4780
  ] });
4777
4781
  case "email":
4778
4782
  return (R, D) => /* @__PURE__ */ n("div", { children: [
@@ -4787,7 +4791,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4787
4791
  className: `w-full ${C(D) ? "border-red-500" : ""}`
4788
4792
  }
4789
4793
  ),
4790
- O(D)
4794
+ P(D)
4791
4795
  ] });
4792
4796
  case "url":
4793
4797
  return (R, D) => /* @__PURE__ */ n("div", { children: [
@@ -4802,7 +4806,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4802
4806
  className: `w-full ${C(D) ? "border-red-500" : ""}`
4803
4807
  }
4804
4808
  ),
4805
- O(D)
4809
+ P(D)
4806
4810
  ] });
4807
4811
  case "password":
4808
4812
  return (R, D) => /* @__PURE__ */ n("div", { children: [
@@ -4817,7 +4821,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4817
4821
  className: `w-full ${C(D) ? "border-red-500" : ""}`
4818
4822
  }
4819
4823
  ),
4820
- O(D)
4824
+ P(D)
4821
4825
  ] });
4822
4826
  case "select":
4823
4827
  case "dropdown":
@@ -4833,7 +4837,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4833
4837
  className: `w-full ${C(D) ? "border-red-500" : ""}`
4834
4838
  }
4835
4839
  ),
4836
- O(D)
4840
+ P(D)
4837
4841
  ] });
4838
4842
  case "selectDynamic":
4839
4843
  return (R, D) => {
@@ -4841,10 +4845,10 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4841
4845
  if (x.optionsFrom && a) {
4842
4846
  const { config: p, valueField: k, labelField: w } = x.optionsFrom, $ = a[p] || [];
4843
4847
  if (Array.isArray($))
4844
- return $.map((P) => ({
4845
- id: P[k] || "",
4846
- value: P[k] || "",
4847
- label: P[w] || ""
4848
+ return $.map((M) => ({
4849
+ id: M[k] || "",
4850
+ value: M[k] || "",
4851
+ label: M[w] || ""
4848
4852
  }));
4849
4853
  }
4850
4854
  return x.options || [];
@@ -4863,7 +4867,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4863
4867
  },
4864
4868
  Math.random()
4865
4869
  ),
4866
- O(D)
4870
+ P(D)
4867
4871
  ] });
4868
4872
  };
4869
4873
  case "multiselect":
@@ -5046,7 +5050,7 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5046
5050
  className: `w-full ${C(D) ? "border-red-500" : ""}`
5047
5051
  }
5048
5052
  ),
5049
- O(D)
5053
+ P(D)
5050
5054
  ] });
5051
5055
  }
5052
5056
  }, A = K(() => {
@@ -5056,8 +5060,8 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5056
5060
  id: x.length
5057
5061
  // Assign next available ID
5058
5062
  };
5059
- l.fields.forEach((O) => {
5060
- O.fieldtype === "audience" ? f[O.key] = { users: [], groups: [], roles: [] } : f[O.key] = O.default || "";
5063
+ l.fields.forEach((P) => {
5064
+ P.fieldtype === "audience" ? f[P.key] = { users: [], groups: [], roles: [] } : f[P.key] = P.default || "";
5061
5065
  }), console.log("[DataTableRenderer] New blank row:", f);
5062
5066
  const C = [...x, f];
5063
5067
  return console.log("[DataTableRenderer] Updated data:", C), C;
@@ -5069,22 +5073,22 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5069
5073
  const C = [...f];
5070
5074
  return C.splice(x, 1), C;
5071
5075
  });
5072
- }, []), [I, M] = B(null), _ = K((x, f) => {
5073
- M(f), x.dataTransfer.effectAllowed = "move", x.dataTransfer.setData("text/html", "");
5076
+ }, []), [I, O] = B(null), j = K((x, f) => {
5077
+ O(f), x.dataTransfer.effectAllowed = "move", x.dataTransfer.setData("text/html", "");
5074
5078
  }, []), U = K((x) => {
5075
5079
  x.preventDefault(), x.dataTransfer.dropEffect = "move";
5076
5080
  }, []), Y = K((x, f) => {
5077
5081
  x.preventDefault(), !(I === null || I === f) && (r((C) => {
5078
- const O = [...C], R = O[I];
5079
- return O.splice(I, 1), O.splice(f, 0, R), O;
5080
- }), M(null));
5082
+ const P = [...C], R = P[I];
5083
+ return P.splice(I, 1), P.splice(f, 0, R), P;
5084
+ }), O(null));
5081
5085
  }, [I]), q = K(() => {
5082
- M(null);
5086
+ O(null);
5083
5087
  }, []), T = K((x) => {
5084
5088
  console.log("[DataTableRenderer] handleAddAudience called with:", x), r((f) => {
5085
5089
  const C = [...f];
5086
5090
  if (o !== null && h && C[o]) {
5087
- const O = x.pendingInvites || [], R = O.filter((p) => p.type === "User"), D = O.filter((p) => p.type === "Group"), b = O.filter((p) => p.type === "Role");
5091
+ const P = x.pendingInvites || [], R = P.filter((p) => p.type === "User"), D = P.filter((p) => p.type === "Group"), b = P.filter((p) => p.type === "Role");
5088
5092
  C[o][h] = {
5089
5093
  users: [...C[o][h]?.users || [], ...R],
5090
5094
  groups: [...C[o][h]?.groups || [], ...D],
@@ -5127,13 +5131,13 @@ function fs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5127
5131
  {
5128
5132
  className: `hover:bg-gray-50 ${I === f ? "opacity-50" : ""}`,
5129
5133
  draggable: !0,
5130
- onDragStart: (C) => _(C, f),
5134
+ onDragStart: (C) => j(C, f),
5131
5135
  onDragOver: U,
5132
5136
  onDrop: (C) => Y(C, f),
5133
5137
  onDragEnd: q,
5134
5138
  children: [
5135
5139
  /* @__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(Nt, { size: 16 }) }) }),
5136
- l.fields.map((C, O) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: z(C)(x, f) }, O)),
5140
+ l.fields.map((C, P) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: z(C)(x, f) }, P)),
5137
5141
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
5138
5142
  "button",
5139
5143
  {
@@ -5191,16 +5195,16 @@ function Ns({
5191
5195
  onShowCancelModal: l,
5192
5196
  onCancel: m
5193
5197
  }) {
5194
- const [o, u] = ae.useState(a), [h, N] = ae.useState(null), [y, r] = ae.useState(null), [v, d] = B(!1), [g, z] = B(!1), [A, E] = B({}), I = `${Se()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, M = I, [_, U] = B(1), Y = () => {
5198
+ const [o, u] = ae.useState(a), [h, N] = ae.useState(null), [y, r] = ae.useState(null), [v, d] = B(!1), [g, z] = B(!1), [A, E] = B({}), I = `${Se()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, O = I, [j, U] = B(1), Y = () => {
5195
5199
  if (!y || !h)
5196
5200
  return console.log("[DynamicConfig] hasUnsavedChanges: false (no data)", { originalData: y, data: h }), !1;
5197
5201
  const b = ($) => {
5198
5202
  if ($ == null || typeof $ != "object") return $;
5199
5203
  if (Array.isArray($)) return $.map(b);
5200
- const P = {};
5204
+ const M = {};
5201
5205
  return Object.keys($).sort().forEach((S) => {
5202
- P[S] = b($[S]);
5203
- }), P;
5206
+ M[S] = b($[S]);
5207
+ }), M;
5204
5208
  }, p = b(y), k = b(h), w = JSON.stringify(p) !== JSON.stringify(k);
5205
5209
  return console.log("[DynamicConfig] hasUnsavedChanges:", w, {
5206
5210
  originalData: p,
@@ -5214,8 +5218,8 @@ function Ns({
5214
5218
  const p = {}, k = b?.configuration || {};
5215
5219
  return a.configuration.forEach((w) => {
5216
5220
  if (w.key && w.type === "datatable") {
5217
- const P = (k[w.key] || []).map((S, L) => {
5218
- const j = { id: S.id || 0 };
5221
+ const M = (k[w.key] || []).map((S, L) => {
5222
+ const _ = { id: S.id || 0 };
5219
5223
  return w.fields && w.fields.forEach((F) => {
5220
5224
  if (F.fieldtype === "audience") {
5221
5225
  let G = { users: [], groups: [], roles: [] };
@@ -5223,22 +5227,22 @@ function Ns({
5223
5227
  users: S[F.key].users || [],
5224
5228
  groups: S[F.key].groups || [],
5225
5229
  roles: S[F.key].roles || []
5226
- })), j[F.key] = G;
5230
+ })), _[F.key] = G;
5227
5231
  } else
5228
- j[F.key] = S[F.key] || F.default || "";
5229
- }), j;
5232
+ _[F.key] = S[F.key] || F.default || "";
5233
+ }), _;
5230
5234
  });
5231
- if (P.length === 0) {
5235
+ if (M.length === 0) {
5232
5236
  const S = { id: 0 };
5233
5237
  w.fields && w.fields.forEach((L) => {
5234
5238
  L.fieldtype === "audience" ? S[L.key] = { users: [], groups: [], roles: [] } : S[L.key] = L.default || "";
5235
- }), P.push(S);
5239
+ }), M.push(S);
5236
5240
  }
5237
- p[w.key] = P;
5241
+ p[w.key] = M;
5238
5242
  } else if (w.key) {
5239
5243
  const $ = k[w.key] || {};
5240
- w.type === "section" && w.fields && w.fields.forEach((P) => {
5241
- P.fieldtype === "managecollectionlist" && P.key && (!$[P.key] || !Array.isArray($[P.key])) && ($[P.key] = P.initialData || []);
5244
+ w.type === "section" && w.fields && w.fields.forEach((M) => {
5245
+ M.fieldtype === "managecollectionlist" && M.key && (!$[M.key] || !Array.isArray($[M.key])) && ($[M.key] = M.initialData || []);
5242
5246
  }), p[w.key] = $;
5243
5247
  }
5244
5248
  }), p;
@@ -5289,7 +5293,7 @@ function Ns({
5289
5293
  }
5290
5294
  };
5291
5295
  a && (u(a), t ? b() : T());
5292
- }, [a, _, t, s]);
5296
+ }, [a, j, t, s]);
5293
5297
  const x = (b, p) => {
5294
5298
  console.log(`[DynamicConfig] handleSectionChange called for ${b}:`, p), N((k) => {
5295
5299
  const w = {
@@ -5319,21 +5323,21 @@ function Ns({
5319
5323
  else if (p.type === "datatable") {
5320
5324
  const k = h[p.key];
5321
5325
  Array.isArray(k) && k.forEach((w, $) => {
5322
- p.fields.forEach((P) => {
5323
- const S = w[P.key];
5324
- if (P.required && (!S || typeof S == "string" && S.trim() === "")) {
5325
- b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][P.key] = `${P.label} is required`;
5326
+ p.fields.forEach((M) => {
5327
+ const S = w[M.key];
5328
+ if (M.required && (!S || typeof S == "string" && S.trim() === "")) {
5329
+ b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][M.key] = `${M.label} is required`;
5326
5330
  return;
5327
5331
  }
5328
- if (P.fieldtype === "number" && S !== "" && S !== null && S !== void 0) {
5332
+ if (M.fieldtype === "number" && S !== "" && S !== null && S !== void 0) {
5329
5333
  const L = Number(S);
5330
- isNaN(L) ? (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][P.key] = `${P.label} must be a valid number`) : (P.min !== void 0 && L < P.min && (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][P.key] = `${P.label} must be at least ${P.min}`), P.max !== void 0 && L > P.max && (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][P.key] = `${P.label} must not exceed ${P.max}`));
5334
+ isNaN(L) ? (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][M.key] = `${M.label} must be a valid number`) : (M.min !== void 0 && L < M.min && (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][M.key] = `${M.label} must be at least ${M.min}`), M.max !== void 0 && L > M.max && (b[p.key] || (b[p.key] = {}), b[p.key][$] || (b[p.key][$] = {}), b[p.key][$][M.key] = `${M.label} must not exceed ${M.max}`));
5331
5335
  }
5332
5336
  });
5333
5337
  });
5334
5338
  }
5335
5339
  }), b;
5336
- }, C = (b) => Object.keys(b).length > 0, O = () => {
5340
+ }, C = (b) => Object.keys(b).length > 0, P = () => {
5337
5341
  if (g) {
5338
5342
  console.log("[handleSave] Already saving, ignoring duplicate call");
5339
5343
  return;
@@ -5344,8 +5348,8 @@ function Ns({
5344
5348
  let k = [];
5345
5349
  Object.keys(b).forEach((w) => {
5346
5350
  typeof b[w] == "object" && Object.keys(b[w]).forEach(($) => {
5347
- typeof b[w][$] == "object" ? Object.keys(b[w][$]).forEach((P) => {
5348
- k.push(`${w} row ${parseInt($) + 1}: ${b[w][$][P]}`);
5351
+ typeof b[w][$] == "object" ? Object.keys(b[w][$]).forEach((M) => {
5352
+ k.push(`${w} row ${parseInt($) + 1}: ${b[w][$][M]}`);
5349
5353
  }) : k.push(`${w}: ${b[w][$]}`);
5350
5354
  });
5351
5355
  });
@@ -5356,25 +5360,25 @@ function Ns({
5356
5360
  z(!0);
5357
5361
  const k = {};
5358
5362
  h && Object.keys(h).forEach(($) => {
5359
- const P = a?.configuration?.find(
5363
+ const M = a?.configuration?.find(
5360
5364
  (S) => S.key === $ && S.type === "datatable"
5361
5365
  );
5362
- P && Array.isArray(h[$]) ? k[$] = h[$].map((S) => {
5366
+ M && Array.isArray(h[$]) ? k[$] = h[$].map((S) => {
5363
5367
  const L = { id: S.id || 0 };
5364
- return P.fields && P.fields.forEach((j) => {
5365
- if (j.fieldtype === "audience") {
5368
+ return M.fields && M.fields.forEach((_) => {
5369
+ if (_.fieldtype === "audience") {
5366
5370
  let F = { users: [], groups: [], roles: [] };
5367
- S[j.key] && typeof S[j.key] == "object" && !Array.isArray(S[j.key]) && (F = {
5368
- users: S[j.key].users || [],
5369
- groups: S[j.key].groups || [],
5370
- roles: S[j.key].roles || []
5371
- }), L[j.key] = F;
5371
+ S[_.key] && typeof S[_.key] == "object" && !Array.isArray(S[_.key]) && (F = {
5372
+ users: S[_.key].users || [],
5373
+ groups: S[_.key].groups || [],
5374
+ roles: S[_.key].roles || []
5375
+ }), L[_.key] = F;
5372
5376
  } else
5373
- L[j.key] = S[j.key] || "";
5377
+ L[_.key] = S[_.key] || "";
5374
5378
  }), L;
5375
5379
  }) : k[$] = h[$];
5376
5380
  }), (!k.appkey || k.appkey === "") && (k.appkey = t);
5377
- let w = await yt(M, k);
5381
+ let w = await yt(O, k);
5378
5382
  if (w && w.status != "fail") {
5379
5383
  E({}), r(JSON.parse(JSON.stringify(h)));
5380
5384
  const $ = w.message || "Configuration has been saved successfully";
@@ -5435,7 +5439,7 @@ function Ns({
5435
5439
  oe,
5436
5440
  {
5437
5441
  category: "primary",
5438
- onClick: O,
5442
+ onClick: P,
5439
5443
  disabled: g,
5440
5444
  label: g ? "Saving..." : "Save",
5441
5445
  type: "submit"
@@ -5457,10 +5461,10 @@ const Jl = ({
5457
5461
  configuration: r = []
5458
5462
  } = t, v = se(() => r.map((f) => {
5459
5463
  if (f.type === "section" && f.fields) {
5460
- const C = [...f.fields], O = C.findIndex((R) => R && R.key === "appkey");
5461
- if (O !== -1) {
5462
- const R = C[O];
5463
- if (C[O] = {
5464
+ const C = [...f.fields], P = C.findIndex((R) => R && R.key === "appkey");
5465
+ if (P !== -1) {
5466
+ const R = C[P];
5467
+ if (C[P] = {
5464
5468
  ...R,
5465
5469
  default: a,
5466
5470
  value: a,
@@ -5484,7 +5488,7 @@ const Jl = ({
5484
5488
  placeholder: "Enter display name",
5485
5489
  required: !1
5486
5490
  };
5487
- C.splice(O + 1, 0, b);
5491
+ C.splice(P + 1, 0, b);
5488
5492
  }
5489
5493
  }
5490
5494
  return {
@@ -5510,11 +5514,11 @@ const Jl = ({
5510
5514
  console.log("Configuration changed:", f);
5511
5515
  }, []), I = K(() => {
5512
5516
  window.history.back();
5513
- }, []), M = (() => {
5517
+ }, []), O = (() => {
5514
5518
  if (h.headingKey && Array.isArray(r)) {
5515
- const f = h.headingKey.split("."), C = f[0], O = f[1], R = r.find((D) => D && D.key === C);
5519
+ const f = h.headingKey.split("."), C = f[0], P = f[1], R = r.find((D) => D && D.key === C);
5516
5520
  if (R && R.fields) {
5517
- const D = R.fields.find((b) => b && b.key === O);
5521
+ const D = R.fields.find((b) => b && b.key === P);
5518
5522
  if (D)
5519
5523
  return D.default ?? D.value ?? h.heading ?? a;
5520
5524
  }
@@ -5522,16 +5526,16 @@ const Jl = ({
5522
5526
  if (Array.isArray(r)) {
5523
5527
  for (const f of r)
5524
5528
  if (f && f.fields) {
5525
- const C = f.fields.find((O) => O && O.key === "displayname");
5529
+ const C = f.fields.find((P) => P && P.key === "displayname");
5526
5530
  if (C) return C.default ?? C.value ?? a;
5527
5531
  }
5528
5532
  }
5529
5533
  return h.heading || a;
5530
- })(), _ = {
5534
+ })(), j = {
5531
5535
  subHeading: "Application configuration and details",
5532
5536
  tags: [],
5533
5537
  ...h,
5534
- heading: M
5538
+ heading: O
5535
5539
  // Use resolvedDisplayName only
5536
5540
  }, U = {
5537
5541
  about: "This application provides comprehensive functionality for your organization.",
@@ -5586,11 +5590,11 @@ const Jl = ({
5586
5590
  ] }),
5587
5591
  /* @__PURE__ */ n("section", { children: [
5588
5592
  /* @__PURE__ */ e("h3", { className: "text-lg font-semibold mb-4", children: "Key Features" }),
5589
- /* @__PURE__ */ e("ul", { className: "space-y-3", children: f.features.map((C, O) => /* @__PURE__ */ n("li", { children: [
5593
+ /* @__PURE__ */ e("ul", { className: "space-y-3", children: f.features.map((C, P) => /* @__PURE__ */ n("li", { children: [
5590
5594
  /* @__PURE__ */ e("span", { className: "font-semibold", children: C.title }),
5591
5595
  /* @__PURE__ */ e("br", {}),
5592
5596
  /* @__PURE__ */ e("span", { className: "text-gray-700", children: C.description })
5593
- ] }, O)) })
5597
+ ] }, P)) })
5594
5598
  ] })
5595
5599
  ] });
5596
5600
  }
@@ -5606,11 +5610,11 @@ const Jl = ({
5606
5610
  }
5607
5611
  ),
5608
5612
  /* @__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: [
5609
- /* @__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: T(_.icon) }),
5613
+ /* @__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: T(j.icon) }),
5610
5614
  /* @__PURE__ */ n("div", { className: "flex flex-col min-w-0", children: [
5611
- /* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: _.heading }),
5612
- /* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: _.subHeading }),
5613
- /* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: _.tags && _.tags.map((f, C) => /* @__PURE__ */ e(
5615
+ /* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: j.heading }),
5616
+ /* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: j.subHeading }),
5617
+ /* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: j.tags && j.tags.map((f, C) => /* @__PURE__ */ e(
5614
5618
  "span",
5615
5619
  {
5616
5620
  className: "pill inline-block px-[10px] py-[6px] rounded-[14px] text-[11px] border border-[#e6e9ee] text-[#767676] font-semibold mt-1",
@@ -5655,11 +5659,11 @@ const Jl = ({
5655
5659
  allowReorder: o = !0,
5656
5660
  initialData: u = null
5657
5661
  }) => {
5658
- const [h, N] = B(null), [y, r] = B(""), [v, d] = B(() => Array.isArray(u) ? u : []), [g, z] = B(null), [A, E] = B(null), [I, M] = B("");
5662
+ const [h, N] = B(null), [y, r] = B(""), [v, d] = B(() => Array.isArray(u) ? u : []), [g, z] = B(null), [A, E] = B(null), [I, O] = B("");
5659
5663
  te(() => {
5660
5664
  Array.isArray(u) && d(u);
5661
5665
  }, [u]);
5662
- const _ = (p) => {
5666
+ const j = (p) => {
5663
5667
  l && (N(p._id), r(p.categoryName || ""));
5664
5668
  }, U = () => {
5665
5669
  if (!i || h !== null) return;
@@ -5694,23 +5698,23 @@ const Jl = ({
5694
5698
  return a?.(w), w;
5695
5699
  });
5696
5700
  }, x = (p, k, w) => {
5697
- const $ = Number(k), P = Number(w);
5698
- if (!o || $ === P) return p;
5699
- const S = p.findIndex((G) => Number(G._id) === $), L = p.findIndex((G) => Number(G._id) === P);
5701
+ const $ = Number(k), M = Number(w);
5702
+ if (!o || $ === M) return p;
5703
+ const S = p.findIndex((G) => Number(G._id) === $), L = p.findIndex((G) => Number(G._id) === M);
5700
5704
  if (S === -1 || L === -1) return p;
5701
- const j = [...p], [F] = j.splice(S, 1);
5702
- return j.splice(L, 0, F), j.map((G, W) => ({ ...G, order: W + 1 }));
5705
+ const _ = [...p], [F] = _.splice(S, 1);
5706
+ return _.splice(L, 0, F), _.map((G, W) => ({ ...G, order: W + 1 }));
5703
5707
  }, f = (p, k) => {
5704
5708
  o && (p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", String(k)), z(Number(k)));
5705
5709
  }, C = (p) => {
5706
5710
  g && p !== A && E(p);
5707
- }, O = (p) => {
5711
+ }, P = (p) => {
5708
5712
  p.preventDefault();
5709
5713
  }, R = (p, k) => {
5710
5714
  p.preventDefault();
5711
- const w = p.dataTransfer.getData("text/plain"), $ = w === "0" ? 0 : Number(w), P = k === "0" ? 0 : Number(k);
5712
- $ === void 0 || P === void 0 || (d((S) => {
5713
- const L = x(S, $, P);
5715
+ const w = p.dataTransfer.getData("text/plain"), $ = w === "0" ? 0 : Number(w), M = k === "0" ? 0 : Number(k);
5716
+ $ === void 0 || M === void 0 || (d((S) => {
5717
+ const L = x(S, $, M);
5714
5718
  return a?.(L), L;
5715
5719
  }), z(null), E(null));
5716
5720
  }, D = () => {
@@ -5724,7 +5728,7 @@ const Jl = ({
5724
5728
  he,
5725
5729
  {
5726
5730
  value: I,
5727
- onDebouncedChange: M,
5731
+ onDebouncedChange: O,
5728
5732
  placeholder: "Search Collection",
5729
5733
  customClass: "mr-4 searchmanagecollection"
5730
5734
  }
@@ -5743,18 +5747,18 @@ const Jl = ({
5743
5747
  )
5744
5748
  ] }) }),
5745
5749
  /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: b.map((p) => {
5746
- const k = h === p._id, w = p?.links?.length ?? 0, $ = g === p._id, P = A === p._id && g !== p._id;
5750
+ const k = h === p._id, w = p?.links?.length ?? 0, $ = g === p._id, M = A === p._id && g !== p._id;
5747
5751
  return /* @__PURE__ */ e(
5748
5752
  "div",
5749
5753
  {
5750
5754
  onDragEnter: () => C(p._id),
5751
- onDragOver: O,
5755
+ onDragOver: P,
5752
5756
  onDrop: (S) => R(S, p._id),
5753
5757
  onDragEnd: D,
5754
5758
  className: [
5755
5759
  "flex items-center justify-between p-3 border rounded-2xl mb-3",
5756
5760
  "border-gray-300",
5757
- P ? "ring-2 ring-gray-800/20" : "",
5761
+ M ? "ring-2 ring-gray-800/20" : "",
5758
5762
  $ ? "opacity-60" : ""
5759
5763
  ].join(" "),
5760
5764
  children: k ? /* @__PURE__ */ n(ee, { children: [
@@ -5818,7 +5822,7 @@ const Jl = ({
5818
5822
  "button",
5819
5823
  {
5820
5824
  className: "cursor-pointer",
5821
- onClick: () => _(p),
5825
+ onClick: () => j(p),
5822
5826
  "aria-label": `Edit ${p.categoryName}`,
5823
5827
  children: /* @__PURE__ */ e(gr, { color: "#767676" })
5824
5828
  }
@@ -5935,16 +5939,16 @@ const Lt = () => {
5935
5939
  searchPlaceholder: E = "Search...",
5936
5940
  handleRefreshClick: I = () => {
5937
5941
  },
5938
- handleSearchChange: M = () => {
5942
+ handleSearchChange: O = () => {
5939
5943
  },
5940
5944
  // Optional: override export file names
5941
- excelFileName: _,
5945
+ excelFileName: j,
5942
5946
  pdfFileName: U,
5943
5947
  searchIconSize: Y,
5944
5948
  searchIconClass: q,
5945
5949
  inputStyle: T
5946
5950
  }) => {
5947
- const x = () => l?.current || i?.current, [f, C] = ae.useState(""), O = (t || "export").toString().trim() || "export", R = `${_ || O}.xlsx`, D = `${U || O}.pdf`, b = (w, $, P) => Math.max($, Math.min(w, P)), p = K(
5951
+ const x = () => l?.current || i?.current, [f, C] = ae.useState(""), P = (t || "export").toString().trim() || "export", R = `${j || P}.xlsx`, D = `${U || P}.pdf`, b = (w, $, M) => Math.max($, Math.min(w, M)), p = K(
5948
5952
  (w) => {
5949
5953
  const $ = x();
5950
5954
  if ($?.openColumnChooser) {
@@ -5953,12 +5957,12 @@ const Lt = () => {
5953
5957
  return;
5954
5958
  }
5955
5959
  try {
5956
- const P = w.currentTarget.getBoundingClientRect(), S = P.left + window.scrollX, L = P.bottom + window.scrollY;
5957
- let j = S - 120, F = L - 120;
5960
+ const M = w.currentTarget.getBoundingClientRect(), S = M.left + window.scrollX, L = M.bottom + window.scrollY;
5961
+ let _ = S - 120, F = L - 120;
5958
5962
  const G = window.innerWidth, W = window.innerHeight;
5959
- j = b(j, window.scrollX + 8, window.scrollX + G - 340), F = b(F, window.scrollY, window.scrollY + W - 120), $.openColumnChooser(j, F);
5960
- } catch (P) {
5961
- console.log("coloumn choose error", P);
5963
+ _ = b(_, window.scrollX + 8, window.scrollX + G - 340), F = b(F, window.scrollY, window.scrollY + W - 120), $.openColumnChooser(_, F);
5964
+ } catch (M) {
5965
+ console.log("coloumn choose error", M);
5962
5966
  }
5963
5967
  }
5964
5968
  },
@@ -5966,23 +5970,23 @@ const Lt = () => {
5966
5970
  // no external deps; reads ref at call time
5967
5971
  ), k = K(
5968
5972
  (w, $) => {
5969
- const P = x();
5970
- if (P)
5973
+ const M = x();
5974
+ if (M)
5971
5975
  switch (w) {
5972
5976
  case "Delete":
5973
- N && P.deleteRecords?.();
5977
+ N && M.deleteRecords?.();
5974
5978
  break;
5975
5979
  case "ColumnChooser":
5976
- y && ($ ? p($) : P.openColumnChooser?.());
5980
+ y && ($ ? p($) : M.openColumnChooser?.());
5977
5981
  break;
5978
5982
  case "Print":
5979
- v && P.print?.();
5983
+ v && M.print?.();
5980
5984
  break;
5981
5985
  case "Excel":
5982
- d && P.excelExport?.({ fileName: R });
5986
+ d && M.excelExport?.({ fileName: R });
5983
5987
  break;
5984
5988
  case "Pdf":
5985
- g && P.pdfExport?.({ fileName: D });
5989
+ g && M.pdfExport?.({ fileName: D });
5986
5990
  break;
5987
5991
  case "Refresh":
5988
5992
  z && I();
@@ -6007,7 +6011,7 @@ const Lt = () => {
6007
6011
  placeholder: E,
6008
6012
  value: f,
6009
6013
  onDebouncedChange: (w) => {
6010
- C(w), M(w);
6014
+ C(w), O(w);
6011
6015
  },
6012
6016
  searchIconSize: Y || 16,
6013
6017
  searchIconClass: q || "",
@@ -6110,8 +6114,8 @@ function Ql(t) {
6110
6114
  selectionSettings: A = { type: "Multiple", mode: "Row" },
6111
6115
  enableCheckbox: E = !1,
6112
6116
  columns: I = [],
6113
- onGridStateChange: M,
6114
- onRowSelected: _,
6117
+ onGridStateChange: O,
6118
+ onRowSelected: j,
6115
6119
  onRowDeselected: U,
6116
6120
  onRowDoubleClick: Y,
6117
6121
  apiRef: q,
@@ -6119,8 +6123,8 @@ function Ql(t) {
6119
6123
  } = t, x = ge(null), {
6120
6124
  pageSettings: f,
6121
6125
  sortSettings: C,
6122
- ...O
6123
- } = T || {}, [R, D] = ae.useState(f?.page || 1), [b, p] = ae.useState(C?.pageSize || 20), [k, w] = ae.useState(C?.sortKey || "updatedDate"), [$, P] = ae.useState(C?.direction || "Descending"), S = se(() => {
6126
+ ...P
6127
+ } = T || {}, [R, D] = ae.useState(f?.page || 1), [b, p] = ae.useState(C?.pageSize || 20), [k, w] = ae.useState(C?.sortKey || "updatedDate"), [$, M] = ae.useState(C?.direction || "Descending"), S = se(() => {
6124
6128
  const V = [an];
6125
6129
  return o && V.push(rn), u && V.push(nn), h && V.push(sn), g && V.push(ln), r && V.push(on), v && V.push(cn), d && V.push(dn), y && V.push(mn), N && V.push(un), V.push(hn), V;
6126
6130
  }, [o, u, h, g, r, v, d, y, N]), L = se(() => {
@@ -6154,13 +6158,13 @@ function Ql(t) {
6154
6158
  }, [q, L]), te(() => () => {
6155
6159
  q && (q.current = null);
6156
6160
  }, []);
6157
- const j = (V) => {
6161
+ const _ = (V) => {
6158
6162
  const re = String(V || "");
6159
6163
  return re === "Ascending" || re === "Descending" ? re : re.toLowerCase() === "ascending" ? "Ascending" : "Descending";
6160
6164
  }, F = (V) => {
6161
- const re = x.current, J = V?.requestType, ve = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Ee = V?.pageSize ?? re?.pageSettings?.pageSize ?? b, je = V?.currentPage ?? re?.pageSettings?.currentPage ?? l, at = V?.columnName && V?.direction ? [{ field: V.columnName, dir: j(V.direction) }] : (re?.sortSettings?.columns || []).map((Re) => ({
6165
+ const re = x.current, J = V?.requestType, ve = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Ee = V?.pageSize ?? re?.pageSettings?.pageSize ?? b, je = V?.currentPage ?? re?.pageSettings?.currentPage ?? l, at = V?.columnName && V?.direction ? [{ field: V.columnName, dir: _(V.direction) }] : (re?.sortSettings?.columns || []).map((Re) => ({
6162
6166
  field: Re.field,
6163
- dir: j(Re.direction ?? Re.dir)
6167
+ dir: _(Re.direction ?? Re.dir)
6164
6168
  })), rt = V?.searchString ?? "", nt = V?.columns ?? re?.filterSettings?.columns ?? [];
6165
6169
  return {
6166
6170
  reason: ve,
@@ -6174,7 +6178,7 @@ function Ql(t) {
6174
6178
  }, G = (V) => {
6175
6179
  setTimeout(() => {
6176
6180
  x?.current?.hideSpinner();
6177
- }, 1e3), V.requestType === "paging" && (D(V.currentPage), p(V.pageSize)), V.requestType === "sorting" && (w(V.columnName || "updatedDate"), P(V.direction === "Ascending" ? "ASC" : "DESC")), M && M(F(V), V);
6181
+ }, 1e3), V.requestType === "paging" && (D(V.currentPage), p(V.pageSize)), V.requestType === "sorting" && (w(V.columnName || "updatedDate"), M(V.direction === "Ascending" ? "ASC" : "DESC")), O && O(F(V), V);
6178
6182
  }, W = (V) => {
6179
6183
  typeof Y == "function" && Y(V?.rowData, V);
6180
6184
  }, xe = () => {
@@ -6244,14 +6248,14 @@ function Ql(t) {
6244
6248
  selectionSettings: A,
6245
6249
  pageSettings: { pageSize: 10, pageSizes: f?.pageSizes ?? [20, 40, 60, 80, 100] },
6246
6250
  sortSettings: C ?? {
6247
- columns: [{ field: k, direction: j($) }],
6251
+ columns: [{ field: k, direction: _($) }],
6248
6252
  allowUnsort: !1
6249
6253
  },
6250
6254
  actionBegin: G,
6251
- rowSelected: _,
6255
+ rowSelected: j,
6252
6256
  rowDeselected: U,
6253
6257
  recordDoubleClick: W,
6254
- ...O,
6258
+ ...P,
6255
6259
  children: [
6256
6260
  /* @__PURE__ */ e(gn, { children: xe() }),
6257
6261
  /* @__PURE__ */ e(bn, { services: S })
@@ -7004,7 +7008,7 @@ function _s({
7004
7008
  ev: E,
7005
7009
  sizeMeta: d,
7006
7010
  isSelected: I === N,
7007
- onClick: (M) => z(M, I)
7011
+ onClick: (O) => z(O, I)
7008
7012
  },
7009
7013
  E._id || E.id || I
7010
7014
  )) }),
@@ -7018,7 +7022,7 @@ function _s({
7018
7022
  ev: E,
7019
7023
  sizeMeta: d,
7020
7024
  isSelected: I === N,
7021
- onClick: (M) => z(M, I)
7025
+ onClick: (O) => z(O, I)
7022
7026
  },
7023
7027
  E._id || E.id || I
7024
7028
  )) })
@@ -7194,14 +7198,14 @@ function Ys({
7194
7198
  onPin: N,
7195
7199
  ...y
7196
7200
  }) {
7197
- const [r, v] = B(u), d = ce(t), g = de[d], z = Gs[d], A = (M, _) => {
7198
- v(_), i?.(M);
7199
- }, E = (M) => {
7200
- const _ = { ...M, starred: !M.starred };
7201
- h?.(_);
7202
- }, I = (M) => {
7203
- const _ = { ...M, pinned: !M.pinned };
7204
- N?.(_);
7201
+ const [r, v] = B(u), d = ce(t), g = de[d], z = Gs[d], A = (O, j) => {
7202
+ v(j), i?.(O);
7203
+ }, E = (O) => {
7204
+ const j = { ...O, starred: !O.starred };
7205
+ h?.(j);
7206
+ }, I = (O) => {
7207
+ const j = { ...O, pinned: !O.pinned };
7208
+ N?.(j);
7205
7209
  };
7206
7210
  return /* @__PURE__ */ n(
7207
7211
  ie,
@@ -7216,17 +7220,17 @@ function Ys({
7216
7220
  children: [
7217
7221
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${g.title}`, children: m }) }),
7218
7222
  /* @__PURE__ */ e(he, { placeholder: "Type to search..." }),
7219
- /* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((M, _) => /* @__PURE__ */ e(
7223
+ /* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((O, j) => /* @__PURE__ */ e(
7220
7224
  qs,
7221
7225
  {
7222
- email: M,
7226
+ email: O,
7223
7227
  sizeMeta: z,
7224
- isSelected: _ === r,
7225
- onClick: (U) => A(U, _),
7228
+ isSelected: j === r,
7229
+ onClick: (U) => A(U, j),
7226
7230
  onStar: E,
7227
7231
  onPin: I
7228
7232
  },
7229
- M._id || M.id || _
7233
+ O._id || O.id || j
7230
7234
  )) }),
7231
7235
  /* @__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" }) })
7232
7236
  ]
@@ -7469,7 +7473,7 @@ function Qs({
7469
7473
  contact: E,
7470
7474
  sizeMeta: d,
7471
7475
  isSelected: I === N,
7472
- onClick: (M) => g(M, I)
7476
+ onClick: (O) => g(O, I)
7473
7477
  },
7474
7478
  E._id || E.id || I
7475
7479
  )) }),
@@ -7488,7 +7492,7 @@ function Qs({
7488
7492
  contact: E,
7489
7493
  sizeMeta: d,
7490
7494
  isSelected: I === N,
7491
- onClick: (M) => g(M, I)
7495
+ onClick: (O) => g(O, I)
7492
7496
  },
7493
7497
  E._id || E.id || I
7494
7498
  )) })
@@ -8209,7 +8213,7 @@ function ul({
8209
8213
  ...h
8210
8214
  }) {
8211
8215
  const [N, y] = B(o), r = ce(t), v = de[r], d = ol[r], g = (E) => {
8212
- y((I) => I.filter((M) => M.id !== E.id));
8216
+ y((I) => I.filter((O) => O.id !== E.id));
8213
8217
  }, z = N.find((E) => E.type === "banner"), A = N.filter((E) => E.type !== "banner");
8214
8218
  return /* @__PURE__ */ n(
8215
8219
  ie,