UNPKG

@mescius/dspdfviewer

Version:
45 lines (44 loc) 1.67 kB
/// <reference path="../vendor/react/react.d.ts" /> //@ts-ignore import React, { Component } from 'react'; import { WidgetAnnotation, ButtonWidget } from "../Annotations/AnnotationTypes"; import { FormFillerProps, FormFillerModel, FieldMappingStub } from './types'; import { FormFieldMapping } from '../ViewerOptions'; export declare class FormFiller extends Component<FormFillerProps, FormFillerModel> { private _mounted; private _outerElement; private _pendingInvalidFocus; private _autofocusFieldId?; private _pendingAutofocus; constructor(props: FormFillerProps, state: any); componentDidMount(): void; componentWillUnmount(): void; componentDidUpdate(): void; showValidationMessages(): void; render(): React.JSX.Element; readInitialFieldsState(): FormFillerModel; createFieldStub(fieldName: string, mapping: FormFieldMapping): FieldMappingStub; reset(): void; get isMounted(): boolean; raiseOnInitialize(): void; /** * Get field by its name. * @param fieldName */ getFieldByName(fieldName: string): (WidgetAnnotation | FieldMappingStub) | undefined; /** * This method need to be called when field is changed. * @param changedField */ onFieldChanged(changedField: WidgetAnnotation): void; onBeforeRadioButtonChange(radioButton: ButtonWidget, changedFields: WidgetAnnotation[]): boolean; /** * Validate form fields. * Returns true on success. * */ validateFields(): boolean; autoFocus(): void; private _autoFocus; private _focusInvalid; private _focusFieldControl; }