asp-lib 1.0.4 → 1.0.6

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.
Files changed (85) hide show
  1. package/esm2022/lib/application-menu/application-menu.component.mjs +4 -3
  2. package/esm2022/lib/asp-lib.module.mjs +150 -8
  3. package/esm2022/lib/assets/menu-data/menuDataTest.mjs +2077 -0
  4. package/esm2022/lib/assign-roles/assign-roles.component.mjs +151 -0
  5. package/esm2022/lib/basic-item/basic-item.component.mjs +32 -0
  6. package/esm2022/lib/checkbox/checkbox.component.mjs +29 -0
  7. package/esm2022/lib/checkbox-field/checkbox-field.component.mjs +28 -0
  8. package/esm2022/lib/company-dropdown/company-dropdown.component.mjs +75 -0
  9. package/esm2022/lib/dropdown/dropdown.component.mjs +3 -3
  10. package/esm2022/lib/form/form.component.mjs +131 -0
  11. package/esm2022/lib/header/header.component.mjs +67 -0
  12. package/esm2022/lib/input/input.component.mjs +65 -0
  13. package/esm2022/lib/interfaces/interfaces.mjs +1 -1
  14. package/esm2022/lib/items-selector/items-selector.component.mjs +79 -0
  15. package/esm2022/lib/items-viewer/items-viewer.component.mjs +222 -53
  16. package/esm2022/lib/list/list.component.mjs +11 -0
  17. package/esm2022/lib/loader/loader.component.mjs +45 -0
  18. package/esm2022/lib/menu/menu.component.mjs +4 -5
  19. package/esm2022/lib/menu-admin/menu-admin.component.mjs +281 -0
  20. package/esm2022/lib/move-menu-option/move-menu-option.component.mjs +58 -0
  21. package/esm2022/lib/multi-option-dialog/multi-option-dialog.component.mjs +31 -0
  22. package/esm2022/lib/notifications/notifications.component.mjs +67 -0
  23. package/esm2022/lib/radio-button/radio-button.component.mjs +19 -0
  24. package/esm2022/lib/radio-group/radio-group.component.mjs +56 -0
  25. package/esm2022/lib/recents-dropdown/recents-dropdown.component.mjs +76 -0
  26. package/esm2022/lib/resource-actions/resource-actions.component.mjs +79 -0
  27. package/esm2022/lib/role-card/role-card.component.mjs +40 -0
  28. package/esm2022/lib/role-info/role-info.component.mjs +75 -0
  29. package/esm2022/lib/security-admin/security-admin.component.mjs +259 -20
  30. package/esm2022/lib/select/select.component.mjs +100 -0
  31. package/esm2022/lib/services/dialog.service.mjs +27 -0
  32. package/esm2022/lib/services/security-admin.service.mjs +194 -0
  33. package/esm2022/lib/services/snackbar.service.mjs +41 -0
  34. package/esm2022/lib/snackbar/snackbar.component.mjs +26 -0
  35. package/esm2022/lib/tree/tree.component.mjs +73 -0
  36. package/esm2022/lib/user-dropdown/user-dropdown.component.mjs +57 -0
  37. package/esm2022/lib/users-admin/users-admin.component.mjs +269 -0
  38. package/esm2022/public-api.mjs +15 -1
  39. package/fesm2022/asp-lib.mjs +4789 -87
  40. package/fesm2022/asp-lib.mjs.map +1 -1
  41. package/lib/asp-lib.module.d.ts +42 -7
  42. package/lib/assets/menu-data/menuDataTest.d.ts +103 -0
  43. package/lib/assign-roles/assign-roles.component.d.ts +55 -0
  44. package/lib/basic-item/basic-item.component.d.ts +18 -0
  45. package/lib/checkbox/checkbox.component.d.ts +11 -0
  46. package/lib/checkbox-field/checkbox-field.component.d.ts +11 -0
  47. package/lib/company-dropdown/company-dropdown.component.d.ts +21 -0
  48. package/lib/form/form.component.d.ts +45 -0
  49. package/lib/header/header.component.d.ts +48 -0
  50. package/lib/input/input.component.d.ts +25 -0
  51. package/lib/interfaces/interfaces.d.ts +40 -0
  52. package/lib/items-selector/items-selector.component.d.ts +29 -0
  53. package/lib/items-viewer/items-viewer.component.d.ts +83 -10
  54. package/lib/list/list.component.d.ts +5 -0
  55. package/lib/loader/loader.component.d.ts +13 -0
  56. package/lib/menu/menu.component.d.ts +12 -1
  57. package/lib/menu-admin/menu-admin.component.d.ts +64 -0
  58. package/lib/move-menu-option/move-menu-option.component.d.ts +28 -0
  59. package/lib/multi-option-dialog/multi-option-dialog.component.d.ts +27 -0
  60. package/lib/notifications/notifications.component.d.ts +18 -0
  61. package/lib/radio-button/radio-button.component.d.ts +7 -0
  62. package/lib/radio-group/radio-group.component.d.ts +20 -0
  63. package/lib/recents-dropdown/recents-dropdown.component.d.ts +25 -0
  64. package/lib/resource-actions/resource-actions.component.d.ts +46 -0
  65. package/lib/role-card/role-card.component.d.ts +16 -0
  66. package/lib/role-info/role-info.component.d.ts +36 -0
  67. package/lib/security-admin/security-admin.component.d.ts +71 -6
  68. package/lib/select/select.component.d.ts +38 -0
  69. package/lib/services/dialog.service.d.ts +17 -0
  70. package/lib/services/security-admin.service.d.ts +91 -0
  71. package/lib/services/snackbar.service.d.ts +16 -0
  72. package/lib/snackbar/snackbar.component.d.ts +16 -0
  73. package/lib/tree/tree.component.d.ts +35 -0
  74. package/lib/user-dropdown/user-dropdown.component.d.ts +16 -0
  75. package/lib/users-admin/users-admin.component.d.ts +78 -0
  76. package/package.json +1 -1
  77. package/public-api.d.ts +14 -0
  78. package/src/lib/assets/fonts/fonts/asp-lib-icons.eot +0 -0
  79. package/src/lib/assets/fonts/fonts/asp-lib-icons.svg +46 -26
  80. package/src/lib/assets/fonts/fonts/asp-lib-icons.ttf +0 -0
  81. package/src/lib/assets/fonts/fonts/asp-lib-icons.woff +0 -0
  82. package/src/lib/assets/fonts/selection.json +1 -1
  83. package/src/lib/assets/fonts/style.css +138 -78
  84. package/src/lib/assets/menu-data/menuDataTest.ts +2239 -0
  85. package/src/lib/assets/theme.css +96 -5
@@ -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,18 @@
1
+ import { ElementRef, EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NotificationsComponent {
4
+ private elementRef;
5
+ options: any[];
6
+ optionSelected: EventEmitter<any>;
7
+ isOpen: boolean;
8
+ selectedOption: any;
9
+ fadeInOut: string;
10
+ constructor(elementRef: ElementRef);
11
+ onClick(targetElement: HTMLElement): void;
12
+ toggleNotificationHandler(): void;
13
+ selectOption(option: any): void;
14
+ toggleOverlayHandler(event: MouseEvent): void;
15
+ handleDropdownClick(event: MouseEvent): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationsComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<NotificationsComponent, "lib-notifications", never, { "options": { "alias": "options"; "required": false; }; }, { "optionSelected": "optionSelected"; }, never, never, false, never>;
18
+ }
@@ -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,25 @@
1
+ import { ElementRef, EventEmitter, OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export interface OptionDropdown {
4
+ id: number;
5
+ label: string;
6
+ icon: string;
7
+ date: string;
8
+ }
9
+ export declare class RecentsDropdownComponent implements OnInit {
10
+ private elementRef;
11
+ options: any[];
12
+ optionSelected: EventEmitter<any>;
13
+ isOpen: boolean;
14
+ selectedOption: OptionDropdown | null;
15
+ fadeInOut: string;
16
+ constructor(elementRef: ElementRef);
17
+ ngOnInit(): void;
18
+ onClick(targetElement: HTMLElement): void;
19
+ toggleDropdown(): void;
20
+ selectOption(option: any): void;
21
+ toggleOverlayHandler(event: MouseEvent): void;
22
+ handleDropdownClick(event: MouseEvent): void;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<RecentsDropdownComponent, never>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<RecentsDropdownComponent, "lib-recents-dropdown", never, { "options": { "alias": "options"; "required": false; }; }, { "optionSelected": "optionSelected"; }, never, never, false, never>;
25
+ }
@@ -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,13 +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;
17
+ theme: string;
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[];
9
48
  orderViewBy: FormControl;
49
+ selectedUser: any;
50
+ resourcesField: {
51
+ label: string;
52
+ dropLabel: string;
53
+ name: string;
54
+ type: string;
55
+ dragTitle: string;
56
+ setupUi: typeof ResourceActionsComponent;
57
+ optionsEndpoint: string;
58
+ };
59
+ resetItemSelected: Subject<boolean>;
60
+ assignRoles: (entityType: "Customer" | "User") => void;
61
+ userActions: {
62
+ label: string;
63
+ callback: () => void;
64
+ }[];
65
+ customerActions: {
66
+ label: string;
67
+ callback: () => void;
68
+ }[];
69
+ roleActions: never[];
70
+ viewOptions: any[];
71
+ ngOnInit(): void;
72
+ getViewInputs(view: any): any;
73
+ constructor(dialog: MatDialog, locale: string, securityAdminService: SecurityAdminService, snackbar: SnackbarService);
10
74
  clearValueSelected($event: any): void;
75
+ selectUser(newUser: any): void;
11
76
  static ɵfac: i0.ɵɵFactoryDeclaration<SecurityAdminComponent, never>;
12
- static ɵcmp: i0.ɵɵComponentDeclaration<SecurityAdminComponent, "lib-security-admin", never, { "title": { "alias": "title"; "required": false; }; "viewsLabel": { "alias": "viewsLabel"; "required": false; }; "usersLabel": { "alias": "usersLabel"; "required": false; }; "customersLabel": { "alias": "customersLabel"; "required": false; }; "rolesLabel": { "alias": "rolesLabel"; "required": false; }; }, {}, never, never, false, never>;
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>;
13
78
  }
@@ -0,0 +1,38 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { OnInit } from '@angular/core';
3
+ import { FormControl } from '@angular/forms';
4
+ import { MatMenuTrigger } from '@angular/material/menu';
5
+ import { SnackbarService } from '../services/snackbar.service';
6
+ import * as i0 from "@angular/core";
7
+ export declare class SelectComponent implements OnInit {
8
+ private http;
9
+ private snackbar;
10
+ name: string;
11
+ label: string;
12
+ icon?: string;
13
+ iconPosition?: string;
14
+ className?: string;
15
+ formControl: FormControl;
16
+ theme: string;
17
+ options: any[];
18
+ optionsEndpoint: string;
19
+ menuTrigger?: MatMenuTrigger;
20
+ searchControl: FormControl<string | null>;
21
+ hostStyle: any;
22
+ loadedItems: any[];
23
+ loadingStatus: boolean;
24
+ set style(styleInput: {
25
+ [key: string]: any;
26
+ });
27
+ get hasIcon(): boolean;
28
+ constructor(http: HttpClient, snackbar: SnackbarService);
29
+ loadItems(): void;
30
+ ngOnInit(): void;
31
+ get filteredOptions(): any[];
32
+ get selectOptions(): any[];
33
+ get noOptions(): boolean;
34
+ inputClick(): void;
35
+ selectOption(option: any): void;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, 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>;
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 {};
@@ -0,0 +1,16 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { Router } from '@angular/router';
3
+ import * as i0 from "@angular/core";
4
+ export declare class UserDropdownComponent {
5
+ private elementRef;
6
+ private router;
7
+ isUserDropdownOpen: boolean;
8
+ fadeInOut: string;
9
+ constructor(elementRef: ElementRef, router: Router);
10
+ onClick(targetElement: HTMLElement): void;
11
+ get username(): string | null;
12
+ openUserDropdownHandler(): void;
13
+ logOut(): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserDropdownComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<UserDropdownComponent, "lib-user-dropdown", never, {}, {}, never, never, false, never>;
16
+ }