@realtek/core-theme 0.0.136 → 0.0.137
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 +262 -233
- 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
|
})
|
|
@@ -12103,8 +12108,8 @@ function Fg(e, t) {
|
|
|
12103
12108
|
function Ig(e) {
|
|
12104
12109
|
return String(e ?? "").trim().toLowerCase();
|
|
12105
12110
|
}
|
|
12106
|
-
function Lg(e, t, n) {
|
|
12107
|
-
return Du(e.key, t, n,
|
|
12111
|
+
function Lg(e, t, n, r) {
|
|
12112
|
+
return Du(e.key, t, n, r);
|
|
12108
12113
|
}
|
|
12109
12114
|
function Rg(e) {
|
|
12110
12115
|
let t = String(e.key ?? "");
|
|
@@ -12155,16 +12160,40 @@ function Bg({ moduleName: e, id: t, customConfigName: n, onAction: r, onTabChang
|
|
|
12155
12160
|
D(() => {
|
|
12156
12161
|
C && a && a(C);
|
|
12157
12162
|
}, [C]);
|
|
12158
|
-
let { eyebrow: w, title: T = "-", status: E, titleIds: k = [], meta: j = [], ids: M = [], tabs: N = [], stats:
|
|
12163
|
+
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
12164
|
id: t,
|
|
12160
12165
|
moduleName: e,
|
|
12161
12166
|
record: re
|
|
12162
|
-
}), R =
|
|
12167
|
+
}), R = Og(S)?.resolveScope, [z, oe] = A(void 0);
|
|
12168
|
+
D(() => {
|
|
12169
|
+
if (typeof R != "function" || !t) return;
|
|
12170
|
+
let n = !1, r = Number(localStorage.getItem("userId")) || 0;
|
|
12171
|
+
return Promise.resolve().then(() => R({
|
|
12172
|
+
id: t,
|
|
12173
|
+
moduleName: e,
|
|
12174
|
+
record: re,
|
|
12175
|
+
currentUserId: r
|
|
12176
|
+
})).then((e) => {
|
|
12177
|
+
n || oe(e ?? null);
|
|
12178
|
+
}).catch(() => {
|
|
12179
|
+
n || oe(null);
|
|
12180
|
+
}), () => {
|
|
12181
|
+
n = !0;
|
|
12182
|
+
};
|
|
12183
|
+
}, [
|
|
12184
|
+
R,
|
|
12185
|
+
t,
|
|
12186
|
+
e,
|
|
12187
|
+
d
|
|
12188
|
+
]);
|
|
12189
|
+
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
12190
|
h,
|
|
12164
12191
|
p,
|
|
12165
|
-
re
|
|
12192
|
+
re,
|
|
12193
|
+
z,
|
|
12194
|
+
B
|
|
12166
12195
|
]);
|
|
12167
|
-
function
|
|
12196
|
+
function se(e) {
|
|
12168
12197
|
let t = Su(e);
|
|
12169
12198
|
if (t === "add" && !te || t === "edit" && !L || t === "delete" && !ne || !Zc(e.permission, S)) return !1;
|
|
12170
12199
|
if (e.permissionKey) {
|
|
@@ -12173,14 +12202,14 @@ function Bg({ moduleName: e, id: t, customConfigName: n, onAction: r, onTabChang
|
|
|
12173
12202
|
}
|
|
12174
12203
|
return !0;
|
|
12175
12204
|
}
|
|
12176
|
-
let [
|
|
12205
|
+
let [ce, le] = A(s);
|
|
12177
12206
|
D(() => {
|
|
12178
|
-
|
|
12207
|
+
le(s);
|
|
12179
12208
|
}, [s]);
|
|
12180
|
-
let
|
|
12209
|
+
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
12210
|
if (!C) return null;
|
|
12182
|
-
let
|
|
12183
|
-
let i = [...
|
|
12211
|
+
let pe = (n) => {
|
|
12212
|
+
let i = [...de, ...fe].find((e) => e.key === n);
|
|
12184
12213
|
if (i?.actionType === "document" && i.documentField) {
|
|
12185
12214
|
let e = zg(d, i.documentField);
|
|
12186
12215
|
e.length ? (x(e), v(!0)) : Y.warning(`No ${(i.label || "document").toLowerCase()} available`);
|
|
@@ -12229,16 +12258,16 @@ function Bg({ moduleName: e, id: t, customConfigName: n, onAction: r, onTabChang
|
|
|
12229
12258
|
id: t,
|
|
12230
12259
|
action: i
|
|
12231
12260
|
});
|
|
12232
|
-
},
|
|
12233
|
-
|
|
12261
|
+
}, me = (n) => {
|
|
12262
|
+
le(n), i?.(n, {
|
|
12234
12263
|
moduleName: e,
|
|
12235
12264
|
id: t
|
|
12236
12265
|
});
|
|
12237
|
-
},
|
|
12266
|
+
}, he = fe.map((e) => ({
|
|
12238
12267
|
key: e.key,
|
|
12239
12268
|
label: e.label,
|
|
12240
12269
|
danger: e.danger,
|
|
12241
|
-
onClick: () =>
|
|
12270
|
+
onClick: () => pe(e.key)
|
|
12242
12271
|
}));
|
|
12243
12272
|
return /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Q(I, {
|
|
12244
12273
|
className: "znx-dh-card",
|
|
@@ -12311,16 +12340,16 @@ function Bg({ moduleName: e, id: t, customConfigName: n, onAction: r, onTabChang
|
|
|
12311
12340
|
children: [
|
|
12312
12341
|
/* @__PURE__ */ Q("div", {
|
|
12313
12342
|
className: "znx-dh-actions",
|
|
12314
|
-
children: [
|
|
12343
|
+
children: [de.map((e) => /* @__PURE__ */ Z(F, {
|
|
12315
12344
|
type: "text",
|
|
12316
12345
|
className: `znx-dh-btn znx-dh-btn--${e.tone ?? "primary"}`,
|
|
12317
12346
|
icon: e.icon ? Ag[e.icon] : void 0,
|
|
12318
|
-
onClick: () =>
|
|
12347
|
+
onClick: () => pe(e.key),
|
|
12319
12348
|
children: e.label
|
|
12320
|
-
}, e.key)),
|
|
12349
|
+
}, e.key)), fe.length > 0 && /* @__PURE__ */ Z(ae, {
|
|
12321
12350
|
trigger: ["click"],
|
|
12322
12351
|
placement: "bottomRight",
|
|
12323
|
-
menu: { items:
|
|
12352
|
+
menu: { items: he },
|
|
12324
12353
|
children: /* @__PURE__ */ Z(F, {
|
|
12325
12354
|
type: "text",
|
|
12326
12355
|
className: "znx-dh-more",
|
|
@@ -12328,9 +12357,9 @@ function Bg({ moduleName: e, id: t, customConfigName: n, onAction: r, onTabChang
|
|
|
12328
12357
|
})
|
|
12329
12358
|
})]
|
|
12330
12359
|
}),
|
|
12331
|
-
|
|
12360
|
+
ee.length > 0 && /* @__PURE__ */ Z("div", {
|
|
12332
12361
|
className: "znx-dh-stats",
|
|
12333
|
-
children:
|
|
12362
|
+
children: ee.map((e) => /* @__PURE__ */ Q("div", {
|
|
12334
12363
|
className: "znx-dh-stat",
|
|
12335
12364
|
children: [/* @__PURE__ */ Z("span", {
|
|
12336
12365
|
className: "znx-dh-stat-value",
|
|
@@ -12341,9 +12370,9 @@ function Bg({ moduleName: e, id: t, customConfigName: n, onAction: r, onTabChang
|
|
|
12341
12370
|
})]
|
|
12342
12371
|
}, e.label))
|
|
12343
12372
|
}),
|
|
12344
|
-
|
|
12373
|
+
P?.value && /* @__PURE__ */ Q("div", {
|
|
12345
12374
|
className: "znx-dh-created",
|
|
12346
|
-
children: ["Created on ",
|
|
12375
|
+
children: ["Created on ", P.value]
|
|
12347
12376
|
})
|
|
12348
12377
|
]
|
|
12349
12378
|
})]
|
|
@@ -12351,8 +12380,8 @@ function Bg({ moduleName: e, id: t, customConfigName: n, onAction: r, onTabChang
|
|
|
12351
12380
|
className: "znx-dh-tabs",
|
|
12352
12381
|
children: ie.map((e) => /* @__PURE__ */ Z("button", {
|
|
12353
12382
|
type: "button",
|
|
12354
|
-
className: `znx-dh-tab${
|
|
12355
|
-
onClick: () =>
|
|
12383
|
+
className: `znx-dh-tab${ue === e.key ? " is-active" : ""}`,
|
|
12384
|
+
onClick: () => me(e.key),
|
|
12356
12385
|
children: e.label
|
|
12357
12386
|
}, e.key))
|
|
12358
12387
|
})]
|
|
@@ -12990,7 +13019,7 @@ function N_({ field: e, form: t, name: n, value: r, checked: i, fileList: a, mod
|
|
|
12990
13019
|
open: !1,
|
|
12991
13020
|
docs: [],
|
|
12992
13021
|
index: 0
|
|
12993
|
-
}), [O, j] = A(null), M = k([]), N = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number",
|
|
13022
|
+
}), [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
13023
|
D(() => {
|
|
12995
13024
|
if (f === "location") {
|
|
12996
13025
|
let t = !1;
|
|
@@ -13446,23 +13475,23 @@ function P_({ icon: e, title: t }) {
|
|
|
13446
13475
|
})]
|
|
13447
13476
|
});
|
|
13448
13477
|
}
|
|
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
|
|
13478
|
+
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 }) {
|
|
13479
|
+
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
13480
|
D(() => {
|
|
13452
13481
|
let t = !1;
|
|
13453
13482
|
return queueMicrotask(() => {
|
|
13454
13483
|
if (!t) {
|
|
13455
13484
|
if (!e) {
|
|
13456
|
-
|
|
13485
|
+
M(null);
|
|
13457
13486
|
return;
|
|
13458
13487
|
}
|
|
13459
13488
|
Ia({ roleId: localStorage.getItem("roleId") }, e, {
|
|
13460
13489
|
clientId: n,
|
|
13461
13490
|
region: r
|
|
13462
13491
|
}).then((e) => {
|
|
13463
|
-
t ||
|
|
13492
|
+
t || M(Array.isArray(e) && e.length ? e : null);
|
|
13464
13493
|
}).catch(() => {
|
|
13465
|
-
t ||
|
|
13494
|
+
t || M(null);
|
|
13466
13495
|
});
|
|
13467
13496
|
}
|
|
13468
13497
|
}), () => {
|
|
@@ -13477,34 +13506,34 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13477
13506
|
return queueMicrotask(() => {
|
|
13478
13507
|
if (!t) {
|
|
13479
13508
|
if (!e) {
|
|
13480
|
-
|
|
13509
|
+
ee(/* @__PURE__ */ new Set());
|
|
13481
13510
|
return;
|
|
13482
13511
|
}
|
|
13483
13512
|
Ya(e).then((e) => {
|
|
13484
|
-
t ||
|
|
13513
|
+
t || ee(new Set(Array.isArray(e) ? e : []));
|
|
13485
13514
|
}).catch(() => {
|
|
13486
|
-
t ||
|
|
13515
|
+
t || ee(/* @__PURE__ */ new Set());
|
|
13487
13516
|
});
|
|
13488
13517
|
}
|
|
13489
13518
|
}), () => {
|
|
13490
13519
|
t = !0;
|
|
13491
13520
|
};
|
|
13492
13521
|
}, [e]);
|
|
13493
|
-
let P = O(() => m_(
|
|
13494
|
-
|
|
13522
|
+
let P = O(() => m_(h, e, E, N), [
|
|
13523
|
+
h,
|
|
13495
13524
|
e,
|
|
13496
|
-
|
|
13497
|
-
|
|
13498
|
-
]),
|
|
13499
|
-
form:
|
|
13525
|
+
E,
|
|
13526
|
+
N
|
|
13527
|
+
]), te = O(() => Ws(P), [P]), ne = k({}), re = Ic({
|
|
13528
|
+
form: f,
|
|
13500
13529
|
groups: P,
|
|
13501
13530
|
module: e
|
|
13502
|
-
}),
|
|
13531
|
+
}), ie = O(() => {
|
|
13503
13532
|
let e = {};
|
|
13504
13533
|
return P.forEach((t) => {
|
|
13505
13534
|
t.addRow && (e[t.name] = Tc(t));
|
|
13506
|
-
}), Ks(
|
|
13507
|
-
}, [P,
|
|
13535
|
+
}), Ks(te, e);
|
|
13536
|
+
}, [P, te]), R = {
|
|
13508
13537
|
jobs: {
|
|
13509
13538
|
list: "Jobs",
|
|
13510
13539
|
path: "/jobs",
|
|
@@ -13520,8 +13549,8 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13520
13549
|
path: "/submissions",
|
|
13521
13550
|
edit: "Edit Submission"
|
|
13522
13551
|
}
|
|
13523
|
-
},
|
|
13524
|
-
let t =
|
|
13552
|
+
}, ae = i.length > 0 ? i : (() => {
|
|
13553
|
+
let t = R[c_(e)];
|
|
13525
13554
|
return t ? [
|
|
13526
13555
|
{
|
|
13527
13556
|
label: "Home",
|
|
@@ -13539,7 +13568,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13539
13568
|
let i = !1;
|
|
13540
13569
|
async function a() {
|
|
13541
13570
|
try {
|
|
13542
|
-
|
|
13571
|
+
v(!0), b(""), T("");
|
|
13543
13572
|
let a = await Ii({
|
|
13544
13573
|
module: e,
|
|
13545
13574
|
id: t,
|
|
@@ -13547,11 +13576,11 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13547
13576
|
region: r
|
|
13548
13577
|
});
|
|
13549
13578
|
if (i) return;
|
|
13550
|
-
|
|
13579
|
+
g(Array.isArray(a) ? a : []);
|
|
13551
13580
|
} catch (t) {
|
|
13552
|
-
console.error(`Failed to fetch ${e} edit data:`, t), i ||
|
|
13581
|
+
console.error(`Failed to fetch ${e} edit data:`, t), i || b(t?.message || "Failed to load record");
|
|
13553
13582
|
} finally {
|
|
13554
|
-
i ||
|
|
13583
|
+
i || v(!1);
|
|
13555
13584
|
}
|
|
13556
13585
|
}
|
|
13557
13586
|
return a(), () => {
|
|
@@ -13563,27 +13592,27 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13563
13592
|
n,
|
|
13564
13593
|
r
|
|
13565
13594
|
]), D(() => {
|
|
13566
|
-
|
|
13595
|
+
_ || P.length === 0 || Ec(f, P);
|
|
13567
13596
|
}, [
|
|
13568
|
-
|
|
13597
|
+
_,
|
|
13569
13598
|
P,
|
|
13570
|
-
|
|
13599
|
+
f
|
|
13571
13600
|
]);
|
|
13572
|
-
let
|
|
13573
|
-
|
|
13601
|
+
let z = (e) => {
|
|
13602
|
+
m((t) => ({
|
|
13574
13603
|
...t,
|
|
13575
13604
|
[e]: !t[e]
|
|
13576
13605
|
}));
|
|
13577
13606
|
};
|
|
13578
|
-
function
|
|
13607
|
+
function oe(t) {
|
|
13579
13608
|
let n = Is(t, P, { module: e });
|
|
13580
13609
|
return Object.entries(c).forEach(([e, t]) => {
|
|
13581
13610
|
n[e] !== void 0 && (n[t] = n[e], delete n[e]);
|
|
13582
13611
|
}), n;
|
|
13583
13612
|
}
|
|
13584
|
-
async function
|
|
13585
|
-
try {
|
|
13586
|
-
|
|
13613
|
+
async function V(n) {
|
|
13614
|
+
if (!(u && await Promise.resolve().then(() => u(n)).catch(() => !1) === !1)) try {
|
|
13615
|
+
S(!0), T("");
|
|
13587
13616
|
let r = Fs(n, P, {
|
|
13588
13617
|
indexed: !0,
|
|
13589
13618
|
module: e
|
|
@@ -13601,22 +13630,22 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13601
13630
|
}
|
|
13602
13631
|
}
|
|
13603
13632
|
}
|
|
13604
|
-
await Po(e, t,
|
|
13633
|
+
await Po(e, t, oe(n), l?.useLegacyUpload ? [] : r);
|
|
13605
13634
|
let i = rl(P, e, "edit");
|
|
13606
13635
|
if (i && Y.success(i), s) s();
|
|
13607
13636
|
else {
|
|
13608
13637
|
let e = Qc(P);
|
|
13609
|
-
e ? e.mode === "back" ?
|
|
13638
|
+
e ? e.mode === "back" ? d(-1) : (e.mode === "route" || e.mode === "detail") && d($c(e.target, t, n) || o || -1) : d(o || -1);
|
|
13610
13639
|
}
|
|
13611
13640
|
} catch (t) {
|
|
13612
13641
|
console.error(`Failed to update ${e}:`, t);
|
|
13613
13642
|
let n = il(P, e, "edit", t?.message);
|
|
13614
|
-
|
|
13643
|
+
T(n), Y.error(n);
|
|
13615
13644
|
} finally {
|
|
13616
|
-
|
|
13645
|
+
S(!1);
|
|
13617
13646
|
}
|
|
13618
13647
|
}
|
|
13619
|
-
let
|
|
13648
|
+
let se = al, [ce, le] = A({}), ue = (e) => String(e?.field ?? ""), H = (e, t, n) => {
|
|
13620
13649
|
if (!e?.field) return !0;
|
|
13621
13650
|
let r = t(n == null ? [e.field] : [...Array.isArray(n) ? n : [n], e.field]);
|
|
13622
13651
|
switch (e.operator) {
|
|
@@ -13629,9 +13658,9 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13629
13658
|
case "notIn": return !String(e.value ?? "").split(",").map((e) => e.trim()).includes(String(r ?? ""));
|
|
13630
13659
|
default: return !0;
|
|
13631
13660
|
}
|
|
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:
|
|
13661
|
+
}, de = (t, r, i, a = {}) => {
|
|
13662
|
+
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, {
|
|
13663
|
+
form: f,
|
|
13635
13664
|
field: t,
|
|
13636
13665
|
siblingPrefix: m,
|
|
13637
13666
|
locked: p
|
|
@@ -13647,26 +13676,26 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13647
13676
|
children: t.helpText
|
|
13648
13677
|
}) : void 0,
|
|
13649
13678
|
required: E_(t),
|
|
13650
|
-
rules: D_(t,
|
|
13679
|
+
rules: D_(t, f, l),
|
|
13651
13680
|
dependencies: _,
|
|
13652
|
-
valuePropName:
|
|
13681
|
+
valuePropName: d,
|
|
13653
13682
|
getValueFromEvent: t.type === "file" ? (e) => Array.isArray(e) ? e : e?.fileList : void 0,
|
|
13654
13683
|
validateTrigger: ["onBlur", "onChange"],
|
|
13655
13684
|
children: /* @__PURE__ */ Z(N_, {
|
|
13656
13685
|
field: t,
|
|
13657
|
-
form:
|
|
13686
|
+
form: f,
|
|
13658
13687
|
name: l,
|
|
13659
13688
|
moduleName: e,
|
|
13660
13689
|
initialValue: t.value,
|
|
13661
13690
|
scopeValues: { clientId: n },
|
|
13662
|
-
onAiUpload: b ? (e) =>
|
|
13663
|
-
formDisabled:
|
|
13691
|
+
onAiUpload: b ? (e) => re.runAction(a.groupNameForActions, t, b, e) : void 0,
|
|
13692
|
+
formDisabled: re.busy
|
|
13664
13693
|
})
|
|
13665
13694
|
}), S = y.length > 0 ? (() => {
|
|
13666
13695
|
let e = Fc(y), n = (n) => /* @__PURE__ */ Z(Lc, {
|
|
13667
13696
|
position: n,
|
|
13668
13697
|
actions: e[n],
|
|
13669
|
-
aiActions:
|
|
13698
|
+
aiActions: re,
|
|
13670
13699
|
groupName: a.groupNameForActions,
|
|
13671
13700
|
field: t
|
|
13672
13701
|
}, n);
|
|
@@ -13685,12 +13714,12 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13685
13714
|
})() : x, C = t.verifyAction ? /* @__PURE__ */ Q("div", {
|
|
13686
13715
|
className: "v1-verify-field-row",
|
|
13687
13716
|
children: [S, /* @__PURE__ */ Z(Qg, {
|
|
13688
|
-
form:
|
|
13717
|
+
form: f,
|
|
13689
13718
|
field: t,
|
|
13690
13719
|
absoluteName: l
|
|
13691
13720
|
})]
|
|
13692
13721
|
}) : S, T = t.prefillWhen?.length ? /* @__PURE__ */ Z(t_, {
|
|
13693
|
-
form:
|
|
13722
|
+
form: f,
|
|
13694
13723
|
rules: t.prefillWhen,
|
|
13695
13724
|
watchPath: m ? [...m, t.prefillWhen[0].field] : yc(t.prefillWhen[0].field),
|
|
13696
13725
|
targetPath: l
|
|
@@ -13698,7 +13727,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13698
13727
|
return t.showIf?.field ? /* @__PURE__ */ Q(w.Fragment, { children: [T, /* @__PURE__ */ Z(B.Item, {
|
|
13699
13728
|
shouldUpdate: !0,
|
|
13700
13729
|
noStyle: !0,
|
|
13701
|
-
children: ({ getFieldValue: e }) =>
|
|
13730
|
+
children: ({ getFieldValue: e }) => H(t.showIf, e, m) ? /* @__PURE__ */ Z(L, {
|
|
13702
13731
|
xs: 24,
|
|
13703
13732
|
md: g,
|
|
13704
13733
|
style: v,
|
|
@@ -13712,7 +13741,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13712
13741
|
className: a.inline ? "v1-combine-cell" : void 0,
|
|
13713
13742
|
children: C
|
|
13714
13743
|
})] }, t.field);
|
|
13715
|
-
},
|
|
13744
|
+
}, fe = (t) => {
|
|
13716
13745
|
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
13746
|
field: t,
|
|
13718
13747
|
label: t.label,
|
|
@@ -13721,7 +13750,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13721
13750
|
...e,
|
|
13722
13751
|
show: 1,
|
|
13723
13752
|
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,
|
|
13753
|
+
})) : 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
13754
|
return /* @__PURE__ */ Z(L, {
|
|
13726
13755
|
xs: 24,
|
|
13727
13756
|
md: 24,
|
|
@@ -13732,12 +13761,12 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13732
13761
|
className: "v1-combine-field",
|
|
13733
13762
|
children: /* @__PURE__ */ Z(B.List, {
|
|
13734
13763
|
name: r,
|
|
13735
|
-
initialValue:
|
|
13764
|
+
initialValue: d,
|
|
13736
13765
|
rules: [{ validator: async (e, n = []) => {
|
|
13737
13766
|
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
13767
|
if (l > 0 && n.length < l) throw Error(`Keep at least ${l} ${s ? "row" : "value"}${l > 1 ? "s" : ""}.`);
|
|
13739
13768
|
} }],
|
|
13740
|
-
children: (i, { add: a, remove:
|
|
13769
|
+
children: (i, { add: a, remove: d }, { errors: p }) => /* @__PURE__ */ Q("div", {
|
|
13741
13770
|
className: "v1-addrow-wrapper",
|
|
13742
13771
|
children: [
|
|
13743
13772
|
i.map(({ key: a, name: u }) => /* @__PURE__ */ Q("div", {
|
|
@@ -13746,7 +13775,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13746
13775
|
type: "text",
|
|
13747
13776
|
danger: !0,
|
|
13748
13777
|
icon: /* @__PURE__ */ Z(Je, {}),
|
|
13749
|
-
onClick: () =>
|
|
13778
|
+
onClick: () => d(u),
|
|
13750
13779
|
disabled: i.length <= l,
|
|
13751
13780
|
className: "v1-addrow-delete-btn"
|
|
13752
13781
|
}), /* @__PURE__ */ Z("div", {
|
|
@@ -13754,20 +13783,20 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13754
13783
|
children: s ? /* @__PURE__ */ Z(U, {
|
|
13755
13784
|
gutter: [24, 0],
|
|
13756
13785
|
align: "top",
|
|
13757
|
-
children:
|
|
13786
|
+
children: me(c, u, r[0], !1, t.field)
|
|
13758
13787
|
}) : /* @__PURE__ */ Z(B.Item, {
|
|
13759
13788
|
name: [u],
|
|
13760
13789
|
noStyle: !0,
|
|
13761
13790
|
valuePropName: t.type === "checkbox" && !t.options?.length ? "checked" : "value",
|
|
13762
13791
|
getValueFromEvent: t.type === "file" ? (e) => Array.isArray(e) ? e : e?.fileList : void 0,
|
|
13763
|
-
rules: D_(o,
|
|
13792
|
+
rules: D_(o, f, [...r, u], !0),
|
|
13764
13793
|
children: /* @__PURE__ */ Z(N_, {
|
|
13765
13794
|
field: o,
|
|
13766
|
-
form:
|
|
13795
|
+
form: f,
|
|
13767
13796
|
name: [...r, u],
|
|
13768
13797
|
moduleName: e,
|
|
13769
13798
|
scopeValues: { clientId: n },
|
|
13770
|
-
formDisabled:
|
|
13799
|
+
formDisabled: re.busy
|
|
13771
13800
|
})
|
|
13772
13801
|
})
|
|
13773
13802
|
})]
|
|
@@ -13785,7 +13814,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13785
13814
|
})
|
|
13786
13815
|
})
|
|
13787
13816
|
}, t.field);
|
|
13788
|
-
},
|
|
13817
|
+
}, pe = (t, r, i) => {
|
|
13789
13818
|
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
13819
|
field: t,
|
|
13791
13820
|
label: t.label,
|
|
@@ -13794,7 +13823,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13794
13823
|
...e,
|
|
13795
13824
|
show: 1,
|
|
13796
13825
|
edit: 1
|
|
13797
|
-
})) : null,
|
|
13826
|
+
})) : 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
13827
|
...Array.isArray(i) ? i : [i],
|
|
13799
13828
|
r,
|
|
13800
13829
|
...a
|
|
@@ -13812,7 +13841,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13812
13841
|
initialValue: g,
|
|
13813
13842
|
rules: l ? [{ validator: async (e, n = []) => {
|
|
13814
13843
|
if (E_(t) && !n.some((e) => s_(e))) throw Error("Mandatory Field");
|
|
13815
|
-
if (
|
|
13844
|
+
if (d > 0 && n.length < d) throw Error(`Keep at least ${d} row${d > 1 ? "s" : ""}.`);
|
|
13816
13845
|
} }] : [],
|
|
13817
13846
|
children: (r, { add: i, remove: a }, { errors: o }) => /* @__PURE__ */ Q("div", {
|
|
13818
13847
|
className: "v1-addrow-wrapper",
|
|
@@ -13826,27 +13855,27 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13826
13855
|
danger: !0,
|
|
13827
13856
|
icon: /* @__PURE__ */ Z(Je, {}),
|
|
13828
13857
|
onClick: () => a(o),
|
|
13829
|
-
disabled: r.length <=
|
|
13858
|
+
disabled: r.length <= d,
|
|
13830
13859
|
className: "v1-addrow-delete-btn"
|
|
13831
13860
|
}), /* @__PURE__ */ Z("div", {
|
|
13832
13861
|
className: "v1-addrow-fields",
|
|
13833
13862
|
children: l ? /* @__PURE__ */ Z(U, {
|
|
13834
13863
|
gutter: [24, 0],
|
|
13835
13864
|
align: "top",
|
|
13836
|
-
children:
|
|
13865
|
+
children: me(u, o, h, !1, t.field)
|
|
13837
13866
|
}) : /* @__PURE__ */ Z(B.Item, {
|
|
13838
13867
|
name: [o],
|
|
13839
13868
|
noStyle: !0,
|
|
13840
13869
|
valuePropName: t.type === "checkbox" && !t.options?.length ? "checked" : "value",
|
|
13841
13870
|
getValueFromEvent: t.type === "file" ? (e) => Array.isArray(e) ? e : e?.fileList : void 0,
|
|
13842
|
-
rules: D_(c,
|
|
13871
|
+
rules: D_(c, f, s, !0),
|
|
13843
13872
|
children: /* @__PURE__ */ Z(N_, {
|
|
13844
13873
|
field: c,
|
|
13845
|
-
form:
|
|
13874
|
+
form: f,
|
|
13846
13875
|
name: s,
|
|
13847
13876
|
moduleName: e,
|
|
13848
13877
|
scopeValues: { clientId: n },
|
|
13849
|
-
formDisabled:
|
|
13878
|
+
formDisabled: re.busy
|
|
13850
13879
|
})
|
|
13851
13880
|
})
|
|
13852
13881
|
})]
|
|
@@ -13865,20 +13894,20 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13865
13894
|
})
|
|
13866
13895
|
})
|
|
13867
13896
|
}, `${i}-${r}-${t.field}`);
|
|
13868
|
-
},
|
|
13897
|
+
}, me = (e, t, n, r = !1, i) => {
|
|
13869
13898
|
let a = /* @__PURE__ */ new Set(), o = [];
|
|
13870
13899
|
return e.forEach((s) => {
|
|
13871
13900
|
if (i_(s.addRow) && t === void 0) {
|
|
13872
|
-
o.push(
|
|
13901
|
+
o.push(fe(s));
|
|
13873
13902
|
return;
|
|
13874
13903
|
}
|
|
13875
13904
|
if (i_(s.addRow) && t !== void 0) {
|
|
13876
|
-
o.push(
|
|
13905
|
+
o.push(pe(s, t, n));
|
|
13877
13906
|
return;
|
|
13878
13907
|
}
|
|
13879
13908
|
let c = s.combineKey?.trim?.();
|
|
13880
13909
|
if (!c) {
|
|
13881
|
-
o.push(
|
|
13910
|
+
o.push(de(s, t, n, {
|
|
13882
13911
|
hideLabel: r,
|
|
13883
13912
|
groupNameForActions: i
|
|
13884
13913
|
}));
|
|
@@ -13888,12 +13917,12 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13888
13917
|
if (a.has(l)) return;
|
|
13889
13918
|
let u = e.filter((e) => e.combineKey === c);
|
|
13890
13919
|
u.forEach((e) => a.add(`${n ?? "root"}:${t ?? "root"}:${e.combineKey}`));
|
|
13891
|
-
let
|
|
13892
|
-
form:
|
|
13920
|
+
let d = /* @__PURE__ */ Z($g, {
|
|
13921
|
+
form: f,
|
|
13893
13922
|
field: u.find((e) => e.combineLabel) ?? s,
|
|
13894
13923
|
siblingPrefix: n !== void 0 && t !== void 0 ? [...Array.isArray(n) ? n : [n], t] : null,
|
|
13895
13924
|
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) =>
|
|
13925
|
+
}), 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
13926
|
n,
|
|
13898
13927
|
t,
|
|
13899
13928
|
...v
|
|
@@ -13902,7 +13931,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13902
13931
|
xs: 24,
|
|
13903
13932
|
md: x,
|
|
13904
13933
|
children: /* @__PURE__ */ Z(B.Item, {
|
|
13905
|
-
label:
|
|
13934
|
+
label: d,
|
|
13906
13935
|
required: b,
|
|
13907
13936
|
colon: !1,
|
|
13908
13937
|
className: "v1-combine-field",
|
|
@@ -13910,20 +13939,20 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13910
13939
|
noStyle: !0,
|
|
13911
13940
|
shouldUpdate: !0,
|
|
13912
13941
|
children: ({ getFieldValue: e }) => {
|
|
13913
|
-
let r = y ? !o_(e(y)) : !1, i =
|
|
13942
|
+
let r = y ? !o_(e(y)) : !1, i = ce[l] ?? r, a = p && !i ? u.filter((e) => ue(e) !== p) : u;
|
|
13914
13943
|
return /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z(U, {
|
|
13915
13944
|
gutter: [8, 0],
|
|
13916
13945
|
align: "top",
|
|
13917
13946
|
wrap: h,
|
|
13918
13947
|
className: `v1-combine-row${h ? " v1-combine-row-wrap" : ""}`,
|
|
13919
|
-
children: a.map((e) =>
|
|
13948
|
+
children: a.map((e) => de(e, t, n, { inline: !0 }))
|
|
13920
13949
|
}), p && /* @__PURE__ */ Q("div", {
|
|
13921
13950
|
className: "v1-combine-range",
|
|
13922
13951
|
children: [/* @__PURE__ */ Z(K, {
|
|
13923
13952
|
size: "small",
|
|
13924
13953
|
checked: i,
|
|
13925
13954
|
onChange: (e) => {
|
|
13926
|
-
!e && y && (
|
|
13955
|
+
!e && y && (f.setFieldValue(y, void 0), f.validateFields([y]).catch(() => {})), le((t) => ({
|
|
13927
13956
|
...t,
|
|
13928
13957
|
[l]: e
|
|
13929
13958
|
}));
|
|
@@ -13940,53 +13969,53 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
13940
13969
|
}, l));
|
|
13941
13970
|
}), o;
|
|
13942
13971
|
};
|
|
13943
|
-
return /* @__PURE__ */ Q("main", { children: [
|
|
13972
|
+
return /* @__PURE__ */ Q("main", { children: [ae.length > 0 && /* @__PURE__ */ Z(El, { items: ae }), /* @__PURE__ */ Q("div", {
|
|
13944
13973
|
className: "v1-edit-page",
|
|
13945
13974
|
children: [/* @__PURE__ */ Z("div", {
|
|
13946
13975
|
className: "v1-page-inner",
|
|
13947
13976
|
children: /* @__PURE__ */ Q(_e, {
|
|
13948
|
-
spinning:
|
|
13949
|
-
tip:
|
|
13977
|
+
spinning: _ || re.busy,
|
|
13978
|
+
tip: re.busy ? "Running AI action…" : "Loading form fields...",
|
|
13950
13979
|
children: [
|
|
13951
|
-
|
|
13980
|
+
y && /* @__PURE__ */ Z(j, {
|
|
13952
13981
|
type: "error",
|
|
13953
13982
|
showIcon: !0,
|
|
13954
|
-
message:
|
|
13983
|
+
message: y,
|
|
13955
13984
|
style: { marginBottom: 16 }
|
|
13956
13985
|
}),
|
|
13957
|
-
|
|
13986
|
+
C && /* @__PURE__ */ Z(j, {
|
|
13958
13987
|
type: "error",
|
|
13959
13988
|
showIcon: !0,
|
|
13960
|
-
message:
|
|
13989
|
+
message: C,
|
|
13961
13990
|
style: { marginBottom: 16 }
|
|
13962
13991
|
}),
|
|
13963
13992
|
/* @__PURE__ */ Q(B, {
|
|
13964
|
-
form:
|
|
13993
|
+
form: f,
|
|
13965
13994
|
layout: "vertical",
|
|
13966
13995
|
colon: !1,
|
|
13967
13996
|
className: "v1-form",
|
|
13968
|
-
disabled:
|
|
13997
|
+
disabled: re.busy,
|
|
13969
13998
|
requiredMark: (e, { required: t }) => /* @__PURE__ */ Q(X, { children: [e, t && /* @__PURE__ */ Z("span", {
|
|
13970
13999
|
className: "v1-required-mark",
|
|
13971
14000
|
children: " *"
|
|
13972
14001
|
})] }),
|
|
13973
|
-
onFinish:
|
|
13974
|
-
onFinishFailed:
|
|
14002
|
+
onFinish: V,
|
|
14003
|
+
onFinishFailed: se,
|
|
13975
14004
|
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) =>
|
|
14005
|
+
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 = () => {
|
|
14006
|
+
l.forEach((e) => ne.current[e]?.add());
|
|
14007
|
+
}, d = (e) => {
|
|
14008
|
+
l.forEach((t) => ne.current[t]?.remove(e));
|
|
13980
14009
|
}, m = e.addRow ? /* @__PURE__ */ Z(B.List, {
|
|
13981
14010
|
name: r,
|
|
13982
|
-
initialValue:
|
|
14011
|
+
initialValue: ie[e.name] ?? [],
|
|
13983
14012
|
rules: a ? [] : [{ validator: async (t, n = []) => {
|
|
13984
|
-
if (!(i_(e.toggleEnabled) && e.toggleField &&
|
|
14013
|
+
if (!(i_(e.toggleEnabled) && e.toggleField && f.getFieldValue(e.toggleField))) {
|
|
13985
14014
|
if (s > 0 && n.length < s) throw Error(`Keep at least ${s} row${s > 1 ? "s" : ""}.`);
|
|
13986
14015
|
if (i_(e.requireOne) && n.some((e) => !s_(e))) throw Error("Fill at least one field in each added row.");
|
|
13987
14016
|
}
|
|
13988
14017
|
} }],
|
|
13989
|
-
children: (t, { add: n, remove: i }, { errors: l }) => (
|
|
14018
|
+
children: (t, { add: n, remove: i }, { errors: l }) => (ne.current[r] = {
|
|
13990
14019
|
add: n,
|
|
13991
14020
|
remove: i
|
|
13992
14021
|
}, /* @__PURE__ */ Q("div", {
|
|
@@ -14013,7 +14042,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
14013
14042
|
md: e.col ?? 12,
|
|
14014
14043
|
className: "v1-addrow-header-label",
|
|
14015
14044
|
children: e.label
|
|
14016
|
-
},
|
|
14045
|
+
}, ue(e)))
|
|
14017
14046
|
}),
|
|
14018
14047
|
t.map(({ key: n, name: i }) => /* @__PURE__ */ Q("div", {
|
|
14019
14048
|
className: "v1-addrow-item",
|
|
@@ -14022,14 +14051,14 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
14022
14051
|
danger: !0,
|
|
14023
14052
|
icon: /* @__PURE__ */ Z(Je, {}),
|
|
14024
14053
|
disabled: t.length <= s,
|
|
14025
|
-
onClick: () =>
|
|
14054
|
+
onClick: () => d(i),
|
|
14026
14055
|
className: "v1-addrow-delete-btn"
|
|
14027
14056
|
}), /* @__PURE__ */ Z("div", {
|
|
14028
14057
|
className: "v1-addrow-fields",
|
|
14029
14058
|
children: /* @__PURE__ */ Z(U, {
|
|
14030
14059
|
gutter: [24, 0],
|
|
14031
14060
|
align: "top",
|
|
14032
|
-
children:
|
|
14061
|
+
children: me(e.fields, i, r, i_(e.sharedRowLabels), r)
|
|
14033
14062
|
})
|
|
14034
14063
|
})]
|
|
14035
14064
|
}, n)),
|
|
@@ -14038,7 +14067,7 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
14038
14067
|
}))
|
|
14039
14068
|
}) : /* @__PURE__ */ Z(U, {
|
|
14040
14069
|
gutter: [24, 0],
|
|
14041
|
-
children:
|
|
14070
|
+
children: me(e.fields, void 0, void 0, !1, r)
|
|
14042
14071
|
});
|
|
14043
14072
|
return /* @__PURE__ */ Z(I, {
|
|
14044
14073
|
className: "v1-card v1-edit-card",
|
|
@@ -14056,9 +14085,9 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
14056
14085
|
/* @__PURE__ */ Z(F, {
|
|
14057
14086
|
type: "text",
|
|
14058
14087
|
size: "small",
|
|
14059
|
-
icon:
|
|
14088
|
+
icon: p[n] ? /* @__PURE__ */ Z(Xe, {}) : /* @__PURE__ */ Z(Xt, {}),
|
|
14060
14089
|
onClick: (e) => {
|
|
14061
|
-
e.stopPropagation(),
|
|
14090
|
+
e.stopPropagation(), z(n);
|
|
14062
14091
|
}
|
|
14063
14092
|
})
|
|
14064
14093
|
]
|
|
@@ -14069,13 +14098,13 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
14069
14098
|
children: ({ getFieldValue: t }) => {
|
|
14070
14099
|
let r = i_(e.toggleEnabled) && e.toggleField && !!t(e.toggleField);
|
|
14071
14100
|
return /* @__PURE__ */ Z("div", {
|
|
14072
|
-
style: { display:
|
|
14101
|
+
style: { display: p[n] || r ? "none" : "block" },
|
|
14073
14102
|
children: m
|
|
14074
14103
|
});
|
|
14075
14104
|
}
|
|
14076
14105
|
})
|
|
14077
14106
|
}, n);
|
|
14078
|
-
}), !
|
|
14107
|
+
}), !_ && !y && P.length === 0 && /* @__PURE__ */ Z(j, {
|
|
14079
14108
|
type: "info",
|
|
14080
14109
|
showIcon: !0,
|
|
14081
14110
|
message: "No form fields are configured."
|
|
@@ -14091,14 +14120,14 @@ function F_({ moduleName: e, recordId: t, clientId: n, region: r, breadcrumbItem
|
|
|
14091
14120
|
}), /* @__PURE__ */ Q(G, {
|
|
14092
14121
|
size: 12,
|
|
14093
14122
|
children: [/* @__PURE__ */ Z(F, {
|
|
14094
|
-
onClick: () =>
|
|
14123
|
+
onClick: () => d(o || -1),
|
|
14095
14124
|
children: "Cancel"
|
|
14096
14125
|
}), /* @__PURE__ */ Z(e_, {
|
|
14097
|
-
form:
|
|
14126
|
+
form: f,
|
|
14098
14127
|
groups: P,
|
|
14099
|
-
onClick: () =>
|
|
14100
|
-
disabled:
|
|
14101
|
-
loading:
|
|
14128
|
+
onClick: () => f.submit(),
|
|
14129
|
+
disabled: _ || x,
|
|
14130
|
+
loading: x,
|
|
14102
14131
|
children: a
|
|
14103
14132
|
})]
|
|
14104
14133
|
})]
|
|
@@ -14607,7 +14636,7 @@ function tv(e, t) {
|
|
|
14607
14636
|
function nv(e, t) {
|
|
14608
14637
|
return /* @__PURE__ */ Q(G, {
|
|
14609
14638
|
size: 6,
|
|
14610
|
-
children: [/* @__PURE__ */ Z("span", { children: e }), /* @__PURE__ */ Z(
|
|
14639
|
+
children: [/* @__PURE__ */ Z("span", { children: e }), /* @__PURE__ */ Z(ee, {
|
|
14611
14640
|
count: t,
|
|
14612
14641
|
overflowCount: 9999
|
|
14613
14642
|
})]
|
|
@@ -14617,7 +14646,7 @@ function rv({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
|
|
|
14617
14646
|
let g = dn(), _ = un(), [v, y] = A("all"), [b, x] = A(""), [S, C] = A([]), [w, T] = A([]), [E, D] = A({
|
|
14618
14647
|
current: 1,
|
|
14619
14648
|
pageSize: 10
|
|
14620
|
-
}), [j, M] = A([]), [N,
|
|
14649
|
+
}), [j, M] = A([]), [N, ee] = A(!1), P = k(null), L = n.filter((e) => !e.maxSelect || S.length <= e.maxSelect).map((e) => ({
|
|
14621
14650
|
key: e.key ?? e.name,
|
|
14622
14651
|
label: e.label ?? e.name,
|
|
14623
14652
|
danger: e.danger ?? !1,
|
|
@@ -14726,7 +14755,7 @@ function rv({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
|
|
|
14726
14755
|
value: b,
|
|
14727
14756
|
onChange: (e) => {
|
|
14728
14757
|
let t = e.target.value;
|
|
14729
|
-
x(t), u ? (clearTimeout(
|
|
14758
|
+
x(t), u ? (clearTimeout(P.current), P.current = setTimeout(() => {
|
|
14730
14759
|
u(t), c?.(1);
|
|
14731
14760
|
}, 350)) : ne ? c?.(1) : D({
|
|
14732
14761
|
...E,
|
|
@@ -14767,7 +14796,7 @@ function rv({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
|
|
|
14767
14796
|
gap: 3,
|
|
14768
14797
|
children: [/* @__PURE__ */ Z(ae, {
|
|
14769
14798
|
open: N,
|
|
14770
|
-
onOpenChange:
|
|
14799
|
+
onOpenChange: ee,
|
|
14771
14800
|
trigger: ["click"],
|
|
14772
14801
|
dropdownRender: () => de,
|
|
14773
14802
|
placement: "bottomLeft",
|
|
@@ -14903,7 +14932,7 @@ function sv({ tabs: e = [], activeKey: t, onChange: n, className: r = "" }) {
|
|
|
14903
14932
|
children: [/* @__PURE__ */ Z("span", {
|
|
14904
14933
|
className: "stylish-tabs__label",
|
|
14905
14934
|
children: e.label
|
|
14906
|
-
}), r && /* @__PURE__ */ Z(
|
|
14935
|
+
}), r && /* @__PURE__ */ Z(ee, {
|
|
14907
14936
|
count: e.count,
|
|
14908
14937
|
showZero: !0,
|
|
14909
14938
|
overflowCount: 999,
|
|
@@ -18522,11 +18551,11 @@ function ex({ field: e, index: t, configType: n, moduleKey: r, onUpdate: i, onRe
|
|
|
18522
18551
|
v([]);
|
|
18523
18552
|
}
|
|
18524
18553
|
}
|
|
18525
|
-
function
|
|
18554
|
+
function ee(t) {
|
|
18526
18555
|
let n = e.secondaryFields ?? [];
|
|
18527
18556
|
!t || n.includes(t) || k({ secondaryFields: [...n, t] });
|
|
18528
18557
|
}
|
|
18529
|
-
function
|
|
18558
|
+
function P(t) {
|
|
18530
18559
|
k({ secondaryFields: (e.secondaryFields ?? []).filter((e) => e !== t) });
|
|
18531
18560
|
}
|
|
18532
18561
|
function I() {
|
|
@@ -18628,8 +18657,8 @@ function ex({ field: e, index: t, configType: n, moduleKey: r, onUpdate: i, onRe
|
|
|
18628
18657
|
subfields: _,
|
|
18629
18658
|
onCollectionChange: M,
|
|
18630
18659
|
onLookupFieldChange: N,
|
|
18631
|
-
addSecondaryField:
|
|
18632
|
-
removeSecondaryField:
|
|
18660
|
+
addSecondaryField: ee,
|
|
18661
|
+
removeSecondaryField: P,
|
|
18633
18662
|
addActionButton: I,
|
|
18634
18663
|
updateActionButton: te,
|
|
18635
18664
|
removeActionButton: L,
|
|
@@ -22659,7 +22688,7 @@ function Hx({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
|
|
|
22659
22688
|
t = !0;
|
|
22660
22689
|
};
|
|
22661
22690
|
}, [e, d]);
|
|
22662
|
-
async function
|
|
22691
|
+
async function ee(e) {
|
|
22663
22692
|
if (!(!e || j.current[e])) {
|
|
22664
22693
|
j.current[e] = "loading", g(!0);
|
|
22665
22694
|
try {
|
|
@@ -22727,15 +22756,15 @@ function Hx({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
|
|
|
22727
22756
|
afterSubmitTarget: "",
|
|
22728
22757
|
order: 0,
|
|
22729
22758
|
fields: []
|
|
22730
|
-
})),
|
|
22759
|
+
})), ee(r);
|
|
22731
22760
|
}, [
|
|
22732
22761
|
e,
|
|
22733
22762
|
t,
|
|
22734
22763
|
n,
|
|
22735
22764
|
c
|
|
22736
22765
|
]);
|
|
22737
|
-
function
|
|
22738
|
-
f(e),
|
|
22766
|
+
function P(e) {
|
|
22767
|
+
f(e), ee(e);
|
|
22739
22768
|
}
|
|
22740
22769
|
function I() {
|
|
22741
22770
|
S(/* @__PURE__ */ new Set()), w("settings"), E(!1), a();
|
|
@@ -22909,7 +22938,7 @@ function Hx({ open: e, editingGroup: t, defaultModule: n, moduleOptions: r, allG
|
|
|
22909
22938
|
children: /* @__PURE__ */ Z(W, {
|
|
22910
22939
|
options: r,
|
|
22911
22940
|
placeholder: "Select module",
|
|
22912
|
-
onChange:
|
|
22941
|
+
onChange: P
|
|
22913
22942
|
})
|
|
22914
22943
|
}),
|
|
22915
22944
|
/* @__PURE__ */ Z(B.Item, {
|
|
@@ -23566,7 +23595,7 @@ function Ux({ groups: e, onEdit: t, onDelete: n, onCopy: r, onPaste: i, canPaste
|
|
|
23566
23595
|
key: "fields",
|
|
23567
23596
|
align: "center",
|
|
23568
23597
|
width: 76,
|
|
23569
|
-
render: (e) => /* @__PURE__ */ Z(
|
|
23598
|
+
render: (e) => /* @__PURE__ */ Z(ee, {
|
|
23570
23599
|
count: e?.length ?? 0,
|
|
23571
23600
|
showZero: !0,
|
|
23572
23601
|
color: "var(--color-brand)"
|
|
@@ -24379,7 +24408,7 @@ function Gx({ moduleOptions: e }) {
|
|
|
24379
24408
|
key: "groups",
|
|
24380
24409
|
align: "center",
|
|
24381
24410
|
width: 76,
|
|
24382
|
-
render: (e) => /* @__PURE__ */ Z(
|
|
24411
|
+
render: (e) => /* @__PURE__ */ Z(ee, {
|
|
24383
24412
|
count: e?.length ?? 0,
|
|
24384
24413
|
showZero: !0,
|
|
24385
24414
|
color: "var(--color-brand)"
|
|
@@ -24497,7 +24526,7 @@ function Kx() {
|
|
|
24497
24526
|
function N() {
|
|
24498
24527
|
d(null), l(!0);
|
|
24499
24528
|
}
|
|
24500
|
-
function
|
|
24529
|
+
function P(e) {
|
|
24501
24530
|
d(e), l(!0);
|
|
24502
24531
|
}
|
|
24503
24532
|
function I() {
|
|
@@ -24585,7 +24614,7 @@ function Kx() {
|
|
|
24585
24614
|
style: { background: n }
|
|
24586
24615
|
}),
|
|
24587
24616
|
t,
|
|
24588
|
-
/* @__PURE__ */ Z(
|
|
24617
|
+
/* @__PURE__ */ Z(ee, {
|
|
24589
24618
|
count: r.groups.length,
|
|
24590
24619
|
showZero: !0,
|
|
24591
24620
|
color: n,
|
|
@@ -24619,7 +24648,7 @@ function Kx() {
|
|
|
24619
24648
|
spinning: r.loading,
|
|
24620
24649
|
children: /* @__PURE__ */ Z(Ux, {
|
|
24621
24650
|
groups: a,
|
|
24622
|
-
onEdit:
|
|
24651
|
+
onEdit: P,
|
|
24623
24652
|
onDelete: L,
|
|
24624
24653
|
onCopy: oe,
|
|
24625
24654
|
onPaste: B,
|
|
@@ -26050,7 +26079,7 @@ function hS({ open: e, onClose: t }) {
|
|
|
26050
26079
|
});
|
|
26051
26080
|
}
|
|
26052
26081
|
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), [
|
|
26082
|
+
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
26083
|
function oe(e) {
|
|
26055
26084
|
I(Qx[e]);
|
|
26056
26085
|
}
|
|
@@ -26236,7 +26265,7 @@ function gS() {
|
|
|
26236
26265
|
key: "fields",
|
|
26237
26266
|
width: 76,
|
|
26238
26267
|
align: "center",
|
|
26239
|
-
render: (e) => /* @__PURE__ */ Z(
|
|
26268
|
+
render: (e) => /* @__PURE__ */ Z(ee, {
|
|
26240
26269
|
count: e?.length ?? 0,
|
|
26241
26270
|
showZero: !0,
|
|
26242
26271
|
color: "var(--color-brand)"
|
|
@@ -26637,13 +26666,13 @@ function gS() {
|
|
|
26637
26666
|
onClose: () => k(!1)
|
|
26638
26667
|
}),
|
|
26639
26668
|
/* @__PURE__ */ Z(gx, {
|
|
26640
|
-
open: !!
|
|
26669
|
+
open: !!P,
|
|
26641
26670
|
scope: "detailConfig",
|
|
26642
|
-
action:
|
|
26643
|
-
title:
|
|
26644
|
-
description:
|
|
26645
|
-
confirmLabel:
|
|
26646
|
-
danger:
|
|
26671
|
+
action: P?.action,
|
|
26672
|
+
title: P?.title,
|
|
26673
|
+
description: P?.description,
|
|
26674
|
+
confirmLabel: P?.confirmLabel,
|
|
26675
|
+
danger: P?.danger,
|
|
26647
26676
|
onCancel: () => I(null),
|
|
26648
26677
|
onVerified: se
|
|
26649
26678
|
})
|
|
@@ -27176,7 +27205,7 @@ function VS({ open: e, initial: t, isChild: n, popupForms: r, templateOptions: i
|
|
|
27176
27205
|
});
|
|
27177
27206
|
}
|
|
27178
27207
|
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,
|
|
27208
|
+
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
27209
|
D(() => {
|
|
27181
27210
|
Ua().then((e) => {
|
|
27182
27211
|
let n = ix(e).map((e) => e.value);
|
|
@@ -27681,7 +27710,7 @@ function HS() {
|
|
|
27681
27710
|
prefix: /* @__PURE__ */ Z(Ft, {}),
|
|
27682
27711
|
placeholder: "Search actions",
|
|
27683
27712
|
value: N,
|
|
27684
|
-
onChange: (e) =>
|
|
27713
|
+
onChange: (e) => ee(e.target.value)
|
|
27685
27714
|
}), u && /* @__PURE__ */ Z(PS, {
|
|
27686
27715
|
type: "warning",
|
|
27687
27716
|
children: "Unsaved changes"
|
|
@@ -27725,7 +27754,7 @@ function HS() {
|
|
|
27725
27754
|
isChild: !!R,
|
|
27726
27755
|
popupForms: S,
|
|
27727
27756
|
templateOptions: w,
|
|
27728
|
-
permissionModules:
|
|
27757
|
+
permissionModules: P,
|
|
27729
27758
|
permissionActions: te,
|
|
27730
27759
|
onClose: () => y(!1),
|
|
27731
27760
|
onSave: se
|
|
@@ -27937,7 +27966,7 @@ function tC() {
|
|
|
27937
27966
|
}
|
|
27938
27967
|
w(i);
|
|
27939
27968
|
}
|
|
27940
|
-
async function
|
|
27969
|
+
async function ee() {
|
|
27941
27970
|
y(!0);
|
|
27942
27971
|
try {
|
|
27943
27972
|
for (let e of XS) await To({
|
|
@@ -27951,7 +27980,7 @@ function tC() {
|
|
|
27951
27980
|
y(!1);
|
|
27952
27981
|
}
|
|
27953
27982
|
}
|
|
27954
|
-
function
|
|
27983
|
+
function P(e, t) {
|
|
27955
27984
|
h((n) => ({
|
|
27956
27985
|
...n,
|
|
27957
27986
|
conditions: n.conditions.map((n, r) => r === e ? {
|
|
@@ -28009,7 +28038,7 @@ function tC() {
|
|
|
28009
28038
|
children: /* @__PURE__ */ Z(F, {
|
|
28010
28039
|
icon: /* @__PURE__ */ Z(Gt, {}),
|
|
28011
28040
|
loading: v,
|
|
28012
|
-
onClick:
|
|
28041
|
+
onClick: ee,
|
|
28013
28042
|
children: "Seed Job Defaults"
|
|
28014
28043
|
})
|
|
28015
28044
|
})
|
|
@@ -28212,7 +28241,7 @@ function tC() {
|
|
|
28212
28241
|
options: GS,
|
|
28213
28242
|
value: e.operator,
|
|
28214
28243
|
style: { width: 140 },
|
|
28215
|
-
onChange: (e) =>
|
|
28244
|
+
onChange: (e) => P(t, {
|
|
28216
28245
|
operator: e,
|
|
28217
28246
|
value: "",
|
|
28218
28247
|
compareField: ""
|
|
@@ -28235,7 +28264,7 @@ function tC() {
|
|
|
28235
28264
|
options: b,
|
|
28236
28265
|
style: { width: "100%" },
|
|
28237
28266
|
placeholder: "Select or type field name",
|
|
28238
|
-
onChange: (e) =>
|
|
28267
|
+
onChange: (e) => P(t, { field: e[e.length - 1] ?? "" }),
|
|
28239
28268
|
filterOption: (e, t) => (t?.label ?? t?.value ?? "").toLowerCase().includes(e.toLowerCase())
|
|
28240
28269
|
}), /* @__PURE__ */ Q(US, {
|
|
28241
28270
|
type: "secondary",
|
|
@@ -28259,7 +28288,7 @@ function tC() {
|
|
|
28259
28288
|
value: e.value,
|
|
28260
28289
|
placeholder: "e.g. \"fulfilled\"",
|
|
28261
28290
|
style: { width: 150 },
|
|
28262
|
-
onChange: (e) =>
|
|
28291
|
+
onChange: (e) => P(t, { value: e.target.value })
|
|
28263
28292
|
})
|
|
28264
28293
|
}),
|
|
28265
28294
|
e.operator === JS && /* @__PURE__ */ Q(B.Item, {
|
|
@@ -28273,7 +28302,7 @@ function tC() {
|
|
|
28273
28302
|
value: e.value || void 0,
|
|
28274
28303
|
style: { width: 150 },
|
|
28275
28304
|
placeholder: "Select scope",
|
|
28276
|
-
onChange: (e) =>
|
|
28305
|
+
onChange: (e) => P(t, { value: e })
|
|
28277
28306
|
}), /* @__PURE__ */ Z(US, {
|
|
28278
28307
|
type: "secondary",
|
|
28279
28308
|
style: { fontSize: 11 },
|
|
@@ -28295,7 +28324,7 @@ function tC() {
|
|
|
28295
28324
|
options: b,
|
|
28296
28325
|
style: { width: 170 },
|
|
28297
28326
|
placeholder: "Select or type field",
|
|
28298
|
-
onChange: (e) =>
|
|
28327
|
+
onChange: (e) => P(t, { compareField: e[e.length - 1] ?? "" }),
|
|
28299
28328
|
filterOption: (e, t) => (t?.label ?? t?.value ?? "").toLowerCase().includes(e.toLowerCase())
|
|
28300
28329
|
}), /* @__PURE__ */ Q(US, {
|
|
28301
28330
|
type: "secondary",
|
|
@@ -30588,7 +30617,7 @@ function kC() {
|
|
|
30588
30617
|
[e]: t
|
|
30589
30618
|
}));
|
|
30590
30619
|
}
|
|
30591
|
-
function
|
|
30620
|
+
function P() {
|
|
30592
30621
|
h(!0), Qi(i, {
|
|
30593
30622
|
gateway: o,
|
|
30594
30623
|
strategies: {
|
|
@@ -30613,11 +30642,11 @@ function kC() {
|
|
|
30613
30642
|
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
30643
|
okText: "Confirm cutover",
|
|
30615
30644
|
okButtonProps: { danger: !0 },
|
|
30616
|
-
onOk:
|
|
30645
|
+
onOk: P
|
|
30617
30646
|
});
|
|
30618
30647
|
return;
|
|
30619
30648
|
}
|
|
30620
|
-
|
|
30649
|
+
P();
|
|
30621
30650
|
}
|
|
30622
30651
|
let te = [
|
|
30623
30652
|
{
|
|
@@ -30637,7 +30666,7 @@ function kC() {
|
|
|
30637
30666
|
{
|
|
30638
30667
|
title: "Fields",
|
|
30639
30668
|
key: "fields",
|
|
30640
|
-
render: (e, t) => /* @__PURE__ */ Z(
|
|
30669
|
+
render: (e, t) => /* @__PURE__ */ Z(ee, {
|
|
30641
30670
|
count: Object.keys(t.fieldMap ?? {}).length,
|
|
30642
30671
|
showZero: !0,
|
|
30643
30672
|
color: "var(--color-brand)"
|
|
@@ -30684,7 +30713,7 @@ function kC() {
|
|
|
30684
30713
|
{
|
|
30685
30714
|
title: "Fields",
|
|
30686
30715
|
key: "fields",
|
|
30687
|
-
render: (e, t) => /* @__PURE__ */ Z(
|
|
30716
|
+
render: (e, t) => /* @__PURE__ */ Z(ee, {
|
|
30688
30717
|
count: Object.keys(t.fieldMap ?? {}).length,
|
|
30689
30718
|
showZero: !0,
|
|
30690
30719
|
color: "var(--color-brand)"
|
|
@@ -31869,7 +31898,7 @@ function IC() {
|
|
|
31869
31898
|
children: [/* @__PURE__ */ Q("div", {
|
|
31870
31899
|
style: { marginBottom: 8 },
|
|
31871
31900
|
children: [
|
|
31872
|
-
/* @__PURE__ */ Z(
|
|
31901
|
+
/* @__PURE__ */ Z(ee, {
|
|
31873
31902
|
count: v.length,
|
|
31874
31903
|
showZero: !0,
|
|
31875
31904
|
color: "var(--color-brand)"
|
|
@@ -32634,7 +32663,7 @@ function dw({ title: e, description: t, selectedName: n, loading: r, saving: i,
|
|
|
32634
32663
|
});
|
|
32635
32664
|
}
|
|
32636
32665
|
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), [
|
|
32666
|
+
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
32667
|
he(!0);
|
|
32639
32668
|
try {
|
|
32640
32669
|
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 +32908,13 @@ function fw({ onLogout: e }) {
|
|
|
32879
32908
|
}
|
|
32880
32909
|
}
|
|
32881
32910
|
async function ze(e) {
|
|
32882
|
-
|
|
32911
|
+
P(e);
|
|
32883
32912
|
try {
|
|
32884
32913
|
await Tb(e), Y.success("User deleted"), await Se();
|
|
32885
32914
|
} catch (e) {
|
|
32886
32915
|
Y.error(e.message || "Unable to delete user");
|
|
32887
32916
|
} finally {
|
|
32888
|
-
|
|
32917
|
+
P(null);
|
|
32889
32918
|
}
|
|
32890
32919
|
}
|
|
32891
32920
|
function Be(e, t) {
|
|
@@ -33046,7 +33075,7 @@ function fw({ onLogout: e }) {
|
|
|
33046
33075
|
danger: !0,
|
|
33047
33076
|
"aria-label": "Delete user",
|
|
33048
33077
|
icon: /* @__PURE__ */ Z(Je, {}),
|
|
33049
|
-
loading:
|
|
33078
|
+
loading: ee === t.user_id,
|
|
33050
33079
|
size: "small"
|
|
33051
33080
|
})
|
|
33052
33081
|
})]
|
|
@@ -35102,7 +35131,7 @@ function BT({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
|
|
|
35102
35131
|
D(() => {
|
|
35103
35132
|
!e || !M || T();
|
|
35104
35133
|
}, [e, M]);
|
|
35105
|
-
let N = f.length,
|
|
35134
|
+
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
35135
|
let t = s[e.name];
|
|
35107
35136
|
return !(t == null || t === "" || Array.isArray(t) && t.length === 0 || typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0);
|
|
35108
35137
|
}), ie = t?.disabledUntilFilled && !re;
|
|
@@ -35133,7 +35162,7 @@ function BT({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
|
|
|
35133
35162
|
description: t.description,
|
|
35134
35163
|
showSelectedCount: t.showSelectedCount,
|
|
35135
35164
|
count: N,
|
|
35136
|
-
itemLabel:
|
|
35165
|
+
itemLabel: P,
|
|
35137
35166
|
bodyText: L,
|
|
35138
35167
|
deleteError: k
|
|
35139
35168
|
}),
|
|
@@ -36039,11 +36068,11 @@ function XE() {
|
|
|
36039
36068
|
contents: "",
|
|
36040
36069
|
showCc: !1,
|
|
36041
36070
|
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,
|
|
36071
|
+
}), [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
36072
|
D(() => {
|
|
36044
36073
|
if (!l) return;
|
|
36045
36074
|
let e = !1;
|
|
36046
|
-
|
|
36075
|
+
ee(!0);
|
|
36047
36076
|
let t = g ? 100 : j, n = g ? 0 : (E - 1) * j;
|
|
36048
36077
|
return JE.getVendorList({
|
|
36049
36078
|
jobId: l,
|
|
@@ -36057,7 +36086,7 @@ function XE() {
|
|
|
36057
36086
|
}).catch(() => {
|
|
36058
36087
|
e || (y([]), T(0));
|
|
36059
36088
|
}).finally(() => {
|
|
36060
|
-
e ||
|
|
36089
|
+
e || ee(!1);
|
|
36061
36090
|
}), () => {
|
|
36062
36091
|
e = !0;
|
|
36063
36092
|
};
|
|
@@ -36076,7 +36105,7 @@ function XE() {
|
|
|
36076
36105
|
cc: e.ccMail?.length ? Array.isArray(e.ccMail) ? e.ccMail.join(", ") : String(e.ccMail) : t.cc
|
|
36077
36106
|
}))).catch(() => {}).finally(() => p(!0));
|
|
36078
36107
|
}, [l]);
|
|
36079
|
-
let te = O(() =>
|
|
36108
|
+
let te = O(() => P.map((e) => v.find((t) => t.vendorId === e)?.vendorEmail ?? "").filter(Boolean), [P, v]), L = O(() => ({
|
|
36080
36109
|
...u,
|
|
36081
36110
|
bcc: [...new Set([..._w(u.bcc), ...te])].join(", "),
|
|
36082
36111
|
showBcc: u.showBcc || te.length > 0
|
|
@@ -36198,7 +36227,7 @@ function XE() {
|
|
|
36198
36227
|
pagination: !1,
|
|
36199
36228
|
size: "small",
|
|
36200
36229
|
rowSelection: {
|
|
36201
|
-
selectedRowKeys:
|
|
36230
|
+
selectedRowKeys: P,
|
|
36202
36231
|
onChange: (e) => {
|
|
36203
36232
|
e.length > qE.maxVendorSelect || I(e);
|
|
36204
36233
|
}
|
|
@@ -36229,10 +36258,10 @@ function XE() {
|
|
|
36229
36258
|
title: "Share",
|
|
36230
36259
|
hint: "Select vendors or add email addresses",
|
|
36231
36260
|
bccHint: "Vendor emails are added automatically",
|
|
36232
|
-
afterBcc:
|
|
36261
|
+
afterBcc: P.length > 0 ? /* @__PURE__ */ Q("div", {
|
|
36233
36262
|
className: "vendor-share__selected-count",
|
|
36234
36263
|
children: [
|
|
36235
|
-
|
|
36264
|
+
P.length,
|
|
36236
36265
|
" / ",
|
|
36237
36266
|
qE.maxVendorSelect,
|
|
36238
36267
|
" Vendors selected"
|
|
@@ -38917,7 +38946,7 @@ function rO() {
|
|
|
38917
38946
|
className: "admin-page",
|
|
38918
38947
|
children: [/* @__PURE__ */ Z("div", {
|
|
38919
38948
|
className: "admin-breadcrumb",
|
|
38920
|
-
children: /* @__PURE__ */ Z(
|
|
38949
|
+
children: /* @__PURE__ */ Z(P, { items: [{ title: /* @__PURE__ */ Q(X, { children: [/* @__PURE__ */ Z(ft, {}), " Home"] }) }, { title: "Admin" }] })
|
|
38921
38950
|
}), /* @__PURE__ */ Q(U, {
|
|
38922
38951
|
gutter: [16, 16],
|
|
38923
38952
|
className: "admin-wrapper",
|
|
@@ -39193,7 +39222,7 @@ function yO({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
39193
39222
|
type: "button",
|
|
39194
39223
|
className: "bulk-error-info",
|
|
39195
39224
|
"aria-label": `View ${t.length} error(s) for row ${e.id}`,
|
|
39196
|
-
children: [/* @__PURE__ */ Z(pt, {}), /* @__PURE__ */ Z(
|
|
39225
|
+
children: [/* @__PURE__ */ Z(pt, {}), /* @__PURE__ */ Z(ee, {
|
|
39197
39226
|
count: t.length,
|
|
39198
39227
|
size: "small"
|
|
39199
39228
|
})]
|
|
@@ -39228,7 +39257,7 @@ function bO() {
|
|
|
39228
39257
|
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
39258
|
value: e.modulename,
|
|
39230
39259
|
label: e.modulename
|
|
39231
|
-
})), M = gO(m), N = c === "encoding" || c === "validating",
|
|
39260
|
+
})), 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
39261
|
s(""), l("idle"), d(!1), p(null), h([]), v("all"), b(null), S(null), n.current && (n.current.value = "");
|
|
39233
39262
|
}, []);
|
|
39234
39263
|
D(() => {
|
|
@@ -39247,7 +39276,7 @@ function bO() {
|
|
|
39247
39276
|
let re = (e) => {
|
|
39248
39277
|
s(e ?? ""), h([]), S(null), b(null), p(null), w(!1), l(e ? "module_set" : "idle");
|
|
39249
39278
|
}, ie = async (e) => {
|
|
39250
|
-
if (!e || !
|
|
39279
|
+
if (!e || !ee) return;
|
|
39251
39280
|
let n = e.name.split(".").pop()?.toLowerCase();
|
|
39252
39281
|
if (!["xlsx", "csv"].includes(n)) {
|
|
39253
39282
|
l("module_set"), b({ message: "Invalid file type. Please upload an Excel .xlsx or CSV .csv file." });
|
|
@@ -39352,7 +39381,7 @@ function bO() {
|
|
|
39352
39381
|
"Validate",
|
|
39353
39382
|
"Save"
|
|
39354
39383
|
].map((e, t) => /* @__PURE__ */ Q("span", {
|
|
39355
|
-
className: t <
|
|
39384
|
+
className: t < P ? "bulk-step-active" : "",
|
|
39356
39385
|
children: [
|
|
39357
39386
|
t + 1,
|
|
39358
39387
|
" ",
|
|
@@ -39393,10 +39422,10 @@ function bO() {
|
|
|
39393
39422
|
/* @__PURE__ */ Q("button", {
|
|
39394
39423
|
type: "button",
|
|
39395
39424
|
className: oe,
|
|
39396
|
-
disabled: !
|
|
39425
|
+
disabled: !ee,
|
|
39397
39426
|
onClick: () => n.current?.click(),
|
|
39398
39427
|
onDragOver: (e) => {
|
|
39399
|
-
e.preventDefault(),
|
|
39428
|
+
e.preventDefault(), ee && d(!0);
|
|
39400
39429
|
},
|
|
39401
39430
|
onDragLeave: () => d(!1),
|
|
39402
39431
|
onDrop: (e) => {
|
|
@@ -39701,9 +39730,9 @@ function MO() {
|
|
|
39701
39730
|
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
39731
|
open: !1,
|
|
39703
39732
|
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,
|
|
39733
|
+
}), [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
39734
|
e === "module" && r(t);
|
|
39706
|
-
},
|
|
39735
|
+
}, P = async () => {
|
|
39707
39736
|
l(!0);
|
|
39708
39737
|
try {
|
|
39709
39738
|
r((await Iy(TO.module.dbName))?.items ?? []);
|
|
@@ -39745,7 +39774,7 @@ function MO() {
|
|
|
39745
39774
|
}
|
|
39746
39775
|
}, [e]);
|
|
39747
39776
|
D(() => {
|
|
39748
|
-
Promise.resolve().then(
|
|
39777
|
+
Promise.resolve().then(P);
|
|
39749
39778
|
}, []), D(() => {
|
|
39750
39779
|
Promise.resolve().then(() => te(C));
|
|
39751
39780
|
}, [te, C]), D(() => {
|
|
@@ -39816,7 +39845,7 @@ function MO() {
|
|
|
39816
39845
|
name: n,
|
|
39817
39846
|
type: x.dbName
|
|
39818
39847
|
});
|
|
39819
|
-
|
|
39848
|
+
ee(f.typeKey, r?.items ?? []), e.setFieldsValue({ [x.formField]: n }), Y.success(`${x.label} added successfully.`), oe();
|
|
39820
39849
|
} catch (e) {
|
|
39821
39850
|
if (e?.errorFields) return;
|
|
39822
39851
|
console.error("Unable to save testing option:", e), Y.error(`Unable to add ${x.label.toLowerCase()}.`);
|
|
@@ -40155,7 +40184,7 @@ function BO(e, t) {
|
|
|
40155
40184
|
})));
|
|
40156
40185
|
}
|
|
40157
40186
|
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),
|
|
40187
|
+
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
40188
|
try {
|
|
40160
40189
|
let e = await Ry();
|
|
40161
40190
|
Array.isArray(e?.options) && e.options.length > 0 && p(e.options), e?.rules && typeof e.rules == "object" && h(e.rules);
|
|
@@ -40410,9 +40439,9 @@ function VO() {
|
|
|
40410
40439
|
allowClear: !0,
|
|
40411
40440
|
showSearch: !0,
|
|
40412
40441
|
optionFilterProp: "label",
|
|
40413
|
-
disabled: !
|
|
40442
|
+
disabled: !ee,
|
|
40414
40443
|
loading: y,
|
|
40415
|
-
placeholder:
|
|
40444
|
+
placeholder: ee ? "Select submodule" : "Select module first",
|
|
40416
40445
|
options: re,
|
|
40417
40446
|
onChange: (t) => {
|
|
40418
40447
|
e.setFieldsValue({
|
|
@@ -40439,7 +40468,7 @@ function VO() {
|
|
|
40439
40468
|
name: "scenario",
|
|
40440
40469
|
valuePropName: "checked",
|
|
40441
40470
|
children: /* @__PURE__ */ Z(K, {
|
|
40442
|
-
disabled: !
|
|
40471
|
+
disabled: !P,
|
|
40443
40472
|
checkedChildren: "Positive",
|
|
40444
40473
|
unCheckedChildren: "Negative"
|
|
40445
40474
|
})
|
|
@@ -40461,7 +40490,7 @@ function VO() {
|
|
|
40461
40490
|
]
|
|
40462
40491
|
})
|
|
40463
40492
|
}),
|
|
40464
|
-
|
|
40493
|
+
P && /* @__PURE__ */ Q(I, {
|
|
40465
40494
|
className: "v1-card zt-fall",
|
|
40466
40495
|
title: /* @__PURE__ */ Q(G, {
|
|
40467
40496
|
size: 8,
|
|
@@ -40619,7 +40648,7 @@ function VO() {
|
|
|
40619
40648
|
})]
|
|
40620
40649
|
})]
|
|
40621
40650
|
}, `${j}-${M}`),
|
|
40622
|
-
|
|
40651
|
+
P && /* @__PURE__ */ Z(I, {
|
|
40623
40652
|
className: "v1-card zt-fall",
|
|
40624
40653
|
title: /* @__PURE__ */ Q(G, {
|
|
40625
40654
|
size: 6,
|
|
@@ -41379,7 +41408,7 @@ function dk() {
|
|
|
41379
41408
|
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
41409
|
open: !1,
|
|
41381
41410
|
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),
|
|
41411
|
+
}), [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
41412
|
e === "module" && r(t);
|
|
41384
41413
|
}, ae = async () => {
|
|
41385
41414
|
p(!0);
|
|
@@ -41692,8 +41721,8 @@ function dk() {
|
|
|
41692
41721
|
}],
|
|
41693
41722
|
children: /* @__PURE__ */ Z(V, {
|
|
41694
41723
|
maxLength: 255,
|
|
41695
|
-
disabled: re || !!
|
|
41696
|
-
placeholder: re ? "Select module and flow first" :
|
|
41724
|
+
disabled: re || !!ee && !ie.key,
|
|
41725
|
+
placeholder: re ? "Select module and flow first" : ee ? ie.key ? "Required — Enter selector / locator" : "Not needed for this action" : "Select an action first",
|
|
41697
41726
|
onBlur: (e) => le("target", e.target.value)
|
|
41698
41727
|
})
|
|
41699
41728
|
})
|
|
@@ -41725,8 +41754,8 @@ function dk() {
|
|
|
41725
41754
|
}],
|
|
41726
41755
|
children: /* @__PURE__ */ Z(V.TextArea, {
|
|
41727
41756
|
rows: 4,
|
|
41728
|
-
disabled: re || !!
|
|
41729
|
-
placeholder: re ? "Select module and flow first" :
|
|
41757
|
+
disabled: re || !!ee && !ie.value,
|
|
41758
|
+
placeholder: re ? "Select module and flow first" : ee ? ie.value ? "Required — Enter value" : "Not needed for this action" : "Select an action first",
|
|
41730
41759
|
onBlur: (e) => le("value", e.target.value)
|
|
41731
41760
|
})
|
|
41732
41761
|
})
|
|
@@ -41743,8 +41772,8 @@ function dk() {
|
|
|
41743
41772
|
}],
|
|
41744
41773
|
children: /* @__PURE__ */ Z(V.TextArea, {
|
|
41745
41774
|
rows: 4,
|
|
41746
|
-
disabled: re || !!
|
|
41747
|
-
placeholder: re ? "Select module and flow first" :
|
|
41775
|
+
disabled: re || !!ee && !ie.expected,
|
|
41776
|
+
placeholder: re ? "Select module and flow first" : ee ? ie.expected ? "Required — Enter expected result" : "Not needed for this action" : "Select an action first",
|
|
41748
41777
|
onBlur: (e) => le("expected", e.target.value)
|
|
41749
41778
|
})
|
|
41750
41779
|
})
|