@hmcts/ccd-case-ui-toolkit 7.3.52-exui-3003-3005 → 7.3.52-exui-4291-1
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 +16 -123
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/index.d.ts +9 -29
- package/index.d.ts.map +1 -1
- package/package.json +41 -2
|
@@ -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([
|
|
@@ -8869,22 +8867,19 @@ class CaseworkerService {
|
|
|
8869
8867
|
|
|
8870
8868
|
class CaseNotifier {
|
|
8871
8869
|
casesService;
|
|
8872
|
-
caseFlagRefdataService;
|
|
8873
8870
|
static CASE_NAME = 'caseNameHmctsInternal';
|
|
8874
8871
|
static CASE_LOCATION = 'caseManagementLocation';
|
|
8875
8872
|
caseViewSource = new BehaviorSubject(new CaseView());
|
|
8876
|
-
hmctsServiceIdByCaseType = new Map();
|
|
8877
8873
|
caseView = this.caseViewSource.asObservable();
|
|
8878
8874
|
cachedCaseView;
|
|
8879
|
-
constructor(casesService
|
|
8875
|
+
constructor(casesService) {
|
|
8880
8876
|
this.casesService = casesService;
|
|
8881
|
-
this.caseFlagRefdataService = caseFlagRefdataService;
|
|
8882
8877
|
}
|
|
8883
8878
|
removeCachedCase() {
|
|
8884
8879
|
this.cachedCaseView = null;
|
|
8885
8880
|
}
|
|
8886
8881
|
announceCase(c) {
|
|
8887
|
-
this.
|
|
8882
|
+
this.caseViewSource.next(c);
|
|
8888
8883
|
}
|
|
8889
8884
|
fetchAndRefresh(cid) {
|
|
8890
8885
|
return this.casesService
|
|
@@ -8892,10 +8887,8 @@ class CaseNotifier {
|
|
|
8892
8887
|
.pipe(map(caseView => {
|
|
8893
8888
|
this.cachedCaseView = plainToClassFromExist(new CaseView(), caseView);
|
|
8894
8889
|
this.setBasicFields(this.cachedCaseView.tabs);
|
|
8890
|
+
this.announceCase(this.cachedCaseView);
|
|
8895
8891
|
return this.cachedCaseView;
|
|
8896
|
-
}), switchMap(caseView => this.resolveHmctsServiceId(caseView)), map(caseView => {
|
|
8897
|
-
this.announceCase(caseView);
|
|
8898
|
-
return caseView;
|
|
8899
8892
|
}));
|
|
8900
8893
|
}
|
|
8901
8894
|
setBasicFields(tabs) {
|
|
@@ -8910,32 +8903,12 @@ class CaseNotifier {
|
|
|
8910
8903
|
}
|
|
8911
8904
|
});
|
|
8912
8905
|
}
|
|
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)); };
|
|
8906
|
+
static ɵfac = function CaseNotifier_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseNotifier)(i0.ɵɵinject(CasesService)); };
|
|
8932
8907
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaseNotifier, factory: CaseNotifier.ɵfac });
|
|
8933
8908
|
}
|
|
8934
8909
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseNotifier, [{
|
|
8935
8910
|
type: Injectable
|
|
8936
|
-
}], () => [{ type: CasesService },
|
|
8937
|
-
type: Optional
|
|
8938
|
-
}] }], null); })();
|
|
8911
|
+
}], () => [{ type: CasesService }], null); })();
|
|
8939
8912
|
|
|
8940
8913
|
var Permissions;
|
|
8941
8914
|
(function (Permissions) {
|
|
@@ -15449,39 +15422,8 @@ class ReadComplexFieldComponent extends AbstractFieldReadComponent {
|
|
|
15449
15422
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadComplexFieldComponent, { className: "ReadComplexFieldComponent", filePath: "lib/shared/components/palette/complex/read-complex-field.component.ts", lineNumber: 11 }); })();
|
|
15450
15423
|
|
|
15451
15424
|
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)); };
|
|
15425
|
+
timeZone = 'utc';
|
|
15426
|
+
static ɵfac = /*@__PURE__*/ (() => { let ɵReadDateFieldComponent_BaseFactory; return function ReadDateFieldComponent_Factory(__ngFactoryType__) { return (ɵReadDateFieldComponent_BaseFactory || (ɵReadDateFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadDateFieldComponent)))(__ngFactoryType__ || ReadDateFieldComponent); }; })();
|
|
15485
15427
|
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
15428
|
i0.ɵɵelementStart(0, "span", 0);
|
|
15487
15429
|
i0.ɵɵtext(1);
|
|
@@ -15489,20 +15431,18 @@ class ReadDateFieldComponent extends AbstractFieldReadComponent {
|
|
|
15489
15431
|
i0.ɵɵelementEnd();
|
|
15490
15432
|
} if (rf & 2) {
|
|
15491
15433
|
i0.ɵɵadvance();
|
|
15492
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind3(2, 1, ctx.caseField.value,
|
|
15434
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind3(2, 1, ctx.caseField.value, "utc", ctx.caseField.dateTimeDisplayFormat));
|
|
15493
15435
|
} }, dependencies: [DatePipe], encapsulation: 2 });
|
|
15494
15436
|
}
|
|
15495
15437
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadDateFieldComponent, [{
|
|
15496
15438
|
type: Component,
|
|
15497
15439
|
args: [{
|
|
15498
15440
|
selector: 'ccd-read-date-field',
|
|
15499
|
-
template: `<span class="text-16">{{caseField.value | ccdDate:
|
|
15441
|
+
template: `<span class="text-16">{{caseField.value | ccdDate:'utc':caseField.dateTimeDisplayFormat}}</span>`,
|
|
15500
15442
|
standalone: false
|
|
15501
15443
|
}]
|
|
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 }); })();
|
|
15444
|
+
}], null, null); })();
|
|
15445
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadDateFieldComponent, { className: "ReadDateFieldComponent", filePath: "lib/shared/components/palette/date/read-date-field.component.ts", lineNumber: 9 }); })();
|
|
15506
15446
|
|
|
15507
15447
|
function WriteDateContainerFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
15508
15448
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -40805,7 +40745,6 @@ class SearchResultComponent {
|
|
|
40805
40745
|
placeholderService;
|
|
40806
40746
|
browserService;
|
|
40807
40747
|
sessionStorageService;
|
|
40808
|
-
caseFlagRefdataService;
|
|
40809
40748
|
static PARAM_JURISDICTION = 'jurisdiction';
|
|
40810
40749
|
static PARAM_CASE_TYPE = 'case-type';
|
|
40811
40750
|
static PARAM_CASE_STATE = 'case-state';
|
|
@@ -40837,15 +40776,12 @@ class SearchResultComponent {
|
|
|
40837
40776
|
draftsCount;
|
|
40838
40777
|
consumerSortParameters = { column: null, order: null, type: null };
|
|
40839
40778
|
selectedCases = [];
|
|
40840
|
-
|
|
40841
|
-
pendingHmctsServiceIdCaseTypes = new Set();
|
|
40842
|
-
constructor(searchResultViewItemComparatorFactory, appConfig, activityService, caseReferencePipe, placeholderService, browserService, sessionStorageService, caseFlagRefdataService) {
|
|
40779
|
+
constructor(searchResultViewItemComparatorFactory, appConfig, activityService, caseReferencePipe, placeholderService, browserService, sessionStorageService) {
|
|
40843
40780
|
this.activityService = activityService;
|
|
40844
40781
|
this.caseReferencePipe = caseReferencePipe;
|
|
40845
40782
|
this.placeholderService = placeholderService;
|
|
40846
40783
|
this.browserService = browserService;
|
|
40847
40784
|
this.sessionStorageService = sessionStorageService;
|
|
40848
|
-
this.caseFlagRefdataService = caseFlagRefdataService;
|
|
40849
40785
|
this.searchResultViewItemComparatorFactory = searchResultViewItemComparatorFactory;
|
|
40850
40786
|
this.paginationPageSize = appConfig.getPaginationPageSize();
|
|
40851
40787
|
this.hideRows = false;
|
|
@@ -40875,7 +40811,6 @@ class SearchResultComponent {
|
|
|
40875
40811
|
return a.order - b.order;
|
|
40876
40812
|
});
|
|
40877
40813
|
this.hydrateResultView();
|
|
40878
|
-
this.resolveHmctsServiceIdsForResults();
|
|
40879
40814
|
this.draftsCount = this.draftsCount ? this.draftsCount : this.numberOfDrafts();
|
|
40880
40815
|
}
|
|
40881
40816
|
if (changes['page']) {
|
|
@@ -41023,48 +40958,8 @@ class SearchResultComponent {
|
|
|
41023
40958
|
value: result.case_fields[col.case_field_id],
|
|
41024
40959
|
display_context_parameter: col.display_context_parameter,
|
|
41025
40960
|
display_context: col.display_context,
|
|
41026
|
-
hmctsServiceId: this.hmctsServiceIdByCaseType.get(this.getCaseTypeId(result)) || ''
|
|
41027
40961
|
});
|
|
41028
40962
|
}
|
|
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
40963
|
getColumnsWithPrefix(col, result) {
|
|
41069
40964
|
col.value = this.draftPrefixOrGet(col, result);
|
|
41070
40965
|
col.value = this.placeholderService.resolvePlaceholders(result.case_fields, col.value);
|
|
@@ -41187,7 +41082,7 @@ class SearchResultComponent {
|
|
|
41187
41082
|
}
|
|
41188
41083
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
41189
41084
|
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)
|
|
41085
|
+
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
41086
|
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
41087
|
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
41088
|
} if (rf & 2) {
|
|
@@ -41201,9 +41096,7 @@ class SearchResultComponent {
|
|
|
41201
41096
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
|
|
41202
41097
|
type: Component,
|
|
41203
41098
|
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: [{
|
|
41099
|
+
}], () => [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }], { caseLinkUrlTemplate: [{
|
|
41207
41100
|
type: Input
|
|
41208
41101
|
}], jurisdiction: [{
|
|
41209
41102
|
type: Input
|
|
@@ -41238,7 +41131,7 @@ class SearchResultComponent {
|
|
|
41238
41131
|
}], sortHandler: [{
|
|
41239
41132
|
type: Output
|
|
41240
41133
|
}] }); })();
|
|
41241
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchResultComponent, { className: "SearchResultComponent", filePath: "lib/shared/components/search-result/search-result.component.ts", lineNumber:
|
|
41134
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchResultComponent, { className: "SearchResultComponent", filePath: "lib/shared/components/search-result/search-result.component.ts", lineNumber: 19 }); })();
|
|
41242
41135
|
|
|
41243
41136
|
class SearchResultModule {
|
|
41244
41137
|
static ɵfac = function SearchResultModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchResultModule)(); };
|