@ieeesa-npm/tenants 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/.eslintrc.json +31 -0
  2. package/ng-package.json +8 -0
  3. package/package.json +12 -25
  4. package/src/lib/assets/constants.json +454 -0
  5. package/src/lib/assets/tenant-validations.ts +18 -0
  6. package/src/lib/assets/tenants-mock.ts +1240 -0
  7. package/src/lib/components/create-modify-group-type/create-modify-group-type.component.html +15 -0
  8. package/src/lib/components/create-modify-group-type/create-modify-group-type.component.scss +44 -0
  9. package/src/lib/components/create-modify-group-type/create-modify-group-type.component.spec.ts +574 -0
  10. package/src/lib/components/create-modify-group-type/create-modify-group-type.component.ts +602 -0
  11. package/src/lib/components/create-modify-role/create-modify-role.component.html +15 -0
  12. package/src/lib/components/create-modify-role/create-modify-role.component.scss +83 -0
  13. package/src/lib/components/create-modify-role/create-modify-role.component.spec.ts +346 -0
  14. package/src/lib/components/create-modify-role/create-modify-role.component.ts +321 -0
  15. package/src/lib/components/create-tenant-application/create-tenant-application.component.html +18 -0
  16. package/src/lib/components/create-tenant-application/create-tenant-application.component.scss +73 -0
  17. package/src/lib/components/create-tenant-application/create-tenant-application.component.spec.ts +775 -0
  18. package/src/lib/components/create-tenant-application/create-tenant-application.component.ts +638 -0
  19. package/src/lib/components/roles-and-permissions-mapping/roles-and-permissions-mapping.component.html +22 -0
  20. package/src/lib/components/roles-and-permissions-mapping/roles-and-permissions-mapping.component.scss +79 -0
  21. package/src/lib/components/roles-and-permissions-mapping/roles-and-permissions-mapping.component.spec.ts +716 -0
  22. package/src/lib/components/roles-and-permissions-mapping/roles-and-permissions-mapping.component.ts +504 -0
  23. package/src/lib/components/tenant-basic-details/tenant-basic-details.component.html +44 -0
  24. package/src/lib/components/tenant-basic-details/tenant-basic-details.component.scss +16 -0
  25. package/src/lib/components/tenant-basic-details/tenant-basic-details.component.spec.ts +115 -0
  26. package/src/lib/components/tenant-basic-details/tenant-basic-details.component.ts +109 -0
  27. package/src/lib/components/view-tenant-details/view-tenant-details.component.html +195 -0
  28. package/src/lib/components/view-tenant-details/view-tenant-details.component.scss +163 -0
  29. package/src/lib/components/view-tenant-details/view-tenant-details.component.spec.ts +1221 -0
  30. package/src/lib/components/view-tenant-details/view-tenant-details.component.ts +876 -0
  31. package/src/lib/components/view-tenant-group-types/view-tenant-group-types.component.html +10 -0
  32. package/src/lib/components/view-tenant-group-types/view-tenant-group-types.component.scss +44 -0
  33. package/src/lib/components/view-tenant-group-types/view-tenant-group-types.component.spec.ts +410 -0
  34. package/src/lib/components/view-tenant-group-types/view-tenant-group-types.component.ts +219 -0
  35. package/src/lib/components/view-tenants-list/view-tenants-list.component.html +32 -0
  36. package/src/lib/components/view-tenants-list/view-tenants-list.component.scss +35 -0
  37. package/src/lib/components/view-tenants-list/view-tenants-list.component.spec.ts +464 -0
  38. package/src/lib/components/view-tenants-list/view-tenants-list.component.ts +388 -0
  39. package/src/lib/models/app-type-config.model.ts +14 -0
  40. package/src/lib/models/app-type.model.ts +5 -0
  41. package/src/lib/models/create-group-type-config.model.ts +18 -0
  42. package/src/lib/models/create-group-type.model.ts +46 -0
  43. package/src/lib/models/feature-permission-id.model.ts +6 -0
  44. package/src/lib/models/features.model.ts +15 -0
  45. package/src/lib/models/form-status.model.ts +5 -0
  46. package/src/lib/models/permission-type.model.ts +9 -0
  47. package/src/lib/models/role-menu-action.model.ts +5 -0
  48. package/src/lib/models/role-type.model.ts +34 -0
  49. package/src/lib/models/roles-and-permissions-table-type.model.ts +5 -0
  50. package/src/lib/models/roles-and-permissions.model.ts +113 -0
  51. package/src/lib/models/route-config.model.ts +4 -0
  52. package/src/lib/models/table-column-schema-view-tenant-list.model.ts +21 -0
  53. package/src/lib/models/tenant-function-type.model.ts +10 -0
  54. package/src/lib/models/tenant.model.ts +47 -0
  55. package/src/lib/models/tenants-permission.model.ts +9 -0
  56. package/src/lib/models/update-tenant-status.model.ts +12 -0
  57. package/src/lib/models/view-tenant-group-types.model.ts +34 -0
  58. package/src/lib/services/tenant-applications.service.spec.ts +1245 -0
  59. package/src/lib/services/tenant-applications.service.ts +798 -0
  60. package/src/lib/services/tenant-permissions-map.service.spec.ts +25 -0
  61. package/src/lib/services/tenant-permissions-map.service.ts +28 -0
  62. package/src/lib/services/tenant-permissions.service.spec.ts +62 -0
  63. package/src/lib/services/tenant-permissions.service.ts +49 -0
  64. package/src/lib/tenant-applications.component.html +0 -0
  65. package/src/lib/tenant-applications.component.scss +0 -0
  66. package/src/lib/tenant-applications.component.spec.ts +28 -0
  67. package/src/lib/tenant-applications.component.ts +12 -0
  68. package/src/lib/tenant-applications.module.ts +8 -0
  69. package/{public-api.d.ts → src/public-api.ts} +40 -30
  70. package/tsconfig.lib.json +14 -0
  71. package/tsconfig.lib.prod.json +10 -0
  72. package/tsconfig.spec.json +14 -0
  73. package/esm2022/ieeesa-npm-tenants.mjs +0 -5
  74. package/esm2022/lib/assets/constants.json +0 -390
  75. package/esm2022/lib/assets/tenant-validations.mjs +0 -13
  76. package/esm2022/lib/components/create-modify-role/create-modify-role.component.mjs +0 -280
  77. package/esm2022/lib/components/create-tenant-application/create-tenant-application.component.mjs +0 -512
  78. package/esm2022/lib/components/roles-and-permissions-mapping/roles-and-permissions-mapping.component.mjs +0 -391
  79. package/esm2022/lib/components/tenant-basic-details/tenant-basic-details.component.mjs +0 -95
  80. package/esm2022/lib/components/view-tenant-details/view-tenant-details.component.mjs +0 -708
  81. package/esm2022/lib/components/view-tenant-group-types/view-tenant-group-types.component.mjs +0 -174
  82. package/esm2022/lib/components/view-tenants-list/view-tenants-list.component.mjs +0 -334
  83. package/esm2022/lib/models/app-type-config.model.mjs +0 -2
  84. package/esm2022/lib/models/app-type.model.mjs +0 -7
  85. package/esm2022/lib/models/feature-permission-id.model.mjs +0 -8
  86. package/esm2022/lib/models/features.model.mjs +0 -2
  87. package/esm2022/lib/models/form-status.model.mjs +0 -7
  88. package/esm2022/lib/models/permission-type.model.mjs +0 -12
  89. package/esm2022/lib/models/role-menu-action.model.mjs +0 -7
  90. package/esm2022/lib/models/role-type.model.mjs +0 -2
  91. package/esm2022/lib/models/roles-and-permissions-table-type.model.mjs +0 -7
  92. package/esm2022/lib/models/roles-and-permissions.model.mjs +0 -2
  93. package/esm2022/lib/models/route-config.model.mjs +0 -2
  94. package/esm2022/lib/models/table-column-schema-view-tenant-list.model.mjs +0 -16
  95. package/esm2022/lib/models/tenant-function-type.model.mjs +0 -10
  96. package/esm2022/lib/models/tenant.model.mjs +0 -2
  97. package/esm2022/lib/models/tenants-permission.model.mjs +0 -2
  98. package/esm2022/lib/models/update-tenant-status.model.mjs +0 -2
  99. package/esm2022/lib/models/view-tenant-group-types.model.mjs +0 -9
  100. package/esm2022/lib/services/tenant-applications.service.mjs +0 -542
  101. package/esm2022/lib/services/tenant-permissions-map.service.mjs +0 -36
  102. package/esm2022/lib/services/tenant-permissions.service.mjs +0 -38
  103. package/esm2022/lib/tenant-applications.component.mjs +0 -14
  104. package/esm2022/lib/tenant-applications.module.mjs +0 -16
  105. package/esm2022/public-api.mjs +0 -34
  106. package/fesm2022/ieeesa-npm-tenants.mjs +0 -3565
  107. package/fesm2022/ieeesa-npm-tenants.mjs.map +0 -1
  108. package/index.d.ts +0 -5
  109. package/lib/assets/tenant-validations.d.ts +0 -11
  110. package/lib/components/create-modify-role/create-modify-role.component.d.ts +0 -103
  111. package/lib/components/create-tenant-application/create-tenant-application.component.d.ts +0 -128
  112. package/lib/components/roles-and-permissions-mapping/roles-and-permissions-mapping.component.d.ts +0 -106
  113. package/lib/components/tenant-basic-details/tenant-basic-details.component.d.ts +0 -408
  114. package/lib/components/view-tenant-details/view-tenant-details.component.d.ts +0 -216
  115. package/lib/components/view-tenant-group-types/view-tenant-group-types.component.d.ts +0 -58
  116. package/lib/components/view-tenants-list/view-tenants-list.component.d.ts +0 -134
  117. package/lib/models/app-type-config.model.d.ts +0 -14
  118. package/lib/models/app-type.model.d.ts +0 -4
  119. package/lib/models/feature-permission-id.model.d.ts +0 -4
  120. package/lib/models/features.model.d.ts +0 -15
  121. package/lib/models/form-status.model.d.ts +0 -4
  122. package/lib/models/permission-type.model.d.ts +0 -8
  123. package/lib/models/role-menu-action.model.d.ts +0 -4
  124. package/lib/models/role-type.model.d.ts +0 -27
  125. package/lib/models/roles-and-permissions-table-type.model.d.ts +0 -4
  126. package/lib/models/roles-and-permissions.model.d.ts +0 -119
  127. package/lib/models/route-config.model.d.ts +0 -4
  128. package/lib/models/table-column-schema-view-tenant-list.model.d.ts +0 -20
  129. package/lib/models/tenant-function-type.model.d.ts +0 -7
  130. package/lib/models/tenant.model.d.ts +0 -51
  131. package/lib/models/tenants-permission.model.d.ts +0 -9
  132. package/lib/models/update-tenant-status.model.d.ts +0 -14
  133. package/lib/models/view-tenant-group-types.model.d.ts +0 -27
  134. package/lib/services/tenant-applications.service.d.ts +0 -357
  135. package/lib/services/tenant-permissions-map.service.d.ts +0 -13
  136. package/lib/services/tenant-permissions.service.d.ts +0 -22
  137. package/lib/tenant-applications.component.d.ts +0 -5
  138. package/lib/tenant-applications.module.d.ts +0 -6
@@ -1,3565 +0,0 @@
1
- import * as i6 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, NgModule } from '@angular/core';
5
- import * as i1 from '@ieeesa-npm/presentation';
6
- import { AlignType, AllowedFileTypes, FormControlType, DynamicFormComponent, TableColumnType, ModalComponent, TableColumnSortDirection, DataTableComponent, ImagePreviewComponent, AccordionDetails, ModalConfirmationComponent, SlideToggleComponent, AccordionComponent, IconButtonComponent } from '@ieeesa-npm/presentation';
7
- import { map, catchError, Subject, takeUntil } from 'rxjs';
8
- import * as i7 from '@angular/material/button';
9
- import { MatButtonModule } from '@angular/material/button';
10
- import * as i2 from '@ieeesa-npm/utility';
11
- import { ModalType, AlertType } from '@ieeesa-npm/utility';
12
- import { Validators } from '@angular/forms';
13
- import { validColorValidator } from 'ngx-colors';
14
- import * as i2$1 from '@ieeesa-npm/shared';
15
- import { FormStatus as FormStatus$1 } from '@ieeesa-npm/shared';
16
- import * as i1$1 from '@angular/material/dialog';
17
- import * as i5 from '@angular/router';
18
- import { RouterModule } from '@angular/router';
19
- import * as i7$1 from '@angular/material/divider';
20
- import { MatDividerModule } from '@angular/material/divider';
21
- import { HttpErrorResponse } from '@angular/common/http';
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 constants = {
422
- createTenant: createTenant,
423
- createRole: createRole,
424
- editTenant: editTenant,
425
- viewTenants: viewTenants,
426
- viewRolesAndPermissions: viewRolesAndPermissions,
427
- mapRolesAndPermissions: mapRolesAndPermissions,
428
- deleteRole: deleteRole,
429
- viewGroupTypes: viewGroupTypes,
430
- routeConfigPath: routeConfigPath
431
- };
432
-
433
- var screenText = /*#__PURE__*/Object.freeze({
434
- __proto__: null,
435
- createRole: createRole,
436
- createTenant: createTenant,
437
- default: constants,
438
- deleteRole: deleteRole,
439
- editTenant: editTenant,
440
- mapRolesAndPermissions: mapRolesAndPermissions,
441
- routeConfigPath: routeConfigPath,
442
- viewGroupTypes: viewGroupTypes,
443
- viewRolesAndPermissions: viewRolesAndPermissions,
444
- viewTenants: viewTenants
445
- });
446
-
447
- /* eslint-disable no-unused-vars */
448
- var PermissionType;
449
- (function (PermissionType) {
450
- PermissionType["VIEW_TENANTS"] = "VIEW_TENANTS";
451
- PermissionType["MANAGE_TENANT"] = "MANAGE_TENANT";
452
- })(PermissionType || (PermissionType = {}));
453
- var TenantStatus;
454
- (function (TenantStatus) {
455
- TenantStatus["ACTIVE"] = "Active";
456
- TenantStatus["INACTIVE"] = "Inactive";
457
- })(TenantStatus || (TenantStatus = {}));
458
-
459
- /* eslint-disable no-unused-vars */
460
- var ViewTenantsColumnSchemaDef;
461
- (function (ViewTenantsColumnSchemaDef) {
462
- ViewTenantsColumnSchemaDef["APP_ID"] = "appId";
463
- ViewTenantsColumnSchemaDef["APP_TITLE"] = "appTitle";
464
- ViewTenantsColumnSchemaDef["APP_DESCRIPTION"] = "appDescription";
465
- ViewTenantsColumnSchemaDef["APP_HEADING"] = "appHeading";
466
- ViewTenantsColumnSchemaDef["FEATURES"] = "features";
467
- ViewTenantsColumnSchemaDef["STATUS"] = "status";
468
- })(ViewTenantsColumnSchemaDef || (ViewTenantsColumnSchemaDef = {}));
469
- var SortOrderBy;
470
- (function (SortOrderBy) {
471
- SortOrderBy["DESC"] = "DESC";
472
- SortOrderBy["ASC"] = "ASC";
473
- })(SortOrderBy || (SortOrderBy = {}));
474
-
475
- /* eslint-disable no-useless-escape */
476
- const TenantsValidationPatterns = {
477
- appTitleMaxLength: 50,
478
- appIdMaxLength: 10,
479
- appHeadingMaxLength: 150,
480
- appDescriptionMaxLength: 500,
481
- url: /^https:\/\//,
482
- alphaNumeric: /^[a-zA-Z0-9]+$/,
483
- };
484
- const RolesValidation = {
485
- roleNameMaxLength: 100,
486
- };
487
-
488
- /* eslint-disable no-unused-vars */
489
- var FormStatus;
490
- (function (FormStatus) {
491
- FormStatus["VALID"] = "VALID";
492
- FormStatus["INVALID"] = "INVALID";
493
- })(FormStatus || (FormStatus = {}));
494
-
495
- /* eslint-disable no-unused-vars */
496
- var TenantFunctionType;
497
- (function (TenantFunctionType) {
498
- TenantFunctionType["CREATE"] = "CREATE";
499
- TenantFunctionType["EDIT"] = "EDIT";
500
- TenantFunctionType["CREATE_ROLE"] = "CREATE_ROLE";
501
- TenantFunctionType["EDIT_ROLE"] = "EDIT_ROLE";
502
- TenantFunctionType["MAP_PERMISSION_AND_ROLE"] = "MAP_PERMISSION_AND_ROLE";
503
- })(TenantFunctionType || (TenantFunctionType = {}));
504
-
505
- class TenantPermissionsService {
506
- /**
507
- * Returns access provision for the passed action/feature based on whether the signed in user has appropriate permission.
508
- * @param {PermissionType} permission
509
- * @param {TenantsPermission[]} tenantsPermissions
510
- * @return {boolean}
511
- * @memberof TenantPermissionsService
512
- */
513
- validateAccessPermission(permission, userTenantsPermissions) {
514
- const isPermitted = userTenantsPermissions && userTenantsPermissions.length
515
- ? userTenantsPermissions?.some(({ permissionType }) => permissionType === permission)
516
- : false;
517
- return isPermitted;
518
- }
519
- /**
520
- * Filters signed in user tenants permissions from entire tenants permissions.
521
- * @param { UserPermission[] }
522
- * @return {TenantsPermissions[]}
523
- * @memberof TenantPermissionsService
524
- */
525
- filterTenantsPermissions(userPermissions, tenantsPermissions) {
526
- const userTenantsPermission = tenantsPermissions?.filter((permission) => {
527
- return userPermissions?.find(({ permissionId }) => permission?.permissionId === permissionId);
528
- });
529
- return userTenantsPermission;
530
- }
531
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantPermissionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
532
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantPermissionsService, providedIn: 'root' }); }
533
- }
534
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantPermissionsService, decorators: [{
535
- type: Injectable,
536
- args: [{
537
- providedIn: 'root',
538
- }]
539
- }] });
540
-
541
- class TenantPermissionsMapService {
542
- constructor() {
543
- this.globalTenantsPermissions = [
544
- {
545
- permissionType: PermissionType.VIEW_TENANTS,
546
- permissionId: 'PERM_1a2dbbb5-5fe1-4261-85b1-a5373f41075a',
547
- permissionName: 'View Tenant Applications',
548
- },
549
- {
550
- permissionType: PermissionType.MANAGE_TENANT,
551
- permissionId: 'PERM_315c49ec-f79a-4dcd-9795-6f97838c8c83',
552
- permissionName: 'Manage (Create, Edit, Disable) Tenant Application',
553
- },
554
- ];
555
- }
556
- /**
557
- * Returns global permissions mapping for tenants.
558
- * @return {TenantsPermissions[]}
559
- * @memberof TenantsPermissionsMapService
560
- */
561
- getGlobalTenantsPermissions() {
562
- return this.globalTenantsPermissions;
563
- }
564
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantPermissionsMapService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
565
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantPermissionsMapService, providedIn: 'root' }); }
566
- }
567
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantPermissionsMapService, decorators: [{
568
- type: Injectable,
569
- args: [{
570
- providedIn: 'root',
571
- }]
572
- }] });
573
-
574
- class TenantApplicationsService {
575
- constructor(
576
- // eslint-disable-next-line no-unused-vars
577
- httpService,
578
- // eslint-disable-next-line no-unused-vars
579
- tenantPermissionsService,
580
- // eslint-disable-next-line no-unused-vars
581
- tenantPermissionsMapService // eslint-disable-next-line no-empty-function
582
- ) {
583
- this.httpService = httpService;
584
- this.tenantPermissionsService = tenantPermissionsService;
585
- this.tenantPermissionsMapService = tenantPermissionsMapService;
586
- this.tenantsText = viewTenants?.errors;
587
- this.createTenantsText = createTenant?.errors;
588
- this.radioOptions = [];
589
- this.checkBoxOptions = [];
590
- this.appTypeInfo = [];
591
- this.featureList = [];
592
- this.roleTypeOptions = [];
593
- }
594
- setAppConfig(apiBaseUrl, userPermission) {
595
- this.apiBaseUrl = apiBaseUrl;
596
- this.userPermission = userPermission;
597
- }
598
- /**
599
- * Gets tenant details from server using HttpService
600
- * @param {string} appId
601
- * @return {Observable<TenantDetailsResponse>}
602
- * @memberof TenantApplicationsService
603
- */
604
- getTenantDetails(appId) {
605
- return this.httpService
606
- .getData(`${this.apiBaseUrl}/configurations/app/details/${appId}`)
607
- .pipe(map((response) => {
608
- return response;
609
- }), catchError((error) => {
610
- throw error;
611
- }));
612
- }
613
- /**
614
- * Sets the user tenants permissions
615
- * @param {TenantsPermissions[]} TenantsPermissions
616
- * @memberof TenantApplicationsService
617
- */
618
- setUserTenantsPermissions(userTenantsPermissions) {
619
- this.userTenantsPermissions = userTenantsPermissions;
620
- }
621
- /**
622
- * Returns the user tenants permissions
623
- * @return {TenantsPermissions[]}
624
- * @memberof TenantApplicationsService
625
- */
626
- getUserTenantsPermissions() {
627
- return this.userTenantsPermissions;
628
- }
629
- /**
630
- * Sets the user tenants information
631
- * @param {TenantBasicInfo} tenantInfo
632
- * @memberof TenantApplicationsService
633
- */
634
- setSelectedTenantInformation(tenantInfo) {
635
- this.selectedTenantInfo = tenantInfo;
636
- }
637
- /**
638
- * Returns the tenants information
639
- * @return {TenantBasicInfo}
640
- * @memberof TenantApplicationsService
641
- */
642
- getSelectedTenantInformation() {
643
- return this.selectedTenantInfo;
644
- }
645
- /**
646
- * Sets the roles informations
647
- * @param {Role} roles
648
- * @memberof TenantApplicationsService
649
- */
650
- setRolesInfo(roles) {
651
- this.roles = roles;
652
- }
653
- /**
654
- * Returns the roles information
655
- * @return {Role}
656
- * @memberof TenantApplicationsService
657
- */
658
- getRolesInfo() {
659
- return this.roles;
660
- }
661
- /**
662
- * Sets the selected role information.
663
- * @param {RoleDetails} roleInfo
664
- * @memberof TenantApplicationsService
665
- */
666
- setSelectedRoleInformation(roleInfo) {
667
- this.selectedRoleInfo = roleInfo;
668
- }
669
- /**
670
- * Returns the selected role information.
671
- * @return {RoleDetails}
672
- * @memberof TenantApplicationsService
673
- */
674
- getSelectedRoleInformation() {
675
- return this.selectedRoleInfo;
676
- }
677
- /**
678
- * Sets the tenant role type options.
679
- * @param {RoleTypeOption} roleTypeOptions
680
- * @memberof TenantApplicationsService
681
- */
682
- setRoleTypeOption(roleTypeOptions) {
683
- this.roleTypeOption = roleTypeOptions;
684
- }
685
- /**
686
- * Returns the tenant role type options.
687
- * @return {RoleTypeOption}
688
- * @memberof TenantApplicationsService
689
- */
690
- getRoleTypeOption() {
691
- return this.roleTypeOption;
692
- }
693
- /**
694
- * Sets the list of application type information
695
- * @param {RadioOption} appTypeInfo
696
- * @memberof TenantApplicationsService
697
- */
698
- setApplicationType(appTypeInfo) {
699
- this.appTypeInfo = appTypeInfo;
700
- }
701
- /**
702
- * Returns the list of application type information
703
- * @return {RadioOption}
704
- * @memberof TenantApplicationsService
705
- */
706
- getApplicationType() {
707
- return this.appTypeInfo;
708
- }
709
- /**
710
- * Filter permissions
711
- * @param usersPermissions
712
- * @returns @memberof TenantApplicationsService
713
- */
714
- filterPermission(usersPermissions) {
715
- return this.tenantPermissionsService?.filterTenantsPermissions(usersPermissions, this.tenantPermissionsMapService?.getGlobalTenantsPermissions());
716
- }
717
- /**
718
- * Validating access for tenants
719
- * @param permissionType Permission Type to validate permission
720
- * @param mappedUserPermissions Permission which are mapped with tenants
721
- * @returns true if permission is granted
722
- */
723
- validateAccess(permissionType, permissions) {
724
- return this.tenantPermissionsService.validateAccessPermission(permissionType, permissions);
725
- }
726
- /**
727
- * Gets the tenants.
728
- * @param {GetTenantsPayload} payload
729
- * @return {Observable<GetTenantsResponse>}
730
- * @memberof TenantApplicationsService
731
- */
732
- getTenantsList(payload) {
733
- return this.httpService
734
- .postData(`${this.apiBaseUrl}/configurations/app/config`, payload)
735
- .pipe(map((response) => {
736
- return response;
737
- }), catchError((error) => {
738
- throw error;
739
- }));
740
- }
741
- /**
742
- * Gets list of features from server using HttpService.
743
- * @return {Observable<GetFeaturesResponse>}
744
- * @memberof TenantApplicationsService
745
- */
746
- getFeatures() {
747
- return this.httpService
748
- .getData(`${this.apiBaseUrl}/configurations/app/features`)
749
- .pipe(map((response) => {
750
- return response;
751
- }), catchError((error) => {
752
- throw error;
753
- }));
754
- }
755
- /**
756
- * Gets list of roles from server using HttpService.
757
- * @param {string} appId
758
- * @return {*} {Observable<GetRolesResponse>}
759
- * @memberof TenantApplicationsService
760
- */
761
- getRoles(appId) {
762
- return this.httpService
763
- .getData(`${this.apiBaseUrl}/groups/role/${appId}`)
764
- .pipe(map((response) => {
765
- return response;
766
- }), catchError((error) => {
767
- throw error;
768
- }));
769
- }
770
- /**
771
- * Gets the list of permissions based on the appId and return the success or error response as Observable.
772
- * @param {string} appId
773
- * @return {Observable<GetPermissionsResponse>}
774
- * @memberof TenantApplicationsService
775
- */
776
- getPermissions(appId) {
777
- return this.httpService
778
- .getData(`${this.apiBaseUrl}/groups/permissions/${appId}`)
779
- .pipe(map((response) => {
780
- return response;
781
- }), catchError((error) => {
782
- throw error;
783
- }));
784
- }
785
- /**
786
- * 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.
787
- * @param {RolePermissionMappingRequestPayload} payload
788
- * @returns {Observable<RolePermissionMappingResponse>}
789
- * @memberof TenantApplicationsService
790
- */
791
- getRolePermissionMapping(payload) {
792
- return this.httpService
793
- .postData(`${this.apiBaseUrl}/groups/users/rolePermissionMapping`, payload)
794
- .pipe(map((response) => {
795
- return response;
796
- }), catchError((error) => {
797
- throw error;
798
- }));
799
- }
800
- /**
801
- * Submit the new mappings of roles to permissions to the server.
802
- * @param {RolesAndPermissionsRequestPayload} payload
803
- * @returns {Observable<RolesAndPermissionsResponse>}
804
- * @memberof TenantApplicationsService
805
- */
806
- saveRolePermissionMapping(payload) {
807
- return this.httpService
808
- .postData(`${this.apiBaseUrl}/groups/users/rolePermission`, payload)
809
- .pipe(map((response) => {
810
- return response;
811
- }), catchError((error) => {
812
- throw error;
813
- }));
814
- }
815
- /**
816
- * Gets list of roles and permissions mappings from server using HttpService.
817
- * @param {string} appId
818
- * @param {GetRolesAndPermissionsPayload} payload
819
- * @return {*} {Observable<GetRolesAndPermissionsResponse>}
820
- * @memberof TenantApplicationsService
821
- */
822
- getRolesAndPermissionsMappings(appId, payload) {
823
- return this.httpService
824
- .postData(`${this.apiBaseUrl}/groups/roleBasedPermissions/${appId}`, payload)
825
- .pipe(map((response) => {
826
- return response;
827
- }), catchError((error) => {
828
- throw error;
829
- }));
830
- }
831
- /**
832
- * Gets list of application types from server using HttpService.
833
- * @return {Observable<GetAppTypesResponse>}
834
- * @memberof TenantApplicationsService
835
- */
836
- getApplicationTypes() {
837
- return this.httpService
838
- .getData(`${this.apiBaseUrl}/configurations/config/app_type`)
839
- .pipe(map((response) => {
840
- return response;
841
- }), catchError((error) => {
842
- throw error;
843
- }));
844
- }
845
- /**
846
- * Posts create role form data to server using HttpService to create a new role.
847
- * @param {CreateModifyRoleRequestPayload} createModifyRolePayload
848
- * @return {Observable<CreateModifyRoleResponse>}
849
- * @memberof TenantApplicationsService
850
- */
851
- createRole(createModifyRolePayload) {
852
- return this.httpService
853
- .postData(`${this.apiBaseUrl}/groups/role`, createModifyRolePayload)
854
- .pipe(map((response) => {
855
- return response;
856
- }), catchError((error) => {
857
- throw error;
858
- }));
859
- }
860
- /**
861
- * Posts the edited role form data to server using HttpService for updating the role information.
862
- * @param {CreateModifyRoleRequestPayload} createModifyRolePayload
863
- * @return {Observable<CreateModifyRoleResponse>}
864
- * @memberof TenantApplicationsService
865
- */
866
- editRole(createModifyRolePayload) {
867
- return this.httpService
868
- .putData(`${this.apiBaseUrl}/groups/role`, createModifyRolePayload)
869
- .pipe(map((response) => {
870
- return response;
871
- }), catchError((error) => {
872
- throw error;
873
- }));
874
- }
875
- /**
876
- * Gets list of role types from server using HttpService.
877
- * @param {GetRoleTypesPayload} payload
878
- * @return {Observable<RoleTypeResponse>}
879
- * @memberof TenantApplicationsService
880
- */
881
- getRoleTypes(payload) {
882
- return this.httpService
883
- .postData(`${this.apiBaseUrl}/configurations/config/configField`, payload)
884
- .pipe(map((response) => {
885
- return response;
886
- }), catchError((error) => {
887
- throw error;
888
- }));
889
- }
890
- /**
891
- * Constructs the select/dropdown options from the role types received from server.
892
- * @param {RoleTypeConfiguration[]} roleTypeResponse
893
- * @return {RoleTypeOption[]}
894
- * @memberof TenantApplicationsService
895
- */
896
- getRoleTypeOptions(roleTypeResponse) {
897
- this.roleTypeOptions = [];
898
- roleTypeResponse.forEach((item) => {
899
- this.roleTypeOptions?.push({
900
- id: item?.configFieldId,
901
- name: item?.configFieldValue?.roleTypeName,
902
- order: item?.configFieldValue?.viewOrder,
903
- });
904
- });
905
- this.roleTypeOptions.sort((a, b) => a.order - b.order);
906
- return this.roleTypeOptions;
907
- }
908
- /**
909
- * Posts tenant application form data to server using HttpService for creating new tenant application.
910
- * @param {CreateTenantPayload} createTenantPayload
911
- * @return {Observable<CreateTenantResponse>}
912
- * @memberof TenantApplicationsService
913
- */
914
- createTenant(createTenantPayload) {
915
- return this.httpService
916
- .postData(`${this.apiBaseUrl}/configurations/app/createTenant`, createTenantPayload)
917
- .pipe(map((response) => {
918
- return response;
919
- }), catchError((error) => {
920
- throw error;
921
- }));
922
- }
923
- /**
924
- * Constructs the checkbox options from features list from server.
925
- * @param {FeaturesList[]} features
926
- * @returns {CheckboxOption[]}
927
- */
928
- getFeatureOptions(features) {
929
- this.checkBoxOptions = [];
930
- features?.forEach((feature) => {
931
- this.checkBoxOptions?.push({
932
- id: feature?.featureId,
933
- name: feature?.featureName,
934
- checked: feature?.isDefault,
935
- disabled: feature?.isDefault,
936
- });
937
- });
938
- return this.checkBoxOptions;
939
- }
940
- /**
941
- * Constructs the radio options from application types from server.
942
- * @param {AppTypeConfig[]} appTypeOptions
943
- * @returns {RadioOption[]}
944
- */
945
- getApplicationTypeOptions(appTypeOptions) {
946
- this.radioOptions = [];
947
- appTypeOptions?.forEach((appType) => {
948
- this.radioOptions?.push({
949
- id: appType?.configFieldId,
950
- label: appType?.configFieldValue?.type,
951
- });
952
- });
953
- return this.radioOptions;
954
- }
955
- /**
956
- * Constructs the selected features id's.
957
- * @param {CheckboxOption[]} featureOptions
958
- * @returns {FeatureId[]}
959
- */
960
- getFeatureIds(featureOptions) {
961
- const featureIds = [];
962
- featureOptions?.forEach((featureOption) => {
963
- if (featureOption?.checked) {
964
- featureIds.push({
965
- featureId: featureOption.id,
966
- });
967
- }
968
- });
969
- return featureIds;
970
- }
971
- /**
972
- * Sets the newly created tenant information.
973
- * @param {NewTenantInfo} newTenantInfo
974
- */
975
- setNewTenantInfo(newTenantInfo) {
976
- this.newTenantInfo = newTenantInfo;
977
- }
978
- /**
979
- * Returns the newly created tenant information.
980
- */
981
- get getNewTenantInfo() {
982
- return this.newTenantInfo;
983
- }
984
- /**
985
- * Sets tenant function type.
986
- * @param {TenantFunctionType} tenantFunctionType -tenant function type.
987
- */
988
- setTenantFunctionType(tenantFunctionType) {
989
- this.tenantFunctionType = tenantFunctionType;
990
- }
991
- /**
992
- * Returns tenant function type.
993
- * @return {TenantFunctionType} -tenant function type.
994
- */
995
- getTenantFunctionType() {
996
- return this.tenantFunctionType;
997
- }
998
- /**
999
- * Stores the newly created role information.
1000
- * @param {RoleInfo} newlyCreatedRole -create role information.
1001
- */
1002
- setNewlyCreatedRoleInfo(newlyCreatedRole) {
1003
- this.newlyCreatedRole = newlyCreatedRole;
1004
- }
1005
- /**
1006
- * Returns the newly created role information.
1007
- * @return {RoleInfo} -create role information.
1008
- */
1009
- getNewlyCreatedRoleInfo() {
1010
- return this.newlyCreatedRole;
1011
- }
1012
- /**
1013
- * Posts the edited tenant application form data to server using HttpService for updating the tenant information.
1014
- * @param {CreateTenantPayload} editTenantPayload
1015
- * @return {Observable<CreateTenantResponse>}
1016
- * @memberof TenantApplicationsService
1017
- */
1018
- editTenant(editTenantPayload) {
1019
- return this.httpService
1020
- .putData(`${this.apiBaseUrl}/configurations/app/editTenant`, editTenantPayload)
1021
- .pipe(map((response) => {
1022
- return response;
1023
- }), catchError((error) => {
1024
- throw error;
1025
- }));
1026
- }
1027
- /**
1028
- * Sends update request to the server to update the tenant application status to active/inactive using HttpService and returns the success or failure response.
1029
- * @param {UpdateTenantStatusRequestPayload} updateTenantStatusPayload
1030
- * @return {Observable<UpdateTenantStatusResponse>}
1031
- * @memberof TenantApplicationsService
1032
- */
1033
- updateTenantStatus(updateTenantStatusPayload) {
1034
- return this.httpService
1035
- .putData(`${this.apiBaseUrl}/configurations/app/updateStatus`, updateTenantStatusPayload)
1036
- .pipe(map((response) => {
1037
- return response;
1038
- }), catchError((error) => {
1039
- throw error;
1040
- }));
1041
- }
1042
- /**
1043
- * It generates Feature list from checkbox options generated in form array.
1044
- * @param {CheckboxOption[]} features
1045
- * @return {Features[]}
1046
- * @memberof TenantApplicationsService
1047
- */
1048
- getFeaturesList(features) {
1049
- this.featureList = [];
1050
- features?.forEach((feature) => {
1051
- if (feature.checked)
1052
- this.featureList?.push({
1053
- featureId: feature?.id,
1054
- featureName: feature?.name,
1055
- isDefault: feature?.checked,
1056
- });
1057
- });
1058
- return this.featureList;
1059
- }
1060
- /**
1061
- * Returns sorted role list data.
1062
- * @param {Role[]} roleList
1063
- * @return {Role[]}
1064
- * @memberof TenantApplicationsService
1065
- */
1066
- sortRolesByRoleType(roleList) {
1067
- return roleList.sort((a, b) => a?.viewOrder - b?.viewOrder);
1068
- }
1069
- /**
1070
- * Posts the role details to server using HttpService for deleting the role.
1071
- * @param {DeleteRoleRequestPayload} deleteRoleRequestPayload
1072
- * @return {Observable<DeleteRoleResponse>}
1073
- * @memberof TenantApplicationsService
1074
- */
1075
- deleteRole(deleteRolePayload) {
1076
- return this.httpService
1077
- .putData(`${this.apiBaseUrl}/groups/role/deleteRole`, deleteRolePayload)
1078
- .pipe(map((response) => {
1079
- return response;
1080
- }), catchError((error) => {
1081
- throw error;
1082
- }));
1083
- }
1084
- /**
1085
- * Gets group types from server using HttpService.
1086
- * @param {string} appId
1087
- * @return {Observable<ViewGroupTypeResponse>}
1088
- * @memberof TenantApplicationsService
1089
- */
1090
- getGroupTypes(appId) {
1091
- return this.httpService
1092
- .getData(`${this.apiBaseUrl}/configurations/config/appGroupTypeDetails/${appId}`)
1093
- .pipe(map((response) => {
1094
- return response;
1095
- }), catchError((error) => {
1096
- throw error;
1097
- }));
1098
- }
1099
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsService, deps: [{ token: i2.HttpService }, { token: TenantPermissionsService }, { token: TenantPermissionsMapService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1100
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsService, providedIn: 'root' }); }
1101
- }
1102
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsService, decorators: [{
1103
- type: Injectable,
1104
- args: [{
1105
- providedIn: 'root',
1106
- }]
1107
- }], ctorParameters: function () { return [{ type: i2.HttpService }, { type: TenantPermissionsService }, { type: TenantPermissionsMapService }]; } });
1108
-
1109
- class CreateTenantApplicationComponent {
1110
- constructor(
1111
- // eslint-disable-next-line no-unused-vars
1112
- fileUploadService,
1113
- // eslint-disable-next-line no-unused-vars
1114
- tenantAppService,
1115
- // eslint-disable-next-line no-unused-vars
1116
- sharedService // eslint-disable-next-line no-empty-function
1117
- ) {
1118
- this.fileUploadService = fileUploadService;
1119
- this.tenantAppService = tenantAppService;
1120
- this.sharedService = sharedService;
1121
- this.destroy$ = new Subject();
1122
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1123
- this.constants = screenText;
1124
- this.createTenantTexts = this.constants?.createTenant;
1125
- this.leftButtonLabel = this.createTenantTexts?.label?.leftButtonLabel;
1126
- this.rightButtonLabel = this.createTenantTexts?.label?.rightButtonLabel;
1127
- this.colWidth = { xs: 12, xl: 12, sm: 12, md: 12, lg: 12 };
1128
- this.actionButtonAlign = AlignType.LEFT;
1129
- this.submitFormResponse = new EventEmitter();
1130
- this.formCancel = new EventEmitter();
1131
- this.allowedFileTypes = [
1132
- AllowedFileTypes.JPG,
1133
- AllowedFileTypes.PNG,
1134
- AllowedFileTypes.SVG,
1135
- ];
1136
- this.isAppLogoModified = false;
1137
- }
1138
- ngOnInit() {
1139
- this.tenantFunctionType = this.tenantAppService?.getTenantFunctionType();
1140
- this.selectedTenantInfo =
1141
- this.tenantAppService?.getSelectedTenantInformation();
1142
- this.fileUploadService.setApiBaseUrl(this.tenantAppService?.apiBaseUrl);
1143
- this.getFeatures();
1144
- }
1145
- /**
1146
- * Gets the list of features and updates the form control.
1147
- * @memberof CreateTenantApplicationComponent
1148
- */
1149
- getFeatures() {
1150
- this.tenantAppService
1151
- .getFeatures()
1152
- .pipe(takeUntil(this.destroy$))
1153
- .subscribe({
1154
- next: (response) => {
1155
- if (response?.status) {
1156
- this.featuresOptions = this.tenantAppService.getFeatureOptions(response?.body);
1157
- if (this.tenantFunctionType === TenantFunctionType.EDIT)
1158
- this.featuresOptions?.forEach((option) => {
1159
- if (this.selectedTenantInfo?.features?.some((feature) => feature?.featureId === option?.id)) {
1160
- option.checked = true;
1161
- }
1162
- });
1163
- this.getApplicationTypes();
1164
- }
1165
- },
1166
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1167
- error: (error) => {
1168
- this.sharedService.handleErrors(error, this.createTenantTexts?.errors);
1169
- },
1170
- });
1171
- }
1172
- /**
1173
- * Gets the application/tenant types and updates the form control.
1174
- * @memberof CreateTenantApplicationComponent
1175
- */
1176
- getApplicationTypes() {
1177
- this.tenantAppService
1178
- .getApplicationTypes()
1179
- .pipe(takeUntil(this.destroy$))
1180
- .subscribe({
1181
- next: (response) => {
1182
- if (response?.status) {
1183
- this.appTypeOptions =
1184
- this.tenantAppService.getApplicationTypeOptions(response?.body);
1185
- if (this.tenantFunctionType === TenantFunctionType.EDIT) {
1186
- this.appTypeOptions?.forEach((radioOption) => {
1187
- if (radioOption?.id === this.selectedTenantInfo?.appType) {
1188
- radioOption.checked = true;
1189
- this.selectedAppTypeOption = radioOption;
1190
- }
1191
- else {
1192
- radioOption.checked = false;
1193
- }
1194
- });
1195
- }
1196
- this.initializeCreateTenantFormGroup();
1197
- }
1198
- },
1199
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1200
- error: (error) => {
1201
- this.sharedService.handleErrors(error, this.createTenantTexts?.errors);
1202
- },
1203
- });
1204
- }
1205
- /**
1206
- * Initialize the create tenant form group array.
1207
- * @memberof CreateTenantApplicationComponent
1208
- */
1209
- initializeCreateTenantFormGroup() {
1210
- this.createTenantFormGroup = {
1211
- formGroup: [
1212
- {
1213
- legend: '',
1214
- controls: [
1215
- {
1216
- type: FormControlType.INPUT,
1217
- label: this.createTenantTexts?.label?.appTitle + '*',
1218
- controlName: 'appTitle',
1219
- value: this.tenantFunctionType === TenantFunctionType.EDIT
1220
- ? this.selectedTenantInfo?.appTitle
1221
- : '',
1222
- validation: [
1223
- Validators.required,
1224
- Validators.maxLength(TenantsValidationPatterns.appTitleMaxLength),
1225
- ],
1226
- supportMessage: this.createTenantTexts?.supportText?.appTitle,
1227
- requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1228
- maxErrorMessage: this.createTenantTexts?.message?.error?.limit?.appTitleMaxChars,
1229
- ariaLabel: this.createTenantTexts?.label?.ariaLabel?.appTitle,
1230
- ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.appTitle,
1231
- },
1232
- {
1233
- type: FormControlType.INPUT,
1234
- label: `${this.createTenantTexts?.label?.appId}${this.tenantFunctionType === TenantFunctionType.EDIT ? '' : '*'}`,
1235
- controlName: 'appId',
1236
- value: this.tenantFunctionType === TenantFunctionType.EDIT
1237
- ? this.selectedTenantInfo?.appId
1238
- : '',
1239
- validation: [
1240
- Validators.required,
1241
- Validators.maxLength(TenantsValidationPatterns.appIdMaxLength),
1242
- Validators.pattern(TenantsValidationPatterns.alphaNumeric),
1243
- ],
1244
- disabled: this.tenantFunctionType === TenantFunctionType.EDIT,
1245
- supportMessage: this.tenantFunctionType === TenantFunctionType.EDIT
1246
- ? ''
1247
- : this.createTenantTexts?.supportText?.appId,
1248
- requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1249
- maxErrorMessage: this.createTenantTexts?.message?.error?.limit?.appIdMaxChars,
1250
- patternErrorMessage: this.createTenantTexts?.message?.error?.pattern?.appId,
1251
- ariaLabel: this.createTenantTexts?.label?.ariaLabel?.appId,
1252
- ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.appId,
1253
- },
1254
- {
1255
- type: FormControlType?.FILE_UPLOAD,
1256
- label: this.createTenantTexts?.label?.appLogo + '*',
1257
- controlName: 'appLogo',
1258
- requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1259
- value: this.tenantFunctionType === TenantFunctionType.EDIT
1260
- ? this.selectedTenantInfo?.appLogo
1261
- : '',
1262
- placeholder: '',
1263
- isFileSelected: this.tenantFunctionType === TenantFunctionType.EDIT,
1264
- supportMessage: this.createTenantTexts?.supportText?.appLogo,
1265
- validation: [Validators.required],
1266
- ariaLabel: this.createTenantTexts?.label?.ariaLabel?.appLogo,
1267
- ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.appLogo,
1268
- isMultiFileUpload: false,
1269
- maxUploadFileSize: 2,
1270
- maxFileSizeErrorMessage: this.createTenantTexts?.message?.error?.limit?.appLogoMaxSize,
1271
- allowedFileTypeErrorMessage: this.createTenantTexts?.message?.error?.invalidFile,
1272
- allowedFileTypes: this.allowedFileTypes,
1273
- },
1274
- {
1275
- type: FormControlType.INPUT,
1276
- label: this.createTenantTexts?.label?.appHeading + '*',
1277
- controlName: 'appHeading',
1278
- value: this.tenantFunctionType === TenantFunctionType.EDIT
1279
- ? this.selectedTenantInfo?.appHeading
1280
- : '',
1281
- validation: [
1282
- Validators.required,
1283
- Validators.maxLength(TenantsValidationPatterns.appHeadingMaxLength),
1284
- ],
1285
- supportMessage: this.createTenantTexts?.supportText?.appHeading,
1286
- requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1287
- maxErrorMessage: this.createTenantTexts?.message?.error?.limit
1288
- ?.appHeadingMaxChars,
1289
- patternErrorMessage: this.createTenantTexts?.message?.error?.pattern?.email,
1290
- ariaLabel: this.createTenantTexts?.label?.ariaLabel?.appHeading,
1291
- ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.appHeading,
1292
- },
1293
- {
1294
- type: FormControlType.TEXT_AREA,
1295
- label: this.createTenantTexts?.label?.appDescription + '*',
1296
- controlName: 'appDescription',
1297
- value: this.tenantFunctionType === TenantFunctionType.EDIT
1298
- ? this.selectedTenantInfo?.appDescription
1299
- : '',
1300
- validation: [
1301
- Validators.required,
1302
- Validators.maxLength(TenantsValidationPatterns.appDescriptionMaxLength),
1303
- ],
1304
- supportMessage: this.createTenantTexts?.supportText?.appDescription,
1305
- requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1306
- maxErrorMessage: this.createTenantTexts?.message?.error?.limit
1307
- ?.appDescriptionMaxChars,
1308
- maxCharCount: TenantsValidationPatterns.appDescriptionMaxLength,
1309
- ariaLabel: this.createTenantTexts?.label?.ariaLabel?.appDescription,
1310
- ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById
1311
- ?.appDescription,
1312
- ariaMultiline: true,
1313
- isResize: true,
1314
- },
1315
- {
1316
- type: FormControlType.COLOR_PICKER,
1317
- label: this.createTenantTexts?.label?.appBgColor + '*',
1318
- controlName: 'backgroundColor',
1319
- value: '',
1320
- defaultColor: this.tenantFunctionType === TenantFunctionType.EDIT
1321
- ? this.selectedTenantInfo?.backgroundColor
1322
- : '',
1323
- placeholder: '',
1324
- supportMessage: this.createTenantTexts?.supportText?.appBgColor,
1325
- validation: [Validators.required, validColorValidator()],
1326
- requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1327
- invalidColorErrorMessage: this.createTenantTexts?.message?.error?.invalidColor,
1328
- ariaLabel: this.createTenantTexts?.supportText?.appBgColor,
1329
- ariaDescribedById: this.createTenantTexts?.supportText?.appBgColor,
1330
- },
1331
- {
1332
- type: FormControlType.INPUT,
1333
- label: this.createTenantTexts?.label?.appHelpLink + '*',
1334
- controlName: 'appHelpLink',
1335
- value: this.tenantFunctionType === TenantFunctionType.EDIT
1336
- ? this.selectedTenantInfo?.appHelpLink
1337
- : '',
1338
- validation: [
1339
- Validators.required,
1340
- Validators.pattern(TenantsValidationPatterns.url),
1341
- ],
1342
- supportMessage: this.createTenantTexts?.supportText?.appHelpLink,
1343
- requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1344
- patternErrorMessage: this.createTenantTexts?.message?.error?.pattern?.appHelpLink,
1345
- ariaLabel: this.createTenantTexts?.label?.ariaLabel?.appHelpLink,
1346
- ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.appHelpLink,
1347
- },
1348
- {
1349
- type: FormControlType.CHECKBOX,
1350
- label: this.createTenantTexts?.label?.featuresList + '*',
1351
- controlName: 'features',
1352
- checkboxOptions: this.featuresOptions,
1353
- minSelectionRequired: 1,
1354
- ariaLabel: this.createTenantTexts?.label?.ariaLabel?.featuresList,
1355
- ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.featuresList,
1356
- supportMessage: this.createTenantTexts?.supportText?.featuresList,
1357
- requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1358
- validation: [Validators.required],
1359
- },
1360
- {
1361
- type: FormControlType.INPUT,
1362
- label: this.createTenantTexts?.label?.domainURL + '*',
1363
- controlName: 'appDomainUrl',
1364
- value: this.tenantFunctionType === TenantFunctionType.EDIT
1365
- ? this.selectedTenantInfo?.appDomainUrl
1366
- : '',
1367
- validation: [
1368
- Validators.required,
1369
- Validators.pattern(TenantsValidationPatterns.url),
1370
- ],
1371
- supportMessage: this.createTenantTexts?.supportText?.domainURL,
1372
- requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1373
- patternErrorMessage: this.createTenantTexts?.message?.error?.pattern?.appDomainUrl,
1374
- ariaLabel: this.createTenantTexts?.label?.ariaLabel?.domainURL,
1375
- ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.domainURL,
1376
- },
1377
- {
1378
- type: FormControlType.RADIO,
1379
- label: `${this.createTenantTexts?.label?.appType}${this.tenantFunctionType === TenantFunctionType.EDIT ? '' : '*'}`,
1380
- controlName: 'appType',
1381
- value: this.tenantFunctionType === TenantFunctionType.EDIT
1382
- ? this.selectedTenantInfo?.appType
1383
- : '',
1384
- disabled: this.tenantFunctionType === TenantFunctionType.EDIT,
1385
- radioOptions: this.appTypeOptions,
1386
- validation: [Validators.required],
1387
- requiredErrorMessage: this.createTenantTexts?.message?.error?.required,
1388
- ariaLabel: this.createTenantTexts?.label?.ariaLabel?.appType,
1389
- ariaDescribedById: this.createTenantTexts?.label?.ariaDescribedById?.appType,
1390
- },
1391
- ],
1392
- },
1393
- ],
1394
- };
1395
- }
1396
- /**
1397
- * Creates Payload and gets presigned url for file upload on form submission.
1398
- * @param {FormGroup[]} form
1399
- * @memberof CreateTenantApplicationComponent
1400
- */
1401
- onCreateTenantFormSubmit(form) {
1402
- form[0]?.markAllAsTouched();
1403
- if (form[0].status === FormStatus.VALID) {
1404
- this.createTenantPayload = this.getCreateTenantPayload(form[0].getRawValue());
1405
- if (this.tenantFunctionType === TenantFunctionType.EDIT &&
1406
- (!this.isAppLogoModified || !this.file)) {
1407
- this.editTenant();
1408
- }
1409
- else if (this.file) {
1410
- this.getFileUploadPresignedUrl(this.file, form[0]?.controls['appId']?.value);
1411
- }
1412
- else {
1413
- this.createTenant();
1414
- }
1415
- }
1416
- }
1417
- /**
1418
- * Creates a new tenant on form submission.
1419
- * @memberof CreateTenantApplicationComponent
1420
- */
1421
- createTenant() {
1422
- this.tenantAppService
1423
- .createTenant(this.createTenantPayload)
1424
- .pipe(takeUntil(this.destroy$))
1425
- .subscribe({
1426
- next: (response) => {
1427
- if (response.status) {
1428
- this.tenantAppService.setNewTenantInfo(this.createTenantPayload?.payload);
1429
- this.submitFormResponse.emit(response);
1430
- }
1431
- },
1432
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1433
- error: (error) => {
1434
- this.sharedService.handleErrors(error, this.createTenantTexts?.errors);
1435
- },
1436
- });
1437
- }
1438
- /**
1439
- * Updates the modified tenant information on form submission.
1440
- * @memberof CreateTenantApplicationComponent
1441
- */
1442
- editTenant() {
1443
- this.tenantAppService
1444
- .editTenant(this.createTenantPayload)
1445
- .pipe(takeUntil(this.destroy$))
1446
- .subscribe({
1447
- next: (response) => {
1448
- if (response?.status) {
1449
- this.updatedTenantBasicInfo = this.createTenantPayload?.payload;
1450
- this.updatedTenantBasicInfo.features =
1451
- this.tenantAppService.getFeaturesList(this.featuresOptions);
1452
- this.tenantAppService.setSelectedTenantInformation(this.updatedTenantBasicInfo);
1453
- this.submitFormResponse.emit(response);
1454
- }
1455
- },
1456
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1457
- error: (error) => {
1458
- this.sharedService.handleErrors(error, this.createTenantTexts?.errors);
1459
- },
1460
- });
1461
- }
1462
- /**
1463
- * Constructs create tenant payload from the form data and returns.
1464
- * @param {*} formData
1465
- * @return {CreateTenantRequestPayload}
1466
- * @memberof CreateTenantApplicationComponent
1467
- */
1468
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1469
- getCreateTenantPayload(formData) {
1470
- const payload = {
1471
- payload: {
1472
- appTitle: formData?.appTitle,
1473
- appId: formData?.appId,
1474
- appHeading: formData?.appHeading,
1475
- appDescription: formData?.appDescription,
1476
- backgroundColor: formData?.backgroundColor,
1477
- appLogo: formData?.appLogo,
1478
- appDomainUrl: formData?.appDomainUrl,
1479
- appHelpLink: formData?.appHelpLink,
1480
- appType: this.selectedAppTypeOption?.id,
1481
- features: this.tenantAppService.getFeatureIds(this.featuresOptions),
1482
- },
1483
- };
1484
- return payload;
1485
- }
1486
- /**
1487
- * Gets create tenant form group reference and disables default features.
1488
- * @param {FormGroup[]} form
1489
- * @memberof CreateTenantApplicationComponent
1490
- */
1491
- getCreateTenantFormGroupRef(form) {
1492
- this.createTenantFormGroupRef = form[0];
1493
- const featuresFormArray = this.createTenantFormGroupRef?.controls['features'];
1494
- this.featuresOptions?.forEach((option, index) => {
1495
- if (option?.disabled) {
1496
- featuresFormArray?.at(index).disable();
1497
- }
1498
- });
1499
- }
1500
- /**
1501
- * Updates createTenantFormGroupRef on add or edit tenant form change event.
1502
- * @param {FormGroup[]} form
1503
- * @memberof CreateTenantApplicationComponent
1504
- */
1505
- onCreateTenantFormChange(form) {
1506
- this.createTenantFormGroupRef = form[0];
1507
- this.isAppLogoModified =
1508
- this.createTenantFormGroupRef?.controls['appLogo']?.dirty &&
1509
- this.tenantFunctionType === TenantFunctionType.EDIT;
1510
- }
1511
- /**
1512
- * Emits form cancel event.
1513
- * @memberof CreateTenantApplicationComponent
1514
- */
1515
- onFormCancel() {
1516
- this.formCancel.emit();
1517
- }
1518
- /**
1519
- * Gets the selected file when the file is browsed and on formFileUpload event is triggered.
1520
- * @param {File | FileList} file
1521
- */
1522
- onFormFileUpload(file) {
1523
- this.file = file;
1524
- }
1525
- /**
1526
- * Gets pre-signed URL to upload the selected file to AWS S3 bucket.
1527
- * @param {File | FileList} file
1528
- */
1529
- getFileUploadPresignedUrl(file, appId) {
1530
- this.fileUploadService
1531
- .getFileUploadPresignedUrl(file, appId)
1532
- .pipe(takeUntil(this.destroy$))
1533
- .subscribe({
1534
- next: (response) => {
1535
- this.fileUploadPresignedUrl = response?.body;
1536
- if (this.fileUploadPresignedUrl)
1537
- this.uploadFileToS3(file);
1538
- },
1539
- // 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
1540
- error: (error) => {
1541
- this.sharedService.handleErrors(error, this.createTenantTexts?.errors);
1542
- },
1543
- });
1544
- }
1545
- /**
1546
- * Uploads the file to AWS S3 bucket and submit the form data to API to create new tenant.
1547
- * @param {File | FileList} file
1548
- */
1549
- uploadFileToS3(file) {
1550
- this.fileUploadService
1551
- .uploadFileToS3(this.fileUploadPresignedUrl, file)
1552
- .pipe(takeUntil(this.destroy$))
1553
- .subscribe({
1554
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
1555
- next: (response) => {
1556
- this.fileUploadService.setFileUploadStatus(true);
1557
- // eslint-disable-next-line no-unused-expressions
1558
- this.tenantFunctionType === TenantFunctionType.EDIT
1559
- ? this.editTenant()
1560
- : this.createTenant();
1561
- },
1562
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
1563
- error: (error) => {
1564
- this.fileUploadService.setFileUploadStatus(false);
1565
- this.sharedService.handleErrors(error, this.createTenantTexts?.errors);
1566
- },
1567
- });
1568
- }
1569
- /**
1570
- * Triggers when the color picker values has been changed.
1571
- * @param {string} color
1572
- */
1573
- onColorPickerChange(color) {
1574
- this.selectedColor = color;
1575
- }
1576
- /**
1577
- * Triggers when the radio option has been changed.
1578
- * @param {RadioOption} radioOption
1579
- */
1580
- onRadioOptionSelected(radioOption) {
1581
- this.selectedAppTypeOption = radioOption;
1582
- }
1583
- /**
1584
- * Implementation of ngOnDestroy lifecycle hook method to unsubscribe the open observable subscriptions.
1585
- * @memberof CreateTenantApplicationComponent
1586
- */
1587
- ngOnDestroy() {
1588
- this.destroy$.next(true);
1589
- this.destroy$.unsubscribe();
1590
- }
1591
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateTenantApplicationComponent, deps: [{ token: i1.FileUploadService }, { token: TenantApplicationsService }, { token: i2$1.SharedService }], target: i0.ɵɵFactoryTarget.Component }); }
1592
- 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-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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DynamicFormComponent, selector: "ieeesa-dynamic-form", inputs: ["formGroups", "submitResponse", "searchResponse", "colWidth", "isLegendVisible", "rightButtonLabel", "leftButtonLabel", "isSubmitButtonDisabled", "isLeftButtonDisabled", "isLeftButtonNeeded", "actionButtonAlign"], outputs: ["formSubmit", "formChange", "formInput", "formLeftButtonClicked", "formSearchApply", "formGroupsReference", "dropdownChange", "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 }); }
1593
- }
1594
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateTenantApplicationComponent, decorators: [{
1595
- type: Component,
1596
- 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-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"] }]
1597
- }], ctorParameters: function () { return [{ type: i1.FileUploadService }, { type: TenantApplicationsService }, { type: i2$1.SharedService }]; }, propDecorators: { dynamicFormComponent: [{
1598
- type: ViewChild,
1599
- args: [DynamicFormComponent]
1600
- }], submitFormResponse: [{
1601
- type: Output
1602
- }], formCancel: [{
1603
- type: Output
1604
- }] } });
1605
-
1606
- class ViewTenantsListComponent {
1607
- constructor(
1608
- // eslint-disable-next-line no-unused-vars
1609
- dialog,
1610
- // eslint-disable-next-line no-unused-vars
1611
- alertService,
1612
- // eslint-disable-next-line no-unused-vars
1613
- breakpointObserverService,
1614
- // eslint-disable-next-line no-unused-vars
1615
- sharedService,
1616
- // eslint-disable-next-line no-unused-vars
1617
- tenantApplicationsService,
1618
- // eslint-disable-next-line no-unused-vars
1619
- router) {
1620
- this.dialog = dialog;
1621
- this.alertService = alertService;
1622
- this.breakpointObserverService = breakpointObserverService;
1623
- this.sharedService = sharedService;
1624
- this.tenantApplicationsService = tenantApplicationsService;
1625
- this.router = router;
1626
- this.destroy$ = new Subject();
1627
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1628
- this.constants = screenText;
1629
- this.viewTenantsConstants = this.constants?.viewTenants;
1630
- this.isMobileView = false;
1631
- this.tenantsPageInfo = {
1632
- tenantsTitle: '',
1633
- };
1634
- this.apiBaseURL = '';
1635
- this.defaultSortedColumn = ViewTenantsColumnSchemaDef.APP_ID;
1636
- this.createTenant = new EventEmitter();
1637
- this.viewTenantsDetails = new EventEmitter();
1638
- this.tableActions = {
1639
- isPaginationNeeded: true,
1640
- };
1641
- this.tableColumns = this.viewTenantsConstants?.tableColumns;
1642
- this.emptyFieldValueReplacedBy = this.viewTenantsConstants?.emptyFieldValueReplacedBy;
1643
- this.paginatorConfig = {
1644
- recordsPerPage: this.viewTenantsConstants?.pageSizeOptions[0],
1645
- pageSizeOptions: this.viewTenantsConstants.pageSizeOptions,
1646
- totalRecords: 0,
1647
- };
1648
- this.permissionType = PermissionType;
1649
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1650
- this.createTenantScreenTexts = this.constants?.createTenant;
1651
- this.defaultColumnSortDirection = true;
1652
- this.breakpointObserverService
1653
- .getBreakpoint()
1654
- .pipe(takeUntil(this.destroy$))
1655
- .subscribe((result) => {
1656
- this.isMobileView = result.matches;
1657
- });
1658
- }
1659
- /**
1660
- * Sets the user permissions, router config path, base API URL, table column schema and gets the tenants list.
1661
- * @memberof ViewTenantsListComponent
1662
- */
1663
- ngOnInit() {
1664
- this.userTenantsPermissions =
1665
- this.tenantApplicationsService?.filterPermission(this.userPermissions);
1666
- this.tenantApplicationsService?.setAppConfig(this.apiBaseURL, this.userPermissions);
1667
- this.tenantsPageInfo = {
1668
- tenantsTitle: this.viewTenantsConstants?.tenantsTitle,
1669
- };
1670
- this.routePaths = this.routePaths ?? this.constants?.routeConfigPath;
1671
- this.sharedService?.setRoutePaths(this.routePaths);
1672
- this.configureTableInfo();
1673
- this.defaultSortedColumn = this.columnSchema[0].columnDef;
1674
- this.getTenantsAndInitializeTableView(this.getTenantsPayload());
1675
- }
1676
- /**
1677
- * Validates permission based access for provided feature.
1678
- * @param {PermissionType} permissionType
1679
- * @return {boolean}
1680
- * @memberof ViewTenantsListComponent
1681
- */
1682
- validateAccess(permissionType) {
1683
- return this.tenantApplicationsService.validateAccess(permissionType, this.userTenantsPermissions);
1684
- }
1685
- /**
1686
- * Configures table schema to display the tenants in table view.
1687
- * @memberof ViewTenantsListComponent
1688
- */
1689
- configureTableInfo() {
1690
- this.columnSchema = [
1691
- {
1692
- id: 1,
1693
- columnDef: ViewTenantsColumnSchemaDef.APP_ID,
1694
- heading: this.tableColumns?.appId,
1695
- columnType: TableColumnType.LINK,
1696
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1697
- cellData: (element) => `${element.appId}`,
1698
- isSortableColumn: true,
1699
- },
1700
- {
1701
- id: 2,
1702
- columnDef: ViewTenantsColumnSchemaDef.APP_TITLE,
1703
- heading: this.tableColumns?.appTitle,
1704
- columnType: TableColumnType.TEXT,
1705
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1706
- cellData: (element) => `${element.appTitle ?? this.emptyFieldValueReplacedBy}`,
1707
- isSortableColumn: true,
1708
- },
1709
- {
1710
- id: 3,
1711
- columnDef: ViewTenantsColumnSchemaDef.APP_DESCRIPTION,
1712
- heading: this.tableColumns?.appDescription,
1713
- columnType: TableColumnType.TEXT,
1714
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1715
- cellData: (element) => `${element.appDescription ?? this.emptyFieldValueReplacedBy}`,
1716
- },
1717
- {
1718
- id: 4,
1719
- columnDef: ViewTenantsColumnSchemaDef.FEATURES,
1720
- heading: this.tableColumns?.features,
1721
- columnType: TableColumnType.TEXT,
1722
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1723
- cellData: (element) => `${element?.features && element?.features?.length > 0
1724
- ? this.formatFeaturesName(element?.features)
1725
- : this.emptyFieldValueReplacedBy}`,
1726
- },
1727
- {
1728
- id: 5,
1729
- columnDef: ViewTenantsColumnSchemaDef.STATUS,
1730
- heading: this.tableColumns?.status,
1731
- columnType: TableColumnType.TEXT,
1732
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1733
- cellData: (element) => `${element.status ? TenantStatus.ACTIVE : TenantStatus.INACTIVE}`,
1734
- },
1735
- ];
1736
- }
1737
- /**
1738
- * Format the features name in to single sentence with comma separated.
1739
- * @memberof ViewTenantsListComponent
1740
- */
1741
- formatFeaturesName(features) {
1742
- return features
1743
- .map((feature) => {
1744
- // eslint-disable-next-line no-unused-expressions
1745
- return feature.featureName;
1746
- })
1747
- ?.join(', ');
1748
- }
1749
- /**
1750
- * Fetching details of tenants and initialize table view
1751
- * @param {GetTenantsPayload} payload
1752
- * @memberof ViewTenantsListComponent
1753
- */
1754
- getTenantsAndInitializeTableView(payload) {
1755
- this.tenantApplicationsService
1756
- .getTenantsList(payload)
1757
- .pipe(takeUntil(this.destroy$))
1758
- .subscribe({
1759
- next: (response) => {
1760
- this.tableData = response?.body?.appDetails;
1761
- this.paginatorConfig.totalRecords = response?.body
1762
- ?.totalRecords;
1763
- },
1764
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1765
- error: (error) => {
1766
- this.sharedService.handleErrors(error, this.constants?.errors);
1767
- },
1768
- });
1769
- }
1770
- /**
1771
- * Sets the dialog options for create tenant modal and calls openModal method.
1772
- * @return -returns nothing
1773
- * @memberof ViewTenantsListComponent
1774
- */
1775
- openCreateTenantForm() {
1776
- this.tenantApplicationsService.setTenantFunctionType(TenantFunctionType.CREATE);
1777
- const dialogOptions = {
1778
- heading: this.viewTenantsConstants?.addTenant,
1779
- isCloseNeeded: true,
1780
- componentReference: CreateTenantApplicationComponent,
1781
- modalType: ModalType.FORM,
1782
- };
1783
- this.openModal(dialogOptions, 'ieeesa-create-tenant');
1784
- }
1785
- /**
1786
- * Opens modal component with received params and handles form submission success and errors.
1787
- * @param {*} dialogOptions
1788
- * @param {string} [className]
1789
- * @return -returns nothing
1790
- * @memberof ViewTenantsListComponent
1791
- */
1792
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-inferrable-types, no-unused-vars
1793
- openModal(
1794
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1795
- dialogOptions, className) {
1796
- className = className ?? '';
1797
- this.dialogRef = this.dialog?.open(ModalComponent, {
1798
- data: dialogOptions,
1799
- width: '',
1800
- panelClass: ['ieeesa-modal-dialog', className],
1801
- ariaModal: true,
1802
- });
1803
- this.dialogRef?.componentInstance?.submitFormResponse
1804
- .pipe(takeUntil(this.destroy$))
1805
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, no-unused-vars
1806
- .subscribe((result) => {
1807
- this.dialogRef?.close();
1808
- const appTitle = this.tenantApplicationsService.getNewTenantInfo?.appTitle;
1809
- this.sharedService.showAlertMessage(AlertType?.SUCCESS, `${appTitle} ${this.createTenantScreenTexts?.message?.success?.submission}`);
1810
- this.getTenantsAndInitializeTableView(this.getTenantsPayload());
1811
- });
1812
- this.dialogRef?.componentInstance?.formCancel
1813
- .pipe(takeUntil(this.destroy$))
1814
- .subscribe(() => {
1815
- this.dialogRef?.close();
1816
- });
1817
- }
1818
- /**
1819
- * Sorts the tenants by application id or title in ascending or descending.
1820
- * @param {Sort} sort
1821
- * @memberof ViewTenantsListComponent
1822
- */
1823
- onSortTenants(sort) {
1824
- this.defaultSortedColumn = sort.active;
1825
- this.defaultColumnSortDirection =
1826
- sort.direction === TableColumnSortDirection.ASCENDING;
1827
- this.sortConfig = {
1828
- sort: sort,
1829
- isSortedByAscending: this.defaultColumnSortDirection,
1830
- };
1831
- this.getTenantsAndInitializeTableView(this.getTenantsPayload());
1832
- }
1833
- /**
1834
- * Constructs and returns the payload for fetching the tenants list.
1835
- * @returns GetTenantsPayload
1836
- */
1837
- getTenantsPayload() {
1838
- const payload = {
1839
- payload: {
1840
- offset: this.pageEvent?.pageIndex
1841
- ? this.pageEvent?.pageIndex
1842
- : 0,
1843
- pageSize: this.pageEvent?.pageSize
1844
- ? this.pageEvent?.pageSize
1845
- : this.paginatorConfig?.recordsPerPage,
1846
- sortedBy: this.sortConfig?.sort?.active
1847
- ? this.sortConfig?.sort?.active
1848
- : ViewTenantsColumnSchemaDef.APP_ID,
1849
- sortedOrderBy: this.filterSortedOrderBy(this.sortConfig?.isSortedByAscending
1850
- ? this.sortConfig?.isSortedByAscending
1851
- : this.defaultColumnSortDirection),
1852
- },
1853
- };
1854
- return payload;
1855
- }
1856
- /**
1857
- * Returning sorting order according to column definition.
1858
- * @param defaultColumnSortDirection
1859
- * @returns SortOrderBy.ASC | SortOrderBy.DESC
1860
- */
1861
- filterSortedOrderBy(defaultColumnSortDirection) {
1862
- return defaultColumnSortDirection ? SortOrderBy.ASC : SortOrderBy.DESC;
1863
- }
1864
- /**
1865
- * Get the the records according to pagination.
1866
- * @param {{
1867
- * pageOffset: number;
1868
- * pageLimit: number;
1869
- * }} pageEvent
1870
- * @memberof ViewTenantsListComponent
1871
- */
1872
- onTablePaginationChange(pageEvent) {
1873
- this.pageEvent = pageEvent;
1874
- this.getTenantsAndInitializeTableView(this.getTenantsPayload());
1875
- }
1876
- /**
1877
- * Navigates to view tenants detail component.
1878
- * @param {{tenantInfo: TenantBasicInfo}}
1879
- * @memberof ViewTenantsListComponent
1880
- */
1881
- navigateToViewTenantDetails(tenantInfo) {
1882
- if (tenantInfo) {
1883
- this.tenantApplicationsService.setSelectedTenantInformation(tenantInfo);
1884
- }
1885
- if (this.routePaths?.viewTenantDetails)
1886
- this.router.navigate([this.routePaths?.viewTenantDetails], { queryParams: { id: tenantInfo?.appId } });
1887
- else
1888
- this.viewTenantsDetails.emit(tenantInfo);
1889
- }
1890
- /**
1891
- * NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
1892
- * @memberof ViewTenantsListComponent
1893
- * @return -returns nothing
1894
- */
1895
- ngOnDestroy() {
1896
- this.destroy$.next(true);
1897
- this.destroy$.unsubscribe();
1898
- }
1899
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ViewTenantsListComponent, deps: [{ token: i1$1.MatDialog }, { token: i2.AlertsService }, { token: i2.BreakpointObserverService }, { token: i2$1.SharedService }, { token: TenantApplicationsService }, { token: i5.Router }], target: i0.ɵɵFactoryTarget.Component }); }
1900
- 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-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: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7.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", "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", "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 }); }
1901
- }
1902
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ViewTenantsListComponent, decorators: [{
1903
- type: Component,
1904
- 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-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"] }]
1905
- }], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i2.AlertsService }, { type: i2.BreakpointObserverService }, { type: i2$1.SharedService }, { type: TenantApplicationsService }, { type: i5.Router }]; }, propDecorators: { tenantsPageInfo: [{
1906
- type: Input
1907
- }], apiBaseURL: [{
1908
- type: Input
1909
- }], routePaths: [{
1910
- type: Input
1911
- }], userPermissions: [{
1912
- type: Input
1913
- }], defaultSortedColumn: [{
1914
- type: Input
1915
- }], createTenant: [{
1916
- type: Output
1917
- }], viewTenantsDetails: [{
1918
- type: Output
1919
- }] } });
1920
-
1921
- var FeaturePermissionId;
1922
- (function (FeaturePermissionId) {
1923
- // eslint-disable-next-line no-unused-vars
1924
- FeaturePermissionId["MEETINGS_AND_EVENTS"] = "FEATURE_049753e8-ea5c-4fad-adb0-e1456e69c7a5";
1925
- // eslint-disable-next-line no-unused-vars
1926
- FeaturePermissionId["BALLOTS"] = "FEATURE_a0ad3616-20dc-43da-813f-9b76d33f227a";
1927
- })(FeaturePermissionId || (FeaturePermissionId = {}));
1928
-
1929
- class TenantBasicDetailsComponent {
1930
- set tenantDetails(value) {
1931
- this.basicInfo = value;
1932
- this.logo = this.basicInfo?.appLogo;
1933
- this.selectedAppType = this.basicInfo?.appType;
1934
- if (this.basicInfo) {
1935
- this.getAppType();
1936
- this.getFileDownloadPresignedUrls(this.logo);
1937
- }
1938
- }
1939
- constructor(
1940
- // eslint-disable-next-line no-unused-vars
1941
- tenantAppService,
1942
- // eslint-disable-next-line no-unused-vars
1943
- breakpointObserverService,
1944
- // eslint-disable-next-line no-unused-vars
1945
- fileUploadService,
1946
- // eslint-disable-next-line no-unused-vars
1947
- sharedService) {
1948
- this.tenantAppService = tenantAppService;
1949
- this.breakpointObserverService = breakpointObserverService;
1950
- this.fileUploadService = fileUploadService;
1951
- this.sharedService = sharedService;
1952
- this.destroy$ = new Subject();
1953
- this.isMobileView = false;
1954
- this.constants = screenText;
1955
- this.basicDetailTexts = this.constants?.viewTenants?.tenantBasicDetails?.label;
1956
- this.breakpointObserverService
1957
- .getBreakpoint()
1958
- .pipe(takeUntil(this.destroy$))
1959
- .subscribe((result) => {
1960
- this.isMobileView = result?.matches;
1961
- });
1962
- this.tenantAppService.getApplicationType();
1963
- this.fileUploadService.setApiBaseUrl(this.tenantAppService?.apiBaseUrl);
1964
- }
1965
- /**
1966
- * Gets the application types.
1967
- * @memberof TenantBasicDetailsComponent
1968
- */
1969
- getAppType() {
1970
- const appTypes = this.tenantAppService.getApplicationType();
1971
- if (this.basicInfo) {
1972
- const selectedType = appTypes?.find(({ id }) => id === this.basicInfo?.appType);
1973
- this.selectedAppTypeLabel = selectedType?.label;
1974
- }
1975
- }
1976
- /**
1977
- * Retrieves presigned URL for downloading files from Amazon S3 bucket.
1978
- * @memberof TenantBasicDetailsComponent
1979
- */
1980
- getFileDownloadPresignedUrls(fileName) {
1981
- this.fileUploadService
1982
- .getFileDownloadPresignedUrls(fileName)
1983
- .pipe(takeUntil(this.destroy$))
1984
- .subscribe({
1985
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1986
- next: (response) => {
1987
- this.imageUrl = response?.body;
1988
- },
1989
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1990
- error: (error) => {
1991
- this.sharedService.handleErrors(error, this.constants?.viewTenants?.errors);
1992
- },
1993
- });
1994
- }
1995
- /**
1996
- * Performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
1997
- * @memberof ViewTenantDetailsComponent
1998
- */
1999
- ngOnDestroy() {
2000
- this.destroy$?.next(true);
2001
- this.destroy$?.unsubscribe();
2002
- }
2003
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantBasicDetailsComponent, deps: [{ token: TenantApplicationsService }, { token: i2.BreakpointObserverService }, { token: i1.FileUploadService }, { token: i2$1.SharedService }], target: i0.ɵɵFactoryTarget.Component }); }
2004
- 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-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: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ImagePreviewComponent, selector: "ieeesa-image-preview", inputs: ["imageAltText", "imageUrl"] }], encapsulation: i0.ViewEncapsulation.None }); }
2005
- }
2006
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantBasicDetailsComponent, decorators: [{
2007
- type: Component,
2008
- 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-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"] }]
2009
- }], ctorParameters: function () { return [{ type: TenantApplicationsService }, { type: i2.BreakpointObserverService }, { type: i1.FileUploadService }, { type: i2$1.SharedService }]; }, propDecorators: { tenantDetails: [{
2010
- type: Input
2011
- }] } });
2012
-
2013
- class CreateModifyRoleComponent {
2014
- constructor(
2015
- // eslint-disable-next-line no-unused-vars
2016
- tenantAppService,
2017
- // eslint-disable-next-line no-unused-vars
2018
- sharedService,
2019
- // eslint-disable-next-line no-unused-vars
2020
- globalErrorHandlerService // eslint-disable-next-line no-empty-function
2021
- ) {
2022
- this.tenantAppService = tenantAppService;
2023
- this.sharedService = sharedService;
2024
- this.globalErrorHandlerService = globalErrorHandlerService;
2025
- this.destroy$ = new Subject();
2026
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2027
- this.constants = screenText;
2028
- this.createRoleTexts = this.constants?.createRole;
2029
- this.leftButtonLabel = this.createRoleTexts?.label?.leftButtonLabel;
2030
- this.rightButtonLabel = this.createRoleTexts?.label?.rightButtonLabel;
2031
- this.colWidth = { xs: 12, xl: 12, sm: 12, md: 12, lg: 12 };
2032
- this.actionButtonAlign = AlignType.LEFT;
2033
- this.submitFormResponse = new EventEmitter();
2034
- this.formCancel = new EventEmitter();
2035
- }
2036
- ngOnInit() {
2037
- this.tenantFunctionType = this.tenantAppService?.getTenantFunctionType();
2038
- this.selectedTenantInfo =
2039
- this.tenantAppService?.getSelectedTenantInformation();
2040
- this.roleTypeOptions =
2041
- this.tenantAppService?.getRoleTypeOption();
2042
- this.selectedRoleDetails =
2043
- this.tenantAppService?.getSelectedRoleInformation();
2044
- if (this.selectedRoleDetails) {
2045
- this.selectedRole = this.tenantAppService?.roles?.find(({ roleId }) => roleId === this.selectedRoleDetails?.roleId);
2046
- }
2047
- this.initializeCreateRoleFormGroup();
2048
- }
2049
- /**
2050
- * Constructs and returns the role type form field based on credit or edit role.
2051
- * @return {FieldConfig} -role type form field.
2052
- * @memberof CreateModifyRoleComponent
2053
- */
2054
- getRoleTypeField() {
2055
- let roleTypeField;
2056
- if (this.tenantFunctionType === TenantFunctionType.EDIT_ROLE) {
2057
- roleTypeField = {
2058
- type: FormControlType?.TEXT_AREA,
2059
- label: this.createRoleTexts?.label?.roleType,
2060
- controlName: 'roleType',
2061
- isReadonly: true,
2062
- value: this.selectedRole?.roleTypeName,
2063
- ariaMultiline: false,
2064
- ariaLabel: this.createRoleTexts?.label?.ariaLabel?.roleType,
2065
- ariaDescribedById: this.createRoleTexts?.label?.ariaDescribedById?.roleType,
2066
- isResize: true,
2067
- };
2068
- }
2069
- else {
2070
- roleTypeField = {
2071
- type: FormControlType?.SELECT,
2072
- label: this.createRoleTexts?.label?.roleType + '*',
2073
- controlName: 'roleType',
2074
- isSortNeeded: false,
2075
- value: '',
2076
- validation: [Validators.required],
2077
- dropdownOptions: this.roleTypeOptions,
2078
- supportMessage: this.createRoleTexts?.supportText?.roleType,
2079
- requiredErrorMessage: this.createRoleTexts?.message?.error?.required,
2080
- ariaLabel: this.createRoleTexts?.label?.ariaLabel?.roleType,
2081
- ariaDescribedById: this.createRoleTexts?.label?.ariaDescribedById?.roleType,
2082
- };
2083
- }
2084
- return roleTypeField;
2085
- }
2086
- /**
2087
- * Initialize the create/edit role form group array.
2088
- * @memberof CreateModifyRoleComponent
2089
- */
2090
- initializeCreateRoleFormGroup() {
2091
- this.createRoleFormGroup = {
2092
- formGroup: [
2093
- {
2094
- legend: '',
2095
- controls: [
2096
- {
2097
- type: FormControlType.TEXT_AREA,
2098
- label: this.createRoleTexts?.label?.appTitle,
2099
- controlName: 'appTitle',
2100
- value: this.selectedTenantInfo?.appTitle,
2101
- ariaLabel: this.createRoleTexts?.label?.ariaLabel?.appTitle,
2102
- ariaDescribedById: this.createRoleTexts?.label?.ariaDescribedById?.appTitle,
2103
- isReadonly: true,
2104
- ariaMultiline: false,
2105
- isResize: true,
2106
- },
2107
- this.getRoleTypeField(),
2108
- {
2109
- type: FormControlType.INPUT,
2110
- label: this.createRoleTexts?.label?.roleName + '*',
2111
- controlName: 'roleName',
2112
- value: this.tenantFunctionType === TenantFunctionType.EDIT_ROLE
2113
- ? this.selectedRole?.roleName
2114
- : '',
2115
- validation: [
2116
- Validators.required,
2117
- Validators.maxLength(RolesValidation.roleNameMaxLength),
2118
- ],
2119
- supportMessage: this.createRoleTexts?.supportText?.roleName,
2120
- requiredErrorMessage: this.createRoleTexts?.message?.error?.required,
2121
- maxErrorMessage: this.createRoleTexts?.message?.error?.limit?.roleNameMaxChars,
2122
- ariaLabel: this.createRoleTexts?.label?.ariaLabel?.roleName,
2123
- ariaDescribedById: this.createRoleTexts?.label?.ariaDescribedById?.roleName,
2124
- },
2125
- ],
2126
- },
2127
- ],
2128
- };
2129
- }
2130
- /**
2131
- * Gets create/edit role form group reference.
2132
- * @param {FormGroup[]} form
2133
- * @memberof CreateModifyRoleComponent
2134
- */
2135
- getCreateModifyRoleFormGroupRef(form) {
2136
- this.createModifyRoleFormGroupRef = form[0];
2137
- }
2138
- /**
2139
- * Updates createModifyRoleFormGroupRef on add role form change event.
2140
- * @param {FormGroup[]} form
2141
- * @memberof CreateModifyRoleComponent
2142
- */
2143
- onCreateModifyRoleFormChange(form) {
2144
- this.createModifyRoleFormGroupRef = form[0];
2145
- }
2146
- /**
2147
- * Creates a new role on form submission and the form is valid.
2148
- * @param {FormGroup[]} form
2149
- * @memberof CreateModifyRoleComponent
2150
- */
2151
- onCreateModifyRoleFormSubmit(form) {
2152
- form[0]?.markAllAsTouched();
2153
- if (form[0].status === FormStatus$1.VALID) {
2154
- this.createModifyRolePayload = this.getCreateModifyRolePayload(form[0].getRawValue());
2155
- // eslint-disable-next-line no-unused-expressions
2156
- this.tenantFunctionType === TenantFunctionType.EDIT_ROLE
2157
- ? this.editRole()
2158
- : this.createRole();
2159
- }
2160
- }
2161
- /**
2162
- * Constructs create/edit role payload from the form data and returns.
2163
- * @param {*} formData
2164
- * @return {CreateModifyRoleRequestPayload}
2165
- * @memberof CreateModifyRoleComponent
2166
- */
2167
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2168
- getCreateModifyRolePayload(formData) {
2169
- const payload = {
2170
- payload: {
2171
- appId: this.selectedTenantInfo?.appId,
2172
- roleName: formData?.roleName,
2173
- },
2174
- };
2175
- if (this.tenantFunctionType === TenantFunctionType.EDIT_ROLE) {
2176
- payload.payload.roleId = this.selectedRole?.roleId;
2177
- }
2178
- else {
2179
- payload.payload.roleType = formData?.roleType?.id;
2180
- }
2181
- return payload;
2182
- }
2183
- /**
2184
- * Post the creates new role form data to the server on form submission to create a new role.
2185
- * @param {CreateRoleRequestPayload} createModifyRolePayload
2186
- * @memberof CreateModifyRoleComponent
2187
- */
2188
- createRole() {
2189
- this.tenantAppService
2190
- .createRole(this.createModifyRolePayload)
2191
- .pipe(takeUntil(this.destroy$))
2192
- .subscribe({
2193
- next: (response) => {
2194
- if (response.status) {
2195
- this.tenantAppService.setNewlyCreatedRoleInfo(this.createModifyRolePayload?.payload);
2196
- this.submitFormResponse.emit(response);
2197
- }
2198
- },
2199
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2200
- error: (error) => {
2201
- this.handleErrors(error);
2202
- },
2203
- });
2204
- }
2205
- /**
2206
- * Post the edited role form data to server on form submission to update the selected role information.
2207
- * @param {CreateModifyRoleRequestPayload} createModifyRolePayload
2208
- * @memberof CreateModifyRoleComponent
2209
- */
2210
- editRole() {
2211
- this.tenantAppService
2212
- .editRole(this.createModifyRolePayload)
2213
- .pipe(takeUntil(this.destroy$))
2214
- .subscribe({
2215
- next: (response) => {
2216
- if (response.status) {
2217
- this.tenantAppService.setNewlyCreatedRoleInfo(this.createModifyRolePayload?.payload);
2218
- this.submitFormResponse.emit(response);
2219
- }
2220
- },
2221
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2222
- error: (error) => {
2223
- this.handleErrors(error);
2224
- },
2225
- });
2226
- }
2227
- /**
2228
- * Captures the server side errors and handles it based on the custom or Http errors.
2229
- * @param {HttpErrorResponse} error
2230
- * @return -returns nothing
2231
- * @memberof CreateModifyRoleComponent
2232
- */
2233
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2234
- handleErrors(error) {
2235
- const errorCodes = error?.error?.body?.errorCodes;
2236
- if (Array.isArray(errorCodes) && !error?.error?.status) {
2237
- if (errorCodes[0] === '3012') {
2238
- const roleName = this.createModifyRolePayload?.payload?.roleName;
2239
- const errorMessage = this.sharedService?.parseErrorMessage(errorCodes, this.createRoleTexts?.errors);
2240
- this.sharedService.showAlertMessage(AlertType.ERROR, `${roleName} ${errorMessage}`);
2241
- }
2242
- }
2243
- else if (error && error instanceof HttpErrorResponse) {
2244
- this.globalErrorHandlerService?.handleError(error);
2245
- }
2246
- }
2247
- /**
2248
- * Emits form cancel event.
2249
- * @memberof CreateModifyRoleComponent
2250
- */
2251
- onFormCancel() {
2252
- this.formCancel.emit();
2253
- }
2254
- /**
2255
- * Implementation of ngOnDestroy lifecycle hook method to unsubscribe the open observable subscriptions.
2256
- * @memberof CreateModifyRoleComponent
2257
- */
2258
- ngOnDestroy() {
2259
- this.destroy$.next(true);
2260
- this.destroy$.unsubscribe();
2261
- }
2262
- 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: i2.GlobalErrorHandlerService }], target: i0.ɵɵFactoryTarget.Component }); }
2263
- 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-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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DynamicFormComponent, selector: "ieeesa-dynamic-form", inputs: ["formGroups", "submitResponse", "searchResponse", "colWidth", "isLegendVisible", "rightButtonLabel", "leftButtonLabel", "isSubmitButtonDisabled", "isLeftButtonDisabled", "isLeftButtonNeeded", "actionButtonAlign"], outputs: ["formSubmit", "formChange", "formInput", "formLeftButtonClicked", "formSearchApply", "formGroupsReference", "dropdownChange", "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 }); }
2264
- }
2265
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateModifyRoleComponent, decorators: [{
2266
- type: Component,
2267
- 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-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"] }]
2268
- }], ctorParameters: function () { return [{ type: TenantApplicationsService }, { type: i2$1.SharedService }, { type: i2.GlobalErrorHandlerService }]; }, propDecorators: { dynamicFormComponent: [{
2269
- type: ViewChild,
2270
- args: [DynamicFormComponent]
2271
- }], submitFormResponse: [{
2272
- type: Output
2273
- }], formCancel: [{
2274
- type: Output
2275
- }] } });
2276
-
2277
- /* eslint-disable no-unused-vars */
2278
- var RoleMenuAction;
2279
- (function (RoleMenuAction) {
2280
- RoleMenuAction[RoleMenuAction["EDIT_ROLE"] = 1] = "EDIT_ROLE";
2281
- RoleMenuAction[RoleMenuAction["DELETE_ROLE"] = 2] = "DELETE_ROLE";
2282
- })(RoleMenuAction || (RoleMenuAction = {}));
2283
-
2284
- /* eslint-disable no-unused-vars */
2285
- var RoleAndPermissionsTableType;
2286
- (function (RoleAndPermissionsTableType) {
2287
- RoleAndPermissionsTableType["ROLE"] = "ROLE";
2288
- RoleAndPermissionsTableType["PERMISSION"] = "PERMISSION";
2289
- })(RoleAndPermissionsTableType || (RoleAndPermissionsTableType = {}));
2290
-
2291
- class RolesAndPermissionsMappingComponent {
2292
- constructor(
2293
- // eslint-disable-next-line no-unused-vars, no-empty-function, @typescript-eslint/no-unused-vars
2294
- tenantAppService,
2295
- // eslint-disable-next-line no-unused-vars
2296
- sharedService,
2297
- // eslint-disable-next-line no-unused-vars
2298
- elementRef,
2299
- // eslint-disable-next-line no-unused-vars
2300
- formUtilityService // eslint-disable-next-line no-empty-function
2301
- ) {
2302
- this.tenantAppService = tenantAppService;
2303
- this.sharedService = sharedService;
2304
- this.elementRef = elementRef;
2305
- this.formUtilityService = formUtilityService;
2306
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2307
- this.constants = screenText;
2308
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2309
- this.mapRolesAndPermissionsScreenTexts = this.constants?.mapRolesAndPermissions;
2310
- this.colWidth = { xs: 12, xl: 6, sm: 12, md: 12, lg: 6 };
2311
- this.actionButtonAlign = AlignType.MIDDLE;
2312
- this.leftButtonLabel = this.mapRolesAndPermissionsScreenTexts?.label?.leftButtonLabel;
2313
- this.rightButtonLabel = this.mapRolesAndPermissionsScreenTexts?.label?.rightButtonLabel;
2314
- this.roles = [];
2315
- this.permissions = [];
2316
- this.destroy$ = new Subject();
2317
- this.tableColumnSchema = [];
2318
- this.tableData = [];
2319
- this.modifiedRolesAndPermissionsMapping = [];
2320
- this.tableHeading = '';
2321
- this.rolePermissionMappingPayload = {
2322
- payload: {
2323
- appId: '',
2324
- permissionId: null,
2325
- roleId: null,
2326
- },
2327
- };
2328
- this.formCancel = new EventEmitter();
2329
- }
2330
- /**
2331
- * Initializes form group and all the page defaults.
2332
- * @memberof MapPermissionsRolesComponent
2333
- * @returns {void}
2334
- */
2335
- ngOnInit() {
2336
- this.appId = this.tenantAppService.getSelectedTenantInformation()
2337
- ?.appId;
2338
- this.formGroup = {
2339
- formGroup: [
2340
- {
2341
- legend: this.mapRolesAndPermissionsScreenTexts?.legend,
2342
- controls: [
2343
- {
2344
- controlName: 'role',
2345
- label: this.mapRolesAndPermissionsScreenTexts?.label?.role,
2346
- type: FormControlType.SELECT,
2347
- dropdownOptions: this.roles,
2348
- supportMessage: this.mapRolesAndPermissionsScreenTexts?.supportText?.role,
2349
- ariaLabel: this.mapRolesAndPermissionsScreenTexts?.label?.ariaLabel?.role,
2350
- ariaDescribedById: this.mapRolesAndPermissionsScreenTexts?.label?.ariaDescribedById
2351
- ?.role,
2352
- },
2353
- {
2354
- controlName: 'permission',
2355
- label: this.mapRolesAndPermissionsScreenTexts?.label?.permission,
2356
- type: FormControlType.SELECT,
2357
- dropdownOptions: this.permissions,
2358
- supportMessage: this.mapRolesAndPermissionsScreenTexts?.supportText?.permission,
2359
- ariaLabel: this.mapRolesAndPermissionsScreenTexts?.label?.ariaLabel
2360
- ?.permission,
2361
- ariaDescribedById: this.mapRolesAndPermissionsScreenTexts?.label?.ariaDescribedById
2362
- ?.permission,
2363
- },
2364
- ],
2365
- },
2366
- ],
2367
- };
2368
- this.getRoles();
2369
- this.getPermissions();
2370
- this.sharedService.isAlertClosed
2371
- .pipe(takeUntil(this.destroy$))
2372
- .subscribe(() => {
2373
- const alertModals = document.querySelectorAll('.cdk-overlay-container ieeesa-alert');
2374
- if (alertModals.length) {
2375
- document.querySelector('.cdk-overlay-container .mat-mdc-dialog-content .ieeesa-alert-box__close-button')?.focus();
2376
- }
2377
- else {
2378
- this.elementRef.nativeElement.querySelector('.cdk-overlay-container .mat-mdc-dialog-content .ieeesa-select-field mat-select')?.focus();
2379
- }
2380
- });
2381
- }
2382
- /**
2383
- * Constructs the role or permission table schema to display the associated mapping in a table view.
2384
- * @param {FormGroup[]} formGroups
2385
- * @memberof MapPermissionsRolesComponent
2386
- * @returns {void}
2387
- */
2388
- onRoleOrPermissionSelected(formGroups) {
2389
- this.tableColumnSchema = [];
2390
- this.modifiedRolesAndPermissionsMapping = [];
2391
- const formGroup = formGroups[0];
2392
- const role = formGroup.get('role')?.value;
2393
- const permission = formGroup.get('permission')?.value;
2394
- if (role) {
2395
- this.selectedRole = {
2396
- roleId: role.id,
2397
- roleName: role.name,
2398
- };
2399
- this.rolePermissionMappingPayload.payload.roleId = role?.id;
2400
- }
2401
- if (permission) {
2402
- this.selectedPermission = {
2403
- permissionId: permission.id,
2404
- permissionName: permission.name,
2405
- };
2406
- this.rolePermissionMappingPayload.payload.permissionId = permission?.id;
2407
- }
2408
- this.rolePermissionMappingPayload.payload.appId = this.appId;
2409
- if ((role && permission) || role) {
2410
- this.tableHeading = `${this.mapRolesAndPermissionsScreenTexts?.roleTableCaption}<strong>${role?.name}</strong>`;
2411
- this.tableColumnSchema.push({
2412
- id: 1,
2413
- columnDef: 'permission',
2414
- heading: this.mapRolesAndPermissionsScreenTexts.tableColumns.permission,
2415
- columnType: TableColumnType.TEXT,
2416
- cellData: (permissionMapping) => permissionMapping?.roleOrPermissionName,
2417
- });
2418
- }
2419
- else {
2420
- this.tableColumnSchema.push({
2421
- id: 1,
2422
- columnDef: 'role',
2423
- heading: this.mapRolesAndPermissionsScreenTexts.tableColumns.role,
2424
- columnType: TableColumnType.TEXT,
2425
- cellData: (roleMapping) => roleMapping?.roleOrPermissionName,
2426
- });
2427
- }
2428
- if (permission) {
2429
- const permissionHeading = `${this.mapRolesAndPermissionsScreenTexts?.permissionTableCaption}<strong>${permission?.name}</strong>`;
2430
- this.tableHeading = role
2431
- ? this.tableHeading + `</br>` + permissionHeading
2432
- : permissionHeading;
2433
- }
2434
- this.tableColumnSchema.push({
2435
- id: 2,
2436
- columnDef: 'slideToggle',
2437
- heading: this.mapRolesAndPermissionsScreenTexts.tableColumns.status,
2438
- columnType: TableColumnType.SLIDE_TOGGLE,
2439
- cellData: (roleMapping) => {
2440
- return {
2441
- id: Math.floor(Math.random() * 1000) + 1,
2442
- label: '',
2443
- ariaLabel: roleMapping.roleOrPermissionName,
2444
- checked: roleMapping.status,
2445
- };
2446
- },
2447
- });
2448
- this.dynamicFormComponent.isSubmitButtonDisabled = true;
2449
- this.getRolePermissionMapping(this.rolePermissionMappingPayload);
2450
- }
2451
- /**
2452
- * Gets the list of roles and displayed in the role dropdown.
2453
- * @memberof MapPermissionsRolesComponent
2454
- * @returns {void}
2455
- */
2456
- getRoles() {
2457
- this.tenantAppService
2458
- .getRoles(this.appId)
2459
- .pipe(takeUntil(this.destroy$))
2460
- .subscribe({
2461
- next: (response) => {
2462
- if (response?.status) {
2463
- const rolesList = response?.body;
2464
- rolesList.map((role) => {
2465
- this.roles.push({
2466
- id: role.roleId,
2467
- name: role.roleName,
2468
- });
2469
- });
2470
- this.formUtilityService.updateFormControlOptions('role', 'dropdownOptions', this.roles, this.dynamicFormComponent);
2471
- }
2472
- },
2473
- error: (error) => {
2474
- this.sharedService.handleErrors(error, this.mapRolesAndPermissionsScreenTexts.errors);
2475
- },
2476
- });
2477
- }
2478
- /**
2479
- * Gets the list of permissions and displayed in the permission dropdown.
2480
- * @memberof MapPermissionsRolesComponent
2481
- * @returns {void}
2482
- */
2483
- getPermissions() {
2484
- this.tenantAppService
2485
- .getPermissions(this.appId)
2486
- .pipe(takeUntil(this.destroy$))
2487
- .subscribe({
2488
- next: (response) => {
2489
- if (response?.status) {
2490
- const permissionsList = response?.body;
2491
- permissionsList.map((permission) => {
2492
- this.permissions.push({
2493
- id: permission.permissionId,
2494
- name: permission.permissionName,
2495
- });
2496
- });
2497
- this.formUtilityService.updateFormControlOptions('permission', 'dropdownOptions', this.permissions, this.dynamicFormComponent);
2498
- }
2499
- },
2500
- error: (error) => {
2501
- this.sharedService.handleErrors(error, this.mapRolesAndPermissionsScreenTexts.errors);
2502
- },
2503
- });
2504
- }
2505
- /**
2506
- * Gets the list of mapped roles/permissions from the backend api.
2507
- * @param {RolePermissionMappingRequestPayload} payload
2508
- * @memberof MapPermissionsRolesComponent
2509
- * @returns {void}
2510
- */
2511
- getRolePermissionMapping(payload) {
2512
- this.tableData = [];
2513
- this.tenantAppService
2514
- .getRolePermissionMapping(payload)
2515
- .pipe(takeUntil(this.destroy$))
2516
- .subscribe({
2517
- next: (response) => {
2518
- const payloadInfo = payload.payload;
2519
- if (payloadInfo?.roleId && payloadInfo?.permissionId) {
2520
- this.tableData.push({
2521
- roleOrPermissionName: this.selectedPermission?.permissionName,
2522
- roleOrPermissionId: this.selectedPermission?.permissionId,
2523
- status: true,
2524
- });
2525
- }
2526
- else if (payloadInfo?.roleId) {
2527
- this.setTableData(this.permissions, response.body, RoleAndPermissionsTableType.PERMISSION);
2528
- }
2529
- else {
2530
- this.setTableData(this.roles, response.body, RoleAndPermissionsTableType.ROLE);
2531
- }
2532
- },
2533
- error: (error) => {
2534
- const errorCodes = error?.error?.body?.errorCodes;
2535
- // Returns error code 3020 when mapped roles does not exist for given permission id.
2536
- if (errorCodes.includes('3020')) {
2537
- this.setTableData(this.roles, [], RoleAndPermissionsTableType.ROLE);
2538
- }
2539
- // Returns error code 3021 when mapped permissions does not exist for given role id.
2540
- else if (errorCodes.includes('3021')) {
2541
- this.setTableData(this.permissions, [], RoleAndPermissionsTableType.PERMISSION);
2542
- }
2543
- // Returns error code 3017 when role permission mapping does not exist for given role id.
2544
- else if (errorCodes.includes('3017')) {
2545
- this.tableData.push({
2546
- roleOrPermissionName: this.selectedPermission?.permissionName,
2547
- roleOrPermissionId: this.selectedPermission?.permissionId,
2548
- status: false,
2549
- });
2550
- }
2551
- else
2552
- this.sharedService.handleErrors(error, this.mapRolesAndPermissionsScreenTexts.errors);
2553
- },
2554
- });
2555
- }
2556
- /**
2557
- * Displaying the mapped roles and permissions data into the data table.
2558
- * @param {SelectOption[]} roleOrPermissions
2559
- * @param {RoleDetails[] | Permission[]} mappedRoleOrPermissions
2560
- * @param {RoleAndPermissionsTableType} tableType
2561
- * @memberof MapPermissionsRolesComponent
2562
- * @returns {void}
2563
- */
2564
- setTableData(roleOrPermissions, mappedRoleOrPermissions, tableType) {
2565
- roleOrPermissions.map((roleOrPermission) => {
2566
- this.tableData.push({
2567
- roleOrPermissionName: roleOrPermission.name,
2568
- roleOrPermissionId: roleOrPermission.id,
2569
- status: tableType === RoleAndPermissionsTableType.ROLE
2570
- ? mappedRoleOrPermissions.length > 0 &&
2571
- mappedRoleOrPermissions.some((mappedRoleOrPermission) => mappedRoleOrPermission.roleId === roleOrPermission.id)
2572
- : mappedRoleOrPermissions.length > 0 &&
2573
- mappedRoleOrPermissions.some((mappedRoleOrPermission) => mappedRoleOrPermission.permissionId === roleOrPermission.id),
2574
- });
2575
- });
2576
- }
2577
- /**
2578
- * Constructs the payload based on the roles and permissions mapping (selection or deselection).
2579
- * @param roleOrPermissionStatus
2580
- * @memberof MapPermissionsRolesComponent
2581
- * @returns {void}
2582
- */
2583
- roleOrPermissionStatusChange(roleOrPermissionStatus) {
2584
- if ((this.selectedRole?.roleId && this.selectedPermission?.permissionId) ||
2585
- this.selectedRole?.roleId) {
2586
- if (this.modifiedRolesAndPermissionsMapping.find((permission) => permission.permissionId ===
2587
- roleOrPermissionStatus.rowData.roleOrPermissionId)) {
2588
- this.modifiedRolesAndPermissionsMapping.splice(this.modifiedRolesAndPermissionsMapping.findIndex((permission) => permission.permissionId ===
2589
- roleOrPermissionStatus.rowData.roleOrPermissionId), 1);
2590
- }
2591
- else {
2592
- this.modifiedRolesAndPermissionsMapping.push({
2593
- roleId: this.selectedRole.roleId,
2594
- permissionId: roleOrPermissionStatus.rowData.roleOrPermissionId,
2595
- appId: this.appId,
2596
- status: roleOrPermissionStatus.slideToggle.checked,
2597
- });
2598
- }
2599
- }
2600
- else if (this.selectedPermission?.permissionId) {
2601
- if (this.modifiedRolesAndPermissionsMapping.find((role) => role.roleId === roleOrPermissionStatus.rowData.roleOrPermissionId)) {
2602
- this.modifiedRolesAndPermissionsMapping.splice(this.modifiedRolesAndPermissionsMapping.findIndex((role) => role.roleId === roleOrPermissionStatus.rowData.roleOrPermissionId), 1);
2603
- }
2604
- else {
2605
- this.modifiedRolesAndPermissionsMapping.push({
2606
- roleId: roleOrPermissionStatus.rowData.roleOrPermissionId,
2607
- permissionId: this.selectedPermission.permissionId,
2608
- appId: this.appId,
2609
- status: roleOrPermissionStatus.slideToggle.checked,
2610
- });
2611
- }
2612
- }
2613
- this.dynamicFormComponent.isSubmitButtonDisabled =
2614
- !this.modifiedRolesAndPermissionsMapping.length;
2615
- }
2616
- /**
2617
- * Submits the roles and permissions mappings to the server.
2618
- * @memberof MapPermissionsRolesComponent
2619
- * @returns {void}
2620
- */
2621
- onMapAndPermissionsFormSubmit() {
2622
- const payload = {
2623
- payload: this.modifiedRolesAndPermissionsMapping,
2624
- };
2625
- this.dynamicFormComponent.isSubmitButtonDisabled = true;
2626
- this.modifiedRolesAndPermissionsMapping = [];
2627
- this.tenantAppService
2628
- .saveRolePermissionMapping(payload)
2629
- .pipe(takeUntil(this.destroy$))
2630
- .subscribe({
2631
- next: (response) => {
2632
- if (response?.status) {
2633
- this.sharedService.showAlertMessage(AlertType.SUCCESS, this.mapRolesAndPermissionsScreenTexts.message.success
2634
- .rolesAndPermissionsSubmission);
2635
- }
2636
- },
2637
- error: (error) => {
2638
- this.sharedService.handleErrors(error, this.mapRolesAndPermissionsScreenTexts.errors);
2639
- },
2640
- });
2641
- }
2642
- /**
2643
- * Closes the map and permissions modal.
2644
- * @memberof MapPermissionsRolesComponent
2645
- * @returns {void}
2646
- */
2647
- onMapAndPermissionsFormCancel() {
2648
- this.formCancel.emit();
2649
- }
2650
- /**
2651
- * Performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
2652
- * @memberof ViewTenantDetailsComponent
2653
- */
2654
- ngOnDestroy() {
2655
- this.destroy$?.next(true);
2656
- this.destroy$?.unsubscribe();
2657
- }
2658
- 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 }); }
2659
- 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-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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DynamicFormComponent, selector: "ieeesa-dynamic-form", inputs: ["formGroups", "submitResponse", "searchResponse", "colWidth", "isLegendVisible", "rightButtonLabel", "leftButtonLabel", "isSubmitButtonDisabled", "isLeftButtonDisabled", "isLeftButtonNeeded", "actionButtonAlign"], outputs: ["formSubmit", "formChange", "formInput", "formLeftButtonClicked", "formSearchApply", "formGroupsReference", "dropdownChange", "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", "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", "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 }); }
2660
- }
2661
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RolesAndPermissionsMappingComponent, decorators: [{
2662
- type: Component,
2663
- 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-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"] }]
2664
- }], ctorParameters: function () { return [{ type: TenantApplicationsService }, { type: i2$1.SharedService }, { type: i0.ElementRef }, { type: i2$1.FormUtilityService }]; }, propDecorators: { formCancel: [{
2665
- type: Output
2666
- }], dynamicFormComponent: [{
2667
- type: ViewChild,
2668
- args: [DynamicFormComponent]
2669
- }] } });
2670
-
2671
- /* eslint-disable no-unused-vars */
2672
- var GroupTypeSettings;
2673
- (function (GroupTypeSettings) {
2674
- GroupTypeSettings["ALLOW_SUB_GROUP"] = "allowSubGroup";
2675
- GroupTypeSettings["ALLOW_ROSTER"] = "allowRoster";
2676
- GroupTypeSettings["ALLOW_ALTERNATE_VOTING"] = "allowAlternateVoting";
2677
- GroupTypeSettings["HAS_CLASSIFICATION"] = "hasClassification";
2678
- })(GroupTypeSettings || (GroupTypeSettings = {}));
2679
-
2680
- /**
2681
- * Component for viewing and managing tenant group types. Fetches the configured group types associated to the selected tenant and displays in tabular view.
2682
- * @export
2683
- * @class ViewTenantGroupTypesComponent
2684
- * @implements {OnInit}
2685
- */
2686
- class ViewTenantGroupTypesComponent {
2687
- constructor(
2688
- // eslint-disable-next-line no-unused-vars
2689
- tenantAppService,
2690
- // eslint-disable-next-line no-unused-vars
2691
- sharedService // eslint-disable-next-line no-empty-function
2692
- ) {
2693
- this.tenantAppService = tenantAppService;
2694
- this.sharedService = sharedService;
2695
- this.destroy$ = new Subject();
2696
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2697
- this.constants = screenText;
2698
- this.columnHeading = this.constants?.viewGroupTypes?.tableColumns?.heading;
2699
- this.settings = this.constants?.viewGroupTypes?.settings;
2700
- this.tableRowActions = this.constants?.viewGroupTypes?.actionMenuItems;
2701
- this.columnSchema = [];
2702
- this.groupTypes = [];
2703
- this.appId = '';
2704
- this.headerElementClassName = '.ieeesa-header';
2705
- }
2706
- /**
2707
- * Fetches group types data from the server and initializes column schema.
2708
- * @memberof ViewTenantGroupTypesComponent
2709
- */
2710
- ngOnInit() {
2711
- this.appId = this.tenantAppService.getSelectedTenantInformation()
2712
- ?.appId;
2713
- this.tenantAppService
2714
- .getGroupTypes(this.appId)
2715
- .pipe(takeUntil(this.destroy$))
2716
- .subscribe({
2717
- next: (response) => {
2718
- this.initializeColumnSchema();
2719
- this.groupTypes = this.formatGroupTypesTableData(response);
2720
- },
2721
- error: (error) => {
2722
- this.sharedService.handleErrors(error, this.constants?.viewGroupTypes?.errors);
2723
- },
2724
- });
2725
- }
2726
- /**
2727
- * Formats raw group types data into a required format for display.
2728
- * @param {ViewGroupTypeResponse} groupTypeRes
2729
- * @return {GroupTypeDetails[]}
2730
- * @memberof ViewTenantGroupTypesComponent
2731
- */
2732
- formatGroupTypesTableData(groupTypeRes) {
2733
- const formattedData = [];
2734
- groupTypeRes?.body?.forEach((item) => {
2735
- const { configFieldValue, roles, hasGroup } = item;
2736
- const { name, description, businessRule } = configFieldValue;
2737
- const { rosterType, ...restBusinessRule } = businessRule;
2738
- const businessRuleString = this.transformBusinessRule(restBusinessRule);
2739
- const roleNames = roles
2740
- ? roles?.map((role) => role?.roleName).join(', ')
2741
- : '';
2742
- const menuAction = JSON.parse(JSON.stringify(this.tableRowActions));
2743
- menuAction[1].isDisabled = hasGroup;
2744
- formattedData.push({
2745
- name,
2746
- description,
2747
- rosterType,
2748
- businessRule: businessRuleString,
2749
- roles: roleNames,
2750
- hasGroup: item.hasGroup,
2751
- menuAction,
2752
- });
2753
- });
2754
- return formattedData;
2755
- }
2756
- /**
2757
- * Transforms business rule to required format in string.
2758
- * @param {*} rule
2759
- * @return {string}
2760
- * @memberof ViewTenantGroupTypesComponent
2761
- */
2762
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2763
- transformBusinessRule(rule) {
2764
- const ruleStringArray = [];
2765
- for (const setting of Object.values(GroupTypeSettings)) {
2766
- if (rule[setting] === true) {
2767
- ruleStringArray.push(this.settings[setting]);
2768
- }
2769
- }
2770
- return ruleStringArray.join(', ');
2771
- }
2772
- /**
2773
- * Initializes table column schema to display group types in tabular view.
2774
- * @memberof ViewTenantGroupTypesComponent
2775
- */
2776
- initializeColumnSchema() {
2777
- this.columnSchema = [
2778
- {
2779
- id: 1,
2780
- columnDef: 'groupType',
2781
- heading: this.columnHeading?.groupType,
2782
- columnType: TableColumnType.TEXT,
2783
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2784
- cellData: (element) => `${element.name}`,
2785
- },
2786
- {
2787
- id: 2,
2788
- columnDef: 'rosterType',
2789
- heading: this.columnHeading?.rosterType,
2790
- columnType: TableColumnType.TEXT,
2791
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2792
- cellData: (element) => `${element.rosterType}`,
2793
- },
2794
- {
2795
- id: 3,
2796
- columnDef: 'description',
2797
- heading: this.columnHeading?.description,
2798
- columnType: TableColumnType.TEXT,
2799
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2800
- cellData: (element) => `${element.description}`,
2801
- },
2802
- {
2803
- id: 4,
2804
- columnDef: 'applicableRoles',
2805
- heading: this.columnHeading?.applicableRoles,
2806
- columnType: TableColumnType.TEXT,
2807
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2808
- cellData: (element) => `${element.roles}`,
2809
- },
2810
- {
2811
- id: 5,
2812
- columnDef: 'settings',
2813
- heading: this.columnHeading?.settings,
2814
- columnType: TableColumnType.TEXT,
2815
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2816
- cellData: (element) => `${element.businessRule}`,
2817
- },
2818
- {
2819
- id: 6,
2820
- columnDef: 'action',
2821
- heading: this.columnHeading?.action,
2822
- columnType: TableColumnType.ACTIONS,
2823
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2824
- cellData: (element) => `${element.menuAction}`,
2825
- },
2826
- ];
2827
- }
2828
- /**
2829
- * Performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
2830
- * @memberof ViewTenantGroupTypesComponent
2831
- */
2832
- ngOnDestroy() {
2833
- this.destroy$?.next(true);
2834
- this.destroy$?.unsubscribe();
2835
- }
2836
- 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 }); }
2837
- 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-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: i6.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", "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", "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 }); }
2838
- }
2839
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ViewTenantGroupTypesComponent, decorators: [{
2840
- type: Component,
2841
- 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-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"] }]
2842
- }], ctorParameters: function () { return [{ type: TenantApplicationsService }, { type: i2$1.SharedService }]; } });
2843
-
2844
- class ViewTenantDetailsComponent {
2845
- constructor(
2846
- // eslint-disable-next-line no-unused-vars
2847
- dialog,
2848
- // eslint-disable-next-line no-unused-vars
2849
- breakpointObserverService,
2850
- // eslint-disable-next-line no-unused-vars
2851
- tenantAppService,
2852
- // eslint-disable-next-line no-unused-vars
2853
- globalErrorHandlerService,
2854
- // eslint-disable-next-line no-unused-vars
2855
- sharedService,
2856
- // eslint-disable-next-line no-unused-vars
2857
- activatedRoute) {
2858
- this.dialog = dialog;
2859
- this.breakpointObserverService = breakpointObserverService;
2860
- this.tenantAppService = tenantAppService;
2861
- this.globalErrorHandlerService = globalErrorHandlerService;
2862
- this.sharedService = sharedService;
2863
- this.activatedRoute = activatedRoute;
2864
- this.destroy$ = new Subject();
2865
- this.isMobileView = false;
2866
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2867
- this.constants = screenText;
2868
- this.tenantLabels = this.constants?.viewTenants?.label;
2869
- this.slideToggleOption = {
2870
- id: 1,
2871
- label: this.constants?.viewTenants?.label?.active,
2872
- checked: true,
2873
- disabled: false,
2874
- };
2875
- this.editButton = this.constants?.viewTenants?.buttons;
2876
- this.accordionInfoList = JSON.parse(JSON.stringify(this.constants?.viewTenants?.tenantAccordionInfo));
2877
- this.appId = '';
2878
- this.iconSize = this.constants?.viewRolesAndPermissions?.columnActionIconSize;
2879
- this.rolesAndPermissionsTableCaption = this.constants?.viewRolesAndPermissions?.tableCaption;
2880
- this.rolesAndPermissionsTableHeaderName = this.constants?.viewRolesAndPermissions?.tableColumnsHeaderText;
2881
- this.rolesAndPermissionsTableSupportMessage = this.constants?.viewRolesAndPermissions?.scrollbarSupportMessage;
2882
- this.permissionsColumnClassNumber = 1;
2883
- this.menuItems = this.constants?.viewRolesAndPermissions?.columnActionMenuItems;
2884
- this.columnSchema = [];
2885
- this.tableData = [];
2886
- this.isRolesAndPermissionsExpanded = false;
2887
- this.paginatorConfig = {
2888
- recordsPerPage: this.constants?.viewRolesAndPermissions?.pageSizeOptions[0],
2889
- pageSizeOptions: this.constants?.viewRolesAndPermissions?.pageSizeOptions,
2890
- totalRecords: 0,
2891
- };
2892
- this.rolesAndPermissionsClassName = '.ieeesa-view-tenant-info__roles-and-permissions';
2893
- this.headerElementClassName = '.ieeesa-header';
2894
- this.tableActions = {
2895
- isPaginationNeeded: true,
2896
- };
2897
- this.accordionDetails = AccordionDetails;
2898
- this.isBasicDetailsExpanded = false;
2899
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2900
- this.editTenantScreenTexts = this.constants?.editTenant;
2901
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2902
- this.deleteRoleScreenTexts = this.constants?.deleteRole;
2903
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2904
- this.mapRolesAndPermissionsScreenTexts = this.constants?.mapRolesAndPermissions;
2905
- this.alignmentType = AlignType;
2906
- this.permissionType = PermissionType;
2907
- this.createRoleScreenTexts = this.constants?.createRole;
2908
- this.selectedRoleInfo = {
2909
- roleId: '',
2910
- roleName: '',
2911
- };
2912
- this.isGroupTypesExpanded = false;
2913
- this.roleTypeOptions = [];
2914
- this.breakpointObserverService
2915
- .getBreakpoint()
2916
- .pipe(takeUntil(this.destroy$))
2917
- .subscribe((result) => {
2918
- this.isMobileView = result?.matches;
2919
- });
2920
- }
2921
- /**
2922
- * Initializes view tenant details component.
2923
- * @return -returns nothing
2924
- * @memberof ViewTenantDetailsComponent
2925
- */
2926
- ngOnInit() {
2927
- this.tenantDetails =
2928
- this.tenantAppService?.getSelectedTenantInformation();
2929
- this.slideToggleOption.checked = this.tenantDetails?.status;
2930
- this.slideToggleOption.label = this.tenantDetails?.status
2931
- ? this.tenantLabels?.active
2932
- : this.tenantLabels?.inactive;
2933
- this.routePaths = this.routePaths ?? this.constants?.routeConfigPath;
2934
- this.viewTenantsRouteUrl = `/${this.routePaths?.viewTenants}`;
2935
- this.tenantAppService?.setAppConfig(this.apiBaseURL, this.userPermissions);
2936
- this.userTenantsPermissions = this.tenantAppService?.filterPermission(this.userPermissions);
2937
- this.appId = this.tenantAppService.getSelectedTenantInformation()
2938
- ?.appId;
2939
- this.tablePagination = {
2940
- offset: 0,
2941
- pageSize: this.paginatorConfig.pageSizeOptions[0],
2942
- };
2943
- this.getApplicationTypes();
2944
- this.activatedRoute?.queryParams
2945
- ?.pipe(takeUntil(this.destroy$))
2946
- ?.subscribe((params) => {
2947
- this.appId = params['id'];
2948
- this.getTenantDetails(this.appId);
2949
- });
2950
- }
2951
- /**
2952
- * Gets the selected tenant details from server.
2953
- * @memberof ViewTenantDetailsComponent
2954
- */
2955
- getTenantDetails(appId) {
2956
- this.tenantAppService
2957
- .getTenantDetails(appId)
2958
- .pipe(takeUntil(this.destroy$))
2959
- .subscribe({
2960
- next: (response) => {
2961
- if (response?.status) {
2962
- this.tenantDetails = response?.body;
2963
- this.tenantAppService.setSelectedTenantInformation(this.tenantDetails);
2964
- this.slideToggleOption.checked = this.tenantDetails
2965
- .status;
2966
- this.slideToggleOption.label = this.tenantDetails.status
2967
- ? this.tenantLabels?.active
2968
- : this.tenantLabels?.inactive;
2969
- const features = this.tenantDetails.features;
2970
- features.map((feature) => {
2971
- if (feature?.featureId ===
2972
- FeaturePermissionId.MEETINGS_AND_EVENTS ||
2973
- feature?.featureId === FeaturePermissionId.BALLOTS)
2974
- this.accordionInfoList.push({
2975
- id: this.accordionInfoList.length + 1,
2976
- isDisabled: false,
2977
- title: feature?.featureName,
2978
- });
2979
- });
2980
- }
2981
- },
2982
- error: (error) => {
2983
- this.sharedService.handleErrors(error, this.constants?.viewTenants.errors);
2984
- },
2985
- });
2986
- }
2987
- /**
2988
- * Display the corresponding tenant basic or feature details based on selected accordion.
2989
- * @param {AccordionInfo} accordionInfo
2990
- * @param {boolean} expanded
2991
- * @memberof ViewTenantDetailsComponent
2992
- */
2993
- showTenantDetails(accordionInfo, expanded) {
2994
- const accordionId = accordionInfo.id;
2995
- switch (accordionId) {
2996
- case 1: {
2997
- this.isBasicDetailsExpanded = expanded;
2998
- if (expanded) {
2999
- this.getApplicationTypes();
3000
- }
3001
- break;
3002
- }
3003
- case 2: {
3004
- this.isRolesAndPermissionsExpanded = expanded;
3005
- if (expanded) {
3006
- this.columnSchema = [];
3007
- this.paginatorConfig.recordsPerPage =
3008
- this.constants?.viewRolesAndPermissions?.pageSizeOptions[0];
3009
- this.tablePagination.offset = 0;
3010
- this.tablePagination.pageSize = this.paginatorConfig.recordsPerPage;
3011
- this.getRolesAndInitializeTableSchema();
3012
- }
3013
- break;
3014
- }
3015
- case 3: {
3016
- this.isGroupTypesExpanded = expanded;
3017
- break;
3018
- }
3019
- }
3020
- }
3021
- /**
3022
- * Fetches the configured roles of the selected tenant and creates the column schema.
3023
- * @memberof ViewTenantDetailsComponent
3024
- */
3025
- getRolesAndInitializeTableSchema() {
3026
- this.tenantAppService
3027
- .getRoles(this.appId)
3028
- .pipe(takeUntil(this.destroy$))
3029
- .subscribe({
3030
- next: (response) => {
3031
- if (response?.status) {
3032
- this.getRolesAndPermissionsAndInitializeTableView({
3033
- payload: {
3034
- offset: this.tablePagination.offset,
3035
- pageSize: this.tablePagination.pageSize,
3036
- },
3037
- });
3038
- const rolesList = this.tenantAppService.sortRolesByRoleType(response?.body);
3039
- this.tenantAppService.setRolesInfo(rolesList);
3040
- const cellValue = this.constants.viewRolesAndPermissions.tableCellValue;
3041
- this.columnSchema = [
3042
- {
3043
- id: 0,
3044
- columnDef: 'permissions',
3045
- heading: this.constants.viewRolesAndPermissions.tableColumn
3046
- .permissions,
3047
- columnType: TableColumnType.TEXT,
3048
- cellData: (rolesAndPermissions) => rolesAndPermissions.permission,
3049
- isStickyColumn: true,
3050
- },
3051
- ];
3052
- rolesList.map((role, index) => {
3053
- this.columnSchema.push({
3054
- id: index + 1,
3055
- columnDef: role.roleId,
3056
- heading: role.roleName,
3057
- columnType: TableColumnType.TEXT,
3058
- hasColumnActions: true,
3059
- cellData: (rolesAndPermissions) => {
3060
- return rolesAndPermissions.roleIdsList.find((roleId) => role.roleId === roleId)
3061
- ? cellValue.yes
3062
- : cellValue.no;
3063
- },
3064
- });
3065
- });
3066
- }
3067
- },
3068
- error: (error) => {
3069
- this.sharedService.handleErrors(error, this.constants?.viewTenants?.errors);
3070
- },
3071
- });
3072
- }
3073
- /**
3074
- * Fetches the roles and permissions mappings for the selected tenant and and initialize table view.
3075
- * @param {GetRolesAndPermissionsPayload} payload
3076
- * @memberof ViewTenantDetailsComponent
3077
- */
3078
- getRolesAndPermissionsAndInitializeTableView(payload) {
3079
- this.tenantAppService
3080
- .getRolesAndPermissionsMappings(this.appId, payload)
3081
- .pipe(takeUntil(this.destroy$))
3082
- .subscribe({
3083
- next: (response) => {
3084
- if (response?.status) {
3085
- this.tableData = [];
3086
- this.paginatorConfig.totalRecords = response?.body
3087
- ?.totalRecords;
3088
- const rolesAndPermissionsList = response?.body
3089
- ?.rolePermissionDetails;
3090
- rolesAndPermissionsList.map((permission) => {
3091
- let roleIdsList = [];
3092
- roleIdsList = permission.roleList.map((role) => role.roleId);
3093
- this.tableData.push({
3094
- permission: permission.permissionName,
3095
- roleIdsList: roleIdsList,
3096
- });
3097
- });
3098
- }
3099
- },
3100
- error: (error) => {
3101
- this.sharedService.handleErrors(error, this.constants?.viewTenants?.errors);
3102
- },
3103
- });
3104
- }
3105
- /**
3106
- * Fetch the roles and permissions records based on offset and page size while the pagination changes.
3107
- * @param {PageEvent} pageEvent
3108
- * @memberof ViewTenantDetailsComponent
3109
- */
3110
- onTablePaginationChange(pageEvent) {
3111
- this.tablePagination = {
3112
- offset: pageEvent.pageIndex,
3113
- pageSize: pageEvent.pageSize,
3114
- };
3115
- this.getRolesAndPermissionsAndInitializeTableView({
3116
- payload: {
3117
- offset: pageEvent.pageIndex,
3118
- pageSize: pageEvent.pageSize,
3119
- },
3120
- });
3121
- }
3122
- /**
3123
- * Captures the selected role's information and performs edit or delete action basis on the selected menu item.
3124
- * @param {TableColumnMenuInfo} roleMenuInfo
3125
- * @memberof ViewTenantDetailsComponent
3126
- */
3127
- onRoleMenuClick(roleMenuInfo) {
3128
- this.selectedRoleInfo.roleId = roleMenuInfo?.tableColumnInfo?.columnDef;
3129
- this.selectedRoleInfo.roleName = roleMenuInfo?.tableColumnInfo?.heading;
3130
- this.tenantAppService?.setSelectedRoleInformation(this.selectedRoleInfo);
3131
- if (roleMenuInfo?.menuActionInfo?.id === RoleMenuAction.DELETE_ROLE) {
3132
- this.openDeleteRoleModal();
3133
- }
3134
- else if (roleMenuInfo?.menuActionInfo?.id === RoleMenuAction.EDIT_ROLE) {
3135
- this.openEditRoleForm();
3136
- }
3137
- }
3138
- /**
3139
- * Keeps track of the accordion based on the element's ID in DOM tree.
3140
- * @memberof ViewTenantDetailsComponent
3141
- */
3142
- trackByAccordionFn(index, item) {
3143
- return item?.id;
3144
- }
3145
- /**
3146
- * Gets the role types and updates the form control.
3147
- * @memberof ViewTenantDetailsComponent
3148
- */
3149
- getRoleTypes() {
3150
- const payload = {
3151
- payload: {
3152
- appId: this.tenantDetails?.appId,
3153
- configFieldName: 'role_type',
3154
- },
3155
- };
3156
- this.tenantAppService
3157
- .getRoleTypes(payload)
3158
- .pipe(takeUntil(this.destroy$))
3159
- .subscribe({
3160
- next: (response) => {
3161
- if (response?.status) {
3162
- this.roleTypeOptions = this.tenantAppService.getRoleTypeOptions(response?.body);
3163
- this.tenantAppService?.setRoleTypeOption(this.roleTypeOptions);
3164
- if (this.functionType === TenantFunctionType.CREATE_ROLE) {
3165
- this.openCreateRoleForm();
3166
- }
3167
- }
3168
- },
3169
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3170
- error: (error) => {
3171
- this.sharedService.handleErrors(error, this.createRoleScreenTexts?.errors);
3172
- },
3173
- });
3174
- }
3175
- /**
3176
- * Sets the dialog options for create role modal and calls openModal method.
3177
- * @return -returns nothing
3178
- * @memberof ViewTenantDetailsComponent
3179
- */
3180
- openCreateRoleForm() {
3181
- this.tenantAppService?.setTenantFunctionType(TenantFunctionType?.CREATE_ROLE);
3182
- this.functionType = TenantFunctionType.CREATE_ROLE;
3183
- if (this.roleTypeOptions.length > 0) {
3184
- const dialogOptions = {
3185
- heading: this.constants?.createRole?.heading,
3186
- isCloseNeeded: true,
3187
- componentReference: CreateModifyRoleComponent,
3188
- modalType: ModalType.FORM,
3189
- };
3190
- this.openModal(dialogOptions, 'ieeesa-create-modify-role');
3191
- }
3192
- else {
3193
- this.getRoleTypes();
3194
- }
3195
- }
3196
- /**
3197
- * Sets the dialog options for edit role modal and calls openModal method.
3198
- * @return -returns nothing
3199
- * @memberof ViewTenantDetailsComponent
3200
- */
3201
- openEditRoleForm() {
3202
- this.tenantAppService?.setTenantFunctionType(TenantFunctionType?.EDIT_ROLE);
3203
- this.functionType = TenantFunctionType.EDIT_ROLE;
3204
- const dialogOptions = {
3205
- heading: this.selectedRoleInfo?.roleName,
3206
- isCloseNeeded: true,
3207
- componentReference: CreateModifyRoleComponent,
3208
- modalType: ModalType.FORM,
3209
- };
3210
- this.openModal(dialogOptions, 'ieeesa-create-modify-role');
3211
- }
3212
- /**
3213
- * Sets the dialog options for edit tenant modal and calls openModal method.
3214
- * @return -returns nothing
3215
- * @memberof ViewTenantDetailsComponent
3216
- */
3217
- openEditTenantForm() {
3218
- this.tenantAppService?.setTenantFunctionType(TenantFunctionType?.EDIT);
3219
- this.functionType = TenantFunctionType.EDIT;
3220
- const dialogOptions = {
3221
- heading: this.tenantDetails?.appTitle,
3222
- isCloseNeeded: true,
3223
- componentReference: CreateTenantApplicationComponent,
3224
- modalType: ModalType.FORM,
3225
- };
3226
- this.openModal(dialogOptions, 'ieeesa-edit-tenant');
3227
- }
3228
- /**
3229
- * Opens modal component with received params and handles form submission success and errors.
3230
- * @param {*} dialogOptions
3231
- * @param {string} [className]
3232
- * @return -returns nothing
3233
- * @memberof ViewTenantsDetailsComponent
3234
- */
3235
- openModal(
3236
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3237
- dialogOptions, className) {
3238
- className = className ?? '';
3239
- this.dialogRef = this.dialog?.open(ModalComponent, {
3240
- data: dialogOptions,
3241
- width: '',
3242
- panelClass: ['ieeesa-modal-dialog', className],
3243
- ariaModal: true,
3244
- });
3245
- this.dialogRef?.componentInstance?.submitFormResponse
3246
- .pipe(takeUntil(this.destroy$))
3247
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, no-unused-vars
3248
- .subscribe((result) => {
3249
- this.dialogRef?.close();
3250
- switch (this.functionType) {
3251
- case TenantFunctionType?.EDIT: {
3252
- this.sharedService.showAlertMessage(AlertType?.SUCCESS, `${this.tenantDetails?.appTitle} ${this.editTenantScreenTexts?.message?.success?.submission}`);
3253
- this.tenantDetails = {
3254
- ...this.tenantAppService.getSelectedTenantInformation(),
3255
- };
3256
- break;
3257
- }
3258
- case TenantFunctionType?.CREATE_ROLE: {
3259
- const promptMessage = this.createRoleScreenTexts?.message?.success;
3260
- const roleInfo = this.tenantAppService?.getNewlyCreatedRoleInfo();
3261
- this.sharedService.showAlertMessage(AlertType?.SUCCESS, `${promptMessage?.submission1} ${roleInfo?.roleName} ${promptMessage?.submission2} ${this.tenantDetails?.appTitle}. ${promptMessage?.submission3}`);
3262
- this.getRolesAndInitializeTableSchema();
3263
- break;
3264
- }
3265
- case TenantFunctionType?.EDIT_ROLE: {
3266
- const promptMessage = this.createRoleScreenTexts?.message?.success;
3267
- const roleInfo = this.tenantAppService?.getNewlyCreatedRoleInfo();
3268
- this.sharedService.showAlertMessage(AlertType?.SUCCESS, `${roleInfo?.roleName} ${promptMessage?.modify} ${this.tenantDetails?.appTitle}.`);
3269
- this.getRolesAndInitializeTableSchema();
3270
- break;
3271
- }
3272
- }
3273
- });
3274
- this.dialogRef?.componentInstance?.formCancel
3275
- .pipe(takeUntil(this.destroy$))
3276
- .subscribe(() => {
3277
- this.dialogRef?.close();
3278
- if (this.tenantAppService.getTenantFunctionType() ===
3279
- TenantFunctionType.MAP_PERMISSION_AND_ROLE)
3280
- this.getRolesAndInitializeTableSchema();
3281
- });
3282
- this.dialogRef?.componentInstance?.modalConfirm
3283
- .pipe(takeUntil(this.destroy$))
3284
- .subscribe(() => {
3285
- if (this.tenantAppService.getTenantFunctionType() ===
3286
- TenantFunctionType.MAP_PERMISSION_AND_ROLE)
3287
- this.getRolesAndInitializeTableSchema();
3288
- });
3289
- }
3290
- /**
3291
- * Calls openTenantStatusConfirmationModal to change the status of tenant on slide toggle change.
3292
- * @param {SlideToggleOption} slideToggleOption
3293
- * @memberof ViewTenantDetailsComponent
3294
- */
3295
- onSlideToggleChange(slideToggleOption) {
3296
- this.openTenantStatusConfirmationModal(slideToggleOption?.checked);
3297
- }
3298
- /**
3299
- * Opens the confirmation modal to inactivate/reactivate the tenant.
3300
- * @param {boolean} isActivate
3301
- * @memberof ViewTenantDetailsComponent
3302
- */
3303
- openTenantStatusConfirmationModal(isActivate) {
3304
- const confirmationInfo = this.constants?.viewTenants?.confirmationInfo;
3305
- const statusText = isActivate
3306
- ? confirmationInfo?.promptMessageActivate
3307
- : confirmationInfo?.promptMessageInactivate;
3308
- const updateTenantStatusModalOptions = {
3309
- leftButtonLabel: confirmationInfo?.leftButtonLabel,
3310
- rightButtonLabel: confirmationInfo?.rightButtonLabel,
3311
- promptMessage: `${confirmationInfo?.promptMessage} ${statusText} ${this.tenantDetails?.appTitle}?`,
3312
- actionButtonAlign: this.alignmentType?.MIDDLE,
3313
- };
3314
- this.dialogRef = this.dialog?.open(ModalConfirmationComponent, {
3315
- data: updateTenantStatusModalOptions,
3316
- width: 'auto',
3317
- autoFocus: 'dialog',
3318
- ariaLabel: confirmationInfo?.ariaLabel?.alert,
3319
- });
3320
- this.dialogRef
3321
- .afterClosed()
3322
- .pipe(takeUntil(this.destroy$))
3323
- .subscribe((result) => {
3324
- if (result) {
3325
- this.updateTenantStatus(isActivate);
3326
- }
3327
- else {
3328
- this.setSlideToggleStatus(isActivate);
3329
- }
3330
- });
3331
- }
3332
- /**
3333
- * Opens the map permissions and roles modal.
3334
- * @memberof ViewTenantDetailsComponent
3335
- * @returns {void}
3336
- */
3337
- openMapRolesAndPermissionsForm() {
3338
- this.tenantAppService?.setTenantFunctionType(TenantFunctionType?.MAP_PERMISSION_AND_ROLE);
3339
- const dialogOptions = {
3340
- heading: this.mapRolesAndPermissionsScreenTexts.heading,
3341
- isCloseNeeded: true,
3342
- modalType: ModalType.FORM,
3343
- componentReference: RolesAndPermissionsMappingComponent,
3344
- };
3345
- this.openModal(dialogOptions, 'ieeesa-map-permissions-and-roles');
3346
- }
3347
- /**
3348
- * Updates the tenant status to the server using http request and display success/error message based on request response (success or failure).
3349
- * @param {boolean} isActivate
3350
- * @memberof ViewTenantDetailsComponent
3351
- */
3352
- updateTenantStatus(isActivate) {
3353
- const updateTenantStatusRequestPayload = {
3354
- payload: {
3355
- appId: this.tenantDetails?.appId,
3356
- status: isActivate,
3357
- },
3358
- };
3359
- this.tenantAppService
3360
- .updateTenantStatus(updateTenantStatusRequestPayload)
3361
- .pipe(takeUntil(this.destroy$))
3362
- .subscribe({
3363
- next: (res) => {
3364
- this.dialogRef?.close();
3365
- if (res?.status) {
3366
- this.slideToggleOption.label = isActivate
3367
- ? this.tenantLabels?.active
3368
- : this.tenantLabels?.inactive;
3369
- this.tenantDetails.status = isActivate;
3370
- this.tenantDetails = Object.assign({}, this.tenantDetails);
3371
- }
3372
- },
3373
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3374
- error: (error) => {
3375
- this.setSlideToggleStatus(isActivate);
3376
- this.sharedService.handleErrors(error, this.constants?.viewTenants?.errors);
3377
- },
3378
- });
3379
- }
3380
- /**
3381
- * Sets slide toggle checked status and label.
3382
- * @param {boolean} isActivate
3383
- * @memberof ViewTenantDetailsComponent
3384
- */
3385
- setSlideToggleStatus(isActivate) {
3386
- this.slideToggleOption.checked = !isActivate;
3387
- this.slideToggleOption.label = !isActivate
3388
- ? this.tenantLabels?.active
3389
- : this.tenantLabels?.inactive;
3390
- }
3391
- /**
3392
- * Gets the application/tenant types.
3393
- * @memberof ViewTenantDetailsComponent
3394
- */
3395
- getApplicationTypes() {
3396
- this.tenantAppService
3397
- .getApplicationTypes()
3398
- .pipe(takeUntil(this.destroy$))
3399
- .subscribe({
3400
- next: (response) => {
3401
- if (response?.status) {
3402
- this.appTypeOptions =
3403
- this.tenantAppService.getApplicationTypeOptions(response?.body);
3404
- this.tenantAppService.setApplicationType(this.appTypeOptions);
3405
- }
3406
- },
3407
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3408
- error: (error) => {
3409
- this.sharedService.handleErrors(error, this.constants?.viewTenants?.errors);
3410
- },
3411
- });
3412
- }
3413
- /**
3414
- * Validates permission based access for provided feature.
3415
- * @param {PermissionType} permissionType
3416
- * @return {boolean}
3417
- * @memberof ViewTenantDetailsComponent
3418
- */
3419
- validateAccess(permissionType) {
3420
- return this.tenantAppService.validateAccess(permissionType, this.userTenantsPermissions);
3421
- }
3422
- /**
3423
- * 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).
3424
- * @memberof ViewTenantDetailsComponent
3425
- */
3426
- deleteRole() {
3427
- const deleteRoleRequestPayload = {
3428
- payload: {
3429
- appId: this.tenantDetails?.appId,
3430
- roleId: this.selectedRoleInfo?.roleId,
3431
- },
3432
- };
3433
- this.tenantAppService
3434
- .deleteRole(deleteRoleRequestPayload)
3435
- .pipe(takeUntil(this.destroy$))
3436
- .subscribe({
3437
- next: (res) => {
3438
- if (res?.status) {
3439
- this.sharedService.showAlertMessage(AlertType?.SUCCESS, `${this.selectedRoleInfo?.roleName} ${this.deleteRoleScreenTexts?.message?.success?.submission} ${this.tenantDetails?.appTitle}.`);
3440
- this.getRolesAndInitializeTableSchema();
3441
- }
3442
- },
3443
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3444
- error: (error) => {
3445
- this.sharedService.handleErrors(error, this.constants?.viewTenants?.errors);
3446
- },
3447
- });
3448
- }
3449
- /**
3450
- * Sets the role menu HTMLElement.
3451
- * @param {HTMLElement} menuButton
3452
- * @memberof ViewTenantDetailsComponent
3453
- */
3454
- selectedRoleMenuElement(menuButton) {
3455
- this.roleMenuElement = menuButton;
3456
- }
3457
- /**
3458
- * Opens the confirmation modal to get user confirmation to delete the role.
3459
- * @memberof ViewTenantDetailsComponent
3460
- */
3461
- openDeleteRoleModal() {
3462
- const confirmationInfo = this.constants?.viewTenants?.confirmationInfo;
3463
- const deleteRoleModalOptions = {
3464
- leftButtonLabel: confirmationInfo?.leftButtonLabel,
3465
- rightButtonLabel: confirmationInfo?.rightButtonLabel,
3466
- promptMessage: `${confirmationInfo?.deleteRoleConfirmationMessage} ${this.selectedRoleInfo?.roleName}? ${confirmationInfo?.deleteRolePromptMessage} ${this.tenantDetails?.appTitle}.`,
3467
- actionButtonAlign: this.alignmentType?.MIDDLE,
3468
- };
3469
- this.dialogRef = this.dialog?.open(ModalConfirmationComponent, {
3470
- data: deleteRoleModalOptions,
3471
- width: '25%',
3472
- panelClass: [
3473
- 'ieeesa-modal-confirm-dialog',
3474
- 'ieeesa-delete-role-confirm-dialog',
3475
- ],
3476
- autoFocus: 'dialog',
3477
- ariaLabel: confirmationInfo?.ariaLabel?.alert,
3478
- });
3479
- this.dialogRef
3480
- .afterClosed()
3481
- .pipe(takeUntil(this.destroy$))
3482
- .subscribe((result) => {
3483
- if (result) {
3484
- this.deleteRole();
3485
- }
3486
- else
3487
- this.roleMenuElement?.focus();
3488
- });
3489
- }
3490
- /**
3491
- * Performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
3492
- * @memberof ViewTenantDetailsComponent
3493
- */
3494
- ngOnDestroy() {
3495
- this.roleTypeOptions = [];
3496
- this.tenantAppService?.setRoleTypeOption(this.roleTypeOptions);
3497
- this.destroy$?.next(true);
3498
- this.destroy$?.unsubscribe();
3499
- }
3500
- 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: i2.GlobalErrorHandlerService }, { token: i2$1.SharedService }, { token: i5.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
3501
- 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 {{ 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 {{ constants.viewRolesAndPermissions.actionButtonLabels\r\n .mapPermissionsRoles }}\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 >\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-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: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i5.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: i7$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: i7.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", "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", "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 }); }
3502
- }
3503
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ViewTenantDetailsComponent, decorators: [{
3504
- type: Component,
3505
- args: [{ selector: 'ieeesa-view-tenant-details', standalone: true, imports: [
3506
- CommonModule,
3507
- RouterModule,
3508
- SlideToggleComponent,
3509
- AccordionComponent,
3510
- MatDividerModule,
3511
- TenantBasicDetailsComponent,
3512
- IconButtonComponent,
3513
- MatButtonModule,
3514
- DataTableComponent,
3515
- ViewTenantGroupTypesComponent,
3516
- ], 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 {{ 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 {{ constants.viewRolesAndPermissions.actionButtonLabels\r\n .mapPermissionsRoles }}\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 >\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-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"] }]
3517
- }], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i2.BreakpointObserverService }, { type: TenantApplicationsService }, { type: i2.GlobalErrorHandlerService }, { type: i2$1.SharedService }, { type: i5.ActivatedRoute }]; }, propDecorators: { apiBaseURL: [{
3518
- type: Input
3519
- }], userPermissions: [{
3520
- type: Input
3521
- }], routePaths: [{
3522
- type: Input
3523
- }] } });
3524
-
3525
- /* eslint-disable no-empty-function */
3526
- class TenantApplicationsComponent {
3527
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3528
- 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 }] }); }
3529
- }
3530
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsComponent, decorators: [{
3531
- type: Component,
3532
- args: [{ selector: 'ieeesa-tenant-applications', standalone: true, imports: [CommonModule, MatButtonModule], template: "" }]
3533
- }] });
3534
-
3535
- /* eslint-disable no-unused-vars */
3536
- var AppType;
3537
- (function (AppType) {
3538
- AppType["GENERIC"] = "Generic";
3539
- AppType["STANDALONE"] = "Standalone";
3540
- })(AppType || (AppType = {}));
3541
-
3542
- class TenantApplicationsModule {
3543
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3544
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsModule }); }
3545
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsModule }); }
3546
- }
3547
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantApplicationsModule, decorators: [{
3548
- type: NgModule,
3549
- args: [{
3550
- declarations: [],
3551
- imports: [],
3552
- exports: [],
3553
- }]
3554
- }] });
3555
-
3556
- /*
3557
- * Public API Surface of tenants
3558
- */
3559
-
3560
- /**
3561
- * Generated bundle index. Do not edit.
3562
- */
3563
-
3564
- export { AppType, CreateModifyRoleComponent, CreateTenantApplicationComponent, FeaturePermissionId, FormStatus, GroupTypeSettings, PermissionType, RoleAndPermissionsTableType, RoleMenuAction, RolesAndPermissionsMappingComponent, RolesValidation, SortOrderBy, TenantApplicationsComponent, TenantApplicationsModule, TenantApplicationsService, TenantBasicDetailsComponent, TenantFunctionType, TenantPermissionsMapService, TenantPermissionsService, TenantStatus, TenantsValidationPatterns, ViewTenantDetailsComponent, ViewTenantGroupTypesComponent, ViewTenantsColumnSchemaDef, ViewTenantsListComponent };
3565
- //# sourceMappingURL=ieeesa-npm-tenants.mjs.map