asp-lib 1.0.5 → 1.0.7
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/application-menu/application-menu.component.mjs +4 -3
- package/esm2022/lib/asp-lib.module.mjs +91 -7
- package/esm2022/lib/assign-roles/assign-roles.component.mjs +151 -0
- package/esm2022/lib/basic-item/basic-item.component.mjs +32 -0
- package/esm2022/lib/checkbox/checkbox.component.mjs +29 -0
- package/esm2022/lib/checkbox-field/checkbox-field.component.mjs +28 -0
- package/esm2022/lib/company-dropdown/company-dropdown.component.mjs +3 -4
- package/esm2022/lib/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/lib/form/form.component.mjs +131 -0
- package/esm2022/lib/header/header.component.mjs +17 -6
- package/esm2022/lib/input/input.component.mjs +28 -4
- package/esm2022/lib/interfaces/interfaces.mjs +1 -1
- package/esm2022/lib/items-selector/items-selector.component.mjs +79 -0
- package/esm2022/lib/items-viewer/items-viewer.component.mjs +206 -58
- package/esm2022/lib/list/list.component.mjs +11 -0
- package/esm2022/lib/loader/loader.component.mjs +45 -0
- package/esm2022/lib/menu/menu-child-report/menu-child-report.component.mjs +98 -0
- package/esm2022/lib/menu/menu.component.mjs +128 -22
- package/esm2022/lib/menu-admin/menu-admin.component.mjs +281 -0
- package/esm2022/lib/move-menu-option/move-menu-option.component.mjs +58 -0
- package/esm2022/lib/multi-option-dialog/multi-option-dialog.component.mjs +31 -0
- package/esm2022/lib/notifications/notifications.component.mjs +3 -3
- package/esm2022/lib/radio-button/radio-button.component.mjs +19 -0
- package/esm2022/lib/radio-group/radio-group.component.mjs +56 -0
- package/esm2022/lib/recents-dropdown/recents-dropdown.component.mjs +3 -3
- package/esm2022/lib/resource-actions/resource-actions.component.mjs +79 -0
- package/esm2022/lib/role-card/role-card.component.mjs +40 -0
- package/esm2022/lib/role-info/role-info.component.mjs +75 -0
- package/esm2022/lib/security-admin/security-admin.component.mjs +256 -81
- package/esm2022/lib/select/select.component.mjs +55 -14
- package/esm2022/lib/services/dialog.service.mjs +27 -0
- package/esm2022/lib/services/security-admin.service.mjs +194 -0
- package/esm2022/lib/services/snackbar.service.mjs +41 -0
- package/esm2022/lib/snackbar/snackbar.component.mjs +26 -0
- package/esm2022/lib/tree/tree.component.mjs +73 -0
- package/esm2022/lib/user-dropdown/user-dropdown.component.mjs +3 -3
- package/esm2022/lib/users-admin/users-admin.component.mjs +238 -17
- package/esm2022/public-api.mjs +8 -1
- package/fesm2022/asp-lib.mjs +2537 -289
- package/fesm2022/asp-lib.mjs.map +1 -1
- package/lib/asp-lib.module.d.ts +33 -11
- package/lib/assign-roles/assign-roles.component.d.ts +55 -0
- package/lib/basic-item/basic-item.component.d.ts +18 -0
- package/lib/checkbox/checkbox.component.d.ts +11 -0
- package/lib/checkbox-field/checkbox-field.component.d.ts +11 -0
- package/lib/form/form.component.d.ts +45 -0
- package/lib/header/header.component.d.ts +6 -82
- package/lib/input/input.component.d.ts +11 -1
- package/lib/interfaces/interfaces.d.ts +40 -0
- package/lib/items-selector/items-selector.component.d.ts +29 -0
- package/lib/items-viewer/items-viewer.component.d.ts +73 -11
- package/lib/list/list.component.d.ts +5 -0
- package/lib/loader/loader.component.d.ts +13 -0
- package/lib/menu/menu-child-report/menu-child-report.component.d.ts +21 -0
- package/lib/menu/menu.component.d.ts +31 -7
- package/lib/menu-admin/menu-admin.component.d.ts +64 -0
- package/lib/move-menu-option/move-menu-option.component.d.ts +28 -0
- package/lib/multi-option-dialog/multi-option-dialog.component.d.ts +27 -0
- package/lib/radio-button/radio-button.component.d.ts +7 -0
- package/lib/radio-group/radio-group.component.d.ts +20 -0
- package/lib/resource-actions/resource-actions.component.d.ts +46 -0
- package/lib/role-card/role-card.component.d.ts +16 -0
- package/lib/role-info/role-info.component.d.ts +36 -0
- package/lib/security-admin/security-admin.component.d.ts +63 -55
- package/lib/select/select.component.d.ts +18 -2
- package/lib/services/dialog.service.d.ts +17 -0
- package/lib/services/security-admin.service.d.ts +91 -0
- package/lib/services/snackbar.service.d.ts +16 -0
- package/lib/snackbar/snackbar.component.d.ts +16 -0
- package/lib/tree/tree.component.d.ts +35 -0
- package/lib/users-admin/users-admin.component.d.ts +60 -9
- package/package.json +1 -1
- package/public-api.d.ts +7 -0
- package/src/lib/assets/fonts/fonts/arrow-reportmenu.svg +11 -0
- package/src/lib/assets/fonts/fonts/asp-lib-icons.eot +0 -0
- package/src/lib/assets/fonts/fonts/asp-lib-icons.svg +46 -33
- package/src/lib/assets/fonts/fonts/asp-lib-icons.ttf +0 -0
- package/src/lib/assets/fonts/fonts/asp-lib-icons.woff +0 -0
- package/src/lib/assets/fonts/fonts/ico_closeFolderReport.svg +11 -0
- package/src/lib/assets/fonts/fonts/ico_openFolderReport.svg +11 -0
- package/src/lib/assets/fonts/fonts/newTab.svg +12 -0
- package/src/lib/assets/fonts/fonts/new_report_icon.svg +15 -0
- package/src/lib/assets/fonts/selection.json +1 -1
- package/src/lib/assets/fonts/style.css +144 -99
- package/src/lib/assets/theme.css +68 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { HttpClient } from '@angular/common/http';
|
|
4
|
+
import { SecurityAdminService } from '../services/security-admin.service';
|
|
5
|
+
import { SnackbarService } from '../services/snackbar.service';
|
|
6
|
+
import { Subject } from 'rxjs';
|
|
7
|
+
import { DialogService } from '../services/dialog.service';
|
|
8
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
interface TreeNode {
|
|
11
|
+
id: number | null;
|
|
12
|
+
parentId: number | null;
|
|
13
|
+
ancestorIds: (number | null)[];
|
|
14
|
+
label?: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
children: TreeNode[];
|
|
17
|
+
level?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare class MenuAdminComponent implements OnInit {
|
|
20
|
+
private http;
|
|
21
|
+
private securityAdminService;
|
|
22
|
+
private snackbar;
|
|
23
|
+
private dialogService;
|
|
24
|
+
private dialog;
|
|
25
|
+
theme: string;
|
|
26
|
+
treeData: any[];
|
|
27
|
+
unflattenedTree: any[];
|
|
28
|
+
search: FormControl<string | null>;
|
|
29
|
+
loadingStatus: boolean;
|
|
30
|
+
editedTree: TreeNode[];
|
|
31
|
+
selectedNode: TreeNode;
|
|
32
|
+
expandedNodes: Set<unknown>;
|
|
33
|
+
filterNodes: Set<unknown>;
|
|
34
|
+
get menuOptionFormComponent(): import("@angular/core").Type<any> | undefined;
|
|
35
|
+
constructor(http: HttpClient, securityAdminService: SecurityAdminService, snackbar: SnackbarService, dialogService: DialogService, dialog: MatDialog);
|
|
36
|
+
onKeyUp($event: any): void;
|
|
37
|
+
loadTree(): void;
|
|
38
|
+
newNodeId: number;
|
|
39
|
+
newNodeIdSubject: Subject<number>;
|
|
40
|
+
ngOnInit(): void;
|
|
41
|
+
addNodeToCurrent(): void;
|
|
42
|
+
validSuccess(successMessage: string, errorMessage: string, successCount: number, failCount: number, targetCount: number, target?: any): void;
|
|
43
|
+
saveChanges(): Promise<void>;
|
|
44
|
+
deleteOption(option: TreeNode): void;
|
|
45
|
+
deleteCurrentNode(): void;
|
|
46
|
+
selectedClass(node: TreeNode): "" | "selected";
|
|
47
|
+
selectNode(node: TreeNode): void;
|
|
48
|
+
resetSelectedNode(): void;
|
|
49
|
+
isExpanded(node: TreeNode): boolean;
|
|
50
|
+
getLevel(node: TreeNode): number;
|
|
51
|
+
toggleNode(node: TreeNode): void;
|
|
52
|
+
hasChildren(node: TreeNode): boolean;
|
|
53
|
+
nodeContainerStyle(node: TreeNode): {
|
|
54
|
+
'padding-left': string;
|
|
55
|
+
};
|
|
56
|
+
hideNode(node: TreeNode): boolean;
|
|
57
|
+
get formComponentInputs(): {
|
|
58
|
+
option: TreeNode;
|
|
59
|
+
};
|
|
60
|
+
moveOption(node: TreeNode): void;
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuAdminComponent, never>;
|
|
62
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuAdminComponent, "lib-menu-admin", never, { "theme": { "alias": "theme"; "required": false; }; }, {}, never, never, false, never>;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import { TreeNode } from '../interfaces/interfaces';
|
|
3
|
+
import { SecurityAdminService } from '../services/security-admin.service';
|
|
4
|
+
import { SnackbarService } from '../services/snackbar.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class MoveMenuOptionComponent {
|
|
7
|
+
dialogRef: MatDialogRef<MoveMenuOptionComponent>;
|
|
8
|
+
data: {
|
|
9
|
+
option: any;
|
|
10
|
+
tree: TreeNode[];
|
|
11
|
+
};
|
|
12
|
+
private securityAdminService;
|
|
13
|
+
private snackbar;
|
|
14
|
+
option: any;
|
|
15
|
+
theme: string;
|
|
16
|
+
tree: TreeNode[];
|
|
17
|
+
selectedNode: TreeNode;
|
|
18
|
+
get noSelection(): boolean;
|
|
19
|
+
constructor(dialogRef: MatDialogRef<MoveMenuOptionComponent>, data: {
|
|
20
|
+
option: any;
|
|
21
|
+
tree: TreeNode[];
|
|
22
|
+
}, securityAdminService: SecurityAdminService, snackbar: SnackbarService);
|
|
23
|
+
selectNode(node: TreeNode): void;
|
|
24
|
+
close(): void;
|
|
25
|
+
moveConfirm(): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MoveMenuOptionComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MoveMenuOptionComponent, "lib-move-menu-option", never, {}, {}, never, never, false, never>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
interface Option {
|
|
4
|
+
label: string;
|
|
5
|
+
callback: Function;
|
|
6
|
+
type?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class MultiOptionDialogComponent {
|
|
9
|
+
dialogRef: MatDialogRef<MultiOptionDialogComponent>;
|
|
10
|
+
data: {
|
|
11
|
+
message: string;
|
|
12
|
+
options: Option[];
|
|
13
|
+
theme?: string;
|
|
14
|
+
};
|
|
15
|
+
message: string;
|
|
16
|
+
options: Option[];
|
|
17
|
+
theme: string;
|
|
18
|
+
constructor(dialogRef: MatDialogRef<MultiOptionDialogComponent>, data: {
|
|
19
|
+
message: string;
|
|
20
|
+
options: Option[];
|
|
21
|
+
theme?: string;
|
|
22
|
+
});
|
|
23
|
+
optionClick(option: Option): void;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MultiOptionDialogComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MultiOptionDialogComponent, "lib-multi-option-dialog", never, {}, {}, never, never, false, never>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class RadioButtonComponent {
|
|
3
|
+
active: boolean;
|
|
4
|
+
theme: string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RadioButtonComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RadioButtonComponent, "lib-radio-button", never, { "active": { "alias": "active"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; }, {}, never, never, false, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FormControl } from '@angular/forms';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class RadioGroupComponent {
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
formControl: FormControl;
|
|
9
|
+
groupDirection: string;
|
|
10
|
+
theme: string;
|
|
11
|
+
options: any[];
|
|
12
|
+
optionClass: string;
|
|
13
|
+
get hasLabel(): boolean;
|
|
14
|
+
selectOption(option: any): void;
|
|
15
|
+
optionLabel(option: any): any;
|
|
16
|
+
isActive(option: any): boolean;
|
|
17
|
+
get hasIcon(): boolean;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RadioGroupComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RadioGroupComponent, "lib-radio-group", never, { "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "className": { "alias": "className"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "groupDirection": { "alias": "groupDirection"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "options": { "alias": "options"; "required": false; }; "optionClass": { "alias": "optionClass"; "required": false; }; }, {}, never, never, false, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import { SecurityAdminService } from '../services/security-admin.service';
|
|
3
|
+
import { SnackbarService } from '../services/snackbar.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
interface Resource {
|
|
6
|
+
id: number;
|
|
7
|
+
name: string;
|
|
8
|
+
}
|
|
9
|
+
interface Role {
|
|
10
|
+
id: number;
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class ResourceActionsComponent {
|
|
14
|
+
dialogRef: MatDialogRef<ResourceActionsComponent>;
|
|
15
|
+
data: {
|
|
16
|
+
theme: string;
|
|
17
|
+
item: Resource;
|
|
18
|
+
entityObject: Role;
|
|
19
|
+
};
|
|
20
|
+
private securityAdminService;
|
|
21
|
+
private snackbar;
|
|
22
|
+
resource: any;
|
|
23
|
+
role: any;
|
|
24
|
+
theme: string;
|
|
25
|
+
get resourceName(): any;
|
|
26
|
+
actions: any[];
|
|
27
|
+
loadingActions: boolean;
|
|
28
|
+
actionStatus: ({
|
|
29
|
+
name: string;
|
|
30
|
+
value: null;
|
|
31
|
+
} | {
|
|
32
|
+
name: string;
|
|
33
|
+
value: number;
|
|
34
|
+
})[];
|
|
35
|
+
constructor(dialogRef: MatDialogRef<ResourceActionsComponent>, data: {
|
|
36
|
+
theme: string;
|
|
37
|
+
item: Resource;
|
|
38
|
+
entityObject: Role;
|
|
39
|
+
}, securityAdminService: SecurityAdminService, snackbar: SnackbarService);
|
|
40
|
+
assignStatus(action: any, status: number | null): void;
|
|
41
|
+
onSave(): void;
|
|
42
|
+
onClose(): void;
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResourceActionsComponent, never>;
|
|
44
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ResourceActionsComponent, "lib-resource-actions", never, {}, {}, never, never, false, never>;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
2
|
+
import { SecurityAdminService } from '../services/security-admin.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class RoleCardComponent {
|
|
5
|
+
dialog: MatDialog;
|
|
6
|
+
private securityAdminService;
|
|
7
|
+
object: any;
|
|
8
|
+
infoButton: boolean;
|
|
9
|
+
actions: any[];
|
|
10
|
+
theme: string;
|
|
11
|
+
get resources(): any;
|
|
12
|
+
constructor(dialog: MatDialog, securityAdminService: SecurityAdminService);
|
|
13
|
+
openInfo(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RoleCardComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RoleCardComponent, "lib-role-card", never, { "object": { "alias": "object"; "required": false; }; "infoButton": { "alias": "infoButton"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; }, {}, never, never, false, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import { SecurityAdminService } from '../services/security-admin.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
interface Resource {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class RoleInfoComponent {
|
|
9
|
+
dialogRef: MatDialogRef<RoleInfoComponent>;
|
|
10
|
+
data: {
|
|
11
|
+
theme: string;
|
|
12
|
+
role: any;
|
|
13
|
+
};
|
|
14
|
+
private securityService;
|
|
15
|
+
theme: string;
|
|
16
|
+
role: any;
|
|
17
|
+
actions: any;
|
|
18
|
+
loadingResources: boolean;
|
|
19
|
+
loadingActions: boolean;
|
|
20
|
+
resources: Resource[];
|
|
21
|
+
selectedResource: Resource;
|
|
22
|
+
get showPlaceholder(): boolean;
|
|
23
|
+
constructor(dialogRef: MatDialogRef<RoleInfoComponent>, data: {
|
|
24
|
+
theme: string;
|
|
25
|
+
role: any;
|
|
26
|
+
}, securityService: SecurityAdminService);
|
|
27
|
+
loadResources(): void;
|
|
28
|
+
onSave(): void;
|
|
29
|
+
onClose(): void;
|
|
30
|
+
selectResource(resource: Resource): void;
|
|
31
|
+
loadActions(): void;
|
|
32
|
+
isSelected(resource: Resource): "" | "selected";
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RoleInfoComponent, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RoleInfoComponent, "lib-role-info", never, {}, {}, never, never, false, never>;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -1,70 +1,78 @@
|
|
|
1
|
+
import { OnInit, Type } from '@angular/core';
|
|
1
2
|
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { BasicItemComponent } from '../basic-item/basic-item.component';
|
|
4
|
+
import { ResourceActionsComponent } from '../resource-actions/resource-actions.component';
|
|
5
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
6
|
+
import { FormField } from '../interfaces/interfaces';
|
|
7
|
+
import { SecurityAdminService } from '../services/security-admin.service';
|
|
8
|
+
import { SnackbarService } from '../services/snackbar.service';
|
|
9
|
+
import { Subject } from 'rxjs';
|
|
2
10
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class SecurityAdminComponent {
|
|
11
|
+
export declare class SecurityAdminComponent implements OnInit {
|
|
12
|
+
dialog: MatDialog;
|
|
13
|
+
private locale;
|
|
14
|
+
private securityAdminService;
|
|
15
|
+
private snackbar;
|
|
4
16
|
title: string;
|
|
5
|
-
viewsLabel: string;
|
|
6
|
-
usersLabel: string;
|
|
7
|
-
customersLabel: string;
|
|
8
|
-
rolesLabel: string;
|
|
9
17
|
theme: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
label: string;
|
|
44
|
-
}[];
|
|
45
|
-
})[];
|
|
46
|
-
roleForm: ({
|
|
47
|
-
label: string;
|
|
48
|
-
control: FormControl<any>;
|
|
49
|
-
type: string;
|
|
50
|
-
name: string;
|
|
51
|
-
options: string[];
|
|
52
|
-
} | {
|
|
18
|
+
listUsersEndpoint: string;
|
|
19
|
+
listCustomersEndpoint: string;
|
|
20
|
+
listRolesEndpoint: string;
|
|
21
|
+
saveUserEndpoint: string;
|
|
22
|
+
saveCustomerEndpoint: string;
|
|
23
|
+
saveRoleEndpoint: string;
|
|
24
|
+
usersByCustomerEndpoint: string;
|
|
25
|
+
listResourcesEndpoint: string;
|
|
26
|
+
resourcesByRoleEndpoint: string;
|
|
27
|
+
assignResourceEndpoint: string;
|
|
28
|
+
actionsByRoleAndResourceEndpoint: string;
|
|
29
|
+
savePermissionsEndpoint: string;
|
|
30
|
+
rolesByUserEndpoint: string;
|
|
31
|
+
assignUserRoleEndpoint: string;
|
|
32
|
+
rolesByCustomerEndpoint: string;
|
|
33
|
+
assignCustomerRoleEndpoint: string;
|
|
34
|
+
usersByRoleEndpoint: string;
|
|
35
|
+
customersByRoleEndpoint: string;
|
|
36
|
+
assignRoleUsersEndpoint: string;
|
|
37
|
+
assignRoleCustomersEndpoint: string;
|
|
38
|
+
getMenuTreeEndpoint: string;
|
|
39
|
+
saveMenuOptionEndpoint: string;
|
|
40
|
+
deleteMenuOptionEndpoint: string;
|
|
41
|
+
menuOptionFormComponent?: Type<any>;
|
|
42
|
+
userUiComponent: Type<any>;
|
|
43
|
+
customerUiComponent: typeof BasicItemComponent;
|
|
44
|
+
roleUiComponent: typeof BasicItemComponent;
|
|
45
|
+
userForm: FormField[];
|
|
46
|
+
customerForm: FormField[];
|
|
47
|
+
roleForm: FormField[];
|
|
48
|
+
orderViewBy: FormControl;
|
|
49
|
+
selectedUser: any;
|
|
50
|
+
resourcesField: {
|
|
53
51
|
label: string;
|
|
54
|
-
|
|
52
|
+
dropLabel: string;
|
|
55
53
|
name: string;
|
|
56
54
|
type: string;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
dragTitle: string;
|
|
56
|
+
setupUi: typeof ResourceActionsComponent;
|
|
57
|
+
optionsEndpoint: string;
|
|
58
|
+
};
|
|
59
|
+
resetItemSelected: Subject<boolean>;
|
|
60
|
+
assignRoles: (entityType: "Customer" | "User") => void;
|
|
60
61
|
userActions: {
|
|
61
62
|
label: string;
|
|
62
63
|
callback: () => void;
|
|
63
64
|
}[];
|
|
64
|
-
customerActions:
|
|
65
|
+
customerActions: {
|
|
66
|
+
label: string;
|
|
67
|
+
callback: () => void;
|
|
68
|
+
}[];
|
|
65
69
|
roleActions: never[];
|
|
66
|
-
|
|
70
|
+
viewOptions: any[];
|
|
71
|
+
ngOnInit(): void;
|
|
72
|
+
getViewInputs(view: any): any;
|
|
73
|
+
constructor(dialog: MatDialog, locale: string, securityAdminService: SecurityAdminService, snackbar: SnackbarService);
|
|
67
74
|
clearValueSelected($event: any): void;
|
|
75
|
+
selectUser(newUser: any): void;
|
|
68
76
|
static ɵfac: i0.ɵɵFactoryDeclaration<SecurityAdminComponent, never>;
|
|
69
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SecurityAdminComponent, "lib-security-admin", never, { "title": { "alias": "title"; "required": false; }; "
|
|
77
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SecurityAdminComponent, "lib-security-admin", never, { "title": { "alias": "title"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "listUsersEndpoint": { "alias": "listUsersEndpoint"; "required": false; }; "listCustomersEndpoint": { "alias": "listCustomersEndpoint"; "required": false; }; "listRolesEndpoint": { "alias": "listRolesEndpoint"; "required": false; }; "saveUserEndpoint": { "alias": "saveUserEndpoint"; "required": false; }; "saveCustomerEndpoint": { "alias": "saveCustomerEndpoint"; "required": false; }; "saveRoleEndpoint": { "alias": "saveRoleEndpoint"; "required": false; }; "usersByCustomerEndpoint": { "alias": "usersByCustomerEndpoint"; "required": false; }; "listResourcesEndpoint": { "alias": "listResourcesEndpoint"; "required": false; }; "resourcesByRoleEndpoint": { "alias": "resourcesByRoleEndpoint"; "required": false; }; "assignResourceEndpoint": { "alias": "assignResourceEndpoint"; "required": false; }; "actionsByRoleAndResourceEndpoint": { "alias": "actionsByRoleAndResourceEndpoint"; "required": false; }; "savePermissionsEndpoint": { "alias": "savePermissionsEndpoint"; "required": false; }; "rolesByUserEndpoint": { "alias": "rolesByUserEndpoint"; "required": false; }; "assignUserRoleEndpoint": { "alias": "assignUserRoleEndpoint"; "required": false; }; "rolesByCustomerEndpoint": { "alias": "rolesByCustomerEndpoint"; "required": false; }; "assignCustomerRoleEndpoint": { "alias": "assignCustomerRoleEndpoint"; "required": false; }; "usersByRoleEndpoint": { "alias": "usersByRoleEndpoint"; "required": false; }; "customersByRoleEndpoint": { "alias": "customersByRoleEndpoint"; "required": false; }; "assignRoleUsersEndpoint": { "alias": "assignRoleUsersEndpoint"; "required": false; }; "assignRoleCustomersEndpoint": { "alias": "assignRoleCustomersEndpoint"; "required": false; }; "getMenuTreeEndpoint": { "alias": "getMenuTreeEndpoint"; "required": false; }; "saveMenuOptionEndpoint": { "alias": "saveMenuOptionEndpoint"; "required": false; }; "deleteMenuOptionEndpoint": { "alias": "deleteMenuOptionEndpoint"; "required": false; }; "menuOptionFormComponent": { "alias": "menuOptionFormComponent"; "required": false; }; "userUiComponent": { "alias": "userUiComponent"; "required": false; }; "customerUiComponent": { "alias": "customerUiComponent"; "required": false; }; "roleUiComponent": { "alias": "roleUiComponent"; "required": false; }; "userForm": { "alias": "userForm"; "required": false; }; "customerForm": { "alias": "customerForm"; "required": false; }; "roleForm": { "alias": "roleForm"; "required": false; }; }, {}, never, never, false, never>;
|
|
70
78
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { OnInit } from '@angular/core';
|
|
1
3
|
import { FormControl } from '@angular/forms';
|
|
2
4
|
import { MatMenuTrigger } from '@angular/material/menu';
|
|
5
|
+
import { SnackbarService } from '../services/snackbar.service';
|
|
3
6
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class SelectComponent {
|
|
7
|
+
export declare class SelectComponent implements OnInit {
|
|
8
|
+
private http;
|
|
9
|
+
private snackbar;
|
|
5
10
|
name: string;
|
|
6
11
|
label: string;
|
|
7
12
|
icon?: string;
|
|
@@ -10,13 +15,24 @@ export declare class SelectComponent {
|
|
|
10
15
|
formControl: FormControl;
|
|
11
16
|
theme: string;
|
|
12
17
|
options: any[];
|
|
18
|
+
optionsEndpoint: string;
|
|
13
19
|
menuTrigger?: MatMenuTrigger;
|
|
14
20
|
searchControl: FormControl<string | null>;
|
|
21
|
+
hostStyle: any;
|
|
22
|
+
loadedItems: any[];
|
|
23
|
+
loadingStatus: boolean;
|
|
24
|
+
set style(styleInput: {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
});
|
|
15
27
|
get hasIcon(): boolean;
|
|
28
|
+
constructor(http: HttpClient, snackbar: SnackbarService);
|
|
29
|
+
loadItems(): void;
|
|
30
|
+
ngOnInit(): void;
|
|
16
31
|
get filteredOptions(): any[];
|
|
32
|
+
get selectOptions(): any[];
|
|
17
33
|
get noOptions(): boolean;
|
|
18
34
|
inputClick(): void;
|
|
19
35
|
selectOption(option: any): void;
|
|
20
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "lib-select", never, { "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "className": { "alias": "className"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, false, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "lib-select", never, { "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "className": { "alias": "className"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "options": { "alias": "options"; "required": false; }; "optionsEndpoint": { "alias": "optionsEndpoint"; "required": false; }; "style": { "alias": "style"; "required": false; }; }, {}, never, never, false, never>;
|
|
22
38
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class DialogService {
|
|
4
|
+
dialog: MatDialog;
|
|
5
|
+
constructor(dialog: MatDialog);
|
|
6
|
+
multiOption(config: {
|
|
7
|
+
message: string;
|
|
8
|
+
options: {
|
|
9
|
+
label: string;
|
|
10
|
+
callback: Function;
|
|
11
|
+
type?: string;
|
|
12
|
+
}[];
|
|
13
|
+
theme?: string;
|
|
14
|
+
}): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Type } from '@angular/core';
|
|
3
|
+
import { Observable, Subject } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SecurityAdminService {
|
|
6
|
+
private http;
|
|
7
|
+
selectedUserSubject: Subject<any>;
|
|
8
|
+
selectedCustomerSubject: Subject<any>;
|
|
9
|
+
selectedRoleSubject: Subject<any>;
|
|
10
|
+
reloadSubject: Subject<string>;
|
|
11
|
+
usersByCustomerEndpoint: string;
|
|
12
|
+
assignResourceEndpoint: string;
|
|
13
|
+
getActionsEndpoint: string;
|
|
14
|
+
savePermissionsEndpoint: string;
|
|
15
|
+
listRolesEndpoint: string;
|
|
16
|
+
resourcesByRoleEndpoint: string;
|
|
17
|
+
rolesByUserEndpoint: string;
|
|
18
|
+
getMenuTreeEndpoint: string;
|
|
19
|
+
saveMenuOptionEndpoint: string;
|
|
20
|
+
deleteMenuOptionEndpoint: string;
|
|
21
|
+
assignUserRoleEndpoint: string;
|
|
22
|
+
rolesByCustomerEndpoint: string;
|
|
23
|
+
assignCustomerRoleEndpoint: string;
|
|
24
|
+
usersByRoleEndpoint: string;
|
|
25
|
+
customersByRoleEndpoint: string;
|
|
26
|
+
menuOptionFormComponent?: Type<any>;
|
|
27
|
+
listUsersEndpoint: string;
|
|
28
|
+
assignRoleUsersEndpoint: string;
|
|
29
|
+
assignRoleCustomersEndpoint: string;
|
|
30
|
+
selectedItem: any;
|
|
31
|
+
theme: string;
|
|
32
|
+
msgLabel: {
|
|
33
|
+
User: string;
|
|
34
|
+
Customer: string;
|
|
35
|
+
Role: string;
|
|
36
|
+
};
|
|
37
|
+
reloadByEntity: {
|
|
38
|
+
User: Subject<boolean>;
|
|
39
|
+
Customer: Subject<boolean>;
|
|
40
|
+
Role: Subject<boolean>;
|
|
41
|
+
};
|
|
42
|
+
get userReload(): Subject<boolean>;
|
|
43
|
+
get customerReload(): Subject<boolean>;
|
|
44
|
+
get roleReload(): Subject<boolean>;
|
|
45
|
+
get subjects(): {
|
|
46
|
+
User: Subject<any>;
|
|
47
|
+
Customer: Subject<any>;
|
|
48
|
+
Role: Subject<any>;
|
|
49
|
+
};
|
|
50
|
+
constructor(http: HttpClient);
|
|
51
|
+
getRoles(): Observable<Object>;
|
|
52
|
+
deleteMenuOption(option: any): Observable<Object>;
|
|
53
|
+
setTheme(theme: string): void;
|
|
54
|
+
getActions(roleId: number, resourceId: number): Observable<Object>;
|
|
55
|
+
setDeleteMenuOptionEndpoint(endpoint: string): void;
|
|
56
|
+
getResourcesByRole(roleId: number): Observable<Object>;
|
|
57
|
+
setListUsersEndpoint(endpoint: string): void;
|
|
58
|
+
setMenuOptionFormComponent(component?: Type<any>): void;
|
|
59
|
+
setUsersByRoleEndpoint(endpoint: string): void;
|
|
60
|
+
setCustomersByRoleEndpoint(endpoint: string): void;
|
|
61
|
+
setSaveMenuOptionEndpoint(endpoint: string): void;
|
|
62
|
+
setGetMenuTreeEndpoint(endpoint: string): void;
|
|
63
|
+
setAssignRoleUsersEndpoint(endpoint: string): void;
|
|
64
|
+
setAssignRoleCustomersEndpoint(endpoint: string): void;
|
|
65
|
+
saveMenuOption(option: any): Observable<Object>;
|
|
66
|
+
getUsers(page?: number, pageSize?: number): Observable<Object>;
|
|
67
|
+
getAssignedRoles(id: number, type: "User" | "Customer"): Observable<Object>;
|
|
68
|
+
assignRoles(id: number, roles: any[], type: "User" | "Customer"): Observable<Object>;
|
|
69
|
+
assignRoleUsers(roleId: number, users: any[]): Observable<Object>;
|
|
70
|
+
assignRoleCustomers(roleId: number, customers: any[]): Observable<Object>;
|
|
71
|
+
setRolesByUserEndpoint(endpoint: string): void;
|
|
72
|
+
setAssignUserRoleEndpoint(endpoint: string): void;
|
|
73
|
+
setRolesByCustomerEndpoint(endpoint: string): void;
|
|
74
|
+
setAssignCustomerRoleEndpoint(endpoint: string): void;
|
|
75
|
+
setSavePermissionsEndpoint(endpoint: string): void;
|
|
76
|
+
setUsersByCustomerEndpoint(endpoint: string): void;
|
|
77
|
+
setListRolesEndpoint(endpoint: string): void;
|
|
78
|
+
setAssignResourceEndpoint(endpoint: string): void;
|
|
79
|
+
setResourcesByRoleEndpoint(endpoint: string): void;
|
|
80
|
+
setActionsByRoleAndResourceEndpoint(endpoint: string): void;
|
|
81
|
+
selectUser(user: any): void;
|
|
82
|
+
selectCustomer(customer: any): void;
|
|
83
|
+
selectRole(role: any): void;
|
|
84
|
+
saveItem(endpoint: string, updatedItem: any): Observable<Object>;
|
|
85
|
+
assignResource(roleId: number, resources: any[]): Observable<Object>;
|
|
86
|
+
savePermissions(permissions: any[]): Observable<Object>;
|
|
87
|
+
getMenuTree(): Observable<Object>;
|
|
88
|
+
reloadEntity(entityName: "User" | "Customer" | "Role"): void;
|
|
89
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SecurityAdminService, never>;
|
|
90
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SecurityAdminService>;
|
|
91
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MatSnackBar, MatSnackBarHorizontalPosition, MatSnackBarVerticalPosition } from '@angular/material/snack-bar';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SnackbarService {
|
|
4
|
+
private _snackBar;
|
|
5
|
+
horizontalPosition: MatSnackBarHorizontalPosition;
|
|
6
|
+
verticalPosition: MatSnackBarVerticalPosition;
|
|
7
|
+
theme: string;
|
|
8
|
+
constructor(_snackBar: MatSnackBar);
|
|
9
|
+
setTheme(theme: string): void;
|
|
10
|
+
openSnackBar(message: string, type?: string, duration?: number): void;
|
|
11
|
+
success(message: string, duration?: number): void;
|
|
12
|
+
warning(message: string, duration?: number): void;
|
|
13
|
+
info(message: string, duration?: number): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarService>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class SnackbarComponent {
|
|
3
|
+
data: any;
|
|
4
|
+
type: "info" | "success" | "warning";
|
|
5
|
+
message: string;
|
|
6
|
+
theme: string;
|
|
7
|
+
icons: {
|
|
8
|
+
info: string;
|
|
9
|
+
warning: string;
|
|
10
|
+
success: string;
|
|
11
|
+
};
|
|
12
|
+
get typeIcon(): string;
|
|
13
|
+
constructor(data: any);
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SnackbarComponent, "lib-snackbar", never, {}, {}, never, never, false, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
interface TreeNode {
|
|
4
|
+
id: number | null;
|
|
5
|
+
parentId: number | null;
|
|
6
|
+
ancestorIds: (number | null)[];
|
|
7
|
+
label?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
children: TreeNode[];
|
|
10
|
+
level?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class TreeComponent implements OnChanges {
|
|
13
|
+
tree: TreeNode[];
|
|
14
|
+
theme: string;
|
|
15
|
+
nodeSelected: EventEmitter<TreeNode>;
|
|
16
|
+
editedTree: TreeNode[];
|
|
17
|
+
selectedNode: TreeNode;
|
|
18
|
+
expandedNodes: Set<unknown>;
|
|
19
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
20
|
+
get stringfy(): string;
|
|
21
|
+
selectedClass(node: TreeNode): "" | "selected";
|
|
22
|
+
isSelected(node: TreeNode): boolean;
|
|
23
|
+
selectNode(node: TreeNode): void;
|
|
24
|
+
isExpanded(node: TreeNode): boolean;
|
|
25
|
+
getLevel(node: TreeNode): number;
|
|
26
|
+
toggleNode(node: TreeNode): void;
|
|
27
|
+
hasChildren(node: TreeNode): boolean;
|
|
28
|
+
nodeContainerStyle(node: TreeNode): {
|
|
29
|
+
'padding-left': string;
|
|
30
|
+
};
|
|
31
|
+
hideNode(node: TreeNode): boolean;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TreeComponent, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TreeComponent, "lib-tree", never, { "tree": { "alias": "tree"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; }, { "nodeSelected": "nodeSelected"; }, never, never, false, never>;
|
|
34
|
+
}
|
|
35
|
+
export {};
|