@indigina/ui-kit 1.1.269 → 1.1.271
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.
|
@@ -3304,17 +3304,15 @@ class KitPermissionDirective {
|
|
|
3304
3304
|
/**
|
|
3305
3305
|
* Defines the permissions that a user must have in order for the content to be visible
|
|
3306
3306
|
*/
|
|
3307
|
-
this.kitPermission = [];
|
|
3307
|
+
this.kitPermission = input([], ...(ngDevMode ? [{ debugName: "kitPermission" }] : []));
|
|
3308
3308
|
/**
|
|
3309
3309
|
* Defines the permissions assigned to the user
|
|
3310
3310
|
*/
|
|
3311
|
-
this.kitPermissionUser = [];
|
|
3311
|
+
this.kitPermissionUser = input([], ...(ngDevMode ? [{ debugName: "kitPermissionUser" }] : []));
|
|
3312
|
+
effect(() => this.updateView(this.kitPermission(), this.kitPermissionUser()));
|
|
3312
3313
|
}
|
|
3313
|
-
|
|
3314
|
-
this.
|
|
3315
|
-
}
|
|
3316
|
-
updateView() {
|
|
3317
|
-
if (this.hasPermissions(this.kitPermission, this.kitPermissionUser)) {
|
|
3314
|
+
updateView(permissions, userPermissions) {
|
|
3315
|
+
if (this.hasPermissions(permissions, userPermissions)) {
|
|
3318
3316
|
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
3319
3317
|
return;
|
|
3320
3318
|
}
|
|
@@ -3324,18 +3322,14 @@ class KitPermissionDirective {
|
|
|
3324
3322
|
return permissions.map(permission => userPermissions.includes(permission)).every(Boolean);
|
|
3325
3323
|
}
|
|
3326
3324
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: KitPermissionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3327
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
3325
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.3", type: KitPermissionDirective, isStandalone: true, selector: "[kitPermission]", inputs: { kitPermission: { classPropertyName: "kitPermission", publicName: "kitPermission", isSignal: true, isRequired: false, transformFunction: null }, kitPermissionUser: { classPropertyName: "kitPermissionUser", publicName: "kitPermissionUser", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
3328
3326
|
}
|
|
3329
3327
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: KitPermissionDirective, decorators: [{
|
|
3330
3328
|
type: Directive,
|
|
3331
3329
|
args: [{
|
|
3332
3330
|
selector: '[kitPermission]',
|
|
3333
3331
|
}]
|
|
3334
|
-
}],
|
|
3335
|
-
type: Input
|
|
3336
|
-
}], kitPermissionUser: [{
|
|
3337
|
-
type: Input
|
|
3338
|
-
}] } });
|
|
3332
|
+
}], ctorParameters: () => [] });
|
|
3339
3333
|
|
|
3340
3334
|
const expandCollapseAnimation = (property) => trigger(`${property}ExpandCollapseAnimation`, [
|
|
3341
3335
|
state('void', style({
|
|
@@ -8412,7 +8406,7 @@ class KitGridSearchComponent {
|
|
|
8412
8406
|
this.gridState$ = this.store.select(KIT_GRID_STATE_TOKEN);
|
|
8413
8407
|
}
|
|
8414
8408
|
ngAfterViewInit() {
|
|
8415
|
-
this.kitSearchBarComponent().changed.pipe(debounceTime(500), switchMap(value => value && this.store.dispatch(new SetGridSearch(value)) || this.store.dispatch(new RemoveGridSearch()))).subscribe(() => {
|
|
8409
|
+
this.kitSearchBarComponent().changed.pipe(debounceTime(500), map(value => value.trim()), switchMap(value => value && this.store.dispatch(new SetGridSearch(value)) || this.store.dispatch(new RemoveGridSearch()))).subscribe(() => {
|
|
8416
8410
|
this.kitGridUrlStateService.setGridStateToUrl(this.store.selectSnapshot(KIT_GRID_STATE_TOKEN));
|
|
8417
8411
|
});
|
|
8418
8412
|
}
|