@hmcts/ccd-case-ui-toolkit 7.3.49-exui-3003-3005 → 7.3.49-exui-4526-rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +59 -141
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/index.d.ts +17 -30
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Input, EventEmitter, Output, NgModule, ViewEncapsulation, forwardRef, Pipe, ContentChildren, ViewChildren, DOCUMENT, Injectable, Inject, ChangeDetectorRef, Directive,
|
|
2
|
+
import { Component, Input, EventEmitter, Output, NgModule, ViewEncapsulation, forwardRef, Pipe, ContentChildren, ViewChildren, DOCUMENT, Injectable, Inject, ChangeDetectorRef, Directive, InjectionToken, ViewChild, ChangeDetectionStrategy, Injector, ViewContainerRef, SecurityContext, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
3
|
import * as i5 from '@angular/common';
|
|
4
4
|
import { CommonModule, AsyncPipe, CurrencyPipe, formatDate } from '@angular/common';
|
|
5
5
|
import * as i1 from 'rpx-xui-translation';
|
|
@@ -3320,7 +3320,6 @@ class CaseField {
|
|
|
3320
3320
|
acls;
|
|
3321
3321
|
metadata;
|
|
3322
3322
|
formatted_value;
|
|
3323
|
-
hmctsServiceId;
|
|
3324
3323
|
retain_hidden_value;
|
|
3325
3324
|
wizardProps;
|
|
3326
3325
|
_value;
|
|
@@ -3717,7 +3716,6 @@ class CaseView {
|
|
|
3717
3716
|
events;
|
|
3718
3717
|
metadataFields;
|
|
3719
3718
|
basicFields;
|
|
3720
|
-
hmctsServiceId;
|
|
3721
3719
|
case_flag;
|
|
3722
3720
|
}
|
|
3723
3721
|
__decorate([
|
|
@@ -5469,6 +5467,10 @@ class ConditionalShowFormDirective {
|
|
|
5469
5467
|
}
|
|
5470
5468
|
buildPath(c, field) {
|
|
5471
5469
|
if (c && c instanceof AbstractFieldWriteComponent) {
|
|
5470
|
+
const parentPrefix = c.parent?.['component']?.idPrefix;
|
|
5471
|
+
if (parentPrefix) {
|
|
5472
|
+
return parentPrefix + field.id;
|
|
5473
|
+
}
|
|
5472
5474
|
if (c.idPrefix) {
|
|
5473
5475
|
return c.idPrefix + field.id;
|
|
5474
5476
|
}
|
|
@@ -8869,22 +8871,19 @@ class CaseworkerService {
|
|
|
8869
8871
|
|
|
8870
8872
|
class CaseNotifier {
|
|
8871
8873
|
casesService;
|
|
8872
|
-
caseFlagRefdataService;
|
|
8873
8874
|
static CASE_NAME = 'caseNameHmctsInternal';
|
|
8874
8875
|
static CASE_LOCATION = 'caseManagementLocation';
|
|
8875
8876
|
caseViewSource = new BehaviorSubject(new CaseView());
|
|
8876
|
-
hmctsServiceIdByCaseType = new Map();
|
|
8877
8877
|
caseView = this.caseViewSource.asObservable();
|
|
8878
8878
|
cachedCaseView;
|
|
8879
|
-
constructor(casesService
|
|
8879
|
+
constructor(casesService) {
|
|
8880
8880
|
this.casesService = casesService;
|
|
8881
|
-
this.caseFlagRefdataService = caseFlagRefdataService;
|
|
8882
8881
|
}
|
|
8883
8882
|
removeCachedCase() {
|
|
8884
8883
|
this.cachedCaseView = null;
|
|
8885
8884
|
}
|
|
8886
8885
|
announceCase(c) {
|
|
8887
|
-
this.
|
|
8886
|
+
this.caseViewSource.next(c);
|
|
8888
8887
|
}
|
|
8889
8888
|
fetchAndRefresh(cid) {
|
|
8890
8889
|
return this.casesService
|
|
@@ -8892,10 +8891,8 @@ class CaseNotifier {
|
|
|
8892
8891
|
.pipe(map(caseView => {
|
|
8893
8892
|
this.cachedCaseView = plainToClassFromExist(new CaseView(), caseView);
|
|
8894
8893
|
this.setBasicFields(this.cachedCaseView.tabs);
|
|
8894
|
+
this.announceCase(this.cachedCaseView);
|
|
8895
8895
|
return this.cachedCaseView;
|
|
8896
|
-
}), switchMap(caseView => this.resolveHmctsServiceId(caseView)), map(caseView => {
|
|
8897
|
-
this.announceCase(caseView);
|
|
8898
|
-
return caseView;
|
|
8899
8896
|
}));
|
|
8900
8897
|
}
|
|
8901
8898
|
setBasicFields(tabs) {
|
|
@@ -8910,32 +8907,12 @@ class CaseNotifier {
|
|
|
8910
8907
|
}
|
|
8911
8908
|
});
|
|
8912
8909
|
}
|
|
8913
|
-
|
|
8914
|
-
const caseTypeId = caseView?.case_type?.id;
|
|
8915
|
-
if (!caseTypeId || !this.caseFlagRefdataService) {
|
|
8916
|
-
return of(caseView);
|
|
8917
|
-
}
|
|
8918
|
-
if (this.hmctsServiceIdByCaseType.has(caseTypeId)) {
|
|
8919
|
-
caseView.hmctsServiceId = this.hmctsServiceIdByCaseType.get(caseTypeId);
|
|
8920
|
-
return of(caseView);
|
|
8921
|
-
}
|
|
8922
|
-
return this.caseFlagRefdataService.getHmctsServiceDetailsByCaseType(caseTypeId).pipe(map((serviceDetails) => {
|
|
8923
|
-
const hmctsServiceId = serviceDetails?.find((serviceDetail) => !!serviceDetail.service_code)?.service_code;
|
|
8924
|
-
if (hmctsServiceId) {
|
|
8925
|
-
this.hmctsServiceIdByCaseType.set(caseTypeId, hmctsServiceId);
|
|
8926
|
-
caseView.hmctsServiceId = hmctsServiceId;
|
|
8927
|
-
}
|
|
8928
|
-
return caseView;
|
|
8929
|
-
}), catchError(() => of(caseView)));
|
|
8930
|
-
}
|
|
8931
|
-
static ɵfac = function CaseNotifier_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseNotifier)(i0.ɵɵinject(CasesService), i0.ɵɵinject(CaseFlagRefdataService, 8)); };
|
|
8910
|
+
static ɵfac = function CaseNotifier_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseNotifier)(i0.ɵɵinject(CasesService)); };
|
|
8932
8911
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaseNotifier, factory: CaseNotifier.ɵfac });
|
|
8933
8912
|
}
|
|
8934
8913
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseNotifier, [{
|
|
8935
8914
|
type: Injectable
|
|
8936
|
-
}], () => [{ type: CasesService },
|
|
8937
|
-
type: Optional
|
|
8938
|
-
}] }], null); })();
|
|
8915
|
+
}], () => [{ type: CasesService }], null); })();
|
|
8939
8916
|
|
|
8940
8917
|
var Permissions;
|
|
8941
8918
|
(function (Permissions) {
|
|
@@ -15019,7 +14996,7 @@ function WriteCollectionFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
15019
14996
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
15020
14997
|
i0.ɵɵproperty("hidden", ctx_r0.caseField.hidden);
|
|
15021
14998
|
i0.ɵɵadvance(2);
|
|
15022
|
-
i0.ɵɵproperty("ngForOf", ctx_r0.collItems);
|
|
14999
|
+
i0.ɵɵproperty("ngForOf", ctx_r0.collItems)("ngForTrackBy", ctx_r0.trackByCollectionItem);
|
|
15023
15000
|
} }
|
|
15024
15001
|
function WriteCollectionFieldComponent_button_8_Template(rf, ctx) { if (rf & 1) {
|
|
15025
15002
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
@@ -15045,6 +15022,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
15045
15022
|
profileSubscription;
|
|
15046
15023
|
items;
|
|
15047
15024
|
collItems = [];
|
|
15025
|
+
collectionItemUidCounter = 0;
|
|
15048
15026
|
constructor(dialog, scrollToService, profileNotifier, cdRef) {
|
|
15049
15027
|
super();
|
|
15050
15028
|
this.dialog = dialog;
|
|
@@ -15067,7 +15045,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
15067
15045
|
if (this.collItems.length <= index) {
|
|
15068
15046
|
this.collItems.length = index + 1;
|
|
15069
15047
|
}
|
|
15070
|
-
this.collItems[index] = { caseField, item, prefix, index, container };
|
|
15048
|
+
this.collItems[index] = { uid: this.createCollectionItemUid(), caseField, item, prefix, index, container };
|
|
15071
15049
|
});
|
|
15072
15050
|
}
|
|
15073
15051
|
ngOnDestroy() {
|
|
@@ -15176,7 +15154,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
15176
15154
|
const caseField = this.buildCaseField(item, index, true);
|
|
15177
15155
|
const prefix = this.buildIdPrefix(index);
|
|
15178
15156
|
const container = this.getContainer(index);
|
|
15179
|
-
this.collItems.push({ caseField, item, index, prefix, container });
|
|
15157
|
+
this.collItems.push({ uid: this.createCollectionItemUid(), caseField, item, index, prefix, container });
|
|
15180
15158
|
// Update DOM required after pushing a new item to do the next steps (i.e. scrolling and focusing)
|
|
15181
15159
|
this.cdRef.detectChanges();
|
|
15182
15160
|
if (doScroll) {
|
|
@@ -15235,6 +15213,12 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
15235
15213
|
this.caseField.value.splice(index, 1);
|
|
15236
15214
|
this.formArray.removeAt(index);
|
|
15237
15215
|
}
|
|
15216
|
+
trackByCollectionItem(_, item) {
|
|
15217
|
+
return item.uid;
|
|
15218
|
+
}
|
|
15219
|
+
createCollectionItemUid() {
|
|
15220
|
+
return `collection-item-${this.collectionItemUidCounter++}`;
|
|
15221
|
+
}
|
|
15238
15222
|
resetIds(index) {
|
|
15239
15223
|
for (let i = index; i < this.collItems.length; i++) {
|
|
15240
15224
|
const counter = i + 1;
|
|
@@ -15341,7 +15325,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
15341
15325
|
} if (rf & 2) {
|
|
15342
15326
|
let _t;
|
|
15343
15327
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.items = _t);
|
|
15344
|
-
} }, inputs: { caseFields: "caseFields" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 9, consts: [["collectionItem", ""], [1, "form-group", 3, "id"], [1, "panel", "collection-indicator"], ["class", "heading-h2 error-spacing", 4, "ngIf"], ["type", "button", 1, "button", "write-collection-add-item__top", 3, "click", "disabled"], ["class", "form-group", 3, "hidden", 4, "ngIf"], ["class", "button write-collection-add-item__bottom", "type", "button", 3, "disabled", "click", 4, "ngIf"], [1, "heading-h2", "error-spacing"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-hint"], [3, "content"], [1, "error-message"], [1, "form-group", 3, "hidden"], [1, "govuk-fieldset"], ["class", "form-group", 3, "id", 4, "ngFor", "ngForOf"], [1, "collection-title"], [1, "float-left"], [1, "govuk-fieldset__legend"], [3, "for"], [1, "heading-h3"], [1, "float-right"], ["type", "button", 1, "button", "button-secondary", 3, "click", "disabled"], [3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock"], ["type", "button", 1, "button", "write-collection-add-item__bottom", 3, "click", "disabled"]], template: function WriteCollectionFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
15328
|
+
} }, inputs: { caseFields: "caseFields" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 9, consts: [["collectionItem", ""], [1, "form-group", 3, "id"], [1, "panel", "collection-indicator"], ["class", "heading-h2 error-spacing", 4, "ngIf"], ["type", "button", 1, "button", "write-collection-add-item__top", 3, "click", "disabled"], ["class", "form-group", 3, "hidden", 4, "ngIf"], ["class", "button write-collection-add-item__bottom", "type", "button", 3, "disabled", "click", 4, "ngIf"], [1, "heading-h2", "error-spacing"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-hint"], [3, "content"], [1, "error-message"], [1, "form-group", 3, "hidden"], [1, "govuk-fieldset"], ["class", "form-group", 3, "id", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "collection-title"], [1, "float-left"], [1, "govuk-fieldset__legend"], [3, "for"], [1, "heading-h3"], [1, "float-right"], ["type", "button", 1, "button", "button-secondary", 3, "click", "disabled"], [3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock"], ["type", "button", 1, "button", "write-collection-add-item__bottom", 3, "click", "disabled"]], template: function WriteCollectionFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
15345
15329
|
i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
|
|
15346
15330
|
i0.ɵɵtemplate(2, WriteCollectionFieldComponent_h2_2_Template, 3, 3, "h2", 3);
|
|
15347
15331
|
i0.ɵɵelementStart(3, "button", 4);
|
|
@@ -15349,7 +15333,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
15349
15333
|
i0.ɵɵtext(4);
|
|
15350
15334
|
i0.ɵɵpipe(5, "rpxTranslate");
|
|
15351
15335
|
i0.ɵɵelementEnd();
|
|
15352
|
-
i0.ɵɵtemplate(6, WriteCollectionFieldComponent_h2_6_Template, 3, 2, "h2", 3)(7, WriteCollectionFieldComponent_div_7_Template, 3,
|
|
15336
|
+
i0.ɵɵtemplate(6, WriteCollectionFieldComponent_h2_6_Template, 3, 2, "h2", 3)(7, WriteCollectionFieldComponent_div_7_Template, 3, 3, "div", 5)(8, WriteCollectionFieldComponent_button_8_Template, 3, 4, "button", 6);
|
|
15353
15337
|
i0.ɵɵelementEnd()();
|
|
15354
15338
|
} if (rf & 2) {
|
|
15355
15339
|
i0.ɵɵproperty("id", ctx.id());
|
|
@@ -15369,14 +15353,14 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
15369
15353
|
}
|
|
15370
15354
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCollectionFieldComponent, [{
|
|
15371
15355
|
type: Component,
|
|
15372
|
-
args: [{ selector: 'ccd-write-collection-field', standalone: false, template: "<div class=\"form-group\" [id]=\"id()\">\n\n <div class=\"panel collection-indicator\">\n\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"!caseField.hidden\">\n {{(caseField | ccdFieldLabel)}}\n </h2>\n <button class=\"button write-collection-add-item__top\" type=\"button\" (click)=\"addItem(true)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\">{{'Add new' | rpxTranslate}}</button>\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"caseField.hint_text || formArray.errors\">\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">\n <ccd-markdown [content]=\"caseField.hint_text | rpxTranslate\"></ccd-markdown>\n </span>\n <span *ngIf=\"formArray.errors\" class=\"error-message\">\n {{(formArray.errors | ccdFirstError:caseField.label)}}\n </span>\n </h2>\n\n <div class=\"form-group\" [hidden]=\"caseField.hidden\" *ngIf=\"caseField.value && caseField.value.length\">\n <fieldset class=\"govuk-fieldset\">\n <div *ngFor=\"let item of collItems; let i = index\" #collectionItem\n [id]=\"this.buildIdPrefix(i) + i\" class=\"form-group\">\n <div class=\"collection-title\">\n <div class=\"float-left\">\n <legend class=\"govuk-fieldset__legend\">\n <label [for]=\"item.prefix + i\"><h3 class=\"heading-h3\">{{itemLabel(i) | rpxTranslate}}</h3></label>\n </legend>\n </div>\n <div class=\"float-right\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"openModal(i)\"\n [disabled]=\"isNotAuthorisedToDelete(i)\"\n attr.aria-label=\"Remove {{ itemLabel(i) }}\">{{'Remove' | rpxTranslate}}</button>\n </div>\n </div>\n <ccd-field-write [caseField]=\"item.caseField\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [parent]=\"item.container\"\n [idPrefix]=\"item.prefix\"\n [hidden]=\"item.caseField.hidden\"\n [isExpanded]=\"isExpanded\"\n [isInSearchBlock]=\"isInSearchBlock\">\n </ccd-field-write>\n </div>\n </fieldset>\n </div>\n\n <button class=\"button write-collection-add-item__bottom\" type=\"button\" (click)=\"addItem(false)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\" *ngIf=\"caseField.value && caseField.value.length\">{{'Add new' | rpxTranslate }}</button>\n\n </div>\n\n</div>\n", styles: [".collection-field-table tr:first-child>td{padding-top:0}.collection-field-table tr:last-child>td{border-bottom:none}.collection-field-table td.collection-actions{width:1px;white-space:nowrap}.error-spacing{margin-top:10px}.collection-title{height:51px}.float-left{float:left;padding-top:8px}.float-right{float:right}.complex-panel{margin:13px 0;border:1px solid #bfc1c3}.complex-panel .complex-panel-title{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media(min-width:641px){.complex-panel .complex-panel-title{font-size:19px;line-height:1.3157894737}}.complex-panel .complex-panel-table>tbody>tr>th{vertical-align:top}.complex-panel .complex-panel-table>tbody>tr:last-child>th,.complex-panel .complex-panel-table>tbody>tr:last-child>td{border-bottom:none}.complex-panel .complex-panel-simple-field th{padding-left:5px;width:295px}.complex-panel .complex-panel-compound-field td{padding:5px}.collection-indicator{border-left:solid 5px #b1b4b6}\n"] }]
|
|
15356
|
+
args: [{ selector: 'ccd-write-collection-field', standalone: false, template: "<div class=\"form-group\" [id]=\"id()\">\n\n <div class=\"panel collection-indicator\">\n\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"!caseField.hidden\">\n {{(caseField | ccdFieldLabel)}}\n </h2>\n <button class=\"button write-collection-add-item__top\" type=\"button\" (click)=\"addItem(true)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\">{{'Add new' | rpxTranslate}}</button>\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"caseField.hint_text || formArray.errors\">\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">\n <ccd-markdown [content]=\"caseField.hint_text | rpxTranslate\"></ccd-markdown>\n </span>\n <span *ngIf=\"formArray.errors\" class=\"error-message\">\n {{(formArray.errors | ccdFirstError:caseField.label)}}\n </span>\n </h2>\n\n <div class=\"form-group\" [hidden]=\"caseField.hidden\" *ngIf=\"caseField.value && caseField.value.length\">\n <fieldset class=\"govuk-fieldset\">\n <div *ngFor=\"let item of collItems; let i = index; trackBy: trackByCollectionItem\" #collectionItem\n [id]=\"this.buildIdPrefix(i) + i\" class=\"form-group\">\n <div class=\"collection-title\">\n <div class=\"float-left\">\n <legend class=\"govuk-fieldset__legend\">\n <label [for]=\"item.prefix + i\"><h3 class=\"heading-h3\">{{itemLabel(i) | rpxTranslate}}</h3></label>\n </legend>\n </div>\n <div class=\"float-right\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"openModal(i)\"\n [disabled]=\"isNotAuthorisedToDelete(i)\"\n attr.aria-label=\"Remove {{ itemLabel(i) }}\">{{'Remove' | rpxTranslate}}</button>\n </div>\n </div>\n <ccd-field-write [caseField]=\"item.caseField\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [parent]=\"item.container\"\n [idPrefix]=\"item.prefix\"\n [hidden]=\"item.caseField.hidden\"\n [isExpanded]=\"isExpanded\"\n [isInSearchBlock]=\"isInSearchBlock\">\n </ccd-field-write>\n </div>\n </fieldset>\n </div>\n\n <button class=\"button write-collection-add-item__bottom\" type=\"button\" (click)=\"addItem(false)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\" *ngIf=\"caseField.value && caseField.value.length\">{{'Add new' | rpxTranslate }}</button>\n\n </div>\n\n</div>\n", styles: [".collection-field-table tr:first-child>td{padding-top:0}.collection-field-table tr:last-child>td{border-bottom:none}.collection-field-table td.collection-actions{width:1px;white-space:nowrap}.error-spacing{margin-top:10px}.collection-title{height:51px}.float-left{float:left;padding-top:8px}.float-right{float:right}.complex-panel{margin:13px 0;border:1px solid #bfc1c3}.complex-panel .complex-panel-title{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media(min-width:641px){.complex-panel .complex-panel-title{font-size:19px;line-height:1.3157894737}}.complex-panel .complex-panel-table>tbody>tr>th{vertical-align:top}.complex-panel .complex-panel-table>tbody>tr:last-child>th,.complex-panel .complex-panel-table>tbody>tr:last-child>td{border-bottom:none}.complex-panel .complex-panel-simple-field th{padding-left:5px;width:295px}.complex-panel .complex-panel-compound-field td{padding:5px}.collection-indicator{border-left:solid 5px #b1b4b6}\n"] }]
|
|
15373
15357
|
}], () => [{ type: i1$3.MatLegacyDialog }, { type: i2.ScrollToService }, { type: ProfileNotifier }, { type: i0.ChangeDetectorRef }], { caseFields: [{
|
|
15374
15358
|
type: Input
|
|
15375
15359
|
}], items: [{
|
|
15376
15360
|
type: ViewChildren,
|
|
15377
15361
|
args: ['collectionItem']
|
|
15378
15362
|
}] }); })();
|
|
15379
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteCollectionFieldComponent, { className: "WriteCollectionFieldComponent", filePath: "lib/shared/components/palette/collection/write-collection-field.component.ts", lineNumber:
|
|
15363
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteCollectionFieldComponent, { className: "WriteCollectionFieldComponent", filePath: "lib/shared/components/palette/collection/write-collection-field.component.ts", lineNumber: 33 }); })();
|
|
15380
15364
|
|
|
15381
15365
|
function ReadComplexFieldComponent_ccd_read_complex_field_raw_1_Template(rf, ctx) { if (rf & 1) {
|
|
15382
15366
|
i0.ɵɵelement(0, "ccd-read-complex-field-raw", 4);
|
|
@@ -15449,39 +15433,8 @@ class ReadComplexFieldComponent extends AbstractFieldReadComponent {
|
|
|
15449
15433
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadComplexFieldComponent, { className: "ReadComplexFieldComponent", filePath: "lib/shared/components/palette/complex/read-complex-field.component.ts", lineNumber: 11 }); })();
|
|
15450
15434
|
|
|
15451
15435
|
class ReadDateFieldComponent extends AbstractFieldReadComponent {
|
|
15452
|
-
|
|
15453
|
-
static
|
|
15454
|
-
caseSubscription;
|
|
15455
|
-
caseHmctsServiceId;
|
|
15456
|
-
constructor(caseNotifier) {
|
|
15457
|
-
super();
|
|
15458
|
-
this.caseNotifier = caseNotifier;
|
|
15459
|
-
}
|
|
15460
|
-
ngOnInit() {
|
|
15461
|
-
super.ngOnInit();
|
|
15462
|
-
this.caseSubscription = this.caseNotifier?.caseView.subscribe((caseDetails) => {
|
|
15463
|
-
this.caseHmctsServiceId = caseDetails?.hmctsServiceId;
|
|
15464
|
-
});
|
|
15465
|
-
}
|
|
15466
|
-
ngOnDestroy() {
|
|
15467
|
-
if (this.caseSubscription) {
|
|
15468
|
-
this.caseSubscription.unsubscribe();
|
|
15469
|
-
}
|
|
15470
|
-
}
|
|
15471
|
-
// Most services display DateTime values as received from CCD; only the services listed in SERVICES_RENDERED_IN_LOCAL_TIME need converting to local time.
|
|
15472
|
-
get timeZone() {
|
|
15473
|
-
return this.shouldRenderInLocalTime() ? 'local' : 'utc';
|
|
15474
|
-
}
|
|
15475
|
-
shouldRenderInLocalTime() {
|
|
15476
|
-
return ReadDateFieldComponent.SERVICES_RENDERED_IN_LOCAL_TIME.includes(this.getHmctsServiceId());
|
|
15477
|
-
}
|
|
15478
|
-
getHmctsServiceId() {
|
|
15479
|
-
if (typeof this.caseField?.hmctsServiceId === 'string') {
|
|
15480
|
-
return this.caseField.hmctsServiceId;
|
|
15481
|
-
}
|
|
15482
|
-
return this.caseHmctsServiceId;
|
|
15483
|
-
}
|
|
15484
|
-
static ɵfac = function ReadDateFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadDateFieldComponent)(i0.ɵɵdirectiveInject(CaseNotifier, 8)); };
|
|
15436
|
+
timeZone = 'utc';
|
|
15437
|
+
static ɵfac = /*@__PURE__*/ (() => { let ɵReadDateFieldComponent_BaseFactory; return function ReadDateFieldComponent_Factory(__ngFactoryType__) { return (ɵReadDateFieldComponent_BaseFactory || (ɵReadDateFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadDateFieldComponent)))(__ngFactoryType__ || ReadDateFieldComponent); }; })();
|
|
15485
15438
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadDateFieldComponent, selectors: [["ccd-read-date-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 5, consts: [[1, "text-16"]], template: function ReadDateFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
15486
15439
|
i0.ɵɵelementStart(0, "span", 0);
|
|
15487
15440
|
i0.ɵɵtext(1);
|
|
@@ -15489,20 +15442,18 @@ class ReadDateFieldComponent extends AbstractFieldReadComponent {
|
|
|
15489
15442
|
i0.ɵɵelementEnd();
|
|
15490
15443
|
} if (rf & 2) {
|
|
15491
15444
|
i0.ɵɵadvance();
|
|
15492
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind3(2, 1, ctx.caseField.value,
|
|
15445
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind3(2, 1, ctx.caseField.value, "utc", ctx.caseField.dateTimeDisplayFormat));
|
|
15493
15446
|
} }, dependencies: [DatePipe], encapsulation: 2 });
|
|
15494
15447
|
}
|
|
15495
15448
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadDateFieldComponent, [{
|
|
15496
15449
|
type: Component,
|
|
15497
15450
|
args: [{
|
|
15498
15451
|
selector: 'ccd-read-date-field',
|
|
15499
|
-
template: `<span class="text-16">{{caseField.value | ccdDate:
|
|
15452
|
+
template: `<span class="text-16">{{caseField.value | ccdDate:'utc':caseField.dateTimeDisplayFormat}}</span>`,
|
|
15500
15453
|
standalone: false
|
|
15501
15454
|
}]
|
|
15502
|
-
}],
|
|
15503
|
-
|
|
15504
|
-
}] }], null); })();
|
|
15505
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadDateFieldComponent, { className: "ReadDateFieldComponent", filePath: "lib/shared/components/palette/date/read-date-field.component.ts", lineNumber: 12 }); })();
|
|
15455
|
+
}], null, null); })();
|
|
15456
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadDateFieldComponent, { className: "ReadDateFieldComponent", filePath: "lib/shared/components/palette/date/read-date-field.component.ts", lineNumber: 9 }); })();
|
|
15506
15457
|
|
|
15507
15458
|
function WriteDateContainerFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
15508
15459
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -25035,6 +24986,7 @@ class FieldWriteComponent extends AbstractFieldWriteComponent {
|
|
|
25035
24986
|
canHaveGreyBar = false;
|
|
25036
24987
|
caseFields = [];
|
|
25037
24988
|
fieldContainer;
|
|
24989
|
+
componentRef;
|
|
25038
24990
|
constructor(resolver, paletteService) {
|
|
25039
24991
|
super();
|
|
25040
24992
|
this.resolver = resolver;
|
|
@@ -25046,7 +24998,7 @@ class FieldWriteComponent extends AbstractFieldWriteComponent {
|
|
|
25046
24998
|
ngOnInit() {
|
|
25047
24999
|
const componentClass = this.paletteService.getFieldComponentClass(this.caseField, true);
|
|
25048
25000
|
const injector = Injector.create([], this.fieldContainer.parentInjector);
|
|
25049
|
-
|
|
25001
|
+
this.componentRef = this.resolver.resolveComponentFactory(componentClass).create(injector);
|
|
25050
25002
|
// Only Fixed list use plainToClassFromExist
|
|
25051
25003
|
// Better performance
|
|
25052
25004
|
// TODO AW 30/12/20 figure out why FixedLists need plainToClassFromExist
|
|
@@ -25055,28 +25007,41 @@ class FieldWriteComponent extends AbstractFieldWriteComponent {
|
|
|
25055
25007
|
if (FIX_CASEFIELD_FOR.indexOf(this.caseField.field_type.type) > -1 && !(this.caseField instanceof CaseField)) {
|
|
25056
25008
|
this.caseField = plainToClassFromExist(new CaseField(), this.caseField);
|
|
25057
25009
|
}
|
|
25058
|
-
|
|
25059
|
-
component.instance['caseFields'] = this.caseFields;
|
|
25060
|
-
component.instance['formGroup'] = this.formGroup;
|
|
25061
|
-
component.instance['parent'] = this.parent;
|
|
25062
|
-
component.instance['idPrefix'] = this.idPrefix;
|
|
25010
|
+
this.applyInputsToChild();
|
|
25063
25011
|
if (this.caseField.field_type.id === 'AddressGlobal') {
|
|
25064
|
-
|
|
25012
|
+
this.componentRef.instance['ignoreMandatory'] = true;
|
|
25065
25013
|
}
|
|
25066
|
-
|
|
25067
|
-
component.instance['isInSearchBlock'] = this.isInSearchBlock;
|
|
25068
|
-
this.fieldContainer.insert(component.hostView);
|
|
25014
|
+
this.fieldContainer.insert(this.componentRef.hostView);
|
|
25069
25015
|
// EUI-3267.
|
|
25070
25016
|
// Set up the flag for whether this can have a grey bar.
|
|
25071
25017
|
this.canHaveGreyBar = this.caseField.show_condition && this.caseField.field_type.type !== 'Collection';
|
|
25072
25018
|
}
|
|
25019
|
+
ngOnChanges(changes) {
|
|
25020
|
+
if (this.componentRef && (changes.caseField || changes.caseFields || changes.formGroup || changes.parent || changes.idPrefix
|
|
25021
|
+
|| changes.isExpanded || changes.isInSearchBlock)) {
|
|
25022
|
+
this.applyInputsToChild();
|
|
25023
|
+
this.componentRef.changeDetectorRef.detectChanges();
|
|
25024
|
+
}
|
|
25025
|
+
}
|
|
25026
|
+
applyInputsToChild() {
|
|
25027
|
+
if (!this.componentRef) {
|
|
25028
|
+
return;
|
|
25029
|
+
}
|
|
25030
|
+
this.componentRef.instance['caseField'] = this.caseField;
|
|
25031
|
+
this.componentRef.instance['caseFields'] = this.caseFields;
|
|
25032
|
+
this.componentRef.instance['formGroup'] = this.formGroup;
|
|
25033
|
+
this.componentRef.instance['parent'] = this.parent;
|
|
25034
|
+
this.componentRef.instance['idPrefix'] = this.idPrefix;
|
|
25035
|
+
this.componentRef.instance['isExpanded'] = this.isExpanded;
|
|
25036
|
+
this.componentRef.instance['isInSearchBlock'] = this.isInSearchBlock;
|
|
25037
|
+
}
|
|
25073
25038
|
static ɵfac = function FieldWriteComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FieldWriteComponent)(i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(PaletteService)); };
|
|
25074
25039
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FieldWriteComponent, selectors: [["ccd-field-write"]], viewQuery: function FieldWriteComponent_Query(rf, ctx) { if (rf & 1) {
|
|
25075
25040
|
i0.ɵɵviewQuery(_c0$y, 7, ViewContainerRef);
|
|
25076
25041
|
} if (rf & 2) {
|
|
25077
25042
|
let _t;
|
|
25078
25043
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fieldContainer = _t.first);
|
|
25079
|
-
} }, inputs: { caseFields: "caseFields" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 3, consts: [["fieldContainer", ""], [3, "hidden"]], template: function FieldWriteComponent_Template(rf, ctx) { if (rf & 1) {
|
|
25044
|
+
} }, inputs: { caseFields: "caseFields" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 3, vars: 3, consts: [["fieldContainer", ""], [3, "hidden"]], template: function FieldWriteComponent_Template(rf, ctx) { if (rf & 1) {
|
|
25080
25045
|
i0.ɵɵelementStart(0, "div", 1);
|
|
25081
25046
|
i0.ɵɵelementContainer(1, null, 0);
|
|
25082
25047
|
i0.ɵɵelementEnd();
|
|
@@ -40805,7 +40770,6 @@ class SearchResultComponent {
|
|
|
40805
40770
|
placeholderService;
|
|
40806
40771
|
browserService;
|
|
40807
40772
|
sessionStorageService;
|
|
40808
|
-
caseFlagRefdataService;
|
|
40809
40773
|
static PARAM_JURISDICTION = 'jurisdiction';
|
|
40810
40774
|
static PARAM_CASE_TYPE = 'case-type';
|
|
40811
40775
|
static PARAM_CASE_STATE = 'case-state';
|
|
@@ -40837,15 +40801,12 @@ class SearchResultComponent {
|
|
|
40837
40801
|
draftsCount;
|
|
40838
40802
|
consumerSortParameters = { column: null, order: null, type: null };
|
|
40839
40803
|
selectedCases = [];
|
|
40840
|
-
|
|
40841
|
-
pendingHmctsServiceIdCaseTypes = new Set();
|
|
40842
|
-
constructor(searchResultViewItemComparatorFactory, appConfig, activityService, caseReferencePipe, placeholderService, browserService, sessionStorageService, caseFlagRefdataService) {
|
|
40804
|
+
constructor(searchResultViewItemComparatorFactory, appConfig, activityService, caseReferencePipe, placeholderService, browserService, sessionStorageService) {
|
|
40843
40805
|
this.activityService = activityService;
|
|
40844
40806
|
this.caseReferencePipe = caseReferencePipe;
|
|
40845
40807
|
this.placeholderService = placeholderService;
|
|
40846
40808
|
this.browserService = browserService;
|
|
40847
40809
|
this.sessionStorageService = sessionStorageService;
|
|
40848
|
-
this.caseFlagRefdataService = caseFlagRefdataService;
|
|
40849
40810
|
this.searchResultViewItemComparatorFactory = searchResultViewItemComparatorFactory;
|
|
40850
40811
|
this.paginationPageSize = appConfig.getPaginationPageSize();
|
|
40851
40812
|
this.hideRows = false;
|
|
@@ -40875,7 +40836,6 @@ class SearchResultComponent {
|
|
|
40875
40836
|
return a.order - b.order;
|
|
40876
40837
|
});
|
|
40877
40838
|
this.hydrateResultView();
|
|
40878
|
-
this.resolveHmctsServiceIdsForResults();
|
|
40879
40839
|
this.draftsCount = this.draftsCount ? this.draftsCount : this.numberOfDrafts();
|
|
40880
40840
|
}
|
|
40881
40841
|
if (changes['page']) {
|
|
@@ -41023,48 +40983,8 @@ class SearchResultComponent {
|
|
|
41023
40983
|
value: result.case_fields[col.case_field_id],
|
|
41024
40984
|
display_context_parameter: col.display_context_parameter,
|
|
41025
40985
|
display_context: col.display_context,
|
|
41026
|
-
hmctsServiceId: this.hmctsServiceIdByCaseType.get(this.getCaseTypeId(result)) || ''
|
|
41027
40986
|
});
|
|
41028
40987
|
}
|
|
41029
|
-
resolveHmctsServiceIdsForResults() {
|
|
41030
|
-
this.resultView.results.forEach((result) => {
|
|
41031
|
-
const caseTypeId = this.getCaseTypeId(result);
|
|
41032
|
-
if (!caseTypeId || !this.caseFlagRefdataService) {
|
|
41033
|
-
return;
|
|
41034
|
-
}
|
|
41035
|
-
if (this.hmctsServiceIdByCaseType.has(caseTypeId)) {
|
|
41036
|
-
this.applyHmctsServiceIdToResultFields(caseTypeId, this.hmctsServiceIdByCaseType.get(caseTypeId));
|
|
41037
|
-
return;
|
|
41038
|
-
}
|
|
41039
|
-
if (this.pendingHmctsServiceIdCaseTypes.has(caseTypeId)) {
|
|
41040
|
-
return;
|
|
41041
|
-
}
|
|
41042
|
-
this.pendingHmctsServiceIdCaseTypes.add(caseTypeId);
|
|
41043
|
-
this.caseFlagRefdataService.getHmctsServiceDetailsByCaseType(caseTypeId).subscribe({
|
|
41044
|
-
next: (serviceDetails) => {
|
|
41045
|
-
const hmctsServiceId = serviceDetails?.find((serviceDetail) => !!serviceDetail.service_code)?.service_code;
|
|
41046
|
-
if (hmctsServiceId) {
|
|
41047
|
-
this.hmctsServiceIdByCaseType.set(caseTypeId, hmctsServiceId);
|
|
41048
|
-
this.applyHmctsServiceIdToResultFields(caseTypeId, hmctsServiceId);
|
|
41049
|
-
}
|
|
41050
|
-
},
|
|
41051
|
-
error: () => this.pendingHmctsServiceIdCaseTypes.delete(caseTypeId),
|
|
41052
|
-
complete: () => this.pendingHmctsServiceIdCaseTypes.delete(caseTypeId)
|
|
41053
|
-
});
|
|
41054
|
-
});
|
|
41055
|
-
}
|
|
41056
|
-
applyHmctsServiceIdToResultFields(caseTypeId, hmctsServiceId) {
|
|
41057
|
-
this.resultView.results
|
|
41058
|
-
.filter((result) => this.getCaseTypeId(result) === caseTypeId)
|
|
41059
|
-
.forEach((result) => {
|
|
41060
|
-
Object.keys(result.columns || {}).forEach((columnId) => {
|
|
41061
|
-
result.columns[columnId].hmctsServiceId = hmctsServiceId;
|
|
41062
|
-
});
|
|
41063
|
-
});
|
|
41064
|
-
}
|
|
41065
|
-
getCaseTypeId(result) {
|
|
41066
|
-
return result?.case_fields?.['[CASE_TYPE]'] || this.caseType?.id;
|
|
41067
|
-
}
|
|
41068
40988
|
getColumnsWithPrefix(col, result) {
|
|
41069
40989
|
col.value = this.draftPrefixOrGet(col, result);
|
|
41070
40990
|
col.value = this.placeholderService.resolvePlaceholders(result.case_fields, col.value);
|
|
@@ -41187,7 +41107,7 @@ class SearchResultComponent {
|
|
|
41187
41107
|
}
|
|
41188
41108
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
41189
41109
|
noop() { }
|
|
41190
|
-
static ɵfac = function SearchResultComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchResultComponent)(i0.ɵɵdirectiveInject(SearchResultViewItemComparatorFactory), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(ActivityService), i0.ɵɵdirectiveInject(CaseReferencePipe), i0.ɵɵdirectiveInject(PlaceholderService), i0.ɵɵdirectiveInject(BrowserService), i0.ɵɵdirectiveInject(SessionStorageService)
|
|
41110
|
+
static ɵfac = function SearchResultComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchResultComponent)(i0.ɵɵdirectiveInject(SearchResultViewItemComparatorFactory), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(ActivityService), i0.ɵɵdirectiveInject(CaseReferencePipe), i0.ɵɵdirectiveInject(PlaceholderService), i0.ɵɵdirectiveInject(BrowserService), i0.ɵɵdirectiveInject(SessionStorageService)); };
|
|
41191
41111
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchResultComponent, selectors: [["ccd-search-result"]], inputs: { caseLinkUrlTemplate: "caseLinkUrlTemplate", jurisdiction: "jurisdiction", caseType: "caseType", caseState: "caseState", caseFilterFG: "caseFilterFG", resultView: "resultView", page: "page", paginationMetadata: "paginationMetadata", metadataFields: "metadataFields", selectionEnabled: "selectionEnabled", showOnlySelected: "showOnlySelected", preSelectedCases: "preSelectedCases", consumerSortingEnabled: "consumerSortingEnabled" }, outputs: { selection: "selection", changePage: "changePage", clickCase: "clickCase", sortHandler: "sortHandler" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 3, consts: [["case_reference", ""], [4, "ngIf"], [3, "visibilityLabel", "autoHide", "maxSize", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel", "pageChange", 4, "ngIf"], ["class", "notification", 4, "ngIf"], ["id", "search-result-heading__text", "tabindex", "-1", 1, "heading-h2"], ["class", "govuk-warning-text pagination-limit-warning", 4, "ngIf"], ["class", "pagination-top", 4, "ngIf"], ["class", "reset-selection", 4, "ngIf"], ["scope", "row"], ["class", "govuk-table__checkbox", 4, "ngIf"], ["class", "search-result-column-header", "scope", "col", 4, "ngFor", "ngForOf"], ["style", "width: 110px;", "scope", "col", 4, "ngIf"], [1, "govuk-warning-text", "pagination-limit-warning"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-warning-text__assistive"], [1, "pagination-top"], ["id", "search-result-summary__text", 1, "text-16"], [1, "govuk-!-font-weight-bold"], [1, "reset-selection"], ["href", "#", 1, "search-result-reset-link", 3, "click"], [1, "govuk-table__checkbox"], [1, "govuk-checkboxes__item"], ["id", "select-all", "name", "select-all", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "checked", "disabled"], ["for", "select-all", 1, "govuk-label", "govuk-checkboxes__label"], ["scope", "col", 1, "search-result-column-header"], [1, "search-result-column-label", 3, "click", "keyup"], ["class", "search-result-column-sort", 4, "ngIf"], [1, "search-result-column-sort"], ["href", "#", 1, "sort-widget", 3, "click", "keyup.enter", "innerHTML"], ["scope", "col", 2, "width", "110px"], [4, "ngFor", "ngForOf"], ["class", "govuk-table__checkbox", "scope", "col", 4, "ngIf"], ["class", "search-result-column-cell", "scope", "row", 4, "ngFor", "ngForOf"], ["scope", "col", 1, "govuk-table__checkbox"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "id", "name", "checked", "disabled"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["scope", "row", 1, "search-result-column-cell"], ["class", "govuk-link", 3, "routerLink", 4, "ngIf"], ["class", "text-16", 3, "visibility", 4, "ngIf"], [1, "govuk-link", 3, "routerLink"], ["class", "text-16", 4, "ngIf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "elementsToSubstitute", 4, "ngIf", "ngIfElse"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "elementsToSubstitute"], [3, "caseId", "displayMode"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "keyup", "id", "name", "checked", "disabled"], [3, "pageChange", "visibilityLabel", "autoHide", "maxSize", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel"], [1, "notification"]], template: function SearchResultComponent_Template(rf, ctx) { if (rf & 1) {
|
|
41192
41112
|
i0.ɵɵtemplate(0, SearchResultComponent_table_0_Template, 16, 11, "table", 1)(1, SearchResultComponent_ccd_pagination_1_Template, 1, 6, "ccd-pagination", 2)(2, SearchResultComponent_div_2_Template, 4, 6, "div", 3);
|
|
41193
41113
|
} if (rf & 2) {
|
|
@@ -41201,9 +41121,7 @@ class SearchResultComponent {
|
|
|
41201
41121
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
|
|
41202
41122
|
type: Component,
|
|
41203
41123
|
args: [{ selector: 'ccd-search-result', standalone: false, template: "<table *ngIf=\"hasResults() || hasDrafts()\">\n <caption>\n <h2 class=\"heading-h2\" id=\"search-result-heading__text\" tabindex=\"-1\">{{ (caseState ? 'Your cases' : 'Search result') | rpxTranslate}}</h2>\n\n <div class=\"govuk-warning-text pagination-limit-warning\" *ngIf=\"paginationLimitEnforced\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">{{'Warning' | rpxTranslate}}</span>\n {{'The total size of the result set is' | rpxTranslate}} {{paginationMetadata.totalResultsCount | number}}. {{'Only the first 10,000 records are available for display.' | rpxTranslate}}\n </strong>\n </div>\n\n <div *ngIf=\"(hasResults() || hasDrafts())\" class=\"pagination-top\">\n <output [attr.aria-label]=\"getTotalResults() + ' ' + ('results have been found' | rpxTranslate)\"></output>\n <span class=\"text-16\" id=\"search-result-summary__text\">{{'Showing' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getFirstResult() }}</span>\n {{'to' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getLastResult() }}</span>\n {{'of' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getTotalResults() }}</span> {{'results' | rpxTranslate}}</span>\n </div>\n <div *ngIf=\"(hasResults() || hasDrafts()) && selectionEnabled\" class=\"reset-selection\"\n [attr.aria-label]=\"'Reset selection' | rpxTranslate\">\n <span><a class=\"search-result-reset-link\" href=\"#\" (click)=\"clearSelection(); $event.preventDefault()\">{{'Reset case selection' | rpxTranslate}}</a></span>\n </div>\n </caption>\n <thead>\n <tr scope=\"row\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\" [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-all\" [attr.aria-labelledby]=\"'select-all'\">\n </label>\n </div>\n </td>\n <th *ngFor=\"let col of resultView.columns\" class=\"search-result-column-header\"\n [attr.aria-sort]=\"isSortAscending(col) === null ? null : (isSortAscending(col) ? 'ascending' : 'descending')\" scope=\"col\">\n <div>\n <div class=\"search-result-column-label\" (click)=\"sort(col)\" (keyup)=\"noop()\">\n {{ isTranslatable(col) ? (col.label | rpxTranslate) : col.label }}\n </div>\n <div *ngIf=\"comparator(col)\" class=\"search-result-column-sort\">\n <a (click)=\"sort(col); $event.preventDefault()\" (keyup.enter)=\"sort(col)\" class=\"sort-widget\" [innerHTML]=\"sortWidget(col)\" [attr.aria-label]=\"'Sort ' + col.label | rpxTranslate\" href=\"#\"></a>\n </div>\n </div>\n </th>\n <th *ngIf=\"activityEnabled()\" style=\"width: 110px;\" scope=\"col\">​</th>\n </tr>\n </thead>\n\n <tbody>\n <!-- sorted by consumer -->\n <ng-container *ngIf=\"consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\" [attr.aria-labelledby]=\"'select-' + result.case_id\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n <!-- sorted by toolkit -->\n <ng-container *ngIf=\"!consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | ccdSortSearchResult : sortParameters | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" (keyup)=\"onKeyUp($event, result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\" [attr.aria-labelledby]=\"'select-' + result.case_id\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n\n </tbody>\n</table>\n\n<ccd-pagination\n *ngIf=\"hasResults()\"\n (pageChange)=\"goToPage($event)\"\n [visibilityLabel]=\"hideRows ? 'hidden' : 'visible'\"\n [autoHide]=\"true\"\n [maxSize]=\"8\"\n [screenReaderPaginationLabel]=\"'Pagination'\"\n [screenReaderPageLabel]=\"page\"\n [screenReaderCurrentLabel]=\"'You\\'re on page'\"></ccd-pagination>\n\n<div *ngIf=\"!(hasResults() || hasDrafts())\" class=\"notification\"\n[attr.aria-describedby]=\"'No cases found. Try using different filters.' | rpxTranslate\">\n{{'No cases found. Try using different filters.' | rpxTranslate}}\n</div>\n", styles: ["table thead tr th{vertical-align:top}table tbody tr td{font-size:16px;word-wrap:break-word}table tbody tr td a{float:left}table .caseid-col{white-space:nowrap}.notification{text-align:center;padding:30px 0;margin-top:75px}a:hover{color:#005ea5}.search-result-reset-link{padding-right:15px;padding-left:15px}.search-result-column-header{width:unset;table-layout:normal}.search-result-column-header div{display:table-cell;width:auto}@media screen and (max-width:379px){.search-result-column-header div{display:block;float:right}}.search-result-column-label{font-size:16px;font-weight:700;word-wrap:break-word;cursor:pointer;padding-right:15px}.search-result-column-sort{font-size:16px}.sort-widget{cursor:pointer;text-decoration:none;color:#231f20}span.heading-medium{margin-top:-20px}.govuk-table__checkbox{vertical-align:middle;padding-left:3px}#search-result-heading__text:focus{outline:none}\n"] }]
|
|
41204
|
-
}], () => [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }, {
|
|
41205
|
-
type: Optional
|
|
41206
|
-
}] }], { caseLinkUrlTemplate: [{
|
|
41124
|
+
}], () => [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }], { caseLinkUrlTemplate: [{
|
|
41207
41125
|
type: Input
|
|
41208
41126
|
}], jurisdiction: [{
|
|
41209
41127
|
type: Input
|
|
@@ -41238,7 +41156,7 @@ class SearchResultComponent {
|
|
|
41238
41156
|
}], sortHandler: [{
|
|
41239
41157
|
type: Output
|
|
41240
41158
|
}] }); })();
|
|
41241
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchResultComponent, { className: "SearchResultComponent", filePath: "lib/shared/components/search-result/search-result.component.ts", lineNumber:
|
|
41159
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchResultComponent, { className: "SearchResultComponent", filePath: "lib/shared/components/search-result/search-result.component.ts", lineNumber: 19 }); })();
|
|
41242
41160
|
|
|
41243
41161
|
class SearchResultModule {
|
|
41244
41162
|
static ɵfac = function SearchResultModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchResultModule)(); };
|