Constructor
Parameters:
| Name |
Type |
Description |
id |
String
|
The id of the component. |
properties |
Object
|
HTMLElement
|
The properties used to initialize the component or the container element. |
- Mixes In:
Returns:
An instance of the component.
-
Type
-
componyx.UI.MaskedTextBox
Extends
Classes
- MaskedTextBoxEvents
Members
allowedCharacters :componyx.UI.MaskedTextBox.CharacterAllowOption
Gets or sets a value indicating which characters are allowed on the underscore (_) slots.
Type:
-
componyx.UI.MaskedTextBox.CharacterAllowOption
customPattern :RegExp
Gets or sets the regular expression pattern when allowedCharacters is set to CUSTOM.
Type:
Type:
- Overrides:
Type:
Gets or sets the id of the HTML input to use.
Type:
mask :string
Gets or sets the text box mask pattern. Use 'A' for letters, '0' for digits, and '_' for any allowed character slot. To include a literal A, 0, or _ in the mask, escape it with a backslash ().
Type:
mask
maskHint :String
Gets or sets the hint text displayed when the input gets focus. This text is appended after the mask pattern. (A=letters, 0=digits)
Type:
showMaskHint :Boolean|Null
Gets or sets a value indicating if the mask hint is displayed. If null, it's auto-detected based on the configured mask and character settings.
Type:
value :string
Gets the raw input value without mask characters.
Type:
value
Sets the raw input value with or without mask characters.
(static, readonly) AllowedCharactersOption :number
Type:
Properties:
| Name |
Type |
Description |
ALPHANUMERIC |
number
|
|
DIGITS |
number
|
|
LETTERS |
number
|
|
CUSTOM |
number
|
|
Methods
(protected) cloneProperties(properties)
Clones component properties. This method should not be invoked by client code directly but only from inside component code.
Parameters:
| Name |
Type |
Description |
properties |
Object
|
The properties to clone. |
- Overrides:
(async) connectedCallback()
Invoked when the element is added to the DOM. Renders the component if not already in the rendering state.
- Overrides:
destroy(keepEvents, removeElement)
Parameters:
| Name |
Type |
Default |
Description |
keepEvents |
Boolean
|
|
A value indicating if component events should be kept. |
removeElement |
Boolean
|
true
|
A value indicating if the corresponding HTML Element should be removed. |
- Overrides:
- See:
-
disconnectedCallback()
Invoked when the element is removed from the DOM. Cleans up the component.
- Overrides:
getCssClass(classOption, cssClassValue) → {string}
Gets the CSS class name from the component property if it exists, otherwise returns the default CSS class.
Parameters:
| Name |
Type |
Description |
classOption |
Object
|
Object containing class options. |
cssClassValue |
string
|
Default CSS class value. |
- Overrides:
Returns:
The resolved CSS class name.
-
Type
-
string
getValue()
Gets the raw input value without mask characters.
init()
Initializes the component with the specified properties.
- Overrides:
(protected) postRender()
Executes the post render procedure. This method should not be invoked by client code directly but only from inside component code.
- Overrides:
render()
- Overrides:
setMaskHint(value)
Parameters:
| Name |
Type |
Description |
value |
string
|
The mask value. |
setValue(value)
Sets the raw input value with or without mask characters.
Parameters:
| Name |
Type |
Description |
value |
string
|
The value to set. |
suppressNextChangeEvent(action)
Suppresses any change events fired by the underlying input element during the execution of the provided action. Use this when programmatically setting a component value to prevent the change event from propagating as a user interaction.
The suppression is automatically lifted after the action completes, even if it throws.
Parameters:
| Name |
Type |
Description |
action |
function
|
The action to execute with change events suppressed. |
- Mixes In:
suppressNextChangeEvent(action)
Suppresses any change events fired by the underlying input element during the execution of the provided action. Use this when programmatically setting a component value to prevent the change event from propagating as a user interaction.
The suppression is automatically lifted after the action completes, even if it throws.
Parameters:
| Name |
Type |
Description |
action |
function
|
The action to execute with change events suppressed. |
- Mixes In: