@hmcts/rpx-xui-common-lib 1.7.20 → 1.7.28
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/bundles/hmcts-rpx-xui-common-lib.umd.js +26 -22
- package/bundles/hmcts-rpx-xui-common-lib.umd.js.map +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/components/search-service/search-service.component.js +2 -2
- package/esm2015/lib/services/role-guard/role.guard.js +22 -15
- package/esm2015/lib/services/role-guard/role.service.js +13 -13
- package/esm5/lib/components/search-service/search-service.component.js +2 -2
- package/esm5/lib/services/role-guard/role.guard.js +22 -15
- package/esm5/lib/services/role-guard/role.service.js +13 -13
- package/fesm2015/hmcts-rpx-xui-common-lib.js +29 -24
- package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/fesm5/hmcts-rpx-xui-common-lib.js +29 -24
- package/fesm5/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/hmcts-rpx-xui-common-lib.metadata.json +1 -1
- package/lib/services/role-guard/role.guard.d.ts +2 -1
- package/lib/services/role-guard/role.service.d.ts +3 -1
- package/package.json +1 -1
|
@@ -5514,7 +5514,7 @@
|
|
|
5514
5514
|
SearchServiceComponent.decorators = [
|
|
5515
5515
|
{ type: i0.Component, args: [{
|
|
5516
5516
|
selector: 'exui-search-service',
|
|
5517
|
-
template: "<div class=\"auto-complete-container\">\n <input\n id=\"inputServiceSearch\"\n (input)=\"onInput()\"\n [formControl]=\"form
|
|
5517
|
+
template: "<div class=\"auto-complete-container\">\n <input\n id=\"inputServiceSearch\"\n (input)=\"onInput()\"\n [formControl]=\"form?.controls.searchTerm\"\n [matAutocomplete]=\"autoSearchService\"\n class=\"govuk-input\"\n [attr.disabled]=\"disabled\">\n <mat-autocomplete class=\"mat-autocomplete-panel-extend\" autoActiveFirstOption #autoSearchService=\"matAutocomplete\">\n <mat-option *ngFor=\"let service of services\" (onSelectionChange)=\"onSelectionChange()\">\n {{ service.name }}\n </mat-option>\n <mat-option *ngIf=\"!services?.length && showAutocomplete && term && term.length >= this.minSearchCharacters\">No results found</mat-option>\n </mat-autocomplete>\n</div>\n",
|
|
5518
5518
|
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:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:rgba(0,0,0,.256863) 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{min-width:250px;display:inline-block;margin-right:4px}.autocomplete__input{line-height:24px;font-size:19px}"]
|
|
5519
5519
|
}] }
|
|
5520
5520
|
];
|
|
@@ -7701,19 +7701,18 @@
|
|
|
7701
7701
|
*/
|
|
7702
7702
|
var RoleService = /** @class */ (function () {
|
|
7703
7703
|
function RoleService() {
|
|
7704
|
-
this.pRoles =
|
|
7704
|
+
this.pRoles = new rxjs.BehaviorSubject(null);
|
|
7705
|
+
this.roles$ = this.pRoles.asObservable().pipe(operators.skipWhile(( /**
|
|
7706
|
+
* @param {?} item
|
|
7707
|
+
* @return {?}
|
|
7708
|
+
*/function (item) { return item === null; })));
|
|
7705
7709
|
}
|
|
7706
7710
|
Object.defineProperty(RoleService.prototype, "roles", {
|
|
7707
|
-
get: /**
|
|
7708
|
-
* @return {?}
|
|
7709
|
-
*/ function () {
|
|
7710
|
-
return this.pRoles;
|
|
7711
|
-
},
|
|
7712
7711
|
set: /**
|
|
7713
7712
|
* @param {?} roles
|
|
7714
7713
|
* @return {?}
|
|
7715
7714
|
*/ function (roles) {
|
|
7716
|
-
this.pRoles
|
|
7715
|
+
this.pRoles.next(roles);
|
|
7717
7716
|
},
|
|
7718
7717
|
enumerable: true,
|
|
7719
7718
|
configurable: true
|
|
@@ -7754,23 +7753,28 @@
|
|
|
7754
7753
|
*/
|
|
7755
7754
|
function (route) {
|
|
7756
7755
|
var _this = this;
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
/** @type {?} */
|
|
7760
|
-
var check = ( /**
|
|
7761
|
-
* @param {?} roleRegEx
|
|
7756
|
+
return this.roleService.roles$.pipe(operators.map(( /**
|
|
7757
|
+
* @param {?} roles
|
|
7762
7758
|
* @return {?}
|
|
7763
|
-
*/function (
|
|
7759
|
+
*/function (roles) {
|
|
7760
|
+
/** @type {?} */
|
|
7761
|
+
var canActivateRoles = (( /** @type {?} */(route.data.needsRole)));
|
|
7764
7762
|
/** @type {?} */
|
|
7765
|
-
var
|
|
7766
|
-
|
|
7767
|
-
* @param {?} role
|
|
7763
|
+
var check = ( /**
|
|
7764
|
+
* @param {?} roleRegEx
|
|
7768
7765
|
* @return {?}
|
|
7769
|
-
*/function (
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7766
|
+
*/function (roleRegEx) {
|
|
7767
|
+
/** @type {?} */
|
|
7768
|
+
var regex = new RegExp(roleRegEx);
|
|
7769
|
+
return roles.some(( /**
|
|
7770
|
+
* @param {?} role
|
|
7771
|
+
* @return {?}
|
|
7772
|
+
*/function (role) { return regex.test(role); }));
|
|
7773
|
+
});
|
|
7774
|
+
/** @type {?} */
|
|
7775
|
+
var match = route.data.roleMatching === RoleMatching.ALL ? canActivateRoles.every(check) : canActivateRoles.some(check);
|
|
7776
|
+
return match || _this.router.parseUrl(( /** @type {?} */(route.data.noRoleMatchRedirect)));
|
|
7777
|
+
})));
|
|
7774
7778
|
};
|
|
7775
7779
|
RoleGuard.decorators = [
|
|
7776
7780
|
{ type: i0.Injectable, args: [{
|