@ukhomeoffice/cop-react-form-renderer 8.0.6 → 8.0.7-alpha
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/index.cjs +4 -4
- package/dist/index.js +245 -245
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import './index.css';const ze = {
|
|
|
11
11
|
remove: "Remove",
|
|
12
12
|
change: "Change",
|
|
13
13
|
item: "Item ${index}"
|
|
14
|
-
}, ko = "alert", $o = "autocomplete", Bo = "calculation", Yo = "checkboxes", Ho = "collection", Vo = "collection-summary", qo = "container", jo = "date", Go = "details", Ko = "email", Wo = "file", zo = "heading", Xo = "html", Jo = "inset-text", Qo = "list", Zo = "multifile", ei = "paragraph", ti = "phone-number", ni = "radios", ri = "select", si = "text", oi = "textarea", ii = "time", li = "warning",
|
|
14
|
+
}, ko = "alert", $o = "autocomplete", Bo = "calculation", Yo = "checkboxes", Ho = "collection", Vo = "collection-summary", qo = "container", jo = "date", Go = "details", Ko = "email", Wo = "file", zo = "heading", Xo = "html", Jo = "inset-text", Qo = "list", Zo = "multifile", ei = "paragraph", ti = "phone-number", ni = "radios", ri = "select", si = "text", oi = "textarea", ii = "time", li = "warning", _ = {
|
|
15
15
|
ALERT: ko,
|
|
16
16
|
AUTOCOMPLETE: $o,
|
|
17
17
|
CALCULATION: Bo,
|
|
@@ -97,7 +97,7 @@ import './index.css';const ze = {
|
|
|
97
97
|
DETAILS: _i
|
|
98
98
|
}, oh = {
|
|
99
99
|
CollectionLabels: ze,
|
|
100
|
-
ComponentTypes:
|
|
100
|
+
ComponentTypes: _,
|
|
101
101
|
EventTypes: Ne,
|
|
102
102
|
FormPages: ie,
|
|
103
103
|
FormTypes: oe,
|
|
@@ -415,11 +415,11 @@ import './index.css';const ze = {
|
|
|
415
415
|
e.map((n) => rs(n, t))
|
|
416
416
|
), rs = (e, t) => {
|
|
417
417
|
if (e) {
|
|
418
|
-
if (e.type ===
|
|
418
|
+
if (e.type === _.CONTAINER)
|
|
419
419
|
return il(e, t);
|
|
420
|
-
if (e.type ===
|
|
420
|
+
if (e.type === _.COLLECTION)
|
|
421
421
|
return ll(e, t);
|
|
422
|
-
if (e.type ===
|
|
422
|
+
if (e.type === _.SELECT)
|
|
423
423
|
return e;
|
|
424
424
|
if (e.data?.url && !e.data?.skipUrlInterpolation)
|
|
425
425
|
return {
|
|
@@ -1168,7 +1168,7 @@ function Vt(e, t, n) {
|
|
|
1168
1168
|
if (a === 1 / 0)
|
|
1169
1169
|
return JSON.stringify(E);
|
|
1170
1170
|
const y = [];
|
|
1171
|
-
return JSON.stringify(E, function(
|
|
1171
|
+
return JSON.stringify(E, function(w, L) {
|
|
1172
1172
|
if (!h.isObject(L))
|
|
1173
1173
|
return L;
|
|
1174
1174
|
for (; y.length && y[y.length - 1] !== this; )
|
|
@@ -1203,8 +1203,8 @@ function Vt(e, t, n) {
|
|
|
1203
1203
|
if (!h.isUndefined(E)) {
|
|
1204
1204
|
if (f(y), u.indexOf(E) !== -1)
|
|
1205
1205
|
throw new Error("Circular reference detected in " + P.join("."));
|
|
1206
|
-
u.push(E), h.forEach(E, function(
|
|
1207
|
-
(!(h.isUndefined(
|
|
1206
|
+
u.push(E), h.forEach(E, function(w, L) {
|
|
1207
|
+
(!(h.isUndefined(w) || w === null) && s.call(t, w, h.isString(L) ? L.trim() : L, P, A)) === !0 && S(w, P ? P.concat(L) : [L], y + 1);
|
|
1208
1208
|
}), u.pop();
|
|
1209
1209
|
}
|
|
1210
1210
|
}
|
|
@@ -1775,7 +1775,7 @@ const Ha = typeof XMLHttpRequest < "u", Va = Ha && function(e) {
|
|
|
1775
1775
|
return;
|
|
1776
1776
|
const y = me.from(
|
|
1777
1777
|
"getAllResponseHeaders" in S && S.getAllResponseHeaders()
|
|
1778
|
-
),
|
|
1778
|
+
), w = {
|
|
1779
1779
|
data: !l || l === "text" || l === "json" ? S.responseText : S.response,
|
|
1780
1780
|
status: S.status,
|
|
1781
1781
|
statusText: S.statusText,
|
|
@@ -1790,7 +1790,7 @@ const Ha = typeof XMLHttpRequest < "u", Va = Ha && function(e) {
|
|
|
1790
1790
|
function(C) {
|
|
1791
1791
|
r(C), A();
|
|
1792
1792
|
},
|
|
1793
|
-
|
|
1793
|
+
w
|
|
1794
1794
|
), S = null;
|
|
1795
1795
|
}
|
|
1796
1796
|
"onloadend" in S ? S.onloadend = E : S.onreadystatechange = function() {
|
|
@@ -1798,21 +1798,21 @@ const Ha = typeof XMLHttpRequest < "u", Va = Ha && function(e) {
|
|
|
1798
1798
|
}, S.onabort = function() {
|
|
1799
1799
|
S && (r(new N("Request aborted", N.ECONNABORTED, e, S)), A(), S = null);
|
|
1800
1800
|
}, S.onerror = function(g) {
|
|
1801
|
-
const
|
|
1801
|
+
const w = g && g.message ? g.message : "Network Error", L = new N(w, N.ERR_NETWORK, e, S);
|
|
1802
1802
|
L.event = g || null, r(L), A(), S = null;
|
|
1803
1803
|
}, S.ontimeout = function() {
|
|
1804
1804
|
let g = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1805
|
-
const
|
|
1805
|
+
const w = s.transitional || vn;
|
|
1806
1806
|
s.timeoutErrorMessage && (g = s.timeoutErrorMessage), r(
|
|
1807
1807
|
new N(
|
|
1808
1808
|
g,
|
|
1809
|
-
|
|
1809
|
+
w.clarifyTimeoutError ? N.ETIMEDOUT : N.ECONNABORTED,
|
|
1810
1810
|
e,
|
|
1811
1811
|
S
|
|
1812
1812
|
)
|
|
1813
1813
|
), A(), S = null;
|
|
1814
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in S && h.forEach(hs(i), function(g,
|
|
1815
|
-
S.setRequestHeader(
|
|
1814
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in S && h.forEach(hs(i), function(g, w) {
|
|
1815
|
+
S.setRequestHeader(w, g);
|
|
1816
1816
|
}), h.isUndefined(s.withCredentials) || (S.withCredentials = !!s.withCredentials), l && l !== "json" && (S.responseType = s.responseType), c && ([f, T] = Ft(c, !0), S.addEventListener("progress", f)), a && S.upload && ([d, p] = Ft(a), S.upload.addEventListener("progress", d), S.upload.addEventListener("loadend", p)), (s.cancelToken || s.signal) && (u = (y) => {
|
|
1817
1817
|
S && (r(!y || y.type ? new Et(null, e, S) : y), S.abort(), A(), S = null);
|
|
1818
1818
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
@@ -2037,7 +2037,7 @@ const Fn = "1.18.0", ar = 64 * 1024, { isFunction: wt } = h, Xa = (e) => encodeU
|
|
|
2037
2037
|
url: P,
|
|
2038
2038
|
method: y,
|
|
2039
2039
|
data: g,
|
|
2040
|
-
signal:
|
|
2040
|
+
signal: w,
|
|
2041
2041
|
cancelToken: L,
|
|
2042
2042
|
timeout: C,
|
|
2043
2043
|
onDownloadProgress: D,
|
|
@@ -2053,7 +2053,7 @@ const Fn = "1.18.0", ar = 64 * 1024, { isFunction: wt } = h, Xa = (e) => encodeU
|
|
|
2053
2053
|
let W = s || fetch;
|
|
2054
2054
|
x = x ? (x + "").toLowerCase() : "text";
|
|
2055
2055
|
let K = qa(
|
|
2056
|
-
[
|
|
2056
|
+
[w, L && L.toAbortSignal()],
|
|
2057
2057
|
C
|
|
2058
2058
|
), j = null;
|
|
2059
2059
|
const Ee = K && K.unsubscribe && (() => {
|
|
@@ -2867,11 +2867,11 @@ const {
|
|
|
2867
2867
|
},
|
|
2868
2868
|
validate: {
|
|
2869
2869
|
page: (f) => {
|
|
2870
|
-
const p =
|
|
2870
|
+
const p = b.Validate.page(f, s), T = t.onValidate(f, p);
|
|
2871
2871
|
return r(T), T;
|
|
2872
2872
|
},
|
|
2873
2873
|
pages: (f) => {
|
|
2874
|
-
const p = f.map((A) =>
|
|
2874
|
+
const p = f.map((A) => b.Validate.page(A, s)), T = f.flatMap((A, S) => t.onValidate(A, p[S]));
|
|
2875
2875
|
return r(T), T;
|
|
2876
2876
|
}
|
|
2877
2877
|
}
|
|
@@ -2927,7 +2927,7 @@ const {
|
|
|
2927
2927
|
}, Mn = (e, t, n, r, s = {}) => {
|
|
2928
2928
|
if (!t)
|
|
2929
2929
|
return [];
|
|
2930
|
-
const o =
|
|
2930
|
+
const o = b.CollectionPage.getData(t.collection.name, t.formData) || [];
|
|
2931
2931
|
let i = [];
|
|
2932
2932
|
return o.forEach((l) => {
|
|
2933
2933
|
s = {
|
|
@@ -2939,7 +2939,7 @@ const {
|
|
|
2939
2939
|
const u = { ...c, formData: { ...n, ...s } };
|
|
2940
2940
|
if (c.childPages)
|
|
2941
2941
|
return Mn(e, u, n, r, s);
|
|
2942
|
-
const d =
|
|
2942
|
+
const d = b.Validate.page(u);
|
|
2943
2943
|
return r.onValidate(u, d);
|
|
2944
2944
|
});
|
|
2945
2945
|
i = i.concat(
|
|
@@ -2995,13 +2995,13 @@ const {
|
|
|
2995
2995
|
/* @__PURE__ */ m(Ce, { classModifiers: "warning", onClick: s, autoFocus: !0, children: n || yc }),
|
|
2996
2996
|
/* @__PURE__ */ m(Ce, { classModifiers: "secondary", onClick: o, children: "Cancel" })
|
|
2997
2997
|
] });
|
|
2998
|
-
}, $n = (e) => e && Array.isArray(e.components) ? e.components.flatMap((t) => t.type ===
|
|
2998
|
+
}, $n = (e) => e && Array.isArray(e.components) ? e.components.flatMap((t) => t.type === _.CONTAINER ? $n(t) : yt.editable(t) ? t : null).filter((t) => !!t) : [], Sc = (e) => {
|
|
2999
2999
|
const t = e.full_path || e.fieldId;
|
|
3000
3000
|
return e.components.map((n) => {
|
|
3001
3001
|
const r = t ? `${t}.${n.fieldId}` : n.fieldId, s = { ...n, full_path: r };
|
|
3002
|
-
return n.type ===
|
|
3002
|
+
return n.type === _.CONTAINER ? Sn(s) : (n.type === _.RADIOS && s.data?.options?.forEach((o, i) => {
|
|
3003
3003
|
o.nested?.forEach((l, a) => {
|
|
3004
|
-
l.type ===
|
|
3004
|
+
l.type === _.CONTAINER && (s.data.options[i].nested[a] = Sn(l));
|
|
3005
3005
|
});
|
|
3006
3006
|
}), s);
|
|
3007
3007
|
});
|
|
@@ -3106,7 +3106,7 @@ const {
|
|
|
3106
3106
|
}, []), X(() => {
|
|
3107
3107
|
P && g && A.page(e);
|
|
3108
3108
|
}, [d, P]);
|
|
3109
|
-
const
|
|
3109
|
+
const w = ({ target: I }) => {
|
|
3110
3110
|
const Y = e, { value: R } = I;
|
|
3111
3111
|
R ? (Y.formData[I.name] = R, p((O) => ({
|
|
3112
3112
|
...O,
|
|
@@ -3128,22 +3128,22 @@ const {
|
|
|
3128
3128
|
const I = document.title.replace("Error: ", "");
|
|
3129
3129
|
document.title = T.length > 0 ? "Error: " + I : I;
|
|
3130
3130
|
}, [T]);
|
|
3131
|
-
const L =
|
|
3131
|
+
const L = b.classBuilder(l, a, c), C = e;
|
|
3132
3132
|
C.actions = C.actions?.map(
|
|
3133
3133
|
(I) => (
|
|
3134
3134
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
3135
|
-
I.label ? { ...I, label:
|
|
3135
|
+
I.label ? { ...I, label: b.interpolateString(I.label, C.formData) } : I
|
|
3136
3136
|
)
|
|
3137
|
-
), C.formData =
|
|
3138
|
-
const D = e.title ? /* @__PURE__ */ m(Bt, { size: e.titleSize, children:
|
|
3137
|
+
), C.formData = b.Operate.runPageOperations(C, { ...C.formData, ...f }, r || w);
|
|
3138
|
+
const D = e.title ? /* @__PURE__ */ m(Bt, { size: e.titleSize, children: b.FormPage.getTitle(e.title, e.formData) }) : /* @__PURE__ */ m(ln, { id: e.id, required: e.required, hideOptionalSuffix: e.hideOptionalSuffix, children: e.label }), v = (
|
|
3139
3139
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
3140
|
-
e.components.filter((I) =>
|
|
3140
|
+
e.components.filter((I) => b.Component.show(I, e.formData)).map((I, Y) => /* @__PURE__ */ m(
|
|
3141
3141
|
At,
|
|
3142
3142
|
{
|
|
3143
3143
|
component: I,
|
|
3144
3144
|
onAction: (R) => n(R, f, S),
|
|
3145
|
-
onChange: r ||
|
|
3146
|
-
onTopLevelChange: s ||
|
|
3145
|
+
onChange: r || w,
|
|
3146
|
+
onTopLevelChange: s || w,
|
|
3147
3147
|
value: e.formData[I.fieldId] || f[I.fieldId],
|
|
3148
3148
|
formData: e.formData,
|
|
3149
3149
|
pages: t,
|
|
@@ -3166,7 +3166,7 @@ const {
|
|
|
3166
3166
|
/* @__PURE__ */ m(
|
|
3167
3167
|
vs,
|
|
3168
3168
|
{
|
|
3169
|
-
actions: e.actions?.filter((I) =>
|
|
3169
|
+
actions: e.actions?.filter((I) => b.Component.show(I, e.formData)),
|
|
3170
3170
|
onAction: (I) => n(I, f, S)
|
|
3171
3171
|
}
|
|
3172
3172
|
)
|
|
@@ -3177,19 +3177,19 @@ const {
|
|
|
3177
3177
|
formData: n,
|
|
3178
3178
|
classModifiers: r
|
|
3179
3179
|
}) => {
|
|
3180
|
-
const s =
|
|
3180
|
+
const s = b.classBuilder(pr, r, ""), o = t.filter((i) => b.Component.show(i, n));
|
|
3181
3181
|
return /* @__PURE__ */ m("div", { id: e, className: s(), children: o.map((i, l) => {
|
|
3182
3182
|
const a = `${e}-banner-${l}`;
|
|
3183
3183
|
if (typeof i == "string" || i.type === "plain") {
|
|
3184
3184
|
const c = typeof i == "string" ? i : i.text;
|
|
3185
|
-
return /* @__PURE__ */ m("div", { id: a, className: s("banner"), children: /* @__PURE__ */ m(vr, { content:
|
|
3185
|
+
return /* @__PURE__ */ m("div", { id: a, className: s("banner"), children: /* @__PURE__ */ m(vr, { content: b.interpolateString(c, n) }) }, a);
|
|
3186
3186
|
}
|
|
3187
3187
|
return /* @__PURE__ */ m(
|
|
3188
3188
|
Lr,
|
|
3189
3189
|
{
|
|
3190
3190
|
classBlock: `${pr}__tag`,
|
|
3191
3191
|
classModifiers: i.classModifiers,
|
|
3192
|
-
text:
|
|
3192
|
+
text: b.interpolateString(i.text, n)
|
|
3193
3193
|
},
|
|
3194
3194
|
a
|
|
3195
3195
|
);
|
|
@@ -3320,7 +3320,7 @@ const {
|
|
|
3320
3320
|
] })
|
|
3321
3321
|
] }),
|
|
3322
3322
|
/* @__PURE__ */ m("div", { className: a("content"), children: /* @__PURE__ */ m("dl", { className: c(), role: "list", children: o?.childPages?.flatMap((u) => {
|
|
3323
|
-
const d = u.components.map((f) =>
|
|
3323
|
+
const d = u.components.map((f) => b.Component.elevateNested([f], t)).flat().filter(Boolean);
|
|
3324
3324
|
return u.summaryLayout?.sections?.flatMap((f) => {
|
|
3325
3325
|
const T = f.columns.filter((A) => ce.meetsAll(A, { ...u.formData, ...t })).flatMap((A) => A.fields || []);
|
|
3326
3326
|
return T.length ? T.flatMap((A) => {
|
|
@@ -3330,7 +3330,7 @@ const {
|
|
|
3330
3330
|
});
|
|
3331
3331
|
}) }) })
|
|
3332
3332
|
] });
|
|
3333
|
-
}, Dc = ({ id: e, "data-testid": t, actions: n, onFullEdit: r = null, entryData: s, formData: o, name: i, autoFocus: l }) => Array.isArray(n) ? /* @__PURE__ */ m(De, { children: n.filter((a) =>
|
|
3333
|
+
}, Dc = ({ id: e, "data-testid": t, actions: n, onFullEdit: r = null, entryData: s, formData: o, name: i, autoFocus: l }) => Array.isArray(n) ? /* @__PURE__ */ m(De, { children: n.filter((a) => b.Component.show(a, o)).map(
|
|
3334
3334
|
(a) => /* @__PURE__ */ m(
|
|
3335
3335
|
Ce,
|
|
3336
3336
|
{
|
|
@@ -3338,7 +3338,7 @@ const {
|
|
|
3338
3338
|
"data-testid": t,
|
|
3339
3339
|
onClick: () => r(a?.page, s.id),
|
|
3340
3340
|
classModifiers: a?.classModifiers || yr,
|
|
3341
|
-
"aria-label":
|
|
3341
|
+
"aria-label": b.FormPage.getConditionalText(a?.aria_label, s),
|
|
3342
3342
|
name: i,
|
|
3343
3343
|
autoFocus: l,
|
|
3344
3344
|
children: a?.label || Ar
|
|
@@ -3352,7 +3352,7 @@ const {
|
|
|
3352
3352
|
"data-testid": t,
|
|
3353
3353
|
onClick: () => r(n?.page, s.id),
|
|
3354
3354
|
classModifiers: n?.classModifiers || yr,
|
|
3355
|
-
"aria-label":
|
|
3355
|
+
"aria-label": b.FormPage.getConditionalText(n?.aria_label, s),
|
|
3356
3356
|
name: i,
|
|
3357
3357
|
autoFocus: l,
|
|
3358
3358
|
children: n?.label || Ar
|
|
@@ -3376,17 +3376,17 @@ const {
|
|
|
3376
3376
|
onAction: n
|
|
3377
3377
|
} : null;
|
|
3378
3378
|
}, Ms = [
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3379
|
+
_.ALERT,
|
|
3380
|
+
_.COLLECTION_SUMMARY,
|
|
3381
|
+
_.DETAILS,
|
|
3382
|
+
_.HEADING,
|
|
3383
|
+
_.HTML,
|
|
3384
|
+
_.INSET_TEXT
|
|
3385
3385
|
], Ut = (e, t) => {
|
|
3386
3386
|
if (!e || Ms.includes(e.type) || Object.prototype.hasOwnProperty.call(e, "show_on_cya") && !e.show_on_cya)
|
|
3387
3387
|
return !1;
|
|
3388
3388
|
if (e.hideOnCyaWhenEmpty)
|
|
3389
|
-
if (e.type ===
|
|
3389
|
+
if (e.type === _.COLLECTION) {
|
|
3390
3390
|
if (!se(t, e.full_path || e.fieldId)?.length)
|
|
3391
3391
|
return !1;
|
|
3392
3392
|
} else {
|
|
@@ -3394,7 +3394,7 @@ const {
|
|
|
3394
3394
|
if (!n && n !== !1 && n !== 0)
|
|
3395
3395
|
return !1;
|
|
3396
3396
|
}
|
|
3397
|
-
return e.type ===
|
|
3397
|
+
return e.type === _.CONTAINER ? jt.show(e, t) : yt.show(e, t);
|
|
3398
3398
|
}, ks = (e) => ({
|
|
3399
3399
|
...e,
|
|
3400
3400
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
@@ -3430,7 +3430,7 @@ const {
|
|
|
3430
3430
|
id: t.id,
|
|
3431
3431
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
3432
3432
|
fieldId: t.id,
|
|
3433
|
-
type:
|
|
3433
|
+
type: _.CONTAINER,
|
|
3434
3434
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
3435
3435
|
required: e.required,
|
|
3436
3436
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
@@ -3479,7 +3479,7 @@ const {
|
|
|
3479
3479
|
hideChildSectionTitles: o = !1,
|
|
3480
3480
|
optionalFieldPlaceholder: i
|
|
3481
3481
|
}) => {
|
|
3482
|
-
const l =
|
|
3482
|
+
const l = b.classBuilder(Uc, s), a = Ve(
|
|
3483
3483
|
() => t.map(
|
|
3484
3484
|
(u) => (
|
|
3485
3485
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
@@ -3491,25 +3491,25 @@ const {
|
|
|
3491
3491
|
let p = 0;
|
|
3492
3492
|
return u.flatMap((T, A) => {
|
|
3493
3493
|
let S = 0;
|
|
3494
|
-
const E = T.fields?.flatMap((y) => d.filter((
|
|
3495
|
-
if (!
|
|
3494
|
+
const E = T.fields?.flatMap((y) => d.filter((w) => w.fieldId === y).map((w) => {
|
|
3495
|
+
if (!w || !ve(w, { ...f.formData, ...r }))
|
|
3496
3496
|
return null;
|
|
3497
|
-
if (
|
|
3498
|
-
const L = Ze(f,
|
|
3497
|
+
if (w.type === _.CONTAINER) {
|
|
3498
|
+
const L = Ze(f, w, r);
|
|
3499
3499
|
return S += 1, // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
3500
3500
|
/* @__PURE__ */ m("div", { className: l("field"), style: { "--column": p + 1, "--row": S }, role: "list", children: L.map((C) => {
|
|
3501
|
-
const D = { ...r, [C.fieldId]: r[
|
|
3501
|
+
const D = { ...r, [C.fieldId]: r[w.fieldId]?.[C.fieldId] };
|
|
3502
3502
|
return vt(f, { ...C, label: C.key }, l, D, i);
|
|
3503
3503
|
}) }, y);
|
|
3504
3504
|
}
|
|
3505
|
-
if (
|
|
3506
|
-
const L = Hn({ ...f, formData: { ...f.formData, ...r } },
|
|
3505
|
+
if (w.type === _.COLLECTION) {
|
|
3506
|
+
const L = Hn({ ...f, formData: { ...f.formData, ...r } }, w, r[w.id]);
|
|
3507
3507
|
S += 1;
|
|
3508
3508
|
let C = 0;
|
|
3509
3509
|
return (
|
|
3510
3510
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
3511
3511
|
/* @__PURE__ */ m("div", { className: l("field"), style: { "--column": p + 1, "--row": S }, role: "list", children: L.map((D) => {
|
|
3512
|
-
const v = { ...r, [D.fieldId]: r[
|
|
3512
|
+
const v = { ...r, [D.fieldId]: r[w.fieldId]?.[D.fieldId] }, x = vt(f, { ...D, label: D.key }, l, v, i);
|
|
3513
3513
|
return D.type === "title" && (C += 1, C > 1) ? (
|
|
3514
3514
|
// eslint-disable-next-line react-x/no-missing-key -- FIXME
|
|
3515
3515
|
/* @__PURE__ */ m("div", { style: { marginTop: "40px" }, children: x })
|
|
@@ -3518,7 +3518,7 @@ const {
|
|
|
3518
3518
|
);
|
|
3519
3519
|
}
|
|
3520
3520
|
return S += 1, // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
3521
|
-
/* @__PURE__ */ m("div", { className: l("field"), style: { "--column": p + 1, "--row": S }, role: "list", children: vt(f,
|
|
3521
|
+
/* @__PURE__ */ m("div", { className: l("field"), style: { "--column": p + 1, "--row": S }, role: "list", children: vt(f, w, l, r, i) }, y);
|
|
3522
3522
|
})).filter((y) => !!y);
|
|
3523
3523
|
return !(A === u.length - 1) && E.length !== 0 ? (p += 2, [
|
|
3524
3524
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
@@ -3534,10 +3534,10 @@ const {
|
|
|
3534
3534
|
]) : E;
|
|
3535
3535
|
}).filter((T) => !!T);
|
|
3536
3536
|
};
|
|
3537
|
-
return e?.childPages?.filter((u) =>
|
|
3538
|
-
const d =
|
|
3537
|
+
return e?.childPages?.filter((u) => b.FormPage.show(u, { ...n, ...r })).map((u) => {
|
|
3538
|
+
const d = b.Component.elevateNested(u?.components, r);
|
|
3539
3539
|
return u.summaryLayout?.sections.map((f) => {
|
|
3540
|
-
if (f.show_when && !
|
|
3540
|
+
if (f.show_when && !b.Condition.meetsAll(f.show_when, { ...n, ...r }))
|
|
3541
3541
|
return null;
|
|
3542
3542
|
if (f.type === "childCollection") {
|
|
3543
3543
|
const T = a.find((S) => S.collection.name === f.collectionName), A = r[f.collectionName.split(".").pop()] || [];
|
|
@@ -3568,7 +3568,7 @@ const {
|
|
|
3568
3568
|
return (
|
|
3569
3569
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
3570
3570
|
/* @__PURE__ */ M("div", { className: l("section"), children: [
|
|
3571
|
-
!o && /* @__PURE__ */ m("h3", { className: l("section-title"), children:
|
|
3571
|
+
!o && /* @__PURE__ */ m("h3", { className: l("section-title"), children: b.FormPage.getConditionalText(f.title, { ...u.formData, ...r }) }),
|
|
3572
3572
|
/* @__PURE__ */ m("dl", { className: l("section-content"), style: { "--dividers": p.length - 1 }, children: c(p, d, u) })
|
|
3573
3573
|
] }, f.title)
|
|
3574
3574
|
);
|
|
@@ -3595,7 +3595,7 @@ const {
|
|
|
3595
3595
|
n.quickEdit ? bc(d, u, t) : null
|
|
3596
3596
|
),
|
|
3597
3597
|
[d, n, u, t, p]
|
|
3598
|
-
), { addErrors: E, resetQuickEditErrors: P, clearTopLevelErrorsForCard: y, validate: g } = Qe(), { hooks:
|
|
3598
|
+
), { addErrors: E, resetQuickEditErrors: P, clearTopLevelErrorsForCard: y, validate: g } = Qe(), { hooks: w } = Le(), L = async (C, D) => {
|
|
3599
3599
|
if (C.type === "cancel" && (T((v) => !v), P?.()), C.type === "save" && typeof l == "function") {
|
|
3600
3600
|
const v = {
|
|
3601
3601
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
@@ -3610,7 +3610,7 @@ const {
|
|
|
3610
3610
|
if (x.length)
|
|
3611
3611
|
return;
|
|
3612
3612
|
let I;
|
|
3613
|
-
await
|
|
3613
|
+
await w.onSubmit(
|
|
3614
3614
|
"quickEdit",
|
|
3615
3615
|
v,
|
|
3616
3616
|
() => {
|
|
@@ -3623,7 +3623,7 @@ const {
|
|
|
3623
3623
|
const Y = x.concat(I);
|
|
3624
3624
|
if (Y.length === 0 || Y.length === 1 && Y[0] === void 0) {
|
|
3625
3625
|
y();
|
|
3626
|
-
const R =
|
|
3626
|
+
const R = b.CollectionPage.getData(a, u), { isDuplicate: O, ...U } = R[t.index];
|
|
3627
3627
|
R[t.index] = { ...U, ...D }, l({
|
|
3628
3628
|
target: {
|
|
3629
3629
|
name: a,
|
|
@@ -3650,8 +3650,8 @@ const {
|
|
|
3650
3650
|
/* @__PURE__ */ M("div", { className: A("header"), children: [
|
|
3651
3651
|
/* @__PURE__ */ M("div", { className: A("header-content"), children: [
|
|
3652
3652
|
n.banners && /* @__PURE__ */ m(Fs, { id: `BannerStrip${t.id}`, banners: n.banners, formData: t }),
|
|
3653
|
-
/* @__PURE__ */ m("h2", { id: `${e}.titleText`, className: A("header-content-title"), children:
|
|
3654
|
-
n.details && /* @__PURE__ */ m("div", { id: `${e}.titleDetail`, className: A("header-content-detail"), children:
|
|
3653
|
+
/* @__PURE__ */ m("h2", { id: `${e}.titleText`, className: A("header-content-title"), children: b.FormPage.getTitle(n.title, t) }),
|
|
3654
|
+
n.details && /* @__PURE__ */ m("div", { id: `${e}.titleDetail`, className: A("header-content-detail"), children: b.FormPage.getConditionalText(n.details, t) })
|
|
3655
3655
|
] }),
|
|
3656
3656
|
/* @__PURE__ */ M("div", { className: A("header-actions"), children: [
|
|
3657
3657
|
n.quickEdit && /* @__PURE__ */ m(
|
|
@@ -3686,7 +3686,7 @@ const {
|
|
|
3686
3686
|
id: `${e}.deleteButton`,
|
|
3687
3687
|
onClick: () => o(t),
|
|
3688
3688
|
classModifiers: "secondary",
|
|
3689
|
-
"aria-label":
|
|
3689
|
+
"aria-label": b.FormPage.getConditionalText(n.deleteAction?.aria_label, t),
|
|
3690
3690
|
name: "Delete",
|
|
3691
3691
|
children: n.deleteAction?.label || kc
|
|
3692
3692
|
}
|
|
@@ -3700,7 +3700,7 @@ const {
|
|
|
3700
3700
|
i(t);
|
|
3701
3701
|
},
|
|
3702
3702
|
classModifiers: "secondary",
|
|
3703
|
-
"aria-label":
|
|
3703
|
+
"aria-label": b.FormPage.getConditionalText(n.duplicateAction?.aria_label, t),
|
|
3704
3704
|
name: "Duplicate",
|
|
3705
3705
|
autoFocus: n.focusOn,
|
|
3706
3706
|
children: n.duplicateAction?.label || Bc
|
|
@@ -3733,7 +3733,7 @@ const {
|
|
|
3733
3733
|
l((f) => (f ?? []).concat(d));
|
|
3734
3734
|
}, u = {
|
|
3735
3735
|
page: (d) => {
|
|
3736
|
-
const f =
|
|
3736
|
+
const f = b.Validate.page(d), p = s.onValidate(d, f);
|
|
3737
3737
|
return l(p), p;
|
|
3738
3738
|
}
|
|
3739
3739
|
};
|
|
@@ -3754,13 +3754,13 @@ const {
|
|
|
3754
3754
|
}) => {
|
|
3755
3755
|
const { hooks: i } = Le(), { errors: l, addErrors: a, clearErrors: c, queuedErrors: u, enqueueErrors: d, dequeueErrors: f } = Qe(), [p, T] = B(null), A = Ve(
|
|
3756
3756
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return -- FIXME
|
|
3757
|
-
() =>
|
|
3757
|
+
() => b.CollectionPage.getData(e.collectionName, t) || [],
|
|
3758
3758
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- FIXME
|
|
3759
3759
|
[t]
|
|
3760
3760
|
), S = Array.isArray(A) && A.length > 0 ? A.reduce((D, v) => v.isDuplicate && (!D || v.id > D.id) ? v : D, null) : null, E = Ve(
|
|
3761
3761
|
() => {
|
|
3762
3762
|
const D = e.collectionName.split(".");
|
|
3763
|
-
let v =
|
|
3763
|
+
let v = b.CollectionPage.mergePages(o || []) || [];
|
|
3764
3764
|
return D.reduce((x, I, Y) => {
|
|
3765
3765
|
const R = Y === 0 ? `${x}${I}` : `${x}.${I}`;
|
|
3766
3766
|
return Y === D.length - 1 ? v?.find((O) => O.collection?.name === R) || null : (v = v.find((O) => O.collection?.name === R)?.childPages || null, R);
|
|
@@ -3800,8 +3800,8 @@ const {
|
|
|
3800
3800
|
]
|
|
3801
3801
|
});
|
|
3802
3802
|
}
|
|
3803
|
-
},
|
|
3804
|
-
|
|
3803
|
+
}, w = (D) => {
|
|
3804
|
+
b.CollectionPage.duplicateEntry(
|
|
3805
3805
|
e.collectionName,
|
|
3806
3806
|
t,
|
|
3807
3807
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
@@ -3814,19 +3814,19 @@ const {
|
|
|
3814
3814
|
target: {
|
|
3815
3815
|
name: v,
|
|
3816
3816
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
3817
|
-
value:
|
|
3817
|
+
value: b.CollectionPage.getData(v, t)
|
|
3818
3818
|
}
|
|
3819
3819
|
}), y());
|
|
3820
3820
|
}, L = () => {
|
|
3821
3821
|
if (!p)
|
|
3822
3822
|
return;
|
|
3823
|
-
|
|
3823
|
+
b.CollectionPage.removeEntry(e.collectionName, t, p.id);
|
|
3824
3824
|
const D = e.collectionName.split(".").shift();
|
|
3825
3825
|
typeof s == "function" && s({
|
|
3826
3826
|
target: {
|
|
3827
3827
|
name: D,
|
|
3828
3828
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
3829
|
-
value:
|
|
3829
|
+
value: b.CollectionPage.getData(D, t)
|
|
3830
3830
|
}
|
|
3831
3831
|
}), T(null), y();
|
|
3832
3832
|
}, C = (D) => {
|
|
@@ -3850,8 +3850,8 @@ const {
|
|
|
3850
3850
|
Tc,
|
|
3851
3851
|
{
|
|
3852
3852
|
id: `${e.fieldId}.confirmation`,
|
|
3853
|
-
message:
|
|
3854
|
-
confirmLabel:
|
|
3853
|
+
message: b.interpolateString(e.confirmation?.message, { ...p, index: p.index + 1 }) || null,
|
|
3854
|
+
confirmLabel: b.interpolateString(e.confirmation?.label, p) || null,
|
|
3855
3855
|
onConfirm: L,
|
|
3856
3856
|
onCancel: () => T(null),
|
|
3857
3857
|
children: e.card.listView ? /* @__PURE__ */ m("div", { className: "confirmation-content", children: e.confirmation?.displayFields.map(C) }) : /* @__PURE__ */ m(
|
|
@@ -3874,7 +3874,7 @@ const {
|
|
|
3874
3874
|
action: {
|
|
3875
3875
|
collection: e.collectionName,
|
|
3876
3876
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
3877
|
-
label:
|
|
3877
|
+
label: b.interpolateString(e.addButton.label || Sr, { documents: A }),
|
|
3878
3878
|
page: e.addButton.page,
|
|
3879
3879
|
type: It.COLLECTION_ADD,
|
|
3880
3880
|
classModifiers: ["secondary"]
|
|
@@ -3910,7 +3910,7 @@ const {
|
|
|
3910
3910
|
masterPage: E,
|
|
3911
3911
|
config: I || {},
|
|
3912
3912
|
onFullEdit: g,
|
|
3913
|
-
onDuplicate:
|
|
3913
|
+
onDuplicate: w,
|
|
3914
3914
|
onDelete: () => T({ ...D, index: v }),
|
|
3915
3915
|
onQuickEdit: (R) => (y(), r(R)),
|
|
3916
3916
|
parentCollectionName: e.collectionName.split(".").shift(),
|
|
@@ -3932,7 +3932,7 @@ const {
|
|
|
3932
3932
|
action: {
|
|
3933
3933
|
collection: e.collectionName,
|
|
3934
3934
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
3935
|
-
label:
|
|
3935
|
+
label: b.interpolateString(e.addButton.label || Sr, { documents: A }),
|
|
3936
3936
|
page: e.addButton.page,
|
|
3937
3937
|
type: It.COLLECTION_ADD,
|
|
3938
3938
|
classModifiers: ["secondary"],
|
|
@@ -3959,7 +3959,7 @@ const {
|
|
|
3959
3959
|
});
|
|
3960
3960
|
}, c = ({ target: A }) => {
|
|
3961
3961
|
if (typeof r == "function")
|
|
3962
|
-
if (A.name ===
|
|
3962
|
+
if (A.name === b.Meta.name)
|
|
3963
3963
|
r({ target: A });
|
|
3964
3964
|
else {
|
|
3965
3965
|
const S = i.findIndex((E) => E.id === A.name);
|
|
@@ -3988,17 +3988,17 @@ const {
|
|
|
3988
3988
|
const p = {
|
|
3989
3989
|
...ze,
|
|
3990
3990
|
...e.labels
|
|
3991
|
-
}, T =
|
|
3991
|
+
}, T = b.classBuilder(qc, [], e.className);
|
|
3992
3992
|
return /* @__PURE__ */ M("div", { className: T(), id: e.id, children: [
|
|
3993
3993
|
e.label && /* @__PURE__ */ m(ln, { id: e.id, required: e.required, className: T("title"), children: e.label }),
|
|
3994
3994
|
Array.isArray(i) && i.map((A, S) => {
|
|
3995
|
-
const E = `${e.full_path || e.fieldId}[${S}]`, P = (e.countOffset || 0) + S + 1, y =
|
|
3995
|
+
const E = `${e.full_path || e.fieldId}[${S}]`, P = (e.countOffset || 0) + S + 1, y = b.interpolateString(p.item, { ...A, index: P }), g = b.interpolateString(p.remove, { ...A, index: P }), w = e.disableAddAndRemove || S === 0 && e.minimumEntries ? "" : e.removeLocation ?? "start", L = S !== 0 && e.subsequentItemStyle ? e.subsequentItemStyle : {};
|
|
3996
3996
|
return (
|
|
3997
3997
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
3998
3998
|
/* @__PURE__ */ M("div", { className: `${T("item")}`, style: L, children: [
|
|
3999
3999
|
/* @__PURE__ */ M(ln, { id: A.id, required: !0, className: T("item-title"), children: [
|
|
4000
4000
|
y,
|
|
4001
|
-
|
|
4001
|
+
w === "start" && /* @__PURE__ */ m(Ce, { onClick: () => d(A), classModifiers: "secondary", children: g })
|
|
4002
4002
|
] }),
|
|
4003
4003
|
/* @__PURE__ */ m(
|
|
4004
4004
|
ho,
|
|
@@ -4021,7 +4021,7 @@ const {
|
|
|
4021
4021
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
4022
4022
|
hint: x,
|
|
4023
4023
|
readonly: !!(e?.readonly || C.readonly),
|
|
4024
|
-
label:
|
|
4024
|
+
label: b.interpolateString(I, { ...A, index: P }),
|
|
4025
4025
|
full_path: `${E}.${C.fieldId}`
|
|
4026
4026
|
};
|
|
4027
4027
|
})
|
|
@@ -4033,7 +4033,7 @@ const {
|
|
|
4033
4033
|
wrap: o
|
|
4034
4034
|
}
|
|
4035
4035
|
),
|
|
4036
|
-
|
|
4036
|
+
w === "end" && /* @__PURE__ */ m(on, { className: "govuk-!-margin-top-2", children: /* @__PURE__ */ m(Ce, { onClick: () => d(A), classModifiers: "secondary", children: g }) })
|
|
4037
4037
|
] }, A.id)
|
|
4038
4038
|
);
|
|
4039
4039
|
}),
|
|
@@ -4050,7 +4050,7 @@ const {
|
|
|
4050
4050
|
return n.properties && (r.propsInError = n.properties), r;
|
|
4051
4051
|
}
|
|
4052
4052
|
}
|
|
4053
|
-
}, Wc = [
|
|
4053
|
+
}, Wc = [_.RADIOS, _.CHECKBOXES, _.DATE, _.TIME], zc = (e) => e.fieldset || Wc.includes(e.type), At = ({
|
|
4054
4054
|
component: e,
|
|
4055
4055
|
value: t = null,
|
|
4056
4056
|
formData: n = null,
|
|
@@ -4066,12 +4066,12 @@ const {
|
|
|
4066
4066
|
X(() => {
|
|
4067
4067
|
p === Dt && A(f);
|
|
4068
4068
|
}, [e, f, p]);
|
|
4069
|
-
const S = ({ target: y }) => typeof o == "function" ? (e.type ===
|
|
4069
|
+
const S = ({ target: y }) => typeof o == "function" ? (e.type === _.EMAIL && (y.value = y.value.trim()), e.type === _.CHECKBOXES && // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
4070
4070
|
Array.isArray(y.value) && y.value.forEach((g) => {
|
|
4071
4071
|
g.children && g.nested && (delete g.children, delete g.nested);
|
|
4072
|
-
}), y = Gc(y, e, f), e.type ===
|
|
4072
|
+
}), y = Gc(y, e, f), e.type === _.SELECT && y.value === "" && (y.value = null, y.label = null), o({ target: y }), !0) : !1;
|
|
4073
4073
|
if (X(() => {
|
|
4074
|
-
const y =
|
|
4074
|
+
const y = b.Component.defaultValue(e, n);
|
|
4075
4075
|
!t && !n?.[e.fieldId] && y && typeof S == "function" && S({
|
|
4076
4076
|
target: {
|
|
4077
4077
|
name: e.fieldId,
|
|
@@ -4079,7 +4079,7 @@ const {
|
|
|
4079
4079
|
value: y
|
|
4080
4080
|
}
|
|
4081
4081
|
});
|
|
4082
|
-
}, []), e.type ===
|
|
4082
|
+
}, []), e.type === _.CONTAINER) {
|
|
4083
4083
|
let y = /* @__PURE__ */ m(
|
|
4084
4084
|
ho,
|
|
4085
4085
|
{
|
|
@@ -4088,7 +4088,7 @@ const {
|
|
|
4088
4088
|
wrap: r,
|
|
4089
4089
|
onChange: S,
|
|
4090
4090
|
onTopLevelChange: i,
|
|
4091
|
-
value: t ||
|
|
4091
|
+
value: t || b.Component.defaultValue(e, n),
|
|
4092
4092
|
formData: n
|
|
4093
4093
|
}
|
|
4094
4094
|
);
|
|
@@ -4097,7 +4097,7 @@ const {
|
|
|
4097
4097
|
y
|
|
4098
4098
|
)), y;
|
|
4099
4099
|
}
|
|
4100
|
-
if (e.type ===
|
|
4100
|
+
if (e.type === _.COLLECTION)
|
|
4101
4101
|
return /* @__PURE__ */ m(
|
|
4102
4102
|
jc,
|
|
4103
4103
|
{
|
|
@@ -4106,11 +4106,11 @@ const {
|
|
|
4106
4106
|
wrap: r,
|
|
4107
4107
|
onChange: S,
|
|
4108
4108
|
onTopLevelChange: i,
|
|
4109
|
-
value: t ||
|
|
4109
|
+
value: t || b.Component.defaultValue(e, n),
|
|
4110
4110
|
formData: n
|
|
4111
4111
|
}
|
|
4112
4112
|
);
|
|
4113
|
-
if (e.type ===
|
|
4113
|
+
if (e.type === _.COLLECTION_SUMMARY)
|
|
4114
4114
|
return (
|
|
4115
4115
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call -- FIXME
|
|
4116
4116
|
lt(
|
|
@@ -4135,14 +4135,14 @@ const {
|
|
|
4135
4135
|
const E = (y) => {
|
|
4136
4136
|
let g = e.full_path || e.fieldId;
|
|
4137
4137
|
if (e.pageCollection) {
|
|
4138
|
-
const
|
|
4139
|
-
g = `${`${e.pageCollection.name}[${
|
|
4138
|
+
const w = b.CollectionPage.getActiveIndex(e.pageCollection.name, n);
|
|
4139
|
+
g = `${`${e.pageCollection.name}[${w}]`}.${g}`;
|
|
4140
4140
|
}
|
|
4141
4141
|
i({
|
|
4142
4142
|
target: {
|
|
4143
|
-
name:
|
|
4143
|
+
name: b.Meta.name,
|
|
4144
4144
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
4145
|
-
value:
|
|
4145
|
+
value: b.Meta.documents.setForField(
|
|
4146
4146
|
y,
|
|
4147
4147
|
n,
|
|
4148
4148
|
g,
|
|
@@ -4152,11 +4152,11 @@ const {
|
|
|
4152
4152
|
});
|
|
4153
4153
|
}, P = ({ target: y }) => {
|
|
4154
4154
|
if (S({ target: y })) {
|
|
4155
|
-
if (e.type ===
|
|
4155
|
+
if (e.type === _.FILE)
|
|
4156
4156
|
E([y.value]);
|
|
4157
|
-
else if (e.type ===
|
|
4158
|
-
const g = y.value.map((
|
|
4159
|
-
...
|
|
4157
|
+
else if (e.type === _.MULTI_FILE) {
|
|
4158
|
+
const g = y.value.map((w, L) => ({
|
|
4159
|
+
...w,
|
|
4160
4160
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
4161
4161
|
indexInField: L
|
|
4162
4162
|
}));
|
|
@@ -4164,7 +4164,7 @@ const {
|
|
|
4164
4164
|
}
|
|
4165
4165
|
}
|
|
4166
4166
|
};
|
|
4167
|
-
return
|
|
4167
|
+
return b.Component.get(
|
|
4168
4168
|
{
|
|
4169
4169
|
...c,
|
|
4170
4170
|
...e,
|
|
@@ -4173,11 +4173,11 @@ const {
|
|
|
4173
4173
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
4174
4174
|
fieldset: zc(e),
|
|
4175
4175
|
disabled: Kc(e.disabled, n),
|
|
4176
|
-
label:
|
|
4177
|
-
content:
|
|
4178
|
-
hint:
|
|
4179
|
-
cya_label:
|
|
4180
|
-
suffix:
|
|
4176
|
+
label: b.interpolateString(e.label, n),
|
|
4177
|
+
content: b.interpolateString(e.content, n),
|
|
4178
|
+
hint: b.interpolateString(e.hint, n),
|
|
4179
|
+
cya_label: b.interpolateString(e.cya_label, n),
|
|
4180
|
+
suffix: b.interpolateString(e.suffix, n),
|
|
4181
4181
|
options: T,
|
|
4182
4182
|
value: t,
|
|
4183
4183
|
onChange: P,
|
|
@@ -4191,20 +4191,20 @@ const {
|
|
|
4191
4191
|
u.onGetComponent
|
|
4192
4192
|
);
|
|
4193
4193
|
}, Xc = [
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4194
|
+
_.AUTOCOMPLETE,
|
|
4195
|
+
_.CALCULATION,
|
|
4196
|
+
_.CHECKBOXES,
|
|
4197
|
+
_.COLLECTION_SUMMARY,
|
|
4198
|
+
_.DATE,
|
|
4199
|
+
_.EMAIL,
|
|
4200
|
+
_.FILE,
|
|
4201
|
+
_.MULTI_FILE,
|
|
4202
|
+
_.PHONE_NUMBER,
|
|
4203
|
+
_.RADIOS,
|
|
4204
|
+
_.SELECT,
|
|
4205
|
+
_.TEXT,
|
|
4206
|
+
_.TEXT_AREA,
|
|
4207
|
+
_.TIME
|
|
4208
4208
|
], Bs = (e) => (
|
|
4209
4209
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
4210
4210
|
Xc.includes(e?.type) || // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
@@ -4260,7 +4260,7 @@ const {
|
|
|
4260
4260
|
className: s(),
|
|
4261
4261
|
tagName: n,
|
|
4262
4262
|
content: o,
|
|
4263
|
-
type:
|
|
4263
|
+
type: _.HTML
|
|
4264
4264
|
});
|
|
4265
4265
|
}, uu = (e) => {
|
|
4266
4266
|
const t = ne(e);
|
|
@@ -4268,7 +4268,7 @@ const {
|
|
|
4268
4268
|
className: Qc,
|
|
4269
4269
|
...t,
|
|
4270
4270
|
tagName: "p",
|
|
4271
|
-
type:
|
|
4271
|
+
type: _.HTML
|
|
4272
4272
|
});
|
|
4273
4273
|
}, du = (e) => {
|
|
4274
4274
|
let t = [];
|
|
@@ -4301,45 +4301,45 @@ const {
|
|
|
4301
4301
|
return /* @__PURE__ */ m(Po, { ...t, children: e.content });
|
|
4302
4302
|
}, Au = (e) => {
|
|
4303
4303
|
switch (e.type) {
|
|
4304
|
-
case
|
|
4304
|
+
case _.HTML:
|
|
4305
4305
|
return Wt(e);
|
|
4306
|
-
case
|
|
4306
|
+
case _.HEADING:
|
|
4307
4307
|
return lu(e);
|
|
4308
|
-
case
|
|
4308
|
+
case _.INSET_TEXT:
|
|
4309
4309
|
return au(e);
|
|
4310
|
-
case
|
|
4311
|
-
case
|
|
4312
|
-
case
|
|
4310
|
+
case _.TEXT:
|
|
4311
|
+
case _.EMAIL:
|
|
4312
|
+
case _.PHONE_NUMBER:
|
|
4313
4313
|
return hu(e);
|
|
4314
|
-
case
|
|
4314
|
+
case _.TEXT_AREA:
|
|
4315
4315
|
return fu(e);
|
|
4316
|
-
case
|
|
4316
|
+
case _.AUTOCOMPLETE:
|
|
4317
4317
|
return eu(e);
|
|
4318
|
-
case
|
|
4318
|
+
case _.RADIOS:
|
|
4319
4319
|
return du(e);
|
|
4320
|
-
case
|
|
4320
|
+
case _.CHECKBOXES:
|
|
4321
4321
|
return tu(e);
|
|
4322
|
-
case
|
|
4322
|
+
case _.DATE:
|
|
4323
4323
|
return ru(e);
|
|
4324
|
-
case
|
|
4324
|
+
case _.TIME:
|
|
4325
4325
|
return mu(e);
|
|
4326
|
-
case
|
|
4326
|
+
case _.FILE:
|
|
4327
4327
|
return ou(e);
|
|
4328
|
-
case
|
|
4328
|
+
case _.MULTI_FILE:
|
|
4329
4329
|
return iu(e);
|
|
4330
|
-
case
|
|
4330
|
+
case _.WARNING:
|
|
4331
4331
|
return Eu(e);
|
|
4332
|
-
case
|
|
4332
|
+
case _.SELECT:
|
|
4333
4333
|
return pu(e);
|
|
4334
|
-
case
|
|
4334
|
+
case _.DETAILS:
|
|
4335
4335
|
return su(e);
|
|
4336
|
-
case
|
|
4336
|
+
case _.CALCULATION:
|
|
4337
4337
|
return nu(e);
|
|
4338
|
-
case
|
|
4338
|
+
case _.ALERT:
|
|
4339
4339
|
return Zc(e);
|
|
4340
|
-
case
|
|
4340
|
+
case _.PARAGRAPH:
|
|
4341
4341
|
return uu(e);
|
|
4342
|
-
case
|
|
4342
|
+
case _.LIST:
|
|
4343
4343
|
return cu(e);
|
|
4344
4344
|
default:
|
|
4345
4345
|
return null;
|
|
@@ -4385,9 +4385,9 @@ const {
|
|
|
4385
4385
|
const o = typeof n.sourced[s] == "string" && se(t, n.sourced[s]);
|
|
4386
4386
|
return o === void 0 && n.skipIfSourceInvalid ? (r = null, !1) : (r[s] = o || n.sourced[s], !0);
|
|
4387
4387
|
})), r;
|
|
4388
|
-
}, Vs = (e, t) => Tu(e) ? e.type ===
|
|
4389
|
-
[
|
|
4390
|
-
[
|
|
4388
|
+
}, Vs = (e, t) => Tu(e) ? e.type === _.DATE ? Su(e) : (e.defaultObjectValue ? Cu(e.defaultObjectValue, t) : null) || e.defaultValue || null : null, gu = {
|
|
4389
|
+
[_.COLLECTION]: [],
|
|
4390
|
+
[_.CONTAINER]: {}
|
|
4391
4391
|
}, wu = (e, t) => e && (Vs(e, t) || gu[e.type]) || "", yt = {
|
|
4392
4392
|
clean: ne,
|
|
4393
4393
|
defaultValue: wu,
|
|
@@ -4435,13 +4435,13 @@ const {
|
|
|
4435
4435
|
if (a)
|
|
4436
4436
|
return a;
|
|
4437
4437
|
}
|
|
4438
|
-
return i.type ===
|
|
4438
|
+
return i.type === _.CONTAINER ? Ze(e, i, { ...l, ...n }, r, s) : i.type === _.COLLECTION ? Hn(e, i, l, r, s) : zt({ ...e, formData: n }, i, r);
|
|
4439
4439
|
}) : null, _u = (e) => {
|
|
4440
4440
|
if (!e.conditionalProperties)
|
|
4441
4441
|
return e;
|
|
4442
4442
|
let t = { ...e };
|
|
4443
4443
|
return e.conditionalProperties.forEach((n) => {
|
|
4444
|
-
|
|
4444
|
+
b.Condition.met(n.condition, e.formData[n.condition.field]) && (t = Object.assign(t, n.properties));
|
|
4445
4445
|
}), t;
|
|
4446
4446
|
}, Cr = (e, t, n = "text") => {
|
|
4447
4447
|
if (typeof e == "string")
|
|
@@ -4468,7 +4468,7 @@ const {
|
|
|
4468
4468
|
}).filter((t) => !!t);
|
|
4469
4469
|
}, Ou = (e) => (
|
|
4470
4470
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
4471
|
-
{ type:
|
|
4471
|
+
{ type: _.HTML, tagName: "p", content: e }
|
|
4472
4472
|
), Ru = (e, t) => {
|
|
4473
4473
|
const n = e.use.split("."), r = n.shift();
|
|
4474
4474
|
let s = JSON.parse(JSON.stringify({ ...t.find((l) => l.id === r) })), o = s, i = s;
|
|
@@ -4497,7 +4497,7 @@ const {
|
|
|
4497
4497
|
if (typeof o == "string")
|
|
4498
4498
|
return Ou(o);
|
|
4499
4499
|
let i;
|
|
4500
|
-
return o.type ===
|
|
4500
|
+
return o.type === _.CONTAINER && (o.components = o.components.map((l) => l.use ? Cn(l, t) : l)), o.use ? i = Cn(o, t) : i = { ...o }, n ? pe.refData.setupUrl(i, n) : i;
|
|
4501
4501
|
}), s = Iu(e);
|
|
4502
4502
|
return jt.setup({
|
|
4503
4503
|
...e,
|
|
@@ -4699,7 +4699,7 @@ const {
|
|
|
4699
4699
|
id: t.id,
|
|
4700
4700
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
4701
4701
|
fieldId: t.id,
|
|
4702
|
-
type:
|
|
4702
|
+
type: _.CONTAINER,
|
|
4703
4703
|
required: !0,
|
|
4704
4704
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
4705
4705
|
full_path: r,
|
|
@@ -4868,9 +4868,9 @@ const {
|
|
|
4868
4868
|
return i;
|
|
4869
4869
|
}
|
|
4870
4870
|
switch (o.type) {
|
|
4871
|
-
case
|
|
4871
|
+
case _.CONTAINER:
|
|
4872
4872
|
return Ze(e, o, e.formData[o.fieldId], t, n);
|
|
4873
|
-
case
|
|
4873
|
+
case _.COLLECTION:
|
|
4874
4874
|
return Hn(e, o, e.formData[o.fieldId], t, n);
|
|
4875
4875
|
default:
|
|
4876
4876
|
return zt(e, o, t);
|
|
@@ -5301,24 +5301,24 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5301
5301
|
const r = n || t;
|
|
5302
5302
|
if (!ve(e, { ...r, ...t }))
|
|
5303
5303
|
return;
|
|
5304
|
-
if (e.type ===
|
|
5304
|
+
if (e.type === _.CONTAINER)
|
|
5305
5305
|
return $t(e, t, r);
|
|
5306
5306
|
let s, o, l = (t && typeof t == "object" ? t : {})[e.fieldId];
|
|
5307
|
-
if (e.type ===
|
|
5307
|
+
if (e.type === _.COLLECTION_SUMMARY && (l = et(e.collectionName, r)), e.required && (!e.requiredOverrideConditions || !Xd(e.requiredOverrideConditions, r)) && (s = co(l, e.label, e.custom_errors)), !s) {
|
|
5308
5308
|
switch (e.type) {
|
|
5309
|
-
case
|
|
5309
|
+
case _.COLLECTION:
|
|
5310
5310
|
return jd(e, l, r);
|
|
5311
|
-
case
|
|
5311
|
+
case _.EMAIL:
|
|
5312
5312
|
s = io(l, e.label, e.custom_errors);
|
|
5313
5313
|
break;
|
|
5314
|
-
case
|
|
5315
|
-
case
|
|
5316
|
-
const a = e.type ===
|
|
5314
|
+
case _.DATE:
|
|
5315
|
+
case _.TIME: {
|
|
5316
|
+
const a = e.type === _.DATE ? oo : fo, { message: c, propsInError: u } = a(l);
|
|
5317
5317
|
o = u, s = c;
|
|
5318
5318
|
break;
|
|
5319
5319
|
}
|
|
5320
|
-
case
|
|
5321
|
-
case
|
|
5320
|
+
case _.CHECKBOXES:
|
|
5321
|
+
case _.RADIOS: {
|
|
5322
5322
|
let a = [];
|
|
5323
5323
|
if (e.data.options?.forEach((c) => {
|
|
5324
5324
|
c.nested && dt(n[e.id], c) && (a = a.concat($t({ components: c.nested }, n)));
|
|
@@ -5326,10 +5326,10 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5326
5326
|
return a;
|
|
5327
5327
|
break;
|
|
5328
5328
|
}
|
|
5329
|
-
case
|
|
5329
|
+
case _.MULTI_FILE:
|
|
5330
5330
|
s = lo(l, e.custom_errors);
|
|
5331
5331
|
break;
|
|
5332
|
-
case
|
|
5332
|
+
case _.TEXT_AREA:
|
|
5333
5333
|
s = uo(
|
|
5334
5334
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument -- FIXME
|
|
5335
5335
|
e.label,
|
|
@@ -5341,7 +5341,7 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5341
5341
|
);
|
|
5342
5342
|
break;
|
|
5343
5343
|
}
|
|
5344
|
-
!s && e.pattern && (s = ao(l, e.label, e.pattern, e.custom_errors)), !s && e.additionalValidation && (s = so(e, l, n), e.type ===
|
|
5344
|
+
!s && e.pattern && (s = ao(l, e.label, e.pattern, e.custom_errors)), !s && e.additionalValidation && (s = so(e, l, n), e.type === _.DATE && s && (o = { day: !0, month: !0, year: !0 }));
|
|
5345
5345
|
}
|
|
5346
5346
|
if (s)
|
|
5347
5347
|
return {
|
|
@@ -5388,7 +5388,7 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5388
5388
|
required: co,
|
|
5389
5389
|
textarea: uo,
|
|
5390
5390
|
time: fo
|
|
5391
|
-
},
|
|
5391
|
+
}, b = {
|
|
5392
5392
|
CheckYourAnswers: td,
|
|
5393
5393
|
CollectionPage: Mt,
|
|
5394
5394
|
Component: yt,
|
|
@@ -5413,7 +5413,7 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5413
5413
|
}) => {
|
|
5414
5414
|
const l = ({ target: d }) => {
|
|
5415
5415
|
if (typeof r == "function")
|
|
5416
|
-
if (d.name ===
|
|
5416
|
+
if (d.name === b.Meta.name)
|
|
5417
5417
|
r({ target: d });
|
|
5418
5418
|
else {
|
|
5419
5419
|
const f = { ...t, [d.name]: d.value };
|
|
@@ -5424,12 +5424,12 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5424
5424
|
}
|
|
5425
5425
|
}, a = (d) => {
|
|
5426
5426
|
const f = `${e.full_path || e.fieldId}.${d.fieldId}`;
|
|
5427
|
-
return d.type ===
|
|
5428
|
-
}, c =
|
|
5427
|
+
return d.type === _.CONTAINER ? b.Container.show({ ...d, full_path: f }, n) : b.Component.show({ ...d, full_path: f }, { ...n, ...se(n, e.full_path) });
|
|
5428
|
+
}, c = b.classBuilder(Zd, [], e.className), u = F.cleanHtmlAttributes(i);
|
|
5429
5429
|
return /* @__PURE__ */ M("div", { ...u, className: c(), id: e.id, children: [
|
|
5430
5430
|
e.title && /* @__PURE__ */ m(xe, { children: e.title }),
|
|
5431
5431
|
e.components && e.components.filter(a).map((d, f) => {
|
|
5432
|
-
const p = d.type ===
|
|
5432
|
+
const p = d.type === _.FILE ? {} : "", T = t ? t[d.fieldId] : p, A = `${e.full_path || e.fieldId}.${d.fieldId}`;
|
|
5433
5433
|
return /* @__PURE__ */ m(
|
|
5434
5434
|
At,
|
|
5435
5435
|
{
|
|
@@ -5572,9 +5572,9 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5572
5572
|
hideBlankRows: A = !1,
|
|
5573
5573
|
optionalFieldPlaceholder: S
|
|
5574
5574
|
}) => {
|
|
5575
|
-
const [E, P] = B([]), [y, g] = B([]), { errors:
|
|
5575
|
+
const [E, P] = B([]), [y, g] = B([]), { errors: w } = Qe(), { hooks: L } = Le();
|
|
5576
5576
|
X(() => {
|
|
5577
|
-
const O = (q, Z) =>
|
|
5577
|
+
const O = (q, Z) => b.CheckYourAnswers.getRows(q, o, L.onGetCYARows).map((K, j) => ({
|
|
5578
5578
|
...K,
|
|
5579
5579
|
value: /* @__PURE__ */ m(
|
|
5580
5580
|
kn,
|
|
@@ -5586,7 +5586,7 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5586
5586
|
},
|
|
5587
5587
|
`${Z}_${j}`
|
|
5588
5588
|
)
|
|
5589
|
-
})), H =
|
|
5589
|
+
})), H = b.CollectionPage.mergePages(n).map((q, Z) => {
|
|
5590
5590
|
const W = O(q, Z);
|
|
5591
5591
|
return W?.length ? { ...q, rows: W } : null;
|
|
5592
5592
|
}).filter((q) => !!q);
|
|
@@ -5616,7 +5616,7 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5616
5616
|
noGroupAction: d,
|
|
5617
5617
|
groups: f,
|
|
5618
5618
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
5619
|
-
errors:
|
|
5619
|
+
errors: w,
|
|
5620
5620
|
sections: p,
|
|
5621
5621
|
type: T
|
|
5622
5622
|
});
|
|
@@ -5628,21 +5628,21 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5628
5628
|
), I = (O) => f?.find((U) => U.pageId === O), Y = (O, U) => {
|
|
5629
5629
|
if (!O.cya_link?.singleChangeLink || u)
|
|
5630
5630
|
return /* @__PURE__ */ M(De, { children: [
|
|
5631
|
-
U === "s" && /* @__PURE__ */ m(at, { children:
|
|
5632
|
-
U === "m" && /* @__PURE__ */ m(xe, { children:
|
|
5631
|
+
U === "s" && /* @__PURE__ */ m(at, { children: b.FormPage.getTitle(O.title, O.formData) }),
|
|
5632
|
+
U === "m" && /* @__PURE__ */ m(xe, { children: b.FormPage.getTitle(O.title, O.formData) })
|
|
5633
5633
|
] });
|
|
5634
5634
|
const H = Kt(!1, O, o);
|
|
5635
5635
|
return /* @__PURE__ */ M("div", { className: "heading-with-action", children: [
|
|
5636
5636
|
/* @__PURE__ */ M("div", { className: "heading-text", children: [
|
|
5637
|
-
U === "s" && /* @__PURE__ */ m(at, { children:
|
|
5638
|
-
U === "m" && /* @__PURE__ */ m(xe, { children:
|
|
5637
|
+
U === "s" && /* @__PURE__ */ m(at, { children: b.FormPage.getTitle(O.title, O.formData) }),
|
|
5638
|
+
U === "m" && /* @__PURE__ */ m(xe, { children: b.FormPage.getTitle(O.title, O.formData) })
|
|
5639
5639
|
] }),
|
|
5640
5640
|
/* @__PURE__ */ m("div", { className: "heading-action", children: /* @__PURE__ */ m(Yn, { row: { action: H } }) })
|
|
5641
5641
|
] });
|
|
5642
|
-
}, R = () => Array.from(new Set(
|
|
5642
|
+
}, R = () => Array.from(new Set(w.map((U) => U.id))).map((U) => w.find((H) => H.id === U));
|
|
5643
5643
|
return /* @__PURE__ */ M("div", { className: sf, children: [
|
|
5644
5644
|
e && !a && /* @__PURE__ */ m(Bt, { size: t, children: e }, "heading"),
|
|
5645
|
-
|
|
5645
|
+
w && w.length > 0 && /* @__PURE__ */ m(Dr, { errors: R() }),
|
|
5646
5646
|
T === oe.TASK_CYA && E.length > 0 && p && p.map(
|
|
5647
5647
|
(O) => O.tasks.filter((U) => U.state !== G.TYPES.SKIPPED).map((U, H) => {
|
|
5648
5648
|
const q = E.filter(
|
|
@@ -5686,7 +5686,7 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5686
5686
|
// eslint-disable-next-line react-x/no-array-index-key -- FIXME
|
|
5687
5687
|
/* @__PURE__ */ M(Pt, { children: [
|
|
5688
5688
|
Z && Y(O, "m"),
|
|
5689
|
-
K && /* @__PURE__ */ m("div", { className: "group-title", children: /* @__PURE__ */ m(xe, { children: K.title ||
|
|
5689
|
+
K && /* @__PURE__ */ m("div", { className: "group-title", children: /* @__PURE__ */ m(xe, { children: K.title || b.FormPage.getTitle(O.title, O.formData) }) }),
|
|
5690
5690
|
/* @__PURE__ */ m(
|
|
5691
5691
|
wr,
|
|
5692
5692
|
{
|
|
@@ -5704,7 +5704,7 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5704
5704
|
!l && /* @__PURE__ */ m(
|
|
5705
5705
|
vs,
|
|
5706
5706
|
{
|
|
5707
|
-
actions: r?.filter((O) =>
|
|
5707
|
+
actions: r?.filter((O) => b.Component.show(O, n[n.length - 1].formData)),
|
|
5708
5708
|
onAction: (O) => s(O)
|
|
5709
5709
|
}
|
|
5710
5710
|
)
|
|
@@ -5721,36 +5721,36 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5721
5721
|
submitting: a = !1
|
|
5722
5722
|
}) => {
|
|
5723
5723
|
const [c, u] = B({});
|
|
5724
|
-
let d =
|
|
5724
|
+
let d = b.CollectionPage.getData(e.collection.name, e.formData) || [];
|
|
5725
5725
|
const f = e.collection.name.split(".").pop();
|
|
5726
|
-
let p =
|
|
5727
|
-
const T = e, A = ({ target:
|
|
5728
|
-
|
|
5726
|
+
let p = b.CollectionPage.getActiveIndex(e.collection.name, e.formData);
|
|
5727
|
+
const T = e, A = ({ target: w }) => {
|
|
5728
|
+
b.CollectionPage.setData(T.collection.name, w.value, e.formData), d = w.value;
|
|
5729
5729
|
const L = e.collection.name.split(".").shift();
|
|
5730
5730
|
u((C) => ({
|
|
5731
5731
|
...C,
|
|
5732
5732
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
5733
|
-
[L]:
|
|
5733
|
+
[L]: b.CollectionPage.getData(L, e.formData)
|
|
5734
5734
|
}));
|
|
5735
|
-
}, S = ({ target:
|
|
5736
|
-
T.formData[
|
|
5735
|
+
}, S = ({ target: w }) => {
|
|
5736
|
+
T.formData[w.name] = w.value, u((L) => ({
|
|
5737
5737
|
...L,
|
|
5738
5738
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
5739
|
-
[
|
|
5739
|
+
[w.name]: w.value
|
|
5740
5740
|
}));
|
|
5741
|
-
}, E = (
|
|
5741
|
+
}, E = (w) => {
|
|
5742
5742
|
A({
|
|
5743
5743
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
5744
|
-
target: { value:
|
|
5744
|
+
target: { value: w }
|
|
5745
5745
|
}), typeof n == "function" && n(e.formData);
|
|
5746
|
-
}, P = (
|
|
5746
|
+
}, P = (w) => {
|
|
5747
5747
|
p = d.length, S({
|
|
5748
5748
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME
|
|
5749
|
-
target: { name: `${f}ActiveId`, value:
|
|
5749
|
+
target: { name: `${f}ActiveId`, value: w }
|
|
5750
5750
|
});
|
|
5751
|
-
}, y = (
|
|
5752
|
-
r(
|
|
5753
|
-
}, g = ({ target:
|
|
5751
|
+
}, y = (w) => {
|
|
5752
|
+
r(w, c, {});
|
|
5753
|
+
}, g = ({ target: w }) => {
|
|
5754
5754
|
if (p === null) {
|
|
5755
5755
|
const L = Yt();
|
|
5756
5756
|
P(L), E([
|
|
@@ -5759,18 +5759,18 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5759
5759
|
{
|
|
5760
5760
|
id: L,
|
|
5761
5761
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
5762
|
-
[
|
|
5762
|
+
[w.name]: w.value
|
|
5763
5763
|
}
|
|
5764
5764
|
]);
|
|
5765
5765
|
} else
|
|
5766
|
-
(!Array.isArray(
|
|
5766
|
+
(!Array.isArray(w.value) || Array.isArray(w.value) && w.value.length > 0 || Array.isArray(w.value) && w.value.length === 0 && w.name) && E([
|
|
5767
5767
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
5768
5768
|
...d.slice(0, p),
|
|
5769
5769
|
{
|
|
5770
5770
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
5771
5771
|
...d[p],
|
|
5772
5772
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
5773
|
-
[
|
|
5773
|
+
[w.name]: w.value
|
|
5774
5774
|
},
|
|
5775
5775
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
5776
5776
|
...d.slice(p + 1)
|
|
@@ -5784,8 +5784,8 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5784
5784
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
5785
5785
|
formData: { ...e.formData, ...d[p], [`${f}ActiveIndex`]: p, [`${f}NumberedIndex`]: typeof p == "number" ? p + 1 : null },
|
|
5786
5786
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return -- FIXME
|
|
5787
|
-
components: e.components.map((
|
|
5788
|
-
...
|
|
5787
|
+
components: e.components.map((w) => ({
|
|
5788
|
+
...w,
|
|
5789
5789
|
pageCollection: { ...e.collection }
|
|
5790
5790
|
}))
|
|
5791
5791
|
},
|
|
@@ -5850,7 +5850,7 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5850
5850
|
const A = F.classBuilder(c, u, d), S = F.cleanHtmlAttributes(T), [E, P] = i.filter((C) => !C.skipped).reduce((C, D) => [
|
|
5851
5851
|
C[0] + (D.tasks?.filter((v) => v.state === G.TYPES.COMPLETE).length ?? 0),
|
|
5852
5852
|
C[1] + (D.tasks?.filter((v) => v.state !== G.TYPES.SKIPPED).length ?? 0)
|
|
5853
|
-
], [0, 0]), y = `${e}Notes`, { title: g, text:
|
|
5853
|
+
], [0, 0]), y = `${e}Notes`, { title: g, text: w } = r && r || {}, L = (C) => {
|
|
5854
5854
|
typeof a == "function" && a(C);
|
|
5855
5855
|
};
|
|
5856
5856
|
return /* @__PURE__ */ M("div", { ...S, id: e, className: A(), children: [
|
|
@@ -5866,9 +5866,9 @@ const Gd = (e, t) => e === "02" ? z().year(t).isLeapYear() ? 29 : 28 : ["04", "0
|
|
|
5866
5866
|
),
|
|
5867
5867
|
o && P !== E && /* @__PURE__ */ m("p", { className: "govuk-body govuk-!-margin-bottom-0", children: /* @__PURE__ */ m("strong", { className: "tasklist-summary", children: s }) }),
|
|
5868
5868
|
o && /* @__PURE__ */ m("p", { className: "govuk-body govuk-!-margin-bottom-7", children: `You have completed ${E} of ${P} sections` }),
|
|
5869
|
-
g &&
|
|
5869
|
+
g && w && ve(r, f) && /* @__PURE__ */ M(De, { children: [
|
|
5870
5870
|
/* @__PURE__ */ m("p", { className: "govuk-body govuk-!-margin-bottom-0", children: /* @__PURE__ */ m("strong", { className: "tasklist-summary", children: F.interpolateString(g, f) }) }),
|
|
5871
|
-
/* @__PURE__ */ m(Ur, { id: y, fieldId: y, readOnly: !0, value: F.interpolateString(
|
|
5871
|
+
/* @__PURE__ */ m(Ur, { id: y, fieldId: y, readOnly: !0, value: F.interpolateString(w, f) })
|
|
5872
5872
|
] }),
|
|
5873
5873
|
i.filter((C) => !C.skipped).map(
|
|
5874
5874
|
(C, D) => /* @__PURE__ */ M(Pt, { children: [
|
|
@@ -5944,7 +5944,7 @@ const po = (e, t) => {
|
|
|
5944
5944
|
return {};
|
|
5945
5945
|
const r = t?.find((s) => s.id === e);
|
|
5946
5946
|
if (r?.type === ie.PARTIAL_CYA) {
|
|
5947
|
-
const s =
|
|
5947
|
+
const s = b.FormPage.applyConditionalProperties(r);
|
|
5948
5948
|
return {
|
|
5949
5949
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
5950
5950
|
title: s.title,
|
|
@@ -6074,7 +6074,7 @@ const po = (e, t) => {
|
|
|
6074
6074
|
}, xf = (e, t, n = !1, r = null) => {
|
|
6075
6075
|
const s = e.map((i) => {
|
|
6076
6076
|
const l = i.show_when ? [i.show_when].flat() : [];
|
|
6077
|
-
return r && !
|
|
6077
|
+
return r && !b.Condition.meetsAll(l, r) ? {
|
|
6078
6078
|
...i,
|
|
6079
6079
|
skipped: !0,
|
|
6080
6080
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return -- FIXME
|
|
@@ -6085,7 +6085,7 @@ const po = (e, t) => {
|
|
|
6085
6085
|
const l = i;
|
|
6086
6086
|
l.tasks = l.tasks.map((a) => {
|
|
6087
6087
|
const c = a.show_when ? [a.show_when].flat() : [];
|
|
6088
|
-
return r && !
|
|
6088
|
+
return r && !b.Condition.meetsAll(c, r) ? { ...a, state: G.TYPES.SKIPPED } : { ...a };
|
|
6089
6089
|
});
|
|
6090
6090
|
});
|
|
6091
6091
|
const o = { ...t };
|
|
@@ -6291,7 +6291,7 @@ const po = (e, t) => {
|
|
|
6291
6291
|
if (t.type === J.TYPES.SUBMIT && p !== be.TASK) {
|
|
6292
6292
|
if (e("submit"), ee.canCYASubmit(n, r.pages) && !S) {
|
|
6293
6293
|
E(!0);
|
|
6294
|
-
const P =
|
|
6294
|
+
const P = b.Format.form({ pages: n, components: o }, { ...i }, Ne.SUBMIT), y = { pages: n, components: o };
|
|
6295
6295
|
ee.clearOutUncompletedRoutes(s, y, P), P.formStatus = ee.getSubmissionStatus(a, n, c, t, P, u, !0), l(P), d.onSubmit(
|
|
6296
6296
|
t.type,
|
|
6297
6297
|
P,
|
|
@@ -6306,21 +6306,21 @@ const po = (e, t) => {
|
|
|
6306
6306
|
} else {
|
|
6307
6307
|
const y = !(Object.prototype.hasOwnProperty.call(t, "validate") && !t.validate) ? ee.canCYASubmit(u.fullPages, r.pages) : !0;
|
|
6308
6308
|
if (t.type === J.TYPES.SAVE_AND_CONTINUE && p === be.TASK && y) {
|
|
6309
|
-
const g =
|
|
6309
|
+
const g = b.Format.form({ pages: n, components: o }, { ...i }, Ne.SUBMIT);
|
|
6310
6310
|
g.formStatus = ee.getSubmissionStatus(a, n, c, t, g, u, !0), l(g), d.onSubmit(
|
|
6311
6311
|
t.type,
|
|
6312
6312
|
g,
|
|
6313
6313
|
() => {
|
|
6314
6314
|
E(!1), T(ie.HUB);
|
|
6315
6315
|
},
|
|
6316
|
-
(
|
|
6317
|
-
E(!1), we.submissionError(
|
|
6316
|
+
(w) => {
|
|
6317
|
+
E(!1), we.submissionError(w, f);
|
|
6318
6318
|
}
|
|
6319
6319
|
);
|
|
6320
6320
|
}
|
|
6321
6321
|
if (t.type === J.TYPES.SUBMIT && p === be.TASK && (e("submit"), y)) {
|
|
6322
|
-
const g =
|
|
6323
|
-
ee.clearOutUncompletedRoutes(s,
|
|
6322
|
+
const g = b.Format.form({ pages: n, components: o }, { ...i }, Ne.SUBMIT), w = { pages: n, components: o };
|
|
6323
|
+
ee.clearOutUncompletedRoutes(s, w, g), g.formStatus = ee.getSubmissionStatus(a, n, c, t, g, u, !0), l(g), d.onSubmit(
|
|
6324
6324
|
t.type,
|
|
6325
6325
|
g,
|
|
6326
6326
|
() => {
|
|
@@ -6332,37 +6332,37 @@ const po = (e, t) => {
|
|
|
6332
6332
|
);
|
|
6333
6333
|
}
|
|
6334
6334
|
if (t.type === J.TYPES.SAVE_AND_NAVIGATE && y) {
|
|
6335
|
-
const g =
|
|
6335
|
+
const g = b.Format.form({ pages: n, components: o }, { ...i }, Ne.SUBMIT);
|
|
6336
6336
|
g.formStatus = ee.getSubmissionStatus(a, n, c, t, g, u, !0), l(g), d.onSubmit(
|
|
6337
6337
|
t.type,
|
|
6338
6338
|
g,
|
|
6339
6339
|
() => {
|
|
6340
6340
|
E(!1), T(t.page);
|
|
6341
6341
|
},
|
|
6342
|
-
(
|
|
6343
|
-
E(!1), we.submissionError(
|
|
6342
|
+
(w) => {
|
|
6343
|
+
E(!1), we.submissionError(w, f);
|
|
6344
6344
|
}
|
|
6345
6345
|
);
|
|
6346
6346
|
}
|
|
6347
6347
|
if (t.type === J.TYPES.SAVE_AND_RETURN && y) {
|
|
6348
|
-
const g =
|
|
6348
|
+
const g = b.Format.form({ pages: n, components: o }, { ...i }, Ne.SUBMIT);
|
|
6349
6349
|
g.formStatus = ee.getSubmissionStatus(a, n, c, t, g, u, !1), l(g), d.onSubmit(
|
|
6350
6350
|
t.type,
|
|
6351
6351
|
g,
|
|
6352
6352
|
() => {
|
|
6353
6353
|
a === oe.TASK ? T(void 0) : T(ie.HUB), E(!1);
|
|
6354
6354
|
},
|
|
6355
|
-
(
|
|
6356
|
-
E(!1), we.submissionError(
|
|
6355
|
+
(w) => {
|
|
6356
|
+
E(!1), we.submissionError(w, f);
|
|
6357
6357
|
}
|
|
6358
6358
|
);
|
|
6359
6359
|
}
|
|
6360
6360
|
if (t.type === J.TYPES.NAVIGATE && (T(ee.getNextPageId(a, n, c, t, A.page?.formData)), E(!1)), t.type === J.TYPES.CANCEL) {
|
|
6361
|
-
const g =
|
|
6361
|
+
const g = b.Format.form({ pages: n, components: o }, { ...i }, Ne.CANCEL);
|
|
6362
6362
|
d.onCancel(g), E(!1);
|
|
6363
6363
|
}
|
|
6364
6364
|
}
|
|
6365
|
-
}, Or = (e, t, n, r, s, o, i, l, a, c, u, d, f, p, T, A, S, E, P, y, g,
|
|
6365
|
+
}, Or = (e, t, n, r, s, o, i, l, a, c, u, d, f, p, T, A, S, E, P, y, g, w) => {
|
|
6366
6366
|
const L = { ...s }, C = o, D = r.onAction(C.page.formData, t, s, e.customAction);
|
|
6367
6367
|
C.page.formData = D.formData;
|
|
6368
6368
|
let v = D.patch;
|
|
@@ -6370,9 +6370,9 @@ const po = (e, t) => {
|
|
|
6370
6370
|
r.onCancel(C.page.formData), g(!1);
|
|
6371
6371
|
return;
|
|
6372
6372
|
}
|
|
6373
|
-
if (ee.canActionProceed(e, C.page, i.page,
|
|
6373
|
+
if (ee.canActionProceed(e, C.page, i.page, w) && (!y || e.ignoreSubmittingFlag))
|
|
6374
6374
|
if (v = ee.cleanHiddenNestedData(v, C.page), g(!0), e.addToFormData && ((Array.isArray(e.addToFormData) ? e.addToFormData : [e.addToFormData]).forEach((I) => {
|
|
6375
|
-
I.isCollection ? Vn(I.field, I.value, o.page.formData) :
|
|
6375
|
+
I.isCollection ? Vn(I.field, I.value, o.page.formData) : b.Data.setDataItem(o.page.formData, I.field, I.value);
|
|
6376
6376
|
}), C.page.formData[e.addToFormData.field] = e.addToFormData.value), e.type === J.TYPES.NAVIGATE)
|
|
6377
6377
|
we.navigate(e, f, l), g(!1);
|
|
6378
6378
|
else {
|
|
@@ -6388,24 +6388,24 @@ const po = (e, t) => {
|
|
|
6388
6388
|
R && R.length > 0 && e.resetActiveId && (C.page.formData[`${I}ActiveId`] = R[0].id), R && R.length > 0 && !e.resetActiveId && (O !== void 0 && O + 1 < C.page.formData[I].length && (C.page.formData[Y] = "Yes"), O !== void 0 && O + 1 === C.page.formData[I].length && C.page.formData[Y] && (C.page.formData[Y] = "No")), x = () => we.navigate(e, f, l, W);
|
|
6389
6389
|
break;
|
|
6390
6390
|
case J.TYPES.COLLECTION_ADD:
|
|
6391
|
-
if (O === void 0 || R.length === 0 || O + 1 === C.page.formData[I].length ?
|
|
6391
|
+
if (O === void 0 || R.length === 0 || O + 1 === C.page.formData[I].length ? b.CollectionPage.addEntry(e.collection, C.page.formData) : C.page.formData[`${e.collection}ActiveId`] = R[O + 1].id, C.page.formData[`${e.collection}`] && C.page.formData[`${e.collection}`].length > 0) {
|
|
6392
6392
|
const le = C.page.formData[`${e.collection}`].length - 1;
|
|
6393
6393
|
Object.keys(C.page.formData[`${e.collection}`][le]).filter((ue) => ue in C.page.formData && ue !== "id").forEach((ue) => delete C.page.formData[ue]);
|
|
6394
6394
|
}
|
|
6395
6395
|
x = () => we.navigate(e, f, l);
|
|
6396
6396
|
break;
|
|
6397
6397
|
case J.TYPES.COLLECTION_DUPLICATE:
|
|
6398
|
-
|
|
6398
|
+
b.CollectionPage.duplicateActiveEntry(e.collection, o.page.formData) && (x = () => we.navigate(e, f, l));
|
|
6399
6399
|
break;
|
|
6400
6400
|
case J.TYPES.COLLECTION_REMOVE:
|
|
6401
|
-
const K = e.targetId || C.page.formData[`${e.collection.split(".").pop()}ActiveId`], j =
|
|
6401
|
+
const K = e.targetId || C.page.formData[`${e.collection.split(".").pop()}ActiveId`], j = b.CollectionPage.removeEntry(e.collection, o.page.formData, K);
|
|
6402
6402
|
e.recordRemoval && (C.page.formData[`${e.collection.split(".").pop()}LastRemoved`] = { ...j });
|
|
6403
6403
|
const Ee = C.page.formData.id;
|
|
6404
6404
|
j !== null && Object.keys(j).filter((Ae) => Ae in C.page.formData).forEach((Ae) => delete C.page.formData[Ae]), Object.assign(C.page.formData, R[R.length - 1]), C.page.formData.id = Ee, R.length > 0 ? C.page.formData[`${e.collection}ActiveId`] = R[R.length - 1].id : (delete C.page.formData[`${e.collection}ActiveId`], delete C.page.formData[e.collection]), x = () => we.navigate(e, f, l);
|
|
6405
6405
|
break;
|
|
6406
6406
|
}
|
|
6407
|
-
|
|
6408
|
-
const U =
|
|
6407
|
+
b.Data.deleteValues(s, o.page.formData);
|
|
6408
|
+
const U = b.Format.form({ pages: u, components: d }, { ...s, ...t, ...o.page.formData }, Ne.SUBMIT);
|
|
6409
6409
|
U.formStatus = ee.getSubmissionStatus(a, u, f, e, U, T, !0, S?.sections), v && A(U);
|
|
6410
6410
|
const H = { pages: u, components: d };
|
|
6411
6411
|
e.type === J.TYPES.SUBMIT && ee.clearOutUncompletedRoutes(c, H, U);
|
|
@@ -6505,14 +6505,14 @@ const po = (e, t) => {
|
|
|
6505
6505
|
viewOnly: E,
|
|
6506
6506
|
hideBlankRows: P
|
|
6507
6507
|
}) => {
|
|
6508
|
-
const [y, g] = B({}), [
|
|
6508
|
+
const [y, g] = B({}), [w, L] = B(), [C, D] = B([]), [v, x] = B(void 0), [I, Y] = B(ee.getNextPageId(n, o, null, null, a)), [R, O] = B(ee.getFormState(I, C, v)), [U, H] = B({}), [q, Z] = B({}), [W, K] = B("load"), [j, Ee] = B(!1), [le, Ae] = B(!1), { hooks: ue } = Le(), { addErrors: V, clearErrors: ge, errors: Fe, validate: Ye } = Qe();
|
|
6509
6509
|
window.onpopstate = ($) => {
|
|
6510
6510
|
if (!document.location.hash && ($.state && $.state.fullPages !== void 0 && H((Q) => ({
|
|
6511
6511
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- FIXME
|
|
6512
6512
|
...Q,
|
|
6513
6513
|
fullPages: $.state?.fullPages
|
|
6514
6514
|
})), ge(), Ee(!0), ue.onGoingBack($.state ? $.state : null, R.page?.formData), s && C && y && R.page?.formData && W === void 0)) {
|
|
6515
|
-
const Q =
|
|
6515
|
+
const Q = b.Format.form({ pages: C, components: s }, { ...y, ...R.page.formData }, Ne.SUBMIT);
|
|
6516
6516
|
if (Q?.formStatus?.taskPage) {
|
|
6517
6517
|
const re = Q.formStatus.tasks;
|
|
6518
6518
|
Object.keys(re).forEach((Te) => {
|
|
@@ -6523,9 +6523,9 @@ const po = (e, t) => {
|
|
|
6523
6523
|
g(Q);
|
|
6524
6524
|
}
|
|
6525
6525
|
}, X(() => {
|
|
6526
|
-
s && o && a && (W === "load" || E) && (g(
|
|
6526
|
+
s && o && a && (W === "load" || E) && (g(b.Data.setupForm(o, s, a)), a.formStatus?.page && Y(a.formStatus.page));
|
|
6527
6527
|
}, [s, o, a, g, W, E]), X(() => {
|
|
6528
|
-
D(
|
|
6528
|
+
D(b.FormPage.getAll(o, s, { ...y }));
|
|
6529
6529
|
}, [s, o, y, D]), X(() => {
|
|
6530
6530
|
Y(
|
|
6531
6531
|
($) => (
|
|
@@ -6534,7 +6534,7 @@ const po = (e, t) => {
|
|
|
6534
6534
|
)
|
|
6535
6535
|
);
|
|
6536
6536
|
}, [n, C, Y]), X(() => {
|
|
6537
|
-
x(
|
|
6537
|
+
x(b.Hub.get(n, i, s, { ...y }));
|
|
6538
6538
|
}, [n, i, y, s, x]), X(() => {
|
|
6539
6539
|
n === oe.HUB && j && y && R.page?.formData && (R.page.formData = { ...y }), Ee(!1), O(ee.getFormState(I, C, v));
|
|
6540
6540
|
}, [C, v, I, O, n, j, y, R.page]), X(() => {
|
|
@@ -6544,8 +6544,8 @@ const po = (e, t) => {
|
|
|
6544
6544
|
}, [ue]), X(() => {
|
|
6545
6545
|
Z(i);
|
|
6546
6546
|
}, [i]), X(() => {
|
|
6547
|
-
|
|
6548
|
-
}, [
|
|
6547
|
+
w?.data && (g(w.data), L(void 0));
|
|
6548
|
+
}, [w, g, L]);
|
|
6549
6549
|
const tt = i?.sections, nt = i?.nonSequential;
|
|
6550
6550
|
X(() => {
|
|
6551
6551
|
const $ = U.fullPages;
|
|
@@ -6583,7 +6583,7 @@ const po = (e, t) => {
|
|
|
6583
6583
|
), !1) : !0)
|
|
6584
6584
|
)
|
|
6585
6585
|
), $ && we.cyaAction($, I, de);
|
|
6586
|
-
}, _e =
|
|
6586
|
+
}, _e = b.classBuilder(c, u, d);
|
|
6587
6587
|
if (v === be.TASK) {
|
|
6588
6588
|
const $ = l;
|
|
6589
6589
|
$.actions = [
|
|
@@ -6599,7 +6599,7 @@ const po = (e, t) => {
|
|
|
6599
6599
|
{
|
|
6600
6600
|
pages: ee.getRelevantPages(R, C, U.fullPages),
|
|
6601
6601
|
...l,
|
|
6602
|
-
...R.page?.type === ie.PARTIAL_CYA && { actions: R.page.actions?.filter(($) =>
|
|
6602
|
+
...R.page?.type === ie.PARTIAL_CYA && { actions: R.page.actions?.filter(($) => b.Component.show($, y)) },
|
|
6603
6603
|
...R.cya,
|
|
6604
6604
|
onAction: ($) => {
|
|
6605
6605
|
Wf(
|
|
@@ -6741,7 +6741,7 @@ export {
|
|
|
6741
6741
|
oh as Models,
|
|
6742
6742
|
vs as PageActions,
|
|
6743
6743
|
wr as SummaryList,
|
|
6744
|
-
|
|
6744
|
+
b as Utils,
|
|
6745
6745
|
ac as ValidationContextProvider,
|
|
6746
6746
|
Ph as default
|
|
6747
6747
|
};
|