/**-----------------------------------------------------------------------------------------
* Copyright © 2026 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { ElementRef, EventEmitter, OnChanges, Renderer2, SimpleChanges, NgZone, Injector, ChangeDetectorRef } from '@angular/core';
import { AbstractControl, ControlValueAccessor, Validator } from '@angular/forms';
import { PrefixTemplateDirective, SuffixTemplateDirective } from '@progress/kendo-angular-common';
import { MaskingService } from './masking.service';
import { InputSize } from '../common/models';
import { InputRounded } from '../common/models/rounded';
import { InputFillMode } from '../common/models/fillmode';
import * as i0 from "@angular/core";
/**
* Represents the [Kendo UI MaskedTextBox component for Angular](https://www.telerik.com/kendo-angular-ui/components/inputs/maskedtextbox).
*
* @example
* ```typescript
* import { Component } from '@angular/core';
*
* @Component({
* selector: 'my-app',
* template: `
*
*
* `
* })
* export class AppComponent {
* public value: string = "9580128055807792";
* public mask: string = "0000-0000-0000-0000";
* }
* ```
*/
export declare class MaskedTextBoxComponent implements ControlValueAccessor, OnChanges, Validator {
private service;
private renderer;
hostElement: ElementRef;
private ngZone;
private injector;
private changeDetector;
/**
* @hidden
*/
focusableId: string;
/**
* Disables the MaskedTextBox when you set it to `true` ([see example](https://www.telerik.com/kendo-angular-ui/components/inputs/maskedtextbox/disabled-state)).
* To disable the component in reactive forms, see [Forms Support](https://www.telerik.com/kendo-angular-ui/components/inputs/maskedtextbox/forms#managing-the-maskedtextbox-disabled-state-in-reactive-forms).
* @default false
*/
disabled: boolean;
/**
* When `true`, sets the MaskedTextBox to read-only mode ([see example](https://www.telerik.com/kendo-angular-ui/components/inputs/maskedtextbox/readonly-state)).
* @default false
*/
readonly: boolean;
/**
* Sets the `title` attribute of the input element.
*
* @remarks
* This property is related to accessibility.
*/
title: string;
/**
* Sets the padding size of the MaskedTextBox input element ([see example](https://www.telerik.com/kendo-angular-ui/components/inputs/maskedtextbox/appearance#size)). The default value is set by the Kendo theme.
*/
set size(size: InputSize);
get size(): InputSize;
/**
* Sets the border radius of the MaskedTextBox ([see example](https://www.telerik.com/kendo-angular-ui/components/inputs/maskedtextbox/appearance#roundness)). The default value is set by the Kendo theme.
*/
set rounded(rounded: InputRounded);
get rounded(): InputRounded;
/**
* Sets the background and border style of the MaskedTextBox ([see example](https://www.telerik.com/kendo-angular-ui/components/inputs/maskedtextbox/appearance#fill-mode)). The default value is set by the Kendo theme.
*/
set fillMode(fillMode: InputFillMode);
get fillMode(): InputFillMode;
/**
* Sets the mask pattern for the MaskedTextBox ([see example](https://www.telerik.com/kendo-angular-ui/components/inputs/maskedtextbox/value)).
* If you do not set a mask, the component acts as a standard `type="text"` input.
*
* If the mask allows spaces, set the [`promptPlaceholder`](https://www.telerik.com/kendo-angular-ui/components/inputs/api/maskedtextboxcomponent#promptplaceholder)
* to a character that the mask does not accept.
*/
mask: string;
/**
* Sets the value of the MaskedTextBox.
*/
value: string;
/**
* Sets the RegExp-based mask validation rules ([see example](https://www.telerik.com/kendo-angular-ui/components/inputs/maskedtextbox/masks)).
*/
set rules(value: {
[key: string]: RegExp;
});
get rules(): {
[key: string]: RegExp;
};
/**
* Sets the prompt character for the masked value.
* @default `_`
*/
prompt: string;
/**
* Sets the character that represents an empty position in the raw value.
* @default ' '
*/
promptPlaceholder: string;
/**
* When `true` includes literals in the raw value ([see example](https://www.telerik.com/kendo-angular-ui/components/inputs/maskedtextbox/value)).
* @default false
*/
includeLiterals: boolean;
/**
* Shows the mask on focus when the value is empty.
*/
maskOnFocus: boolean;
/**
* Enables the built-in mask validator when you set it to `true` ([see example](https://www.telerik.com/kendo-angular-ui/components/inputs/maskedtextbox/validation)).
* @default true
*/
maskValidation: boolean;
/**
* Sets the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) attribute of the component.
*
* @default 0
*/
tabindex: number;
/**
* @hidden
*/
set tabIndex(tabIndex: number);
get tabIndex(): number;
/**
* Sets HTML attributes for the inner input element.
* You cannot change attributes that are essential for component functionality.
*/
set inputAttributes(attributes: {
[key: string]: string;
});
get inputAttributes(): {
[key: string]: string;
};
private get defaultAttributes();
private get mutableAttributes();
/**
* Fires when the MaskedTextBox gets focused.
*
* To subscribe programmatically, use the `onFocus` property.
*
*/
onFocus: EventEmitter;
/**
* Fires when the MaskedTextBox gets blurred.
*
* To subscribe programmatically, use the `onBlur` property.
*
*/
onBlur: EventEmitter;
/**
* Fires when the input element gets focused.
*/
inputFocus: EventEmitter;
/**
* Fires when the input element gets blurred.
*/
inputBlur: EventEmitter;
/**
* Fires when the value changes.
*/
valueChange: EventEmitter;
direction: string;
hostClasses: boolean;
get hostDisabledClass(): boolean;
/**
* Returns the `ElementRef` of the visible `input` element.
*/
input: ElementRef;
/**
* @hidden
*/
suffixTemplate: SuffixTemplateDirective;
/**
* @hidden
*/
prefixTemplate: PrefixTemplateDirective;
protected isFocused: boolean;
private maskedValue;
private focusClick;
private defaultRules;
private _rules;
private isPasted;
private selection;
private control;
private _size;
private _rounded;
private _fillMode;
private _inputAttributes;
private parsedAttributes;
constructor(service: MaskingService, renderer: Renderer2, hostElement: ElementRef, ngZone: NgZone, injector: Injector, changeDetector: ChangeDetectorRef, rtl: boolean);
ngOnInit(): void;
ngAfterViewInit(): void;
/**
* @hidden
* Used by the FloatingLabel to determine if the MaskedTextBox is empty.
*/
isEmpty(): boolean;
/**
* @hidden
*/
handleFocus: () => void;
/**
* @hidden
*/
handleInputFocus: () => void;
/**
* @hidden
*/
handleClick: () => void;
/**
* @hidden
*/
handleBlur: () => void;
/**
* @hidden
*/
handleInputBlur: () => void;
/**
* @hidden
*/
handleDragDrop(): boolean;
/**
* Focuses the MaskedTextBox.
*
* @example
* ```ts-no-run
* _@Component({
* selector: 'my-app',
* template: `
*
*
* `
* })
* class AppComponent { }
* ```
*/
focus(): void;
/**
* Blurs the MaskedTextBox.
*/
blur(): void;
/**
* @hidden
*/
pasteHandler(e: any): void;
/**
* @hidden
*/
inputHandler(e: any): void;
/**
* @hidden
*/
ngOnChanges(changes: SimpleChanges): void;
/**
* @hidden
* Writes a new value to the element.
*/
writeValue(value: string): void;
/**
* @hidden
* Sets the function that will be called when a `change` event is triggered.
*/
registerOnChange(fn: (_: any) => void): void;
/**
* @hidden
* Sets the function that will be called when a `touch` event is triggered.
*/
registerOnTouched(fn: () => void): void;
/**
* @hidden
* Called when the status of the component changes to or from `disabled`.
* Depending on the value, it enables or disables the appropriate DOM element.
*
* @param isDisabled
*/
setDisabledState(isDisabled: boolean): void;
/**
* @hidden
*/
validate(_?: AbstractControl): any;
/**
* @hidden
*/
get isControlInvalid(): boolean;
/**
* @hidden
*/
get isControlRequired(): boolean;
/**
* @hidden
*/
updateValueWithEvents(maskedValue: string, callOnChange?: boolean): void;
protected onChange: (_: any) => void;
protected onTouched: () => void;
private updateValue;
private updateInput;
private extractChanges;
private updateService;
private setSelection;
private get emptyMask();
private setFocusSelection;
/**
* @hidden
*/
get focused(): boolean;
/**
* @hidden
*/
set focused(value: boolean);
private normalizeValue;
private handleClasses;
private setInputAttributes;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵcmp: i0.ɵɵComponentDeclaration;
}