@tuki-io/tuki-widgets 0.0.200 → 0.0.202

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 (53) hide show
  1. package/esm2020/di2mt/shared/components/stat-card/stat-card.component.mjs +4 -4
  2. package/esm2020/user-creation/src/app.constants.mjs +16 -2
  3. package/esm2020/user-creation/src/classes/notification.mjs +32 -0
  4. package/esm2020/user-creation/src/environments/environment.mjs +11 -0
  5. package/esm2020/user-creation/src/interfaces/user-creation-wizard.interfaces.mjs +199 -0
  6. package/esm2020/user-creation/src/shared/components/notification/notification.component.mjs +38 -0
  7. package/esm2020/user-creation/src/shared/material.module.mjs +35 -7
  8. package/esm2020/user-creation/src/shared/pipes/truncate.pipe.mjs +30 -0
  9. package/esm2020/user-creation/src/shared/services/notification.service.mjs +62 -0
  10. package/esm2020/user-creation/src/shared/services/user-creation-api.service.mjs +43 -19
  11. package/esm2020/user-creation/src/shared/shared.module.mjs +27 -4
  12. package/esm2020/user-creation/src/user-creation.module.mjs +40 -7
  13. package/esm2020/user-creation/src/utils/app-loader/app-loader.mjs +14 -0
  14. package/esm2020/user-creation/src/utils/build-savable-end-user.mjs +147 -0
  15. package/esm2020/user-creation/src/utils/device-default-prefix.mjs +13 -0
  16. package/esm2020/user-creation/src/utils/device-name-validation.mjs +23 -0
  17. package/esm2020/user-creation/src/utils/model.mjs +19 -0
  18. package/esm2020/user-creation/src/utils/parse-device-name-rule.mjs +26 -0
  19. package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.mjs +512 -20
  20. package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-overview-step/user-overview-step.component.mjs +3 -3
  21. package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-template-step/user-template-step.component.mjs +80 -34
  22. package/esm2020/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.component.mjs +83 -19
  23. package/esm2020/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.mjs +599 -124
  24. package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs +3 -3
  25. package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs.map +1 -1
  26. package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs +2129 -325
  27. package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
  28. package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs +3 -3
  29. package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs.map +1 -1
  30. package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs +2084 -314
  31. package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
  32. package/package.json +1 -1
  33. package/user-creation/src/app.constants.d.ts +10 -0
  34. package/user-creation/src/classes/notification.d.ts +18 -0
  35. package/user-creation/src/environments/environment.d.ts +9 -0
  36. package/user-creation/src/interfaces/user-creation-wizard.interfaces.d.ts +554 -0
  37. package/user-creation/src/shared/components/notification/notification.component.d.ts +19 -0
  38. package/user-creation/src/shared/material.module.d.ts +5 -1
  39. package/user-creation/src/shared/pipes/truncate.pipe.d.ts +7 -0
  40. package/user-creation/src/shared/services/notification.service.d.ts +18 -0
  41. package/user-creation/src/shared/services/user-creation-api.service.d.ts +8 -2
  42. package/user-creation/src/shared/shared.module.d.ts +3 -1
  43. package/user-creation/src/user-creation.module.d.ts +17 -10
  44. package/user-creation/src/utils/app-loader/app-loader.d.ts +6 -0
  45. package/user-creation/src/utils/build-savable-end-user.d.ts +23 -0
  46. package/user-creation/src/utils/device-default-prefix.d.ts +5 -0
  47. package/user-creation/src/utils/device-name-validation.d.ts +6 -0
  48. package/user-creation/src/utils/model.d.ts +1 -0
  49. package/user-creation/src/utils/parse-device-name-rule.d.ts +8 -0
  50. package/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.d.ts +83 -7
  51. package/user-creation/src/widgets/user-creation-wizard/components/user-template-step/user-template-step.component.d.ts +11 -4
  52. package/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.component.d.ts +18 -0
  53. package/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.d.ts +71 -56
@@ -1,34 +1,237 @@
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 { __rest } from 'tslib';
42
+ import * as i11 from '@angular/material/core';
43
+ import * as i1$3 from '@ngx-translate/core';
44
+ import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
45
+ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
46
+
47
+ const environment = {
48
+ production: false,
49
+ // apiUrl: 'http://localhost:4200',
50
+ apiUrl: 'http://192.168.0.191:8080',
51
+ notificationsLifetime: 30000,
52
+ longNotificationsLifetime: 45000,
53
+ cashCleanTimer: 900000,
54
+ cashArrayLength: 10000,
55
+ matomoUrl: 'http://192.168.0.136/matomo/',
56
+ };
57
+
58
+ const TTL_DEFAULT = environment.notificationsLifetime;
59
+ const TTL_LONG_DEFAULT = environment.longNotificationsLifetime;
60
+ var NotificationType;
61
+ (function (NotificationType) {
62
+ NotificationType["info"] = "info";
63
+ NotificationType["error"] = "error";
64
+ NotificationType["success"] = "success";
65
+ NotificationType["warning"] = "warning";
66
+ })(NotificationType || (NotificationType = {}));
67
+ class Notification {
68
+ constructor(data) {
69
+ this.ttl = TTL_DEFAULT;
70
+ Object.assign(this, data || {});
71
+ if (this.ttl === undefined) {
72
+ this.ttl = this.message && this.message.length && this.message.length < 80 ? TTL_DEFAULT : TTL_LONG_DEFAULT;
73
+ }
74
+ }
75
+ isInfo() {
76
+ return this.type === NotificationType.info;
77
+ }
78
+ isError() {
79
+ return this.type === NotificationType.error;
80
+ }
81
+ isSuccess() {
82
+ return this.type === NotificationType.success;
83
+ }
84
+ isWarning() {
85
+ return this.type === NotificationType.warning;
86
+ }
87
+ }
88
+
89
+ const SUCCESS_TIME = 5000;
90
+ const INACTIVE_SESSION_MESSAGE = 'Your session was lost due to inactivity. Please login again';
91
+ const INACTIVE_SESSION = 'SESSION_INACTIVE';
92
+ class NotificationService {
93
+ constructor() {
94
+ this.listChange = new Subject();
95
+ this.max = 0;
96
+ this.list = [];
97
+ }
98
+ error(message, ttl) {
99
+ this.notify('error', message, ttl);
100
+ }
101
+ success(message, ttl) {
102
+ this.notify('success', message, (!ttl) ? SUCCESS_TIME : ttl);
103
+ }
104
+ warning(message, ttl) {
105
+ this.notify('warning', message, ttl);
106
+ }
107
+ info(message, ttl) {
108
+ this.notify('info', message, ttl);
109
+ }
110
+ notify(type, message, ttl) {
111
+ const found = this.list.find((n) => n.message === message);
112
+ if (found) {
113
+ this.remove(found);
114
+ }
115
+ const notification = new Notification({
116
+ id: ++this.max,
117
+ type, message, ttl
118
+ });
119
+ if (notification.ttl > 0) {
120
+ notification.timerId = setTimeout(() => this.remove(notification, true), notification.ttl);
121
+ }
122
+ this.list.push(notification);
123
+ this.listChange.next(this.list);
124
+ }
125
+ remove(notification, auto) {
126
+ if (!auto && notification.timerId) {
127
+ // clear timeout in case of manual remove
128
+ clearInterval(notification.timerId);
129
+ }
130
+ this.list = this.list.filter(n => n.id !== notification.id);
131
+ this.listChange.next(this.list);
132
+ }
133
+ removeInactiveSessionError() {
134
+ if (!this.list || !this.list.length) {
135
+ return;
136
+ }
137
+ this.list = this.list.filter(n => n.message !== INACTIVE_SESSION_MESSAGE && n.message !== INACTIVE_SESSION);
138
+ this.listChange.next(this.list);
139
+ }
140
+ }
141
+ NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
142
+ NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService });
143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, decorators: [{
144
+ type: Injectable
145
+ }], ctorParameters: function () { return []; } });
146
+
147
+ const API = {
148
+ WEBEX_CHECK_CONTROL_HUB_INTEGRATION: "/webex/api/search/webex/customers/:customerId/controlhubexists",
149
+ SITES: "/dcp/api/customers/:customerId/sites",
150
+ SITE: "/dcp/api/sites/:siteId",
151
+ DEVICE_TYPES: "/dcp/api/provision/options/:siteId/devicetypes",
152
+ SITE_SETTINGS: "/dcp/api/sites/:siteId/settings",
153
+ VM_USER_TEMPLATES: "/dcp/api/provision/options/:siteId/vmusertemplates",
154
+ EXISTING_USERS: "/dcp/api/provision/:siteId/users",
155
+ USER_TEMPLATES_UPLOAD_LIST: "/dcp/api/searchbulkupdate/uploadedusertemplatelist",
156
+ USER_TEMPLATE_TOKEN: "/dcp/api/bulkupdate/:customerId/usertemplate/:id/token",
157
+ AVAILABLE_DN_IN_RANGES: "/dcp/api/sites/:siteId/available-dn-in-ranges",
158
+ USER_CHECK_ID_EXISTING: "/dcp/api/provision/:siteId/users/:userId",
159
+ LDAP_USERS: "/dcp/api/provision/:siteId/users",
160
+ USERS: "/dcp/api/provision/:siteId/users",
161
+ CREATE_NEW_USER_FROM_TEMPLATE: "/dcp/api/provision/newUserFromUserTemplate",
162
+ DEVICE_DEFAULTS: "/api/provision/options/:siteId/devicedefaults/:deviceType",
163
+ };
164
+ const USER_CREATION_TYPES = {
165
+ CUCM: 'CUCM',
166
+ MT: 'MT'
167
+ };
168
+ const MAX_INTEGER = 2147483647;
169
+ const CUTTING_SYMBOLS = [
170
+ " ",
171
+ "_",
172
+ "-"
173
+ ];
174
+ const BREADCRUMB_LENGTH_LIMIT = 20;
175
+ const DEFAULT_CUTTING_LENGTH = 15;
176
+
177
+ class TruncatePipe {
178
+ transform(value, args) {
179
+ if (!value) {
180
+ return '';
181
+ }
182
+ if (args) {
183
+ const limit = args.length > 0 ? parseInt(args[0], 10) : 20;
184
+ const trail = args.length > 1 ? args[1] : '...';
185
+ return value.length > limit ? value.substring(0, limit) + trail : value;
186
+ }
187
+ if (value.length <= BREADCRUMB_LENGTH_LIMIT) {
188
+ return value;
189
+ }
190
+ const foundSymbol = CUTTING_SYMBOLS.find((symbol) => value.includes(symbol, DEFAULT_CUTTING_LENGTH));
191
+ const cutIndex = foundSymbol ? value.indexOf(foundSymbol, DEFAULT_CUTTING_LENGTH) : BREADCRUMB_LENGTH_LIMIT;
192
+ return value.substring(0, cutIndex) + '...';
193
+ }
194
+ }
195
+ TruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
196
+ TruncatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TruncatePipe, name: "truncate" });
197
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TruncatePipe, decorators: [{
198
+ type: Pipe,
199
+ args: [{
200
+ name: 'truncate'
201
+ }]
202
+ }] });
203
+
204
+ class NotificationsComponent {
205
+ constructor(notificationService, ref) {
206
+ this.notificationService = notificationService;
207
+ this.ref = ref;
208
+ }
209
+ ngOnInit() {
210
+ this.listChangeSubscribe();
211
+ }
212
+ ngOnDestroy() {
213
+ this.listSubscription.unsubscribe();
214
+ }
215
+ readMore() {
216
+ this.isReadMore = !this.isReadMore;
217
+ }
218
+ removeNotification(notification) {
219
+ this.notificationService.remove(notification);
220
+ }
221
+ listChangeSubscribe() {
222
+ this.listSubscription = this.notificationService.listChange
223
+ .subscribe((list) => {
224
+ this.list = list;
225
+ this.ref.detectChanges();
226
+ });
227
+ }
228
+ }
229
+ 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 });
230
+ 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 });
231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, decorators: [{
232
+ type: Component,
233
+ 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"] }]
234
+ }], ctorParameters: function () { return [{ type: NotificationService }, { type: i0.ChangeDetectorRef }]; } });
32
235
 
33
236
  class MaterialModule {
34
237
  }
@@ -41,7 +244,11 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
41
244
  MatIconModule,
42
245
  MatFormFieldModule,
43
246
  MatInputModule,
44
- MatSelectModule], exports: [MatProgressBarModule,
247
+ MatSelectModule,
248
+ MatAutocompleteModule,
249
+ MatProgressSpinnerModule,
250
+ MatPaginatorModule,
251
+ MatChipsModule], exports: [MatProgressBarModule,
45
252
  MatTooltipModule,
46
253
  MatTableModule,
47
254
  MatCheckboxModule,
@@ -49,7 +256,11 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
49
256
  MatIconModule,
50
257
  MatFormFieldModule,
51
258
  MatInputModule,
52
- MatSelectModule] });
259
+ MatSelectModule,
260
+ MatAutocompleteModule,
261
+ MatProgressSpinnerModule,
262
+ MatPaginatorModule,
263
+ MatChipsModule] });
53
264
  MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [MatProgressBarModule,
54
265
  MatTooltipModule,
55
266
  MatTableModule,
@@ -58,7 +269,11 @@ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
58
269
  MatIconModule,
59
270
  MatFormFieldModule,
60
271
  MatInputModule,
61
- MatSelectModule, MatProgressBarModule,
272
+ MatSelectModule,
273
+ MatAutocompleteModule,
274
+ MatProgressSpinnerModule,
275
+ MatPaginatorModule,
276
+ MatChipsModule, MatProgressBarModule,
62
277
  MatTooltipModule,
63
278
  MatTableModule,
64
279
  MatCheckboxModule,
@@ -66,7 +281,11 @@ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
66
281
  MatIconModule,
67
282
  MatFormFieldModule,
68
283
  MatInputModule,
69
- MatSelectModule] });
284
+ MatSelectModule,
285
+ MatAutocompleteModule,
286
+ MatProgressSpinnerModule,
287
+ MatPaginatorModule,
288
+ MatChipsModule] });
70
289
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
71
290
  type: NgModule,
72
291
  args: [{
@@ -79,7 +298,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
79
298
  MatIconModule,
80
299
  MatFormFieldModule,
81
300
  MatInputModule,
82
- MatSelectModule
301
+ MatSelectModule,
302
+ MatAutocompleteModule,
303
+ MatProgressSpinnerModule,
304
+ MatPaginatorModule,
305
+ MatChipsModule,
83
306
  ],
84
307
  exports: [
85
308
  MatProgressBarModule,
@@ -90,97 +313,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
90
313
  MatIconModule,
91
314
  MatFormFieldModule,
92
315
  MatInputModule,
93
- MatSelectModule
316
+ MatSelectModule,
317
+ MatAutocompleteModule,
318
+ MatProgressSpinnerModule,
319
+ MatPaginatorModule,
320
+ MatChipsModule,
94
321
  ]
95
322
  }]
96
323
  }] });
97
324
 
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 === null || siteDefaults === void 0 ? void 0 : siteDefaults.sharedSitesCssFilter) || [];
163
- this.routePartitionFilter = (siteDefaults === null || siteDefaults === void 0 ? void 0 : 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
325
  class APIService {
185
326
  constructor(httpClient) {
186
327
  this.httpClient = httpClient;
@@ -258,6 +399,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
258
399
  }]
259
400
  }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
260
401
 
402
+ const BERLIN_MT_SITE = {
403
+ address2: "Address 2",
404
+ address3: "Address 3",
405
+ country: "IL",
406
+ cucm: {
407
+ platformType: "CUCM",
408
+ id: 2073,
409
+ name: "DI_220"
410
+ },
411
+ id: 9329,
412
+ name: "Berlin_MT",
413
+ hqStatus: false,
414
+ hasActivated: true,
415
+ isAfterTtu: false,
416
+ prefetchDn: false,
417
+ settings: [],
418
+ shortName: "Berl1758105407",
419
+ state: "",
420
+ timezone: "GMT"
421
+ };
261
422
  class UserCreationApiService {
262
423
  constructor() {
263
424
  this._allSites = [];
@@ -287,32 +448,21 @@ class UserCreationApiService {
287
448
  // }
288
449
  // this.allCustomerSites$.next(true);
289
450
  // return this._allSites;
290
- this.sitesListSubject$.next(res.pageData);
451
+ this.sitesListSubject$.next([BERLIN_MT_SITE, ...res.pageData].sort((a, b) => a.name.localeCompare(b.name)));
291
452
  }));
292
453
  // .pipe(this.handleError(true));
293
454
  }
294
- getSiteData(siteId) {
455
+ getSiteAllData(siteId) {
295
456
  // this.dataPending = true;
296
457
  return forkJoin([
297
458
  this.getSite(siteId),
298
- this.getDeviceTypes(siteId),
299
459
  this.getSiteDefaults(siteId, false),
300
- this.getVoiceMailUserTemplates(siteId)
301
- ]).pipe(tap(() => {
302
- // this.userFeaturesService.setDefaultUcProfile();
303
- }));
460
+ // this.getDeviceTypes(siteId),
461
+ // this.getVoiceMailUserTemplates(siteId)
462
+ ]);
304
463
  }
305
464
  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
- }));
465
+ return this.apiService.fetch(API.SITE.replace(':siteId', String(siteId)), null, false);
316
466
  }
317
467
  getDeviceTypes(siteId) {
318
468
  return this.apiService.fetch(API.DEVICE_TYPES.replace(':siteId', String(siteId)), null, true);
@@ -356,6 +506,22 @@ class UserCreationApiService {
356
506
  return this.apiService.fetch(API.USER_TEMPLATE_TOKEN.replace(':customerId', customerId).replace(':id', id));
357
507
  // .pipe(this.handleError(false, true));
358
508
  }
509
+ getAvailableDnInRanges(siteId, params) {
510
+ return this.apiService.fetch(API.AVAILABLE_DN_IN_RANGES.replace(':siteId', siteId), params);
511
+ }
512
+ getLdapUsers(siteId, params) {
513
+ return this.apiService.fetch(API.LDAP_USERS.replace(':siteId', siteId), params);
514
+ }
515
+ checkUserIdExisting(siteId, userId) {
516
+ return this.apiService.fetch(API.USER_CHECK_ID_EXISTING.replace(':siteId', siteId).replace(':userId', userId));
517
+ }
518
+ saveTemplateUser(user, templateId, siteId) {
519
+ return this.apiService.post(API.CREATE_NEW_USER_FROM_TEMPLATE, user, { siteId: siteId, templateId: templateId });
520
+ }
521
+ getDeviceDefaults(siteId, deviceType) {
522
+ const encodedType = encodeURIComponent(deviceType);
523
+ return this.apiService.fetch(API.DEVICE_DEFAULTS.replace(':siteId', siteId).replace(':deviceType', encodedType));
524
+ }
359
525
  }
360
526
  UserCreationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
361
527
  UserCreationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationApiService });
@@ -369,11 +535,25 @@ SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "1
369
535
  SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SharedModule, imports: [CommonModule,
370
536
  MaterialModule,
371
537
  NgApexchartsModule,
372
- HttpClientModule], exports: [MaterialModule] });
538
+ HttpClientModule,
539
+ ReactiveFormsModule,
540
+ FormsModule], exports: [MaterialModule,
541
+ ReactiveFormsModule,
542
+ FormsModule,
543
+ MatTableModule,
544
+ NgApexchartsModule,
545
+ HttpClientModule] });
373
546
  SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SharedModule, imports: [CommonModule,
374
547
  MaterialModule,
375
548
  NgApexchartsModule,
376
- HttpClientModule, MaterialModule] });
549
+ HttpClientModule,
550
+ ReactiveFormsModule,
551
+ FormsModule, MaterialModule,
552
+ ReactiveFormsModule,
553
+ FormsModule,
554
+ MatTableModule,
555
+ NgApexchartsModule,
556
+ HttpClientModule] });
377
557
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SharedModule, decorators: [{
378
558
  type: NgModule,
379
559
  args: [{
@@ -383,18 +563,545 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
383
563
  MaterialModule,
384
564
  NgApexchartsModule,
385
565
  HttpClientModule,
566
+ ReactiveFormsModule,
567
+ FormsModule,
386
568
  ],
387
569
  exports: [
388
- MaterialModule
570
+ MaterialModule,
571
+ ReactiveFormsModule,
572
+ FormsModule,
573
+ MatTableModule,
574
+ NgApexchartsModule,
575
+ HttpClientModule,
389
576
  ]
390
577
  }]
391
578
  }] });
392
579
 
580
+ function deviceNameValidator(options) {
581
+ return (control) => {
582
+ var _a, _b;
583
+ const raw = String((_a = control.value) !== null && _a !== void 0 ? _a : '').trim();
584
+ if (!raw || !((_b = options.regex) === null || _b === void 0 ? void 0 : _b.trim())) {
585
+ return null;
586
+ }
587
+ try {
588
+ const rule = new RegExp(`^(?:${options.regex})$`);
589
+ if (!rule.test(raw)) {
590
+ return {
591
+ deviceName: {
592
+ caption: options.caption || options.regex,
593
+ },
594
+ };
595
+ }
596
+ }
597
+ catch (_c) {
598
+ return null;
599
+ }
600
+ return null;
601
+ };
602
+ }
603
+
604
+ const getSavableData$1 = (model, exclude) => {
605
+ let result = Object.keys(model);
606
+ if (exclude && exclude.length) {
607
+ result = result.filter(key => !exclude.some(item => item === key));
608
+ }
609
+ return result.reduce((result, key) => {
610
+ if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
611
+ result[key] = model[key].map((item) => item.getSavableData());
612
+ }
613
+ else if (model[key] instanceof Object && model[key].getSavableData) {
614
+ result[key] = model[key].getSavableData();
615
+ }
616
+ else {
617
+ result[key] = model[key];
618
+ }
619
+ return result;
620
+ }, {});
621
+ };
622
+
623
+ class Site {
624
+ constructor(site) {
625
+ Object.assign(this, site);
626
+ this.initForm();
627
+ }
628
+ initForm() {
629
+ const formBuilder = new FormBuilder();
630
+ const formSettings = {
631
+ name: [this.name || '', [Validators.required]],
632
+ shortName: [this.shortName || '', [Validators.required]],
633
+ cucm: [this.cucm || ''],
634
+ cuc: [this.cuc || ''],
635
+ address1: [this.address1 || ''],
636
+ zipCode: [this.country || ''],
637
+ city: [this.city || ''],
638
+ state: [this.state || ''],
639
+ country: [this.country || '', [Validators.required]],
640
+ isAfterTtu: [this.isAfterTtu || ''],
641
+ ttuEnableDate: [this.ttuEnableDate || '']
642
+ };
643
+ this.form = formBuilder.group(formSettings);
644
+ }
645
+ getSavableData() {
646
+ const nonSavableData = ['form'];
647
+ return getSavableData$1(this, nonSavableData);
648
+ }
649
+ getId() {
650
+ return this.id;
651
+ }
652
+ }
653
+ class SiteDefaults {
654
+ constructor(siteDefaults, isSharedLineSite) {
655
+ this.routePartitionFilter = [];
656
+ this.devicePoolFilter = [];
657
+ this.cssFilter = [];
658
+ this.voicemailProfileFilter = [];
659
+ if (siteDefaults) {
660
+ Object.assign(this, siteDefaults);
661
+ this.enableEm = siteDefaults.enableEm === 'true';
662
+ this.routePartitionFilter.sort();
663
+ this.devicePoolFilter.sort();
664
+ this.cssFilter.sort();
665
+ this.voicemailProfileFilter.sort();
666
+ }
667
+ if (isSharedLineSite) {
668
+ this.cssFilter = (siteDefaults === null || siteDefaults === void 0 ? void 0 : siteDefaults.sharedSitesCssFilter) || [];
669
+ this.routePartitionFilter = (siteDefaults === null || siteDefaults === void 0 ? void 0 : siteDefaults.sharedSitesRPFilter) || [];
670
+ }
671
+ }
672
+ }
673
+
674
+ const getSavableData = (model, exclude) => {
675
+ let result = Object.keys(model);
676
+ if (exclude && exclude.length) {
677
+ result = result.filter(key => !exclude.some(item => item === key));
678
+ }
679
+ return result.reduce((result, key) => {
680
+ if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
681
+ result[key] = model[key].map((item) => item.getSavableData());
682
+ }
683
+ else if (model[key] instanceof Object && model[key].getSavableData) {
684
+ result[key] = model[key].getSavableData();
685
+ }
686
+ else {
687
+ result[key] = model[key];
688
+ }
689
+ return result;
690
+ }, {});
691
+ };
692
+
693
+ // export class User implements EndUserInterface {
694
+ // userid?: string;
695
+ // firstName?: string;
696
+ // lastName?: string;
697
+ // middleName?: string;
698
+ // email?: string;
699
+ // domain?: string;
700
+ // department?: string;
701
+ // telephoneNumber?: string;
702
+ // homeNumber?: string;
703
+ // mobileNumber?: string;
704
+ // pagerNumber?: string;
705
+ // displayName?: string;
706
+ // ldapIntegrated?: boolean;
707
+ // sparkLicenses: Array<any>;
708
+ // extensionMobility: any;
709
+ // singleNumberReach?: SingleNumberReach;
710
+ // primaryLineReference: LineDirectory;
711
+ // voicemail: Voicemail;
712
+ // devices: Array<Device>;
713
+ // deviceProfiles: Array<Device>;
714
+ // lines: Array<Line>;
715
+ // features: Array<string>;
716
+ // ucServiceProfile: string;
717
+ // subscribeCss: string;
718
+ // presenceGroup: string;
719
+ // allowDeviceControlFromCti: boolean;
720
+ // enableCrossClusterEm: boolean;
721
+ // enableUserToHostConferenceNow: boolean;
722
+ // attendeesAccessCode: string;
723
+ // manager: string;
724
+ // title: string;
725
+ // associatedPc: string;
726
+ // userProfile: string;
727
+ // enableMobileVoiceAccess: boolean;
728
+ // mlppUserIdNumber: string;
729
+ // mlppPrecedencePattern: string;
730
+ // userLocale: string;
731
+ // siteId: number;
732
+ // siteName: string;
733
+ // location: string;
734
+ // lineAppearances: Array<LineAppearance>;
735
+ // meetMes: Array<MeetMeConferencing>;
736
+ // token: string;
737
+ // mlppPassword: string;
738
+ // password?: string;
739
+ // digestCredentials?: string;
740
+ // newUserid: string;
741
+ // homeCluster: boolean;
742
+ // directoryUri: string;
743
+ // createUserMode: boolean;
744
+ // pin: string;
745
+ // migrationVmUnchanged: boolean;
746
+ // migrationImPUnchanged: boolean;
747
+ // telecomManagerRule: boolean;
748
+ // userTemplateUdpDeviceTypesRules: UdpDeviceTypesRule[];
749
+ // deletedUserTemplateUdpDeviceTypesRules: UdpDeviceTypesRule[];
750
+ // hasModifiedCache = false;
751
+ // vmOnlyUser?: boolean;
752
+ // constructor(user: EndUserInterface, devicesStates = null, deviceProfilesStates = null, linesStates = null) {
753
+ // Object.assign(this, user || {});
754
+ // this.extensionMobility = new ExtensionMobility(this.extensionMobility);
755
+ // this.singleNumberReach = new SingleNumberReach(this.singleNumberReach);
756
+ // this.primaryLineReference = new LineDirectory(this.primaryLineReference);
757
+ // this.voicemail = new Voicemail(this.voicemail);
758
+ // this.devices = !this.devices ? [] : this.devices.map(device => new Device(device));
759
+ // this.userTemplateUdpDeviceTypesRules = !this.userTemplateUdpDeviceTypesRules ? [] : this.userTemplateUdpDeviceTypesRules.map(rule => new UdpDeviceTypesRule(rule));
760
+ // this.deviceProfiles = !this.deviceProfiles ? [] : this.deviceProfiles
761
+ // .map(device => new Device(device, appValidators, DeviceKind.deviceProfile));
762
+ // this.lines = !this.lines ? [] : this.lines.map(line => new Line(line));
763
+ // this.lineAppearances = !this.lineAppearances ? [] : this.lineAppearances.map(lineAppearance => new LineAppearance(lineAppearance));
764
+ // this.meetMes = !this.meetMes ? [] : this.meetMes.map(meetMe => new MeetMeConferencing(meetMe));
765
+ // this.sparkLicenses = !this.sparkLicenses ? [] : this.sparkLicenses.map(spark => new Spark(spark));
766
+ // this.features = this.features || [];
767
+ // this.password = null;
768
+ // this.digestCredentials = null;
769
+ // this.deletedUserTemplateUdpDeviceTypesRules = [];
770
+ // }
771
+ // getSavableData() {
772
+ // const excludedFields: string[] = ['form', 'editMode$', 'viewMode', 'token', 'hasModifiedCache', 'deletedUserTemplateUdpDeviceTypesRules'];
773
+ // return getSavableData(this, excludedFields);
774
+ // }
775
+ // }
776
+ class EndUser {
777
+ constructor(init) {
778
+ this.lines = [];
779
+ Object.assign(this, init || {});
780
+ this.voicemail = new Voicemail(init === null || init === void 0 ? void 0 : init.voicemail);
781
+ }
782
+ }
783
+ var DnRangeType;
784
+ (function (DnRangeType) {
785
+ DnRangeType["extension"] = "EXTENSION";
786
+ DnRangeType["cpg"] = "CPG";
787
+ DnRangeType["callpark"] = "CALLPARK";
788
+ DnRangeType["huntgroup"] = "HUNTGROUP";
789
+ DnRangeType["meetme"] = "MEETME";
790
+ DnRangeType["did"] = "DID";
791
+ })(DnRangeType || (DnRangeType = {}));
792
+ var UserViewType;
793
+ (function (UserViewType) {
794
+ UserViewType[UserViewType["details"] = 0] = "details";
795
+ UserViewType[UserViewType["devices"] = 1] = "devices";
796
+ UserViewType[UserViewType["lines"] = 2] = "lines";
797
+ UserViewType[UserViewType["snr"] = 3] = "snr";
798
+ UserViewType[UserViewType["features"] = 4] = "features";
799
+ UserViewType[UserViewType["overview"] = 5] = "overview";
800
+ })(UserViewType || (UserViewType = {}));
801
+ // export class ExtensionMobility implements ExtensionMobilityInterface {
802
+ // deviceType: string = '';
803
+ // deviceProfileName: string = '';
804
+ // buttonTemplate: string = '';
805
+ // services: string[] = [];
806
+ // protocol: string = '';
807
+ // userLocale: string = '';
808
+ // lineAssociations: LineAssociation[] = [];
809
+ // speedDials: SpeedDial[] = [];
810
+ // constructor(extensionMobility: ExtensionMobilityInterface) {
811
+ // Object.assign(this, extensionMobility || {});
812
+ // }
813
+ // getSavableData() {
814
+ // return getSavableData(this);
815
+ // }
816
+ // }
817
+ // export class ExtensionMobilityInterface {
818
+ // deviceType?: string;
819
+ // deviceProfileName?: string;
820
+ // buttonTemplate?: string;
821
+ // services?: string[];
822
+ // protocol?: string;
823
+ // userLocale?: string;
824
+ // lineAssociations: LineAssociation[] = [];
825
+ // speedDials: SpeedDial[] = [];
826
+ // constructor(extensionMobility: ExtensionMobilityInterface) {
827
+ // Object.assign(this, extensionMobility || {});
828
+ // this.speedDials.map(dial => new SpeedDial(dial, false));
829
+ // }
830
+ // getSavableData() {
831
+ // return getSavableData(this);
832
+ // }
833
+ // }
834
+ // export interface SingleNumberReachInterface {
835
+ // remoteDestinationProfileName: string;
836
+ // remoteDestinations?: RemoteDestinationInterface[];
837
+ // devicePool?: string;
838
+ // css?: string;
839
+ // rerouteCss?: string;
840
+ // }
841
+ // export interface RemoteDestinationInterface {
842
+ // name: string;
843
+ // destination: string;
844
+ // answerTooSoonTimer: number;
845
+ // answerTooLateTimer: number;
846
+ // delayBeforeRingingCell: number;
847
+ // lineAssociations: LineDirectoryInterface[];
848
+ // snrVoicemailPolicy?: string;
849
+ // enableMoveToMobile?: boolean;
850
+ // ringSchedule?: RingScheduleInterface;
851
+ // todError?: boolean;
852
+ // enableSingleNumberReach?: boolean;
853
+ // }
854
+ // export interface SingleNumberReachInterface {
855
+ // remoteDestinationProfileName: string;
856
+ // remoteDestinations?: RemoteDestinationInterface[];
857
+ // devicePool?: string;
858
+ // css?: string;
859
+ // rerouteCss?: string;
860
+ // }
861
+ class Voicemail {
862
+ constructor(vm) {
863
+ this.extension = '';
864
+ this.vmUserTemplate = '';
865
+ this.emailAddress = '';
866
+ this.greetings = [];
867
+ this.pin = '';
868
+ // non-savable data
869
+ this.changeExtensionByNewLine = 0;
870
+ if (vm && vm.extension) {
871
+ Object.assign(this, vm);
872
+ if (this.extension && this.extension.startsWith('+')) {
873
+ this.extension = '\\' + this.extension;
874
+ }
875
+ if (this.extension) {
876
+ // this.notificationDevices = this.initDevices();
877
+ // this.greetings = !this.greetings ? [] : this.greetings.map(greetings => new GreetingDetail(greetings));
878
+ }
879
+ }
880
+ else {
881
+ this.extension = '';
882
+ this.vmUserTemplate = '';
883
+ }
884
+ }
885
+ getSavableData() {
886
+ const nonSavableData = ['vmMailbox', 'notificationDevices', 'changeExtensionByNewLine'];
887
+ return getSavableData(this, nonSavableData);
888
+ }
889
+ }
890
+
891
+ const ENTITY_CHANGE_TYPE = {
892
+ ADDED: 'added',
893
+ UPDATED: 'updated',
894
+ EXISTING: 'existing',
895
+ REMOVED: 'removed',
896
+ };
897
+ function deepClone(value) {
898
+ return JSON.parse(JSON.stringify(value));
899
+ }
900
+ function toApiBooleanString(value) {
901
+ if (value === true || value === 'true') {
902
+ return 'true';
903
+ }
904
+ if (value === false || value === 'false') {
905
+ return 'false';
906
+ }
907
+ return value == null || value === '' ? '' : String(value);
908
+ }
909
+ function toApiStringValue(value) {
910
+ if (value === true) {
911
+ return 'true';
912
+ }
913
+ if (value === false) {
914
+ return 'false';
915
+ }
916
+ return value == null ? '' : String(value);
917
+ }
918
+ function normalizeCallInfoDisplay(callInfoDisplay) {
919
+ if (!callInfoDisplay) {
920
+ return null;
921
+ }
922
+ if (typeof callInfoDisplay === 'string') {
923
+ try {
924
+ const parsed = JSON.parse(callInfoDisplay);
925
+ return normalizeCallInfoDisplay(parsed);
926
+ }
927
+ catch (_a) {
928
+ return null;
929
+ }
930
+ }
931
+ if (typeof callInfoDisplay !== 'object') {
932
+ return null;
933
+ }
934
+ const source = callInfoDisplay;
935
+ return {
936
+ callerName: source['callerName'] != null ? toApiBooleanString(source['callerName']) : null,
937
+ callerNumber: source['callerNumber'] != null ? toApiBooleanString(source['callerNumber']) : null,
938
+ redirectedNumber: source['redirectedNumber'] != null ? toApiBooleanString(source['redirectedNumber']) : null,
939
+ dialedNumber: source['dialedNumber'] != null ? toApiBooleanString(source['dialedNumber']) : null,
940
+ };
941
+ }
942
+ function normalizeDidPattern(didPattern, line, directoryNumber) {
943
+ var _a;
944
+ if (didPattern && typeof didPattern === 'object') {
945
+ return didPattern;
946
+ }
947
+ if (typeof didPattern === 'string' && didPattern.trim()) {
948
+ return { calledPartyTransformationMask: didPattern };
949
+ }
950
+ const dn = directoryNumber || ((_a = line === null || line === void 0 ? void 0 : line.directoryNumber) === null || _a === void 0 ? void 0 : _a.directoryNumber);
951
+ if (dn) {
952
+ return { calledPartyTransformationMask: dn };
953
+ }
954
+ return null;
955
+ }
956
+ function normalizeDirectoryNumber(directoryNumber) {
957
+ var _a, _b, _c;
958
+ const { displayValue: _displayValue } = directoryNumber, rest = __rest(directoryNumber, ["displayValue"]);
959
+ return {
960
+ directoryNumber: (_a = rest.directoryNumber) !== null && _a !== void 0 ? _a : '',
961
+ routePartitionName: (_b = rest.routePartitionName) !== null && _b !== void 0 ? _b : '',
962
+ templateDirectoryNumber: rest.templateDirectoryNumber,
963
+ pkid: rest.pkid || null,
964
+ dnType: rest.dnType || null,
965
+ subType: (_c = rest.subType) !== null && _c !== void 0 ? _c : null,
966
+ };
967
+ }
968
+ function prepareLineAssociation(association, line) {
969
+ var _a, _b, _c, _d;
970
+ const prepared = deepClone(association);
971
+ const lineDn = line === null || line === void 0 ? void 0 : line.directoryNumber;
972
+ if (lineDn) {
973
+ prepared.directoryNumber = Object.assign(Object.assign({}, prepared.directoryNumber), { directoryNumber: lineDn.directoryNumber || '', routePartitionName: lineDn.routePartitionName || '', templateDirectoryNumber: (_a = lineDn.templateDirectoryNumber) !== null && _a !== void 0 ? _a : (_b = prepared.directoryNumber) === null || _b === void 0 ? void 0 : _b.templateDirectoryNumber });
974
+ }
975
+ prepared.directoryNumber = normalizeDirectoryNumber(prepared.directoryNumber);
976
+ prepared.entityChangeType = prepared.entityChangeType || ENTITY_CHANGE_TYPE.ADDED;
977
+ prepared.logMissedCall = toApiBooleanString(prepared.logMissedCall) || 'false';
978
+ prepared.callInfoDisplay = normalizeCallInfoDisplay(prepared.callInfoDisplay);
979
+ prepared.didPattern = normalizeDidPattern(prepared.didPattern, line, (_c = prepared.directoryNumber) === null || _c === void 0 ? void 0 : _c.directoryNumber);
980
+ prepared.visualMWI = toApiStringValue(prepared.visualMWI);
981
+ prepared.audibleMWI = toApiStringValue(prepared.audibleMWI);
982
+ prepared.associated = (_d = prepared.associated) !== null && _d !== void 0 ? _d : true;
983
+ return prepared;
984
+ }
985
+ function prepareLine(line) {
986
+ const prepared = deepClone(line);
987
+ prepared.entityChangeType = prepared.entityChangeType || ENTITY_CHANGE_TYPE.ADDED;
988
+ if (prepared.directoryNumber) {
989
+ prepared.directoryNumber = normalizeDirectoryNumber(prepared.directoryNumber);
990
+ }
991
+ return prepared;
992
+ }
993
+ function syncDeviceLineAssociations(device, lines) {
994
+ device.lineAssociations = (device.lineAssociations || []).map((association, index) => prepareLineAssociation(association, lines[index]));
995
+ }
996
+ function prepareDeviceForSave(device, userId, lines, deviceName) {
997
+ var _a;
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 = (_a = prepared.createDeviceMode) !== null && _a !== void 0 ? _a : false;
1004
+ if (prepared.extraOptions) {
1005
+ prepared.extraOptions.mobilityUserId = userId;
1006
+ }
1007
+ syncDeviceLineAssociations(prepared, lines);
1008
+ return prepared;
1009
+ }
1010
+ function resolvePrimaryLineReference(user) {
1011
+ var _a, _b, _c, _d, _e, _f;
1012
+ const firstDeviceAssociation = (_d = (_c = (_b = (_a = user.devices) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.lineAssociations) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.directoryNumber;
1013
+ if (firstDeviceAssociation) {
1014
+ return firstDeviceAssociation;
1015
+ }
1016
+ const firstLineDn = (_f = (_e = user.lines) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.directoryNumber;
1017
+ return firstLineDn !== null && firstLineDn !== void 0 ? firstLineDn : null;
1018
+ }
1019
+ function buildSavableEndUser(endUser, lines, devices, deviceProfiles, form, options = {}) {
1020
+ const user = deepClone(endUser);
1021
+ user.userid = form.userId || user.userid || '';
1022
+ user.firstName = form.firstName || user.firstName || '';
1023
+ user.lastName = form.lastName || user.lastName || '';
1024
+ user.email = form.email || user.email || '';
1025
+ user.createUserMode = false;
1026
+ user.lines = (lines || []).map(line => prepareLine(line));
1027
+ user.devices = (devices || []).map((device, index) => { var _a, _b, _c, _d; return prepareDeviceForSave(device, user.userid || '', user.lines, (_d = (_c = (_b = (_a = options.resolveDeviceName) === null || _a === void 0 ? void 0 : _a.call(options, index, device)) !== null && _b !== void 0 ? _b : device.name) !== null && _c !== void 0 ? _c : device.newName) !== null && _d !== void 0 ? _d : ''); });
1028
+ user.deviceProfiles = (deviceProfiles || []).map((profile, index) => { var _a, _b, _c, _d; return prepareDeviceForSave(profile, user.userid || '', user.lines, (_d = (_c = (_b = (_a = options.resolveDeviceProfileName) === null || _a === void 0 ? void 0 : _a.call(options, index, profile)) !== null && _b !== void 0 ? _b : profile.name) !== null && _c !== void 0 ? _c : profile.newName) !== null && _d !== void 0 ? _d : ''); });
1029
+ user.primaryLineReference = resolvePrimaryLineReference(user);
1030
+ const snr = user.singleNumberReach;
1031
+ if (snr && !snr.remoteDestinationProfileName) {
1032
+ user.singleNumberReach = null;
1033
+ }
1034
+ return user;
1035
+ }
1036
+
1037
+ /** Matches device types like `Cisco 8851`. */
1038
+ const CISCO_DIGIT_DEVICE_TYPE_PATTERN = /^Cisco\s+\d+$/i;
1039
+ const DEFAULT_SEP_DEVICE_PREFIX = 'SEP';
1040
+ function applyDefaultDevicePrefixIfMissing(device) {
1041
+ var _a, _b, _c;
1042
+ if ((_a = device.prefix) === null || _a === void 0 ? void 0 : _a.trim()) {
1043
+ return;
1044
+ }
1045
+ const deviceType = (_c = (_b = device.deviceType) === null || _b === void 0 ? void 0 : _b.trim()) !== null && _c !== void 0 ? _c : '';
1046
+ if (CISCO_DIGIT_DEVICE_TYPE_PATTERN.test(deviceType)) {
1047
+ device.prefix = DEFAULT_SEP_DEVICE_PREFIX;
1048
+ }
1049
+ }
1050
+
1051
+ /**
1052
+ * Strips a leading device-prefix group from `deviceNameRegex`, returning the pattern
1053
+ * to validate the name field value (without matPrefix).
1054
+ *
1055
+ * - `([sS][eE][pP]|BAT)[0-9a-fA-F]{12}` → `[0-9a-fA-F]{12}`
1056
+ * - `[a-zA-Z0-9]{1,15}` → `[a-zA-Z0-9]{1,15}` (unchanged)
1057
+ */
1058
+ function parseDeviceNameRegexBody(deviceNameRegex) {
1059
+ var _a;
1060
+ const fullRegex = (_a = deviceNameRegex === null || deviceNameRegex === void 0 ? void 0 : deviceNameRegex.trim()) !== null && _a !== void 0 ? _a : '';
1061
+ if (!fullRegex) {
1062
+ return '';
1063
+ }
1064
+ return stripLeadingPrefixGroup(fullRegex);
1065
+ }
1066
+ function stripLeadingPrefixGroup(regex) {
1067
+ var _a, _b;
1068
+ const parenMatch = regex.match(/^(\(.+?\))(.+)$/s);
1069
+ if ((_a = parenMatch === null || parenMatch === void 0 ? void 0 : parenMatch[2]) === null || _a === void 0 ? void 0 : _a.trim()) {
1070
+ return parenMatch[2];
1071
+ }
1072
+ const literalMatch = regex.match(/^([A-Za-z]+)(\[.+\])$/s);
1073
+ if ((_b = literalMatch === null || literalMatch === void 0 ? void 0 : literalMatch[2]) === null || _b === void 0 ? void 0 : _b.trim()) {
1074
+ return literalMatch[2];
1075
+ }
1076
+ return regex;
1077
+ }
1078
+
393
1079
  class UserCreationWizardService {
1080
+ get currentSite() {
1081
+ return this._currentSite;
1082
+ }
1083
+ get firstLineRoutePartition() {
1084
+ var _a, _b, _c;
1085
+ return (_c = (_b = (_a = this.lines[0]) === null || _a === void 0 ? void 0 : _a.directoryNumber) === null || _b === void 0 ? void 0 : _b.routePartitionName) !== null && _c !== void 0 ? _c : '';
1086
+ }
1087
+ get siteDefaultRoutePartition() {
1088
+ var _a;
1089
+ return ((_a = this.siteDefaults) === null || _a === void 0 ? void 0 : _a.routePartition) || '';
1090
+ }
1091
+ get routePartitionNamesList() {
1092
+ return this.siteDefaults ? this.siteDefaults.routePartitionFilter : [];
1093
+ }
394
1094
  constructor() {
395
- this.api = inject(UserCreationApiService);
1095
+ this.userCreationApiService = inject(UserCreationApiService);
396
1096
  this.ldapTableColumns = ['userId', 'firstName', 'lastName', 'email', 'add'];
397
1097
  this.userCreationTypes = ['CUCM', 'MT'];
1098
+ this.template = null;
1099
+ this.endUser = null;
1100
+ this.lines = [];
1101
+ this.devices = [];
1102
+ this.deviceProfiles = [];
1103
+ this.templateLinesSnapshot = null;
1104
+ this._currentSite = null;
398
1105
  this.siteOptions = [];
399
1106
  this.templateOptions = [];
400
1107
  this.lineOptions = [];
@@ -404,40 +1111,92 @@ class UserCreationWizardService {
404
1111
  this.overviewUsers = [];
405
1112
  this.overviewLines = [];
406
1113
  this.overviewDevices = [];
1114
+ this.overviewDeviceProfiles = [];
1115
+ this.userDetailsFormValue = null;
407
1116
  this.userDetailsForm = {
408
1117
  userId: '',
409
1118
  firstName: '',
410
1119
  lastName: '',
411
- email: ''
1120
+ email: '',
412
1121
  };
413
1122
  this.lineSelections = [];
414
1123
  this.deviceEntries = [];
1124
+ this.availableNumbers = [];
1125
+ this.deviceTypes = [];
1126
+ this.siteDefaults = null;
1127
+ this.originalSiteDefaults = null;
1128
+ this.templateLines = [];
1129
+ this.templateDevices = [];
1130
+ this.templateUserDetails = {};
415
1131
  this.selectedSite = null;
416
- this.selectedTemplate = null;
1132
+ this.selectedTemplateName = null;
1133
+ this.selectedTemplateId = null;
417
1134
  this.selectedUserCreationType = 'CUCM';
418
- this.addedLdapUserIds = new Set();
419
- this.loadPlaceholderData();
1135
+ this.availableDidPatternsMappedToDn = {};
1136
+ this.deviceDefaultsLoadedSubject = new Subject();
1137
+ this.deviceDefaultsLoaded$ = this.deviceDefaultsLoadedSubject.asObservable();
1138
+ this.selectedLdapUser = null;
1139
+ this.ldapUsersTotal = 0;
1140
+ // this.loadPlaceholderData();
1141
+ }
1142
+ get isLdapIntegrated() {
1143
+ var _a;
1144
+ return !!((_a = this.endUser) === null || _a === void 0 ? void 0 : _a.ldapIntegrated);
1145
+ }
1146
+ selectLdapUser(user) {
1147
+ var _a, _b, _c, _d, _e, _f;
1148
+ this.selectedLdapUser = user;
1149
+ if (this.endUser) {
1150
+ this.endUser.ldapIntegrated = true;
1151
+ this.endUser.userid = user.userid;
1152
+ this.endUser.firstName = (_a = user.firstName) !== null && _a !== void 0 ? _a : '';
1153
+ this.endUser.lastName = (_b = user.lastName) !== null && _b !== void 0 ? _b : '';
1154
+ this.endUser.email = (_c = user.email) !== null && _c !== void 0 ? _c : '';
1155
+ }
1156
+ this.userDetailsForm = {
1157
+ userId: user.userid,
1158
+ firstName: (_d = user.firstName) !== null && _d !== void 0 ? _d : '',
1159
+ lastName: (_e = user.lastName) !== null && _e !== void 0 ? _e : '',
1160
+ email: (_f = user.email) !== null && _f !== void 0 ? _f : '',
1161
+ };
1162
+ this.rebuildOverviewUsers();
420
1163
  }
421
- addLdapUser(row) {
1164
+ clearLdapUserSelection() {
1165
+ this.selectedLdapUser = null;
1166
+ if (this.endUser) {
1167
+ this.endUser.ldapIntegrated = false;
1168
+ this.endUser.userid = '';
1169
+ this.endUser.firstName = '';
1170
+ this.endUser.lastName = '';
1171
+ this.endUser.email = '';
1172
+ }
422
1173
  this.userDetailsForm = {
423
- userId: row.userId,
424
- firstName: row.firstName,
425
- lastName: row.lastName,
426
- email: row.email
1174
+ userId: '',
1175
+ firstName: '',
1176
+ lastName: '',
1177
+ email: '',
427
1178
  };
428
- this.addedLdapUserIds.add(row.userId);
429
1179
  this.rebuildOverviewUsers();
430
1180
  }
431
- isLdapUserAdded(row) {
432
- return this.addedLdapUserIds.has(row.userId);
1181
+ isLdapUserRowSelected(row) {
1182
+ var _a;
1183
+ return ((_a = this.selectedLdapUser) === null || _a === void 0 ? void 0 : _a.userid) === row.userid;
1184
+ }
1185
+ setLdapUsersResult(users, total) {
1186
+ this.ldapUsers = users;
1187
+ this.ldapUsersTotal = total;
433
1188
  }
434
1189
  setSelectedSite(site) {
435
- this.selectedSite = site;
1190
+ this.selectedSite = site || null;
436
1191
  }
437
1192
  setSelectedTemplate(template) {
438
- this.selectedTemplate = template;
1193
+ this.selectedTemplateName = (template === null || template === void 0 ? void 0 : template.name) || null;
1194
+ this.selectedTemplateId = (template === null || template === void 0 ? void 0 : template.id) || null;
439
1195
  this.rebuildOverviewUsers();
440
1196
  }
1197
+ setCurrentSite(site) {
1198
+ this._currentSite = site;
1199
+ }
441
1200
  resetTemplateDrivenData() {
442
1201
  this.lineOptions = [];
443
1202
  this.routePartitionOptions = [];
@@ -448,84 +1207,172 @@ class UserCreationWizardService {
448
1207
  this.rebuildOverviewDevices();
449
1208
  }
450
1209
  applyTemplateTokenPayload(payload) {
451
- const template = this.extractTemplateFromTokenPayload(payload);
452
- const endUser = (template === null || template === void 0 ? void 0 : template.endUser) || {};
453
- const linesFromTemplate = Array.isArray(endUser.lines) ? endUser.lines : [];
454
- const devicesFromTemplate = Array.isArray(endUser.devices) ? endUser.devices : [];
1210
+ var _a;
1211
+ this.template = this.extractTemplateFromTokenPayload(payload);
1212
+ this.endUser = new EndUser((_a = this.template) === null || _a === void 0 ? void 0 : _a.endUser);
1213
+ this.lines = this.endUser && Array.isArray(this.endUser.lines) ? this.endUser.lines : [];
1214
+ this.devices = this.endUser && Array.isArray(this.endUser.devices) ? this.endUser.devices : [];
1215
+ this.deviceProfiles = this.endUser && Array.isArray(this.endUser.deviceProfiles) ? this.endUser.deviceProfiles : [];
1216
+ this.initTemplateDnsNamesForLines();
1217
+ // this.userDetailsForm = {
1218
+ // userId: this.valueToString(this.endUser?.userid ?? ''),
1219
+ // firstName: this.valueToString(this.endUser?.firstName ?? ''),
1220
+ // lastName: this.valueToString(this.endUser?.lastName ?? ''),
1221
+ // email: this.valueToString(this.endUser?.email ?? '')
1222
+ // };
1223
+ // const mappedLineOptions: LineOption[] = linesFromTemplate
1224
+ // .map(line => ({
1225
+ // number: this.valueToString(line?.directoryNumber?.directoryNumber),
1226
+ // did: this.valueToString(line?.didPatterns?.[0]?.pattern || line?.directoryNumber?.directoryNumber),
1227
+ // css: this.valueToString(
1228
+ // typeof line?.callingSearchSpace === 'string'
1229
+ // ? line.callingSearchSpace
1230
+ // : line?.callingSearchSpace?.name
1231
+ // ),
1232
+ // description: this.valueToString(line?.description)
1233
+ // }))
1234
+ // .filter(line => line.number.trim().length > 0);
1235
+ this.devices.forEach(device => {
1236
+ this.initDeviceWithSiteInfo(device);
1237
+ applyDefaultDevicePrefixIfMissing(device);
1238
+ });
1239
+ this.deviceProfiles.forEach(device => this.initDeviceWithSiteInfo(device));
1240
+ this.lines.forEach(line => this.initLineWithSiteInfo(line));
1241
+ this.captureTemplateLinesSnapshot();
1242
+ if (this.selectedSite) {
1243
+ this.loadDeviceDefaultsForDevices(this.selectedSite).subscribe();
1244
+ }
1245
+ // if (mappedLineOptions.length) {
1246
+ // this.lineOptions = this.uniqueByNumber(mappedLineOptions);
1247
+ // this.lineSelections = this.lineOptions.map(line => ({
1248
+ // lineNumber: line.number,
1249
+ // routePartitionName: linesFromTemplate.find(
1250
+ // source => (source?.directoryNumber?.directoryNumber || '') === line.number
1251
+ // )?.directoryNumber?.routePartitionName || null
1252
+ // }));
1253
+ // } else {
1254
+ // const lineAssociations = devicesFromTemplate.flatMap(device => device.lineAssociations || []);
1255
+ // const associatedLineOptions: LineOption[] = lineAssociations
1256
+ // .map(association => {
1257
+ // const number = association?.directoryNumber?.directoryNumber || '';
1258
+ // return {
1259
+ // number,
1260
+ // did: number,
1261
+ // css: '',
1262
+ // description: ''
1263
+ // };
1264
+ // })
1265
+ // .filter(line => line.number.trim().length > 0);
1266
+ // this.lineOptions = this.uniqueByNumber(associatedLineOptions);
1267
+ // this.lineSelections = this.lineOptions.map(line => ({
1268
+ // lineNumber: line.number,
1269
+ // routePartitionName: lineAssociations.find(
1270
+ // source => (source?.directoryNumber?.directoryNumber || '') === line.number
1271
+ // )?.directoryNumber?.routePartitionName || null
1272
+ // }));
1273
+ // this.templateLines.forEach((line: any) => this.initLineWithSiteInfo(line));
1274
+ // this.initTemplateDnsNamesForLines(this.templateLines);
1275
+ // }
1276
+ // const routePartitions = this.lineSelections
1277
+ // .map(line => line.routePartitionName)
1278
+ // .filter((value): value is string => !!value && value.trim().length > 0);
1279
+ // this.routePartitionOptions = this.uniqueStrings(routePartitions);
1280
+ // this.deviceEntries = devicesFromTemplate.map(device => ({
1281
+ // deviceType: this.valueToString(device.deviceType),
1282
+ // protocol: this.valueToString(device.protocol),
1283
+ // buttonTemplate: this.valueToString(device.buttonTemplate),
1284
+ // name: this.valueToString(device.name)
1285
+ // }));
1286
+ // this.deviceRows = this.deviceEntries.map((_, index) => index + 1);
1287
+ // this.rebuildOverviewUsers();
1288
+ // this.rebuildOverviewLines();
1289
+ // this.rebuildOverviewDevices();
1290
+ }
1291
+ setSelectedUserCreationType(type) {
1292
+ this.selectedUserCreationType = type;
1293
+ }
1294
+ resetUserDetailsStepState() {
1295
+ this.userDetailsFormValue = null;
455
1296
  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)
1297
+ userId: '',
1298
+ firstName: '',
1299
+ lastName: '',
1300
+ email: '',
460
1301
  };
461
- const mappedLineOptions = linesFromTemplate
462
- .map(line => {
463
- var _a, _b, _c, _d, _e;
464
- return ({
465
- number: this.valueToString((_a = line === null || line === void 0 ? void 0 : line.directoryNumber) === null || _a === void 0 ? void 0 : _a.directoryNumber),
466
- did: this.valueToString(((_c = (_b = line === null || line === void 0 ? void 0 : line.didPatterns) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.pattern) || ((_d = line === null || line === void 0 ? void 0 : line.directoryNumber) === null || _d === void 0 ? void 0 : _d.directoryNumber)),
467
- css: this.valueToString(typeof (line === null || line === void 0 ? void 0 : line.callingSearchSpace) === 'string'
468
- ? line.callingSearchSpace
469
- : (_e = line === null || line === void 0 ? void 0 : line.callingSearchSpace) === null || _e === void 0 ? void 0 : _e.name),
470
- description: this.valueToString(line === null || line === void 0 ? void 0 : line.description)
471
- });
472
- })
473
- .filter(line => line.number.trim().length > 0);
474
- if (mappedLineOptions.length) {
475
- this.lineOptions = this.uniqueByNumber(mappedLineOptions);
476
- this.lineSelections = this.lineOptions.map(line => {
477
- var _a, _b;
478
- return ({
479
- lineNumber: line.number,
480
- routePartitionName: ((_b = (_a = linesFromTemplate.find(source => { var _a; return (((_a = source === null || source === void 0 ? void 0 : source.directoryNumber) === null || _a === void 0 ? void 0 : _a.directoryNumber) || '') === line.number; })) === null || _a === void 0 ? void 0 : _a.directoryNumber) === null || _b === void 0 ? void 0 : _b.routePartitionName) || null
481
- });
482
- });
1302
+ this.selectedLdapUser = null;
1303
+ this.ldapUsers = [];
1304
+ this.ldapUsersTotal = 0;
1305
+ if (this.templateLinesSnapshot) {
1306
+ this.lines = JSON.parse(JSON.stringify(this.templateLinesSnapshot));
483
1307
  }
484
- else {
485
- const lineAssociations = devicesFromTemplate.flatMap(device => device.lineAssociations || []);
486
- const associatedLineOptions = lineAssociations
487
- .map(association => {
488
- var _a;
489
- const number = ((_a = association === null || association === void 0 ? void 0 : association.directoryNumber) === null || _a === void 0 ? void 0 : _a.directoryNumber) || '';
490
- return {
491
- number,
492
- did: number,
493
- css: '',
494
- description: ''
495
- };
496
- })
497
- .filter(line => line.number.trim().length > 0);
498
- this.lineOptions = this.uniqueByNumber(associatedLineOptions);
499
- this.lineSelections = this.lineOptions.map(line => {
500
- var _a, _b;
501
- return ({
502
- lineNumber: line.number,
503
- routePartitionName: ((_b = (_a = lineAssociations.find(source => { var _a; return (((_a = source === null || source === void 0 ? void 0 : source.directoryNumber) === null || _a === void 0 ? void 0 : _a.directoryNumber) || '') === line.number; })) === null || _a === void 0 ? void 0 : _a.directoryNumber) === null || _b === void 0 ? void 0 : _b.routePartitionName) || null
504
- });
505
- });
1308
+ this.devices.forEach(device => {
1309
+ device.name = '';
1310
+ });
1311
+ this.deviceProfiles.forEach(profile => {
1312
+ profile.name = '';
1313
+ });
1314
+ if (this.endUser) {
1315
+ this.endUser.userid = '';
1316
+ this.endUser.firstName = '';
1317
+ this.endUser.lastName = '';
1318
+ this.endUser.email = '';
1319
+ this.endUser.ldapIntegrated = false;
1320
+ this.endUser.lines = this.lines;
506
1321
  }
507
- const routePartitions = this.lineSelections
508
- .map(line => line.routePartitionName)
509
- .filter((value) => !!value && value.trim().length > 0);
510
- this.routePartitionOptions = this.uniqueStrings(routePartitions);
511
- this.deviceEntries = devicesFromTemplate.map(device => ({
512
- deviceType: this.valueToString(device.deviceType),
513
- protocol: this.valueToString(device.protocol),
514
- buttonTemplate: this.valueToString(device.buttonTemplate),
515
- name: this.valueToString(device.name)
516
- }));
517
- this.deviceRows = this.deviceEntries.map((_, index) => index + 1);
518
- this.rebuildOverviewUsers();
1322
+ this.overviewUsers = [];
519
1323
  this.rebuildOverviewLines();
520
1324
  this.rebuildOverviewDevices();
1325
+ this.rebuildOverviewDeviceProfiles();
521
1326
  }
522
- setSelectedUserCreationType(type) {
523
- this.selectedUserCreationType = type;
1327
+ captureTemplateLinesSnapshot() {
1328
+ this.templateLinesSnapshot = JSON.parse(JSON.stringify(this.lines));
524
1329
  }
525
1330
  setUserDetailsField(field, value) {
526
1331
  this.userDetailsForm = Object.assign(Object.assign({}, this.userDetailsForm), { [field]: value });
527
1332
  this.rebuildOverviewUsers();
528
1333
  }
1334
+ applyUserDetailsFormValue(formValue) {
1335
+ var _a, _b, _c;
1336
+ this.userDetailsFormValue = formValue;
1337
+ this.userDetailsForm = {
1338
+ userId: formValue.userId || '',
1339
+ firstName: formValue.firstName || '',
1340
+ lastName: formValue.lastName || '',
1341
+ email: formValue.email || '',
1342
+ };
1343
+ (_a = formValue.lines) === null || _a === void 0 ? void 0 : _a.forEach((lineValue, index) => {
1344
+ const line = this.lines[index];
1345
+ if (!(line === null || line === void 0 ? void 0 : line.directoryNumber)) {
1346
+ return;
1347
+ }
1348
+ line.directoryNumber.directoryNumber = lineValue.number || '';
1349
+ line.directoryNumber.routePartitionName = lineValue.routePartition || '';
1350
+ });
1351
+ (_b = formValue.devices) === null || _b === void 0 ? void 0 : _b.forEach((deviceValue, index) => {
1352
+ const device = this.devices[index];
1353
+ if (!device) {
1354
+ return;
1355
+ }
1356
+ device.name = deviceValue.name || '';
1357
+ });
1358
+ (_c = formValue.deviceProfiles) === null || _c === void 0 ? void 0 : _c.forEach((profileValue, index) => {
1359
+ const profile = this.deviceProfiles[index];
1360
+ if (!profile) {
1361
+ return;
1362
+ }
1363
+ profile.name = profileValue.name || '';
1364
+ });
1365
+ if (this.endUser) {
1366
+ this.endUser.userid = formValue.userId || '';
1367
+ this.endUser.firstName = formValue.firstName || '';
1368
+ this.endUser.lastName = formValue.lastName || '';
1369
+ this.endUser.email = formValue.email || '';
1370
+ }
1371
+ this.rebuildOverviewUsers();
1372
+ this.rebuildOverviewLines();
1373
+ this.rebuildOverviewDevices();
1374
+ this.rebuildOverviewDeviceProfiles();
1375
+ }
529
1376
  setLineSelection(index, lineNumber) {
530
1377
  if (!this.lineSelections[index]) {
531
1378
  return;
@@ -567,64 +1414,86 @@ class UserCreationWizardService {
567
1414
  }
568
1415
  return entry.name || '';
569
1416
  }
570
- // Placeholder bootstrap until backend APIs are connected.
571
- loadPlaceholderData() {
572
- var _a;
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 = (_a = this.selectedTemplate) !== null && _a !== void 0 ? _a : 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
+ var _a;
1459
+ const device = isProfile ? this.deviceProfiles[deviceIndex] : this.devices[deviceIndex];
1460
+ const prefix = (_a = device === null || device === void 0 ? void 0 : device.prefix) === null || _a === void 0 ? void 0 : _a.trim();
1461
+ return prefix || null;
1462
+ }
1463
+ getDeviceNameValidationCaption(deviceIndex, isProfile = false) {
1464
+ var _a;
1465
+ const device = isProfile ? this.deviceProfiles[deviceIndex] : this.devices[deviceIndex];
1466
+ return (device === null || device === void 0 ? void 0 : device.nameValidationCaption) || ((_a = device === null || device === void 0 ? void 0 : device.deviceDefaults) === null || _a === void 0 ? void 0 : _a.deviceNameExplained) || '';
1467
+ }
1468
+ getDeviceNameValidationOptions(deviceIndex, isProfile = false) {
1469
+ var _a, _b;
1470
+ const device = isProfile ? this.deviceProfiles[deviceIndex] : this.devices[deviceIndex];
1471
+ const regex = ((_a = device === null || device === void 0 ? void 0 : device.nameValidationRegex) === null || _a === void 0 ? void 0 : _a.trim()) ||
1472
+ parseDeviceNameRegexBody((_b = device === null || device === void 0 ? void 0 : device.deviceDefaults) === null || _b === void 0 ? void 0 : _b.deviceNameRegex);
1473
+ if (!regex) {
1474
+ return null;
1475
+ }
1476
+ return {
1477
+ regex,
1478
+ caption: this.getDeviceNameValidationCaption(deviceIndex, isProfile),
1479
+ };
1480
+ }
1481
+ getNumberRange(siteId, routePartition) {
1482
+ this.availableDidPatternsMappedToDn = {};
1483
+ const pageSize = 9999;
1484
+ const params = { dntype: DnRangeType.extension, routepartition: routePartition, size: pageSize, page: 0 };
1485
+ this.availableNumbers = [];
1486
+ return this.userCreationApiService.getAvailableDnInRanges(siteId, params)
1487
+ .pipe(map((res) => {
1488
+ res.availableNumberList.forEach((availableNumber) => {
1489
+ this.setAvailableDidMappedToDn(availableNumber);
1490
+ this.availableNumbers = [...this.availableNumbers, ...this.getUnwrapNumberRange(availableNumber)];
1491
+ });
1492
+ }));
1493
+ // .pipe(this.handleError(true, false));
625
1494
  }
626
1495
  rebuildOverviewUsers() {
627
- const userTemplate = this.selectedTemplate || '';
1496
+ const userTemplate = this.selectedTemplateName || '';
628
1497
  const hasUserData = Object.values(this.userDetailsForm).some(value => value.trim().length > 0);
629
1498
  this.overviewUsers = hasUserData
630
1499
  ? [{
@@ -637,6 +1506,24 @@ class UserCreationWizardService {
637
1506
  : [];
638
1507
  }
639
1508
  rebuildOverviewLines() {
1509
+ var _a;
1510
+ const formLines = (_a = this.userDetailsFormValue) === null || _a === void 0 ? void 0 : _a.lines;
1511
+ if (formLines === null || formLines === void 0 ? void 0 : formLines.length) {
1512
+ this.overviewLines = formLines
1513
+ .filter(line => { var _a; return !!((_a = line === null || line === void 0 ? void 0 : line.number) === null || _a === void 0 ? void 0 : _a.trim()); })
1514
+ .map((lineValue, index) => {
1515
+ const templateLine = this.lines[index];
1516
+ const css = this.valueToString(templateLine === null || templateLine === void 0 ? void 0 : templateLine.callingSearchSpace);
1517
+ return {
1518
+ number: lineValue.number,
1519
+ did: lineValue.lineNumber || lineValue.number,
1520
+ routePartitionName: lineValue.routePartition || '',
1521
+ css,
1522
+ description: this.valueToString(templateLine === null || templateLine === void 0 ? void 0 : templateLine.description),
1523
+ };
1524
+ });
1525
+ return;
1526
+ }
640
1527
  this.overviewLines = this.lineSelections
641
1528
  .map(selection => {
642
1529
  if (!(selection === null || selection === void 0 ? void 0 : selection.lineNumber)) {
@@ -657,7 +1544,20 @@ class UserCreationWizardService {
657
1544
  .filter((line) => !!line);
658
1545
  }
659
1546
  rebuildOverviewDevices() {
1547
+ var _a;
660
1548
  const selectedLineNumbers = this.overviewLines.map(line => line.number).join(', ');
1549
+ const formDevices = (_a = this.userDetailsFormValue) === null || _a === void 0 ? void 0 : _a.devices;
1550
+ if (formDevices === null || formDevices === void 0 ? void 0 : formDevices.length) {
1551
+ this.overviewDevices = formDevices
1552
+ .filter(device => { var _a, _b; return !!((_a = device.deviceType) === null || _a === void 0 ? void 0 : _a.trim()) || !!((_b = device.name) === null || _b === void 0 ? void 0 : _b.trim()); })
1553
+ .map(device => ({
1554
+ name: device.name || '',
1555
+ deviceType: device.deviceType || '',
1556
+ lines: selectedLineNumbers,
1557
+ description: `${device.protocol || ''} / ${device.buttonTemplate || ''}`.trim(),
1558
+ }));
1559
+ return;
1560
+ }
661
1561
  this.overviewDevices = this.deviceEntries
662
1562
  .map((device, index) => ({
663
1563
  device,
@@ -671,6 +1571,23 @@ class UserCreationWizardService {
671
1571
  description: `${device.protocol} / ${device.buttonTemplate}`
672
1572
  }));
673
1573
  }
1574
+ rebuildOverviewDeviceProfiles() {
1575
+ var _a;
1576
+ const selectedLineNumbers = this.overviewLines.map(line => line.number).join(', ');
1577
+ const formProfiles = (_a = this.userDetailsFormValue) === null || _a === void 0 ? void 0 : _a.deviceProfiles;
1578
+ if (!(formProfiles === null || formProfiles === void 0 ? void 0 : formProfiles.length)) {
1579
+ this.overviewDeviceProfiles = [];
1580
+ return;
1581
+ }
1582
+ this.overviewDeviceProfiles = formProfiles
1583
+ .filter(profile => { var _a, _b; return !!((_a = profile.deviceType) === null || _a === void 0 ? void 0 : _a.trim()) || !!((_b = profile.name) === null || _b === void 0 ? void 0 : _b.trim()); })
1584
+ .map(profile => ({
1585
+ name: profile.name || '',
1586
+ deviceType: profile.deviceType || '',
1587
+ lines: selectedLineNumbers,
1588
+ description: `${profile.protocol || ''} / ${profile.buttonTemplate || ''}`.trim(),
1589
+ }));
1590
+ }
674
1591
  extractTemplateFromTokenPayload(payload) {
675
1592
  if (!payload || typeof payload !== 'object') {
676
1593
  return null;
@@ -697,10 +1614,253 @@ class UserCreationWizardService {
697
1614
  valueToString(value) {
698
1615
  return typeof value === 'string' ? value : '';
699
1616
  }
1617
+ getUnwrapNumberRange(availableNumber) {
1618
+ let unwrapNumberRange = this.unwrapNumberRange(availableNumber.phoneNumberRange.from, availableNumber.phoneNumberRange.to)
1619
+ .map((unwrappedNumber) => {
1620
+ const dn = availableNumber.phoneNumberRange.prefix + unwrappedNumber;
1621
+ let str = dn;
1622
+ if (this.availableDidPatternsMappedToDn[dn] && this.availableDidPatternsMappedToDn[dn].length > 0) {
1623
+ if (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] && this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 0) {
1624
+ str += ' DID: ' + (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 1 ? 'multiple' :
1625
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'][0]);
1626
+ }
1627
+ if (this.availableDidPatternsMappedToDn[dn][0]['vm']) {
1628
+ str += ' In Use - VM';
1629
+ }
1630
+ }
1631
+ return str;
1632
+ });
1633
+ unwrapNumberRange = unwrapNumberRange.filter((unwrappedNumber) => !availableNumber.usedNumbers.includes(unwrappedNumber));
1634
+ return unwrapNumberRange;
1635
+ }
1636
+ unwrapNumberRange(start, end) {
1637
+ const regExp = /(^0+)/;
1638
+ let leadingZeros = '';
1639
+ const matches = start.match(regExp);
1640
+ if (matches) {
1641
+ leadingZeros = matches[1];
1642
+ }
1643
+ const startNumeric = new Big(start);
1644
+ const endNumeric = new Big(end);
1645
+ return Array.from({ length: Number(endNumeric.minus(startNumeric).plus(new Big(1)).toFixed(0)) }, (v, k) => {
1646
+ const number = String(startNumeric.plus(new Big(k.toString())).toFixed(0));
1647
+ if ((leadingZeros + number).length > start.length) {
1648
+ leadingZeros = leadingZeros.substr(1);
1649
+ }
1650
+ return leadingZeros + number;
1651
+ });
1652
+ }
1653
+ setAvailableDidMappedToDn(availableNumber) {
1654
+ if (availableNumber.unUsedNumbersWithDids && availableNumber.unUsedNumbersWithDids.length) {
1655
+ availableNumber.unUsedNumbersWithDids.forEach((numberWithDids) => {
1656
+ const dn = numberWithDids['unUsedNumber'];
1657
+ this.availableDidPatternsMappedToDn[dn] = [{}];
1658
+ if (numberWithDids['translationPatternList'] && numberWithDids['translationPatternList'].length > 0) {
1659
+ this.availableDidPatternsMappedToDn[dn] = numberWithDids['translationPatternList'];
1660
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = [{}];
1661
+ if (numberWithDids['mappedDids'] && numberWithDids['mappedDids'].length > 0) {
1662
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = numberWithDids['mappedDids'];
1663
+ }
1664
+ }
1665
+ this.availableDidPatternsMappedToDn[dn][0]['vm'] = numberWithDids['vm'];
1666
+ });
1667
+ }
1668
+ }
700
1669
  // TODO: replace placeholders with real API integration.
701
1670
  loadDataFromApi() {
702
1671
  // this.api.getWizardBootstrapData().subscribe(...)
703
1672
  }
1673
+ initLineWithSiteInfo(line) {
1674
+ var _a, _b;
1675
+ line.directoryNumber.routePartitionName = ((_a = this.siteDefaults) === null || _a === void 0 ? void 0 : _a.routePartition) || '';
1676
+ let callingSearchSpaceVal = ((_b = this.siteDefaults) === null || _b === void 0 ? void 0 : _b.lineCss) || '';
1677
+ line.callingSearchSpace = callingSearchSpaceVal;
1678
+ }
1679
+ // private initTemplateDnsNamesForLines(userLines: TemplateLineLike[]): void {
1680
+ // const routePartition = this.siteDefaults?.routePartition || '';
1681
+ // if (userLines && userLines.length > 0) {
1682
+ // userLines.forEach((line, index) => {
1683
+ // line && line.directoryNumber && (line.directoryNumber.templateDirectoryNumber = line.directoryNumber.directoryNumber);
1684
+ // line && line.directoryNumber && (line.directoryNumber.directoryNumber = '');
1685
+ // return line;
1686
+ // });
1687
+ // // const routePartition = this.siteDefaults?.routePartition || '';
1688
+ // // if (line.lineAssociations && line.lineAssociations.length) {
1689
+ // // this.setLineAssociationsForDevice(line, routePartition);
1690
+ // // }
1691
+ // }
1692
+ // this.templateDevices.forEach(device => {
1693
+ // if (device.lineAssociations && device.lineAssociations.length) {
1694
+ // this.setLineAssociationsForDevice(device, routePartition);
1695
+ // }
1696
+ // });
1697
+ // }
1698
+ setLineAssociationsForDevice(device, routePartition) {
1699
+ const lineAssociations = device.lineAssociations || [];
1700
+ if (lineAssociations && lineAssociations.length) {
1701
+ lineAssociations.forEach(lineAssociation => {
1702
+ lineAssociation && lineAssociation.directoryNumber && (lineAssociation.directoryNumber.templateDirectoryNumber = lineAssociation.directoryNumber.directoryNumber || '');
1703
+ lineAssociation && lineAssociation.directoryNumber && (lineAssociation.directoryNumber.routePartitionName = routePartition);
1704
+ lineAssociation && lineAssociation.logMissedCall && (lineAssociation.logMissedCall = lineAssociation.logMissedCall || 'false');
1705
+ });
1706
+ }
1707
+ }
1708
+ initDeviceWithSiteInfo(device) {
1709
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1710
+ device.newName = device.name;
1711
+ device.name = '';
1712
+ if (!device['enabledExtensionMobility']) {
1713
+ device.enabledExtensionMobility = (_b = (_a = this.siteDefaults) === null || _a === void 0 ? void 0 : _a.enableEm) !== null && _b !== void 0 ? _b : false;
1714
+ }
1715
+ else if (device['enabledExtensionMobility'].toString() === 'Yes') {
1716
+ device.enabledExtensionMobility = true;
1717
+ }
1718
+ else if (device['enabledExtensionMobility'].toString() === 'No') {
1719
+ device.enabledExtensionMobility = false;
1720
+ }
1721
+ if (device.location) {
1722
+ const replacedValue = (_e = this.replaceDynamicValueSiteInfo(device.location, (_d = (_c = this.currentSite) === null || _c === void 0 ? void 0 : _c.shortName) !== null && _d !== void 0 ? _d : '')) !== null && _e !== void 0 ? _e : null;
1723
+ device.location = replacedValue;
1724
+ }
1725
+ if (device.location) {
1726
+ const replacedValue = (_h = this.replaceDynamicValueSiteInfo(device.devicePoolName, (_g = (_f = this.currentSite) === null || _f === void 0 ? void 0 : _f.shortName) !== null && _g !== void 0 ? _g : '')) !== null && _h !== void 0 ? _h : null;
1727
+ device.devicePoolName = replacedValue;
1728
+ }
1729
+ if (device.location) {
1730
+ const replacedValue = (_l = this.replaceDynamicValueSiteInfo(device.callingSearchSpaceName, (_k = (_j = this.currentSite) === null || _j === void 0 ? void 0 : _j.shortName) !== null && _k !== void 0 ? _k : '')) !== null && _l !== void 0 ? _l : null;
1731
+ device.callingSearchSpaceName = replacedValue;
1732
+ }
1733
+ if (device.extraOptions) {
1734
+ const replacedValue = (_p = this.replaceDynamicValueSiteInfo(device.extraOptions.aarCss, (_o = (_m = this.currentSite) === null || _m === void 0 ? void 0 : _m.shortName) !== null && _o !== void 0 ? _o : '')) !== null && _p !== void 0 ? _p : null;
1735
+ device.extraOptions.aarCss = replacedValue;
1736
+ }
1737
+ if (!device.description && this.siteDefaults) {
1738
+ device.description = this.siteDefaults.deviceDescription;
1739
+ }
1740
+ }
1741
+ replaceDynamicValueSiteInfo(fieldValue, siteShortName) {
1742
+ if (fieldValue) {
1743
+ fieldValue = this.replaceDynamicValueFormat(fieldValue);
1744
+ const paramsToReplaces = { 'SiteShortName': siteShortName };
1745
+ return this.mutliStringReplace(paramsToReplaces, fieldValue);
1746
+ }
1747
+ return null;
1748
+ }
1749
+ replaceDynamicValueFormat(str) {
1750
+ str = str.replace(/\[FN\]/ig, '[FN]').replace(/\[LN\]/ig, '[LN]').replace(/\[ID\]/ig, '[UserId]')
1751
+ .replace(/\[UserId\]/ig, '[UserId]').replace(/<Match User ID>/ig, '[UserId]')
1752
+ .replace(/\[Email\]/ig, '[Email]').replace(/\[DN\(/ig, '[DN(')
1753
+ .replace(/\[SiteShortName\]/ig, '[SiteShortName]').replace(/\$\(SiteShortName\)/ig, '[SiteShortName]')
1754
+ .replace(/\$\{SiteShortName\}/ig, '[SiteShortName]').replace(/{SiteShortName}/ig, '[SiteShortName]')
1755
+ .replace(/\[FN\(/ig, '[FN(').replace(/\[LN\(/ig, '[LN(')
1756
+ .replace(/\[ID\(/ig, '[ID(');
1757
+ return str;
1758
+ }
1759
+ mutliStringReplace(object, input, directoryNumber, user) {
1760
+ var val = input;
1761
+ if (val.includes('[DN]') && directoryNumber && !directoryNumber.includes('Line')) {
1762
+ val = val.replace('[DN]', directoryNumber);
1763
+ }
1764
+ var indexOfDN = val.indexOf('[DN(');
1765
+ if (indexOfDN !== -1 && directoryNumber) {
1766
+ var digit = val.substring(indexOfDN + 4, val.indexOf(')', indexOfDN + 4));
1767
+ var digitCount = Number(digit) || 0;
1768
+ var dnDigit = (digitCount > val.length) ? directoryNumber : directoryNumber.substring(directoryNumber.length - digitCount, directoryNumber.length);
1769
+ val = val.replace('[DN(' + digit + ')]', dnDigit);
1770
+ }
1771
+ var indexOfFN = val.indexOf('[FN(');
1772
+ if (indexOfFN !== -1 && user && user.firstName) {
1773
+ var digit = val.substring(indexOfFN + 4, val.indexOf(')', indexOfFN + 4));
1774
+ var fnDigit = user.firstName.substring(0, digit);
1775
+ val = val.replace('[FN(' + digit + ')]', fnDigit);
1776
+ }
1777
+ var indexOfLN = val.indexOf('[LN(');
1778
+ if (indexOfLN !== -1 && user && user.lastName) {
1779
+ var digit = val.substring(indexOfLN + 4, val.indexOf(')', indexOfLN + 4));
1780
+ var lnDigit = user.lastName.substring(0, digit);
1781
+ val = val.replace('[LN(' + digit + ')]', lnDigit);
1782
+ }
1783
+ var indexOfID = val.indexOf('[ID(');
1784
+ if (indexOfID !== -1 && user && user.userid) {
1785
+ var digit = val.substring(indexOfID + 4, val.indexOf(')', indexOfID + 4));
1786
+ var idDigit = user.userid.substring(0, digit);
1787
+ val = val.replace('[ID(' + digit + ')]', idDigit);
1788
+ }
1789
+ var entries = Object.entries(object);
1790
+ entries.forEach((para) => {
1791
+ var find = '[' + para[0] + ']';
1792
+ var replacement = para[1] != null ? String(para[1]) : '';
1793
+ val = val.split(find).join(replacement);
1794
+ });
1795
+ return val;
1796
+ }
1797
+ initTemplateDnsNamesForLines() {
1798
+ var _a, _b;
1799
+ if (this.lines && this.lines.length > 0) {
1800
+ this.lines.forEach((line, index) => {
1801
+ line.directoryNumber.templateDirectoryNumber = line.directoryNumber.directoryNumber;
1802
+ line.directoryNumber.directoryNumber = '';
1803
+ return line;
1804
+ });
1805
+ const routePartition = ((_a = this.siteDefaults) === null || _a === void 0 ? void 0 : _a.routePartition) || '';
1806
+ this.devices.forEach(device => {
1807
+ if (device.lineAssociations && device.lineAssociations.length) {
1808
+ this.setLineAssociationsForDevice(device, routePartition);
1809
+ }
1810
+ });
1811
+ this.deviceProfiles.forEach(deviceProfile => {
1812
+ if (deviceProfile.lineAssociations && deviceProfile.lineAssociations.length) {
1813
+ this.setLineAssociationsForDevice(deviceProfile, routePartition);
1814
+ }
1815
+ });
1816
+ if (((_b = this.endUser) === null || _b === void 0 ? void 0 : _b.singleNumberReach) && this.endUser.singleNumberReach.associatedLines && this.endUser.singleNumberReach.associatedLines.length) {
1817
+ if (this.endUser.singleNumberReach.associatedLines && this.endUser.singleNumberReach.associatedLines.length) {
1818
+ this.endUser.singleNumberReach.associatedLines.map(lineAssociation => {
1819
+ lineAssociation.directoryNumber.templateDirectoryNumber = lineAssociation.directoryNumber.directoryNumber;
1820
+ lineAssociation.directoryNumber.routePartitionName = routePartition;
1821
+ });
1822
+ }
1823
+ if (this.endUser.singleNumberReach.remoteDestinations && this.endUser.singleNumberReach.remoteDestinations.length) {
1824
+ this.endUser.singleNumberReach.remoteDestinations.forEach(remoteDestination => {
1825
+ if (remoteDestination.lineAssociations && remoteDestination.lineAssociations.length) {
1826
+ remoteDestination.lineAssociations.map(lineAssociation => {
1827
+ lineAssociation.directoryNumber.templateDirectoryNumber = lineAssociation.directoryNumber.directoryNumber;
1828
+ lineAssociation.directoryNumber.routePartitionName = routePartition;
1829
+ });
1830
+ }
1831
+ });
1832
+ }
1833
+ }
1834
+ }
1835
+ }
1836
+ buildSavableEndUser() {
1837
+ if (!this.endUser) {
1838
+ throw new Error('No template user loaded');
1839
+ }
1840
+ return buildSavableEndUser(this.endUser, this.lines, this.devices, this.deviceProfiles, this.userDetailsForm, {
1841
+ resolveDeviceName: (index, device) => this.resolveDeviceNameForSave(index, device),
1842
+ resolveDeviceProfileName: (index, profile) => this.resolveDeviceNameForSave(index, profile),
1843
+ });
1844
+ }
1845
+ resolveDeviceNameForSave(_index, device) {
1846
+ var _a;
1847
+ const rawName = (device.name || device.newName || '').trim();
1848
+ if (!rawName) {
1849
+ return '';
1850
+ }
1851
+ const prefix = (_a = device.prefix) === null || _a === void 0 ? void 0 : _a.trim();
1852
+ if (prefix && !rawName.toUpperCase().startsWith(prefix.toUpperCase())) {
1853
+ return `${prefix}${rawName}`;
1854
+ }
1855
+ return rawName;
1856
+ }
1857
+ saveNewUser() {
1858
+ var _a, _b;
1859
+ const user = this.buildSavableEndUser();
1860
+ const siteId = String((_a = this.selectedSite) !== null && _a !== void 0 ? _a : '');
1861
+ const templateId = String((_b = this.selectedTemplateId) !== null && _b !== void 0 ? _b : '');
1862
+ return this.userCreationApiService.saveTemplateUser(user, templateId, siteId);
1863
+ }
704
1864
  }
705
1865
  UserCreationWizardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
706
1866
  UserCreationWizardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardService });
@@ -708,23 +1868,535 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
708
1868
  type: Injectable
709
1869
  }], ctorParameters: function () { return []; } });
710
1870
 
1871
+ class AppLoaderComponent {
1872
+ constructor() {
1873
+ }
1874
+ }
1875
+ AppLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1876
+ 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;display:flex;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 });
1877
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, decorators: [{
1878
+ type: Component,
1879
+ 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;display:flex;justify-content:center;align-items:center}\n"] }]
1880
+ }], ctorParameters: function () { return []; } });
1881
+
1882
+ const LDAP_PAGE_SIZE = 10;
711
1883
  class UserDetailsStepComponent {
712
- constructor(userCreationWizardService) {
1884
+ get linesFormArray() {
1885
+ return this.userDetailsForm.get('lines');
1886
+ }
1887
+ get devicesFormArray() {
1888
+ return this.userDetailsForm.get('devices');
1889
+ }
1890
+ get deviceProfilesFormArray() {
1891
+ return this.userDetailsForm.get('deviceProfiles');
1892
+ }
1893
+ get selectedLdapUser() {
1894
+ return this.userCreationWizardService.selectedLdapUser;
1895
+ }
1896
+ get ldapTotalCount() {
1897
+ return this.userCreationWizardService.ldapUsersTotal;
1898
+ }
1899
+ get hasLdapUsers() {
1900
+ return this.userCreationWizardService.ldapUsers.length > 0;
1901
+ }
1902
+ constructor(fb, userCreationApiService, userCreationWizardService) {
1903
+ this.fb = fb;
1904
+ this.userCreationApiService = userCreationApiService;
713
1905
  this.userCreationWizardService = userCreationWizardService;
1906
+ this.validityChange = new EventEmitter();
1907
+ this.userIdCheckPending = false;
1908
+ this.loadingAvailableNumbers = false;
1909
+ this.ldapLoading = false;
1910
+ this.ldapSearchAttempted = false;
1911
+ this.ldapPageSize = LDAP_PAGE_SIZE;
1912
+ this.ldapPageIndex = 0;
1913
+ this.ldapQueryTypeOptions = [
1914
+ { label: 'User ID', value: 'userId' },
1915
+ { label: 'First Name', value: 'firstName' },
1916
+ { label: 'Last Name', value: 'lastName' },
1917
+ ];
1918
+ this.filteredAvailableNumbersByLine = [];
1919
+ this.filteredRoutePartitionsByLine = [];
1920
+ this.destroy$ = new Subject();
1921
+ this.userIdAsyncValidator = this.createUserIdAsyncValidator();
1922
+ this.ldapSearchForm = this.fb.group({
1923
+ queryValue: [''],
1924
+ queryType: ['userId'],
1925
+ });
1926
+ this.userDetailsForm = this.fb.group({
1927
+ userId: ['', [Validators.required], [this.userIdAsyncValidator]],
1928
+ firstName: ['', Validators.required],
1929
+ lastName: ['', Validators.required],
1930
+ email: ['', [Validators.required, Validators.email]],
1931
+ lines: this.fb.array([]),
1932
+ devices: this.fb.array([]),
1933
+ deviceProfiles: this.fb.array([]),
1934
+ });
1935
+ }
1936
+ ngOnInit() {
1937
+ const savedFormValue = this.userCreationWizardService.userDetailsFormValue;
1938
+ const isRestoringPreviousEntry = !!savedFormValue;
1939
+ if (!isRestoringPreviousEntry) {
1940
+ this.resetLdapSearchForm();
1941
+ }
1942
+ this.buildDynamicFormArrays(savedFormValue);
1943
+ if (isRestoringPreviousEntry) {
1944
+ this.patchUserFieldsFromSavedValue(savedFormValue);
1945
+ }
1946
+ else {
1947
+ this.patchUserFieldsFromService();
1948
+ }
1949
+ this.initLineFilters();
1950
+ this.setupFormSync();
1951
+ this.setupValidityEmitter();
1952
+ this.fetchInitialAvailableNumbers();
1953
+ if (!isRestoringPreviousEntry) {
1954
+ this.userCreationWizardService.applyUserDetailsFormValue(this.userDetailsForm.getRawValue());
1955
+ }
1956
+ this.applyDeviceNameValidators();
1957
+ this.userCreationWizardService.deviceDefaultsLoaded$
1958
+ .pipe(takeUntil(this.destroy$))
1959
+ .subscribe(() => {
1960
+ this.applyDeviceNameValidators();
1961
+ this.emitValidity();
1962
+ });
1963
+ if (this.userCreationWizardService.isLdapIntegrated && this.selectedLdapUser) {
1964
+ this.applyLdapIntegratedFormState();
1965
+ }
1966
+ this.emitValidity();
1967
+ }
1968
+ ngOnDestroy() {
1969
+ this.destroy$.next();
1970
+ this.destroy$.complete();
1971
+ }
1972
+ isStepValid() {
1973
+ return this.userDetailsForm.valid && !this.userIdCheckPending;
1974
+ }
1975
+ markAllAsTouched() {
1976
+ this.userDetailsForm.markAllAsTouched();
1977
+ this.emitValidity();
1978
+ }
1979
+ syncToService() {
1980
+ this.userCreationWizardService.applyUserDetailsFormValue(this.userDetailsForm.getRawValue());
1981
+ }
1982
+ getLineGroup(index) {
1983
+ return this.linesFormArray.at(index);
1984
+ }
1985
+ getDeviceGroup(index) {
1986
+ return this.devicesFormArray.at(index);
1987
+ }
1988
+ getDeviceProfileGroup(index) {
1989
+ return this.deviceProfilesFormArray.at(index);
1990
+ }
1991
+ getDeviceNamePrefix(index) {
1992
+ return this.userCreationWizardService.getDeviceNamePrefix(index, false);
1993
+ }
1994
+ getDeviceProfileNamePrefix(index) {
1995
+ return this.userCreationWizardService.getDeviceNamePrefix(index, true);
1996
+ }
1997
+ getDeviceNameValidationCaption(index) {
1998
+ return this.userCreationWizardService.getDeviceNameValidationCaption(index, false);
1999
+ }
2000
+ getDeviceProfileNameValidationCaption(index) {
2001
+ return this.userCreationWizardService.getDeviceNameValidationCaption(index, true);
2002
+ }
2003
+ getFilteredNumbers(lineIndex) {
2004
+ var _a;
2005
+ return (_a = this.filteredAvailableNumbersByLine[lineIndex]) !== null && _a !== void 0 ? _a : [];
2006
+ }
2007
+ getFilteredRoutePartitions(lineIndex) {
2008
+ var _a;
2009
+ return (_a = this.filteredRoutePartitionsByLine[lineIndex]) !== null && _a !== void 0 ? _a : [];
2010
+ }
2011
+ filterAvailableNumbers(lineIndex, event) {
2012
+ var _a;
2013
+ const raw = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) || '';
2014
+ this.applyNumberFilter(lineIndex, raw);
2015
+ }
2016
+ filterRoutePartitions(lineIndex, event) {
2017
+ var _a;
2018
+ const raw = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) || '';
2019
+ this.applyRoutePartitionFilter(lineIndex, raw);
2020
+ }
2021
+ onRoutePartitionSelected(lineIndex, routePartition) {
2022
+ var _a, _b;
2023
+ const lineGroup = this.linesFormArray.at(lineIndex);
2024
+ (_a = lineGroup.get('routePartition')) === null || _a === void 0 ? void 0 : _a.setValue(routePartition, { emitEvent: false });
2025
+ (_b = lineGroup.get('number')) === null || _b === void 0 ? void 0 : _b.setValue('');
2026
+ this.applyRoutePartitionFilter(lineIndex, routePartition);
2027
+ this.loadAvailableNumbersForLine(lineIndex, routePartition);
2028
+ }
2029
+ onNumberSelected(lineIndex, number) {
2030
+ var _a;
2031
+ const lineGroup = this.linesFormArray.at(lineIndex);
2032
+ const displayNumber = this.extractDirectoryNumber(number);
2033
+ (_a = lineGroup.get('number')) === null || _a === void 0 ? void 0 : _a.setValue(displayNumber, { emitEvent: true });
2034
+ }
2035
+ searchLdapUsers(pageIndex = 0) {
2036
+ var _a, _b;
2037
+ const queryValue = String((_a = this.ldapSearchForm.get('queryValue')) === null || _a === void 0 ? void 0 : _a.value).trim() || undefined;
2038
+ const siteId = this.userCreationWizardService.selectedSite;
2039
+ if (!siteId) {
2040
+ this.userCreationWizardService.setLdapUsersResult([], 0);
2041
+ this.ldapPageIndex = 0;
2042
+ this.ldapSearchAttempted = false;
2043
+ return;
2044
+ }
2045
+ this.ldapPageIndex = pageIndex;
2046
+ const queryType = (_b = this.ldapSearchForm.get('queryType')) === null || _b === void 0 ? void 0 : _b.value;
2047
+ const params = {
2048
+ size: String(LDAP_PAGE_SIZE),
2049
+ page: String(pageIndex),
2050
+ deviceless: 'true',
2051
+ querytype: queryType,
2052
+ withEmailOnly: 'true',
2053
+ queryvalue: queryValue,
2054
+ };
2055
+ this.ldapLoading = true;
2056
+ this.userCreationApiService
2057
+ .getLdapUsers(String(siteId), params)
2058
+ .pipe(take(1), map((res) => {
2059
+ var _a, _b;
2060
+ return ({
2061
+ users: (_a = res === null || res === void 0 ? void 0 : res.pageData) !== null && _a !== void 0 ? _a : [],
2062
+ total: (_b = res === null || res === void 0 ? void 0 : res.total) !== null && _b !== void 0 ? _b : 0,
2063
+ });
2064
+ }), catchError(() => of({ users: [], total: 0 })), finalize(() => {
2065
+ this.ldapLoading = false;
2066
+ }))
2067
+ .subscribe(({ users, total }) => {
2068
+ this.ldapSearchAttempted = true;
2069
+ this.userCreationWizardService.setLdapUsersResult(users, total);
2070
+ });
2071
+ }
2072
+ onLdapPageChange(event) {
2073
+ this.searchLdapUsers(event.pageIndex);
2074
+ }
2075
+ onAddLdapUser(row) {
2076
+ var _a, _b, _c;
2077
+ this.userCreationWizardService.selectLdapUser(row);
2078
+ this.userDetailsForm.patchValue({
2079
+ userId: row.userid,
2080
+ firstName: (_a = row.firstName) !== null && _a !== void 0 ? _a : '',
2081
+ lastName: (_b = row.lastName) !== null && _b !== void 0 ? _b : '',
2082
+ email: (_c = row.email) !== null && _c !== void 0 ? _c : '',
2083
+ });
2084
+ this.applyLdapIntegratedFormState();
2085
+ this.emitValidity();
2086
+ }
2087
+ onDeleteLdapUser(row) {
2088
+ if (!this.userCreationWizardService.isLdapUserRowSelected(row)) {
2089
+ return;
2090
+ }
2091
+ this.clearLdapSelection();
2092
+ }
2093
+ onRemoveLdapTag() {
2094
+ this.clearLdapSelection();
2095
+ }
2096
+ isLdapUserRowSelected(row) {
2097
+ return this.userCreationWizardService.isLdapUserRowSelected(row);
2098
+ }
2099
+ clearLdapSelection() {
2100
+ this.userCreationWizardService.clearLdapUserSelection();
2101
+ this.userDetailsForm.patchValue({
2102
+ userId: '',
2103
+ firstName: '',
2104
+ lastName: '',
2105
+ email: '',
2106
+ });
2107
+ this.restoreManualEntryFormState();
2108
+ this.emitValidity();
2109
+ }
2110
+ applyLdapIntegratedFormState() {
2111
+ var _a;
2112
+ this.setUserIdentityFieldsReadonly(true);
2113
+ this.toggleUserIdAsyncValidator(false);
2114
+ (_a = this.userDetailsForm.get('userId')) === null || _a === void 0 ? void 0 : _a.updateValueAndValidity({ emitEvent: false });
2115
+ }
2116
+ restoreManualEntryFormState() {
2117
+ var _a;
2118
+ this.setUserIdentityFieldsReadonly(false);
2119
+ this.toggleUserIdAsyncValidator(true);
2120
+ (_a = this.userDetailsForm.get('userId')) === null || _a === void 0 ? void 0 : _a.updateValueAndValidity();
2121
+ }
2122
+ setUserIdentityFieldsReadonly(readonly) {
2123
+ ['userId', 'firstName', 'lastName', 'email'].forEach(fieldName => {
2124
+ const control = this.userDetailsForm.get(fieldName);
2125
+ if (!control) {
2126
+ return;
2127
+ }
2128
+ if (readonly) {
2129
+ control.disable({ emitEvent: false });
2130
+ }
2131
+ else {
2132
+ control.enable({ emitEvent: false });
2133
+ }
2134
+ });
2135
+ }
2136
+ toggleUserIdAsyncValidator(enabled) {
2137
+ const control = this.userDetailsForm.get('userId');
2138
+ if (!control) {
2139
+ return;
2140
+ }
2141
+ if (enabled) {
2142
+ control.setAsyncValidators([this.userIdAsyncValidator]);
2143
+ }
2144
+ else {
2145
+ control.clearAsyncValidators();
2146
+ }
2147
+ control.updateValueAndValidity({ emitEvent: false });
2148
+ }
2149
+ setupValidityEmitter() {
2150
+ this.userDetailsForm.statusChanges
2151
+ .pipe(startWith(this.userDetailsForm.status), takeUntil(this.destroy$))
2152
+ .subscribe(() => this.emitValidity());
2153
+ }
2154
+ emitValidity() {
2155
+ this.validityChange.emit(this.isStepValid());
2156
+ }
2157
+ buildDynamicFormArrays(savedFormValue) {
2158
+ const service = this.userCreationWizardService;
2159
+ const linesArray = this.linesFormArray;
2160
+ const devicesArray = this.devicesFormArray;
2161
+ const profilesArray = this.deviceProfilesFormArray;
2162
+ while (linesArray.length) {
2163
+ linesArray.removeAt(0);
2164
+ }
2165
+ while (devicesArray.length) {
2166
+ devicesArray.removeAt(0);
2167
+ }
2168
+ while (profilesArray.length) {
2169
+ profilesArray.removeAt(0);
2170
+ }
2171
+ service.lines.forEach((line, index) => {
2172
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2173
+ const savedLine = (_a = savedFormValue === null || savedFormValue === void 0 ? void 0 : savedFormValue.lines) === null || _a === void 0 ? void 0 : _a[index];
2174
+ const lineGroup = this.fb.group({
2175
+ lineNumber: [
2176
+ {
2177
+ value: ((_b = line.directoryNumber) === null || _b === void 0 ? void 0 : _b.templateDirectoryNumber) || '',
2178
+ disabled: true,
2179
+ },
2180
+ ],
2181
+ number: [
2182
+ (_e = (_c = savedLine === null || savedLine === void 0 ? void 0 : savedLine.number) !== null && _c !== void 0 ? _c : (_d = line.directoryNumber) === null || _d === void 0 ? void 0 : _d.directoryNumber) !== null && _e !== void 0 ? _e : '',
2183
+ Validators.required,
2184
+ ],
2185
+ routePartition: [
2186
+ (_h = (_f = savedLine === null || savedLine === void 0 ? void 0 : savedLine.routePartition) !== null && _f !== void 0 ? _f : (_g = line.directoryNumber) === null || _g === void 0 ? void 0 : _g.routePartitionName) !== null && _h !== void 0 ? _h : '',
2187
+ Validators.required,
2188
+ ],
2189
+ });
2190
+ linesArray.push(lineGroup);
2191
+ this.setupLineListeners(index, lineGroup);
2192
+ });
2193
+ service.devices.forEach((device, index) => {
2194
+ var _a, _b, _c;
2195
+ const savedDevice = (_a = savedFormValue === null || savedFormValue === void 0 ? void 0 : savedFormValue.devices) === null || _a === void 0 ? void 0 : _a[index];
2196
+ devicesArray.push(this.fb.group({
2197
+ deviceType: [{ value: device.deviceType || '', disabled: true }],
2198
+ protocol: [{ value: device.protocol || '', disabled: true }],
2199
+ buttonTemplate: [{ value: device.buttonTemplate || '', disabled: true }],
2200
+ name: [
2201
+ (_c = (_b = savedDevice === null || savedDevice === void 0 ? void 0 : savedDevice.name) !== null && _b !== void 0 ? _b : device.name) !== null && _c !== void 0 ? _c : '',
2202
+ this.buildDeviceNameValidators(index, false),
2203
+ ],
2204
+ }));
2205
+ });
2206
+ service.deviceProfiles.forEach((profile, index) => {
2207
+ var _a, _b, _c;
2208
+ const savedProfile = (_a = savedFormValue === null || savedFormValue === void 0 ? void 0 : savedFormValue.deviceProfiles) === null || _a === void 0 ? void 0 : _a[index];
2209
+ profilesArray.push(this.fb.group({
2210
+ deviceType: [{ value: profile.deviceType || '', disabled: true }],
2211
+ protocol: [{ value: profile.protocol || '', disabled: true }],
2212
+ buttonTemplate: [{ value: profile.buttonTemplate || '', disabled: true }],
2213
+ name: [
2214
+ (_c = (_b = savedProfile === null || savedProfile === void 0 ? void 0 : savedProfile.name) !== null && _b !== void 0 ? _b : profile.name) !== null && _c !== void 0 ? _c : '',
2215
+ this.buildDeviceNameValidators(index, true),
2216
+ ],
2217
+ }));
2218
+ });
2219
+ }
2220
+ buildDeviceNameValidators(deviceIndex, isProfile) {
2221
+ const validators = isProfile ? [] : [Validators.required];
2222
+ const options = this.userCreationWizardService.getDeviceNameValidationOptions(deviceIndex, isProfile);
2223
+ if (options) {
2224
+ validators.push(deviceNameValidator(options));
2225
+ }
2226
+ return validators;
2227
+ }
2228
+ applyDeviceNameValidators() {
2229
+ this.devicesFormArray.controls.forEach((_, index) => {
2230
+ const nameControl = this.getDeviceGroup(index).get('name');
2231
+ nameControl === null || nameControl === void 0 ? void 0 : nameControl.setValidators(this.buildDeviceNameValidators(index, false));
2232
+ nameControl === null || nameControl === void 0 ? void 0 : nameControl.updateValueAndValidity({ emitEvent: false });
2233
+ });
2234
+ this.deviceProfilesFormArray.controls.forEach((_, index) => {
2235
+ const nameControl = this.getDeviceProfileGroup(index).get('name');
2236
+ nameControl === null || nameControl === void 0 ? void 0 : nameControl.setValidators(this.buildDeviceNameValidators(index, true));
2237
+ nameControl === null || nameControl === void 0 ? void 0 : nameControl.updateValueAndValidity({ emitEvent: false });
2238
+ });
2239
+ }
2240
+ resetLdapSearchForm() {
2241
+ this.ldapSearchForm.reset({
2242
+ queryValue: '',
2243
+ queryType: 'userId',
2244
+ });
2245
+ this.ldapSearchAttempted = false;
2246
+ this.ldapPageIndex = 0;
2247
+ this.userIdCheckPending = false;
2248
+ }
2249
+ patchUserFieldsFromSavedValue(saved) {
2250
+ this.userDetailsForm.patchValue({
2251
+ userId: saved.userId || '',
2252
+ firstName: saved.firstName || '',
2253
+ lastName: saved.lastName || '',
2254
+ email: saved.email || '',
2255
+ });
2256
+ }
2257
+ patchUserFieldsFromService() {
2258
+ const service = this.userCreationWizardService;
2259
+ const endUser = service.endUser;
2260
+ this.userDetailsForm.patchValue({
2261
+ userId: (endUser === null || endUser === void 0 ? void 0 : endUser.userid) || service.userDetailsForm.userId || '',
2262
+ firstName: (endUser === null || endUser === void 0 ? void 0 : endUser.firstName) || service.userDetailsForm.firstName || '',
2263
+ lastName: (endUser === null || endUser === void 0 ? void 0 : endUser.lastName) || service.userDetailsForm.lastName || '',
2264
+ email: (endUser === null || endUser === void 0 ? void 0 : endUser.email) || service.userDetailsForm.email || '',
2265
+ });
2266
+ this.userDetailsForm.markAsPristine();
2267
+ this.userDetailsForm.markAsUntouched();
2268
+ }
2269
+ setupLineListeners(lineIndex, lineGroup) {
2270
+ var _a, _b;
2271
+ (_a = lineGroup
2272
+ .get('routePartition')) === null || _a === void 0 ? void 0 : _a.valueChanges.pipe(debounceTime(300), takeUntil(this.destroy$)).subscribe(value => {
2273
+ this.applyRoutePartitionFilter(lineIndex, String(value !== null && value !== void 0 ? value : ''));
2274
+ });
2275
+ (_b = lineGroup
2276
+ .get('number')) === null || _b === void 0 ? void 0 : _b.valueChanges.pipe(debounceTime(150), takeUntil(this.destroy$)).subscribe(value => {
2277
+ this.applyNumberFilter(lineIndex, String(value !== null && value !== void 0 ? value : ''));
2278
+ });
2279
+ }
2280
+ initLineFilters() {
2281
+ const partitions = this.userCreationWizardService.routePartitionOptions;
2282
+ const numbers = this.userCreationWizardService.availableNumbers;
2283
+ this.filteredRoutePartitionsByLine = this.linesFormArray.controls.map((_, index) => {
2284
+ var _a, _b;
2285
+ const current = String((_b = (_a = this.linesFormArray.at(index).get('routePartition')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '');
2286
+ return this.filterOptions(partitions, current);
2287
+ });
2288
+ this.filteredAvailableNumbersByLine = this.linesFormArray.controls.map((_, index) => {
2289
+ var _a, _b;
2290
+ const current = String((_b = (_a = this.linesFormArray.at(index).get('number')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '');
2291
+ return this.filterOptions(numbers, current);
2292
+ });
2293
+ }
2294
+ setupFormSync() {
2295
+ this.userDetailsForm.valueChanges
2296
+ .pipe(debounceTime(200), takeUntil(this.destroy$))
2297
+ .subscribe(() => {
2298
+ this.userCreationWizardService.applyUserDetailsFormValue(this.userDetailsForm.getRawValue());
2299
+ });
2300
+ }
2301
+ fetchInitialAvailableNumbers() {
2302
+ var _a, _b;
2303
+ const firstPartition = this.linesFormArray.length > 0
2304
+ ? String((_b = (_a = this.linesFormArray.at(0).get('routePartition')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '').trim()
2305
+ : this.userCreationWizardService.firstLineRoutePartition ||
2306
+ this.userCreationWizardService.siteDefaultRoutePartition ||
2307
+ '';
2308
+ if (firstPartition) {
2309
+ this.loadAvailableNumbersForLine(0, firstPartition, false);
2310
+ }
2311
+ }
2312
+ loadAvailableNumbersForLine(lineIndex, routePartition, clearNumber = true) {
2313
+ var _a;
2314
+ const siteId = this.userCreationWizardService.selectedSite;
2315
+ if (!siteId || !routePartition.trim()) {
2316
+ return;
2317
+ }
2318
+ if (clearNumber) {
2319
+ (_a = this.linesFormArray.at(lineIndex).get('number')) === null || _a === void 0 ? void 0 : _a.setValue('');
2320
+ }
2321
+ this.loadingAvailableNumbers = true;
2322
+ this.userCreationWizardService
2323
+ .getNumberRange(String(siteId), routePartition)
2324
+ .pipe(take(1), catchError(() => of(null)), finalize(() => {
2325
+ this.loadingAvailableNumbers = false;
2326
+ this.refreshNumberFilters();
2327
+ }))
2328
+ .subscribe();
2329
+ }
2330
+ refreshNumberFilters() {
2331
+ const numbers = this.userCreationWizardService.availableNumbers;
2332
+ this.filteredAvailableNumbersByLine = this.linesFormArray.controls.map((_, index) => {
2333
+ var _a, _b;
2334
+ const current = String((_b = (_a = this.linesFormArray.at(index).get('number')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '');
2335
+ return this.filterOptions(numbers, current);
2336
+ });
2337
+ }
2338
+ applyNumberFilter(lineIndex, raw) {
2339
+ const value = raw.trim().toLowerCase();
2340
+ const source = this.userCreationWizardService.availableNumbers || [];
2341
+ this.filteredAvailableNumbersByLine[lineIndex] = value.length
2342
+ ? source.filter(n => !!n && n.toLowerCase().includes(value))
2343
+ : [...source];
2344
+ }
2345
+ applyRoutePartitionFilter(lineIndex, raw) {
2346
+ const value = raw.trim().toLowerCase();
2347
+ const source = this.userCreationWizardService.routePartitionOptions || [];
2348
+ this.filteredRoutePartitionsByLine[lineIndex] = value.length
2349
+ ? source.filter(n => !!n && n.toLowerCase().includes(value))
2350
+ : [...source];
2351
+ }
2352
+ filterOptions(source, raw) {
2353
+ const value = raw.trim().toLowerCase();
2354
+ if (!value.length) {
2355
+ return [...source];
2356
+ }
2357
+ return source.filter(item => !!item && item.toLowerCase().includes(value));
714
2358
  }
715
- onAddUser(row) {
716
- this.userCreationWizardService.addLdapUser(row);
2359
+ extractDirectoryNumber(value) {
2360
+ const trimmed = value.trim();
2361
+ const spaceIndex = trimmed.indexOf(' ');
2362
+ return spaceIndex > -1 ? trimmed.substring(0, spaceIndex) : trimmed;
717
2363
  }
718
- getDeviceName(index) {
719
- return this.userCreationWizardService.getDeviceDisplayName(index);
2364
+ createUserIdAsyncValidator() {
2365
+ return (control) => {
2366
+ var _a;
2367
+ if (this.userCreationWizardService.isLdapIntegrated) {
2368
+ this.userIdCheckPending = false;
2369
+ return of(null);
2370
+ }
2371
+ const userId = String((_a = control.value) !== null && _a !== void 0 ? _a : '').trim();
2372
+ const siteId = this.userCreationWizardService.selectedSite;
2373
+ if (!userId || !siteId) {
2374
+ this.userIdCheckPending = false;
2375
+ this.emitValidity();
2376
+ return of(null);
2377
+ }
2378
+ this.userIdCheckPending = true;
2379
+ this.emitValidity();
2380
+ return timer(500).pipe(switchMap(() => this.userCreationApiService
2381
+ .checkUserIdExisting(String(siteId), encodeURIComponent(encodeURIComponent(userId)))
2382
+ .pipe(map(() => ({ userIdExists: true })), catchError(() => of(null)))), tap(() => {
2383
+ this.userIdCheckPending = false;
2384
+ this.emitValidity();
2385
+ }), finalize(() => {
2386
+ this.userIdCheckPending = false;
2387
+ this.emitValidity();
2388
+ }));
2389
+ };
720
2390
  }
721
2391
  }
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" }] });
2392
+ 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 });
2393
+ 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
2394
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDetailsStepComponent, decorators: [{
725
2395
  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 }]; } });
2396
+ 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"] }]
2397
+ }], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: UserCreationApiService }, { type: UserCreationWizardService }]; }, propDecorators: { validityChange: [{
2398
+ type: Output
2399
+ }] } });
728
2400
 
729
2401
  class UserOverviewStepComponent {
730
2402
  constructor(userCreationWizardService) {
@@ -735,17 +2407,21 @@ class UserOverviewStepComponent {
735
2407
  }
736
2408
  }
737
2409
  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"] }] });
2410
+ 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
2411
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserOverviewStepComponent, decorators: [{
740
2412
  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"] }]
2413
+ 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
2414
  }], ctorParameters: function () { return [{ type: UserCreationWizardService }]; } });
743
2415
 
744
2416
  class UserTemplateStepComponent {
2417
+ get isLoading() {
2418
+ return this.loadingSites || this.loadingSiteData;
2419
+ }
745
2420
  constructor(userCreationWizardService, userCreationService, fb) {
746
2421
  this.userCreationWizardService = userCreationWizardService;
747
2422
  this.userCreationService = userCreationService;
748
2423
  this.fb = fb;
2424
+ this.validityChange = new EventEmitter();
749
2425
  this.formGroup = this.fb.group({
750
2426
  userType: [USER_CREATION_TYPES.CUCM],
751
2427
  siteId: [null],
@@ -753,8 +2429,8 @@ class UserTemplateStepComponent {
753
2429
  });
754
2430
  this.userCreationType = USER_CREATION_TYPES.CUCM;
755
2431
  this.USER_CREATION_TYPES = USER_CREATION_TYPES;
756
- this.defaultTemplateName = '8851 + CSF';
757
- this.fallbackTemplateId = '-1';
2432
+ // readonly defaultTemplateName = 'User 8851 Office';
2433
+ // readonly fallbackTemplateId = '-1';
758
2434
  this.destroy$ = new Subject();
759
2435
  this.sitesList = [];
760
2436
  this.sitesList$ = this.userCreationService.sitesList$.pipe(takeUntil(this.destroy$), tap((res) => this.sitesList = res));
@@ -764,18 +2440,21 @@ class UserTemplateStepComponent {
764
2440
  const templateControl = this.formGroup.get('userTemplateId');
765
2441
  const currentTemplateId = templateControl === null || templateControl === void 0 ? void 0 : templateControl.value;
766
2442
  const selectedSiteId = (_a = this.formGroup.get('siteId')) === null || _a === void 0 ? void 0 : _a.value;
767
- const defaultTemplate = this.templates.find(template => template.name === this.defaultTemplateName);
2443
+ // const defaultTemplate = this.templates.find(
2444
+ // template => template.name === this.defaultTemplateName
2445
+ // );
768
2446
  const hasSelectedSite = selectedSiteId !== null && selectedSiteId !== undefined;
769
- if (hasSelectedSite && defaultTemplate && String(currentTemplateId || '') !== String(defaultTemplate.id)) {
770
- templateControl === null || templateControl === void 0 ? void 0 : templateControl.setValue(String(defaultTemplate.id));
771
- }
2447
+ // if (hasSelectedSite && defaultTemplate && String(currentTemplateId || '') !== String(defaultTemplate.id)) {
2448
+ // templateControl?.setValue(String(defaultTemplate.id));
2449
+ // }
772
2450
  }), takeUntil(this.destroy$));
773
2451
  this.isTemplateSelectable = false;
774
2452
  this.templates = [];
775
- this.templateToggleFormControl = new FormControl(true);
2453
+ this.loadingSites = false;
2454
+ this.loadingSiteData = false;
2455
+ this.templateToggleFormControl = new FormControl(false);
776
2456
  }
777
2457
  ngOnInit() {
778
- var _a;
779
2458
  this.formGroup.get('userType').valueChanges
780
2459
  .pipe(takeUntil(this.destroy$))
781
2460
  .subscribe((value) => {
@@ -787,11 +2466,24 @@ class UserTemplateStepComponent {
787
2466
  .pipe(
788
2467
  // filter((value) => value !== null && value !== undefined),
789
2468
  tap((value) => {
790
- var _a;
791
- (_a = this.formGroup.get('userTemplateId')) === null || _a === void 0 ? void 0 : _a.setValue(this.fallbackTemplateId);
792
- // return this.userCreationWizardService.setSelectedTemplate(value);
793
- }), startWith((_a = this.formGroup.get('siteId')) === null || _a === void 0 ? void 0 : _a.value), takeUntil(this.destroy$), switchMap((value) => {
794
- return this.userCreationService.fetchAllUserTemplates(Number(value));
2469
+ // this.formGroup.get('userTemplateId')?.setValue(this.fallbackTemplateId);
2470
+ const selectedSite = this.sitesList.find(site => String(site.id) === String(value));
2471
+ if (selectedSite) {
2472
+ this.userCreationWizardService.setCurrentSite(selectedSite);
2473
+ }
2474
+ return this.userCreationWizardService.setSelectedSite(value);
2475
+ }), takeUntil(this.destroy$), switchMap((value) => {
2476
+ if (value === null || value === undefined || value === '') {
2477
+ this.loadingSiteData = false;
2478
+ return of(null);
2479
+ }
2480
+ this.loadingSiteData = true;
2481
+ return forkJoin([
2482
+ this.userCreationService.fetchAllUserTemplates(Number(value)),
2483
+ this.userCreationWizardService.getSiteAllData(Number(value)),
2484
+ ]).pipe(finalize(() => {
2485
+ this.loadingSiteData = false;
2486
+ }));
795
2487
  }))
796
2488
  .subscribe();
797
2489
  // .subscribe((value) => {
@@ -799,36 +2491,41 @@ class UserTemplateStepComponent {
799
2491
  // })
800
2492
  this.formGroup.get('userTemplateId').valueChanges
801
2493
  .pipe(filter((value) => value !== null && value !== undefined && String(value).trim().length > 0), takeUntil(this.destroy$), switchMap((value) => {
802
- if (String(value) === this.fallbackTemplateId) {
803
- this.userCreationWizardService.setSelectedTemplate(this.defaultTemplateName);
804
- return of(null);
805
- }
2494
+ // if (String(value) === this.fallbackTemplateId) {
2495
+ // this.userCreationWizardService.setSelectedTemplate(this.defaultTemplateName);
2496
+ // return of(null);
2497
+ // }
806
2498
  return this.userCreationService.getUserTemplateToken(String(value), String(String(this.customerId)))
807
2499
  .pipe(tap((payload) => {
808
2500
  const selectedTemplate = this.templates.find(template => String(template.id) === String(value));
809
- this.userCreationWizardService.setSelectedTemplate((selectedTemplate === null || selectedTemplate === void 0 ? void 0 : selectedTemplate.name) || null);
2501
+ this.userCreationWizardService.setSelectedTemplate(selectedTemplate);
810
2502
  this.userCreationWizardService.applyTemplateTokenPayload(payload);
811
2503
  }));
812
2504
  }))
813
2505
  .subscribe();
814
- // this.templateToggleFormControl.valueChanges
815
- // .pipe(startWith(true), takeUntil(this.destroy$), distinctUntilChanged())
816
- // .subscribe((value) => {
817
- // if(value === true) {
818
- // const siteId = this.formGroup.get('siteId')?.value || 7095;
819
- // this.userCreationService.fetchAllUserTemplates(siteId)
820
- // .subscribe();
821
- // } else {
822
- // this.formGroup.get('userTemplateId')?.reset();
823
- // }
824
- // });
2506
+ this.templateToggleFormControl.valueChanges
2507
+ .pipe(startWith(true), takeUntil(this.destroy$), distinctUntilChanged())
2508
+ .subscribe((value) => {
2509
+ var _a, _b;
2510
+ if (value === true) {
2511
+ const siteId = ((_a = this.formGroup.get('siteId')) === null || _a === void 0 ? void 0 : _a.value) || 7095;
2512
+ this.userCreationService.fetchAllUserTemplates(siteId)
2513
+ .subscribe();
2514
+ }
2515
+ else {
2516
+ (_b = this.formGroup.get('userTemplateId')) === null || _b === void 0 ? void 0 : _b.reset();
2517
+ }
2518
+ });
825
2519
  this.getData();
2520
+ this.formGroup.statusChanges
2521
+ .pipe(startWith(this.formGroup.status), takeUntil(this.destroy$))
2522
+ .subscribe(() => this.validityChange.emit(this.isStepValid()));
826
2523
  }
827
2524
  reseFieldstForm() {
828
2525
  var _a, _b;
829
2526
  (_a = this.formGroup.get('siteId')) === null || _a === void 0 ? void 0 : _a.reset();
830
2527
  (_b = this.formGroup.get('userTemplateId')) === null || _b === void 0 ? void 0 : _b.reset();
831
- this.userCreationWizardService.setSelectedTemplate(null);
2528
+ this.userCreationWizardService.setSelectedTemplate();
832
2529
  this.userCreationWizardService.resetTemplateDrivenData();
833
2530
  }
834
2531
  getData() {
@@ -839,7 +2536,10 @@ class UserTemplateStepComponent {
839
2536
  .subscribe();
840
2537
  }
841
2538
  getSites(isOnlyWithLocations) {
842
- return this.userCreationService.getAllCustomerSites(String(this.customerId), isOnlyWithLocations);
2539
+ this.loadingSites = true;
2540
+ return this.userCreationService.getAllCustomerSites(String(this.customerId), isOnlyWithLocations).pipe(finalize(() => {
2541
+ this.loadingSites = false;
2542
+ }));
843
2543
  }
844
2544
  isCUCM(site) {
845
2545
  var _a;
@@ -851,28 +2551,54 @@ class UserTemplateStepComponent {
851
2551
  const foundedSite = this.sitesList.find((site) => site.id === siteId);
852
2552
  return siteId && foundedSite ? foundedSite.name : '';
853
2553
  }
2554
+ getSelectedTemplateName() {
2555
+ var _a;
2556
+ const templateId = (_a = this.formGroup.get('userTemplateId')) === null || _a === void 0 ? void 0 : _a.value;
2557
+ const foundedTemplate = this.templates.find((template) => String(template.id) === String(templateId));
2558
+ return templateId && foundedTemplate ? foundedTemplate.name : '';
2559
+ }
2560
+ isStepValid() {
2561
+ var _a, _b;
2562
+ const siteId = (_a = this.formGroup.get('siteId')) === null || _a === void 0 ? void 0 : _a.value;
2563
+ const templateId = (_b = this.formGroup.get('userTemplateId')) === null || _b === void 0 ? void 0 : _b.value;
2564
+ return siteId !== null && siteId !== undefined && String(templateId || '').trim().length > 0;
2565
+ }
2566
+ markStepTouched() {
2567
+ var _a, _b;
2568
+ (_a = this.formGroup.get('siteId')) === null || _a === void 0 ? void 0 : _a.markAsTouched();
2569
+ (_b = this.formGroup.get('userTemplateId')) === null || _b === void 0 ? void 0 : _b.markAsTouched();
2570
+ }
854
2571
  ngOnDestroy() {
855
2572
  this.destroy$.next();
856
2573
  this.destroy$.complete();
857
2574
  }
858
2575
  }
859
- 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 });
860
- 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" }] });
2576
+ 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 });
2577
+ 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" }] });
861
2578
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserTemplateStepComponent, decorators: [{
862
2579
  type: Component,
863
- 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"] }]
864
- }], ctorParameters: function () { return [{ type: UserCreationWizardService }, { type: UserCreationApiService }, { type: i3$1.FormBuilder }]; }, propDecorators: { customerId: [{
2580
+ 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"] }]
2581
+ }], ctorParameters: function () { return [{ type: UserCreationWizardService }, { type: UserCreationApiService }, { type: i1$2.FormBuilder }]; }, propDecorators: { customerId: [{
865
2582
  type: Input
2583
+ }], validityChange: [{
2584
+ type: Output
866
2585
  }] } });
867
2586
 
2587
+ const USER_CREATED_SUCCESSFLLY = 'User created successfully';
868
2588
  class UserCreationWizardComponent {
869
- constructor() {
2589
+ constructor(notificationService) {
2590
+ this.notificationService = notificationService;
870
2591
  this.apiService = inject(APIService);
2592
+ this.userCreationWizardService = inject(UserCreationWizardService);
871
2593
  this.title = 'Create User';
872
2594
  this.cancel = new EventEmitter();
873
2595
  this.submit = new EventEmitter();
874
2596
  this.isSubmitting = false;
875
2597
  this.submitTimerId = null;
2598
+ this.selectedIndex = 0;
2599
+ this.templateStepValid = false;
2600
+ this.detailsStepValid = false;
2601
+ this.isLoading = false;
876
2602
  }
877
2603
  ngOnInit() {
878
2604
  this.apiService.token = this.token;
@@ -881,17 +2607,43 @@ class UserCreationWizardComponent {
881
2607
  onCancel() {
882
2608
  this.cancel.emit();
883
2609
  }
2610
+ onStepSelectionChange(event) {
2611
+ this.selectedIndex = event.selectedIndex;
2612
+ if (event.selectedIndex === 1 && event.previouslySelectedIndex === 0) {
2613
+ this.userCreationWizardService.resetUserDetailsStepState();
2614
+ this.detailsStepValid = false;
2615
+ }
2616
+ }
2617
+ onStepperNext(stepper) {
2618
+ var _a, _b, _c, _d, _e;
2619
+ if (stepper.selectedIndex === 0) {
2620
+ if (!((_a = this.templateStep) === null || _a === void 0 ? void 0 : _a.isStepValid())) {
2621
+ (_b = this.templateStep) === null || _b === void 0 ? void 0 : _b.markStepTouched();
2622
+ return;
2623
+ }
2624
+ }
2625
+ if (stepper.selectedIndex === 1) {
2626
+ if (!((_c = this.detailsStep) === null || _c === void 0 ? void 0 : _c.isStepValid())) {
2627
+ (_d = this.detailsStep) === null || _d === void 0 ? void 0 : _d.markAllAsTouched();
2628
+ return;
2629
+ }
2630
+ (_e = this.detailsStep) === null || _e === void 0 ? void 0 : _e.syncToService();
2631
+ }
2632
+ stepper.next();
2633
+ }
884
2634
  onSubmit() {
885
2635
  if (this.isSubmitting) {
886
2636
  return;
887
2637
  }
888
2638
  this.isSubmitting = true;
889
- const delayMs = 3000 + Math.floor(Math.random() * 1001);
890
- this.submitTimerId = window.setTimeout(() => {
891
- this.isSubmitting = false;
892
- this.submitTimerId = null;
893
- this.submit.emit();
894
- }, delayMs);
2639
+ // const delayMs = 3000 + Math.floor(Math.random() * 1001);
2640
+ // this.submitTimerId = window.setTimeout(() => {
2641
+ // this.isSubmitting = false;
2642
+ // this.submitTimerId = null;
2643
+ // this.notificationService.success('User created successfully!');
2644
+ // this.submit.emit();
2645
+ // }, delayMs);
2646
+ this._saveChanges();
895
2647
  }
896
2648
  ngOnDestroy() {
897
2649
  if (this.submitTimerId) {
@@ -899,13 +2651,34 @@ class UserCreationWizardComponent {
899
2651
  this.submitTimerId = null;
900
2652
  }
901
2653
  }
2654
+ _saveChanges() {
2655
+ this.isLoading = true;
2656
+ this.userCreationWizardService.saveNewUser()
2657
+ .subscribe((res) => {
2658
+ this.isLoading = false;
2659
+ this.isSubmitting = false;
2660
+ this.notificationService.success('User created successfully!');
2661
+ this.submit.emit();
2662
+ }, (error) => {
2663
+ var _a;
2664
+ this.isLoading = false;
2665
+ this.isSubmitting = false;
2666
+ if (typeof error === 'string' && error.indexOf(USER_CREATED_SUCCESSFLLY) > -1) {
2667
+ this.notificationService.success('User created successfully!');
2668
+ this.submit.emit();
2669
+ }
2670
+ else {
2671
+ this.notificationService.error(((_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.message) || 'An error occurred while creating the user. Please try again.');
2672
+ }
2673
+ });
2674
+ }
902
2675
  }
903
- UserCreationWizardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
904
- 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\">\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 <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 <div class=\"move-user-tab-content-box\">\r\n <tk-user-template-step [customerId]=\"customerId\"></tk-user-template-step>\r\n </div>\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 <div class=\"move-user-tab-content-box\">\r\n <tk-user-details-step></tk-user-details-step>\r\n </div>\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 <div class=\"move-user-tab-content-box\">\r\n <tk-user-overview-step></tk-user-overview-step>\r\n </div>\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 mat-button class=\"uc-btn uc-btn-primary\" type=\"button\" (click)=\"stepper.next()\">\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 mat-button class=\"uc-btn uc-btn-primary\" type=\"button\" (click)=\"stepper.next()\">\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>\r\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%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}.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 });
2676
+ UserCreationWizardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardComponent, deps: [{ token: NotificationService }], target: i0.ɵɵFactoryTarget.Component });
2677
+ 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 });
905
2678
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardComponent, decorators: [{
906
2679
  type: Component,
907
- args: [{ selector: 'tk-user-creation-wizard', encapsulation: ViewEncapsulation.None, template: "<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 <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 <div class=\"move-user-tab-content-box\">\r\n <tk-user-template-step [customerId]=\"customerId\"></tk-user-template-step>\r\n </div>\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 <div class=\"move-user-tab-content-box\">\r\n <tk-user-details-step></tk-user-details-step>\r\n </div>\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 <div class=\"move-user-tab-content-box\">\r\n <tk-user-overview-step></tk-user-overview-step>\r\n </div>\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 mat-button class=\"uc-btn uc-btn-primary\" type=\"button\" (click)=\"stepper.next()\">\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 mat-button class=\"uc-btn uc-btn-primary\" type=\"button\" (click)=\"stepper.next()\">\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>\r\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%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}.mat-button-disabled{background-color:#bbb;color:#fff;border:1px solid grey;cursor:default!important}\n"] }]
908
- }], propDecorators: { title: [{
2680
+ 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"] }]
2681
+ }], ctorParameters: function () { return [{ type: NotificationService }]; }, propDecorators: { title: [{
909
2682
  type: Input
910
2683
  }], host: [{
911
2684
  type: Input
@@ -917,25 +2690,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
917
2690
  type: Output
918
2691
  }], submit: [{
919
2692
  type: Output
2693
+ }], templateStep: [{
2694
+ type: ViewChild,
2695
+ args: [UserTemplateStepComponent]
2696
+ }], detailsStep: [{
2697
+ type: ViewChild,
2698
+ args: [UserDetailsStepComponent]
920
2699
  }] } });
921
2700
 
2701
+ function HttpLoaderFactory(http) {
2702
+ return new TranslateHttpLoader(http);
2703
+ }
922
2704
  class UserCreationModule {
923
2705
  }
924
2706
  UserCreationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
925
2707
  UserCreationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UserCreationModule, declarations: [UserCreationWizardComponent,
926
2708
  UserTemplateStepComponent,
2709
+ NotificationsComponent,
927
2710
  UserDetailsStepComponent,
928
- UserOverviewStepComponent], imports: [CommonModule,
2711
+ UserOverviewStepComponent,
2712
+ AppLoaderComponent,
2713
+ TruncatePipe], imports: [CommonModule,
929
2714
  SharedModule,
930
2715
  MaterialModule,
931
2716
  MatStepperModule,
932
2717
  MatExpansionModule,
933
2718
  FormsModule,
934
2719
  ReactiveFormsModule,
935
- MatRadioModule], exports: [UserCreationWizardComponent] });
2720
+ MatRadioModule, i1$3.TranslateModule], exports: [UserCreationWizardComponent] });
936
2721
  UserCreationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationModule, providers: [
937
2722
  UserCreationApiService,
938
2723
  UserCreationWizardService,
2724
+ NotificationService,
939
2725
  ], imports: [CommonModule,
940
2726
  SharedModule,
941
2727
  MaterialModule,
@@ -943,15 +2729,25 @@ UserCreationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", vers
943
2729
  MatExpansionModule,
944
2730
  FormsModule,
945
2731
  ReactiveFormsModule,
946
- MatRadioModule] });
2732
+ MatRadioModule,
2733
+ TranslateModule.forRoot({
2734
+ loader: {
2735
+ provide: TranslateLoader,
2736
+ useFactory: HttpLoaderFactory,
2737
+ deps: [HttpClient]
2738
+ }
2739
+ })] });
947
2740
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationModule, decorators: [{
948
2741
  type: NgModule,
949
2742
  args: [{
950
2743
  declarations: [
951
2744
  UserCreationWizardComponent,
952
2745
  UserTemplateStepComponent,
2746
+ NotificationsComponent,
953
2747
  UserDetailsStepComponent,
954
- UserOverviewStepComponent
2748
+ UserOverviewStepComponent,
2749
+ AppLoaderComponent,
2750
+ TruncatePipe,
955
2751
  ],
956
2752
  imports: [
957
2753
  CommonModule,
@@ -961,14 +2757,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
961
2757
  MatExpansionModule,
962
2758
  FormsModule,
963
2759
  ReactiveFormsModule,
964
- MatRadioModule
2760
+ MatRadioModule,
2761
+ TranslateModule.forRoot({
2762
+ loader: {
2763
+ provide: TranslateLoader,
2764
+ useFactory: HttpLoaderFactory,
2765
+ deps: [HttpClient]
2766
+ }
2767
+ }),
965
2768
  ],
966
2769
  exports: [
967
- UserCreationWizardComponent
2770
+ UserCreationWizardComponent,
968
2771
  ],
969
2772
  providers: [
970
2773
  UserCreationApiService,
971
2774
  UserCreationWizardService,
2775
+ NotificationService,
972
2776
  ]
973
2777
  }]
974
2778
  }] });
@@ -986,5 +2790,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
986
2790
  * Generated bundle index. Do not edit.
987
2791
  */
988
2792
 
989
- export { UserCreationModule, UserCreationWizardComponent };
2793
+ export { HttpLoaderFactory, USER_CREATED_SUCCESSFLLY, UserCreationModule, UserCreationWizardComponent };
990
2794
  //# sourceMappingURL=tuki-io-tuki-widgets-user-creation.mjs.map