import { Component } from 'react'; import * as React from 'react'; import { FieldArrayMutatorAction } from './constants'; import FormContext from './FormContext'; export interface IFieldArrayStateValue { _fieldInternalValue: any; _fieldInternalKey: number; } export interface IFieldArrayProps { name: string; value?: any[]; component: React.ElementType; } export interface IFieldArrayState { fieldArray: IFieldArrayStateValue[]; } declare class FieldArray extends Component { static contextType: React.Context; context: React.ContextType; _uniqueKey: number; _name: string; _mutatorAction: FieldArrayMutatorAction; wrappedComponent: React.ReactInstance; getFormContext: (name: any) => { zentForm: { prefix: any; onChangeFieldArray: (name: any, value: any) => void; }; }; constructor(props: any, context: any); shouldComponentUpdate(nextProps: any, nextState: any): boolean; componentWillMount(): void; componentWillReceiveProps(nextProps: any): void; componentDidMount(): void; componentDidUpdate(prevProps: any, prevState: any): void; onChangeFieldArray: (name: any, value: any) => void; getWrappedComponent: () => React.ReactInstance; saveWrappedComponent: (ref: any) => void; guardFieldArrayChange(fieldArray: any): void; getField: (index: any) => any; getAllFields: () => any[]; forEachFields: (callback: any) => void; mapFields: (callback: any) => any[]; moveFields: (fromPos: any, toPos: any) => void; popFields: () => void; pushFields: (value: any) => void; removeFields: (index: any) => void; removeAllFields: () => void; shiftFields: () => void; swapFields: (indexA: any, indexB: any) => void; unshiftFields: (value: any) => void; concatFields: (values: any) => void; replaceAllFields: (values: any) => void; getName(): string; setMutatorAction(action?: FieldArrayMutatorAction): void; getMutatorAction(): FieldArrayMutatorAction; createInternalFieldValue: (value: any) => { _fieldInternalValue: any; _fieldInternalKey: number; }; getFieldArrayValues(): any[]; getFieldOperations: (name: any, fieldArray: any) => { name: any; length: any; forEach: (callback: any) => void; get: (index: any) => any; getAll: () => any[]; map: (callback: any) => any[]; move: (fromPos: any, toPos: any) => void; pop: () => void; push: (value: any) => void; remove: (index: any) => void; removeAll: () => void; shift: () => void; swap: (indexA: any, indexB: any) => void; unshift: (value: any) => void; concat: (values: any) => void; replaceAll: (values: any) => void; }; componentWillUnmount(): void; render(): JSX.Element; } export default FieldArray;