@ieeesa-npm/groups 0.9.9 → 0.10.0

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,27 +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
- * Adds/removes new parent group selection options whenever Change Parent Group slider is toggled.
204
- * @param {SlideToggleOption} toggle
205
- * @return -returns nothing
206
- * @memberof CreateGroupComponent
207
- */
208
- onFormSlideToggleChange(toggle: SlideToggleOption): void;
209
- /**
210
- * Handles create group form change event.
211
- * @param {FormGroup[]} form
212
- * @return -returns nothing
213
- * @memberof CreateGroupComponent
214
- */
215
- onCreateGroupFormChange(form: FormGroup[]): void;
216
173
  /**
217
174
  * NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
218
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
  }
@@ -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.
@@ -34,6 +33,12 @@ export declare class GroupsService {
34
33
  alertService: AlertsService;
35
34
  groupsText: {
36
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
+ */
37
42
  ER1001: string;
38
43
  "1001": string;
39
44
  "1002": string;
@@ -49,7 +54,11 @@ export declare class GroupsService {
49
54
  "1012": string;
50
55
  "1013": string;
51
56
  "1014": string;
52
- "1015": string;
57
+ "1015": string; /**
58
+ * Sets group function type.
59
+ * @param {GroupFunctionType} groupFunctionType -group function type.
60
+ * @memberof GroupsService
61
+ */
53
62
  "1016": string;
54
63
  "1017": string;
55
64
  "1018": string;
@@ -58,6 +67,12 @@ export declare class GroupsService {
58
67
  "1021": string;
59
68
  "1022": string;
60
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
+ */
61
76
  "1024": string;
62
77
  "1025": string;
63
78
  "1026": string;
@@ -87,12 +102,6 @@ export declare class GroupsService {
87
102
  "2021": string;
88
103
  "2022": string;
89
104
  "2023": string;
90
- /**
91
- * Gets the group users based on searched name or email
92
- * @param {SearchUsersPayload} payload
93
- * @return {Observable<GetGroupUsersResponse>}
94
- * @memberof GroupsService
95
- */
96
105
  "3004": string;
97
106
  };
98
107
  apiBaseUrl: string;
@@ -107,7 +116,6 @@ export declare class GroupsService {
107
116
  rosterFunctionType: RosterFunctionType;
108
117
  userGroupPermissions: GroupPermission[];
109
118
  groupTypes: GroupTypeConfiguration[];
110
- isParentGroupChanged: boolean;
111
119
  constructor(httpService: HttpService, userPermissionsService: UserPermissionsService, alertService: AlertsService);
112
120
  setAppConfig(apiBaseUrl: string, userPermission: any): void;
113
121
  /**
@@ -116,13 +124,6 @@ export declare class GroupsService {
116
124
  * @memberof GroupsService
117
125
  */
118
126
  getGroupTypes(): Observable<GroupTypeResponse>;
119
- /**
120
- * Get allowed parent groups from API and returns it as an observable.
121
- * @param {string} groupId
122
- * @return {Observable<GroupTypeResponse>}
123
- * @memberof GroupsService
124
- */
125
- getAllowedParentGroups(groupId: string): Observable<ParentGroupsInfo[]>;
126
127
  /**
127
128
  * Returns all the groups based on passed group Id and group type.
128
129
  * @param {GetGroupsPayload} getGroupsPayload
@@ -377,18 +378,6 @@ export declare class GroupsService {
377
378
  * @memberof GroupsService
378
379
  */
379
380
  isSubmitButtonDisabled(groupRosterType: GroupRosterType, formStatus: FormControlStatus, selectedUserRoles: string[]): boolean;
380
- /**
381
- * Sets isParentGroupChanged true or false.
382
- * @param {boolean} isParentGroupChanged
383
- * @memberof GroupsService
384
- */
385
- setParentGroupChangeStatus(isParentGroupChanged: boolean): void;
386
- /**
387
- * Returns isParentGroupChanged value.
388
- * @return {boolean}
389
- * @memberof GroupsService
390
- */
391
- getParentGroupChangeStatus(): boolean;
392
381
  static ɵfac: i0.ɵɵFactoryDeclaration<GroupsService, never>;
393
382
  static ɵprov: i0.ɵɵInjectableDeclaration<GroupsService>;
394
383
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ieeesa-npm/groups",
3
- "version": "0.9.9",
3
+ "version": "0.10.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0",
7
- "@ieeesa-npm/presentation": "^0.10.5",
7
+ "@ieeesa-npm/presentation": "^0.10.7",
8
8
  "@ieeesa-npm/shared-styles": "^0.2.5",
9
- "@ieeesa-npm/utility": "^0.9.5"
9
+ "@ieeesa-npm/utility": "^0.9.6"
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
- }