web-component-stencil-test
Version:
Stencil Component Starter
101 lines (100 loc) • 1.96 kB
TypeScript
import { EventEmitter } from '../../stencil.core';
import { InputDefinition } from '../form/constants';
export declare class Input {
/**
* Name
*/
name: string;
/**
* Prefix
*/
prefixInput: string;
/**
* Type
*/
type: string;
/**
* Required
*/
required: boolean;
/**
* Read only
*/
readonly: boolean;
/**
* Disabled
*/
disabled: boolean;
/**
* Pattern for validation
*/
pattern: RegExp;
/**
* Max Length
*/
maxlength: number;
/**
* Label
*/
label: string;
/**
* placeholder
*/
placeholder: string;
/**
* Classnames for the <label> element
*/
labelClassnames: string;
/**
* Classnames for the <input /> element
*/
inputClassnames: string;
/**
* Input id
*/
idInput: string;
/**
* Value
*/
value: string;
watchHandler(newValue: string): void;
/**
* Error state
*/
error: boolean;
/**
* Error message
*/
errorMessage: string;
/**
* current value
*/
currentValue: string;
/**
* internal type object
*/
inputDefinition: InputDefinition;
/**
* Get the current value of the input. To get a live value of the input, use element.addEventListener('input', () => element.getValue());
*/
getValue(): Promise<string>;
/**
* Test validation of the current input value.
*/
isValid(): Promise<boolean>;
valueChanges: EventEmitter;
valueChanged(event: any): void;
private inputElement;
private formatPatternForDOM;
private onChange;
private onInput;
private shouldBeValidated;
private validateRequired;
private validateMaxLength;
private validatePattern;
private getId;
private getTypeObject;
private parseValue;
componentWillLoad(): void;
render(): any;
}