@indigina/kendo 1.2.39 → 1.2.41
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/directives/requirePermission/index.mjs +3 -0
- package/esm2022/lib/directives/requirePermission/requirePermission.directive.mjs +66 -0
- package/esm2022/lib/directives/requirePermission/requirePermission.module.mjs +16 -0
- package/esm2022/lib/kendo.module.mjs +24 -18
- package/esm2022/lib/widgets/confirm-dialog/confirm-dialog.component.mjs +2 -3
- package/esm2022/lib/widgets/confirm-dialog/confirm-dialog.module.mjs +19 -0
- package/esm2022/lib/widgets/confirm-dialog/index.mjs +3 -0
- package/esm2022/lib/widgets/current-timezone/current-timezone.component.mjs +2 -3
- package/esm2022/lib/widgets/current-timezone/current-timezone.module.mjs +18 -0
- package/esm2022/lib/widgets/current-timezone/index.mjs +3 -0
- package/esm2022/lib/widgets/entity-edit/buttons-bar/buttons-bar.component.mjs +1 -1
- package/esm2022/lib/widgets/entity-edit/dropdowns/SimpleObject.mjs +2 -0
- package/esm2022/lib/widgets/entity-edit/dropdowns/form-dropdown/form-dropdown.component.mjs +2 -5
- package/esm2022/lib/widgets/entity-edit/dropdowns/object-dropdown/object-dropdown.component.mjs +87 -0
- package/esm2022/lib/widgets/entity-edit/dropdowns/object-dropdown/object-dropdown.module.mjs +32 -0
- package/esm2022/lib/widgets/entity-list/entity-list.component.mjs +3 -3
- package/esm2022/lib/widgets/entity-list/user-list-admin.component.mjs +3 -3
- package/esm2022/public-api.mjs +6 -4
- package/fesm2022/indigina-kendo.mjs +260 -114
- package/fesm2022/indigina-kendo.mjs.map +1 -1
- package/lib/directives/requirePermission/index.d.ts +2 -0
- package/lib/directives/{requirePermission.directive.d.ts → requirePermission/requirePermission.directive.d.ts} +2 -2
- package/lib/directives/requirePermission/requirePermission.module.d.ts +7 -0
- package/lib/kendo.module.d.ts +26 -26
- package/lib/widgets/confirm-dialog/confirm-dialog.module.d.ts +9 -0
- package/lib/widgets/confirm-dialog/index.d.ts +2 -0
- package/lib/widgets/current-timezone/current-timezone.component.d.ts +0 -1
- package/lib/widgets/current-timezone/current-timezone.module.d.ts +8 -0
- package/lib/widgets/current-timezone/index.d.ts +2 -0
- package/lib/widgets/entity-edit/dropdowns/SimpleObject.d.ts +5 -0
- package/lib/widgets/entity-edit/dropdowns/form-dropdown/form-dropdown.component.d.ts +0 -1
- package/lib/widgets/entity-edit/dropdowns/object-dropdown/object-dropdown.component.d.ts +32 -0
- package/lib/widgets/entity-edit/dropdowns/object-dropdown/object-dropdown.module.d.ts +11 -0
- package/package.json +1 -1
- package/public-api.d.ts +6 -3
- package/esm2022/lib/directives/requirePermission.directive.mjs +0 -66
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementRef, OnInit, Renderer2 } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute } from '@angular/router';
|
|
3
|
-
import { PermissionTypes } from '
|
|
4
|
-
import { PermissionsService } from '
|
|
3
|
+
import { PermissionTypes } from '../../models/PermissionTypes';
|
|
4
|
+
import { PermissionsService } from '../../services/permissions.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class RequirePermissionDirective implements OnInit {
|
|
7
7
|
private elementRef;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./requirePermission.directive";
|
|
3
|
+
export declare class RequirePermissionModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RequirePermissionModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RequirePermissionModule, [typeof i1.RequirePermissionDirective], never, [typeof i1.RequirePermissionDirective]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<RequirePermissionModule>;
|
|
7
|
+
}
|
package/lib/kendo.module.d.ts
CHANGED
|
@@ -11,34 +11,34 @@ import * as i6 from "./widgets/entity-edit/entity-edit-form.component";
|
|
|
11
11
|
import * as i7 from "./widgets/entity-list/entity-list.component";
|
|
12
12
|
import * as i8 from "./widgets/entity-edit/field-multiselect/field-multiselect.component";
|
|
13
13
|
import * as i9 from "./widgets/entity-list/field-dropdownlist/field-dropdownlist.component";
|
|
14
|
-
import * as i10 from "./widgets/
|
|
15
|
-
import * as i11 from "./widgets/
|
|
16
|
-
import * as i12 from "./widgets/
|
|
17
|
-
import * as i13 from "./
|
|
18
|
-
import * as i14 from "./widgets/
|
|
19
|
-
import * as i15 from "./
|
|
20
|
-
import * as i16 from "./widgets/
|
|
21
|
-
import * as i17 from "./
|
|
22
|
-
import * as i18 from "
|
|
23
|
-
import * as i19 from "
|
|
24
|
-
import * as i20 from "./
|
|
25
|
-
import * as i21 from "@angular
|
|
26
|
-
import * as i22 from "@angular
|
|
27
|
-
import * as i23 from "
|
|
28
|
-
import * as i24 from "@progress/kendo-angular-
|
|
29
|
-
import * as i25 from "@progress/kendo-angular-
|
|
30
|
-
import * as i26 from "@
|
|
31
|
-
import * as i27 from "@progress/kendo-angular-
|
|
32
|
-
import * as i28 from "@progress/kendo-angular-
|
|
33
|
-
import * as i29 from "@angular
|
|
34
|
-
import * as i30 from "@
|
|
35
|
-
import * as i31 from "
|
|
36
|
-
import * as i32 from "
|
|
37
|
-
import * as i33 from "
|
|
38
|
-
import * as i34 from "./
|
|
14
|
+
import * as i10 from "./widgets/excel-export-button/excel-export-button.component";
|
|
15
|
+
import * as i11 from "./widgets/multicheck-filter/multicheck-filter.component";
|
|
16
|
+
import * as i12 from "./widgets/activity-filter/activity-filter.component";
|
|
17
|
+
import * as i13 from "./widgets/modal-window/modal-window.component";
|
|
18
|
+
import * as i14 from "./angular/widgets/live-updates-control/live-updates-control.component";
|
|
19
|
+
import * as i15 from "./components/azure-login-callback/azure-login-callback.component";
|
|
20
|
+
import * as i16 from "./widgets/entity-list/user-list-admin.component";
|
|
21
|
+
import * as i17 from "./components/forbidden/forbidden.component";
|
|
22
|
+
import * as i18 from "@angular/common";
|
|
23
|
+
import * as i19 from "@angular/router";
|
|
24
|
+
import * as i20 from "./angular/indigina.module";
|
|
25
|
+
import * as i21 from "@progress/kendo-angular-popup";
|
|
26
|
+
import * as i22 from "@progress/kendo-angular-grid";
|
|
27
|
+
import * as i23 from "@progress/kendo-angular-inputs";
|
|
28
|
+
import * as i24 from "@progress/kendo-angular-buttons";
|
|
29
|
+
import * as i25 from "@progress/kendo-angular-dialog";
|
|
30
|
+
import * as i26 from "@angular/forms";
|
|
31
|
+
import * as i27 from "@progress/kendo-angular-dropdowns";
|
|
32
|
+
import * as i28 from "@progress/kendo-angular-tooltip";
|
|
33
|
+
import * as i29 from "@progress/kendo-angular-dateinputs";
|
|
34
|
+
import * as i30 from "@azure/msal-angular";
|
|
35
|
+
import * as i31 from "./widgets/entity-edit/dropdowns/field-dropdown/field-dropdown.module";
|
|
36
|
+
import * as i32 from "./widgets/current-timezone/current-timezone.module";
|
|
37
|
+
import * as i33 from "./widgets/confirm-dialog/confirm-dialog.module";
|
|
38
|
+
import * as i34 from "./directives/requirePermission/requirePermission.module";
|
|
39
39
|
export declare class KendoModule {
|
|
40
40
|
static forRoot(config: IndiginaConfiguration, servicesConfig?: ServicesConfiguration): ModuleWithProviders<KendoModule>;
|
|
41
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<KendoModule, never>;
|
|
42
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<KendoModule, [typeof i1.TopMenuComponent, typeof i2.FooterBarComponent, typeof i3.AccountMenuComponent, typeof i4.LanguageSelectorComponent, typeof i5.EntityEditButtonsBarComponent, typeof i6.EntityEditFormComponent, typeof i7.EntityListComponent, typeof i8.FieldMultiSelectComponent, typeof i9.FieldDropdownlistComponent, typeof i10.
|
|
42
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<KendoModule, [typeof i1.TopMenuComponent, typeof i2.FooterBarComponent, typeof i3.AccountMenuComponent, typeof i4.LanguageSelectorComponent, typeof i5.EntityEditButtonsBarComponent, typeof i6.EntityEditFormComponent, typeof i7.EntityListComponent, typeof i8.FieldMultiSelectComponent, typeof i9.FieldDropdownlistComponent, typeof i10.ExcelExportButtonComponent, typeof i11.MulticheckFilterComponent, typeof i12.ActivityFilterComponent, typeof i13.ModalWindowComponent, typeof i14.LiveUpdatesControlComponent, typeof i15.AzureLoginCallbackComponent, typeof i16.UserListAdminComponent, typeof i17.ForbiddenComponent], [typeof i18.CommonModule, typeof i19.RouterModule, typeof i20.IndiginaModule, typeof i21.PopupModule, typeof i22.GridModule, typeof i22.ExcelModule, typeof i23.InputsModule, typeof i24.ButtonsModule, typeof i25.DialogsModule, typeof i18.CommonModule, typeof i26.FormsModule, typeof i25.WindowModule, typeof i25.DialogsModule, typeof i26.ReactiveFormsModule, typeof i27.DropDownsModule, typeof i28.TooltipModule, typeof i29.DateInputsModule, typeof i30.MsalModule, typeof i31.FieldDropdownModule, typeof i32.CurrentTimeZoneModule, typeof i33.ConfirmDialogModule, typeof i34.RequirePermissionModule], [typeof i1.TopMenuComponent, typeof i2.FooterBarComponent, typeof i3.AccountMenuComponent, typeof i4.LanguageSelectorComponent, typeof i20.IndiginaModule, typeof i21.PopupModule, typeof i27.DropDownsModule, typeof i28.TooltipModule, typeof i29.DateInputsModule, typeof i25.WindowModule, typeof i25.DialogsModule, typeof i22.GridModule, typeof i22.ExcelModule, typeof i23.InputsModule, typeof i24.ButtonsModule, typeof i5.EntityEditButtonsBarComponent, typeof i6.EntityEditFormComponent, typeof i7.EntityListComponent, typeof i8.FieldMultiSelectComponent, typeof i9.FieldDropdownlistComponent, typeof i33.ConfirmDialogModule, typeof i10.ExcelExportButtonComponent, typeof i11.MulticheckFilterComponent, typeof i34.RequirePermissionModule, typeof i12.ActivityFilterComponent, typeof i32.CurrentTimeZoneModule, typeof i13.ModalWindowComponent, typeof i14.LiveUpdatesControlComponent, typeof i30.MsalModule, typeof i15.AzureLoginCallbackComponent, typeof i16.UserListAdminComponent, typeof i31.FieldDropdownModule, typeof i17.ForbiddenComponent]>;
|
|
43
43
|
static ɵinj: i0.ɵɵInjectorDeclaration<KendoModule>;
|
|
44
44
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./confirm-dialog.component";
|
|
3
|
+
import * as i2 from "@ngx-translate/core";
|
|
4
|
+
import * as i3 from "@progress/kendo-angular-dialog";
|
|
5
|
+
export declare class ConfirmDialogModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmDialogModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ConfirmDialogModule, [typeof i1.ConfirmDialogComponent], [typeof i2.TranslateModule, typeof i3.DialogModule], [typeof i1.ConfirmDialogComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ConfirmDialogModule>;
|
|
9
|
+
}
|
|
@@ -2,7 +2,6 @@ import { OnInit } from '@angular/core';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class CurrentTimezoneComponent implements OnInit {
|
|
4
4
|
timeZoneAndOffset: string;
|
|
5
|
-
constructor();
|
|
6
5
|
ngOnInit(): void;
|
|
7
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<CurrentTimezoneComponent, never>;
|
|
8
7
|
static ɵcmp: i0.ɵɵComponentDeclaration<CurrentTimezoneComponent, "current-timezone", never, {}, {}, never, never, false, never>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./current-timezone.component";
|
|
3
|
+
import * as i2 from "@ngx-translate/core";
|
|
4
|
+
export declare class CurrentTimeZoneModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CurrentTimeZoneModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CurrentTimeZoneModule, [typeof i1.CurrentTimezoneComponent], [typeof i2.TranslateModule], [typeof i1.CurrentTimezoneComponent]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CurrentTimeZoneModule>;
|
|
8
|
+
}
|
|
@@ -36,7 +36,6 @@ export declare class FormDropdownComponent extends FormComponent {
|
|
|
36
36
|
private canUpdateWithSelectedItem;
|
|
37
37
|
private updateControlGroupWithSelectedEntity;
|
|
38
38
|
private updateControlGroup;
|
|
39
|
-
private setControlValue;
|
|
40
39
|
private emitSelectedEntity;
|
|
41
40
|
private getEntityById;
|
|
42
41
|
private writeSelectedItemValueIfExists;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter } from '@angular/core';
|
|
2
|
+
import { FieldComponent } from '../../../../angular/forms/widgets/field/field.component';
|
|
3
|
+
import { AbstractControl, FormGroupDirective } from '@angular/forms';
|
|
4
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
5
|
+
import { SimpleObject, valueTypes } from '../SimpleObject';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class ObjectDropdownComponent extends FieldComponent<valueTypes> {
|
|
8
|
+
parent: FormGroupDirective;
|
|
9
|
+
eref: ElementRef;
|
|
10
|
+
private translate;
|
|
11
|
+
fieldName: string;
|
|
12
|
+
labelKey: string;
|
|
13
|
+
data: SimpleObject[];
|
|
14
|
+
selectedItem?: valueTypes;
|
|
15
|
+
defaultName?: string;
|
|
16
|
+
selectedChange: EventEmitter<SimpleObject>;
|
|
17
|
+
firstLoad: boolean;
|
|
18
|
+
defaultItem: SimpleObject;
|
|
19
|
+
get control(): AbstractControl;
|
|
20
|
+
constructor(parent: FormGroupDirective, eref: ElementRef, translate: TranslateService);
|
|
21
|
+
ngOnInit(): void;
|
|
22
|
+
private setDefaultItem;
|
|
23
|
+
ngOnChanges(): void;
|
|
24
|
+
onValueChange(event: valueTypes): void;
|
|
25
|
+
private emitSelectedEntity;
|
|
26
|
+
private writeSelectedItemIfExists;
|
|
27
|
+
private canUpdateWithSelectedItem;
|
|
28
|
+
private setControlValue;
|
|
29
|
+
private setFirstLoadFalse;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ObjectDropdownComponent, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ObjectDropdownComponent, "object-dropdown", never, { "fieldName": { "alias": "fieldName"; "required": false; }; "labelKey": { "alias": "labelKey"; "required": false; }; "data": { "alias": "data"; "required": false; }; "selectedItem": { "alias": "selectedItem"; "required": false; }; "defaultName": { "alias": "defaultName"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, never, false, never>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./object-dropdown.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@ngx-translate/core";
|
|
5
|
+
import * as i4 from "@progress/kendo-angular-dropdowns";
|
|
6
|
+
import * as i5 from "@angular/forms";
|
|
7
|
+
export declare class ObjectDropdownModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ObjectDropdownModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ObjectDropdownModule, [typeof i1.ObjectDropdownComponent], [typeof i2.CommonModule, typeof i3.TranslateModule, typeof i4.DropDownsModule, typeof i5.ReactiveFormsModule], [typeof i1.ObjectDropdownComponent]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ObjectDropdownModule>;
|
|
11
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export { AccountMenuComponent } from './lib/components/account-menu/account-menu
|
|
|
47
47
|
export { AzureLoginCallbackComponent } from './lib/components/azure-login-callback/azure-login-callback.component';
|
|
48
48
|
export { LanguageSelectorComponent } from './lib/components/language-selector/language-selector.component';
|
|
49
49
|
export { MSALInstanceFactory } from './lib/config/msal-instance.factory';
|
|
50
|
-
export
|
|
50
|
+
export * from './lib/directives/requirePermission';
|
|
51
51
|
export { KendoModule } from './lib/kendo.module';
|
|
52
52
|
export { ActivityFilter } from './lib/models/ActivityFilter';
|
|
53
53
|
export { AzureB2CSettings } from './lib/models/AzureB2CSettings';
|
|
@@ -79,12 +79,14 @@ export { PermissionsService } from './lib/services/permissions.service';
|
|
|
79
79
|
export { EventNames } from './lib/services/signalr/EventNames';
|
|
80
80
|
export { SignalRService } from './lib/services/signalr/signalr.service';
|
|
81
81
|
export { ActivityFilterComponent } from './lib/widgets/activity-filter/activity-filter.component';
|
|
82
|
-
export
|
|
83
|
-
export
|
|
82
|
+
export * from './lib/widgets/confirm-dialog';
|
|
83
|
+
export * from './lib/widgets/current-timezone';
|
|
84
84
|
export { EntityEditButtonsBarComponent } from './lib/widgets/entity-edit/buttons-bar/buttons-bar.component';
|
|
85
85
|
export { EntityEditFormComponent } from './lib/widgets/entity-edit/entity-edit-form.component';
|
|
86
86
|
export { EntityEditComponent } from './lib/widgets/entity-edit/entity-edit.component';
|
|
87
87
|
export { FieldDropdownComponent } from './lib/widgets/entity-edit/dropdowns/field-dropdown/field-dropdown.component';
|
|
88
|
+
export { ObjectDropdownComponent } from './lib/widgets/entity-edit/dropdowns/object-dropdown/object-dropdown.component';
|
|
89
|
+
export { SimpleObject } from './lib/widgets/entity-edit/dropdowns/SimpleObject';
|
|
88
90
|
export { FormDropdownComponent } from './lib/widgets/entity-edit/dropdowns/form-dropdown/form-dropdown.component';
|
|
89
91
|
export { FieldMultiSelectComponent } from './lib/widgets/entity-edit/field-multiselect/field-multiselect.component';
|
|
90
92
|
export { UserListAdminComponent } from './lib/widgets/entity-list/user-list-admin.component';
|
|
@@ -104,4 +106,5 @@ export { ContentTypesFormat } from './lib/angular/widgets/tree-view/models/Conte
|
|
|
104
106
|
export declare const momentTimezone: () => momentModule.Moment;
|
|
105
107
|
export { FieldDropdownModule } from './lib/widgets/entity-edit/dropdowns/field-dropdown/field-dropdown.module';
|
|
106
108
|
export { FormDropdownModule } from './lib/widgets/entity-edit/dropdowns/form-dropdown/form-dropdown.module';
|
|
109
|
+
export { ObjectDropdownModule } from './lib/widgets/entity-edit/dropdowns/object-dropdown/object-dropdown.module';
|
|
107
110
|
export { ForbiddenComponent } from './lib/components/forbidden/forbidden.component';
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Directive, Input } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/router";
|
|
4
|
-
import * as i2 from "../services/permissions.service";
|
|
5
|
-
const hiddenClass = 'hidden';
|
|
6
|
-
export class RequirePermissionDirective {
|
|
7
|
-
constructor(elementRef, route, permissionsService, renderer) {
|
|
8
|
-
this.elementRef = elementRef;
|
|
9
|
-
this.route = route;
|
|
10
|
-
this.permissionsService = permissionsService;
|
|
11
|
-
this.renderer = renderer;
|
|
12
|
-
}
|
|
13
|
-
ngOnInit() {
|
|
14
|
-
this.hide();
|
|
15
|
-
const category = this.permissionCategory
|
|
16
|
-
? this.permissionCategory
|
|
17
|
-
: this.getRouteCategory(this.route);
|
|
18
|
-
if (!category) {
|
|
19
|
-
this.show();
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
this.permissionsService.mine.subscribe((permissions) => {
|
|
23
|
-
const hasAccess = permissions[category] && this.hasType(permissions[category]);
|
|
24
|
-
if (hasAccess) {
|
|
25
|
-
this.show();
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
this.hide();
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
hide() {
|
|
33
|
-
this.renderer.addClass(this.elementRef.nativeElement, hiddenClass);
|
|
34
|
-
}
|
|
35
|
-
show() {
|
|
36
|
-
this.renderer.removeClass(this.elementRef.nativeElement, hiddenClass);
|
|
37
|
-
}
|
|
38
|
-
hasType(types) {
|
|
39
|
-
return Array.isArray(this.permissionType)
|
|
40
|
-
? types.map((x) => this.permissionType.includes(x)).some((x) => x)
|
|
41
|
-
: types.includes(this.permissionType);
|
|
42
|
-
}
|
|
43
|
-
getRouteCategory(route) {
|
|
44
|
-
const routeData = route.snapshot.data;
|
|
45
|
-
if (routeData && routeData.permission) {
|
|
46
|
-
return routeData.permission.category;
|
|
47
|
-
}
|
|
48
|
-
if (this.route.parent) {
|
|
49
|
-
return this.getRouteCategory(this.route.parent);
|
|
50
|
-
}
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: RequirePermissionDirective, deps: [{ token: i0.ElementRef }, { token: i1.ActivatedRoute }, { token: i2.PermissionsService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
54
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.5", type: RequirePermissionDirective, selector: "[requirePermission]", inputs: { permissionType: "permissionType", permissionCategory: "permissionCategory" }, ngImport: i0 }); }
|
|
55
|
-
}
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.5", ngImport: i0, type: RequirePermissionDirective, decorators: [{
|
|
57
|
-
type: Directive,
|
|
58
|
-
args: [{
|
|
59
|
-
selector: '[requirePermission]',
|
|
60
|
-
}]
|
|
61
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.ActivatedRoute }, { type: i2.PermissionsService }, { type: i0.Renderer2 }], propDecorators: { permissionType: [{
|
|
62
|
-
type: Input
|
|
63
|
-
}], permissionCategory: [{
|
|
64
|
-
type: Input
|
|
65
|
-
}] } });
|
|
66
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWlyZVBlcm1pc3Npb24uZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2VuZG8vc3JjL2xpYi9kaXJlY3RpdmVzL3JlcXVpcmVQZXJtaXNzaW9uLmRpcmVjdGl2Z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