@hmcts/ccd-case-ui-toolkit 6.14.4-eui-4157 → 6.14.4-eui-4157-b
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/bundles/hmcts-ccd-case-ui-toolkit.umd.js +160 -210
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
- package/esm2015/lib/app.config.js +1 -1
- package/esm2015/lib/components/form/date-input/date-input.component.js +8 -8
- package/esm2015/lib/components/header/header-bar/header-bar.component.js +2 -3
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.module.js +1 -1
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-validation.model.js +1 -1
- package/esm2015/lib/shared/components/activity/activity.component.js +5 -5
- package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +2 -2
- package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +2 -2
- package/esm2015/lib/shared/components/case-editor/case-editor.module.js +1 -1
- package/esm2015/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.js +3 -3
- package/esm2015/lib/shared/components/case-editor/services/cases.service.js +8 -16
- package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -2
- package/esm2015/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.js +2 -2
- package/esm2015/lib/shared/components/case-editor/services/work-allocation.service.js +1 -1
- package/esm2015/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.js +5 -5
- package/esm2015/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.js +1 -1
- package/esm2015/lib/shared/components/case-viewer/case-specific-access-request/case-specific-access-request.component.js +4 -4
- package/esm2015/lib/shared/components/case-viewer/case-viewer.component.js +5 -5
- package/esm2015/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.js +3 -3
- package/esm2015/lib/shared/components/case-viewer/services/case.resolver.js +2 -2
- package/esm2015/lib/shared/components/event-start/event-guard/event-start.guard.js +2 -2
- package/esm2015/lib/shared/components/palette/address/address-option.model.js +4 -7
- package/esm2015/lib/shared/components/palette/address/write-address-field.component.js +4 -4
- package/esm2015/lib/shared/components/palette/case-flag/components/case-flag-table/case-flag-table.component.js +1 -1
- package/esm2015/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.js +2 -2
- package/esm2015/lib/shared/components/palette/case-flag/enums/index.js +1 -1
- package/esm2015/lib/shared/components/palette/collection/collection-create-checker.service.js +5 -5
- package/esm2015/lib/shared/components/palette/collection/write-collection-field.component.js +5 -5
- package/esm2015/lib/shared/components/palette/complex/read-complex-field-collection-table.component.js +3 -3
- package/esm2015/lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.js +2 -2
- package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/domain/linked-cases.model.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.js +2 -2
- package/esm2015/lib/shared/components/palette/linked-cases/services/linked-cases.service.js +2 -3
- package/esm2015/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.js +3 -4
- package/esm2015/lib/shared/components/palette/order-summary/fee.model.js +1 -1
- package/esm2015/lib/shared/components/palette/order-summary/order-summary.model.js +1 -1
- package/esm2015/lib/shared/components/palette/text-area/write-text-area-field.component.js +2 -2
- package/esm2015/lib/shared/components/palette/utils/date.pipe.js +4 -4
- package/esm2015/lib/shared/components/search-filters/search-filters.component.js +2 -2
- package/esm2015/lib/shared/components/workbasket-filters/workbasket-filters.component.js +3 -3
- package/esm2015/lib/shared/directives/conditional-show/domain/conditional-show.model.js +3 -3
- package/esm2015/lib/shared/directives/conditional-show/services/condition-parser.service.js +3 -7
- package/esm2015/lib/shared/domain/case-view/case-view.model.js +1 -1
- package/esm2015/lib/shared/domain/case-view/role-assignment-response.model.js +1 -1
- package/esm2015/lib/shared/domain/case-view/role-request.model.js +1 -1
- package/esm2015/lib/shared/domain/organisation/organisation-converter.js +8 -8
- package/esm2015/lib/shared/domain/user/user-info.model.js +1 -1
- package/esm2015/lib/shared/fixture/case-field-builder.js +13 -13
- package/esm2015/lib/shared/fixture/shared.test.fixture.js +27 -27
- package/esm2015/lib/shared/pipes/complex/{cdd-page-fields.pipe.js → ccd-page-fields.pipe.js} +3 -3
- package/esm2015/lib/shared/pipes/complex/index.js +2 -2
- package/esm2015/lib/shared/services/activity/activity.polling.service.js +2 -2
- package/esm2015/lib/shared/services/activity/activity.service.js +9 -18
- package/esm2015/lib/shared/services/addresses/address-parser.js +5 -5
- package/esm2015/lib/shared/services/case-fields/format-translator.service.js +2 -2
- package/esm2015/lib/shared/services/case-flag/case-flag-refdata.service.js +2 -2
- package/esm2015/lib/shared/services/common-data-service/common-data-service.js +2 -2
- package/esm2015/lib/shared/services/definitions/definitions.service.js +3 -8
- package/esm2015/lib/shared/services/fields/fields.purger.js +15 -15
- package/esm2015/lib/shared/services/fields/fields.utils.js +4 -4
- package/esm2015/lib/shared/services/form/form-value.service.js +1 -2
- package/esm2015/lib/shared/services/loading/loading.service.js +2 -7
- package/esm2015/lib/shared/services/search/search.service.js +5 -10
- package/esm2015/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.js +5 -5
- package/esm2015/lib/shared/services/window/window.service.js +1 -1
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +156 -198
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/app.config.d.ts.map +1 -1
- package/lib/components/header/header-bar/header-bar.component.d.ts.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-data.module.d.ts.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-validation.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +2 -2
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-viewer.component.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
- package/lib/shared/components/palette/address/address-option.model.d.ts.map +1 -1
- package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/enums/index.d.ts.map +1 -1
- package/lib/shared/components/palette/collection/collection-create-checker.service.d.ts.map +1 -1
- package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts +1 -1
- package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts +4 -4
- package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/domain/linked-cases.model.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/services/linked-cases.service.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/order-summary/fee.model.d.ts.map +1 -1
- package/lib/shared/components/palette/order-summary/order-summary.model.d.ts.map +1 -1
- package/lib/shared/components/palette/text-area/write-text-area-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/utils/date.pipe.d.ts.map +1 -1
- package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
- package/lib/shared/directives/conditional-show/domain/conditional-show.model.d.ts.map +1 -1
- package/lib/shared/directives/conditional-show/services/condition-parser.service.d.ts.map +1 -1
- package/lib/shared/domain/case-view/case-view.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/role-assignment-response.model.d.ts +1 -2
- package/lib/shared/domain/case-view/role-assignment-response.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/role-request.model.d.ts.map +1 -1
- package/lib/shared/domain/organisation/organisation-converter.d.ts.map +1 -1
- package/lib/shared/domain/user/user-info.model.d.ts.map +1 -1
- package/lib/shared/fixture/case-field-builder.d.ts +6 -6
- package/lib/shared/fixture/case-field-builder.d.ts.map +1 -1
- package/lib/shared/fixture/shared.test.fixture.d.ts +6 -6
- package/lib/shared/fixture/shared.test.fixture.d.ts.map +1 -1
- package/lib/shared/pipes/complex/{cdd-page-fields.pipe.d.ts → ccd-page-fields.pipe.d.ts} +1 -1
- package/lib/shared/pipes/complex/ccd-page-fields.pipe.d.ts.map +1 -0
- package/lib/shared/pipes/complex/index.d.ts +1 -1
- package/lib/shared/pipes/pipes.module.d.ts +1 -1
- package/lib/shared/services/activity/activity.polling.service.d.ts.map +1 -1
- package/lib/shared/services/activity/activity.service.d.ts.map +1 -1
- package/lib/shared/services/addresses/address-parser.d.ts.map +1 -1
- package/lib/shared/services/common-data-service/common-data-service.d.ts.map +1 -1
- package/lib/shared/services/definitions/definitions.service.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.utils.d.ts +0 -1
- package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
- package/lib/shared/services/loading/loading.service.d.ts +1 -4
- package/lib/shared/services/loading/loading.service.d.ts.map +1 -1
- package/lib/shared/services/search/search.service.d.ts +0 -2
- package/lib/shared/services/search/search.service.d.ts.map +1 -1
- package/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.d.ts.map +1 -1
- package/lib/shared/services/window/window.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/shared/pipes/complex/cdd-page-fields.pipe.d.ts.map +0 -1
|
@@ -579,22 +579,22 @@ class DateInputComponent {
|
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
dayId() {
|
|
582
|
-
return this.id
|
|
582
|
+
return `${this.id}-day`;
|
|
583
583
|
}
|
|
584
584
|
monthId() {
|
|
585
|
-
return this.id
|
|
585
|
+
return `${this.id}-month`;
|
|
586
586
|
}
|
|
587
587
|
yearId() {
|
|
588
|
-
return this.id
|
|
588
|
+
return `${this.id}-year`;
|
|
589
589
|
}
|
|
590
590
|
hourId() {
|
|
591
|
-
return this.id
|
|
591
|
+
return `${this.id}-hour`;
|
|
592
592
|
}
|
|
593
593
|
minuteId() {
|
|
594
|
-
return this.id
|
|
594
|
+
return `${this.id}-minute`;
|
|
595
595
|
}
|
|
596
596
|
secondId() {
|
|
597
|
-
return this.id
|
|
597
|
+
return `${this.id}-second`;
|
|
598
598
|
}
|
|
599
599
|
viewValue() {
|
|
600
600
|
if (this.day || this.month || this.year || this.hour || this.minute || this.second) {
|
|
@@ -609,7 +609,7 @@ class DateInputComponent {
|
|
|
609
609
|
this.minute ? this.pad(this.minute) : '',
|
|
610
610
|
this.second ? this.pad(this.second) : ''
|
|
611
611
|
].join(':');
|
|
612
|
-
return date
|
|
612
|
+
return `${date}T${time}.000`;
|
|
613
613
|
}
|
|
614
614
|
else {
|
|
615
615
|
return date;
|
|
@@ -1521,7 +1521,7 @@ class ActivityService {
|
|
|
1521
1521
|
}
|
|
1522
1522
|
static handleHttpError(response) {
|
|
1523
1523
|
const error = HttpErrorService.convertToHttpError(response);
|
|
1524
|
-
if (response
|
|
1524
|
+
if ((response === null || response === void 0 ? void 0 : response.status) !== error.status) {
|
|
1525
1525
|
error.status = response.status;
|
|
1526
1526
|
}
|
|
1527
1527
|
return error;
|
|
@@ -1529,50 +1529,41 @@ class ActivityService {
|
|
|
1529
1529
|
getOptions() {
|
|
1530
1530
|
const userDetails = JSON.parse(this.sessionStorageService.getItem('userDetails'));
|
|
1531
1531
|
const headers = new HttpHeaders().set('Content-Type', 'application/json').set('Authorization', userDetails.token);
|
|
1532
|
-
|
|
1532
|
+
return {
|
|
1533
1533
|
headers,
|
|
1534
1534
|
withCredentials: true,
|
|
1535
1535
|
observe: 'body',
|
|
1536
1536
|
};
|
|
1537
|
-
return options;
|
|
1538
1537
|
}
|
|
1539
1538
|
getActivities(...caseId) {
|
|
1540
1539
|
try {
|
|
1541
1540
|
const options = this.getOptions();
|
|
1542
|
-
const url = this.activityUrl()
|
|
1541
|
+
const url = `${this.activityUrl()}/cases/${caseId.join(',')}/activity`;
|
|
1543
1542
|
return this.http
|
|
1544
1543
|
.get(url, options, false, ActivityService.handleHttpError)
|
|
1545
1544
|
.pipe(map(response => response));
|
|
1546
1545
|
}
|
|
1547
1546
|
catch (error) {
|
|
1548
|
-
console.log(
|
|
1547
|
+
console.log(`user may not be authenticated.${error}`);
|
|
1549
1548
|
}
|
|
1550
1549
|
}
|
|
1551
1550
|
postActivity(caseId, activity) {
|
|
1552
1551
|
try {
|
|
1553
1552
|
const options = this.getOptions();
|
|
1554
|
-
const url = this.activityUrl()
|
|
1553
|
+
const url = `${this.activityUrl()}/cases/${caseId}/activity`;
|
|
1555
1554
|
const body = { activity };
|
|
1556
1555
|
return this.http
|
|
1557
1556
|
.post(url, body, options, false)
|
|
1558
1557
|
.pipe(map(response => response));
|
|
1559
1558
|
}
|
|
1560
1559
|
catch (error) {
|
|
1561
|
-
console.log(
|
|
1560
|
+
console.log(`user may not be authenticated.${error}`);
|
|
1562
1561
|
}
|
|
1563
1562
|
}
|
|
1564
1563
|
verifyUserIsAuthorized() {
|
|
1565
|
-
if (this.sessionStorageService.getItem('userDetails') === undefined) {
|
|
1566
|
-
return;
|
|
1567
|
-
}
|
|
1568
|
-
if (this.activityUrl() && this.userAuthorised === undefined) {
|
|
1564
|
+
if (this.sessionStorageService.getItem('userDetails') && this.activityUrl() && this.userAuthorised === undefined) {
|
|
1569
1565
|
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(() => this.userAuthorised = true, error => {
|
|
1570
|
-
|
|
1571
|
-
this.userAuthorised = false;
|
|
1572
|
-
}
|
|
1573
|
-
else {
|
|
1574
|
-
this.userAuthorised = true;
|
|
1575
|
-
}
|
|
1566
|
+
this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
|
|
1576
1567
|
});
|
|
1577
1568
|
}
|
|
1578
1569
|
}
|
|
@@ -1671,7 +1662,7 @@ class ActivityPollingService {
|
|
|
1671
1662
|
requests.get(activity.caseId).next(activity);
|
|
1672
1663
|
});
|
|
1673
1664
|
}, (err) => {
|
|
1674
|
-
console.log(
|
|
1665
|
+
console.log(`error: ${err}`);
|
|
1675
1666
|
Array.from(requests.values()).forEach((subject) => subject.error(err));
|
|
1676
1667
|
}));
|
|
1677
1668
|
});
|
|
@@ -1792,9 +1783,9 @@ class ActivityComponent {
|
|
|
1792
1783
|
}
|
|
1793
1784
|
generateDescription(prefix, suffix, namesArray, unknownCount) {
|
|
1794
1785
|
let resultText = prefix;
|
|
1795
|
-
resultText += namesArray.map(activityInfo => activityInfo.forename
|
|
1786
|
+
resultText += namesArray.map(activityInfo => `${activityInfo.forename} ${activityInfo.surname}`).join(', ');
|
|
1796
1787
|
if (unknownCount > 0) {
|
|
1797
|
-
resultText += (namesArray.length > 0 ?
|
|
1788
|
+
resultText += (namesArray.length > 0 ? ` and ${unknownCount} other` : `${unknownCount} user`);
|
|
1798
1789
|
resultText += (unknownCount > 1 ? 's' : '');
|
|
1799
1790
|
}
|
|
1800
1791
|
else {
|
|
@@ -1802,10 +1793,10 @@ class ActivityComponent {
|
|
|
1802
1793
|
}
|
|
1803
1794
|
if (suffix.length > 0) {
|
|
1804
1795
|
if (namesArray.length + unknownCount > 1) {
|
|
1805
|
-
resultText +=
|
|
1796
|
+
resultText += ` are ${suffix}`;
|
|
1806
1797
|
}
|
|
1807
1798
|
else {
|
|
1808
|
-
resultText +=
|
|
1799
|
+
resultText += ` is ${suffix}`;
|
|
1809
1800
|
}
|
|
1810
1801
|
}
|
|
1811
1802
|
return resultText;
|
|
@@ -2318,7 +2309,7 @@ class FormatTranslatorService {
|
|
|
2318
2309
|
break;
|
|
2319
2310
|
case 'n':
|
|
2320
2311
|
case 'N':
|
|
2321
|
-
maybePush(result,
|
|
2312
|
+
maybePush(result, `***${c}***`, inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
|
|
2322
2313
|
break;
|
|
2323
2314
|
case 'V':
|
|
2324
2315
|
case 'O':
|
|
@@ -2441,9 +2432,9 @@ class DatePipe {
|
|
|
2441
2432
|
resultDate = `${offsetDate.getDate()} ${DatePipe.MONTHS[offsetDate.getMonth()]} ${offsetDate.getFullYear()}`;
|
|
2442
2433
|
if (match[4] && match[5] && match[6] && format !== 'short') {
|
|
2443
2434
|
resultDate += ', ';
|
|
2444
|
-
resultDate += this.getHour(offsetDate.getHours().toString())
|
|
2445
|
-
resultDate += this.pad(offsetDate.getMinutes())
|
|
2446
|
-
resultDate += this.pad(offsetDate.getSeconds())
|
|
2435
|
+
resultDate += `${this.getHour(offsetDate.getHours().toString())}:`;
|
|
2436
|
+
resultDate += `${this.pad(offsetDate.getMinutes())}:`;
|
|
2437
|
+
resultDate += `${this.pad(offsetDate.getSeconds())} `;
|
|
2447
2438
|
resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
|
|
2448
2439
|
}
|
|
2449
2440
|
}
|
|
@@ -3124,25 +3115,25 @@ class OrganisationConverter {
|
|
|
3124
3115
|
static toSimpleAddress(organisationModel) {
|
|
3125
3116
|
let simpleAddress = '';
|
|
3126
3117
|
if (organisationModel.addressLine1) {
|
|
3127
|
-
simpleAddress += organisationModel.addressLine1
|
|
3118
|
+
simpleAddress += `${organisationModel.addressLine1}<br>`;
|
|
3128
3119
|
}
|
|
3129
3120
|
if (organisationModel.addressLine2) {
|
|
3130
|
-
simpleAddress += organisationModel.addressLine2
|
|
3121
|
+
simpleAddress += `${organisationModel.addressLine2}<br>`;
|
|
3131
3122
|
}
|
|
3132
3123
|
if (organisationModel.addressLine3) {
|
|
3133
|
-
simpleAddress += organisationModel.addressLine3
|
|
3124
|
+
simpleAddress += `${organisationModel.addressLine3}<br>`;
|
|
3134
3125
|
}
|
|
3135
3126
|
if (organisationModel.townCity) {
|
|
3136
|
-
simpleAddress += organisationModel.townCity
|
|
3127
|
+
simpleAddress += `${organisationModel.townCity}<br>`;
|
|
3137
3128
|
}
|
|
3138
3129
|
if (organisationModel.county) {
|
|
3139
|
-
simpleAddress += organisationModel.county
|
|
3130
|
+
simpleAddress += `${organisationModel.county}<br>`;
|
|
3140
3131
|
}
|
|
3141
3132
|
if (organisationModel.country) {
|
|
3142
|
-
simpleAddress += organisationModel.country
|
|
3133
|
+
simpleAddress += `${organisationModel.country}<br>`;
|
|
3143
3134
|
}
|
|
3144
3135
|
if (organisationModel.postCode) {
|
|
3145
|
-
simpleAddress += organisationModel.postCode
|
|
3136
|
+
simpleAddress += `${organisationModel.postCode}<br>`;
|
|
3146
3137
|
}
|
|
3147
3138
|
return simpleAddress;
|
|
3148
3139
|
}
|
|
@@ -3275,9 +3266,9 @@ class FieldsUtils {
|
|
|
3275
3266
|
});
|
|
3276
3267
|
return valueMap;
|
|
3277
3268
|
}
|
|
3278
|
-
static getType(elem) {
|
|
3279
|
-
|
|
3280
|
-
}
|
|
3269
|
+
// public static getType(elem: any): string {
|
|
3270
|
+
// return Object.prototype.toString.call(elem).slice(8, -1);
|
|
3271
|
+
// }
|
|
3281
3272
|
static isObject(elem) {
|
|
3282
3273
|
return typeof elem === 'object' && elem !== null;
|
|
3283
3274
|
}
|
|
@@ -3921,7 +3912,6 @@ class ConditionParser {
|
|
|
3921
3912
|
if (!condition) {
|
|
3922
3913
|
return null;
|
|
3923
3914
|
}
|
|
3924
|
-
;
|
|
3925
3915
|
condition = condition.replace(/CONTAINS/g, ' CONTAINS');
|
|
3926
3916
|
return peg.parse(condition.trim(), {});
|
|
3927
3917
|
}
|
|
@@ -3934,14 +3924,12 @@ class ConditionParser {
|
|
|
3934
3924
|
if (!conditions || conditions.length === 0) {
|
|
3935
3925
|
return true;
|
|
3936
3926
|
}
|
|
3937
|
-
;
|
|
3938
3927
|
const validJoinComparators = ['AND', 'OR'];
|
|
3939
|
-
|
|
3928
|
+
return conditions.reduce((accumulator, condition, index) => {
|
|
3940
3929
|
const isJoinComparator = (comparator) => (typeof comparator === 'string' && validJoinComparators.indexOf(comparator) !== -1);
|
|
3941
3930
|
if (isJoinComparator(condition)) {
|
|
3942
3931
|
return accumulator;
|
|
3943
3932
|
}
|
|
3944
|
-
;
|
|
3945
3933
|
let currentConditionResult = true;
|
|
3946
3934
|
if (Array.isArray(condition)) {
|
|
3947
3935
|
currentConditionResult = this.evaluate(fields, condition);
|
|
@@ -3958,7 +3946,6 @@ class ConditionParser {
|
|
|
3958
3946
|
}
|
|
3959
3947
|
return currentConditionResult;
|
|
3960
3948
|
}, true);
|
|
3961
|
-
return result;
|
|
3962
3949
|
}
|
|
3963
3950
|
static evaluateJoin(leftResult, comparator, rightResult) {
|
|
3964
3951
|
switch (comparator) {
|
|
@@ -4163,8 +4150,8 @@ class ShowCondition {
|
|
|
4163
4150
|
if (originalCondition.indexOf(condition.fieldReference) > -1) {
|
|
4164
4151
|
if (this.processedList && this.processedList.indexOf(condition.fieldReference) === -1) {
|
|
4165
4152
|
this.processedList.push(condition.fieldReference);
|
|
4166
|
-
const regularExp = new RegExp(
|
|
4167
|
-
return originalCondition.replace(regularExp, pathPrefix
|
|
4153
|
+
const regularExp = new RegExp(`(\\b)${condition.fieldReference}(?=[^"]*(?:"[^"]*"[^"]*)*$)(\\b)`, 'g');
|
|
4154
|
+
return originalCondition.replace(regularExp, `${pathPrefix}.${condition.fieldReference}`);
|
|
4168
4155
|
}
|
|
4169
4156
|
else {
|
|
4170
4157
|
return originalCondition;
|
|
@@ -4686,14 +4673,14 @@ class FieldsPurger {
|
|
|
4686
4673
|
const formFields = form.getRawValue();
|
|
4687
4674
|
const currentPage = wizard.getPage(currentPageId, this.fieldsUtils.buildCanShowPredicate(eventTrigger, form));
|
|
4688
4675
|
currentPage.wizard_page_fields.forEach(wpf => {
|
|
4689
|
-
const
|
|
4690
|
-
if (this.hasShowConditionField(
|
|
4691
|
-
const condition = new ShowCondition(
|
|
4692
|
-
if (this.isHidden(condition, formFields.data) && !(this.isReadonly(
|
|
4693
|
-
this.resetField(form,
|
|
4676
|
+
const caseField = this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
|
|
4677
|
+
if (this.hasShowConditionField(caseField, formFields)) {
|
|
4678
|
+
const condition = new ShowCondition(caseField.show_condition);
|
|
4679
|
+
if (this.isHidden(condition, formFields.data) && !(this.isReadonly(caseField))) {
|
|
4680
|
+
this.resetField(form, caseField);
|
|
4694
4681
|
}
|
|
4695
4682
|
}
|
|
4696
|
-
this.retainHiddenValueByFieldType(
|
|
4683
|
+
this.retainHiddenValueByFieldType(caseField, form);
|
|
4697
4684
|
});
|
|
4698
4685
|
}
|
|
4699
4686
|
retainHiddenValueByFieldType(field, form) {
|
|
@@ -4724,13 +4711,13 @@ class FieldsPurger {
|
|
|
4724
4711
|
hasShowConditionPage(wizardPage, formFields) {
|
|
4725
4712
|
return wizardPage.show_condition && formFields[this.getShowConditionKey(wizardPage.show_condition)];
|
|
4726
4713
|
}
|
|
4727
|
-
hasShowConditionField(
|
|
4728
|
-
return
|
|
4714
|
+
hasShowConditionField(caseField, formFields) {
|
|
4715
|
+
return caseField.show_condition && formFields.data[this.getShowConditionKey(caseField.show_condition)];
|
|
4729
4716
|
}
|
|
4730
|
-
getShowConditionKey(
|
|
4717
|
+
getShowConditionKey(showCondition) {
|
|
4731
4718
|
// Need to allow for negated conditions, i.e. !=, as well as regular ones (=)
|
|
4732
4719
|
// Also need to allow for conditions specified using the "CONTAINS" keyword
|
|
4733
|
-
return
|
|
4720
|
+
return showCondition.split(/!=|=|CONTAINS/)[0];
|
|
4734
4721
|
}
|
|
4735
4722
|
resetField(form, field) {
|
|
4736
4723
|
/**
|
|
@@ -4802,8 +4789,8 @@ class FieldsPurger {
|
|
|
4802
4789
|
}
|
|
4803
4790
|
resetPage(form, wizardPage) {
|
|
4804
4791
|
wizardPage.wizard_page_fields.forEach(wpf => {
|
|
4805
|
-
const
|
|
4806
|
-
this.resetField(form,
|
|
4792
|
+
const caseField = this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
|
|
4793
|
+
this.resetField(form, caseField);
|
|
4807
4794
|
});
|
|
4808
4795
|
}
|
|
4809
4796
|
getType(elem) {
|
|
@@ -4813,8 +4800,8 @@ class FieldsPurger {
|
|
|
4813
4800
|
return this.getType(elem) === 'Object';
|
|
4814
4801
|
}
|
|
4815
4802
|
// TODO: call isReadOnly on CaseFields once we make it available
|
|
4816
|
-
isReadonly(
|
|
4817
|
-
return
|
|
4803
|
+
isReadonly(caseField) {
|
|
4804
|
+
return caseField.display_context.toUpperCase() === 'READONLY';
|
|
4818
4805
|
}
|
|
4819
4806
|
/**
|
|
4820
4807
|
* Deletes a field value by setting the value of the corresponding {@link FormControl} to null (or an empty array
|
|
@@ -5546,7 +5533,6 @@ class FormValueService {
|
|
|
5546
5533
|
});
|
|
5547
5534
|
}
|
|
5548
5535
|
}
|
|
5549
|
-
;
|
|
5550
5536
|
});
|
|
5551
5537
|
}
|
|
5552
5538
|
}
|
|
@@ -5960,7 +5946,7 @@ class AddressParser {
|
|
|
5960
5946
|
return addressModel;
|
|
5961
5947
|
}
|
|
5962
5948
|
parseAddressLine1(classification, address) {
|
|
5963
|
-
let addressLine
|
|
5949
|
+
let addressLine;
|
|
5964
5950
|
if (classification === AddressType.RD06) {
|
|
5965
5951
|
addressLine =
|
|
5966
5952
|
`${address.SUB_BUILDING_NAME} ${address.ORGANISATION_NAME} ${address.DEPARTMENT_NAME} ${address.PO_BOX_NUMBER}`;
|
|
@@ -5973,7 +5959,7 @@ class AddressParser {
|
|
|
5973
5959
|
return this.removeNonAddressValues(addressLine);
|
|
5974
5960
|
}
|
|
5975
5961
|
parseAddressLine2(classification, address) {
|
|
5976
|
-
let addressLine
|
|
5962
|
+
let addressLine;
|
|
5977
5963
|
if (classification === AddressType.RD06) {
|
|
5978
5964
|
addressLine = `${address.BUILDING_NAME} `;
|
|
5979
5965
|
}
|
|
@@ -5984,7 +5970,7 @@ class AddressParser {
|
|
|
5984
5970
|
return this.removeNonAddressValues(addressLine);
|
|
5985
5971
|
}
|
|
5986
5972
|
parseAddressLine3(classification, address) {
|
|
5987
|
-
let addressLine
|
|
5973
|
+
let addressLine;
|
|
5988
5974
|
if (classification === AddressType.RD06) {
|
|
5989
5975
|
addressLine =
|
|
5990
5976
|
`${address.BUILDING_NUMBER} ${address.THOROUGHFARE_NAME}`;
|
|
@@ -6012,7 +5998,7 @@ class AddressParser {
|
|
|
6012
5998
|
return value.replace(new RegExp('^,', 'gi'), '');
|
|
6013
5999
|
}
|
|
6014
6000
|
prefixWithCommaIfPresent(value) {
|
|
6015
|
-
return value ?
|
|
6001
|
+
return value ? `, ${value}` : value;
|
|
6016
6002
|
}
|
|
6017
6003
|
}
|
|
6018
6004
|
|
|
@@ -6121,7 +6107,7 @@ class CaseFlagRefdataService {
|
|
|
6121
6107
|
if (flagType) {
|
|
6122
6108
|
url += `?flag-type=${flagType}`;
|
|
6123
6109
|
}
|
|
6124
|
-
if (welshRequired
|
|
6110
|
+
if (typeof welshRequired === 'boolean') {
|
|
6125
6111
|
// Check if flag-type has been added to the query string; if so, append welsh-required with '&'
|
|
6126
6112
|
url.indexOf('?') > -1 ? url += '&' : url += '?';
|
|
6127
6113
|
welshRequired ? url += 'welsh-required=Y' : url += 'welsh-required=N';
|
|
@@ -6578,11 +6564,6 @@ RequestOptionsBuilder.ɵprov = i0.ɵɵdefineInjectable({ token: RequestOptionsBu
|
|
|
6578
6564
|
type: Injectable
|
|
6579
6565
|
}], null, null); })();
|
|
6580
6566
|
|
|
6581
|
-
class HasLoadingState {
|
|
6582
|
-
get isLoading() {
|
|
6583
|
-
return;
|
|
6584
|
-
}
|
|
6585
|
-
}
|
|
6586
6567
|
class LoadingService {
|
|
6587
6568
|
constructor() {
|
|
6588
6569
|
this.registered = new Map();
|
|
@@ -6603,7 +6584,7 @@ class LoadingService {
|
|
|
6603
6584
|
}
|
|
6604
6585
|
generateToken() {
|
|
6605
6586
|
const timestamp = window.performance.now();
|
|
6606
|
-
return
|
|
6587
|
+
return `toolkit-loading-${timestamp}`; // format: [source-library]-[unique incrementing number]
|
|
6607
6588
|
}
|
|
6608
6589
|
}
|
|
6609
6590
|
LoadingService.ɵfac = function LoadingService_Factory(t) { return new (t || LoadingService)(); };
|
|
@@ -6620,10 +6601,7 @@ class SearchService {
|
|
|
6620
6601
|
this.loadingService = loadingService;
|
|
6621
6602
|
}
|
|
6622
6603
|
search(jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
|
|
6623
|
-
const url = this.appConfig.getApiUrl()
|
|
6624
|
-
+ `/jurisdictions/${jurisdictionId}`
|
|
6625
|
-
+ `/case-types/${caseTypeId}`
|
|
6626
|
-
+ `/cases`;
|
|
6604
|
+
const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types/${caseTypeId}/cases`;
|
|
6627
6605
|
const options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
6628
6606
|
const loadingToken = this.loadingService.register();
|
|
6629
6607
|
return this.httpService
|
|
@@ -6631,14 +6609,13 @@ class SearchService {
|
|
|
6631
6609
|
.pipe(map(response => response), finalize(() => this.loadingService.unregister(loadingToken)));
|
|
6632
6610
|
}
|
|
6633
6611
|
searchCasesByIds(caseTypeId, filter, view, sort) {
|
|
6634
|
-
const url = this.appConfig.getCaseDataUrl()
|
|
6635
|
-
`/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
|
|
6612
|
+
const url = `${this.appConfig.getCaseDataUrl()}/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
|
|
6636
6613
|
const body = Object.assign(Object.assign({ sort }, filter), { size: this.appConfig.getPaginationPageSize() });
|
|
6637
6614
|
const loadingToken = this.loadingService.register();
|
|
6638
6615
|
return this.httpService.post(url, body).pipe(map((response) => response), finalize(() => this.loadingService.unregister(loadingToken)));
|
|
6639
6616
|
}
|
|
6640
6617
|
searchCases(caseTypeId, metaCriteria, caseCriteria, view, sort) {
|
|
6641
|
-
const url = this.appConfig.getCaseDataUrl()
|
|
6618
|
+
const url = `${this.appConfig.getCaseDataUrl()}/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
|
|
6642
6619
|
const options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
6643
6620
|
const body = {
|
|
6644
6621
|
sort,
|
|
@@ -6681,9 +6658,8 @@ class SearchService {
|
|
|
6681
6658
|
}
|
|
6682
6659
|
}
|
|
6683
6660
|
SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
|
|
6684
|
-
|
|
6661
|
+
// public static readonly VIEW_SEARCH = 'SEARCH';
|
|
6685
6662
|
SearchService.VIEW_WORKBASKET = 'WORKBASKET';
|
|
6686
|
-
SearchService.FIELD_PREFIX = 'case.';
|
|
6687
6663
|
SearchService.ɵfac = function SearchService_Factory(t) { return new (t || SearchService)(i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpService), i0.ɵɵinject(RequestOptionsBuilder), i0.ɵɵinject(LoadingService)); };
|
|
6688
6664
|
SearchService.ɵprov = i0.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
|
|
6689
6665
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchService, [{
|
|
@@ -6797,17 +6773,12 @@ class DefinitionsService {
|
|
|
6797
6773
|
this.appConfig = appConfig;
|
|
6798
6774
|
}
|
|
6799
6775
|
getCaseTypes(jurisdictionId, access) {
|
|
6800
|
-
const url = this.appConfig.getApiUrl()
|
|
6801
|
-
+ `/caseworkers/:uid`
|
|
6802
|
-
+ `/jurisdictions/${jurisdictionId}`
|
|
6803
|
-
+ `/case-types?access=${access}`;
|
|
6776
|
+
const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types?access=${access}`;
|
|
6804
6777
|
return this.http
|
|
6805
6778
|
.get(url).pipe(map(response => response));
|
|
6806
6779
|
}
|
|
6807
6780
|
getJurisdictions(access) {
|
|
6808
|
-
const url = this.appConfig.getApiUrl()
|
|
6809
|
-
+ `/caseworkers/:uid`
|
|
6810
|
-
+ `/jurisdictions?access=${access}`;
|
|
6781
|
+
const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions?access=${access}`;
|
|
6811
6782
|
return this.http
|
|
6812
6783
|
.get(url)
|
|
6813
6784
|
.pipe(map(response => response));
|
|
@@ -6879,8 +6850,8 @@ class SearchResultViewItemComparatorFactory {
|
|
|
6879
6850
|
compare(a, b) {
|
|
6880
6851
|
let fieldA = a.case_fields[fieldId];
|
|
6881
6852
|
let fieldB = b.case_fields[fieldId];
|
|
6882
|
-
fieldA = isUndefined(fieldA) || fieldA
|
|
6883
|
-
fieldB = isUndefined(fieldB) || fieldB
|
|
6853
|
+
fieldA = isUndefined(fieldA) || fieldA === null ? '' : fieldA.toLowerCase();
|
|
6854
|
+
fieldB = isUndefined(fieldB) || fieldB === null ? '' : fieldB.toLowerCase();
|
|
6884
6855
|
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
6885
6856
|
}
|
|
6886
6857
|
};
|
|
@@ -6890,8 +6861,8 @@ class SearchResultViewItemComparatorFactory {
|
|
|
6890
6861
|
compare(a, b) {
|
|
6891
6862
|
let fieldA = a.case_fields[fieldId];
|
|
6892
6863
|
let fieldB = b.case_fields[fieldId];
|
|
6893
|
-
fieldA = isUndefined(fieldA) || fieldA
|
|
6894
|
-
fieldB = isUndefined(fieldB) || fieldB
|
|
6864
|
+
fieldA = isUndefined(fieldA) || fieldA === null ? '' : fieldA.join().toLowerCase();
|
|
6865
|
+
fieldB = isUndefined(fieldB) || fieldB === null ? '' : fieldB.join().toLowerCase();
|
|
6895
6866
|
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
6896
6867
|
}
|
|
6897
6868
|
};
|
|
@@ -7157,7 +7128,7 @@ class WizardPageFieldToCaseFieldMapper {
|
|
|
7157
7128
|
});
|
|
7158
7129
|
}
|
|
7159
7130
|
preparePathPrefix(pathPrefix, caseField) {
|
|
7160
|
-
return pathPrefix.length === 0 ? caseField : pathPrefix
|
|
7131
|
+
return pathPrefix.length === 0 ? caseField : `${pathPrefix}.${caseField}`;
|
|
7161
7132
|
}
|
|
7162
7133
|
getCaseFieldLeaf(caseFieldId, caseFields) {
|
|
7163
7134
|
const [head, ...tail] = caseFieldId;
|
|
@@ -7234,11 +7205,7 @@ class CasesService {
|
|
|
7234
7205
|
});
|
|
7235
7206
|
}
|
|
7236
7207
|
getCaseView(jurisdictionId, caseTypeId, caseId) {
|
|
7237
|
-
const url = this.appConfig.getApiUrl()
|
|
7238
|
-
+ `/caseworkers/:uid`
|
|
7239
|
-
+ `/jurisdictions/${jurisdictionId}`
|
|
7240
|
-
+ `/case-types/${caseTypeId}`
|
|
7241
|
-
+ `/cases/${caseId}`;
|
|
7208
|
+
const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types/${caseTypeId}/cases/${caseId}`;
|
|
7242
7209
|
const loadingToken = this.loadingService.register();
|
|
7243
7210
|
return this.http
|
|
7244
7211
|
.get(url)
|
|
@@ -7287,7 +7254,7 @@ class CasesService {
|
|
|
7287
7254
|
}
|
|
7288
7255
|
createEvent(caseDetails, eventData) {
|
|
7289
7256
|
const caseId = caseDetails.case_id;
|
|
7290
|
-
const url = this.appConfig.getCaseDataUrl()
|
|
7257
|
+
const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
|
|
7291
7258
|
const headers = new HttpHeaders()
|
|
7292
7259
|
.set('experimental', 'true')
|
|
7293
7260
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
|
|
@@ -7300,9 +7267,8 @@ class CasesService {
|
|
|
7300
7267
|
}));
|
|
7301
7268
|
}
|
|
7302
7269
|
validateCase(ctid, eventData, pageId) {
|
|
7303
|
-
const pageIdString = pageId ?
|
|
7304
|
-
const url = this.appConfig.getCaseDataUrl()
|
|
7305
|
-
+ `/case-types/${ctid}/validate${pageIdString}`;
|
|
7270
|
+
const pageIdString = pageId ? `?pageId=${pageId}` : '';
|
|
7271
|
+
const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
|
|
7306
7272
|
const headers = new HttpHeaders()
|
|
7307
7273
|
.set('experimental', 'true')
|
|
7308
7274
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
|
|
@@ -7319,8 +7285,7 @@ class CasesService {
|
|
|
7319
7285
|
if (eventData.ignore_warning) {
|
|
7320
7286
|
ignoreWarning = 'true';
|
|
7321
7287
|
}
|
|
7322
|
-
const url = this.appConfig.getCaseDataUrl()
|
|
7323
|
-
+ `/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
|
|
7288
|
+
const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
|
|
7324
7289
|
const headers = new HttpHeaders()
|
|
7325
7290
|
.set('experimental', 'true')
|
|
7326
7291
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
|
|
@@ -7333,9 +7298,7 @@ class CasesService {
|
|
|
7333
7298
|
}));
|
|
7334
7299
|
}
|
|
7335
7300
|
getPrintDocuments(caseId) {
|
|
7336
|
-
const url = this.appConfig.getCaseDataUrl()
|
|
7337
|
-
+ `/cases/${caseId}`
|
|
7338
|
-
+ `/documents`;
|
|
7301
|
+
const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
|
|
7339
7302
|
const headers = new HttpHeaders()
|
|
7340
7303
|
.set('experimental', 'true')
|
|
7341
7304
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
|
|
@@ -7348,7 +7311,7 @@ class CasesService {
|
|
|
7348
7311
|
}));
|
|
7349
7312
|
}
|
|
7350
7313
|
buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
|
|
7351
|
-
let url = this.appConfig.getCaseDataUrl()
|
|
7314
|
+
let url = `${this.appConfig.getCaseDataUrl()}/internal`;
|
|
7352
7315
|
if (Draft.isDraft(caseId)) {
|
|
7353
7316
|
url += `/drafts/${caseId}`
|
|
7354
7317
|
+ `/event-trigger`
|
|
@@ -8020,7 +7983,7 @@ class PageValidationService {
|
|
|
8020
7983
|
isHidden(caseField, editForm, path) {
|
|
8021
7984
|
const formFields = editForm.getRawValue();
|
|
8022
7985
|
const condition = ShowCondition.getInstance(caseField.show_condition);
|
|
8023
|
-
if (path && path.indexOf(
|
|
7986
|
+
if (path && path.indexOf(`_${caseField.id}_`) === -1) {
|
|
8024
7987
|
path = `${path}${caseField.id}`;
|
|
8025
7988
|
}
|
|
8026
7989
|
return !condition.match(formFields.data, path);
|
|
@@ -9075,7 +9038,7 @@ class CaseEditPageComponent {
|
|
|
9075
9038
|
const label = casefield.label || 'Field';
|
|
9076
9039
|
let id = casefield.id;
|
|
9077
9040
|
if (fieldElement['component'] && fieldElement['component'].parent) {
|
|
9078
|
-
if (fieldElement['component'].idPrefix.indexOf(
|
|
9041
|
+
if (fieldElement['component'].idPrefix.indexOf(`_${id}_`) === -1) {
|
|
9079
9042
|
id = `${fieldElement['component'].idPrefix}${id}`;
|
|
9080
9043
|
}
|
|
9081
9044
|
else {
|
|
@@ -9561,7 +9524,7 @@ CallbackErrorsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CallbackErrorsCom
|
|
|
9561
9524
|
|
|
9562
9525
|
class AddressOption {
|
|
9563
9526
|
constructor(addressModel, description) {
|
|
9564
|
-
if (description
|
|
9527
|
+
if (description === null) {
|
|
9565
9528
|
this.value = addressModel;
|
|
9566
9529
|
this.description = this.getDescription();
|
|
9567
9530
|
}
|
|
@@ -9570,13 +9533,10 @@ class AddressOption {
|
|
|
9570
9533
|
}
|
|
9571
9534
|
}
|
|
9572
9535
|
getDescription() {
|
|
9573
|
-
return this.removeInitialCommaIfPresent(
|
|
9574
|
-
+ this.prefixWithCommaIfPresent(this.value.AddressLine2)
|
|
9575
|
-
+ this.prefixWithCommaIfPresent(this.value.AddressLine3)
|
|
9576
|
-
+ ', ' + this.value.PostTown);
|
|
9536
|
+
return this.removeInitialCommaIfPresent(`${this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1}${this.prefixWithCommaIfPresent(this.value.AddressLine2)}${this.prefixWithCommaIfPresent(this.value.AddressLine3)}, ${this.value.PostTown}`);
|
|
9577
9537
|
}
|
|
9578
9538
|
prefixWithCommaIfPresent(value) {
|
|
9579
|
-
return value ?
|
|
9539
|
+
return value ? `, ${value}` : value;
|
|
9580
9540
|
}
|
|
9581
9541
|
removeInitialCommaIfPresent(value) {
|
|
9582
9542
|
return value.replace(new RegExp('^,', 'gi'), '');
|
|
@@ -9964,7 +9924,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
9964
9924
|
this.missingPostcode = false;
|
|
9965
9925
|
const postcode = this.postcode.value;
|
|
9966
9926
|
this.caseField.value = null;
|
|
9967
|
-
this.addressOptions =
|
|
9927
|
+
this.addressOptions = [];
|
|
9968
9928
|
this.addressesService.getAddressesForPostcode(postcode.replace(' ', '').toUpperCase()).subscribe(result => {
|
|
9969
9929
|
result.forEach(address => {
|
|
9970
9930
|
this.addressOptions.push(new AddressOption(address, null));
|
|
@@ -10007,7 +9967,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
10007
9967
|
let hasAddress = false;
|
|
10008
9968
|
if (address) {
|
|
10009
9969
|
Object.keys(address).forEach((key) => {
|
|
10010
|
-
if (address[key]
|
|
9970
|
+
if (address[key] !== null) {
|
|
10011
9971
|
hasAddress = true;
|
|
10012
9972
|
}
|
|
10013
9973
|
});
|
|
@@ -10030,7 +9990,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
10030
9990
|
}
|
|
10031
9991
|
defaultLabel(numberOfAddresses) {
|
|
10032
9992
|
return numberOfAddresses === 0 ? 'No address found'
|
|
10033
|
-
: numberOfAddresses
|
|
9993
|
+
: `${numberOfAddresses}${numberOfAddresses === 1 ? ' address ' : ' addresses '}found`;
|
|
10034
9994
|
}
|
|
10035
9995
|
setFormValue() {
|
|
10036
9996
|
if (this.writeComplexFieldComponent.complexGroup) {
|
|
@@ -11568,16 +11528,16 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
11568
11528
|
&& this.collItems[i].caseField.id === counter.toString()) {
|
|
11569
11529
|
this.collItems[i].caseField.id = i.toString();
|
|
11570
11530
|
}
|
|
11571
|
-
const idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace(
|
|
11572
|
-
const idPrefix1Current = idPrefix1.replace(
|
|
11531
|
+
const idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace(`_${counter.toString()}`, `_${i.toString()}`) : '';
|
|
11532
|
+
const idPrefix1Current = idPrefix1.replace(`_${i.toString()}`, `_${counter.toString()}`);
|
|
11573
11533
|
if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
|
|
11574
11534
|
this.collItems[i].prefix = idPrefix1;
|
|
11575
11535
|
}
|
|
11576
11536
|
const idPrefixAvailable = this.collItems[i].container && this.collItems[i].container['component']
|
|
11577
11537
|
&& this.collItems[i].container['component'].idPrefix ? true : false;
|
|
11578
11538
|
const idPrefix2 = idPrefixAvailable ?
|
|
11579
|
-
this.collItems[i].container['component'].idPrefix.replace(
|
|
11580
|
-
const idPrefix2current = idPrefix2.replace(
|
|
11539
|
+
this.collItems[i].container['component'].idPrefix.replace(`_${counter.toString()}`, `_${i.toString()}`) : '';
|
|
11540
|
+
const idPrefix2current = idPrefix2.replace(`_${i.toString()}`, `_${counter.toString()}`);
|
|
11581
11541
|
if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
|
|
11582
11542
|
this.collItems[i].container['component'].idPrefix = idPrefix2;
|
|
11583
11543
|
}
|
|
@@ -13349,7 +13309,7 @@ class LinkedCasesService {
|
|
|
13349
13309
|
casesResponse.push(this.mapResponse(result));
|
|
13350
13310
|
});
|
|
13351
13311
|
});
|
|
13352
|
-
|
|
13312
|
+
this.linkedCases = casesResponse.map(item => {
|
|
13353
13313
|
return {
|
|
13354
13314
|
caseReference: item.caseReference,
|
|
13355
13315
|
caseName: item.caseName,
|
|
@@ -13363,7 +13323,6 @@ class LinkedCasesService {
|
|
|
13363
13323
|
}),
|
|
13364
13324
|
};
|
|
13365
13325
|
});
|
|
13366
|
-
this.linkedCases = caseLinks;
|
|
13367
13326
|
this.serverLinkedApiError = null;
|
|
13368
13327
|
}, err => {
|
|
13369
13328
|
this.serverLinkedApiError = {
|
|
@@ -15196,7 +15155,7 @@ class ReadLinkedCasesFieldComponent {
|
|
|
15196
15155
|
this.caseField = (_a = tab === null || tab === void 0 ? void 0 : tab.fields) === null || _a === void 0 ? void 0 : _a.find(field => field.id === 'caseLinks');
|
|
15197
15156
|
}
|
|
15198
15157
|
this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
|
|
15199
|
-
const reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl()
|
|
15158
|
+
const reasonCodeAPIurl = `${this.appConfig.getRDCommonDataApiUrl()}/lov/categories/CaseLinkingReasonCode`;
|
|
15200
15159
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
15201
15160
|
next: reasons => {
|
|
15202
15161
|
this.reasonListLoaded = true;
|
|
@@ -15431,7 +15390,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
|
|
|
15431
15390
|
}
|
|
15432
15391
|
}
|
|
15433
15392
|
getLinkedCaseReasons() {
|
|
15434
|
-
const reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl()
|
|
15393
|
+
const reasonCodeAPIurl = `${this.appConfig.getRDCommonDataApiUrl()}/lov/categories/CaseLinkingReasonCode`;
|
|
15435
15394
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
15436
15395
|
next: reasons => {
|
|
15437
15396
|
// Sort in ascending order
|
|
@@ -15489,8 +15448,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
|
|
|
15489
15448
|
getLinkedCases() {
|
|
15490
15449
|
this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe((caseView) => {
|
|
15491
15450
|
const caseViewFiltered = caseView.tabs.filter(tab => {
|
|
15492
|
-
|
|
15493
|
-
return linkField;
|
|
15451
|
+
return tab.fields.some(({ field_type }) => field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink');
|
|
15494
15452
|
});
|
|
15495
15453
|
if (caseViewFiltered) {
|
|
15496
15454
|
const caseLinkFieldValue = caseViewFiltered.map(filtered => { var _a; return ((_a = filtered.fields) === null || _a === void 0 ? void 0 : _a.length) > 0 && filtered.fields.filter(field => field.id === 'caseLinks')[0].value; });
|
|
@@ -16980,7 +16938,7 @@ class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
16980
16938
|
autoGrow(event) {
|
|
16981
16939
|
if (this.browserService.isIEOrEdge()) {
|
|
16982
16940
|
event.target.style.height = 'auto';
|
|
16983
|
-
event.target.style.height = event.target.scrollHeight
|
|
16941
|
+
event.target.style.height = `${event.target.scrollHeight}px`;
|
|
16984
16942
|
event.target.scrollTop = event.target.scrollHeight;
|
|
16985
16943
|
}
|
|
16986
16944
|
}
|
|
@@ -19206,7 +19164,7 @@ class SelectFlagLocationComponent {
|
|
|
19206
19164
|
// is expected not to have a party name)
|
|
19207
19165
|
if (this.flagsData) {
|
|
19208
19166
|
this.filteredFlagsData =
|
|
19209
|
-
this.flagsData.filter(f => f.flags.partyName
|
|
19167
|
+
this.flagsData.filter(f => f.flags.partyName !== null || f.pathToFlagsFormGroup === this.caseLevelCaseFlagsFieldId);
|
|
19210
19168
|
}
|
|
19211
19169
|
// Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
|
|
19212
19170
|
if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
|
|
@@ -20374,13 +20332,13 @@ class ReadComplexFieldCollectionTableComponent extends AbstractFieldReadComponen
|
|
|
20374
20332
|
field.value = { CaseReference: value };
|
|
20375
20333
|
return field;
|
|
20376
20334
|
}
|
|
20377
|
-
toCaseField(id, label,
|
|
20335
|
+
toCaseField(id, label, fieldType, value) {
|
|
20378
20336
|
return plainToClassFromExist(new CaseField(), {
|
|
20379
20337
|
id,
|
|
20380
20338
|
label,
|
|
20381
20339
|
display_context: 'READONLY',
|
|
20382
20340
|
value,
|
|
20383
|
-
field_type
|
|
20341
|
+
field_type: fieldType
|
|
20384
20342
|
});
|
|
20385
20343
|
}
|
|
20386
20344
|
sortRowsByColumns(column) {
|
|
@@ -21966,7 +21924,7 @@ CcdTabFieldsPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdTabFields", type: CcdTab
|
|
|
21966
21924
|
|
|
21967
21925
|
class CcdPageFieldsPipe {
|
|
21968
21926
|
transform(page, dataFormGroup) {
|
|
21969
|
-
const
|
|
21927
|
+
const complexFields = Object.keys(dataFormGroup.controls['data'].controls).map(key => {
|
|
21970
21928
|
const control = dataFormGroup.controls['data'].get(key);
|
|
21971
21929
|
return control['caseField'];
|
|
21972
21930
|
}).filter(field => {
|
|
@@ -21985,7 +21943,7 @@ class CcdPageFieldsPipe {
|
|
|
21985
21943
|
field_type: {
|
|
21986
21944
|
id: page.id,
|
|
21987
21945
|
type: 'Complex',
|
|
21988
|
-
complex_fields
|
|
21946
|
+
complex_fields: complexFields
|
|
21989
21947
|
}
|
|
21990
21948
|
});
|
|
21991
21949
|
}
|
|
@@ -22144,11 +22102,11 @@ class CollectionCreateCheckerService {
|
|
|
22144
22102
|
}
|
|
22145
22103
|
return childrenCaseFields;
|
|
22146
22104
|
}
|
|
22147
|
-
isComplex(
|
|
22148
|
-
return
|
|
22105
|
+
isComplex(caseField) {
|
|
22106
|
+
return caseField.field_type.type === 'Complex';
|
|
22149
22107
|
}
|
|
22150
|
-
isCollection(
|
|
22151
|
-
return
|
|
22108
|
+
isCollection(caseField) {
|
|
22109
|
+
return caseField.field_type.type === 'Collection';
|
|
22152
22110
|
}
|
|
22153
22111
|
hasCreateAccess(caseField, role) {
|
|
22154
22112
|
return !!caseField.acls.find(acl => acl.role === role && acl.create === true);
|
|
@@ -23262,7 +23220,7 @@ class CaseEditSubmitComponent {
|
|
|
23262
23220
|
if (caseField.field_type.type === 'Complex') {
|
|
23263
23221
|
// Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
|
|
23264
23222
|
// handle both null and undefined values
|
|
23265
|
-
if (caseField.value
|
|
23223
|
+
if (caseField.value !== null) {
|
|
23266
23224
|
// Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
|
|
23267
23225
|
// CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
|
|
23268
23226
|
// parent)
|
|
@@ -25029,7 +24987,7 @@ class WorkbasketFiltersComponent {
|
|
|
25029
24987
|
const formValue = this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
|
|
25030
24988
|
workbasketInputs.forEach(item => {
|
|
25031
24989
|
if (item.field.elementPath) {
|
|
25032
|
-
item.field.id = item.field.id
|
|
24990
|
+
item.field.id = `${item.field.id}.${item.field.elementPath}`;
|
|
25033
24991
|
}
|
|
25034
24992
|
item.field.label = item.label;
|
|
25035
24993
|
if (formValue) {
|
|
@@ -25081,7 +25039,7 @@ class WorkbasketFiltersComponent {
|
|
|
25081
25039
|
const value = formGroupLS[key];
|
|
25082
25040
|
// Clear the filter form group control values if it has a value in local storage
|
|
25083
25041
|
// The regionList form group control value should be ignored as it always contain the latest value
|
|
25084
|
-
if (key !== REGION_LIST_AND_FRC_FILTER && value
|
|
25042
|
+
if (key !== REGION_LIST_AND_FRC_FILTER && value !== null) {
|
|
25085
25043
|
this.formGroup.get(key).setValue(null);
|
|
25086
25044
|
}
|
|
25087
25045
|
}
|
|
@@ -27214,7 +27172,7 @@ class PrintUrlPipe {
|
|
|
27214
27172
|
* or the empty string
|
|
27215
27173
|
*/
|
|
27216
27174
|
transform(remoteUrl) {
|
|
27217
|
-
if (remoteUrl
|
|
27175
|
+
if ((remoteUrl === null || remoteUrl === void 0 ? void 0 : remoteUrl.length) > 0) {
|
|
27218
27176
|
let printServiceUrlPathname;
|
|
27219
27177
|
/**
|
|
27220
27178
|
* Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
|
|
@@ -27230,7 +27188,7 @@ class PrintUrlPipe {
|
|
|
27230
27188
|
printServiceUrlPathname = urlParser.pathname;
|
|
27231
27189
|
if (printServiceUrlPathname[0] !== '/') {
|
|
27232
27190
|
// Fix for IE11; it returns the pathname without leading slash
|
|
27233
|
-
printServiceUrlPathname =
|
|
27191
|
+
printServiceUrlPathname = `/${printServiceUrlPathname}`;
|
|
27234
27192
|
}
|
|
27235
27193
|
}
|
|
27236
27194
|
else {
|
|
@@ -27407,10 +27365,10 @@ class CaseViewerComponent {
|
|
|
27407
27365
|
}
|
|
27408
27366
|
setUserAccessType(caseDetails) {
|
|
27409
27367
|
if (caseDetails && Array.isArray(caseDetails.metadataFields)) {
|
|
27410
|
-
const
|
|
27411
|
-
const
|
|
27412
|
-
this.accessGranted =
|
|
27413
|
-
this.userAccessType =
|
|
27368
|
+
const accessProcess = caseDetails.metadataFields.find(metadataField => metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID);
|
|
27369
|
+
const accessGranted = caseDetails.metadataFields.find(metadataField => metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID);
|
|
27370
|
+
this.accessGranted = accessGranted ? accessGranted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
|
|
27371
|
+
this.userAccessType = accessProcess ? accessProcess.value : null;
|
|
27414
27372
|
}
|
|
27415
27373
|
}
|
|
27416
27374
|
isDataLoaded() {
|
|
@@ -28575,11 +28533,11 @@ class CaseChallengedAccessRequestComponent {
|
|
|
28575
28533
|
};
|
|
28576
28534
|
this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId, challengedAccessRequest)
|
|
28577
28535
|
.pipe(switchMap(() => this.caseNotifier.fetchAndRefresh(caseId)))
|
|
28578
|
-
.subscribe(
|
|
28536
|
+
.subscribe(() => {
|
|
28579
28537
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
28580
28538
|
// Angular 7.2!
|
|
28581
28539
|
this.router.navigate(['success'], { relativeTo: this.route });
|
|
28582
|
-
},
|
|
28540
|
+
}, () => {
|
|
28583
28541
|
// Navigate to error page
|
|
28584
28542
|
});
|
|
28585
28543
|
}
|
|
@@ -28593,7 +28551,7 @@ class CaseChallengedAccessRequestComponent {
|
|
|
28593
28551
|
}
|
|
28594
28552
|
}
|
|
28595
28553
|
inputEmpty(input) {
|
|
28596
|
-
return input.value
|
|
28554
|
+
return input.value === null || input.value.trim().length === 0;
|
|
28597
28555
|
}
|
|
28598
28556
|
}
|
|
28599
28557
|
CaseChallengedAccessRequestComponent.CANCEL_LINK_DESTINATION = '/work/my-work/list';
|
|
@@ -29179,11 +29137,11 @@ class CaseSpecificAccessRequestComponent {
|
|
|
29179
29137
|
};
|
|
29180
29138
|
this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId, specificAccessRequest)
|
|
29181
29139
|
.pipe(switchMap(() => this.caseNotifier.fetchAndRefresh(caseId)))
|
|
29182
|
-
.subscribe(
|
|
29140
|
+
.subscribe(() => {
|
|
29183
29141
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
29184
29142
|
// Angular 7.2
|
|
29185
29143
|
this.router.navigate(['success'], { relativeTo: this.route });
|
|
29186
|
-
},
|
|
29144
|
+
}, () => {
|
|
29187
29145
|
// Navigate to error page
|
|
29188
29146
|
});
|
|
29189
29147
|
}
|
|
@@ -29198,7 +29156,7 @@ class CaseSpecificAccessRequestComponent {
|
|
|
29198
29156
|
}
|
|
29199
29157
|
}
|
|
29200
29158
|
inputEmpty(input) {
|
|
29201
|
-
return input.value
|
|
29159
|
+
return input.value === null || input.value.trim().length === 0;
|
|
29202
29160
|
}
|
|
29203
29161
|
}
|
|
29204
29162
|
CaseSpecificAccessRequestComponent.CANCEL_LINK_DESTINATION = '/work/my-work/list';
|
|
@@ -30040,7 +29998,7 @@ class SearchFiltersComponent {
|
|
|
30040
29998
|
}
|
|
30041
29999
|
searchInputs.forEach(item => {
|
|
30042
30000
|
if (item.field.elementPath) {
|
|
30043
|
-
item.field.id = item.field.id
|
|
30001
|
+
item.field.id = `${item.field.id}.${item.field.elementPath}`;
|
|
30044
30002
|
}
|
|
30045
30003
|
item.field.label = item.label;
|
|
30046
30004
|
if (formValueObject) {
|
|
@@ -31159,24 +31117,24 @@ class CaseFieldBuilder {
|
|
|
31159
31117
|
this.caseField.id = id;
|
|
31160
31118
|
return this;
|
|
31161
31119
|
}
|
|
31162
|
-
withFieldType(
|
|
31163
|
-
this.caseField.field_type =
|
|
31120
|
+
withFieldType(fieldType) {
|
|
31121
|
+
this.caseField.field_type = fieldType;
|
|
31164
31122
|
return this;
|
|
31165
31123
|
}
|
|
31166
|
-
withDisplayContext(
|
|
31167
|
-
this.caseField.display_context =
|
|
31124
|
+
withDisplayContext(displayContext) {
|
|
31125
|
+
this.caseField.display_context = displayContext;
|
|
31168
31126
|
return this;
|
|
31169
31127
|
}
|
|
31170
|
-
withDisplayContextParameter(
|
|
31171
|
-
this.caseField.display_context_parameter =
|
|
31128
|
+
withDisplayContextParameter(displayContextParameter) {
|
|
31129
|
+
this.caseField.display_context_parameter = displayContextParameter;
|
|
31172
31130
|
return this;
|
|
31173
31131
|
}
|
|
31174
31132
|
withHidden(hidden) {
|
|
31175
31133
|
this.caseField.hidden = hidden;
|
|
31176
31134
|
return this;
|
|
31177
31135
|
}
|
|
31178
|
-
withHintText(
|
|
31179
|
-
this.caseField.hint_text =
|
|
31136
|
+
withHintText(hintText) {
|
|
31137
|
+
this.caseField.hint_text = hintText;
|
|
31180
31138
|
return this;
|
|
31181
31139
|
}
|
|
31182
31140
|
withLabel(label) {
|
|
@@ -31187,12 +31145,12 @@ class CaseFieldBuilder {
|
|
|
31187
31145
|
this.caseField.order = order;
|
|
31188
31146
|
return this;
|
|
31189
31147
|
}
|
|
31190
|
-
withSecurityLabel(
|
|
31191
|
-
this.caseField.security_label =
|
|
31148
|
+
withSecurityLabel(securityLabel) {
|
|
31149
|
+
this.caseField.security_label = securityLabel;
|
|
31192
31150
|
return this;
|
|
31193
31151
|
}
|
|
31194
|
-
withShowCondition(
|
|
31195
|
-
this.caseField.show_condition =
|
|
31152
|
+
withShowCondition(showCondition) {
|
|
31153
|
+
this.caseField.show_condition = showCondition;
|
|
31196
31154
|
return this;
|
|
31197
31155
|
}
|
|
31198
31156
|
withShowSummaryContentOption(option) {
|
|
@@ -31219,19 +31177,19 @@ const textFieldType = () => {
|
|
|
31219
31177
|
complex_fields: []
|
|
31220
31178
|
};
|
|
31221
31179
|
};
|
|
31222
|
-
const createCaseEventTrigger = (id, name,
|
|
31180
|
+
const createCaseEventTrigger = (id, name, caseId, showSummary, caseFields, wizardPages = [], canSaveDraft = false) => {
|
|
31223
31181
|
const eventTrigger = new CaseEventTrigger();
|
|
31224
31182
|
eventTrigger.id = id;
|
|
31225
31183
|
eventTrigger.name = name;
|
|
31226
|
-
eventTrigger.case_id =
|
|
31227
|
-
eventTrigger.show_summary =
|
|
31228
|
-
eventTrigger.wizard_pages =
|
|
31184
|
+
eventTrigger.case_id = caseId;
|
|
31185
|
+
eventTrigger.show_summary = showSummary;
|
|
31186
|
+
eventTrigger.wizard_pages = wizardPages;
|
|
31229
31187
|
eventTrigger.event_token = 'test-token';
|
|
31230
|
-
eventTrigger.case_fields =
|
|
31231
|
-
eventTrigger.can_save_draft =
|
|
31188
|
+
eventTrigger.case_fields = caseFields;
|
|
31189
|
+
eventTrigger.can_save_draft = canSaveDraft;
|
|
31232
31190
|
return eventTrigger;
|
|
31233
31191
|
};
|
|
31234
|
-
const aCaseField = (id, label, type,
|
|
31192
|
+
const aCaseField = (id, label, type, displayContext, showSummaryContentOption, typeComplexFields = [], retainHiddenValue, hidden) => {
|
|
31235
31193
|
return ({
|
|
31236
31194
|
id: id || 'personFirstName',
|
|
31237
31195
|
field_type: {
|
|
@@ -31239,10 +31197,10 @@ const aCaseField = (id, label, type, display_context, show_summary_content_optio
|
|
|
31239
31197
|
type: type || 'Text',
|
|
31240
31198
|
complex_fields: typeComplexFields || []
|
|
31241
31199
|
},
|
|
31242
|
-
display_context:
|
|
31200
|
+
display_context: displayContext || 'OPTIONAL',
|
|
31243
31201
|
label: label || 'First name',
|
|
31244
|
-
show_summary_content_option,
|
|
31245
|
-
retain_hidden_value:
|
|
31202
|
+
show_summary_content_option: showSummaryContentOption,
|
|
31203
|
+
retain_hidden_value: retainHiddenValue || false,
|
|
31246
31204
|
hidden: hidden || false
|
|
31247
31205
|
});
|
|
31248
31206
|
};
|
|
@@ -31280,59 +31238,59 @@ const createHiddenComplexFieldOverride = (id) => {
|
|
|
31280
31238
|
complexFieldOverride.display_context = 'HIDDEN';
|
|
31281
31239
|
return complexFieldOverride;
|
|
31282
31240
|
};
|
|
31283
|
-
const createCaseField = (id, label, hint, fieldType,
|
|
31241
|
+
const createCaseField = (id, label, hint, fieldType, displayContext, order = undefined, showCondition = undefined, acls = undefined, hidden) => {
|
|
31284
31242
|
return CaseFieldBuilder.create()
|
|
31285
31243
|
.withId(id || 'personFirstName')
|
|
31286
31244
|
.withFieldType(fieldType || textFieldType())
|
|
31287
|
-
.withDisplayContext(
|
|
31245
|
+
.withDisplayContext(displayContext || 'OPTIONAL')
|
|
31288
31246
|
.withLabel(label || 'First name')
|
|
31289
31247
|
.withHintText(hint || 'First name hint text')
|
|
31290
31248
|
.withShowSummaryContentOption(0)
|
|
31291
31249
|
.withOrder(order)
|
|
31292
|
-
.withShowCondition(
|
|
31293
|
-
.withACLs(
|
|
31250
|
+
.withShowCondition(showCondition || undefined)
|
|
31251
|
+
.withACLs(acls)
|
|
31294
31252
|
.withHidden(hidden || false)
|
|
31295
31253
|
.build();
|
|
31296
31254
|
};
|
|
31297
|
-
const newCaseField = (id, label, hint, fieldType,
|
|
31255
|
+
const newCaseField = (id, label, hint, fieldType, displayContext, order = undefined) => {
|
|
31298
31256
|
return CaseFieldBuilder.create()
|
|
31299
31257
|
.withId(id || 'personFirstName')
|
|
31300
31258
|
.withFieldType(fieldType || textFieldType())
|
|
31301
|
-
.withDisplayContext(
|
|
31259
|
+
.withDisplayContext(displayContext || 'OPTIONAL')
|
|
31302
31260
|
.withHintText(hint || 'First name hint text')
|
|
31303
31261
|
.withLabel(label || 'First name')
|
|
31304
31262
|
.withOrder(order)
|
|
31305
31263
|
.withShowSummaryContentOption(0);
|
|
31306
31264
|
};
|
|
31307
|
-
const createFieldType = (typeId, type,
|
|
31265
|
+
const createFieldType = (typeId, type, complexFields = [], collectionFieldType = undefined) => {
|
|
31308
31266
|
return {
|
|
31309
31267
|
id: typeId || 'Text',
|
|
31310
31268
|
type: type || 'Text',
|
|
31311
|
-
complex_fields:
|
|
31312
|
-
collection_field_type:
|
|
31269
|
+
complex_fields: complexFields || [],
|
|
31270
|
+
collection_field_type: collectionFieldType || undefined
|
|
31313
31271
|
};
|
|
31314
31272
|
};
|
|
31315
31273
|
const createFixedListFieldType = (typeId, fixedListItems = []) => {
|
|
31316
31274
|
return {
|
|
31317
|
-
id:
|
|
31275
|
+
id: `FixedList-${typeId}`,
|
|
31318
31276
|
type: 'FixedList',
|
|
31319
31277
|
fixed_list_items: fixedListItems || []
|
|
31320
31278
|
};
|
|
31321
31279
|
};
|
|
31322
31280
|
const createMultiSelectListFieldType = (typeId, fixedListItems = []) => {
|
|
31323
31281
|
return {
|
|
31324
|
-
id:
|
|
31282
|
+
id: `MultiSelectList-${typeId}`,
|
|
31325
31283
|
type: 'MultiSelectList',
|
|
31326
31284
|
fixed_list_items: fixedListItems || []
|
|
31327
31285
|
};
|
|
31328
31286
|
};
|
|
31329
|
-
const createACL = (role,
|
|
31287
|
+
const createACL = (role, aclCreate, aclRead, aclUpdate, aclDelete) => {
|
|
31330
31288
|
return ({
|
|
31331
31289
|
role: role || 'roleX',
|
|
31332
|
-
create,
|
|
31333
|
-
read,
|
|
31334
|
-
update,
|
|
31335
|
-
delete:
|
|
31290
|
+
create: aclCreate,
|
|
31291
|
+
read: aclRead,
|
|
31292
|
+
update: aclUpdate,
|
|
31293
|
+
delete: aclDelete
|
|
31336
31294
|
});
|
|
31337
31295
|
};
|
|
31338
31296
|
|
|
@@ -31379,5 +31337,5 @@ class TestRouteSnapshotBuilder {
|
|
|
31379
31337
|
* Generated bundle index. Do not edit.
|
|
31380
31338
|
*/
|
|
31381
31339
|
|
|
31382
|
-
export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BeforeYouStartComponent, BodyComponent, BrowserService, CCDCaseLinkType, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagFieldState, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagText, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseLink, CaseLinkResponse, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, CheckYourAnswersComponent, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, ESQueryType, Embedded, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef,
|
|
31340
|
+
export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BeforeYouStartComponent, BodyComponent, BrowserService, CCDCaseLinkType, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagFieldState, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagText, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseLink, CaseLinkResponse, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, CheckYourAnswersComponent, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, ESQueryType, Embedded, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LinkCaseReason, LinkCasesComponent, LinkCasesFromReasonValuePipe, LinkCasesReasonValuePipe, LinkDetails, LinkFromReason, LinkReason, LinkedCasesErrorMessages, LinkedCasesEventTriggers, LinkedCasesFromTableComponent, LinkedCasesPages, LinkedCasesResponse, LinkedCasesToTableComponent, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, MarkdownComponent, MoneyGbpInputComponent, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoLinkedCasesComponent, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, Patterns, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicMultiSelectListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadLinkedCasesFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadTextAreaFieldComponent, ReadTextFieldComponent, ReadYesNoFieldComponent, RefdataCaseFlagType, RemoveDialogComponent, RequestOptionsBuilder, RouterHelperService, SaveOrDiscardDialogComponent, SearchFiltersComponent, SearchFiltersModule, SearchFiltersWrapperComponent, SearchInput, SearchLanguageInterpreterComponent, SearchLanguageInterpreterErrorMessage, SearchLanguageInterpreterStep, SearchResultComponent, SearchResultModule, SearchResultView, SearchResultViewColumn, SearchResultViewItem, SearchResultViewItemComparatorFactory, SearchService, SelectFlagErrorMessage, SelectFlagLocationComponent, SelectFlagLocationErrorMessage, SelectFlagTypeComponent, SelectFlagTypeErrorMessage, SessionStorageService, ShowCondition, SortOrder$1 as SortOrder, SortParameters, SortSearchResultPipe, TabComponent, TableColumnConfig, TableConfig, TabsComponent, TabsModule, TaskAssignedComponent, TaskCancelledComponent, TaskConflictComponent, TaskUnassignedComponent, Terms, TestRouteSnapshotBuilder, UnLinkCasesComponent, UnsupportedFieldComponent, UpdateFlagComponent, UpdateFlagErrorMessage, UpdateFlagStep, WaysToPayFieldComponent, WindowService, Wizard, WizardFactoryService, WizardPage, WizardPageField, WorkAllocationService, WorkbasketFiltersComponent, WorkbasketFiltersModule, WorkbasketInput, WorkbasketInputFilterService, WorkbasketInputModel, WriteAddressFieldComponent, WriteCaseFlagFieldComponent, WriteCaseLinkFieldComponent, WriteCollectionFieldComponent, WriteComplexFieldComponent, WriteDateContainerFieldComponent, WriteDateFieldComponent, WriteDocumentFieldComponent, WriteDynamicListFieldComponent, WriteDynamicMultiSelectListFieldComponent, WriteDynamicRadioListFieldComponent, WriteEmailFieldComponent, WriteFixedListFieldComponent, WriteFixedRadioListFieldComponent, WriteJudicialUserFieldComponent, WriteLinkedCasesFieldComponent, WriteMoneyGbpFieldComponent, WriteMultiSelectListFieldComponent, WriteNumberFieldComponent, WriteOrderSummaryFieldComponent, WriteOrganisationComplexFieldComponent, WriteOrganisationFieldComponent, WritePhoneUKFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, textFieldType, viewerRouting };
|
|
31383
31341
|
//# sourceMappingURL=hmcts-ccd-case-ui-toolkit.js.map
|