@hmcts/ccd-case-ui-toolkit 7.3.49-exui-4150-rc-1 → 7.3.49-exui-3003-3005
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.
|
@@ -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, InjectionToken, ViewChild, ChangeDetectionStrategy, Injector, ViewContainerRef, SecurityContext, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { Component, Input, EventEmitter, Output, NgModule, ViewEncapsulation, forwardRef, Pipe, ContentChildren, ViewChildren, DOCUMENT, Injectable, Inject, ChangeDetectorRef, Directive, Optional, 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,6 +3320,7 @@ class CaseField {
|
|
|
3320
3320
|
acls;
|
|
3321
3321
|
metadata;
|
|
3322
3322
|
formatted_value;
|
|
3323
|
+
hmctsServiceId;
|
|
3323
3324
|
retain_hidden_value;
|
|
3324
3325
|
wizardProps;
|
|
3325
3326
|
_value;
|
|
@@ -3716,6 +3717,7 @@ class CaseView {
|
|
|
3716
3717
|
events;
|
|
3717
3718
|
metadataFields;
|
|
3718
3719
|
basicFields;
|
|
3720
|
+
hmctsServiceId;
|
|
3719
3721
|
case_flag;
|
|
3720
3722
|
}
|
|
3721
3723
|
__decorate([
|
|
@@ -8867,19 +8869,22 @@ class CaseworkerService {
|
|
|
8867
8869
|
|
|
8868
8870
|
class CaseNotifier {
|
|
8869
8871
|
casesService;
|
|
8872
|
+
caseFlagRefdataService;
|
|
8870
8873
|
static CASE_NAME = 'caseNameHmctsInternal';
|
|
8871
8874
|
static CASE_LOCATION = 'caseManagementLocation';
|
|
8872
8875
|
caseViewSource = new BehaviorSubject(new CaseView());
|
|
8876
|
+
hmctsServiceIdByCaseType = new Map();
|
|
8873
8877
|
caseView = this.caseViewSource.asObservable();
|
|
8874
8878
|
cachedCaseView;
|
|
8875
|
-
constructor(casesService) {
|
|
8879
|
+
constructor(casesService, caseFlagRefdataService) {
|
|
8876
8880
|
this.casesService = casesService;
|
|
8881
|
+
this.caseFlagRefdataService = caseFlagRefdataService;
|
|
8877
8882
|
}
|
|
8878
8883
|
removeCachedCase() {
|
|
8879
8884
|
this.cachedCaseView = null;
|
|
8880
8885
|
}
|
|
8881
8886
|
announceCase(c) {
|
|
8882
|
-
this.caseViewSource.next(
|
|
8887
|
+
this.resolveHmctsServiceId(c).subscribe(caseView => this.caseViewSource.next(caseView));
|
|
8883
8888
|
}
|
|
8884
8889
|
fetchAndRefresh(cid) {
|
|
8885
8890
|
return this.casesService
|
|
@@ -8887,8 +8892,10 @@ class CaseNotifier {
|
|
|
8887
8892
|
.pipe(map(caseView => {
|
|
8888
8893
|
this.cachedCaseView = plainToClassFromExist(new CaseView(), caseView);
|
|
8889
8894
|
this.setBasicFields(this.cachedCaseView.tabs);
|
|
8890
|
-
this.announceCase(this.cachedCaseView);
|
|
8891
8895
|
return this.cachedCaseView;
|
|
8896
|
+
}), switchMap(caseView => this.resolveHmctsServiceId(caseView)), map(caseView => {
|
|
8897
|
+
this.announceCase(caseView);
|
|
8898
|
+
return caseView;
|
|
8892
8899
|
}));
|
|
8893
8900
|
}
|
|
8894
8901
|
setBasicFields(tabs) {
|
|
@@ -8903,12 +8910,32 @@ class CaseNotifier {
|
|
|
8903
8910
|
}
|
|
8904
8911
|
});
|
|
8905
8912
|
}
|
|
8906
|
-
|
|
8913
|
+
resolveHmctsServiceId(caseView) {
|
|
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)); };
|
|
8907
8932
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaseNotifier, factory: CaseNotifier.ɵfac });
|
|
8908
8933
|
}
|
|
8909
8934
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseNotifier, [{
|
|
8910
8935
|
type: Injectable
|
|
8911
|
-
}], () => [{ type: CasesService }
|
|
8936
|
+
}], () => [{ type: CasesService }, { type: CaseFlagRefdataService, decorators: [{
|
|
8937
|
+
type: Optional
|
|
8938
|
+
}] }], null); })();
|
|
8912
8939
|
|
|
8913
8940
|
var Permissions;
|
|
8914
8941
|
(function (Permissions) {
|
|
@@ -15422,8 +15449,39 @@ class ReadComplexFieldComponent extends AbstractFieldReadComponent {
|
|
|
15422
15449
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadComplexFieldComponent, { className: "ReadComplexFieldComponent", filePath: "lib/shared/components/palette/complex/read-complex-field.component.ts", lineNumber: 11 }); })();
|
|
15423
15450
|
|
|
15424
15451
|
class ReadDateFieldComponent extends AbstractFieldReadComponent {
|
|
15425
|
-
|
|
15426
|
-
static
|
|
15452
|
+
caseNotifier;
|
|
15453
|
+
static SERVICES_RENDERED_IN_LOCAL_TIME = ['ABA1', 'ABA2', 'ABA6']; // [DIVORCE, FR, PROBATE]
|
|
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)); };
|
|
15427
15485
|
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) {
|
|
15428
15486
|
i0.ɵɵelementStart(0, "span", 0);
|
|
15429
15487
|
i0.ɵɵtext(1);
|
|
@@ -15431,18 +15489,20 @@ class ReadDateFieldComponent extends AbstractFieldReadComponent {
|
|
|
15431
15489
|
i0.ɵɵelementEnd();
|
|
15432
15490
|
} if (rf & 2) {
|
|
15433
15491
|
i0.ɵɵadvance();
|
|
15434
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind3(2, 1, ctx.caseField.value,
|
|
15492
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind3(2, 1, ctx.caseField.value, ctx.timeZone, ctx.caseField.dateTimeDisplayFormat));
|
|
15435
15493
|
} }, dependencies: [DatePipe], encapsulation: 2 });
|
|
15436
15494
|
}
|
|
15437
15495
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadDateFieldComponent, [{
|
|
15438
15496
|
type: Component,
|
|
15439
15497
|
args: [{
|
|
15440
15498
|
selector: 'ccd-read-date-field',
|
|
15441
|
-
template: `<span class="text-16">{{caseField.value | ccdDate:
|
|
15499
|
+
template: `<span class="text-16">{{caseField.value | ccdDate:timeZone:caseField.dateTimeDisplayFormat}}</span>`,
|
|
15442
15500
|
standalone: false
|
|
15443
15501
|
}]
|
|
15444
|
-
}],
|
|
15445
|
-
|
|
15502
|
+
}], () => [{ type: CaseNotifier, decorators: [{
|
|
15503
|
+
type: Optional
|
|
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 }); })();
|
|
15446
15506
|
|
|
15447
15507
|
function WriteDateContainerFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
15448
15508
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -16290,13 +16350,11 @@ class MarkdownComponent {
|
|
|
16290
16350
|
}
|
|
16291
16351
|
renderUrlToText() {
|
|
16292
16352
|
const renderer = new marked.Renderer();
|
|
16293
|
-
renderer.link = (
|
|
16294
|
-
|
|
16295
|
-
|
|
16296
|
-
if (!text || text === linkHref) {
|
|
16297
|
-
return this.isAllowedUrl(linkHref) ? `<a href="${linkHref}">${linkHref}</a>` : linkHref;
|
|
16353
|
+
renderer.link = (href, title, text) => {
|
|
16354
|
+
if (!text || text === href) {
|
|
16355
|
+
return this.isAllowedUrl(href) ? `<a href="${href}">${href}</a>` : href;
|
|
16298
16356
|
}
|
|
16299
|
-
return this.detectMarkdownLinks(this.content) ? `<a href="${
|
|
16357
|
+
return this.detectMarkdownLinks(this.content) ? `<a href="${href}">${text}</a>` : text;
|
|
16300
16358
|
};
|
|
16301
16359
|
marked.setOptions({
|
|
16302
16360
|
renderer: renderer
|
|
@@ -16331,7 +16389,7 @@ class MarkdownComponent {
|
|
|
16331
16389
|
}], renderUrlToTextFeature: [{
|
|
16332
16390
|
type: Input
|
|
16333
16391
|
}] }); })();
|
|
16334
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MarkdownComponent, { className: "MarkdownComponent", filePath: "lib/shared/components/palette/markdown/markdown.component.ts", lineNumber:
|
|
16392
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MarkdownComponent, { className: "MarkdownComponent", filePath: "lib/shared/components/palette/markdown/markdown.component.ts", lineNumber: 11 }); })();
|
|
16335
16393
|
|
|
16336
16394
|
class FixedListPipe {
|
|
16337
16395
|
static EMPTY = '';
|
|
@@ -40747,6 +40805,7 @@ class SearchResultComponent {
|
|
|
40747
40805
|
placeholderService;
|
|
40748
40806
|
browserService;
|
|
40749
40807
|
sessionStorageService;
|
|
40808
|
+
caseFlagRefdataService;
|
|
40750
40809
|
static PARAM_JURISDICTION = 'jurisdiction';
|
|
40751
40810
|
static PARAM_CASE_TYPE = 'case-type';
|
|
40752
40811
|
static PARAM_CASE_STATE = 'case-state';
|
|
@@ -40778,12 +40837,15 @@ class SearchResultComponent {
|
|
|
40778
40837
|
draftsCount;
|
|
40779
40838
|
consumerSortParameters = { column: null, order: null, type: null };
|
|
40780
40839
|
selectedCases = [];
|
|
40781
|
-
|
|
40840
|
+
hmctsServiceIdByCaseType = new Map();
|
|
40841
|
+
pendingHmctsServiceIdCaseTypes = new Set();
|
|
40842
|
+
constructor(searchResultViewItemComparatorFactory, appConfig, activityService, caseReferencePipe, placeholderService, browserService, sessionStorageService, caseFlagRefdataService) {
|
|
40782
40843
|
this.activityService = activityService;
|
|
40783
40844
|
this.caseReferencePipe = caseReferencePipe;
|
|
40784
40845
|
this.placeholderService = placeholderService;
|
|
40785
40846
|
this.browserService = browserService;
|
|
40786
40847
|
this.sessionStorageService = sessionStorageService;
|
|
40848
|
+
this.caseFlagRefdataService = caseFlagRefdataService;
|
|
40787
40849
|
this.searchResultViewItemComparatorFactory = searchResultViewItemComparatorFactory;
|
|
40788
40850
|
this.paginationPageSize = appConfig.getPaginationPageSize();
|
|
40789
40851
|
this.hideRows = false;
|
|
@@ -40813,6 +40875,7 @@ class SearchResultComponent {
|
|
|
40813
40875
|
return a.order - b.order;
|
|
40814
40876
|
});
|
|
40815
40877
|
this.hydrateResultView();
|
|
40878
|
+
this.resolveHmctsServiceIdsForResults();
|
|
40816
40879
|
this.draftsCount = this.draftsCount ? this.draftsCount : this.numberOfDrafts();
|
|
40817
40880
|
}
|
|
40818
40881
|
if (changes['page']) {
|
|
@@ -40960,8 +41023,48 @@ class SearchResultComponent {
|
|
|
40960
41023
|
value: result.case_fields[col.case_field_id],
|
|
40961
41024
|
display_context_parameter: col.display_context_parameter,
|
|
40962
41025
|
display_context: col.display_context,
|
|
41026
|
+
hmctsServiceId: this.hmctsServiceIdByCaseType.get(this.getCaseTypeId(result)) || ''
|
|
40963
41027
|
});
|
|
40964
41028
|
}
|
|
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
|
+
}
|
|
40965
41068
|
getColumnsWithPrefix(col, result) {
|
|
40966
41069
|
col.value = this.draftPrefixOrGet(col, result);
|
|
40967
41070
|
col.value = this.placeholderService.resolvePlaceholders(result.case_fields, col.value);
|
|
@@ -41084,7 +41187,7 @@ class SearchResultComponent {
|
|
|
41084
41187
|
}
|
|
41085
41188
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
41086
41189
|
noop() { }
|
|
41087
|
-
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)); };
|
|
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), i0.ɵɵdirectiveInject(CaseFlagRefdataService, 8)); };
|
|
41088
41191
|
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) {
|
|
41089
41192
|
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);
|
|
41090
41193
|
} if (rf & 2) {
|
|
@@ -41098,7 +41201,9 @@ class SearchResultComponent {
|
|
|
41098
41201
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
|
|
41099
41202
|
type: Component,
|
|
41100
41203
|
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"] }]
|
|
41101
|
-
}], () => [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }
|
|
41204
|
+
}], () => [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }, { type: CaseFlagRefdataService, decorators: [{
|
|
41205
|
+
type: Optional
|
|
41206
|
+
}] }], { caseLinkUrlTemplate: [{
|
|
41102
41207
|
type: Input
|
|
41103
41208
|
}], jurisdiction: [{
|
|
41104
41209
|
type: Input
|
|
@@ -41133,7 +41238,7 @@ class SearchResultComponent {
|
|
|
41133
41238
|
}], sortHandler: [{
|
|
41134
41239
|
type: Output
|
|
41135
41240
|
}] }); })();
|
|
41136
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchResultComponent, { className: "SearchResultComponent", filePath: "lib/shared/components/search-result/search-result.component.ts", lineNumber:
|
|
41241
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchResultComponent, { className: "SearchResultComponent", filePath: "lib/shared/components/search-result/search-result.component.ts", lineNumber: 21 }); })();
|
|
41137
41242
|
|
|
41138
41243
|
class SearchResultModule {
|
|
41139
41244
|
static ɵfac = function SearchResultModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchResultModule)(); };
|