@hmcts/ccd-case-ui-toolkit 7.0.14 → 7.0.15-caseview-folder-pop-up
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-page/case-edit-page.component.mjs +6 -15
- package/esm2020/lib/shared/components/palette/address/write-address-field.component.mjs +20 -57
- package/esm2020/lib/shared/components/palette/base-field/abstract-form-field.component.mjs +1 -5
- package/esm2020/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.mjs +2 -2
- package/esm2020/lib/shared/components/palette/document/write-document-field.component.mjs +2 -2
- package/esm2020/lib/shared/domain/http/http-error.model.mjs +2 -8
- package/esm2020/lib/shared/services/addresses/addresses.service.mjs +1 -9
- package/esm2020/lib/shared/services/organisation/organisation.service.mjs +3 -6
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +28 -110
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +28 -104
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +2 -3
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/lib/shared/components/palette/address/write-address-field.component.d.ts +0 -5
- 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/domain/http/http-error.model.d.ts +0 -1
- package/lib/shared/domain/http/http-error.model.d.ts.map +1 -1
- package/lib/shared/services/addresses/addresses.service.d.ts +0 -3
- package/lib/shared/services/addresses/addresses.service.d.ts.map +1 -1
- package/lib/shared/services/organisation/organisation.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/esm2020/lib/shared/commons/address-validation-constants.mjs +0 -13
- package/lib/shared/commons/address-validation-constants.d.ts +0 -7
- package/lib/shared/commons/address-validation-constants.d.ts.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Injectable } from '@angular/core';
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
2
|
import { map } from 'rxjs/operators';
|
|
4
3
|
import { AbstractAppConfig } from '../../../app.config';
|
|
5
4
|
import { HttpService } from '../http';
|
|
@@ -12,7 +11,6 @@ export class AddressesService {
|
|
|
12
11
|
constructor(http, appConfig) {
|
|
13
12
|
this.http = http;
|
|
14
13
|
this.appConfig = appConfig;
|
|
15
|
-
this.mandatoryError = new BehaviorSubject(false);
|
|
16
14
|
}
|
|
17
15
|
getAddressesForPostcode(postcode) {
|
|
18
16
|
return this.http
|
|
@@ -21,12 +19,6 @@ export class AddressesService {
|
|
|
21
19
|
.pipe(map(res => res.results))
|
|
22
20
|
.pipe(map(output => output.map(addresses => this.format(new AddressParser().parse(addresses[AddressType.DPA])))));
|
|
23
21
|
}
|
|
24
|
-
getMandatoryError() {
|
|
25
|
-
return this.mandatoryError.asObservable();
|
|
26
|
-
}
|
|
27
|
-
setMandatoryError(value) {
|
|
28
|
-
this.mandatoryError.next(value);
|
|
29
|
-
}
|
|
30
22
|
format(addressModel) {
|
|
31
23
|
return this.formatAddressLines(this.shiftAddressLinesUp(addressModel));
|
|
32
24
|
}
|
|
@@ -60,4 +52,4 @@ AddressesService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: Address
|
|
|
60
52
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressesService, [{
|
|
61
53
|
type: Injectable
|
|
62
54
|
}], function () { return [{ type: i1.HttpService }, { type: i2.AbstractAppConfig }]; }, null); })();
|
|
63
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
55
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkcmVzc2VzLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIi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mFsdWUuY2hhckF0KDApLnRvVXBwZXJDYXNlKCkgKyB2YWx1ZS5zdWJzdHIoMSkpO1xuICAgICAgfVxuICAgICk7XG4gICAgcmV0dXJuIHNlbnRlbmNlO1xuICB9XG59XG4iXX0=
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Injectable } from '@angular/core';
|
|
3
|
-
import { of
|
|
3
|
+
import { of } from 'rxjs';
|
|
4
4
|
import { catchError, map, publishReplay, refCount, take } from 'rxjs/operators';
|
|
5
5
|
import { AbstractAppConfig } from '../../../app.config';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -37,14 +37,11 @@ export class OrganisationService {
|
|
|
37
37
|
const url = this.appconfig.getPrdUrl();
|
|
38
38
|
const cacheTimeOut = this.appconfig.getCacheTimeOut();
|
|
39
39
|
this.organisations$ = this.http.get(url)
|
|
40
|
-
.pipe(map((orgs) => OrganisationService.mapOrganisation(orgs)), publishReplay(1), refCount(), take(1), catchError(e => {
|
|
40
|
+
.pipe(map((orgs) => OrganisationService.mapOrganisation(orgs)), publishReplay(1, cacheTimeOut), refCount(), take(1), catchError(e => {
|
|
41
41
|
console.log(e);
|
|
42
42
|
// Handle error and return blank Observable array
|
|
43
43
|
return of([]);
|
|
44
44
|
}));
|
|
45
|
-
timer(cacheTimeOut).subscribe(() => {
|
|
46
|
-
this.organisations$ = null;
|
|
47
|
-
});
|
|
48
45
|
}
|
|
49
46
|
return this.organisations$;
|
|
50
47
|
}
|
|
@@ -54,4 +51,4 @@ OrganisationService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: Orga
|
|
|
54
51
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OrganisationService, [{
|
|
55
52
|
type: Injectable
|
|
56
53
|
}], function () { return [{ type: i1.HttpClient }, { type: i2.AbstractAppConfig }]; }, null); })();
|
|
57
|
-
//# sourceMappingURL=data:application/json;base64,
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IGxldCBjb250YWN0SW5mb3JtYXRpb24gPSBudWxsO1xuICAgICAgICAgICAgaWYgKG9yZy5jb250YWN0SW5mb3JtYXRpb24gJiYgIG9yZy5jb250YWN0SW5mb3JtYXRpb25bMF0pIHtcbiAgICAgICAgICAgICAgICBjb250YWN0SW5mb3JtYXRpb24gPSBvcmcuY29udGFjdEluZm9ybWF0aW9uWzBdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgb3JnYW5pc2F0aW9uc1ZtLnB1c2goe1xuICAgICAgICAgICAgICAgIG9yZ2FuaXNhdGlvbklkZW50aWZpZXI6IG9yZy5vcmdhbmlzYXRpb25JZGVudGlmaWVyLFxuICAgICAgICAgICAgICAgIG5hbWU6IG9yZy5uYW1lLFxuICAgICAgICAgICAgICAgIGFkZHJlc3NMaW5lMTogY29udGFjdEluZm9ybWF0aW9uICE9PSBudWxsID8gY29udGFjdEluZm9ybWF0aW9uLmFkZHJlc3NMaW5lMSA6IG51bGwsXG4gICAgICAgICAgICAgICAgYWRkcmVzc0xpbmUyOiBjb250YWN0SW5mb3JtYXRpb24gIT09IG51bGwgPyBjb250YWN0SW5mb3JtYXRpb24uYWRkcmVzc0xpbmUyIDogbnVsbCxcbiAgICAgICAgICAgICAgICBhZGRyZXNzTGluZTM6IGNvbnRhY3RJbmZvcm1hdGlvbiAhPT0gbnVsbCA/IGNvbnRhY3RJbmZvcm1hdGlvbi5hZGRyZXNzTGluZTMgOiBudWxsLFxuICAgICAgICAgICAgICAgIHRvd25DaXR5OiBjb250YWN0SW5mb3JtYXRpb24gIT09IG51bGwgPyBjb250YWN0SW5mb3JtYXRpb24udG93bkNpdHkgOiBudWxsLFxuICAgICAgICAgICAgICAgIGNvdW50eTogY29udGFjdEluZm9ybWF0aW9uICE9PSBudWxsID8gY29udGFjdEluZm9ybWF0aW9uLmNvdW50eSA6IG51bGwsXG4gICAgICAgICAgICAgICAgY291bnRyeTogY29udGFjdEluZm9ybWF0aW9uICE9PSBudWxsID8gY29udGFjdEluZm9ybWF0aW9uLmNvdW50cnkgOiBudWxsLFxuICAgICAgICAgICAgICAgIHBvc3RDb2RlOiBjb250YWN0SW5mb3JtYXRpb24gIT09IG51bGwgPyBjb250YWN0SW5mb3JtYXRpb24ucG9zdENvZGUgOiBudWxsLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gb3JnYW5pc2F0aW9uc1ZtO1xuICAgIH1cblxuICAgIHB1YmxpYyBnZXRBY3RpdmVPcmdhbmlzYXRpb25zKCk6IE9ic2VydmFibGU8T3JnYW5pc2F0aW9uVm1bXT4ge1xuICAgICAgICBpZiAoIXRoaXMub3JnYW5pc2F0aW9ucyQpIHtcbiAgICAgICAgICAgIGNvbnN0IHVybCA9IHRoaXMuYXBwY29uZmlnLmdldFByZFVybCgpO1xuICAgICAgICAgICAgY29uc3QgY2FjaGVUaW1lT3V0ID0gdGhpcy5hcHBjb25maWcuZ2V0Q2FjaGVUaW1lT3V0KCk7XG4gICAgICAgICAgICB0aGlzLm9yZ2FuaXNhdGlvbnMkID0gdGhpcy5odHRwLmdldDxPcmdhbmlzYXRpb25bXT4odXJsKVxuICAgICAgICAgICAgLnBpcGUobWFwKChvcmdzKSA9PiBPcmdhbmlzYXRpb25TZXJ2aWNlLm1hcE9yZ2FuaXNhdGlvbihvcmdzKSksXG4gICAgICAgICAgICBwdWJsaXNoUmVwbGF5KDEsIGNhY2hlVGltZU91dCksIHJlZkNvdW50KCksIHRha2UoMSksIGNhdGNoRXJyb3IoZSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coZSk7XG4gICAgICAgICAgICAgICAgLy8gSGFuZGxlIGVycm9yIGFuZCByZXR1cm4gYmxhbmsgT2JzZXJ2YWJsZSBhcnJheVxuICAgICAgICAgICAgICAgIHJldHVybiBvZihbXSk7XG4gICAgICAgICAgICB9KSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRoaXMub3JnYW5pc2F0aW9ucyQ7XG4gICAgfVxufVxuIl19
|
|
@@ -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,
|
|
11
|
+
import { throwError, Subject, EMPTY, Observable, of, BehaviorSubject, 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';
|
|
@@ -1333,14 +1333,9 @@ class HttpError {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
static from(response) {
|
|
1335
1335
|
const error = new HttpError();
|
|
1336
|
-
if ((response === null || response === void 0 ? void 0 : response.status) === 429) {
|
|
1337
|
-
error.error = HttpError.MESSAGE_ERROR_429;
|
|
1338
|
-
error.status = response.status;
|
|
1339
|
-
error.message = response.message;
|
|
1340
|
-
}
|
|
1341
1336
|
// Check that the HttpErrorResponse contains an "error" object before mapping the error properties
|
|
1342
1337
|
if (!!(response && response.error)) {
|
|
1343
|
-
Object.keys(error).forEach(
|
|
1338
|
+
Object.keys(error).forEach(key => {
|
|
1344
1339
|
error[key] = response.error.hasOwnProperty(key) && response.error[key] ? response.error[key] : error[key];
|
|
1345
1340
|
});
|
|
1346
1341
|
}
|
|
@@ -1357,7 +1352,6 @@ class HttpError {
|
|
|
1357
1352
|
HttpError.DEFAULT_ERROR = 'Unknown error';
|
|
1358
1353
|
HttpError.DEFAULT_MESSAGE = 'Something unexpected happened, our technical staff have been automatically notified';
|
|
1359
1354
|
HttpError.DEFAULT_STATUS = 500;
|
|
1360
|
-
HttpError.MESSAGE_ERROR_429 = 'Your request was rate limited. Please wait a few seconds before retrying your document upload';
|
|
1361
1355
|
|
|
1362
1356
|
class AbstractAppConfig {
|
|
1363
1357
|
/**
|
|
@@ -4606,17 +4600,12 @@ class AbstractFormFieldComponent {
|
|
|
4606
4600
|
return this.idPrefix + this.caseField.id;
|
|
4607
4601
|
}
|
|
4608
4602
|
registerControl(control, replace = false) {
|
|
4609
|
-
var _a;
|
|
4610
4603
|
const container = this.parent || this.formGroup;
|
|
4611
4604
|
if (!container) {
|
|
4612
4605
|
return control;
|
|
4613
4606
|
}
|
|
4614
4607
|
const existing = container.controls[this.caseField.id];
|
|
4615
|
-
// update the field value which has been set in mid-event call back
|
|
4616
4608
|
if (existing) {
|
|
4617
|
-
if (existing.value === null && ((_a = this.caseField) === null || _a === void 0 ? void 0 : _a.value)) {
|
|
4618
|
-
existing.value = this.caseField.value;
|
|
4619
|
-
}
|
|
4620
4609
|
if (replace) {
|
|
4621
4610
|
// Set the validators on the replacement with what already exists.
|
|
4622
4611
|
control.setValidators(existing.validator);
|
|
@@ -6287,7 +6276,6 @@ class AddressesService {
|
|
|
6287
6276
|
constructor(http, appConfig) {
|
|
6288
6277
|
this.http = http;
|
|
6289
6278
|
this.appConfig = appConfig;
|
|
6290
|
-
this.mandatoryError = new BehaviorSubject(false);
|
|
6291
6279
|
}
|
|
6292
6280
|
getAddressesForPostcode(postcode) {
|
|
6293
6281
|
return this.http
|
|
@@ -6296,12 +6284,6 @@ class AddressesService {
|
|
|
6296
6284
|
.pipe(map(res => res.results))
|
|
6297
6285
|
.pipe(map(output => output.map(addresses => this.format(new AddressParser().parse(addresses[AddressType.DPA])))));
|
|
6298
6286
|
}
|
|
6299
|
-
getMandatoryError() {
|
|
6300
|
-
return this.mandatoryError.asObservable();
|
|
6301
|
-
}
|
|
6302
|
-
setMandatoryError(value) {
|
|
6303
|
-
this.mandatoryError.next(value);
|
|
6304
|
-
}
|
|
6305
6287
|
format(addressModel) {
|
|
6306
6288
|
return this.formatAddressLines(this.shiftAddressLinesUp(addressModel));
|
|
6307
6289
|
}
|
|
@@ -7555,14 +7537,11 @@ class OrganisationService {
|
|
|
7555
7537
|
const url = this.appconfig.getPrdUrl();
|
|
7556
7538
|
const cacheTimeOut = this.appconfig.getCacheTimeOut();
|
|
7557
7539
|
this.organisations$ = this.http.get(url)
|
|
7558
|
-
.pipe(map((orgs) => OrganisationService.mapOrganisation(orgs)), publishReplay(1), refCount(), take(1), catchError(e => {
|
|
7540
|
+
.pipe(map((orgs) => OrganisationService.mapOrganisation(orgs)), publishReplay(1, cacheTimeOut), refCount(), take(1), catchError(e => {
|
|
7559
7541
|
console.log(e);
|
|
7560
7542
|
// Handle error and return blank Observable array
|
|
7561
7543
|
return of([]);
|
|
7562
7544
|
}));
|
|
7563
|
-
timer(cacheTimeOut).subscribe(() => {
|
|
7564
|
-
this.organisations$ = null;
|
|
7565
|
-
});
|
|
7566
7545
|
}
|
|
7567
7546
|
return this.organisations$;
|
|
7568
7547
|
}
|
|
@@ -10024,7 +10003,7 @@ function CaseEditPageComponent_ccd_case_event_completion_11_Template(rf, ctx) {
|
|
|
10024
10003
|
}
|
|
10025
10004
|
}
|
|
10026
10005
|
class CaseEditPageComponent {
|
|
10027
|
-
constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService
|
|
10006
|
+
constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService) {
|
|
10028
10007
|
this.caseEdit = caseEdit;
|
|
10029
10008
|
this.route = route;
|
|
10030
10009
|
this.formValueService = formValueService;
|
|
@@ -10036,7 +10015,6 @@ class CaseEditPageComponent {
|
|
|
10036
10015
|
this.caseEditDataService = caseEditDataService;
|
|
10037
10016
|
this.loadingService = loadingService;
|
|
10038
10017
|
this.validPageListCaseFieldsService = validPageListCaseFieldsService;
|
|
10039
|
-
this.addressService = addressService;
|
|
10040
10018
|
this.triggerTextStart = CaseEditPageComponent.TRIGGER_TEXT_START;
|
|
10041
10019
|
this.triggerTextIgnoreWarnings = CaseEditPageComponent.TRIGGER_TEXT_CONTINUE;
|
|
10042
10020
|
this.formValuesChanged = false;
|
|
@@ -10161,14 +10139,7 @@ class CaseEditPageComponent {
|
|
|
10161
10139
|
}
|
|
10162
10140
|
}
|
|
10163
10141
|
if (fieldElement.hasError('required')) {
|
|
10164
|
-
|
|
10165
|
-
// EUI-1067 - Display more relevant error message to user and correctly navigate to the field
|
|
10166
|
-
this.addressService.setMandatoryError(true);
|
|
10167
|
-
this.caseEditDataService.addFormValidationError({ id: `${path}_${path}`, message: `An address is required` });
|
|
10168
|
-
}
|
|
10169
|
-
else {
|
|
10170
|
-
this.caseEditDataService.addFormValidationError({ id, message: `%FIELDLABEL% is required`, label });
|
|
10171
|
-
}
|
|
10142
|
+
this.caseEditDataService.addFormValidationError({ id, message: `%FIELDLABEL% is required`, label });
|
|
10172
10143
|
fieldElement.markAsDirty();
|
|
10173
10144
|
// For the JudicialUser field type, an error needs to be set on the component so that an error message
|
|
10174
10145
|
// can be displayed at field level
|
|
@@ -10243,7 +10214,6 @@ class CaseEditPageComponent {
|
|
|
10243
10214
|
}
|
|
10244
10215
|
}
|
|
10245
10216
|
if (!this.caseEdit.isSubmitting && !this.currentPageIsNotValid()) {
|
|
10246
|
-
this.addressService.setMandatoryError(false);
|
|
10247
10217
|
console.log('Case Edit Error', this.caseEdit.error);
|
|
10248
10218
|
if (this.caseEdit.validPageList.findIndex(page => page.id === this.currentPage.id) === -1) {
|
|
10249
10219
|
this.caseEdit.validPageList.push(this.currentPage);
|
|
@@ -10539,7 +10509,7 @@ CaseEditPageComponent.RESUMED_FORM_SAVE = 'RESUMED_FORM_SAVE';
|
|
|
10539
10509
|
CaseEditPageComponent.TRIGGER_TEXT_START = 'Continue';
|
|
10540
10510
|
CaseEditPageComponent.TRIGGER_TEXT_SAVE = 'Save and continue';
|
|
10541
10511
|
CaseEditPageComponent.TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
|
|
10542
|
-
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)
|
|
10512
|
+
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)); };
|
|
10543
10513
|
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) {
|
|
10544
10514
|
if (rf & 1) {
|
|
10545
10515
|
i0.ɵɵtemplate(0, CaseEditPageComponent_ng_container_0_Template, 3, 2, "ng-container", 0);
|
|
@@ -10578,7 +10548,7 @@ CaseEditPageComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseE
|
|
|
10578
10548
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditPageComponent, [{
|
|
10579
10549
|
type: Component,
|
|
10580
10550
|
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"] }]
|
|
10581
|
-
}], 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 }
|
|
10551
|
+
}], 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);
|
|
10582
10552
|
})();
|
|
10583
10553
|
|
|
10584
10554
|
class CallbackErrorsContext {
|
|
@@ -11070,19 +11040,6 @@ class AddressOption {
|
|
|
11070
11040
|
}
|
|
11071
11041
|
}
|
|
11072
11042
|
|
|
11073
|
-
class AddressValidationConstants {
|
|
11074
|
-
}
|
|
11075
|
-
// allow alpha-numeric characters and spaces possibly between a connecting - character
|
|
11076
|
-
// this applies validation while allowing partial postcodes
|
|
11077
|
-
AddressValidationConstants.REGEX_POSTCODE = /^([A-Za-z0-9]-*| )+$/;
|
|
11078
|
-
AddressValidationConstants.ɵfac = function AddressValidationConstants_Factory(t) { return new (t || AddressValidationConstants)(); };
|
|
11079
|
-
AddressValidationConstants.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AddressValidationConstants, factory: AddressValidationConstants.ɵfac });
|
|
11080
|
-
(function () {
|
|
11081
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressValidationConstants, [{
|
|
11082
|
-
type: Injectable
|
|
11083
|
-
}], null, null);
|
|
11084
|
-
})();
|
|
11085
|
-
|
|
11086
11043
|
const _c0$U = ["writeComplexFieldComponent"];
|
|
11087
11044
|
function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) {
|
|
11088
11045
|
if (rf & 1) {
|
|
@@ -11092,9 +11049,8 @@ function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) {
|
|
|
11092
11049
|
i0.ɵɵelementEnd();
|
|
11093
11050
|
}
|
|
11094
11051
|
if (rf & 2) {
|
|
11095
|
-
const ctx_r5 = i0.ɵɵnextContext(3);
|
|
11096
11052
|
i0.ɵɵadvance(1);
|
|
11097
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1,
|
|
11053
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Enter the Postcode"));
|
|
11098
11054
|
}
|
|
11099
11055
|
}
|
|
11100
11056
|
const _c1$n = function (a0) { return { "form-group-error": a0 }; };
|
|
@@ -11129,20 +11085,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) {
|
|
|
11129
11085
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 11, "Find address"));
|
|
11130
11086
|
}
|
|
11131
11087
|
}
|
|
11132
|
-
function
|
|
11133
|
-
if (rf & 1) {
|
|
11134
|
-
i0.ɵɵelementStart(0, "span", 14);
|
|
11135
|
-
i0.ɵɵtext(1);
|
|
11136
|
-
i0.ɵɵpipe(2, "rpxTranslate");
|
|
11137
|
-
i0.ɵɵelementEnd();
|
|
11138
|
-
}
|
|
11139
|
-
if (rf & 2) {
|
|
11140
|
-
const ctx_r8 = i0.ɵɵnextContext(3);
|
|
11141
|
-
i0.ɵɵadvance(1);
|
|
11142
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r8.errorMessage));
|
|
11143
|
-
}
|
|
11144
|
-
}
|
|
11145
|
-
function WriteAddressFieldComponent_div_1_div_5_option_7_Template(rf, ctx) {
|
|
11088
|
+
function WriteAddressFieldComponent_div_1_div_5_option_6_Template(rf, ctx) {
|
|
11146
11089
|
if (rf & 1) {
|
|
11147
11090
|
i0.ɵɵelementStart(0, "option", 18);
|
|
11148
11091
|
i0.ɵɵtext(1);
|
|
@@ -11150,35 +11093,31 @@ function WriteAddressFieldComponent_div_1_div_5_option_7_Template(rf, ctx) {
|
|
|
11150
11093
|
i0.ɵɵelementEnd();
|
|
11151
11094
|
}
|
|
11152
11095
|
if (rf & 2) {
|
|
11153
|
-
const
|
|
11154
|
-
i0.ɵɵproperty("ngValue",
|
|
11096
|
+
const addressOption_r9 = ctx.$implicit;
|
|
11097
|
+
i0.ɵɵproperty("ngValue", addressOption_r9.value);
|
|
11155
11098
|
i0.ɵɵadvance(1);
|
|
11156
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2,
|
|
11099
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, addressOption_r9.description), " ");
|
|
11157
11100
|
}
|
|
11158
11101
|
}
|
|
11159
11102
|
function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) {
|
|
11160
11103
|
if (rf & 1) {
|
|
11161
|
-
const
|
|
11104
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
11162
11105
|
i0.ɵɵelementStart(0, "div", 15)(1, "label", 9)(2, "span", 10);
|
|
11163
11106
|
i0.ɵɵtext(3);
|
|
11164
11107
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
11165
11108
|
i0.ɵɵelementEnd()();
|
|
11166
|
-
i0.ɵɵ
|
|
11167
|
-
i0.ɵɵ
|
|
11168
|
-
i0.ɵɵ
|
|
11169
|
-
i0.ɵɵtemplate(7, WriteAddressFieldComponent_div_1_div_5_option_7_Template, 3, 4, "option", 17);
|
|
11109
|
+
i0.ɵɵelementStart(5, "select", 16);
|
|
11110
|
+
i0.ɵɵlistener("change", function WriteAddressFieldComponent_div_1_div_5_Template_select_change_5_listener() { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r10.addressSelected()); });
|
|
11111
|
+
i0.ɵɵtemplate(6, WriteAddressFieldComponent_div_1_div_5_option_6_Template, 3, 4, "option", 17);
|
|
11170
11112
|
i0.ɵɵelementEnd()();
|
|
11171
11113
|
}
|
|
11172
11114
|
if (rf & 2) {
|
|
11173
11115
|
const ctx_r3 = i0.ɵɵnextContext(2);
|
|
11174
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$n, ctx_r3.noAddressSelected));
|
|
11175
11116
|
i0.ɵɵadvance(1);
|
|
11176
11117
|
i0.ɵɵproperty("for", ctx_r3.createElementId("addressList"));
|
|
11177
11118
|
i0.ɵɵadvance(2);
|
|
11178
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4,
|
|
11119
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 5, "Select an address"));
|
|
11179
11120
|
i0.ɵɵadvance(2);
|
|
11180
|
-
i0.ɵɵproperty("ngIf", ctx_r3.noAddressSelected);
|
|
11181
|
-
i0.ɵɵadvance(1);
|
|
11182
11121
|
i0.ɵɵproperty("id", ctx_r3.createElementId("addressList"))("formControl", ctx_r3.addressList);
|
|
11183
11122
|
i0.ɵɵadvance(1);
|
|
11184
11123
|
i0.ɵɵproperty("ngForOf", ctx_r3.addressOptions);
|
|
@@ -11186,9 +11125,9 @@ function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) {
|
|
|
11186
11125
|
}
|
|
11187
11126
|
function WriteAddressFieldComponent_div_1_a_6_Template(rf, ctx) {
|
|
11188
11127
|
if (rf & 1) {
|
|
11189
|
-
const
|
|
11128
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
11190
11129
|
i0.ɵɵelementStart(0, "a", 19);
|
|
11191
|
-
i0.ɵɵlistener("click", function WriteAddressFieldComponent_div_1_a_6_Template_a_click_0_listener() { i0.ɵɵrestoreView(
|
|
11130
|
+
i0.ɵɵlistener("click", function WriteAddressFieldComponent_div_1_a_6_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r12 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r12.blankAddress()); });
|
|
11192
11131
|
i0.ɵɵtext(1);
|
|
11193
11132
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
11194
11133
|
i0.ɵɵelementEnd();
|
|
@@ -11205,7 +11144,7 @@ function WriteAddressFieldComponent_div_1_Template(rf, ctx) {
|
|
|
11205
11144
|
i0.ɵɵpipe(3, "ccdFieldLabel");
|
|
11206
11145
|
i0.ɵɵelementEnd();
|
|
11207
11146
|
i0.ɵɵtemplate(4, WriteAddressFieldComponent_div_1_div_4_Template, 10, 17, "div", 5);
|
|
11208
|
-
i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_Template,
|
|
11147
|
+
i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_Template, 7, 7, "div", 6);
|
|
11209
11148
|
i0.ɵɵtemplate(6, WriteAddressFieldComponent_div_1_a_6_Template, 3, 3, "a", 7);
|
|
11210
11149
|
i0.ɵɵelementEnd();
|
|
11211
11150
|
}
|
|
@@ -11226,30 +11165,19 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
11226
11165
|
super();
|
|
11227
11166
|
this.isCompoundPipe = isCompoundPipe;
|
|
11228
11167
|
this.addressFormGroup = new FormGroup({});
|
|
11229
|
-
this.errorMessage = WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE;
|
|
11230
11168
|
this.missingPostcode = false;
|
|
11231
|
-
this.noAddressSelected = false;
|
|
11232
11169
|
this.addressesService = addressesService;
|
|
11233
11170
|
}
|
|
11234
11171
|
ngOnInit() {
|
|
11235
11172
|
if (!this.isComplexWithHiddenFields()) {
|
|
11236
|
-
this.postcode = new FormControl(''
|
|
11237
|
-
this.
|
|
11173
|
+
this.postcode = new FormControl('');
|
|
11174
|
+
this.addressFormGroup.addControl('postcode', this.postcode);
|
|
11238
11175
|
this.addressList = new FormControl('');
|
|
11239
|
-
this.
|
|
11176
|
+
this.addressFormGroup.addControl('address', this.addressList);
|
|
11240
11177
|
}
|
|
11241
|
-
this.addressesService.getMandatoryError().subscribe((value) => {
|
|
11242
|
-
this.updateErrorsOnContinue(value);
|
|
11243
|
-
});
|
|
11244
11178
|
}
|
|
11245
11179
|
findAddress() {
|
|
11246
|
-
this.noAddressSelected = false;
|
|
11247
11180
|
if (!this.postcode.value) {
|
|
11248
|
-
this.errorMessage = WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE;
|
|
11249
|
-
this.missingPostcode = true;
|
|
11250
|
-
}
|
|
11251
|
-
else if (!this.postcode.value.trim().match(AddressValidationConstants.REGEX_POSTCODE)) {
|
|
11252
|
-
this.errorMessage = WriteAddressFieldComponent.INVALID_ERROR_MESSAGE;
|
|
11253
11181
|
this.missingPostcode = true;
|
|
11254
11182
|
}
|
|
11255
11183
|
else {
|
|
@@ -11278,8 +11206,6 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
11278
11206
|
blankAddress() {
|
|
11279
11207
|
this.caseField.value = new AddressModel();
|
|
11280
11208
|
this.setFormValue();
|
|
11281
|
-
this.missingPostcode = false;
|
|
11282
|
-
this.noAddressSelected = false;
|
|
11283
11209
|
}
|
|
11284
11210
|
isComplexWithHiddenFields() {
|
|
11285
11211
|
if (this.caseField.isComplex() && this.caseField.field_type.complex_fields
|
|
@@ -11311,7 +11237,6 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
11311
11237
|
addressSelected() {
|
|
11312
11238
|
this.caseField.value = this.addressList.value;
|
|
11313
11239
|
this.setFormValue();
|
|
11314
|
-
this.noAddressSelected = false;
|
|
11315
11240
|
}
|
|
11316
11241
|
ngOnChanges(changes) {
|
|
11317
11242
|
super.ngOnChanges(changes);
|
|
@@ -11332,14 +11257,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
11332
11257
|
this.writeComplexFieldComponent.complexGroup.setValue(this.caseField.value);
|
|
11333
11258
|
}
|
|
11334
11259
|
}
|
|
11335
|
-
updateErrorsOnContinue(value) {
|
|
11336
|
-
this.missingPostcode = value && !this.shouldShowDetailFields() && !this.addressOptions;
|
|
11337
|
-
this.noAddressSelected = value && !this.shouldShowDetailFields() && !!this.addressOptions;
|
|
11338
|
-
this.errorMessage = this.noAddressSelected ? 'Select an address' : this.errorMessage;
|
|
11339
|
-
}
|
|
11340
11260
|
}
|
|
11341
|
-
WriteAddressFieldComponent.REQUIRED_ERROR_MESSAGE = 'Enter a Postcode';
|
|
11342
|
-
WriteAddressFieldComponent.INVALID_ERROR_MESSAGE = 'Enter a valid Postcode';
|
|
11343
11261
|
WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0.ɵɵdirectiveInject(AddressesService), i0.ɵɵdirectiveInject(IsCompoundPipe)); };
|
|
11344
11262
|
WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) {
|
|
11345
11263
|
if (rf & 1) {
|
|
@@ -11351,7 +11269,7 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
11351
11269
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
|
|
11352
11270
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusElementDirectives = _t);
|
|
11353
11271
|
}
|
|
11354
|
-
}, 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",
|
|
11272
|
+
}, 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) {
|
|
11355
11273
|
if (rf & 1) {
|
|
11356
11274
|
i0.ɵɵelementStart(0, "div", 0);
|
|
11357
11275
|
i0.ɵɵtemplate(1, WriteAddressFieldComponent_div_1_Template, 7, 6, "div", 1);
|
|
@@ -11369,7 +11287,7 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
11369
11287
|
(function () {
|
|
11370
11288
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteAddressFieldComponent, [{
|
|
11371
11289
|
type: Component,
|
|
11372
|
-
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\">{{
|
|
11290
|
+
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\">{{'Enter the Postcode' | 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\">\n <label [for]=\"createElementId('addressList')\">\n <span class=\"form-label\">{{'Select an address' | rpxTranslate}}</span>\n </label>\n\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"] }]
|
|
11373
11291
|
}], function () { return [{ type: AddressesService }, { type: IsCompoundPipe }]; }, { writeComplexFieldComponent: [{
|
|
11374
11292
|
type: ViewChild,
|
|
11375
11293
|
args: ['writeComplexFieldComponent', { static: false }]
|
|
@@ -14189,7 +14107,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14189
14107
|
this.caseNotifierSubscription = this.caseNotifier.caseView.subscribe({
|
|
14190
14108
|
next: (caseDetails) => {
|
|
14191
14109
|
var _a, _b;
|
|
14192
|
-
this.caseTypeId = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.
|
|
14110
|
+
this.caseTypeId = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.case_type.id;
|
|
14193
14111
|
this.jurisdictionId = (_b = (_a = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.case_type) === null || _a === void 0 ? void 0 : _a.jurisdiction) === null || _b === void 0 ? void 0 : _b.id;
|
|
14194
14112
|
}
|
|
14195
14113
|
});
|
|
@@ -22571,11 +22489,11 @@ CaseFileViewFolderSelectorComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent
|
|
|
22571
22489
|
i0.ɵɵadvance(2);
|
|
22572
22490
|
i0.ɵɵproperty("ngForOf", ctx.currentCategories);
|
|
22573
22491
|
}
|
|
22574
|
-
}, dependencies: [i4.NgForOf, i4.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #CCC;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #CCC}.folders>.folder{display:block}input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat center center;cursor:pointer}.cancel{cursor:pointer}.cdk-overlay-pane{overflow:auto}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#EEE}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#CCC}\n"], encapsulation: 2 });
|
|
22492
|
+
}, dependencies: [i4.NgForOf, i4.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #CCC;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #CCC}.folders>.folder{display:block}input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat center center;cursor:pointer}.cancel{cursor:pointer}.cdk-overlay-pane{overflow:auto;background:#fff}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#EEE}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#CCC}\n"], encapsulation: 2 });
|
|
22575
22493
|
(function () {
|
|
22576
22494
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
|
|
22577
22495
|
type: Component,
|
|
22578
|
-
args: [{ selector: 'xui-case-file-view-folder-selector', encapsulation: ViewEncapsulation.None, template: "<div class=\"close\" (click)=\"cancel()\"></div>\n<h2 class=\"govuk-heading-l\">Move File</h2>\n<p>Where do you want to move \"{{ data.document.document_filename }}\" file?</p>\n<div class=\"folders govuk-radios govuk-radios--conditional\">\n <ng-container *ngFor=\"let cat of currentCategories\">\n <ng-container *ngTemplateOutlet=\"folder;context:{cat:cat,level:1}\"></ng-container>\n </ng-container>\n</div>\n<div class=\"govuk-button-group\">\n <button class=\"button button-primary\" type=\"button\" (click)=\"save()\">Save</button>\n <a (click)=\"cancel()\" class=\"cancel\">Cancel</a>\n</div>\n\n<ng-template #folder let-cat=\"cat\" let-level=\"level\">\n <div class=\"folder govuk-radios__item\">\n <input class=\"govuk-radios__input\" type=\"radio\" name=\"level-{{level}}\" [id]=\"cat.category_id\" (click)=\"handleChange($event)\" />\n <label class=\"govuk-label govuk-radios__label\" [for]=\"cat.category_id\">\n <img class=\"iconImg\" src=\"/assets/images/folder.png\" alt=\"Folder icon\" />\n {{ cat.category_name }}\n </label>\n <ng-container *ngFor=\"let subcat of cat.sub_categories\">\n <ng-container *ngTemplateOutlet=\"folder;context:{cat:subcat,level:level+1}\"></ng-container>\n </ng-container>\n </div>\n</ng-template>", styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #CCC;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #CCC}.folders>.folder{display:block}input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat center center;cursor:pointer}.cancel{cursor:pointer}.cdk-overlay-pane{overflow:auto}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#EEE}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#CCC}\n"] }]
|
|
22496
|
+
args: [{ selector: 'xui-case-file-view-folder-selector', encapsulation: ViewEncapsulation.None, template: "<div class=\"close\" (click)=\"cancel()\"></div>\n<h2 class=\"govuk-heading-l\">Move File</h2>\n<p>Where do you want to move \"{{ data.document.document_filename }}\" file?</p>\n<div class=\"folders govuk-radios govuk-radios--conditional\">\n <ng-container *ngFor=\"let cat of currentCategories\">\n <ng-container *ngTemplateOutlet=\"folder;context:{cat:cat,level:1}\"></ng-container>\n </ng-container>\n</div>\n<div class=\"govuk-button-group\">\n <button class=\"button button-primary\" type=\"button\" (click)=\"save()\">Save</button>\n <a (click)=\"cancel()\" class=\"cancel\">Cancel</a>\n</div>\n\n<ng-template #folder let-cat=\"cat\" let-level=\"level\">\n <div class=\"folder govuk-radios__item\">\n <input class=\"govuk-radios__input\" type=\"radio\" name=\"level-{{level}}\" [id]=\"cat.category_id\" (click)=\"handleChange($event)\" />\n <label class=\"govuk-label govuk-radios__label\" [for]=\"cat.category_id\">\n <img class=\"iconImg\" src=\"/assets/images/folder.png\" alt=\"Folder icon\" />\n {{ cat.category_name }}\n </label>\n <ng-container *ngFor=\"let subcat of cat.sub_categories\">\n <ng-container *ngTemplateOutlet=\"folder;context:{cat:subcat,level:level+1}\"></ng-container>\n </ng-container>\n </div>\n</ng-template>", styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #CCC;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #CCC}.folders>.folder{display:block}input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat center center;cursor:pointer}.cancel{cursor:pointer}.cdk-overlay-pane{overflow:auto;background:#fff}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#EEE}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#CCC}\n"] }]
|
|
22579
22497
|
}], function () {
|
|
22580
22498
|
return [{ type: i1$3.MatLegacyDialogRef }, { type: undefined, decorators: [{
|
|
22581
22499
|
type: Inject,
|