UNPKG

@sixbell-telco/sdk

Version:

A collection of reusable components designed for use in Sixbell Telco Angular projects

38 lines (37 loc) 1.55 kB
import * as i0 from "@angular/core"; /** * Directive that restricts input to numeric characters only. * * Use the `stOnlyNumbers` selector to enable numeric-only input restriction. * For backward compatibility, the `stJustNumbers` selector is also supported but is deprecated. * * @example * ```html * <!-- Modern usage (recommended) --> * <input stOnlyNumbers /> * <input [stOnlyNumbers]="true" /> * ``` */ export declare class OnlyNumbersDirective { /** * Enable numeric-only input restriction. * @default false */ stOnlyNumbers: import("@angular/core").InputSignal<boolean>; /** * @deprecated Use `stOnlyNumbers` input instead. * This input is maintained for backward compatibility and will be removed in a future major version. */ justNumbers: import("@angular/core").InputSignal<boolean>; constructor(); blockPaste(event: ClipboardEvent): boolean; onKeyPress(event: KeyboardEvent): boolean; /** * Determines if the numeric-only restriction is enabled. * Checks both the new and deprecated inputs for backward compatibility. * @private */ private getEnabled; static ɵfac: i0.ɵɵFactoryDeclaration<OnlyNumbersDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<OnlyNumbersDirective, "[stOnlyNumbers], [stJustNumbers]", never, { "stOnlyNumbers": { "alias": "stOnlyNumbers"; "required": false; "isSignal": true; }; "justNumbers": { "alias": "justNumbers"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; }