@hmcts/rpx-xui-common-lib 2.1.6 → 2.1.7-javascript-void
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.
- package/esm2022/lib/components/find-location/find-location.component.mjs +5 -5
- package/esm2022/lib/components/find-service/find-service.component.mjs +5 -5
- package/esm2022/lib/components/pagination/pagination.component.mjs +5 -5
- package/esm2022/lib/components/selected-case/selected-case.component.mjs +5 -5
- package/esm2022/lib/components/service-messages/service-messages.component.mjs +6 -2
- package/esm2022/lib/components/write-address/write-address.component.mjs +4 -4
- package/esm2022/lib/services/feature-toggle/feature-toggle.guard.mjs +2 -2
- package/esm2022/lib/services/feature-toggle/launch-darkly.service.mjs +6 -1
- package/esm2022/lib/services/google-tag-manager/google-tag-manager.service.mjs +1 -1
- package/fesm2022/hmcts-rpx-xui-common-lib.mjs +30 -21
- package/fesm2022/hmcts-rpx-xui-common-lib.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1394,7 +1394,7 @@ class FeatureToggleGuard {
|
|
|
1394
1394
|
* the redirecting navigation will now use replaceUrl if the initial navigation was also using the replaceUrl option.
|
|
1395
1395
|
*/
|
|
1396
1396
|
canActivate(route) {
|
|
1397
|
-
return combineLatest([...route.data.needsFeaturesEnabled.map(feature => this.featureToggleService.getValueOnce(feature,
|
|
1397
|
+
return combineLatest([...route.data.needsFeaturesEnabled.map(feature => this.featureToggleService.getValueOnce(feature, true))]).pipe(map(featureStatuses => featureStatuses.every(status => status)), map(status => (route.data.expectFeatureEnabled !== false && status) || (route.data.expectFeatureEnabled === false && !status) || this.router.parseUrl(route.data.featureDisabledRedirect)));
|
|
1398
1398
|
}
|
|
1399
1399
|
static { this.ɵfac = function FeatureToggleGuard_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FeatureToggleGuard)(i0.ɵɵinject(FeatureToggleService), i0.ɵɵinject(i2$1.Router)); }; }
|
|
1400
1400
|
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FeatureToggleGuard, factory: FeatureToggleGuard.ɵfac, providedIn: 'root' }); }
|
|
@@ -1421,6 +1421,11 @@ class LaunchDarklyService {
|
|
|
1421
1421
|
this.client.on('ready', () => {
|
|
1422
1422
|
this.client.identify(this.context).then(() => this.ready.next(true));
|
|
1423
1423
|
});
|
|
1424
|
+
this.client.on('error', (err) => {
|
|
1425
|
+
console.error('LaunchDarkly client network error:', err);
|
|
1426
|
+
// Allow the app to proceed by emitting true, so subscribers are not blocked
|
|
1427
|
+
this.ready.next(true);
|
|
1428
|
+
});
|
|
1424
1429
|
}
|
|
1425
1430
|
isEnabled(feature, defaultValue = false) {
|
|
1426
1431
|
return this.getValue(feature, defaultValue);
|
|
@@ -2886,14 +2891,14 @@ function FindLocationComponent_label_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
2886
2891
|
function FindLocationComponent_a_6_Template(rf, ctx) { if (rf & 1) {
|
|
2887
2892
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
2888
2893
|
i0.ɵɵelementStart(0, "a", 7);
|
|
2889
|
-
i0.ɵɵlistener("click", function FindLocationComponent_a_6_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(
|
|
2894
|
+
i0.ɵɵlistener("click", function FindLocationComponent_a_6_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); ctx_r0.addLocation(); return i0.ɵɵresetView($event.preventDefault()); });
|
|
2890
2895
|
i0.ɵɵtext(1, " Add location ");
|
|
2891
2896
|
i0.ɵɵelementEnd();
|
|
2892
2897
|
} }
|
|
2893
2898
|
function FindLocationComponent_ul_7_li_1_Template(rf, ctx) { if (rf & 1) {
|
|
2894
2899
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
2895
2900
|
i0.ɵɵelementStart(0, "li", 10)(1, "a", 11);
|
|
2896
|
-
i0.ɵɵlistener("click", function FindLocationComponent_ul_7_li_1_Template_a_click_1_listener() { const selection_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(
|
|
2901
|
+
i0.ɵɵlistener("click", function FindLocationComponent_ul_7_li_1_Template_a_click_1_listener($event) { const selection_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); ctx_r0.removeLocation(selection_r4); return i0.ɵɵresetView($event.preventDefault()); });
|
|
2897
2902
|
i0.ɵɵtext(2);
|
|
2898
2903
|
i0.ɵɵelementEnd()();
|
|
2899
2904
|
} if (rf & 2) {
|
|
@@ -3032,7 +3037,7 @@ class FindLocationComponent {
|
|
|
3032
3037
|
} if (rf & 2) {
|
|
3033
3038
|
let _t;
|
|
3034
3039
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.searchLocationComponent = _t.first);
|
|
3035
|
-
} }, inputs: { submitted: "submitted", enableAddLocationButton: "enableAddLocationButton", form: "form", field: "field", fields: "fields", locationTitle: "locationTitle", disableInputField: "disableInputField", formSubmissionEvent$: "formSubmissionEvent$", disabled: "disabled", services: "services" }, outputs: { locationFieldChanged: "locationFieldChanged" }, decls: 8, vars: 13, consts: [[1, "location-picker-custom"], [1, "search-location"], ["id", "input-selected-location-label", 4, "ngIf"], [1, "search-location", 3, "locationTermSearchInputChanged", "locationSelected", "searchLocationChanged", "form", "field", "selectedLocations", "delay", "disabled", "singleMode", "bookingCheck", "serviceIds", "propertyNameFilter", "locationType"], ["href", "
|
|
3040
|
+
} }, inputs: { submitted: "submitted", enableAddLocationButton: "enableAddLocationButton", form: "form", field: "field", fields: "fields", locationTitle: "locationTitle", disableInputField: "disableInputField", formSubmissionEvent$: "formSubmissionEvent$", disabled: "disabled", services: "services" }, outputs: { locationFieldChanged: "locationFieldChanged" }, decls: 8, vars: 13, consts: [[1, "location-picker-custom"], [1, "search-location"], ["id", "input-selected-location-label", 4, "ngIf"], [1, "search-location", 3, "locationTermSearchInputChanged", "locationSelected", "searchLocationChanged", "form", "field", "selectedLocations", "delay", "disabled", "singleMode", "bookingCheck", "serviceIds", "propertyNameFilter", "locationType"], ["href", "#", "class", "govuk-button add-location-button", "data-module", "govuk-button", 3, "click", 4, "ngIf"], ["class", "hmcts-filter-tags selection-container", 4, "ngIf"], ["id", "input-selected-location-label"], ["href", "#", "data-module", "govuk-button", 1, "govuk-button", "add-location-button", 3, "click"], [1, "hmcts-filter-tags", "selection-container"], ["class", "location-selection", 4, "ngFor", "ngForOf"], [1, "location-selection"], ["href", "#", 1, "hmcts-filter__tag", 3, "click"]], template: function FindLocationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3036
3041
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div");
|
|
3037
3042
|
i0.ɵɵtemplate(3, FindLocationComponent_label_3_Template, 2, 1, "label", 2);
|
|
3038
3043
|
i0.ɵɵelementEnd();
|
|
@@ -3057,7 +3062,7 @@ class FindLocationComponent {
|
|
|
3057
3062
|
}
|
|
3058
3063
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FindLocationComponent, [{
|
|
3059
3064
|
type: Component,
|
|
3060
|
-
args: [{ selector: 'xuilib-find-location', template: "<div class=\"location-picker-custom\">\n <div class=\"search-location\">\n <div>\n <label id=\"input-selected-location-label\" *ngIf=\"locationTitle\">{{locationTitle}}</label>\n </div>\n <exui-search-location class=\"search-location\"\n [form]=\"form\"\n [field]=\"field\"\n [selectedLocations]=\"selectedLocations\"\n [delay]=\"300\"\n [disabled]=\"disabled\"\n [singleMode]=\"field.maxSelected === 1\"\n [bookingCheck]=\"field.bookingCheckType\"\n [serviceIds]=\"serviceIds\"\n [propertyNameFilter]=\"propertyNameFilter\"\n (locationTermSearchInputChanged)=\"onInputChanged($event)\"\n (locationSelected)=\"onLocationSelected($event)\"\n (searchLocationChanged)=\"onSearchInputChanged()\"\n [locationType]=\"'case-management'\">\n </exui-search-location>\n </div>\n\n <div>\n <a href=\"
|
|
3065
|
+
args: [{ selector: 'xuilib-find-location', template: "<div class=\"location-picker-custom\">\n <div class=\"search-location\">\n <div>\n <label id=\"input-selected-location-label\" *ngIf=\"locationTitle\">{{locationTitle}}</label>\n </div>\n <exui-search-location class=\"search-location\"\n [form]=\"form\"\n [field]=\"field\"\n [selectedLocations]=\"selectedLocations\"\n [delay]=\"300\"\n [disabled]=\"disabled\"\n [singleMode]=\"field.maxSelected === 1\"\n [bookingCheck]=\"field.bookingCheckType\"\n [serviceIds]=\"serviceIds\"\n [propertyNameFilter]=\"propertyNameFilter\"\n (locationTermSearchInputChanged)=\"onInputChanged($event)\"\n (locationSelected)=\"onLocationSelected($event)\"\n (searchLocationChanged)=\"onSearchInputChanged()\"\n [locationType]=\"'case-management'\">\n </exui-search-location>\n </div>\n\n <div>\n <a href=\"#\" (click)=\"addLocation(); $event.preventDefault()\" class=\"govuk-button add-location-button\" data-module=\"govuk-button\" *ngIf=\"enableAddLocationButton\">\n Add location\n </a>\n </div>\n\n <ul class=\"hmcts-filter-tags selection-container\" *ngIf=\"field.maxSelected != 1\">\n <li class=\"location-selection\" *ngFor=\"let selection of selectedLocations\">\n <a class=\"hmcts-filter__tag\" (click)=\"removeLocation(selection); $event.preventDefault()\" href=\"#\">\n {{ selection[propertyNameFilter] }}\n </a>\n </li>\n </ul>\n</div>\n", styles: [".add-location-button{margin-top:10px;margin-bottom:0}.search-location__input-container{display:flex}.search-location .auto-complete-container{min-width:unset;width:calc(100% - 4px)}.search-location__input{flex:1 0 auto}.search-location .govuk-button--secondary{background-color:#ddd}\n"] }]
|
|
3061
3066
|
}], null, { locationFieldChanged: [{
|
|
3062
3067
|
type: Output
|
|
3063
3068
|
}], submitted: [{
|
|
@@ -3404,7 +3409,7 @@ function FindServiceComponent_label_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
3404
3409
|
function FindServiceComponent_a_6_Template(rf, ctx) { if (rf & 1) {
|
|
3405
3410
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
3406
3411
|
i0.ɵɵelementStart(0, "a", 9);
|
|
3407
|
-
i0.ɵɵlistener("click", function FindServiceComponent_a_6_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(
|
|
3412
|
+
i0.ɵɵlistener("click", function FindServiceComponent_a_6_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); ctx_r0.addOption(ctx_r0.tempSelectedService); return i0.ɵɵresetView($event.preventDefault()); });
|
|
3408
3413
|
i0.ɵɵtext(1);
|
|
3409
3414
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
3410
3415
|
i0.ɵɵelementStart(3, "span", 10);
|
|
@@ -3420,7 +3425,7 @@ function FindServiceComponent_a_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
3420
3425
|
function FindServiceComponent_ul_7_li_1_Template(rf, ctx) { if (rf & 1) {
|
|
3421
3426
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
3422
3427
|
i0.ɵɵelementStart(0, "li", 13)(1, "a", 14);
|
|
3423
|
-
i0.ɵɵlistener("click", function FindServiceComponent_ul_7_li_1_Template_a_click_1_listener() { const selection_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(
|
|
3428
|
+
i0.ɵɵlistener("click", function FindServiceComponent_ul_7_li_1_Template_a_click_1_listener($event) { const selection_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); ctx_r0.removeOption(selection_r4); return i0.ɵɵresetView($event.preventDefault()); });
|
|
3424
3429
|
i0.ɵɵtext(2);
|
|
3425
3430
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
3426
3431
|
i0.ɵɵelementEnd()();
|
|
@@ -3533,7 +3538,7 @@ class FindServiceComponent {
|
|
|
3533
3538
|
} if (rf & 2) {
|
|
3534
3539
|
let _t;
|
|
3535
3540
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.searchServiceComponent = _t.first);
|
|
3536
|
-
} }, inputs: { field: "field", serviceTitle: "serviceTitle", form: "form", disabled: "disabled", formSubmissionEvent$: "formSubmissionEvent$" }, outputs: { serviceFieldChanged: "serviceFieldChanged" }, decls: 8, vars: 6, consts: [[1, "service-picker-custom"], [1, "search-service"], [1, "govuk-body"], ["id", "selectServiceSearch-label", "for", "serviceSearch__select", 4, "ngIf"], [1, "search-service__input-container"], [1, "search-service__input", 3, "optionChanged", "options", "selectedOptions", "disabled"], ["href", "
|
|
3541
|
+
} }, inputs: { field: "field", serviceTitle: "serviceTitle", form: "form", disabled: "disabled", formSubmissionEvent$: "formSubmissionEvent$" }, outputs: { serviceFieldChanged: "serviceFieldChanged" }, decls: 8, vars: 6, consts: [[1, "service-picker-custom"], [1, "search-service"], [1, "govuk-body"], ["id", "selectServiceSearch-label", "for", "serviceSearch__select", 4, "ngIf"], [1, "search-service__input-container"], [1, "search-service__input", 3, "optionChanged", "options", "selectedOptions", "disabled"], ["href", "#", "class", "govuk-button govuk-button--secondary govuk-!-margin-bottom-0", "data-module", "govuk-button", "id", "add-service", 3, "click", 4, "ngIf"], ["class", "hmcts-filter-tags selection-container", 4, "ngIf"], ["id", "selectServiceSearch-label", "for", "serviceSearch__select"], ["href", "#", "data-module", "govuk-button", "id", "add-service", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-bottom-0", 3, "click"], [1, "govuk-visually-hidden"], [1, "hmcts-filter-tags", "selection-container"], ["class", "location-selection", 4, "ngFor", "ngForOf"], [1, "location-selection"], ["href", "#", 1, "hmcts-filter__tag", 3, "click"]], template: function FindServiceComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3537
3542
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2);
|
|
3538
3543
|
i0.ɵɵtemplate(3, FindServiceComponent_label_3_Template, 3, 3, "label", 3);
|
|
3539
3544
|
i0.ɵɵelementEnd();
|
|
@@ -3557,7 +3562,7 @@ class FindServiceComponent {
|
|
|
3557
3562
|
}
|
|
3558
3563
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FindServiceComponent, [{
|
|
3559
3564
|
type: Component,
|
|
3560
|
-
args: [{ selector: 'xuilib-find-service', template: "<div class=\"service-picker-custom\">\n <div class=\"search-service\">\n <div class=\"govuk-body\">\n <label id=\"selectServiceSearch-label\" for=\"serviceSearch__select\" *ngIf=\"serviceTitle\">\n {{ serviceTitle | rpxTranslate}}\n </label>\n </div>\n <div class=\"search-service__input-container\">\n <exui-search-service class=\"search-service__input\"\n [options]=\"field.options\"\n [selectedOptions]=\"selectedServices\"\n [disabled]=\"disabled\"\n (optionChanged)=\"onOptionSelected($event)\">\n </exui-search-service>\n <a href=\"
|
|
3565
|
+
args: [{ selector: 'xuilib-find-service', template: "<div class=\"service-picker-custom\">\n <div class=\"search-service\">\n <div class=\"govuk-body\">\n <label id=\"selectServiceSearch-label\" for=\"serviceSearch__select\" *ngIf=\"serviceTitle\">\n {{ serviceTitle | rpxTranslate}}\n </label>\n </div>\n <div class=\"search-service__input-container\">\n <exui-search-service class=\"search-service__input\"\n [options]=\"field.options\"\n [selectedOptions]=\"selectedServices\"\n [disabled]=\"disabled\"\n (optionChanged)=\"onOptionSelected($event)\">\n </exui-search-service>\n <a href=\"#\" (click)=\"addOption(tempSelectedService); $event.preventDefault()\"\n class=\"govuk-button govuk-button--secondary govuk-!-margin-bottom-0\" data-module=\"govuk-button\"\n *ngIf=\"field?.enableAddButton\" id=\"add-service\">\n {{ 'Add' | rpxTranslate}}\n <span class=\"govuk-visually-hidden\">{{'service' | rpxTranslate}}</span>\n </a>\n </div>\n </div>\n <ul class=\"hmcts-filter-tags selection-container\" *ngIf=\"field.maxSelected != 1\">\n <li class=\"location-selection\" *ngFor=\"let selection of selectedServices\">\n <a class=\"hmcts-filter__tag\" (click)=\"removeOption(selection); $event.preventDefault()\" href=\"#\">\n {{ selection.label | rpxTranslate }}\n </a>\n </li>\n </ul>\n</div>\n", styles: ["#add-service{background-color:#ddd}\n"] }]
|
|
3561
3566
|
}], null, { field: [{
|
|
3562
3567
|
type: Input
|
|
3563
3568
|
}], serviceTitle: [{
|
|
@@ -5703,7 +5708,7 @@ function SelectedCaseComponent_div_18_Template(rf, ctx) { if (rf & 1) {
|
|
|
5703
5708
|
function SelectedCaseComponent_table_19_tr_16_a_8_Template(rf, ctx) { if (rf & 1) {
|
|
5704
5709
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
5705
5710
|
i0.ɵɵelementStart(0, "a", 30);
|
|
5706
|
-
i0.ɵɵlistener("click", function SelectedCaseComponent_table_19_tr_16_a_8_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r3); const user_r4 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2);
|
|
5711
|
+
i0.ɵɵlistener("click", function SelectedCaseComponent_table_19_tr_16_a_8_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r3); const user_r4 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); ctx_r1.onRemove(user_r4, ctx_r1.sharedCase); return i0.ɵɵresetView($event.preventDefault()); });
|
|
5707
5712
|
i0.ɵɵtext(1);
|
|
5708
5713
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
5709
5714
|
i0.ɵɵelementStart(3, "span", 31);
|
|
@@ -5720,7 +5725,7 @@ function SelectedCaseComponent_table_19_tr_16_a_8_Template(rf, ctx) { if (rf & 1
|
|
|
5720
5725
|
function SelectedCaseComponent_table_19_tr_16_a_10_Template(rf, ctx) { if (rf & 1) {
|
|
5721
5726
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
5722
5727
|
i0.ɵɵelementStart(0, "a", 30);
|
|
5723
|
-
i0.ɵɵlistener("click", function SelectedCaseComponent_table_19_tr_16_a_10_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r5); const user_r4 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2);
|
|
5728
|
+
i0.ɵɵlistener("click", function SelectedCaseComponent_table_19_tr_16_a_10_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r5); const user_r4 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); ctx_r1.onCancel(user_r4, ctx_r1.sharedCase); return i0.ɵɵresetView($event.preventDefault()); });
|
|
5724
5729
|
i0.ɵɵtext(1);
|
|
5725
5730
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
5726
5731
|
i0.ɵɵelementStart(3, "span", 31);
|
|
@@ -5971,7 +5976,7 @@ class SelectedCaseComponent {
|
|
|
5971
5976
|
return `${elementName}-${this.sharedCase.caseId}`;
|
|
5972
5977
|
}
|
|
5973
5978
|
static { this.ɵfac = function SelectedCaseComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SelectedCaseComponent)(i0.ɵɵdirectiveInject(CaseSharingStateService)); }; }
|
|
5974
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SelectedCaseComponent, selectors: [["xuilib-selected-case"]], inputs: { sharedCase: "sharedCase", selectedUser: "selectedUser", opened: "opened", removeUserFromCaseToggleOn: "removeUserFromCaseToggleOn", caseCount: "caseCount" }, outputs: { unselect: "unselect", synchronizeStore: "synchronizeStore" }, features: [i0.ɵɵNgOnChangesFeature], decls: 20, vars: 20, consts: [[1, "govuk-accordion__section", 3, "id"], [1, "govuk-grid-row", "govuk-case-header"], [1, "govuk-grid-column-three-quarters"], [1, "govuk-case-title", 3, "id"], [1, "govuk-case-sub-title", 3, "id"], [1, "govuk-grid-column-ten-percent"], ["class", "govuk-button hmcts-button--secondary", "title", "Deselect case", 3, "id", "click", 4, "ngIf"], [1, "govuk-accordion__section-header", "govuk-grid-column-ten-percent"], [1, "govuk-accordion__section-heading"], ["type", "button", "aria-expanded", "false", 1, "govuk-accordion__section-button", 3, "id", "title"], ["aria-hidden", "true", 1, "govuk-accordion__icon"], [1, "govuk-accordion__section-content", 3, "id"], ["class", "govuk-grid-row", 4, "ngIf"], ["class", "govuk-table", 4, "ngIf"], ["title", "Deselect case", 1, "govuk-button", "hmcts-button--secondary", 3, "click", "id"], [1, "govuk-grid-row"], [1, "govuk-div-align-left", 3, "id"], [1, "govuk-table"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header", "govuk-table-column-header", 3, "id"], ["scope", "col", 1, "govuk-table__header", "govuk-table-column-actions", 3, "id"], ["scope", "col", 1, "govuk-table__header", "govuk-table-column-label", 3, "id"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "govuk-table__cell", 3, "id"], [1, "govuk-table__cell"], ["href", "
|
|
5979
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SelectedCaseComponent, selectors: [["xuilib-selected-case"]], inputs: { sharedCase: "sharedCase", selectedUser: "selectedUser", opened: "opened", removeUserFromCaseToggleOn: "removeUserFromCaseToggleOn", caseCount: "caseCount" }, outputs: { unselect: "unselect", synchronizeStore: "synchronizeStore" }, features: [i0.ɵɵNgOnChangesFeature], decls: 20, vars: 20, consts: [[1, "govuk-accordion__section", 3, "id"], [1, "govuk-grid-row", "govuk-case-header"], [1, "govuk-grid-column-three-quarters"], [1, "govuk-case-title", 3, "id"], [1, "govuk-case-sub-title", 3, "id"], [1, "govuk-grid-column-ten-percent"], ["class", "govuk-button hmcts-button--secondary", "title", "Deselect case", 3, "id", "click", 4, "ngIf"], [1, "govuk-accordion__section-header", "govuk-grid-column-ten-percent"], [1, "govuk-accordion__section-heading"], ["type", "button", "aria-expanded", "false", 1, "govuk-accordion__section-button", 3, "id", "title"], ["aria-hidden", "true", 1, "govuk-accordion__icon"], [1, "govuk-accordion__section-content", 3, "id"], ["class", "govuk-grid-row", 4, "ngIf"], ["class", "govuk-table", 4, "ngIf"], ["title", "Deselect case", 1, "govuk-button", "hmcts-button--secondary", 3, "click", "id"], [1, "govuk-grid-row"], [1, "govuk-div-align-left", 3, "id"], [1, "govuk-table"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header", "govuk-table-column-header", 3, "id"], ["scope", "col", 1, "govuk-table__header", "govuk-table-column-actions", 3, "id"], ["scope", "col", 1, "govuk-table__header", "govuk-table-column-label", 3, "id"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "govuk-table__cell", 3, "id"], [1, "govuk-table__cell"], ["href", "#", 3, "click", 4, "ngIf"], ["class", "hmcts-badge hmcts-badge--red", 4, "ngIf"], ["class", "hmcts-badge", 4, "ngIf"], ["href", "#", 3, "click"], [1, "govuk-visually-hidden"], [1, "hmcts-badge", "hmcts-badge--red"], [1, "hmcts-badge"]], template: function SelectedCaseComponent_Template(rf, ctx) { if (rf & 1) {
|
|
5975
5980
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "h3", 3);
|
|
5976
5981
|
i0.ɵɵtext(4);
|
|
5977
5982
|
i0.ɵɵpipe(5, "rpxTranslate");
|
|
@@ -6019,7 +6024,7 @@ class SelectedCaseComponent {
|
|
|
6019
6024
|
}
|
|
6020
6025
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SelectedCaseComponent, [{
|
|
6021
6026
|
type: Component,
|
|
6022
|
-
args: [{ selector: 'xuilib-selected-case', template: "<div id=\"{{buildElementId('govuk-accordion__section')}}\" class=\"govuk-accordion__section\">\r\n <div class=\"govuk-grid-row govuk-case-header\">\r\n <div class=\"govuk-grid-column-three-quarters\">\r\n <h3 id=\"{{buildElementId('case-title')}}\" class=\"govuk-case-title\">{{ sharedCase.caseTitle | rpxTranslate }}</h3>\r\n <h3 id=\"{{buildElementId('case-id')}}\" class=\"govuk-case-sub-title\">{{ sharedCase.caseId | rpxTranslate }}</h3>\r\n </div>\r\n <div class=\"govuk-grid-column-ten-percent\">\r\n <button *ngIf=\"caseCount > 1\"\r\n id=\"{{buildElementId('btn-deselect-case')}}\"\r\n class=\"govuk-button hmcts-button--secondary\"\r\n (click)=\"onDeselect(sharedCase)\" title=\"Deselect case\">\r\n {{'Deselect case' | rpxTranslate}}\r\n </button>\r\n </div>\r\n <div class=\"govuk-accordion__section-header govuk-grid-column-ten-percent\">\r\n <div class=\"govuk-accordion__section-heading\">\r\n <button type=\"button\" id=\"{{buildElementId('accordion-with-summary-sections-heading')}}\"\r\n [attr.aria-controls]=\"'accordion-with-summary-sections-content' + buildElementId('accordion-with-summary-sections-heading')\" class=\"govuk-accordion__section-button\"\r\n aria-expanded=\"false\" [title]=\"'Expand or Collapse' | rpxTranslate\">\r\n <span class=\"govuk-accordion__icon\" aria-hidden=\"true\"></span></button>\r\n </div>\r\n </div>\r\n </div>\r\n <div id=\"{{buildElementId('accordion-with-summary-sections-content')}}\" class=\"govuk-accordion__section-content\"\r\n [attr.aria-labelledby]=\"buildElementId('accordion-with-summary-sections-heading')\" >\r\n <div class=\"govuk-grid-row\" *ngIf=\"showNoUsersAccessInfo()\">\r\n <span id=\"{{buildElementId('access-info-no-user')}}\" class=\"govuk-div-align-left\">\r\n {{'No users from your organisation currently have access to this case.' | rpxTranslate}}\r\n </span>\r\n </div>\r\n <div class=\"govuk-grid-row\" *ngIf=\"showUserHasAccessInfo()\">\r\n <span id=\"{{buildElementId('access-info-has-users')}}\" class=\"govuk-div-align-left\">\r\n {{'Users from your organisation with access to this case.' | rpxTranslate}}\r\n </span>\r\n </div>\r\n <table class=\"govuk-table\" *ngIf=\"showUserAccessTable()\">\r\n <thead class=\"govuk-table__head\">\r\n <tr class=\"govuk-table__row\">\r\n <th id=\"{{buildElementId('name-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">{{'Name' | rpxTranslate}}</th>\r\n <th id=\"{{buildElementId('email-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">{{'Email address' | rpxTranslate}}</th>\r\n <th id=\"{{buildElementId('action-heading')}}\" class=\"govuk-table__header govuk-table-column-actions\" scope=\"col\">{{'Actions' | rpxTranslate}}</th>\r\n <th id=\"{{buildElementId('label-heading')}}\" class=\"govuk-table__header govuk-table-column-label\" scope=\"col\">{{ 'Status' | rpxTranslate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"govuk-table__body\">\r\n <tr class=\"govuk-table__row\" *ngFor=\"let user of combinedSortedShares; index as idx; trackBy: trackByUserId\">\r\n <td id=\"user-full-name-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}\" class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\r\n <td id=\"user-email-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}\" class=\"govuk-table__cell\">{{ user.email }}</td>\r\n <td class=\"govuk-table__cell\">\r\n <a *ngIf=\"canRemove(sharedCase.caseId, user) | async\" (click)=\"onRemove(user, sharedCase)\" href=\"
|
|
6027
|
+
args: [{ selector: 'xuilib-selected-case', template: "<div id=\"{{buildElementId('govuk-accordion__section')}}\" class=\"govuk-accordion__section\">\r\n <div class=\"govuk-grid-row govuk-case-header\">\r\n <div class=\"govuk-grid-column-three-quarters\">\r\n <h3 id=\"{{buildElementId('case-title')}}\" class=\"govuk-case-title\">{{ sharedCase.caseTitle | rpxTranslate }}</h3>\r\n <h3 id=\"{{buildElementId('case-id')}}\" class=\"govuk-case-sub-title\">{{ sharedCase.caseId | rpxTranslate }}</h3>\r\n </div>\r\n <div class=\"govuk-grid-column-ten-percent\">\r\n <button *ngIf=\"caseCount > 1\"\r\n id=\"{{buildElementId('btn-deselect-case')}}\"\r\n class=\"govuk-button hmcts-button--secondary\"\r\n (click)=\"onDeselect(sharedCase)\" title=\"Deselect case\">\r\n {{'Deselect case' | rpxTranslate}}\r\n </button>\r\n </div>\r\n <div class=\"govuk-accordion__section-header govuk-grid-column-ten-percent\">\r\n <div class=\"govuk-accordion__section-heading\">\r\n <button type=\"button\" id=\"{{buildElementId('accordion-with-summary-sections-heading')}}\"\r\n [attr.aria-controls]=\"'accordion-with-summary-sections-content' + buildElementId('accordion-with-summary-sections-heading')\" class=\"govuk-accordion__section-button\"\r\n aria-expanded=\"false\" [title]=\"'Expand or Collapse' | rpxTranslate\">\r\n <span class=\"govuk-accordion__icon\" aria-hidden=\"true\"></span></button>\r\n </div>\r\n </div>\r\n </div>\r\n <div id=\"{{buildElementId('accordion-with-summary-sections-content')}}\" class=\"govuk-accordion__section-content\"\r\n [attr.aria-labelledby]=\"buildElementId('accordion-with-summary-sections-heading')\" >\r\n <div class=\"govuk-grid-row\" *ngIf=\"showNoUsersAccessInfo()\">\r\n <span id=\"{{buildElementId('access-info-no-user')}}\" class=\"govuk-div-align-left\">\r\n {{'No users from your organisation currently have access to this case.' | rpxTranslate}}\r\n </span>\r\n </div>\r\n <div class=\"govuk-grid-row\" *ngIf=\"showUserHasAccessInfo()\">\r\n <span id=\"{{buildElementId('access-info-has-users')}}\" class=\"govuk-div-align-left\">\r\n {{'Users from your organisation with access to this case.' | rpxTranslate}}\r\n </span>\r\n </div>\r\n <table class=\"govuk-table\" *ngIf=\"showUserAccessTable()\">\r\n <thead class=\"govuk-table__head\">\r\n <tr class=\"govuk-table__row\">\r\n <th id=\"{{buildElementId('name-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">{{'Name' | rpxTranslate}}</th>\r\n <th id=\"{{buildElementId('email-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">{{'Email address' | rpxTranslate}}</th>\r\n <th id=\"{{buildElementId('action-heading')}}\" class=\"govuk-table__header govuk-table-column-actions\" scope=\"col\">{{'Actions' | rpxTranslate}}</th>\r\n <th id=\"{{buildElementId('label-heading')}}\" class=\"govuk-table__header govuk-table-column-label\" scope=\"col\">{{ 'Status' | rpxTranslate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"govuk-table__body\">\r\n <tr class=\"govuk-table__row\" *ngFor=\"let user of combinedSortedShares; index as idx; trackBy: trackByUserId\">\r\n <td id=\"user-full-name-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}\" class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\r\n <td id=\"user-email-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}\" class=\"govuk-table__cell\">{{ user.email }}</td>\r\n <td class=\"govuk-table__cell\">\r\n <a *ngIf=\"canRemove(sharedCase.caseId, user) | async\" (click)=\"onRemove(user, sharedCase); $event.preventDefault()\" href=\"#\">{{'Remove' | rpxTranslate}} <span class=\"govuk-visually-hidden\">{{ user.firstName + ' ' + user.lastName }} {{'from case' | rpxTranslate}}</span></a>\r\n <a *ngIf=\"canCancel(sharedCase.caseId, user) | async\" (click)=\"onCancel(user, sharedCase); $event.preventDefault()\" href=\"#\">{{'Cancel' | rpxTranslate}} <span class=\"govuk-visually-hidden\">{{'adding' | rpxTranslate}} {{ user.firstName + ' ' + user.lastName }} {{'to case' | rpxTranslate}}</span></a>\r\n </td>\r\n <td class=\"govuk-table__cell\">\r\n <span *ngIf=\"isToBeRemoved(sharedCase.caseId, user) | async\" class=\"hmcts-badge hmcts-badge--red\">{{'To be removed' | rpxTranslate}}</span>\r\n <span *ngIf=\"isToBeAdded(sharedCase.caseId, user) | async\" class=\"hmcts-badge\">{{'To be added' | rpxTranslate}}</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n</div>\r\n", styles: [".govuk-case-header{border-top:1px solid #bfc1c3}.govuk-case-title{font-family:nta,Arial,sans-serif;font-size:24px;color:#005ea5;font-weight:700;padding-left:0}.govuk-case-sub-title{font-family:nta,Arial,sans-serif;font-size:1rem!important;color:#6f777b;font-weight:400;padding-left:0}.govuk-grid-row{margin-left:0;margin-right:0}.govuk-grid-column-three-quarters{padding-top:5px;padding-left:0}.govuk-grid-column-twenty-percent{box-sizing:border-box;padding-top:10px;width:20%;float:left}.govuk-grid-column-ten-percent{box-sizing:border-box;padding-top:10px;width:10%;float:left}.govuk-grid-column-five-percent{box-sizing:border-box;padding-top:15px;width:5%;float:left}.govuk-table-column-header{width:38%}.govuk-table-column-actions,.govuk-table-column-label{width:12%}.govuk-div-align-left{font-family:nta,Arial,sans-serif;font-size:1.1875rem!important;line-height:1.31579!important;text-align:left;margin-bottom:20px;padding-left:0;color:#0b0c0c}.govuk-accordion__section-header{border-top:0}.govuk-accordion__section-content{padding-top:0}.govuk-accordion__section-heading,.govuk-accordion__section-button{border-top:0}\n"] }]
|
|
6023
6028
|
}], () => [{ type: CaseSharingStateService }], { sharedCase: [{
|
|
6024
6029
|
type: Input
|
|
6025
6030
|
}], selectedUser: [{
|
|
@@ -6257,10 +6262,14 @@ class ServiceMessagesComponent {
|
|
|
6257
6262
|
}
|
|
6258
6263
|
createFilteredMessages(messages) {
|
|
6259
6264
|
this.hiddenBanners = this.getSessionCookie(this.serviceMessageCookie) || [];
|
|
6265
|
+
const messageCount = messages.length;
|
|
6260
6266
|
this.filteredMessages = messages.filter((message) => {
|
|
6261
6267
|
const { roles, message_en } = message;
|
|
6262
6268
|
const regEx = new RegExp(roles);
|
|
6263
|
-
|
|
6269
|
+
// If userRoles is empty or undefined, allow the message through
|
|
6270
|
+
const isRoleMatch = ((!this.userRoles || this.userRoles.length === 0) && messageCount === 1 && roles === '.+')
|
|
6271
|
+
|| (this.userRoles && this.userRoles.some((role) => regEx.test(role)));
|
|
6272
|
+
return isRoleMatch &&
|
|
6264
6273
|
this.compareDates(message) &&
|
|
6265
6274
|
!this.hiddenBanners.includes(message_en);
|
|
6266
6275
|
});
|
|
@@ -7932,7 +7941,7 @@ class CookieBannerComponent {
|
|
|
7932
7941
|
function PaginationComponent_a_6_Template(rf, ctx) { if (rf & 1) {
|
|
7933
7942
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
7934
7943
|
i0.ɵɵelementStart(0, "a", 8);
|
|
7935
|
-
i0.ɵɵlistener("click", function PaginationComponent_a_6_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(
|
|
7944
|
+
i0.ɵɵlistener("click", function PaginationComponent_a_6_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); ctx_r1.onPrevious(); return i0.ɵɵresetView($event.preventDefault()); });
|
|
7936
7945
|
i0.ɵɵtext(1);
|
|
7937
7946
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
7938
7947
|
i0.ɵɵelementEnd();
|
|
@@ -7952,7 +7961,7 @@ function PaginationComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
7952
7961
|
function PaginationComponent_a_10_Template(rf, ctx) { if (rf & 1) {
|
|
7953
7962
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
7954
7963
|
i0.ɵɵelementStart(0, "a", 8);
|
|
7955
|
-
i0.ɵɵlistener("click", function PaginationComponent_a_10_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(
|
|
7964
|
+
i0.ɵɵlistener("click", function PaginationComponent_a_10_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); ctx_r1.onNext(); return i0.ɵɵresetView($event.preventDefault()); });
|
|
7956
7965
|
i0.ɵɵtext(1);
|
|
7957
7966
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
7958
7967
|
i0.ɵɵelementEnd();
|
|
@@ -7981,7 +7990,7 @@ class PaginationComponent {
|
|
|
7981
7990
|
this.nextPage.emit(null);
|
|
7982
7991
|
}
|
|
7983
7992
|
static { this.ɵfac = function PaginationComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaginationComponent)(); }; }
|
|
7984
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PaginationComponent, selectors: [["xuilib-pagination"]], inputs: { moreItems: "moreItems", firstRecord: "firstRecord" }, outputs: { previousPage: "previousPage", nextPage: "nextPage" }, decls: 13, vars: 7, consts: [["noPrevious", ""], ["noNext", ""], ["id", "pagination-label", 1, "hmcts-pagination"], ["aria-labelledby", "pagination-label", 1, "govuk-visually-hidden"], [1, "hmcts-pagination__list"], [1, "hmcts-pagination__item", "hmcts-pagination__item--prev"], ["class", "hmcts-pagination__link", "href", "
|
|
7993
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PaginationComponent, selectors: [["xuilib-pagination"]], inputs: { moreItems: "moreItems", firstRecord: "firstRecord" }, outputs: { previousPage: "previousPage", nextPage: "nextPage" }, decls: 13, vars: 7, consts: [["noPrevious", ""], ["noNext", ""], ["id", "pagination-label", 1, "hmcts-pagination"], ["aria-labelledby", "pagination-label", 1, "govuk-visually-hidden"], [1, "hmcts-pagination__list"], [1, "hmcts-pagination__item", "hmcts-pagination__item--prev"], ["class", "hmcts-pagination__link", "href", "#", 3, "click", 4, "ngIf", "ngIfElse"], [1, "hmcts-pagination__item", "hmcts-pagination__item--next"], ["href", "#", 1, "hmcts-pagination__link", 3, "click"], [1, "hmcts-pagination__link"]], template: function PaginationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7985
7994
|
i0.ɵɵelementStart(0, "nav", 2)(1, "p", 3);
|
|
7986
7995
|
i0.ɵɵtext(2);
|
|
7987
7996
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
@@ -8005,7 +8014,7 @@ class PaginationComponent {
|
|
|
8005
8014
|
}
|
|
8006
8015
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationComponent, [{
|
|
8007
8016
|
type: Component,
|
|
8008
|
-
args: [{ selector: 'xuilib-pagination', template: "<nav class=\"hmcts-pagination\" id=\"pagination-label\">\n\n <p class=\"govuk-visually-hidden\" aria-labelledby=\"pagination-label\">{{'Pagination navigation' | rpxTranslate}}</p>\n\n <ul class=\"hmcts-pagination__list\">\n <li class=\"hmcts-pagination__item hmcts-pagination__item--prev\">\n <a *ngIf=\"firstRecord > 1; else noPrevious\" class=\"hmcts-pagination__link\" (click)=\"onPrevious()\" href=\"
|
|
8017
|
+
args: [{ selector: 'xuilib-pagination', template: "<nav class=\"hmcts-pagination\" id=\"pagination-label\">\n\n <p class=\"govuk-visually-hidden\" aria-labelledby=\"pagination-label\">{{'Pagination navigation' | rpxTranslate}}</p>\n\n <ul class=\"hmcts-pagination__list\">\n <li class=\"hmcts-pagination__item hmcts-pagination__item--prev\">\n <a *ngIf=\"firstRecord > 1; else noPrevious\" class=\"hmcts-pagination__link\" (click)=\"onPrevious(); $event.preventDefault()\" href=\"#\">\n {{'Previous page' | rpxTranslate}}\n </a>\n <ng-template #noPrevious>\n <span class=\"hmcts-pagination__link\">{{'Previous page' | rpxTranslate}}</span>\n </ng-template>\n </li>\n\n <li class=\"hmcts-pagination__item hmcts-pagination__item--next\">\n <a *ngIf=\"moreItems; else noNext\" class=\"hmcts-pagination__link\" (click)=\"onNext(); $event.preventDefault()\" href=\"#\">{{'Next page' | rpxTranslate}}</a>\n <ng-template #noNext>\n <span class=\"hmcts-pagination__link\">{{'Next page' | rpxTranslate}}</span>\n </ng-template>\n </li>\n </ul>\n</nav>\n", styles: ["span.hmcts-pagination__link:hover{color:revert}\n"] }]
|
|
8009
8018
|
}], () => [], { moreItems: [{
|
|
8010
8019
|
type: Input
|
|
8011
8020
|
}], firstRecord: [{
|
|
@@ -8669,7 +8678,7 @@ function WriteAddressFieldComponent_div_2_div_13_Template(rf, ctx) { if (rf & 1)
|
|
|
8669
8678
|
function WriteAddressFieldComponent_div_2_a_14_Template(rf, ctx) { if (rf & 1) {
|
|
8670
8679
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
8671
8680
|
i0.ɵɵelementStart(0, "a", 23);
|
|
8672
|
-
i0.ɵɵlistener("click", function WriteAddressFieldComponent_div_2_a_14_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(
|
|
8681
|
+
i0.ɵɵlistener("click", function WriteAddressFieldComponent_div_2_a_14_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(2); ctx_r0.blankAddress(); return i0.ɵɵresetView($event.preventDefault()); });
|
|
8673
8682
|
i0.ɵɵtext(1, "I can't enter a UK postcode");
|
|
8674
8683
|
i0.ɵɵelementEnd();
|
|
8675
8684
|
} }
|
|
@@ -8890,7 +8899,7 @@ class WriteAddressFieldComponent {
|
|
|
8890
8899
|
this.addressFormGroup.get('postcode').patchValue(postcodeNeeded ? this.formGroup.get('address').get('postCode').value : '');
|
|
8891
8900
|
}
|
|
8892
8901
|
static { this.ɵfac = function WriteAddressFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || WriteAddressFieldComponent)(i0.ɵɵdirectiveInject(AddressService)); }; }
|
|
8893
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["xuilib-write-address-field"]], inputs: { formGroup: "formGroup", internationalMode: "internationalMode", isInternational: "isInternational", submissionAttempted: "submissionAttempted", startedInternational: "startedInternational", addressChosen: "addressChosen" }, outputs: { postcodeOptionSelected: "postcodeOptionSelected", internationalModeStart: "internationalModeStart", ukAddressOptionSelected: "ukAddressOptionSelected", canSelectAddress: "canSelectAddress", resetSubmission: "resetSubmission" }, features: [i0.ɵɵNgOnChangesFeature], decls: 5, vars: 8, consts: [[1, "govuk-form-group", 3, "formGroup", "ngClass"], ["class", "govuk-error-message", 4, "ngIf"], [4, "ngIf"], ["id", "govuk-radios", "class", "govuk-radios", "data-module", "govuk-radios", 4, "ngIf"], [3, "formGroup", "isInternational", "submissionAttempted", 4, "ngIf"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-label"], ["id", "addressLookup", 1, "govuk-body", "postcode-lookup", 3, "ngClass"], ["for", "postcodeInput"], [1, "govuk-hint"], [1, "govuk-body"], ["type", "text", "id", "postcodeInput", "name", "postcode", "formControlName", "postcode", 1, "govuk-input", "govuk-!-width-one-third", "postcodeinput", "inline-block", 3, "ngClass"], ["type", "button", 1, "govuk-button", "find-address", 3, "click"], ["class", "govuk-body", "id", "selectAddress", 4, "ngIf"], ["class", "manual-link govuk-link", "href", "
|
|
8902
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["xuilib-write-address-field"]], inputs: { formGroup: "formGroup", internationalMode: "internationalMode", isInternational: "isInternational", submissionAttempted: "submissionAttempted", startedInternational: "startedInternational", addressChosen: "addressChosen" }, outputs: { postcodeOptionSelected: "postcodeOptionSelected", internationalModeStart: "internationalModeStart", ukAddressOptionSelected: "ukAddressOptionSelected", canSelectAddress: "canSelectAddress", resetSubmission: "resetSubmission" }, features: [i0.ɵɵNgOnChangesFeature], decls: 5, vars: 8, consts: [[1, "govuk-form-group", 3, "formGroup", "ngClass"], ["class", "govuk-error-message", 4, "ngIf"], [4, "ngIf"], ["id", "govuk-radios", "class", "govuk-radios", "data-module", "govuk-radios", 4, "ngIf"], [3, "formGroup", "isInternational", "submissionAttempted", 4, "ngIf"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-label"], ["id", "addressLookup", 1, "govuk-body", "postcode-lookup", 3, "ngClass"], ["for", "postcodeInput"], [1, "govuk-hint"], [1, "govuk-body"], ["type", "text", "id", "postcodeInput", "name", "postcode", "formControlName", "postcode", 1, "govuk-input", "govuk-!-width-one-third", "postcodeinput", "inline-block", 3, "ngClass"], ["type", "button", 1, "govuk-button", "find-address", 3, "click"], ["class", "govuk-body", "id", "selectAddress", 4, "ngIf"], ["class", "manual-link govuk-link", "href", "#", 3, "click", 4, "ngIf"], ["id", "selectAddress", 1, "govuk-body"], [1, "govuk-body", 3, "ngClass"], ["for", "addressList", 1, "govuk-label"], [1, "form-label"], ["id", "addressList", "name", "address", "formControlName", "addressList", "focusElement", "", 1, "form-control", "govuk-select", "ccd-dropdown", "addressList", 3, "change"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "#", 1, "manual-link", "govuk-link", 3, "click"], ["id", "govuk-radios", "data-module", "govuk-radios", 1, "govuk-radios"], [1, "govuk-radios__item"], ["id", "yes", "value", "yes", "name", "ukAddress", "type", "radio", "data-aria-controls", "address-fields", "formControlName", "ukAddress", 1, "govuk-radios__input", 3, "click"], ["for", "yes", 1, "govuk-label", "govuk-radios__label"], ["id", "no", "value", "no", "name", "ukAddress", "type", "radio", "data-aria-controls", "address-fields", "formControlName", "ukAddress", 1, "govuk-radios__input", 3, "click"], ["for", "no", 1, "govuk-label", "govuk-radios__label"], ["id", "address-fields", 1, "govuk-radios__conditional"], [3, "formGroup", "isInternational", "submissionAttempted"]], template: function WriteAddressFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
8894
8903
|
i0.ɵɵelementStart(0, "div", 0);
|
|
8895
8904
|
i0.ɵɵtemplate(1, WriteAddressFieldComponent_p_1_Template, 4, 1, "p", 1)(2, WriteAddressFieldComponent_div_2_Template, 15, 9, "div", 2)(3, WriteAddressFieldComponent_div_3_Template, 11, 1, "div", 3)(4, WriteAddressFieldComponent_xuilib_write_address_inputs_4_Template, 1, 3, "xuilib-write-address-inputs", 4);
|
|
8896
8905
|
i0.ɵɵelementEnd();
|
|
@@ -8908,7 +8917,7 @@ class WriteAddressFieldComponent {
|
|
|
8908
8917
|
}
|
|
8909
8918
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteAddressFieldComponent, [{
|
|
8910
8919
|
type: Component,
|
|
8911
|
-
args: [{ selector: 'xuilib-write-address-field', template: "<div class=\"govuk-form-group\" [formGroup]=\"addressFormGroup\"\n [ngClass]=\"{'govuk-form-group--error': optionErrorsPresent}\">\n <p class=\"govuk-error-message\" *ngIf=\"optionErrorsPresent\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{optionErrorMessage}}\n </p>\n <div *ngIf=\"postcodeLookupVisible()\">\n <span class=\"govuk-label\"><strong>Provide address details</strong></span>\n <div class=\"govuk-body postcode-lookup\" id=\"addressLookup\"\n [ngClass]=\"{'govuk-form-group--error': missingPostcode || postcodeErrorPresent(true)}\">\n <label for=\"postcodeInput\">\n <span class=\"govuk-hint\">Enter a UK postcode</span>\n </label>\n <p class=\"govuk-error-message\" *ngIf=\"missingPostcode || postcodeErrorPresent(true)\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{postcodeErrorMessage}}\n </p>\n <div class=\"govuk-body\">\n <input type=\"text\" [ngClass]=\"{'govuk-input--error': missingPostcode}\" id=\"postcodeInput\" name=\"postcode\"\n class=\"govuk-input govuk-!-width-one-third postcodeinput inline-block\" formControlName=\"postcode\">\n <button type=\"button\" class=\"govuk-button find-address\" (click)=\"findAddress()\">Find address</button>\n </div>\n </div>\n\n <div class=\"govuk-body\" *ngIf=\"addressOptions\" id=\"selectAddress\">\n <div class=\"govuk-body\" [ngClass]=\"{'govuk-form-group--error': postcodeErrorPresent(false)}\">\n <label class=\"govuk-label\" for=\"addressList\">\n <span class=\"form-label\">Select an address</span>\n </label>\n <p class=\"govuk-error-message\" *ngIf=\"postcodeErrorPresent(false)\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{selectErrorMessage}}\n </p>\n <select class=\"form-control govuk-select ccd-dropdown addressList\" id=\"addressList\" name=\"address\"\n formControlName=\"addressList\" (change)=\"addressSelected()\" focusElement>\n <option *ngFor=\"let addressOption of addressOptions\" [ngValue]=\"addressOption.value\">\n {{addressOption.description}}\n </option>\n </select>\n </div>\n </div>\n\n <a class=\"manual-link govuk-link\" *ngIf=\"!shouldShowDetailFields() || (!startedInternational && !addressChosen)\"\n (click)=\"blankAddress()\" href=\"
|
|
8920
|
+
args: [{ selector: 'xuilib-write-address-field', template: "<div class=\"govuk-form-group\" [formGroup]=\"addressFormGroup\"\n [ngClass]=\"{'govuk-form-group--error': optionErrorsPresent}\">\n <p class=\"govuk-error-message\" *ngIf=\"optionErrorsPresent\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{optionErrorMessage}}\n </p>\n <div *ngIf=\"postcodeLookupVisible()\">\n <span class=\"govuk-label\"><strong>Provide address details</strong></span>\n <div class=\"govuk-body postcode-lookup\" id=\"addressLookup\"\n [ngClass]=\"{'govuk-form-group--error': missingPostcode || postcodeErrorPresent(true)}\">\n <label for=\"postcodeInput\">\n <span class=\"govuk-hint\">Enter a UK postcode</span>\n </label>\n <p class=\"govuk-error-message\" *ngIf=\"missingPostcode || postcodeErrorPresent(true)\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{postcodeErrorMessage}}\n </p>\n <div class=\"govuk-body\">\n <input type=\"text\" [ngClass]=\"{'govuk-input--error': missingPostcode}\" id=\"postcodeInput\" name=\"postcode\"\n class=\"govuk-input govuk-!-width-one-third postcodeinput inline-block\" formControlName=\"postcode\">\n <button type=\"button\" class=\"govuk-button find-address\" (click)=\"findAddress()\">Find address</button>\n </div>\n </div>\n\n <div class=\"govuk-body\" *ngIf=\"addressOptions\" id=\"selectAddress\">\n <div class=\"govuk-body\" [ngClass]=\"{'govuk-form-group--error': postcodeErrorPresent(false)}\">\n <label class=\"govuk-label\" for=\"addressList\">\n <span class=\"form-label\">Select an address</span>\n </label>\n <p class=\"govuk-error-message\" *ngIf=\"postcodeErrorPresent(false)\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{selectErrorMessage}}\n </p>\n <select class=\"form-control govuk-select ccd-dropdown addressList\" id=\"addressList\" name=\"address\"\n formControlName=\"addressList\" (change)=\"addressSelected()\" focusElement>\n <option *ngFor=\"let addressOption of addressOptions\" [ngValue]=\"addressOption.value\">\n {{addressOption.description}}\n </option>\n </select>\n </div>\n </div>\n\n <a class=\"manual-link govuk-link\" *ngIf=\"!shouldShowDetailFields() || (!startedInternational && !addressChosen)\"\n (click)=\"blankAddress(); $event.preventDefault()\" href=\"#\">I can't enter a UK postcode</a>\n </div>\n\n <div id=\"govuk-radios\" class=\"govuk-radios\" data-module=\"govuk-radios\"\n *ngIf=\"shouldShowDetailFields() && internationalMode && startedInternational && !addressChosen\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"yes\" value=\"yes\" name=\"ukAddress\" type=\"radio\"\n data-aria-controls=\"address-fields\" (click)=\"setInternationalAddress(false)\" formControlName=\"ukAddress\">\n <label class=\"govuk-label govuk-radios__label\" for=\"yes\">\n Yes\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"no\" value=\"no\" name=\"ukAddress\" type=\"radio\"\n data-aria-controls=\"address-fields\" (click)=\"setInternationalAddress(true)\" formControlName=\"ukAddress\">\n <label class=\"govuk-label govuk-radios__label\" for=\"no\">\n No\n </label>\n </div>\n <div class=\"govuk-radios__conditional\" id=\"address-fields\">\n <xuilib-write-address-inputs *ngIf=\"isInternational !== undefined\" [formGroup]=\"formGroup\"\n [isInternational]=\"isInternational\" [submissionAttempted]=\"submissionAttempted\">\n </xuilib-write-address-inputs>\n </div>\n </div>\n\n <xuilib-write-address-inputs *ngIf=\"shouldShowDetailFields() && (addressChosen || !internationalMode)\"\n [formGroup]=\"formGroup\" [isInternational]=\"false\" [submissionAttempted]=\"submissionAttempted\">\n </xuilib-write-address-inputs>\n\n</div>", styles: [".manual-link{cursor:pointer;display:block;text-decoration:underline;font-size:1.1875rem}.postcode-lookup{margin-bottom:-20px}.find-address{left:1%}:host{display:block}\n"] }]
|
|
8912
8921
|
}], () => [{ type: AddressService }], { formGroup: [{
|
|
8913
8922
|
type: Input
|
|
8914
8923
|
}], internationalMode: [{
|