@hmcts/rpx-xui-common-lib 2.0.7 → 2.0.8-remove-special-characters-allow-space

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.
@@ -2357,11 +2357,12 @@ class SearchLocationComponent {
2357
2357
  this.locationSelected = new EventEmitter();
2358
2358
  this.locationTermSearchInputChanged = new EventEmitter();
2359
2359
  this.searchLocationChanged = new EventEmitter();
2360
- this.searchTermFormControl = new FormControl('');
2360
+ this.searchTermFormControl = new FormControl('', Validators.pattern('/[^a-zA-Z -]/'));
2361
2361
  this.minSearchCharacters = 3;
2362
2362
  this.term = '';
2363
2363
  this.pReset = true;
2364
2364
  this.debounceTimeInput = 300;
2365
+ this.binaryValue = '';
2365
2366
  }
2366
2367
  ngOnInit() {
2367
2368
  const searchInputChanges$ = this.searchTermFormControl.valueChanges
@@ -2426,12 +2427,22 @@ class SearchLocationComponent {
2426
2427
  }
2427
2428
  return locations.filter(location => !selectedLocations.map(selectedLocation => selectedLocation.epimms_id).includes(location.epimms_id) && location[this.propertyNameFilter]);
2428
2429
  }
2430
+ RemoveInvalidString(formInputValue) {
2431
+ const element = formInputValue.target;
2432
+ const newInputValue = element.value;
2433
+ if (/[^a-zA-Z -]/.test(newInputValue)) {
2434
+ element.value = this.binaryValue;
2435
+ }
2436
+ else {
2437
+ this.binaryValue = newInputValue;
2438
+ }
2439
+ }
2429
2440
  }
2430
2441
  SearchLocationComponent.allLocationAPI = `api/locations/getLocations`;
2431
2442
  SearchLocationComponent.ɵfac = function SearchLocationComponent_Factory(t) { return new (t || SearchLocationComponent)(i0.ɵɵdirectiveInject(LocationService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(RefDataService)); };
2432
- SearchLocationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchLocationComponent, selectors: [["exui-search-location"]], inputs: { form: "form", field: "field", disabled: "disabled", singleMode: "singleMode", locationType: "locationType", serviceIds: "serviceIds", submitted: "submitted", bookingCheck: "bookingCheck", selectedLocations: "selectedLocations", propertyNameFilter: "propertyNameFilter", delay: "delay", reset: "reset" }, outputs: { locationSelected: "locationSelected", locationTermSearchInputChanged: "locationTermSearchInputChanged", searchLocationChanged: "searchLocationChanged" }, decls: 6, vars: 6, consts: [[1, "auto-complete-container"], ["id", "inputLocationSearch", 1, "govuk-input", 3, "formControl", "matAutocomplete", "input"], ["autoActiveFirstOption", "", 1, "mat-autocomplete-panel-extend"], ["autoSearchLocation", "matAutocomplete"], [4, "ngIf"], [3, "onSelectionChange", 4, "ngFor", "ngForOf"], [3, "onSelectionChange"]], template: function SearchLocationComponent_Template(rf, ctx) { if (rf & 1) {
2443
+ SearchLocationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchLocationComponent, selectors: [["exui-search-location"]], inputs: { form: "form", field: "field", disabled: "disabled", singleMode: "singleMode", locationType: "locationType", serviceIds: "serviceIds", submitted: "submitted", bookingCheck: "bookingCheck", selectedLocations: "selectedLocations", propertyNameFilter: "propertyNameFilter", delay: "delay", reset: "reset" }, outputs: { locationSelected: "locationSelected", locationTermSearchInputChanged: "locationTermSearchInputChanged", searchLocationChanged: "searchLocationChanged" }, decls: 6, vars: 6, consts: [[1, "auto-complete-container"], ["id", "inputLocationSearch", 1, "govuk-input", 3, "formControl", "matAutocomplete", "keyup", "input"], ["autoActiveFirstOption", "", 1, "mat-autocomplete-panel-extend"], ["autoSearchLocation", "matAutocomplete"], [4, "ngIf"], [3, "onSelectionChange", 4, "ngFor", "ngForOf"], [3, "onSelectionChange"]], template: function SearchLocationComponent_Template(rf, ctx) { if (rf & 1) {
2433
2444
  i0.ɵɵelementStart(0, "div", 0)(1, "input", 1);
2434
- i0.ɵɵlistener("input", function SearchLocationComponent_Template_input_input_1_listener() { return ctx.onInput(); });
2445
+ i0.ɵɵlistener("keyup", function SearchLocationComponent_Template_input_keyup_1_listener($event) { return ctx.RemoveInvalidString($event); })("input", function SearchLocationComponent_Template_input_input_1_listener() { return ctx.onInput(); });
2435
2446
  i0.ɵɵelementEnd();
2436
2447
  i0.ɵɵelementStart(2, "mat-autocomplete", 2, 3);
2437
2448
  i0.ɵɵtemplate(4, SearchLocationComponent_ng_container_4_Template, 2, 1, "ng-container", 4);
@@ -2447,7 +2458,7 @@ SearchLocationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Sea
2447
2458
  } }, dependencies: [i1.NgForOf, i1.NgIf, i2$4.DefaultValueAccessor, i2$4.NgControlStatus, i2$4.FormControlDirective, i4.MatLegacyAutocomplete, i4.MatLegacyAutocompleteTrigger, i5.MatLegacyOption, i1.AsyncPipe, i2.RpxTranslatePipe], styles: [".autocomplete__input--show-all-values[_ngcontent-%COMP%]{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down[_ngcontent-%COMP%]{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu[_ngcontent-%COMP%]{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:calc(100% - 4px)}.autocomplete__menu--visible[_ngcontent-%COMP%]{display:block}.autocomplete__menu--hidden[_ngcontent-%COMP%]{display:none}.autocomplete__menu--overlay[_ngcontent-%COMP%]{box-shadow:#00000042 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline[_ngcontent-%COMP%]{position:relative}.autocomplete__option[_ngcontent-%COMP%]{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{pointer-events:none}.autocomplete__option[_ngcontent-%COMP%]:first-of-type{border-top-width:0}.autocomplete__option[_ngcontent-%COMP%]:last-of-type{border-bottom-width:0}.autocomplete__option--odd[_ngcontent-%COMP%]{background-color:#fafafa}.autocomplete__option--focused[_ngcontent-%COMP%], .autocomplete__option[_ngcontent-%COMP%]:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results[_ngcontent-%COMP%]{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint[_ngcontent-%COMP%], .autocomplete__input[_ngcontent-%COMP%], .autocomplete__option[_ngcontent-%COMP%]{font-size:13px;line-height:1.25}.autocomplete__hint[_ngcontent-%COMP%], .autocomplete__option[_ngcontent-%COMP%]{padding:5px}@media (min-width: 641px){.autocomplete__hint[_ngcontent-%COMP%], .autocomplete__input[_ngcontent-%COMP%], .autocomplete__option[_ngcontent-%COMP%]{font-size:13px;line-height:1.31579}}.div-action[_ngcontent-%COMP%]{display:inline-block}.add-location[_ngcontent-%COMP%]{display:inline}.remove-location-button[_ngcontent-%COMP%]{margin:5px}.hide-autocomplete[_ngcontent-%COMP%]{display:none}.auto-complete-container[_ngcontent-%COMP%]{display:inline-block;margin-right:4px;width:calc(100% - 4px)}.autocomplete__input[_ngcontent-%COMP%]{line-height:24px;font-size:19px}"] });
2448
2459
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchLocationComponent, [{
2449
2460
  type: Component,
2450
- args: [{ selector: 'exui-search-location', template: "<div class=\"auto-complete-container\">\n <input\n id=\"inputLocationSearch\"\n (input)=\"onInput()\"\n [formControl]=\"searchTermFormControl\"\n [matAutocomplete]=\"autoSearchLocation\"\n class=\"govuk-input\"\n [attr.disabled]=\"disabled\">\n <mat-autocomplete class=\"mat-autocomplete-panel-extend\" autoActiveFirstOption #autoSearchLocation=\"matAutocomplete\">\n <ng-container *ngIf=\"filteredList$ | async as filteredList\">\n <ng-container *ngIf=\"filteredList && filteredList.length >= 0\">\n <mat-option *ngFor=\"let location of filteredList\" (onSelectionChange)=\"onSelectedLocation(location)\">\n {{ location[propertyNameFilter] }}\n </mat-option>\n <mat-option *ngIf=\"filteredList.length === 0\">{{'No results found' | rpxTranslate}}</mat-option>\n </ng-container>\n </ng-container>\n </mat-autocomplete>\n</div>\n", styles: [".autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:#00000042 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width: 641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{display:inline-block;margin-right:4px;width:calc(100% - 4px)}.autocomplete__input{line-height:24px;font-size:19px}\n"] }]
2461
+ args: [{ selector: 'exui-search-location', template: "<div class=\"auto-complete-container\">\n <input\n id=\"inputLocationSearch\"\n (keyup)=\"RemoveInvalidString($event)\"\n (input)=\"onInput()\"\n [formControl]=\"searchTermFormControl\"\n [matAutocomplete]=\"autoSearchLocation\"\n class=\"govuk-input\"\n [attr.disabled]=\"disabled\">\n <mat-autocomplete class=\"mat-autocomplete-panel-extend\" autoActiveFirstOption #autoSearchLocation=\"matAutocomplete\">\n <ng-container *ngIf=\"filteredList$ | async as filteredList\">\n <ng-container *ngIf=\"filteredList && filteredList.length >= 0\">\n <mat-option *ngFor=\"let location of filteredList\" (onSelectionChange)=\"onSelectedLocation(location)\">\n {{ location[propertyNameFilter] }}\n </mat-option>\n <mat-option *ngIf=\"filteredList.length === 0\">{{'No results found' | rpxTranslate}}</mat-option>\n </ng-container>\n </ng-container>\n </mat-autocomplete>\n</div>\n", styles: [".autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:#00000042 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width: 641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{display:inline-block;margin-right:4px;width:calc(100% - 4px)}.autocomplete__input{line-height:24px;font-size:19px}\n"] }]
2451
2462
  }], function () { return [{ type: LocationService }, { type: SessionStorageService }, { type: RefDataService }]; }, { form: [{
2452
2463
  type: Input
2453
2464
  }], field: [{
@@ -6709,17 +6720,27 @@ function UserDetailsComponent_table_1_tr_17_div_9_Template(rf, ctx) { if (rf & 1
6709
6720
  i0.ɵɵadvance(1);
6710
6721
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Manage fee accounts"));
6711
6722
  } }
6712
- function UserDetailsComponent_table_1_tr_17_a_11_Template(rf, ctx) { if (rf & 1) {
6713
- i0.ɵɵelementStart(0, "a", 15);
6723
+ function UserDetailsComponent_table_1_tr_17_div_10_Template(rf, ctx) { if (rf & 1) {
6724
+ i0.ɵɵelementStart(0, "div");
6714
6725
  i0.ɵɵtext(1);
6715
6726
  i0.ɵɵpipe(2, "rpxTranslate");
6716
- i0.ɵɵelementStart(3, "span", 16);
6727
+ i0.ɵɵelementEnd();
6728
+ } if (rf & 2) {
6729
+ const accesstype_r13 = ctx.$implicit;
6730
+ i0.ɵɵadvance(1);
6731
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, accesstype_r13));
6732
+ } }
6733
+ function UserDetailsComponent_table_1_tr_17_a_12_Template(rf, ctx) { if (rf & 1) {
6734
+ i0.ɵɵelementStart(0, "a", 16);
6735
+ i0.ɵɵtext(1);
6736
+ i0.ɵɵpipe(2, "rpxTranslate");
6737
+ i0.ɵɵelementStart(3, "span", 17);
6717
6738
  i0.ɵɵtext(4);
6718
6739
  i0.ɵɵpipe(5, "rpxTranslate");
6719
6740
  i0.ɵɵelementEnd()();
6720
6741
  } if (rf & 2) {
6721
- const ctx_r11 = i0.ɵɵnextContext(3);
6722
- i0.ɵɵproperty("routerLink", ctx_r11.editPermissionRouterLink);
6742
+ const ctx_r12 = i0.ɵɵnextContext(3);
6743
+ i0.ɵɵproperty("routerLink", ctx_r12.editPermissionRouterLink);
6723
6744
  i0.ɵɵadvance(1);
6724
6745
  i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(2, 3, "Change"), " ");
6725
6746
  i0.ɵɵadvance(3);
@@ -6736,14 +6757,15 @@ function UserDetailsComponent_table_1_tr_17_Template(rf, ctx) { if (rf & 1) {
6736
6757
  i0.ɵɵtemplate(7, UserDetailsComponent_table_1_tr_17_div_7_Template, 3, 3, "div", 3);
6737
6758
  i0.ɵɵtemplate(8, UserDetailsComponent_table_1_tr_17_div_8_Template, 3, 3, "div", 3);
6738
6759
  i0.ɵɵtemplate(9, UserDetailsComponent_table_1_tr_17_div_9_Template, 3, 3, "div", 3);
6760
+ i0.ɵɵtemplate(10, UserDetailsComponent_table_1_tr_17_div_10_Template, 3, 3, "div", 14);
6739
6761
  i0.ɵɵelementEnd();
6740
- i0.ɵɵelementStart(10, "td", 12);
6741
- i0.ɵɵtemplate(11, UserDetailsComponent_table_1_tr_17_a_11_Template, 6, 7, "a", 14);
6762
+ i0.ɵɵelementStart(11, "td", 12);
6763
+ i0.ɵɵtemplate(12, UserDetailsComponent_table_1_tr_17_a_12_Template, 6, 7, "a", 15);
6742
6764
  i0.ɵɵelementEnd()();
6743
6765
  } if (rf & 2) {
6744
6766
  const ctx_r5 = i0.ɵɵnextContext(2);
6745
6767
  i0.ɵɵadvance(2);
6746
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 7, "Permissions"));
6768
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 8, "Permissions"));
6747
6769
  i0.ɵɵadvance(3);
6748
6770
  i0.ɵɵproperty("ngIf", ctx_r5.user.manageOrganisations === "Yes");
6749
6771
  i0.ɵɵadvance(1);
@@ -6754,6 +6776,8 @@ function UserDetailsComponent_table_1_tr_17_Template(rf, ctx) { if (rf & 1) {
6754
6776
  i0.ɵɵproperty("ngIf", ctx_r5.userHasRole("pui-caa"));
6755
6777
  i0.ɵɵadvance(1);
6756
6778
  i0.ɵɵproperty("ngIf", ctx_r5.userHasRole("pui-finance-manager"));
6779
+ i0.ɵɵadvance(1);
6780
+ i0.ɵɵproperty("ngForOf", ctx_r5.enabledAccessTypes);
6757
6781
  i0.ɵɵadvance(2);
6758
6782
  i0.ɵɵproperty("ngIf", ctx_r5.editPermissionRouterLink && ctx_r5.showEditLink);
6759
6783
  } }
@@ -6777,7 +6801,7 @@ function UserDetailsComponent_table_1_Template(rf, ctx) { if (rf & 1) {
6777
6801
  i0.ɵɵelementEnd();
6778
6802
  i0.ɵɵelement(16, "td", 12);
6779
6803
  i0.ɵɵelementEnd();
6780
- i0.ɵɵtemplate(17, UserDetailsComponent_table_1_tr_17_Template, 12, 9, "tr", 13);
6804
+ i0.ɵɵtemplate(17, UserDetailsComponent_table_1_tr_17_Template, 13, 10, "tr", 13);
6781
6805
  i0.ɵɵelementEnd()();
6782
6806
  } if (rf & 2) {
6783
6807
  const ctx_r1 = i0.ɵɵnextContext();
@@ -6793,9 +6817,9 @@ function UserDetailsComponent_table_1_Template(rf, ctx) { if (rf & 1) {
6793
6817
  i0.ɵɵproperty("ngIf", !ctx_r1.user.resendInvite);
6794
6818
  } }
6795
6819
  function UserDetailsComponent_button_2_Template(rf, ctx) { if (rf & 1) {
6796
- const _r13 = i0.ɵɵgetCurrentView();
6797
- i0.ɵɵelementStart(0, "button", 17);
6798
- i0.ɵɵlistener("click", function UserDetailsComponent_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r12 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r12.suspendUser(ctx_r12.user)); });
6820
+ const _r15 = i0.ɵɵgetCurrentView();
6821
+ i0.ɵɵelementStart(0, "button", 18);
6822
+ i0.ɵɵlistener("click", function UserDetailsComponent_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r15); const ctx_r14 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r14.suspendUser(ctx_r14.user)); });
6799
6823
  i0.ɵɵtext(1);
6800
6824
  i0.ɵɵpipe(2, "rpxTranslate");
6801
6825
  i0.ɵɵelementEnd();
@@ -6804,8 +6828,8 @@ function UserDetailsComponent_button_2_Template(rf, ctx) { if (rf & 1) {
6804
6828
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "Suspend account"), "\n");
6805
6829
  } }
6806
6830
  function UserDetailsComponent_div_3_Template(rf, ctx) { if (rf & 1) {
6807
- const _r15 = i0.ɵɵgetCurrentView();
6808
- i0.ɵɵelementStart(0, "div")(1, "div", 18)(2, "p");
6831
+ const _r17 = i0.ɵɵgetCurrentView();
6832
+ i0.ɵɵelementStart(0, "div")(1, "div", 19)(2, "p");
6809
6833
  i0.ɵɵtext(3);
6810
6834
  i0.ɵɵpipe(4, "rpxTranslate");
6811
6835
  i0.ɵɵelementEnd();
@@ -6817,8 +6841,8 @@ function UserDetailsComponent_div_3_Template(rf, ctx) { if (rf & 1) {
6817
6841
  i0.ɵɵtext(9);
6818
6842
  i0.ɵɵpipe(10, "rpxTranslate");
6819
6843
  i0.ɵɵelementEnd()();
6820
- i0.ɵɵelementStart(11, "a", 19);
6821
- i0.ɵɵlistener("click", function UserDetailsComponent_div_3_Template_a_click_11_listener() { i0.ɵɵrestoreView(_r15); const ctx_r14 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r14.reinviteClick(ctx_r14.user)); });
6844
+ i0.ɵɵelementStart(11, "a", 20);
6845
+ i0.ɵɵlistener("click", function UserDetailsComponent_div_3_Template_a_click_11_listener() { i0.ɵɵrestoreView(_r17); const ctx_r16 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r16.reinviteClick(ctx_r16.user)); });
6822
6846
  i0.ɵɵtext(12);
6823
6847
  i0.ɵɵpipe(13, "rpxTranslate");
6824
6848
  i0.ɵɵelementEnd()();
@@ -6833,7 +6857,7 @@ function UserDetailsComponent_div_3_Template(rf, ctx) { if (rf & 1) {
6833
6857
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(13, 10, "Resend invitation"), " ");
6834
6858
  } }
6835
6859
  function UserDetailsComponent_p_4_Template(rf, ctx) { if (rf & 1) {
6836
- i0.ɵɵelementStart(0, "p", 20)(1, "a", 21);
6860
+ i0.ɵɵelementStart(0, "p", 21)(1, "a", 22);
6837
6861
  i0.ɵɵtext(2);
6838
6862
  i0.ɵɵpipe(3, "rpxTranslate");
6839
6863
  i0.ɵɵelementEnd();
@@ -6851,6 +6875,7 @@ function UserDetailsComponent_p_4_Template(rf, ctx) { if (rf & 1) {
6851
6875
  } }
6852
6876
  class UserDetailsComponent {
6853
6877
  constructor() {
6878
+ this.enabledAccessTypes = [];
6854
6879
  this.showEditLink = false;
6855
6880
  this.showHelpLink = false;
6856
6881
  this.suspendUserEvent = new EventEmitter();
@@ -6871,7 +6896,7 @@ class UserDetailsComponent {
6871
6896
  }
6872
6897
  }
6873
6898
  UserDetailsComponent.ɵfac = function UserDetailsComponent_Factory(t) { return new (t || UserDetailsComponent)(); };
6874
- UserDetailsComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserDetailsComponent, selectors: [["xuilib-user-details"]], inputs: { user: "user", editPermissionRouterLink: "editPermissionRouterLink", warningTitle: "warningTitle", showEditLink: "showEditLink", showHelpLink: "showHelpLink", suspendHelpLink: "suspendHelpLink", showSuspendUserButton: "showSuspendUserButton" }, outputs: { suspendUserEvent: "suspendUserEvent", reinvite: "reinvite" }, decls: 5, vars: 5, consts: [["class", "govuk-warning-text", 4, "ngIf"], ["class", "govuk-table", "role", "presentation", 4, "ngIf"], ["class", "govuk-button govuk-button--warning", 3, "click", 4, "ngIf"], [4, "ngIf"], ["class", "govuk-body", 4, "ngIf"], [1, "govuk-warning-text"], [1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], ["role", "presentation", 1, "govuk-table"], [1, "govuk-table__body"], [1, "govuk-table__row"], ["scope", "row", 1, "govuk-table__header"], [1, "govuk-table__cell"], ["class", "govuk-table__row", 4, "ngIf"], ["role", "link", 3, "routerLink", 4, "ngIf"], ["role", "link", 3, "routerLink"], [1, "govuk-visually-hidden"], [1, "govuk-button", "govuk-button--warning", 3, "click"], [1, "govuk-inset-text"], ["role", "button", "draggable", "false", "id", "resend-invite-button", 1, "govuk-button", 3, "click"], [1, "govuk-body"], ["target", "_blank", 3, "routerLink"]], template: function UserDetailsComponent_Template(rf, ctx) { if (rf & 1) {
6899
+ UserDetailsComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserDetailsComponent, selectors: [["xuilib-user-details"]], inputs: { user: "user", enabledAccessTypes: "enabledAccessTypes", editPermissionRouterLink: "editPermissionRouterLink", warningTitle: "warningTitle", showEditLink: "showEditLink", showHelpLink: "showHelpLink", suspendHelpLink: "suspendHelpLink", showSuspendUserButton: "showSuspendUserButton" }, outputs: { suspendUserEvent: "suspendUserEvent", reinvite: "reinvite" }, decls: 5, vars: 5, consts: [["class", "govuk-warning-text", 4, "ngIf"], ["class", "govuk-table", "role", "presentation", 4, "ngIf"], ["class", "govuk-button govuk-button--warning", 3, "click", 4, "ngIf"], [4, "ngIf"], ["class", "govuk-body", 4, "ngIf"], [1, "govuk-warning-text"], [1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], ["role", "presentation", 1, "govuk-table"], [1, "govuk-table__body"], [1, "govuk-table__row"], ["scope", "row", 1, "govuk-table__header"], [1, "govuk-table__cell"], ["class", "govuk-table__row", 4, "ngIf"], [4, "ngFor", "ngForOf"], ["role", "link", 3, "routerLink", 4, "ngIf"], ["role", "link", 3, "routerLink"], [1, "govuk-visually-hidden"], [1, "govuk-button", "govuk-button--warning", 3, "click"], [1, "govuk-inset-text"], ["role", "button", "draggable", "false", "id", "resend-invite-button", 1, "govuk-button", 3, "click"], [1, "govuk-body"], ["target", "_blank", 3, "routerLink"]], template: function UserDetailsComponent_Template(rf, ctx) { if (rf & 1) {
6875
6900
  i0.ɵɵtemplate(0, UserDetailsComponent_div_0_Template, 6, 3, "div", 0);
6876
6901
  i0.ɵɵtemplate(1, UserDetailsComponent_table_1_Template, 18, 11, "table", 1);
6877
6902
  i0.ɵɵtemplate(2, UserDetailsComponent_button_2_Template, 3, 3, "button", 2);
@@ -6887,12 +6912,14 @@ UserDetailsComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserDe
6887
6912
  i0.ɵɵproperty("ngIf", ctx.user && ctx.user.resendInvite);
6888
6913
  i0.ɵɵadvance(1);
6889
6914
  i0.ɵɵproperty("ngIf", ctx.showHelpLink && ctx.suspendHelpLink);
6890
- } }, dependencies: [i1.NgIf, i2$1.RouterLink, i2.RpxTranslatePipe], styles: ["[_nghost-%COMP%]{display:block}"] });
6915
+ } }, dependencies: [i1.NgForOf, i1.NgIf, i2$1.RouterLink, i2.RpxTranslatePipe], styles: ["[_nghost-%COMP%]{display:block}"] });
6891
6916
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserDetailsComponent, [{
6892
6917
  type: Component,
6893
- args: [{ selector: 'xuilib-user-details', template: "<div class=\"govuk-warning-text\" *ngIf=\"warningTitle && warningTitle !== ''\">\n<span class=\"govuk-warning-text__icon\">!</span>\n<strong class=\"govuk-warning-text__text\">\n {{ warningTitle | rpxTranslate}}\n</strong>\n</div>\n<table class=\"govuk-table\" *ngIf=\"user\" role=\"presentation\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"row\">{{'Name' | rpxTranslate}}</th>\n <td class=\"govuk-table__cell\">{{user.fullName | rpxTranslate}}</td>\n <td class=\"govuk-table__cell\"></td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"row\">{{'Email address' | rpxTranslate}}</th>\n <td class=\"govuk-table__cell\">{{user.email}}</td>\n <td class=\"govuk-table__cell\"></td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"!user.resendInvite\">\n <th class=\"govuk-table__header\" scope=\"row\">{{'Permissions' | rpxTranslate}}</th>\n <td class=\"govuk-table__cell\">\n <div *ngIf=\"user.manageOrganisations === 'Yes'\">{{'Manage organisations' | rpxTranslate}}</div>\n <div *ngIf=\"user.manageUsers === 'Yes'\">{{'Manage users' | rpxTranslate}}</div>\n <div *ngIf=\"user.manageCases === 'Yes'\">{{'Manage cases' | rpxTranslate}}</div>\n <div *ngIf=\"userHasRole('pui-caa')\">{{'Case access administrator' | rpxTranslate}}</div>\n <div *ngIf=\"userHasRole('pui-finance-manager')\">{{'Manage fee accounts' | rpxTranslate}}</div>\n </td>\n <td class=\"govuk-table__cell\"><a *ngIf=\"editPermissionRouterLink && showEditLink\" role=\"link\" [routerLink]=\"editPermissionRouterLink\">{{'Change' | rpxTranslate}} <span class=\"govuk-visually-hidden\">{{'roles' | rpxTranslate}}</span></a></td>\n </tr>\n </tbody>\n</table>\n<button *ngIf=\"showSuspendUserButton\" class=\"govuk-button govuk-button--warning\" (click)=\"suspendUser(user)\">\n {{'Suspend account' | rpxTranslate}}\n</button>\n<div *ngIf=\"user && user.resendInvite\">\n <div class=\"govuk-inset-text\">\n <p>{{'This user has already been invited but has not activated their account.' | rpxTranslate}}</p>\n <p>{{'If you resend an invitation, they\\'ll receive an email from HM Courts and Tribunals to finish setting up their account.' | rpxTranslate}}</p>\n <p>{{'You can\\'t invite the same user more than once an hour.' | rpxTranslate}}</p>\n </div>\n <a role=\"button\" draggable=\"false\" class=\"govuk-button\" (click)=\"reinviteClick(user)\" id=\"resend-invite-button\">\n {{'Resend invitation' | rpxTranslate}}\n </a>\n</div>\n<p class=\"govuk-body\" *ngIf=\"showHelpLink && suspendHelpLink\"><a [routerLink]=\"suspendHelpLink\" target=\"_blank\">{{'Get help' | rpxTranslate}}</a> {{'to reactivate this account.' | rpxTranslate}}</p>\n", styles: [":host{display:block}\n"] }]
6918
+ args: [{ selector: 'xuilib-user-details', template: "<div class=\"govuk-warning-text\" *ngIf=\"warningTitle && warningTitle !== ''\">\n<span class=\"govuk-warning-text__icon\">!</span>\n<strong class=\"govuk-warning-text__text\">\n {{ warningTitle | rpxTranslate}}\n</strong>\n</div>\n<table class=\"govuk-table\" *ngIf=\"user\" role=\"presentation\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"row\">{{'Name' | rpxTranslate}}</th>\n <td class=\"govuk-table__cell\">{{user.fullName | rpxTranslate}}</td>\n <td class=\"govuk-table__cell\"></td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"row\">{{'Email address' | rpxTranslate}}</th>\n <td class=\"govuk-table__cell\">{{user.email}}</td>\n <td class=\"govuk-table__cell\"></td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"!user.resendInvite\">\n <th class=\"govuk-table__header\" scope=\"row\">{{'Permissions' | rpxTranslate}}</th>\n <td class=\"govuk-table__cell\">\n <div *ngIf=\"user.manageOrganisations === 'Yes'\">{{'Manage organisations' | rpxTranslate}}</div>\n <div *ngIf=\"user.manageUsers === 'Yes'\">{{'Manage users' | rpxTranslate}}</div>\n <div *ngIf=\"user.manageCases === 'Yes'\">{{'Manage cases' | rpxTranslate}}</div>\n <div *ngIf=\"userHasRole('pui-caa')\">{{'Case access administrator' | rpxTranslate}}</div>\n <div *ngIf=\"userHasRole('pui-finance-manager')\">{{'Manage fee accounts' | rpxTranslate}}</div>\n <div *ngFor=\"let accesstype of enabledAccessTypes\">{{ accesstype | rpxTranslate}}</div> \n </td>\n <td class=\"govuk-table__cell\"><a *ngIf=\"editPermissionRouterLink && showEditLink\" role=\"link\" [routerLink]=\"editPermissionRouterLink\">{{'Change' | rpxTranslate}} <span class=\"govuk-visually-hidden\">{{'roles' | rpxTranslate}}</span></a></td>\n </tr>\n </tbody>\n</table>\n<button *ngIf=\"showSuspendUserButton\" class=\"govuk-button govuk-button--warning\" (click)=\"suspendUser(user)\">\n {{'Suspend account' | rpxTranslate}}\n</button>\n<div *ngIf=\"user && user.resendInvite\">\n <div class=\"govuk-inset-text\">\n <p>{{'This user has already been invited but has not activated their account.' | rpxTranslate}}</p>\n <p>{{'If you resend an invitation, they\\'ll receive an email from HM Courts and Tribunals to finish setting up their account.' | rpxTranslate}}</p>\n <p>{{'You can\\'t invite the same user more than once an hour.' | rpxTranslate}}</p>\n </div>\n <a role=\"button\" draggable=\"false\" class=\"govuk-button\" (click)=\"reinviteClick(user)\" id=\"resend-invite-button\">\n {{'Resend invitation' | rpxTranslate}}\n </a>\n</div>\n<p class=\"govuk-body\" *ngIf=\"showHelpLink && suspendHelpLink\"><a [routerLink]=\"suspendHelpLink\" target=\"_blank\">{{'Get help' | rpxTranslate}}</a> {{'to reactivate this account.' | rpxTranslate}}</p>\n", styles: [":host{display:block}\n"] }]
6894
6919
  }], null, { user: [{
6895
6920
  type: Input
6921
+ }], enabledAccessTypes: [{
6922
+ type: Input
6896
6923
  }], editPermissionRouterLink: [{
6897
6924
  type: Input
6898
6925
  }], warningTitle: [{