@realtek/core-theme 0.0.165 → 0.0.166

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-lib/index.js CHANGED
@@ -7960,7 +7960,7 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
7960
7960
  }), [He, Ue] = A({
7961
7961
  sort: "",
7962
7962
  sortDir: ""
7963
- }), [We, Ge] = A([]), [Ke, qe] = A(!1), [Je, Ye] = A([]), Xe = k(null), [Ze, Qe] = A(0);
7963
+ }), [We, Ge] = A([]), [Ke, qe] = A(!1), [Je, Ye] = A([]), Xe = k(null), [Ze, Qe] = A(0), $e = k();
7964
7964
  D(() => {
7965
7965
  let e = Xe.current;
7966
7966
  if (!e || typeof ResizeObserver > "u") return;
@@ -7970,36 +7970,36 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
7970
7970
  });
7971
7971
  return t.observe(e), () => t.disconnect();
7972
7972
  }, []);
7973
- let $e = (e, t) => String(pm(e, t, l)), et = (e, t) => String($e(e, t)) === String(ie ?? ""), tt = (e, t) => {
7974
- let n = $e(e, t);
7973
+ let et = (e, t) => String(pm(e, t, l)), tt = (e, t) => String(et(e, t)) === String(ie ?? ""), nt = (e, t) => {
7974
+ let n = et(e, t);
7975
7975
  n && R?.(e, n);
7976
- }, nt = (e, t) => {
7976
+ }, it = (e, t) => {
7977
7977
  Fe(e), Le(t), le?.(e, t);
7978
- }, [it, at] = A(i), [ot, st] = A(i.length), [ct, lt] = A([]), [ut, dt] = A([]), [ft, pt] = A(""), [mt, ht] = A([]), [gt, _t] = A([]), [vt, bt] = A(!1), [xt, St] = A(null), [Ct, wt] = A(null), [Tt, Et] = A(!1), Dt = !!(C || w || T), kt = Dt ? i : it, At = Dt ? y ?? 0 : ot, jt = Dt ? g : ut, Mt = O(() => kt.some((e) => _p(e)), [kt]), Nt = O(() => jt.some((e) => gp(e)), [jt]), Pt = Mt || Nt ? "card" : L, Ft = t.length > 0 ? t : mt, It = n.length > 0 ? n : gt, Lt = O(() => xm(Ft), [Ft]), Rt = O(() => new Map(bm(Lt).map((e) => [e.key, e])), [Lt]), Bt = O(() => ym(Lt, (e) => {
7978
+ }, [at, ot] = A(i), [st, ct] = A(i.length), [lt, ut] = A([]), [dt, ft] = A([]), [pt, mt] = A(""), [ht, gt] = A([]), [_t, vt] = A([]), [bt, xt] = A(!1), [St, Ct] = A(null), [wt, Tt] = A(null), [Et, Dt] = A(!1), kt = !!(C || w || T), At = kt ? i : at, jt = kt ? y ?? 0 : st, Mt = kt ? g : dt, Nt = O(() => At.some((e) => _p(e)), [At]), Pt = O(() => Mt.some((e) => gp(e)), [Mt]), Ft = Nt || Pt ? "card" : L, It = t.length > 0 ? t : ht, Lt = n.length > 0 ? n : _t, Rt = O(() => xm(It), [It]), Bt = O(() => new Map(bm(Rt).map((e) => [e.key, e])), [Rt]), Vt = O(() => ym(Rt, (e) => {
7979
7979
  let t = kd(e);
7980
7980
  return t === "add" && !U || t === "edit" && !ye || t === "delete" && !be || !_u(e.permission, _e) || e.showInList === !1 ? !1 : e.allowedTabs ? e.allowedTabs.some((e) => lm(e) === lm(Ce)) : !0;
7981
7981
  }), [
7982
- Lt,
7982
+ Rt,
7983
7983
  Ce,
7984
7984
  U,
7985
7985
  ye,
7986
7986
  be,
7987
7987
  _e
7988
- ]), Vt = O(() => ym(Bt, (e) => (Pe.length === 1 || e.allowMultiple || e.danger) && Sm(e, Ie) && !Id(e.key, Ie, It, Ce)), [
7988
+ ]), Ht = O(() => ym(Vt, (e) => (Pe.length === 1 || e.allowMultiple || e.danger) && Sm(e, Ie) && !Id(e.key, Ie, Lt, Ce)), [
7989
7989
  Ce,
7990
- It,
7990
+ Lt,
7991
7991
  Pe.length,
7992
7992
  Ie,
7993
- Bt
7994
- ]), Ht = typeof e == "string" ? e.trim().length > 0 : !!e, Ut = Ht ? `/${_e}-create${re ? `?action=${encodeURIComponent(re)}` : ""}` : "";
7993
+ Vt
7994
+ ]), Ut = typeof e == "string" ? e.trim().length > 0 : !!e, Wt = Ut ? `/${_e}-create${re ? `?action=${encodeURIComponent(re)}` : ""}` : "";
7995
7995
  D(() => {
7996
- Ht && !H && he("/", { replace: !0 });
7996
+ Ut && !H && he("/", { replace: !0 });
7997
7997
  }, [
7998
7998
  H,
7999
- Ht,
7999
+ Ut,
8000
8000
  he
8001
8001
  ]);
8002
- let Wt = (e, { replace: t = !1 } = {}) => {
8002
+ let Gt = (e, { replace: t = !1 } = {}) => {
8003
8003
  let n = new URLSearchParams(Se);
8004
8004
  km(n);
8005
8005
  let r = [n.toString(), e > 1 ? `p${e}` : ""].filter(Boolean).join("&");
@@ -8007,22 +8007,22 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8007
8007
  pathname: ge.pathname,
8008
8008
  search: r ? `?${r}` : ""
8009
8009
  }, { replace: t });
8010
- }, Gt = (e, t) => {
8010
+ }, Kt = (e, t) => {
8011
8011
  Ve((t) => ({
8012
8012
  ...t,
8013
8013
  current: e
8014
- })), Wt(e, t);
8015
- }, Kt = () => {
8016
- Gt(1, { replace: !0 });
8017
- }, { config: qt, loading: Jt, error: Yt } = bd(!Dt && Ht ? e : null), Zt = E((e) => {
8014
+ })), Gt(e, t);
8015
+ }, qt = () => {
8016
+ Kt(1, { replace: !0 });
8017
+ }, { config: Jt, loading: Yt, error: Zt } = bd(!kt && Ut ? e : null), Qt = E((e) => {
8018
8018
  let t = He.sort === e, n = Cm(He.sortDir, t), r = n ? String(e) : "";
8019
8019
  Ue({
8020
8020
  sort: r,
8021
8021
  sortDir: n
8022
- }), typeof T == "function" && T(r, n), Kt();
8022
+ }), typeof T == "function" && T(r, n), qt();
8023
8023
  }, [
8024
8024
  T,
8025
- Kt,
8025
+ qt,
8026
8026
  He.sort,
8027
8027
  He.sortDir
8028
8028
  ]);
@@ -8032,7 +8032,7 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8032
8032
  current: K
8033
8033
  });
8034
8034
  }, [K]), D(() => {
8035
- Dt && Ve((e) => {
8035
+ kt && Ve((e) => {
8036
8036
  let t = Dm(x ?? e.current), n = Number(S) > 0 ? Number(S) : e.pageSize;
8037
8037
  return e.current === t && e.pageSize === n ? e : {
8038
8038
  current: t,
@@ -8042,43 +8042,43 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8042
8042
  }, [
8043
8043
  x,
8044
8044
  S,
8045
- Dt
8045
+ kt
8046
8046
  ]);
8047
- let Qt = ge.state?.refreshTimestamp;
8047
+ let $t = ge.state?.refreshTimestamp;
8048
8048
  D(() => {
8049
- Qt && (nt([], []), ze((e) => e + 1));
8050
- }, [Qt]);
8051
- let $t = O(() => [...Array.isArray(m) ? m : [], ...ct].find((e, t) => String(um(e, t)) === Ce), [
8049
+ $t && (it([], []), ze((e) => e + 1));
8050
+ }, [$t]);
8051
+ let en = O(() => [...Array.isArray(m) ? m : [], ...lt].find((e, t) => String(um(e, t)) === Ce), [
8052
8052
  Ce,
8053
- ct,
8053
+ lt,
8054
8054
  m
8055
- ]), en = $t?.field ?? $t?.fieldName ?? $t?.filterField ?? $t?.dataIndex ?? ft, tn = dm(Ce) ? "" : Ce, nn = !tn && !dm(Ce) && lm(en).length > 0, rn = De.trim().length >= 3, an = rn ? De.trim() : "", on = Me.some((e) => e.field), sn = Em({
8055
+ ]), tn = en?.field ?? en?.fieldName ?? en?.filterField ?? en?.dataIndex ?? pt, nn = dm(Ce) ? "" : Ce, rn = !nn && !dm(Ce) && lm(tn).length > 0, an = De.trim().length >= 3, on = an ? De.trim() : "", sn = Me.some((e) => e.field), cn = Em({
8056
8056
  moduleName: e,
8057
- activeTabScope: tn,
8057
+ activeTabScope: nn,
8058
8058
  pageSize: Be.pageSize,
8059
8059
  sort: He.sort,
8060
8060
  sortDir: He.sortDir,
8061
8061
  queryParams: G
8062
- }), cn = Be.current === 1 && Ct?.key === sn;
8062
+ }), ln = Be.current === 1 && wt?.key === cn;
8063
8063
  D(() => {
8064
- if (Dt) return;
8065
- if (!Ht) {
8066
- at([]), st(0), lt([]), dt([]), pt(""), ht([]), _t([]), St(null);
8064
+ if (kt) return;
8065
+ if (!Ut) {
8066
+ ot([]), ct(0), ut([]), ft([]), mt(""), gt([]), vt([]), Ct(null);
8067
8067
  return;
8068
8068
  }
8069
- let t = !1, n = rn && ot > Be.pageSize, r = n ? ot : Be.pageSize, i = n ? 0 : (Be.current - 1) * Be.pageSize;
8070
- return bt(!(!rn && !on && Be.current === 1 && cn)), St(null), V(e, r, i, {
8071
- scope: tn,
8069
+ let t = !1, n = an && st > Be.pageSize, r = n ? st : Be.pageSize, i = n ? 0 : (Be.current - 1) * Be.pageSize;
8070
+ return xt(!(!an && !sn && Be.current === 1 && ln)), Ct(null), V(e, r, i, {
8071
+ scope: nn,
8072
8072
  sort: He.sort,
8073
8073
  sortDir: He.sortDir,
8074
- search: an,
8074
+ search: on,
8075
8075
  filters: Me,
8076
8076
  queryParams: G
8077
8077
  }).then((n) => {
8078
8078
  if (t) return;
8079
8079
  let { rows: r, total: i, tabs: a, fields: o, tabField: s, actions: c, actionRules: l } = fe(n, e);
8080
- at(r), st(i), lt(a), dt(o), pt(s), ht(c), _t(l), !rn && !on && Be.current === 1 && wt({
8081
- key: sn,
8080
+ ot(r), ct(i), ut(a), ft(o), mt(s), gt(c), vt(l), !an && !sn && Be.current === 1 && Tt({
8081
+ key: cn,
8082
8082
  rows: r,
8083
8083
  total: i,
8084
8084
  tabs: a,
@@ -8088,24 +8088,24 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8088
8088
  actionRules: l
8089
8089
  });
8090
8090
  }).catch((e) => {
8091
- t || (at([]), st(0), lt([]), dt([]), pt(""), ht([]), _t([]), St(e.message), Ht && J.error("Invalid module name or data could not be loaded."));
8091
+ t || (ot([]), ct(0), ut([]), ft([]), mt(""), gt([]), vt([]), Ct(e.message), Ut && J.error("Invalid module name or data could not be loaded."));
8092
8092
  }).finally(() => {
8093
- t || bt(!1);
8093
+ t || xt(!1);
8094
8094
  }), () => {
8095
8095
  t = !0;
8096
8096
  };
8097
8097
  }, [
8098
- an,
8099
- tn,
8100
- Me,
8101
- sn,
8102
- V,
8103
8098
  on,
8104
- rn,
8105
- Ht,
8099
+ nn,
8100
+ Me,
8106
8101
  cn,
8102
+ V,
8103
+ sn,
8104
+ an,
8105
+ Ut,
8106
+ ln,
8107
8107
  e,
8108
- ot,
8108
+ st,
8109
8109
  Be.current,
8110
8110
  Be.pageSize,
8111
8111
  Re,
@@ -8114,8 +8114,8 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8114
8114
  He.sortDir,
8115
8115
  G
8116
8116
  ]);
8117
- let ln = O(() => {
8118
- let e = Dt && Array.isArray(g) && g.length, t = !Dt && Array.isArray(ut) && ut.length, n = !Yt && Array.isArray(qt) && qt.length, r = e ? g : t ? ut : n ? qt : [], i = new Map(ut.map((e) => [up(e), e]).filter(([e]) => e));
8117
+ let un = O(() => {
8118
+ let e = kt && Array.isArray(g) && g.length, t = !kt && Array.isArray(dt) && dt.length, n = !Zt && Array.isArray(Jt) && Jt.length, r = e ? g : t ? dt : n ? Jt : [], i = new Map(dt.map((e) => [up(e), e]).filter(([e]) => e));
8119
8119
  return Bp(r.map((e) => {
8120
8120
  let t = up(e), n = i.get(t) ?? {};
8121
8121
  return {
@@ -8126,71 +8126,67 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8126
8126
  };
8127
8127
  }).filter((e) => e.key && e.label));
8128
8128
  }, [
8129
- qt,
8130
- Yt,
8129
+ Jt,
8130
+ Zt,
8131
8131
  g,
8132
- Dt,
8133
- ut
8134
- ]), un = O(() => ln.filter((e) => typeof e.isVisible == "boolean" ? e.isVisible : typeof e.isVisible == "string" ? e.isVisible.toLowerCase() === "true" : !0).map((e) => ({
8132
+ kt,
8133
+ dt
8134
+ ]), dn = O(() => un.filter((e) => typeof e.isVisible == "boolean" ? e.isVisible : typeof e.isVisible == "string" ? e.isVisible.toLowerCase() === "true" : !0).map((e) => ({
8135
8135
  key: e.key,
8136
8136
  label: e.label
8137
- })), [ln]), dn = un.map((e) => e.key), pn = We.filter((e) => dn.includes(e)), mn = pn.length ? pn : un.slice(0, me).map((e) => e.key), hn = Math.min(me, un.length), gn = mn.length > me, _n = O(() => ln.filter((e) => !e.cardHidden && (e.tableHidden || mn.includes(e.key))), [ln, mn]), vn = O(() => {
8138
- let e = Te.toLowerCase(), t = kt, n = nn ? t.filter((e) => fm(e, Ce, $t, ln, en)) : t, r = N.length ? ln.filter((e) => N.includes(e.key)) : ln;
8137
+ })), [un]), pn = dn.map((e) => e.key), mn = We.filter((e) => pn.includes(e)), hn = mn.length ? mn : dn.slice(0, me).map((e) => e.key), gn = Math.min(me, dn.length), _n = hn.length > me, vn = O(() => un.filter((e) => !e.cardHidden && (e.tableHidden || hn.includes(e.key))), [un, hn]), yn = O(() => {
8138
+ let e = Te.toLowerCase(), t = At, n = rn ? t.filter((e) => fm(e, Ce, en, un, tn)) : t, r = N.length ? un.filter((e) => N.includes(e.key)) : un;
8139
8139
  return !e || e.length < 3 ? n : n.filter((t) => r.some((n) => String(vp(t, n.key)).toLowerCase().includes(e) || Kp(n).some((n) => String(vp(t, n)).toLowerCase().includes(e))));
8140
8140
  }, [
8141
8141
  Ce,
8142
- $t,
8143
8142
  en,
8144
- nn,
8145
- kt,
8146
- ln,
8143
+ tn,
8144
+ rn,
8145
+ At,
8146
+ un,
8147
8147
  Te,
8148
8148
  N
8149
- ]), yn = O(() => {
8150
- if (!rn) return vn;
8149
+ ]), bn = O(() => {
8150
+ if (!an) return yn;
8151
8151
  let e = (Be.current - 1) * Be.pageSize;
8152
- return vn.slice(e, e + Be.pageSize);
8152
+ return yn.slice(e, e + Be.pageSize);
8153
8153
  }, [
8154
- vn,
8155
- rn,
8154
+ yn,
8155
+ an,
8156
8156
  Be.current,
8157
8157
  Be.pageSize
8158
- ]), bn = rn ? vn.length : At, xn = De.trim().length >= 3, Sn = String(vn.length).padStart(2, "0"), Cn = At > 0 || kt.length > 0, wn = Ht ? xt ? "Invalid module name or data could not be loaded." : Yt ? "Field configuration failed to load." : "No data found." : "Please provide a module name to view data.", Tn = O(() => {
8158
+ ]), xn = an ? yn.length : jt, Sn = De.trim().length >= 3, Cn = String(yn.length).padStart(2, "0"), wn = jt > 0 || At.length > 0, Tn = Ut ? St ? "Invalid module name or data could not be loaded." : Zt ? "Field configuration failed to load." : "No data found." : "Please provide a module name to view data.", En = O(() => {
8159
8159
  let t = Array.isArray(m) ? m : [];
8160
- return t.length ? t : ct.length ? ct : [{
8160
+ return t.length ? t : lt.length ? lt : [{
8161
8161
  key: "all",
8162
8162
  title: e ?? "List",
8163
- count: bn
8163
+ count: xn
8164
8164
  }];
8165
8165
  }, [
8166
8166
  e,
8167
- ct,
8168
- bn,
8167
+ lt,
8168
+ xn,
8169
8169
  m
8170
8170
  ]);
8171
8171
  D(() => {
8172
- if (Tn.length && !Tn.some((e) => String(e?.key ?? e?.value ?? e?.id) === Ce)) {
8173
- let e = Tn[0]?.key ?? Tn[0]?.value ?? Tn[0]?.id;
8172
+ if (En.length && !En.some((e) => String(e?.key ?? e?.value ?? e?.id) === Ce)) {
8173
+ let e = En[0]?.key ?? En[0]?.value ?? En[0]?.id;
8174
8174
  e && we(String(e));
8175
8175
  }
8176
- }, [Ce, Tn]), D(() => {
8177
- if (!Dt || !ue || !Tn.length) return;
8178
- let e = Tn.find((e, t) => lm(um(e, t)) === lm(ue)), t = e ? String(um(e)) : "";
8179
- t && t !== Ce && we(t);
8180
- }, [
8181
- Ce,
8182
- Dt,
8183
- Tn,
8184
- ue
8185
- ]);
8186
- let En = (e) => {
8176
+ }, [Ce, En]), D(() => {
8177
+ if (ue === void 0 || !En.length || ue === $e.current) return;
8178
+ $e.current = ue;
8179
+ let e = En.find((e, t) => lm(um(e, t)) === lm(ue)), t = e ? String(um(e)) : "";
8180
+ t && we((e) => t === e ? e : t);
8181
+ }, [En, ue]);
8182
+ let kn = (e) => {
8187
8183
  he("/popup/preview", { state: {
8188
8184
  background: ge,
8189
8185
  moduleName: _e,
8190
8186
  record: e,
8191
- fields: ln
8187
+ fields: un
8192
8188
  } });
8193
- }, kn = (e, t) => {
8189
+ }, jn = (e, t) => {
8194
8190
  let n = Dp(e, t), r = n.startsWith("/") ? n : `/${n}`, i = t?._id ?? t?.id;
8195
8191
  he(r, { state: {
8196
8192
  background: ge,
@@ -8200,7 +8196,7 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8200
8196
  popupContext: {},
8201
8197
  popupAction: {}
8202
8198
  } });
8203
- }, jn = O(() => {
8199
+ }, Mn = O(() => {
8204
8200
  let e = {
8205
8201
  dataIndex: "icons",
8206
8202
  key: "icons",
@@ -8214,7 +8210,7 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8214
8210
  type: "button",
8215
8211
  className: "job-row-eye-button",
8216
8212
  "aria-label": "Preview job",
8217
- onClick: () => En(t),
8213
+ onClick: () => kn(t),
8218
8214
  children: /* @__PURE__ */ X("img", {
8219
8215
  src: op,
8220
8216
  alt: "",
@@ -8225,29 +8221,29 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8225
8221
  children: /* @__PURE__ */ X(Ot, { className: "job-row-linkedin-icon" })
8226
8222
  })]
8227
8223
  })
8228
- }, t = ln.filter((e) => mn.includes(e.key)).map((e, t) => {
8224
+ }, t = un.filter((e) => hn.includes(e.key)).map((e, t) => {
8229
8225
  let n = He.sort === e.key ? He.sortDir : "";
8230
8226
  return {
8231
8227
  title: Tm({
8232
8228
  label: e.label,
8233
8229
  sortDir: n,
8234
- sortable: Cn,
8235
- onSort: () => Zt(e.key)
8230
+ sortable: wn,
8231
+ onSort: () => Qt(e.key)
8236
8232
  }),
8237
8233
  dataIndex: e.key,
8238
8234
  key: e.key,
8239
8235
  fixed: t === 0 ? "left" : void 0,
8240
8236
  ellipsis: { showTitle: !1 },
8241
- width: cm(e, yn),
8242
- render: (t, n) => em(e, n, De, kn, {
8237
+ width: cm(e, bn),
8238
+ render: (t, n) => em(e, n, De, jn, {
8243
8239
  canAdd: U,
8244
8240
  canEdit: ye,
8245
8241
  canDelete: be
8246
8242
  })
8247
8243
  };
8248
8244
  });
8249
- if (!(gn || Dt) && Ze > 0 && t.length > 0) {
8250
- let n = e.width + (Cn && z === "checkbox" ? 48 : 0) + sm, r = t.reduce((e, t) => e + t.width, 0), i = Ze - n - r;
8245
+ if (!(_n || kt) && Ze > 0 && t.length > 0) {
8246
+ let n = e.width + (wn && z === "checkbox" ? 48 : 0) + sm, r = t.reduce((e, t) => e + t.width, 0), i = Ze - n - r;
8251
8247
  i > 0 && r > 0 && t.forEach((e) => {
8252
8248
  e.width = Math.floor(e.width + i * (e.width / r));
8253
8249
  });
@@ -8259,34 +8255,30 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8259
8255
  be,
8260
8256
  ye,
8261
8257
  De,
8262
- It,
8263
- Zt,
8264
- gn,
8265
- Cn,
8266
- Dt,
8258
+ Lt,
8259
+ Qt,
8260
+ _n,
8261
+ wn,
8262
+ kt,
8267
8263
  ge,
8268
8264
  e,
8269
8265
  he,
8270
- ln,
8271
- yn,
8266
+ un,
8267
+ bn,
8272
8268
  z,
8273
8269
  He.sort,
8274
8270
  He.sortDir,
8275
8271
  Ze,
8276
- Bt,
8277
- mn
8278
- ]), Mn = E((e) => {
8279
- if (we(e), Fe([]), Le([]), Kt(), Dt && typeof de == "function") {
8280
- let t = Tn.find((t, n) => String(um(t, n)) === e);
8281
- de(t?.key ?? t?.value ?? t?.id ?? e);
8282
- }
8283
- }, [
8284
- Dt,
8285
- de,
8286
- Tn
8287
- ]);
8288
- function Nn(e, t, n) {
8289
- let r = Rt.get(String(e));
8272
+ Vt,
8273
+ hn
8274
+ ]), Nn = E((e) => {
8275
+ if (we(e), Fe([]), Le([]), qt(), typeof de == "function") {
8276
+ let t = En.find((t, n) => String(um(t, n)) === e), n = t?.key ?? t?.value ?? t?.id ?? e;
8277
+ $e.current = n, de(n);
8278
+ }
8279
+ }, [de, En]);
8280
+ function Pn(e, t, n) {
8281
+ let r = Bt.get(String(e));
8290
8282
  if (r && r.actionType !== "group") {
8291
8283
  if (typeof s == "function" && s({
8292
8284
  key: r.key,
@@ -8342,15 +8334,15 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8342
8334
  }
8343
8335
  }
8344
8336
  }
8345
- function Pn({ key: e }) {
8346
- Nn(e, Pe, Ie);
8337
+ function Fn({ key: e }) {
8338
+ Pn(e, Pe, Ie);
8347
8339
  }
8348
- let Fn = mn.length === un.length, In = mn.length > 0 && !Fn, Q = (e, t) => {
8340
+ let In = hn.length === dn.length, Q = hn.length > 0 && !In, Ln = (e, t) => {
8349
8341
  Ge((n) => {
8350
- let r = un.slice(0, me).map((e) => e.key), i = n.length ? n : r;
8351
- return t ? i.includes(e) ? i : [...i, e] : i.length <= hn ? i : i.filter((t) => t !== e);
8342
+ let r = dn.slice(0, me).map((e) => e.key), i = n.length ? n : r;
8343
+ return t ? i.includes(e) ? i : [...i, e] : i.length <= gn ? i : i.filter((t) => t !== e);
8352
8344
  });
8353
- }, Ln = () => {
8345
+ }, Rn = () => {
8354
8346
  if (typeof c == "function") {
8355
8347
  c();
8356
8348
  return;
@@ -8359,55 +8351,55 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8359
8351
  he(p);
8360
8352
  return;
8361
8353
  }
8362
- Et(!0);
8354
+ Dt(!0);
8363
8355
  };
8364
8356
  D(() => {
8365
- if (!Tt) return;
8357
+ if (!Et) return;
8366
8358
  let e = (e) => {
8367
- e.key === "Escape" && Et(!1);
8359
+ e.key === "Escape" && Dt(!1);
8368
8360
  };
8369
8361
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
8370
- }, [Tt]);
8371
- let Rn = () => {
8372
- cn && (at(Ct.rows), st(Ct.total), lt(Ct.tabs), dt(Ct.fields), pt(Ct.tabField), ht(Ct.actions ?? []), _t(Ct.actionRules ?? []), St(null), bt(!1));
8373
- }, zn = (e) => {
8362
+ }, [Et]);
8363
+ let zn = () => {
8364
+ ln && (ot(wt.rows), ct(wt.total), ut(wt.tabs), ft(wt.fields), mt(wt.tabField), gt(wt.actions ?? []), vt(wt.actionRules ?? []), Ct(null), xt(!1));
8365
+ }, Bn = (e) => {
8374
8366
  let t = e.target.value, n = t.trim().length < 3, r = Me.some((e) => e.field);
8375
- n && (Oe(""), r || Rn()), Ee(t), Kt();
8376
- }, Bn = () => {
8377
- let e = Te.trim();
8378
- e.length >= 3 && (Oe(e), Kt());
8367
+ n && (Oe(""), r || zn()), Ee(t), qt();
8379
8368
  }, Vn = () => {
8380
- Rn(), Ne([]), nt([], []), Kt();
8369
+ let e = Te.trim();
8370
+ e.length >= 3 && (Oe(e), qt());
8371
+ }, Hn = () => {
8372
+ zn(), Ne([]), it([], []), qt();
8381
8373
  };
8382
8374
  D(() => {
8383
- Pt === "card" && (Ye([]), nt([], []));
8375
+ Ft === "card" && (Ye([]), it([], []));
8384
8376
  }, [
8385
8377
  Be.current,
8386
8378
  Be.pageSize,
8387
8379
  Ce,
8388
- Pt
8380
+ Ft
8389
8381
  ]);
8390
- let Hn = (e) => {
8382
+ let Un = (e) => {
8391
8383
  Ye((t) => {
8392
8384
  let n = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
8393
- return nt(n, yn.filter((e, t) => n.includes(String(pm(e, t, l))))), n;
8385
+ return it(n, bn.filter((e, t) => n.includes(String(pm(e, t, l))))), n;
8394
8386
  });
8395
- }, Un = /* @__PURE__ */ Z("div", {
8387
+ }, Wn = /* @__PURE__ */ Z("div", {
8396
8388
  className: "column-visibility-menu",
8397
8389
  onClick: (e) => e.stopPropagation(),
8398
8390
  children: [/* @__PURE__ */ X(I, {
8399
- checked: Fn,
8400
- indeterminate: In,
8391
+ checked: In,
8392
+ indeterminate: Q,
8401
8393
  onChange: (e) => {
8402
- Ge(e.target.checked ? un.map((e) => e.key) : un.slice(0, me).map((e) => e.key));
8394
+ Ge(e.target.checked ? dn.map((e) => e.key) : dn.slice(0, me).map((e) => e.key));
8403
8395
  },
8404
8396
  children: "Select All"
8405
8397
  }), /* @__PURE__ */ X("div", {
8406
8398
  className: "column-visibility-menu__list",
8407
- children: un.map((e) => /* @__PURE__ */ X(I, {
8408
- checked: mn.includes(e.key),
8409
- disabled: mn.includes(e.key) && mn.length <= hn,
8410
- onChange: (t) => Q(e.key, t.target.checked),
8399
+ children: dn.map((e) => /* @__PURE__ */ X(I, {
8400
+ checked: hn.includes(e.key),
8401
+ disabled: hn.includes(e.key) && hn.length <= gn,
8402
+ onChange: (t) => Ln(e.key, t.target.checked),
8411
8403
  children: e.label
8412
8404
  }, e.key))
8413
8405
  })]
@@ -8426,33 +8418,33 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8426
8418
  justify: "space-between",
8427
8419
  children: [/* @__PURE__ */ X(ur, {
8428
8420
  activeKey: Ce,
8429
- tabs: Tn,
8430
- onChange: Mn
8421
+ tabs: En,
8422
+ onChange: Nn
8431
8423
  }), /* @__PURE__ */ Z(se, {
8432
8424
  align: "center",
8433
8425
  gap: 8,
8434
8426
  children: [
8435
- Cn && /* @__PURE__ */ X(B, {
8427
+ wn && /* @__PURE__ */ X(B, {
8436
8428
  prefix: /* @__PURE__ */ X(Xt, { className: "job-search-icon" }),
8437
8429
  placeholder: M,
8438
8430
  value: Te,
8439
- onChange: zn,
8440
- onPressEnter: Bn,
8431
+ onChange: Bn,
8432
+ onPressEnter: Vn,
8441
8433
  allowClear: !0,
8442
8434
  className: "job-search-input"
8443
8435
  }),
8444
- !Dt && U && /* @__PURE__ */ X(q, {
8436
+ !kt && U && /* @__PURE__ */ X(q, {
8445
8437
  title: "Add",
8446
8438
  children: /* @__PURE__ */ X(P, {
8447
8439
  "aria-label": "Add",
8448
8440
  className: "job-toolbar-icon-button",
8449
8441
  icon: /* @__PURE__ */ X(zt, {}),
8450
8442
  onClick: () => {
8451
- Ut && he(Ut);
8443
+ Wt && he(Wt);
8452
8444
  }
8453
8445
  })
8454
8446
  }),
8455
- Cn && /* @__PURE__ */ X(q, {
8447
+ wn && /* @__PURE__ */ X(q, {
8456
8448
  title: "Filter",
8457
8449
  children: /* @__PURE__ */ X(ee, {
8458
8450
  count: Me.filter((e) => e.field && Nm(e)).length,
@@ -8466,40 +8458,40 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8466
8458
  })
8467
8459
  })
8468
8460
  }),
8469
- te && Cn && /* @__PURE__ */ Z(se, {
8461
+ te && wn && /* @__PURE__ */ Z(se, {
8470
8462
  align: "center",
8471
8463
  gap: 6,
8472
8464
  children: [/* @__PURE__ */ X(q, {
8473
8465
  title: "List View",
8474
8466
  children: /* @__PURE__ */ X(P, {
8475
- className: `job-toolbar-icon-button param-view-toggle-btn${Pt === "list" ? " param-view-toggle-btn--active" : ""}`,
8467
+ className: `job-toolbar-icon-button param-view-toggle-btn${Ft === "list" ? " param-view-toggle-btn--active" : ""}`,
8476
8468
  icon: /* @__PURE__ */ X(fn, {}),
8477
8469
  onClick: () => {
8478
- ne?.("list"), Ye([]), nt([], []);
8470
+ ne?.("list"), Ye([]), it([], []);
8479
8471
  }
8480
8472
  })
8481
8473
  }), /* @__PURE__ */ X(q, {
8482
8474
  title: "Card View",
8483
8475
  children: /* @__PURE__ */ X(P, {
8484
- className: `job-toolbar-icon-button param-view-toggle-btn${Pt === "card" ? " param-view-toggle-btn--active" : ""}`,
8476
+ className: `job-toolbar-icon-button param-view-toggle-btn${Ft === "card" ? " param-view-toggle-btn--active" : ""}`,
8485
8477
  icon: /* @__PURE__ */ X(ke, {}),
8486
8478
  onClick: () => {
8487
- ne?.("card"), Ye([]), nt([], []);
8479
+ ne?.("card"), Ye([]), it([], []);
8488
8480
  }
8489
8481
  })
8490
8482
  })]
8491
8483
  }),
8492
- d && Cn && /* @__PURE__ */ X(P, {
8484
+ d && wn && /* @__PURE__ */ X(P, {
8493
8485
  className: "job-summary-button",
8494
8486
  type: "primary",
8495
- onClick: Ln,
8487
+ onClick: Rn,
8496
8488
  children: f
8497
8489
  })
8498
8490
  ]
8499
8491
  })]
8500
8492
  })
8501
8493
  }),
8502
- Cn && /* @__PURE__ */ X(Y, { children: /* @__PURE__ */ X(F, {
8494
+ wn && /* @__PURE__ */ X(Y, { children: /* @__PURE__ */ X(F, {
8503
8495
  className: "job-toolbar-card",
8504
8496
  children: /* @__PURE__ */ Z(se, {
8505
8497
  className: "p-flex",
@@ -8509,15 +8501,15 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8509
8501
  align: "center",
8510
8502
  gap: 3,
8511
8503
  children: [
8512
- Pt === "card" && /* @__PURE__ */ X(I, {
8513
- checked: yn.length > 0 && Je.length >= yn.length,
8514
- indeterminate: Je.length > 0 && Je.length < yn.length,
8504
+ Ft === "card" && /* @__PURE__ */ X(I, {
8505
+ checked: bn.length > 0 && Je.length >= bn.length,
8506
+ indeterminate: Je.length > 0 && Je.length < bn.length,
8515
8507
  className: "param-card-view__select-all",
8516
8508
  onChange: () => {
8517
- if (Je.length > 0) Ye([]), nt([], []);
8509
+ if (Je.length > 0) Ye([]), it([], []);
8518
8510
  else {
8519
- let e = yn.map((e, t) => String(pm(e, t, l)));
8520
- Ye(e), nt(e, [...yn]);
8511
+ let e = bn.map((e, t) => String(pm(e, t, l)));
8512
+ Ye(e), it(e, [...bn]);
8521
8513
  }
8522
8514
  },
8523
8515
  children: "Select All"
@@ -8526,7 +8518,7 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8526
8518
  open: Ke,
8527
8519
  onOpenChange: qe,
8528
8520
  trigger: ["click"],
8529
- dropdownRender: () => Un,
8521
+ dropdownRender: () => Wn,
8530
8522
  placement: "bottomLeft",
8531
8523
  overlayClassName: "column-visibility-dropdown",
8532
8524
  children: /* @__PURE__ */ X(P, {
@@ -8542,10 +8534,10 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8542
8534
  children: /* @__PURE__ */ X(rt, { className: "job-actions-caret" })
8543
8535
  })
8544
8536
  }),
8545
- Vt.length > 0 && Pe.length > 0 && /* @__PURE__ */ X(ae, {
8537
+ Ht.length > 0 && Pe.length > 0 && /* @__PURE__ */ X(ae, {
8546
8538
  menu: {
8547
- items: Vt.map(vm),
8548
- onClick: Pn
8539
+ items: Ht.map(vm),
8540
+ onClick: Fn
8549
8541
  },
8550
8542
  trigger: ["click"],
8551
8543
  children: /* @__PURE__ */ Z(P, {
@@ -8572,51 +8564,51 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8572
8564
  ]
8573
8565
  })
8574
8566
  ]
8575
- }), xn && /* @__PURE__ */ Z(cp, {
8567
+ }), Sn && /* @__PURE__ */ Z(cp, {
8576
8568
  className: "job-search-results-count",
8577
8569
  children: [
8578
8570
  "Search Results (",
8579
- Sn,
8571
+ Cn,
8580
8572
  ")"
8581
8573
  ]
8582
8574
  })]
8583
8575
  })
8584
8576
  }) }),
8585
- on && /* @__PURE__ */ X(Im, {
8577
+ sn && /* @__PURE__ */ X(Im, {
8586
8578
  filters: Me,
8587
8579
  onRemove: (e) => {
8588
- Ne(Me.filter((t, n) => n !== e)), Kt();
8580
+ Ne(Me.filter((t, n) => n !== e)), qt();
8589
8581
  },
8590
- onClearAll: Vn
8582
+ onClearAll: Hn
8591
8583
  }),
8592
8584
  /* @__PURE__ */ X("div", {
8593
8585
  ref: Xe,
8594
8586
  className: "job-table-measure",
8595
8587
  children: /* @__PURE__ */ X(ve, {
8596
- spinning: Dt ? v : Jt || vt,
8597
- children: Pt === "card" ? yn.length === 0 ? /* @__PURE__ */ X(oe, {
8588
+ spinning: kt ? v : Yt || bt,
8589
+ children: Ft === "card" ? bn.length === 0 ? /* @__PURE__ */ X(oe, {
8598
8590
  image: oe.PRESENTED_IMAGE_SIMPLE,
8599
- description: wn,
8591
+ description: Tn,
8600
8592
  className: "param-card-view__empty",
8601
- children: !Dt && U && Ut && !xt && /* @__PURE__ */ X(P, {
8593
+ children: !kt && U && Wt && !St && /* @__PURE__ */ X(P, {
8602
8594
  type: "primary",
8603
8595
  icon: /* @__PURE__ */ X(zt, {}),
8604
- onClick: () => he(Ut),
8596
+ onClick: () => he(Wt),
8605
8597
  children: "Add New"
8606
8598
  })
8607
8599
  }) : /* @__PURE__ */ X("div", {
8608
8600
  className: "param-card-view__grid",
8609
- children: yn.map((e, t) => {
8601
+ children: bn.map((e, t) => {
8610
8602
  let n = String(pm(e, t, l));
8611
8603
  return /* @__PURE__ */ X(Mm, {
8612
8604
  record: e,
8613
- fields: _n,
8614
- selected: z === "checkbox" ? Je.includes(n) : et(e, t),
8615
- isControlled: Dt,
8616
- onPreview: () => En(e),
8617
- onSelect: () => Hn(n),
8618
- onPopupAction: kn,
8619
- onRecordClick: R ? () => tt(e, t) : void 0,
8605
+ fields: vn,
8606
+ selected: z === "checkbox" ? Je.includes(n) : tt(e, t),
8607
+ isControlled: kt,
8608
+ onPreview: () => kn(e),
8609
+ onSelect: () => Un(n),
8610
+ onPopupAction: jn,
8611
+ onRecordClick: R ? () => nt(e, t) : void 0,
8620
8612
  selectionMode: z,
8621
8613
  permissions: {
8622
8614
  canAdd: U,
@@ -8626,70 +8618,70 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8626
8618
  }, n);
8627
8619
  })
8628
8620
  }) : /* @__PURE__ */ X(xe, {
8629
- rowSelection: Cn && z === "checkbox" ? {
8621
+ rowSelection: wn && z === "checkbox" ? {
8630
8622
  type: "checkbox",
8631
8623
  fixed: !0,
8632
8624
  columnWidth: 48,
8633
8625
  selectedRowKeys: Pe,
8634
8626
  onChange: (e, t) => {
8635
- nt(e, t);
8627
+ it(e, t);
8636
8628
  },
8637
8629
  columnTitle: (() => {
8638
- let e = yn.length, t = e > 0 && Pe.length >= e, n = Pe.length > 0 && !t;
8630
+ let e = bn.length, t = e > 0 && Pe.length >= e, n = Pe.length > 0 && !t;
8639
8631
  return /* @__PURE__ */ X(I, {
8640
8632
  checked: t,
8641
8633
  indeterminate: n,
8642
8634
  onChange: () => {
8643
- n || t ? nt([], []) : nt(yn.map((e, t) => pm(e, t, l)), [...yn]);
8635
+ n || t ? it([], []) : it(bn.map((e, t) => pm(e, t, l)), [...bn]);
8644
8636
  }
8645
8637
  });
8646
8638
  })()
8647
8639
  } : void 0,
8648
- columns: jn,
8649
- dataSource: yn,
8640
+ columns: Mn,
8641
+ dataSource: bn,
8650
8642
  size: "middle",
8651
8643
  tableLayout: "fixed",
8652
8644
  scroll: {
8653
- x: gn || Dt ? "max-content" : void 0,
8645
+ x: _n || kt ? "max-content" : void 0,
8654
8646
  y: "calc(100vh - 300px)"
8655
8647
  },
8656
8648
  pagination: !1,
8657
8649
  locale: { emptyText: /* @__PURE__ */ X(oe, {
8658
8650
  image: oe.PRESENTED_IMAGE_SIMPLE,
8659
- description: wn
8651
+ description: Tn
8660
8652
  }) },
8661
8653
  className: `${h} ${ce ? "list-view-table--compact" : ""}`.trim(),
8662
8654
  onRow: R ? (e, t) => ({
8663
8655
  onClick: (n) => {
8664
- mm(n.target) || tt(e, t);
8656
+ mm(n.target) || nt(e, t);
8665
8657
  },
8666
- "aria-selected": et(e, t)
8658
+ "aria-selected": tt(e, t)
8667
8659
  }) : void 0,
8668
- rowClassName: ie == null ? void 0 : (e, t) => et(e, t) ? "list-view-row--active" : "",
8660
+ rowClassName: ie == null ? void 0 : (e, t) => tt(e, t) ? "list-view-row--active" : "",
8669
8661
  rowKey: (e, t) => pm(e, t, l)
8670
8662
  })
8671
8663
  })
8672
8664
  }),
8673
- Cn ? /* @__PURE__ */ X(ci, {
8665
+ wn ? /* @__PURE__ */ X(ci, {
8674
8666
  current: Be.current,
8675
8667
  pageSize: Be.pageSize,
8676
- total: bn,
8668
+ total: xn,
8677
8669
  onChange: (e, t) => {
8678
- if (Dt && typeof C == "function") {
8670
+ if (kt && typeof C == "function") {
8679
8671
  C(e, t ?? Be.pageSize);
8680
8672
  return;
8681
8673
  }
8682
- Gt(e);
8674
+ Kt(e);
8683
8675
  },
8684
8676
  onPageSizeChange: (e) => {
8685
- if (Dt && typeof w == "function") {
8677
+ if (kt && typeof w == "function") {
8686
8678
  w(e);
8687
8679
  return;
8688
8680
  }
8689
8681
  Ve({
8690
8682
  current: 1,
8691
8683
  pageSize: e
8692
- }), Wt(1, { replace: !0 });
8684
+ }), Gt(1, { replace: !0 });
8693
8685
  }
8694
8686
  }) : void 0,
8695
8687
  /* @__PURE__ */ X(ap, {
@@ -8698,17 +8690,17 @@ function Lm({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
8698
8690
  filters: Me,
8699
8691
  onClose: () => je(!1),
8700
8692
  onApply: ({ filters: e }) => {
8701
- Ne(e), Kt();
8693
+ Ne(e), qt();
8702
8694
  },
8703
- onReset: Vn
8695
+ onReset: Hn
8704
8696
  }),
8705
8697
  /* @__PURE__ */ X(Kf, {
8706
8698
  moduleName: _e,
8707
- open: Tt,
8708
- rows: it,
8709
- tabs: Tn,
8710
- total: bn,
8711
- onClose: () => Et(!1)
8699
+ open: Et,
8700
+ rows: at,
8701
+ tabs: En,
8702
+ total: xn,
8703
+ onClose: () => Dt(!1)
8712
8704
  })
8713
8705
  ]
8714
8706
  });