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