@hmcts/ccd-case-ui-toolkit 7.0.17 → 7.0.18-pre-release
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/esm2020/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.mjs +83 -38
- package/esm2020/lib/shared/components/case-editor/case-editor.module.mjs +6 -5
- package/esm2020/lib/shared/components/palette/base-field/abstract-form-field.component.mjs +1 -1
- package/esm2020/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.mjs +5 -5
- package/esm2020/lib/shared/components/palette/markdown/markdown.component.mjs +20 -3
- package/esm2020/lib/shared/components/palette/text/write-text-field.component.mjs +1 -1
- package/esm2020/lib/shared/components/palette/utils/first-error.pipe.mjs +4 -1
- package/esm2020/lib/shared/services/form/form-validators.service.mjs +27 -2
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +200 -101
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +191 -101
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts +8 -3
- package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts.map +1 -1
- package/lib/shared/components/palette/base-field/abstract-form-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/markdown/markdown.component.d.ts +3 -1
- package/lib/shared/components/palette/markdown/markdown.component.d.ts.map +1 -1
- package/lib/shared/components/palette/utils/first-error.pipe.d.ts.map +1 -1
- package/lib/shared/services/form/form-validators.service.d.ts +4 -0
- package/lib/shared/services/form/form-validators.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -27,6 +27,7 @@ import { MatDialogConfig } from '@angular/material/dialog';
|
|
|
27
27
|
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
28
28
|
import * as i2 from '@nicky-lenaers/ngx-scroll-to';
|
|
29
29
|
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
|
|
30
|
+
import * as marked from 'marked';
|
|
30
31
|
import * as i1$4 from 'ngx-md';
|
|
31
32
|
import { NgxMdModule } from 'ngx-md';
|
|
32
33
|
import * as i5 from '@angular/material/legacy-autocomplete';
|
|
@@ -133,11 +134,11 @@ function FooterComponent_div_3_Template(rf, ctx) {
|
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
const _c0$13 = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
|
|
136
|
-
const _c1$
|
|
137
|
+
const _c1$u = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
|
|
137
138
|
class FooterComponent {
|
|
138
139
|
}
|
|
139
140
|
FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
|
|
140
|
-
FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$
|
|
141
|
+
FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$u, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) {
|
|
141
142
|
if (rf & 1) {
|
|
142
143
|
i0.ɵɵprojectionDef(_c0$13);
|
|
143
144
|
i0.ɵɵelementStart(0, "footer", 0)(1, "div", 1);
|
|
@@ -211,7 +212,7 @@ function HeaderBarComponent_div_10_Template(rf, ctx) {
|
|
|
211
212
|
}
|
|
212
213
|
}
|
|
213
214
|
const _c0$12 = [[["", "headerNavigation", ""]]];
|
|
214
|
-
const _c1$
|
|
215
|
+
const _c1$t = ["[headerNavigation]"];
|
|
215
216
|
class HeaderBarComponent {
|
|
216
217
|
constructor() {
|
|
217
218
|
this.signOutRequest = new EventEmitter();
|
|
@@ -221,7 +222,7 @@ class HeaderBarComponent {
|
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
224
|
HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
|
|
224
|
-
HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$
|
|
225
|
+
HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$t, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) {
|
|
225
226
|
if (rf & 1) {
|
|
226
227
|
i0.ɵɵprojectionDef(_c0$12);
|
|
227
228
|
i0.ɵɵelementStart(0, "header", 0)(1, "div", 1)(2, "div", 2);
|
|
@@ -277,11 +278,11 @@ HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBa
|
|
|
277
278
|
})();
|
|
278
279
|
|
|
279
280
|
const _c0$11 = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
|
|
280
|
-
const _c1$
|
|
281
|
+
const _c1$s = ["[leftNavLinks]", "[rightNavLinks]"];
|
|
281
282
|
class NavigationComponent {
|
|
282
283
|
}
|
|
283
284
|
NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
|
|
284
|
-
NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$
|
|
285
|
+
NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$s, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) {
|
|
285
286
|
if (rf & 1) {
|
|
286
287
|
i0.ɵɵprojectionDef(_c0$11);
|
|
287
288
|
i0.ɵɵelementStart(0, "div")(1, "nav", 0);
|
|
@@ -412,11 +413,11 @@ HeadersModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModu
|
|
|
412
413
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(HeadersModule, { declarations: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent], imports: [CommonModule, RouterModule, i1.RpxTranslationModule], exports: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent] }); })();
|
|
413
414
|
|
|
414
415
|
const _c0$10 = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
|
|
415
|
-
const _c1$
|
|
416
|
+
const _c1$r = ["[topBody]", "[leftBody]", "[rightBody]"];
|
|
416
417
|
class BodyComponent {
|
|
417
418
|
}
|
|
418
419
|
BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
|
|
419
|
-
BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$
|
|
420
|
+
BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$r, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) {
|
|
420
421
|
if (rf & 1) {
|
|
421
422
|
i0.ɵɵprojectionDef(_c0$10);
|
|
422
423
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -1085,11 +1086,11 @@ NotificationBannerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
1085
1086
|
})();
|
|
1086
1087
|
|
|
1087
1088
|
const _c0$Z = function (a0) { return { "js-hidden": a0 }; };
|
|
1088
|
-
const _c1$
|
|
1089
|
+
const _c1$q = ["*"];
|
|
1089
1090
|
class TabComponent {
|
|
1090
1091
|
}
|
|
1091
1092
|
TabComponent.ɵfac = function TabComponent_Factory(t) { return new (t || TabComponent)(); };
|
|
1092
|
-
TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$
|
|
1093
|
+
TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$q, decls: 2, vars: 5, consts: [["role", "tabpanel", 1, "tabs-panel", 3, "id", "ngClass"]], template: function TabComponent_Template(rf, ctx) {
|
|
1093
1094
|
if (rf & 1) {
|
|
1094
1095
|
i0.ɵɵprojectionDef();
|
|
1095
1096
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -1115,8 +1116,8 @@ TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent,
|
|
|
1115
1116
|
})();
|
|
1116
1117
|
|
|
1117
1118
|
const _c0$Y = ["tab"];
|
|
1118
|
-
const _c1$
|
|
1119
|
-
const _c2$
|
|
1119
|
+
const _c1$p = function () { return ["."]; };
|
|
1120
|
+
const _c2$4 = function (a0) { return { "tabs-toggle-selected": a0 }; };
|
|
1120
1121
|
function TabsComponent_li_2_Template(rf, ctx) {
|
|
1121
1122
|
if (rf & 1) {
|
|
1122
1123
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
@@ -1129,7 +1130,7 @@ function TabsComponent_li_2_Template(rf, ctx) {
|
|
|
1129
1130
|
if (rf & 2) {
|
|
1130
1131
|
const panel_r1 = ctx.$implicit;
|
|
1131
1132
|
i0.ɵɵadvance(1);
|
|
1132
|
-
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$
|
|
1133
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$p))("fragment", panel_r1.id)("ngClass", i0.ɵɵpureFunction1(9, _c2$4, panel_r1.selected));
|
|
1133
1134
|
i0.ɵɵattribute("aria-controls", panel_r1.id)("aria-selected", panel_r1.selected);
|
|
1134
1135
|
i0.ɵɵadvance(2);
|
|
1135
1136
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 6, panel_r1.title));
|
|
@@ -2696,6 +2697,9 @@ class FirstErrorPipe {
|
|
|
2696
2697
|
else if (keys[0] === 'pattern') {
|
|
2697
2698
|
errorMessage = 'The data entered is not valid for %FIELDLABEL%';
|
|
2698
2699
|
}
|
|
2700
|
+
else if (keys[0] === 'markDownPattern') {
|
|
2701
|
+
errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
|
|
2702
|
+
}
|
|
2699
2703
|
else if (keys[0] === 'minlength') {
|
|
2700
2704
|
errorMessage = '%FIELDLABEL% is below the minimum length';
|
|
2701
2705
|
}
|
|
@@ -4544,6 +4548,7 @@ class FormValidatorsService {
|
|
|
4544
4548
|
FormValidatorsService.CUSTOM_VALIDATED_TYPES.indexOf(caseField.field_type.type) === -1) {
|
|
4545
4549
|
const validators = [Validators.required];
|
|
4546
4550
|
if (caseField.field_type.type === 'Text') {
|
|
4551
|
+
validators.push(this.markDownPatternValidator());
|
|
4547
4552
|
if (caseField.field_type.regular_expression) {
|
|
4548
4553
|
validators.push(Validators.pattern(caseField.field_type.regular_expression));
|
|
4549
4554
|
}
|
|
@@ -4557,22 +4562,38 @@ class FormValidatorsService {
|
|
|
4557
4562
|
validators.push(Validators.maxLength(caseField.field_type.max));
|
|
4558
4563
|
}
|
|
4559
4564
|
}
|
|
4565
|
+
if (caseField.field_type.type === 'TextArea') {
|
|
4566
|
+
validators.push(this.emptyValidator());
|
|
4567
|
+
validators.push(this.markDownPatternValidator());
|
|
4568
|
+
}
|
|
4560
4569
|
if (control.validator) {
|
|
4561
4570
|
validators.push(control.validator);
|
|
4562
4571
|
}
|
|
4563
4572
|
control.setValidators(validators);
|
|
4564
4573
|
}
|
|
4574
|
+
else if (caseField.display_context === 'OPTIONAL' && (caseField.field_type.type === 'Text' || caseField.field_type.type === 'TextArea')) {
|
|
4575
|
+
control.setValidators(this.markDownPatternValidator());
|
|
4576
|
+
}
|
|
4565
4577
|
return control;
|
|
4566
4578
|
}
|
|
4567
4579
|
static emptyValidator() {
|
|
4568
4580
|
const validator = (control) => {
|
|
4569
|
-
|
|
4581
|
+
var _a;
|
|
4582
|
+
if (((_a = control === null || control === void 0 ? void 0 : control.value) === null || _a === void 0 ? void 0 : _a.toString().trim().length) === 0) {
|
|
4570
4583
|
return { required: {} };
|
|
4571
4584
|
}
|
|
4572
4585
|
return null;
|
|
4573
4586
|
};
|
|
4574
4587
|
return validator;
|
|
4575
4588
|
}
|
|
4589
|
+
static markDownPatternValidator() {
|
|
4590
|
+
const pattern = /(\[[^\]]{0,500}\]\([^)]{0,500}\)|!\[[^\]]{0,500}\]\([^)]{0,500}\)|<img[^>]{0,500}>|<a[^>]{0,500}>.*?<\/a>)/;
|
|
4591
|
+
return (control) => {
|
|
4592
|
+
var _a;
|
|
4593
|
+
const value = (_a = control === null || control === void 0 ? void 0 : control.value) === null || _a === void 0 ? void 0 : _a.toString().trim();
|
|
4594
|
+
return (value && pattern.test(value)) ? { markDownPattern: {} } : null;
|
|
4595
|
+
};
|
|
4596
|
+
}
|
|
4576
4597
|
// TODO: Strip this out as it's only here for the moment because
|
|
4577
4598
|
// the service is being injected all over the place but it doesn't
|
|
4578
4599
|
// need to be as FormValidatorsService.addValidators is perfectly
|
|
@@ -4580,10 +4601,20 @@ class FormValidatorsService {
|
|
|
4580
4601
|
addValidators(caseField, control) {
|
|
4581
4602
|
return FormValidatorsService.addValidators(caseField, control);
|
|
4582
4603
|
}
|
|
4604
|
+
addMarkDownValidators(formGroup, controlPath) {
|
|
4605
|
+
const control = formGroup.get(controlPath);
|
|
4606
|
+
if (control) {
|
|
4607
|
+
control.setValidators(FormValidatorsService.markDownPatternValidator());
|
|
4608
|
+
control.updateValueAndValidity();
|
|
4609
|
+
}
|
|
4610
|
+
return control;
|
|
4611
|
+
}
|
|
4583
4612
|
}
|
|
4584
4613
|
FormValidatorsService.CUSTOM_VALIDATED_TYPES = [
|
|
4585
4614
|
'Date', 'MoneyGBP', 'Label', 'JudicialUser'
|
|
4586
4615
|
];
|
|
4616
|
+
FormValidatorsService.DEFAULT_INPUT_TEXT = 'text';
|
|
4617
|
+
FormValidatorsService.DEFAULT_INPUT_TEXTAREA = 'textAreas';
|
|
4587
4618
|
FormValidatorsService.ɵfac = function FormValidatorsService_Factory(t) { return new (t || FormValidatorsService)(); };
|
|
4588
4619
|
FormValidatorsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormValidatorsService, factory: FormValidatorsService.ɵfac });
|
|
4589
4620
|
(function () {
|
|
@@ -11053,8 +11084,8 @@ function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) {
|
|
|
11053
11084
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Enter the Postcode"));
|
|
11054
11085
|
}
|
|
11055
11086
|
}
|
|
11056
|
-
const _c1$
|
|
11057
|
-
const _c2$
|
|
11087
|
+
const _c1$o = function (a0) { return { "form-group-error": a0 }; };
|
|
11088
|
+
const _c2$3 = function (a0) { return { "govuk-input--error": a0 }; };
|
|
11058
11089
|
function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
|
|
11059
11090
|
if (rf & 1) {
|
|
11060
11091
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
@@ -11072,7 +11103,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
|
|
|
11072
11103
|
}
|
|
11073
11104
|
if (rf & 2) {
|
|
11074
11105
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
11075
|
-
i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$
|
|
11106
|
+
i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$o, ctx_r2.missingPostcode));
|
|
11076
11107
|
i0.ɵɵadvance(1);
|
|
11077
11108
|
i0.ɵɵproperty("for", ctx_r2.createElementId("postcodeInput"));
|
|
11078
11109
|
i0.ɵɵadvance(2);
|
|
@@ -11080,7 +11111,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
|
|
|
11080
11111
|
i0.ɵɵadvance(2);
|
|
11081
11112
|
i0.ɵɵproperty("ngIf", ctx_r2.missingPostcode);
|
|
11082
11113
|
i0.ɵɵadvance(1);
|
|
11083
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$
|
|
11114
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$3, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
|
|
11084
11115
|
i0.ɵɵadvance(2);
|
|
11085
11116
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 11, "Find address"));
|
|
11086
11117
|
}
|
|
@@ -12658,7 +12689,7 @@ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) {
|
|
|
12658
12689
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label), " ");
|
|
12659
12690
|
}
|
|
12660
12691
|
}
|
|
12661
|
-
const _c1$
|
|
12692
|
+
const _c1$n = function (a0) { return { "form-group-error": a0 }; };
|
|
12662
12693
|
class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
12663
12694
|
ngOnInit() {
|
|
12664
12695
|
if (this.caseField.value) {
|
|
@@ -12724,7 +12755,7 @@ WriteCaseLinkFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
12724
12755
|
i0.ɵɵelementEnd();
|
|
12725
12756
|
}
|
|
12726
12757
|
if (rf & 2) {
|
|
12727
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
12758
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$n, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
|
|
12728
12759
|
i0.ɵɵadvance(1);
|
|
12729
12760
|
i0.ɵɵproperty("for", ctx.id());
|
|
12730
12761
|
i0.ɵɵadvance(1);
|
|
@@ -12762,7 +12793,7 @@ function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) {
|
|
|
12762
12793
|
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction6(3, _c0$S, ctx_r1.caseField.label, ctx_r1.caseField.label, ctx_r1.caseField.field_type.collection_field_type, ctx_r1.caseField.display_context_parameter, ctx_r1.caseField.value, ctx_r1.caseField.hidden))("context", ctx_r1.context)("topLevelFormGroup", ctx_r1.topLevelFormGroup);
|
|
12763
12794
|
}
|
|
12764
12795
|
}
|
|
12765
|
-
const _c1$
|
|
12796
|
+
const _c1$m = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
|
|
12766
12797
|
function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
|
|
12767
12798
|
if (rf & 1) {
|
|
12768
12799
|
i0.ɵɵelementStart(0, "tr")(1, "td");
|
|
@@ -12774,7 +12805,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
|
|
|
12774
12805
|
const i_r5 = ctx.index;
|
|
12775
12806
|
const ctx_r3 = i0.ɵɵnextContext(3);
|
|
12776
12807
|
i0.ɵɵadvance(2);
|
|
12777
|
-
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$
|
|
12808
|
+
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$m, i_r5, ctx_r3.caseField.label + " " + (i_r5 + 1), ctx_r3.caseField.field_type.collection_field_type, item_r4.value, ctx_r3.caseField.hidden))("context", ctx_r3.context)("topLevelFormGroup", ctx_r3.topLevelFormGroup)("idPrefix", ctx_r3.buildIdPrefix(i_r5));
|
|
12778
12809
|
}
|
|
12779
12810
|
}
|
|
12780
12811
|
function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) {
|
|
@@ -13970,7 +14001,7 @@ function WriteDocumentFieldComponent_ccd_read_document_field_9_Template(rf, ctx)
|
|
|
13970
14001
|
i0.ɵɵproperty("caseField", ctx_r2.caseField);
|
|
13971
14002
|
}
|
|
13972
14003
|
}
|
|
13973
|
-
const _c1$
|
|
14004
|
+
const _c1$l = function (a0) { return { "form-group-error bottom-30": a0 }; };
|
|
13974
14005
|
class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
13975
14006
|
constructor(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService, jurisdictionService) {
|
|
13976
14007
|
super();
|
|
@@ -14276,7 +14307,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
14276
14307
|
i0.ɵɵelementEnd()();
|
|
14277
14308
|
}
|
|
14278
14309
|
if (rf & 2) {
|
|
14279
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$
|
|
14310
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$l, !ctx.valid));
|
|
14280
14311
|
i0.ɵɵadvance(1);
|
|
14281
14312
|
i0.ɵɵproperty("for", ctx.id());
|
|
14282
14313
|
i0.ɵɵadvance(1);
|
|
@@ -14500,9 +14531,14 @@ WriteDynamicListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ ty
|
|
|
14500
14531
|
})();
|
|
14501
14532
|
|
|
14502
14533
|
class MarkdownComponent {
|
|
14503
|
-
constructor() {
|
|
14534
|
+
constructor() {
|
|
14535
|
+
this.renderUrlToTextFeature = true;
|
|
14536
|
+
}
|
|
14504
14537
|
ngOnInit() {
|
|
14505
14538
|
this.content = this.content.replace(/ \n/g, '<br>');
|
|
14539
|
+
if (this.renderUrlToTextFeature) {
|
|
14540
|
+
this.renderUrlToText();
|
|
14541
|
+
}
|
|
14506
14542
|
}
|
|
14507
14543
|
onMarkdownClick(event) {
|
|
14508
14544
|
// If we don't have an anchor tag, we don't need to do anything.
|
|
@@ -14511,13 +14547,22 @@ class MarkdownComponent {
|
|
|
14511
14547
|
}
|
|
14512
14548
|
return true;
|
|
14513
14549
|
}
|
|
14550
|
+
renderUrlToText() {
|
|
14551
|
+
const renderer = new marked.Renderer();
|
|
14552
|
+
renderer.link = (href, title, text) => {
|
|
14553
|
+
return text; // Return the text without turning it into a link
|
|
14554
|
+
};
|
|
14555
|
+
marked.setOptions({
|
|
14556
|
+
renderer: renderer
|
|
14557
|
+
});
|
|
14558
|
+
}
|
|
14514
14559
|
}
|
|
14515
14560
|
MarkdownComponent.ɵfac = function MarkdownComponent_Factory(t) { return new (t || MarkdownComponent)(); };
|
|
14516
14561
|
MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]], hostBindings: function MarkdownComponent_HostBindings(rf, ctx) {
|
|
14517
14562
|
if (rf & 1) {
|
|
14518
14563
|
i0.ɵɵlistener("click", function MarkdownComponent_click_HostBindingHandler($event) { return ctx.onMarkdownClick($event); });
|
|
14519
14564
|
}
|
|
14520
|
-
}, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, decls: 4, vars: 5, consts: [[1, "markdown", 3, "data"]], template: function MarkdownComponent_Template(rf, ctx) {
|
|
14565
|
+
}, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink", renderUrlToTextFeature: "renderUrlToTextFeature" }, decls: 4, vars: 5, consts: [[1, "markdown", 3, "data"]], template: function MarkdownComponent_Template(rf, ctx) {
|
|
14521
14566
|
if (rf & 1) {
|
|
14522
14567
|
i0.ɵɵelementStart(0, "div");
|
|
14523
14568
|
i0.ɵɵelement(1, "markdown", 0);
|
|
@@ -14538,6 +14583,8 @@ MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownC
|
|
|
14538
14583
|
type: Input
|
|
14539
14584
|
}], markdownUseHrefAsRouterLink: [{
|
|
14540
14585
|
type: Input
|
|
14586
|
+
}], renderUrlToTextFeature: [{
|
|
14587
|
+
type: Input
|
|
14541
14588
|
}], onMarkdownClick: [{
|
|
14542
14589
|
type: HostListener,
|
|
14543
14590
|
args: ['click', ['$event']]
|
|
@@ -14672,7 +14719,7 @@ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, c
|
|
|
14672
14719
|
i0.ɵɵadvance(1);
|
|
14673
14720
|
i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
|
|
14674
14721
|
i0.ɵɵadvance(1);
|
|
14675
|
-
i0.ɵɵproperty("content", checkbox_r4.label);
|
|
14722
|
+
i0.ɵɵproperty("content", checkbox_r4.label)("renderUrlToTextFeature", false);
|
|
14676
14723
|
}
|
|
14677
14724
|
}
|
|
14678
14725
|
const _c0$O = function (a0) { return { "error": a0 }; };
|
|
@@ -14737,14 +14784,14 @@ class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteCompon
|
|
|
14737
14784
|
}
|
|
14738
14785
|
}
|
|
14739
14786
|
WriteDynamicMultiSelectListFieldComponent.ɵfac = /*@__PURE__*/ function () { let ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory; return function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory || (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent)))(t || WriteDynamicMultiSelectListFieldComponent); }; }();
|
|
14740
|
-
WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"], [3, "content"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
|
|
14787
|
+
WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"], [3, "content", "renderUrlToTextFeature"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
|
|
14741
14788
|
if (rf & 1) {
|
|
14742
14789
|
i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
|
|
14743
14790
|
i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
|
|
14744
14791
|
i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
|
|
14745
14792
|
i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
|
|
14746
14793
|
i0.ɵɵelementEnd();
|
|
14747
|
-
i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5,
|
|
14794
|
+
i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 7, "ng-container", 4);
|
|
14748
14795
|
i0.ɵɵelementEnd()();
|
|
14749
14796
|
}
|
|
14750
14797
|
if (rf & 2) {
|
|
@@ -14762,7 +14809,7 @@ WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineCom
|
|
|
14762
14809
|
(function () {
|
|
14763
14810
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
|
|
14764
14811
|
type: Component,
|
|
14765
|
-
args: [{ selector: 'ccd-write-dynamic-multi-select-list-field', template: "<div class=\"form-group bottom-30\" [ngClass]=\"{'error': !checkboxes.valid && checkboxes.touched}\" [id]=\"id()\">\n\n <fieldset>\n\n <legend>\n <span *ngIf=\"caseField.label\" class=\"form-label\">{{caseField | ccdFieldLabel}}</span>\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">{{caseField.hint_text}}</span>\n <span *ngIf=\"checkboxes.errors && checkboxes.touched\" class=\"error-message\">{{checkboxes.errors |\n ccdFirstError}}</span>\n </legend>\n\n <ng-container *ngFor=\"let checkbox of caseField.list_items\">\n\n <div class=\"multiple-choice\">\n <input class=\"form-control\" id=\"{{ createElementId(checkbox.code) }}\" name=\"{{ id() }}\" type=\"checkbox\"\n [value]=\"checkbox.code\" [checked]=\"isSelected(checkbox.code)\" (change)=\"onCheckChange($event)\">\n <label class=\"form-label\" for=\"{{ createElementId(checkbox.code) }}\">\n <ccd-markdown [content]=\"checkbox.label\"></ccd-markdown>\n </label>\n </div>\n\n </ng-container>\n\n </fieldset>\n\n</div>\n", styles: ["ccd-markdown{display:inline-block}\n"] }]
|
|
14812
|
+
args: [{ selector: 'ccd-write-dynamic-multi-select-list-field', template: "<div class=\"form-group bottom-30\" [ngClass]=\"{'error': !checkboxes.valid && checkboxes.touched}\" [id]=\"id()\">\n\n <fieldset>\n\n <legend>\n <span *ngIf=\"caseField.label\" class=\"form-label\">{{caseField | ccdFieldLabel}}</span>\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">{{caseField.hint_text}}</span>\n <span *ngIf=\"checkboxes.errors && checkboxes.touched\" class=\"error-message\">{{checkboxes.errors |\n ccdFirstError}}</span>\n </legend>\n\n <ng-container *ngFor=\"let checkbox of caseField.list_items\">\n\n <div class=\"multiple-choice\">\n <input class=\"form-control\" id=\"{{ createElementId(checkbox.code) }}\" name=\"{{ id() }}\" type=\"checkbox\"\n [value]=\"checkbox.code\" [checked]=\"isSelected(checkbox.code)\" (change)=\"onCheckChange($event)\">\n <label class=\"form-label\" for=\"{{ createElementId(checkbox.code) }}\">\n <ccd-markdown [content]=\"checkbox.label\" [renderUrlToTextFeature]=\"false\"></ccd-markdown>\n </label>\n </div>\n\n </ng-container>\n\n </fieldset>\n\n</div>\n", styles: ["ccd-markdown{display:inline-block}\n"] }]
|
|
14766
14813
|
}], null, null);
|
|
14767
14814
|
})();
|
|
14768
14815
|
|
|
@@ -14906,7 +14953,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
|
|
|
14906
14953
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r5.label));
|
|
14907
14954
|
}
|
|
14908
14955
|
}
|
|
14909
|
-
const _c1$
|
|
14956
|
+
const _c1$k = function (a0) { return { "form-group-error": a0 }; };
|
|
14910
14957
|
class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
14911
14958
|
ngOnInit() {
|
|
14912
14959
|
/**
|
|
@@ -14946,7 +14993,7 @@ WriteDynamicRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent
|
|
|
14946
14993
|
i0.ɵɵelementEnd()();
|
|
14947
14994
|
}
|
|
14948
14995
|
if (rf & 2) {
|
|
14949
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$
|
|
14996
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$k, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
|
|
14950
14997
|
i0.ɵɵadvance(3);
|
|
14951
14998
|
i0.ɵɵproperty("for", ctx.id());
|
|
14952
14999
|
i0.ɵɵadvance(1);
|
|
@@ -15047,7 +15094,7 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) {
|
|
|
15047
15094
|
}
|
|
15048
15095
|
}
|
|
15049
15096
|
const _c0$M = function (a0) { return { "form-group-error": a0 }; };
|
|
15050
|
-
const _c1$
|
|
15097
|
+
const _c1$j = function (a0) { return { "govuk-input--error": a0 }; };
|
|
15051
15098
|
class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
|
|
15052
15099
|
ngOnInit() {
|
|
15053
15100
|
this.emailControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -15075,7 +15122,7 @@ WriteEmailFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
|
|
|
15075
15122
|
i0.ɵɵadvance(1);
|
|
15076
15123
|
i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
|
|
15077
15124
|
i0.ɵɵadvance(1);
|
|
15078
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
15125
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$j, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
|
|
15079
15126
|
}
|
|
15080
15127
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
15081
15128
|
(function () {
|
|
@@ -15330,7 +15377,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
|
|
|
15330
15377
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r4.label));
|
|
15331
15378
|
}
|
|
15332
15379
|
}
|
|
15333
|
-
const _c1$
|
|
15380
|
+
const _c1$i = function (a0) { return { "form-group-error": a0 }; };
|
|
15334
15381
|
class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
15335
15382
|
ngOnInit() {
|
|
15336
15383
|
const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
|
|
@@ -15352,7 +15399,7 @@ WriteFixedRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
|
|
|
15352
15399
|
i0.ɵɵelementEnd()();
|
|
15353
15400
|
}
|
|
15354
15401
|
if (rf & 2) {
|
|
15355
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
15402
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$i, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
|
|
15356
15403
|
i0.ɵɵadvance(3);
|
|
15357
15404
|
i0.ɵɵproperty("for", ctx.id());
|
|
15358
15405
|
i0.ɵɵadvance(1);
|
|
@@ -15506,7 +15553,7 @@ function WriteJudicialUserFieldComponent_mat_option_11_Template(rf, ctx) {
|
|
|
15506
15553
|
i0.ɵɵelementEnd();
|
|
15507
15554
|
}
|
|
15508
15555
|
}
|
|
15509
|
-
const _c1$
|
|
15556
|
+
const _c1$h = function (a0) { return { "form-group-error": a0 }; };
|
|
15510
15557
|
class WriteJudicialUserFieldComponent extends WriteComplexFieldComponent {
|
|
15511
15558
|
constructor(jurisdictionService, sessionStorageService, caseFlagRefDataService, compoundPipe, validatorsService) {
|
|
15512
15559
|
super(compoundPipe, validatorsService);
|
|
@@ -15659,7 +15706,7 @@ WriteJudicialUserFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ t
|
|
|
15659
15706
|
}
|
|
15660
15707
|
if (rf & 2) {
|
|
15661
15708
|
const _r3 = i0.ɵɵreference(7);
|
|
15662
|
-
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$
|
|
15709
|
+
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$h, !!ctx.judicialUserControl && ctx.errors));
|
|
15663
15710
|
i0.ɵɵadvance(1);
|
|
15664
15711
|
i0.ɵɵproperty("for", ctx.id());
|
|
15665
15712
|
i0.ɵɵadvance(1);
|
|
@@ -16446,7 +16493,7 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) {
|
|
|
16446
16493
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, reason_r19));
|
|
16447
16494
|
}
|
|
16448
16495
|
}
|
|
16449
|
-
const _c1$
|
|
16496
|
+
const _c1$g = function (a0) { return { "table-group-error": a0 }; };
|
|
16450
16497
|
function LinkCasesComponent_tr_31_Template(rf, ctx) {
|
|
16451
16498
|
if (rf & 1) {
|
|
16452
16499
|
const _r21 = i0.ɵɵgetCurrentView();
|
|
@@ -16479,7 +16526,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) {
|
|
|
16479
16526
|
const case_r16 = ctx.$implicit;
|
|
16480
16527
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
16481
16528
|
i0.ɵɵadvance(2);
|
|
16482
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$
|
|
16529
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$g, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
|
|
16483
16530
|
i0.ɵɵadvance(2);
|
|
16484
16531
|
i0.ɵɵtextInterpolate1("", case_r16.caseName, " ");
|
|
16485
16532
|
i0.ɵɵadvance(2);
|
|
@@ -18566,7 +18613,7 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) {
|
|
|
18566
18613
|
}
|
|
18567
18614
|
}
|
|
18568
18615
|
const _c0$E = function (a0) { return { "form-group-error": a0 }; };
|
|
18569
|
-
const _c1$
|
|
18616
|
+
const _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
|
|
18570
18617
|
class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
|
|
18571
18618
|
ngOnInit() {
|
|
18572
18619
|
this.numberControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -18594,7 +18641,7 @@ WriteNumberFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: W
|
|
|
18594
18641
|
i0.ɵɵadvance(1);
|
|
18595
18642
|
i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
|
|
18596
18643
|
i0.ɵɵadvance(1);
|
|
18597
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
18644
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
|
|
18598
18645
|
}
|
|
18599
18646
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
18600
18647
|
(function () {
|
|
@@ -19310,7 +19357,7 @@ function WritePhoneUKFieldComponent_span_4_Template(rf, ctx) {
|
|
|
19310
19357
|
}
|
|
19311
19358
|
}
|
|
19312
19359
|
const _c0$C = function (a0) { return { "form-group-error": a0 }; };
|
|
19313
|
-
const _c1$
|
|
19360
|
+
const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
|
|
19314
19361
|
class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
|
|
19315
19362
|
ngOnInit() {
|
|
19316
19363
|
this.phoneUkControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -19338,7 +19385,7 @@ WritePhoneUKFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
19338
19385
|
i0.ɵɵadvance(1);
|
|
19339
19386
|
i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
|
|
19340
19387
|
i0.ɵɵadvance(1);
|
|
19341
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
19388
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
|
|
19342
19389
|
}
|
|
19343
19390
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
19344
19391
|
(function () {
|
|
@@ -21580,7 +21627,7 @@ function WriteTextAreaFieldComponent_span_4_Template(rf, ctx) {
|
|
|
21580
21627
|
}
|
|
21581
21628
|
}
|
|
21582
21629
|
const _c0$z = function (a0) { return { "form-group-error": a0 }; };
|
|
21583
|
-
const _c1$
|
|
21630
|
+
const _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
|
|
21584
21631
|
class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
21585
21632
|
constructor(browserService) {
|
|
21586
21633
|
super();
|
|
@@ -21620,7 +21667,7 @@ WriteTextAreaFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
21620
21667
|
i0.ɵɵadvance(1);
|
|
21621
21668
|
i0.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
|
|
21622
21669
|
i0.ɵɵadvance(1);
|
|
21623
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
21670
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
|
|
21624
21671
|
}
|
|
21625
21672
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
21626
21673
|
(function () {
|
|
@@ -21695,7 +21742,7 @@ function WriteTextFieldComponent_span_4_Template(rf, ctx) {
|
|
|
21695
21742
|
}
|
|
21696
21743
|
}
|
|
21697
21744
|
const _c0$y = function (a0) { return { "form-group-error": a0 }; };
|
|
21698
|
-
const _c1$
|
|
21745
|
+
const _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
|
|
21699
21746
|
class WriteTextFieldComponent extends AbstractFieldWriteComponent {
|
|
21700
21747
|
ngOnInit() {
|
|
21701
21748
|
this.textControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -21727,7 +21774,7 @@ WriteTextFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wri
|
|
|
21727
21774
|
i0.ɵɵadvance(1);
|
|
21728
21775
|
i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
|
|
21729
21776
|
i0.ɵɵadvance(1);
|
|
21730
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
21777
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
|
|
21731
21778
|
}
|
|
21732
21779
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
21733
21780
|
(function () {
|
|
@@ -21937,7 +21984,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) {
|
|
|
21937
21984
|
i0.ɵɵtextInterpolate(ctx_r3.caseField.label ? i0.ɵɵpipeBind3(4, 8, ctx_r3.caseField.label, null, value_r4) : value_r4);
|
|
21938
21985
|
}
|
|
21939
21986
|
}
|
|
21940
|
-
const _c1$
|
|
21987
|
+
const _c1$b = function (a0) { return { "form-group-error": a0 }; };
|
|
21941
21988
|
class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
|
|
21942
21989
|
constructor(yesNoService) {
|
|
21943
21990
|
super();
|
|
@@ -21961,7 +22008,7 @@ WriteYesNoFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
|
|
|
21961
22008
|
i0.ɵɵelementEnd()()();
|
|
21962
22009
|
}
|
|
21963
22010
|
if (rf & 2) {
|
|
21964
|
-
i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
22011
|
+
i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
|
|
21965
22012
|
i0.ɵɵadvance(3);
|
|
21966
22013
|
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
21967
22014
|
i0.ɵɵadvance(1);
|
|
@@ -22359,7 +22406,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_co
|
|
|
22359
22406
|
i0.ɵɵelementContainer(0);
|
|
22360
22407
|
}
|
|
22361
22408
|
}
|
|
22362
|
-
const _c1$
|
|
22409
|
+
const _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
|
|
22363
22410
|
function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) {
|
|
22364
22411
|
if (rf & 1) {
|
|
22365
22412
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -22372,7 +22419,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Templ
|
|
|
22372
22419
|
i0.ɵɵnextContext();
|
|
22373
22420
|
const _r1 = i0.ɵɵreference(13);
|
|
22374
22421
|
i0.ɵɵadvance(1);
|
|
22375
|
-
i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$
|
|
22422
|
+
i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
|
|
22376
22423
|
}
|
|
22377
22424
|
}
|
|
22378
22425
|
function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) {
|
|
@@ -22563,7 +22610,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) {
|
|
|
22563
22610
|
}
|
|
22564
22611
|
}
|
|
22565
22612
|
const _c0$s = [[["", "trigger", ""]]];
|
|
22566
|
-
const _c1$
|
|
22613
|
+
const _c1$9 = ["[trigger]"];
|
|
22567
22614
|
class CaseFileViewOverlayMenuComponent {
|
|
22568
22615
|
constructor() {
|
|
22569
22616
|
this.title = '';
|
|
@@ -22577,7 +22624,7 @@ class CaseFileViewOverlayMenuComponent {
|
|
|
22577
22624
|
}
|
|
22578
22625
|
}
|
|
22579
22626
|
CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
|
|
22580
|
-
CaseFileViewOverlayMenuComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$
|
|
22627
|
+
CaseFileViewOverlayMenuComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$9, decls: 5, vars: 4, consts: [["type", "button", "cdkOverlayOrigin", "", 1, "overlay-toggle", 3, "click"], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass", "backdropClick"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], [1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], [1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) {
|
|
22581
22628
|
if (rf & 1) {
|
|
22582
22629
|
i0.ɵɵprojectionDef(_c0$s);
|
|
22583
22630
|
i0.ɵɵelementStart(0, "div")(1, "button", 0, 1);
|
|
@@ -24838,7 +24885,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template(rf, ctx) {
|
|
|
24838
24885
|
}
|
|
24839
24886
|
}
|
|
24840
24887
|
const _c0$n = function (a0) { return { "form-group-error": a0 }; };
|
|
24841
|
-
const _c1$
|
|
24888
|
+
const _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
|
|
24842
24889
|
function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) {
|
|
24843
24890
|
if (rf & 1) {
|
|
24844
24891
|
i0.ɵɵelementStart(0, "div", 18)(1, "div", 3)(2, "label", 19);
|
|
@@ -24860,7 +24907,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) {
|
|
|
24860
24907
|
i0.ɵɵadvance(3);
|
|
24861
24908
|
i0.ɵɵproperty("ngIf", ctx_r7.flagTypeErrorMessage.length > 0);
|
|
24862
24909
|
i0.ɵɵadvance(1);
|
|
24863
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c1$
|
|
24910
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c1$8, ctx_r7.flagTypeErrorMessage.length > 0))("name", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION)("formControlName", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION);
|
|
24864
24911
|
i0.ɵɵadvance(1);
|
|
24865
24912
|
i0.ɵɵproperty("ngIf", !ctx_r7.isDisplayContextParameterExternal && !ctx_r7.isCaseLevelFlag && ctx_r7.isDisplayContextParameter2Point1Enabled);
|
|
24866
24913
|
}
|
|
@@ -25430,7 +25477,7 @@ function UpdateFlagComponent_div_22_Template(rf, ctx) {
|
|
|
25430
25477
|
i0.ɵɵproperty("ngIf", ctx_r9.selectedFlag.flagDetailDisplay.flagDetail.status === "Active");
|
|
25431
25478
|
}
|
|
25432
25479
|
}
|
|
25433
|
-
const _c1$
|
|
25480
|
+
const _c1$7 = function (a0) { return { "form-group-error": a0 }; };
|
|
25434
25481
|
class UpdateFlagComponent {
|
|
25435
25482
|
constructor(rpxTranslationService) {
|
|
25436
25483
|
this.rpxTranslationService = rpxTranslationService;
|
|
@@ -25639,7 +25686,7 @@ UpdateFlagComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateF
|
|
|
25639
25686
|
const _r3 = i0.ɵɵreference(17);
|
|
25640
25687
|
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
25641
25688
|
i0.ɵɵadvance(2);
|
|
25642
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$
|
|
25689
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$7, ctx.errorMessages.length > 0));
|
|
25643
25690
|
i0.ɵɵadvance(3);
|
|
25644
25691
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 13, ctx.updateFlagTitle), " ");
|
|
25645
25692
|
i0.ɵɵadvance(2);
|
|
@@ -27035,7 +27082,7 @@ const CUSTOM_MOMENT_FORMATS = {
|
|
|
27035
27082
|
};
|
|
27036
27083
|
|
|
27037
27084
|
const _c0$g = ["picker"];
|
|
27038
|
-
const _c1$
|
|
27085
|
+
const _c1$6 = ["input"];
|
|
27039
27086
|
function DatetimePickerComponent_span_3_Template(rf, ctx) {
|
|
27040
27087
|
if (rf & 1) {
|
|
27041
27088
|
i0.ɵɵelementStart(0, "span", 11);
|
|
@@ -27099,7 +27146,7 @@ function DatetimePickerComponent_span_7_Template(rf, ctx) {
|
|
|
27099
27146
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "This date is later than the maximum date allowed"));
|
|
27100
27147
|
}
|
|
27101
27148
|
}
|
|
27102
|
-
const _c2$
|
|
27149
|
+
const _c2$2 = function (a0) { return { "form-group-error": a0 }; };
|
|
27103
27150
|
class DatetimePickerComponent extends AbstractFormFieldComponent {
|
|
27104
27151
|
constructor(formatTranslationService, ngxMatDateFormats) {
|
|
27105
27152
|
super();
|
|
@@ -27265,7 +27312,7 @@ DatetimePickerComponent.ɵfac = function DatetimePickerComponent_Factory(t) { re
|
|
|
27265
27312
|
DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DatetimePickerComponent, selectors: [["ccd-datetime-picker"]], viewQuery: function DatetimePickerComponent_Query(rf, ctx) {
|
|
27266
27313
|
if (rf & 1) {
|
|
27267
27314
|
i0.ɵɵviewQuery(_c0$g, 5);
|
|
27268
|
-
i0.ɵɵviewQuery(_c1$
|
|
27315
|
+
i0.ɵɵviewQuery(_c1$6, 5);
|
|
27269
27316
|
}
|
|
27270
27317
|
if (rf & 2) {
|
|
27271
27318
|
let _t;
|
|
@@ -27301,7 +27348,7 @@ DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Dat
|
|
|
27301
27348
|
}
|
|
27302
27349
|
if (rf & 2) {
|
|
27303
27350
|
const _r6 = i0.ɵɵreference(13);
|
|
27304
|
-
i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$
|
|
27351
|
+
i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$2, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
|
|
27305
27352
|
i0.ɵɵadvance(3);
|
|
27306
27353
|
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
27307
27354
|
i0.ɵɵadvance(1);
|
|
@@ -27555,7 +27602,7 @@ function EventLogTableComponent_tr_20_div_6_Template(rf, ctx) {
|
|
|
27555
27602
|
i0.ɵɵtextInterpolate(ctx_r5.getSignificantItemDesc(event_r1));
|
|
27556
27603
|
}
|
|
27557
27604
|
}
|
|
27558
|
-
const _c1$
|
|
27605
|
+
const _c1$5 = function (a0) { return { "EventLogTable-Selected": a0 }; };
|
|
27559
27606
|
function EventLogTableComponent_tr_20_Template(rf, ctx) {
|
|
27560
27607
|
if (rf & 1) {
|
|
27561
27608
|
const _r18 = i0.ɵɵgetCurrentView();
|
|
@@ -27588,7 +27635,7 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) {
|
|
|
27588
27635
|
if (rf & 2) {
|
|
27589
27636
|
const event_r1 = ctx.$implicit;
|
|
27590
27637
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
27591
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$
|
|
27638
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$5, ctx_r0.selected === event_r1));
|
|
27592
27639
|
i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforRow(event_r1));
|
|
27593
27640
|
i0.ɵɵadvance(2);
|
|
27594
27641
|
i0.ɵɵproperty("ngSwitch", ctx_r0.isPartOfCaseTimeline);
|
|
@@ -29656,6 +29703,36 @@ function CaseEditSubmitComponent_div_0_ng_container_13_Template(rf, ctx) {
|
|
|
29656
29703
|
i0.ɵɵproperty("ngForOf", ctx_r8.showSummaryFields);
|
|
29657
29704
|
}
|
|
29658
29705
|
}
|
|
29706
|
+
function CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template(rf, ctx) {
|
|
29707
|
+
if (rf & 1) {
|
|
29708
|
+
i0.ɵɵelementStart(0, "span", 48);
|
|
29709
|
+
i0.ɵɵtext(1);
|
|
29710
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
29711
|
+
i0.ɵɵpipe(3, "ccdFirstError");
|
|
29712
|
+
i0.ɵɵelementEnd();
|
|
29713
|
+
}
|
|
29714
|
+
if (rf & 2) {
|
|
29715
|
+
const ctx_r36 = i0.ɵɵnextContext(3);
|
|
29716
|
+
i0.ɵɵadvance(1);
|
|
29717
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r36.summary.errors, ctx_r36.eventSummaryLabel)), " ");
|
|
29718
|
+
}
|
|
29719
|
+
}
|
|
29720
|
+
function CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template(rf, ctx) {
|
|
29721
|
+
if (rf & 1) {
|
|
29722
|
+
i0.ɵɵelementStart(0, "span", 48);
|
|
29723
|
+
i0.ɵɵtext(1);
|
|
29724
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
29725
|
+
i0.ɵɵpipe(3, "ccdFirstError");
|
|
29726
|
+
i0.ɵɵelementEnd();
|
|
29727
|
+
}
|
|
29728
|
+
if (rf & 2) {
|
|
29729
|
+
const ctx_r37 = i0.ɵɵnextContext(3);
|
|
29730
|
+
i0.ɵɵadvance(1);
|
|
29731
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r37.description.errors, ctx_r37.eventDescriptionLabel)), " ");
|
|
29732
|
+
}
|
|
29733
|
+
}
|
|
29734
|
+
const _c1$4 = function (a0) { return { "form-group-error": a0 }; };
|
|
29735
|
+
const _c2$1 = function (a0) { return { "govuk-input--error": a0 }; };
|
|
29659
29736
|
function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) {
|
|
29660
29737
|
if (rf & 1) {
|
|
29661
29738
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -29666,21 +29743,38 @@ function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) {
|
|
|
29666
29743
|
i0.ɵɵelementStart(6, "span", 43);
|
|
29667
29744
|
i0.ɵɵtext(7, "A few words describing the purpose of the event.");
|
|
29668
29745
|
i0.ɵɵelementEnd()();
|
|
29669
|
-
i0.ɵɵ
|
|
29746
|
+
i0.ɵɵtemplate(8, CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template, 4, 6, "span", 44);
|
|
29747
|
+
i0.ɵɵelement(9, "input", 45);
|
|
29670
29748
|
i0.ɵɵelementEnd();
|
|
29671
|
-
i0.ɵɵelementStart(
|
|
29672
|
-
i0.ɵɵtext(
|
|
29749
|
+
i0.ɵɵelementStart(10, "div", 41)(11, "label", 46);
|
|
29750
|
+
i0.ɵɵtext(12, "Event description (optional)");
|
|
29673
29751
|
i0.ɵɵelementEnd();
|
|
29674
|
-
i0.ɵɵ
|
|
29752
|
+
i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template, 4, 6, "span", 44);
|
|
29753
|
+
i0.ɵɵelement(14, "textarea", 47);
|
|
29675
29754
|
i0.ɵɵelementEnd()();
|
|
29676
29755
|
i0.ɵɵelementContainerEnd();
|
|
29677
29756
|
}
|
|
29757
|
+
if (rf & 2) {
|
|
29758
|
+
const ctx_r9 = i0.ɵɵnextContext(2);
|
|
29759
|
+
i0.ɵɵadvance(3);
|
|
29760
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c1$4, !!ctx_r9.summary && !ctx_r9.summary.valid && (ctx_r9.summary.dirty || ctx_r9.summary.touched)));
|
|
29761
|
+
i0.ɵɵadvance(5);
|
|
29762
|
+
i0.ɵɵproperty("ngIf", (ctx_r9.summary == null ? null : ctx_r9.summary.errors) && (ctx_r9.summary.dirty || ctx_r9.summary.touched));
|
|
29763
|
+
i0.ɵɵadvance(1);
|
|
29764
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c2$1, (ctx_r9.summary == null ? null : ctx_r9.summary.errors) && (ctx_r9.summary.dirty || ctx_r9.summary.touched)));
|
|
29765
|
+
i0.ɵɵadvance(1);
|
|
29766
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$4, !!ctx_r9.description && !ctx_r9.description.valid && (ctx_r9.description.dirty || ctx_r9.description.touched)));
|
|
29767
|
+
i0.ɵɵadvance(3);
|
|
29768
|
+
i0.ɵɵproperty("ngIf", (ctx_r9.description == null ? null : ctx_r9.description.errors) && (ctx_r9.description.dirty || ctx_r9.description.touched));
|
|
29769
|
+
i0.ɵɵadvance(1);
|
|
29770
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c2$1, (ctx_r9.description == null ? null : ctx_r9.description.errors) && (ctx_r9.description.dirty || ctx_r9.description.touched)));
|
|
29771
|
+
}
|
|
29678
29772
|
}
|
|
29679
29773
|
function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) {
|
|
29680
29774
|
if (rf & 1) {
|
|
29681
|
-
const
|
|
29682
|
-
i0.ɵɵelementStart(0, "button",
|
|
29683
|
-
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_button_16_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
29775
|
+
const _r39 = i0.ɵɵgetCurrentView();
|
|
29776
|
+
i0.ɵɵelementStart(0, "button", 49);
|
|
29777
|
+
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_button_16_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r39); const ctx_r38 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r38.previous()); });
|
|
29684
29778
|
i0.ɵɵtext(1);
|
|
29685
29779
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
29686
29780
|
i0.ɵɵelementEnd();
|
|
@@ -29694,7 +29788,7 @@ function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) {
|
|
|
29694
29788
|
}
|
|
29695
29789
|
function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
|
|
29696
29790
|
if (rf & 1) {
|
|
29697
|
-
const
|
|
29791
|
+
const _r41 = i0.ɵɵgetCurrentView();
|
|
29698
29792
|
i0.ɵɵelementStart(0, "div")(1, "h1", 2);
|
|
29699
29793
|
i0.ɵɵtext(2);
|
|
29700
29794
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
@@ -29704,13 +29798,13 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
|
|
|
29704
29798
|
i0.ɵɵtemplate(7, CaseEditSubmitComponent_div_0_ng_template_7_Template, 1, 1, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor);
|
|
29705
29799
|
i0.ɵɵelement(9, "ccd-case-edit-generic-errors", 6);
|
|
29706
29800
|
i0.ɵɵelementStart(10, "ccd-callback-errors", 7);
|
|
29707
|
-
i0.ɵɵlistener("callbackErrorsContext", function CaseEditSubmitComponent_div_0_Template_ccd_callback_errors_callbackErrorsContext_10_listener($event) { i0.ɵɵrestoreView(
|
|
29801
|
+
i0.ɵɵlistener("callbackErrorsContext", function CaseEditSubmitComponent_div_0_Template_ccd_callback_errors_callbackErrorsContext_10_listener($event) { i0.ɵɵrestoreView(_r41); const ctx_r40 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r40.callbackErrorsNotify($event)); });
|
|
29708
29802
|
i0.ɵɵelementEnd();
|
|
29709
29803
|
i0.ɵɵelementStart(11, "form", 8);
|
|
29710
|
-
i0.ɵɵlistener("submit", function CaseEditSubmitComponent_div_0_Template_form_submit_11_listener() { i0.ɵɵrestoreView(
|
|
29804
|
+
i0.ɵɵlistener("submit", function CaseEditSubmitComponent_div_0_Template_form_submit_11_listener() { i0.ɵɵrestoreView(_r41); const ctx_r42 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r42.submit()); });
|
|
29711
29805
|
i0.ɵɵtemplate(12, CaseEditSubmitComponent_div_0_ng_container_12_Template, 8, 5, "ng-container", 0);
|
|
29712
29806
|
i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_13_Template, 4, 1, "ng-container", 0);
|
|
29713
|
-
i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template,
|
|
29807
|
+
i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 15, 14, "ng-container", 0);
|
|
29714
29808
|
i0.ɵɵelementStart(15, "div", 9);
|
|
29715
29809
|
i0.ɵɵtemplate(16, CaseEditSubmitComponent_div_0_button_16_Template, 3, 4, "button", 10);
|
|
29716
29810
|
i0.ɵɵelementStart(17, "button", 11);
|
|
@@ -29718,7 +29812,7 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
|
|
|
29718
29812
|
i0.ɵɵpipe(19, "rpxTranslate");
|
|
29719
29813
|
i0.ɵɵelementEnd()();
|
|
29720
29814
|
i0.ɵɵelementStart(20, "p", 12)(21, "a", 13);
|
|
29721
|
-
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_Template_a_click_21_listener() { i0.ɵɵrestoreView(
|
|
29815
|
+
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_Template_a_click_21_listener() { i0.ɵɵrestoreView(_r41); const ctx_r43 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r43.cancel()); });
|
|
29722
29816
|
i0.ɵɵtext(22);
|
|
29723
29817
|
i0.ɵɵpipe(23, "rpxTranslate");
|
|
29724
29818
|
i0.ɵɵelementEnd()()()();
|
|
@@ -29757,9 +29851,9 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
|
|
|
29757
29851
|
}
|
|
29758
29852
|
function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
|
|
29759
29853
|
if (rf & 1) {
|
|
29760
|
-
const
|
|
29761
|
-
i0.ɵɵelementStart(0, "ccd-case-event-completion",
|
|
29762
|
-
i0.ɵɵlistener("eventCanBeCompleted", function CaseEditSubmitComponent_ccd_case_event_completion_1_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0.ɵɵrestoreView(
|
|
29854
|
+
const _r45 = i0.ɵɵgetCurrentView();
|
|
29855
|
+
i0.ɵɵelementStart(0, "ccd-case-event-completion", 50);
|
|
29856
|
+
i0.ɵɵlistener("eventCanBeCompleted", function CaseEditSubmitComponent_ccd_case_event_completion_1_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0.ɵɵrestoreView(_r45); const ctx_r44 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r44.onEventCanBeCompleted($event)); });
|
|
29763
29857
|
i0.ɵɵelementEnd();
|
|
29764
29858
|
}
|
|
29765
29859
|
if (rf & 2) {
|
|
@@ -29769,14 +29863,17 @@ function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
|
|
|
29769
29863
|
}
|
|
29770
29864
|
// @dynamic
|
|
29771
29865
|
class CaseEditSubmitComponent {
|
|
29772
|
-
constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier) {
|
|
29866
|
+
constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier, formValidatorsService) {
|
|
29773
29867
|
this.caseEdit = caseEdit;
|
|
29774
29868
|
this.fieldsUtils = fieldsUtils;
|
|
29775
29869
|
this.caseFieldService = caseFieldService;
|
|
29776
29870
|
this.route = route;
|
|
29777
29871
|
this.orderService = orderService;
|
|
29778
29872
|
this.profileNotifier = profileNotifier;
|
|
29873
|
+
this.formValidatorsService = formValidatorsService;
|
|
29779
29874
|
this.paletteContext = PaletteContext.CHECK_YOUR_ANSWER;
|
|
29875
|
+
this.eventSummaryLabel = 'Event summary';
|
|
29876
|
+
this.eventDescriptionLabel = 'Event description';
|
|
29780
29877
|
}
|
|
29781
29878
|
get isDisabled() {
|
|
29782
29879
|
// EUI-3452.
|
|
@@ -29787,7 +29884,7 @@ class CaseEditSubmitComponent {
|
|
|
29787
29884
|
}
|
|
29788
29885
|
ngOnInit() {
|
|
29789
29886
|
var _a, _b, _c;
|
|
29790
|
-
this.profileSubscription = this.profileNotifier.profile.subscribe(_ => this.profile = _);
|
|
29887
|
+
this.profileSubscription = this.profileNotifier.profile.subscribe((_) => this.profile = _);
|
|
29791
29888
|
this.eventTrigger = this.caseEdit.eventTrigger;
|
|
29792
29889
|
this.triggerText = this.eventTrigger.end_button_label || CallbackErrorsComponent.TRIGGER_TEXT_SUBMIT;
|
|
29793
29890
|
this.editForm = this.caseEdit.form;
|
|
@@ -29800,10 +29897,12 @@ class CaseEditSubmitComponent {
|
|
|
29800
29897
|
// Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
|
|
29801
29898
|
// a FlagLauncher field in the event trigger
|
|
29802
29899
|
this.caseEdit.isCaseFlagSubmission =
|
|
29803
|
-
this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
|
|
29900
|
+
this.eventTrigger.case_fields.some((caseField) => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
|
|
29804
29901
|
this.caseEdit.isLinkedCasesSubmission =
|
|
29805
29902
|
this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']));
|
|
29806
29903
|
this.pageTitle = this.getPageTitle();
|
|
29904
|
+
this.summary = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.summary');
|
|
29905
|
+
this.description = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.description');
|
|
29807
29906
|
}
|
|
29808
29907
|
ngOnDestroy() {
|
|
29809
29908
|
/* istanbul ignore else */
|
|
@@ -29812,12 +29911,14 @@ class CaseEditSubmitComponent {
|
|
|
29812
29911
|
}
|
|
29813
29912
|
}
|
|
29814
29913
|
submit() {
|
|
29815
|
-
this.
|
|
29816
|
-
|
|
29817
|
-
|
|
29818
|
-
|
|
29819
|
-
|
|
29820
|
-
|
|
29914
|
+
if (this.summary.valid && this.description.valid) {
|
|
29915
|
+
this.caseEdit.submitForm({
|
|
29916
|
+
eventTrigger: this.eventTrigger,
|
|
29917
|
+
form: this.editForm,
|
|
29918
|
+
submit: this.caseEdit.submit,
|
|
29919
|
+
caseDetails: this.caseEdit.caseDetails
|
|
29920
|
+
});
|
|
29921
|
+
}
|
|
29821
29922
|
}
|
|
29822
29923
|
onEventCanBeCompleted(eventCanBeCompleted) {
|
|
29823
29924
|
this.caseEdit.onEventCanBeCompleted({
|
|
@@ -29825,7 +29926,7 @@ class CaseEditSubmitComponent {
|
|
|
29825
29926
|
eventCanBeCompleted,
|
|
29826
29927
|
caseDetails: this.caseEdit.caseDetails,
|
|
29827
29928
|
form: this.editForm,
|
|
29828
|
-
submit: this.caseEdit.submit
|
|
29929
|
+
submit: this.caseEdit.submit
|
|
29829
29930
|
});
|
|
29830
29931
|
}
|
|
29831
29932
|
getPageTitle() {
|
|
@@ -29901,7 +30002,7 @@ class CaseEditSubmitComponent {
|
|
|
29901
30002
|
}
|
|
29902
30003
|
}
|
|
29903
30004
|
readOnlySummaryFieldsToDisplayExists() {
|
|
29904
|
-
return this.eventTrigger.case_fields.some(field => field.show_summary_content_option >= 0);
|
|
30005
|
+
return this.eventTrigger.case_fields.some((field) => field.show_summary_content_option >= 0);
|
|
29905
30006
|
}
|
|
29906
30007
|
showEventNotes() {
|
|
29907
30008
|
var _a;
|
|
@@ -29917,7 +30018,7 @@ class CaseEditSubmitComponent {
|
|
|
29917
30018
|
}
|
|
29918
30019
|
getLastPageShown() {
|
|
29919
30020
|
let lastPage;
|
|
29920
|
-
this.wizard.reverse().forEach(page => {
|
|
30021
|
+
this.wizard.reverse().forEach((page) => {
|
|
29921
30022
|
if (!lastPage && this.isShown(page)) {
|
|
29922
30023
|
lastPage = page;
|
|
29923
30024
|
}
|
|
@@ -29936,7 +30037,7 @@ class CaseEditSubmitComponent {
|
|
|
29936
30037
|
}
|
|
29937
30038
|
isShown(page) {
|
|
29938
30039
|
const fields = this.fieldsUtils
|
|
29939
|
-
.mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls
|
|
30040
|
+
.mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls.data.value);
|
|
29940
30041
|
return page.parsedShowCondition.match(fields);
|
|
29941
30042
|
}
|
|
29942
30043
|
canShowFieldInCYA(field) {
|
|
@@ -29945,7 +30046,7 @@ class CaseEditSubmitComponent {
|
|
|
29945
30046
|
sortFieldsByShowSummaryContent(fields) {
|
|
29946
30047
|
return this.orderService
|
|
29947
30048
|
.sort(fields, CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION)
|
|
29948
|
-
.filter(cf => cf.show_summary_content_option);
|
|
30049
|
+
.filter((cf) => cf.show_summary_content_option);
|
|
29949
30050
|
}
|
|
29950
30051
|
getCaseFields() {
|
|
29951
30052
|
if (this.caseEdit.caseDetails) {
|
|
@@ -29964,9 +30065,7 @@ class CaseEditSubmitComponent {
|
|
|
29964
30065
|
if (this.eventTrigger.can_save_draft) {
|
|
29965
30066
|
return 'Return to case list';
|
|
29966
30067
|
}
|
|
29967
|
-
|
|
29968
|
-
return 'Cancel';
|
|
29969
|
-
}
|
|
30068
|
+
return 'Cancel';
|
|
29970
30069
|
}
|
|
29971
30070
|
}
|
|
29972
30071
|
CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
|
|
@@ -29980,8 +30079,8 @@ CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
|
|
|
29980
30079
|
}
|
|
29981
30080
|
return a.show_summary_content_option - b.show_summary_content_option;
|
|
29982
30081
|
};
|
|
29983
|
-
CaseEditSubmitComponent.ɵfac = function CaseEditSubmitComponent_Factory(t) { return new (t || CaseEditSubmitComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ProfileNotifier)); };
|
|
29984
|
-
CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditSubmitComponent, selectors: [["ccd-case-edit-submit"]], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], [3, "error"], [3, "callbackErrorsSubject", "callbackErrorsContext"], [1, "check-your-answers", 3, "formGroup", "submit"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["class", "text-16", 4, "ngIf"], ["aria-describedby", "check your answers table", 1, "form-table"], [4, "ngFor", "ngForOf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "hidden", "formGroup", "contextFields"], ["class", "valign-top case-field-label", 4, "ngIf"], [1, "form-cell", "case-field-content"], [3, "formGroup", "topLevelFormGroup", "caseField", "context", "caseFields"], [1, "valign-top", "case-field-label"], [1, "valign-top", "check-your-answers__change", "case-field-change"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "summary fields table", 1, "summary-fields"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["class", "compound-field", "ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], ["id", "summary-field-label"], [1, "form-cell"], [3, "formGroup", "caseField"], ["ccdLabelSubstitutor", "", 1, "compound-field", 3, "caseField", "formGroup", "contextFields"], ["colspan", "2"], [3, "formGroup", "caseField", "caseFields"], ["id", "fieldset-event", "formGroupName", "event"], [2, "display", "none"], [1, "form-group"], ["for", "field-trigger-summary", 1, "form-label"], [1, "form-hint"], ["type", "text", "id", "field-trigger-summary", "formControlName", "summary", "maxlength", "1024", 1, "form-control", "bottom-30", "width-50"], ["for", "field-trigger-description", 1, "form-label"], ["id", "field-trigger-description", "formControlName", "description", "maxlength", "65536", 1, "form-control", "bottom-30", "width-50"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditSubmitComponent_Template(rf, ctx) {
|
|
30082
|
+
CaseEditSubmitComponent.ɵfac = function CaseEditSubmitComponent_Factory(t) { return new (t || CaseEditSubmitComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ProfileNotifier), i0.ɵɵdirectiveInject(FormValidatorsService)); };
|
|
30083
|
+
CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditSubmitComponent, selectors: [["ccd-case-edit-submit"]], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], [3, "error"], [3, "callbackErrorsSubject", "callbackErrorsContext"], [1, "check-your-answers", 3, "formGroup", "submit"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["class", "text-16", 4, "ngIf"], ["aria-describedby", "check your answers table", 1, "form-table"], [4, "ngFor", "ngForOf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "hidden", "formGroup", "contextFields"], ["class", "valign-top case-field-label", 4, "ngIf"], [1, "form-cell", "case-field-content"], [3, "formGroup", "topLevelFormGroup", "caseField", "context", "caseFields"], [1, "valign-top", "case-field-label"], [1, "valign-top", "check-your-answers__change", "case-field-change"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "summary fields table", 1, "summary-fields"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["class", "compound-field", "ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], ["id", "summary-field-label"], [1, "form-cell"], [3, "formGroup", "caseField"], ["ccdLabelSubstitutor", "", 1, "compound-field", 3, "caseField", "formGroup", "contextFields"], ["colspan", "2"], [3, "formGroup", "caseField", "caseFields"], ["id", "fieldset-event", "formGroupName", "event"], [2, "display", "none"], [1, "form-group", 3, "ngClass"], ["for", "field-trigger-summary", 1, "form-label"], [1, "form-hint"], ["class", "error-message", 4, "ngIf"], ["type", "text", "id", "field-trigger-summary", "formControlName", "summary", "maxlength", "1024", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], ["for", "field-trigger-description", 1, "form-label"], ["id", "field-trigger-description", "formControlName", "description", "maxlength", "65536", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], [1, "error-message"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditSubmitComponent_Template(rf, ctx) {
|
|
29985
30084
|
if (rf & 1) {
|
|
29986
30085
|
i0.ɵɵtemplate(0, CaseEditSubmitComponent_div_0_Template, 24, 22, "div", 0);
|
|
29987
30086
|
i0.ɵɵtemplate(1, CaseEditSubmitComponent_ccd_case_event_completion_1_Template, 1, 1, "ccd-case-event-completion", 1);
|
|
@@ -29995,8 +30094,8 @@ CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Cas
|
|
|
29995
30094
|
(function () {
|
|
29996
30095
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
|
|
29997
30096
|
type: Component,
|
|
29998
|
-
args: [{ selector: 'ccd-case-edit-submit', template: "<div *ngIf=\"!caseEdit.isEventCompletionChecksRequired\">\n <!-- Event trigger name -->\n <h1 class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n\n <!--Case ID or Title -->\n <div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n <ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: contextFields : editForm.controls['data']\"></ccd-markdown>\n </ng-template>\n <ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n </ng-template>\n\n <ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\"></ccd-callback-errors>\n\n <form class=\"check-your-answers\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <ng-container *ngIf=\"checkYourAnswerFieldsToDisplayExists()\">\n\n <h2 class=\"heading-h2\">{{pageTitle | rpxTranslate }}</h2>\n <span class=\"text-16\" *ngIf=\"!caseEdit.isCaseFlagSubmission\">{{'Check the information below carefully.' | rpxTranslate}}</span>\n\n <table class=\"form-table\" aria-describedby=\"check your answers table\">\n <tbody>\n <ng-container *ngFor=\"let page of wizard.pages\">\n <ng-container *ngIf=\"isShown(page)\">\n <ng-container *ngFor=\"let field of page\n | ccdPageFields: editForm\n | ccdReadFieldsFilter: false :undefined :true :allFieldsValues\n | ccdCYAPageLabelFilter\">\n <ng-container *ngIf=\"canShowFieldInCYA(field)\">\n <tr ccdLabelSubstitutor [caseField]=\"field\" [hidden]=\"field.hidden\"\n [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th *ngIf=\"!isLabel(field) && !caseEdit.isCaseFlagSubmission\" class=\"valign-top case-field-label\">\n <span class=\"text-16\">{{field.label | rpxTranslate}}</span>\n </th>\n <td class=\"form-cell case-field-content\" [attr.colspan]=\"isLabel(field) ? '2' : '1'\">\n <ccd-field-read\n [formGroup]=\"editForm.controls['data']\" [topLevelFormGroup]=\"editForm.controls['data']\"\n [caseField]=\"summaryCaseField(field)\" [context]=\"paletteContext\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n <ng-container *ngIf=\"!caseEdit.isCaseFlagSubmission\">\n <td class=\"valign-top check-your-answers__change case-field-change\">\n <a *ngIf=\"isChangeAllowed(field)\" (click)=\"navigateToPage(page.id)\"\n href=\"javascript:void(0)\">\n <span class=\"text-16\" attr.aria-label=\"{{'Change' | rpxTranslate}} {{ field.label | rpxTranslate }}\">\n {{'Change' | rpxTranslate}}\n </span>\n </a>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"readOnlySummaryFieldsToDisplayExists()\">\n\n <table class=\"summary-fields\" aria-describedby=\"summary fields table\">\n <tbody>\n <ng-container *ngFor=\"let field of showSummaryFields\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th id=\"summary-field-label\">{{field.label}}</th>\n <td class=\"form-cell\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <td colspan=\"2\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"showEventNotes()\">\n <fieldset id=\"fieldset-event\" formGroupName=\"event\">\n <legend style=\"display: none;\"></legend>\n <div class=\"form-group\">\n <label for=\"field-trigger-summary\" class=\"form-label\">\n Event summary (optional)\n <span class=\"form-hint\">A few words describing the purpose of the event.</span>\n </label>\n <input type=\"text\" id=\"field-trigger-summary\" class=\"form-control bottom-30 width-50\" formControlName=\"summary\" maxlength=\"1024\">\n </div>\n <div class=\"form-group\">\n <label for=\"field-trigger-description\" class=\"form-label\">Event description (optional)</label>\n <textarea id=\"field-trigger-description\" class=\"form-control bottom-30 width-50\" formControlName=\"description\"\n
|
|
29999
|
-
}], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }]; }, null);
|
|
30097
|
+
args: [{ selector: 'ccd-case-edit-submit', template: "<div *ngIf=\"!caseEdit.isEventCompletionChecksRequired\">\n <!-- Event trigger name -->\n <h1 class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n\n <!--Case ID or Title -->\n <div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n <ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: contextFields : editForm.controls['data']\"></ccd-markdown>\n </ng-template>\n <ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n </ng-template>\n\n <ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\"></ccd-callback-errors>\n\n <form class=\"check-your-answers\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <ng-container *ngIf=\"checkYourAnswerFieldsToDisplayExists()\">\n\n <h2 class=\"heading-h2\">{{pageTitle | rpxTranslate }}</h2>\n <span class=\"text-16\" *ngIf=\"!caseEdit.isCaseFlagSubmission\">{{'Check the information below carefully.' | rpxTranslate}}</span>\n\n <table class=\"form-table\" aria-describedby=\"check your answers table\">\n <tbody>\n <ng-container *ngFor=\"let page of wizard.pages\">\n <ng-container *ngIf=\"isShown(page)\">\n <ng-container *ngFor=\"let field of page\n | ccdPageFields: editForm\n | ccdReadFieldsFilter: false :undefined :true :allFieldsValues\n | ccdCYAPageLabelFilter\">\n <ng-container *ngIf=\"canShowFieldInCYA(field)\">\n <tr ccdLabelSubstitutor [caseField]=\"field\" [hidden]=\"field.hidden\"\n [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th *ngIf=\"!isLabel(field) && !caseEdit.isCaseFlagSubmission\" class=\"valign-top case-field-label\">\n <span class=\"text-16\">{{field.label | rpxTranslate}}</span>\n </th>\n <td class=\"form-cell case-field-content\" [attr.colspan]=\"isLabel(field) ? '2' : '1'\">\n <ccd-field-read\n [formGroup]=\"editForm.controls['data']\" [topLevelFormGroup]=\"editForm.controls['data']\"\n [caseField]=\"summaryCaseField(field)\" [context]=\"paletteContext\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n <ng-container *ngIf=\"!caseEdit.isCaseFlagSubmission\">\n <td class=\"valign-top check-your-answers__change case-field-change\">\n <a *ngIf=\"isChangeAllowed(field)\" (click)=\"navigateToPage(page.id)\"\n href=\"javascript:void(0)\">\n <span class=\"text-16\" attr.aria-label=\"{{'Change' | rpxTranslate}} {{ field.label | rpxTranslate }}\">\n {{'Change' | rpxTranslate}}\n </span>\n </a>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"readOnlySummaryFieldsToDisplayExists()\">\n\n <table class=\"summary-fields\" aria-describedby=\"summary fields table\">\n <tbody>\n <ng-container *ngFor=\"let field of showSummaryFields\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th id=\"summary-field-label\">{{field.label}}</th>\n <td class=\"form-cell\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <td colspan=\"2\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"showEventNotes()\">\n <fieldset id=\"fieldset-event\" formGroupName=\"event\">\n <legend style=\"display: none;\"></legend>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!summary && !summary.valid && (summary.dirty || summary.touched)}\">\n <label for=\"field-trigger-summary\" class=\"form-label\">\n Event summary (optional)\n <span class=\"form-hint\">A few words describing the purpose of the event.</span>\n </label>\n <span class=\"error-message\" *ngIf=\"summary?.errors && (summary.dirty || summary.touched)\">\n {{summary.errors | ccdFirstError: eventSummaryLabel | rpxTranslate}}\n </span>\n <input type=\"text\" id=\"field-trigger-summary\" class=\"form-control bottom-30 width-50\"\n [ngClass]=\"{'govuk-input--error': summary?.errors && (summary.dirty || summary.touched)}\" formControlName=\"summary\" maxlength=\"1024\">\n </div>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!description && !description.valid && (description.dirty || description.touched)}\">\n <label for=\"field-trigger-description\" class=\"form-label\">Event description (optional)</label>\n <span class=\"error-message\" *ngIf=\"description?.errors && (description.dirty || description.touched)\">\n {{description.errors | ccdFirstError: eventDescriptionLabel | rpxTranslate}}\n </span>\n <textarea id=\"field-trigger-description\" class=\"form-control bottom-30 width-50\" formControlName=\"description\"\n [ngClass]=\"{'govuk-input--error': description?.errors && (description.dirty || description.touched)}\" maxlength=\"65536\"></textarea>\n </div>\n </fieldset>\n </ng-container>\n <div class=\"form-group form-group-related\">\n <button *ngIf=\"!caseEdit.isCaseFlagSubmission\" class=\"button button-secondary\" type=\"button\" [disabled]=\"!hasPrevious() || caseEdit.isSubmitting\" (click)=\"previous()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button type=\"submit\" [disabled]=\"isDisabled\" class=\"button\">\n {{triggerText | rpxTranslate}}\n </button>\n </div>\n <p class=\"cancel\">\n <a (click)=\"cancel()\" href=\"javascript:void(0)\" [class.disabled]=\"caseEdit.isSubmitting\">{{getCancelText() | rpxTranslate}}</a>\n </p>\n </form>\n</div>\n<ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n</ccd-case-event-completion>\n", styles: ["#fieldset-case-data{margin-bottom:30px}#fieldset-case-data th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}#confirmation-header{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body{width:630px;background-color:#fff}.valign-top{vertical-align:top}.summary-fields{margin-bottom:30px}.summary-fields tbody tr th,.summary-fields tbody tr td{border-bottom:0px}a.disabled{pointer-events:none;cursor:default}.case-field-label{width:45%}.case-field-content{width:50%}.no-bottom-border{border-bottom:none}.case-field-change{width:5%}\n"] }]
|
|
30098
|
+
}], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: FormValidatorsService }]; }, null);
|
|
30000
30099
|
})();
|
|
30001
30100
|
|
|
30002
30101
|
function CaseProgressComponent_div_0_Template(rf, ctx) {
|
|
@@ -30394,7 +30493,7 @@ i0.ɵɵsetComponentScope(CaseEditPageComponent, function () {
|
|
|
30394
30493
|
CaseEditGenericErrorsComponent];
|
|
30395
30494
|
}, function () { return [i4.AsyncPipe, CaseReferencePipe, CcdCaseTitlePipe, i1.RpxTranslatePipe]; });
|
|
30396
30495
|
i0.ɵɵsetComponentScope(CaseEditFormComponent, function () { return [i4.NgForOf, i4.NgIf, i4.NgSwitch, i4.NgSwitchCase, i3.NgControlStatusGroup, i3.FormGroupDirective, LabelSubstitutorDirective, ConditionalShowFormDirective, FieldReadComponent, FieldWriteComponent]; }, function () { return [IsCompoundPipe, IsReadOnlyAndNotCollectionPipe]; });
|
|
30397
|
-
i0.ɵɵsetComponentScope(CaseEditSubmitComponent, function () { return [i4.NgForOf, i4.NgIf, i4.NgSwitch, i4.NgSwitchCase, i3.ɵNgNoValidate, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.MaxLengthValidator, i3.FormGroupDirective, i3.FormControlName, i3.FormGroupName, LabelSubstitutorDirective, CallbackErrorsComponent, MarkdownComponent, FieldReadComponent, CaseEventCompletionComponent, CaseEditGenericErrorsComponent]; }, function () { return [IsCompoundPipe, CaseReferencePipe, CcdCaseTitlePipe, CcdCYAPageLabelFilterPipe, ReadFieldsFilterPipe, CcdPageFieldsPipe, i1.RpxTranslatePipe]; });
|
|
30496
|
+
i0.ɵɵsetComponentScope(CaseEditSubmitComponent, function () { return [i4.NgClass, i4.NgForOf, i4.NgIf, i4.NgSwitch, i4.NgSwitchCase, i3.ɵNgNoValidate, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.MaxLengthValidator, i3.FormGroupDirective, i3.FormControlName, i3.FormGroupName, LabelSubstitutorDirective, CallbackErrorsComponent, MarkdownComponent, FieldReadComponent, CaseEventCompletionComponent, CaseEditGenericErrorsComponent]; }, function () { return [FirstErrorPipe, IsCompoundPipe, CaseReferencePipe, CcdCaseTitlePipe, CcdCYAPageLabelFilterPipe, ReadFieldsFilterPipe, CcdPageFieldsPipe, i1.RpxTranslatePipe]; });
|
|
30398
30497
|
i0.ɵɵsetComponentScope(CaseCreateComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
|
|
30399
30498
|
i0.ɵɵsetComponentScope(CaseProgressComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
|
|
30400
30499
|
|