@tuki-io/tuki-widgets 0.0.213 → 0.0.214
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/utils/device-default-prefix.mjs +19 -2
- package/esm2020/user-creation/src/utils/device-name-dynamic-tokens.mjs +18 -0
- package/esm2020/user-creation/src/utils/parse-device-name-rule.mjs +6 -3
- package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.mjs +65 -12
- package/esm2020/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.mjs +47 -11
- package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs +151 -26
- package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
- package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs +149 -24
- package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
- package/package.json +1 -1
- package/user-creation/src/utils/device-default-prefix.d.ts +7 -2
- package/user-creation/src/utils/device-name-dynamic-tokens.d.ts +5 -0
- package/user-creation/src/utils/parse-device-name-rule.d.ts +1 -0
- package/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.d.ts +3 -0
- package/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { DeviceInterface } from '../interfaces/user-creation-wizard.interfaces';
|
|
1
|
+
import { DeviceDefaultsInterface, DeviceInterface } from '../interfaces/user-creation-wizard.interfaces';
|
|
2
2
|
/** Matches device types like `Cisco 8851`. */
|
|
3
3
|
export declare const CISCO_DIGIT_DEVICE_TYPE_PATTERN: RegExp;
|
|
4
4
|
export declare const DEFAULT_SEP_DEVICE_PREFIX = "SEP";
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Extracts a literal prefix from `deviceNameExplained` patterns such as
|
|
7
|
+
* `SEP[mac]`, `TCT[0-9A-Z._-]{1,12}`, or `[A-Z0-9]{1,15}` (no prefix).
|
|
8
|
+
*/
|
|
9
|
+
export declare function extractDevicePrefixFromNameExplained(deviceNameExplained: string | null | undefined): string | null;
|
|
10
|
+
export declare function applyDefaultDevicePrefixIfMissing(device: Pick<DeviceInterface, 'prefix' | 'deviceType'>, defaults: DeviceDefaultsInterface): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function deviceNameHasDynamicTokens(name: string | null | undefined): boolean;
|
|
2
|
+
/** Device name field stays readonly while the template in `newName` contains placeholders. */
|
|
3
|
+
export declare function isDeviceNameReadonlyFromTemplate(newName: string | null | undefined): boolean;
|
|
4
|
+
/** Form field value without a separate `matPrefix` when `prefix` is already part of the resolved name. */
|
|
5
|
+
export declare function stripDeviceNamePrefix(resolvedName: string, prefix?: string | null): string;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* to validate the name field value (without matPrefix).
|
|
4
4
|
*
|
|
5
5
|
* - `([sS][eE][pP]|BAT)[0-9a-fA-F]{12}` → `[0-9a-fA-F]{12}`
|
|
6
|
+
* - `TCT[0-9A-Z._-]{1,12}` → `[0-9A-Z._-]{1,12}`
|
|
6
7
|
* - `[a-zA-Z0-9]{1,15}` → `[a-zA-Z0-9]{1,15}` (unchanged)
|
|
7
8
|
*/
|
|
8
9
|
export declare function parseDeviceNameRegexBody(deviceNameRegex: string | null | undefined): string;
|
|
@@ -45,6 +45,7 @@ export declare class UserDetailsStepComponent implements OnInit, OnDestroy {
|
|
|
45
45
|
getDeviceProfileNamePrefix(index: number): string | null;
|
|
46
46
|
getDeviceNameValidationCaption(index: number): string;
|
|
47
47
|
getDeviceProfileNameValidationCaption(index: number): string;
|
|
48
|
+
isDeviceNameReadonly(index: number, isProfile: boolean): boolean;
|
|
48
49
|
getFilteredNumbers(lineIndex: number): string[];
|
|
49
50
|
getFilteredRoutePartitions(lineIndex: number): string[];
|
|
50
51
|
filterAvailableNumbers(lineIndex: number, event: Event): void;
|
|
@@ -80,6 +81,8 @@ export declare class UserDetailsStepComponent implements OnInit, OnDestroy {
|
|
|
80
81
|
private applyRoutePartitionFilter;
|
|
81
82
|
private filterOptions;
|
|
82
83
|
private extractDirectoryNumber;
|
|
84
|
+
private syncDeviceNamesFromServiceToForm;
|
|
85
|
+
private updateDeviceNameControlFromService;
|
|
83
86
|
private createUserIdAsyncValidator;
|
|
84
87
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserDetailsStepComponent, never>;
|
|
85
88
|
static ɵcmp: i0.ɵɵComponentDeclaration<UserDetailsStepComponent, "tk-user-details-step", never, {}, { "validityChange": "validityChange"; }, never, never, false, never>;
|
|
@@ -64,6 +64,8 @@ export declare class UserCreationWizardService {
|
|
|
64
64
|
private captureTemplateLinesSnapshot;
|
|
65
65
|
setUserDetailsField(field: keyof UserDetailsForm, value: string): void;
|
|
66
66
|
applyUserDetailsFormValue(formValue: UserDetailsFormValue): void;
|
|
67
|
+
/** Replaces [DN]/[FN]/[LN] placeholders in device names after a directory number is chosen. */
|
|
68
|
+
applyDirectoryNumberToDeviceNames(directoryNumber: string): void;
|
|
67
69
|
setLineSelection(index: number, lineNumber: string | null): void;
|
|
68
70
|
setRoutePartitionSelection(index: number, routePartitionName: string | null): void;
|
|
69
71
|
setDeviceName(index: number, name: string): void;
|