@tuki-io/tuki-widgets 0.0.190 → 0.0.192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/user-creation/src/app.constants.mjs +9 -2
- package/esm2020/user-creation/src/interfaces/user-creation-wizard.interfaces.mjs +19 -0
- package/esm2020/user-creation/src/shared/material.module.mjs +35 -7
- package/esm2020/user-creation/src/shared/services/user-creation-api.service.mjs +42 -19
- package/esm2020/user-creation/src/user-creation.module.mjs +4 -1
- package/esm2020/user-creation/src/utils/app-loader/app-loader.mjs +14 -0
- package/esm2020/user-creation/src/utils/build-savable-end-user.mjs +147 -0
- package/esm2020/user-creation/src/utils/validation.mjs +14 -0
- package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.mjs +429 -20
- package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-overview-step/user-overview-step.component.mjs +3 -3
- package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-template-step/user-template-step.component.mjs +80 -34
- package/esm2020/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.component.mjs +61 -11
- package/esm2020/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.mjs +509 -130
- package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs +1446 -300
- package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
- package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs +1408 -287
- package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
- package/package.json +1 -1
- package/user-creation/src/app.constants.d.ts +7 -0
- package/user-creation/src/interfaces/user-creation-wizard.interfaces.d.ts +483 -0
- package/user-creation/src/shared/material.module.d.ts +5 -1
- package/user-creation/src/shared/services/user-creation-api.service.d.ts +8 -2
- package/user-creation/src/user-creation.module.d.ts +11 -10
- package/user-creation/src/utils/app-loader/app-loader.d.ts +6 -0
- package/user-creation/src/utils/build-savable-end-user.d.ts +23 -0
- package/user-creation/src/utils/validation.d.ts +4 -0
- package/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.d.ts +75 -7
- package/user-creation/src/widgets/user-creation-wizard/components/user-template-step/user-template-step.component.d.ts +11 -4
- package/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.component.d.ts +13 -0
- package/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.d.ts +57 -56
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as i2 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, Pipe, Component, ChangeDetectionStrategy, NgModule, inject,
|
|
5
|
-
import * as
|
|
6
|
-
import {
|
|
7
|
-
import * as
|
|
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
10
|
import * as i4$1 from '@angular/material/stepper';
|
|
11
11
|
import { MatStepperModule } from '@angular/material/stepper';
|
|
12
|
-
import { Subject, BehaviorSubject, tap, forkJoin, map,
|
|
12
|
+
import { Subject, BehaviorSubject, tap, forkJoin, map, take, catchError, of, finalize, startWith, takeUntil, debounceTime, timer, switchMap, filter, distinctUntilChanged } from 'rxjs';
|
|
13
13
|
import * as i3 from '@angular/material/tooltip';
|
|
14
14
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
15
15
|
import * as i4 from '@angular/material/button';
|
|
@@ -17,20 +17,31 @@ import { MatButtonModule } from '@angular/material/button';
|
|
|
17
17
|
import * as i5 from '@ngx-translate/core';
|
|
18
18
|
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
19
19
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
20
|
-
import * as
|
|
20
|
+
import * as i5$1 from '@angular/material/table';
|
|
21
21
|
import { MatTableModule } from '@angular/material/table';
|
|
22
22
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
23
|
+
import * as i7 from '@angular/material/icon';
|
|
23
24
|
import { MatIconModule } from '@angular/material/icon';
|
|
24
|
-
import * as
|
|
25
|
+
import * as i8 from '@angular/material/form-field';
|
|
25
26
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
26
|
-
import * as
|
|
27
|
+
import * as i9 from '@angular/material/input';
|
|
27
28
|
import { MatInputModule } from '@angular/material/input';
|
|
28
|
-
import * as i7 from '@angular/material/select';
|
|
29
|
+
import * as i7$1 from '@angular/material/select';
|
|
29
30
|
import { MatSelectModule } from '@angular/material/select';
|
|
31
|
+
import * as i12 from '@angular/material/autocomplete';
|
|
32
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
33
|
+
import * as i1$1 from '@angular/material/progress-spinner';
|
|
34
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
35
|
+
import * as i13 from '@angular/material/paginator';
|
|
36
|
+
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
37
|
+
import * as i14 from '@angular/material/chips';
|
|
38
|
+
import { MatChipsModule } from '@angular/material/chips';
|
|
30
39
|
import * as i1 from '@angular/common/http';
|
|
31
40
|
import { HttpHeaders, HttpClientModule, HttpClient } from '@angular/common/http';
|
|
32
41
|
import { NgApexchartsModule } from 'ng-apexcharts';
|
|
33
|
-
import
|
|
42
|
+
import Big from 'big.js';
|
|
43
|
+
import { __rest } from 'tslib';
|
|
44
|
+
import * as i11 from '@angular/material/core';
|
|
34
45
|
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
35
46
|
|
|
36
47
|
const environment = {
|
|
@@ -135,13 +146,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
135
146
|
|
|
136
147
|
const API = {
|
|
137
148
|
WEBEX_CHECK_CONTROL_HUB_INTEGRATION: "/webex/api/search/webex/customers/:customerId/controlhubexists",
|
|
138
|
-
SITES: "/api/customers/:customerId/sites",
|
|
149
|
+
SITES: "/dcp/api/customers/:customerId/sites",
|
|
139
150
|
SITE: "/dcp/api/sites/:siteId",
|
|
140
151
|
DEVICE_TYPES: "/dcp/api/provision/options/:siteId/devicetypes",
|
|
141
152
|
SITE_SETTINGS: "/dcp/api/sites/:siteId/settings",
|
|
142
153
|
VM_USER_TEMPLATES: "/dcp/api/provision/options/:siteId/vmusertemplates",
|
|
154
|
+
EXISTING_USERS: "/dcp/api/provision/:siteId/users",
|
|
143
155
|
USER_TEMPLATES_UPLOAD_LIST: "/dcp/api/searchbulkupdate/uploadedusertemplatelist",
|
|
144
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",
|
|
145
163
|
};
|
|
146
164
|
const USER_CREATION_TYPES = {
|
|
147
165
|
CUCM: 'CUCM',
|
|
@@ -226,7 +244,11 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
|
|
|
226
244
|
MatIconModule,
|
|
227
245
|
MatFormFieldModule,
|
|
228
246
|
MatInputModule,
|
|
229
|
-
MatSelectModule
|
|
247
|
+
MatSelectModule,
|
|
248
|
+
MatAutocompleteModule,
|
|
249
|
+
MatProgressSpinnerModule,
|
|
250
|
+
MatPaginatorModule,
|
|
251
|
+
MatChipsModule], exports: [MatProgressBarModule,
|
|
230
252
|
MatTooltipModule,
|
|
231
253
|
MatTableModule,
|
|
232
254
|
MatCheckboxModule,
|
|
@@ -234,7 +256,11 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
|
|
|
234
256
|
MatIconModule,
|
|
235
257
|
MatFormFieldModule,
|
|
236
258
|
MatInputModule,
|
|
237
|
-
MatSelectModule
|
|
259
|
+
MatSelectModule,
|
|
260
|
+
MatAutocompleteModule,
|
|
261
|
+
MatProgressSpinnerModule,
|
|
262
|
+
MatPaginatorModule,
|
|
263
|
+
MatChipsModule] });
|
|
238
264
|
MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [MatProgressBarModule,
|
|
239
265
|
MatTooltipModule,
|
|
240
266
|
MatTableModule,
|
|
@@ -243,7 +269,11 @@ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
243
269
|
MatIconModule,
|
|
244
270
|
MatFormFieldModule,
|
|
245
271
|
MatInputModule,
|
|
246
|
-
MatSelectModule,
|
|
272
|
+
MatSelectModule,
|
|
273
|
+
MatAutocompleteModule,
|
|
274
|
+
MatProgressSpinnerModule,
|
|
275
|
+
MatPaginatorModule,
|
|
276
|
+
MatChipsModule, MatProgressBarModule,
|
|
247
277
|
MatTooltipModule,
|
|
248
278
|
MatTableModule,
|
|
249
279
|
MatCheckboxModule,
|
|
@@ -251,7 +281,11 @@ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
251
281
|
MatIconModule,
|
|
252
282
|
MatFormFieldModule,
|
|
253
283
|
MatInputModule,
|
|
254
|
-
MatSelectModule
|
|
284
|
+
MatSelectModule,
|
|
285
|
+
MatAutocompleteModule,
|
|
286
|
+
MatProgressSpinnerModule,
|
|
287
|
+
MatPaginatorModule,
|
|
288
|
+
MatChipsModule] });
|
|
255
289
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
|
|
256
290
|
type: NgModule,
|
|
257
291
|
args: [{
|
|
@@ -264,7 +298,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
264
298
|
MatIconModule,
|
|
265
299
|
MatFormFieldModule,
|
|
266
300
|
MatInputModule,
|
|
267
|
-
MatSelectModule
|
|
301
|
+
MatSelectModule,
|
|
302
|
+
MatAutocompleteModule,
|
|
303
|
+
MatProgressSpinnerModule,
|
|
304
|
+
MatPaginatorModule,
|
|
305
|
+
MatChipsModule,
|
|
268
306
|
],
|
|
269
307
|
exports: [
|
|
270
308
|
MatProgressBarModule,
|
|
@@ -275,81 +313,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
275
313
|
MatIconModule,
|
|
276
314
|
MatFormFieldModule,
|
|
277
315
|
MatInputModule,
|
|
278
|
-
MatSelectModule
|
|
316
|
+
MatSelectModule,
|
|
317
|
+
MatAutocompleteModule,
|
|
318
|
+
MatProgressSpinnerModule,
|
|
319
|
+
MatPaginatorModule,
|
|
320
|
+
MatChipsModule,
|
|
279
321
|
]
|
|
280
322
|
}]
|
|
281
323
|
}] });
|
|
282
324
|
|
|
283
|
-
const getSavableData = (model, exclude) => {
|
|
284
|
-
let result = Object.keys(model);
|
|
285
|
-
if (exclude && exclude.length) {
|
|
286
|
-
result = result.filter(key => !exclude.some(item => item === key));
|
|
287
|
-
}
|
|
288
|
-
return result.reduce((result, key) => {
|
|
289
|
-
if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
|
|
290
|
-
result[key] = model[key].map((item) => item.getSavableData());
|
|
291
|
-
}
|
|
292
|
-
else if (model[key] instanceof Object && model[key].getSavableData) {
|
|
293
|
-
result[key] = model[key].getSavableData();
|
|
294
|
-
}
|
|
295
|
-
else {
|
|
296
|
-
result[key] = model[key];
|
|
297
|
-
}
|
|
298
|
-
return result;
|
|
299
|
-
}, {});
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
class Site {
|
|
303
|
-
constructor(site) {
|
|
304
|
-
Object.assign(this, site);
|
|
305
|
-
this.initForm();
|
|
306
|
-
}
|
|
307
|
-
initForm() {
|
|
308
|
-
const formBuilder = new FormBuilder();
|
|
309
|
-
const formSettings = {
|
|
310
|
-
name: [this.name || '', [Validators.required]],
|
|
311
|
-
shortName: [this.shortName || '', [Validators.required]],
|
|
312
|
-
cucm: [this.cucm || ''],
|
|
313
|
-
cuc: [this.cuc || ''],
|
|
314
|
-
address1: [this.address1 || ''],
|
|
315
|
-
zipCode: [this.country || ''],
|
|
316
|
-
city: [this.city || ''],
|
|
317
|
-
state: [this.state || ''],
|
|
318
|
-
country: [this.country || '', [Validators.required]],
|
|
319
|
-
isAfterTtu: [this.isAfterTtu || ''],
|
|
320
|
-
ttuEnableDate: [this.ttuEnableDate || '']
|
|
321
|
-
};
|
|
322
|
-
this.form = formBuilder.group(formSettings);
|
|
323
|
-
}
|
|
324
|
-
getSavableData() {
|
|
325
|
-
const nonSavableData = ['form'];
|
|
326
|
-
return getSavableData(this, nonSavableData);
|
|
327
|
-
}
|
|
328
|
-
getId() {
|
|
329
|
-
return this.id;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
class SiteDefaults {
|
|
333
|
-
constructor(siteDefaults, isSharedLineSite) {
|
|
334
|
-
this.routePartitionFilter = [];
|
|
335
|
-
this.devicePoolFilter = [];
|
|
336
|
-
this.cssFilter = [];
|
|
337
|
-
this.voicemailProfileFilter = [];
|
|
338
|
-
if (siteDefaults) {
|
|
339
|
-
Object.assign(this, siteDefaults);
|
|
340
|
-
this.enableEm = siteDefaults.enableEm === 'true';
|
|
341
|
-
this.routePartitionFilter.sort();
|
|
342
|
-
this.devicePoolFilter.sort();
|
|
343
|
-
this.cssFilter.sort();
|
|
344
|
-
this.voicemailProfileFilter.sort();
|
|
345
|
-
}
|
|
346
|
-
if (isSharedLineSite) {
|
|
347
|
-
this.cssFilter = (siteDefaults === null || siteDefaults === void 0 ? void 0 : siteDefaults.sharedSitesCssFilter) || [];
|
|
348
|
-
this.routePartitionFilter = (siteDefaults === null || siteDefaults === void 0 ? void 0 : siteDefaults.sharedSitesRPFilter) || [];
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
|
|
353
325
|
class APIService {
|
|
354
326
|
constructor(httpClient) {
|
|
355
327
|
this.httpClient = httpClient;
|
|
@@ -427,6 +399,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
427
399
|
}]
|
|
428
400
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
429
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
|
+
};
|
|
430
422
|
class UserCreationApiService {
|
|
431
423
|
constructor() {
|
|
432
424
|
this._allSites = [];
|
|
@@ -456,32 +448,21 @@ class UserCreationApiService {
|
|
|
456
448
|
// }
|
|
457
449
|
// this.allCustomerSites$.next(true);
|
|
458
450
|
// return this._allSites;
|
|
459
|
-
this.sitesListSubject$.next(res.pageData);
|
|
451
|
+
this.sitesListSubject$.next([BERLIN_MT_SITE, ...res.pageData].sort((a, b) => a.name.localeCompare(b.name)));
|
|
460
452
|
}));
|
|
461
453
|
// .pipe(this.handleError(true));
|
|
462
454
|
}
|
|
463
|
-
|
|
455
|
+
getSiteAllData(siteId) {
|
|
464
456
|
// this.dataPending = true;
|
|
465
457
|
return forkJoin([
|
|
466
458
|
this.getSite(siteId),
|
|
467
|
-
this.getDeviceTypes(siteId),
|
|
468
459
|
this.getSiteDefaults(siteId, false),
|
|
469
|
-
this.
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
}));
|
|
460
|
+
// this.getDeviceTypes(siteId),
|
|
461
|
+
// this.getVoiceMailUserTemplates(siteId)
|
|
462
|
+
]);
|
|
473
463
|
}
|
|
474
464
|
getSite(siteId, isEdit) {
|
|
475
|
-
return this.apiService.fetch(API.SITE.replace(':siteId', String(siteId)), null, false)
|
|
476
|
-
.pipe(map((siteData) => {
|
|
477
|
-
const site = new Site(siteData);
|
|
478
|
-
// if (isEdit) {
|
|
479
|
-
// this.setEditSite(site);
|
|
480
|
-
// } else {
|
|
481
|
-
// this.setCurrentSite(site);
|
|
482
|
-
// }
|
|
483
|
-
return site;
|
|
484
|
-
}));
|
|
465
|
+
return this.apiService.fetch(API.SITE.replace(':siteId', String(siteId)), null, false);
|
|
485
466
|
}
|
|
486
467
|
getDeviceTypes(siteId) {
|
|
487
468
|
return this.apiService.fetch(API.DEVICE_TYPES.replace(':siteId', String(siteId)), null, true);
|
|
@@ -525,6 +506,21 @@ class UserCreationApiService {
|
|
|
525
506
|
return this.apiService.fetch(API.USER_TEMPLATE_TOKEN.replace(':customerId', customerId).replace(':id', id));
|
|
526
507
|
// .pipe(this.handleError(false, true));
|
|
527
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
|
+
return this.apiService.fetch(API.DEVICE_DEFAULTS.replace(':siteId', siteId).replace(':deviceType', deviceType));
|
|
523
|
+
}
|
|
528
524
|
}
|
|
529
525
|
UserCreationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
530
526
|
UserCreationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationApiService });
|
|
@@ -580,11 +576,281 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
580
576
|
}]
|
|
581
577
|
}] });
|
|
582
578
|
|
|
579
|
+
const MAC_ADDRESS_REGEX = /^[A-Fa-f0-9]{12}$/;
|
|
580
|
+
const Validation = {
|
|
581
|
+
macAddress() {
|
|
582
|
+
return (control) => {
|
|
583
|
+
var _a;
|
|
584
|
+
const raw = String((_a = control.value) !== null && _a !== void 0 ? _a : '').trim();
|
|
585
|
+
if (!raw) {
|
|
586
|
+
return null;
|
|
587
|
+
}
|
|
588
|
+
const normalized = raw.replace(/^SEP\s*/i, '').trim();
|
|
589
|
+
return MAC_ADDRESS_REGEX.test(normalized) ? null : { macAddress: true };
|
|
590
|
+
};
|
|
591
|
+
},
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
const getSavableData = (model, exclude) => {
|
|
595
|
+
let result = Object.keys(model);
|
|
596
|
+
if (exclude && exclude.length) {
|
|
597
|
+
result = result.filter(key => !exclude.some(item => item === key));
|
|
598
|
+
}
|
|
599
|
+
return result.reduce((result, key) => {
|
|
600
|
+
if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
|
|
601
|
+
result[key] = model[key].map((item) => item.getSavableData());
|
|
602
|
+
}
|
|
603
|
+
else if (model[key] instanceof Object && model[key].getSavableData) {
|
|
604
|
+
result[key] = model[key].getSavableData();
|
|
605
|
+
}
|
|
606
|
+
else {
|
|
607
|
+
result[key] = model[key];
|
|
608
|
+
}
|
|
609
|
+
return result;
|
|
610
|
+
}, {});
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
class Site {
|
|
614
|
+
constructor(site) {
|
|
615
|
+
Object.assign(this, site);
|
|
616
|
+
this.initForm();
|
|
617
|
+
}
|
|
618
|
+
initForm() {
|
|
619
|
+
const formBuilder = new FormBuilder();
|
|
620
|
+
const formSettings = {
|
|
621
|
+
name: [this.name || '', [Validators.required]],
|
|
622
|
+
shortName: [this.shortName || '', [Validators.required]],
|
|
623
|
+
cucm: [this.cucm || ''],
|
|
624
|
+
cuc: [this.cuc || ''],
|
|
625
|
+
address1: [this.address1 || ''],
|
|
626
|
+
zipCode: [this.country || ''],
|
|
627
|
+
city: [this.city || ''],
|
|
628
|
+
state: [this.state || ''],
|
|
629
|
+
country: [this.country || '', [Validators.required]],
|
|
630
|
+
isAfterTtu: [this.isAfterTtu || ''],
|
|
631
|
+
ttuEnableDate: [this.ttuEnableDate || '']
|
|
632
|
+
};
|
|
633
|
+
this.form = formBuilder.group(formSettings);
|
|
634
|
+
}
|
|
635
|
+
getSavableData() {
|
|
636
|
+
const nonSavableData = ['form'];
|
|
637
|
+
return getSavableData(this, nonSavableData);
|
|
638
|
+
}
|
|
639
|
+
getId() {
|
|
640
|
+
return this.id;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
class SiteDefaults {
|
|
644
|
+
constructor(siteDefaults, isSharedLineSite) {
|
|
645
|
+
this.routePartitionFilter = [];
|
|
646
|
+
this.devicePoolFilter = [];
|
|
647
|
+
this.cssFilter = [];
|
|
648
|
+
this.voicemailProfileFilter = [];
|
|
649
|
+
if (siteDefaults) {
|
|
650
|
+
Object.assign(this, siteDefaults);
|
|
651
|
+
this.enableEm = siteDefaults.enableEm === 'true';
|
|
652
|
+
this.routePartitionFilter.sort();
|
|
653
|
+
this.devicePoolFilter.sort();
|
|
654
|
+
this.cssFilter.sort();
|
|
655
|
+
this.voicemailProfileFilter.sort();
|
|
656
|
+
}
|
|
657
|
+
if (isSharedLineSite) {
|
|
658
|
+
this.cssFilter = (siteDefaults === null || siteDefaults === void 0 ? void 0 : siteDefaults.sharedSitesCssFilter) || [];
|
|
659
|
+
this.routePartitionFilter = (siteDefaults === null || siteDefaults === void 0 ? void 0 : siteDefaults.sharedSitesRPFilter) || [];
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
var DnRangeType;
|
|
665
|
+
(function (DnRangeType) {
|
|
666
|
+
DnRangeType["extension"] = "EXTENSION";
|
|
667
|
+
DnRangeType["cpg"] = "CPG";
|
|
668
|
+
DnRangeType["callpark"] = "CALLPARK";
|
|
669
|
+
DnRangeType["huntgroup"] = "HUNTGROUP";
|
|
670
|
+
DnRangeType["meetme"] = "MEETME";
|
|
671
|
+
DnRangeType["did"] = "DID";
|
|
672
|
+
})(DnRangeType || (DnRangeType = {}));
|
|
673
|
+
var UserViewType;
|
|
674
|
+
(function (UserViewType) {
|
|
675
|
+
UserViewType[UserViewType["details"] = 0] = "details";
|
|
676
|
+
UserViewType[UserViewType["devices"] = 1] = "devices";
|
|
677
|
+
UserViewType[UserViewType["lines"] = 2] = "lines";
|
|
678
|
+
UserViewType[UserViewType["snr"] = 3] = "snr";
|
|
679
|
+
UserViewType[UserViewType["features"] = 4] = "features";
|
|
680
|
+
UserViewType[UserViewType["overview"] = 5] = "overview";
|
|
681
|
+
})(UserViewType || (UserViewType = {}));
|
|
682
|
+
|
|
683
|
+
const ENTITY_CHANGE_TYPE = {
|
|
684
|
+
ADDED: 'added',
|
|
685
|
+
UPDATED: 'updated',
|
|
686
|
+
EXISTING: 'existing',
|
|
687
|
+
REMOVED: 'removed',
|
|
688
|
+
};
|
|
689
|
+
function deepClone(value) {
|
|
690
|
+
return JSON.parse(JSON.stringify(value));
|
|
691
|
+
}
|
|
692
|
+
function toApiBooleanString(value) {
|
|
693
|
+
if (value === true || value === 'true') {
|
|
694
|
+
return 'true';
|
|
695
|
+
}
|
|
696
|
+
if (value === false || value === 'false') {
|
|
697
|
+
return 'false';
|
|
698
|
+
}
|
|
699
|
+
return value == null || value === '' ? '' : String(value);
|
|
700
|
+
}
|
|
701
|
+
function toApiStringValue(value) {
|
|
702
|
+
if (value === true) {
|
|
703
|
+
return 'true';
|
|
704
|
+
}
|
|
705
|
+
if (value === false) {
|
|
706
|
+
return 'false';
|
|
707
|
+
}
|
|
708
|
+
return value == null ? '' : String(value);
|
|
709
|
+
}
|
|
710
|
+
function normalizeCallInfoDisplay(callInfoDisplay) {
|
|
711
|
+
if (!callInfoDisplay) {
|
|
712
|
+
return null;
|
|
713
|
+
}
|
|
714
|
+
if (typeof callInfoDisplay === 'string') {
|
|
715
|
+
try {
|
|
716
|
+
const parsed = JSON.parse(callInfoDisplay);
|
|
717
|
+
return normalizeCallInfoDisplay(parsed);
|
|
718
|
+
}
|
|
719
|
+
catch (_a) {
|
|
720
|
+
return null;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
if (typeof callInfoDisplay !== 'object') {
|
|
724
|
+
return null;
|
|
725
|
+
}
|
|
726
|
+
const source = callInfoDisplay;
|
|
727
|
+
return {
|
|
728
|
+
callerName: source['callerName'] != null ? toApiBooleanString(source['callerName']) : null,
|
|
729
|
+
callerNumber: source['callerNumber'] != null ? toApiBooleanString(source['callerNumber']) : null,
|
|
730
|
+
redirectedNumber: source['redirectedNumber'] != null ? toApiBooleanString(source['redirectedNumber']) : null,
|
|
731
|
+
dialedNumber: source['dialedNumber'] != null ? toApiBooleanString(source['dialedNumber']) : null,
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
function normalizeDidPattern(didPattern, line, directoryNumber) {
|
|
735
|
+
var _a;
|
|
736
|
+
if (didPattern && typeof didPattern === 'object') {
|
|
737
|
+
return didPattern;
|
|
738
|
+
}
|
|
739
|
+
if (typeof didPattern === 'string' && didPattern.trim()) {
|
|
740
|
+
return { calledPartyTransformationMask: didPattern };
|
|
741
|
+
}
|
|
742
|
+
const dn = directoryNumber || ((_a = line === null || line === void 0 ? void 0 : line.directoryNumber) === null || _a === void 0 ? void 0 : _a.directoryNumber);
|
|
743
|
+
if (dn) {
|
|
744
|
+
return { calledPartyTransformationMask: dn };
|
|
745
|
+
}
|
|
746
|
+
return null;
|
|
747
|
+
}
|
|
748
|
+
function normalizeDirectoryNumber(directoryNumber) {
|
|
749
|
+
var _a, _b, _c;
|
|
750
|
+
const { displayValue: _displayValue } = directoryNumber, rest = __rest(directoryNumber, ["displayValue"]);
|
|
751
|
+
return {
|
|
752
|
+
directoryNumber: (_a = rest.directoryNumber) !== null && _a !== void 0 ? _a : '',
|
|
753
|
+
routePartitionName: (_b = rest.routePartitionName) !== null && _b !== void 0 ? _b : '',
|
|
754
|
+
templateDirectoryNumber: rest.templateDirectoryNumber,
|
|
755
|
+
pkid: rest.pkid || null,
|
|
756
|
+
dnType: rest.dnType || null,
|
|
757
|
+
subType: (_c = rest.subType) !== null && _c !== void 0 ? _c : null,
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
function prepareLineAssociation(association, line) {
|
|
761
|
+
var _a, _b, _c, _d;
|
|
762
|
+
const prepared = deepClone(association);
|
|
763
|
+
const lineDn = line === null || line === void 0 ? void 0 : line.directoryNumber;
|
|
764
|
+
if (lineDn) {
|
|
765
|
+
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 });
|
|
766
|
+
}
|
|
767
|
+
prepared.directoryNumber = normalizeDirectoryNumber(prepared.directoryNumber);
|
|
768
|
+
prepared.entityChangeType = prepared.entityChangeType || ENTITY_CHANGE_TYPE.ADDED;
|
|
769
|
+
prepared.logMissedCall = toApiBooleanString(prepared.logMissedCall);
|
|
770
|
+
prepared.callInfoDisplay = normalizeCallInfoDisplay(prepared.callInfoDisplay);
|
|
771
|
+
prepared.didPattern = normalizeDidPattern(prepared.didPattern, line, (_c = prepared.directoryNumber) === null || _c === void 0 ? void 0 : _c.directoryNumber);
|
|
772
|
+
prepared.visualMWI = toApiStringValue(prepared.visualMWI);
|
|
773
|
+
prepared.audibleMWI = toApiStringValue(prepared.audibleMWI);
|
|
774
|
+
prepared.associated = (_d = prepared.associated) !== null && _d !== void 0 ? _d : true;
|
|
775
|
+
return prepared;
|
|
776
|
+
}
|
|
777
|
+
function prepareLine(line) {
|
|
778
|
+
const prepared = deepClone(line);
|
|
779
|
+
prepared.entityChangeType = prepared.entityChangeType || ENTITY_CHANGE_TYPE.ADDED;
|
|
780
|
+
if (prepared.directoryNumber) {
|
|
781
|
+
prepared.directoryNumber = normalizeDirectoryNumber(prepared.directoryNumber);
|
|
782
|
+
}
|
|
783
|
+
return prepared;
|
|
784
|
+
}
|
|
785
|
+
function syncDeviceLineAssociations(device, lines) {
|
|
786
|
+
device.lineAssociations = (device.lineAssociations || []).map((association, index) => prepareLineAssociation(association, lines[index]));
|
|
787
|
+
}
|
|
788
|
+
function prepareDeviceForSave(device, userId, lines, deviceName) {
|
|
789
|
+
var _a;
|
|
790
|
+
const prepared = deepClone(device);
|
|
791
|
+
const resolvedName = deviceName.trim();
|
|
792
|
+
prepared.name = resolvedName;
|
|
793
|
+
prepared.newName = resolvedName;
|
|
794
|
+
prepared.entityChangeType = prepared.entityChangeType || ENTITY_CHANGE_TYPE.ADDED;
|
|
795
|
+
prepared.createDeviceMode = (_a = prepared.createDeviceMode) !== null && _a !== void 0 ? _a : false;
|
|
796
|
+
if (prepared.extraOptions) {
|
|
797
|
+
prepared.extraOptions.mobilityUserId = userId;
|
|
798
|
+
}
|
|
799
|
+
syncDeviceLineAssociations(prepared, lines);
|
|
800
|
+
return prepared;
|
|
801
|
+
}
|
|
802
|
+
function resolvePrimaryLineReference(user) {
|
|
803
|
+
var _a, _b, _c, _d, _e, _f;
|
|
804
|
+
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;
|
|
805
|
+
if (firstDeviceAssociation) {
|
|
806
|
+
return firstDeviceAssociation;
|
|
807
|
+
}
|
|
808
|
+
const firstLineDn = (_f = (_e = user.lines) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.directoryNumber;
|
|
809
|
+
return firstLineDn !== null && firstLineDn !== void 0 ? firstLineDn : null;
|
|
810
|
+
}
|
|
811
|
+
function buildSavableEndUser(endUser, lines, devices, deviceProfiles, form, options = {}) {
|
|
812
|
+
const user = deepClone(endUser);
|
|
813
|
+
user.userid = form.userId || user.userid || '';
|
|
814
|
+
user.firstName = form.firstName || user.firstName || '';
|
|
815
|
+
user.lastName = form.lastName || user.lastName || '';
|
|
816
|
+
user.email = form.email || user.email || '';
|
|
817
|
+
user.createUserMode = false;
|
|
818
|
+
user.lines = (lines || []).map(line => prepareLine(line));
|
|
819
|
+
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 : ''); });
|
|
820
|
+
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 : ''); });
|
|
821
|
+
user.primaryLineReference = resolvePrimaryLineReference(user);
|
|
822
|
+
const snr = user.singleNumberReach;
|
|
823
|
+
if (snr && !snr.remoteDestinationProfileName) {
|
|
824
|
+
user.singleNumberReach = null;
|
|
825
|
+
}
|
|
826
|
+
return user;
|
|
827
|
+
}
|
|
828
|
+
|
|
583
829
|
class UserCreationWizardService {
|
|
830
|
+
get currentSite() {
|
|
831
|
+
return this._currentSite;
|
|
832
|
+
}
|
|
833
|
+
get firstLineRoutePartition() {
|
|
834
|
+
var _a, _b, _c;
|
|
835
|
+
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 : '';
|
|
836
|
+
}
|
|
837
|
+
get siteDefaultRoutePartition() {
|
|
838
|
+
var _a;
|
|
839
|
+
return ((_a = this.siteDefaults) === null || _a === void 0 ? void 0 : _a.routePartition) || '';
|
|
840
|
+
}
|
|
841
|
+
get routePartitionNamesList() {
|
|
842
|
+
return this.siteDefaults ? this.siteDefaults.routePartitionFilter : [];
|
|
843
|
+
}
|
|
584
844
|
constructor() {
|
|
585
|
-
this.
|
|
845
|
+
this.userCreationApiService = inject(UserCreationApiService);
|
|
586
846
|
this.ldapTableColumns = ['userId', 'firstName', 'lastName', 'email', 'add'];
|
|
587
847
|
this.userCreationTypes = ['CUCM', 'MT'];
|
|
848
|
+
this.template = null;
|
|
849
|
+
this.endUser = null;
|
|
850
|
+
this.lines = [];
|
|
851
|
+
this.devices = [];
|
|
852
|
+
this.deviceProfiles = [];
|
|
853
|
+
this._currentSite = null;
|
|
588
854
|
this.siteOptions = [];
|
|
589
855
|
this.templateOptions = [];
|
|
590
856
|
this.lineOptions = [];
|
|
@@ -594,41 +860,90 @@ class UserCreationWizardService {
|
|
|
594
860
|
this.overviewUsers = [];
|
|
595
861
|
this.overviewLines = [];
|
|
596
862
|
this.overviewDevices = [];
|
|
863
|
+
this.overviewDeviceProfiles = [];
|
|
864
|
+
this.userDetailsFormValue = null;
|
|
597
865
|
this.userDetailsForm = {
|
|
598
866
|
userId: '',
|
|
599
867
|
firstName: '',
|
|
600
868
|
lastName: '',
|
|
601
|
-
email: ''
|
|
869
|
+
email: '',
|
|
602
870
|
};
|
|
603
871
|
this.lineSelections = [];
|
|
604
872
|
this.deviceEntries = [];
|
|
873
|
+
this.availableNumbers = [];
|
|
874
|
+
this.deviceTypes = [];
|
|
875
|
+
this.siteDefaults = null;
|
|
876
|
+
this.originalSiteDefaults = null;
|
|
877
|
+
this.templateLines = [];
|
|
878
|
+
this.templateDevices = [];
|
|
879
|
+
this.templateUserDetails = {};
|
|
605
880
|
this.selectedSite = null;
|
|
606
|
-
this.
|
|
881
|
+
this.selectedTemplateName = null;
|
|
882
|
+
this.selectedTemplateId = null;
|
|
607
883
|
this.selectedUserCreationType = 'CUCM';
|
|
608
|
-
this.
|
|
609
|
-
this.
|
|
884
|
+
this.availableDidPatternsMappedToDn = {};
|
|
885
|
+
this.selectedLdapUser = null;
|
|
886
|
+
this.ldapUsersTotal = 0;
|
|
887
|
+
// this.loadPlaceholderData();
|
|
610
888
|
}
|
|
611
|
-
|
|
889
|
+
get isLdapIntegrated() {
|
|
890
|
+
var _a;
|
|
891
|
+
return !!((_a = this.endUser) === null || _a === void 0 ? void 0 : _a.ldapIntegrated);
|
|
892
|
+
}
|
|
893
|
+
selectLdapUser(user) {
|
|
894
|
+
var _a, _b, _c, _d, _e, _f;
|
|
895
|
+
this.selectedLdapUser = user;
|
|
896
|
+
if (this.endUser) {
|
|
897
|
+
this.endUser.ldapIntegrated = true;
|
|
898
|
+
this.endUser.userid = user.userid;
|
|
899
|
+
this.endUser.firstName = (_a = user.firstName) !== null && _a !== void 0 ? _a : '';
|
|
900
|
+
this.endUser.lastName = (_b = user.lastName) !== null && _b !== void 0 ? _b : '';
|
|
901
|
+
this.endUser.email = (_c = user.email) !== null && _c !== void 0 ? _c : '';
|
|
902
|
+
}
|
|
612
903
|
this.userDetailsForm = {
|
|
613
|
-
userId:
|
|
614
|
-
firstName:
|
|
615
|
-
lastName:
|
|
616
|
-
email:
|
|
904
|
+
userId: user.userid,
|
|
905
|
+
firstName: (_d = user.firstName) !== null && _d !== void 0 ? _d : '',
|
|
906
|
+
lastName: (_e = user.lastName) !== null && _e !== void 0 ? _e : '',
|
|
907
|
+
email: (_f = user.email) !== null && _f !== void 0 ? _f : '',
|
|
617
908
|
};
|
|
618
|
-
this.addedLdapUserIds.clear();
|
|
619
|
-
this.addedLdapUserIds.add(row.userId);
|
|
620
909
|
this.rebuildOverviewUsers();
|
|
621
910
|
}
|
|
622
|
-
|
|
623
|
-
|
|
911
|
+
clearLdapUserSelection() {
|
|
912
|
+
this.selectedLdapUser = null;
|
|
913
|
+
if (this.endUser) {
|
|
914
|
+
this.endUser.ldapIntegrated = false;
|
|
915
|
+
this.endUser.userid = '';
|
|
916
|
+
this.endUser.firstName = '';
|
|
917
|
+
this.endUser.lastName = '';
|
|
918
|
+
this.endUser.email = '';
|
|
919
|
+
}
|
|
920
|
+
this.userDetailsForm = {
|
|
921
|
+
userId: '',
|
|
922
|
+
firstName: '',
|
|
923
|
+
lastName: '',
|
|
924
|
+
email: '',
|
|
925
|
+
};
|
|
926
|
+
this.rebuildOverviewUsers();
|
|
927
|
+
}
|
|
928
|
+
isLdapUserRowSelected(row) {
|
|
929
|
+
var _a;
|
|
930
|
+
return ((_a = this.selectedLdapUser) === null || _a === void 0 ? void 0 : _a.userid) === row.userid;
|
|
931
|
+
}
|
|
932
|
+
setLdapUsersResult(users, total) {
|
|
933
|
+
this.ldapUsers = users;
|
|
934
|
+
this.ldapUsersTotal = total;
|
|
624
935
|
}
|
|
625
936
|
setSelectedSite(site) {
|
|
626
|
-
this.selectedSite = site;
|
|
937
|
+
this.selectedSite = site || null;
|
|
627
938
|
}
|
|
628
939
|
setSelectedTemplate(template) {
|
|
629
|
-
this.
|
|
940
|
+
this.selectedTemplateName = (template === null || template === void 0 ? void 0 : template.name) || null;
|
|
941
|
+
this.selectedTemplateId = (template === null || template === void 0 ? void 0 : template.id) || null;
|
|
630
942
|
this.rebuildOverviewUsers();
|
|
631
943
|
}
|
|
944
|
+
setCurrentSite(site) {
|
|
945
|
+
this._currentSite = site;
|
|
946
|
+
}
|
|
632
947
|
resetTemplateDrivenData() {
|
|
633
948
|
this.lineOptions = [];
|
|
634
949
|
this.routePartitionOptions = [];
|
|
@@ -639,76 +954,79 @@ class UserCreationWizardService {
|
|
|
639
954
|
this.rebuildOverviewDevices();
|
|
640
955
|
}
|
|
641
956
|
applyTemplateTokenPayload(payload) {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
this.
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
this.
|
|
710
|
-
|
|
711
|
-
this.
|
|
957
|
+
var _a, _b, _c, _d;
|
|
958
|
+
this.template = this.extractTemplateFromTokenPayload(payload);
|
|
959
|
+
this.endUser = ((_a = this.template) === null || _a === void 0 ? void 0 : _a.endUser) || null;
|
|
960
|
+
this.lines = this.endUser && Array.isArray((_b = this.endUser) === null || _b === void 0 ? void 0 : _b.lines) ? this.endUser.lines : [];
|
|
961
|
+
this.devices = this.endUser && Array.isArray((_c = this.endUser) === null || _c === void 0 ? void 0 : _c.devices) ? this.endUser.devices : [];
|
|
962
|
+
this.deviceProfiles = this.endUser && Array.isArray((_d = this.endUser) === null || _d === void 0 ? void 0 : _d.deviceProfiles) ? this.endUser.deviceProfiles : [];
|
|
963
|
+
this.initTemplateDnsNamesForLines();
|
|
964
|
+
// this.userDetailsForm = {
|
|
965
|
+
// userId: this.valueToString(this.endUser?.userid ?? ''),
|
|
966
|
+
// firstName: this.valueToString(this.endUser?.firstName ?? ''),
|
|
967
|
+
// lastName: this.valueToString(this.endUser?.lastName ?? ''),
|
|
968
|
+
// email: this.valueToString(this.endUser?.email ?? '')
|
|
969
|
+
// };
|
|
970
|
+
// const mappedLineOptions: LineOption[] = linesFromTemplate
|
|
971
|
+
// .map(line => ({
|
|
972
|
+
// number: this.valueToString(line?.directoryNumber?.directoryNumber),
|
|
973
|
+
// did: this.valueToString(line?.didPatterns?.[0]?.pattern || line?.directoryNumber?.directoryNumber),
|
|
974
|
+
// css: this.valueToString(
|
|
975
|
+
// typeof line?.callingSearchSpace === 'string'
|
|
976
|
+
// ? line.callingSearchSpace
|
|
977
|
+
// : line?.callingSearchSpace?.name
|
|
978
|
+
// ),
|
|
979
|
+
// description: this.valueToString(line?.description)
|
|
980
|
+
// }))
|
|
981
|
+
// .filter(line => line.number.trim().length > 0);
|
|
982
|
+
this.devices.forEach(device => this.initDeviceWithSiteInfo(device));
|
|
983
|
+
this.deviceProfiles.forEach(device => this.initDeviceWithSiteInfo(device));
|
|
984
|
+
this.lines.forEach(line => this.initLineWithSiteInfo(line));
|
|
985
|
+
// if (mappedLineOptions.length) {
|
|
986
|
+
// this.lineOptions = this.uniqueByNumber(mappedLineOptions);
|
|
987
|
+
// this.lineSelections = this.lineOptions.map(line => ({
|
|
988
|
+
// lineNumber: line.number,
|
|
989
|
+
// routePartitionName: linesFromTemplate.find(
|
|
990
|
+
// source => (source?.directoryNumber?.directoryNumber || '') === line.number
|
|
991
|
+
// )?.directoryNumber?.routePartitionName || null
|
|
992
|
+
// }));
|
|
993
|
+
// } else {
|
|
994
|
+
// const lineAssociations = devicesFromTemplate.flatMap(device => device.lineAssociations || []);
|
|
995
|
+
// const associatedLineOptions: LineOption[] = lineAssociations
|
|
996
|
+
// .map(association => {
|
|
997
|
+
// const number = association?.directoryNumber?.directoryNumber || '';
|
|
998
|
+
// return {
|
|
999
|
+
// number,
|
|
1000
|
+
// did: number,
|
|
1001
|
+
// css: '',
|
|
1002
|
+
// description: ''
|
|
1003
|
+
// };
|
|
1004
|
+
// })
|
|
1005
|
+
// .filter(line => line.number.trim().length > 0);
|
|
1006
|
+
// this.lineOptions = this.uniqueByNumber(associatedLineOptions);
|
|
1007
|
+
// this.lineSelections = this.lineOptions.map(line => ({
|
|
1008
|
+
// lineNumber: line.number,
|
|
1009
|
+
// routePartitionName: lineAssociations.find(
|
|
1010
|
+
// source => (source?.directoryNumber?.directoryNumber || '') === line.number
|
|
1011
|
+
// )?.directoryNumber?.routePartitionName || null
|
|
1012
|
+
// }));
|
|
1013
|
+
// this.templateLines.forEach((line: any) => this.initLineWithSiteInfo(line));
|
|
1014
|
+
// this.initTemplateDnsNamesForLines(this.templateLines);
|
|
1015
|
+
// }
|
|
1016
|
+
// const routePartitions = this.lineSelections
|
|
1017
|
+
// .map(line => line.routePartitionName)
|
|
1018
|
+
// .filter((value): value is string => !!value && value.trim().length > 0);
|
|
1019
|
+
// this.routePartitionOptions = this.uniqueStrings(routePartitions);
|
|
1020
|
+
// this.deviceEntries = devicesFromTemplate.map(device => ({
|
|
1021
|
+
// deviceType: this.valueToString(device.deviceType),
|
|
1022
|
+
// protocol: this.valueToString(device.protocol),
|
|
1023
|
+
// buttonTemplate: this.valueToString(device.buttonTemplate),
|
|
1024
|
+
// name: this.valueToString(device.name)
|
|
1025
|
+
// }));
|
|
1026
|
+
// this.deviceRows = this.deviceEntries.map((_, index) => index + 1);
|
|
1027
|
+
// this.rebuildOverviewUsers();
|
|
1028
|
+
// this.rebuildOverviewLines();
|
|
1029
|
+
// this.rebuildOverviewDevices();
|
|
712
1030
|
}
|
|
713
1031
|
setSelectedUserCreationType(type) {
|
|
714
1032
|
this.selectedUserCreationType = type;
|
|
@@ -717,6 +1035,42 @@ class UserCreationWizardService {
|
|
|
717
1035
|
this.userDetailsForm = Object.assign(Object.assign({}, this.userDetailsForm), { [field]: value });
|
|
718
1036
|
this.rebuildOverviewUsers();
|
|
719
1037
|
}
|
|
1038
|
+
applyUserDetailsFormValue(formValue) {
|
|
1039
|
+
var _a, _b, _c;
|
|
1040
|
+
this.userDetailsFormValue = formValue;
|
|
1041
|
+
this.userDetailsForm = {
|
|
1042
|
+
userId: formValue.userId || '',
|
|
1043
|
+
firstName: formValue.firstName || '',
|
|
1044
|
+
lastName: formValue.lastName || '',
|
|
1045
|
+
email: formValue.email || '',
|
|
1046
|
+
};
|
|
1047
|
+
(_a = formValue.lines) === null || _a === void 0 ? void 0 : _a.forEach((lineValue, index) => {
|
|
1048
|
+
const line = this.lines[index];
|
|
1049
|
+
if (!(line === null || line === void 0 ? void 0 : line.directoryNumber)) {
|
|
1050
|
+
return;
|
|
1051
|
+
}
|
|
1052
|
+
line.directoryNumber.directoryNumber = lineValue.number || '';
|
|
1053
|
+
line.directoryNumber.routePartitionName = lineValue.routePartition || '';
|
|
1054
|
+
});
|
|
1055
|
+
(_b = formValue.devices) === null || _b === void 0 ? void 0 : _b.forEach((deviceValue, index) => {
|
|
1056
|
+
const device = this.devices[index];
|
|
1057
|
+
if (!device) {
|
|
1058
|
+
return;
|
|
1059
|
+
}
|
|
1060
|
+
device.name = deviceValue.name || '';
|
|
1061
|
+
});
|
|
1062
|
+
(_c = formValue.deviceProfiles) === null || _c === void 0 ? void 0 : _c.forEach((profileValue, index) => {
|
|
1063
|
+
const profile = this.deviceProfiles[index];
|
|
1064
|
+
if (!profile) {
|
|
1065
|
+
return;
|
|
1066
|
+
}
|
|
1067
|
+
profile.name = profileValue.name || '';
|
|
1068
|
+
});
|
|
1069
|
+
this.rebuildOverviewUsers();
|
|
1070
|
+
this.rebuildOverviewLines();
|
|
1071
|
+
this.rebuildOverviewDevices();
|
|
1072
|
+
this.rebuildOverviewDeviceProfiles();
|
|
1073
|
+
}
|
|
720
1074
|
setLineSelection(index, lineNumber) {
|
|
721
1075
|
if (!this.lineSelections[index]) {
|
|
722
1076
|
return;
|
|
@@ -758,65 +1112,47 @@ class UserCreationWizardService {
|
|
|
758
1112
|
}
|
|
759
1113
|
return entry.name || '';
|
|
760
1114
|
}
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
number: '557046',
|
|
769
|
-
did: '+13125557046',
|
|
770
|
-
css: 'Atlanta_internal_css',
|
|
771
|
-
description: ''
|
|
772
|
-
},
|
|
773
|
-
{
|
|
774
|
-
number: '557047',
|
|
775
|
-
did: '+13125557047',
|
|
776
|
-
css: 'Atlanta_internal_css',
|
|
777
|
-
description: ''
|
|
778
|
-
},
|
|
779
|
-
{
|
|
780
|
-
number: '557048',
|
|
781
|
-
did: '+13125557048',
|
|
782
|
-
css: 'Atlanta_internal_css',
|
|
783
|
-
description: ''
|
|
1115
|
+
getSiteAllData(siteId) {
|
|
1116
|
+
return this.userCreationApiService.getSiteAllData(siteId)
|
|
1117
|
+
.pipe(tap((res) => {
|
|
1118
|
+
let site = null;
|
|
1119
|
+
if (res && res[0]) {
|
|
1120
|
+
const site = new Site(res[0]);
|
|
1121
|
+
this.selectedSite = site.id;
|
|
784
1122
|
}
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
{ userId: 'John.Smith', firstName: 'John', lastName: 'Smith', email: 'john.smith@car-west.com' },
|
|
790
|
-
{ userId: 'John.Doe', firstName: 'John', lastName: 'Doe', email: 'john.doe@car-west.com' },
|
|
791
|
-
{ userId: 'Jane.Smith', firstName: 'Jane', lastName: 'Smith', email: 'jane.smith@car-west.com' }
|
|
792
|
-
];
|
|
793
|
-
this.lineSelections = [
|
|
794
|
-
{
|
|
795
|
-
lineNumber: null,
|
|
796
|
-
routePartitionName: this.routePartitionOptions[0] || null
|
|
1123
|
+
if (res && res[1]) {
|
|
1124
|
+
this.siteDefaults = new SiteDefaults(res[1], false);
|
|
1125
|
+
this.originalSiteDefaults = new SiteDefaults(res[1], false);
|
|
1126
|
+
this.routePartitionOptions = [...this.routePartitionNamesList];
|
|
797
1127
|
}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
{
|
|
801
|
-
deviceType: 'Cisco 8851',
|
|
802
|
-
protocol: 'SIP',
|
|
803
|
-
buttonTemplate: 'Standard 8851 SIP',
|
|
804
|
-
name: ''
|
|
805
|
-
},
|
|
806
|
-
{
|
|
807
|
-
deviceType: 'Cisco Unified Client Services Framework',
|
|
808
|
-
protocol: 'SIP',
|
|
809
|
-
buttonTemplate: 'Standard Client Services Framework',
|
|
810
|
-
name: ''
|
|
1128
|
+
if (res && res[2]) {
|
|
1129
|
+
this.deviceTypes = res[2];
|
|
811
1130
|
}
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
1131
|
+
// this.routePartitionOptions = this.siteDefaults?.routePartition || [];
|
|
1132
|
+
// this.devicePoolOptions = this.siteDefaults?.devicePool || [];
|
|
1133
|
+
// this.cssOptions = this.siteDefaults?.cssFilter || [];
|
|
1134
|
+
// this.voicemailProfileOptions = this.siteDefaults?.voicemailProfile || [];
|
|
1135
|
+
// this.lineCss = this.siteDefaults?.lineCss || '';
|
|
1136
|
+
// this.deviceCss = this.siteDefaults?.deviceCss || '';
|
|
1137
|
+
// this.callForwardAllCss = this.siteDefaults?.callForwardAllCss || '';
|
|
1138
|
+
}));
|
|
1139
|
+
}
|
|
1140
|
+
getNumberRange(siteId, routePartition) {
|
|
1141
|
+
this.availableDidPatternsMappedToDn = {};
|
|
1142
|
+
const pageSize = 9999;
|
|
1143
|
+
const params = { dntype: DnRangeType.extension, routepartition: routePartition, size: pageSize, page: 0 };
|
|
1144
|
+
this.availableNumbers = [];
|
|
1145
|
+
return this.userCreationApiService.getAvailableDnInRanges(siteId, params)
|
|
1146
|
+
.pipe(map((res) => {
|
|
1147
|
+
res.availableNumberList.forEach((availableNumber) => {
|
|
1148
|
+
this.setAvailableDidMappedToDn(availableNumber);
|
|
1149
|
+
this.availableNumbers = [...this.availableNumbers, ...this.getUnwrapNumberRange(availableNumber)];
|
|
1150
|
+
});
|
|
1151
|
+
}));
|
|
1152
|
+
// .pipe(this.handleError(true, false));
|
|
817
1153
|
}
|
|
818
1154
|
rebuildOverviewUsers() {
|
|
819
|
-
const userTemplate = this.
|
|
1155
|
+
const userTemplate = this.selectedTemplateName || '';
|
|
820
1156
|
const hasUserData = Object.values(this.userDetailsForm).some(value => value.trim().length > 0);
|
|
821
1157
|
this.overviewUsers = hasUserData
|
|
822
1158
|
? [{
|
|
@@ -829,6 +1165,24 @@ class UserCreationWizardService {
|
|
|
829
1165
|
: [];
|
|
830
1166
|
}
|
|
831
1167
|
rebuildOverviewLines() {
|
|
1168
|
+
var _a;
|
|
1169
|
+
const formLines = (_a = this.userDetailsFormValue) === null || _a === void 0 ? void 0 : _a.lines;
|
|
1170
|
+
if (formLines === null || formLines === void 0 ? void 0 : formLines.length) {
|
|
1171
|
+
this.overviewLines = formLines
|
|
1172
|
+
.filter(line => { var _a; return !!((_a = line === null || line === void 0 ? void 0 : line.number) === null || _a === void 0 ? void 0 : _a.trim()); })
|
|
1173
|
+
.map((lineValue, index) => {
|
|
1174
|
+
const templateLine = this.lines[index];
|
|
1175
|
+
const css = this.valueToString(templateLine === null || templateLine === void 0 ? void 0 : templateLine.callingSearchSpace);
|
|
1176
|
+
return {
|
|
1177
|
+
number: lineValue.number,
|
|
1178
|
+
did: lineValue.lineNumber || lineValue.number,
|
|
1179
|
+
routePartitionName: lineValue.routePartition || '',
|
|
1180
|
+
css,
|
|
1181
|
+
description: this.valueToString(templateLine === null || templateLine === void 0 ? void 0 : templateLine.description),
|
|
1182
|
+
};
|
|
1183
|
+
});
|
|
1184
|
+
return;
|
|
1185
|
+
}
|
|
832
1186
|
this.overviewLines = this.lineSelections
|
|
833
1187
|
.map(selection => {
|
|
834
1188
|
if (!(selection === null || selection === void 0 ? void 0 : selection.lineNumber)) {
|
|
@@ -849,7 +1203,20 @@ class UserCreationWizardService {
|
|
|
849
1203
|
.filter((line) => !!line);
|
|
850
1204
|
}
|
|
851
1205
|
rebuildOverviewDevices() {
|
|
1206
|
+
var _a;
|
|
852
1207
|
const selectedLineNumbers = this.overviewLines.map(line => line.number).join(', ');
|
|
1208
|
+
const formDevices = (_a = this.userDetailsFormValue) === null || _a === void 0 ? void 0 : _a.devices;
|
|
1209
|
+
if (formDevices === null || formDevices === void 0 ? void 0 : formDevices.length) {
|
|
1210
|
+
this.overviewDevices = formDevices
|
|
1211
|
+
.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()); })
|
|
1212
|
+
.map(device => ({
|
|
1213
|
+
name: device.name || '',
|
|
1214
|
+
deviceType: device.deviceType || '',
|
|
1215
|
+
lines: selectedLineNumbers,
|
|
1216
|
+
description: `${device.protocol || ''} / ${device.buttonTemplate || ''}`.trim(),
|
|
1217
|
+
}));
|
|
1218
|
+
return;
|
|
1219
|
+
}
|
|
853
1220
|
this.overviewDevices = this.deviceEntries
|
|
854
1221
|
.map((device, index) => ({
|
|
855
1222
|
device,
|
|
@@ -863,6 +1230,23 @@ class UserCreationWizardService {
|
|
|
863
1230
|
description: `${device.protocol} / ${device.buttonTemplate}`
|
|
864
1231
|
}));
|
|
865
1232
|
}
|
|
1233
|
+
rebuildOverviewDeviceProfiles() {
|
|
1234
|
+
var _a;
|
|
1235
|
+
const selectedLineNumbers = this.overviewLines.map(line => line.number).join(', ');
|
|
1236
|
+
const formProfiles = (_a = this.userDetailsFormValue) === null || _a === void 0 ? void 0 : _a.deviceProfiles;
|
|
1237
|
+
if (!(formProfiles === null || formProfiles === void 0 ? void 0 : formProfiles.length)) {
|
|
1238
|
+
this.overviewDeviceProfiles = [];
|
|
1239
|
+
return;
|
|
1240
|
+
}
|
|
1241
|
+
this.overviewDeviceProfiles = formProfiles
|
|
1242
|
+
.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()); })
|
|
1243
|
+
.map(profile => ({
|
|
1244
|
+
name: profile.name || '',
|
|
1245
|
+
deviceType: profile.deviceType || '',
|
|
1246
|
+
lines: selectedLineNumbers,
|
|
1247
|
+
description: `${profile.protocol || ''} / ${profile.buttonTemplate || ''}`.trim(),
|
|
1248
|
+
}));
|
|
1249
|
+
}
|
|
866
1250
|
extractTemplateFromTokenPayload(payload) {
|
|
867
1251
|
if (!payload || typeof payload !== 'object') {
|
|
868
1252
|
return null;
|
|
@@ -889,10 +1273,249 @@ class UserCreationWizardService {
|
|
|
889
1273
|
valueToString(value) {
|
|
890
1274
|
return typeof value === 'string' ? value : '';
|
|
891
1275
|
}
|
|
1276
|
+
getUnwrapNumberRange(availableNumber) {
|
|
1277
|
+
let unwrapNumberRange = this.unwrapNumberRange(availableNumber.phoneNumberRange.from, availableNumber.phoneNumberRange.to)
|
|
1278
|
+
.map((unwrappedNumber) => {
|
|
1279
|
+
const dn = availableNumber.phoneNumberRange.prefix + unwrappedNumber;
|
|
1280
|
+
let str = dn;
|
|
1281
|
+
if (this.availableDidPatternsMappedToDn[dn] && this.availableDidPatternsMappedToDn[dn].length > 0) {
|
|
1282
|
+
if (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] && this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 0) {
|
|
1283
|
+
str += ' DID: ' + (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 1 ? 'multiple' :
|
|
1284
|
+
this.availableDidPatternsMappedToDn[dn][0]['mappedDids'][0]);
|
|
1285
|
+
}
|
|
1286
|
+
if (this.availableDidPatternsMappedToDn[dn][0]['vm']) {
|
|
1287
|
+
str += ' In Use - VM';
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
return str;
|
|
1291
|
+
});
|
|
1292
|
+
unwrapNumberRange = unwrapNumberRange.filter((unwrappedNumber) => !availableNumber.usedNumbers.includes(unwrappedNumber));
|
|
1293
|
+
return unwrapNumberRange;
|
|
1294
|
+
}
|
|
1295
|
+
unwrapNumberRange(start, end) {
|
|
1296
|
+
const regExp = /(^0+)/;
|
|
1297
|
+
let leadingZeros = '';
|
|
1298
|
+
const matches = start.match(regExp);
|
|
1299
|
+
if (matches) {
|
|
1300
|
+
leadingZeros = matches[1];
|
|
1301
|
+
}
|
|
1302
|
+
const startNumeric = new Big(start);
|
|
1303
|
+
const endNumeric = new Big(end);
|
|
1304
|
+
return Array.from({ length: Number(endNumeric.minus(startNumeric).plus(new Big(1)).toFixed(0)) }, (v, k) => {
|
|
1305
|
+
const number = String(startNumeric.plus(new Big(k.toString())).toFixed(0));
|
|
1306
|
+
if ((leadingZeros + number).length > start.length) {
|
|
1307
|
+
leadingZeros = leadingZeros.substr(1);
|
|
1308
|
+
}
|
|
1309
|
+
return leadingZeros + number;
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1312
|
+
setAvailableDidMappedToDn(availableNumber) {
|
|
1313
|
+
if (availableNumber.unUsedNumbersWithDids && availableNumber.unUsedNumbersWithDids.length) {
|
|
1314
|
+
availableNumber.unUsedNumbersWithDids.forEach((numberWithDids) => {
|
|
1315
|
+
const dn = numberWithDids['unUsedNumber'];
|
|
1316
|
+
this.availableDidPatternsMappedToDn[dn] = [{}];
|
|
1317
|
+
if (numberWithDids['translationPatternList'] && numberWithDids['translationPatternList'].length > 0) {
|
|
1318
|
+
this.availableDidPatternsMappedToDn[dn] = numberWithDids['translationPatternList'];
|
|
1319
|
+
this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = [{}];
|
|
1320
|
+
if (numberWithDids['mappedDids'] && numberWithDids['mappedDids'].length > 0) {
|
|
1321
|
+
this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = numberWithDids['mappedDids'];
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
this.availableDidPatternsMappedToDn[dn][0]['vm'] = numberWithDids['vm'];
|
|
1325
|
+
});
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
892
1328
|
// TODO: replace placeholders with real API integration.
|
|
893
1329
|
loadDataFromApi() {
|
|
894
1330
|
// this.api.getWizardBootstrapData().subscribe(...)
|
|
895
1331
|
}
|
|
1332
|
+
initLineWithSiteInfo(line) {
|
|
1333
|
+
var _a, _b;
|
|
1334
|
+
line.directoryNumber.routePartitionName = ((_a = this.siteDefaults) === null || _a === void 0 ? void 0 : _a.routePartition) || '';
|
|
1335
|
+
let callingSearchSpaceVal = ((_b = this.siteDefaults) === null || _b === void 0 ? void 0 : _b.lineCss) || '';
|
|
1336
|
+
line.callingSearchSpace = callingSearchSpaceVal;
|
|
1337
|
+
}
|
|
1338
|
+
// private initTemplateDnsNamesForLines(userLines: TemplateLineLike[]): void {
|
|
1339
|
+
// const routePartition = this.siteDefaults?.routePartition || '';
|
|
1340
|
+
// if (userLines && userLines.length > 0) {
|
|
1341
|
+
// userLines.forEach((line, index) => {
|
|
1342
|
+
// line && line.directoryNumber && (line.directoryNumber.templateDirectoryNumber = line.directoryNumber.directoryNumber);
|
|
1343
|
+
// line && line.directoryNumber && (line.directoryNumber.directoryNumber = '');
|
|
1344
|
+
// return line;
|
|
1345
|
+
// });
|
|
1346
|
+
// // const routePartition = this.siteDefaults?.routePartition || '';
|
|
1347
|
+
// // if (line.lineAssociations && line.lineAssociations.length) {
|
|
1348
|
+
// // this.setLineAssociationsForDevice(line, routePartition);
|
|
1349
|
+
// // }
|
|
1350
|
+
// }
|
|
1351
|
+
// this.templateDevices.forEach(device => {
|
|
1352
|
+
// if (device.lineAssociations && device.lineAssociations.length) {
|
|
1353
|
+
// this.setLineAssociationsForDevice(device, routePartition);
|
|
1354
|
+
// }
|
|
1355
|
+
// });
|
|
1356
|
+
// }
|
|
1357
|
+
setLineAssociationsForDevice(device, routePartition) {
|
|
1358
|
+
const lineAssociations = device.lineAssociations || [];
|
|
1359
|
+
if (lineAssociations && lineAssociations.length) {
|
|
1360
|
+
lineAssociations.forEach(lineAssociation => {
|
|
1361
|
+
lineAssociation && lineAssociation.directoryNumber && (lineAssociation.directoryNumber.templateDirectoryNumber = lineAssociation.directoryNumber.directoryNumber || '');
|
|
1362
|
+
lineAssociation && lineAssociation.directoryNumber && (lineAssociation.directoryNumber.routePartitionName = routePartition);
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
initDeviceWithSiteInfo(device) {
|
|
1367
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
1368
|
+
device.newName = device.name;
|
|
1369
|
+
device.name = '';
|
|
1370
|
+
if (!device['enabledExtensionMobility']) {
|
|
1371
|
+
device.enabledExtensionMobility = (_b = (_a = this.siteDefaults) === null || _a === void 0 ? void 0 : _a.enableEm) !== null && _b !== void 0 ? _b : false;
|
|
1372
|
+
}
|
|
1373
|
+
else if (device['enabledExtensionMobility'].toString() === 'Yes') {
|
|
1374
|
+
device.enabledExtensionMobility = true;
|
|
1375
|
+
}
|
|
1376
|
+
else if (device['enabledExtensionMobility'].toString() === 'No') {
|
|
1377
|
+
device.enabledExtensionMobility = false;
|
|
1378
|
+
}
|
|
1379
|
+
if (device.location) {
|
|
1380
|
+
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;
|
|
1381
|
+
device.location = replacedValue;
|
|
1382
|
+
}
|
|
1383
|
+
if (device.location) {
|
|
1384
|
+
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;
|
|
1385
|
+
device.devicePoolName = replacedValue;
|
|
1386
|
+
}
|
|
1387
|
+
if (device.location) {
|
|
1388
|
+
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;
|
|
1389
|
+
device.callingSearchSpaceName = replacedValue;
|
|
1390
|
+
}
|
|
1391
|
+
if (device.extraOptions) {
|
|
1392
|
+
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;
|
|
1393
|
+
device.extraOptions.aarCss = replacedValue;
|
|
1394
|
+
}
|
|
1395
|
+
if (!device.description && this.siteDefaults) {
|
|
1396
|
+
device.description = this.siteDefaults.deviceDescription;
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
replaceDynamicValueSiteInfo(fieldValue, siteShortName) {
|
|
1400
|
+
if (fieldValue) {
|
|
1401
|
+
fieldValue = this.replaceDynamicValueFormat(fieldValue);
|
|
1402
|
+
const paramsToReplaces = { 'SiteShortName': siteShortName };
|
|
1403
|
+
return this.mutliStringReplace(paramsToReplaces, fieldValue);
|
|
1404
|
+
}
|
|
1405
|
+
return null;
|
|
1406
|
+
}
|
|
1407
|
+
replaceDynamicValueFormat(str) {
|
|
1408
|
+
str = str.replace(/\[FN\]/ig, '[FN]').replace(/\[LN\]/ig, '[LN]').replace(/\[ID\]/ig, '[UserId]')
|
|
1409
|
+
.replace(/\[UserId\]/ig, '[UserId]').replace(/<Match User ID>/ig, '[UserId]')
|
|
1410
|
+
.replace(/\[Email\]/ig, '[Email]').replace(/\[DN\(/ig, '[DN(')
|
|
1411
|
+
.replace(/\[SiteShortName\]/ig, '[SiteShortName]').replace(/\$\(SiteShortName\)/ig, '[SiteShortName]')
|
|
1412
|
+
.replace(/\$\{SiteShortName\}/ig, '[SiteShortName]').replace(/{SiteShortName}/ig, '[SiteShortName]')
|
|
1413
|
+
.replace(/\[FN\(/ig, '[FN(').replace(/\[LN\(/ig, '[LN(')
|
|
1414
|
+
.replace(/\[ID\(/ig, '[ID(');
|
|
1415
|
+
return str;
|
|
1416
|
+
}
|
|
1417
|
+
mutliStringReplace(object, input, directoryNumber, user) {
|
|
1418
|
+
var val = input;
|
|
1419
|
+
if (val.includes('[DN]') && directoryNumber && !directoryNumber.includes('Line')) {
|
|
1420
|
+
val = val.replace('[DN]', directoryNumber);
|
|
1421
|
+
}
|
|
1422
|
+
var indexOfDN = val.indexOf('[DN(');
|
|
1423
|
+
if (indexOfDN !== -1 && directoryNumber) {
|
|
1424
|
+
var digit = val.substring(indexOfDN + 4, val.indexOf(')', indexOfDN + 4));
|
|
1425
|
+
var digitCount = Number(digit) || 0;
|
|
1426
|
+
var dnDigit = (digitCount > val.length) ? directoryNumber : directoryNumber.substring(directoryNumber.length - digitCount, directoryNumber.length);
|
|
1427
|
+
val = val.replace('[DN(' + digit + ')]', dnDigit);
|
|
1428
|
+
}
|
|
1429
|
+
var indexOfFN = val.indexOf('[FN(');
|
|
1430
|
+
if (indexOfFN !== -1 && user && user.firstName) {
|
|
1431
|
+
var digit = val.substring(indexOfFN + 4, val.indexOf(')', indexOfFN + 4));
|
|
1432
|
+
var fnDigit = user.firstName.substring(0, digit);
|
|
1433
|
+
val = val.replace('[FN(' + digit + ')]', fnDigit);
|
|
1434
|
+
}
|
|
1435
|
+
var indexOfLN = val.indexOf('[LN(');
|
|
1436
|
+
if (indexOfLN !== -1 && user && user.lastName) {
|
|
1437
|
+
var digit = val.substring(indexOfLN + 4, val.indexOf(')', indexOfLN + 4));
|
|
1438
|
+
var lnDigit = user.lastName.substring(0, digit);
|
|
1439
|
+
val = val.replace('[LN(' + digit + ')]', lnDigit);
|
|
1440
|
+
}
|
|
1441
|
+
var indexOfID = val.indexOf('[ID(');
|
|
1442
|
+
if (indexOfID !== -1 && user && user.userid) {
|
|
1443
|
+
var digit = val.substring(indexOfID + 4, val.indexOf(')', indexOfID + 4));
|
|
1444
|
+
var idDigit = user.userid.substring(0, digit);
|
|
1445
|
+
val = val.replace('[ID(' + digit + ')]', idDigit);
|
|
1446
|
+
}
|
|
1447
|
+
var entries = Object.entries(object);
|
|
1448
|
+
entries.forEach((para) => {
|
|
1449
|
+
var find = '[' + para[0] + ']';
|
|
1450
|
+
var replacement = para[1] != null ? String(para[1]) : '';
|
|
1451
|
+
val = val.split(find).join(replacement);
|
|
1452
|
+
});
|
|
1453
|
+
return val;
|
|
1454
|
+
}
|
|
1455
|
+
initTemplateDnsNamesForLines() {
|
|
1456
|
+
var _a, _b;
|
|
1457
|
+
if (this.lines && this.lines.length > 0) {
|
|
1458
|
+
this.lines.forEach((line, index) => {
|
|
1459
|
+
line.directoryNumber.templateDirectoryNumber = line.directoryNumber.directoryNumber;
|
|
1460
|
+
line.directoryNumber.directoryNumber = '';
|
|
1461
|
+
return line;
|
|
1462
|
+
});
|
|
1463
|
+
const routePartition = ((_a = this.siteDefaults) === null || _a === void 0 ? void 0 : _a.routePartition) || '';
|
|
1464
|
+
this.devices.forEach(device => {
|
|
1465
|
+
if (device.lineAssociations && device.lineAssociations.length) {
|
|
1466
|
+
this.setLineAssociationsForDevice(device, routePartition);
|
|
1467
|
+
}
|
|
1468
|
+
});
|
|
1469
|
+
this.deviceProfiles.forEach(deviceProfile => {
|
|
1470
|
+
if (deviceProfile.lineAssociations && deviceProfile.lineAssociations.length) {
|
|
1471
|
+
this.setLineAssociationsForDevice(deviceProfile, routePartition);
|
|
1472
|
+
}
|
|
1473
|
+
});
|
|
1474
|
+
if (((_b = this.endUser) === null || _b === void 0 ? void 0 : _b.singleNumberReach) && this.endUser.singleNumberReach.associatedLines && this.endUser.singleNumberReach.associatedLines.length) {
|
|
1475
|
+
if (this.endUser.singleNumberReach.associatedLines && this.endUser.singleNumberReach.associatedLines.length) {
|
|
1476
|
+
this.endUser.singleNumberReach.associatedLines.map(lineAssociation => {
|
|
1477
|
+
lineAssociation.directoryNumber.templateDirectoryNumber = lineAssociation.directoryNumber.directoryNumber;
|
|
1478
|
+
lineAssociation.directoryNumber.routePartitionName = routePartition;
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
if (this.endUser.singleNumberReach.remoteDestinations && this.endUser.singleNumberReach.remoteDestinations.length) {
|
|
1482
|
+
this.endUser.singleNumberReach.remoteDestinations.forEach(remoteDestination => {
|
|
1483
|
+
if (remoteDestination.lineAssociations && remoteDestination.lineAssociations.length) {
|
|
1484
|
+
remoteDestination.lineAssociations.map(lineAssociation => {
|
|
1485
|
+
lineAssociation.directoryNumber.templateDirectoryNumber = lineAssociation.directoryNumber.directoryNumber;
|
|
1486
|
+
lineAssociation.directoryNumber.routePartitionName = routePartition;
|
|
1487
|
+
});
|
|
1488
|
+
}
|
|
1489
|
+
});
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
buildSavableEndUser() {
|
|
1495
|
+
if (!this.endUser) {
|
|
1496
|
+
throw new Error('No template user loaded');
|
|
1497
|
+
}
|
|
1498
|
+
return buildSavableEndUser(this.endUser, this.lines, this.devices, this.deviceProfiles, this.userDetailsForm, {
|
|
1499
|
+
resolveDeviceName: (index, device) => this.resolveDeviceNameForSave(index, device),
|
|
1500
|
+
resolveDeviceProfileName: (index, profile) => this.resolveDeviceNameForSave(index, profile),
|
|
1501
|
+
});
|
|
1502
|
+
}
|
|
1503
|
+
resolveDeviceNameForSave(_index, device) {
|
|
1504
|
+
var _a;
|
|
1505
|
+
const rawName = (device.name || device.newName || '').trim();
|
|
1506
|
+
if ((_a = device.deviceType) === null || _a === void 0 ? void 0 : _a.includes('8851')) {
|
|
1507
|
+
const withoutSep = rawName.replace(/^SEP\s*/i, '').trim();
|
|
1508
|
+
return withoutSep ? `SEP ${withoutSep}` : '';
|
|
1509
|
+
}
|
|
1510
|
+
return rawName;
|
|
1511
|
+
}
|
|
1512
|
+
saveNewUser() {
|
|
1513
|
+
var _a, _b;
|
|
1514
|
+
const user = this.buildSavableEndUser();
|
|
1515
|
+
const siteId = String((_a = this.selectedSite) !== null && _a !== void 0 ? _a : '');
|
|
1516
|
+
const templateId = String((_b = this.selectedTemplateId) !== null && _b !== void 0 ? _b : '');
|
|
1517
|
+
return this.userCreationApiService.saveTemplateUser(user, templateId, siteId);
|
|
1518
|
+
}
|
|
896
1519
|
}
|
|
897
1520
|
UserCreationWizardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
898
1521
|
UserCreationWizardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardService });
|
|
@@ -900,23 +1523,450 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
900
1523
|
type: Injectable
|
|
901
1524
|
}], ctorParameters: function () { return []; } });
|
|
902
1525
|
|
|
1526
|
+
class AppLoaderComponent {
|
|
1527
|
+
constructor() {
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
AppLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1531
|
+
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 });
|
|
1532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, decorators: [{
|
|
1533
|
+
type: Component,
|
|
1534
|
+
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"] }]
|
|
1535
|
+
}], ctorParameters: function () { return []; } });
|
|
1536
|
+
|
|
1537
|
+
const LDAP_PAGE_SIZE = 10;
|
|
903
1538
|
class UserDetailsStepComponent {
|
|
904
|
-
|
|
1539
|
+
get linesFormArray() {
|
|
1540
|
+
return this.userDetailsForm.get('lines');
|
|
1541
|
+
}
|
|
1542
|
+
get devicesFormArray() {
|
|
1543
|
+
return this.userDetailsForm.get('devices');
|
|
1544
|
+
}
|
|
1545
|
+
get deviceProfilesFormArray() {
|
|
1546
|
+
return this.userDetailsForm.get('deviceProfiles');
|
|
1547
|
+
}
|
|
1548
|
+
get selectedLdapUser() {
|
|
1549
|
+
return this.userCreationWizardService.selectedLdapUser;
|
|
1550
|
+
}
|
|
1551
|
+
get ldapTotalCount() {
|
|
1552
|
+
return this.userCreationWizardService.ldapUsersTotal;
|
|
1553
|
+
}
|
|
1554
|
+
get hasLdapUsers() {
|
|
1555
|
+
return this.userCreationWizardService.ldapUsers.length > 0;
|
|
1556
|
+
}
|
|
1557
|
+
constructor(fb, userCreationApiService, userCreationWizardService) {
|
|
1558
|
+
this.fb = fb;
|
|
1559
|
+
this.userCreationApiService = userCreationApiService;
|
|
905
1560
|
this.userCreationWizardService = userCreationWizardService;
|
|
1561
|
+
this.validityChange = new EventEmitter();
|
|
1562
|
+
this.userIdCheckPending = false;
|
|
1563
|
+
this.loadingAvailableNumbers = false;
|
|
1564
|
+
this.ldapLoading = false;
|
|
1565
|
+
this.ldapSearchAttempted = false;
|
|
1566
|
+
this.ldapPageSize = LDAP_PAGE_SIZE;
|
|
1567
|
+
this.ldapPageIndex = 0;
|
|
1568
|
+
this.ldapQueryTypeOptions = [
|
|
1569
|
+
{ label: 'User ID', value: 'userId' },
|
|
1570
|
+
{ label: 'First Name', value: 'firstName' },
|
|
1571
|
+
{ label: 'Last Name', value: 'lastName' },
|
|
1572
|
+
];
|
|
1573
|
+
this.filteredAvailableNumbersByLine = [];
|
|
1574
|
+
this.filteredRoutePartitionsByLine = [];
|
|
1575
|
+
this.destroy$ = new Subject();
|
|
1576
|
+
this.userIdAsyncValidator = this.createUserIdAsyncValidator();
|
|
1577
|
+
this.ldapSearchForm = this.fb.group({
|
|
1578
|
+
queryValue: [''],
|
|
1579
|
+
queryType: ['userId'],
|
|
1580
|
+
});
|
|
1581
|
+
this.userDetailsForm = this.fb.group({
|
|
1582
|
+
userId: ['', [Validators.required], [this.userIdAsyncValidator]],
|
|
1583
|
+
firstName: ['', Validators.required],
|
|
1584
|
+
lastName: ['', Validators.required],
|
|
1585
|
+
email: ['', [Validators.required, Validators.email]],
|
|
1586
|
+
lines: this.fb.array([]),
|
|
1587
|
+
devices: this.fb.array([]),
|
|
1588
|
+
deviceProfiles: this.fb.array([]),
|
|
1589
|
+
});
|
|
1590
|
+
}
|
|
1591
|
+
ngOnInit() {
|
|
1592
|
+
this.buildDynamicFormArrays();
|
|
1593
|
+
this.patchUserFieldsFromService();
|
|
1594
|
+
this.initLineFilters();
|
|
1595
|
+
this.setupFormSync();
|
|
1596
|
+
this.setupValidityEmitter();
|
|
1597
|
+
this.fetchInitialAvailableNumbers();
|
|
1598
|
+
this.userCreationWizardService.applyUserDetailsFormValue(this.userDetailsForm.getRawValue());
|
|
1599
|
+
if (this.userCreationWizardService.isLdapIntegrated && this.selectedLdapUser) {
|
|
1600
|
+
this.applyLdapIntegratedFormState();
|
|
1601
|
+
}
|
|
1602
|
+
this.emitValidity();
|
|
1603
|
+
}
|
|
1604
|
+
ngOnDestroy() {
|
|
1605
|
+
this.destroy$.next();
|
|
1606
|
+
this.destroy$.complete();
|
|
1607
|
+
}
|
|
1608
|
+
isStepValid() {
|
|
1609
|
+
return this.userDetailsForm.valid && !this.userIdCheckPending;
|
|
1610
|
+
}
|
|
1611
|
+
markAllAsTouched() {
|
|
1612
|
+
this.userDetailsForm.markAllAsTouched();
|
|
1613
|
+
this.emitValidity();
|
|
1614
|
+
}
|
|
1615
|
+
syncToService() {
|
|
1616
|
+
this.userCreationWizardService.applyUserDetailsFormValue(this.userDetailsForm.getRawValue());
|
|
1617
|
+
}
|
|
1618
|
+
getLineGroup(index) {
|
|
1619
|
+
return this.linesFormArray.at(index);
|
|
1620
|
+
}
|
|
1621
|
+
getDeviceGroup(index) {
|
|
1622
|
+
return this.devicesFormArray.at(index);
|
|
1623
|
+
}
|
|
1624
|
+
getDeviceProfileGroup(index) {
|
|
1625
|
+
return this.deviceProfilesFormArray.at(index);
|
|
1626
|
+
}
|
|
1627
|
+
getFilteredNumbers(lineIndex) {
|
|
1628
|
+
var _a;
|
|
1629
|
+
return (_a = this.filteredAvailableNumbersByLine[lineIndex]) !== null && _a !== void 0 ? _a : [];
|
|
1630
|
+
}
|
|
1631
|
+
getFilteredRoutePartitions(lineIndex) {
|
|
1632
|
+
var _a;
|
|
1633
|
+
return (_a = this.filteredRoutePartitionsByLine[lineIndex]) !== null && _a !== void 0 ? _a : [];
|
|
1634
|
+
}
|
|
1635
|
+
filterAvailableNumbers(lineIndex, event) {
|
|
1636
|
+
var _a;
|
|
1637
|
+
const raw = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) || '';
|
|
1638
|
+
this.applyNumberFilter(lineIndex, raw);
|
|
1639
|
+
}
|
|
1640
|
+
filterRoutePartitions(lineIndex, event) {
|
|
1641
|
+
var _a;
|
|
1642
|
+
const raw = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) || '';
|
|
1643
|
+
this.applyRoutePartitionFilter(lineIndex, raw);
|
|
1644
|
+
}
|
|
1645
|
+
onRoutePartitionSelected(lineIndex, routePartition) {
|
|
1646
|
+
var _a, _b;
|
|
1647
|
+
const lineGroup = this.linesFormArray.at(lineIndex);
|
|
1648
|
+
(_a = lineGroup.get('routePartition')) === null || _a === void 0 ? void 0 : _a.setValue(routePartition, { emitEvent: false });
|
|
1649
|
+
(_b = lineGroup.get('number')) === null || _b === void 0 ? void 0 : _b.setValue('');
|
|
1650
|
+
this.applyRoutePartitionFilter(lineIndex, routePartition);
|
|
1651
|
+
this.loadAvailableNumbersForLine(lineIndex, routePartition);
|
|
1652
|
+
}
|
|
1653
|
+
onNumberSelected(lineIndex, number) {
|
|
1654
|
+
var _a;
|
|
1655
|
+
const lineGroup = this.linesFormArray.at(lineIndex);
|
|
1656
|
+
const displayNumber = this.extractDirectoryNumber(number);
|
|
1657
|
+
(_a = lineGroup.get('number')) === null || _a === void 0 ? void 0 : _a.setValue(displayNumber, { emitEvent: true });
|
|
1658
|
+
}
|
|
1659
|
+
searchLdapUsers(pageIndex = 0) {
|
|
1660
|
+
var _a, _b;
|
|
1661
|
+
const queryValue = String((_a = this.ldapSearchForm.get('queryValue')) === null || _a === void 0 ? void 0 : _a.value).trim() || undefined;
|
|
1662
|
+
const siteId = this.userCreationWizardService.selectedSite;
|
|
1663
|
+
if (!siteId) {
|
|
1664
|
+
this.userCreationWizardService.setLdapUsersResult([], 0);
|
|
1665
|
+
this.ldapPageIndex = 0;
|
|
1666
|
+
this.ldapSearchAttempted = false;
|
|
1667
|
+
return;
|
|
1668
|
+
}
|
|
1669
|
+
this.ldapPageIndex = pageIndex;
|
|
1670
|
+
const queryType = (_b = this.ldapSearchForm.get('queryType')) === null || _b === void 0 ? void 0 : _b.value;
|
|
1671
|
+
const params = {
|
|
1672
|
+
size: String(LDAP_PAGE_SIZE),
|
|
1673
|
+
page: String(pageIndex),
|
|
1674
|
+
deviceless: 'true',
|
|
1675
|
+
querytype: queryType,
|
|
1676
|
+
withEmailOnly: 'true',
|
|
1677
|
+
queryvalue: queryValue,
|
|
1678
|
+
};
|
|
1679
|
+
this.ldapLoading = true;
|
|
1680
|
+
this.userCreationApiService
|
|
1681
|
+
.getLdapUsers(String(siteId), params)
|
|
1682
|
+
.pipe(take(1), map((res) => {
|
|
1683
|
+
var _a, _b;
|
|
1684
|
+
return ({
|
|
1685
|
+
users: (_a = res === null || res === void 0 ? void 0 : res.pageData) !== null && _a !== void 0 ? _a : [],
|
|
1686
|
+
total: (_b = res === null || res === void 0 ? void 0 : res.total) !== null && _b !== void 0 ? _b : 0,
|
|
1687
|
+
});
|
|
1688
|
+
}), catchError(() => of({ users: [], total: 0 })), finalize(() => {
|
|
1689
|
+
this.ldapLoading = false;
|
|
1690
|
+
}))
|
|
1691
|
+
.subscribe(({ users, total }) => {
|
|
1692
|
+
this.ldapSearchAttempted = true;
|
|
1693
|
+
this.userCreationWizardService.setLdapUsersResult(users, total);
|
|
1694
|
+
});
|
|
1695
|
+
}
|
|
1696
|
+
onLdapPageChange(event) {
|
|
1697
|
+
this.searchLdapUsers(event.pageIndex);
|
|
1698
|
+
}
|
|
1699
|
+
onAddLdapUser(row) {
|
|
1700
|
+
var _a, _b, _c;
|
|
1701
|
+
this.userCreationWizardService.selectLdapUser(row);
|
|
1702
|
+
this.userDetailsForm.patchValue({
|
|
1703
|
+
userId: row.userid,
|
|
1704
|
+
firstName: (_a = row.firstName) !== null && _a !== void 0 ? _a : '',
|
|
1705
|
+
lastName: (_b = row.lastName) !== null && _b !== void 0 ? _b : '',
|
|
1706
|
+
email: (_c = row.email) !== null && _c !== void 0 ? _c : '',
|
|
1707
|
+
});
|
|
1708
|
+
this.applyLdapIntegratedFormState();
|
|
1709
|
+
this.emitValidity();
|
|
1710
|
+
}
|
|
1711
|
+
onDeleteLdapUser(row) {
|
|
1712
|
+
if (!this.userCreationWizardService.isLdapUserRowSelected(row)) {
|
|
1713
|
+
return;
|
|
1714
|
+
}
|
|
1715
|
+
this.clearLdapSelection();
|
|
1716
|
+
}
|
|
1717
|
+
onRemoveLdapTag() {
|
|
1718
|
+
this.clearLdapSelection();
|
|
1719
|
+
}
|
|
1720
|
+
isLdapUserRowSelected(row) {
|
|
1721
|
+
return this.userCreationWizardService.isLdapUserRowSelected(row);
|
|
1722
|
+
}
|
|
1723
|
+
clearLdapSelection() {
|
|
1724
|
+
this.userCreationWizardService.clearLdapUserSelection();
|
|
1725
|
+
this.userDetailsForm.patchValue({
|
|
1726
|
+
userId: '',
|
|
1727
|
+
firstName: '',
|
|
1728
|
+
lastName: '',
|
|
1729
|
+
email: '',
|
|
1730
|
+
});
|
|
1731
|
+
this.restoreManualEntryFormState();
|
|
1732
|
+
this.emitValidity();
|
|
906
1733
|
}
|
|
907
|
-
|
|
908
|
-
|
|
1734
|
+
applyLdapIntegratedFormState() {
|
|
1735
|
+
var _a;
|
|
1736
|
+
this.setUserIdentityFieldsReadonly(true);
|
|
1737
|
+
this.toggleUserIdAsyncValidator(false);
|
|
1738
|
+
(_a = this.userDetailsForm.get('userId')) === null || _a === void 0 ? void 0 : _a.updateValueAndValidity({ emitEvent: false });
|
|
909
1739
|
}
|
|
910
|
-
|
|
911
|
-
|
|
1740
|
+
restoreManualEntryFormState() {
|
|
1741
|
+
var _a;
|
|
1742
|
+
this.setUserIdentityFieldsReadonly(false);
|
|
1743
|
+
this.toggleUserIdAsyncValidator(true);
|
|
1744
|
+
(_a = this.userDetailsForm.get('userId')) === null || _a === void 0 ? void 0 : _a.updateValueAndValidity();
|
|
1745
|
+
}
|
|
1746
|
+
setUserIdentityFieldsReadonly(readonly) {
|
|
1747
|
+
['userId', 'firstName', 'lastName', 'email'].forEach(fieldName => {
|
|
1748
|
+
const control = this.userDetailsForm.get(fieldName);
|
|
1749
|
+
if (!control) {
|
|
1750
|
+
return;
|
|
1751
|
+
}
|
|
1752
|
+
if (readonly) {
|
|
1753
|
+
control.disable({ emitEvent: false });
|
|
1754
|
+
}
|
|
1755
|
+
else {
|
|
1756
|
+
control.enable({ emitEvent: false });
|
|
1757
|
+
}
|
|
1758
|
+
});
|
|
1759
|
+
}
|
|
1760
|
+
toggleUserIdAsyncValidator(enabled) {
|
|
1761
|
+
const control = this.userDetailsForm.get('userId');
|
|
1762
|
+
if (!control) {
|
|
1763
|
+
return;
|
|
1764
|
+
}
|
|
1765
|
+
if (enabled) {
|
|
1766
|
+
control.setAsyncValidators([this.userIdAsyncValidator]);
|
|
1767
|
+
}
|
|
1768
|
+
else {
|
|
1769
|
+
control.clearAsyncValidators();
|
|
1770
|
+
}
|
|
1771
|
+
control.updateValueAndValidity({ emitEvent: false });
|
|
1772
|
+
}
|
|
1773
|
+
setupValidityEmitter() {
|
|
1774
|
+
this.userDetailsForm.statusChanges
|
|
1775
|
+
.pipe(startWith(this.userDetailsForm.status), takeUntil(this.destroy$))
|
|
1776
|
+
.subscribe(() => this.emitValidity());
|
|
1777
|
+
}
|
|
1778
|
+
emitValidity() {
|
|
1779
|
+
this.validityChange.emit(this.isStepValid());
|
|
1780
|
+
}
|
|
1781
|
+
buildDynamicFormArrays() {
|
|
1782
|
+
const service = this.userCreationWizardService;
|
|
1783
|
+
const linesArray = this.linesFormArray;
|
|
1784
|
+
const devicesArray = this.devicesFormArray;
|
|
1785
|
+
const profilesArray = this.deviceProfilesFormArray;
|
|
1786
|
+
while (linesArray.length) {
|
|
1787
|
+
linesArray.removeAt(0);
|
|
1788
|
+
}
|
|
1789
|
+
while (devicesArray.length) {
|
|
1790
|
+
devicesArray.removeAt(0);
|
|
1791
|
+
}
|
|
1792
|
+
while (profilesArray.length) {
|
|
1793
|
+
profilesArray.removeAt(0);
|
|
1794
|
+
}
|
|
1795
|
+
service.lines.forEach((line, index) => {
|
|
1796
|
+
var _a, _b, _c;
|
|
1797
|
+
const lineGroup = this.fb.group({
|
|
1798
|
+
lineNumber: [
|
|
1799
|
+
{
|
|
1800
|
+
value: ((_a = line.directoryNumber) === null || _a === void 0 ? void 0 : _a.templateDirectoryNumber) || '',
|
|
1801
|
+
disabled: true,
|
|
1802
|
+
},
|
|
1803
|
+
],
|
|
1804
|
+
number: [((_b = line.directoryNumber) === null || _b === void 0 ? void 0 : _b.directoryNumber) || '', Validators.required],
|
|
1805
|
+
routePartition: [
|
|
1806
|
+
((_c = line.directoryNumber) === null || _c === void 0 ? void 0 : _c.routePartitionName) || '',
|
|
1807
|
+
Validators.required,
|
|
1808
|
+
],
|
|
1809
|
+
});
|
|
1810
|
+
linesArray.push(lineGroup);
|
|
1811
|
+
this.setupLineListeners(index, lineGroup);
|
|
1812
|
+
});
|
|
1813
|
+
service.devices.forEach(device => {
|
|
1814
|
+
devicesArray.push(this.fb.group({
|
|
1815
|
+
deviceType: [{ value: device.deviceType || '', disabled: true }],
|
|
1816
|
+
protocol: [{ value: device.protocol || '', disabled: true }],
|
|
1817
|
+
buttonTemplate: [{ value: device.buttonTemplate || '', disabled: true }],
|
|
1818
|
+
name: ['', [Validators.required, Validation.macAddress()]],
|
|
1819
|
+
}));
|
|
1820
|
+
});
|
|
1821
|
+
service.deviceProfiles.forEach(profile => {
|
|
1822
|
+
profilesArray.push(this.fb.group({
|
|
1823
|
+
deviceType: [{ value: profile.deviceType || '', disabled: true }],
|
|
1824
|
+
protocol: [{ value: profile.protocol || '', disabled: true }],
|
|
1825
|
+
buttonTemplate: [{ value: profile.buttonTemplate || '', disabled: true }],
|
|
1826
|
+
name: ['', [Validation.macAddress()]],
|
|
1827
|
+
}));
|
|
1828
|
+
});
|
|
1829
|
+
}
|
|
1830
|
+
patchUserFieldsFromService() {
|
|
1831
|
+
const endUser = this.userCreationWizardService.endUser;
|
|
1832
|
+
this.userDetailsForm.patchValue({
|
|
1833
|
+
userId: (endUser === null || endUser === void 0 ? void 0 : endUser.userid) || this.userCreationWizardService.userDetailsForm.userId || '',
|
|
1834
|
+
firstName: (endUser === null || endUser === void 0 ? void 0 : endUser.firstName) || this.userCreationWizardService.userDetailsForm.firstName || '',
|
|
1835
|
+
lastName: (endUser === null || endUser === void 0 ? void 0 : endUser.lastName) || this.userCreationWizardService.userDetailsForm.lastName || '',
|
|
1836
|
+
email: (endUser === null || endUser === void 0 ? void 0 : endUser.email) || this.userCreationWizardService.userDetailsForm.email || '',
|
|
1837
|
+
});
|
|
1838
|
+
}
|
|
1839
|
+
setupLineListeners(lineIndex, lineGroup) {
|
|
1840
|
+
var _a, _b;
|
|
1841
|
+
(_a = lineGroup
|
|
1842
|
+
.get('routePartition')) === null || _a === void 0 ? void 0 : _a.valueChanges.pipe(debounceTime(300), takeUntil(this.destroy$)).subscribe(value => {
|
|
1843
|
+
this.applyRoutePartitionFilter(lineIndex, String(value !== null && value !== void 0 ? value : ''));
|
|
1844
|
+
});
|
|
1845
|
+
(_b = lineGroup
|
|
1846
|
+
.get('number')) === null || _b === void 0 ? void 0 : _b.valueChanges.pipe(debounceTime(150), takeUntil(this.destroy$)).subscribe(value => {
|
|
1847
|
+
this.applyNumberFilter(lineIndex, String(value !== null && value !== void 0 ? value : ''));
|
|
1848
|
+
});
|
|
1849
|
+
}
|
|
1850
|
+
initLineFilters() {
|
|
1851
|
+
const partitions = this.userCreationWizardService.routePartitionOptions;
|
|
1852
|
+
const numbers = this.userCreationWizardService.availableNumbers;
|
|
1853
|
+
this.filteredRoutePartitionsByLine = this.linesFormArray.controls.map((_, index) => {
|
|
1854
|
+
var _a, _b;
|
|
1855
|
+
const current = String((_b = (_a = this.linesFormArray.at(index).get('routePartition')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '');
|
|
1856
|
+
return this.filterOptions(partitions, current);
|
|
1857
|
+
});
|
|
1858
|
+
this.filteredAvailableNumbersByLine = this.linesFormArray.controls.map((_, index) => {
|
|
1859
|
+
var _a, _b;
|
|
1860
|
+
const current = String((_b = (_a = this.linesFormArray.at(index).get('number')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '');
|
|
1861
|
+
return this.filterOptions(numbers, current);
|
|
1862
|
+
});
|
|
1863
|
+
}
|
|
1864
|
+
setupFormSync() {
|
|
1865
|
+
this.userDetailsForm.valueChanges
|
|
1866
|
+
.pipe(debounceTime(200), takeUntil(this.destroy$))
|
|
1867
|
+
.subscribe(() => {
|
|
1868
|
+
this.userCreationWizardService.applyUserDetailsFormValue(this.userDetailsForm.getRawValue());
|
|
1869
|
+
});
|
|
1870
|
+
}
|
|
1871
|
+
fetchInitialAvailableNumbers() {
|
|
1872
|
+
var _a, _b;
|
|
1873
|
+
const firstPartition = this.linesFormArray.length > 0
|
|
1874
|
+
? String((_b = (_a = this.linesFormArray.at(0).get('routePartition')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '').trim()
|
|
1875
|
+
: this.userCreationWizardService.firstLineRoutePartition ||
|
|
1876
|
+
this.userCreationWizardService.siteDefaultRoutePartition ||
|
|
1877
|
+
'';
|
|
1878
|
+
if (firstPartition) {
|
|
1879
|
+
this.loadAvailableNumbersForLine(0, firstPartition, false);
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
loadAvailableNumbersForLine(lineIndex, routePartition, clearNumber = true) {
|
|
1883
|
+
var _a;
|
|
1884
|
+
const siteId = this.userCreationWizardService.selectedSite;
|
|
1885
|
+
if (!siteId || !routePartition.trim()) {
|
|
1886
|
+
return;
|
|
1887
|
+
}
|
|
1888
|
+
if (clearNumber) {
|
|
1889
|
+
(_a = this.linesFormArray.at(lineIndex).get('number')) === null || _a === void 0 ? void 0 : _a.setValue('');
|
|
1890
|
+
}
|
|
1891
|
+
this.loadingAvailableNumbers = true;
|
|
1892
|
+
this.userCreationWizardService
|
|
1893
|
+
.getNumberRange(String(siteId), routePartition)
|
|
1894
|
+
.pipe(take(1), catchError(() => of(null)), finalize(() => {
|
|
1895
|
+
this.loadingAvailableNumbers = false;
|
|
1896
|
+
this.refreshNumberFilters();
|
|
1897
|
+
}))
|
|
1898
|
+
.subscribe();
|
|
1899
|
+
}
|
|
1900
|
+
refreshNumberFilters() {
|
|
1901
|
+
const numbers = this.userCreationWizardService.availableNumbers;
|
|
1902
|
+
this.filteredAvailableNumbersByLine = this.linesFormArray.controls.map((_, index) => {
|
|
1903
|
+
var _a, _b;
|
|
1904
|
+
const current = String((_b = (_a = this.linesFormArray.at(index).get('number')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '');
|
|
1905
|
+
return this.filterOptions(numbers, current);
|
|
1906
|
+
});
|
|
1907
|
+
}
|
|
1908
|
+
applyNumberFilter(lineIndex, raw) {
|
|
1909
|
+
const value = raw.trim().toLowerCase();
|
|
1910
|
+
const source = this.userCreationWizardService.availableNumbers || [];
|
|
1911
|
+
this.filteredAvailableNumbersByLine[lineIndex] = value.length
|
|
1912
|
+
? source.filter(n => !!n && n.toLowerCase().includes(value))
|
|
1913
|
+
: [...source];
|
|
1914
|
+
}
|
|
1915
|
+
applyRoutePartitionFilter(lineIndex, raw) {
|
|
1916
|
+
const value = raw.trim().toLowerCase();
|
|
1917
|
+
const source = this.userCreationWizardService.routePartitionOptions || [];
|
|
1918
|
+
this.filteredRoutePartitionsByLine[lineIndex] = value.length
|
|
1919
|
+
? source.filter(n => !!n && n.toLowerCase().includes(value))
|
|
1920
|
+
: [...source];
|
|
1921
|
+
}
|
|
1922
|
+
filterOptions(source, raw) {
|
|
1923
|
+
const value = raw.trim().toLowerCase();
|
|
1924
|
+
if (!value.length) {
|
|
1925
|
+
return [...source];
|
|
1926
|
+
}
|
|
1927
|
+
return source.filter(item => !!item && item.toLowerCase().includes(value));
|
|
1928
|
+
}
|
|
1929
|
+
extractDirectoryNumber(value) {
|
|
1930
|
+
const trimmed = value.trim();
|
|
1931
|
+
const spaceIndex = trimmed.indexOf(' ');
|
|
1932
|
+
return spaceIndex > -1 ? trimmed.substring(0, spaceIndex) : trimmed;
|
|
1933
|
+
}
|
|
1934
|
+
createUserIdAsyncValidator() {
|
|
1935
|
+
return (control) => {
|
|
1936
|
+
var _a;
|
|
1937
|
+
if (this.userCreationWizardService.isLdapIntegrated) {
|
|
1938
|
+
this.userIdCheckPending = false;
|
|
1939
|
+
return of(null);
|
|
1940
|
+
}
|
|
1941
|
+
const userId = String((_a = control.value) !== null && _a !== void 0 ? _a : '').trim();
|
|
1942
|
+
const siteId = this.userCreationWizardService.selectedSite;
|
|
1943
|
+
if (!userId || !siteId) {
|
|
1944
|
+
this.userIdCheckPending = false;
|
|
1945
|
+
this.emitValidity();
|
|
1946
|
+
return of(null);
|
|
1947
|
+
}
|
|
1948
|
+
this.userIdCheckPending = true;
|
|
1949
|
+
this.emitValidity();
|
|
1950
|
+
return timer(500).pipe(switchMap(() => this.userCreationApiService
|
|
1951
|
+
.checkUserIdExisting(String(siteId), encodeURIComponent(encodeURIComponent(userId)))
|
|
1952
|
+
.pipe(map(() => ({ userIdExists: true })), catchError(() => of(null)))), tap(() => {
|
|
1953
|
+
this.userIdCheckPending = false;
|
|
1954
|
+
this.emitValidity();
|
|
1955
|
+
}), finalize(() => {
|
|
1956
|
+
this.userIdCheckPending = false;
|
|
1957
|
+
this.emitValidity();
|
|
1958
|
+
}));
|
|
1959
|
+
};
|
|
912
1960
|
}
|
|
913
1961
|
}
|
|
914
|
-
UserDetailsStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDetailsStepComponent, deps: [{ token: UserCreationWizardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
915
|
-
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: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i3$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.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$1.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" }] });
|
|
1962
|
+
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 });
|
|
1963
|
+
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 <input matInput placeholder=\"Name\" formControlName=\"name\" />\r\n <mat-error *ngIf=\"getDeviceGroup(idx).get('name')?.hasError('macAddress') && getDeviceGroup(idx).get('name')?.touched\">\r\n Please enter a valid MAC address\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 <input matInput placeholder=\"Name\" formControlName=\"name\" />\r\n <mat-error *ngIf=\"getDeviceProfileGroup(idx).get('name')?.hasError('macAddress') && getDeviceProfileGroup(idx).get('name')?.touched\">\r\n Please enter a valid MAC address\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}\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$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i5$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.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: 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" }] });
|
|
916
1964
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDetailsStepComponent, decorators: [{
|
|
917
1965
|
type: Component,
|
|
918
|
-
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"] }]
|
|
919
|
-
}], ctorParameters: function () { return [{ type: UserCreationWizardService }]; }
|
|
1966
|
+
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 <input matInput placeholder=\"Name\" formControlName=\"name\" />\r\n <mat-error *ngIf=\"getDeviceGroup(idx).get('name')?.hasError('macAddress') && getDeviceGroup(idx).get('name')?.touched\">\r\n Please enter a valid MAC address\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 <input matInput placeholder=\"Name\" formControlName=\"name\" />\r\n <mat-error *ngIf=\"getDeviceProfileGroup(idx).get('name')?.hasError('macAddress') && getDeviceProfileGroup(idx).get('name')?.touched\">\r\n Please enter a valid MAC address\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}\n"] }]
|
|
1967
|
+
}], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: UserCreationApiService }, { type: UserCreationWizardService }]; }, propDecorators: { validityChange: [{
|
|
1968
|
+
type: Output
|
|
1969
|
+
}] } });
|
|
920
1970
|
|
|
921
1971
|
class UserOverviewStepComponent {
|
|
922
1972
|
constructor(userCreationWizardService) {
|
|
@@ -927,17 +1977,21 @@ class UserOverviewStepComponent {
|
|
|
927
1977
|
}
|
|
928
1978
|
}
|
|
929
1979
|
UserOverviewStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserOverviewStepComponent, deps: [{ token: UserCreationWizardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
930
|
-
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
|
|
1980
|
+
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"] }] });
|
|
931
1981
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserOverviewStepComponent, decorators: [{
|
|
932
1982
|
type: Component,
|
|
933
|
-
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
|
|
1983
|
+
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"] }]
|
|
934
1984
|
}], ctorParameters: function () { return [{ type: UserCreationWizardService }]; } });
|
|
935
1985
|
|
|
936
1986
|
class UserTemplateStepComponent {
|
|
1987
|
+
get isLoading() {
|
|
1988
|
+
return this.loadingSites || this.loadingSiteData;
|
|
1989
|
+
}
|
|
937
1990
|
constructor(userCreationWizardService, userCreationService, fb) {
|
|
938
1991
|
this.userCreationWizardService = userCreationWizardService;
|
|
939
1992
|
this.userCreationService = userCreationService;
|
|
940
1993
|
this.fb = fb;
|
|
1994
|
+
this.validityChange = new EventEmitter();
|
|
941
1995
|
this.formGroup = this.fb.group({
|
|
942
1996
|
userType: [USER_CREATION_TYPES.CUCM],
|
|
943
1997
|
siteId: [null],
|
|
@@ -945,8 +1999,8 @@ class UserTemplateStepComponent {
|
|
|
945
1999
|
});
|
|
946
2000
|
this.userCreationType = USER_CREATION_TYPES.CUCM;
|
|
947
2001
|
this.USER_CREATION_TYPES = USER_CREATION_TYPES;
|
|
948
|
-
|
|
949
|
-
|
|
2002
|
+
// readonly defaultTemplateName = 'User 8851 Office';
|
|
2003
|
+
// readonly fallbackTemplateId = '-1';
|
|
950
2004
|
this.destroy$ = new Subject();
|
|
951
2005
|
this.sitesList = [];
|
|
952
2006
|
this.sitesList$ = this.userCreationService.sitesList$.pipe(takeUntil(this.destroy$), tap((res) => this.sitesList = res));
|
|
@@ -956,18 +2010,21 @@ class UserTemplateStepComponent {
|
|
|
956
2010
|
const templateControl = this.formGroup.get('userTemplateId');
|
|
957
2011
|
const currentTemplateId = templateControl === null || templateControl === void 0 ? void 0 : templateControl.value;
|
|
958
2012
|
const selectedSiteId = (_a = this.formGroup.get('siteId')) === null || _a === void 0 ? void 0 : _a.value;
|
|
959
|
-
const defaultTemplate = this.templates.find(
|
|
2013
|
+
// const defaultTemplate = this.templates.find(
|
|
2014
|
+
// template => template.name === this.defaultTemplateName
|
|
2015
|
+
// );
|
|
960
2016
|
const hasSelectedSite = selectedSiteId !== null && selectedSiteId !== undefined;
|
|
961
|
-
if (hasSelectedSite && defaultTemplate && String(currentTemplateId || '') !== String(defaultTemplate.id)) {
|
|
962
|
-
|
|
963
|
-
}
|
|
2017
|
+
// if (hasSelectedSite && defaultTemplate && String(currentTemplateId || '') !== String(defaultTemplate.id)) {
|
|
2018
|
+
// templateControl?.setValue(String(defaultTemplate.id));
|
|
2019
|
+
// }
|
|
964
2020
|
}), takeUntil(this.destroy$));
|
|
965
2021
|
this.isTemplateSelectable = false;
|
|
966
2022
|
this.templates = [];
|
|
967
|
-
this.
|
|
2023
|
+
this.loadingSites = false;
|
|
2024
|
+
this.loadingSiteData = false;
|
|
2025
|
+
this.templateToggleFormControl = new FormControl(false);
|
|
968
2026
|
}
|
|
969
2027
|
ngOnInit() {
|
|
970
|
-
var _a;
|
|
971
2028
|
this.formGroup.get('userType').valueChanges
|
|
972
2029
|
.pipe(takeUntil(this.destroy$))
|
|
973
2030
|
.subscribe((value) => {
|
|
@@ -979,11 +2036,24 @@ class UserTemplateStepComponent {
|
|
|
979
2036
|
.pipe(
|
|
980
2037
|
// filter((value) => value !== null && value !== undefined),
|
|
981
2038
|
tap((value) => {
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
2039
|
+
// this.formGroup.get('userTemplateId')?.setValue(this.fallbackTemplateId);
|
|
2040
|
+
const selectedSite = this.sitesList.find(site => String(site.id) === String(value));
|
|
2041
|
+
if (selectedSite) {
|
|
2042
|
+
this.userCreationWizardService.setCurrentSite(selectedSite);
|
|
2043
|
+
}
|
|
2044
|
+
return this.userCreationWizardService.setSelectedSite(value);
|
|
2045
|
+
}), takeUntil(this.destroy$), switchMap((value) => {
|
|
2046
|
+
if (value === null || value === undefined || value === '') {
|
|
2047
|
+
this.loadingSiteData = false;
|
|
2048
|
+
return of(null);
|
|
2049
|
+
}
|
|
2050
|
+
this.loadingSiteData = true;
|
|
2051
|
+
return forkJoin([
|
|
2052
|
+
this.userCreationService.fetchAllUserTemplates(Number(value)),
|
|
2053
|
+
this.userCreationWizardService.getSiteAllData(Number(value)),
|
|
2054
|
+
]).pipe(finalize(() => {
|
|
2055
|
+
this.loadingSiteData = false;
|
|
2056
|
+
}));
|
|
987
2057
|
}))
|
|
988
2058
|
.subscribe();
|
|
989
2059
|
// .subscribe((value) => {
|
|
@@ -991,36 +2061,41 @@ class UserTemplateStepComponent {
|
|
|
991
2061
|
// })
|
|
992
2062
|
this.formGroup.get('userTemplateId').valueChanges
|
|
993
2063
|
.pipe(filter((value) => value !== null && value !== undefined && String(value).trim().length > 0), takeUntil(this.destroy$), switchMap((value) => {
|
|
994
|
-
if (String(value) === this.fallbackTemplateId) {
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
}
|
|
2064
|
+
// if (String(value) === this.fallbackTemplateId) {
|
|
2065
|
+
// this.userCreationWizardService.setSelectedTemplate(this.defaultTemplateName);
|
|
2066
|
+
// return of(null);
|
|
2067
|
+
// }
|
|
998
2068
|
return this.userCreationService.getUserTemplateToken(String(value), String(String(this.customerId)))
|
|
999
2069
|
.pipe(tap((payload) => {
|
|
1000
2070
|
const selectedTemplate = this.templates.find(template => String(template.id) === String(value));
|
|
1001
|
-
this.userCreationWizardService.setSelectedTemplate(
|
|
2071
|
+
this.userCreationWizardService.setSelectedTemplate(selectedTemplate);
|
|
1002
2072
|
this.userCreationWizardService.applyTemplateTokenPayload(payload);
|
|
1003
2073
|
}));
|
|
1004
2074
|
}))
|
|
1005
2075
|
.subscribe();
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
2076
|
+
this.templateToggleFormControl.valueChanges
|
|
2077
|
+
.pipe(startWith(true), takeUntil(this.destroy$), distinctUntilChanged())
|
|
2078
|
+
.subscribe((value) => {
|
|
2079
|
+
var _a, _b;
|
|
2080
|
+
if (value === true) {
|
|
2081
|
+
const siteId = ((_a = this.formGroup.get('siteId')) === null || _a === void 0 ? void 0 : _a.value) || 7095;
|
|
2082
|
+
this.userCreationService.fetchAllUserTemplates(siteId)
|
|
2083
|
+
.subscribe();
|
|
2084
|
+
}
|
|
2085
|
+
else {
|
|
2086
|
+
(_b = this.formGroup.get('userTemplateId')) === null || _b === void 0 ? void 0 : _b.reset();
|
|
2087
|
+
}
|
|
2088
|
+
});
|
|
1017
2089
|
this.getData();
|
|
2090
|
+
this.formGroup.statusChanges
|
|
2091
|
+
.pipe(startWith(this.formGroup.status), takeUntil(this.destroy$))
|
|
2092
|
+
.subscribe(() => this.validityChange.emit(this.isStepValid()));
|
|
1018
2093
|
}
|
|
1019
2094
|
reseFieldstForm() {
|
|
1020
2095
|
var _a, _b;
|
|
1021
2096
|
(_a = this.formGroup.get('siteId')) === null || _a === void 0 ? void 0 : _a.reset();
|
|
1022
2097
|
(_b = this.formGroup.get('userTemplateId')) === null || _b === void 0 ? void 0 : _b.reset();
|
|
1023
|
-
this.userCreationWizardService.setSelectedTemplate(
|
|
2098
|
+
this.userCreationWizardService.setSelectedTemplate();
|
|
1024
2099
|
this.userCreationWizardService.resetTemplateDrivenData();
|
|
1025
2100
|
}
|
|
1026
2101
|
getData() {
|
|
@@ -1031,7 +2106,10 @@ class UserTemplateStepComponent {
|
|
|
1031
2106
|
.subscribe();
|
|
1032
2107
|
}
|
|
1033
2108
|
getSites(isOnlyWithLocations) {
|
|
1034
|
-
|
|
2109
|
+
this.loadingSites = true;
|
|
2110
|
+
return this.userCreationService.getAllCustomerSites(String(this.customerId), isOnlyWithLocations).pipe(finalize(() => {
|
|
2111
|
+
this.loadingSites = false;
|
|
2112
|
+
}));
|
|
1035
2113
|
}
|
|
1036
2114
|
isCUCM(site) {
|
|
1037
2115
|
var _a;
|
|
@@ -1043,29 +2121,54 @@ class UserTemplateStepComponent {
|
|
|
1043
2121
|
const foundedSite = this.sitesList.find((site) => site.id === siteId);
|
|
1044
2122
|
return siteId && foundedSite ? foundedSite.name : '';
|
|
1045
2123
|
}
|
|
2124
|
+
getSelectedTemplateName() {
|
|
2125
|
+
var _a;
|
|
2126
|
+
const templateId = (_a = this.formGroup.get('userTemplateId')) === null || _a === void 0 ? void 0 : _a.value;
|
|
2127
|
+
const foundedTemplate = this.templates.find((template) => String(template.id) === String(templateId));
|
|
2128
|
+
return templateId && foundedTemplate ? foundedTemplate.name : '';
|
|
2129
|
+
}
|
|
2130
|
+
isStepValid() {
|
|
2131
|
+
var _a, _b;
|
|
2132
|
+
const siteId = (_a = this.formGroup.get('siteId')) === null || _a === void 0 ? void 0 : _a.value;
|
|
2133
|
+
const templateId = (_b = this.formGroup.get('userTemplateId')) === null || _b === void 0 ? void 0 : _b.value;
|
|
2134
|
+
return siteId !== null && siteId !== undefined && String(templateId || '').trim().length > 0;
|
|
2135
|
+
}
|
|
2136
|
+
markStepTouched() {
|
|
2137
|
+
var _a, _b;
|
|
2138
|
+
(_a = this.formGroup.get('siteId')) === null || _a === void 0 ? void 0 : _a.markAsTouched();
|
|
2139
|
+
(_b = this.formGroup.get('userTemplateId')) === null || _b === void 0 ? void 0 : _b.markAsTouched();
|
|
2140
|
+
}
|
|
1046
2141
|
ngOnDestroy() {
|
|
1047
2142
|
this.destroy$.next();
|
|
1048
2143
|
this.destroy$.complete();
|
|
1049
2144
|
}
|
|
1050
2145
|
}
|
|
1051
|
-
UserTemplateStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserTemplateStepComponent, deps: [{ token: UserCreationWizardService }, { token: UserCreationApiService }, { token:
|
|
1052
|
-
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
|
|
2146
|
+
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 });
|
|
2147
|
+
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: i3.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" }] });
|
|
1053
2148
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserTemplateStepComponent, decorators: [{
|
|
1054
2149
|
type: Component,
|
|
1055
|
-
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
|
|
1056
|
-
}], ctorParameters: function () { return [{ type: UserCreationWizardService }, { type: UserCreationApiService }, { type:
|
|
2150
|
+
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"] }]
|
|
2151
|
+
}], ctorParameters: function () { return [{ type: UserCreationWizardService }, { type: UserCreationApiService }, { type: i1$2.FormBuilder }]; }, propDecorators: { customerId: [{
|
|
1057
2152
|
type: Input
|
|
2153
|
+
}], validityChange: [{
|
|
2154
|
+
type: Output
|
|
1058
2155
|
}] } });
|
|
1059
2156
|
|
|
2157
|
+
const USER_CREATED_SUCCESSFLLY = 'User created successfully';
|
|
1060
2158
|
class UserCreationWizardComponent {
|
|
1061
2159
|
constructor(notificationService) {
|
|
1062
2160
|
this.notificationService = notificationService;
|
|
1063
2161
|
this.apiService = inject(APIService);
|
|
2162
|
+
this.userCreationWizardService = inject(UserCreationWizardService);
|
|
1064
2163
|
this.title = 'Create User';
|
|
1065
2164
|
this.cancel = new EventEmitter();
|
|
1066
2165
|
this.submit = new EventEmitter();
|
|
1067
2166
|
this.isSubmitting = false;
|
|
1068
2167
|
this.submitTimerId = null;
|
|
2168
|
+
this.selectedIndex = 0;
|
|
2169
|
+
this.templateStepValid = false;
|
|
2170
|
+
this.detailsStepValid = false;
|
|
2171
|
+
this.isLoading = false;
|
|
1069
2172
|
}
|
|
1070
2173
|
ngOnInit() {
|
|
1071
2174
|
this.apiService.token = this.token;
|
|
@@ -1074,18 +2177,36 @@ class UserCreationWizardComponent {
|
|
|
1074
2177
|
onCancel() {
|
|
1075
2178
|
this.cancel.emit();
|
|
1076
2179
|
}
|
|
2180
|
+
onStepperNext(stepper) {
|
|
2181
|
+
var _a, _b, _c, _d, _e;
|
|
2182
|
+
if (stepper.selectedIndex === 0) {
|
|
2183
|
+
if (!((_a = this.templateStep) === null || _a === void 0 ? void 0 : _a.isStepValid())) {
|
|
2184
|
+
(_b = this.templateStep) === null || _b === void 0 ? void 0 : _b.markStepTouched();
|
|
2185
|
+
return;
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
if (stepper.selectedIndex === 1) {
|
|
2189
|
+
if (!((_c = this.detailsStep) === null || _c === void 0 ? void 0 : _c.isStepValid())) {
|
|
2190
|
+
(_d = this.detailsStep) === null || _d === void 0 ? void 0 : _d.markAllAsTouched();
|
|
2191
|
+
return;
|
|
2192
|
+
}
|
|
2193
|
+
(_e = this.detailsStep) === null || _e === void 0 ? void 0 : _e.syncToService();
|
|
2194
|
+
}
|
|
2195
|
+
stepper.next();
|
|
2196
|
+
}
|
|
1077
2197
|
onSubmit() {
|
|
1078
2198
|
if (this.isSubmitting) {
|
|
1079
2199
|
return;
|
|
1080
2200
|
}
|
|
1081
2201
|
this.isSubmitting = true;
|
|
1082
|
-
const delayMs = 3000 + Math.floor(Math.random() * 1001);
|
|
1083
|
-
this.submitTimerId = window.setTimeout(() => {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
}, delayMs);
|
|
2202
|
+
// const delayMs = 3000 + Math.floor(Math.random() * 1001);
|
|
2203
|
+
// this.submitTimerId = window.setTimeout(() => {
|
|
2204
|
+
// this.isSubmitting = false;
|
|
2205
|
+
// this.submitTimerId = null;
|
|
2206
|
+
// this.notificationService.success('User created successfully!');
|
|
2207
|
+
// this.submit.emit();
|
|
2208
|
+
// }, delayMs);
|
|
2209
|
+
this._saveChanges();
|
|
1089
2210
|
}
|
|
1090
2211
|
ngOnDestroy() {
|
|
1091
2212
|
if (this.submitTimerId) {
|
|
@@ -1093,12 +2214,29 @@ class UserCreationWizardComponent {
|
|
|
1093
2214
|
this.submitTimerId = null;
|
|
1094
2215
|
}
|
|
1095
2216
|
}
|
|
2217
|
+
_saveChanges() {
|
|
2218
|
+
this.isLoading = true;
|
|
2219
|
+
this.userCreationWizardService.saveNewUser()
|
|
2220
|
+
.subscribe((res) => {
|
|
2221
|
+
this.isLoading = false;
|
|
2222
|
+
this.isSubmitting = false;
|
|
2223
|
+
this.notificationService.success('User created successfully!');
|
|
2224
|
+
this.submit.emit();
|
|
2225
|
+
}, (error) => {
|
|
2226
|
+
this.isLoading = false;
|
|
2227
|
+
this.isSubmitting = false;
|
|
2228
|
+
if (typeof error === 'string' && error.indexOf(USER_CREATED_SUCCESSFLLY) > -1) {
|
|
2229
|
+
this.notificationService.success('User created successfully!');
|
|
2230
|
+
this.submit.emit();
|
|
2231
|
+
}
|
|
2232
|
+
});
|
|
2233
|
+
}
|
|
1096
2234
|
}
|
|
1097
2235
|
UserCreationWizardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardComponent, deps: [{ token: NotificationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1098
|
-
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: "<app-notification></app-notification>\r\n\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 <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>", 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: 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: i4.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$1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i4$1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i4$1.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: NotificationsComponent, selector: "app-notification" }, { kind: "component", type: UserDetailsStepComponent, selector: "tk-user-details-step" }, { kind: "component", type: UserOverviewStepComponent, selector: "tk-user-overview-step" }], encapsulation: i0.ViewEncapsulation.None });
|
|
2236
|
+
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)=\"selectedIndex = $event.selectedIndex\">\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: i4.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$1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i4$1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i4$1.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 });
|
|
1099
2237
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardComponent, decorators: [{
|
|
1100
2238
|
type: Component,
|
|
1101
|
-
args: [{ selector: 'tk-user-creation-wizard', encapsulation: ViewEncapsulation.None, template: "<app-notification></app-notification>\r\n\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 <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>", 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"] }]
|
|
2239
|
+
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)=\"selectedIndex = $event.selectedIndex\">\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"] }]
|
|
1102
2240
|
}], ctorParameters: function () { return [{ type: NotificationService }]; }, propDecorators: { title: [{
|
|
1103
2241
|
type: Input
|
|
1104
2242
|
}], host: [{
|
|
@@ -1111,6 +2249,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1111
2249
|
type: Output
|
|
1112
2250
|
}], submit: [{
|
|
1113
2251
|
type: Output
|
|
2252
|
+
}], templateStep: [{
|
|
2253
|
+
type: ViewChild,
|
|
2254
|
+
args: [UserTemplateStepComponent]
|
|
2255
|
+
}], detailsStep: [{
|
|
2256
|
+
type: ViewChild,
|
|
2257
|
+
args: [UserDetailsStepComponent]
|
|
1114
2258
|
}] } });
|
|
1115
2259
|
|
|
1116
2260
|
function HttpLoaderFactory(http) {
|
|
@@ -1124,6 +2268,7 @@ UserCreationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
|
|
|
1124
2268
|
NotificationsComponent,
|
|
1125
2269
|
UserDetailsStepComponent,
|
|
1126
2270
|
UserOverviewStepComponent,
|
|
2271
|
+
AppLoaderComponent,
|
|
1127
2272
|
TruncatePipe], imports: [CommonModule,
|
|
1128
2273
|
SharedModule,
|
|
1129
2274
|
MaterialModule,
|
|
@@ -1160,6 +2305,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1160
2305
|
NotificationsComponent,
|
|
1161
2306
|
UserDetailsStepComponent,
|
|
1162
2307
|
UserOverviewStepComponent,
|
|
2308
|
+
AppLoaderComponent,
|
|
1163
2309
|
TruncatePipe,
|
|
1164
2310
|
],
|
|
1165
2311
|
imports: [
|
|
@@ -1203,5 +2349,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1203
2349
|
* Generated bundle index. Do not edit.
|
|
1204
2350
|
*/
|
|
1205
2351
|
|
|
1206
|
-
export { HttpLoaderFactory, UserCreationModule, UserCreationWizardComponent };
|
|
2352
|
+
export { HttpLoaderFactory, USER_CREATED_SUCCESSFLLY, UserCreationModule, UserCreationWizardComponent };
|
|
1207
2353
|
//# sourceMappingURL=tuki-io-tuki-widgets-user-creation.mjs.map
|