@realtek/core-theme-live 0.0.432 → 0.0.433
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/{DocumentViewer-Dd9_2U9M.cjs → DocumentViewer-DE0kSU2d.cjs} +2 -2
- package/dist-lib/DocumentViewer-DE0kSU2d.cjs.map +1 -0
- package/dist-lib/{DocumentViewer-DSxsilzL.js → DocumentViewer-DcgKxqov.js} +46 -42
- package/dist-lib/DocumentViewer-DcgKxqov.js.map +1 -0
- package/dist-lib/LinkedRecordFileField-CYBjf1B_.cjs +5 -0
- package/dist-lib/LinkedRecordFileField-CYBjf1B_.cjs.map +1 -0
- package/dist-lib/{LinkedRecordFileField-nMBKMKyf.js → LinkedRecordFileField-U94ZO9aN.js} +910 -885
- package/dist-lib/LinkedRecordFileField-U94ZO9aN.js.map +1 -0
- package/dist-lib/index.cjs +7 -7
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +4686 -4685
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
- package/dist-lib/DocumentViewer-DSxsilzL.js.map +0 -1
- package/dist-lib/DocumentViewer-Dd9_2U9M.cjs.map +0 -1
- package/dist-lib/LinkedRecordFileField-Bnl5J16r.cjs +0 -5
- package/dist-lib/LinkedRecordFileField-Bnl5J16r.cjs.map +0 -1
- package/dist-lib/LinkedRecordFileField-nMBKMKyf.js.map +0 -1
|
@@ -3,20 +3,20 @@ import { n as c, r as l } from "./diceCandidateMapper-DqBO4EhL.js";
|
|
|
3
3
|
import { Suspense as u, createContext as d, lazy as f, useCallback as p, useContext as m, useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
|
|
4
4
|
import { Alert as ee, Breadcrumb as y, Button as b, Checkbox as x, Form as te, Modal as ne, Space as re, Spin as ie, Tooltip as ae, Typography as oe, message as S } from "antd";
|
|
5
5
|
import { DownOutlined as se, EditOutlined as ce, ExclamationCircleFilled as le, EyeOutlined as ue, FileOutlined as de, FilePdfOutlined as fe, FileTextOutlined as pe, FileWordOutlined as me, InfoCircleFilled as he, PlusOutlined as ge, UserOutlined as _e } from "@ant-design/icons";
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { Link as
|
|
11
|
-
import { EditorContent as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { Table as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
6
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
7
|
+
import E from "dayjs";
|
|
8
|
+
import ve from "dayjs/plugin/utc";
|
|
9
|
+
import ye from "dayjs/plugin/timezone";
|
|
10
|
+
import { Link as be } from "react-router-dom";
|
|
11
|
+
import { EditorContent as xe, useEditor as Se } from "@tiptap/react";
|
|
12
|
+
import Ce from "@tiptap/starter-kit";
|
|
13
|
+
import we from "@tiptap/extension-link";
|
|
14
|
+
import Te from "@tiptap/extension-underline";
|
|
15
|
+
import { Table as Ee, TableCell as De, TableHeader as Oe, TableRow as ke } from "@tiptap/extension-table";
|
|
16
|
+
import D from "prop-types";
|
|
17
|
+
import Ae from "dompurify";
|
|
18
18
|
//#region src/services/adminApi.js
|
|
19
|
-
var
|
|
19
|
+
var O = "/admin/field-config", k = [
|
|
20
20
|
{
|
|
21
21
|
key: "clients",
|
|
22
22
|
apiModule: "clients"
|
|
@@ -46,17 +46,17 @@ var D = "/admin/field-config", O = [
|
|
|
46
46
|
apiModule: "payroll"
|
|
47
47
|
}
|
|
48
48
|
];
|
|
49
|
-
function
|
|
49
|
+
function A(...e) {
|
|
50
50
|
return e.find(Array.isArray) ?? [];
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function j(e, t, n) {
|
|
53
53
|
return t.map((t) => e?.[t]).find((e) => e != null && e !== "") ?? n;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function je(e, t) {
|
|
56
56
|
return e?.total ?? e?.totalCount ?? e?.count ?? e?.recordsTotal ?? e?.meta?.total ?? e?.pagination?.total ?? t.length;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
let n =
|
|
58
|
+
function Me(e, t) {
|
|
59
|
+
let n = j(e, [
|
|
60
60
|
"label",
|
|
61
61
|
"Label",
|
|
62
62
|
"fieldName",
|
|
@@ -64,7 +64,7 @@ function Ne(e, t) {
|
|
|
64
64
|
"name",
|
|
65
65
|
"fieldLabel",
|
|
66
66
|
"value"
|
|
67
|
-
], `Field ${t + 1}`), r =
|
|
67
|
+
], `Field ${t + 1}`), r = j(e, [
|
|
68
68
|
"field",
|
|
69
69
|
"Field",
|
|
70
70
|
"fieldKey",
|
|
@@ -73,7 +73,7 @@ function Ne(e, t) {
|
|
|
73
73
|
"value",
|
|
74
74
|
"fieldName",
|
|
75
75
|
"name"
|
|
76
|
-
], n), i =
|
|
76
|
+
], n), i = j(e, [
|
|
77
77
|
"isVisible",
|
|
78
78
|
"is_visible",
|
|
79
79
|
"visible",
|
|
@@ -81,14 +81,14 @@ function Ne(e, t) {
|
|
|
81
81
|
"is_show",
|
|
82
82
|
"isShow",
|
|
83
83
|
"enabled"
|
|
84
|
-
], !0), a =
|
|
84
|
+
], !0), a = j(e, [
|
|
85
85
|
"ismandatory",
|
|
86
86
|
"isMandatory",
|
|
87
87
|
"is_mandatory",
|
|
88
88
|
"mandatory",
|
|
89
89
|
"required",
|
|
90
90
|
"req"
|
|
91
|
-
], !1), o =
|
|
91
|
+
], !1), o = j(e, [
|
|
92
92
|
"order",
|
|
93
93
|
"Order",
|
|
94
94
|
"sortOrder",
|
|
@@ -98,7 +98,7 @@ function Ne(e, t) {
|
|
|
98
98
|
...e,
|
|
99
99
|
fieldKey: r,
|
|
100
100
|
fieldName: n,
|
|
101
|
-
type:
|
|
101
|
+
type: j(e, ["type", "Type"], "text"),
|
|
102
102
|
isVisible: typeof i == "string" ? ![
|
|
103
103
|
"false",
|
|
104
104
|
"0",
|
|
@@ -150,12 +150,12 @@ function Ne(e, t) {
|
|
|
150
150
|
filterArrayValueField: e.filterArrayValueField ?? ""
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Ne(e) {
|
|
154
154
|
if (typeof e == "string") return {
|
|
155
155
|
key: e,
|
|
156
156
|
apiModule: e
|
|
157
157
|
};
|
|
158
|
-
let t =
|
|
158
|
+
let t = j(e, [
|
|
159
159
|
"key",
|
|
160
160
|
"moduleKey",
|
|
161
161
|
"value",
|
|
@@ -167,7 +167,7 @@ function Pe(e) {
|
|
|
167
167
|
], "");
|
|
168
168
|
return t ? {
|
|
169
169
|
key: t,
|
|
170
|
-
apiModule:
|
|
170
|
+
apiModule: j(e, [
|
|
171
171
|
"apiModule",
|
|
172
172
|
"api_module",
|
|
173
173
|
"module",
|
|
@@ -179,38 +179,38 @@ function Pe(e) {
|
|
|
179
179
|
], t)
|
|
180
180
|
} : null;
|
|
181
181
|
}
|
|
182
|
-
function
|
|
183
|
-
let t = Array.isArray(e) && e.length ? e :
|
|
184
|
-
return t.map(
|
|
182
|
+
function Pe(e = k) {
|
|
183
|
+
let t = Array.isArray(e) && e.length ? e : k, n = /* @__PURE__ */ new Set();
|
|
184
|
+
return t.map(Ne).filter(Boolean).filter((e) => !n.has(e.key) && (n.add(e.key), !0));
|
|
185
185
|
}
|
|
186
|
-
var
|
|
187
|
-
async function
|
|
188
|
-
let e = await a(s,
|
|
186
|
+
var Fe = "/admin/modules";
|
|
187
|
+
async function Ie() {
|
|
188
|
+
let e = await a(s, Fe), t = e?.data;
|
|
189
189
|
return Array.isArray(t) ? t : Array.isArray(e) ? e : [];
|
|
190
190
|
}
|
|
191
|
-
async function
|
|
192
|
-
let t = await a(s, `${
|
|
191
|
+
async function Le(e) {
|
|
192
|
+
let t = await a(s, `${Fe}/${encodeURIComponent(e)}/automations`), n = t?.data ?? t ?? {};
|
|
193
193
|
return {
|
|
194
194
|
gateway: n.gateway ?? null,
|
|
195
195
|
strategies: n.strategies ?? null
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
|
-
async function
|
|
198
|
+
async function Re(e) {
|
|
199
199
|
let t = await a(s, `/admin/platform/${e}`), n = t?.data ?? t;
|
|
200
200
|
return Array.isArray(n) ? n : [];
|
|
201
201
|
}
|
|
202
|
-
async function
|
|
202
|
+
async function ze(e, t) {
|
|
203
203
|
return a(s, `/admin/platform/${e}`, {
|
|
204
204
|
method: "POST",
|
|
205
205
|
headers: { "Content-Type": "application/json" },
|
|
206
206
|
body: JSON.stringify(t)
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
|
-
async function
|
|
209
|
+
async function Be(e, t) {
|
|
210
210
|
return a(s, `/admin/platform/${e}/${encodeURIComponent(t)}`, { method: "DELETE" });
|
|
211
211
|
}
|
|
212
|
-
async function
|
|
213
|
-
return a(s, `${
|
|
212
|
+
async function Ve(e, { gateway: t, strategies: n }) {
|
|
213
|
+
return a(s, `${Fe}/${encodeURIComponent(e)}/automations`, {
|
|
214
214
|
method: "PUT",
|
|
215
215
|
headers: { "Content-Type": "application/json" },
|
|
216
216
|
body: JSON.stringify({
|
|
@@ -219,7 +219,7 @@ async function He(e, { gateway: t, strategies: n }) {
|
|
|
219
219
|
})
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
|
-
async function
|
|
222
|
+
async function He() {
|
|
223
223
|
let e = [];
|
|
224
224
|
try {
|
|
225
225
|
e = await dn();
|
|
@@ -227,12 +227,12 @@ async function Ue() {
|
|
|
227
227
|
e = [];
|
|
228
228
|
}
|
|
229
229
|
let t = (Array.isArray(e) ? e : []).filter((e) => e?.isDeleted !== !0 && String(e?.status ?? "active").toLowerCase() !== "inactive" && String(e?.status ?? "active").toLowerCase() !== "disabled");
|
|
230
|
-
return t.length > 0 ? t :
|
|
230
|
+
return t.length > 0 ? t : Ie();
|
|
231
231
|
}
|
|
232
|
-
async function
|
|
232
|
+
async function Ue() {
|
|
233
233
|
let e;
|
|
234
234
|
try {
|
|
235
|
-
e = await
|
|
235
|
+
e = await Ie();
|
|
236
236
|
} catch {
|
|
237
237
|
return {};
|
|
238
238
|
}
|
|
@@ -250,25 +250,25 @@ async function We() {
|
|
|
250
250
|
}
|
|
251
251
|
return t;
|
|
252
252
|
}
|
|
253
|
-
var
|
|
254
|
-
function
|
|
253
|
+
var We = "/admin/form-groups", Ge = "/admin/config-defaults", Ke = "000000000000000000000000";
|
|
254
|
+
function qe(e) {
|
|
255
255
|
let t = String(e ?? "").trim();
|
|
256
|
-
return t === "" || t ===
|
|
256
|
+
return t === "" || t === Ke;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function Je(e = {}) {
|
|
259
259
|
let t = new URLSearchParams();
|
|
260
260
|
e.module && t.set("module", e.module), e.clientId && t.set("clientId", e.clientId), e.region && t.set("region", e.region);
|
|
261
261
|
let n = t.toString();
|
|
262
262
|
return n ? `?${n}` : "";
|
|
263
263
|
}
|
|
264
|
-
async function
|
|
265
|
-
let n = `${
|
|
264
|
+
async function Ye(e = "", t = {}) {
|
|
265
|
+
let n = `${We}${Je({
|
|
266
266
|
...t,
|
|
267
267
|
module: e || t.module || ""
|
|
268
268
|
})}`, r = await a(s, n), i = r?.data;
|
|
269
269
|
return Array.isArray(i) ? i : i && Array.isArray(i.groups) ? i.groups : Array.isArray(r) ? r : r && Array.isArray(r.groups) ? r.groups : [];
|
|
270
270
|
}
|
|
271
|
-
async function
|
|
271
|
+
async function Xe({ offset: e = 0, limit: t = 100, sortBy: n = "new", searchvalue: r = "" } = {}) {
|
|
272
272
|
let i = new URLSearchParams({
|
|
273
273
|
offset: String(e),
|
|
274
274
|
limit: String(t),
|
|
@@ -279,29 +279,29 @@ async function Ze({ offset: e = 0, limit: t = 100, sortBy: n = "new", searchvalu
|
|
|
279
279
|
let u = await a(s, `/client/view?${i.toString()}`), d = u?.data ?? u;
|
|
280
280
|
return d?.clients ?? d?.Clients ?? d?.items ?? [];
|
|
281
281
|
}
|
|
282
|
-
async function
|
|
282
|
+
async function Ze(e) {
|
|
283
283
|
let t = await a(s, `/filter-dropdown-fields?module=${encodeURIComponent(e)}`), n = t?.data ?? t;
|
|
284
284
|
return Array.isArray(n) ? n : [];
|
|
285
285
|
}
|
|
286
|
-
async function
|
|
287
|
-
return a(s, `${
|
|
286
|
+
async function Qe(e, t = {}) {
|
|
287
|
+
return a(s, `${We}${Je(t)}`, {
|
|
288
288
|
method: "POST",
|
|
289
289
|
headers: { "Content-Type": "application/json" },
|
|
290
290
|
body: JSON.stringify(e)
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
|
-
async function
|
|
294
|
-
return a(s, `${
|
|
293
|
+
async function $e(e, t, n = {}) {
|
|
294
|
+
return a(s, `${We}/${e}${Je(n)}`, {
|
|
295
295
|
method: "PUT",
|
|
296
296
|
headers: { "Content-Type": "application/json" },
|
|
297
297
|
body: JSON.stringify(t)
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
|
-
async function
|
|
301
|
-
return a(s, `${
|
|
300
|
+
async function et(e, t = {}) {
|
|
301
|
+
return a(s, `${We}/${e}${Je(t)}`, { method: "DELETE" });
|
|
302
302
|
}
|
|
303
|
-
async function
|
|
304
|
-
return a(s, `${
|
|
303
|
+
async function tt(e, t) {
|
|
304
|
+
return a(s, `${Ge}/request-otp`, {
|
|
305
305
|
method: "POST",
|
|
306
306
|
body: JSON.stringify({
|
|
307
307
|
scope: e,
|
|
@@ -309,8 +309,8 @@ async function nt(e, t) {
|
|
|
309
309
|
})
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
|
-
async function
|
|
313
|
-
return a(s, `${
|
|
312
|
+
async function nt(e, t, n) {
|
|
313
|
+
return a(s, `${Ge}/apply`, {
|
|
314
314
|
method: "POST",
|
|
315
315
|
body: JSON.stringify({
|
|
316
316
|
scope: e,
|
|
@@ -319,23 +319,23 @@ async function rt(e, t, n) {
|
|
|
319
319
|
})
|
|
320
320
|
});
|
|
321
321
|
}
|
|
322
|
-
var
|
|
323
|
-
async function
|
|
324
|
-
let n =
|
|
322
|
+
var rt = "/admin/detail-config";
|
|
323
|
+
async function it(e, t = {}) {
|
|
324
|
+
let n = Je({
|
|
325
325
|
module: e,
|
|
326
326
|
clientId: t.clientId
|
|
327
|
-
}), r = await a(s, `${
|
|
327
|
+
}), r = await a(s, `${rt}${n}`), i = r?.data ?? r ?? {};
|
|
328
328
|
return {
|
|
329
329
|
module: i.module ?? e,
|
|
330
|
-
clientId:
|
|
330
|
+
clientId: qe(i.clientId) ? "" : String(i.clientId),
|
|
331
331
|
fields: Array.isArray(i.fields) ? i.fields : [],
|
|
332
332
|
merges: Array.isArray(i.merges) ? i.merges : [],
|
|
333
333
|
sourceFields: Array.isArray(i.sourceFields) ? i.sourceFields : [],
|
|
334
334
|
groups: Array.isArray(i.groups) ? i.groups : []
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
|
-
async function
|
|
338
|
-
return a(s,
|
|
337
|
+
async function at({ module: e, fields: t = [], merges: n = [], sourceFields: r = [], groups: i = [], clientId: o = "" }) {
|
|
338
|
+
return a(s, rt, {
|
|
339
339
|
method: "POST",
|
|
340
340
|
headers: { "Content-Type": "application/json" },
|
|
341
341
|
body: JSON.stringify({
|
|
@@ -348,8 +348,8 @@ async function ot({ module: e, fields: t = [], merges: n = [], sourceFields: r =
|
|
|
348
348
|
})
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
|
-
async function
|
|
352
|
-
return a(s, `${
|
|
351
|
+
async function ot({ module: e, clientId: t = "", otp: n }) {
|
|
352
|
+
return a(s, `${rt}/discover-fields`, {
|
|
353
353
|
method: "POST",
|
|
354
354
|
headers: { "Content-Type": "application/json" },
|
|
355
355
|
body: JSON.stringify({
|
|
@@ -359,35 +359,35 @@ async function st({ module: e, clientId: t = "", otp: n }) {
|
|
|
359
359
|
})
|
|
360
360
|
});
|
|
361
361
|
}
|
|
362
|
-
var
|
|
363
|
-
async function
|
|
364
|
-
let e = await a(s,
|
|
362
|
+
var st = "/admin/detail-defaults";
|
|
363
|
+
async function ct() {
|
|
364
|
+
let e = await a(s, st);
|
|
365
365
|
return e?.data ?? e ?? {};
|
|
366
366
|
}
|
|
367
|
-
async function
|
|
368
|
-
return a(s,
|
|
367
|
+
async function lt(e) {
|
|
368
|
+
return a(s, st, {
|
|
369
369
|
method: "POST",
|
|
370
370
|
headers: { "Content-Type": "application/json" },
|
|
371
371
|
body: JSON.stringify(e)
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
|
-
var
|
|
375
|
-
async function
|
|
376
|
-
let e = await a(s,
|
|
374
|
+
var ut = "/admin/ai-service-config";
|
|
375
|
+
async function dt() {
|
|
376
|
+
let e = await a(s, ut);
|
|
377
377
|
return e?.data ?? e ?? [];
|
|
378
378
|
}
|
|
379
|
-
async function
|
|
380
|
-
return a(s,
|
|
379
|
+
async function ft(e) {
|
|
380
|
+
return a(s, ut, {
|
|
381
381
|
method: "POST",
|
|
382
382
|
headers: { "Content-Type": "application/json" },
|
|
383
383
|
body: JSON.stringify(e)
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
|
-
async function
|
|
387
|
-
return a(s, `${
|
|
386
|
+
async function pt(e) {
|
|
387
|
+
return a(s, `${ut}?serviceKey=${encodeURIComponent(e)}`, { method: "DELETE" });
|
|
388
388
|
}
|
|
389
|
-
async function
|
|
390
|
-
let r = await a(s, `${
|
|
389
|
+
async function mt({ baseUrl: e, authHeader: t, authValue: n }) {
|
|
390
|
+
let r = await a(s, `${ut}/test`, {
|
|
391
391
|
method: "POST",
|
|
392
392
|
headers: { "Content-Type": "application/json" },
|
|
393
393
|
body: JSON.stringify({
|
|
@@ -398,61 +398,61 @@ async function ht({ baseUrl: e, authHeader: t, authValue: n }) {
|
|
|
398
398
|
});
|
|
399
399
|
return r?.data ?? r;
|
|
400
400
|
}
|
|
401
|
-
var
|
|
402
|
-
async function
|
|
403
|
-
let e = await a(s,
|
|
401
|
+
var ht = "/admin/bgc-integration-config";
|
|
402
|
+
async function gt() {
|
|
403
|
+
let e = await a(s, ht);
|
|
404
404
|
return e?.data ?? e ?? {
|
|
405
405
|
updateMethod: "MANUAL",
|
|
406
406
|
enabled: !0
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
async function
|
|
410
|
-
return a(s,
|
|
409
|
+
async function _t(e) {
|
|
410
|
+
return a(s, ht, {
|
|
411
411
|
method: "PUT",
|
|
412
412
|
headers: { "Content-Type": "application/json" },
|
|
413
413
|
body: JSON.stringify(e)
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
|
-
async function
|
|
416
|
+
async function vt() {
|
|
417
417
|
let e = await a(s, "/integration-config/bgc/summary");
|
|
418
418
|
return e?.data ?? e ?? {
|
|
419
419
|
updateMethod: "MANUAL",
|
|
420
420
|
enabled: !0
|
|
421
421
|
};
|
|
422
422
|
}
|
|
423
|
-
var
|
|
424
|
-
async function
|
|
425
|
-
let e = await a(s,
|
|
423
|
+
var M = "/admin/integration-config";
|
|
424
|
+
async function yt() {
|
|
425
|
+
let e = await a(s, M);
|
|
426
426
|
return e?.data ?? e ?? [];
|
|
427
427
|
}
|
|
428
|
-
async function
|
|
429
|
-
let t = await a(s, `${
|
|
428
|
+
async function bt(e) {
|
|
429
|
+
let t = await a(s, `${M}/${encodeURIComponent(e)}`);
|
|
430
430
|
return t?.data ?? t;
|
|
431
431
|
}
|
|
432
|
-
async function
|
|
433
|
-
let t = e?.integrationKey, n = t ? `${
|
|
432
|
+
async function xt(e) {
|
|
433
|
+
let t = e?.integrationKey, n = t ? `${M}/${encodeURIComponent(t)}` : M;
|
|
434
434
|
return a(s, n, {
|
|
435
435
|
method: t ? "PUT" : "POST",
|
|
436
436
|
headers: { "Content-Type": "application/json" },
|
|
437
437
|
body: JSON.stringify(e)
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
|
-
async function
|
|
441
|
-
return a(s, `${
|
|
440
|
+
async function St(e) {
|
|
441
|
+
return a(s, `${M}/${encodeURIComponent(e)}`, { method: "DELETE" });
|
|
442
442
|
}
|
|
443
|
-
async function
|
|
444
|
-
let t = await a(s, `${
|
|
443
|
+
async function Ct(e) {
|
|
444
|
+
let t = await a(s, `${M}/test`, {
|
|
445
445
|
method: "POST",
|
|
446
446
|
headers: { "Content-Type": "application/json" },
|
|
447
447
|
body: JSON.stringify(e)
|
|
448
448
|
});
|
|
449
449
|
return t?.data ?? t;
|
|
450
450
|
}
|
|
451
|
-
async function
|
|
451
|
+
async function wt(e) {
|
|
452
452
|
let t = await a(s, `/integration-config/${encodeURIComponent(e)}/summary`);
|
|
453
453
|
return t?.data ?? t;
|
|
454
454
|
}
|
|
455
|
-
async function
|
|
455
|
+
async function Tt(e, t, n) {
|
|
456
456
|
let r = await a(s, `/integration-config/${encodeURIComponent(e)}/apply-status/${encodeURIComponent(t)}`, {
|
|
457
457
|
method: "POST",
|
|
458
458
|
headers: { "Content-Type": "application/json" },
|
|
@@ -460,7 +460,7 @@ async function Et(e, t, n) {
|
|
|
460
460
|
});
|
|
461
461
|
return r?.data ?? r;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function Et(e) {
|
|
464
464
|
return {
|
|
465
465
|
key: e.role_id ?? e.id,
|
|
466
466
|
roleId: e.role_id ?? e.id,
|
|
@@ -471,11 +471,11 @@ function Dt(e) {
|
|
|
471
471
|
raw: e
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function Dt(e) {
|
|
475
475
|
return e?.raw?.role_id ?? e?.roleId ?? e?.key;
|
|
476
476
|
}
|
|
477
477
|
async function Ot() {
|
|
478
|
-
let e = await a(s, "/get-roles"), t = e.data ?? e, n =
|
|
478
|
+
let e = await a(s, "/get-roles"), t = e.data ?? e, n = A(t?.zinnext_default).map(Et), r = A(t?.custom_roles).map(Et), i = [...n, ...r];
|
|
479
479
|
return {
|
|
480
480
|
roles: i,
|
|
481
481
|
total: i.length
|
|
@@ -489,8 +489,8 @@ function kt(e) {
|
|
|
489
489
|
manager: e.reportingManager ?? "N/A",
|
|
490
490
|
managerId: e.reportingManagerId ?? 0,
|
|
491
491
|
memberCount: e.noOfTeamMembers ?? 0,
|
|
492
|
-
members:
|
|
493
|
-
memberIds:
|
|
492
|
+
members: A(e.teamMembers),
|
|
493
|
+
memberIds: A(e.teamMembersIds),
|
|
494
494
|
raw: e
|
|
495
495
|
};
|
|
496
496
|
}
|
|
@@ -503,7 +503,7 @@ async function jt({ offset: e = 0, limit: t = 10, sortBy: n = "new", search: r =
|
|
|
503
503
|
sortBy: n,
|
|
504
504
|
limit: String(t),
|
|
505
505
|
offset: String(e)
|
|
506
|
-
}), o = await a(s, `/get-teams?${i}`), c = o.data ?? o, l =
|
|
506
|
+
}), o = await a(s, `/get-teams?${i}`), c = o.data ?? o, l = A(c?.teams, c, o?.teams), u = c?.totalCount ?? c?.total ?? l.length;
|
|
507
507
|
return {
|
|
508
508
|
teams: l.map(kt),
|
|
509
509
|
total: u
|
|
@@ -529,28 +529,28 @@ async function Nt(e, t, n, r = "listView", i = !1) {
|
|
|
529
529
|
configType: r
|
|
530
530
|
});
|
|
531
531
|
i && (!r || r === "listView") && o.set("includeMeta", "1");
|
|
532
|
-
let c = await a(s, `${
|
|
532
|
+
let c = await a(s, `${O}?${o}`), l = c.data ?? c, u = A(l, l?.visibleFields, c?.visibleFields);
|
|
533
533
|
return i ? {
|
|
534
534
|
fields: u,
|
|
535
535
|
dataVisibilityMode: l?.dataVisibilityMode ?? c?.dataVisibilityMode ?? "all",
|
|
536
536
|
dataOwnerField: l?.dataOwnerField ?? c?.dataOwnerField ?? "createdBy"
|
|
537
537
|
} : u;
|
|
538
538
|
}
|
|
539
|
-
async function Pt(e, t = "listView", n =
|
|
540
|
-
let r =
|
|
541
|
-
...
|
|
539
|
+
async function Pt(e, t = "listView", n = k) {
|
|
540
|
+
let r = Dt(e), i = Pe(n), a = await Promise.all(i.map(async ({ key: e, apiModule: n }) => [e, (await Nt(n, "roleId", r, t)).map((t, i) => ({
|
|
541
|
+
...Me(t, i),
|
|
542
542
|
module: e,
|
|
543
543
|
apiModule: n,
|
|
544
544
|
roleId: r
|
|
545
545
|
}))]));
|
|
546
546
|
return Object.fromEntries(a);
|
|
547
547
|
}
|
|
548
|
-
async function Ft(e, t = "listView", n =
|
|
549
|
-
let r =
|
|
548
|
+
async function Ft(e, t = "listView", n = k) {
|
|
549
|
+
let r = Dt(e), i = Pe(n), a = await Promise.all(i.map(async ({ key: e, apiModule: n }) => {
|
|
550
550
|
let i = await Nt(n, "roleId", r, t, !0);
|
|
551
551
|
return [e, {
|
|
552
552
|
fields: i.fields.map((t, i) => ({
|
|
553
|
-
...
|
|
553
|
+
...Me(t, i),
|
|
554
554
|
module: e,
|
|
555
555
|
apiModule: n,
|
|
556
556
|
roleId: r
|
|
@@ -562,8 +562,8 @@ async function Ft(e, t = "listView", n = O) {
|
|
|
562
562
|
return Object.fromEntries(a);
|
|
563
563
|
}
|
|
564
564
|
async function It(e, t = "listView") {
|
|
565
|
-
let n = At(e), r = await Promise.all(
|
|
566
|
-
...
|
|
565
|
+
let n = At(e), r = await Promise.all(k.map(async ({ key: e, apiModule: r }) => [e, (await Nt(r, "teamId", n, t)).map((t, i) => ({
|
|
566
|
+
...Me(t, i),
|
|
567
567
|
module: e,
|
|
568
568
|
apiModule: r,
|
|
569
569
|
teamId: n
|
|
@@ -623,9 +623,9 @@ function Rt(e, t) {
|
|
|
623
623
|
].includes(e.type) && (i.dataSource = e.dataSource ?? "module", e.dataSource === "group" && (i.groupName = e.groupName ?? ""))), i;
|
|
624
624
|
});
|
|
625
625
|
}
|
|
626
|
-
async function zt(e, t, n, r = "listView", i =
|
|
627
|
-
let u =
|
|
628
|
-
return a(s, `${
|
|
626
|
+
async function zt(e, t, n, r = "listView", i = k, o = "", c = "createdBy", l = !1) {
|
|
627
|
+
let u = Dt(e), d = Pe(i).find((e) => e.key === t)?.apiModule ?? t;
|
|
628
|
+
return a(s, `${O}/role`, {
|
|
629
629
|
method: "PUT",
|
|
630
630
|
body: JSON.stringify({
|
|
631
631
|
module: d,
|
|
@@ -645,7 +645,7 @@ function Vt(e) {
|
|
|
645
645
|
return `__group__:${e}`;
|
|
646
646
|
}
|
|
647
647
|
async function Ht(e, t, n = {}) {
|
|
648
|
-
let r =
|
|
648
|
+
let r = Dt(e), i = new URLSearchParams({
|
|
649
649
|
module: t,
|
|
650
650
|
roleId: String(r ?? "")
|
|
651
651
|
});
|
|
@@ -654,7 +654,7 @@ async function Ht(e, t, n = {}) {
|
|
|
654
654
|
return Array.isArray(c) ? c : [];
|
|
655
655
|
}
|
|
656
656
|
async function Ut(e, t, n) {
|
|
657
|
-
let r =
|
|
657
|
+
let r = Dt(e), i = [], o = 0;
|
|
658
658
|
for (let e of n) {
|
|
659
659
|
e.locked || i.push({
|
|
660
660
|
label: e.label,
|
|
@@ -671,7 +671,7 @@ async function Ut(e, t, n) {
|
|
|
671
671
|
order: o++
|
|
672
672
|
});
|
|
673
673
|
}
|
|
674
|
-
return a(s, `${
|
|
674
|
+
return a(s, `${O}/role`, {
|
|
675
675
|
method: "PUT",
|
|
676
676
|
body: JSON.stringify({
|
|
677
677
|
module: t,
|
|
@@ -682,8 +682,8 @@ async function Ut(e, t, n) {
|
|
|
682
682
|
});
|
|
683
683
|
}
|
|
684
684
|
async function Wt(e, t, n, r = "listView") {
|
|
685
|
-
let i = At(e), o =
|
|
686
|
-
return a(s, `${
|
|
685
|
+
let i = At(e), o = k.find((e) => e.key === t)?.apiModule ?? t;
|
|
686
|
+
return a(s, `${O}/team`, {
|
|
687
687
|
method: "PUT",
|
|
688
688
|
body: JSON.stringify({
|
|
689
689
|
module: o,
|
|
@@ -700,24 +700,24 @@ async function Gt({ offset: e = 0, limit: t = 10, sortBy: n = "new", searchQuery
|
|
|
700
700
|
sortBy: n
|
|
701
701
|
});
|
|
702
702
|
r && i.set("searchquery", r);
|
|
703
|
-
let o = await a(s, `/get-all-users?${i}`), c = o.data ?? o, l =
|
|
703
|
+
let o = await a(s, `/get-all-users?${i}`), c = o.data ?? o, l = A(c, o.users, o.rows, o.items, o.records, c?.users, c?.data, c?.rows, c?.items, c?.records, c?.docs, c?.result, c?.results);
|
|
704
704
|
return {
|
|
705
705
|
users: l,
|
|
706
|
-
total:
|
|
706
|
+
total: je({
|
|
707
707
|
...o,
|
|
708
708
|
...c
|
|
709
709
|
}, l)
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
712
|
async function Kt(e = []) {
|
|
713
|
-
return a(s, `${
|
|
713
|
+
return a(s, `${O}/seed`, {
|
|
714
714
|
method: "POST",
|
|
715
715
|
headers: { "Content-Type": "application/json" },
|
|
716
716
|
body: JSON.stringify({ collections: e })
|
|
717
717
|
});
|
|
718
718
|
}
|
|
719
719
|
async function qt() {
|
|
720
|
-
let e = await a(s, `${
|
|
720
|
+
let e = await a(s, `${O}/seed-status`), t = e?.data ?? e ?? {};
|
|
721
721
|
return {
|
|
722
722
|
modules: Array.isArray(t.modules) ? t.modules : [],
|
|
723
723
|
seededModules: t.seededModules ?? {}
|
|
@@ -740,7 +740,7 @@ async function Jt(e) {
|
|
|
740
740
|
}
|
|
741
741
|
async function Yt() {
|
|
742
742
|
let [e, t, n] = await Promise.all([
|
|
743
|
-
|
|
743
|
+
He().catch(() => []),
|
|
744
744
|
cn().catch(() => []),
|
|
745
745
|
An().catch(() => [])
|
|
746
746
|
]), r = Array.isArray(e) ? e : [], i = n.map((e) => String(e?.module ?? "").trim()).filter(Boolean);
|
|
@@ -876,7 +876,7 @@ async function un(e, t) {
|
|
|
876
876
|
}
|
|
877
877
|
async function dn() {
|
|
878
878
|
let e = await a(s, "/admin/menu-modules");
|
|
879
|
-
return
|
|
879
|
+
return A(e.data, e);
|
|
880
880
|
}
|
|
881
881
|
async function fn({ menuName: e, apiUrl: t = "", menuType: n = "menu", parentMenuId: r = 0, displayOrder: i = 0 }) {
|
|
882
882
|
let o = await a(s, "/admin/menu-modules", {
|
|
@@ -904,7 +904,7 @@ async function mn(e) {
|
|
|
904
904
|
}
|
|
905
905
|
async function hn() {
|
|
906
906
|
let e = await a(s, "/admin/menu-actions");
|
|
907
|
-
return
|
|
907
|
+
return A(e.data, e);
|
|
908
908
|
}
|
|
909
909
|
async function gn({ permissionName: e, permissionKey: t }) {
|
|
910
910
|
let n = await a(s, "/admin/menu-actions", {
|
|
@@ -1198,13 +1198,13 @@ function tr(e) {
|
|
|
1198
1198
|
return i ? t[i] : void 0;
|
|
1199
1199
|
}
|
|
1200
1200
|
function nr(e = !1) {
|
|
1201
|
-
return Gn && !e || (Gn = Promise.resolve().then(() =>
|
|
1201
|
+
return Gn && !e || (Gn = Promise.resolve().then(() => ct()).then((e) => Qn(e)).catch(() => N)), Gn;
|
|
1202
1202
|
}
|
|
1203
|
-
|
|
1203
|
+
E.extend(ve), E.extend(ye);
|
|
1204
1204
|
var rr = null;
|
|
1205
1205
|
function ir() {
|
|
1206
1206
|
if (rr === null) try {
|
|
1207
|
-
rr =
|
|
1207
|
+
rr = E.tz.guess() || "UTC";
|
|
1208
1208
|
} catch {
|
|
1209
1209
|
rr = "UTC";
|
|
1210
1210
|
}
|
|
@@ -1224,10 +1224,10 @@ function F(e = P()) {
|
|
|
1224
1224
|
return ar(t) ? t : ir();
|
|
1225
1225
|
}
|
|
1226
1226
|
function or(e) {
|
|
1227
|
-
return
|
|
1227
|
+
return E().tz(F(e));
|
|
1228
1228
|
}
|
|
1229
1229
|
function sr(e, t) {
|
|
1230
|
-
let n =
|
|
1230
|
+
let n = E(e?.$date ?? e);
|
|
1231
1231
|
return n.isValid() ? n.tz(F(t)) : n;
|
|
1232
1232
|
}
|
|
1233
1233
|
function cr(e, t, n = P()) {
|
|
@@ -1244,7 +1244,7 @@ function lr(e = P(), t) {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
function ur(e, t) {
|
|
1246
1246
|
try {
|
|
1247
|
-
let n = t === void 0 ? /* @__PURE__ */ new Date() : new Date(
|
|
1247
|
+
let n = t === void 0 ? /* @__PURE__ */ new Date() : new Date(E(t?.$date ?? t).valueOf());
|
|
1248
1248
|
if (Number.isNaN(n.valueOf())) return "";
|
|
1249
1249
|
let r = new Intl.DateTimeFormat("en-US", {
|
|
1250
1250
|
timeZone: e,
|
|
@@ -1271,14 +1271,14 @@ function fr(e) {
|
|
|
1271
1271
|
}
|
|
1272
1272
|
function pr(e, t) {
|
|
1273
1273
|
if (e == null || e === "") return null;
|
|
1274
|
-
let n =
|
|
1274
|
+
let n = E(e);
|
|
1275
1275
|
if (!n.isValid()) return null;
|
|
1276
1276
|
let r = F(t);
|
|
1277
|
-
return
|
|
1277
|
+
return E.tz(n.format("YYYY-MM-DDTHH:mm:ss"), r);
|
|
1278
1278
|
}
|
|
1279
1279
|
function mr(e = F()) {
|
|
1280
1280
|
try {
|
|
1281
|
-
let t =
|
|
1281
|
+
let t = E().tz(e).utcOffset(), n = t < 0 ? "-" : "+", r = Math.abs(t);
|
|
1282
1282
|
return `UTC${n}${String(Math.floor(r / 60)).padStart(2, "0")}:${String(r % 60).padStart(2, "0")}`;
|
|
1283
1283
|
} catch {
|
|
1284
1284
|
return "";
|
|
@@ -1321,7 +1321,7 @@ function vr(e = P()) {
|
|
|
1321
1321
|
return [.../* @__PURE__ */ new Set([...n, ...t])].filter(ar).map((t) => {
|
|
1322
1322
|
let n = 0;
|
|
1323
1323
|
try {
|
|
1324
|
-
n =
|
|
1324
|
+
n = E().tz(t).utcOffset();
|
|
1325
1325
|
} catch {
|
|
1326
1326
|
return null;
|
|
1327
1327
|
}
|
|
@@ -1559,7 +1559,7 @@ function Mr({ as: e, tag: t, variant: n = "body", color: r, size: i, weight: a,
|
|
|
1559
1559
|
display: l,
|
|
1560
1560
|
...d
|
|
1561
1561
|
};
|
|
1562
|
-
return /* @__PURE__ */
|
|
1562
|
+
return /* @__PURE__ */ w(h, {
|
|
1563
1563
|
...g ? { level: g } : {},
|
|
1564
1564
|
className: Or("app-typography", `app-typography--${n}`, r && Dr[r] && `app-typography--${r}`, s && `app-typography--${s}`, c && "app-typography--truncate", u),
|
|
1565
1565
|
style: _,
|
|
@@ -1604,7 +1604,7 @@ var Nr = (e = "") => e.trim().replace(/^\*\*(.*?)\*\*$/s, "$1").replace(/^__(.*?
|
|
|
1604
1604
|
return r.create(null, c);
|
|
1605
1605
|
};
|
|
1606
1606
|
function R({ onClick: e, active: t, disabled: n, title: r, children: i }) {
|
|
1607
|
-
return /* @__PURE__ */
|
|
1607
|
+
return /* @__PURE__ */ w("button", {
|
|
1608
1608
|
type: "button",
|
|
1609
1609
|
title: r,
|
|
1610
1610
|
disabled: n,
|
|
@@ -1616,55 +1616,55 @@ function R({ onClick: e, active: t, disabled: n, title: r, children: i }) {
|
|
|
1616
1616
|
});
|
|
1617
1617
|
}
|
|
1618
1618
|
function Lr({ editor: e, disabled: t }) {
|
|
1619
|
-
return e ? /* @__PURE__ */
|
|
1619
|
+
return e ? /* @__PURE__ */ T("div", {
|
|
1620
1620
|
className: `tte-toolbar${t ? " tte-toolbar--disabled" : ""}`,
|
|
1621
1621
|
children: [
|
|
1622
|
-
/* @__PURE__ */
|
|
1622
|
+
/* @__PURE__ */ T("div", {
|
|
1623
1623
|
className: "tte-toolbar-group",
|
|
1624
1624
|
children: [
|
|
1625
|
-
/* @__PURE__ */
|
|
1625
|
+
/* @__PURE__ */ w(R, {
|
|
1626
1626
|
title: "Bold",
|
|
1627
1627
|
disabled: t,
|
|
1628
1628
|
active: e.isActive("bold"),
|
|
1629
1629
|
onClick: () => e.chain().focus().toggleBold().run(),
|
|
1630
|
-
children: /* @__PURE__ */
|
|
1630
|
+
children: /* @__PURE__ */ w("strong", { children: "B" })
|
|
1631
1631
|
}),
|
|
1632
|
-
/* @__PURE__ */
|
|
1632
|
+
/* @__PURE__ */ w(R, {
|
|
1633
1633
|
title: "Italic",
|
|
1634
1634
|
disabled: t,
|
|
1635
1635
|
active: e.isActive("italic"),
|
|
1636
1636
|
onClick: () => e.chain().focus().toggleItalic().run(),
|
|
1637
|
-
children: /* @__PURE__ */
|
|
1637
|
+
children: /* @__PURE__ */ w("em", { children: "I" })
|
|
1638
1638
|
}),
|
|
1639
|
-
/* @__PURE__ */
|
|
1639
|
+
/* @__PURE__ */ w(R, {
|
|
1640
1640
|
title: "Underline",
|
|
1641
1641
|
disabled: t,
|
|
1642
1642
|
active: e.isActive("underline"),
|
|
1643
1643
|
onClick: () => e.chain().focus().toggleUnderline().run(),
|
|
1644
|
-
children: /* @__PURE__ */
|
|
1644
|
+
children: /* @__PURE__ */ w("span", {
|
|
1645
1645
|
style: { textDecoration: "underline" },
|
|
1646
1646
|
children: "U"
|
|
1647
1647
|
})
|
|
1648
1648
|
}),
|
|
1649
|
-
/* @__PURE__ */
|
|
1649
|
+
/* @__PURE__ */ w(R, {
|
|
1650
1650
|
title: "Strikethrough",
|
|
1651
1651
|
disabled: t,
|
|
1652
1652
|
active: e.isActive("strike"),
|
|
1653
1653
|
onClick: () => e.chain().focus().toggleStrike().run(),
|
|
1654
|
-
children: /* @__PURE__ */
|
|
1654
|
+
children: /* @__PURE__ */ w("s", { children: "S" })
|
|
1655
1655
|
})
|
|
1656
1656
|
]
|
|
1657
1657
|
}),
|
|
1658
|
-
/* @__PURE__ */
|
|
1659
|
-
/* @__PURE__ */
|
|
1658
|
+
/* @__PURE__ */ w("div", { className: "tte-toolbar-divider" }),
|
|
1659
|
+
/* @__PURE__ */ T("div", {
|
|
1660
1660
|
className: "tte-toolbar-group",
|
|
1661
|
-
children: [/* @__PURE__ */
|
|
1661
|
+
children: [/* @__PURE__ */ w(R, {
|
|
1662
1662
|
title: "Bullet List",
|
|
1663
1663
|
disabled: t,
|
|
1664
1664
|
active: e.isActive("bulletList"),
|
|
1665
1665
|
onClick: () => e.chain().focus().toggleBulletList().run(),
|
|
1666
1666
|
children: "≡"
|
|
1667
|
-
}), /* @__PURE__ */
|
|
1667
|
+
}), /* @__PURE__ */ w(R, {
|
|
1668
1668
|
title: "Ordered List",
|
|
1669
1669
|
disabled: t,
|
|
1670
1670
|
active: e.isActive("orderedList"),
|
|
@@ -1672,10 +1672,10 @@ function Lr({ editor: e, disabled: t }) {
|
|
|
1672
1672
|
children: "1."
|
|
1673
1673
|
})]
|
|
1674
1674
|
}),
|
|
1675
|
-
/* @__PURE__ */
|
|
1676
|
-
/* @__PURE__ */
|
|
1675
|
+
/* @__PURE__ */ w("div", { className: "tte-toolbar-divider" }),
|
|
1676
|
+
/* @__PURE__ */ w("div", {
|
|
1677
1677
|
className: "tte-toolbar-group",
|
|
1678
|
-
children: /* @__PURE__ */
|
|
1678
|
+
children: /* @__PURE__ */ w(R, {
|
|
1679
1679
|
title: "Link",
|
|
1680
1680
|
disabled: t,
|
|
1681
1681
|
active: e.isActive("link"),
|
|
@@ -1690,10 +1690,10 @@ function Lr({ editor: e, disabled: t }) {
|
|
|
1690
1690
|
children: "🔗"
|
|
1691
1691
|
})
|
|
1692
1692
|
}),
|
|
1693
|
-
/* @__PURE__ */
|
|
1694
|
-
/* @__PURE__ */
|
|
1693
|
+
/* @__PURE__ */ w("div", { className: "tte-toolbar-divider" }),
|
|
1694
|
+
/* @__PURE__ */ T("div", {
|
|
1695
1695
|
className: "tte-toolbar-group tte-table-tools",
|
|
1696
|
-
children: [/* @__PURE__ */
|
|
1696
|
+
children: [/* @__PURE__ */ w(R, {
|
|
1697
1697
|
title: "Insert 3 × 3 table",
|
|
1698
1698
|
disabled: t,
|
|
1699
1699
|
active: e.isActive("table"),
|
|
@@ -1703,38 +1703,38 @@ function Lr({ editor: e, disabled: t }) {
|
|
|
1703
1703
|
withHeaderRow: !0
|
|
1704
1704
|
}).run(),
|
|
1705
1705
|
children: "▦"
|
|
1706
|
-
}), e.isActive("table") && /* @__PURE__ */
|
|
1707
|
-
/* @__PURE__ */
|
|
1706
|
+
}), e.isActive("table") && /* @__PURE__ */ T(C, { children: [
|
|
1707
|
+
/* @__PURE__ */ w(R, {
|
|
1708
1708
|
title: "Add column",
|
|
1709
1709
|
disabled: t || !e.can().addColumnAfter(),
|
|
1710
1710
|
onClick: () => e.chain().focus().addColumnAfter().run(),
|
|
1711
1711
|
children: "C+"
|
|
1712
1712
|
}),
|
|
1713
|
-
/* @__PURE__ */
|
|
1713
|
+
/* @__PURE__ */ w(R, {
|
|
1714
1714
|
title: "Delete column",
|
|
1715
1715
|
disabled: t || !e.can().deleteColumn(),
|
|
1716
1716
|
onClick: () => e.chain().focus().deleteColumn().run(),
|
|
1717
1717
|
children: "C−"
|
|
1718
1718
|
}),
|
|
1719
|
-
/* @__PURE__ */
|
|
1719
|
+
/* @__PURE__ */ w(R, {
|
|
1720
1720
|
title: "Add row",
|
|
1721
1721
|
disabled: t || !e.can().addRowAfter(),
|
|
1722
1722
|
onClick: () => e.chain().focus().addRowAfter().run(),
|
|
1723
1723
|
children: "R+"
|
|
1724
1724
|
}),
|
|
1725
|
-
/* @__PURE__ */
|
|
1725
|
+
/* @__PURE__ */ w(R, {
|
|
1726
1726
|
title: "Delete row",
|
|
1727
1727
|
disabled: t || !e.can().deleteRow(),
|
|
1728
1728
|
onClick: () => e.chain().focus().deleteRow().run(),
|
|
1729
1729
|
children: "R−"
|
|
1730
1730
|
}),
|
|
1731
|
-
/* @__PURE__ */
|
|
1731
|
+
/* @__PURE__ */ w(R, {
|
|
1732
1732
|
title: "Toggle header row",
|
|
1733
1733
|
disabled: t || !e.can().toggleHeaderRow(),
|
|
1734
1734
|
onClick: () => e.chain().focus().toggleHeaderRow().run(),
|
|
1735
1735
|
children: "H"
|
|
1736
1736
|
}),
|
|
1737
|
-
/* @__PURE__ */
|
|
1737
|
+
/* @__PURE__ */ w(R, {
|
|
1738
1738
|
title: "Delete table",
|
|
1739
1739
|
disabled: t || !e.can().deleteTable(),
|
|
1740
1740
|
onClick: () => e.chain().focus().deleteTable().run(),
|
|
@@ -1742,10 +1742,10 @@ function Lr({ editor: e, disabled: t }) {
|
|
|
1742
1742
|
})
|
|
1743
1743
|
] })]
|
|
1744
1744
|
}),
|
|
1745
|
-
/* @__PURE__ */
|
|
1746
|
-
/* @__PURE__ */
|
|
1745
|
+
/* @__PURE__ */ w("div", { className: "tte-toolbar-divider" }),
|
|
1746
|
+
/* @__PURE__ */ w("div", {
|
|
1747
1747
|
className: "tte-toolbar-group",
|
|
1748
|
-
children: /* @__PURE__ */
|
|
1748
|
+
children: /* @__PURE__ */ w(R, {
|
|
1749
1749
|
title: "Clear formatting",
|
|
1750
1750
|
disabled: t,
|
|
1751
1751
|
onClick: () => e.chain().focus().clearNodes().unsetAllMarks().run(),
|
|
@@ -1756,21 +1756,21 @@ function Lr({ editor: e, disabled: t }) {
|
|
|
1756
1756
|
}) : null;
|
|
1757
1757
|
}
|
|
1758
1758
|
function Rr({ value: e = "", onChange: t, disabled: n = !1, placeholder: r = "" }) {
|
|
1759
|
-
let i = _(e ?? ""), a =
|
|
1759
|
+
let i = _(e ?? ""), a = Se({
|
|
1760
1760
|
extensions: [
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1761
|
+
Ce,
|
|
1762
|
+
Te,
|
|
1763
|
+
we.configure({
|
|
1764
1764
|
openOnClick: !1,
|
|
1765
1765
|
HTMLAttributes: { rel: "noopener noreferrer" }
|
|
1766
1766
|
}),
|
|
1767
|
-
|
|
1767
|
+
Ee.configure({
|
|
1768
1768
|
resizable: !0,
|
|
1769
1769
|
HTMLAttributes: { class: "email-template-table" }
|
|
1770
1770
|
}),
|
|
1771
|
-
Ae,
|
|
1772
1771
|
ke,
|
|
1773
|
-
Oe
|
|
1772
|
+
Oe,
|
|
1773
|
+
De
|
|
1774
1774
|
],
|
|
1775
1775
|
content: e,
|
|
1776
1776
|
editable: !n,
|
|
@@ -1797,15 +1797,15 @@ function Rr({ value: e = "", onChange: t, disabled: n = !1, placeholder: r = ""
|
|
|
1797
1797
|
t !== (i.current || "") && (i.current = t, a.commands.setContent(t, !1));
|
|
1798
1798
|
}, [e, a]), h(() => {
|
|
1799
1799
|
a && a.setEditable(!n);
|
|
1800
|
-
}, [n, a]), /* @__PURE__ */
|
|
1800
|
+
}, [n, a]), /* @__PURE__ */ T("div", {
|
|
1801
1801
|
className: `tte-wrapper${n ? " tte-wrapper--disabled" : ""}`,
|
|
1802
1802
|
children: [
|
|
1803
|
-
/* @__PURE__ */
|
|
1803
|
+
/* @__PURE__ */ w(Lr, {
|
|
1804
1804
|
editor: a,
|
|
1805
1805
|
disabled: n
|
|
1806
1806
|
}),
|
|
1807
|
-
/* @__PURE__ */
|
|
1808
|
-
!e && !a?.isFocused && r && /* @__PURE__ */
|
|
1807
|
+
/* @__PURE__ */ w(xe, { editor: a }),
|
|
1808
|
+
!e && !a?.isFocused && r && /* @__PURE__ */ w("div", {
|
|
1809
1809
|
className: "tte-placeholder",
|
|
1810
1810
|
children: r
|
|
1811
1811
|
})
|
|
@@ -2270,7 +2270,7 @@ function Ai(e) {
|
|
|
2270
2270
|
return t = ki(t).replace(/\\x([0-9a-f]{2})/gi, (e, t) => String.fromCharCode(Number.parseInt(t, 16))).replace(/\\u([0-9a-f]{4})/gi, (e, t) => String.fromCharCode(Number.parseInt(t, 16))), t.normalize("NFC");
|
|
2271
2271
|
}
|
|
2272
2272
|
function ji(e) {
|
|
2273
|
-
return
|
|
2273
|
+
return Ae.sanitize(String(e ?? ""), {
|
|
2274
2274
|
ALLOWED_TAGS: xi,
|
|
2275
2275
|
ALLOWED_ATTR: Si,
|
|
2276
2276
|
ALLOW_DATA_ATTR: !1,
|
|
@@ -2441,6 +2441,7 @@ function $i(e = {}) {
|
|
|
2441
2441
|
let t = e?.defaultValue;
|
|
2442
2442
|
if (t === void 0 || t === "") return;
|
|
2443
2443
|
if (e?.type === "time") return na(t);
|
|
2444
|
+
if (e?.type === "date") return aa(t);
|
|
2444
2445
|
if (e?.type !== "checkbox") return t;
|
|
2445
2446
|
let n = Array.isArray(e.options) ? e.options : [];
|
|
2446
2447
|
if (!n.length) return t;
|
|
@@ -2450,7 +2451,7 @@ function $i(e = {}) {
|
|
|
2450
2451
|
var ea = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s*([ap]\.?\s?m\.?)?$/i, ta = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}/;
|
|
2451
2452
|
function na(e) {
|
|
2452
2453
|
if (e == null || e === "") return;
|
|
2453
|
-
if (
|
|
2454
|
+
if (E.isDayjs(e)) return e.isValid() ? e : void 0;
|
|
2454
2455
|
if (typeof e != "string") return;
|
|
2455
2456
|
let t = e.trim(), n = t.match(ea);
|
|
2456
2457
|
if (n) {
|
|
@@ -2459,29 +2460,48 @@ function na(e) {
|
|
|
2459
2460
|
if (e < 1 || e > 12) return;
|
|
2460
2461
|
e = e % 12 + (i === "pm" ? 12 : 0);
|
|
2461
2462
|
}
|
|
2462
|
-
return e > 23 || t > 59 || r > 59 ? void 0 :
|
|
2463
|
+
return e > 23 || t > 59 || r > 59 ? void 0 : E().hour(e).minute(t).second(r).millisecond(0);
|
|
2463
2464
|
}
|
|
2464
2465
|
if (ta.test(t)) {
|
|
2465
|
-
let e =
|
|
2466
|
+
let e = E(t);
|
|
2467
|
+
return e.isValid() ? e : void 0;
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
var ra = /^today\s*(?:([+-])\s*(\d{1,4}))?$/i, ia = /^\d{4}-\d{2}-\d{2}(?:[T ].*)?$/;
|
|
2471
|
+
function aa(e, t = E()) {
|
|
2472
|
+
if (e == null || e === "") return;
|
|
2473
|
+
if (E.isDayjs(e)) return e.isValid() ? e : void 0;
|
|
2474
|
+
if (e instanceof Date) {
|
|
2475
|
+
let t = E(e);
|
|
2476
|
+
return t.isValid() ? t : void 0;
|
|
2477
|
+
}
|
|
2478
|
+
if (typeof e != "string") return;
|
|
2479
|
+
let n = e.trim(), r = n.match(ra);
|
|
2480
|
+
if (r) {
|
|
2481
|
+
let e = r[2] ? Number(r[2]) * (r[1] === "-" ? -1 : 1) : 0;
|
|
2482
|
+
return E(t).startOf("day").add(e, "day");
|
|
2483
|
+
}
|
|
2484
|
+
if (ia.test(n)) {
|
|
2485
|
+
let e = E(n);
|
|
2466
2486
|
return e.isValid() ? e : void 0;
|
|
2467
2487
|
}
|
|
2468
2488
|
}
|
|
2469
2489
|
//#endregion
|
|
2470
2490
|
//#region src/components/form/payloadTransformer.js
|
|
2471
|
-
var z = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0,
|
|
2472
|
-
function
|
|
2491
|
+
var z = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0, oa = (e) => e === !0 || e === 1 || e === "1", B = (e) => typeof e == "object" && !!e && !Array.isArray(e) && !sa(e);
|
|
2492
|
+
function sa(e) {
|
|
2473
2493
|
return e && typeof e == "object" && typeof e.format == "function" && typeof e.isValid == "function";
|
|
2474
2494
|
}
|
|
2475
|
-
function
|
|
2476
|
-
return
|
|
2495
|
+
function ca(e) {
|
|
2496
|
+
return sa(e) || e instanceof Date;
|
|
2477
2497
|
}
|
|
2478
|
-
function
|
|
2479
|
-
return e instanceof Date ? e.toISOString() :
|
|
2498
|
+
function la(e) {
|
|
2499
|
+
return e instanceof Date ? e.toISOString() : sa(e) ? e.isValid() ? e.toISOString() : null : e;
|
|
2480
2500
|
}
|
|
2481
|
-
function
|
|
2482
|
-
if (!fr(t)) return
|
|
2501
|
+
function ua(e, t) {
|
|
2502
|
+
if (!fr(t)) return la(e);
|
|
2483
2503
|
let n = pr(e);
|
|
2484
|
-
return n ? n.toISOString() :
|
|
2504
|
+
return n ? n.toISOString() : la(e);
|
|
2485
2505
|
}
|
|
2486
2506
|
function V(e, t) {
|
|
2487
2507
|
if (!t) return;
|
|
@@ -2506,7 +2526,7 @@ function W(e, t, n) {
|
|
|
2506
2526
|
}
|
|
2507
2527
|
return i[r[r.length - 1]] = n, e;
|
|
2508
2528
|
}
|
|
2509
|
-
function
|
|
2529
|
+
function da(e, t, n) {
|
|
2510
2530
|
let r = String(t).split("."), i = e;
|
|
2511
2531
|
for (let e = 0; e < r.length - 1; e += 1) {
|
|
2512
2532
|
let t = r[e];
|
|
@@ -2518,24 +2538,24 @@ function ca(e, t, n) {
|
|
|
2518
2538
|
...i[a]
|
|
2519
2539
|
} : n, e;
|
|
2520
2540
|
}
|
|
2521
|
-
function
|
|
2541
|
+
function fa(e) {
|
|
2522
2542
|
let t = Array.isArray(e) ? e : e == null ? [] : [e];
|
|
2523
2543
|
if (!t.length || t.some((e) => e?.originFileObj)) return;
|
|
2524
2544
|
let n = t.map((e) => e?.stored).filter((e) => e != null);
|
|
2525
2545
|
if (n.length) return n.length === 1 && t.length === 1 ? n[0] : n;
|
|
2526
2546
|
}
|
|
2527
|
-
function
|
|
2547
|
+
function pa(e, t) {
|
|
2528
2548
|
return Object.entries(t ?? {}).forEach(([t, n]) => {
|
|
2529
|
-
B(n) && B(e[t]) ?
|
|
2549
|
+
B(n) && B(e[t]) ? pa(e[t], n) : e[t] = n;
|
|
2530
2550
|
}), e;
|
|
2531
2551
|
}
|
|
2532
|
-
function
|
|
2552
|
+
function ma(e, t) {
|
|
2533
2553
|
let n = e.options ?? e.values ?? [];
|
|
2534
2554
|
for (let e of n) if (typeof e == "string") {
|
|
2535
2555
|
if (e === t) return e;
|
|
2536
2556
|
} else if ((e.value ?? e.id ?? e.name ?? e.label) === t) return e.label ?? e.name ?? e.value;
|
|
2537
2557
|
}
|
|
2538
|
-
function
|
|
2558
|
+
function ha(e, t) {
|
|
2539
2559
|
if (B(e)) {
|
|
2540
2560
|
let n = (t.valueKey && e[t.valueKey]) ?? e.value ?? e.id ?? e._id ?? e.key ?? e.code;
|
|
2541
2561
|
return {
|
|
@@ -2545,10 +2565,10 @@ function fa(e, t) {
|
|
|
2545
2565
|
}
|
|
2546
2566
|
return {
|
|
2547
2567
|
value: e,
|
|
2548
|
-
label:
|
|
2568
|
+
label: ma(t, e) ?? e
|
|
2549
2569
|
};
|
|
2550
2570
|
}
|
|
2551
|
-
function
|
|
2571
|
+
function ga(e = {}) {
|
|
2552
2572
|
if (e.dataType && e.dataType !== "auto") return e.dataType;
|
|
2553
2573
|
if (e.multiSelect || e.mode === "multiple" || e.addRow) return "array";
|
|
2554
2574
|
switch (e.type) {
|
|
@@ -2559,13 +2579,13 @@ function pa(e = {}) {
|
|
|
2559
2579
|
}
|
|
2560
2580
|
}
|
|
2561
2581
|
function G(e, t, n = {}) {
|
|
2562
|
-
if (
|
|
2563
|
-
if (t === "string") return
|
|
2582
|
+
if (ca(e)) {
|
|
2583
|
+
if (t === "string") return ua(e, n);
|
|
2564
2584
|
if (t === "number") {
|
|
2565
|
-
let t =
|
|
2585
|
+
let t = sa(e) ? e.valueOf() : e.getTime();
|
|
2566
2586
|
return Number.isNaN(t) ? null : t;
|
|
2567
2587
|
}
|
|
2568
|
-
if (t === "date" || t === "auto" || !t) return
|
|
2588
|
+
if (t === "date" || t === "auto" || !t) return ua(e, n);
|
|
2569
2589
|
}
|
|
2570
2590
|
switch (t) {
|
|
2571
2591
|
case "string": return e == null ? "" : String(e);
|
|
@@ -2580,14 +2600,14 @@ function G(e, t, n = {}) {
|
|
|
2580
2600
|
return t = Array.isArray(e) ? e : z(e) ? [] : typeof e == "string" && e.includes(",") ? e.split(",").map((e) => e.trim()).filter(Boolean) : [e], n.elementType ? t.map((e) => G(e, n.elementType, {})).filter((e) => e != null && e !== "") : t;
|
|
2581
2601
|
}
|
|
2582
2602
|
case "object": return B(e), e;
|
|
2583
|
-
case "date": return
|
|
2603
|
+
case "date": return ua(e, n);
|
|
2584
2604
|
case "custom":
|
|
2585
2605
|
case "auto":
|
|
2586
2606
|
case void 0:
|
|
2587
2607
|
default: return e;
|
|
2588
2608
|
}
|
|
2589
2609
|
}
|
|
2590
|
-
var
|
|
2610
|
+
var _a = {
|
|
2591
2611
|
firstChecked: (e) => Array.isArray(e) ? e[0] : e,
|
|
2592
2612
|
csvToArray: (e) => typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : e,
|
|
2593
2613
|
arrayToCsv: (e) => Array.isArray(e) ? e.join(",") : e,
|
|
@@ -2595,11 +2615,11 @@ var ma = {
|
|
|
2595
2615
|
upper: (e) => typeof e == "string" ? e.toUpperCase() : e,
|
|
2596
2616
|
lower: (e) => typeof e == "string" ? e.toLowerCase() : e
|
|
2597
2617
|
};
|
|
2598
|
-
function
|
|
2618
|
+
function va(e, t) {
|
|
2599
2619
|
if (!t) return e;
|
|
2600
2620
|
let n = t;
|
|
2601
2621
|
if (typeof n == "string") {
|
|
2602
|
-
if (
|
|
2622
|
+
if (_a[n]) return _a[n](e);
|
|
2603
2623
|
try {
|
|
2604
2624
|
n = JSON.parse(n);
|
|
2605
2625
|
} catch {
|
|
@@ -2607,14 +2627,14 @@ function ha(e, t) {
|
|
|
2607
2627
|
}
|
|
2608
2628
|
}
|
|
2609
2629
|
let r = e;
|
|
2610
|
-
if (n.name &&
|
|
2630
|
+
if (n.name && _a[n.name] && (r = _a[n.name](r)), n.map && typeof n.map == "object") {
|
|
2611
2631
|
let e = String(Array.isArray(r) ? r[0] : r);
|
|
2612
2632
|
Object.prototype.hasOwnProperty.call(n.map, e) ? r = n.map[e] : n.default !== void 0 && (r = n.default);
|
|
2613
2633
|
}
|
|
2614
2634
|
return r;
|
|
2615
2635
|
}
|
|
2616
|
-
var
|
|
2617
|
-
function
|
|
2636
|
+
var ya = /\{\{\s*([\w.]+)\s*\}\}/g;
|
|
2637
|
+
function ba(e, t) {
|
|
2618
2638
|
let [n, ...r] = e.split("."), i;
|
|
2619
2639
|
if (n === "value") i = t.value;
|
|
2620
2640
|
else if (n === "label") i = t.label;
|
|
@@ -2622,24 +2642,24 @@ function _a(e, t) {
|
|
|
2622
2642
|
else return;
|
|
2623
2643
|
return r.length ? V(i, r.join(".")) : i;
|
|
2624
2644
|
}
|
|
2625
|
-
function
|
|
2645
|
+
function xa(e, t) {
|
|
2626
2646
|
if (typeof e == "string") {
|
|
2627
2647
|
let n = e.match(/^\{\{\s*([\w.]+)\s*\}\}$/);
|
|
2628
|
-
return n ?
|
|
2629
|
-
let r =
|
|
2648
|
+
return n ? ba(n[1], t) : e.replace(ya, (e, n) => {
|
|
2649
|
+
let r = ba(n, t);
|
|
2630
2650
|
return r == null ? "" : String(r);
|
|
2631
2651
|
});
|
|
2632
2652
|
}
|
|
2633
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
2653
|
+
if (Array.isArray(e)) return e.map((e) => xa(e, t));
|
|
2634
2654
|
if (B(e)) {
|
|
2635
2655
|
let n = {};
|
|
2636
2656
|
return Object.entries(e).forEach(([e, r]) => {
|
|
2637
|
-
n[e] =
|
|
2657
|
+
n[e] = xa(r, t);
|
|
2638
2658
|
}), n;
|
|
2639
2659
|
}
|
|
2640
2660
|
return e;
|
|
2641
2661
|
}
|
|
2642
|
-
function
|
|
2662
|
+
function Sa(e) {
|
|
2643
2663
|
if (!e) return null;
|
|
2644
2664
|
if (typeof e == "string") try {
|
|
2645
2665
|
return JSON.parse(e);
|
|
@@ -2648,8 +2668,8 @@ function ya(e) {
|
|
|
2648
2668
|
}
|
|
2649
2669
|
return e;
|
|
2650
2670
|
}
|
|
2651
|
-
function
|
|
2652
|
-
let n = e.payloadMode || "auto", r =
|
|
2671
|
+
function Ca(e, t) {
|
|
2672
|
+
let n = e.payloadMode || "auto", r = ga(e), { value: i, label: a } = ha(t, e);
|
|
2653
2673
|
switch (n) {
|
|
2654
2674
|
case "value": return {
|
|
2655
2675
|
kind: "scalar",
|
|
@@ -2671,12 +2691,12 @@ function ba(e, t) {
|
|
|
2671
2691
|
}
|
|
2672
2692
|
case "custom":
|
|
2673
2693
|
case "template": {
|
|
2674
|
-
let n =
|
|
2694
|
+
let n = Sa(e.payloadTemplate);
|
|
2675
2695
|
if (!n) return {
|
|
2676
2696
|
kind: "scalar",
|
|
2677
2697
|
out: G(i, r, e)
|
|
2678
2698
|
};
|
|
2679
|
-
let o =
|
|
2699
|
+
let o = xa(n, {
|
|
2680
2700
|
value: G(i, e.elementType || "auto", {}),
|
|
2681
2701
|
label: a,
|
|
2682
2702
|
raw: t
|
|
@@ -2692,23 +2712,23 @@ function ba(e, t) {
|
|
|
2692
2712
|
};
|
|
2693
2713
|
}
|
|
2694
2714
|
}
|
|
2695
|
-
function
|
|
2715
|
+
function wa(e = {}) {
|
|
2696
2716
|
let t = e.defaultValue;
|
|
2697
|
-
if (t !== void 0 && t !== "") return e.type === "time" ? na(t) : t;
|
|
2717
|
+
if (t !== void 0 && t !== "") return e.type === "time" ? na(t) : e.type === "date" ? aa(t) : t;
|
|
2698
2718
|
}
|
|
2699
|
-
function
|
|
2719
|
+
function Ta(e, t) {
|
|
2700
2720
|
if (e.payloadMode === "skip") return { kind: "skip" };
|
|
2701
2721
|
let n = t;
|
|
2702
2722
|
if (z(n)) {
|
|
2703
|
-
let t =
|
|
2723
|
+
let t = wa(e);
|
|
2704
2724
|
t !== void 0 && (n = t);
|
|
2705
2725
|
}
|
|
2706
|
-
return n =
|
|
2726
|
+
return n = va(n, e.transformRule), z(n) && e.omitEmpty ? { kind: "skip" } : Array.isArray(n) && (ga(e) === "array" || e.payloadMode === "object") && e.payloadMode && e.payloadMode !== "value" && e.payloadMode !== "auto" ? {
|
|
2707
2727
|
kind: "scalar",
|
|
2708
|
-
out: n.map((t) =>
|
|
2709
|
-
} :
|
|
2728
|
+
out: n.map((t) => Ca(e, t).out)
|
|
2729
|
+
} : Ca(e, n);
|
|
2710
2730
|
}
|
|
2711
|
-
function
|
|
2731
|
+
function Ea(e = {}) {
|
|
2712
2732
|
return !!e.richValue || [
|
|
2713
2733
|
"label",
|
|
2714
2734
|
"object",
|
|
@@ -2716,8 +2736,8 @@ function Ca(e = {}) {
|
|
|
2716
2736
|
"template"
|
|
2717
2737
|
].includes(e.payloadMode);
|
|
2718
2738
|
}
|
|
2719
|
-
function
|
|
2720
|
-
if (!
|
|
2739
|
+
function Da(e, t, n = []) {
|
|
2740
|
+
if (!Ea(e) || t == null) return t;
|
|
2721
2741
|
let r = (e) => {
|
|
2722
2742
|
if (B(e) && e.value !== void 0) return e;
|
|
2723
2743
|
let t = n.find((t) => String(t?.value ?? "") === String(e) || String(t?.label ?? "") === String(e));
|
|
@@ -2728,7 +2748,7 @@ function wa(e, t, n = []) {
|
|
|
2728
2748
|
};
|
|
2729
2749
|
return Array.isArray(t) ? t.map(r) : r(t);
|
|
2730
2750
|
}
|
|
2731
|
-
function
|
|
2751
|
+
function Oa(e, t, n) {
|
|
2732
2752
|
if (!e?.field) return !0;
|
|
2733
2753
|
let r = U(t, e.field) ? H(t, e.field) : H(n ?? t, e.field), i = () => String(e.value ?? "").split(",").map((e) => e.trim());
|
|
2734
2754
|
switch (e.operator) {
|
|
@@ -2742,39 +2762,39 @@ function Ta(e, t, n) {
|
|
|
2742
2762
|
default: return !0;
|
|
2743
2763
|
}
|
|
2744
2764
|
}
|
|
2745
|
-
function
|
|
2765
|
+
function ka(e) {
|
|
2746
2766
|
let t = [];
|
|
2747
2767
|
return e?.field && t.push(e.field), Array.isArray(e?.conditions) && e.conditions.forEach((e) => {
|
|
2748
2768
|
e?.field && t.push(e.field);
|
|
2749
2769
|
}), t;
|
|
2750
2770
|
}
|
|
2751
|
-
function
|
|
2771
|
+
function Aa(e, t, n) {
|
|
2752
2772
|
if (!e) return !0;
|
|
2753
2773
|
let r = Array.isArray(e.conditions) ? e.conditions.filter((e) => e?.field) : [];
|
|
2754
2774
|
if (r.length) {
|
|
2755
|
-
let i = r.map((e) =>
|
|
2775
|
+
let i = r.map((e) => Oa(e, t, n)), a = String(e.logic ?? "and").toLowerCase() === "or", o = a ? i.some(Boolean) : i.every(Boolean);
|
|
2756
2776
|
if (e.field) {
|
|
2757
|
-
let r =
|
|
2777
|
+
let r = Oa(e, t, n);
|
|
2758
2778
|
o = a ? o || r : o && r;
|
|
2759
2779
|
}
|
|
2760
2780
|
return o;
|
|
2761
2781
|
}
|
|
2762
|
-
return
|
|
2782
|
+
return Oa(e, t, n);
|
|
2763
2783
|
}
|
|
2764
|
-
function
|
|
2765
|
-
let a =
|
|
2766
|
-
return !a.length || i.has(e.field) ? !0 : (i.add(e.field),
|
|
2784
|
+
function ja(e, t, n, r, i = /* @__PURE__ */ new Set()) {
|
|
2785
|
+
let a = ka(e?.showIf);
|
|
2786
|
+
return !a.length || i.has(e.field) ? !0 : (i.add(e.field), Aa(e.showIf, t, n) ? a.every((e) => {
|
|
2767
2787
|
let a = r?.get?.(e);
|
|
2768
|
-
return !a ||
|
|
2788
|
+
return !a || ja(a, t, n, r, i);
|
|
2769
2789
|
}) : !1);
|
|
2770
2790
|
}
|
|
2771
|
-
function
|
|
2791
|
+
function Ma(e = []) {
|
|
2772
2792
|
let t = /* @__PURE__ */ new Map();
|
|
2773
2793
|
return e.forEach((e) => (e.fields ?? []).forEach((e) => {
|
|
2774
2794
|
e?.field && !t.has(e.field) && t.set(e.field, e);
|
|
2775
2795
|
})), t;
|
|
2776
2796
|
}
|
|
2777
|
-
function
|
|
2797
|
+
function Na(e = {}, { editing: t = !1 } = {}) {
|
|
2778
2798
|
let n = {};
|
|
2779
2799
|
return (e.fields ?? []).forEach((e) => {
|
|
2780
2800
|
if (!(!e.field || K(e)) && !(t && !e.defaultOnEdit) && e.defaultValue !== void 0 && e.defaultValue !== "") {
|
|
@@ -2783,11 +2803,16 @@ function Aa(e = {}, { editing: t = !1 } = {}) {
|
|
|
2783
2803
|
t !== void 0 && (n[e.field] = t);
|
|
2784
2804
|
return;
|
|
2785
2805
|
}
|
|
2806
|
+
if (e.type === "date") {
|
|
2807
|
+
let t = aa(e.defaultValue);
|
|
2808
|
+
t !== void 0 && (n[e.field] = t);
|
|
2809
|
+
return;
|
|
2810
|
+
}
|
|
2786
2811
|
n[e.field] = e.defaultValue;
|
|
2787
2812
|
}
|
|
2788
2813
|
}), n;
|
|
2789
2814
|
}
|
|
2790
|
-
function
|
|
2815
|
+
function Pa(e = []) {
|
|
2791
2816
|
let t = [];
|
|
2792
2817
|
return e.forEach((e) => {
|
|
2793
2818
|
(e.fields ?? []).forEach((n) => {
|
|
@@ -2798,7 +2823,7 @@ function ja(e = []) {
|
|
|
2798
2823
|
});
|
|
2799
2824
|
}), t;
|
|
2800
2825
|
}
|
|
2801
|
-
var
|
|
2826
|
+
var Fa = [
|
|
2802
2827
|
"file",
|
|
2803
2828
|
"document",
|
|
2804
2829
|
"image",
|
|
@@ -2806,19 +2831,19 @@ var Ma = [
|
|
|
2806
2831
|
"attachment"
|
|
2807
2832
|
];
|
|
2808
2833
|
function K(e) {
|
|
2809
|
-
return
|
|
2834
|
+
return Fa.includes(String(e?.type ?? "").trim().toLowerCase());
|
|
2810
2835
|
}
|
|
2811
|
-
function
|
|
2812
|
-
return
|
|
2836
|
+
function Ia(e = []) {
|
|
2837
|
+
return Pa(e).map(({ field: e }) => e).filter(K);
|
|
2813
2838
|
}
|
|
2814
|
-
function
|
|
2839
|
+
function La(e) {
|
|
2815
2840
|
return String(e ?? "").trim().toLowerCase();
|
|
2816
2841
|
}
|
|
2817
|
-
function
|
|
2818
|
-
return !!t &&
|
|
2842
|
+
function Ra(e, t) {
|
|
2843
|
+
return !!t && La(e.moduleName) === t;
|
|
2819
2844
|
}
|
|
2820
|
-
function
|
|
2821
|
-
let r = [], i = n.scope ?? "all", a =
|
|
2845
|
+
function za(e, t = [], n = {}) {
|
|
2846
|
+
let r = [], i = n.scope ?? "all", a = La(n.module), o = (e, t) => {
|
|
2822
2847
|
t != null && (Array.isArray(t) ? t : [t]).forEach((t) => {
|
|
2823
2848
|
let n = t?.originFileObj || t;
|
|
2824
2849
|
(typeof File < "u" && n instanceof File || typeof Blob < "u" && n instanceof Blob) && r.push({
|
|
@@ -2830,7 +2855,7 @@ function Ia(e, t = [], n = {}) {
|
|
|
2830
2855
|
return (t ?? []).forEach((t) => {
|
|
2831
2856
|
let r = (t.fields ?? []).filter(K);
|
|
2832
2857
|
if (!r.length) return;
|
|
2833
|
-
let s = t.moduleName && !
|
|
2858
|
+
let s = t.moduleName && !Ra(t, a), c = (e) => s ? `__mw__${t.moduleName}__${e}` : e;
|
|
2834
2859
|
if (t.addRow) {
|
|
2835
2860
|
if (i === "flat") return;
|
|
2836
2861
|
let a = e[t.name];
|
|
@@ -2850,12 +2875,12 @@ function Ia(e, t = [], n = {}) {
|
|
|
2850
2875
|
});
|
|
2851
2876
|
}), r;
|
|
2852
2877
|
}
|
|
2853
|
-
function
|
|
2878
|
+
function Ba(e, t, n = {}) {
|
|
2854
2879
|
let r = B(n.base) ? structuredClone(n.base) : {};
|
|
2855
|
-
|
|
2856
|
-
(e.payloadKey || e.field) && (
|
|
2880
|
+
Ia(t).forEach((e) => {
|
|
2881
|
+
(e.payloadKey || e.field) && (Ua(r, e.payloadKey || e.field), Ua(r, e.field));
|
|
2857
2882
|
});
|
|
2858
|
-
let i =
|
|
2883
|
+
let i = La(n.module), a = Ma(t), o = /* @__PURE__ */ new Map(), s = (e) => !e.moduleName || Ra(e, i) ? r : (o.has(e.moduleName) || o.set(e.moduleName, {}), o.get(e.moduleName));
|
|
2859
2884
|
return (t ?? []).forEach((t) => {
|
|
2860
2885
|
let n = s(t), r = t.fields ?? [], i = t.toggleEnabled && t.toggleField && U(e, t.toggleField) ? !!H(e, t.toggleField) : !1;
|
|
2861
2886
|
if (t.toggleEnabled && t.toggleField && U(e, t.toggleField) && (W(n, t.toggleField, i), i && t.addRow)) {
|
|
@@ -2865,29 +2890,29 @@ function La(e, t, n = {}) {
|
|
|
2865
2890
|
if (t.addRow) {
|
|
2866
2891
|
let i = e[t.name];
|
|
2867
2892
|
if (!Array.isArray(i)) return;
|
|
2868
|
-
W(n, t.payloadKey || t.name, i.map((t) =>
|
|
2893
|
+
W(n, t.payloadKey || t.name, i.map((t) => Ha(r, t, e, a)).filter((e) => e && Object.keys(e).length > 0));
|
|
2869
2894
|
return;
|
|
2870
2895
|
}
|
|
2871
|
-
r.forEach((t) =>
|
|
2896
|
+
r.forEach((t) => Va(t, e, n, e, a));
|
|
2872
2897
|
}), o.size > 0 && (r.moduleWrites = Array.from(o, ([e, t]) => ({
|
|
2873
2898
|
moduleName: e,
|
|
2874
2899
|
data: t
|
|
2875
2900
|
}))), Ri(r, t);
|
|
2876
2901
|
}
|
|
2877
|
-
function
|
|
2902
|
+
function Va(e, t, n, r, i) {
|
|
2878
2903
|
if (Bi(e) && Ui(e)) {
|
|
2879
2904
|
let r = Vi(e);
|
|
2880
2905
|
U(t, r) && W(n, r, !!H(t, r));
|
|
2881
2906
|
}
|
|
2882
2907
|
if (K(e)) {
|
|
2883
|
-
let i =
|
|
2908
|
+
let i = fa(H(t, e.field));
|
|
2884
2909
|
if (i !== void 0) {
|
|
2885
2910
|
let a = r !== void 0 && r !== t;
|
|
2886
|
-
|
|
2911
|
+
da(n, e.payloadKey || (a ? e.field : e.fileKey || e.field), i);
|
|
2887
2912
|
}
|
|
2888
2913
|
return;
|
|
2889
2914
|
}
|
|
2890
|
-
if (
|
|
2915
|
+
if (ka(e.showIf).length && !ja(e, t, r, i)) {
|
|
2891
2916
|
(r === void 0 || r === t) && U(t, e.field) && W(n, e.payloadKey || e.field, null);
|
|
2892
2917
|
return;
|
|
2893
2918
|
}
|
|
@@ -2895,30 +2920,30 @@ function Ra(e, t, n, r, i) {
|
|
|
2895
2920
|
if (!U(t, e.field)) return;
|
|
2896
2921
|
let a = H(t, e.field);
|
|
2897
2922
|
if (!Array.isArray(a)) return;
|
|
2898
|
-
let o = a.map((t) =>
|
|
2923
|
+
let o = a.map((t) => Ha(e.subFields, t, r, i)).filter((e) => e && Object.keys(e).length > 0);
|
|
2899
2924
|
W(n, e.payloadKey || e.field, o);
|
|
2900
2925
|
return;
|
|
2901
2926
|
}
|
|
2902
2927
|
if (!U(t, e.field)) return;
|
|
2903
|
-
if (
|
|
2904
|
-
let r = H(t, e.field), i = Array.isArray(r) ? r : z(r) ? [] : [r], a =
|
|
2928
|
+
if (oa(e.addRow) && (!Array.isArray(e.subFields) || e.subFields.length === 0)) {
|
|
2929
|
+
let r = H(t, e.field), i = Array.isArray(r) ? r : z(r) ? [] : [r], a = Ga(e), o = i.map((e) => Ta(a, e)).filter((e) => e.kind !== "skip").map((e) => e.out);
|
|
2905
2930
|
W(n, e.payloadKey || e.field, o);
|
|
2906
2931
|
return;
|
|
2907
2932
|
}
|
|
2908
|
-
let a =
|
|
2933
|
+
let a = Ta(e, H(t, e.field));
|
|
2909
2934
|
if (a.kind !== "skip") {
|
|
2910
2935
|
if (a.kind === "spread" && B(a.out)) {
|
|
2911
|
-
|
|
2936
|
+
pa(n, a.out);
|
|
2912
2937
|
return;
|
|
2913
2938
|
}
|
|
2914
2939
|
W(n, e.payloadKey || e.field, a.out);
|
|
2915
2940
|
}
|
|
2916
2941
|
}
|
|
2917
|
-
function
|
|
2942
|
+
function Ha(e, t, n, r) {
|
|
2918
2943
|
let i = {};
|
|
2919
|
-
return e.forEach((e) =>
|
|
2944
|
+
return e.forEach((e) => Va(e, t, i, n ?? t, r)), i;
|
|
2920
2945
|
}
|
|
2921
|
-
function
|
|
2946
|
+
function Ua(e, t) {
|
|
2922
2947
|
let n = String(t).split("."), r = e;
|
|
2923
2948
|
for (let e = 0; e < n.length - 1; e += 1) {
|
|
2924
2949
|
if (!B(r[n[e]])) return;
|
|
@@ -2926,7 +2951,7 @@ function Ba(e, t) {
|
|
|
2926
2951
|
}
|
|
2927
2952
|
delete r[n[n.length - 1]];
|
|
2928
2953
|
}
|
|
2929
|
-
var
|
|
2954
|
+
var Wa = /* @__PURE__ */ new Set([
|
|
2930
2955
|
"text",
|
|
2931
2956
|
"textarea",
|
|
2932
2957
|
"email",
|
|
@@ -2939,21 +2964,21 @@ var Va = /* @__PURE__ */ new Set([
|
|
|
2939
2964
|
"password"
|
|
2940
2965
|
]);
|
|
2941
2966
|
function q(e, t) {
|
|
2942
|
-
let n = (t) => (Array.isArray(e.emptyValues) ? e.emptyValues : []).some((e) => String(e) === String(t)), r = () => e.defaultOnEdit ?
|
|
2967
|
+
let n = (t) => (Array.isArray(e.emptyValues) ? e.emptyValues : []).some((e) => String(e) === String(t)), r = () => e.defaultOnEdit ? wa(e) : void 0;
|
|
2943
2968
|
if (t == null) return r() ?? t;
|
|
2944
2969
|
if (n(t) || z(t) && r() !== void 0) return r();
|
|
2945
|
-
if (
|
|
2970
|
+
if (Wa.has(e.type) && B(t)) {
|
|
2946
2971
|
let n = String(e.payloadKey || e.field || "").split(".").pop(), r = n ? t[n] : void 0;
|
|
2947
2972
|
if (r === void 0 || B(r)) return;
|
|
2948
2973
|
t = r;
|
|
2949
2974
|
}
|
|
2950
2975
|
if (e.type === "date" || e.type === "time") {
|
|
2951
2976
|
if (!t || t === "0001-01-01T00:00:00Z") return null;
|
|
2952
|
-
let e =
|
|
2977
|
+
let e = E(t);
|
|
2953
2978
|
return e.isValid() ? e : null;
|
|
2954
2979
|
}
|
|
2955
2980
|
t = Qi(e, t);
|
|
2956
|
-
let i = (t) => B(t) ? (e.valueKey && t[e.valueKey]) ?? t.id ?? t._id ?? t.value ?? t.userId ?? t.recruiterId : t, a = e.type !== "radio" &&
|
|
2981
|
+
let i = (t) => B(t) ? (e.valueKey && t[e.valueKey]) ?? t.id ?? t._id ?? t.value ?? t.userId ?? t.recruiterId : t, a = e.type !== "radio" && ga(e) === "array", o = (t) => {
|
|
2957
2982
|
if (t == null || t === "" || !Array.isArray(e.options)) return t;
|
|
2958
2983
|
let n = e.options.find((e) => String(e?.value ?? "").toLowerCase() === String(t).toLowerCase());
|
|
2959
2984
|
return n ? n.value : t;
|
|
@@ -2965,7 +2990,7 @@ function q(e, t) {
|
|
|
2965
2990
|
}
|
|
2966
2991
|
return t;
|
|
2967
2992
|
}
|
|
2968
|
-
function
|
|
2993
|
+
function Ga(e = {}) {
|
|
2969
2994
|
return {
|
|
2970
2995
|
...e,
|
|
2971
2996
|
addRow: !1,
|
|
@@ -2974,7 +2999,7 @@ function Ha(e = {}) {
|
|
|
2974
2999
|
dataType: void 0
|
|
2975
3000
|
};
|
|
2976
3001
|
}
|
|
2977
|
-
function
|
|
3002
|
+
function Ka(e, t) {
|
|
2978
3003
|
let n = Math.max(0, Number(e.minRows ?? 0) || 0), r = e.initialRows !== void 0 && e.initialRows !== "" ? Math.max(n, Math.max(0, Number(e.initialRows) || 0)) : n;
|
|
2979
3004
|
if (Array.isArray(e.subFields) && e.subFields.length > 0) {
|
|
2980
3005
|
let i = [];
|
|
@@ -2990,7 +3015,7 @@ function Ua(e, t) {
|
|
|
2990
3015
|
for (; i.length < a;) i.push({});
|
|
2991
3016
|
return i;
|
|
2992
3017
|
}
|
|
2993
|
-
let i =
|
|
3018
|
+
let i = Ga(e), a = [];
|
|
2994
3019
|
if (Array.isArray(t)) a = t.map((e) => q(i, e)).filter((e) => e != null && e !== "");
|
|
2995
3020
|
else if (t != null && t !== "") {
|
|
2996
3021
|
let e = q(i, t);
|
|
@@ -3002,12 +3027,12 @@ function Ua(e, t) {
|
|
|
3002
3027
|
}
|
|
3003
3028
|
//#endregion
|
|
3004
3029
|
//#region src/components/form/linkedAddRowGroups.js
|
|
3005
|
-
var
|
|
3006
|
-
function
|
|
3030
|
+
var qa = (e) => e === !0 || e === 1 || e === "1";
|
|
3031
|
+
function Ja(e = []) {
|
|
3007
3032
|
let t = /* @__PURE__ */ new Map();
|
|
3008
3033
|
e.forEach((e) => {
|
|
3009
3034
|
let n = e?.linkGroup;
|
|
3010
|
-
!
|
|
3035
|
+
!qa(e?.addRow) || !n || (t.has(n) || t.set(n, []), t.get(n).push(e.name));
|
|
3011
3036
|
});
|
|
3012
3037
|
let n = /* @__PURE__ */ new Map();
|
|
3013
3038
|
return t.forEach((e, t) => {
|
|
@@ -3017,11 +3042,11 @@ function Ga(e = []) {
|
|
|
3017
3042
|
});
|
|
3018
3043
|
}), n;
|
|
3019
3044
|
}
|
|
3020
|
-
function
|
|
3045
|
+
function Ya(e, t) {
|
|
3021
3046
|
for (let n of e.values()) if (n.memberNames.includes(t)) return n;
|
|
3022
3047
|
return null;
|
|
3023
3048
|
}
|
|
3024
|
-
function
|
|
3049
|
+
function Xa(e, t = {}) {
|
|
3025
3050
|
let n = { ...t };
|
|
3026
3051
|
return e.forEach(({ memberNames: e }) => {
|
|
3027
3052
|
let t = Math.max(...e.map((e) => (n[e] ?? []).length));
|
|
@@ -3033,7 +3058,7 @@ function qa(e, t = {}) {
|
|
|
3033
3058
|
}
|
|
3034
3059
|
//#endregion
|
|
3035
3060
|
//#region src/components/form/formDecisionDialog.jsx
|
|
3036
|
-
var
|
|
3061
|
+
var Za = {
|
|
3037
3062
|
duplicate: {
|
|
3038
3063
|
className: "fdd-tone-amber",
|
|
3039
3064
|
Icon: _e
|
|
@@ -3051,14 +3076,14 @@ var Ja = {
|
|
|
3051
3076
|
Icon: pe
|
|
3052
3077
|
}
|
|
3053
3078
|
};
|
|
3054
|
-
function
|
|
3055
|
-
let { className: l, Icon: u } =
|
|
3079
|
+
function Qa({ tone: e = "suggestion", title: t, body: n, facts: r = [], okText: i = "Continue", cancelText: a = "Cancel", danger: o = !1, footnote: s, altText: c } = {}) {
|
|
3080
|
+
let { className: l, Icon: u } = Za[e] ?? Za.suggestion, d = r.filter((e) => e && e.value !== void 0 && e.value !== null && String(e.value).trim() !== "");
|
|
3056
3081
|
return new Promise((e) => {
|
|
3057
3082
|
let r = !1, f = (t) => {
|
|
3058
3083
|
r || (r = !0, e(t));
|
|
3059
3084
|
}, p = ne.confirm({
|
|
3060
|
-
...c ? { footer: (e, { OkBtn: t, CancelBtn: n }) => /* @__PURE__ */
|
|
3061
|
-
/* @__PURE__ */
|
|
3085
|
+
...c ? { footer: (e, { OkBtn: t, CancelBtn: n }) => /* @__PURE__ */ T(C, { children: [
|
|
3086
|
+
/* @__PURE__ */ w(b, {
|
|
3062
3087
|
size: "large",
|
|
3063
3088
|
className: "fdd-alt-btn",
|
|
3064
3089
|
onClick: () => {
|
|
@@ -3066,8 +3091,8 @@ function Ya({ tone: e = "suggestion", title: t, body: n, facts: r = [], okText:
|
|
|
3066
3091
|
},
|
|
3067
3092
|
children: c
|
|
3068
3093
|
}),
|
|
3069
|
-
/* @__PURE__ */
|
|
3070
|
-
/* @__PURE__ */
|
|
3094
|
+
/* @__PURE__ */ w(n, {}),
|
|
3095
|
+
/* @__PURE__ */ w(t, {})
|
|
3071
3096
|
] }) } : {},
|
|
3072
3097
|
icon: null,
|
|
3073
3098
|
centered: !0,
|
|
@@ -3080,32 +3105,32 @@ function Ya({ tone: e = "suggestion", title: t, body: n, facts: r = [], okText:
|
|
|
3080
3105
|
size: "large"
|
|
3081
3106
|
},
|
|
3082
3107
|
cancelButtonProps: { size: "large" },
|
|
3083
|
-
content: /* @__PURE__ */
|
|
3108
|
+
content: /* @__PURE__ */ T("div", {
|
|
3084
3109
|
className: "fdd",
|
|
3085
3110
|
children: [
|
|
3086
|
-
/* @__PURE__ */
|
|
3111
|
+
/* @__PURE__ */ T("div", {
|
|
3087
3112
|
className: "fdd-head",
|
|
3088
|
-
children: [/* @__PURE__ */
|
|
3113
|
+
children: [/* @__PURE__ */ w("span", {
|
|
3089
3114
|
className: "fdd-icon",
|
|
3090
3115
|
"aria-hidden": "true",
|
|
3091
|
-
children: /* @__PURE__ */
|
|
3092
|
-
}), /* @__PURE__ */
|
|
3116
|
+
children: /* @__PURE__ */ w(u, {})
|
|
3117
|
+
}), /* @__PURE__ */ w("h3", {
|
|
3093
3118
|
className: "fdd-title",
|
|
3094
3119
|
children: t
|
|
3095
3120
|
})]
|
|
3096
3121
|
}),
|
|
3097
|
-
d.length > 0 && /* @__PURE__ */
|
|
3122
|
+
d.length > 0 && /* @__PURE__ */ w("dl", {
|
|
3098
3123
|
className: "fdd-facts",
|
|
3099
|
-
children: d.map((e) => /* @__PURE__ */
|
|
3124
|
+
children: d.map((e) => /* @__PURE__ */ T("div", {
|
|
3100
3125
|
className: "fdd-fact",
|
|
3101
|
-
children: [/* @__PURE__ */
|
|
3126
|
+
children: [/* @__PURE__ */ w("dt", { children: e.label }), /* @__PURE__ */ w("dd", { children: e.value })]
|
|
3102
3127
|
}, e.label))
|
|
3103
3128
|
}),
|
|
3104
|
-
n && /* @__PURE__ */
|
|
3129
|
+
n && /* @__PURE__ */ w("p", {
|
|
3105
3130
|
className: "fdd-body",
|
|
3106
3131
|
children: n
|
|
3107
3132
|
}),
|
|
3108
|
-
s && /* @__PURE__ */
|
|
3133
|
+
s && /* @__PURE__ */ w("p", {
|
|
3109
3134
|
className: "fdd-footnote",
|
|
3110
3135
|
children: s
|
|
3111
3136
|
})
|
|
@@ -3116,8 +3141,8 @@ function Ya({ tone: e = "suggestion", title: t, body: n, facts: r = [], okText:
|
|
|
3116
3141
|
});
|
|
3117
3142
|
});
|
|
3118
3143
|
}
|
|
3119
|
-
function
|
|
3120
|
-
let { className: a, Icon: o } =
|
|
3144
|
+
function $a({ tone: e = "duplicate", title: t, body: n, facts: r = [], okText: i = "Go back" } = {}) {
|
|
3145
|
+
let { className: a, Icon: o } = Za[e] ?? Za.suggestion, s = r.filter((e) => e && String(e.value ?? "").trim() !== "");
|
|
3121
3146
|
return new Promise((e) => {
|
|
3122
3147
|
ne.warning({
|
|
3123
3148
|
icon: null,
|
|
@@ -3126,28 +3151,28 @@ function Xa({ tone: e = "duplicate", title: t, body: n, facts: r = [], okText: i
|
|
|
3126
3151
|
className: `fdd-modal ${a}`,
|
|
3127
3152
|
okText: i,
|
|
3128
3153
|
okButtonProps: { size: "large" },
|
|
3129
|
-
content: /* @__PURE__ */
|
|
3154
|
+
content: /* @__PURE__ */ T("div", {
|
|
3130
3155
|
className: "fdd",
|
|
3131
3156
|
children: [
|
|
3132
|
-
/* @__PURE__ */
|
|
3157
|
+
/* @__PURE__ */ T("div", {
|
|
3133
3158
|
className: "fdd-head",
|
|
3134
|
-
children: [/* @__PURE__ */
|
|
3159
|
+
children: [/* @__PURE__ */ w("span", {
|
|
3135
3160
|
className: "fdd-icon",
|
|
3136
3161
|
"aria-hidden": "true",
|
|
3137
|
-
children: /* @__PURE__ */
|
|
3138
|
-
}), /* @__PURE__ */
|
|
3162
|
+
children: /* @__PURE__ */ w(o, {})
|
|
3163
|
+
}), /* @__PURE__ */ w("h3", {
|
|
3139
3164
|
className: "fdd-title",
|
|
3140
3165
|
children: t
|
|
3141
3166
|
})]
|
|
3142
3167
|
}),
|
|
3143
|
-
s.length > 0 && /* @__PURE__ */
|
|
3168
|
+
s.length > 0 && /* @__PURE__ */ w("dl", {
|
|
3144
3169
|
className: "fdd-facts",
|
|
3145
|
-
children: s.map((e) => /* @__PURE__ */
|
|
3170
|
+
children: s.map((e) => /* @__PURE__ */ T("div", {
|
|
3146
3171
|
className: "fdd-fact",
|
|
3147
|
-
children: [/* @__PURE__ */
|
|
3172
|
+
children: [/* @__PURE__ */ w("dt", { children: e.label }), /* @__PURE__ */ w("dd", { children: e.value })]
|
|
3148
3173
|
}, e.label))
|
|
3149
3174
|
}),
|
|
3150
|
-
n && /* @__PURE__ */
|
|
3175
|
+
n && /* @__PURE__ */ w("p", {
|
|
3151
3176
|
className: "fdd-body",
|
|
3152
3177
|
children: n
|
|
3153
3178
|
})
|
|
@@ -3159,7 +3184,7 @@ function Xa({ tone: e = "duplicate", title: t, body: n, facts: r = [], okText: i
|
|
|
3159
3184
|
}
|
|
3160
3185
|
//#endregion
|
|
3161
3186
|
//#region src/services/aiActionApi.js
|
|
3162
|
-
async function
|
|
3187
|
+
async function eo({ module: e, group: t, field: n, actionKey: i, inputs: a = {}, files: o = {} }) {
|
|
3163
3188
|
if (!e || !t || !n || !i) throw Error("module, group, field and actionKey are required to run an AI action");
|
|
3164
3189
|
let c = await r(), l = new FormData();
|
|
3165
3190
|
l.append("json", JSON.stringify({ inputs: a })), Object.entries(o).forEach(([e, t]) => {
|
|
@@ -3185,17 +3210,17 @@ async function Za({ module: e, group: t, field: n, actionKey: i, inputs: a = {},
|
|
|
3185
3210
|
}
|
|
3186
3211
|
//#endregion
|
|
3187
3212
|
//#region src/components/detail/phoneDisplay.js
|
|
3188
|
-
var
|
|
3189
|
-
function
|
|
3213
|
+
var to = (e) => e == null || e === "";
|
|
3214
|
+
function no(e, t) {
|
|
3190
3215
|
return String(t ?? "").split(".").filter(Boolean).reduce((e, t) => e?.[t], e);
|
|
3191
3216
|
}
|
|
3192
|
-
function
|
|
3217
|
+
function ro(e) {
|
|
3193
3218
|
let t = String(e ?? "").trim().replace(/[\s()-]/g, "");
|
|
3194
3219
|
if (!t) return "";
|
|
3195
3220
|
let n = t.replace(/^\+/, "");
|
|
3196
3221
|
return /^\d{1,4}$/.test(n) ? `+${n}` : "";
|
|
3197
3222
|
}
|
|
3198
|
-
function
|
|
3223
|
+
function io(e) {
|
|
3199
3224
|
let t = String(e?.field ?? "").trim(), n = t.replace(/(number|no|phone|mobile|contact)$/i, "");
|
|
3200
3225
|
return [
|
|
3201
3226
|
...t ? [`${t}CountryCode`, `${t}Code`] : [],
|
|
@@ -3208,15 +3233,15 @@ function to(e) {
|
|
|
3208
3233
|
"isdCode"
|
|
3209
3234
|
];
|
|
3210
3235
|
}
|
|
3211
|
-
function
|
|
3212
|
-
let r = e?.renderOptions?.countryCodeField ?? e?.countryCodeField, i = r ? [r, ...
|
|
3236
|
+
function ao(e, t, n = "") {
|
|
3237
|
+
let r = e?.renderOptions?.countryCodeField ?? e?.countryCodeField, i = r ? [r, ...io(e)] : io(e);
|
|
3213
3238
|
for (let e of i) {
|
|
3214
|
-
let n =
|
|
3239
|
+
let n = ro(no(t, e));
|
|
3215
3240
|
if (n) return n;
|
|
3216
3241
|
}
|
|
3217
|
-
return
|
|
3242
|
+
return ro(n);
|
|
3218
3243
|
}
|
|
3219
|
-
function
|
|
3244
|
+
function oo(e) {
|
|
3220
3245
|
let t = String(e ?? "").trim(), n = t.match(/^(\+\d{1,4})[\s-]*(.*)$/);
|
|
3221
3246
|
return n ? {
|
|
3222
3247
|
code: n[1],
|
|
@@ -3226,17 +3251,17 @@ function ro(e) {
|
|
|
3226
3251
|
rest: t
|
|
3227
3252
|
};
|
|
3228
3253
|
}
|
|
3229
|
-
function
|
|
3230
|
-
if (
|
|
3231
|
-
let { code: n, rest: r } =
|
|
3254
|
+
function so(e, t = "") {
|
|
3255
|
+
if (to(e)) return "";
|
|
3256
|
+
let { code: n, rest: r } = oo(e), i = n || ro(t), a = Zn(r) || r;
|
|
3232
3257
|
return `${i ? `${i} ` : ""}${a}`.trim();
|
|
3233
3258
|
}
|
|
3234
|
-
function
|
|
3235
|
-
return
|
|
3259
|
+
function co(e, t, n) {
|
|
3260
|
+
return so(t, ao(e, n, Yn()));
|
|
3236
3261
|
}
|
|
3237
3262
|
//#endregion
|
|
3238
3263
|
//#region src/components/detail/renderConfig.js
|
|
3239
|
-
var
|
|
3264
|
+
var lo = [
|
|
3240
3265
|
{
|
|
3241
3266
|
value: "auto",
|
|
3242
3267
|
label: "Default (auto)"
|
|
@@ -3293,7 +3318,7 @@ var oo = [
|
|
|
3293
3318
|
value: "html",
|
|
3294
3319
|
label: "HTML"
|
|
3295
3320
|
}
|
|
3296
|
-
],
|
|
3321
|
+
], uo = [
|
|
3297
3322
|
{
|
|
3298
3323
|
value: "preview",
|
|
3299
3324
|
label: "Preview (viewer)"
|
|
@@ -3314,7 +3339,7 @@ var oo = [
|
|
|
3314
3339
|
value: "text",
|
|
3315
3340
|
label: "Text (filename)"
|
|
3316
3341
|
}
|
|
3317
|
-
],
|
|
3342
|
+
], fo = [
|
|
3318
3343
|
{
|
|
3319
3344
|
value: "none",
|
|
3320
3345
|
label: "None"
|
|
@@ -3331,76 +3356,76 @@ var oo = [
|
|
|
3331
3356
|
value: "title",
|
|
3332
3357
|
label: "Title Case"
|
|
3333
3358
|
}
|
|
3334
|
-
],
|
|
3359
|
+
], po = [
|
|
3335
3360
|
"location",
|
|
3336
3361
|
"path",
|
|
3337
3362
|
"url",
|
|
3338
3363
|
"key"
|
|
3339
|
-
],
|
|
3364
|
+
], mo = [
|
|
3340
3365
|
"location",
|
|
3341
3366
|
"filepath",
|
|
3342
3367
|
"path",
|
|
3343
3368
|
"url",
|
|
3344
3369
|
"key"
|
|
3345
|
-
],
|
|
3370
|
+
], ho = [
|
|
3346
3371
|
"uploadedfilename",
|
|
3347
3372
|
"uploadname",
|
|
3348
3373
|
"originalname",
|
|
3349
3374
|
"displayname",
|
|
3350
3375
|
"documentname",
|
|
3351
3376
|
"filename"
|
|
3352
|
-
],
|
|
3353
|
-
function
|
|
3377
|
+
], go = ["name"], _o = (e) => String(e).toLowerCase(), vo = (e) => e == null || e === "";
|
|
3378
|
+
function yo(e, t) {
|
|
3354
3379
|
for (let n of t) {
|
|
3355
3380
|
let t = e[n];
|
|
3356
3381
|
if (typeof t == "string" && t) return t;
|
|
3357
3382
|
}
|
|
3358
3383
|
return "";
|
|
3359
3384
|
}
|
|
3360
|
-
function
|
|
3361
|
-
for (let n of t) for (let [t, r] of Object.entries(e)) if (typeof r == "string" && r &&
|
|
3385
|
+
function bo(e, t) {
|
|
3386
|
+
for (let n of t) for (let [t, r] of Object.entries(e)) if (typeof r == "string" && r && _o(t).endsWith(n)) return r;
|
|
3362
3387
|
return "";
|
|
3363
3388
|
}
|
|
3364
|
-
function
|
|
3389
|
+
function xo(e) {
|
|
3365
3390
|
if (!e) return "";
|
|
3366
3391
|
let t = String(e).split("?")[0].split("#")[0];
|
|
3367
3392
|
return decodeURIComponent(t.split("/").pop() || "");
|
|
3368
3393
|
}
|
|
3369
|
-
function
|
|
3394
|
+
function So(e) {
|
|
3370
3395
|
if (!e) return "";
|
|
3371
3396
|
let t = String(e);
|
|
3372
3397
|
return /^https?:\/\//i.test(t) ? t : "";
|
|
3373
3398
|
}
|
|
3374
|
-
function
|
|
3399
|
+
function Co(e) {
|
|
3375
3400
|
let t = String(e ?? "").trim();
|
|
3376
3401
|
return !t || /^https?:\/\//i.test(t) || t.startsWith("blob:") || t.startsWith("data:") ? !1 : t.includes("/");
|
|
3377
3402
|
}
|
|
3378
|
-
function
|
|
3379
|
-
return typeof e == "string" ? e.includes("/") ? e : "" : !e || typeof e != "object" ? "" :
|
|
3403
|
+
function wo(e) {
|
|
3404
|
+
return typeof e == "string" ? e.includes("/") ? e : "" : !e || typeof e != "object" ? "" : yo(e, po) || bo(e, mo);
|
|
3380
3405
|
}
|
|
3381
|
-
function
|
|
3382
|
-
return e ? typeof e == "string" ?
|
|
3406
|
+
function To(e) {
|
|
3407
|
+
return e ? typeof e == "string" ? xo(e) || e : typeof e == "object" && (yo(e, P().documentNameOrder ?? []) || bo(e, ho) || xo(wo(e)) || bo(e, go)) || "Document" : "Document";
|
|
3383
3408
|
}
|
|
3384
|
-
function
|
|
3385
|
-
if (
|
|
3409
|
+
function Eo(e) {
|
|
3410
|
+
if (vo(e)) return [];
|
|
3386
3411
|
let t = Array.isArray(e) ? e : [e], n = [];
|
|
3387
|
-
for (let e of t) if (!
|
|
3412
|
+
for (let e of t) if (!vo(e)) {
|
|
3388
3413
|
if (typeof e == "string") {
|
|
3389
3414
|
let t = e.includes("/") ? e : "";
|
|
3390
3415
|
n.push({
|
|
3391
3416
|
location: t,
|
|
3392
|
-
name:
|
|
3393
|
-
url:
|
|
3394
|
-
needsAuthFetch:
|
|
3417
|
+
name: xo(e) || e,
|
|
3418
|
+
url: So(t),
|
|
3419
|
+
needsAuthFetch: Co(t)
|
|
3395
3420
|
});
|
|
3396
3421
|
} else if (typeof e == "object") {
|
|
3397
|
-
let t =
|
|
3422
|
+
let t = wo(e), r = e.fileUrl || e.downloadUrl || e.signedUrl || "";
|
|
3398
3423
|
n.push({
|
|
3399
3424
|
location: t,
|
|
3400
|
-
name:
|
|
3401
|
-
url: r ||
|
|
3425
|
+
name: To(e),
|
|
3426
|
+
url: r || So(t),
|
|
3402
3427
|
documentId: e.id || e._id || e.documentId || "",
|
|
3403
|
-
needsAuthFetch: !r &&
|
|
3428
|
+
needsAuthFetch: !r && Co(t)
|
|
3404
3429
|
});
|
|
3405
3430
|
}
|
|
3406
3431
|
}
|
|
@@ -3408,24 +3433,24 @@ function Co(e) {
|
|
|
3408
3433
|
}
|
|
3409
3434
|
//#endregion
|
|
3410
3435
|
//#region src/components/form/repeatableRowShape.js
|
|
3411
|
-
function
|
|
3436
|
+
function Do(e) {
|
|
3412
3437
|
return e?.primaryField ? e.primaryField : (e?.fields ?? []).find((e) => e?.field)?.field ?? null;
|
|
3413
3438
|
}
|
|
3414
|
-
function
|
|
3439
|
+
function Oo(e, t) {
|
|
3415
3440
|
if (!Array.isArray(t) || t.length === 0) return t;
|
|
3416
|
-
let n =
|
|
3441
|
+
let n = Do(e);
|
|
3417
3442
|
if (!n) return t;
|
|
3418
3443
|
let r = !1, i = t.map((e) => typeof e == "object" && e && !Array.isArray(e) ? e : e == null || String(e).trim() === "" ? (r = !0, {}) : (r = !0, { [n]: e }));
|
|
3419
3444
|
return r ? i : t;
|
|
3420
3445
|
}
|
|
3421
3446
|
//#endregion
|
|
3422
3447
|
//#region src/components/form/applyGroupValues.js
|
|
3423
|
-
var
|
|
3424
|
-
function
|
|
3448
|
+
var ko = (e) => e === !0 || e === 1 || e === "1", Ao = (e) => e == null || e === "";
|
|
3449
|
+
function jo(e) {
|
|
3425
3450
|
return String(e ?? "").split(".").map((e) => e.trim()).filter(Boolean);
|
|
3426
3451
|
}
|
|
3427
3452
|
function J(e, t, n) {
|
|
3428
|
-
let r = Array.isArray(t) ? t :
|
|
3453
|
+
let r = Array.isArray(t) ? t : jo(t);
|
|
3429
3454
|
if (!r.length) return e;
|
|
3430
3455
|
let i = e;
|
|
3431
3456
|
for (let e = 0; e < r.length - 1; e += 1) {
|
|
@@ -3434,23 +3459,23 @@ function J(e, t, n) {
|
|
|
3434
3459
|
}
|
|
3435
3460
|
return i[r[r.length - 1]] = n, e;
|
|
3436
3461
|
}
|
|
3437
|
-
function
|
|
3462
|
+
function Mo(e, t = []) {
|
|
3438
3463
|
if (!(!e || typeof e != "object")) for (let n of t) {
|
|
3439
3464
|
if (!n) continue;
|
|
3440
3465
|
let t = V(e, n);
|
|
3441
|
-
if (!
|
|
3466
|
+
if (!Ao(t)) return t;
|
|
3442
3467
|
}
|
|
3443
3468
|
}
|
|
3444
|
-
function
|
|
3469
|
+
function No(e, t) {
|
|
3445
3470
|
if (!e || typeof e != "object") return;
|
|
3446
|
-
let n = Object.entries(e), r = n.find(([e, n]) => t.test(e) && !
|
|
3471
|
+
let n = Object.entries(e), r = n.find(([e, n]) => t.test(e) && !Ao(n));
|
|
3447
3472
|
if (r) return r[1];
|
|
3448
3473
|
for (let [, e] of n) if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
3449
|
-
let n =
|
|
3450
|
-
if (!
|
|
3474
|
+
let n = No(e, t);
|
|
3475
|
+
if (!Ao(n)) return n;
|
|
3451
3476
|
}
|
|
3452
3477
|
}
|
|
3453
|
-
function
|
|
3478
|
+
function Po(e, t) {
|
|
3454
3479
|
let n = Array.isArray(e) ? e : e ? [e] : [];
|
|
3455
3480
|
if (!n.length) return;
|
|
3456
3481
|
let r = n.map((e, n) => {
|
|
@@ -3460,9 +3485,9 @@ function jo(e, t) {
|
|
|
3460
3485
|
status: "done"
|
|
3461
3486
|
};
|
|
3462
3487
|
if (!e || typeof e != "object") return null;
|
|
3463
|
-
let r =
|
|
3488
|
+
let r = Mo(e, [t.fileUrlKey, t.locationKey]) ?? No(e, /(location|url|path)$/i) ?? "", i = Mo(e, [t.fileNameKey]) ?? No(e, /(uploadName|uploadedFileName|fileName|name)$/i) ?? "";
|
|
3464
3489
|
if (!r && !i) return null;
|
|
3465
|
-
let a = r && !String(r).startsWith("http") ?
|
|
3490
|
+
let a = r && !String(r).startsWith("http") ? So(r) : r;
|
|
3466
3491
|
return {
|
|
3467
3492
|
uid: String(e.id ?? e._id ?? e.uniqueName ?? e.documentCopyUniqueName ?? `${t.field}-${n}`),
|
|
3468
3493
|
name: i || "file",
|
|
@@ -3474,11 +3499,11 @@ function jo(e, t) {
|
|
|
3474
3499
|
}).filter(Boolean);
|
|
3475
3500
|
return r.length ? r : void 0;
|
|
3476
3501
|
}
|
|
3477
|
-
function
|
|
3502
|
+
function Fo(e, t) {
|
|
3478
3503
|
if (!e || typeof e != "object") return;
|
|
3479
|
-
let n =
|
|
3504
|
+
let n = Mo(e, [t.fileNameKey, t.field]) ?? No(e, /(uploadName|uploadedFileName|fileName|name)$/i), r = Mo(e, [t.fileUrlKey, t.locationKey]) ?? No(e, /(location|url|path)$/i) ?? "";
|
|
3480
3505
|
if (!n && !r) return;
|
|
3481
|
-
let i = r && !String(r).startsWith("http") ?
|
|
3506
|
+
let i = r && !String(r).startsWith("http") ? So(r) : r, a = e.documentCopyUniqueName ?? e.uniqueName ?? n ?? `${t.field}-0`;
|
|
3482
3507
|
return [{
|
|
3483
3508
|
uid: String(a),
|
|
3484
3509
|
name: n ?? "file",
|
|
@@ -3487,7 +3512,7 @@ function Mo(e, t) {
|
|
|
3487
3512
|
url: i || void 0
|
|
3488
3513
|
}];
|
|
3489
3514
|
}
|
|
3490
|
-
function
|
|
3515
|
+
function Io(e, t, n, r) {
|
|
3491
3516
|
(e.fields ?? []).forEach((e) => {
|
|
3492
3517
|
e?.verifyAction && [
|
|
3493
3518
|
e.verifyResultField,
|
|
@@ -3500,8 +3525,8 @@ function No(e, t, n, r) {
|
|
|
3500
3525
|
});
|
|
3501
3526
|
});
|
|
3502
3527
|
}
|
|
3503
|
-
function
|
|
3504
|
-
let t = Array.isArray(e.rows) ?
|
|
3528
|
+
function Lo(e) {
|
|
3529
|
+
let t = Array.isArray(e.rows) ? Oo(e, e.rows) : null, n = Math.max(0, Number(e.minRows ?? 0) || 0), r = (t, n, r) => {
|
|
3505
3530
|
let i = {};
|
|
3506
3531
|
return (e.fields ?? []).forEach((e) => {
|
|
3507
3532
|
if (!e.field) return;
|
|
@@ -3512,30 +3537,30 @@ function Po(e) {
|
|
|
3512
3537
|
}
|
|
3513
3538
|
let a = r(t, e);
|
|
3514
3539
|
if (a == null) {
|
|
3515
|
-
let t = e.defaultOnEdit ?
|
|
3540
|
+
let t = e.defaultOnEdit ? wa(e) : void 0;
|
|
3516
3541
|
t !== void 0 && J(i, e.field, t);
|
|
3517
3542
|
return;
|
|
3518
3543
|
}
|
|
3519
|
-
J(i, e.field,
|
|
3520
|
-
}),
|
|
3521
|
-
}, i =
|
|
3544
|
+
J(i, e.field, ko(e.addRow) ? Ka(e, a) : q(e, a));
|
|
3545
|
+
}), Io(e, t, i, r), i;
|
|
3546
|
+
}, i = Na(e, { editing: !0 });
|
|
3522
3547
|
if (t && t.length > 0) {
|
|
3523
|
-
let e = t.map((e) => r(e, (e, t) =>
|
|
3548
|
+
let e = t.map((e) => r(e, (e, t) => Fo(e, t), (e, t) => V(e, t.field)));
|
|
3524
3549
|
for (; e.length < n;) e.push({ ...i });
|
|
3525
3550
|
return e;
|
|
3526
3551
|
}
|
|
3527
|
-
let a = r(e, (e, t) =>
|
|
3552
|
+
let a = r(e, (e, t) => Po(t.value, t), (e, t) => t.value), o = Object.keys(a).length > 0 ? [a] : [];
|
|
3528
3553
|
for (; o.length < n;) o.push({ ...i });
|
|
3529
3554
|
return o;
|
|
3530
3555
|
}
|
|
3531
|
-
function
|
|
3556
|
+
function Ro(e, t = []) {
|
|
3532
3557
|
let n = {};
|
|
3533
3558
|
return t.forEach((e) => {
|
|
3534
3559
|
e.toggleEnabled && e.toggleField && J(n, e.toggleField, !!e.toggleValue), !e.addRow && (e.fields ?? []).forEach((e) => {
|
|
3535
3560
|
if (!e.field || e.addRow) return;
|
|
3536
3561
|
let t = e.value, r = e.field;
|
|
3537
3562
|
if (e.type === "file") {
|
|
3538
|
-
let i =
|
|
3563
|
+
let i = Po(t, e);
|
|
3539
3564
|
i && J(n, r, i);
|
|
3540
3565
|
return;
|
|
3541
3566
|
}
|
|
@@ -3550,7 +3575,7 @@ function Fo(e, t = []) {
|
|
|
3550
3575
|
}
|
|
3551
3576
|
let i = e.splitDialCodeInto;
|
|
3552
3577
|
if (i && typeof t == "string") {
|
|
3553
|
-
let { code: a, rest: o } =
|
|
3578
|
+
let { code: a, rest: o } = oo(t), s = ro(a);
|
|
3554
3579
|
s && J(n, i, s), J(n, r, q(e, o || t));
|
|
3555
3580
|
return;
|
|
3556
3581
|
}
|
|
@@ -3560,27 +3585,27 @@ function Fo(e, t = []) {
|
|
|
3560
3585
|
}
|
|
3561
3586
|
//#endregion
|
|
3562
3587
|
//#region src/components/form/useAiActions.js
|
|
3563
|
-
function
|
|
3588
|
+
function zo(e) {
|
|
3564
3589
|
let t = document.createElement("div");
|
|
3565
3590
|
return t.innerHTML = String(e ?? ""), t.textContent || t.innerText || "";
|
|
3566
3591
|
}
|
|
3567
|
-
function
|
|
3568
|
-
return t && t === "stripHtml" ?
|
|
3592
|
+
function Bo(e, t) {
|
|
3593
|
+
return t && t === "stripHtml" ? zo(e) : e;
|
|
3569
3594
|
}
|
|
3570
|
-
function
|
|
3595
|
+
function Vo(e) {
|
|
3571
3596
|
return String(e ?? "").trim().split(/\s+/).filter(Boolean).length;
|
|
3572
3597
|
}
|
|
3573
|
-
function
|
|
3598
|
+
function Ho(e) {
|
|
3574
3599
|
return Object.values(e || {}).some((e) => e != null && e !== "");
|
|
3575
3600
|
}
|
|
3576
|
-
function
|
|
3601
|
+
function Uo(e, t) {
|
|
3577
3602
|
if (e.kind === "file") return Array.isArray(t) ? t.length > 0 : !!t;
|
|
3578
|
-
let n =
|
|
3603
|
+
let n = Bo(t, e.transform), r = String(n ?? "").trim();
|
|
3579
3604
|
if (!r) return !1;
|
|
3580
3605
|
let i = Number(e.minWords) || 0;
|
|
3581
|
-
return i > 0 ?
|
|
3606
|
+
return i > 0 ? Vo(r) >= i : !0;
|
|
3582
3607
|
}
|
|
3583
|
-
function
|
|
3608
|
+
function Wo(e, t) {
|
|
3584
3609
|
let n = e.inputs || [];
|
|
3585
3610
|
if (n.length === 0) return !0;
|
|
3586
3611
|
let r = /* @__PURE__ */ new Map();
|
|
@@ -3588,10 +3613,10 @@ function Vo(e, t) {
|
|
|
3588
3613
|
let n = e.group || `__solo_${t}`;
|
|
3589
3614
|
r.has(n) || r.set(n, []), r.get(n).push(e);
|
|
3590
3615
|
});
|
|
3591
|
-
for (let e of r.values()) if (e.some((e) => e.required || Number(e.minWords) > 0) && !e.some((e) =>
|
|
3616
|
+
for (let e of r.values()) if (e.some((e) => e.required || Number(e.minWords) > 0) && !e.some((e) => Uo(e, t(e.sourceField)))) return !1;
|
|
3592
3617
|
return !0;
|
|
3593
3618
|
}
|
|
3594
|
-
function
|
|
3619
|
+
function Go(e = []) {
|
|
3595
3620
|
let t = [];
|
|
3596
3621
|
return e.forEach((e) => {
|
|
3597
3622
|
if (e?.addRow) {
|
|
@@ -3604,32 +3629,32 @@ function Ho(e = []) {
|
|
|
3604
3629
|
});
|
|
3605
3630
|
}), t;
|
|
3606
3631
|
}
|
|
3607
|
-
function
|
|
3608
|
-
return
|
|
3632
|
+
function Ko(e, t) {
|
|
3633
|
+
return Go(t).some((t) => {
|
|
3609
3634
|
let n = e.getFieldValue(t);
|
|
3610
|
-
return Array.isArray(n) ? n.some(
|
|
3635
|
+
return Array.isArray(n) ? n.some(Ho) : n != null && n !== "";
|
|
3611
3636
|
});
|
|
3612
3637
|
}
|
|
3613
|
-
function
|
|
3638
|
+
function qo(e, t = [], { includeUntouched: n = !1 } = {}) {
|
|
3614
3639
|
let r = e.getFieldsValue(!0) ?? {}, i = new Set([t].flat().filter(Boolean)), a = n || typeof e.isFieldTouched != "function" ? () => !0 : (t) => e.isFieldTouched(t), o = 0;
|
|
3615
3640
|
return Object.entries(r).forEach(([e, t]) => {
|
|
3616
|
-
if (!(i.has(e) || !a(e) || !
|
|
3641
|
+
if (!(i.has(e) || !a(e) || !Jo(t))) {
|
|
3617
3642
|
if (Array.isArray(t)) {
|
|
3618
|
-
o += t.filter((e) => e && typeof e == "object" ?
|
|
3643
|
+
o += t.filter((e) => e && typeof e == "object" ? Ho(e) : !!e).length;
|
|
3619
3644
|
return;
|
|
3620
3645
|
}
|
|
3621
3646
|
o += 1;
|
|
3622
3647
|
}
|
|
3623
3648
|
}), o;
|
|
3624
3649
|
}
|
|
3625
|
-
function
|
|
3626
|
-
return e == null || e === "" ? !1 : Array.isArray(e) ? e.some((e) => e && typeof e == "object" ?
|
|
3650
|
+
function Jo(e) {
|
|
3651
|
+
return e == null || e === "" ? !1 : Array.isArray(e) ? e.some((e) => e && typeof e == "object" ? Ho(e) : !!e) : typeof e != "object" || Object.values(e).some((e) => e != null && e !== "");
|
|
3627
3652
|
}
|
|
3628
|
-
function
|
|
3653
|
+
function Yo(e, t = [], { includeUntouched: n = !1 } = {}) {
|
|
3629
3654
|
let r = e.getFieldsValue(!0) ?? {}, i = new Set([t].flat().filter(Boolean)), a = Object.keys(r).filter((e) => !i.has(e));
|
|
3630
|
-
return n ? a.some((e) =>
|
|
3655
|
+
return n ? a.some((e) => Jo(r[e])) : typeof e.isFieldTouched == "function" ? a.some((t) => e.isFieldTouched(t) && Jo(r[t])) : a.some((e) => Jo(r[e]));
|
|
3631
3656
|
}
|
|
3632
|
-
function
|
|
3657
|
+
function Xo(e = []) {
|
|
3633
3658
|
let t = {};
|
|
3634
3659
|
return (e ?? []).forEach((e) => {
|
|
3635
3660
|
e?.addRow || (e?.fields ?? []).forEach((e) => {
|
|
@@ -3640,38 +3665,38 @@ function qo(e = []) {
|
|
|
3640
3665
|
});
|
|
3641
3666
|
}), t;
|
|
3642
3667
|
}
|
|
3643
|
-
function
|
|
3668
|
+
function Zo(e, t, n) {
|
|
3644
3669
|
let r = e?.confirmWhen ?? "never";
|
|
3645
|
-
return r === "never" ? !1 : r === "always" ||
|
|
3670
|
+
return r === "never" ? !1 : r === "always" || Ko(t, n);
|
|
3646
3671
|
}
|
|
3647
|
-
var
|
|
3672
|
+
var Qo = [
|
|
3648
3673
|
"top-left",
|
|
3649
3674
|
"top-center",
|
|
3650
3675
|
"top-right",
|
|
3651
3676
|
"bottom-left",
|
|
3652
3677
|
"bottom-center",
|
|
3653
3678
|
"bottom-right"
|
|
3654
|
-
],
|
|
3655
|
-
function
|
|
3679
|
+
], $o = "bottom-left";
|
|
3680
|
+
function es(e = []) {
|
|
3656
3681
|
let t = {};
|
|
3657
3682
|
return e.forEach((e) => {
|
|
3658
|
-
let n =
|
|
3683
|
+
let n = Qo.includes(e.position) ? e.position : $o;
|
|
3659
3684
|
(t[n] ??= []).push(e);
|
|
3660
3685
|
}), t;
|
|
3661
3686
|
}
|
|
3662
|
-
function
|
|
3663
|
-
let [o, s] = v(null), [c, l] = v(""), u = te.useWatch((e) => e, e), d = p((e) =>
|
|
3687
|
+
function ts({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPrefilledAsData: a = !1 }) {
|
|
3688
|
+
let [o, s] = v(null), [c, l] = v(""), u = te.useWatch((e) => e, e), d = p((e) => Wo(e, (e) => (u || {})[e]), [u]), f = p((t) => {
|
|
3664
3689
|
if (!Array.isArray(t) || t.length === 0) return !1;
|
|
3665
|
-
let n =
|
|
3690
|
+
let n = Ro(e, t.filter((e) => !e.addRow)), r = Object.keys(n).length > 0;
|
|
3666
3691
|
return t.forEach((t) => {
|
|
3667
3692
|
if (!t.addRow || !Array.isArray(t.rows) || t.rows.length === 0) return;
|
|
3668
|
-
let n =
|
|
3693
|
+
let n = Lo(t);
|
|
3669
3694
|
if (n.length === 0) return;
|
|
3670
3695
|
r = !0;
|
|
3671
|
-
let i = () => e.setFieldsValue({ [t.name]: n }), a = (e.getFieldValue(t.name) || []).filter(
|
|
3696
|
+
let i = () => e.setFieldsValue({ [t.name]: n }), a = (e.getFieldValue(t.name) || []).filter(Ho);
|
|
3672
3697
|
if (a.length) {
|
|
3673
3698
|
let e = t.label || t.name;
|
|
3674
|
-
|
|
3699
|
+
Qa({
|
|
3675
3700
|
tone: "overwrite",
|
|
3676
3701
|
title: `Replace what's in ${e}?`,
|
|
3677
3702
|
facts: [
|
|
@@ -3701,9 +3726,9 @@ function Qo({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
|
|
|
3701
3726
|
return {
|
|
3702
3727
|
runAction: p(async (t, o, c, u) => {
|
|
3703
3728
|
let d = c?.confirmWhen ?? "never";
|
|
3704
|
-
if (c?.trigger === "upload" && d !== "never" && (d === "always" ||
|
|
3705
|
-
let t = c.confirmMessages ?? {}, n = u?.name || e.getFieldValue(o?.field)?.slice?.(-1)?.[0]?.name, r =
|
|
3706
|
-
if (!await
|
|
3729
|
+
if (c?.trigger === "upload" && d !== "never" && (d === "always" || Yo(e, [o?.field], { includeUntouched: a }))) {
|
|
3730
|
+
let t = c.confirmMessages ?? {}, n = u?.name || e.getFieldValue(o?.field)?.slice?.(-1)?.[0]?.name, r = qo(e, [o?.field], { includeUntouched: a });
|
|
3731
|
+
if (!await Qa({
|
|
3707
3732
|
tone: "overwrite",
|
|
3708
3733
|
title: t.title || "Read this file and fill the form in?",
|
|
3709
3734
|
facts: [{
|
|
@@ -3727,12 +3752,12 @@ function Qo({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
|
|
|
3727
3752
|
r && (s[t.param] = r);
|
|
3728
3753
|
} else {
|
|
3729
3754
|
let n = e.getFieldValue(t.sourceField);
|
|
3730
|
-
n != null && n !== "" && (a[t.param] =
|
|
3755
|
+
n != null && n !== "" && (a[t.param] = Bo(n, t.transform));
|
|
3731
3756
|
}
|
|
3732
3757
|
}), (c.inputs || []).forEach((e) => {
|
|
3733
3758
|
!e.group || e.kind !== "text" || (c.inputs || []).some((t) => t.group === e.group && t.kind === "file" && s[t.param]) && delete a[e.param];
|
|
3734
3759
|
});
|
|
3735
|
-
let l = await
|
|
3760
|
+
let l = await eo({
|
|
3736
3761
|
module: n,
|
|
3737
3762
|
group: t,
|
|
3738
3763
|
field: o.field,
|
|
@@ -3740,9 +3765,9 @@ function Qo({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
|
|
|
3740
3765
|
inputs: a,
|
|
3741
3766
|
files: s
|
|
3742
3767
|
}), d = c.label || "AI action", p = l?.groups;
|
|
3743
|
-
if (c?.trigger !== "upload" &&
|
|
3744
|
-
let e = c.confirmMessages ?? {}, t =
|
|
3745
|
-
if (!await
|
|
3768
|
+
if (c?.trigger !== "upload" && Zo(c, e, p)) {
|
|
3769
|
+
let e = c.confirmMessages ?? {}, t = Go(p).length;
|
|
3770
|
+
if (!await Qa({
|
|
3746
3771
|
tone: "overwrite",
|
|
3747
3772
|
title: e.title || `Fill the form in from ${d}?`,
|
|
3748
3773
|
facts: [{
|
|
@@ -3763,7 +3788,7 @@ function Qo({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
|
|
|
3763
3788
|
field: o,
|
|
3764
3789
|
groupName: t,
|
|
3765
3790
|
responseGroups: p,
|
|
3766
|
-
payload:
|
|
3791
|
+
payload: Xo(p)
|
|
3767
3792
|
});
|
|
3768
3793
|
if (e === !1 || e === "abort") return l;
|
|
3769
3794
|
}
|
|
@@ -3795,17 +3820,17 @@ function Qo({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
|
|
|
3795
3820
|
}
|
|
3796
3821
|
//#endregion
|
|
3797
3822
|
//#region src/components/form/AiActionButtons.jsx
|
|
3798
|
-
function
|
|
3823
|
+
function ns({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
|
|
3799
3824
|
if (!t || t.length === 0) return null;
|
|
3800
3825
|
let a = e.endsWith("center") ? "center" : e.endsWith("right") ? "flex-end" : "flex-start";
|
|
3801
|
-
return /* @__PURE__ */
|
|
3826
|
+
return /* @__PURE__ */ w(re, {
|
|
3802
3827
|
size: 8,
|
|
3803
3828
|
className: "v1-ai-action-buttons",
|
|
3804
3829
|
style: {
|
|
3805
3830
|
width: "100%",
|
|
3806
3831
|
justifyContent: a
|
|
3807
3832
|
},
|
|
3808
|
-
children: t.map((e) => /* @__PURE__ */
|
|
3833
|
+
children: t.map((e) => /* @__PURE__ */ w(b, {
|
|
3809
3834
|
size: "small",
|
|
3810
3835
|
loading: n.loadingKey === e.key,
|
|
3811
3836
|
disabled: n.busy || !n.isActionEnabled(e),
|
|
@@ -3816,18 +3841,18 @@ function $o({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
|
|
|
3816
3841
|
}
|
|
3817
3842
|
//#endregion
|
|
3818
3843
|
//#region src/components/form/emailValidator.js
|
|
3819
|
-
function
|
|
3844
|
+
function rs(e) {
|
|
3820
3845
|
let t = String(e ?? "").trim(), n = /^([^\s@]+)@([^\s@]+)\.([A-Za-z]{2,})$/.exec(t);
|
|
3821
3846
|
if (!n) return !1;
|
|
3822
3847
|
let [, r, i] = n;
|
|
3823
3848
|
return /[A-Za-z]/.test(r) && /[A-Za-z]/.test(i);
|
|
3824
3849
|
}
|
|
3825
|
-
function
|
|
3826
|
-
return { validator: (n, r) => r == null || r === "" ||
|
|
3850
|
+
function is(e = "Email", t) {
|
|
3851
|
+
return { validator: (n, r) => r == null || r === "" || rs(r) ? Promise.resolve() : Promise.reject(Error(t ?? `Enter a valid ${e}; numeric-only email addresses are not allowed`)) };
|
|
3827
3852
|
}
|
|
3828
3853
|
//#endregion
|
|
3829
3854
|
//#region src/components/form/inputValidator.js
|
|
3830
|
-
var
|
|
3855
|
+
var as = [
|
|
3831
3856
|
{
|
|
3832
3857
|
label: "Only Numbers",
|
|
3833
3858
|
value: "onlyNumber"
|
|
@@ -3900,7 +3925,7 @@ var ns = [
|
|
|
3900
3925
|
label: "Website URL",
|
|
3901
3926
|
value: "websiteUrl"
|
|
3902
3927
|
}
|
|
3903
|
-
],
|
|
3928
|
+
], os = {
|
|
3904
3929
|
onlyNumber: /^[0-9]$/,
|
|
3905
3930
|
experience: /^[0-9]$/,
|
|
3906
3931
|
numericTwoDigits: /^[0-9]$/,
|
|
@@ -3916,10 +3941,10 @@ var ns = [
|
|
|
3916
3941
|
decimalRange: /^[0-9.]$/,
|
|
3917
3942
|
contactNumber: /^[0-9()\-+\s]$/
|
|
3918
3943
|
};
|
|
3919
|
-
function
|
|
3920
|
-
return
|
|
3944
|
+
function ss(e) {
|
|
3945
|
+
return os[e] ?? null;
|
|
3921
3946
|
}
|
|
3922
|
-
function
|
|
3947
|
+
function cs(e, t = {}, n = "change") {
|
|
3923
3948
|
if (!t?.type || e == null) return {
|
|
3924
3949
|
cleaned: e ?? "",
|
|
3925
3950
|
error: null
|
|
@@ -4002,7 +4027,7 @@ function as(e, t = {}, n = "change") {
|
|
|
4002
4027
|
break;
|
|
4003
4028
|
}
|
|
4004
4029
|
case "email":
|
|
4005
|
-
c = n === "blur" ? r.trim() : r, c && !
|
|
4030
|
+
c = n === "blur" ? r.trim() : r, c && !rs(c) && (l = `${s} must be a valid email address; numeric-only email addresses are not allowed.`);
|
|
4006
4031
|
break;
|
|
4007
4032
|
case "websiteUrl":
|
|
4008
4033
|
c = n === "blur" ? r.trim() : r, c && !/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/i.test(c) && (l = `${s} must be a valid URL.`);
|
|
@@ -4014,21 +4039,21 @@ function as(e, t = {}, n = "change") {
|
|
|
4014
4039
|
error: l
|
|
4015
4040
|
};
|
|
4016
4041
|
}
|
|
4017
|
-
var
|
|
4018
|
-
function
|
|
4042
|
+
var ls = "This value is already present";
|
|
4043
|
+
function us(e) {
|
|
4019
4044
|
return typeof e == "string" ? e : e?.type ?? e?.rule ?? e?.name;
|
|
4020
4045
|
}
|
|
4021
|
-
function
|
|
4022
|
-
if (
|
|
4046
|
+
function ds(e) {
|
|
4047
|
+
if (us(e) !== "unique") return null;
|
|
4023
4048
|
if (typeof e == "string") return {
|
|
4024
|
-
message:
|
|
4049
|
+
message: ls,
|
|
4025
4050
|
normalizer: "trim",
|
|
4026
4051
|
skipBlank: !0,
|
|
4027
4052
|
validateOn: "blur"
|
|
4028
4053
|
};
|
|
4029
4054
|
let t = e.value && typeof e.value == "object" ? e.value : e, n = String(t.validateOn ?? "blur").toLowerCase();
|
|
4030
4055
|
return {
|
|
4031
|
-
message: typeof e.message == "string" && e.message.trim() ? e.message.trim() :
|
|
4056
|
+
message: typeof e.message == "string" && e.message.trim() ? e.message.trim() : ls,
|
|
4032
4057
|
collectionField: t.collectionField ?? "",
|
|
4033
4058
|
normalizer: String(t.normalizer ?? "trim"),
|
|
4034
4059
|
skipBlank: t.skipBlank !== !1,
|
|
@@ -4039,20 +4064,20 @@ function cs(e) {
|
|
|
4039
4064
|
].includes(n) ? n : "blur"
|
|
4040
4065
|
};
|
|
4041
4066
|
}
|
|
4042
|
-
function
|
|
4067
|
+
function fs(e) {
|
|
4043
4068
|
let t = e?.validations ?? e?.validation ?? e?.rules ?? [];
|
|
4044
4069
|
if (!Array.isArray(t)) return null;
|
|
4045
4070
|
for (let e of t) {
|
|
4046
|
-
let t =
|
|
4071
|
+
let t = ds(e);
|
|
4047
4072
|
if (t) return t;
|
|
4048
4073
|
}
|
|
4049
4074
|
return null;
|
|
4050
4075
|
}
|
|
4051
|
-
function
|
|
4076
|
+
function ps(e = []) {
|
|
4052
4077
|
let t = [];
|
|
4053
4078
|
return (Array.isArray(e) ? e : []).forEach((e) => {
|
|
4054
4079
|
(e?.fields ?? []).forEach((e) => {
|
|
4055
|
-
let n =
|
|
4080
|
+
let n = fs(e);
|
|
4056
4081
|
!n || !e?.field || t.push({
|
|
4057
4082
|
field: e.field,
|
|
4058
4083
|
label: e.label ?? e.field,
|
|
@@ -4061,10 +4086,10 @@ function us(e = []) {
|
|
|
4061
4086
|
});
|
|
4062
4087
|
}), t;
|
|
4063
4088
|
}
|
|
4064
|
-
function
|
|
4089
|
+
function ms(e) {
|
|
4065
4090
|
return e == null ? !0 : typeof e == "number" ? Number.isNaN(e) : typeof e == "boolean" ? !1 : Array.isArray(e) ? e.length === 0 : String(e).trim() === "";
|
|
4066
4091
|
}
|
|
4067
|
-
function
|
|
4092
|
+
function hs(e, t = "trim") {
|
|
4068
4093
|
if (e == null) return "";
|
|
4069
4094
|
let n = String(e);
|
|
4070
4095
|
switch (String(t)) {
|
|
@@ -4076,10 +4101,10 @@ function fs(e, t = "trim") {
|
|
|
4076
4101
|
default: return n.trim();
|
|
4077
4102
|
}
|
|
4078
4103
|
}
|
|
4079
|
-
function
|
|
4080
|
-
return !(!e || e.skipBlank !== !1 &&
|
|
4104
|
+
function gs(e, t) {
|
|
4105
|
+
return !(!e || e.skipBlank !== !1 && ms(t));
|
|
4081
4106
|
}
|
|
4082
|
-
function
|
|
4107
|
+
function _s(e) {
|
|
4083
4108
|
return !e || e.validateOn === "submit" ? [] : e.validateOn === "change" ? ["onChange", "onBlur"] : ["onBlur"];
|
|
4084
4109
|
}
|
|
4085
4110
|
var Y = {
|
|
@@ -4089,21 +4114,21 @@ var Y = {
|
|
|
4089
4114
|
STALE: "stale",
|
|
4090
4115
|
ERROR: "error"
|
|
4091
4116
|
};
|
|
4092
|
-
function
|
|
4117
|
+
function vs({ module: e, field: t, recordId: n, normalized: r }) {
|
|
4093
4118
|
return `${e}${t}${n ?? ""}${r}`;
|
|
4094
4119
|
}
|
|
4095
|
-
function
|
|
4120
|
+
function ys({ checkFieldUnique: e, onPendingChange: t } = {}) {
|
|
4096
4121
|
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = 0, a = 0;
|
|
4097
4122
|
function o(e) {
|
|
4098
4123
|
a = e, typeof t == "function" && t(a);
|
|
4099
4124
|
}
|
|
4100
4125
|
async function s({ module: t, field: s, rule: c, value: l, recordId: u, clientId: d, region: f } = {}) {
|
|
4101
|
-
if (!c || !t || !s || typeof e != "function" || !
|
|
4102
|
-
let p =
|
|
4126
|
+
if (!c || !t || !s || typeof e != "function" || !gs(c, l)) return { status: Y.SKIPPED };
|
|
4127
|
+
let p = vs({
|
|
4103
4128
|
module: t,
|
|
4104
4129
|
field: s,
|
|
4105
4130
|
recordId: u,
|
|
4106
|
-
normalized:
|
|
4131
|
+
normalized: hs(l, c.normalizer)
|
|
4107
4132
|
});
|
|
4108
4133
|
if (n.has(p)) return n.get(p);
|
|
4109
4134
|
i += 1;
|
|
@@ -4121,7 +4146,7 @@ function gs({ checkFieldUnique: e, onPendingChange: t } = {}) {
|
|
|
4121
4146
|
if (r.get(s) !== m) return { status: Y.STALE };
|
|
4122
4147
|
let a = i?.available === !1 ? {
|
|
4123
4148
|
status: Y.DUPLICATE,
|
|
4124
|
-
message:
|
|
4149
|
+
message: bs(i) || c.message || ls
|
|
4125
4150
|
} : { status: Y.AVAILABLE };
|
|
4126
4151
|
return n.set(p, a), a;
|
|
4127
4152
|
} catch (e) {
|
|
@@ -4142,17 +4167,17 @@ function gs({ checkFieldUnique: e, onPendingChange: t } = {}) {
|
|
|
4142
4167
|
}
|
|
4143
4168
|
};
|
|
4144
4169
|
}
|
|
4145
|
-
function
|
|
4170
|
+
function bs(e) {
|
|
4146
4171
|
return (e?.errors ?? []).find((e) => e?.message)?.message || e?.message || "";
|
|
4147
4172
|
}
|
|
4148
|
-
var
|
|
4149
|
-
function
|
|
4150
|
-
let r =
|
|
4173
|
+
var xs = "__uniqueRule";
|
|
4174
|
+
function Ss({ field: e, validation: t, context: n }) {
|
|
4175
|
+
let r = ds(t);
|
|
4151
4176
|
if (!r) return { validator: () => Promise.resolve() };
|
|
4152
4177
|
let i = e?.field ?? "";
|
|
4153
4178
|
return !n?.checker || !n?.module || !i ? { validator: () => Promise.resolve() } : {
|
|
4154
|
-
[
|
|
4155
|
-
validateTrigger:
|
|
4179
|
+
[xs]: r,
|
|
4180
|
+
validateTrigger: _s(r),
|
|
4156
4181
|
validator: async (e, t) => {
|
|
4157
4182
|
let a = await n.checker.check({
|
|
4158
4183
|
module: n.module,
|
|
@@ -4167,22 +4192,22 @@ function ys({ field: e, validation: t, context: n }) {
|
|
|
4167
4192
|
}
|
|
4168
4193
|
};
|
|
4169
4194
|
}
|
|
4170
|
-
function
|
|
4195
|
+
function Cs(e = []) {
|
|
4171
4196
|
let t = Array.isArray(e) ? e : [];
|
|
4172
|
-
if (!t.some((e) => e && e[
|
|
4173
|
-
let n = t.filter((e) => e && !e[
|
|
4197
|
+
if (!t.some((e) => e && e[xs])) return t;
|
|
4198
|
+
let n = t.filter((e) => e && !e[xs]);
|
|
4174
4199
|
return t.map((e) => {
|
|
4175
|
-
if (!e || !e[
|
|
4200
|
+
if (!e || !e[xs]) return e;
|
|
4176
4201
|
let t = e.validator;
|
|
4177
4202
|
return {
|
|
4178
4203
|
...e,
|
|
4179
|
-
validator: async (e, r) => await
|
|
4204
|
+
validator: async (e, r) => await ws(n, r, e) ? Promise.resolve() : t(e, r)
|
|
4180
4205
|
};
|
|
4181
4206
|
});
|
|
4182
4207
|
}
|
|
4183
|
-
async function
|
|
4208
|
+
async function ws(e = [], t, n = {}) {
|
|
4184
4209
|
for (let r of e) if (!(!r || typeof r == "string")) {
|
|
4185
|
-
if (r.required &&
|
|
4210
|
+
if (r.required && ms(t) || !ms(t) && (r.pattern instanceof RegExp && !new RegExp(r.pattern.source, r.pattern.flags).test(String(t)) || r.len != null && String(t).length !== Number(r.len))) return !0;
|
|
4186
4211
|
if (typeof r.validator == "function") try {
|
|
4187
4212
|
await r.validator(n, t);
|
|
4188
4213
|
} catch {
|
|
@@ -4191,7 +4216,7 @@ async function xs(e = [], t, n = {}) {
|
|
|
4191
4216
|
}
|
|
4192
4217
|
return !1;
|
|
4193
4218
|
}
|
|
4194
|
-
function
|
|
4219
|
+
function Ts(e) {
|
|
4195
4220
|
let t = String(e ?? "").trim();
|
|
4196
4221
|
if (!t.startsWith("{")) return null;
|
|
4197
4222
|
try {
|
|
@@ -4200,19 +4225,19 @@ function Ss(e) {
|
|
|
4200
4225
|
return null;
|
|
4201
4226
|
}
|
|
4202
4227
|
}
|
|
4203
|
-
function
|
|
4228
|
+
function Es(e) {
|
|
4204
4229
|
if (!e) return null;
|
|
4205
|
-
if (typeof e == "string") return
|
|
4230
|
+
if (typeof e == "string") return Ts(e);
|
|
4206
4231
|
let t = [
|
|
4207
4232
|
e.data,
|
|
4208
4233
|
e.response,
|
|
4209
4234
|
e,
|
|
4210
|
-
|
|
4235
|
+
Ts(e.message)
|
|
4211
4236
|
];
|
|
4212
4237
|
for (let e of t) if (!(!e || typeof e != "object") && (Array.isArray(e.errors) || e.code === "DUPLICATE_VALUE")) return e;
|
|
4213
4238
|
return null;
|
|
4214
4239
|
}
|
|
4215
|
-
function
|
|
4240
|
+
function Ds({ field: e, group: t, rowIndex: n }) {
|
|
4216
4241
|
let r = String(e ?? ""), i = Number(n);
|
|
4217
4242
|
return t && Number.isInteger(i) && i >= 0 ? [
|
|
4218
4243
|
String(t),
|
|
@@ -4220,14 +4245,14 @@ function ws({ field: e, group: t, rowIndex: n }) {
|
|
|
4220
4245
|
...r.split(".")
|
|
4221
4246
|
] : r;
|
|
4222
4247
|
}
|
|
4223
|
-
function
|
|
4224
|
-
let n =
|
|
4248
|
+
function Os(e, { uniqueRules: t = [] } = {}) {
|
|
4249
|
+
let n = Es(e);
|
|
4225
4250
|
if (n) {
|
|
4226
4251
|
let e = (Array.isArray(n.errors) ? n.errors : []).filter((e) => e?.field).map((e) => {
|
|
4227
4252
|
let t = {
|
|
4228
4253
|
field: e.field,
|
|
4229
|
-
name:
|
|
4230
|
-
message: e.message || n.message ||
|
|
4254
|
+
name: Ds(e),
|
|
4255
|
+
message: e.message || n.message || ls
|
|
4231
4256
|
};
|
|
4232
4257
|
return Array.isArray(t.name) && (t.group = String(e.group), t.rowIndex = Number(e.rowIndex)), t;
|
|
4233
4258
|
});
|
|
@@ -4244,7 +4269,7 @@ function Ts(e, { uniqueRules: t = [] } = {}) {
|
|
|
4244
4269
|
}
|
|
4245
4270
|
//#endregion
|
|
4246
4271
|
//#region src/services/uniqueValidationApi.js
|
|
4247
|
-
async function
|
|
4272
|
+
async function ks({ module: e, field: t, value: n, recordId: r, clientId: i, region: o } = {}) {
|
|
4248
4273
|
if (!e || !t) throw Error("module and field are required to check uniqueness");
|
|
4249
4274
|
let c = {
|
|
4250
4275
|
field: t,
|
|
@@ -4278,7 +4303,7 @@ async function Es({ module: e, field: t, value: n, recordId: r, clientId: i, reg
|
|
|
4278
4303
|
throw e;
|
|
4279
4304
|
}
|
|
4280
4305
|
}
|
|
4281
|
-
async function
|
|
4306
|
+
async function As({ module: e, payload: t, excludeId: n } = {}) {
|
|
4282
4307
|
if (!e || !t) return { duplicate: !1 };
|
|
4283
4308
|
try {
|
|
4284
4309
|
let r = await a(s, `/module/duplicate-check?module=${encodeURIComponent(e)}`, {
|
|
@@ -4296,7 +4321,7 @@ async function Ds({ module: e, payload: t, excludeId: n } = {}) {
|
|
|
4296
4321
|
}
|
|
4297
4322
|
//#endregion
|
|
4298
4323
|
//#region src/components/form/uploadAccept.js
|
|
4299
|
-
var
|
|
4324
|
+
var js = [
|
|
4300
4325
|
"jpg",
|
|
4301
4326
|
"jpeg",
|
|
4302
4327
|
"png",
|
|
@@ -4305,18 +4330,18 @@ var Os = [
|
|
|
4305
4330
|
"bmp",
|
|
4306
4331
|
"svg",
|
|
4307
4332
|
"avif"
|
|
4308
|
-
],
|
|
4333
|
+
], Ms = [
|
|
4309
4334
|
"mp4",
|
|
4310
4335
|
"webm",
|
|
4311
4336
|
"ogg",
|
|
4312
4337
|
"ogv",
|
|
4313
4338
|
"mov",
|
|
4314
4339
|
"m4v"
|
|
4315
|
-
],
|
|
4340
|
+
], Ns = [
|
|
4316
4341
|
"pdf",
|
|
4317
4342
|
"doc",
|
|
4318
4343
|
"docx"
|
|
4319
|
-
],
|
|
4344
|
+
], Ps = [
|
|
4320
4345
|
{
|
|
4321
4346
|
label: "Any file",
|
|
4322
4347
|
value: "any"
|
|
@@ -4341,45 +4366,45 @@ var Os = [
|
|
|
4341
4366
|
label: "Images & Videos",
|
|
4342
4367
|
value: "imagesAndVideos"
|
|
4343
4368
|
}
|
|
4344
|
-
],
|
|
4369
|
+
], Fs = {
|
|
4345
4370
|
resume: {
|
|
4346
|
-
exts:
|
|
4371
|
+
exts: Ns,
|
|
4347
4372
|
maxSizeMB: 2,
|
|
4348
4373
|
hint: "PDF, DOC or DOCX",
|
|
4349
4374
|
error: "Only PDF, DOC, and DOCX resume files are supported."
|
|
4350
4375
|
},
|
|
4351
4376
|
documents: {
|
|
4352
|
-
exts: [...
|
|
4377
|
+
exts: [...Ns, ...js],
|
|
4353
4378
|
hint: "PDF, DOC or image files",
|
|
4354
4379
|
error: "Only document (PDF/DOC) or image files are allowed"
|
|
4355
4380
|
},
|
|
4356
4381
|
images: {
|
|
4357
|
-
exts:
|
|
4382
|
+
exts: js,
|
|
4358
4383
|
hint: "Image files",
|
|
4359
4384
|
error: "Only image files are allowed"
|
|
4360
4385
|
},
|
|
4361
4386
|
videos: {
|
|
4362
|
-
exts:
|
|
4387
|
+
exts: Ms,
|
|
4363
4388
|
hint: "Video files",
|
|
4364
4389
|
error: "Only video files are allowed"
|
|
4365
4390
|
},
|
|
4366
4391
|
imagesAndVideos: {
|
|
4367
|
-
exts: [...
|
|
4392
|
+
exts: [...js, ...Ms],
|
|
4368
4393
|
hint: "Image or video files",
|
|
4369
4394
|
error: "Only image or video files are allowed"
|
|
4370
4395
|
}
|
|
4371
4396
|
};
|
|
4372
|
-
function
|
|
4397
|
+
function Is(e) {
|
|
4373
4398
|
let t = String(e?.field ?? e?.payloadKey ?? "").toLowerCase();
|
|
4374
4399
|
return t ? t.includes("resume") || t.includes("cv") || t.includes("curriculumvitae") : !1;
|
|
4375
4400
|
}
|
|
4376
|
-
function
|
|
4401
|
+
function Ls(e) {
|
|
4377
4402
|
let t = String(e?.accept ?? "").trim();
|
|
4378
|
-
return t && t !== "any" ?
|
|
4403
|
+
return t && t !== "any" ? Fs[t] ?? null : !t && Is(e) ? Fs.resume : Fs[t] ?? null;
|
|
4379
4404
|
}
|
|
4380
4405
|
//#endregion
|
|
4381
4406
|
//#region src/components/form/quickActionLabels.js
|
|
4382
|
-
var
|
|
4407
|
+
var Rs = /* @__PURE__ */ new Set([
|
|
4383
4408
|
"of",
|
|
4384
4409
|
"and",
|
|
4385
4410
|
"the",
|
|
@@ -4388,7 +4413,7 @@ var Fs = /* @__PURE__ */ new Set([
|
|
|
4388
4413
|
"in",
|
|
4389
4414
|
"a",
|
|
4390
4415
|
"an"
|
|
4391
|
-
]),
|
|
4416
|
+
]), zs = {
|
|
4392
4417
|
addresses: "address",
|
|
4393
4418
|
branches: "branch",
|
|
4394
4419
|
batches: "batch",
|
|
@@ -4399,50 +4424,50 @@ var Fs = /* @__PURE__ */ new Set([
|
|
|
4399
4424
|
people: "person",
|
|
4400
4425
|
statuses: "status"
|
|
4401
4426
|
};
|
|
4402
|
-
function
|
|
4427
|
+
function Bs(e) {
|
|
4403
4428
|
let t = String(e ?? "").trim();
|
|
4404
4429
|
if (!t) return "";
|
|
4405
4430
|
if (t.length > 1 && t === t.toUpperCase() && /[A-Z]/.test(t)) return t;
|
|
4406
4431
|
let n = t.toLowerCase();
|
|
4407
|
-
return
|
|
4432
|
+
return zs[n] ? zs[n] : /[^aeiou]ies$/i.test(t) ? t.slice(0, -3) + "y" : /(s|x|z|ch|sh)es$/i.test(t) ? t.slice(0, -2) : /[^s]s$/i.test(t) ? t.slice(0, -1) : t;
|
|
4408
4433
|
}
|
|
4409
|
-
function
|
|
4434
|
+
function Vs(e) {
|
|
4410
4435
|
let t = String(e ?? "").trim();
|
|
4411
4436
|
if (!t) return "";
|
|
4412
4437
|
let n = t.replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_\-.]+/g, " ").split(/\s+/).filter(Boolean);
|
|
4413
4438
|
if (!n.length) return "";
|
|
4414
|
-
let r =
|
|
4439
|
+
let r = Bs(n[n.length - 1]);
|
|
4415
4440
|
return [...n.slice(0, -1), r].map((e, t) => {
|
|
4416
4441
|
let n = e.toLowerCase();
|
|
4417
|
-
return e.length > 1 && e === e.toUpperCase() ? e : t > 0 &&
|
|
4442
|
+
return e.length > 1 && e === e.toUpperCase() ? e : t > 0 && Rs.has(n) ? n : n.charAt(0).toUpperCase() + n.slice(1);
|
|
4418
4443
|
}).join(" ");
|
|
4419
4444
|
}
|
|
4420
|
-
function
|
|
4445
|
+
function Hs(e, t) {
|
|
4421
4446
|
let n = String(e?.quickCreateLabel ?? "").trim();
|
|
4422
4447
|
if (n && n.toLowerCase() !== "add more") return n;
|
|
4423
|
-
let r =
|
|
4448
|
+
let r = Vs(e?.quickCreateModule || t);
|
|
4424
4449
|
return r ? `Add New ${r}` : "Add New";
|
|
4425
4450
|
}
|
|
4426
|
-
function
|
|
4451
|
+
function Us(e, t) {
|
|
4427
4452
|
let n = String(e?.quickEditLabel ?? "").trim();
|
|
4428
4453
|
if (n && n.toLowerCase() !== "add more") return n;
|
|
4429
|
-
let r =
|
|
4454
|
+
let r = Vs(e?.quickEditModule || t);
|
|
4430
4455
|
return r ? `Edit ${r}` : "Edit";
|
|
4431
4456
|
}
|
|
4432
|
-
function
|
|
4433
|
-
let r =
|
|
4434
|
-
return e === "create" ? String(t?.quickCreateTitle ?? "").trim() || (r ? `Add New ${r}` :
|
|
4457
|
+
function Ws(e, t, n) {
|
|
4458
|
+
let r = Vs((e === "create" ? t?.quickCreateModule : t?.quickEditModule) || n);
|
|
4459
|
+
return e === "create" ? String(t?.quickCreateTitle ?? "").trim() || (r ? `Add New ${r}` : Hs(t, n)) : String(t?.quickEditTitle ?? "").trim() || (r ? `Edit ${r}` : Us(t, n));
|
|
4435
4460
|
}
|
|
4436
4461
|
//#endregion
|
|
4437
4462
|
//#region src/components/AppButton.jsx
|
|
4438
|
-
function
|
|
4439
|
-
let o = /* @__PURE__ */
|
|
4463
|
+
function Gs({ children: e, className: t = "", icon: n, to: r, variant: i = "default", ...a }) {
|
|
4464
|
+
let o = /* @__PURE__ */ w(b, {
|
|
4440
4465
|
className: `app-button app-button--${i} ${t}`.trim(),
|
|
4441
4466
|
icon: n,
|
|
4442
4467
|
...a,
|
|
4443
4468
|
children: e
|
|
4444
4469
|
});
|
|
4445
|
-
return r ? /* @__PURE__ */
|
|
4470
|
+
return r ? /* @__PURE__ */ w(be, {
|
|
4446
4471
|
className: "app-button-link",
|
|
4447
4472
|
to: r,
|
|
4448
4473
|
children: o
|
|
@@ -4450,13 +4475,13 @@ function Hs({ children: e, className: t = "", icon: n, to: r, variant: i = "defa
|
|
|
4450
4475
|
}
|
|
4451
4476
|
//#endregion
|
|
4452
4477
|
//#region src/components/detail/userNames.js
|
|
4453
|
-
function
|
|
4478
|
+
function Ks(e) {
|
|
4454
4479
|
return !e || typeof e != "object" ? "" : [e.first_name ?? e.firstName ?? e.FIRST_NAME, e.last_name ?? e.lastName ?? e.LAST_NAME].filter(Boolean).join(" ").trim() || e.name || e.user_name || e.userName || e.username || e.email || "";
|
|
4455
4480
|
}
|
|
4456
|
-
function
|
|
4481
|
+
function qs(e) {
|
|
4457
4482
|
let t = {};
|
|
4458
4483
|
return (Array.isArray(e) ? e : []).forEach((e) => {
|
|
4459
|
-
let n =
|
|
4484
|
+
let n = Ks(e);
|
|
4460
4485
|
n && [
|
|
4461
4486
|
e.legacyUserId,
|
|
4462
4487
|
e.userId,
|
|
@@ -4470,16 +4495,16 @@ function Ws(e) {
|
|
|
4470
4495
|
});
|
|
4471
4496
|
}), t;
|
|
4472
4497
|
}
|
|
4473
|
-
var
|
|
4474
|
-
function
|
|
4498
|
+
var Js = /* @__PURE__ */ new Map();
|
|
4499
|
+
function Ys(e) {
|
|
4475
4500
|
let t = String(e ?? "").trim();
|
|
4476
4501
|
if (!t) return Promise.resolve("");
|
|
4477
|
-
if (
|
|
4478
|
-
let n = a(s, `/get-detailed-view?userId=${encodeURIComponent(t)}`).then((e) =>
|
|
4479
|
-
return
|
|
4502
|
+
if (Js.has(t)) return Js.get(t);
|
|
4503
|
+
let n = a(s, `/get-detailed-view?userId=${encodeURIComponent(t)}`).then((e) => Ks(e?.data ?? e ?? null)).catch(() => "");
|
|
4504
|
+
return Js.set(t, n), n;
|
|
4480
4505
|
}
|
|
4481
4506
|
var X = (e) => e == null ? "" : String(e).trim();
|
|
4482
|
-
function
|
|
4507
|
+
function Xs(e) {
|
|
4483
4508
|
let t = e?.quickCreateNotice;
|
|
4484
4509
|
return !t || typeof t != "object" || t.enabled === !1 ? null : {
|
|
4485
4510
|
enabled: !0,
|
|
@@ -4492,7 +4517,7 @@ function qs(e) {
|
|
|
4492
4517
|
creatorLabel: X(t.creatorLabel) || "Created by"
|
|
4493
4518
|
};
|
|
4494
4519
|
}
|
|
4495
|
-
var
|
|
4520
|
+
var Zs = [
|
|
4496
4521
|
"clientName",
|
|
4497
4522
|
"companyName",
|
|
4498
4523
|
"name",
|
|
@@ -4502,24 +4527,24 @@ var Js = [
|
|
|
4502
4527
|
"label",
|
|
4503
4528
|
"employerName",
|
|
4504
4529
|
"vendorName"
|
|
4505
|
-
],
|
|
4530
|
+
], Qs = (e, t) => {
|
|
4506
4531
|
if (!(!e || !t)) return String(t).split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e);
|
|
4507
|
-
},
|
|
4508
|
-
function
|
|
4532
|
+
}, $s = (e) => typeof e == "string" || typeof e == "number" ? X(e) : e && typeof e == "object" ? X(e.label ?? e.name ?? e.title ?? "") : "";
|
|
4533
|
+
function ec(e, { recordNameField: t = "", displayField: n = "" } = {}) {
|
|
4509
4534
|
if (!e || typeof e != "object") return "";
|
|
4510
4535
|
for (let r of [
|
|
4511
4536
|
t,
|
|
4512
4537
|
n,
|
|
4513
|
-
...
|
|
4538
|
+
...Zs
|
|
4514
4539
|
]) {
|
|
4515
4540
|
if (!r) continue;
|
|
4516
|
-
let t =
|
|
4541
|
+
let t = $s(Qs(e, r));
|
|
4517
4542
|
if (t) return t;
|
|
4518
4543
|
}
|
|
4519
4544
|
let r = Object.keys(e).find((t) => /name$/i.test(t) && typeof e[t] == "string" && e[t].trim());
|
|
4520
4545
|
return r ? X(e[r]) : "";
|
|
4521
4546
|
}
|
|
4522
|
-
function
|
|
4547
|
+
function tc(e) {
|
|
4523
4548
|
if (!e || typeof e != "object") return "";
|
|
4524
4549
|
let t = [
|
|
4525
4550
|
e.createdBy,
|
|
@@ -4541,67 +4566,67 @@ function Qs(e) {
|
|
|
4541
4566
|
}
|
|
4542
4567
|
return "";
|
|
4543
4568
|
}
|
|
4544
|
-
function
|
|
4569
|
+
function nc(e = i) {
|
|
4545
4570
|
try {
|
|
4546
|
-
return
|
|
4571
|
+
return Ks(e()) || "";
|
|
4547
4572
|
} catch {
|
|
4548
4573
|
return "";
|
|
4549
4574
|
}
|
|
4550
4575
|
}
|
|
4551
|
-
var
|
|
4576
|
+
var rc = (e, t) => a(s, `/module/list?module=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`).then((e) => {
|
|
4552
4577
|
let t = e?.data?.data ?? e?.data ?? [];
|
|
4553
4578
|
return Array.isArray(t) ? t[0] : t;
|
|
4554
4579
|
});
|
|
4555
|
-
async function
|
|
4556
|
-
let { fetchRecord: o =
|
|
4580
|
+
async function ic({ module: e, recordId: t, notice: n, displayField: r = "", deps: a = {} } = {}) {
|
|
4581
|
+
let { fetchRecord: o = rc, fetchUserNameFn: s = Ys, getUser: c = i } = a, l = null;
|
|
4557
4582
|
if (e && t) try {
|
|
4558
4583
|
l = await o(e, t);
|
|
4559
4584
|
} catch {
|
|
4560
4585
|
l = null;
|
|
4561
4586
|
}
|
|
4562
|
-
let u = n?.showRecordName === !1 ? "" :
|
|
4587
|
+
let u = n?.showRecordName === !1 ? "" : ec(l, {
|
|
4563
4588
|
recordNameField: n?.recordNameField,
|
|
4564
4589
|
displayField: r
|
|
4565
4590
|
}), d = "";
|
|
4566
4591
|
if (n?.showCreator !== !1) {
|
|
4567
|
-
let e =
|
|
4592
|
+
let e = tc(l);
|
|
4568
4593
|
if (e) try {
|
|
4569
4594
|
d = X(await s(e));
|
|
4570
4595
|
} catch {
|
|
4571
4596
|
d = "";
|
|
4572
4597
|
}
|
|
4573
|
-
d ||=
|
|
4598
|
+
d ||= nc(c);
|
|
4574
4599
|
}
|
|
4575
4600
|
return {
|
|
4576
4601
|
recordName: u,
|
|
4577
4602
|
creatorName: d
|
|
4578
4603
|
};
|
|
4579
4604
|
}
|
|
4580
|
-
var
|
|
4581
|
-
function
|
|
4605
|
+
var ac = (e, t) => e?.quickCreate ? e.quickCreateOnType === !0 || e.quickCreateOnType !== !1 && t === "submissions" && e.quickCreateModule === "employers" : !1;
|
|
4606
|
+
function oc(e) {
|
|
4582
4607
|
return String(e ?? "").trim().replace(/\s+/g, " ");
|
|
4583
4608
|
}
|
|
4584
|
-
var
|
|
4585
|
-
function
|
|
4586
|
-
let n =
|
|
4587
|
-
return !n || !Array.isArray(t) ? null : t.find((e) =>
|
|
4609
|
+
var sc = (e) => oc(e).toLowerCase();
|
|
4610
|
+
function cc(e, t) {
|
|
4611
|
+
let n = sc(e);
|
|
4612
|
+
return !n || !Array.isArray(t) ? null : t.find((e) => sc(e?.label) === n) ?? null;
|
|
4588
4613
|
}
|
|
4589
|
-
function
|
|
4590
|
-
return t || n ? !1 :
|
|
4614
|
+
function lc({ text: e, disabled: t = !1, modalOpen: n = !1 }) {
|
|
4615
|
+
return t || n ? !1 : oc(e).length >= 3;
|
|
4591
4616
|
}
|
|
4592
4617
|
//#endregion
|
|
4593
4618
|
//#region src/components/form/QuickCreateEditField.jsx
|
|
4594
|
-
var
|
|
4595
|
-
function
|
|
4619
|
+
var uc = f(() => import("./index.js").then((e) => e.i)), dc = f(() => import("./index.js").then((e) => e.n)), fc = (e) => e == null || e === "", pc = (e) => typeof e == "string" && e.includes(".") ? e.split(".") : [e];
|
|
4620
|
+
function mc(e, t, n, r, i) {
|
|
4596
4621
|
let a = e.quickEditIdFrom;
|
|
4597
4622
|
if (a) {
|
|
4598
|
-
let e = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number" ? [...n.slice(0, 2), ...
|
|
4599
|
-
return
|
|
4623
|
+
let e = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number" ? [...n.slice(0, 2), ...pc(a)] : pc(a), i = t?.getFieldValue?.(e);
|
|
4624
|
+
return fc(i) && (i = r?.[a]), fc(i) ? null : i;
|
|
4600
4625
|
}
|
|
4601
|
-
return i && typeof i == "object" ? i.value ?? null :
|
|
4626
|
+
return i && typeof i == "object" ? i.value ?? null : fc(i) ? null : i;
|
|
4602
4627
|
}
|
|
4603
|
-
function
|
|
4604
|
-
let [s, c] = v(null), [l, d] = v(null), f = !!e?.quickCreate, p = !!e?.quickEdit, m = e?.quickCreateModule || e?.lookupCollection || "", h = e?.quickEditModule || e?.lookupCollection || "", _ = g(() => p ?
|
|
4628
|
+
function hc({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValue: a, onDone: o }) {
|
|
4629
|
+
let [s, c] = v(null), [l, d] = v(null), f = !!e?.quickCreate, p = !!e?.quickEdit, m = e?.quickCreateModule || e?.lookupCollection || "", h = e?.quickEditModule || e?.lookupCollection || "", _ = g(() => p ? mc(e, t, n, i, a) : null, [
|
|
4605
4630
|
p,
|
|
4606
4631
|
e,
|
|
4607
4632
|
t,
|
|
@@ -4615,7 +4640,7 @@ function fc({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
4615
4640
|
openCreateWith: null,
|
|
4616
4641
|
isModalOpen: !1
|
|
4617
4642
|
};
|
|
4618
|
-
let ee =
|
|
4643
|
+
let ee = ac(e, r), y = () => c(null), x = () => {
|
|
4619
4644
|
if (e?.quickCreateOnClick) {
|
|
4620
4645
|
e.quickCreateOnClick(), document.activeElement?.blur?.();
|
|
4621
4646
|
return;
|
|
@@ -4639,12 +4664,12 @@ function fc({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
4639
4664
|
module: h,
|
|
4640
4665
|
recordId: String(_)
|
|
4641
4666
|
}), oe = (t) => {
|
|
4642
|
-
let n =
|
|
4667
|
+
let n = Xs(e);
|
|
4643
4668
|
n && (d({
|
|
4644
4669
|
...n,
|
|
4645
4670
|
recordName: "",
|
|
4646
4671
|
creatorName: ""
|
|
4647
|
-
}),
|
|
4672
|
+
}), ic({
|
|
4648
4673
|
module: m,
|
|
4649
4674
|
recordId: t,
|
|
4650
4675
|
notice: n,
|
|
@@ -4656,7 +4681,7 @@ function fc({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
4656
4681
|
creatorName: t
|
|
4657
4682
|
});
|
|
4658
4683
|
}).catch(() => {}));
|
|
4659
|
-
}, S = f && !ee, se = !S && !p ? null : /* @__PURE__ */
|
|
4684
|
+
}, S = f && !ee, se = !S && !p ? null : /* @__PURE__ */ w("div", {
|
|
4660
4685
|
className: "v1-quick-actions",
|
|
4661
4686
|
role: "presentation",
|
|
4662
4687
|
onMouseDown: (e) => e.preventDefault(),
|
|
@@ -4666,28 +4691,28 @@ function fc({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
4666
4691
|
padding: "6px 8px",
|
|
4667
4692
|
borderTop: "1px solid rgba(0,0,0,0.06)"
|
|
4668
4693
|
},
|
|
4669
|
-
children: /* @__PURE__ */
|
|
4694
|
+
children: /* @__PURE__ */ T(re, {
|
|
4670
4695
|
size: 8,
|
|
4671
|
-
children: [S && /* @__PURE__ */
|
|
4696
|
+
children: [S && /* @__PURE__ */ w(b, {
|
|
4672
4697
|
type: "link",
|
|
4673
4698
|
size: "small",
|
|
4674
|
-
icon: /* @__PURE__ */
|
|
4699
|
+
icon: /* @__PURE__ */ w(ge, {}),
|
|
4675
4700
|
onClick: x,
|
|
4676
4701
|
style: { paddingLeft: 0 },
|
|
4677
|
-
children:
|
|
4678
|
-
}), p && /* @__PURE__ */
|
|
4702
|
+
children: Hs(e, m)
|
|
4703
|
+
}), p && /* @__PURE__ */ w(b, {
|
|
4679
4704
|
type: "link",
|
|
4680
4705
|
size: "small",
|
|
4681
|
-
icon: /* @__PURE__ */
|
|
4706
|
+
icon: /* @__PURE__ */ w(ce, {}),
|
|
4682
4707
|
onClick: ae,
|
|
4683
4708
|
disabled: !_,
|
|
4684
|
-
title: _ ? void 0 : `Choose a ${
|
|
4685
|
-
children:
|
|
4709
|
+
title: _ ? void 0 : `Choose a ${Vs(h) || "record"} above first, then edit it here`,
|
|
4710
|
+
children: Us(e, h)
|
|
4686
4711
|
})]
|
|
4687
4712
|
})
|
|
4688
|
-
}), ue = s ? /* @__PURE__ */
|
|
4713
|
+
}), ue = s ? /* @__PURE__ */ w(ne, {
|
|
4689
4714
|
open: !0,
|
|
4690
|
-
title:
|
|
4715
|
+
title: Ws(s.mode, e, s.mode === "create" ? m : h),
|
|
4691
4716
|
width: "min(1080px, 96vw)",
|
|
4692
4717
|
footer: null,
|
|
4693
4718
|
destroyOnClose: !0,
|
|
@@ -4697,15 +4722,15 @@ function fc({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
4697
4722
|
maxHeight: "78vh",
|
|
4698
4723
|
overflowY: "auto"
|
|
4699
4724
|
} },
|
|
4700
|
-
children: /* @__PURE__ */
|
|
4701
|
-
fallback: /* @__PURE__ */
|
|
4725
|
+
children: /* @__PURE__ */ w(u, {
|
|
4726
|
+
fallback: /* @__PURE__ */ w("div", {
|
|
4702
4727
|
style: {
|
|
4703
4728
|
padding: 48,
|
|
4704
4729
|
textAlign: "center"
|
|
4705
4730
|
},
|
|
4706
|
-
children: /* @__PURE__ */
|
|
4731
|
+
children: /* @__PURE__ */ w(ie, {})
|
|
4707
4732
|
}),
|
|
4708
|
-
children: s.mode === "create" ? /* @__PURE__ */
|
|
4733
|
+
children: s.mode === "create" ? /* @__PURE__ */ w(uc, {
|
|
4709
4734
|
moduleName: s.module,
|
|
4710
4735
|
embedded: !0,
|
|
4711
4736
|
breadcrumbItems: [],
|
|
@@ -4714,7 +4739,7 @@ function fc({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
4714
4739
|
onSuccess: (e) => {
|
|
4715
4740
|
y(), oe(e), o?.("create", e);
|
|
4716
4741
|
}
|
|
4717
|
-
}) : /* @__PURE__ */
|
|
4742
|
+
}) : /* @__PURE__ */ w(dc, {
|
|
4718
4743
|
moduleName: s.module,
|
|
4719
4744
|
recordId: s.recordId,
|
|
4720
4745
|
embedded: !0,
|
|
@@ -4725,32 +4750,32 @@ function fc({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
4725
4750
|
}
|
|
4726
4751
|
})
|
|
4727
4752
|
})
|
|
4728
|
-
}) : null, de = l ? /* @__PURE__ */
|
|
4753
|
+
}) : null, de = l ? /* @__PURE__ */ T(ne, {
|
|
4729
4754
|
open: !0,
|
|
4730
|
-
title: /* @__PURE__ */
|
|
4755
|
+
title: /* @__PURE__ */ T("span", {
|
|
4731
4756
|
style: {
|
|
4732
4757
|
display: "inline-flex",
|
|
4733
4758
|
alignItems: "center",
|
|
4734
4759
|
gap: 8
|
|
4735
4760
|
},
|
|
4736
|
-
children: [/* @__PURE__ */
|
|
4761
|
+
children: [/* @__PURE__ */ w(le, { style: { color: "#faad14" } }), l.title]
|
|
4737
4762
|
}),
|
|
4738
4763
|
width: "min(520px, 94vw)",
|
|
4739
4764
|
maskClosable: !1,
|
|
4740
4765
|
onCancel: () => d(null),
|
|
4741
|
-
footer: /* @__PURE__ */
|
|
4766
|
+
footer: /* @__PURE__ */ w(Gs, {
|
|
4742
4767
|
variant: "primary",
|
|
4743
4768
|
type: "primary",
|
|
4744
4769
|
onClick: () => d(null),
|
|
4745
4770
|
children: "OK"
|
|
4746
4771
|
}),
|
|
4747
|
-
children: [/* @__PURE__ */
|
|
4772
|
+
children: [/* @__PURE__ */ w("p", {
|
|
4748
4773
|
style: {
|
|
4749
4774
|
marginTop: 0,
|
|
4750
4775
|
marginBottom: 16
|
|
4751
4776
|
},
|
|
4752
4777
|
children: l.message
|
|
4753
|
-
}), (l.recordName || l.creatorName) && /* @__PURE__ */
|
|
4778
|
+
}), (l.recordName || l.creatorName) && /* @__PURE__ */ T("div", {
|
|
4754
4779
|
style: {
|
|
4755
4780
|
display: "grid",
|
|
4756
4781
|
gridTemplateColumns: "auto 1fr",
|
|
@@ -4759,26 +4784,26 @@ function fc({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
4759
4784
|
borderRadius: 6,
|
|
4760
4785
|
background: "rgba(0,0,0,0.03)"
|
|
4761
4786
|
},
|
|
4762
|
-
children: [l.recordName && /* @__PURE__ */
|
|
4787
|
+
children: [l.recordName && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("span", {
|
|
4763
4788
|
style: { color: "rgba(0,0,0,0.55)" },
|
|
4764
4789
|
children: l.recordLabel
|
|
4765
|
-
}), /* @__PURE__ */
|
|
4790
|
+
}), /* @__PURE__ */ w("strong", { children: l.recordName })] }), l.creatorName && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("span", {
|
|
4766
4791
|
style: { color: "rgba(0,0,0,0.55)" },
|
|
4767
4792
|
children: l.creatorLabel
|
|
4768
|
-
}), /* @__PURE__ */
|
|
4793
|
+
}), /* @__PURE__ */ w("strong", { children: l.creatorName })] })]
|
|
4769
4794
|
})]
|
|
4770
4795
|
}) : null;
|
|
4771
4796
|
return {
|
|
4772
4797
|
footer: se,
|
|
4773
|
-
modal: ue || de ? /* @__PURE__ */
|
|
4798
|
+
modal: ue || de ? /* @__PURE__ */ T(C, { children: [ue, de] }) : null,
|
|
4774
4799
|
openCreateWith: te,
|
|
4775
4800
|
isModalOpen: !!s
|
|
4776
4801
|
};
|
|
4777
4802
|
}
|
|
4778
4803
|
//#endregion
|
|
4779
4804
|
//#region src/components/form/crossFieldRules.js
|
|
4780
|
-
var
|
|
4781
|
-
function
|
|
4805
|
+
var gc = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0;
|
|
4806
|
+
function _c(e, t, n) {
|
|
4782
4807
|
let r = String(t ?? "").includes(".") ? String(t).split(".") : [t];
|
|
4783
4808
|
if (typeof n == "function") {
|
|
4784
4809
|
let e = n(t);
|
|
@@ -4786,23 +4811,23 @@ function mc(e, t, n) {
|
|
|
4786
4811
|
}
|
|
4787
4812
|
return Array.isArray(e) && e.length > 1 ? [...e.slice(0, -1), ...r] : r;
|
|
4788
4813
|
}
|
|
4789
|
-
function
|
|
4814
|
+
function vc({ label: e, message: t, rule: n = {}, value: r, form: i, name: a, prefixFor: o }) {
|
|
4790
4815
|
let s = n.field ?? n.compareField ?? r;
|
|
4791
4816
|
return { validator: async (n, r) => {
|
|
4792
|
-
if (!s ||
|
|
4793
|
-
let c = i?.getFieldValue?.(
|
|
4794
|
-
if (
|
|
4817
|
+
if (!s || gc(r)) return Promise.resolve();
|
|
4818
|
+
let c = i?.getFieldValue?.(_c(a, s, o));
|
|
4819
|
+
if (gc(c)) return Promise.resolve();
|
|
4795
4820
|
let l = Number(c), u = Number(r);
|
|
4796
4821
|
return Number.isNaN(l) || Number.isNaN(u) || u <= l ? Promise.resolve() : Promise.reject(Error(t ?? `${e} must not exceed ${s}`));
|
|
4797
4822
|
} };
|
|
4798
4823
|
}
|
|
4799
|
-
function
|
|
4824
|
+
function yc(e = {}, t, n) {
|
|
4800
4825
|
let r = e.field ?? e.compareField ?? e.value;
|
|
4801
|
-
return r ?
|
|
4826
|
+
return r ? _c(t, r, n) : null;
|
|
4802
4827
|
}
|
|
4803
4828
|
//#endregion
|
|
4804
4829
|
//#region src/components/form/maxCeiling.js
|
|
4805
|
-
function
|
|
4830
|
+
function bc(e, t) {
|
|
4806
4831
|
let n = String(t).split(".").filter(Boolean);
|
|
4807
4832
|
if (!Array.isArray(e)) return n.length > 1 ? n : t;
|
|
4808
4833
|
if (n.length > 1) {
|
|
@@ -4815,14 +4840,14 @@ function _c(e, t) {
|
|
|
4815
4840
|
let r = [...e];
|
|
4816
4841
|
return r[r.length - 1] = n[0], r;
|
|
4817
4842
|
}
|
|
4818
|
-
function
|
|
4819
|
-
let r = e?.getFieldValue?.(
|
|
4843
|
+
function xc(e, t, n) {
|
|
4844
|
+
let r = e?.getFieldValue?.(bc(t, n));
|
|
4820
4845
|
return r != null && r !== "" ? r : e?.getFieldValue?.(n);
|
|
4821
4846
|
}
|
|
4822
|
-
function
|
|
4847
|
+
function Sc(e) {
|
|
4823
4848
|
return String(e ?? "").split(",").map((e) => e.trim()).filter(Boolean);
|
|
4824
4849
|
}
|
|
4825
|
-
function
|
|
4850
|
+
function Cc(e, t) {
|
|
4826
4851
|
for (let n of e ?? []) {
|
|
4827
4852
|
let e = t(n);
|
|
4828
4853
|
if (e == null || e === "") continue;
|
|
@@ -4834,14 +4859,14 @@ function bc(e, t) {
|
|
|
4834
4859
|
}
|
|
4835
4860
|
return null;
|
|
4836
4861
|
}
|
|
4837
|
-
function
|
|
4862
|
+
function wc({ input: e, compareFields: t, readValue: n }) {
|
|
4838
4863
|
let r = {
|
|
4839
4864
|
ok: !0,
|
|
4840
4865
|
field: null,
|
|
4841
4866
|
maximum: null
|
|
4842
4867
|
};
|
|
4843
4868
|
if (e == null || e === "") return r;
|
|
4844
|
-
let i =
|
|
4869
|
+
let i = Cc(t, n);
|
|
4845
4870
|
if (!i) return r;
|
|
4846
4871
|
let a = Number(e);
|
|
4847
4872
|
return Number.isFinite(a) ? {
|
|
@@ -4852,39 +4877,39 @@ function xc({ input: e, compareFields: t, readValue: n }) {
|
|
|
4852
4877
|
}
|
|
4853
4878
|
//#endregion
|
|
4854
4879
|
//#region src/components/form/contextPrefill.js
|
|
4855
|
-
var
|
|
4856
|
-
function
|
|
4880
|
+
var Tc = { candidates: ["applicantId"] };
|
|
4881
|
+
function Ec(e) {
|
|
4857
4882
|
let t = String(e ?? "").trim();
|
|
4858
4883
|
if (!t) return [];
|
|
4859
4884
|
let n = t.endsWith("s") ? t.slice(0, -1) : t;
|
|
4860
4885
|
return [.../* @__PURE__ */ new Set([
|
|
4861
4886
|
`${n}Id`,
|
|
4862
4887
|
`${t}Id`,
|
|
4863
|
-
...
|
|
4888
|
+
...Tc[t] ?? []
|
|
4864
4889
|
])];
|
|
4865
4890
|
}
|
|
4866
|
-
function
|
|
4891
|
+
function Dc(e, t) {
|
|
4867
4892
|
if (!t) return "";
|
|
4868
4893
|
let n = (e) => e && typeof e == "object" ? e.id ?? e.value ?? "" : e ?? "";
|
|
4869
|
-
for (let r of
|
|
4894
|
+
for (let r of Ec(e)) {
|
|
4870
4895
|
let e = String(n(t[r]) || "");
|
|
4871
4896
|
if (e) return e;
|
|
4872
4897
|
}
|
|
4873
4898
|
return "";
|
|
4874
4899
|
}
|
|
4875
|
-
function
|
|
4900
|
+
function Oc(e, t) {
|
|
4876
4901
|
let n = /* @__PURE__ */ new Set();
|
|
4877
4902
|
return (e ?? []).forEach((e) => (e.fields ?? []).forEach((e) => {
|
|
4878
4903
|
e?.prefillFromModule && n.add(t(e.prefillFromModule));
|
|
4879
4904
|
})), [...n];
|
|
4880
4905
|
}
|
|
4881
|
-
function
|
|
4906
|
+
function kc(e) {
|
|
4882
4907
|
return e?.payloadMode === "skip";
|
|
4883
4908
|
}
|
|
4884
|
-
function
|
|
4909
|
+
function Ac(e) {
|
|
4885
4910
|
return Array.isArray(e) ? e : Array.isArray(e?.groups) ? e.groups : Array.isArray(e?.data) ? e.data : Array.isArray(e?.data?.groups) ? e.data.groups : [];
|
|
4886
4911
|
}
|
|
4887
|
-
function
|
|
4912
|
+
function jc(e) {
|
|
4888
4913
|
let t = {};
|
|
4889
4914
|
return (e ?? []).forEach((e) => {
|
|
4890
4915
|
e?.addRow || (e?.fields ?? []).forEach((e) => {
|
|
@@ -4892,7 +4917,7 @@ function Oc(e) {
|
|
|
4892
4917
|
});
|
|
4893
4918
|
}), t;
|
|
4894
4919
|
}
|
|
4895
|
-
function
|
|
4920
|
+
function Mc(e, t) {
|
|
4896
4921
|
if (!e || !t) return;
|
|
4897
4922
|
let n = e;
|
|
4898
4923
|
for (let e of String(t).split(".")) {
|
|
@@ -4907,7 +4932,7 @@ function kc(e, t) {
|
|
|
4907
4932
|
}
|
|
4908
4933
|
return n;
|
|
4909
4934
|
}
|
|
4910
|
-
function
|
|
4935
|
+
function Nc(e, t) {
|
|
4911
4936
|
if (!(!e || !t)) for (let n of [
|
|
4912
4937
|
t.prefillFrom,
|
|
4913
4938
|
t.field,
|
|
@@ -4915,12 +4940,12 @@ function Ac(e, t) {
|
|
|
4915
4940
|
]) {
|
|
4916
4941
|
if (!n) continue;
|
|
4917
4942
|
let t = e[n];
|
|
4918
|
-
if (t ??= V(e, n), t ??=
|
|
4943
|
+
if (t ??= V(e, n), t ??= Mc(e, n), t != null) return t;
|
|
4919
4944
|
}
|
|
4920
4945
|
}
|
|
4921
4946
|
//#endregion
|
|
4922
4947
|
//#region src/components/form/ValidationOverrideCheckbox.jsx
|
|
4923
|
-
function
|
|
4948
|
+
function Pc({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
|
|
4924
4949
|
let a = Bi(t), o = te.useWatch(n, e);
|
|
4925
4950
|
if (!a) return null;
|
|
4926
4951
|
let s = a.label || "Allow beyond the limit", c = () => {
|
|
@@ -4932,14 +4957,14 @@ function jc({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
|
|
|
4932
4957
|
e.setFieldValue(n, !1), c();
|
|
4933
4958
|
return;
|
|
4934
4959
|
}
|
|
4935
|
-
let i = await
|
|
4960
|
+
let i = await Qa(qi(t));
|
|
4936
4961
|
e.setFieldValue(n, !!i), c();
|
|
4937
4962
|
}, u = a.help ? `${s} — ${a.help}` : s;
|
|
4938
|
-
return /* @__PURE__ */
|
|
4963
|
+
return /* @__PURE__ */ w(ae, {
|
|
4939
4964
|
title: u,
|
|
4940
|
-
children: /* @__PURE__ */
|
|
4965
|
+
children: /* @__PURE__ */ w("span", {
|
|
4941
4966
|
className: "v1-override-wrap",
|
|
4942
|
-
children: /* @__PURE__ */
|
|
4967
|
+
children: /* @__PURE__ */ w(x, {
|
|
4943
4968
|
className: "v1-override-checkbox",
|
|
4944
4969
|
checked: !!o,
|
|
4945
4970
|
disabled: i,
|
|
@@ -4951,34 +4976,34 @@ function jc({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
|
|
|
4951
4976
|
}
|
|
4952
4977
|
//#endregion
|
|
4953
4978
|
//#region src/components/form/prefillWhenRules.js
|
|
4954
|
-
var
|
|
4955
|
-
function
|
|
4979
|
+
var Fc = (e) => String(e ?? "");
|
|
4980
|
+
function Ic(e) {
|
|
4956
4981
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
4957
4982
|
return (Array.isArray(e) ? e : []).forEach((e) => {
|
|
4958
4983
|
let r = e?.field;
|
|
4959
4984
|
!r || t.has(r) || (t.add(r), n.push(r));
|
|
4960
4985
|
}), n;
|
|
4961
4986
|
}
|
|
4962
|
-
function
|
|
4963
|
-
return
|
|
4987
|
+
function Lc(e, t, n, r) {
|
|
4988
|
+
return Ic(e).map((e) => ({
|
|
4964
4989
|
field: e,
|
|
4965
4990
|
path: n(t, e, r)
|
|
4966
4991
|
}));
|
|
4967
4992
|
}
|
|
4968
|
-
function
|
|
4969
|
-
return !e || !e.field ? !1 :
|
|
4993
|
+
function Rc(e, t = {}) {
|
|
4994
|
+
return !e || !e.field ? !1 : Fc(t[e.field]) === Fc(e.value);
|
|
4970
4995
|
}
|
|
4971
|
-
function
|
|
4972
|
-
let o = (Array.isArray(e) ? e : []).find((e) =>
|
|
4996
|
+
function zc({ rules: e, watched: t = {}, current: n, lastApplied: r, clearOnMismatch: i = !0, initial: a = !1 } = {}) {
|
|
4997
|
+
let o = (Array.isArray(e) ? e : []).find((e) => Rc(e, t));
|
|
4973
4998
|
return o ? o.clearValue ? a ? { action: "none" } : { action: "clear" } : {
|
|
4974
4999
|
action: "set",
|
|
4975
5000
|
value: o.setValue
|
|
4976
|
-
} : i && r !== void 0 &&
|
|
5001
|
+
} : i && r !== void 0 && Fc(n) === Fc(r) ? { action: "clear" } : { action: "none" };
|
|
4977
5002
|
}
|
|
4978
5003
|
//#endregion
|
|
4979
5004
|
//#region src/components/form/optionConstraints.js
|
|
4980
5005
|
var Z = (e) => String(e ?? "").trim().toLowerCase();
|
|
4981
|
-
function
|
|
5006
|
+
function Bc(e) {
|
|
4982
5007
|
let t = Array.isArray(e) ? e : [e], n = [];
|
|
4983
5008
|
return t.forEach((e) => {
|
|
4984
5009
|
if (e != null && e !== "") {
|
|
@@ -4998,42 +5023,42 @@ function Lc(e) {
|
|
|
4998
5023
|
}
|
|
4999
5024
|
}), n;
|
|
5000
5025
|
}
|
|
5001
|
-
function
|
|
5002
|
-
let n =
|
|
5026
|
+
function Vc(e = [], t) {
|
|
5027
|
+
let n = Bc(t);
|
|
5003
5028
|
if (!n.length || !Array.isArray(e) || e.length === 0) return e;
|
|
5004
5029
|
let r = new Set(n), i = e.filter((e) => e == null ? !1 : typeof e == "object" ? r.has(Z(e.value)) || r.has(Z(e.label)) : r.has(Z(e)));
|
|
5005
5030
|
return i.length > 0 ? i : e;
|
|
5006
5031
|
}
|
|
5007
|
-
function
|
|
5032
|
+
function Hc(e) {
|
|
5008
5033
|
let t = [];
|
|
5009
5034
|
return [e?.setValue, e?.setValueLabel].forEach((e) => {
|
|
5010
5035
|
e != null && e !== "" && t.push(Z(e));
|
|
5011
5036
|
}), t;
|
|
5012
5037
|
}
|
|
5013
|
-
function
|
|
5038
|
+
function Uc(e, t = {}) {
|
|
5014
5039
|
let n = Array.isArray(e) ? e : [], r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
5015
5040
|
return n.forEach((e) => {
|
|
5016
5041
|
if (!e || e.clearValue) return;
|
|
5017
|
-
let n =
|
|
5042
|
+
let n = Hc(e);
|
|
5018
5043
|
if (!n.length) return;
|
|
5019
|
-
let a =
|
|
5044
|
+
let a = Rc(e, t) ? i : r;
|
|
5020
5045
|
n.forEach((e) => a.add(e));
|
|
5021
5046
|
}), i.forEach((e) => r.delete(e)), [...r];
|
|
5022
5047
|
}
|
|
5023
|
-
function
|
|
5024
|
-
let r =
|
|
5048
|
+
function Wc(e = [], t, n) {
|
|
5049
|
+
let r = Uc(t, n);
|
|
5025
5050
|
if (!r.length || !Array.isArray(e) || e.length === 0) return e;
|
|
5026
5051
|
let i = new Set(r);
|
|
5027
5052
|
return e.filter((e) => e == null ? !0 : typeof e == "object" ? !(i.has(Z(e.value)) || i.has(Z(e.label))) : !i.has(Z(e)));
|
|
5028
5053
|
}
|
|
5029
|
-
function
|
|
5054
|
+
function Gc(e, t = {}, n) {
|
|
5030
5055
|
let r = Array.isArray(e) ? e : [];
|
|
5031
5056
|
if (n == null || n === "") return [];
|
|
5032
5057
|
let i = Z(n), a = [], o = /* @__PURE__ */ new Set();
|
|
5033
5058
|
return r.forEach((e) => {
|
|
5034
5059
|
if (!e || e.clearValue) return;
|
|
5035
5060
|
let { setValue: n, setValueLabel: r } = e;
|
|
5036
|
-
n != null && n !== "" && r && Z(n) === i &&
|
|
5061
|
+
n != null && n !== "" && r && Z(n) === i && Rc(e, t) && (o.has(Z(n)) || (o.add(Z(n)), a.push({
|
|
5037
5062
|
value: n,
|
|
5038
5063
|
label: r
|
|
5039
5064
|
})));
|
|
@@ -5041,8 +5066,8 @@ function Hc(e, t = {}, n) {
|
|
|
5041
5066
|
}
|
|
5042
5067
|
//#endregion
|
|
5043
5068
|
//#region src/components/form/optionRowFilters.js
|
|
5044
|
-
var
|
|
5045
|
-
function
|
|
5069
|
+
var Kc = 64;
|
|
5070
|
+
function qc(e) {
|
|
5046
5071
|
if (String(e ?? "").trim() !== "currentUserId") return "";
|
|
5047
5072
|
try {
|
|
5048
5073
|
return typeof localStorage > "u" ? "" : String(localStorage.getItem("userId") ?? "").trim();
|
|
@@ -5050,34 +5075,34 @@ function Wc(e) {
|
|
|
5050
5075
|
return "";
|
|
5051
5076
|
}
|
|
5052
5077
|
}
|
|
5053
|
-
var Q = (e) => String(e ?? "").trim().toLowerCase(),
|
|
5054
|
-
function
|
|
5078
|
+
var Q = (e) => String(e ?? "").trim().toLowerCase(), Jc = (e) => e != null && String(e).trim() !== "";
|
|
5079
|
+
function Yc(e) {
|
|
5055
5080
|
let t = Array.isArray(e) ? e : String(e ?? "").split(",");
|
|
5056
5081
|
return new Set(t.map(Q).filter((e) => e !== ""));
|
|
5057
5082
|
}
|
|
5058
|
-
function
|
|
5059
|
-
return !t || !Array.isArray(e) || e.length === 0 ? !1 : e.some((e) =>
|
|
5083
|
+
function Xc(e, t) {
|
|
5084
|
+
return !t || !Array.isArray(e) || e.length === 0 ? !1 : e.some((e) => Jc(e?.extraData?.[t]));
|
|
5060
5085
|
}
|
|
5061
|
-
function
|
|
5086
|
+
function Zc(e, t, n) {
|
|
5062
5087
|
let r = e?.extraData?.[t];
|
|
5063
|
-
if (!
|
|
5064
|
-
let i =
|
|
5088
|
+
if (!Jc(n)) return r === !0;
|
|
5089
|
+
let i = Yc(n);
|
|
5065
5090
|
return i.size === 0 ? r === !0 : i.has(Q(r));
|
|
5066
5091
|
}
|
|
5067
|
-
function
|
|
5092
|
+
function Qc(e, t) {
|
|
5068
5093
|
let n = /* @__PURE__ */ new Map();
|
|
5069
5094
|
return (Array.isArray(e) ? e : []).forEach((e) => {
|
|
5070
5095
|
let r = Q(e?.value);
|
|
5071
5096
|
r && n.set(r, Q(e?.extraData?.[t]));
|
|
5072
5097
|
}), n;
|
|
5073
5098
|
}
|
|
5074
|
-
function
|
|
5099
|
+
function $c(e, t, n) {
|
|
5075
5100
|
let r = Q(n);
|
|
5076
5101
|
if (!r) return !1;
|
|
5077
5102
|
let i = /* @__PURE__ */ new Set(), a = Q(e);
|
|
5078
5103
|
if (!a) return !1;
|
|
5079
5104
|
i.add(a);
|
|
5080
|
-
for (let e = 0; e <
|
|
5105
|
+
for (let e = 0; e < Kc; e += 1) {
|
|
5081
5106
|
let e = t.get(a);
|
|
5082
5107
|
if (!e) return !1;
|
|
5083
5108
|
if (e === r) return !0;
|
|
@@ -5086,74 +5111,74 @@ function Xc(e, t, n) {
|
|
|
5086
5111
|
}
|
|
5087
5112
|
return !1;
|
|
5088
5113
|
}
|
|
5089
|
-
function
|
|
5114
|
+
function el(e = {}) {
|
|
5090
5115
|
let t = [], n = (e) => {
|
|
5091
5116
|
let n = String(e ?? "").trim();
|
|
5092
5117
|
n && !t.includes(n) && t.push(n);
|
|
5093
5118
|
};
|
|
5094
5119
|
return (Array.isArray(e.extraFields) ? e.extraFields : []).forEach(n), n(e.optionsRequireExtraField), n(e.optionsHierarchyParentField), t;
|
|
5095
5120
|
}
|
|
5096
|
-
function
|
|
5121
|
+
function tl(e, t = {}, n = {}) {
|
|
5097
5122
|
if (!Array.isArray(e) || e.length === 0) return e;
|
|
5098
5123
|
let r = n.source ? `[${n.source}]` : "[optionRowFilters]", i = t.field ?? t.label ?? "(unnamed field)", a = typeof n.warn == "function" ? n.warn : (e) => {
|
|
5099
5124
|
typeof console < "u" && console.warn(e);
|
|
5100
5125
|
}, o = e, s = String(t.optionsRequireExtraField ?? "").trim();
|
|
5101
|
-
s && (
|
|
5126
|
+
s && (Xc(o, s) ? o = o.filter((e) => Zc(e, s, t.optionsRequireExtraValue)) : a(`${r} "${i}": option filter SKIPPED — no option carried extraData["${s}"], so the value filter could not be applied (the lookup API returned no such extra field). Showing the unfiltered list; this is NOT "nothing matched".`));
|
|
5102
5127
|
let c = String(t.optionsHierarchyParentField ?? "").trim();
|
|
5103
5128
|
if (c) {
|
|
5104
|
-
let n = String(t.optionsHierarchySelfFrom ?? "").trim() || "currentUserId", s =
|
|
5129
|
+
let n = String(t.optionsHierarchySelfFrom ?? "").trim() || "currentUserId", s = qc(n);
|
|
5105
5130
|
if (!s) a(`${r} "${i}": hierarchy filter SKIPPED — identity "${n}" could not be resolved (no signed-in user id available). Showing the list unrestricted by reporting line.`);
|
|
5106
|
-
else if (!
|
|
5131
|
+
else if (!Xc(e, c)) a(`${r} "${i}": hierarchy filter SKIPPED — no option carried extraData["${c}"], so the reporting chain could not be walked (the lookup API returned no such extra field). Showing the list unrestricted by reporting line; this is NOT "nobody reports to you".`);
|
|
5107
5132
|
else {
|
|
5108
|
-
let t =
|
|
5109
|
-
o = o.filter((e) =>
|
|
5133
|
+
let t = Qc(e, c);
|
|
5134
|
+
o = o.filter((e) => $c(e?.value, t, s));
|
|
5110
5135
|
}
|
|
5111
5136
|
}
|
|
5112
5137
|
return o;
|
|
5113
5138
|
}
|
|
5114
5139
|
//#endregion
|
|
5115
5140
|
//#region src/components/form/fieldTooltip.js
|
|
5116
|
-
var
|
|
5117
|
-
function
|
|
5118
|
-
return
|
|
5141
|
+
var nl = (e) => e == null || String(e).trim() === "", rl = (e) => e === !0 || e === 1 || e === "1" || e === "true";
|
|
5142
|
+
function il(e) {
|
|
5143
|
+
return nl(e?.tooltip) ? rl(e?.infoEnabled) && !nl(e?.infoText) ? String(e.infoText) : "" : String(e.tooltip);
|
|
5119
5144
|
}
|
|
5120
5145
|
//#endregion
|
|
5121
5146
|
//#region src/components/form/autofillValue.js
|
|
5122
|
-
var
|
|
5123
|
-
function
|
|
5147
|
+
var al = (e) => e == null || typeof e == "string" && e.trim() === "";
|
|
5148
|
+
function ol(e, t = {}, n = () => void 0) {
|
|
5124
5149
|
let { optionKey: r } = t, i = (e ? n(e, r) : void 0) ?? e?.extraData?.[r] ?? null, { fallback: a } = t;
|
|
5125
|
-
return
|
|
5150
|
+
return al(i) && a != null && a !== "" ? a : i;
|
|
5126
5151
|
}
|
|
5127
5152
|
//#endregion
|
|
5128
5153
|
//#region src/components/form/dependentLookupReset.js
|
|
5129
|
-
var
|
|
5130
|
-
function
|
|
5131
|
-
return !(!r || e ===
|
|
5154
|
+
var sl = Symbol("parentFilterUnseen"), cl = (e) => e == null || e === "", ll = (e, t) => String(e ?? "") === String(t ?? "");
|
|
5155
|
+
function ul({ previous: e, next: t, currentValue: n, scoped: r = !0 }) {
|
|
5156
|
+
return !(!r || e === sl || ll(e, t) || cl(e) || cl(n));
|
|
5132
5157
|
}
|
|
5133
5158
|
//#endregion
|
|
5134
5159
|
//#region src/utils/roleAllowsAction.js
|
|
5135
|
-
function
|
|
5136
|
-
return e == null ? !0 : typeof e == "object" ?
|
|
5160
|
+
function dl(e) {
|
|
5161
|
+
return e == null ? !0 : typeof e == "object" ? dl(e.permission ?? e.allowed ?? e.value) : e !== !1 && e !== 0 && e !== "0";
|
|
5137
5162
|
}
|
|
5138
|
-
function
|
|
5163
|
+
function fl(e, t) {
|
|
5139
5164
|
let n = String(t ?? "").trim().toLowerCase();
|
|
5140
5165
|
if (!(!n || !e || typeof e != "object")) for (let [t, r] of Object.entries(e)) {
|
|
5141
5166
|
let e = String(t).trim().toLowerCase();
|
|
5142
5167
|
if (e === n || e === `${n}s` || `${e}s` === n) return r && typeof r == "object" ? r : void 0;
|
|
5143
5168
|
}
|
|
5144
5169
|
}
|
|
5145
|
-
function
|
|
5170
|
+
function pl(e, t) {
|
|
5146
5171
|
if (Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
5147
5172
|
let n = `${t}Access`;
|
|
5148
5173
|
if (Object.prototype.hasOwnProperty.call(e, n)) return e[n];
|
|
5149
5174
|
}
|
|
5150
|
-
function
|
|
5175
|
+
function ml(e, t) {
|
|
5151
5176
|
if (!e) return !0;
|
|
5152
5177
|
try {
|
|
5153
5178
|
let n = JSON.parse(localStorage.getItem("menuPermission") || "{}"), [r, i] = String(e).split("."), a = i ?? r, o = i ? [r, t] : [t];
|
|
5154
5179
|
for (let e of o) {
|
|
5155
|
-
let t =
|
|
5156
|
-
if (t) return
|
|
5180
|
+
let t = fl(n, e);
|
|
5181
|
+
if (t) return dl(pl(t, a));
|
|
5157
5182
|
}
|
|
5158
5183
|
return !0;
|
|
5159
5184
|
} catch {
|
|
@@ -5162,10 +5187,10 @@ function dl(e, t) {
|
|
|
5162
5187
|
}
|
|
5163
5188
|
//#endregion
|
|
5164
5189
|
//#region src/utils/afterSubmitNav.js
|
|
5165
|
-
function
|
|
5190
|
+
function hl(e) {
|
|
5166
5191
|
return (e ?? []).filter((e) => e?.afterSubmit?.mode).sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.afterSubmit ?? null;
|
|
5167
5192
|
}
|
|
5168
|
-
function
|
|
5193
|
+
function gl(e, t, n) {
|
|
5169
5194
|
let r = String(e ?? "").trim();
|
|
5170
5195
|
return !r || !r.startsWith("/") || r.startsWith("//") || /^[a-z][a-z0-9+.-]*:/i.test(r) ? null : r.replace(/:([A-Za-z_][\w]*)/g, (e, r) => {
|
|
5171
5196
|
let i = r === "id" ? t : n?.[r];
|
|
@@ -5174,103 +5199,103 @@ function pl(e, t, n) {
|
|
|
5174
5199
|
}
|
|
5175
5200
|
//#endregion
|
|
5176
5201
|
//#region src/utils/backNav.js
|
|
5177
|
-
function
|
|
5202
|
+
function _l(e = typeof window < "u" ? window : void 0) {
|
|
5178
5203
|
let t = e?.history?.state?.idx;
|
|
5179
5204
|
return typeof t == "number" && t > 0;
|
|
5180
5205
|
}
|
|
5181
|
-
function
|
|
5182
|
-
return t && e ? { path: e } :
|
|
5206
|
+
function vl({ cancelPath: e, cancelPathPriority: t = !1, fallbackPath: n = "/", win: r = typeof window < "u" ? window : void 0 } = {}) {
|
|
5207
|
+
return t && e ? { path: e } : _l(r) ? { back: !0 } : e ? { path: e } : { path: n };
|
|
5183
5208
|
}
|
|
5184
|
-
function
|
|
5185
|
-
let n =
|
|
5209
|
+
function yl(e, t = {}) {
|
|
5210
|
+
let n = vl(t);
|
|
5186
5211
|
return n.back ? e(-1) : e(n.path), n;
|
|
5187
5212
|
}
|
|
5188
5213
|
//#endregion
|
|
5189
5214
|
//#region src/components/form/educationRules.js
|
|
5190
|
-
var
|
|
5191
|
-
function
|
|
5215
|
+
var bl = (e) => e == null ? "" : String(e).trim();
|
|
5216
|
+
function xl(e, t) {
|
|
5192
5217
|
let n = e?.regionRules;
|
|
5193
5218
|
if (!n || typeof n != "object") return e ?? {};
|
|
5194
|
-
let r =
|
|
5219
|
+
let r = bl(t), i = n[r] ?? n[r.toUpperCase()] ?? n.default;
|
|
5195
5220
|
return !i || typeof i != "object" ? e ?? {} : {
|
|
5196
5221
|
...e,
|
|
5197
5222
|
...i
|
|
5198
5223
|
};
|
|
5199
5224
|
}
|
|
5200
|
-
function
|
|
5225
|
+
function Sl(e) {
|
|
5201
5226
|
return e?.allowInProgress !== !1;
|
|
5202
5227
|
}
|
|
5203
|
-
function
|
|
5204
|
-
return
|
|
5228
|
+
function Cl(e) {
|
|
5229
|
+
return Sl(e) ? "" : El(e) ? e?.inProgressWarningMessage || e?.inProgressMessage || "In this region an unfinished qualification is not usually accepted when a candidate is put forward for a role. You can still record it here — just be aware it will have to be completed before they can be submitted." : e?.inProgressMessage || "This one needs to be finished before the application can go ahead. Please untick “still ongoing”, or remove the row.";
|
|
5205
5230
|
}
|
|
5206
|
-
function
|
|
5207
|
-
return
|
|
5231
|
+
function wl(e) {
|
|
5232
|
+
return Sl(e) ? "allow" : bl(e?.inProgressSeverity).toLowerCase() === "warn" ? "warn" : "block";
|
|
5208
5233
|
}
|
|
5209
|
-
function
|
|
5210
|
-
return
|
|
5234
|
+
function Tl(e) {
|
|
5235
|
+
return wl(e) === "block";
|
|
5211
5236
|
}
|
|
5212
|
-
function
|
|
5213
|
-
return
|
|
5237
|
+
function El(e) {
|
|
5238
|
+
return wl(e) === "warn";
|
|
5214
5239
|
}
|
|
5215
|
-
function
|
|
5216
|
-
if (!
|
|
5217
|
-
let t =
|
|
5240
|
+
function Dl(e) {
|
|
5241
|
+
if (!Tl(e)) return null;
|
|
5242
|
+
let t = Cl(e);
|
|
5218
5243
|
return { validator: (e, n) => n === !0 ? Promise.reject(Error(t)) : Promise.resolve() };
|
|
5219
5244
|
}
|
|
5220
|
-
function
|
|
5245
|
+
function Ol(e, t = {}) {
|
|
5221
5246
|
let n = t.tieBreak ?? "endDate", r = t.field ?? "startDate";
|
|
5222
5247
|
for (let t of [n, r]) {
|
|
5223
5248
|
let n = e?.[t];
|
|
5224
5249
|
if (n == null || n === "") continue;
|
|
5225
|
-
let r =
|
|
5250
|
+
let r = E(n);
|
|
5226
5251
|
if (r.isValid()) return r.valueOf();
|
|
5227
5252
|
}
|
|
5228
5253
|
return null;
|
|
5229
5254
|
}
|
|
5230
|
-
function
|
|
5255
|
+
function kl(e, t = {}) {
|
|
5231
5256
|
let n = t.inProgressField ?? "currentStudyingHere";
|
|
5232
5257
|
return !!e?.[n];
|
|
5233
5258
|
}
|
|
5234
|
-
function
|
|
5259
|
+
function Al(e = [], t = {}) {
|
|
5235
5260
|
let n = (t.direction ?? "desc") === "desc";
|
|
5236
5261
|
return e.map((e, n) => ({
|
|
5237
5262
|
index: n,
|
|
5238
|
-
key:
|
|
5239
|
-
ongoing: t.inProgressFirst !== !1 &&
|
|
5263
|
+
key: Ol(e, t),
|
|
5264
|
+
ongoing: t.inProgressFirst !== !1 && kl(e, t)
|
|
5240
5265
|
})).slice().sort((e, t) => e.ongoing === t.ongoing ? e.key === null && t.key === null ? e.index - t.index : e.key === null ? 1 : t.key === null ? -1 : e.key === t.key ? e.index - t.index : n ? t.key - e.key : e.key - t.key : e.ongoing ? -1 : 1).map((e) => e.index);
|
|
5241
5266
|
}
|
|
5242
|
-
function
|
|
5267
|
+
function jl(e, t, n = {}) {
|
|
5243
5268
|
if (!Array.isArray(e) || e.length < 2 || t == null || t < 0 || t >= e.length) return null;
|
|
5244
|
-
let r =
|
|
5269
|
+
let r = Al(e, n).indexOf(t);
|
|
5245
5270
|
return r === -1 || r === t ? null : {
|
|
5246
5271
|
from: t,
|
|
5247
5272
|
to: r,
|
|
5248
|
-
reason:
|
|
5273
|
+
reason: kl(e[t], n) ? "inProgress" : "outOfOrder"
|
|
5249
5274
|
};
|
|
5250
5275
|
}
|
|
5251
|
-
var
|
|
5276
|
+
var Ml = Object.freeze({
|
|
5252
5277
|
inProgress: "You’ve marked this one as still ongoing, so it’s the most recent. Shall we move it to the top? This list reads best newest first.",
|
|
5253
5278
|
outOfOrder: "These dates make this the most recent one. Shall we move it to the top? This list reads best newest first.",
|
|
5254
5279
|
ok: "Yes, move it up",
|
|
5255
5280
|
keep: "No, leave it here"
|
|
5256
5281
|
});
|
|
5257
|
-
function
|
|
5282
|
+
function Nl(e, t = {}) {
|
|
5258
5283
|
let n = {
|
|
5259
|
-
...
|
|
5284
|
+
...Ml,
|
|
5260
5285
|
...t.messages ?? {}
|
|
5261
5286
|
};
|
|
5262
5287
|
return n[e] ?? n.outOfOrder;
|
|
5263
5288
|
}
|
|
5264
|
-
function
|
|
5265
|
-
let n = t.levelField ?? "qualification", r =
|
|
5289
|
+
function Pl(e, t = {}) {
|
|
5290
|
+
let n = t.levelField ?? "qualification", r = bl(e?.[n]);
|
|
5266
5291
|
if (!r) return null;
|
|
5267
5292
|
let i = t.levels ?? {}, a = i[r] ?? i[r.toLowerCase()] ?? i[r.toUpperCase()];
|
|
5268
|
-
return Number.isFinite(Number(a)) ? Number(a) :
|
|
5293
|
+
return Number.isFinite(Number(a)) ? Number(a) : Fl(r, t);
|
|
5269
5294
|
}
|
|
5270
|
-
function
|
|
5295
|
+
function Fl(e, t) {
|
|
5271
5296
|
let n = Array.isArray(t?.levelPatterns) ? t.levelPatterns : [], r = e.toLowerCase();
|
|
5272
5297
|
for (let e of n) {
|
|
5273
|
-
let t =
|
|
5298
|
+
let t = bl(e?.match);
|
|
5274
5299
|
if (!t) continue;
|
|
5275
5300
|
let n;
|
|
5276
5301
|
try {
|
|
@@ -5282,14 +5307,14 @@ function Ml(e, t) {
|
|
|
5282
5307
|
}
|
|
5283
5308
|
return null;
|
|
5284
5309
|
}
|
|
5285
|
-
function
|
|
5286
|
-
return
|
|
5310
|
+
function Il(e, t = {}) {
|
|
5311
|
+
return bl((t?.levelLabels ?? {})[e]) || bl(e);
|
|
5287
5312
|
}
|
|
5288
|
-
function
|
|
5313
|
+
function Ll(e = [], t = {}) {
|
|
5289
5314
|
if (!t || t.requireBelow === !1) return [];
|
|
5290
5315
|
let n = t.levels ?? {}, r = t.requiredLevels ?? [];
|
|
5291
5316
|
if (!r.length) return [];
|
|
5292
|
-
let i = e.map((e) =>
|
|
5317
|
+
let i = e.map((e) => Pl(e, t)).filter((e) => e !== null);
|
|
5293
5318
|
if (!i.length) return [];
|
|
5294
5319
|
let a = Math.max(...i), o = [];
|
|
5295
5320
|
return r.forEach((e) => {
|
|
@@ -5297,43 +5322,43 @@ function Pl(e = [], t = {}) {
|
|
|
5297
5322
|
Number.isFinite(r) && (r >= a || i.includes(r) || o.push(t));
|
|
5298
5323
|
}), o;
|
|
5299
5324
|
}
|
|
5300
|
-
function
|
|
5301
|
-
let n =
|
|
5325
|
+
function Rl(e, t = {}) {
|
|
5326
|
+
let n = Ll(e, t);
|
|
5302
5327
|
if (!n.length) return "";
|
|
5303
|
-
let r = n.map((e) =>
|
|
5328
|
+
let r = n.map((e) => Il(e, t)).join(", ");
|
|
5304
5329
|
return (t.message || "You’ve added a higher qualification but not the {missing} below it. Please add that too.").replace("{missing}", r);
|
|
5305
5330
|
}
|
|
5306
|
-
async function
|
|
5331
|
+
async function zl({ group: e, rows: t, rowIndex: n, move: r, confirm: i }) {
|
|
5307
5332
|
let a = e?.orderBy;
|
|
5308
5333
|
if (!a || a.confirmMove === !1 || typeof r != "function") return !1;
|
|
5309
|
-
let o =
|
|
5334
|
+
let o = jl(t, n, a);
|
|
5310
5335
|
if (!o) return !1;
|
|
5311
5336
|
let s = {
|
|
5312
|
-
...
|
|
5337
|
+
...Ml,
|
|
5313
5338
|
...a.messages ?? {}
|
|
5314
5339
|
};
|
|
5315
5340
|
return await i({
|
|
5316
5341
|
reason: o.reason,
|
|
5317
5342
|
title: o.reason === "inProgress" ? "This looks like the most recent one" : "These dates make this the most recent one",
|
|
5318
|
-
body:
|
|
5343
|
+
body: Nl(o.reason, a),
|
|
5319
5344
|
okText: s.ok,
|
|
5320
5345
|
cancelText: s.keep,
|
|
5321
5346
|
from: o.from,
|
|
5322
5347
|
to: o.to
|
|
5323
5348
|
}) ? (r(o.from, o.to), !0) : !1;
|
|
5324
5349
|
}
|
|
5325
|
-
function
|
|
5326
|
-
let n =
|
|
5350
|
+
function Bl(e, t) {
|
|
5351
|
+
let n = xl(e, t), r = n?.orderBy?.inProgressField;
|
|
5327
5352
|
return r ? {
|
|
5328
5353
|
name: n.name,
|
|
5329
5354
|
label: n.label ?? n.name,
|
|
5330
5355
|
rowsKey: n.payloadKey || n.name,
|
|
5331
5356
|
inProgressField: r,
|
|
5332
|
-
severity:
|
|
5333
|
-
message:
|
|
5357
|
+
severity: wl(n),
|
|
5358
|
+
message: Cl(n)
|
|
5334
5359
|
} : null;
|
|
5335
5360
|
}
|
|
5336
|
-
function
|
|
5361
|
+
function Vl(e = [], t, n) {
|
|
5337
5362
|
if (!n) return {
|
|
5338
5363
|
severity: "allow",
|
|
5339
5364
|
message: "",
|
|
@@ -5341,8 +5366,8 @@ function Rl(e = [], t, n) {
|
|
|
5341
5366
|
};
|
|
5342
5367
|
let r = null;
|
|
5343
5368
|
for (let i of e) {
|
|
5344
|
-
let e =
|
|
5345
|
-
if (!(!e || e.severity === "allow") &&
|
|
5369
|
+
let e = Bl(i, t);
|
|
5370
|
+
if (!(!e || e.severity === "allow") && Hl(n, e.rowsKey).some((t) => kl(t, e))) {
|
|
5346
5371
|
if (e.severity === "block") return {
|
|
5347
5372
|
severity: "block",
|
|
5348
5373
|
message: e.message,
|
|
@@ -5361,23 +5386,23 @@ function Rl(e = [], t, n) {
|
|
|
5361
5386
|
group: null
|
|
5362
5387
|
};
|
|
5363
5388
|
}
|
|
5364
|
-
function
|
|
5389
|
+
function Hl(e, t) {
|
|
5365
5390
|
let n = e?.[t];
|
|
5366
5391
|
return Array.isArray(n) ? n : Array.isArray(n?.rows) ? n.rows : [];
|
|
5367
5392
|
}
|
|
5368
|
-
function
|
|
5393
|
+
function Ul(e) {
|
|
5369
5394
|
return String(e?.severity ?? "").toLowerCase() === "block" ? "block" : "warn";
|
|
5370
5395
|
}
|
|
5371
|
-
function
|
|
5396
|
+
function Wl(e = [], t = {}) {
|
|
5372
5397
|
let n = null;
|
|
5373
5398
|
for (let r of e) {
|
|
5374
5399
|
let e = r?.levelRule;
|
|
5375
5400
|
if (!e) continue;
|
|
5376
|
-
let i =
|
|
5401
|
+
let i = Gl(t, r);
|
|
5377
5402
|
if (!i.length) continue;
|
|
5378
|
-
let a =
|
|
5403
|
+
let a = Rl(i, e);
|
|
5379
5404
|
if (a) {
|
|
5380
|
-
if (
|
|
5405
|
+
if (Ul(e) === "block") return {
|
|
5381
5406
|
severity: "block",
|
|
5382
5407
|
message: a,
|
|
5383
5408
|
group: r
|
|
@@ -5395,7 +5420,7 @@ function Vl(e = [], t = {}) {
|
|
|
5395
5420
|
group: null
|
|
5396
5421
|
};
|
|
5397
5422
|
}
|
|
5398
|
-
function
|
|
5423
|
+
function Gl(e, t) {
|
|
5399
5424
|
for (let n of [t?.name, t?.payloadKey]) {
|
|
5400
5425
|
if (!n) continue;
|
|
5401
5426
|
let t = e?.[n];
|
|
@@ -5405,10 +5430,10 @@ function Hl(e, t) {
|
|
|
5405
5430
|
}
|
|
5406
5431
|
//#endregion
|
|
5407
5432
|
//#region src/components/form/clearGroupOnChange.js
|
|
5408
|
-
function
|
|
5433
|
+
function Kl(e, t) {
|
|
5409
5434
|
return Array.isArray(e) && e.length > 1 ? [...e.slice(0, -1), t] : [t];
|
|
5410
5435
|
}
|
|
5411
|
-
function
|
|
5436
|
+
function ql(e, t) {
|
|
5412
5437
|
let n = e?.field, r = [];
|
|
5413
5438
|
e?.clearGroupOnChange && (t instanceof Set ? [...t] : t ?? []).forEach((e) => {
|
|
5414
5439
|
e && e !== n && r.push(e);
|
|
@@ -5418,24 +5443,24 @@ function Wl(e, t) {
|
|
|
5418
5443
|
e && e !== n && r.push(e);
|
|
5419
5444
|
}) : typeof i == "string" && i.trim() && i.trim() !== n && r.push(i.trim()), [...new Set(r)];
|
|
5420
5445
|
}
|
|
5421
|
-
function
|
|
5422
|
-
let i =
|
|
5446
|
+
function Jl(e, t, n, r) {
|
|
5447
|
+
let i = ql(t, r).map((e) => Kl(n, e));
|
|
5423
5448
|
return i.forEach((t) => e.setFieldValue(t, null)), i;
|
|
5424
5449
|
}
|
|
5425
5450
|
//#endregion
|
|
5426
5451
|
//#region src/components/form/resolveStoredOptions.js
|
|
5427
|
-
function
|
|
5452
|
+
function Yl(e) {
|
|
5428
5453
|
return (Array.isArray(e) ? e : [e]).map((e) => e && typeof e == "object" ? e.value ?? e.key ?? e.id : e).filter((e) => e != null && e !== "");
|
|
5429
5454
|
}
|
|
5430
|
-
function
|
|
5455
|
+
function Xl(e, t = []) {
|
|
5431
5456
|
let n = new Set((t ?? []).map((e) => String(e?.value))), r = [];
|
|
5432
|
-
for (let t of
|
|
5457
|
+
for (let t of Yl(e)) {
|
|
5433
5458
|
let e = String(t);
|
|
5434
5459
|
!n.has(e) && !r.includes(e) && r.push(e);
|
|
5435
5460
|
}
|
|
5436
5461
|
return r;
|
|
5437
5462
|
}
|
|
5438
|
-
async function
|
|
5463
|
+
async function Zl(e, t) {
|
|
5439
5464
|
if (!e?.lookupCollection || !t?.length) return [];
|
|
5440
5465
|
let n = new URLSearchParams({
|
|
5441
5466
|
collection: e.lookupCollection,
|
|
@@ -5447,7 +5472,7 @@ async function Jl(e, t) {
|
|
|
5447
5472
|
let r = await a(s, `/admin/lookup-dropdown-values?${n}`), i = r?.data ?? r ?? [];
|
|
5448
5473
|
return Array.isArray(i) ? i : [];
|
|
5449
5474
|
}
|
|
5450
|
-
function
|
|
5475
|
+
function Ql(e = [], t = []) {
|
|
5451
5476
|
if (!t.length) return e;
|
|
5452
5477
|
let n = new Set((e ?? []).map((e) => String(e?.value))), r = t.filter((e) => !n.has(String(e?.value))).map((e) => ({
|
|
5453
5478
|
...e,
|
|
@@ -5457,25 +5482,25 @@ function Yl(e = [], t = []) {
|
|
|
5457
5482
|
}
|
|
5458
5483
|
//#endregion
|
|
5459
5484
|
//#region src/components/form/requireAnyOf.js
|
|
5460
|
-
var
|
|
5461
|
-
function
|
|
5485
|
+
var $l = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || e === !1;
|
|
5486
|
+
function eu(e) {
|
|
5462
5487
|
let t = e?.requireAnyOf;
|
|
5463
5488
|
return Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim() !== "") : [];
|
|
5464
5489
|
}
|
|
5465
|
-
function
|
|
5466
|
-
return !e || typeof e != "object" ? !1 : Object.values(e).some((e) =>
|
|
5490
|
+
function tu(e) {
|
|
5491
|
+
return !e || typeof e != "object" ? !1 : Object.values(e).some((e) => !$l(e));
|
|
5467
5492
|
}
|
|
5468
|
-
function
|
|
5469
|
-
let n =
|
|
5493
|
+
function nu({ field: e, getRow: t }) {
|
|
5494
|
+
let n = eu(e);
|
|
5470
5495
|
if (n.length === 0 || !n.includes(e?.field)) return;
|
|
5471
5496
|
let r = e.requireAnyOfMessage || `Select at least one of ${n.join(", ")}.`;
|
|
5472
5497
|
return { validator: async () => {
|
|
5473
5498
|
let e = t?.() ?? {};
|
|
5474
|
-
return
|
|
5499
|
+
return tu(e) ? n.some((t) => !$l(e[t])) ? Promise.resolve() : Promise.reject(Error(r)) : Promise.resolve();
|
|
5475
5500
|
} };
|
|
5476
5501
|
}
|
|
5477
|
-
function
|
|
5478
|
-
let n =
|
|
5502
|
+
function ru(e, t = []) {
|
|
5503
|
+
let n = eu(e);
|
|
5479
5504
|
return n.length === 0 ? t : t.map((t) => n.includes(t?.field) ? {
|
|
5480
5505
|
...t,
|
|
5481
5506
|
requireAnyOf: n,
|
|
@@ -5484,8 +5509,8 @@ function eu(e, t = []) {
|
|
|
5484
5509
|
}
|
|
5485
5510
|
//#endregion
|
|
5486
5511
|
//#region src/components/form/dateRules.js
|
|
5487
|
-
var
|
|
5488
|
-
function
|
|
5512
|
+
var iu = (e) => e == null || e === "";
|
|
5513
|
+
function au(e) {
|
|
5489
5514
|
if (!e) return null;
|
|
5490
5515
|
if (typeof e.valueOf == "function") {
|
|
5491
5516
|
let t = e.valueOf();
|
|
@@ -5496,15 +5521,15 @@ function nu(e) {
|
|
|
5496
5521
|
}
|
|
5497
5522
|
function $(e) {
|
|
5498
5523
|
if (!e) return null;
|
|
5499
|
-
let t =
|
|
5524
|
+
let t = E(e);
|
|
5500
5525
|
return t.isValid() ? t.startOf("day").valueOf() : null;
|
|
5501
5526
|
}
|
|
5502
|
-
function
|
|
5527
|
+
function ou(e) {
|
|
5503
5528
|
if (!e) return null;
|
|
5504
|
-
let t =
|
|
5529
|
+
let t = E(e);
|
|
5505
5530
|
return t.isValid() ? t.hour() * 60 + t.minute() : null;
|
|
5506
5531
|
}
|
|
5507
|
-
var
|
|
5532
|
+
var su = {
|
|
5508
5533
|
d: "day",
|
|
5509
5534
|
day: "day",
|
|
5510
5535
|
days: "day",
|
|
@@ -5520,13 +5545,13 @@ var iu = {
|
|
|
5520
5545
|
year: "year",
|
|
5521
5546
|
years: "year"
|
|
5522
5547
|
};
|
|
5523
|
-
function
|
|
5548
|
+
function cu(e) {
|
|
5524
5549
|
if (e == null || e === "") return null;
|
|
5525
5550
|
if (typeof e == "object" && !Array.isArray(e)) {
|
|
5526
5551
|
let t = Number(e.value ?? e.count ?? e.amount);
|
|
5527
5552
|
return !Number.isFinite(t) || t <= 0 ? null : {
|
|
5528
5553
|
value: t,
|
|
5529
|
-
unit:
|
|
5554
|
+
unit: su[String(e.unit ?? "month").toLowerCase()] ?? "month"
|
|
5530
5555
|
};
|
|
5531
5556
|
}
|
|
5532
5557
|
let t = String(e).trim().toLowerCase();
|
|
@@ -5536,49 +5561,49 @@ function au(e) {
|
|
|
5536
5561
|
let r = Number(n[1]);
|
|
5537
5562
|
return !Number.isFinite(r) || r <= 0 ? null : {
|
|
5538
5563
|
value: r,
|
|
5539
|
-
unit:
|
|
5564
|
+
unit: su[n[2]] ?? "month"
|
|
5540
5565
|
};
|
|
5541
5566
|
}
|
|
5542
|
-
function
|
|
5567
|
+
function lu(e, t) {
|
|
5543
5568
|
let n = e?.minGapFrom ?? e?.gapFrom;
|
|
5544
5569
|
if (n && typeof t == "function") {
|
|
5545
|
-
let e =
|
|
5570
|
+
let e = cu(t(n));
|
|
5546
5571
|
if (e) return e;
|
|
5547
5572
|
}
|
|
5548
|
-
return
|
|
5573
|
+
return cu(e?.minGap);
|
|
5549
5574
|
}
|
|
5550
|
-
function
|
|
5575
|
+
function uu(e, t, n, r) {
|
|
5551
5576
|
if (t === null) return null;
|
|
5552
|
-
let i =
|
|
5577
|
+
let i = lu(n, r), a = E(t);
|
|
5553
5578
|
return i && (a = e === "dateAfterField" ? a.add(i.value, i.unit) : a.subtract(i.value, i.unit)), a.startOf("day").valueOf();
|
|
5554
5579
|
}
|
|
5555
|
-
function
|
|
5580
|
+
function du(e, t, n, r, i) {
|
|
5556
5581
|
if (t === null || n === null) return !1;
|
|
5557
|
-
let a =
|
|
5582
|
+
let a = uu(e, n, r, i);
|
|
5558
5583
|
if (a === null) return !1;
|
|
5559
|
-
let o = !!r?.strict && !
|
|
5584
|
+
let o = !!r?.strict && !lu(r, i);
|
|
5560
5585
|
return e === "dateAfterField" ? o ? t <= a : t < a : o ? t >= a : t > a;
|
|
5561
5586
|
}
|
|
5562
|
-
function
|
|
5587
|
+
function fu(e, t, n, r) {
|
|
5563
5588
|
if (n?.message) return n.message;
|
|
5564
|
-
let i = n?.value ?? n?.compareField ?? n?.field ?? "the paired date", a =
|
|
5589
|
+
let i = n?.value ?? n?.compareField ?? n?.field ?? "the paired date", a = lu(n, r);
|
|
5565
5590
|
if (a) {
|
|
5566
5591
|
let n = a.value === 1 ? a.unit : `${a.unit}s`;
|
|
5567
5592
|
return e === "dateAfterField" ? `${t} must be at least ${a.value} ${n} after ${i}` : `${t} must be at least ${a.value} ${n} before ${i}`;
|
|
5568
5593
|
}
|
|
5569
5594
|
return n?.strict ? e === "dateAfterField" ? `${t} must be after ${i}` : `${t} must be before ${i}` : e === "dateAfterField" ? `${t} must be on or after ${i}` : `${t} must be on or before ${i}`;
|
|
5570
5595
|
}
|
|
5571
|
-
function
|
|
5596
|
+
function pu({ type: e, label: t, rule: n, readSibling: r }) {
|
|
5572
5597
|
return { validator: async (i, a) => {
|
|
5573
5598
|
let o = n?.value ?? n?.compareField ?? n?.field;
|
|
5574
|
-
if (!o ||
|
|
5599
|
+
if (!o || iu(a)) return Promise.resolve();
|
|
5575
5600
|
let s = r(o);
|
|
5576
|
-
if (
|
|
5601
|
+
if (iu(s)) return Promise.resolve();
|
|
5577
5602
|
let c = $(a), l = $(s);
|
|
5578
|
-
return c === null || l === null ? Promise.resolve() :
|
|
5603
|
+
return c === null || l === null ? Promise.resolve() : du(e, c, l, n, r) ? Promise.reject(Error(fu(e, t, n, r))) : Promise.resolve();
|
|
5579
5604
|
} };
|
|
5580
5605
|
}
|
|
5581
|
-
function
|
|
5606
|
+
function mu(e, t, { rows: n, rowIndex: r } = {}) {
|
|
5582
5607
|
if (e === null || !t || !Array.isArray(n) || r == null || (t.mode ?? "newestFirst") !== "newestFirst") return !1;
|
|
5583
5608
|
let i = t.startField ?? "startDate", a = t.endField ?? "endDate", o = n[r - 1];
|
|
5584
5609
|
if (o) {
|
|
@@ -5592,11 +5617,11 @@ function du(e, t, { rows: n, rowIndex: r } = {}) {
|
|
|
5592
5617
|
}
|
|
5593
5618
|
return !1;
|
|
5594
5619
|
}
|
|
5595
|
-
function
|
|
5620
|
+
function hu(e, t = "above", n = void 0) {
|
|
5596
5621
|
let r = e?.messages ?? {}, i = t === "below";
|
|
5597
5622
|
return (n === "start" ? i ? r.belowStart : r.aboveStart : n === "end" ? i ? r.belowEnd : r.aboveEnd : void 0) || (i ? r.below || "Start date must be after the end date of the entry below it." : n === "end" ? r.above || "End date must be before the start date of the entry above it." : r.above || "This period overlaps the entry above it. Please adjust the dates.");
|
|
5598
5623
|
}
|
|
5599
|
-
function
|
|
5624
|
+
function gu({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = or }) {
|
|
5600
5625
|
let a = e?.validations ?? e?.validation ?? e?.rules ?? [], o = [];
|
|
5601
5626
|
for (let e of a) {
|
|
5602
5627
|
let n = typeof e == "string" ? { type: e } : e, r = n?.type;
|
|
@@ -5610,17 +5635,17 @@ function pu({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = or }) {
|
|
|
5610
5635
|
o.push((i) => {
|
|
5611
5636
|
if (!i) return !1;
|
|
5612
5637
|
let a = t(e);
|
|
5613
|
-
return !
|
|
5638
|
+
return !iu(a) && du(r, $(i), $(a), n, t);
|
|
5614
5639
|
});
|
|
5615
5640
|
}
|
|
5616
5641
|
}
|
|
5617
|
-
return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ?
|
|
5642
|
+
return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ? mu($(t), e.rowHierarchy, {
|
|
5618
5643
|
rows: n,
|
|
5619
5644
|
rowIndex: r
|
|
5620
5645
|
}) : !1), o.length ? (e) => o.some((t) => t(e)) : void 0;
|
|
5621
5646
|
}
|
|
5622
|
-
function
|
|
5623
|
-
if (!
|
|
5647
|
+
function _u(e, t = or, n = void 0) {
|
|
5648
|
+
if (!iu(n) && $(n) !== null) return;
|
|
5624
5649
|
let r = e?.validations ?? e?.validation ?? e?.rules ?? [];
|
|
5625
5650
|
for (let e of r) {
|
|
5626
5651
|
let n = typeof e == "string" ? { type: e } : e;
|
|
@@ -5628,7 +5653,7 @@ function mu(e, t = or, n = void 0) {
|
|
|
5628
5653
|
if (n?.type === "noFutureDate" || n?.type === "noPastDate") return t();
|
|
5629
5654
|
}
|
|
5630
5655
|
}
|
|
5631
|
-
function
|
|
5656
|
+
function vu({ field: e, name: t, rows: n }) {
|
|
5632
5657
|
if (!Array.isArray(t) || t.length === 0) return [];
|
|
5633
5658
|
let r = t[t.length - 1], i = t.length >= 3 && typeof t[1] == "number", a = /* @__PURE__ */ new Set(), o = e?.validations ?? e?.validation ?? e?.rules ?? [];
|
|
5634
5659
|
for (let e of o) {
|
|
@@ -5657,44 +5682,44 @@ function hu({ field: e, name: t, rows: n }) {
|
|
|
5657
5682
|
]));
|
|
5658
5683
|
return u;
|
|
5659
5684
|
}
|
|
5660
|
-
function
|
|
5685
|
+
function yu({ field: e, rows: t, rowIndex: n }) {
|
|
5661
5686
|
let r = e?.rowHierarchy;
|
|
5662
5687
|
return { validator: async (i, a) => {
|
|
5663
|
-
if (!r ||
|
|
5688
|
+
if (!r || iu(a) || !Array.isArray(t) || n == null) return Promise.resolve();
|
|
5664
5689
|
let o = $(a);
|
|
5665
|
-
if (o === null || !
|
|
5690
|
+
if (o === null || !mu(o, r, {
|
|
5666
5691
|
rows: t,
|
|
5667
5692
|
rowIndex: n
|
|
5668
5693
|
})) return Promise.resolve();
|
|
5669
5694
|
let s = r.startField ?? "startDate", c = t[n - 1], l = c ? $(c[s]) : null, u = l !== null && o >= l ? "above" : "below", d = r.endField ?? "endDate", f = e?.field, p = f === s ? "start" : f === d ? "end" : void 0;
|
|
5670
|
-
return Promise.reject(Error(
|
|
5695
|
+
return Promise.reject(Error(hu(r, u, p)));
|
|
5671
5696
|
} };
|
|
5672
5697
|
}
|
|
5673
5698
|
//#endregion
|
|
5674
5699
|
//#region src/utils/submitMessages.js
|
|
5675
|
-
function
|
|
5700
|
+
function bu(e) {
|
|
5676
5701
|
return (e ?? []).filter((e) => e?.submitMessages && typeof e.submitMessages == "object").sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.submitMessages ?? null;
|
|
5677
5702
|
}
|
|
5678
|
-
function
|
|
5703
|
+
function xu(e) {
|
|
5679
5704
|
let t = String(e ?? "").trim();
|
|
5680
5705
|
return t ? t.charAt(0).toUpperCase() + t.slice(1) : "Record";
|
|
5681
5706
|
}
|
|
5682
|
-
function
|
|
5683
|
-
return String(e).replaceAll("${module}",
|
|
5707
|
+
function Su(e, t) {
|
|
5708
|
+
return String(e).replaceAll("${module}", xu(t)).replaceAll("${moduleName}", xu(t));
|
|
5684
5709
|
}
|
|
5685
|
-
function
|
|
5686
|
-
let r =
|
|
5710
|
+
function Cu(e, t, n) {
|
|
5711
|
+
let r = bu(e);
|
|
5687
5712
|
if (r?.suppress) return null;
|
|
5688
5713
|
let i = n === "edit" ? r?.editSuccess : r?.addSuccess;
|
|
5689
|
-
return i && String(i).trim() ?
|
|
5714
|
+
return i && String(i).trim() ? Su(i, t) : n === "edit" ? `${xu(t)} has Updated successfully` : `${xu(t)} has added successfully`;
|
|
5690
5715
|
}
|
|
5691
|
-
function
|
|
5692
|
-
let i =
|
|
5693
|
-
return a && String(a).trim() ?
|
|
5716
|
+
function wu(e, t, n, r) {
|
|
5717
|
+
let i = bu(e), a = n === "edit" ? i?.editError : i?.addError;
|
|
5718
|
+
return a && String(a).trim() ? Su(a, t) : r && String(r).trim() ? String(r) : n === "edit" ? `Failed to update ${xu(t)}` : `Failed to create ${xu(t)}`;
|
|
5694
5719
|
}
|
|
5695
5720
|
//#endregion
|
|
5696
5721
|
//#region src/utils/scrollToFirstFormError.js
|
|
5697
|
-
function
|
|
5722
|
+
function Tu({ errorFields: e } = {}, t, { root: n = document } = {}) {
|
|
5698
5723
|
if (!e?.length) return;
|
|
5699
5724
|
let r = e[0]?.name;
|
|
5700
5725
|
setTimeout(() => {
|
|
@@ -5719,10 +5744,10 @@ function Su({ errorFields: e } = {}, t, { root: n = document } = {}) {
|
|
|
5719
5744
|
}
|
|
5720
5745
|
//#endregion
|
|
5721
5746
|
//#region src/components/form/conditionalFieldLabel.js
|
|
5722
|
-
function
|
|
5747
|
+
function Eu(e) {
|
|
5723
5748
|
return Array.isArray(e) ? e.map((e) => String(e ?? "").trim()) : String(e ?? "").split(",").map((e) => e.trim());
|
|
5724
5749
|
}
|
|
5725
|
-
function
|
|
5750
|
+
function Du(e, t) {
|
|
5726
5751
|
if (!e?.field) return !1;
|
|
5727
5752
|
switch (e.operator ?? "eq") {
|
|
5728
5753
|
case "eq": return String(t ?? "") === String(e.value ?? "");
|
|
@@ -5730,103 +5755,103 @@ function wu(e, t) {
|
|
|
5730
5755
|
case "truthy": return t != null && t !== "" && t !== !1;
|
|
5731
5756
|
case "falsy": return t == null || t === "" || t === !1;
|
|
5732
5757
|
case "notEmpty": return Array.isArray(t) ? t.length > 0 : !!t;
|
|
5733
|
-
case "in": return
|
|
5734
|
-
case "notIn": return !
|
|
5758
|
+
case "in": return Eu(e.value).includes(String(t ?? ""));
|
|
5759
|
+
case "notIn": return !Eu(e.value).includes(String(t ?? ""));
|
|
5735
5760
|
default: return !1;
|
|
5736
5761
|
}
|
|
5737
5762
|
}
|
|
5738
|
-
function
|
|
5763
|
+
function Ou(e, t, n = !1) {
|
|
5739
5764
|
let r = n ? e?.combineLabel ?? e?.label : e?.label, i = e?.labelWhen;
|
|
5740
|
-
return
|
|
5765
|
+
return Du(i, t) && i?.label ? i.label : r;
|
|
5741
5766
|
}
|
|
5742
|
-
function
|
|
5767
|
+
function ku(e) {
|
|
5743
5768
|
return e ? [...e.field ? [e] : [], ...(e.conditions ?? []).filter((e) => e?.field)] : [];
|
|
5744
5769
|
}
|
|
5745
|
-
function
|
|
5746
|
-
let n =
|
|
5770
|
+
function Au(e, t) {
|
|
5771
|
+
let n = ku(e);
|
|
5747
5772
|
if (!n.length) return !0;
|
|
5748
|
-
let r = n.map((e) =>
|
|
5773
|
+
let r = n.map((e) => Du(e, t(e.field)));
|
|
5749
5774
|
return e.logic === "or" ? r.some(Boolean) : r.every(Boolean);
|
|
5750
5775
|
}
|
|
5751
|
-
function
|
|
5776
|
+
function ju(e) {
|
|
5752
5777
|
let t = e?.colWhen;
|
|
5753
5778
|
return t ? (Array.isArray(t) ? t : [t]).filter((e) => e?.field && Number(e?.col) > 0) : [];
|
|
5754
5779
|
}
|
|
5755
|
-
function
|
|
5756
|
-
for (let t of
|
|
5780
|
+
function Mu(e, t, n) {
|
|
5781
|
+
for (let t of ju(e)) if (Du(t, n(t))) return Number(t.col);
|
|
5757
5782
|
return t;
|
|
5758
5783
|
}
|
|
5759
|
-
function
|
|
5784
|
+
function Nu(e, t) {
|
|
5760
5785
|
return e?.field ? t == null ? [e.field] : [...Array.isArray(t) ? t : [t], e.field] : ["__noop_conditional_label__"];
|
|
5761
5786
|
}
|
|
5762
5787
|
//#endregion
|
|
5763
5788
|
//#region src/components/form/conditionalRequired.js
|
|
5764
|
-
function
|
|
5789
|
+
function Pu(e, t) {
|
|
5765
5790
|
return (n) => {
|
|
5766
5791
|
if (!e || !n) return;
|
|
5767
5792
|
let r = Array.isArray(t) && t.length > 1 ? [...t.slice(0, -1), n] : [n], i = e.getFieldValue(r);
|
|
5768
5793
|
return i === void 0 ? e.getFieldValue([n]) : i;
|
|
5769
5794
|
};
|
|
5770
5795
|
}
|
|
5771
|
-
function
|
|
5796
|
+
function Fu(e, t, n) {
|
|
5772
5797
|
let r = e?.requiredWhen;
|
|
5773
|
-
return !r || !t || !r.field && !(r.conditions ?? []).some((e) => e?.field) ? !1 :
|
|
5798
|
+
return !r || !t || !r.field && !(r.conditions ?? []).some((e) => e?.field) ? !1 : Au(r, Pu(t, n));
|
|
5774
5799
|
}
|
|
5775
|
-
function
|
|
5800
|
+
function Iu(e, t, n) {
|
|
5776
5801
|
return { validator: (r, i) => {
|
|
5777
|
-
if (!
|
|
5802
|
+
if (!Fu(e, t, n) || !(i == null || i === "" || Array.isArray(i) && i.length === 0)) return Promise.resolve();
|
|
5778
5803
|
let a = e?.label ?? e?.field ?? "This field";
|
|
5779
5804
|
return Promise.reject(Error(e?.requiredWhen?.message ?? `${a} is required`));
|
|
5780
5805
|
} };
|
|
5781
5806
|
}
|
|
5782
5807
|
//#endregion
|
|
5783
5808
|
//#region src/components/Breadcrumb.jsx
|
|
5784
|
-
function
|
|
5785
|
-
let t = e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */
|
|
5809
|
+
function Lu({ items: e = [] }) {
|
|
5810
|
+
let t = e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */ w(Mr, {
|
|
5786
5811
|
variant: "body",
|
|
5787
5812
|
weight: "medium",
|
|
5788
5813
|
color: "link",
|
|
5789
5814
|
children: t.label
|
|
5790
|
-
}) : /* @__PURE__ */
|
|
5815
|
+
}) : /* @__PURE__ */ T(be, {
|
|
5791
5816
|
to: t.href,
|
|
5792
|
-
children: [/* @__PURE__ */
|
|
5817
|
+
children: [/* @__PURE__ */ w(Mr, {
|
|
5793
5818
|
variant: "body",
|
|
5794
5819
|
color: "secondary",
|
|
5795
5820
|
children: t.label
|
|
5796
|
-
}), t.dropdown && /* @__PURE__ */
|
|
5821
|
+
}), t.dropdown && /* @__PURE__ */ w(se, {})]
|
|
5797
5822
|
}) }));
|
|
5798
|
-
return /* @__PURE__ */
|
|
5823
|
+
return /* @__PURE__ */ w(y, { items: t });
|
|
5799
5824
|
}
|
|
5800
5825
|
//#endregion
|
|
5801
5826
|
//#region src/components/form/canonicalOption.js
|
|
5802
|
-
var
|
|
5803
|
-
function
|
|
5827
|
+
var Ru = (e) => String(e ?? "").trim().replace(/\s+/g, " ").toLowerCase();
|
|
5828
|
+
function zu(e = []) {
|
|
5804
5829
|
let t = /* @__PURE__ */ new Map();
|
|
5805
5830
|
for (let n of e) {
|
|
5806
5831
|
if (n == null) continue;
|
|
5807
5832
|
let e = typeof n == "object" ? n.value : n;
|
|
5808
5833
|
if (e != null && e !== "") for (let r of [n?.label, e]) {
|
|
5809
|
-
let n =
|
|
5834
|
+
let n = Ru(r);
|
|
5810
5835
|
n && !t.has(n) && t.set(n, e);
|
|
5811
5836
|
}
|
|
5812
5837
|
}
|
|
5813
5838
|
return t;
|
|
5814
5839
|
}
|
|
5815
|
-
function
|
|
5840
|
+
function Bu(e, t) {
|
|
5816
5841
|
if (!Array.isArray(e)) {
|
|
5817
|
-
let n =
|
|
5842
|
+
let n = Bu([e], t);
|
|
5818
5843
|
return n.length ? n[0] : e;
|
|
5819
5844
|
}
|
|
5820
|
-
let n =
|
|
5845
|
+
let n = zu(t), r = /* @__PURE__ */ new Set(), i = [];
|
|
5821
5846
|
for (let t of e) {
|
|
5822
|
-
let e = typeof t == "object" && t ? t.value : t, a = n.get(
|
|
5847
|
+
let e = typeof t == "object" && t ? t.value : t, a = n.get(Ru(e)) ?? e, o = Ru(a);
|
|
5823
5848
|
o && r.has(o) || (o && r.add(o), i.push(a));
|
|
5824
5849
|
}
|
|
5825
5850
|
return i;
|
|
5826
5851
|
}
|
|
5827
5852
|
//#endregion
|
|
5828
5853
|
//#region src/components/form/dependencyBusy.js
|
|
5829
|
-
function
|
|
5854
|
+
function Vu(e, t = []) {
|
|
5830
5855
|
if (!e) return [];
|
|
5831
5856
|
let n = /* @__PURE__ */ new Set();
|
|
5832
5857
|
for (let r of t) for (let t of r?.fields ?? []) if (t?.field) {
|
|
@@ -5836,16 +5861,16 @@ function Ru(e, t = []) {
|
|
|
5836
5861
|
}
|
|
5837
5862
|
return n.delete(e), [...n];
|
|
5838
5863
|
}
|
|
5839
|
-
function
|
|
5840
|
-
return e?.blockWhileResolving ?
|
|
5864
|
+
function Hu(e, t = []) {
|
|
5865
|
+
return e?.blockWhileResolving ? Vu(e.field, t).length > 0 : !1;
|
|
5841
5866
|
}
|
|
5842
|
-
function
|
|
5867
|
+
function Uu(e) {
|
|
5843
5868
|
let t = String(e?.label ?? "").trim();
|
|
5844
5869
|
return t ? `Applying ${t}…` : "Applying your selection…";
|
|
5845
5870
|
}
|
|
5846
|
-
function
|
|
5871
|
+
function Wu(e, t = []) {
|
|
5847
5872
|
if (!e?.field) return [];
|
|
5848
|
-
let n = new Set(
|
|
5873
|
+
let n = new Set(Vu(e.field, t));
|
|
5849
5874
|
if (n.size === 0) return [];
|
|
5850
5875
|
let r = [];
|
|
5851
5876
|
for (let e of t) {
|
|
@@ -5854,19 +5879,19 @@ function Vu(e, t = []) {
|
|
|
5854
5879
|
}
|
|
5855
5880
|
return r;
|
|
5856
5881
|
}
|
|
5857
|
-
function
|
|
5882
|
+
function Gu(e) {
|
|
5858
5883
|
return String(e?.blockScope ?? "").toLowerCase() === "group";
|
|
5859
5884
|
}
|
|
5860
5885
|
//#endregion
|
|
5861
5886
|
//#region src/components/form/LinkedRecordFileField.jsx
|
|
5862
|
-
var
|
|
5863
|
-
function
|
|
5887
|
+
var Ku = f(() => import("./index.js").then((e) => e.n)), qu = f(() => import("./DocumentViewer-DcgKxqov.js").then((e) => e.n));
|
|
5888
|
+
function Ju(e) {
|
|
5864
5889
|
let t = String(e ?? "").split(".").pop()?.toLowerCase();
|
|
5865
|
-
return
|
|
5890
|
+
return w(t === "pdf" ? fe : t === "doc" || t === "docx" ? me : de, { className: "v1-file-chip__icon" });
|
|
5866
5891
|
}
|
|
5867
|
-
function
|
|
5892
|
+
function Yu({ field: e, recordMeta: t, onLinkedRecordUpdated: n }) {
|
|
5868
5893
|
let r = e?.linkedModule, i = e?.linkedFileField, a = g(() => {
|
|
5869
|
-
let n =
|
|
5894
|
+
let n = Dc(r, t);
|
|
5870
5895
|
if (n) return n;
|
|
5871
5896
|
let i = e?.linkedIdField, a = i ? t?.[i] : "";
|
|
5872
5897
|
return a ? String(a) : "";
|
|
@@ -5900,14 +5925,14 @@ function Ku({ field: e, recordMeta: t, onLinkedRecordUpdated: n }) {
|
|
|
5900
5925
|
i,
|
|
5901
5926
|
p
|
|
5902
5927
|
]);
|
|
5903
|
-
let _ = g(() =>
|
|
5904
|
-
if (!a) return /* @__PURE__ */
|
|
5928
|
+
let _ = g(() => Eo(o.fileValue), [o.fileValue])[0], y = !!_, b = e?.label ?? "File", x = Vs(r) || "record";
|
|
5929
|
+
if (!a) return /* @__PURE__ */ w("div", {
|
|
5905
5930
|
className: "v1-linked-file v1-linked-file--empty",
|
|
5906
|
-
children: /* @__PURE__ */
|
|
5931
|
+
children: /* @__PURE__ */ w("span", { children: e?.unlinkedText ?? `Not available until the ${x} is set.` })
|
|
5907
5932
|
});
|
|
5908
|
-
if (o.loading) return /* @__PURE__ */
|
|
5933
|
+
if (o.loading) return /* @__PURE__ */ w("div", {
|
|
5909
5934
|
className: "v1-linked-file v1-linked-file--loading",
|
|
5910
|
-
children: /* @__PURE__ */
|
|
5935
|
+
children: /* @__PURE__ */ w(ie, { size: "small" })
|
|
5911
5936
|
});
|
|
5912
5937
|
let te = _ ? {
|
|
5913
5938
|
..._,
|
|
@@ -5918,47 +5943,47 @@ function Ku({ field: e, recordMeta: t, onLinkedRecordUpdated: n }) {
|
|
|
5918
5943
|
fieldName: i
|
|
5919
5944
|
} : void 0
|
|
5920
5945
|
} : null, re = () => f(!1), ae = e?.emptyText ?? `No ${b.toLowerCase()} on file yet`, oe = e?.reuploadLabel ?? `${y ? "Reupload" : "Upload"} in ${x}`, S = e?.reuploadWarning ?? `The ${b.toLowerCase()} belongs to the ${x.toLowerCase()}, not to this record. Changing it here updates the ${x.toLowerCase()} everywhere it is used.`;
|
|
5921
|
-
return /* @__PURE__ */
|
|
5922
|
-
/* @__PURE__ */
|
|
5946
|
+
return /* @__PURE__ */ T(C, { children: [
|
|
5947
|
+
/* @__PURE__ */ T("div", {
|
|
5923
5948
|
className: `v1-linked-file-row ${y ? "" : "v1-linked-file--empty"}`,
|
|
5924
|
-
children: [/* @__PURE__ */
|
|
5949
|
+
children: [/* @__PURE__ */ T("button", {
|
|
5925
5950
|
type: "button",
|
|
5926
5951
|
className: "v1-linked-file v1-file-chip",
|
|
5927
5952
|
disabled: !y,
|
|
5928
5953
|
onClick: () => y && l(!0),
|
|
5929
5954
|
title: y ? `Preview or download ${_.name}` : ae,
|
|
5930
5955
|
children: [
|
|
5931
|
-
y ?
|
|
5932
|
-
/* @__PURE__ */
|
|
5956
|
+
y ? Ju(_.name) : /* @__PURE__ */ w(de, { className: "v1-file-chip__icon" }),
|
|
5957
|
+
/* @__PURE__ */ w("span", {
|
|
5933
5958
|
className: "v1-file-chip__name",
|
|
5934
5959
|
children: y ? _.name : ae
|
|
5935
5960
|
}),
|
|
5936
|
-
y && /* @__PURE__ */
|
|
5961
|
+
y && /* @__PURE__ */ w(ue, {
|
|
5937
5962
|
className: "v1-file-chip__action",
|
|
5938
5963
|
"aria-hidden": "true"
|
|
5939
5964
|
})
|
|
5940
5965
|
]
|
|
5941
|
-
}), /* @__PURE__ */
|
|
5966
|
+
}), /* @__PURE__ */ T("button", {
|
|
5942
5967
|
type: "button",
|
|
5943
5968
|
className: "v1-linked-file__edit-btn",
|
|
5944
5969
|
onClick: () => f(!0),
|
|
5945
5970
|
title: S,
|
|
5946
5971
|
children: [
|
|
5947
|
-
/* @__PURE__ */
|
|
5972
|
+
/* @__PURE__ */ w(ce, {}),
|
|
5948
5973
|
" ",
|
|
5949
5974
|
oe
|
|
5950
5975
|
]
|
|
5951
5976
|
})]
|
|
5952
5977
|
}),
|
|
5953
|
-
c && te && /* @__PURE__ */
|
|
5978
|
+
c && te && /* @__PURE__ */ w(u, {
|
|
5954
5979
|
fallback: null,
|
|
5955
|
-
children: /* @__PURE__ */
|
|
5980
|
+
children: /* @__PURE__ */ w(qu, {
|
|
5956
5981
|
open: c,
|
|
5957
5982
|
onClose: () => l(!1),
|
|
5958
5983
|
documents: [te]
|
|
5959
5984
|
})
|
|
5960
5985
|
}),
|
|
5961
|
-
d && /* @__PURE__ */
|
|
5986
|
+
d && /* @__PURE__ */ T(ne, {
|
|
5962
5987
|
open: !0,
|
|
5963
5988
|
title: oe,
|
|
5964
5989
|
width: "min(1080px, 96vw)",
|
|
@@ -5970,20 +5995,20 @@ function Ku({ field: e, recordMeta: t, onLinkedRecordUpdated: n }) {
|
|
|
5970
5995
|
maxHeight: "78vh",
|
|
5971
5996
|
overflowY: "auto"
|
|
5972
5997
|
} },
|
|
5973
|
-
children: [/* @__PURE__ */
|
|
5998
|
+
children: [/* @__PURE__ */ w(ee, {
|
|
5974
5999
|
type: "warning",
|
|
5975
6000
|
showIcon: !0,
|
|
5976
6001
|
message: S,
|
|
5977
6002
|
style: { marginBottom: 16 }
|
|
5978
|
-
}), /* @__PURE__ */
|
|
5979
|
-
fallback: /* @__PURE__ */
|
|
6003
|
+
}), /* @__PURE__ */ w(u, {
|
|
6004
|
+
fallback: /* @__PURE__ */ w("div", {
|
|
5980
6005
|
style: {
|
|
5981
6006
|
padding: 48,
|
|
5982
6007
|
textAlign: "center"
|
|
5983
6008
|
},
|
|
5984
|
-
children: /* @__PURE__ */
|
|
6009
|
+
children: /* @__PURE__ */ w(ie, {})
|
|
5985
6010
|
}),
|
|
5986
|
-
children: /* @__PURE__ */
|
|
6011
|
+
children: /* @__PURE__ */ w(Ku, {
|
|
5987
6012
|
moduleName: r,
|
|
5988
6013
|
recordId: a,
|
|
5989
6014
|
embedded: !0,
|
|
@@ -5997,24 +6022,24 @@ function Ku({ field: e, recordMeta: t, onLinkedRecordUpdated: n }) {
|
|
|
5997
6022
|
})
|
|
5998
6023
|
] });
|
|
5999
6024
|
}
|
|
6000
|
-
|
|
6001
|
-
field:
|
|
6002
|
-
label:
|
|
6003
|
-
linkedModule:
|
|
6004
|
-
linkedFileField:
|
|
6005
|
-
linkedIdField:
|
|
6006
|
-
emptyText:
|
|
6007
|
-
unlinkedText:
|
|
6008
|
-
reuploadLabel:
|
|
6009
|
-
reuploadWarning:
|
|
6025
|
+
Yu.propTypes = {
|
|
6026
|
+
field: D.shape({
|
|
6027
|
+
label: D.string,
|
|
6028
|
+
linkedModule: D.string,
|
|
6029
|
+
linkedFileField: D.string,
|
|
6030
|
+
linkedIdField: D.string,
|
|
6031
|
+
emptyText: D.string,
|
|
6032
|
+
unlinkedText: D.string,
|
|
6033
|
+
reuploadLabel: D.string,
|
|
6034
|
+
reuploadWarning: D.string
|
|
6010
6035
|
}).isRequired,
|
|
6011
|
-
recordMeta:
|
|
6012
|
-
onLinkedRecordUpdated:
|
|
6013
|
-
},
|
|
6036
|
+
recordMeta: D.object,
|
|
6037
|
+
onLinkedRecordUpdated: D.func
|
|
6038
|
+
}, Yu.defaultProps = {
|
|
6014
6039
|
recordMeta: void 0,
|
|
6015
6040
|
onLinkedRecordUpdated: void 0
|
|
6016
6041
|
};
|
|
6017
6042
|
//#endregion
|
|
6018
|
-
export {
|
|
6043
|
+
export { el as $, I as $n, ln as $r, Oo as $t, Zl as A, at as Ai, yi as An, et as Ar, Hs as At, Wl as B, $e as Bi, si as Bn, ot as Br, Os as Bt, _u as C, Xt as Ci, $i as Cn, Qe as Cr, cc as Ct, vu as D, tt as Di, ji as Dn, In as Dr, qs as Dt, iu as E, rn as Ei, Ki as En, fn as Er, Ys as Et, Bl as F, ze as Fi, mi as Fn, mn as Fr, ks as Ft, gl as G, Qt as Gi, qr as Gn, Ot as Gr, rs as Gt, xl as H, _n as Hi, ri as Hn, Xe as Hr, cs as Ht, Sl as I, Ut as Ii, fi as In, Rn as Ir, Cs as It, sl as J, Mn as Ji, Br as Jn, un as Jr, ts as Jt, dl as K, zt as Ki, Jr as Kn, jt as Kr, ns as Kt, Tl as L, Kt as Li, oi as Ln, $t as Lr, Ss as Lt, Xl as M, xt as Mi, vi as Mn, Dn as Mr, Ps as Mt, Jl as N, Ve as Ni, hi as Nn, St as Nr, Ls as Nt, ru as O, ft as Oi, Ii as On, Zt as Or, Gs as Ot, Dl as P, on as Pi, _i as Pn, vn as Pr, As as Pt, tl as Q, sn as Qi, L as Qn, vt as Qr, J as Qt, Cl as R, mt as Ri, ai as Rn, Be as Rr, ps as Rt, yu as S, It as Si, Ea as Sn, Tt as Sr, lc as St, ou as T, nn as Ti, Wi as Tn, gn as Tr, oc as Tt, yl as U, pn as Ui, ni as Un, Ye as Ur, ss as Ut, zl as V, En as Vi, ci as Vn, Yt as Vr, as as Vt, hl as W, Ln as Wi, ti as Wn, dt as Wr, is as Wt, ol as X, Wt as Xi, Rr as Xn, He as Xr, Lo as Xt, ul as Y, Mt as Yi, zr as Yn, cn as Yr, Ro as Yt, il as Z, Jt as Zi, Mr as Zn, gt as Zr, jo as Zt, Tu as _, Dt as _i, V as _n, Bn as _r, bc as _t, Hu as a, yt as ai, io as an, sr as ar, zc as at, gu as b, xn as bi, Ga as bn, Un as br, _c as bt, Fu as c, tn as ci, $a as cn, Wn as cr, Dc as ct, Nu as d, Fn as di, Xa as dn, er as dr, kc as dt, wn as ei, uo as en, or as er, Vc as et, Du as f, Le as fi, q as fn, P as fr, Nc as ft, ku as g, Ht as gi, ga as gn, zn as gr, xc as gt, Mu as h, Ze as hi, za as hn, Xn as hr, Sc as ht, Uu as i, bt as ii, Eo as in, vr as ir, Lc as it, Ql as j, lt as ji, bi as jn, pt as jr, Us as jt, nu as k, _t as ki, Fi as kn, jn as kr, Vs as kt, Iu as l, hn as li, Ja as ln, Qn as lr, Ac as lt, Au as m, an as mi, Ka as mn, qn as mr, wc as mt, Gu as n, ct as ni, fo as nn, dr as nr, Wc as nt, Bu as o, wt as oi, co as on, hr as or, Pc as ot, Ou as p, Ue as pi, Ba as pn, nr as pr, Mc as pt, ml as q, Sn as qi, Xr as qn, Gt as qr, es as qt, Wu as r, qt as ri, So as rn, F as rr, Ic as rt, Lu as s, en as si, Qa as sn, lr as sr, Oc as st, Yu as t, it as ti, lo as tn, cr as tr, Gc as tt, ju as u, dn as ui, Ya as un, Zn as ur, jc as ut, wu as v, Pt as vi, K as vn, Hn as vr, yc as vt, au as w, Re as wi, Bi as wn, Tn as wr, ac as wt, pu as x, An as xi, Da as xn, nt as xr, hc as xt, Cu as y, Ft as yi, Na as yn, Vn as yr, vc as yt, Vl as z, Ct as zi, pi as zn, Nn as zr, ys as zt };
|
|
6019
6044
|
|
|
6020
|
-
//# sourceMappingURL=LinkedRecordFileField-
|
|
6045
|
+
//# sourceMappingURL=LinkedRecordFileField-U94ZO9aN.js.map
|