@tuki-io/tuki-widgets 0.0.194 → 0.0.196
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/di2mt/shared/components/stat-card/stat-card.component.mjs +4 -4
- package/esm2020/di2mt/widgets/upgrade-overview/cards/pending-activation-users/pending-activation-users.component.mjs +1 -2
- package/esm2020/user-creation/src/interfaces/user-creation-wizard.interfaces.mjs +1 -1
- package/esm2020/user-creation/src/shared/components/notification/notification.component.mjs +5 -7
- package/esm2020/user-creation/src/shared/services/user-creation-api.service.mjs +3 -2
- package/esm2020/user-creation/src/utils/device-name-validation.mjs +23 -0
- package/esm2020/user-creation/src/utils/parse-device-name-rule.mjs +26 -0
- package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.mjs +102 -19
- 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/user-creation-wizard.component.mjs +13 -3
- package/esm2020/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.mjs +105 -16
- package/esm2020/users-list/src/users-list.component.mjs +6 -3
- package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs +4 -4
- package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs.map +1 -1
- package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs +288 -63
- package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
- package/fesm2015/tuki-io-tuki-widgets-users-list.mjs +5 -2
- package/fesm2015/tuki-io-tuki-widgets-users-list.mjs.map +1 -1
- package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs +3 -4
- package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs.map +1 -1
- package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs +277 -60
- package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
- package/fesm2020/tuki-io-tuki-widgets-users-list.mjs +5 -2
- package/fesm2020/tuki-io-tuki-widgets-users-list.mjs.map +1 -1
- package/package.json +1 -1
- package/user-creation/src/interfaces/user-creation-wizard.interfaces.d.ts +19 -0
- package/user-creation/src/shared/services/user-creation-api.service.d.ts +2 -2
- package/user-creation/src/utils/device-name-validation.d.ts +6 -0
- package/user-creation/src/utils/parse-device-name-rule.d.ts +8 -0
- package/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.d.ts +8 -0
- package/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.component.d.ts +2 -0
- package/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.d.ts +14 -0
- package/esm2020/user-creation/src/utils/validation.mjs +0 -14
- package/user-creation/src/utils/validation.d.ts +0 -4
package/package.json
CHANGED
|
@@ -176,6 +176,22 @@ export interface DidPattern {
|
|
|
176
176
|
calledPartyTransformationMask?: string | null;
|
|
177
177
|
pattern?: string | null;
|
|
178
178
|
}
|
|
179
|
+
export interface ProtocolSpecificDefaults {
|
|
180
|
+
buttonTemplates: string[];
|
|
181
|
+
securityProfiles: string[];
|
|
182
|
+
supportedExpansionModules: string[];
|
|
183
|
+
supportsSoftkeyTemplates: boolean;
|
|
184
|
+
supportsBLF: boolean;
|
|
185
|
+
supportsEM: boolean;
|
|
186
|
+
supportsMultipleCallDisplay: boolean;
|
|
187
|
+
}
|
|
188
|
+
export interface DeviceDefaultsInterface {
|
|
189
|
+
deviceType: string;
|
|
190
|
+
deviceNameRegex: string;
|
|
191
|
+
deviceNameExplained: string;
|
|
192
|
+
networkLocales: string[];
|
|
193
|
+
protocolProtocolSpecificDefault: Record<string, ProtocolSpecificDefaults>;
|
|
194
|
+
}
|
|
179
195
|
export interface DeviceInterface {
|
|
180
196
|
deviceType: string | null;
|
|
181
197
|
protocol: string | null;
|
|
@@ -209,6 +225,9 @@ export interface DeviceInterface {
|
|
|
209
225
|
busyLampFields: BusyLampField[];
|
|
210
226
|
webexUUID: string | null;
|
|
211
227
|
pkid: string | null;
|
|
228
|
+
deviceDefaults?: DeviceDefaultsInterface | null;
|
|
229
|
+
nameValidationRegex?: string | null;
|
|
230
|
+
nameValidationCaption?: string | null;
|
|
212
231
|
}
|
|
213
232
|
export interface LineAssociation {
|
|
214
233
|
linePkid: string | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
2
|
import { Site, SiteDefaults, SiteInterface } from "../../classes/site";
|
|
3
|
-
import { UserTemplateInterface } from "../../interfaces/user-creation-wizard.interfaces";
|
|
3
|
+
import { DeviceDefaultsInterface, UserTemplateInterface } from "../../interfaces/user-creation-wizard.interfaces";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class UserCreationApiService {
|
|
6
6
|
private _allSites;
|
|
@@ -24,7 +24,7 @@ export declare class UserCreationApiService {
|
|
|
24
24
|
getLdapUsers(siteId: string, params: any): Observable<any>;
|
|
25
25
|
checkUserIdExisting(siteId: string, userId: string): Observable<any>;
|
|
26
26
|
saveTemplateUser(user: any, templateId: string, siteId: string): Observable<any>;
|
|
27
|
-
getDeviceDefaults(siteId: string, deviceType: string): Observable<
|
|
27
|
+
getDeviceDefaults(siteId: string, deviceType: string): Observable<DeviceDefaultsInterface>;
|
|
28
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserCreationApiService, never>;
|
|
29
29
|
static ɵprov: i0.ɵɵInjectableDeclaration<UserCreationApiService>;
|
|
30
30
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strips a leading device-prefix group from `deviceNameRegex`, returning the pattern
|
|
3
|
+
* to validate the name field value (without matPrefix).
|
|
4
|
+
*
|
|
5
|
+
* - `([sS][eE][pP]|BAT)[0-9a-fA-F]{12}` → `[0-9a-fA-F]{12}`
|
|
6
|
+
* - `[a-zA-Z0-9]{1,15}` → `[a-zA-Z0-9]{1,15}` (unchanged)
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseDeviceNameRegexBody(deviceNameRegex: string | null | undefined): string;
|
|
@@ -41,6 +41,10 @@ export declare class UserDetailsStepComponent implements OnInit, OnDestroy {
|
|
|
41
41
|
getLineGroup(index: number): FormGroup;
|
|
42
42
|
getDeviceGroup(index: number): FormGroup;
|
|
43
43
|
getDeviceProfileGroup(index: number): FormGroup;
|
|
44
|
+
getDeviceNamePrefix(index: number): string | null;
|
|
45
|
+
getDeviceProfileNamePrefix(index: number): string | null;
|
|
46
|
+
getDeviceNameValidationCaption(index: number): string;
|
|
47
|
+
getDeviceProfileNameValidationCaption(index: number): string;
|
|
44
48
|
getFilteredNumbers(lineIndex: number): string[];
|
|
45
49
|
getFilteredRoutePartitions(lineIndex: number): string[];
|
|
46
50
|
filterAvailableNumbers(lineIndex: number, event: Event): void;
|
|
@@ -61,6 +65,10 @@ export declare class UserDetailsStepComponent implements OnInit, OnDestroy {
|
|
|
61
65
|
private setupValidityEmitter;
|
|
62
66
|
private emitValidity;
|
|
63
67
|
private buildDynamicFormArrays;
|
|
68
|
+
private buildDeviceNameValidators;
|
|
69
|
+
private applyDeviceNameValidators;
|
|
70
|
+
private resetLdapSearchForm;
|
|
71
|
+
private patchUserFieldsFromSavedValue;
|
|
64
72
|
private patchUserFieldsFromService;
|
|
65
73
|
private setupLineListeners;
|
|
66
74
|
private initLineFilters;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { StepperSelectionEvent } from '@angular/cdk/stepper';
|
|
2
3
|
import { MatStepper } from '@angular/material/stepper';
|
|
3
4
|
import { NotificationService } from '../../shared/services/notification.service';
|
|
4
5
|
import { UserDetailsStepComponent } from './components/user-details-step/user-details-step.component';
|
|
@@ -26,6 +27,7 @@ export declare class UserCreationWizardComponent implements OnInit, OnDestroy {
|
|
|
26
27
|
constructor(notificationService: NotificationService);
|
|
27
28
|
ngOnInit(): void;
|
|
28
29
|
onCancel(): void;
|
|
30
|
+
onStepSelectionChange(event: StepperSelectionEvent): void;
|
|
29
31
|
onStepperNext(stepper: MatStepper): void;
|
|
30
32
|
onSubmit(): void;
|
|
31
33
|
ngOnDestroy(): void;
|
|
@@ -12,6 +12,7 @@ export declare class UserCreationWizardService {
|
|
|
12
12
|
lines: LineInterface[];
|
|
13
13
|
devices: DeviceInterface[];
|
|
14
14
|
deviceProfiles: DeviceInterface[];
|
|
15
|
+
private templateLinesSnapshot;
|
|
15
16
|
private _currentSite;
|
|
16
17
|
get currentSite(): Site | null;
|
|
17
18
|
siteOptions: string[];
|
|
@@ -40,6 +41,8 @@ export declare class UserCreationWizardService {
|
|
|
40
41
|
selectedTemplateId: number | null;
|
|
41
42
|
selectedUserCreationType: UserCreationType;
|
|
42
43
|
availableDidPatternsMappedToDn: any;
|
|
44
|
+
private readonly deviceDefaultsLoadedSubject;
|
|
45
|
+
readonly deviceDefaultsLoaded$: Observable<void>;
|
|
43
46
|
get firstLineRoutePartition(): string;
|
|
44
47
|
get siteDefaultRoutePartition(): string;
|
|
45
48
|
get routePartitionNamesList(): string[];
|
|
@@ -57,6 +60,8 @@ export declare class UserCreationWizardService {
|
|
|
57
60
|
resetTemplateDrivenData(): void;
|
|
58
61
|
applyTemplateTokenPayload(payload: UserTemplateInterface): void;
|
|
59
62
|
setSelectedUserCreationType(type: UserCreationType): void;
|
|
63
|
+
resetUserDetailsStepState(): void;
|
|
64
|
+
private captureTemplateLinesSnapshot;
|
|
60
65
|
setUserDetailsField(field: keyof UserDetailsForm, value: string): void;
|
|
61
66
|
applyUserDetailsFormValue(formValue: UserDetailsFormValue): void;
|
|
62
67
|
setLineSelection(index: number, lineNumber: string | null): void;
|
|
@@ -64,6 +69,15 @@ export declare class UserCreationWizardService {
|
|
|
64
69
|
setDeviceName(index: number, name: string): void;
|
|
65
70
|
getDeviceDisplayName(index: number): string;
|
|
66
71
|
getSiteAllData(siteId: number): Observable<any>;
|
|
72
|
+
loadDeviceDefaultsForDevices(siteId: number): Observable<void>;
|
|
73
|
+
private getUniqueDeviceTypes;
|
|
74
|
+
private applyDeviceDefaultsToType;
|
|
75
|
+
getDeviceNamePrefix(deviceIndex: number, isProfile?: boolean): string | null;
|
|
76
|
+
getDeviceNameValidationCaption(deviceIndex: number, isProfile?: boolean): string;
|
|
77
|
+
getDeviceNameValidationOptions(deviceIndex: number, isProfile?: boolean): {
|
|
78
|
+
regex: string;
|
|
79
|
+
caption: string;
|
|
80
|
+
} | null;
|
|
67
81
|
getNumberRange(siteId: string, routePartition: string): Observable<AvailableRangeInterface>;
|
|
68
82
|
private rebuildOverviewUsers;
|
|
69
83
|
private rebuildOverviewLines;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const MAC_ADDRESS_REGEX = /^[A-Fa-f0-9]{12}$/;
|
|
2
|
-
export const Validation = {
|
|
3
|
-
macAddress() {
|
|
4
|
-
return (control) => {
|
|
5
|
-
const raw = String(control.value ?? '').trim();
|
|
6
|
-
if (!raw) {
|
|
7
|
-
return null;
|
|
8
|
-
}
|
|
9
|
-
const normalized = raw.replace(/^SEP\s*/i, '').trim();
|
|
10
|
-
return MAC_ADDRESS_REGEX.test(normalized) ? null : { macAddress: true };
|
|
11
|
-
};
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R1a2kvd2lkZ2V0cy91c2VyLWNyZWF0aW9uL3NyYy91dGlscy92YWxpZGF0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0saUJBQWlCLEdBQUcsbUJBQW1CLENBQUM7QUFFOUMsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3RCLFVBQVU7UUFDTixPQUFPLENBQUMsT0FBd0IsRUFBMkIsRUFBRTtZQUN6RCxN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