@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.cjs +5 -5
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +352 -344
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
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: _,
|
|
4924
|
-
let
|
|
4925
|
-
current:
|
|
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
|
-
}), [
|
|
4927
|
+
}), [Ke, qe] = R({
|
|
4928
4928
|
sort: "",
|
|
4929
4929
|
sortDir: ""
|
|
4930
|
-
}), [
|
|
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
|
|
4934
|
+
let et = qn(null), [tt, nt] = R(0), rt = qn();
|
|
4935
4935
|
I(() => {
|
|
4936
|
-
let e =
|
|
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" &&
|
|
4940
|
+
typeof t == "number" && nt(t);
|
|
4941
4941
|
});
|
|
4942
4942
|
return t.observe(e), () => t.disconnect();
|
|
4943
4943
|
}, []);
|
|
4944
|
-
let
|
|
4945
|
-
let n =
|
|
4946
|
-
n &&
|
|
4947
|
-
},
|
|
4948
|
-
|
|
4949
|
-
}, [
|
|
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" && !
|
|
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
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
]),
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
]),
|
|
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
|
-
|
|
4967
|
+
Wt && !xe && ye("/", { replace: !0 });
|
|
4968
4968
|
}, [
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4969
|
+
xe,
|
|
4970
|
+
Wt,
|
|
4971
|
+
ye
|
|
4972
4972
|
]);
|
|
4973
|
-
let
|
|
4974
|
-
let n = new URLSearchParams(
|
|
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 !==
|
|
4978
|
-
pathname:
|
|
4977
|
+
r !== be.search.replace(/^\?/, "") && ye({
|
|
4978
|
+
pathname: be.pathname,
|
|
4979
4979
|
search: r ? `?${r}` : ""
|
|
4980
4980
|
}, { replace: t });
|
|
4981
|
-
},
|
|
4982
|
-
|
|
4981
|
+
}, qt = (e, t) => {
|
|
4982
|
+
Ge((t) => ({
|
|
4983
4983
|
...t,
|
|
4984
4984
|
current: e
|
|
4985
|
-
})),
|
|
4986
|
-
},
|
|
4987
|
-
|
|
4988
|
-
}, { config:
|
|
4989
|
-
let t =
|
|
4990
|
-
|
|
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
|
|
4993
|
+
}), typeof M == "function" && M(r, n), Jt();
|
|
4994
4994
|
}, [
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4995
|
+
M,
|
|
4996
|
+
Jt,
|
|
4997
|
+
Ke.sort,
|
|
4998
|
+
Ke.sortDir
|
|
4999
4999
|
]);
|
|
5000
5000
|
I(() => {
|
|
5001
|
-
|
|
5001
|
+
Ge((e) => e.current === De ? e : {
|
|
5002
5002
|
...e,
|
|
5003
|
-
current:
|
|
5003
|
+
current: De
|
|
5004
5004
|
});
|
|
5005
|
-
}, [
|
|
5006
|
-
|
|
5007
|
-
let t = nf(
|
|
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
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5014
|
+
k,
|
|
5015
|
+
A,
|
|
5016
|
+
jt
|
|
5017
5017
|
]);
|
|
5018
|
-
let
|
|
5018
|
+
let $t = be.state?.refreshTimestamp;
|
|
5019
5019
|
I(() => {
|
|
5020
|
-
|
|
5021
|
-
}, [
|
|
5022
|
-
let
|
|
5023
|
-
let e = [...Array.isArray(
|
|
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
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
]),
|
|
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:
|
|
5032
|
-
pageSize:
|
|
5033
|
-
sort:
|
|
5034
|
-
sortDir:
|
|
5035
|
-
queryParams:
|
|
5036
|
-
}),
|
|
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 (
|
|
5039
|
-
if (!
|
|
5040
|
-
|
|
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 =
|
|
5044
|
-
return
|
|
5045
|
-
scope:
|
|
5046
|
-
sort:
|
|
5047
|
-
sortDir:
|
|
5048
|
-
search:
|
|
5049
|
-
filters:
|
|
5050
|
-
queryParams:
|
|
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 } =
|
|
5054
|
-
|
|
5055
|
-
key:
|
|
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 || (
|
|
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 ||
|
|
5067
|
+
t || wt(!1);
|
|
5068
5068
|
}), () => {
|
|
5069
5069
|
t = !0;
|
|
5070
5070
|
};
|
|
5071
5071
|
}, [
|
|
5072
|
+
on,
|
|
5072
5073
|
nn,
|
|
5073
|
-
|
|
5074
|
-
|
|
5074
|
+
Ie,
|
|
5075
|
+
ln,
|
|
5076
|
+
me,
|
|
5077
|
+
sn,
|
|
5075
5078
|
an,
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
tn,
|
|
5079
|
-
Vt,
|
|
5080
|
-
on,
|
|
5079
|
+
Wt,
|
|
5080
|
+
un,
|
|
5081
5081
|
e,
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5082
|
+
dt,
|
|
5083
|
+
We.current,
|
|
5084
|
+
We.pageSize,
|
|
5085
|
+
He,
|
|
5086
|
+
he,
|
|
5087
|
+
Ke.sort,
|
|
5088
|
+
Ke.sortDir,
|
|
5089
|
+
Te
|
|
5090
5090
|
]);
|
|
5091
|
-
let
|
|
5092
|
-
let e =
|
|
5093
|
-
let t = Fu(e), n = i.get(t) ?? {}, r = t &&
|
|
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(
|
|
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
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
]),
|
|
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
|
-
})), [
|
|
5128
|
-
let e =
|
|
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
|
-
|
|
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
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
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:
|
|
5153
|
+
count: Sn
|
|
5154
5154
|
}];
|
|
5155
5155
|
}, [
|
|
5156
5156
|
e,
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5157
|
+
pt,
|
|
5158
|
+
Sn,
|
|
5159
|
+
x
|
|
5160
5160
|
]);
|
|
5161
5161
|
I(() => {
|
|
5162
|
-
if (!
|
|
5163
|
-
let e = Rd(
|
|
5164
|
-
if (!
|
|
5165
|
-
let e = Ld(
|
|
5166
|
-
e &&
|
|
5167
|
-
}
|
|
5168
|
-
}, [
|
|
5169
|
-
if (
|
|
5170
|
-
|
|
5171
|
-
let e =
|
|
5172
|
-
t &&
|
|
5173
|
-
}, [
|
|
5174
|
-
let
|
|
5175
|
-
|
|
5176
|
-
background:
|
|
5177
|
-
moduleName:
|
|
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:
|
|
5179
|
+
fields: dn
|
|
5180
5180
|
} });
|
|
5181
|
-
},
|
|
5181
|
+
}, kn = (e, t) => {
|
|
5182
5182
|
let n = ed(e, t), r = n.startsWith("/") ? n : `/${n}`, i = t?._id ?? t?.id;
|
|
5183
|
-
|
|
5184
|
-
background:
|
|
5183
|
+
ye(r, { state: {
|
|
5184
|
+
background: be,
|
|
5185
5185
|
selectedIds: i === void 0 ? [] : [i],
|
|
5186
5186
|
selectedRecords: [t],
|
|
5187
|
-
moduleName:
|
|
5187
|
+
moduleName: F,
|
|
5188
5188
|
popupContext: {},
|
|
5189
5189
|
popupAction: {}
|
|
5190
5190
|
} });
|
|
5191
|
-
},
|
|
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: () =>
|
|
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 =
|
|
5217
|
-
let n =
|
|
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:
|
|
5223
|
-
onSort: () =>
|
|
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,
|
|
5230
|
-
render: (t, n) => Dd(e, n,
|
|
5231
|
-
canAdd:
|
|
5232
|
-
canEdit:
|
|
5233
|
-
canDelete:
|
|
5234
|
-
},
|
|
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 (!(
|
|
5238
|
-
let n = e.width + (
|
|
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
|
-
|
|
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
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
]),
|
|
5267
|
-
let t =
|
|
5268
|
-
if (
|
|
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
|
-
|
|
5270
|
+
rt.current = e, pe(e);
|
|
5271
5271
|
}
|
|
5272
5272
|
}, [
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5273
|
+
pe,
|
|
5274
|
+
Dn,
|
|
5275
|
+
Jt
|
|
5276
5276
|
]);
|
|
5277
|
-
function
|
|
5278
|
-
let r =
|
|
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`),
|
|
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
|
-
|
|
5315
|
-
background:
|
|
5314
|
+
ye(a, { state: {
|
|
5315
|
+
background: be,
|
|
5316
5316
|
selectedIds: t,
|
|
5317
5317
|
selectedRecords: n,
|
|
5318
|
-
moduleName:
|
|
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
|
-
|
|
5330
|
+
ye(a);
|
|
5331
5331
|
}
|
|
5332
5332
|
}
|
|
5333
5333
|
}
|
|
5334
|
-
function
|
|
5335
|
-
let t = Yd(
|
|
5336
|
-
t && qd(t,
|
|
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
|
|
5339
|
-
|
|
5340
|
-
let r =
|
|
5341
|
-
return t ? i.includes(e) ? i : [...i, e] : i.length <=
|
|
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
|
-
},
|
|
5343
|
+
}, Ln = () => {
|
|
5344
5344
|
if (typeof f == "function") {
|
|
5345
5345
|
f();
|
|
5346
5346
|
return;
|
|
5347
5347
|
}
|
|
5348
5348
|
if (_) {
|
|
5349
|
-
|
|
5349
|
+
ye(_);
|
|
5350
5350
|
return;
|
|
5351
5351
|
}
|
|
5352
|
-
|
|
5352
|
+
At(!0);
|
|
5353
|
+
}, Rn = () => {
|
|
5354
|
+
b && ye(b);
|
|
5353
5355
|
};
|
|
5354
5356
|
I(() => {
|
|
5355
|
-
if (!
|
|
5357
|
+
if (!kt) return;
|
|
5356
5358
|
let e = (e) => {
|
|
5357
|
-
e.key === "Escape" &&
|
|
5359
|
+
e.key === "Escape" && At(!1);
|
|
5358
5360
|
};
|
|
5359
5361
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
5360
|
-
}, [
|
|
5361
|
-
let
|
|
5362
|
-
|
|
5363
|
-
},
|
|
5364
|
-
let t = e.target.value, n = t.trim().length < 3, r =
|
|
5365
|
-
n && (
|
|
5366
|
-
},
|
|
5367
|
-
let e =
|
|
5368
|
-
e.length >= 3 && (
|
|
5369
|
-
},
|
|
5370
|
-
|
|
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
|
-
|
|
5375
|
+
Lt === "card" && ($e([]), ct([], []));
|
|
5374
5376
|
}, [
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5377
|
+
We.current,
|
|
5378
|
+
We.pageSize,
|
|
5379
|
+
Oe,
|
|
5380
|
+
Lt
|
|
5379
5381
|
]);
|
|
5380
|
-
let
|
|
5381
|
-
|
|
5382
|
+
let Un = (e) => {
|
|
5383
|
+
$e((t) => {
|
|
5382
5384
|
let n = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
|
|
5383
|
-
return
|
|
5385
|
+
return ct(n, xn.filter((e, t) => n.includes(String(Vd(e, t, p))))), n;
|
|
5384
5386
|
});
|
|
5385
|
-
},
|
|
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:
|
|
5390
|
-
indeterminate:
|
|
5391
|
+
checked: Pn,
|
|
5392
|
+
indeterminate: Fn,
|
|
5391
5393
|
onChange: (e) => {
|
|
5392
|
-
|
|
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:
|
|
5398
|
-
checked:
|
|
5399
|
-
disabled:
|
|
5400
|
-
onChange: (t) =>
|
|
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${
|
|
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:
|
|
5419
|
-
tabs:
|
|
5420
|
-
onChange:
|
|
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
|
-
|
|
5426
|
-
|
|
5427
|
+
N,
|
|
5428
|
+
Tn && /* @__PURE__ */ X(H, {
|
|
5427
5429
|
prefix: /* @__PURE__ */ X(ra, { className: "job-search-icon" }),
|
|
5428
|
-
placeholder:
|
|
5429
|
-
value:
|
|
5430
|
-
onChange:
|
|
5431
|
-
onPressEnter:
|
|
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
|
-
!
|
|
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
|
-
|
|
5444
|
+
Gt && ye(Gt);
|
|
5443
5445
|
}
|
|
5444
5446
|
})
|
|
5445
5447
|
}),
|
|
5446
|
-
|
|
5448
|
+
Tn && /* @__PURE__ */ X(q, {
|
|
5447
5449
|
title: "Filter",
|
|
5448
5450
|
children: /* @__PURE__ */ X(Zn, {
|
|
5449
|
-
count:
|
|
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: () =>
|
|
5458
|
+
onClick: () => Fe(!0)
|
|
5457
5459
|
})
|
|
5458
5460
|
})
|
|
5459
5461
|
}),
|
|
5460
|
-
|
|
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${
|
|
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
|
-
|
|
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${
|
|
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
|
-
|
|
5480
|
+
oe?.("card"), $e([]), ct([], []);
|
|
5479
5481
|
}
|
|
5480
5482
|
})
|
|
5481
5483
|
})]
|
|
5482
5484
|
}),
|
|
5483
|
-
m &&
|
|
5485
|
+
m && Tn && /* @__PURE__ */ X(z, {
|
|
5484
5486
|
className: "job-summary-button",
|
|
5485
5487
|
type: "primary",
|
|
5486
|
-
onClick:
|
|
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
|
-
|
|
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
|
-
|
|
5504
|
-
checked:
|
|
5505
|
-
indeterminate:
|
|
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 (
|
|
5516
|
+
if (Qe.length > 0) $e([]), ct([], []);
|
|
5509
5517
|
else {
|
|
5510
|
-
let e =
|
|
5511
|
-
|
|
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:
|
|
5518
|
-
onOpenChange:
|
|
5525
|
+
open: Xe,
|
|
5526
|
+
onOpenChange: Ze,
|
|
5519
5527
|
trigger: ["click"],
|
|
5520
|
-
dropdownRender: () =>
|
|
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
|
-
|
|
5544
|
+
Ut.length > 0 && Re.length > 0 && /* @__PURE__ */ X(ar, {
|
|
5537
5545
|
menu: {
|
|
5538
|
-
items:
|
|
5539
|
-
onClick:
|
|
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
|
-
|
|
5565
|
+
Re.length > 0 && /* @__PURE__ */ Z(Nu, {
|
|
5558
5566
|
className: "job-selected-count",
|
|
5559
5567
|
children: [
|
|
5560
5568
|
"Selected (",
|
|
5561
|
-
|
|
5569
|
+
Re.length,
|
|
5562
5570
|
")"
|
|
5563
5571
|
]
|
|
5564
5572
|
})
|
|
5565
5573
|
]
|
|
5566
|
-
}),
|
|
5574
|
+
}), Cn && /* @__PURE__ */ Z(Nu, {
|
|
5567
5575
|
className: "job-search-results-count",
|
|
5568
5576
|
children: [
|
|
5569
5577
|
"Search Results (",
|
|
5570
|
-
|
|
5578
|
+
wn,
|
|
5571
5579
|
")"
|
|
5572
5580
|
]
|
|
5573
5581
|
})]
|
|
5574
5582
|
})
|
|
5575
5583
|
}) }),
|
|
5576
|
-
|
|
5577
|
-
filters:
|
|
5584
|
+
sn && /* @__PURE__ */ X(ff, {
|
|
5585
|
+
filters: Ie,
|
|
5578
5586
|
onRemove: (e) => {
|
|
5579
|
-
|
|
5587
|
+
Le(Ie.filter((t, n) => n !== e)), Jt();
|
|
5580
5588
|
},
|
|
5581
|
-
onClearAll:
|
|
5589
|
+
onClearAll: Hn
|
|
5582
5590
|
}),
|
|
5583
5591
|
/* @__PURE__ */ X("div", {
|
|
5584
|
-
ref:
|
|
5592
|
+
ref: et,
|
|
5585
5593
|
className: "job-table-measure",
|
|
5586
5594
|
children: /* @__PURE__ */ X(br, {
|
|
5587
|
-
spinning:
|
|
5588
|
-
children:
|
|
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:
|
|
5598
|
+
description: En,
|
|
5591
5599
|
className: "param-card-view__empty",
|
|
5592
|
-
children: !
|
|
5600
|
+
children: !jt && Se && ve && Gt && !Tt && /* @__PURE__ */ X(z, {
|
|
5593
5601
|
type: "primary",
|
|
5594
5602
|
icon: /* @__PURE__ */ X(Ki, {}),
|
|
5595
|
-
onClick: () =>
|
|
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:
|
|
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:
|
|
5605
|
-
selected:
|
|
5606
|
-
isControlled:
|
|
5607
|
-
onPreview: () =>
|
|
5608
|
-
onSelect: () =>
|
|
5609
|
-
onPopupAction:
|
|
5610
|
-
onRecordClick:
|
|
5611
|
-
selectionMode:
|
|
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:
|
|
5614
|
-
canEdit:
|
|
5615
|
-
canDelete:
|
|
5621
|
+
canAdd: Se,
|
|
5622
|
+
canEdit: Ce,
|
|
5623
|
+
canDelete: we
|
|
5616
5624
|
}
|
|
5617
5625
|
}, n);
|
|
5618
5626
|
})
|
|
5619
5627
|
}) : /* @__PURE__ */ X(Cr, {
|
|
5620
|
-
rowSelection:
|
|
5628
|
+
rowSelection: Tn && le === "checkbox" ? {
|
|
5621
5629
|
type: "checkbox",
|
|
5622
5630
|
fixed: !0,
|
|
5623
5631
|
columnWidth: 48,
|
|
5624
|
-
selectedRowKeys:
|
|
5632
|
+
selectedRowKeys: Re,
|
|
5625
5633
|
onChange: (e, t) => {
|
|
5626
|
-
|
|
5634
|
+
ct(e, t);
|
|
5627
5635
|
},
|
|
5628
5636
|
columnTitle: (() => {
|
|
5629
|
-
let e =
|
|
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 ?
|
|
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:
|
|
5640
|
-
dataSource:
|
|
5647
|
+
columns: An,
|
|
5648
|
+
dataSource: xn,
|
|
5641
5649
|
size: "middle",
|
|
5642
5650
|
tableLayout: "fixed",
|
|
5643
5651
|
scroll: {
|
|
5644
|
-
x:
|
|
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:
|
|
5658
|
+
description: En
|
|
5651
5659
|
}) },
|
|
5652
|
-
className: `${
|
|
5653
|
-
onRow:
|
|
5660
|
+
className: `${S} ${ue ? "list-view-table--compact" : ""}`.trim(),
|
|
5661
|
+
onRow: P ? (e, t) => ({
|
|
5654
5662
|
onClick: (n) => {
|
|
5655
|
-
Hd(n.target) ||
|
|
5663
|
+
Hd(n.target) || st(e, t);
|
|
5656
5664
|
},
|
|
5657
|
-
"aria-selected":
|
|
5665
|
+
"aria-selected": ot(e, t)
|
|
5658
5666
|
}) : void 0,
|
|
5659
|
-
rowClassName:
|
|
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
|
-
|
|
5665
|
-
current:
|
|
5666
|
-
pageSize:
|
|
5667
|
-
total:
|
|
5672
|
+
Tn ? /* @__PURE__ */ X(Ko, {
|
|
5673
|
+
current: We.current,
|
|
5674
|
+
pageSize: We.pageSize,
|
|
5675
|
+
total: Sn,
|
|
5668
5676
|
onChange: (e, t) => {
|
|
5669
|
-
if (
|
|
5670
|
-
|
|
5677
|
+
if (jt && typeof j == "function") {
|
|
5678
|
+
j(e, t ?? We.pageSize);
|
|
5671
5679
|
return;
|
|
5672
5680
|
}
|
|
5673
|
-
|
|
5681
|
+
qt(e);
|
|
5674
5682
|
},
|
|
5675
5683
|
onPageSizeChange: (e) => {
|
|
5676
|
-
if (
|
|
5677
|
-
|
|
5684
|
+
if (jt && typeof ee == "function") {
|
|
5685
|
+
ee(e);
|
|
5678
5686
|
return;
|
|
5679
5687
|
}
|
|
5680
|
-
|
|
5688
|
+
Ge({
|
|
5681
5689
|
current: 1,
|
|
5682
5690
|
pageSize: e
|
|
5683
|
-
}),
|
|
5691
|
+
}), Kt(1, { replace: !0 });
|
|
5684
5692
|
}
|
|
5685
5693
|
}) : void 0,
|
|
5686
5694
|
/* @__PURE__ */ X(Au, {
|
|
5687
|
-
moduleName:
|
|
5688
|
-
open:
|
|
5689
|
-
filters:
|
|
5690
|
-
onClose: () =>
|
|
5695
|
+
moduleName: F,
|
|
5696
|
+
open: Pe,
|
|
5697
|
+
filters: Ie,
|
|
5698
|
+
onClose: () => Fe(!1),
|
|
5691
5699
|
onApply: ({ filters: e }) => {
|
|
5692
|
-
|
|
5700
|
+
Le(e), Jt();
|
|
5693
5701
|
},
|
|
5694
|
-
onReset:
|
|
5702
|
+
onReset: Hn
|
|
5695
5703
|
}),
|
|
5696
5704
|
/* @__PURE__ */ X(_u, {
|
|
5697
|
-
moduleName:
|
|
5698
|
-
open:
|
|
5699
|
-
rows:
|
|
5700
|
-
tabs:
|
|
5701
|
-
total:
|
|
5702
|
-
onClose: () =>
|
|
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
|
});
|