@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,10 +1,78 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { FormArray, FormBuilder, FormGroup } from '@angular/forms';
|
|
3
|
+
import { PageEvent } from '@angular/material/paginator';
|
|
4
|
+
import { LdapQueryType, ListUserInterface } from '../../../../interfaces/user-creation-wizard.interfaces';
|
|
5
|
+
import { UserCreationApiService } from '../../../../shared/services/user-creation-api.service';
|
|
6
|
+
import { UserCreationWizardService } from '../../user-creation-wizard.service';
|
|
2
7
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class UserDetailsStepComponent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
export declare class UserDetailsStepComponent implements OnInit, OnDestroy {
|
|
9
|
+
private readonly fb;
|
|
10
|
+
private readonly userCreationApiService;
|
|
11
|
+
readonly userCreationWizardService: UserCreationWizardService;
|
|
12
|
+
validityChange: EventEmitter<boolean>;
|
|
13
|
+
userDetailsForm: FormGroup;
|
|
14
|
+
ldapSearchForm: FormGroup;
|
|
15
|
+
userIdCheckPending: boolean;
|
|
16
|
+
loadingAvailableNumbers: boolean;
|
|
17
|
+
ldapLoading: boolean;
|
|
18
|
+
ldapSearchAttempted: boolean;
|
|
19
|
+
readonly ldapPageSize = 10;
|
|
20
|
+
ldapPageIndex: number;
|
|
21
|
+
readonly ldapQueryTypeOptions: {
|
|
22
|
+
label: string;
|
|
23
|
+
value: LdapQueryType;
|
|
24
|
+
}[];
|
|
25
|
+
filteredAvailableNumbersByLine: string[][];
|
|
26
|
+
filteredRoutePartitionsByLine: string[][];
|
|
27
|
+
private readonly destroy$;
|
|
28
|
+
private readonly userIdAsyncValidator;
|
|
29
|
+
get linesFormArray(): FormArray;
|
|
30
|
+
get devicesFormArray(): FormArray;
|
|
31
|
+
get deviceProfilesFormArray(): FormArray;
|
|
32
|
+
get selectedLdapUser(): ListUserInterface | null;
|
|
33
|
+
get ldapTotalCount(): number;
|
|
34
|
+
get hasLdapUsers(): boolean;
|
|
35
|
+
constructor(fb: FormBuilder, userCreationApiService: UserCreationApiService, userCreationWizardService: UserCreationWizardService);
|
|
36
|
+
ngOnInit(): void;
|
|
37
|
+
ngOnDestroy(): void;
|
|
38
|
+
isStepValid(): boolean;
|
|
39
|
+
markAllAsTouched(): void;
|
|
40
|
+
syncToService(): void;
|
|
41
|
+
getLineGroup(index: number): FormGroup;
|
|
42
|
+
getDeviceGroup(index: number): FormGroup;
|
|
43
|
+
getDeviceProfileGroup(index: number): FormGroup;
|
|
44
|
+
getFilteredNumbers(lineIndex: number): string[];
|
|
45
|
+
getFilteredRoutePartitions(lineIndex: number): string[];
|
|
46
|
+
filterAvailableNumbers(lineIndex: number, event: Event): void;
|
|
47
|
+
filterRoutePartitions(lineIndex: number, event: Event): void;
|
|
48
|
+
onRoutePartitionSelected(lineIndex: number, routePartition: string): void;
|
|
49
|
+
onNumberSelected(lineIndex: number, number: string): void;
|
|
50
|
+
searchLdapUsers(pageIndex?: number): void;
|
|
51
|
+
onLdapPageChange(event: PageEvent): void;
|
|
52
|
+
onAddLdapUser(row: ListUserInterface): void;
|
|
53
|
+
onDeleteLdapUser(row: ListUserInterface): void;
|
|
54
|
+
onRemoveLdapTag(): void;
|
|
55
|
+
isLdapUserRowSelected(row: ListUserInterface): boolean;
|
|
56
|
+
private clearLdapSelection;
|
|
57
|
+
private applyLdapIntegratedFormState;
|
|
58
|
+
private restoreManualEntryFormState;
|
|
59
|
+
private setUserIdentityFieldsReadonly;
|
|
60
|
+
private toggleUserIdAsyncValidator;
|
|
61
|
+
private setupValidityEmitter;
|
|
62
|
+
private emitValidity;
|
|
63
|
+
private buildDynamicFormArrays;
|
|
64
|
+
private patchUserFieldsFromService;
|
|
65
|
+
private setupLineListeners;
|
|
66
|
+
private initLineFilters;
|
|
67
|
+
private setupFormSync;
|
|
68
|
+
private fetchInitialAvailableNumbers;
|
|
69
|
+
private loadAvailableNumbersForLine;
|
|
70
|
+
private refreshNumberFilters;
|
|
71
|
+
private applyNumberFilter;
|
|
72
|
+
private applyRoutePartitionFilter;
|
|
73
|
+
private filterOptions;
|
|
74
|
+
private extractDirectoryNumber;
|
|
75
|
+
private createUserIdAsyncValidator;
|
|
8
76
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserDetailsStepComponent, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UserDetailsStepComponent, "tk-user-details-step", never, {}, {}, never, never, false, never>;
|
|
77
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserDetailsStepComponent, "tk-user-details-step", never, {}, { "validityChange": "validityChange"; }, never, never, false, never>;
|
|
10
78
|
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
1
2
|
import { UserCreationWizardService } from "../../user-creation-wizard.service";
|
|
2
3
|
import { FormBuilder, FormControl } from "@angular/forms";
|
|
3
4
|
import { UserCreationApiService } from "../../../../shared/services/user-creation-api.service";
|
|
4
|
-
import { Site
|
|
5
|
+
import { Site } from "../../../../classes/site";
|
|
6
|
+
import { UserTemplateInterface } from "../../../../interfaces/user-creation-wizard.interfaces";
|
|
5
7
|
import * as i0 from "@angular/core";
|
|
6
8
|
export declare class UserTemplateStepComponent {
|
|
7
9
|
userCreationWizardService: UserCreationWizardService;
|
|
8
10
|
private readonly userCreationService;
|
|
9
11
|
private readonly fb;
|
|
10
12
|
customerId: number;
|
|
13
|
+
validityChange: EventEmitter<boolean>;
|
|
11
14
|
formGroup: import("@angular/forms").FormGroup<{
|
|
12
15
|
userType: FormControl<string | null>;
|
|
13
16
|
siteId: FormControl<null>;
|
|
@@ -18,14 +21,15 @@ export declare class UserTemplateStepComponent {
|
|
|
18
21
|
CUCM: string;
|
|
19
22
|
MT: string;
|
|
20
23
|
};
|
|
21
|
-
readonly defaultTemplateName = "User 8851 Office";
|
|
22
|
-
readonly fallbackTemplateId = "-1";
|
|
23
24
|
private readonly destroy$;
|
|
24
25
|
private sitesList;
|
|
25
26
|
readonly sitesList$: import("rxjs").Observable<Site[]>;
|
|
26
27
|
readonly templatesList$: import("rxjs").Observable<UserTemplateInterface[]>;
|
|
27
28
|
isTemplateSelectable: boolean;
|
|
28
29
|
templates: UserTemplateInterface[];
|
|
30
|
+
loadingSites: boolean;
|
|
31
|
+
loadingSiteData: boolean;
|
|
32
|
+
get isLoading(): boolean;
|
|
29
33
|
readonly templateToggleFormControl: FormControl<boolean | null>;
|
|
30
34
|
constructor(userCreationWizardService: UserCreationWizardService, userCreationService: UserCreationApiService, fb: FormBuilder);
|
|
31
35
|
ngOnInit(): void;
|
|
@@ -34,7 +38,10 @@ export declare class UserTemplateStepComponent {
|
|
|
34
38
|
private getSites;
|
|
35
39
|
isCUCM(site: Site): boolean;
|
|
36
40
|
getSelectedSiteName(): string;
|
|
41
|
+
getSelectedTemplateName(): string;
|
|
42
|
+
isStepValid(): boolean;
|
|
43
|
+
markStepTouched(): void;
|
|
37
44
|
ngOnDestroy(): void;
|
|
38
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserTemplateStepComponent, never>;
|
|
39
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UserTemplateStepComponent, "tk-user-template-step", never, { "customerId": "customerId"; }, {}, never, never, false, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserTemplateStepComponent, "tk-user-template-step", never, { "customerId": "customerId"; }, { "validityChange": "validityChange"; }, never, never, false, never>;
|
|
40
47
|
}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { MatStepper } from '@angular/material/stepper';
|
|
2
3
|
import { NotificationService } from '../../shared/services/notification.service';
|
|
4
|
+
import { UserDetailsStepComponent } from './components/user-details-step/user-details-step.component';
|
|
5
|
+
import { UserTemplateStepComponent } from './components/user-template-step/user-template-step.component';
|
|
3
6
|
import * as i0 from "@angular/core";
|
|
7
|
+
export declare const USER_CREATED_SUCCESSFLLY = "User created successfully";
|
|
4
8
|
export declare class UserCreationWizardComponent implements OnInit, OnDestroy {
|
|
5
9
|
private notificationService;
|
|
6
10
|
private readonly apiService;
|
|
11
|
+
private readonly userCreationWizardService;
|
|
7
12
|
title: string;
|
|
8
13
|
host: string;
|
|
9
14
|
token: string;
|
|
@@ -12,11 +17,19 @@ export declare class UserCreationWizardComponent implements OnInit, OnDestroy {
|
|
|
12
17
|
submit: EventEmitter<void>;
|
|
13
18
|
isSubmitting: boolean;
|
|
14
19
|
private submitTimerId;
|
|
20
|
+
selectedIndex: number;
|
|
21
|
+
templateStepValid: boolean;
|
|
22
|
+
detailsStepValid: boolean;
|
|
23
|
+
templateStep?: UserTemplateStepComponent;
|
|
24
|
+
detailsStep?: UserDetailsStepComponent;
|
|
25
|
+
isLoading: boolean;
|
|
15
26
|
constructor(notificationService: NotificationService);
|
|
16
27
|
ngOnInit(): void;
|
|
17
28
|
onCancel(): void;
|
|
29
|
+
onStepperNext(stepper: MatStepper): void;
|
|
18
30
|
onSubmit(): void;
|
|
19
31
|
ngOnDestroy(): void;
|
|
32
|
+
private _saveChanges;
|
|
20
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserCreationWizardComponent, never>;
|
|
21
34
|
static ɵcmp: i0.ɵɵComponentDeclaration<UserCreationWizardComponent, "tk-user-creation-wizard", never, { "title": "title"; "host": "host"; "token": "token"; "customerId": "customerId"; }, { "cancel": "cancel"; "submit": "submit"; }, never, never, false, never>;
|
|
22
35
|
}
|
|
@@ -1,91 +1,92 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { SiteDefaults } from "../../classes/site";
|
|
3
|
+
import { Site } from "../../classes/site";
|
|
4
|
+
import { DeviceEntry, EndUserInterface, LineOption, OverviewDeviceRow, OverviewLineRow, OverviewUserRow, SelectedLineRow, TemplateDeviceLike, TemplateEndUserLike, TemplateLineLike, UserCreationType, UserDetailsForm, UserDetailsFormValue, UserTemplateInterface, LineInterface, DeviceInterface, AvailableRangeInterface, ListUserInterface } from "../../interfaces/user-creation-wizard.interfaces";
|
|
1
5
|
import * as i0 from "@angular/core";
|
|
2
|
-
export interface LdapUserRow {
|
|
3
|
-
userId: string;
|
|
4
|
-
firstName: string;
|
|
5
|
-
lastName: string;
|
|
6
|
-
email: string;
|
|
7
|
-
}
|
|
8
|
-
export interface OverviewUserRow extends LdapUserRow {
|
|
9
|
-
userTemplate: string;
|
|
10
|
-
}
|
|
11
|
-
export interface OverviewLineRow {
|
|
12
|
-
number: string;
|
|
13
|
-
did: string;
|
|
14
|
-
routePartitionName: string;
|
|
15
|
-
css: string;
|
|
16
|
-
description: string;
|
|
17
|
-
}
|
|
18
|
-
export interface OverviewDeviceRow {
|
|
19
|
-
name: string;
|
|
20
|
-
deviceType: string;
|
|
21
|
-
lines: string;
|
|
22
|
-
description: string;
|
|
23
|
-
}
|
|
24
|
-
export type UserCreationType = 'CUCM' | 'MT';
|
|
25
|
-
export interface UserDetailsForm {
|
|
26
|
-
userId: string;
|
|
27
|
-
firstName: string;
|
|
28
|
-
lastName: string;
|
|
29
|
-
email: string;
|
|
30
|
-
}
|
|
31
|
-
export interface LineOption {
|
|
32
|
-
number: string;
|
|
33
|
-
did: string;
|
|
34
|
-
css: string;
|
|
35
|
-
description: string;
|
|
36
|
-
}
|
|
37
|
-
export interface SelectedLineRow {
|
|
38
|
-
lineNumber: string | null;
|
|
39
|
-
routePartitionName: string | null;
|
|
40
|
-
}
|
|
41
|
-
export interface DeviceEntry {
|
|
42
|
-
deviceType: string;
|
|
43
|
-
protocol: string;
|
|
44
|
-
buttonTemplate: string;
|
|
45
|
-
name: string;
|
|
46
|
-
}
|
|
47
6
|
export declare class UserCreationWizardService {
|
|
48
|
-
private readonly
|
|
7
|
+
private readonly userCreationApiService;
|
|
49
8
|
readonly ldapTableColumns: string[];
|
|
50
9
|
readonly userCreationTypes: UserCreationType[];
|
|
10
|
+
private template;
|
|
11
|
+
endUser: EndUserInterface | null;
|
|
12
|
+
lines: LineInterface[];
|
|
13
|
+
devices: DeviceInterface[];
|
|
14
|
+
deviceProfiles: DeviceInterface[];
|
|
15
|
+
private _currentSite;
|
|
16
|
+
get currentSite(): Site | null;
|
|
51
17
|
siteOptions: string[];
|
|
52
18
|
templateOptions: string[];
|
|
53
19
|
lineOptions: LineOption[];
|
|
54
20
|
routePartitionOptions: string[];
|
|
55
21
|
deviceRows: number[];
|
|
56
|
-
ldapUsers:
|
|
22
|
+
ldapUsers: ListUserInterface[];
|
|
57
23
|
overviewUsers: OverviewUserRow[];
|
|
58
24
|
overviewLines: OverviewLineRow[];
|
|
59
25
|
overviewDevices: OverviewDeviceRow[];
|
|
26
|
+
overviewDeviceProfiles: OverviewDeviceRow[];
|
|
27
|
+
userDetailsFormValue: UserDetailsFormValue | null;
|
|
60
28
|
userDetailsForm: UserDetailsForm;
|
|
61
29
|
lineSelections: SelectedLineRow[];
|
|
62
30
|
deviceEntries: DeviceEntry[];
|
|
63
|
-
|
|
64
|
-
|
|
31
|
+
availableNumbers: string[];
|
|
32
|
+
deviceTypes: string[];
|
|
33
|
+
siteDefaults: SiteDefaults | null;
|
|
34
|
+
originalSiteDefaults: SiteDefaults | null;
|
|
35
|
+
templateLines: TemplateLineLike[];
|
|
36
|
+
templateDevices: TemplateDeviceLike[];
|
|
37
|
+
templateUserDetails: TemplateEndUserLike;
|
|
38
|
+
selectedSite: number | null;
|
|
39
|
+
selectedTemplateName: string | null;
|
|
40
|
+
selectedTemplateId: number | null;
|
|
65
41
|
selectedUserCreationType: UserCreationType;
|
|
66
|
-
|
|
42
|
+
availableDidPatternsMappedToDn: any;
|
|
43
|
+
get firstLineRoutePartition(): string;
|
|
44
|
+
get siteDefaultRoutePartition(): string;
|
|
45
|
+
get routePartitionNamesList(): string[];
|
|
46
|
+
selectedLdapUser: ListUserInterface | null;
|
|
47
|
+
ldapUsersTotal: number;
|
|
67
48
|
constructor();
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
49
|
+
get isLdapIntegrated(): boolean;
|
|
50
|
+
selectLdapUser(user: ListUserInterface): void;
|
|
51
|
+
clearLdapUserSelection(): void;
|
|
52
|
+
isLdapUserRowSelected(row: ListUserInterface): boolean;
|
|
53
|
+
setLdapUsersResult(users: ListUserInterface[], total: number): void;
|
|
54
|
+
setSelectedSite(site: number | null): void;
|
|
55
|
+
setSelectedTemplate(template?: UserTemplateInterface | undefined): void;
|
|
56
|
+
setCurrentSite(site: Site): void;
|
|
72
57
|
resetTemplateDrivenData(): void;
|
|
73
|
-
applyTemplateTokenPayload(payload:
|
|
58
|
+
applyTemplateTokenPayload(payload: UserTemplateInterface): void;
|
|
74
59
|
setSelectedUserCreationType(type: UserCreationType): void;
|
|
75
60
|
setUserDetailsField(field: keyof UserDetailsForm, value: string): void;
|
|
61
|
+
applyUserDetailsFormValue(formValue: UserDetailsFormValue): void;
|
|
76
62
|
setLineSelection(index: number, lineNumber: string | null): void;
|
|
77
63
|
setRoutePartitionSelection(index: number, routePartitionName: string | null): void;
|
|
78
64
|
setDeviceName(index: number, name: string): void;
|
|
79
65
|
getDeviceDisplayName(index: number): string;
|
|
80
|
-
|
|
66
|
+
getSiteAllData(siteId: number): Observable<any>;
|
|
67
|
+
getNumberRange(siteId: string, routePartition: string): Observable<AvailableRangeInterface>;
|
|
81
68
|
private rebuildOverviewUsers;
|
|
82
69
|
private rebuildOverviewLines;
|
|
83
70
|
private rebuildOverviewDevices;
|
|
71
|
+
private rebuildOverviewDeviceProfiles;
|
|
84
72
|
private extractTemplateFromTokenPayload;
|
|
85
73
|
private uniqueByNumber;
|
|
86
74
|
private uniqueStrings;
|
|
87
75
|
private valueToString;
|
|
76
|
+
private getUnwrapNumberRange;
|
|
77
|
+
private unwrapNumberRange;
|
|
78
|
+
setAvailableDidMappedToDn(availableNumber: any): void;
|
|
88
79
|
loadDataFromApi(): void;
|
|
80
|
+
private initLineWithSiteInfo;
|
|
81
|
+
private setLineAssociationsForDevice;
|
|
82
|
+
private initDeviceWithSiteInfo;
|
|
83
|
+
private replaceDynamicValueSiteInfo;
|
|
84
|
+
private replaceDynamicValueFormat;
|
|
85
|
+
mutliStringReplace(object: any, input: string, directoryNumber?: string, user?: any): string;
|
|
86
|
+
private initTemplateDnsNamesForLines;
|
|
87
|
+
buildSavableEndUser(): EndUserInterface;
|
|
88
|
+
private resolveDeviceNameForSave;
|
|
89
|
+
saveNewUser(): Observable<any>;
|
|
89
90
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserCreationWizardService, never>;
|
|
90
91
|
static ɵprov: i0.ɵɵInjectableDeclaration<UserCreationWizardService>;
|
|
91
92
|
}
|