@ieeesa-npm/groups 0.10.6 → 0.10.8
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/assets/constants.json +15 -0
- package/esm2022/lib/components/add-user-roster/add-user-roster.component.mjs +34 -28
- package/esm2022/lib/components/create-group/create-group.component.mjs +192 -68
- package/esm2022/lib/components/edit-user-roles/edit-user-roles.component.mjs +10 -5
- package/esm2022/lib/components/tree-view/tree-view.component.mjs +16 -11
- package/esm2022/lib/components/view-roster/view-roster.component.mjs +35 -26
- package/esm2022/lib/groups.component.mjs +37 -19
- package/esm2022/lib/models/add-new-user.model.mjs +1 -1
- package/esm2022/lib/models/add-or-edit-user-group.model.mjs +1 -1
- package/esm2022/lib/models/group-function-type.model.mjs +2 -1
- package/esm2022/lib/models/group-info.model.mjs +1 -1
- package/esm2022/lib/models/group-user-info.model.mjs +1 -1
- package/esm2022/lib/models/parent-groups-info.model.mjs +2 -0
- package/esm2022/lib/models/permission-type.model.mjs +6 -2
- package/esm2022/lib/models/user-info.model.mjs +1 -1
- package/esm2022/lib/models/user.model.mjs +1 -1
- package/esm2022/lib/services/group-permissions-map-service.mjs +42 -6
- package/esm2022/lib/services/groups.service.mjs +66 -6
- package/esm2022/lib/services/user-permissions.service.mjs +3 -5
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/ieeesa-npm-groups.mjs +441 -163
- package/fesm2022/ieeesa-npm-groups.mjs.map +1 -1
- package/lib/components/add-user-roster/add-user-roster.component.d.ts +5 -0
- package/lib/components/create-group/create-group.component.d.ts +55 -4
- package/lib/components/view-roster/view-roster.component.d.ts +2 -1
- package/lib/groups.component.d.ts +6 -2
- package/lib/models/add-new-user.model.d.ts +1 -1
- package/lib/models/add-or-edit-user-group.model.d.ts +1 -1
- package/lib/models/group-function-type.model.d.ts +1 -0
- package/lib/models/group-info.model.d.ts +2 -0
- package/lib/models/group-user-info.model.d.ts +1 -0
- package/lib/models/parent-groups-info.model.d.ts +5 -0
- package/lib/models/permission-type.model.d.ts +6 -2
- package/lib/models/user-info.model.d.ts +1 -1
- package/lib/models/user.model.d.ts +16 -1
- package/lib/services/group-permissions-map-service.d.ts +13 -0
- package/lib/services/groups.service.d.ts +52 -16
- package/lib/services/user-permissions.service.d.ts +1 -1
- package/package.json +4 -4
- package/public-api.d.ts +1 -0
|
@@ -73,6 +73,11 @@ export declare class AddUserRosterComponent implements OnInit, OnDestroy {
|
|
|
73
73
|
* @memberof AddUserRosterComponent
|
|
74
74
|
*/
|
|
75
75
|
validateUserExistence(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Initialize form group based on email search
|
|
78
|
+
* @memberof AddUserRosterComponent
|
|
79
|
+
*/
|
|
80
|
+
initializeAddUserFormGroup(): void;
|
|
76
81
|
/**
|
|
77
82
|
* Creates add user form group and updates it with prev form values.
|
|
78
83
|
* @param {string} stringifiedAddUserFormPrevValues
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { FormGrid, FormModel, SelectOption, AlignType, FieldConfig } from '@ieeesa-npm/presentation';
|
|
3
|
+
import { FormGrid, FormModel, SelectOption, AlignType, DynamicFormComponent, FieldConfig, SlideToggleOption } from '@ieeesa-npm/presentation';
|
|
4
4
|
import { AlertsService, AlertType, GlobalErrorHandlerService } from '@ieeesa-npm/utility';
|
|
5
5
|
import { GroupsService } from '../../services/groups.service';
|
|
6
6
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
7
7
|
import { Subject } from 'rxjs';
|
|
8
8
|
import { GroupInfo } from '../../models/group-info.model';
|
|
9
9
|
import { GroupFunctionType } from '../../models/group-function-type.model';
|
|
10
|
+
import { ParentGroupsInfo } from '../../models/parent-groups-info.model';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
/**
|
|
12
|
-
* CreateGroupComponent uses DynamicFormComponent to build create new group form and implement the functionalities of submission of form and handling success and error scenarios.
|
|
13
|
+
* CreateGroupComponent uses DynamicFormComponent to build create new group form or edit group and implement the functionalities of submission of form and handling success and error scenarios.
|
|
13
14
|
* @class CreateGroupComponent
|
|
14
15
|
* @implements {OnInit}
|
|
15
16
|
* @implements {OnDestroy}
|
|
@@ -33,6 +34,8 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
|
|
|
33
34
|
heading: string;
|
|
34
35
|
label: {
|
|
35
36
|
parentGroup: string;
|
|
37
|
+
changeParentGroup: string;
|
|
38
|
+
newParentGroup: string;
|
|
36
39
|
groupType: string;
|
|
37
40
|
groupName: string;
|
|
38
41
|
shortName: string;
|
|
@@ -41,12 +44,17 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
|
|
|
41
44
|
leftButtonLabel: string;
|
|
42
45
|
ariaLabel: {
|
|
43
46
|
parentGroup: string;
|
|
47
|
+
changeParentGroup: string;
|
|
48
|
+
newParentGroup: string;
|
|
44
49
|
groupType: string;
|
|
45
50
|
groupName: string;
|
|
46
51
|
shortName: string;
|
|
47
52
|
groupScope: string;
|
|
48
53
|
};
|
|
49
54
|
ariaDescribedById: {
|
|
55
|
+
parentGroup: string;
|
|
56
|
+
changeParentGroup: string;
|
|
57
|
+
newParentGroup: string;
|
|
50
58
|
groupType: string;
|
|
51
59
|
groupName: string;
|
|
52
60
|
shortName: string;
|
|
@@ -78,6 +86,7 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
|
|
|
78
86
|
};
|
|
79
87
|
};
|
|
80
88
|
supportText: {
|
|
89
|
+
newParentGroup: string;
|
|
81
90
|
groupType: string;
|
|
82
91
|
groupName: string;
|
|
83
92
|
shortName: string;
|
|
@@ -97,6 +106,11 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
|
|
|
97
106
|
selectedGroupInfo: GroupInfo | undefined;
|
|
98
107
|
groupFunctionType: GroupFunctionType;
|
|
99
108
|
selectedGroupParentInfo: GroupInfo | undefined;
|
|
109
|
+
allowedParentGroups: ParentGroupsInfo[];
|
|
110
|
+
allowedParentGroupsOptions: SelectOption[];
|
|
111
|
+
isParentGroupChanged: boolean;
|
|
112
|
+
slideToggleOption: SlideToggleOption;
|
|
113
|
+
dynamicFormComponent: DynamicFormComponent;
|
|
100
114
|
constructor(groupsService: GroupsService, globalErrorHandlerService: GlobalErrorHandlerService, alertService: AlertsService);
|
|
101
115
|
/**
|
|
102
116
|
* Initialize the create group form group array and component.
|
|
@@ -114,7 +128,7 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
|
|
|
114
128
|
* Initialize the create group form group array.
|
|
115
129
|
* @memberof CreateGroupComponent
|
|
116
130
|
*/
|
|
117
|
-
createFormGroup(): void;
|
|
131
|
+
createFormGroup(formValue?: any): void;
|
|
118
132
|
/**
|
|
119
133
|
* Update the create sub group form group array.
|
|
120
134
|
* @param {GroupInfo} parentGroupInfo -Parent group info.
|
|
@@ -122,6 +136,14 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
|
|
|
122
136
|
* @memberof CreateGroupComponent
|
|
123
137
|
*/
|
|
124
138
|
updateCreateFormGroup(parentGroupInfo: GroupInfo): void;
|
|
139
|
+
/**
|
|
140
|
+
* Updates the create or edit user form group controls by adding fieldConfig at required index.
|
|
141
|
+
* @param {number} indexPosition
|
|
142
|
+
* @param {FieldConfig} fieldConfig
|
|
143
|
+
* @return -returns nothing
|
|
144
|
+
* @memberof CreateGroupComponent
|
|
145
|
+
*/
|
|
146
|
+
updateAddUserFormControls(indexPosition: number, fieldConfig: FieldConfig): void;
|
|
125
147
|
/**
|
|
126
148
|
* Handles client side validation and calls create group or edit group methods.
|
|
127
149
|
* @param {FormGroup[]} form -Array of formGroup
|
|
@@ -138,7 +160,7 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
|
|
|
138
160
|
createGroup(formData: any): void;
|
|
139
161
|
/**
|
|
140
162
|
* Constructs edit group payload and calls edit group API and emits create group API response.
|
|
141
|
-
* @param
|
|
163
|
+
* @param formData
|
|
142
164
|
* @return -returns nothing
|
|
143
165
|
* @memberof CreateGroupComponent
|
|
144
166
|
*/
|
|
@@ -170,6 +192,35 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
|
|
|
170
192
|
* @memberof CreateGroupComponent
|
|
171
193
|
*/
|
|
172
194
|
createGroupCancelled(): void;
|
|
195
|
+
/**
|
|
196
|
+
* Gets allowed parent groups for reassigning the parent.
|
|
197
|
+
* @param {string} groupId
|
|
198
|
+
* @return -returns nothing
|
|
199
|
+
* @memberof CreateGroupComponent
|
|
200
|
+
*/
|
|
201
|
+
getParentGroups(groupId: string): void;
|
|
202
|
+
/**
|
|
203
|
+
* Update passed form field values.
|
|
204
|
+
* @param {string} formControlName
|
|
205
|
+
* @param {string} formControlInputProperty
|
|
206
|
+
* @param {*} value
|
|
207
|
+
* @memberof CreateGroupComponent
|
|
208
|
+
*/
|
|
209
|
+
updateFormControlOptions(formControlName: string, formControlInputProperty: string, value: any): void;
|
|
210
|
+
/**
|
|
211
|
+
* Adds/removes new parent group selection options whenever Change Parent Group slider is toggled.
|
|
212
|
+
* @param {SlideToggleOption} toggle
|
|
213
|
+
* @return -returns nothing
|
|
214
|
+
* @memberof CreateGroupComponent
|
|
215
|
+
*/
|
|
216
|
+
onFormSlideToggleChange(toggle: SlideToggleOption): void;
|
|
217
|
+
/**
|
|
218
|
+
* Handles create group form change event.
|
|
219
|
+
* @param {FormGroup[]} form
|
|
220
|
+
* @return -returns nothing
|
|
221
|
+
* @memberof CreateGroupComponent
|
|
222
|
+
*/
|
|
223
|
+
onCreateGroupFormChange(form: FormGroup[]): void;
|
|
173
224
|
/**
|
|
174
225
|
* NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
|
|
175
226
|
* @memberof CreateGroupComponent
|
|
@@ -5,7 +5,7 @@ import { MatDialog } from '@angular/material/dialog';
|
|
|
5
5
|
import { TableColumnSchema, TableActions, AlignType, ChipOption, CheckboxOption, FiltersAndOptions } from '@ieeesa-npm/presentation';
|
|
6
6
|
import { AlertType, AlertsService, GlobalErrorHandlerService } from '@ieeesa-npm/utility';
|
|
7
7
|
import { GroupsService } from '../../services/groups.service';
|
|
8
|
-
import { User } from '../../models/user.model';
|
|
8
|
+
import { User, UserDetails } from '../../models/user.model';
|
|
9
9
|
import { GroupUserInfo } from '../../models/group-user-info.model';
|
|
10
10
|
import { GroupRosterType } from '../../models/roster-type.model';
|
|
11
11
|
import { FilterType } from '../../models/filter-type.model';
|
|
@@ -51,6 +51,7 @@ export declare class ViewRosterComponent implements AfterViewInit, OnDestroy, On
|
|
|
51
51
|
tableColumnsForIndividual: any;
|
|
52
52
|
tableColumnsForSystemUsers: any;
|
|
53
53
|
emptyFieldValueReplacedBy: any;
|
|
54
|
+
userInfo: UserDetails;
|
|
54
55
|
constructor(dialog: MatDialog, groupService: GroupsService, alertService: AlertsService, cdr: ChangeDetectorRef, globalErrorHandlerService: GlobalErrorHandlerService);
|
|
55
56
|
ngOnInit(): void;
|
|
56
57
|
/**
|
|
@@ -13,6 +13,8 @@ import { EditGroupAndParentInfo } from './models/edit-group.model';
|
|
|
13
13
|
import { UserPermissionsService } from './services/user-permissions.service';
|
|
14
14
|
import { GroupPermission, UserPermission } from './models/group-permissions.model';
|
|
15
15
|
import { PermissionType } from './models/permission-type.model';
|
|
16
|
+
import { GroupPermissionsMapService } from './services/group-permissions-map-service';
|
|
17
|
+
import { UserDetails } from './models/user.model';
|
|
16
18
|
import * as i0 from "@angular/core";
|
|
17
19
|
/**
|
|
18
20
|
* Groups component is a wrapper or container component for groups management reusable component and in this component integrates all group management functionalities and this will be entry component for managing groups when it is consumed in other applications.
|
|
@@ -25,6 +27,7 @@ export declare class GroupsComponent implements OnInit, OnDestroy {
|
|
|
25
27
|
private breakpointObserverService;
|
|
26
28
|
globalErrorHandlerService: GlobalErrorHandlerService;
|
|
27
29
|
private userPermissionsService;
|
|
30
|
+
private groupPermissionsService;
|
|
28
31
|
destroy$: Subject<boolean>;
|
|
29
32
|
dialogRef: any;
|
|
30
33
|
constants: any;
|
|
@@ -57,6 +60,7 @@ export declare class GroupsComponent implements OnInit, OnDestroy {
|
|
|
57
60
|
applicationId: string;
|
|
58
61
|
apiBaseURL: string;
|
|
59
62
|
userPermissions: UserPermission[];
|
|
63
|
+
userInfo: UserDetails;
|
|
60
64
|
permissionType: typeof PermissionType;
|
|
61
65
|
functionType: GroupFunctionType;
|
|
62
66
|
alignmentType: typeof AlignType;
|
|
@@ -67,7 +71,7 @@ export declare class GroupsComponent implements OnInit, OnDestroy {
|
|
|
67
71
|
trimmedSearchTerm: string;
|
|
68
72
|
userGroupPermissions: GroupPermission[];
|
|
69
73
|
supportMessage: string;
|
|
70
|
-
constructor(dialog: MatDialog, groupsService: GroupsService, alertService: AlertsService, breakpointObserverService: BreakpointObserverService, globalErrorHandlerService: GlobalErrorHandlerService, userPermissionsService: UserPermissionsService);
|
|
74
|
+
constructor(dialog: MatDialog, groupsService: GroupsService, alertService: AlertsService, breakpointObserverService: BreakpointObserverService, globalErrorHandlerService: GlobalErrorHandlerService, userPermissionsService: UserPermissionsService, groupPermissionsService: GroupPermissionsMapService);
|
|
71
75
|
/**
|
|
72
76
|
* Initialize the groups component.
|
|
73
77
|
* @return -returns nothing
|
|
@@ -200,5 +204,5 @@ export declare class GroupsComponent implements OnInit, OnDestroy {
|
|
|
200
204
|
*/
|
|
201
205
|
ngOnDestroy(): void;
|
|
202
206
|
static ɵfac: i0.ɵɵFactoryDeclaration<GroupsComponent, never>;
|
|
203
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GroupsComponent, "ieeesa-groups", never, { "groupsPageInfo": { "alias": "groupsPageInfo"; "required": false; }; "applicationId": { "alias": "applicationId"; "required": false; }; "apiBaseURL": { "alias": "apiBaseURL"; "required": false; }; "userPermissions": { "alias": "userPermissions"; "required": false; }; }, {}, never, never, true, never>;
|
|
207
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GroupsComponent, "ieeesa-groups", never, { "groupsPageInfo": { "alias": "groupsPageInfo"; "required": false; }; "applicationId": { "alias": "applicationId"; "required": false; }; "apiBaseURL": { "alias": "apiBaseURL"; "required": false; }; "userPermissions": { "alias": "userPermissions"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; }, {}, never, never, true, never>;
|
|
204
208
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UserPermission } from './group-permissions.model';
|
|
1
2
|
import { GroupType } from './group-types.model';
|
|
2
3
|
export interface GroupInfo {
|
|
3
4
|
groupId: string;
|
|
@@ -12,4 +13,5 @@ export interface GroupInfo {
|
|
|
12
13
|
groupTypeInfo?: GroupType;
|
|
13
14
|
children?: GroupInfo[];
|
|
14
15
|
noOfChildren?: number;
|
|
16
|
+
permissions: UserPermission[] | null;
|
|
15
17
|
}
|
|
@@ -4,9 +4,13 @@ export declare enum PermissionType {
|
|
|
4
4
|
CREATE_SUBGROUP = "CREATE_SUBGROUP",
|
|
5
5
|
EDIT_GROUP = "EDIT_GROUP",
|
|
6
6
|
DELETE_GROUP = "DELETE_GROUP",
|
|
7
|
-
MANAGE_SYSTEM_USERS = "MANAGE_SYSTEM_USERS",
|
|
8
7
|
VIEW_GROUP_OFFICERS = "VIEW_GROUP_OFFICERS",
|
|
9
8
|
MANAGE_GROUP_OFFICERS = "MANAGE_GROUP_OFFICERS",
|
|
10
9
|
VIEW_GROUP_MEMBERS = "VIEW_GROUP_MEMBERS",
|
|
11
|
-
MANAGE_GROUP_MEMBERS = "MANAGE_GROUP_MEMBERS"
|
|
10
|
+
MANAGE_GROUP_MEMBERS = "MANAGE_GROUP_MEMBERS",
|
|
11
|
+
MANAGE_SYSTEM_USERS = "MANAGE_SYSTEM_USERS",
|
|
12
|
+
VIEW_ALL_GROUPS = "VIEW_ALL_GROUPS",
|
|
13
|
+
MANAGE_ALL_GROUPS = "MANAGE_ALL_GROUPS",
|
|
14
|
+
VIEW_ALL_ROSTERS = "VIEW_ALL_ROSTERS",
|
|
15
|
+
MANAGE_ALL_ROSTERS = "MANAGE_ALL_ROSTERS"
|
|
12
16
|
}
|
|
@@ -12,6 +12,11 @@ export interface User {
|
|
|
12
12
|
organization: string | null;
|
|
13
13
|
employer: string | null;
|
|
14
14
|
checked?: boolean;
|
|
15
|
+
canDelete?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface Employer {
|
|
18
|
+
orgId: string | null;
|
|
19
|
+
orgName: string | null;
|
|
15
20
|
}
|
|
16
21
|
export interface GetGroupUsersResponse {
|
|
17
22
|
status: boolean;
|
|
@@ -24,7 +29,8 @@ export interface GetGroupUsersResponse {
|
|
|
24
29
|
classification: Classification | null;
|
|
25
30
|
memberStatus: MemberType | null;
|
|
26
31
|
organization: Organization | null;
|
|
27
|
-
employer:
|
|
32
|
+
employer: Employer | null;
|
|
33
|
+
canDelete?: boolean;
|
|
28
34
|
}[];
|
|
29
35
|
}
|
|
30
36
|
export interface FilterUsersPayload {
|
|
@@ -44,3 +50,12 @@ export interface SearchUsersPayload {
|
|
|
44
50
|
ascendingOrder: boolean;
|
|
45
51
|
};
|
|
46
52
|
}
|
|
53
|
+
export interface UserDetails {
|
|
54
|
+
appId: string;
|
|
55
|
+
userId: string;
|
|
56
|
+
ssoId: string;
|
|
57
|
+
firstName: string;
|
|
58
|
+
lastName: string;
|
|
59
|
+
email: string;
|
|
60
|
+
canDelete?: boolean;
|
|
61
|
+
}
|
|
@@ -2,7 +2,20 @@ import { GroupPermission } from '../models/group-permissions.model';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class GroupPermissionsMapService {
|
|
4
4
|
groupPermissions: GroupPermission[];
|
|
5
|
+
globalGroupPermissions: GroupPermission[];
|
|
6
|
+
/**
|
|
7
|
+
* Returns group-wise permission mappings.
|
|
8
|
+
* @return {GroupPermission[]}
|
|
9
|
+
* @memberof GroupPermissionsMapService
|
|
10
|
+
*/
|
|
5
11
|
getGroupPermissions(): GroupPermission[];
|
|
12
|
+
/**
|
|
13
|
+
* Returns global permissions mapping for groups.
|
|
14
|
+
* Global permissions are maintained separately as global permissions also include role based group wise permissions irrespective of the attached group.
|
|
15
|
+
* @return {GroupPermission[]}
|
|
16
|
+
* @memberof GroupPermissionsMapService
|
|
17
|
+
*/
|
|
18
|
+
getGlobalGroupPermissions(): GroupPermission[];
|
|
6
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<GroupPermissionsMapService, never>;
|
|
7
20
|
static ɵprov: i0.ɵɵInjectableDeclaration<GroupPermissionsMapService>;
|
|
8
21
|
}
|
|
@@ -5,7 +5,7 @@ import { AlertsService, HttpService } from '@ieeesa-npm/utility';
|
|
|
5
5
|
import { GetGroupResponse, GetGroupsPayload } from '../models/view-group.model';
|
|
6
6
|
import { DeleteGroupPayload } from '../models/delete-group.model';
|
|
7
7
|
import { GroupInfo } from '../models/group-info.model';
|
|
8
|
-
import { SearchUsersPayload, FilterUsersPayload, GetGroupUsersResponse, User } from '../models/user.model';
|
|
8
|
+
import { SearchUsersPayload, FilterUsersPayload, GetGroupUsersResponse, User, UserDetails } from '../models/user.model';
|
|
9
9
|
import { CheckboxOption } from '@ieeesa-npm/presentation';
|
|
10
10
|
import { EditGroupPayload } from '../models/edit-group.model';
|
|
11
11
|
import { GroupFunctionType } from '../models/group-function-type.model';
|
|
@@ -19,9 +19,11 @@ import { MemberTypeResponse } from '../models/member-type.model';
|
|
|
19
19
|
import { ClassificationResponse } from '../models/classification.model';
|
|
20
20
|
import { GroupRosterType } from '../models/roster-type.model';
|
|
21
21
|
import { FormControlStatus } from '@angular/forms';
|
|
22
|
-
import { GroupPermission } from '../models/group-permissions.model';
|
|
22
|
+
import { GroupPermission, UserPermission } from '../models/group-permissions.model';
|
|
23
23
|
import { PermissionType } from '../models/permission-type.model';
|
|
24
24
|
import { UserPermissionsService } from './user-permissions.service';
|
|
25
|
+
import { GroupPermissionsMapService } from './group-permissions-map-service';
|
|
26
|
+
import { ParentGroupsInfo } from '../models/parent-groups-info.model';
|
|
25
27
|
import * as i0 from "@angular/core";
|
|
26
28
|
/**
|
|
27
29
|
* Groups service is an abstract layer and responsible for managing groups REST API calls.
|
|
@@ -30,6 +32,7 @@ import * as i0 from "@angular/core";
|
|
|
30
32
|
export declare class GroupsService {
|
|
31
33
|
private httpService;
|
|
32
34
|
private userPermissionsService;
|
|
35
|
+
private groupPermissionsService;
|
|
33
36
|
alertService: AlertsService;
|
|
34
37
|
groupsText: {
|
|
35
38
|
ER1000: string;
|
|
@@ -45,16 +48,16 @@ export declare class GroupsService {
|
|
|
45
48
|
"1009": string;
|
|
46
49
|
"1010": string;
|
|
47
50
|
"1011": string;
|
|
48
|
-
"1012": string;
|
|
49
|
-
* Returns the selected group parent group info.
|
|
50
|
-
* @return {(GroupInfo | undefined)} -group info.
|
|
51
|
-
* @memberof GroupsService
|
|
52
|
-
*/
|
|
51
|
+
"1012": string;
|
|
53
52
|
"1013": string;
|
|
54
53
|
"1014": string;
|
|
55
54
|
"1015": string;
|
|
56
55
|
"1016": string;
|
|
57
|
-
"1017": string;
|
|
56
|
+
"1017": string; /**
|
|
57
|
+
* Returns the selected group parent group info.
|
|
58
|
+
* @return {(GroupInfo | undefined)} -group info.
|
|
59
|
+
* @memberof GroupsService
|
|
60
|
+
*/
|
|
58
61
|
"1018": string;
|
|
59
62
|
"1019": string;
|
|
60
63
|
"1020": string;
|
|
@@ -74,14 +77,11 @@ export declare class GroupsService {
|
|
|
74
77
|
"1034": string;
|
|
75
78
|
"1035": string;
|
|
76
79
|
"1036": string;
|
|
80
|
+
"1037": string;
|
|
81
|
+
"1038": string;
|
|
82
|
+
"1039": string;
|
|
77
83
|
"2001": string;
|
|
78
84
|
"2002": string;
|
|
79
|
-
/**
|
|
80
|
-
* Gets the group users based on the filtered roles.
|
|
81
|
-
* @param {FilterUsersPayload} payload
|
|
82
|
-
* @return {Observable<GetGroupUsersResponse>}
|
|
83
|
-
* @memberof GroupsService
|
|
84
|
-
*/
|
|
85
85
|
"2010": string;
|
|
86
86
|
"2011": string;
|
|
87
87
|
"20l2": string;
|
|
@@ -96,6 +96,7 @@ export declare class GroupsService {
|
|
|
96
96
|
"2021": string;
|
|
97
97
|
"2022": string;
|
|
98
98
|
"2023": string;
|
|
99
|
+
"2024": string;
|
|
99
100
|
"3004": string;
|
|
100
101
|
};
|
|
101
102
|
apiBaseUrl: string;
|
|
@@ -110,7 +111,9 @@ export declare class GroupsService {
|
|
|
110
111
|
rosterFunctionType: RosterFunctionType;
|
|
111
112
|
userGroupPermissions: GroupPermission[];
|
|
112
113
|
groupTypes: GroupTypeConfiguration[];
|
|
113
|
-
|
|
114
|
+
isParentGroupChanged: boolean;
|
|
115
|
+
userInfo: UserDetails;
|
|
116
|
+
constructor(httpService: HttpService, userPermissionsService: UserPermissionsService, groupPermissionsService: GroupPermissionsMapService, alertService: AlertsService);
|
|
114
117
|
setAppConfig(apiBaseUrl: string, userPermission: any): void;
|
|
115
118
|
/**
|
|
116
119
|
* Gets application group types from API and returns it as an observable.
|
|
@@ -118,6 +121,13 @@ export declare class GroupsService {
|
|
|
118
121
|
* @memberof GroupsService
|
|
119
122
|
*/
|
|
120
123
|
getGroupTypes(): Observable<GroupTypeResponse>;
|
|
124
|
+
/**
|
|
125
|
+
* Get allowed parent groups from API and returns it as an observable.
|
|
126
|
+
* @param {string} groupId
|
|
127
|
+
* @return {Observable<GroupTypeResponse>}
|
|
128
|
+
* @memberof GroupsService
|
|
129
|
+
*/
|
|
130
|
+
getAllowedParentGroups(groupId: string): Observable<ParentGroupsInfo[]>;
|
|
121
131
|
/**
|
|
122
132
|
* Returns all the groups based on passed group Id and group type.
|
|
123
133
|
* @param {GetGroupsPayload} getGroupsPayload
|
|
@@ -331,13 +341,27 @@ export declare class GroupsService {
|
|
|
331
341
|
* @memberof GroupsService
|
|
332
342
|
*/
|
|
333
343
|
getUserGroupPermissions(): GroupPermission[];
|
|
344
|
+
/**
|
|
345
|
+
* Sets the logged In user Info
|
|
346
|
+
* @param {UserDetails} userInfo
|
|
347
|
+
* @memberof GroupsService
|
|
348
|
+
*/
|
|
349
|
+
setUserInfo(userInfo: UserDetails): void;
|
|
350
|
+
/**
|
|
351
|
+
* Returns the logged in user Info
|
|
352
|
+
* @return {User}
|
|
353
|
+
* @memberof GroupsService
|
|
354
|
+
*/
|
|
355
|
+
getUserInfo(): UserDetails;
|
|
334
356
|
/**
|
|
335
357
|
* Validates permission based access for provided feature.
|
|
358
|
+
* Checks for group level permissions, and provides access based on individual group permissions.
|
|
359
|
+
* For global permissions provides access across the individual groups or System groups.
|
|
336
360
|
* @param {PermissionType} permissionType
|
|
337
361
|
* @return {boolean}
|
|
338
362
|
* @memberof GroupsService
|
|
339
363
|
*/
|
|
340
|
-
validateAccess(permissionType: PermissionType): boolean;
|
|
364
|
+
validateAccess(permissionType: PermissionType, permissions?: UserPermission[] | null): boolean;
|
|
341
365
|
/**
|
|
342
366
|
* Store the loaded group types.
|
|
343
367
|
* @param {GroupTypeConfiguration[]} groupTypes
|
|
@@ -372,6 +396,18 @@ export declare class GroupsService {
|
|
|
372
396
|
* @memberof GroupsService
|
|
373
397
|
*/
|
|
374
398
|
isSubmitButtonDisabled(groupRosterType: GroupRosterType, formStatus: FormControlStatus, selectedUserRoles: string[]): boolean;
|
|
399
|
+
/**
|
|
400
|
+
* Sets isParentGroupChanged true or false.
|
|
401
|
+
* @param {boolean} isParentGroupChanged
|
|
402
|
+
* @memberof GroupsService
|
|
403
|
+
*/
|
|
404
|
+
setParentGroupChangeStatus(isParentGroupChanged: boolean): void;
|
|
405
|
+
/**
|
|
406
|
+
* Returns isParentGroupChanged value.
|
|
407
|
+
* @return {boolean}
|
|
408
|
+
* @memberof GroupsService
|
|
409
|
+
*/
|
|
410
|
+
getParentGroupChangeStatus(): boolean;
|
|
375
411
|
static ɵfac: i0.ɵɵFactoryDeclaration<GroupsService, never>;
|
|
376
412
|
static ɵprov: i0.ɵɵInjectableDeclaration<GroupsService>;
|
|
377
413
|
}
|
|
@@ -19,7 +19,7 @@ export declare class UserPermissionsService {
|
|
|
19
19
|
* @return {GroupPermissions[]}
|
|
20
20
|
* @memberof UserPermissionsService
|
|
21
21
|
*/
|
|
22
|
-
filterUserGroupPermissions(userPermissions: UserPermission[]): GroupPermission[];
|
|
22
|
+
filterUserGroupPermissions(userPermissions: UserPermission[], groupPermissions: GroupPermission[]): GroupPermission[];
|
|
23
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserPermissionsService, never>;
|
|
24
24
|
static ɵprov: i0.ɵɵInjectableDeclaration<UserPermissionsService>;
|
|
25
25
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ieeesa-npm/groups",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.8",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^16.1.0",
|
|
6
6
|
"@angular/core": "^16.1.0",
|
|
7
|
-
"@ieeesa-npm/presentation": "^0.11.
|
|
8
|
-
"@ieeesa-npm/shared-styles": "^0.2.
|
|
9
|
-
"@ieeesa-npm/utility": "^0.10.
|
|
7
|
+
"@ieeesa-npm/presentation": "^0.11.2",
|
|
8
|
+
"@ieeesa-npm/shared-styles": "^0.2.6",
|
|
9
|
+
"@ieeesa-npm/utility": "^0.10.1"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"tslib": "^2.3.0"
|
package/public-api.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * from './lib/models/organization.model';
|
|
|
20
20
|
export * from './lib/models/member-type.model';
|
|
21
21
|
export * from './lib/models/roster-type.model';
|
|
22
22
|
export * from './lib/models/table-column-schema-user-group.model';
|
|
23
|
+
export * from './lib/models/parent-groups-info.model';
|
|
23
24
|
export * from './lib/services/groups.service';
|
|
24
25
|
export * from './lib/assets/form-validations';
|
|
25
26
|
export * from './lib/groups.module';
|