@ieeesa-npm/tenants 0.4.6 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/esm2022/ieeesa-npm-tenants.mjs +5 -0
  2. package/esm2022/lib/assets/constants.json +454 -0
  3. package/esm2022/lib/assets/tenant-validations.mjs +17 -0
  4. package/esm2022/lib/components/create-modify-group-type/create-modify-group-type.component.mjs +476 -0
  5. package/esm2022/lib/components/create-modify-role/create-modify-role.component.mjs +279 -0
  6. package/esm2022/lib/components/create-tenant-application/create-tenant-application.component.mjs +512 -0
  7. package/esm2022/lib/components/roles-and-permissions-mapping/roles-and-permissions-mapping.component.mjs +391 -0
  8. package/esm2022/lib/components/tenant-basic-details/tenant-basic-details.component.mjs +94 -0
  9. package/esm2022/lib/components/view-tenant-details/view-tenant-details.component.mjs +733 -0
  10. package/esm2022/lib/components/view-tenant-group-types/view-tenant-group-types.component.mjs +194 -0
  11. package/esm2022/lib/components/view-tenants-list/view-tenants-list.component.mjs +335 -0
  12. package/esm2022/lib/models/app-type-config.model.mjs +2 -0
  13. package/esm2022/lib/models/app-type.model.mjs +7 -0
  14. package/esm2022/lib/models/create-group-type-config.model.mjs +22 -0
  15. package/esm2022/lib/models/create-group-type.model.mjs +2 -0
  16. package/esm2022/lib/models/feature-permission-id.model.mjs +8 -0
  17. package/esm2022/lib/models/features.model.mjs +2 -0
  18. package/esm2022/lib/models/permission-type.model.mjs +12 -0
  19. package/esm2022/lib/models/role-menu-action.model.mjs +7 -0
  20. package/esm2022/lib/models/role-type.model.mjs +2 -0
  21. package/esm2022/lib/models/roles-and-permissions-table-type.model.mjs +7 -0
  22. package/esm2022/lib/models/roles-and-permissions.model.mjs +2 -0
  23. package/esm2022/lib/models/route-config.model.mjs +2 -0
  24. package/esm2022/lib/models/table-column-schema-view-tenant-list.model.mjs +16 -0
  25. package/esm2022/lib/models/tenant-function-type.model.mjs +12 -0
  26. package/esm2022/lib/models/tenant.model.mjs +2 -0
  27. package/esm2022/lib/models/tenants-permission.model.mjs +2 -0
  28. package/esm2022/lib/models/update-tenant-status.model.mjs +2 -0
  29. package/esm2022/lib/models/view-tenant-group-types.model.mjs +11 -0
  30. package/esm2022/lib/services/tenant-applications.service.mjs +618 -0
  31. package/esm2022/lib/services/tenant-permissions-map.service.mjs +36 -0
  32. package/esm2022/lib/services/tenant-permissions.service.mjs +38 -0
  33. package/esm2022/lib/tenant-applications.component.mjs +14 -0
  34. package/esm2022/lib/tenant-applications.module.mjs +16 -0
  35. package/esm2022/public-api.mjs +36 -0
  36. package/fesm2022/ieeesa-npm-tenants.mjs +4233 -0
  37. package/fesm2022/ieeesa-npm-tenants.mjs.map +1 -0
  38. package/index.d.ts +5 -0
  39. package/lib/assets/tenant-validations.d.ts +15 -0
  40. package/lib/components/create-modify-group-type/create-modify-group-type.component.d.ts +129 -0
  41. package/lib/components/create-modify-role/create-modify-role.component.d.ts +103 -0
  42. package/lib/components/create-tenant-application/create-tenant-application.component.d.ts +128 -0
  43. package/lib/components/roles-and-permissions-mapping/roles-and-permissions-mapping.component.d.ts +106 -0
  44. package/lib/components/tenant-basic-details/tenant-basic-details.component.d.ts +471 -0
  45. package/lib/components/view-tenant-details/view-tenant-details.component.d.ts +223 -0
  46. package/lib/components/view-tenant-group-types/view-tenant-group-types.component.d.ts +63 -0
  47. package/lib/components/view-tenants-list/view-tenants-list.component.d.ts +134 -0
  48. package/lib/models/app-type-config.model.d.ts +14 -0
  49. package/lib/models/app-type.model.d.ts +4 -0
  50. package/lib/models/create-group-type-config.model.d.ts +16 -0
  51. package/lib/models/create-group-type.model.d.ts +49 -0
  52. package/lib/models/feature-permission-id.model.d.ts +4 -0
  53. package/lib/models/features.model.d.ts +15 -0
  54. package/lib/models/permission-type.model.d.ts +8 -0
  55. package/lib/models/role-menu-action.model.d.ts +4 -0
  56. package/lib/models/role-type.model.d.ts +27 -0
  57. package/lib/models/roles-and-permissions-table-type.model.d.ts +4 -0
  58. package/lib/models/roles-and-permissions.model.d.ts +119 -0
  59. package/lib/models/route-config.model.d.ts +4 -0
  60. package/lib/models/table-column-schema-view-tenant-list.model.d.ts +20 -0
  61. package/lib/models/tenant-function-type.model.d.ts +9 -0
  62. package/lib/models/tenant.model.d.ts +51 -0
  63. package/lib/models/tenants-permission.model.d.ts +9 -0
  64. package/lib/models/update-tenant-status.model.d.ts +14 -0
  65. package/lib/models/view-tenant-group-types.model.d.ts +29 -0
  66. package/lib/services/tenant-applications.service.d.ts +399 -0
  67. package/lib/services/tenant-permissions-map.service.d.ts +13 -0
  68. package/lib/services/tenant-permissions.service.d.ts +22 -0
  69. package/lib/tenant-applications.component.d.ts +5 -0
  70. package/lib/tenant-applications.module.d.ts +6 -0
  71. package/package.json +25 -12
  72. package/{src/public-api.ts → public-api.d.ts} +32 -40
  73. package/.eslintrc.json +0 -31
  74. package/ng-package.json +0 -8
  75. package/src/lib/assets/constants.json +0 -454
  76. package/src/lib/assets/tenant-validations.ts +0 -18
  77. package/src/lib/assets/tenants-mock.ts +0 -1240
  78. package/src/lib/components/create-modify-group-type/create-modify-group-type.component.html +0 -15
  79. package/src/lib/components/create-modify-group-type/create-modify-group-type.component.scss +0 -44
  80. package/src/lib/components/create-modify-group-type/create-modify-group-type.component.spec.ts +0 -574
  81. package/src/lib/components/create-modify-group-type/create-modify-group-type.component.ts +0 -602
  82. package/src/lib/components/create-modify-role/create-modify-role.component.html +0 -15
  83. package/src/lib/components/create-modify-role/create-modify-role.component.scss +0 -83
  84. package/src/lib/components/create-modify-role/create-modify-role.component.spec.ts +0 -346
  85. package/src/lib/components/create-modify-role/create-modify-role.component.ts +0 -321
  86. package/src/lib/components/create-tenant-application/create-tenant-application.component.html +0 -18
  87. package/src/lib/components/create-tenant-application/create-tenant-application.component.scss +0 -73
  88. package/src/lib/components/create-tenant-application/create-tenant-application.component.spec.ts +0 -775
  89. package/src/lib/components/create-tenant-application/create-tenant-application.component.ts +0 -638
  90. package/src/lib/components/roles-and-permissions-mapping/roles-and-permissions-mapping.component.html +0 -22
  91. package/src/lib/components/roles-and-permissions-mapping/roles-and-permissions-mapping.component.scss +0 -79
  92. package/src/lib/components/roles-and-permissions-mapping/roles-and-permissions-mapping.component.spec.ts +0 -716
  93. package/src/lib/components/roles-and-permissions-mapping/roles-and-permissions-mapping.component.ts +0 -504
  94. package/src/lib/components/tenant-basic-details/tenant-basic-details.component.html +0 -37
  95. package/src/lib/components/tenant-basic-details/tenant-basic-details.component.scss +0 -16
  96. package/src/lib/components/tenant-basic-details/tenant-basic-details.component.spec.ts +0 -115
  97. package/src/lib/components/tenant-basic-details/tenant-basic-details.component.ts +0 -109
  98. package/src/lib/components/view-tenant-details/view-tenant-details.component.html +0 -195
  99. package/src/lib/components/view-tenant-details/view-tenant-details.component.scss +0 -163
  100. package/src/lib/components/view-tenant-details/view-tenant-details.component.spec.ts +0 -1221
  101. package/src/lib/components/view-tenant-details/view-tenant-details.component.ts +0 -876
  102. package/src/lib/components/view-tenant-group-types/view-tenant-group-types.component.html +0 -10
  103. package/src/lib/components/view-tenant-group-types/view-tenant-group-types.component.scss +0 -44
  104. package/src/lib/components/view-tenant-group-types/view-tenant-group-types.component.spec.ts +0 -410
  105. package/src/lib/components/view-tenant-group-types/view-tenant-group-types.component.ts +0 -219
  106. package/src/lib/components/view-tenants-list/view-tenants-list.component.html +0 -32
  107. package/src/lib/components/view-tenants-list/view-tenants-list.component.scss +0 -35
  108. package/src/lib/components/view-tenants-list/view-tenants-list.component.spec.ts +0 -464
  109. package/src/lib/components/view-tenants-list/view-tenants-list.component.ts +0 -388
  110. package/src/lib/models/app-type-config.model.ts +0 -14
  111. package/src/lib/models/app-type.model.ts +0 -5
  112. package/src/lib/models/create-group-type-config.model.ts +0 -18
  113. package/src/lib/models/create-group-type.model.ts +0 -46
  114. package/src/lib/models/feature-permission-id.model.ts +0 -6
  115. package/src/lib/models/features.model.ts +0 -15
  116. package/src/lib/models/form-status.model.ts +0 -5
  117. package/src/lib/models/permission-type.model.ts +0 -9
  118. package/src/lib/models/role-menu-action.model.ts +0 -5
  119. package/src/lib/models/role-type.model.ts +0 -34
  120. package/src/lib/models/roles-and-permissions-table-type.model.ts +0 -5
  121. package/src/lib/models/roles-and-permissions.model.ts +0 -113
  122. package/src/lib/models/route-config.model.ts +0 -4
  123. package/src/lib/models/table-column-schema-view-tenant-list.model.ts +0 -21
  124. package/src/lib/models/tenant-function-type.model.ts +0 -10
  125. package/src/lib/models/tenant.model.ts +0 -47
  126. package/src/lib/models/tenants-permission.model.ts +0 -9
  127. package/src/lib/models/update-tenant-status.model.ts +0 -12
  128. package/src/lib/models/view-tenant-group-types.model.ts +0 -34
  129. package/src/lib/services/tenant-applications.service.spec.ts +0 -1245
  130. package/src/lib/services/tenant-applications.service.ts +0 -798
  131. package/src/lib/services/tenant-permissions-map.service.spec.ts +0 -25
  132. package/src/lib/services/tenant-permissions-map.service.ts +0 -28
  133. package/src/lib/services/tenant-permissions.service.spec.ts +0 -62
  134. package/src/lib/services/tenant-permissions.service.ts +0 -49
  135. package/src/lib/tenant-applications.component.html +0 -0
  136. package/src/lib/tenant-applications.component.scss +0 -0
  137. package/src/lib/tenant-applications.component.spec.ts +0 -28
  138. package/src/lib/tenant-applications.component.ts +0 -12
  139. package/src/lib/tenant-applications.module.ts +0 -8
  140. package/tsconfig.lib.json +0 -14
  141. package/tsconfig.lib.prod.json +0 -10
  142. package/tsconfig.spec.json +0 -14
@@ -0,0 +1,4233 @@
1
+ import * as i7 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { Injectable, EventEmitter, Component, ViewEncapsulation, ViewChild, Output, Input, ViewContainerRef, NgModule } from '@angular/core';
5
+ import * as i2 from '@ieeesa-npm/presentation';
6
+ import { AlignType, AllowedFileTypes, FormControlType, DynamicFormComponent, TableColumnType, ModalComponent, TableColumnSortDirection, DataTableComponent, ImagePreviewComponent, CheckboxComponent, AccordionDetails, ModalConfirmationComponent, SlideToggleComponent, AccordionComponent, IconButtonComponent } from '@ieeesa-npm/presentation';
7
+ import { Subject, map, catchError, takeUntil } from 'rxjs';
8
+ import * as i8 from '@angular/material/button';
9
+ import { MatButtonModule } from '@angular/material/button';
10
+ import { FormStatus, ModalType, AlertType } from '@ieeesa-npm/models';
11
+ import { Validators } from '@angular/forms';
12
+ import { validColorValidator } from 'ngx-colors';
13
+ import * as i1 from '@ieeesa-npm/utility';
14
+ import * as i2$1 from '@ieeesa-npm/shared';
15
+ import * as i1$1 from '@angular/material/dialog';
16
+ import * as i6 from '@angular/router';
17
+ import { RouterModule } from '@angular/router';
18
+ import * as i8$1 from '@angular/material/divider';
19
+ import { MatDividerModule } from '@angular/material/divider';
20
+ import { HttpErrorResponse } from '@angular/common/http';
21
+ import { GroupRosterType, RoleType } from '@ieeesa-npm/groups';
22
+
23
+ var createTenant = {
24
+ heading: "New Application",
25
+ label: {
26
+ leftButtonLabel: "Cancel",
27
+ rightButtonLabel: "Save",
28
+ appTitle: "Application Title",
29
+ appId: "Application Id",
30
+ appLogo: "Application Logo",
31
+ appHeading: "Application Heading",
32
+ appDescription: "Application Description",
33
+ appBgColor: "Application Background Color",
34
+ appHelpLink: "Application Help Link",
35
+ featuresList: "Selection of list of features",
36
+ featureVersion: "Feature Version",
37
+ domainURL: "Domain URL",
38
+ appType: "Application Type",
39
+ ariaLabel: {
40
+ appTitle: "Application Title",
41
+ appId: "Application Id",
42
+ appLogo: "Application Logo",
43
+ appHeading: "Application Heading",
44
+ appDescription: "Application Description",
45
+ appBgColor: "Application Background Color",
46
+ appHelpLink: "Application Help Link",
47
+ featuresList: "Selection of list of features",
48
+ featureVersion: "Feature Version",
49
+ domainURL: "Domain URL",
50
+ appType: "Application Type"
51
+ },
52
+ ariaDescribedById: {
53
+ appTitle: "ariaApplicationTitle",
54
+ appId: "ariaApplicationId",
55
+ appLogo: "ariaApplicationLogo",
56
+ appHeading: "ariaApplicationHeading",
57
+ appDescription: "ariaApplicationDescription",
58
+ appBgColor: "ariaApplicationBackgroundColor",
59
+ appHelpLink: "ariaApplicationHelpLink",
60
+ featuresList: "ariaFeatures",
61
+ featureVersion: "ariaFeatureVersion",
62
+ domainURL: "ariaDomainURL",
63
+ appType: "ariaApplicationType"
64
+ }
65
+ },
66
+ message: {
67
+ error: {
68
+ required: "This field is required.",
69
+ invalidColor: "Invalid color.",
70
+ invalidFile: "Invalid file format. Please upload SVG, PNG and JPG file format only.",
71
+ limit: {
72
+ appTitleMaxChars: "Application Title must not be greater than 50 characters long.",
73
+ appIdMaxChars: "Application Id must not be greater than 10 characters long.",
74
+ appHeadingMaxChars: "Application Heading must not be greater than 150 characters long.",
75
+ appDescriptionMaxChars: "Application Description must not be greater than 500 characters long.",
76
+ appLogoMaxSize: "File size exceeds the maximum limit."
77
+ },
78
+ pattern: {
79
+ appId: "It should only allow Alphanumeric characters.",
80
+ appHelpLink: "Invalid URL.",
81
+ appDomainUrl: "Invalid URL."
82
+ }
83
+ },
84
+ success: {
85
+ submission: "has been created successfully."
86
+ }
87
+ },
88
+ supportText: {
89
+ appTitle: "Enter application name.",
90
+ appId: "Enter application id.",
91
+ appLogo: "Upload application logo.",
92
+ appHeading: "Enter application heading.",
93
+ appDescription: "Enter application description.",
94
+ appBgColor: "Choose background color.",
95
+ appHelpLink: "Enter application help link.",
96
+ featuresList: "Select reusable feature(s).",
97
+ featureVersion: "Select feature version.",
98
+ domainURL: "Enter domain URL."
99
+ },
100
+ errors: {
101
+ "2003": "Application Type not found.",
102
+ "2026": "List of features not found.",
103
+ "2028": "Application Title is required.",
104
+ "2029": "Application Logo is required.",
105
+ "2030": "Application Heading is required.",
106
+ "2031": "Application Description is required.",
107
+ "2032": "Background color is required.",
108
+ "2033": "Help link is required.",
109
+ "2034": "Domain Url is required.",
110
+ "2035": "Application Type is required.",
111
+ "2036": "Application Features are required.",
112
+ "2037": "Application Title must not be greater than 50 characters long.",
113
+ "2038": "Application Heading must not be greater than 150 characters long",
114
+ "2039": "Application Description must not be greater than 500 characters long.",
115
+ "2040": "Invalid URL.",
116
+ "2041": "Application Id is required.",
117
+ "2042": "Application Id must not be greater than 10 characters long",
118
+ "2043": "Application Id contains invalid characters. Please enter alphanumeric characters only.",
119
+ "2044": "Invalid URL.",
120
+ "2045": "Application Id must be unique.",
121
+ "2046": "Application Features are required.",
122
+ "2047": "Application Type is required.",
123
+ "2048": "Features Not Found.",
124
+ "2049": "Unable to display tenants. Please try again later.",
125
+ "2050": "Tenant Details not found.",
126
+ "2052": "Not allowed to update Application Id and Application Type.",
127
+ "2053": "Default features to be pre-selected."
128
+ },
129
+ buttons: {
130
+ addApplicationLabel: "Add Application"
131
+ }
132
+ };
133
+ var createRole = {
134
+ heading: "New Role",
135
+ label: {
136
+ leftButtonLabel: "Cancel",
137
+ rightButtonLabel: "Save",
138
+ appTitle: "Application Title",
139
+ roleType: "Role Type",
140
+ roleName: "Role Name",
141
+ ariaLabel: {
142
+ appTitle: "Application Title",
143
+ roleType: "Role Type",
144
+ roleName: "Role Name"
145
+ },
146
+ ariaDescribedById: {
147
+ appTitle: "ariaApplicationTitle",
148
+ roleType: "ariaRoleType",
149
+ roleName: "ariaRoleName"
150
+ }
151
+ },
152
+ message: {
153
+ error: {
154
+ required: "This field is required.",
155
+ limit: {
156
+ roleNameMaxChars: "Role name must not be greater than 100 characters long."
157
+ }
158
+ },
159
+ success: {
160
+ submission1: "New",
161
+ submission2: "has been successfully added to the",
162
+ submission3: "You can map the permissions for the newly added role.",
163
+ modify: "has been successfully edited for the"
164
+ }
165
+ },
166
+ supportText: {
167
+ roleType: "Select role type from the dropdown.",
168
+ roleName: "Enter role name."
169
+ },
170
+ errors: {
171
+ "3011": "App Id is required.",
172
+ "3012": "role already exists.",
173
+ "3013": "Application Id modification not allowed.",
174
+ "3014": "Role Type not found.",
175
+ "3015": "Role Type is required.",
176
+ "3016": "Role Name is required.",
177
+ "3017": "Role Type not found."
178
+ }
179
+ };
180
+ var editTenant = {
181
+ message: {
182
+ success: {
183
+ submission: "has been updated successfully."
184
+ }
185
+ }
186
+ };
187
+ var viewTenants = {
188
+ tenantsTitle: "Tenant Application Management",
189
+ addTenant: "Add Application",
190
+ emptyFieldValueReplacedBy: "-",
191
+ createTenantsIcon: "assets/images/sprites/sprites.svg#icon-create-group-white-bg",
192
+ pageSizeOptions: [
193
+ 10,
194
+ 20,
195
+ 50,
196
+ 100
197
+ ],
198
+ ariaLabel: {
199
+ add: "Add Application"
200
+ },
201
+ label: {
202
+ appId: "Application ID",
203
+ status: "Status",
204
+ viewAllApps: "View All Applications",
205
+ saAppId: "SAAPPS",
206
+ active: "Active",
207
+ inactive: "Inactive"
208
+ },
209
+ buttons: {
210
+ id: 1,
211
+ ariaLabel: "Edit Application Details",
212
+ label: "Edit Application Details",
213
+ toolTip: "Edit Application Details",
214
+ iconURL: "assets/images/sprites/sprites.svg#icon-edit-tenant"
215
+ },
216
+ tableColumns: {
217
+ appId: "Application Id",
218
+ appTitle: "Application Title",
219
+ appDescription: "Application Description",
220
+ features: "Features",
221
+ status: "Status"
222
+ },
223
+ confirmationInfo: {
224
+ leftButtonLabel: "Cancel",
225
+ rightButtonLabel: "OK",
226
+ promptMessage: "Are you sure you want to",
227
+ promptMessageInactivate: "inactivate",
228
+ promptMessageActivate: "reactivate",
229
+ ariaLabel: {
230
+ alert: "Alert"
231
+ },
232
+ deleteRoleConfirmationMessage: "Are you sure you want to delete the",
233
+ deleteRolePromptMessage: "Deleting this role will remove all current assignments in the"
234
+ },
235
+ errors: {
236
+ "2050": "Tenant Details not found.",
237
+ "2051": "Failure to update tenant status.",
238
+ "2054": "IEEE SA Collaboration Portal cannot be inactivated.",
239
+ "3007": "No Role(s) found.",
240
+ "3008": "No Permission(s) found.",
241
+ "3009": "Unable to fetch Roles and Permissions Mapping.",
242
+ "3010": "Role Id is required.",
243
+ "3011": "Application Id is required."
244
+ },
245
+ tenantAccordionInfo: [
246
+ {
247
+ id: 1,
248
+ title: "Basic Details",
249
+ isDisabled: false,
250
+ content: "Basic data"
251
+ },
252
+ {
253
+ id: 2,
254
+ title: "Roles and Permissions",
255
+ isDisabled: false,
256
+ content: "Roles"
257
+ },
258
+ {
259
+ id: 3,
260
+ title: "Group Types",
261
+ isDisabled: false,
262
+ content: "Groups"
263
+ }
264
+ ],
265
+ tenantBasicDetails: {
266
+ label: {
267
+ title: "Title",
268
+ logo: "Logo",
269
+ description: "Description",
270
+ bgColor: "Background Color",
271
+ heading: "Heading",
272
+ helpLink: "Help Link",
273
+ listOfFeatures: "List of features",
274
+ featureVersion: "Feature Version",
275
+ domainURL: "Domain URL",
276
+ type: "Type"
277
+ }
278
+ }
279
+ };
280
+ var viewRolesAndPermissions = {
281
+ tableCaption: "Roles & Permissions Matrix",
282
+ tableColumnsHeaderText: "ROLES",
283
+ scrollbarSupportMessage: "Scroll right for viewing more roles.",
284
+ pageSizeOptions: [
285
+ 10,
286
+ 20,
287
+ 50,
288
+ 100
289
+ ],
290
+ columnActionIconSize: "fa-xs",
291
+ actionButtonLabels: {
292
+ addRole: "Add Role",
293
+ mapPermissionsRoles: "Map Permissions & Roles"
294
+ },
295
+ tableColumn: {
296
+ permissions: "PERMISSIONS"
297
+ },
298
+ tableCellValue: {
299
+ yes: "Yes",
300
+ no: "No"
301
+ },
302
+ columnActionMenuItems: [
303
+ {
304
+ id: 1,
305
+ label: "Edit Role",
306
+ ariaLabel: "Edit Role",
307
+ iconURL: "",
308
+ toolTip: "",
309
+ isToolTipNeeded: false
310
+ },
311
+ {
312
+ id: 2,
313
+ label: "Delete Role",
314
+ ariaLabel: "Delete Role",
315
+ iconURL: "",
316
+ toolTip: "",
317
+ isToolTipNeeded: false
318
+ }
319
+ ]
320
+ };
321
+ var mapRolesAndPermissions = {
322
+ heading: "Map Permissions & Roles",
323
+ legend: "Select a Role or Permission to continue",
324
+ roleTableCaption: "Role: ",
325
+ permissionTableCaption: "Permission: ",
326
+ label: {
327
+ leftButtonLabel: "Cancel",
328
+ rightButtonLabel: "Save",
329
+ role: "Role",
330
+ permission: "Permission",
331
+ ariaLabel: {
332
+ role: "Role",
333
+ permission: "Permission"
334
+ },
335
+ ariaDescribedById: {
336
+ role: "ariaRole",
337
+ permission: "ariaPermission"
338
+ }
339
+ },
340
+ tableColumns: {
341
+ role: "Role",
342
+ permission: "Permission",
343
+ status: "Status"
344
+ },
345
+ message: {
346
+ success: {
347
+ rolesAndPermissionsSubmission: "Role(s) & Permission(s) successfully updated."
348
+ }
349
+ },
350
+ supportText: {
351
+ role: "Choose a role from the available list.",
352
+ permission: "Choose a permission from the available list."
353
+ },
354
+ errors: {
355
+ "3007": "Role(s) not found.",
356
+ "3008": "Permission(s) not found.",
357
+ "3009": "Role Permission details does not exist.",
358
+ "3017": "Role Permission Mapping does not exist for given role Id.",
359
+ "3020": "Roles does not exist for given permission Id.",
360
+ "3021": "Permissions does not exist for given role Id."
361
+ }
362
+ };
363
+ var deleteRole = {
364
+ message: {
365
+ success: {
366
+ submission: "role has been successfully deleted from the"
367
+ }
368
+ }
369
+ };
370
+ var viewGroupTypes = {
371
+ actionButtonLabels: {
372
+ addGroupType: "Add Group Type"
373
+ },
374
+ actionMenuItems: [
375
+ {
376
+ id: 1,
377
+ label: "Edit Group Type",
378
+ ariaLabel: "Edit Group Type",
379
+ iconURL: "",
380
+ toolTip: "",
381
+ isToolTipNeeded: false,
382
+ isDisabled: false
383
+ },
384
+ {
385
+ id: 2,
386
+ label: "Delete Group Type",
387
+ ariaLabel: "Delete Group Type",
388
+ iconURL: "",
389
+ toolTip: "",
390
+ isToolTipNeeded: false,
391
+ isDisabled: false
392
+ }
393
+ ],
394
+ tableColumns: {
395
+ heading: {
396
+ groupType: "Group Type",
397
+ rosterType: "Roster Type",
398
+ description: "Description",
399
+ applicableRoles: "Applicable Roles",
400
+ settings: "Settings",
401
+ action: "Actions"
402
+ }
403
+ },
404
+ settings: {
405
+ allowSubGroup: "Allow Sub-Groups",
406
+ allowRoster: "Enable Rosters",
407
+ allowAlternateVoting: "Allow Alternate Voting",
408
+ hasClassification: "Has Classification",
409
+ allowEdit: "Allow Edit",
410
+ allowDelete: "Allow Delete"
411
+ },
412
+ errors: {
413
+ "1010": "Group Type(s) not found.",
414
+ "2050": "Tenant Details not found."
415
+ }
416
+ };
417
+ var routeConfigPath = {
418
+ viewTenants: "tenants/view-tenants-list",
419
+ viewTenantDetails: "tenants/view-tenant-details"
420
+ };
421
+ var createGroupType = {
422
+ heading: "New Group Type",
423
+ label: {
424
+ leftButtonLabel: "Cancel",
425
+ rightButtonLabel: "Save",
426
+ groupType: "Group Type",
427
+ description: "Description",
428
+ settings: "Settings",
429
+ rosterType: "Roster Type",
430
+ appMemberLevel: "Applicable Member Level",
431
+ appOfficerRoles: "Applicable Officer Roles",
432
+ isRootGroup: "Is Root Group",
433
+ allowedSubGroupTypes: "Allowed Sub Group Type(s)",
434
+ ariaLabel: {
435
+ groupType: "Group Type",
436
+ description: "Description",
437
+ settings: "Settings",
438
+ rosterType: "Roster Type",
439
+ appMemberLevel: "Applicable Member Level",
440
+ appOfficerRoles: "Applicable Officer Roles",
441
+ isRootGroup: "Is Root Group",
442
+ allowedSubGroupTypes: "Allowed Sub Group Type(s)"
443
+ },
444
+ ariaDescribedById: {
445
+ groupType: "ariaGroupType",
446
+ description: "ariaDescription",
447
+ settings: "ariaSettings",
448
+ rosterType: "ariaRosterType",
449
+ appMemberLevel: "ariaApplicableMemberLevel",
450
+ appOfficerRoles: "ariaApplicableOfficerRoles",
451
+ isRootGroup: "ariaIsRootGroup",
452
+ allowedSubGroupTypes: "ariaAllowedSubGroupTypes"
453
+ }
454
+ },
455
+ message: {
456
+ success: {
457
+ submissionPart1: "New ",
458
+ submissionPart2: " has been successfully added to the"
459
+ },
460
+ error: {
461
+ required: "This field is required.",
462
+ limit: {
463
+ groupTypeMaxChars: "Group Type must not be greater than 30 characters long.",
464
+ descriptionMaxChars: "Description must not be greater than 500 characters long."
465
+ }
466
+ }
467
+ },
468
+ supportText: {
469
+ groupType: "Enter Group Type.",
470
+ description: "Enter Group Type description."
471
+ },
472
+ isRootGroupOptions: {
473
+ yes: "Yes",
474
+ no: "No"
475
+ },
476
+ errors: {
477
+ "2066": "Roster Type or Settings not found.",
478
+ "2067": "Group Type Name already exist.",
479
+ "3007": "No Role(s) found.",
480
+ "3017": "Description is required.",
481
+ "3018": "Role is required.",
482
+ "3019": "Configure officer and member level roles before creating group type."
483
+ }
484
+ };
485
+ var constants = {
486
+ createTenant: createTenant,
487
+ createRole: createRole,
488
+ editTenant: editTenant,
489
+ viewTenants: viewTenants,
490
+ viewRolesAndPermissions: viewRolesAndPermissions,
491
+ mapRolesAndPermissions: mapRolesAndPermissions,
492
+ deleteRole: deleteRole,
493
+ viewGroupTypes: viewGroupTypes,
494
+ routeConfigPath: routeConfigPath,
495
+ createGroupType: createGroupType
496
+ };
497
+
498
+ var screenText = /*#__PURE__*/Object.freeze({
499
+ __proto__: null,
500
+ createGroupType: createGroupType,
501
+ createRole: createRole,
502
+ createTenant: createTenant,
503
+ default: constants,
504
+ deleteRole: deleteRole,
505
+ editTenant: editTenant,
506
+ mapRolesAndPermissions: mapRolesAndPermissions,
507
+ routeConfigPath: routeConfigPath,
508
+ viewGroupTypes: viewGroupTypes,
509
+ viewRolesAndPermissions: viewRolesAndPermissions,
510
+ viewTenants: viewTenants
511
+ });
512
+
513
+ /* eslint-disable no-unused-vars */
514
+ var PermissionType;
515
+ (function (PermissionType) {
516
+ PermissionType["VIEW_TENANTS"] = "VIEW_TENANTS";
517
+ PermissionType["MANAGE_TENANT"] = "MANAGE_TENANT";
518
+ })(PermissionType || (PermissionType = {}));
519
+ var TenantStatus;
520
+ (function (TenantStatus) {
521
+ TenantStatus["ACTIVE"] = "Active";
522
+ TenantStatus["INACTIVE"] = "Inactive";
523
+ })(TenantStatus || (TenantStatus = {}));
524
+
525
+ /* eslint-disable no-unused-vars */
526
+ var ViewTenantsColumnSchemaDef;
527
+ (function (ViewTenantsColumnSchemaDef) {
528
+ ViewTenantsColumnSchemaDef["APP_ID"] = "appId";
529
+ ViewTenantsColumnSchemaDef["APP_TITLE"] = "appTitle";
530
+ ViewTenantsColumnSchemaDef["APP_DESCRIPTION"] = "appDescription";
531
+ ViewTenantsColumnSchemaDef["APP_HEADING"] = "appHeading";
532
+ ViewTenantsColumnSchemaDef["FEATURES"] = "features";
533
+ ViewTenantsColumnSchemaDef["STATUS"] = "status";
534
+ })(ViewTenantsColumnSchemaDef || (ViewTenantsColumnSchemaDef = {}));
535
+ var SortOrderBy;
536
+ (function (SortOrderBy) {
537
+ SortOrderBy["DESC"] = "DESC";
538
+ SortOrderBy["ASC"] = "ASC";
539
+ })(SortOrderBy || (SortOrderBy = {}));
540
+
541
+ /* eslint-disable no-useless-escape */
542
+ const TenantsValidationPatterns = {
543
+ appTitleMaxLength: 50,
544
+ appIdMaxLength: 10,
545
+ appHeadingMaxLength: 150,
546
+ appDescriptionMaxLength: 500,
547
+ url: /^https:\/\//,
548
+ alphaNumeric: /^[a-zA-Z0-9]+$/,
549
+ };
550
+ const RolesValidation = {
551
+ roleNameMaxLength: 100,
552
+ };
553
+ const GroupTypeValidation = {
554
+ groupTypeMaxLength: 30,
555
+ descriptionMaxLength: 500
556
+ };
557
+
558
+ /* eslint-disable no-unused-vars */
559
+ var TenantFunctionType;
560
+ (function (TenantFunctionType) {
561
+ TenantFunctionType["CREATE"] = "CREATE";
562
+ TenantFunctionType["EDIT"] = "EDIT";
563
+ TenantFunctionType["CREATE_ROLE"] = "CREATE_ROLE";
564
+ TenantFunctionType["EDIT_ROLE"] = "EDIT_ROLE";
565
+ TenantFunctionType["MAP_PERMISSION_AND_ROLE"] = "MAP_PERMISSION_AND_ROLE";
566
+ TenantFunctionType["CREATE_GROUP_TYPE"] = "CREATE_GROUP_TYPE";
567
+ TenantFunctionType["EDIT_GROUP_TYPE"] = "EDIT_GROUP_TYPE";
568
+ })(TenantFunctionType || (TenantFunctionType = {}));
569
+
570
+ class TenantPermissionsService {
571
+ /**
572
+ * Returns access provision for the passed action/feature based on whether the signed in user has appropriate permission.
573
+ * @param {PermissionType} permission
574
+ * @param {TenantsPermission[]} tenantsPermissions
575
+ * @return {boolean}
576
+ * @memberof TenantPermissionsService
577
+ */
578
+ validateAccessPermission(permission, userTenantsPermissions) {
579
+ const isPermitted = userTenantsPermissions && userTenantsPermissions.length
580
+ ? userTenantsPermissions?.some(({ permissionType }) => permissionType === permission)
581
+ : false;
582
+ return isPermitted;
583
+ }
584
+ /**
585
+ * Filters signed in user tenants permissions from entire tenants permissions.
586
+ * @param { UserPermission[] }
587
+ * @return {TenantsPermissions[]}
588
+ * @memberof TenantPermissionsService
589
+ */
590
+ filterTenantsPermissions(userPermissions, tenantsPermissions) {
591
+ const userTenantsPermission = tenantsPermissions?.filter((permission) => {
592
+ return userPermissions?.find(({ permissionId }) => permission?.permissionId === permissionId);
593
+ });
594
+ return userTenantsPermission;
595
+ }
596
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantPermissionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
597
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantPermissionsService, providedIn: 'root' }); }
598
+ }
599
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantPermissionsService, decorators: [{
600
+ type: Injectable,
601
+ args: [{
602
+ providedIn: 'root',
603
+ }]
604
+ }] });
605
+
606
+ class TenantPermissionsMapService {
607
+ constructor() {
608
+ this.globalTenantsPermissions = [
609
+ {
610
+ permissionType: PermissionType.VIEW_TENANTS,
611
+ permissionId: 'PERM_1a2dbbb5-5fe1-4261-85b1-a5373f41075a',
612
+ permissionName: 'View Tenant Applications',
613
+ },
614
+ {
615
+ permissionType: PermissionType.MANAGE_TENANT,
616
+ permissionId: 'PERM_315c49ec-f79a-4dcd-9795-6f97838c8c83',
617
+ permissionName: 'Manage (Create, Edit, Disable) Tenant Application',
618
+ },
619
+ ];
620
+ }
621
+ /**
622
+ * Returns global permissions mapping for tenants.
623
+ * @return {TenantsPermissions[]}
624
+ * @memberof TenantsPermissionsMapService
625
+ */
626
+ getGlobalTenantsPermissions() {
627
+ return this.globalTenantsPermissions;
628
+ }
629
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantPermissionsMapService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
630
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantPermissionsMapService, providedIn: 'root' }); }
631
+ }
632
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantPermissionsMapService, decorators: [{
633
+ type: Injectable,
634
+ args: [{
635
+ providedIn: 'root',
636
+ }]
637
+ }] });
638
+
639
+ class TenantApplicationsService {
640
+ constructor(
641
+ // eslint-disable-next-line no-unused-vars
642
+ httpService,
643
+ // eslint-disable-next-line no-unused-vars
644
+ tenantPermissionsService,
645
+ // eslint-disable-next-line no-unused-vars
646
+ tenantPermissionsMapService // eslint-disable-next-line no-empty-function
647
+ ) {
648
+ this.httpService = httpService;
649
+ this.tenantPermissionsService = tenantPermissionsService;
650
+ this.tenantPermissionsMapService = tenantPermissionsMapService;
651
+ this.tenantsText = viewTenants?.errors;
652
+ this.createTenantsText = createTenant?.errors;
653
+ this.radioOptions = [];
654
+ this.checkBoxOptions = [];
655
+ this.appTypeInfo = [];
656
+ this.featureList = [];
657
+ this.roleTypeOptions = [];
658
+ this.isGroupTypeAddedOrModified = new Subject();
659
+ }
660
+ setAppConfig(apiBaseUrl, userPermission) {
661
+ this.apiBaseUrl = apiBaseUrl;
662
+ this.userPermission = userPermission;
663
+ }
664
+ /**
665
+ * Gets tenant details from server using HttpService
666
+ * @param {string} appId
667
+ * @return {Observable<TenantDetailsResponse>}
668
+ * @memberof TenantApplicationsService
669
+ */
670
+ getTenantDetails(appId) {
671
+ return this.httpService
672
+ .getData(`${this.apiBaseUrl}/configurations/app/details/${appId}`)
673
+ .pipe(map((response) => {
674
+ return response;
675
+ }), catchError((error) => {
676
+ throw error;
677
+ }));
678
+ }
679
+ /**
680
+ * Sets the user tenants permissions
681
+ * @param {TenantsPermissions[]} TenantsPermissions
682
+ * @memberof TenantApplicationsService
683
+ */
684
+ setUserTenantsPermissions(userTenantsPermissions) {
685
+ this.userTenantsPermissions = userTenantsPermissions;
686
+ }
687
+ /**
688
+ * Returns the user tenants permissions
689
+ * @return {TenantsPermissions[]}
690
+ * @memberof TenantApplicationsService
691
+ */
692
+ getUserTenantsPermissions() {
693
+ return this.userTenantsPermissions;
694
+ }
695
+ /**
696
+ * Sets the user tenants information
697
+ * @param {TenantBasicInfo} tenantInfo
698
+ * @memberof TenantApplicationsService
699
+ */
700
+ setSelectedTenantInformation(tenantInfo) {
701
+ this.selectedTenantInfo = tenantInfo;
702
+ }
703
+ /**
704
+ * Returns the tenants information
705
+ * @return {TenantBasicInfo}
706
+ * @memberof TenantApplicationsService
707
+ */
708
+ getSelectedTenantInformation() {
709
+ return this.selectedTenantInfo;
710
+ }
711
+ /**
712
+ * Sets the roles informations
713
+ * @param {Role} roles
714
+ * @memberof TenantApplicationsService
715
+ */
716
+ setRolesInfo(roles) {
717
+ this.roles = roles;
718
+ }
719
+ /**
720
+ * Returns the roles information
721
+ * @return {Role}
722
+ * @memberof TenantApplicationsService
723
+ */
724
+ getRolesInfo() {
725
+ return this.roles;
726
+ }
727
+ /**
728
+ * Sets the selected role information.
729
+ * @param {RoleDetails} roleInfo
730
+ * @memberof TenantApplicationsService
731
+ */
732
+ setSelectedRoleInformation(roleInfo) {
733
+ this.selectedRoleInfo = roleInfo;
734
+ }
735
+ /**
736
+ * Returns the selected role information.
737
+ * @return {RoleDetails}
738
+ * @memberof TenantApplicationsService
739
+ */
740
+ getSelectedRoleInformation() {
741
+ return this.selectedRoleInfo;
742
+ }
743
+ /**
744
+ * Sets the tenant role type options.
745
+ * @param {RoleTypeOption} roleTypeOptions
746
+ * @memberof TenantApplicationsService
747
+ */
748
+ setRoleTypeOption(roleTypeOptions) {
749
+ this.roleTypeOption = roleTypeOptions;
750
+ }
751
+ /**
752
+ * Returns the tenant role type options.
753
+ * @return {RoleTypeOption}
754
+ * @memberof TenantApplicationsService
755
+ */
756
+ getRoleTypeOption() {
757
+ return this.roleTypeOption;
758
+ }
759
+ /**
760
+ * Sets the list of application type information
761
+ * @param {RadioOption} appTypeInfo
762
+ * @memberof TenantApplicationsService
763
+ */
764
+ setApplicationType(appTypeInfo) {
765
+ this.appTypeInfo = appTypeInfo;
766
+ }
767
+ /**
768
+ * Returns the list of application type information
769
+ * @return {RadioOption}
770
+ * @memberof TenantApplicationsService
771
+ */
772
+ getApplicationType() {
773
+ return this.appTypeInfo;
774
+ }
775
+ /**
776
+ * Filter permissions
777
+ * @param usersPermissions
778
+ * @returns @memberof TenantApplicationsService
779
+ */
780
+ filterPermission(usersPermissions) {
781
+ return this.tenantPermissionsService?.filterTenantsPermissions(usersPermissions, this.tenantPermissionsMapService?.getGlobalTenantsPermissions());
782
+ }
783
+ /**
784
+ * Validating access for tenants
785
+ * @param permissionType Permission Type to validate permission
786
+ * @param mappedUserPermissions Permission which are mapped with tenants
787
+ * @returns true if permission is granted
788
+ */
789
+ validateAccess(permissionType, permissions) {
790
+ return this.tenantPermissionsService.validateAccessPermission(permissionType, permissions);
791
+ }
792
+ /**
793
+ * Gets the tenants.
794
+ * @param {GetTenantsPayload} payload
795
+ * @return {Observable<GetTenantsResponse>}
796
+ * @memberof TenantApplicationsService
797
+ */
798
+ getTenantsList(payload) {
799
+ return this.httpService
800
+ .postData(`${this.apiBaseUrl}/configurations/app/config`, payload)
801
+ .pipe(map((response) => {
802
+ return response;
803
+ }), catchError((error) => {
804
+ throw error;
805
+ }));
806
+ }
807
+ /**
808
+ * Gets list of features from server using HttpService.
809
+ * @return {Observable<GetFeaturesResponse>}
810
+ * @memberof TenantApplicationsService
811
+ */
812
+ getFeatures() {
813
+ return this.httpService
814
+ .getData(`${this.apiBaseUrl}/configurations/app/features`)
815
+ .pipe(map((response) => {
816
+ return response;
817
+ }), catchError((error) => {
818
+ throw error;
819
+ }));
820
+ }
821
+ /**
822
+ * Gets list of roles from server using HttpService.
823
+ * @param {string} appId
824
+ * @return {*} {Observable<GetRolesResponse>}
825
+ * @memberof TenantApplicationsService
826
+ */
827
+ getRoles(appId) {
828
+ return this.httpService
829
+ .getData(`${this.apiBaseUrl}/groups/role/${appId}`)
830
+ .pipe(map((response) => {
831
+ return response;
832
+ }), catchError((error) => {
833
+ throw error;
834
+ }));
835
+ }
836
+ /**
837
+ * Gets the list of permissions based on the appId and return the success or error response as Observable.
838
+ * @param {string} appId
839
+ * @return {Observable<GetPermissionsResponse>}
840
+ * @memberof TenantApplicationsService
841
+ */
842
+ getPermissions(appId) {
843
+ return this.httpService
844
+ .getData(`${this.apiBaseUrl}/groups/permissions/${appId}`)
845
+ .pipe(map((response) => {
846
+ return response;
847
+ }), catchError((error) => {
848
+ throw error;
849
+ }));
850
+ }
851
+ /**
852
+ * Gets the list of roles or permissions based on the roleId or permissionId in the payload and return the success or error response as Observable.
853
+ * @param {RolePermissionMappingRequestPayload} payload
854
+ * @returns {Observable<RolePermissionMappingResponse>}
855
+ * @memberof TenantApplicationsService
856
+ */
857
+ getRolePermissionMapping(payload) {
858
+ return this.httpService
859
+ .postData(`${this.apiBaseUrl}/groups/users/rolePermissionMapping`, payload)
860
+ .pipe(map((response) => {
861
+ return response;
862
+ }), catchError((error) => {
863
+ throw error;
864
+ }));
865
+ }
866
+ /**
867
+ * Submit the new mappings of roles to permissions to the server.
868
+ * @param {RolesAndPermissionsRequestPayload} payload
869
+ * @returns {Observable<RolesAndPermissionsResponse>}
870
+ * @memberof TenantApplicationsService
871
+ */
872
+ saveRolePermissionMapping(payload) {
873
+ return this.httpService
874
+ .postData(`${this.apiBaseUrl}/groups/users/rolePermission`, payload)
875
+ .pipe(map((response) => {
876
+ return response;
877
+ }), catchError((error) => {
878
+ throw error;
879
+ }));
880
+ }
881
+ /**
882
+ * Gets list of roles and permissions mappings from server using HttpService.
883
+ * @param {string} appId
884
+ * @param {GetRolesAndPermissionsPayload} payload
885
+ * @return {*} {Observable<GetRolesAndPermissionsResponse>}
886
+ * @memberof TenantApplicationsService
887
+ */
888
+ getRolesAndPermissionsMappings(appId, payload) {
889
+ return this.httpService
890
+ .postData(`${this.apiBaseUrl}/groups/roleBasedPermissions/${appId}`, payload)
891
+ .pipe(map((response) => {
892
+ return response;
893
+ }), catchError((error) => {
894
+ throw error;
895
+ }));
896
+ }
897
+ /**
898
+ * Gets list of application types from server using HttpService.
899
+ * @return {Observable<GetAppTypesResponse>}
900
+ * @memberof TenantApplicationsService
901
+ */
902
+ getApplicationTypes() {
903
+ return this.httpService
904
+ .getData(`${this.apiBaseUrl}/configurations/config/app_type`)
905
+ .pipe(map((response) => {
906
+ return response;
907
+ }), catchError((error) => {
908
+ throw error;
909
+ }));
910
+ }
911
+ /**
912
+ * Posts create role form data to server using HttpService to create a new role.
913
+ * @param {CreateModifyRoleRequestPayload} createModifyRolePayload
914
+ * @return {Observable<CreateModifyRoleResponse>}
915
+ * @memberof TenantApplicationsService
916
+ */
917
+ createRole(createModifyRolePayload) {
918
+ return this.httpService
919
+ .postData(`${this.apiBaseUrl}/groups/role`, createModifyRolePayload)
920
+ .pipe(map((response) => {
921
+ return response;
922
+ }), catchError((error) => {
923
+ throw error;
924
+ }));
925
+ }
926
+ /**
927
+ * Posts the edited role form data to server using HttpService for updating the role information.
928
+ * @param {CreateModifyRoleRequestPayload} createModifyRolePayload
929
+ * @return {Observable<CreateModifyRoleResponse>}
930
+ * @memberof TenantApplicationsService
931
+ */
932
+ editRole(createModifyRolePayload) {
933
+ return this.httpService
934
+ .putData(`${this.apiBaseUrl}/groups/role`, createModifyRolePayload)
935
+ .pipe(map((response) => {
936
+ return response;
937
+ }), catchError((error) => {
938
+ throw error;
939
+ }));
940
+ }
941
+ /**
942
+ * Gets list of role types from server using HttpService.
943
+ * @param {GetRoleTypesPayload} payload
944
+ * @return {Observable<RoleTypeResponse>}
945
+ * @memberof TenantApplicationsService
946
+ */
947
+ getRoleTypes(payload) {
948
+ return this.httpService
949
+ .postData(`${this.apiBaseUrl}/configurations/config/configField`, payload)
950
+ .pipe(map((response) => {
951
+ return response;
952
+ }), catchError((error) => {
953
+ throw error;
954
+ }));
955
+ }
956
+ /**
957
+ * Constructs the select/dropdown options from the role types received from server.
958
+ * @param {RoleTypeConfiguration[]} roleTypeResponse
959
+ * @return {RoleTypeOption[]}
960
+ * @memberof TenantApplicationsService
961
+ */
962
+ getRoleTypeOptions(roleTypeResponse) {
963
+ this.roleTypeOptions = [];
964
+ roleTypeResponse.forEach((item) => {
965
+ this.roleTypeOptions?.push({
966
+ id: item?.configFieldId,
967
+ name: item?.configFieldValue?.roleTypeName,
968
+ order: item?.configFieldValue?.viewOrder,
969
+ });
970
+ });
971
+ this.roleTypeOptions.sort((a, b) => a.order - b.order);
972
+ return this.roleTypeOptions;
973
+ }
974
+ /**
975
+ * Posts tenant application form data to server using HttpService for creating new tenant application.
976
+ * @param {CreateTenantPayload} createTenantPayload
977
+ * @return {Observable<CreateTenantResponse>}
978
+ * @memberof TenantApplicationsService
979
+ */
980
+ createTenant(createTenantPayload) {
981
+ return this.httpService
982
+ .postData(`${this.apiBaseUrl}/configurations/app/createTenant`, createTenantPayload)
983
+ .pipe(map((response) => {
984
+ return response;
985
+ }), catchError((error) => {
986
+ throw error;
987
+ }));
988
+ }
989
+ /**
990
+ * Constructs the checkbox options from features list from server.
991
+ * @param {FeaturesList[]} features
992
+ * @returns {CheckboxOption[]}
993
+ */
994
+ getFeatureOptions(features) {
995
+ this.checkBoxOptions = [];
996
+ features?.forEach((feature) => {
997
+ this.checkBoxOptions?.push({
998
+ id: feature?.featureId,
999
+ name: feature?.featureName,
1000
+ checked: feature?.isDefault,
1001
+ disabled: feature?.isDefault,
1002
+ });
1003
+ });
1004
+ return this.checkBoxOptions;
1005
+ }
1006
+ /**
1007
+ * Constructs the radio options from application types from server.
1008
+ * @param {AppTypeConfig[]} appTypeOptions
1009
+ * @returns {RadioOption[]}
1010
+ */
1011
+ getApplicationTypeOptions(appTypeOptions) {
1012
+ this.radioOptions = [];
1013
+ appTypeOptions?.forEach((appType) => {
1014
+ this.radioOptions?.push({
1015
+ id: appType?.configFieldId,
1016
+ label: appType?.configFieldValue?.type,
1017
+ });
1018
+ });
1019
+ return this.radioOptions;
1020
+ }
1021
+ /**
1022
+ * Constructs the selected features id's.
1023
+ * @param {CheckboxOption[]} featureOptions
1024
+ * @returns {FeatureId[]}
1025
+ */
1026
+ getFeatureIds(featureOptions) {
1027
+ const featureIds = [];
1028
+ featureOptions?.forEach((featureOption) => {
1029
+ if (featureOption?.checked) {
1030
+ featureIds.push({
1031
+ featureId: featureOption.id,
1032
+ });
1033
+ }
1034
+ });
1035
+ return featureIds;
1036
+ }
1037
+ /**
1038
+ * Sets the newly created tenant information.
1039
+ * @param {NewTenantInfo} newTenantInfo
1040
+ */
1041
+ setNewTenantInfo(newTenantInfo) {
1042
+ this.newTenantInfo = newTenantInfo;
1043
+ }
1044
+ /**
1045
+ * Returns the newly created tenant information.
1046
+ */
1047
+ get getNewTenantInfo() {
1048
+ return this.newTenantInfo;
1049
+ }
1050
+ /**
1051
+ * Sets tenant function type.
1052
+ * @param {TenantFunctionType} tenantFunctionType -tenant function type.
1053
+ */
1054
+ setTenantFunctionType(tenantFunctionType) {
1055
+ this.tenantFunctionType = tenantFunctionType;
1056
+ }
1057
+ /**
1058
+ * Returns tenant function type.
1059
+ * @return {TenantFunctionType} -tenant function type.
1060
+ */
1061
+ getTenantFunctionType() {
1062
+ return this.tenantFunctionType;
1063
+ }
1064
+ /**
1065
+ * Stores the newly created role information.
1066
+ * @param {RoleInfo} newlyCreatedRole -create role information.
1067
+ */
1068
+ setNewlyCreatedRoleInfo(newlyCreatedRole) {
1069
+ this.newlyCreatedRole = newlyCreatedRole;
1070
+ }
1071
+ /**
1072
+ * Returns the newly created role information.
1073
+ * @return {RoleInfo} -create role information.
1074
+ */
1075
+ getNewlyCreatedRoleInfo() {
1076
+ return this.newlyCreatedRole;
1077
+ }
1078
+ /**
1079
+ * Stores the newly created group type information.
1080
+ * @param {CreatedOrModifiedGroupTypeInfo} newlyCreatedGroupType
1081
+ * @memberof TenantApplicationsService
1082
+ */
1083
+ setNewlyCreatedGroupTypeInfo(newlyCreatedGroupType) {
1084
+ this.newlyCreatedGroupType = newlyCreatedGroupType;
1085
+ }
1086
+ /**
1087
+ * Returns the newly created group type information.
1088
+ * @return {*} {CreatedOrModifiedGroupTypeInfo}
1089
+ * @memberof TenantApplicationsService
1090
+ */
1091
+ getNewlyCreatedGroupTypeInfo() {
1092
+ return this.newlyCreatedGroupType;
1093
+ }
1094
+ /**
1095
+ * Posts the edited tenant application form data to server using HttpService for updating the tenant information.
1096
+ * @param {CreateTenantPayload} editTenantPayload
1097
+ * @return {Observable<CreateTenantResponse>}
1098
+ * @memberof TenantApplicationsService
1099
+ */
1100
+ editTenant(editTenantPayload) {
1101
+ return this.httpService
1102
+ .putData(`${this.apiBaseUrl}/configurations/app/editTenant`, editTenantPayload)
1103
+ .pipe(map((response) => {
1104
+ return response;
1105
+ }), catchError((error) => {
1106
+ throw error;
1107
+ }));
1108
+ }
1109
+ /**
1110
+ * Sends update request to the server to update the tenant application status to active/inactive using HttpService and returns the success or failure response.
1111
+ * @param {UpdateTenantStatusRequestPayload} updateTenantStatusPayload
1112
+ * @return {Observable<UpdateTenantStatusResponse>}
1113
+ * @memberof TenantApplicationsService
1114
+ */
1115
+ updateTenantStatus(updateTenantStatusPayload) {
1116
+ return this.httpService
1117
+ .putData(`${this.apiBaseUrl}/configurations/app/updateStatus`, updateTenantStatusPayload)
1118
+ .pipe(map((response) => {
1119
+ return response;
1120
+ }), catchError((error) => {
1121
+ throw error;
1122
+ }));
1123
+ }
1124
+ /**
1125
+ * It generates Feature list from checkbox options generated in form array.
1126
+ * @param {CheckboxOption[]} features
1127
+ * @return {Features[]}
1128
+ * @memberof TenantApplicationsService
1129
+ */
1130
+ getFeaturesList(features) {
1131
+ this.featureList = [];
1132
+ features?.forEach((feature) => {
1133
+ if (feature.checked)
1134
+ this.featureList?.push({
1135
+ featureId: feature?.id,
1136
+ featureName: feature?.name,
1137
+ isDefault: feature?.checked,
1138
+ });
1139
+ });
1140
+ return this.featureList;
1141
+ }
1142
+ /**
1143
+ * Gets roster type from server using HttpService.
1144
+ * @return {*} {Observable<GetRosterTypeOrSettingsResponse>}
1145
+ * @memberof TenantApplicationsService
1146
+ */
1147
+ getRosterType() {
1148
+ return this.httpService
1149
+ .getData(`${this.apiBaseUrl}/configurations/lookup/RosterType`)
1150
+ .pipe(map((response) => {
1151
+ return response;
1152
+ }), catchError((error) => {
1153
+ throw error;
1154
+ }));
1155
+ }
1156
+ /**
1157
+ * Gets group type settings from server using HttpService.
1158
+ * @return {*} {Observable<GetRosterTypeOrSettingsResponse>}
1159
+ * @memberof TenantApplicationsService
1160
+ */
1161
+ getGroupTypeSettings() {
1162
+ return this.httpService
1163
+ .getData(`${this.apiBaseUrl}/configurations/lookup/GT_Settings`)
1164
+ .pipe(map((response) => {
1165
+ return response;
1166
+ }), catchError((error) => {
1167
+ throw error;
1168
+ }));
1169
+ }
1170
+ /**
1171
+ * Posts the group type details to server using HttpService to create new group type.
1172
+ * @param {CreateGroupTypeRequestPayload} createGroupTypePayload
1173
+ * @return {*} {Observable<CreateGroupTypeResponse>}
1174
+ * @memberof TenantApplicationsService
1175
+ */
1176
+ createGroupType(createGroupTypePayload) {
1177
+ return this.httpService
1178
+ .postData(`${this.apiBaseUrl}/configurations/config/groupType`, createGroupTypePayload)
1179
+ .pipe(map((response) => {
1180
+ return response;
1181
+ }), catchError((error) => {
1182
+ throw error;
1183
+ }));
1184
+ }
1185
+ /**
1186
+ * Returns sorted role list data.
1187
+ * @param {Role[]} roleList
1188
+ * @return {Role[]}
1189
+ * @memberof TenantApplicationsService
1190
+ */
1191
+ sortRolesByRoleType(roleList) {
1192
+ return roleList.sort((a, b) => a?.viewOrder - b?.viewOrder);
1193
+ }
1194
+ /**
1195
+ * Posts the role details to server using HttpService for deleting the role.
1196
+ * @param {DeleteRoleRequestPayload} deleteRoleRequestPayload
1197
+ * @return {Observable<DeleteRoleResponse>}
1198
+ * @memberof TenantApplicationsService
1199
+ */
1200
+ deleteRole(deleteRolePayload) {
1201
+ return this.httpService
1202
+ .putData(`${this.apiBaseUrl}/groups/role/deleteRole`, deleteRolePayload)
1203
+ .pipe(map((response) => {
1204
+ return response;
1205
+ }), catchError((error) => {
1206
+ throw error;
1207
+ }));
1208
+ }
1209
+ /**
1210
+ * Gets group types from server using HttpService.
1211
+ * @param {string} appId
1212
+ * @return {Observable<ViewGroupTypeResponse>}
1213
+ * @memberof TenantApplicationsService
1214
+ */
1215
+ getGroupTypes(appId) {
1216
+ return this.httpService
1217
+ .getData(`${this.apiBaseUrl}/configurations/config/appGroupTypeDetails/${appId}`)
1218
+ .pipe(map((response) => {
1219
+ return response;
1220
+ }), catchError((error) => {
1221
+ throw error;
1222
+ }));
1223
+ }
1224
+ /**
1225
+ * Sets group type details.
1226
+ * @param {ViewGroupTypeResponse} groupTypes
1227
+ * @memberof TenantApplicationsService
1228
+ */
1229
+ setGroupTypeDetails(groupTypes) {
1230
+ this.groupTypes = groupTypes;
1231
+ }
1232
+ /**
1233
+ * Returns group type details.
1234
+ * @return {ViewGroupTypeResponse}
1235
+ * @memberof TenantApplicationsService
1236
+ */
1237
+ getGroupTypeDetails() {
1238
+ return this.groupTypes;
1239
+ }
1240
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsService, deps: [{ token: i1.HttpService }, { token: TenantPermissionsService }, { token: TenantPermissionsMapService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1241
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsService, providedIn: 'root' }); }
1242
+ }
1243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsService, decorators: [{
1244
+ type: Injectable,
1245
+ args: [{
1246
+ providedIn: 'root',
1247
+ }]
1248
+ }], ctorParameters: function () { return [{ type: i1.HttpService }, { type: TenantPermissionsService }, { type: TenantPermissionsMapService }]; } });
1249
+
1250
+ class CreateTenantApplicationComponent {
1251
+ constructor(
1252
+ // eslint-disable-next-line no-unused-vars
1253
+ fileUploadService,
1254
+ // eslint-disable-next-line no-unused-vars
1255
+ tenantAppService,
1256
+ // eslint-disable-next-line no-unused-vars
1257
+ sharedService // eslint-disable-next-line no-empty-function
1258
+ ) {
1259
+ this.fileUploadService = fileUploadService;
1260
+ this.tenantAppService = tenantAppService;
1261
+ this.sharedService = sharedService;
1262
+ this.destroy$ = new Subject();
1263
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1264
+ this.constants = screenText;
1265
+ this.createTenantTexts = this.constants?.createTenant;
1266
+ this.leftButtonLabel = this.createTenantTexts?.label?.leftButtonLabel;
1267
+ this.rightButtonLabel = this.createTenantTexts?.label?.rightButtonLabel;
1268
+ this.colWidth = { xs: 12, xl: 12, sm: 12, md: 12, lg: 12 };
1269
+ this.actionButtonAlign = AlignType.LEFT;
1270
+ this.submitFormResponse = new EventEmitter();
1271
+ this.formCancel = new EventEmitter();
1272
+ this.allowedFileTypes = [
1273
+ AllowedFileTypes.JPG,
1274
+ AllowedFileTypes.PNG,
1275
+ AllowedFileTypes.SVG,
1276
+ ];
1277
+ this.isAppLogoModified = false;
1278
+ }
1279
+ ngOnInit() {
1280
+ this.tenantFunctionType = this.tenantAppService?.getTenantFunctionType();
1281
+ this.selectedTenantInfo =
1282
+ this.tenantAppService?.getSelectedTenantInformation();
1283
+ this.fileUploadService.setApiBaseUrl(this.tenantAppService?.apiBaseUrl);
1284
+ this.getFeatures();
1285
+ }
1286
+ /**
1287
+ * Gets the list of features and updates the form control.
1288
+ * @memberof CreateTenantApplicationComponent
1289
+ */
1290
+ getFeatures() {
1291
+ this.tenantAppService
1292
+ .getFeatures()
1293
+ .pipe(takeUntil(this.destroy$))
1294
+ .subscribe({
1295
+ next: (response) => {
1296
+ if (response?.status) {
1297
+ this.featuresOptions = this.tenantAppService.getFeatureOptions(response?.body);
1298
+ if (this.tenantFunctionType === TenantFunctionType.EDIT)
1299
+ this.featuresOptions?.forEach((option) => {
1300
+ if (this.selectedTenantInfo?.features?.some((feature) => feature?.featureId === option?.id)) {
1301
+ option.checked = true;
1302
+ }
1303
+ });
1304
+ this.getApplicationTypes();
1305
+ }
1306
+ },
1307
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1308
+ error: (error) => {
1309
+ this.sharedService.handleErrors(error, this.createTenantTexts?.errors);
1310
+ },
1311
+ });
1312
+ }
1313
+ /**
1314
+ * Gets the application/tenant types and updates the form control.
1315
+ * @memberof CreateTenantApplicationComponent
1316
+ */
1317
+ getApplicationTypes() {
1318
+ this.tenantAppService
1319
+ .getApplicationTypes()
1320
+ .pipe(takeUntil(this.destroy$))
1321
+ .subscribe({
1322
+ next: (response) => {
1323
+ if (response?.status) {
1324
+ this.appTypeOptions =
1325
+ this.tenantAppService.getApplicationTypeOptions(response?.body);
1326
+ if (this.tenantFunctionType === TenantFunctionType.EDIT) {
1327
+ this.appTypeOptions?.forEach((radioOption) => {
1328
+ if (radioOption?.id === this.selectedTenantInfo?.appType) {
1329
+ radioOption.checked = true;
1330
+ this.selectedAppTypeOption = radioOption;
1331
+ }
1332
+ else {
1333
+ radioOption.checked = false;
1334
+ }
1335
+ });
1336
+ }
1337
+ this.initializeCreateTenantFormGroup();
1338
+ }
1339
+ },
1340
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1341
+ error: (error) => {
1342
+ this.sharedService.handleErrors(error, this.createTenantTexts?.errors);
1343
+ },
1344
+ });
1345
+ }
1346
+ /**
1347
+ * Initialize the create tenant form group array.
1348
+ * @memberof CreateTenantApplicationComponent
1349
+ */
1350
+ initializeCreateTenantFormGroup() {
1351
+ this.createTenantFormGroup = {
1352
+ formGroup: [
1353
+ {
1354
+ legend: '',
1355
+ controls: [
1356
+ {
1357
+ type: FormControlType.INPUT,
1358
+ label: this.createTenantTexts?.label?.appTitle + '*',
1359
+ controlName: 'appTitle',
1360
+ value: this.tenantFunctionType === TenantFunctionType.EDIT
1361
+ ? this.selectedTenantInfo?.appTitle
1362
+ : '',
1363
+ validation: [
1364
+ Validators.required,
1365
+ Validators.maxLength(TenantsValidationPatterns.appTitleMaxLength),
1366
+ ],
1367
+ supportMessage: this.createTenantTexts?.supportText?.appTitle,
1368
+ requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1369
+ maxErrorMessage: this.createTenantTexts?.message?.error?.limit?.appTitleMaxChars,
1370
+ ariaLabel: this.createTenantTexts?.label?.ariaLabel?.appTitle,
1371
+ ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.appTitle,
1372
+ },
1373
+ {
1374
+ type: FormControlType.INPUT,
1375
+ label: `${this.createTenantTexts?.label?.appId}${this.tenantFunctionType === TenantFunctionType.EDIT ? '' : '*'}`,
1376
+ controlName: 'appId',
1377
+ value: this.tenantFunctionType === TenantFunctionType.EDIT
1378
+ ? this.selectedTenantInfo?.appId
1379
+ : '',
1380
+ validation: [
1381
+ Validators.required,
1382
+ Validators.maxLength(TenantsValidationPatterns.appIdMaxLength),
1383
+ Validators.pattern(TenantsValidationPatterns.alphaNumeric),
1384
+ ],
1385
+ disabled: this.tenantFunctionType === TenantFunctionType.EDIT,
1386
+ supportMessage: this.tenantFunctionType === TenantFunctionType.EDIT
1387
+ ? ''
1388
+ : this.createTenantTexts?.supportText?.appId,
1389
+ requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1390
+ maxErrorMessage: this.createTenantTexts?.message?.error?.limit?.appIdMaxChars,
1391
+ patternErrorMessage: this.createTenantTexts?.message?.error?.pattern?.appId,
1392
+ ariaLabel: this.createTenantTexts?.label?.ariaLabel?.appId,
1393
+ ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.appId,
1394
+ },
1395
+ {
1396
+ type: FormControlType?.FILE_UPLOAD,
1397
+ label: this.createTenantTexts?.label?.appLogo + '*',
1398
+ controlName: 'appLogo',
1399
+ requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1400
+ value: this.tenantFunctionType === TenantFunctionType.EDIT
1401
+ ? this.selectedTenantInfo?.appLogo
1402
+ : '',
1403
+ placeholder: '',
1404
+ isFileSelected: this.tenantFunctionType === TenantFunctionType.EDIT,
1405
+ supportMessage: this.createTenantTexts?.supportText?.appLogo,
1406
+ validation: [Validators.required],
1407
+ ariaLabel: this.createTenantTexts?.label?.ariaLabel?.appLogo,
1408
+ ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.appLogo,
1409
+ isMultiFileUpload: false,
1410
+ maxUploadFileSize: 2,
1411
+ maxFileSizeErrorMessage: this.createTenantTexts?.message?.error?.limit?.appLogoMaxSize,
1412
+ allowedFileTypeErrorMessage: this.createTenantTexts?.message?.error?.invalidFile,
1413
+ allowedFileTypes: this.allowedFileTypes,
1414
+ },
1415
+ {
1416
+ type: FormControlType.INPUT,
1417
+ label: this.createTenantTexts?.label?.appHeading + '*',
1418
+ controlName: 'appHeading',
1419
+ value: this.tenantFunctionType === TenantFunctionType.EDIT
1420
+ ? this.selectedTenantInfo?.appHeading
1421
+ : '',
1422
+ validation: [
1423
+ Validators.required,
1424
+ Validators.maxLength(TenantsValidationPatterns.appHeadingMaxLength),
1425
+ ],
1426
+ supportMessage: this.createTenantTexts?.supportText?.appHeading,
1427
+ requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1428
+ maxErrorMessage: this.createTenantTexts?.message?.error?.limit
1429
+ ?.appHeadingMaxChars,
1430
+ patternErrorMessage: this.createTenantTexts?.message?.error?.pattern?.email,
1431
+ ariaLabel: this.createTenantTexts?.label?.ariaLabel?.appHeading,
1432
+ ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.appHeading,
1433
+ },
1434
+ {
1435
+ type: FormControlType.TEXT_AREA,
1436
+ label: this.createTenantTexts?.label?.appDescription + '*',
1437
+ controlName: 'appDescription',
1438
+ value: this.tenantFunctionType === TenantFunctionType.EDIT
1439
+ ? this.selectedTenantInfo?.appDescription
1440
+ : '',
1441
+ validation: [
1442
+ Validators.required,
1443
+ Validators.maxLength(TenantsValidationPatterns.appDescriptionMaxLength),
1444
+ ],
1445
+ supportMessage: this.createTenantTexts?.supportText?.appDescription,
1446
+ requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1447
+ maxErrorMessage: this.createTenantTexts?.message?.error?.limit
1448
+ ?.appDescriptionMaxChars,
1449
+ maxCharCount: TenantsValidationPatterns.appDescriptionMaxLength,
1450
+ ariaLabel: this.createTenantTexts?.label?.ariaLabel?.appDescription,
1451
+ ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById
1452
+ ?.appDescription,
1453
+ ariaMultiline: true,
1454
+ isResize: true,
1455
+ },
1456
+ {
1457
+ type: FormControlType.COLOR_PICKER,
1458
+ label: this.createTenantTexts?.label?.appBgColor + '*',
1459
+ controlName: 'backgroundColor',
1460
+ value: '',
1461
+ defaultColor: this.tenantFunctionType === TenantFunctionType.EDIT
1462
+ ? this.selectedTenantInfo?.backgroundColor
1463
+ : '',
1464
+ placeholder: '',
1465
+ supportMessage: this.createTenantTexts?.supportText?.appBgColor,
1466
+ validation: [Validators.required, validColorValidator()],
1467
+ requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1468
+ invalidColorErrorMessage: this.createTenantTexts?.message?.error?.invalidColor,
1469
+ ariaLabel: this.createTenantTexts?.supportText?.appBgColor,
1470
+ ariaDescribedById: this.createTenantTexts?.supportText?.appBgColor,
1471
+ },
1472
+ {
1473
+ type: FormControlType.INPUT,
1474
+ label: this.createTenantTexts?.label?.appHelpLink + '*',
1475
+ controlName: 'appHelpLink',
1476
+ value: this.tenantFunctionType === TenantFunctionType.EDIT
1477
+ ? this.selectedTenantInfo?.appHelpLink
1478
+ : '',
1479
+ validation: [
1480
+ Validators.required,
1481
+ Validators.pattern(TenantsValidationPatterns.url),
1482
+ ],
1483
+ supportMessage: this.createTenantTexts?.supportText?.appHelpLink,
1484
+ requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1485
+ patternErrorMessage: this.createTenantTexts?.message?.error?.pattern?.appHelpLink,
1486
+ ariaLabel: this.createTenantTexts?.label?.ariaLabel?.appHelpLink,
1487
+ ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.appHelpLink,
1488
+ },
1489
+ {
1490
+ type: FormControlType.CHECKBOX,
1491
+ label: this.createTenantTexts?.label?.featuresList + '*',
1492
+ controlName: 'features',
1493
+ checkboxOptions: this.featuresOptions,
1494
+ minSelectionRequired: 1,
1495
+ ariaLabel: this.createTenantTexts?.label?.ariaLabel?.featuresList,
1496
+ ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.featuresList,
1497
+ supportMessage: this.createTenantTexts?.supportText?.featuresList,
1498
+ requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1499
+ validation: [Validators.required],
1500
+ },
1501
+ {
1502
+ type: FormControlType.INPUT,
1503
+ label: this.createTenantTexts?.label?.domainURL + '*',
1504
+ controlName: 'appDomainUrl',
1505
+ value: this.tenantFunctionType === TenantFunctionType.EDIT
1506
+ ? this.selectedTenantInfo?.appDomainUrl
1507
+ : '',
1508
+ validation: [
1509
+ Validators.required,
1510
+ Validators.pattern(TenantsValidationPatterns.url),
1511
+ ],
1512
+ supportMessage: this.createTenantTexts?.supportText?.domainURL,
1513
+ requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1514
+ patternErrorMessage: this.createTenantTexts?.message?.error?.pattern?.appDomainUrl,
1515
+ ariaLabel: this.createTenantTexts?.label?.ariaLabel?.domainURL,
1516
+ ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.domainURL,
1517
+ },
1518
+ {
1519
+ type: FormControlType.RADIO,
1520
+ label: `${this.createTenantTexts?.label?.appType}${this.tenantFunctionType === TenantFunctionType.EDIT ? '' : '*'}`,
1521
+ controlName: 'appType',
1522
+ value: this.tenantFunctionType === TenantFunctionType.EDIT
1523
+ ? this.selectedTenantInfo?.appType
1524
+ : '',
1525
+ disabled: this.tenantFunctionType === TenantFunctionType.EDIT,
1526
+ radioOptions: this.appTypeOptions,
1527
+ validation: [Validators.required],
1528
+ requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1529
+ ariaLabel: this.createTenantTexts?.label?.ariaLabel?.appType,
1530
+ ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.appType,
1531
+ },
1532
+ ],
1533
+ },
1534
+ ],
1535
+ };
1536
+ }
1537
+ /**
1538
+ * Creates Payload and gets presigned url for file upload on form submission.
1539
+ * @param {FormGroup[]} form
1540
+ * @memberof CreateTenantApplicationComponent
1541
+ */
1542
+ onCreateTenantFormSubmit(form) {
1543
+ form[0]?.markAllAsTouched();
1544
+ if (form[0].status === FormStatus.VALID) {
1545
+ this.createTenantPayload = this.getCreateTenantPayload(form[0].getRawValue());
1546
+ if (this.tenantFunctionType === TenantFunctionType.EDIT &&
1547
+ (!this.isAppLogoModified || !this.file)) {
1548
+ this.editTenant();
1549
+ }
1550
+ else if (this.file) {
1551
+ this.getFileUploadPresignedUrl(this.file, form[0]?.controls['appId']?.value);
1552
+ }
1553
+ else {
1554
+ this.createTenant();
1555
+ }
1556
+ }
1557
+ }
1558
+ /**
1559
+ * Creates a new tenant on form submission.
1560
+ * @memberof CreateTenantApplicationComponent
1561
+ */
1562
+ createTenant() {
1563
+ this.tenantAppService
1564
+ .createTenant(this.createTenantPayload)
1565
+ .pipe(takeUntil(this.destroy$))
1566
+ .subscribe({
1567
+ next: (response) => {
1568
+ if (response.status) {
1569
+ this.tenantAppService.setNewTenantInfo(this.createTenantPayload?.payload);
1570
+ this.submitFormResponse.emit(response);
1571
+ }
1572
+ },
1573
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1574
+ error: (error) => {
1575
+ this.sharedService.handleErrors(error, this.createTenantTexts?.errors);
1576
+ },
1577
+ });
1578
+ }
1579
+ /**
1580
+ * Updates the modified tenant information on form submission.
1581
+ * @memberof CreateTenantApplicationComponent
1582
+ */
1583
+ editTenant() {
1584
+ this.tenantAppService
1585
+ .editTenant(this.createTenantPayload)
1586
+ .pipe(takeUntil(this.destroy$))
1587
+ .subscribe({
1588
+ next: (response) => {
1589
+ if (response?.status) {
1590
+ this.updatedTenantBasicInfo = this.createTenantPayload?.payload;
1591
+ this.updatedTenantBasicInfo.features =
1592
+ this.tenantAppService.getFeaturesList(this.featuresOptions);
1593
+ this.tenantAppService.setSelectedTenantInformation(this.updatedTenantBasicInfo);
1594
+ this.submitFormResponse.emit(response);
1595
+ }
1596
+ },
1597
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1598
+ error: (error) => {
1599
+ this.sharedService.handleErrors(error, this.createTenantTexts?.errors);
1600
+ },
1601
+ });
1602
+ }
1603
+ /**
1604
+ * Constructs create tenant payload from the form data and returns.
1605
+ * @param {*} formData
1606
+ * @return {CreateTenantRequestPayload}
1607
+ * @memberof CreateTenantApplicationComponent
1608
+ */
1609
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1610
+ getCreateTenantPayload(formData) {
1611
+ const payload = {
1612
+ payload: {
1613
+ appTitle: formData?.appTitle,
1614
+ appId: formData?.appId,
1615
+ appHeading: formData?.appHeading,
1616
+ appDescription: formData?.appDescription,
1617
+ backgroundColor: formData?.backgroundColor,
1618
+ appLogo: formData?.appLogo,
1619
+ appDomainUrl: formData?.appDomainUrl,
1620
+ appHelpLink: formData?.appHelpLink,
1621
+ appType: this.selectedAppTypeOption?.id,
1622
+ features: this.tenantAppService.getFeatureIds(this.featuresOptions),
1623
+ },
1624
+ };
1625
+ return payload;
1626
+ }
1627
+ /**
1628
+ * Gets create tenant form group reference and disables default features.
1629
+ * @param {FormGroup[]} form
1630
+ * @memberof CreateTenantApplicationComponent
1631
+ */
1632
+ getCreateTenantFormGroupRef(form) {
1633
+ this.createTenantFormGroupRef = form[0];
1634
+ const featuresFormArray = this.createTenantFormGroupRef?.controls['features'];
1635
+ this.featuresOptions?.forEach((option, index) => {
1636
+ if (option?.disabled) {
1637
+ featuresFormArray?.at(index).disable();
1638
+ }
1639
+ });
1640
+ }
1641
+ /**
1642
+ * Updates createTenantFormGroupRef on add or edit tenant form change event.
1643
+ * @param {FormGroup[]} form
1644
+ * @memberof CreateTenantApplicationComponent
1645
+ */
1646
+ onCreateTenantFormChange(form) {
1647
+ this.createTenantFormGroupRef = form[0];
1648
+ this.isAppLogoModified =
1649
+ this.createTenantFormGroupRef?.controls['appLogo']?.dirty &&
1650
+ this.tenantFunctionType === TenantFunctionType.EDIT;
1651
+ }
1652
+ /**
1653
+ * Emits form cancel event.
1654
+ * @memberof CreateTenantApplicationComponent
1655
+ */
1656
+ onFormCancel() {
1657
+ this.formCancel.emit();
1658
+ }
1659
+ /**
1660
+ * Gets the selected file when the file is browsed and on formFileUpload event is triggered.
1661
+ * @param {File | FileList} file
1662
+ */
1663
+ onFormFileUpload(file) {
1664
+ this.file = file;
1665
+ }
1666
+ /**
1667
+ * Gets pre-signed URL to upload the selected file to AWS S3 bucket.
1668
+ * @param {File | FileList} file
1669
+ */
1670
+ getFileUploadPresignedUrl(file, appId) {
1671
+ this.fileUploadService
1672
+ .getFileUploadPresignedUrl(file, appId)
1673
+ .pipe(takeUntil(this.destroy$))
1674
+ .subscribe({
1675
+ next: (response) => {
1676
+ this.fileUploadPresignedUrl = response?.body;
1677
+ if (this.fileUploadPresignedUrl)
1678
+ this.uploadFileToS3(file);
1679
+ },
1680
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, no-unused-vars, @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function, no-empty-function
1681
+ error: (error) => {
1682
+ this.sharedService.handleErrors(error, this.createTenantTexts?.errors);
1683
+ },
1684
+ });
1685
+ }
1686
+ /**
1687
+ * Uploads the file to AWS S3 bucket and submit the form data to API to create new tenant.
1688
+ * @param {File | FileList} file
1689
+ */
1690
+ uploadFileToS3(file) {
1691
+ this.fileUploadService
1692
+ .uploadFileToS3(this.fileUploadPresignedUrl, file)
1693
+ .pipe(takeUntil(this.destroy$))
1694
+ .subscribe({
1695
+ // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
1696
+ next: (response) => {
1697
+ this.fileUploadService.setFileUploadStatus(true);
1698
+ // eslint-disable-next-line no-unused-expressions
1699
+ this.tenantFunctionType === TenantFunctionType.EDIT
1700
+ ? this.editTenant()
1701
+ : this.createTenant();
1702
+ },
1703
+ // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
1704
+ error: (error) => {
1705
+ this.fileUploadService.setFileUploadStatus(false);
1706
+ this.sharedService.handleErrors(error, this.createTenantTexts?.errors);
1707
+ },
1708
+ });
1709
+ }
1710
+ /**
1711
+ * Triggers when the color picker values has been changed.
1712
+ * @param {string} color
1713
+ */
1714
+ onColorPickerChange(color) {
1715
+ this.selectedColor = color;
1716
+ }
1717
+ /**
1718
+ * Triggers when the radio option has been changed.
1719
+ * @param {RadioOption} radioOption
1720
+ */
1721
+ onRadioOptionSelected(radioOption) {
1722
+ this.selectedAppTypeOption = radioOption;
1723
+ }
1724
+ /**
1725
+ * Implementation of ngOnDestroy lifecycle hook method to unsubscribe the open observable subscriptions.
1726
+ * @memberof CreateTenantApplicationComponent
1727
+ */
1728
+ ngOnDestroy() {
1729
+ this.destroy$.next(true);
1730
+ this.destroy$.unsubscribe();
1731
+ }
1732
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateTenantApplicationComponent, deps: [{ token: i2.FileUploadService }, { token: TenantApplicationsService }, { token: i2$1.SharedService }], target: i0.ɵɵFactoryTarget.Component }); }
1733
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CreateTenantApplicationComponent, isStandalone: true, selector: "ieeesa-create-tenant-application", outputs: { submitFormResponse: "submitFormResponse", formCancel: "formCancel" }, viewQueries: [{ propertyName: "dynamicFormComponent", first: true, predicate: DynamicFormComponent, descendants: true }], ngImport: i0, template: "<ieeesa-dynamic-form\r\n *ngIf=\"createTenantFormGroup\"\r\n class=\"ieeesa-create-tenant-form\"\r\n [leftButtonLabel]=\"leftButtonLabel\"\r\n [rightButtonLabel]=\"rightButtonLabel\"\r\n [isLegendVisible]=\"false\"\r\n [colWidth]=\"colWidth\"\r\n [actionButtonAlign]=\"actionButtonAlign\"\r\n [formGroups]=\"createTenantFormGroup\"\r\n [isLeftButtonNeeded]=\"true\"\r\n (formSubmit)=\"onCreateTenantFormSubmit($event)\"\r\n (formChange)=\"onCreateTenantFormChange($event)\"\r\n (formLeftButtonClicked)=\"onFormCancel()\"\r\n (formGroupsReference)=\"getCreateTenantFormGroupRef($event)\"\r\n (formFileUpload)=\"onFormFileUpload($event)\"\r\n (formColorPickerChange)=\"onColorPickerChange($event)\"\r\n (formRadioOptionSelected)=\"onRadioOptionSelected($event)\"\r\n></ieeesa-dynamic-form>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-modal-dialog.ieeesa-create-tenant,.ieeesa-modal-dialog.ieeesa-edit-tenant{max-width:60vw!important}.ieeesa-modal-dialog.ieeesa-create-tenant .mat-mdc-dialog-container,.ieeesa-modal-dialog.ieeesa-edit-tenant .mat-mdc-dialog-container{box-shadow:none}.ieeesa-modal-dialog.ieeesa-create-tenant .mat-mdc-dialog-surface,.ieeesa-modal-dialog.ieeesa-edit-tenant .mat-mdc-dialog-surface{border-radius:0;margin:1em 0}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal{box-shadow:0 3px #11b7e5 inset,0 4px 24px #00000080;padding-bottom:.5em}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .mat-mdc-dialog-content,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .mat-mdc-dialog-content{padding:1.5em 1em .75em!important}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal-title,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal-title{margin-left:15px!important}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__actions,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__actions{flex-direction:row-reverse;gap:.5em;padding:2em 1em .75em;margin-top:2em}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field{margin-bottom:1em;padding-top:0!important}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field__content,.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field .mdc-label,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field__content,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field .mdc-label{padding-left:0}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field__resize,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field__resize{resize:vertical}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field__content,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field__content{color:#1c1b1f}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mat-mdc-text-field-wrapper,.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mat-mdc-form-field-focus-overlay,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mat-mdc-text-field-wrapper,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mat-mdc-form-field-focus-overlay{background:#fff;padding:0;border:0}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mdc-line-ripple:before,.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mdc-line-ripple:after,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mdc-line-ripple:before,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mdc-line-ripple:after{border:0}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field:not(.app-description,.app-logo),.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field:not(.app-description,.app-logo){width:90%}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .mat-mdc-form-field-flex,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .mat-mdc-form-field-flex{width:62.5em}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .mat-mdc-form-field-subscript-wrapper,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .mat-mdc-form-field-subscript-wrapper{display:none}@media (max-width: 767px){.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field:not(.app-description,.app-logo),.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field:not(.app-description,.app-logo){width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DynamicFormComponent, selector: "ieeesa-dynamic-form", inputs: ["formGroups", "submitResponse", "searchResponse", "fileUploadStatus", "colWidth", "isLegendVisible", "rightButtonLabel", "leftButtonLabel", "isSubmitButtonDisabled", "isLeftButtonDisabled", "isLeftButtonNeeded", "isRightButtonNeeded", "actionButtonAlign", "fileDownloadAndDeleteConfig"], outputs: ["formSubmit", "formChange", "formInput", "formLeftButtonClicked", "formSearchApply", "formGroupsReference", "dropdownChange", "formCheckboxSelection", "formDateSelected", "formSelectSearch", "formControlChange", "formAutoCompleteSearch", "formAutoCompleteClearSearchValue", "autoCompleteOptionSelected", "formAfterContentInit", "formSelectedDateRange", "addFormGroup", "formTimeSelected", "supportTextLinkClick", "formSlideToggleChange", "formFileUpload", "dropdownOpenedChange", "formColorPickerChange", "formRadioOptionSelected", "ctaButtonClick", "formMultiSelectAutoCompleteSearch", "formMultiSelectAutoCompleteClearSearchValue", "multiSelectAutoCompleteOptionsSelected", "formRichTextEditorContentChange"], exportAs: ["dynamicForm"] }], encapsulation: i0.ViewEncapsulation.None }); }
1734
+ }
1735
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateTenantApplicationComponent, decorators: [{
1736
+ type: Component,
1737
+ args: [{ selector: 'ieeesa-create-tenant-application', standalone: true, imports: [CommonModule, DynamicFormComponent], encapsulation: ViewEncapsulation.None, template: "<ieeesa-dynamic-form\r\n *ngIf=\"createTenantFormGroup\"\r\n class=\"ieeesa-create-tenant-form\"\r\n [leftButtonLabel]=\"leftButtonLabel\"\r\n [rightButtonLabel]=\"rightButtonLabel\"\r\n [isLegendVisible]=\"false\"\r\n [colWidth]=\"colWidth\"\r\n [actionButtonAlign]=\"actionButtonAlign\"\r\n [formGroups]=\"createTenantFormGroup\"\r\n [isLeftButtonNeeded]=\"true\"\r\n (formSubmit)=\"onCreateTenantFormSubmit($event)\"\r\n (formChange)=\"onCreateTenantFormChange($event)\"\r\n (formLeftButtonClicked)=\"onFormCancel()\"\r\n (formGroupsReference)=\"getCreateTenantFormGroupRef($event)\"\r\n (formFileUpload)=\"onFormFileUpload($event)\"\r\n (formColorPickerChange)=\"onColorPickerChange($event)\"\r\n (formRadioOptionSelected)=\"onRadioOptionSelected($event)\"\r\n></ieeesa-dynamic-form>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-modal-dialog.ieeesa-create-tenant,.ieeesa-modal-dialog.ieeesa-edit-tenant{max-width:60vw!important}.ieeesa-modal-dialog.ieeesa-create-tenant .mat-mdc-dialog-container,.ieeesa-modal-dialog.ieeesa-edit-tenant .mat-mdc-dialog-container{box-shadow:none}.ieeesa-modal-dialog.ieeesa-create-tenant .mat-mdc-dialog-surface,.ieeesa-modal-dialog.ieeesa-edit-tenant .mat-mdc-dialog-surface{border-radius:0;margin:1em 0}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal{box-shadow:0 3px #11b7e5 inset,0 4px 24px #00000080;padding-bottom:.5em}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .mat-mdc-dialog-content,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .mat-mdc-dialog-content{padding:1.5em 1em .75em!important}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal-title,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal-title{margin-left:15px!important}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__actions,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__actions{flex-direction:row-reverse;gap:.5em;padding:2em 1em .75em;margin-top:2em}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field{margin-bottom:1em;padding-top:0!important}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field__content,.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field .mdc-label,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field__content,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field .mdc-label{padding-left:0}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field__resize,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field__resize{resize:vertical}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field__content,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field__content{color:#1c1b1f}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mat-mdc-text-field-wrapper,.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mat-mdc-form-field-focus-overlay,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mat-mdc-text-field-wrapper,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mat-mdc-form-field-focus-overlay{background:#fff;padding:0;border:0}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mdc-line-ripple:before,.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mdc-line-ripple:after,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mdc-line-ripple:before,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field:has(.mdc-text-field--disabled) .mdc-line-ripple:after{border:0}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field:not(.app-description,.app-logo),.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field:not(.app-description,.app-logo){width:90%}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .mat-mdc-form-field-flex,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .mat-mdc-form-field-flex{width:62.5em}.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .mat-mdc-form-field-subscript-wrapper,.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .mat-mdc-form-field-subscript-wrapper{display:none}@media (max-width: 767px){.ieeesa-modal-dialog.ieeesa-create-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field:not(.app-description,.app-logo),.ieeesa-modal-dialog.ieeesa-edit-tenant .ieeesa-modal .ieeesa-dynamic-form__form-field:not(.app-description,.app-logo){width:100%}}\n"] }]
1738
+ }], ctorParameters: function () { return [{ type: i2.FileUploadService }, { type: TenantApplicationsService }, { type: i2$1.SharedService }]; }, propDecorators: { dynamicFormComponent: [{
1739
+ type: ViewChild,
1740
+ args: [DynamicFormComponent]
1741
+ }], submitFormResponse: [{
1742
+ type: Output
1743
+ }], formCancel: [{
1744
+ type: Output
1745
+ }] } });
1746
+
1747
+ class ViewTenantsListComponent {
1748
+ constructor(
1749
+ // eslint-disable-next-line no-unused-vars
1750
+ dialog,
1751
+ // eslint-disable-next-line no-unused-vars
1752
+ alertService,
1753
+ // eslint-disable-next-line no-unused-vars
1754
+ breakpointObserverService,
1755
+ // eslint-disable-next-line no-unused-vars
1756
+ sharedService,
1757
+ // eslint-disable-next-line no-unused-vars
1758
+ tenantApplicationsService,
1759
+ // eslint-disable-next-line no-unused-vars
1760
+ router) {
1761
+ this.dialog = dialog;
1762
+ this.alertService = alertService;
1763
+ this.breakpointObserverService = breakpointObserverService;
1764
+ this.sharedService = sharedService;
1765
+ this.tenantApplicationsService = tenantApplicationsService;
1766
+ this.router = router;
1767
+ this.destroy$ = new Subject();
1768
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1769
+ this.constants = screenText;
1770
+ this.viewTenantsConstants = this.constants?.viewTenants;
1771
+ this.isMobileView = false;
1772
+ this.tenantsPageInfo = {
1773
+ tenantsTitle: '',
1774
+ };
1775
+ this.apiBaseURL = '';
1776
+ this.defaultSortedColumn = ViewTenantsColumnSchemaDef.APP_ID;
1777
+ this.createTenant = new EventEmitter();
1778
+ this.viewTenantsDetails = new EventEmitter();
1779
+ this.tableActions = {
1780
+ isPaginationNeeded: true,
1781
+ };
1782
+ this.tableColumns = this.viewTenantsConstants?.tableColumns;
1783
+ this.emptyFieldValueReplacedBy = this.viewTenantsConstants?.emptyFieldValueReplacedBy;
1784
+ this.paginatorConfig = {
1785
+ recordsPerPage: this.viewTenantsConstants?.pageSizeOptions[0],
1786
+ pageSizeOptions: this.viewTenantsConstants.pageSizeOptions,
1787
+ totalRecords: 0,
1788
+ };
1789
+ this.permissionType = PermissionType;
1790
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1791
+ this.createTenantScreenTexts = this.constants?.createTenant;
1792
+ this.defaultColumnSortDirection = true;
1793
+ this.breakpointObserverService
1794
+ .getBreakpoint()
1795
+ .pipe(takeUntil(this.destroy$))
1796
+ .subscribe((result) => {
1797
+ this.isMobileView = result.matches;
1798
+ });
1799
+ }
1800
+ /**
1801
+ * Sets the user permissions, router config path, base API URL, table column schema and gets the tenants list.
1802
+ * @memberof ViewTenantsListComponent
1803
+ */
1804
+ ngOnInit() {
1805
+ this.userTenantsPermissions =
1806
+ this.tenantApplicationsService?.filterPermission(this.userPermissions);
1807
+ this.tenantApplicationsService?.setAppConfig(this.apiBaseURL, this.userPermissions);
1808
+ this.tenantsPageInfo = {
1809
+ tenantsTitle: this.viewTenantsConstants?.tenantsTitle,
1810
+ };
1811
+ this.routePaths = this.routePaths ?? this.constants?.routeConfigPath;
1812
+ this.sharedService?.setRoutePaths(this.routePaths);
1813
+ this.configureTableInfo();
1814
+ this.defaultSortedColumn = this.columnSchema[0].columnDef;
1815
+ this.getTenantsAndInitializeTableView(this.getTenantsPayload());
1816
+ }
1817
+ /**
1818
+ * Validates permission based access for provided feature.
1819
+ * @param {PermissionType} permissionType
1820
+ * @return {boolean}
1821
+ * @memberof ViewTenantsListComponent
1822
+ */
1823
+ validateAccess(permissionType) {
1824
+ return this.tenantApplicationsService.validateAccess(permissionType, this.userTenantsPermissions);
1825
+ }
1826
+ /**
1827
+ * Configures table schema to display the tenants in table view.
1828
+ * @memberof ViewTenantsListComponent
1829
+ */
1830
+ configureTableInfo() {
1831
+ this.columnSchema = [
1832
+ {
1833
+ id: 1,
1834
+ columnDef: ViewTenantsColumnSchemaDef.APP_ID,
1835
+ heading: this.tableColumns?.appId,
1836
+ columnType: TableColumnType.LINK,
1837
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1838
+ cellData: (element) => `${element.appId}`,
1839
+ isSortableColumn: true,
1840
+ },
1841
+ {
1842
+ id: 2,
1843
+ columnDef: ViewTenantsColumnSchemaDef.APP_TITLE,
1844
+ heading: this.tableColumns?.appTitle,
1845
+ columnType: TableColumnType.TEXT,
1846
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1847
+ cellData: (element) => `${element.appTitle ?? this.emptyFieldValueReplacedBy}`,
1848
+ isSortableColumn: true,
1849
+ },
1850
+ {
1851
+ id: 3,
1852
+ columnDef: ViewTenantsColumnSchemaDef.APP_DESCRIPTION,
1853
+ heading: this.tableColumns?.appDescription,
1854
+ columnType: TableColumnType.TEXT,
1855
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1856
+ cellData: (element) => `${element.appDescription ?? this.emptyFieldValueReplacedBy}`,
1857
+ },
1858
+ {
1859
+ id: 4,
1860
+ columnDef: ViewTenantsColumnSchemaDef.FEATURES,
1861
+ heading: this.tableColumns?.features,
1862
+ columnType: TableColumnType.TEXT,
1863
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1864
+ cellData: (element) => `${element?.features && element?.features?.length > 0
1865
+ ? this.formatFeaturesName(element?.features)
1866
+ : this.emptyFieldValueReplacedBy}`,
1867
+ },
1868
+ {
1869
+ id: 5,
1870
+ columnDef: ViewTenantsColumnSchemaDef.STATUS,
1871
+ heading: this.tableColumns?.status,
1872
+ columnType: TableColumnType.TEXT,
1873
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1874
+ cellData: (element) => `${element.status ? TenantStatus.ACTIVE : TenantStatus.INACTIVE}`,
1875
+ },
1876
+ ];
1877
+ }
1878
+ /**
1879
+ * Format the features name in to single sentence with comma separated.
1880
+ * @memberof ViewTenantsListComponent
1881
+ */
1882
+ formatFeaturesName(features) {
1883
+ return features
1884
+ .map((feature) => {
1885
+ // eslint-disable-next-line no-unused-expressions
1886
+ return feature.featureName;
1887
+ })
1888
+ ?.join(', ');
1889
+ }
1890
+ /**
1891
+ * Fetching details of tenants and initialize table view
1892
+ * @param {GetTenantsPayload} payload
1893
+ * @memberof ViewTenantsListComponent
1894
+ */
1895
+ getTenantsAndInitializeTableView(payload) {
1896
+ this.tenantApplicationsService
1897
+ .getTenantsList(payload)
1898
+ .pipe(takeUntil(this.destroy$))
1899
+ .subscribe({
1900
+ next: (response) => {
1901
+ this.tableData = response?.body?.appDetails;
1902
+ this.paginatorConfig.totalRecords = response?.body
1903
+ ?.totalRecords;
1904
+ },
1905
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1906
+ error: (error) => {
1907
+ this.sharedService.handleErrors(error, this.constants?.errors);
1908
+ },
1909
+ });
1910
+ }
1911
+ /**
1912
+ * Sets the dialog options for create tenant modal and calls openModal method.
1913
+ * @return -returns nothing
1914
+ * @memberof ViewTenantsListComponent
1915
+ */
1916
+ openCreateTenantForm() {
1917
+ this.tenantApplicationsService.setTenantFunctionType(TenantFunctionType.CREATE);
1918
+ const dialogOptions = {
1919
+ heading: this.viewTenantsConstants?.addTenant,
1920
+ isCloseNeeded: true,
1921
+ componentReference: CreateTenantApplicationComponent,
1922
+ modalType: ModalType.FORM,
1923
+ };
1924
+ this.openModal(dialogOptions, 'ieeesa-create-tenant');
1925
+ }
1926
+ /**
1927
+ * Opens modal component with received params and handles form submission success and errors.
1928
+ * @param {*} dialogOptions
1929
+ * @param {string} [className]
1930
+ * @return -returns nothing
1931
+ * @memberof ViewTenantsListComponent
1932
+ */
1933
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-inferrable-types, no-unused-vars
1934
+ openModal(
1935
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1936
+ dialogOptions, className) {
1937
+ className = className ?? '';
1938
+ this.dialogRef = this.dialog?.open(ModalComponent, {
1939
+ data: dialogOptions,
1940
+ width: '',
1941
+ panelClass: ['ieeesa-modal-dialog', className],
1942
+ ariaModal: true,
1943
+ });
1944
+ this.dialogRef?.componentInstance?.submitFormResponse
1945
+ .pipe(takeUntil(this.destroy$))
1946
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, no-unused-vars
1947
+ .subscribe((result) => {
1948
+ this.dialogRef?.close();
1949
+ const appTitle = this.tenantApplicationsService.getNewTenantInfo?.appTitle;
1950
+ this.sharedService.showAlertMessage(AlertType?.SUCCESS, `${appTitle} ${this.createTenantScreenTexts?.message?.success?.submission}`);
1951
+ this.getTenantsAndInitializeTableView(this.getTenantsPayload());
1952
+ });
1953
+ this.dialogRef?.componentInstance?.formCancel
1954
+ .pipe(takeUntil(this.destroy$))
1955
+ .subscribe(() => {
1956
+ this.dialogRef?.close();
1957
+ });
1958
+ }
1959
+ /**
1960
+ * Sorts the tenants by application id or title in ascending or descending.
1961
+ * @param {Sort} sort
1962
+ * @memberof ViewTenantsListComponent
1963
+ */
1964
+ onSortTenants(sort) {
1965
+ this.defaultSortedColumn = sort.active;
1966
+ this.defaultColumnSortDirection =
1967
+ sort.direction === TableColumnSortDirection.ASCENDING;
1968
+ this.sortConfig = {
1969
+ sort: sort,
1970
+ isSortedByAscending: this.defaultColumnSortDirection,
1971
+ };
1972
+ this.getTenantsAndInitializeTableView(this.getTenantsPayload());
1973
+ }
1974
+ /**
1975
+ * Constructs and returns the payload for fetching the tenants list.
1976
+ * @returns GetTenantsPayload
1977
+ */
1978
+ getTenantsPayload() {
1979
+ const payload = {
1980
+ payload: {
1981
+ offset: this.pageEvent?.pageIndex
1982
+ ? this.pageEvent?.pageIndex
1983
+ : 0,
1984
+ pageSize: this.pageEvent?.pageSize
1985
+ ? this.pageEvent?.pageSize
1986
+ : this.paginatorConfig?.recordsPerPage,
1987
+ sortedBy: this.sortConfig?.sort?.active
1988
+ ? this.sortConfig?.sort?.active
1989
+ : ViewTenantsColumnSchemaDef.APP_ID,
1990
+ sortedOrderBy: this.filterSortedOrderBy(this.sortConfig?.isSortedByAscending
1991
+ ? this.sortConfig?.isSortedByAscending
1992
+ : this.defaultColumnSortDirection),
1993
+ },
1994
+ };
1995
+ return payload;
1996
+ }
1997
+ /**
1998
+ * Returning sorting order according to column definition.
1999
+ * @param defaultColumnSortDirection
2000
+ * @returns SortOrderBy.ASC | SortOrderBy.DESC
2001
+ */
2002
+ filterSortedOrderBy(defaultColumnSortDirection) {
2003
+ return defaultColumnSortDirection ? SortOrderBy.ASC : SortOrderBy.DESC;
2004
+ }
2005
+ /**
2006
+ * Get the the records according to pagination.
2007
+ * @param {{
2008
+ * pageOffset: number;
2009
+ * pageLimit: number;
2010
+ * }} pageEvent
2011
+ * @memberof ViewTenantsListComponent
2012
+ */
2013
+ onTablePaginationChange(pageEvent) {
2014
+ this.pageEvent = pageEvent;
2015
+ this.getTenantsAndInitializeTableView(this.getTenantsPayload());
2016
+ }
2017
+ /**
2018
+ * Navigates to view tenants detail component.
2019
+ * @param {{tenantInfo: TenantBasicInfo}}
2020
+ * @memberof ViewTenantsListComponent
2021
+ */
2022
+ navigateToViewTenantDetails(tenantInfo) {
2023
+ if (tenantInfo) {
2024
+ this.tenantApplicationsService.setSelectedTenantInformation(tenantInfo);
2025
+ }
2026
+ if (this.routePaths?.viewTenantDetails)
2027
+ this.router.navigate([this.routePaths?.viewTenantDetails], { queryParams: { id: tenantInfo?.appId } });
2028
+ else
2029
+ this.viewTenantsDetails.emit(tenantInfo);
2030
+ }
2031
+ /**
2032
+ * NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
2033
+ * @memberof ViewTenantsListComponent
2034
+ * @return -returns nothing
2035
+ */
2036
+ ngOnDestroy() {
2037
+ this.destroy$.next(true);
2038
+ this.destroy$.unsubscribe();
2039
+ }
2040
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ViewTenantsListComponent, deps: [{ token: i1$1.MatDialog }, { token: i1.AlertsService }, { token: i2.BreakpointObserverService }, { token: i2$1.SharedService }, { token: TenantApplicationsService }, { token: i6.Router }], target: i0.ɵɵFactoryTarget.Component }); }
2041
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ViewTenantsListComponent, isStandalone: true, selector: "ieeesa-view-tenants-list", inputs: { tenantsPageInfo: "tenantsPageInfo", apiBaseURL: "apiBaseURL", routePaths: "routePaths", userPermissions: "userPermissions", defaultSortedColumn: "defaultSortedColumn" }, outputs: { createTenant: "createTenant", viewTenantsDetails: "viewTenantsDetails" }, ngImport: i0, template: "<div\r\n class=\"ieeesa-view-tenants-list\"\r\n [ngClass]=\"{ 'ieeesa-view-tenants-list__mobile': isMobileView }\"\r\n>\r\n <p class=\"ieeesa-headline-lg-32 py-3 mb-0\">\r\n {{ tenantsPageInfo.tenantsTitle }}\r\n </p>\r\n <div class=\"ieeesa-view-tenants-list__content\">\r\n <div class=\"d-flex justify-content-end\">\r\n <button\r\n mat-button\r\n class=\"mat-tertiary-button me-3\"\r\n [attr.aria-label]=\"viewTenantsConstants?.ariaLabel?.add\"\r\n (click)=\"openCreateTenantForm()\"\r\n *ngIf=\"validateAccess(permissionType.MANAGE_TENANT)\"\r\n >\r\n {{ viewTenantsConstants?.addTenant }}\r\n </button>\r\n </div>\r\n <ieeesa-data-table\r\n [tableDataInfo]=\"tableData\"\r\n [columnSchemaInfo]=\"columnSchema\"\r\n [isCellTextOverflowEllipsis]=\"true\"\r\n [tableActions]=\"tableActions\"\r\n [paginatorConfig]=\"paginatorConfig\"\r\n [defaultSortedColumn]=\"defaultSortedColumn\"\r\n (sortChange)=\"onSortTenants($event)\"\r\n (paginationChange)=\"onTablePaginationChange($event)\"\r\n (rowLink)=\"navigateToViewTenantDetails($event)\"\r\n ></ieeesa-data-table>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-view-tenants-list{background-color:#f2f2f2;padding:0 24px 48px}.ieeesa-view-tenants-list__mobile{background-color:#fff}.ieeesa-view-tenants-list__content{background-color:#fff;box-shadow:0 1px 4px #00000040,0 4px #00b5e2 inset;padding:24px 0}.ieeesa-view-tenants-list__content .cdk-column-appId{min-width:9em;max-width:9em}.ieeesa-view-tenants-list__content .cdk-column-appTitle{min-width:10em;max-width:10em}.ieeesa-view-tenants-list__content .cdk-column-appDescription{min-width:20.25em;max-width:20.25em}.ieeesa-view-tenants-list__content .cdk-column-features{min-width:17em;max-width:17em}.ieeesa-view-tenants-list .ieeesa-data-table__pagination-container{padding-left:11px;padding-right:11px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.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: DataTableComponent, selector: "ieeesa-data-table", inputs: ["tableDataInfo", "nestedTableDataInfo", "columnSchemaInfo", "nestedTableColumnSchemaInfo", "tableActions", "hasNestedTable", "tableColumnActions", "tableColumnActionMenuSize", "tableRowActions", "nestedTableRowActions", "caption", "viewAll", "paginatorConfig", "nestedPaginatorConfig", "legends", "pageIndex", "pageSize", "searchPlaceHolderText", "rowEditButton", "rowDeleteButton", "tableEditButton", "tableDeleteButton", "rowExpandButton", "rowCollapseButton", "isNestedTableHeaderNeeded", "addButton", "defaultColumnSortDirection", "defaultSortedColumn", "isClearSortNeeded", "filters", "selectedFilterOptions", "appliedFilterOptions", "searchType", "className", "searchSupportMessage", "inbuiltSortingNeeded", "isCellTextOverflowEllipsis", "isTableHeaderNeeded", "tableColumnsHeaderText", "verticalColumnHeaderNumber", "scrollbarSupportMessage", "isScrollSupportMessageNeeded", "isStickyHeaderNeeded", "customStickyHeaderNeeded", "headerElementClassName", "minCharToSearch", "searchResultMessage", "rowMenuActionIcon", "canDisableCheckbox", "isEllipsisRequiredForLink"], outputs: ["rowSelected", "selectedRowToEdit", "selectedRowToDelete", "selectedRowsToDelete", "rowLink", "addRow", "columnDataOnRowLinkClick", "menuActionClick", "selectActionMenu", "paginationChange", "selectedFilter", "removeFilteredOption", "filteredOptions", "searchedValue", "sortChange", "selectedRowsInfo", "rowExpansionClick", "tableColumnMenuActionClick", "tableColumnMenuToggleButton", "rowSlideToggle"] }], encapsulation: i0.ViewEncapsulation.None }); }
2042
+ }
2043
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ViewTenantsListComponent, decorators: [{
2044
+ type: Component,
2045
+ args: [{ selector: 'ieeesa-view-tenants-list', standalone: true, imports: [CommonModule, MatButtonModule, DataTableComponent], encapsulation: ViewEncapsulation.None, template: "<div\r\n class=\"ieeesa-view-tenants-list\"\r\n [ngClass]=\"{ 'ieeesa-view-tenants-list__mobile': isMobileView }\"\r\n>\r\n <p class=\"ieeesa-headline-lg-32 py-3 mb-0\">\r\n {{ tenantsPageInfo.tenantsTitle }}\r\n </p>\r\n <div class=\"ieeesa-view-tenants-list__content\">\r\n <div class=\"d-flex justify-content-end\">\r\n <button\r\n mat-button\r\n class=\"mat-tertiary-button me-3\"\r\n [attr.aria-label]=\"viewTenantsConstants?.ariaLabel?.add\"\r\n (click)=\"openCreateTenantForm()\"\r\n *ngIf=\"validateAccess(permissionType.MANAGE_TENANT)\"\r\n >\r\n {{ viewTenantsConstants?.addTenant }}\r\n </button>\r\n </div>\r\n <ieeesa-data-table\r\n [tableDataInfo]=\"tableData\"\r\n [columnSchemaInfo]=\"columnSchema\"\r\n [isCellTextOverflowEllipsis]=\"true\"\r\n [tableActions]=\"tableActions\"\r\n [paginatorConfig]=\"paginatorConfig\"\r\n [defaultSortedColumn]=\"defaultSortedColumn\"\r\n (sortChange)=\"onSortTenants($event)\"\r\n (paginationChange)=\"onTablePaginationChange($event)\"\r\n (rowLink)=\"navigateToViewTenantDetails($event)\"\r\n ></ieeesa-data-table>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-view-tenants-list{background-color:#f2f2f2;padding:0 24px 48px}.ieeesa-view-tenants-list__mobile{background-color:#fff}.ieeesa-view-tenants-list__content{background-color:#fff;box-shadow:0 1px 4px #00000040,0 4px #00b5e2 inset;padding:24px 0}.ieeesa-view-tenants-list__content .cdk-column-appId{min-width:9em;max-width:9em}.ieeesa-view-tenants-list__content .cdk-column-appTitle{min-width:10em;max-width:10em}.ieeesa-view-tenants-list__content .cdk-column-appDescription{min-width:20.25em;max-width:20.25em}.ieeesa-view-tenants-list__content .cdk-column-features{min-width:17em;max-width:17em}.ieeesa-view-tenants-list .ieeesa-data-table__pagination-container{padding-left:11px;padding-right:11px}\n"] }]
2046
+ }], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i1.AlertsService }, { type: i2.BreakpointObserverService }, { type: i2$1.SharedService }, { type: TenantApplicationsService }, { type: i6.Router }]; }, propDecorators: { tenantsPageInfo: [{
2047
+ type: Input
2048
+ }], apiBaseURL: [{
2049
+ type: Input
2050
+ }], routePaths: [{
2051
+ type: Input
2052
+ }], userPermissions: [{
2053
+ type: Input
2054
+ }], defaultSortedColumn: [{
2055
+ type: Input
2056
+ }], createTenant: [{
2057
+ type: Output
2058
+ }], viewTenantsDetails: [{
2059
+ type: Output
2060
+ }] } });
2061
+
2062
+ var FeaturePermissionId;
2063
+ (function (FeaturePermissionId) {
2064
+ // eslint-disable-next-line no-unused-vars
2065
+ FeaturePermissionId["MEETINGS_AND_EVENTS"] = "FEATURE_049753e8-ea5c-4fad-adb0-e1456e69c7a5";
2066
+ // eslint-disable-next-line no-unused-vars
2067
+ FeaturePermissionId["BALLOTS"] = "FEATURE_a0ad3616-20dc-43da-813f-9b76d33f227a";
2068
+ })(FeaturePermissionId || (FeaturePermissionId = {}));
2069
+
2070
+ class TenantBasicDetailsComponent {
2071
+ set tenantDetails(value) {
2072
+ this.basicInfo = value;
2073
+ this.logo = this.basicInfo?.appLogo;
2074
+ this.selectedAppType = this.basicInfo?.appType;
2075
+ if (this.basicInfo) {
2076
+ this.getAppType();
2077
+ this.getFileDownloadPresignedUrls(this.logo);
2078
+ }
2079
+ }
2080
+ constructor(
2081
+ // eslint-disable-next-line no-unused-vars
2082
+ tenantAppService,
2083
+ // eslint-disable-next-line no-unused-vars
2084
+ breakpointObserverService,
2085
+ // eslint-disable-next-line no-unused-vars
2086
+ fileUploadService,
2087
+ // eslint-disable-next-line no-unused-vars
2088
+ sharedService) {
2089
+ this.tenantAppService = tenantAppService;
2090
+ this.breakpointObserverService = breakpointObserverService;
2091
+ this.fileUploadService = fileUploadService;
2092
+ this.sharedService = sharedService;
2093
+ this.destroy$ = new Subject();
2094
+ this.isMobileView = false;
2095
+ this.constants = screenText;
2096
+ this.basicDetailTexts = this.constants?.viewTenants?.tenantBasicDetails?.label;
2097
+ this.breakpointObserverService
2098
+ .getBreakpoint()
2099
+ .pipe(takeUntil(this.destroy$))
2100
+ .subscribe((result) => {
2101
+ this.isMobileView = result?.matches;
2102
+ });
2103
+ this.tenantAppService.getApplicationType();
2104
+ this.fileUploadService.setApiBaseUrl(this.tenantAppService?.apiBaseUrl);
2105
+ }
2106
+ /**
2107
+ * Gets the application types.
2108
+ * @memberof TenantBasicDetailsComponent
2109
+ */
2110
+ getAppType() {
2111
+ const appTypes = this.tenantAppService.getApplicationType();
2112
+ if (this.basicInfo) {
2113
+ const selectedType = appTypes?.find(({ id }) => id === this.basicInfo?.appType);
2114
+ this.selectedAppTypeLabel = selectedType?.label;
2115
+ }
2116
+ }
2117
+ /**
2118
+ * Retrieves presigned URL for downloading files from Amazon S3 bucket.
2119
+ * @memberof TenantBasicDetailsComponent
2120
+ */
2121
+ getFileDownloadPresignedUrls(fileName) {
2122
+ this.fileUploadService
2123
+ .getFileDownloadPresignedUrls(fileName)
2124
+ .pipe(takeUntil(this.destroy$))
2125
+ .subscribe({
2126
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2127
+ next: (response) => {
2128
+ this.imageUrl = response?.body;
2129
+ },
2130
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2131
+ error: (error) => {
2132
+ this.sharedService.handleErrors(error, this.constants?.viewTenants?.errors);
2133
+ },
2134
+ });
2135
+ }
2136
+ /**
2137
+ * Performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
2138
+ * @memberof ViewTenantDetailsComponent
2139
+ */
2140
+ ngOnDestroy() {
2141
+ this.destroy$?.next(true);
2142
+ this.destroy$?.unsubscribe();
2143
+ }
2144
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantBasicDetailsComponent, deps: [{ token: TenantApplicationsService }, { token: i2.BreakpointObserverService }, { token: i2.FileUploadService }, { token: i2$1.SharedService }], target: i0.ɵɵFactoryTarget.Component }); }
2145
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TenantBasicDetailsComponent, isStandalone: true, selector: "ieeesa-tenant-basic-details", inputs: { tenantDetails: "tenantDetails" }, ngImport: i0, template: "<div *ngIf=\"basicInfo\" class=\"ieeesa-tenant-basic-info d-flex flex-start flex-column\">\r\n <p class=\"ieeesa-body-color-sm-14 mb-0\">{{ basicDetailTexts.title }}</p>\r\n <p class=\"ieeesa-body-md-16\">{{ basicInfo.appTitle }}</p>\r\n <p class=\"ieeesa-body-color-sm-14 mb-2\">{{ basicDetailTexts.logo }}</p>\r\n <ng-container>\r\n <ieeesa-image-preview\r\n class=\"pb-3\"\r\n [imageUrl]=\"imageUrl\"\r\n ></ieeesa-image-preview>\r\n </ng-container>\r\n <span class=\"ieeesa-body-color-sm-14 mb-0\">{{\r\n basicDetailTexts.heading\r\n }}</span>\r\n <p class=\"ieeesa-title-sm-16\">{{ basicInfo.appHeading }}</p>\r\n <span class=\"ieeesa-body-color-sm-14 mb-0\">{{\r\n basicDetailTexts.description\r\n }}</span>\r\n <p class=\"ieeesa-title-sm-16 me-4\">{{ basicInfo.appDescription }}</p>\r\n <span class=\"ieeesa-body-color-sm-14 mb-2\">{{\r\n basicDetailTexts.bgColor\r\n }}</span>\r\n <p\r\n class=\"ieeesa-tenant-basic-info__bgColor\"\r\n [ngStyle]=\"{ 'background-color': basicInfo.backgroundColor }\"\r\n ></p>\r\n <span class=\"ieeesa-body-color-sm-14 mb-0\">{{\r\n basicDetailTexts.helpLink\r\n }}</span>\r\n <p class=\"ieeesa-title-sm-16\">{{ basicInfo.appHelpLink }}</p>\r\n <span class=\"ieeesa-body-color-sm-14 mb-0\">{{\r\n basicDetailTexts.listOfFeatures\r\n }}</span>\r\n <ul [ngClass]=\"isMobileView ? '' : 'd-flex gap-5'\">\r\n <li class=\"ieeesa-body-md-16\" *ngFor=\"let feature of basicInfo.features\">\r\n {{ feature?.featureName }}\r\n </li>\r\n </ul>\r\n <span class=\"ieeesa-body-color-sm-14 mb-0\">{{\r\n basicDetailTexts.domainURL\r\n }}</span>\r\n <p class=\"ieeesa-title-sm-16\">{{ basicInfo.appDomainUrl }}</p>\r\n <span class=\"ieeesa-body-color-sm-14 mb-0\">{{ basicDetailTexts.type }}</span>\r\n <p class=\"ieeesa-body-md-16\">{{ selectedAppTypeLabel }}</p>\r\n</div>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-tenant-basic-info .ieeesa-body-color-sm-14{color:#63666a!important}.ieeesa-tenant-basic-info__bgColor{width:1.85em;height:1.85em;border:1px solid #fffbfe}.ieeesa-tenant-basic-info .ieeesa-body-md-16,.ieeesa-tenant-basic-info .ieeesa-title-sm-16{color:#1c1b1f!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ImagePreviewComponent, selector: "ieeesa-image-preview", inputs: ["imageAltText", "imageUrl"] }], encapsulation: i0.ViewEncapsulation.None }); }
2146
+ }
2147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantBasicDetailsComponent, decorators: [{
2148
+ type: Component,
2149
+ args: [{ selector: 'ieeesa-tenant-basic-details', standalone: true, imports: [CommonModule, ImagePreviewComponent], encapsulation: ViewEncapsulation.None, template: "<div *ngIf=\"basicInfo\" class=\"ieeesa-tenant-basic-info d-flex flex-start flex-column\">\r\n <p class=\"ieeesa-body-color-sm-14 mb-0\">{{ basicDetailTexts.title }}</p>\r\n <p class=\"ieeesa-body-md-16\">{{ basicInfo.appTitle }}</p>\r\n <p class=\"ieeesa-body-color-sm-14 mb-2\">{{ basicDetailTexts.logo }}</p>\r\n <ng-container>\r\n <ieeesa-image-preview\r\n class=\"pb-3\"\r\n [imageUrl]=\"imageUrl\"\r\n ></ieeesa-image-preview>\r\n </ng-container>\r\n <span class=\"ieeesa-body-color-sm-14 mb-0\">{{\r\n basicDetailTexts.heading\r\n }}</span>\r\n <p class=\"ieeesa-title-sm-16\">{{ basicInfo.appHeading }}</p>\r\n <span class=\"ieeesa-body-color-sm-14 mb-0\">{{\r\n basicDetailTexts.description\r\n }}</span>\r\n <p class=\"ieeesa-title-sm-16 me-4\">{{ basicInfo.appDescription }}</p>\r\n <span class=\"ieeesa-body-color-sm-14 mb-2\">{{\r\n basicDetailTexts.bgColor\r\n }}</span>\r\n <p\r\n class=\"ieeesa-tenant-basic-info__bgColor\"\r\n [ngStyle]=\"{ 'background-color': basicInfo.backgroundColor }\"\r\n ></p>\r\n <span class=\"ieeesa-body-color-sm-14 mb-0\">{{\r\n basicDetailTexts.helpLink\r\n }}</span>\r\n <p class=\"ieeesa-title-sm-16\">{{ basicInfo.appHelpLink }}</p>\r\n <span class=\"ieeesa-body-color-sm-14 mb-0\">{{\r\n basicDetailTexts.listOfFeatures\r\n }}</span>\r\n <ul [ngClass]=\"isMobileView ? '' : 'd-flex gap-5'\">\r\n <li class=\"ieeesa-body-md-16\" *ngFor=\"let feature of basicInfo.features\">\r\n {{ feature?.featureName }}\r\n </li>\r\n </ul>\r\n <span class=\"ieeesa-body-color-sm-14 mb-0\">{{\r\n basicDetailTexts.domainURL\r\n }}</span>\r\n <p class=\"ieeesa-title-sm-16\">{{ basicInfo.appDomainUrl }}</p>\r\n <span class=\"ieeesa-body-color-sm-14 mb-0\">{{ basicDetailTexts.type }}</span>\r\n <p class=\"ieeesa-body-md-16\">{{ selectedAppTypeLabel }}</p>\r\n</div>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-tenant-basic-info .ieeesa-body-color-sm-14{color:#63666a!important}.ieeesa-tenant-basic-info__bgColor{width:1.85em;height:1.85em;border:1px solid #fffbfe}.ieeesa-tenant-basic-info .ieeesa-body-md-16,.ieeesa-tenant-basic-info .ieeesa-title-sm-16{color:#1c1b1f!important}\n"] }]
2150
+ }], ctorParameters: function () { return [{ type: TenantApplicationsService }, { type: i2.BreakpointObserverService }, { type: i2.FileUploadService }, { type: i2$1.SharedService }]; }, propDecorators: { tenantDetails: [{
2151
+ type: Input
2152
+ }] } });
2153
+
2154
+ class CreateModifyRoleComponent {
2155
+ constructor(
2156
+ // eslint-disable-next-line no-unused-vars
2157
+ tenantAppService,
2158
+ // eslint-disable-next-line no-unused-vars
2159
+ sharedService,
2160
+ // eslint-disable-next-line no-unused-vars
2161
+ globalErrorHandlerService // eslint-disable-next-line no-empty-function
2162
+ ) {
2163
+ this.tenantAppService = tenantAppService;
2164
+ this.sharedService = sharedService;
2165
+ this.globalErrorHandlerService = globalErrorHandlerService;
2166
+ this.destroy$ = new Subject();
2167
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2168
+ this.constants = screenText;
2169
+ this.createRoleTexts = this.constants?.createRole;
2170
+ this.leftButtonLabel = this.createRoleTexts?.label?.leftButtonLabel;
2171
+ this.rightButtonLabel = this.createRoleTexts?.label?.rightButtonLabel;
2172
+ this.colWidth = { xs: 12, xl: 12, sm: 12, md: 12, lg: 12 };
2173
+ this.actionButtonAlign = AlignType.LEFT;
2174
+ this.submitFormResponse = new EventEmitter();
2175
+ this.formCancel = new EventEmitter();
2176
+ }
2177
+ ngOnInit() {
2178
+ this.tenantFunctionType = this.tenantAppService?.getTenantFunctionType();
2179
+ this.selectedTenantInfo =
2180
+ this.tenantAppService?.getSelectedTenantInformation();
2181
+ this.roleTypeOptions =
2182
+ this.tenantAppService?.getRoleTypeOption();
2183
+ this.selectedRoleDetails =
2184
+ this.tenantAppService?.getSelectedRoleInformation();
2185
+ if (this.selectedRoleDetails) {
2186
+ this.selectedRole = this.tenantAppService?.roles?.find(({ roleId }) => roleId === this.selectedRoleDetails?.roleId);
2187
+ }
2188
+ this.initializeCreateRoleFormGroup();
2189
+ }
2190
+ /**
2191
+ * Constructs and returns the role type form field based on credit or edit role.
2192
+ * @return {FieldConfig} -role type form field.
2193
+ * @memberof CreateModifyRoleComponent
2194
+ */
2195
+ getRoleTypeField() {
2196
+ let roleTypeField;
2197
+ if (this.tenantFunctionType === TenantFunctionType.EDIT_ROLE) {
2198
+ roleTypeField = {
2199
+ type: FormControlType?.TEXT_AREA,
2200
+ label: this.createRoleTexts?.label?.roleType,
2201
+ controlName: 'roleType',
2202
+ isReadonly: true,
2203
+ value: this.selectedRole?.roleTypeName,
2204
+ ariaMultiline: false,
2205
+ ariaLabel: this.createRoleTexts?.label?.ariaLabel?.roleType,
2206
+ ariaDescribedById: this.createRoleTexts?.label?.ariaDescribedById?.roleType,
2207
+ isResize: true,
2208
+ };
2209
+ }
2210
+ else {
2211
+ roleTypeField = {
2212
+ type: FormControlType?.SELECT,
2213
+ label: this.createRoleTexts?.label?.roleType + '*',
2214
+ controlName: 'roleType',
2215
+ isSortNeeded: false,
2216
+ value: '',
2217
+ validation: [Validators.required],
2218
+ dropdownOptions: this.roleTypeOptions,
2219
+ supportMessage: this.createRoleTexts?.supportText?.roleType,
2220
+ requiredErrorMessage: this.createRoleTexts?.message?.error?.required,
2221
+ ariaLabel: this.createRoleTexts?.label?.ariaLabel?.roleType,
2222
+ ariaDescribedById: this.createRoleTexts?.label?.ariaDescribedById?.roleType,
2223
+ };
2224
+ }
2225
+ return roleTypeField;
2226
+ }
2227
+ /**
2228
+ * Initialize the create/edit role form group array.
2229
+ * @memberof CreateModifyRoleComponent
2230
+ */
2231
+ initializeCreateRoleFormGroup() {
2232
+ this.createRoleFormGroup = {
2233
+ formGroup: [
2234
+ {
2235
+ legend: '',
2236
+ controls: [
2237
+ {
2238
+ type: FormControlType.TEXT_AREA,
2239
+ label: this.createRoleTexts?.label?.appTitle,
2240
+ controlName: 'appTitle',
2241
+ value: this.selectedTenantInfo?.appTitle,
2242
+ ariaLabel: this.createRoleTexts?.label?.ariaLabel?.appTitle,
2243
+ ariaDescribedById: this.createRoleTexts?.label?.ariaDescribedById?.appTitle,
2244
+ isReadonly: true,
2245
+ ariaMultiline: false,
2246
+ isResize: true,
2247
+ },
2248
+ this.getRoleTypeField(),
2249
+ {
2250
+ type: FormControlType.INPUT,
2251
+ label: this.createRoleTexts?.label?.roleName + '*',
2252
+ controlName: 'roleName',
2253
+ value: this.tenantFunctionType === TenantFunctionType.EDIT_ROLE
2254
+ ? this.selectedRole?.roleName
2255
+ : '',
2256
+ validation: [
2257
+ Validators.required,
2258
+ Validators.maxLength(RolesValidation.roleNameMaxLength),
2259
+ ],
2260
+ supportMessage: this.createRoleTexts?.supportText?.roleName,
2261
+ requiredErrorMessage: this.createRoleTexts?.message?.error?.required,
2262
+ maxErrorMessage: this.createRoleTexts?.message?.error?.limit?.roleNameMaxChars,
2263
+ ariaLabel: this.createRoleTexts?.label?.ariaLabel?.roleName,
2264
+ ariaDescribedById: this.createRoleTexts?.label?.ariaDescribedById?.roleName,
2265
+ },
2266
+ ],
2267
+ },
2268
+ ],
2269
+ };
2270
+ }
2271
+ /**
2272
+ * Gets create/edit role form group reference.
2273
+ * @param {FormGroup[]} form
2274
+ * @memberof CreateModifyRoleComponent
2275
+ */
2276
+ getCreateModifyRoleFormGroupRef(form) {
2277
+ this.createModifyRoleFormGroupRef = form[0];
2278
+ }
2279
+ /**
2280
+ * Updates createModifyRoleFormGroupRef on add role form change event.
2281
+ * @param {FormGroup[]} form
2282
+ * @memberof CreateModifyRoleComponent
2283
+ */
2284
+ onCreateModifyRoleFormChange(form) {
2285
+ this.createModifyRoleFormGroupRef = form[0];
2286
+ }
2287
+ /**
2288
+ * Creates a new role on form submission and the form is valid.
2289
+ * @param {FormGroup[]} form
2290
+ * @memberof CreateModifyRoleComponent
2291
+ */
2292
+ onCreateModifyRoleFormSubmit(form) {
2293
+ form[0]?.markAllAsTouched();
2294
+ if (form[0].status === FormStatus.VALID) {
2295
+ this.createModifyRolePayload = this.getCreateModifyRolePayload(form[0].getRawValue());
2296
+ // eslint-disable-next-line no-unused-expressions
2297
+ this.tenantFunctionType === TenantFunctionType.EDIT_ROLE
2298
+ ? this.editRole()
2299
+ : this.createRole();
2300
+ }
2301
+ }
2302
+ /**
2303
+ * Constructs create/edit role payload from the form data and returns.
2304
+ * @param {*} formData
2305
+ * @return {CreateModifyRoleRequestPayload}
2306
+ * @memberof CreateModifyRoleComponent
2307
+ */
2308
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2309
+ getCreateModifyRolePayload(formData) {
2310
+ const payload = {
2311
+ payload: {
2312
+ appId: this.selectedTenantInfo?.appId,
2313
+ roleName: formData?.roleName,
2314
+ },
2315
+ };
2316
+ if (this.tenantFunctionType === TenantFunctionType.EDIT_ROLE) {
2317
+ payload.payload.roleId = this.selectedRole?.roleId;
2318
+ }
2319
+ else {
2320
+ payload.payload.roleType = formData?.roleType?.id;
2321
+ }
2322
+ return payload;
2323
+ }
2324
+ /**
2325
+ * Post the creates new role form data to the server on form submission to create a new role.
2326
+ * @param {CreateRoleRequestPayload} createModifyRolePayload
2327
+ * @memberof CreateModifyRoleComponent
2328
+ */
2329
+ createRole() {
2330
+ this.tenantAppService
2331
+ .createRole(this.createModifyRolePayload)
2332
+ .pipe(takeUntil(this.destroy$))
2333
+ .subscribe({
2334
+ next: (response) => {
2335
+ if (response.status) {
2336
+ this.tenantAppService.setNewlyCreatedRoleInfo(this.createModifyRolePayload?.payload);
2337
+ this.submitFormResponse.emit(response);
2338
+ }
2339
+ },
2340
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2341
+ error: (error) => {
2342
+ this.handleErrors(error);
2343
+ },
2344
+ });
2345
+ }
2346
+ /**
2347
+ * Post the edited role form data to server on form submission to update the selected role information.
2348
+ * @param {CreateModifyRoleRequestPayload} createModifyRolePayload
2349
+ * @memberof CreateModifyRoleComponent
2350
+ */
2351
+ editRole() {
2352
+ this.tenantAppService
2353
+ .editRole(this.createModifyRolePayload)
2354
+ .pipe(takeUntil(this.destroy$))
2355
+ .subscribe({
2356
+ next: (response) => {
2357
+ if (response.status) {
2358
+ this.tenantAppService.setNewlyCreatedRoleInfo(this.createModifyRolePayload?.payload);
2359
+ this.submitFormResponse.emit(response);
2360
+ }
2361
+ },
2362
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2363
+ error: (error) => {
2364
+ this.handleErrors(error);
2365
+ },
2366
+ });
2367
+ }
2368
+ /**
2369
+ * Captures the server side errors and handles it based on the custom or Http errors.
2370
+ * @param {HttpErrorResponse} error
2371
+ * @return -returns nothing
2372
+ * @memberof CreateModifyRoleComponent
2373
+ */
2374
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2375
+ handleErrors(error) {
2376
+ const errorCodes = error?.error?.body?.errorCodes;
2377
+ if (Array.isArray(errorCodes) && !error?.error?.status) {
2378
+ if (errorCodes[0] === '3012') {
2379
+ const roleName = this.createModifyRolePayload?.payload?.roleName;
2380
+ const errorMessage = this.sharedService?.parseErrorMessage(errorCodes, this.createRoleTexts?.errors);
2381
+ this.sharedService.showAlertMessage(AlertType.ERROR, `${roleName} ${errorMessage}`);
2382
+ }
2383
+ }
2384
+ else if (error && error instanceof HttpErrorResponse) {
2385
+ this.globalErrorHandlerService?.handleError(error);
2386
+ }
2387
+ }
2388
+ /**
2389
+ * Emits form cancel event.
2390
+ * @memberof CreateModifyRoleComponent
2391
+ */
2392
+ onFormCancel() {
2393
+ this.formCancel.emit();
2394
+ }
2395
+ /**
2396
+ * Implementation of ngOnDestroy lifecycle hook method to unsubscribe the open observable subscriptions.
2397
+ * @memberof CreateModifyRoleComponent
2398
+ */
2399
+ ngOnDestroy() {
2400
+ this.destroy$.next(true);
2401
+ this.destroy$.unsubscribe();
2402
+ }
2403
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateModifyRoleComponent, deps: [{ token: TenantApplicationsService }, { token: i2$1.SharedService }, { token: i1.GlobalErrorHandlerService }], target: i0.ɵɵFactoryTarget.Component }); }
2404
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CreateModifyRoleComponent, isStandalone: true, selector: "ieeesa-create-modify-role", outputs: { submitFormResponse: "submitFormResponse", formCancel: "formCancel" }, viewQueries: [{ propertyName: "dynamicFormComponent", first: true, predicate: DynamicFormComponent, descendants: true }], ngImport: i0, template: "<ieeesa-dynamic-form\r\n *ngIf=\"createRoleFormGroup\"\r\n class=\"ieeesa-create-role-form\"\r\n [leftButtonLabel]=\"leftButtonLabel\"\r\n [rightButtonLabel]=\"rightButtonLabel\"\r\n [isLegendVisible]=\"false\"\r\n [colWidth]=\"colWidth\"\r\n [actionButtonAlign]=\"actionButtonAlign\"\r\n [formGroups]=\"createRoleFormGroup\"\r\n [isLeftButtonNeeded]=\"true\"\r\n (formSubmit)=\"onCreateModifyRoleFormSubmit($event)\"\r\n (formChange)=\"onCreateModifyRoleFormChange($event)\"\r\n (formLeftButtonClicked)=\"onFormCancel()\"\r\n (formGroupsReference)=\"getCreateModifyRoleFormGroupRef($event)\"\r\n></ieeesa-dynamic-form>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-modal-dialog.ieeesa-create-modify-role{width:40vw!important}.ieeesa-modal-dialog.ieeesa-create-modify-role .mat-mdc-dialog-container{box-shadow:none}.ieeesa-modal-dialog.ieeesa-create-modify-role .mat-mdc-dialog-surface{border-radius:0;margin:1em 0}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal{box-shadow:0 3px #11b7e5 inset,0 4px 24px #00000080;padding-bottom:.5em}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .mat-mdc-dialog-content{padding:.5em 1em .75em!important}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .mat-mdc-form-field .mat-mdc-form-field-subscript-wrapper{display:none!important}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__actions{flex-direction:row-reverse;gap:.5em;padding:2em 1em .75em}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field{margin-bottom:1em;padding-top:0!important}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-select-field__label-top{min-height:6.25em!important}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-select-field,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field{width:70%}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-select-field .mat-mdc-form-field,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field .mat-mdc-form-field,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field .mat-mdc-form-field{display:flex}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-select-field .mat-mdc-form-field .mat-mdc-form-field-subscript-wrapper,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field .mat-mdc-form-field .mat-mdc-form-field-subscript-wrapper,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-form-field-subscript-wrapper{display:none!important}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .app-title.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]),.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .role-type.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]){padding-top:0;margin-bottom:0}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .app-title.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-text-field-wrapper,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .app-title.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-form-field-focus-overlay,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .role-type.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-text-field-wrapper,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .role-type.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-form-field-focus-overlay{background:#fff;padding:0;border:0}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .app-title.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .app-title.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-form-field-focus-overlay .mat-mdc-form-field-infix,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .role-type.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .role-type.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-form-field-focus-overlay .mat-mdc-form-field-infix{min-height:2.375em;padding-top:.0625em;padding-bottom:.375em}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .app-title.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mdc-line-ripple:before,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .app-title.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mdc-line-ripple:after,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .role-type.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mdc-line-ripple:before,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .role-type.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mdc-line-ripple:after{border:0}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-input-field .mat-mdc-form-field{display:flex}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-input-field .mat-mdc-form-field-subscript-wrapper{display:none!important}@media (max-width: 767px){.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-dynamic-form__form-field{width:100%}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-dynamic-form .ieeesa-select-field,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-dynamic-form .ieeesa-input-field,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-dynamic-form .mat-mdc-form-field-flex{width:100%!important}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DynamicFormComponent, selector: "ieeesa-dynamic-form", inputs: ["formGroups", "submitResponse", "searchResponse", "fileUploadStatus", "colWidth", "isLegendVisible", "rightButtonLabel", "leftButtonLabel", "isSubmitButtonDisabled", "isLeftButtonDisabled", "isLeftButtonNeeded", "isRightButtonNeeded", "actionButtonAlign", "fileDownloadAndDeleteConfig"], outputs: ["formSubmit", "formChange", "formInput", "formLeftButtonClicked", "formSearchApply", "formGroupsReference", "dropdownChange", "formCheckboxSelection", "formDateSelected", "formSelectSearch", "formControlChange", "formAutoCompleteSearch", "formAutoCompleteClearSearchValue", "autoCompleteOptionSelected", "formAfterContentInit", "formSelectedDateRange", "addFormGroup", "formTimeSelected", "supportTextLinkClick", "formSlideToggleChange", "formFileUpload", "dropdownOpenedChange", "formColorPickerChange", "formRadioOptionSelected", "ctaButtonClick", "formMultiSelectAutoCompleteSearch", "formMultiSelectAutoCompleteClearSearchValue", "multiSelectAutoCompleteOptionsSelected", "formRichTextEditorContentChange"], exportAs: ["dynamicForm"] }], encapsulation: i0.ViewEncapsulation.None }); }
2405
+ }
2406
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateModifyRoleComponent, decorators: [{
2407
+ type: Component,
2408
+ args: [{ selector: 'ieeesa-create-modify-role', standalone: true, imports: [CommonModule, DynamicFormComponent], encapsulation: ViewEncapsulation.None, template: "<ieeesa-dynamic-form\r\n *ngIf=\"createRoleFormGroup\"\r\n class=\"ieeesa-create-role-form\"\r\n [leftButtonLabel]=\"leftButtonLabel\"\r\n [rightButtonLabel]=\"rightButtonLabel\"\r\n [isLegendVisible]=\"false\"\r\n [colWidth]=\"colWidth\"\r\n [actionButtonAlign]=\"actionButtonAlign\"\r\n [formGroups]=\"createRoleFormGroup\"\r\n [isLeftButtonNeeded]=\"true\"\r\n (formSubmit)=\"onCreateModifyRoleFormSubmit($event)\"\r\n (formChange)=\"onCreateModifyRoleFormChange($event)\"\r\n (formLeftButtonClicked)=\"onFormCancel()\"\r\n (formGroupsReference)=\"getCreateModifyRoleFormGroupRef($event)\"\r\n></ieeesa-dynamic-form>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-modal-dialog.ieeesa-create-modify-role{width:40vw!important}.ieeesa-modal-dialog.ieeesa-create-modify-role .mat-mdc-dialog-container{box-shadow:none}.ieeesa-modal-dialog.ieeesa-create-modify-role .mat-mdc-dialog-surface{border-radius:0;margin:1em 0}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal{box-shadow:0 3px #11b7e5 inset,0 4px 24px #00000080;padding-bottom:.5em}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .mat-mdc-dialog-content{padding:.5em 1em .75em!important}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .mat-mdc-form-field .mat-mdc-form-field-subscript-wrapper{display:none!important}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__actions{flex-direction:row-reverse;gap:.5em;padding:2em 1em .75em}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field{margin-bottom:1em;padding-top:0!important}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-select-field__label-top{min-height:6.25em!important}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-select-field,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field{width:70%}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-select-field .mat-mdc-form-field,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field .mat-mdc-form-field,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field .mat-mdc-form-field{display:flex}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-select-field .mat-mdc-form-field .mat-mdc-form-field-subscript-wrapper,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-input-field .mat-mdc-form-field .mat-mdc-form-field-subscript-wrapper,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-form-field-subscript-wrapper{display:none!important}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .app-title.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]),.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .role-type.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]){padding-top:0;margin-bottom:0}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .app-title.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-text-field-wrapper,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .app-title.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-form-field-focus-overlay,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .role-type.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-text-field-wrapper,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .role-type.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-form-field-focus-overlay{background:#fff;padding:0;border:0}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .app-title.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .app-title.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-form-field-focus-overlay .mat-mdc-form-field-infix,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .role-type.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .role-type.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mat-mdc-form-field-focus-overlay .mat-mdc-form-field-infix{min-height:2.375em;padding-top:.0625em;padding-bottom:.375em}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .app-title.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mdc-line-ripple:before,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .app-title.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mdc-line-ripple:after,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .role-type.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mdc-line-ripple:before,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-modal .ieeesa-dynamic-form .role-type.ieeesa-dynamic-form__form-field:has(.mat-mdc-input-element[readonly=true]) .ieeesa-text-area-field .mat-mdc-form-field .mdc-line-ripple:after{border:0}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-input-field .mat-mdc-form-field{display:flex}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-input-field .mat-mdc-form-field-subscript-wrapper{display:none!important}@media (max-width: 767px){.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-dynamic-form__form-field{width:100%}.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-dynamic-form .ieeesa-select-field,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-dynamic-form .ieeesa-input-field,.ieeesa-modal-dialog.ieeesa-create-modify-role .ieeesa-dynamic-form .mat-mdc-form-field-flex{width:100%!important}}\n"] }]
2409
+ }], ctorParameters: function () { return [{ type: TenantApplicationsService }, { type: i2$1.SharedService }, { type: i1.GlobalErrorHandlerService }]; }, propDecorators: { dynamicFormComponent: [{
2410
+ type: ViewChild,
2411
+ args: [DynamicFormComponent]
2412
+ }], submitFormResponse: [{
2413
+ type: Output
2414
+ }], formCancel: [{
2415
+ type: Output
2416
+ }] } });
2417
+
2418
+ /* eslint-disable no-unused-vars */
2419
+ var RoleMenuAction;
2420
+ (function (RoleMenuAction) {
2421
+ RoleMenuAction[RoleMenuAction["EDIT_ROLE"] = 1] = "EDIT_ROLE";
2422
+ RoleMenuAction[RoleMenuAction["DELETE_ROLE"] = 2] = "DELETE_ROLE";
2423
+ })(RoleMenuAction || (RoleMenuAction = {}));
2424
+
2425
+ /* eslint-disable no-unused-vars */
2426
+ var RoleAndPermissionsTableType;
2427
+ (function (RoleAndPermissionsTableType) {
2428
+ RoleAndPermissionsTableType["ROLE"] = "ROLE";
2429
+ RoleAndPermissionsTableType["PERMISSION"] = "PERMISSION";
2430
+ })(RoleAndPermissionsTableType || (RoleAndPermissionsTableType = {}));
2431
+
2432
+ class RolesAndPermissionsMappingComponent {
2433
+ constructor(
2434
+ // eslint-disable-next-line no-unused-vars, no-empty-function, @typescript-eslint/no-unused-vars
2435
+ tenantAppService,
2436
+ // eslint-disable-next-line no-unused-vars
2437
+ sharedService,
2438
+ // eslint-disable-next-line no-unused-vars
2439
+ elementRef,
2440
+ // eslint-disable-next-line no-unused-vars
2441
+ formUtilityService // eslint-disable-next-line no-empty-function
2442
+ ) {
2443
+ this.tenantAppService = tenantAppService;
2444
+ this.sharedService = sharedService;
2445
+ this.elementRef = elementRef;
2446
+ this.formUtilityService = formUtilityService;
2447
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2448
+ this.constants = screenText;
2449
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2450
+ this.mapRolesAndPermissionsScreenTexts = this.constants?.mapRolesAndPermissions;
2451
+ this.colWidth = { xs: 12, xl: 6, sm: 12, md: 12, lg: 6 };
2452
+ this.actionButtonAlign = AlignType.MIDDLE;
2453
+ this.leftButtonLabel = this.mapRolesAndPermissionsScreenTexts?.label?.leftButtonLabel;
2454
+ this.rightButtonLabel = this.mapRolesAndPermissionsScreenTexts?.label?.rightButtonLabel;
2455
+ this.roles = [];
2456
+ this.permissions = [];
2457
+ this.destroy$ = new Subject();
2458
+ this.tableColumnSchema = [];
2459
+ this.tableData = [];
2460
+ this.modifiedRolesAndPermissionsMapping = [];
2461
+ this.tableHeading = '';
2462
+ this.rolePermissionMappingPayload = {
2463
+ payload: {
2464
+ appId: '',
2465
+ permissionId: null,
2466
+ roleId: null,
2467
+ },
2468
+ };
2469
+ this.formCancel = new EventEmitter();
2470
+ }
2471
+ /**
2472
+ * Initializes form group and all the page defaults.
2473
+ * @memberof MapPermissionsRolesComponent
2474
+ * @returns {void}
2475
+ */
2476
+ ngOnInit() {
2477
+ this.appId = this.tenantAppService.getSelectedTenantInformation()
2478
+ ?.appId;
2479
+ this.formGroup = {
2480
+ formGroup: [
2481
+ {
2482
+ legend: this.mapRolesAndPermissionsScreenTexts?.legend,
2483
+ controls: [
2484
+ {
2485
+ controlName: 'role',
2486
+ label: this.mapRolesAndPermissionsScreenTexts?.label?.role,
2487
+ type: FormControlType.SELECT,
2488
+ dropdownOptions: this.roles,
2489
+ supportMessage: this.mapRolesAndPermissionsScreenTexts?.supportText?.role,
2490
+ ariaLabel: this.mapRolesAndPermissionsScreenTexts?.label?.ariaLabel?.role,
2491
+ ariaDescribedById: this.mapRolesAndPermissionsScreenTexts?.label?.ariaDescribedById
2492
+ ?.role,
2493
+ },
2494
+ {
2495
+ controlName: 'permission',
2496
+ label: this.mapRolesAndPermissionsScreenTexts?.label?.permission,
2497
+ type: FormControlType.SELECT,
2498
+ dropdownOptions: this.permissions,
2499
+ supportMessage: this.mapRolesAndPermissionsScreenTexts?.supportText?.permission,
2500
+ ariaLabel: this.mapRolesAndPermissionsScreenTexts?.label?.ariaLabel
2501
+ ?.permission,
2502
+ ariaDescribedById: this.mapRolesAndPermissionsScreenTexts?.label?.ariaDescribedById
2503
+ ?.permission,
2504
+ },
2505
+ ],
2506
+ },
2507
+ ],
2508
+ };
2509
+ this.getRoles();
2510
+ this.getPermissions();
2511
+ this.sharedService.isAlertClosed
2512
+ .pipe(takeUntil(this.destroy$))
2513
+ .subscribe(() => {
2514
+ const alertModals = document.querySelectorAll('.cdk-overlay-container ieeesa-alert');
2515
+ if (alertModals.length) {
2516
+ document.querySelector('.cdk-overlay-container .mat-mdc-dialog-content .ieeesa-alert-box__close-button')?.focus();
2517
+ }
2518
+ else {
2519
+ this.elementRef.nativeElement.querySelector('.cdk-overlay-container .mat-mdc-dialog-content .ieeesa-select-field mat-select')?.focus();
2520
+ }
2521
+ });
2522
+ }
2523
+ /**
2524
+ * Constructs the role or permission table schema to display the associated mapping in a table view.
2525
+ * @param {FormGroup[]} formGroups
2526
+ * @memberof MapPermissionsRolesComponent
2527
+ * @returns {void}
2528
+ */
2529
+ onRoleOrPermissionSelected(formGroups) {
2530
+ this.tableColumnSchema = [];
2531
+ this.modifiedRolesAndPermissionsMapping = [];
2532
+ const formGroup = formGroups[0];
2533
+ const role = formGroup.get('role')?.value;
2534
+ const permission = formGroup.get('permission')?.value;
2535
+ if (role) {
2536
+ this.selectedRole = {
2537
+ roleId: role.id,
2538
+ roleName: role.name,
2539
+ };
2540
+ this.rolePermissionMappingPayload.payload.roleId = role?.id;
2541
+ }
2542
+ if (permission) {
2543
+ this.selectedPermission = {
2544
+ permissionId: permission.id,
2545
+ permissionName: permission.name,
2546
+ };
2547
+ this.rolePermissionMappingPayload.payload.permissionId = permission?.id;
2548
+ }
2549
+ this.rolePermissionMappingPayload.payload.appId = this.appId;
2550
+ if ((role && permission) || role) {
2551
+ this.tableHeading = `${this.mapRolesAndPermissionsScreenTexts?.roleTableCaption}<strong>${role?.name}</strong>`;
2552
+ this.tableColumnSchema.push({
2553
+ id: 1,
2554
+ columnDef: 'permission',
2555
+ heading: this.mapRolesAndPermissionsScreenTexts.tableColumns.permission,
2556
+ columnType: TableColumnType.TEXT,
2557
+ cellData: (permissionMapping) => permissionMapping?.roleOrPermissionName,
2558
+ });
2559
+ }
2560
+ else {
2561
+ this.tableColumnSchema.push({
2562
+ id: 1,
2563
+ columnDef: 'role',
2564
+ heading: this.mapRolesAndPermissionsScreenTexts.tableColumns.role,
2565
+ columnType: TableColumnType.TEXT,
2566
+ cellData: (roleMapping) => roleMapping?.roleOrPermissionName,
2567
+ });
2568
+ }
2569
+ if (permission) {
2570
+ const permissionHeading = `${this.mapRolesAndPermissionsScreenTexts?.permissionTableCaption}<strong>${permission?.name}</strong>`;
2571
+ this.tableHeading = role
2572
+ ? this.tableHeading + `</br>` + permissionHeading
2573
+ : permissionHeading;
2574
+ }
2575
+ this.tableColumnSchema.push({
2576
+ id: 2,
2577
+ columnDef: 'slideToggle',
2578
+ heading: this.mapRolesAndPermissionsScreenTexts.tableColumns.status,
2579
+ columnType: TableColumnType.SLIDE_TOGGLE,
2580
+ cellData: (roleMapping) => {
2581
+ return {
2582
+ id: Math.floor(Math.random() * 1000) + 1,
2583
+ label: '',
2584
+ ariaLabel: roleMapping.roleOrPermissionName,
2585
+ checked: roleMapping.status,
2586
+ };
2587
+ },
2588
+ });
2589
+ this.dynamicFormComponent.isSubmitButtonDisabled = true;
2590
+ this.getRolePermissionMapping(this.rolePermissionMappingPayload);
2591
+ }
2592
+ /**
2593
+ * Gets the list of roles and displayed in the role dropdown.
2594
+ * @memberof MapPermissionsRolesComponent
2595
+ * @returns {void}
2596
+ */
2597
+ getRoles() {
2598
+ this.tenantAppService
2599
+ .getRoles(this.appId)
2600
+ .pipe(takeUntil(this.destroy$))
2601
+ .subscribe({
2602
+ next: (response) => {
2603
+ if (response?.status) {
2604
+ const rolesList = response?.body;
2605
+ rolesList.map((role) => {
2606
+ this.roles.push({
2607
+ id: role.roleId,
2608
+ name: role.roleName,
2609
+ });
2610
+ });
2611
+ this.formUtilityService.updateFormControlOptions('role', 'dropdownOptions', this.roles, this.dynamicFormComponent);
2612
+ }
2613
+ },
2614
+ error: (error) => {
2615
+ this.sharedService.handleErrors(error, this.mapRolesAndPermissionsScreenTexts.errors);
2616
+ },
2617
+ });
2618
+ }
2619
+ /**
2620
+ * Gets the list of permissions and displayed in the permission dropdown.
2621
+ * @memberof MapPermissionsRolesComponent
2622
+ * @returns {void}
2623
+ */
2624
+ getPermissions() {
2625
+ this.tenantAppService
2626
+ .getPermissions(this.appId)
2627
+ .pipe(takeUntil(this.destroy$))
2628
+ .subscribe({
2629
+ next: (response) => {
2630
+ if (response?.status) {
2631
+ const permissionsList = response?.body;
2632
+ permissionsList.map((permission) => {
2633
+ this.permissions.push({
2634
+ id: permission.permissionId,
2635
+ name: permission.permissionName,
2636
+ });
2637
+ });
2638
+ this.formUtilityService.updateFormControlOptions('permission', 'dropdownOptions', this.permissions, this.dynamicFormComponent);
2639
+ }
2640
+ },
2641
+ error: (error) => {
2642
+ this.sharedService.handleErrors(error, this.mapRolesAndPermissionsScreenTexts.errors);
2643
+ },
2644
+ });
2645
+ }
2646
+ /**
2647
+ * Gets the list of mapped roles/permissions from the backend api.
2648
+ * @param {RolePermissionMappingRequestPayload} payload
2649
+ * @memberof MapPermissionsRolesComponent
2650
+ * @returns {void}
2651
+ */
2652
+ getRolePermissionMapping(payload) {
2653
+ this.tableData = [];
2654
+ this.tenantAppService
2655
+ .getRolePermissionMapping(payload)
2656
+ .pipe(takeUntil(this.destroy$))
2657
+ .subscribe({
2658
+ next: (response) => {
2659
+ const payloadInfo = payload.payload;
2660
+ if (payloadInfo?.roleId && payloadInfo?.permissionId) {
2661
+ this.tableData.push({
2662
+ roleOrPermissionName: this.selectedPermission?.permissionName,
2663
+ roleOrPermissionId: this.selectedPermission?.permissionId,
2664
+ status: true,
2665
+ });
2666
+ }
2667
+ else if (payloadInfo?.roleId) {
2668
+ this.setTableData(this.permissions, response.body, RoleAndPermissionsTableType.PERMISSION);
2669
+ }
2670
+ else {
2671
+ this.setTableData(this.roles, response.body, RoleAndPermissionsTableType.ROLE);
2672
+ }
2673
+ },
2674
+ error: (error) => {
2675
+ const errorCodes = error?.error?.body?.errorCodes;
2676
+ // Returns error code 3020 when mapped roles does not exist for given permission id.
2677
+ if (errorCodes.includes('3020')) {
2678
+ this.setTableData(this.roles, [], RoleAndPermissionsTableType.ROLE);
2679
+ }
2680
+ // Returns error code 3021 when mapped permissions does not exist for given role id.
2681
+ else if (errorCodes.includes('3021')) {
2682
+ this.setTableData(this.permissions, [], RoleAndPermissionsTableType.PERMISSION);
2683
+ }
2684
+ // Returns error code 3017 when role permission mapping does not exist for given role id.
2685
+ else if (errorCodes.includes('3017')) {
2686
+ this.tableData.push({
2687
+ roleOrPermissionName: this.selectedPermission?.permissionName,
2688
+ roleOrPermissionId: this.selectedPermission?.permissionId,
2689
+ status: false,
2690
+ });
2691
+ }
2692
+ else
2693
+ this.sharedService.handleErrors(error, this.mapRolesAndPermissionsScreenTexts.errors);
2694
+ },
2695
+ });
2696
+ }
2697
+ /**
2698
+ * Displaying the mapped roles and permissions data into the data table.
2699
+ * @param {SelectOption[]} roleOrPermissions
2700
+ * @param {RoleDetails[] | Permission[]} mappedRoleOrPermissions
2701
+ * @param {RoleAndPermissionsTableType} tableType
2702
+ * @memberof MapPermissionsRolesComponent
2703
+ * @returns {void}
2704
+ */
2705
+ setTableData(roleOrPermissions, mappedRoleOrPermissions, tableType) {
2706
+ roleOrPermissions.map((roleOrPermission) => {
2707
+ this.tableData.push({
2708
+ roleOrPermissionName: roleOrPermission.name,
2709
+ roleOrPermissionId: roleOrPermission.id,
2710
+ status: tableType === RoleAndPermissionsTableType.ROLE
2711
+ ? mappedRoleOrPermissions.length > 0 &&
2712
+ mappedRoleOrPermissions.some((mappedRoleOrPermission) => mappedRoleOrPermission.roleId === roleOrPermission.id)
2713
+ : mappedRoleOrPermissions.length > 0 &&
2714
+ mappedRoleOrPermissions.some((mappedRoleOrPermission) => mappedRoleOrPermission.permissionId === roleOrPermission.id),
2715
+ });
2716
+ });
2717
+ }
2718
+ /**
2719
+ * Constructs the payload based on the roles and permissions mapping (selection or deselection).
2720
+ * @param roleOrPermissionStatus
2721
+ * @memberof MapPermissionsRolesComponent
2722
+ * @returns {void}
2723
+ */
2724
+ roleOrPermissionStatusChange(roleOrPermissionStatus) {
2725
+ if ((this.selectedRole?.roleId && this.selectedPermission?.permissionId) ||
2726
+ this.selectedRole?.roleId) {
2727
+ if (this.modifiedRolesAndPermissionsMapping.find((permission) => permission.permissionId ===
2728
+ roleOrPermissionStatus.rowData.roleOrPermissionId)) {
2729
+ this.modifiedRolesAndPermissionsMapping.splice(this.modifiedRolesAndPermissionsMapping.findIndex((permission) => permission.permissionId ===
2730
+ roleOrPermissionStatus.rowData.roleOrPermissionId), 1);
2731
+ }
2732
+ else {
2733
+ this.modifiedRolesAndPermissionsMapping.push({
2734
+ roleId: this.selectedRole.roleId,
2735
+ permissionId: roleOrPermissionStatus.rowData.roleOrPermissionId,
2736
+ appId: this.appId,
2737
+ status: roleOrPermissionStatus.slideToggle.checked,
2738
+ });
2739
+ }
2740
+ }
2741
+ else if (this.selectedPermission?.permissionId) {
2742
+ if (this.modifiedRolesAndPermissionsMapping.find((role) => role.roleId === roleOrPermissionStatus.rowData.roleOrPermissionId)) {
2743
+ this.modifiedRolesAndPermissionsMapping.splice(this.modifiedRolesAndPermissionsMapping.findIndex((role) => role.roleId === roleOrPermissionStatus.rowData.roleOrPermissionId), 1);
2744
+ }
2745
+ else {
2746
+ this.modifiedRolesAndPermissionsMapping.push({
2747
+ roleId: roleOrPermissionStatus.rowData.roleOrPermissionId,
2748
+ permissionId: this.selectedPermission.permissionId,
2749
+ appId: this.appId,
2750
+ status: roleOrPermissionStatus.slideToggle.checked,
2751
+ });
2752
+ }
2753
+ }
2754
+ this.dynamicFormComponent.isSubmitButtonDisabled =
2755
+ !this.modifiedRolesAndPermissionsMapping.length;
2756
+ }
2757
+ /**
2758
+ * Submits the roles and permissions mappings to the server.
2759
+ * @memberof MapPermissionsRolesComponent
2760
+ * @returns {void}
2761
+ */
2762
+ onMapAndPermissionsFormSubmit() {
2763
+ const payload = {
2764
+ payload: this.modifiedRolesAndPermissionsMapping,
2765
+ };
2766
+ this.dynamicFormComponent.isSubmitButtonDisabled = true;
2767
+ this.modifiedRolesAndPermissionsMapping = [];
2768
+ this.tenantAppService
2769
+ .saveRolePermissionMapping(payload)
2770
+ .pipe(takeUntil(this.destroy$))
2771
+ .subscribe({
2772
+ next: (response) => {
2773
+ if (response?.status) {
2774
+ this.sharedService.showAlertMessage(AlertType.SUCCESS, this.mapRolesAndPermissionsScreenTexts.message.success
2775
+ .rolesAndPermissionsSubmission);
2776
+ }
2777
+ },
2778
+ error: (error) => {
2779
+ this.sharedService.handleErrors(error, this.mapRolesAndPermissionsScreenTexts.errors);
2780
+ },
2781
+ });
2782
+ }
2783
+ /**
2784
+ * Closes the map and permissions modal.
2785
+ * @memberof MapPermissionsRolesComponent
2786
+ * @returns {void}
2787
+ */
2788
+ onMapAndPermissionsFormCancel() {
2789
+ this.formCancel.emit();
2790
+ }
2791
+ /**
2792
+ * Performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
2793
+ * @memberof ViewTenantDetailsComponent
2794
+ */
2795
+ ngOnDestroy() {
2796
+ this.destroy$?.next(true);
2797
+ this.destroy$?.unsubscribe();
2798
+ }
2799
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RolesAndPermissionsMappingComponent, deps: [{ token: TenantApplicationsService }, { token: i2$1.SharedService }, { token: i0.ElementRef }, { token: i2$1.FormUtilityService }], target: i0.ɵɵFactoryTarget.Component }); }
2800
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RolesAndPermissionsMappingComponent, isStandalone: true, selector: "ieeesa-roles-and-permissions-mapping", outputs: { formCancel: "formCancel" }, viewQueries: [{ propertyName: "dynamicFormComponent", first: true, predicate: DynamicFormComponent, descendants: true }], ngImport: i0, template: "<ieeesa-dynamic-form\r\n [formGroups]=\"formGroup\"\r\n [colWidth]=\"colWidth\"\r\n [isSubmitButtonDisabled]=\"true\"\r\n [isLegendVisible]=\"true\"\r\n [leftButtonLabel]=\"leftButtonLabel\"\r\n [rightButtonLabel]=\"rightButtonLabel\"\r\n [isLeftButtonNeeded]=\"true\"\r\n [actionButtonAlign]=\"actionButtonAlign\"\r\n (dropdownChange)=\"onRoleOrPermissionSelected($event)\"\r\n (formSubmit)=\"onMapAndPermissionsFormSubmit()\"\r\n (formLeftButtonClicked)=\"onMapAndPermissionsFormCancel()\"\r\n>\r\n <ieeesa-data-table\r\n component\r\n *ngIf=\"tableData.length\"\r\n [columnSchemaInfo]=\"tableColumnSchema\"\r\n [tableColumnsHeaderText]=\"tableHeading\"\r\n [tableDataInfo]=\"tableData\"\r\n (rowSlideToggle)=\"roleOrPermissionStatusChange($event)\"\r\n ></ieeesa-data-table>\r\n</ieeesa-dynamic-form>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-map-permissions-and-roles{max-width:50vw!important}.ieeesa-map-permissions-and-roles .mat-mdc-dialog-container{box-shadow:none}.ieeesa-map-permissions-and-roles .mat-mdc-dialog-surface{border-radius:0}.ieeesa-map-permissions-and-roles .ieeesa-modal{box-shadow:0 3px #00b5e2 inset,0 4px 24px #00000080}.ieeesa-map-permissions-and-roles .ieeesa-modal-title__heading{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.5rem;line-height:28px;color:#000;letter-spacing:.03125em}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form .row{margin:0;padding:0 12px}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form__legend{text-align:center;margin-bottom:0;font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form__form-field{padding-top:4px!important}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form__form-field .mat-mdc-form-field-subscript-wrapper{display:none}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form__actions{flex-direction:row-reverse;gap:24px;padding-top:48px!important}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form .ieeesa-data-table{width:33vw;padding-top:48px}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form .ieeesa-data-table__columns-header-text{font-size:16px;padding:0}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form .ieeesa-data-table .mat-colum-role,.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form .ieeesa-data-table .mat-column-permission{padding:16px}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form .ieeesa-data-table__content{padding-top:12px}@media (max-width: 767px){.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form .ieeesa-data-table{width:auto}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form__form-field{padding-top:24px!important}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DynamicFormComponent, selector: "ieeesa-dynamic-form", inputs: ["formGroups", "submitResponse", "searchResponse", "fileUploadStatus", "colWidth", "isLegendVisible", "rightButtonLabel", "leftButtonLabel", "isSubmitButtonDisabled", "isLeftButtonDisabled", "isLeftButtonNeeded", "isRightButtonNeeded", "actionButtonAlign", "fileDownloadAndDeleteConfig"], outputs: ["formSubmit", "formChange", "formInput", "formLeftButtonClicked", "formSearchApply", "formGroupsReference", "dropdownChange", "formCheckboxSelection", "formDateSelected", "formSelectSearch", "formControlChange", "formAutoCompleteSearch", "formAutoCompleteClearSearchValue", "autoCompleteOptionSelected", "formAfterContentInit", "formSelectedDateRange", "addFormGroup", "formTimeSelected", "supportTextLinkClick", "formSlideToggleChange", "formFileUpload", "dropdownOpenedChange", "formColorPickerChange", "formRadioOptionSelected", "ctaButtonClick", "formMultiSelectAutoCompleteSearch", "formMultiSelectAutoCompleteClearSearchValue", "multiSelectAutoCompleteOptionsSelected", "formRichTextEditorContentChange"], exportAs: ["dynamicForm"] }, { kind: "component", type: DataTableComponent, selector: "ieeesa-data-table", inputs: ["tableDataInfo", "nestedTableDataInfo", "columnSchemaInfo", "nestedTableColumnSchemaInfo", "tableActions", "hasNestedTable", "tableColumnActions", "tableColumnActionMenuSize", "tableRowActions", "nestedTableRowActions", "caption", "viewAll", "paginatorConfig", "nestedPaginatorConfig", "legends", "pageIndex", "pageSize", "searchPlaceHolderText", "rowEditButton", "rowDeleteButton", "tableEditButton", "tableDeleteButton", "rowExpandButton", "rowCollapseButton", "isNestedTableHeaderNeeded", "addButton", "defaultColumnSortDirection", "defaultSortedColumn", "isClearSortNeeded", "filters", "selectedFilterOptions", "appliedFilterOptions", "searchType", "className", "searchSupportMessage", "inbuiltSortingNeeded", "isCellTextOverflowEllipsis", "isTableHeaderNeeded", "tableColumnsHeaderText", "verticalColumnHeaderNumber", "scrollbarSupportMessage", "isScrollSupportMessageNeeded", "isStickyHeaderNeeded", "customStickyHeaderNeeded", "headerElementClassName", "minCharToSearch", "searchResultMessage", "rowMenuActionIcon", "canDisableCheckbox", "isEllipsisRequiredForLink"], outputs: ["rowSelected", "selectedRowToEdit", "selectedRowToDelete", "selectedRowsToDelete", "rowLink", "addRow", "columnDataOnRowLinkClick", "menuActionClick", "selectActionMenu", "paginationChange", "selectedFilter", "removeFilteredOption", "filteredOptions", "searchedValue", "sortChange", "selectedRowsInfo", "rowExpansionClick", "tableColumnMenuActionClick", "tableColumnMenuToggleButton", "rowSlideToggle"] }], encapsulation: i0.ViewEncapsulation.None }); }
2801
+ }
2802
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RolesAndPermissionsMappingComponent, decorators: [{
2803
+ type: Component,
2804
+ args: [{ selector: 'ieeesa-roles-and-permissions-mapping', standalone: true, imports: [CommonModule, DynamicFormComponent, DataTableComponent], encapsulation: ViewEncapsulation.None, template: "<ieeesa-dynamic-form\r\n [formGroups]=\"formGroup\"\r\n [colWidth]=\"colWidth\"\r\n [isSubmitButtonDisabled]=\"true\"\r\n [isLegendVisible]=\"true\"\r\n [leftButtonLabel]=\"leftButtonLabel\"\r\n [rightButtonLabel]=\"rightButtonLabel\"\r\n [isLeftButtonNeeded]=\"true\"\r\n [actionButtonAlign]=\"actionButtonAlign\"\r\n (dropdownChange)=\"onRoleOrPermissionSelected($event)\"\r\n (formSubmit)=\"onMapAndPermissionsFormSubmit()\"\r\n (formLeftButtonClicked)=\"onMapAndPermissionsFormCancel()\"\r\n>\r\n <ieeesa-data-table\r\n component\r\n *ngIf=\"tableData.length\"\r\n [columnSchemaInfo]=\"tableColumnSchema\"\r\n [tableColumnsHeaderText]=\"tableHeading\"\r\n [tableDataInfo]=\"tableData\"\r\n (rowSlideToggle)=\"roleOrPermissionStatusChange($event)\"\r\n ></ieeesa-data-table>\r\n</ieeesa-dynamic-form>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-map-permissions-and-roles{max-width:50vw!important}.ieeesa-map-permissions-and-roles .mat-mdc-dialog-container{box-shadow:none}.ieeesa-map-permissions-and-roles .mat-mdc-dialog-surface{border-radius:0}.ieeesa-map-permissions-and-roles .ieeesa-modal{box-shadow:0 3px #00b5e2 inset,0 4px 24px #00000080}.ieeesa-map-permissions-and-roles .ieeesa-modal-title__heading{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1.5rem;line-height:28px;color:#000;letter-spacing:.03125em}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form .row{margin:0;padding:0 12px}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form__legend{text-align:center;margin-bottom:0;font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form__form-field{padding-top:4px!important}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form__form-field .mat-mdc-form-field-subscript-wrapper{display:none}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form__actions{flex-direction:row-reverse;gap:24px;padding-top:48px!important}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form .ieeesa-data-table{width:33vw;padding-top:48px}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form .ieeesa-data-table__columns-header-text{font-size:16px;padding:0}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form .ieeesa-data-table .mat-colum-role,.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form .ieeesa-data-table .mat-column-permission{padding:16px}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form .ieeesa-data-table__content{padding-top:12px}@media (max-width: 767px){.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form .ieeesa-data-table{width:auto}.ieeesa-map-permissions-and-roles .ieeesa-dynamic-form__form-field{padding-top:24px!important}}\n"] }]
2805
+ }], ctorParameters: function () { return [{ type: TenantApplicationsService }, { type: i2$1.SharedService }, { type: i0.ElementRef }, { type: i2$1.FormUtilityService }]; }, propDecorators: { formCancel: [{
2806
+ type: Output
2807
+ }], dynamicFormComponent: [{
2808
+ type: ViewChild,
2809
+ args: [DynamicFormComponent]
2810
+ }] } });
2811
+
2812
+ /* eslint-disable no-unused-vars */
2813
+ var GroupTypeSettings;
2814
+ (function (GroupTypeSettings) {
2815
+ GroupTypeSettings["ALLOW_SUB_GROUP"] = "allowSubGroup";
2816
+ GroupTypeSettings["ALLOW_ROSTER"] = "allowRoster";
2817
+ GroupTypeSettings["ALLOW_ALTERNATE_VOTING"] = "allowAlternateVoting";
2818
+ GroupTypeSettings["HAS_CLASSIFICATION"] = "hasClassification";
2819
+ GroupTypeSettings["ALLOW_EDIT"] = "allowEdit";
2820
+ GroupTypeSettings["ALLOW_DELETE"] = "allowDelete";
2821
+ })(GroupTypeSettings || (GroupTypeSettings = {}));
2822
+
2823
+ /**
2824
+ * Component for viewing and managing tenant group types. Fetches the configured group types associated to the selected tenant and displays in tabular view.
2825
+ * @export
2826
+ * @class ViewTenantGroupTypesComponent
2827
+ * @implements {OnInit}
2828
+ */
2829
+ class ViewTenantGroupTypesComponent {
2830
+ constructor(
2831
+ // eslint-disable-next-line no-unused-vars
2832
+ tenantAppService,
2833
+ // eslint-disable-next-line no-unused-vars
2834
+ sharedService // eslint-disable-next-line no-empty-function
2835
+ ) {
2836
+ this.tenantAppService = tenantAppService;
2837
+ this.sharedService = sharedService;
2838
+ this.destroy$ = new Subject();
2839
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2840
+ this.constants = screenText;
2841
+ this.columnHeading = this.constants?.viewGroupTypes?.tableColumns?.heading;
2842
+ this.settings = this.constants?.viewGroupTypes?.settings;
2843
+ this.tableRowActions = this.constants?.viewGroupTypes?.actionMenuItems;
2844
+ this.columnSchema = [];
2845
+ this.groupTypes = [];
2846
+ this.appId = '';
2847
+ this.headerElementClassName = '.ieeesa-header';
2848
+ }
2849
+ /**
2850
+ * Fetches group types data from the server and initializes column schema.
2851
+ * @memberof ViewTenantGroupTypesComponent
2852
+ */
2853
+ ngOnInit() {
2854
+ this.appId = this.tenantAppService.getSelectedTenantInformation()
2855
+ ?.appId;
2856
+ this.getGroupTypes();
2857
+ this.tenantAppService.isGroupTypeAddedOrModified
2858
+ .pipe(takeUntil(this.destroy$))
2859
+ .subscribe((value) => {
2860
+ if (value) {
2861
+ this.getGroupTypes();
2862
+ this.tenantAppService.isGroupTypeAddedOrModified.next(false);
2863
+ }
2864
+ });
2865
+ }
2866
+ /**
2867
+ * Get group types from tenant application service.
2868
+ * @memberof ViewTenantGroupTypesComponent
2869
+ */
2870
+ getGroupTypes() {
2871
+ this.tenantAppService
2872
+ .getGroupTypes(this.appId)
2873
+ .pipe(takeUntil(this.destroy$))
2874
+ .subscribe({
2875
+ next: (response) => {
2876
+ this.initializeColumnSchema();
2877
+ this.groupTypes = this.formatGroupTypesTableData(response);
2878
+ this.tenantAppService.setGroupTypeDetails(response);
2879
+ },
2880
+ error: (error) => {
2881
+ this.sharedService.handleErrors(error, this.constants?.viewGroupTypes?.errors);
2882
+ },
2883
+ });
2884
+ }
2885
+ /**
2886
+ * Formats raw group types data into a required format for display.
2887
+ * @param {ViewGroupTypeResponse} groupTypeRes
2888
+ * @return {GroupTypeDetails[]}
2889
+ * @memberof ViewTenantGroupTypesComponent
2890
+ */
2891
+ formatGroupTypesTableData(groupTypeRes) {
2892
+ const formattedData = [];
2893
+ groupTypeRes?.body?.forEach((item) => {
2894
+ if (item?.configFieldValue?.businessRule?.rosterType !==
2895
+ GroupRosterType?.SYSTEM_USER) {
2896
+ const { configFieldValue, roles, hasGroup } = item;
2897
+ const { name, description, businessRule } = configFieldValue;
2898
+ const { rosterType, ...restBusinessRule } = businessRule;
2899
+ const businessRuleString = this.transformBusinessRule(restBusinessRule);
2900
+ const roleNames = roles
2901
+ ? roles?.map((role) => role?.roleName).join(', ')
2902
+ : '';
2903
+ const menuAction = JSON.parse(JSON.stringify(this.tableRowActions));
2904
+ menuAction[1].isDisabled = hasGroup;
2905
+ formattedData.push({
2906
+ name,
2907
+ description,
2908
+ rosterType,
2909
+ businessRule: businessRuleString,
2910
+ roles: roleNames,
2911
+ hasGroup: item.hasGroup,
2912
+ menuAction,
2913
+ });
2914
+ }
2915
+ });
2916
+ return formattedData;
2917
+ }
2918
+ /**
2919
+ * Transforms business rule to required format in string.
2920
+ * @param {*} rule
2921
+ * @return {string}
2922
+ * @memberof ViewTenantGroupTypesComponent
2923
+ */
2924
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2925
+ transformBusinessRule(rule) {
2926
+ const ruleStringArray = [];
2927
+ for (const setting of Object.values(GroupTypeSettings)) {
2928
+ if (rule[setting] === true) {
2929
+ ruleStringArray.push(this.settings[setting]);
2930
+ }
2931
+ }
2932
+ return ruleStringArray.join(', ');
2933
+ }
2934
+ /**
2935
+ * Initializes table column schema to display group types in tabular view.
2936
+ * @memberof ViewTenantGroupTypesComponent
2937
+ */
2938
+ initializeColumnSchema() {
2939
+ this.columnSchema = [
2940
+ {
2941
+ id: 1,
2942
+ columnDef: 'groupType',
2943
+ heading: this.columnHeading?.groupType,
2944
+ columnType: TableColumnType.TEXT,
2945
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2946
+ cellData: (element) => `${element.name}`,
2947
+ },
2948
+ {
2949
+ id: 2,
2950
+ columnDef: 'rosterType',
2951
+ heading: this.columnHeading?.rosterType,
2952
+ columnType: TableColumnType.TEXT,
2953
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2954
+ cellData: (element) => `${element.rosterType}`,
2955
+ },
2956
+ {
2957
+ id: 3,
2958
+ columnDef: 'description',
2959
+ heading: this.columnHeading?.description,
2960
+ columnType: TableColumnType.TEXT,
2961
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2962
+ cellData: (element) => `${element.description}`,
2963
+ },
2964
+ {
2965
+ id: 4,
2966
+ columnDef: 'applicableRoles',
2967
+ heading: this.columnHeading?.applicableRoles,
2968
+ columnType: TableColumnType.TEXT,
2969
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2970
+ cellData: (element) => `${element.roles}`,
2971
+ },
2972
+ {
2973
+ id: 5,
2974
+ columnDef: 'settings',
2975
+ heading: this.columnHeading?.settings,
2976
+ columnType: TableColumnType.TEXT,
2977
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2978
+ cellData: (element) => `${element.businessRule}`,
2979
+ },
2980
+ {
2981
+ id: 6,
2982
+ columnDef: 'action',
2983
+ heading: this.columnHeading?.action,
2984
+ columnType: TableColumnType.ACTIONS,
2985
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2986
+ cellData: (element) => `${element.menuAction}`,
2987
+ },
2988
+ ];
2989
+ }
2990
+ /**
2991
+ * Performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
2992
+ * @memberof ViewTenantGroupTypesComponent
2993
+ */
2994
+ ngOnDestroy() {
2995
+ this.destroy$?.next(true);
2996
+ this.destroy$?.unsubscribe();
2997
+ }
2998
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ViewTenantGroupTypesComponent, deps: [{ token: TenantApplicationsService }, { token: i2$1.SharedService }], target: i0.ɵɵFactoryTarget.Component }); }
2999
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ViewTenantGroupTypesComponent, isStandalone: true, selector: "ieeesa-view-tenant-group-types", ngImport: i0, template: "<div class=\"ieeesa-view-tenant-group-types\">\r\n <ieeesa-data-table\r\n *ngIf=\"columnSchema.length\"\r\n [headerElementClassName]=\"headerElementClassName\"\r\n [customStickyHeaderNeeded]=\"true\"\r\n [isCellTextOverflowEllipsis]=\"true\"\r\n [tableDataInfo]=\"groupTypes\"\r\n [columnSchemaInfo]=\"columnSchema\"\r\n ></ieeesa-data-table>\r\n</div>", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-view-tenant-group-types .ieeesa-data-table{padding-top:2.5em}.ieeesa-view-tenant-group-types .ieeesa-data-table__content{margin-top:0!important}.ieeesa-view-tenant-group-types .ieeesa-data-table__content .mdc-data-table__header-cell{padding:14px 12px;box-shadow:0 1px #9ba0a6 inset!important}.ieeesa-view-tenant-group-types .ieeesa-data-table__content .mdc-data-table__cell{padding:4px 14px}.ieeesa-view-tenant-group-types .ieeesa-data-table__content .cdk-column-groupType{min-width:10em;max-width:10em}.ieeesa-view-tenant-group-types .ieeesa-data-table__content .cdk-column-description{min-width:12em;max-width:12em}.ieeesa-view-tenant-group-types .ieeesa-data-table__content .cdk-column-rosterType{min-width:6em;max-width:6em}.ieeesa-view-tenant-group-types .ieeesa-data-table__content .cdk-column-applicableRoles,.ieeesa-view-tenant-group-types .ieeesa-data-table__content .cdk-column-settings{min-width:10em;max-width:10em}.ieeesa-view-tenant-group-types .ieeesa-data-table__content .mat-mdc-icon-button{color:#00629b}@media (max-width: 767px){.ieeesa-view-tenant-group-types .ieeesa-data-table{padding-top:1em}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DataTableComponent, selector: "ieeesa-data-table", inputs: ["tableDataInfo", "nestedTableDataInfo", "columnSchemaInfo", "nestedTableColumnSchemaInfo", "tableActions", "hasNestedTable", "tableColumnActions", "tableColumnActionMenuSize", "tableRowActions", "nestedTableRowActions", "caption", "viewAll", "paginatorConfig", "nestedPaginatorConfig", "legends", "pageIndex", "pageSize", "searchPlaceHolderText", "rowEditButton", "rowDeleteButton", "tableEditButton", "tableDeleteButton", "rowExpandButton", "rowCollapseButton", "isNestedTableHeaderNeeded", "addButton", "defaultColumnSortDirection", "defaultSortedColumn", "isClearSortNeeded", "filters", "selectedFilterOptions", "appliedFilterOptions", "searchType", "className", "searchSupportMessage", "inbuiltSortingNeeded", "isCellTextOverflowEllipsis", "isTableHeaderNeeded", "tableColumnsHeaderText", "verticalColumnHeaderNumber", "scrollbarSupportMessage", "isScrollSupportMessageNeeded", "isStickyHeaderNeeded", "customStickyHeaderNeeded", "headerElementClassName", "minCharToSearch", "searchResultMessage", "rowMenuActionIcon", "canDisableCheckbox", "isEllipsisRequiredForLink"], outputs: ["rowSelected", "selectedRowToEdit", "selectedRowToDelete", "selectedRowsToDelete", "rowLink", "addRow", "columnDataOnRowLinkClick", "menuActionClick", "selectActionMenu", "paginationChange", "selectedFilter", "removeFilteredOption", "filteredOptions", "searchedValue", "sortChange", "selectedRowsInfo", "rowExpansionClick", "tableColumnMenuActionClick", "tableColumnMenuToggleButton", "rowSlideToggle"] }], encapsulation: i0.ViewEncapsulation.None }); }
3000
+ }
3001
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ViewTenantGroupTypesComponent, decorators: [{
3002
+ type: Component,
3003
+ args: [{ selector: 'ieeesa-view-tenant-group-types', standalone: true, imports: [CommonModule, DataTableComponent], encapsulation: ViewEncapsulation.None, template: "<div class=\"ieeesa-view-tenant-group-types\">\r\n <ieeesa-data-table\r\n *ngIf=\"columnSchema.length\"\r\n [headerElementClassName]=\"headerElementClassName\"\r\n [customStickyHeaderNeeded]=\"true\"\r\n [isCellTextOverflowEllipsis]=\"true\"\r\n [tableDataInfo]=\"groupTypes\"\r\n [columnSchemaInfo]=\"columnSchema\"\r\n ></ieeesa-data-table>\r\n</div>", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-view-tenant-group-types .ieeesa-data-table{padding-top:2.5em}.ieeesa-view-tenant-group-types .ieeesa-data-table__content{margin-top:0!important}.ieeesa-view-tenant-group-types .ieeesa-data-table__content .mdc-data-table__header-cell{padding:14px 12px;box-shadow:0 1px #9ba0a6 inset!important}.ieeesa-view-tenant-group-types .ieeesa-data-table__content .mdc-data-table__cell{padding:4px 14px}.ieeesa-view-tenant-group-types .ieeesa-data-table__content .cdk-column-groupType{min-width:10em;max-width:10em}.ieeesa-view-tenant-group-types .ieeesa-data-table__content .cdk-column-description{min-width:12em;max-width:12em}.ieeesa-view-tenant-group-types .ieeesa-data-table__content .cdk-column-rosterType{min-width:6em;max-width:6em}.ieeesa-view-tenant-group-types .ieeesa-data-table__content .cdk-column-applicableRoles,.ieeesa-view-tenant-group-types .ieeesa-data-table__content .cdk-column-settings{min-width:10em;max-width:10em}.ieeesa-view-tenant-group-types .ieeesa-data-table__content .mat-mdc-icon-button{color:#00629b}@media (max-width: 767px){.ieeesa-view-tenant-group-types .ieeesa-data-table{padding-top:1em}}\n"] }]
3004
+ }], ctorParameters: function () { return [{ type: TenantApplicationsService }, { type: i2$1.SharedService }]; } });
3005
+
3006
+ /* eslint-disable no-unused-vars */
3007
+ var Settings;
3008
+ (function (Settings) {
3009
+ Settings["ALLOW_SUB_GROUPS"] = "Allow Sub-Groups";
3010
+ Settings["ALLOW_ROSTERS"] = "Rosters Enabled";
3011
+ Settings["ALLOW_ALTERNATE_VOTING"] = "Allow Alternate Voting";
3012
+ Settings["HAS_CLASSIFICATION"] = "Has Classification";
3013
+ Settings["ALLOW_EDIT"] = "Allow Edit";
3014
+ Settings["ALLOW_DELETE"] = "Allow Delete";
3015
+ })(Settings || (Settings = {}));
3016
+ /* eslint-disable no-unused-vars */
3017
+ var VotingMemberLevelRole;
3018
+ (function (VotingMemberLevelRole) {
3019
+ VotingMemberLevelRole["VOTING_MEMBER_PRINCIPAL"] = "Voting Member (Principal)";
3020
+ VotingMemberLevelRole["VOTING_MEMBER_ALTERNATE"] = "Voting Member (Alternate)";
3021
+ })(VotingMemberLevelRole || (VotingMemberLevelRole = {}));
3022
+ var RosterTypeLOVCode;
3023
+ (function (RosterTypeLOVCode) {
3024
+ RosterTypeLOVCode["INDIVIDUAL"] = "IND";
3025
+ RosterTypeLOVCode["ENTITY"] = "EN";
3026
+ })(RosterTypeLOVCode || (RosterTypeLOVCode = {}));
3027
+
3028
+ /**
3029
+ * CreateModifyGroupTypeComponent uses DynamicFormComponent to build create add group type form or edit group type form and implement the functionalities of submission of form and handling success and error scenarios.
3030
+ * @class CreateModifyGroupTypeComponent
3031
+ * @implements {OnInit}
3032
+ * @implements {OnDestroy}
3033
+ */
3034
+ class CreateModifyGroupTypeComponent {
3035
+ constructor(
3036
+ // eslint-disable-next-line no-unused-vars
3037
+ tenantAppService,
3038
+ // eslint-disable-next-line no-unused-vars
3039
+ sharedService,
3040
+ // eslint-disable-next-line no-unused-vars
3041
+ renderer,
3042
+ // eslint-disable-next-line no-unused-vars
3043
+ elementRef,
3044
+ // eslint-disable-next-line no-unused-vars
3045
+ formUtilityService // eslint-disable-next-line no-empty-function,
3046
+ ) {
3047
+ this.tenantAppService = tenantAppService;
3048
+ this.sharedService = sharedService;
3049
+ this.renderer = renderer;
3050
+ this.elementRef = elementRef;
3051
+ this.formUtilityService = formUtilityService;
3052
+ this.destroy$ = new Subject();
3053
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3054
+ this.constants = screenText;
3055
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3056
+ this.createGroupTypeScreenTexts = this.constants?.createGroupType;
3057
+ this.leftButtonLabel = this.createGroupTypeScreenTexts?.label?.leftButtonLabel;
3058
+ this.rightButtonLabel = this.createGroupTypeScreenTexts?.label?.rightButtonLabel;
3059
+ this.colWidth = { xs: 12, xl: 12, sm: 12, md: 12, lg: 12 };
3060
+ this.actionButtonAlign = AlignType.LEFT;
3061
+ this.isRootGroupOptions = [
3062
+ {
3063
+ id: 1,
3064
+ label: this.createGroupTypeScreenTexts?.isRootGroupOptions?.yes,
3065
+ checked: false,
3066
+ },
3067
+ {
3068
+ id: 2,
3069
+ label: this.createGroupTypeScreenTexts?.isRootGroupOptions?.no,
3070
+ checked: true,
3071
+ },
3072
+ ];
3073
+ this.rosterTypeOptions = [];
3074
+ this.settingOptions = [];
3075
+ this.officerRolesOptions = [];
3076
+ this.memberLevelOptions = [];
3077
+ this.allowedSubGroupTypesOptions = [];
3078
+ /**
3079
+ * Event emitter for form submission response.
3080
+ * @memberof CreateModifyGroupTypeComponent
3081
+ */
3082
+ this.submitFormResponse = new EventEmitter();
3083
+ /**
3084
+ * Event emitter for form cancel action.
3085
+ * @memberof CreateModifyGroupTypeComponent
3086
+ */
3087
+ this.formCancel = new EventEmitter();
3088
+ }
3089
+ /**
3090
+ * Sets appId, tenantFunctionType and calls getGroupTypes() & getRosterTypes() to get group and roster types.
3091
+ * @memberof CreateModifyGroupTypeComponent
3092
+ */
3093
+ ngOnInit() {
3094
+ this.appId = this.tenantAppService.getSelectedTenantInformation()
3095
+ ?.appId;
3096
+ this.tenantFunctionType = this.tenantAppService?.getTenantFunctionType();
3097
+ this.selectedGroupTypeInfo =
3098
+ this.tenantAppService?.getNewlyCreatedGroupTypeInfo();
3099
+ this.getGroupTypes();
3100
+ this.getRosterTypes();
3101
+ }
3102
+ /**
3103
+ * Gets the list of roster types and updates the form control.
3104
+ * @memberof CreateModifyGroupTypeComponent
3105
+ */
3106
+ getRosterTypes() {
3107
+ this.tenantAppService
3108
+ .getRosterType()
3109
+ .pipe(takeUntil(this.destroy$))
3110
+ .subscribe({
3111
+ next: (response) => {
3112
+ if (response?.status) {
3113
+ this.getSettings();
3114
+ const rosterTypeList = response.body;
3115
+ rosterTypeList.map((rosterType) => this.rosterTypeOptions.push({
3116
+ id: rosterType.lovId,
3117
+ label: rosterType.lovDesc,
3118
+ checked: rosterType.lovCode === RosterTypeLOVCode.INDIVIDUAL,
3119
+ }));
3120
+ }
3121
+ },
3122
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3123
+ error: (error) => {
3124
+ this.sharedService.handleErrors(error, this.createGroupTypeScreenTexts.errors);
3125
+ },
3126
+ });
3127
+ }
3128
+ /**
3129
+ * Gets the list of settings and updates the form control.
3130
+ * @memberof CreateModifyGroupTypeComponent
3131
+ */
3132
+ getSettings() {
3133
+ this.tenantAppService
3134
+ .getGroupTypeSettings()
3135
+ .pipe(takeUntil(this.destroy$))
3136
+ .subscribe({
3137
+ next: (response) => {
3138
+ if (response.status) {
3139
+ this.getRoles();
3140
+ const settingsList = response.body;
3141
+ settingsList.map((setting) => {
3142
+ this.settingOptions.push({
3143
+ id: setting.lovId,
3144
+ name: setting.lovDesc,
3145
+ checked: false,
3146
+ disabled: false,
3147
+ });
3148
+ });
3149
+ }
3150
+ },
3151
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3152
+ error: (error) => {
3153
+ this.sharedService.handleErrors(error, this.createGroupTypeScreenTexts.errors);
3154
+ },
3155
+ });
3156
+ }
3157
+ /**
3158
+ * Gets the list of roles and updates the form control.
3159
+ * @memberof CreateModifyGroupTypeComponent
3160
+ */
3161
+ getRoles() {
3162
+ this.tenantAppService
3163
+ .getRoles(this.appId)
3164
+ .pipe(takeUntil(this.destroy$))
3165
+ .subscribe({
3166
+ next: (response) => {
3167
+ if (response?.status) {
3168
+ const rolesList = response?.body;
3169
+ rolesList.map((role) => {
3170
+ if (role.roleTypeName === RoleType.OFFICER) {
3171
+ this.officerRolesOptions.push({
3172
+ id: role.roleId,
3173
+ name: role.roleName,
3174
+ checked: false,
3175
+ disabled: false,
3176
+ });
3177
+ }
3178
+ else if (role.roleTypeName === RoleType.MEMBER_LEVEL) {
3179
+ this.memberLevelOptions.push({
3180
+ id: role.roleId,
3181
+ name: role.roleName,
3182
+ checked: false,
3183
+ disabled: false,
3184
+ });
3185
+ }
3186
+ });
3187
+ if (this.memberLevelOptions.length === 0 ||
3188
+ this.officerRolesOptions.length === 0) {
3189
+ this.sharedService.showAlertMessage(AlertType.ERROR, this.createGroupTypeScreenTexts.errors['3019']);
3190
+ }
3191
+ else {
3192
+ this.initializeCreateGroupTypeFormGroup();
3193
+ }
3194
+ }
3195
+ },
3196
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3197
+ error: (error) => {
3198
+ this.sharedService.handleErrors(error, this.createGroupTypeScreenTexts.errors);
3199
+ },
3200
+ });
3201
+ }
3202
+ /**
3203
+ * Gets and filters non SYSTEM_USER group types, constructs allowed sub-group types options and form field config.
3204
+ * @memberof CreateModifyGroupTypeComponent
3205
+ */
3206
+ getGroupTypes() {
3207
+ this.groupTypeDetails = this.tenantAppService.getGroupTypeDetails();
3208
+ this.groupTypeDetails?.body?.forEach((item) => {
3209
+ if (item?.configFieldValue?.businessRule?.rosterType !==
3210
+ GroupRosterType?.SYSTEM_USER) {
3211
+ this.allowedSubGroupTypesOptions.push({
3212
+ id: item?.configFieldId,
3213
+ name: item?.configFieldValue?.name,
3214
+ checked: false,
3215
+ disabled: false,
3216
+ });
3217
+ }
3218
+ });
3219
+ this.allowedSubGroupTypesFieldConfig = {
3220
+ type: FormControlType.CHECKBOX,
3221
+ label: this.createGroupTypeScreenTexts?.label?.allowedSubGroupTypes,
3222
+ controlName: 'allowedSubGroupTypes',
3223
+ checkboxOptions: this.allowedSubGroupTypesOptions,
3224
+ ariaLabel: this.createGroupTypeScreenTexts?.label?.ariaLabel?.allowedSubGroupTypes,
3225
+ ariaDescribedById: this.createGroupTypeScreenTexts?.label?.ariaDescribedById
3226
+ ?.allowedSubGroupTypes,
3227
+ };
3228
+ }
3229
+ /**
3230
+ * Initialize the create/edit group type form group array.
3231
+ * @param {*} [formValue]
3232
+ * @memberof CreateModifyGroupTypeComponent
3233
+ */
3234
+ initializeCreateGroupTypeFormGroup() {
3235
+ this.createGroupTypeFormGroup = {
3236
+ formGroup: [
3237
+ {
3238
+ legend: '',
3239
+ controls: [
3240
+ {
3241
+ type: FormControlType?.INPUT,
3242
+ label: this.createGroupTypeScreenTexts?.label?.groupType + '*',
3243
+ controlName: 'groupType',
3244
+ value: '',
3245
+ validation: [
3246
+ Validators.required,
3247
+ Validators.maxLength(GroupTypeValidation.groupTypeMaxLength),
3248
+ ],
3249
+ supportMessage: this.createGroupTypeScreenTexts?.supportText?.groupType,
3250
+ requiredErrorMessage: this.createGroupTypeScreenTexts?.message?.error?.required,
3251
+ maxErrorMessage: this.createGroupTypeScreenTexts?.message?.error?.limit
3252
+ ?.groupTypeMaxChars,
3253
+ ariaLabel: this.createGroupTypeScreenTexts?.label?.ariaLabel?.groupType,
3254
+ ariaDescribedById: this.createGroupTypeScreenTexts?.label?.ariaDescribedById
3255
+ ?.groupType,
3256
+ },
3257
+ {
3258
+ type: FormControlType?.TEXT_AREA,
3259
+ label: this.createGroupTypeScreenTexts?.label?.description + '*',
3260
+ controlName: 'description',
3261
+ value: '',
3262
+ validation: [
3263
+ Validators.required,
3264
+ Validators.maxLength(GroupTypeValidation.descriptionMaxLength),
3265
+ ],
3266
+ supportMessage: this.createGroupTypeScreenTexts?.supportText?.description,
3267
+ requiredErrorMessage: this.createGroupTypeScreenTexts?.message?.error?.required,
3268
+ maxCharCount: GroupTypeValidation.descriptionMaxLength,
3269
+ maxErrorMessage: this.createGroupTypeScreenTexts?.message?.error?.limit
3270
+ ?.descriptionMaxChars,
3271
+ ariaLabel: this.createGroupTypeScreenTexts?.label?.ariaLabel?.description,
3272
+ ariaDescribedById: this.createGroupTypeScreenTexts?.label?.ariaDescribedById
3273
+ ?.description,
3274
+ ariaMultiline: true,
3275
+ isResize: true,
3276
+ },
3277
+ {
3278
+ type: FormControlType.RADIO,
3279
+ label: this.createGroupTypeScreenTexts?.label?.rosterType + '*',
3280
+ controlName: 'rosterType',
3281
+ value: this.tenantFunctionType === TenantFunctionType.EDIT_GROUP_TYPE
3282
+ ? this.selectedGroupTypeInfo.configFieldValue.businessRule
3283
+ .rosterType
3284
+ : this.rosterTypeOptions[0].label,
3285
+ disabled: this.tenantFunctionType === TenantFunctionType.EDIT_GROUP_TYPE,
3286
+ radioOptions: this.rosterTypeOptions,
3287
+ validation: [Validators.required],
3288
+ requiredErrorMessage: this.createGroupTypeScreenTexts?.message?.error?.required,
3289
+ ariaLabel: this.createGroupTypeScreenTexts?.label?.ariaLabel?.rosterType,
3290
+ ariaDescribedById: this.createGroupTypeScreenTexts?.label?.ariaDescribedById
3291
+ ?.rosterType,
3292
+ },
3293
+ {
3294
+ type: FormControlType.CHECKBOX,
3295
+ label: this.createGroupTypeScreenTexts?.label?.settings + '*',
3296
+ controlName: 'settings',
3297
+ checkboxOptions: this.settingOptions,
3298
+ minSelectionRequired: 1,
3299
+ ariaLabel: this.createGroupTypeScreenTexts?.label?.ariaLabel?.settings,
3300
+ ariaDescribedById: this.createGroupTypeScreenTexts?.label?.ariaDescribedById
3301
+ ?.settings,
3302
+ requiredErrorMessage: this.createGroupTypeScreenTexts?.message?.error?.required,
3303
+ validation: [Validators.required],
3304
+ },
3305
+ {
3306
+ type: FormControlType.CHECKBOX,
3307
+ label: this.createGroupTypeScreenTexts?.label?.appOfficerRoles + '*',
3308
+ controlName: 'appOfficerRoles',
3309
+ checkboxOptions: this.officerRolesOptions,
3310
+ minSelectionRequired: 1,
3311
+ ariaLabel: this.createGroupTypeScreenTexts?.label?.ariaLabel
3312
+ ?.appOfficerRoles,
3313
+ ariaDescribedById: this.createGroupTypeScreenTexts?.label?.ariaDescribedById
3314
+ ?.appOfficerRoles,
3315
+ requiredErrorMessage: this.createGroupTypeScreenTexts?.message?.error?.required,
3316
+ validation: [Validators.required],
3317
+ },
3318
+ {
3319
+ type: FormControlType.CHECKBOX,
3320
+ label: this.createGroupTypeScreenTexts?.label?.appMemberLevel + '*',
3321
+ controlName: 'appMemberLevel',
3322
+ checkboxOptions: this.memberLevelOptions,
3323
+ minSelectionRequired: 1,
3324
+ ariaLabel: this.createGroupTypeScreenTexts?.label?.ariaLabel
3325
+ ?.appMemberLevel,
3326
+ ariaDescribedById: this.createGroupTypeScreenTexts?.label?.ariaDescribedById
3327
+ ?.appMemberLevel,
3328
+ requiredErrorMessage: this.createGroupTypeScreenTexts?.message?.error?.required,
3329
+ validation: [Validators.required],
3330
+ },
3331
+ {
3332
+ type: FormControlType.RADIO,
3333
+ label: this.createGroupTypeScreenTexts?.label?.isRootGroup + '*',
3334
+ controlName: 'isRootGroup',
3335
+ value: this.tenantFunctionType === TenantFunctionType.EDIT_GROUP_TYPE
3336
+ ? this.selectedGroupTypeInfo.configFieldValue.businessRule
3337
+ .isRootGroup
3338
+ ? this.isRootGroupOptions[0].label
3339
+ : this.isRootGroupOptions[1].label
3340
+ : this.isRootGroupOptions[1].label,
3341
+ disabled: this.tenantFunctionType === TenantFunctionType.EDIT_GROUP_TYPE,
3342
+ radioOptions: this.isRootGroupOptions,
3343
+ validation: [Validators.required],
3344
+ requiredErrorMessage: this.createGroupTypeScreenTexts?.message?.error?.required,
3345
+ ariaLabel: this.createGroupTypeScreenTexts?.label?.ariaLabel?.isRootGroup,
3346
+ ariaDescribedById: this.createGroupTypeScreenTexts?.label?.ariaDescribedById
3347
+ ?.isRootGroup,
3348
+ },
3349
+ ],
3350
+ },
3351
+ ],
3352
+ };
3353
+ }
3354
+ /**
3355
+ * Add or removes allowed sub groups form control (checkbox group control and options) as when allow sub group selection and updates the form state.
3356
+ * @param {*} selectedCheckbox
3357
+ * @memberof CreateModifyGroupTypeComponent
3358
+ */
3359
+ onCheckboxSelectionChange(selectedCheckbox) {
3360
+ if (selectedCheckbox.name === Settings.ALLOW_SUB_GROUPS) {
3361
+ if (selectedCheckbox.checked) {
3362
+ this.componentRef = this.formUtilityService.addFormControl(this.dynamicFormComponentViewRef, CheckboxComponent, this.createModifyGroupTypeFormGroupRef, this.allowedSubGroupTypesFieldConfig, this.renderer, this.elementRef, 'is-root-group', this.dynamicFormComponent);
3363
+ }
3364
+ else {
3365
+ this.allowedSubGroupTypesOptions.forEach((allowedSubGroupTypes) => (allowedSubGroupTypes.checked = false));
3366
+ this.formUtilityService.removeFormControl(this.createModifyGroupTypeFormGroupRef, this.allowedSubGroupTypesFieldConfig, this.componentRef, this.renderer, this.elementRef);
3367
+ }
3368
+ }
3369
+ }
3370
+ /**
3371
+ * Sets create/modify group type reactive form group reference.
3372
+ * @param {FormGroup[]} form -The form group array containing the form to be referenced.
3373
+ * @memberof CreateModifyGroupTypeComponent
3374
+ */
3375
+ getCreateModifyGroupTypeFormGroupRef(form) {
3376
+ this.createModifyGroupTypeFormGroupRef = form[0];
3377
+ }
3378
+ /**
3379
+ * Find the provided setting name in setting option and return the boolean value.
3380
+ * @param {string} settingName
3381
+ * @return {*} {boolean}
3382
+ * @memberof CreateModifyGroupTypeComponent
3383
+ */
3384
+ isSettingSelectedByName(settingName) {
3385
+ return this.settingOptions.find((setting) => setting.name === settingName)?.checked;
3386
+ }
3387
+ /**
3388
+ * Creates a new group type on form submission and the form is valid.
3389
+ * @param {FormGroup[]} form
3390
+ * @memberof CreateModifyGroupTypeComponent
3391
+ */
3392
+ onCreateModifyGroupTypeFormSubmit(form) {
3393
+ form[0]?.markAllAsTouched();
3394
+ if (form[0].status === FormStatus.VALID) {
3395
+ const selectedGroupTypes = this.allowedSubGroupTypesOptions
3396
+ .filter((subGroupType) => subGroupType.checked)
3397
+ .map((selectedGroupType) => selectedGroupType.id);
3398
+ const selectedRoles = [
3399
+ ...this.memberLevelOptions.filter((memberLevel) => memberLevel.checked),
3400
+ ...this.officerRolesOptions.filter((officerRole) => officerRole.checked),
3401
+ ].map((selectedRole) => {
3402
+ return {
3403
+ roleId: selectedRole.id,
3404
+ };
3405
+ });
3406
+ const configFieldValue = {
3407
+ name: form[0].get('groupType')?.value,
3408
+ description: form[0].get('description')?.value,
3409
+ businessRule: {
3410
+ rosterType: form[0].get('rosterType')?.value,
3411
+ allowEdit: this.isSettingSelectedByName(Settings.ALLOW_EDIT),
3412
+ allowRoster: this.isSettingSelectedByName(Settings.ALLOW_ROSTERS),
3413
+ allowAlternateVoting: this.isSettingSelectedByName(Settings.ALLOW_ALTERNATE_VOTING),
3414
+ allowDelete: this.isSettingSelectedByName(Settings.ALLOW_DELETE),
3415
+ allowSubGroup: this.isSettingSelectedByName(Settings.ALLOW_SUB_GROUPS),
3416
+ hasClassification: this.isSettingSelectedByName(Settings.HAS_CLASSIFICATION),
3417
+ allowedGroupType: selectedGroupTypes,
3418
+ isRootGroup: form[0].get('isRootGroup')?.value ===
3419
+ this.isRootGroupOptions[0].label,
3420
+ },
3421
+ };
3422
+ if (form[0].get('isRootGroup')?.value === this.isRootGroupOptions[0].label)
3423
+ configFieldValue.hierarchy = 0;
3424
+ const createGroupTypePayload = {
3425
+ payload: {
3426
+ appId: this.appId,
3427
+ roles: selectedRoles,
3428
+ configFieldName: 'group_type',
3429
+ configFieldValue: JSON.stringify(configFieldValue),
3430
+ },
3431
+ };
3432
+ this.tenantAppService
3433
+ .createGroupType(createGroupTypePayload)
3434
+ .pipe(takeUntil(this.destroy$))
3435
+ .subscribe({
3436
+ next: (response) => {
3437
+ if (response.status) {
3438
+ const { appId, roles, configFieldName } = createGroupTypePayload.payload;
3439
+ const configFieldValue = JSON.parse(createGroupTypePayload.payload.configFieldValue);
3440
+ this.tenantAppService.setNewlyCreatedGroupTypeInfo({
3441
+ appId,
3442
+ roles,
3443
+ configFieldName,
3444
+ configFieldValue,
3445
+ });
3446
+ this.submitFormResponse.emit(response);
3447
+ }
3448
+ },
3449
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3450
+ error: (error) => {
3451
+ this.sharedService.handleErrors(error, this.createGroupTypeScreenTexts.errors);
3452
+ },
3453
+ });
3454
+ }
3455
+ }
3456
+ /**
3457
+ * Emits form cancel event.
3458
+ * @memberof CreateModifyGroupTypeComponent
3459
+ */
3460
+ onFormCancel() {
3461
+ this.formCancel.emit();
3462
+ }
3463
+ /**
3464
+ * Implementation of ngOnDestroy lifecycle hook method to unsubscribe the open observable subscriptions.
3465
+ * @memberof CreateModifyGroupTypeComponent
3466
+ */
3467
+ ngOnDestroy() {
3468
+ this.destroy$.next(true);
3469
+ this.destroy$.unsubscribe();
3470
+ }
3471
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateModifyGroupTypeComponent, deps: [{ token: TenantApplicationsService }, { token: i2$1.SharedService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i2$1.FormUtilityService }], target: i0.ɵɵFactoryTarget.Component }); }
3472
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CreateModifyGroupTypeComponent, isStandalone: true, selector: "ieeesa-create-modify-group-type", outputs: { submitFormResponse: "submitFormResponse", formCancel: "formCancel" }, viewQueries: [{ propertyName: "dynamicFormComponent", first: true, predicate: DynamicFormComponent, descendants: true }, { propertyName: "dynamicFormComponentViewRef", first: true, predicate: DynamicFormComponent, descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<ieeesa-dynamic-form\r\n *ngIf=\"createGroupTypeFormGroup\"\r\n class=\"ieeesa-create-group-type-form\"\r\n [leftButtonLabel]=\"leftButtonLabel\"\r\n [rightButtonLabel]=\"rightButtonLabel\"\r\n [isLegendVisible]=\"false\"\r\n [colWidth]=\"colWidth\"\r\n [actionButtonAlign]=\"actionButtonAlign\"\r\n [formGroups]=\"createGroupTypeFormGroup\"\r\n [isLeftButtonNeeded]=\"true\"\r\n (formSubmit)=\"onCreateModifyGroupTypeFormSubmit($event)\"\r\n (formLeftButtonClicked)=\"onFormCancel()\"\r\n (formGroupsReference)=\"getCreateModifyGroupTypeFormGroupRef($event)\"\r\n (formCheckboxSelection)=\"onCheckboxSelectionChange($event)\"\r\n></ieeesa-dynamic-form>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-modal-dialog.ieeesa-create-modify-group-type{width:60vw!important}.ieeesa-modal-dialog.ieeesa-create-modify-group-type .mat-mdc-dialog-container{box-shadow:none}.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-modal .mat-mdc-dialog-content{padding:1em!important}.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-modal .ieeesa-dynamic-form__actions{flex-direction:row-reverse;gap:.5em}.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-modal .ieeesa-dynamic-form__form-field{margin-bottom:1em;padding-top:0!important}.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field__resize{resize:vertical}.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-input-field{width:50%}@media (max-width: 767px){.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-dynamic-form__form-field{width:100%}.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-dynamic-form .ieeesa-input-field,.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-dynamic-form .mat-mdc-form-field-flex{width:100%!important}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DynamicFormComponent, selector: "ieeesa-dynamic-form", inputs: ["formGroups", "submitResponse", "searchResponse", "fileUploadStatus", "colWidth", "isLegendVisible", "rightButtonLabel", "leftButtonLabel", "isSubmitButtonDisabled", "isLeftButtonDisabled", "isLeftButtonNeeded", "isRightButtonNeeded", "actionButtonAlign", "fileDownloadAndDeleteConfig"], outputs: ["formSubmit", "formChange", "formInput", "formLeftButtonClicked", "formSearchApply", "formGroupsReference", "dropdownChange", "formCheckboxSelection", "formDateSelected", "formSelectSearch", "formControlChange", "formAutoCompleteSearch", "formAutoCompleteClearSearchValue", "autoCompleteOptionSelected", "formAfterContentInit", "formSelectedDateRange", "addFormGroup", "formTimeSelected", "supportTextLinkClick", "formSlideToggleChange", "formFileUpload", "dropdownOpenedChange", "formColorPickerChange", "formRadioOptionSelected", "ctaButtonClick", "formMultiSelectAutoCompleteSearch", "formMultiSelectAutoCompleteClearSearchValue", "multiSelectAutoCompleteOptionsSelected", "formRichTextEditorContentChange"], exportAs: ["dynamicForm"] }], encapsulation: i0.ViewEncapsulation.None }); }
3473
+ }
3474
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateModifyGroupTypeComponent, decorators: [{
3475
+ type: Component,
3476
+ args: [{ selector: 'ieeesa-create-modify-group-type', standalone: true, imports: [CommonModule, DynamicFormComponent], encapsulation: ViewEncapsulation.None, template: "<ieeesa-dynamic-form\r\n *ngIf=\"createGroupTypeFormGroup\"\r\n class=\"ieeesa-create-group-type-form\"\r\n [leftButtonLabel]=\"leftButtonLabel\"\r\n [rightButtonLabel]=\"rightButtonLabel\"\r\n [isLegendVisible]=\"false\"\r\n [colWidth]=\"colWidth\"\r\n [actionButtonAlign]=\"actionButtonAlign\"\r\n [formGroups]=\"createGroupTypeFormGroup\"\r\n [isLeftButtonNeeded]=\"true\"\r\n (formSubmit)=\"onCreateModifyGroupTypeFormSubmit($event)\"\r\n (formLeftButtonClicked)=\"onFormCancel()\"\r\n (formGroupsReference)=\"getCreateModifyGroupTypeFormGroupRef($event)\"\r\n (formCheckboxSelection)=\"onCheckboxSelectionChange($event)\"\r\n></ieeesa-dynamic-form>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-modal-dialog.ieeesa-create-modify-group-type{width:60vw!important}.ieeesa-modal-dialog.ieeesa-create-modify-group-type .mat-mdc-dialog-container{box-shadow:none}.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-modal .mat-mdc-dialog-content{padding:1em!important}.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-modal .ieeesa-dynamic-form__actions{flex-direction:row-reverse;gap:.5em}.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-modal .ieeesa-dynamic-form__form-field{margin-bottom:1em;padding-top:0!important}.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-modal .ieeesa-dynamic-form__form-field .ieeesa-text-area-field__resize{resize:vertical}.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-input-field{width:50%}@media (max-width: 767px){.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-dynamic-form__form-field{width:100%}.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-dynamic-form .ieeesa-input-field,.ieeesa-modal-dialog.ieeesa-create-modify-group-type .ieeesa-dynamic-form .mat-mdc-form-field-flex{width:100%!important}}\n"] }]
3477
+ }], ctorParameters: function () { return [{ type: TenantApplicationsService }, { type: i2$1.SharedService }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i2$1.FormUtilityService }]; }, propDecorators: { dynamicFormComponent: [{
3478
+ type: ViewChild,
3479
+ args: [DynamicFormComponent]
3480
+ }], dynamicFormComponentViewRef: [{
3481
+ type: ViewChild,
3482
+ args: [DynamicFormComponent, { read: ViewContainerRef }]
3483
+ }], submitFormResponse: [{
3484
+ type: Output
3485
+ }], formCancel: [{
3486
+ type: Output
3487
+ }] } });
3488
+
3489
+ class ViewTenantDetailsComponent {
3490
+ constructor(
3491
+ // eslint-disable-next-line no-unused-vars
3492
+ dialog,
3493
+ // eslint-disable-next-line no-unused-vars
3494
+ breakpointObserverService,
3495
+ // eslint-disable-next-line no-unused-vars
3496
+ tenantAppService,
3497
+ // eslint-disable-next-line no-unused-vars
3498
+ globalErrorHandlerService,
3499
+ // eslint-disable-next-line no-unused-vars
3500
+ sharedService,
3501
+ // eslint-disable-next-line no-unused-vars
3502
+ activatedRoute) {
3503
+ this.dialog = dialog;
3504
+ this.breakpointObserverService = breakpointObserverService;
3505
+ this.tenantAppService = tenantAppService;
3506
+ this.globalErrorHandlerService = globalErrorHandlerService;
3507
+ this.sharedService = sharedService;
3508
+ this.activatedRoute = activatedRoute;
3509
+ this.destroy$ = new Subject();
3510
+ this.isMobileView = false;
3511
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3512
+ this.constants = screenText;
3513
+ this.tenantLabels = this.constants?.viewTenants?.label;
3514
+ this.slideToggleOption = {
3515
+ id: 1,
3516
+ label: this.constants?.viewTenants?.label?.active,
3517
+ checked: true,
3518
+ disabled: false,
3519
+ };
3520
+ this.editButton = this.constants?.viewTenants?.buttons;
3521
+ this.accordionInfoList = JSON.parse(JSON.stringify(this.constants?.viewTenants?.tenantAccordionInfo));
3522
+ this.appId = '';
3523
+ this.iconSize = this.constants?.viewRolesAndPermissions?.columnActionIconSize;
3524
+ this.rolesAndPermissionsTableCaption = this.constants?.viewRolesAndPermissions?.tableCaption;
3525
+ this.rolesAndPermissionsTableHeaderName = this.constants?.viewRolesAndPermissions?.tableColumnsHeaderText;
3526
+ this.rolesAndPermissionsTableSupportMessage = this.constants?.viewRolesAndPermissions?.scrollbarSupportMessage;
3527
+ this.permissionsColumnClassNumber = 1;
3528
+ this.menuItems = this.constants?.viewRolesAndPermissions?.columnActionMenuItems;
3529
+ this.columnSchema = [];
3530
+ this.tableData = [];
3531
+ this.isRolesAndPermissionsExpanded = false;
3532
+ this.paginatorConfig = {
3533
+ recordsPerPage: this.constants?.viewRolesAndPermissions?.pageSizeOptions[0],
3534
+ pageSizeOptions: this.constants?.viewRolesAndPermissions?.pageSizeOptions,
3535
+ totalRecords: 0,
3536
+ };
3537
+ this.rolesAndPermissionsClassName = '.ieeesa-view-tenant-info__roles-and-permissions';
3538
+ this.headerElementClassName = '.ieeesa-header';
3539
+ this.tableActions = {
3540
+ isPaginationNeeded: true,
3541
+ };
3542
+ this.accordionDetails = AccordionDetails;
3543
+ this.isBasicDetailsExpanded = false;
3544
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3545
+ this.createGroupTypeScreenTexts = this.constants?.createGroupType;
3546
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3547
+ this.editTenantScreenTexts = this.constants?.editTenant;
3548
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3549
+ this.deleteRoleScreenTexts = this.constants?.deleteRole;
3550
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3551
+ this.mapRolesAndPermissionsScreenTexts = this.constants?.mapRolesAndPermissions;
3552
+ this.alignmentType = AlignType;
3553
+ this.permissionType = PermissionType;
3554
+ this.createRoleScreenTexts = this.constants?.createRole;
3555
+ this.selectedRoleInfo = {
3556
+ roleId: '',
3557
+ roleName: '',
3558
+ };
3559
+ this.isGroupTypesExpanded = false;
3560
+ this.roleTypeOptions = [];
3561
+ this.breakpointObserverService
3562
+ .getBreakpoint()
3563
+ .pipe(takeUntil(this.destroy$))
3564
+ .subscribe((result) => {
3565
+ this.isMobileView = result?.matches;
3566
+ });
3567
+ }
3568
+ /**
3569
+ * Initializes view tenant details component.
3570
+ * @return -returns nothing
3571
+ * @memberof ViewTenantDetailsComponent
3572
+ */
3573
+ ngOnInit() {
3574
+ this.tenantDetails =
3575
+ this.tenantAppService?.getSelectedTenantInformation();
3576
+ this.slideToggleOption.checked = this.tenantDetails?.status;
3577
+ this.slideToggleOption.label = this.tenantDetails?.status
3578
+ ? this.tenantLabels?.active
3579
+ : this.tenantLabels?.inactive;
3580
+ this.routePaths = this.routePaths ?? this.constants?.routeConfigPath;
3581
+ this.viewTenantsRouteUrl = `/${this.routePaths?.viewTenants}`;
3582
+ this.tenantAppService?.setAppConfig(this.apiBaseURL, this.userPermissions);
3583
+ this.userTenantsPermissions = this.tenantAppService?.filterPermission(this.userPermissions);
3584
+ this.appId = this.tenantAppService.getSelectedTenantInformation()
3585
+ ?.appId;
3586
+ this.tablePagination = {
3587
+ offset: 0,
3588
+ pageSize: this.paginatorConfig.pageSizeOptions[0],
3589
+ };
3590
+ this.getApplicationTypes();
3591
+ this.activatedRoute?.queryParams
3592
+ ?.pipe(takeUntil(this.destroy$))
3593
+ ?.subscribe((params) => {
3594
+ this.appId = params['id'];
3595
+ this.getTenantDetails(this.appId);
3596
+ });
3597
+ }
3598
+ /**
3599
+ * Gets the selected tenant details from server.
3600
+ * @memberof ViewTenantDetailsComponent
3601
+ */
3602
+ getTenantDetails(appId) {
3603
+ this.tenantAppService
3604
+ .getTenantDetails(appId)
3605
+ .pipe(takeUntil(this.destroy$))
3606
+ .subscribe({
3607
+ next: (response) => {
3608
+ if (response?.status) {
3609
+ this.tenantDetails = response?.body;
3610
+ this.tenantAppService.setSelectedTenantInformation(this.tenantDetails);
3611
+ this.slideToggleOption.checked = this.tenantDetails
3612
+ .status;
3613
+ this.slideToggleOption.label = this.tenantDetails.status
3614
+ ? this.tenantLabels?.active
3615
+ : this.tenantLabels?.inactive;
3616
+ const features = this.tenantDetails.features;
3617
+ features.map((feature) => {
3618
+ if (feature?.featureId ===
3619
+ FeaturePermissionId.MEETINGS_AND_EVENTS ||
3620
+ feature?.featureId === FeaturePermissionId.BALLOTS)
3621
+ this.accordionInfoList.push({
3622
+ id: this.accordionInfoList.length + 1,
3623
+ isDisabled: false,
3624
+ title: feature?.featureName,
3625
+ });
3626
+ });
3627
+ }
3628
+ },
3629
+ error: (error) => {
3630
+ this.sharedService.handleErrors(error, this.constants?.viewTenants.errors);
3631
+ },
3632
+ });
3633
+ }
3634
+ /**
3635
+ * Display the corresponding tenant basic or feature details based on selected accordion.
3636
+ * @param {AccordionInfo} accordionInfo
3637
+ * @param {boolean} expanded
3638
+ * @memberof ViewTenantDetailsComponent
3639
+ */
3640
+ showTenantDetails(accordionInfo, expanded) {
3641
+ const accordionId = accordionInfo.id;
3642
+ switch (accordionId) {
3643
+ case 1: {
3644
+ this.isBasicDetailsExpanded = expanded;
3645
+ if (expanded) {
3646
+ this.getApplicationTypes();
3647
+ }
3648
+ break;
3649
+ }
3650
+ case 2: {
3651
+ this.isRolesAndPermissionsExpanded = expanded;
3652
+ if (expanded) {
3653
+ this.columnSchema = [];
3654
+ this.paginatorConfig.recordsPerPage =
3655
+ this.constants?.viewRolesAndPermissions?.pageSizeOptions[0];
3656
+ this.tablePagination.offset = 0;
3657
+ this.tablePagination.pageSize = this.paginatorConfig.recordsPerPage;
3658
+ this.getRolesAndInitializeTableSchema();
3659
+ }
3660
+ break;
3661
+ }
3662
+ case 3: {
3663
+ this.isGroupTypesExpanded = expanded;
3664
+ break;
3665
+ }
3666
+ }
3667
+ }
3668
+ /**
3669
+ * Fetches the configured roles of the selected tenant and creates the column schema.
3670
+ * @memberof ViewTenantDetailsComponent
3671
+ */
3672
+ getRolesAndInitializeTableSchema() {
3673
+ this.tenantAppService
3674
+ .getRoles(this.appId)
3675
+ .pipe(takeUntil(this.destroy$))
3676
+ .subscribe({
3677
+ next: (response) => {
3678
+ if (response?.status) {
3679
+ this.getRolesAndPermissionsAndInitializeTableView({
3680
+ payload: {
3681
+ offset: this.tablePagination.offset,
3682
+ pageSize: this.tablePagination.pageSize,
3683
+ },
3684
+ });
3685
+ const rolesList = this.tenantAppService.sortRolesByRoleType(response?.body);
3686
+ this.tenantAppService.setRolesInfo(rolesList);
3687
+ const cellValue = this.constants.viewRolesAndPermissions.tableCellValue;
3688
+ this.columnSchema = [
3689
+ {
3690
+ id: 0,
3691
+ columnDef: 'permissions',
3692
+ heading: this.constants.viewRolesAndPermissions.tableColumn
3693
+ .permissions,
3694
+ columnType: TableColumnType.TEXT,
3695
+ cellData: (rolesAndPermissions) => rolesAndPermissions.permission,
3696
+ isStickyColumn: true,
3697
+ },
3698
+ ];
3699
+ rolesList.map((role, index) => {
3700
+ this.columnSchema.push({
3701
+ id: index + 1,
3702
+ columnDef: role.roleId,
3703
+ heading: role.roleName,
3704
+ columnType: TableColumnType.TEXT,
3705
+ hasColumnActions: true,
3706
+ cellData: (rolesAndPermissions) => {
3707
+ return rolesAndPermissions.roleIdsList.find((roleId) => role.roleId === roleId)
3708
+ ? cellValue.yes
3709
+ : cellValue.no;
3710
+ },
3711
+ });
3712
+ });
3713
+ }
3714
+ },
3715
+ error: (error) => {
3716
+ this.sharedService.handleErrors(error, this.constants?.viewTenants?.errors);
3717
+ },
3718
+ });
3719
+ }
3720
+ /**
3721
+ * Fetches the roles and permissions mappings for the selected tenant and and initialize table view.
3722
+ * @param {GetRolesAndPermissionsPayload} payload
3723
+ * @memberof ViewTenantDetailsComponent
3724
+ */
3725
+ getRolesAndPermissionsAndInitializeTableView(payload) {
3726
+ this.tenantAppService
3727
+ .getRolesAndPermissionsMappings(this.appId, payload)
3728
+ .pipe(takeUntil(this.destroy$))
3729
+ .subscribe({
3730
+ next: (response) => {
3731
+ if (response?.status) {
3732
+ this.tableData = [];
3733
+ this.paginatorConfig.totalRecords = response?.body
3734
+ ?.totalRecords;
3735
+ const rolesAndPermissionsList = response?.body
3736
+ ?.rolePermissionDetails;
3737
+ rolesAndPermissionsList.map((permission) => {
3738
+ let roleIdsList = [];
3739
+ roleIdsList = permission.roleList.map((role) => role.roleId);
3740
+ this.tableData.push({
3741
+ permission: permission.permissionName,
3742
+ roleIdsList: roleIdsList,
3743
+ });
3744
+ });
3745
+ }
3746
+ },
3747
+ error: (error) => {
3748
+ this.sharedService.handleErrors(error, this.constants?.viewTenants?.errors);
3749
+ },
3750
+ });
3751
+ }
3752
+ /**
3753
+ * Fetch the roles and permissions records based on offset and page size while the pagination changes.
3754
+ * @param {PageEvent} pageEvent
3755
+ * @memberof ViewTenantDetailsComponent
3756
+ */
3757
+ onTablePaginationChange(pageEvent) {
3758
+ this.tablePagination = {
3759
+ offset: pageEvent.pageIndex,
3760
+ pageSize: pageEvent.pageSize,
3761
+ };
3762
+ this.getRolesAndPermissionsAndInitializeTableView({
3763
+ payload: {
3764
+ offset: pageEvent.pageIndex,
3765
+ pageSize: pageEvent.pageSize,
3766
+ },
3767
+ });
3768
+ }
3769
+ /**
3770
+ * Captures the selected role's information and performs edit or delete action basis on the selected menu item.
3771
+ * @param {TableColumnMenuInfo} roleMenuInfo
3772
+ * @memberof ViewTenantDetailsComponent
3773
+ */
3774
+ onRoleMenuClick(roleMenuInfo) {
3775
+ this.selectedRoleInfo.roleId = roleMenuInfo?.tableColumnInfo?.columnDef;
3776
+ this.selectedRoleInfo.roleName = roleMenuInfo?.tableColumnInfo?.heading;
3777
+ this.tenantAppService?.setSelectedRoleInformation(this.selectedRoleInfo);
3778
+ if (roleMenuInfo?.menuActionInfo?.id === RoleMenuAction.DELETE_ROLE) {
3779
+ this.openDeleteRoleModal();
3780
+ }
3781
+ else if (roleMenuInfo?.menuActionInfo?.id === RoleMenuAction.EDIT_ROLE) {
3782
+ this.openEditRoleForm();
3783
+ }
3784
+ }
3785
+ /**
3786
+ * Keeps track of the accordion based on the element's ID in DOM tree.
3787
+ * @memberof ViewTenantDetailsComponent
3788
+ */
3789
+ trackByAccordionFn(index, item) {
3790
+ return item?.id;
3791
+ }
3792
+ /**
3793
+ * Gets the role types and updates the form control.
3794
+ * @memberof ViewTenantDetailsComponent
3795
+ */
3796
+ getRoleTypes() {
3797
+ const payload = {
3798
+ payload: {
3799
+ appId: this.tenantDetails?.appId,
3800
+ configFieldName: 'role_type',
3801
+ },
3802
+ };
3803
+ this.tenantAppService
3804
+ .getRoleTypes(payload)
3805
+ .pipe(takeUntil(this.destroy$))
3806
+ .subscribe({
3807
+ next: (response) => {
3808
+ if (response?.status) {
3809
+ this.roleTypeOptions = this.tenantAppService.getRoleTypeOptions(response?.body);
3810
+ this.tenantAppService?.setRoleTypeOption(this.roleTypeOptions);
3811
+ if (this.functionType === TenantFunctionType.CREATE_ROLE) {
3812
+ this.openCreateRoleForm();
3813
+ }
3814
+ }
3815
+ },
3816
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3817
+ error: (error) => {
3818
+ this.sharedService.handleErrors(error, this.createRoleScreenTexts?.errors);
3819
+ },
3820
+ });
3821
+ }
3822
+ /**
3823
+ * Sets the dialog options for create role modal and calls openModal method.
3824
+ * @return -returns nothing
3825
+ * @memberof ViewTenantDetailsComponent
3826
+ */
3827
+ openCreateRoleForm() {
3828
+ this.tenantAppService?.setTenantFunctionType(TenantFunctionType?.CREATE_ROLE);
3829
+ this.functionType = TenantFunctionType.CREATE_ROLE;
3830
+ if (this.roleTypeOptions.length > 0) {
3831
+ const dialogOptions = {
3832
+ heading: this.constants?.createRole?.heading,
3833
+ isCloseNeeded: true,
3834
+ componentReference: CreateModifyRoleComponent,
3835
+ modalType: ModalType.FORM,
3836
+ };
3837
+ this.openModal(dialogOptions, 'ieeesa-create-modify-role');
3838
+ }
3839
+ else {
3840
+ this.getRoleTypes();
3841
+ }
3842
+ }
3843
+ /**
3844
+ * Sets the dialog options for create group type modal and calls openModal method.
3845
+ * @return -returns nothing
3846
+ * @memberof ViewTenantDetailsComponent
3847
+ */
3848
+ openCreateGroupTypeForm() {
3849
+ this.tenantAppService?.setTenantFunctionType(TenantFunctionType?.CREATE_GROUP_TYPE);
3850
+ this.functionType = TenantFunctionType.CREATE_GROUP_TYPE;
3851
+ const dialogOptions = {
3852
+ heading: this.constants?.createGroupType?.heading,
3853
+ isCloseNeeded: true,
3854
+ componentReference: CreateModifyGroupTypeComponent,
3855
+ modalType: ModalType.FORM,
3856
+ };
3857
+ this.openModal(dialogOptions, 'ieeesa-create-modify-group-type');
3858
+ }
3859
+ /**
3860
+ * Sets the dialog options for edit role modal and calls openModal method.
3861
+ * @return -returns nothing
3862
+ * @memberof ViewTenantDetailsComponent
3863
+ */
3864
+ openEditRoleForm() {
3865
+ this.tenantAppService?.setTenantFunctionType(TenantFunctionType?.EDIT_ROLE);
3866
+ this.functionType = TenantFunctionType.EDIT_ROLE;
3867
+ const dialogOptions = {
3868
+ heading: this.selectedRoleInfo?.roleName,
3869
+ isCloseNeeded: true,
3870
+ componentReference: CreateModifyRoleComponent,
3871
+ modalType: ModalType.FORM,
3872
+ };
3873
+ this.openModal(dialogOptions, 'ieeesa-create-modify-role');
3874
+ }
3875
+ /**
3876
+ * Sets the dialog options for edit tenant modal and calls openModal method.
3877
+ * @return -returns nothing
3878
+ * @memberof ViewTenantDetailsComponent
3879
+ */
3880
+ openEditTenantForm() {
3881
+ this.tenantAppService?.setTenantFunctionType(TenantFunctionType?.EDIT);
3882
+ this.functionType = TenantFunctionType.EDIT;
3883
+ const dialogOptions = {
3884
+ heading: this.tenantDetails?.appTitle,
3885
+ isCloseNeeded: true,
3886
+ componentReference: CreateTenantApplicationComponent,
3887
+ modalType: ModalType.FORM,
3888
+ };
3889
+ this.openModal(dialogOptions, 'ieeesa-edit-tenant');
3890
+ }
3891
+ /**
3892
+ * Opens modal component with received params and handles form submission success and errors.
3893
+ * @param {*} dialogOptions
3894
+ * @param {string} [className]
3895
+ * @return -returns nothing
3896
+ * @memberof ViewTenantsDetailsComponent
3897
+ */
3898
+ openModal(
3899
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3900
+ dialogOptions, className) {
3901
+ className = className ?? '';
3902
+ this.dialogRef = this.dialog?.open(ModalComponent, {
3903
+ data: dialogOptions,
3904
+ width: '',
3905
+ panelClass: ['ieeesa-modal-dialog', className],
3906
+ ariaModal: true,
3907
+ });
3908
+ this.dialogRef?.componentInstance?.submitFormResponse
3909
+ .pipe(takeUntil(this.destroy$))
3910
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, no-unused-vars
3911
+ .subscribe((result) => {
3912
+ this.dialogRef?.close();
3913
+ switch (this.functionType) {
3914
+ case TenantFunctionType?.EDIT: {
3915
+ this.sharedService.showAlertMessage(AlertType?.SUCCESS, `${this.tenantDetails?.appTitle} ${this.editTenantScreenTexts?.message?.success?.submission}`);
3916
+ this.tenantDetails = {
3917
+ ...this.tenantAppService.getSelectedTenantInformation(),
3918
+ };
3919
+ break;
3920
+ }
3921
+ case TenantFunctionType?.CREATE_ROLE: {
3922
+ const promptMessage = this.createRoleScreenTexts?.message?.success;
3923
+ const roleInfo = this.tenantAppService?.getNewlyCreatedRoleInfo();
3924
+ this.sharedService.showAlertMessage(AlertType?.SUCCESS, `${promptMessage?.submission1} ${roleInfo?.roleName} ${promptMessage?.submission2} ${this.tenantDetails?.appTitle}. ${promptMessage?.submission3}`);
3925
+ this.getRolesAndInitializeTableSchema();
3926
+ break;
3927
+ }
3928
+ case TenantFunctionType?.EDIT_ROLE: {
3929
+ const promptMessage = this.createRoleScreenTexts?.message?.success;
3930
+ const roleInfo = this.tenantAppService?.getNewlyCreatedRoleInfo();
3931
+ this.sharedService.showAlertMessage(AlertType?.SUCCESS, `${roleInfo?.roleName} ${promptMessage?.modify} ${this.tenantDetails?.appTitle}.`);
3932
+ this.getRolesAndInitializeTableSchema();
3933
+ break;
3934
+ }
3935
+ case TenantFunctionType?.CREATE_GROUP_TYPE: {
3936
+ this.sharedService.showAlertMessage(AlertType?.SUCCESS, `${this.createGroupTypeScreenTexts?.message?.success?.submissionPart1} ${this.tenantAppService.newlyCreatedGroupType.configFieldValue.name} ${this.createGroupTypeScreenTexts?.message?.success?.submissionPart2} ${this.tenantDetails?.appTitle}. `);
3937
+ this.tenantAppService.isGroupTypeAddedOrModified.next(true);
3938
+ break;
3939
+ }
3940
+ }
3941
+ });
3942
+ this.dialogRef?.componentInstance?.formCancel
3943
+ .pipe(takeUntil(this.destroy$))
3944
+ .subscribe(() => {
3945
+ this.dialogRef?.close();
3946
+ if (this.tenantAppService.getTenantFunctionType() ===
3947
+ TenantFunctionType.MAP_PERMISSION_AND_ROLE)
3948
+ this.getRolesAndInitializeTableSchema();
3949
+ });
3950
+ this.dialogRef?.componentInstance?.modalConfirm
3951
+ .pipe(takeUntil(this.destroy$))
3952
+ .subscribe(() => {
3953
+ if (this.tenantAppService.getTenantFunctionType() ===
3954
+ TenantFunctionType.MAP_PERMISSION_AND_ROLE)
3955
+ this.getRolesAndInitializeTableSchema();
3956
+ });
3957
+ }
3958
+ /**
3959
+ * Calls openTenantStatusConfirmationModal to change the status of tenant on slide toggle change.
3960
+ * @param {SlideToggleOption} slideToggleOption
3961
+ * @memberof ViewTenantDetailsComponent
3962
+ */
3963
+ onSlideToggleChange(slideToggleOption) {
3964
+ this.openTenantStatusConfirmationModal(slideToggleOption?.checked);
3965
+ }
3966
+ /**
3967
+ * Opens the confirmation modal to inactivate/reactivate the tenant.
3968
+ * @param {boolean} isActivate
3969
+ * @memberof ViewTenantDetailsComponent
3970
+ */
3971
+ openTenantStatusConfirmationModal(isActivate) {
3972
+ const confirmationInfo = this.constants?.viewTenants?.confirmationInfo;
3973
+ const statusText = isActivate
3974
+ ? confirmationInfo?.promptMessageActivate
3975
+ : confirmationInfo?.promptMessageInactivate;
3976
+ const updateTenantStatusModalOptions = {
3977
+ leftButtonLabel: confirmationInfo?.leftButtonLabel,
3978
+ rightButtonLabel: confirmationInfo?.rightButtonLabel,
3979
+ promptMessage: `${confirmationInfo?.promptMessage} ${statusText} ${this.tenantDetails?.appTitle}?`,
3980
+ actionButtonAlign: this.alignmentType?.MIDDLE,
3981
+ };
3982
+ this.dialogRef = this.dialog?.open(ModalConfirmationComponent, {
3983
+ data: updateTenantStatusModalOptions,
3984
+ width: 'auto',
3985
+ autoFocus: 'dialog',
3986
+ ariaLabel: confirmationInfo?.ariaLabel?.alert,
3987
+ });
3988
+ this.dialogRef
3989
+ .afterClosed()
3990
+ .pipe(takeUntil(this.destroy$))
3991
+ .subscribe((result) => {
3992
+ if (result) {
3993
+ this.updateTenantStatus(isActivate);
3994
+ }
3995
+ else {
3996
+ this.setSlideToggleStatus(isActivate);
3997
+ }
3998
+ });
3999
+ }
4000
+ /**
4001
+ * Opens the map permissions and roles modal.
4002
+ * @memberof ViewTenantDetailsComponent
4003
+ * @returns {void}
4004
+ */
4005
+ openMapRolesAndPermissionsForm() {
4006
+ this.tenantAppService?.setTenantFunctionType(TenantFunctionType?.MAP_PERMISSION_AND_ROLE);
4007
+ const dialogOptions = {
4008
+ heading: this.mapRolesAndPermissionsScreenTexts.heading,
4009
+ isCloseNeeded: true,
4010
+ modalType: ModalType.FORM,
4011
+ componentReference: RolesAndPermissionsMappingComponent,
4012
+ };
4013
+ this.openModal(dialogOptions, 'ieeesa-map-permissions-and-roles');
4014
+ }
4015
+ /**
4016
+ * Updates the tenant status to the server using http request and display success/error message based on request response (success or failure).
4017
+ * @param {boolean} isActivate
4018
+ * @memberof ViewTenantDetailsComponent
4019
+ */
4020
+ updateTenantStatus(isActivate) {
4021
+ const updateTenantStatusRequestPayload = {
4022
+ payload: {
4023
+ appId: this.tenantDetails?.appId,
4024
+ status: isActivate,
4025
+ },
4026
+ };
4027
+ this.tenantAppService
4028
+ .updateTenantStatus(updateTenantStatusRequestPayload)
4029
+ .pipe(takeUntil(this.destroy$))
4030
+ .subscribe({
4031
+ next: (res) => {
4032
+ this.dialogRef?.close();
4033
+ if (res?.status) {
4034
+ this.slideToggleOption.label = isActivate
4035
+ ? this.tenantLabels?.active
4036
+ : this.tenantLabels?.inactive;
4037
+ this.tenantDetails.status = isActivate;
4038
+ this.tenantDetails = Object.assign({}, this.tenantDetails);
4039
+ }
4040
+ },
4041
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4042
+ error: (error) => {
4043
+ this.setSlideToggleStatus(isActivate);
4044
+ this.sharedService.handleErrors(error, this.constants?.viewTenants?.errors);
4045
+ },
4046
+ });
4047
+ }
4048
+ /**
4049
+ * Sets slide toggle checked status and label.
4050
+ * @param {boolean} isActivate
4051
+ * @memberof ViewTenantDetailsComponent
4052
+ */
4053
+ setSlideToggleStatus(isActivate) {
4054
+ this.slideToggleOption.checked = !isActivate;
4055
+ this.slideToggleOption.label = !isActivate
4056
+ ? this.tenantLabels?.active
4057
+ : this.tenantLabels?.inactive;
4058
+ }
4059
+ /**
4060
+ * Gets the application/tenant types.
4061
+ * @memberof ViewTenantDetailsComponent
4062
+ */
4063
+ getApplicationTypes() {
4064
+ this.tenantAppService
4065
+ .getApplicationTypes()
4066
+ .pipe(takeUntil(this.destroy$))
4067
+ .subscribe({
4068
+ next: (response) => {
4069
+ if (response?.status) {
4070
+ this.appTypeOptions =
4071
+ this.tenantAppService.getApplicationTypeOptions(response?.body);
4072
+ this.tenantAppService.setApplicationType(this.appTypeOptions);
4073
+ }
4074
+ },
4075
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4076
+ error: (error) => {
4077
+ this.sharedService.handleErrors(error, this.constants?.viewTenants?.errors);
4078
+ },
4079
+ });
4080
+ }
4081
+ /**
4082
+ * Validates permission based access for provided feature.
4083
+ * @param {PermissionType} permissionType
4084
+ * @return {boolean}
4085
+ * @memberof ViewTenantDetailsComponent
4086
+ */
4087
+ validateAccess(permissionType) {
4088
+ return this.tenantAppService.validateAccess(permissionType, this.userTenantsPermissions);
4089
+ }
4090
+ /**
4091
+ * Posts the details of the role to be deleted to the server using http request and display success/error message based on request response (success or failure).
4092
+ * @memberof ViewTenantDetailsComponent
4093
+ */
4094
+ deleteRole() {
4095
+ const deleteRoleRequestPayload = {
4096
+ payload: {
4097
+ appId: this.tenantDetails?.appId,
4098
+ roleId: this.selectedRoleInfo?.roleId,
4099
+ },
4100
+ };
4101
+ this.tenantAppService
4102
+ .deleteRole(deleteRoleRequestPayload)
4103
+ .pipe(takeUntil(this.destroy$))
4104
+ .subscribe({
4105
+ next: (res) => {
4106
+ if (res?.status) {
4107
+ this.sharedService.showAlertMessage(AlertType?.SUCCESS, `${this.selectedRoleInfo?.roleName} ${this.deleteRoleScreenTexts?.message?.success?.submission} ${this.tenantDetails?.appTitle}.`);
4108
+ this.getRolesAndInitializeTableSchema();
4109
+ }
4110
+ },
4111
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4112
+ error: (error) => {
4113
+ this.sharedService.handleErrors(error, this.constants?.viewTenants?.errors);
4114
+ },
4115
+ });
4116
+ }
4117
+ /**
4118
+ * Sets the role menu HTMLElement.
4119
+ * @param {HTMLElement} menuButton
4120
+ * @memberof ViewTenantDetailsComponent
4121
+ */
4122
+ selectedRoleMenuElement(menuButton) {
4123
+ this.roleMenuElement = menuButton;
4124
+ }
4125
+ /**
4126
+ * Opens the confirmation modal to get user confirmation to delete the role.
4127
+ * @memberof ViewTenantDetailsComponent
4128
+ */
4129
+ openDeleteRoleModal() {
4130
+ const confirmationInfo = this.constants?.viewTenants?.confirmationInfo;
4131
+ const deleteRoleModalOptions = {
4132
+ leftButtonLabel: confirmationInfo?.leftButtonLabel,
4133
+ rightButtonLabel: confirmationInfo?.rightButtonLabel,
4134
+ promptMessage: `${confirmationInfo?.deleteRoleConfirmationMessage} ${this.selectedRoleInfo?.roleName}? ${confirmationInfo?.deleteRolePromptMessage} ${this.tenantDetails?.appTitle}.`,
4135
+ actionButtonAlign: this.alignmentType?.MIDDLE,
4136
+ };
4137
+ this.dialogRef = this.dialog?.open(ModalConfirmationComponent, {
4138
+ data: deleteRoleModalOptions,
4139
+ width: '25%',
4140
+ panelClass: [
4141
+ 'ieeesa-modal-confirm-dialog',
4142
+ 'ieeesa-delete-role-confirm-dialog',
4143
+ ],
4144
+ autoFocus: 'dialog',
4145
+ ariaLabel: confirmationInfo?.ariaLabel?.alert,
4146
+ });
4147
+ this.dialogRef
4148
+ .afterClosed()
4149
+ .pipe(takeUntil(this.destroy$))
4150
+ .subscribe((result) => {
4151
+ if (result) {
4152
+ this.deleteRole();
4153
+ }
4154
+ else
4155
+ this.roleMenuElement?.focus();
4156
+ });
4157
+ }
4158
+ /**
4159
+ * Performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
4160
+ * @memberof ViewTenantDetailsComponent
4161
+ */
4162
+ ngOnDestroy() {
4163
+ this.roleTypeOptions = [];
4164
+ this.tenantAppService?.setRoleTypeOption(this.roleTypeOptions);
4165
+ this.destroy$?.next(true);
4166
+ this.destroy$?.unsubscribe();
4167
+ }
4168
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ViewTenantDetailsComponent, deps: [{ token: i1$1.MatDialog }, { token: i2.BreakpointObserverService }, { token: TenantApplicationsService }, { token: i1.GlobalErrorHandlerService }, { token: i2$1.SharedService }, { token: i6.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
4169
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ViewTenantDetailsComponent, isStandalone: true, selector: "ieeesa-view-tenant-details", inputs: { apiBaseURL: "apiBaseURL", userPermissions: "userPermissions", routePaths: "routePaths" }, ngImport: i0, template: "<div\r\n class=\"ieeesa-view-tenant-info px-4 pb-4\"\r\n [ngClass]=\"\r\n isMobileView\r\n ? 'ieeesa-view-tenant-info--bg-white'\r\n : 'ieeesa-view-tenant-info--bg-blue'\r\n \"\r\n>\r\n <div\r\n class=\"d-flex justify-content-between gap-lg-4 gap-md-3 gap-sm-2 gap-3\"\r\n [ngClass]=\"isMobileView ? 'flex-column gap-2 pb-3' : 'align-item-center'\"\r\n >\r\n <div\r\n class=\"d-flex gap-lg-4 gap-md-3 gap-sm-3 gap-3 ps-0 align-items-md-center align-items-xl-center\"\r\n [ngClass]=\"isMobileView ? 'flex-column' : ''\"\r\n >\r\n <p\r\n class=\"mb-0 ieeesa-headline-lg-32 py-3\"\r\n [ngClass]=\"isMobileView ? '' : 'ieeesa-view-tenant-info--title'\"\r\n >\r\n {{ tenantDetails?.appTitle }}\r\n </p>\r\n <div class=\"d-flex gap-lg-2 gap-md-2 gap-sm-2 gap-2\">\r\n <span\r\n class=\"mb-0 ieeesa-title-sm-14 mt-1\"\r\n [ngClass]=\"isMobileView ? 'p-0' : 'ieeesa-view-tenant-info--app-id'\"\r\n >\r\n {{ tenantLabels?.appId }}:\r\n </span>\r\n {{ tenantDetails?.appId }}\r\n <ng-container *ngIf=\"tenantDetails?.appId !== tenantLabels?.saAppId\">\r\n <mat-divider [vertical]=\"true\"></mat-divider>\r\n <span\r\n class=\"mb-0 mt-1 ieeesa-title-sm-14 ieeesa-view-tenant-info--app-status\"\r\n [ngClass]=\"isMobileView ? 'p-0' : ''\"\r\n >\r\n {{ tenantLabels?.status }}:\r\n </span>\r\n <ieeesa-slide-toggle\r\n [slideToggle]=\"slideToggleOption\"\r\n (slideToggleChange)=\"onSlideToggleChange($event)\"\r\n ></ieeesa-slide-toggle>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <a\r\n class=\"ieeesa-btn-label-lg-bold-16 text-decoration-none mt-lg-3 mt-xl-6 p-sm-0 p-md-0\"\r\n href=\"javascript:void(0)\"\r\n rel=\"noopener noreferrer\"\r\n [routerLink]=\"viewTenantsRouteUrl\"\r\n [ngClass]=\"\r\n isMobileView\r\n ? 'ieeesa-view-tenant-info--link-mobile'\r\n : 'ieeesa-view-tenant-info--link'\r\n \"\r\n >{{ tenantLabels?.viewAllApps }}</a\r\n >\r\n </div>\r\n <div\r\n class=\"ieeesa-view-tenant-info__accordion ieeesa-view-tenant-info__accordion--blue-bg\"\r\n [ngClass]=\"isMobileView ? 'ieeesa-view-tenant-info__accordion--info' : ''\"\r\n >\r\n <ng-container\r\n *ngFor=\"\r\n let accordionInfo of accordionInfoList;\r\n trackBy: trackByAccordionFn\r\n \"\r\n >\r\n <ng-container [ngSwitch]=\"accordionInfo.id\">\r\n <ng-container *ngSwitchCase=\"accordionDetails.BASIC_DETAILS\">\r\n <ieeesa-accordion\r\n [accordionInfo]=\"accordionInfo\"\r\n class=\"ieeesa-view-tenant-info__accordion-info\"\r\n (accordionOpened)=\"showTenantDetails(accordionInfo, $event)\"\r\n >\r\n <ieeesa-icon-button\r\n *ngIf=\"\r\n isBasicDetailsExpanded &&\r\n validateAccess(permissionType.MANAGE_TENANT)\r\n \"\r\n actions\r\n class=\"ieeesa-button\"\r\n [iconButton]=\"editButton\"\r\n (iconButtonClick)=\"openEditTenantForm()\"\r\n ></ieeesa-icon-button>\r\n <ng-container component *ngIf=\"isBasicDetailsExpanded\">\r\n <ieeesa-tenant-basic-details\r\n [tenantDetails]=\"tenantDetails\"\r\n ></ieeesa-tenant-basic-details>\r\n </ng-container>\r\n </ieeesa-accordion>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"accordionDetails.ROLES_AND_PERMISSIONS\">\r\n <ieeesa-accordion\r\n [accordionInfo]=\"accordionInfo\"\r\n class=\"ieeesa-view-tenant-info__roles-and-permissions\"\r\n (accordionOpened)=\"showTenantDetails(accordionInfo, $event)\"\r\n >\r\n <div\r\n actions\r\n *ngIf=\"isRolesAndPermissionsExpanded\"\r\n class=\"d-flex gap-3\"\r\n [ngClass]=\"\r\n isMobileView ? 'mb-3 px-4' : 'ieeesa-view-tenant-info__actions'\r\n \"\r\n >\r\n <button\r\n mat-button\r\n class=\"mat-tertiary-button\"\r\n [ngClass]=\"isMobileView ? 'p-0' : 'px-2 py-2'\"\r\n (click)=\"openCreateRoleForm()\"\r\n *ngIf=\"validateAccess(permissionType.MANAGE_TENANT)\"\r\n >\r\n {{\r\n constants.viewRolesAndPermissions.actionButtonLabels.addRole\r\n }}\r\n </button>\r\n <button\r\n mat-button\r\n class=\"mat-tertiary-button\"\r\n (click)=\"openMapRolesAndPermissionsForm()\"\r\n [ngClass]=\"isMobileView ? 'p-0' : 'px-2 py-2'\"\r\n >\r\n {{\r\n constants.viewRolesAndPermissions.actionButtonLabels\r\n .mapPermissionsRoles\r\n }}\r\n </button>\r\n </div>\r\n <ng-container component *ngIf=\"isRolesAndPermissionsExpanded\">\r\n <mat-divider\r\n class=\"ieeesa-view-tenant-info__roles-and-permissions__divider\"\r\n ></mat-divider>\r\n <ieeesa-data-table\r\n *ngIf=\"columnSchema.length\"\r\n [tableDataInfo]=\"tableData\"\r\n [headerElementClassName]=\"headerElementClassName\"\r\n [columnSchemaInfo]=\"columnSchema\"\r\n [caption]=\"rolesAndPermissionsTableCaption\"\r\n [paginatorConfig]=\"paginatorConfig\"\r\n [tableActions]=\"tableActions\"\r\n [isScrollSupportMessageNeeded]=\"true\"\r\n [tableColumnActionMenuSize]=\"iconSize\"\r\n [tableColumnActions]=\"menuItems\"\r\n [customStickyHeaderNeeded]=\"true\"\r\n [tableColumnsHeaderText]=\"rolesAndPermissionsTableHeaderName\"\r\n [scrollbarSupportMessage]=\"\r\n rolesAndPermissionsTableSupportMessage\r\n \"\r\n [verticalColumnHeaderNumber]=\"permissionsColumnClassNumber\"\r\n (paginationChange)=\"onTablePaginationChange($event)\"\r\n (tableColumnMenuActionClick)=\"onRoleMenuClick($event)\"\r\n (tableColumnMenuToggleButton)=\"selectedRoleMenuElement($event)\"\r\n ></ieeesa-data-table>\r\n </ng-container>\r\n </ieeesa-accordion>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"accordionDetails.GROUP_TYPES\">\r\n <ieeesa-accordion\r\n [accordionInfo]=\"accordionInfo\"\r\n class=\"ieeesa-view-tenant-info__group-types\"\r\n (accordionOpened)=\"showTenantDetails(accordionInfo, $event)\"\r\n >\r\n <div\r\n actions\r\n *ngIf=\"isGroupTypesExpanded\"\r\n class=\"d-flex gap-3\"\r\n [ngClass]=\"\r\n isMobileView ? 'mb-3 px-4' : 'ieeesa-view-tenant-info__actions'\r\n \"\r\n >\r\n <button\r\n mat-button\r\n class=\"mat-tertiary-button p-2\"\r\n *ngIf=\"validateAccess(permissionType.MANAGE_TENANT)\"\r\n (click)=\"openCreateGroupTypeForm()\"\r\n >\r\n {{ constants.viewGroupTypes.actionButtonLabels.addGroupType }}\r\n </button>\r\n </div>\r\n <ng-container component *ngIf=\"isGroupTypesExpanded\">\r\n <ieeesa-view-tenant-group-types></ieeesa-view-tenant-group-types>\r\n </ng-container>\r\n </ieeesa-accordion>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ieeesa-accordion\r\n [accordionInfo]=\"accordionInfo\"\r\n (accordionOpened)=\"showTenantDetails(accordionInfo, $event)\"\r\n ></ieeesa-accordion>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-view-tenant-info{background-color:#f2f2f2}.ieeesa-view-tenant-info--bg-white{background-color:#fff;padding:1em 1.5em 0}.ieeesa-view-tenant-info__actions{top:15px;margin-right:20px;position:absolute;right:0}.ieeesa-view-tenant-info--title,.ieeesa-view-tenant-info--action{padding:.75em 0}.ieeesa-view-tenant-info--link{padding:1em .75em 1.3em 0!important}.ieeesa-view-tenant-info--link-mobile{max-width:-moz-fit-content;max-width:fit-content}.ieeesa-view-tenant-info--app-id,.ieeesa-view-tenant-info--app-status{color:#49454f}.ieeesa-view-tenant-info__accordion{background-color:#fff;box-shadow:0 1px 4px #00000040,0 4px #00b5e2 inset;padding:1.5em .75em}.ieeesa-view-tenant-info__accordion--bg-white{background-color:#fff;box-shadow:none}.ieeesa-view-tenant-info__accordion--info{padding:1em 1em 1.5em}.ieeesa-view-tenant-info__accordion-info .mat-accordion .mat-expansion-panel-spacing.mat-expanded{position:relative}.ieeesa-view-tenant-info__accordion-info .mat-accordion .mat-expansion-panel-body{padding:1.5em 1.5em 1.5em 2.25em}.ieeesa-view-tenant-info__accordion-info .ieeesa-button{position:absolute;top:1.25em;right:0}.ieeesa-view-tenant-info__accordion-info .ieeesa-button svg{width:1.3em!important;height:1.3em!important}.ieeesa-view-tenant-info .mat-divider-vertical{margin:0;height:1.4em;color:#cac4d0;width:.063em;border-right-color:#cac4d0}.ieeesa-view-tenant-info .ieeesa-slide-toggle-field .mat-mdc-slide-toggle .mdc-label{color:#000!important}.ieeesa-view-tenant-info__roles-and-permissions .ieeesa-accordion .mat-accordion .mat-expansion-panel-spacing.mat-expanded{position:relative}.ieeesa-view-tenant-info__roles-and-permissions__divider{margin-top:12px!important;margin-bottom:16px!important;border-top:1px solid #ccd2da!important}.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-header-cell{white-space:nowrap}.ieeesa-view-tenant-info__roles-and-permissions .mat-expansion-panel-body,.ieeesa-view-tenant-info__roles-and-permissions .ieeesa-data-table{padding-left:0;padding-right:0}.ieeesa-view-tenant-info__roles-and-permissions .ieeesa-data-table .mat-column-permissions{min-width:12.5em;padding:16px!important}.ieeesa-view-tenant-info__roles-and-permissions .ieeesa-data-table__content{margin-top:0!important}.ieeesa-view-tenant-info__roles-and-permissions .ieeesa-data-table__column-menu .mat-mdc-icon-button.mat-mdc-button-base{padding:6px;width:24px;height:24px}.ieeesa-view-tenant-info__roles-and-permissions .ieeesa-data-table__columns-header-text{padding:8px 16px;background:#dae9f1;box-shadow:0 1px #dce3e9 inset}.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-paginator-container{padding:0;flex-wrap:nowrap}.ieeesa-view-tenant-info__roles-and-permissions .mdc-notched-outline__trailing,.ieeesa-view-tenant-info__roles-and-permissions .mdc-notched-outline__notch,.ieeesa-view-tenant-info__roles-and-permissions .mdc-notched-outline__leading{border:none!important}.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-paginator-page-size,.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-paginator-page-size-label,.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-paginator-page-size-select,.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-paginator-range-label{margin:0}.ieeesa-view-tenant-info__roles-and-permissions .at-mdc-select-min-line,.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-paginator-range-label{color:#1c1d1e}.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-paginator-page-size-label{position:relative;color:#63666a;left:2em}.ieeesa-view-tenant-info__group-types .ieeesa-accordion .mat-accordion .mat-expansion-panel-spacing.mat-expanded{position:relative}.ieeesa-view-tenant-info__group-types .mat-mdc-header-cell{white-space:nowrap}.ieeesa-view-tenant-info__group-types .mat-expansion-panel-body,.ieeesa-view-tenant-info__group-types .ieeesa-data-table{padding-left:0;padding-right:0}.ieeesa-menu__item:not(:last-of-type){margin-bottom:0!important}.ieeesa-menu .mat-mdc-menu-item{min-height:35px!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i7.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i7.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: SlideToggleComponent, selector: "ieeesa-slide-toggle", inputs: ["formControlName", "slideToggle", "isDisabled", "canShowIcon"], outputs: ["slideToggleChange"] }, { kind: "component", type: AccordionComponent, selector: "ieeesa-accordion", inputs: ["accordionInfo"], outputs: ["accordionOpened"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i8$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: TenantBasicDetailsComponent, selector: "ieeesa-tenant-basic-details", inputs: ["tenantDetails"] }, { kind: "component", type: IconButtonComponent, selector: "ieeesa-icon-button", inputs: ["iconButton", "isLabelNeeded"], outputs: ["iconButtonClick"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.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: DataTableComponent, selector: "ieeesa-data-table", inputs: ["tableDataInfo", "nestedTableDataInfo", "columnSchemaInfo", "nestedTableColumnSchemaInfo", "tableActions", "hasNestedTable", "tableColumnActions", "tableColumnActionMenuSize", "tableRowActions", "nestedTableRowActions", "caption", "viewAll", "paginatorConfig", "nestedPaginatorConfig", "legends", "pageIndex", "pageSize", "searchPlaceHolderText", "rowEditButton", "rowDeleteButton", "tableEditButton", "tableDeleteButton", "rowExpandButton", "rowCollapseButton", "isNestedTableHeaderNeeded", "addButton", "defaultColumnSortDirection", "defaultSortedColumn", "isClearSortNeeded", "filters", "selectedFilterOptions", "appliedFilterOptions", "searchType", "className", "searchSupportMessage", "inbuiltSortingNeeded", "isCellTextOverflowEllipsis", "isTableHeaderNeeded", "tableColumnsHeaderText", "verticalColumnHeaderNumber", "scrollbarSupportMessage", "isScrollSupportMessageNeeded", "isStickyHeaderNeeded", "customStickyHeaderNeeded", "headerElementClassName", "minCharToSearch", "searchResultMessage", "rowMenuActionIcon", "canDisableCheckbox", "isEllipsisRequiredForLink"], outputs: ["rowSelected", "selectedRowToEdit", "selectedRowToDelete", "selectedRowsToDelete", "rowLink", "addRow", "columnDataOnRowLinkClick", "menuActionClick", "selectActionMenu", "paginationChange", "selectedFilter", "removeFilteredOption", "filteredOptions", "searchedValue", "sortChange", "selectedRowsInfo", "rowExpansionClick", "tableColumnMenuActionClick", "tableColumnMenuToggleButton", "rowSlideToggle"] }, { kind: "component", type: ViewTenantGroupTypesComponent, selector: "ieeesa-view-tenant-group-types" }], encapsulation: i0.ViewEncapsulation.None }); }
4170
+ }
4171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ViewTenantDetailsComponent, decorators: [{
4172
+ type: Component,
4173
+ args: [{ selector: 'ieeesa-view-tenant-details', standalone: true, imports: [
4174
+ CommonModule,
4175
+ RouterModule,
4176
+ SlideToggleComponent,
4177
+ AccordionComponent,
4178
+ MatDividerModule,
4179
+ TenantBasicDetailsComponent,
4180
+ IconButtonComponent,
4181
+ MatButtonModule,
4182
+ DataTableComponent,
4183
+ ViewTenantGroupTypesComponent,
4184
+ ], encapsulation: ViewEncapsulation.None, template: "<div\r\n class=\"ieeesa-view-tenant-info px-4 pb-4\"\r\n [ngClass]=\"\r\n isMobileView\r\n ? 'ieeesa-view-tenant-info--bg-white'\r\n : 'ieeesa-view-tenant-info--bg-blue'\r\n \"\r\n>\r\n <div\r\n class=\"d-flex justify-content-between gap-lg-4 gap-md-3 gap-sm-2 gap-3\"\r\n [ngClass]=\"isMobileView ? 'flex-column gap-2 pb-3' : 'align-item-center'\"\r\n >\r\n <div\r\n class=\"d-flex gap-lg-4 gap-md-3 gap-sm-3 gap-3 ps-0 align-items-md-center align-items-xl-center\"\r\n [ngClass]=\"isMobileView ? 'flex-column' : ''\"\r\n >\r\n <p\r\n class=\"mb-0 ieeesa-headline-lg-32 py-3\"\r\n [ngClass]=\"isMobileView ? '' : 'ieeesa-view-tenant-info--title'\"\r\n >\r\n {{ tenantDetails?.appTitle }}\r\n </p>\r\n <div class=\"d-flex gap-lg-2 gap-md-2 gap-sm-2 gap-2\">\r\n <span\r\n class=\"mb-0 ieeesa-title-sm-14 mt-1\"\r\n [ngClass]=\"isMobileView ? 'p-0' : 'ieeesa-view-tenant-info--app-id'\"\r\n >\r\n {{ tenantLabels?.appId }}:\r\n </span>\r\n {{ tenantDetails?.appId }}\r\n <ng-container *ngIf=\"tenantDetails?.appId !== tenantLabels?.saAppId\">\r\n <mat-divider [vertical]=\"true\"></mat-divider>\r\n <span\r\n class=\"mb-0 mt-1 ieeesa-title-sm-14 ieeesa-view-tenant-info--app-status\"\r\n [ngClass]=\"isMobileView ? 'p-0' : ''\"\r\n >\r\n {{ tenantLabels?.status }}:\r\n </span>\r\n <ieeesa-slide-toggle\r\n [slideToggle]=\"slideToggleOption\"\r\n (slideToggleChange)=\"onSlideToggleChange($event)\"\r\n ></ieeesa-slide-toggle>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <a\r\n class=\"ieeesa-btn-label-lg-bold-16 text-decoration-none mt-lg-3 mt-xl-6 p-sm-0 p-md-0\"\r\n href=\"javascript:void(0)\"\r\n rel=\"noopener noreferrer\"\r\n [routerLink]=\"viewTenantsRouteUrl\"\r\n [ngClass]=\"\r\n isMobileView\r\n ? 'ieeesa-view-tenant-info--link-mobile'\r\n : 'ieeesa-view-tenant-info--link'\r\n \"\r\n >{{ tenantLabels?.viewAllApps }}</a\r\n >\r\n </div>\r\n <div\r\n class=\"ieeesa-view-tenant-info__accordion ieeesa-view-tenant-info__accordion--blue-bg\"\r\n [ngClass]=\"isMobileView ? 'ieeesa-view-tenant-info__accordion--info' : ''\"\r\n >\r\n <ng-container\r\n *ngFor=\"\r\n let accordionInfo of accordionInfoList;\r\n trackBy: trackByAccordionFn\r\n \"\r\n >\r\n <ng-container [ngSwitch]=\"accordionInfo.id\">\r\n <ng-container *ngSwitchCase=\"accordionDetails.BASIC_DETAILS\">\r\n <ieeesa-accordion\r\n [accordionInfo]=\"accordionInfo\"\r\n class=\"ieeesa-view-tenant-info__accordion-info\"\r\n (accordionOpened)=\"showTenantDetails(accordionInfo, $event)\"\r\n >\r\n <ieeesa-icon-button\r\n *ngIf=\"\r\n isBasicDetailsExpanded &&\r\n validateAccess(permissionType.MANAGE_TENANT)\r\n \"\r\n actions\r\n class=\"ieeesa-button\"\r\n [iconButton]=\"editButton\"\r\n (iconButtonClick)=\"openEditTenantForm()\"\r\n ></ieeesa-icon-button>\r\n <ng-container component *ngIf=\"isBasicDetailsExpanded\">\r\n <ieeesa-tenant-basic-details\r\n [tenantDetails]=\"tenantDetails\"\r\n ></ieeesa-tenant-basic-details>\r\n </ng-container>\r\n </ieeesa-accordion>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"accordionDetails.ROLES_AND_PERMISSIONS\">\r\n <ieeesa-accordion\r\n [accordionInfo]=\"accordionInfo\"\r\n class=\"ieeesa-view-tenant-info__roles-and-permissions\"\r\n (accordionOpened)=\"showTenantDetails(accordionInfo, $event)\"\r\n >\r\n <div\r\n actions\r\n *ngIf=\"isRolesAndPermissionsExpanded\"\r\n class=\"d-flex gap-3\"\r\n [ngClass]=\"\r\n isMobileView ? 'mb-3 px-4' : 'ieeesa-view-tenant-info__actions'\r\n \"\r\n >\r\n <button\r\n mat-button\r\n class=\"mat-tertiary-button\"\r\n [ngClass]=\"isMobileView ? 'p-0' : 'px-2 py-2'\"\r\n (click)=\"openCreateRoleForm()\"\r\n *ngIf=\"validateAccess(permissionType.MANAGE_TENANT)\"\r\n >\r\n {{\r\n constants.viewRolesAndPermissions.actionButtonLabels.addRole\r\n }}\r\n </button>\r\n <button\r\n mat-button\r\n class=\"mat-tertiary-button\"\r\n (click)=\"openMapRolesAndPermissionsForm()\"\r\n [ngClass]=\"isMobileView ? 'p-0' : 'px-2 py-2'\"\r\n >\r\n {{\r\n constants.viewRolesAndPermissions.actionButtonLabels\r\n .mapPermissionsRoles\r\n }}\r\n </button>\r\n </div>\r\n <ng-container component *ngIf=\"isRolesAndPermissionsExpanded\">\r\n <mat-divider\r\n class=\"ieeesa-view-tenant-info__roles-and-permissions__divider\"\r\n ></mat-divider>\r\n <ieeesa-data-table\r\n *ngIf=\"columnSchema.length\"\r\n [tableDataInfo]=\"tableData\"\r\n [headerElementClassName]=\"headerElementClassName\"\r\n [columnSchemaInfo]=\"columnSchema\"\r\n [caption]=\"rolesAndPermissionsTableCaption\"\r\n [paginatorConfig]=\"paginatorConfig\"\r\n [tableActions]=\"tableActions\"\r\n [isScrollSupportMessageNeeded]=\"true\"\r\n [tableColumnActionMenuSize]=\"iconSize\"\r\n [tableColumnActions]=\"menuItems\"\r\n [customStickyHeaderNeeded]=\"true\"\r\n [tableColumnsHeaderText]=\"rolesAndPermissionsTableHeaderName\"\r\n [scrollbarSupportMessage]=\"\r\n rolesAndPermissionsTableSupportMessage\r\n \"\r\n [verticalColumnHeaderNumber]=\"permissionsColumnClassNumber\"\r\n (paginationChange)=\"onTablePaginationChange($event)\"\r\n (tableColumnMenuActionClick)=\"onRoleMenuClick($event)\"\r\n (tableColumnMenuToggleButton)=\"selectedRoleMenuElement($event)\"\r\n ></ieeesa-data-table>\r\n </ng-container>\r\n </ieeesa-accordion>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"accordionDetails.GROUP_TYPES\">\r\n <ieeesa-accordion\r\n [accordionInfo]=\"accordionInfo\"\r\n class=\"ieeesa-view-tenant-info__group-types\"\r\n (accordionOpened)=\"showTenantDetails(accordionInfo, $event)\"\r\n >\r\n <div\r\n actions\r\n *ngIf=\"isGroupTypesExpanded\"\r\n class=\"d-flex gap-3\"\r\n [ngClass]=\"\r\n isMobileView ? 'mb-3 px-4' : 'ieeesa-view-tenant-info__actions'\r\n \"\r\n >\r\n <button\r\n mat-button\r\n class=\"mat-tertiary-button p-2\"\r\n *ngIf=\"validateAccess(permissionType.MANAGE_TENANT)\"\r\n (click)=\"openCreateGroupTypeForm()\"\r\n >\r\n {{ constants.viewGroupTypes.actionButtonLabels.addGroupType }}\r\n </button>\r\n </div>\r\n <ng-container component *ngIf=\"isGroupTypesExpanded\">\r\n <ieeesa-view-tenant-group-types></ieeesa-view-tenant-group-types>\r\n </ng-container>\r\n </ieeesa-accordion>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ieeesa-accordion\r\n [accordionInfo]=\"accordionInfo\"\r\n (accordionOpened)=\"showTenantDetails(accordionInfo, $event)\"\r\n ></ieeesa-accordion>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-subtitle{text-align:left;font-family:Calibri Regular;font-size:1.5625rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-body{text-align:left;font-family:Calibri Regular;font-size:1.25rem;letter-spacing:0;color:#000;opacity:1}.ieeesa-display-lg-57{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:3.5625rem;line-height:64px;color:#000;letter-spacing:0}.ieeesa-display-md-45{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.813rem;line-height:52px;color:#000;letter-spacing:0}.ieeesa-display-md-47{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.9375rem;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.375rem;line-height:44px;color:#000;letter-spacing:0}.ieeesa-headline-lg-32{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2rem;line-height:40px;color:#000;letter-spacing:0}.ieeesa-headline-lg-34{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:2.125rem;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.875rem;line-height:36px;color:#000;letter-spacing:0}.ieeesa-headline-sm-24{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.5rem;line-height:32px;color:#00629b;letter-spacing:0}.ieeesa-headline-sm-26{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1.625rem;line-height:32px;color:#000;letter-spacing:0}.ieeesa-title-lg-bold-24{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.5rem;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.5rem;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.125rem;line-height:24px;color:#000;letter-spacing:.009375em}.ieeesa-title-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-title-sm-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-label-lg-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.00625em}.ieeesa-btn-label-lg-bold-16{font-family:Calibri Regular;font-style:normal;font-weight:700;font-size:1rem;line-height:20px;color:#00629b;letter-spacing:.00625em}.ieeesa-label-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-label-sm-13{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.8125rem;line-height:16px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-16{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-lg-bold-18{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:1.125rem;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.125rem;line-height:24px;color:#000;letter-spacing:.03125em}.ieeesa-body-md-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:20px;color:#1c1b1f;letter-spacing:.015625em}.ieeesa-body-md-16{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:1rem;line-height:20px;color:#000;letter-spacing:.015625em}.ieeesa-body-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-sm-12{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.75rem;line-height:16px;color:#000;letter-spacing:.025em}.ieeesa-body-color-sm-14{font-family:Calibri Regular;font-style:normal;font-weight:400;font-size:.875rem;line-height:18px;color:#49454f;letter-spacing:.025em}.ieeesa-body-sm-bold-14{font-family:Calibri Bold;font-style:normal;font-weight:700;font-size:.875rem;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.5rem;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,.mat-mdc-button.mat-mdc-button-base.mat-text-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 Bold;font-style:normal;font-weight:700;font-size:1rem;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:focus{background:#1f75a7}.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:focus{background:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:active{background:#1d192b1f}.mat-mdc-button.mat-mdc-button-base.mat-secondary-button:disabled{background:#1c1b1f1f;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:focus{background-color:#f0f5f9}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:active{background:#6750a41f}.mat-mdc-button.mat-mdc-button-base.mat-tertiary-button:disabled{border:1px solid rgba(28,27,31,.12);color:#1c1b1f;opacity:.38}.mat-mdc-button.mat-mdc-button-base.mat-text-button{color:#00629b}.mat-mdc-button.mat-mdc-button-base.mat-text-button:hover,.mat-mdc-button.mat-mdc-button-base.mat-text-button:active{background:#6750a414}.mat-mdc-button.mat-mdc-button-base.mat-text-button:disabled{color:#1c1b1f;opacity:.38}.ieeesa-text-button{color:#cac4d0;background:none;border:none}.ieeesa-view-more-or-less-button{border:none;background:none;text-decoration:underline;color:#00629b}.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 Bold;font-style:normal;font-weight:700;font-size:1rem;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 .mat-mdc-tooltip .mdc-tooltip__surface{color:#525252;padding:6px 12px;font-family:Calibri Regular;font-size:1rem;border:1px solid #cac4d0;background:#fff;box-shadow:0 4px 8px #00000040;max-width:unset!important}.cdk-overlay-pane .mat-mdc-option .mdc-list-item__primary-text{font-family:Calibri Regular!important}.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:1rem;line-height:24px;color:#49454f;letter-spacing:.03125em}.ieeesa-cancel-modal-confirm-dialog{width:25vw!important}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation{padding:1.5em 1.5em 1em}.ieeesa-cancel-modal-confirm-dialog .ieeesa-confirmation .mat-mdc-dialog-content{text-align:center;padding:0 0 1em!important}.mat-mdc-button,.mat-mdc-outlined-button{--mat-mdc-button-persistent-ripple-color: unset}@media (max-width: 768px){.ieeesa-cancel-modal-confirm-dialog{width:90vw!important}}.ieeesa-wrapper-border{border:1px solid #b2b7be;border-top:none;padding:1.5em;border-radius:0 0 4px 4px}.ieeesa-view-tenant-info{background-color:#f2f2f2}.ieeesa-view-tenant-info--bg-white{background-color:#fff;padding:1em 1.5em 0}.ieeesa-view-tenant-info__actions{top:15px;margin-right:20px;position:absolute;right:0}.ieeesa-view-tenant-info--title,.ieeesa-view-tenant-info--action{padding:.75em 0}.ieeesa-view-tenant-info--link{padding:1em .75em 1.3em 0!important}.ieeesa-view-tenant-info--link-mobile{max-width:-moz-fit-content;max-width:fit-content}.ieeesa-view-tenant-info--app-id,.ieeesa-view-tenant-info--app-status{color:#49454f}.ieeesa-view-tenant-info__accordion{background-color:#fff;box-shadow:0 1px 4px #00000040,0 4px #00b5e2 inset;padding:1.5em .75em}.ieeesa-view-tenant-info__accordion--bg-white{background-color:#fff;box-shadow:none}.ieeesa-view-tenant-info__accordion--info{padding:1em 1em 1.5em}.ieeesa-view-tenant-info__accordion-info .mat-accordion .mat-expansion-panel-spacing.mat-expanded{position:relative}.ieeesa-view-tenant-info__accordion-info .mat-accordion .mat-expansion-panel-body{padding:1.5em 1.5em 1.5em 2.25em}.ieeesa-view-tenant-info__accordion-info .ieeesa-button{position:absolute;top:1.25em;right:0}.ieeesa-view-tenant-info__accordion-info .ieeesa-button svg{width:1.3em!important;height:1.3em!important}.ieeesa-view-tenant-info .mat-divider-vertical{margin:0;height:1.4em;color:#cac4d0;width:.063em;border-right-color:#cac4d0}.ieeesa-view-tenant-info .ieeesa-slide-toggle-field .mat-mdc-slide-toggle .mdc-label{color:#000!important}.ieeesa-view-tenant-info__roles-and-permissions .ieeesa-accordion .mat-accordion .mat-expansion-panel-spacing.mat-expanded{position:relative}.ieeesa-view-tenant-info__roles-and-permissions__divider{margin-top:12px!important;margin-bottom:16px!important;border-top:1px solid #ccd2da!important}.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-header-cell{white-space:nowrap}.ieeesa-view-tenant-info__roles-and-permissions .mat-expansion-panel-body,.ieeesa-view-tenant-info__roles-and-permissions .ieeesa-data-table{padding-left:0;padding-right:0}.ieeesa-view-tenant-info__roles-and-permissions .ieeesa-data-table .mat-column-permissions{min-width:12.5em;padding:16px!important}.ieeesa-view-tenant-info__roles-and-permissions .ieeesa-data-table__content{margin-top:0!important}.ieeesa-view-tenant-info__roles-and-permissions .ieeesa-data-table__column-menu .mat-mdc-icon-button.mat-mdc-button-base{padding:6px;width:24px;height:24px}.ieeesa-view-tenant-info__roles-and-permissions .ieeesa-data-table__columns-header-text{padding:8px 16px;background:#dae9f1;box-shadow:0 1px #dce3e9 inset}.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-paginator-container{padding:0;flex-wrap:nowrap}.ieeesa-view-tenant-info__roles-and-permissions .mdc-notched-outline__trailing,.ieeesa-view-tenant-info__roles-and-permissions .mdc-notched-outline__notch,.ieeesa-view-tenant-info__roles-and-permissions .mdc-notched-outline__leading{border:none!important}.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-paginator-page-size,.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-paginator-page-size-label,.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-paginator-page-size-select,.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-paginator-range-label{margin:0}.ieeesa-view-tenant-info__roles-and-permissions .at-mdc-select-min-line,.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-paginator-range-label{color:#1c1d1e}.ieeesa-view-tenant-info__roles-and-permissions .mat-mdc-paginator-page-size-label{position:relative;color:#63666a;left:2em}.ieeesa-view-tenant-info__group-types .ieeesa-accordion .mat-accordion .mat-expansion-panel-spacing.mat-expanded{position:relative}.ieeesa-view-tenant-info__group-types .mat-mdc-header-cell{white-space:nowrap}.ieeesa-view-tenant-info__group-types .mat-expansion-panel-body,.ieeesa-view-tenant-info__group-types .ieeesa-data-table{padding-left:0;padding-right:0}.ieeesa-menu__item:not(:last-of-type){margin-bottom:0!important}.ieeesa-menu .mat-mdc-menu-item{min-height:35px!important}\n"] }]
4185
+ }], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i2.BreakpointObserverService }, { type: TenantApplicationsService }, { type: i1.GlobalErrorHandlerService }, { type: i2$1.SharedService }, { type: i6.ActivatedRoute }]; }, propDecorators: { apiBaseURL: [{
4186
+ type: Input
4187
+ }], userPermissions: [{
4188
+ type: Input
4189
+ }], routePaths: [{
4190
+ type: Input
4191
+ }] } });
4192
+
4193
+ /* eslint-disable no-empty-function */
4194
+ class TenantApplicationsComponent {
4195
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4196
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TenantApplicationsComponent, isStandalone: true, selector: "ieeesa-tenant-applications", ngImport: i0, template: "", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }] }); }
4197
+ }
4198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsComponent, decorators: [{
4199
+ type: Component,
4200
+ args: [{ selector: 'ieeesa-tenant-applications', standalone: true, imports: [CommonModule, MatButtonModule], template: "" }]
4201
+ }] });
4202
+
4203
+ /* eslint-disable no-unused-vars */
4204
+ var AppType;
4205
+ (function (AppType) {
4206
+ AppType["GENERIC"] = "Generic";
4207
+ AppType["STANDALONE"] = "Standalone";
4208
+ })(AppType || (AppType = {}));
4209
+
4210
+ class TenantApplicationsModule {
4211
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4212
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsModule }); }
4213
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsModule }); }
4214
+ }
4215
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsModule, decorators: [{
4216
+ type: NgModule,
4217
+ args: [{
4218
+ declarations: [],
4219
+ imports: [],
4220
+ exports: [],
4221
+ }]
4222
+ }] });
4223
+
4224
+ /*
4225
+ * Public API Surface of tenants
4226
+ */
4227
+
4228
+ /**
4229
+ * Generated bundle index. Do not edit.
4230
+ */
4231
+
4232
+ export { AppType, CreateModifyGroupTypeComponent, CreateModifyRoleComponent, CreateTenantApplicationComponent, FeaturePermissionId, GroupTypeSettings, GroupTypeValidation, PermissionType, RoleAndPermissionsTableType, RoleMenuAction, RolesAndPermissionsMappingComponent, RolesValidation, RosterTypeLOVCode, Settings, SortOrderBy, TenantApplicationsComponent, TenantApplicationsModule, TenantApplicationsService, TenantBasicDetailsComponent, TenantFunctionType, TenantPermissionsMapService, TenantPermissionsService, TenantStatus, TenantsValidationPatterns, ViewTenantDetailsComponent, ViewTenantGroupTypesComponent, ViewTenantsColumnSchemaDef, ViewTenantsListComponent, VotingMemberLevelRole };
4233
+ //# sourceMappingURL=ieeesa-npm-tenants.mjs.map