@hmcts/ccd-case-ui-toolkit 6.15.0-b → 6.15.0-d

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.
@@ -19501,6 +19501,9 @@
19501
19501
  PaymentField.prototype.getRefundsUrl = function () {
19502
19502
  return this.appConfig.getRefundsUrl();
19503
19503
  };
19504
+ PaymentField.prototype.getNotificationUrl = function () {
19505
+ return this.appConfig.getNotificationUrl();
19506
+ };
19504
19507
  PaymentField.prototype.getUserRoles = function () {
19505
19508
  var userDetails = JSON.parse(this.sessionStorage.getItem('userDetails') || null);
19506
19509
  if (!userDetails || !userDetails.hasOwnProperty('roles')) {
@@ -19526,12 +19529,12 @@
19526
19529
  return CasePaymentHistoryViewerFieldComponent;
19527
19530
  }(PaymentField));
19528
19531
  CasePaymentHistoryViewerFieldComponent.ɵfac = function CasePaymentHistoryViewerFieldComponent_Factory(t) { return new (t || CasePaymentHistoryViewerFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
19529
- CasePaymentHistoryViewerFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CasePaymentHistoryViewerFieldComponent, selectors: [["ccd-case-payment-history-viewer-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 15, consts: [[3, "API_ROOT", "CCD_CASE_NUMBER", "BULKSCAN_API_ROOT", "SELECTED_OPTION", "ISBSENABLE", "LOGGEDINUSEREMAIL", "LOGGEDINUSERROLES", "REFUNDS_API_ROOT", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "ISPAYMENTSTATUSENABLED"]], template: function CasePaymentHistoryViewerFieldComponent_Template(rf, ctx) {
19532
+ CasePaymentHistoryViewerFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CasePaymentHistoryViewerFieldComponent, selectors: [["ccd-case-payment-history-viewer-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 16, consts: [[3, "API_ROOT", "CCD_CASE_NUMBER", "BULKSCAN_API_ROOT", "SELECTED_OPTION", "ISBSENABLE", "LOGGEDINUSEREMAIL", "LOGGEDINUSERROLES", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "ISPAYMENTSTATUSENABLED"]], template: function CasePaymentHistoryViewerFieldComponent_Template(rf, ctx) {
19530
19533
  if (rf & 1) {
19531
19534
  i0__namespace.ɵɵelement(0, "ccpay-payment-lib", 0);
19532
19535
  }
19533
19536
  if (rf & 2) {
19534
- i0__namespace.ɵɵproperty("API_ROOT", ctx.getBaseURL())("CCD_CASE_NUMBER", ctx.caseReference)("BULKSCAN_API_ROOT", ctx.getPayBulkScanBaseURL())("SELECTED_OPTION", "CCDorException")("ISBSENABLE", "true")("LOGGEDINUSEREMAIL", ctx.getUserEmail())("LOGGEDINUSERROLES", ctx.getUserRoles())("REFUNDS_API_ROOT", ctx.getRefundsUrl())("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", false)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx.caseReference)("DCN_NUMBER", null)("ISPAYMENTSTATUSENABLED", "Enable");
19537
+ i0__namespace.ɵɵproperty("API_ROOT", ctx.getBaseURL())("CCD_CASE_NUMBER", ctx.caseReference)("BULKSCAN_API_ROOT", ctx.getPayBulkScanBaseURL())("SELECTED_OPTION", "CCDorException")("ISBSENABLE", "true")("LOGGEDINUSEREMAIL", ctx.getUserEmail())("LOGGEDINUSERROLES", ctx.getUserRoles())("REFUNDS_API_ROOT", ctx.getRefundsUrl())("NOTIFICATION_API_ROOT", ctx.getNotificationUrl())("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", false)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx.caseReference)("DCN_NUMBER", null)("ISPAYMENTSTATUSENABLED", "Enable");
19535
19538
  }
19536
19539
  }, directives: [i3__namespace.PaymentLibComponent], encapsulation: 2 });
19537
19540
  (function () {
@@ -20164,7 +20167,7 @@
20164
20167
  }
20165
20168
  if (rf & 2) {
20166
20169
  var ctx_r0 = i0__namespace.ɵɵnextContext();
20167
- i0__namespace.ɵɵproperty("API_ROOT", ctx_r0.getBaseURL())("BULKSCAN_API_ROOT", ctx_r0.getPayBulkScanBaseURL())("REFUNDS_API_ROOT", ctx_r0.getRefundsUrl())("CCD_CASE_NUMBER", ctx_r0.caseReference)("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", true)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx_r0.caseReference)("DCN_NUMBER", null)("SELECTED_OPTION", "CCDorException")("LOGGEDINUSERROLES", ctx_r0.getUserRoles())("CARDPAYMENTRETURNURL", ctx_r0.getCardPaymentReturnUrl())("ISPAYMENTSTATUSENABLED", "Enable");
20170
+ i0__namespace.ɵɵproperty("API_ROOT", ctx_r0.getBaseURL())("BULKSCAN_API_ROOT", ctx_r0.getPayBulkScanBaseURL())("REFUNDS_API_ROOT", ctx_r0.getRefundsUrl())("NOTIFICATION_API_ROOT", ctx_r0.getNotificationUrl())("CCD_CASE_NUMBER", ctx_r0.caseReference)("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", true)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx_r0.caseReference)("DCN_NUMBER", null)("SELECTED_OPTION", "CCDorException")("LOGGEDINUSERROLES", ctx_r0.getUserRoles())("CARDPAYMENTRETURNURL", ctx_r0.getCardPaymentReturnUrl())("ISPAYMENTSTATUSENABLED", "Enable");
20168
20171
  }
20169
20172
  }
20170
20173
  var WaysToPayFieldComponent = /** @class */ (function (_super) {
@@ -20178,9 +20181,9 @@
20178
20181
  return WaysToPayFieldComponent;
20179
20182
  }(PaymentField));
20180
20183
  WaysToPayFieldComponent.ɵfac = function WaysToPayFieldComponent_Factory(t) { return new (t || WaysToPayFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
20181
- WaysToPayFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WaysToPayFieldComponent, selectors: [["ccd-ways-to-pay-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED", 4, "ngIf"], [3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED"]], template: function WaysToPayFieldComponent_Template(rf, ctx) {
20184
+ WaysToPayFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WaysToPayFieldComponent, selectors: [["ccd-ways-to-pay-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED", 4, "ngIf"], [3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED"]], template: function WaysToPayFieldComponent_Template(rf, ctx) {
20182
20185
  if (rf & 1) {
20183
- i0__namespace.ɵɵtemplate(0, WaysToPayFieldComponent_ccpay_payment_lib_0_Template, 1, 14, "ccpay-payment-lib", 0);
20186
+ i0__namespace.ɵɵtemplate(0, WaysToPayFieldComponent_ccpay_payment_lib_0_Template, 1, 15, "ccpay-payment-lib", 0);
20184
20187
  }
20185
20188
  if (rf & 2) {
20186
20189
  i0__namespace.ɵɵproperty("ngIf", ctx.getUserRoles().length > 0);
@@ -30910,7 +30913,7 @@
30910
30913
  var _r34_1 = i0__namespace.ɵɵgetCurrentView();
30911
30914
  i0__namespace.ɵɵelementContainerStart(0);
30912
30915
  i0__namespace.ɵɵelementStart(1, "mat-tab-group", 23, 24);
30913
- i0__namespace.ɵɵlistener("selectedTabChange", function CaseFullAccessViewComponent_ng_container_12_Template_mat_tab_group_selectedTabChange_1_listener($event) { i0__namespace.ɵɵrestoreView(_r34_1); var ctx_r33 = i0__namespace.ɵɵnextContext(); return ctx_r33.tabChanged($event); });
30916
+ i0__namespace.ɵɵlistener("selectedIndexChange", function CaseFullAccessViewComponent_ng_container_12_Template_mat_tab_group_selectedIndexChange_1_listener($event) { i0__namespace.ɵɵrestoreView(_r34_1); var ctx_r33 = i0__namespace.ɵɵnextContext(); return ctx_r33.tabChanged($event); });
30914
30917
  i0__namespace.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template, 1, 2, "mat-tab", 25);
30915
30918
  i0__namespace.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template, 2, 2, "mat-tab", 25);
30916
30919
  i0__namespace.ɵɵtemplate(5, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template, 1, 2, "mat-tab", 25);
@@ -30948,6 +30951,7 @@
30948
30951
  this.location = location;
30949
30952
  this.crf = crf;
30950
30953
  this.sessionStorageService = sessionStorageService;
30954
+ this.HEARINGS_TAB_LABEL = 'Hearings';
30951
30955
  this.hasPrint = true;
30952
30956
  this.hasEventSelector = true;
30953
30957
  this.prependedTabs = [];
@@ -30959,6 +30963,7 @@
30959
30963
  this.ignoreWarning = false;
30960
30964
  this.selectedTabIndex = 0;
30961
30965
  this.activeCaseFlags = false;
30966
+ this.subs = [];
30962
30967
  this.callbackErrorsSubject = new rxjs.Subject();
30963
30968
  }
30964
30969
  CaseFullAccessViewComponent.prototype.ngOnInit = function () {
@@ -31011,6 +31016,7 @@
31011
31016
  this.unsubscribe(this.callbackErrorsSubject);
31012
31017
  this.unsubscribe(this.errorSubscription);
31013
31018
  this.unsubscribe(this.subscription);
31019
+ this.subs.forEach(function (s) { return s.unsubscribe(); });
31014
31020
  };
31015
31021
  CaseFullAccessViewComponent.prototype.unsubscribe = function (subscription) {
31016
31022
  if (subscription) {
@@ -31019,7 +31025,7 @@
31019
31025
  };
31020
31026
  CaseFullAccessViewComponent.prototype.checkRouteAndSetCaseViewTab = function () {
31021
31027
  var _this = this;
31022
- this.router.events
31028
+ this.subs.push(this.router.events
31023
31029
  .pipe(operators.filter(function (event) { return event instanceof i1$1.NavigationEnd; }))
31024
31030
  .subscribe(function (event) {
31025
31031
  var url = event && event.url;
@@ -31031,8 +31037,9 @@
31031
31037
  _this.tabGroup.selectedIndex = matTab.position;
31032
31038
  }
31033
31039
  }
31034
- });
31040
+ }));
31035
31041
  };
31042
+ ;
31036
31043
  CaseFullAccessViewComponent.prototype.postViewActivity = function () {
31037
31044
  return this.activityPollingService.postViewActivity(this.caseDetails.case_id);
31038
31045
  };
@@ -31155,22 +31162,25 @@
31155
31162
  }
31156
31163
  }
31157
31164
  };
31158
- CaseFullAccessViewComponent.prototype.tabChanged = function (tabChangeEvent) {
31159
- // Update selected tab index
31160
- this.selectedTabIndex = tabChangeEvent.index;
31161
- var tab = tabChangeEvent.tab['_viewContainerRef'];
31162
- var id = tab.element.nativeElement.id;
31163
- // due to some edge case like hidden tab we can't calculate the last index of existing tabs,
31164
- // so have to hard code the hearings id here
31165
- if ((tabChangeEvent.index <= 1 && this.prependedTabs && this.prependedTabs.length) ||
31166
- (this.appendedTabs && this.appendedTabs.length && id === 'hearings')) {
31165
+ // Refactored under EXUI-110 to address infinite tab loop to use tabIndexChanged instead
31166
+ CaseFullAccessViewComponent.prototype.tabChanged = function (tabIndexChanged) {
31167
+ var matTab = this.tabGroup._tabs.find(function (tab) { return tab.isActive; });
31168
+ var tabLabel = matTab.textLabel;
31169
+ // sortedTabs are fragments
31170
+ // appended/prepepended tabs use router navigation
31171
+ if ((tabIndexChanged <= 1 && this.prependedTabs && this.prependedTabs.length) ||
31172
+ (this.appendedTabs && this.appendedTabs.length && tabLabel === this.HEARINGS_TAB_LABEL)) {
31173
+ // Hack to get ID from tab as it's not easily achieved through Angular Material Tabs
31174
+ var tab = matTab['_viewContainerRef'];
31175
+ var id = tab.element.nativeElement.id;
31176
+ // cases/case-details/:caseId/hearings
31177
+ // cases/case-details/:caseId/roles-and-access
31167
31178
  this.router.navigate([id], { relativeTo: this.route });
31168
31179
  }
31169
31180
  else {
31170
- var label_1 = tabChangeEvent.tab.textLabel;
31171
- this.router.navigate(['cases', 'case-details', this.caseDetails.case_id]).then(function () {
31172
- window.location.hash = label_1;
31173
- });
31181
+ // Routing here is based on tab label, not ideal
31182
+ // cases/case-details/:caseId#tabLabel
31183
+ this.router.navigate(['cases', 'case-details', this.caseDetails.case_id], { fragment: tabLabel });
31174
31184
  }
31175
31185
  };
31176
31186
  CaseFullAccessViewComponent.prototype.onLinkClicked = function (triggerOutputEventText) {
@@ -31268,6 +31278,12 @@
31268
31278
  this.callbackErrorsSubject.next(null);
31269
31279
  this.alertService.clear();
31270
31280
  };
31281
+ CaseFullAccessViewComponent.prototype.getUrlFragment = function (url) {
31282
+ return url.split('#')[url.split('#').length - 1];
31283
+ };
31284
+ CaseFullAccessViewComponent.prototype.getTabIndexByTabLabel = function (tabGroup, tabLabel) {
31285
+ return tabGroup._tabs.toArray().findIndex(function (t) { return t.textLabel.toLowerCase() === tabLabel.toLowerCase(); });
31286
+ };
31271
31287
  return CaseFullAccessViewComponent;
31272
31288
  }());
31273
31289
  CaseFullAccessViewComponent.ORIGIN_QUERY_PARAM = 'origin';
@@ -31284,7 +31300,7 @@
31284
31300
  var _t = void 0;
31285
31301
  i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.tabGroup = _t.first);
31286
31302
  }
31287
- }, inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", caseDetails: "caseDetails", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, features: [i0__namespace.ɵɵNgOnChangesFeature], decls: 13, vars: 12, 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"], ["class", "grid-row", 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"], [3, "notificationBannerConfig", "linkClicked"], ["animationDuration", "0ms", 3, "disableRipple", "selectedIndex", "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"], ["scope", "col", 3, "id"], [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) {
31303
+ }, inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", caseDetails: "caseDetails", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, features: [i0__namespace.ɵɵNgOnChangesFeature], decls: 13, vars: 12, 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"], ["class", "grid-row", 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"], [3, "notificationBannerConfig", "linkClicked"], ["animationDuration", "0ms", 3, "disableRipple", "selectedIndex", "selectedIndexChange"], ["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"], ["scope", "col", 3, "id"], [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) {
31288
31304
  if (rf & 1) {
31289
31305
  i0__namespace.ɵɵtemplate(0, CaseFullAccessViewComponent_div_0_Template, 10, 0, "div", 0);
31290
31306
  i0__namespace.ɵɵtemplate(1, CaseFullAccessViewComponent_div_1_Template, 6, 2, "div", 0);