@realtek/core-theme 0.0.136 → 0.0.138
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 +264 -234
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
package/dist-lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, w as x, x as S, y as C } from "./authApi-BPEW_c3Y.js";
|
|
2
2
|
import w, { Fragment as T, useCallback as E, useEffect as D, useMemo as O, useRef as k, useState as A } from "react";
|
|
3
|
-
import { Alert as j, AutoComplete as M, Avatar as N, Badge as
|
|
3
|
+
import { Alert as j, AutoComplete as M, Avatar as N, Badge as ee, Breadcrumb as P, Button as F, Card as I, Checkbox as te, Col as L, Collapse as ne, DatePicker as re, Divider as ie, Drawer as R, Dropdown as ae, Empty as z, Flex as oe, Form as B, Input as V, InputNumber as se, Layout as ce, Mentions as le, Menu as ue, Modal as H, Pagination as de, Popconfirm as fe, Popover as pe, Progress as me, Radio as he, Result as ge, Row as U, Select as W, Space as G, Spin as _e, Statistic as ve, Steps as ye, Switch as K, Table as be, Tabs as xe, Tag as q, TimePicker as Se, Tooltip as J, Typography as Ce, Upload as we, message as Y } from "antd";
|
|
4
4
|
import { AimOutlined as Te, ApartmentOutlined as Ee, AppstoreAddOutlined as De, AppstoreOutlined as Oe, ArrowDownOutlined as ke, ArrowLeftOutlined as Ae, ArrowUpOutlined as je, BankOutlined as Me, BellOutlined as Ne, BgColorsOutlined as Pe, BuildOutlined as Fe, CalendarOutlined as Ie, CheckCircleOutlined as Le, CheckOutlined as Re, ClockCircleOutlined as ze, CloseCircleOutlined as Be, CloseOutlined as Ve, CloudDownloadOutlined as He, CloudUploadOutlined as Ue, CopyOutlined as We, CrownOutlined as Ge, DashboardOutlined as Ke, DatabaseOutlined as qe, DeleteOutlined as Je, DollarOutlined as Ye, DownOutlined as Xe, DownloadOutlined as Ze, EditOutlined as Qe, EnvironmentOutlined as $e, ExclamationCircleFilled as et, ExclamationCircleOutlined as tt, EyeOutlined as nt, FileExcelOutlined as rt, FileImageOutlined as it, FileOutlined as at, FilePdfOutlined as ot, FileTextOutlined as st, FileUnknownOutlined as ct, FileWordOutlined as lt, FilterOutlined as ut, HolderOutlined as dt, HomeOutlined as ft, InfoCircleOutlined as pt, LaptopOutlined as mt, LeftOutlined as ht, LinkOutlined as gt, LinkedinFilled as _t, LockOutlined as vt, LogoutOutlined as yt, MailOutlined as bt, MenuOutlined as xt, MergeCellsOutlined as St, MinusCircleOutlined as Ct, MoreOutlined as wt, PaperClipOutlined as Tt, PhoneOutlined as Et, PlusOutlined as Dt, ProfileOutlined as Ot, ProjectOutlined as kt, ReloadOutlined as At, RightOutlined as jt, SafetyCertificateOutlined as Mt, SafetyOutlined as Nt, SaveOutlined as Pt, SearchOutlined as Ft, SendOutlined as It, SettingOutlined as Lt, ShareAltOutlined as Rt, SnippetsOutlined as zt, SolutionOutlined as Bt, SyncOutlined as Vt, TableOutlined as Ht, TagsOutlined as Ut, TeamOutlined as Wt, ThunderboltOutlined as Gt, ToolOutlined as Kt, UndoOutlined as qt, UnlockOutlined as Jt, UnorderedListOutlined as Yt, UpOutlined as Xt, UploadOutlined as Zt, UserAddOutlined as Qt, UserOutlined as $t, UserSwitchOutlined as en, ZoomInOutlined as tn, ZoomOutOutlined as nn } from "@ant-design/icons";
|
|
5
5
|
import { Fragment as X, jsx as Z, jsxs as Q } from "react/jsx-runtime";
|
|
6
6
|
import { BrowserRouter as rn, Link as an, Navigate as on, Outlet as sn, Route as cn, Routes as ln, useLocation as un, useNavigate as dn, useParams as fn, useSearchParams as pn } from "react-router-dom";
|
|
@@ -248,13 +248,13 @@ function Gn({ userIds: e = [], days: t = void 0, startDay: n = "Sun", renderDayC
|
|
|
248
248
|
} : {
|
|
249
249
|
...e,
|
|
250
250
|
month: e.month - 1
|
|
251
|
-
})),
|
|
251
|
+
})), ee = p ?? (() => _((e) => e.month === 11 ? {
|
|
252
252
|
year: e.year + 1,
|
|
253
253
|
month: 0
|
|
254
254
|
} : {
|
|
255
255
|
...e,
|
|
256
256
|
month: e.month + 1
|
|
257
|
-
})),
|
|
257
|
+
})), P = Vn(Bn(v.year, v.month, n), 7), te = {};
|
|
258
258
|
t !== void 0 && (t || []).forEach((e) => {
|
|
259
259
|
e?.date && (te[e.date] = e);
|
|
260
260
|
});
|
|
@@ -293,7 +293,7 @@ function Gn({ userIds: e = [], days: t = void 0, startDay: n = "Sun", renderDayC
|
|
|
293
293
|
type: "text",
|
|
294
294
|
icon: /* @__PURE__ */ Z(jt, {}),
|
|
295
295
|
size: "small",
|
|
296
|
-
onClick:
|
|
296
|
+
onClick: ee
|
|
297
297
|
})
|
|
298
298
|
})
|
|
299
299
|
]
|
|
@@ -312,7 +312,7 @@ function Gn({ userIds: e = [], days: t = void 0, startDay: n = "Sun", renderDayC
|
|
|
312
312
|
}),
|
|
313
313
|
/* @__PURE__ */ Z("div", {
|
|
314
314
|
className: "calendar-weeks",
|
|
315
|
-
children:
|
|
315
|
+
children: P.map((e, t) => /* @__PURE__ */ Z(U, {
|
|
316
316
|
gutter: [6, 6],
|
|
317
317
|
align: "top",
|
|
318
318
|
className: "calendar-week-row",
|
|
@@ -4839,7 +4839,7 @@ function Tl({ as: e, tag: t, variant: n = "body", color: r, size: i, weight: a,
|
|
|
4839
4839
|
//#endregion
|
|
4840
4840
|
//#region src/components/Breadcrumb.jsx
|
|
4841
4841
|
function El({ items: e = [] }) {
|
|
4842
|
-
return /* @__PURE__ */ Z(
|
|
4842
|
+
return /* @__PURE__ */ Z(P, { items: e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */ Z(Tl, {
|
|
4843
4843
|
variant: "body",
|
|
4844
4844
|
weight: "medium",
|
|
4845
4845
|
color: "link",
|
|
@@ -5474,7 +5474,12 @@ function Su(e) {
|
|
|
5474
5474
|
//#endregion
|
|
5475
5475
|
//#region src/utils/actionRuleEngine.js
|
|
5476
5476
|
function Cu(e, t) {
|
|
5477
|
-
if (!
|
|
5477
|
+
if (!t || typeof t != "string" || !e) return;
|
|
5478
|
+
if (t in e) return e[t];
|
|
5479
|
+
let n = t.split(".").reduce((e, t) => e?.[t], e);
|
|
5480
|
+
if (n !== void 0) return n;
|
|
5481
|
+
let r = t.split(".").pop();
|
|
5482
|
+
return r === t ? void 0 : e[r];
|
|
5478
5483
|
}
|
|
5479
5484
|
function wu(e) {
|
|
5480
5485
|
return String(e ?? "").trim().toLowerCase();
|
|
@@ -5740,7 +5745,7 @@ function md(e, t) {
|
|
|
5740
5745
|
key: String(n),
|
|
5741
5746
|
label: /* @__PURE__ */ Q(G, {
|
|
5742
5747
|
size: 6,
|
|
5743
|
-
children: [/* @__PURE__ */ Z("span", { children: pd(r) }), fd(i) && /* @__PURE__ */ Z(
|
|
5748
|
+
children: [/* @__PURE__ */ Z("span", { children: pd(r) }), fd(i) && /* @__PURE__ */ Z(ee, {
|
|
5744
5749
|
className: "dynamic-tabs-count",
|
|
5745
5750
|
count: i,
|
|
5746
5751
|
overflowCount: 2 ** 53 - 1
|
|
@@ -6623,8 +6628,8 @@ function ef({ moduleName: e, open: t = !1, filters: n = [], onClose: r, onApply:
|
|
|
6623
6628
|
let { values: t } = e;
|
|
6624
6629
|
return typeof t == "string" ? t.trim() === "" : Array.isArray(t) ? t.length === 0 || t.every((e) => e == null || e === "") : !0;
|
|
6625
6630
|
}
|
|
6626
|
-
let
|
|
6627
|
-
function
|
|
6631
|
+
let ee = s.length === 0 || s.every(N);
|
|
6632
|
+
function P(e, t) {
|
|
6628
6633
|
let n = o.getFieldValue("filters") ?? [];
|
|
6629
6634
|
o.setFieldValue("filters", n.map((t, n) => n === e ? {
|
|
6630
6635
|
...t,
|
|
@@ -6661,7 +6666,7 @@ function ef({ moduleName: e, open: t = !1, filters: n = [], onClose: r, onApply:
|
|
|
6661
6666
|
}), /* @__PURE__ */ Z(Hd, {
|
|
6662
6667
|
variant: "primary",
|
|
6663
6668
|
onClick: M,
|
|
6664
|
-
disabled:
|
|
6669
|
+
disabled: ee,
|
|
6665
6670
|
children: "Apply"
|
|
6666
6671
|
})]
|
|
6667
6672
|
}),
|
|
@@ -6749,7 +6754,7 @@ function ef({ moduleName: e, open: t = !1, filters: n = [], onClose: r, onApply:
|
|
|
6749
6754
|
options: x,
|
|
6750
6755
|
optionFilterProp: "label",
|
|
6751
6756
|
loading: l,
|
|
6752
|
-
onChange: (e) =>
|
|
6757
|
+
onChange: (e) => P(t.name, e)
|
|
6753
6758
|
})
|
|
6754
6759
|
})
|
|
6755
6760
|
}), /* @__PURE__ */ Z(B.Item, {
|
|
@@ -7469,7 +7474,7 @@ function Cp({ filters: e, onRemove: t, onClearAll: n }) {
|
|
|
7469
7474
|
]
|
|
7470
7475
|
});
|
|
7471
7476
|
}
|
|
7472
|
-
function wp({ 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 = vp, listName: _ = "", loading: v = !1, total: y, current: x, pageSize: S, onPageChange: C, onPageSizeChange: w, onSearch: T, showSearch: k = !0, showViewToggle: j = !1, activeView: M = "list", onViewChange: N, createAction:
|
|
7477
|
+
function wp({ 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 = vp, listName: _ = "", loading: v = !1, total: y, current: x, pageSize: S, onPageChange: C, onPageSizeChange: w, onSearch: T, showSearch: k = !0, showViewToggle: j = !1, activeView: M = "list", onViewChange: N, createAction: P, onRecordClick: L, selectedRecordId: ne, selectionMode: re = "checkbox", compact: ie = !1, onSelectionChange: R, selectedSource: B, onTabChange: se, fetchData: ce = Xl, responseMapper: le = ud }) {
|
|
7473
7478
|
let ue = dn(), H = un(), { canView: de, canAdd: fe, canEdit: pe, canDelete: me } = bu(e), [he] = pn(), ge = gp(he), [U, W] = A("all"), [ve, ye] = A(""), [K, xe] = A(""), [q, Se] = A(!1), [Ce, we] = A([]), [Te, Ee] = A([]), [De, ke] = A([]), [Ae, je] = A(0), [Me, Ne] = A({
|
|
7474
7479
|
current: ge,
|
|
7475
7480
|
pageSize: o
|
|
@@ -7497,7 +7502,7 @@ function wp({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
|
|
|
7497
7502
|
Te.length,
|
|
7498
7503
|
De,
|
|
7499
7504
|
kt
|
|
7500
|
-
]), jt = typeof e == "string" ? e.trim().length > 0 : !!e, Mt = jt ? `/${String(e).trim()}-create${
|
|
7505
|
+
]), jt = typeof e == "string" ? e.trim().length > 0 : !!e, Mt = jt ? `/${String(e).trim()}-create${P ? `?action=${encodeURIComponent(P)}` : ""}` : "";
|
|
7501
7506
|
D(() => {
|
|
7502
7507
|
jt && !de && ue("/", { replace: !0 });
|
|
7503
7508
|
}, [
|
|
@@ -7938,7 +7943,7 @@ function wp({ moduleName: e, actions: t = [], actionRules: n = [], breadcrumbIte
|
|
|
7938
7943
|
}),
|
|
7939
7944
|
mn && /* @__PURE__ */ Z(J, {
|
|
7940
7945
|
title: "Filter",
|
|
7941
|
-
children: /* @__PURE__ */ Z(
|
|
7946
|
+
children: /* @__PURE__ */ Z(ee, {
|
|
7942
7947
|
count: Ce.filter((e) => e.field && bp(e)).length,
|
|
7943
7948
|
size: "small",
|
|
7944
7949
|
offset: [-2, 2],
|
|
@@ -8788,7 +8793,7 @@ function Mm({ field: e, form: t, name: n, moduleName: r, value: i, checked: a, o
|
|
|
8788
8793
|
open: !1,
|
|
8789
8794
|
docs: [],
|
|
8790
8795
|
index: 0
|
|
8791
|
-
}), [E, O] = A(null), j = k([]), M = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", N = e.lookupFilterValueFrom ? Xp(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`],
|
|
8796
|
+
}), [E, O] = A(null), j = k([]), M = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", N = e.lookupFilterValueFrom ? Xp(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], ee = e.lookupFilterValueFrom && M ? [...n.slice(0, 2), ...Xp(e.lookupFilterValueFrom)] : ["__noop_row_filter__"], P = B.useWatch(N, t), I = B.useWatch(ee, t), L = lm(I) ? P : I, ne = e.disabledByField ? Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.disabledByField] : [e.disabledByField] : ["__noop_disabled_watch__"], ie = B.useWatch(ne, t), R = f || !!e.disabled || (e.disabledByField ? qp(ie) : !1) || !!l, ae = e.lookupFilterValueFrom ? s[e.lookupFilterValueFrom] : void 0, z = lm(ae) ? L : ae;
|
|
8792
8797
|
D(() => {
|
|
8793
8798
|
if (d === "location") {
|
|
8794
8799
|
let t = !1;
|
|
@@ -9286,7 +9291,7 @@ function Im({ group: e }) {
|
|
|
9286
9291
|
});
|
|
9287
9292
|
}
|
|
9288
9293
|
function Lm({ moduleName: e, action: t, clientId: n, region: i, formGroups: a, loading: o = !1, error: s = "", breadcrumbItems: c = [], formType: l = "add", submitText: u, cancelPath: d = "/candidates", onSubmit: f, initialRecord: p = null, prefillFromUrl: m = !1, extraPayload: h = null, presetClientId: g = null, listViewProps: _ = {}, selectedScope: v = "", searchActionContext: y = null }) {
|
|
9289
|
-
let b = l === "search", x = u ?? (b ? "Search" : "Create"), S = dn(), C = fn(), [w] = pn(), [M] = B.useForm(), N = B.useWatch([], M), [
|
|
9294
|
+
let b = l === "search", x = u ?? (b ? "Search" : "Create"), S = dn(), C = fn(), [w] = pn(), [M] = B.useForm(), N = B.useWatch([], M), [ee, P] = A(!1), [te, ne] = A({}), [re, ie] = A([]), [R, ae] = A(!!e), [z, oe] = A(""), [V, se] = A(""), [ce, le] = A(!1), [ue, H] = A({
|
|
9290
9295
|
searched: !1,
|
|
9291
9296
|
rows: [],
|
|
9292
9297
|
total: 0,
|
|
@@ -11083,7 +11088,7 @@ function Rh({ field: e }) {
|
|
|
11083
11088
|
let e = h(Mh(t, o, u));
|
|
11084
11089
|
return /* @__PURE__ */ Z("span", {
|
|
11085
11090
|
className: "v1-detail-value",
|
|
11086
|
-
children: /* @__PURE__ */ Z(
|
|
11091
|
+
children: /* @__PURE__ */ Z(ee, {
|
|
11087
11092
|
color: f || "blue",
|
|
11088
11093
|
text: e
|
|
11089
11094
|
})
|
|
@@ -12087,7 +12092,8 @@ function Mg(e, t) {
|
|
|
12087
12092
|
let n = {
|
|
12088
12093
|
_id: t,
|
|
12089
12094
|
id: t
|
|
12090
|
-
};
|
|
12095
|
+
}, r = e?.recordMeta;
|
|
12096
|
+
if (r && typeof r == "object") for (let [e, t] of Object.entries(r)) e in n || (n[e] = t);
|
|
12091
12097
|
for (let t of e ?? []) for (let e of t.fields ?? []) e?.field != null && e.value !== void 0 && (n[e.field] = jg(e.value));
|
|
12092
12098
|
return n;
|
|
12093
12099
|
}
|
|
@@ -12103,8 +12109,8 @@ function Fg(e, t) {
|
|
|
12103
12109
|
function Ig(e) {
|
|
12104
12110
|
return String(e ?? "").trim().toLowerCase();
|
|
12105
12111
|
}
|
|
12106
|
-
function Lg(e, t, n) {
|
|
12107
|
-
return Du(e.key, t, n,
|
|
12112
|
+
function Lg(e, t, n, r) {
|
|
12113
|
+
return Du(e.key, t, n, r);
|
|
12108
12114
|
}
|
|
12109
12115
|
function Rg(e) {
|
|
12110
12116
|
let t = String(e.key ?? "");
|
|
@@ -12155,16 +12161,40 @@ function Bg({ moduleName: e, id: t, customConfigName: n, onAction: r, onTabChang
|
|
|
12155
12161
|
D(() => {
|
|
12156
12162
|
C && a && a(C);
|
|
12157
12163
|
}, [C]);
|
|
12158
|
-
let { eyebrow: w, title: T = "-", status: E, titleIds: k = [], meta: j = [], ids: M = [], tabs: N = [], stats:
|
|
12164
|
+
let { eyebrow: w, title: T = "-", status: E, titleIds: k = [], meta: j = [], ids: M = [], tabs: N = [], stats: ee = [], timestamp: P = null } = C ?? {}, { canAdd: te, canEdit: L, canDelete: ne } = bu(e), re = O(() => Mg(d, t), [d, t]), ie = ch(N, {
|
|
12159
12165
|
id: t,
|
|
12160
12166
|
moduleName: e,
|
|
12161
12167
|
record: re
|
|
12162
|
-
}), R =
|
|
12168
|
+
}), R = Og(S)?.resolveScope, [z, oe] = A(void 0);
|
|
12169
|
+
D(() => {
|
|
12170
|
+
if (typeof R != "function" || !t) return;
|
|
12171
|
+
let n = !1, r = Number(localStorage.getItem("userId")) || 0;
|
|
12172
|
+
return Promise.resolve().then(() => R({
|
|
12173
|
+
id: t,
|
|
12174
|
+
moduleName: e,
|
|
12175
|
+
record: re,
|
|
12176
|
+
currentUserId: r
|
|
12177
|
+
})).then((e) => {
|
|
12178
|
+
n || oe(e ?? null);
|
|
12179
|
+
}).catch(() => {
|
|
12180
|
+
n || oe(null);
|
|
12181
|
+
}), () => {
|
|
12182
|
+
n = !0;
|
|
12183
|
+
};
|
|
12184
|
+
}, [
|
|
12185
|
+
R,
|
|
12186
|
+
t,
|
|
12187
|
+
e,
|
|
12188
|
+
d
|
|
12189
|
+
]);
|
|
12190
|
+
let B = typeof R != "function" || z !== void 0, V = O(() => B ? p.filter((e) => e.showInDetail ?? e.showInList).map(Rg).filter((e) => !Lg(e, re, h, z ?? void 0)) : [], [
|
|
12163
12191
|
h,
|
|
12164
12192
|
p,
|
|
12165
|
-
re
|
|
12193
|
+
re,
|
|
12194
|
+
z,
|
|
12195
|
+
B
|
|
12166
12196
|
]);
|
|
12167
|
-
function
|
|
12197
|
+
function se(e) {
|
|
12168
12198
|
let t = Su(e);
|
|
12169
12199
|
if (t === "add" && !te || t === "edit" && !L || t === "delete" && !ne || !Zc(e.permission, S)) return !1;
|
|
12170
12200
|
if (e.permissionKey) {
|
|
@@ -12173,14 +12203,14 @@ function Bg({ moduleName: e, id: t, customConfigName: n, onAction: r, onTabChang
|
|
|
12173
12203
|
}
|
|
12174
12204
|
return !0;
|
|
12175
12205
|
}
|
|
12176
|
-
let [
|
|
12206
|
+
let [ce, le] = A(s);
|
|
12177
12207
|
D(() => {
|
|
12178
|
-
|
|
12208
|
+
le(s);
|
|
12179
12209
|
}, [s]);
|
|
12180
|
-
let
|
|
12210
|
+
let ue = ie.some((e) => e.key === ce) ? ce : ie[0]?.key, H = (e) => !e.allowedTabs?.length || e.allowedTabs.some((e) => Ig(e) === Ig(ue)), de = V.filter((e) => e.detailPlacement === "primary" && se(e) && H(e)), fe = V.filter((e) => e.detailPlacement !== "primary" && se(e) && H(e));
|
|
12181
12211
|
if (!C) return null;
|
|
12182
|
-
let
|
|
12183
|
-
let i = [...
|
|
12212
|
+
let pe = (n) => {
|
|
12213
|
+
let i = [...de, ...fe].find((e) => e.key === n);
|
|
12184
12214
|
if (i?.actionType === "document" && i.documentField) {
|
|
12185
12215
|
let e = zg(d, i.documentField);
|
|
12186
12216
|
e.length ? (x(e), v(!0)) : Y.warning(`No ${(i.label || "document").toLowerCase()} available`);
|
|
@@ -12229,16 +12259,16 @@ function Bg({ moduleName: e, id: t, customConfigName: n, onAction: r, onTabChang
|
|
|
12229
12259
|
id: t,
|
|
12230
12260
|
action: i
|
|
12231
12261
|
});
|
|
12232
|
-
},
|
|
12233
|
-
|
|
12262
|
+
}, me = (n) => {
|
|
12263
|
+
le(n), i?.(n, {
|
|
12234
12264
|
moduleName: e,
|
|
12235
12265
|
id: t
|
|
12236
12266
|
});
|
|
12237
|
-
},
|
|
12267
|
+
}, he = fe.map((e) => ({
|
|
12238
12268
|
key: e.key,
|
|
12239
12269
|
label: e.label,
|
|
12240
12270
|
danger: e.danger,
|
|
12241
|
-
onClick: () =>
|
|
12271
|
+
onClick: () => pe(e.key)
|
|
12242
12272
|
}));
|
|
12243
12273
|
return /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Q(I, {
|
|
12244
12274
|
className: "znx-dh-card",
|
|
@@ -12311,16 +12341,16 @@ function Bg({ moduleName: e, id: t, customConfigName: n, onAction: r, onTabChang
|
|
|
12311
12341
|
children: [
|
|
12312
12342
|
/* @__PURE__ */ Q("div", {
|
|
12313
12343
|
className: "znx-dh-actions",
|
|
12314
|
-
children: [
|
|
12344
|
+
children: [de.map((e) => /* @__PURE__ */ Z(F, {
|
|
12315
12345
|
type: "text",
|
|
12316
12346
|
className: `znx-dh-btn znx-dh-btn--${e.tone ?? "primary"}`,
|
|
12317
12347
|
icon: e.icon ? Ag[e.icon] : void 0,
|
|
12318
|
-
onClick: () =>
|
|
12348
|
+
onClick: () => pe(e.key),
|
|
12319
12349
|
children: e.label
|
|
12320
|
-
}, e.key)),
|
|
12350
|
+
}, e.key)), fe.length > 0 && /* @__PURE__ */ Z(ae, {
|
|
12321
12351
|
trigger: ["click"],
|
|
12322
12352
|
placement: "bottomRight",
|
|
12323
|
-
menu: { items:
|
|
12353
|
+
menu: { items: he },
|
|
12324
12354
|
children: /* @__PURE__ */ Z(F, {
|
|
12325
12355
|
type: "text",
|
|
12326
12356
|
className: "znx-dh-more",
|
|
@@ -12328,9 +12358,9 @@ function Bg({ moduleName: e, id: t, customConfigName: n, onAction: r, onTabChang
|
|
|
12328
12358
|
})
|
|
12329
12359
|
})]
|
|
12330
12360
|
}),
|
|
12331
|
-
|
|
12361
|
+
ee.length > 0 && /* @__PURE__ */ Z("div", {
|
|
12332
12362
|
className: "znx-dh-stats",
|
|
12333
|
-
children:
|
|
12363
|
+
children: ee.map((e) => /* @__PURE__ */ Q("div", {
|
|
12334
12364
|
className: "znx-dh-stat",
|
|
12335
12365
|
children: [/* @__PURE__ */ Z("span", {
|
|
12336
12366
|
className: "znx-dh-stat-value",
|
|
@@ -12341,9 +12371,9 @@ function Bg({ moduleName: e, id: t, customConfigName: n, onAction: r, onTabChang
|
|
|
12341
12371
|
})]
|
|
12342
12372
|
}, e.label))
|
|
12343
12373
|
}),
|
|
12344
|
-
|
|
12374
|
+
P?.value && /* @__PURE__ */ Q("div", {
|
|
12345
12375
|
className: "znx-dh-created",
|
|
12346
|
-
children: ["Created on ",
|
|
12376
|
+
children: ["Created on ", P.value]
|
|
12347
12377
|
})
|
|
12348
12378
|
]
|
|
12349
12379
|
})]
|
|
@@ -12351,8 +12381,8 @@ function Bg({ moduleName: e, id: t, customConfigName: n, onAction: r, onTabChang
|
|
|
12351
12381
|
className: "znx-dh-tabs",
|
|
12352
12382
|
children: ie.map((e) => /* @__PURE__ */ Z("button", {
|
|
12353
12383
|
type: "button",
|
|
12354
|
-
className: `znx-dh-tab${
|
|
12355
|
-
onClick: () =>
|
|
12384
|
+
className: `znx-dh-tab${ue === e.key ? " is-active" : ""}`,
|
|
12385
|
+
onClick: () => me(e.key),
|
|
12356
12386
|
children: e.label
|
|
12357
12387
|
}, e.key))
|
|
12358
12388
|
})]
|
|
@@ -12990,7 +13020,7 @@ function N_({ field: e, form: t, name: n, value: r, checked: i, fileList: a, mod
|
|
|
12990
13020
|
open: !1,
|
|
12991
13021
|
docs: [],
|
|
12992
13022
|
index: 0
|
|
12993
|
-
}), [O, j] = A(null), M = k([]), N = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number",
|
|
13023
|
+
}), [O, j] = A(null), M = k([]), N = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", ee = e.lookupFilterValueFrom ? yc(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], P = e.lookupFilterValueFrom && N ? [...n.slice(0, 2), ...yc(e.lookupFilterValueFrom)] : ["__noop_row_filter__"], I = B.useWatch(ee, t), L = B.useWatch(P, t), ne = o_(L) ? I : L, ie = e.lookupFilterValueFrom ? c[e.lookupFilterValueFrom] : void 0, R = o_(ie) ? ne : ie, ae = e.disabledByField ? Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.disabledByField] : [e.disabledByField] : ["__noop_disabled_watch__"], z = B.useWatch(ae, t), oe = p || !!e.disabled || (e.disabledByField ? i_(z) : !1) || !!d;
|
|
12994
13024
|
D(() => {
|
|
12995
13025
|
if (f === "location") {
|
|
12996
13026
|
let t = !1;
|
|
@@ -13446,23 +13476,23 @@ function P_({ icon: e, title: t }) {
|
|
|
13446
13476
|
})]
|
|
13447
13477
|
});
|
|
13448
13478
|
}
|
|
13449
|
-
function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItems: i = [], submitText: a = "Save Changes", cancelPath: o, onSuccess: s, fieldNameMap: c = {}, onFileUpload: l = null }) {
|
|
13450
|
-
let
|
|
13479
|
+
function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItems: i = [], submitText: a = "Save Changes", cancelPath: o, onSuccess: s, fieldNameMap: c = {}, onFileUpload: l = null, onBeforeSubmit: u = null }) {
|
|
13480
|
+
let d = dn(), [f] = B.useForm(), [p, m] = A({}), [h, g] = A([]), [_, v] = A(!1), [y, b] = A(""), [x, S] = A(!1), [C, T] = A(""), [E, M] = A(null), [N, ee] = A(() => /* @__PURE__ */ new Set());
|
|
13451
13481
|
D(() => {
|
|
13452
13482
|
let t = !1;
|
|
13453
13483
|
return queueMicrotask(() => {
|
|
13454
13484
|
if (!t) {
|
|
13455
13485
|
if (!e) {
|
|
13456
|
-
|
|
13486
|
+
M(null);
|
|
13457
13487
|
return;
|
|
13458
13488
|
}
|
|
13459
13489
|
Ia({ roleId: localStorage.getItem("roleId") }, e, {
|
|
13460
13490
|
clientId: n,
|
|
13461
13491
|
region: r
|
|
13462
13492
|
}).then((e) => {
|
|
13463
|
-
t ||
|
|
13493
|
+
t || M(Array.isArray(e) && e.length ? e : null);
|
|
13464
13494
|
}).catch(() => {
|
|
13465
|
-
t ||
|
|
13495
|
+
t || M(null);
|
|
13466
13496
|
});
|
|
13467
13497
|
}
|
|
13468
13498
|
}), () => {
|
|
@@ -13477,34 +13507,34 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13477
13507
|
return queueMicrotask(() => {
|
|
13478
13508
|
if (!t) {
|
|
13479
13509
|
if (!e) {
|
|
13480
|
-
|
|
13510
|
+
ee(/* @__PURE__ */ new Set());
|
|
13481
13511
|
return;
|
|
13482
13512
|
}
|
|
13483
13513
|
Ya(e).then((e) => {
|
|
13484
|
-
t ||
|
|
13514
|
+
t || ee(new Set(Array.isArray(e) ? e : []));
|
|
13485
13515
|
}).catch(() => {
|
|
13486
|
-
t ||
|
|
13516
|
+
t || ee(/* @__PURE__ */ new Set());
|
|
13487
13517
|
});
|
|
13488
13518
|
}
|
|
13489
13519
|
}), () => {
|
|
13490
13520
|
t = !0;
|
|
13491
13521
|
};
|
|
13492
13522
|
}, [e]);
|
|
13493
|
-
let P = O(() => m_(
|
|
13494
|
-
|
|
13523
|
+
let P = O(() => m_(h, e, E, N), [
|
|
13524
|
+
h,
|
|
13495
13525
|
e,
|
|
13496
|
-
|
|
13497
|
-
|
|
13498
|
-
]),
|
|
13499
|
-
form:
|
|
13526
|
+
E,
|
|
13527
|
+
N
|
|
13528
|
+
]), te = O(() => Ws(P), [P]), ne = k({}), re = Ic({
|
|
13529
|
+
form: f,
|
|
13500
13530
|
groups: P,
|
|
13501
13531
|
module: e
|
|
13502
|
-
}),
|
|
13532
|
+
}), ie = O(() => {
|
|
13503
13533
|
let e = {};
|
|
13504
13534
|
return P.forEach((t) => {
|
|
13505
13535
|
t.addRow && (e[t.name] = Tc(t));
|
|
13506
|
-
}), Ks(
|
|
13507
|
-
}, [P,
|
|
13536
|
+
}), Ks(te, e);
|
|
13537
|
+
}, [P, te]), R = {
|
|
13508
13538
|
jobs: {
|
|
13509
13539
|
list: "Jobs",
|
|
13510
13540
|
path: "/jobs",
|
|
@@ -13520,8 +13550,8 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13520
13550
|
path: "/submissions",
|
|
13521
13551
|
edit: "Edit Submission"
|
|
13522
13552
|
}
|
|
13523
|
-
},
|
|
13524
|
-
let t =
|
|
13553
|
+
}, ae = i.length > 0 ? i : (() => {
|
|
13554
|
+
let t = R[c_(e)];
|
|
13525
13555
|
return t ? [
|
|
13526
13556
|
{
|
|
13527
13557
|
label: "Home",
|
|
@@ -13539,7 +13569,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13539
13569
|
let i = !1;
|
|
13540
13570
|
async function a() {
|
|
13541
13571
|
try {
|
|
13542
|
-
|
|
13572
|
+
v(!0), b(""), T("");
|
|
13543
13573
|
let a = await Ii({
|
|
13544
13574
|
module: e,
|
|
13545
13575
|
id: t,
|
|
@@ -13547,11 +13577,11 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13547
13577
|
region: r
|
|
13548
13578
|
});
|
|
13549
13579
|
if (i) return;
|
|
13550
|
-
|
|
13580
|
+
g(Array.isArray(a) ? a : []);
|
|
13551
13581
|
} catch (t) {
|
|
13552
|
-
console.error(`Failed to fetch ${e} edit data:`, t), i ||
|
|
13582
|
+
console.error(`Failed to fetch ${e} edit data:`, t), i || b(t?.message || "Failed to load record");
|
|
13553
13583
|
} finally {
|
|
13554
|
-
i ||
|
|
13584
|
+
i || v(!1);
|
|
13555
13585
|
}
|
|
13556
13586
|
}
|
|
13557
13587
|
return a(), () => {
|
|
@@ -13563,27 +13593,27 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13563
13593
|
n,
|
|
13564
13594
|
r
|
|
13565
13595
|
]), D(() => {
|
|
13566
|
-
|
|
13596
|
+
_ || P.length === 0 || Ec(f, P);
|
|
13567
13597
|
}, [
|
|
13568
|
-
|
|
13598
|
+
_,
|
|
13569
13599
|
P,
|
|
13570
|
-
|
|
13600
|
+
f
|
|
13571
13601
|
]);
|
|
13572
|
-
let
|
|
13573
|
-
|
|
13602
|
+
let z = (e) => {
|
|
13603
|
+
m((t) => ({
|
|
13574
13604
|
...t,
|
|
13575
13605
|
[e]: !t[e]
|
|
13576
13606
|
}));
|
|
13577
13607
|
};
|
|
13578
|
-
function
|
|
13608
|
+
function oe(t) {
|
|
13579
13609
|
let n = Is(t, P, { module: e });
|
|
13580
13610
|
return Object.entries(c).forEach(([e, t]) => {
|
|
13581
13611
|
n[e] !== void 0 && (n[t] = n[e], delete n[e]);
|
|
13582
13612
|
}), n;
|
|
13583
13613
|
}
|
|
13584
|
-
async function
|
|
13585
|
-
try {
|
|
13586
|
-
|
|
13614
|
+
async function V(n) {
|
|
13615
|
+
if (!(u && await Promise.resolve().then(() => u(n)).catch(() => !1) === !1)) try {
|
|
13616
|
+
S(!0), T("");
|
|
13587
13617
|
let r = Fs(n, P, {
|
|
13588
13618
|
indexed: !0,
|
|
13589
13619
|
module: e
|
|
@@ -13601,22 +13631,22 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13601
13631
|
}
|
|
13602
13632
|
}
|
|
13603
13633
|
}
|
|
13604
|
-
await Po(e, t,
|
|
13634
|
+
await Po(e, t, oe(n), l?.useLegacyUpload ? [] : r);
|
|
13605
13635
|
let i = rl(P, e, "edit");
|
|
13606
13636
|
if (i && Y.success(i), s) s();
|
|
13607
13637
|
else {
|
|
13608
13638
|
let e = Qc(P);
|
|
13609
|
-
e ? e.mode === "back" ?
|
|
13639
|
+
e ? e.mode === "back" ? d(-1) : (e.mode === "route" || e.mode === "detail") && d($c(e.target, t, n) || o || -1) : d(o || -1);
|
|
13610
13640
|
}
|
|
13611
13641
|
} catch (t) {
|
|
13612
13642
|
console.error(`Failed to update ${e}:`, t);
|
|
13613
13643
|
let n = il(P, e, "edit", t?.message);
|
|
13614
|
-
|
|
13644
|
+
T(n), Y.error(n);
|
|
13615
13645
|
} finally {
|
|
13616
|
-
|
|
13646
|
+
S(!1);
|
|
13617
13647
|
}
|
|
13618
13648
|
}
|
|
13619
|
-
let
|
|
13649
|
+
let se = al, [ce, le] = A({}), ue = (e) => String(e?.field ?? ""), H = (e, t, n) => {
|
|
13620
13650
|
if (!e?.field) return !0;
|
|
13621
13651
|
let r = t(n == null ? [e.field] : [...Array.isArray(n) ? n : [n], e.field]);
|
|
13622
13652
|
switch (e.operator) {
|
|
@@ -13629,9 +13659,9 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13629
13659
|
case "notIn": return !String(e.value ?? "").split(",").map((e) => e.trim()).includes(String(r ?? ""));
|
|
13630
13660
|
default: return !0;
|
|
13631
13661
|
}
|
|
13632
|
-
},
|
|
13633
|
-
let o = typeof t.field == "string" && t.field.includes(".") ? t.field.split(".") : null, s = o ?? t.field, c = r === void 0 ? s : [r, ...o ?? [t.field]], l = i !== void 0 && r !== void 0 ? [...Array.isArray(i) ? i : [i], ...Array.isArray(c) ? c : [c]] : c, u = t.type === "checkbox" && (t.options && t.options.length > 0 || t.dataSource && t.dataSource !== "static"),
|
|
13634
|
-
form:
|
|
13662
|
+
}, de = (t, r, i, a = {}) => {
|
|
13663
|
+
let o = typeof t.field == "string" && t.field.includes(".") ? t.field.split(".") : null, s = o ?? t.field, c = r === void 0 ? s : [r, ...o ?? [t.field]], l = i !== void 0 && r !== void 0 ? [...Array.isArray(i) ? i : [i], ...Array.isArray(c) ? c : [c]] : c, u = t.type === "checkbox" && (t.options && t.options.length > 0 || t.dataSource && t.dataSource !== "static"), d = !u && t.type === "checkbox" ? "checked" : "value", p = !!t.editablePermission && !Zc(t.editablePermission, e), m = i !== void 0 && r !== void 0 ? [...Array.isArray(i) ? i : [i], r] : null, h = a.inline || a.hideLabel || !u && t.type === "checkbox" ? "" : /* @__PURE__ */ Z($g, {
|
|
13664
|
+
form: f,
|
|
13635
13665
|
field: t,
|
|
13636
13666
|
siblingPrefix: m,
|
|
13637
13667
|
locked: p
|
|
@@ -13647,26 +13677,26 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13647
13677
|
children: t.helpText
|
|
13648
13678
|
}) : void 0,
|
|
13649
13679
|
required: E_(t),
|
|
13650
|
-
rules: D_(t,
|
|
13680
|
+
rules: D_(t, f, l),
|
|
13651
13681
|
dependencies: _,
|
|
13652
|
-
valuePropName:
|
|
13682
|
+
valuePropName: d,
|
|
13653
13683
|
getValueFromEvent: t.type === "file" ? (e) => Array.isArray(e) ? e : e?.fileList : void 0,
|
|
13654
13684
|
validateTrigger: ["onBlur", "onChange"],
|
|
13655
13685
|
children: /* @__PURE__ */ Z(N_, {
|
|
13656
13686
|
field: t,
|
|
13657
|
-
form:
|
|
13687
|
+
form: f,
|
|
13658
13688
|
name: l,
|
|
13659
13689
|
moduleName: e,
|
|
13660
13690
|
initialValue: t.value,
|
|
13661
13691
|
scopeValues: { clientId: n },
|
|
13662
|
-
onAiUpload: b ? (e) =>
|
|
13663
|
-
formDisabled:
|
|
13692
|
+
onAiUpload: b ? (e) => re.runAction(a.groupNameForActions, t, b, e) : void 0,
|
|
13693
|
+
formDisabled: re.busy
|
|
13664
13694
|
})
|
|
13665
13695
|
}), S = y.length > 0 ? (() => {
|
|
13666
13696
|
let e = Fc(y), n = (n) => /* @__PURE__ */ Z(Lc, {
|
|
13667
13697
|
position: n,
|
|
13668
13698
|
actions: e[n],
|
|
13669
|
-
aiActions:
|
|
13699
|
+
aiActions: re,
|
|
13670
13700
|
groupName: a.groupNameForActions,
|
|
13671
13701
|
field: t
|
|
13672
13702
|
}, n);
|
|
@@ -13685,12 +13715,12 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13685
13715
|
})() : x, C = t.verifyAction ? /* @__PURE__ */ Q("div", {
|
|
13686
13716
|
className: "v1-verify-field-row",
|
|
13687
13717
|
children: [S, /* @__PURE__ */ Z(Qg, {
|
|
13688
|
-
form:
|
|
13718
|
+
form: f,
|
|
13689
13719
|
field: t,
|
|
13690
13720
|
absoluteName: l
|
|
13691
13721
|
})]
|
|
13692
13722
|
}) : S, T = t.prefillWhen?.length ? /* @__PURE__ */ Z(t_, {
|
|
13693
|
-
form:
|
|
13723
|
+
form: f,
|
|
13694
13724
|
rules: t.prefillWhen,
|
|
13695
13725
|
watchPath: m ? [...m, t.prefillWhen[0].field] : yc(t.prefillWhen[0].field),
|
|
13696
13726
|
targetPath: l
|
|
@@ -13698,7 +13728,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13698
13728
|
return t.showIf?.field ? /* @__PURE__ */ Q(w.Fragment, { children: [T, /* @__PURE__ */ Z(B.Item, {
|
|
13699
13729
|
shouldUpdate: !0,
|
|
13700
13730
|
noStyle: !0,
|
|
13701
|
-
children: ({ getFieldValue: e }) =>
|
|
13731
|
+
children: ({ getFieldValue: e }) => H(t.showIf, e, m) ? /* @__PURE__ */ Z(L, {
|
|
13702
13732
|
xs: 24,
|
|
13703
13733
|
md: g,
|
|
13704
13734
|
style: v,
|
|
@@ -13712,7 +13742,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13712
13742
|
className: a.inline ? "v1-combine-cell" : void 0,
|
|
13713
13743
|
children: C
|
|
13714
13744
|
})] }, t.field);
|
|
13715
|
-
},
|
|
13745
|
+
}, fe = (t) => {
|
|
13716
13746
|
let r = typeof t.field == "string" && t.field.includes(".") ? t.field.split(".") : [t.field], i = !!t.editablePermission && !Zc(t.editablePermission, e), a = /* @__PURE__ */ Z(d_, {
|
|
13717
13747
|
field: t,
|
|
13718
13748
|
label: t.label,
|
|
@@ -13721,7 +13751,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13721
13751
|
...e,
|
|
13722
13752
|
show: 1,
|
|
13723
13753
|
edit: 1
|
|
13724
|
-
})) : null, l = Math.max(0, Number(t.minRows ?? 0) || 0), u = t.maxRows !== void 0 && t.maxRows !== "" && Number(t.maxRows) > 0 ? Number(t.maxRows) : 0,
|
|
13754
|
+
})) : null, l = Math.max(0, Number(t.minRows ?? 0) || 0), u = t.maxRows !== void 0 && t.maxRows !== "" && Number(t.maxRows) > 0 ? Number(t.maxRows) : 0, d = Hs(t, t.value);
|
|
13725
13755
|
return /* @__PURE__ */ Z(L, {
|
|
13726
13756
|
xs: 24,
|
|
13727
13757
|
md: 24,
|
|
@@ -13732,12 +13762,12 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13732
13762
|
className: "v1-combine-field",
|
|
13733
13763
|
children: /* @__PURE__ */ Z(B.List, {
|
|
13734
13764
|
name: r,
|
|
13735
|
-
initialValue:
|
|
13765
|
+
initialValue: d,
|
|
13736
13766
|
rules: [{ validator: async (e, n = []) => {
|
|
13737
13767
|
if (E_(t) && !(s ? n.some((e) => s_(e)) : n.some((e) => e != null && e !== "" && !(Array.isArray(e) && e.length === 0)))) throw Error("Mandatory Field");
|
|
13738
13768
|
if (l > 0 && n.length < l) throw Error(`Keep at least ${l} ${s ? "row" : "value"}${l > 1 ? "s" : ""}.`);
|
|
13739
13769
|
} }],
|
|
13740
|
-
children: (i, { add: a, remove:
|
|
13770
|
+
children: (i, { add: a, remove: d }, { errors: p }) => /* @__PURE__ */ Q("div", {
|
|
13741
13771
|
className: "v1-addrow-wrapper",
|
|
13742
13772
|
children: [
|
|
13743
13773
|
i.map(({ key: a, name: u }) => /* @__PURE__ */ Q("div", {
|
|
@@ -13746,7 +13776,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13746
13776
|
type: "text",
|
|
13747
13777
|
danger: !0,
|
|
13748
13778
|
icon: /* @__PURE__ */ Z(Je, {}),
|
|
13749
|
-
onClick: () =>
|
|
13779
|
+
onClick: () => d(u),
|
|
13750
13780
|
disabled: i.length <= l,
|
|
13751
13781
|
className: "v1-addrow-delete-btn"
|
|
13752
13782
|
}), /* @__PURE__ */ Z("div", {
|
|
@@ -13754,20 +13784,20 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13754
13784
|
children: s ? /* @__PURE__ */ Z(U, {
|
|
13755
13785
|
gutter: [24, 0],
|
|
13756
13786
|
align: "top",
|
|
13757
|
-
children:
|
|
13787
|
+
children: me(c, u, r[0], !1, t.field)
|
|
13758
13788
|
}) : /* @__PURE__ */ Z(B.Item, {
|
|
13759
13789
|
name: [u],
|
|
13760
13790
|
noStyle: !0,
|
|
13761
13791
|
valuePropName: t.type === "checkbox" && !t.options?.length ? "checked" : "value",
|
|
13762
13792
|
getValueFromEvent: t.type === "file" ? (e) => Array.isArray(e) ? e : e?.fileList : void 0,
|
|
13763
|
-
rules: D_(o,
|
|
13793
|
+
rules: D_(o, f, [...r, u], !0),
|
|
13764
13794
|
children: /* @__PURE__ */ Z(N_, {
|
|
13765
13795
|
field: o,
|
|
13766
|
-
form:
|
|
13796
|
+
form: f,
|
|
13767
13797
|
name: [...r, u],
|
|
13768
13798
|
moduleName: e,
|
|
13769
13799
|
scopeValues: { clientId: n },
|
|
13770
|
-
formDisabled:
|
|
13800
|
+
formDisabled: re.busy
|
|
13771
13801
|
})
|
|
13772
13802
|
})
|
|
13773
13803
|
})]
|
|
@@ -13785,7 +13815,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13785
13815
|
})
|
|
13786
13816
|
})
|
|
13787
13817
|
}, t.field);
|
|
13788
|
-
},
|
|
13818
|
+
}, pe = (t, r, i) => {
|
|
13789
13819
|
let a = typeof t.field == "string" && t.field.includes(".") ? t.field.split(".") : [t.field], o = !!t.editablePermission && !Zc(t.editablePermission, e), s = /* @__PURE__ */ Z(d_, {
|
|
13790
13820
|
field: t,
|
|
13791
13821
|
label: t.label,
|
|
@@ -13794,7 +13824,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13794
13824
|
...e,
|
|
13795
13825
|
show: 1,
|
|
13796
13826
|
edit: 1
|
|
13797
|
-
})) : null,
|
|
13827
|
+
})) : null, d = Math.max(0, Number(t.minRows ?? 0) || 0), p = t.maxRows !== void 0 && t.maxRows !== "" && Number(t.maxRows) > 0 ? Number(t.maxRows) : 0, m = [r, ...a], h = [
|
|
13798
13828
|
...Array.isArray(i) ? i : [i],
|
|
13799
13829
|
r,
|
|
13800
13830
|
...a
|
|
@@ -13812,7 +13842,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13812
13842
|
initialValue: g,
|
|
13813
13843
|
rules: l ? [{ validator: async (e, n = []) => {
|
|
13814
13844
|
if (E_(t) && !n.some((e) => s_(e))) throw Error("Mandatory Field");
|
|
13815
|
-
if (
|
|
13845
|
+
if (d > 0 && n.length < d) throw Error(`Keep at least ${d} row${d > 1 ? "s" : ""}.`);
|
|
13816
13846
|
} }] : [],
|
|
13817
13847
|
children: (r, { add: i, remove: a }, { errors: o }) => /* @__PURE__ */ Q("div", {
|
|
13818
13848
|
className: "v1-addrow-wrapper",
|
|
@@ -13826,27 +13856,27 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13826
13856
|
danger: !0,
|
|
13827
13857
|
icon: /* @__PURE__ */ Z(Je, {}),
|
|
13828
13858
|
onClick: () => a(o),
|
|
13829
|
-
disabled: r.length <=
|
|
13859
|
+
disabled: r.length <= d,
|
|
13830
13860
|
className: "v1-addrow-delete-btn"
|
|
13831
13861
|
}), /* @__PURE__ */ Z("div", {
|
|
13832
13862
|
className: "v1-addrow-fields",
|
|
13833
13863
|
children: l ? /* @__PURE__ */ Z(U, {
|
|
13834
13864
|
gutter: [24, 0],
|
|
13835
13865
|
align: "top",
|
|
13836
|
-
children:
|
|
13866
|
+
children: me(u, o, h, !1, t.field)
|
|
13837
13867
|
}) : /* @__PURE__ */ Z(B.Item, {
|
|
13838
13868
|
name: [o],
|
|
13839
13869
|
noStyle: !0,
|
|
13840
13870
|
valuePropName: t.type === "checkbox" && !t.options?.length ? "checked" : "value",
|
|
13841
13871
|
getValueFromEvent: t.type === "file" ? (e) => Array.isArray(e) ? e : e?.fileList : void 0,
|
|
13842
|
-
rules: D_(c,
|
|
13872
|
+
rules: D_(c, f, s, !0),
|
|
13843
13873
|
children: /* @__PURE__ */ Z(N_, {
|
|
13844
13874
|
field: c,
|
|
13845
|
-
form:
|
|
13875
|
+
form: f,
|
|
13846
13876
|
name: s,
|
|
13847
13877
|
moduleName: e,
|
|
13848
13878
|
scopeValues: { clientId: n },
|
|
13849
|
-
formDisabled:
|
|
13879
|
+
formDisabled: re.busy
|
|
13850
13880
|
})
|
|
13851
13881
|
})
|
|
13852
13882
|
})]
|
|
@@ -13865,20 +13895,20 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13865
13895
|
})
|
|
13866
13896
|
})
|
|
13867
13897
|
}, `${i}-${r}-${t.field}`);
|
|
13868
|
-
},
|
|
13898
|
+
}, me = (e, t, n, r = !1, i) => {
|
|
13869
13899
|
let a = /* @__PURE__ */ new Set(), o = [];
|
|
13870
13900
|
return e.forEach((s) => {
|
|
13871
13901
|
if (i_(s.addRow) && t === void 0) {
|
|
13872
|
-
o.push(
|
|
13902
|
+
o.push(fe(s));
|
|
13873
13903
|
return;
|
|
13874
13904
|
}
|
|
13875
13905
|
if (i_(s.addRow) && t !== void 0) {
|
|
13876
|
-
o.push(
|
|
13906
|
+
o.push(pe(s, t, n));
|
|
13877
13907
|
return;
|
|
13878
13908
|
}
|
|
13879
13909
|
let c = s.combineKey?.trim?.();
|
|
13880
13910
|
if (!c) {
|
|
13881
|
-
o.push(
|
|
13911
|
+
o.push(de(s, t, n, {
|
|
13882
13912
|
hideLabel: r,
|
|
13883
13913
|
groupNameForActions: i
|
|
13884
13914
|
}));
|
|
@@ -13888,12 +13918,12 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13888
13918
|
if (a.has(l)) return;
|
|
13889
13919
|
let u = e.filter((e) => e.combineKey === c);
|
|
13890
13920
|
u.forEach((e) => a.add(`${n ?? "root"}:${t ?? "root"}:${e.combineKey}`));
|
|
13891
|
-
let
|
|
13892
|
-
form:
|
|
13921
|
+
let d = /* @__PURE__ */ Z($g, {
|
|
13922
|
+
form: f,
|
|
13893
13923
|
field: u.find((e) => e.combineLabel) ?? s,
|
|
13894
13924
|
siblingPrefix: n !== void 0 && t !== void 0 ? [...Array.isArray(n) ? n : [n], t] : null,
|
|
13895
13925
|
combined: !0
|
|
13896
|
-
}), p = u.find((e) => e.combineToggleTarget)?.combineToggleTarget, m = u.find((e) => e.combineToggleLabel)?.combineToggleLabel ?? "Show range", h = u.some((e) => i_(e.combineWrap)), g = Number(u.find((e) => [12, 24].includes(Number(e.combineSpan)))?.combineSpan), _ = p ? u.find((e) =>
|
|
13926
|
+
}), p = u.find((e) => e.combineToggleTarget)?.combineToggleTarget, m = u.find((e) => e.combineToggleLabel)?.combineToggleLabel ?? "Show range", h = u.some((e) => i_(e.combineWrap)), g = Number(u.find((e) => [12, 24].includes(Number(e.combineSpan)))?.combineSpan), _ = p ? u.find((e) => ue(e) === p) : null, v = _?.field?.includes?.(".") ? _.field.split(".") : [_?.field].filter(Boolean), y = _ ? n !== void 0 && t !== void 0 ? [
|
|
13897
13927
|
n,
|
|
13898
13928
|
t,
|
|
13899
13929
|
...v
|
|
@@ -13902,7 +13932,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13902
13932
|
xs: 24,
|
|
13903
13933
|
md: x,
|
|
13904
13934
|
children: /* @__PURE__ */ Z(B.Item, {
|
|
13905
|
-
label:
|
|
13935
|
+
label: d,
|
|
13906
13936
|
required: b,
|
|
13907
13937
|
colon: !1,
|
|
13908
13938
|
className: "v1-combine-field",
|
|
@@ -13910,20 +13940,20 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13910
13940
|
noStyle: !0,
|
|
13911
13941
|
shouldUpdate: !0,
|
|
13912
13942
|
children: ({ getFieldValue: e }) => {
|
|
13913
|
-
let r = y ? !o_(e(y)) : !1, i =
|
|
13943
|
+
let r = y ? !o_(e(y)) : !1, i = ce[l] ?? r, a = p && !i ? u.filter((e) => ue(e) !== p) : u;
|
|
13914
13944
|
return /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z(U, {
|
|
13915
13945
|
gutter: [8, 0],
|
|
13916
13946
|
align: "top",
|
|
13917
13947
|
wrap: h,
|
|
13918
13948
|
className: `v1-combine-row${h ? " v1-combine-row-wrap" : ""}`,
|
|
13919
|
-
children: a.map((e) =>
|
|
13949
|
+
children: a.map((e) => de(e, t, n, { inline: !0 }))
|
|
13920
13950
|
}), p && /* @__PURE__ */ Q("div", {
|
|
13921
13951
|
className: "v1-combine-range",
|
|
13922
13952
|
children: [/* @__PURE__ */ Z(K, {
|
|
13923
13953
|
size: "small",
|
|
13924
13954
|
checked: i,
|
|
13925
13955
|
onChange: (e) => {
|
|
13926
|
-
!e && y && (
|
|
13956
|
+
!e && y && (f.setFieldValue(y, void 0), f.validateFields([y]).catch(() => {})), le((t) => ({
|
|
13927
13957
|
...t,
|
|
13928
13958
|
[l]: e
|
|
13929
13959
|
}));
|
|
@@ -13940,53 +13970,53 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13940
13970
|
}, l));
|
|
13941
13971
|
}), o;
|
|
13942
13972
|
};
|
|
13943
|
-
return /* @__PURE__ */ Q("main", { children: [
|
|
13973
|
+
return /* @__PURE__ */ Q("main", { children: [ae.length > 0 && /* @__PURE__ */ Z(El, { items: ae }), /* @__PURE__ */ Q("div", {
|
|
13944
13974
|
className: "v1-edit-page",
|
|
13945
13975
|
children: [/* @__PURE__ */ Z("div", {
|
|
13946
13976
|
className: "v1-page-inner",
|
|
13947
13977
|
children: /* @__PURE__ */ Q(_e, {
|
|
13948
|
-
spinning:
|
|
13949
|
-
tip:
|
|
13978
|
+
spinning: _ || re.busy,
|
|
13979
|
+
tip: re.busy ? "Running AI action…" : "Loading form fields...",
|
|
13950
13980
|
children: [
|
|
13951
|
-
|
|
13981
|
+
y && /* @__PURE__ */ Z(j, {
|
|
13952
13982
|
type: "error",
|
|
13953
13983
|
showIcon: !0,
|
|
13954
|
-
message:
|
|
13984
|
+
message: y,
|
|
13955
13985
|
style: { marginBottom: 16 }
|
|
13956
13986
|
}),
|
|
13957
|
-
|
|
13987
|
+
C && /* @__PURE__ */ Z(j, {
|
|
13958
13988
|
type: "error",
|
|
13959
13989
|
showIcon: !0,
|
|
13960
|
-
message:
|
|
13990
|
+
message: C,
|
|
13961
13991
|
style: { marginBottom: 16 }
|
|
13962
13992
|
}),
|
|
13963
13993
|
/* @__PURE__ */ Q(B, {
|
|
13964
|
-
form:
|
|
13994
|
+
form: f,
|
|
13965
13995
|
layout: "vertical",
|
|
13966
13996
|
colon: !1,
|
|
13967
13997
|
className: "v1-form",
|
|
13968
|
-
disabled:
|
|
13998
|
+
disabled: re.busy,
|
|
13969
13999
|
requiredMark: (e, { required: t }) => /* @__PURE__ */ Q(X, { children: [e, t && /* @__PURE__ */ Z("span", {
|
|
13970
14000
|
className: "v1-required-mark",
|
|
13971
14001
|
children: " *"
|
|
13972
14002
|
})] }),
|
|
13973
|
-
onFinish:
|
|
13974
|
-
onFinishFailed:
|
|
14003
|
+
onFinish: V,
|
|
14004
|
+
onFinishFailed: se,
|
|
13975
14005
|
children: [P.map((e, t) => {
|
|
13976
|
-
let n = e.name ?? e.id ?? String(t), r = e.name ?? n, i = Gs(
|
|
13977
|
-
l.forEach((e) =>
|
|
13978
|
-
},
|
|
13979
|
-
l.forEach((t) =>
|
|
14006
|
+
let n = e.name ?? e.id ?? String(t), r = e.name ?? n, i = Gs(te, r), a = !!i && i.leaderName !== r, o = i ? P.find((e) => e.name === i.leaderName) ?? e : e, s = Math.max(0, Number(o.minRows ?? 0) || 0), c = Math.max(0, Number(o.maxRows ?? 0) || 0), l = i ? i.memberNames : [r], u = () => {
|
|
14007
|
+
l.forEach((e) => ne.current[e]?.add());
|
|
14008
|
+
}, d = (e) => {
|
|
14009
|
+
l.forEach((t) => ne.current[t]?.remove(e));
|
|
13980
14010
|
}, m = e.addRow ? /* @__PURE__ */ Z(B.List, {
|
|
13981
14011
|
name: r,
|
|
13982
|
-
initialValue:
|
|
14012
|
+
initialValue: ie[e.name] ?? [],
|
|
13983
14013
|
rules: a ? [] : [{ validator: async (t, n = []) => {
|
|
13984
|
-
if (!(i_(e.toggleEnabled) && e.toggleField &&
|
|
14014
|
+
if (!(i_(e.toggleEnabled) && e.toggleField && f.getFieldValue(e.toggleField))) {
|
|
13985
14015
|
if (s > 0 && n.length < s) throw Error(`Keep at least ${s} row${s > 1 ? "s" : ""}.`);
|
|
13986
14016
|
if (i_(e.requireOne) && n.some((e) => !s_(e))) throw Error("Fill at least one field in each added row.");
|
|
13987
14017
|
}
|
|
13988
14018
|
} }],
|
|
13989
|
-
children: (t, { add: n, remove: i }, { errors: l }) => (
|
|
14019
|
+
children: (t, { add: n, remove: i }, { errors: l }) => (ne.current[r] = {
|
|
13990
14020
|
add: n,
|
|
13991
14021
|
remove: i
|
|
13992
14022
|
}, /* @__PURE__ */ Q("div", {
|
|
@@ -14013,7 +14043,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
14013
14043
|
md: e.col ?? 12,
|
|
14014
14044
|
className: "v1-addrow-header-label",
|
|
14015
14045
|
children: e.label
|
|
14016
|
-
},
|
|
14046
|
+
}, ue(e)))
|
|
14017
14047
|
}),
|
|
14018
14048
|
t.map(({ key: n, name: i }) => /* @__PURE__ */ Q("div", {
|
|
14019
14049
|
className: "v1-addrow-item",
|
|
@@ -14022,14 +14052,14 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
14022
14052
|
danger: !0,
|
|
14023
14053
|
icon: /* @__PURE__ */ Z(Je, {}),
|
|
14024
14054
|
disabled: t.length <= s,
|
|
14025
|
-
onClick: () =>
|
|
14055
|
+
onClick: () => d(i),
|
|
14026
14056
|
className: "v1-addrow-delete-btn"
|
|
14027
14057
|
}), /* @__PURE__ */ Z("div", {
|
|
14028
14058
|
className: "v1-addrow-fields",
|
|
14029
14059
|
children: /* @__PURE__ */ Z(U, {
|
|
14030
14060
|
gutter: [24, 0],
|
|
14031
14061
|
align: "top",
|
|
14032
|
-
children:
|
|
14062
|
+
children: me(e.fields, i, r, i_(e.sharedRowLabels), r)
|
|
14033
14063
|
})
|
|
14034
14064
|
})]
|
|
14035
14065
|
}, n)),
|
|
@@ -14038,7 +14068,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
14038
14068
|
}))
|
|
14039
14069
|
}) : /* @__PURE__ */ Z(U, {
|
|
14040
14070
|
gutter: [24, 0],
|
|
14041
|
-
children:
|
|
14071
|
+
children: me(e.fields, void 0, void 0, !1, r)
|
|
14042
14072
|
});
|
|
14043
14073
|
return /* @__PURE__ */ Z(I, {
|
|
14044
14074
|
className: "v1-card v1-edit-card",
|
|
@@ -14056,9 +14086,9 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
14056
14086
|
/* @__PURE__ */ Z(F, {
|
|
14057
14087
|
type: "text",
|
|
14058
14088
|
size: "small",
|
|
14059
|
-
icon:
|
|
14089
|
+
icon: p[n] ? /* @__PURE__ */ Z(Xe, {}) : /* @__PURE__ */ Z(Xt, {}),
|
|
14060
14090
|
onClick: (e) => {
|
|
14061
|
-
e.stopPropagation(),
|
|
14091
|
+
e.stopPropagation(), z(n);
|
|
14062
14092
|
}
|
|
14063
14093
|
})
|
|
14064
14094
|
]
|
|
@@ -14069,13 +14099,13 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
14069
14099
|
children: ({ getFieldValue: t }) => {
|
|
14070
14100
|
let r = i_(e.toggleEnabled) && e.toggleField && !!t(e.toggleField);
|
|
14071
14101
|
return /* @__PURE__ */ Z("div", {
|
|
14072
|
-
style: { display:
|
|
14102
|
+
style: { display: p[n] || r ? "none" : "block" },
|
|
14073
14103
|
children: m
|
|
14074
14104
|
});
|
|
14075
14105
|
}
|
|
14076
14106
|
})
|
|
14077
14107
|
}, n);
|
|
14078
|
-
}), !
|
|
14108
|
+
}), !_ && !y && P.length === 0 && /* @__PURE__ */ Z(j, {
|
|
14079
14109
|
type: "info",
|
|
14080
14110
|
showIcon: !0,
|
|
14081
14111
|
message: "No form fields are configured."
|
|
@@ -14091,14 +14121,14 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
14091
14121
|
}), /* @__PURE__ */ Q(G, {
|
|
14092
14122
|
size: 12,
|
|
14093
14123
|
children: [/* @__PURE__ */ Z(F, {
|
|
14094
|
-
onClick: () =>
|
|
14124
|
+
onClick: () => d(o || -1),
|
|
14095
14125
|
children: "Cancel"
|
|
14096
14126
|
}), /* @__PURE__ */ Z(e_, {
|
|
14097
|
-
form:
|
|
14127
|
+
form: f,
|
|
14098
14128
|
groups: P,
|
|
14099
|
-
onClick: () =>
|
|
14100
|
-
disabled:
|
|
14101
|
-
loading:
|
|
14129
|
+
onClick: () => f.submit(),
|
|
14130
|
+
disabled: _ || x,
|
|
14131
|
+
loading: x,
|
|
14102
14132
|
children: a
|
|
14103
14133
|
})]
|
|
14104
14134
|
})]
|
|
@@ -14607,7 +14637,7 @@ function tv(e, t) {
|
|
|
14607
14637
|
function nv(e, t) {
|
|
14608
14638
|
return /* @__PURE__ */ Q(G, {
|
|
14609
14639
|
size: 6,
|
|
14610
|
-
children: [/* @__PURE__ */ Z("span", { children: e }), /* @__PURE__ */ Z(
|
|
14640
|
+
children: [/* @__PURE__ */ Z("span", { children: e }), /* @__PURE__ */ Z(ee, {
|
|
14611
14641
|
count: t,
|
|
14612
14642
|
overflowCount: 9999
|
|
14613
14643
|
})]
|
|
@@ -14617,7 +14647,7 @@ function rv({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
|
|
|
14617
14647
|
let g = dn(), _ = un(), [v, y] = A("all"), [b, x] = A(""), [S, C] = A([]), [w, T] = A([]), [E, D] = A({
|
|
14618
14648
|
current: 1,
|
|
14619
14649
|
pageSize: 10
|
|
14620
|
-
}), [j, M] = A([]), [N,
|
|
14650
|
+
}), [j, M] = A([]), [N, ee] = A(!1), P = k(null), L = n.filter((e) => !e.maxSelect || S.length <= e.maxSelect).map((e) => ({
|
|
14621
14651
|
key: e.key ?? e.name,
|
|
14622
14652
|
label: e.label ?? e.name,
|
|
14623
14653
|
danger: e.danger ?? !1,
|
|
@@ -14726,7 +14756,7 @@ function rv({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
|
|
|
14726
14756
|
value: b,
|
|
14727
14757
|
onChange: (e) => {
|
|
14728
14758
|
let t = e.target.value;
|
|
14729
|
-
x(t), u ? (clearTimeout(
|
|
14759
|
+
x(t), u ? (clearTimeout(P.current), P.current = setTimeout(() => {
|
|
14730
14760
|
u(t), c?.(1);
|
|
14731
14761
|
}, 350)) : ne ? c?.(1) : D({
|
|
14732
14762
|
...E,
|
|
@@ -14767,7 +14797,7 @@ function rv({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
|
|
|
14767
14797
|
gap: 3,
|
|
14768
14798
|
children: [/* @__PURE__ */ Z(ae, {
|
|
14769
14799
|
open: N,
|
|
14770
|
-
onOpenChange:
|
|
14800
|
+
onOpenChange: ee,
|
|
14771
14801
|
trigger: ["click"],
|
|
14772
14802
|
dropdownRender: () => de,
|
|
14773
14803
|
placement: "bottomLeft",
|
|
@@ -14903,7 +14933,7 @@ function sv({ tabs: e = [], activeKey: t, onChange: n, className: r = "" }) {
|
|
|
14903
14933
|
children: [/* @__PURE__ */ Z("span", {
|
|
14904
14934
|
className: "stylish-tabs__label",
|
|
14905
14935
|
children: e.label
|
|
14906
|
-
}), r && /* @__PURE__ */ Z(
|
|
14936
|
+
}), r && /* @__PURE__ */ Z(ee, {
|
|
14907
14937
|
count: e.count,
|
|
14908
14938
|
showZero: !0,
|
|
14909
14939
|
overflowCount: 999,
|
|
@@ -18522,11 +18552,11 @@ function ex({ field: e, index: t, configType: n, moduleKey: r, onUpdate: i, onRe
|
|
|
18522
18552
|
v([]);
|
|
18523
18553
|
}
|
|
18524
18554
|
}
|
|
18525
|
-
function
|
|
18555
|
+
function ee(t) {
|
|
18526
18556
|
let n = e.secondaryFields ?? [];
|
|
18527
18557
|
!t || n.includes(t) || k({ secondaryFields: [...n, t] });
|
|
18528
18558
|
}
|
|
18529
|
-
function
|
|
18559
|
+
function P(t) {
|
|
18530
18560
|
k({ secondaryFields: (e.secondaryFields ?? []).filter((e) => e !== t) });
|
|
18531
18561
|
}
|
|
18532
18562
|
function I() {
|
|
@@ -18628,8 +18658,8 @@ function ex({ field: e, index: t, configType: n, moduleKey: r, onUpdate: i, onRe
|
|
|
18628
18658
|
subfields: _,
|
|
18629
18659
|
onCollectionChange: M,
|
|
18630
18660
|
onLookupFieldChange: N,
|
|
18631
|
-
addSecondaryField:
|
|
18632
|
-
removeSecondaryField:
|
|
18661
|
+
addSecondaryField: ee,
|
|
18662
|
+
removeSecondaryField: P,
|
|
18633
18663
|
addActionButton: I,
|
|
18634
18664
|
updateActionButton: te,
|
|
18635
18665
|
removeActionButton: L,
|
|
@@ -22659,7 +22689,7 @@ function Hx({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
|
|
|
22659
22689
|
t = !0;
|
|
22660
22690
|
};
|
|
22661
22691
|
}, [e, d]);
|
|
22662
|
-
async function
|
|
22692
|
+
async function ee(e) {
|
|
22663
22693
|
if (!(!e || j.current[e])) {
|
|
22664
22694
|
j.current[e] = "loading", g(!0);
|
|
22665
22695
|
try {
|
|
@@ -22727,15 +22757,15 @@ function Hx({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
|
|
|
22727
22757
|
afterSubmitTarget: "",
|
|
22728
22758
|
order: 0,
|
|
22729
22759
|
fields: []
|
|
22730
|
-
})),
|
|
22760
|
+
})), ee(r);
|
|
22731
22761
|
}, [
|
|
22732
22762
|
e,
|
|
22733
22763
|
t,
|
|
22734
22764
|
n,
|
|
22735
22765
|
c
|
|
22736
22766
|
]);
|
|
22737
|
-
function
|
|
22738
|
-
f(e),
|
|
22767
|
+
function P(e) {
|
|
22768
|
+
f(e), ee(e);
|
|
22739
22769
|
}
|
|
22740
22770
|
function I() {
|
|
22741
22771
|
S(/* @__PURE__ */ new Set()), w("settings"), E(!1), a();
|
|
@@ -22909,7 +22939,7 @@ function Hx({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
|
|
|
22909
22939
|
children: /* @__PURE__ */ Z(W, {
|
|
22910
22940
|
options: r,
|
|
22911
22941
|
placeholder: "Select module",
|
|
22912
|
-
onChange:
|
|
22942
|
+
onChange: P
|
|
22913
22943
|
})
|
|
22914
22944
|
}),
|
|
22915
22945
|
/* @__PURE__ */ Z(B.Item, {
|
|
@@ -23566,7 +23596,7 @@ function Ux({ groups: e, onEdit: t, onDelete: n, onCopy: r, onPaste: i, canPaste
|
|
|
23566
23596
|
key: "fields",
|
|
23567
23597
|
align: "center",
|
|
23568
23598
|
width: 76,
|
|
23569
|
-
render: (e) => /* @__PURE__ */ Z(
|
|
23599
|
+
render: (e) => /* @__PURE__ */ Z(ee, {
|
|
23570
23600
|
count: e?.length ?? 0,
|
|
23571
23601
|
showZero: !0,
|
|
23572
23602
|
color: "var(--color-brand)"
|
|
@@ -24379,7 +24409,7 @@ function Gx({ moduleOptions: e }) {
|
|
|
24379
24409
|
key: "groups",
|
|
24380
24410
|
align: "center",
|
|
24381
24411
|
width: 76,
|
|
24382
|
-
render: (e) => /* @__PURE__ */ Z(
|
|
24412
|
+
render: (e) => /* @__PURE__ */ Z(ee, {
|
|
24383
24413
|
count: e?.length ?? 0,
|
|
24384
24414
|
showZero: !0,
|
|
24385
24415
|
color: "var(--color-brand)"
|
|
@@ -24497,7 +24527,7 @@ function Kx() {
|
|
|
24497
24527
|
function N() {
|
|
24498
24528
|
d(null), l(!0);
|
|
24499
24529
|
}
|
|
24500
|
-
function
|
|
24530
|
+
function P(e) {
|
|
24501
24531
|
d(e), l(!0);
|
|
24502
24532
|
}
|
|
24503
24533
|
function I() {
|
|
@@ -24585,7 +24615,7 @@ function Kx() {
|
|
|
24585
24615
|
style: { background: n }
|
|
24586
24616
|
}),
|
|
24587
24617
|
t,
|
|
24588
|
-
/* @__PURE__ */ Z(
|
|
24618
|
+
/* @__PURE__ */ Z(ee, {
|
|
24589
24619
|
count: r.groups.length,
|
|
24590
24620
|
showZero: !0,
|
|
24591
24621
|
color: n,
|
|
@@ -24619,7 +24649,7 @@ function Kx() {
|
|
|
24619
24649
|
spinning: r.loading,
|
|
24620
24650
|
children: /* @__PURE__ */ Z(Ux, {
|
|
24621
24651
|
groups: a,
|
|
24622
|
-
onEdit:
|
|
24652
|
+
onEdit: P,
|
|
24623
24653
|
onDelete: L,
|
|
24624
24654
|
onCopy: oe,
|
|
24625
24655
|
onPaste: B,
|
|
@@ -26050,7 +26080,7 @@ function hS({ open: e, onClose: t }) {
|
|
|
26050
26080
|
});
|
|
26051
26081
|
}
|
|
26052
26082
|
function gS() {
|
|
26053
|
-
let [e, t] = A([]), [n, r] = A(!0), [i, a] = A(""), [o, s] = A([]), [c, l] = A([]), [u, d] = A([]), [f, p] = A({}), [m, h] = A([]), [g, _] = A(!1), [v, y] = A(""), [b, x] = A(!1), [S, C] = A(null), [w, T] = A(null), [E, k] = A(!1), [M, N] = A(!1), [
|
|
26083
|
+
let [e, t] = A([]), [n, r] = A(!0), [i, a] = A(""), [o, s] = A([]), [c, l] = A([]), [u, d] = A([]), [f, p] = A({}), [m, h] = A([]), [g, _] = A(!1), [v, y] = A(""), [b, x] = A(!1), [S, C] = A(null), [w, T] = A(null), [E, k] = A(!1), [M, N] = A(!1), [P, I] = A(null), [te, L] = A(0), [ne, re] = A(""), [ie, R] = A({});
|
|
26054
26084
|
function oe(e) {
|
|
26055
26085
|
I(Qx[e]);
|
|
26056
26086
|
}
|
|
@@ -26236,7 +26266,7 @@ function gS() {
|
|
|
26236
26266
|
key: "fields",
|
|
26237
26267
|
width: 76,
|
|
26238
26268
|
align: "center",
|
|
26239
|
-
render: (e) => /* @__PURE__ */ Z(
|
|
26269
|
+
render: (e) => /* @__PURE__ */ Z(ee, {
|
|
26240
26270
|
count: e?.length ?? 0,
|
|
26241
26271
|
showZero: !0,
|
|
26242
26272
|
color: "var(--color-brand)"
|
|
@@ -26637,13 +26667,13 @@ function gS() {
|
|
|
26637
26667
|
onClose: () => k(!1)
|
|
26638
26668
|
}),
|
|
26639
26669
|
/* @__PURE__ */ Z(gx, {
|
|
26640
|
-
open: !!
|
|
26670
|
+
open: !!P,
|
|
26641
26671
|
scope: "detailConfig",
|
|
26642
|
-
action:
|
|
26643
|
-
title:
|
|
26644
|
-
description:
|
|
26645
|
-
confirmLabel:
|
|
26646
|
-
danger:
|
|
26672
|
+
action: P?.action,
|
|
26673
|
+
title: P?.title,
|
|
26674
|
+
description: P?.description,
|
|
26675
|
+
confirmLabel: P?.confirmLabel,
|
|
26676
|
+
danger: P?.danger,
|
|
26647
26677
|
onCancel: () => I(null),
|
|
26648
26678
|
onVerified: se
|
|
26649
26679
|
})
|
|
@@ -27176,7 +27206,7 @@ function VS({ open: e, initial: t, isChild: n, popupForms: r, templateOptions: i
|
|
|
27176
27206
|
});
|
|
27177
27207
|
}
|
|
27178
27208
|
function HS() {
|
|
27179
|
-
let [e, t] = A([]), [n, r] = A(""), [i, a] = A([]), [o, s] = A(null), [c, l] = A([]), [u, d] = A(!1), [f, p] = A(!1), [m, h] = A(!1), [g, _] = A(null), [v, y] = A(!1), [b, x] = A(null), [S, C] = A([]), [w, T] = A([]), [k, M] = A(null), [N,
|
|
27209
|
+
let [e, t] = A([]), [n, r] = A(""), [i, a] = A([]), [o, s] = A(null), [c, l] = A([]), [u, d] = A(!1), [f, p] = A(!1), [m, h] = A(!1), [g, _] = A(null), [v, y] = A(!1), [b, x] = A(null), [S, C] = A([]), [w, T] = A([]), [k, M] = A(null), [N, ee] = A(""), [P, I] = A([]), [te, L] = A([]);
|
|
27180
27210
|
D(() => {
|
|
27181
27211
|
Ua().then((e) => {
|
|
27182
27212
|
let n = ix(e).map((e) => e.value);
|
|
@@ -27681,7 +27711,7 @@ function HS() {
|
|
|
27681
27711
|
prefix: /* @__PURE__ */ Z(Ft, {}),
|
|
27682
27712
|
placeholder: "Search actions",
|
|
27683
27713
|
value: N,
|
|
27684
|
-
onChange: (e) =>
|
|
27714
|
+
onChange: (e) => ee(e.target.value)
|
|
27685
27715
|
}), u && /* @__PURE__ */ Z(PS, {
|
|
27686
27716
|
type: "warning",
|
|
27687
27717
|
children: "Unsaved changes"
|
|
@@ -27725,7 +27755,7 @@ function HS() {
|
|
|
27725
27755
|
isChild: !!R,
|
|
27726
27756
|
popupForms: S,
|
|
27727
27757
|
templateOptions: w,
|
|
27728
|
-
permissionModules:
|
|
27758
|
+
permissionModules: P,
|
|
27729
27759
|
permissionActions: te,
|
|
27730
27760
|
onClose: () => y(!1),
|
|
27731
27761
|
onSave: se
|
|
@@ -27937,7 +27967,7 @@ function tC() {
|
|
|
27937
27967
|
}
|
|
27938
27968
|
w(i);
|
|
27939
27969
|
}
|
|
27940
|
-
async function
|
|
27970
|
+
async function ee() {
|
|
27941
27971
|
y(!0);
|
|
27942
27972
|
try {
|
|
27943
27973
|
for (let e of XS) await To({
|
|
@@ -27951,7 +27981,7 @@ function tC() {
|
|
|
27951
27981
|
y(!1);
|
|
27952
27982
|
}
|
|
27953
27983
|
}
|
|
27954
|
-
function
|
|
27984
|
+
function P(e, t) {
|
|
27955
27985
|
h((n) => ({
|
|
27956
27986
|
...n,
|
|
27957
27987
|
conditions: n.conditions.map((n, r) => r === e ? {
|
|
@@ -28009,7 +28039,7 @@ function tC() {
|
|
|
28009
28039
|
children: /* @__PURE__ */ Z(F, {
|
|
28010
28040
|
icon: /* @__PURE__ */ Z(Gt, {}),
|
|
28011
28041
|
loading: v,
|
|
28012
|
-
onClick:
|
|
28042
|
+
onClick: ee,
|
|
28013
28043
|
children: "Seed Job Defaults"
|
|
28014
28044
|
})
|
|
28015
28045
|
})
|
|
@@ -28212,7 +28242,7 @@ function tC() {
|
|
|
28212
28242
|
options: GS,
|
|
28213
28243
|
value: e.operator,
|
|
28214
28244
|
style: { width: 140 },
|
|
28215
|
-
onChange: (e) =>
|
|
28245
|
+
onChange: (e) => P(t, {
|
|
28216
28246
|
operator: e,
|
|
28217
28247
|
value: "",
|
|
28218
28248
|
compareField: ""
|
|
@@ -28235,7 +28265,7 @@ function tC() {
|
|
|
28235
28265
|
options: b,
|
|
28236
28266
|
style: { width: "100%" },
|
|
28237
28267
|
placeholder: "Select or type field name",
|
|
28238
|
-
onChange: (e) =>
|
|
28268
|
+
onChange: (e) => P(t, { field: e[e.length - 1] ?? "" }),
|
|
28239
28269
|
filterOption: (e, t) => (t?.label ?? t?.value ?? "").toLowerCase().includes(e.toLowerCase())
|
|
28240
28270
|
}), /* @__PURE__ */ Q(US, {
|
|
28241
28271
|
type: "secondary",
|
|
@@ -28259,7 +28289,7 @@ function tC() {
|
|
|
28259
28289
|
value: e.value,
|
|
28260
28290
|
placeholder: "e.g. \"fulfilled\"",
|
|
28261
28291
|
style: { width: 150 },
|
|
28262
|
-
onChange: (e) =>
|
|
28292
|
+
onChange: (e) => P(t, { value: e.target.value })
|
|
28263
28293
|
})
|
|
28264
28294
|
}),
|
|
28265
28295
|
e.operator === JS && /* @__PURE__ */ Q(B.Item, {
|
|
@@ -28273,7 +28303,7 @@ function tC() {
|
|
|
28273
28303
|
value: e.value || void 0,
|
|
28274
28304
|
style: { width: 150 },
|
|
28275
28305
|
placeholder: "Select scope",
|
|
28276
|
-
onChange: (e) =>
|
|
28306
|
+
onChange: (e) => P(t, { value: e })
|
|
28277
28307
|
}), /* @__PURE__ */ Z(US, {
|
|
28278
28308
|
type: "secondary",
|
|
28279
28309
|
style: { fontSize: 11 },
|
|
@@ -28295,7 +28325,7 @@ function tC() {
|
|
|
28295
28325
|
options: b,
|
|
28296
28326
|
style: { width: 170 },
|
|
28297
28327
|
placeholder: "Select or type field",
|
|
28298
|
-
onChange: (e) =>
|
|
28328
|
+
onChange: (e) => P(t, { compareField: e[e.length - 1] ?? "" }),
|
|
28299
28329
|
filterOption: (e, t) => (t?.label ?? t?.value ?? "").toLowerCase().includes(e.toLowerCase())
|
|
28300
28330
|
}), /* @__PURE__ */ Q(US, {
|
|
28301
28331
|
type: "secondary",
|
|
@@ -30588,7 +30618,7 @@ function kC() {
|
|
|
30588
30618
|
[e]: t
|
|
30589
30619
|
}));
|
|
30590
30620
|
}
|
|
30591
|
-
function
|
|
30621
|
+
function P() {
|
|
30592
30622
|
h(!0), Qi(i, {
|
|
30593
30623
|
gateway: o,
|
|
30594
30624
|
strategies: {
|
|
@@ -30613,11 +30643,11 @@ function kC() {
|
|
|
30613
30643
|
content: `You're switching ${i} from "${c}" to "${o.storage}". ` + (o.storage === "mongo" ? "This module will stop calling its downstream service and this gateway will own the write + every Strategy below." : "This module will stop using the Strategies below and go back to calling its downstream service.") + " Make sure the downstream service / e2e checks are ready before confirming.",
|
|
30614
30644
|
okText: "Confirm cutover",
|
|
30615
30645
|
okButtonProps: { danger: !0 },
|
|
30616
|
-
onOk:
|
|
30646
|
+
onOk: P
|
|
30617
30647
|
});
|
|
30618
30648
|
return;
|
|
30619
30649
|
}
|
|
30620
|
-
|
|
30650
|
+
P();
|
|
30621
30651
|
}
|
|
30622
30652
|
let te = [
|
|
30623
30653
|
{
|
|
@@ -30637,7 +30667,7 @@ function kC() {
|
|
|
30637
30667
|
{
|
|
30638
30668
|
title: "Fields",
|
|
30639
30669
|
key: "fields",
|
|
30640
|
-
render: (e, t) => /* @__PURE__ */ Z(
|
|
30670
|
+
render: (e, t) => /* @__PURE__ */ Z(ee, {
|
|
30641
30671
|
count: Object.keys(t.fieldMap ?? {}).length,
|
|
30642
30672
|
showZero: !0,
|
|
30643
30673
|
color: "var(--color-brand)"
|
|
@@ -30684,7 +30714,7 @@ function kC() {
|
|
|
30684
30714
|
{
|
|
30685
30715
|
title: "Fields",
|
|
30686
30716
|
key: "fields",
|
|
30687
|
-
render: (e, t) => /* @__PURE__ */ Z(
|
|
30717
|
+
render: (e, t) => /* @__PURE__ */ Z(ee, {
|
|
30688
30718
|
count: Object.keys(t.fieldMap ?? {}).length,
|
|
30689
30719
|
showZero: !0,
|
|
30690
30720
|
color: "var(--color-brand)"
|
|
@@ -31869,7 +31899,7 @@ function IC() {
|
|
|
31869
31899
|
children: [/* @__PURE__ */ Q("div", {
|
|
31870
31900
|
style: { marginBottom: 8 },
|
|
31871
31901
|
children: [
|
|
31872
|
-
/* @__PURE__ */ Z(
|
|
31902
|
+
/* @__PURE__ */ Z(ee, {
|
|
31873
31903
|
count: v.length,
|
|
31874
31904
|
showZero: !0,
|
|
31875
31905
|
color: "var(--color-brand)"
|
|
@@ -32634,7 +32664,7 @@ function dw({ title: e, description: t, selectedName: n, loading: r, saving: i,
|
|
|
32634
32664
|
});
|
|
32635
32665
|
}
|
|
32636
32666
|
function fw({ onLogout: e }) {
|
|
32637
|
-
let [t] = B.useForm(), [n] = B.useForm(), [r, i] = A("users"), [a, o] = A(!0), [s, c] = A(!1), [l, u] = A(!1), [f, p] = A([]), [m, h] = A([]), [g, _] = A([]), [v, y] = A([]), [b, x] = A(null), [S, C] = A([]), [w, T] = A(!1), [k, j] = A(null), [M, N] = A(!1), [
|
|
32667
|
+
let [t] = B.useForm(), [n] = B.useForm(), [r, i] = A("users"), [a, o] = A(!0), [s, c] = A(!1), [l, u] = A(!1), [f, p] = A([]), [m, h] = A([]), [g, _] = A([]), [v, y] = A([]), [b, x] = A(null), [S, C] = A([]), [w, T] = A(!1), [k, j] = A(null), [M, N] = A(!1), [ee, P] = A(null), [I, te] = A(!1), [L, ne] = A(null), [re, ie] = A(!1), [R, ae] = A(null), [z, oe] = A("listView"), [se, le] = A([]), [de, pe] = A([]), [me, he] = A(!1), [ge, U] = A(!1), _e = d(), ve = O(() => se.filter((e) => !e.disabled), [se]), ye = !me && ve.length === 0, K = E(async () => {
|
|
32638
32668
|
he(!0);
|
|
32639
32669
|
try {
|
|
32640
32670
|
let [e, t] = await Promise.all([Va(), Qa()]), n = aw(e.modules, t), r = new Set(n.filter((e) => !e.disabled).map((e) => e.value));
|
|
@@ -32879,13 +32909,13 @@ function fw({ onLogout: e }) {
|
|
|
32879
32909
|
}
|
|
32880
32910
|
}
|
|
32881
32911
|
async function ze(e) {
|
|
32882
|
-
|
|
32912
|
+
P(e);
|
|
32883
32913
|
try {
|
|
32884
32914
|
await Tb(e), Y.success("User deleted"), await Se();
|
|
32885
32915
|
} catch (e) {
|
|
32886
32916
|
Y.error(e.message || "Unable to delete user");
|
|
32887
32917
|
} finally {
|
|
32888
|
-
|
|
32918
|
+
P(null);
|
|
32889
32919
|
}
|
|
32890
32920
|
}
|
|
32891
32921
|
function Be(e, t) {
|
|
@@ -33046,7 +33076,7 @@ function fw({ onLogout: e }) {
|
|
|
33046
33076
|
danger: !0,
|
|
33047
33077
|
"aria-label": "Delete user",
|
|
33048
33078
|
icon: /* @__PURE__ */ Z(Je, {}),
|
|
33049
|
-
loading:
|
|
33079
|
+
loading: ee === t.user_id,
|
|
33050
33080
|
size: "small"
|
|
33051
33081
|
})
|
|
33052
33082
|
})]
|
|
@@ -35102,7 +35132,7 @@ function BT({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
|
|
|
35102
35132
|
D(() => {
|
|
35103
35133
|
!e || !M || T();
|
|
35104
35134
|
}, [e, M]);
|
|
35105
|
-
let N = f.length,
|
|
35135
|
+
let N = f.length, ee = String(m).replace(/s$/i, ""), P = N === 1 ? ee : m, F = p[0] ?? {}, I = t?.getTitleText ? t.getTitleText(N, P, F, d) : t?.title, te = N === 1 ? F.jobTitle ?? F.title ?? F.name ?? F.fullName ?? F.candidateName ?? null : null, L = t?.getBodyText ? t.getBodyText(N, ee, P, te, d) : t?.bodyText ?? null, ne = typeof t?.getNote == "function" ? t.getNote(d) : t?.note, re = g.filter((e) => e.required).every((e) => {
|
|
35106
35136
|
let t = s[e.name];
|
|
35107
35137
|
return !(t == null || t === "" || Array.isArray(t) && t.length === 0 || typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0);
|
|
35108
35138
|
}), ie = t?.disabledUntilFilled && !re;
|
|
@@ -35133,7 +35163,7 @@ function BT({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
|
|
|
35133
35163
|
description: t.description,
|
|
35134
35164
|
showSelectedCount: t.showSelectedCount,
|
|
35135
35165
|
count: N,
|
|
35136
|
-
itemLabel:
|
|
35166
|
+
itemLabel: P,
|
|
35137
35167
|
bodyText: L,
|
|
35138
35168
|
deleteError: k
|
|
35139
35169
|
}),
|
|
@@ -36039,11 +36069,11 @@ function XE() {
|
|
|
36039
36069
|
contents: "",
|
|
36040
36070
|
showCc: !1,
|
|
36041
36071
|
showBcc: !1
|
|
36042
|
-
}), [f, p] = A(!l), [m, h] = A(qE.defaultTab), [g, _] = A(""), [v, y] = A([]), [b, x] = A(0), [S, C] = A(0), [w, T] = A(0), [E, k] = A(1), [j, M] = A(qE.defaultPageSize), [N,
|
|
36072
|
+
}), [f, p] = A(!l), [m, h] = A(qE.defaultTab), [g, _] = A(""), [v, y] = A([]), [b, x] = A(0), [S, C] = A(0), [w, T] = A(0), [E, k] = A(1), [j, M] = A(qE.defaultPageSize), [N, ee] = A(!1), [P, I] = A([]);
|
|
36043
36073
|
D(() => {
|
|
36044
36074
|
if (!l) return;
|
|
36045
36075
|
let e = !1;
|
|
36046
|
-
|
|
36076
|
+
ee(!0);
|
|
36047
36077
|
let t = g ? 100 : j, n = g ? 0 : (E - 1) * j;
|
|
36048
36078
|
return JE.getVendorList({
|
|
36049
36079
|
jobId: l,
|
|
@@ -36057,7 +36087,7 @@ function XE() {
|
|
|
36057
36087
|
}).catch(() => {
|
|
36058
36088
|
e || (y([]), T(0));
|
|
36059
36089
|
}).finally(() => {
|
|
36060
|
-
e ||
|
|
36090
|
+
e || ee(!1);
|
|
36061
36091
|
}), () => {
|
|
36062
36092
|
e = !0;
|
|
36063
36093
|
};
|
|
@@ -36076,7 +36106,7 @@ function XE() {
|
|
|
36076
36106
|
cc: e.ccMail?.length ? Array.isArray(e.ccMail) ? e.ccMail.join(", ") : String(e.ccMail) : t.cc
|
|
36077
36107
|
}))).catch(() => {}).finally(() => p(!0));
|
|
36078
36108
|
}, [l]);
|
|
36079
|
-
let te = O(() =>
|
|
36109
|
+
let te = O(() => P.map((e) => v.find((t) => t.vendorId === e)?.vendorEmail ?? "").filter(Boolean), [P, v]), L = O(() => ({
|
|
36080
36110
|
...u,
|
|
36081
36111
|
bcc: [...new Set([..._w(u.bcc), ...te])].join(", "),
|
|
36082
36112
|
showBcc: u.showBcc || te.length > 0
|
|
@@ -36198,7 +36228,7 @@ function XE() {
|
|
|
36198
36228
|
pagination: !1,
|
|
36199
36229
|
size: "small",
|
|
36200
36230
|
rowSelection: {
|
|
36201
|
-
selectedRowKeys:
|
|
36231
|
+
selectedRowKeys: P,
|
|
36202
36232
|
onChange: (e) => {
|
|
36203
36233
|
e.length > qE.maxVendorSelect || I(e);
|
|
36204
36234
|
}
|
|
@@ -36229,10 +36259,10 @@ function XE() {
|
|
|
36229
36259
|
title: "Share",
|
|
36230
36260
|
hint: "Select vendors or add email addresses",
|
|
36231
36261
|
bccHint: "Vendor emails are added automatically",
|
|
36232
|
-
afterBcc:
|
|
36262
|
+
afterBcc: P.length > 0 ? /* @__PURE__ */ Q("div", {
|
|
36233
36263
|
className: "vendor-share__selected-count",
|
|
36234
36264
|
children: [
|
|
36235
|
-
|
|
36265
|
+
P.length,
|
|
36236
36266
|
" / ",
|
|
36237
36267
|
qE.maxVendorSelect,
|
|
36238
36268
|
" Vendors selected"
|
|
@@ -38917,7 +38947,7 @@ function rO() {
|
|
|
38917
38947
|
className: "admin-page",
|
|
38918
38948
|
children: [/* @__PURE__ */ Z("div", {
|
|
38919
38949
|
className: "admin-breadcrumb",
|
|
38920
|
-
children: /* @__PURE__ */ Z(
|
|
38950
|
+
children: /* @__PURE__ */ Z(P, { items: [{ title: /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z(ft, {}), " Home"] }) }, { title: "Admin" }] })
|
|
38921
38951
|
}), /* @__PURE__ */ Q(U, {
|
|
38922
38952
|
gutter: [16, 16],
|
|
38923
38953
|
className: "admin-wrapper",
|
|
@@ -39193,7 +39223,7 @@ function yO({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
39193
39223
|
type: "button",
|
|
39194
39224
|
className: "bulk-error-info",
|
|
39195
39225
|
"aria-label": `View ${t.length} error(s) for row ${e.id}`,
|
|
39196
|
-
children: [/* @__PURE__ */ Z(pt, {}), /* @__PURE__ */ Z(
|
|
39226
|
+
children: [/* @__PURE__ */ Z(pt, {}), /* @__PURE__ */ Z(ee, {
|
|
39197
39227
|
count: t.length,
|
|
39198
39228
|
size: "small"
|
|
39199
39229
|
})]
|
|
@@ -39228,7 +39258,7 @@ function bO() {
|
|
|
39228
39258
|
let e = dn(), t = O(() => _(), []), n = k(null), r = k(null), [i, a] = A([]), [o, s] = A(""), [c, l] = A("idle"), [u, d] = A(!1), [f, p] = A(null), [m, h] = A([]), [g, v] = A("all"), [y, b] = A(null), [x, S] = A(null), [C, w] = A(!1), T = i.map((e) => ({
|
|
39229
39259
|
value: e.modulename,
|
|
39230
39260
|
label: e.modulename
|
|
39231
|
-
})), M = gO(m), N = c === "encoding" || c === "validating",
|
|
39261
|
+
})), M = gO(m), N = c === "encoding" || c === "validating", ee = !!o && !N, P = fO[c] ?? 0, te = m.find((e) => e.row_status === "invalid")?.id, ne = E(() => {
|
|
39232
39262
|
s(""), l("idle"), d(!1), p(null), h([]), v("all"), b(null), S(null), n.current && (n.current.value = "");
|
|
39233
39263
|
}, []);
|
|
39234
39264
|
D(() => {
|
|
@@ -39247,7 +39277,7 @@ function bO() {
|
|
|
39247
39277
|
let re = (e) => {
|
|
39248
39278
|
s(e ?? ""), h([]), S(null), b(null), p(null), w(!1), l(e ? "module_set" : "idle");
|
|
39249
39279
|
}, ie = async (e) => {
|
|
39250
|
-
if (!e || !
|
|
39280
|
+
if (!e || !ee) return;
|
|
39251
39281
|
let n = e.name.split(".").pop()?.toLowerCase();
|
|
39252
39282
|
if (!["xlsx", "csv"].includes(n)) {
|
|
39253
39283
|
l("module_set"), b({ message: "Invalid file type. Please upload an Excel .xlsx or CSV .csv file." });
|
|
@@ -39352,7 +39382,7 @@ function bO() {
|
|
|
39352
39382
|
"Validate",
|
|
39353
39383
|
"Save"
|
|
39354
39384
|
].map((e, t) => /* @__PURE__ */ Q("span", {
|
|
39355
|
-
className: t <
|
|
39385
|
+
className: t < P ? "bulk-step-active" : "",
|
|
39356
39386
|
children: [
|
|
39357
39387
|
t + 1,
|
|
39358
39388
|
" ",
|
|
@@ -39393,10 +39423,10 @@ function bO() {
|
|
|
39393
39423
|
/* @__PURE__ */ Q("button", {
|
|
39394
39424
|
type: "button",
|
|
39395
39425
|
className: oe,
|
|
39396
|
-
disabled: !
|
|
39426
|
+
disabled: !ee,
|
|
39397
39427
|
onClick: () => n.current?.click(),
|
|
39398
39428
|
onDragOver: (e) => {
|
|
39399
|
-
e.preventDefault(),
|
|
39429
|
+
e.preventDefault(), ee && d(!0);
|
|
39400
39430
|
},
|
|
39401
39431
|
onDragLeave: () => d(!1),
|
|
39402
39432
|
onDrop: (e) => {
|
|
@@ -39701,9 +39731,9 @@ function MO() {
|
|
|
39701
39731
|
let [e] = B.useForm(), [t] = B.useForm(), [n, r] = A([]), [i, a] = A([]), [o, s] = A([]), [c, l] = A(!1), [u, d] = A(!1), [f, p] = A({
|
|
39702
39732
|
open: !1,
|
|
39703
39733
|
typeKey: "module"
|
|
39704
|
-
}), [m, h] = A(!1), [g, _] = A(!1), [v, y] = A(!1), b = dn(), x = TO[f.typeKey], S = O(() => EO(n), [n]), C = B.useWatch("module", e), w = B.useWatch("flow", e), T = !!DO(C), k = !!DO(w), j = !T, N = !T || !k,
|
|
39734
|
+
}), [m, h] = A(!1), [g, _] = A(!1), [v, y] = A(!1), b = dn(), x = TO[f.typeKey], S = O(() => EO(n), [n]), C = B.useWatch("module", e), w = B.useWatch("flow", e), T = !!DO(C), k = !!DO(w), j = !T, N = !T || !k, ee = (e, t = []) => {
|
|
39705
39735
|
e === "module" && r(t);
|
|
39706
|
-
},
|
|
39736
|
+
}, P = async () => {
|
|
39707
39737
|
l(!0);
|
|
39708
39738
|
try {
|
|
39709
39739
|
r((await Iy(TO.module.dbName))?.items ?? []);
|
|
@@ -39745,7 +39775,7 @@ function MO() {
|
|
|
39745
39775
|
}
|
|
39746
39776
|
}, [e]);
|
|
39747
39777
|
D(() => {
|
|
39748
|
-
Promise.resolve().then(
|
|
39778
|
+
Promise.resolve().then(P);
|
|
39749
39779
|
}, []), D(() => {
|
|
39750
39780
|
Promise.resolve().then(() => te(C));
|
|
39751
39781
|
}, [te, C]), D(() => {
|
|
@@ -39816,7 +39846,7 @@ function MO() {
|
|
|
39816
39846
|
name: n,
|
|
39817
39847
|
type: x.dbName
|
|
39818
39848
|
});
|
|
39819
|
-
|
|
39849
|
+
ee(f.typeKey, r?.items ?? []), e.setFieldsValue({ [x.formField]: n }), Y.success(`${x.label} added successfully.`), oe();
|
|
39820
39850
|
} catch (e) {
|
|
39821
39851
|
if (e?.errorFields) return;
|
|
39822
39852
|
console.error("Unable to save testing option:", e), Y.error(`Unable to add ${x.label.toLowerCase()}.`);
|
|
@@ -40155,7 +40185,7 @@ function BO(e, t) {
|
|
|
40155
40185
|
})));
|
|
40156
40186
|
}
|
|
40157
40187
|
function VO() {
|
|
40158
|
-
let [e] = B.useForm(), t = dn(), [n] = pn(), r = n.get("edit"), i = !!r, a = O(() => _(), []), [o, s] = A([]), [c, l] = A([]), [u, d] = A([]), [f, p] = A(xO), [m, h] = A({}), [g, v] = A(!1), [y, b] = A(!1), [x, S] = A(!1), [C, w] = A(!1), [T, k] = A(!1), j = B.useWatch("module", e), M = B.useWatch("submodule", e), N = B.useWatch("actions", e),
|
|
40188
|
+
let [e] = B.useForm(), t = dn(), [n] = pn(), r = n.get("edit"), i = !!r, a = O(() => _(), []), [o, s] = A([]), [c, l] = A([]), [u, d] = A([]), [f, p] = A(xO), [m, h] = A({}), [g, v] = A(!1), [y, b] = A(!1), [x, S] = A(!1), [C, w] = A(!1), [T, k] = A(!1), j = B.useWatch("module", e), M = B.useWatch("submodule", e), N = B.useWatch("actions", e), ee = !!j, P = !!M, te = O(() => zO(m, N), [m, N]), ne = O(() => IO(o, "modulename"), [o]), re = O(() => IO(c, "submodulename"), [c]), ie = O(() => o.find((e) => e.id === j)?.modulename ?? "", [o, j]), R = O(() => c.find((e) => e.id === M)?.submodulename ?? "", [M, c]), ae = E(async () => {
|
|
40159
40189
|
try {
|
|
40160
40190
|
let e = await Ry();
|
|
40161
40191
|
Array.isArray(e?.options) && e.options.length > 0 && p(e.options), e?.rules && typeof e.rules == "object" && h(e.rules);
|
|
@@ -40410,9 +40440,9 @@ function VO() {
|
|
|
40410
40440
|
allowClear: !0,
|
|
40411
40441
|
showSearch: !0,
|
|
40412
40442
|
optionFilterProp: "label",
|
|
40413
|
-
disabled: !
|
|
40443
|
+
disabled: !ee,
|
|
40414
40444
|
loading: y,
|
|
40415
|
-
placeholder:
|
|
40445
|
+
placeholder: ee ? "Select submodule" : "Select module first",
|
|
40416
40446
|
options: re,
|
|
40417
40447
|
onChange: (t) => {
|
|
40418
40448
|
e.setFieldsValue({
|
|
@@ -40439,7 +40469,7 @@ function VO() {
|
|
|
40439
40469
|
name: "scenario",
|
|
40440
40470
|
valuePropName: "checked",
|
|
40441
40471
|
children: /* @__PURE__ */ Z(K, {
|
|
40442
|
-
disabled: !
|
|
40472
|
+
disabled: !P,
|
|
40443
40473
|
checkedChildren: "Positive",
|
|
40444
40474
|
unCheckedChildren: "Negative"
|
|
40445
40475
|
})
|
|
@@ -40461,7 +40491,7 @@ function VO() {
|
|
|
40461
40491
|
]
|
|
40462
40492
|
})
|
|
40463
40493
|
}),
|
|
40464
|
-
|
|
40494
|
+
P && /* @__PURE__ */ Q(I, {
|
|
40465
40495
|
className: "v1-card zt-fall",
|
|
40466
40496
|
title: /* @__PURE__ */ Q(G, {
|
|
40467
40497
|
size: 8,
|
|
@@ -40619,7 +40649,7 @@ function VO() {
|
|
|
40619
40649
|
})]
|
|
40620
40650
|
})]
|
|
40621
40651
|
}, `${j}-${M}`),
|
|
40622
|
-
|
|
40652
|
+
P && /* @__PURE__ */ Z(I, {
|
|
40623
40653
|
className: "v1-card zt-fall",
|
|
40624
40654
|
title: /* @__PURE__ */ Q(G, {
|
|
40625
40655
|
size: 6,
|
|
@@ -41379,7 +41409,7 @@ function dk() {
|
|
|
41379
41409
|
let [e] = B.useForm(), [t] = B.useForm(), [n, r] = A([]), [i, a] = A([]), [o, s] = A([]), [c, l] = A(xO), [u, d] = A({}), [f, p] = A(!1), [m, h] = A(!1), [g, _] = A({
|
|
41380
41410
|
open: !1,
|
|
41381
41411
|
typeKey: "module"
|
|
41382
|
-
}), [v, y] = A(!1), [b, x] = A(!1), [S, C] = A(!1), w = dn(), T = nk[g.typeKey], k = O(() => ok(n), [n]), j = B.useWatch("module", e), N = B.useWatch("flow", e),
|
|
41412
|
+
}), [v, y] = A(!1), [b, x] = A(!1), [S, C] = A(!1), w = dn(), T = nk[g.typeKey], k = O(() => ok(n), [n]), j = B.useWatch("module", e), N = B.useWatch("flow", e), ee = B.useWatch("keyword", e), P = !!sk(j), te = !!sk(N), ne = !P, re = !P || !te, ie = O(() => ik(u, ee), [u, ee]), R = (e, t = []) => {
|
|
41383
41413
|
e === "module" && r(t);
|
|
41384
41414
|
}, ae = async () => {
|
|
41385
41415
|
p(!0);
|
|
@@ -41692,8 +41722,8 @@ function dk() {
|
|
|
41692
41722
|
}],
|
|
41693
41723
|
children: /* @__PURE__ */ Z(V, {
|
|
41694
41724
|
maxLength: 255,
|
|
41695
|
-
disabled: re || !!
|
|
41696
|
-
placeholder: re ? "Select module and flow first" :
|
|
41725
|
+
disabled: re || !!ee && !ie.key,
|
|
41726
|
+
placeholder: re ? "Select module and flow first" : ee ? ie.key ? "Required — Enter selector / locator" : "Not needed for this action" : "Select an action first",
|
|
41697
41727
|
onBlur: (e) => le("target", e.target.value)
|
|
41698
41728
|
})
|
|
41699
41729
|
})
|
|
@@ -41725,8 +41755,8 @@ function dk() {
|
|
|
41725
41755
|
}],
|
|
41726
41756
|
children: /* @__PURE__ */ Z(V.TextArea, {
|
|
41727
41757
|
rows: 4,
|
|
41728
|
-
disabled: re || !!
|
|
41729
|
-
placeholder: re ? "Select module and flow first" :
|
|
41758
|
+
disabled: re || !!ee && !ie.value,
|
|
41759
|
+
placeholder: re ? "Select module and flow first" : ee ? ie.value ? "Required — Enter value" : "Not needed for this action" : "Select an action first",
|
|
41730
41760
|
onBlur: (e) => le("value", e.target.value)
|
|
41731
41761
|
})
|
|
41732
41762
|
})
|
|
@@ -41743,8 +41773,8 @@ function dk() {
|
|
|
41743
41773
|
}],
|
|
41744
41774
|
children: /* @__PURE__ */ Z(V.TextArea, {
|
|
41745
41775
|
rows: 4,
|
|
41746
|
-
disabled: re || !!
|
|
41747
|
-
placeholder: re ? "Select module and flow first" :
|
|
41776
|
+
disabled: re || !!ee && !ie.expected,
|
|
41777
|
+
placeholder: re ? "Select module and flow first" : ee ? ie.expected ? "Required — Enter expected result" : "Not needed for this action" : "Select an action first",
|
|
41748
41778
|
onBlur: (e) => le("expected", e.target.value)
|
|
41749
41779
|
})
|
|
41750
41780
|
})
|