asp-lib 1.0.5 → 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 (78) hide show
  1. package/esm2022/lib/application-menu/application-menu.component.mjs +4 -3
  2. package/esm2022/lib/asp-lib.module.mjs +93 -7
  3. package/esm2022/lib/assign-roles/assign-roles.component.mjs +151 -0
  4. package/esm2022/lib/basic-item/basic-item.component.mjs +32 -0
  5. package/esm2022/lib/checkbox/checkbox.component.mjs +29 -0
  6. package/esm2022/lib/checkbox-field/checkbox-field.component.mjs +28 -0
  7. package/esm2022/lib/company-dropdown/company-dropdown.component.mjs +3 -4
  8. package/esm2022/lib/dropdown/dropdown.component.mjs +3 -3
  9. package/esm2022/lib/form/form.component.mjs +131 -0
  10. package/esm2022/lib/header/header.component.mjs +7 -6
  11. package/esm2022/lib/input/input.component.mjs +28 -4
  12. package/esm2022/lib/interfaces/interfaces.mjs +1 -1
  13. package/esm2022/lib/items-selector/items-selector.component.mjs +79 -0
  14. package/esm2022/lib/items-viewer/items-viewer.component.mjs +206 -58
  15. package/esm2022/lib/list/list.component.mjs +11 -0
  16. package/esm2022/lib/loader/loader.component.mjs +45 -0
  17. package/esm2022/lib/menu/menu.component.mjs +4 -5
  18. package/esm2022/lib/menu-admin/menu-admin.component.mjs +281 -0
  19. package/esm2022/lib/move-menu-option/move-menu-option.component.mjs +58 -0
  20. package/esm2022/lib/multi-option-dialog/multi-option-dialog.component.mjs +31 -0
  21. package/esm2022/lib/notifications/notifications.component.mjs +3 -3
  22. package/esm2022/lib/radio-button/radio-button.component.mjs +19 -0
  23. package/esm2022/lib/radio-group/radio-group.component.mjs +56 -0
  24. package/esm2022/lib/recents-dropdown/recents-dropdown.component.mjs +3 -3
  25. package/esm2022/lib/resource-actions/resource-actions.component.mjs +79 -0
  26. package/esm2022/lib/role-card/role-card.component.mjs +40 -0
  27. package/esm2022/lib/role-info/role-info.component.mjs +75 -0
  28. package/esm2022/lib/security-admin/security-admin.component.mjs +256 -81
  29. package/esm2022/lib/select/select.component.mjs +55 -14
  30. package/esm2022/lib/services/dialog.service.mjs +27 -0
  31. package/esm2022/lib/services/security-admin.service.mjs +194 -0
  32. package/esm2022/lib/services/snackbar.service.mjs +41 -0
  33. package/esm2022/lib/snackbar/snackbar.component.mjs +26 -0
  34. package/esm2022/lib/tree/tree.component.mjs +73 -0
  35. package/esm2022/lib/user-dropdown/user-dropdown.component.mjs +3 -3
  36. package/esm2022/lib/users-admin/users-admin.component.mjs +238 -17
  37. package/esm2022/public-api.mjs +7 -1
  38. package/fesm2022/asp-lib.mjs +2314 -265
  39. package/fesm2022/asp-lib.mjs.map +1 -1
  40. package/lib/asp-lib.module.d.ts +34 -11
  41. package/lib/assign-roles/assign-roles.component.d.ts +55 -0
  42. package/lib/basic-item/basic-item.component.d.ts +18 -0
  43. package/lib/checkbox/checkbox.component.d.ts +11 -0
  44. package/lib/checkbox-field/checkbox-field.component.d.ts +11 -0
  45. package/lib/form/form.component.d.ts +45 -0
  46. package/lib/header/header.component.d.ts +3 -82
  47. package/lib/input/input.component.d.ts +11 -1
  48. package/lib/interfaces/interfaces.d.ts +40 -0
  49. package/lib/items-selector/items-selector.component.d.ts +29 -0
  50. package/lib/items-viewer/items-viewer.component.d.ts +73 -11
  51. package/lib/list/list.component.d.ts +5 -0
  52. package/lib/loader/loader.component.d.ts +13 -0
  53. package/lib/menu/menu.component.d.ts +12 -1
  54. package/lib/menu-admin/menu-admin.component.d.ts +64 -0
  55. package/lib/move-menu-option/move-menu-option.component.d.ts +28 -0
  56. package/lib/multi-option-dialog/multi-option-dialog.component.d.ts +27 -0
  57. package/lib/radio-button/radio-button.component.d.ts +7 -0
  58. package/lib/radio-group/radio-group.component.d.ts +20 -0
  59. package/lib/resource-actions/resource-actions.component.d.ts +46 -0
  60. package/lib/role-card/role-card.component.d.ts +16 -0
  61. package/lib/role-info/role-info.component.d.ts +36 -0
  62. package/lib/security-admin/security-admin.component.d.ts +63 -55
  63. package/lib/select/select.component.d.ts +18 -2
  64. package/lib/services/dialog.service.d.ts +17 -0
  65. package/lib/services/security-admin.service.d.ts +91 -0
  66. package/lib/services/snackbar.service.d.ts +16 -0
  67. package/lib/snackbar/snackbar.component.d.ts +16 -0
  68. package/lib/tree/tree.component.d.ts +35 -0
  69. package/lib/users-admin/users-admin.component.d.ts +60 -9
  70. package/package.json +1 -1
  71. package/public-api.d.ts +6 -0
  72. package/src/lib/assets/fonts/fonts/asp-lib-icons.eot +0 -0
  73. package/src/lib/assets/fonts/fonts/asp-lib-icons.svg +46 -33
  74. package/src/lib/assets/fonts/fonts/asp-lib-icons.ttf +0 -0
  75. package/src/lib/assets/fonts/fonts/asp-lib-icons.woff +0 -0
  76. package/src/lib/assets/fonts/selection.json +1 -1
  77. package/src/lib/assets/fonts/style.css +138 -99
  78. package/src/lib/assets/theme.css +62 -0
@@ -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
- userForm: ({
11
- label: string;
12
- control: FormControl<string | null>;
13
- name: string;
14
- type: string;
15
- options?: undefined;
16
- } | {
17
- label: string;
18
- control: FormControl<string | null>;
19
- name: string;
20
- type: string;
21
- options: {
22
- label: string;
23
- }[];
24
- } | {
25
- label: string;
26
- control: FormControl<boolean | null>;
27
- name: string;
28
- type: string;
29
- options?: undefined;
30
- })[];
31
- customerForm: ({
32
- label: string;
33
- control: FormControl<string | null>;
34
- name: string;
35
- type: string;
36
- options?: undefined;
37
- } | {
38
- label: string;
39
- control: FormControl<string | null>;
40
- name: string;
41
- type: string;
42
- options: {
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
- control: FormControl<string | null>;
52
+ dropLabel: string;
55
53
  name: string;
56
54
  type: string;
57
- options?: undefined;
58
- })[];
59
- orderViewBy: FormControl;
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: never[];
65
+ customerActions: {
66
+ label: string;
67
+ callback: () => void;
68
+ }[];
65
69
  roleActions: never[];
66
- constructor();
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; }; "viewsLabel": { "alias": "viewsLabel"; "required": false; }; "usersLabel": { "alias": "usersLabel"; "required": false; }; "customersLabel": { "alias": "customersLabel"; "required": false; }; "rolesLabel": { "alias": "rolesLabel"; "required": false; }; "theme": { "alias": "theme"; "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>;
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 {};
@@ -1,10 +1,18 @@
1
+ import { OnInit, Type } from '@angular/core';
1
2
  import { FormControl } from '@angular/forms';
3
+ import { RoleCardComponent } from '../role-card/role-card.component';
4
+ import { SecurityAdminService } from '../services/security-admin.service';
5
+ import { Subject } from 'rxjs';
6
+ import { SnackbarService } from '../services/snackbar.service';
2
7
  import * as i0 from "@angular/core";
3
- export declare class UsersAdminComponent {
8
+ export declare class UsersAdminComponent implements OnInit {
9
+ private securityAdminService;
10
+ private snackbar;
4
11
  theme: string;
5
12
  listTitle: string;
6
13
  listIcon: string;
7
14
  listItemIcon: string;
15
+ entity: "User" | "Customer" | "Role";
8
16
  entityName: string;
9
17
  entityActions: any[];
10
18
  entityForm: {
@@ -13,15 +21,58 @@ export declare class UsersAdminComponent {
13
21
  name: string;
14
22
  type: string;
15
23
  options?: any[];
24
+ style?: any;
25
+ auxLabel?: string;
16
26
  }[];
17
- entityFormInputs(types: string[]): {
18
- label: string;
19
- control: FormControl<any>;
20
- name: string;
21
- type: string;
22
- options?: any[] | undefined;
23
- }[];
27
+ entityListEndpoint: string;
28
+ entityList: any[];
29
+ entityUiComponent: Type<any> | null;
30
+ uiComponentInputs: {
31
+ [key: string]: any;
32
+ };
33
+ searchFilter?: Function;
34
+ customerList: any[];
35
+ roleList: any[];
36
+ userList: any[];
37
+ customerListEndpoint: string;
38
+ roleListEndpoint: string;
39
+ userListEndpoint: string;
40
+ saveEntityEndpoint: string;
41
+ usersByCustomerEndpoint: string;
42
+ reloadSubject?: Subject<boolean>;
43
+ itemSelected: Function;
44
+ resetItemSelected?: Subject<boolean>;
45
+ roleCard: typeof RoleCardComponent;
46
+ formControls: {
47
+ [key: string]: FormControl;
48
+ };
49
+ selectedItem: any;
50
+ selectedUser: any;
51
+ loadingUserRoles: boolean;
52
+ loadingUserCustomerRoles: boolean;
24
53
  get mainTabTitle(): string;
54
+ get formTitle(): string;
55
+ get userAssignedRoles(): any;
56
+ get userCustomerAssignedRoles(): any;
57
+ get mainListOrderProperties(): {
58
+ property: string;
59
+ ascIcon: string;
60
+ descIcon: string;
61
+ }[];
62
+ ngOnInit(): void;
63
+ selectItem(newItem: any): void;
64
+ constructor(securityAdminService: SecurityAdminService, snackbar: SnackbarService);
65
+ saveItem(): void;
66
+ resetForm(event?: any): void;
67
+ get currentCustomerUsers(): any;
68
+ get customerUsersEndpoint(): string;
69
+ get customerRolesEndpoint(): string;
70
+ get roleUsersEndpoint(): string;
71
+ get roleCustomersEndpoint(): string;
72
+ assignCustomerToUser(customer: any): void;
73
+ assignUsersToCustomer(users: any[]): void;
74
+ assignUsersToRole(users: any[]): void;
75
+ assignCustomersToRole(customers: any[]): void;
25
76
  static ɵfac: i0.ɵɵFactoryDeclaration<UsersAdminComponent, never>;
26
- static ɵcmp: i0.ɵɵComponentDeclaration<UsersAdminComponent, "lib-users-admin", never, { "theme": { "alias": "theme"; "required": false; }; "listTitle": { "alias": "listTitle"; "required": false; }; "listIcon": { "alias": "listIcon"; "required": false; }; "listItemIcon": { "alias": "listItemIcon"; "required": false; }; "entityName": { "alias": "entityName"; "required": false; }; "entityActions": { "alias": "entityActions"; "required": false; }; "entityForm": { "alias": "entityForm"; "required": false; }; }, {}, never, never, false, never>;
77
+ static ɵcmp: i0.ɵɵComponentDeclaration<UsersAdminComponent, "lib-users-admin", never, { "theme": { "alias": "theme"; "required": false; }; "listTitle": { "alias": "listTitle"; "required": false; }; "listIcon": { "alias": "listIcon"; "required": false; }; "listItemIcon": { "alias": "listItemIcon"; "required": false; }; "entity": { "alias": "entity"; "required": false; }; "entityName": { "alias": "entityName"; "required": false; }; "entityActions": { "alias": "entityActions"; "required": false; }; "entityForm": { "alias": "entityForm"; "required": false; }; "entityListEndpoint": { "alias": "entityListEndpoint"; "required": false; }; "entityList": { "alias": "entityList"; "required": false; }; "entityUiComponent": { "alias": "entityUiComponent"; "required": false; }; "uiComponentInputs": { "alias": "uiComponentInputs"; "required": false; }; "searchFilter": { "alias": "searchFilter"; "required": false; }; "customerList": { "alias": "customerList"; "required": false; }; "roleList": { "alias": "roleList"; "required": false; }; "userList": { "alias": "userList"; "required": false; }; "customerListEndpoint": { "alias": "customerListEndpoint"; "required": false; }; "roleListEndpoint": { "alias": "roleListEndpoint"; "required": false; }; "userListEndpoint": { "alias": "userListEndpoint"; "required": false; }; "saveEntityEndpoint": { "alias": "saveEntityEndpoint"; "required": false; }; "usersByCustomerEndpoint": { "alias": "usersByCustomerEndpoint"; "required": false; }; "reloadSubject": { "alias": "reloadSubject"; "required": false; }; "itemSelected": { "alias": "itemSelected"; "required": false; }; "resetItemSelected": { "alias": "resetItemSelected"; "required": false; }; }, {}, never, never, false, never>;
27
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asp-lib",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.2.0",
6
6
  "@angular/core": "^16.2.0",
package/public-api.d.ts CHANGED
@@ -14,3 +14,9 @@ export * from './lib/recents-dropdown/recents-dropdown.component';
14
14
  export * from './lib/notifications/notifications.component';
15
15
  export * from './lib/company-dropdown/company-dropdown.component';
16
16
  export * from './lib/user-dropdown/user-dropdown.component';
17
+ export * from './lib/radio-group/radio-group.component';
18
+ export * from './lib/basic-item/basic-item.component';
19
+ export * from './lib/role-card/role-card.component';
20
+ export * from './lib/items-selector/items-selector.component';
21
+ export * from './lib/checkbox/checkbox.component';
22
+ export * from './lib/checkbox-field/checkbox-field.component';