@hmcts/ccd-case-ui-toolkit 7.3.56 → 7.3.57-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.
@@ -3389,6 +3389,7 @@ class CaseField {
3389
3389
  acls;
3390
3390
  metadata;
3391
3391
  formatted_value;
3392
+ hmctsServiceId;
3392
3393
  retain_hidden_value;
3393
3394
  wizardProps;
3394
3395
  _value;
@@ -3785,6 +3786,7 @@ class CaseView {
3785
3786
  events;
3786
3787
  metadataFields;
3787
3788
  basicFields;
3789
+ hmctsServiceId;
3788
3790
  case_flag;
3789
3791
  }
3790
3792
  __decorate([
@@ -8936,19 +8938,22 @@ class CaseworkerService {
8936
8938
 
8937
8939
  class CaseNotifier {
8938
8940
  casesService;
8941
+ caseFlagRefdataService;
8939
8942
  static CASE_NAME = 'caseNameHmctsInternal';
8940
8943
  static CASE_LOCATION = 'caseManagementLocation';
8941
8944
  caseViewSource = new BehaviorSubject(new CaseView());
8945
+ hmctsServiceIdByCaseType = new Map();
8942
8946
  caseView = this.caseViewSource.asObservable();
8943
8947
  cachedCaseView;
8944
- constructor(casesService) {
8948
+ constructor(casesService, caseFlagRefdataService) {
8945
8949
  this.casesService = casesService;
8950
+ this.caseFlagRefdataService = caseFlagRefdataService;
8946
8951
  }
8947
8952
  removeCachedCase() {
8948
8953
  this.cachedCaseView = null;
8949
8954
  }
8950
8955
  announceCase(c) {
8951
- this.caseViewSource.next(c);
8956
+ this.resolveHmctsServiceId(c).subscribe(caseView => this.caseViewSource.next(caseView));
8952
8957
  }
8953
8958
  fetchAndRefresh(cid) {
8954
8959
  return this.casesService
@@ -8956,8 +8961,10 @@ class CaseNotifier {
8956
8961
  .pipe(map(caseView => {
8957
8962
  this.cachedCaseView = plainToClassFromExist(new CaseView(), caseView);
8958
8963
  this.setBasicFields(this.cachedCaseView.tabs);
8959
- this.announceCase(this.cachedCaseView);
8960
8964
  return this.cachedCaseView;
8965
+ }), switchMap(caseView => this.resolveHmctsServiceId(caseView)), map(caseView => {
8966
+ this.announceCase(caseView);
8967
+ return caseView;
8961
8968
  }));
8962
8969
  }
8963
8970
  setBasicFields(tabs) {
@@ -8972,12 +8979,32 @@ class CaseNotifier {
8972
8979
  }
8973
8980
  });
8974
8981
  }
8975
- static ɵfac = function CaseNotifier_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseNotifier)(i0.ɵɵinject(CasesService)); };
8982
+ resolveHmctsServiceId(caseView) {
8983
+ const caseTypeId = caseView?.case_type?.id;
8984
+ if (!caseTypeId || !this.caseFlagRefdataService) {
8985
+ return of(caseView);
8986
+ }
8987
+ if (this.hmctsServiceIdByCaseType.has(caseTypeId)) {
8988
+ caseView.hmctsServiceId = this.hmctsServiceIdByCaseType.get(caseTypeId);
8989
+ return of(caseView);
8990
+ }
8991
+ return this.caseFlagRefdataService.getHmctsServiceDetailsByCaseType(caseTypeId).pipe(map((serviceDetails) => {
8992
+ const hmctsServiceId = serviceDetails?.find((serviceDetail) => !!serviceDetail.service_code)?.service_code;
8993
+ if (hmctsServiceId) {
8994
+ this.hmctsServiceIdByCaseType.set(caseTypeId, hmctsServiceId);
8995
+ caseView.hmctsServiceId = hmctsServiceId;
8996
+ }
8997
+ return caseView;
8998
+ }), catchError(() => of(caseView)));
8999
+ }
9000
+ static ɵfac = function CaseNotifier_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseNotifier)(i0.ɵɵinject(CasesService), i0.ɵɵinject(CaseFlagRefdataService, 8)); };
8976
9001
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaseNotifier, factory: CaseNotifier.ɵfac });
8977
9002
  }
8978
9003
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseNotifier, [{
8979
9004
  type: Injectable
8980
- }], () => [{ type: CasesService }], null); })();
9005
+ }], () => [{ type: CasesService }, { type: CaseFlagRefdataService, decorators: [{
9006
+ type: Optional
9007
+ }] }], null); })();
8981
9008
 
8982
9009
  var Permissions;
8983
9010
  (function (Permissions) {
@@ -15540,8 +15567,39 @@ class ReadComplexFieldComponent extends AbstractFieldReadComponent {
15540
15567
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadComplexFieldComponent, { className: "ReadComplexFieldComponent", filePath: "lib/shared/components/palette/complex/read-complex-field.component.ts", lineNumber: 11 }); })();
15541
15568
 
15542
15569
  class ReadDateFieldComponent extends AbstractFieldReadComponent {
15543
- timeZone = 'utc';
15544
- static ɵfac = /*@__PURE__*/ (() => { let ɵReadDateFieldComponent_BaseFactory; return function ReadDateFieldComponent_Factory(__ngFactoryType__) { return (ɵReadDateFieldComponent_BaseFactory || (ɵReadDateFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadDateFieldComponent)))(__ngFactoryType__ || ReadDateFieldComponent); }; })();
15570
+ caseNotifier;
15571
+ static SERVICES_RENDERED_IN_LOCAL_TIME = ['ABA1', 'ABA2', 'ABA6']; // [DIVORCE, FR, PROBATE]
15572
+ caseSubscription;
15573
+ caseHmctsServiceId;
15574
+ constructor(caseNotifier) {
15575
+ super();
15576
+ this.caseNotifier = caseNotifier;
15577
+ }
15578
+ ngOnInit() {
15579
+ super.ngOnInit();
15580
+ this.caseSubscription = this.caseNotifier?.caseView.subscribe((caseDetails) => {
15581
+ this.caseHmctsServiceId = caseDetails?.hmctsServiceId;
15582
+ });
15583
+ }
15584
+ ngOnDestroy() {
15585
+ if (this.caseSubscription) {
15586
+ this.caseSubscription.unsubscribe();
15587
+ }
15588
+ }
15589
+ // Most services display DateTime values as received from CCD; only the services listed in SERVICES_RENDERED_IN_LOCAL_TIME need converting to local time.
15590
+ get timeZone() {
15591
+ return this.shouldRenderInLocalTime() ? 'local' : 'utc';
15592
+ }
15593
+ shouldRenderInLocalTime() {
15594
+ return ReadDateFieldComponent.SERVICES_RENDERED_IN_LOCAL_TIME.includes(this.getHmctsServiceId());
15595
+ }
15596
+ getHmctsServiceId() {
15597
+ if (typeof this.caseField?.hmctsServiceId === 'string') {
15598
+ return this.caseField.hmctsServiceId;
15599
+ }
15600
+ return this.caseHmctsServiceId;
15601
+ }
15602
+ static ɵfac = function ReadDateFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadDateFieldComponent)(i0.ɵɵdirectiveInject(CaseNotifier, 8)); };
15545
15603
  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) {
15546
15604
  i0.ɵɵelementStart(0, "span", 0);
15547
15605
  i0.ɵɵtext(1);
@@ -15549,18 +15607,20 @@ class ReadDateFieldComponent extends AbstractFieldReadComponent {
15549
15607
  i0.ɵɵelementEnd();
15550
15608
  } if (rf & 2) {
15551
15609
  i0.ɵɵadvance();
15552
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind3(2, 1, ctx.caseField.value, "utc", ctx.caseField.dateTimeDisplayFormat));
15610
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind3(2, 1, ctx.caseField.value, ctx.timeZone, ctx.caseField.dateTimeDisplayFormat));
15553
15611
  } }, dependencies: [DatePipe], encapsulation: 2 });
15554
15612
  }
15555
15613
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadDateFieldComponent, [{
15556
15614
  type: Component,
15557
15615
  args: [{
15558
15616
  selector: 'ccd-read-date-field',
15559
- template: `<span class="text-16">{{caseField.value | ccdDate:'utc':caseField.dateTimeDisplayFormat}}</span>`,
15617
+ template: `<span class="text-16">{{caseField.value | ccdDate:timeZone:caseField.dateTimeDisplayFormat}}</span>`,
15560
15618
  standalone: false
15561
15619
  }]
15562
- }], null, null); })();
15563
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadDateFieldComponent, { className: "ReadDateFieldComponent", filePath: "lib/shared/components/palette/date/read-date-field.component.ts", lineNumber: 9 }); })();
15620
+ }], () => [{ type: CaseNotifier, decorators: [{
15621
+ type: Optional
15622
+ }] }], null); })();
15623
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadDateFieldComponent, { className: "ReadDateFieldComponent", filePath: "lib/shared/components/palette/date/read-date-field.component.ts", lineNumber: 12 }); })();
15564
15624
 
15565
15625
  function WriteDateContainerFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
15566
15626
  i0.ɵɵelementContainerStart(0);
@@ -40941,6 +41001,7 @@ class SearchResultComponent {
40941
41001
  placeholderService;
40942
41002
  browserService;
40943
41003
  sessionStorageService;
41004
+ caseFlagRefdataService;
40944
41005
  static PARAM_JURISDICTION = 'jurisdiction';
40945
41006
  static PARAM_CASE_TYPE = 'case-type';
40946
41007
  static PARAM_CASE_STATE = 'case-state';
@@ -40972,12 +41033,15 @@ class SearchResultComponent {
40972
41033
  draftsCount;
40973
41034
  consumerSortParameters = { column: null, order: null, type: null };
40974
41035
  selectedCases = [];
40975
- constructor(searchResultViewItemComparatorFactory, appConfig, activityService, caseReferencePipe, placeholderService, browserService, sessionStorageService) {
41036
+ hmctsServiceIdByCaseType = new Map();
41037
+ pendingHmctsServiceIdCaseTypes = new Set();
41038
+ constructor(searchResultViewItemComparatorFactory, appConfig, activityService, caseReferencePipe, placeholderService, browserService, sessionStorageService, caseFlagRefdataService) {
40976
41039
  this.activityService = activityService;
40977
41040
  this.caseReferencePipe = caseReferencePipe;
40978
41041
  this.placeholderService = placeholderService;
40979
41042
  this.browserService = browserService;
40980
41043
  this.sessionStorageService = sessionStorageService;
41044
+ this.caseFlagRefdataService = caseFlagRefdataService;
40981
41045
  this.searchResultViewItemComparatorFactory = searchResultViewItemComparatorFactory;
40982
41046
  this.paginationPageSize = appConfig.getPaginationPageSize();
40983
41047
  this.hideRows = false;
@@ -41007,6 +41071,7 @@ class SearchResultComponent {
41007
41071
  return a.order - b.order;
41008
41072
  });
41009
41073
  this.hydrateResultView();
41074
+ this.resolveHmctsServiceIdsForResults();
41010
41075
  this.draftsCount = this.draftsCount ? this.draftsCount : this.numberOfDrafts();
41011
41076
  }
41012
41077
  if (changes['page']) {
@@ -41154,8 +41219,48 @@ class SearchResultComponent {
41154
41219
  value: result.case_fields[col.case_field_id],
41155
41220
  display_context_parameter: col.display_context_parameter,
41156
41221
  display_context: col.display_context,
41222
+ hmctsServiceId: this.hmctsServiceIdByCaseType.get(this.getCaseTypeId(result)) || ''
41223
+ });
41224
+ }
41225
+ resolveHmctsServiceIdsForResults() {
41226
+ this.resultView.results.forEach((result) => {
41227
+ const caseTypeId = this.getCaseTypeId(result);
41228
+ if (!caseTypeId || !this.caseFlagRefdataService) {
41229
+ return;
41230
+ }
41231
+ if (this.hmctsServiceIdByCaseType.has(caseTypeId)) {
41232
+ this.applyHmctsServiceIdToResultFields(caseTypeId, this.hmctsServiceIdByCaseType.get(caseTypeId));
41233
+ return;
41234
+ }
41235
+ if (this.pendingHmctsServiceIdCaseTypes.has(caseTypeId)) {
41236
+ return;
41237
+ }
41238
+ this.pendingHmctsServiceIdCaseTypes.add(caseTypeId);
41239
+ this.caseFlagRefdataService.getHmctsServiceDetailsByCaseType(caseTypeId).subscribe({
41240
+ next: (serviceDetails) => {
41241
+ const hmctsServiceId = serviceDetails?.find((serviceDetail) => !!serviceDetail.service_code)?.service_code;
41242
+ if (hmctsServiceId) {
41243
+ this.hmctsServiceIdByCaseType.set(caseTypeId, hmctsServiceId);
41244
+ this.applyHmctsServiceIdToResultFields(caseTypeId, hmctsServiceId);
41245
+ }
41246
+ },
41247
+ error: () => this.pendingHmctsServiceIdCaseTypes.delete(caseTypeId),
41248
+ complete: () => this.pendingHmctsServiceIdCaseTypes.delete(caseTypeId)
41249
+ });
41250
+ });
41251
+ }
41252
+ applyHmctsServiceIdToResultFields(caseTypeId, hmctsServiceId) {
41253
+ this.resultView.results
41254
+ .filter((result) => this.getCaseTypeId(result) === caseTypeId)
41255
+ .forEach((result) => {
41256
+ Object.keys(result.columns || {}).forEach((columnId) => {
41257
+ result.columns[columnId].hmctsServiceId = hmctsServiceId;
41258
+ });
41157
41259
  });
41158
41260
  }
41261
+ getCaseTypeId(result) {
41262
+ return result?.case_fields?.['[CASE_TYPE]'] || this.caseType?.id;
41263
+ }
41159
41264
  getColumnsWithPrefix(col, result) {
41160
41265
  col.value = this.draftPrefixOrGet(col, result);
41161
41266
  col.value = this.placeholderService.resolvePlaceholders(result.case_fields, col.value);
@@ -41278,7 +41383,7 @@ class SearchResultComponent {
41278
41383
  }
41279
41384
  // eslint-disable-next-line @typescript-eslint/no-empty-function
41280
41385
  noop() { }
41281
- 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)); };
41386
+ 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)); };
41282
41387
  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) {
41283
41388
  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);
41284
41389
  } if (rf & 2) {
@@ -41292,7 +41397,9 @@ class SearchResultComponent {
41292
41397
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
41293
41398
  type: Component,
41294
41399
  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\">&ZeroWidthSpace;</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"] }]
41295
- }], () => [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }], { caseLinkUrlTemplate: [{
41400
+ }], () => [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }, { type: CaseFlagRefdataService, decorators: [{
41401
+ type: Optional
41402
+ }] }], { caseLinkUrlTemplate: [{
41296
41403
  type: Input
41297
41404
  }], jurisdiction: [{
41298
41405
  type: Input
@@ -41327,7 +41434,7 @@ class SearchResultComponent {
41327
41434
  }], sortHandler: [{
41328
41435
  type: Output
41329
41436
  }] }); })();
41330
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchResultComponent, { className: "SearchResultComponent", filePath: "lib/shared/components/search-result/search-result.component.ts", lineNumber: 19 }); })();
41437
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchResultComponent, { className: "SearchResultComponent", filePath: "lib/shared/components/search-result/search-result.component.ts", lineNumber: 21 }); })();
41331
41438
 
41332
41439
  class SearchResultModule {
41333
41440
  static ɵfac = function SearchResultModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchResultModule)(); };