@hmcts/ccd-case-ui-toolkit 6.19.5-secure-doc-case-creation.1 → 6.19.5-view-case-link

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 (24) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +29 -11
  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/shared/components/case-editor/services/case.notifier.js +1 -8
  6. package/esm2015/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +2 -1
  7. package/esm2015/lib/shared/components/create-case-filters/create-case-filters.component.js +3 -3
  8. package/esm2015/lib/shared/components/palette/document/write-document-field.component.js +1 -4
  9. package/esm2015/lib/shared/components/palette/judicial-user/write-judicial-user-field.component.js +16 -1
  10. package/esm2015/lib/shared/components/workbasket-filters/workbasket-filters.component.js +12 -1
  11. package/esm2015/lib/shared/services/jurisdiction/jurisdiction.service.js +1 -2
  12. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +27 -11
  13. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  14. package/lib/shared/components/case-editor/services/case.notifier.d.ts.map +1 -1
  15. package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts.map +1 -1
  16. package/lib/shared/components/create-case-filters/create-case-filters.component.d.ts +1 -1
  17. package/lib/shared/components/create-case-filters/create-case-filters.component.d.ts.map +1 -1
  18. package/lib/shared/components/palette/document/write-document-field.component.d.ts.map +1 -1
  19. package/lib/shared/components/palette/judicial-user/write-judicial-user-field.component.d.ts +5 -3
  20. package/lib/shared/components/palette/judicial-user/write-judicial-user-field.component.d.ts.map +1 -1
  21. package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts +1 -1
  22. package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
  23. package/lib/shared/services/jurisdiction/jurisdiction.service.d.ts.map +1 -1
  24. package/package.json +1 -1
@@ -7708,7 +7708,6 @@
7708
7708
  return this.httpService.get('/aggregated/caseworkers/:uid/jurisdictions?access=read');
7709
7709
  };
7710
7710
  JurisdictionService.prototype.announceSelectedJurisdiction = function (jurisdiction) {
7711
- console.info('Announcing selected jurisdiction = ' + (jurisdiction === null || jurisdiction === void 0 ? void 0 : jurisdiction.id));
7712
7711
  this.selectedJurisdictionSource.next(jurisdiction);
7713
7712
  this.selectedJurisdictionBS.next(jurisdiction);
7714
7713
  };
@@ -9374,23 +9373,16 @@
9374
9373
  this.cachedCaseView = null;
9375
9374
  };
9376
9375
  CaseNotifier.prototype.announceCase = function (c) {
9377
- console.info('announceCase started.');
9378
9376
  this.caseViewSource.next(c);
9379
- console.info('announceCase finished.');
9380
9377
  };
9381
9378
  CaseNotifier.prototype.fetchAndRefresh = function (cid) {
9382
9379
  var _this = this;
9383
- console.info('fetchAndRefresh started.');
9384
9380
  return this.casesService
9385
9381
  .getCaseViewV2(cid)
9386
9382
  .pipe(operators.map(function (caseView) {
9387
- console.info('mapping caseView started.');
9388
- // this.casesService.syncWait(10);
9389
- // throw new Error('******************************************************');
9390
9383
  _this.cachedCaseView = classTransformer.plainToClassFromExist(new CaseView(), caseView);
9391
9384
  _this.setBasicFields(_this.cachedCaseView.tabs);
9392
9385
  _this.announceCase(_this.cachedCaseView);
9393
- console.info('mapping caseView finished. Returning it.');
9394
9386
  return _this.cachedCaseView;
9395
9387
  }));
9396
9388
  };
@@ -14657,7 +14649,6 @@
14657
14649
  };
14658
14650
  WriteDocumentFieldComponent.prototype.ngOnInit = function () {
14659
14651
  this.secureModeOn = this.appConfig.getDocumentSecureMode();
14660
- console.info('writeDocumentField.ngInit: secure mode = ' + this.secureModeOn);
14661
14652
  if (this.secureModeOn) {
14662
14653
  this.subscribeToCaseDetails();
14663
14654
  }
@@ -14786,7 +14777,6 @@
14786
14777
  var _a, _b;
14787
14778
  _this.caseTypeId = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.case_id;
14788
14779
  _this.jurisdictionId = (_b = (_a = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.case_type) === null || _a === void 0 ? void 0 : _a.jurisdiction) === null || _b === void 0 ? void 0 : _b.id;
14789
- console.info("caseNotifier.next: caseType=" + _this.caseTypeId + " juris=" + _this.jurisdictionId);
14790
14780
  }
14791
14781
  });
14792
14782
  this.jurisdictionSubs = this.jurisdictionService.selectedJurisdictionBS.subscribe({
@@ -14797,7 +14787,6 @@
14797
14787
  _this.caseTypeId = jurisdiction.currentCaseType.id;
14798
14788
  }
14799
14789
  }
14800
- console.info("selectedJurisdiction.next: caseType=" + _this.caseTypeId + " juris=" + _this.jurisdictionId);
14801
14790
  }
14802
14791
  });
14803
14792
  };
@@ -16425,12 +16414,24 @@
16425
16414
  }
16426
16415
  };
16427
16416
  WriteJudicialUserFieldComponent.prototype.setJurisdictionAndCaseType = function () {
16417
+ var _this = this;
16428
16418
  var caseInfoStr = this.sessionStorageService.getItem('caseInfo');
16429
16419
  if (caseInfoStr) {
16430
16420
  var caseInfo = JSON.parse(caseInfoStr);
16431
16421
  this.jurisdiction = caseInfo === null || caseInfo === void 0 ? void 0 : caseInfo.jurisdiction;
16432
16422
  this.caseType = caseInfo === null || caseInfo === void 0 ? void 0 : caseInfo.caseType;
16433
16423
  }
16424
+ else {
16425
+ // If there is no case info, attempt to get the current jurisdiction and case type via the JurisdictionService
16426
+ this.jurisdictionSubscription = this.jurisdictionService.selectedJurisdictionBS.subscribe(function (jurisdiction) {
16427
+ if (jurisdiction) {
16428
+ _this.jurisdiction = jurisdiction.id;
16429
+ if (jurisdiction.currentCaseType) {
16430
+ _this.caseType = jurisdiction.currentCaseType.id;
16431
+ }
16432
+ }
16433
+ });
16434
+ }
16434
16435
  };
16435
16436
  WriteJudicialUserFieldComponent.prototype.displayJudicialUser = function (judicialUser) {
16436
16437
  return judicialUser
@@ -16476,6 +16477,10 @@
16476
16477
  this.judicialUserControl.setValidators(i2$1.Validators.required);
16477
16478
  }
16478
16479
  };
16480
+ WriteJudicialUserFieldComponent.prototype.ngOnDestroy = function () {
16481
+ var _a;
16482
+ (_a = this.jurisdictionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
16483
+ };
16479
16484
  return WriteJudicialUserFieldComponent;
16480
16485
  }(WriteComplexFieldComponent));
16481
16486
  WriteJudicialUserFieldComponent.ɵfac = function WriteJudicialUserFieldComponent_Factory(t) { return new (t || WriteJudicialUserFieldComponent)(i0__namespace.ɵɵdirectiveInject(JurisdictionService), i0__namespace.ɵɵdirectiveInject(SessionStorageService), i0__namespace.ɵɵdirectiveInject(CaseFlagRefdataService), i0__namespace.ɵɵdirectiveInject(IsCompoundPipe), i0__namespace.ɵɵdirectiveInject(FormValidatorsService)); };
@@ -29820,6 +29825,7 @@
29820
29825
  });
29821
29826
  };
29822
29827
  WorkbasketFiltersComponent.prototype.apply = function (init) {
29828
+ var _this = this;
29823
29829
  // Save filters as query parameters for current route
29824
29830
  var queryParams = {};
29825
29831
  if (this.selected.jurisdiction) {
@@ -29851,9 +29857,20 @@
29851
29857
  if (init) {
29852
29858
  this.windowService.setLocalStorage(SAVED_QUERY_PARAM_LOC_STORAGE, JSON.stringify(queryParams));
29853
29859
  if (Object.keys(this.formGroup.controls).length > 0) {
29860
+ // Find all "special case" JudicialUser FormControl keys and remove the corresponding values from the
29861
+ // FormGroup value because these values are not intended to be stored and subsequently passed as query string
29862
+ // parameters when calling searchCases API endpoint
29863
+ var judicialUserControlValuesToRemove = Object.keys(this.formGroup.controls).filter(function (key) { return key.endsWith('_judicialUserControl'); });
29864
+ judicialUserControlValuesToRemove.forEach(function (controlKey) { return delete _this.formGroup.value[controlKey]; });
29854
29865
  this.windowService.setLocalStorage(FORM_GROUP_VAL_LOC_STORAGE, JSON.stringify(this.formGroup.value));
29855
29866
  }
29856
29867
  }
29868
+ // Announce selected jurisdiction via JurisdictionService
29869
+ if (this.selected.jurisdiction) {
29870
+ // Set the selected case type as the current case type of the selected jurisdiction
29871
+ this.selected.jurisdiction.currentCaseType = this.selected.caseType;
29872
+ this.jurisdictionService.announceSelectedJurisdiction(this.selected.jurisdiction);
29873
+ }
29857
29874
  // Apply filters
29858
29875
  this.onApply.emit({ selected: this.selected, queryParams: queryParams });
29859
29876
  this.setFocusToTop();
@@ -32335,6 +32352,7 @@
32335
32352
  var targetTabIndex = this.tabGroup._tabs.toArray().findIndex(function (tab) { return tab.textLabel === triggerOutputEventText; });
32336
32353
  if (targetTabIndex > -1) {
32337
32354
  this.selectedTabIndex = targetTabIndex;
32355
+ this.tabGroup.selectedIndex = targetTabIndex;
32338
32356
  }
32339
32357
  };
32340
32358
  CaseFullAccessViewComponent.prototype.hasActiveCaseFlags = function () {