@ieeesa-npm/groups 0.8.2 → 0.8.4
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 +13 -2
- package/esm2022/lib/assets/form-validations.mjs +3 -1
- package/esm2022/lib/components/add-user-roster/add-user-roster.component.mjs +187 -85
- package/esm2022/lib/models/add-or-edit-user-group.model.mjs +1 -1
- package/fesm2022/ieeesa-npm-groups.mjs +201 -86
- package/fesm2022/ieeesa-npm-groups.mjs.map +1 -1
- package/lib/assets/form-validations.d.ts +1 -0
- package/lib/components/add-user-roster/add-user-roster.component.d.ts +32 -2
- package/lib/models/add-or-edit-user-group.model.d.ts +3 -1
- package/lib/services/groups.service.d.ts +25 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
|
-
import { AlertsService, GlobalErrorHandlerService } from '@ieeesa-npm/utility';
|
|
4
|
+
import { AlertsService, AlertType, 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';
|
|
@@ -40,6 +40,7 @@ export declare class AddUserRosterComponent implements OnInit, OnDestroy {
|
|
|
40
40
|
organizations: SelectOption[];
|
|
41
41
|
hasClassification: boolean;
|
|
42
42
|
groupRosterType: GroupRosterType;
|
|
43
|
+
isUserExist: boolean;
|
|
43
44
|
dynamicFormComponent: DynamicFormComponent;
|
|
44
45
|
submitFormResponse: EventEmitter<any>;
|
|
45
46
|
formCancel: EventEmitter<any>;
|
|
@@ -71,11 +72,32 @@ export declare class AddUserRosterComponent implements OnInit, OnDestroy {
|
|
|
71
72
|
* @memberof AddUserRosterComponent
|
|
72
73
|
*/
|
|
73
74
|
validateUserExistence(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Creates add user form group and updates it with prev form values.
|
|
77
|
+
* @param {string} stringifiedAddUserFormPrevValues
|
|
78
|
+
* @memberof AddUserRosterComponent
|
|
79
|
+
*/
|
|
80
|
+
updateAddUserFormGroupValues(addUserFormValues: string): void;
|
|
81
|
+
/**
|
|
82
|
+
* Initialize the add user form group array.
|
|
83
|
+
* @param {string} [email]
|
|
84
|
+
* @memberof AddUserRosterComponent
|
|
85
|
+
*/
|
|
86
|
+
createAddUserFormGroup(email?: string): void;
|
|
74
87
|
/**
|
|
75
88
|
* Adds classification, Member Type and Representing Organization form controls while adding new user to an individual group roster.
|
|
89
|
+
* @param {{
|
|
90
|
+
* classification: SelectOption;
|
|
91
|
+
* memberType: SelectOption;
|
|
92
|
+
* representingOrg: SelectOption;
|
|
93
|
+
* }} [addUserFormGroupPrevValues]
|
|
76
94
|
* @memberof AddUserRosterComponent
|
|
77
95
|
*/
|
|
78
|
-
updateAddUserFormGroup(
|
|
96
|
+
updateAddUserFormGroup(addUserFormGroupPrevValues?: {
|
|
97
|
+
classification: SelectOption;
|
|
98
|
+
memberType: SelectOption;
|
|
99
|
+
representingOrg: SelectOption;
|
|
100
|
+
}): void;
|
|
79
101
|
/**
|
|
80
102
|
* Updates the add user form group controls by adding fieldConfig at required index.
|
|
81
103
|
* @param {number} indexPosition
|
|
@@ -160,6 +182,14 @@ export declare class AddUserRosterComponent implements OnInit, OnDestroy {
|
|
|
160
182
|
* @memberof AddUserRosterComponent
|
|
161
183
|
*/
|
|
162
184
|
disableSubmitButton(): void;
|
|
185
|
+
/**
|
|
186
|
+
* Handles alerts for error, warning.
|
|
187
|
+
* @param {(string | string[])} message -error or warning message
|
|
188
|
+
* @param {AlertType} alertType
|
|
189
|
+
* @return -returns nothing
|
|
190
|
+
* @memberof AddUserRosterComponent
|
|
191
|
+
*/
|
|
192
|
+
showAlertMessage(message: string | string[], alertType: AlertType): void;
|
|
163
193
|
/**
|
|
164
194
|
* NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
|
|
165
195
|
* @memberof AddUserRosterComponent
|
|
@@ -7,9 +7,11 @@ export interface AddOrEditGroupUserDetailsResponse {
|
|
|
7
7
|
}
|
|
8
8
|
export interface AddOrEditUserRolePayload {
|
|
9
9
|
groupId: string;
|
|
10
|
-
userId
|
|
10
|
+
userId?: string;
|
|
11
11
|
roles: string[];
|
|
12
12
|
email: string;
|
|
13
|
+
firstName?: string;
|
|
14
|
+
lastName?: string;
|
|
13
15
|
}
|
|
14
16
|
export interface AddOrEditIndividualRosterPayload extends AddOrEditUserRolePayload {
|
|
15
17
|
classification?: {
|
|
@@ -33,6 +33,12 @@ export declare class GroupsService {
|
|
|
33
33
|
alertService: AlertsService;
|
|
34
34
|
groupsText: {
|
|
35
35
|
ER1000: string;
|
|
36
|
+
/**
|
|
37
|
+
* Sets selected group info.
|
|
38
|
+
* @param {(GroupInfo | undefined)} selectedGroupInfo -selected group info.
|
|
39
|
+
* @param {(GroupInfo | undefined)} [selectedGroupParentInfo] -selected parent group info.
|
|
40
|
+
* @memberof GroupsService
|
|
41
|
+
*/
|
|
36
42
|
ER1001: string;
|
|
37
43
|
"1001": string;
|
|
38
44
|
"1002": string;
|
|
@@ -48,7 +54,11 @@ export declare class GroupsService {
|
|
|
48
54
|
"1012": string;
|
|
49
55
|
"1013": string;
|
|
50
56
|
"1014": string;
|
|
51
|
-
"1015": string;
|
|
57
|
+
"1015": string; /**
|
|
58
|
+
* Sets group function type.
|
|
59
|
+
* @param {GroupFunctionType} groupFunctionType -group function type.
|
|
60
|
+
* @memberof GroupsService
|
|
61
|
+
*/
|
|
52
62
|
"1016": string;
|
|
53
63
|
"1017": string;
|
|
54
64
|
"1018": string;
|
|
@@ -57,6 +67,12 @@ export declare class GroupsService {
|
|
|
57
67
|
"1021": string;
|
|
58
68
|
"1022": string;
|
|
59
69
|
"1023": string;
|
|
70
|
+
/**
|
|
71
|
+
* Gets the group users for the given group id.
|
|
72
|
+
* @param {string} groupId
|
|
73
|
+
* @return {Observable<GetGroupUsersResponse>}
|
|
74
|
+
* @memberof GroupsService
|
|
75
|
+
*/
|
|
60
76
|
"1024": string;
|
|
61
77
|
"1025": string;
|
|
62
78
|
"1026": string;
|
|
@@ -68,6 +84,8 @@ export declare class GroupsService {
|
|
|
68
84
|
"1032": string;
|
|
69
85
|
"1033": string;
|
|
70
86
|
"1034": string;
|
|
87
|
+
"1035": string;
|
|
88
|
+
"1036": string;
|
|
71
89
|
"2001": string;
|
|
72
90
|
"2002": string;
|
|
73
91
|
"2010": string;
|
|
@@ -79,6 +97,12 @@ export declare class GroupsService {
|
|
|
79
97
|
"2016": string;
|
|
80
98
|
"2017": string;
|
|
81
99
|
"2018": 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
|
+
*/
|
|
82
106
|
"2019": string;
|
|
83
107
|
"2020": string;
|
|
84
108
|
"2021": string;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ieeesa-npm/groups",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^16.1.0",
|
|
6
6
|
"@angular/core": "^16.1.0",
|
|
7
|
-
"@ieeesa-npm/presentation": "^0.9.
|
|
7
|
+
"@ieeesa-npm/presentation": "^0.9.5",
|
|
8
8
|
"@ieeesa-npm/shared-styles": "^0.2.1",
|
|
9
|
-
"@ieeesa-npm/utility": "^0.8.
|
|
9
|
+
"@ieeesa-npm/utility": "^0.8.5"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"tslib": "^2.3.0"
|