Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/ui / dist / forms / input / InputState.d.ts
Size: Mime:
import { FocusEvent } from 'react';
import { Serializable } from '@skava/typings';
import { FormStateType } from '../form/typings';
import { InputStateType, InputValue } from './typings';
/**
 * @todo use mobx actions
 * @todo - onValueChange, keyboard navigation, plugins...
 */
declare class InputState<Props = any> extends InputStateType<Props> {
    isVisible: boolean;
    formState: FormStateType;
    static init(data?: Object): InputState<any>;
    static types: {
        _identifier: undefined;
        identity: string;
        name: undefined;
        label: undefined;
        placeholderText: undefined;
        shouldAlignRight: undefined;
        labelText: undefined;
        className: undefined;
        errorMessage: undefined;
        errorMessageFor: undefined;
        maxLength: number;
        animatePlaceholder: undefined;
        value: string;
        isEnabled: boolean;
        isFocused: boolean;
        isSelected: boolean;
        isValidInput: boolean;
        validationType: string;
        type: string;
        elementList: never[];
    };
    isInputState: boolean;
    constructor(stateData?: Object);
    /**
     * loop through keys, set props
     * @see chain.from
     */
    from(obj?: Object): this;
    /**
     * @todo @name setIsFocused
     */
    updateFocused(event: FocusEvent<any>, instance: any): void;
    /**
     * @note @todo @fixme - this is why we do actions to set the data
     */
    validateInput(): void;
    setValue(value: InputValue): void;
    /**
     * @todo should be computed eh...
     */
    getValue: () => import("../../components/molecules/SelectDropDown/Option/typings").OptionLabelValueType;
    setValidationType(validationType: string): void;
    setType(type: string): void;
    setIsValidInput(value: boolean): void;
    disable: () => void;
    enable: () => void;
    invalid: () => void;
    valid: () => void;
    readonly identifier: string;
    select: () => void;
    unselect: () => void;
    setIsSelected: (isSelected: boolean) => void;
    setIsVisible(isVisible: boolean): void;
    /**
     * @description should not really be used - if ever used, as a last resort
     * @type {IAction}
     * @modifies this.input
     */
    setInputReference: (dom: HTMLInputElement) => void;
    /**
     * @description to put props into container
     */
    setProps(props: Props): void;
    /**
     * @variation radio [name] for when it's a radio, because there is only one with the same name
     * @variation toggle/checkbox .isSelected
     * @variation text/textarea/other .value
     */
    toJSON(): Serializable;
    toString(): string;
}
export { InputState };
export default InputState;