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