@realtek/core-theme-live 0.0.469 → 0.0.470
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/FileField-4PXE0gsb.cjs +3 -0
- package/dist-lib/FileField-4PXE0gsb.cjs.map +1 -0
- package/dist-lib/{FileField-Cg2Td9Sh.js → FileField-B0RTUe9w.js} +309 -303
- package/dist-lib/FileField-B0RTUe9w.js.map +1 -0
- package/dist-lib/{LinkedRecordFileField-BnzEJY5V.cjs → LinkedRecordFileField-BK4NXb-9.cjs} +3 -3
- package/dist-lib/{LinkedRecordFileField-BnzEJY5V.cjs.map → LinkedRecordFileField-BK4NXb-9.cjs.map} +1 -1
- package/dist-lib/{LinkedRecordFileField-kn6PgZRw.js → LinkedRecordFileField-CXaGgEV-.js} +523 -523
- package/dist-lib/{LinkedRecordFileField-kn6PgZRw.js.map → LinkedRecordFileField-CXaGgEV-.js.map} +1 -1
- package/dist-lib/{dropdownApi-ekbbx_W3.js → dropdownApi-BLfaVpEW.js} +2 -2
- package/dist-lib/{dropdownApi-ekbbx_W3.js.map → dropdownApi-BLfaVpEW.js.map} +1 -1
- package/dist-lib/{dropdownApi-Buej6J3Z.cjs → dropdownApi-BfOmJvJU.cjs} +2 -2
- package/dist-lib/{dropdownApi-Buej6J3Z.cjs.map → dropdownApi-BfOmJvJU.cjs.map} +1 -1
- package/dist-lib/index.cjs +7 -7
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +8812 -8775
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
- package/dist-lib/FileField-Cg2Td9Sh.js.map +0 -1
- package/dist-lib/FileField-y0EqgEXq.cjs +0 -3
- package/dist-lib/FileField-y0EqgEXq.cjs.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { D as e, S as t, T as n, a as r, d as i, o as a, x as o } from "./authApi-Dsc4NnFr.js";
|
|
2
|
-
import { A as s, B as c, C as l, E as u, F as d, H as f, M as p, O as m, S as h, U as g, V as _, a as v,
|
|
3
|
-
import { r as
|
|
4
|
-
import { Suspense as
|
|
5
|
-
import { Alert as ve, Breadcrumb as ye, Button as
|
|
6
|
-
import { DownOutlined as
|
|
7
|
-
import { Fragment as
|
|
8
|
-
import
|
|
9
|
-
import { Link as
|
|
10
|
-
import { EditorContent as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { Table as
|
|
15
|
-
import
|
|
2
|
+
import { A as s, B as c, C as l, E as u, F as d, H as f, M as p, O as m, S as h, U as g, V as _, a as v, ct as y, f as b, it as ee, m as x, nt as S, p as te, u as ne, v as re, w as ie, xt as ae, y as oe, yt as se, z as ce } from "./FileField-B0RTUe9w.js";
|
|
3
|
+
import { r as le } from "./addFormApi-DqLKDoHk.js";
|
|
4
|
+
import { Suspense as ue, createContext as de, lazy as fe, useCallback as pe, useContext as me, useEffect as C, useMemo as he, useRef as ge, useState as w, useSyncExternalStore as _e } from "react";
|
|
5
|
+
import { Alert as ve, Breadcrumb as ye, Button as T, Checkbox as be, Form as xe, Modal as E, Space as Se, Spin as Ce, Tooltip as we, Typography as Te, message as D } from "antd";
|
|
6
|
+
import { DownOutlined as Ee, EditOutlined as De, ExclamationCircleFilled as Oe, EyeOutlined as ke, FileOutlined as Ae, FilePdfOutlined as je, FileTextOutlined as Me, FileWordOutlined as Ne, InfoCircleFilled as Pe, PlusOutlined as Fe, UserOutlined as Ie } from "@ant-design/icons";
|
|
7
|
+
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
8
|
+
import j from "dayjs";
|
|
9
|
+
import { Link as Le } from "react-router-dom";
|
|
10
|
+
import { EditorContent as Re, useEditor as ze } from "@tiptap/react";
|
|
11
|
+
import Be from "@tiptap/starter-kit";
|
|
12
|
+
import Ve from "@tiptap/extension-link";
|
|
13
|
+
import He from "@tiptap/extension-underline";
|
|
14
|
+
import { Table as Ue, TableCell as We, TableHeader as Ge, TableRow as Ke } from "@tiptap/extension-table";
|
|
15
|
+
import M from "prop-types";
|
|
16
16
|
//#region src/theme/colors/colors.js
|
|
17
|
-
var
|
|
17
|
+
var N = {
|
|
18
18
|
brand: "#0053a5",
|
|
19
19
|
brandDark: "#1d4ed8",
|
|
20
20
|
brandDarker: "#1e40af",
|
|
@@ -90,8 +90,8 @@ var M = {
|
|
|
90
90
|
avatarGreen: "#10b981",
|
|
91
91
|
linkedIn: "#0077b5"
|
|
92
92
|
};
|
|
93
|
-
|
|
94
|
-
var
|
|
93
|
+
N.textPrimary, N.textSecondary, N.textMuted, N.textSubtle, N.textInverse, N.textLink, N.danger, N.success, N.danger, N.textLink, N.surfaceSoft, N.textSecondary, N.success, N.warning;
|
|
94
|
+
var P = {
|
|
95
95
|
brand: "var(--color-brand)",
|
|
96
96
|
brandDark: "var(--color-brand-dark)",
|
|
97
97
|
brandDarker: "var(--color-brand-darker)",
|
|
@@ -160,7 +160,7 @@ var N = {
|
|
|
160
160
|
avatarPurpleBg: "var(--color-avatar-purple-bg)",
|
|
161
161
|
avatarMoreBg: "var(--color-avatar-more-bg)",
|
|
162
162
|
avatarMoreText: "var(--color-avatar-more-text)"
|
|
163
|
-
}, { Text:
|
|
163
|
+
}, { Text: qe, Title: Je, Paragraph: Ye, Link: Xe } = Te, Ze = {
|
|
164
164
|
display: "h1",
|
|
165
165
|
h1: "h1",
|
|
166
166
|
h2: "h2",
|
|
@@ -178,7 +178,7 @@ var N = {
|
|
|
178
178
|
metric: "span",
|
|
179
179
|
helper: "span",
|
|
180
180
|
link: "a"
|
|
181
|
-
},
|
|
181
|
+
}, Qe = {
|
|
182
182
|
xs: "var(--font-size-xs)",
|
|
183
183
|
sm: "var(--font-size-sm)",
|
|
184
184
|
md: "var(--font-size-md)",
|
|
@@ -187,58 +187,58 @@ var N = {
|
|
|
187
187
|
"2xl": "var(--font-size-2xl)",
|
|
188
188
|
"3xl": "var(--font-size-3xl)",
|
|
189
189
|
"4xl": "var(--font-size-4xl)"
|
|
190
|
-
},
|
|
190
|
+
}, $e = {
|
|
191
191
|
regular: "var(--font-weight-regular)",
|
|
192
192
|
medium: "var(--font-weight-medium)",
|
|
193
193
|
semibold: "var(--font-weight-semibold)",
|
|
194
194
|
bold: "var(--font-weight-bold)",
|
|
195
195
|
extrabold: "var(--font-weight-extrabold)"
|
|
196
|
-
},
|
|
196
|
+
}, et = {
|
|
197
197
|
tight: "var(--line-height-tight)",
|
|
198
198
|
snug: "var(--line-height-snug)",
|
|
199
199
|
normal: "var(--line-height-normal)",
|
|
200
200
|
relaxed: "var(--line-height-relaxed)"
|
|
201
|
-
},
|
|
202
|
-
primary:
|
|
203
|
-
secondary:
|
|
204
|
-
muted:
|
|
205
|
-
subtle:
|
|
206
|
-
inverse:
|
|
207
|
-
link:
|
|
208
|
-
danger:
|
|
209
|
-
success:
|
|
201
|
+
}, tt = {
|
|
202
|
+
primary: P.textPrimary,
|
|
203
|
+
secondary: P.textSecondary,
|
|
204
|
+
muted: P.textMuted,
|
|
205
|
+
subtle: P.textSubtle,
|
|
206
|
+
inverse: P.textInverse,
|
|
207
|
+
link: P.textLink,
|
|
208
|
+
danger: P.danger,
|
|
209
|
+
success: P.success
|
|
210
210
|
};
|
|
211
|
-
function
|
|
211
|
+
function nt(...e) {
|
|
212
212
|
return e.filter(Boolean).join(" ");
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function rt(e, t) {
|
|
215
215
|
if (e != null) return t[e] || e;
|
|
216
216
|
}
|
|
217
217
|
function it(e, t) {
|
|
218
|
-
return t === "link" || e === "a" ?
|
|
218
|
+
return t === "link" || e === "a" ? Xe : e === "p" ? Ye : [
|
|
219
219
|
"h1",
|
|
220
220
|
"h2",
|
|
221
221
|
"h3",
|
|
222
222
|
"h4",
|
|
223
223
|
"h5"
|
|
224
|
-
].includes(e) ?
|
|
224
|
+
].includes(e) ? Je : qe;
|
|
225
225
|
}
|
|
226
226
|
function at(e, t) {
|
|
227
|
-
let n = e ||
|
|
227
|
+
let n = e || Ze[t];
|
|
228
228
|
if (n?.startsWith("h")) return Number(n.slice(1));
|
|
229
229
|
}
|
|
230
230
|
function ot({ as: e, tag: t, variant: n = "body", color: r, size: i, weight: a, lineHeight: o, align: s, truncate: c = !1, display: l, className: u, style: d, children: f, ...p }) {
|
|
231
|
-
let m = t || e ||
|
|
232
|
-
color:
|
|
233
|
-
fontSize:
|
|
234
|
-
fontWeight:
|
|
235
|
-
lineHeight:
|
|
231
|
+
let m = t || e || Ze[n] || "span", h = it(m, n), g = at(m, n), _ = {
|
|
232
|
+
color: rt(r, tt),
|
|
233
|
+
fontSize: rt(i, Qe),
|
|
234
|
+
fontWeight: rt(a, $e),
|
|
235
|
+
lineHeight: rt(o, et),
|
|
236
236
|
display: l,
|
|
237
237
|
...d
|
|
238
238
|
};
|
|
239
|
-
return /* @__PURE__ */
|
|
239
|
+
return /* @__PURE__ */ k(h, {
|
|
240
240
|
...g ? { level: g } : {},
|
|
241
|
-
className:
|
|
241
|
+
className: nt("app-typography", `app-typography--${n}`, r && tt[r] && `app-typography--${r}`, s && `app-typography--${s}`, c && "app-typography--truncate", u),
|
|
242
242
|
style: _,
|
|
243
243
|
...p,
|
|
244
244
|
children: f
|
|
@@ -281,7 +281,7 @@ var st = (e = "") => e.trim().replace(/^\*\*(.*?)\*\*$/s, "$1").replace(/^__(.*?
|
|
|
281
281
|
return r.create(null, c);
|
|
282
282
|
};
|
|
283
283
|
function F({ onClick: e, active: t, disabled: n, title: r, children: i }) {
|
|
284
|
-
return /* @__PURE__ */
|
|
284
|
+
return /* @__PURE__ */ k("button", {
|
|
285
285
|
type: "button",
|
|
286
286
|
title: r,
|
|
287
287
|
disabled: n,
|
|
@@ -293,55 +293,55 @@ function F({ onClick: e, active: t, disabled: n, title: r, children: i }) {
|
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
295
|
function dt({ editor: e, disabled: t }) {
|
|
296
|
-
return e ? /* @__PURE__ */
|
|
296
|
+
return e ? /* @__PURE__ */ A("div", {
|
|
297
297
|
className: `tte-toolbar${t ? " tte-toolbar--disabled" : ""}`,
|
|
298
298
|
children: [
|
|
299
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ A("div", {
|
|
300
300
|
className: "tte-toolbar-group",
|
|
301
301
|
children: [
|
|
302
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ k(F, {
|
|
303
303
|
title: "Bold",
|
|
304
304
|
disabled: t,
|
|
305
305
|
active: e.isActive("bold"),
|
|
306
306
|
onClick: () => e.chain().focus().toggleBold().run(),
|
|
307
|
-
children: /* @__PURE__ */
|
|
307
|
+
children: /* @__PURE__ */ k("strong", { children: "B" })
|
|
308
308
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ k(F, {
|
|
310
310
|
title: "Italic",
|
|
311
311
|
disabled: t,
|
|
312
312
|
active: e.isActive("italic"),
|
|
313
313
|
onClick: () => e.chain().focus().toggleItalic().run(),
|
|
314
|
-
children: /* @__PURE__ */
|
|
314
|
+
children: /* @__PURE__ */ k("em", { children: "I" })
|
|
315
315
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ k(F, {
|
|
317
317
|
title: "Underline",
|
|
318
318
|
disabled: t,
|
|
319
319
|
active: e.isActive("underline"),
|
|
320
320
|
onClick: () => e.chain().focus().toggleUnderline().run(),
|
|
321
|
-
children: /* @__PURE__ */
|
|
321
|
+
children: /* @__PURE__ */ k("span", {
|
|
322
322
|
style: { textDecoration: "underline" },
|
|
323
323
|
children: "U"
|
|
324
324
|
})
|
|
325
325
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ k(F, {
|
|
327
327
|
title: "Strikethrough",
|
|
328
328
|
disabled: t,
|
|
329
329
|
active: e.isActive("strike"),
|
|
330
330
|
onClick: () => e.chain().focus().toggleStrike().run(),
|
|
331
|
-
children: /* @__PURE__ */
|
|
331
|
+
children: /* @__PURE__ */ k("s", { children: "S" })
|
|
332
332
|
})
|
|
333
333
|
]
|
|
334
334
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ k("div", { className: "tte-toolbar-divider" }),
|
|
336
|
+
/* @__PURE__ */ A("div", {
|
|
337
337
|
className: "tte-toolbar-group",
|
|
338
|
-
children: [/* @__PURE__ */
|
|
338
|
+
children: [/* @__PURE__ */ k(F, {
|
|
339
339
|
title: "Bullet List",
|
|
340
340
|
disabled: t,
|
|
341
341
|
active: e.isActive("bulletList"),
|
|
342
342
|
onClick: () => e.chain().focus().toggleBulletList().run(),
|
|
343
343
|
children: "≡"
|
|
344
|
-
}), /* @__PURE__ */
|
|
344
|
+
}), /* @__PURE__ */ k(F, {
|
|
345
345
|
title: "Ordered List",
|
|
346
346
|
disabled: t,
|
|
347
347
|
active: e.isActive("orderedList"),
|
|
@@ -349,10 +349,10 @@ function dt({ editor: e, disabled: t }) {
|
|
|
349
349
|
children: "1."
|
|
350
350
|
})]
|
|
351
351
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ k("div", { className: "tte-toolbar-divider" }),
|
|
353
|
+
/* @__PURE__ */ k("div", {
|
|
354
354
|
className: "tte-toolbar-group",
|
|
355
|
-
children: /* @__PURE__ */
|
|
355
|
+
children: /* @__PURE__ */ k(F, {
|
|
356
356
|
title: "Link",
|
|
357
357
|
disabled: t,
|
|
358
358
|
active: e.isActive("link"),
|
|
@@ -367,10 +367,10 @@ function dt({ editor: e, disabled: t }) {
|
|
|
367
367
|
children: "🔗"
|
|
368
368
|
})
|
|
369
369
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ k("div", { className: "tte-toolbar-divider" }),
|
|
371
|
+
/* @__PURE__ */ A("div", {
|
|
372
372
|
className: "tte-toolbar-group tte-table-tools",
|
|
373
|
-
children: [/* @__PURE__ */
|
|
373
|
+
children: [/* @__PURE__ */ k(F, {
|
|
374
374
|
title: "Insert 3 × 3 table",
|
|
375
375
|
disabled: t,
|
|
376
376
|
active: e.isActive("table"),
|
|
@@ -380,38 +380,38 @@ function dt({ editor: e, disabled: t }) {
|
|
|
380
380
|
withHeaderRow: !0
|
|
381
381
|
}).run(),
|
|
382
382
|
children: "▦"
|
|
383
|
-
}), e.isActive("table") && /* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */
|
|
383
|
+
}), e.isActive("table") && /* @__PURE__ */ A(O, { children: [
|
|
384
|
+
/* @__PURE__ */ k(F, {
|
|
385
385
|
title: "Add column",
|
|
386
386
|
disabled: t || !e.can().addColumnAfter(),
|
|
387
387
|
onClick: () => e.chain().focus().addColumnAfter().run(),
|
|
388
388
|
children: "C+"
|
|
389
389
|
}),
|
|
390
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ k(F, {
|
|
391
391
|
title: "Delete column",
|
|
392
392
|
disabled: t || !e.can().deleteColumn(),
|
|
393
393
|
onClick: () => e.chain().focus().deleteColumn().run(),
|
|
394
394
|
children: "C−"
|
|
395
395
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ k(F, {
|
|
397
397
|
title: "Add row",
|
|
398
398
|
disabled: t || !e.can().addRowAfter(),
|
|
399
399
|
onClick: () => e.chain().focus().addRowAfter().run(),
|
|
400
400
|
children: "R+"
|
|
401
401
|
}),
|
|
402
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ k(F, {
|
|
403
403
|
title: "Delete row",
|
|
404
404
|
disabled: t || !e.can().deleteRow(),
|
|
405
405
|
onClick: () => e.chain().focus().deleteRow().run(),
|
|
406
406
|
children: "R−"
|
|
407
407
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ k(F, {
|
|
409
409
|
title: "Toggle header row",
|
|
410
410
|
disabled: t || !e.can().toggleHeaderRow(),
|
|
411
411
|
onClick: () => e.chain().focus().toggleHeaderRow().run(),
|
|
412
412
|
children: "H"
|
|
413
413
|
}),
|
|
414
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ k(F, {
|
|
415
415
|
title: "Delete table",
|
|
416
416
|
disabled: t || !e.can().deleteTable(),
|
|
417
417
|
onClick: () => e.chain().focus().deleteTable().run(),
|
|
@@ -419,10 +419,10 @@ function dt({ editor: e, disabled: t }) {
|
|
|
419
419
|
})
|
|
420
420
|
] })]
|
|
421
421
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
423
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ k("div", { className: "tte-toolbar-divider" }),
|
|
423
|
+
/* @__PURE__ */ k("div", {
|
|
424
424
|
className: "tte-toolbar-group",
|
|
425
|
-
children: /* @__PURE__ */
|
|
425
|
+
children: /* @__PURE__ */ k(F, {
|
|
426
426
|
title: "Clear formatting",
|
|
427
427
|
disabled: t,
|
|
428
428
|
onClick: () => e.chain().focus().clearNodes().unsetAllMarks().run(),
|
|
@@ -433,21 +433,21 @@ function dt({ editor: e, disabled: t }) {
|
|
|
433
433
|
}) : null;
|
|
434
434
|
}
|
|
435
435
|
function ft({ value: e = "", onChange: t, disabled: n = !1, placeholder: r = "" }) {
|
|
436
|
-
let i = ge(e ?? ""), a =
|
|
436
|
+
let i = ge(e ?? ""), a = ze({
|
|
437
437
|
extensions: [
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
438
|
+
Be,
|
|
439
|
+
He,
|
|
440
|
+
Ve.configure({
|
|
441
441
|
openOnClick: !1,
|
|
442
442
|
HTMLAttributes: { rel: "noopener noreferrer" }
|
|
443
443
|
}),
|
|
444
|
-
|
|
444
|
+
Ue.configure({
|
|
445
445
|
resizable: !0,
|
|
446
446
|
HTMLAttributes: { class: "email-template-table" }
|
|
447
447
|
}),
|
|
448
|
-
qe,
|
|
449
448
|
Ke,
|
|
450
|
-
Ge
|
|
449
|
+
Ge,
|
|
450
|
+
We
|
|
451
451
|
],
|
|
452
452
|
content: e,
|
|
453
453
|
editable: !n,
|
|
@@ -468,21 +468,21 @@ function ft({ value: e = "", onChange: t, disabled: n = !1, placeholder: r = ""
|
|
|
468
468
|
i.current = r, t?.(r);
|
|
469
469
|
}
|
|
470
470
|
});
|
|
471
|
-
return
|
|
471
|
+
return C(() => {
|
|
472
472
|
if (!a || a.isDestroyed) return;
|
|
473
473
|
let t = e || "";
|
|
474
474
|
t !== (i.current || "") && (i.current = t, a.commands.setContent(t, !1));
|
|
475
|
-
}, [e, a]),
|
|
475
|
+
}, [e, a]), C(() => {
|
|
476
476
|
a && a.setEditable(!n);
|
|
477
|
-
}, [n, a]), /* @__PURE__ */
|
|
477
|
+
}, [n, a]), /* @__PURE__ */ A("div", {
|
|
478
478
|
className: `tte-wrapper${n ? " tte-wrapper--disabled" : ""}`,
|
|
479
479
|
children: [
|
|
480
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ k(dt, {
|
|
481
481
|
editor: a,
|
|
482
482
|
disabled: n
|
|
483
483
|
}),
|
|
484
|
-
/* @__PURE__ */
|
|
485
|
-
!e && !a?.isFocused && r && /* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ k(Re, { editor: a }),
|
|
485
|
+
!e && !a?.isFocused && r && /* @__PURE__ */ k("div", {
|
|
486
486
|
className: "tte-placeholder",
|
|
487
487
|
children: r
|
|
488
488
|
})
|
|
@@ -638,12 +638,12 @@ async function kt({ relatedId: e, notes: t, title: n, notesFor: r }) {
|
|
|
638
638
|
}
|
|
639
639
|
//#endregion
|
|
640
640
|
//#region src/components/form/formDateInputFormat.js
|
|
641
|
-
var At =
|
|
641
|
+
var At = de(void 0);
|
|
642
642
|
function jt(e, t) {
|
|
643
|
-
return (typeof e == "string" ? e.trim() : "") ||
|
|
643
|
+
return (typeof e == "string" ? e.trim() : "") || ae(t) || se();
|
|
644
644
|
}
|
|
645
645
|
function Mt() {
|
|
646
|
-
let e =
|
|
646
|
+
let e = me(At);
|
|
647
647
|
return jt(e?.override, e?.moduleName);
|
|
648
648
|
}
|
|
649
649
|
//#endregion
|
|
@@ -701,32 +701,32 @@ function zt(e, t = {}) {
|
|
|
701
701
|
}
|
|
702
702
|
//#endregion
|
|
703
703
|
//#region src/components/form/formDecisionDialog.jsx
|
|
704
|
-
var
|
|
704
|
+
var Bt = {
|
|
705
705
|
duplicate: {
|
|
706
706
|
className: "fdd-tone-amber",
|
|
707
|
-
Icon:
|
|
707
|
+
Icon: Ie
|
|
708
708
|
},
|
|
709
709
|
overwrite: {
|
|
710
710
|
className: "fdd-tone-amber",
|
|
711
|
-
Icon:
|
|
711
|
+
Icon: Oe
|
|
712
712
|
},
|
|
713
713
|
suggestion: {
|
|
714
714
|
className: "fdd-tone-blue",
|
|
715
|
-
Icon:
|
|
715
|
+
Icon: Pe
|
|
716
716
|
},
|
|
717
717
|
file: {
|
|
718
718
|
className: "fdd-tone-blue",
|
|
719
|
-
Icon:
|
|
719
|
+
Icon: Me
|
|
720
720
|
}
|
|
721
721
|
};
|
|
722
|
-
function
|
|
723
|
-
let { className: u, Icon: d } =
|
|
722
|
+
function I({ tone: e = "suggestion", title: t, body: n, facts: r = [], okText: i = "Continue", cancelText: a = "Cancel", danger: o = !1, footnote: s, altText: c, renderExtra: l } = {}) {
|
|
723
|
+
let { className: u, Icon: d } = Bt[e] ?? Bt.suggestion, f = r.filter((e) => e && e.value !== void 0 && e.value !== null && String(e.value).trim() !== "");
|
|
724
724
|
return new Promise((e) => {
|
|
725
725
|
let r = !1, p = (t) => {
|
|
726
726
|
r || (r = !0, e(t));
|
|
727
|
-
}, m =
|
|
728
|
-
...c ? { footer: (e, { OkBtn: t, CancelBtn: n }) => /* @__PURE__ */
|
|
729
|
-
/* @__PURE__ */
|
|
727
|
+
}, m = E.confirm({
|
|
728
|
+
...c ? { footer: (e, { OkBtn: t, CancelBtn: n }) => /* @__PURE__ */ A(O, { children: [
|
|
729
|
+
/* @__PURE__ */ k(T, {
|
|
730
730
|
size: "large",
|
|
731
731
|
className: "fdd-alt-btn",
|
|
732
732
|
onClick: () => {
|
|
@@ -734,8 +734,8 @@ function L({ tone: e = "suggestion", title: t, body: n, facts: r = [], okText: i
|
|
|
734
734
|
},
|
|
735
735
|
children: c
|
|
736
736
|
}),
|
|
737
|
-
/* @__PURE__ */
|
|
738
|
-
/* @__PURE__ */
|
|
737
|
+
/* @__PURE__ */ k(n, {}),
|
|
738
|
+
/* @__PURE__ */ k(t, {})
|
|
739
739
|
] }) } : {},
|
|
740
740
|
icon: null,
|
|
741
741
|
centered: !0,
|
|
@@ -748,35 +748,35 @@ function L({ tone: e = "suggestion", title: t, body: n, facts: r = [], okText: i
|
|
|
748
748
|
size: "large"
|
|
749
749
|
},
|
|
750
750
|
cancelButtonProps: { size: "large" },
|
|
751
|
-
content: /* @__PURE__ */
|
|
751
|
+
content: /* @__PURE__ */ A("div", {
|
|
752
752
|
className: "fdd",
|
|
753
753
|
children: [
|
|
754
|
-
/* @__PURE__ */
|
|
754
|
+
/* @__PURE__ */ A("div", {
|
|
755
755
|
className: "fdd-head",
|
|
756
|
-
children: [/* @__PURE__ */
|
|
756
|
+
children: [/* @__PURE__ */ k("span", {
|
|
757
757
|
className: "fdd-icon",
|
|
758
758
|
"aria-hidden": "true",
|
|
759
|
-
children: /* @__PURE__ */
|
|
760
|
-
}), /* @__PURE__ */
|
|
759
|
+
children: /* @__PURE__ */ k(d, {})
|
|
760
|
+
}), /* @__PURE__ */ k("h3", {
|
|
761
761
|
className: "fdd-title",
|
|
762
762
|
children: t
|
|
763
763
|
})]
|
|
764
764
|
}),
|
|
765
|
-
f.length > 0 && /* @__PURE__ */
|
|
765
|
+
f.length > 0 && /* @__PURE__ */ k("dl", {
|
|
766
766
|
className: "fdd-facts",
|
|
767
|
-
children: f.map((e) => /* @__PURE__ */
|
|
767
|
+
children: f.map((e) => /* @__PURE__ */ A("div", {
|
|
768
768
|
className: "fdd-fact",
|
|
769
|
-
children: [/* @__PURE__ */
|
|
769
|
+
children: [/* @__PURE__ */ k("dt", { children: e.label }), /* @__PURE__ */ k("dd", { children: e.value })]
|
|
770
770
|
}, e.label))
|
|
771
771
|
}),
|
|
772
|
-
n && /* @__PURE__ */
|
|
772
|
+
n && /* @__PURE__ */ k("p", {
|
|
773
773
|
className: "fdd-body",
|
|
774
774
|
children: n
|
|
775
775
|
}),
|
|
776
776
|
l?.(() => {
|
|
777
777
|
p(!0), m.destroy();
|
|
778
778
|
}),
|
|
779
|
-
s && /* @__PURE__ */
|
|
779
|
+
s && /* @__PURE__ */ k("p", {
|
|
780
780
|
className: "fdd-footnote",
|
|
781
781
|
children: s
|
|
782
782
|
})
|
|
@@ -787,38 +787,38 @@ function L({ tone: e = "suggestion", title: t, body: n, facts: r = [], okText: i
|
|
|
787
787
|
});
|
|
788
788
|
});
|
|
789
789
|
}
|
|
790
|
-
function
|
|
791
|
-
let { className: o, Icon: s } =
|
|
790
|
+
function Vt({ tone: e = "duplicate", title: t, body: n, facts: r = [], okText: i = "Go back", renderExtra: a } = {}) {
|
|
791
|
+
let { className: o, Icon: s } = Bt[e] ?? Bt.suggestion, c = r.filter((e) => e && String(e.value ?? "").trim() !== "");
|
|
792
792
|
return new Promise((e) => {
|
|
793
|
-
let r =
|
|
793
|
+
let r = E.warning({
|
|
794
794
|
icon: null,
|
|
795
795
|
centered: !0,
|
|
796
796
|
width: 480,
|
|
797
797
|
className: `fdd-modal ${o}`,
|
|
798
798
|
okText: i,
|
|
799
799
|
okButtonProps: { size: "large" },
|
|
800
|
-
content: /* @__PURE__ */
|
|
800
|
+
content: /* @__PURE__ */ A("div", {
|
|
801
801
|
className: "fdd",
|
|
802
802
|
children: [
|
|
803
|
-
/* @__PURE__ */
|
|
803
|
+
/* @__PURE__ */ A("div", {
|
|
804
804
|
className: "fdd-head",
|
|
805
|
-
children: [/* @__PURE__ */
|
|
805
|
+
children: [/* @__PURE__ */ k("span", {
|
|
806
806
|
className: "fdd-icon",
|
|
807
807
|
"aria-hidden": "true",
|
|
808
|
-
children: /* @__PURE__ */
|
|
809
|
-
}), /* @__PURE__ */
|
|
808
|
+
children: /* @__PURE__ */ k(s, {})
|
|
809
|
+
}), /* @__PURE__ */ k("h3", {
|
|
810
810
|
className: "fdd-title",
|
|
811
811
|
children: t
|
|
812
812
|
})]
|
|
813
813
|
}),
|
|
814
|
-
c.length > 0 && /* @__PURE__ */
|
|
814
|
+
c.length > 0 && /* @__PURE__ */ k("dl", {
|
|
815
815
|
className: "fdd-facts",
|
|
816
|
-
children: c.map((e) => /* @__PURE__ */
|
|
816
|
+
children: c.map((e) => /* @__PURE__ */ A("div", {
|
|
817
817
|
className: "fdd-fact",
|
|
818
|
-
children: [/* @__PURE__ */
|
|
818
|
+
children: [/* @__PURE__ */ k("dt", { children: e.label }), /* @__PURE__ */ k("dd", { children: e.value })]
|
|
819
819
|
}, e.label))
|
|
820
820
|
}),
|
|
821
|
-
n && /* @__PURE__ */
|
|
821
|
+
n && /* @__PURE__ */ k("p", {
|
|
822
822
|
className: "fdd-body",
|
|
823
823
|
children: n
|
|
824
824
|
}),
|
|
@@ -833,7 +833,7 @@ function Bt({ tone: e = "duplicate", title: t, body: n, facts: r = [], okText: i
|
|
|
833
833
|
}
|
|
834
834
|
//#endregion
|
|
835
835
|
//#region src/services/aiActionApi.js
|
|
836
|
-
async function
|
|
836
|
+
async function Ht({ module: e, group: t, field: n, actionKey: i, inputs: a = {}, files: s = {} }) {
|
|
837
837
|
if (!e || !t || !n || !i) throw Error("module, group, field and actionKey are required to run an AI action");
|
|
838
838
|
let c = await r(), l = new FormData();
|
|
839
839
|
l.append("json", JSON.stringify({ inputs: a })), Object.entries(s).forEach(([e, t]) => {
|
|
@@ -859,12 +859,12 @@ async function Vt({ module: e, group: t, field: n, actionKey: i, inputs: a = {},
|
|
|
859
859
|
}
|
|
860
860
|
//#endregion
|
|
861
861
|
//#region src/components/form/applyGroupValues.js
|
|
862
|
-
var
|
|
863
|
-
function
|
|
862
|
+
var Ut = (e) => e === !0 || e === 1 || e === "1", Wt = (e) => e == null || e === "";
|
|
863
|
+
function Gt(e) {
|
|
864
864
|
return String(e ?? "").split(".").map((e) => e.trim()).filter(Boolean);
|
|
865
865
|
}
|
|
866
|
-
function
|
|
867
|
-
let r = Array.isArray(t) ? t :
|
|
866
|
+
function L(e, t, n) {
|
|
867
|
+
let r = Array.isArray(t) ? t : Gt(t);
|
|
868
868
|
if (!r.length) return e;
|
|
869
869
|
let i = e;
|
|
870
870
|
for (let e = 0; e < r.length - 1; e += 1) {
|
|
@@ -873,23 +873,23 @@ function R(e, t, n) {
|
|
|
873
873
|
}
|
|
874
874
|
return i[r[r.length - 1]] = n, e;
|
|
875
875
|
}
|
|
876
|
-
function
|
|
876
|
+
function R(e, t = []) {
|
|
877
877
|
if (!(!e || typeof e != "object")) for (let n of t) {
|
|
878
878
|
if (!n) continue;
|
|
879
879
|
let t = s(e, n);
|
|
880
|
-
if (!
|
|
880
|
+
if (!Wt(t)) return t;
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function z(e, t) {
|
|
884
884
|
if (!e || typeof e != "object") return;
|
|
885
|
-
let n = Object.entries(e), r = n.find(([e, n]) => t.test(e) && !
|
|
885
|
+
let n = Object.entries(e), r = n.find(([e, n]) => t.test(e) && !Wt(n));
|
|
886
886
|
if (r) return r[1];
|
|
887
887
|
for (let [, e] of n) if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
888
|
-
let n =
|
|
889
|
-
if (!
|
|
888
|
+
let n = z(e, t);
|
|
889
|
+
if (!Wt(n)) return n;
|
|
890
890
|
}
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function Kt(e, t) {
|
|
893
893
|
let n = Array.isArray(e) ? e : e ? [e] : [];
|
|
894
894
|
if (!n.length) return;
|
|
895
895
|
let r = n.map((e, n) => {
|
|
@@ -899,9 +899,9 @@ function Gt(e, t) {
|
|
|
899
899
|
status: "done"
|
|
900
900
|
};
|
|
901
901
|
if (!e || typeof e != "object") return null;
|
|
902
|
-
let r =
|
|
902
|
+
let r = R(e, [t.fileUrlKey, t.locationKey]) ?? z(e, /(location|url|path)$/i) ?? "", i = R(e, [t.fileNameKey]) ?? z(e, /(uploadName|uploadedFileName|fileName|name)$/i) ?? "";
|
|
903
903
|
if (!r && !i) return null;
|
|
904
|
-
let a = r && !String(r).startsWith("http") ?
|
|
904
|
+
let a = r && !String(r).startsWith("http") ? re(r) : r;
|
|
905
905
|
return {
|
|
906
906
|
uid: String(e.id ?? e._id ?? e.uniqueName ?? e.documentCopyUniqueName ?? `${t.field}-${n}`),
|
|
907
907
|
name: i || "file",
|
|
@@ -913,11 +913,11 @@ function Gt(e, t) {
|
|
|
913
913
|
}).filter(Boolean);
|
|
914
914
|
return r.length ? r : void 0;
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function qt(e, t) {
|
|
917
917
|
if (!e || typeof e != "object") return;
|
|
918
|
-
let n =
|
|
918
|
+
let n = R(e, [t.fileNameKey, t.field]) ?? z(e, /(uploadName|uploadedFileName|fileName|name)$/i), r = R(e, [t.fileUrlKey, t.locationKey]) ?? z(e, /(location|url|path)$/i) ?? "";
|
|
919
919
|
if (!n && !r) return;
|
|
920
|
-
let i = r && !String(r).startsWith("http") ?
|
|
920
|
+
let i = r && !String(r).startsWith("http") ? re(r) : r, a = e.documentCopyUniqueName ?? e.uniqueName ?? n ?? `${t.field}-0`;
|
|
921
921
|
return [{
|
|
922
922
|
uid: String(a),
|
|
923
923
|
name: n ?? "file",
|
|
@@ -926,7 +926,7 @@ function Kt(e, t) {
|
|
|
926
926
|
url: i || void 0
|
|
927
927
|
}];
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function Jt(e, t, n, r) {
|
|
930
930
|
(e.fields ?? []).forEach((e) => {
|
|
931
931
|
e?.verifyAction && [
|
|
932
932
|
e.verifyResultField,
|
|
@@ -935,47 +935,47 @@ function qt(e, t, n, r) {
|
|
|
935
935
|
].map((e) => String(e ?? "").trim()).filter(Boolean).forEach((e) => {
|
|
936
936
|
if (s(n, e) !== void 0) return;
|
|
937
937
|
let i = r(t, { field: e });
|
|
938
|
-
i != null &&
|
|
938
|
+
i != null && L(n, e, i);
|
|
939
939
|
});
|
|
940
940
|
});
|
|
941
941
|
}
|
|
942
|
-
function
|
|
943
|
-
let t = Array.isArray(e.rows) ?
|
|
942
|
+
function Yt(e) {
|
|
943
|
+
let t = Array.isArray(e.rows) ? x(e, e.rows) : null, n = Math.max(0, Number(e.minRows ?? 0) || 0), r = (t, n, r) => {
|
|
944
944
|
let i = {};
|
|
945
945
|
return (e.fields ?? []).forEach((e) => {
|
|
946
946
|
if (!e.field) return;
|
|
947
947
|
if (e.type === "file") {
|
|
948
948
|
let r = n(t, e);
|
|
949
|
-
r &&
|
|
949
|
+
r && L(i, e.field, r);
|
|
950
950
|
return;
|
|
951
951
|
}
|
|
952
952
|
let a = r(t, e);
|
|
953
953
|
if (a == null) {
|
|
954
954
|
let t = e.defaultOnEdit ? m(e) : void 0;
|
|
955
|
-
t !== void 0 &&
|
|
955
|
+
t !== void 0 && L(i, e.field, t);
|
|
956
956
|
return;
|
|
957
957
|
}
|
|
958
|
-
|
|
959
|
-
}),
|
|
958
|
+
L(i, e.field, Ut(e.addRow) ? u(e, a) : ie(e, a));
|
|
959
|
+
}), Jt(e, t, i, r), i;
|
|
960
960
|
}, i = p(e, { editing: !0 });
|
|
961
961
|
if (t && t.length > 0) {
|
|
962
|
-
let e = t.map((e) => r(e, (e, t) =>
|
|
962
|
+
let e = t.map((e) => r(e, (e, t) => qt(e, t), (e, t) => s(e, t.field)));
|
|
963
963
|
for (; e.length < n;) e.push({ ...i });
|
|
964
964
|
return e;
|
|
965
965
|
}
|
|
966
|
-
let a = r(e, (e, t) =>
|
|
966
|
+
let a = r(e, (e, t) => Kt(t.value, t), (e, t) => t.value), o = Object.keys(a).length > 0 ? [a] : [];
|
|
967
967
|
for (; o.length < n;) o.push({ ...i });
|
|
968
968
|
return o;
|
|
969
969
|
}
|
|
970
|
-
function
|
|
970
|
+
function Xt(e, t = []) {
|
|
971
971
|
let n = {};
|
|
972
972
|
return t.forEach((e) => {
|
|
973
|
-
e.toggleEnabled && e.toggleField &&
|
|
973
|
+
e.toggleEnabled && e.toggleField && L(n, e.toggleField, !!e.toggleValue), !e.addRow && (e.fields ?? []).forEach((e) => {
|
|
974
974
|
if (!e.field || e.addRow) return;
|
|
975
975
|
let t = e.value, r = e.field;
|
|
976
976
|
if (e.type === "file") {
|
|
977
|
-
let i =
|
|
978
|
-
i &&
|
|
977
|
+
let i = Kt(t, e);
|
|
978
|
+
i && L(n, r, i);
|
|
979
979
|
return;
|
|
980
980
|
}
|
|
981
981
|
if (t == null) return;
|
|
@@ -983,43 +983,43 @@ function Yt(e, t = []) {
|
|
|
983
983
|
let i = e.transformRule?.map;
|
|
984
984
|
if (i) {
|
|
985
985
|
let e = Object.entries(i).find(([, e]) => String(e) === String(t));
|
|
986
|
-
|
|
987
|
-
} else
|
|
986
|
+
L(n, r, e ? [e[0]] : []);
|
|
987
|
+
} else L(n, r, _(e, Array.isArray(t) ? t : [t]));
|
|
988
988
|
return;
|
|
989
989
|
}
|
|
990
990
|
let i = e.splitDialCodeInto;
|
|
991
991
|
if (i && typeof t == "string") {
|
|
992
992
|
let { code: a, rest: o } = l(t), s = h(a);
|
|
993
|
-
s &&
|
|
993
|
+
s && L(n, i, s), L(n, r, ie(e, o || t));
|
|
994
994
|
return;
|
|
995
995
|
}
|
|
996
|
-
|
|
996
|
+
L(n, r, ie(e, t));
|
|
997
997
|
});
|
|
998
998
|
}), Object.keys(n).length > 0 && e.setFieldsValue(n), n;
|
|
999
999
|
}
|
|
1000
1000
|
//#endregion
|
|
1001
1001
|
//#region src/components/form/useAiActions.js
|
|
1002
|
-
function
|
|
1002
|
+
function Zt(e) {
|
|
1003
1003
|
let t = document.createElement("div");
|
|
1004
1004
|
return t.innerHTML = String(e ?? ""), t.textContent || t.innerText || "";
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1007
|
-
return t && t === "stripHtml" ?
|
|
1006
|
+
function Qt(e, t) {
|
|
1007
|
+
return t && t === "stripHtml" ? Zt(e) : e;
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function $t(e) {
|
|
1010
1010
|
return String(e ?? "").trim().split(/\s+/).filter(Boolean).length;
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1012
|
+
function en(e) {
|
|
1013
1013
|
return Object.values(e || {}).some((e) => e != null && e !== "");
|
|
1014
1014
|
}
|
|
1015
|
-
function
|
|
1015
|
+
function tn(e, t) {
|
|
1016
1016
|
if (e.kind === "file") return Array.isArray(t) ? t.length > 0 : !!t;
|
|
1017
|
-
let n =
|
|
1017
|
+
let n = Qt(t, e.transform), r = String(n ?? "").trim();
|
|
1018
1018
|
if (!r) return !1;
|
|
1019
1019
|
let i = Number(e.minWords) || 0;
|
|
1020
|
-
return i > 0 ?
|
|
1020
|
+
return i > 0 ? $t(r) >= i : !0;
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function nn(e) {
|
|
1023
1023
|
let t = [], n = /* @__PURE__ */ new Set(), r = (e) => {
|
|
1024
1024
|
if (!(!e || typeof e != "object" || n.has(e))) {
|
|
1025
1025
|
if (n.add(e), Array.isArray(e)) {
|
|
@@ -1033,7 +1033,7 @@ function en(e) {
|
|
|
1033
1033
|
};
|
|
1034
1034
|
return r(e), t;
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function rn(e, t) {
|
|
1037
1037
|
let n = e.inputs || [];
|
|
1038
1038
|
if (n.length === 0) return !0;
|
|
1039
1039
|
let r = /* @__PURE__ */ new Map();
|
|
@@ -1041,10 +1041,10 @@ function tn(e, t) {
|
|
|
1041
1041
|
let n = e.group || `__solo_${t}`;
|
|
1042
1042
|
r.has(n) || r.set(n, []), r.get(n).push(e);
|
|
1043
1043
|
});
|
|
1044
|
-
for (let e of r.values()) if (e.some((e) => e.required || Number(e.minWords) > 0) && !e.some((e) =>
|
|
1044
|
+
for (let e of r.values()) if (e.some((e) => e.required || Number(e.minWords) > 0) && !e.some((e) => tn(e, t(e.sourceField)))) return !1;
|
|
1045
1045
|
return !0;
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function an(e = []) {
|
|
1048
1048
|
let t = [];
|
|
1049
1049
|
return e.forEach((e) => {
|
|
1050
1050
|
if (e?.addRow) {
|
|
@@ -1057,32 +1057,32 @@ function nn(e = []) {
|
|
|
1057
1057
|
});
|
|
1058
1058
|
}), t;
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1061
|
-
return
|
|
1060
|
+
function on(e, t) {
|
|
1061
|
+
return an(t).some((t) => {
|
|
1062
1062
|
let n = e.getFieldValue(t);
|
|
1063
|
-
return Array.isArray(n) ? n.some(
|
|
1063
|
+
return Array.isArray(n) ? n.some(en) : n != null && n !== "";
|
|
1064
1064
|
});
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1066
|
+
function sn(e, t = [], { includeUntouched: n = !1 } = {}) {
|
|
1067
1067
|
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;
|
|
1068
1068
|
return Object.entries(r).forEach(([e, t]) => {
|
|
1069
|
-
if (!(i.has(e) || !a(e) || !
|
|
1069
|
+
if (!(i.has(e) || !a(e) || !cn(t))) {
|
|
1070
1070
|
if (Array.isArray(t)) {
|
|
1071
|
-
o += t.filter((e) => e && typeof e == "object" ?
|
|
1071
|
+
o += t.filter((e) => e && typeof e == "object" ? en(e) : !!e).length;
|
|
1072
1072
|
return;
|
|
1073
1073
|
}
|
|
1074
1074
|
o += 1;
|
|
1075
1075
|
}
|
|
1076
1076
|
}), o;
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1079
|
-
return e == null || e === "" ? !1 : Array.isArray(e) ? e.some((e) => e && typeof e == "object" ?
|
|
1078
|
+
function cn(e) {
|
|
1079
|
+
return e == null || e === "" ? !1 : Array.isArray(e) ? e.some((e) => e && typeof e == "object" ? en(e) : !!e) : typeof e != "object" || Object.values(e).some((e) => e != null && e !== "");
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function ln(e, t = [], { includeUntouched: n = !1 } = {}) {
|
|
1082
1082
|
let r = e.getFieldsValue(!0) ?? {}, i = new Set([t].flat().filter(Boolean)), a = Object.keys(r).filter((e) => !i.has(e));
|
|
1083
|
-
return n ? a.some((e) =>
|
|
1083
|
+
return n ? a.some((e) => cn(r[e])) : typeof e.isFieldTouched == "function" ? a.some((t) => e.isFieldTouched(t) && cn(r[t])) : a.some((e) => cn(r[e]));
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1085
|
+
function un(e = []) {
|
|
1086
1086
|
let t = {};
|
|
1087
1087
|
return (e ?? []).forEach((e) => {
|
|
1088
1088
|
e?.addRow || (e?.fields ?? []).forEach((e) => {
|
|
@@ -1093,47 +1093,47 @@ function sn(e = []) {
|
|
|
1093
1093
|
});
|
|
1094
1094
|
}), t;
|
|
1095
1095
|
}
|
|
1096
|
-
function
|
|
1096
|
+
function dn(e, t, n) {
|
|
1097
1097
|
let r = e?.confirmWhen ?? "never";
|
|
1098
|
-
return r === "never" ? !1 : r === "always" ||
|
|
1098
|
+
return r === "never" ? !1 : r === "always" || on(t, n);
|
|
1099
1099
|
}
|
|
1100
|
-
var
|
|
1100
|
+
var fn = [
|
|
1101
1101
|
"top-left",
|
|
1102
1102
|
"top-center",
|
|
1103
1103
|
"top-right",
|
|
1104
1104
|
"bottom-left",
|
|
1105
1105
|
"bottom-center",
|
|
1106
1106
|
"bottom-right"
|
|
1107
|
-
],
|
|
1108
|
-
function
|
|
1107
|
+
], pn = "bottom-left";
|
|
1108
|
+
function mn(e = []) {
|
|
1109
1109
|
let t = {};
|
|
1110
1110
|
return e.forEach((e) => {
|
|
1111
|
-
let n =
|
|
1111
|
+
let n = fn.includes(e.position) ? e.position : pn;
|
|
1112
1112
|
(t[n] ??= []).push(e);
|
|
1113
1113
|
}), t;
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1116
|
-
let [s, c] = w(null), [l, u] = w(""), d =
|
|
1117
|
-
if (!o) return
|
|
1115
|
+
function hn({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPrefilledAsData: a = !1, watchSourcesOnly: o = !1 }) {
|
|
1116
|
+
let [s, c] = w(null), [l, u] = w(""), d = he(() => nn(t), [t]), f = xe.useWatch((e) => o ? d.map((t) => rn(t, (t) => e?.[t]) ? "1" : "0").join("") : e, e), p = pe((t) => {
|
|
1117
|
+
if (!o) return rn(t, (e) => (f || {})[e]);
|
|
1118
1118
|
let n = d.indexOf(t);
|
|
1119
|
-
return n >= 0 ? String(f ?? "")[n] === "1" :
|
|
1119
|
+
return n >= 0 ? String(f ?? "")[n] === "1" : rn(t, (t) => (e.getFieldsValue() || {})[t]);
|
|
1120
1120
|
}, [
|
|
1121
1121
|
f,
|
|
1122
1122
|
o,
|
|
1123
1123
|
d,
|
|
1124
1124
|
e
|
|
1125
|
-
]), m =
|
|
1125
|
+
]), m = pe((t) => {
|
|
1126
1126
|
if (!Array.isArray(t) || t.length === 0) return !1;
|
|
1127
|
-
let n =
|
|
1127
|
+
let n = Xt(e, t.filter((e) => !e.addRow)), r = Object.keys(n).length > 0;
|
|
1128
1128
|
return t.forEach((t) => {
|
|
1129
1129
|
if (!t.addRow || !Array.isArray(t.rows) || t.rows.length === 0) return;
|
|
1130
|
-
let n =
|
|
1130
|
+
let n = Yt(t);
|
|
1131
1131
|
if (n.length === 0) return;
|
|
1132
1132
|
r = !0;
|
|
1133
|
-
let i = () => e.setFieldsValue({ [t.name]: n }), a = (e.getFieldValue(t.name) || []).filter(
|
|
1133
|
+
let i = () => e.setFieldsValue({ [t.name]: n }), a = (e.getFieldValue(t.name) || []).filter(en);
|
|
1134
1134
|
if (a.length) {
|
|
1135
1135
|
let e = t.label || t.name;
|
|
1136
|
-
|
|
1136
|
+
I({
|
|
1137
1137
|
tone: "overwrite",
|
|
1138
1138
|
title: `Replace what's in ${e}?`,
|
|
1139
1139
|
facts: [
|
|
@@ -1161,11 +1161,11 @@ function fn({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
|
|
|
1161
1161
|
}), r;
|
|
1162
1162
|
}, [e]);
|
|
1163
1163
|
return {
|
|
1164
|
-
runAction:
|
|
1164
|
+
runAction: pe(async (t, o, s, l) => {
|
|
1165
1165
|
let d = s?.confirmWhen ?? "never";
|
|
1166
|
-
if (s?.trigger === "upload" && d !== "never" && (d === "always" ||
|
|
1167
|
-
let t = s.confirmMessages ?? {}, n = l?.name || e.getFieldValue(o?.field)?.slice?.(-1)?.[0]?.name, r =
|
|
1168
|
-
if (!await
|
|
1166
|
+
if (s?.trigger === "upload" && d !== "never" && (d === "always" || ln(e, [o?.field], { includeUntouched: a }))) {
|
|
1167
|
+
let t = s.confirmMessages ?? {}, n = l?.name || e.getFieldValue(o?.field)?.slice?.(-1)?.[0]?.name, r = sn(e, [o?.field], { includeUntouched: a });
|
|
1168
|
+
if (!await I({
|
|
1169
1169
|
tone: "overwrite",
|
|
1170
1170
|
title: t.title || "Read this file and fill the form in?",
|
|
1171
1171
|
facts: [{
|
|
@@ -1189,12 +1189,12 @@ function fn({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
|
|
|
1189
1189
|
r && (c[t.param] = r);
|
|
1190
1190
|
} else {
|
|
1191
1191
|
let n = e.getFieldValue(t.sourceField);
|
|
1192
|
-
n != null && n !== "" && (a[t.param] =
|
|
1192
|
+
n != null && n !== "" && (a[t.param] = Qt(n, t.transform));
|
|
1193
1193
|
}
|
|
1194
1194
|
}), (s.inputs || []).forEach((e) => {
|
|
1195
1195
|
!e.group || e.kind !== "text" || (s.inputs || []).some((t) => t.group === e.group && t.kind === "file" && c[t.param]) && delete a[e.param];
|
|
1196
1196
|
});
|
|
1197
|
-
let u = await
|
|
1197
|
+
let u = await Ht({
|
|
1198
1198
|
module: n,
|
|
1199
1199
|
group: t,
|
|
1200
1200
|
field: o.field,
|
|
@@ -1202,9 +1202,9 @@ function fn({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
|
|
|
1202
1202
|
inputs: a,
|
|
1203
1203
|
files: c
|
|
1204
1204
|
}), d = s.label || "AI action", f = u?.groups;
|
|
1205
|
-
if (s?.trigger !== "upload" &&
|
|
1206
|
-
let e = s.confirmMessages ?? {}, t =
|
|
1207
|
-
if (!await
|
|
1205
|
+
if (s?.trigger !== "upload" && dn(s, e, f)) {
|
|
1206
|
+
let e = s.confirmMessages ?? {}, t = an(f).length;
|
|
1207
|
+
if (!await I({
|
|
1208
1208
|
tone: "overwrite",
|
|
1209
1209
|
title: e.title || `Fill the form in from ${d}?`,
|
|
1210
1210
|
facts: [{
|
|
@@ -1217,7 +1217,7 @@ function fn({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
|
|
|
1217
1217
|
body: e.body || "We found details you can use. Applying them will replace what you have already entered in those boxes.",
|
|
1218
1218
|
okText: e.ok || "Use these details",
|
|
1219
1219
|
cancelText: e.cancel || "Keep what I typed"
|
|
1220
|
-
})) return
|
|
1220
|
+
})) return D.info(`${d} cancelled — your entries were kept.`), u;
|
|
1221
1221
|
}
|
|
1222
1222
|
if (i) {
|
|
1223
1223
|
let e = await i({
|
|
@@ -1225,18 +1225,18 @@ function fn({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
|
|
|
1225
1225
|
field: o,
|
|
1226
1226
|
groupName: t,
|
|
1227
1227
|
responseGroups: f,
|
|
1228
|
-
payload:
|
|
1228
|
+
payload: un(f)
|
|
1229
1229
|
});
|
|
1230
1230
|
if (e === !1 || e === "abort") return u;
|
|
1231
1231
|
}
|
|
1232
1232
|
let p = m(f);
|
|
1233
|
-
return p ?
|
|
1233
|
+
return p ? D.success(`${d} completed successfully.`) : D.info(`${d} completed, but no matching details were found.`), p && r && await r({
|
|
1234
1234
|
action: s,
|
|
1235
1235
|
field: o,
|
|
1236
1236
|
groupName: t
|
|
1237
1237
|
}), u;
|
|
1238
1238
|
} catch (e) {
|
|
1239
|
-
|
|
1239
|
+
D.error(e?.message || `${s.label || "AI action"} failed`);
|
|
1240
1240
|
return;
|
|
1241
1241
|
} finally {
|
|
1242
1242
|
c(null), u("");
|
|
@@ -1257,17 +1257,17 @@ function fn({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
|
|
|
1257
1257
|
}
|
|
1258
1258
|
//#endregion
|
|
1259
1259
|
//#region src/components/form/AiActionButtons.jsx
|
|
1260
|
-
function
|
|
1260
|
+
function gn({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
|
|
1261
1261
|
if (!t || t.length === 0) return null;
|
|
1262
1262
|
let a = e.endsWith("center") ? "center" : e.endsWith("right") ? "flex-end" : "flex-start";
|
|
1263
|
-
return /* @__PURE__ */
|
|
1263
|
+
return /* @__PURE__ */ k(Se, {
|
|
1264
1264
|
size: 8,
|
|
1265
1265
|
className: "v1-ai-action-buttons",
|
|
1266
1266
|
style: {
|
|
1267
1267
|
width: "100%",
|
|
1268
1268
|
justifyContent: a
|
|
1269
1269
|
},
|
|
1270
|
-
children: t.map((e) => /* @__PURE__ */
|
|
1270
|
+
children: t.map((e) => /* @__PURE__ */ k(T, {
|
|
1271
1271
|
size: "small",
|
|
1272
1272
|
loading: n.loadingKey === e.key,
|
|
1273
1273
|
disabled: n.busy || !n.isActionEnabled(e),
|
|
@@ -1278,18 +1278,18 @@ function pn({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
//#endregion
|
|
1280
1280
|
//#region src/components/form/emailValidator.js
|
|
1281
|
-
function
|
|
1281
|
+
function _n(e) {
|
|
1282
1282
|
let t = String(e ?? "").trim(), n = /^([^\s@]+)@([^\s@]+)\.([A-Za-z]{2,})$/.exec(t);
|
|
1283
1283
|
if (!n) return !1;
|
|
1284
1284
|
let [, r, i] = n;
|
|
1285
1285
|
return /[A-Za-z]/.test(r) && /[A-Za-z]/.test(i);
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1288
|
-
return { validator: (n, r) => r == null || r === "" ||
|
|
1287
|
+
function vn(e = "Email", t) {
|
|
1288
|
+
return { validator: (n, r) => r == null || r === "" || _n(r) ? Promise.resolve() : Promise.reject(Error(t ?? `Enter a valid ${e}; numeric-only email addresses are not allowed`)) };
|
|
1289
1289
|
}
|
|
1290
1290
|
//#endregion
|
|
1291
1291
|
//#region src/components/form/inputValidator.js
|
|
1292
|
-
var
|
|
1292
|
+
var yn = [
|
|
1293
1293
|
{
|
|
1294
1294
|
label: "Only Numbers",
|
|
1295
1295
|
value: "onlyNumber"
|
|
@@ -1362,7 +1362,7 @@ var gn = [
|
|
|
1362
1362
|
label: "Website URL",
|
|
1363
1363
|
value: "websiteUrl"
|
|
1364
1364
|
}
|
|
1365
|
-
],
|
|
1365
|
+
], bn = {
|
|
1366
1366
|
onlyNumber: /^[0-9]$/,
|
|
1367
1367
|
experience: /^[0-9]$/,
|
|
1368
1368
|
numericTwoDigits: /^[0-9]$/,
|
|
@@ -1378,10 +1378,10 @@ var gn = [
|
|
|
1378
1378
|
decimalRange: /^[0-9.]$/,
|
|
1379
1379
|
contactNumber: /^[0-9()\-+\s]$/
|
|
1380
1380
|
};
|
|
1381
|
-
function
|
|
1382
|
-
return
|
|
1381
|
+
function xn(e) {
|
|
1382
|
+
return bn[e] ?? null;
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1384
|
+
function Sn(e, t = {}, n = "change") {
|
|
1385
1385
|
if (!t?.type || e == null) return {
|
|
1386
1386
|
cleaned: e ?? "",
|
|
1387
1387
|
error: null
|
|
@@ -1464,7 +1464,7 @@ function yn(e, t = {}, n = "change") {
|
|
|
1464
1464
|
break;
|
|
1465
1465
|
}
|
|
1466
1466
|
case "email":
|
|
1467
|
-
c = n === "blur" ? r.trim() : r, c && !
|
|
1467
|
+
c = n === "blur" ? r.trim() : r, c && !_n(c) && (l = `${s} must be a valid email address; numeric-only email addresses are not allowed.`);
|
|
1468
1468
|
break;
|
|
1469
1469
|
case "websiteUrl":
|
|
1470
1470
|
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.`);
|
|
@@ -1476,21 +1476,21 @@ function yn(e, t = {}, n = "change") {
|
|
|
1476
1476
|
error: l
|
|
1477
1477
|
};
|
|
1478
1478
|
}
|
|
1479
|
-
var
|
|
1480
|
-
function
|
|
1479
|
+
var Cn = "This value is already present";
|
|
1480
|
+
function wn(e) {
|
|
1481
1481
|
return typeof e == "string" ? e : e?.type ?? e?.rule ?? e?.name;
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1484
|
-
if (
|
|
1483
|
+
function Tn(e) {
|
|
1484
|
+
if (wn(e) !== "unique") return null;
|
|
1485
1485
|
if (typeof e == "string") return {
|
|
1486
|
-
message:
|
|
1486
|
+
message: Cn,
|
|
1487
1487
|
normalizer: "trim",
|
|
1488
1488
|
skipBlank: !0,
|
|
1489
1489
|
validateOn: "blur"
|
|
1490
1490
|
};
|
|
1491
1491
|
let t = e.value && typeof e.value == "object" ? e.value : e, n = String(t.validateOn ?? "blur").toLowerCase();
|
|
1492
1492
|
return {
|
|
1493
|
-
message: typeof e.message == "string" && e.message.trim() ? e.message.trim() :
|
|
1493
|
+
message: typeof e.message == "string" && e.message.trim() ? e.message.trim() : Cn,
|
|
1494
1494
|
collectionField: t.collectionField ?? "",
|
|
1495
1495
|
normalizer: String(t.normalizer ?? "trim"),
|
|
1496
1496
|
skipBlank: t.skipBlank !== !1,
|
|
@@ -1501,20 +1501,20 @@ function xn(e) {
|
|
|
1501
1501
|
].includes(n) ? n : "blur"
|
|
1502
1502
|
};
|
|
1503
1503
|
}
|
|
1504
|
-
function
|
|
1504
|
+
function En(e) {
|
|
1505
1505
|
let t = e?.validations ?? e?.validation ?? e?.rules ?? [];
|
|
1506
1506
|
if (!Array.isArray(t)) return null;
|
|
1507
1507
|
for (let e of t) {
|
|
1508
|
-
let t =
|
|
1508
|
+
let t = Tn(e);
|
|
1509
1509
|
if (t) return t;
|
|
1510
1510
|
}
|
|
1511
1511
|
return null;
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function Dn(e = []) {
|
|
1514
1514
|
let t = [];
|
|
1515
1515
|
return (Array.isArray(e) ? e : []).forEach((e) => {
|
|
1516
1516
|
(e?.fields ?? []).forEach((e) => {
|
|
1517
|
-
let n =
|
|
1517
|
+
let n = En(e);
|
|
1518
1518
|
!n || !e?.field || t.push({
|
|
1519
1519
|
field: e.field,
|
|
1520
1520
|
label: e.label ?? e.field,
|
|
@@ -1523,10 +1523,10 @@ function Cn(e = []) {
|
|
|
1523
1523
|
});
|
|
1524
1524
|
}), t;
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1526
|
+
function On(e) {
|
|
1527
1527
|
return e == null ? !0 : typeof e == "number" ? Number.isNaN(e) : typeof e == "boolean" ? !1 : Array.isArray(e) ? e.length === 0 : String(e).trim() === "";
|
|
1528
1528
|
}
|
|
1529
|
-
function
|
|
1529
|
+
function kn(e, t = "trim") {
|
|
1530
1530
|
if (e == null) return "";
|
|
1531
1531
|
let n = String(e);
|
|
1532
1532
|
switch (String(t)) {
|
|
@@ -1538,34 +1538,34 @@ function Tn(e, t = "trim") {
|
|
|
1538
1538
|
default: return n.trim();
|
|
1539
1539
|
}
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1542
|
-
return !(!e || e.skipBlank !== !1 &&
|
|
1541
|
+
function An(e, t) {
|
|
1542
|
+
return !(!e || e.skipBlank !== !1 && On(t));
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1544
|
+
function jn(e) {
|
|
1545
1545
|
return !e || e.validateOn === "submit" ? [] : e.validateOn === "change" ? ["onChange", "onBlur"] : ["onBlur"];
|
|
1546
1546
|
}
|
|
1547
|
-
var
|
|
1547
|
+
var B = {
|
|
1548
1548
|
SKIPPED: "skipped",
|
|
1549
1549
|
AVAILABLE: "available",
|
|
1550
1550
|
DUPLICATE: "duplicate",
|
|
1551
1551
|
STALE: "stale",
|
|
1552
1552
|
ERROR: "error"
|
|
1553
1553
|
};
|
|
1554
|
-
function
|
|
1554
|
+
function Mn({ module: e, field: t, recordId: n, normalized: r }) {
|
|
1555
1555
|
return `${e}${t}${n ?? ""}${r}`;
|
|
1556
1556
|
}
|
|
1557
|
-
function
|
|
1557
|
+
function Nn({ checkFieldUnique: e, onPendingChange: t } = {}) {
|
|
1558
1558
|
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = 0, a = 0;
|
|
1559
1559
|
function o(e) {
|
|
1560
1560
|
a = e, typeof t == "function" && t(a);
|
|
1561
1561
|
}
|
|
1562
1562
|
async function s({ module: t, field: s, rule: c, value: l, recordId: u, clientId: d, region: f } = {}) {
|
|
1563
|
-
if (!c || !t || !s || typeof e != "function" || !
|
|
1564
|
-
let p =
|
|
1563
|
+
if (!c || !t || !s || typeof e != "function" || !An(c, l)) return { status: B.SKIPPED };
|
|
1564
|
+
let p = Mn({
|
|
1565
1565
|
module: t,
|
|
1566
1566
|
field: s,
|
|
1567
1567
|
recordId: u,
|
|
1568
|
-
normalized:
|
|
1568
|
+
normalized: kn(l, c.normalizer)
|
|
1569
1569
|
});
|
|
1570
1570
|
if (n.has(p)) return n.get(p);
|
|
1571
1571
|
i += 1;
|
|
@@ -1580,17 +1580,17 @@ function kn({ checkFieldUnique: e, onPendingChange: t } = {}) {
|
|
|
1580
1580
|
clientId: d,
|
|
1581
1581
|
region: f
|
|
1582
1582
|
});
|
|
1583
|
-
if (r.get(s) !== m) return { status:
|
|
1583
|
+
if (r.get(s) !== m) return { status: B.STALE };
|
|
1584
1584
|
let a = i?.available === !1 ? {
|
|
1585
|
-
status:
|
|
1586
|
-
message:
|
|
1587
|
-
} : { status:
|
|
1585
|
+
status: B.DUPLICATE,
|
|
1586
|
+
message: Pn(i) || c.message || Cn
|
|
1587
|
+
} : { status: B.AVAILABLE };
|
|
1588
1588
|
return n.set(p, a), a;
|
|
1589
1589
|
} catch (e) {
|
|
1590
1590
|
return r.get(s) === m ? {
|
|
1591
|
-
status:
|
|
1591
|
+
status: B.ERROR,
|
|
1592
1592
|
error: e
|
|
1593
|
-
} : { status:
|
|
1593
|
+
} : { status: B.STALE };
|
|
1594
1594
|
} finally {
|
|
1595
1595
|
o(Math.max(0, a - 1));
|
|
1596
1596
|
}
|
|
@@ -1604,17 +1604,17 @@ function kn({ checkFieldUnique: e, onPendingChange: t } = {}) {
|
|
|
1604
1604
|
}
|
|
1605
1605
|
};
|
|
1606
1606
|
}
|
|
1607
|
-
function
|
|
1607
|
+
function Pn(e) {
|
|
1608
1608
|
return (e?.errors ?? []).find((e) => e?.message)?.message || e?.message || "";
|
|
1609
1609
|
}
|
|
1610
|
-
var
|
|
1611
|
-
function
|
|
1612
|
-
let r =
|
|
1610
|
+
var Fn = "__uniqueRule";
|
|
1611
|
+
function In({ field: e, validation: t, context: n }) {
|
|
1612
|
+
let r = Tn(t);
|
|
1613
1613
|
if (!r) return { validator: () => Promise.resolve() };
|
|
1614
1614
|
let i = e?.field ?? "";
|
|
1615
1615
|
return !n?.checker || !n?.module || !i ? { validator: () => Promise.resolve() } : {
|
|
1616
|
-
[
|
|
1617
|
-
validateTrigger:
|
|
1616
|
+
[Fn]: r,
|
|
1617
|
+
validateTrigger: jn(r),
|
|
1618
1618
|
validator: async (e, t) => {
|
|
1619
1619
|
let a = await n.checker.check({
|
|
1620
1620
|
module: n.module,
|
|
@@ -1625,26 +1625,26 @@ function Mn({ field: e, validation: t, context: n }) {
|
|
|
1625
1625
|
clientId: n.clientId,
|
|
1626
1626
|
region: n.region
|
|
1627
1627
|
});
|
|
1628
|
-
return a.status ===
|
|
1628
|
+
return a.status === B.DUPLICATE ? Promise.reject(Error(a.message || r.message)) : Promise.resolve();
|
|
1629
1629
|
}
|
|
1630
1630
|
};
|
|
1631
1631
|
}
|
|
1632
|
-
function
|
|
1632
|
+
function Ln(e = []) {
|
|
1633
1633
|
let t = Array.isArray(e) ? e : [];
|
|
1634
|
-
if (!t.some((e) => e && e[
|
|
1635
|
-
let n = t.filter((e) => e && !e[
|
|
1634
|
+
if (!t.some((e) => e && e[Fn])) return t;
|
|
1635
|
+
let n = t.filter((e) => e && !e[Fn] && !e.warningOnly);
|
|
1636
1636
|
return t.map((e) => {
|
|
1637
|
-
if (!e || !e[
|
|
1637
|
+
if (!e || !e[Fn]) return e;
|
|
1638
1638
|
let t = e.validator;
|
|
1639
1639
|
return {
|
|
1640
1640
|
...e,
|
|
1641
|
-
validator: async (e, r) => await
|
|
1641
|
+
validator: async (e, r) => await Rn(n, r, e) ? Promise.resolve() : t(e, r)
|
|
1642
1642
|
};
|
|
1643
1643
|
});
|
|
1644
1644
|
}
|
|
1645
|
-
async function
|
|
1645
|
+
async function Rn(e = [], t, n = {}) {
|
|
1646
1646
|
for (let r of e) if (!(!r || typeof r == "string")) {
|
|
1647
|
-
if (r.required &&
|
|
1647
|
+
if (r.required && On(t) || !On(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;
|
|
1648
1648
|
if (typeof r.validator == "function") try {
|
|
1649
1649
|
await r.validator(n, t);
|
|
1650
1650
|
} catch {
|
|
@@ -1653,7 +1653,7 @@ async function Pn(e = [], t, n = {}) {
|
|
|
1653
1653
|
}
|
|
1654
1654
|
return !1;
|
|
1655
1655
|
}
|
|
1656
|
-
function
|
|
1656
|
+
function zn(e) {
|
|
1657
1657
|
let t = String(e ?? "").trim();
|
|
1658
1658
|
if (!t.startsWith("{")) return null;
|
|
1659
1659
|
try {
|
|
@@ -1662,19 +1662,19 @@ function Fn(e) {
|
|
|
1662
1662
|
return null;
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
1665
|
-
function
|
|
1665
|
+
function Bn(e) {
|
|
1666
1666
|
if (!e) return null;
|
|
1667
|
-
if (typeof e == "string") return
|
|
1667
|
+
if (typeof e == "string") return zn(e);
|
|
1668
1668
|
let t = [
|
|
1669
1669
|
e.data,
|
|
1670
1670
|
e.response,
|
|
1671
1671
|
e,
|
|
1672
|
-
|
|
1672
|
+
zn(e.message)
|
|
1673
1673
|
];
|
|
1674
1674
|
for (let e of t) if (!(!e || typeof e != "object") && (Array.isArray(e.errors) || e.code === "DUPLICATE_VALUE")) return e;
|
|
1675
1675
|
return null;
|
|
1676
1676
|
}
|
|
1677
|
-
function
|
|
1677
|
+
function Vn({ field: e, group: t, rowIndex: n }) {
|
|
1678
1678
|
let r = String(e ?? ""), i = Number(n);
|
|
1679
1679
|
return t && Number.isInteger(i) && i >= 0 ? [
|
|
1680
1680
|
String(t),
|
|
@@ -1682,14 +1682,14 @@ function Ln({ field: e, group: t, rowIndex: n }) {
|
|
|
1682
1682
|
...r.split(".")
|
|
1683
1683
|
] : r;
|
|
1684
1684
|
}
|
|
1685
|
-
function
|
|
1686
|
-
let n =
|
|
1685
|
+
function Hn(e, { uniqueRules: t = [] } = {}) {
|
|
1686
|
+
let n = Bn(e);
|
|
1687
1687
|
if (n) {
|
|
1688
1688
|
let e = (Array.isArray(n.errors) ? n.errors : []).filter((e) => e?.field).map((e) => {
|
|
1689
1689
|
let t = {
|
|
1690
1690
|
field: e.field,
|
|
1691
|
-
name:
|
|
1692
|
-
message: e.message || n.message ||
|
|
1691
|
+
name: Vn(e),
|
|
1692
|
+
message: e.message || n.message || Cn
|
|
1693
1693
|
};
|
|
1694
1694
|
return Array.isArray(t.name) && (t.group = String(e.group), t.rowIndex = Number(e.rowIndex)), t;
|
|
1695
1695
|
});
|
|
@@ -1706,29 +1706,29 @@ function Rn(e, { uniqueRules: t = [] } = {}) {
|
|
|
1706
1706
|
}
|
|
1707
1707
|
//#endregion
|
|
1708
1708
|
//#region src/components/form/patternRule.js
|
|
1709
|
-
var
|
|
1710
|
-
function
|
|
1711
|
-
return !!(e && typeof e == "object" &&
|
|
1709
|
+
var Un = (e) => e === !0 || e === 1 || e === "1" || typeof e == "string" && e.trim().toLowerCase() === "true";
|
|
1710
|
+
function Wn(e) {
|
|
1711
|
+
return !!(e && typeof e == "object" && Un(e.warningOnly));
|
|
1712
1712
|
}
|
|
1713
|
-
function
|
|
1713
|
+
function Gn({ label: e, message: t, rule: n }) {
|
|
1714
1714
|
let r = {
|
|
1715
1715
|
pattern: new RegExp(n.pattern ?? n.value, n.flags),
|
|
1716
1716
|
message: t ?? `Enter valid ${e}`
|
|
1717
1717
|
};
|
|
1718
|
-
return
|
|
1718
|
+
return Wn(n) && (r.warningOnly = !0), r;
|
|
1719
1719
|
}
|
|
1720
|
-
function
|
|
1721
|
-
return
|
|
1720
|
+
function Kn(e) {
|
|
1721
|
+
return Wn(e);
|
|
1722
1722
|
}
|
|
1723
|
-
function
|
|
1723
|
+
function qn(e, t) {
|
|
1724
1724
|
return e?.type === "pattern" && t?.warningOnly === !0 && (e.warningOnly = !0), e;
|
|
1725
1725
|
}
|
|
1726
|
-
function
|
|
1726
|
+
function Jn(e) {
|
|
1727
1727
|
return typeof e == "string" ? e.toUpperCase() : e;
|
|
1728
1728
|
}
|
|
1729
1729
|
//#endregion
|
|
1730
1730
|
//#region src/services/uniqueValidationApi.js
|
|
1731
|
-
async function
|
|
1731
|
+
async function Yn({ module: e, field: t, value: n, recordId: r, clientId: i, region: s } = {}) {
|
|
1732
1732
|
if (!e || !t) throw Error("module and field are required to check uniqueness");
|
|
1733
1733
|
let c = {
|
|
1734
1734
|
field: t,
|
|
@@ -1762,7 +1762,7 @@ async function Gn({ module: e, field: t, value: n, recordId: r, clientId: i, reg
|
|
|
1762
1762
|
throw e;
|
|
1763
1763
|
}
|
|
1764
1764
|
}
|
|
1765
|
-
async function
|
|
1765
|
+
async function Xn({ module: e, payload: t, excludeId: n } = {}) {
|
|
1766
1766
|
if (!e || !t) return { duplicate: !1 };
|
|
1767
1767
|
try {
|
|
1768
1768
|
let r = await a(o, `/module/duplicate-check?module=${encodeURIComponent(e)}`, {
|
|
@@ -1780,7 +1780,7 @@ async function Kn({ module: e, payload: t, excludeId: n } = {}) {
|
|
|
1780
1780
|
}
|
|
1781
1781
|
//#endregion
|
|
1782
1782
|
//#region src/components/form/uploadAccept.js
|
|
1783
|
-
var
|
|
1783
|
+
var Zn = [
|
|
1784
1784
|
"jpg",
|
|
1785
1785
|
"jpeg",
|
|
1786
1786
|
"png",
|
|
@@ -1789,18 +1789,18 @@ var qn = [
|
|
|
1789
1789
|
"bmp",
|
|
1790
1790
|
"svg",
|
|
1791
1791
|
"avif"
|
|
1792
|
-
],
|
|
1792
|
+
], Qn = [
|
|
1793
1793
|
"mp4",
|
|
1794
1794
|
"webm",
|
|
1795
1795
|
"ogg",
|
|
1796
1796
|
"ogv",
|
|
1797
1797
|
"mov",
|
|
1798
1798
|
"m4v"
|
|
1799
|
-
],
|
|
1799
|
+
], $n = [
|
|
1800
1800
|
"pdf",
|
|
1801
1801
|
"doc",
|
|
1802
1802
|
"docx"
|
|
1803
|
-
],
|
|
1803
|
+
], er = [
|
|
1804
1804
|
{
|
|
1805
1805
|
label: "Any file",
|
|
1806
1806
|
value: "any"
|
|
@@ -1825,45 +1825,45 @@ var qn = [
|
|
|
1825
1825
|
label: "Images & Videos",
|
|
1826
1826
|
value: "imagesAndVideos"
|
|
1827
1827
|
}
|
|
1828
|
-
],
|
|
1828
|
+
], tr = {
|
|
1829
1829
|
resume: {
|
|
1830
|
-
exts:
|
|
1830
|
+
exts: $n,
|
|
1831
1831
|
maxSizeMB: 2,
|
|
1832
1832
|
hint: "PDF, DOC or DOCX",
|
|
1833
1833
|
error: "Only PDF, DOC, and DOCX resume files are supported."
|
|
1834
1834
|
},
|
|
1835
1835
|
documents: {
|
|
1836
|
-
exts: [
|
|
1836
|
+
exts: [...$n, ...Zn],
|
|
1837
1837
|
hint: "PDF, DOC or image files",
|
|
1838
1838
|
error: "Only document (PDF/DOC) or image files are allowed"
|
|
1839
1839
|
},
|
|
1840
1840
|
images: {
|
|
1841
|
-
exts:
|
|
1841
|
+
exts: Zn,
|
|
1842
1842
|
hint: "Image files",
|
|
1843
1843
|
error: "Only image files are allowed"
|
|
1844
1844
|
},
|
|
1845
1845
|
videos: {
|
|
1846
|
-
exts:
|
|
1846
|
+
exts: Qn,
|
|
1847
1847
|
hint: "Video files",
|
|
1848
1848
|
error: "Only video files are allowed"
|
|
1849
1849
|
},
|
|
1850
1850
|
imagesAndVideos: {
|
|
1851
|
-
exts: [...
|
|
1851
|
+
exts: [...Zn, ...Qn],
|
|
1852
1852
|
hint: "Image or video files",
|
|
1853
1853
|
error: "Only image or video files are allowed"
|
|
1854
1854
|
}
|
|
1855
1855
|
};
|
|
1856
|
-
function
|
|
1856
|
+
function nr(e) {
|
|
1857
1857
|
let t = String(e?.field ?? e?.payloadKey ?? "").toLowerCase();
|
|
1858
1858
|
return t ? t.includes("resume") || t.includes("cv") || t.includes("curriculumvitae") : !1;
|
|
1859
1859
|
}
|
|
1860
|
-
function
|
|
1860
|
+
function rr(e) {
|
|
1861
1861
|
let t = String(e?.accept ?? "").trim();
|
|
1862
|
-
return t && t !== "any" ?
|
|
1862
|
+
return t && t !== "any" ? tr[t] ?? null : !t && nr(e) ? tr.resume : tr[t] ?? null;
|
|
1863
1863
|
}
|
|
1864
1864
|
//#endregion
|
|
1865
1865
|
//#region src/components/form/quickActionLabels.js
|
|
1866
|
-
var
|
|
1866
|
+
var ir = /* @__PURE__ */ new Set([
|
|
1867
1867
|
"of",
|
|
1868
1868
|
"and",
|
|
1869
1869
|
"the",
|
|
@@ -1872,7 +1872,7 @@ var er = /* @__PURE__ */ new Set([
|
|
|
1872
1872
|
"in",
|
|
1873
1873
|
"a",
|
|
1874
1874
|
"an"
|
|
1875
|
-
]),
|
|
1875
|
+
]), ar = {
|
|
1876
1876
|
addresses: "address",
|
|
1877
1877
|
branches: "branch",
|
|
1878
1878
|
batches: "batch",
|
|
@@ -1883,55 +1883,55 @@ var er = /* @__PURE__ */ new Set([
|
|
|
1883
1883
|
people: "person",
|
|
1884
1884
|
statuses: "status"
|
|
1885
1885
|
};
|
|
1886
|
-
function
|
|
1886
|
+
function or(e) {
|
|
1887
1887
|
let t = String(e ?? "").trim();
|
|
1888
1888
|
if (!t) return "";
|
|
1889
1889
|
if (t.length > 1 && t === t.toUpperCase() && /[A-Z]/.test(t)) return t;
|
|
1890
1890
|
let n = t.toLowerCase();
|
|
1891
|
-
return
|
|
1891
|
+
return ar[n] ? ar[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;
|
|
1892
1892
|
}
|
|
1893
|
-
function
|
|
1893
|
+
function V(e) {
|
|
1894
1894
|
let t = String(e ?? "").trim();
|
|
1895
1895
|
if (!t) return "";
|
|
1896
1896
|
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);
|
|
1897
1897
|
if (!n.length) return "";
|
|
1898
|
-
let r =
|
|
1898
|
+
let r = or(n[n.length - 1]);
|
|
1899
1899
|
return [...n.slice(0, -1), r].map((e, t) => {
|
|
1900
1900
|
let n = e.toLowerCase();
|
|
1901
|
-
return e.length > 1 && e === e.toUpperCase() ? e : t > 0 &&
|
|
1901
|
+
return e.length > 1 && e === e.toUpperCase() ? e : t > 0 && ir.has(n) ? n : n.charAt(0).toUpperCase() + n.slice(1);
|
|
1902
1902
|
}).join(" ");
|
|
1903
1903
|
}
|
|
1904
|
-
function
|
|
1904
|
+
function sr(e, t) {
|
|
1905
1905
|
let n = String(e?.quickCreateLabel ?? "").trim();
|
|
1906
1906
|
if (n && n.toLowerCase() !== "add more") return n;
|
|
1907
|
-
let r =
|
|
1907
|
+
let r = V(e?.quickCreateModule || t);
|
|
1908
1908
|
return r ? `Add New ${r}` : "Add New";
|
|
1909
1909
|
}
|
|
1910
|
-
function
|
|
1910
|
+
function cr(e, t) {
|
|
1911
1911
|
let n = String(e?.quickEditLabel ?? "").trim();
|
|
1912
1912
|
if (n && n.toLowerCase() !== "add more") return n;
|
|
1913
|
-
let r =
|
|
1913
|
+
let r = V(e?.quickEditModule || t);
|
|
1914
1914
|
return r ? `Edit ${r}` : "Edit";
|
|
1915
1915
|
}
|
|
1916
|
-
function
|
|
1917
|
-
let r =
|
|
1918
|
-
return e === "create" ? String(t?.quickCreateTitle ?? "").trim() || (r ? `Add New ${r}` :
|
|
1916
|
+
function lr(e, t, n) {
|
|
1917
|
+
let r = V((e === "create" ? t?.quickCreateModule : t?.quickEditModule) || n);
|
|
1918
|
+
return e === "create" ? String(t?.quickCreateTitle ?? "").trim() || (r ? `Add New ${r}` : sr(t, n)) : String(t?.quickEditTitle ?? "").trim() || (r ? `Edit ${r}` : cr(t, n));
|
|
1919
1919
|
}
|
|
1920
|
-
var
|
|
1921
|
-
function
|
|
1920
|
+
var H = (e) => e == null ? "" : String(e).trim();
|
|
1921
|
+
function ur(e) {
|
|
1922
1922
|
let t = e?.quickCreateNotice;
|
|
1923
1923
|
return !t || typeof t != "object" || t.enabled === !1 ? null : {
|
|
1924
1924
|
enabled: !0,
|
|
1925
|
-
title:
|
|
1926
|
-
message:
|
|
1925
|
+
title: H(t.title) || "New record created",
|
|
1926
|
+
message: H(t.message) || "A new client has been created successfully. Please contact your Organization Admin to configure the required forms, workflows, permissions, and client-specific details before proceeding with further operations.",
|
|
1927
1927
|
showCreator: t.showCreator !== !1,
|
|
1928
1928
|
showRecordName: t.showRecordName !== !1,
|
|
1929
|
-
recordNameField:
|
|
1930
|
-
recordLabel:
|
|
1931
|
-
creatorLabel:
|
|
1929
|
+
recordNameField: H(t.recordNameField),
|
|
1930
|
+
recordLabel: H(t.recordLabel) || "Record name",
|
|
1931
|
+
creatorLabel: H(t.creatorLabel) || "Created by"
|
|
1932
1932
|
};
|
|
1933
1933
|
}
|
|
1934
|
-
var
|
|
1934
|
+
var dr = [
|
|
1935
1935
|
"clientName",
|
|
1936
1936
|
"companyName",
|
|
1937
1937
|
"name",
|
|
@@ -1941,24 +1941,24 @@ var sr = [
|
|
|
1941
1941
|
"label",
|
|
1942
1942
|
"employerName",
|
|
1943
1943
|
"vendorName"
|
|
1944
|
-
],
|
|
1944
|
+
], fr = (e, t) => {
|
|
1945
1945
|
if (!(!e || !t)) return String(t).split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e);
|
|
1946
|
-
},
|
|
1947
|
-
function
|
|
1946
|
+
}, pr = (e) => typeof e == "string" || typeof e == "number" ? H(e) : e && typeof e == "object" ? H(e.label ?? e.name ?? e.title ?? "") : "";
|
|
1947
|
+
function mr(e, { recordNameField: t = "", displayField: n = "" } = {}) {
|
|
1948
1948
|
if (!e || typeof e != "object") return "";
|
|
1949
1949
|
for (let r of [
|
|
1950
1950
|
t,
|
|
1951
1951
|
n,
|
|
1952
|
-
...
|
|
1952
|
+
...dr
|
|
1953
1953
|
]) {
|
|
1954
1954
|
if (!r) continue;
|
|
1955
|
-
let t =
|
|
1955
|
+
let t = pr(fr(e, r));
|
|
1956
1956
|
if (t) return t;
|
|
1957
1957
|
}
|
|
1958
1958
|
let r = Object.keys(e).find((t) => /name$/i.test(t) && typeof e[t] == "string" && e[t].trim());
|
|
1959
|
-
return r ?
|
|
1959
|
+
return r ? H(e[r]) : "";
|
|
1960
1960
|
}
|
|
1961
|
-
function
|
|
1961
|
+
function hr(e) {
|
|
1962
1962
|
if (!e || typeof e != "object") return "";
|
|
1963
1963
|
let t = [
|
|
1964
1964
|
e.createdBy,
|
|
@@ -1971,76 +1971,76 @@ function dr(e) {
|
|
|
1971
1971
|
for (let e of t) {
|
|
1972
1972
|
if (e == null || e === "") continue;
|
|
1973
1973
|
if (typeof e == "object") {
|
|
1974
|
-
let t =
|
|
1974
|
+
let t = H(e.$oid ?? e.userId ?? e._id ?? e.id);
|
|
1975
1975
|
if (t) return t;
|
|
1976
1976
|
continue;
|
|
1977
1977
|
}
|
|
1978
|
-
let t =
|
|
1978
|
+
let t = H(e);
|
|
1979
1979
|
if (t) return t;
|
|
1980
1980
|
}
|
|
1981
1981
|
return "";
|
|
1982
1982
|
}
|
|
1983
|
-
function
|
|
1983
|
+
function gr(e = i) {
|
|
1984
1984
|
try {
|
|
1985
|
-
return
|
|
1985
|
+
return b(e()) || "";
|
|
1986
1986
|
} catch {
|
|
1987
1987
|
return "";
|
|
1988
1988
|
}
|
|
1989
1989
|
}
|
|
1990
|
-
var
|
|
1990
|
+
var _r = (e, t) => a(o, `/module/list?module=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`).then((e) => {
|
|
1991
1991
|
let t = e?.data?.data ?? e?.data ?? [];
|
|
1992
1992
|
return Array.isArray(t) ? t[0] : t;
|
|
1993
1993
|
});
|
|
1994
|
-
async function
|
|
1995
|
-
let { fetchRecord: o =
|
|
1994
|
+
async function vr({ module: e, recordId: t, notice: n, displayField: r = "", deps: a = {} } = {}) {
|
|
1995
|
+
let { fetchRecord: o = _r, fetchUserNameFn: s = ne, getUser: c = i } = a, l = null;
|
|
1996
1996
|
if (e && t) try {
|
|
1997
1997
|
l = await o(e, t);
|
|
1998
1998
|
} catch {
|
|
1999
1999
|
l = null;
|
|
2000
2000
|
}
|
|
2001
|
-
let u = n?.showRecordName === !1 ? "" :
|
|
2001
|
+
let u = n?.showRecordName === !1 ? "" : mr(l, {
|
|
2002
2002
|
recordNameField: n?.recordNameField,
|
|
2003
2003
|
displayField: r
|
|
2004
2004
|
}), d = "";
|
|
2005
2005
|
if (n?.showCreator !== !1) {
|
|
2006
|
-
let e =
|
|
2006
|
+
let e = hr(l);
|
|
2007
2007
|
if (e) try {
|
|
2008
|
-
d =
|
|
2008
|
+
d = H(await s(e));
|
|
2009
2009
|
} catch {
|
|
2010
2010
|
d = "";
|
|
2011
2011
|
}
|
|
2012
|
-
d ||=
|
|
2012
|
+
d ||= gr(c);
|
|
2013
2013
|
}
|
|
2014
2014
|
return {
|
|
2015
2015
|
recordName: u,
|
|
2016
2016
|
creatorName: d
|
|
2017
2017
|
};
|
|
2018
2018
|
}
|
|
2019
|
-
var
|
|
2020
|
-
function
|
|
2019
|
+
var yr = (e, t) => e?.quickCreate ? e.quickCreateOnType === !0 || e.quickCreateOnType !== !1 && t === "submissions" && e.quickCreateModule === "employers" : !1;
|
|
2020
|
+
function br(e) {
|
|
2021
2021
|
return String(e ?? "").trim().replace(/\s+/g, " ");
|
|
2022
2022
|
}
|
|
2023
|
-
var
|
|
2024
|
-
function
|
|
2025
|
-
let n =
|
|
2026
|
-
return !n || !Array.isArray(t) ? null : t.find((e) =>
|
|
2023
|
+
var xr = (e) => br(e).toLowerCase();
|
|
2024
|
+
function Sr(e, t) {
|
|
2025
|
+
let n = xr(e);
|
|
2026
|
+
return !n || !Array.isArray(t) ? null : t.find((e) => xr(e?.label) === n) ?? null;
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2029
|
-
return t || n ? !1 :
|
|
2028
|
+
function Cr({ text: e, disabled: t = !1, modalOpen: n = !1 }) {
|
|
2029
|
+
return t || n ? !1 : br(e).length >= 3;
|
|
2030
2030
|
}
|
|
2031
2031
|
//#endregion
|
|
2032
2032
|
//#region src/components/form/QuickCreateEditField.jsx
|
|
2033
|
-
var
|
|
2034
|
-
function
|
|
2033
|
+
var wr = fe(() => import("./index.js").then((e) => e.r)), Tr = fe(() => import("./index.js").then((e) => e.n)), Er = (e) => e == null || e === "", Dr = (e) => typeof e == "string" && e.includes(".") ? e.split(".") : [e];
|
|
2034
|
+
function Or(e, t, n, r, i) {
|
|
2035
2035
|
let a = e.quickEditIdFrom;
|
|
2036
2036
|
if (a) {
|
|
2037
|
-
let e = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number" ? [...n.slice(0, 2), ...
|
|
2038
|
-
return
|
|
2037
|
+
let e = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number" ? [...n.slice(0, 2), ...Dr(a)] : Dr(a), i = t?.getFieldValue?.(e);
|
|
2038
|
+
return Er(i) && (i = r?.[a]), Er(i) ? null : i;
|
|
2039
2039
|
}
|
|
2040
|
-
return i && typeof i == "object" ? i.value ?? null :
|
|
2040
|
+
return i && typeof i == "object" ? i.value ?? null : Er(i) ? null : i;
|
|
2041
2041
|
}
|
|
2042
|
-
function
|
|
2043
|
-
let [s, c] = w(null), [l, u] = w(null), d = !!e?.quickCreate, f = !!e?.quickEdit, p = e?.quickCreateModule || e?.lookupCollection || "", m = e?.quickEditModule || e?.lookupCollection || "", h =
|
|
2042
|
+
function kr({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValue: a, onDone: o }) {
|
|
2043
|
+
let [s, c] = w(null), [l, u] = w(null), d = !!e?.quickCreate, f = !!e?.quickEdit, p = e?.quickCreateModule || e?.lookupCollection || "", m = e?.quickEditModule || e?.lookupCollection || "", h = he(() => f ? Or(e, t, n, i, a) : null, [
|
|
2044
2044
|
f,
|
|
2045
2045
|
e,
|
|
2046
2046
|
t,
|
|
@@ -2054,7 +2054,7 @@ function Tr({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
2054
2054
|
openCreateWith: null,
|
|
2055
2055
|
isModalOpen: !1
|
|
2056
2056
|
};
|
|
2057
|
-
let g =
|
|
2057
|
+
let g = yr(e, r), _ = () => c(null), v = () => {
|
|
2058
2058
|
if (e?.quickCreateOnClick) {
|
|
2059
2059
|
e.quickCreateOnClick(), document.activeElement?.blur?.();
|
|
2060
2060
|
return;
|
|
@@ -2067,23 +2067,23 @@ function Tr({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
2067
2067
|
mode: "create",
|
|
2068
2068
|
module: p
|
|
2069
2069
|
});
|
|
2070
|
-
},
|
|
2070
|
+
}, y = (e) => {
|
|
2071
2071
|
s || !p || c({
|
|
2072
2072
|
mode: "create",
|
|
2073
2073
|
module: p,
|
|
2074
2074
|
prefill: e ?? null
|
|
2075
2075
|
});
|
|
2076
|
-
},
|
|
2076
|
+
}, b = () => m && h && c({
|
|
2077
2077
|
mode: "edit",
|
|
2078
2078
|
module: m,
|
|
2079
2079
|
recordId: String(h)
|
|
2080
|
-
}),
|
|
2081
|
-
let n =
|
|
2080
|
+
}), ee = (t) => {
|
|
2081
|
+
let n = ur(e);
|
|
2082
2082
|
n && (u({
|
|
2083
2083
|
...n,
|
|
2084
2084
|
recordName: "",
|
|
2085
2085
|
creatorName: ""
|
|
2086
|
-
}),
|
|
2086
|
+
}), vr({
|
|
2087
2087
|
module: p,
|
|
2088
2088
|
recordId: t,
|
|
2089
2089
|
notice: n,
|
|
@@ -2095,7 +2095,7 @@ function Tr({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
2095
2095
|
creatorName: t
|
|
2096
2096
|
});
|
|
2097
2097
|
}).catch(() => {}));
|
|
2098
|
-
},
|
|
2098
|
+
}, x = d && !g, S = !x && !f ? null : /* @__PURE__ */ k("div", {
|
|
2099
2099
|
className: "v1-quick-actions",
|
|
2100
2100
|
role: "presentation",
|
|
2101
2101
|
onMouseDown: (e) => e.preventDefault(),
|
|
@@ -2105,28 +2105,28 @@ function Tr({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
2105
2105
|
padding: "6px 8px",
|
|
2106
2106
|
borderTop: "1px solid rgba(0,0,0,0.06)"
|
|
2107
2107
|
},
|
|
2108
|
-
children: /* @__PURE__ */
|
|
2108
|
+
children: /* @__PURE__ */ A(Se, {
|
|
2109
2109
|
size: 8,
|
|
2110
|
-
children: [
|
|
2110
|
+
children: [x && /* @__PURE__ */ k(T, {
|
|
2111
2111
|
type: "link",
|
|
2112
2112
|
size: "small",
|
|
2113
|
-
icon: /* @__PURE__ */
|
|
2113
|
+
icon: /* @__PURE__ */ k(Fe, {}),
|
|
2114
2114
|
onClick: v,
|
|
2115
2115
|
style: { paddingLeft: 0 },
|
|
2116
|
-
children:
|
|
2117
|
-
}), f && /* @__PURE__ */
|
|
2116
|
+
children: sr(e, p)
|
|
2117
|
+
}), f && /* @__PURE__ */ k(T, {
|
|
2118
2118
|
type: "link",
|
|
2119
2119
|
size: "small",
|
|
2120
|
-
icon: /* @__PURE__ */
|
|
2121
|
-
onClick:
|
|
2120
|
+
icon: /* @__PURE__ */ k(De, {}),
|
|
2121
|
+
onClick: b,
|
|
2122
2122
|
disabled: !h,
|
|
2123
|
-
title: h ? void 0 : `Choose a ${
|
|
2124
|
-
children:
|
|
2123
|
+
title: h ? void 0 : `Choose a ${V(m) || "record"} above first, then edit it here`,
|
|
2124
|
+
children: cr(e, m)
|
|
2125
2125
|
})]
|
|
2126
2126
|
})
|
|
2127
|
-
}),
|
|
2127
|
+
}), ne = s ? /* @__PURE__ */ k(E, {
|
|
2128
2128
|
open: !0,
|
|
2129
|
-
title:
|
|
2129
|
+
title: lr(s.mode, e, s.mode === "create" ? p : m),
|
|
2130
2130
|
width: "min(1080px, 96vw)",
|
|
2131
2131
|
footer: null,
|
|
2132
2132
|
destroyOnClose: !0,
|
|
@@ -2136,24 +2136,24 @@ function Tr({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
2136
2136
|
maxHeight: "78vh",
|
|
2137
2137
|
overflowY: "auto"
|
|
2138
2138
|
} },
|
|
2139
|
-
children: /* @__PURE__ */
|
|
2140
|
-
fallback: /* @__PURE__ */
|
|
2139
|
+
children: /* @__PURE__ */ k(ue, {
|
|
2140
|
+
fallback: /* @__PURE__ */ k("div", {
|
|
2141
2141
|
style: {
|
|
2142
2142
|
padding: 48,
|
|
2143
2143
|
textAlign: "center"
|
|
2144
2144
|
},
|
|
2145
|
-
children: /* @__PURE__ */
|
|
2145
|
+
children: /* @__PURE__ */ k(Ce, {})
|
|
2146
2146
|
}),
|
|
2147
|
-
children: s.mode === "create" ? /* @__PURE__ */
|
|
2147
|
+
children: s.mode === "create" ? /* @__PURE__ */ k(wr, {
|
|
2148
2148
|
moduleName: s.module,
|
|
2149
2149
|
embedded: !0,
|
|
2150
2150
|
breadcrumbItems: [],
|
|
2151
2151
|
initialRecord: s.prefill ?? void 0,
|
|
2152
2152
|
onCancel: _,
|
|
2153
2153
|
onSuccess: (e) => {
|
|
2154
|
-
_(),
|
|
2154
|
+
_(), ee(e), o?.("create", e);
|
|
2155
2155
|
}
|
|
2156
|
-
}) : /* @__PURE__ */
|
|
2156
|
+
}) : /* @__PURE__ */ k(Tr, {
|
|
2157
2157
|
moduleName: s.module,
|
|
2158
2158
|
recordId: s.recordId,
|
|
2159
2159
|
embedded: !0,
|
|
@@ -2164,32 +2164,32 @@ function Tr({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
2164
2164
|
}
|
|
2165
2165
|
})
|
|
2166
2166
|
})
|
|
2167
|
-
}) : null,
|
|
2167
|
+
}) : null, re = l ? /* @__PURE__ */ A(E, {
|
|
2168
2168
|
open: !0,
|
|
2169
|
-
title: /* @__PURE__ */
|
|
2169
|
+
title: /* @__PURE__ */ A("span", {
|
|
2170
2170
|
style: {
|
|
2171
2171
|
display: "inline-flex",
|
|
2172
2172
|
alignItems: "center",
|
|
2173
2173
|
gap: 8
|
|
2174
2174
|
},
|
|
2175
|
-
children: [/* @__PURE__ */
|
|
2175
|
+
children: [/* @__PURE__ */ k(Oe, { style: { color: "#faad14" } }), l.title]
|
|
2176
2176
|
}),
|
|
2177
2177
|
width: "min(520px, 94vw)",
|
|
2178
2178
|
maskClosable: !1,
|
|
2179
2179
|
onCancel: () => u(null),
|
|
2180
|
-
footer: /* @__PURE__ */
|
|
2180
|
+
footer: /* @__PURE__ */ k(te, {
|
|
2181
2181
|
variant: "primary",
|
|
2182
2182
|
type: "primary",
|
|
2183
2183
|
onClick: () => u(null),
|
|
2184
2184
|
children: "OK"
|
|
2185
2185
|
}),
|
|
2186
|
-
children: [/* @__PURE__ */
|
|
2186
|
+
children: [/* @__PURE__ */ k("p", {
|
|
2187
2187
|
style: {
|
|
2188
2188
|
marginTop: 0,
|
|
2189
2189
|
marginBottom: 16
|
|
2190
2190
|
},
|
|
2191
2191
|
children: l.message
|
|
2192
|
-
}), (l.recordName || l.creatorName) && /* @__PURE__ */
|
|
2192
|
+
}), (l.recordName || l.creatorName) && /* @__PURE__ */ A("div", {
|
|
2193
2193
|
style: {
|
|
2194
2194
|
display: "grid",
|
|
2195
2195
|
gridTemplateColumns: "auto 1fr",
|
|
@@ -2198,26 +2198,26 @@ function Tr({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
2198
2198
|
borderRadius: 6,
|
|
2199
2199
|
background: "rgba(0,0,0,0.03)"
|
|
2200
2200
|
},
|
|
2201
|
-
children: [l.recordName && /* @__PURE__ */
|
|
2201
|
+
children: [l.recordName && /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("span", {
|
|
2202
2202
|
style: { color: "rgba(0,0,0,0.55)" },
|
|
2203
2203
|
children: l.recordLabel
|
|
2204
|
-
}), /* @__PURE__ */
|
|
2204
|
+
}), /* @__PURE__ */ k("strong", { children: l.recordName })] }), l.creatorName && /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("span", {
|
|
2205
2205
|
style: { color: "rgba(0,0,0,0.55)" },
|
|
2206
2206
|
children: l.creatorLabel
|
|
2207
|
-
}), /* @__PURE__ */
|
|
2207
|
+
}), /* @__PURE__ */ k("strong", { children: l.creatorName })] })]
|
|
2208
2208
|
})]
|
|
2209
2209
|
}) : null;
|
|
2210
2210
|
return {
|
|
2211
|
-
footer:
|
|
2212
|
-
modal:
|
|
2213
|
-
openCreateWith:
|
|
2211
|
+
footer: S,
|
|
2212
|
+
modal: ne || re ? /* @__PURE__ */ A(O, { children: [ne, re] }) : null,
|
|
2213
|
+
openCreateWith: y,
|
|
2214
2214
|
isModalOpen: !!s
|
|
2215
2215
|
};
|
|
2216
2216
|
}
|
|
2217
2217
|
//#endregion
|
|
2218
2218
|
//#region src/components/form/crossFieldRules.js
|
|
2219
|
-
var
|
|
2220
|
-
function
|
|
2219
|
+
var Ar = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0;
|
|
2220
|
+
function jr(e, t, n) {
|
|
2221
2221
|
let r = String(t ?? "").includes(".") ? String(t).split(".") : [t];
|
|
2222
2222
|
if (typeof n == "function") {
|
|
2223
2223
|
let e = n(t);
|
|
@@ -2225,23 +2225,23 @@ function Dr(e, t, n) {
|
|
|
2225
2225
|
}
|
|
2226
2226
|
return Array.isArray(e) && e.length > 1 ? [...e.slice(0, -1), ...r] : r;
|
|
2227
2227
|
}
|
|
2228
|
-
function
|
|
2228
|
+
function Mr({ label: e, message: t, rule: n = {}, value: r, form: i, name: a, prefixFor: o }) {
|
|
2229
2229
|
let s = n.field ?? n.compareField ?? r;
|
|
2230
2230
|
return { validator: async (n, r) => {
|
|
2231
|
-
if (!s ||
|
|
2232
|
-
let c = i?.getFieldValue?.(
|
|
2233
|
-
if (
|
|
2231
|
+
if (!s || Ar(r)) return Promise.resolve();
|
|
2232
|
+
let c = i?.getFieldValue?.(jr(a, s, o));
|
|
2233
|
+
if (Ar(c)) return Promise.resolve();
|
|
2234
2234
|
let l = Number(c), u = Number(r);
|
|
2235
2235
|
return Number.isNaN(l) || Number.isNaN(u) || u <= l ? Promise.resolve() : Promise.reject(Error(t ?? `${e} must not exceed ${s}`));
|
|
2236
2236
|
} };
|
|
2237
2237
|
}
|
|
2238
|
-
function
|
|
2238
|
+
function Nr(e = {}, t, n) {
|
|
2239
2239
|
let r = e.field ?? e.compareField ?? e.value;
|
|
2240
|
-
return r ?
|
|
2240
|
+
return r ? jr(t, r, n) : null;
|
|
2241
2241
|
}
|
|
2242
2242
|
//#endregion
|
|
2243
2243
|
//#region src/components/form/maxCeiling.js
|
|
2244
|
-
function
|
|
2244
|
+
function Pr(e, t) {
|
|
2245
2245
|
let n = String(t).split(".").filter(Boolean);
|
|
2246
2246
|
if (!Array.isArray(e)) return n.length > 1 ? n : t;
|
|
2247
2247
|
if (n.length > 1) {
|
|
@@ -2254,14 +2254,14 @@ function Ar(e, t) {
|
|
|
2254
2254
|
let r = [...e];
|
|
2255
2255
|
return r[r.length - 1] = n[0], r;
|
|
2256
2256
|
}
|
|
2257
|
-
function
|
|
2258
|
-
let r = e?.getFieldValue?.(
|
|
2257
|
+
function Fr(e, t, n) {
|
|
2258
|
+
let r = e?.getFieldValue?.(Pr(t, n));
|
|
2259
2259
|
return r != null && r !== "" ? r : e?.getFieldValue?.(n);
|
|
2260
2260
|
}
|
|
2261
|
-
function
|
|
2261
|
+
function Ir(e) {
|
|
2262
2262
|
return String(e ?? "").split(",").map((e) => e.trim()).filter(Boolean);
|
|
2263
2263
|
}
|
|
2264
|
-
function
|
|
2264
|
+
function Lr(e, t) {
|
|
2265
2265
|
for (let n of e ?? []) {
|
|
2266
2266
|
let e = t(n);
|
|
2267
2267
|
if (e == null || e === "") continue;
|
|
@@ -2273,14 +2273,14 @@ function Nr(e, t) {
|
|
|
2273
2273
|
}
|
|
2274
2274
|
return null;
|
|
2275
2275
|
}
|
|
2276
|
-
function
|
|
2276
|
+
function Rr({ input: e, compareFields: t, readValue: n }) {
|
|
2277
2277
|
let r = {
|
|
2278
2278
|
ok: !0,
|
|
2279
2279
|
field: null,
|
|
2280
2280
|
maximum: null
|
|
2281
2281
|
};
|
|
2282
2282
|
if (e == null || e === "") return r;
|
|
2283
|
-
let i =
|
|
2283
|
+
let i = Lr(t, n);
|
|
2284
2284
|
if (!i) return r;
|
|
2285
2285
|
let a = Number(e);
|
|
2286
2286
|
return Number.isFinite(a) ? {
|
|
@@ -2291,39 +2291,39 @@ function Pr({ input: e, compareFields: t, readValue: n }) {
|
|
|
2291
2291
|
}
|
|
2292
2292
|
//#endregion
|
|
2293
2293
|
//#region src/components/form/contextPrefill.js
|
|
2294
|
-
var
|
|
2295
|
-
function
|
|
2294
|
+
var zr = { candidates: ["applicantId"] };
|
|
2295
|
+
function Br(e) {
|
|
2296
2296
|
let t = String(e ?? "").trim();
|
|
2297
2297
|
if (!t) return [];
|
|
2298
2298
|
let n = t.endsWith("s") ? t.slice(0, -1) : t;
|
|
2299
2299
|
return [.../* @__PURE__ */ new Set([
|
|
2300
2300
|
`${n}Id`,
|
|
2301
2301
|
`${t}Id`,
|
|
2302
|
-
...
|
|
2302
|
+
...zr[t] ?? []
|
|
2303
2303
|
])];
|
|
2304
2304
|
}
|
|
2305
|
-
function
|
|
2305
|
+
function Vr(e, t) {
|
|
2306
2306
|
if (!t) return "";
|
|
2307
2307
|
let n = (e) => e && typeof e == "object" ? e.id ?? e.value ?? "" : e ?? "";
|
|
2308
|
-
for (let r of
|
|
2308
|
+
for (let r of Br(e)) {
|
|
2309
2309
|
let e = String(n(t[r]) || "");
|
|
2310
2310
|
if (e) return e;
|
|
2311
2311
|
}
|
|
2312
2312
|
return "";
|
|
2313
2313
|
}
|
|
2314
|
-
function
|
|
2314
|
+
function Hr(e, t) {
|
|
2315
2315
|
let n = /* @__PURE__ */ new Set();
|
|
2316
2316
|
return (e ?? []).forEach((e) => (e.fields ?? []).forEach((e) => {
|
|
2317
2317
|
e?.prefillFromModule && n.add(t(e.prefillFromModule));
|
|
2318
2318
|
})), [...n];
|
|
2319
2319
|
}
|
|
2320
|
-
function
|
|
2320
|
+
function Ur(e) {
|
|
2321
2321
|
return e?.payloadMode === "skip";
|
|
2322
2322
|
}
|
|
2323
|
-
function
|
|
2323
|
+
function Wr(e) {
|
|
2324
2324
|
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 : [];
|
|
2325
2325
|
}
|
|
2326
|
-
function
|
|
2326
|
+
function Gr(e) {
|
|
2327
2327
|
let t = {};
|
|
2328
2328
|
return (e ?? []).forEach((e) => {
|
|
2329
2329
|
e?.addRow || (e?.fields ?? []).forEach((e) => {
|
|
@@ -2331,7 +2331,7 @@ function Vr(e) {
|
|
|
2331
2331
|
});
|
|
2332
2332
|
}), t;
|
|
2333
2333
|
}
|
|
2334
|
-
function
|
|
2334
|
+
function Kr(e, t) {
|
|
2335
2335
|
if (!e || !t) return;
|
|
2336
2336
|
let n = e;
|
|
2337
2337
|
for (let e of String(t).split(".")) {
|
|
@@ -2346,7 +2346,7 @@ function Hr(e, t) {
|
|
|
2346
2346
|
}
|
|
2347
2347
|
return n;
|
|
2348
2348
|
}
|
|
2349
|
-
function
|
|
2349
|
+
function qr(e, t) {
|
|
2350
2350
|
if (!(!e || !t)) for (let n of [
|
|
2351
2351
|
t.prefillFrom,
|
|
2352
2352
|
t.field,
|
|
@@ -2354,13 +2354,13 @@ function Ur(e, t) {
|
|
|
2354
2354
|
]) {
|
|
2355
2355
|
if (!n) continue;
|
|
2356
2356
|
let t = e[n];
|
|
2357
|
-
if (t ??= s(e, n), t ??=
|
|
2357
|
+
if (t ??= s(e, n), t ??= Kr(e, n), t != null) return t;
|
|
2358
2358
|
}
|
|
2359
2359
|
}
|
|
2360
2360
|
//#endregion
|
|
2361
2361
|
//#region src/components/form/ValidationOverrideCheckbox.jsx
|
|
2362
|
-
function
|
|
2363
|
-
let a = f(t), o =
|
|
2362
|
+
function Jr({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
|
|
2363
|
+
let a = f(t), o = xe.useWatch(n, e);
|
|
2364
2364
|
if (!a) return null;
|
|
2365
2365
|
let s = a.label || "Allow beyond the limit", c = () => {
|
|
2366
2366
|
setTimeout(() => {
|
|
@@ -2371,14 +2371,14 @@ function Wr({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
|
|
|
2371
2371
|
e.setFieldValue(n, !1), c();
|
|
2372
2372
|
return;
|
|
2373
2373
|
}
|
|
2374
|
-
let i = await
|
|
2374
|
+
let i = await I(g(t));
|
|
2375
2375
|
e.setFieldValue(n, !!i), c();
|
|
2376
2376
|
}, u = a.help ? `${s} — ${a.help}` : s;
|
|
2377
|
-
return /* @__PURE__ */
|
|
2377
|
+
return /* @__PURE__ */ k(we, {
|
|
2378
2378
|
title: u,
|
|
2379
|
-
children: /* @__PURE__ */
|
|
2379
|
+
children: /* @__PURE__ */ k("span", {
|
|
2380
2380
|
className: "v1-override-wrap",
|
|
2381
|
-
children: /* @__PURE__ */
|
|
2381
|
+
children: /* @__PURE__ */ k(be, {
|
|
2382
2382
|
className: "v1-override-checkbox",
|
|
2383
2383
|
checked: !!o,
|
|
2384
2384
|
disabled: i,
|
|
@@ -2390,47 +2390,47 @@ function Wr({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
|
|
|
2390
2390
|
}
|
|
2391
2391
|
//#endregion
|
|
2392
2392
|
//#region src/components/form/prefillWhenRules.js
|
|
2393
|
-
var
|
|
2394
|
-
function
|
|
2393
|
+
var U = (e) => String(e ?? "");
|
|
2394
|
+
function Yr(e) {
|
|
2395
2395
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
2396
2396
|
return (Array.isArray(e) ? e : []).forEach((e) => {
|
|
2397
2397
|
let r = e?.field;
|
|
2398
2398
|
!r || t.has(r) || (t.add(r), n.push(r));
|
|
2399
2399
|
}), n;
|
|
2400
2400
|
}
|
|
2401
|
-
function
|
|
2402
|
-
return
|
|
2401
|
+
function Xr(e, t, n, r) {
|
|
2402
|
+
return Yr(e).map((e) => ({
|
|
2403
2403
|
field: e,
|
|
2404
2404
|
path: n(t, e, r)
|
|
2405
2405
|
}));
|
|
2406
2406
|
}
|
|
2407
|
-
function
|
|
2408
|
-
return !e || !e.field ? !1 :
|
|
2407
|
+
function Zr(e, t = {}) {
|
|
2408
|
+
return !e || !e.field ? !1 : U(t[e.field]) === U(e.value);
|
|
2409
2409
|
}
|
|
2410
|
-
function
|
|
2411
|
-
let o = (Array.isArray(e) ? e : []).find((e) =>
|
|
2410
|
+
function Qr({ rules: e, watched: t = {}, current: n, lastApplied: r, clearOnMismatch: i = !0, initial: a = !1 } = {}) {
|
|
2411
|
+
let o = (Array.isArray(e) ? e : []).find((e) => Zr(e, t));
|
|
2412
2412
|
return o ? o.clearValue ? a ? { action: "none" } : { action: "clear" } : {
|
|
2413
2413
|
action: "set",
|
|
2414
2414
|
value: o.setValue
|
|
2415
|
-
} : i && r !== void 0 &&
|
|
2415
|
+
} : i && r !== void 0 && U(n) === U(r) ? { action: "clear" } : { action: "none" };
|
|
2416
2416
|
}
|
|
2417
2417
|
//#endregion
|
|
2418
2418
|
//#region src/components/form/computeFromRules.js
|
|
2419
|
-
var
|
|
2420
|
-
function $r(e) {
|
|
2421
|
-
return !!(e && Xr.includes(e.type) && e.field);
|
|
2422
|
-
}
|
|
2419
|
+
var $r = ["daysUntil"], W = (e) => e == null || e === "", G = (e) => String(e ?? "");
|
|
2423
2420
|
function ei(e) {
|
|
2424
|
-
|
|
2425
|
-
|
|
2421
|
+
return !!(e && $r.includes(e.type) && e.field);
|
|
2422
|
+
}
|
|
2423
|
+
function K(e) {
|
|
2424
|
+
if (W(e)) return null;
|
|
2425
|
+
let t = j.isDayjs(e) ? e : j(e?.$date ?? e);
|
|
2426
2426
|
return t.isValid() ? t.format("YYYY-MM-DD") : null;
|
|
2427
2427
|
}
|
|
2428
2428
|
function ti(e, t) {
|
|
2429
|
-
let n =
|
|
2430
|
-
if (!(!n || !r)) return Math.max(0,
|
|
2429
|
+
let n = K(e), r = K(t ?? j());
|
|
2430
|
+
if (!(!n || !r)) return Math.max(0, j(n).diff(j(r), "day"));
|
|
2431
2431
|
}
|
|
2432
2432
|
function ni(e, t, n) {
|
|
2433
|
-
if (
|
|
2433
|
+
if (ei(e)) switch (e.type) {
|
|
2434
2434
|
case "daysUntil": return ti(t, n);
|
|
2435
2435
|
default: return;
|
|
2436
2436
|
}
|
|
@@ -2447,14 +2447,14 @@ function ri(e, t, n, r) {
|
|
|
2447
2447
|
};
|
|
2448
2448
|
}
|
|
2449
2449
|
function ii({ cfg: e, sourceValue: t, previousSource: n, current: r, lastApplied: i, today: a } = {}) {
|
|
2450
|
-
if (
|
|
2450
|
+
if (!ei(e) || W(t) || K(t) === K(n)) return { action: "none" };
|
|
2451
2451
|
let o = ni(e, t, a);
|
|
2452
2452
|
if (o === void 0) return { action: "none" };
|
|
2453
|
-
if (
|
|
2454
|
-
let e = i !== void 0 &&
|
|
2455
|
-
if (!
|
|
2453
|
+
if (W(n)) {
|
|
2454
|
+
let e = i !== void 0 && G(r) === G(i);
|
|
2455
|
+
if (!W(r) && !e) return { action: "none" };
|
|
2456
2456
|
}
|
|
2457
|
-
return
|
|
2457
|
+
return G(r) === G(o) ? { action: "none" } : {
|
|
2458
2458
|
action: "set",
|
|
2459
2459
|
value: o
|
|
2460
2460
|
};
|
|
@@ -2462,18 +2462,18 @@ function ii({ cfg: e, sourceValue: t, previousSource: n, current: r, lastApplied
|
|
|
2462
2462
|
//#endregion
|
|
2463
2463
|
//#region src/components/form/ComputeFromWatcher.jsx
|
|
2464
2464
|
function ai({ form: e, config: t, sourcePath: n, targetPath: r, setFields: i = [] }) {
|
|
2465
|
-
let a =
|
|
2465
|
+
let a = xe.useWatch(n, {
|
|
2466
2466
|
form: e,
|
|
2467
2467
|
preserve: !0
|
|
2468
2468
|
}), o = ge(void 0), s = ge(void 0), c = a?.format ? a.format("YYYY-MM-DD") : String(a ?? "");
|
|
2469
|
-
return
|
|
2469
|
+
return C(() => {
|
|
2470
2470
|
let n = ii({
|
|
2471
2471
|
cfg: t,
|
|
2472
2472
|
sourceValue: a,
|
|
2473
2473
|
previousSource: o.current,
|
|
2474
2474
|
current: e.getFieldValue(r),
|
|
2475
2475
|
lastApplied: s.current,
|
|
2476
|
-
today:
|
|
2476
|
+
today: y()
|
|
2477
2477
|
});
|
|
2478
2478
|
o.current = a, n.action === "set" && (e.setFieldValue(r, n.value), s.current = n.value, i.forEach(({ path: t, value: n }) => e.setFieldValue(t, n)));
|
|
2479
2479
|
}, [c]), null;
|
|
@@ -2519,7 +2519,7 @@ function li(e, t = {}) {
|
|
|
2519
2519
|
if (!e || e.clearValue) return;
|
|
2520
2520
|
let n = ci(e);
|
|
2521
2521
|
if (!n.length) return;
|
|
2522
|
-
let a =
|
|
2522
|
+
let a = Zr(e, t) ? i : r;
|
|
2523
2523
|
n.forEach((e) => a.add(e));
|
|
2524
2524
|
}), i.forEach((e) => r.delete(e)), [...r];
|
|
2525
2525
|
}
|
|
@@ -2536,7 +2536,7 @@ function di(e, t = {}, n) {
|
|
|
2536
2536
|
return r.forEach((e) => {
|
|
2537
2537
|
if (!e || e.clearValue) return;
|
|
2538
2538
|
let { setValue: n, setValueLabel: r } = e;
|
|
2539
|
-
n != null && n !== "" && r && q(n) === i &&
|
|
2539
|
+
n != null && n !== "" && r && q(n) === i && Zr(e, t) && (o.has(q(n)) || (o.add(q(n)), a.push({
|
|
2540
2540
|
value: n,
|
|
2541
2541
|
label: r
|
|
2542
2542
|
})));
|
|
@@ -2585,7 +2585,7 @@ function wi(e, t) {
|
|
|
2585
2585
|
async function Ti(e, t) {
|
|
2586
2586
|
let n = wi(e, t), r = Ci.get(n);
|
|
2587
2587
|
if (r && Date.now() - r.at < pi) return r.promise;
|
|
2588
|
-
let i = Promise.resolve(
|
|
2588
|
+
let i = Promise.resolve(S(t, e.field, "", mi, 0, {
|
|
2589
2589
|
dataSource: "master",
|
|
2590
2590
|
masterName: e.masterName,
|
|
2591
2591
|
groupName: e.groupName
|
|
@@ -2605,7 +2605,7 @@ function Di(e) {
|
|
|
2605
2605
|
let t = /* @__PURE__ */ new Map();
|
|
2606
2606
|
return e.forEach((e) => {
|
|
2607
2607
|
[[e.label, e.label], [e.value, e.value]].forEach(([e, n]) => {
|
|
2608
|
-
let r =
|
|
2608
|
+
let r = ce(e);
|
|
2609
2609
|
r && !t.has(r) && t.set(r, n);
|
|
2610
2610
|
});
|
|
2611
2611
|
}), t;
|
|
@@ -2625,7 +2625,7 @@ async function Oi(e, t, { moduleName: n, constraintValue: r } = {}) {
|
|
|
2625
2625
|
}), l = new Set(a.flatMap((e) => o ? [String(e.value), String(e.label)] : [String(e.value)])), u = [], d = /* @__PURE__ */ new Map();
|
|
2626
2626
|
return i.forEach((e) => {
|
|
2627
2627
|
if (l.has(String(e))) return;
|
|
2628
|
-
let t = s.get(
|
|
2628
|
+
let t = s.get(ce(e));
|
|
2629
2629
|
t === void 0 ? u.push(String(e)) : d.set(e, t);
|
|
2630
2630
|
}), {
|
|
2631
2631
|
offList: u,
|
|
@@ -2739,7 +2739,7 @@ function zi(e, t, { labeled: n = !1, options: r = [] } = {}) {
|
|
|
2739
2739
|
}
|
|
2740
2740
|
function Bi({ field: e, form: t, name: n, moduleName: r, value: i, constraintValue: a, enabled: o = !0 }) {
|
|
2741
2741
|
let s = !!(o && t && n !== void 0 && bi(e)), c = s ? JSON.stringify(xi(i)) : "[]", l = s && e.optionsFromField ? JSON.stringify(a ?? null) : "", u = Ni(n);
|
|
2742
|
-
|
|
2742
|
+
C(() => {
|
|
2743
2743
|
if (!s || c === "[]") return;
|
|
2744
2744
|
let i = !1;
|
|
2745
2745
|
return Oi(e, t.getFieldValue(n), {
|
|
@@ -2762,7 +2762,7 @@ function Bi({ field: e, form: t, name: n, moduleName: r, value: i, constraintVal
|
|
|
2762
2762
|
u,
|
|
2763
2763
|
r,
|
|
2764
2764
|
t
|
|
2765
|
-
]),
|
|
2765
|
+
]), C(() => {
|
|
2766
2766
|
if (s) return () => J(t, n, null);
|
|
2767
2767
|
}, [
|
|
2768
2768
|
s,
|
|
@@ -2780,24 +2780,24 @@ function Hi({ form: e, groups: t, onJump: n }) {
|
|
|
2780
2780
|
let r = Ii(e);
|
|
2781
2781
|
if (!r.length) return null;
|
|
2782
2782
|
let i = r.length;
|
|
2783
|
-
return /* @__PURE__ */
|
|
2783
|
+
return /* @__PURE__ */ k(ve, {
|
|
2784
2784
|
type: "error",
|
|
2785
2785
|
showIcon: !0,
|
|
2786
2786
|
className: "v1-option-mismatch-banner",
|
|
2787
2787
|
style: { marginBottom: 16 },
|
|
2788
2788
|
message: `${i} ${i === 1 ? "field has a value" : "fields have values"} that ${i === 1 ? "is" : "are"} not in the dropdown list`,
|
|
2789
|
-
description: /* @__PURE__ */
|
|
2789
|
+
description: /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("div", {
|
|
2790
2790
|
style: { marginBottom: 6 },
|
|
2791
2791
|
children: "Choose a valid option for each of these before saving. The value that was read is still shown in the field so you can pick the closest match."
|
|
2792
|
-
}), /* @__PURE__ */
|
|
2792
|
+
}), /* @__PURE__ */ k("ul", {
|
|
2793
2793
|
style: {
|
|
2794
2794
|
margin: 0,
|
|
2795
2795
|
paddingInlineStart: 18
|
|
2796
2796
|
},
|
|
2797
2797
|
children: r.map((e) => {
|
|
2798
2798
|
let r = Vi(t, e.path);
|
|
2799
|
-
return /* @__PURE__ */
|
|
2800
|
-
/* @__PURE__ */
|
|
2799
|
+
return /* @__PURE__ */ A("li", { children: [
|
|
2800
|
+
/* @__PURE__ */ A(Te.Link, {
|
|
2801
2801
|
onClick: () => n?.(e.path),
|
|
2802
2802
|
children: [r ? `${r} → ` : "", e.label]
|
|
2803
2803
|
}),
|
|
@@ -2961,7 +2961,7 @@ function ba(e, t = {}) {
|
|
|
2961
2961
|
for (let t of [n, r]) {
|
|
2962
2962
|
let n = e?.[t];
|
|
2963
2963
|
if (n == null || n === "") continue;
|
|
2964
|
-
let r =
|
|
2964
|
+
let r = j(n);
|
|
2965
2965
|
if (r.isValid()) return r.valueOf();
|
|
2966
2966
|
}
|
|
2967
2967
|
return null;
|
|
@@ -3235,12 +3235,12 @@ function Xa(e) {
|
|
|
3235
3235
|
}
|
|
3236
3236
|
function Q(e) {
|
|
3237
3237
|
if (!e) return null;
|
|
3238
|
-
let t =
|
|
3238
|
+
let t = j(e);
|
|
3239
3239
|
return t.isValid() ? t.startOf("day").valueOf() : null;
|
|
3240
3240
|
}
|
|
3241
3241
|
function Za(e) {
|
|
3242
3242
|
if (!e) return null;
|
|
3243
|
-
let t =
|
|
3243
|
+
let t = j(e);
|
|
3244
3244
|
return t.isValid() ? t.hour() * 60 + t.minute() : null;
|
|
3245
3245
|
}
|
|
3246
3246
|
var Qa = {
|
|
@@ -3288,7 +3288,7 @@ function eo(e, t) {
|
|
|
3288
3288
|
}
|
|
3289
3289
|
function to(e, t, n, r) {
|
|
3290
3290
|
if (t === null) return null;
|
|
3291
|
-
let i = eo(n, r), a =
|
|
3291
|
+
let i = eo(n, r), a = j(t);
|
|
3292
3292
|
return i && (a = e === "dateAfterField" ? a.add(i.value, i.unit) : a.subtract(i.value, i.unit)), a.startOf("day").valueOf();
|
|
3293
3293
|
}
|
|
3294
3294
|
function no(e, t, n, r, i) {
|
|
@@ -3335,7 +3335,7 @@ function oo(e, t = "above", n = void 0) {
|
|
|
3335
3335
|
let r = e?.messages ?? {}, i = t === "below";
|
|
3336
3336
|
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.");
|
|
3337
3337
|
}
|
|
3338
|
-
function so({ field: e, readSibling: t, rows: n, rowIndex: r, now: i =
|
|
3338
|
+
function so({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = y }) {
|
|
3339
3339
|
let a = e?.validations ?? e?.validation ?? e?.rules ?? [], o = [];
|
|
3340
3340
|
for (let e of a) {
|
|
3341
3341
|
let n = typeof e == "string" ? { type: e } : e, r = n?.type;
|
|
@@ -3358,7 +3358,7 @@ function so({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = b }) {
|
|
|
3358
3358
|
rowIndex: r
|
|
3359
3359
|
}) : !1), o.length ? (e) => o.some((t) => t(e)) : void 0;
|
|
3360
3360
|
}
|
|
3361
|
-
function co(e, t =
|
|
3361
|
+
function co(e, t = y, n = void 0, r = void 0) {
|
|
3362
3362
|
if (!Z(n) && Q(n) !== null) return;
|
|
3363
3363
|
let i, a = e?.validations ?? e?.validation ?? e?.rules ?? [];
|
|
3364
3364
|
for (let e of a) {
|
|
@@ -3373,11 +3373,11 @@ function co(e, t = b, n = void 0, r = void 0) {
|
|
|
3373
3373
|
}
|
|
3374
3374
|
}
|
|
3375
3375
|
if (typeof r != "function") return i;
|
|
3376
|
-
let o =
|
|
3376
|
+
let o = j(i ?? t()), s = lo(o, r);
|
|
3377
3377
|
return !s || s.isSame(o, "month") ? i : s;
|
|
3378
3378
|
}
|
|
3379
3379
|
function lo(e, t, n = 240) {
|
|
3380
|
-
let r =
|
|
3380
|
+
let r = j(e).startOf("day");
|
|
3381
3381
|
if (!r.isValid() || typeof t != "function") return null;
|
|
3382
3382
|
let i = (e) => {
|
|
3383
3383
|
try {
|
|
@@ -3540,20 +3540,20 @@ function xo(e, t, n) {
|
|
|
3540
3540
|
//#endregion
|
|
3541
3541
|
//#region src/components/Breadcrumb.jsx
|
|
3542
3542
|
function So({ items: e = [] }) {
|
|
3543
|
-
let t = e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */
|
|
3543
|
+
let t = e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */ k(ot, {
|
|
3544
3544
|
variant: "body",
|
|
3545
3545
|
weight: "medium",
|
|
3546
3546
|
color: "link",
|
|
3547
3547
|
children: t.label
|
|
3548
|
-
}) : /* @__PURE__ */
|
|
3548
|
+
}) : /* @__PURE__ */ A(Le, {
|
|
3549
3549
|
to: t.href,
|
|
3550
|
-
children: [/* @__PURE__ */
|
|
3550
|
+
children: [/* @__PURE__ */ k(ot, {
|
|
3551
3551
|
variant: "body",
|
|
3552
3552
|
color: "secondary",
|
|
3553
3553
|
children: t.label
|
|
3554
|
-
}), t.dropdown && /* @__PURE__ */
|
|
3554
|
+
}), t.dropdown && /* @__PURE__ */ k(Ee, {})]
|
|
3555
3555
|
}) }));
|
|
3556
|
-
return /* @__PURE__ */
|
|
3556
|
+
return /* @__PURE__ */ k(ye, { items: t });
|
|
3557
3557
|
}
|
|
3558
3558
|
//#endregion
|
|
3559
3559
|
//#region src/components/form/canonicalOption.js
|
|
@@ -3617,14 +3617,14 @@ function Ao(e) {
|
|
|
3617
3617
|
}
|
|
3618
3618
|
//#endregion
|
|
3619
3619
|
//#region src/components/form/LinkedRecordFileField.jsx
|
|
3620
|
-
var jo =
|
|
3620
|
+
var jo = fe(() => import("./index.js").then((e) => e.n)), Mo = fe(() => import("./DocumentViewer-BejicBy_.js").then((e) => e.n));
|
|
3621
3621
|
function No(e) {
|
|
3622
3622
|
let t = String(e ?? "").split(".").pop()?.toLowerCase();
|
|
3623
|
-
return
|
|
3623
|
+
return k(t === "pdf" ? je : t === "doc" || t === "docx" ? Ne : Ae, { className: "v1-file-chip__icon" });
|
|
3624
3624
|
}
|
|
3625
3625
|
function Po({ field: e, recordMeta: t, onLinkedRecordUpdated: n }) {
|
|
3626
|
-
let r = e?.linkedModule, i = e?.linkedFileField, a =
|
|
3627
|
-
let n =
|
|
3626
|
+
let r = e?.linkedModule, i = e?.linkedFileField, a = he(() => {
|
|
3627
|
+
let n = Vr(r, t);
|
|
3628
3628
|
if (n) return n;
|
|
3629
3629
|
let i = e?.linkedIdField, a = i ? t?.[i] : "";
|
|
3630
3630
|
return a ? String(a) : "";
|
|
@@ -3636,7 +3636,7 @@ function Po({ field: e, recordMeta: t, onLinkedRecordUpdated: n }) {
|
|
|
3636
3636
|
loading: !1,
|
|
3637
3637
|
fileValue: null
|
|
3638
3638
|
}), [c, l] = w(!1), [u, d] = w(!1), [f, p] = w(0), m = ["candidate", "candidates"].includes(r) ? t?.candidateVersionId : void 0;
|
|
3639
|
-
|
|
3639
|
+
C(() => {
|
|
3640
3640
|
if (!a || !r) return;
|
|
3641
3641
|
let e = !1;
|
|
3642
3642
|
return queueMicrotask(() => {
|
|
@@ -3644,14 +3644,14 @@ function Po({ field: e, recordMeta: t, onLinkedRecordUpdated: n }) {
|
|
|
3644
3644
|
...e,
|
|
3645
3645
|
loading: !0
|
|
3646
3646
|
}));
|
|
3647
|
-
}), (m ?
|
|
3647
|
+
}), (m ? le({
|
|
3648
3648
|
module: "candidates",
|
|
3649
3649
|
id: a,
|
|
3650
3650
|
candidateVersionId: m
|
|
3651
3651
|
}).then((e) => {
|
|
3652
3652
|
let t = e.flatMap((e) => e.fields ?? []).find((e) => e.field === i || e.payloadKey === i);
|
|
3653
3653
|
return { [i]: t?.value };
|
|
3654
|
-
}) :
|
|
3654
|
+
}) : ee(r, a)).then((t) => {
|
|
3655
3655
|
e || s({
|
|
3656
3656
|
loading: !1,
|
|
3657
3657
|
fileValue: t?.[i] ?? null
|
|
@@ -3671,16 +3671,16 @@ function Po({ field: e, recordMeta: t, onLinkedRecordUpdated: n }) {
|
|
|
3671
3671
|
f,
|
|
3672
3672
|
m
|
|
3673
3673
|
]);
|
|
3674
|
-
let h =
|
|
3675
|
-
if (!a) return /* @__PURE__ */
|
|
3674
|
+
let h = he(() => oe(o.fileValue), [o.fileValue])[0], g = !!h, _ = e?.label ?? "File", v = V(r) || "record";
|
|
3675
|
+
if (!a) return /* @__PURE__ */ k("div", {
|
|
3676
3676
|
className: "v1-linked-file v1-linked-file--empty",
|
|
3677
|
-
children: /* @__PURE__ */
|
|
3677
|
+
children: /* @__PURE__ */ k("span", { children: e?.unlinkedText ?? `Not available until the ${v} is set.` })
|
|
3678
3678
|
});
|
|
3679
|
-
if (o.loading) return /* @__PURE__ */
|
|
3679
|
+
if (o.loading) return /* @__PURE__ */ k("div", {
|
|
3680
3680
|
className: "v1-linked-file v1-linked-file--loading",
|
|
3681
|
-
children: /* @__PURE__ */
|
|
3681
|
+
children: /* @__PURE__ */ k(Ce, { size: "small" })
|
|
3682
3682
|
});
|
|
3683
|
-
let
|
|
3683
|
+
let y = h ? {
|
|
3684
3684
|
...h,
|
|
3685
3685
|
url: h.needsAuthFetch || m ? "" : h.url,
|
|
3686
3686
|
authSource: h.needsAuthFetch || m ? {
|
|
@@ -3689,80 +3689,80 @@ function Po({ field: e, recordMeta: t, onLinkedRecordUpdated: n }) {
|
|
|
3689
3689
|
fieldName: i,
|
|
3690
3690
|
candidateVersionId: m
|
|
3691
3691
|
} : void 0
|
|
3692
|
-
} : null,
|
|
3693
|
-
return /* @__PURE__ */
|
|
3694
|
-
/* @__PURE__ */
|
|
3692
|
+
} : null, b = () => d(!1), x = e?.emptyText ?? `No ${_.toLowerCase()} on file yet`, S = e?.reuploadLabel ?? `${g ? "Reupload" : "Upload"} in ${v}`, te = e?.reuploadWarning ?? `The ${_.toLowerCase()} belongs to the ${v.toLowerCase()}, not to this record. Changing it here updates the ${v.toLowerCase()} everywhere it is used.`;
|
|
3693
|
+
return /* @__PURE__ */ A(O, { children: [
|
|
3694
|
+
/* @__PURE__ */ A("div", {
|
|
3695
3695
|
className: `v1-linked-file-row ${g ? "" : "v1-linked-file--empty"}`,
|
|
3696
|
-
children: [/* @__PURE__ */
|
|
3696
|
+
children: [/* @__PURE__ */ A("button", {
|
|
3697
3697
|
type: "button",
|
|
3698
3698
|
className: "v1-linked-file v1-file-chip",
|
|
3699
3699
|
disabled: !g,
|
|
3700
3700
|
onClick: () => g && l(!0),
|
|
3701
|
-
title: g ? `Preview or download ${h.name}` :
|
|
3701
|
+
title: g ? `Preview or download ${h.name}` : x,
|
|
3702
3702
|
children: [
|
|
3703
|
-
g ? No(h.name) : /* @__PURE__ */
|
|
3704
|
-
/* @__PURE__ */
|
|
3703
|
+
g ? No(h.name) : /* @__PURE__ */ k(Ae, { className: "v1-file-chip__icon" }),
|
|
3704
|
+
/* @__PURE__ */ k("span", {
|
|
3705
3705
|
className: "v1-file-chip__name",
|
|
3706
|
-
children: g ? h.name :
|
|
3706
|
+
children: g ? h.name : x
|
|
3707
3707
|
}),
|
|
3708
|
-
g && /* @__PURE__ */
|
|
3708
|
+
g && /* @__PURE__ */ k(ke, {
|
|
3709
3709
|
className: "v1-file-chip__action",
|
|
3710
3710
|
"aria-hidden": "true"
|
|
3711
3711
|
})
|
|
3712
3712
|
]
|
|
3713
|
-
}), /* @__PURE__ */
|
|
3713
|
+
}), /* @__PURE__ */ A("button", {
|
|
3714
3714
|
type: "button",
|
|
3715
3715
|
className: "v1-linked-file__edit-btn",
|
|
3716
3716
|
onClick: () => d(!0),
|
|
3717
|
-
title:
|
|
3717
|
+
title: te,
|
|
3718
3718
|
children: [
|
|
3719
|
-
/* @__PURE__ */
|
|
3719
|
+
/* @__PURE__ */ k(De, {}),
|
|
3720
3720
|
" ",
|
|
3721
|
-
|
|
3721
|
+
S
|
|
3722
3722
|
]
|
|
3723
3723
|
})]
|
|
3724
3724
|
}),
|
|
3725
|
-
c &&
|
|
3725
|
+
c && y && /* @__PURE__ */ k(ue, {
|
|
3726
3726
|
fallback: null,
|
|
3727
|
-
children: /* @__PURE__ */
|
|
3727
|
+
children: /* @__PURE__ */ k(Mo, {
|
|
3728
3728
|
open: c,
|
|
3729
3729
|
onClose: () => l(!1),
|
|
3730
|
-
documents: [
|
|
3730
|
+
documents: [y]
|
|
3731
3731
|
})
|
|
3732
3732
|
}),
|
|
3733
|
-
u && /* @__PURE__ */
|
|
3733
|
+
u && /* @__PURE__ */ A(E, {
|
|
3734
3734
|
open: !0,
|
|
3735
|
-
title:
|
|
3735
|
+
title: S,
|
|
3736
3736
|
width: "min(1080px, 96vw)",
|
|
3737
3737
|
footer: null,
|
|
3738
3738
|
destroyOnClose: !0,
|
|
3739
3739
|
maskClosable: !1,
|
|
3740
|
-
onCancel:
|
|
3740
|
+
onCancel: b,
|
|
3741
3741
|
styles: { body: {
|
|
3742
3742
|
maxHeight: "78vh",
|
|
3743
3743
|
overflowY: "auto"
|
|
3744
3744
|
} },
|
|
3745
|
-
children: [/* @__PURE__ */
|
|
3745
|
+
children: [/* @__PURE__ */ k(ve, {
|
|
3746
3746
|
type: "warning",
|
|
3747
3747
|
showIcon: !0,
|
|
3748
|
-
message:
|
|
3748
|
+
message: te,
|
|
3749
3749
|
style: { marginBottom: 16 }
|
|
3750
|
-
}), /* @__PURE__ */
|
|
3751
|
-
fallback: /* @__PURE__ */
|
|
3750
|
+
}), /* @__PURE__ */ k(ue, {
|
|
3751
|
+
fallback: /* @__PURE__ */ k("div", {
|
|
3752
3752
|
style: {
|
|
3753
3753
|
padding: 48,
|
|
3754
3754
|
textAlign: "center"
|
|
3755
3755
|
},
|
|
3756
|
-
children: /* @__PURE__ */
|
|
3756
|
+
children: /* @__PURE__ */ k(Ce, {})
|
|
3757
3757
|
}),
|
|
3758
|
-
children: /* @__PURE__ */
|
|
3758
|
+
children: /* @__PURE__ */ k(jo, {
|
|
3759
3759
|
moduleName: r,
|
|
3760
3760
|
recordId: a,
|
|
3761
3761
|
embedded: !0,
|
|
3762
3762
|
breadcrumbItems: [],
|
|
3763
|
-
onCancel:
|
|
3763
|
+
onCancel: b,
|
|
3764
3764
|
onSuccess: () => {
|
|
3765
|
-
|
|
3765
|
+
b(), p((e) => e + 1), n?.(a);
|
|
3766
3766
|
}
|
|
3767
3767
|
})
|
|
3768
3768
|
})]
|
|
@@ -3770,23 +3770,23 @@ function Po({ field: e, recordMeta: t, onLinkedRecordUpdated: n }) {
|
|
|
3770
3770
|
] });
|
|
3771
3771
|
}
|
|
3772
3772
|
Po.propTypes = {
|
|
3773
|
-
field:
|
|
3774
|
-
label:
|
|
3775
|
-
linkedModule:
|
|
3776
|
-
linkedFileField:
|
|
3777
|
-
linkedIdField:
|
|
3778
|
-
emptyText:
|
|
3779
|
-
unlinkedText:
|
|
3780
|
-
reuploadLabel:
|
|
3781
|
-
reuploadWarning:
|
|
3773
|
+
field: M.shape({
|
|
3774
|
+
label: M.string,
|
|
3775
|
+
linkedModule: M.string,
|
|
3776
|
+
linkedFileField: M.string,
|
|
3777
|
+
linkedIdField: M.string,
|
|
3778
|
+
emptyText: M.string,
|
|
3779
|
+
unlinkedText: M.string,
|
|
3780
|
+
reuploadLabel: M.string,
|
|
3781
|
+
reuploadWarning: M.string
|
|
3782
3782
|
}).isRequired,
|
|
3783
|
-
recordMeta:
|
|
3784
|
-
onLinkedRecordUpdated:
|
|
3783
|
+
recordMeta: M.object,
|
|
3784
|
+
onLinkedRecordUpdated: M.func
|
|
3785
3785
|
}, Po.defaultProps = {
|
|
3786
3786
|
recordMeta: void 0,
|
|
3787
3787
|
onLinkedRecordUpdated: void 0
|
|
3788
3788
|
};
|
|
3789
3789
|
//#endregion
|
|
3790
|
-
export { di as $,
|
|
3790
|
+
export { di as $, Yt as $t, ma as A, er as At, ia as B, Dn as Bt, Ka as C, ot as Cn, Cr as Ct, Ba as D, V as Dt, Ha as E, br as Et, ja as F, Kn as Ft, Zi as G, Sn as Gt, ra as H, Hn as Ht, pa as I, qn as It, Ri as J, _n as Jt, Hi as K, xn as Kt, fa as L, Jn as Lt, ha as M, Xn as Mt, Na as N, Yn as Nt, ya as O, sr as Ot, Ia as P, Gn as Pt, si as Q, Xt as Qt, ca as R, Ln as Rt, Ja as S, ft as Sn, kr as St, Wa as T, N as Tn, yr as Tt, ta as U, Rn as Ut, sa as V, Nn as Vt, Qi as W, yn as Wt, Bi as X, mn as Xt, bi as Y, gn as Yt, Ii as Z, hn as Zt, Xa as _, St as _n, Fr as _t, Do as a, Rt as an, Xr as at, uo as b, _t as bn, Mr as bt, bo as c, Ft as cn, Hr as ct, _o as d, Mt as dn, Gr as dt, Gt as en, ui as et, ho as f, kt as fn, Ur as ft, co as g, Ot as gn, Ir as gt, fo as h, bt as hn, Rr as ht, Oo as i, Lt as in, Yr as it, _a as j, rr as jt, Ma as k, cr as kt, xo as l, Nt as ln, Vr as lt, io as m, xt as mn, Kr as mt, Ao as n, I as nn, ri as nt, To as o, zt as on, Qr as ot, so as p, Dt as pn, qr as pt, Ai as q, vn as qt, ko as r, Vt as rn, ei as rt, So as s, Pt as sn, Jr as st, Po as t, L as tn, ai as tt, vo as u, At as un, Wr as ut, Za as v, Ct as vn, Pr as vt, Ua as w, P as wn, Sr as wt, Ya as x, gt as xn, jr as xt, Z as y, vt as yn, Nr as yt, la as z, In as zt };
|
|
3791
3791
|
|
|
3792
|
-
//# sourceMappingURL=LinkedRecordFileField-
|
|
3792
|
+
//# sourceMappingURL=LinkedRecordFileField-CXaGgEV-.js.map
|