@hmcts/ccd-case-ui-toolkit 5.0.49-restricted-case-access → 5.0.50-EUI-7538-datetime-picker-upgrade-uc2

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.
@@ -12003,7 +12003,7 @@
12003
12003
  if (rf & 2) {
12004
12004
  var ctx_r2 = i0__namespace.ɵɵnextContext(2);
12005
12005
  i0__namespace.ɵɵadvance(1);
12006
- i0__namespace.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true);
12006
+ i0__namespace.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh");
12007
12007
  }
12008
12008
  }
12009
12009
  function CaseFileViewFieldComponent_div_1_Template(rf, ctx) {
@@ -12021,7 +12021,7 @@
12021
12021
  i0__namespace.ɵɵelementEnd();
12022
12022
  i0__namespace.ɵɵelement(6, "div", 9);
12023
12023
  i0__namespace.ɵɵelementStart(7, "div", 10);
12024
- i0__namespace.ɵɵtemplate(8, CaseFileViewFieldComponent_div_1_ng_container_8_Template, 2, 6, "ng-container", 1);
12024
+ i0__namespace.ɵɵtemplate(8, CaseFileViewFieldComponent_div_1_ng_container_8_Template, 2, 7, "ng-container", 1);
12025
12025
  i0__namespace.ɵɵelementEnd();
12026
12026
  i0__namespace.ɵɵelementEnd();
12027
12027
  i0__namespace.ɵɵelementEnd();
@@ -12102,7 +12102,7 @@
12102
12102
  }());
12103
12103
  CaseFileViewFieldComponent.PARAM_CASE_ID = 'cid';
12104
12104
  CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CaseFileViewService), i0__namespace.ɵɵdirectiveInject(DocumentManagementService), i0__namespace.ɵɵdirectiveInject(LoadingService)); };
12105
- CaseFileViewFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) {
12105
+ CaseFileViewFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) {
12106
12106
  if (rf & 1) {
12107
12107
  i0__namespace.ɵɵtemplate(0, CaseFileViewFieldComponent_div_0_Template, 5, 0, "div", 0);
12108
12108
  i0__namespace.ɵɵtemplate(1, CaseFileViewFieldComponent_div_1_Template, 9, 3, "div", 1);
@@ -12145,7 +12145,7 @@
12145
12145
  if (rf & 2) {
12146
12146
  var ctx_r2 = i0__namespace.ɵɵnextContext(2);
12147
12147
  i0__namespace.ɵɵadvance(1);
12148
- i0__namespace.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true);
12148
+ i0__namespace.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh");
12149
12149
  }
12150
12150
  }
12151
12151
  function CaseFileViewFieldReadComponent_div_1_Template(rf, ctx) {
@@ -12163,7 +12163,7 @@
12163
12163
  i0__namespace.ɵɵelementEnd();
12164
12164
  i0__namespace.ɵɵelement(6, "div", 9);
12165
12165
  i0__namespace.ɵɵelementStart(7, "div", 10);
12166
- i0__namespace.ɵɵtemplate(8, CaseFileViewFieldReadComponent_div_1_ng_container_8_Template, 2, 6, "ng-container", 1);
12166
+ i0__namespace.ɵɵtemplate(8, CaseFileViewFieldReadComponent_div_1_ng_container_8_Template, 2, 7, "ng-container", 1);
12167
12167
  i0__namespace.ɵɵelementEnd();
12168
12168
  i0__namespace.ɵɵelementEnd();
12169
12169
  i0__namespace.ɵɵelementEnd();
@@ -12186,7 +12186,7 @@
12186
12186
  return CaseFileViewFieldReadComponent;
12187
12187
  }(CaseFileViewFieldComponent));
12188
12188
  CaseFileViewFieldReadComponent.ɵfac = function CaseFileViewFieldReadComponent_Factory(t) { return ɵCaseFileViewFieldReadComponent_BaseFactory(t || CaseFileViewFieldReadComponent); };
12189
- CaseFileViewFieldReadComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFieldReadComponent, selectors: [["ccd-case-file-view-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions"]], template: function CaseFileViewFieldReadComponent_Template(rf, ctx) {
12189
+ CaseFileViewFieldReadComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFieldReadComponent, selectors: [["ccd-case-file-view-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height"]], template: function CaseFileViewFieldReadComponent_Template(rf, ctx) {
12190
12190
  if (rf & 1) {
12191
12191
  i0__namespace.ɵɵtemplate(0, CaseFileViewFieldReadComponent_div_0_Template, 5, 0, "div", 0);
12192
12192
  i0__namespace.ɵɵtemplate(1, CaseFileViewFieldReadComponent_div_1_Template, 9, 3, "div", 1);
@@ -24085,7 +24085,10 @@
24085
24085
  }
24086
24086
  }, inputs: { dateControl: "dateControl" }, features: [i0__namespace.ɵɵProvidersFeature([
24087
24087
  { provide: i4.NGX_MAT_DATE_FORMATS, useValue: CUSTOM_MOMENT_FORMATS },
24088
- { provide: i4.NgxMatDateAdapter, useClass: momentAdapter.NgxMatMomentAdapter },
24088
+ { provide: i4.NgxMatDateAdapter,
24089
+ useClass: momentAdapter.NgxMatMomentAdapter,
24090
+ deps: [i6.MAT_DATE_LOCALE, momentAdapter.NGX_MAT_MOMENT_DATE_ADAPTER_OPTIONS]
24091
+ },
24089
24092
  { provide: momentAdapter.NGX_MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: { useUtc: true } }
24090
24093
  ]), i0__namespace.ɵɵInheritDefinitionFeature], decls: 14, vars: 26, consts: [[1, "govuk-form-group", "bottom-30", 3, "id", "ngClass"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "datepicker-container"], ["ng-model-options", "{timezone:'utc'}", 1, "govuk-input", 3, "min", "max", "formControl", "ngxMatDatetimePicker", "focusin", "focusout", "dateChange"], ["input", ""], ["matSuffix", "", "id", "pickerOpener", 3, "for"], [3, "color", "touchUi", "hideTime", "startView", "stepHour", "stepSecond", "stepMinute", "showSeconds", "showSpinners", "disableMinute", "enableMeridian", "yearSelected", "monthSelected", "opened"], ["picker", ""], [1, "form-label"], [1, "form-hint"], [1, "error-message"]], template: function DatetimePickerComponent_Template(rf, ctx) {
24091
24094
  if (rf & 1) {
@@ -24142,7 +24145,10 @@
24142
24145
  encapsulation: i0.ViewEncapsulation.None,
24143
24146
  providers: [
24144
24147
  { provide: i4.NGX_MAT_DATE_FORMATS, useValue: CUSTOM_MOMENT_FORMATS },
24145
- { provide: i4.NgxMatDateAdapter, useClass: momentAdapter.NgxMatMomentAdapter },
24148
+ { provide: i4.NgxMatDateAdapter,
24149
+ useClass: momentAdapter.NgxMatMomentAdapter,
24150
+ deps: [i6.MAT_DATE_LOCALE, momentAdapter.NGX_MAT_MOMENT_DATE_ADAPTER_OPTIONS]
24151
+ },
24146
24152
  { provide: momentAdapter.NGX_MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: { useUtc: true } }
24147
24153
  ]
24148
24154
  }]
@@ -29218,7 +29224,7 @@
29218
29224
  }
29219
29225
  else {
29220
29226
  return this.caseNotifier.fetchAndRefresh(cid)
29221
- .pipe(operators.catchError(function (error) { return _this.checkAuthorizationError(error, cid); }))
29227
+ .pipe(operators.catchError(function (error) { return _this.checkAuthorizationError(error); }))
29222
29228
  .toPromise();
29223
29229
  }
29224
29230
  }
@@ -29231,25 +29237,20 @@
29231
29237
  _this.caseNotifier.cachedCaseView = classTransformer.plainToClassFromExist(new CaseView(), caseView);
29232
29238
  _this.caseNotifier.announceCase(_this.caseNotifier.cachedCaseView);
29233
29239
  return _this.caseNotifier.cachedCaseView;
29234
- }), operators.catchError(function (error) { return _this.checkAuthorizationError(error, cid); })).toPromise();
29240
+ }), operators.catchError(function (error) { return _this.checkAuthorizationError(error); })).toPromise();
29235
29241
  };
29236
- CaseResolver.prototype.checkAuthorizationError = function (error, caseReference) {
29237
- console.error(error);
29242
+ CaseResolver.prototype.checkAuthorizationError = function (error) {
29238
29243
  // TODO Should be logged to remote logging infrastructure
29239
29244
  if (error.status === 400) {
29240
29245
  this.router.navigate(['/search/noresults']);
29241
29246
  return rxjs.of(null);
29242
29247
  }
29243
- // Error 403, navigate to restricted case access page
29244
- if (error.status === 403) {
29245
- this.router.navigate(["/cases/restricted-case-access/" + caseReference]);
29246
- return rxjs.of(null);
29247
- }
29248
+ console.error(error);
29248
29249
  if (CaseResolver.EVENT_REGEX.test(this.previousUrl) && error.status === 404) {
29249
29250
  this.router.navigate(['/list/case']);
29250
29251
  return rxjs.of(null);
29251
29252
  }
29252
- if (error.status !== 401) {
29253
+ if (error.status !== 401 && error.status !== 403) {
29253
29254
  this.router.navigate(['/error']);
29254
29255
  }
29255
29256
  this.goToDefaultPage();