@hmcts/ccd-case-ui-toolkit 7.0.18-pre-release → 7.0.18-rc2
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/commons/address-validation-constants.mjs +13 -0
- package/esm2020/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.mjs +15 -6
- package/esm2020/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.mjs +38 -83
- package/esm2020/lib/shared/components/case-editor/case-editor.module.mjs +5 -6
- package/esm2020/lib/shared/components/event-trigger/event-trigger.component.mjs +3 -3
- package/esm2020/lib/shared/components/palette/address/write-address-field.component.mjs +55 -18
- package/esm2020/lib/shared/components/palette/base-field/abstract-form-field.component.mjs +5 -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 +3 -20
- 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 +1 -4
- package/esm2020/lib/shared/domain/http/http-error.model.mjs +2 -2
- package/esm2020/lib/shared/services/addresses/addresses.service.mjs +9 -1
- package/esm2020/lib/shared/services/form/form-validators.service.mjs +2 -27
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +198 -224
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +192 -215
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/commons/address-validation-constants.d.ts +7 -0
- package/lib/shared/commons/address-validation-constants.d.ts.map +1 -0
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +3 -2
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts +3 -8
- package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts.map +1 -1
- package/lib/shared/components/palette/address/write-address-field.component.d.ts +5 -0
- package/lib/shared/components/palette/address/write-address-field.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 +1 -3
- 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/addresses/addresses.service.d.ts +3 -0
- package/lib/shared/services/addresses/addresses.service.d.ts.map +1 -1
- package/lib/shared/services/form/form-validators.service.d.ts +0 -4
- package/lib/shared/services/form/form-validators.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ import * as i1$1 from '@angular/router';
|
|
|
8
8
|
import { RouterModule, NavigationStart, NavigationEnd } from '@angular/router';
|
|
9
9
|
import * as i3 from '@angular/forms';
|
|
10
10
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormArray, FormGroup, FormControl, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
11
|
-
import { throwError, Subject, EMPTY, Observable, of,
|
|
11
|
+
import { throwError, Subject, EMPTY, BehaviorSubject, Observable, of, timer, fromEvent, forkJoin, Subscription, combineLatest } from 'rxjs';
|
|
12
12
|
import * as i1$2 from '@angular/common/http';
|
|
13
13
|
import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
14
14
|
import { catchError, map, switchMap, debounceTime, publish, refCount, delay, distinctUntilChanged, finalize, timeout, mergeMap, retryWhen, tap, delayWhen, publishReplay, take, first, takeUntil, filter } from 'rxjs/operators';
|
|
@@ -27,7 +27,6 @@ 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';
|
|
31
30
|
import * as i1$4 from 'ngx-md';
|
|
32
31
|
import { NgxMdModule } from 'ngx-md';
|
|
33
32
|
import * as i5 from '@angular/material/legacy-autocomplete';
|
|
@@ -134,11 +133,11 @@ function FooterComponent_div_3_Template(rf, ctx) {
|
|
|
134
133
|
}
|
|
135
134
|
}
|
|
136
135
|
const _c0$13 = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
|
|
137
|
-
const _c1$
|
|
136
|
+
const _c1$t = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
|
|
138
137
|
class FooterComponent {
|
|
139
138
|
}
|
|
140
139
|
FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
|
|
141
|
-
FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$
|
|
140
|
+
FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$t, 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) {
|
|
142
141
|
if (rf & 1) {
|
|
143
142
|
i0.ɵɵprojectionDef(_c0$13);
|
|
144
143
|
i0.ɵɵelementStart(0, "footer", 0)(1, "div", 1);
|
|
@@ -212,7 +211,7 @@ function HeaderBarComponent_div_10_Template(rf, ctx) {
|
|
|
212
211
|
}
|
|
213
212
|
}
|
|
214
213
|
const _c0$12 = [[["", "headerNavigation", ""]]];
|
|
215
|
-
const _c1$
|
|
214
|
+
const _c1$s = ["[headerNavigation]"];
|
|
216
215
|
class HeaderBarComponent {
|
|
217
216
|
constructor() {
|
|
218
217
|
this.signOutRequest = new EventEmitter();
|
|
@@ -222,7 +221,7 @@ class HeaderBarComponent {
|
|
|
222
221
|
}
|
|
223
222
|
}
|
|
224
223
|
HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
|
|
225
|
-
HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$
|
|
224
|
+
HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$s, 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) {
|
|
226
225
|
if (rf & 1) {
|
|
227
226
|
i0.ɵɵprojectionDef(_c0$12);
|
|
228
227
|
i0.ɵɵelementStart(0, "header", 0)(1, "div", 1)(2, "div", 2);
|
|
@@ -278,11 +277,11 @@ HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBa
|
|
|
278
277
|
})();
|
|
279
278
|
|
|
280
279
|
const _c0$11 = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
|
|
281
|
-
const _c1$
|
|
280
|
+
const _c1$r = ["[leftNavLinks]", "[rightNavLinks]"];
|
|
282
281
|
class NavigationComponent {
|
|
283
282
|
}
|
|
284
283
|
NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
|
|
285
|
-
NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$
|
|
284
|
+
NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$r, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) {
|
|
286
285
|
if (rf & 1) {
|
|
287
286
|
i0.ɵɵprojectionDef(_c0$11);
|
|
288
287
|
i0.ɵɵelementStart(0, "div")(1, "nav", 0);
|
|
@@ -413,11 +412,11 @@ HeadersModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModu
|
|
|
413
412
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(HeadersModule, { declarations: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent], imports: [CommonModule, RouterModule, i1.RpxTranslationModule], exports: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent] }); })();
|
|
414
413
|
|
|
415
414
|
const _c0$10 = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
|
|
416
|
-
const _c1$
|
|
415
|
+
const _c1$q = ["[topBody]", "[leftBody]", "[rightBody]"];
|
|
417
416
|
class BodyComponent {
|
|
418
417
|
}
|
|
419
418
|
BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
|
|
420
|
-
BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$
|
|
419
|
+
BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$q, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) {
|
|
421
420
|
if (rf & 1) {
|
|
422
421
|
i0.ɵɵprojectionDef(_c0$10);
|
|
423
422
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -1086,11 +1085,11 @@ NotificationBannerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
1086
1085
|
})();
|
|
1087
1086
|
|
|
1088
1087
|
const _c0$Z = function (a0) { return { "js-hidden": a0 }; };
|
|
1089
|
-
const _c1$
|
|
1088
|
+
const _c1$p = ["*"];
|
|
1090
1089
|
class TabComponent {
|
|
1091
1090
|
}
|
|
1092
1091
|
TabComponent.ɵfac = function TabComponent_Factory(t) { return new (t || TabComponent)(); };
|
|
1093
|
-
TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$
|
|
1092
|
+
TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$p, decls: 2, vars: 5, consts: [["role", "tabpanel", 1, "tabs-panel", 3, "id", "ngClass"]], template: function TabComponent_Template(rf, ctx) {
|
|
1094
1093
|
if (rf & 1) {
|
|
1095
1094
|
i0.ɵɵprojectionDef();
|
|
1096
1095
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -1116,8 +1115,8 @@ TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent,
|
|
|
1116
1115
|
})();
|
|
1117
1116
|
|
|
1118
1117
|
const _c0$Y = ["tab"];
|
|
1119
|
-
const _c1$
|
|
1120
|
-
const _c2$
|
|
1118
|
+
const _c1$o = function () { return ["."]; };
|
|
1119
|
+
const _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
|
|
1121
1120
|
function TabsComponent_li_2_Template(rf, ctx) {
|
|
1122
1121
|
if (rf & 1) {
|
|
1123
1122
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
@@ -1130,7 +1129,7 @@ function TabsComponent_li_2_Template(rf, ctx) {
|
|
|
1130
1129
|
if (rf & 2) {
|
|
1131
1130
|
const panel_r1 = ctx.$implicit;
|
|
1132
1131
|
i0.ɵɵadvance(1);
|
|
1133
|
-
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$
|
|
1132
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$o))("fragment", panel_r1.id)("ngClass", i0.ɵɵpureFunction1(9, _c2$3, panel_r1.selected));
|
|
1134
1133
|
i0.ɵɵattribute("aria-controls", panel_r1.id)("aria-selected", panel_r1.selected);
|
|
1135
1134
|
i0.ɵɵadvance(2);
|
|
1136
1135
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 6, panel_r1.title));
|
|
@@ -1336,7 +1335,7 @@ class HttpError {
|
|
|
1336
1335
|
const error = new HttpError();
|
|
1337
1336
|
// Check that the HttpErrorResponse contains an "error" object before mapping the error properties
|
|
1338
1337
|
if (!!(response && response.error)) {
|
|
1339
|
-
Object.keys(error).forEach(key => {
|
|
1338
|
+
Object.keys(error).forEach((key) => {
|
|
1340
1339
|
error[key] = response.error.hasOwnProperty(key) && response.error[key] ? response.error[key] : error[key];
|
|
1341
1340
|
});
|
|
1342
1341
|
}
|
|
@@ -2697,9 +2696,6 @@ class FirstErrorPipe {
|
|
|
2697
2696
|
else if (keys[0] === 'pattern') {
|
|
2698
2697
|
errorMessage = 'The data entered is not valid for %FIELDLABEL%';
|
|
2699
2698
|
}
|
|
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
|
-
}
|
|
2703
2699
|
else if (keys[0] === 'minlength') {
|
|
2704
2700
|
errorMessage = '%FIELDLABEL% is below the minimum length';
|
|
2705
2701
|
}
|
|
@@ -4548,7 +4544,6 @@ class FormValidatorsService {
|
|
|
4548
4544
|
FormValidatorsService.CUSTOM_VALIDATED_TYPES.indexOf(caseField.field_type.type) === -1) {
|
|
4549
4545
|
const validators = [Validators.required];
|
|
4550
4546
|
if (caseField.field_type.type === 'Text') {
|
|
4551
|
-
validators.push(this.markDownPatternValidator());
|
|
4552
4547
|
if (caseField.field_type.regular_expression) {
|
|
4553
4548
|
validators.push(Validators.pattern(caseField.field_type.regular_expression));
|
|
4554
4549
|
}
|
|
@@ -4562,38 +4557,22 @@ class FormValidatorsService {
|
|
|
4562
4557
|
validators.push(Validators.maxLength(caseField.field_type.max));
|
|
4563
4558
|
}
|
|
4564
4559
|
}
|
|
4565
|
-
if (caseField.field_type.type === 'TextArea') {
|
|
4566
|
-
validators.push(this.emptyValidator());
|
|
4567
|
-
validators.push(this.markDownPatternValidator());
|
|
4568
|
-
}
|
|
4569
4560
|
if (control.validator) {
|
|
4570
4561
|
validators.push(control.validator);
|
|
4571
4562
|
}
|
|
4572
4563
|
control.setValidators(validators);
|
|
4573
4564
|
}
|
|
4574
|
-
else if (caseField.display_context === 'OPTIONAL' && (caseField.field_type.type === 'Text' || caseField.field_type.type === 'TextArea')) {
|
|
4575
|
-
control.setValidators(this.markDownPatternValidator());
|
|
4576
|
-
}
|
|
4577
4565
|
return control;
|
|
4578
4566
|
}
|
|
4579
4567
|
static emptyValidator() {
|
|
4580
4568
|
const validator = (control) => {
|
|
4581
|
-
|
|
4582
|
-
if (((_a = control === null || control === void 0 ? void 0 : control.value) === null || _a === void 0 ? void 0 : _a.toString().trim().length) === 0) {
|
|
4569
|
+
if (control && control.value && control.value.toString().trim().length === 0) {
|
|
4583
4570
|
return { required: {} };
|
|
4584
4571
|
}
|
|
4585
4572
|
return null;
|
|
4586
4573
|
};
|
|
4587
4574
|
return validator;
|
|
4588
4575
|
}
|
|
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
|
-
}
|
|
4597
4576
|
// TODO: Strip this out as it's only here for the moment because
|
|
4598
4577
|
// the service is being injected all over the place but it doesn't
|
|
4599
4578
|
// need to be as FormValidatorsService.addValidators is perfectly
|
|
@@ -4601,20 +4580,10 @@ class FormValidatorsService {
|
|
|
4601
4580
|
addValidators(caseField, control) {
|
|
4602
4581
|
return FormValidatorsService.addValidators(caseField, control);
|
|
4603
4582
|
}
|
|
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
|
-
}
|
|
4612
4583
|
}
|
|
4613
4584
|
FormValidatorsService.CUSTOM_VALIDATED_TYPES = [
|
|
4614
4585
|
'Date', 'MoneyGBP', 'Label', 'JudicialUser'
|
|
4615
4586
|
];
|
|
4616
|
-
FormValidatorsService.DEFAULT_INPUT_TEXT = 'text';
|
|
4617
|
-
FormValidatorsService.DEFAULT_INPUT_TEXTAREA = 'textAreas';
|
|
4618
4587
|
FormValidatorsService.ɵfac = function FormValidatorsService_Factory(t) { return new (t || FormValidatorsService)(); };
|
|
4619
4588
|
FormValidatorsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormValidatorsService, factory: FormValidatorsService.ɵfac });
|
|
4620
4589
|
(function () {
|
|
@@ -4631,12 +4600,17 @@ class AbstractFormFieldComponent {
|
|
|
4631
4600
|
return this.idPrefix + this.caseField.id;
|
|
4632
4601
|
}
|
|
4633
4602
|
registerControl(control, replace = false) {
|
|
4603
|
+
var _a;
|
|
4634
4604
|
const container = this.parent || this.formGroup;
|
|
4635
4605
|
if (!container) {
|
|
4636
4606
|
return control;
|
|
4637
4607
|
}
|
|
4638
4608
|
const existing = container.controls[this.caseField.id];
|
|
4609
|
+
// update the field value which has been set in mid-event call back
|
|
4639
4610
|
if (existing) {
|
|
4611
|
+
if (existing.value === null && ((_a = this.caseField) === null || _a === void 0 ? void 0 : _a.value)) {
|
|
4612
|
+
existing.value = this.caseField.value;
|
|
4613
|
+
}
|
|
4640
4614
|
if (replace) {
|
|
4641
4615
|
// Set the validators on the replacement with what already exists.
|
|
4642
4616
|
control.setValidators(existing.validator);
|
|
@@ -6307,6 +6281,7 @@ class AddressesService {
|
|
|
6307
6281
|
constructor(http, appConfig) {
|
|
6308
6282
|
this.http = http;
|
|
6309
6283
|
this.appConfig = appConfig;
|
|
6284
|
+
this.mandatoryError = new BehaviorSubject(false);
|
|
6310
6285
|
}
|
|
6311
6286
|
getAddressesForPostcode(postcode) {
|
|
6312
6287
|
return this.http
|
|
@@ -6315,6 +6290,12 @@ class AddressesService {
|
|
|
6315
6290
|
.pipe(map(res => res.results))
|
|
6316
6291
|
.pipe(map(output => output.map(addresses => this.format(new AddressParser().parse(addresses[AddressType.DPA])))));
|
|
6317
6292
|
}
|
|
6293
|
+
getMandatoryError() {
|
|
6294
|
+
return this.mandatoryError.asObservable();
|
|
6295
|
+
}
|
|
6296
|
+
setMandatoryError(value) {
|
|
6297
|
+
this.mandatoryError.next(value);
|
|
6298
|
+
}
|
|
6318
6299
|
format(addressModel) {
|
|
6319
6300
|
return this.formatAddressLines(this.shiftAddressLinesUp(addressModel));
|
|
6320
6301
|
}
|
|
@@ -10034,7 +10015,7 @@ function CaseEditPageComponent_ccd_case_event_completion_11_Template(rf, ctx) {
|
|
|
10034
10015
|
}
|
|
10035
10016
|
}
|
|
10036
10017
|
class CaseEditPageComponent {
|
|
10037
|
-
constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService) {
|
|
10018
|
+
constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService, addressService) {
|
|
10038
10019
|
this.caseEdit = caseEdit;
|
|
10039
10020
|
this.route = route;
|
|
10040
10021
|
this.formValueService = formValueService;
|
|
@@ -10046,6 +10027,7 @@ class CaseEditPageComponent {
|
|
|
10046
10027
|
this.caseEditDataService = caseEditDataService;
|
|
10047
10028
|
this.loadingService = loadingService;
|
|
10048
10029
|
this.validPageListCaseFieldsService = validPageListCaseFieldsService;
|
|
10030
|
+
this.addressService = addressService;
|
|
10049
10031
|
this.triggerTextStart = CaseEditPageComponent.TRIGGER_TEXT_START;
|
|
10050
10032
|
this.triggerTextIgnoreWarnings = CaseEditPageComponent.TRIGGER_TEXT_CONTINUE;
|
|
10051
10033
|
this.formValuesChanged = false;
|
|
@@ -10170,7 +10152,14 @@ class CaseEditPageComponent {
|
|
|
10170
10152
|
}
|
|
10171
10153
|
}
|
|
10172
10154
|
if (fieldElement.hasError('required')) {
|
|
10173
|
-
|
|
10155
|
+
if (casefield.id === 'AddressLine1') {
|
|
10156
|
+
// EUI-1067 - Display more relevant error message to user and correctly navigate to the field
|
|
10157
|
+
this.addressService.setMandatoryError(true);
|
|
10158
|
+
this.caseEditDataService.addFormValidationError({ id: `${path}_${path}`, message: `An address is required` });
|
|
10159
|
+
}
|
|
10160
|
+
else {
|
|
10161
|
+
this.caseEditDataService.addFormValidationError({ id, message: `%FIELDLABEL% is required`, label });
|
|
10162
|
+
}
|
|
10174
10163
|
fieldElement.markAsDirty();
|
|
10175
10164
|
// For the JudicialUser field type, an error needs to be set on the component so that an error message
|
|
10176
10165
|
// can be displayed at field level
|
|
@@ -10245,6 +10234,7 @@ class CaseEditPageComponent {
|
|
|
10245
10234
|
}
|
|
10246
10235
|
}
|
|
10247
10236
|
if (!this.caseEdit.isSubmitting && !this.currentPageIsNotValid()) {
|
|
10237
|
+
this.addressService.setMandatoryError(false);
|
|
10248
10238
|
console.log('Case Edit Error', this.caseEdit.error);
|
|
10249
10239
|
if (this.caseEdit.validPageList.findIndex(page => page.id === this.currentPage.id) === -1) {
|
|
10250
10240
|
this.caseEdit.validPageList.push(this.currentPage);
|
|
@@ -10540,7 +10530,7 @@ CaseEditPageComponent.RESUMED_FORM_SAVE = 'RESUMED_FORM_SAVE';
|
|
|
10540
10530
|
CaseEditPageComponent.TRIGGER_TEXT_START = 'Continue';
|
|
10541
10531
|
CaseEditPageComponent.TRIGGER_TEXT_SAVE = 'Save and continue';
|
|
10542
10532
|
CaseEditPageComponent.TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
|
|
10543
|
-
CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$3.MatLegacyDialog), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService)); };
|
|
10533
|
+
CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$3.MatLegacyDialog), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService), i0.ɵɵdirectiveInject(AddressesService)); };
|
|
10544
10534
|
CaseEditPageComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]], decls: 12, vars: 11, consts: [[4, "ngIf"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [3, "error"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [1, "width-50"], ["class", "form", 3, "formGroup", "submit", 4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], ["class", "govuk-heading-l", 4, "ngIf"], [1, "govuk-heading-l"], [1, "govuk-caption-l"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], [1, "form", 3, "formGroup", "submit"], ["id", "fieldset-case-data"], [2, "display", "none"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "form-group", "form-group-related"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged"], [1, "grid-row"], [1, "column-two-thirds", "rightBorderSeparator"], ["id", "caseEditForm1", 3, "fields", "formGroup", "caseFields"], [1, "column-one-third"], ["id", "caseEditForm2", 3, "fields", "formGroup", "caseFields"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditPageComponent_Template(rf, ctx) {
|
|
10545
10535
|
if (rf & 1) {
|
|
10546
10536
|
i0.ɵɵtemplate(0, CaseEditPageComponent_ng_container_0_Template, 3, 2, "ng-container", 0);
|
|
@@ -10579,7 +10569,7 @@ CaseEditPageComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseE
|
|
|
10579
10569
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditPageComponent, [{
|
|
10580
10570
|
type: Component,
|
|
10581
10571
|
args: [{ selector: 'ccd-case-edit-page', template: "<ng-container *ngIf=\"currentPage\">\n <h1 *ngIf=\"!currentPage.label\" class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n <ng-container *ngIf=\"currentPage.label\">\n <span class=\"govuk-caption-l\">{{ eventTrigger.name | rpxTranslate}}</span>\n <h1 class=\"govuk-heading-l\">{{currentPage.label | rpxTranslate}}</h1>\n </ng-container>\n</ng-container>\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: caseFields : 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<!-- Error message summary -->\n<div *ngIf=\"validationErrors.length > 0\" class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{'There is a problem' | rpxTranslate}}\n </h2>\n <div *ngFor=\"let validationError of validationErrors\" class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a (click)=\"navigateToErrorElement(validationError.id)\" class=\"validation-error\">\n {{ validationError.message | rpxTranslate: getRpxTranslatePipeArgs(validationError.label | rpxTranslate): null }}\n </a>\n </li>\n </ul>\n </div>\n</div>\n\n<ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<div class=\"width-50\">\n <form *ngIf=\"currentPage\" class=\"form\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <fieldset id=\"fieldset-case-data\">\n <legend style=\"display: none;\"></legend>\n <!-- single column -->\n <ccd-case-edit-form id='caseEditForm' *ngIf=\"!currentPage.isMultiColumn()\" [fields]=\"currentPage.getCol1Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"\n [pageChangeSubject]=\"pageChangeSubject\"\n (valuesChanged)=\"applyValuesChanged($event)\"></ccd-case-edit-form>\n <!-- two columns -->\n <div *ngIf=\"currentPage.isMultiColumn()\" class=\"grid-row\">\n <div class=\"column-two-thirds rightBorderSeparator\">\n <ccd-case-edit-form id='caseEditForm1' [fields]=\"currentPage.getCol1Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"></ccd-case-edit-form>\n </div>\n <div class=\"column-one-third\">\n <ccd-case-edit-form id='caseEditForm2' [fields]=\"currentPage.getCol2Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"></ccd-case-edit-form>\n </div>\n </div>\n </fieldset>\n\n <div class=\"form-group form-group-related\">\n <button class=\"button button-secondary\" type=\"button\" [disabled]=\"!(hasPreviousPage$ | async)\" (click)=\"toPreviousPage()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button class=\"button\" type=\"submit\" [disabled]=\"submitting()\">{{triggerText | rpxTranslate}}</button>\n </div>\n\n <p class=\"cancel\"><a (click)=\"cancel()\" href=\"javascript:void(0)\">{{getCancelText() | rpxTranslate}}</a></p>\n </form>\n</div>\n\n<ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n</ccd-case-event-completion>\n", styles: [".rightBorderSeparator{border-right-width:4px;border-right-color:#ffcc02;border-right-style:solid}.validation-error{cursor:pointer;text-decoration:underline;color:#d4351c}\n"] }]
|
|
10582
|
-
}], function () { return [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatLegacyDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }]; }, null);
|
|
10572
|
+
}], function () { return [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatLegacyDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: AddressesService }]; }, null);
|
|
10583
10573
|
})();
|
|
10584
10574
|
|
|
10585
10575
|
class CallbackErrorsContext {
|
|
@@ -11071,6 +11061,19 @@ class AddressOption {
|
|
|
11071
11061
|
}
|
|
11072
11062
|
}
|
|
11073
11063
|
|
|
11064
|
+
class AddressValidationConstants {
|
|
11065
|
+
}
|
|
11066
|
+
// allow alpha-numeric characters and spaces possibly between a connecting - character
|
|
11067
|
+
// this applies validation while allowing partial postcodes
|
|
11068
|
+
AddressValidationConstants.REGEX_POSTCODE = /^([A-Za-z0-9]-*| )+$/;
|
|
11069
|
+
AddressValidationConstants.ɵfac = function AddressValidationConstants_Factory(t) { return new (t || AddressValidationConstants)(); };
|
|
11070
|
+
AddressValidationConstants.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AddressValidationConstants, factory: AddressValidationConstants.ɵfac });
|
|
11071
|
+
(function () {
|
|
11072
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressValidationConstants, [{
|
|
11073
|
+
type: Injectable
|
|
11074
|
+
}], null, null);
|
|
11075
|
+
})();
|
|
11076
|
+
|
|
11074
11077
|
const _c0$U = ["writeComplexFieldComponent"];
|
|
11075
11078
|
function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) {
|
|
11076
11079
|
if (rf & 1) {
|
|
@@ -11080,12 +11083,13 @@ function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) {
|
|
|
11080
11083
|
i0.ɵɵelementEnd();
|
|
11081
11084
|
}
|
|
11082
11085
|
if (rf & 2) {
|
|
11086
|
+
const ctx_r5 = i0.ɵɵnextContext(3);
|
|
11083
11087
|
i0.ɵɵadvance(1);
|
|
11084
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1,
|
|
11088
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r5.errorMessage));
|
|
11085
11089
|
}
|
|
11086
11090
|
}
|
|
11087
|
-
const _c1$
|
|
11088
|
-
const _c2$
|
|
11091
|
+
const _c1$n = function (a0) { return { "form-group-error": a0 }; };
|
|
11092
|
+
const _c2$2 = function (a0) { return { "govuk-input--error": a0 }; };
|
|
11089
11093
|
function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
|
|
11090
11094
|
if (rf & 1) {
|
|
11091
11095
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
@@ -11103,7 +11107,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
|
|
|
11103
11107
|
}
|
|
11104
11108
|
if (rf & 2) {
|
|
11105
11109
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
11106
|
-
i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$
|
|
11110
|
+
i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$n, ctx_r2.missingPostcode));
|
|
11107
11111
|
i0.ɵɵadvance(1);
|
|
11108
11112
|
i0.ɵɵproperty("for", ctx_r2.createElementId("postcodeInput"));
|
|
11109
11113
|
i0.ɵɵadvance(2);
|
|
@@ -11111,12 +11115,25 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
|
|
|
11111
11115
|
i0.ɵɵadvance(2);
|
|
11112
11116
|
i0.ɵɵproperty("ngIf", ctx_r2.missingPostcode);
|
|
11113
11117
|
i0.ɵɵadvance(1);
|
|
11114
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$
|
|
11118
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$2, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
|
|
11115
11119
|
i0.ɵɵadvance(2);
|
|
11116
11120
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 11, "Find address"));
|
|
11117
11121
|
}
|
|
11118
11122
|
}
|
|
11119
|
-
function
|
|
11123
|
+
function WriteAddressFieldComponent_div_1_div_5_span_5_Template(rf, ctx) {
|
|
11124
|
+
if (rf & 1) {
|
|
11125
|
+
i0.ɵɵelementStart(0, "span", 14);
|
|
11126
|
+
i0.ɵɵtext(1);
|
|
11127
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
11128
|
+
i0.ɵɵelementEnd();
|
|
11129
|
+
}
|
|
11130
|
+
if (rf & 2) {
|
|
11131
|
+
const ctx_r8 = i0.ɵɵnextContext(3);
|
|
11132
|
+
i0.ɵɵadvance(1);
|
|
11133
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r8.errorMessage));
|
|
11134
|
+
}
|
|
11135
|
+
}
|
|
11136
|
+
function WriteAddressFieldComponent_div_1_div_5_option_7_Template(rf, ctx) {
|
|
11120
11137
|
if (rf & 1) {
|
|
11121
11138
|
i0.ɵɵelementStart(0, "option", 18);
|
|
11122
11139
|
i0.ɵɵtext(1);
|
|
@@ -11124,31 +11141,35 @@ function WriteAddressFieldComponent_div_1_div_5_option_6_Template(rf, ctx) {
|
|
|
11124
11141
|
i0.ɵɵelementEnd();
|
|
11125
11142
|
}
|
|
11126
11143
|
if (rf & 2) {
|
|
11127
|
-
const
|
|
11128
|
-
i0.ɵɵproperty("ngValue",
|
|
11144
|
+
const addressOption_r10 = ctx.$implicit;
|
|
11145
|
+
i0.ɵɵproperty("ngValue", addressOption_r10.value);
|
|
11129
11146
|
i0.ɵɵadvance(1);
|
|
11130
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2,
|
|
11147
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, addressOption_r10.description), " ");
|
|
11131
11148
|
}
|
|
11132
11149
|
}
|
|
11133
11150
|
function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) {
|
|
11134
11151
|
if (rf & 1) {
|
|
11135
|
-
const
|
|
11152
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
11136
11153
|
i0.ɵɵelementStart(0, "div", 15)(1, "label", 9)(2, "span", 10);
|
|
11137
11154
|
i0.ɵɵtext(3);
|
|
11138
11155
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
11139
11156
|
i0.ɵɵelementEnd()();
|
|
11140
|
-
i0.ɵɵ
|
|
11141
|
-
i0.ɵɵ
|
|
11142
|
-
i0.ɵɵ
|
|
11157
|
+
i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_span_5_Template, 3, 3, "span", 11);
|
|
11158
|
+
i0.ɵɵelementStart(6, "select", 16);
|
|
11159
|
+
i0.ɵɵlistener("change", function WriteAddressFieldComponent_div_1_div_5_Template_select_change_6_listener() { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r11.addressSelected()); });
|
|
11160
|
+
i0.ɵɵtemplate(7, WriteAddressFieldComponent_div_1_div_5_option_7_Template, 3, 4, "option", 17);
|
|
11143
11161
|
i0.ɵɵelementEnd()();
|
|
11144
11162
|
}
|
|
11145
11163
|
if (rf & 2) {
|
|
11146
11164
|
const ctx_r3 = i0.ɵɵnextContext(2);
|
|
11165
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$n, ctx_r3.noAddressSelected));
|
|
11147
11166
|
i0.ɵɵadvance(1);
|
|
11148
11167
|
i0.ɵɵproperty("for", ctx_r3.createElementId("addressList"));
|
|
11149
11168
|
i0.ɵɵadvance(2);
|
|
11150
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4,
|
|
11169
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, "Select an address"));
|
|
11151
11170
|
i0.ɵɵadvance(2);
|
|
11171
|
+
i0.ɵɵproperty("ngIf", ctx_r3.noAddressSelected);
|
|
11172
|
+
i0.ɵɵadvance(1);
|
|
11152
11173
|
i0.ɵɵproperty("id", ctx_r3.createElementId("addressList"))("formControl", ctx_r3.addressList);
|
|
11153
11174
|
i0.ɵɵadvance(1);
|
|
11154
11175
|
i0.ɵɵproperty("ngForOf", ctx_r3.addressOptions);
|
|
@@ -11156,9 +11177,9 @@ function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) {
|
|
|
11156
11177
|
}
|
|
11157
11178
|
function WriteAddressFieldComponent_div_1_a_6_Template(rf, ctx) {
|
|
11158
11179
|
if (rf & 1) {
|
|
11159
|
-
const
|
|
11180
|
+
const _r14 = i0.ɵɵgetCurrentView();
|
|
11160
11181
|
i0.ɵɵelementStart(0, "a", 19);
|
|
11161
|
-
i0.ɵɵlistener("click", function WriteAddressFieldComponent_div_1_a_6_Template_a_click_0_listener() { i0.ɵɵrestoreView(
|
|
11182
|
+
i0.ɵɵlistener("click", function WriteAddressFieldComponent_div_1_a_6_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r13.blankAddress()); });
|
|
11162
11183
|
i0.ɵɵtext(1);
|
|
11163
11184
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
11164
11185
|
i0.ɵɵelementEnd();
|
|
@@ -11175,7 +11196,7 @@ function WriteAddressFieldComponent_div_1_Template(rf, ctx) {
|
|
|
11175
11196
|
i0.ɵɵpipe(3, "ccdFieldLabel");
|
|
11176
11197
|
i0.ɵɵelementEnd();
|
|
11177
11198
|
i0.ɵɵtemplate(4, WriteAddressFieldComponent_div_1_div_4_Template, 10, 17, "div", 5);
|
|
11178
|
-
i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_Template,
|
|
11199
|
+
i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_Template, 8, 11, "div", 6);
|
|
11179
11200
|
i0.ɵɵtemplate(6, WriteAddressFieldComponent_div_1_a_6_Template, 3, 3, "a", 7);
|
|
11180
11201
|
i0.ɵɵelementEnd();
|
|
11181
11202
|
}
|
|
@@ -11196,19 +11217,30 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
11196
11217
|
super();
|
|
11197
11218
|
this.isCompoundPipe = isCompoundPipe;
|
|
11198
11219
|
this.addressFormGroup = new FormGroup({});
|
|
11220
|
+
this.errorMessage = WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE;
|
|
11199
11221
|
this.missingPostcode = false;
|
|
11222
|
+
this.noAddressSelected = false;
|
|
11200
11223
|
this.addressesService = addressesService;
|
|
11201
11224
|
}
|
|
11202
11225
|
ngOnInit() {
|
|
11203
11226
|
if (!this.isComplexWithHiddenFields()) {
|
|
11204
|
-
this.postcode = new FormControl('');
|
|
11227
|
+
this.postcode = new FormControl('', [Validators.required]);
|
|
11205
11228
|
this.addressFormGroup.addControl('postcode', this.postcode);
|
|
11206
11229
|
this.addressList = new FormControl('');
|
|
11207
11230
|
this.addressFormGroup.addControl('address', this.addressList);
|
|
11208
11231
|
}
|
|
11232
|
+
this.addressesService.getMandatoryError().subscribe((value) => {
|
|
11233
|
+
this.updateErrorsOnContinue(value);
|
|
11234
|
+
});
|
|
11209
11235
|
}
|
|
11210
11236
|
findAddress() {
|
|
11237
|
+
this.noAddressSelected = false;
|
|
11211
11238
|
if (!this.postcode.value) {
|
|
11239
|
+
this.errorMessage = WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE;
|
|
11240
|
+
this.missingPostcode = true;
|
|
11241
|
+
}
|
|
11242
|
+
else if (!this.postcode.value.trim().match(AddressValidationConstants.REGEX_POSTCODE)) {
|
|
11243
|
+
this.errorMessage = WriteAddressFieldComponent.INVALID_ERROR_MESSAGE;
|
|
11212
11244
|
this.missingPostcode = true;
|
|
11213
11245
|
}
|
|
11214
11246
|
else {
|
|
@@ -11237,6 +11269,8 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
11237
11269
|
blankAddress() {
|
|
11238
11270
|
this.caseField.value = new AddressModel();
|
|
11239
11271
|
this.setFormValue();
|
|
11272
|
+
this.missingPostcode = false;
|
|
11273
|
+
this.noAddressSelected = false;
|
|
11240
11274
|
}
|
|
11241
11275
|
isComplexWithHiddenFields() {
|
|
11242
11276
|
if (this.caseField.isComplex() && this.caseField.field_type.complex_fields
|
|
@@ -11268,6 +11302,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
11268
11302
|
addressSelected() {
|
|
11269
11303
|
this.caseField.value = this.addressList.value;
|
|
11270
11304
|
this.setFormValue();
|
|
11305
|
+
this.noAddressSelected = false;
|
|
11271
11306
|
}
|
|
11272
11307
|
ngOnChanges(changes) {
|
|
11273
11308
|
super.ngOnChanges(changes);
|
|
@@ -11288,7 +11323,14 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
11288
11323
|
this.writeComplexFieldComponent.complexGroup.setValue(this.caseField.value);
|
|
11289
11324
|
}
|
|
11290
11325
|
}
|
|
11326
|
+
updateErrorsOnContinue(value) {
|
|
11327
|
+
this.missingPostcode = value && !this.shouldShowDetailFields() && !this.addressOptions;
|
|
11328
|
+
this.noAddressSelected = value && !this.shouldShowDetailFields() && !!this.addressOptions;
|
|
11329
|
+
this.errorMessage = this.noAddressSelected ? 'Select an address' : this.errorMessage;
|
|
11330
|
+
}
|
|
11291
11331
|
}
|
|
11332
|
+
WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE = 'Enter a Postcode';
|
|
11333
|
+
WriteAddressFieldComponent.INVALID_ERROR_MESSAGE = 'Enter a valid Postcode';
|
|
11292
11334
|
WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0.ɵɵdirectiveInject(AddressesService), i0.ɵɵdirectiveInject(IsCompoundPipe)); };
|
|
11293
11335
|
WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) {
|
|
11294
11336
|
if (rf & 1) {
|
|
@@ -11300,7 +11342,7 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
11300
11342
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
|
|
11301
11343
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusElementDirectives = _t);
|
|
11302
11344
|
}
|
|
11303
|
-
}, inputs: { formGroup: "formGroup" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [[1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], ["writeComplexFieldComponent", ""], [1, "heading-h2"], ["class", "form-group bottom-30 postcodeLookup", 3, "id", "ngClass", 4, "ngIf"], ["class", "form-group", "id", "selectAddress", 4, "ngIf"], ["class", "manual-link bottom-30", "href", "javascript:void(0)", 3, "click", 4, "ngIf"], [1, "form-group", "bottom-30", "postcodeLookup", 3, "id", "ngClass"], [3, "for"], [1, "form-label"], ["class", "error-message", 4, "ngIf"], ["type", "text", "name", "postcode", 1, "form-control", "postcodeinput", "inline-block", 3, "ngClass", "id", "formControl"], ["type", "button", 1, "button", "button-30", 3, "click"], [1, "error-message"], ["id", "selectAddress", 1, "form-group"], ["name", "address", "focusElement", "", 1, "form-control", "ccd-dropdown", "addressList", 3, "id", "formControl", "change"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "javascript:void(0)", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) {
|
|
11345
|
+
}, inputs: { formGroup: "formGroup" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [[1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], ["writeComplexFieldComponent", ""], [1, "heading-h2"], ["class", "form-group bottom-30 postcodeLookup", 3, "id", "ngClass", 4, "ngIf"], ["class", "form-group", "id", "selectAddress", 3, "ngClass", 4, "ngIf"], ["class", "manual-link bottom-30", "href", "javascript:void(0)", 3, "click", 4, "ngIf"], [1, "form-group", "bottom-30", "postcodeLookup", 3, "id", "ngClass"], [3, "for"], [1, "form-label"], ["class", "error-message", 4, "ngIf"], ["type", "text", "name", "postcode", 1, "form-control", "postcodeinput", "inline-block", 3, "ngClass", "id", "formControl"], ["type", "button", 1, "button", "button-30", 3, "click"], [1, "error-message"], ["id", "selectAddress", 1, "form-group", 3, "ngClass"], ["name", "address", "focusElement", "", 1, "form-control", "ccd-dropdown", "addressList", 3, "id", "formControl", "change"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "javascript:void(0)", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) {
|
|
11304
11346
|
if (rf & 1) {
|
|
11305
11347
|
i0.ɵɵelementStart(0, "div", 0);
|
|
11306
11348
|
i0.ɵɵtemplate(1, WriteAddressFieldComponent_div_1_Template, 7, 6, "div", 1);
|
|
@@ -11318,7 +11360,7 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
11318
11360
|
(function () {
|
|
11319
11361
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteAddressFieldComponent, [{
|
|
11320
11362
|
type: Component,
|
|
11321
|
-
args: [{ selector: 'ccd-write-address-field', template: "<div class=\"form-group\" [id]=\"id()\">\n <div *ngIf=\"!isComplexWithHiddenFields()\">\n <h2 class=\"heading-h2\">{{caseField | ccdFieldLabel}}</h2>\n\n <div class=\"form-group bottom-30 postcodeLookup\" [id]=\"createElementId('postcodeLookup')\" [ngClass]=\"{'form-group-error': missingPostcode}\" *ngIf=\"!isExpanded\">\n <label [for]=\"createElementId('postcodeInput')\">\n <span class=\"form-label\">{{'Enter a UK postcode' | rpxTranslate}}</span>\n </label>\n <span class=\"error-message\" *ngIf=\"missingPostcode\">{{
|
|
11363
|
+
args: [{ selector: 'ccd-write-address-field', template: "<div class=\"form-group\" [id]=\"id()\">\n <div *ngIf=\"!isComplexWithHiddenFields()\">\n <h2 class=\"heading-h2\">{{caseField | ccdFieldLabel}}</h2>\n\n <div class=\"form-group bottom-30 postcodeLookup\" [id]=\"createElementId('postcodeLookup')\" [ngClass]=\"{'form-group-error': missingPostcode}\" *ngIf=\"!isExpanded\">\n <label [for]=\"createElementId('postcodeInput')\">\n <span class=\"form-label\">{{'Enter a UK postcode' | rpxTranslate}}</span>\n </label>\n <span class=\"error-message\" *ngIf=\"missingPostcode\">{{errorMessage | rpxTranslate}}</span>\n <input type=\"text\" [ngClass]=\"{'govuk-input--error': missingPostcode}\"\n [id]=\"createElementId('postcodeInput')\" name=\"postcode\" class=\"form-control postcodeinput inline-block\" [formControl]=\"postcode\">\n <button type=\"button\" class=\"button button-30\" (click)=\"findAddress()\">{{'Find address' | rpxTranslate}}</button>\n </div>\n\n <div class=\"form-group\" *ngIf=\"addressOptions\" id=\"selectAddress\" [ngClass]=\"{'form-group-error': noAddressSelected}\">\n <label [for]=\"createElementId('addressList')\">\n <span class=\"form-label\">{{'Select an address' | rpxTranslate}}</span>\n </label>\n <span class=\"error-message\" *ngIf=\"noAddressSelected\">{{errorMessage | rpxTranslate}}</span>\n <select class=\"form-control ccd-dropdown addressList\" [id]=\"createElementId('addressList')\" name=\"address\" [formControl]=\"addressList\" (change)=\"addressSelected()\" focusElement>\n <option *ngFor=\"let addressOption of addressOptions\" [ngValue]=\"addressOption.value\">\n {{addressOption.description | rpxTranslate}}\n </option>\n </select>\n </div>\n\n <a class=\"manual-link bottom-30\" *ngIf=\"!shouldShowDetailFields()\" (click)=\"blankAddress()\" href=\"javascript:void(0)\">\n {{\"I can't enter a UK postcode\" | rpxTranslate}}\n </a>\n </div>\n\n <ccd-write-complex-type-field\n [hidden]=\"!shouldShowDetailFields()\"\n [caseField]=\"caseField\"\n [renderLabel]=\"false\"\n [parent]=\"parent\"\n [formGroup]=\"formGroup\"\n [ignoreMandatory]=\"true\"\n [idPrefix]=\"buildIdPrefix('detail')\"\n #writeComplexFieldComponent>\n </ccd-write-complex-type-field>\n</div>\n", styles: [".manual-link{cursor:pointer;display:block;text-decoration:underline}\n"] }]
|
|
11322
11364
|
}], function () { return [{ type: AddressesService }, { type: IsCompoundPipe }]; }, { writeComplexFieldComponent: [{
|
|
11323
11365
|
type: ViewChild,
|
|
11324
11366
|
args: ['writeComplexFieldComponent', { static: false }]
|
|
@@ -12689,7 +12731,7 @@ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) {
|
|
|
12689
12731
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label), " ");
|
|
12690
12732
|
}
|
|
12691
12733
|
}
|
|
12692
|
-
const _c1$
|
|
12734
|
+
const _c1$m = function (a0) { return { "form-group-error": a0 }; };
|
|
12693
12735
|
class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
12694
12736
|
ngOnInit() {
|
|
12695
12737
|
if (this.caseField.value) {
|
|
@@ -12755,7 +12797,7 @@ WriteCaseLinkFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
12755
12797
|
i0.ɵɵelementEnd();
|
|
12756
12798
|
}
|
|
12757
12799
|
if (rf & 2) {
|
|
12758
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
12800
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$m, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
|
|
12759
12801
|
i0.ɵɵadvance(1);
|
|
12760
12802
|
i0.ɵɵproperty("for", ctx.id());
|
|
12761
12803
|
i0.ɵɵadvance(1);
|
|
@@ -12793,7 +12835,7 @@ function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) {
|
|
|
12793
12835
|
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);
|
|
12794
12836
|
}
|
|
12795
12837
|
}
|
|
12796
|
-
const _c1$
|
|
12838
|
+
const _c1$l = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
|
|
12797
12839
|
function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
|
|
12798
12840
|
if (rf & 1) {
|
|
12799
12841
|
i0.ɵɵelementStart(0, "tr")(1, "td");
|
|
@@ -12805,7 +12847,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
|
|
|
12805
12847
|
const i_r5 = ctx.index;
|
|
12806
12848
|
const ctx_r3 = i0.ɵɵnextContext(3);
|
|
12807
12849
|
i0.ɵɵadvance(2);
|
|
12808
|
-
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$
|
|
12850
|
+
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$l, 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));
|
|
12809
12851
|
}
|
|
12810
12852
|
}
|
|
12811
12853
|
function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) {
|
|
@@ -14001,7 +14043,7 @@ function WriteDocumentFieldComponent_ccd_read_document_field_9_Template(rf, ctx)
|
|
|
14001
14043
|
i0.ɵɵproperty("caseField", ctx_r2.caseField);
|
|
14002
14044
|
}
|
|
14003
14045
|
}
|
|
14004
|
-
const _c1$
|
|
14046
|
+
const _c1$k = function (a0) { return { "form-group-error bottom-30": a0 }; };
|
|
14005
14047
|
class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
14006
14048
|
constructor(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService, jurisdictionService) {
|
|
14007
14049
|
super();
|
|
@@ -14307,7 +14349,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
14307
14349
|
i0.ɵɵelementEnd()();
|
|
14308
14350
|
}
|
|
14309
14351
|
if (rf & 2) {
|
|
14310
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$
|
|
14352
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$k, !ctx.valid));
|
|
14311
14353
|
i0.ɵɵadvance(1);
|
|
14312
14354
|
i0.ɵɵproperty("for", ctx.id());
|
|
14313
14355
|
i0.ɵɵadvance(1);
|
|
@@ -14531,14 +14573,9 @@ WriteDynamicListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ ty
|
|
|
14531
14573
|
})();
|
|
14532
14574
|
|
|
14533
14575
|
class MarkdownComponent {
|
|
14534
|
-
constructor() {
|
|
14535
|
-
this.renderUrlToTextFeature = true;
|
|
14536
|
-
}
|
|
14576
|
+
constructor() { }
|
|
14537
14577
|
ngOnInit() {
|
|
14538
14578
|
this.content = this.content.replace(/ \n/g, '<br>');
|
|
14539
|
-
if (this.renderUrlToTextFeature) {
|
|
14540
|
-
this.renderUrlToText();
|
|
14541
|
-
}
|
|
14542
14579
|
}
|
|
14543
14580
|
onMarkdownClick(event) {
|
|
14544
14581
|
// If we don't have an anchor tag, we don't need to do anything.
|
|
@@ -14547,22 +14584,13 @@ class MarkdownComponent {
|
|
|
14547
14584
|
}
|
|
14548
14585
|
return true;
|
|
14549
14586
|
}
|
|
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
|
-
}
|
|
14559
14587
|
}
|
|
14560
14588
|
MarkdownComponent.ɵfac = function MarkdownComponent_Factory(t) { return new (t || MarkdownComponent)(); };
|
|
14561
14589
|
MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]], hostBindings: function MarkdownComponent_HostBindings(rf, ctx) {
|
|
14562
14590
|
if (rf & 1) {
|
|
14563
14591
|
i0.ɵɵlistener("click", function MarkdownComponent_click_HostBindingHandler($event) { return ctx.onMarkdownClick($event); });
|
|
14564
14592
|
}
|
|
14565
|
-
}, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink"
|
|
14593
|
+
}, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, decls: 4, vars: 5, consts: [[1, "markdown", 3, "data"]], template: function MarkdownComponent_Template(rf, ctx) {
|
|
14566
14594
|
if (rf & 1) {
|
|
14567
14595
|
i0.ɵɵelementStart(0, "div");
|
|
14568
14596
|
i0.ɵɵelement(1, "markdown", 0);
|
|
@@ -14583,8 +14611,6 @@ MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownC
|
|
|
14583
14611
|
type: Input
|
|
14584
14612
|
}], markdownUseHrefAsRouterLink: [{
|
|
14585
14613
|
type: Input
|
|
14586
|
-
}], renderUrlToTextFeature: [{
|
|
14587
|
-
type: Input
|
|
14588
14614
|
}], onMarkdownClick: [{
|
|
14589
14615
|
type: HostListener,
|
|
14590
14616
|
args: ['click', ['$event']]
|
|
@@ -14719,7 +14745,7 @@ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, c
|
|
|
14719
14745
|
i0.ɵɵadvance(1);
|
|
14720
14746
|
i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
|
|
14721
14747
|
i0.ɵɵadvance(1);
|
|
14722
|
-
i0.ɵɵproperty("content", checkbox_r4.label)
|
|
14748
|
+
i0.ɵɵproperty("content", checkbox_r4.label);
|
|
14723
14749
|
}
|
|
14724
14750
|
}
|
|
14725
14751
|
const _c0$O = function (a0) { return { "error": a0 }; };
|
|
@@ -14784,14 +14810,14 @@ class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteCompon
|
|
|
14784
14810
|
}
|
|
14785
14811
|
}
|
|
14786
14812
|
WriteDynamicMultiSelectListFieldComponent.ɵfac = /*@__PURE__*/ function () { let ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory; return function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory || (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent)))(t || WriteDynamicMultiSelectListFieldComponent); }; }();
|
|
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"
|
|
14813
|
+
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) {
|
|
14788
14814
|
if (rf & 1) {
|
|
14789
14815
|
i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
|
|
14790
14816
|
i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
|
|
14791
14817
|
i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
|
|
14792
14818
|
i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
|
|
14793
14819
|
i0.ɵɵelementEnd();
|
|
14794
|
-
i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5,
|
|
14820
|
+
i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
|
|
14795
14821
|
i0.ɵɵelementEnd()();
|
|
14796
14822
|
}
|
|
14797
14823
|
if (rf & 2) {
|
|
@@ -14809,7 +14835,7 @@ WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineCom
|
|
|
14809
14835
|
(function () {
|
|
14810
14836
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
|
|
14811
14837
|
type: Component,
|
|
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\"
|
|
14838
|
+
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"] }]
|
|
14813
14839
|
}], null, null);
|
|
14814
14840
|
})();
|
|
14815
14841
|
|
|
@@ -14953,7 +14979,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
|
|
|
14953
14979
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r5.label));
|
|
14954
14980
|
}
|
|
14955
14981
|
}
|
|
14956
|
-
const _c1$
|
|
14982
|
+
const _c1$j = function (a0) { return { "form-group-error": a0 }; };
|
|
14957
14983
|
class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
14958
14984
|
ngOnInit() {
|
|
14959
14985
|
/**
|
|
@@ -14993,7 +15019,7 @@ WriteDynamicRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent
|
|
|
14993
15019
|
i0.ɵɵelementEnd()();
|
|
14994
15020
|
}
|
|
14995
15021
|
if (rf & 2) {
|
|
14996
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$
|
|
15022
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$j, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
|
|
14997
15023
|
i0.ɵɵadvance(3);
|
|
14998
15024
|
i0.ɵɵproperty("for", ctx.id());
|
|
14999
15025
|
i0.ɵɵadvance(1);
|
|
@@ -15094,7 +15120,7 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) {
|
|
|
15094
15120
|
}
|
|
15095
15121
|
}
|
|
15096
15122
|
const _c0$M = function (a0) { return { "form-group-error": a0 }; };
|
|
15097
|
-
const _c1$
|
|
15123
|
+
const _c1$i = function (a0) { return { "govuk-input--error": a0 }; };
|
|
15098
15124
|
class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
|
|
15099
15125
|
ngOnInit() {
|
|
15100
15126
|
this.emailControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -15122,7 +15148,7 @@ WriteEmailFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
|
|
|
15122
15148
|
i0.ɵɵadvance(1);
|
|
15123
15149
|
i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
|
|
15124
15150
|
i0.ɵɵadvance(1);
|
|
15125
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
15151
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$i, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
|
|
15126
15152
|
}
|
|
15127
15153
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
15128
15154
|
(function () {
|
|
@@ -15377,7 +15403,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
|
|
|
15377
15403
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r4.label));
|
|
15378
15404
|
}
|
|
15379
15405
|
}
|
|
15380
|
-
const _c1$
|
|
15406
|
+
const _c1$h = function (a0) { return { "form-group-error": a0 }; };
|
|
15381
15407
|
class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
15382
15408
|
ngOnInit() {
|
|
15383
15409
|
const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
|
|
@@ -15399,7 +15425,7 @@ WriteFixedRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
|
|
|
15399
15425
|
i0.ɵɵelementEnd()();
|
|
15400
15426
|
}
|
|
15401
15427
|
if (rf & 2) {
|
|
15402
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
15428
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$h, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
|
|
15403
15429
|
i0.ɵɵadvance(3);
|
|
15404
15430
|
i0.ɵɵproperty("for", ctx.id());
|
|
15405
15431
|
i0.ɵɵadvance(1);
|
|
@@ -15553,7 +15579,7 @@ function WriteJudicialUserFieldComponent_mat_option_11_Template(rf, ctx) {
|
|
|
15553
15579
|
i0.ɵɵelementEnd();
|
|
15554
15580
|
}
|
|
15555
15581
|
}
|
|
15556
|
-
const _c1$
|
|
15582
|
+
const _c1$g = function (a0) { return { "form-group-error": a0 }; };
|
|
15557
15583
|
class WriteJudicialUserFieldComponent extends WriteComplexFieldComponent {
|
|
15558
15584
|
constructor(jurisdictionService, sessionStorageService, caseFlagRefDataService, compoundPipe, validatorsService) {
|
|
15559
15585
|
super(compoundPipe, validatorsService);
|
|
@@ -15706,7 +15732,7 @@ WriteJudicialUserFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ t
|
|
|
15706
15732
|
}
|
|
15707
15733
|
if (rf & 2) {
|
|
15708
15734
|
const _r3 = i0.ɵɵreference(7);
|
|
15709
|
-
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$
|
|
15735
|
+
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$g, !!ctx.judicialUserControl && ctx.errors));
|
|
15710
15736
|
i0.ɵɵadvance(1);
|
|
15711
15737
|
i0.ɵɵproperty("for", ctx.id());
|
|
15712
15738
|
i0.ɵɵadvance(1);
|
|
@@ -16493,7 +16519,7 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) {
|
|
|
16493
16519
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, reason_r19));
|
|
16494
16520
|
}
|
|
16495
16521
|
}
|
|
16496
|
-
const _c1$
|
|
16522
|
+
const _c1$f = function (a0) { return { "table-group-error": a0 }; };
|
|
16497
16523
|
function LinkCasesComponent_tr_31_Template(rf, ctx) {
|
|
16498
16524
|
if (rf & 1) {
|
|
16499
16525
|
const _r21 = i0.ɵɵgetCurrentView();
|
|
@@ -16526,7 +16552,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) {
|
|
|
16526
16552
|
const case_r16 = ctx.$implicit;
|
|
16527
16553
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
16528
16554
|
i0.ɵɵadvance(2);
|
|
16529
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$
|
|
16555
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$f, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
|
|
16530
16556
|
i0.ɵɵadvance(2);
|
|
16531
16557
|
i0.ɵɵtextInterpolate1("", case_r16.caseName, " ");
|
|
16532
16558
|
i0.ɵɵadvance(2);
|
|
@@ -18613,7 +18639,7 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) {
|
|
|
18613
18639
|
}
|
|
18614
18640
|
}
|
|
18615
18641
|
const _c0$E = function (a0) { return { "form-group-error": a0 }; };
|
|
18616
|
-
const _c1$
|
|
18642
|
+
const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
|
|
18617
18643
|
class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
|
|
18618
18644
|
ngOnInit() {
|
|
18619
18645
|
this.numberControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -18641,7 +18667,7 @@ WriteNumberFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: W
|
|
|
18641
18667
|
i0.ɵɵadvance(1);
|
|
18642
18668
|
i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
|
|
18643
18669
|
i0.ɵɵadvance(1);
|
|
18644
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
18670
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
|
|
18645
18671
|
}
|
|
18646
18672
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
18647
18673
|
(function () {
|
|
@@ -19357,7 +19383,7 @@ function WritePhoneUKFieldComponent_span_4_Template(rf, ctx) {
|
|
|
19357
19383
|
}
|
|
19358
19384
|
}
|
|
19359
19385
|
const _c0$C = function (a0) { return { "form-group-error": a0 }; };
|
|
19360
|
-
const _c1$
|
|
19386
|
+
const _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
|
|
19361
19387
|
class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
|
|
19362
19388
|
ngOnInit() {
|
|
19363
19389
|
this.phoneUkControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -19385,7 +19411,7 @@ WritePhoneUKFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
19385
19411
|
i0.ɵɵadvance(1);
|
|
19386
19412
|
i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
|
|
19387
19413
|
i0.ɵɵadvance(1);
|
|
19388
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
19414
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
|
|
19389
19415
|
}
|
|
19390
19416
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
19391
19417
|
(function () {
|
|
@@ -21627,7 +21653,7 @@ function WriteTextAreaFieldComponent_span_4_Template(rf, ctx) {
|
|
|
21627
21653
|
}
|
|
21628
21654
|
}
|
|
21629
21655
|
const _c0$z = function (a0) { return { "form-group-error": a0 }; };
|
|
21630
|
-
const _c1$
|
|
21656
|
+
const _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
|
|
21631
21657
|
class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
21632
21658
|
constructor(browserService) {
|
|
21633
21659
|
super();
|
|
@@ -21667,7 +21693,7 @@ WriteTextAreaFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
21667
21693
|
i0.ɵɵadvance(1);
|
|
21668
21694
|
i0.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
|
|
21669
21695
|
i0.ɵɵadvance(1);
|
|
21670
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
21696
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
|
|
21671
21697
|
}
|
|
21672
21698
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
21673
21699
|
(function () {
|
|
@@ -21742,7 +21768,7 @@ function WriteTextFieldComponent_span_4_Template(rf, ctx) {
|
|
|
21742
21768
|
}
|
|
21743
21769
|
}
|
|
21744
21770
|
const _c0$y = function (a0) { return { "form-group-error": a0 }; };
|
|
21745
|
-
const _c1$
|
|
21771
|
+
const _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
|
|
21746
21772
|
class WriteTextFieldComponent extends AbstractFieldWriteComponent {
|
|
21747
21773
|
ngOnInit() {
|
|
21748
21774
|
this.textControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -21774,7 +21800,7 @@ WriteTextFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wri
|
|
|
21774
21800
|
i0.ɵɵadvance(1);
|
|
21775
21801
|
i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
|
|
21776
21802
|
i0.ɵɵadvance(1);
|
|
21777
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
21803
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$b, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
|
|
21778
21804
|
}
|
|
21779
21805
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
21780
21806
|
(function () {
|
|
@@ -21984,7 +22010,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) {
|
|
|
21984
22010
|
i0.ɵɵtextInterpolate(ctx_r3.caseField.label ? i0.ɵɵpipeBind3(4, 8, ctx_r3.caseField.label, null, value_r4) : value_r4);
|
|
21985
22011
|
}
|
|
21986
22012
|
}
|
|
21987
|
-
const _c1$
|
|
22013
|
+
const _c1$a = function (a0) { return { "form-group-error": a0 }; };
|
|
21988
22014
|
class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
|
|
21989
22015
|
constructor(yesNoService) {
|
|
21990
22016
|
super();
|
|
@@ -22008,7 +22034,7 @@ WriteYesNoFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
|
|
|
22008
22034
|
i0.ɵɵelementEnd()()();
|
|
22009
22035
|
}
|
|
22010
22036
|
if (rf & 2) {
|
|
22011
|
-
i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
22037
|
+
i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
|
|
22012
22038
|
i0.ɵɵadvance(3);
|
|
22013
22039
|
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
22014
22040
|
i0.ɵɵadvance(1);
|
|
@@ -22406,7 +22432,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_co
|
|
|
22406
22432
|
i0.ɵɵelementContainer(0);
|
|
22407
22433
|
}
|
|
22408
22434
|
}
|
|
22409
|
-
const _c1$
|
|
22435
|
+
const _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
|
|
22410
22436
|
function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) {
|
|
22411
22437
|
if (rf & 1) {
|
|
22412
22438
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -22419,7 +22445,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Templ
|
|
|
22419
22445
|
i0.ɵɵnextContext();
|
|
22420
22446
|
const _r1 = i0.ɵɵreference(13);
|
|
22421
22447
|
i0.ɵɵadvance(1);
|
|
22422
|
-
i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$
|
|
22448
|
+
i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
|
|
22423
22449
|
}
|
|
22424
22450
|
}
|
|
22425
22451
|
function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) {
|
|
@@ -22610,7 +22636,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) {
|
|
|
22610
22636
|
}
|
|
22611
22637
|
}
|
|
22612
22638
|
const _c0$s = [[["", "trigger", ""]]];
|
|
22613
|
-
const _c1$
|
|
22639
|
+
const _c1$8 = ["[trigger]"];
|
|
22614
22640
|
class CaseFileViewOverlayMenuComponent {
|
|
22615
22641
|
constructor() {
|
|
22616
22642
|
this.title = '';
|
|
@@ -22624,7 +22650,7 @@ class CaseFileViewOverlayMenuComponent {
|
|
|
22624
22650
|
}
|
|
22625
22651
|
}
|
|
22626
22652
|
CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
|
|
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$
|
|
22653
|
+
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$8, 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) {
|
|
22628
22654
|
if (rf & 1) {
|
|
22629
22655
|
i0.ɵɵprojectionDef(_c0$s);
|
|
22630
22656
|
i0.ɵɵelementStart(0, "div")(1, "button", 0, 1);
|
|
@@ -24885,7 +24911,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template(rf, ctx) {
|
|
|
24885
24911
|
}
|
|
24886
24912
|
}
|
|
24887
24913
|
const _c0$n = function (a0) { return { "form-group-error": a0 }; };
|
|
24888
|
-
const _c1$
|
|
24914
|
+
const _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
|
|
24889
24915
|
function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) {
|
|
24890
24916
|
if (rf & 1) {
|
|
24891
24917
|
i0.ɵɵelementStart(0, "div", 18)(1, "div", 3)(2, "label", 19);
|
|
@@ -24907,7 +24933,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) {
|
|
|
24907
24933
|
i0.ɵɵadvance(3);
|
|
24908
24934
|
i0.ɵɵproperty("ngIf", ctx_r7.flagTypeErrorMessage.length > 0);
|
|
24909
24935
|
i0.ɵɵadvance(1);
|
|
24910
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c1$
|
|
24936
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c1$7, ctx_r7.flagTypeErrorMessage.length > 0))("name", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION)("formControlName", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION);
|
|
24911
24937
|
i0.ɵɵadvance(1);
|
|
24912
24938
|
i0.ɵɵproperty("ngIf", !ctx_r7.isDisplayContextParameterExternal && !ctx_r7.isCaseLevelFlag && ctx_r7.isDisplayContextParameter2Point1Enabled);
|
|
24913
24939
|
}
|
|
@@ -25477,7 +25503,7 @@ function UpdateFlagComponent_div_22_Template(rf, ctx) {
|
|
|
25477
25503
|
i0.ɵɵproperty("ngIf", ctx_r9.selectedFlag.flagDetailDisplay.flagDetail.status === "Active");
|
|
25478
25504
|
}
|
|
25479
25505
|
}
|
|
25480
|
-
const _c1$
|
|
25506
|
+
const _c1$6 = function (a0) { return { "form-group-error": a0 }; };
|
|
25481
25507
|
class UpdateFlagComponent {
|
|
25482
25508
|
constructor(rpxTranslationService) {
|
|
25483
25509
|
this.rpxTranslationService = rpxTranslationService;
|
|
@@ -25686,7 +25712,7 @@ UpdateFlagComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateF
|
|
|
25686
25712
|
const _r3 = i0.ɵɵreference(17);
|
|
25687
25713
|
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
25688
25714
|
i0.ɵɵadvance(2);
|
|
25689
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$
|
|
25715
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$6, ctx.errorMessages.length > 0));
|
|
25690
25716
|
i0.ɵɵadvance(3);
|
|
25691
25717
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 13, ctx.updateFlagTitle), " ");
|
|
25692
25718
|
i0.ɵɵadvance(2);
|
|
@@ -27082,7 +27108,7 @@ const CUSTOM_MOMENT_FORMATS = {
|
|
|
27082
27108
|
};
|
|
27083
27109
|
|
|
27084
27110
|
const _c0$g = ["picker"];
|
|
27085
|
-
const _c1$
|
|
27111
|
+
const _c1$5 = ["input"];
|
|
27086
27112
|
function DatetimePickerComponent_span_3_Template(rf, ctx) {
|
|
27087
27113
|
if (rf & 1) {
|
|
27088
27114
|
i0.ɵɵelementStart(0, "span", 11);
|
|
@@ -27146,7 +27172,7 @@ function DatetimePickerComponent_span_7_Template(rf, ctx) {
|
|
|
27146
27172
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "This date is later than the maximum date allowed"));
|
|
27147
27173
|
}
|
|
27148
27174
|
}
|
|
27149
|
-
const _c2$
|
|
27175
|
+
const _c2$1 = function (a0) { return { "form-group-error": a0 }; };
|
|
27150
27176
|
class DatetimePickerComponent extends AbstractFormFieldComponent {
|
|
27151
27177
|
constructor(formatTranslationService, ngxMatDateFormats) {
|
|
27152
27178
|
super();
|
|
@@ -27312,7 +27338,7 @@ DatetimePickerComponent.ɵfac = function DatetimePickerComponent_Factory(t) { re
|
|
|
27312
27338
|
DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DatetimePickerComponent, selectors: [["ccd-datetime-picker"]], viewQuery: function DatetimePickerComponent_Query(rf, ctx) {
|
|
27313
27339
|
if (rf & 1) {
|
|
27314
27340
|
i0.ɵɵviewQuery(_c0$g, 5);
|
|
27315
|
-
i0.ɵɵviewQuery(_c1$
|
|
27341
|
+
i0.ɵɵviewQuery(_c1$5, 5);
|
|
27316
27342
|
}
|
|
27317
27343
|
if (rf & 2) {
|
|
27318
27344
|
let _t;
|
|
@@ -27348,7 +27374,7 @@ DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Dat
|
|
|
27348
27374
|
}
|
|
27349
27375
|
if (rf & 2) {
|
|
27350
27376
|
const _r6 = i0.ɵɵreference(13);
|
|
27351
|
-
i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$
|
|
27377
|
+
i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$1, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
|
|
27352
27378
|
i0.ɵɵadvance(3);
|
|
27353
27379
|
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
27354
27380
|
i0.ɵɵadvance(1);
|
|
@@ -27602,7 +27628,7 @@ function EventLogTableComponent_tr_20_div_6_Template(rf, ctx) {
|
|
|
27602
27628
|
i0.ɵɵtextInterpolate(ctx_r5.getSignificantItemDesc(event_r1));
|
|
27603
27629
|
}
|
|
27604
27630
|
}
|
|
27605
|
-
const _c1$
|
|
27631
|
+
const _c1$4 = function (a0) { return { "EventLogTable-Selected": a0 }; };
|
|
27606
27632
|
function EventLogTableComponent_tr_20_Template(rf, ctx) {
|
|
27607
27633
|
if (rf & 1) {
|
|
27608
27634
|
const _r18 = i0.ɵɵgetCurrentView();
|
|
@@ -27635,7 +27661,7 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) {
|
|
|
27635
27661
|
if (rf & 2) {
|
|
27636
27662
|
const event_r1 = ctx.$implicit;
|
|
27637
27663
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
27638
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$
|
|
27664
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$4, ctx_r0.selected === event_r1));
|
|
27639
27665
|
i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforRow(event_r1));
|
|
27640
27666
|
i0.ɵɵadvance(2);
|
|
27641
27667
|
i0.ɵɵproperty("ngSwitch", ctx_r0.isPartOfCaseTimeline);
|
|
@@ -29703,36 +29729,6 @@ function CaseEditSubmitComponent_div_0_ng_container_13_Template(rf, ctx) {
|
|
|
29703
29729
|
i0.ɵɵproperty("ngForOf", ctx_r8.showSummaryFields);
|
|
29704
29730
|
}
|
|
29705
29731
|
}
|
|
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 }; };
|
|
29736
29732
|
function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) {
|
|
29737
29733
|
if (rf & 1) {
|
|
29738
29734
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -29743,38 +29739,21 @@ function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) {
|
|
|
29743
29739
|
i0.ɵɵelementStart(6, "span", 43);
|
|
29744
29740
|
i0.ɵɵtext(7, "A few words describing the purpose of the event.");
|
|
29745
29741
|
i0.ɵɵelementEnd()();
|
|
29746
|
-
i0.ɵɵ
|
|
29747
|
-
i0.ɵɵelement(9, "input", 45);
|
|
29742
|
+
i0.ɵɵelement(8, "input", 44);
|
|
29748
29743
|
i0.ɵɵelementEnd();
|
|
29749
|
-
i0.ɵɵelementStart(
|
|
29750
|
-
i0.ɵɵtext(
|
|
29744
|
+
i0.ɵɵelementStart(9, "div", 41)(10, "label", 45);
|
|
29745
|
+
i0.ɵɵtext(11, "Event description (optional)");
|
|
29751
29746
|
i0.ɵɵelementEnd();
|
|
29752
|
-
i0.ɵɵ
|
|
29753
|
-
i0.ɵɵelement(14, "textarea", 47);
|
|
29747
|
+
i0.ɵɵelement(12, "textarea", 46);
|
|
29754
29748
|
i0.ɵɵelementEnd()();
|
|
29755
29749
|
i0.ɵɵelementContainerEnd();
|
|
29756
29750
|
}
|
|
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
|
-
}
|
|
29772
29751
|
}
|
|
29773
29752
|
function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) {
|
|
29774
29753
|
if (rf & 1) {
|
|
29775
|
-
const
|
|
29776
|
-
i0.ɵɵelementStart(0, "button",
|
|
29777
|
-
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_button_16_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
29754
|
+
const _r37 = i0.ɵɵgetCurrentView();
|
|
29755
|
+
i0.ɵɵelementStart(0, "button", 47);
|
|
29756
|
+
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_button_16_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r37); const ctx_r36 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r36.previous()); });
|
|
29778
29757
|
i0.ɵɵtext(1);
|
|
29779
29758
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
29780
29759
|
i0.ɵɵelementEnd();
|
|
@@ -29788,7 +29767,7 @@ function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) {
|
|
|
29788
29767
|
}
|
|
29789
29768
|
function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
|
|
29790
29769
|
if (rf & 1) {
|
|
29791
|
-
const
|
|
29770
|
+
const _r39 = i0.ɵɵgetCurrentView();
|
|
29792
29771
|
i0.ɵɵelementStart(0, "div")(1, "h1", 2);
|
|
29793
29772
|
i0.ɵɵtext(2);
|
|
29794
29773
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
@@ -29798,13 +29777,13 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
|
|
|
29798
29777
|
i0.ɵɵtemplate(7, CaseEditSubmitComponent_div_0_ng_template_7_Template, 1, 1, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor);
|
|
29799
29778
|
i0.ɵɵelement(9, "ccd-case-edit-generic-errors", 6);
|
|
29800
29779
|
i0.ɵɵelementStart(10, "ccd-callback-errors", 7);
|
|
29801
|
-
i0.ɵɵlistener("callbackErrorsContext", function CaseEditSubmitComponent_div_0_Template_ccd_callback_errors_callbackErrorsContext_10_listener($event) { i0.ɵɵrestoreView(
|
|
29780
|
+
i0.ɵɵlistener("callbackErrorsContext", function CaseEditSubmitComponent_div_0_Template_ccd_callback_errors_callbackErrorsContext_10_listener($event) { i0.ɵɵrestoreView(_r39); const ctx_r38 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r38.callbackErrorsNotify($event)); });
|
|
29802
29781
|
i0.ɵɵelementEnd();
|
|
29803
29782
|
i0.ɵɵelementStart(11, "form", 8);
|
|
29804
|
-
i0.ɵɵlistener("submit", function CaseEditSubmitComponent_div_0_Template_form_submit_11_listener() { i0.ɵɵrestoreView(
|
|
29783
|
+
i0.ɵɵlistener("submit", function CaseEditSubmitComponent_div_0_Template_form_submit_11_listener() { i0.ɵɵrestoreView(_r39); const ctx_r40 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r40.submit()); });
|
|
29805
29784
|
i0.ɵɵtemplate(12, CaseEditSubmitComponent_div_0_ng_container_12_Template, 8, 5, "ng-container", 0);
|
|
29806
29785
|
i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_13_Template, 4, 1, "ng-container", 0);
|
|
29807
|
-
i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template,
|
|
29786
|
+
i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 13, 0, "ng-container", 0);
|
|
29808
29787
|
i0.ɵɵelementStart(15, "div", 9);
|
|
29809
29788
|
i0.ɵɵtemplate(16, CaseEditSubmitComponent_div_0_button_16_Template, 3, 4, "button", 10);
|
|
29810
29789
|
i0.ɵɵelementStart(17, "button", 11);
|
|
@@ -29812,7 +29791,7 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
|
|
|
29812
29791
|
i0.ɵɵpipe(19, "rpxTranslate");
|
|
29813
29792
|
i0.ɵɵelementEnd()();
|
|
29814
29793
|
i0.ɵɵelementStart(20, "p", 12)(21, "a", 13);
|
|
29815
|
-
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_Template_a_click_21_listener() { i0.ɵɵrestoreView(
|
|
29794
|
+
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_Template_a_click_21_listener() { i0.ɵɵrestoreView(_r39); const ctx_r41 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r41.cancel()); });
|
|
29816
29795
|
i0.ɵɵtext(22);
|
|
29817
29796
|
i0.ɵɵpipe(23, "rpxTranslate");
|
|
29818
29797
|
i0.ɵɵelementEnd()()()();
|
|
@@ -29851,9 +29830,9 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
|
|
|
29851
29830
|
}
|
|
29852
29831
|
function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
|
|
29853
29832
|
if (rf & 1) {
|
|
29854
|
-
const
|
|
29855
|
-
i0.ɵɵelementStart(0, "ccd-case-event-completion",
|
|
29856
|
-
i0.ɵɵlistener("eventCanBeCompleted", function CaseEditSubmitComponent_ccd_case_event_completion_1_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0.ɵɵrestoreView(
|
|
29833
|
+
const _r43 = i0.ɵɵgetCurrentView();
|
|
29834
|
+
i0.ɵɵelementStart(0, "ccd-case-event-completion", 48);
|
|
29835
|
+
i0.ɵɵlistener("eventCanBeCompleted", function CaseEditSubmitComponent_ccd_case_event_completion_1_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0.ɵɵrestoreView(_r43); const ctx_r42 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r42.onEventCanBeCompleted($event)); });
|
|
29857
29836
|
i0.ɵɵelementEnd();
|
|
29858
29837
|
}
|
|
29859
29838
|
if (rf & 2) {
|
|
@@ -29863,17 +29842,14 @@ function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
|
|
|
29863
29842
|
}
|
|
29864
29843
|
// @dynamic
|
|
29865
29844
|
class CaseEditSubmitComponent {
|
|
29866
|
-
constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier
|
|
29845
|
+
constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier) {
|
|
29867
29846
|
this.caseEdit = caseEdit;
|
|
29868
29847
|
this.fieldsUtils = fieldsUtils;
|
|
29869
29848
|
this.caseFieldService = caseFieldService;
|
|
29870
29849
|
this.route = route;
|
|
29871
29850
|
this.orderService = orderService;
|
|
29872
29851
|
this.profileNotifier = profileNotifier;
|
|
29873
|
-
this.formValidatorsService = formValidatorsService;
|
|
29874
29852
|
this.paletteContext = PaletteContext.CHECK_YOUR_ANSWER;
|
|
29875
|
-
this.eventSummaryLabel = 'Event summary';
|
|
29876
|
-
this.eventDescriptionLabel = 'Event description';
|
|
29877
29853
|
}
|
|
29878
29854
|
get isDisabled() {
|
|
29879
29855
|
// EUI-3452.
|
|
@@ -29884,7 +29860,7 @@ class CaseEditSubmitComponent {
|
|
|
29884
29860
|
}
|
|
29885
29861
|
ngOnInit() {
|
|
29886
29862
|
var _a, _b, _c;
|
|
29887
|
-
this.profileSubscription = this.profileNotifier.profile.subscribe(
|
|
29863
|
+
this.profileSubscription = this.profileNotifier.profile.subscribe(_ => this.profile = _);
|
|
29888
29864
|
this.eventTrigger = this.caseEdit.eventTrigger;
|
|
29889
29865
|
this.triggerText = this.eventTrigger.end_button_label || CallbackErrorsComponent.TRIGGER_TEXT_SUBMIT;
|
|
29890
29866
|
this.editForm = this.caseEdit.form;
|
|
@@ -29897,12 +29873,10 @@ class CaseEditSubmitComponent {
|
|
|
29897
29873
|
// Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
|
|
29898
29874
|
// a FlagLauncher field in the event trigger
|
|
29899
29875
|
this.caseEdit.isCaseFlagSubmission =
|
|
29900
|
-
this.eventTrigger.case_fields.some(
|
|
29876
|
+
this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
|
|
29901
29877
|
this.caseEdit.isLinkedCasesSubmission =
|
|
29902
29878
|
this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']));
|
|
29903
29879
|
this.pageTitle = this.getPageTitle();
|
|
29904
|
-
this.summary = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.summary');
|
|
29905
|
-
this.description = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.description');
|
|
29906
29880
|
}
|
|
29907
29881
|
ngOnDestroy() {
|
|
29908
29882
|
/* istanbul ignore else */
|
|
@@ -29911,14 +29885,12 @@ class CaseEditSubmitComponent {
|
|
|
29911
29885
|
}
|
|
29912
29886
|
}
|
|
29913
29887
|
submit() {
|
|
29914
|
-
|
|
29915
|
-
this.
|
|
29916
|
-
|
|
29917
|
-
|
|
29918
|
-
|
|
29919
|
-
|
|
29920
|
-
});
|
|
29921
|
-
}
|
|
29888
|
+
this.caseEdit.submitForm({
|
|
29889
|
+
eventTrigger: this.eventTrigger,
|
|
29890
|
+
form: this.editForm,
|
|
29891
|
+
submit: this.caseEdit.submit,
|
|
29892
|
+
caseDetails: this.caseEdit.caseDetails,
|
|
29893
|
+
});
|
|
29922
29894
|
}
|
|
29923
29895
|
onEventCanBeCompleted(eventCanBeCompleted) {
|
|
29924
29896
|
this.caseEdit.onEventCanBeCompleted({
|
|
@@ -29926,7 +29898,7 @@ class CaseEditSubmitComponent {
|
|
|
29926
29898
|
eventCanBeCompleted,
|
|
29927
29899
|
caseDetails: this.caseEdit.caseDetails,
|
|
29928
29900
|
form: this.editForm,
|
|
29929
|
-
submit: this.caseEdit.submit
|
|
29901
|
+
submit: this.caseEdit.submit,
|
|
29930
29902
|
});
|
|
29931
29903
|
}
|
|
29932
29904
|
getPageTitle() {
|
|
@@ -30002,7 +29974,7 @@ class CaseEditSubmitComponent {
|
|
|
30002
29974
|
}
|
|
30003
29975
|
}
|
|
30004
29976
|
readOnlySummaryFieldsToDisplayExists() {
|
|
30005
|
-
return this.eventTrigger.case_fields.some(
|
|
29977
|
+
return this.eventTrigger.case_fields.some(field => field.show_summary_content_option >= 0);
|
|
30006
29978
|
}
|
|
30007
29979
|
showEventNotes() {
|
|
30008
29980
|
var _a;
|
|
@@ -30018,7 +29990,7 @@ class CaseEditSubmitComponent {
|
|
|
30018
29990
|
}
|
|
30019
29991
|
getLastPageShown() {
|
|
30020
29992
|
let lastPage;
|
|
30021
|
-
this.wizard.reverse().forEach(
|
|
29993
|
+
this.wizard.reverse().forEach(page => {
|
|
30022
29994
|
if (!lastPage && this.isShown(page)) {
|
|
30023
29995
|
lastPage = page;
|
|
30024
29996
|
}
|
|
@@ -30037,7 +30009,7 @@ class CaseEditSubmitComponent {
|
|
|
30037
30009
|
}
|
|
30038
30010
|
isShown(page) {
|
|
30039
30011
|
const fields = this.fieldsUtils
|
|
30040
|
-
.mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls
|
|
30012
|
+
.mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls['data'].value);
|
|
30041
30013
|
return page.parsedShowCondition.match(fields);
|
|
30042
30014
|
}
|
|
30043
30015
|
canShowFieldInCYA(field) {
|
|
@@ -30046,7 +30018,7 @@ class CaseEditSubmitComponent {
|
|
|
30046
30018
|
sortFieldsByShowSummaryContent(fields) {
|
|
30047
30019
|
return this.orderService
|
|
30048
30020
|
.sort(fields, CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION)
|
|
30049
|
-
.filter(
|
|
30021
|
+
.filter(cf => cf.show_summary_content_option);
|
|
30050
30022
|
}
|
|
30051
30023
|
getCaseFields() {
|
|
30052
30024
|
if (this.caseEdit.caseDetails) {
|
|
@@ -30065,7 +30037,9 @@ class CaseEditSubmitComponent {
|
|
|
30065
30037
|
if (this.eventTrigger.can_save_draft) {
|
|
30066
30038
|
return 'Return to case list';
|
|
30067
30039
|
}
|
|
30068
|
-
|
|
30040
|
+
else {
|
|
30041
|
+
return 'Cancel';
|
|
30042
|
+
}
|
|
30069
30043
|
}
|
|
30070
30044
|
}
|
|
30071
30045
|
CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
|
|
@@ -30079,8 +30053,8 @@ CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
|
|
|
30079
30053
|
}
|
|
30080
30054
|
return a.show_summary_content_option - b.show_summary_content_option;
|
|
30081
30055
|
};
|
|
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)
|
|
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"
|
|
30056
|
+
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)); };
|
|
30057
|
+
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) {
|
|
30084
30058
|
if (rf & 1) {
|
|
30085
30059
|
i0.ɵɵtemplate(0, CaseEditSubmitComponent_div_0_Template, 24, 22, "div", 0);
|
|
30086
30060
|
i0.ɵɵtemplate(1, CaseEditSubmitComponent_ccd_case_event_completion_1_Template, 1, 1, "ccd-case-event-completion", 1);
|
|
@@ -30094,8 +30068,8 @@ CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Cas
|
|
|
30094
30068
|
(function () {
|
|
30095
30069
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
|
|
30096
30070
|
type: Component,
|
|
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\"
|
|
30098
|
-
}], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }
|
|
30071
|
+
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 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"] }]
|
|
30072
|
+
}], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }]; }, null);
|
|
30099
30073
|
})();
|
|
30100
30074
|
|
|
30101
30075
|
function CaseProgressComponent_div_0_Template(rf, ctx) {
|
|
@@ -30493,7 +30467,7 @@ i0.ɵɵsetComponentScope(CaseEditPageComponent, function () {
|
|
|
30493
30467
|
CaseEditGenericErrorsComponent];
|
|
30494
30468
|
}, function () { return [i4.AsyncPipe, CaseReferencePipe, CcdCaseTitlePipe, i1.RpxTranslatePipe]; });
|
|
30495
30469
|
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]; });
|
|
30496
|
-
i0.ɵɵsetComponentScope(CaseEditSubmitComponent, function () { return [i4.
|
|
30470
|
+
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]; });
|
|
30497
30471
|
i0.ɵɵsetComponentScope(CaseCreateComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
|
|
30498
30472
|
i0.ɵɵsetComponentScope(CaseProgressComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
|
|
30499
30473
|
|
|
@@ -35296,7 +35270,7 @@ class EventTriggerComponent {
|
|
|
35296
35270
|
}
|
|
35297
35271
|
}
|
|
35298
35272
|
EventTriggerComponent.ɵfac = function EventTriggerComponent_Factory(t) { return new (t || EventTriggerComponent)(i0.ɵɵdirectiveInject(i3.FormBuilder), i0.ɵɵdirectiveInject(OrderService)); };
|
|
35299
|
-
EventTriggerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EventTriggerComponent, selectors: [["ccd-event-trigger"]], inputs: { triggers: "triggers", triggerText: "triggerText", isDisabled: "isDisabled" }, outputs: { onTriggerSubmit: "onTriggerSubmit", onTriggerChange: "onTriggerChange" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["class", "event-trigger", 3, "formGroup", "ngSubmit", 4, "ngIf"], [1, "event-trigger", 3, "formGroup", "ngSubmit"], [1, "form-group"], ["for", "next-step", 1, "form-label"], ["id", "next-step", "formControlName", "trigger", 1, "form-control", "ccd-dropdown", 3, "ngClass", "change"], ["value", "", "data-default", "", 4, "ngIf"], [3, "ngValue", "title", 4, "ngFor", "ngForOf"], ["type", "submit", 1, "button", 3, "disabled"], ["value", "", "data-default", ""], [3, "ngValue", "title"]], template: function EventTriggerComponent_Template(rf, ctx) {
|
|
35273
|
+
EventTriggerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EventTriggerComponent, selectors: [["ccd-event-trigger"]], inputs: { triggers: "triggers", triggerText: "triggerText", isDisabled: "isDisabled" }, outputs: { onTriggerSubmit: "onTriggerSubmit", onTriggerChange: "onTriggerChange" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["class", "event-trigger", 3, "formGroup", "ngSubmit", 4, "ngIf"], [1, "event-trigger", 3, "formGroup", "ngSubmit"], [1, "form-group", 2, "width", "350px !important"], ["for", "next-step", 1, "form-label"], ["id", "next-step", "formControlName", "trigger", 1, "form-control", "ccd-dropdown", 3, "ngClass", "change"], ["value", "", "data-default", "", 4, "ngIf"], [3, "ngValue", "title", 4, "ngFor", "ngForOf"], ["type", "submit", 1, "button", 3, "disabled"], ["value", "", "data-default", ""], [3, "ngValue", "title"]], template: function EventTriggerComponent_Template(rf, ctx) {
|
|
35300
35274
|
if (rf & 1) {
|
|
35301
35275
|
i0.ɵɵtemplate(0, EventTriggerComponent_form_0_Template, 11, 13, "form", 0);
|
|
35302
35276
|
}
|
|
@@ -35307,7 +35281,7 @@ EventTriggerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Event
|
|
|
35307
35281
|
(function () {
|
|
35308
35282
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventTriggerComponent, [{
|
|
35309
35283
|
type: Component,
|
|
35310
|
-
args: [{ selector: 'ccd-event-trigger', template: "<form *ngIf=\"triggers && triggers.length\" class=\"event-trigger\" (ngSubmit)=\"triggerSubmit()\" [formGroup]=\"triggerForm\">\n <div class=\"form-group\">\n <label class=\"form-label\" for=\"next-step\">{{'Next step' | rpxTranslate}}</label>\n <select class=\"form-control ccd-dropdown\" id=\"next-step\" (change)=\"triggerChange()\" formControlName=\"trigger\" [ngClass]=\"{\n 'EventTrigger-empty': !triggerForm.value['trigger']\n }\">\n <option *ngIf=\"1 !== triggers.length\" value=\"\" data-default>{{'Select action' | rpxTranslate}}</option>\n <option *ngFor=\"let trigger of triggers\" [ngValue]=\"trigger\" [title]=\"trigger.description\">{{trigger.name | rpxTranslate}}</option>\n </select>\n </div>\n <button [disabled]=\"isButtonDisabled()\" type=\"submit\" class=\"button\">{{triggerText | rpxTranslate}}</button>\n</form>\n", styles: [".event-trigger{width:auto;margin-top:40px;margin-bottom:20px}.event-trigger .form-group{margin-top:3px;margin-right:10px;margin-bottom:0;float:left;text-align:right;width:325px}.event-trigger .form-group .form-label{float:left;margin-top:5px}.event-trigger select{width:250px}.event-trigger select.EventTrigger-empty,.event-trigger select [data-default]{color:#6f777b}\n"] }]
|
|
35284
|
+
args: [{ selector: 'ccd-event-trigger', template: "<form *ngIf=\"triggers && triggers.length\" class=\"event-trigger\" (ngSubmit)=\"triggerSubmit()\" [formGroup]=\"triggerForm\">\n <div class=\"form-group\" style=\"width: 350px !important;\">\n <label class=\"form-label\" for=\"next-step\">{{'Next step' | rpxTranslate}}</label>\n <select class=\"form-control ccd-dropdown\" id=\"next-step\" (change)=\"triggerChange()\" formControlName=\"trigger\" [ngClass]=\"{\n 'EventTrigger-empty': !triggerForm.value['trigger']\n }\">\n <option *ngIf=\"1 !== triggers.length\" value=\"\" data-default>{{'Select action' | rpxTranslate}}</option>\n <option *ngFor=\"let trigger of triggers\" [ngValue]=\"trigger\" [title]=\"trigger.description\">{{trigger.name | rpxTranslate}}</option>\n </select>\n </div>\n <button [disabled]=\"isButtonDisabled()\" type=\"submit\" class=\"button\">{{triggerText | rpxTranslate}}</button>\n</form>\n", styles: [".event-trigger{width:auto;margin-top:40px;margin-bottom:20px}.event-trigger .form-group{margin-top:3px;margin-right:10px;margin-bottom:0;float:left;text-align:right;width:325px}.event-trigger .form-group .form-label{float:left;margin-top:5px}.event-trigger select{width:250px}.event-trigger select.EventTrigger-empty,.event-trigger select [data-default]{color:#6f777b}\n"] }]
|
|
35311
35285
|
}], function () { return [{ type: i3.FormBuilder }, { type: OrderService }]; }, { triggers: [{
|
|
35312
35286
|
type: Input
|
|
35313
35287
|
}], triggerText: [{
|