@kuzntsv/uikit 1.0.54 → 1.0.57
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.
|
@@ -2582,6 +2582,7 @@ var BaseSignalEditClass = class BaseSignalEditClass {
|
|
|
2582
2582
|
});
|
|
2583
2583
|
loaderService = inject(LoaderService);
|
|
2584
2584
|
notificationService = inject(NotificationService);
|
|
2585
|
+
roleService = inject(RoleService);
|
|
2585
2586
|
subscription = new Subscription();
|
|
2586
2587
|
domainModelToFormModel(domainModel) {
|
|
2587
2588
|
return { ...domainModel };
|
|
@@ -2609,6 +2610,12 @@ var BaseSignalEditClass = class BaseSignalEditClass {
|
|
|
2609
2610
|
this.dialogRef?.close(this.dialogData());
|
|
2610
2611
|
} else this.form().markAsTouched();
|
|
2611
2612
|
}
|
|
2613
|
+
isVisibleForForbiddenRoles(forbiddenRoles) {
|
|
2614
|
+
return !this.roleService.hasForbiddenRole(forbiddenRoles);
|
|
2615
|
+
}
|
|
2616
|
+
isVisibleForAllowedRoles(allowedRoles) {
|
|
2617
|
+
return this.roleService.hasAnyRole(allowedRoles);
|
|
2618
|
+
}
|
|
2612
2619
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2613
2620
|
minVersion: "12.0.0",
|
|
2614
2621
|
version: "22.2.2",
|
|
@@ -2653,6 +2660,18 @@ var BaseSignalFilterClass = class BaseSignalFilterClass {
|
|
|
2653
2660
|
else this.filters.set({ ...this.DEFAULT_FILTER });
|
|
2654
2661
|
});
|
|
2655
2662
|
}
|
|
2663
|
+
clearField(fieldName, defaultValue) {
|
|
2664
|
+
this.filters.update((prev) => ({
|
|
2665
|
+
...prev,
|
|
2666
|
+
[fieldName]: defaultValue
|
|
2667
|
+
}));
|
|
2668
|
+
}
|
|
2669
|
+
clearFieldInternal(fieldName, defaultValue) {
|
|
2670
|
+
this.internalFilterSignal.update((prev) => ({
|
|
2671
|
+
...prev,
|
|
2672
|
+
[fieldName]: defaultValue
|
|
2673
|
+
}));
|
|
2674
|
+
}
|
|
2656
2675
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2657
2676
|
minVersion: "12.0.0",
|
|
2658
2677
|
version: "22.2.2",
|