@hmcts/ccd-case-ui-toolkit 7.0.33-node-store-caseworkers → 7.0.33-pre-release-markdown
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.mjs +83 -38
- package/esm2020/lib/shared/components/case-editor/case-editor.module.mjs +6 -5
- package/esm2020/lib/shared/components/case-editor/services/case-worker.service.mjs +3 -3
- package/esm2020/lib/shared/components/palette/base-field/abstract-form-field.component.mjs +1 -1
- package/esm2020/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.mjs +5 -5
- package/esm2020/lib/shared/components/palette/markdown/markdown.component.mjs +26 -3
- package/esm2020/lib/shared/components/palette/text/write-text-field.component.mjs +1 -1
- package/esm2020/lib/shared/components/palette/utils/first-error.pipe.mjs +4 -1
- package/esm2020/lib/shared/services/form/form-validators.service.mjs +27 -2
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +209 -104
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +200 -104
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts +8 -3
- package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts.map +1 -1
- package/lib/shared/components/palette/base-field/abstract-form-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/markdown/markdown.component.d.ts +4 -1
- package/lib/shared/components/palette/markdown/markdown.component.d.ts.map +1 -1
- package/lib/shared/components/palette/utils/first-error.pipe.d.ts.map +1 -1
- package/lib/shared/services/form/form-validators.service.d.ts +4 -0
- package/lib/shared/services/form/form-validators.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -27,6 +27,7 @@ import { MatDialogConfig } from '@angular/material/dialog';
|
|
|
27
27
|
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
28
28
|
import * as i2 from '@nicky-lenaers/ngx-scroll-to';
|
|
29
29
|
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
|
|
30
|
+
import * as marked from 'marked';
|
|
30
31
|
import * as i1$4 from 'ngx-md';
|
|
31
32
|
import { NgxMdModule } from 'ngx-md';
|
|
32
33
|
import * as i5 from '@angular/material/legacy-autocomplete';
|
|
@@ -133,11 +134,11 @@ function FooterComponent_div_3_Template(rf, ctx) {
|
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
const _c0$13 = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
|
|
136
|
-
const _c1$
|
|
137
|
+
const _c1$u = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
|
|
137
138
|
class FooterComponent {
|
|
138
139
|
}
|
|
139
140
|
FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
|
|
140
|
-
FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$
|
|
141
|
+
FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$u, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) {
|
|
141
142
|
if (rf & 1) {
|
|
142
143
|
i0.ɵɵprojectionDef(_c0$13);
|
|
143
144
|
i0.ɵɵelementStart(0, "footer", 0)(1, "div", 1);
|
|
@@ -211,7 +212,7 @@ function HeaderBarComponent_div_10_Template(rf, ctx) {
|
|
|
211
212
|
}
|
|
212
213
|
}
|
|
213
214
|
const _c0$12 = [[["", "headerNavigation", ""]]];
|
|
214
|
-
const _c1$
|
|
215
|
+
const _c1$t = ["[headerNavigation]"];
|
|
215
216
|
class HeaderBarComponent {
|
|
216
217
|
constructor() {
|
|
217
218
|
this.signOutRequest = new EventEmitter();
|
|
@@ -221,7 +222,7 @@ class HeaderBarComponent {
|
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
224
|
HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
|
|
224
|
-
HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$
|
|
225
|
+
HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$t, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) {
|
|
225
226
|
if (rf & 1) {
|
|
226
227
|
i0.ɵɵprojectionDef(_c0$12);
|
|
227
228
|
i0.ɵɵelementStart(0, "header", 0)(1, "div", 1)(2, "div", 2);
|
|
@@ -277,11 +278,11 @@ HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBa
|
|
|
277
278
|
})();
|
|
278
279
|
|
|
279
280
|
const _c0$11 = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
|
|
280
|
-
const _c1$
|
|
281
|
+
const _c1$s = ["[leftNavLinks]", "[rightNavLinks]"];
|
|
281
282
|
class NavigationComponent {
|
|
282
283
|
}
|
|
283
284
|
NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
|
|
284
|
-
NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$
|
|
285
|
+
NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$s, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) {
|
|
285
286
|
if (rf & 1) {
|
|
286
287
|
i0.ɵɵprojectionDef(_c0$11);
|
|
287
288
|
i0.ɵɵelementStart(0, "div")(1, "nav", 0);
|
|
@@ -412,11 +413,11 @@ HeadersModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModu
|
|
|
412
413
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(HeadersModule, { declarations: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent], imports: [CommonModule, RouterModule, i1.RpxTranslationModule], exports: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent] }); })();
|
|
413
414
|
|
|
414
415
|
const _c0$10 = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
|
|
415
|
-
const _c1$
|
|
416
|
+
const _c1$r = ["[topBody]", "[leftBody]", "[rightBody]"];
|
|
416
417
|
class BodyComponent {
|
|
417
418
|
}
|
|
418
419
|
BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
|
|
419
|
-
BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$
|
|
420
|
+
BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$r, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) {
|
|
420
421
|
if (rf & 1) {
|
|
421
422
|
i0.ɵɵprojectionDef(_c0$10);
|
|
422
423
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -1085,11 +1086,11 @@ NotificationBannerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
1085
1086
|
})();
|
|
1086
1087
|
|
|
1087
1088
|
const _c0$Z = function (a0) { return { "js-hidden": a0 }; };
|
|
1088
|
-
const _c1$
|
|
1089
|
+
const _c1$q = ["*"];
|
|
1089
1090
|
class TabComponent {
|
|
1090
1091
|
}
|
|
1091
1092
|
TabComponent.ɵfac = function TabComponent_Factory(t) { return new (t || TabComponent)(); };
|
|
1092
|
-
TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$
|
|
1093
|
+
TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$q, decls: 2, vars: 5, consts: [["role", "tabpanel", 1, "tabs-panel", 3, "id", "ngClass"]], template: function TabComponent_Template(rf, ctx) {
|
|
1093
1094
|
if (rf & 1) {
|
|
1094
1095
|
i0.ɵɵprojectionDef();
|
|
1095
1096
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -1115,8 +1116,8 @@ TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent,
|
|
|
1115
1116
|
})();
|
|
1116
1117
|
|
|
1117
1118
|
const _c0$Y = ["tab"];
|
|
1118
|
-
const _c1$
|
|
1119
|
-
const _c2$
|
|
1119
|
+
const _c1$p = function () { return ["."]; };
|
|
1120
|
+
const _c2$4 = function (a0) { return { "tabs-toggle-selected": a0 }; };
|
|
1120
1121
|
function TabsComponent_li_2_Template(rf, ctx) {
|
|
1121
1122
|
if (rf & 1) {
|
|
1122
1123
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
@@ -1129,7 +1130,7 @@ function TabsComponent_li_2_Template(rf, ctx) {
|
|
|
1129
1130
|
if (rf & 2) {
|
|
1130
1131
|
const panel_r1 = ctx.$implicit;
|
|
1131
1132
|
i0.ɵɵadvance(1);
|
|
1132
|
-
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$
|
|
1133
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$p))("fragment", panel_r1.id)("ngClass", i0.ɵɵpureFunction1(9, _c2$4, panel_r1.selected));
|
|
1133
1134
|
i0.ɵɵattribute("aria-controls", panel_r1.id)("aria-selected", panel_r1.selected);
|
|
1134
1135
|
i0.ɵɵadvance(2);
|
|
1135
1136
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 6, panel_r1.title));
|
|
@@ -2702,6 +2703,9 @@ class FirstErrorPipe {
|
|
|
2702
2703
|
else if (keys[0] === 'pattern') {
|
|
2703
2704
|
errorMessage = 'The data entered is not valid for %FIELDLABEL%';
|
|
2704
2705
|
}
|
|
2706
|
+
else if (keys[0] === 'markDownPattern') {
|
|
2707
|
+
errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
|
|
2708
|
+
}
|
|
2705
2709
|
else if (keys[0] === 'minlength') {
|
|
2706
2710
|
errorMessage = '%FIELDLABEL% is below the minimum length';
|
|
2707
2711
|
}
|
|
@@ -4550,6 +4554,7 @@ class FormValidatorsService {
|
|
|
4550
4554
|
FormValidatorsService.CUSTOM_VALIDATED_TYPES.indexOf(caseField.field_type.type) === -1) {
|
|
4551
4555
|
const validators = [Validators.required];
|
|
4552
4556
|
if (caseField.field_type.type === 'Text') {
|
|
4557
|
+
validators.push(this.markDownPatternValidator());
|
|
4553
4558
|
if (caseField.field_type.regular_expression) {
|
|
4554
4559
|
validators.push(Validators.pattern(caseField.field_type.regular_expression));
|
|
4555
4560
|
}
|
|
@@ -4563,22 +4568,38 @@ class FormValidatorsService {
|
|
|
4563
4568
|
validators.push(Validators.maxLength(caseField.field_type.max));
|
|
4564
4569
|
}
|
|
4565
4570
|
}
|
|
4571
|
+
if (caseField.field_type.type === 'TextArea') {
|
|
4572
|
+
validators.push(this.emptyValidator());
|
|
4573
|
+
validators.push(this.markDownPatternValidator());
|
|
4574
|
+
}
|
|
4566
4575
|
if (control.validator) {
|
|
4567
4576
|
validators.push(control.validator);
|
|
4568
4577
|
}
|
|
4569
4578
|
control.setValidators(validators);
|
|
4570
4579
|
}
|
|
4580
|
+
else if (caseField.display_context === 'OPTIONAL' && (caseField.field_type.type === 'Text' || caseField.field_type.type === 'TextArea')) {
|
|
4581
|
+
control.setValidators(this.markDownPatternValidator());
|
|
4582
|
+
}
|
|
4571
4583
|
return control;
|
|
4572
4584
|
}
|
|
4573
4585
|
static emptyValidator() {
|
|
4574
4586
|
const validator = (control) => {
|
|
4575
|
-
|
|
4587
|
+
var _a;
|
|
4588
|
+
if (((_a = control === null || control === void 0 ? void 0 : control.value) === null || _a === void 0 ? void 0 : _a.toString().trim().length) === 0) {
|
|
4576
4589
|
return { required: {} };
|
|
4577
4590
|
}
|
|
4578
4591
|
return null;
|
|
4579
4592
|
};
|
|
4580
4593
|
return validator;
|
|
4581
4594
|
}
|
|
4595
|
+
static markDownPatternValidator() {
|
|
4596
|
+
const pattern = /(\[[^\]]{0,500}\]\([^)]{0,500}\)|!\[[^\]]{0,500}\]\([^)]{0,500}\)|<img[^>]{0,500}>|<a[^>]{0,500}>.*?<\/a>)/;
|
|
4597
|
+
return (control) => {
|
|
4598
|
+
var _a;
|
|
4599
|
+
const value = (_a = control === null || control === void 0 ? void 0 : control.value) === null || _a === void 0 ? void 0 : _a.toString().trim();
|
|
4600
|
+
return (value && pattern.test(value)) ? { markDownPattern: {} } : null;
|
|
4601
|
+
};
|
|
4602
|
+
}
|
|
4582
4603
|
// TODO: Strip this out as it's only here for the moment because
|
|
4583
4604
|
// the service is being injected all over the place but it doesn't
|
|
4584
4605
|
// need to be as FormValidatorsService.addValidators is perfectly
|
|
@@ -4586,10 +4607,20 @@ class FormValidatorsService {
|
|
|
4586
4607
|
addValidators(caseField, control) {
|
|
4587
4608
|
return FormValidatorsService.addValidators(caseField, control);
|
|
4588
4609
|
}
|
|
4610
|
+
addMarkDownValidators(formGroup, controlPath) {
|
|
4611
|
+
const control = formGroup.get(controlPath);
|
|
4612
|
+
if (control) {
|
|
4613
|
+
control.setValidators(FormValidatorsService.markDownPatternValidator());
|
|
4614
|
+
control.updateValueAndValidity();
|
|
4615
|
+
}
|
|
4616
|
+
return control;
|
|
4617
|
+
}
|
|
4589
4618
|
}
|
|
4590
4619
|
FormValidatorsService.CUSTOM_VALIDATED_TYPES = [
|
|
4591
4620
|
'Date', 'MoneyGBP', 'Label', 'JudicialUser'
|
|
4592
4621
|
];
|
|
4622
|
+
FormValidatorsService.DEFAULT_INPUT_TEXT = 'text';
|
|
4623
|
+
FormValidatorsService.DEFAULT_INPUT_TEXTAREA = 'textAreas';
|
|
4593
4624
|
FormValidatorsService.ɵfac = function FormValidatorsService_Factory(t) { return new (t || FormValidatorsService)(); };
|
|
4594
4625
|
FormValidatorsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormValidatorsService, factory: FormValidatorsService.ɵfac });
|
|
4595
4626
|
(function () {
|
|
@@ -8430,9 +8461,9 @@ class CaseworkerService {
|
|
|
8430
8461
|
this.errorService = errorService;
|
|
8431
8462
|
}
|
|
8432
8463
|
getCaseworkers(serviceId) {
|
|
8433
|
-
const url = `${this.appConfig.getWorkAllocationApiUrl()}/
|
|
8464
|
+
const url = `${this.appConfig.getWorkAllocationApiUrl()}/retrieveCaseWorkersForServices`;
|
|
8434
8465
|
return this.http
|
|
8435
|
-
.post(url, {
|
|
8466
|
+
.post(url, { serviceIds: [serviceId] })
|
|
8436
8467
|
.pipe(catchError(error => {
|
|
8437
8468
|
this.errorService.setError(error);
|
|
8438
8469
|
return throwError(error);
|
|
@@ -11128,8 +11159,8 @@ function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) {
|
|
|
11128
11159
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r5.errorMessage));
|
|
11129
11160
|
}
|
|
11130
11161
|
}
|
|
11131
|
-
const _c1$
|
|
11132
|
-
const _c2$
|
|
11162
|
+
const _c1$o = function (a0) { return { "form-group-error": a0 }; };
|
|
11163
|
+
const _c2$3 = function (a0) { return { "govuk-input--error": a0 }; };
|
|
11133
11164
|
function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
|
|
11134
11165
|
if (rf & 1) {
|
|
11135
11166
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
@@ -11147,7 +11178,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
|
|
|
11147
11178
|
}
|
|
11148
11179
|
if (rf & 2) {
|
|
11149
11180
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
11150
|
-
i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$
|
|
11181
|
+
i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$o, ctx_r2.missingPostcode));
|
|
11151
11182
|
i0.ɵɵadvance(1);
|
|
11152
11183
|
i0.ɵɵproperty("for", ctx_r2.createElementId("postcodeInput"));
|
|
11153
11184
|
i0.ɵɵadvance(2);
|
|
@@ -11155,7 +11186,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
|
|
|
11155
11186
|
i0.ɵɵadvance(2);
|
|
11156
11187
|
i0.ɵɵproperty("ngIf", ctx_r2.missingPostcode);
|
|
11157
11188
|
i0.ɵɵadvance(1);
|
|
11158
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$
|
|
11189
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$3, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
|
|
11159
11190
|
i0.ɵɵadvance(2);
|
|
11160
11191
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 11, "Find address"));
|
|
11161
11192
|
}
|
|
@@ -11202,7 +11233,7 @@ function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) {
|
|
|
11202
11233
|
}
|
|
11203
11234
|
if (rf & 2) {
|
|
11204
11235
|
const ctx_r3 = i0.ɵɵnextContext(2);
|
|
11205
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$
|
|
11236
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$o, ctx_r3.noAddressSelected));
|
|
11206
11237
|
i0.ɵɵadvance(1);
|
|
11207
11238
|
i0.ɵɵproperty("for", ctx_r3.createElementId("addressList"));
|
|
11208
11239
|
i0.ɵɵadvance(2);
|
|
@@ -12771,7 +12802,7 @@ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) {
|
|
|
12771
12802
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label), " ");
|
|
12772
12803
|
}
|
|
12773
12804
|
}
|
|
12774
|
-
const _c1$
|
|
12805
|
+
const _c1$n = function (a0) { return { "form-group-error": a0 }; };
|
|
12775
12806
|
class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
12776
12807
|
ngOnInit() {
|
|
12777
12808
|
if (this.caseField.value) {
|
|
@@ -12837,7 +12868,7 @@ WriteCaseLinkFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
12837
12868
|
i0.ɵɵelementEnd();
|
|
12838
12869
|
}
|
|
12839
12870
|
if (rf & 2) {
|
|
12840
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
12871
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$n, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
|
|
12841
12872
|
i0.ɵɵadvance(1);
|
|
12842
12873
|
i0.ɵɵproperty("for", ctx.id());
|
|
12843
12874
|
i0.ɵɵadvance(1);
|
|
@@ -12875,7 +12906,7 @@ function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) {
|
|
|
12875
12906
|
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);
|
|
12876
12907
|
}
|
|
12877
12908
|
}
|
|
12878
|
-
const _c1$
|
|
12909
|
+
const _c1$m = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
|
|
12879
12910
|
function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
|
|
12880
12911
|
if (rf & 1) {
|
|
12881
12912
|
i0.ɵɵelementStart(0, "tr")(1, "td");
|
|
@@ -12887,7 +12918,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
|
|
|
12887
12918
|
const i_r5 = ctx.index;
|
|
12888
12919
|
const ctx_r3 = i0.ɵɵnextContext(3);
|
|
12889
12920
|
i0.ɵɵadvance(2);
|
|
12890
|
-
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$
|
|
12921
|
+
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$m, i_r5, ctx_r3.caseField.label + " " + (i_r5 + 1), ctx_r3.caseField.field_type.collection_field_type, item_r4.value, ctx_r3.caseField.hidden))("context", ctx_r3.context)("topLevelFormGroup", ctx_r3.topLevelFormGroup)("idPrefix", ctx_r3.buildIdPrefix(i_r5));
|
|
12891
12922
|
}
|
|
12892
12923
|
}
|
|
12893
12924
|
function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) {
|
|
@@ -14085,7 +14116,7 @@ function WriteDocumentFieldComponent_ccd_read_document_field_9_Template(rf, ctx)
|
|
|
14085
14116
|
i0.ɵɵproperty("caseField", ctx_r2.caseField);
|
|
14086
14117
|
}
|
|
14087
14118
|
}
|
|
14088
|
-
const _c1$
|
|
14119
|
+
const _c1$l = function (a0) { return { "form-group-error bottom-30": a0 }; };
|
|
14089
14120
|
class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
14090
14121
|
constructor(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService, jurisdictionService) {
|
|
14091
14122
|
super();
|
|
@@ -14410,7 +14441,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
14410
14441
|
i0.ɵɵelementEnd()();
|
|
14411
14442
|
}
|
|
14412
14443
|
if (rf & 2) {
|
|
14413
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$
|
|
14444
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$l, !ctx.valid));
|
|
14414
14445
|
i0.ɵɵadvance(1);
|
|
14415
14446
|
i0.ɵɵproperty("for", ctx.id());
|
|
14416
14447
|
i0.ɵɵadvance(1);
|
|
@@ -14634,9 +14665,14 @@ WriteDynamicListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ ty
|
|
|
14634
14665
|
})();
|
|
14635
14666
|
|
|
14636
14667
|
class MarkdownComponent {
|
|
14637
|
-
constructor() {
|
|
14668
|
+
constructor() {
|
|
14669
|
+
this.renderUrlToTextFeature = true;
|
|
14670
|
+
}
|
|
14638
14671
|
ngOnInit() {
|
|
14639
14672
|
this.content = this.content.replace(/ \n/g, '<br>');
|
|
14673
|
+
if (this.renderUrlToTextFeature) {
|
|
14674
|
+
this.renderUrlToText();
|
|
14675
|
+
}
|
|
14640
14676
|
}
|
|
14641
14677
|
onMarkdownClick(event) {
|
|
14642
14678
|
// If we don't have an anchor tag, we don't need to do anything.
|
|
@@ -14645,13 +14681,28 @@ class MarkdownComponent {
|
|
|
14645
14681
|
}
|
|
14646
14682
|
return true;
|
|
14647
14683
|
}
|
|
14684
|
+
renderUrlToText() {
|
|
14685
|
+
const renderer = new marked.Renderer();
|
|
14686
|
+
renderer.link = (href, title, text) => {
|
|
14687
|
+
// Return the text without turning it into a link if it's not an internal link
|
|
14688
|
+
return this.isAllowedUrl(href) ? `<a href="${href}">${text}</a>` : text;
|
|
14689
|
+
};
|
|
14690
|
+
marked.setOptions({
|
|
14691
|
+
renderer: renderer
|
|
14692
|
+
});
|
|
14693
|
+
}
|
|
14694
|
+
isAllowedUrl(url) {
|
|
14695
|
+
const currentOrigin = window.location.origin;
|
|
14696
|
+
const urlOrigin = new URL(url, window.location.href).origin;
|
|
14697
|
+
return urlOrigin === currentOrigin || url.startsWith('/'); // Check if same origin or relative
|
|
14698
|
+
}
|
|
14648
14699
|
}
|
|
14649
14700
|
MarkdownComponent.ɵfac = function MarkdownComponent_Factory(t) { return new (t || MarkdownComponent)(); };
|
|
14650
14701
|
MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]], hostBindings: function MarkdownComponent_HostBindings(rf, ctx) {
|
|
14651
14702
|
if (rf & 1) {
|
|
14652
14703
|
i0.ɵɵlistener("click", function MarkdownComponent_click_HostBindingHandler($event) { return ctx.onMarkdownClick($event); });
|
|
14653
14704
|
}
|
|
14654
|
-
}, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, decls: 4, vars: 5, consts: [[1, "markdown", 3, "data"]], template: function MarkdownComponent_Template(rf, ctx) {
|
|
14705
|
+
}, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink", renderUrlToTextFeature: "renderUrlToTextFeature" }, decls: 4, vars: 5, consts: [[1, "markdown", 3, "data"]], template: function MarkdownComponent_Template(rf, ctx) {
|
|
14655
14706
|
if (rf & 1) {
|
|
14656
14707
|
i0.ɵɵelementStart(0, "div");
|
|
14657
14708
|
i0.ɵɵelement(1, "markdown", 0);
|
|
@@ -14672,6 +14723,8 @@ MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownC
|
|
|
14672
14723
|
type: Input
|
|
14673
14724
|
}], markdownUseHrefAsRouterLink: [{
|
|
14674
14725
|
type: Input
|
|
14726
|
+
}], renderUrlToTextFeature: [{
|
|
14727
|
+
type: Input
|
|
14675
14728
|
}], onMarkdownClick: [{
|
|
14676
14729
|
type: HostListener,
|
|
14677
14730
|
args: ['click', ['$event']]
|
|
@@ -14806,7 +14859,7 @@ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, c
|
|
|
14806
14859
|
i0.ɵɵadvance(1);
|
|
14807
14860
|
i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
|
|
14808
14861
|
i0.ɵɵadvance(1);
|
|
14809
|
-
i0.ɵɵproperty("content", checkbox_r4.label);
|
|
14862
|
+
i0.ɵɵproperty("content", checkbox_r4.label)("renderUrlToTextFeature", false);
|
|
14810
14863
|
}
|
|
14811
14864
|
}
|
|
14812
14865
|
const _c0$O = function (a0) { return { "error": a0 }; };
|
|
@@ -14871,14 +14924,14 @@ class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteCompon
|
|
|
14871
14924
|
}
|
|
14872
14925
|
}
|
|
14873
14926
|
WriteDynamicMultiSelectListFieldComponent.ɵfac = /*@__PURE__*/ function () { let ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory; return function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory || (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent)))(t || WriteDynamicMultiSelectListFieldComponent); }; }();
|
|
14874
|
-
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) {
|
|
14927
|
+
WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"], [3, "content", "renderUrlToTextFeature"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
|
|
14875
14928
|
if (rf & 1) {
|
|
14876
14929
|
i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
|
|
14877
14930
|
i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
|
|
14878
14931
|
i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
|
|
14879
14932
|
i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
|
|
14880
14933
|
i0.ɵɵelementEnd();
|
|
14881
|
-
i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5,
|
|
14934
|
+
i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 7, "ng-container", 4);
|
|
14882
14935
|
i0.ɵɵelementEnd()();
|
|
14883
14936
|
}
|
|
14884
14937
|
if (rf & 2) {
|
|
@@ -14896,7 +14949,7 @@ WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineCom
|
|
|
14896
14949
|
(function () {
|
|
14897
14950
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
|
|
14898
14951
|
type: Component,
|
|
14899
|
-
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"] }]
|
|
14952
|
+
args: [{ selector: 'ccd-write-dynamic-multi-select-list-field', template: "<div class=\"form-group bottom-30\" [ngClass]=\"{'error': !checkboxes.valid && checkboxes.touched}\" [id]=\"id()\">\n\n <fieldset>\n\n <legend>\n <span *ngIf=\"caseField.label\" class=\"form-label\">{{caseField | ccdFieldLabel}}</span>\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">{{caseField.hint_text}}</span>\n <span *ngIf=\"checkboxes.errors && checkboxes.touched\" class=\"error-message\">{{checkboxes.errors |\n ccdFirstError}}</span>\n </legend>\n\n <ng-container *ngFor=\"let checkbox of caseField.list_items\">\n\n <div class=\"multiple-choice\">\n <input class=\"form-control\" id=\"{{ createElementId(checkbox.code) }}\" name=\"{{ id() }}\" type=\"checkbox\"\n [value]=\"checkbox.code\" [checked]=\"isSelected(checkbox.code)\" (change)=\"onCheckChange($event)\">\n <label class=\"form-label\" for=\"{{ createElementId(checkbox.code) }}\">\n <ccd-markdown [content]=\"checkbox.label\" [renderUrlToTextFeature]=\"false\"></ccd-markdown>\n </label>\n </div>\n\n </ng-container>\n\n </fieldset>\n\n</div>\n", styles: ["ccd-markdown{display:inline-block}\n"] }]
|
|
14900
14953
|
}], null, null);
|
|
14901
14954
|
})();
|
|
14902
14955
|
|
|
@@ -15040,7 +15093,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
|
|
|
15040
15093
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r5.label));
|
|
15041
15094
|
}
|
|
15042
15095
|
}
|
|
15043
|
-
const _c1$
|
|
15096
|
+
const _c1$k = function (a0) { return { "form-group-error": a0 }; };
|
|
15044
15097
|
class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
15045
15098
|
ngOnInit() {
|
|
15046
15099
|
/**
|
|
@@ -15080,7 +15133,7 @@ WriteDynamicRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent
|
|
|
15080
15133
|
i0.ɵɵelementEnd()();
|
|
15081
15134
|
}
|
|
15082
15135
|
if (rf & 2) {
|
|
15083
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$
|
|
15136
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$k, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
|
|
15084
15137
|
i0.ɵɵadvance(3);
|
|
15085
15138
|
i0.ɵɵproperty("for", ctx.id());
|
|
15086
15139
|
i0.ɵɵadvance(1);
|
|
@@ -15181,7 +15234,7 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) {
|
|
|
15181
15234
|
}
|
|
15182
15235
|
}
|
|
15183
15236
|
const _c0$M = function (a0) { return { "form-group-error": a0 }; };
|
|
15184
|
-
const _c1$
|
|
15237
|
+
const _c1$j = function (a0) { return { "govuk-input--error": a0 }; };
|
|
15185
15238
|
class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
|
|
15186
15239
|
ngOnInit() {
|
|
15187
15240
|
this.emailControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -15209,7 +15262,7 @@ WriteEmailFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
|
|
|
15209
15262
|
i0.ɵɵadvance(1);
|
|
15210
15263
|
i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
|
|
15211
15264
|
i0.ɵɵadvance(1);
|
|
15212
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
15265
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$j, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
|
|
15213
15266
|
}
|
|
15214
15267
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
15215
15268
|
(function () {
|
|
@@ -15464,7 +15517,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
|
|
|
15464
15517
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r4.label));
|
|
15465
15518
|
}
|
|
15466
15519
|
}
|
|
15467
|
-
const _c1$
|
|
15520
|
+
const _c1$i = function (a0) { return { "form-group-error": a0 }; };
|
|
15468
15521
|
class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
15469
15522
|
ngOnInit() {
|
|
15470
15523
|
const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
|
|
@@ -15486,7 +15539,7 @@ WriteFixedRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
|
|
|
15486
15539
|
i0.ɵɵelementEnd()();
|
|
15487
15540
|
}
|
|
15488
15541
|
if (rf & 2) {
|
|
15489
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
15542
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$i, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
|
|
15490
15543
|
i0.ɵɵadvance(3);
|
|
15491
15544
|
i0.ɵɵproperty("for", ctx.id());
|
|
15492
15545
|
i0.ɵɵadvance(1);
|
|
@@ -15640,7 +15693,7 @@ function WriteJudicialUserFieldComponent_mat_option_11_Template(rf, ctx) {
|
|
|
15640
15693
|
i0.ɵɵelementEnd();
|
|
15641
15694
|
}
|
|
15642
15695
|
}
|
|
15643
|
-
const _c1$
|
|
15696
|
+
const _c1$h = function (a0) { return { "form-group-error": a0 }; };
|
|
15644
15697
|
class WriteJudicialUserFieldComponent extends WriteComplexFieldComponent {
|
|
15645
15698
|
constructor(jurisdictionService, sessionStorageService, caseFlagRefDataService, compoundPipe, validatorsService) {
|
|
15646
15699
|
super(compoundPipe, validatorsService);
|
|
@@ -15793,7 +15846,7 @@ WriteJudicialUserFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ t
|
|
|
15793
15846
|
}
|
|
15794
15847
|
if (rf & 2) {
|
|
15795
15848
|
const _r3 = i0.ɵɵreference(7);
|
|
15796
|
-
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$
|
|
15849
|
+
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$h, !!ctx.judicialUserControl && ctx.errors));
|
|
15797
15850
|
i0.ɵɵadvance(1);
|
|
15798
15851
|
i0.ɵɵproperty("for", ctx.id());
|
|
15799
15852
|
i0.ɵɵadvance(1);
|
|
@@ -16580,7 +16633,7 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) {
|
|
|
16580
16633
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, reason_r19));
|
|
16581
16634
|
}
|
|
16582
16635
|
}
|
|
16583
|
-
const _c1$
|
|
16636
|
+
const _c1$g = function (a0) { return { "table-group-error": a0 }; };
|
|
16584
16637
|
function LinkCasesComponent_tr_31_Template(rf, ctx) {
|
|
16585
16638
|
if (rf & 1) {
|
|
16586
16639
|
const _r21 = i0.ɵɵgetCurrentView();
|
|
@@ -16613,7 +16666,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) {
|
|
|
16613
16666
|
const case_r16 = ctx.$implicit;
|
|
16614
16667
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
16615
16668
|
i0.ɵɵadvance(2);
|
|
16616
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$
|
|
16669
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$g, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
|
|
16617
16670
|
i0.ɵɵadvance(2);
|
|
16618
16671
|
i0.ɵɵtextInterpolate1("", case_r16.caseName, " ");
|
|
16619
16672
|
i0.ɵɵadvance(2);
|
|
@@ -18700,7 +18753,7 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) {
|
|
|
18700
18753
|
}
|
|
18701
18754
|
}
|
|
18702
18755
|
const _c0$E = function (a0) { return { "form-group-error": a0 }; };
|
|
18703
|
-
const _c1$
|
|
18756
|
+
const _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
|
|
18704
18757
|
class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
|
|
18705
18758
|
ngOnInit() {
|
|
18706
18759
|
this.numberControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -18728,7 +18781,7 @@ WriteNumberFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: W
|
|
|
18728
18781
|
i0.ɵɵadvance(1);
|
|
18729
18782
|
i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
|
|
18730
18783
|
i0.ɵɵadvance(1);
|
|
18731
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
18784
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
|
|
18732
18785
|
}
|
|
18733
18786
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
18734
18787
|
(function () {
|
|
@@ -19444,7 +19497,7 @@ function WritePhoneUKFieldComponent_span_4_Template(rf, ctx) {
|
|
|
19444
19497
|
}
|
|
19445
19498
|
}
|
|
19446
19499
|
const _c0$C = function (a0) { return { "form-group-error": a0 }; };
|
|
19447
|
-
const _c1$
|
|
19500
|
+
const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
|
|
19448
19501
|
class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
|
|
19449
19502
|
ngOnInit() {
|
|
19450
19503
|
this.phoneUkControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -19472,7 +19525,7 @@ WritePhoneUKFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
19472
19525
|
i0.ɵɵadvance(1);
|
|
19473
19526
|
i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
|
|
19474
19527
|
i0.ɵɵadvance(1);
|
|
19475
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
19528
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
|
|
19476
19529
|
}
|
|
19477
19530
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
19478
19531
|
(function () {
|
|
@@ -21714,7 +21767,7 @@ function WriteTextAreaFieldComponent_span_4_Template(rf, ctx) {
|
|
|
21714
21767
|
}
|
|
21715
21768
|
}
|
|
21716
21769
|
const _c0$z = function (a0) { return { "form-group-error": a0 }; };
|
|
21717
|
-
const _c1$
|
|
21770
|
+
const _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
|
|
21718
21771
|
class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
21719
21772
|
constructor(browserService) {
|
|
21720
21773
|
super();
|
|
@@ -21754,7 +21807,7 @@ WriteTextAreaFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
21754
21807
|
i0.ɵɵadvance(1);
|
|
21755
21808
|
i0.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
|
|
21756
21809
|
i0.ɵɵadvance(1);
|
|
21757
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
21810
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
|
|
21758
21811
|
}
|
|
21759
21812
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
21760
21813
|
(function () {
|
|
@@ -21829,7 +21882,7 @@ function WriteTextFieldComponent_span_4_Template(rf, ctx) {
|
|
|
21829
21882
|
}
|
|
21830
21883
|
}
|
|
21831
21884
|
const _c0$y = function (a0) { return { "form-group-error": a0 }; };
|
|
21832
|
-
const _c1$
|
|
21885
|
+
const _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
|
|
21833
21886
|
class WriteTextFieldComponent extends AbstractFieldWriteComponent {
|
|
21834
21887
|
ngOnInit() {
|
|
21835
21888
|
this.textControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -21861,7 +21914,7 @@ WriteTextFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wri
|
|
|
21861
21914
|
i0.ɵɵadvance(1);
|
|
21862
21915
|
i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
|
|
21863
21916
|
i0.ɵɵadvance(1);
|
|
21864
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
21917
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
|
|
21865
21918
|
}
|
|
21866
21919
|
}, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
21867
21920
|
(function () {
|
|
@@ -22068,7 +22121,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) {
|
|
|
22068
22121
|
i0.ɵɵtextInterpolate(ctx_r3.caseField.label ? i0.ɵɵpipeBind3(4, 8, ctx_r3.caseField.label, null, value_r4) : value_r4);
|
|
22069
22122
|
}
|
|
22070
22123
|
}
|
|
22071
|
-
const _c1$
|
|
22124
|
+
const _c1$b = function (a0) { return { "form-group-error": a0 }; };
|
|
22072
22125
|
class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
|
|
22073
22126
|
constructor(yesNoService) {
|
|
22074
22127
|
super();
|
|
@@ -22092,7 +22145,7 @@ WriteYesNoFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
|
|
|
22092
22145
|
i0.ɵɵelementEnd()()();
|
|
22093
22146
|
}
|
|
22094
22147
|
if (rf & 2) {
|
|
22095
|
-
i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
22148
|
+
i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
|
|
22096
22149
|
i0.ɵɵadvance(3);
|
|
22097
22150
|
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
22098
22151
|
i0.ɵɵadvance(1);
|
|
@@ -22490,7 +22543,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_co
|
|
|
22490
22543
|
i0.ɵɵelementContainer(0);
|
|
22491
22544
|
}
|
|
22492
22545
|
}
|
|
22493
|
-
const _c1$
|
|
22546
|
+
const _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
|
|
22494
22547
|
function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) {
|
|
22495
22548
|
if (rf & 1) {
|
|
22496
22549
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -22503,7 +22556,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Templ
|
|
|
22503
22556
|
i0.ɵɵnextContext();
|
|
22504
22557
|
const _r1 = i0.ɵɵreference(13);
|
|
22505
22558
|
i0.ɵɵadvance(1);
|
|
22506
|
-
i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$
|
|
22559
|
+
i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
|
|
22507
22560
|
}
|
|
22508
22561
|
}
|
|
22509
22562
|
function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) {
|
|
@@ -22695,7 +22748,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) {
|
|
|
22695
22748
|
}
|
|
22696
22749
|
}
|
|
22697
22750
|
const _c0$s = [[["", "trigger", ""]]];
|
|
22698
|
-
const _c1$
|
|
22751
|
+
const _c1$9 = ["[trigger]"];
|
|
22699
22752
|
class CaseFileViewOverlayMenuComponent {
|
|
22700
22753
|
constructor() {
|
|
22701
22754
|
this.title = '';
|
|
@@ -22709,7 +22762,7 @@ class CaseFileViewOverlayMenuComponent {
|
|
|
22709
22762
|
}
|
|
22710
22763
|
}
|
|
22711
22764
|
CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
|
|
22712
|
-
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$
|
|
22765
|
+
CaseFileViewOverlayMenuComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$9, decls: 5, vars: 4, consts: [["type", "button", "cdkOverlayOrigin", "", 1, "overlay-toggle", 3, "click"], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass", "backdropClick"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], [1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], [1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) {
|
|
22713
22766
|
if (rf & 1) {
|
|
22714
22767
|
i0.ɵɵprojectionDef(_c0$s);
|
|
22715
22768
|
i0.ɵɵelementStart(0, "div")(1, "button", 0, 1);
|
|
@@ -24972,7 +25025,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template(rf, ctx) {
|
|
|
24972
25025
|
}
|
|
24973
25026
|
}
|
|
24974
25027
|
const _c0$n = function (a0) { return { "form-group-error": a0 }; };
|
|
24975
|
-
const _c1$
|
|
25028
|
+
const _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
|
|
24976
25029
|
function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) {
|
|
24977
25030
|
if (rf & 1) {
|
|
24978
25031
|
i0.ɵɵelementStart(0, "div", 18)(1, "div", 3)(2, "label", 19);
|
|
@@ -24994,7 +25047,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) {
|
|
|
24994
25047
|
i0.ɵɵadvance(3);
|
|
24995
25048
|
i0.ɵɵproperty("ngIf", ctx_r7.flagTypeErrorMessage.length > 0);
|
|
24996
25049
|
i0.ɵɵadvance(1);
|
|
24997
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c1$
|
|
25050
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c1$8, ctx_r7.flagTypeErrorMessage.length > 0))("name", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION)("formControlName", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION);
|
|
24998
25051
|
i0.ɵɵadvance(1);
|
|
24999
25052
|
i0.ɵɵproperty("ngIf", !ctx_r7.isDisplayContextParameterExternal && !ctx_r7.isCaseLevelFlag && ctx_r7.isDisplayContextParameter2Point1Enabled);
|
|
25000
25053
|
}
|
|
@@ -25564,7 +25617,7 @@ function UpdateFlagComponent_div_22_Template(rf, ctx) {
|
|
|
25564
25617
|
i0.ɵɵproperty("ngIf", ctx_r9.selectedFlag.flagDetailDisplay.flagDetail.status === "Active");
|
|
25565
25618
|
}
|
|
25566
25619
|
}
|
|
25567
|
-
const _c1$
|
|
25620
|
+
const _c1$7 = function (a0) { return { "form-group-error": a0 }; };
|
|
25568
25621
|
class UpdateFlagComponent {
|
|
25569
25622
|
constructor(rpxTranslationService) {
|
|
25570
25623
|
this.rpxTranslationService = rpxTranslationService;
|
|
@@ -25773,7 +25826,7 @@ UpdateFlagComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateF
|
|
|
25773
25826
|
const _r3 = i0.ɵɵreference(17);
|
|
25774
25827
|
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
25775
25828
|
i0.ɵɵadvance(2);
|
|
25776
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$
|
|
25829
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$7, ctx.errorMessages.length > 0));
|
|
25777
25830
|
i0.ɵɵadvance(3);
|
|
25778
25831
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 13, ctx.updateFlagTitle), " ");
|
|
25779
25832
|
i0.ɵɵadvance(2);
|
|
@@ -27169,7 +27222,7 @@ const CUSTOM_MOMENT_FORMATS = {
|
|
|
27169
27222
|
};
|
|
27170
27223
|
|
|
27171
27224
|
const _c0$g = ["picker"];
|
|
27172
|
-
const _c1$
|
|
27225
|
+
const _c1$6 = ["input"];
|
|
27173
27226
|
function DatetimePickerComponent_span_3_Template(rf, ctx) {
|
|
27174
27227
|
if (rf & 1) {
|
|
27175
27228
|
i0.ɵɵelementStart(0, "span", 11);
|
|
@@ -27233,7 +27286,7 @@ function DatetimePickerComponent_span_7_Template(rf, ctx) {
|
|
|
27233
27286
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "This date is later than the maximum date allowed"));
|
|
27234
27287
|
}
|
|
27235
27288
|
}
|
|
27236
|
-
const _c2$
|
|
27289
|
+
const _c2$2 = function (a0) { return { "form-group-error": a0 }; };
|
|
27237
27290
|
class DatetimePickerComponent extends AbstractFormFieldComponent {
|
|
27238
27291
|
constructor(formatTranslationService, ngxMatDateFormats) {
|
|
27239
27292
|
super();
|
|
@@ -27399,7 +27452,7 @@ DatetimePickerComponent.ɵfac = function DatetimePickerComponent_Factory(t) { re
|
|
|
27399
27452
|
DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DatetimePickerComponent, selectors: [["ccd-datetime-picker"]], viewQuery: function DatetimePickerComponent_Query(rf, ctx) {
|
|
27400
27453
|
if (rf & 1) {
|
|
27401
27454
|
i0.ɵɵviewQuery(_c0$g, 5);
|
|
27402
|
-
i0.ɵɵviewQuery(_c1$
|
|
27455
|
+
i0.ɵɵviewQuery(_c1$6, 5);
|
|
27403
27456
|
}
|
|
27404
27457
|
if (rf & 2) {
|
|
27405
27458
|
let _t;
|
|
@@ -27435,7 +27488,7 @@ DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Dat
|
|
|
27435
27488
|
}
|
|
27436
27489
|
if (rf & 2) {
|
|
27437
27490
|
const _r6 = i0.ɵɵreference(13);
|
|
27438
|
-
i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$
|
|
27491
|
+
i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$2, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
|
|
27439
27492
|
i0.ɵɵadvance(3);
|
|
27440
27493
|
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
27441
27494
|
i0.ɵɵadvance(1);
|
|
@@ -27689,7 +27742,7 @@ function EventLogTableComponent_tr_20_div_6_Template(rf, ctx) {
|
|
|
27689
27742
|
i0.ɵɵtextInterpolate(ctx_r5.getSignificantItemDesc(event_r1));
|
|
27690
27743
|
}
|
|
27691
27744
|
}
|
|
27692
|
-
const _c1$
|
|
27745
|
+
const _c1$5 = function (a0) { return { "EventLogTable-Selected": a0 }; };
|
|
27693
27746
|
function EventLogTableComponent_tr_20_Template(rf, ctx) {
|
|
27694
27747
|
if (rf & 1) {
|
|
27695
27748
|
const _r18 = i0.ɵɵgetCurrentView();
|
|
@@ -27722,7 +27775,7 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) {
|
|
|
27722
27775
|
if (rf & 2) {
|
|
27723
27776
|
const event_r1 = ctx.$implicit;
|
|
27724
27777
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
27725
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$
|
|
27778
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$5, ctx_r0.selected === event_r1));
|
|
27726
27779
|
i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforRow(event_r1));
|
|
27727
27780
|
i0.ɵɵadvance(2);
|
|
27728
27781
|
i0.ɵɵproperty("ngSwitch", ctx_r0.isPartOfCaseTimeline);
|
|
@@ -29790,6 +29843,36 @@ function CaseEditSubmitComponent_div_0_ng_container_13_Template(rf, ctx) {
|
|
|
29790
29843
|
i0.ɵɵproperty("ngForOf", ctx_r8.showSummaryFields);
|
|
29791
29844
|
}
|
|
29792
29845
|
}
|
|
29846
|
+
function CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template(rf, ctx) {
|
|
29847
|
+
if (rf & 1) {
|
|
29848
|
+
i0.ɵɵelementStart(0, "span", 48);
|
|
29849
|
+
i0.ɵɵtext(1);
|
|
29850
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
29851
|
+
i0.ɵɵpipe(3, "ccdFirstError");
|
|
29852
|
+
i0.ɵɵelementEnd();
|
|
29853
|
+
}
|
|
29854
|
+
if (rf & 2) {
|
|
29855
|
+
const ctx_r36 = i0.ɵɵnextContext(3);
|
|
29856
|
+
i0.ɵɵadvance(1);
|
|
29857
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r36.summary.errors, ctx_r36.eventSummaryLabel)), " ");
|
|
29858
|
+
}
|
|
29859
|
+
}
|
|
29860
|
+
function CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template(rf, ctx) {
|
|
29861
|
+
if (rf & 1) {
|
|
29862
|
+
i0.ɵɵelementStart(0, "span", 48);
|
|
29863
|
+
i0.ɵɵtext(1);
|
|
29864
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
29865
|
+
i0.ɵɵpipe(3, "ccdFirstError");
|
|
29866
|
+
i0.ɵɵelementEnd();
|
|
29867
|
+
}
|
|
29868
|
+
if (rf & 2) {
|
|
29869
|
+
const ctx_r37 = i0.ɵɵnextContext(3);
|
|
29870
|
+
i0.ɵɵadvance(1);
|
|
29871
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r37.description.errors, ctx_r37.eventDescriptionLabel)), " ");
|
|
29872
|
+
}
|
|
29873
|
+
}
|
|
29874
|
+
const _c1$4 = function (a0) { return { "form-group-error": a0 }; };
|
|
29875
|
+
const _c2$1 = function (a0) { return { "govuk-input--error": a0 }; };
|
|
29793
29876
|
function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) {
|
|
29794
29877
|
if (rf & 1) {
|
|
29795
29878
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -29800,21 +29883,38 @@ function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) {
|
|
|
29800
29883
|
i0.ɵɵelementStart(6, "span", 43);
|
|
29801
29884
|
i0.ɵɵtext(7, "A few words describing the purpose of the event.");
|
|
29802
29885
|
i0.ɵɵelementEnd()();
|
|
29803
|
-
i0.ɵɵ
|
|
29886
|
+
i0.ɵɵtemplate(8, CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template, 4, 6, "span", 44);
|
|
29887
|
+
i0.ɵɵelement(9, "input", 45);
|
|
29804
29888
|
i0.ɵɵelementEnd();
|
|
29805
|
-
i0.ɵɵelementStart(
|
|
29806
|
-
i0.ɵɵtext(
|
|
29889
|
+
i0.ɵɵelementStart(10, "div", 41)(11, "label", 46);
|
|
29890
|
+
i0.ɵɵtext(12, "Event description (optional)");
|
|
29807
29891
|
i0.ɵɵelementEnd();
|
|
29808
|
-
i0.ɵɵ
|
|
29892
|
+
i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template, 4, 6, "span", 44);
|
|
29893
|
+
i0.ɵɵelement(14, "textarea", 47);
|
|
29809
29894
|
i0.ɵɵelementEnd()();
|
|
29810
29895
|
i0.ɵɵelementContainerEnd();
|
|
29811
29896
|
}
|
|
29897
|
+
if (rf & 2) {
|
|
29898
|
+
const ctx_r9 = i0.ɵɵnextContext(2);
|
|
29899
|
+
i0.ɵɵadvance(3);
|
|
29900
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c1$4, !!ctx_r9.summary && !ctx_r9.summary.valid && (ctx_r9.summary.dirty || ctx_r9.summary.touched)));
|
|
29901
|
+
i0.ɵɵadvance(5);
|
|
29902
|
+
i0.ɵɵproperty("ngIf", (ctx_r9.summary == null ? null : ctx_r9.summary.errors) && (ctx_r9.summary.dirty || ctx_r9.summary.touched));
|
|
29903
|
+
i0.ɵɵadvance(1);
|
|
29904
|
+
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)));
|
|
29905
|
+
i0.ɵɵadvance(1);
|
|
29906
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$4, !!ctx_r9.description && !ctx_r9.description.valid && (ctx_r9.description.dirty || ctx_r9.description.touched)));
|
|
29907
|
+
i0.ɵɵadvance(3);
|
|
29908
|
+
i0.ɵɵproperty("ngIf", (ctx_r9.description == null ? null : ctx_r9.description.errors) && (ctx_r9.description.dirty || ctx_r9.description.touched));
|
|
29909
|
+
i0.ɵɵadvance(1);
|
|
29910
|
+
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)));
|
|
29911
|
+
}
|
|
29812
29912
|
}
|
|
29813
29913
|
function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) {
|
|
29814
29914
|
if (rf & 1) {
|
|
29815
|
-
const
|
|
29816
|
-
i0.ɵɵelementStart(0, "button",
|
|
29817
|
-
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_button_16_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
29915
|
+
const _r39 = i0.ɵɵgetCurrentView();
|
|
29916
|
+
i0.ɵɵelementStart(0, "button", 49);
|
|
29917
|
+
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_button_16_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r39); const ctx_r38 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r38.previous()); });
|
|
29818
29918
|
i0.ɵɵtext(1);
|
|
29819
29919
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
29820
29920
|
i0.ɵɵelementEnd();
|
|
@@ -29828,7 +29928,7 @@ function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) {
|
|
|
29828
29928
|
}
|
|
29829
29929
|
function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
|
|
29830
29930
|
if (rf & 1) {
|
|
29831
|
-
const
|
|
29931
|
+
const _r41 = i0.ɵɵgetCurrentView();
|
|
29832
29932
|
i0.ɵɵelementStart(0, "div")(1, "h1", 2);
|
|
29833
29933
|
i0.ɵɵtext(2);
|
|
29834
29934
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
@@ -29838,13 +29938,13 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
|
|
|
29838
29938
|
i0.ɵɵtemplate(7, CaseEditSubmitComponent_div_0_ng_template_7_Template, 1, 1, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor);
|
|
29839
29939
|
i0.ɵɵelement(9, "ccd-case-edit-generic-errors", 6);
|
|
29840
29940
|
i0.ɵɵelementStart(10, "ccd-callback-errors", 7);
|
|
29841
|
-
i0.ɵɵlistener("callbackErrorsContext", function CaseEditSubmitComponent_div_0_Template_ccd_callback_errors_callbackErrorsContext_10_listener($event) { i0.ɵɵrestoreView(
|
|
29941
|
+
i0.ɵɵlistener("callbackErrorsContext", function CaseEditSubmitComponent_div_0_Template_ccd_callback_errors_callbackErrorsContext_10_listener($event) { i0.ɵɵrestoreView(_r41); const ctx_r40 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r40.callbackErrorsNotify($event)); });
|
|
29842
29942
|
i0.ɵɵelementEnd();
|
|
29843
29943
|
i0.ɵɵelementStart(11, "form", 8);
|
|
29844
|
-
i0.ɵɵlistener("submit", function CaseEditSubmitComponent_div_0_Template_form_submit_11_listener() { i0.ɵɵrestoreView(
|
|
29944
|
+
i0.ɵɵlistener("submit", function CaseEditSubmitComponent_div_0_Template_form_submit_11_listener() { i0.ɵɵrestoreView(_r41); const ctx_r42 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r42.submit()); });
|
|
29845
29945
|
i0.ɵɵtemplate(12, CaseEditSubmitComponent_div_0_ng_container_12_Template, 8, 5, "ng-container", 0);
|
|
29846
29946
|
i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_13_Template, 4, 1, "ng-container", 0);
|
|
29847
|
-
i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template,
|
|
29947
|
+
i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 15, 14, "ng-container", 0);
|
|
29848
29948
|
i0.ɵɵelementStart(15, "div", 9);
|
|
29849
29949
|
i0.ɵɵtemplate(16, CaseEditSubmitComponent_div_0_button_16_Template, 3, 4, "button", 10);
|
|
29850
29950
|
i0.ɵɵelementStart(17, "button", 11);
|
|
@@ -29852,7 +29952,7 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
|
|
|
29852
29952
|
i0.ɵɵpipe(19, "rpxTranslate");
|
|
29853
29953
|
i0.ɵɵelementEnd()();
|
|
29854
29954
|
i0.ɵɵelementStart(20, "p", 12)(21, "a", 13);
|
|
29855
|
-
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_Template_a_click_21_listener() { i0.ɵɵrestoreView(
|
|
29955
|
+
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_Template_a_click_21_listener() { i0.ɵɵrestoreView(_r41); const ctx_r43 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r43.cancel()); });
|
|
29856
29956
|
i0.ɵɵtext(22);
|
|
29857
29957
|
i0.ɵɵpipe(23, "rpxTranslate");
|
|
29858
29958
|
i0.ɵɵelementEnd()()()();
|
|
@@ -29891,9 +29991,9 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) {
|
|
|
29891
29991
|
}
|
|
29892
29992
|
function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
|
|
29893
29993
|
if (rf & 1) {
|
|
29894
|
-
const
|
|
29895
|
-
i0.ɵɵelementStart(0, "ccd-case-event-completion",
|
|
29896
|
-
i0.ɵɵlistener("eventCanBeCompleted", function CaseEditSubmitComponent_ccd_case_event_completion_1_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0.ɵɵrestoreView(
|
|
29994
|
+
const _r45 = i0.ɵɵgetCurrentView();
|
|
29995
|
+
i0.ɵɵelementStart(0, "ccd-case-event-completion", 50);
|
|
29996
|
+
i0.ɵɵlistener("eventCanBeCompleted", function CaseEditSubmitComponent_ccd_case_event_completion_1_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0.ɵɵrestoreView(_r45); const ctx_r44 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r44.onEventCanBeCompleted($event)); });
|
|
29897
29997
|
i0.ɵɵelementEnd();
|
|
29898
29998
|
}
|
|
29899
29999
|
if (rf & 2) {
|
|
@@ -29903,14 +30003,17 @@ function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
|
|
|
29903
30003
|
}
|
|
29904
30004
|
// @dynamic
|
|
29905
30005
|
class CaseEditSubmitComponent {
|
|
29906
|
-
constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier) {
|
|
30006
|
+
constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier, formValidatorsService) {
|
|
29907
30007
|
this.caseEdit = caseEdit;
|
|
29908
30008
|
this.fieldsUtils = fieldsUtils;
|
|
29909
30009
|
this.caseFieldService = caseFieldService;
|
|
29910
30010
|
this.route = route;
|
|
29911
30011
|
this.orderService = orderService;
|
|
29912
30012
|
this.profileNotifier = profileNotifier;
|
|
30013
|
+
this.formValidatorsService = formValidatorsService;
|
|
29913
30014
|
this.paletteContext = PaletteContext.CHECK_YOUR_ANSWER;
|
|
30015
|
+
this.eventSummaryLabel = 'Event summary';
|
|
30016
|
+
this.eventDescriptionLabel = 'Event description';
|
|
29914
30017
|
}
|
|
29915
30018
|
get isDisabled() {
|
|
29916
30019
|
// EUI-3452.
|
|
@@ -29921,7 +30024,7 @@ class CaseEditSubmitComponent {
|
|
|
29921
30024
|
}
|
|
29922
30025
|
ngOnInit() {
|
|
29923
30026
|
var _a, _b, _c;
|
|
29924
|
-
this.profileSubscription = this.profileNotifier.profile.subscribe(_ => this.profile = _);
|
|
30027
|
+
this.profileSubscription = this.profileNotifier.profile.subscribe((_) => this.profile = _);
|
|
29925
30028
|
this.eventTrigger = this.caseEdit.eventTrigger;
|
|
29926
30029
|
this.triggerText = this.eventTrigger.end_button_label || CallbackErrorsComponent.TRIGGER_TEXT_SUBMIT;
|
|
29927
30030
|
this.editForm = this.caseEdit.form;
|
|
@@ -29934,10 +30037,12 @@ class CaseEditSubmitComponent {
|
|
|
29934
30037
|
// Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
|
|
29935
30038
|
// a FlagLauncher field in the event trigger
|
|
29936
30039
|
this.caseEdit.isCaseFlagSubmission =
|
|
29937
|
-
this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
|
|
30040
|
+
this.eventTrigger.case_fields.some((caseField) => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
|
|
29938
30041
|
this.caseEdit.isLinkedCasesSubmission =
|
|
29939
30042
|
this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']));
|
|
29940
30043
|
this.pageTitle = this.getPageTitle();
|
|
30044
|
+
this.summary = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.summary');
|
|
30045
|
+
this.description = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.description');
|
|
29941
30046
|
}
|
|
29942
30047
|
ngOnDestroy() {
|
|
29943
30048
|
/* istanbul ignore else */
|
|
@@ -29946,12 +30051,14 @@ class CaseEditSubmitComponent {
|
|
|
29946
30051
|
}
|
|
29947
30052
|
}
|
|
29948
30053
|
submit() {
|
|
29949
|
-
this.
|
|
29950
|
-
|
|
29951
|
-
|
|
29952
|
-
|
|
29953
|
-
|
|
29954
|
-
|
|
30054
|
+
if (this.summary.valid && this.description.valid) {
|
|
30055
|
+
this.caseEdit.submitForm({
|
|
30056
|
+
eventTrigger: this.eventTrigger,
|
|
30057
|
+
form: this.editForm,
|
|
30058
|
+
submit: this.caseEdit.submit,
|
|
30059
|
+
caseDetails: this.caseEdit.caseDetails
|
|
30060
|
+
});
|
|
30061
|
+
}
|
|
29955
30062
|
}
|
|
29956
30063
|
onEventCanBeCompleted(eventCanBeCompleted) {
|
|
29957
30064
|
this.caseEdit.onEventCanBeCompleted({
|
|
@@ -29959,7 +30066,7 @@ class CaseEditSubmitComponent {
|
|
|
29959
30066
|
eventCanBeCompleted,
|
|
29960
30067
|
caseDetails: this.caseEdit.caseDetails,
|
|
29961
30068
|
form: this.editForm,
|
|
29962
|
-
submit: this.caseEdit.submit
|
|
30069
|
+
submit: this.caseEdit.submit
|
|
29963
30070
|
});
|
|
29964
30071
|
}
|
|
29965
30072
|
getPageTitle() {
|
|
@@ -30035,7 +30142,7 @@ class CaseEditSubmitComponent {
|
|
|
30035
30142
|
}
|
|
30036
30143
|
}
|
|
30037
30144
|
readOnlySummaryFieldsToDisplayExists() {
|
|
30038
|
-
return this.eventTrigger.case_fields.some(field => field.show_summary_content_option >= 0);
|
|
30145
|
+
return this.eventTrigger.case_fields.some((field) => field.show_summary_content_option >= 0);
|
|
30039
30146
|
}
|
|
30040
30147
|
showEventNotes() {
|
|
30041
30148
|
var _a;
|
|
@@ -30051,7 +30158,7 @@ class CaseEditSubmitComponent {
|
|
|
30051
30158
|
}
|
|
30052
30159
|
getLastPageShown() {
|
|
30053
30160
|
let lastPage;
|
|
30054
|
-
this.wizard.reverse().forEach(page => {
|
|
30161
|
+
this.wizard.reverse().forEach((page) => {
|
|
30055
30162
|
if (!lastPage && this.isShown(page)) {
|
|
30056
30163
|
lastPage = page;
|
|
30057
30164
|
}
|
|
@@ -30070,7 +30177,7 @@ class CaseEditSubmitComponent {
|
|
|
30070
30177
|
}
|
|
30071
30178
|
isShown(page) {
|
|
30072
30179
|
const fields = this.fieldsUtils
|
|
30073
|
-
.mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls
|
|
30180
|
+
.mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls.data.value);
|
|
30074
30181
|
return page.parsedShowCondition.match(fields);
|
|
30075
30182
|
}
|
|
30076
30183
|
canShowFieldInCYA(field) {
|
|
@@ -30079,7 +30186,7 @@ class CaseEditSubmitComponent {
|
|
|
30079
30186
|
sortFieldsByShowSummaryContent(fields) {
|
|
30080
30187
|
return this.orderService
|
|
30081
30188
|
.sort(fields, CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION)
|
|
30082
|
-
.filter(cf => cf.show_summary_content_option);
|
|
30189
|
+
.filter((cf) => cf.show_summary_content_option);
|
|
30083
30190
|
}
|
|
30084
30191
|
getCaseFields() {
|
|
30085
30192
|
if (this.caseEdit.caseDetails) {
|
|
@@ -30098,9 +30205,7 @@ class CaseEditSubmitComponent {
|
|
|
30098
30205
|
if (this.eventTrigger.can_save_draft) {
|
|
30099
30206
|
return 'Return to case list';
|
|
30100
30207
|
}
|
|
30101
|
-
|
|
30102
|
-
return 'Cancel';
|
|
30103
|
-
}
|
|
30208
|
+
return 'Cancel';
|
|
30104
30209
|
}
|
|
30105
30210
|
}
|
|
30106
30211
|
CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
|
|
@@ -30114,8 +30219,8 @@ CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
|
|
|
30114
30219
|
}
|
|
30115
30220
|
return a.show_summary_content_option - b.show_summary_content_option;
|
|
30116
30221
|
};
|
|
30117
|
-
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)); };
|
|
30118
|
-
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) {
|
|
30222
|
+
CaseEditSubmitComponent.ɵfac = function CaseEditSubmitComponent_Factory(t) { return new (t || CaseEditSubmitComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ProfileNotifier), i0.ɵɵdirectiveInject(FormValidatorsService)); };
|
|
30223
|
+
CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditSubmitComponent, selectors: [["ccd-case-edit-submit"]], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], [3, "error"], [3, "callbackErrorsSubject", "callbackErrorsContext"], [1, "check-your-answers", 3, "formGroup", "submit"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["class", "text-16", 4, "ngIf"], ["aria-describedby", "check your answers table", 1, "form-table"], [4, "ngFor", "ngForOf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "hidden", "formGroup", "contextFields"], ["class", "valign-top case-field-label", 4, "ngIf"], [1, "form-cell", "case-field-content"], [3, "formGroup", "topLevelFormGroup", "caseField", "context", "caseFields"], [1, "valign-top", "case-field-label"], [1, "valign-top", "check-your-answers__change", "case-field-change"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "summary fields table", 1, "summary-fields"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["class", "compound-field", "ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], ["id", "summary-field-label"], [1, "form-cell"], [3, "formGroup", "caseField"], ["ccdLabelSubstitutor", "", 1, "compound-field", 3, "caseField", "formGroup", "contextFields"], ["colspan", "2"], [3, "formGroup", "caseField", "caseFields"], ["id", "fieldset-event", "formGroupName", "event"], [2, "display", "none"], [1, "form-group", 3, "ngClass"], ["for", "field-trigger-summary", 1, "form-label"], [1, "form-hint"], ["class", "error-message", 4, "ngIf"], ["type", "text", "id", "field-trigger-summary", "formControlName", "summary", "maxlength", "1024", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], ["for", "field-trigger-description", 1, "form-label"], ["id", "field-trigger-description", "formControlName", "description", "maxlength", "65536", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], [1, "error-message"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditSubmitComponent_Template(rf, ctx) {
|
|
30119
30224
|
if (rf & 1) {
|
|
30120
30225
|
i0.ɵɵtemplate(0, CaseEditSubmitComponent_div_0_Template, 24, 22, "div", 0);
|
|
30121
30226
|
i0.ɵɵtemplate(1, CaseEditSubmitComponent_ccd_case_event_completion_1_Template, 1, 1, "ccd-case-event-completion", 1);
|
|
@@ -30129,8 +30234,8 @@ CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Cas
|
|
|
30129
30234
|
(function () {
|
|
30130
30235
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
|
|
30131
30236
|
type: Component,
|
|
30132
|
-
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
|
|
30133
|
-
}], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }]; }, null);
|
|
30237
|
+
args: [{ selector: 'ccd-case-edit-submit', template: "<div *ngIf=\"!caseEdit.isEventCompletionChecksRequired\">\n <!-- Event trigger name -->\n <h1 class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n\n <!--Case ID or Title -->\n <div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n <ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: contextFields : editForm.controls['data']\"></ccd-markdown>\n </ng-template>\n <ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n </ng-template>\n\n <ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\"></ccd-callback-errors>\n\n <form class=\"check-your-answers\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <ng-container *ngIf=\"checkYourAnswerFieldsToDisplayExists()\">\n\n <h2 class=\"heading-h2\">{{pageTitle | rpxTranslate }}</h2>\n <span class=\"text-16\" *ngIf=\"!caseEdit.isCaseFlagSubmission\">{{'Check the information below carefully.' | rpxTranslate}}</span>\n\n <table class=\"form-table\" aria-describedby=\"check your answers table\">\n <tbody>\n <ng-container *ngFor=\"let page of wizard.pages\">\n <ng-container *ngIf=\"isShown(page)\">\n <ng-container *ngFor=\"let field of page\n | ccdPageFields: editForm\n | ccdReadFieldsFilter: false :undefined :true :allFieldsValues\n | ccdCYAPageLabelFilter\">\n <ng-container *ngIf=\"canShowFieldInCYA(field)\">\n <tr ccdLabelSubstitutor [caseField]=\"field\" [hidden]=\"field.hidden\"\n [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th *ngIf=\"!isLabel(field) && !caseEdit.isCaseFlagSubmission\" class=\"valign-top case-field-label\">\n <span class=\"text-16\">{{field.label | rpxTranslate}}</span>\n </th>\n <td class=\"form-cell case-field-content\" [attr.colspan]=\"isLabel(field) ? '2' : '1'\">\n <ccd-field-read\n [formGroup]=\"editForm.controls['data']\" [topLevelFormGroup]=\"editForm.controls['data']\"\n [caseField]=\"summaryCaseField(field)\" [context]=\"paletteContext\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n <ng-container *ngIf=\"!caseEdit.isCaseFlagSubmission\">\n <td class=\"valign-top check-your-answers__change case-field-change\">\n <a *ngIf=\"isChangeAllowed(field)\" (click)=\"navigateToPage(page.id)\"\n href=\"javascript:void(0)\">\n <span class=\"text-16\" attr.aria-label=\"{{'Change' | rpxTranslate}} {{ field.label | rpxTranslate }}\">\n {{'Change' | rpxTranslate}}\n </span>\n </a>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"readOnlySummaryFieldsToDisplayExists()\">\n\n <table class=\"summary-fields\" aria-describedby=\"summary fields table\">\n <tbody>\n <ng-container *ngFor=\"let field of showSummaryFields\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th id=\"summary-field-label\">{{field.label}}</th>\n <td class=\"form-cell\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <td colspan=\"2\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"showEventNotes()\">\n <fieldset id=\"fieldset-event\" formGroupName=\"event\">\n <legend style=\"display: none;\"></legend>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!summary && !summary.valid && (summary.dirty || summary.touched)}\">\n <label for=\"field-trigger-summary\" class=\"form-label\">\n Event summary (optional)\n <span class=\"form-hint\">A few words describing the purpose of the event.</span>\n </label>\n <span class=\"error-message\" *ngIf=\"summary?.errors && (summary.dirty || summary.touched)\">\n {{summary.errors | ccdFirstError: eventSummaryLabel | rpxTranslate}}\n </span>\n <input type=\"text\" id=\"field-trigger-summary\" class=\"form-control bottom-30 width-50\"\n [ngClass]=\"{'govuk-input--error': summary?.errors && (summary.dirty || summary.touched)}\" formControlName=\"summary\" maxlength=\"1024\">\n </div>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!description && !description.valid && (description.dirty || description.touched)}\">\n <label for=\"field-trigger-description\" class=\"form-label\">Event description (optional)</label>\n <span class=\"error-message\" *ngIf=\"description?.errors && (description.dirty || description.touched)\">\n {{description.errors | ccdFirstError: eventDescriptionLabel | rpxTranslate}}\n </span>\n <textarea id=\"field-trigger-description\" class=\"form-control bottom-30 width-50\" formControlName=\"description\"\n [ngClass]=\"{'govuk-input--error': description?.errors && (description.dirty || description.touched)}\" maxlength=\"65536\"></textarea>\n </div>\n </fieldset>\n </ng-container>\n <div class=\"form-group form-group-related\">\n <button *ngIf=\"!caseEdit.isCaseFlagSubmission\" class=\"button button-secondary\" type=\"button\" [disabled]=\"!hasPrevious() || caseEdit.isSubmitting\" (click)=\"previous()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button type=\"submit\" [disabled]=\"isDisabled\" class=\"button\">\n {{triggerText | rpxTranslate}}\n </button>\n </div>\n <p class=\"cancel\">\n <a (click)=\"cancel()\" href=\"javascript:void(0)\" [class.disabled]=\"caseEdit.isSubmitting\">{{getCancelText() | rpxTranslate}}</a>\n </p>\n </form>\n</div>\n<ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n</ccd-case-event-completion>\n", styles: ["#fieldset-case-data{margin-bottom:30px}#fieldset-case-data th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}#confirmation-header{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body{width:630px;background-color:#fff}.valign-top{vertical-align:top}.summary-fields{margin-bottom:30px}.summary-fields tbody tr th,.summary-fields tbody tr td{border-bottom:0px}a.disabled{pointer-events:none;cursor:default}.case-field-label{width:45%}.case-field-content{width:50%}.no-bottom-border{border-bottom:none}.case-field-change{width:5%}\n"] }]
|
|
30238
|
+
}], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: FormValidatorsService }]; }, null);
|
|
30134
30239
|
})();
|
|
30135
30240
|
|
|
30136
30241
|
function CaseProgressComponent_div_0_Template(rf, ctx) {
|
|
@@ -30528,7 +30633,7 @@ i0.ɵɵsetComponentScope(CaseEditPageComponent, function () {
|
|
|
30528
30633
|
CaseEditGenericErrorsComponent];
|
|
30529
30634
|
}, function () { return [i4.AsyncPipe, CaseReferencePipe, CcdCaseTitlePipe, i1.RpxTranslatePipe]; });
|
|
30530
30635
|
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]; });
|
|
30531
|
-
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]; });
|
|
30636
|
+
i0.ɵɵsetComponentScope(CaseEditSubmitComponent, function () { return [i4.NgClass, i4.NgForOf, i4.NgIf, i4.NgSwitch, i4.NgSwitchCase, i3.ɵNgNoValidate, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.MaxLengthValidator, i3.FormGroupDirective, i3.FormControlName, i3.FormGroupName, LabelSubstitutorDirective, CallbackErrorsComponent, MarkdownComponent, FieldReadComponent, CaseEventCompletionComponent, CaseEditGenericErrorsComponent]; }, function () { return [FirstErrorPipe, IsCompoundPipe, CaseReferencePipe, CcdCaseTitlePipe, CcdCYAPageLabelFilterPipe, ReadFieldsFilterPipe, CcdPageFieldsPipe, i1.RpxTranslatePipe]; });
|
|
30532
30637
|
i0.ɵɵsetComponentScope(CaseCreateComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
|
|
30533
30638
|
i0.ɵɵsetComponentScope(CaseProgressComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
|
|
30534
30639
|
|