@ieeesa-npm/groups 0.0.1 → 0.0.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 +85 -5
- package/esm2022/lib/components/create-group/create-group.component.mjs +6 -10
- package/esm2022/lib/components/tree-view/tree-view.component.mjs +435 -0
- package/esm2022/lib/groups.component.mjs +339 -21
- package/esm2022/lib/models/delete-group.model.mjs +2 -0
- package/esm2022/lib/models/group-action.model.mjs +11 -0
- package/esm2022/lib/models/group-info.model.mjs +2 -0
- package/esm2022/lib/models/group-types.model.mjs +1 -1
- package/esm2022/lib/models/view-group.model.mjs +2 -0
- package/esm2022/lib/services/groups.service.mjs +62 -9
- package/esm2022/public-api.mjs +13 -9
- package/fesm2022/ieeesa-npm-groups.mjs +932 -40
- package/fesm2022/ieeesa-npm-groups.mjs.map +1 -1
- package/lib/components/create-group/create-group.component.d.ts +0 -4
- package/lib/components/tree-view/tree-view.component.d.ts +240 -0
- package/lib/groups.component.d.ts +105 -12
- package/lib/models/delete-group.model.d.ts +5 -0
- package/lib/models/group-action.model.d.ts +8 -0
- package/lib/models/group-info.model.d.ts +12 -0
- package/lib/models/view-group.model.d.ts +9 -0
- package/lib/services/groups.service.d.ts +38 -6
- package/package.json +4 -4
- package/public-api.d.ts +12 -8
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, EventEmitter, Component, ViewEncapsulation, Output, Input, NgModule } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { Validators } from '@angular/forms';
|
|
6
|
-
import { AlignType, FormControlType, DynamicFormComponent, ModalComponent } from '@ieeesa-npm/presentation';
|
|
7
|
-
import * as
|
|
6
|
+
import { AlignType, FormControlType, DynamicFormComponent, MenuComponent, IconButtonComponent, ModalComponent, ModalConfirmationComponent, SearchComponent, SelectComponent, LegendComponent } from '@ieeesa-npm/presentation';
|
|
7
|
+
import * as i3 from '@ieeesa-npm/utility';
|
|
8
8
|
import { AlertType, AlertsService, ModalType } from '@ieeesa-npm/utility';
|
|
9
9
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
10
|
-
import * as i1 from '@angular/material/dialog';
|
|
10
|
+
import * as i1$1 from '@angular/material/dialog';
|
|
11
11
|
import { MatDialogModule } from '@angular/material/dialog';
|
|
12
|
-
import { map, catchError, Subject, takeUntil } from 'rxjs';
|
|
12
|
+
import { map, catchError, Subject, takeUntil, BehaviorSubject, merge } from 'rxjs';
|
|
13
|
+
import { FlatTreeControl } from '@angular/cdk/tree';
|
|
14
|
+
import { takeUntil as takeUntil$1, map as map$1 } from 'rxjs/operators';
|
|
15
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
16
|
+
import * as i5 from '@angular/material/button';
|
|
17
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
18
|
+
import * as i2 from '@angular/material/tree';
|
|
19
|
+
import { MatTreeModule } from '@angular/material/tree';
|
|
13
20
|
|
|
14
21
|
var createGroup = {
|
|
15
22
|
heading: "New Group",
|
|
@@ -18,7 +25,7 @@ var createGroup = {
|
|
|
18
25
|
groupName: "Group Name",
|
|
19
26
|
shortName: "Group Short Name",
|
|
20
27
|
groupScope: "Group Scope",
|
|
21
|
-
rightButtonLabel: "
|
|
28
|
+
rightButtonLabel: "Save",
|
|
22
29
|
leftButtonLabel: "Cancel",
|
|
23
30
|
ariaLabel: {
|
|
24
31
|
groupType: "Group type required.",
|
|
@@ -51,10 +58,6 @@ var createGroup = {
|
|
|
51
58
|
groupName: "Group Name contains invalid characters. Please enter alphanumeric, special characters and whitespace only.",
|
|
52
59
|
shortName: "Group Short Name contains invalid characters. Please enter '.',',' , '/', '-' , '_' only.",
|
|
53
60
|
groupScope: "Group Scope contains invalid characters. Please enter alphanumeric, special characters and whitespace only."
|
|
54
|
-
},
|
|
55
|
-
unique: {
|
|
56
|
-
"1001": "Group Name already in use.",
|
|
57
|
-
"1002": "Group Short Name already in use."
|
|
58
61
|
}
|
|
59
62
|
},
|
|
60
63
|
success: {
|
|
@@ -68,10 +71,106 @@ var createGroup = {
|
|
|
68
71
|
groupScope: "Enter a brief description for the scope of the group."
|
|
69
72
|
}
|
|
70
73
|
};
|
|
74
|
+
var viewGroups = {
|
|
75
|
+
legend: "Legends:",
|
|
76
|
+
addGroup: "Add Group",
|
|
77
|
+
groupsTitle: "Committees",
|
|
78
|
+
groupsDescription: " View Committees, sub Committees, work groups and task groups that work for NESC revision cycle process, as well as view roasters and member details for each of the groups and sub groups.",
|
|
79
|
+
filterByLabel: "Filter by",
|
|
80
|
+
createGroupIcon: "assets/images/sprites/sprites.svg#icon-create-group-white-bg",
|
|
81
|
+
filterGroupIcon: "assets/images/sprites/sprites.svg#icon-sort",
|
|
82
|
+
treePaddingIndent: 24,
|
|
83
|
+
placeholderText: {
|
|
84
|
+
search: "Search by Group Name/Abbreviation/Type/Scope",
|
|
85
|
+
filter: "Group Type"
|
|
86
|
+
},
|
|
87
|
+
ariaLabel: {
|
|
88
|
+
add: "Add Group",
|
|
89
|
+
filter: "Filter Group",
|
|
90
|
+
search: "Group Search"
|
|
91
|
+
},
|
|
92
|
+
buttons: [
|
|
93
|
+
{
|
|
94
|
+
id: 1,
|
|
95
|
+
ariaLabel: "View Roasters",
|
|
96
|
+
label: "View Roasters",
|
|
97
|
+
toolTip: "View/Manage Roster",
|
|
98
|
+
iconURL: "assets/images/sprites/sprites.svg#icon-roster"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: 2,
|
|
102
|
+
ariaLabel: "Create Sub Group",
|
|
103
|
+
label: "Create Sub Group",
|
|
104
|
+
toolTip: "Create Sub Group",
|
|
105
|
+
iconURL: "assets/images/sprites/sprites.svg#icon-create-group"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: 3,
|
|
109
|
+
ariaLabel: "Modify Group",
|
|
110
|
+
label: "Modify Group",
|
|
111
|
+
toolTip: "Edit Group",
|
|
112
|
+
iconURL: "assets/images/sprites/sprites.svg#icon-edit-group"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: 4,
|
|
116
|
+
ariaLabel: "Remove Group",
|
|
117
|
+
label: "Remove Group",
|
|
118
|
+
toolTip: "Delete Group",
|
|
119
|
+
iconURL: "assets/images/sprites/sprites.svg#icon-remove-group"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: 5,
|
|
123
|
+
ariaLabel: "Expand Group",
|
|
124
|
+
label: "Expand Group",
|
|
125
|
+
toolTip: "Expand Group",
|
|
126
|
+
iconURL: "assets/images/sprites/sprites.svg#icon-expand-collapse-plus"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: 6,
|
|
130
|
+
ariaLabel: "Collapse Group",
|
|
131
|
+
label: "Collapse Group",
|
|
132
|
+
toolTip: "Collapse Group",
|
|
133
|
+
iconURL: "assets/images/sprites/sprites.svg#icon-expand-collapse-minus"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
};
|
|
137
|
+
var deleteGroup = {
|
|
138
|
+
message: {
|
|
139
|
+
success: {
|
|
140
|
+
deletion: " has been deleted successfully."
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
confirmationInfo: {
|
|
144
|
+
leftButtonLabel: "Cancel",
|
|
145
|
+
rightButtonLabel: "Ok",
|
|
146
|
+
promptMessage: "Are you sure you want to delete the group: "
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
var errors = {
|
|
150
|
+
"1001": "Group Name already in use.",
|
|
151
|
+
"1002": "Group Short Name already in use.",
|
|
152
|
+
"1008": "The group has either been moved or already deleted.",
|
|
153
|
+
"1009": "Unable to delete a parent group, please delete or reassign any child groups first.",
|
|
154
|
+
"1010": "Group types are not found for the tenant or application!",
|
|
155
|
+
"1011": "Groups are not found for the selected group type!",
|
|
156
|
+
"1012": "Child groups are not found for the selected parent!"
|
|
157
|
+
};
|
|
71
158
|
var constants = {
|
|
72
|
-
createGroup: createGroup
|
|
159
|
+
createGroup: createGroup,
|
|
160
|
+
viewGroups: viewGroups,
|
|
161
|
+
deleteGroup: deleteGroup,
|
|
162
|
+
errors: errors
|
|
73
163
|
};
|
|
74
164
|
|
|
165
|
+
var screenTexts = /*#__PURE__*/Object.freeze({
|
|
166
|
+
__proto__: null,
|
|
167
|
+
createGroup: createGroup,
|
|
168
|
+
default: constants,
|
|
169
|
+
deleteGroup: deleteGroup,
|
|
170
|
+
errors: errors,
|
|
171
|
+
viewGroups: viewGroups
|
|
172
|
+
});
|
|
173
|
+
|
|
75
174
|
/* eslint-disable no-useless-escape */
|
|
76
175
|
const GroupsValidationPatterns = {
|
|
77
176
|
// Group Name field regular expression, which accept Alpha Numeric, Special Characters (ASCII) and whitespace.
|
|
@@ -85,12 +184,18 @@ const GroupsValidationPatterns = {
|
|
|
85
184
|
/**
|
|
86
185
|
* Groups service is an abstract layer and responsible for managing groups REST API calls.
|
|
87
186
|
* @class GroupsService
|
|
88
|
-
* @implements {OnDestroy}
|
|
89
187
|
*/
|
|
90
188
|
class GroupsService {
|
|
91
189
|
// eslint-disable-next-line no-empty-function, no-unused-vars
|
|
92
|
-
constructor(
|
|
190
|
+
constructor(
|
|
191
|
+
// eslint-disable-next-line no-unused-vars
|
|
192
|
+
httpService,
|
|
193
|
+
// eslint-disable-next-line no-unused-vars
|
|
194
|
+
alertService // eslint-disable-next-line no-empty-function
|
|
195
|
+
) {
|
|
93
196
|
this.httpService = httpService;
|
|
197
|
+
this.alertService = alertService;
|
|
198
|
+
this.groupsText = errors;
|
|
94
199
|
}
|
|
95
200
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
96
201
|
setAppConfig(apiBaseUrl, userPermission) {
|
|
@@ -112,6 +217,38 @@ class GroupsService {
|
|
|
112
217
|
throw error;
|
|
113
218
|
}));
|
|
114
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Returns all the groups based on passed group Id and group type.
|
|
222
|
+
* @param {GetGroupsPayload} getGroupsPayload
|
|
223
|
+
* @return {Observable<GetGroupResponse>}
|
|
224
|
+
* @memberof GroupsService
|
|
225
|
+
*/
|
|
226
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
227
|
+
getAllGroups(getGroupsPayload) {
|
|
228
|
+
return this.httpService
|
|
229
|
+
.getData(`${this.apiBaseUrl}/groups`, getGroupsPayload)
|
|
230
|
+
.pipe(map((response) => {
|
|
231
|
+
return response;
|
|
232
|
+
}), catchError((errorRes) => {
|
|
233
|
+
throw errorRes;
|
|
234
|
+
}));
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Deletes a group based on the provided information
|
|
238
|
+
* @param {groupId} string -groupId of the group which is to be deleted
|
|
239
|
+
* @return {*} {Observable<any>} -Observable representing the group deletion response
|
|
240
|
+
* @memberof GroupsService
|
|
241
|
+
*/
|
|
242
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
243
|
+
deleteGroup(deleteGroupPayload) {
|
|
244
|
+
return this.httpService
|
|
245
|
+
.putData(`${this.apiBaseUrl}/groups/delete`, deleteGroupPayload)
|
|
246
|
+
.pipe(map((response) => {
|
|
247
|
+
return response;
|
|
248
|
+
}), catchError((error) => {
|
|
249
|
+
throw error;
|
|
250
|
+
}));
|
|
251
|
+
}
|
|
115
252
|
/**
|
|
116
253
|
* Posts create group form data to server using HttpService for creating new group.
|
|
117
254
|
* @param {CreateGroupPayload} createGroupPayload -create group form data which includes group name, type, short name, scope.
|
|
@@ -128,15 +265,29 @@ class GroupsService {
|
|
|
128
265
|
throw error;
|
|
129
266
|
}));
|
|
130
267
|
}
|
|
131
|
-
|
|
132
|
-
|
|
268
|
+
/**
|
|
269
|
+
* This method will parse the error codes and return the respective error message for each code.
|
|
270
|
+
* @param {string[]} errorCodes
|
|
271
|
+
* @return {string[]} errorMessage
|
|
272
|
+
* @memberof GroupsService
|
|
273
|
+
*/
|
|
274
|
+
parseErrorMessage(errorCodes) {
|
|
275
|
+
const errorMessage = [];
|
|
276
|
+
errorCodes.forEach((item, index) => {
|
|
277
|
+
const errorMessageKey = errorCodes[index];
|
|
278
|
+
errorMessage.push(this.groupsText[errorMessageKey]);
|
|
279
|
+
});
|
|
280
|
+
return errorMessage;
|
|
281
|
+
}
|
|
282
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: GroupsService, deps: [{ token: i3.HttpService }, { token: i3.AlertsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
283
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: GroupsService, providedIn: 'root' }); }
|
|
133
284
|
}
|
|
134
285
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: GroupsService, decorators: [{
|
|
135
286
|
type: Injectable,
|
|
136
287
|
args: [{
|
|
137
|
-
providedIn:
|
|
288
|
+
providedIn: 'root',
|
|
138
289
|
}]
|
|
139
|
-
}], ctorParameters: function () { return [{ type:
|
|
290
|
+
}], ctorParameters: function () { return [{ type: i3.HttpService }, { type: i3.AlertsService }]; } });
|
|
140
291
|
|
|
141
292
|
/**
|
|
142
293
|
* CreateGroupComponent uses DynamicFormComponent to build create new group form and implement the functionalities of submission of form and handling success and error scenarios.
|
|
@@ -315,7 +466,7 @@ class CreateGroupComponent {
|
|
|
315
466
|
payload: {
|
|
316
467
|
groupName: formResponse?.groupName,
|
|
317
468
|
groupShortName: formResponse?.shortName,
|
|
318
|
-
groupType: formResponse?.groupType?.
|
|
469
|
+
groupType: formResponse?.groupType?.id,
|
|
319
470
|
groupDesc: formResponse?.groupScope,
|
|
320
471
|
groupParentId: null,
|
|
321
472
|
},
|
|
@@ -332,13 +483,9 @@ class CreateGroupComponent {
|
|
|
332
483
|
error: (error) => {
|
|
333
484
|
const errorCodeArr = error?.error?.body?.errorCodes;
|
|
334
485
|
if (Array.isArray(errorCodeArr)) {
|
|
335
|
-
const errorMessage =
|
|
336
|
-
errorCodeArr.forEach((item, index) => {
|
|
337
|
-
const errorMessageKey = errorCodeArr[index];
|
|
338
|
-
errorMessage.push(this.createGroupText?.message?.error?.unique[errorMessageKey]);
|
|
339
|
-
});
|
|
486
|
+
const errorMessage = this.groupsService.parseErrorMessage(errorCodeArr);
|
|
340
487
|
this.alertService.showMessage({
|
|
341
|
-
status:
|
|
488
|
+
status: 'custom',
|
|
342
489
|
message: errorMessage,
|
|
343
490
|
alertType: AlertType.ERROR,
|
|
344
491
|
isCloseNeeded: true,
|
|
@@ -375,18 +522,450 @@ class CreateGroupComponent {
|
|
|
375
522
|
this.destroy$.next(true);
|
|
376
523
|
this.destroy$.unsubscribe();
|
|
377
524
|
}
|
|
378
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: CreateGroupComponent, deps: [{ token: GroupsService }, { token:
|
|
379
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", type: CreateGroupComponent, isStandalone: true, selector: "ieeesa-create-group", outputs: { submitFormResponse: "submitFormResponse", formCancel: "formCancel" }, providers: [AlertsService], ngImport: i0, template: "<ieeesa-dynamic-form\r\n *ngIf=\"formGroup\"\r\n [leftButtonLabel]=\"leftButtonLabel\"\r\n [rightButtonLabel]=\"rightButtonLabel\"\r\n [isLegendVisible]=\"isLegendVisible\"\r\n [colWidth]=\"colWidth\"\r\n [actionButtonAlign]=\"actionButtonAlign\"\r\n [formGroups]=\"formGroup\"\r\n [isLeftButtonNeeded]=\"isLeftButtonNeeded\"\r\n (formSubmit)=\"onFormSubmit($event)\"\r\n (formLeftButtonClicked)=\"createGroupCancelled()\"\r\n (formGroupsReference)=\"getFormGroupReference($event)\"\r\n></ieeesa-dynamic-form>", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.56em;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25em;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625em;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375em;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-sm-38{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.375em;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125em;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-md-30{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.875em;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625em;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-lg-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-md-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-title-inter-lg-bold-24{font-family:Inter Bold;font-style:normal;font-weight:700;font-size:1.5em;line-height:29px;color:#000;letter-spacing:0}.mat-mdc-button.mat-mdc-button-base.mat-primary-button,.mat-mdc-button.mat-mdc-button-base.mat-secondary-button,.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{min-width:103px;width:auto;min-height:40px;height:auto;border-radius:3px;text-align:center;padding:.625em 1.5em;border:none;font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.mat-mdc-button.mat-mdc-button-base>.mat-icon{margin-right:11px}.mat-mdc-button.mat-mdc-button-base.mat-primary-button{background-color:#00629b;color:#fff}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:hover{background-color:#003e65}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:active{background-color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:disabled{background-color:#1c1b1f1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button{color:#fff;background:#a7a8aa;box-shadow:0 1px 2px #0000004d,0 2px 6px 2px #00000026}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:hover{background:#a7a8aa}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:rgba(29,25,43,.12)}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{background-color:#fff;border:1px solid #00629b;color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:hover{background-color:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:rgba(103,80,164,.12)}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.flex-align-center{display:flex;align-items:center;justify-content:center}.mat-button-toggle-checked{background-color:#a7a8aa}.mat-button-toggle-checked .mat-button-toggle-label-content:before{font-family:\"Font Awesome 5 Free\";font-weight:900;content:\"\\f00c\";padding-right:.5625em}.mat-button-toggle-group .mat-button-toggle-label-content{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#1c1b1f;letter-spacing:.00625em}.no-bg-color-btn{color:#00629b;border-radius:3px;border:1px solid #00629b;min-height:40px;height:auto}@media (max-width: 768px){.mat-button-toggle-group .mat-button-toggle-label-content{max-width:8ch;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;position:relative}}.cdk-overlay-pane{width:100%;min-width:312px}.mat-mdc-form-field{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-modal-dialog.ieeesa-create-group .mat-mdc-dialog-container{box-shadow:none}.ieeesa-modal-dialog.ieeesa-create-group .mat-mdc-dialog-surface{border-radius:0;margin:1em 0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal{box-shadow:0 3px #11b7e5 inset,0 4px 24px #00000080;padding-bottom:.5em}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-dynamic-form__actions{flex-direction:row-reverse;gap:1.5em;padding:3em 1em .75em 0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-dynamic-form__form-field{margin-bottom:1em;padding:0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .mat-mdc-form-field-flex{width:62.5em}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field .mat-mdc-form-field{display:flex}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field .mat-mdc-text-field-wrapper{padding:.5em 1em}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field__label,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field__support-text,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-select-field__label,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-select-field__support-text{color:#49454f}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .short-name .ieeesa-input-field .mat-mdc-form-field{width:40%}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .group-type .ieeesa-select-field .mat-mdc-form-field{display:flex;width:43%}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-form-error--text{padding:.25em 1em 0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .mat-mdc-form-field-subscript-wrapper{display:none}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .mat-mdc-dialog-content{padding:1.5em 1em .75em!important}@media (max-width: 767px){.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .group-type .ieeesa-select-field .mat-mdc-form-field,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .short-name .ieeesa-input-field .mat-mdc-form-field{width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
525
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: CreateGroupComponent, deps: [{ token: GroupsService }, { token: i3.GlobalErrorHandlerService }, { token: i3.AlertsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
526
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", type: CreateGroupComponent, isStandalone: true, selector: "ieeesa-create-group", outputs: { submitFormResponse: "submitFormResponse", formCancel: "formCancel" }, providers: [AlertsService], ngImport: i0, template: "<ieeesa-dynamic-form\r\n *ngIf=\"formGroup\"\r\n [leftButtonLabel]=\"leftButtonLabel\"\r\n [rightButtonLabel]=\"rightButtonLabel\"\r\n [isLegendVisible]=\"isLegendVisible\"\r\n [colWidth]=\"colWidth\"\r\n [actionButtonAlign]=\"actionButtonAlign\"\r\n [formGroups]=\"formGroup\"\r\n [isLeftButtonNeeded]=\"isLeftButtonNeeded\"\r\n (formSubmit)=\"onFormSubmit($event)\"\r\n (formLeftButtonClicked)=\"createGroupCancelled()\"\r\n (formGroupsReference)=\"getFormGroupReference($event)\"\r\n></ieeesa-dynamic-form>", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.56em;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25em;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625em;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375em;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-sm-38{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.375em;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125em;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-md-30{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.875em;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625em;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-lg-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-md-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-title-inter-lg-bold-24{font-family:Inter Bold;font-style:normal;font-weight:700;font-size:1.5em;line-height:29px;color:#000;letter-spacing:0}.mat-mdc-button.mat-mdc-button-base.mat-primary-button,.mat-mdc-button.mat-mdc-button-base.mat-secondary-button,.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{min-width:103px;width:auto;min-height:40px;height:auto;border-radius:3px;text-align:center;padding:.625em 1.5em;border:none;font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.mat-mdc-button.mat-mdc-button-base>.mat-icon{margin-right:11px}.mat-mdc-button.mat-mdc-button-base.mat-primary-button{background-color:#00629b;color:#fff}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:hover{background-color:#003e65}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:active{background-color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:disabled{background-color:#1c1b1f1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button{color:#fff;background:#a7a8aa;box-shadow:0 1px 2px #0000004d,0 2px 6px 2px #00000026}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:hover{background:#a7a8aa}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:rgba(29,25,43,.12)}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{background-color:#fff;border:1px solid #00629b;color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:hover{background-color:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:rgba(103,80,164,.12)}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.flex-align-center{display:flex;align-items:center;justify-content:center}.mat-button-toggle-checked{background-color:#a7a8aa}.mat-button-toggle-checked .mat-button-toggle-label-content:before{font-family:\"Font Awesome 5 Free\";font-weight:900;content:\"\\f00c\";padding-right:.5625em}.mat-button-toggle-group .mat-button-toggle-label-content{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#1c1b1f;letter-spacing:.00625em}.no-bg-color-btn{color:#00629b;border-radius:3px;border:1px solid #00629b;min-height:40px;height:auto}@media (max-width: 768px){.mat-button-toggle-group .mat-button-toggle-label-content{max-width:8ch;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;position:relative}}.cdk-overlay-pane.ieeesa-modal-confirm-dialog,.cdk-overlay-pane.ieeesa-modal-dialog,.cdk-overlay-pane.ieeesa-alert-dialog{width:100%;min-width:312px}.mat-mdc-form-field{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-modal-dialog.ieeesa-create-group .mat-mdc-dialog-container{box-shadow:none}.ieeesa-modal-dialog.ieeesa-create-group .mat-mdc-dialog-surface{border-radius:0;margin:1em 0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal{box-shadow:0 3px #11b7e5 inset,0 4px 24px #00000080;padding-bottom:.5em}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-dynamic-form__actions{flex-direction:row-reverse;gap:1.5em;padding:3em 1em .75em 0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-dynamic-form__form-field{margin-bottom:1em;padding:0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .mat-mdc-form-field-flex{width:62.5em}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field .mat-mdc-form-field{display:flex}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field .mat-mdc-text-field-wrapper{padding:.5em 1em}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field__label,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field__support-text,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-select-field__label,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-select-field__support-text{color:#49454f}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .short-name .ieeesa-input-field .mat-mdc-form-field{width:40%}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .group-type .ieeesa-select-field .mat-mdc-form-field{display:flex;width:43%}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-form-error--text{padding:.25em 1em 0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .mat-mdc-form-field-subscript-wrapper{display:none}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .mat-mdc-dialog-content{padding:1.5em 1em .75em!important}@media (max-width: 767px){.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .group-type .ieeesa-select-field .mat-mdc-form-field,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .short-name .ieeesa-input-field .mat-mdc-form-field{width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DynamicFormComponent, selector: "ieeesa-dynamic-form", inputs: ["formGroups", "submitResponse", "searchResponse", "colWidth", "isLegendVisible", "rightButtonLabel", "leftButtonLabel", "isSubmitButtonDisabled", "isLeftButtonDisabled", "isLeftButtonNeeded", "actionButtonAlign"], outputs: ["formSubmit", "formChange", "formInput", "formLeftButtonClicked", "formSearchApply", "formGroupsReference", "dropdownChange", "formDateSelected", "formSelectSearch", "formControlChange", "formAutoCompleteSearch", "autoCompleteOptionSelected", "formAfterContentInit", "formSelectedDateRange"], exportAs: ["dynamicForm"] }, { kind: "ngmodule", type: MatDialogModule }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
380
527
|
}
|
|
381
528
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: CreateGroupComponent, decorators: [{
|
|
382
529
|
type: Component,
|
|
383
|
-
args: [{ selector: "ieeesa-create-group", standalone: true, imports: [CommonModule, DynamicFormComponent, MatDialogModule], encapsulation: ViewEncapsulation.None, providers: [AlertsService], template: "<ieeesa-dynamic-form\r\n *ngIf=\"formGroup\"\r\n [leftButtonLabel]=\"leftButtonLabel\"\r\n [rightButtonLabel]=\"rightButtonLabel\"\r\n [isLegendVisible]=\"isLegendVisible\"\r\n [colWidth]=\"colWidth\"\r\n [actionButtonAlign]=\"actionButtonAlign\"\r\n [formGroups]=\"formGroup\"\r\n [isLeftButtonNeeded]=\"isLeftButtonNeeded\"\r\n (formSubmit)=\"onFormSubmit($event)\"\r\n (formLeftButtonClicked)=\"createGroupCancelled()\"\r\n (formGroupsReference)=\"getFormGroupReference($event)\"\r\n></ieeesa-dynamic-form>", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.56em;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25em;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625em;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375em;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-sm-38{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.375em;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125em;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-md-30{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.875em;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625em;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-lg-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-md-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-title-inter-lg-bold-24{font-family:Inter Bold;font-style:normal;font-weight:700;font-size:1.5em;line-height:29px;color:#000;letter-spacing:0}.mat-mdc-button.mat-mdc-button-base.mat-primary-button,.mat-mdc-button.mat-mdc-button-base.mat-secondary-button,.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{min-width:103px;width:auto;min-height:40px;height:auto;border-radius:3px;text-align:center;padding:.625em 1.5em;border:none;font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.mat-mdc-button.mat-mdc-button-base>.mat-icon{margin-right:11px}.mat-mdc-button.mat-mdc-button-base.mat-primary-button{background-color:#00629b;color:#fff}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:hover{background-color:#003e65}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:active{background-color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:disabled{background-color:#1c1b1f1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button{color:#fff;background:#a7a8aa;box-shadow:0 1px 2px #0000004d,0 2px 6px 2px #00000026}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:hover{background:#a7a8aa}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:rgba(29,25,43,.12)}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{background-color:#fff;border:1px solid #00629b;color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:hover{background-color:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:rgba(103,80,164,.12)}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.flex-align-center{display:flex;align-items:center;justify-content:center}.mat-button-toggle-checked{background-color:#a7a8aa}.mat-button-toggle-checked .mat-button-toggle-label-content:before{font-family:\"Font Awesome 5 Free\";font-weight:900;content:\"\\f00c\";padding-right:.5625em}.mat-button-toggle-group .mat-button-toggle-label-content{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#1c1b1f;letter-spacing:.00625em}.no-bg-color-btn{color:#00629b;border-radius:3px;border:1px solid #00629b;min-height:40px;height:auto}@media (max-width: 768px){.mat-button-toggle-group .mat-button-toggle-label-content{max-width:8ch;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;position:relative}}.cdk-overlay-pane{width:100%;min-width:312px}.mat-mdc-form-field{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-modal-dialog.ieeesa-create-group .mat-mdc-dialog-container{box-shadow:none}.ieeesa-modal-dialog.ieeesa-create-group .mat-mdc-dialog-surface{border-radius:0;margin:1em 0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal{box-shadow:0 3px #11b7e5 inset,0 4px 24px #00000080;padding-bottom:.5em}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-dynamic-form__actions{flex-direction:row-reverse;gap:1.5em;padding:3em 1em .75em 0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-dynamic-form__form-field{margin-bottom:1em;padding:0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .mat-mdc-form-field-flex{width:62.5em}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field .mat-mdc-form-field{display:flex}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field .mat-mdc-text-field-wrapper{padding:.5em 1em}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field__label,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field__support-text,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-select-field__label,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-select-field__support-text{color:#49454f}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .short-name .ieeesa-input-field .mat-mdc-form-field{width:40%}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .group-type .ieeesa-select-field .mat-mdc-form-field{display:flex;width:43%}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-form-error--text{padding:.25em 1em 0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .mat-mdc-form-field-subscript-wrapper{display:none}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .mat-mdc-dialog-content{padding:1.5em 1em .75em!important}@media (max-width: 767px){.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .group-type .ieeesa-select-field .mat-mdc-form-field,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .short-name .ieeesa-input-field .mat-mdc-form-field{width:100%}}\n"] }]
|
|
384
|
-
}], ctorParameters: function () { return [{ type: GroupsService }, { type:
|
|
530
|
+
args: [{ selector: "ieeesa-create-group", standalone: true, imports: [CommonModule, DynamicFormComponent, MatDialogModule], encapsulation: ViewEncapsulation.None, providers: [AlertsService], template: "<ieeesa-dynamic-form\r\n *ngIf=\"formGroup\"\r\n [leftButtonLabel]=\"leftButtonLabel\"\r\n [rightButtonLabel]=\"rightButtonLabel\"\r\n [isLegendVisible]=\"isLegendVisible\"\r\n [colWidth]=\"colWidth\"\r\n [actionButtonAlign]=\"actionButtonAlign\"\r\n [formGroups]=\"formGroup\"\r\n [isLeftButtonNeeded]=\"isLeftButtonNeeded\"\r\n (formSubmit)=\"onFormSubmit($event)\"\r\n (formLeftButtonClicked)=\"createGroupCancelled()\"\r\n (formGroupsReference)=\"getFormGroupReference($event)\"\r\n></ieeesa-dynamic-form>", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.56em;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25em;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625em;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375em;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-sm-38{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.375em;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125em;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-md-30{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.875em;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625em;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-lg-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-md-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-title-inter-lg-bold-24{font-family:Inter Bold;font-style:normal;font-weight:700;font-size:1.5em;line-height:29px;color:#000;letter-spacing:0}.mat-mdc-button.mat-mdc-button-base.mat-primary-button,.mat-mdc-button.mat-mdc-button-base.mat-secondary-button,.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{min-width:103px;width:auto;min-height:40px;height:auto;border-radius:3px;text-align:center;padding:.625em 1.5em;border:none;font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.mat-mdc-button.mat-mdc-button-base>.mat-icon{margin-right:11px}.mat-mdc-button.mat-mdc-button-base.mat-primary-button{background-color:#00629b;color:#fff}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:hover{background-color:#003e65}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:active{background-color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:disabled{background-color:#1c1b1f1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button{color:#fff;background:#a7a8aa;box-shadow:0 1px 2px #0000004d,0 2px 6px 2px #00000026}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:hover{background:#a7a8aa}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:rgba(29,25,43,.12)}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{background-color:#fff;border:1px solid #00629b;color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:hover{background-color:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:rgba(103,80,164,.12)}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.flex-align-center{display:flex;align-items:center;justify-content:center}.mat-button-toggle-checked{background-color:#a7a8aa}.mat-button-toggle-checked .mat-button-toggle-label-content:before{font-family:\"Font Awesome 5 Free\";font-weight:900;content:\"\\f00c\";padding-right:.5625em}.mat-button-toggle-group .mat-button-toggle-label-content{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#1c1b1f;letter-spacing:.00625em}.no-bg-color-btn{color:#00629b;border-radius:3px;border:1px solid #00629b;min-height:40px;height:auto}@media (max-width: 768px){.mat-button-toggle-group .mat-button-toggle-label-content{max-width:8ch;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;position:relative}}.cdk-overlay-pane.ieeesa-modal-confirm-dialog,.cdk-overlay-pane.ieeesa-modal-dialog,.cdk-overlay-pane.ieeesa-alert-dialog{width:100%;min-width:312px}.mat-mdc-form-field{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-modal-dialog.ieeesa-create-group .mat-mdc-dialog-container{box-shadow:none}.ieeesa-modal-dialog.ieeesa-create-group .mat-mdc-dialog-surface{border-radius:0;margin:1em 0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal{box-shadow:0 3px #11b7e5 inset,0 4px 24px #00000080;padding-bottom:.5em}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-dynamic-form__actions{flex-direction:row-reverse;gap:1.5em;padding:3em 1em .75em 0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-dynamic-form__form-field{margin-bottom:1em;padding:0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .mat-mdc-form-field-flex{width:62.5em}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field .mat-mdc-form-field{display:flex}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field .mat-mdc-text-field-wrapper{padding:.5em 1em}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field__label,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-input-field__support-text,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-select-field__label,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-select-field__support-text{color:#49454f}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .short-name .ieeesa-input-field .mat-mdc-form-field{width:40%}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .group-type .ieeesa-select-field .mat-mdc-form-field{display:flex;width:43%}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .ieeesa-form-error--text{padding:.25em 1em 0}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .mat-mdc-form-field-subscript-wrapper{display:none}.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .mat-mdc-dialog-content{padding:1.5em 1em .75em!important}@media (max-width: 767px){.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .group-type .ieeesa-select-field .mat-mdc-form-field,.ieeesa-modal-dialog.ieeesa-create-group .ieeesa-modal .short-name .ieeesa-input-field .mat-mdc-form-field{width:100%}}\n"] }]
|
|
531
|
+
}], ctorParameters: function () { return [{ type: GroupsService }, { type: i3.GlobalErrorHandlerService }, { type: i3.AlertsService }]; }, propDecorators: { submitFormResponse: [{
|
|
385
532
|
type: Output
|
|
386
533
|
}], formCancel: [{
|
|
387
534
|
type: Output
|
|
388
535
|
}] } });
|
|
389
536
|
|
|
537
|
+
/* eslint-disable no-unused-vars */
|
|
538
|
+
var GroupAction;
|
|
539
|
+
(function (GroupAction) {
|
|
540
|
+
GroupAction[GroupAction["VIEW_ROSTER"] = 1] = "VIEW_ROSTER";
|
|
541
|
+
GroupAction[GroupAction["CREATE_SUB_GROUP"] = 2] = "CREATE_SUB_GROUP";
|
|
542
|
+
GroupAction[GroupAction["EDIT_GROUP"] = 3] = "EDIT_GROUP";
|
|
543
|
+
GroupAction[GroupAction["DELETE_GROUP"] = 4] = "DELETE_GROUP";
|
|
544
|
+
GroupAction[GroupAction["EXPAND_GROUP_VIEW"] = 5] = "EXPAND_GROUP_VIEW";
|
|
545
|
+
GroupAction[GroupAction["COLLAPSE_GROUP_VIEW"] = 6] = "COLLAPSE_GROUP_VIEW";
|
|
546
|
+
})(GroupAction || (GroupAction = {}));
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Dynamic Flat node creates a node structure
|
|
550
|
+
* @export
|
|
551
|
+
* @class GroupNode
|
|
552
|
+
*/
|
|
553
|
+
class GroupNode {
|
|
554
|
+
constructor(
|
|
555
|
+
// eslint-disable-next-line no-unused-vars
|
|
556
|
+
item,
|
|
557
|
+
// eslint-disable-next-line no-unused-vars
|
|
558
|
+
level = 1,
|
|
559
|
+
// eslint-disable-next-line no-unused-vars
|
|
560
|
+
expandable = false,
|
|
561
|
+
// eslint-disable-next-line no-unused-vars
|
|
562
|
+
isLoading = false // eslint-disable-next-line no-empty-function
|
|
563
|
+
) {
|
|
564
|
+
this.item = item;
|
|
565
|
+
this.level = level;
|
|
566
|
+
this.expandable = expandable;
|
|
567
|
+
this.isLoading = isLoading;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Groups stores the parent nodes and child nodes
|
|
572
|
+
* @export
|
|
573
|
+
* @class Groups
|
|
574
|
+
*/
|
|
575
|
+
class Groups {
|
|
576
|
+
/**
|
|
577
|
+
* Get the Child groups info
|
|
578
|
+
* @return {*} {GroupInfo[]}
|
|
579
|
+
* @memberof Groups
|
|
580
|
+
*/
|
|
581
|
+
getChildGroupsInfo() {
|
|
582
|
+
return this.childGroups;
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* Sets the Child groups info
|
|
586
|
+
* @param {GroupInfo[]} value
|
|
587
|
+
* @memberof Groups
|
|
588
|
+
*/
|
|
589
|
+
setChildGroupsInfo(value) {
|
|
590
|
+
this.childGroups = value;
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Initialize the groups data and creates the node structure for mat tree
|
|
594
|
+
* @param {GroupInfo[]} data
|
|
595
|
+
* @return {*} {GroupNode[]}
|
|
596
|
+
* @memberof Groups
|
|
597
|
+
*/
|
|
598
|
+
initialData(data) {
|
|
599
|
+
this.rootLevelNodes = data;
|
|
600
|
+
return this.rootLevelNodes.map((node) => new GroupNode(node, 0, this.isExpandable(node)));
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Checks the node is expandable or not
|
|
604
|
+
* @param {GroupInfo} node
|
|
605
|
+
* @return {*} {boolean}
|
|
606
|
+
* @memberof Groups
|
|
607
|
+
*/
|
|
608
|
+
isExpandable(node) {
|
|
609
|
+
return (!!node.children && node.children.length > 0) || node.hasChildren;
|
|
610
|
+
}
|
|
611
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: Groups, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
612
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: Groups, providedIn: 'root' }); }
|
|
613
|
+
}
|
|
614
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: Groups, decorators: [{
|
|
615
|
+
type: Injectable,
|
|
616
|
+
args: [{ providedIn: 'root' }]
|
|
617
|
+
}] });
|
|
618
|
+
/**
|
|
619
|
+
* Dynamic Data Source handles the connection with dynamic data base
|
|
620
|
+
* @export
|
|
621
|
+
* @class GroupsDataSource
|
|
622
|
+
* @implements {DataSource<GroupNode>}
|
|
623
|
+
*/
|
|
624
|
+
class GroupsDataSource {
|
|
625
|
+
/**
|
|
626
|
+
* Gets the updated tree control data
|
|
627
|
+
* @type {GroupNode[]}
|
|
628
|
+
* @memberof GroupsDataSource
|
|
629
|
+
*/
|
|
630
|
+
get data() {
|
|
631
|
+
return this.dataChange.value;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Sets the data to tree control and emit the value to intimate the data change
|
|
635
|
+
* @memberof GroupsDataSource
|
|
636
|
+
*/
|
|
637
|
+
set data(value) {
|
|
638
|
+
this.treeControl.dataNodes = value;
|
|
639
|
+
this.dataChange.next(value);
|
|
640
|
+
}
|
|
641
|
+
constructor(
|
|
642
|
+
// eslint-disable-next-line no-unused-vars
|
|
643
|
+
treeControl,
|
|
644
|
+
// eslint-disable-next-line no-unused-vars
|
|
645
|
+
database // eslint-disable-next-line no-empty-function
|
|
646
|
+
) {
|
|
647
|
+
this.treeControl = treeControl;
|
|
648
|
+
this.database = database;
|
|
649
|
+
this.destroy$ = new Subject();
|
|
650
|
+
this.dataChange = new BehaviorSubject([]);
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Handles the connection between the data base and mat tree
|
|
654
|
+
* @param {CollectionViewer} collectionViewer
|
|
655
|
+
* @return {*} {Observable<GroupNode[]>}
|
|
656
|
+
* @memberof GroupsDataSource
|
|
657
|
+
*/
|
|
658
|
+
connect(collectionViewer) {
|
|
659
|
+
this.treeControl.expansionModel.changed
|
|
660
|
+
.pipe(takeUntil$1(this.destroy$))
|
|
661
|
+
.subscribe((change) => {
|
|
662
|
+
if (change.added ||
|
|
663
|
+
change.removed) {
|
|
664
|
+
this.handleTreeControl(change);
|
|
665
|
+
}
|
|
666
|
+
});
|
|
667
|
+
return merge(collectionViewer.viewChange, this.dataChange).pipe(map$1(() => this.data));
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Disconnect the connection with mat tree
|
|
671
|
+
* @param {CollectionViewer} collectionViewer
|
|
672
|
+
* @memberof GroupsDataSource
|
|
673
|
+
*/
|
|
674
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function, no-empty-function, no-unused-vars, @typescript-eslint/no-unused-vars
|
|
675
|
+
disconnect(collectionViewer) {
|
|
676
|
+
this.destroy$.next(true);
|
|
677
|
+
this.destroy$.unsubscribe();
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* Adds/removes the child nodes while expands/collapses the parent node
|
|
681
|
+
* @param {SelectionChange<GroupNode>} change
|
|
682
|
+
* @memberof GroupsDataSource
|
|
683
|
+
*/
|
|
684
|
+
handleTreeControl(change) {
|
|
685
|
+
if (change.added) {
|
|
686
|
+
change.added.forEach((node) => this.toggleNode(node, true));
|
|
687
|
+
}
|
|
688
|
+
if (change.removed) {
|
|
689
|
+
change.removed
|
|
690
|
+
.slice()
|
|
691
|
+
.reverse()
|
|
692
|
+
.forEach((node) => this.toggleNode(node, false));
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* Toggle the node, add/removes the node from display
|
|
697
|
+
* @param {GroupNode} clickedNode
|
|
698
|
+
* @param {boolean} expand
|
|
699
|
+
* @return {*}
|
|
700
|
+
* @memberof GroupsDataSource
|
|
701
|
+
*/
|
|
702
|
+
toggleNode(clickedNode, expand) {
|
|
703
|
+
const children = this.database.getChildGroupsInfo();
|
|
704
|
+
const index = this.data.indexOf(clickedNode);
|
|
705
|
+
if (!children || index < 0) {
|
|
706
|
+
// If no children, or cannot find the node, no op
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
if (expand) {
|
|
710
|
+
const nodes = children.map((node) => new GroupNode(node, clickedNode.level + 1, this.database.isExpandable(node)));
|
|
711
|
+
this.data.splice(index + 1, 0, ...nodes);
|
|
712
|
+
}
|
|
713
|
+
else {
|
|
714
|
+
let count = 0;
|
|
715
|
+
for (let i = index + 1; i < this.data.length && this.data[i].level > clickedNode.level; i++, count++ // eslint-disable-next-line no-empty
|
|
716
|
+
) { }
|
|
717
|
+
this.data.splice(index + 1, count);
|
|
718
|
+
}
|
|
719
|
+
// Notify the change
|
|
720
|
+
this.dataChange.next(this.data);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Displays the groups where parent/child relationships are represented in a tree view/hierarchy.
|
|
725
|
+
* @export
|
|
726
|
+
* @class TreeViewComponent
|
|
727
|
+
* @implements {OnInit}
|
|
728
|
+
*/
|
|
729
|
+
class TreeViewComponent {
|
|
730
|
+
set parentGroupsInfo(value) {
|
|
731
|
+
this.parentGroups = value;
|
|
732
|
+
}
|
|
733
|
+
get parentGroupsInfo() {
|
|
734
|
+
return this.parentGroups;
|
|
735
|
+
}
|
|
736
|
+
set childGroupsInfo(value) {
|
|
737
|
+
this.childGroups = value;
|
|
738
|
+
this.loadChildGroups();
|
|
739
|
+
}
|
|
740
|
+
get childGroupsInfo() {
|
|
741
|
+
return this.childGroups;
|
|
742
|
+
}
|
|
743
|
+
set isGroupSearchOrFilterActive(value) {
|
|
744
|
+
this.isGroupSearchOrFilter = value;
|
|
745
|
+
}
|
|
746
|
+
get isGroupSearchOrFilterActive() {
|
|
747
|
+
return this.isGroupSearchOrFilter;
|
|
748
|
+
}
|
|
749
|
+
set deleteGroupInfo(id) {
|
|
750
|
+
this.deletedGroupId = id;
|
|
751
|
+
this.deleteGroupNode(this.deletedGroupId);
|
|
752
|
+
}
|
|
753
|
+
get deleteGroupInfo() {
|
|
754
|
+
return this.deletedGroupId;
|
|
755
|
+
}
|
|
756
|
+
set addGroupInfo(value) {
|
|
757
|
+
this.addGroup = value;
|
|
758
|
+
this.addGroupNode(this.addGroup);
|
|
759
|
+
}
|
|
760
|
+
get addGroupInfo() {
|
|
761
|
+
return this.addGroup;
|
|
762
|
+
}
|
|
763
|
+
// eslint-disable-next-line no-unused-vars, no-empty-function
|
|
764
|
+
constructor(database) {
|
|
765
|
+
this.database = database;
|
|
766
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
767
|
+
this.constants = screenTexts;
|
|
768
|
+
this.buttons = this.constants?.viewGroups?.buttons;
|
|
769
|
+
this.treePaddingIndent = this.constants?.viewGroups?.treePaddingIndent;
|
|
770
|
+
this.plusCircleIconButton = this.buttons[4];
|
|
771
|
+
this.minusCircleIconButton = this.buttons[5];
|
|
772
|
+
this.menuItems = this.buttons.filter((e) => e.id !== GroupAction.EXPAND_GROUP_VIEW &&
|
|
773
|
+
e.id !== GroupAction.COLLAPSE_GROUP_VIEW);
|
|
774
|
+
this.isGroupSearchOrFilter = false;
|
|
775
|
+
this.toggleGroupClick = new EventEmitter();
|
|
776
|
+
this.createGroupClick = new EventEmitter();
|
|
777
|
+
this.editGroupClick = new EventEmitter();
|
|
778
|
+
this.deleteGroupClick = new EventEmitter();
|
|
779
|
+
/**
|
|
780
|
+
* Gets the level of the node
|
|
781
|
+
* @param {GroupNode} node
|
|
782
|
+
* @memberof TreeViewComponent
|
|
783
|
+
*/
|
|
784
|
+
this.getLevel = (node) => node.level;
|
|
785
|
+
/**
|
|
786
|
+
* Checks the node is expandable or not
|
|
787
|
+
* @param {GroupNode} node
|
|
788
|
+
* @memberof TreeViewComponent
|
|
789
|
+
*/
|
|
790
|
+
this.isExpandable = (node) => node.expandable;
|
|
791
|
+
/**
|
|
792
|
+
* Returns true if passed node has children otherwise false
|
|
793
|
+
* @param {number} index
|
|
794
|
+
* @param {GroupNode} node
|
|
795
|
+
* @return {boolean}
|
|
796
|
+
* @memberof TreeViewComponent
|
|
797
|
+
*/
|
|
798
|
+
this.hasChildGroups = (index, _nodeData) => _nodeData.expandable;
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Initializes the datSource with parent groups data
|
|
802
|
+
* @memberof TreeViewComponent
|
|
803
|
+
*/
|
|
804
|
+
ngOnInit() {
|
|
805
|
+
this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);
|
|
806
|
+
this.dataSource = new GroupsDataSource(this.treeControl, this.database);
|
|
807
|
+
this.dataSource.data = this.database.initialData(this.parentGroupsInfo);
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
* Emits the group info when the toggle group is clicked or toggles the group view
|
|
811
|
+
* @param {GroupNode} group
|
|
812
|
+
* @memberof TreeViewComponent
|
|
813
|
+
*/
|
|
814
|
+
viewChildGroups(node) {
|
|
815
|
+
if (!node.item.hasChildren) {
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
if (this.treeControl.isExpanded(node)) {
|
|
819
|
+
this.treeControl.toggle(node);
|
|
820
|
+
}
|
|
821
|
+
else {
|
|
822
|
+
this.toggleGroupClick.emit(node.item);
|
|
823
|
+
this.selectedGroup = node;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Sets the box shadow based on the group type legend color
|
|
828
|
+
* @param {string} color
|
|
829
|
+
* @return {*}
|
|
830
|
+
* @memberof TreeViewComponent
|
|
831
|
+
*/
|
|
832
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
833
|
+
getBoxShadow(color) {
|
|
834
|
+
return {
|
|
835
|
+
boxShadow: '0px 1px 0px 0px #c9cbd0 inset, 6px 0px 0px 0px ' + color + ' inset',
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
/**
|
|
839
|
+
* Loads the child groups and updates the tree view.
|
|
840
|
+
* @memberof TreeViewComponent
|
|
841
|
+
*/
|
|
842
|
+
loadChildGroups() {
|
|
843
|
+
this.database.setChildGroupsInfo(this.childGroupsInfo);
|
|
844
|
+
if (this.selectedGroup)
|
|
845
|
+
this.treeControl.toggle(this.selectedGroup);
|
|
846
|
+
}
|
|
847
|
+
/**
|
|
848
|
+
* Deletes the selected group and updates the tree view.
|
|
849
|
+
* @param {string} deletedGroupId
|
|
850
|
+
* @memberof TreeViewComponent
|
|
851
|
+
*/
|
|
852
|
+
deleteGroupNode(deletedGroupId) {
|
|
853
|
+
if (this.treeControl && deletedGroupId) {
|
|
854
|
+
const groupDataSource = this.treeControl.dataNodes.filter((e) => e.item.groupId !== deletedGroupId);
|
|
855
|
+
this.dataSource.data = groupDataSource;
|
|
856
|
+
this.deletedGroupId = undefined;
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* Adds a new group and updates the tree view.
|
|
861
|
+
* @memberof TreeViewComponent
|
|
862
|
+
*/
|
|
863
|
+
addGroupNode(groups) {
|
|
864
|
+
if (this.dataSource) {
|
|
865
|
+
groups.forEach((group) => {
|
|
866
|
+
if (!this.parentGroups.find((e) => e.groupId === group.groupId))
|
|
867
|
+
this.addedGroup = group;
|
|
868
|
+
});
|
|
869
|
+
if (this.addedGroup) {
|
|
870
|
+
const groupDataSource = this.dataSource.data;
|
|
871
|
+
const groupNode = new GroupNode(this.addedGroup, 0, this.database.isExpandable(this.addedGroup));
|
|
872
|
+
groupDataSource.push(groupNode);
|
|
873
|
+
this.dataSource.data = groupDataSource;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* Sets the selected menu group action
|
|
879
|
+
* @param {Menu} menu
|
|
880
|
+
* @memberof TreeViewComponent
|
|
881
|
+
*/
|
|
882
|
+
onGroupActionsClick(menu) {
|
|
883
|
+
this.selectedGroupAction = menu;
|
|
884
|
+
}
|
|
885
|
+
/**
|
|
886
|
+
* Changes the expand/collapse icon based on the toggle
|
|
887
|
+
* @param {GroupNode} group
|
|
888
|
+
* @return {*} {*}
|
|
889
|
+
* @memberof TreeViewComponent
|
|
890
|
+
*/
|
|
891
|
+
getToggleButtonInfo(group) {
|
|
892
|
+
if (this.treeControl.isExpanded(group))
|
|
893
|
+
return this.minusCircleIconButton;
|
|
894
|
+
return this.plusCircleIconButton;
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Handles the emitted group actions event
|
|
898
|
+
* @param {GroupInfo} group
|
|
899
|
+
* @memberof TreeViewComponent
|
|
900
|
+
*/
|
|
901
|
+
handleGroupActions(group) {
|
|
902
|
+
if (this.selectedGroupAction?.id === GroupAction.VIEW_ROSTER) {
|
|
903
|
+
this.viewChildGroups(group);
|
|
904
|
+
}
|
|
905
|
+
else if (this.selectedGroupAction?.id === GroupAction.CREATE_SUB_GROUP) {
|
|
906
|
+
this.createGroupClick.emit(group.item);
|
|
907
|
+
}
|
|
908
|
+
else if (this.selectedGroupAction?.id === GroupAction.EDIT_GROUP) {
|
|
909
|
+
this.editGroupClick.emit(group.item);
|
|
910
|
+
}
|
|
911
|
+
else if (this.selectedGroupAction?.id === GroupAction.DELETE_GROUP) {
|
|
912
|
+
this.deleteGroupClick.emit(group.item);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* Returns the filtered menu items based on groups hasChildren.
|
|
917
|
+
* @param {GroupNode} group
|
|
918
|
+
* @return {Menu[]}
|
|
919
|
+
* @memberof TreeViewComponent
|
|
920
|
+
*/
|
|
921
|
+
getFilteredGroupActions(group) {
|
|
922
|
+
this.menuItems.forEach((e) => (e.isToolTipNeeded = false));
|
|
923
|
+
return this.menuItems.filter((e) => (e.id !== GroupAction.DELETE_GROUP && group.item.hasChildren) ||
|
|
924
|
+
(e.id !== GroupAction.CREATE_SUB_GROUP && !group.item.hasChildren));
|
|
925
|
+
}
|
|
926
|
+
/**
|
|
927
|
+
* Takes the index and the icon button as arguments and needs to return the unique identifier for this icon button.
|
|
928
|
+
* @param {number} index
|
|
929
|
+
* @param {IconButton} iconButton
|
|
930
|
+
* @return {number}
|
|
931
|
+
* @memberof TreeViewComponent
|
|
932
|
+
*/
|
|
933
|
+
trackByFn(index, iconButton) {
|
|
934
|
+
return iconButton.id;
|
|
935
|
+
}
|
|
936
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: TreeViewComponent, deps: [{ token: Groups }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
937
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", type: TreeViewComponent, isStandalone: true, selector: "ieeesa-tree", inputs: { parentGroupsInfo: "parentGroupsInfo", childGroupsInfo: "childGroupsInfo", isGroupSearchOrFilterActive: "isGroupSearchOrFilterActive", deleteGroupInfo: "deleteGroupInfo", addGroupInfo: "addGroupInfo" }, outputs: { toggleGroupClick: "toggleGroupClick", createGroupClick: "createGroupClick", editGroupClick: "editGroupClick", deleteGroupClick: "deleteGroupClick" }, ngImport: i0, template: "<div class=\"ieeesa-tree\">\r\n <mat-tree\r\n [dataSource]=\"dataSource\"\r\n [treeControl]=\"treeControl\"\r\n class=\"ieeesa-tree__root\"\r\n #rootSelector\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [matTreeNodePaddingIndent]=\"treePaddingIndent\"\r\n >\r\n <div\r\n class=\"ieeesa-tree__node w-100 d-flex justify-content-between gap-3 my-0\"\r\n [ngStyle]=\"getBoxShadow(node.item.groupTypeInfo.legendColor)\"\r\n >\r\n <div class=\"d-flex gap-3\">\r\n <div\r\n [ngClass]=\"\r\n !isGroupSearchOrFilterActive ? 'ieeesa-tree__collapse-icon' : ''\r\n \"\r\n ></div>\r\n <div>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n ieeesaGroupInfoOutlet;\r\n context: { $implicit: node }\r\n \"\r\n >\r\n </ng-container>\r\n </div>\r\n </div>\r\n <ieeesa-menu\r\n [menuItems]=\"getFilteredGroupActions(node)\"\r\n (menuItemClick)=\"\r\n onGroupActionsClick($event); handleGroupActions(node)\r\n \"\r\n class=\"d-lg-none d-md-none d-sm-none\"\r\n ></ieeesa-menu>\r\n <div class=\"d-none gap-3 d-sm-flex d-md-flex d-lg-flex\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n ieeesaGroupActionsOutlet;\r\n context: { $implicit: node }\r\n \"\r\n >\r\n </ng-container>\r\n </div>\r\n </div>\r\n </mat-tree-node>\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChildGroups\"\r\n matTreeNodePadding\r\n [matTreeNodePaddingIndent]=\"treePaddingIndent\"\r\n >\r\n <div\r\n [ngClass]=\"\r\n treeControl.isExpanded(node)\r\n ? 'ieeesa-tree__root-node-white-bg'\r\n : 'ieeesa-tree__root-node'\r\n \"\r\n class=\"ieeesa-tree__node w-100 d-flex my-0 gap-3\"\r\n [ngStyle]=\"getBoxShadow(node.item.groupTypeInfo.legendColor)\"\r\n >\r\n <div>\r\n <ieeesa-icon-button\r\n *ngIf=\"!isGroupSearchOrFilterActive\"\r\n (iconButtonClick)=\"viewChildGroups(node)\"\r\n [iconButton]=\"getToggleButtonInfo(node)\"\r\n ></ieeesa-icon-button>\r\n </div>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n ieeesaGroupInfoOutlet;\r\n context: { $implicit: node }\r\n \"\r\n ></ng-container>\r\n <div class=\"d-flex d-none gap-3 d-sm-flex d-md-flex d-lg-flex\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n ieeesaGroupActionsOutlet;\r\n context: { $implicit: node }\r\n \"\r\n >\r\n </ng-container>\r\n </div>\r\n <ieeesa-menu\r\n [menuItems]=\"getFilteredGroupActions(node)\"\r\n (menuItemClick)=\"\r\n onGroupActionsClick($event); handleGroupActions(node)\r\n \"\r\n class=\"d-lg-none d-md-none d-sm-none\"\r\n ></ieeesa-menu>\r\n </div>\r\n </mat-tree-node>\r\n <ng-template #ieeesaGroupInfoOutlet let-node>\r\n <div class=\"w-100\">\r\n <div\r\n class=\"ieeesa-tree__group-info d-flex flex-column flex-sm-row flex-md-row flex-lg-row align-items-start align-items-sm-center align-items-md-center align-items-lg-center gap-2 mb-1\"\r\n >\r\n <p class=\"ieeesa-tree__node-group-name ieeesa-headline-sm-26\">\r\n {{ node.item.groupName }}\r\n </p>\r\n <p class=\"ieeesa-tree__node-group-acronym ieeesa-title-lg-24\">\r\n {{ node.item.groupAcronym }}\r\n </p>\r\n </div>\r\n <div class=\"ieeesa-body-md-16 ieeesa-tree__node-group-desc\">\r\n {{ node.item.groupTypeInfo.description }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #ieeesaGroupActionsOutlet let-node>\r\n <ieeesa-icon-button\r\n *ngFor=\"let item of getFilteredGroupActions(node); trackBy: trackByFn\"\r\n [iconButton]=\"item\"\r\n (iconButtonClick)=\"\r\n onGroupActionsClick($event); handleGroupActions(node)\r\n \"\r\n >\r\n </ieeesa-icon-button>\r\n </ng-template>\r\n </mat-tree>\r\n</div>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.56em;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25em;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625em;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375em;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-sm-38{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.375em;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125em;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-md-30{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.875em;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625em;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-lg-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-md-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-title-inter-lg-bold-24{font-family:Inter Bold;font-style:normal;font-weight:700;font-size:1.5em;line-height:29px;color:#000;letter-spacing:0}.mat-mdc-button.mat-mdc-button-base.mat-primary-button,.mat-mdc-button.mat-mdc-button-base.mat-secondary-button,.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{min-width:103px;width:auto;min-height:40px;height:auto;border-radius:3px;text-align:center;padding:.625em 1.5em;border:none;font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.mat-mdc-button.mat-mdc-button-base>.mat-icon{margin-right:11px}.mat-mdc-button.mat-mdc-button-base.mat-primary-button{background-color:#00629b;color:#fff}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:hover{background-color:#003e65}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:active{background-color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:disabled{background-color:#1c1b1f1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button{color:#fff;background:#a7a8aa;box-shadow:0 1px 2px #0000004d,0 2px 6px 2px #00000026}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:hover{background:#a7a8aa}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:rgba(29,25,43,.12)}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{background-color:#fff;border:1px solid #00629b;color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:hover{background-color:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:rgba(103,80,164,.12)}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.flex-align-center{display:flex;align-items:center;justify-content:center}.mat-button-toggle-checked{background-color:#a7a8aa}.mat-button-toggle-checked .mat-button-toggle-label-content:before{font-family:\"Font Awesome 5 Free\";font-weight:900;content:\"\\f00c\";padding-right:.5625em}.mat-button-toggle-group .mat-button-toggle-label-content{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#1c1b1f;letter-spacing:.00625em}.no-bg-color-btn{color:#00629b;border-radius:3px;border:1px solid #00629b;min-height:40px;height:auto}@media (max-width: 768px){.mat-button-toggle-group .mat-button-toggle-label-content{max-width:8ch;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;position:relative}}.cdk-overlay-pane.ieeesa-modal-confirm-dialog,.cdk-overlay-pane.ieeesa-modal-dialog,.cdk-overlay-pane.ieeesa-alert-dialog{width:100%;min-width:312px}.mat-mdc-form-field{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-tree p{margin-bottom:0}.ieeesa-tree__node-group-acronym{color:#63666a}.ieeesa-tree__node-group-desc{color:#9ba0a6}.ieeesa-tree__node{background:#f4f8fe;padding:.75em 1.5em .75em 1.125em}.ieeesa-tree__root-node-white-bg{background:#ffffff;box-shadow:0 1px #00b5e2 inset,6px 0 #379dfc inset}.ieeesa-tree__collapse-icon{width:3.5em}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i2.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i2.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "component", type: i2.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i2.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: MenuComponent, selector: "ieeesa-menu", inputs: ["menuItems"], outputs: ["menuItemClick"] }, { kind: "component", type: IconButtonComponent, selector: "ieeesa-icon-button", inputs: ["iconButton"], outputs: ["iconButtonClick"] }] }); }
|
|
938
|
+
}
|
|
939
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: TreeViewComponent, decorators: [{
|
|
940
|
+
type: Component,
|
|
941
|
+
args: [{ selector: 'ieeesa-tree', standalone: true, imports: [
|
|
942
|
+
CommonModule,
|
|
943
|
+
MatTreeModule,
|
|
944
|
+
MatIconModule,
|
|
945
|
+
MatButtonModule,
|
|
946
|
+
MenuComponent,
|
|
947
|
+
IconButtonComponent,
|
|
948
|
+
], template: "<div class=\"ieeesa-tree\">\r\n <mat-tree\r\n [dataSource]=\"dataSource\"\r\n [treeControl]=\"treeControl\"\r\n class=\"ieeesa-tree__root\"\r\n #rootSelector\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [matTreeNodePaddingIndent]=\"treePaddingIndent\"\r\n >\r\n <div\r\n class=\"ieeesa-tree__node w-100 d-flex justify-content-between gap-3 my-0\"\r\n [ngStyle]=\"getBoxShadow(node.item.groupTypeInfo.legendColor)\"\r\n >\r\n <div class=\"d-flex gap-3\">\r\n <div\r\n [ngClass]=\"\r\n !isGroupSearchOrFilterActive ? 'ieeesa-tree__collapse-icon' : ''\r\n \"\r\n ></div>\r\n <div>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n ieeesaGroupInfoOutlet;\r\n context: { $implicit: node }\r\n \"\r\n >\r\n </ng-container>\r\n </div>\r\n </div>\r\n <ieeesa-menu\r\n [menuItems]=\"getFilteredGroupActions(node)\"\r\n (menuItemClick)=\"\r\n onGroupActionsClick($event); handleGroupActions(node)\r\n \"\r\n class=\"d-lg-none d-md-none d-sm-none\"\r\n ></ieeesa-menu>\r\n <div class=\"d-none gap-3 d-sm-flex d-md-flex d-lg-flex\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n ieeesaGroupActionsOutlet;\r\n context: { $implicit: node }\r\n \"\r\n >\r\n </ng-container>\r\n </div>\r\n </div>\r\n </mat-tree-node>\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChildGroups\"\r\n matTreeNodePadding\r\n [matTreeNodePaddingIndent]=\"treePaddingIndent\"\r\n >\r\n <div\r\n [ngClass]=\"\r\n treeControl.isExpanded(node)\r\n ? 'ieeesa-tree__root-node-white-bg'\r\n : 'ieeesa-tree__root-node'\r\n \"\r\n class=\"ieeesa-tree__node w-100 d-flex my-0 gap-3\"\r\n [ngStyle]=\"getBoxShadow(node.item.groupTypeInfo.legendColor)\"\r\n >\r\n <div>\r\n <ieeesa-icon-button\r\n *ngIf=\"!isGroupSearchOrFilterActive\"\r\n (iconButtonClick)=\"viewChildGroups(node)\"\r\n [iconButton]=\"getToggleButtonInfo(node)\"\r\n ></ieeesa-icon-button>\r\n </div>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n ieeesaGroupInfoOutlet;\r\n context: { $implicit: node }\r\n \"\r\n ></ng-container>\r\n <div class=\"d-flex d-none gap-3 d-sm-flex d-md-flex d-lg-flex\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n ieeesaGroupActionsOutlet;\r\n context: { $implicit: node }\r\n \"\r\n >\r\n </ng-container>\r\n </div>\r\n <ieeesa-menu\r\n [menuItems]=\"getFilteredGroupActions(node)\"\r\n (menuItemClick)=\"\r\n onGroupActionsClick($event); handleGroupActions(node)\r\n \"\r\n class=\"d-lg-none d-md-none d-sm-none\"\r\n ></ieeesa-menu>\r\n </div>\r\n </mat-tree-node>\r\n <ng-template #ieeesaGroupInfoOutlet let-node>\r\n <div class=\"w-100\">\r\n <div\r\n class=\"ieeesa-tree__group-info d-flex flex-column flex-sm-row flex-md-row flex-lg-row align-items-start align-items-sm-center align-items-md-center align-items-lg-center gap-2 mb-1\"\r\n >\r\n <p class=\"ieeesa-tree__node-group-name ieeesa-headline-sm-26\">\r\n {{ node.item.groupName }}\r\n </p>\r\n <p class=\"ieeesa-tree__node-group-acronym ieeesa-title-lg-24\">\r\n {{ node.item.groupAcronym }}\r\n </p>\r\n </div>\r\n <div class=\"ieeesa-body-md-16 ieeesa-tree__node-group-desc\">\r\n {{ node.item.groupTypeInfo.description }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #ieeesaGroupActionsOutlet let-node>\r\n <ieeesa-icon-button\r\n *ngFor=\"let item of getFilteredGroupActions(node); trackBy: trackByFn\"\r\n [iconButton]=\"item\"\r\n (iconButtonClick)=\"\r\n onGroupActionsClick($event); handleGroupActions(node)\r\n \"\r\n >\r\n </ieeesa-icon-button>\r\n </ng-template>\r\n </mat-tree>\r\n</div>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.56em;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25em;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625em;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375em;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-sm-38{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.375em;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125em;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-md-30{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.875em;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625em;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-lg-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-md-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-title-inter-lg-bold-24{font-family:Inter Bold;font-style:normal;font-weight:700;font-size:1.5em;line-height:29px;color:#000;letter-spacing:0}.mat-mdc-button.mat-mdc-button-base.mat-primary-button,.mat-mdc-button.mat-mdc-button-base.mat-secondary-button,.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{min-width:103px;width:auto;min-height:40px;height:auto;border-radius:3px;text-align:center;padding:.625em 1.5em;border:none;font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.mat-mdc-button.mat-mdc-button-base>.mat-icon{margin-right:11px}.mat-mdc-button.mat-mdc-button-base.mat-primary-button{background-color:#00629b;color:#fff}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:hover{background-color:#003e65}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:active{background-color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:disabled{background-color:#1c1b1f1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button{color:#fff;background:#a7a8aa;box-shadow:0 1px 2px #0000004d,0 2px 6px 2px #00000026}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:hover{background:#a7a8aa}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:rgba(29,25,43,.12)}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{background-color:#fff;border:1px solid #00629b;color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:hover{background-color:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:rgba(103,80,164,.12)}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.flex-align-center{display:flex;align-items:center;justify-content:center}.mat-button-toggle-checked{background-color:#a7a8aa}.mat-button-toggle-checked .mat-button-toggle-label-content:before{font-family:\"Font Awesome 5 Free\";font-weight:900;content:\"\\f00c\";padding-right:.5625em}.mat-button-toggle-group .mat-button-toggle-label-content{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#1c1b1f;letter-spacing:.00625em}.no-bg-color-btn{color:#00629b;border-radius:3px;border:1px solid #00629b;min-height:40px;height:auto}@media (max-width: 768px){.mat-button-toggle-group .mat-button-toggle-label-content{max-width:8ch;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;position:relative}}.cdk-overlay-pane.ieeesa-modal-confirm-dialog,.cdk-overlay-pane.ieeesa-modal-dialog,.cdk-overlay-pane.ieeesa-alert-dialog{width:100%;min-width:312px}.mat-mdc-form-field{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-tree p{margin-bottom:0}.ieeesa-tree__node-group-acronym{color:#63666a}.ieeesa-tree__node-group-desc{color:#9ba0a6}.ieeesa-tree__node{background:#f4f8fe;padding:.75em 1.5em .75em 1.125em}.ieeesa-tree__root-node-white-bg{background:#ffffff;box-shadow:0 1px #00b5e2 inset,6px 0 #379dfc inset}.ieeesa-tree__collapse-icon{width:3.5em}\n"] }]
|
|
949
|
+
}], ctorParameters: function () { return [{ type: Groups }]; }, propDecorators: { parentGroupsInfo: [{
|
|
950
|
+
type: Input
|
|
951
|
+
}], childGroupsInfo: [{
|
|
952
|
+
type: Input
|
|
953
|
+
}], isGroupSearchOrFilterActive: [{
|
|
954
|
+
type: Input
|
|
955
|
+
}], deleteGroupInfo: [{
|
|
956
|
+
type: Input
|
|
957
|
+
}], addGroupInfo: [{
|
|
958
|
+
type: Input
|
|
959
|
+
}], toggleGroupClick: [{
|
|
960
|
+
type: Output
|
|
961
|
+
}], createGroupClick: [{
|
|
962
|
+
type: Output
|
|
963
|
+
}], editGroupClick: [{
|
|
964
|
+
type: Output
|
|
965
|
+
}], deleteGroupClick: [{
|
|
966
|
+
type: Output
|
|
967
|
+
}] } });
|
|
968
|
+
|
|
390
969
|
/* eslint-disable no-unused-vars */
|
|
391
970
|
var GroupFunctionType;
|
|
392
971
|
(function (GroupFunctionType) {
|
|
@@ -405,13 +984,61 @@ class GroupsComponent {
|
|
|
405
984
|
// eslint-disable-next-line no-unused-vars
|
|
406
985
|
groupsService,
|
|
407
986
|
// eslint-disable-next-line no-unused-vars
|
|
408
|
-
alertService
|
|
409
|
-
|
|
987
|
+
alertService,
|
|
988
|
+
// eslint-disable-next-line no-unused-vars
|
|
989
|
+
breakpointObserverService,
|
|
990
|
+
// eslint-disable-next-line no-unused-vars
|
|
991
|
+
globalErrorHandlerService) {
|
|
410
992
|
this.dialog = dialog;
|
|
411
993
|
this.groupsService = groupsService;
|
|
412
994
|
this.alertService = alertService;
|
|
995
|
+
this.breakpointObserverService = breakpointObserverService;
|
|
996
|
+
this.globalErrorHandlerService = globalErrorHandlerService;
|
|
413
997
|
this.destroy$ = new Subject();
|
|
998
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
999
|
+
this.constants = screenTexts;
|
|
1000
|
+
this.viewGroupTexts = this.constants?.viewGroups;
|
|
1001
|
+
this.isGroupSearchActive = false;
|
|
1002
|
+
this.isGroupFilterActive = false;
|
|
1003
|
+
this.isGroupSearchOrFilterActive = false;
|
|
1004
|
+
this.isMobileView = false;
|
|
1005
|
+
this.searchPlaceHolderText = this.viewGroupTexts?.placeholderText?.search;
|
|
1006
|
+
this.filterPlaceHolderText = this.viewGroupTexts?.placeholderText?.filter;
|
|
1007
|
+
this.createGroupIcon = {
|
|
1008
|
+
id: 1,
|
|
1009
|
+
ariaLabel: this.viewGroupTexts?.ariaLabel.create,
|
|
1010
|
+
iconURL: this.viewGroupTexts?.createGroupIcon,
|
|
1011
|
+
toolTip: this.viewGroupTexts?.ariaLabel.create,
|
|
1012
|
+
};
|
|
1013
|
+
this.filterGroupIcon = {
|
|
1014
|
+
id: 2,
|
|
1015
|
+
ariaLabel: this.viewGroupTexts?.ariaLabel.filter,
|
|
1016
|
+
iconURL: this.viewGroupTexts?.filterGroupIcon,
|
|
1017
|
+
toolTip: this.viewGroupTexts?.ariaLabel.filter,
|
|
1018
|
+
};
|
|
1019
|
+
this.groupsLegends = [];
|
|
1020
|
+
this.getGroupsPayload = [
|
|
1021
|
+
{
|
|
1022
|
+
key: 'groupId',
|
|
1023
|
+
value: '',
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
key: 'groupType',
|
|
1027
|
+
value: '',
|
|
1028
|
+
},
|
|
1029
|
+
];
|
|
1030
|
+
this.groupsPageInfo = {
|
|
1031
|
+
groupsTitle: this.viewGroupTexts?.groupsTitle,
|
|
1032
|
+
groupsDescription: this.viewGroupTexts?.groupsDescription,
|
|
1033
|
+
};
|
|
414
1034
|
this.createGroupText = createGroup;
|
|
1035
|
+
this.alignmentType = AlignType;
|
|
1036
|
+
this.breakpointObserverService
|
|
1037
|
+
.getBreakpoint()
|
|
1038
|
+
.pipe(takeUntil(this.destroy$))
|
|
1039
|
+
.subscribe((result) => {
|
|
1040
|
+
this.isMobileView = result.matches;
|
|
1041
|
+
});
|
|
415
1042
|
}
|
|
416
1043
|
/**
|
|
417
1044
|
* Initialize the groups component.
|
|
@@ -420,6 +1047,8 @@ class GroupsComponent {
|
|
|
420
1047
|
*/
|
|
421
1048
|
ngOnInit() {
|
|
422
1049
|
this.groupsService.setAppConfig(this.apiBaseURL, this.permissions);
|
|
1050
|
+
this.getGroupTypes();
|
|
1051
|
+
this.getGroups();
|
|
423
1052
|
}
|
|
424
1053
|
/**
|
|
425
1054
|
* Sets the dialog options for create group modal and calls openModal method.
|
|
@@ -434,7 +1063,7 @@ class GroupsComponent {
|
|
|
434
1063
|
modalType: ModalType.FORM,
|
|
435
1064
|
};
|
|
436
1065
|
this.functionType = GroupFunctionType.CREATE;
|
|
437
|
-
this.openModal(dialogOptions,
|
|
1066
|
+
this.openModal(dialogOptions, 'ieeesa-create-group');
|
|
438
1067
|
}
|
|
439
1068
|
/**
|
|
440
1069
|
* Opens modal component with for received params and handles form submission success and errors.
|
|
@@ -445,11 +1074,11 @@ class GroupsComponent {
|
|
|
445
1074
|
*/
|
|
446
1075
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-inferrable-types
|
|
447
1076
|
openModal(dialogOptions, className) {
|
|
448
|
-
className = className ??
|
|
1077
|
+
className = className ?? '';
|
|
449
1078
|
this.dialogRef = this.dialog.open(ModalComponent, {
|
|
450
1079
|
data: dialogOptions,
|
|
451
|
-
width:
|
|
452
|
-
panelClass: [
|
|
1080
|
+
width: 'auto',
|
|
1081
|
+
panelClass: ['ieeesa-modal-dialog', className],
|
|
453
1082
|
ariaModal: true,
|
|
454
1083
|
});
|
|
455
1084
|
this.dialogRef?.componentInstance?.submitFormResponse
|
|
@@ -458,8 +1087,20 @@ class GroupsComponent {
|
|
|
458
1087
|
.subscribe((result) => {
|
|
459
1088
|
this.dialogRef.close();
|
|
460
1089
|
if (this.functionType === GroupFunctionType.CREATE) {
|
|
1090
|
+
this.isGroupAdded = true;
|
|
1091
|
+
this.getGroupsPayload = [
|
|
1092
|
+
{
|
|
1093
|
+
key: 'groupId',
|
|
1094
|
+
value: '',
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
key: 'groupType',
|
|
1098
|
+
value: '',
|
|
1099
|
+
},
|
|
1100
|
+
];
|
|
1101
|
+
this.getGroups();
|
|
461
1102
|
this.alertService.showMessage({
|
|
462
|
-
status:
|
|
1103
|
+
status: 'custom',
|
|
463
1104
|
alertType: AlertType.SUCCESS,
|
|
464
1105
|
isCloseNeeded: true,
|
|
465
1106
|
message: this.createGroupText?.message?.success?.submission,
|
|
@@ -472,6 +1113,246 @@ class GroupsComponent {
|
|
|
472
1113
|
this.dialogRef.close();
|
|
473
1114
|
});
|
|
474
1115
|
}
|
|
1116
|
+
/**
|
|
1117
|
+
* This method invokes the delete modal, and asks user for confirmation to delete the group.
|
|
1118
|
+
* @memberof GroupComponent
|
|
1119
|
+
*/
|
|
1120
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1121
|
+
openDeleteConfirmationModal(groupInfo) {
|
|
1122
|
+
const deleteGroupModalOptions = {
|
|
1123
|
+
leftButtonLabel: deleteGroup?.confirmationInfo?.leftButtonLabel,
|
|
1124
|
+
rightButtonLabel: deleteGroup?.confirmationInfo?.rightButtonLabel,
|
|
1125
|
+
promptMessage: deleteGroup?.confirmationInfo?.promptMessage +
|
|
1126
|
+
groupInfo.groupName +
|
|
1127
|
+
'?',
|
|
1128
|
+
actionButtonAlign: this.alignmentType.MIDDLE,
|
|
1129
|
+
};
|
|
1130
|
+
this.dialogRef = this.dialog.open(ModalConfirmationComponent, {
|
|
1131
|
+
data: deleteGroupModalOptions,
|
|
1132
|
+
width: 'auto',
|
|
1133
|
+
});
|
|
1134
|
+
this.dialogRef
|
|
1135
|
+
.afterClosed()
|
|
1136
|
+
.pipe(takeUntil(this.destroy$))
|
|
1137
|
+
.subscribe((result) => {
|
|
1138
|
+
if (result) {
|
|
1139
|
+
this.deleteGroup(groupInfo);
|
|
1140
|
+
}
|
|
1141
|
+
});
|
|
1142
|
+
}
|
|
1143
|
+
/**
|
|
1144
|
+
* This method sends API Request to delete the selected group and handles the success and error response of the http request.
|
|
1145
|
+
* @memberof GroupComponent
|
|
1146
|
+
*/
|
|
1147
|
+
deleteGroup(groupInfo) {
|
|
1148
|
+
const deleteGroupText = deleteGroup;
|
|
1149
|
+
const deleteGroupPayload = {
|
|
1150
|
+
payload: {
|
|
1151
|
+
groupId: groupInfo.groupId,
|
|
1152
|
+
},
|
|
1153
|
+
};
|
|
1154
|
+
this.groupsService
|
|
1155
|
+
.deleteGroup(deleteGroupPayload)
|
|
1156
|
+
.pipe(takeUntil(this.destroy$))
|
|
1157
|
+
.subscribe({
|
|
1158
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1159
|
+
next: (res) => {
|
|
1160
|
+
this.dialogRef?.close();
|
|
1161
|
+
if (res?.status) {
|
|
1162
|
+
this.deletedGroupId = groupInfo.groupId;
|
|
1163
|
+
this.alertService.showMessage({
|
|
1164
|
+
status: 'custom',
|
|
1165
|
+
alertType: AlertType.SUCCESS,
|
|
1166
|
+
isCloseNeeded: true,
|
|
1167
|
+
message: groupInfo.groupName +
|
|
1168
|
+
deleteGroupText?.message?.success?.deletion,
|
|
1169
|
+
});
|
|
1170
|
+
}
|
|
1171
|
+
},
|
|
1172
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1173
|
+
error: (error) => {
|
|
1174
|
+
const errorCodes = error?.error?.body?.errorCodes;
|
|
1175
|
+
if (Array.isArray(errorCodes) && !error?.error?.status) {
|
|
1176
|
+
const errorMessage = this.groupsService.parseErrorMessage(errorCodes);
|
|
1177
|
+
this.alertService.showMessage({
|
|
1178
|
+
status: 'custom',
|
|
1179
|
+
message: errorMessage,
|
|
1180
|
+
alertType: AlertType.ERROR,
|
|
1181
|
+
isCloseNeeded: true,
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
else if (error && error instanceof HttpErrorResponse) {
|
|
1185
|
+
this.globalErrorHandlerService.handleError(error);
|
|
1186
|
+
}
|
|
1187
|
+
},
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* Shows the search field on click of search icon in case of mobile view
|
|
1192
|
+
* @memberof GroupsComponent
|
|
1193
|
+
*/
|
|
1194
|
+
onGroupSearch() {
|
|
1195
|
+
this.isGroupSearchActive = true;
|
|
1196
|
+
this.isGroupFilterActive = false;
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* Shows the Filter by dropdown options on click of filter icon in case of mobile view
|
|
1200
|
+
* @memberof GroupsComponent
|
|
1201
|
+
*/
|
|
1202
|
+
showGroupFilter() {
|
|
1203
|
+
this.isGroupFilterActive = true;
|
|
1204
|
+
this.isGroupSearchActive = false;
|
|
1205
|
+
}
|
|
1206
|
+
/**
|
|
1207
|
+
* Sets isGroupSearchOrFilterActive to true and loads the groups those are configured with selected group type.
|
|
1208
|
+
* @param {string} searchTerm
|
|
1209
|
+
* @memberof GroupsComponent
|
|
1210
|
+
*/
|
|
1211
|
+
onGroupSearchClick(searchTerm) {
|
|
1212
|
+
this.isGroupSearchOrFilterActive = !!searchTerm;
|
|
1213
|
+
}
|
|
1214
|
+
/**
|
|
1215
|
+
* Sets select group type options from groupTypes response
|
|
1216
|
+
* @return {*} {SelectOption[]}
|
|
1217
|
+
* @memberof GroupsComponent
|
|
1218
|
+
*/
|
|
1219
|
+
getGroupTypeOptions() {
|
|
1220
|
+
this.legendColor();
|
|
1221
|
+
const groupTypeOptions = [];
|
|
1222
|
+
Object.entries(this.groupTypes).forEach((node) => {
|
|
1223
|
+
groupTypeOptions.push({ id: node[0], name: node[1].name });
|
|
1224
|
+
});
|
|
1225
|
+
return groupTypeOptions;
|
|
1226
|
+
}
|
|
1227
|
+
/**
|
|
1228
|
+
* Sets legend color from groupTypes response
|
|
1229
|
+
* @memberof GroupsComponent
|
|
1230
|
+
*/
|
|
1231
|
+
legendColor() {
|
|
1232
|
+
Object.entries(this.groupTypes).forEach((node) => {
|
|
1233
|
+
this.groupsLegends.push({
|
|
1234
|
+
color: node[1].legendColor,
|
|
1235
|
+
label: node[1].name,
|
|
1236
|
+
});
|
|
1237
|
+
});
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* Sets the isGroupSearchOrFilterActive flag and loads parent group info as per selected filter option.
|
|
1241
|
+
* @param {SelectOption} event
|
|
1242
|
+
* @memberof GroupsComponent
|
|
1243
|
+
*/
|
|
1244
|
+
onGroupTypeFiltered(event) {
|
|
1245
|
+
this.selectedGroupType = event;
|
|
1246
|
+
this.isGroupSearchOrFilterActive = true;
|
|
1247
|
+
this.getGroupsPayload = [
|
|
1248
|
+
{
|
|
1249
|
+
key: 'groupId',
|
|
1250
|
+
value: '',
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
key: 'groupType',
|
|
1254
|
+
value: this.selectedGroupType?.id,
|
|
1255
|
+
},
|
|
1256
|
+
];
|
|
1257
|
+
this.getGroups();
|
|
1258
|
+
}
|
|
1259
|
+
/**
|
|
1260
|
+
* Loads all the parent groups information.
|
|
1261
|
+
* @memberof GroupsComponent
|
|
1262
|
+
*/
|
|
1263
|
+
getGroups(group) {
|
|
1264
|
+
if (group) {
|
|
1265
|
+
this.getGroupsPayload = [
|
|
1266
|
+
{
|
|
1267
|
+
key: 'groupId',
|
|
1268
|
+
value: group.groupId,
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
key: 'groupType',
|
|
1272
|
+
value: '',
|
|
1273
|
+
},
|
|
1274
|
+
];
|
|
1275
|
+
}
|
|
1276
|
+
this.groupsService
|
|
1277
|
+
.getAllGroups(this.getGroupsPayload)
|
|
1278
|
+
.pipe(takeUntil(this.destroy$))
|
|
1279
|
+
.subscribe({
|
|
1280
|
+
next: (response) => {
|
|
1281
|
+
if (response?.status) {
|
|
1282
|
+
if (group) {
|
|
1283
|
+
this.childGroupsInfo = this.viewGroupResponse(response?.body);
|
|
1284
|
+
}
|
|
1285
|
+
else if (this.isGroupAdded) {
|
|
1286
|
+
this.addGroupInfo = this.viewGroupResponse(response?.body);
|
|
1287
|
+
this.isGroupAdded = false;
|
|
1288
|
+
}
|
|
1289
|
+
else {
|
|
1290
|
+
this.parentGroupsInfo = this.viewGroupResponse(response?.body);
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
},
|
|
1294
|
+
error: (error) => {
|
|
1295
|
+
const errorCodes = error?.error?.body?.errorCodes;
|
|
1296
|
+
if (Array.isArray(errorCodes)) {
|
|
1297
|
+
const errorMessage = this.groupsService.parseErrorMessage(errorCodes);
|
|
1298
|
+
this.alertService.showMessage({
|
|
1299
|
+
status: 'custom',
|
|
1300
|
+
message: errorMessage,
|
|
1301
|
+
alertType: AlertType.ERROR,
|
|
1302
|
+
isCloseNeeded: true,
|
|
1303
|
+
});
|
|
1304
|
+
}
|
|
1305
|
+
else if (error && error instanceof HttpErrorResponse) {
|
|
1306
|
+
this.globalErrorHandlerService.handleError(error);
|
|
1307
|
+
}
|
|
1308
|
+
},
|
|
1309
|
+
});
|
|
1310
|
+
}
|
|
1311
|
+
/**
|
|
1312
|
+
* Sets groupType info with group response from groupType response
|
|
1313
|
+
* @param {GroupInfo[]} response
|
|
1314
|
+
* @return {*} {GroupInfo[]}
|
|
1315
|
+
* @memberof GroupsComponent
|
|
1316
|
+
*/
|
|
1317
|
+
viewGroupResponse(response) {
|
|
1318
|
+
response.forEach((node) => {
|
|
1319
|
+
const groupTypeInfo = this.groupTypes[node.groupType];
|
|
1320
|
+
node.groupTypeInfo = groupTypeInfo;
|
|
1321
|
+
});
|
|
1322
|
+
return response;
|
|
1323
|
+
}
|
|
1324
|
+
/**
|
|
1325
|
+
* Loads the group types.
|
|
1326
|
+
* @memberof GroupsComponent
|
|
1327
|
+
*/
|
|
1328
|
+
getGroupTypes() {
|
|
1329
|
+
this.groupsService
|
|
1330
|
+
.getGroupTypes()
|
|
1331
|
+
.pipe(takeUntil(this.destroy$))
|
|
1332
|
+
.subscribe({
|
|
1333
|
+
next: (res) => {
|
|
1334
|
+
if (res?.status) {
|
|
1335
|
+
this.groupTypes = res?.body?.configFieldValue;
|
|
1336
|
+
this.selectGroupOptions = this.getGroupTypeOptions();
|
|
1337
|
+
}
|
|
1338
|
+
},
|
|
1339
|
+
error: (error) => {
|
|
1340
|
+
const errorCodes = error?.error?.body?.errorCodes;
|
|
1341
|
+
if (Array.isArray(errorCodes)) {
|
|
1342
|
+
const errorMessage = this.groupsService.parseErrorMessage(errorCodes);
|
|
1343
|
+
this.alertService.showMessage({
|
|
1344
|
+
status: 'custom',
|
|
1345
|
+
message: errorMessage,
|
|
1346
|
+
alertType: AlertType.ERROR,
|
|
1347
|
+
isCloseNeeded: true,
|
|
1348
|
+
});
|
|
1349
|
+
}
|
|
1350
|
+
else if (error && error instanceof HttpErrorResponse) {
|
|
1351
|
+
this.globalErrorHandlerService.handleError(error);
|
|
1352
|
+
}
|
|
1353
|
+
},
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
475
1356
|
/**
|
|
476
1357
|
* NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
|
|
477
1358
|
* @memberof GroupsComponent
|
|
@@ -480,13 +1361,24 @@ class GroupsComponent {
|
|
|
480
1361
|
this.destroy$.next(true);
|
|
481
1362
|
this.destroy$.unsubscribe();
|
|
482
1363
|
}
|
|
483
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: GroupsComponent, deps: [{ token: i1.MatDialog }, { token: GroupsService }, { token:
|
|
484
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", type: GroupsComponent, isStandalone: true, selector: "ieeesa-groups", inputs: { applicationId: "applicationId", apiBaseURL: "apiBaseURL", permissions: "permissions" }, providers: [AlertsService], ngImport: i0, template: "<button type=\"button\" (click)=\"openCreateGroupForm()\">Create Group</button>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatDialogModule }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1364
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: GroupsComponent, deps: [{ token: i1$1.MatDialog }, { token: GroupsService }, { token: i3.AlertsService }, { token: i3.BreakpointObserverService }, { token: i3.GlobalErrorHandlerService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1365
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", type: GroupsComponent, isStandalone: true, selector: "ieeesa-groups", inputs: { groupsPageInfo: "groupsPageInfo", applicationId: "applicationId", apiBaseURL: "apiBaseURL", permissions: "permissions" }, providers: [AlertsService], ngImport: i0, template: "<div class=\"ieeesa-groups p-3 p-sm-4 p-md-4 p-lg-4\">\r\n <div\r\n class=\"ieeesa-groups__info d-flex justify-content-between pb-3\"\r\n [ngClass]=\"\r\n isMobileView\r\n ? 'ieeesa-groups__info--white-bg'\r\n : 'ieeesa-groups__info--blue-bg'\r\n \"\r\n >\r\n <p\r\n [ngClass]=\"isMobileView ? 'ieeesa-title-lg-24' : 'ieeesa-headline-lg-34'\"\r\n >\r\n {{ groupsPageInfo.groupsTitle }}\r\n </p>\r\n <div>\r\n <button\r\n mat-button\r\n class=\"ieeesa-groups__create-subgroup mat-tertiary-button d-none d-sm-none d-md-block d-lg-block d-xl-block\"\r\n (click)=\"openCreateGroupForm()\"\r\n [attr.aria-label]=\"constants.viewGroups.ariaLabel.addGroup\"\r\n >\r\n {{ constants.viewGroups.addGroup }}\r\n </button>\r\n </div>\r\n <div\r\n class=\"d-flex d-sm-flex d-md-none d-lg-none d-xl-none ieeesa-groups__mobile-icons gap-2\"\r\n >\r\n <ieeesa-icon-button\r\n [iconButton]=\"createGroupIcon\"\r\n (iconButtonClick)=\"openCreateGroupForm()\"\r\n >\r\n </ieeesa-icon-button>\r\n <ieeesa-icon-button\r\n [iconButton]=\"filterGroupIcon\"\r\n (iconButtonClick)=\"showGroupFilter()\"\r\n >\r\n </ieeesa-icon-button>\r\n <button\r\n mat-button\r\n [attr.aria-label]=\"constants.viewGroups.ariaLabel.search\"\r\n (click)=\"onGroupSearch()\"\r\n type=\"button\"\r\n >\r\n <i class=\"fa-solid fa-magnifying-glass search-group-icon\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n <div\r\n class=\"ieeesa-groups__actions\"\r\n [ngClass]=\"\r\n isMobileView\r\n ? 'ieeesa-groups__actions--white-bg'\r\n : 'ieeesa-groups__actions--blue-bg'\r\n \"\r\n >\r\n <div class=\"ieeesa-groups__actions--search row\">\r\n <p class=\"order-2 order-sm-1 col-12 col-md-7 col-lg-7 col-xl-7\">\r\n {{ groupsPageInfo.groupsDescription }}\r\n </p>\r\n <div\r\n *ngIf=\"\r\n ((isGroupSearchActive || isGroupFilterActive) && isMobileView) ||\r\n !isMobileView\r\n \"\r\n class=\"order-1 order-sm-2 col-12 col-md-5 col-lg-5 col-xl-5 d-flex flex-column\"\r\n >\r\n <ieeesa-search\r\n *ngIf=\"isGroupSearchActive || !isMobileView\"\r\n (searchValue)=\"onGroupSearchClick($event)\"\r\n [placeholderLabel]=\"searchPlaceHolderText\"\r\n ></ieeesa-search>\r\n <ieeesa-select\r\n *ngIf=\"isGroupFilterActive || !isMobileView\"\r\n class=\"align-self-end pt-lg-4 pt-md-4 pt-xl-4\"\r\n [dropdownOptions]=\"selectGroupOptions\"\r\n [isLabelAlignedLeft]=\"true\"\r\n [selectLabel]=\"constants.viewGroups.filterByLabel\"\r\n (optionSelected)=\"onGroupTypeFiltered($event)\"\r\n [placeholderText]=\"filterPlaceHolderText\"\r\n ></ieeesa-select>\r\n </div>\r\n </div>\r\n <ieeesa-tree\r\n *ngIf=\"parentGroupsInfo && parentGroupsInfo.length > 0\"\r\n [parentGroupsInfo]=\"parentGroupsInfo\"\r\n [childGroupsInfo]=\"childGroupsInfo\"\r\n [deleteGroupInfo]=\"deletedGroupId\"\r\n [addGroupInfo]=\"addGroupInfo\"\r\n [isGroupSearchOrFilterActive]=\"isGroupSearchOrFilterActive\"\r\n (toggleGroupClick)=\"getGroups($event)\"\r\n (createGroupClick)=\"openCreateGroupForm()\"\r\n (deleteGroupClick)=\"openDeleteConfirmationModal($event)\"\r\n ></ieeesa-tree>\r\n <div\r\n *ngIf=\"parentGroupsInfo && parentGroupsInfo.length > 0\"\r\n class=\"d-flex flex-column flex-sm-row flex-md-row mt-4 justify-content-start justify-content-sm-end\"\r\n >\r\n <p class=\"px-sm-3 d-flex align-items-center ieeesa-label-lg-bold-16\">\r\n {{ constants.viewGroups.legend }}\r\n </p>\r\n <ieeesa-legend\r\n [legends]=\"groupsLegends\"\r\n ></ieeesa-legend>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.56em;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25em;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625em;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375em;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-sm-38{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.375em;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125em;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-md-30{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.875em;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625em;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-lg-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-md-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-title-inter-lg-bold-24{font-family:Inter Bold;font-style:normal;font-weight:700;font-size:1.5em;line-height:29px;color:#000;letter-spacing:0}.mat-mdc-button.mat-mdc-button-base.mat-primary-button,.mat-mdc-button.mat-mdc-button-base.mat-secondary-button,.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{min-width:103px;width:auto;min-height:40px;height:auto;border-radius:3px;text-align:center;padding:.625em 1.5em;border:none;font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.mat-mdc-button.mat-mdc-button-base>.mat-icon{margin-right:11px}.mat-mdc-button.mat-mdc-button-base.mat-primary-button{background-color:#00629b;color:#fff}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:hover{background-color:#003e65}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:active{background-color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:disabled{background-color:#1c1b1f1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button{color:#fff;background:#a7a8aa;box-shadow:0 1px 2px #0000004d,0 2px 6px 2px #00000026}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:hover{background:#a7a8aa}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:rgba(29,25,43,.12)}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{background-color:#fff;border:1px solid #00629b;color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:hover{background-color:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:rgba(103,80,164,.12)}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.flex-align-center{display:flex;align-items:center;justify-content:center}.mat-button-toggle-checked{background-color:#a7a8aa}.mat-button-toggle-checked .mat-button-toggle-label-content:before{font-family:\"Font Awesome 5 Free\";font-weight:900;content:\"\\f00c\";padding-right:.5625em}.mat-button-toggle-group .mat-button-toggle-label-content{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#1c1b1f;letter-spacing:.00625em}.no-bg-color-btn{color:#00629b;border-radius:3px;border:1px solid #00629b;min-height:40px;height:auto}@media (max-width: 768px){.mat-button-toggle-group .mat-button-toggle-label-content{max-width:8ch;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;position:relative}}.cdk-overlay-pane.ieeesa-modal-confirm-dialog,.cdk-overlay-pane.ieeesa-modal-dialog,.cdk-overlay-pane.ieeesa-alert-dialog{width:100%;min-width:312px}.mat-mdc-form-field{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-groups{background-color:#f2f2f2}.ieeesa-groups__mobile-icons .mat-mdc-button{min-width:45px;padding:0 10px}.ieeesa-groups__mobile-icons .ieeesa-icon-button__svg{height:1.5em!important;width:1.5em!important}.ieeesa-groups__info--white-bg{background-color:#fff;padding:16px 24px 0}.ieeesa-groups__info .search-group-icon{height:1.5em;color:#00629b}.ieeesa-groups__actions{background-color:#fff;box-shadow:0 2px #00b5e2 inset;padding:16px 24px 48px}.ieeesa-groups__actions--white-bg{background-color:#fff;box-shadow:none}.ieeesa-groups .ieeesa-select-field__label{width:max-content;padding-right:9px;font-size:1em}.ieeesa-groups .ieeesa-select-field__label-left{display:flex;align-items:baseline}.ieeesa-groups .ieeesa-select-field .mat-mdc-form-field{width:auto}.ieeesa-groups .ieeesa-select-field .ieeesa-form-support-text{display:none}.ieeesa-groups .ieeesa-search-field__search-icon{color:#00629b}.ieeesa-groups .ieeesa-search-field .mat-mdc-form-field{border-radius:3px;background:linear-gradient(0deg,rgba(0,98,155,.05) 0%,rgba(0,98,155,.05) 100%),#fffbfe;font-size:1em;box-shadow:0 0 4px #00000080 inset}.ieeesa-groups .ieeesa-search-field .mat-mdc-form-field .mdc-notched-outline__leading,.ieeesa-groups .ieeesa-search-field .mat-mdc-form-field .mdc-notched-outline__notch,.ieeesa-groups .ieeesa-search-field .mat-mdc-form-field .mdc-notched-outline__trailing{border:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: SearchComponent, selector: "ieeesa-search", inputs: ["formControlName", "placeholderLabel", "searchType", "searchTerm"], outputs: ["searchValue"] }, { kind: "component", type: SelectComponent, selector: "ieeesa-select", inputs: ["isSortNeeded", "dropdownOptions", "selectedOptions", "formControlName", "isMultiLevel", "isLabelAlignedLeft", "selectLabel", "isMultiSelect", "isDisabled", "isSearch", "placeholderText"], outputs: ["optionSelected", "optionSearched"] }, { kind: "component", type: TreeViewComponent, selector: "ieeesa-tree", inputs: ["parentGroupsInfo", "childGroupsInfo", "isGroupSearchOrFilterActive", "deleteGroupInfo", "addGroupInfo"], outputs: ["toggleGroupClick", "createGroupClick", "editGroupClick", "deleteGroupClick"] }, { kind: "component", type: LegendComponent, selector: "ieeesa-legend", inputs: ["legends"] }, { kind: "component", type: IconButtonComponent, selector: "ieeesa-icon-button", inputs: ["iconButton"], outputs: ["iconButtonClick"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
485
1366
|
}
|
|
486
1367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: GroupsComponent, decorators: [{
|
|
487
1368
|
type: Component,
|
|
488
|
-
args: [{ selector:
|
|
489
|
-
|
|
1369
|
+
args: [{ selector: 'ieeesa-groups', standalone: true, imports: [
|
|
1370
|
+
CommonModule,
|
|
1371
|
+
MatDialogModule,
|
|
1372
|
+
MatButtonModule,
|
|
1373
|
+
SearchComponent,
|
|
1374
|
+
SelectComponent,
|
|
1375
|
+
TreeViewComponent,
|
|
1376
|
+
LegendComponent,
|
|
1377
|
+
IconButtonComponent,
|
|
1378
|
+
], encapsulation: ViewEncapsulation.None, providers: [AlertsService], template: "<div class=\"ieeesa-groups p-3 p-sm-4 p-md-4 p-lg-4\">\r\n <div\r\n class=\"ieeesa-groups__info d-flex justify-content-between pb-3\"\r\n [ngClass]=\"\r\n isMobileView\r\n ? 'ieeesa-groups__info--white-bg'\r\n : 'ieeesa-groups__info--blue-bg'\r\n \"\r\n >\r\n <p\r\n [ngClass]=\"isMobileView ? 'ieeesa-title-lg-24' : 'ieeesa-headline-lg-34'\"\r\n >\r\n {{ groupsPageInfo.groupsTitle }}\r\n </p>\r\n <div>\r\n <button\r\n mat-button\r\n class=\"ieeesa-groups__create-subgroup mat-tertiary-button d-none d-sm-none d-md-block d-lg-block d-xl-block\"\r\n (click)=\"openCreateGroupForm()\"\r\n [attr.aria-label]=\"constants.viewGroups.ariaLabel.addGroup\"\r\n >\r\n {{ constants.viewGroups.addGroup }}\r\n </button>\r\n </div>\r\n <div\r\n class=\"d-flex d-sm-flex d-md-none d-lg-none d-xl-none ieeesa-groups__mobile-icons gap-2\"\r\n >\r\n <ieeesa-icon-button\r\n [iconButton]=\"createGroupIcon\"\r\n (iconButtonClick)=\"openCreateGroupForm()\"\r\n >\r\n </ieeesa-icon-button>\r\n <ieeesa-icon-button\r\n [iconButton]=\"filterGroupIcon\"\r\n (iconButtonClick)=\"showGroupFilter()\"\r\n >\r\n </ieeesa-icon-button>\r\n <button\r\n mat-button\r\n [attr.aria-label]=\"constants.viewGroups.ariaLabel.search\"\r\n (click)=\"onGroupSearch()\"\r\n type=\"button\"\r\n >\r\n <i class=\"fa-solid fa-magnifying-glass search-group-icon\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n <div\r\n class=\"ieeesa-groups__actions\"\r\n [ngClass]=\"\r\n isMobileView\r\n ? 'ieeesa-groups__actions--white-bg'\r\n : 'ieeesa-groups__actions--blue-bg'\r\n \"\r\n >\r\n <div class=\"ieeesa-groups__actions--search row\">\r\n <p class=\"order-2 order-sm-1 col-12 col-md-7 col-lg-7 col-xl-7\">\r\n {{ groupsPageInfo.groupsDescription }}\r\n </p>\r\n <div\r\n *ngIf=\"\r\n ((isGroupSearchActive || isGroupFilterActive) && isMobileView) ||\r\n !isMobileView\r\n \"\r\n class=\"order-1 order-sm-2 col-12 col-md-5 col-lg-5 col-xl-5 d-flex flex-column\"\r\n >\r\n <ieeesa-search\r\n *ngIf=\"isGroupSearchActive || !isMobileView\"\r\n (searchValue)=\"onGroupSearchClick($event)\"\r\n [placeholderLabel]=\"searchPlaceHolderText\"\r\n ></ieeesa-search>\r\n <ieeesa-select\r\n *ngIf=\"isGroupFilterActive || !isMobileView\"\r\n class=\"align-self-end pt-lg-4 pt-md-4 pt-xl-4\"\r\n [dropdownOptions]=\"selectGroupOptions\"\r\n [isLabelAlignedLeft]=\"true\"\r\n [selectLabel]=\"constants.viewGroups.filterByLabel\"\r\n (optionSelected)=\"onGroupTypeFiltered($event)\"\r\n [placeholderText]=\"filterPlaceHolderText\"\r\n ></ieeesa-select>\r\n </div>\r\n </div>\r\n <ieeesa-tree\r\n *ngIf=\"parentGroupsInfo && parentGroupsInfo.length > 0\"\r\n [parentGroupsInfo]=\"parentGroupsInfo\"\r\n [childGroupsInfo]=\"childGroupsInfo\"\r\n [deleteGroupInfo]=\"deletedGroupId\"\r\n [addGroupInfo]=\"addGroupInfo\"\r\n [isGroupSearchOrFilterActive]=\"isGroupSearchOrFilterActive\"\r\n (toggleGroupClick)=\"getGroups($event)\"\r\n (createGroupClick)=\"openCreateGroupForm()\"\r\n (deleteGroupClick)=\"openDeleteConfirmationModal($event)\"\r\n ></ieeesa-tree>\r\n <div\r\n *ngIf=\"parentGroupsInfo && parentGroupsInfo.length > 0\"\r\n class=\"d-flex flex-column flex-sm-row flex-md-row mt-4 justify-content-start justify-content-sm-end\"\r\n >\r\n <p class=\"px-sm-3 d-flex align-items-center ieeesa-label-lg-bold-16\">\r\n {{ constants.viewGroups.legend }}\r\n </p>\r\n <ieeesa-legend\r\n [legends]=\"groupsLegends\"\r\n ></ieeesa-legend>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.56em;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25em;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625em;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375em;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-sm-38{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.375em;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125em;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-md-30{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.875em;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625em;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-lg-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5em;line-height:28px;color:#000;letter-spacing:0}.ieeesa-title-md-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125em;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-18{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1em;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875em;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-title-inter-lg-bold-24{font-family:Inter Bold;font-style:normal;font-weight:700;font-size:1.5em;line-height:29px;color:#000;letter-spacing:0}.mat-mdc-button.mat-mdc-button-base.mat-primary-button,.mat-mdc-button.mat-mdc-button-base.mat-secondary-button,.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{min-width:103px;width:auto;min-height:40px;height:auto;border-radius:3px;text-align:center;padding:.625em 1.5em;border:none;font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#000;letter-spacing:.00625em}.mat-mdc-button.mat-mdc-button-base>.mat-icon{margin-right:11px}.mat-mdc-button.mat-mdc-button-base.mat-primary-button{background-color:#00629b;color:#fff}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:hover{background-color:#003e65}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:active{background-color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-primary-button:disabled{background-color:#1c1b1f1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button{color:#fff;background:#a7a8aa;box-shadow:0 1px 2px #0000004d,0 2px 6px 2px #00000026}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:hover{background:#a7a8aa}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:rgba(29,25,43,.12)}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button{background-color:#fff;border:1px solid #00629b;color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:hover{background-color:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:rgba(103,80,164,.12)}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.flex-align-center{display:flex;align-items:center;justify-content:center}.mat-button-toggle-checked{background-color:#a7a8aa}.mat-button-toggle-checked .mat-button-toggle-label-content:before{font-family:\"Font Awesome 5 Free\";font-weight:900;content:\"\\f00c\";padding-right:.5625em}.mat-button-toggle-group .mat-button-toggle-label-content{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1em;line-height:20px;color:#1c1b1f;letter-spacing:.00625em}.no-bg-color-btn{color:#00629b;border-radius:3px;border:1px solid #00629b;min-height:40px;height:auto}@media (max-width: 768px){.mat-button-toggle-group .mat-button-toggle-label-content{max-width:8ch;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;position:relative}}.cdk-overlay-pane.ieeesa-modal-confirm-dialog,.cdk-overlay-pane.ieeesa-modal-dialog,.cdk-overlay-pane.ieeesa-alert-dialog{width:100%;min-width:312px}.mat-mdc-form-field{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125em;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-groups{background-color:#f2f2f2}.ieeesa-groups__mobile-icons .mat-mdc-button{min-width:45px;padding:0 10px}.ieeesa-groups__mobile-icons .ieeesa-icon-button__svg{height:1.5em!important;width:1.5em!important}.ieeesa-groups__info--white-bg{background-color:#fff;padding:16px 24px 0}.ieeesa-groups__info .search-group-icon{height:1.5em;color:#00629b}.ieeesa-groups__actions{background-color:#fff;box-shadow:0 2px #00b5e2 inset;padding:16px 24px 48px}.ieeesa-groups__actions--white-bg{background-color:#fff;box-shadow:none}.ieeesa-groups .ieeesa-select-field__label{width:max-content;padding-right:9px;font-size:1em}.ieeesa-groups .ieeesa-select-field__label-left{display:flex;align-items:baseline}.ieeesa-groups .ieeesa-select-field .mat-mdc-form-field{width:auto}.ieeesa-groups .ieeesa-select-field .ieeesa-form-support-text{display:none}.ieeesa-groups .ieeesa-search-field__search-icon{color:#00629b}.ieeesa-groups .ieeesa-search-field .mat-mdc-form-field{border-radius:3px;background:linear-gradient(0deg,rgba(0,98,155,.05) 0%,rgba(0,98,155,.05) 100%),#fffbfe;font-size:1em;box-shadow:0 0 4px #00000080 inset}.ieeesa-groups .ieeesa-search-field .mat-mdc-form-field .mdc-notched-outline__leading,.ieeesa-groups .ieeesa-search-field .mat-mdc-form-field .mdc-notched-outline__notch,.ieeesa-groups .ieeesa-search-field .mat-mdc-form-field .mdc-notched-outline__trailing{border:none}\n"] }]
|
|
1379
|
+
}], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: GroupsService }, { type: i3.AlertsService }, { type: i3.BreakpointObserverService }, { type: i3.GlobalErrorHandlerService }]; }, propDecorators: { groupsPageInfo: [{
|
|
1380
|
+
type: Input
|
|
1381
|
+
}], applicationId: [{
|
|
490
1382
|
type: Input
|
|
491
1383
|
}], apiBaseURL: [{
|
|
492
1384
|
type: Input
|
|
@@ -516,5 +1408,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImpor
|
|
|
516
1408
|
* Generated bundle index. Do not edit.
|
|
517
1409
|
*/
|
|
518
1410
|
|
|
519
|
-
export { CreateGroupComponent, GroupFunctionType, GroupsComponent, GroupsModule, GroupsService, GroupsValidationPatterns };
|
|
1411
|
+
export { CreateGroupComponent, GroupAction, GroupFunctionType, GroupNode, Groups, GroupsComponent, GroupsDataSource, GroupsModule, GroupsService, GroupsValidationPatterns, TreeViewComponent };
|
|
520
1412
|
//# sourceMappingURL=ieeesa-npm-groups.mjs.map
|