@hmcts/ccd-case-ui-toolkit 7.0.43-accessibility-table-fixed → 7.0.43-client-context

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.
Files changed (29) hide show
  1. package/esm2022/lib/shared/components/case-editor/case-edit/case-edit.component.mjs +12 -12
  2. package/esm2022/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.mjs +17 -15
  3. package/esm2022/lib/shared/components/case-editor/services/cases.service.mjs +53 -27
  4. package/esm2022/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +14 -6
  5. package/esm2022/lib/shared/components/event-start/event-guard/event-start.guard.mjs +13 -5
  6. package/esm2022/lib/shared/components/event-start/services/event-start-state-machine.service.mjs +11 -3
  7. package/esm2022/lib/shared/components/search-result/search-result.component.mjs +86 -76
  8. package/esm2022/lib/shared/domain/work-allocation/Task.mjs +1 -1
  9. package/esm2022/lib/shared/services/fields/fields.utils.mjs +8 -1
  10. package/esm2022/lib/shared/services/profile/profile.service.mjs +2 -1
  11. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +197 -126
  12. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  13. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
  14. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +1 -2
  15. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
  16. package/lib/shared/components/case-editor/services/cases.service.d.ts +2 -1
  17. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  18. package/lib/shared/components/case-editor/services/event-completion-state-machine.service.d.ts +1 -0
  19. package/lib/shared/components/case-editor/services/event-completion-state-machine.service.d.ts.map +1 -1
  20. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
  21. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
  22. package/lib/shared/components/event-start/services/event-start-state-machine.service.d.ts.map +1 -1
  23. package/lib/shared/components/search-result/search-result.component.d.ts +1 -1
  24. package/lib/shared/components/search-result/search-result.component.d.ts.map +1 -1
  25. package/lib/shared/domain/work-allocation/Task.d.ts +4 -0
  26. package/lib/shared/domain/work-allocation/Task.d.ts.map +1 -1
  27. package/lib/shared/services/fields/fields.utils.d.ts +2 -0
  28. package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
  29. package/package.json +1 -1
@@ -4340,6 +4340,13 @@ class FieldsUtils {
4340
4340
  return '';
4341
4341
  }
4342
4342
  }
4343
+ static getUserTaskFromClientContext(clientContextStr) {
4344
+ if (clientContextStr) {
4345
+ let clientContext = JSON.parse(clientContextStr);
4346
+ return clientContext.client_context.user_task;
4347
+ }
4348
+ return null;
4349
+ }
4343
4350
  buildCanShowPredicate(eventTrigger, form) {
4344
4351
  const currentState = this.getCurrentEventState(eventTrigger, form);
4345
4352
  return (page) => {
@@ -7177,6 +7184,7 @@ class ProfileService {
7177
7184
  .set('experimental', 'true')
7178
7185
  .set('Accept', ProfileService.V2_MEDIATYPE_USER_PROFILE)
7179
7186
  .set('Content-Type', 'application/json');
7187
+ // Not adding client context header because header is added to call immediately afterwards
7180
7188
  return this.httpService
7181
7189
  .get(url, { headers, observe: 'body' })
7182
7190
  .pipe(map((p) => plainToClass(Profile, p)));
@@ -8073,6 +8081,7 @@ class CasesService {
8073
8081
  let headers = new HttpHeaders();
8074
8082
  headers = headers.set('experimental', 'true');
8075
8083
  headers = headers.set('Content-Type', 'application/json');
8084
+ headers = this.addClientContextHeader(headers);
8076
8085
  if (Draft.isDraft(caseId)) {
8077
8086
  headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_DRAFT_TRIGGER);
8078
8087
  }
@@ -8083,9 +8092,10 @@ class CasesService {
8083
8092
  headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_CASE_TRIGGER);
8084
8093
  }
8085
8094
  return this.http
8086
- .get(url, { headers, observe: 'body' })
8087
- .pipe(map(body => {
8088
- return FieldsUtils.handleNestedDynamicLists(body);
8095
+ .get(url, { headers, observe: 'response' })
8096
+ .pipe(map((response) => {
8097
+ this.updateClientContextStorage(response.headers);
8098
+ return FieldsUtils.handleNestedDynamicLists(response.body);
8089
8099
  }), catchError(error => {
8090
8100
  this.errorService.setError(error);
8091
8101
  return throwError(error);
@@ -8094,13 +8104,17 @@ class CasesService {
8094
8104
  createEvent(caseDetails, eventData) {
8095
8105
  const caseId = caseDetails.case_id;
8096
8106
  const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
8097
- const headers = new HttpHeaders()
8107
+ let headers = new HttpHeaders()
8098
8108
  .set('experimental', 'true')
8099
8109
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
8100
8110
  .set('Content-Type', 'application/json');
8111
+ headers = this.addClientContextHeader(headers);
8101
8112
  return this.http
8102
- .post(url, eventData, { headers, observe: 'body' })
8103
- .pipe(catchError(error => {
8113
+ .post(url, eventData, { headers, observe: 'response' })
8114
+ .pipe(map((response) => {
8115
+ this.updateClientContextStorage(response.headers);
8116
+ return response.body;
8117
+ }), catchError(error => {
8104
8118
  this.errorService.setError(error);
8105
8119
  return throwError(error);
8106
8120
  }));
@@ -8108,13 +8122,17 @@ class CasesService {
8108
8122
  validateCase(ctid, eventData, pageId) {
8109
8123
  const pageIdString = pageId ? `?pageId=${pageId}` : '';
8110
8124
  const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
8111
- const headers = new HttpHeaders()
8125
+ let headers = new HttpHeaders()
8112
8126
  .set('experimental', 'true')
8113
8127
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
8114
8128
  .set('Content-Type', 'application/json');
8129
+ headers = this.addClientContextHeader(headers);
8115
8130
  return this.http
8116
- .post(url, eventData, { headers, observe: 'body' })
8117
- .pipe(catchError(error => {
8131
+ .post(url, eventData, { headers, observe: 'response' })
8132
+ .pipe(map((response) => {
8133
+ this.updateClientContextStorage(response.headers);
8134
+ return response.body;
8135
+ }), catchError(error => {
8118
8136
  this.errorService.setError(error);
8119
8137
  return throwError(error);
8120
8138
  }));
@@ -8125,26 +8143,34 @@ class CasesService {
8125
8143
  ignoreWarning = 'true';
8126
8144
  }
8127
8145
  const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
8128
- const headers = new HttpHeaders()
8146
+ let headers = new HttpHeaders()
8129
8147
  .set('experimental', 'true')
8130
8148
  .set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
8131
8149
  .set('Content-Type', 'application/json');
8150
+ headers = this.addClientContextHeader(headers);
8132
8151
  return this.http
8133
- .post(url, eventData, { headers, observe: 'body' })
8134
- .pipe(catchError(error => {
8152
+ .post(url, eventData, { headers, observe: 'response' })
8153
+ .pipe(map((response) => {
8154
+ this.updateClientContextStorage(response.headers);
8155
+ return response.body;
8156
+ }), catchError(error => {
8135
8157
  this.errorService.setError(error);
8136
8158
  return throwError(error);
8137
8159
  }));
8138
8160
  }
8139
8161
  getPrintDocuments(caseId) {
8140
8162
  const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
8141
- const headers = new HttpHeaders()
8163
+ let headers = new HttpHeaders()
8142
8164
  .set('experimental', 'true')
8143
8165
  .set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
8144
8166
  .set('Content-Type', 'application/json');
8167
+ headers = this.addClientContextHeader(headers);
8145
8168
  return this.http
8146
- .get(url, { headers, observe: 'body' })
8147
- .pipe(map(body => body.documentResources), catchError(error => {
8169
+ .get(url, { headers, observe: 'response' })
8170
+ .pipe(map((response) => {
8171
+ this.updateClientContextStorage(response.headers);
8172
+ return response.body.documentResources;
8173
+ }), catchError(error => {
8148
8174
  this.errorService.setError(error);
8149
8175
  return throwError(error);
8150
8176
  }));
@@ -8177,17 +8203,6 @@ class CasesService {
8177
8203
  wizardPage.case_fields = this.orderService.sort(this.wizardPageFieldToCaseFieldMapper.mapAll(wizardPage.wizard_page_fields, eventTrigger.case_fields));
8178
8204
  });
8179
8205
  }
8180
- /*
8181
- Checks if the user has role of pui-case-manager and returns true or false
8182
- */
8183
- isPuiCaseManager() {
8184
- const userInfoStr = this.sessionStorageService.getItem('userDetails');
8185
- if (userInfoStr) {
8186
- const userInfo = JSON.parse(userInfoStr);
8187
- return userInfo && userInfo.roles && (userInfo.roles.indexOf(CasesService.PUI_CASE_MANAGER) !== -1);
8188
- }
8189
- return false;
8190
- }
8191
8206
  getCourtOrHearingCentreName(locationId) {
8192
8207
  return this.http.post(`/api/locations/getLocationsById`, { locations: [{ locationId }] });
8193
8208
  }
@@ -8254,6 +8269,25 @@ class CasesService {
8254
8269
  .get(url)
8255
8270
  .pipe(catchError(error => throwError(error)));
8256
8271
  }
8272
+ addClientContextHeader(headers) {
8273
+ const clientContextDetails = this.sessionStorageService.getItem('clientContext');
8274
+ if (clientContextDetails) {
8275
+ // may require URI encoding in certain circumstances
8276
+ const clientContext = window.btoa(clientContextDetails);
8277
+ if (clientContext) {
8278
+ headers = headers.set('Client-Context', clientContext);
8279
+ }
8280
+ }
8281
+ return headers;
8282
+ }
8283
+ updateClientContextStorage(headers) {
8284
+ // for mocking - TODO: Kasi Remove/Uncomment for testing
8285
+ // headers = this.setMockClientContextHeader(headers);
8286
+ if (headers && headers.get('Client-Context')) {
8287
+ const clientContextString = window.atob(headers.get('Client-Context'));
8288
+ this.sessionStorageService.setItem('clientContext', clientContextString);
8289
+ }
8290
+ }
8257
8291
  static ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(OrderService), i0.ɵɵinject(HttpErrorService), i0.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0.ɵɵinject(LoadingService), i0.ɵɵinject(SessionStorageService), i0.ɵɵinject(RetryUtil)); };
8258
8292
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
8259
8293
  }
@@ -8766,8 +8800,9 @@ class EventCompletionStateMachineService {
8766
8800
  entryActionForStateCompleteEventAndTask(state, context) {
8767
8801
  // Trigger final state to complete processing of state machine
8768
8802
  state.trigger(EventCompletionStates.Final);
8769
- const taskStr = context.sessionStorageService.getItem('taskToComplete');
8770
- if (taskStr) {
8803
+ const clientContextStr = context.sessionStorageService.getItem('clientContext');
8804
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8805
+ if (userTask?.task_data) {
8771
8806
  context.sessionStorageService.setItem('assignNeeded', 'false');
8772
8807
  // just set event can be completed
8773
8808
  context.component.eventCanBeCompleted.emit(true);
@@ -8786,9 +8821,9 @@ class EventCompletionStateMachineService {
8786
8821
  entryActionForStateTaskUnassigned(state, context) {
8787
8822
  // Trigger final state to complete processing of state machine
8788
8823
  state.trigger(EventCompletionStates.Final);
8789
- // Get task details
8790
- const taskStr = context.sessionStorageService.getItem('taskToComplete');
8791
- if (taskStr) {
8824
+ const clientContextStr = context.sessionStorageService.getItem('clientContext');
8825
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8826
+ if (userTask?.task_data) {
8792
8827
  context.sessionStorageService.setItem('assignNeeded', 'true');
8793
8828
  context.component.eventCanBeCompleted.emit(true);
8794
8829
  }
@@ -8823,6 +8858,12 @@ class EventCompletionStateMachineService {
8823
8858
  addTransitionsForStateTaskUnassigned() {
8824
8859
  this.stateTaskUnassigned.addTransition(EventCompletionStates.Final, this.stateFinal);
8825
8860
  }
8861
+ taskPresentInSessionStorage(context) {
8862
+ const clientContextStr = context.sessionStorageService.getItem('clientContext');
8863
+ console.log('clienht cintedt ', clientContextStr);
8864
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8865
+ return !!userTask.task_data;
8866
+ }
8826
8867
  static ɵfac = function EventCompletionStateMachineService_Factory(t) { return new (t || EventCompletionStateMachineService)(); };
8827
8868
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventCompletionStateMachineService, factory: EventCompletionStateMachineService.ɵfac });
8828
8869
  }
@@ -9325,11 +9366,9 @@ class CaseEditComponent {
9325
9366
  this.isSubmitting = true;
9326
9367
  // We have to run the event completion checks if task in session storage
9327
9368
  // and if the task is in session storage, then is it associated to the case
9328
- let taskInSessionStorage;
9329
- const taskStr = this.sessionStorageService.getItem('taskToComplete');
9330
- if (taskStr) {
9331
- taskInSessionStorage = JSON.parse(taskStr);
9332
- }
9369
+ const clientContextStr = this.sessionStorageService.getItem('clientContext');
9370
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
9371
+ const taskInSessionStorage = userTask ? userTask.task_data : null;
9333
9372
  if (taskInSessionStorage && taskInSessionStorage.case_id === this.getCaseId(caseDetails)) {
9334
9373
  // Show event completion component to perform event completion checks
9335
9374
  this.eventCompletionParams = ({
@@ -9528,14 +9567,16 @@ class CaseEditComponent {
9528
9567
  });
9529
9568
  }
9530
9569
  postCompleteTaskIfRequired() {
9531
- const taskStr = this.sessionStorageService.getItem('taskToComplete');
9570
+ const clientContextStr = this.sessionStorageService.getItem('clientContext');
9571
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
9572
+ const [task, taskToBeCompleted] = userTask ? [userTask.task_data, userTask.complete_task] : [null, false];
9532
9573
  const assignNeeded = this.sessionStorageService.getItem('assignNeeded') === 'true';
9533
- if (taskStr && assignNeeded) {
9534
- const task = JSON.parse(taskStr);
9574
+ if (task && assignNeeded && taskToBeCompleted) {
9575
+ // const task: Task = JSON.parse(taskStr);
9535
9576
  return this.workAllocationService.assignAndCompleteTask(task.id);
9536
9577
  }
9537
- else if (taskStr) {
9538
- const task = JSON.parse(taskStr);
9578
+ else if (task && taskToBeCompleted) {
9579
+ // const task: Task = JSON.parse(taskStr);
9539
9580
  return this.workAllocationService.completeTask(task.id);
9540
9581
  }
9541
9582
  return of(true);
@@ -9599,7 +9640,7 @@ class CaseEditComponent {
9599
9640
  }], submitted: [{
9600
9641
  type: Output
9601
9642
  }] }); })();
9602
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 33 }); })();
9643
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 32 }); })();
9603
9644
 
9604
9645
  function CaseEditConfirmComponent_div_3_Template(rf, ctx) { if (rf & 1) {
9605
9646
  i0.ɵɵelement(0, "div");
@@ -11115,8 +11156,12 @@ class CaseEventCompletionTaskReassignedComponent {
11115
11156
  }
11116
11157
  onContinue() {
11117
11158
  // Get task details
11118
- const taskStr = this.sessionStorageService.getItem('taskToComplete');
11119
- if (taskStr) {
11159
+ const clientContextStr = this.sessionStorageService.getItem('clientContext');
11160
+ const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
11161
+ const task = userTask ? userTask.task_data : null;
11162
+ // not complete_task not utilised here as related to event completion
11163
+ // service wanting task associated with event to not be completed not directly relevant
11164
+ if (task) {
11120
11165
  this.sessionStorageService.setItem('assignNeeded', 'true');
11121
11166
  // set event can be completed to true
11122
11167
  this.parentComponent.eventCanBeCompleted.emit(true);
@@ -11140,7 +11185,7 @@ class CaseEventCompletionTaskReassignedComponent {
11140
11185
  type: Inject,
11141
11186
  args: [COMPONENT_PORTAL_INJECTION_TOKEN]
11142
11187
  }] }, { type: i1$1.ActivatedRoute }, { type: WorkAllocationService }, { type: SessionStorageService }, { type: JudicialworkerService }, { type: CaseworkerService }, { type: AlertService }], null); })();
11143
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskReassignedComponent, { className: "CaseEventCompletionTaskReassignedComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.ts", lineNumber: 16 }); })();
11188
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskReassignedComponent, { className: "CaseEventCompletionTaskReassignedComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.ts", lineNumber: 19 }); })();
11144
11189
 
11145
11190
  function CaseEventCompletionComponent_ng_template_0_Template(rf, ctx) { }
11146
11191
  const COMPONENT_PORTAL_INJECTION_TOKEN = new InjectionToken('');
@@ -33507,7 +33552,7 @@ class EventStartGuard {
33507
33552
  workAllocationService;
33508
33553
  router;
33509
33554
  sessionStorageService;
33510
- static TASK_TO_COMPLETE = 'taskToComplete';
33555
+ static CLIENT_CONTEXT = 'clientContext';
33511
33556
  constructor(workAllocationService, router, sessionStorageService) {
33512
33557
  this.workAllocationService = workAllocationService;
33513
33558
  this.router = router;
@@ -33558,18 +33603,26 @@ class EventStartGuard {
33558
33603
  task = tasksAssignedToUser[0];
33559
33604
  }
33560
33605
  // if one task assigned to user, allow user to complete event
33561
- this.sessionStorageService.setItem(EventStartGuard.TASK_TO_COMPLETE, JSON.stringify(task));
33606
+ const storeClientContext = {
33607
+ client_context: {
33608
+ user_task: {
33609
+ task_data: task,
33610
+ complete_task: true
33611
+ }
33612
+ }
33613
+ };
33614
+ this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
33562
33615
  return true;
33563
33616
  }
33564
33617
  }
33565
33618
  removeTaskFromSessionStorage() {
33566
- this.sessionStorageService.removeItem(EventStartGuard.TASK_TO_COMPLETE);
33619
+ this.sessionStorageService.removeItem(EventStartGuard.CLIENT_CONTEXT);
33567
33620
  }
33568
33621
  checkForTasks(payload, caseId, eventId, taskId) {
33569
33622
  if (taskId && payload?.tasks?.length > 0) {
33570
33623
  const task = payload.tasks.find((t) => t.id == taskId);
33571
33624
  if (task) {
33572
- this.sessionStorageService.setItem(EventStartGuard.TASK_TO_COMPLETE, JSON.stringify(task));
33625
+ this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(task));
33573
33626
  }
33574
33627
  else {
33575
33628
  this.removeTaskFromSessionStorage();
@@ -33737,9 +33790,17 @@ class EventStartStateMachineService {
33737
33790
  task = context.tasks[0];
33738
33791
  }
33739
33792
  const taskStr = JSON.stringify(task);
33740
- console.log('entryActionForStateOneTaskAssignedToUser: setting taskToComplete to ' + taskStr);
33793
+ console.log('entryActionForStateOneTaskAssignedToUser: setting client context task_data to ' + taskStr);
33741
33794
  // Store task to session
33742
- context.sessionStorageService.setItem('taskToComplete', taskStr);
33795
+ const clientContext = {
33796
+ client_context: {
33797
+ user_task: {
33798
+ task_data: task,
33799
+ complete_task: true
33800
+ }
33801
+ }
33802
+ };
33803
+ context.sessionStorageService.setItem('clientContext', JSON.stringify(clientContext));
33743
33804
  // Allow user to perform the event
33744
33805
  context.router.navigate([`/cases/case-details/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
33745
33806
  }
@@ -36080,45 +36141,43 @@ function SearchResultComponent_table_0_div_5_Template(rf, ctx) { if (rf & 1) {
36080
36141
  } }
36081
36142
  function SearchResultComponent_table_0_div_6_Template(rf, ctx) { if (rf & 1) {
36082
36143
  i0.ɵɵelementStart(0, "div", 16);
36083
- i0.ɵɵelement(1, "output");
36084
- i0.ɵɵpipe(2, "rpxTranslate");
36085
- i0.ɵɵelementStart(3, "span", 17);
36086
- i0.ɵɵtext(4);
36087
- i0.ɵɵpipe(5, "rpxTranslate");
36088
- i0.ɵɵelementStart(6, "span", 18);
36144
+ i0.ɵɵpipe(1, "rpxTranslate");
36145
+ i0.ɵɵelementStart(2, "span", 17);
36146
+ i0.ɵɵtext(3);
36147
+ i0.ɵɵpipe(4, "rpxTranslate");
36148
+ i0.ɵɵelementStart(5, "span", 18);
36149
+ i0.ɵɵtext(6);
36150
+ i0.ɵɵelementEnd();
36089
36151
  i0.ɵɵtext(7);
36152
+ i0.ɵɵpipe(8, "rpxTranslate");
36153
+ i0.ɵɵelementStart(9, "span", 18);
36154
+ i0.ɵɵtext(10);
36090
36155
  i0.ɵɵelementEnd();
36091
- i0.ɵɵtext(8);
36092
- i0.ɵɵpipe(9, "rpxTranslate");
36093
- i0.ɵɵelementStart(10, "span", 18);
36094
36156
  i0.ɵɵtext(11);
36157
+ i0.ɵɵpipe(12, "rpxTranslate");
36158
+ i0.ɵɵelementStart(13, "span", 18);
36159
+ i0.ɵɵtext(14);
36095
36160
  i0.ɵɵelementEnd();
36096
- i0.ɵɵtext(12);
36097
- i0.ɵɵpipe(13, "rpxTranslate");
36098
- i0.ɵɵelementStart(14, "span", 18);
36099
36161
  i0.ɵɵtext(15);
36100
- i0.ɵɵelementEnd();
36101
- i0.ɵɵtext(16);
36102
- i0.ɵɵpipe(17, "rpxTranslate");
36162
+ i0.ɵɵpipe(16, "rpxTranslate");
36103
36163
  i0.ɵɵelementEnd()();
36104
36164
  } if (rf & 2) {
36105
36165
  const ctx_r0 = i0.ɵɵnextContext(2);
36106
- i0.ɵɵadvance();
36107
- i0.ɵɵattribute("aria-label", i0.ɵɵpipeBind1(2, 8, ctx_r0.getTotalResults() + " results have been found"));
36166
+ i0.ɵɵattribute("aria-label", i0.ɵɵpipeBind1(1, 8, ctx_r0.getTotalResults() + " results have been found"));
36108
36167
  i0.ɵɵadvance(3);
36109
- i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 10, "Showing"), " ");
36168
+ i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(4, 10, "Showing"), " ");
36110
36169
  i0.ɵɵadvance(3);
36111
36170
  i0.ɵɵtextInterpolate(ctx_r0.getFirstResult());
36112
36171
  i0.ɵɵadvance();
36113
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 12, "to"), " ");
36172
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 12, "to"), " ");
36114
36173
  i0.ɵɵadvance(3);
36115
36174
  i0.ɵɵtextInterpolate(ctx_r0.getLastResult());
36116
36175
  i0.ɵɵadvance();
36117
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(13, 14, "of"), " ");
36176
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(12, 14, "of"), " ");
36118
36177
  i0.ɵɵadvance(3);
36119
36178
  i0.ɵɵtextInterpolate(ctx_r0.getTotalResults());
36120
36179
  i0.ɵɵadvance();
36121
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(17, 16, "results"), "");
36180
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(16, 16, "results"), "");
36122
36181
  } }
36123
36182
  function SearchResultComponent_table_0_div_7_Template(rf, ctx) { if (rf & 1) {
36124
36183
  const _r2 = i0.ɵɵgetCurrentView();
@@ -36146,10 +36205,10 @@ function SearchResultComponent_table_0_th_10_Template(rf, ctx) { if (rf & 1) {
36146
36205
  i0.ɵɵadvance(2);
36147
36206
  i0.ɵɵproperty("checked", ctx_r0.allOnPageSelected())("disabled", !ctx_r0.canAnyBeShared());
36148
36207
  } }
36149
- function SearchResultComponent_table_0_th_11_div_5_Template(rf, ctx) { if (rf & 1) {
36208
+ function SearchResultComponent_table_0_th_11_div_8_Template(rf, ctx) { if (rf & 1) {
36150
36209
  const _r6 = i0.ɵɵgetCurrentView();
36151
36210
  i0.ɵɵelementStart(0, "div", 28)(1, "a", 29);
36152
- i0.ɵɵlistener("click", function SearchResultComponent_table_0_th_11_div_5_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r6); const col_r5 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.sort(col_r5)); });
36211
+ i0.ɵɵlistener("click", function SearchResultComponent_table_0_th_11_div_8_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r6); const col_r5 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.sort(col_r5)); });
36153
36212
  i0.ɵɵelementEnd()();
36154
36213
  } if (rf & 2) {
36155
36214
  const col_r5 = i0.ɵɵnextContext().$implicit;
@@ -36159,33 +36218,34 @@ function SearchResultComponent_table_0_th_11_div_5_Template(rf, ctx) { if (rf &
36159
36218
  } }
36160
36219
  function SearchResultComponent_table_0_th_11_Template(rf, ctx) { if (rf & 1) {
36161
36220
  const _r4 = i0.ɵɵgetCurrentView();
36162
- i0.ɵɵelementStart(0, "th", 25)(1, "div")(2, "div", 26);
36163
- i0.ɵɵlistener("click", function SearchResultComponent_table_0_th_11_Template_div_click_2_listener() { const col_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.sort(col_r5)); })("keyup", function SearchResultComponent_table_0_th_11_Template_div_keyup_2_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.noop()); });
36164
- i0.ɵɵtext(3);
36165
- i0.ɵɵpipe(4, "rpxTranslate");
36221
+ i0.ɵɵelementStart(0, "th")(1, "table", 25);
36222
+ i0.ɵɵpipe(2, "rpxTranslate");
36223
+ i0.ɵɵelementStart(3, "tr")(4, "th")(5, "div", 26);
36224
+ i0.ɵɵlistener("click", function SearchResultComponent_table_0_th_11_Template_div_click_5_listener() { const col_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.sort(col_r5)); });
36225
+ i0.ɵɵtext(6);
36226
+ i0.ɵɵpipe(7, "rpxTranslate");
36166
36227
  i0.ɵɵelementEnd();
36167
- i0.ɵɵtemplate(5, SearchResultComponent_table_0_th_11_div_5_Template, 2, 1, "div", 27);
36168
- i0.ɵɵelementEnd()();
36228
+ i0.ɵɵtemplate(8, SearchResultComponent_table_0_th_11_div_8_Template, 2, 1, "div", 27);
36229
+ i0.ɵɵelementEnd()()()();
36169
36230
  } if (rf & 2) {
36170
36231
  const col_r5 = ctx.$implicit;
36171
36232
  const ctx_r0 = i0.ɵɵnextContext(2);
36172
- i0.ɵɵattribute("aria-sort", ctx_r0.isSortAscending(col_r5) === null ? null : ctx_r0.isSortAscending(col_r5) ? "ascending" : "descending");
36173
- i0.ɵɵadvance(3);
36174
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 3, col_r5.label), " ");
36233
+ i0.ɵɵadvance();
36234
+ i0.ɵɵattribute("aria-label", i0.ɵɵpipeBind1(2, 3, "Sort by " + col_r5.label + " " + ctx_r0.isSortAscending(col_r5) ? "ascending" : "descending"));
36235
+ i0.ɵɵadvance(5);
36236
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 5, col_r5.label), " ");
36175
36237
  i0.ɵɵadvance(2);
36176
36238
  i0.ɵɵproperty("ngIf", ctx_r0.comparator(col_r5));
36177
36239
  } }
36178
36240
  function SearchResultComponent_table_0_th_12_Template(rf, ctx) { if (rf & 1) {
36179
- i0.ɵɵelementStart(0, "th", 30);
36180
- i0.ɵɵtext(1, "\u200B");
36181
- i0.ɵɵelementEnd();
36241
+ i0.ɵɵelement(0, "th", 30);
36182
36242
  } }
36183
36243
  function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template(rf, ctx) { if (rf & 1) {
36184
36244
  const _r7 = i0.ɵɵgetCurrentView();
36185
- i0.ɵɵelementStart(0, "td", 21)(1, "div", 22)(2, "input", 33);
36245
+ i0.ɵɵelementStart(0, "td", 21)(1, "div", 22)(2, "input", 32);
36186
36246
  i0.ɵɵlistener("change", function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r7); const result_r8 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.changeSelection(result_r8)); });
36187
36247
  i0.ɵɵelementEnd();
36188
- i0.ɵɵelement(3, "label", 34);
36248
+ i0.ɵɵelement(3, "label", 33);
36189
36249
  i0.ɵɵelementEnd()();
36190
36250
  } if (rf & 2) {
36191
36251
  const result_r8 = i0.ɵɵnextContext().$implicit;
@@ -36198,7 +36258,7 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template(rf, ct
36198
36258
  i0.ɵɵpropertyInterpolate1("for", "select-", result_r8.case_id, "");
36199
36259
  } }
36200
36260
  function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template(rf, ctx) { if (rf & 1) {
36201
- i0.ɵɵelement(0, "ccd-field-read", 42);
36261
+ i0.ɵɵelement(0, "ccd-field-read", 41);
36202
36262
  } if (rf & 2) {
36203
36263
  const col_r9 = i0.ɵɵnextContext(3).$implicit;
36204
36264
  const result_r8 = i0.ɵɵnextContext().$implicit;
@@ -36213,8 +36273,8 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_containe
36213
36273
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(1, 1, result_r8.case_id));
36214
36274
  } }
36215
36275
  function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
36216
- i0.ɵɵelementContainerStart(0, 40);
36217
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template, 1, 4, "ccd-field-read", 41)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_ng_template_2_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
36276
+ i0.ɵɵelementContainerStart(0, 39);
36277
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template, 1, 4, "ccd-field-read", 40)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_ng_template_2_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
36218
36278
  i0.ɵɵelementContainerEnd();
36219
36279
  } if (rf & 2) {
36220
36280
  const case_reference_r10 = i0.ɵɵreference(3);
@@ -36225,9 +36285,9 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_containe
36225
36285
  i0.ɵɵproperty("ngIf", ctx_r0.draftPrefixOrGet(col_r9, result_r8))("ngIfElse", case_reference_r10);
36226
36286
  } }
36227
36287
  function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_Template(rf, ctx) { if (rf & 1) {
36228
- i0.ɵɵelementStart(0, "a", 38);
36288
+ i0.ɵɵelementStart(0, "a", 37);
36229
36289
  i0.ɵɵpipe(1, "ccdCaseReference");
36230
- i0.ɵɵtemplate(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_Template, 4, 2, "ng-container", 39);
36290
+ i0.ɵɵtemplate(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_Template, 4, 2, "ng-container", 38);
36231
36291
  i0.ɵɵelementEnd();
36232
36292
  } if (rf & 2) {
36233
36293
  const result_r8 = i0.ɵɵnextContext(2).$implicit;
@@ -36238,8 +36298,8 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_Template(rf
36238
36298
  i0.ɵɵproperty("ngIf", !ctx_r0.hideRows);
36239
36299
  } }
36240
36300
  function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_div_2_Template(rf, ctx) { if (rf & 1) {
36241
- i0.ɵɵelementStart(0, "div", 40);
36242
- i0.ɵɵelement(1, "ccd-field-read", 42);
36301
+ i0.ɵɵelementStart(0, "div", 39);
36302
+ i0.ɵɵelement(1, "ccd-field-read", 41);
36243
36303
  i0.ɵɵelementEnd();
36244
36304
  } if (rf & 2) {
36245
36305
  const col_r9 = i0.ɵɵnextContext().$implicit;
@@ -36250,8 +36310,8 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_div_2_Template(
36250
36310
  i0.ɵɵproperty("caseField", result_r8.columns[col_r9.case_field_id])("contextFields", result_r8.hydrated_case_fields)("elementsToSubstitute", i0.ɵɵpureFunction0(5, _c1));
36251
36311
  } }
36252
36312
  function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_Template(rf, ctx) { if (rf & 1) {
36253
- i0.ɵɵelementStart(0, "td", 35);
36254
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_Template, 3, 6, "a", 36)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_div_2_Template, 2, 6, "div", 37);
36313
+ i0.ɵɵelementStart(0, "td", 34);
36314
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_Template, 3, 6, "a", 35)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_div_2_Template, 2, 6, "div", 36);
36255
36315
  i0.ɵɵelementEnd();
36256
36316
  } if (rf & 2) {
36257
36317
  const colIndex_r11 = ctx.index;
@@ -36262,7 +36322,7 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_Template(rf, ct
36262
36322
  } }
36263
36323
  function SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template(rf, ctx) { if (rf & 1) {
36264
36324
  i0.ɵɵelementStart(0, "td")(1, "div");
36265
- i0.ɵɵelement(2, "ccd-activity", 43);
36325
+ i0.ɵɵelement(2, "ccd-activity", 42);
36266
36326
  i0.ɵɵelementEnd()();
36267
36327
  } if (rf & 2) {
36268
36328
  const result_r8 = i0.ɵɵnextContext().$implicit;
@@ -36274,7 +36334,7 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template(rf, ct
36274
36334
  } }
36275
36335
  function SearchResultComponent_table_0_ng_container_14_tr_1_Template(rf, ctx) { if (rf & 1) {
36276
36336
  i0.ɵɵelementStart(0, "tr");
36277
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template, 4, 8, "td", 9)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_Template, 3, 2, "td", 32)(3, SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template, 3, 4, "td", 1);
36337
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template, 4, 8, "td", 9)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_Template, 3, 2, "td", 31)(3, SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template, 3, 4, "td", 1);
36278
36338
  i0.ɵɵelementEnd();
36279
36339
  } if (rf & 2) {
36280
36340
  const ctx_r0 = i0.ɵɵnextContext(3);
@@ -36287,7 +36347,7 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_Template(rf, ctx) {
36287
36347
  } }
36288
36348
  function SearchResultComponent_table_0_ng_container_14_Template(rf, ctx) { if (rf & 1) {
36289
36349
  i0.ɵɵelementContainerStart(0);
36290
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_Template, 4, 3, "tr", 31);
36350
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_Template, 4, 3, "tr", 10);
36291
36351
  i0.ɵɵpipe(2, "paginate");
36292
36352
  i0.ɵɵelementContainerEnd();
36293
36353
  } if (rf & 2) {
@@ -36297,10 +36357,10 @@ function SearchResultComponent_table_0_ng_container_14_Template(rf, ctx) { if (r
36297
36357
  } }
36298
36358
  function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template(rf, ctx) { if (rf & 1) {
36299
36359
  const _r12 = i0.ɵɵgetCurrentView();
36300
- i0.ɵɵelementStart(0, "td", 21)(1, "div", 22)(2, "input", 44);
36360
+ i0.ɵɵelementStart(0, "td", 21)(1, "div", 22)(2, "input", 43);
36301
36361
  i0.ɵɵlistener("change", function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r12); const result_r13 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.changeSelection(result_r13)); })("keyup", function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template_input_keyup_2_listener($event) { i0.ɵɵrestoreView(_r12); const result_r13 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onKeyUp($event, result_r13)); });
36302
36362
  i0.ɵɵelementEnd();
36303
- i0.ɵɵelement(3, "label", 34);
36363
+ i0.ɵɵelement(3, "label", 33);
36304
36364
  i0.ɵɵelementEnd()();
36305
36365
  } if (rf & 2) {
36306
36366
  const result_r13 = i0.ɵɵnextContext().$implicit;
@@ -36313,7 +36373,7 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template(rf, ct
36313
36373
  i0.ɵɵpropertyInterpolate1("for", "select-", result_r13.case_id, "");
36314
36374
  } }
36315
36375
  function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template(rf, ctx) { if (rf & 1) {
36316
- i0.ɵɵelement(0, "ccd-field-read", 42);
36376
+ i0.ɵɵelement(0, "ccd-field-read", 41);
36317
36377
  } if (rf & 2) {
36318
36378
  const col_r14 = i0.ɵɵnextContext(3).$implicit;
36319
36379
  const result_r13 = i0.ɵɵnextContext().$implicit;
@@ -36328,8 +36388,8 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_containe
36328
36388
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(1, 1, result_r13.case_id));
36329
36389
  } }
36330
36390
  function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
36331
- i0.ɵɵelementContainerStart(0, 40);
36332
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template, 1, 4, "ccd-field-read", 41)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_ng_template_2_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
36391
+ i0.ɵɵelementContainerStart(0, 39);
36392
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template, 1, 4, "ccd-field-read", 40)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_ng_template_2_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
36333
36393
  i0.ɵɵelementContainerEnd();
36334
36394
  } if (rf & 2) {
36335
36395
  const case_reference_r15 = i0.ɵɵreference(3);
@@ -36340,9 +36400,9 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_containe
36340
36400
  i0.ɵɵproperty("ngIf", ctx_r0.draftPrefixOrGet(col_r14, result_r13))("ngIfElse", case_reference_r15);
36341
36401
  } }
36342
36402
  function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_Template(rf, ctx) { if (rf & 1) {
36343
- i0.ɵɵelementStart(0, "a", 38);
36403
+ i0.ɵɵelementStart(0, "a", 37);
36344
36404
  i0.ɵɵpipe(1, "ccdCaseReference");
36345
- i0.ɵɵtemplate(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_Template, 4, 2, "ng-container", 39);
36405
+ i0.ɵɵtemplate(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_Template, 4, 2, "ng-container", 38);
36346
36406
  i0.ɵɵelementEnd();
36347
36407
  } if (rf & 2) {
36348
36408
  const result_r13 = i0.ɵɵnextContext(2).$implicit;
@@ -36353,8 +36413,8 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_Template(rf
36353
36413
  i0.ɵɵproperty("ngIf", !ctx_r0.hideRows);
36354
36414
  } }
36355
36415
  function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_div_2_Template(rf, ctx) { if (rf & 1) {
36356
- i0.ɵɵelementStart(0, "div", 40);
36357
- i0.ɵɵelement(1, "ccd-field-read", 42);
36416
+ i0.ɵɵelementStart(0, "div", 39);
36417
+ i0.ɵɵelement(1, "ccd-field-read", 41);
36358
36418
  i0.ɵɵelementEnd();
36359
36419
  } if (rf & 2) {
36360
36420
  const col_r14 = i0.ɵɵnextContext().$implicit;
@@ -36365,8 +36425,8 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_div_2_Template(
36365
36425
  i0.ɵɵproperty("caseField", result_r13.columns[col_r14.case_field_id])("contextFields", result_r13.hydrated_case_fields)("elementsToSubstitute", i0.ɵɵpureFunction0(5, _c1));
36366
36426
  } }
36367
36427
  function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_Template(rf, ctx) { if (rf & 1) {
36368
- i0.ɵɵelementStart(0, "td", 35);
36369
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_Template, 3, 6, "a", 36)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_div_2_Template, 2, 6, "div", 37);
36428
+ i0.ɵɵelementStart(0, "td", 34);
36429
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_Template, 3, 6, "a", 35)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_div_2_Template, 2, 6, "div", 36);
36370
36430
  i0.ɵɵelementEnd();
36371
36431
  } if (rf & 2) {
36372
36432
  const colIndex_r16 = ctx.index;
@@ -36377,7 +36437,7 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_Template(rf, ct
36377
36437
  } }
36378
36438
  function SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template(rf, ctx) { if (rf & 1) {
36379
36439
  i0.ɵɵelementStart(0, "td")(1, "div");
36380
- i0.ɵɵelement(2, "ccd-activity", 43);
36440
+ i0.ɵɵelement(2, "ccd-activity", 42);
36381
36441
  i0.ɵɵelementEnd()();
36382
36442
  } if (rf & 2) {
36383
36443
  const result_r13 = i0.ɵɵnextContext().$implicit;
@@ -36389,7 +36449,7 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template(rf, ct
36389
36449
  } }
36390
36450
  function SearchResultComponent_table_0_ng_container_15_tr_1_Template(rf, ctx) { if (rf & 1) {
36391
36451
  i0.ɵɵelementStart(0, "tr");
36392
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template, 4, 8, "td", 9)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_Template, 3, 2, "td", 32)(3, SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template, 3, 4, "td", 1);
36452
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template, 4, 8, "td", 9)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_Template, 3, 2, "td", 31)(3, SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template, 3, 4, "td", 1);
36393
36453
  i0.ɵɵelementEnd();
36394
36454
  } if (rf & 2) {
36395
36455
  const ctx_r0 = i0.ɵɵnextContext(3);
@@ -36402,7 +36462,7 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_Template(rf, ctx) {
36402
36462
  } }
36403
36463
  function SearchResultComponent_table_0_ng_container_15_Template(rf, ctx) { if (rf & 1) {
36404
36464
  i0.ɵɵelementContainerStart(0);
36405
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_Template, 4, 3, "tr", 31);
36465
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_Template, 4, 3, "tr", 10);
36406
36466
  i0.ɵɵpipe(2, "ccdSortSearchResult");
36407
36467
  i0.ɵɵpipe(3, "paginate");
36408
36468
  i0.ɵɵelementContainerEnd();
@@ -36416,10 +36476,10 @@ function SearchResultComponent_table_0_Template(rf, ctx) { if (rf & 1) {
36416
36476
  i0.ɵɵtext(3);
36417
36477
  i0.ɵɵpipe(4, "rpxTranslate");
36418
36478
  i0.ɵɵelementEnd();
36419
- i0.ɵɵtemplate(5, SearchResultComponent_table_0_div_5_Template, 11, 12, "div", 5)(6, SearchResultComponent_table_0_div_6_Template, 18, 18, "div", 6)(7, SearchResultComponent_table_0_div_7_Template, 6, 6, "div", 7);
36479
+ i0.ɵɵtemplate(5, SearchResultComponent_table_0_div_5_Template, 11, 12, "div", 5)(6, SearchResultComponent_table_0_div_6_Template, 17, 18, "div", 6)(7, SearchResultComponent_table_0_div_7_Template, 6, 6, "div", 7);
36420
36480
  i0.ɵɵelementEnd();
36421
36481
  i0.ɵɵelementStart(8, "thead")(9, "tr", 8);
36422
- i0.ɵɵtemplate(10, SearchResultComponent_table_0_th_10_Template, 4, 2, "th", 9)(11, SearchResultComponent_table_0_th_11_Template, 6, 5, "th", 10)(12, SearchResultComponent_table_0_th_12_Template, 2, 0, "th", 11);
36482
+ i0.ɵɵtemplate(10, SearchResultComponent_table_0_th_10_Template, 4, 2, "th", 9)(11, SearchResultComponent_table_0_th_11_Template, 9, 7, "th", 10)(12, SearchResultComponent_table_0_th_12_Template, 1, 0, "th", 11);
36423
36483
  i0.ɵɵelementEnd()();
36424
36484
  i0.ɵɵelementStart(13, "tbody");
36425
36485
  i0.ɵɵtemplate(14, SearchResultComponent_table_0_ng_container_14_Template, 3, 8, "ng-container", 1)(15, SearchResultComponent_table_0_ng_container_15_Template, 4, 11, "ng-container", 1);
@@ -36447,7 +36507,7 @@ function SearchResultComponent_table_0_Template(rf, ctx) { if (rf & 1) {
36447
36507
  } }
36448
36508
  function SearchResultComponent_ccd_pagination_1_Template(rf, ctx) { if (rf & 1) {
36449
36509
  const _r17 = i0.ɵɵgetCurrentView();
36450
- i0.ɵɵelementStart(0, "ccd-pagination", 45);
36510
+ i0.ɵɵelementStart(0, "ccd-pagination", 44);
36451
36511
  i0.ɵɵlistener("pageChange", function SearchResultComponent_ccd_pagination_1_Template_ccd_pagination_pageChange_0_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.goToPage($event)); });
36452
36512
  i0.ɵɵelementEnd();
36453
36513
  } if (rf & 2) {
@@ -36455,7 +36515,7 @@ function SearchResultComponent_ccd_pagination_1_Template(rf, ctx) { if (rf & 1)
36455
36515
  i0.ɵɵproperty("visibilityLabel", ctx_r0.hideRows ? "hidden" : "visible")("autoHide", true)("maxSize", 8)("screenReaderPaginationLabel", "Pagination")("screenReaderPageLabel", ctx_r0.page)("screenReaderCurrentLabel", "You're on page");
36456
36516
  } }
36457
36517
  function SearchResultComponent_div_2_Template(rf, ctx) { if (rf & 1) {
36458
- i0.ɵɵelementStart(0, "div", 46);
36518
+ i0.ɵɵelementStart(0, "div", 45);
36459
36519
  i0.ɵɵpipe(1, "rpxTranslate");
36460
36520
  i0.ɵɵtext(2);
36461
36521
  i0.ɵɵpipe(3, "rpxTranslate");
@@ -36760,11 +36820,24 @@ class SearchResultComponent {
36760
36820
  return result.case_id.startsWith(DRAFT_PREFIX) ? DRAFT_PREFIX : this.hyphenateIfCaseReferenceOrGet(col, result);
36761
36821
  }
36762
36822
  isSortAscending(column) {
36763
- // simple way to determine if the column param is sorted and if its asc/desc
36764
- if (this.consumerSortParameters.column === column.case_field_id) {
36765
- return this.consumerSortParameters.order === SortOrder$1.ASCENDING;
36823
+ const currentSortOrder = this.currentSortOrder(column);
36824
+ return currentSortOrder === SortOrder$1.UNSORTED || currentSortOrder === SortOrder$1.DESCENDING;
36825
+ }
36826
+ currentSortOrder(column) {
36827
+ let isAscending = true;
36828
+ let isDescending = true;
36829
+ if (this.comparator(column) === undefined) {
36830
+ return SortOrder$1.UNSORTED;
36831
+ }
36832
+ for (let i = 0; i < this.resultView.results.length - 1; i++) {
36833
+ const comparison = this.comparator(column).compare(this.resultView.results[i], this.resultView.results[i + 1]);
36834
+ isDescending = isDescending && comparison <= 0;
36835
+ isAscending = isAscending && comparison >= 0;
36836
+ if (!isAscending && !isDescending) {
36837
+ break;
36838
+ }
36766
36839
  }
36767
- return null;
36840
+ return isAscending ? SortOrder$1.ASCENDING : isDescending ? SortOrder$1.DESCENDING : SortOrder$1.UNSORTED;
36768
36841
  }
36769
36842
  getFirstResult() {
36770
36843
  const currentPage = (this.selected.page ? this.selected.page : 1);
@@ -36803,10 +36876,8 @@ class SearchResultComponent {
36803
36876
  }
36804
36877
  }
36805
36878
  }
36806
- // eslint-disable-next-line @typescript-eslint/no-empty-function
36807
- noop() { }
36808
36879
  static ɵfac = function SearchResultComponent_Factory(t) { return new (t || SearchResultComponent)(i0.ɵɵdirectiveInject(SearchResultViewItemComparatorFactory), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(ActivityService), i0.ɵɵdirectiveInject(CaseReferencePipe), i0.ɵɵdirectiveInject(PlaceholderService), i0.ɵɵdirectiveInject(BrowserService), i0.ɵɵdirectiveInject(SessionStorageService)); };
36809
- 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" }, 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", "scope", "col", 4, "ngIf"], ["class", "search-result-column-header", 4, "ngFor", "ngForOf"], ["style", "width: 110px;", 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", "javascript:void(0)", 1, "search-result-reset-link", 3, "click"], ["scope", "col", 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"], [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", "javascript:void(0)", 1, "sort-widget", 3, "click", "innerHTML"], [2, "width", "110px"], [4, "ngFor", "ngForOf"], ["class", "search-result-column-cell", "scope", "row", 4, "ngFor", "ngForOf"], ["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) {
36880
+ 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" }, 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", "role", "status", 4, "ngIf"], ["class", "reset-selection", 4, "ngIf"], ["scope", "row"], ["class", "govuk-table__checkbox", "scope", "col", 4, "ngIf"], [4, "ngFor", "ngForOf"], ["style", "width: 110px;", 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"], ["role", "status", 1, "pagination-top"], ["id", "search-result-summary__text", 1, "text-16"], [1, "govuk-!-font-weight-bold"], [1, "reset-selection"], ["href", "javascript:void(0)", 1, "search-result-reset-link", 3, "click"], ["scope", "col", 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"], [1, "search-result-column-header"], [1, "search-result-column-label", 3, "click"], ["class", "search-result-column-sort", 4, "ngIf"], [1, "search-result-column-sort"], ["href", "javascript:void(0)", 1, "sort-widget", 3, "click", "innerHTML"], [2, "width", "110px"], ["class", "search-result-column-cell", "scope", "row", 4, "ngFor", "ngForOf"], ["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) {
36810
36881
  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);
36811
36882
  } if (rf & 2) {
36812
36883
  i0.ɵɵproperty("ngIf", ctx.hasResults() || ctx.hasDrafts());
@@ -36818,7 +36889,7 @@ class SearchResultComponent {
36818
36889
  }
36819
36890
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
36820
36891
  type: Component,
36821
- args: [{ selector: 'ccd-search-result', 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=\"javascript:void(0)\" (click)=\"clearSelection()\">{{'Reset case selection' | rpxTranslate}}</a></span>\n </div>\n </caption>\n <thead>\n <tr scope=\"row\">\n <th *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\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\">\n </label>\n </div>\n </th>\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')\">\n <div>\n <div class=\"search-result-column-label\" (click)=\"sort(col)\" (keyup)=\"noop()\">\n {{col.label | rpxTranslate}}\n </div>\n <div *ngIf=\"comparator(col)\" class=\"search-result-column-sort\">\n <a (click)=\"sort(col)\" class=\"sort-widget\" [innerHTML]=\"sortWidget(col)\" href=\"javascript:void(0)\"></a>\n </div>\n </div>\n </th>\n <th *ngIf=\"activityEnabled()\" style=\"width: 110px;\">&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 }}\">\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 }}\">\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"] }]
36892
+ args: [{ selector: 'ccd-search-result', 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 [attr.aria-label]=\"getTotalResults() + ' results have been found' | rpxTranslate\" role=\"status\">\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=\"javascript:void(0)\" (click)=\"clearSelection()\">{{'Reset case selection' | rpxTranslate}}</a></span>\n </div>\n </caption>\n <thead>\n <tr scope=\"row\">\n <th *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\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\">\n </label>\n </div>\n </th>\n <th *ngFor=\"let col of resultView.columns\">\n <table class=\"search-result-column-header\"\n [attr.aria-label]=\"('Sort by ' + col.label + ' ' + isSortAscending(col)? 'ascending' : 'descending') | rpxTranslate\">\n <tr>\n <th>\n <div class=\"search-result-column-label\" (click)=\"sort(col)\">\n {{col.label | rpxTranslate}}\n </div>\n <div *ngIf=\"comparator(col)\" class=\"search-result-column-sort\">\n <a (click)=\"sort(col)\" class=\"sort-widget\" [innerHTML]=\"sortWidget(col)\" href=\"javascript:void(0)\"></a>\n </div>\n </th>\n </tr>\n </table>\n </th>\n <th *ngIf=\"activityEnabled()\" style=\"width: 110px;\"></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 }}\">\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 }}\">\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"] }]
36822
36893
  }], () => [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }], { caseLinkUrlTemplate: [{
36823
36894
  type: Input
36824
36895
  }], jurisdiction: [{