@ieeesa-npm/groups 0.10.7 → 0.10.9
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 +2 -1
- package/esm2022/lib/components/add-user-roster/add-user-roster.component.mjs +6 -5
- package/esm2022/lib/components/edit-user-roles/edit-user-roles.component.mjs +9 -4
- package/esm2022/lib/components/view-roster/view-roster.component.mjs +31 -23
- package/esm2022/lib/groups.component.mjs +5 -2
- package/esm2022/lib/models/group-user-info.model.mjs +1 -1
- package/esm2022/lib/models/user.model.mjs +1 -1
- package/esm2022/lib/services/groups.service.mjs +27 -1
- package/fesm2022/ieeesa-npm-groups.mjs +72 -29
- package/fesm2022/ieeesa-npm-groups.mjs.map +1 -1
- package/lib/components/add-user-roster/add-user-roster.component.d.ts +3 -3
- package/lib/components/edit-user-roles/edit-user-roles.component.d.ts +1 -1
- package/lib/components/view-roster/view-roster.component.d.ts +2 -1
- package/lib/groups.component.d.ts +3 -1
- package/lib/models/group-user-info.model.d.ts +1 -0
- package/lib/models/user.model.d.ts +10 -0
- package/lib/services/groups.service.d.ts +32 -14
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
|
-
import {
|
|
4
|
+
import { AlertType, AlertsService, GlobalErrorHandlerService } from '@ieeesa-npm/utility';
|
|
5
5
|
import { FormGrid, AlignType, CheckboxOption, SelectOption, FormModel, FieldConfig, DynamicFormComponent } from '@ieeesa-npm/presentation';
|
|
6
6
|
import { GroupsService } from '../../services/groups.service';
|
|
7
7
|
import { AddOrEditUserIndividualRosterPayload, AddOrEditUserPayload } from '../../models/add-or-edit-user-group.model';
|
|
@@ -74,7 +74,7 @@ export declare class AddUserRosterComponent implements OnInit, OnDestroy {
|
|
|
74
74
|
*/
|
|
75
75
|
validateUserExistence(): void;
|
|
76
76
|
/**
|
|
77
|
-
* Initialize form
|
|
77
|
+
* Initialize the form fields required for add new user to the roster based on the searched email.
|
|
78
78
|
* @memberof AddUserRosterComponent
|
|
79
79
|
*/
|
|
80
80
|
initializeAddUserFormGroup(): void;
|
|
@@ -195,7 +195,7 @@ export declare class AddUserRosterComponent implements OnInit, OnDestroy {
|
|
|
195
195
|
* @return -returns nothing
|
|
196
196
|
* @memberof AddUserRosterComponent
|
|
197
197
|
*/
|
|
198
|
-
showAlertMessage(message: string | string[], alertType: AlertType): void;
|
|
198
|
+
showAlertMessage(message: string | string[], alertType: AlertType, isHtmlContent?: boolean): void;
|
|
199
199
|
/**
|
|
200
200
|
* NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
|
|
201
201
|
* @memberof AddUserRosterComponent
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { GroupsService } from '../../services/groups.service';
|
|
3
|
-
import { AlignType, CheckboxOption, FieldConfig, FormGrid, FormModel, SelectOption
|
|
3
|
+
import { AlignType, CheckboxOption, DynamicFormComponent, FieldConfig, FormGrid, FormModel, SelectOption } from '@ieeesa-npm/presentation';
|
|
4
4
|
import { FormGroup } from '@angular/forms';
|
|
5
5
|
import { GroupUserInfo } from '../../models/group-user-info.model';
|
|
6
6
|
import { Subject } from 'rxjs';
|
|
@@ -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, LoggedInUserInfo } 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: LoggedInUserInfo;
|
|
54
55
|
constructor(dialog: MatDialog, groupService: GroupsService, alertService: AlertsService, cdr: ChangeDetectorRef, globalErrorHandlerService: GlobalErrorHandlerService);
|
|
55
56
|
ngOnInit(): void;
|
|
56
57
|
/**
|
|
@@ -14,6 +14,7 @@ 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
16
|
import { GroupPermissionsMapService } from './services/group-permissions-map-service';
|
|
17
|
+
import { LoggedInUserInfo } from './models/user.model';
|
|
17
18
|
import * as i0 from "@angular/core";
|
|
18
19
|
/**
|
|
19
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.
|
|
@@ -59,6 +60,7 @@ export declare class GroupsComponent implements OnInit, OnDestroy {
|
|
|
59
60
|
applicationId: string;
|
|
60
61
|
apiBaseURL: string;
|
|
61
62
|
userPermissions: UserPermission[];
|
|
63
|
+
userInfo: LoggedInUserInfo;
|
|
62
64
|
permissionType: typeof PermissionType;
|
|
63
65
|
functionType: GroupFunctionType;
|
|
64
66
|
alignmentType: typeof AlignType;
|
|
@@ -202,5 +204,5 @@ export declare class GroupsComponent implements OnInit, OnDestroy {
|
|
|
202
204
|
*/
|
|
203
205
|
ngOnDestroy(): void;
|
|
204
206
|
static ɵfac: i0.ɵɵFactoryDeclaration<GroupsComponent, never>;
|
|
205
|
-
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>;
|
|
206
208
|
}
|
|
@@ -12,6 +12,7 @@ export interface User {
|
|
|
12
12
|
organization: string | null;
|
|
13
13
|
employer: string | null;
|
|
14
14
|
checked?: boolean;
|
|
15
|
+
canDelete?: boolean;
|
|
15
16
|
}
|
|
16
17
|
export interface Employer {
|
|
17
18
|
orgId: string | null;
|
|
@@ -29,6 +30,7 @@ export interface GetGroupUsersResponse {
|
|
|
29
30
|
memberStatus: MemberType | null;
|
|
30
31
|
organization: Organization | null;
|
|
31
32
|
employer: Employer | null;
|
|
33
|
+
canDelete?: boolean;
|
|
32
34
|
}[];
|
|
33
35
|
}
|
|
34
36
|
export interface FilterUsersPayload {
|
|
@@ -48,3 +50,11 @@ export interface SearchUsersPayload {
|
|
|
48
50
|
ascendingOrder: boolean;
|
|
49
51
|
};
|
|
50
52
|
}
|
|
53
|
+
export interface LoggedInUserInfo {
|
|
54
|
+
appId: string;
|
|
55
|
+
userId: string;
|
|
56
|
+
ssoId: string;
|
|
57
|
+
firstName: string;
|
|
58
|
+
lastName: string;
|
|
59
|
+
email: string;
|
|
60
|
+
}
|
|
@@ -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, LoggedInUserInfo } 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';
|
|
@@ -54,7 +54,11 @@ export declare class GroupsService {
|
|
|
54
54
|
"1015": string;
|
|
55
55
|
"1016": string;
|
|
56
56
|
"1017": string;
|
|
57
|
-
"1018": string;
|
|
57
|
+
"1018": string; /**
|
|
58
|
+
* Returns the selected group parent group info.
|
|
59
|
+
* @return {(GroupInfo | undefined)} -group info.
|
|
60
|
+
* @memberof GroupsService
|
|
61
|
+
*/
|
|
58
62
|
"1019": string;
|
|
59
63
|
"1020": string;
|
|
60
64
|
"1021": string;
|
|
@@ -66,20 +70,21 @@ export declare class GroupsService {
|
|
|
66
70
|
"1027": string;
|
|
67
71
|
"1028": string;
|
|
68
72
|
"1029": string;
|
|
73
|
+
/**
|
|
74
|
+
* Returns group function type.
|
|
75
|
+
* @return {GroupFunctionType} -group function type.
|
|
76
|
+
* @memberof GroupsService
|
|
77
|
+
*/
|
|
69
78
|
"1030": string;
|
|
70
79
|
"1031": string;
|
|
71
80
|
"1032": string;
|
|
72
|
-
"1033": string;
|
|
73
|
-
* Gets the group users for the given group id.
|
|
74
|
-
* @param {string} groupId
|
|
75
|
-
* @return {Observable<GetGroupUsersResponse>}
|
|
76
|
-
* @memberof GroupsService
|
|
77
|
-
*/
|
|
81
|
+
"1033": string;
|
|
78
82
|
"1034": string;
|
|
79
83
|
"1035": string;
|
|
80
84
|
"1036": string;
|
|
81
85
|
"1037": string;
|
|
82
86
|
"1038": string;
|
|
87
|
+
"1039": string;
|
|
83
88
|
"2001": string;
|
|
84
89
|
"2002": string;
|
|
85
90
|
"2010": string;
|
|
@@ -97,12 +102,6 @@ export declare class GroupsService {
|
|
|
97
102
|
"2022": string;
|
|
98
103
|
"2023": string;
|
|
99
104
|
"2024": string;
|
|
100
|
-
/**
|
|
101
|
-
* Gets the group users based on searched name or email
|
|
102
|
-
* @param {SearchUsersPayload} payload
|
|
103
|
-
* @return {Observable<GetGroupUsersResponse>}
|
|
104
|
-
* @memberof GroupsService
|
|
105
|
-
*/
|
|
106
105
|
"3004": string;
|
|
107
106
|
};
|
|
108
107
|
apiBaseUrl: string;
|
|
@@ -118,6 +117,7 @@ export declare class GroupsService {
|
|
|
118
117
|
userGroupPermissions: GroupPermission[];
|
|
119
118
|
groupTypes: GroupTypeConfiguration[];
|
|
120
119
|
isParentGroupChanged: boolean;
|
|
120
|
+
userInfo: LoggedInUserInfo;
|
|
121
121
|
constructor(httpService: HttpService, userPermissionsService: UserPermissionsService, groupPermissionsService: GroupPermissionsMapService, alertService: AlertsService);
|
|
122
122
|
setAppConfig(apiBaseUrl: string, userPermission: any): void;
|
|
123
123
|
/**
|
|
@@ -247,6 +247,12 @@ export declare class GroupsService {
|
|
|
247
247
|
* @memberof GroupsService
|
|
248
248
|
*/
|
|
249
249
|
getMemberTypes(): Observable<MemberTypeResponse>;
|
|
250
|
+
/**
|
|
251
|
+
* Returns the true if logged in user is admin.
|
|
252
|
+
* @return {boolean}
|
|
253
|
+
* @memberof GroupsService
|
|
254
|
+
*/
|
|
255
|
+
isAdminUser(): boolean;
|
|
250
256
|
/**
|
|
251
257
|
* Concatenates the group users assigned roles name separated by comma as string and returns the group users in an array.
|
|
252
258
|
* @param {GetGroupUsersResponse} response
|
|
@@ -346,6 +352,18 @@ export declare class GroupsService {
|
|
|
346
352
|
* @memberof GroupsService
|
|
347
353
|
*/
|
|
348
354
|
getUserGroupPermissions(): GroupPermission[];
|
|
355
|
+
/**
|
|
356
|
+
* Sets the logged In user information.
|
|
357
|
+
* @param {LoggedInUserInfo} userInfo
|
|
358
|
+
* @memberof GroupsService
|
|
359
|
+
*/
|
|
360
|
+
setUserInfo(userInfo: LoggedInUserInfo): void;
|
|
361
|
+
/**
|
|
362
|
+
* Returns the logged in user information.
|
|
363
|
+
* @return {LoggedInUserInfo}
|
|
364
|
+
* @memberof GroupsService
|
|
365
|
+
*/
|
|
366
|
+
getUserInfo(): LoggedInUserInfo;
|
|
349
367
|
/**
|
|
350
368
|
* Validates permission based access for provided feature.
|
|
351
369
|
* Checks for group level permissions, and provides access based on individual group permissions.
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ieeesa-npm/groups",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.9",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^16.1.0",
|
|
6
6
|
"@angular/core": "^16.1.0",
|
|
7
|
-
"@ieeesa-npm/presentation": "^0.11.
|
|
7
|
+
"@ieeesa-npm/presentation": "^0.11.6",
|
|
8
8
|
"@ieeesa-npm/shared-styles": "^0.2.6",
|
|
9
|
-
"@ieeesa-npm/utility": "^0.
|
|
9
|
+
"@ieeesa-npm/utility": "^0.10.4"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"tslib": "^2.3.0"
|