@hmcts/ccd-case-ui-toolkit 5.0.22-angular11-upgrade → 5.0.24-case-file-view-post-ccd-toolkit-angular11-upgrade

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 (61) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +202 -69
  2. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
  3. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
  4. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
  5. package/esm2015/lib/app.config.js +1 -1
  6. package/esm2015/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +64 -78
  7. package/esm2015/lib/shared/components/case-viewer/services/case.resolver.js +13 -15
  8. package/esm2015/lib/shared/components/event-start/event-guard/event-start.guard.js +20 -13
  9. package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field.component.js +55 -0
  10. package/esm2015/lib/shared/components/palette/case-file-view/index.js +2 -0
  11. package/esm2015/lib/shared/components/palette/index.js +2 -1
  12. package/esm2015/lib/shared/components/palette/palette.module.js +11 -4
  13. package/esm2015/lib/shared/components/palette/palette.service.js +18 -1
  14. package/esm2015/lib/shared/components/palette/utils/utils.module.js +7 -2
  15. package/esm2015/lib/shared/domain/case-file-view/case-file-view-category.model.js +3 -0
  16. package/esm2015/lib/shared/domain/case-file-view/case-file-view-document.model.js +3 -0
  17. package/esm2015/lib/shared/domain/case-file-view/categories-and-documents.model.js +7 -0
  18. package/esm2015/lib/shared/domain/case-file-view/index.js +4 -0
  19. package/esm2015/lib/shared/domain/definition/field-type-enum.model.js +1 -1
  20. package/esm2015/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.js +2 -2
  21. package/esm2015/lib/shared/services/case-file-view/case-file-view.service.js +47 -0
  22. package/esm2015/lib/shared/services/case-file-view/index.js +2 -0
  23. package/esm2015/lib/shared/services/index.js +2 -1
  24. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +190 -68
  25. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  26. package/lib/app.config.d.ts +4 -0
  27. package/lib/app.config.d.ts.map +1 -1
  28. package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts +16 -19
  29. package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts.map +1 -1
  30. package/lib/shared/components/case-viewer/services/case.resolver.d.ts +2 -1
  31. package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
  32. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
  33. package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts +10 -0
  34. package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts.map +1 -0
  35. package/lib/shared/components/palette/case-file-view/index.d.ts +2 -0
  36. package/lib/shared/components/palette/case-file-view/index.d.ts.map +1 -0
  37. package/lib/shared/components/palette/index.d.ts +1 -0
  38. package/lib/shared/components/palette/index.d.ts.map +1 -1
  39. package/lib/shared/components/palette/palette.module.d.ts +22 -21
  40. package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
  41. package/lib/shared/components/palette/palette.service.d.ts +2 -0
  42. package/lib/shared/components/palette/palette.service.d.ts.map +1 -1
  43. package/lib/shared/components/palette/utils/utils.module.d.ts.map +1 -1
  44. package/lib/shared/domain/case-file-view/case-file-view-category.model.d.ts +9 -0
  45. package/lib/shared/domain/case-file-view/case-file-view-category.model.d.ts.map +1 -0
  46. package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts +8 -0
  47. package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts.map +1 -0
  48. package/lib/shared/domain/case-file-view/categories-and-documents.model.d.ts +12 -0
  49. package/lib/shared/domain/case-file-view/categories-and-documents.model.d.ts.map +1 -0
  50. package/lib/shared/domain/case-file-view/index.d.ts +4 -0
  51. package/lib/shared/domain/case-file-view/index.d.ts.map +1 -0
  52. package/lib/shared/domain/definition/field-type-enum.model.d.ts +1 -1
  53. package/lib/shared/domain/definition/field-type-enum.model.d.ts.map +1 -1
  54. package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts.map +1 -1
  55. package/lib/shared/services/case-file-view/case-file-view.service.d.ts +22 -0
  56. package/lib/shared/services/case-file-view/case-file-view.service.d.ts.map +1 -0
  57. package/lib/shared/services/case-file-view/index.d.ts +2 -0
  58. package/lib/shared/services/case-file-view/index.d.ts.map +1 -0
  59. package/lib/shared/services/index.d.ts +1 -0
  60. package/lib/shared/services/index.d.ts.map +1 -1
  61. package/package.json +1 -1
@@ -7,10 +7,10 @@ import { RouterModule, NavigationStart, NavigationEnd } from '@angular/router';
7
7
  import * as i1$3 from '@angular/forms';
8
8
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormArray, FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
9
9
  import polling from 'rx-polling';
10
- import { throwError, Subject, EMPTY, Observable, BehaviorSubject, of, timer } from 'rxjs';
10
+ import { throwError, Subject, EMPTY, Observable, BehaviorSubject, fromEvent, of, timer } from 'rxjs';
11
11
  import * as i1$2 from '@angular/common/http';
12
12
  import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
13
- import { catchError, map, publish, refCount, debounceTime, distinctUntilChanged, finalize, tap, delay, publishReplay, take, filter, switchMap, first } from 'rxjs/operators';
13
+ import { catchError, map, publish, refCount, debounceTime, distinctUntilChanged, finalize, tap, switchMap, takeUntil, delay, publishReplay, take, filter, first } from 'rxjs/operators';
14
14
  import { Type, Expose, plainToClassFromExist, plainToClass } from 'class-transformer';
15
15
  import * as _ from 'underscore';
16
16
  import * as moment from 'moment';
@@ -42,7 +42,7 @@ import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
42
42
  import { MatInputModule } from '@angular/material/input';
43
43
  import * as i1$6 from 'ngx-pagination';
44
44
  import { NgxPaginationModule, PaginatePipe } from 'ngx-pagination';
45
- import * as i15 from '@angular/material/tabs';
45
+ import * as i10 from '@angular/material/tabs';
46
46
  import { MatTabsModule } from '@angular/material/tabs';
47
47
 
48
48
  function FooterComponent_div_2_Template(rf, ctx) { if (rf & 1) {
@@ -6656,6 +6656,57 @@ WriteAddressFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteAddressFi
6656
6656
  type: Input
6657
6657
  }] }); })();
6658
6658
 
6659
+ class CaseFileViewFieldComponent {
6660
+ constructor(elementRef) {
6661
+ this.elementRef = elementRef;
6662
+ }
6663
+ ngAfterViewInit() {
6664
+ const slider = this.elementRef.nativeElement.querySelector('.slider');
6665
+ const documentTreeContainer = this.elementRef.nativeElement.querySelector('.document-tree-container');
6666
+ const mousedown$ = fromEvent(slider, 'mousedown');
6667
+ const mousemove$ = fromEvent(document, 'mousemove');
6668
+ const mouseup$ = fromEvent(document, 'mouseup');
6669
+ const drag$ = mousedown$.pipe(switchMap((start) => {
6670
+ const x = start.clientX;
6671
+ const documentTreeContainerWidth = documentTreeContainer.getBoundingClientRect().width;
6672
+ return mousemove$.pipe(map(move => {
6673
+ move.preventDefault();
6674
+ return {
6675
+ dx: move.clientX - x,
6676
+ documentTreeContainerWidth
6677
+ };
6678
+ }), takeUntil(mouseup$));
6679
+ }));
6680
+ drag$.subscribe(pos => {
6681
+ const calculatedWidth = ((pos.documentTreeContainerWidth + pos.dx) * 100) / slider.parentElement.getBoundingClientRect().width;
6682
+ documentTreeContainer.setAttribute('style', `width: ${calculatedWidth}%`);
6683
+ });
6684
+ }
6685
+ }
6686
+ CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
6687
+ CaseFileViewFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 8, vars: 0, consts: [[1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "slider"], [1, "media-viewer-container"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) { if (rf & 1) {
6688
+ i0.ɵɵelementStart(0, "h2", 0);
6689
+ i0.ɵɵtext(1, "Case file");
6690
+ i0.ɵɵelementEnd();
6691
+ i0.ɵɵelementStart(2, "div", 1);
6692
+ i0.ɵɵelementStart(3, "div", 2);
6693
+ i0.ɵɵtext(4, " Document tree ");
6694
+ i0.ɵɵelementEnd();
6695
+ i0.ɵɵelement(5, "div", 3);
6696
+ i0.ɵɵelementStart(6, "div", 4);
6697
+ i0.ɵɵtext(7, " Media viewer ");
6698
+ i0.ɵɵelementEnd();
6699
+ i0.ɵɵelementEnd();
6700
+ } }, styles: ["#case-file-view[_ngcontent-%COMP%]{display:flex}#case-file-view[_ngcontent-%COMP%] .document-tree-container[_ngcontent-%COMP%]{background-color:#add8e6;width:40%;min-height:400px}#case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{background-color:#ff4500;width:.2%}#case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:focus, #case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:hover{cursor:col-resize}#case-file-view[_ngcontent-%COMP%] .media-viewer-container[_ngcontent-%COMP%]{background-color:#90ee90;flex:1 1 0%}"] });
6701
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFieldComponent, [{
6702
+ type: Component,
6703
+ args: [{
6704
+ selector: 'ccd-case-file-view-field',
6705
+ templateUrl: './case-file-view-field.component.html',
6706
+ styleUrls: ['./case-file-view-field.component.scss']
6707
+ }]
6708
+ }], function () { return [{ type: i0.ElementRef }]; }, null); })();
6709
+
6659
6710
  var PaletteContext;
6660
6711
  (function (PaletteContext) {
6661
6712
  PaletteContext["DEFAULT"] = "DEFAULT";
@@ -10557,6 +10608,46 @@ const ɵCaseHistoryViewerFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetIn
10557
10608
  }]
10558
10609
  }], null, null); })();
10559
10610
 
10611
+ class CaseFileViewService {
10612
+ constructor(http, appConfig, errorService) {
10613
+ this.http = http;
10614
+ this.appConfig = appConfig;
10615
+ this.errorService = errorService;
10616
+ }
10617
+ /**
10618
+ * Retrieves the categories and documents for a case.
10619
+ *
10620
+ * @param caseRef 16-digit Case Reference number of the case
10621
+ * @returns An `Observable` of the `CategoriesAndDocuments` for the case
10622
+ */
10623
+ getCategoriesAndDocuments(caseRef) {
10624
+ let url = this.appConfig.getCategoriesAndDocumentsUrl();
10625
+ if (url) {
10626
+ url += `/${caseRef}`;
10627
+ return this.http.get(url, { observe: 'body' });
10628
+ }
10629
+ return of(null);
10630
+ }
10631
+ updateDocumentCategory(caseRef, caseVersion, attributePath, categoryId) {
10632
+ let url = this.appConfig.getDocumentDataUrl();
10633
+ if (url) {
10634
+ url += `/${caseRef}`;
10635
+ const body = {
10636
+ case_version: caseVersion,
10637
+ attribute_path: attributePath,
10638
+ category_id: categoryId
10639
+ };
10640
+ return this.http.put(url, body, { observe: 'body' });
10641
+ }
10642
+ return of(null);
10643
+ }
10644
+ }
10645
+ CaseFileViewService.ɵfac = function CaseFileViewService_Factory(t) { return new (t || CaseFileViewService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpErrorService)); };
10646
+ CaseFileViewService.ɵprov = i0.ɵɵdefineInjectable({ token: CaseFileViewService, factory: CaseFileViewService.ɵfac });
10647
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewService, [{
10648
+ type: Injectable
10649
+ }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }]; }, null); })();
10650
+
10560
10651
  class ErrorNotifierService {
10561
10652
  constructor() {
10562
10653
  this.errorSource = new Subject();
@@ -13298,6 +13389,11 @@ WriteYesNoFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteYesNoFieldC
13298
13389
  }], function () { return [{ type: YesNoService }]; }, null); })();
13299
13390
 
13300
13391
  class PaletteService {
13392
+ constructor() {
13393
+ this.componentLauncherRegistry = {
13394
+ CaseFileView: CaseFileViewFieldComponent
13395
+ };
13396
+ }
13301
13397
  getFieldComponentClass(caseField, write) {
13302
13398
  switch (caseField.field_type.type) {
13303
13399
  case 'Text':
@@ -13356,10 +13452,21 @@ class PaletteService {
13356
13452
  return CaseHistoryViewerFieldComponent;
13357
13453
  case 'WaysToPay':
13358
13454
  return WaysToPayFieldComponent;
13455
+ case 'ComponentLauncher':
13456
+ return this.getComponentLauncherComponent(caseField);
13359
13457
  default:
13360
13458
  return UnsupportedFieldComponent;
13361
13459
  }
13362
13460
  }
13461
+ getComponentLauncherComponent(caseField) {
13462
+ // Extract the value passed for #ARGUMENT(...) in the CaseField display_context_parameter and return the matching
13463
+ // component from the componentLauncherRegistry
13464
+ const argumentValue = caseField.display_context_parameter.match(/#ARGUMENT\((.*?)\)/)[1];
13465
+ if (argumentValue && this.componentLauncherRegistry.hasOwnProperty(argumentValue)) {
13466
+ return this.componentLauncherRegistry[argumentValue];
13467
+ }
13468
+ return UnsupportedFieldComponent;
13469
+ }
13363
13470
  }
13364
13471
  PaletteService.ɵfac = function PaletteService_Factory(t) { return new (t || PaletteService)(); };
13365
13472
  PaletteService.ɵprov = i0.ɵɵdefineInjectable({ token: PaletteService, factory: PaletteService.ɵfac });
@@ -15823,7 +15930,9 @@ class PaletteUtilsModule {
15823
15930
  }
15824
15931
  PaletteUtilsModule.ɵfac = function PaletteUtilsModule_Factory(t) { return new (t || PaletteUtilsModule)(); };
15825
15932
  PaletteUtilsModule.ɵmod = i0.ɵɵdefineNgModule({ type: PaletteUtilsModule });
15826
- PaletteUtilsModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
15933
+ PaletteUtilsModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
15934
+ IsCompoundPipe
15935
+ ], imports: [[
15827
15936
  CommonModule
15828
15937
  ]] });
15829
15938
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(PaletteUtilsModule, { declarations: [DatePipe,
@@ -15866,6 +15975,9 @@ PaletteUtilsModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
15866
15975
  IsReadOnlyPipe,
15867
15976
  IsReadOnlyAndNotCollectionPipe,
15868
15977
  DashPipe
15978
+ ],
15979
+ providers: [
15980
+ IsCompoundPipe
15869
15981
  ]
15870
15982
  }]
15871
15983
  }], null, null); })();
@@ -16056,7 +16168,7 @@ ReadFieldsFilterPipe.EMPTY_VALUES = [
16056
16168
  '',
16057
16169
  {}
16058
16170
  ];
16059
- ReadFieldsFilterPipe.ALWAYS_NULL_FIELDS = ['CasePaymentHistoryViewer', 'WaysToPay'];
16171
+ ReadFieldsFilterPipe.ALWAYS_NULL_FIELDS = ['CasePaymentHistoryViewer', 'WaysToPay', 'ComponentLauncher'];
16060
16172
  ReadFieldsFilterPipe.NESTED_TYPES = {
16061
16173
  Complex: ReadFieldsFilterPipe.isValidComplex,
16062
16174
  Collection: ReadFieldsFilterPipe.isValidCollection
@@ -16357,7 +16469,9 @@ const PALETTE_COMPONENTS = [
16357
16469
  WriteFixedListFieldComponent,
16358
16470
  WriteFixedRadioListFieldComponent,
16359
16471
  WriteCaseLinkFieldComponent,
16360
- WriteCollectionFieldComponent
16472
+ WriteCollectionFieldComponent,
16473
+ // ComponentLauncher web components
16474
+ CaseFileViewFieldComponent
16361
16475
  ];
16362
16476
  class PaletteModule {
16363
16477
  }
@@ -16474,7 +16588,9 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
16474
16588
  WriteFixedListFieldComponent,
16475
16589
  WriteFixedRadioListFieldComponent,
16476
16590
  WriteCaseLinkFieldComponent,
16477
- WriteCollectionFieldComponent], imports: [CommonModule,
16591
+ WriteCollectionFieldComponent,
16592
+ // ComponentLauncher web components
16593
+ CaseFileViewFieldComponent], imports: [CommonModule,
16478
16594
  RouterModule,
16479
16595
  FormsModule,
16480
16596
  ReactiveFormsModule,
@@ -16568,7 +16684,9 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
16568
16684
  WriteFixedListFieldComponent,
16569
16685
  WriteFixedRadioListFieldComponent,
16570
16686
  WriteCaseLinkFieldComponent,
16571
- WriteCollectionFieldComponent] }); })();
16687
+ WriteCollectionFieldComponent,
16688
+ // ComponentLauncher web components
16689
+ CaseFileViewFieldComponent] }); })();
16572
16690
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaletteModule, [{
16573
16691
  type: NgModule,
16574
16692
  args: [{
@@ -18961,10 +19079,6 @@ class CaseResolver {
18961
19079
  checkAuthorizationError(error) {
18962
19080
  // TODO Should be logged to remote logging infrastructure
18963
19081
  console.error(error);
18964
- if (error.status === 400) {
18965
- this.router.navigate(['/search/noresults']);
18966
- return of(null);
18967
- }
18968
19082
  if (CaseResolver.EVENT_REGEX.test(this.previousUrl) && error.status === 404) {
18969
19083
  this.router.navigate(['/list/case']);
18970
19084
  return of(null);
@@ -19639,29 +19753,36 @@ function CaseFullAccessViewComponent_ng_container_11_mat_tab_3_Template(rf, ctx)
19639
19753
  const tab_r16 = ctx.$implicit;
19640
19754
  i0.ɵɵproperty("id", tab_r16.id)("label", tab_r16.label);
19641
19755
  } }
19642
- function CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_4_Template(rf, ctx) { if (rf & 1) {
19643
- i0.ɵɵelementStart(0, "tr");
19644
- i0.ɵɵelementStart(1, "th");
19645
- i0.ɵɵelementStart(2, "div", 31);
19646
- i0.ɵɵtext(3);
19756
+ function CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_4_th_1_Template(rf, ctx) { if (rf & 1) {
19757
+ i0.ɵɵelementStart(0, "th", 34);
19758
+ i0.ɵɵelementStart(1, "div", 35);
19759
+ i0.ɵɵtext(2);
19647
19760
  i0.ɵɵelementEnd();
19648
19761
  i0.ɵɵelementEnd();
19649
- i0.ɵɵelementStart(4, "td");
19650
- i0.ɵɵelementStart(5, "span", 32);
19651
- i0.ɵɵelement(6, "ccd-field-read", 33);
19762
+ } if (rf & 2) {
19763
+ const field_r21 = i0.ɵɵnextContext(2).$implicit;
19764
+ i0.ɵɵadvance(2);
19765
+ i0.ɵɵtextInterpolate(field_r21.label);
19766
+ } }
19767
+ function CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_4_Template(rf, ctx) { if (rf & 1) {
19768
+ i0.ɵɵelementStart(0, "tr");
19769
+ i0.ɵɵtemplate(1, CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_4_th_1_Template, 3, 1, "th", 31);
19770
+ i0.ɵɵelementStart(2, "td");
19771
+ i0.ɵɵelementStart(3, "span", 32);
19772
+ i0.ɵɵelement(4, "ccd-field-read", 33);
19652
19773
  i0.ɵɵelementEnd();
19653
19774
  i0.ɵɵelementEnd();
19654
19775
  i0.ɵɵelementEnd();
19655
19776
  } if (rf & 2) {
19656
19777
  const field_r21 = i0.ɵɵnextContext().$implicit;
19657
19778
  const ctx_r22 = i0.ɵɵnextContext(4);
19658
- i0.ɵɵadvance(3);
19659
- i0.ɵɵtextInterpolate(field_r21.label);
19779
+ i0.ɵɵadvance(1);
19780
+ i0.ɵɵproperty("ngIf", !ctx_r22.isFieldToHaveNoLabel(field_r21));
19660
19781
  i0.ɵɵadvance(3);
19661
19782
  i0.ɵɵproperty("topLevelFormGroup", ctx_r22.formGroup.controls["data"])("caseField", field_r21)("caseReference", ctx_r22.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r22.markdownUseHrefAsRouterLink);
19662
19783
  } }
19663
19784
  function CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_5_Template(rf, ctx) { if (rf & 1) {
19664
- i0.ɵɵelementStart(0, "tr", 34);
19785
+ i0.ɵɵelementStart(0, "tr", 36);
19665
19786
  i0.ɵɵelementStart(1, "th");
19666
19787
  i0.ɵɵelementStart(2, "span", 32);
19667
19788
  i0.ɵɵelement(3, "ccd-field-read", 33);
@@ -19679,7 +19800,7 @@ function CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_
19679
19800
  i0.ɵɵelementStart(1, "div", 27);
19680
19801
  i0.ɵɵelementContainerStart(2, 28);
19681
19802
  i0.ɵɵpipe(3, "ccdIsCompound");
19682
- i0.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_4_Template, 7, 5, "tr", 29);
19803
+ i0.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_4_Template, 5, 5, "tr", 29);
19683
19804
  i0.ɵɵtemplate(5, CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_5_Template, 4, 4, "tr", 30);
19684
19805
  i0.ɵɵelementContainerEnd();
19685
19806
  i0.ɵɵelementEnd();
@@ -19723,17 +19844,17 @@ function CaseFullAccessViewComponent_ng_container_11_mat_tab_4_Template(rf, ctx)
19723
19844
  function CaseFullAccessViewComponent_ng_container_11_mat_tab_5_Template(rf, ctx) { if (rf & 1) {
19724
19845
  i0.ɵɵelement(0, "mat-tab", 24);
19725
19846
  } if (rf & 2) {
19726
- const tab_r27 = ctx.$implicit;
19727
- i0.ɵɵproperty("id", tab_r27.id)("label", tab_r27.label);
19847
+ const tab_r29 = ctx.$implicit;
19848
+ i0.ɵɵproperty("id", tab_r29.id)("label", tab_r29.label);
19728
19849
  } }
19729
19850
  function CaseFullAccessViewComponent_ng_container_11_router_outlet_6_Template(rf, ctx) { if (rf & 1) {
19730
19851
  i0.ɵɵelement(0, "router-outlet");
19731
19852
  } }
19732
19853
  function CaseFullAccessViewComponent_ng_container_11_Template(rf, ctx) { if (rf & 1) {
19733
- const _r29 = i0.ɵɵgetCurrentView();
19854
+ const _r31 = i0.ɵɵgetCurrentView();
19734
19855
  i0.ɵɵelementContainerStart(0);
19735
19856
  i0.ɵɵelementStart(1, "mat-tab-group", 21, 22);
19736
- i0.ɵɵlistener("selectedTabChange", function CaseFullAccessViewComponent_ng_container_11_Template_mat_tab_group_selectedTabChange_1_listener($event) { i0.ɵɵrestoreView(_r29); const ctx_r28 = i0.ɵɵnextContext(); return ctx_r28.tabChanged($event); });
19857
+ i0.ɵɵlistener("selectedTabChange", function CaseFullAccessViewComponent_ng_container_11_Template_mat_tab_group_selectedTabChange_1_listener($event) { i0.ɵɵrestoreView(_r31); const ctx_r30 = i0.ɵɵnextContext(); return ctx_r30.tabChanged($event); });
19737
19858
  i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_11_mat_tab_3_Template, 1, 2, "mat-tab", 23);
19738
19859
  i0.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_11_mat_tab_4_Template, 2, 2, "mat-tab", 23);
19739
19860
  i0.ɵɵtemplate(5, CaseFullAccessViewComponent_ng_container_11_mat_tab_5_Template, 1, 2, "mat-tab", 23);
@@ -19754,7 +19875,7 @@ function CaseFullAccessViewComponent_ng_container_11_Template(rf, ctx) { if (rf
19754
19875
  i0.ɵɵproperty("ngIf", ctx_r4.prependedTabs && ctx_r4.prependedTabs.length || ctx_r4.appendedTabs && ctx_r4.appendedTabs.length);
19755
19876
  } }
19756
19877
  class CaseFullAccessViewComponent {
19757
- constructor(ngZone, route, router, navigationNotifierService, orderService, activityPollingService, dialog, alertService, draftService, errorNotifierService, convertHrefToRouterService, location, crf) {
19878
+ constructor(ngZone, route, router, navigationNotifierService, orderService, activityPollingService, dialog, alertService, draftService, errorNotifierService, convertHrefToRouterService, location) {
19758
19879
  this.ngZone = ngZone;
19759
19880
  this.route = route;
19760
19881
  this.router = router;
@@ -19767,7 +19888,6 @@ class CaseFullAccessViewComponent {
19767
19888
  this.errorNotifierService = errorNotifierService;
19768
19889
  this.convertHrefToRouterService = convertHrefToRouterService;
19769
19890
  this.location = location;
19770
- this.crf = crf;
19771
19891
  this.hasPrint = true;
19772
19892
  this.hasEventSelector = true;
19773
19893
  this.prependedTabs = [];
@@ -19777,14 +19897,7 @@ class CaseFullAccessViewComponent {
19777
19897
  this.triggerTextIgnoreWarnings = CaseFullAccessViewComponent.TRIGGER_TEXT_CONTINUE;
19778
19898
  this.triggerText = CaseFullAccessViewComponent.TRIGGER_TEXT_START;
19779
19899
  this.ignoreWarning = false;
19780
- this.callbackErrorsSubject = new Subject();
19781
- }
19782
- ngOnChanges(changes) {
19783
- if (changes.prependedTabs && !changes.prependedTabs.firstChange) {
19784
- this.init();
19785
- this.crf.detectChanges();
19786
- this.organiseTabPosition();
19787
- }
19900
+ this.callbackErrorsSubject = new Subject$1();
19788
19901
  }
19789
19902
  ngOnInit() {
19790
19903
  initDialog();
@@ -19893,20 +20006,14 @@ class CaseFullAccessViewComponent {
19893
20006
  && this.error.details.field_errors.length);
19894
20007
  }
19895
20008
  ngAfterViewInit() {
19896
- this.organiseTabPosition();
19897
- }
19898
- organiseTabPosition() {
19899
20009
  let matTab;
19900
20010
  const url = this.location.path(true);
19901
20011
  let hashValue = url.substring(url.indexOf('#') + 1);
19902
- if (!url.includes('#') && !url.includes('roles-and-access') && !url.includes('tasks')) {
20012
+ if (!url.includes('#')) {
19903
20013
  const paths = url.split('/');
19904
20014
  // lastPath can be /caseId, or the tabs /tasks, /hearings etc.
19905
20015
  const lastPath = decodeURIComponent(paths[paths.length - 1]);
19906
20016
  let foundTab = null;
19907
- if (!this.prependedTabs) {
19908
- this.prependedTabs = [];
19909
- }
19910
20017
  const additionalTabs = [...this.prependedTabs, ...this.appendedTabs];
19911
20018
  if (additionalTabs && additionalTabs.length) {
19912
20019
  foundTab = additionalTabs.find((caseTab) => caseTab.id.toLowerCase() === lastPath.toLowerCase());
@@ -19924,7 +20031,7 @@ class CaseFullAccessViewComponent {
19924
20031
  this.caseDetails.tabs.sort((aTab, bTab) => aTab.order > bTab.order ? 1 : (bTab.order > aTab.order ? -1 : 0));
19925
20032
  // preselect the 1st order of CCD predefined tabs
19926
20033
  const preSelectTab = this.caseDetails.tabs[0];
19927
- this.router.navigate(['cases', 'case-details', this.caseDetails.case_id], { fragment: preSelectTab.label }).then(() => {
20034
+ this.router.navigate(['cases', 'case-details', this.caseDetails.case_id]).then(() => {
19928
20035
  matTab = this.tabGroup._tabs.find((x) => x.textLabel === preSelectTab.label);
19929
20036
  this.tabGroup.selectedIndex = matTab.position;
19930
20037
  });
@@ -19933,9 +20040,6 @@ class CaseFullAccessViewComponent {
19933
20040
  else {
19934
20041
  const regExp = new RegExp(CaseFullAccessViewComponent.UNICODE_SPACE, 'g');
19935
20042
  hashValue = hashValue.replace(regExp, CaseFullAccessViewComponent.EMPTY_SPACE);
19936
- if (hashValue.includes('roles-and-access') || hashValue.includes('tasks')) {
19937
- hashValue = hashValue.includes('roles-and-access') ? 'roles and access' : 'tasks';
19938
- }
19939
20043
  matTab = this.tabGroup._tabs.find((x) => x.textLabel.replace(CaseFullAccessViewComponent.EMPTY_SPACE, '').toLowerCase() ===
19940
20044
  hashValue.replace(CaseFullAccessViewComponent.EMPTY_SPACE, '').toLowerCase());
19941
20045
  if (matTab && matTab.position) {
@@ -19946,9 +20050,10 @@ class CaseFullAccessViewComponent {
19946
20050
  tabChanged(tabChangeEvent) {
19947
20051
  const tab = tabChangeEvent.tab['_viewContainerRef'];
19948
20052
  const id = tab.element.nativeElement.id;
19949
- const tabsLengthBeforeAppended = this.prependedTabs.length + this.caseDetails.tabs.length;
20053
+ // due to some edge case like hidden tab we can't calculate the last index of existing tabs,
20054
+ // so have to hard code the hearings id here
19950
20055
  if ((tabChangeEvent.index <= 1 && this.prependedTabs.length) ||
19951
- (tabChangeEvent.index >= tabsLengthBeforeAppended && this.appendedTabs.length)) {
20056
+ (this.appendedTabs.length && id === 'hearings')) {
19952
20057
  this.router.navigate([id], { relativeTo: this.route });
19953
20058
  }
19954
20059
  else {
@@ -19958,6 +20063,16 @@ class CaseFullAccessViewComponent {
19958
20063
  });
19959
20064
  }
19960
20065
  }
20066
+ /**
20067
+ * Indicates that a CaseField is to be displayed without a label, as is expected for all ComponentLauncher-type
20068
+ * fields.
20069
+ * @param caseField The `CaseField` instance to check
20070
+ * @returns `true` if it should not have a label; `false` otherwise
20071
+ */
20072
+ isFieldToHaveNoLabel(caseField) {
20073
+ return caseField.field_type.type === 'ComponentLauncher'
20074
+ && caseField.display_context_parameter === '#ARGUMENT(CaseFileView)';
20075
+ }
19961
20076
  init() {
19962
20077
  // Clone and sort tabs array
19963
20078
  this.sortedTabs = this.orderService.sort(this.caseDetails.tabs);
@@ -20012,13 +20127,13 @@ CaseFullAccessViewComponent.TRIGGER_TEXT_START = 'Go';
20012
20127
  CaseFullAccessViewComponent.TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Go';
20013
20128
  CaseFullAccessViewComponent.UNICODE_SPACE = '%20';
20014
20129
  CaseFullAccessViewComponent.EMPTY_SPACE = ' ';
20015
- CaseFullAccessViewComponent.ɵfac = function CaseFullAccessViewComponent_Factory(t) { return new (t || CaseFullAccessViewComponent)(i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(NavigationNotifierService), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ActivityPollingService), i0.ɵɵdirectiveInject(i1$5.MatDialog), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(DraftService), i0.ɵɵdirectiveInject(ErrorNotifierService), i0.ɵɵdirectiveInject(ConvertHrefToRouterService), i0.ɵɵdirectiveInject(i1.Location), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
20130
+ CaseFullAccessViewComponent.ɵfac = function CaseFullAccessViewComponent_Factory(t) { return new (t || CaseFullAccessViewComponent)(i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(NavigationNotifierService), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ActivityPollingService), i0.ɵɵdirectiveInject(i1$5.MatDialog), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(DraftService), i0.ɵɵdirectiveInject(ErrorNotifierService), i0.ɵɵdirectiveInject(ConvertHrefToRouterService), i0.ɵɵdirectiveInject(i1.Location)); };
20016
20131
  CaseFullAccessViewComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFullAccessViewComponent, selectors: [["ccd-case-full-access-view"]], viewQuery: function CaseFullAccessViewComponent_Query(rf, ctx) { if (rf & 1) {
20017
20132
  i0.ɵɵviewQuery(_c0$a, 1);
20018
20133
  } if (rf & 2) {
20019
20134
  let _t;
20020
20135
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabGroup = _t.first);
20021
- } }, inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", caseDetails: "caseDetails", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, features: [i0.ɵɵNgOnChangesFeature], decls: 12, vars: 11, consts: [["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [3, "caseId", "displayMode"], [1, "grid-row"], [1, "column-one-half"], [3, "caseDetails"], ["class", "case-viewer-controls", 4, "ngIf"], ["class", "column-one-half", 4, "ngIf"], [1, "column-full"], [4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h2", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], [4, "ngFor", "ngForOf"], [1, "case-viewer-controls"], ["id", "case-viewer-control-print", "routerLink", "print", 1, "button", "button-secondary"], [3, "isDisabled", "triggers", "triggerText", "onTriggerChange", "onTriggerSubmit"], ["animationDuration", "0ms", 3, "disableRipple", "selectedTabChange"], ["tabGroup", ""], [3, "id", "label", 4, "ngFor", "ngForOf"], [3, "id", "label"], ["matTabContent", ""], ["aria-describedby", "case viewer table"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "hidden"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["class", "compound-field", 4, "ngSwitchCase"], [1, "case-viewer-label", "text-16"], [1, "text-16"], [3, "topLevelFormGroup", "caseField", "caseReference", "markdownUseHrefAsRouterLink"], [1, "compound-field"]], template: function CaseFullAccessViewComponent_Template(rf, ctx) { if (rf & 1) {
20136
+ } }, inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", caseDetails: "caseDetails", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, decls: 12, vars: 11, consts: [["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [3, "caseId", "displayMode"], [1, "grid-row"], [1, "column-one-half"], [3, "caseDetails"], ["class", "case-viewer-controls", 4, "ngIf"], ["class", "column-one-half", 4, "ngIf"], [1, "column-full"], [4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h2", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], [4, "ngFor", "ngForOf"], [1, "case-viewer-controls"], ["id", "case-viewer-control-print", "routerLink", "print", 1, "button", "button-secondary"], [3, "isDisabled", "triggers", "triggerText", "onTriggerChange", "onTriggerSubmit"], ["animationDuration", "0ms", 3, "disableRipple", "selectedTabChange"], ["tabGroup", ""], [3, "id", "label", 4, "ngFor", "ngForOf"], [3, "id", "label"], ["matTabContent", ""], ["aria-describedby", "case viewer table"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "hidden"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["class", "compound-field", 4, "ngSwitchCase"], ["id", "case-viewer-field-label", 4, "ngIf"], [1, "text-16"], [3, "topLevelFormGroup", "caseField", "caseReference", "markdownUseHrefAsRouterLink"], ["id", "case-viewer-field-label"], [1, "case-viewer-label", "text-16"], [1, "compound-field"]], template: function CaseFullAccessViewComponent_Template(rf, ctx) { if (rf & 1) {
20022
20137
  i0.ɵɵtemplate(0, CaseFullAccessViewComponent_div_0_Template, 10, 0, "div", 0);
20023
20138
  i0.ɵɵtemplate(1, CaseFullAccessViewComponent_div_1_Template, 6, 2, "div", 0);
20024
20139
  i0.ɵɵelementStart(2, "ccd-callback-errors", 1);
@@ -20053,7 +20168,7 @@ CaseFullAccessViewComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFullAcces
20053
20168
  i0.ɵɵproperty("ngIf", ctx.hasEventSelector);
20054
20169
  i0.ɵɵadvance(3);
20055
20170
  i0.ɵɵproperty("ngIf", ctx.hasTabsPresent());
20056
- } }, directives: [i1.NgIf, CallbackErrorsComponent, ActivityComponent, CaseHeaderComponent, i1.NgForOf, i1$1.RouterLinkWithHref, EventTriggerComponent, i15.MatTabGroup, i15.MatTab, i15.MatTabContent, LabelSubstitutorDirective, i1.NgSwitch, i1.NgSwitchCase, FieldReadComponent, i1$1.RouterOutlet], pipes: [ReadFieldsFilterPipe, CcdTabFieldsPipe, IsCompoundPipe], styles: ["th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:0}.case-viewer-controls[_ngcontent-%COMP%]{margin-top:47px;margin-bottom:20px}ccd-case-header[_ngcontent-%COMP%]{float:left;margin-right:10px}ccd-event-trigger[_ngcontent-%COMP%]{float:right}.case-viewer-label[_ngcontent-%COMP%]{min-width:300px;white-space:normal}.markdown[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:0}"] });
20171
+ } }, directives: [i1.NgIf, CallbackErrorsComponent, ActivityComponent, CaseHeaderComponent, i1.NgForOf, i1$1.RouterLinkWithHref, EventTriggerComponent, i10.MatTabGroup, i10.MatTab, i10.MatTabContent, LabelSubstitutorDirective, i1.NgSwitch, i1.NgSwitchCase, FieldReadComponent, i1$1.RouterOutlet], pipes: [ReadFieldsFilterPipe, CcdTabFieldsPipe, IsCompoundPipe], styles: ["th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:0}.case-viewer-controls[_ngcontent-%COMP%]{margin-top:47px;margin-bottom:20px}ccd-case-header[_ngcontent-%COMP%]{float:left;margin-right:10px}ccd-event-trigger[_ngcontent-%COMP%]{float:right}.case-viewer-label[_ngcontent-%COMP%]{min-width:300px;white-space:normal}.markdown[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:0}"] });
20057
20172
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFullAccessViewComponent, [{
20058
20173
  type: Component,
20059
20174
  args: [{
@@ -20061,7 +20176,7 @@ CaseFullAccessViewComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFullAcces
20061
20176
  templateUrl: './case-full-access-view.component.html',
20062
20177
  styleUrls: ['./case-full-access-view.component.scss']
20063
20178
  }]
20064
- }], function () { return [{ type: i0.NgZone }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: NavigationNotifierService }, { type: OrderService }, { type: ActivityPollingService }, { type: i1$5.MatDialog }, { type: AlertService }, { type: DraftService }, { type: ErrorNotifierService }, { type: ConvertHrefToRouterService }, { type: i1.Location }, { type: i0.ChangeDetectorRef }]; }, { hasPrint: [{
20179
+ }], function () { return [{ type: i0.NgZone }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: NavigationNotifierService }, { type: OrderService }, { type: ActivityPollingService }, { type: i1$5.MatDialog }, { type: AlertService }, { type: DraftService }, { type: ErrorNotifierService }, { type: ConvertHrefToRouterService }, { type: i1.Location }]; }, { hasPrint: [{
20065
20180
  type: Input
20066
20181
  }], hasEventSelector: [{
20067
20182
  type: Input
@@ -20783,21 +20898,28 @@ class EventStartGuard {
20783
20898
  this.sessionStorageService = sessionStorageService;
20784
20899
  }
20785
20900
  canActivate(route) {
20786
- const caseId = route.params['cid'];
20787
- const eventId = route.params['eid'];
20788
- const taskId = route.queryParams['tid'];
20789
- // TODO: NavigationExtras should be used once Angular upgrade changes have been incorporated
20790
- const isComplete = route.queryParams['isComplete'];
20791
- const caseInfoStr = this.sessionStorageService.getItem('caseInfo');
20792
- if (caseInfoStr) {
20793
- const caseInfo = JSON.parse(caseInfoStr);
20794
- if (caseInfo && caseInfo.cid === caseId) {
20795
- if (isComplete) {
20796
- return of(true);
20901
+ // Checks must be performed only for Work Allocation 2
20902
+ if (this.appConfig.getWorkAllocationApiUrl().toLowerCase() === 'workallocation2') {
20903
+ const caseId = route.params['cid'];
20904
+ const eventId = route.params['eid'];
20905
+ const taskId = route.queryParams['tid'];
20906
+ // TODO: NavigationExtras should be used once Angular upgrade changes have been incorporated
20907
+ const isComplete = route.queryParams['isComplete'];
20908
+ const caseInfoStr = this.sessionStorageService.getItem('caseInfo');
20909
+ if (caseInfoStr) {
20910
+ const caseInfo = JSON.parse(caseInfoStr);
20911
+ if (caseInfo && caseInfo.cid === caseId) {
20912
+ if (isComplete) {
20913
+ return of(true);
20914
+ }
20915
+ return this.workAllocationService.getTasksByCaseIdAndEventId(eventId, caseId, caseInfo.caseType, caseInfo.jurisdiction).pipe(switchMap((payload) => this.checkForTasks(payload, caseId, eventId, taskId)));
20797
20916
  }
20798
- return this.workAllocationService.getTasksByCaseIdAndEventId(eventId, caseId, caseInfo.caseType, caseInfo.jurisdiction).pipe(switchMap((payload) => this.checkForTasks(payload, caseId, eventId, taskId)));
20799
20917
  }
20800
20918
  }
20919
+ else {
20920
+ // Checks not required, return true by default for Work Allocation 1
20921
+ return of(true);
20922
+ }
20801
20923
  return of(false);
20802
20924
  }
20803
20925
  checkTaskInEventNotRequired(payload, caseId, taskId) {
@@ -24198,5 +24320,5 @@ class TestRouteSnapshotBuilder {
24198
24320
  * Generated bundle index. Do not edit.
24199
24321
  */
24200
24322
 
24201
- export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BodyComponent, BrowserService, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, Embedded, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HasLoadingState, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LoadingModule, LoadingService, LoadingSpinnerComponent, MULTIPLE_TASKS_FOUND, MarkdownComponent, MoneyGbpInputComponent, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoTasksAvailableComponent, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadTextAreaFieldComponent, ReadTextFieldComponent, ReadYesNoFieldComponent, RemoveDialogComponent, RequestOptionsBuilder, RouterHelperService, SaveOrDiscardDialogComponent, SearchFiltersComponent, SearchFiltersModule, SearchFiltersWrapperComponent, SearchInput, SearchResultComponent, SearchResultModule, SearchResultView, SearchResultViewColumn, SearchResultViewItem, SearchResultViewItemComparatorFactory, SearchService, SessionStorageService, ShowCondition, SortOrder, SortParameters, SortSearchResultPipe, TabComponent, TableColumnConfig, TableConfig, TabsComponent, TabsModule, TaskAssignedComponent, TaskCancelledComponent, TaskConflictComponent, TaskUnassignedComponent, TestRouteSnapshotBuilder, UnsupportedFieldComponent, WaysToPayFieldComponent, WindowService, Wizard, WizardFactoryService, WizardPage, WizardPageField, WorkAllocationService, WorkbasketFiltersComponent, WorkbasketFiltersModule, WorkbasketInput, WorkbasketInputFilterService, WorkbasketInputModel, WriteAddressFieldComponent, WriteCaseLinkFieldComponent, WriteCollectionFieldComponent, WriteComplexFieldComponent, WriteDateContainerFieldComponent, WriteDateFieldComponent, WriteDocumentFieldComponent, WriteDynamicListFieldComponent, WriteDynamicRadioListFieldComponent, WriteEmailFieldComponent, WriteFixedListFieldComponent, WriteFixedRadioListFieldComponent, WriteJudicialUserFieldComponent, WriteMoneyGbpFieldComponent, WriteMultiSelectListFieldComponent, WriteNumberFieldComponent, WriteOrderSummaryFieldComponent, WriteOrganisationComplexFieldComponent, WriteOrganisationFieldComponent, WritePhoneUKFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, textFieldType, viewerRouting };
24323
+ export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BodyComponent, BrowserService, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewService, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, Embedded, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HasLoadingState, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LoadingModule, LoadingService, LoadingSpinnerComponent, MULTIPLE_TASKS_FOUND, MarkdownComponent, MoneyGbpInputComponent, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoTasksAvailableComponent, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadTextAreaFieldComponent, ReadTextFieldComponent, ReadYesNoFieldComponent, RemoveDialogComponent, RequestOptionsBuilder, RouterHelperService, SaveOrDiscardDialogComponent, SearchFiltersComponent, SearchFiltersModule, SearchFiltersWrapperComponent, SearchInput, SearchResultComponent, SearchResultModule, SearchResultView, SearchResultViewColumn, SearchResultViewItem, SearchResultViewItemComparatorFactory, SearchService, SessionStorageService, ShowCondition, SortOrder, SortParameters, SortSearchResultPipe, TabComponent, TableColumnConfig, TableConfig, TabsComponent, TabsModule, TaskAssignedComponent, TaskCancelledComponent, TaskConflictComponent, TaskUnassignedComponent, TestRouteSnapshotBuilder, UnsupportedFieldComponent, WaysToPayFieldComponent, WindowService, Wizard, WizardFactoryService, WizardPage, WizardPageField, WorkAllocationService, WorkbasketFiltersComponent, WorkbasketFiltersModule, WorkbasketInput, WorkbasketInputFilterService, WorkbasketInputModel, WriteAddressFieldComponent, WriteCaseLinkFieldComponent, WriteCollectionFieldComponent, WriteComplexFieldComponent, WriteDateContainerFieldComponent, WriteDateFieldComponent, WriteDocumentFieldComponent, WriteDynamicListFieldComponent, WriteDynamicRadioListFieldComponent, WriteEmailFieldComponent, WriteFixedListFieldComponent, WriteFixedRadioListFieldComponent, WriteJudicialUserFieldComponent, WriteMoneyGbpFieldComponent, WriteMultiSelectListFieldComponent, WriteNumberFieldComponent, WriteOrderSummaryFieldComponent, WriteOrganisationComplexFieldComponent, WriteOrganisationFieldComponent, WritePhoneUKFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, textFieldType, viewerRouting };
24202
24324
  //# sourceMappingURL=hmcts-ccd-case-ui-toolkit.js.map