@tuki-io/tuki-widgets 0.0.201 → 0.0.203

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 (191) hide show
  1. package/README.md +24 -24
  2. package/esm2020/contact-center/cc-readiness/cc-readiness.module.mjs +1 -1
  3. package/esm2020/contact-center/cc-readiness/cc-readiness.service.mjs +1 -1
  4. package/esm2020/contact-center/cc-readiness/widgets/licences-requirement/licences-requirement.component.mjs +3 -3
  5. package/esm2020/di2mt/widgets/site-upgrade/progress-bar/progress-bar.component.mjs +3 -3
  6. package/esm2020/di2mt/widgets/site-upgrade/site-upgrade-data-table/site-upgrade-data-table.component.mjs +2 -2
  7. package/esm2020/di2mt/widgets/upgrade-overview/cards/pending-activation-users/pending-activation-users.component.mjs +17 -17
  8. package/esm2020/lib/widgets.component.mjs +9 -9
  9. package/esm2020/lib/widgets.module.mjs +1 -1
  10. package/esm2020/lib/widgets.service.mjs +1 -1
  11. package/esm2020/public-api.mjs +1 -1
  12. package/esm2020/user-creation/src/app.constants.mjs +16 -2
  13. package/esm2020/user-creation/src/classes/notification.mjs +32 -0
  14. package/esm2020/user-creation/src/classes/site.mjs +1 -1
  15. package/esm2020/user-creation/src/environments/environment.mjs +11 -0
  16. package/esm2020/user-creation/src/interfaces/user-creation-wizard.interfaces.mjs +199 -0
  17. package/esm2020/user-creation/src/shared/components/notification/notification.component.mjs +38 -0
  18. package/esm2020/user-creation/src/shared/material.module.mjs +35 -7
  19. package/esm2020/user-creation/src/shared/pipes/truncate.pipe.mjs +30 -0
  20. package/esm2020/user-creation/src/shared/services/notification.service.mjs +62 -0
  21. package/esm2020/user-creation/src/shared/services/user-creation-api.service.mjs +43 -19
  22. package/esm2020/user-creation/src/shared/services/utils.mjs +1 -1
  23. package/esm2020/user-creation/src/shared/shared.module.mjs +27 -4
  24. package/esm2020/user-creation/src/user-creation.module.mjs +40 -7
  25. package/esm2020/user-creation/src/utils/app-loader/app-loader.mjs +14 -0
  26. package/esm2020/user-creation/src/utils/build-savable-end-user.mjs +147 -0
  27. package/esm2020/user-creation/src/utils/device-default-prefix.mjs +13 -0
  28. package/esm2020/user-creation/src/utils/device-name-validation.mjs +23 -0
  29. package/esm2020/user-creation/src/utils/model.mjs +19 -0
  30. package/esm2020/user-creation/src/utils/parse-device-name-rule.mjs +26 -0
  31. package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.mjs +512 -20
  32. package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-overview-step/user-overview-step.component.mjs +3 -3
  33. package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-template-step/user-template-step.component.mjs +80 -34
  34. package/esm2020/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.component.mjs +83 -19
  35. package/esm2020/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.mjs +599 -124
  36. package/esm2020/user-device-manage/public-api.mjs +1 -1
  37. package/esm2020/user-device-manage/src/app.constants.mjs +1 -1
  38. package/esm2020/user-device-manage/src/classes/device.mjs +1 -1
  39. package/esm2020/user-device-manage/src/classes/deviceProfile.mjs +1 -1
  40. package/esm2020/user-device-manage/src/classes/line-association-interface.mjs +1 -1
  41. package/esm2020/user-device-manage/src/classes/line-association.mjs +1 -1
  42. package/esm2020/user-device-manage/src/classes/line-call-info-display.mjs +1 -1
  43. package/esm2020/user-device-manage/src/classes/line-directory.mjs +1 -1
  44. package/esm2020/user-device-manage/src/classes/line.mjs +1 -1
  45. package/esm2020/user-device-manage/src/classes/notification.mjs +1 -1
  46. package/esm2020/user-device-manage/src/classes/recording-options.mjs +1 -1
  47. package/esm2020/user-device-manage/src/classes/simplified-user.mjs +1 -1
  48. package/esm2020/user-device-manage/src/classes/site-defaults.mjs +1 -1
  49. package/esm2020/user-device-manage/src/classes/translation-pattern.mjs +1 -1
  50. package/esm2020/user-device-manage/src/classes/types.mjs +1 -1
  51. package/esm2020/user-device-manage/src/common-functions.mjs +1 -1
  52. package/esm2020/user-device-manage/src/confirm-dialog/info-dialog.component.mjs +3 -3
  53. package/esm2020/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.mjs +3 -3
  54. package/esm2020/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.mjs +3 -3
  55. package/esm2020/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.mjs +3 -3
  56. package/esm2020/user-device-manage/src/device-associated-line/device-associated-line.component.mjs +1 -1
  57. package/esm2020/user-device-manage/src/device-info/device-info.component.mjs +3 -3
  58. package/esm2020/user-device-manage/src/device-manage-widget.component.mjs +2 -2
  59. package/esm2020/user-device-manage/src/environments/environment.mjs +1 -1
  60. package/esm2020/user-device-manage/src/interseptors/auth.interceptor.mjs +1 -1
  61. package/esm2020/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.mjs +3 -3
  62. package/esm2020/user-device-manage/src/material.module.mjs +1 -1
  63. package/esm2020/user-device-manage/src/notifications/notification.component.mjs +3 -3
  64. package/esm2020/user-device-manage/src/pipes/mac-address.pipe.mjs +1 -1
  65. package/esm2020/user-device-manage/src/services/api.service.mjs +1 -1
  66. package/esm2020/user-device-manage/src/services/device.service.mjs +1 -1
  67. package/esm2020/user-device-manage/src/services/dns.service.mjs +1 -1
  68. package/esm2020/user-device-manage/src/services/line.service.mjs +1 -1
  69. package/esm2020/user-device-manage/src/services/notification.service.mjs +1 -1
  70. package/esm2020/user-device-manage/src/services/removeKynFromIBM.service.mjs +1 -1
  71. package/esm2020/user-device-manage/src/services/site-settings.service.mjs +1 -1
  72. package/esm2020/user-device-manage/src/services/sorting-utils.service.mjs +1 -1
  73. package/esm2020/user-device-manage/src/services/user.service.mjs +1 -1
  74. package/esm2020/user-device-manage/src/services/utils.service.mjs +1 -1
  75. package/esm2020/user-device-manage/src/services/validation.service.mjs +1 -1
  76. package/esm2020/user-device-manage/src/shared/tk-page-section/page-section.component.mjs +1 -1
  77. package/esm2020/user-device-manage/src/utils/app-loader/app-loader.mjs +3 -3
  78. package/esm2020/user-manage/public-api.mjs +1 -1
  79. package/esm2020/user-manage/src/app.constants.mjs +1 -1
  80. package/esm2020/user-manage/src/classes/device.mjs +1 -1
  81. package/esm2020/user-manage/src/classes/line-association-interface.mjs +1 -1
  82. package/esm2020/user-manage/src/classes/line-association.mjs +1 -1
  83. package/esm2020/user-manage/src/classes/line-call-info-display.mjs +1 -1
  84. package/esm2020/user-manage/src/classes/line-directory.mjs +1 -1
  85. package/esm2020/user-manage/src/classes/line.mjs +1 -1
  86. package/esm2020/user-manage/src/classes/notification.mjs +1 -1
  87. package/esm2020/user-manage/src/classes/pagination.mjs +1 -1
  88. package/esm2020/user-manage/src/classes/recording-options.mjs +1 -1
  89. package/esm2020/user-manage/src/classes/simplified-user.mjs +1 -1
  90. package/esm2020/user-manage/src/classes/table-data.mjs +1 -1
  91. package/esm2020/user-manage/src/classes/translation-pattern.mjs +1 -1
  92. package/esm2020/user-manage/src/classes/user-list.mjs +1 -1
  93. package/esm2020/user-manage/src/common-functions.mjs +1 -1
  94. package/esm2020/user-manage/src/device-list/device-list.component.mjs +3 -3
  95. package/esm2020/user-manage/src/device-list/device-row/device-row.component.mjs +3 -3
  96. package/esm2020/user-manage/src/environments/environment.mjs +1 -1
  97. package/esm2020/user-manage/src/interseptors/auth.interceptor.mjs +1 -1
  98. package/esm2020/user-manage/src/lazy-loading-select/lazy-loading-select.component.mjs +3 -3
  99. package/esm2020/user-manage/src/material.module.mjs +1 -1
  100. package/esm2020/user-manage/src/notifications/notification.component.mjs +3 -3
  101. package/esm2020/user-manage/src/removeKynFromIBM.service.mjs +1 -1
  102. package/esm2020/user-manage/src/services/api.service.mjs +1 -1
  103. package/esm2020/user-manage/src/services/dns.service.mjs +1 -1
  104. package/esm2020/user-manage/src/services/line.service.mjs +1 -1
  105. package/esm2020/user-manage/src/services/notification.service.mjs +1 -1
  106. package/esm2020/user-manage/src/services/removeKynFromIBM.service.mjs +1 -1
  107. package/esm2020/user-manage/src/services/site-settings.service.mjs +1 -1
  108. package/esm2020/user-manage/src/services/sorting-utils.service.mjs +1 -1
  109. package/esm2020/user-manage/src/services/user.service.mjs +1 -1
  110. package/esm2020/user-manage/src/services/utils.service.mjs +1 -1
  111. package/esm2020/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.mjs +3 -3
  112. package/esm2020/user-manage/src/user-info/user-info.component.mjs +3 -3
  113. package/esm2020/user-manage/src/user-manage-widget.component.mjs +2 -2
  114. package/esm2020/user-manage/src/user-manage.module.mjs +1 -1
  115. package/esm2020/user-manage/src/utils/app-loader/app-loader.mjs +3 -3
  116. package/esm2020/user-manage/src/utils/pagination/pagination.component.mjs +3 -3
  117. package/esm2020/users-list/public-api.mjs +1 -1
  118. package/esm2020/users-list/src/app.constants.mjs +1 -1
  119. package/esm2020/users-list/src/classes/app-location.mjs +1 -1
  120. package/esm2020/users-list/src/classes/device.mjs +1 -1
  121. package/esm2020/users-list/src/classes/line.mjs +1 -1
  122. package/esm2020/users-list/src/classes/move-user.mjs +1 -1
  123. package/esm2020/users-list/src/classes/notification.mjs +1 -1
  124. package/esm2020/users-list/src/classes/simlified-user.mjs +1 -1
  125. package/esm2020/users-list/src/classes/table-data.mjs +1 -1
  126. package/esm2020/users-list/src/classes/user-list.mjs +1 -1
  127. package/esm2020/users-list/src/move-user-wizard/move-user-stepper/device-move-user/device-move-user-wizard.component.mjs +3 -3
  128. package/esm2020/users-list/src/move-user-wizard/move-user-stepper/device-move-user-tab/devices-move-user-wizard-tab.component.mjs +3 -3
  129. package/esm2020/users-list/src/move-user-wizard/move-user-wizard.component.mjs +3 -3
  130. package/esm2020/users-list/src/services/api-webex.service.mjs +1 -1
  131. package/esm2020/users-list/src/services/api.service.mjs +1 -1
  132. package/esm2020/users-list/src/services/dns.service.mjs +1 -1
  133. package/esm2020/users-list/src/services/events-communication.service.mjs +1 -1
  134. package/esm2020/users-list/src/services/notification.service.mjs +1 -1
  135. package/esm2020/users-list/src/services/removeKynFromIBM.service.mjs +1 -1
  136. package/esm2020/users-list/src/services/site-settings.service.mjs +1 -1
  137. package/esm2020/users-list/src/services/user.service.mjs +1 -1
  138. package/esm2020/users-list/src/user-list-confirm-dialog/user-list-confirm-dialog.component.mjs +3 -3
  139. package/esm2020/users-list/src/utils/app-loader/app-loader.mjs +3 -3
  140. package/esm2020/users-list/src/utils/common-functions.mjs +1 -1
  141. package/esm2020/users-list/src/utils/utils.service.mjs +1 -1
  142. package/fesm2015/tuki-io-tuki-widgets-contact-center.mjs +2 -2
  143. package/fesm2015/tuki-io-tuki-widgets-contact-center.mjs.map +1 -1
  144. package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs +20 -20
  145. package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs.map +1 -1
  146. package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs +2129 -325
  147. package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
  148. package/fesm2015/tuki-io-tuki-widgets-user-device-manage.mjs +18 -18
  149. package/fesm2015/tuki-io-tuki-widgets-user-device-manage.mjs.map +1 -1
  150. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs +18 -18
  151. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs.map +1 -1
  152. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs +10 -10
  153. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs.map +1 -1
  154. package/fesm2015/tuki-io-tuki-widgets.mjs +8 -8
  155. package/fesm2015/tuki-io-tuki-widgets.mjs.map +1 -1
  156. package/fesm2020/tuki-io-tuki-widgets-contact-center.mjs +2 -2
  157. package/fesm2020/tuki-io-tuki-widgets-contact-center.mjs.map +1 -1
  158. package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs +20 -20
  159. package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs.map +1 -1
  160. package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs +2084 -314
  161. package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
  162. package/fesm2020/tuki-io-tuki-widgets-user-device-manage.mjs +18 -18
  163. package/fesm2020/tuki-io-tuki-widgets-user-device-manage.mjs.map +1 -1
  164. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs +18 -18
  165. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs.map +1 -1
  166. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs +10 -10
  167. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs.map +1 -1
  168. package/fesm2020/tuki-io-tuki-widgets.mjs +8 -8
  169. package/fesm2020/tuki-io-tuki-widgets.mjs.map +1 -1
  170. package/package.json +1 -1
  171. package/user-creation/src/app.constants.d.ts +10 -0
  172. package/user-creation/src/classes/notification.d.ts +18 -0
  173. package/user-creation/src/environments/environment.d.ts +9 -0
  174. package/user-creation/src/interfaces/user-creation-wizard.interfaces.d.ts +554 -0
  175. package/user-creation/src/shared/components/notification/notification.component.d.ts +19 -0
  176. package/user-creation/src/shared/material.module.d.ts +5 -1
  177. package/user-creation/src/shared/pipes/truncate.pipe.d.ts +7 -0
  178. package/user-creation/src/shared/services/notification.service.d.ts +18 -0
  179. package/user-creation/src/shared/services/user-creation-api.service.d.ts +8 -2
  180. package/user-creation/src/shared/shared.module.d.ts +3 -1
  181. package/user-creation/src/user-creation.module.d.ts +17 -10
  182. package/user-creation/src/utils/app-loader/app-loader.d.ts +6 -0
  183. package/user-creation/src/utils/build-savable-end-user.d.ts +23 -0
  184. package/user-creation/src/utils/device-default-prefix.d.ts +5 -0
  185. package/user-creation/src/utils/device-name-validation.d.ts +6 -0
  186. package/user-creation/src/utils/model.d.ts +1 -0
  187. package/user-creation/src/utils/parse-device-name-rule.d.ts +8 -0
  188. package/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.d.ts +83 -7
  189. package/user-creation/src/widgets/user-creation-wizard/components/user-template-step/user-template-step.component.d.ts +11 -4
  190. package/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.component.d.ts +18 -0
  191. package/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.d.ts +71 -56
@@ -1,34 +1,236 @@
1
- import * as i4 from '@angular/common';
1
+ import * as i2 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { NgModule, Injectable, inject, Component, Input, EventEmitter, ViewEncapsulation, Output } from '@angular/core';
5
- import * as i3$1 from '@angular/forms';
6
- import { FormBuilder, Validators, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
7
- import * as i9 from '@angular/material/expansion';
4
+ import { Injectable, Pipe, Component, ChangeDetectionStrategy, NgModule, inject, ViewEncapsulation, EventEmitter, Output, Input, ViewChild } from '@angular/core';
5
+ import * as i1$2 from '@angular/forms';
6
+ import { ReactiveFormsModule, FormsModule, FormBuilder, Validators, FormControl } from '@angular/forms';
7
+ import * as i15 from '@angular/material/expansion';
8
8
  import { MatExpansionModule } from '@angular/material/expansion';
9
9
  import { MatRadioModule } from '@angular/material/radio';
10
- import * as i3$2 from '@angular/material/stepper';
10
+ import * as i4 from '@angular/material/stepper';
11
11
  import { MatStepperModule } from '@angular/material/stepper';
12
+ import { Subject, BehaviorSubject, tap, forkJoin, map, switchMap, of, catchError, takeUntil, take, finalize, startWith, debounceTime, timer, filter, distinctUntilChanged } from 'rxjs';
13
+ import * as i3 from '@angular/material/button';
14
+ import { MatButtonModule } from '@angular/material/button';
12
15
  import { MatProgressBarModule } from '@angular/material/progress-bar';
13
- import * as i3 from '@angular/material/table';
16
+ import * as i5 from '@angular/material/table';
14
17
  import { MatTableModule } from '@angular/material/table';
15
18
  import * as i5$1 from '@angular/material/tooltip';
16
19
  import { MatTooltipModule } from '@angular/material/tooltip';
17
20
  import { MatCheckboxModule } from '@angular/material/checkbox';
18
- import * as i4$1 from '@angular/material/button';
19
- import { MatButtonModule } from '@angular/material/button';
21
+ import * as i7 from '@angular/material/icon';
20
22
  import { MatIconModule } from '@angular/material/icon';
21
- import * as i5 from '@angular/material/form-field';
23
+ import * as i8 from '@angular/material/form-field';
22
24
  import { MatFormFieldModule } from '@angular/material/form-field';
23
- import * as i6 from '@angular/material/input';
25
+ import * as i9 from '@angular/material/input';
24
26
  import { MatInputModule } from '@angular/material/input';
25
- import * as i7 from '@angular/material/select';
27
+ import * as i7$1 from '@angular/material/select';
26
28
  import { MatSelectModule } from '@angular/material/select';
27
- import { BehaviorSubject, tap, forkJoin, map, Subject, takeUntil, startWith, switchMap, filter, of } from 'rxjs';
29
+ import * as i12 from '@angular/material/autocomplete';
30
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
31
+ import * as i1$1 from '@angular/material/progress-spinner';
32
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
33
+ import * as i13 from '@angular/material/paginator';
34
+ import { MatPaginatorModule } from '@angular/material/paginator';
35
+ import * as i14 from '@angular/material/chips';
36
+ import { MatChipsModule } from '@angular/material/chips';
28
37
  import * as i1 from '@angular/common/http';
29
- import { HttpHeaders, HttpClientModule } from '@angular/common/http';
38
+ import { HttpHeaders, HttpClientModule, HttpClient } from '@angular/common/http';
30
39
  import { NgApexchartsModule } from 'ng-apexcharts';
31
- import * as i8 from '@angular/material/core';
40
+ import Big from 'big.js';
41
+ import * as i11 from '@angular/material/core';
42
+ import * as i1$3 from '@ngx-translate/core';
43
+ import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
44
+ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
45
+
46
+ const environment = {
47
+ production: false,
48
+ // apiUrl: 'http://localhost:4200',
49
+ apiUrl: 'http://192.168.0.191:8080',
50
+ notificationsLifetime: 30000,
51
+ longNotificationsLifetime: 45000,
52
+ cashCleanTimer: 900000,
53
+ cashArrayLength: 10000,
54
+ matomoUrl: 'http://192.168.0.136/matomo/',
55
+ };
56
+
57
+ const TTL_DEFAULT = environment.notificationsLifetime;
58
+ const TTL_LONG_DEFAULT = environment.longNotificationsLifetime;
59
+ var NotificationType;
60
+ (function (NotificationType) {
61
+ NotificationType["info"] = "info";
62
+ NotificationType["error"] = "error";
63
+ NotificationType["success"] = "success";
64
+ NotificationType["warning"] = "warning";
65
+ })(NotificationType || (NotificationType = {}));
66
+ class Notification {
67
+ constructor(data) {
68
+ this.ttl = TTL_DEFAULT;
69
+ Object.assign(this, data || {});
70
+ if (this.ttl === undefined) {
71
+ this.ttl = this.message && this.message.length && this.message.length < 80 ? TTL_DEFAULT : TTL_LONG_DEFAULT;
72
+ }
73
+ }
74
+ isInfo() {
75
+ return this.type === NotificationType.info;
76
+ }
77
+ isError() {
78
+ return this.type === NotificationType.error;
79
+ }
80
+ isSuccess() {
81
+ return this.type === NotificationType.success;
82
+ }
83
+ isWarning() {
84
+ return this.type === NotificationType.warning;
85
+ }
86
+ }
87
+
88
+ const SUCCESS_TIME = 5000;
89
+ const INACTIVE_SESSION_MESSAGE = 'Your session was lost due to inactivity. Please login again';
90
+ const INACTIVE_SESSION = 'SESSION_INACTIVE';
91
+ class NotificationService {
92
+ constructor() {
93
+ this.listChange = new Subject();
94
+ this.max = 0;
95
+ this.list = [];
96
+ }
97
+ error(message, ttl) {
98
+ this.notify('error', message, ttl);
99
+ }
100
+ success(message, ttl) {
101
+ this.notify('success', message, (!ttl) ? SUCCESS_TIME : ttl);
102
+ }
103
+ warning(message, ttl) {
104
+ this.notify('warning', message, ttl);
105
+ }
106
+ info(message, ttl) {
107
+ this.notify('info', message, ttl);
108
+ }
109
+ notify(type, message, ttl) {
110
+ const found = this.list.find((n) => n.message === message);
111
+ if (found) {
112
+ this.remove(found);
113
+ }
114
+ const notification = new Notification({
115
+ id: ++this.max,
116
+ type, message, ttl
117
+ });
118
+ if (notification.ttl > 0) {
119
+ notification.timerId = setTimeout(() => this.remove(notification, true), notification.ttl);
120
+ }
121
+ this.list.push(notification);
122
+ this.listChange.next(this.list);
123
+ }
124
+ remove(notification, auto) {
125
+ if (!auto && notification.timerId) {
126
+ // clear timeout in case of manual remove
127
+ clearInterval(notification.timerId);
128
+ }
129
+ this.list = this.list.filter(n => n.id !== notification.id);
130
+ this.listChange.next(this.list);
131
+ }
132
+ removeInactiveSessionError() {
133
+ if (!this.list || !this.list.length) {
134
+ return;
135
+ }
136
+ this.list = this.list.filter(n => n.message !== INACTIVE_SESSION_MESSAGE && n.message !== INACTIVE_SESSION);
137
+ this.listChange.next(this.list);
138
+ }
139
+ }
140
+ NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
141
+ NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService });
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, decorators: [{
143
+ type: Injectable
144
+ }], ctorParameters: function () { return []; } });
145
+
146
+ const API = {
147
+ WEBEX_CHECK_CONTROL_HUB_INTEGRATION: "/webex/api/search/webex/customers/:customerId/controlhubexists",
148
+ SITES: "/dcp/api/customers/:customerId/sites",
149
+ SITE: "/dcp/api/sites/:siteId",
150
+ DEVICE_TYPES: "/dcp/api/provision/options/:siteId/devicetypes",
151
+ SITE_SETTINGS: "/dcp/api/sites/:siteId/settings",
152
+ VM_USER_TEMPLATES: "/dcp/api/provision/options/:siteId/vmusertemplates",
153
+ EXISTING_USERS: "/dcp/api/provision/:siteId/users",
154
+ USER_TEMPLATES_UPLOAD_LIST: "/dcp/api/searchbulkupdate/uploadedusertemplatelist",
155
+ USER_TEMPLATE_TOKEN: "/dcp/api/bulkupdate/:customerId/usertemplate/:id/token",
156
+ AVAILABLE_DN_IN_RANGES: "/dcp/api/sites/:siteId/available-dn-in-ranges",
157
+ USER_CHECK_ID_EXISTING: "/dcp/api/provision/:siteId/users/:userId",
158
+ LDAP_USERS: "/dcp/api/provision/:siteId/users",
159
+ USERS: "/dcp/api/provision/:siteId/users",
160
+ CREATE_NEW_USER_FROM_TEMPLATE: "/dcp/api/provision/newUserFromUserTemplate",
161
+ DEVICE_DEFAULTS: "/api/provision/options/:siteId/devicedefaults/:deviceType",
162
+ };
163
+ const USER_CREATION_TYPES = {
164
+ CUCM: 'CUCM',
165
+ MT: 'MT'
166
+ };
167
+ const MAX_INTEGER = 2147483647;
168
+ const CUTTING_SYMBOLS = [
169
+ " ",
170
+ "_",
171
+ "-"
172
+ ];
173
+ const BREADCRUMB_LENGTH_LIMIT = 20;
174
+ const DEFAULT_CUTTING_LENGTH = 15;
175
+
176
+ class TruncatePipe {
177
+ transform(value, args) {
178
+ if (!value) {
179
+ return '';
180
+ }
181
+ if (args) {
182
+ const limit = args.length > 0 ? parseInt(args[0], 10) : 20;
183
+ const trail = args.length > 1 ? args[1] : '...';
184
+ return value.length > limit ? value.substring(0, limit) + trail : value;
185
+ }
186
+ if (value.length <= BREADCRUMB_LENGTH_LIMIT) {
187
+ return value;
188
+ }
189
+ const foundSymbol = CUTTING_SYMBOLS.find((symbol) => value.includes(symbol, DEFAULT_CUTTING_LENGTH));
190
+ const cutIndex = foundSymbol ? value.indexOf(foundSymbol, DEFAULT_CUTTING_LENGTH) : BREADCRUMB_LENGTH_LIMIT;
191
+ return value.substring(0, cutIndex) + '...';
192
+ }
193
+ }
194
+ TruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
195
+ TruncatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TruncatePipe, name: "truncate" });
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TruncatePipe, decorators: [{
197
+ type: Pipe,
198
+ args: [{
199
+ name: 'truncate'
200
+ }]
201
+ }] });
202
+
203
+ class NotificationsComponent {
204
+ constructor(notificationService, ref) {
205
+ this.notificationService = notificationService;
206
+ this.ref = ref;
207
+ }
208
+ ngOnInit() {
209
+ this.listChangeSubscribe();
210
+ }
211
+ ngOnDestroy() {
212
+ this.listSubscription.unsubscribe();
213
+ }
214
+ readMore() {
215
+ this.isReadMore = !this.isReadMore;
216
+ }
217
+ removeNotification(notification) {
218
+ this.notificationService.remove(notification);
219
+ }
220
+ listChangeSubscribe() {
221
+ this.listSubscription = this.notificationService.listChange
222
+ .subscribe((list) => {
223
+ this.list = list;
224
+ this.ref.detectChanges();
225
+ });
226
+ }
227
+ }
228
+ NotificationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, deps: [{ token: NotificationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
229
+ NotificationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NotificationsComponent, selector: "app-notification", ngImport: i0, template: "\r\n\r\n<div class=\"notification-block\" role=\"alert\" aria-live=\"assertive\">\r\n <div class=\"notification\"\r\n *ngFor=\"let notification of list\"\r\n [ngClass]=\"{'error': notification.isError(), 'success': notification.isSuccess()}\">\r\n\r\n <div class=\"flex-box\">\r\n <div class=\"notification-icons-block\">\r\n <i *ngIf=\"notification.isError()\" class=\"fa fa-exclamation-triangle\"></i>\r\n <i *ngIf=\"notification.isWarning()\" class=\"fa fa-hand-paper-o\"></i>\r\n <i *ngIf=\"notification.isSuccess()\" class=\"fa fa-check\"></i>\r\n <i *ngIf=\"notification.isInfo()\" class=\"fa fa-info-circle\"></i>\r\n </div>\r\n <div *ngIf=\"!isReadMore\" class=\"message-block\">\r\n {{notification.message | truncate:[93]}}\r\n </div>\r\n <div *ngIf=\"isReadMore\" class=\"message-block\">\r\n {{notification.message}}\r\n </div>\r\n </div>\r\n <div class=\"read-more-error link clickable\" *ngIf=\"notification.message && notification.message.length > 93\"\r\n (click)=\"readMore()\">{{(isReadMore ? 'Collapse' : 'Read More')}}</div>\r\n <button\r\n class=\"close\"\r\n mat-icon-button\r\n (click)=\"removeNotification(notification)\">\r\n <img class=\"notification-icon-close\" src=\"assets/icons/close_icon_modal.svg\" alt=\"\">\r\n </button>\r\n </div>\r\n</div>\r\n\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400&display=swap\";.notification-block{right:10px;top:80px;position:absolute;z-index:100}.notification-block .read-more-error{margin:10px 13px 3px 0;text-align:right}.notification-block .notification{padding:15px 0 10px 10px;margin-bottom:18px;color:#333;border-radius:3px;border-top:1.5px solid #e5e1cd;background:#fcf8e3;box-shadow:0 8px 12px #091e4226,0 0 1px #091e424f;width:368px;position:relative}.notification-block .notification .message-block{font-size:14px;font-family:Poppins,Poppins,sans-serif!important;word-break:break-word;width:270px}.notification-block .notification .notification-icon-close{height:24px}.notification-block .notification.error{background:#FFE9E9;border-top:1.5px solid #E16D6D}.notification-block .notification.success{background:#e3f4dc;border-top:1.5px solid #b3d692}.notification-block .notification .fa-exclamation-triangle{color:#e16d6d!important}.notification-block .notification .fa-check{color:#a0c37f!important}.notification-block .notification .fa-info-circle,.notification-block .notification .fa-hand-paper-o{color:#bdb89e!important}.notification-block .notification .fa{font-size:20px}.notification-block .notification .close{position:absolute;top:2px;right:-5px}.notification-block .notification .close .fa{font-size:14px}.notification-block .notification .fa{margin:0;color:inherit}@media screen and (max-width: 600px){.notification-block{width:50%;min-width:150px}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: TruncatePipe, name: "truncate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
230
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, decorators: [{
231
+ type: Component,
232
+ args: [{ selector: 'app-notification', changeDetection: ChangeDetectionStrategy.OnPush, template: "\r\n\r\n<div class=\"notification-block\" role=\"alert\" aria-live=\"assertive\">\r\n <div class=\"notification\"\r\n *ngFor=\"let notification of list\"\r\n [ngClass]=\"{'error': notification.isError(), 'success': notification.isSuccess()}\">\r\n\r\n <div class=\"flex-box\">\r\n <div class=\"notification-icons-block\">\r\n <i *ngIf=\"notification.isError()\" class=\"fa fa-exclamation-triangle\"></i>\r\n <i *ngIf=\"notification.isWarning()\" class=\"fa fa-hand-paper-o\"></i>\r\n <i *ngIf=\"notification.isSuccess()\" class=\"fa fa-check\"></i>\r\n <i *ngIf=\"notification.isInfo()\" class=\"fa fa-info-circle\"></i>\r\n </div>\r\n <div *ngIf=\"!isReadMore\" class=\"message-block\">\r\n {{notification.message | truncate:[93]}}\r\n </div>\r\n <div *ngIf=\"isReadMore\" class=\"message-block\">\r\n {{notification.message}}\r\n </div>\r\n </div>\r\n <div class=\"read-more-error link clickable\" *ngIf=\"notification.message && notification.message.length > 93\"\r\n (click)=\"readMore()\">{{(isReadMore ? 'Collapse' : 'Read More')}}</div>\r\n <button\r\n class=\"close\"\r\n mat-icon-button\r\n (click)=\"removeNotification(notification)\">\r\n <img class=\"notification-icon-close\" src=\"assets/icons/close_icon_modal.svg\" alt=\"\">\r\n </button>\r\n </div>\r\n</div>\r\n\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400&display=swap\";.notification-block{right:10px;top:80px;position:absolute;z-index:100}.notification-block .read-more-error{margin:10px 13px 3px 0;text-align:right}.notification-block .notification{padding:15px 0 10px 10px;margin-bottom:18px;color:#333;border-radius:3px;border-top:1.5px solid #e5e1cd;background:#fcf8e3;box-shadow:0 8px 12px #091e4226,0 0 1px #091e424f;width:368px;position:relative}.notification-block .notification .message-block{font-size:14px;font-family:Poppins,Poppins,sans-serif!important;word-break:break-word;width:270px}.notification-block .notification .notification-icon-close{height:24px}.notification-block .notification.error{background:#FFE9E9;border-top:1.5px solid #E16D6D}.notification-block .notification.success{background:#e3f4dc;border-top:1.5px solid #b3d692}.notification-block .notification .fa-exclamation-triangle{color:#e16d6d!important}.notification-block .notification .fa-check{color:#a0c37f!important}.notification-block .notification .fa-info-circle,.notification-block .notification .fa-hand-paper-o{color:#bdb89e!important}.notification-block .notification .fa{font-size:20px}.notification-block .notification .close{position:absolute;top:2px;right:-5px}.notification-block .notification .close .fa{font-size:14px}.notification-block .notification .fa{margin:0;color:inherit}@media screen and (max-width: 600px){.notification-block{width:50%;min-width:150px}}\n"] }]
233
+ }], ctorParameters: function () { return [{ type: NotificationService }, { type: i0.ChangeDetectorRef }]; } });
32
234
 
33
235
  class MaterialModule {
34
236
  }
@@ -41,7 +243,11 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
41
243
  MatIconModule,
42
244
  MatFormFieldModule,
43
245
  MatInputModule,
44
- MatSelectModule], exports: [MatProgressBarModule,
246
+ MatSelectModule,
247
+ MatAutocompleteModule,
248
+ MatProgressSpinnerModule,
249
+ MatPaginatorModule,
250
+ MatChipsModule], exports: [MatProgressBarModule,
45
251
  MatTooltipModule,
46
252
  MatTableModule,
47
253
  MatCheckboxModule,
@@ -49,7 +255,11 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
49
255
  MatIconModule,
50
256
  MatFormFieldModule,
51
257
  MatInputModule,
52
- MatSelectModule] });
258
+ MatSelectModule,
259
+ MatAutocompleteModule,
260
+ MatProgressSpinnerModule,
261
+ MatPaginatorModule,
262
+ MatChipsModule] });
53
263
  MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [MatProgressBarModule,
54
264
  MatTooltipModule,
55
265
  MatTableModule,
@@ -58,7 +268,11 @@ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
58
268
  MatIconModule,
59
269
  MatFormFieldModule,
60
270
  MatInputModule,
61
- MatSelectModule, MatProgressBarModule,
271
+ MatSelectModule,
272
+ MatAutocompleteModule,
273
+ MatProgressSpinnerModule,
274
+ MatPaginatorModule,
275
+ MatChipsModule, MatProgressBarModule,
62
276
  MatTooltipModule,
63
277
  MatTableModule,
64
278
  MatCheckboxModule,
@@ -66,7 +280,11 @@ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
66
280
  MatIconModule,
67
281
  MatFormFieldModule,
68
282
  MatInputModule,
69
- MatSelectModule] });
283
+ MatSelectModule,
284
+ MatAutocompleteModule,
285
+ MatProgressSpinnerModule,
286
+ MatPaginatorModule,
287
+ MatChipsModule] });
70
288
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
71
289
  type: NgModule,
72
290
  args: [{
@@ -79,7 +297,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
79
297
  MatIconModule,
80
298
  MatFormFieldModule,
81
299
  MatInputModule,
82
- MatSelectModule
300
+ MatSelectModule,
301
+ MatAutocompleteModule,
302
+ MatProgressSpinnerModule,
303
+ MatPaginatorModule,
304
+ MatChipsModule,
83
305
  ],
84
306
  exports: [
85
307
  MatProgressBarModule,
@@ -90,97 +312,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
90
312
  MatIconModule,
91
313
  MatFormFieldModule,
92
314
  MatInputModule,
93
- MatSelectModule
315
+ MatSelectModule,
316
+ MatAutocompleteModule,
317
+ MatProgressSpinnerModule,
318
+ MatPaginatorModule,
319
+ MatChipsModule,
94
320
  ]
95
321
  }]
96
322
  }] });
97
323
 
98
- const getSavableData = (model, exclude) => {
99
- let result = Object.keys(model);
100
- if (exclude && exclude.length) {
101
- result = result.filter(key => !exclude.some(item => item === key));
102
- }
103
- return result.reduce((result, key) => {
104
- if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
105
- result[key] = model[key].map((item) => item.getSavableData());
106
- }
107
- else if (model[key] instanceof Object && model[key].getSavableData) {
108
- result[key] = model[key].getSavableData();
109
- }
110
- else {
111
- result[key] = model[key];
112
- }
113
- return result;
114
- }, {});
115
- };
116
-
117
- class Site {
118
- constructor(site) {
119
- Object.assign(this, site);
120
- this.initForm();
121
- }
122
- initForm() {
123
- const formBuilder = new FormBuilder();
124
- const formSettings = {
125
- name: [this.name || '', [Validators.required]],
126
- shortName: [this.shortName || '', [Validators.required]],
127
- cucm: [this.cucm || ''],
128
- cuc: [this.cuc || ''],
129
- address1: [this.address1 || ''],
130
- zipCode: [this.country || ''],
131
- city: [this.city || ''],
132
- state: [this.state || ''],
133
- country: [this.country || '', [Validators.required]],
134
- isAfterTtu: [this.isAfterTtu || ''],
135
- ttuEnableDate: [this.ttuEnableDate || '']
136
- };
137
- this.form = formBuilder.group(formSettings);
138
- }
139
- getSavableData() {
140
- const nonSavableData = ['form'];
141
- return getSavableData(this, nonSavableData);
142
- }
143
- getId() {
144
- return this.id;
145
- }
146
- }
147
- class SiteDefaults {
148
- constructor(siteDefaults, isSharedLineSite) {
149
- this.routePartitionFilter = [];
150
- this.devicePoolFilter = [];
151
- this.cssFilter = [];
152
- this.voicemailProfileFilter = [];
153
- if (siteDefaults) {
154
- Object.assign(this, siteDefaults);
155
- this.enableEm = siteDefaults.enableEm === 'true';
156
- this.routePartitionFilter.sort();
157
- this.devicePoolFilter.sort();
158
- this.cssFilter.sort();
159
- this.voicemailProfileFilter.sort();
160
- }
161
- if (isSharedLineSite) {
162
- this.cssFilter = siteDefaults?.sharedSitesCssFilter || [];
163
- this.routePartitionFilter = siteDefaults?.sharedSitesRPFilter || [];
164
- }
165
- }
166
- }
167
-
168
- const API = {
169
- WEBEX_CHECK_CONTROL_HUB_INTEGRATION: "/webex/api/search/webex/customers/:customerId/controlhubexists",
170
- SITES: "/api/customers/:customerId/sites",
171
- SITE: "/dcp/api/sites/:siteId",
172
- DEVICE_TYPES: "/dcp/api/provision/options/:siteId/devicetypes",
173
- SITE_SETTINGS: "/dcp/api/sites/:siteId/settings",
174
- VM_USER_TEMPLATES: "/dcp/api/provision/options/:siteId/vmusertemplates",
175
- USER_TEMPLATES_UPLOAD_LIST: "/dcp/api/searchbulkupdate/uploadedusertemplatelist",
176
- USER_TEMPLATE_TOKEN: "/dcp/api/bulkupdate/:customerId/usertemplate/:id/token",
177
- };
178
- const USER_CREATION_TYPES = {
179
- CUCM: 'CUCM',
180
- MT: 'MT'
181
- };
182
- const MAX_INTEGER = 2147483647;
183
-
184
324
  class APIService {
185
325
  constructor(httpClient) {
186
326
  this.httpClient = httpClient;
@@ -258,6 +398,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
258
398
  }]
259
399
  }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
260
400
 
401
+ const BERLIN_MT_SITE = {
402
+ address2: "Address 2",
403
+ address3: "Address 3",
404
+ country: "IL",
405
+ cucm: {
406
+ platformType: "CUCM",
407
+ id: 2073,
408
+ name: "DI_220"
409
+ },
410
+ id: 9329,
411
+ name: "Berlin_MT",
412
+ hqStatus: false,
413
+ hasActivated: true,
414
+ isAfterTtu: false,
415
+ prefetchDn: false,
416
+ settings: [],
417
+ shortName: "Berl1758105407",
418
+ state: "",
419
+ timezone: "GMT"
420
+ };
261
421
  class UserCreationApiService {
262
422
  constructor() {
263
423
  this._allSites = [];
@@ -287,32 +447,21 @@ class UserCreationApiService {
287
447
  // }
288
448
  // this.allCustomerSites$.next(true);
289
449
  // return this._allSites;
290
- this.sitesListSubject$.next(res.pageData);
450
+ this.sitesListSubject$.next([BERLIN_MT_SITE, ...res.pageData].sort((a, b) => a.name.localeCompare(b.name)));
291
451
  }));
292
452
  // .pipe(this.handleError(true));
293
453
  }
294
- getSiteData(siteId) {
454
+ getSiteAllData(siteId) {
295
455
  // this.dataPending = true;
296
456
  return forkJoin([
297
457
  this.getSite(siteId),
298
- this.getDeviceTypes(siteId),
299
458
  this.getSiteDefaults(siteId, false),
300
- this.getVoiceMailUserTemplates(siteId)
301
- ]).pipe(tap(() => {
302
- // this.userFeaturesService.setDefaultUcProfile();
303
- }));
459
+ // this.getDeviceTypes(siteId),
460
+ // this.getVoiceMailUserTemplates(siteId)
461
+ ]);
304
462
  }
305
463
  getSite(siteId, isEdit) {
306
- return this.apiService.fetch(API.SITE.replace(':siteId', String(siteId)), null, false)
307
- .pipe(map((siteData) => {
308
- const site = new Site(siteData);
309
- // if (isEdit) {
310
- // this.setEditSite(site);
311
- // } else {
312
- // this.setCurrentSite(site);
313
- // }
314
- return site;
315
- }));
464
+ return this.apiService.fetch(API.SITE.replace(':siteId', String(siteId)), null, false);
316
465
  }
317
466
  getDeviceTypes(siteId) {
318
467
  return this.apiService.fetch(API.DEVICE_TYPES.replace(':siteId', String(siteId)), null, true);
@@ -356,6 +505,22 @@ class UserCreationApiService {
356
505
  return this.apiService.fetch(API.USER_TEMPLATE_TOKEN.replace(':customerId', customerId).replace(':id', id));
357
506
  // .pipe(this.handleError(false, true));
358
507
  }
508
+ getAvailableDnInRanges(siteId, params) {
509
+ return this.apiService.fetch(API.AVAILABLE_DN_IN_RANGES.replace(':siteId', siteId), params);
510
+ }
511
+ getLdapUsers(siteId, params) {
512
+ return this.apiService.fetch(API.LDAP_USERS.replace(':siteId', siteId), params);
513
+ }
514
+ checkUserIdExisting(siteId, userId) {
515
+ return this.apiService.fetch(API.USER_CHECK_ID_EXISTING.replace(':siteId', siteId).replace(':userId', userId));
516
+ }
517
+ saveTemplateUser(user, templateId, siteId) {
518
+ return this.apiService.post(API.CREATE_NEW_USER_FROM_TEMPLATE, user, { siteId: siteId, templateId: templateId });
519
+ }
520
+ getDeviceDefaults(siteId, deviceType) {
521
+ const encodedType = encodeURIComponent(deviceType);
522
+ return this.apiService.fetch(API.DEVICE_DEFAULTS.replace(':siteId', siteId).replace(':deviceType', encodedType));
523
+ }
359
524
  }
360
525
  UserCreationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
361
526
  UserCreationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationApiService });
@@ -369,11 +534,25 @@ SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "1
369
534
  SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SharedModule, imports: [CommonModule,
370
535
  MaterialModule,
371
536
  NgApexchartsModule,
372
- HttpClientModule], exports: [MaterialModule] });
537
+ HttpClientModule,
538
+ ReactiveFormsModule,
539
+ FormsModule], exports: [MaterialModule,
540
+ ReactiveFormsModule,
541
+ FormsModule,
542
+ MatTableModule,
543
+ NgApexchartsModule,
544
+ HttpClientModule] });
373
545
  SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SharedModule, imports: [CommonModule,
374
546
  MaterialModule,
375
547
  NgApexchartsModule,
376
- HttpClientModule, MaterialModule] });
548
+ HttpClientModule,
549
+ ReactiveFormsModule,
550
+ FormsModule, MaterialModule,
551
+ ReactiveFormsModule,
552
+ FormsModule,
553
+ MatTableModule,
554
+ NgApexchartsModule,
555
+ HttpClientModule] });
377
556
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SharedModule, decorators: [{
378
557
  type: NgModule,
379
558
  args: [{
@@ -383,18 +562,540 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
383
562
  MaterialModule,
384
563
  NgApexchartsModule,
385
564
  HttpClientModule,
565
+ ReactiveFormsModule,
566
+ FormsModule,
386
567
  ],
387
568
  exports: [
388
- MaterialModule
569
+ MaterialModule,
570
+ ReactiveFormsModule,
571
+ FormsModule,
572
+ MatTableModule,
573
+ NgApexchartsModule,
574
+ HttpClientModule,
389
575
  ]
390
576
  }]
391
577
  }] });
392
578
 
579
+ function deviceNameValidator(options) {
580
+ return (control) => {
581
+ const raw = String(control.value ?? '').trim();
582
+ if (!raw || !options.regex?.trim()) {
583
+ return null;
584
+ }
585
+ try {
586
+ const rule = new RegExp(`^(?:${options.regex})$`);
587
+ if (!rule.test(raw)) {
588
+ return {
589
+ deviceName: {
590
+ caption: options.caption || options.regex,
591
+ },
592
+ };
593
+ }
594
+ }
595
+ catch {
596
+ return null;
597
+ }
598
+ return null;
599
+ };
600
+ }
601
+
602
+ const getSavableData$1 = (model, exclude) => {
603
+ let result = Object.keys(model);
604
+ if (exclude && exclude.length) {
605
+ result = result.filter(key => !exclude.some(item => item === key));
606
+ }
607
+ return result.reduce((result, key) => {
608
+ if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
609
+ result[key] = model[key].map((item) => item.getSavableData());
610
+ }
611
+ else if (model[key] instanceof Object && model[key].getSavableData) {
612
+ result[key] = model[key].getSavableData();
613
+ }
614
+ else {
615
+ result[key] = model[key];
616
+ }
617
+ return result;
618
+ }, {});
619
+ };
620
+
621
+ class Site {
622
+ constructor(site) {
623
+ Object.assign(this, site);
624
+ this.initForm();
625
+ }
626
+ initForm() {
627
+ const formBuilder = new FormBuilder();
628
+ const formSettings = {
629
+ name: [this.name || '', [Validators.required]],
630
+ shortName: [this.shortName || '', [Validators.required]],
631
+ cucm: [this.cucm || ''],
632
+ cuc: [this.cuc || ''],
633
+ address1: [this.address1 || ''],
634
+ zipCode: [this.country || ''],
635
+ city: [this.city || ''],
636
+ state: [this.state || ''],
637
+ country: [this.country || '', [Validators.required]],
638
+ isAfterTtu: [this.isAfterTtu || ''],
639
+ ttuEnableDate: [this.ttuEnableDate || '']
640
+ };
641
+ this.form = formBuilder.group(formSettings);
642
+ }
643
+ getSavableData() {
644
+ const nonSavableData = ['form'];
645
+ return getSavableData$1(this, nonSavableData);
646
+ }
647
+ getId() {
648
+ return this.id;
649
+ }
650
+ }
651
+ class SiteDefaults {
652
+ constructor(siteDefaults, isSharedLineSite) {
653
+ this.routePartitionFilter = [];
654
+ this.devicePoolFilter = [];
655
+ this.cssFilter = [];
656
+ this.voicemailProfileFilter = [];
657
+ if (siteDefaults) {
658
+ Object.assign(this, siteDefaults);
659
+ this.enableEm = siteDefaults.enableEm === 'true';
660
+ this.routePartitionFilter.sort();
661
+ this.devicePoolFilter.sort();
662
+ this.cssFilter.sort();
663
+ this.voicemailProfileFilter.sort();
664
+ }
665
+ if (isSharedLineSite) {
666
+ this.cssFilter = siteDefaults?.sharedSitesCssFilter || [];
667
+ this.routePartitionFilter = siteDefaults?.sharedSitesRPFilter || [];
668
+ }
669
+ }
670
+ }
671
+
672
+ const getSavableData = (model, exclude) => {
673
+ let result = Object.keys(model);
674
+ if (exclude && exclude.length) {
675
+ result = result.filter(key => !exclude.some(item => item === key));
676
+ }
677
+ return result.reduce((result, key) => {
678
+ if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
679
+ result[key] = model[key].map((item) => item.getSavableData());
680
+ }
681
+ else if (model[key] instanceof Object && model[key].getSavableData) {
682
+ result[key] = model[key].getSavableData();
683
+ }
684
+ else {
685
+ result[key] = model[key];
686
+ }
687
+ return result;
688
+ }, {});
689
+ };
690
+
691
+ // export class User implements EndUserInterface {
692
+ // userid?: string;
693
+ // firstName?: string;
694
+ // lastName?: string;
695
+ // middleName?: string;
696
+ // email?: string;
697
+ // domain?: string;
698
+ // department?: string;
699
+ // telephoneNumber?: string;
700
+ // homeNumber?: string;
701
+ // mobileNumber?: string;
702
+ // pagerNumber?: string;
703
+ // displayName?: string;
704
+ // ldapIntegrated?: boolean;
705
+ // sparkLicenses: Array<any>;
706
+ // extensionMobility: any;
707
+ // singleNumberReach?: SingleNumberReach;
708
+ // primaryLineReference: LineDirectory;
709
+ // voicemail: Voicemail;
710
+ // devices: Array<Device>;
711
+ // deviceProfiles: Array<Device>;
712
+ // lines: Array<Line>;
713
+ // features: Array<string>;
714
+ // ucServiceProfile: string;
715
+ // subscribeCss: string;
716
+ // presenceGroup: string;
717
+ // allowDeviceControlFromCti: boolean;
718
+ // enableCrossClusterEm: boolean;
719
+ // enableUserToHostConferenceNow: boolean;
720
+ // attendeesAccessCode: string;
721
+ // manager: string;
722
+ // title: string;
723
+ // associatedPc: string;
724
+ // userProfile: string;
725
+ // enableMobileVoiceAccess: boolean;
726
+ // mlppUserIdNumber: string;
727
+ // mlppPrecedencePattern: string;
728
+ // userLocale: string;
729
+ // siteId: number;
730
+ // siteName: string;
731
+ // location: string;
732
+ // lineAppearances: Array<LineAppearance>;
733
+ // meetMes: Array<MeetMeConferencing>;
734
+ // token: string;
735
+ // mlppPassword: string;
736
+ // password?: string;
737
+ // digestCredentials?: string;
738
+ // newUserid: string;
739
+ // homeCluster: boolean;
740
+ // directoryUri: string;
741
+ // createUserMode: boolean;
742
+ // pin: string;
743
+ // migrationVmUnchanged: boolean;
744
+ // migrationImPUnchanged: boolean;
745
+ // telecomManagerRule: boolean;
746
+ // userTemplateUdpDeviceTypesRules: UdpDeviceTypesRule[];
747
+ // deletedUserTemplateUdpDeviceTypesRules: UdpDeviceTypesRule[];
748
+ // hasModifiedCache = false;
749
+ // vmOnlyUser?: boolean;
750
+ // constructor(user: EndUserInterface, devicesStates = null, deviceProfilesStates = null, linesStates = null) {
751
+ // Object.assign(this, user || {});
752
+ // this.extensionMobility = new ExtensionMobility(this.extensionMobility);
753
+ // this.singleNumberReach = new SingleNumberReach(this.singleNumberReach);
754
+ // this.primaryLineReference = new LineDirectory(this.primaryLineReference);
755
+ // this.voicemail = new Voicemail(this.voicemail);
756
+ // this.devices = !this.devices ? [] : this.devices.map(device => new Device(device));
757
+ // this.userTemplateUdpDeviceTypesRules = !this.userTemplateUdpDeviceTypesRules ? [] : this.userTemplateUdpDeviceTypesRules.map(rule => new UdpDeviceTypesRule(rule));
758
+ // this.deviceProfiles = !this.deviceProfiles ? [] : this.deviceProfiles
759
+ // .map(device => new Device(device, appValidators, DeviceKind.deviceProfile));
760
+ // this.lines = !this.lines ? [] : this.lines.map(line => new Line(line));
761
+ // this.lineAppearances = !this.lineAppearances ? [] : this.lineAppearances.map(lineAppearance => new LineAppearance(lineAppearance));
762
+ // this.meetMes = !this.meetMes ? [] : this.meetMes.map(meetMe => new MeetMeConferencing(meetMe));
763
+ // this.sparkLicenses = !this.sparkLicenses ? [] : this.sparkLicenses.map(spark => new Spark(spark));
764
+ // this.features = this.features || [];
765
+ // this.password = null;
766
+ // this.digestCredentials = null;
767
+ // this.deletedUserTemplateUdpDeviceTypesRules = [];
768
+ // }
769
+ // getSavableData() {
770
+ // const excludedFields: string[] = ['form', 'editMode$', 'viewMode', 'token', 'hasModifiedCache', 'deletedUserTemplateUdpDeviceTypesRules'];
771
+ // return getSavableData(this, excludedFields);
772
+ // }
773
+ // }
774
+ class EndUser {
775
+ constructor(init) {
776
+ this.lines = [];
777
+ Object.assign(this, init || {});
778
+ this.voicemail = new Voicemail(init?.voicemail);
779
+ }
780
+ }
781
+ var DnRangeType;
782
+ (function (DnRangeType) {
783
+ DnRangeType["extension"] = "EXTENSION";
784
+ DnRangeType["cpg"] = "CPG";
785
+ DnRangeType["callpark"] = "CALLPARK";
786
+ DnRangeType["huntgroup"] = "HUNTGROUP";
787
+ DnRangeType["meetme"] = "MEETME";
788
+ DnRangeType["did"] = "DID";
789
+ })(DnRangeType || (DnRangeType = {}));
790
+ var UserViewType;
791
+ (function (UserViewType) {
792
+ UserViewType[UserViewType["details"] = 0] = "details";
793
+ UserViewType[UserViewType["devices"] = 1] = "devices";
794
+ UserViewType[UserViewType["lines"] = 2] = "lines";
795
+ UserViewType[UserViewType["snr"] = 3] = "snr";
796
+ UserViewType[UserViewType["features"] = 4] = "features";
797
+ UserViewType[UserViewType["overview"] = 5] = "overview";
798
+ })(UserViewType || (UserViewType = {}));
799
+ // export class ExtensionMobility implements ExtensionMobilityInterface {
800
+ // deviceType: string = '';
801
+ // deviceProfileName: string = '';
802
+ // buttonTemplate: string = '';
803
+ // services: string[] = [];
804
+ // protocol: string = '';
805
+ // userLocale: string = '';
806
+ // lineAssociations: LineAssociation[] = [];
807
+ // speedDials: SpeedDial[] = [];
808
+ // constructor(extensionMobility: ExtensionMobilityInterface) {
809
+ // Object.assign(this, extensionMobility || {});
810
+ // }
811
+ // getSavableData() {
812
+ // return getSavableData(this);
813
+ // }
814
+ // }
815
+ // export class ExtensionMobilityInterface {
816
+ // deviceType?: string;
817
+ // deviceProfileName?: string;
818
+ // buttonTemplate?: string;
819
+ // services?: string[];
820
+ // protocol?: string;
821
+ // userLocale?: string;
822
+ // lineAssociations: LineAssociation[] = [];
823
+ // speedDials: SpeedDial[] = [];
824
+ // constructor(extensionMobility: ExtensionMobilityInterface) {
825
+ // Object.assign(this, extensionMobility || {});
826
+ // this.speedDials.map(dial => new SpeedDial(dial, false));
827
+ // }
828
+ // getSavableData() {
829
+ // return getSavableData(this);
830
+ // }
831
+ // }
832
+ // export interface SingleNumberReachInterface {
833
+ // remoteDestinationProfileName: string;
834
+ // remoteDestinations?: RemoteDestinationInterface[];
835
+ // devicePool?: string;
836
+ // css?: string;
837
+ // rerouteCss?: string;
838
+ // }
839
+ // export interface RemoteDestinationInterface {
840
+ // name: string;
841
+ // destination: string;
842
+ // answerTooSoonTimer: number;
843
+ // answerTooLateTimer: number;
844
+ // delayBeforeRingingCell: number;
845
+ // lineAssociations: LineDirectoryInterface[];
846
+ // snrVoicemailPolicy?: string;
847
+ // enableMoveToMobile?: boolean;
848
+ // ringSchedule?: RingScheduleInterface;
849
+ // todError?: boolean;
850
+ // enableSingleNumberReach?: boolean;
851
+ // }
852
+ // export interface SingleNumberReachInterface {
853
+ // remoteDestinationProfileName: string;
854
+ // remoteDestinations?: RemoteDestinationInterface[];
855
+ // devicePool?: string;
856
+ // css?: string;
857
+ // rerouteCss?: string;
858
+ // }
859
+ class Voicemail {
860
+ constructor(vm) {
861
+ this.extension = '';
862
+ this.vmUserTemplate = '';
863
+ this.emailAddress = '';
864
+ this.greetings = [];
865
+ this.pin = '';
866
+ // non-savable data
867
+ this.changeExtensionByNewLine = 0;
868
+ if (vm && vm.extension) {
869
+ Object.assign(this, vm);
870
+ if (this.extension && this.extension.startsWith('+')) {
871
+ this.extension = '\\' + this.extension;
872
+ }
873
+ if (this.extension) {
874
+ // this.notificationDevices = this.initDevices();
875
+ // this.greetings = !this.greetings ? [] : this.greetings.map(greetings => new GreetingDetail(greetings));
876
+ }
877
+ }
878
+ else {
879
+ this.extension = '';
880
+ this.vmUserTemplate = '';
881
+ }
882
+ }
883
+ getSavableData() {
884
+ const nonSavableData = ['vmMailbox', 'notificationDevices', 'changeExtensionByNewLine'];
885
+ return getSavableData(this, nonSavableData);
886
+ }
887
+ }
888
+
889
+ const ENTITY_CHANGE_TYPE = {
890
+ ADDED: 'added',
891
+ UPDATED: 'updated',
892
+ EXISTING: 'existing',
893
+ REMOVED: 'removed',
894
+ };
895
+ function deepClone(value) {
896
+ return JSON.parse(JSON.stringify(value));
897
+ }
898
+ function toApiBooleanString(value) {
899
+ if (value === true || value === 'true') {
900
+ return 'true';
901
+ }
902
+ if (value === false || value === 'false') {
903
+ return 'false';
904
+ }
905
+ return value == null || value === '' ? '' : String(value);
906
+ }
907
+ function toApiStringValue(value) {
908
+ if (value === true) {
909
+ return 'true';
910
+ }
911
+ if (value === false) {
912
+ return 'false';
913
+ }
914
+ return value == null ? '' : String(value);
915
+ }
916
+ function normalizeCallInfoDisplay(callInfoDisplay) {
917
+ if (!callInfoDisplay) {
918
+ return null;
919
+ }
920
+ if (typeof callInfoDisplay === 'string') {
921
+ try {
922
+ const parsed = JSON.parse(callInfoDisplay);
923
+ return normalizeCallInfoDisplay(parsed);
924
+ }
925
+ catch {
926
+ return null;
927
+ }
928
+ }
929
+ if (typeof callInfoDisplay !== 'object') {
930
+ return null;
931
+ }
932
+ const source = callInfoDisplay;
933
+ return {
934
+ callerName: source['callerName'] != null ? toApiBooleanString(source['callerName']) : null,
935
+ callerNumber: source['callerNumber'] != null ? toApiBooleanString(source['callerNumber']) : null,
936
+ redirectedNumber: source['redirectedNumber'] != null ? toApiBooleanString(source['redirectedNumber']) : null,
937
+ dialedNumber: source['dialedNumber'] != null ? toApiBooleanString(source['dialedNumber']) : null,
938
+ };
939
+ }
940
+ function normalizeDidPattern(didPattern, line, directoryNumber) {
941
+ if (didPattern && typeof didPattern === 'object') {
942
+ return didPattern;
943
+ }
944
+ if (typeof didPattern === 'string' && didPattern.trim()) {
945
+ return { calledPartyTransformationMask: didPattern };
946
+ }
947
+ const dn = directoryNumber || line?.directoryNumber?.directoryNumber;
948
+ if (dn) {
949
+ return { calledPartyTransformationMask: dn };
950
+ }
951
+ return null;
952
+ }
953
+ function normalizeDirectoryNumber(directoryNumber) {
954
+ const { displayValue: _displayValue, ...rest } = directoryNumber;
955
+ return {
956
+ directoryNumber: rest.directoryNumber ?? '',
957
+ routePartitionName: rest.routePartitionName ?? '',
958
+ templateDirectoryNumber: rest.templateDirectoryNumber,
959
+ pkid: rest.pkid || null,
960
+ dnType: rest.dnType || null,
961
+ subType: rest.subType ?? null,
962
+ };
963
+ }
964
+ function prepareLineAssociation(association, line) {
965
+ const prepared = deepClone(association);
966
+ const lineDn = line?.directoryNumber;
967
+ if (lineDn) {
968
+ prepared.directoryNumber = {
969
+ ...prepared.directoryNumber,
970
+ directoryNumber: lineDn.directoryNumber || '',
971
+ routePartitionName: lineDn.routePartitionName || '',
972
+ templateDirectoryNumber: lineDn.templateDirectoryNumber ??
973
+ prepared.directoryNumber?.templateDirectoryNumber,
974
+ };
975
+ }
976
+ prepared.directoryNumber = normalizeDirectoryNumber(prepared.directoryNumber);
977
+ prepared.entityChangeType = prepared.entityChangeType || ENTITY_CHANGE_TYPE.ADDED;
978
+ prepared.logMissedCall = toApiBooleanString(prepared.logMissedCall) || 'false';
979
+ prepared.callInfoDisplay = normalizeCallInfoDisplay(prepared.callInfoDisplay);
980
+ prepared.didPattern = normalizeDidPattern(prepared.didPattern, line, prepared.directoryNumber?.directoryNumber);
981
+ prepared.visualMWI = toApiStringValue(prepared.visualMWI);
982
+ prepared.audibleMWI = toApiStringValue(prepared.audibleMWI);
983
+ prepared.associated = prepared.associated ?? true;
984
+ return prepared;
985
+ }
986
+ function prepareLine(line) {
987
+ const prepared = deepClone(line);
988
+ prepared.entityChangeType = prepared.entityChangeType || ENTITY_CHANGE_TYPE.ADDED;
989
+ if (prepared.directoryNumber) {
990
+ prepared.directoryNumber = normalizeDirectoryNumber(prepared.directoryNumber);
991
+ }
992
+ return prepared;
993
+ }
994
+ function syncDeviceLineAssociations(device, lines) {
995
+ device.lineAssociations = (device.lineAssociations || []).map((association, index) => prepareLineAssociation(association, lines[index]));
996
+ }
997
+ function prepareDeviceForSave(device, userId, lines, deviceName) {
998
+ const prepared = deepClone(device);
999
+ const resolvedName = deviceName.trim();
1000
+ prepared.name = resolvedName;
1001
+ prepared.newName = resolvedName;
1002
+ prepared.entityChangeType = prepared.entityChangeType || ENTITY_CHANGE_TYPE.ADDED;
1003
+ prepared.createDeviceMode = prepared.createDeviceMode ?? false;
1004
+ if (prepared.extraOptions) {
1005
+ prepared.extraOptions.mobilityUserId = userId;
1006
+ }
1007
+ syncDeviceLineAssociations(prepared, lines);
1008
+ return prepared;
1009
+ }
1010
+ function resolvePrimaryLineReference(user) {
1011
+ const firstDeviceAssociation = user.devices?.[0]?.lineAssociations?.[0]?.directoryNumber;
1012
+ if (firstDeviceAssociation) {
1013
+ return firstDeviceAssociation;
1014
+ }
1015
+ const firstLineDn = user.lines?.[0]?.directoryNumber;
1016
+ return firstLineDn ?? null;
1017
+ }
1018
+ function buildSavableEndUser(endUser, lines, devices, deviceProfiles, form, options = {}) {
1019
+ const user = deepClone(endUser);
1020
+ user.userid = form.userId || user.userid || '';
1021
+ user.firstName = form.firstName || user.firstName || '';
1022
+ user.lastName = form.lastName || user.lastName || '';
1023
+ user.email = form.email || user.email || '';
1024
+ user.createUserMode = false;
1025
+ user.lines = (lines || []).map(line => prepareLine(line));
1026
+ user.devices = (devices || []).map((device, index) => prepareDeviceForSave(device, user.userid || '', user.lines, options.resolveDeviceName?.(index, device) ?? device.name ?? device.newName ?? ''));
1027
+ user.deviceProfiles = (deviceProfiles || []).map((profile, index) => prepareDeviceForSave(profile, user.userid || '', user.lines, options.resolveDeviceProfileName?.(index, profile) ?? profile.name ?? profile.newName ?? ''));
1028
+ user.primaryLineReference = resolvePrimaryLineReference(user);
1029
+ const snr = user.singleNumberReach;
1030
+ if (snr && !snr.remoteDestinationProfileName) {
1031
+ user.singleNumberReach = null;
1032
+ }
1033
+ return user;
1034
+ }
1035
+
1036
+ /** Matches device types like `Cisco 8851`. */
1037
+ const CISCO_DIGIT_DEVICE_TYPE_PATTERN = /^Cisco\s+\d+$/i;
1038
+ const DEFAULT_SEP_DEVICE_PREFIX = 'SEP';
1039
+ function applyDefaultDevicePrefixIfMissing(device) {
1040
+ if (device.prefix?.trim()) {
1041
+ return;
1042
+ }
1043
+ const deviceType = device.deviceType?.trim() ?? '';
1044
+ if (CISCO_DIGIT_DEVICE_TYPE_PATTERN.test(deviceType)) {
1045
+ device.prefix = DEFAULT_SEP_DEVICE_PREFIX;
1046
+ }
1047
+ }
1048
+
1049
+ /**
1050
+ * Strips a leading device-prefix group from `deviceNameRegex`, returning the pattern
1051
+ * to validate the name field value (without matPrefix).
1052
+ *
1053
+ * - `([sS][eE][pP]|BAT)[0-9a-fA-F]{12}` → `[0-9a-fA-F]{12}`
1054
+ * - `[a-zA-Z0-9]{1,15}` → `[a-zA-Z0-9]{1,15}` (unchanged)
1055
+ */
1056
+ function parseDeviceNameRegexBody(deviceNameRegex) {
1057
+ const fullRegex = deviceNameRegex?.trim() ?? '';
1058
+ if (!fullRegex) {
1059
+ return '';
1060
+ }
1061
+ return stripLeadingPrefixGroup(fullRegex);
1062
+ }
1063
+ function stripLeadingPrefixGroup(regex) {
1064
+ const parenMatch = regex.match(/^(\(.+?\))(.+)$/s);
1065
+ if (parenMatch?.[2]?.trim()) {
1066
+ return parenMatch[2];
1067
+ }
1068
+ const literalMatch = regex.match(/^([A-Za-z]+)(\[.+\])$/s);
1069
+ if (literalMatch?.[2]?.trim()) {
1070
+ return literalMatch[2];
1071
+ }
1072
+ return regex;
1073
+ }
1074
+
393
1075
  class UserCreationWizardService {
1076
+ get currentSite() {
1077
+ return this._currentSite;
1078
+ }
1079
+ get firstLineRoutePartition() {
1080
+ return this.lines[0]?.directoryNumber?.routePartitionName ?? '';
1081
+ }
1082
+ get siteDefaultRoutePartition() {
1083
+ return this.siteDefaults?.routePartition || '';
1084
+ }
1085
+ get routePartitionNamesList() {
1086
+ return this.siteDefaults ? this.siteDefaults.routePartitionFilter : [];
1087
+ }
394
1088
  constructor() {
395
- this.api = inject(UserCreationApiService);
1089
+ this.userCreationApiService = inject(UserCreationApiService);
396
1090
  this.ldapTableColumns = ['userId', 'firstName', 'lastName', 'email', 'add'];
397
1091
  this.userCreationTypes = ['CUCM', 'MT'];
1092
+ this.template = null;
1093
+ this.endUser = null;
1094
+ this.lines = [];
1095
+ this.devices = [];
1096
+ this.deviceProfiles = [];
1097
+ this.templateLinesSnapshot = null;
1098
+ this._currentSite = null;
398
1099
  this.siteOptions = [];
399
1100
  this.templateOptions = [];
400
1101
  this.lineOptions = [];
@@ -404,40 +1105,89 @@ class UserCreationWizardService {
404
1105
  this.overviewUsers = [];
405
1106
  this.overviewLines = [];
406
1107
  this.overviewDevices = [];
1108
+ this.overviewDeviceProfiles = [];
1109
+ this.userDetailsFormValue = null;
407
1110
  this.userDetailsForm = {
408
1111
  userId: '',
409
1112
  firstName: '',
410
1113
  lastName: '',
411
- email: ''
1114
+ email: '',
412
1115
  };
413
1116
  this.lineSelections = [];
414
1117
  this.deviceEntries = [];
1118
+ this.availableNumbers = [];
1119
+ this.deviceTypes = [];
1120
+ this.siteDefaults = null;
1121
+ this.originalSiteDefaults = null;
1122
+ this.templateLines = [];
1123
+ this.templateDevices = [];
1124
+ this.templateUserDetails = {};
415
1125
  this.selectedSite = null;
416
- this.selectedTemplate = null;
1126
+ this.selectedTemplateName = null;
1127
+ this.selectedTemplateId = null;
417
1128
  this.selectedUserCreationType = 'CUCM';
418
- this.addedLdapUserIds = new Set();
419
- this.loadPlaceholderData();
1129
+ this.availableDidPatternsMappedToDn = {};
1130
+ this.deviceDefaultsLoadedSubject = new Subject();
1131
+ this.deviceDefaultsLoaded$ = this.deviceDefaultsLoadedSubject.asObservable();
1132
+ this.selectedLdapUser = null;
1133
+ this.ldapUsersTotal = 0;
1134
+ // this.loadPlaceholderData();
1135
+ }
1136
+ get isLdapIntegrated() {
1137
+ return !!this.endUser?.ldapIntegrated;
1138
+ }
1139
+ selectLdapUser(user) {
1140
+ this.selectedLdapUser = user;
1141
+ if (this.endUser) {
1142
+ this.endUser.ldapIntegrated = true;
1143
+ this.endUser.userid = user.userid;
1144
+ this.endUser.firstName = user.firstName ?? '';
1145
+ this.endUser.lastName = user.lastName ?? '';
1146
+ this.endUser.email = user.email ?? '';
1147
+ }
1148
+ this.userDetailsForm = {
1149
+ userId: user.userid,
1150
+ firstName: user.firstName ?? '',
1151
+ lastName: user.lastName ?? '',
1152
+ email: user.email ?? '',
1153
+ };
1154
+ this.rebuildOverviewUsers();
420
1155
  }
421
- addLdapUser(row) {
1156
+ clearLdapUserSelection() {
1157
+ this.selectedLdapUser = null;
1158
+ if (this.endUser) {
1159
+ this.endUser.ldapIntegrated = false;
1160
+ this.endUser.userid = '';
1161
+ this.endUser.firstName = '';
1162
+ this.endUser.lastName = '';
1163
+ this.endUser.email = '';
1164
+ }
422
1165
  this.userDetailsForm = {
423
- userId: row.userId,
424
- firstName: row.firstName,
425
- lastName: row.lastName,
426
- email: row.email
1166
+ userId: '',
1167
+ firstName: '',
1168
+ lastName: '',
1169
+ email: '',
427
1170
  };
428
- this.addedLdapUserIds.add(row.userId);
429
1171
  this.rebuildOverviewUsers();
430
1172
  }
431
- isLdapUserAdded(row) {
432
- return this.addedLdapUserIds.has(row.userId);
1173
+ isLdapUserRowSelected(row) {
1174
+ return this.selectedLdapUser?.userid === row.userid;
1175
+ }
1176
+ setLdapUsersResult(users, total) {
1177
+ this.ldapUsers = users;
1178
+ this.ldapUsersTotal = total;
433
1179
  }
434
1180
  setSelectedSite(site) {
435
- this.selectedSite = site;
1181
+ this.selectedSite = site || null;
436
1182
  }
437
1183
  setSelectedTemplate(template) {
438
- this.selectedTemplate = template;
1184
+ this.selectedTemplateName = template?.name || null;
1185
+ this.selectedTemplateId = template?.id || null;
439
1186
  this.rebuildOverviewUsers();
440
1187
  }
1188
+ setCurrentSite(site) {
1189
+ this._currentSite = site;
1190
+ }
441
1191
  resetTemplateDrivenData() {
442
1192
  this.lineOptions = [];
443
1193
  this.routePartitionOptions = [];
@@ -448,69 +1198,124 @@ class UserCreationWizardService {
448
1198
  this.rebuildOverviewDevices();
449
1199
  }
450
1200
  applyTemplateTokenPayload(payload) {
451
- const template = this.extractTemplateFromTokenPayload(payload);
452
- const endUser = template?.endUser || {};
453
- const linesFromTemplate = Array.isArray(endUser.lines) ? endUser.lines : [];
454
- const devicesFromTemplate = Array.isArray(endUser.devices) ? endUser.devices : [];
455
- this.userDetailsForm = {
456
- userId: this.valueToString(endUser.userid),
457
- firstName: this.valueToString(endUser.firstName),
458
- lastName: this.valueToString(endUser.lastName),
459
- email: this.valueToString(endUser.email)
460
- };
461
- const mappedLineOptions = linesFromTemplate
462
- .map(line => ({
463
- number: this.valueToString(line?.directoryNumber?.directoryNumber),
464
- did: this.valueToString(line?.didPatterns?.[0]?.pattern || line?.directoryNumber?.directoryNumber),
465
- css: this.valueToString(typeof line?.callingSearchSpace === 'string'
466
- ? line.callingSearchSpace
467
- : line?.callingSearchSpace?.name),
468
- description: this.valueToString(line?.description)
469
- }))
470
- .filter(line => line.number.trim().length > 0);
471
- if (mappedLineOptions.length) {
472
- this.lineOptions = this.uniqueByNumber(mappedLineOptions);
473
- this.lineSelections = this.lineOptions.map(line => ({
474
- lineNumber: line.number,
475
- routePartitionName: linesFromTemplate.find(source => (source?.directoryNumber?.directoryNumber || '') === line.number)?.directoryNumber?.routePartitionName || null
476
- }));
1201
+ this.template = this.extractTemplateFromTokenPayload(payload);
1202
+ this.endUser = new EndUser(this.template?.endUser);
1203
+ this.lines = this.endUser && Array.isArray(this.endUser.lines) ? this.endUser.lines : [];
1204
+ this.devices = this.endUser && Array.isArray(this.endUser.devices) ? this.endUser.devices : [];
1205
+ this.deviceProfiles = this.endUser && Array.isArray(this.endUser.deviceProfiles) ? this.endUser.deviceProfiles : [];
1206
+ this.initTemplateDnsNamesForLines();
1207
+ // this.userDetailsForm = {
1208
+ // userId: this.valueToString(this.endUser?.userid ?? ''),
1209
+ // firstName: this.valueToString(this.endUser?.firstName ?? ''),
1210
+ // lastName: this.valueToString(this.endUser?.lastName ?? ''),
1211
+ // email: this.valueToString(this.endUser?.email ?? '')
1212
+ // };
1213
+ // const mappedLineOptions: LineOption[] = linesFromTemplate
1214
+ // .map(line => ({
1215
+ // number: this.valueToString(line?.directoryNumber?.directoryNumber),
1216
+ // did: this.valueToString(line?.didPatterns?.[0]?.pattern || line?.directoryNumber?.directoryNumber),
1217
+ // css: this.valueToString(
1218
+ // typeof line?.callingSearchSpace === 'string'
1219
+ // ? line.callingSearchSpace
1220
+ // : line?.callingSearchSpace?.name
1221
+ // ),
1222
+ // description: this.valueToString(line?.description)
1223
+ // }))
1224
+ // .filter(line => line.number.trim().length > 0);
1225
+ this.devices.forEach(device => {
1226
+ this.initDeviceWithSiteInfo(device);
1227
+ applyDefaultDevicePrefixIfMissing(device);
1228
+ });
1229
+ this.deviceProfiles.forEach(device => this.initDeviceWithSiteInfo(device));
1230
+ this.lines.forEach(line => this.initLineWithSiteInfo(line));
1231
+ this.captureTemplateLinesSnapshot();
1232
+ if (this.selectedSite) {
1233
+ this.loadDeviceDefaultsForDevices(this.selectedSite).subscribe();
477
1234
  }
478
- else {
479
- const lineAssociations = devicesFromTemplate.flatMap(device => device.lineAssociations || []);
480
- const associatedLineOptions = lineAssociations
481
- .map(association => {
482
- const number = association?.directoryNumber?.directoryNumber || '';
483
- return {
484
- number,
485
- did: number,
486
- css: '',
487
- description: ''
488
- };
489
- })
490
- .filter(line => line.number.trim().length > 0);
491
- this.lineOptions = this.uniqueByNumber(associatedLineOptions);
492
- this.lineSelections = this.lineOptions.map(line => ({
493
- lineNumber: line.number,
494
- routePartitionName: lineAssociations.find(source => (source?.directoryNumber?.directoryNumber || '') === line.number)?.directoryNumber?.routePartitionName || null
495
- }));
1235
+ // if (mappedLineOptions.length) {
1236
+ // this.lineOptions = this.uniqueByNumber(mappedLineOptions);
1237
+ // this.lineSelections = this.lineOptions.map(line => ({
1238
+ // lineNumber: line.number,
1239
+ // routePartitionName: linesFromTemplate.find(
1240
+ // source => (source?.directoryNumber?.directoryNumber || '') === line.number
1241
+ // )?.directoryNumber?.routePartitionName || null
1242
+ // }));
1243
+ // } else {
1244
+ // const lineAssociations = devicesFromTemplate.flatMap(device => device.lineAssociations || []);
1245
+ // const associatedLineOptions: LineOption[] = lineAssociations
1246
+ // .map(association => {
1247
+ // const number = association?.directoryNumber?.directoryNumber || '';
1248
+ // return {
1249
+ // number,
1250
+ // did: number,
1251
+ // css: '',
1252
+ // description: ''
1253
+ // };
1254
+ // })
1255
+ // .filter(line => line.number.trim().length > 0);
1256
+ // this.lineOptions = this.uniqueByNumber(associatedLineOptions);
1257
+ // this.lineSelections = this.lineOptions.map(line => ({
1258
+ // lineNumber: line.number,
1259
+ // routePartitionName: lineAssociations.find(
1260
+ // source => (source?.directoryNumber?.directoryNumber || '') === line.number
1261
+ // )?.directoryNumber?.routePartitionName || null
1262
+ // }));
1263
+ // this.templateLines.forEach((line: any) => this.initLineWithSiteInfo(line));
1264
+ // this.initTemplateDnsNamesForLines(this.templateLines);
1265
+ // }
1266
+ // const routePartitions = this.lineSelections
1267
+ // .map(line => line.routePartitionName)
1268
+ // .filter((value): value is string => !!value && value.trim().length > 0);
1269
+ // this.routePartitionOptions = this.uniqueStrings(routePartitions);
1270
+ // this.deviceEntries = devicesFromTemplate.map(device => ({
1271
+ // deviceType: this.valueToString(device.deviceType),
1272
+ // protocol: this.valueToString(device.protocol),
1273
+ // buttonTemplate: this.valueToString(device.buttonTemplate),
1274
+ // name: this.valueToString(device.name)
1275
+ // }));
1276
+ // this.deviceRows = this.deviceEntries.map((_, index) => index + 1);
1277
+ // this.rebuildOverviewUsers();
1278
+ // this.rebuildOverviewLines();
1279
+ // this.rebuildOverviewDevices();
1280
+ }
1281
+ setSelectedUserCreationType(type) {
1282
+ this.selectedUserCreationType = type;
1283
+ }
1284
+ resetUserDetailsStepState() {
1285
+ this.userDetailsFormValue = null;
1286
+ this.userDetailsForm = {
1287
+ userId: '',
1288
+ firstName: '',
1289
+ lastName: '',
1290
+ email: '',
1291
+ };
1292
+ this.selectedLdapUser = null;
1293
+ this.ldapUsers = [];
1294
+ this.ldapUsersTotal = 0;
1295
+ if (this.templateLinesSnapshot) {
1296
+ this.lines = JSON.parse(JSON.stringify(this.templateLinesSnapshot));
496
1297
  }
497
- const routePartitions = this.lineSelections
498
- .map(line => line.routePartitionName)
499
- .filter((value) => !!value && value.trim().length > 0);
500
- this.routePartitionOptions = this.uniqueStrings(routePartitions);
501
- this.deviceEntries = devicesFromTemplate.map(device => ({
502
- deviceType: this.valueToString(device.deviceType),
503
- protocol: this.valueToString(device.protocol),
504
- buttonTemplate: this.valueToString(device.buttonTemplate),
505
- name: this.valueToString(device.name)
506
- }));
507
- this.deviceRows = this.deviceEntries.map((_, index) => index + 1);
508
- this.rebuildOverviewUsers();
1298
+ this.devices.forEach(device => {
1299
+ device.name = '';
1300
+ });
1301
+ this.deviceProfiles.forEach(profile => {
1302
+ profile.name = '';
1303
+ });
1304
+ if (this.endUser) {
1305
+ this.endUser.userid = '';
1306
+ this.endUser.firstName = '';
1307
+ this.endUser.lastName = '';
1308
+ this.endUser.email = '';
1309
+ this.endUser.ldapIntegrated = false;
1310
+ this.endUser.lines = this.lines;
1311
+ }
1312
+ this.overviewUsers = [];
509
1313
  this.rebuildOverviewLines();
510
1314
  this.rebuildOverviewDevices();
1315
+ this.rebuildOverviewDeviceProfiles();
511
1316
  }
512
- setSelectedUserCreationType(type) {
513
- this.selectedUserCreationType = type;
1317
+ captureTemplateLinesSnapshot() {
1318
+ this.templateLinesSnapshot = JSON.parse(JSON.stringify(this.lines));
514
1319
  }
515
1320
  setUserDetailsField(field, value) {
516
1321
  this.userDetailsForm = {
@@ -519,6 +1324,47 @@ class UserCreationWizardService {
519
1324
  };
520
1325
  this.rebuildOverviewUsers();
521
1326
  }
1327
+ applyUserDetailsFormValue(formValue) {
1328
+ this.userDetailsFormValue = formValue;
1329
+ this.userDetailsForm = {
1330
+ userId: formValue.userId || '',
1331
+ firstName: formValue.firstName || '',
1332
+ lastName: formValue.lastName || '',
1333
+ email: formValue.email || '',
1334
+ };
1335
+ formValue.lines?.forEach((lineValue, index) => {
1336
+ const line = this.lines[index];
1337
+ if (!line?.directoryNumber) {
1338
+ return;
1339
+ }
1340
+ line.directoryNumber.directoryNumber = lineValue.number || '';
1341
+ line.directoryNumber.routePartitionName = lineValue.routePartition || '';
1342
+ });
1343
+ formValue.devices?.forEach((deviceValue, index) => {
1344
+ const device = this.devices[index];
1345
+ if (!device) {
1346
+ return;
1347
+ }
1348
+ device.name = deviceValue.name || '';
1349
+ });
1350
+ formValue.deviceProfiles?.forEach((profileValue, index) => {
1351
+ const profile = this.deviceProfiles[index];
1352
+ if (!profile) {
1353
+ return;
1354
+ }
1355
+ profile.name = profileValue.name || '';
1356
+ });
1357
+ if (this.endUser) {
1358
+ this.endUser.userid = formValue.userId || '';
1359
+ this.endUser.firstName = formValue.firstName || '';
1360
+ this.endUser.lastName = formValue.lastName || '';
1361
+ this.endUser.email = formValue.email || '';
1362
+ }
1363
+ this.rebuildOverviewUsers();
1364
+ this.rebuildOverviewLines();
1365
+ this.rebuildOverviewDevices();
1366
+ this.rebuildOverviewDeviceProfiles();
1367
+ }
522
1368
  setLineSelection(index, lineNumber) {
523
1369
  if (!this.lineSelections[index]) {
524
1370
  return;
@@ -568,63 +1414,83 @@ class UserCreationWizardService {
568
1414
  }
569
1415
  return entry.name || '';
570
1416
  }
571
- // Placeholder bootstrap until backend APIs are connected.
572
- loadPlaceholderData() {
573
- this.siteOptions = ['Site 1', 'Site 2', 'Site 3'];
574
- this.templateOptions = ['8851 + CSF'];
575
- this.lineOptions = [
576
- {
577
- number: '557046',
578
- did: '+13125557046',
579
- css: 'Atlanta_internal_css',
580
- description: ''
581
- },
582
- {
583
- number: '557047',
584
- did: '+13125557047',
585
- css: 'Atlanta_internal_css',
586
- description: ''
587
- },
588
- {
589
- number: '557048',
590
- did: '+13125557048',
591
- css: 'Atlanta_internal_css',
592
- description: ''
1417
+ getSiteAllData(siteId) {
1418
+ return this.userCreationApiService.getSiteAllData(siteId).pipe(tap((res) => {
1419
+ if (res && res[0]) {
1420
+ const site = new Site(res[0]);
1421
+ this.selectedSite = site.id;
593
1422
  }
594
- ];
595
- this.routePartitionOptions = ['Atlanta_internal_PT', 'Beijing_national_PT'];
596
- this.deviceRows = [1, 2];
597
- this.ldapUsers = [
598
- { userId: 'John.Doe', firstName: 'John', lastName: 'Doe', email: 'john.doe@car.west.io' },
599
- { userId: 'Jane.Smith', firstName: 'Jane', lastName: 'Smith', email: 'jane.smith@car.west.io' }
600
- ];
601
- this.lineSelections = [
602
- {
603
- lineNumber: null,
604
- routePartitionName: this.routePartitionOptions[0] || null
1423
+ if (res && res[1]) {
1424
+ this.siteDefaults = new SiteDefaults(res[1], false);
1425
+ this.originalSiteDefaults = new SiteDefaults(res[1], false);
1426
+ this.routePartitionOptions = [...this.routePartitionNamesList];
605
1427
  }
606
- ];
607
- this.deviceEntries = [
608
- {
609
- deviceType: 'Cisco 8851',
610
- protocol: 'SIP',
611
- buttonTemplate: 'Standard 8851 SIP',
612
- name: ''
613
- },
614
- {
615
- deviceType: 'Cisco Unified Client Services Framework',
616
- protocol: 'SIP',
617
- buttonTemplate: 'Standard Client Services Framework',
618
- name: ''
1428
+ if (res && res[2]) {
1429
+ this.deviceTypes = res[2];
619
1430
  }
620
- ];
621
- this.selectedTemplate = this.selectedTemplate ?? null;
622
- this.rebuildOverviewUsers();
623
- this.rebuildOverviewLines();
624
- this.rebuildOverviewDevices();
1431
+ }), switchMap(res => this.loadDeviceDefaultsForDevices(siteId).pipe(map(() => res))));
1432
+ }
1433
+ loadDeviceDefaultsForDevices(siteId) {
1434
+ const deviceTypes = this.getUniqueDeviceTypes();
1435
+ if (!deviceTypes.length) {
1436
+ return of(undefined);
1437
+ }
1438
+ const requests = deviceTypes.map(deviceType => this.userCreationApiService.getDeviceDefaults(String(siteId), deviceType).pipe(tap(defaults => this.applyDeviceDefaultsToType(deviceType, defaults)), catchError(() => of(null))));
1439
+ return forkJoin(requests).pipe(tap(() => this.deviceDefaultsLoadedSubject.next()), map(() => undefined));
1440
+ }
1441
+ getUniqueDeviceTypes() {
1442
+ const types = [
1443
+ ...this.devices.map(device => device.deviceType),
1444
+ ...this.deviceProfiles.map(profile => profile.deviceType),
1445
+ ].filter((type) => !!type && type.trim().length > 0);
1446
+ return [...new Set(types)];
1447
+ }
1448
+ applyDeviceDefaultsToType(deviceType, defaults) {
1449
+ const nameValidationRegex = parseDeviceNameRegexBody(defaults.deviceNameRegex);
1450
+ const targets = [...this.devices, ...this.deviceProfiles].filter(device => device.deviceType === deviceType);
1451
+ targets.forEach(device => {
1452
+ device.deviceDefaults = defaults;
1453
+ device.nameValidationRegex = nameValidationRegex;
1454
+ device.nameValidationCaption = defaults.deviceNameExplained;
1455
+ });
1456
+ }
1457
+ getDeviceNamePrefix(deviceIndex, isProfile = false) {
1458
+ const device = isProfile ? this.deviceProfiles[deviceIndex] : this.devices[deviceIndex];
1459
+ const prefix = device?.prefix?.trim();
1460
+ return prefix || null;
1461
+ }
1462
+ getDeviceNameValidationCaption(deviceIndex, isProfile = false) {
1463
+ const device = isProfile ? this.deviceProfiles[deviceIndex] : this.devices[deviceIndex];
1464
+ return device?.nameValidationCaption || device?.deviceDefaults?.deviceNameExplained || '';
1465
+ }
1466
+ getDeviceNameValidationOptions(deviceIndex, isProfile = false) {
1467
+ const device = isProfile ? this.deviceProfiles[deviceIndex] : this.devices[deviceIndex];
1468
+ const regex = device?.nameValidationRegex?.trim() ||
1469
+ parseDeviceNameRegexBody(device?.deviceDefaults?.deviceNameRegex);
1470
+ if (!regex) {
1471
+ return null;
1472
+ }
1473
+ return {
1474
+ regex,
1475
+ caption: this.getDeviceNameValidationCaption(deviceIndex, isProfile),
1476
+ };
1477
+ }
1478
+ getNumberRange(siteId, routePartition) {
1479
+ this.availableDidPatternsMappedToDn = {};
1480
+ const pageSize = 9999;
1481
+ const params = { dntype: DnRangeType.extension, routepartition: routePartition, size: pageSize, page: 0 };
1482
+ this.availableNumbers = [];
1483
+ return this.userCreationApiService.getAvailableDnInRanges(siteId, params)
1484
+ .pipe(map((res) => {
1485
+ res.availableNumberList.forEach((availableNumber) => {
1486
+ this.setAvailableDidMappedToDn(availableNumber);
1487
+ this.availableNumbers = [...this.availableNumbers, ...this.getUnwrapNumberRange(availableNumber)];
1488
+ });
1489
+ }));
1490
+ // .pipe(this.handleError(true, false));
625
1491
  }
626
1492
  rebuildOverviewUsers() {
627
- const userTemplate = this.selectedTemplate || '';
1493
+ const userTemplate = this.selectedTemplateName || '';
628
1494
  const hasUserData = Object.values(this.userDetailsForm).some(value => value.trim().length > 0);
629
1495
  this.overviewUsers = hasUserData
630
1496
  ? [{
@@ -637,6 +1503,23 @@ class UserCreationWizardService {
637
1503
  : [];
638
1504
  }
639
1505
  rebuildOverviewLines() {
1506
+ const formLines = this.userDetailsFormValue?.lines;
1507
+ if (formLines?.length) {
1508
+ this.overviewLines = formLines
1509
+ .filter(line => !!line?.number?.trim())
1510
+ .map((lineValue, index) => {
1511
+ const templateLine = this.lines[index];
1512
+ const css = this.valueToString(templateLine?.callingSearchSpace);
1513
+ return {
1514
+ number: lineValue.number,
1515
+ did: lineValue.lineNumber || lineValue.number,
1516
+ routePartitionName: lineValue.routePartition || '',
1517
+ css,
1518
+ description: this.valueToString(templateLine?.description),
1519
+ };
1520
+ });
1521
+ return;
1522
+ }
640
1523
  this.overviewLines = this.lineSelections
641
1524
  .map(selection => {
642
1525
  if (!selection?.lineNumber) {
@@ -658,6 +1541,18 @@ class UserCreationWizardService {
658
1541
  }
659
1542
  rebuildOverviewDevices() {
660
1543
  const selectedLineNumbers = this.overviewLines.map(line => line.number).join(', ');
1544
+ const formDevices = this.userDetailsFormValue?.devices;
1545
+ if (formDevices?.length) {
1546
+ this.overviewDevices = formDevices
1547
+ .filter(device => !!device.deviceType?.trim() || !!device.name?.trim())
1548
+ .map(device => ({
1549
+ name: device.name || '',
1550
+ deviceType: device.deviceType || '',
1551
+ lines: selectedLineNumbers,
1552
+ description: `${device.protocol || ''} / ${device.buttonTemplate || ''}`.trim(),
1553
+ }));
1554
+ return;
1555
+ }
661
1556
  this.overviewDevices = this.deviceEntries
662
1557
  .map((device, index) => ({
663
1558
  device,
@@ -671,6 +1566,22 @@ class UserCreationWizardService {
671
1566
  description: `${device.protocol} / ${device.buttonTemplate}`
672
1567
  }));
673
1568
  }
1569
+ rebuildOverviewDeviceProfiles() {
1570
+ const selectedLineNumbers = this.overviewLines.map(line => line.number).join(', ');
1571
+ const formProfiles = this.userDetailsFormValue?.deviceProfiles;
1572
+ if (!formProfiles?.length) {
1573
+ this.overviewDeviceProfiles = [];
1574
+ return;
1575
+ }
1576
+ this.overviewDeviceProfiles = formProfiles
1577
+ .filter(profile => !!profile.deviceType?.trim() || !!profile.name?.trim())
1578
+ .map(profile => ({
1579
+ name: profile.name || '',
1580
+ deviceType: profile.deviceType || '',
1581
+ lines: selectedLineNumbers,
1582
+ description: `${profile.protocol || ''} / ${profile.buttonTemplate || ''}`.trim(),
1583
+ }));
1584
+ }
674
1585
  extractTemplateFromTokenPayload(payload) {
675
1586
  if (!payload || typeof payload !== 'object') {
676
1587
  return null;
@@ -697,10 +1608,248 @@ class UserCreationWizardService {
697
1608
  valueToString(value) {
698
1609
  return typeof value === 'string' ? value : '';
699
1610
  }
1611
+ getUnwrapNumberRange(availableNumber) {
1612
+ let unwrapNumberRange = this.unwrapNumberRange(availableNumber.phoneNumberRange.from, availableNumber.phoneNumberRange.to)
1613
+ .map((unwrappedNumber) => {
1614
+ const dn = availableNumber.phoneNumberRange.prefix + unwrappedNumber;
1615
+ let str = dn;
1616
+ if (this.availableDidPatternsMappedToDn[dn] && this.availableDidPatternsMappedToDn[dn].length > 0) {
1617
+ if (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] && this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 0) {
1618
+ str += ' DID: ' + (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 1 ? 'multiple' :
1619
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'][0]);
1620
+ }
1621
+ if (this.availableDidPatternsMappedToDn[dn][0]['vm']) {
1622
+ str += ' In Use - VM';
1623
+ }
1624
+ }
1625
+ return str;
1626
+ });
1627
+ unwrapNumberRange = unwrapNumberRange.filter((unwrappedNumber) => !availableNumber.usedNumbers.includes(unwrappedNumber));
1628
+ return unwrapNumberRange;
1629
+ }
1630
+ unwrapNumberRange(start, end) {
1631
+ const regExp = /(^0+)/;
1632
+ let leadingZeros = '';
1633
+ const matches = start.match(regExp);
1634
+ if (matches) {
1635
+ leadingZeros = matches[1];
1636
+ }
1637
+ const startNumeric = new Big(start);
1638
+ const endNumeric = new Big(end);
1639
+ return Array.from({ length: Number(endNumeric.minus(startNumeric).plus(new Big(1)).toFixed(0)) }, (v, k) => {
1640
+ const number = String(startNumeric.plus(new Big(k.toString())).toFixed(0));
1641
+ if ((leadingZeros + number).length > start.length) {
1642
+ leadingZeros = leadingZeros.substr(1);
1643
+ }
1644
+ return leadingZeros + number;
1645
+ });
1646
+ }
1647
+ setAvailableDidMappedToDn(availableNumber) {
1648
+ if (availableNumber.unUsedNumbersWithDids && availableNumber.unUsedNumbersWithDids.length) {
1649
+ availableNumber.unUsedNumbersWithDids.forEach((numberWithDids) => {
1650
+ const dn = numberWithDids['unUsedNumber'];
1651
+ this.availableDidPatternsMappedToDn[dn] = [{}];
1652
+ if (numberWithDids['translationPatternList'] && numberWithDids['translationPatternList'].length > 0) {
1653
+ this.availableDidPatternsMappedToDn[dn] = numberWithDids['translationPatternList'];
1654
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = [{}];
1655
+ if (numberWithDids['mappedDids'] && numberWithDids['mappedDids'].length > 0) {
1656
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = numberWithDids['mappedDids'];
1657
+ }
1658
+ }
1659
+ this.availableDidPatternsMappedToDn[dn][0]['vm'] = numberWithDids['vm'];
1660
+ });
1661
+ }
1662
+ }
700
1663
  // TODO: replace placeholders with real API integration.
701
1664
  loadDataFromApi() {
702
1665
  // this.api.getWizardBootstrapData().subscribe(...)
703
1666
  }
1667
+ initLineWithSiteInfo(line) {
1668
+ line.directoryNumber.routePartitionName = this.siteDefaults?.routePartition || '';
1669
+ let callingSearchSpaceVal = this.siteDefaults?.lineCss || '';
1670
+ line.callingSearchSpace = callingSearchSpaceVal;
1671
+ }
1672
+ // private initTemplateDnsNamesForLines(userLines: TemplateLineLike[]): void {
1673
+ // const routePartition = this.siteDefaults?.routePartition || '';
1674
+ // if (userLines && userLines.length > 0) {
1675
+ // userLines.forEach((line, index) => {
1676
+ // line && line.directoryNumber && (line.directoryNumber.templateDirectoryNumber = line.directoryNumber.directoryNumber);
1677
+ // line && line.directoryNumber && (line.directoryNumber.directoryNumber = '');
1678
+ // return line;
1679
+ // });
1680
+ // // const routePartition = this.siteDefaults?.routePartition || '';
1681
+ // // if (line.lineAssociations && line.lineAssociations.length) {
1682
+ // // this.setLineAssociationsForDevice(line, routePartition);
1683
+ // // }
1684
+ // }
1685
+ // this.templateDevices.forEach(device => {
1686
+ // if (device.lineAssociations && device.lineAssociations.length) {
1687
+ // this.setLineAssociationsForDevice(device, routePartition);
1688
+ // }
1689
+ // });
1690
+ // }
1691
+ setLineAssociationsForDevice(device, routePartition) {
1692
+ const lineAssociations = device.lineAssociations || [];
1693
+ if (lineAssociations && lineAssociations.length) {
1694
+ lineAssociations.forEach(lineAssociation => {
1695
+ lineAssociation && lineAssociation.directoryNumber && (lineAssociation.directoryNumber.templateDirectoryNumber = lineAssociation.directoryNumber.directoryNumber || '');
1696
+ lineAssociation && lineAssociation.directoryNumber && (lineAssociation.directoryNumber.routePartitionName = routePartition);
1697
+ lineAssociation && lineAssociation.logMissedCall && (lineAssociation.logMissedCall = lineAssociation.logMissedCall || 'false');
1698
+ });
1699
+ }
1700
+ }
1701
+ initDeviceWithSiteInfo(device) {
1702
+ device.newName = device.name;
1703
+ device.name = '';
1704
+ if (!device['enabledExtensionMobility']) {
1705
+ device.enabledExtensionMobility = this.siteDefaults?.enableEm ?? false;
1706
+ }
1707
+ else if (device['enabledExtensionMobility'].toString() === 'Yes') {
1708
+ device.enabledExtensionMobility = true;
1709
+ }
1710
+ else if (device['enabledExtensionMobility'].toString() === 'No') {
1711
+ device.enabledExtensionMobility = false;
1712
+ }
1713
+ if (device.location) {
1714
+ const replacedValue = this.replaceDynamicValueSiteInfo(device.location, this.currentSite?.shortName ?? '') ?? null;
1715
+ device.location = replacedValue;
1716
+ }
1717
+ if (device.location) {
1718
+ const replacedValue = this.replaceDynamicValueSiteInfo(device.devicePoolName, this.currentSite?.shortName ?? '') ?? null;
1719
+ device.devicePoolName = replacedValue;
1720
+ }
1721
+ if (device.location) {
1722
+ const replacedValue = this.replaceDynamicValueSiteInfo(device.callingSearchSpaceName, this.currentSite?.shortName ?? '') ?? null;
1723
+ device.callingSearchSpaceName = replacedValue;
1724
+ }
1725
+ if (device.extraOptions) {
1726
+ const replacedValue = this.replaceDynamicValueSiteInfo(device.extraOptions.aarCss, this.currentSite?.shortName ?? '') ?? null;
1727
+ device.extraOptions.aarCss = replacedValue;
1728
+ }
1729
+ if (!device.description && this.siteDefaults) {
1730
+ device.description = this.siteDefaults.deviceDescription;
1731
+ }
1732
+ }
1733
+ replaceDynamicValueSiteInfo(fieldValue, siteShortName) {
1734
+ if (fieldValue) {
1735
+ fieldValue = this.replaceDynamicValueFormat(fieldValue);
1736
+ const paramsToReplaces = { 'SiteShortName': siteShortName };
1737
+ return this.mutliStringReplace(paramsToReplaces, fieldValue);
1738
+ }
1739
+ return null;
1740
+ }
1741
+ replaceDynamicValueFormat(str) {
1742
+ str = str.replace(/\[FN\]/ig, '[FN]').replace(/\[LN\]/ig, '[LN]').replace(/\[ID\]/ig, '[UserId]')
1743
+ .replace(/\[UserId\]/ig, '[UserId]').replace(/<Match User ID>/ig, '[UserId]')
1744
+ .replace(/\[Email\]/ig, '[Email]').replace(/\[DN\(/ig, '[DN(')
1745
+ .replace(/\[SiteShortName\]/ig, '[SiteShortName]').replace(/\$\(SiteShortName\)/ig, '[SiteShortName]')
1746
+ .replace(/\$\{SiteShortName\}/ig, '[SiteShortName]').replace(/{SiteShortName}/ig, '[SiteShortName]')
1747
+ .replace(/\[FN\(/ig, '[FN(').replace(/\[LN\(/ig, '[LN(')
1748
+ .replace(/\[ID\(/ig, '[ID(');
1749
+ return str;
1750
+ }
1751
+ mutliStringReplace(object, input, directoryNumber, user) {
1752
+ var val = input;
1753
+ if (val.includes('[DN]') && directoryNumber && !directoryNumber.includes('Line')) {
1754
+ val = val.replace('[DN]', directoryNumber);
1755
+ }
1756
+ var indexOfDN = val.indexOf('[DN(');
1757
+ if (indexOfDN !== -1 && directoryNumber) {
1758
+ var digit = val.substring(indexOfDN + 4, val.indexOf(')', indexOfDN + 4));
1759
+ var digitCount = Number(digit) || 0;
1760
+ var dnDigit = (digitCount > val.length) ? directoryNumber : directoryNumber.substring(directoryNumber.length - digitCount, directoryNumber.length);
1761
+ val = val.replace('[DN(' + digit + ')]', dnDigit);
1762
+ }
1763
+ var indexOfFN = val.indexOf('[FN(');
1764
+ if (indexOfFN !== -1 && user && user.firstName) {
1765
+ var digit = val.substring(indexOfFN + 4, val.indexOf(')', indexOfFN + 4));
1766
+ var fnDigit = user.firstName.substring(0, digit);
1767
+ val = val.replace('[FN(' + digit + ')]', fnDigit);
1768
+ }
1769
+ var indexOfLN = val.indexOf('[LN(');
1770
+ if (indexOfLN !== -1 && user && user.lastName) {
1771
+ var digit = val.substring(indexOfLN + 4, val.indexOf(')', indexOfLN + 4));
1772
+ var lnDigit = user.lastName.substring(0, digit);
1773
+ val = val.replace('[LN(' + digit + ')]', lnDigit);
1774
+ }
1775
+ var indexOfID = val.indexOf('[ID(');
1776
+ if (indexOfID !== -1 && user && user.userid) {
1777
+ var digit = val.substring(indexOfID + 4, val.indexOf(')', indexOfID + 4));
1778
+ var idDigit = user.userid.substring(0, digit);
1779
+ val = val.replace('[ID(' + digit + ')]', idDigit);
1780
+ }
1781
+ var entries = Object.entries(object);
1782
+ entries.forEach((para) => {
1783
+ var find = '[' + para[0] + ']';
1784
+ var replacement = para[1] != null ? String(para[1]) : '';
1785
+ val = val.split(find).join(replacement);
1786
+ });
1787
+ return val;
1788
+ }
1789
+ initTemplateDnsNamesForLines() {
1790
+ if (this.lines && this.lines.length > 0) {
1791
+ this.lines.forEach((line, index) => {
1792
+ line.directoryNumber.templateDirectoryNumber = line.directoryNumber.directoryNumber;
1793
+ line.directoryNumber.directoryNumber = '';
1794
+ return line;
1795
+ });
1796
+ const routePartition = this.siteDefaults?.routePartition || '';
1797
+ this.devices.forEach(device => {
1798
+ if (device.lineAssociations && device.lineAssociations.length) {
1799
+ this.setLineAssociationsForDevice(device, routePartition);
1800
+ }
1801
+ });
1802
+ this.deviceProfiles.forEach(deviceProfile => {
1803
+ if (deviceProfile.lineAssociations && deviceProfile.lineAssociations.length) {
1804
+ this.setLineAssociationsForDevice(deviceProfile, routePartition);
1805
+ }
1806
+ });
1807
+ if (this.endUser?.singleNumberReach && this.endUser.singleNumberReach.associatedLines && this.endUser.singleNumberReach.associatedLines.length) {
1808
+ if (this.endUser.singleNumberReach.associatedLines && this.endUser.singleNumberReach.associatedLines.length) {
1809
+ this.endUser.singleNumberReach.associatedLines.map(lineAssociation => {
1810
+ lineAssociation.directoryNumber.templateDirectoryNumber = lineAssociation.directoryNumber.directoryNumber;
1811
+ lineAssociation.directoryNumber.routePartitionName = routePartition;
1812
+ });
1813
+ }
1814
+ if (this.endUser.singleNumberReach.remoteDestinations && this.endUser.singleNumberReach.remoteDestinations.length) {
1815
+ this.endUser.singleNumberReach.remoteDestinations.forEach(remoteDestination => {
1816
+ if (remoteDestination.lineAssociations && remoteDestination.lineAssociations.length) {
1817
+ remoteDestination.lineAssociations.map(lineAssociation => {
1818
+ lineAssociation.directoryNumber.templateDirectoryNumber = lineAssociation.directoryNumber.directoryNumber;
1819
+ lineAssociation.directoryNumber.routePartitionName = routePartition;
1820
+ });
1821
+ }
1822
+ });
1823
+ }
1824
+ }
1825
+ }
1826
+ }
1827
+ buildSavableEndUser() {
1828
+ if (!this.endUser) {
1829
+ throw new Error('No template user loaded');
1830
+ }
1831
+ return buildSavableEndUser(this.endUser, this.lines, this.devices, this.deviceProfiles, this.userDetailsForm, {
1832
+ resolveDeviceName: (index, device) => this.resolveDeviceNameForSave(index, device),
1833
+ resolveDeviceProfileName: (index, profile) => this.resolveDeviceNameForSave(index, profile),
1834
+ });
1835
+ }
1836
+ resolveDeviceNameForSave(_index, device) {
1837
+ const rawName = (device.name || device.newName || '').trim();
1838
+ if (!rawName) {
1839
+ return '';
1840
+ }
1841
+ const prefix = device.prefix?.trim();
1842
+ if (prefix && !rawName.toUpperCase().startsWith(prefix.toUpperCase())) {
1843
+ return `${prefix}${rawName}`;
1844
+ }
1845
+ return rawName;
1846
+ }
1847
+ saveNewUser() {
1848
+ const user = this.buildSavableEndUser();
1849
+ const siteId = String(this.selectedSite ?? '');
1850
+ const templateId = String(this.selectedTemplateId ?? '');
1851
+ return this.userCreationApiService.saveTemplateUser(user, templateId, siteId);
1852
+ }
704
1853
  }
705
1854
  UserCreationWizardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
706
1855
  UserCreationWizardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardService });
@@ -708,23 +1857,516 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
708
1857
  type: Injectable
709
1858
  }], ctorParameters: function () { return []; } });
710
1859
 
1860
+ class AppLoaderComponent {
1861
+ constructor() {
1862
+ }
1863
+ }
1864
+ AppLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1865
+ AppLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AppLoaderComponent, selector: "app-loader", ngImport: i0, template: "<div class=\"overlay\">\r\n <mat-progress-spinner\r\n class=\"page-spinner\"\r\n mode=\"indeterminate\"\r\n [diameter]=\"70\"\r\n strokeWidth=\"3\"></mat-progress-spinner>\r\n</div>\r\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200;justify-content:center;align-items:center}\n"], dependencies: [{ kind: "component", type: i1$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }], encapsulation: i0.ViewEncapsulation.None });
1866
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, decorators: [{
1867
+ type: Component,
1868
+ args: [{ selector: 'app-loader', encapsulation: ViewEncapsulation.None, template: "<div class=\"overlay\">\r\n <mat-progress-spinner\r\n class=\"page-spinner\"\r\n mode=\"indeterminate\"\r\n [diameter]=\"70\"\r\n strokeWidth=\"3\"></mat-progress-spinner>\r\n</div>\r\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200;justify-content:center;align-items:center}\n"] }]
1869
+ }], ctorParameters: function () { return []; } });
1870
+
1871
+ const LDAP_PAGE_SIZE = 10;
711
1872
  class UserDetailsStepComponent {
712
- constructor(userCreationWizardService) {
1873
+ get linesFormArray() {
1874
+ return this.userDetailsForm.get('lines');
1875
+ }
1876
+ get devicesFormArray() {
1877
+ return this.userDetailsForm.get('devices');
1878
+ }
1879
+ get deviceProfilesFormArray() {
1880
+ return this.userDetailsForm.get('deviceProfiles');
1881
+ }
1882
+ get selectedLdapUser() {
1883
+ return this.userCreationWizardService.selectedLdapUser;
1884
+ }
1885
+ get ldapTotalCount() {
1886
+ return this.userCreationWizardService.ldapUsersTotal;
1887
+ }
1888
+ get hasLdapUsers() {
1889
+ return this.userCreationWizardService.ldapUsers.length > 0;
1890
+ }
1891
+ constructor(fb, userCreationApiService, userCreationWizardService) {
1892
+ this.fb = fb;
1893
+ this.userCreationApiService = userCreationApiService;
713
1894
  this.userCreationWizardService = userCreationWizardService;
1895
+ this.validityChange = new EventEmitter();
1896
+ this.userIdCheckPending = false;
1897
+ this.loadingAvailableNumbers = false;
1898
+ this.ldapLoading = false;
1899
+ this.ldapSearchAttempted = false;
1900
+ this.ldapPageSize = LDAP_PAGE_SIZE;
1901
+ this.ldapPageIndex = 0;
1902
+ this.ldapQueryTypeOptions = [
1903
+ { label: 'User ID', value: 'userId' },
1904
+ { label: 'First Name', value: 'firstName' },
1905
+ { label: 'Last Name', value: 'lastName' },
1906
+ ];
1907
+ this.filteredAvailableNumbersByLine = [];
1908
+ this.filteredRoutePartitionsByLine = [];
1909
+ this.destroy$ = new Subject();
1910
+ this.userIdAsyncValidator = this.createUserIdAsyncValidator();
1911
+ this.ldapSearchForm = this.fb.group({
1912
+ queryValue: [''],
1913
+ queryType: ['userId'],
1914
+ });
1915
+ this.userDetailsForm = this.fb.group({
1916
+ userId: ['', [Validators.required], [this.userIdAsyncValidator]],
1917
+ firstName: ['', Validators.required],
1918
+ lastName: ['', Validators.required],
1919
+ email: ['', [Validators.required, Validators.email]],
1920
+ lines: this.fb.array([]),
1921
+ devices: this.fb.array([]),
1922
+ deviceProfiles: this.fb.array([]),
1923
+ });
1924
+ }
1925
+ ngOnInit() {
1926
+ const savedFormValue = this.userCreationWizardService.userDetailsFormValue;
1927
+ const isRestoringPreviousEntry = !!savedFormValue;
1928
+ if (!isRestoringPreviousEntry) {
1929
+ this.resetLdapSearchForm();
1930
+ }
1931
+ this.buildDynamicFormArrays(savedFormValue);
1932
+ if (isRestoringPreviousEntry) {
1933
+ this.patchUserFieldsFromSavedValue(savedFormValue);
1934
+ }
1935
+ else {
1936
+ this.patchUserFieldsFromService();
1937
+ }
1938
+ this.initLineFilters();
1939
+ this.setupFormSync();
1940
+ this.setupValidityEmitter();
1941
+ this.fetchInitialAvailableNumbers();
1942
+ if (!isRestoringPreviousEntry) {
1943
+ this.userCreationWizardService.applyUserDetailsFormValue(this.userDetailsForm.getRawValue());
1944
+ }
1945
+ this.applyDeviceNameValidators();
1946
+ this.userCreationWizardService.deviceDefaultsLoaded$
1947
+ .pipe(takeUntil(this.destroy$))
1948
+ .subscribe(() => {
1949
+ this.applyDeviceNameValidators();
1950
+ this.emitValidity();
1951
+ });
1952
+ if (this.userCreationWizardService.isLdapIntegrated && this.selectedLdapUser) {
1953
+ this.applyLdapIntegratedFormState();
1954
+ }
1955
+ this.emitValidity();
1956
+ }
1957
+ ngOnDestroy() {
1958
+ this.destroy$.next();
1959
+ this.destroy$.complete();
1960
+ }
1961
+ isStepValid() {
1962
+ return this.userDetailsForm.valid && !this.userIdCheckPending;
1963
+ }
1964
+ markAllAsTouched() {
1965
+ this.userDetailsForm.markAllAsTouched();
1966
+ this.emitValidity();
1967
+ }
1968
+ syncToService() {
1969
+ this.userCreationWizardService.applyUserDetailsFormValue(this.userDetailsForm.getRawValue());
1970
+ }
1971
+ getLineGroup(index) {
1972
+ return this.linesFormArray.at(index);
1973
+ }
1974
+ getDeviceGroup(index) {
1975
+ return this.devicesFormArray.at(index);
714
1976
  }
715
- onAddUser(row) {
716
- this.userCreationWizardService.addLdapUser(row);
1977
+ getDeviceProfileGroup(index) {
1978
+ return this.deviceProfilesFormArray.at(index);
717
1979
  }
718
- getDeviceName(index) {
719
- return this.userCreationWizardService.getDeviceDisplayName(index);
1980
+ getDeviceNamePrefix(index) {
1981
+ return this.userCreationWizardService.getDeviceNamePrefix(index, false);
1982
+ }
1983
+ getDeviceProfileNamePrefix(index) {
1984
+ return this.userCreationWizardService.getDeviceNamePrefix(index, true);
1985
+ }
1986
+ getDeviceNameValidationCaption(index) {
1987
+ return this.userCreationWizardService.getDeviceNameValidationCaption(index, false);
1988
+ }
1989
+ getDeviceProfileNameValidationCaption(index) {
1990
+ return this.userCreationWizardService.getDeviceNameValidationCaption(index, true);
1991
+ }
1992
+ getFilteredNumbers(lineIndex) {
1993
+ return this.filteredAvailableNumbersByLine[lineIndex] ?? [];
1994
+ }
1995
+ getFilteredRoutePartitions(lineIndex) {
1996
+ return this.filteredRoutePartitionsByLine[lineIndex] ?? [];
1997
+ }
1998
+ filterAvailableNumbers(lineIndex, event) {
1999
+ const raw = event.target?.value || '';
2000
+ this.applyNumberFilter(lineIndex, raw);
2001
+ }
2002
+ filterRoutePartitions(lineIndex, event) {
2003
+ const raw = event.target?.value || '';
2004
+ this.applyRoutePartitionFilter(lineIndex, raw);
2005
+ }
2006
+ onRoutePartitionSelected(lineIndex, routePartition) {
2007
+ const lineGroup = this.linesFormArray.at(lineIndex);
2008
+ lineGroup.get('routePartition')?.setValue(routePartition, { emitEvent: false });
2009
+ lineGroup.get('number')?.setValue('');
2010
+ this.applyRoutePartitionFilter(lineIndex, routePartition);
2011
+ this.loadAvailableNumbersForLine(lineIndex, routePartition);
2012
+ }
2013
+ onNumberSelected(lineIndex, number) {
2014
+ const lineGroup = this.linesFormArray.at(lineIndex);
2015
+ const displayNumber = this.extractDirectoryNumber(number);
2016
+ lineGroup.get('number')?.setValue(displayNumber, { emitEvent: true });
2017
+ }
2018
+ searchLdapUsers(pageIndex = 0) {
2019
+ const queryValue = String(this.ldapSearchForm.get('queryValue')?.value).trim() || undefined;
2020
+ const siteId = this.userCreationWizardService.selectedSite;
2021
+ if (!siteId) {
2022
+ this.userCreationWizardService.setLdapUsersResult([], 0);
2023
+ this.ldapPageIndex = 0;
2024
+ this.ldapSearchAttempted = false;
2025
+ return;
2026
+ }
2027
+ this.ldapPageIndex = pageIndex;
2028
+ const queryType = this.ldapSearchForm.get('queryType')?.value;
2029
+ const params = {
2030
+ size: String(LDAP_PAGE_SIZE),
2031
+ page: String(pageIndex),
2032
+ deviceless: 'true',
2033
+ querytype: queryType,
2034
+ withEmailOnly: 'true',
2035
+ queryvalue: queryValue,
2036
+ };
2037
+ this.ldapLoading = true;
2038
+ this.userCreationApiService
2039
+ .getLdapUsers(String(siteId), params)
2040
+ .pipe(take(1), map((res) => ({
2041
+ users: res?.pageData ?? [],
2042
+ total: res?.total ?? 0,
2043
+ })), catchError(() => of({ users: [], total: 0 })), finalize(() => {
2044
+ this.ldapLoading = false;
2045
+ }))
2046
+ .subscribe(({ users, total }) => {
2047
+ this.ldapSearchAttempted = true;
2048
+ this.userCreationWizardService.setLdapUsersResult(users, total);
2049
+ });
2050
+ }
2051
+ onLdapPageChange(event) {
2052
+ this.searchLdapUsers(event.pageIndex);
2053
+ }
2054
+ onAddLdapUser(row) {
2055
+ this.userCreationWizardService.selectLdapUser(row);
2056
+ this.userDetailsForm.patchValue({
2057
+ userId: row.userid,
2058
+ firstName: row.firstName ?? '',
2059
+ lastName: row.lastName ?? '',
2060
+ email: row.email ?? '',
2061
+ });
2062
+ this.applyLdapIntegratedFormState();
2063
+ this.emitValidity();
2064
+ }
2065
+ onDeleteLdapUser(row) {
2066
+ if (!this.userCreationWizardService.isLdapUserRowSelected(row)) {
2067
+ return;
2068
+ }
2069
+ this.clearLdapSelection();
2070
+ }
2071
+ onRemoveLdapTag() {
2072
+ this.clearLdapSelection();
2073
+ }
2074
+ isLdapUserRowSelected(row) {
2075
+ return this.userCreationWizardService.isLdapUserRowSelected(row);
2076
+ }
2077
+ clearLdapSelection() {
2078
+ this.userCreationWizardService.clearLdapUserSelection();
2079
+ this.userDetailsForm.patchValue({
2080
+ userId: '',
2081
+ firstName: '',
2082
+ lastName: '',
2083
+ email: '',
2084
+ });
2085
+ this.restoreManualEntryFormState();
2086
+ this.emitValidity();
2087
+ }
2088
+ applyLdapIntegratedFormState() {
2089
+ this.setUserIdentityFieldsReadonly(true);
2090
+ this.toggleUserIdAsyncValidator(false);
2091
+ this.userDetailsForm.get('userId')?.updateValueAndValidity({ emitEvent: false });
2092
+ }
2093
+ restoreManualEntryFormState() {
2094
+ this.setUserIdentityFieldsReadonly(false);
2095
+ this.toggleUserIdAsyncValidator(true);
2096
+ this.userDetailsForm.get('userId')?.updateValueAndValidity();
2097
+ }
2098
+ setUserIdentityFieldsReadonly(readonly) {
2099
+ ['userId', 'firstName', 'lastName', 'email'].forEach(fieldName => {
2100
+ const control = this.userDetailsForm.get(fieldName);
2101
+ if (!control) {
2102
+ return;
2103
+ }
2104
+ if (readonly) {
2105
+ control.disable({ emitEvent: false });
2106
+ }
2107
+ else {
2108
+ control.enable({ emitEvent: false });
2109
+ }
2110
+ });
2111
+ }
2112
+ toggleUserIdAsyncValidator(enabled) {
2113
+ const control = this.userDetailsForm.get('userId');
2114
+ if (!control) {
2115
+ return;
2116
+ }
2117
+ if (enabled) {
2118
+ control.setAsyncValidators([this.userIdAsyncValidator]);
2119
+ }
2120
+ else {
2121
+ control.clearAsyncValidators();
2122
+ }
2123
+ control.updateValueAndValidity({ emitEvent: false });
2124
+ }
2125
+ setupValidityEmitter() {
2126
+ this.userDetailsForm.statusChanges
2127
+ .pipe(startWith(this.userDetailsForm.status), takeUntil(this.destroy$))
2128
+ .subscribe(() => this.emitValidity());
2129
+ }
2130
+ emitValidity() {
2131
+ this.validityChange.emit(this.isStepValid());
2132
+ }
2133
+ buildDynamicFormArrays(savedFormValue) {
2134
+ const service = this.userCreationWizardService;
2135
+ const linesArray = this.linesFormArray;
2136
+ const devicesArray = this.devicesFormArray;
2137
+ const profilesArray = this.deviceProfilesFormArray;
2138
+ while (linesArray.length) {
2139
+ linesArray.removeAt(0);
2140
+ }
2141
+ while (devicesArray.length) {
2142
+ devicesArray.removeAt(0);
2143
+ }
2144
+ while (profilesArray.length) {
2145
+ profilesArray.removeAt(0);
2146
+ }
2147
+ service.lines.forEach((line, index) => {
2148
+ const savedLine = savedFormValue?.lines?.[index];
2149
+ const lineGroup = this.fb.group({
2150
+ lineNumber: [
2151
+ {
2152
+ value: line.directoryNumber?.templateDirectoryNumber || '',
2153
+ disabled: true,
2154
+ },
2155
+ ],
2156
+ number: [
2157
+ savedLine?.number ?? line.directoryNumber?.directoryNumber ?? '',
2158
+ Validators.required,
2159
+ ],
2160
+ routePartition: [
2161
+ savedLine?.routePartition ?? line.directoryNumber?.routePartitionName ?? '',
2162
+ Validators.required,
2163
+ ],
2164
+ });
2165
+ linesArray.push(lineGroup);
2166
+ this.setupLineListeners(index, lineGroup);
2167
+ });
2168
+ service.devices.forEach((device, index) => {
2169
+ const savedDevice = savedFormValue?.devices?.[index];
2170
+ devicesArray.push(this.fb.group({
2171
+ deviceType: [{ value: device.deviceType || '', disabled: true }],
2172
+ protocol: [{ value: device.protocol || '', disabled: true }],
2173
+ buttonTemplate: [{ value: device.buttonTemplate || '', disabled: true }],
2174
+ name: [
2175
+ savedDevice?.name ?? device.name ?? '',
2176
+ this.buildDeviceNameValidators(index, false),
2177
+ ],
2178
+ }));
2179
+ });
2180
+ service.deviceProfiles.forEach((profile, index) => {
2181
+ const savedProfile = savedFormValue?.deviceProfiles?.[index];
2182
+ profilesArray.push(this.fb.group({
2183
+ deviceType: [{ value: profile.deviceType || '', disabled: true }],
2184
+ protocol: [{ value: profile.protocol || '', disabled: true }],
2185
+ buttonTemplate: [{ value: profile.buttonTemplate || '', disabled: true }],
2186
+ name: [
2187
+ savedProfile?.name ?? profile.name ?? '',
2188
+ this.buildDeviceNameValidators(index, true),
2189
+ ],
2190
+ }));
2191
+ });
2192
+ }
2193
+ buildDeviceNameValidators(deviceIndex, isProfile) {
2194
+ const validators = isProfile ? [] : [Validators.required];
2195
+ const options = this.userCreationWizardService.getDeviceNameValidationOptions(deviceIndex, isProfile);
2196
+ if (options) {
2197
+ validators.push(deviceNameValidator(options));
2198
+ }
2199
+ return validators;
2200
+ }
2201
+ applyDeviceNameValidators() {
2202
+ this.devicesFormArray.controls.forEach((_, index) => {
2203
+ const nameControl = this.getDeviceGroup(index).get('name');
2204
+ nameControl?.setValidators(this.buildDeviceNameValidators(index, false));
2205
+ nameControl?.updateValueAndValidity({ emitEvent: false });
2206
+ });
2207
+ this.deviceProfilesFormArray.controls.forEach((_, index) => {
2208
+ const nameControl = this.getDeviceProfileGroup(index).get('name');
2209
+ nameControl?.setValidators(this.buildDeviceNameValidators(index, true));
2210
+ nameControl?.updateValueAndValidity({ emitEvent: false });
2211
+ });
2212
+ }
2213
+ resetLdapSearchForm() {
2214
+ this.ldapSearchForm.reset({
2215
+ queryValue: '',
2216
+ queryType: 'userId',
2217
+ });
2218
+ this.ldapSearchAttempted = false;
2219
+ this.ldapPageIndex = 0;
2220
+ this.userIdCheckPending = false;
2221
+ }
2222
+ patchUserFieldsFromSavedValue(saved) {
2223
+ this.userDetailsForm.patchValue({
2224
+ userId: saved.userId || '',
2225
+ firstName: saved.firstName || '',
2226
+ lastName: saved.lastName || '',
2227
+ email: saved.email || '',
2228
+ });
2229
+ }
2230
+ patchUserFieldsFromService() {
2231
+ const service = this.userCreationWizardService;
2232
+ const endUser = service.endUser;
2233
+ this.userDetailsForm.patchValue({
2234
+ userId: endUser?.userid || service.userDetailsForm.userId || '',
2235
+ firstName: endUser?.firstName || service.userDetailsForm.firstName || '',
2236
+ lastName: endUser?.lastName || service.userDetailsForm.lastName || '',
2237
+ email: endUser?.email || service.userDetailsForm.email || '',
2238
+ });
2239
+ this.userDetailsForm.markAsPristine();
2240
+ this.userDetailsForm.markAsUntouched();
2241
+ }
2242
+ setupLineListeners(lineIndex, lineGroup) {
2243
+ lineGroup
2244
+ .get('routePartition')
2245
+ ?.valueChanges.pipe(debounceTime(300), takeUntil(this.destroy$))
2246
+ .subscribe(value => {
2247
+ this.applyRoutePartitionFilter(lineIndex, String(value ?? ''));
2248
+ });
2249
+ lineGroup
2250
+ .get('number')
2251
+ ?.valueChanges.pipe(debounceTime(150), takeUntil(this.destroy$))
2252
+ .subscribe(value => {
2253
+ this.applyNumberFilter(lineIndex, String(value ?? ''));
2254
+ });
2255
+ }
2256
+ initLineFilters() {
2257
+ const partitions = this.userCreationWizardService.routePartitionOptions;
2258
+ const numbers = this.userCreationWizardService.availableNumbers;
2259
+ this.filteredRoutePartitionsByLine = this.linesFormArray.controls.map((_, index) => {
2260
+ const current = String(this.linesFormArray.at(index).get('routePartition')?.value ?? '');
2261
+ return this.filterOptions(partitions, current);
2262
+ });
2263
+ this.filteredAvailableNumbersByLine = this.linesFormArray.controls.map((_, index) => {
2264
+ const current = String(this.linesFormArray.at(index).get('number')?.value ?? '');
2265
+ return this.filterOptions(numbers, current);
2266
+ });
2267
+ }
2268
+ setupFormSync() {
2269
+ this.userDetailsForm.valueChanges
2270
+ .pipe(debounceTime(200), takeUntil(this.destroy$))
2271
+ .subscribe(() => {
2272
+ this.userCreationWizardService.applyUserDetailsFormValue(this.userDetailsForm.getRawValue());
2273
+ });
2274
+ }
2275
+ fetchInitialAvailableNumbers() {
2276
+ const firstPartition = this.linesFormArray.length > 0
2277
+ ? String(this.linesFormArray.at(0).get('routePartition')?.value ?? '').trim()
2278
+ : this.userCreationWizardService.firstLineRoutePartition ||
2279
+ this.userCreationWizardService.siteDefaultRoutePartition ||
2280
+ '';
2281
+ if (firstPartition) {
2282
+ this.loadAvailableNumbersForLine(0, firstPartition, false);
2283
+ }
2284
+ }
2285
+ loadAvailableNumbersForLine(lineIndex, routePartition, clearNumber = true) {
2286
+ const siteId = this.userCreationWizardService.selectedSite;
2287
+ if (!siteId || !routePartition.trim()) {
2288
+ return;
2289
+ }
2290
+ if (clearNumber) {
2291
+ this.linesFormArray.at(lineIndex).get('number')?.setValue('');
2292
+ }
2293
+ this.loadingAvailableNumbers = true;
2294
+ this.userCreationWizardService
2295
+ .getNumberRange(String(siteId), routePartition)
2296
+ .pipe(take(1), catchError(() => of(null)), finalize(() => {
2297
+ this.loadingAvailableNumbers = false;
2298
+ this.refreshNumberFilters();
2299
+ }))
2300
+ .subscribe();
2301
+ }
2302
+ refreshNumberFilters() {
2303
+ const numbers = this.userCreationWizardService.availableNumbers;
2304
+ this.filteredAvailableNumbersByLine = this.linesFormArray.controls.map((_, index) => {
2305
+ const current = String(this.linesFormArray.at(index).get('number')?.value ?? '');
2306
+ return this.filterOptions(numbers, current);
2307
+ });
2308
+ }
2309
+ applyNumberFilter(lineIndex, raw) {
2310
+ const value = raw.trim().toLowerCase();
2311
+ const source = this.userCreationWizardService.availableNumbers || [];
2312
+ this.filteredAvailableNumbersByLine[lineIndex] = value.length
2313
+ ? source.filter(n => !!n && n.toLowerCase().includes(value))
2314
+ : [...source];
2315
+ }
2316
+ applyRoutePartitionFilter(lineIndex, raw) {
2317
+ const value = raw.trim().toLowerCase();
2318
+ const source = this.userCreationWizardService.routePartitionOptions || [];
2319
+ this.filteredRoutePartitionsByLine[lineIndex] = value.length
2320
+ ? source.filter(n => !!n && n.toLowerCase().includes(value))
2321
+ : [...source];
2322
+ }
2323
+ filterOptions(source, raw) {
2324
+ const value = raw.trim().toLowerCase();
2325
+ if (!value.length) {
2326
+ return [...source];
2327
+ }
2328
+ return source.filter(item => !!item && item.toLowerCase().includes(value));
2329
+ }
2330
+ extractDirectoryNumber(value) {
2331
+ const trimmed = value.trim();
2332
+ const spaceIndex = trimmed.indexOf(' ');
2333
+ return spaceIndex > -1 ? trimmed.substring(0, spaceIndex) : trimmed;
2334
+ }
2335
+ createUserIdAsyncValidator() {
2336
+ return (control) => {
2337
+ if (this.userCreationWizardService.isLdapIntegrated) {
2338
+ this.userIdCheckPending = false;
2339
+ return of(null);
2340
+ }
2341
+ const userId = String(control.value ?? '').trim();
2342
+ const siteId = this.userCreationWizardService.selectedSite;
2343
+ if (!userId || !siteId) {
2344
+ this.userIdCheckPending = false;
2345
+ this.emitValidity();
2346
+ return of(null);
2347
+ }
2348
+ this.userIdCheckPending = true;
2349
+ this.emitValidity();
2350
+ return timer(500).pipe(switchMap(() => this.userCreationApiService
2351
+ .checkUserIdExisting(String(siteId), encodeURIComponent(encodeURIComponent(userId)))
2352
+ .pipe(map(() => ({ userIdExists: true })), catchError(() => of(null)))), tap(() => {
2353
+ this.userIdCheckPending = false;
2354
+ this.emitValidity();
2355
+ }), finalize(() => {
2356
+ this.userIdCheckPending = false;
2357
+ this.emitValidity();
2358
+ }));
2359
+ };
720
2360
  }
721
2361
  }
722
- UserDetailsStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDetailsStepComponent, deps: [{ token: UserCreationWizardService }], target: i0.ɵɵFactoryTarget.Component });
723
- UserDetailsStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserDetailsStepComponent, selector: "tk-user-details-step", ngImport: i0, template: "<section class=\"details-step-content\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"details-step-section__part\">\r\n <div class=\"details-inline-fields\">\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User ID</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"User ID\"\r\n [value]=\"userCreationWizardService.userDetailsForm.userId\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'userId',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">First Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"First Name\"\r\n [value]=\"userCreationWizardService.userDetailsForm.firstName\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'firstName',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Last Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Last Name\"\r\n [value]=\"userCreationWizardService.userDetailsForm.lastName\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'lastName',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Email</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Email\"\r\n [value]=\"userCreationWizardService.userDetailsForm.email\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'email',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"User Template\"\r\n [value]=\"userCreationWizardService.selectedTemplate || ''\"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"details-step-section__part\">\r\n <mat-accordion class=\"details-user-accordion\">\r\n <mat-expansion-panel togglePosition=\"before\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title\r\n >Choose an existing or a LDAP user</mat-panel-title\r\n >\r\n </mat-expansion-panel-header>\r\n <div class=\"details-user-accordion__content\">\r\n <table\r\n mat-table\r\n [dataSource]=\"userCreationWizardService.ldapUsers\"\r\n class=\"details-ldap-table\"\r\n >\r\n <ng-container matColumnDef=\"userId\">\r\n <th mat-header-cell *matHeaderCellDef>User ID</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.userId }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"firstName\">\r\n <th mat-header-cell *matHeaderCellDef>First Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.firstName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"lastName\">\r\n <th mat-header-cell *matHeaderCellDef>Last Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.lastName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"email\">\r\n <th mat-header-cell *matHeaderCellDef>Email</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.email }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"add\">\r\n <th mat-header-cell *matHeaderCellDef>Add</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <button\r\n mat-button\r\n class=\"details-ldap-table__add-btn\"\r\n type=\"button\"\r\n [disabled]=\"\r\n userCreationWizardService.isLdapUserAdded(row)\r\n \"\r\n (click)=\"onAddUser(row)\"\r\n >\r\n Add user\r\n </button>\r\n </td>\r\n </ng-container>\r\n\r\n <tr\r\n mat-header-row\r\n *matHeaderRowDef=\"\r\n userCreationWizardService.ldapTableColumns\r\n \"\r\n ></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"\r\n let row;\r\n columns: userCreationWizardService.ldapTableColumns\r\n \"\r\n [class.details-ldap-table__row--disabled]=\"\r\n userCreationWizardService.isLdapUserAdded(row)\r\n \"\r\n ></tr>\r\n </table>\r\n </div>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Lines</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"line-route-list\">\r\n <div\r\n class=\"line-route-row\"\r\n *ngFor=\"\r\n let lineSelection of userCreationWizardService.lineSelections;\r\n let idx = index\r\n \"\r\n >\r\n <div class=\"line-route-field\">\r\n <mat-form-field\r\n class=\"details-step-select line-route-select\"\r\n appearance=\"outline\"\r\n >\r\n <mat-select\r\n placeholder=\"Select line\"\r\n [value]=\"lineSelection.lineNumber\"\r\n (selectionChange)=\"\r\n userCreationWizardService.setLineSelection(\r\n idx,\r\n $event.value\r\n )\r\n \"\r\n >\r\n <mat-option\r\n *ngFor=\"let line of userCreationWizardService.lineOptions\"\r\n [value]=\"line.number\"\r\n >\r\n {{ line.number }} - {{ line.did }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"line-route-field\">\r\n <mat-form-field\r\n class=\"details-step-select line-route-select\"\r\n appearance=\"outline\"\r\n >\r\n <mat-select\r\n placeholder=\"Select route partition\"\r\n [value]=\"lineSelection.routePartitionName\"\r\n (selectionChange)=\"\r\n userCreationWizardService.setRoutePartitionSelection(\r\n idx,\r\n $event.value\r\n )\r\n \"\r\n >\r\n <mat-option\r\n *ngFor=\"\r\n let partition of userCreationWizardService.routePartitionOptions\r\n \"\r\n [value]=\"partition\"\r\n >\r\n {{ partition }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Devices</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"devices-rows\">\r\n <div\r\n class=\"details-inline-fields details-inline-fields--four\"\r\n *ngFor=\"\r\n let _row of userCreationWizardService.deviceRows;\r\n let idx = index\r\n \"\r\n >\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Device type</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Device type\"\r\n [value]=\"\r\n userCreationWizardService.deviceEntries[idx].deviceType ||\r\n ''\r\n \"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Protocol</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Protocol\"\r\n [value]=\"\r\n userCreationWizardService.deviceEntries[idx].protocol || ''\r\n \"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Button Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Button Template\"\r\n [value]=\"\r\n userCreationWizardService.deviceEntries[idx]\r\n .buttonTemplate || ''\r\n \"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Name\"\r\n [value]=\"getDeviceName(idx)\"\r\n (input)=\"\r\n userCreationWizardService.setDeviceName(\r\n idx,\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n</section>\r\n", styles: [".details-step-content{display:flex;flex-direction:column;gap:0}.details-step-dropdowns{display:flex;flex-direction:column;gap:1rem}.details-step-field{display:flex;flex-direction:column;gap:8px}.details-step-label{font-size:16px;font-weight:400;line-height:100%;letter-spacing:0;color:#333}.details-step-select{width:333px}.details-step-divider{border-top:1px solid #d9d9d9;margin-top:24px}.details-step-sections{display:flex;flex-direction:column}.details-step-section{display:flex;flex-direction:column;gap:0;padding:24px 0}.details-step-sections>.details-step-section:first-child{padding-top:0}.details-step-section+.details-step-section{border-top:1px solid #d9d9d9}.details-step-section__title{margin:0;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:100%;letter-spacing:0;color:#333}.details-step-section__content{margin-top:24px}.details-step-section__part+.details-step-section__part{margin-top:24px}.details-user-accordion{width:100%}.details-user-accordion__content{padding:12px 0 0}.details-ldap-table{width:100%}.details-ldap-table__row--disabled{opacity:.35}.details-ldap-table__add-btn{min-width:0;padding:0;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#0d56aa}:host ::ng-deep .details-ldap-table .mat-header-cell{font-family:Inter,sans-serif;font-size:12px;font-weight:500;line-height:16px;letter-spacing:0;color:#737480;height:30px;padding:7px 8px}:host ::ng-deep .details-ldap-table .mat-cell{font-family:Inter,sans-serif;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0;color:#333;height:40px;padding:8px}.details-inline-fields{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.details-inline-fields--four{grid-template-columns:repeat(4,minmax(0,1fr))}.devices-rows{display:flex;flex-direction:column;gap:24px}.details-inline-field{display:flex;flex-direction:column;gap:4px}.details-inline-field__label{color:#c0c2ce;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0}.details-step-input{width:100%}.line-route-list{display:flex;flex-direction:column;gap:16px}.line-route-row{display:flex;gap:16px}.line-route-field{display:flex;flex-direction:column;gap:0}.line-route-field:nth-of-type(1) .line-route-select{width:230px}.line-route-field .line-route-select{width:185px}:host ::ng-deep .details-step-select .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-input .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-select .mat-form-field-flex{align-items:center;height:32px;border:1px solid #767676;border-radius:6px;padding:0 12px}:host ::ng-deep .details-step-input .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:4px;padding:10px 8px}:host ::ng-deep .details-step-select .mat-form-field-outline,:host ::ng-deep .details-step-select .mat-form-field-outline-start,:host ::ng-deep .details-step-select .mat-form-field-outline-end,:host ::ng-deep .details-step-select .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-input .mat-form-field-outline,:host ::ng-deep .details-step-input .mat-form-field-outline-start,:host ::ng-deep .details-step-input .mat-form-field-outline-end,:host ::ng-deep .details-step-input .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-select .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-input .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-select .mat-select-trigger{display:flex;align-items:center;justify-content:space-between;height:100%}:host ::ng-deep .details-step-input .mat-input-element{height:100%;margin:0}:host ::ng-deep .details-step-input.mat-form-field-disabled .mat-form-field-flex{background-color:#f5f6fa;border-color:#b8beca;opacity:.55;cursor:not-allowed}:host ::ng-deep .details-step-input .mat-input-element:disabled{color:#7f8694;-webkit-text-fill-color:#7f8694;cursor:not-allowed}:host ::ng-deep .details-user-accordion .mat-expansion-panel{border:0;border-radius:0!important;background:transparent;box-shadow:none!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header{padding:0 0 0 8px;min-height:32px;height:32px}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header-title{margin:0;display:flex;align-items:center;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#333}:host ::ng-deep .details-user-accordion .mat-expansion-panel-body{padding:0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-content{display:flex;align-items:center}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator{display:block!important;opacity:1!important;color:#333!important;align-self:center;margin:0 8px 0 0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator:after{color:#333!important;border-color:#333!important;position:relative;top:-4px}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i8.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i9.MatAccordion, selector: "mat-accordion", inputs: ["multi", "hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i9.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i9.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i9.MatExpansionPanelTitle, selector: "mat-panel-title" }] });
2362
+ UserDetailsStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDetailsStepComponent, deps: [{ token: i1$2.FormBuilder }, { token: UserCreationApiService }, { token: UserCreationWizardService }], target: i0.ɵɵFactoryTarget.Component });
2363
+ UserDetailsStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserDetailsStepComponent, selector: "tk-user-details-step", outputs: { validityChange: "validityChange" }, ngImport: i0, template: "<app-loader *ngIf=\"loadingAvailableNumbers\"></app-loader>\r\n<section class=\"details-step-content\">\r\n <form [formGroup]=\"userDetailsForm\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"details-step-section__part\">\r\n <div class=\"details-inline-fields\">\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User ID</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"User ID\" formControlName=\"userId\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('userId')?.hasError('required') && userDetailsForm.get('userId')?.touched\">\r\n User ID is required\r\n </mat-error>\r\n <mat-error *ngIf=\"userDetailsForm.get('userId')?.hasError('userIdExists') && userDetailsForm.get('userId')?.touched\">\r\n User ID already exists\r\n </mat-error>\r\n <mat-hint *ngIf=\"userIdCheckPending\">Checking user ID...</mat-hint>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">First Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"First Name\" formControlName=\"firstName\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('firstName')?.hasError('required') && userDetailsForm.get('firstName')?.touched\">\r\n First name is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Last Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"Last Name\" formControlName=\"lastName\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('lastName')?.hasError('required') && userDetailsForm.get('lastName')?.touched\">\r\n Last name is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Email</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"Email\" formControlName=\"email\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('email')?.invalid && userDetailsForm.get('email')?.touched\">\r\n <span *ngIf=\"userDetailsForm.get('email')?.hasError('required')\">Email is required</span>\r\n <span *ngIf=\"userDetailsForm.get('email')?.hasError('email')\">Please enter a valid email</span>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"User Template\"\r\n [value]=\"userCreationWizardService.selectedTemplateName || ''\"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"details-step-section__part\">\r\n <mat-accordion class=\"details-user-accordion\">\r\n <mat-expansion-panel togglePosition=\"before\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>Choose an existing or a LDAP user</mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div class=\"details-user-accordion__content\">\r\n <div class=\"details-ldap-search\" [formGroup]=\"ldapSearchForm\">\r\n <mat-form-field\r\n class=\"details-ldap-search__input\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n >\r\n <input\r\n matInput\r\n placeholder=\"Search\"\r\n formControlName=\"queryValue\"\r\n (keyup.enter)=\"searchLdapUsers()\"\r\n />\r\n </mat-form-field>\r\n\r\n <mat-form-field\r\n class=\"details-ldap-search__select\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n >\r\n <mat-select formControlName=\"queryType\">\r\n <mat-option *ngFor=\"let option of ldapQueryTypeOptions\" [value]=\"option.value\">\r\n {{ option.label }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-chip-list *ngIf=\"selectedLdapUser\" class=\"details-ldap-search__chip\">\r\n <mat-chip removable (removed)=\"onRemoveLdapTag()\">\r\n {{ selectedLdapUser.userid }}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </mat-chip>\r\n </mat-chip-list>\r\n\r\n <button\r\n mat-button\r\n class=\"details-ldap-search__btn\"\r\n type=\"button\"\r\n [disabled]=\"ldapLoading\"\r\n (click)=\"searchLdapUsers()\"\r\n >\r\n Search\r\n </button>\r\n </div>\r\n\r\n <app-loader *ngIf=\"ldapLoading\"></app-loader>\r\n\r\n <p\r\n *ngIf=\"!ldapLoading && ldapSearchAttempted && !hasLdapUsers\"\r\n class=\"details-ldap-table__empty\"\r\n >\r\n No users found\r\n </p>\r\n\r\n <table\r\n *ngIf=\"!ldapLoading && hasLdapUsers\"\r\n mat-table\r\n [dataSource]=\"userCreationWizardService.ldapUsers\"\r\n class=\"details-ldap-table\"\r\n >\r\n <ng-container matColumnDef=\"userId\">\r\n <th mat-header-cell *matHeaderCellDef>User Id</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.userid }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"firstName\">\r\n <th mat-header-cell *matHeaderCellDef>First Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.firstName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"lastName\">\r\n <th mat-header-cell *matHeaderCellDef>Last Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.lastName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"email\">\r\n <th mat-header-cell *matHeaderCellDef>Email</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.email }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"add\">\r\n <th mat-header-cell *matHeaderCellDef>Add</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <button\r\n *ngIf=\"!isLdapUserRowSelected(row); else deleteLdapUserBtn\"\r\n mat-button\r\n class=\"details-ldap-table__add-btn\"\r\n type=\"button\"\r\n (click)=\"onAddLdapUser(row)\"\r\n >\r\n Add User\r\n </button>\r\n <ng-template #deleteLdapUserBtn>\r\n <button\r\n mat-button\r\n class=\"details-ldap-table__add-btn details-ldap-table__add-btn--delete\"\r\n type=\"button\"\r\n (click)=\"onDeleteLdapUser(row)\"\r\n >\r\n Delete user\r\n </button>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"userCreationWizardService.ldapTableColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: userCreationWizardService.ldapTableColumns\"></tr>\r\n </table>\r\n\r\n <mat-paginator\r\n *ngIf=\"!ldapLoading && hasLdapUsers\"\r\n class=\"details-ldap-paginator\"\r\n [length]=\"ldapTotalCount\"\r\n [pageSize]=\"ldapPageSize\"\r\n [pageIndex]=\"ldapPageIndex\"\r\n [pageSizeOptions]=\"[ldapPageSize]\"\r\n [hidePageSize]=\"true\"\r\n [disabled]=\"ldapLoading\"\r\n (page)=\"onLdapPageChange($event)\"\r\n ></mat-paginator>\r\n </div>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Lines</h3>\r\n <div class=\"details-step-section__content\" formArrayName=\"lines\">\r\n <div class=\"line-route-list\">\r\n <div\r\n class=\"line-route-row\"\r\n *ngFor=\"let lineGroup of linesFormArray.controls; let idx = index\"\r\n [formGroupName]=\"idx\"\r\n >\r\n <div class=\"line-info\">\r\n <mat-form-field\r\n class=\"details-step-input line-route-field\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n hideRequiredMarker\r\n >\r\n <input matInput placeholder=\"Line number\" formControlName=\"lineNumber\" />\r\n </mat-form-field>\r\n\r\n <mat-form-field\r\n class=\"details-step-input line-route-field\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n hideRequiredMarker\r\n >\r\n <input\r\n matInput\r\n placeholder=\"Search for a number\"\r\n formControlName=\"number\"\r\n [matAutocomplete]=\"numberAuto\"\r\n (input)=\"filterAvailableNumbers(idx, $event)\"\r\n />\r\n <mat-autocomplete\r\n #numberAuto=\"matAutocomplete\"\r\n [panelWidth]=\"'auto'\"\r\n (optionSelected)=\"onNumberSelected(idx, $event.option.value)\"\r\n >\r\n <mat-option *ngFor=\"let option of getFilteredNumbers(idx)\" [value]=\"option\">\r\n {{ option }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf=\"getLineGroup(idx).get('number')?.invalid && getLineGroup(idx).get('number')?.touched\">\r\n Number is required\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-form-field\r\n class=\"details-step-input line-route-field\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n hideRequiredMarker\r\n >\r\n <input\r\n matInput\r\n placeholder=\"Select route partition\"\r\n formControlName=\"routePartition\"\r\n [matAutocomplete]=\"routePartitionAuto\"\r\n (input)=\"filterRoutePartitions(idx, $event)\"\r\n />\r\n <mat-autocomplete\r\n #routePartitionAuto=\"matAutocomplete\"\r\n (optionSelected)=\"onRoutePartitionSelected(idx, $event.option.value)\"\r\n >\r\n <mat-option\r\n *ngFor=\"let routePartition of getFilteredRoutePartitions(idx)\"\r\n [value]=\"routePartition\"\r\n >\r\n {{ routePartition }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf=\"getLineGroup(idx).get('routePartition')?.invalid && getLineGroup(idx).get('routePartition')?.touched\">\r\n Route partition is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Devices</h3>\r\n <div class=\"details-step-section__content\" formArrayName=\"devices\">\r\n <div class=\"devices-rows\">\r\n <div\r\n class=\"details-inline-fields details-inline-fields--four\"\r\n *ngFor=\"let deviceGroup of devicesFormArray.controls; let idx = index\"\r\n [formGroupName]=\"idx\"\r\n >\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Device type</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"deviceType\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Protocol</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"protocol\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Button Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"buttonTemplate\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <span matPrefix *ngIf=\"getDeviceNamePrefix(idx) as devicePrefix\">{{ devicePrefix }}</span>\r\n <input matInput placeholder=\"Name\" formControlName=\"name\" />\r\n <mat-error *ngIf=\"getDeviceGroup(idx).get('name')?.hasError('deviceName') && getDeviceGroup(idx).get('name')?.touched\">\r\n {{ getDeviceGroup(idx).get('name')?.getError('deviceName')?.caption || getDeviceNameValidationCaption(idx) || 'Please enter a valid device name' }}\r\n </mat-error>\r\n <mat-error *ngIf=\"getDeviceGroup(idx).get('name')?.hasError('required') && getDeviceGroup(idx).get('name')?.touched\">\r\n Name is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\" *ngIf=\"deviceProfilesFormArray.length\">\r\n <h3 class=\"details-step-section__title\">Device profiles</h3>\r\n <div class=\"details-step-section__content\" formArrayName=\"deviceProfiles\">\r\n <div class=\"devices-rows\">\r\n <div\r\n class=\"details-inline-fields details-inline-fields--four\"\r\n *ngFor=\"let profileGroup of deviceProfilesFormArray.controls; let idx = index\"\r\n [formGroupName]=\"idx\"\r\n >\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Device type</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"deviceType\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Protocol</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"protocol\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Button Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"buttonTemplate\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <span matPrefix *ngIf=\"getDeviceProfileNamePrefix(idx) as profilePrefix\">{{ profilePrefix }}</span>\r\n <input matInput placeholder=\"Name\" formControlName=\"name\" />\r\n <mat-error *ngIf=\"getDeviceProfileGroup(idx).get('name')?.hasError('deviceName') && getDeviceProfileGroup(idx).get('name')?.touched\">\r\n {{ getDeviceProfileGroup(idx).get('name')?.getError('deviceName')?.caption || getDeviceProfileNameValidationCaption(idx) || 'Please enter a valid device name' }}\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n </form>\r\n</section>\r\n", styles: [".details-step-content{display:flex;flex-direction:column;gap:0}.details-step-dropdowns{display:flex;flex-direction:column;gap:1rem}.details-step-field{display:flex;flex-direction:column;gap:8px}.details-step-label{font-size:16px;font-weight:400;line-height:100%;letter-spacing:0;color:#333}.details-step-select{width:333px}.details-step-divider{border-top:1px solid #d9d9d9;margin-top:24px}.details-step-sections{display:flex;flex-direction:column}.details-step-section{display:flex;flex-direction:column;gap:0;padding:24px 0}.details-step-sections>.details-step-section:first-child{padding-top:0}.details-step-section+.details-step-section{border-top:1px solid #d9d9d9}.details-step-section__title{margin:0;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:100%;letter-spacing:0;color:#333}.details-step-section__content{margin-top:24px}.details-step-section__part+.details-step-section__part{margin-top:24px}.details-user-accordion{width:100%}.details-user-accordion__content{padding:12px 0 0}.details-ldap-search{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:16px}.details-ldap-search__input{min-width:180px;width:180px}.details-ldap-search__select{flex:0 1 180px;min-width:160px}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-wrapper,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-wrapper{padding-bottom:0;margin:0}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-flex,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:4px;padding:0 12px}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline,:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline-start,:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline-end,:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline-gap,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline-start,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline-end,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-infix,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-infix{width:100%;border-top:0;padding:0;display:flex;align-items:center;min-height:unset}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-input-element,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-input-element{margin:0;line-height:20px}:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-select-trigger{display:flex;align-items:center;width:100%;height:100%}:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-select-value{display:flex;align-items:center;max-width:100%}:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-select-arrow-wrapper{display:flex;align-items:center}.details-ldap-search__chip{flex:0 0 auto}.details-ldap-search__btn{flex:0 0 auto;min-width:0;padding:0 12px;font-family:Inter,sans-serif;font-size:14px;font-weight:500;color:#0d56aa}.details-ldap-paginator{margin-top:8px}.details-ldap-table__add-btn--delete{color:#c62828}.details-ldap-table{width:100%}.details-ldap-table__empty{margin:16px 0 8px;font-family:Inter,sans-serif;font-size:14px;line-height:20px;color:#737480;text-align:center}.details-ldap-table__row--disabled{opacity:.35}.details-ldap-table__add-btn{min-width:0;padding:0;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#0d56aa}:host ::ng-deep .details-ldap-table .mat-header-cell{font-family:Inter,sans-serif;font-size:12px;font-weight:500;line-height:16px;letter-spacing:0;color:#737480;height:30px;padding:7px 8px}:host ::ng-deep .details-ldap-table .mat-cell{font-family:Inter,sans-serif;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0;color:#333;height:40px;padding:8px}.details-inline-fields{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.details-inline-fields--four{grid-template-columns:repeat(4,minmax(0,1fr))}.devices-rows{display:flex;flex-direction:column;gap:24px}.details-inline-field{display:flex;flex-direction:column;gap:4px}.details-inline-field__label{color:#c0c2ce;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0}.details-step-input{width:100%}.line-route-list{display:flex;flex-direction:column;gap:16px}.line-route-row{display:flex;gap:16px}.line-info{display:flex;align-items:flex-start;gap:16px}.line-route-field{flex:1 1 180px;min-width:160px}.line-route-field{display:flex;flex-direction:column;gap:0}.line-route-field:nth-of-type(1) .line-route-select{width:230px}.line-route-field .line-route-select{width:185px}:host ::ng-deep .details-step-select .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-input .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-select .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:6px;padding:0 12px}:host ::ng-deep .details-step-input .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:4px;padding:10px 8px}:host ::ng-deep .details-step-select .mat-form-field-outline,:host ::ng-deep .details-step-select .mat-form-field-outline-start,:host ::ng-deep .details-step-select .mat-form-field-outline-end,:host ::ng-deep .details-step-select .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-input .mat-form-field-outline,:host ::ng-deep .details-step-input .mat-form-field-outline-start,:host ::ng-deep .details-step-input .mat-form-field-outline-end,:host ::ng-deep .details-step-input .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-select .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-input .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-select .mat-select-trigger{display:flex;align-items:center;justify-content:space-between;height:100%}:host ::ng-deep .details-step-input .mat-input-element{height:100%;margin:0}:host ::ng-deep .details-step-input.mat-form-field-disabled .mat-form-field-flex{background-color:#f5f6fa;border-color:#b8beca;opacity:.55;cursor:not-allowed}:host ::ng-deep .details-step-input .mat-input-element:disabled{color:#7f8694;-webkit-text-fill-color:#7f8694;cursor:not-allowed}:host ::ng-deep .line-info .details-step-input .mat-form-field-flex{height:36px;padding:0 8px}:host ::ng-deep .line-info .details-step-input .mat-form-field-infix{padding:0}:host ::ng-deep .line-info .details-step-input .mat-input-element{font-size:14px;line-height:20px}:host ::ng-deep .mat-form-field-subscript-wrapper{position:relative}:host ::ng-deep .line-info .details-step-input .mat-form-field-subscript-wrapper{margin-top:4px;position:relative}:host ::ng-deep .details-user-accordion .mat-expansion-panel{border:0;border-radius:0!important;background:transparent;box-shadow:none!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header{padding:0 0 0 8px;min-height:32px;height:32px}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header-title{margin:0;display:flex;align-items:center;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#333}:host ::ng-deep .details-user-accordion .mat-expansion-panel-body{padding:0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-content{display:flex;align-items:center}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator{display:block!important;opacity:1!important;color:#333!important;align-self:center;margin:0 8px 0 0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator:after{color:#333!important;border-color:#333!important;position:relative;top:-4px}:host ::ng-deep .devices-rows .details-inline-fields .details-inline-field .mat-form-field .mat-form-field-flex{display:flex;gap:3px}:host ::ng-deep .devices-rows .details-inline-fields .details-inline-field .mat-form-field .mat-form-field-flex .mat-form-field-prefix{top:1px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i8.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i11.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i12.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i12.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i13.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i14.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i14.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { kind: "directive", type: i14.MatChipRemove, selector: "[matChipRemove]" }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i15.MatAccordion, selector: "mat-accordion", inputs: ["multi", "hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i15.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i15.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i15.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "component", type: AppLoaderComponent, selector: "app-loader" }] });
724
2364
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDetailsStepComponent, decorators: [{
725
2365
  type: Component,
726
- args: [{ selector: 'tk-user-details-step', template: "<section class=\"details-step-content\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"details-step-section__part\">\r\n <div class=\"details-inline-fields\">\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User ID</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"User ID\"\r\n [value]=\"userCreationWizardService.userDetailsForm.userId\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'userId',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">First Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"First Name\"\r\n [value]=\"userCreationWizardService.userDetailsForm.firstName\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'firstName',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Last Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Last Name\"\r\n [value]=\"userCreationWizardService.userDetailsForm.lastName\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'lastName',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Email</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Email\"\r\n [value]=\"userCreationWizardService.userDetailsForm.email\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'email',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"User Template\"\r\n [value]=\"userCreationWizardService.selectedTemplate || ''\"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"details-step-section__part\">\r\n <mat-accordion class=\"details-user-accordion\">\r\n <mat-expansion-panel togglePosition=\"before\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title\r\n >Choose an existing or a LDAP user</mat-panel-title\r\n >\r\n </mat-expansion-panel-header>\r\n <div class=\"details-user-accordion__content\">\r\n <table\r\n mat-table\r\n [dataSource]=\"userCreationWizardService.ldapUsers\"\r\n class=\"details-ldap-table\"\r\n >\r\n <ng-container matColumnDef=\"userId\">\r\n <th mat-header-cell *matHeaderCellDef>User ID</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.userId }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"firstName\">\r\n <th mat-header-cell *matHeaderCellDef>First Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.firstName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"lastName\">\r\n <th mat-header-cell *matHeaderCellDef>Last Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.lastName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"email\">\r\n <th mat-header-cell *matHeaderCellDef>Email</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.email }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"add\">\r\n <th mat-header-cell *matHeaderCellDef>Add</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <button\r\n mat-button\r\n class=\"details-ldap-table__add-btn\"\r\n type=\"button\"\r\n [disabled]=\"\r\n userCreationWizardService.isLdapUserAdded(row)\r\n \"\r\n (click)=\"onAddUser(row)\"\r\n >\r\n Add user\r\n </button>\r\n </td>\r\n </ng-container>\r\n\r\n <tr\r\n mat-header-row\r\n *matHeaderRowDef=\"\r\n userCreationWizardService.ldapTableColumns\r\n \"\r\n ></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"\r\n let row;\r\n columns: userCreationWizardService.ldapTableColumns\r\n \"\r\n [class.details-ldap-table__row--disabled]=\"\r\n userCreationWizardService.isLdapUserAdded(row)\r\n \"\r\n ></tr>\r\n </table>\r\n </div>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Lines</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"line-route-list\">\r\n <div\r\n class=\"line-route-row\"\r\n *ngFor=\"\r\n let lineSelection of userCreationWizardService.lineSelections;\r\n let idx = index\r\n \"\r\n >\r\n <div class=\"line-route-field\">\r\n <mat-form-field\r\n class=\"details-step-select line-route-select\"\r\n appearance=\"outline\"\r\n >\r\n <mat-select\r\n placeholder=\"Select line\"\r\n [value]=\"lineSelection.lineNumber\"\r\n (selectionChange)=\"\r\n userCreationWizardService.setLineSelection(\r\n idx,\r\n $event.value\r\n )\r\n \"\r\n >\r\n <mat-option\r\n *ngFor=\"let line of userCreationWizardService.lineOptions\"\r\n [value]=\"line.number\"\r\n >\r\n {{ line.number }} - {{ line.did }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"line-route-field\">\r\n <mat-form-field\r\n class=\"details-step-select line-route-select\"\r\n appearance=\"outline\"\r\n >\r\n <mat-select\r\n placeholder=\"Select route partition\"\r\n [value]=\"lineSelection.routePartitionName\"\r\n (selectionChange)=\"\r\n userCreationWizardService.setRoutePartitionSelection(\r\n idx,\r\n $event.value\r\n )\r\n \"\r\n >\r\n <mat-option\r\n *ngFor=\"\r\n let partition of userCreationWizardService.routePartitionOptions\r\n \"\r\n [value]=\"partition\"\r\n >\r\n {{ partition }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Devices</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"devices-rows\">\r\n <div\r\n class=\"details-inline-fields details-inline-fields--four\"\r\n *ngFor=\"\r\n let _row of userCreationWizardService.deviceRows;\r\n let idx = index\r\n \"\r\n >\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Device type</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Device type\"\r\n [value]=\"\r\n userCreationWizardService.deviceEntries[idx].deviceType ||\r\n ''\r\n \"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Protocol</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Protocol\"\r\n [value]=\"\r\n userCreationWizardService.deviceEntries[idx].protocol || ''\r\n \"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Button Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Button Template\"\r\n [value]=\"\r\n userCreationWizardService.deviceEntries[idx]\r\n .buttonTemplate || ''\r\n \"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Name\"\r\n [value]=\"getDeviceName(idx)\"\r\n (input)=\"\r\n userCreationWizardService.setDeviceName(\r\n idx,\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n</section>\r\n", styles: [".details-step-content{display:flex;flex-direction:column;gap:0}.details-step-dropdowns{display:flex;flex-direction:column;gap:1rem}.details-step-field{display:flex;flex-direction:column;gap:8px}.details-step-label{font-size:16px;font-weight:400;line-height:100%;letter-spacing:0;color:#333}.details-step-select{width:333px}.details-step-divider{border-top:1px solid #d9d9d9;margin-top:24px}.details-step-sections{display:flex;flex-direction:column}.details-step-section{display:flex;flex-direction:column;gap:0;padding:24px 0}.details-step-sections>.details-step-section:first-child{padding-top:0}.details-step-section+.details-step-section{border-top:1px solid #d9d9d9}.details-step-section__title{margin:0;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:100%;letter-spacing:0;color:#333}.details-step-section__content{margin-top:24px}.details-step-section__part+.details-step-section__part{margin-top:24px}.details-user-accordion{width:100%}.details-user-accordion__content{padding:12px 0 0}.details-ldap-table{width:100%}.details-ldap-table__row--disabled{opacity:.35}.details-ldap-table__add-btn{min-width:0;padding:0;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#0d56aa}:host ::ng-deep .details-ldap-table .mat-header-cell{font-family:Inter,sans-serif;font-size:12px;font-weight:500;line-height:16px;letter-spacing:0;color:#737480;height:30px;padding:7px 8px}:host ::ng-deep .details-ldap-table .mat-cell{font-family:Inter,sans-serif;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0;color:#333;height:40px;padding:8px}.details-inline-fields{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.details-inline-fields--four{grid-template-columns:repeat(4,minmax(0,1fr))}.devices-rows{display:flex;flex-direction:column;gap:24px}.details-inline-field{display:flex;flex-direction:column;gap:4px}.details-inline-field__label{color:#c0c2ce;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0}.details-step-input{width:100%}.line-route-list{display:flex;flex-direction:column;gap:16px}.line-route-row{display:flex;gap:16px}.line-route-field{display:flex;flex-direction:column;gap:0}.line-route-field:nth-of-type(1) .line-route-select{width:230px}.line-route-field .line-route-select{width:185px}:host ::ng-deep .details-step-select .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-input .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-select .mat-form-field-flex{align-items:center;height:32px;border:1px solid #767676;border-radius:6px;padding:0 12px}:host ::ng-deep .details-step-input .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:4px;padding:10px 8px}:host ::ng-deep .details-step-select .mat-form-field-outline,:host ::ng-deep .details-step-select .mat-form-field-outline-start,:host ::ng-deep .details-step-select .mat-form-field-outline-end,:host ::ng-deep .details-step-select .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-input .mat-form-field-outline,:host ::ng-deep .details-step-input .mat-form-field-outline-start,:host ::ng-deep .details-step-input .mat-form-field-outline-end,:host ::ng-deep .details-step-input .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-select .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-input .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-select .mat-select-trigger{display:flex;align-items:center;justify-content:space-between;height:100%}:host ::ng-deep .details-step-input .mat-input-element{height:100%;margin:0}:host ::ng-deep .details-step-input.mat-form-field-disabled .mat-form-field-flex{background-color:#f5f6fa;border-color:#b8beca;opacity:.55;cursor:not-allowed}:host ::ng-deep .details-step-input .mat-input-element:disabled{color:#7f8694;-webkit-text-fill-color:#7f8694;cursor:not-allowed}:host ::ng-deep .details-user-accordion .mat-expansion-panel{border:0;border-radius:0!important;background:transparent;box-shadow:none!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header{padding:0 0 0 8px;min-height:32px;height:32px}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header-title{margin:0;display:flex;align-items:center;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#333}:host ::ng-deep .details-user-accordion .mat-expansion-panel-body{padding:0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-content{display:flex;align-items:center}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator{display:block!important;opacity:1!important;color:#333!important;align-self:center;margin:0 8px 0 0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator:after{color:#333!important;border-color:#333!important;position:relative;top:-4px}\n"] }]
727
- }], ctorParameters: function () { return [{ type: UserCreationWizardService }]; } });
2366
+ args: [{ selector: 'tk-user-details-step', template: "<app-loader *ngIf=\"loadingAvailableNumbers\"></app-loader>\r\n<section class=\"details-step-content\">\r\n <form [formGroup]=\"userDetailsForm\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"details-step-section__part\">\r\n <div class=\"details-inline-fields\">\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User ID</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"User ID\" formControlName=\"userId\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('userId')?.hasError('required') && userDetailsForm.get('userId')?.touched\">\r\n User ID is required\r\n </mat-error>\r\n <mat-error *ngIf=\"userDetailsForm.get('userId')?.hasError('userIdExists') && userDetailsForm.get('userId')?.touched\">\r\n User ID already exists\r\n </mat-error>\r\n <mat-hint *ngIf=\"userIdCheckPending\">Checking user ID...</mat-hint>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">First Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"First Name\" formControlName=\"firstName\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('firstName')?.hasError('required') && userDetailsForm.get('firstName')?.touched\">\r\n First name is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Last Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"Last Name\" formControlName=\"lastName\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('lastName')?.hasError('required') && userDetailsForm.get('lastName')?.touched\">\r\n Last name is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Email</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"Email\" formControlName=\"email\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('email')?.invalid && userDetailsForm.get('email')?.touched\">\r\n <span *ngIf=\"userDetailsForm.get('email')?.hasError('required')\">Email is required</span>\r\n <span *ngIf=\"userDetailsForm.get('email')?.hasError('email')\">Please enter a valid email</span>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"User Template\"\r\n [value]=\"userCreationWizardService.selectedTemplateName || ''\"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"details-step-section__part\">\r\n <mat-accordion class=\"details-user-accordion\">\r\n <mat-expansion-panel togglePosition=\"before\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>Choose an existing or a LDAP user</mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div class=\"details-user-accordion__content\">\r\n <div class=\"details-ldap-search\" [formGroup]=\"ldapSearchForm\">\r\n <mat-form-field\r\n class=\"details-ldap-search__input\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n >\r\n <input\r\n matInput\r\n placeholder=\"Search\"\r\n formControlName=\"queryValue\"\r\n (keyup.enter)=\"searchLdapUsers()\"\r\n />\r\n </mat-form-field>\r\n\r\n <mat-form-field\r\n class=\"details-ldap-search__select\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n >\r\n <mat-select formControlName=\"queryType\">\r\n <mat-option *ngFor=\"let option of ldapQueryTypeOptions\" [value]=\"option.value\">\r\n {{ option.label }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-chip-list *ngIf=\"selectedLdapUser\" class=\"details-ldap-search__chip\">\r\n <mat-chip removable (removed)=\"onRemoveLdapTag()\">\r\n {{ selectedLdapUser.userid }}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </mat-chip>\r\n </mat-chip-list>\r\n\r\n <button\r\n mat-button\r\n class=\"details-ldap-search__btn\"\r\n type=\"button\"\r\n [disabled]=\"ldapLoading\"\r\n (click)=\"searchLdapUsers()\"\r\n >\r\n Search\r\n </button>\r\n </div>\r\n\r\n <app-loader *ngIf=\"ldapLoading\"></app-loader>\r\n\r\n <p\r\n *ngIf=\"!ldapLoading && ldapSearchAttempted && !hasLdapUsers\"\r\n class=\"details-ldap-table__empty\"\r\n >\r\n No users found\r\n </p>\r\n\r\n <table\r\n *ngIf=\"!ldapLoading && hasLdapUsers\"\r\n mat-table\r\n [dataSource]=\"userCreationWizardService.ldapUsers\"\r\n class=\"details-ldap-table\"\r\n >\r\n <ng-container matColumnDef=\"userId\">\r\n <th mat-header-cell *matHeaderCellDef>User Id</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.userid }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"firstName\">\r\n <th mat-header-cell *matHeaderCellDef>First Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.firstName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"lastName\">\r\n <th mat-header-cell *matHeaderCellDef>Last Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.lastName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"email\">\r\n <th mat-header-cell *matHeaderCellDef>Email</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.email }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"add\">\r\n <th mat-header-cell *matHeaderCellDef>Add</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <button\r\n *ngIf=\"!isLdapUserRowSelected(row); else deleteLdapUserBtn\"\r\n mat-button\r\n class=\"details-ldap-table__add-btn\"\r\n type=\"button\"\r\n (click)=\"onAddLdapUser(row)\"\r\n >\r\n Add User\r\n </button>\r\n <ng-template #deleteLdapUserBtn>\r\n <button\r\n mat-button\r\n class=\"details-ldap-table__add-btn details-ldap-table__add-btn--delete\"\r\n type=\"button\"\r\n (click)=\"onDeleteLdapUser(row)\"\r\n >\r\n Delete user\r\n </button>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"userCreationWizardService.ldapTableColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: userCreationWizardService.ldapTableColumns\"></tr>\r\n </table>\r\n\r\n <mat-paginator\r\n *ngIf=\"!ldapLoading && hasLdapUsers\"\r\n class=\"details-ldap-paginator\"\r\n [length]=\"ldapTotalCount\"\r\n [pageSize]=\"ldapPageSize\"\r\n [pageIndex]=\"ldapPageIndex\"\r\n [pageSizeOptions]=\"[ldapPageSize]\"\r\n [hidePageSize]=\"true\"\r\n [disabled]=\"ldapLoading\"\r\n (page)=\"onLdapPageChange($event)\"\r\n ></mat-paginator>\r\n </div>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Lines</h3>\r\n <div class=\"details-step-section__content\" formArrayName=\"lines\">\r\n <div class=\"line-route-list\">\r\n <div\r\n class=\"line-route-row\"\r\n *ngFor=\"let lineGroup of linesFormArray.controls; let idx = index\"\r\n [formGroupName]=\"idx\"\r\n >\r\n <div class=\"line-info\">\r\n <mat-form-field\r\n class=\"details-step-input line-route-field\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n hideRequiredMarker\r\n >\r\n <input matInput placeholder=\"Line number\" formControlName=\"lineNumber\" />\r\n </mat-form-field>\r\n\r\n <mat-form-field\r\n class=\"details-step-input line-route-field\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n hideRequiredMarker\r\n >\r\n <input\r\n matInput\r\n placeholder=\"Search for a number\"\r\n formControlName=\"number\"\r\n [matAutocomplete]=\"numberAuto\"\r\n (input)=\"filterAvailableNumbers(idx, $event)\"\r\n />\r\n <mat-autocomplete\r\n #numberAuto=\"matAutocomplete\"\r\n [panelWidth]=\"'auto'\"\r\n (optionSelected)=\"onNumberSelected(idx, $event.option.value)\"\r\n >\r\n <mat-option *ngFor=\"let option of getFilteredNumbers(idx)\" [value]=\"option\">\r\n {{ option }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf=\"getLineGroup(idx).get('number')?.invalid && getLineGroup(idx).get('number')?.touched\">\r\n Number is required\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-form-field\r\n class=\"details-step-input line-route-field\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n hideRequiredMarker\r\n >\r\n <input\r\n matInput\r\n placeholder=\"Select route partition\"\r\n formControlName=\"routePartition\"\r\n [matAutocomplete]=\"routePartitionAuto\"\r\n (input)=\"filterRoutePartitions(idx, $event)\"\r\n />\r\n <mat-autocomplete\r\n #routePartitionAuto=\"matAutocomplete\"\r\n (optionSelected)=\"onRoutePartitionSelected(idx, $event.option.value)\"\r\n >\r\n <mat-option\r\n *ngFor=\"let routePartition of getFilteredRoutePartitions(idx)\"\r\n [value]=\"routePartition\"\r\n >\r\n {{ routePartition }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf=\"getLineGroup(idx).get('routePartition')?.invalid && getLineGroup(idx).get('routePartition')?.touched\">\r\n Route partition is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Devices</h3>\r\n <div class=\"details-step-section__content\" formArrayName=\"devices\">\r\n <div class=\"devices-rows\">\r\n <div\r\n class=\"details-inline-fields details-inline-fields--four\"\r\n *ngFor=\"let deviceGroup of devicesFormArray.controls; let idx = index\"\r\n [formGroupName]=\"idx\"\r\n >\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Device type</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"deviceType\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Protocol</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"protocol\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Button Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"buttonTemplate\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <span matPrefix *ngIf=\"getDeviceNamePrefix(idx) as devicePrefix\">{{ devicePrefix }}</span>\r\n <input matInput placeholder=\"Name\" formControlName=\"name\" />\r\n <mat-error *ngIf=\"getDeviceGroup(idx).get('name')?.hasError('deviceName') && getDeviceGroup(idx).get('name')?.touched\">\r\n {{ getDeviceGroup(idx).get('name')?.getError('deviceName')?.caption || getDeviceNameValidationCaption(idx) || 'Please enter a valid device name' }}\r\n </mat-error>\r\n <mat-error *ngIf=\"getDeviceGroup(idx).get('name')?.hasError('required') && getDeviceGroup(idx).get('name')?.touched\">\r\n Name is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\" *ngIf=\"deviceProfilesFormArray.length\">\r\n <h3 class=\"details-step-section__title\">Device profiles</h3>\r\n <div class=\"details-step-section__content\" formArrayName=\"deviceProfiles\">\r\n <div class=\"devices-rows\">\r\n <div\r\n class=\"details-inline-fields details-inline-fields--four\"\r\n *ngFor=\"let profileGroup of deviceProfilesFormArray.controls; let idx = index\"\r\n [formGroupName]=\"idx\"\r\n >\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Device type</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"deviceType\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Protocol</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"protocol\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Button Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"buttonTemplate\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <span matPrefix *ngIf=\"getDeviceProfileNamePrefix(idx) as profilePrefix\">{{ profilePrefix }}</span>\r\n <input matInput placeholder=\"Name\" formControlName=\"name\" />\r\n <mat-error *ngIf=\"getDeviceProfileGroup(idx).get('name')?.hasError('deviceName') && getDeviceProfileGroup(idx).get('name')?.touched\">\r\n {{ getDeviceProfileGroup(idx).get('name')?.getError('deviceName')?.caption || getDeviceProfileNameValidationCaption(idx) || 'Please enter a valid device name' }}\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n </form>\r\n</section>\r\n", styles: [".details-step-content{display:flex;flex-direction:column;gap:0}.details-step-dropdowns{display:flex;flex-direction:column;gap:1rem}.details-step-field{display:flex;flex-direction:column;gap:8px}.details-step-label{font-size:16px;font-weight:400;line-height:100%;letter-spacing:0;color:#333}.details-step-select{width:333px}.details-step-divider{border-top:1px solid #d9d9d9;margin-top:24px}.details-step-sections{display:flex;flex-direction:column}.details-step-section{display:flex;flex-direction:column;gap:0;padding:24px 0}.details-step-sections>.details-step-section:first-child{padding-top:0}.details-step-section+.details-step-section{border-top:1px solid #d9d9d9}.details-step-section__title{margin:0;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:100%;letter-spacing:0;color:#333}.details-step-section__content{margin-top:24px}.details-step-section__part+.details-step-section__part{margin-top:24px}.details-user-accordion{width:100%}.details-user-accordion__content{padding:12px 0 0}.details-ldap-search{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:16px}.details-ldap-search__input{min-width:180px;width:180px}.details-ldap-search__select{flex:0 1 180px;min-width:160px}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-wrapper,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-wrapper{padding-bottom:0;margin:0}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-flex,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:4px;padding:0 12px}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline,:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline-start,:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline-end,:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline-gap,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline-start,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline-end,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-infix,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-infix{width:100%;border-top:0;padding:0;display:flex;align-items:center;min-height:unset}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-input-element,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-input-element{margin:0;line-height:20px}:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-select-trigger{display:flex;align-items:center;width:100%;height:100%}:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-select-value{display:flex;align-items:center;max-width:100%}:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-select-arrow-wrapper{display:flex;align-items:center}.details-ldap-search__chip{flex:0 0 auto}.details-ldap-search__btn{flex:0 0 auto;min-width:0;padding:0 12px;font-family:Inter,sans-serif;font-size:14px;font-weight:500;color:#0d56aa}.details-ldap-paginator{margin-top:8px}.details-ldap-table__add-btn--delete{color:#c62828}.details-ldap-table{width:100%}.details-ldap-table__empty{margin:16px 0 8px;font-family:Inter,sans-serif;font-size:14px;line-height:20px;color:#737480;text-align:center}.details-ldap-table__row--disabled{opacity:.35}.details-ldap-table__add-btn{min-width:0;padding:0;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#0d56aa}:host ::ng-deep .details-ldap-table .mat-header-cell{font-family:Inter,sans-serif;font-size:12px;font-weight:500;line-height:16px;letter-spacing:0;color:#737480;height:30px;padding:7px 8px}:host ::ng-deep .details-ldap-table .mat-cell{font-family:Inter,sans-serif;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0;color:#333;height:40px;padding:8px}.details-inline-fields{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.details-inline-fields--four{grid-template-columns:repeat(4,minmax(0,1fr))}.devices-rows{display:flex;flex-direction:column;gap:24px}.details-inline-field{display:flex;flex-direction:column;gap:4px}.details-inline-field__label{color:#c0c2ce;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0}.details-step-input{width:100%}.line-route-list{display:flex;flex-direction:column;gap:16px}.line-route-row{display:flex;gap:16px}.line-info{display:flex;align-items:flex-start;gap:16px}.line-route-field{flex:1 1 180px;min-width:160px}.line-route-field{display:flex;flex-direction:column;gap:0}.line-route-field:nth-of-type(1) .line-route-select{width:230px}.line-route-field .line-route-select{width:185px}:host ::ng-deep .details-step-select .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-input .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-select .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:6px;padding:0 12px}:host ::ng-deep .details-step-input .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:4px;padding:10px 8px}:host ::ng-deep .details-step-select .mat-form-field-outline,:host ::ng-deep .details-step-select .mat-form-field-outline-start,:host ::ng-deep .details-step-select .mat-form-field-outline-end,:host ::ng-deep .details-step-select .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-input .mat-form-field-outline,:host ::ng-deep .details-step-input .mat-form-field-outline-start,:host ::ng-deep .details-step-input .mat-form-field-outline-end,:host ::ng-deep .details-step-input .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-select .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-input .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-select .mat-select-trigger{display:flex;align-items:center;justify-content:space-between;height:100%}:host ::ng-deep .details-step-input .mat-input-element{height:100%;margin:0}:host ::ng-deep .details-step-input.mat-form-field-disabled .mat-form-field-flex{background-color:#f5f6fa;border-color:#b8beca;opacity:.55;cursor:not-allowed}:host ::ng-deep .details-step-input .mat-input-element:disabled{color:#7f8694;-webkit-text-fill-color:#7f8694;cursor:not-allowed}:host ::ng-deep .line-info .details-step-input .mat-form-field-flex{height:36px;padding:0 8px}:host ::ng-deep .line-info .details-step-input .mat-form-field-infix{padding:0}:host ::ng-deep .line-info .details-step-input .mat-input-element{font-size:14px;line-height:20px}:host ::ng-deep .mat-form-field-subscript-wrapper{position:relative}:host ::ng-deep .line-info .details-step-input .mat-form-field-subscript-wrapper{margin-top:4px;position:relative}:host ::ng-deep .details-user-accordion .mat-expansion-panel{border:0;border-radius:0!important;background:transparent;box-shadow:none!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header{padding:0 0 0 8px;min-height:32px;height:32px}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header-title{margin:0;display:flex;align-items:center;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#333}:host ::ng-deep .details-user-accordion .mat-expansion-panel-body{padding:0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-content{display:flex;align-items:center}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator{display:block!important;opacity:1!important;color:#333!important;align-self:center;margin:0 8px 0 0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator:after{color:#333!important;border-color:#333!important;position:relative;top:-4px}:host ::ng-deep .devices-rows .details-inline-fields .details-inline-field .mat-form-field .mat-form-field-flex{display:flex;gap:3px}:host ::ng-deep .devices-rows .details-inline-fields .details-inline-field .mat-form-field .mat-form-field-flex .mat-form-field-prefix{top:1px}\n"] }]
2367
+ }], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: UserCreationApiService }, { type: UserCreationWizardService }]; }, propDecorators: { validityChange: [{
2368
+ type: Output
2369
+ }] } });
728
2370
 
729
2371
  class UserOverviewStepComponent {
730
2372
  constructor(userCreationWizardService) {
@@ -735,17 +2377,21 @@ class UserOverviewStepComponent {
735
2377
  }
736
2378
  }
737
2379
  UserOverviewStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserOverviewStepComponent, deps: [{ token: UserCreationWizardService }], target: i0.ɵɵFactoryTarget.Component });
738
- UserOverviewStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserOverviewStepComponent, selector: "tk-user-overview-step", ngImport: i0, template: "<section class=\"details-step-content\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"USER_DETAILS_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of USER_DETAILS_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let user of userCreationWizardService.overviewUsers\">\r\n <span>{{ user.userId }}</span>\r\n <span>{{ user.firstName }}</span>\r\n <span>{{ user.lastName }}</span>\r\n <span>{{ user.email }}</span>\r\n <span>{{ user.userTemplate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n \r\n <div class=\"details-step-divider\"></div>\r\n \r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Lines</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"LINES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of LINES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let line of userCreationWizardService.overviewLines\">\r\n <span>{{ line.number }}</span>\r\n <span>{{ line.did }}</span>\r\n <span>{{ line.routePartitionName }}</span>\r\n <span>{{ line.css }}</span>\r\n <span>{{ line.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n \r\n <div class=\"details-step-divider\"></div>\r\n \r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Devices</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"DEVICES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of DEVICES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let device of userCreationWizardService.overviewDevices\">\r\n <span>{{ device.name }}</span>\r\n <span>{{ device.deviceType }}</span>\r\n <span>{{ device.lines }}</span>\r\n <span>{{ device.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n \r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Single Number Reach</h3>\r\n <div class=\"details-step-section__content\"></div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n \r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Features</h3>\r\n <div class=\"details-step-section__content\">\r\n <span style=\"margin-right: 1rem;\">Voicemail</span> 557046\r\n </div>\r\n </section>\r\n </div>\r\n\r\n</section>", styles: [".details-step-content{display:flex;flex-direction:column;gap:24px}.details-step-divider{border-top:1px solid #d9d9d9}.details-step-sections{display:flex;flex-direction:column}.details-step-section{display:flex;flex-direction:column;gap:16px}.details-step-section+.details-step-section{border-top:1px solid #d9d9d9}.details-step-section__title{margin:0;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:100%;letter-spacing:0;color:#333}.preview-list{display:flex;flex-direction:column;gap:4px}.preview-list__header,.preview-list__row{display:grid;grid-template-columns:repeat(var(--preview-cols, 1),minmax(0,1fr));column-gap:24px}.preview-list__header>span,.preview-list__row>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--Gray-700, #737480);font-family:Inter,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.preview-list__row>span{min-width:0;color:var(--Gray-700, #333);font-family:Inter,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:150%}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
2380
+ UserOverviewStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserOverviewStepComponent, selector: "tk-user-overview-step", ngImport: i0, template: "<section class=\"details-step-content\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"USER_DETAILS_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of USER_DETAILS_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let user of userCreationWizardService.overviewUsers\">\r\n <span>{{ user.userId }}</span>\r\n <span>{{ user.firstName }}</span>\r\n <span>{{ user.lastName }}</span>\r\n <span>{{ user.email }}</span>\r\n <span>{{ user.userTemplate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Lines</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"LINES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of LINES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let line of userCreationWizardService.overviewLines\">\r\n <span>{{ line.number }}</span>\r\n <span>{{ line.did }}</span>\r\n <span>{{ line.routePartitionName }}</span>\r\n <span>{{ line.css }}</span>\r\n <span>{{ line.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Devices</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"DEVICES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of DEVICES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let device of userCreationWizardService.overviewDevices\">\r\n <span>{{ device.name }}</span>\r\n <span>{{ device.deviceType }}</span>\r\n <span>{{ device.lines }}</span>\r\n <span>{{ device.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <ng-container *ngIf=\"userCreationWizardService.overviewDeviceProfiles.length\">\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Device profiles</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"DEVICES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of DEVICES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let device of userCreationWizardService.overviewDeviceProfiles\">\r\n <span>{{ device.name }}</span>\r\n <span>{{ device.deviceType }}</span>\r\n <span>{{ device.lines }}</span>\r\n <span>{{ device.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <!-- <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Single Number Reach</h3>\r\n <div class=\"details-step-section__content\"></div>\r\n </section>\r\n </div> -->\r\n\r\n <!-- <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Features</h3>\r\n <div class=\"details-step-section__content\">\r\n <span style=\"margin-right: 1rem;\">Voicemail</span> 557046\r\n </div>\r\n </section>\r\n </div> -->\r\n</section>\r\n", styles: [".details-step-content{display:flex;flex-direction:column;gap:24px}.details-step-divider{border-top:1px solid #d9d9d9}.details-step-sections{display:flex;flex-direction:column}.details-step-section{display:flex;flex-direction:column;gap:16px}.details-step-section+.details-step-section{border-top:1px solid #d9d9d9}.details-step-section__title{margin:0;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:100%;letter-spacing:0;color:#333}.preview-list{display:flex;flex-direction:column;gap:4px}.preview-list__header,.preview-list__row{display:grid;grid-template-columns:repeat(var(--preview-cols, 1),minmax(0,1fr));column-gap:24px}.preview-list__header>span,.preview-list__row>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--Gray-700, #737480);font-family:Inter,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.preview-list__row>span{min-width:0;color:var(--Gray-700, #333);font-family:Inter,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:150%}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
739
2381
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserOverviewStepComponent, decorators: [{
740
2382
  type: Component,
741
- args: [{ selector: 'tk-user-overview-step', template: "<section class=\"details-step-content\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"USER_DETAILS_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of USER_DETAILS_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let user of userCreationWizardService.overviewUsers\">\r\n <span>{{ user.userId }}</span>\r\n <span>{{ user.firstName }}</span>\r\n <span>{{ user.lastName }}</span>\r\n <span>{{ user.email }}</span>\r\n <span>{{ user.userTemplate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n \r\n <div class=\"details-step-divider\"></div>\r\n \r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Lines</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"LINES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of LINES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let line of userCreationWizardService.overviewLines\">\r\n <span>{{ line.number }}</span>\r\n <span>{{ line.did }}</span>\r\n <span>{{ line.routePartitionName }}</span>\r\n <span>{{ line.css }}</span>\r\n <span>{{ line.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n \r\n <div class=\"details-step-divider\"></div>\r\n \r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Devices</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"DEVICES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of DEVICES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let device of userCreationWizardService.overviewDevices\">\r\n <span>{{ device.name }}</span>\r\n <span>{{ device.deviceType }}</span>\r\n <span>{{ device.lines }}</span>\r\n <span>{{ device.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n \r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Single Number Reach</h3>\r\n <div class=\"details-step-section__content\"></div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n \r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Features</h3>\r\n <div class=\"details-step-section__content\">\r\n <span style=\"margin-right: 1rem;\">Voicemail</span> 557046\r\n </div>\r\n </section>\r\n </div>\r\n\r\n</section>", styles: [".details-step-content{display:flex;flex-direction:column;gap:24px}.details-step-divider{border-top:1px solid #d9d9d9}.details-step-sections{display:flex;flex-direction:column}.details-step-section{display:flex;flex-direction:column;gap:16px}.details-step-section+.details-step-section{border-top:1px solid #d9d9d9}.details-step-section__title{margin:0;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:100%;letter-spacing:0;color:#333}.preview-list{display:flex;flex-direction:column;gap:4px}.preview-list__header,.preview-list__row{display:grid;grid-template-columns:repeat(var(--preview-cols, 1),minmax(0,1fr));column-gap:24px}.preview-list__header>span,.preview-list__row>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--Gray-700, #737480);font-family:Inter,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.preview-list__row>span{min-width:0;color:var(--Gray-700, #333);font-family:Inter,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:150%}\n"] }]
2383
+ args: [{ selector: 'tk-user-overview-step', template: "<section class=\"details-step-content\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"USER_DETAILS_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of USER_DETAILS_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let user of userCreationWizardService.overviewUsers\">\r\n <span>{{ user.userId }}</span>\r\n <span>{{ user.firstName }}</span>\r\n <span>{{ user.lastName }}</span>\r\n <span>{{ user.email }}</span>\r\n <span>{{ user.userTemplate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Lines</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"LINES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of LINES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let line of userCreationWizardService.overviewLines\">\r\n <span>{{ line.number }}</span>\r\n <span>{{ line.did }}</span>\r\n <span>{{ line.routePartitionName }}</span>\r\n <span>{{ line.css }}</span>\r\n <span>{{ line.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Devices</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"DEVICES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of DEVICES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let device of userCreationWizardService.overviewDevices\">\r\n <span>{{ device.name }}</span>\r\n <span>{{ device.deviceType }}</span>\r\n <span>{{ device.lines }}</span>\r\n <span>{{ device.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <ng-container *ngIf=\"userCreationWizardService.overviewDeviceProfiles.length\">\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Device profiles</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"DEVICES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of DEVICES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let device of userCreationWizardService.overviewDeviceProfiles\">\r\n <span>{{ device.name }}</span>\r\n <span>{{ device.deviceType }}</span>\r\n <span>{{ device.lines }}</span>\r\n <span>{{ device.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <!-- <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Single Number Reach</h3>\r\n <div class=\"details-step-section__content\"></div>\r\n </section>\r\n </div> -->\r\n\r\n <!-- <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Features</h3>\r\n <div class=\"details-step-section__content\">\r\n <span style=\"margin-right: 1rem;\">Voicemail</span> 557046\r\n </div>\r\n </section>\r\n </div> -->\r\n</section>\r\n", styles: [".details-step-content{display:flex;flex-direction:column;gap:24px}.details-step-divider{border-top:1px solid #d9d9d9}.details-step-sections{display:flex;flex-direction:column}.details-step-section{display:flex;flex-direction:column;gap:16px}.details-step-section+.details-step-section{border-top:1px solid #d9d9d9}.details-step-section__title{margin:0;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:100%;letter-spacing:0;color:#333}.preview-list{display:flex;flex-direction:column;gap:4px}.preview-list__header,.preview-list__row{display:grid;grid-template-columns:repeat(var(--preview-cols, 1),minmax(0,1fr));column-gap:24px}.preview-list__header>span,.preview-list__row>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--Gray-700, #737480);font-family:Inter,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.preview-list__row>span{min-width:0;color:var(--Gray-700, #333);font-family:Inter,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:150%}\n"] }]
742
2384
  }], ctorParameters: function () { return [{ type: UserCreationWizardService }]; } });
743
2385
 
744
2386
  class UserTemplateStepComponent {
2387
+ get isLoading() {
2388
+ return this.loadingSites || this.loadingSiteData;
2389
+ }
745
2390
  constructor(userCreationWizardService, userCreationService, fb) {
746
2391
  this.userCreationWizardService = userCreationWizardService;
747
2392
  this.userCreationService = userCreationService;
748
2393
  this.fb = fb;
2394
+ this.validityChange = new EventEmitter();
749
2395
  this.formGroup = this.fb.group({
750
2396
  userType: [USER_CREATION_TYPES.CUCM],
751
2397
  siteId: [null],
@@ -753,8 +2399,8 @@ class UserTemplateStepComponent {
753
2399
  });
754
2400
  this.userCreationType = USER_CREATION_TYPES.CUCM;
755
2401
  this.USER_CREATION_TYPES = USER_CREATION_TYPES;
756
- this.defaultTemplateName = '8851 + CSF';
757
- this.fallbackTemplateId = '-1';
2402
+ // readonly defaultTemplateName = 'User 8851 Office';
2403
+ // readonly fallbackTemplateId = '-1';
758
2404
  this.destroy$ = new Subject();
759
2405
  this.sitesList = [];
760
2406
  this.sitesList$ = this.userCreationService.sitesList$.pipe(takeUntil(this.destroy$), tap((res) => this.sitesList = res));
@@ -763,15 +2409,19 @@ class UserTemplateStepComponent {
763
2409
  const templateControl = this.formGroup.get('userTemplateId');
764
2410
  const currentTemplateId = templateControl?.value;
765
2411
  const selectedSiteId = this.formGroup.get('siteId')?.value;
766
- const defaultTemplate = this.templates.find(template => template.name === this.defaultTemplateName);
2412
+ // const defaultTemplate = this.templates.find(
2413
+ // template => template.name === this.defaultTemplateName
2414
+ // );
767
2415
  const hasSelectedSite = selectedSiteId !== null && selectedSiteId !== undefined;
768
- if (hasSelectedSite && defaultTemplate && String(currentTemplateId || '') !== String(defaultTemplate.id)) {
769
- templateControl?.setValue(String(defaultTemplate.id));
770
- }
2416
+ // if (hasSelectedSite && defaultTemplate && String(currentTemplateId || '') !== String(defaultTemplate.id)) {
2417
+ // templateControl?.setValue(String(defaultTemplate.id));
2418
+ // }
771
2419
  }), takeUntil(this.destroy$));
772
2420
  this.isTemplateSelectable = false;
773
2421
  this.templates = [];
774
- this.templateToggleFormControl = new FormControl(true);
2422
+ this.loadingSites = false;
2423
+ this.loadingSiteData = false;
2424
+ this.templateToggleFormControl = new FormControl(false);
775
2425
  }
776
2426
  ngOnInit() {
777
2427
  this.formGroup.get('userType').valueChanges
@@ -785,10 +2435,24 @@ class UserTemplateStepComponent {
785
2435
  .pipe(
786
2436
  // filter((value) => value !== null && value !== undefined),
787
2437
  tap((value) => {
788
- this.formGroup.get('userTemplateId')?.setValue(this.fallbackTemplateId);
789
- // return this.userCreationWizardService.setSelectedTemplate(value);
790
- }), startWith(this.formGroup.get('siteId')?.value), takeUntil(this.destroy$), switchMap((value) => {
791
- return this.userCreationService.fetchAllUserTemplates(Number(value));
2438
+ // this.formGroup.get('userTemplateId')?.setValue(this.fallbackTemplateId);
2439
+ const selectedSite = this.sitesList.find(site => String(site.id) === String(value));
2440
+ if (selectedSite) {
2441
+ this.userCreationWizardService.setCurrentSite(selectedSite);
2442
+ }
2443
+ return this.userCreationWizardService.setSelectedSite(value);
2444
+ }), takeUntil(this.destroy$), switchMap((value) => {
2445
+ if (value === null || value === undefined || value === '') {
2446
+ this.loadingSiteData = false;
2447
+ return of(null);
2448
+ }
2449
+ this.loadingSiteData = true;
2450
+ return forkJoin([
2451
+ this.userCreationService.fetchAllUserTemplates(Number(value)),
2452
+ this.userCreationWizardService.getSiteAllData(Number(value)),
2453
+ ]).pipe(finalize(() => {
2454
+ this.loadingSiteData = false;
2455
+ }));
792
2456
  }))
793
2457
  .subscribe();
794
2458
  // .subscribe((value) => {
@@ -796,35 +2460,39 @@ class UserTemplateStepComponent {
796
2460
  // })
797
2461
  this.formGroup.get('userTemplateId').valueChanges
798
2462
  .pipe(filter((value) => value !== null && value !== undefined && String(value).trim().length > 0), takeUntil(this.destroy$), switchMap((value) => {
799
- if (String(value) === this.fallbackTemplateId) {
800
- this.userCreationWizardService.setSelectedTemplate(this.defaultTemplateName);
801
- return of(null);
802
- }
2463
+ // if (String(value) === this.fallbackTemplateId) {
2464
+ // this.userCreationWizardService.setSelectedTemplate(this.defaultTemplateName);
2465
+ // return of(null);
2466
+ // }
803
2467
  return this.userCreationService.getUserTemplateToken(String(value), String(String(this.customerId)))
804
2468
  .pipe(tap((payload) => {
805
2469
  const selectedTemplate = this.templates.find(template => String(template.id) === String(value));
806
- this.userCreationWizardService.setSelectedTemplate(selectedTemplate?.name || null);
2470
+ this.userCreationWizardService.setSelectedTemplate(selectedTemplate);
807
2471
  this.userCreationWizardService.applyTemplateTokenPayload(payload);
808
2472
  }));
809
2473
  }))
810
2474
  .subscribe();
811
- // this.templateToggleFormControl.valueChanges
812
- // .pipe(startWith(true), takeUntil(this.destroy$), distinctUntilChanged())
813
- // .subscribe((value) => {
814
- // if(value === true) {
815
- // const siteId = this.formGroup.get('siteId')?.value || 7095;
816
- // this.userCreationService.fetchAllUserTemplates(siteId)
817
- // .subscribe();
818
- // } else {
819
- // this.formGroup.get('userTemplateId')?.reset();
820
- // }
821
- // });
2475
+ this.templateToggleFormControl.valueChanges
2476
+ .pipe(startWith(true), takeUntil(this.destroy$), distinctUntilChanged())
2477
+ .subscribe((value) => {
2478
+ if (value === true) {
2479
+ const siteId = this.formGroup.get('siteId')?.value || 7095;
2480
+ this.userCreationService.fetchAllUserTemplates(siteId)
2481
+ .subscribe();
2482
+ }
2483
+ else {
2484
+ this.formGroup.get('userTemplateId')?.reset();
2485
+ }
2486
+ });
822
2487
  this.getData();
2488
+ this.formGroup.statusChanges
2489
+ .pipe(startWith(this.formGroup.status), takeUntil(this.destroy$))
2490
+ .subscribe(() => this.validityChange.emit(this.isStepValid()));
823
2491
  }
824
2492
  reseFieldstForm() {
825
2493
  this.formGroup.get('siteId')?.reset();
826
2494
  this.formGroup.get('userTemplateId')?.reset();
827
- this.userCreationWizardService.setSelectedTemplate(null);
2495
+ this.userCreationWizardService.setSelectedTemplate();
828
2496
  this.userCreationWizardService.resetTemplateDrivenData();
829
2497
  }
830
2498
  getData() {
@@ -834,7 +2502,10 @@ class UserTemplateStepComponent {
834
2502
  .subscribe();
835
2503
  }
836
2504
  getSites(isOnlyWithLocations) {
837
- return this.userCreationService.getAllCustomerSites(String(this.customerId), isOnlyWithLocations);
2505
+ this.loadingSites = true;
2506
+ return this.userCreationService.getAllCustomerSites(String(this.customerId), isOnlyWithLocations).pipe(finalize(() => {
2507
+ this.loadingSites = false;
2508
+ }));
838
2509
  }
839
2510
  isCUCM(site) {
840
2511
  return site?.cucm?.id === 2542;
@@ -844,28 +2515,51 @@ class UserTemplateStepComponent {
844
2515
  const foundedSite = this.sitesList.find((site) => site.id === siteId);
845
2516
  return siteId && foundedSite ? foundedSite.name : '';
846
2517
  }
2518
+ getSelectedTemplateName() {
2519
+ const templateId = this.formGroup.get('userTemplateId')?.value;
2520
+ const foundedTemplate = this.templates.find((template) => String(template.id) === String(templateId));
2521
+ return templateId && foundedTemplate ? foundedTemplate.name : '';
2522
+ }
2523
+ isStepValid() {
2524
+ const siteId = this.formGroup.get('siteId')?.value;
2525
+ const templateId = this.formGroup.get('userTemplateId')?.value;
2526
+ return siteId !== null && siteId !== undefined && String(templateId || '').trim().length > 0;
2527
+ }
2528
+ markStepTouched() {
2529
+ this.formGroup.get('siteId')?.markAsTouched();
2530
+ this.formGroup.get('userTemplateId')?.markAsTouched();
2531
+ }
847
2532
  ngOnDestroy() {
848
2533
  this.destroy$.next();
849
2534
  this.destroy$.complete();
850
2535
  }
851
2536
  }
852
- UserTemplateStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserTemplateStepComponent, deps: [{ token: UserCreationWizardService }, { token: UserCreationApiService }, { token: i3$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
853
- UserTemplateStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserTemplateStepComponent, selector: "tk-user-template-step", inputs: { customerId: "customerId" }, ngImport: i0, template: "<section class=\"template-step-content\">\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- <div class=\"template-step-field template-step-field--user-type\">\r\n <label class=\"template-step-label\">User type</label>\r\n <mat-radio-group class=\"user-type-mat-radio-group\" formControlName=\"userType\">\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationCucm\" [value]=\"USER_CREATION_TYPES.CUCM\">\r\n UCM/DI\r\n </mat-radio-button>\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationMT\" [value]=\"USER_CREATION_TYPES.MT\">\r\n MT\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div> -->\r\n\r\n <div class=\"template-step-field\">\r\n <label class=\"template-step-label\">Select site</label>\r\n <mat-form-field class=\"template-step-select\" appearance=\"outline\">\r\n <mat-select\r\n placeholder=\"Site name\"\r\n formControlName=\"siteId\">\r\n\r\n <mat-select-trigger>\r\n {{ getSelectedSiteName() }}\r\n </mat-select-trigger>\r\n\r\n <mat-option *ngFor=\"let site of sitesList$ | async\" [value]=\"site.id\">\r\n <div class=\"option-row\">\r\n <span class=\"name\">{{ site.name }}</span>\r\n <span *ngIf=\"site.name === 'Berlin' else notBerlinSite\" class=\"type\">{{ 'Multi Tenant' }}</span>\r\n <ng-template #notBerlinSite>\r\n <span class=\"type\">{{ isCUCM(site) ? 'UCM' : 'Dedicated Instance' }}</span>\r\n </ng-template>\r\n </div>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n <ng-container *ngIf=\"formGroup.get('userType')?.value === USER_CREATION_TYPES.CUCM\">\r\n <div class=\"template-step-field\">\r\n <!-- <label class=\"template-step-label\">Would you like to use a template for the user creation?</label>\r\n <mat-radio-group [formControl]=\"templateToggleFormControl\">\r\n <mat-radio-button [color]=\"'primary'\" [value]=\"true\">\r\n {{ 'Yes' }}\r\n </mat-radio-button>\r\n <mat-radio-button [color]=\"'primary'\" [value]=\"false\">\r\n {{ 'No' }}\r\n </mat-radio-button>\r\n </mat-radio-group> -->\r\n\r\n <!-- <ng-container *ngIf=\"templateToggleFormControl.value === true\"> -->\r\n <label class=\"template-step-label\">Select user template</label>\r\n <mat-form-field class=\"template-step-select\" appearance=\"outline\">\r\n <mat-select\r\n placeholder=\"Templates\"\r\n formControlName=\"userTemplateId\">\r\n <mat-select-trigger>\r\n <span matTooltip=\"'A new user will be created based on the selected template, including a Cisco 8851 physical device with a single line configured, without SNR (Single Number Reach) and without voicemail.'\">\r\n {{ defaultTemplateName }}\r\n </span>\r\n </mat-select-trigger>\r\n <mat-option [value]=\"fallbackTemplateId\">\r\n {{ defaultTemplateName }}\r\n </mat-option>\r\n <mat-option *ngFor=\"let template of templatesList$ | async\" [value]=\"template.id\">\r\n {{ template.name }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n <!-- </ng-container> -->\r\n </div>\r\n </ng-container>\r\n \r\n </ng-container>\r\n</section>\r\n", styles: [".template-step-content{display:flex;flex-direction:column;gap:20px;max-width:420px}.template-step-field{display:flex;flex-direction:column;gap:10px}.template-step-field--user-type{margin-bottom:6px}.template-step-label{font-size:14px;font-weight:600;line-height:100%;letter-spacing:.1px;color:#2a2f3b}.template-step-select{width:100%;max-width:333px}.user-type-mat-radio-group{display:flex;flex-direction:column;gap:10px;margin-left:16px;margin-top:8px}.user-type-mat-radio{color:#2a2f3b;font-size:14px;font-weight:500}:host ::ng-deep .user-type-mat-radio .mat-radio-label{gap:10px}:host ::ng-deep .user-type-mat-radio .mat-radio-outer-circle{border-color:#8a93a3;border-width:2px}:host ::ng-deep .user-type-mat-radio .mat-radio-inner-circle{background-color:#1170cf}:host ::ng-deep .user-type-mat-radio.mat-radio-checked .mat-radio-outer-circle{border-color:#1170cf}:host ::ng-deep .user-type-mat-radio.mat-radio-checked .mat-radio-ripple .mat-ripple-element{background-color:#1176ce26!important}:host ::ng-deep .user-type-mat-radio .mdc-radio__outer-circle{border-color:#8a93a3!important;border-width:2px!important}:host ::ng-deep .user-type-mat-radio .mdc-radio__inner-circle{border-color:#1170cf!important}:host ::ng-deep .user-type-mat-radio.mat-mdc-radio-checked .mdc-radio__outer-circle{border-color:#1170cf!important}:host ::ng-deep .user-type-mat-radio.mat-mdc-radio-checked .mdc-radio__background:before{background-color:#1176ce1f!important}:host ::ng-deep .template-step-select .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .template-step-select .mat-form-field-flex{align-items:center;height:32px;border:1px solid #767676;border-radius:6px;padding:0 12px}:host ::ng-deep .template-step-select .mat-form-field-outline,:host ::ng-deep .template-step-select .mat-form-field-outline-start,:host ::ng-deep .template-step-select .mat-form-field-outline-end,:host ::ng-deep .template-step-select .mat-form-field-outline-gap{display:none}:host ::ng-deep .template-step-select .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .template-step-select .mat-select-trigger{display:flex;align-items:center;justify-content:space-between;height:100%}::ng-deep .option-row{display:flex;justify-content:space-between;align-items:center;width:100%}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i7.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i8.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
2537
+ UserTemplateStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserTemplateStepComponent, deps: [{ token: UserCreationWizardService }, { token: UserCreationApiService }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
2538
+ UserTemplateStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserTemplateStepComponent, selector: "tk-user-template-step", inputs: { customerId: "customerId" }, outputs: { validityChange: "validityChange" }, ngImport: i0, template: "<section class=\"template-step-content\">\r\n <app-loader *ngIf=\"isLoading\"></app-loader>\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- <div class=\"template-step-field template-step-field--user-type\">\r\n <label class=\"template-step-label\">User type</label>\r\n <mat-radio-group class=\"user-type-mat-radio-group\" formControlName=\"userType\">\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationCucm\" [value]=\"USER_CREATION_TYPES.CUCM\">\r\n UCM/DI\r\n </mat-radio-button>\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationMT\" [value]=\"USER_CREATION_TYPES.MT\">\r\n MT\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div> -->\r\n\r\n <div class=\"template-step-field\">\r\n <label class=\"template-step-label\">Select site</label>\r\n <mat-form-field class=\"template-step-select\" appearance=\"outline\">\r\n <mat-select\r\n placeholder=\"Site name\"\r\n formControlName=\"siteId\">\r\n\r\n <mat-select-trigger>\r\n {{ getSelectedSiteName() }}\r\n </mat-select-trigger>\r\n\r\n <mat-option *ngFor=\"let site of sitesList$ | async\" [value]=\"site.id\">\r\n <div class=\"option-row\">\r\n <span class=\"name\">{{ site.name }}</span>\r\n <span *ngIf=\"site.name === 'Berlin' else notBerlinSite\" class=\"type\">{{ 'Multi Tenant' }}</span>\r\n <ng-template #notBerlinSite>\r\n <span class=\"type\">{{ isCUCM(site) ? 'UCM' : 'Dedicated Instance' }}</span>\r\n </ng-template>\r\n </div>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n <ng-container *ngIf=\"formGroup.get('userType')?.value === USER_CREATION_TYPES.CUCM\">\r\n <div class=\"template-step-field\">\r\n <!-- <label class=\"template-step-label\">Would you like to use a template for the user creation?</label> -->\r\n <!-- <mat-radio-group [formControl]=\"templateToggleFormControl\">\r\n <mat-radio-button [color]=\"'primary'\" [value]=\"true\">\r\n {{ 'Yes' }}\r\n </mat-radio-button>\r\n <mat-radio-button [color]=\"'primary'\" [value]=\"false\">\r\n {{ 'No' }}\r\n </mat-radio-button>\r\n </mat-radio-group> -->\r\n\r\n <!-- <ng-container *ngIf=\"templateToggleFormControl.value === true\"> -->\r\n <label class=\"template-step-label\">Select user template</label>\r\n <mat-form-field class=\"template-step-select\" appearance=\"outline\">\r\n <mat-select\r\n placeholder=\"Templates\"\r\n formControlName=\"userTemplateId\">\r\n <mat-select-trigger>\r\n <span matTooltip=\"'A new user will be created based on the selected template, including a Cisco 8851 physical device with a single line configured, without SNR (Single Number Reach) and without voicemail.'\">\r\n {{ getSelectedTemplateName() }}\r\n </span>\r\n </mat-select-trigger>\r\n <mat-option *ngFor=\"let template of templatesList$ | async\" [value]=\"template.id\">\r\n {{ template.name }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n <!-- </ng-container> -->\r\n </div>\r\n </ng-container>\r\n \r\n </ng-container>\r\n</section>\r\n", styles: [".template-step-content{display:flex;flex-direction:column;gap:20px;max-width:420px}.template-step-field{display:flex;flex-direction:column;gap:10px}.template-step-field .mat-radio-group{display:flex;gap:10px}.template-step-field--user-type{margin-bottom:6px}.template-step-label{font-size:14px;font-weight:600;line-height:100%;letter-spacing:.1px;color:#2a2f3b}.template-step-select{width:100%;max-width:333px}.user-type-mat-radio-group{display:flex;flex-direction:column;gap:10px;margin-left:16px;margin-top:8px}.user-type-mat-radio{color:#2a2f3b;font-size:14px;font-weight:500}:host ::ng-deep .user-type-mat-radio .mat-radio-label{gap:10px}:host ::ng-deep .user-type-mat-radio .mat-radio-outer-circle{border-color:#8a93a3;border-width:2px}:host ::ng-deep .user-type-mat-radio .mat-radio-inner-circle{background-color:#1170cf}:host ::ng-deep .user-type-mat-radio.mat-radio-checked .mat-radio-outer-circle{border-color:#1170cf}:host ::ng-deep .user-type-mat-radio.mat-radio-checked .mat-radio-ripple .mat-ripple-element{background-color:#1176ce26!important}:host ::ng-deep .user-type-mat-radio .mdc-radio__outer-circle{border-color:#8a93a3!important;border-width:2px!important}:host ::ng-deep .user-type-mat-radio .mdc-radio__inner-circle{border-color:#1170cf!important}:host ::ng-deep .user-type-mat-radio.mat-mdc-radio-checked .mdc-radio__outer-circle{border-color:#1170cf!important}:host ::ng-deep .user-type-mat-radio.mat-mdc-radio-checked .mdc-radio__background:before{background-color:#1176ce1f!important}:host ::ng-deep .template-step-select .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .template-step-select .mat-form-field-flex{align-items:center;height:32px;border:1px solid #767676;border-radius:6px;padding:0 12px}:host ::ng-deep .template-step-select .mat-form-field-outline,:host ::ng-deep .template-step-select .mat-form-field-outline-start,:host ::ng-deep .template-step-select .mat-form-field-outline-end,:host ::ng-deep .template-step-select .mat-form-field-outline-gap{display:none}:host ::ng-deep .template-step-select .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .template-step-select .mat-select-trigger{display:flex;align-items:center;justify-content:space-between;height:100%}::ng-deep .option-row{display:flex;justify-content:space-between;align-items:center;width:100%}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i7$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i7$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i11.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: AppLoaderComponent, selector: "app-loader" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
854
2539
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserTemplateStepComponent, decorators: [{
855
2540
  type: Component,
856
- args: [{ selector: 'tk-user-template-step', template: "<section class=\"template-step-content\">\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- <div class=\"template-step-field template-step-field--user-type\">\r\n <label class=\"template-step-label\">User type</label>\r\n <mat-radio-group class=\"user-type-mat-radio-group\" formControlName=\"userType\">\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationCucm\" [value]=\"USER_CREATION_TYPES.CUCM\">\r\n UCM/DI\r\n </mat-radio-button>\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationMT\" [value]=\"USER_CREATION_TYPES.MT\">\r\n MT\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div> -->\r\n\r\n <div class=\"template-step-field\">\r\n <label class=\"template-step-label\">Select site</label>\r\n <mat-form-field class=\"template-step-select\" appearance=\"outline\">\r\n <mat-select\r\n placeholder=\"Site name\"\r\n formControlName=\"siteId\">\r\n\r\n <mat-select-trigger>\r\n {{ getSelectedSiteName() }}\r\n </mat-select-trigger>\r\n\r\n <mat-option *ngFor=\"let site of sitesList$ | async\" [value]=\"site.id\">\r\n <div class=\"option-row\">\r\n <span class=\"name\">{{ site.name }}</span>\r\n <span *ngIf=\"site.name === 'Berlin' else notBerlinSite\" class=\"type\">{{ 'Multi Tenant' }}</span>\r\n <ng-template #notBerlinSite>\r\n <span class=\"type\">{{ isCUCM(site) ? 'UCM' : 'Dedicated Instance' }}</span>\r\n </ng-template>\r\n </div>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n <ng-container *ngIf=\"formGroup.get('userType')?.value === USER_CREATION_TYPES.CUCM\">\r\n <div class=\"template-step-field\">\r\n <!-- <label class=\"template-step-label\">Would you like to use a template for the user creation?</label>\r\n <mat-radio-group [formControl]=\"templateToggleFormControl\">\r\n <mat-radio-button [color]=\"'primary'\" [value]=\"true\">\r\n {{ 'Yes' }}\r\n </mat-radio-button>\r\n <mat-radio-button [color]=\"'primary'\" [value]=\"false\">\r\n {{ 'No' }}\r\n </mat-radio-button>\r\n </mat-radio-group> -->\r\n\r\n <!-- <ng-container *ngIf=\"templateToggleFormControl.value === true\"> -->\r\n <label class=\"template-step-label\">Select user template</label>\r\n <mat-form-field class=\"template-step-select\" appearance=\"outline\">\r\n <mat-select\r\n placeholder=\"Templates\"\r\n formControlName=\"userTemplateId\">\r\n <mat-select-trigger>\r\n <span matTooltip=\"'A new user will be created based on the selected template, including a Cisco 8851 physical device with a single line configured, without SNR (Single Number Reach) and without voicemail.'\">\r\n {{ defaultTemplateName }}\r\n </span>\r\n </mat-select-trigger>\r\n <mat-option [value]=\"fallbackTemplateId\">\r\n {{ defaultTemplateName }}\r\n </mat-option>\r\n <mat-option *ngFor=\"let template of templatesList$ | async\" [value]=\"template.id\">\r\n {{ template.name }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n <!-- </ng-container> -->\r\n </div>\r\n </ng-container>\r\n \r\n </ng-container>\r\n</section>\r\n", styles: [".template-step-content{display:flex;flex-direction:column;gap:20px;max-width:420px}.template-step-field{display:flex;flex-direction:column;gap:10px}.template-step-field--user-type{margin-bottom:6px}.template-step-label{font-size:14px;font-weight:600;line-height:100%;letter-spacing:.1px;color:#2a2f3b}.template-step-select{width:100%;max-width:333px}.user-type-mat-radio-group{display:flex;flex-direction:column;gap:10px;margin-left:16px;margin-top:8px}.user-type-mat-radio{color:#2a2f3b;font-size:14px;font-weight:500}:host ::ng-deep .user-type-mat-radio .mat-radio-label{gap:10px}:host ::ng-deep .user-type-mat-radio .mat-radio-outer-circle{border-color:#8a93a3;border-width:2px}:host ::ng-deep .user-type-mat-radio .mat-radio-inner-circle{background-color:#1170cf}:host ::ng-deep .user-type-mat-radio.mat-radio-checked .mat-radio-outer-circle{border-color:#1170cf}:host ::ng-deep .user-type-mat-radio.mat-radio-checked .mat-radio-ripple .mat-ripple-element{background-color:#1176ce26!important}:host ::ng-deep .user-type-mat-radio .mdc-radio__outer-circle{border-color:#8a93a3!important;border-width:2px!important}:host ::ng-deep .user-type-mat-radio .mdc-radio__inner-circle{border-color:#1170cf!important}:host ::ng-deep .user-type-mat-radio.mat-mdc-radio-checked .mdc-radio__outer-circle{border-color:#1170cf!important}:host ::ng-deep .user-type-mat-radio.mat-mdc-radio-checked .mdc-radio__background:before{background-color:#1176ce1f!important}:host ::ng-deep .template-step-select .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .template-step-select .mat-form-field-flex{align-items:center;height:32px;border:1px solid #767676;border-radius:6px;padding:0 12px}:host ::ng-deep .template-step-select .mat-form-field-outline,:host ::ng-deep .template-step-select .mat-form-field-outline-start,:host ::ng-deep .template-step-select .mat-form-field-outline-end,:host ::ng-deep .template-step-select .mat-form-field-outline-gap{display:none}:host ::ng-deep .template-step-select .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .template-step-select .mat-select-trigger{display:flex;align-items:center;justify-content:space-between;height:100%}::ng-deep .option-row{display:flex;justify-content:space-between;align-items:center;width:100%}\n"] }]
857
- }], ctorParameters: function () { return [{ type: UserCreationWizardService }, { type: UserCreationApiService }, { type: i3$1.FormBuilder }]; }, propDecorators: { customerId: [{
2541
+ args: [{ selector: 'tk-user-template-step', template: "<section class=\"template-step-content\">\r\n <app-loader *ngIf=\"isLoading\"></app-loader>\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- <div class=\"template-step-field template-step-field--user-type\">\r\n <label class=\"template-step-label\">User type</label>\r\n <mat-radio-group class=\"user-type-mat-radio-group\" formControlName=\"userType\">\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationCucm\" [value]=\"USER_CREATION_TYPES.CUCM\">\r\n UCM/DI\r\n </mat-radio-button>\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationMT\" [value]=\"USER_CREATION_TYPES.MT\">\r\n MT\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div> -->\r\n\r\n <div class=\"template-step-field\">\r\n <label class=\"template-step-label\">Select site</label>\r\n <mat-form-field class=\"template-step-select\" appearance=\"outline\">\r\n <mat-select\r\n placeholder=\"Site name\"\r\n formControlName=\"siteId\">\r\n\r\n <mat-select-trigger>\r\n {{ getSelectedSiteName() }}\r\n </mat-select-trigger>\r\n\r\n <mat-option *ngFor=\"let site of sitesList$ | async\" [value]=\"site.id\">\r\n <div class=\"option-row\">\r\n <span class=\"name\">{{ site.name }}</span>\r\n <span *ngIf=\"site.name === 'Berlin' else notBerlinSite\" class=\"type\">{{ 'Multi Tenant' }}</span>\r\n <ng-template #notBerlinSite>\r\n <span class=\"type\">{{ isCUCM(site) ? 'UCM' : 'Dedicated Instance' }}</span>\r\n </ng-template>\r\n </div>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n <ng-container *ngIf=\"formGroup.get('userType')?.value === USER_CREATION_TYPES.CUCM\">\r\n <div class=\"template-step-field\">\r\n <!-- <label class=\"template-step-label\">Would you like to use a template for the user creation?</label> -->\r\n <!-- <mat-radio-group [formControl]=\"templateToggleFormControl\">\r\n <mat-radio-button [color]=\"'primary'\" [value]=\"true\">\r\n {{ 'Yes' }}\r\n </mat-radio-button>\r\n <mat-radio-button [color]=\"'primary'\" [value]=\"false\">\r\n {{ 'No' }}\r\n </mat-radio-button>\r\n </mat-radio-group> -->\r\n\r\n <!-- <ng-container *ngIf=\"templateToggleFormControl.value === true\"> -->\r\n <label class=\"template-step-label\">Select user template</label>\r\n <mat-form-field class=\"template-step-select\" appearance=\"outline\">\r\n <mat-select\r\n placeholder=\"Templates\"\r\n formControlName=\"userTemplateId\">\r\n <mat-select-trigger>\r\n <span matTooltip=\"'A new user will be created based on the selected template, including a Cisco 8851 physical device with a single line configured, without SNR (Single Number Reach) and without voicemail.'\">\r\n {{ getSelectedTemplateName() }}\r\n </span>\r\n </mat-select-trigger>\r\n <mat-option *ngFor=\"let template of templatesList$ | async\" [value]=\"template.id\">\r\n {{ template.name }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n <!-- </ng-container> -->\r\n </div>\r\n </ng-container>\r\n \r\n </ng-container>\r\n</section>\r\n", styles: [".template-step-content{display:flex;flex-direction:column;gap:20px;max-width:420px}.template-step-field{display:flex;flex-direction:column;gap:10px}.template-step-field .mat-radio-group{display:flex;gap:10px}.template-step-field--user-type{margin-bottom:6px}.template-step-label{font-size:14px;font-weight:600;line-height:100%;letter-spacing:.1px;color:#2a2f3b}.template-step-select{width:100%;max-width:333px}.user-type-mat-radio-group{display:flex;flex-direction:column;gap:10px;margin-left:16px;margin-top:8px}.user-type-mat-radio{color:#2a2f3b;font-size:14px;font-weight:500}:host ::ng-deep .user-type-mat-radio .mat-radio-label{gap:10px}:host ::ng-deep .user-type-mat-radio .mat-radio-outer-circle{border-color:#8a93a3;border-width:2px}:host ::ng-deep .user-type-mat-radio .mat-radio-inner-circle{background-color:#1170cf}:host ::ng-deep .user-type-mat-radio.mat-radio-checked .mat-radio-outer-circle{border-color:#1170cf}:host ::ng-deep .user-type-mat-radio.mat-radio-checked .mat-radio-ripple .mat-ripple-element{background-color:#1176ce26!important}:host ::ng-deep .user-type-mat-radio .mdc-radio__outer-circle{border-color:#8a93a3!important;border-width:2px!important}:host ::ng-deep .user-type-mat-radio .mdc-radio__inner-circle{border-color:#1170cf!important}:host ::ng-deep .user-type-mat-radio.mat-mdc-radio-checked .mdc-radio__outer-circle{border-color:#1170cf!important}:host ::ng-deep .user-type-mat-radio.mat-mdc-radio-checked .mdc-radio__background:before{background-color:#1176ce1f!important}:host ::ng-deep .template-step-select .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .template-step-select .mat-form-field-flex{align-items:center;height:32px;border:1px solid #767676;border-radius:6px;padding:0 12px}:host ::ng-deep .template-step-select .mat-form-field-outline,:host ::ng-deep .template-step-select .mat-form-field-outline-start,:host ::ng-deep .template-step-select .mat-form-field-outline-end,:host ::ng-deep .template-step-select .mat-form-field-outline-gap{display:none}:host ::ng-deep .template-step-select .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .template-step-select .mat-select-trigger{display:flex;align-items:center;justify-content:space-between;height:100%}::ng-deep .option-row{display:flex;justify-content:space-between;align-items:center;width:100%}\n"] }]
2542
+ }], ctorParameters: function () { return [{ type: UserCreationWizardService }, { type: UserCreationApiService }, { type: i1$2.FormBuilder }]; }, propDecorators: { customerId: [{
858
2543
  type: Input
2544
+ }], validityChange: [{
2545
+ type: Output
859
2546
  }] } });
860
2547
 
2548
+ const USER_CREATED_SUCCESSFLLY = 'User created successfully';
861
2549
  class UserCreationWizardComponent {
862
- constructor() {
2550
+ constructor(notificationService) {
2551
+ this.notificationService = notificationService;
863
2552
  this.apiService = inject(APIService);
2553
+ this.userCreationWizardService = inject(UserCreationWizardService);
864
2554
  this.title = 'Create User';
865
2555
  this.cancel = new EventEmitter();
866
2556
  this.submit = new EventEmitter();
867
2557
  this.isSubmitting = false;
868
2558
  this.submitTimerId = null;
2559
+ this.selectedIndex = 0;
2560
+ this.templateStepValid = false;
2561
+ this.detailsStepValid = false;
2562
+ this.isLoading = false;
869
2563
  }
870
2564
  ngOnInit() {
871
2565
  this.apiService.token = this.token;
@@ -874,17 +2568,42 @@ class UserCreationWizardComponent {
874
2568
  onCancel() {
875
2569
  this.cancel.emit();
876
2570
  }
2571
+ onStepSelectionChange(event) {
2572
+ this.selectedIndex = event.selectedIndex;
2573
+ if (event.selectedIndex === 1 && event.previouslySelectedIndex === 0) {
2574
+ this.userCreationWizardService.resetUserDetailsStepState();
2575
+ this.detailsStepValid = false;
2576
+ }
2577
+ }
2578
+ onStepperNext(stepper) {
2579
+ if (stepper.selectedIndex === 0) {
2580
+ if (!this.templateStep?.isStepValid()) {
2581
+ this.templateStep?.markStepTouched();
2582
+ return;
2583
+ }
2584
+ }
2585
+ if (stepper.selectedIndex === 1) {
2586
+ if (!this.detailsStep?.isStepValid()) {
2587
+ this.detailsStep?.markAllAsTouched();
2588
+ return;
2589
+ }
2590
+ this.detailsStep?.syncToService();
2591
+ }
2592
+ stepper.next();
2593
+ }
877
2594
  onSubmit() {
878
2595
  if (this.isSubmitting) {
879
2596
  return;
880
2597
  }
881
2598
  this.isSubmitting = true;
882
- const delayMs = 3000 + Math.floor(Math.random() * 1001);
883
- this.submitTimerId = window.setTimeout(() => {
884
- this.isSubmitting = false;
885
- this.submitTimerId = null;
886
- this.submit.emit();
887
- }, delayMs);
2599
+ // const delayMs = 3000 + Math.floor(Math.random() * 1001);
2600
+ // this.submitTimerId = window.setTimeout(() => {
2601
+ // this.isSubmitting = false;
2602
+ // this.submitTimerId = null;
2603
+ // this.notificationService.success('User created successfully!');
2604
+ // this.submit.emit();
2605
+ // }, delayMs);
2606
+ this._saveChanges();
888
2607
  }
889
2608
  ngOnDestroy() {
890
2609
  if (this.submitTimerId) {
@@ -892,13 +2611,33 @@ class UserCreationWizardComponent {
892
2611
  this.submitTimerId = null;
893
2612
  }
894
2613
  }
2614
+ _saveChanges() {
2615
+ this.isLoading = true;
2616
+ this.userCreationWizardService.saveNewUser()
2617
+ .subscribe((res) => {
2618
+ this.isLoading = false;
2619
+ this.isSubmitting = false;
2620
+ this.notificationService.success('User created successfully!');
2621
+ this.submit.emit();
2622
+ }, (error) => {
2623
+ this.isLoading = false;
2624
+ this.isSubmitting = false;
2625
+ if (typeof error === 'string' && error.indexOf(USER_CREATED_SUCCESSFLLY) > -1) {
2626
+ this.notificationService.success('User created successfully!');
2627
+ this.submit.emit();
2628
+ }
2629
+ else {
2630
+ this.notificationService.error(error?.error?.message || 'An error occurred while creating the user. Please try again.');
2631
+ }
2632
+ });
2633
+ }
895
2634
  }
896
- UserCreationWizardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
897
- UserCreationWizardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserCreationWizardComponent, selector: "tk-user-creation-wizard", inputs: { title: "title", host: "host", token: "token", customerId: "customerId" }, outputs: { cancel: "cancel", submit: "submit" }, ngImport: i0, template: "<div class=\"move-user-stepper-container\" [attr.aria-busy]=\"isSubmitting\">\n <header class=\"move-user-header\">\n <div class=\"move-user-header__title\">{{ title }}</div>\n <div class=\"move-user-header__close\">\n <span class=\"app-icon user-creation-close-icon\" (click)=\"onCancel()\"></span>\n </div>\n </header>\n\n <div id=\"user-creation-stepper\">\n <mat-stepper [linear]=\"false\" labelPosition=\"bottom\" #stepper>\n <mat-step>\n <div class=\"step-title\">Step 1: User creation with template</div>\n <ng-template matStepLabel>User creation</ng-template>\n\n <div class=\"move-user-tab-content-box\">\n <tk-user-template-step [customerId]=\"customerId\"></tk-user-template-step>\n </div>\n </mat-step>\n\n <mat-step>\n <div class=\"step-title\">Step 2 : User details</div>\n <ng-template matStepLabel>User details</ng-template>\n\n <div class=\"move-user-tab-content-box\">\n <tk-user-details-step></tk-user-details-step>\n </div>\n </mat-step>\n\n <mat-step>\n <div class=\"step-title\">Step 3: Review</div>\n <ng-template matStepLabel>Review</ng-template>\n\n <div class=\"move-user-tab-content-box\">\n <tk-user-overview-step></tk-user-overview-step>\n </div>\n </mat-step>\n </mat-stepper>\n\n <div class=\"wizard-actions\">\n <ng-container [ngSwitch]=\"stepper.selectedIndex\">\n <ng-container *ngSwitchCase=\"0\">\n <button mat-button class=\"uc-btn uc-btn-primary\" type=\"button\" (click)=\"stepper.next()\">\n Next\n </button>\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"onCancel()\">\n Cancel\n </button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"1\">\n <button mat-button class=\"uc-btn uc-btn-primary\" type=\"button\" (click)=\"stepper.next()\">\n Next\n </button>\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"stepper.previous()\">\n Previous\n </button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"2\">\n <button\n mat-button\n class=\"uc-btn uc-btn-primary\"\n type=\"button\"\n [disabled]=\"isSubmitting\"\n (click)=\"onSubmit()\"\n >\n <span class=\"uc-btn__inline-content\">\n <span class=\"uc-btn__spinner\" *ngIf=\"isSubmitting\" aria-hidden=\"true\"></span>\n <span>{{ isSubmitting ? 'Creating...' : 'Create' }}</span>\n </span>\n </button>\n <button\n mat-button\n class=\"uc-btn uc-btn-secondary\"\n type=\"button\"\n [disabled]=\"isSubmitting\"\n (click)=\"stepper.previous()\"\n >\n Previous\n </button>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <div class=\"wizard-loading-overlay\" [class.wizard-loading-overlay--visible]=\"isSubmitting\" aria-hidden=\"true\"></div>\n</div>\n", styles: [".move-user-stepper-container{background-color:#f3f3f3;padding:0 0 16px;position:relative;overflow:hidden}.move-user-header{background-color:#1170cf;height:45px;padding:1rem 1.5rem;display:flex;align-items:center;justify-content:space-between;color:#fff;font-size:18px;font-weight:500}.move-user-header__close{cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:0}.move-user-header__close i{font-size:25px;font-weight:100}.app-icon{height:20px;width:20px;display:block;cursor:pointer;background-repeat:no-repeat;background-position:center}.user-creation-close-icon{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M13.0606 11.9998L19.2803 5.78001C19.35 5.71038 19.4052 5.6277 19.4429 5.53672C19.4806 5.44573 19.5 5.34822 19.5 5.24974C19.5 5.15126 19.4806 5.05374 19.4429 4.96276C19.4052 4.87177 19.3499 4.7891 19.2803 4.71947C19.2107 4.64983 19.128 4.5946 19.037 4.55691C18.946 4.51923 18.8485 4.49983 18.75 4.49983C18.6515 4.49984 18.554 4.51924 18.463 4.55692C18.3721 4.59461 18.2894 4.64985 18.2198 4.71949L12 10.9392L5.78026 4.71949C5.71077 4.64921 5.62807 4.59335 5.53691 4.55514C5.44576 4.51692 5.34795 4.49711 5.24911 4.49683C5.15027 4.49655 5.05235 4.51581 4.96098 4.55351C4.86961 4.59121 4.78659 4.64659 4.7167 4.71648C4.64681 4.78638 4.59143 4.8694 4.55374 4.96077C4.51605 5.05214 4.49679 5.15006 4.49707 5.2489C4.49736 5.34774 4.51718 5.44555 4.5554 5.5367C4.59361 5.62786 4.64947 5.71055 4.71976 5.78004L10.9395 11.9998L4.71976 18.2195C4.65013 18.2892 4.59489 18.3718 4.5572 18.4628C4.51951 18.5538 4.50011 18.6513 4.50011 18.7498C4.50011 18.8483 4.51951 18.9458 4.5572 19.0368C4.59488 19.1278 4.65012 19.2105 4.71976 19.2801C4.7894 19.3497 4.87207 19.405 4.96305 19.4427C5.05403 19.4803 5.15155 19.4997 5.25003 19.4997C5.34851 19.4997 5.44603 19.4803 5.53701 19.4427C5.628 19.405 5.71067 19.3497 5.78031 19.2801L12.0001 13.0603L18.2198 19.2801C18.3604 19.4207 18.5512 19.4997 18.7501 19.4997C18.949 19.4997 19.1397 19.4207 19.2804 19.2801C19.421 19.1395 19.5 18.9487 19.5 18.7498C19.5 18.5509 19.421 18.3602 19.2804 18.2195L13.0606 11.9998Z%22 fill%3D%22white%22 fill-opacity%3D%220.95%22%2F%3E%3C%2Fsvg%3E\");background-size:20px 20px}#user-creation-stepper{display:flex;flex-direction:column;width:100%}#user-creation-stepper .mat-stepper-horizontal{margin:0 auto;width:100%;background-color:transparent}#user-creation-stepper .mat-horizontal-stepper-header-container{margin:0 auto;width:800px}#user-creation-stepper .mat-step-icon{width:28px;height:28px;border:3px solid hsl(0,0%,50.2%)}#user-creation-stepper .mat-step-icon-selected{background-color:#c6c6c6!important;border-color:#19487d}#user-creation-stepper .mat-step-icon-state-number{background-color:#fff}#user-creation-stepper .mat-step-icon-state-edit,#user-creation-stepper .mat-step-header .mat-step-icon-state-done{background-color:#1170cf;border-color:#1170cf}#user-creation-stepper .mat-step-icon-content{display:none}#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):before,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):before,#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):after,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):after{border-top-width:3px!important}#user-creation-stepper .mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header:after,#user-creation-stepper .mat-stepper-horizontal-line{border-top-color:#1170cf!important;border-top-width:3px!important;border-top-style:solid!important}#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-stepper-horizontal-line,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:after{border-top-width:3px!important;background-color:#7b7b7b!important;border-top-color:#7b7b7b!important}#user-creation-stepper .mat-horizontal-content-container{padding:0!important;margin-top:3rem}#user-creation-stepper .mat-horizontal-stepper-content[aria-expanded=true]{padding-bottom:0}.step-title{font-size:26px;font-weight:500;width:70%;margin:0 auto 1rem;min-height:32px;display:flex;align-items:center}.wizard-actions{display:flex;flex-flow:row-reverse;justify-content:flex-start;align-items:center;margin:16px 16px 0 0;align-self:flex-end;gap:1rem;position:relative;z-index:30}.uc-btn{border-radius:50px!important;padding:8px 16px!important;min-width:80px!important;line-height:normal!important;cursor:pointer}.uc-btn__inline-content{display:inline-flex;align-items:center;gap:8px}.uc-btn__spinner{width:14px;height:14px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:uc-btn-spin .7s linear infinite}@keyframes uc-btn-spin{to{transform:rotate(360deg)}}.uc-btn-primary{background-color:#000!important;color:#fff!important;border:1px solid black!important}.uc-btn-secondary{background-color:#fff!important;color:#000!important;border:1px solid black!important}.move-user-tab-content-box{width:70%;margin:0 auto;background-color:#fff;min-height:350px;border:1px solid #C3C1C1;border-radius:8px;box-sizing:border-box;padding:25px}.wizard-loading-overlay{position:absolute;inset:0;background:rgba(243,243,243,.72);backdrop-filter:blur(1px);opacity:0;pointer-events:none;transition:opacity .18s ease;z-index:20}.wizard-loading-overlay--visible{opacity:1;pointer-events:auto}.mat-button-disabled{background-color:#bbb;color:#fff;border:1px solid grey;cursor:default!important}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i4$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$2.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i3$2.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i3$2.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["selectedIndex", "disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "component", type: UserTemplateStepComponent, selector: "tk-user-template-step", inputs: ["customerId"] }, { kind: "component", type: UserDetailsStepComponent, selector: "tk-user-details-step" }, { kind: "component", type: UserOverviewStepComponent, selector: "tk-user-overview-step" }], encapsulation: i0.ViewEncapsulation.None });
2635
+ UserCreationWizardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardComponent, deps: [{ token: NotificationService }], target: i0.ɵɵFactoryTarget.Component });
2636
+ UserCreationWizardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserCreationWizardComponent, selector: "tk-user-creation-wizard", inputs: { title: "title", host: "host", token: "token", customerId: "customerId" }, outputs: { cancel: "cancel", submit: "submit" }, viewQueries: [{ propertyName: "templateStep", first: true, predicate: UserTemplateStepComponent, descendants: true }, { propertyName: "detailsStep", first: true, predicate: UserDetailsStepComponent, descendants: true }], ngImport: i0, template: "<app-notification></app-notification>\r\n<app-loader *ngIf=\"isLoading\"></app-loader>\r\n<div class=\"move-user-stepper-container\" [attr.aria-busy]=\"isSubmitting\">\r\n <header class=\"move-user-header\">\r\n <div class=\"move-user-header__title\">{{ title }}</div>\r\n <div class=\"move-user-header__close\">\r\n <span class=\"app-icon user-creation-close-icon\" (click)=\"onCancel()\"></span>\r\n </div>\r\n </header>\r\n\r\n <div id=\"user-creation-stepper\">\r\n <mat-stepper [linear]=\"false\" labelPosition=\"bottom\" #stepper\r\n [selectedIndex]=\"selectedIndex\"\r\n (selectionChange)=\"onStepSelectionChange($event)\">\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 1: User creation with template</div>\r\n <ng-template matStepLabel>User creation</ng-template>\r\n\r\n <ng-container *ngIf=\"selectedIndex === 0\">\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-template-step\r\n [customerId]=\"customerId\"\r\n (validityChange)=\"templateStepValid = $event\"\r\n ></tk-user-template-step>\r\n </div>\r\n </ng-container>\r\n </mat-step>\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 2 : User details</div>\r\n <ng-template matStepLabel>User details</ng-template>\r\n\r\n <ng-container *ngIf=\"selectedIndex === 1\">\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-details-step (validityChange)=\"detailsStepValid = $event\"></tk-user-details-step>\r\n </div>\r\n </ng-container>\r\n </mat-step>\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 3: Review</div>\r\n <ng-template matStepLabel>Review</ng-template>\r\n\r\n <ng-container *ngIf=\"selectedIndex === 2\">\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-overview-step></tk-user-overview-step>\r\n </div>\r\n </ng-container>\r\n </mat-step>\r\n </mat-stepper>\r\n\r\n <div class=\"wizard-actions\">\r\n <ng-container [ngSwitch]=\"stepper.selectedIndex\">\r\n <ng-container *ngSwitchCase=\"0\">\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-primary\"\r\n type=\"button\"\r\n [disabled]=\"!templateStepValid\"\r\n (click)=\"onStepperNext(stepper)\"\r\n >\r\n Next\r\n </button>\r\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"onCancel()\">\r\n Cancel\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"1\">\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-primary\"\r\n type=\"button\"\r\n [disabled]=\"!detailsStepValid\"\r\n (click)=\"onStepperNext(stepper)\"\r\n >\r\n Next\r\n </button>\r\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"stepper.previous()\">\r\n Previous\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"2\">\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-primary\"\r\n type=\"button\"\r\n [disabled]=\"isSubmitting\"\r\n (click)=\"onSubmit()\"\r\n >\r\n <span class=\"uc-btn__inline-content\">\r\n <span class=\"uc-btn__spinner\" *ngIf=\"isSubmitting\" aria-hidden=\"true\"></span>\r\n <span>{{ isSubmitting ? 'Creating...' : 'Create' }}</span>\r\n </span>\r\n </button>\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-secondary\"\r\n type=\"button\"\r\n [disabled]=\"isSubmitting\"\r\n (click)=\"stepper.previous()\"\r\n >\r\n Previous\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wizard-loading-overlay\" [class.wizard-loading-overlay--visible]=\"isSubmitting\" aria-hidden=\"true\"></div>\r\n</div>", styles: [".move-user-stepper-container{background-color:#f3f3f3;padding:0 0 16px;position:relative;overflow:hidden}.move-user-header{background-color:#1170cf;height:45px;padding:1rem 1.5rem;display:flex;align-items:center;justify-content:space-between;color:#fff;font-size:18px;font-weight:500}.move-user-header__close{cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:0}.move-user-header__close i{font-size:25px;font-weight:100}.app-icon{height:20px;width:20px;display:block;cursor:pointer;background-repeat:no-repeat;background-position:center}.user-creation-close-icon{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath d%3D%22M13.0606 11.9998L19.2803 5.78001C19.35 5.71038 19.4052 5.6277 19.4429 5.53672C19.4806 5.44573 19.5 5.34822 19.5 5.24974C19.5 5.15126 19.4806 5.05374 19.4429 4.96276C19.4052 4.87177 19.3499 4.7891 19.2803 4.71947C19.2107 4.64983 19.128 4.5946 19.037 4.55691C18.946 4.51923 18.8485 4.49983 18.75 4.49983C18.6515 4.49984 18.554 4.51924 18.463 4.55692C18.3721 4.59461 18.2894 4.64985 18.2198 4.71949L12 10.9392L5.78026 4.71949C5.71077 4.64921 5.62807 4.59335 5.53691 4.55514C5.44576 4.51692 5.34795 4.49711 5.24911 4.49683C5.15027 4.49655 5.05235 4.51581 4.96098 4.55351C4.86961 4.59121 4.78659 4.64659 4.7167 4.71648C4.64681 4.78638 4.59143 4.8694 4.55374 4.96077C4.51605 5.05214 4.49679 5.15006 4.49707 5.2489C4.49736 5.34774 4.51718 5.44555 4.5554 5.5367C4.59361 5.62786 4.64947 5.71055 4.71976 5.78004L10.9395 11.9998L4.71976 18.2195C4.65013 18.2892 4.59489 18.3718 4.5572 18.4628C4.51951 18.5538 4.50011 18.6513 4.50011 18.7498C4.50011 18.8483 4.51951 18.9458 4.5572 19.0368C4.59488 19.1278 4.65012 19.2105 4.71976 19.2801C4.7894 19.3497 4.87207 19.405 4.96305 19.4427C5.05403 19.4803 5.15155 19.4997 5.25003 19.4997C5.34851 19.4997 5.44603 19.4803 5.53701 19.4427C5.628 19.405 5.71067 19.3497 5.78031 19.2801L12.0001 13.0603L18.2198 19.2801C18.3604 19.4207 18.5512 19.4997 18.7501 19.4997C18.949 19.4997 19.1397 19.4207 19.2804 19.2801C19.421 19.1395 19.5 18.9487 19.5 18.7498C19.5 18.5509 19.421 18.3602 19.2804 18.2195L13.0606 11.9998Z%22 fill%3D%22white%22 fill-opacity%3D%220.95%22%2F%3E%0D%3C%2Fsvg%3E%0D\");background-size:20px 20px}#user-creation-stepper{display:flex;flex-direction:column;width:100%}#user-creation-stepper .mat-stepper-horizontal{margin:0 auto;width:100%;background-color:transparent}#user-creation-stepper .mat-horizontal-stepper-header-container{margin:0 auto;width:800px}#user-creation-stepper .mat-step-icon{width:28px;height:28px;border:3px solid hsl(0,0%,50.2%)}#user-creation-stepper .mat-step-icon-selected{background-color:#c6c6c6!important;border-color:#19487d}#user-creation-stepper .mat-step-icon-state-number{background-color:#fff}#user-creation-stepper .mat-step-icon-state-edit,#user-creation-stepper .mat-step-header .mat-step-icon-state-done{background-color:#1170cf;border-color:#1170cf}#user-creation-stepper .mat-step-icon-content{display:none}#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):before,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):before,#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):after,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):after{border-top-width:3px!important}#user-creation-stepper .mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header:after,#user-creation-stepper .mat-stepper-horizontal-line{border-top-color:#1170cf!important;border-top-width:3px!important;border-top-style:solid!important}#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-stepper-horizontal-line,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:after{border-top-width:3px!important;background-color:#7b7b7b!important;border-top-color:#7b7b7b!important}#user-creation-stepper .mat-horizontal-content-container{padding:0!important;margin-top:3rem}#user-creation-stepper .mat-horizontal-stepper-content[aria-expanded=true]{padding-bottom:0}.step-title{font-size:26px;font-weight:500;width:70%;margin:0 auto 1rem;min-height:32px;display:flex;align-items:center}.wizard-actions{display:flex;flex-flow:row-reverse;justify-content:flex-start;align-items:center;margin:16px 16px 0 0;align-self:flex-end;gap:1rem;position:relative;z-index:30}.uc-btn{border-radius:50px!important;padding:8px 16px!important;min-width:80px!important;line-height:normal!important;cursor:pointer}.uc-btn__inline-content{display:inline-flex;align-items:center;gap:8px}.uc-btn__spinner{width:14px;height:14px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:uc-btn-spin .7s linear infinite}@keyframes uc-btn-spin{to{transform:rotate(360deg)}}.uc-btn-primary{background-color:#000!important;color:#fff!important;border:1px solid black!important}.uc-btn-secondary{background-color:#fff!important;color:#000!important;border:1px solid black!important}.move-user-tab-content-box{width:70%;margin:0 auto;background-color:#fff;min-height:350px;border:1px solid #C3C1C1;border-radius:8px;box-sizing:border-box;padding:25px}.wizard-loading-overlay{position:absolute;inset:0;background:rgba(243,243,243,.72);backdrop-filter:blur(1px);opacity:0;pointer-events:none;transition:opacity .18s ease;z-index:20}.wizard-loading-overlay--visible{opacity:1;pointer-events:auto}.wizard-actions .uc-btn-primary.mat-button-disabled{background-color:#bbb;color:#fff;border:1px solid grey;cursor:default!important;opacity:.3}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i4.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i4.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["selectedIndex", "disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "component", type: UserTemplateStepComponent, selector: "tk-user-template-step", inputs: ["customerId"], outputs: ["validityChange"] }, { kind: "component", type: NotificationsComponent, selector: "app-notification" }, { kind: "component", type: UserDetailsStepComponent, selector: "tk-user-details-step", outputs: ["validityChange"] }, { kind: "component", type: UserOverviewStepComponent, selector: "tk-user-overview-step" }, { kind: "component", type: AppLoaderComponent, selector: "app-loader" }], encapsulation: i0.ViewEncapsulation.None });
898
2637
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardComponent, decorators: [{
899
2638
  type: Component,
900
- args: [{ selector: 'tk-user-creation-wizard', encapsulation: ViewEncapsulation.None, template: "<div class=\"move-user-stepper-container\" [attr.aria-busy]=\"isSubmitting\">\n <header class=\"move-user-header\">\n <div class=\"move-user-header__title\">{{ title }}</div>\n <div class=\"move-user-header__close\">\n <span class=\"app-icon user-creation-close-icon\" (click)=\"onCancel()\"></span>\n </div>\n </header>\n\n <div id=\"user-creation-stepper\">\n <mat-stepper [linear]=\"false\" labelPosition=\"bottom\" #stepper>\n <mat-step>\n <div class=\"step-title\">Step 1: User creation with template</div>\n <ng-template matStepLabel>User creation</ng-template>\n\n <div class=\"move-user-tab-content-box\">\n <tk-user-template-step [customerId]=\"customerId\"></tk-user-template-step>\n </div>\n </mat-step>\n\n <mat-step>\n <div class=\"step-title\">Step 2 : User details</div>\n <ng-template matStepLabel>User details</ng-template>\n\n <div class=\"move-user-tab-content-box\">\n <tk-user-details-step></tk-user-details-step>\n </div>\n </mat-step>\n\n <mat-step>\n <div class=\"step-title\">Step 3: Review</div>\n <ng-template matStepLabel>Review</ng-template>\n\n <div class=\"move-user-tab-content-box\">\n <tk-user-overview-step></tk-user-overview-step>\n </div>\n </mat-step>\n </mat-stepper>\n\n <div class=\"wizard-actions\">\n <ng-container [ngSwitch]=\"stepper.selectedIndex\">\n <ng-container *ngSwitchCase=\"0\">\n <button mat-button class=\"uc-btn uc-btn-primary\" type=\"button\" (click)=\"stepper.next()\">\n Next\n </button>\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"onCancel()\">\n Cancel\n </button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"1\">\n <button mat-button class=\"uc-btn uc-btn-primary\" type=\"button\" (click)=\"stepper.next()\">\n Next\n </button>\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"stepper.previous()\">\n Previous\n </button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"2\">\n <button\n mat-button\n class=\"uc-btn uc-btn-primary\"\n type=\"button\"\n [disabled]=\"isSubmitting\"\n (click)=\"onSubmit()\"\n >\n <span class=\"uc-btn__inline-content\">\n <span class=\"uc-btn__spinner\" *ngIf=\"isSubmitting\" aria-hidden=\"true\"></span>\n <span>{{ isSubmitting ? 'Creating...' : 'Create' }}</span>\n </span>\n </button>\n <button\n mat-button\n class=\"uc-btn uc-btn-secondary\"\n type=\"button\"\n [disabled]=\"isSubmitting\"\n (click)=\"stepper.previous()\"\n >\n Previous\n </button>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <div class=\"wizard-loading-overlay\" [class.wizard-loading-overlay--visible]=\"isSubmitting\" aria-hidden=\"true\"></div>\n</div>\n", styles: [".move-user-stepper-container{background-color:#f3f3f3;padding:0 0 16px;position:relative;overflow:hidden}.move-user-header{background-color:#1170cf;height:45px;padding:1rem 1.5rem;display:flex;align-items:center;justify-content:space-between;color:#fff;font-size:18px;font-weight:500}.move-user-header__close{cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:0}.move-user-header__close i{font-size:25px;font-weight:100}.app-icon{height:20px;width:20px;display:block;cursor:pointer;background-repeat:no-repeat;background-position:center}.user-creation-close-icon{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M13.0606 11.9998L19.2803 5.78001C19.35 5.71038 19.4052 5.6277 19.4429 5.53672C19.4806 5.44573 19.5 5.34822 19.5 5.24974C19.5 5.15126 19.4806 5.05374 19.4429 4.96276C19.4052 4.87177 19.3499 4.7891 19.2803 4.71947C19.2107 4.64983 19.128 4.5946 19.037 4.55691C18.946 4.51923 18.8485 4.49983 18.75 4.49983C18.6515 4.49984 18.554 4.51924 18.463 4.55692C18.3721 4.59461 18.2894 4.64985 18.2198 4.71949L12 10.9392L5.78026 4.71949C5.71077 4.64921 5.62807 4.59335 5.53691 4.55514C5.44576 4.51692 5.34795 4.49711 5.24911 4.49683C5.15027 4.49655 5.05235 4.51581 4.96098 4.55351C4.86961 4.59121 4.78659 4.64659 4.7167 4.71648C4.64681 4.78638 4.59143 4.8694 4.55374 4.96077C4.51605 5.05214 4.49679 5.15006 4.49707 5.2489C4.49736 5.34774 4.51718 5.44555 4.5554 5.5367C4.59361 5.62786 4.64947 5.71055 4.71976 5.78004L10.9395 11.9998L4.71976 18.2195C4.65013 18.2892 4.59489 18.3718 4.5572 18.4628C4.51951 18.5538 4.50011 18.6513 4.50011 18.7498C4.50011 18.8483 4.51951 18.9458 4.5572 19.0368C4.59488 19.1278 4.65012 19.2105 4.71976 19.2801C4.7894 19.3497 4.87207 19.405 4.96305 19.4427C5.05403 19.4803 5.15155 19.4997 5.25003 19.4997C5.34851 19.4997 5.44603 19.4803 5.53701 19.4427C5.628 19.405 5.71067 19.3497 5.78031 19.2801L12.0001 13.0603L18.2198 19.2801C18.3604 19.4207 18.5512 19.4997 18.7501 19.4997C18.949 19.4997 19.1397 19.4207 19.2804 19.2801C19.421 19.1395 19.5 18.9487 19.5 18.7498C19.5 18.5509 19.421 18.3602 19.2804 18.2195L13.0606 11.9998Z%22 fill%3D%22white%22 fill-opacity%3D%220.95%22%2F%3E%3C%2Fsvg%3E\");background-size:20px 20px}#user-creation-stepper{display:flex;flex-direction:column;width:100%}#user-creation-stepper .mat-stepper-horizontal{margin:0 auto;width:100%;background-color:transparent}#user-creation-stepper .mat-horizontal-stepper-header-container{margin:0 auto;width:800px}#user-creation-stepper .mat-step-icon{width:28px;height:28px;border:3px solid hsl(0,0%,50.2%)}#user-creation-stepper .mat-step-icon-selected{background-color:#c6c6c6!important;border-color:#19487d}#user-creation-stepper .mat-step-icon-state-number{background-color:#fff}#user-creation-stepper .mat-step-icon-state-edit,#user-creation-stepper .mat-step-header .mat-step-icon-state-done{background-color:#1170cf;border-color:#1170cf}#user-creation-stepper .mat-step-icon-content{display:none}#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):before,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):before,#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):after,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):after{border-top-width:3px!important}#user-creation-stepper .mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header:after,#user-creation-stepper .mat-stepper-horizontal-line{border-top-color:#1170cf!important;border-top-width:3px!important;border-top-style:solid!important}#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-stepper-horizontal-line,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:after{border-top-width:3px!important;background-color:#7b7b7b!important;border-top-color:#7b7b7b!important}#user-creation-stepper .mat-horizontal-content-container{padding:0!important;margin-top:3rem}#user-creation-stepper .mat-horizontal-stepper-content[aria-expanded=true]{padding-bottom:0}.step-title{font-size:26px;font-weight:500;width:70%;margin:0 auto 1rem;min-height:32px;display:flex;align-items:center}.wizard-actions{display:flex;flex-flow:row-reverse;justify-content:flex-start;align-items:center;margin:16px 16px 0 0;align-self:flex-end;gap:1rem;position:relative;z-index:30}.uc-btn{border-radius:50px!important;padding:8px 16px!important;min-width:80px!important;line-height:normal!important;cursor:pointer}.uc-btn__inline-content{display:inline-flex;align-items:center;gap:8px}.uc-btn__spinner{width:14px;height:14px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:uc-btn-spin .7s linear infinite}@keyframes uc-btn-spin{to{transform:rotate(360deg)}}.uc-btn-primary{background-color:#000!important;color:#fff!important;border:1px solid black!important}.uc-btn-secondary{background-color:#fff!important;color:#000!important;border:1px solid black!important}.move-user-tab-content-box{width:70%;margin:0 auto;background-color:#fff;min-height:350px;border:1px solid #C3C1C1;border-radius:8px;box-sizing:border-box;padding:25px}.wizard-loading-overlay{position:absolute;inset:0;background:rgba(243,243,243,.72);backdrop-filter:blur(1px);opacity:0;pointer-events:none;transition:opacity .18s ease;z-index:20}.wizard-loading-overlay--visible{opacity:1;pointer-events:auto}.mat-button-disabled{background-color:#bbb;color:#fff;border:1px solid grey;cursor:default!important}\n"] }]
901
- }], propDecorators: { title: [{
2639
+ args: [{ selector: 'tk-user-creation-wizard', encapsulation: ViewEncapsulation.None, template: "<app-notification></app-notification>\r\n<app-loader *ngIf=\"isLoading\"></app-loader>\r\n<div class=\"move-user-stepper-container\" [attr.aria-busy]=\"isSubmitting\">\r\n <header class=\"move-user-header\">\r\n <div class=\"move-user-header__title\">{{ title }}</div>\r\n <div class=\"move-user-header__close\">\r\n <span class=\"app-icon user-creation-close-icon\" (click)=\"onCancel()\"></span>\r\n </div>\r\n </header>\r\n\r\n <div id=\"user-creation-stepper\">\r\n <mat-stepper [linear]=\"false\" labelPosition=\"bottom\" #stepper\r\n [selectedIndex]=\"selectedIndex\"\r\n (selectionChange)=\"onStepSelectionChange($event)\">\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 1: User creation with template</div>\r\n <ng-template matStepLabel>User creation</ng-template>\r\n\r\n <ng-container *ngIf=\"selectedIndex === 0\">\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-template-step\r\n [customerId]=\"customerId\"\r\n (validityChange)=\"templateStepValid = $event\"\r\n ></tk-user-template-step>\r\n </div>\r\n </ng-container>\r\n </mat-step>\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 2 : User details</div>\r\n <ng-template matStepLabel>User details</ng-template>\r\n\r\n <ng-container *ngIf=\"selectedIndex === 1\">\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-details-step (validityChange)=\"detailsStepValid = $event\"></tk-user-details-step>\r\n </div>\r\n </ng-container>\r\n </mat-step>\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 3: Review</div>\r\n <ng-template matStepLabel>Review</ng-template>\r\n\r\n <ng-container *ngIf=\"selectedIndex === 2\">\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-overview-step></tk-user-overview-step>\r\n </div>\r\n </ng-container>\r\n </mat-step>\r\n </mat-stepper>\r\n\r\n <div class=\"wizard-actions\">\r\n <ng-container [ngSwitch]=\"stepper.selectedIndex\">\r\n <ng-container *ngSwitchCase=\"0\">\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-primary\"\r\n type=\"button\"\r\n [disabled]=\"!templateStepValid\"\r\n (click)=\"onStepperNext(stepper)\"\r\n >\r\n Next\r\n </button>\r\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"onCancel()\">\r\n Cancel\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"1\">\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-primary\"\r\n type=\"button\"\r\n [disabled]=\"!detailsStepValid\"\r\n (click)=\"onStepperNext(stepper)\"\r\n >\r\n Next\r\n </button>\r\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"stepper.previous()\">\r\n Previous\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"2\">\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-primary\"\r\n type=\"button\"\r\n [disabled]=\"isSubmitting\"\r\n (click)=\"onSubmit()\"\r\n >\r\n <span class=\"uc-btn__inline-content\">\r\n <span class=\"uc-btn__spinner\" *ngIf=\"isSubmitting\" aria-hidden=\"true\"></span>\r\n <span>{{ isSubmitting ? 'Creating...' : 'Create' }}</span>\r\n </span>\r\n </button>\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-secondary\"\r\n type=\"button\"\r\n [disabled]=\"isSubmitting\"\r\n (click)=\"stepper.previous()\"\r\n >\r\n Previous\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wizard-loading-overlay\" [class.wizard-loading-overlay--visible]=\"isSubmitting\" aria-hidden=\"true\"></div>\r\n</div>", styles: [".move-user-stepper-container{background-color:#f3f3f3;padding:0 0 16px;position:relative;overflow:hidden}.move-user-header{background-color:#1170cf;height:45px;padding:1rem 1.5rem;display:flex;align-items:center;justify-content:space-between;color:#fff;font-size:18px;font-weight:500}.move-user-header__close{cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:0}.move-user-header__close i{font-size:25px;font-weight:100}.app-icon{height:20px;width:20px;display:block;cursor:pointer;background-repeat:no-repeat;background-position:center}.user-creation-close-icon{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath d%3D%22M13.0606 11.9998L19.2803 5.78001C19.35 5.71038 19.4052 5.6277 19.4429 5.53672C19.4806 5.44573 19.5 5.34822 19.5 5.24974C19.5 5.15126 19.4806 5.05374 19.4429 4.96276C19.4052 4.87177 19.3499 4.7891 19.2803 4.71947C19.2107 4.64983 19.128 4.5946 19.037 4.55691C18.946 4.51923 18.8485 4.49983 18.75 4.49983C18.6515 4.49984 18.554 4.51924 18.463 4.55692C18.3721 4.59461 18.2894 4.64985 18.2198 4.71949L12 10.9392L5.78026 4.71949C5.71077 4.64921 5.62807 4.59335 5.53691 4.55514C5.44576 4.51692 5.34795 4.49711 5.24911 4.49683C5.15027 4.49655 5.05235 4.51581 4.96098 4.55351C4.86961 4.59121 4.78659 4.64659 4.7167 4.71648C4.64681 4.78638 4.59143 4.8694 4.55374 4.96077C4.51605 5.05214 4.49679 5.15006 4.49707 5.2489C4.49736 5.34774 4.51718 5.44555 4.5554 5.5367C4.59361 5.62786 4.64947 5.71055 4.71976 5.78004L10.9395 11.9998L4.71976 18.2195C4.65013 18.2892 4.59489 18.3718 4.5572 18.4628C4.51951 18.5538 4.50011 18.6513 4.50011 18.7498C4.50011 18.8483 4.51951 18.9458 4.5572 19.0368C4.59488 19.1278 4.65012 19.2105 4.71976 19.2801C4.7894 19.3497 4.87207 19.405 4.96305 19.4427C5.05403 19.4803 5.15155 19.4997 5.25003 19.4997C5.34851 19.4997 5.44603 19.4803 5.53701 19.4427C5.628 19.405 5.71067 19.3497 5.78031 19.2801L12.0001 13.0603L18.2198 19.2801C18.3604 19.4207 18.5512 19.4997 18.7501 19.4997C18.949 19.4997 19.1397 19.4207 19.2804 19.2801C19.421 19.1395 19.5 18.9487 19.5 18.7498C19.5 18.5509 19.421 18.3602 19.2804 18.2195L13.0606 11.9998Z%22 fill%3D%22white%22 fill-opacity%3D%220.95%22%2F%3E%0D%3C%2Fsvg%3E%0D\");background-size:20px 20px}#user-creation-stepper{display:flex;flex-direction:column;width:100%}#user-creation-stepper .mat-stepper-horizontal{margin:0 auto;width:100%;background-color:transparent}#user-creation-stepper .mat-horizontal-stepper-header-container{margin:0 auto;width:800px}#user-creation-stepper .mat-step-icon{width:28px;height:28px;border:3px solid hsl(0,0%,50.2%)}#user-creation-stepper .mat-step-icon-selected{background-color:#c6c6c6!important;border-color:#19487d}#user-creation-stepper .mat-step-icon-state-number{background-color:#fff}#user-creation-stepper .mat-step-icon-state-edit,#user-creation-stepper .mat-step-header .mat-step-icon-state-done{background-color:#1170cf;border-color:#1170cf}#user-creation-stepper .mat-step-icon-content{display:none}#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):before,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):before,#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):after,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):after{border-top-width:3px!important}#user-creation-stepper .mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header:after,#user-creation-stepper .mat-stepper-horizontal-line{border-top-color:#1170cf!important;border-top-width:3px!important;border-top-style:solid!important}#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-stepper-horizontal-line,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:after{border-top-width:3px!important;background-color:#7b7b7b!important;border-top-color:#7b7b7b!important}#user-creation-stepper .mat-horizontal-content-container{padding:0!important;margin-top:3rem}#user-creation-stepper .mat-horizontal-stepper-content[aria-expanded=true]{padding-bottom:0}.step-title{font-size:26px;font-weight:500;width:70%;margin:0 auto 1rem;min-height:32px;display:flex;align-items:center}.wizard-actions{display:flex;flex-flow:row-reverse;justify-content:flex-start;align-items:center;margin:16px 16px 0 0;align-self:flex-end;gap:1rem;position:relative;z-index:30}.uc-btn{border-radius:50px!important;padding:8px 16px!important;min-width:80px!important;line-height:normal!important;cursor:pointer}.uc-btn__inline-content{display:inline-flex;align-items:center;gap:8px}.uc-btn__spinner{width:14px;height:14px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:uc-btn-spin .7s linear infinite}@keyframes uc-btn-spin{to{transform:rotate(360deg)}}.uc-btn-primary{background-color:#000!important;color:#fff!important;border:1px solid black!important}.uc-btn-secondary{background-color:#fff!important;color:#000!important;border:1px solid black!important}.move-user-tab-content-box{width:70%;margin:0 auto;background-color:#fff;min-height:350px;border:1px solid #C3C1C1;border-radius:8px;box-sizing:border-box;padding:25px}.wizard-loading-overlay{position:absolute;inset:0;background:rgba(243,243,243,.72);backdrop-filter:blur(1px);opacity:0;pointer-events:none;transition:opacity .18s ease;z-index:20}.wizard-loading-overlay--visible{opacity:1;pointer-events:auto}.wizard-actions .uc-btn-primary.mat-button-disabled{background-color:#bbb;color:#fff;border:1px solid grey;cursor:default!important;opacity:.3}\n"] }]
2640
+ }], ctorParameters: function () { return [{ type: NotificationService }]; }, propDecorators: { title: [{
902
2641
  type: Input
903
2642
  }], host: [{
904
2643
  type: Input
@@ -910,25 +2649,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
910
2649
  type: Output
911
2650
  }], submit: [{
912
2651
  type: Output
2652
+ }], templateStep: [{
2653
+ type: ViewChild,
2654
+ args: [UserTemplateStepComponent]
2655
+ }], detailsStep: [{
2656
+ type: ViewChild,
2657
+ args: [UserDetailsStepComponent]
913
2658
  }] } });
914
2659
 
2660
+ function HttpLoaderFactory(http) {
2661
+ return new TranslateHttpLoader(http);
2662
+ }
915
2663
  class UserCreationModule {
916
2664
  }
917
2665
  UserCreationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
918
2666
  UserCreationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UserCreationModule, declarations: [UserCreationWizardComponent,
919
2667
  UserTemplateStepComponent,
2668
+ NotificationsComponent,
920
2669
  UserDetailsStepComponent,
921
- UserOverviewStepComponent], imports: [CommonModule,
2670
+ UserOverviewStepComponent,
2671
+ AppLoaderComponent,
2672
+ TruncatePipe], imports: [CommonModule,
922
2673
  SharedModule,
923
2674
  MaterialModule,
924
2675
  MatStepperModule,
925
2676
  MatExpansionModule,
926
2677
  FormsModule,
927
2678
  ReactiveFormsModule,
928
- MatRadioModule], exports: [UserCreationWizardComponent] });
2679
+ MatRadioModule, i1$3.TranslateModule], exports: [UserCreationWizardComponent] });
929
2680
  UserCreationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationModule, providers: [
930
2681
  UserCreationApiService,
931
2682
  UserCreationWizardService,
2683
+ NotificationService,
932
2684
  ], imports: [CommonModule,
933
2685
  SharedModule,
934
2686
  MaterialModule,
@@ -936,15 +2688,25 @@ UserCreationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", vers
936
2688
  MatExpansionModule,
937
2689
  FormsModule,
938
2690
  ReactiveFormsModule,
939
- MatRadioModule] });
2691
+ MatRadioModule,
2692
+ TranslateModule.forRoot({
2693
+ loader: {
2694
+ provide: TranslateLoader,
2695
+ useFactory: HttpLoaderFactory,
2696
+ deps: [HttpClient]
2697
+ }
2698
+ })] });
940
2699
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationModule, decorators: [{
941
2700
  type: NgModule,
942
2701
  args: [{
943
2702
  declarations: [
944
2703
  UserCreationWizardComponent,
945
2704
  UserTemplateStepComponent,
2705
+ NotificationsComponent,
946
2706
  UserDetailsStepComponent,
947
- UserOverviewStepComponent
2707
+ UserOverviewStepComponent,
2708
+ AppLoaderComponent,
2709
+ TruncatePipe,
948
2710
  ],
949
2711
  imports: [
950
2712
  CommonModule,
@@ -954,14 +2716,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
954
2716
  MatExpansionModule,
955
2717
  FormsModule,
956
2718
  ReactiveFormsModule,
957
- MatRadioModule
2719
+ MatRadioModule,
2720
+ TranslateModule.forRoot({
2721
+ loader: {
2722
+ provide: TranslateLoader,
2723
+ useFactory: HttpLoaderFactory,
2724
+ deps: [HttpClient]
2725
+ }
2726
+ }),
958
2727
  ],
959
2728
  exports: [
960
- UserCreationWizardComponent
2729
+ UserCreationWizardComponent,
961
2730
  ],
962
2731
  providers: [
963
2732
  UserCreationApiService,
964
2733
  UserCreationWizardService,
2734
+ NotificationService,
965
2735
  ]
966
2736
  }]
967
2737
  }] });
@@ -979,5 +2749,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
979
2749
  * Generated bundle index. Do not edit.
980
2750
  */
981
2751
 
982
- export { UserCreationModule, UserCreationWizardComponent };
2752
+ export { HttpLoaderFactory, USER_CREATED_SUCCESSFLLY, UserCreationModule, UserCreationWizardComponent };
983
2753
  //# sourceMappingURL=tuki-io-tuki-widgets-user-creation.mjs.map