@realtek/core-theme 0.0.210 → 0.0.211

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
@@ -4920,139 +4920,139 @@ function ff({ filters: e, onRemove: t, onClearAll: n }) {
4920
4920
  ]
4921
4921
  });
4922
4922
  }
4923
- function pf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [], breadcrumbItems: i = [], dataSource: s = [], className: c = "", initialPageSize: l = 10, onAction: u, onSummaryClick: f, rowKey: p, showSummaryButton: m = !1, summaryButtonLabel: g = "View Summary", summaryRoute: _, tabs: v, tableClassName: y = "job-list-table", fields: b = of, fieldOverrides: x = null, extraFields: S = of, listName: C = "", loading: w = !1, total: T, current: E, pageSize: D, onPageChange: O, onPageSizeChange: k, onSearch: A, toolbarExtra: j = null, showSearch: ee = !0, searchPlaceholder: M = "Min 3 Chars, press Enter to search", searchFields: N = of, showViewToggle: te = !1, activeView: ne = "list", onViewChange: re, createAction: ie, onRecordClick: ae, selectedRecordId: oe, selectionMode: se = "checkbox", compact: P = !1, onSelectionChange: ce, selectedSource: le, onTabChange: ue, fetchData: de = wc, responseMapper: fe = Gl, queryParams: pe = sf, defaultVisibleColumnCount: me = 6, showAdd: he = !0 }) {
4924
- let ge = Ma(), _e = ja(), ve = it(e), { canView: ye, canAdd: be, canEdit: F, canDelete: xe } = Jc(ve), Se = L(() => pe ?? sf, [JSON.stringify(pe ?? sf)]), [Ce] = Pa(), we = rf(Ce), [Te, Ee] = R("all"), [De, Oe] = R(""), [ke, Ae] = R(""), [je, Me] = R(!1), [Ne, Pe] = R([]), [Fe, Ie] = R([]), [Le, Re] = R([]), [ze, Be] = R(0), [Ve, He] = R({
4925
- current: we,
4923
+ function pf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [], breadcrumbItems: i = [], dataSource: s = [], className: c = "", initialPageSize: l = 10, onAction: u, onSummaryClick: f, rowKey: p, showSummaryButton: m = !1, summaryButtonLabel: g = "View Summary", summaryRoute: _, showFieldButton: v = !0, fieldButtonLabel: y = "View Field", fieldButtonRoute: b, tabs: x, tableClassName: S = "job-list-table", fields: C = of, fieldOverrides: w = null, extraFields: T = of, listName: E = "", loading: D = !1, total: O, current: k, pageSize: A, onPageChange: j, onPageSizeChange: ee, onSearch: M, toolbarExtra: N = null, showSearch: te = !0, searchPlaceholder: ne = "Min 3 Chars, press Enter to search", searchFields: re = of, showViewToggle: ie = !1, activeView: ae = "list", onViewChange: oe, createAction: se, onRecordClick: P, selectedRecordId: ce, selectionMode: le = "checkbox", compact: ue = !1, onSelectionChange: de, selectedSource: fe, onTabChange: pe, fetchData: me = wc, responseMapper: he = Gl, queryParams: ge = sf, defaultVisibleColumnCount: _e = 6, showAdd: ve = !0 }) {
4924
+ let ye = Ma(), be = ja(), F = it(e), { canView: xe, canAdd: Se, canEdit: Ce, canDelete: we } = Jc(F), Te = L(() => ge ?? sf, [JSON.stringify(ge ?? sf)]), [Ee] = Pa(), De = rf(Ee), [Oe, ke] = R("all"), [Ae, je] = R(""), [Me, Ne] = R(""), [Pe, Fe] = R(!1), [Ie, Le] = R([]), [Re, ze] = R([]), [Be, Ve] = R([]), [He, Ue] = R(0), [We, Ge] = R({
4925
+ current: De,
4926
4926
  pageSize: l
4927
- }), [Ue, We] = R({
4927
+ }), [Ke, qe] = R({
4928
4928
  sort: "",
4929
4929
  sortDir: ""
4930
- }), [Ge, Ke] = R([]), [qe, Je] = R(!1), [Ye, Xe] = R([]);
4930
+ }), [Je, Ye] = R([]), [Xe, Ze] = R(!1), [Qe, $e] = R([]);
4931
4931
  I(() => (t && d(t), () => {
4932
4932
  t && h();
4933
4933
  }), [t]);
4934
- let Ze = qn(null), [Qe, $e] = R(0), et = qn();
4934
+ let et = qn(null), [tt, nt] = R(0), rt = qn();
4935
4935
  I(() => {
4936
- let e = Ze.current;
4936
+ let e = et.current;
4937
4937
  if (!e || typeof ResizeObserver > "u") return;
4938
4938
  let t = new ResizeObserver((e) => {
4939
4939
  let t = e[0]?.contentRect?.width;
4940
- typeof t == "number" && $e(t);
4940
+ typeof t == "number" && nt(t);
4941
4941
  });
4942
4942
  return t.observe(e), () => t.disconnect();
4943
4943
  }, []);
4944
- let tt = (e, t) => String(Vd(e, t, p)), nt = (e, t) => String(tt(e, t)) === String(oe ?? ""), rt = (e, t) => {
4945
- let n = tt(e, t);
4946
- n && ae?.(e, n);
4947
- }, at = (e, t) => {
4948
- Ie(e), Re(t), ce?.(e, t);
4949
- }, [ot, st] = R(s), [ct, lt] = R(s.length), [ut, dt] = R([]), [ft, pt] = R([]), [mt, ht] = R(""), [gt, _t] = R([]), [vt, yt] = R([]), [bt, xt] = R(!1), [St, Ct] = R(null), [wt, Tt] = R(null), [Et, Dt] = R(!1), Ot = !!(O || k || A), kt = Ot ? s : ot, At = Ot ? T ?? 0 : ct, jt = Ot ? b : ft, Mt = L(() => kt.some((e) => Wu(e)), [kt]), Nt = L(() => jt.some((e) => Uu(e)), [jt]), Pt = Mt || Nt ? "card" : ne, Ft = n.length > 0 ? n : gt, It = r.length > 0 ? r : vt, Lt = L(() => Xd(Ft), [Ft]), Rt = L(() => new Map(Yd(Lt).map((e) => [e.key, e])), [Lt]), zt = L(() => Jd(Lt, (e) => {
4944
+ let at = (e, t) => String(Vd(e, t, p)), ot = (e, t) => String(at(e, t)) === String(ce ?? ""), st = (e, t) => {
4945
+ let n = at(e, t);
4946
+ n && P?.(e, n);
4947
+ }, ct = (e, t) => {
4948
+ ze(e), Ve(t), de?.(e, t);
4949
+ }, [lt, ut] = R(s), [dt, ft] = R(s.length), [pt, mt] = R([]), [ht, gt] = R([]), [_t, vt] = R(""), [yt, bt] = R([]), [xt, St] = R([]), [Ct, wt] = R(!1), [Tt, Et] = R(null), [Dt, Ot] = R(null), [kt, At] = R(!1), jt = !!(j || ee || M), Mt = jt ? s : lt, Nt = jt ? O ?? 0 : dt, Pt = jt ? C : ht, Ft = L(() => Mt.some((e) => Wu(e)), [Mt]), It = L(() => Pt.some((e) => Uu(e)), [Pt]), Lt = Ft || It ? "card" : ae, Rt = n.length > 0 ? n : yt, zt = r.length > 0 ? r : xt, Bt = L(() => Xd(Rt), [Rt]), Vt = L(() => new Map(Yd(Bt).map((e) => [e.key, e])), [Bt]), Ht = L(() => Jd(Bt, (e) => {
4950
4950
  let t = Xc(e);
4951
- return t === "add" && !be || t === "edit" && !F || t === "delete" && !xe || !cn(e.permission, ve) || e.showInList === !1 ? !1 : e.allowedTabs ? e.allowedTabs.some((e) => Id(e) === Id(Te)) : !0;
4951
+ return t === "add" && !Se || t === "edit" && !Ce || t === "delete" && !we || !cn(e.permission, F) || e.showInList === !1 ? !1 : e.allowedTabs ? e.allowedTabs.some((e) => Id(e) === Id(Oe)) : !0;
4952
4952
  }), [
4953
- Lt,
4954
- Te,
4955
- be,
4956
- F,
4957
- xe,
4958
- ve
4959
- ]), Bt = L(() => Jd(zt, (e) => (Fe.length === 1 || e.allowMultiple || e.danger) && Zd(e, Le) && !cl(e.key, Le, It, Te)), [
4960
- Te,
4961
- It,
4962
- Fe.length,
4963
- Le,
4964
- zt
4965
- ]), Vt = typeof e == "string" ? e.trim().length > 0 : !!e, Ht = Vt ? `/${ve}-create${ie ? `?action=${encodeURIComponent(ie)}` : ""}` : "";
4953
+ Bt,
4954
+ Oe,
4955
+ Se,
4956
+ Ce,
4957
+ we,
4958
+ F
4959
+ ]), Ut = L(() => Jd(Ht, (e) => (Re.length === 1 || e.allowMultiple || e.danger) && Zd(e, Be) && !cl(e.key, Be, zt, Oe)), [
4960
+ Oe,
4961
+ zt,
4962
+ Re.length,
4963
+ Be,
4964
+ Ht
4965
+ ]), Wt = typeof e == "string" ? e.trim().length > 0 : !!e, Gt = Wt ? `/${F}-create${se ? `?action=${encodeURIComponent(se)}` : ""}` : "";
4966
4966
  I(() => {
4967
- Vt && !ye && ge("/", { replace: !0 });
4967
+ Wt && !xe && ye("/", { replace: !0 });
4968
4968
  }, [
4969
- ye,
4970
- Vt,
4971
- ge
4969
+ xe,
4970
+ Wt,
4971
+ ye
4972
4972
  ]);
4973
- let Ut = (e, { replace: t = !1 } = {}) => {
4974
- let n = new URLSearchParams(Ce);
4973
+ let Kt = (e, { replace: t = !1 } = {}) => {
4974
+ let n = new URLSearchParams(Ee);
4975
4975
  af(n);
4976
4976
  let r = [n.toString(), e > 1 ? `p${e}` : ""].filter(Boolean).join("&");
4977
- r !== _e.search.replace(/^\?/, "") && ge({
4978
- pathname: _e.pathname,
4977
+ r !== be.search.replace(/^\?/, "") && ye({
4978
+ pathname: be.pathname,
4979
4979
  search: r ? `?${r}` : ""
4980
4980
  }, { replace: t });
4981
- }, Wt = (e, t) => {
4982
- He((t) => ({
4981
+ }, qt = (e, t) => {
4982
+ Ge((t) => ({
4983
4983
  ...t,
4984
4984
  current: e
4985
- })), Ut(e, t);
4986
- }, Gt = () => {
4987
- Wt(1, { replace: !0 });
4988
- }, { config: Kt, loading: qt, error: Jt } = Vc(!Ot && Vt ? e : null), Yt = Gn((e) => {
4989
- let t = Ue.sort === e, n = Qd(Ue.sortDir, t), r = n ? String(e) : "";
4990
- We({
4985
+ })), Kt(e, t);
4986
+ }, Jt = () => {
4987
+ qt(1, { replace: !0 });
4988
+ }, { config: Yt, loading: Xt, error: Zt } = Vc(!jt && Wt ? e : null), Qt = Gn((e) => {
4989
+ let t = Ke.sort === e, n = Qd(Ke.sortDir, t), r = n ? String(e) : "";
4990
+ qe({
4991
4991
  sort: r,
4992
4992
  sortDir: n
4993
- }), typeof A == "function" && A(r, n), Gt();
4993
+ }), typeof M == "function" && M(r, n), Jt();
4994
4994
  }, [
4995
- A,
4996
- Gt,
4997
- Ue.sort,
4998
- Ue.sortDir
4995
+ M,
4996
+ Jt,
4997
+ Ke.sort,
4998
+ Ke.sortDir
4999
4999
  ]);
5000
5000
  I(() => {
5001
- He((e) => e.current === we ? e : {
5001
+ Ge((e) => e.current === De ? e : {
5002
5002
  ...e,
5003
- current: we
5003
+ current: De
5004
5004
  });
5005
- }, [we]), I(() => {
5006
- Ot && He((e) => {
5007
- let t = nf(E ?? e.current), n = Number(D) > 0 ? Number(D) : e.pageSize;
5005
+ }, [De]), I(() => {
5006
+ jt && Ge((e) => {
5007
+ let t = nf(k ?? e.current), n = Number(A) > 0 ? Number(A) : e.pageSize;
5008
5008
  return e.current === t && e.pageSize === n ? e : {
5009
5009
  current: t,
5010
5010
  pageSize: n
5011
5011
  };
5012
5012
  });
5013
5013
  }, [
5014
- E,
5015
- D,
5016
- Ot
5014
+ k,
5015
+ A,
5016
+ jt
5017
5017
  ]);
5018
- let Xt = _e.state?.refreshTimestamp;
5018
+ let $t = be.state?.refreshTimestamp;
5019
5019
  I(() => {
5020
- Xt && (at([], []), Be((e) => e + 1));
5021
- }, [Xt]);
5022
- let Zt = L(() => {
5023
- let e = [...Array.isArray(v) ? v : [], ...ut], t = Rd(Te);
5020
+ $t && (ct([], []), Ue((e) => e + 1));
5021
+ }, [$t]);
5022
+ let en = L(() => {
5023
+ let e = [...Array.isArray(x) ? x : [], ...pt], t = Rd(Oe);
5024
5024
  return e.find((e, n) => Rd(Ld(e, n)) === t);
5025
5025
  }, [
5026
- Te,
5027
- ut,
5028
- v
5029
- ]), Qt = Zt?.field ?? Zt?.fieldName ?? Zt?.filterField ?? Zt?.dataIndex ?? mt, $t = zd(Te) ? "" : Te, en = !$t && !zd(Te) && Id(Qt).length > 0, tn = ke.trim().length >= 3, nn = tn ? ke.trim() : "", rn = Ne.some((e) => e.field), an = tf({
5026
+ Oe,
5027
+ pt,
5028
+ x
5029
+ ]), tn = en?.field ?? en?.fieldName ?? en?.filterField ?? en?.dataIndex ?? _t, nn = zd(Oe) ? "" : Oe, rn = !nn && !zd(Oe) && Id(tn).length > 0, an = Me.trim().length >= 3, on = an ? Me.trim() : "", sn = Ie.some((e) => e.field), ln = tf({
5030
5030
  moduleName: e,
5031
- activeTabScope: $t,
5032
- pageSize: Ve.pageSize,
5033
- sort: Ue.sort,
5034
- sortDir: Ue.sortDir,
5035
- queryParams: Se
5036
- }), on = Ve.current === 1 && wt?.key === an;
5031
+ activeTabScope: nn,
5032
+ pageSize: We.pageSize,
5033
+ sort: Ke.sort,
5034
+ sortDir: Ke.sortDir,
5035
+ queryParams: Te
5036
+ }), un = We.current === 1 && Dt?.key === ln;
5037
5037
  I(() => {
5038
- if (Ot) return;
5039
- if (!Vt) {
5040
- st([]), lt(0), dt([]), pt([]), ht(""), _t([]), yt([]), Ct(null);
5038
+ if (jt) return;
5039
+ if (!Wt) {
5040
+ ut([]), ft(0), mt([]), gt([]), vt(""), bt([]), St([]), Et(null);
5041
5041
  return;
5042
5042
  }
5043
- let t = !1, n = tn && ct > Ve.pageSize, r = n ? ct : Ve.pageSize, i = n ? 0 : (Ve.current - 1) * Ve.pageSize;
5044
- return xt(!(!tn && !rn && Ve.current === 1 && on)), Ct(null), de(e, r, i, {
5045
- scope: $t,
5046
- sort: Ue.sort,
5047
- sortDir: Ue.sortDir,
5048
- search: nn,
5049
- filters: Ne,
5050
- queryParams: Se
5043
+ let t = !1, n = an && dt > We.pageSize, r = n ? dt : We.pageSize, i = n ? 0 : (We.current - 1) * We.pageSize;
5044
+ return wt(!(!an && !sn && We.current === 1 && un)), Et(null), me(e, r, i, {
5045
+ scope: nn,
5046
+ sort: Ke.sort,
5047
+ sortDir: Ke.sortDir,
5048
+ search: on,
5049
+ filters: Ie,
5050
+ queryParams: Te
5051
5051
  }).then((n) => {
5052
5052
  if (t) return;
5053
- let { rows: r, total: i, tabs: a, fields: o, tabField: s, actions: c, actionRules: l } = fe(n, e);
5054
- st(r), lt(i), dt(a), pt(o), ht(s), _t(c), yt(l), !tn && !rn && Ve.current === 1 && Tt({
5055
- key: an,
5053
+ let { rows: r, total: i, tabs: a, fields: o, tabField: s, actions: c, actionRules: l } = he(n, e);
5054
+ ut(r), ft(i), mt(a), gt(o), vt(s), bt(c), St(l), !an && !sn && We.current === 1 && Ot({
5055
+ key: ln,
5056
5056
  rows: r,
5057
5057
  total: i,
5058
5058
  tabs: a,
@@ -5062,35 +5062,35 @@ function pf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5062
5062
  actionRules: l
5063
5063
  });
5064
5064
  }).catch((e) => {
5065
- t || (st([]), lt(0), dt([]), pt([]), ht(""), _t([]), yt([]), Ct(e.message), Vt && J.error("Invalid module name or data could not be loaded."));
5065
+ t || (ut([]), ft(0), mt([]), gt([]), vt(""), bt([]), St([]), Et(e.message), Wt && J.error("Invalid module name or data could not be loaded."));
5066
5066
  }).finally(() => {
5067
- t || xt(!1);
5067
+ t || wt(!1);
5068
5068
  }), () => {
5069
5069
  t = !0;
5070
5070
  };
5071
5071
  }, [
5072
+ on,
5072
5073
  nn,
5073
- $t,
5074
- Ne,
5074
+ Ie,
5075
+ ln,
5076
+ me,
5077
+ sn,
5075
5078
  an,
5076
- de,
5077
- rn,
5078
- tn,
5079
- Vt,
5080
- on,
5079
+ Wt,
5080
+ un,
5081
5081
  e,
5082
- ct,
5083
- Ve.current,
5084
- Ve.pageSize,
5085
- ze,
5086
- fe,
5087
- Ue.sort,
5088
- Ue.sortDir,
5089
- Se
5082
+ dt,
5083
+ We.current,
5084
+ We.pageSize,
5085
+ He,
5086
+ he,
5087
+ Ke.sort,
5088
+ Ke.sortDir,
5089
+ Te
5090
5090
  ]);
5091
- let sn = L(() => {
5092
- let e = Ot && Array.isArray(b) && b.length, t = !Ot && Array.isArray(ft) && ft.length, n = !Jt && Array.isArray(Kt) && Kt.length, r = e ? b : t ? ft : n ? Kt : [], i = new Map(ft.map((e) => [Fu(e), e]).filter(([e]) => e)), a = r.map((e) => {
5093
- let t = Fu(e), n = i.get(t) ?? {}, r = t && x && typeof x == "object" ? x[t] : null, a = r?.renderConfig ? {
5091
+ let dn = L(() => {
5092
+ let e = jt && Array.isArray(C) && C.length, t = !jt && Array.isArray(ht) && ht.length, n = !Zt && Array.isArray(Yt) && Yt.length, r = e ? C : t ? ht : n ? Yt : [], i = new Map(ht.map((e) => [Fu(e), e]).filter(([e]) => e)), a = r.map((e) => {
5093
+ let t = Fu(e), n = i.get(t) ?? {}, r = t && w && typeof w == "object" ? w[t] : null, a = r?.renderConfig ? {
5094
5094
  ...n.renderConfig ?? e.renderConfig ?? {},
5095
5095
  ...r.renderConfig
5096
5096
  } : e.renderConfig ?? n.renderConfig ?? null;
@@ -5102,7 +5102,7 @@ function pf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5102
5102
  key: t,
5103
5103
  label: Pu(r ?? e) ?? Pu(e) ?? Pu(n)
5104
5104
  };
5105
- }).filter((e) => e.key && e.label), o = (Array.isArray(S) ? S : []).map((e, t) => {
5105
+ }).filter((e) => e.key && e.label), o = (Array.isArray(T) ? T : []).map((e, t) => {
5106
5106
  let n = Fu(e);
5107
5107
  return n ? {
5108
5108
  ...e,
@@ -5114,81 +5114,81 @@ function pf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5114
5114
  }).filter(Boolean);
5115
5115
  return pd([...a, ...o]);
5116
5116
  }, [
5117
- Kt,
5118
- Jt,
5119
- b,
5120
- S,
5121
- x,
5122
- Ot,
5123
- ft
5124
- ]), ln = L(() => sn.filter((e) => typeof e.isVisible == "boolean" ? e.isVisible : typeof e.isVisible == "string" ? e.isVisible.toLowerCase() === "true" : !0).map((e) => ({
5117
+ Yt,
5118
+ Zt,
5119
+ C,
5120
+ T,
5121
+ w,
5122
+ jt,
5123
+ ht
5124
+ ]), fn = L(() => dn.filter((e) => typeof e.isVisible == "boolean" ? e.isVisible : typeof e.isVisible == "string" ? e.isVisible.toLowerCase() === "true" : !0).map((e) => ({
5125
5125
  key: e.key,
5126
5126
  label: e.label
5127
- })), [sn]), un = ln.map((e) => e.key), dn = Ge.filter((e) => un.includes(e)), fn = dn.length ? dn : ln.slice(0, me).map((e) => e.key), pn = Math.min(me, ln.length), mn = fn.length > me, hn = L(() => sn.filter((e) => !e.cardHidden && (e.tableHidden || fn.includes(e.key))), [sn, fn]), gn = L(() => {
5128
- let e = De.toLowerCase(), t = kt, n = en ? t.filter((e) => Bd(e, Te, Zt, sn, Qt)) : t, r = N.length ? sn.filter((e) => N.includes(e.key)) : sn;
5127
+ })), [dn]), pn = fn.map((e) => e.key), mn = Je.filter((e) => pn.includes(e)), hn = mn.length ? mn : fn.slice(0, _e).map((e) => e.key), gn = Math.min(_e, fn.length), _n = hn.length > _e, vn = L(() => dn.filter((e) => !e.cardHidden && (e.tableHidden || hn.includes(e.key))), [dn, hn]), yn = L(() => {
5128
+ let e = Ae.toLowerCase(), t = Mt, n = rn ? t.filter((e) => Bd(e, Oe, en, dn, tn)) : t, r = re.length ? dn.filter((e) => re.includes(e.key)) : dn;
5129
5129
  return !e || e.length < 3 ? n : n.filter((t) => r.some((n) => String(Gu(t, n.key)).toLowerCase().includes(e) || yd(n).some((n) => String(Gu(t, n)).toLowerCase().includes(e))));
5130
5130
  }, [
5131
- Te,
5132
- Zt,
5133
- Qt,
5131
+ Oe,
5134
5132
  en,
5135
- kt,
5136
- sn,
5137
- De,
5138
- N
5139
- ]), _n = L(() => {
5140
- if (!tn) return gn;
5141
- let e = (Ve.current - 1) * Ve.pageSize;
5142
- return gn.slice(e, e + Ve.pageSize);
5143
- }, [
5144
- gn,
5145
5133
  tn,
5146
- Ve.current,
5147
- Ve.pageSize
5148
- ]), vn = tn ? gn.length : At, yn = ke.trim().length >= 3, xn = String(gn.length).padStart(2, "0"), Sn = At > 0 || kt.length > 0, Cn = Vt ? St ? "Invalid module name or data could not be loaded." : Jt ? "Field configuration failed to load." : "No data found." : "Please provide a module name to view data.", wn = L(() => {
5149
- let t = Array.isArray(v) ? v : [];
5150
- return t.length ? t : ut.length ? ut : [{
5134
+ rn,
5135
+ Mt,
5136
+ dn,
5137
+ Ae,
5138
+ re
5139
+ ]), xn = L(() => {
5140
+ if (!an) return yn;
5141
+ let e = (We.current - 1) * We.pageSize;
5142
+ return yn.slice(e, e + We.pageSize);
5143
+ }, [
5144
+ yn,
5145
+ an,
5146
+ We.current,
5147
+ We.pageSize
5148
+ ]), Sn = an ? yn.length : Nt, Cn = Me.trim().length >= 3, wn = String(yn.length).padStart(2, "0"), Tn = Nt > 0 || Mt.length > 0, En = Wt ? Tt ? "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.", Dn = L(() => {
5149
+ let t = Array.isArray(x) ? x : [];
5150
+ return t.length ? t : pt.length ? pt : [{
5151
5151
  key: "all",
5152
5152
  title: e ?? "List",
5153
- count: vn
5153
+ count: Sn
5154
5154
  }];
5155
5155
  }, [
5156
5156
  e,
5157
- ut,
5158
- vn,
5159
- v
5157
+ pt,
5158
+ Sn,
5159
+ x
5160
5160
  ]);
5161
5161
  I(() => {
5162
- if (!wn.length) return;
5163
- let e = Rd(Te);
5164
- if (!wn.some((t, n) => Rd(Ld(t, n)) === e)) {
5165
- let e = Ld(wn[0], 0);
5166
- e && Ee(String(e));
5167
- }
5168
- }, [Te, wn]), I(() => {
5169
- if (le === void 0 || !wn.length || le === et.current) return;
5170
- et.current = le;
5171
- let e = wn.find((e, t) => Rd(Ld(e, t)) === Rd(le)), t = e ? String(Ld(e, wn.indexOf(e))) : "";
5172
- t && Ee((e) => t === e ? e : t);
5173
- }, [wn, le]);
5174
- let Tn = (e) => {
5175
- ge("/popup/preview", { state: {
5176
- background: _e,
5177
- moduleName: ve,
5162
+ if (!Dn.length) return;
5163
+ let e = Rd(Oe);
5164
+ if (!Dn.some((t, n) => Rd(Ld(t, n)) === e)) {
5165
+ let e = Ld(Dn[0], 0);
5166
+ e && ke(String(e));
5167
+ }
5168
+ }, [Oe, Dn]), I(() => {
5169
+ if (fe === void 0 || !Dn.length || fe === rt.current) return;
5170
+ rt.current = fe;
5171
+ let e = Dn.find((e, t) => Rd(Ld(e, t)) === Rd(fe)), t = e ? String(Ld(e, Dn.indexOf(e))) : "";
5172
+ t && ke((e) => t === e ? e : t);
5173
+ }, [Dn, fe]);
5174
+ let On = (e) => {
5175
+ ye("/popup/preview", { state: {
5176
+ background: be,
5177
+ moduleName: F,
5178
5178
  record: e,
5179
- fields: sn
5179
+ fields: dn
5180
5180
  } });
5181
- }, En = (e, t) => {
5181
+ }, kn = (e, t) => {
5182
5182
  let n = ed(e, t), r = n.startsWith("/") ? n : `/${n}`, i = t?._id ?? t?.id;
5183
- ge(r, { state: {
5184
- background: _e,
5183
+ ye(r, { state: {
5184
+ background: be,
5185
5185
  selectedIds: i === void 0 ? [] : [i],
5186
5186
  selectedRecords: [t],
5187
- moduleName: ve,
5187
+ moduleName: F,
5188
5188
  popupContext: {},
5189
5189
  popupAction: {}
5190
5190
  } });
5191
- }, Dn = L(() => {
5191
+ }, An = L(() => {
5192
5192
  let e = {
5193
5193
  dataIndex: "icons",
5194
5194
  key: "icons",
@@ -5202,7 +5202,7 @@ function pf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5202
5202
  type: "button",
5203
5203
  className: "job-row-eye-button",
5204
5204
  "aria-label": "Preview job",
5205
- onClick: () => Tn(t),
5205
+ onClick: () => On(t),
5206
5206
  children: /* @__PURE__ */ X("img", {
5207
5207
  src: ju,
5208
5208
  alt: "",
@@ -5213,69 +5213,69 @@ function pf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5213
5213
  children: /* @__PURE__ */ X(Pi, { className: "job-row-linkedin-icon" })
5214
5214
  })]
5215
5215
  })
5216
- }, t = sn.filter((e) => fn.includes(e.key)).map((e, t) => {
5217
- let n = Ue.sort === e.key ? Ue.sortDir : "";
5216
+ }, t = dn.filter((e) => hn.includes(e.key)).map((e, t) => {
5217
+ let n = Ke.sort === e.key ? Ke.sortDir : "";
5218
5218
  return {
5219
5219
  title: ef({
5220
5220
  label: e.label,
5221
5221
  sortDir: n,
5222
- sortable: Sn,
5223
- onSort: () => Yt(e.key)
5222
+ sortable: Tn,
5223
+ onSort: () => Qt(e.key)
5224
5224
  }),
5225
5225
  dataIndex: e.key,
5226
5226
  key: e.key,
5227
5227
  fixed: t === 0 ? "left" : void 0,
5228
5228
  ellipsis: { showTitle: !1 },
5229
- width: Fd(e, _n),
5230
- render: (t, n) => Dd(e, n, ke, En, {
5231
- canAdd: be,
5232
- canEdit: F,
5233
- canDelete: xe
5234
- }, It, $t)
5229
+ width: Fd(e, xn),
5230
+ render: (t, n) => Dd(e, n, Me, kn, {
5231
+ canAdd: Se,
5232
+ canEdit: Ce,
5233
+ canDelete: we
5234
+ }, zt, nn)
5235
5235
  };
5236
5236
  });
5237
- if (!(mn || Ot) && Qe > 0 && t.length > 0) {
5238
- let n = e.width + (Sn && se === "checkbox" ? 48 : 0) + Pd, r = t.reduce((e, t) => e + t.width, 0), i = Qe - n - r;
5237
+ if (!(_n || jt) && tt > 0 && t.length > 0) {
5238
+ let n = e.width + (Tn && le === "checkbox" ? 48 : 0) + Pd, r = t.reduce((e, t) => e + t.width, 0), i = tt - n - r;
5239
5239
  i > 0 && r > 0 && t.forEach((e) => {
5240
5240
  e.width = Math.floor(e.width + i * (e.width / r));
5241
5241
  });
5242
5242
  }
5243
5243
  return [e, ...t];
5244
5244
  }, [
5245
- Te,
5245
+ Oe,
5246
+ Se,
5247
+ we,
5248
+ Ce,
5249
+ Me,
5250
+ zt,
5251
+ Qt,
5252
+ _n,
5253
+ Tn,
5254
+ jt,
5246
5255
  be,
5247
- xe,
5248
- F,
5249
- ke,
5250
- It,
5251
- Yt,
5252
- mn,
5253
- Sn,
5254
- Ot,
5255
- _e,
5256
5256
  e,
5257
- ge,
5258
- sn,
5259
- _n,
5260
- se,
5261
- Ue.sort,
5262
- Ue.sortDir,
5263
- Qe,
5264
- zt,
5265
- fn
5266
- ]), On = Gn((e) => {
5267
- let t = wn.find((t, n) => Rd(Ld(t, n)) === Rd(e)), n = String(t ? Ld(t, wn.indexOf(t)) : e);
5268
- if (Ee(n), Ie([]), Re([]), Gt(), typeof ue == "function") {
5257
+ ye,
5258
+ dn,
5259
+ xn,
5260
+ le,
5261
+ Ke.sort,
5262
+ Ke.sortDir,
5263
+ tt,
5264
+ Ht,
5265
+ hn
5266
+ ]), jn = Gn((e) => {
5267
+ let t = Dn.find((t, n) => Rd(Ld(t, n)) === Rd(e)), n = String(t ? Ld(t, Dn.indexOf(t)) : e);
5268
+ if (ke(n), ze([]), Ve([]), Jt(), typeof pe == "function") {
5269
5269
  let e = t?.key ?? t?.value ?? t?.id ?? n;
5270
- et.current = e, ue(e);
5270
+ rt.current = e, pe(e);
5271
5271
  }
5272
5272
  }, [
5273
- ue,
5274
- wn,
5275
- Gt
5273
+ pe,
5274
+ Dn,
5275
+ Jt
5276
5276
  ]);
5277
- function kn(e, t, n) {
5278
- let r = Rt.get(String(e));
5277
+ function Mn(e, t, n) {
5278
+ let r = Vt.get(String(e));
5279
5279
  if (r && r.actionType !== "group") {
5280
5280
  if (typeof u == "function" && u({
5281
5281
  key: r.key,
@@ -5304,18 +5304,18 @@ function pf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5304
5304
  records: n
5305
5305
  })
5306
5306
  }).then(() => {
5307
- J.success(`${r.label} completed`), Be((e) => e + 1);
5307
+ J.success(`${r.label} completed`), Ue((e) => e + 1);
5308
5308
  }).catch((e) => J.error(e.message || `${r.label} failed`));
5309
5309
  return;
5310
5310
  }
5311
5311
  if (r.route) {
5312
5312
  let e = n[0] ?? {}, i = ed(r.route, e), a = i.startsWith("/") ? i : `/${i}`;
5313
5313
  if (r.route.startsWith("/popup/") || r.route.startsWith("popup/")) {
5314
- ge(a, { state: {
5315
- background: _e,
5314
+ ye(a, { state: {
5315
+ background: be,
5316
5316
  selectedIds: t,
5317
5317
  selectedRecords: n,
5318
- moduleName: ve,
5318
+ moduleName: F,
5319
5319
  popupContext: r.popupState ?? {},
5320
5320
  popupAction: {
5321
5321
  key: r.key,
@@ -5327,83 +5327,85 @@ function pf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5327
5327
  } });
5328
5328
  return;
5329
5329
  }
5330
- ge(a);
5330
+ ye(a);
5331
5331
  }
5332
5332
  }
5333
5333
  }
5334
- function An({ key: e }) {
5335
- let t = Yd(Bt).find((t) => String(t.key) === String(e));
5336
- t && qd(t, Le, Te) || kn(e, Fe, Le);
5334
+ function Nn({ key: e }) {
5335
+ let t = Yd(Ut).find((t) => String(t.key) === String(e));
5336
+ t && qd(t, Be, Oe) || Mn(e, Re, Be);
5337
5337
  }
5338
- let jn = fn.length === ln.length, Mn = fn.length > 0 && !jn, Nn = (e, t) => {
5339
- Ke((n) => {
5340
- let r = ln.slice(0, me).map((e) => e.key), i = n.length ? n : r;
5341
- return t ? i.includes(e) ? i : [...i, e] : i.length <= pn ? i : i.filter((t) => t !== e);
5338
+ let Pn = hn.length === fn.length, Fn = hn.length > 0 && !Pn, In = (e, t) => {
5339
+ Ye((n) => {
5340
+ let r = fn.slice(0, _e).map((e) => e.key), i = n.length ? n : r;
5341
+ return t ? i.includes(e) ? i : [...i, e] : i.length <= gn ? i : i.filter((t) => t !== e);
5342
5342
  });
5343
- }, Pn = () => {
5343
+ }, Ln = () => {
5344
5344
  if (typeof f == "function") {
5345
5345
  f();
5346
5346
  return;
5347
5347
  }
5348
5348
  if (_) {
5349
- ge(_);
5349
+ ye(_);
5350
5350
  return;
5351
5351
  }
5352
- Dt(!0);
5352
+ At(!0);
5353
+ }, Rn = () => {
5354
+ b && ye(b);
5353
5355
  };
5354
5356
  I(() => {
5355
- if (!Et) return;
5357
+ if (!kt) return;
5356
5358
  let e = (e) => {
5357
- e.key === "Escape" && Dt(!1);
5359
+ e.key === "Escape" && At(!1);
5358
5360
  };
5359
5361
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
5360
- }, [Et]);
5361
- let Fn = () => {
5362
- on && (st(wt.rows), lt(wt.total), dt(wt.tabs), pt(wt.fields), ht(wt.tabField), _t(wt.actions ?? []), yt(wt.actionRules ?? []), Ct(null), xt(!1));
5363
- }, In = (e) => {
5364
- let t = e.target.value, n = t.trim().length < 3, r = Ne.some((e) => e.field);
5365
- n && (Ae(""), r || Fn()), Oe(t), Gt();
5366
- }, Ln = () => {
5367
- let e = De.trim();
5368
- e.length >= 3 && (Ae(e), Gt());
5369
- }, Rn = () => {
5370
- Fn(), Pe([]), at([], []), Gt();
5362
+ }, [kt]);
5363
+ let zn = () => {
5364
+ un && (ut(Dt.rows), ft(Dt.total), mt(Dt.tabs), gt(Dt.fields), vt(Dt.tabField), bt(Dt.actions ?? []), St(Dt.actionRules ?? []), Et(null), wt(!1));
5365
+ }, Bn = (e) => {
5366
+ let t = e.target.value, n = t.trim().length < 3, r = Ie.some((e) => e.field);
5367
+ n && (Ne(""), r || zn()), je(t), Jt();
5368
+ }, Vn = () => {
5369
+ let e = Ae.trim();
5370
+ e.length >= 3 && (Ne(e), Jt());
5371
+ }, Hn = () => {
5372
+ zn(), Le([]), ct([], []), Jt();
5371
5373
  };
5372
5374
  I(() => {
5373
- Pt === "card" && (Xe([]), at([], []));
5375
+ Lt === "card" && ($e([]), ct([], []));
5374
5376
  }, [
5375
- Ve.current,
5376
- Ve.pageSize,
5377
- Te,
5378
- Pt
5377
+ We.current,
5378
+ We.pageSize,
5379
+ Oe,
5380
+ Lt
5379
5381
  ]);
5380
- let zn = (e) => {
5381
- Xe((t) => {
5382
+ let Un = (e) => {
5383
+ $e((t) => {
5382
5384
  let n = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
5383
- return at(n, _n.filter((e, t) => n.includes(String(Vd(e, t, p))))), n;
5385
+ return ct(n, xn.filter((e, t) => n.includes(String(Vd(e, t, p))))), n;
5384
5386
  });
5385
- }, Bn = /* @__PURE__ */ Z("div", {
5387
+ }, Wn = /* @__PURE__ */ Z("div", {
5386
5388
  className: "column-visibility-menu",
5387
5389
  onClick: (e) => e.stopPropagation(),
5388
5390
  children: [/* @__PURE__ */ X(er, {
5389
- checked: jn,
5390
- indeterminate: Mn,
5391
+ checked: Pn,
5392
+ indeterminate: Fn,
5391
5393
  onChange: (e) => {
5392
- Ke(e.target.checked ? ln.map((e) => e.key) : ln.slice(0, me).map((e) => e.key));
5394
+ Ye(e.target.checked ? fn.map((e) => e.key) : fn.slice(0, _e).map((e) => e.key));
5393
5395
  },
5394
5396
  children: "Select All"
5395
5397
  }), /* @__PURE__ */ X("div", {
5396
5398
  className: "column-visibility-menu__list",
5397
- children: ln.map((e) => /* @__PURE__ */ X(er, {
5398
- checked: fn.includes(e.key),
5399
- disabled: fn.includes(e.key) && fn.length <= pn,
5400
- onChange: (t) => Nn(e.key, t.target.checked),
5399
+ children: fn.map((e) => /* @__PURE__ */ X(er, {
5400
+ checked: hn.includes(e.key),
5401
+ disabled: hn.includes(e.key) && hn.length <= gn,
5402
+ onChange: (t) => In(e.key, t.target.checked),
5401
5403
  children: e.label
5402
5404
  }, e.key))
5403
5405
  })]
5404
5406
  });
5405
5407
  return /* @__PURE__ */ Z("div", {
5406
- className: `antd dynamic-list-view${P ? " list-view--compact" : ""} ${c}`.trim(),
5408
+ className: `antd dynamic-list-view${ue ? " list-view--compact" : ""} ${c}`.trim(),
5407
5409
  children: [
5408
5410
  i.length > 0 && /* @__PURE__ */ X("div", {
5409
5411
  className: "job-list-header",
@@ -5415,82 +5417,88 @@ function pf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5415
5417
  align: "center",
5416
5418
  justify: "space-between",
5417
5419
  children: [/* @__PURE__ */ X(ao, {
5418
- activeKey: Te,
5419
- tabs: wn,
5420
- onChange: On
5420
+ activeKey: Oe,
5421
+ tabs: Dn,
5422
+ onChange: jn
5421
5423
  }), /* @__PURE__ */ Z(sr, {
5422
5424
  align: "center",
5423
5425
  gap: 8,
5424
5426
  children: [
5425
- j,
5426
- Sn && /* @__PURE__ */ X(H, {
5427
+ N,
5428
+ Tn && /* @__PURE__ */ X(H, {
5427
5429
  prefix: /* @__PURE__ */ X(ra, { className: "job-search-icon" }),
5428
- placeholder: M,
5429
- value: De,
5430
- onChange: In,
5431
- onPressEnter: Ln,
5430
+ placeholder: ne,
5431
+ value: Ae,
5432
+ onChange: Bn,
5433
+ onPressEnter: Vn,
5432
5434
  allowClear: !0,
5433
5435
  className: "job-search-input"
5434
5436
  }),
5435
- !Ot && be && he && /* @__PURE__ */ X(q, {
5437
+ !jt && Se && ve && /* @__PURE__ */ X(q, {
5436
5438
  title: "Add",
5437
5439
  children: /* @__PURE__ */ X(z, {
5438
5440
  "aria-label": "Add",
5439
5441
  className: "job-toolbar-icon-button",
5440
5442
  icon: /* @__PURE__ */ X(Ki, {}),
5441
5443
  onClick: () => {
5442
- Ht && ge(Ht);
5444
+ Gt && ye(Gt);
5443
5445
  }
5444
5446
  })
5445
5447
  }),
5446
- Sn && /* @__PURE__ */ X(q, {
5448
+ Tn && /* @__PURE__ */ X(q, {
5447
5449
  title: "Filter",
5448
5450
  children: /* @__PURE__ */ X(Zn, {
5449
- count: Ne.filter((e) => e.field && lf(e)).length,
5451
+ count: Ie.filter((e) => e.field && lf(e)).length,
5450
5452
  size: "small",
5451
5453
  offset: [-2, 2],
5452
5454
  children: /* @__PURE__ */ X(z, {
5453
5455
  "aria-label": "Filter",
5454
5456
  className: "job-toolbar-icon-button",
5455
5457
  icon: /* @__PURE__ */ X(wi, {}),
5456
- onClick: () => Me(!0)
5458
+ onClick: () => Fe(!0)
5457
5459
  })
5458
5460
  })
5459
5461
  }),
5460
- te && Sn && /* @__PURE__ */ Z(sr, {
5462
+ ie && Tn && /* @__PURE__ */ Z(sr, {
5461
5463
  align: "center",
5462
5464
  gap: 6,
5463
5465
  children: [/* @__PURE__ */ X(q, {
5464
5466
  title: "List View",
5465
5467
  children: /* @__PURE__ */ X(z, {
5466
- className: `job-toolbar-icon-button param-view-toggle-btn${Pt === "list" ? " param-view-toggle-btn--active" : ""}`,
5468
+ className: `job-toolbar-icon-button param-view-toggle-btn${Lt === "list" ? " param-view-toggle-btn--active" : ""}`,
5467
5469
  icon: /* @__PURE__ */ X(va, {}),
5468
5470
  onClick: () => {
5469
- re?.("list"), Xe([]), at([], []);
5471
+ oe?.("list"), $e([]), ct([], []);
5470
5472
  }
5471
5473
  })
5472
5474
  }), /* @__PURE__ */ X(q, {
5473
5475
  title: "Card View",
5474
5476
  children: /* @__PURE__ */ X(z, {
5475
- className: `job-toolbar-icon-button param-view-toggle-btn${Pt === "card" ? " param-view-toggle-btn--active" : ""}`,
5477
+ className: `job-toolbar-icon-button param-view-toggle-btn${Lt === "card" ? " param-view-toggle-btn--active" : ""}`,
5476
5478
  icon: /* @__PURE__ */ X(Nr, {}),
5477
5479
  onClick: () => {
5478
- re?.("card"), Xe([]), at([], []);
5480
+ oe?.("card"), $e([]), ct([], []);
5479
5481
  }
5480
5482
  })
5481
5483
  })]
5482
5484
  }),
5483
- m && Sn && /* @__PURE__ */ X(z, {
5485
+ m && Tn && /* @__PURE__ */ X(z, {
5484
5486
  className: "job-summary-button",
5485
5487
  type: "primary",
5486
- onClick: Pn,
5488
+ onClick: Ln,
5487
5489
  children: g
5490
+ }),
5491
+ v && Tn && b && /* @__PURE__ */ X(z, {
5492
+ className: "job-summary-button",
5493
+ type: "primary",
5494
+ onClick: Rn,
5495
+ children: y
5488
5496
  })
5489
5497
  ]
5490
5498
  })]
5491
5499
  })
5492
5500
  }),
5493
- Sn && /* @__PURE__ */ X(Y, { children: /* @__PURE__ */ X($n, {
5501
+ Tn && /* @__PURE__ */ X(Y, { children: /* @__PURE__ */ X($n, {
5494
5502
  className: "job-toolbar-card",
5495
5503
  children: /* @__PURE__ */ Z(sr, {
5496
5504
  className: "p-flex",
@@ -5500,24 +5508,24 @@ function pf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5500
5508
  align: "center",
5501
5509
  gap: 3,
5502
5510
  children: [
5503
- Pt === "card" && /* @__PURE__ */ X(er, {
5504
- checked: _n.length > 0 && Ye.length >= _n.length,
5505
- indeterminate: Ye.length > 0 && Ye.length < _n.length,
5511
+ Lt === "card" && /* @__PURE__ */ X(er, {
5512
+ checked: xn.length > 0 && Qe.length >= xn.length,
5513
+ indeterminate: Qe.length > 0 && Qe.length < xn.length,
5506
5514
  className: "param-card-view__select-all",
5507
5515
  onChange: () => {
5508
- if (Ye.length > 0) Xe([]), at([], []);
5516
+ if (Qe.length > 0) $e([]), ct([], []);
5509
5517
  else {
5510
- let e = _n.map((e, t) => String(Vd(e, t, p)));
5511
- Xe(e), at(e, [..._n]);
5518
+ let e = xn.map((e, t) => String(Vd(e, t, p)));
5519
+ $e(e), ct(e, [...xn]);
5512
5520
  }
5513
5521
  },
5514
5522
  children: "Select All"
5515
5523
  }),
5516
5524
  /* @__PURE__ */ X(ar, {
5517
- open: qe,
5518
- onOpenChange: Je,
5525
+ open: Xe,
5526
+ onOpenChange: Ze,
5519
5527
  trigger: ["click"],
5520
- dropdownRender: () => Bn,
5528
+ dropdownRender: () => Wn,
5521
5529
  placement: "bottomLeft",
5522
5530
  overlayClassName: "column-visibility-dropdown",
5523
5531
  children: /* @__PURE__ */ X(z, {
@@ -5533,10 +5541,10 @@ function pf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5533
5541
  children: /* @__PURE__ */ X(si, { className: "job-actions-caret" })
5534
5542
  })
5535
5543
  }),
5536
- Bt.length > 0 && Fe.length > 0 && /* @__PURE__ */ X(ar, {
5544
+ Ut.length > 0 && Re.length > 0 && /* @__PURE__ */ X(ar, {
5537
5545
  menu: {
5538
- items: Bt.map((e) => Kd(e, qd(e, Le, Te))),
5539
- onClick: An
5546
+ items: Ut.map((e) => Kd(e, qd(e, Be, Oe))),
5547
+ onClick: Nn
5540
5548
  },
5541
5549
  trigger: ["click"],
5542
5550
  children: /* @__PURE__ */ Z(z, {
@@ -5554,152 +5562,152 @@ function pf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5554
5562
  ]
5555
5563
  })
5556
5564
  }),
5557
- Fe.length > 0 && /* @__PURE__ */ Z(Nu, {
5565
+ Re.length > 0 && /* @__PURE__ */ Z(Nu, {
5558
5566
  className: "job-selected-count",
5559
5567
  children: [
5560
5568
  "Selected (",
5561
- Fe.length,
5569
+ Re.length,
5562
5570
  ")"
5563
5571
  ]
5564
5572
  })
5565
5573
  ]
5566
- }), yn && /* @__PURE__ */ Z(Nu, {
5574
+ }), Cn && /* @__PURE__ */ Z(Nu, {
5567
5575
  className: "job-search-results-count",
5568
5576
  children: [
5569
5577
  "Search Results (",
5570
- xn,
5578
+ wn,
5571
5579
  ")"
5572
5580
  ]
5573
5581
  })]
5574
5582
  })
5575
5583
  }) }),
5576
- rn && /* @__PURE__ */ X(ff, {
5577
- filters: Ne,
5584
+ sn && /* @__PURE__ */ X(ff, {
5585
+ filters: Ie,
5578
5586
  onRemove: (e) => {
5579
- Pe(Ne.filter((t, n) => n !== e)), Gt();
5587
+ Le(Ie.filter((t, n) => n !== e)), Jt();
5580
5588
  },
5581
- onClearAll: Rn
5589
+ onClearAll: Hn
5582
5590
  }),
5583
5591
  /* @__PURE__ */ X("div", {
5584
- ref: Ze,
5592
+ ref: et,
5585
5593
  className: "job-table-measure",
5586
5594
  children: /* @__PURE__ */ X(br, {
5587
- spinning: Ot ? w : qt || bt,
5588
- children: Pt === "card" ? _n.length === 0 ? /* @__PURE__ */ X(or, {
5595
+ spinning: jt ? D : Xt || Ct,
5596
+ children: Lt === "card" ? xn.length === 0 ? /* @__PURE__ */ X(or, {
5589
5597
  image: or.PRESENTED_IMAGE_SIMPLE,
5590
- description: Cn,
5598
+ description: En,
5591
5599
  className: "param-card-view__empty",
5592
- children: !Ot && be && he && Ht && !St && /* @__PURE__ */ X(z, {
5600
+ children: !jt && Se && ve && Gt && !Tt && /* @__PURE__ */ X(z, {
5593
5601
  type: "primary",
5594
5602
  icon: /* @__PURE__ */ X(Ki, {}),
5595
- onClick: () => ge(Ht),
5603
+ onClick: () => ye(Gt),
5596
5604
  children: "Add New"
5597
5605
  })
5598
5606
  }) : /* @__PURE__ */ X("div", {
5599
5607
  className: "param-card-view__grid",
5600
- children: _n.map((e, t) => {
5608
+ children: xn.map((e, t) => {
5601
5609
  let n = String(Vd(e, t, p));
5602
5610
  return /* @__PURE__ */ X(cf, {
5603
5611
  record: e,
5604
- fields: hn,
5605
- selected: se === "checkbox" ? Ye.includes(n) : nt(e, t),
5606
- isControlled: Ot,
5607
- onPreview: () => Tn(e),
5608
- onSelect: () => zn(n),
5609
- onPopupAction: En,
5610
- onRecordClick: ae ? () => rt(e, t) : void 0,
5611
- selectionMode: se,
5612
+ fields: vn,
5613
+ selected: le === "checkbox" ? Qe.includes(n) : ot(e, t),
5614
+ isControlled: jt,
5615
+ onPreview: () => On(e),
5616
+ onSelect: () => Un(n),
5617
+ onPopupAction: kn,
5618
+ onRecordClick: P ? () => st(e, t) : void 0,
5619
+ selectionMode: le,
5612
5620
  permissions: {
5613
- canAdd: be,
5614
- canEdit: F,
5615
- canDelete: xe
5621
+ canAdd: Se,
5622
+ canEdit: Ce,
5623
+ canDelete: we
5616
5624
  }
5617
5625
  }, n);
5618
5626
  })
5619
5627
  }) : /* @__PURE__ */ X(Cr, {
5620
- rowSelection: Sn && se === "checkbox" ? {
5628
+ rowSelection: Tn && le === "checkbox" ? {
5621
5629
  type: "checkbox",
5622
5630
  fixed: !0,
5623
5631
  columnWidth: 48,
5624
- selectedRowKeys: Fe,
5632
+ selectedRowKeys: Re,
5625
5633
  onChange: (e, t) => {
5626
- at(e, t);
5634
+ ct(e, t);
5627
5635
  },
5628
5636
  columnTitle: (() => {
5629
- let e = _n.length, t = e > 0 && Fe.length >= e, n = Fe.length > 0 && !t;
5637
+ let e = xn.length, t = e > 0 && Re.length >= e, n = Re.length > 0 && !t;
5630
5638
  return /* @__PURE__ */ X(er, {
5631
5639
  checked: t,
5632
5640
  indeterminate: n,
5633
5641
  onChange: () => {
5634
- n || t ? at([], []) : at(_n.map((e, t) => Vd(e, t, p)), [..._n]);
5642
+ n || t ? ct([], []) : ct(xn.map((e, t) => Vd(e, t, p)), [...xn]);
5635
5643
  }
5636
5644
  });
5637
5645
  })()
5638
5646
  } : void 0,
5639
- columns: Dn,
5640
- dataSource: _n,
5647
+ columns: An,
5648
+ dataSource: xn,
5641
5649
  size: "middle",
5642
5650
  tableLayout: "fixed",
5643
5651
  scroll: {
5644
- x: mn || Ot ? "max-content" : void 0,
5652
+ x: _n || jt ? "max-content" : void 0,
5645
5653
  y: "calc(100vh - 300px)"
5646
5654
  },
5647
5655
  pagination: !1,
5648
5656
  locale: { emptyText: /* @__PURE__ */ X(or, {
5649
5657
  image: or.PRESENTED_IMAGE_SIMPLE,
5650
- description: Cn
5658
+ description: En
5651
5659
  }) },
5652
- className: `${y} ${P ? "list-view-table--compact" : ""}`.trim(),
5653
- onRow: ae ? (e, t) => ({
5660
+ className: `${S} ${ue ? "list-view-table--compact" : ""}`.trim(),
5661
+ onRow: P ? (e, t) => ({
5654
5662
  onClick: (n) => {
5655
- Hd(n.target) || rt(e, t);
5663
+ Hd(n.target) || st(e, t);
5656
5664
  },
5657
- "aria-selected": nt(e, t)
5665
+ "aria-selected": ot(e, t)
5658
5666
  }) : void 0,
5659
- rowClassName: oe == null ? void 0 : (e, t) => nt(e, t) ? "list-view-row--active" : "",
5667
+ rowClassName: ce == null ? void 0 : (e, t) => ot(e, t) ? "list-view-row--active" : "",
5660
5668
  rowKey: (e, t) => Vd(e, t, p)
5661
5669
  })
5662
5670
  })
5663
5671
  }),
5664
- Sn ? /* @__PURE__ */ X(Ko, {
5665
- current: Ve.current,
5666
- pageSize: Ve.pageSize,
5667
- total: vn,
5672
+ Tn ? /* @__PURE__ */ X(Ko, {
5673
+ current: We.current,
5674
+ pageSize: We.pageSize,
5675
+ total: Sn,
5668
5676
  onChange: (e, t) => {
5669
- if (Ot && typeof O == "function") {
5670
- O(e, t ?? Ve.pageSize);
5677
+ if (jt && typeof j == "function") {
5678
+ j(e, t ?? We.pageSize);
5671
5679
  return;
5672
5680
  }
5673
- Wt(e);
5681
+ qt(e);
5674
5682
  },
5675
5683
  onPageSizeChange: (e) => {
5676
- if (Ot && typeof k == "function") {
5677
- k(e);
5684
+ if (jt && typeof ee == "function") {
5685
+ ee(e);
5678
5686
  return;
5679
5687
  }
5680
- He({
5688
+ Ge({
5681
5689
  current: 1,
5682
5690
  pageSize: e
5683
- }), Ut(1, { replace: !0 });
5691
+ }), Kt(1, { replace: !0 });
5684
5692
  }
5685
5693
  }) : void 0,
5686
5694
  /* @__PURE__ */ X(Au, {
5687
- moduleName: ve,
5688
- open: je,
5689
- filters: Ne,
5690
- onClose: () => Me(!1),
5695
+ moduleName: F,
5696
+ open: Pe,
5697
+ filters: Ie,
5698
+ onClose: () => Fe(!1),
5691
5699
  onApply: ({ filters: e }) => {
5692
- Pe(e), Gt();
5700
+ Le(e), Jt();
5693
5701
  },
5694
- onReset: Rn
5702
+ onReset: Hn
5695
5703
  }),
5696
5704
  /* @__PURE__ */ X(_u, {
5697
- moduleName: ve,
5698
- open: Et,
5699
- rows: ot,
5700
- tabs: wn,
5701
- total: vn,
5702
- onClose: () => Dt(!1)
5705
+ moduleName: F,
5706
+ open: kt,
5707
+ rows: lt,
5708
+ tabs: Dn,
5709
+ total: Sn,
5710
+ onClose: () => At(!1)
5703
5711
  })
5704
5712
  ]
5705
5713
  });