@ieeesa-npm/groups 0.10.4 → 0.10.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.
@@ -1,16 +1,15 @@
1
1
  import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { FormGroup } from '@angular/forms';
3
- import { FormGrid, FormModel, SelectOption, AlignType, DynamicFormComponent, FieldConfig, SlideToggleOption } from '@ieeesa-npm/presentation';
3
+ import { FormGrid, FormModel, SelectOption, AlignType, FieldConfig } 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';
11
10
  import * as i0 from "@angular/core";
12
11
  /**
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.
12
+ * CreateGroupComponent uses DynamicFormComponent to build create new group form and implement the functionalities of submission of form and handling success and error scenarios.
14
13
  * @class CreateGroupComponent
15
14
  * @implements {OnInit}
16
15
  * @implements {OnDestroy}
@@ -34,8 +33,6 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
34
33
  heading: string;
35
34
  label: {
36
35
  parentGroup: string;
37
- changeParentGroup: string;
38
- newParentGroup: string;
39
36
  groupType: string;
40
37
  groupName: string;
41
38
  shortName: string;
@@ -44,17 +41,12 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
44
41
  leftButtonLabel: string;
45
42
  ariaLabel: {
46
43
  parentGroup: string;
47
- changeParentGroup: string;
48
- newParentGroup: string;
49
44
  groupType: string;
50
45
  groupName: string;
51
46
  shortName: string;
52
47
  groupScope: string;
53
48
  };
54
49
  ariaDescribedById: {
55
- parentGroup: string;
56
- changeParentGroup: string;
57
- newParentGroup: string;
58
50
  groupType: string;
59
51
  groupName: string;
60
52
  shortName: string;
@@ -86,7 +78,6 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
86
78
  };
87
79
  };
88
80
  supportText: {
89
- newParentGroup: string;
90
81
  groupType: string;
91
82
  groupName: string;
92
83
  shortName: string;
@@ -106,11 +97,6 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
106
97
  selectedGroupInfo: GroupInfo | undefined;
107
98
  groupFunctionType: GroupFunctionType;
108
99
  selectedGroupParentInfo: GroupInfo | undefined;
109
- allowedParentGroups: ParentGroupsInfo[];
110
- allowedParentGroupsOptions: SelectOption[];
111
- isParentGroupChanged: boolean;
112
- slideToggleOption: SlideToggleOption;
113
- dynamicFormComponent: DynamicFormComponent;
114
100
  constructor(groupsService: GroupsService, globalErrorHandlerService: GlobalErrorHandlerService, alertService: AlertsService);
115
101
  /**
116
102
  * Initialize the create group form group array and component.
@@ -128,7 +114,7 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
128
114
  * Initialize the create group form group array.
129
115
  * @memberof CreateGroupComponent
130
116
  */
131
- createFormGroup(formValue?: any): void;
117
+ createFormGroup(): void;
132
118
  /**
133
119
  * Update the create sub group form group array.
134
120
  * @param {GroupInfo} parentGroupInfo -Parent group info.
@@ -136,14 +122,6 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
136
122
  * @memberof CreateGroupComponent
137
123
  */
138
124
  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;
147
125
  /**
148
126
  * Handles client side validation and calls create group or edit group methods.
149
127
  * @param {FormGroup[]} form -Array of formGroup
@@ -160,7 +138,7 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
160
138
  createGroup(formData: any): void;
161
139
  /**
162
140
  * Constructs edit group payload and calls edit group API and emits create group API response.
163
- * @param formData
141
+ * @param {*} formData
164
142
  * @return -returns nothing
165
143
  * @memberof CreateGroupComponent
166
144
  */
@@ -192,35 +170,6 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
192
170
  * @memberof CreateGroupComponent
193
171
  */
194
172
  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;
224
173
  /**
225
174
  * NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
226
175
  * @memberof CreateGroupComponent
@@ -5,7 +5,6 @@ export declare enum GroupFunctionType {
5
5
  FILTER = "FILTER",
6
6
  TOGGLE = "TOGGLE",
7
7
  SEARCH = "SEARCH",
8
- REASSIGN_PARENT_GROUP = "REASSIGN_PARENT_GROUP",
9
8
  EDIT_ROSTER_USER_ROLE = "EDIT_ROSTER_USER_ROLE",
10
9
  ADD_USER_TO_ROSTER = "ADD_USER_TO_ROSTER"
11
10
  }
@@ -13,10 +13,6 @@ export interface User {
13
13
  employer: string | null;
14
14
  checked?: boolean;
15
15
  }
16
- export interface Employer {
17
- orgId: string | null;
18
- orgName: string | null;
19
- }
20
16
  export interface GetGroupUsersResponse {
21
17
  status: boolean;
22
18
  message: string;
@@ -28,7 +24,7 @@ export interface GetGroupUsersResponse {
28
24
  classification: Classification | null;
29
25
  memberStatus: MemberType | null;
30
26
  organization: Organization | null;
31
- employer: Employer | null;
27
+ employer: string | null;
32
28
  }[];
33
29
  }
34
30
  export interface FilterUsersPayload {
@@ -22,7 +22,6 @@ import { FormControlStatus } from '@angular/forms';
22
22
  import { GroupPermission } from '../models/group-permissions.model';
23
23
  import { PermissionType } from '../models/permission-type.model';
24
24
  import { UserPermissionsService } from './user-permissions.service';
25
- import { ParentGroupsInfo } from '../models/parent-groups-info.model';
26
25
  import * as i0 from "@angular/core";
27
26
  /**
28
27
  * Groups service is an abstract layer and responsible for managing groups REST API calls.
@@ -38,12 +37,7 @@ export declare class GroupsService {
38
37
  "1001": string;
39
38
  "1002": string;
40
39
  "1003": string;
41
- "1004": string; /**
42
- * Sets selected group info.
43
- * @param {(GroupInfo | undefined)} selectedGroupInfo -selected group info.
44
- * @param {(GroupInfo | undefined)} [selectedGroupParentInfo] -selected parent group info.
45
- * @memberof GroupsService
46
- */
40
+ "1004": string;
47
41
  "1005": string;
48
42
  "1006": string;
49
43
  "1007": string;
@@ -51,7 +45,11 @@ export declare class GroupsService {
51
45
  "1009": string;
52
46
  "1010": string;
53
47
  "1011": string;
54
- "1012": string;
48
+ "1012": string; /**
49
+ * Returns the selected group parent group info.
50
+ * @return {(GroupInfo | undefined)} -group info.
51
+ * @memberof GroupsService
52
+ */
55
53
  "1013": string;
56
54
  "1014": string;
57
55
  "1015": string;
@@ -76,10 +74,14 @@ export declare class GroupsService {
76
74
  "1034": string;
77
75
  "1035": string;
78
76
  "1036": string;
79
- "1037": string;
80
- "1038": string;
81
77
  "2001": string;
82
78
  "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
+ */
83
85
  "2010": string;
84
86
  "2011": string;
85
87
  "20l2": string;
@@ -108,7 +110,6 @@ export declare class GroupsService {
108
110
  rosterFunctionType: RosterFunctionType;
109
111
  userGroupPermissions: GroupPermission[];
110
112
  groupTypes: GroupTypeConfiguration[];
111
- isParentGroupChanged: boolean;
112
113
  constructor(httpService: HttpService, userPermissionsService: UserPermissionsService, alertService: AlertsService);
113
114
  setAppConfig(apiBaseUrl: string, userPermission: any): void;
114
115
  /**
@@ -117,13 +118,6 @@ export declare class GroupsService {
117
118
  * @memberof GroupsService
118
119
  */
119
120
  getGroupTypes(): Observable<GroupTypeResponse>;
120
- /**
121
- * Get allowed parent groups from API and returns it as an observable.
122
- * @param {string} groupId
123
- * @return {Observable<GroupTypeResponse>}
124
- * @memberof GroupsService
125
- */
126
- getAllowedParentGroups(groupId: string): Observable<ParentGroupsInfo[]>;
127
121
  /**
128
122
  * Returns all the groups based on passed group Id and group type.
129
123
  * @param {GetGroupsPayload} getGroupsPayload
@@ -378,18 +372,6 @@ export declare class GroupsService {
378
372
  * @memberof GroupsService
379
373
  */
380
374
  isSubmitButtonDisabled(groupRosterType: GroupRosterType, formStatus: FormControlStatus, selectedUserRoles: string[]): boolean;
381
- /**
382
- * Sets isParentGroupChanged true or false.
383
- * @param {boolean} isParentGroupChanged
384
- * @memberof GroupsService
385
- */
386
- setParentGroupChangeStatus(isParentGroupChanged: boolean): void;
387
- /**
388
- * Returns isParentGroupChanged value.
389
- * @return {boolean}
390
- * @memberof GroupsService
391
- */
392
- getParentGroupChangeStatus(): boolean;
393
375
  static ɵfac: i0.ɵɵFactoryDeclaration<GroupsService, never>;
394
376
  static ɵprov: i0.ɵɵInjectableDeclaration<GroupsService>;
395
377
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ieeesa-npm/groups",
3
- "version": "0.10.4",
3
+ "version": "0.10.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0",
7
- "@ieeesa-npm/presentation": "^0.10.9",
8
- "@ieeesa-npm/shared-styles": "^0.2.6",
9
- "@ieeesa-npm/utility": "^0.9.8"
7
+ "@ieeesa-npm/presentation": "^0.11.1",
8
+ "@ieeesa-npm/shared-styles": "^0.2.7",
9
+ "@ieeesa-npm/utility": "^0.10.0"
10
10
  },
11
11
  "dependencies": {
12
12
  "tslib": "^2.3.0"
package/public-api.d.ts CHANGED
@@ -20,7 +20,6 @@ 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';
24
23
  export * from './lib/services/groups.service';
25
24
  export * from './lib/assets/form-validations';
26
25
  export * from './lib/groups.module';
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyZW50LWdyb3Vwcy1pbmZvLm1vZGVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZ3JvdXBzL3NyYy9saWIvbW9kZWxzL3BhcmVudC1ncm91cHMtaW5mby5tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBQYXJlbnRHcm91cHNJbmZvIHtcclxuICBncm91cElkOiBzdHJpbmc7XHJcbiAgZ3JvdXBOYW1lOiBzdHJpbmc7XHJcbiAgZ3JvdXBBY3JvbnltOiBzdHJpbmc7XHJcbn0iXX0=
@@ -1,5 +0,0 @@
1
- export interface ParentGroupsInfo {
2
- groupId: string;
3
- groupName: string;
4
- groupAcronym: string;
5
- }