@deckstar/react-final-form-arrays
Advanced tools
| { | ||
| "name": "@deckstar/react-final-form-arrays", | ||
| "version": "1.0.0", | ||
| "version": "1.0.2", | ||
| "description": "A component for rendering and editing arrays 🏁 React Final Form", | ||
@@ -14,3 +14,2 @@ "main": "dist/src", | ||
| ], | ||
| "scripts": {}, | ||
| "author": "Erik Rasmussen <rasmussenerik@gmail.com> (http://github.com/erikras)", | ||
@@ -17,0 +16,0 @@ "license": "MIT", |
| /// <reference types="react" /> | ||
| import { BoundMutators, FormValuesShape } from "final-form"; | ||
| import { BoundMutators, FormValuesShape, FullFieldSubscription } from "final-form"; | ||
| import { BoundArrayMutators } from "final-form-arrays"; | ||
| import { FieldRenderProps, FullFieldSubscription } from "react-final-form"; | ||
| import { FieldRenderProps } from "react-final-form"; | ||
| import type { FieldArrayProps } from "./types"; | ||
| declare const FieldArray: <FieldValue = any, FormValues extends FormValuesShape = FormValuesShape, Subscription extends Partial<Record<"active" | "data" | "dirty" | "dirtySinceLastSubmit" | "error" | "initial" | "invalid" | "length" | "modified" | "modifiedSinceLastSubmit" | "pristine" | "submitError" | "submitFailed" | "submitSucceeded" | "submitting" | "touched" | "valid" | "value" | "visited" | "validating", boolean>> = FullFieldSubscription, Mutators extends BoundMutators<FormValues> & BoundArrayMutators<FormValues> = BoundArrayMutators<FormValues>, T extends HTMLElement = HTMLInputElement, RP extends FieldRenderProps<FieldValue[], FieldValue[], Subscription, T> = FieldRenderProps<FieldValue[], FieldValue[], Subscription, T>>({ name, subscription, defaultValue, initialValue, isEqual, validate, ...rest }: FieldArrayProps<FieldValue, FormValues, Subscription, Mutators, T, RP>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>; | ||
| export default FieldArray; |
@@ -1,4 +0,4 @@ | ||
| import type { BoundMutators, FieldMutators, FieldSubscription, FormValuesShape } from "final-form"; | ||
| import type { BoundMutators, FieldMutators, FieldSubscription, FormValuesShape, FullFieldSubscription } from "final-form"; | ||
| import { BoundArrayMutators } from "final-form-arrays"; | ||
| import { FieldMetaState, FieldRenderProps, FullFieldSubscription, RenderableProps, UseFieldConfig } from "react-final-form"; | ||
| import { FieldInputPropsBasedOnSubscription, FieldMetaState, FieldRenderProps, RenderableProps, UseFieldConfig } from "react-final-form"; | ||
| export type { RenderableProps }; | ||
@@ -8,7 +8,4 @@ export type FieldArrayRenderProps<FieldValue, FormValues extends FormValuesShape = FormValuesShape, Mutators extends BoundMutators<FormValues> & BoundArrayMutators<FormValues> = BoundArrayMutators<FormValues>, Subscription extends FieldSubscription = FullFieldSubscription> = { | ||
| forEach: (iterator: (name: string, index: number) => void) => void; | ||
| length: number; | ||
| map: (iterator: (name: string, index: number) => any) => any[]; | ||
| name: string; | ||
| value: FieldValue[]; | ||
| } & FieldMutators<FormValues, Mutators>; | ||
| } & FieldMutators<FormValues, Mutators> & Pick<FieldInputPropsBasedOnSubscription<FieldValue[], Subscription>, "name" | "value"> & Required<Pick<FieldMetaState<FieldValue[], Subscription>, "length">>; | ||
| meta: Omit<FieldMetaState<FieldValue[], Subscription>, "length">; | ||
@@ -15,0 +12,0 @@ }; |
@@ -1,7 +0,7 @@ | ||
| import type { BoundMutators } from "final-form"; | ||
| import type { BoundMutators, FullFieldSubscription } from "final-form"; | ||
| import { FormValuesShape } from "final-form"; | ||
| import type { BoundArrayMutators } from "final-form-arrays"; | ||
| import { FieldRenderProps, FullFieldSubscription } from "react-final-form"; | ||
| import { FieldRenderProps } from "react-final-form"; | ||
| import type { FieldArrayRenderProps, UseFieldArrayConfig } from "./types"; | ||
| declare const useFieldArray: <FieldValue = any, FormValues extends FormValuesShape = FormValuesShape, Subscription extends Partial<Record<"active" | "data" | "dirty" | "dirtySinceLastSubmit" | "error" | "initial" | "invalid" | "length" | "modified" | "modifiedSinceLastSubmit" | "pristine" | "submitError" | "submitFailed" | "submitSucceeded" | "submitting" | "touched" | "valid" | "value" | "visited" | "validating", boolean>> = FullFieldSubscription, Mutators extends BoundMutators<FormValues> & BoundArrayMutators<FormValues> = BoundArrayMutators<FormValues>, T extends HTMLElement = HTMLInputElement, RP extends FieldRenderProps<FieldValue[], FieldValue[], Subscription, T> = FieldRenderProps<FieldValue[], FieldValue[], Subscription, T>>(name: string, { subscription, defaultValue, initialValue, isEqual, validate: validateProp, }?: UseFieldArrayConfig<FieldValue, FormValues, Subscription, T, RP>) => FieldArrayRenderProps<FieldValue, FormValues, Mutators, Subscription>; | ||
| export default useFieldArray; |
+2
-3
| { | ||
| "name": "@deckstar/react-final-form-arrays", | ||
| "version": "1.0.1", | ||
| "version": "1.0.3", | ||
| "description": "A component for rendering and editing arrays 🏁 React Final Form", | ||
@@ -14,3 +14,2 @@ "main": "dist/src", | ||
| ], | ||
| "scripts": {}, | ||
| "author": "Erik Rasmussen <rasmussenerik@gmail.com> (http://github.com/erikras)", | ||
@@ -37,3 +36,3 @@ "license": "MIT", | ||
| }, | ||
| "gitHead": "23c2d13d7ba9601504a0f64dc6a5489a9dffda20" | ||
| "gitHead": "02a9986e9607c99cebbdb47325c7bfe91c142891" | ||
| } |
32755
0.26%280
-1.06%