Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

formst

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formst - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

522

dist/components/ErrorMessage.d.ts
import React, { HTMLAttributes, ReactChildren } from 'react';
declare type PropType = {
component?: React.ComponentClass<any> | string;
component?: any;
children?: ReactChildren;
name: string;
} & HTMLAttributes<any>;
declare const ErrorMessage: ((props: PropType) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>) & {
declare const ErrorMessage: ((props: PropType) => React.CElement<{
children?: React.ReactChildren | (React.ReactChildren & string) | (React.ReactChildren & number) | (React.ReactChildren & false) | (React.ReactChildren & true) | (React.ReactChildren & React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>) | (React.ReactChildren & React.ReactNodeArray) | (React.ReactChildren & React.ReactPortal) | undefined;
defaultChecked?: boolean | undefined;
defaultValue?: string | number | readonly string[] | undefined;
suppressContentEditableWarning?: boolean | undefined;
suppressHydrationWarning?: boolean | undefined;
accessKey?: string | undefined;
className?: string | undefined;
contentEditable?: boolean | "true" | "false" | "inherit" | undefined;
contextMenu?: string | undefined;
dir?: string | undefined;
draggable?: boolean | "true" | "false" | undefined;
hidden?: boolean | undefined;
id?: string | undefined;
lang?: string | undefined;
placeholder?: string | undefined;
slot?: string | undefined;
spellCheck?: boolean | "true" | "false" | undefined;
style: {
display: string;
} | React.CSSProperties;
tabIndex?: number | undefined;
title?: string | undefined;
translate?: "yes" | "no" | undefined;
radioGroup?: string | undefined;
role?: string | undefined;
about?: string | undefined;
datatype?: string | undefined;
inlist?: any;
prefix?: string | undefined;
property?: string | undefined;
resource?: string | undefined;
typeof?: string | undefined;
vocab?: string | undefined;
autoCapitalize?: string | undefined;
autoCorrect?: string | undefined;
autoSave?: string | undefined;
color?: string | undefined;
itemProp?: string | undefined;
itemScope?: boolean | undefined;
itemType?: string | undefined;
itemID?: string | undefined;
itemRef?: string | undefined;
results?: number | undefined;
security?: string | undefined;
unselectable?: "on" | "off" | undefined;
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
is?: string | undefined;
'aria-activedescendant'?: string | undefined;
'aria-atomic'?: boolean | "true" | "false" | undefined;
'aria-autocomplete'?: "none" | "inline" | "list" | "both" | undefined;
'aria-busy'?: boolean | "true" | "false" | undefined;
'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
'aria-colcount'?: number | undefined;
'aria-colindex'?: number | undefined;
'aria-colspan'?: number | undefined;
'aria-controls'?: string | undefined;
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
'aria-describedby'?: string | undefined;
'aria-details'?: string | undefined;
'aria-disabled'?: boolean | "true" | "false" | undefined;
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
'aria-errormessage'?: string | undefined;
'aria-expanded'?: boolean | "true" | "false" | undefined;
'aria-flowto'?: string | undefined;
'aria-grabbed'?: boolean | "true" | "false" | undefined;
'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "listbox" | "tree" | "grid" | undefined;
'aria-hidden'?: boolean | "true" | "false" | undefined;
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
'aria-keyshortcuts'?: string | undefined;
'aria-label'?: string | undefined;
'aria-labelledby'?: string | undefined;
'aria-level'?: number | undefined;
'aria-live'?: "off" | "assertive" | "polite" | undefined;
'aria-modal'?: boolean | "true" | "false" | undefined;
'aria-multiline'?: boolean | "true" | "false" | undefined;
'aria-multiselectable'?: boolean | "true" | "false" | undefined;
'aria-orientation'?: "horizontal" | "vertical" | undefined;
'aria-owns'?: string | undefined;
'aria-placeholder'?: string | undefined;
'aria-posinset'?: number | undefined;
'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
'aria-readonly'?: boolean | "true" | "false" | undefined;
'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
'aria-required'?: boolean | "true" | "false" | undefined;
'aria-roledescription'?: string | undefined;
'aria-rowcount'?: number | undefined;
'aria-rowindex'?: number | undefined;
'aria-rowspan'?: number | undefined;
'aria-selected'?: boolean | "true" | "false" | undefined;
'aria-setsize'?: number | undefined;
'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
'aria-valuemax'?: number | undefined;
'aria-valuemin'?: number | undefined;
'aria-valuenow'?: number | undefined;
'aria-valuetext'?: string | undefined;
dangerouslySetInnerHTML?: {
__html: string;
} | undefined;
onCopy?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCopyCapture?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCut?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCutCapture?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onPaste?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onPasteCapture?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCompositionEnd?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionEndCapture?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionStart?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionStartCapture?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionUpdate?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionUpdateCapture?: ((event: React.CompositionEvent<any>) => void) | undefined;
onFocus?: ((event: React.FocusEvent<any>) => void) | undefined;
onFocusCapture?: ((event: React.FocusEvent<any>) => void) | undefined;
onBlur?: ((event: React.FocusEvent<any>) => void) | undefined;
onBlurCapture?: ((event: React.FocusEvent<any>) => void) | undefined;
onChange?: ((event: React.FormEvent<any>) => void) | undefined;
onChangeCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onBeforeInput?: ((event: React.FormEvent<any>) => void) | undefined;
onBeforeInputCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onInput?: ((event: React.FormEvent<any>) => void) | undefined;
onInputCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onReset?: ((event: React.FormEvent<any>) => void) | undefined;
onResetCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onSubmit?: ((event: React.FormEvent<any>) => void) | undefined;
onSubmitCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onInvalid?: ((event: React.FormEvent<any>) => void) | undefined;
onInvalidCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onLoad?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onError?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onErrorCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onKeyDown?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyDownCapture?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyPress?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyPressCapture?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyUp?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyUpCapture?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onAbort?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onAbortCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlay?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlayCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlayThrough?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlayThroughCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onDurationChange?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onDurationChangeCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEmptied?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEmptiedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEncrypted?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEncryptedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEnded?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEndedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedData?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedDataCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedMetadata?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedMetadataCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadStart?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadStartCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPause?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPauseCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlay?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlayCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlaying?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlayingCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onProgress?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onProgressCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onRateChange?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onRateChangeCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeeked?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeekedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeeking?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeekingCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onStalled?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onStalledCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSuspend?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSuspendCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onTimeUpdate?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onTimeUpdateCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onVolumeChange?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onVolumeChangeCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onWaiting?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onWaitingCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onAuxClick?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onAuxClickCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onClick?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onClickCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onContextMenu?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onContextMenuCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onDoubleClick?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onDoubleClickCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onDrag?: ((event: React.DragEvent<any>) => void) | undefined;
onDragCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEnd?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEndCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEnter?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEnterCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragExit?: ((event: React.DragEvent<any>) => void) | undefined;
onDragExitCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragLeave?: ((event: React.DragEvent<any>) => void) | undefined;
onDragLeaveCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragOver?: ((event: React.DragEvent<any>) => void) | undefined;
onDragOverCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragStart?: ((event: React.DragEvent<any>) => void) | undefined;
onDragStartCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDrop?: ((event: React.DragEvent<any>) => void) | undefined;
onDropCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onMouseDown?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseDownCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseEnter?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseLeave?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseMove?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseMoveCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOut?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOutCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOver?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOverCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseUp?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseUpCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onSelect?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSelectCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onTouchCancel?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchCancelCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchEnd?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchEndCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchMove?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchMoveCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchStart?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchStartCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onPointerDown?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerDownCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerMove?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerMoveCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerUp?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerUpCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerCancel?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerCancelCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerEnter?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerEnterCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerLeave?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerLeaveCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOver?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOverCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOut?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOutCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onGotPointerCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onGotPointerCaptureCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onLostPointerCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onLostPointerCaptureCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onScroll?: ((event: React.UIEvent<any, UIEvent>) => void) | undefined;
onScrollCapture?: ((event: React.UIEvent<any, UIEvent>) => void) | undefined;
onWheel?: ((event: React.WheelEvent<any>) => void) | undefined;
onWheelCapture?: ((event: React.WheelEvent<any>) => void) | undefined;
onAnimationStart?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationStartCapture?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationEnd?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationEndCapture?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationIteration?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationIterationCapture?: ((event: React.AnimationEvent<any>) => void) | undefined;
onTransitionEnd?: ((event: React.TransitionEvent<any>) => void) | undefined;
onTransitionEndCapture?: ((event: React.TransitionEvent<any>) => void) | undefined;
}, React.Component<{
children?: React.ReactChildren | (React.ReactChildren & string) | (React.ReactChildren & number) | (React.ReactChildren & false) | (React.ReactChildren & true) | (React.ReactChildren & React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>) | (React.ReactChildren & React.ReactNodeArray) | (React.ReactChildren & React.ReactPortal) | undefined;
defaultChecked?: boolean | undefined;
defaultValue?: string | number | readonly string[] | undefined;
suppressContentEditableWarning?: boolean | undefined;
suppressHydrationWarning?: boolean | undefined;
accessKey?: string | undefined;
className?: string | undefined;
contentEditable?: boolean | "true" | "false" | "inherit" | undefined;
contextMenu?: string | undefined;
dir?: string | undefined;
draggable?: boolean | "true" | "false" | undefined;
hidden?: boolean | undefined;
id?: string | undefined;
lang?: string | undefined;
placeholder?: string | undefined;
slot?: string | undefined;
spellCheck?: boolean | "true" | "false" | undefined;
style: {
display: string;
} | React.CSSProperties;
tabIndex?: number | undefined;
title?: string | undefined;
translate?: "yes" | "no" | undefined;
radioGroup?: string | undefined;
role?: string | undefined;
about?: string | undefined;
datatype?: string | undefined;
inlist?: any;
prefix?: string | undefined;
property?: string | undefined;
resource?: string | undefined;
typeof?: string | undefined;
vocab?: string | undefined;
autoCapitalize?: string | undefined;
autoCorrect?: string | undefined;
autoSave?: string | undefined;
color?: string | undefined;
itemProp?: string | undefined;
itemScope?: boolean | undefined;
itemType?: string | undefined;
itemID?: string | undefined;
itemRef?: string | undefined;
results?: number | undefined;
security?: string | undefined;
unselectable?: "on" | "off" | undefined;
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
is?: string | undefined;
'aria-activedescendant'?: string | undefined;
'aria-atomic'?: boolean | "true" | "false" | undefined;
'aria-autocomplete'?: "none" | "inline" | "list" | "both" | undefined;
'aria-busy'?: boolean | "true" | "false" | undefined;
'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
'aria-colcount'?: number | undefined;
'aria-colindex'?: number | undefined;
'aria-colspan'?: number | undefined;
'aria-controls'?: string | undefined;
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
'aria-describedby'?: string | undefined;
'aria-details'?: string | undefined;
'aria-disabled'?: boolean | "true" | "false" | undefined;
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
'aria-errormessage'?: string | undefined;
'aria-expanded'?: boolean | "true" | "false" | undefined;
'aria-flowto'?: string | undefined;
'aria-grabbed'?: boolean | "true" | "false" | undefined;
'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "listbox" | "tree" | "grid" | undefined;
'aria-hidden'?: boolean | "true" | "false" | undefined;
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
'aria-keyshortcuts'?: string | undefined;
'aria-label'?: string | undefined;
'aria-labelledby'?: string | undefined;
'aria-level'?: number | undefined;
'aria-live'?: "off" | "assertive" | "polite" | undefined;
'aria-modal'?: boolean | "true" | "false" | undefined;
'aria-multiline'?: boolean | "true" | "false" | undefined;
'aria-multiselectable'?: boolean | "true" | "false" | undefined;
'aria-orientation'?: "horizontal" | "vertical" | undefined;
'aria-owns'?: string | undefined;
'aria-placeholder'?: string | undefined;
'aria-posinset'?: number | undefined;
'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
'aria-readonly'?: boolean | "true" | "false" | undefined;
'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
'aria-required'?: boolean | "true" | "false" | undefined;
'aria-roledescription'?: string | undefined;
'aria-rowcount'?: number | undefined;
'aria-rowindex'?: number | undefined;
'aria-rowspan'?: number | undefined;
'aria-selected'?: boolean | "true" | "false" | undefined;
'aria-setsize'?: number | undefined;
'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
'aria-valuemax'?: number | undefined;
'aria-valuemin'?: number | undefined;
'aria-valuenow'?: number | undefined;
'aria-valuetext'?: string | undefined;
dangerouslySetInnerHTML?: {
__html: string;
} | undefined;
onCopy?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCopyCapture?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCut?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCutCapture?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onPaste?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onPasteCapture?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCompositionEnd?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionEndCapture?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionStart?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionStartCapture?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionUpdate?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionUpdateCapture?: ((event: React.CompositionEvent<any>) => void) | undefined;
onFocus?: ((event: React.FocusEvent<any>) => void) | undefined;
onFocusCapture?: ((event: React.FocusEvent<any>) => void) | undefined;
onBlur?: ((event: React.FocusEvent<any>) => void) | undefined;
onBlurCapture?: ((event: React.FocusEvent<any>) => void) | undefined;
onChange?: ((event: React.FormEvent<any>) => void) | undefined;
onChangeCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onBeforeInput?: ((event: React.FormEvent<any>) => void) | undefined;
onBeforeInputCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onInput?: ((event: React.FormEvent<any>) => void) | undefined;
onInputCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onReset?: ((event: React.FormEvent<any>) => void) | undefined;
onResetCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onSubmit?: ((event: React.FormEvent<any>) => void) | undefined;
onSubmitCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onInvalid?: ((event: React.FormEvent<any>) => void) | undefined;
onInvalidCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onLoad?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onError?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onErrorCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onKeyDown?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyDownCapture?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyPress?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyPressCapture?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyUp?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyUpCapture?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onAbort?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onAbortCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlay?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlayCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlayThrough?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlayThroughCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onDurationChange?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onDurationChangeCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEmptied?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEmptiedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEncrypted?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEncryptedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEnded?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEndedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedData?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedDataCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedMetadata?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedMetadataCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadStart?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadStartCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPause?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPauseCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlay?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlayCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlaying?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlayingCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onProgress?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onProgressCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onRateChange?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onRateChangeCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeeked?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeekedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeeking?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeekingCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onStalled?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onStalledCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSuspend?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSuspendCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onTimeUpdate?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onTimeUpdateCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onVolumeChange?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onVolumeChangeCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onWaiting?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onWaitingCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onAuxClick?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onAuxClickCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onClick?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onClickCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onContextMenu?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onContextMenuCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onDoubleClick?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onDoubleClickCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onDrag?: ((event: React.DragEvent<any>) => void) | undefined;
onDragCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEnd?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEndCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEnter?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEnterCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragExit?: ((event: React.DragEvent<any>) => void) | undefined;
onDragExitCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragLeave?: ((event: React.DragEvent<any>) => void) | undefined;
onDragLeaveCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragOver?: ((event: React.DragEvent<any>) => void) | undefined;
onDragOverCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragStart?: ((event: React.DragEvent<any>) => void) | undefined;
onDragStartCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDrop?: ((event: React.DragEvent<any>) => void) | undefined;
onDropCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onMouseDown?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseDownCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseEnter?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseLeave?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseMove?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseMoveCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOut?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOutCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOver?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOverCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseUp?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseUpCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onSelect?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSelectCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onTouchCancel?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchCancelCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchEnd?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchEndCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchMove?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchMoveCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchStart?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchStartCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onPointerDown?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerDownCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerMove?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerMoveCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerUp?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerUpCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerCancel?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerCancelCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerEnter?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerEnterCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerLeave?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerLeaveCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOver?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOverCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOut?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOutCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onGotPointerCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onGotPointerCaptureCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onLostPointerCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onLostPointerCaptureCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onScroll?: ((event: React.UIEvent<any, UIEvent>) => void) | undefined;
onScrollCapture?: ((event: React.UIEvent<any, UIEvent>) => void) | undefined;
onWheel?: ((event: React.WheelEvent<any>) => void) | undefined;
onWheelCapture?: ((event: React.WheelEvent<any>) => void) | undefined;
onAnimationStart?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationStartCapture?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationEnd?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationEndCapture?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationIteration?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationIterationCapture?: ((event: React.AnimationEvent<any>) => void) | undefined;
onTransitionEnd?: ((event: React.TransitionEvent<any>) => void) | undefined;
onTransitionEndCapture?: ((event: React.TransitionEvent<any>) => void) | undefined;
}, any, any>>) & {
displayName: string;
};
export default ErrorMessage;
import React, { InputHTMLAttributes, ReactChildren } from 'react';
declare type PropType = {
name: string;
component?: React.ComponentClass<any> | string;
component?: any;
children?: ReactChildren;
} & InputHTMLAttributes<any>;
declare const Field: ((props: PropType) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>) & {
declare const Field: ((props: PropType) => React.CElement<{
accept?: string | undefined;
alt?: string | undefined;
autoComplete?: string | undefined;
autoFocus?: boolean | undefined;
capture?: string | boolean | undefined;
checked?: boolean | undefined;
crossOrigin?: string | undefined;
disabled?: boolean | undefined;
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
form?: string | undefined;
formAction?: string | undefined;
formEncType?: string | undefined;
formMethod?: string | undefined;
formNoValidate?: boolean | undefined;
formTarget?: string | undefined;
height?: string | number | undefined;
list?: string | undefined;
max?: string | number | undefined;
maxLength?: number | undefined;
min?: string | number | undefined;
minLength?: number | undefined;
multiple?: boolean | undefined;
pattern?: string | undefined;
placeholder?: string | undefined;
readOnly?: boolean | undefined;
required?: boolean | undefined;
size?: number | undefined;
src?: string | undefined;
step?: string | number | undefined;
type?: string | undefined;
value: any;
width?: string | number | undefined;
onChange: any;
defaultChecked?: boolean | undefined;
defaultValue?: string | number | readonly string[] | undefined;
suppressContentEditableWarning?: boolean | undefined;
suppressHydrationWarning?: boolean | undefined;
accessKey?: string | undefined;
className?: string | undefined;
contentEditable?: boolean | "true" | "false" | "inherit" | undefined;
contextMenu?: string | undefined;
dir?: string | undefined;
draggable?: boolean | "true" | "false" | undefined;
hidden?: boolean | undefined;
id?: string | undefined;
lang?: string | undefined;
slot?: string | undefined;
spellCheck?: boolean | "true" | "false" | undefined;
style: {
display: string;
} | React.CSSProperties;
tabIndex?: number | undefined;
title?: string | undefined;
translate?: "yes" | "no" | undefined;
radioGroup?: string | undefined;
role?: string | undefined;
about?: string | undefined;
datatype?: string | undefined;
inlist?: any;
prefix?: string | undefined;
property?: string | undefined;
resource?: string | undefined;
typeof?: string | undefined;
vocab?: string | undefined;
autoCapitalize?: string | undefined;
autoCorrect?: string | undefined;
autoSave?: string | undefined;
color?: string | undefined;
itemProp?: string | undefined;
itemScope?: boolean | undefined;
itemType?: string | undefined;
itemID?: string | undefined;
itemRef?: string | undefined;
results?: number | undefined;
security?: string | undefined;
unselectable?: "on" | "off" | undefined;
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
is?: string | undefined;
'aria-activedescendant'?: string | undefined;
'aria-atomic'?: boolean | "true" | "false" | undefined;
'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
'aria-busy'?: boolean | "true" | "false" | undefined;
'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
'aria-colcount'?: number | undefined;
'aria-colindex'?: number | undefined;
'aria-colspan'?: number | undefined;
'aria-controls'?: string | undefined;
'aria-current'?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
'aria-describedby'?: string | undefined;
'aria-details'?: string | undefined;
'aria-disabled'?: boolean | "true" | "false" | undefined;
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
'aria-errormessage'?: string | undefined;
'aria-expanded'?: boolean | "true" | "false" | undefined;
'aria-flowto'?: string | undefined;
'aria-grabbed'?: boolean | "true" | "false" | undefined;
'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "listbox" | "tree" | "grid" | undefined;
'aria-hidden'?: boolean | "true" | "false" | undefined;
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
'aria-keyshortcuts'?: string | undefined;
'aria-label'?: string | undefined;
'aria-labelledby'?: string | undefined;
'aria-level'?: number | undefined;
'aria-live'?: "off" | "assertive" | "polite" | undefined;
'aria-modal'?: boolean | "true" | "false" | undefined;
'aria-multiline'?: boolean | "true" | "false" | undefined;
'aria-multiselectable'?: boolean | "true" | "false" | undefined;
'aria-orientation'?: "horizontal" | "vertical" | undefined;
'aria-owns'?: string | undefined;
'aria-placeholder'?: string | undefined;
'aria-posinset'?: number | undefined;
'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
'aria-readonly'?: boolean | "true" | "false" | undefined;
'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
'aria-required'?: boolean | "true" | "false" | undefined;
'aria-roledescription'?: string | undefined;
'aria-rowcount'?: number | undefined;
'aria-rowindex'?: number | undefined;
'aria-rowspan'?: number | undefined;
'aria-selected'?: boolean | "true" | "false" | undefined;
'aria-setsize'?: number | undefined;
'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
'aria-valuemax'?: number | undefined;
'aria-valuemin'?: number | undefined;
'aria-valuenow'?: number | undefined;
'aria-valuetext'?: string | undefined;
dangerouslySetInnerHTML?: {
__html: string;
} | undefined;
onCopy?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCopyCapture?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCut?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCutCapture?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onPaste?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onPasteCapture?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCompositionEnd?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionEndCapture?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionStart?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionStartCapture?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionUpdate?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionUpdateCapture?: ((event: React.CompositionEvent<any>) => void) | undefined;
onFocus?: ((event: React.FocusEvent<any>) => void) | undefined;
onFocusCapture?: ((event: React.FocusEvent<any>) => void) | undefined;
onBlur: any;
onBlurCapture?: ((event: React.FocusEvent<any>) => void) | undefined;
onChangeCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onBeforeInput?: ((event: React.FormEvent<any>) => void) | undefined;
onBeforeInputCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onInput?: ((event: React.FormEvent<any>) => void) | undefined;
onInputCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onReset?: ((event: React.FormEvent<any>) => void) | undefined;
onResetCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onSubmit?: ((event: React.FormEvent<any>) => void) | undefined;
onSubmitCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onInvalid?: ((event: React.FormEvent<any>) => void) | undefined;
onInvalidCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onLoad?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onError?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onErrorCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onKeyDown?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyDownCapture?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyPress?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyPressCapture?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyUp?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyUpCapture?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onAbort?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onAbortCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlay?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlayCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlayThrough?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlayThroughCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onDurationChange?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onDurationChangeCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEmptied?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEmptiedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEncrypted?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEncryptedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEnded?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEndedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedData?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedDataCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedMetadata?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedMetadataCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadStart?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadStartCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPause?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPauseCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlay?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlayCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlaying?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlayingCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onProgress?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onProgressCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onRateChange?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onRateChangeCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeeked?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeekedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeeking?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeekingCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onStalled?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onStalledCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSuspend?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSuspendCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onTimeUpdate?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onTimeUpdateCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onVolumeChange?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onVolumeChangeCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onWaiting?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onWaitingCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onAuxClick?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onAuxClickCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onClick?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onClickCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onContextMenu?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onContextMenuCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onDoubleClick?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onDoubleClickCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onDrag?: ((event: React.DragEvent<any>) => void) | undefined;
onDragCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEnd?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEndCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEnter?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEnterCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragExit?: ((event: React.DragEvent<any>) => void) | undefined;
onDragExitCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragLeave?: ((event: React.DragEvent<any>) => void) | undefined;
onDragLeaveCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragOver?: ((event: React.DragEvent<any>) => void) | undefined;
onDragOverCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragStart?: ((event: React.DragEvent<any>) => void) | undefined;
onDragStartCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDrop?: ((event: React.DragEvent<any>) => void) | undefined;
onDropCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onMouseDown?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseDownCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseEnter?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseLeave?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseMove?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseMoveCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOut?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOutCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOver?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOverCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseUp?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseUpCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onSelect?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSelectCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onTouchCancel?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchCancelCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchEnd?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchEndCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchMove?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchMoveCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchStart?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchStartCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onPointerDown?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerDownCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerMove?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerMoveCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerUp?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerUpCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerCancel?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerCancelCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerEnter?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerEnterCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerLeave?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerLeaveCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOver?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOverCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOut?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOutCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onGotPointerCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onGotPointerCaptureCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onLostPointerCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onLostPointerCaptureCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onScroll?: ((event: React.UIEvent<any, UIEvent>) => void) | undefined;
onScrollCapture?: ((event: React.UIEvent<any, UIEvent>) => void) | undefined;
onWheel?: ((event: React.WheelEvent<any>) => void) | undefined;
onWheelCapture?: ((event: React.WheelEvent<any>) => void) | undefined;
onAnimationStart?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationStartCapture?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationEnd?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationEndCapture?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationIteration?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationIterationCapture?: ((event: React.AnimationEvent<any>) => void) | undefined;
onTransitionEnd?: ((event: React.TransitionEvent<any>) => void) | undefined;
onTransitionEndCapture?: ((event: React.TransitionEvent<any>) => void) | undefined;
name: string;
}, React.Component<{
accept?: string | undefined;
alt?: string | undefined;
autoComplete?: string | undefined;
autoFocus?: boolean | undefined;
capture?: string | boolean | undefined;
checked?: boolean | undefined;
crossOrigin?: string | undefined;
disabled?: boolean | undefined;
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
form?: string | undefined;
formAction?: string | undefined;
formEncType?: string | undefined;
formMethod?: string | undefined;
formNoValidate?: boolean | undefined;
formTarget?: string | undefined;
height?: string | number | undefined;
list?: string | undefined;
max?: string | number | undefined;
maxLength?: number | undefined;
min?: string | number | undefined;
minLength?: number | undefined;
multiple?: boolean | undefined;
pattern?: string | undefined;
placeholder?: string | undefined;
readOnly?: boolean | undefined;
required?: boolean | undefined;
size?: number | undefined;
src?: string | undefined;
step?: string | number | undefined;
type?: string | undefined;
value: any;
width?: string | number | undefined;
onChange: any;
defaultChecked?: boolean | undefined;
defaultValue?: string | number | readonly string[] | undefined;
suppressContentEditableWarning?: boolean | undefined;
suppressHydrationWarning?: boolean | undefined;
accessKey?: string | undefined;
className?: string | undefined;
contentEditable?: boolean | "true" | "false" | "inherit" | undefined;
contextMenu?: string | undefined;
dir?: string | undefined;
draggable?: boolean | "true" | "false" | undefined;
hidden?: boolean | undefined;
id?: string | undefined;
lang?: string | undefined;
slot?: string | undefined;
spellCheck?: boolean | "true" | "false" | undefined;
style: {
display: string;
} | React.CSSProperties;
tabIndex?: number | undefined;
title?: string | undefined;
translate?: "yes" | "no" | undefined;
radioGroup?: string | undefined;
role?: string | undefined;
about?: string | undefined;
datatype?: string | undefined;
inlist?: any;
prefix?: string | undefined;
property?: string | undefined;
resource?: string | undefined;
typeof?: string | undefined;
vocab?: string | undefined;
autoCapitalize?: string | undefined;
autoCorrect?: string | undefined;
autoSave?: string | undefined;
color?: string | undefined;
itemProp?: string | undefined;
itemScope?: boolean | undefined;
itemType?: string | undefined;
itemID?: string | undefined;
itemRef?: string | undefined;
results?: number | undefined;
security?: string | undefined;
unselectable?: "on" | "off" | undefined;
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
is?: string | undefined;
'aria-activedescendant'?: string | undefined;
'aria-atomic'?: boolean | "true" | "false" | undefined;
'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
'aria-busy'?: boolean | "true" | "false" | undefined;
'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
'aria-colcount'?: number | undefined;
'aria-colindex'?: number | undefined;
'aria-colspan'?: number | undefined;
'aria-controls'?: string | undefined;
'aria-current'?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
'aria-describedby'?: string | undefined;
'aria-details'?: string | undefined;
'aria-disabled'?: boolean | "true" | "false" | undefined;
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
'aria-errormessage'?: string | undefined;
'aria-expanded'?: boolean | "true" | "false" | undefined;
'aria-flowto'?: string | undefined;
'aria-grabbed'?: boolean | "true" | "false" | undefined;
'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "listbox" | "tree" | "grid" | undefined;
'aria-hidden'?: boolean | "true" | "false" | undefined;
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
'aria-keyshortcuts'?: string | undefined;
'aria-label'?: string | undefined;
'aria-labelledby'?: string | undefined;
'aria-level'?: number | undefined;
'aria-live'?: "off" | "assertive" | "polite" | undefined;
'aria-modal'?: boolean | "true" | "false" | undefined;
'aria-multiline'?: boolean | "true" | "false" | undefined;
'aria-multiselectable'?: boolean | "true" | "false" | undefined;
'aria-orientation'?: "horizontal" | "vertical" | undefined;
'aria-owns'?: string | undefined;
'aria-placeholder'?: string | undefined;
'aria-posinset'?: number | undefined;
'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
'aria-readonly'?: boolean | "true" | "false" | undefined;
'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
'aria-required'?: boolean | "true" | "false" | undefined;
'aria-roledescription'?: string | undefined;
'aria-rowcount'?: number | undefined;
'aria-rowindex'?: number | undefined;
'aria-rowspan'?: number | undefined;
'aria-selected'?: boolean | "true" | "false" | undefined;
'aria-setsize'?: number | undefined;
'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
'aria-valuemax'?: number | undefined;
'aria-valuemin'?: number | undefined;
'aria-valuenow'?: number | undefined;
'aria-valuetext'?: string | undefined;
dangerouslySetInnerHTML?: {
__html: string;
} | undefined;
onCopy?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCopyCapture?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCut?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCutCapture?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onPaste?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onPasteCapture?: ((event: React.ClipboardEvent<any>) => void) | undefined;
onCompositionEnd?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionEndCapture?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionStart?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionStartCapture?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionUpdate?: ((event: React.CompositionEvent<any>) => void) | undefined;
onCompositionUpdateCapture?: ((event: React.CompositionEvent<any>) => void) | undefined;
onFocus?: ((event: React.FocusEvent<any>) => void) | undefined;
onFocusCapture?: ((event: React.FocusEvent<any>) => void) | undefined;
onBlur: any;
onBlurCapture?: ((event: React.FocusEvent<any>) => void) | undefined;
onChangeCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onBeforeInput?: ((event: React.FormEvent<any>) => void) | undefined;
onBeforeInputCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onInput?: ((event: React.FormEvent<any>) => void) | undefined;
onInputCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onReset?: ((event: React.FormEvent<any>) => void) | undefined;
onResetCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onSubmit?: ((event: React.FormEvent<any>) => void) | undefined;
onSubmitCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onInvalid?: ((event: React.FormEvent<any>) => void) | undefined;
onInvalidCapture?: ((event: React.FormEvent<any>) => void) | undefined;
onLoad?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onError?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onErrorCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onKeyDown?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyDownCapture?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyPress?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyPressCapture?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyUp?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onKeyUpCapture?: ((event: React.KeyboardEvent<any>) => void) | undefined;
onAbort?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onAbortCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlay?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlayCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlayThrough?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onCanPlayThroughCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onDurationChange?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onDurationChangeCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEmptied?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEmptiedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEncrypted?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEncryptedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEnded?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onEndedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedData?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedDataCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedMetadata?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadedMetadataCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadStart?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onLoadStartCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPause?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPauseCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlay?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlayCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlaying?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onPlayingCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onProgress?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onProgressCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onRateChange?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onRateChangeCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeeked?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeekedCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeeking?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSeekingCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onStalled?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onStalledCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSuspend?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSuspendCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onTimeUpdate?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onTimeUpdateCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onVolumeChange?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onVolumeChangeCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onWaiting?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onWaitingCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onAuxClick?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onAuxClickCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onClick?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onClickCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onContextMenu?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onContextMenuCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onDoubleClick?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onDoubleClickCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onDrag?: ((event: React.DragEvent<any>) => void) | undefined;
onDragCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEnd?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEndCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEnter?: ((event: React.DragEvent<any>) => void) | undefined;
onDragEnterCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragExit?: ((event: React.DragEvent<any>) => void) | undefined;
onDragExitCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragLeave?: ((event: React.DragEvent<any>) => void) | undefined;
onDragLeaveCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragOver?: ((event: React.DragEvent<any>) => void) | undefined;
onDragOverCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDragStart?: ((event: React.DragEvent<any>) => void) | undefined;
onDragStartCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onDrop?: ((event: React.DragEvent<any>) => void) | undefined;
onDropCapture?: ((event: React.DragEvent<any>) => void) | undefined;
onMouseDown?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseDownCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseEnter?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseLeave?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseMove?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseMoveCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOut?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOutCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOver?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseOverCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseUp?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onMouseUpCapture?: ((event: React.MouseEvent<any, MouseEvent>) => void) | undefined;
onSelect?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onSelectCapture?: ((event: React.SyntheticEvent<any, Event>) => void) | undefined;
onTouchCancel?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchCancelCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchEnd?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchEndCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchMove?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchMoveCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchStart?: ((event: React.TouchEvent<any>) => void) | undefined;
onTouchStartCapture?: ((event: React.TouchEvent<any>) => void) | undefined;
onPointerDown?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerDownCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerMove?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerMoveCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerUp?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerUpCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerCancel?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerCancelCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerEnter?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerEnterCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerLeave?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerLeaveCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOver?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOverCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOut?: ((event: React.PointerEvent<any>) => void) | undefined;
onPointerOutCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onGotPointerCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onGotPointerCaptureCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onLostPointerCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onLostPointerCaptureCapture?: ((event: React.PointerEvent<any>) => void) | undefined;
onScroll?: ((event: React.UIEvent<any, UIEvent>) => void) | undefined;
onScrollCapture?: ((event: React.UIEvent<any, UIEvent>) => void) | undefined;
onWheel?: ((event: React.WheelEvent<any>) => void) | undefined;
onWheelCapture?: ((event: React.WheelEvent<any>) => void) | undefined;
onAnimationStart?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationStartCapture?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationEnd?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationEndCapture?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationIteration?: ((event: React.AnimationEvent<any>) => void) | undefined;
onAnimationIterationCapture?: ((event: React.AnimationEvent<any>) => void) | undefined;
onTransitionEnd?: ((event: React.TransitionEvent<any>) => void) | undefined;
onTransitionEndCapture?: ((event: React.TransitionEvent<any>) => void) | undefined;
name: string;
}, any, any>>) & {
displayName: string;
};
export default Field;
import { ModelPropertiesDeclaration } from 'mobx-state-tree';
import { FormEvent } from 'react';
export declare function createFormModel<P extends ModelPropertiesDeclaration = {}>(modelName: string, properties: P, options: any): import("mobx-state-tree").IModelType<import("mobx-state-tree").ModelPropertiesDeclarationToProperties<P>, {
export declare function createFormModel<P extends ModelPropertiesDeclaration = {}>(modelName: string, properties: P, options?: {
validation: any;
}): import("mobx-state-tree").IModelType<import("mobx-state-tree").ModelPropertiesDeclarationToProperties<P>, {
submitting: import("mobx").IObservableValue<boolean>;

@@ -10,3 +12,5 @@ touched: any;

readonly isValid: boolean;
getFormData(): import("mobx-state-tree").ModelSnapshotType<import("mobx-state-tree").ModelPropertiesDeclarationToProperties<P>>;
} & {
onSubmit(passedCB: (formInstance: any) => any): void;
handleSubmit(e: FormEvent): void;

@@ -13,0 +17,0 @@ setAllTouched(): void;

102

dist/formst.cjs.development.js

@@ -106,54 +106,57 @@ 'use strict';

var _loop = function _loop(fieldName) {
var fieldValidation = options.validation[fieldName];
if (options) {
var _loop = function _loop(fieldName) {
var fieldValidation = options.validation[fieldName];
if (fieldValidation === 'valid') {
if (self[fieldName] && Array.isArray(self[fieldName])) {
// @ts-ignore
self[fieldName].forEach(function (instance) {
if (fieldValidation === 'valid') {
if (self[fieldName] && Array.isArray(self[fieldName])) {
// @ts-ignore
if (instance.errors && Object.keys(instance.errors).length > 0) if (!errors[fieldName]) {
// @ts-ignore
errors[fieldName] = JSON.stringify(instance.errors);
}
});
} else if (self[fieldName] && // @ts-ignore
self[fieldName].errors && // @ts-ignore
Object.keys(self[fieldName].errors).length > 0) {
// @ts-ignore
errors[fieldName] = JSON.stringify(self[fieldName].errors);
self[fieldName].forEach(function (instance) {
if ( // @ts-ignore
instance.errors && // @ts-ignore
Object.keys(instance.errors).length > 0) if (!errors[fieldName]) {
// @ts-ignore
errors[fieldName] = JSON.stringify(instance.errors);
}
});
} else if (self[fieldName] && // @ts-ignore
self[fieldName].errors && // @ts-ignore
Object.keys(self[fieldName].errors).length > 0) {
// @ts-ignore
errors[fieldName] = JSON.stringify(self[fieldName].errors);
}
return "continue";
}
return "continue";
}
if (typeof fieldValidation === 'string') {
fieldValidation = [fieldValidation];
}
if (typeof fieldValidation === 'string') {
fieldValidation = [fieldValidation];
}
var errorMessage = '';
var errorMessage = '';
if (typeof fieldValidation === 'function') {
errorMessage = fieldValidation(self[fieldName]);
} else if (Array.isArray(fieldValidation)) {
fieldValidation.forEach(function (validatorName) {
if (validators[validatorName]) {
var validation = validators[validatorName](self[fieldName]);
if (typeof fieldValidation === 'function') {
errorMessage = fieldValidation(self[fieldName]);
} else if (Array.isArray(fieldValidation)) {
fieldValidation.forEach(function (validatorName) {
if (validators[validatorName]) {
var validation = validators[validatorName](self[fieldName]);
if (!validation.valid && !errorMessage) {
errorMessage = validation.message;
if (!validation.valid && !errorMessage) {
errorMessage = validation.message;
}
}
}
});
}
});
}
if (errorMessage) {
errors[fieldName] = errorMessage;
}
};
if (errorMessage) {
errors[fieldName] = errorMessage;
}
};
for (var fieldName in options.validation) {
var _ret = _loop(fieldName);
for (var fieldName in options.validation) {
var _ret = _loop(fieldName);
if (_ret === "continue") continue;
if (_ret === "continue") continue;
}
}

@@ -168,7 +171,18 @@

return false;
},
getFormData: function getFormData() {
// @ts-ignore
return mobxStateTree.getSnapshot(self);
}
};
}).actions(function (self) {
var cb = function cb(formInstance) {
JSON.stringify(formInstance.getFormData());
};
return {
onSubmit: function onSubmit(passedCB) {
cb = passedCB;
},
handleSubmit: function handleSubmit(e) {

@@ -180,3 +194,3 @@ e.preventDefault();

self.onSubmit();
cb(self);
} else {

@@ -188,3 +202,3 @@ // @ts-ignore

setAllTouched: function setAllTouched() {
for (var fieldName in options.validation) {
if (options) for (var fieldName in options.validation) {
if (options.validation[fieldName] === 'valid') {

@@ -191,0 +205,0 @@ if (self[fieldName] && Array.isArray(self[fieldName])) {

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("mobx"),t=require("mobx-state-tree"),n=require("react"),o=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,a=require("mobx-react-lite");function i(){return(i=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function u(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r.indexOf(t=a[n])>=0||(o[t]=e[t]);return o}var s=function(e){return null==e},l=function(e){return!!e},c=function(e){return!(!e||"string"!=typeof e||!/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/.test(e))},f={};function d(){return i({},{required:function(e){return{valid:!s(e)&&""!==e&&l(e),message:"This is a required field"}},number:function(e){return{valid:isNaN(e),message:"Please enter a valid number"}},email:function(e){return{valid:c(e),message:"Please enter a valid email id"}}},f)}var x=o.createContext(null),m=a.observer((function(e){var r=e.name,t=e.component,a=e.children,s=u(e,["name","component","children"]),l=n.useContext(x);if(!l)throw new Error("Form instance prop is required in MstForm");return o.createElement(t||"input",i({name:r,value:l[r],onChange:l.handleChange,onBlur:l.handleBlur,style:{display:"block"}},s),a)})),v=a.observer((function(e){var r=e.name,t=u(e,["component","name"]),a=n.useContext(x);if(!a)throw new Error("formInstance prop is required in Formst");var s=e.component?e.component:"div";return"lead"===r&&console.log(r,a.touched[e.name]),o.createElement(s,i({style:{display:"block"}},t),[o.createElement("span",null,a.errors[e.name]&&a.touched[e.name]&&a.errors[e.name])])}));Object.defineProperty(exports,"observer",{enumerable:!0,get:function(){return a.observer}}),exports.ErrorMessage=v,exports.Field=m,exports.Formst=function(e){return o.createElement(x.Provider,{value:e.formInstance},e.children)},exports.addMiddleware=function(e,r,n){return t.addMiddleware(e,(function(t,n,o){return t.context!==e?n(t):r(t,n,o)}),n)},exports.createFormModel=function(e,n,o){return t.types.model(e,n).volatile((function(){return{submitting:r.observable.box(!1),touched:r.observable.object({})}})).views((function(e){return{get isSubmitting(){return e.submitting.get()},get errors(){var r={},t=d(),n=function(n){var a=o.validation[n];if("valid"===a)return e[n]&&Array.isArray(e[n])?e[n].forEach((function(e){e.errors&&Object.keys(e.errors).length>0&&(r[n]||(r[n]=JSON.stringify(e.errors)))})):e[n]&&e[n].errors&&Object.keys(e[n].errors).length>0&&(r[n]=JSON.stringify(e[n].errors)),"continue";"string"==typeof a&&(a=[a]);var i="";"function"==typeof a?i=a(e[n]):Array.isArray(a)&&a.forEach((function(r){if(t[r]){var o=t[r](e[n]);o.valid||i||(i=o.message)}})),i&&(r[n]=i)};for(var a in o.validation)n(a);return r},get isValid(){return 0===Object.keys(e.errors).length}}})).actions((function(e){return{handleSubmit:function(r){r.preventDefault(),0===Object.keys(e.errors).length?(e.submitting.set(!0),e.onSubmit()):e.setAllTouched()},setAllTouched:function(){for(var r in o.validation)"valid"===o.validation[r]?e[r]&&Array.isArray(e[r])?e[r].forEach((function(e){e.setAllTouched()})):e[r]&&e[r].setAllTouched():e.touched[r]=!0},setSubmitting:function(r){e.submitting.set(r)},handleChange:function(r){e.setValue(r.target.name,r.target.value)},handleBlur:function(r){e.touched[r.target.name]=!0},setValue:function(r,t){e[r]=t}}}))},exports.defineValidators=function(e){f=e},exports.getValidators=d;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("mobx"),t=require("mobx-state-tree"),n=require("react"),o=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,a=require("mobx-react-lite");function i(){return(i=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function u(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r.indexOf(t=a[n])>=0||(o[t]=e[t]);return o}var s=function(e){return null==e},l=function(e){return!!e},c=function(e){return!(!e||"string"!=typeof e||!/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/.test(e))},f={};function d(){return i({},{required:function(e){return{valid:!s(e)&&""!==e&&l(e),message:"This is a required field"}},number:function(e){return{valid:isNaN(e),message:"Please enter a valid number"}},email:function(e){return{valid:c(e),message:"Please enter a valid email id"}}},f)}var x=o.createContext(null),m=a.observer((function(e){var r=e.name,t=e.component,a=e.children,s=u(e,["name","component","children"]),l=n.useContext(x);if(!l)throw new Error("Form instance prop is required in MstForm");return o.createElement(t||"input",i({name:r,value:l[r],onChange:l.handleChange,onBlur:l.handleBlur,style:{display:"block"}},s),a)})),v=a.observer((function(e){var r=e.name,t=u(e,["component","name"]),a=n.useContext(x);if(!a)throw new Error("formInstance prop is required in Formst");var s=e.component?e.component:"div";return"lead"===r&&console.log(r,a.touched[e.name]),o.createElement(s,i({style:{display:"block"}},t),[o.createElement("span",null,a.errors[e.name]&&a.touched[e.name]&&a.errors[e.name])])}));Object.defineProperty(exports,"observer",{enumerable:!0,get:function(){return a.observer}}),exports.ErrorMessage=v,exports.Field=m,exports.Formst=function(e){return o.createElement(x.Provider,{value:e.formInstance},e.children)},exports.addMiddleware=function(e,r,n){return t.addMiddleware(e,(function(t,n,o){return t.context!==e?n(t):r(t,n,o)}),n)},exports.createFormModel=function(e,n,o){return t.types.model(e,n).volatile((function(){return{submitting:r.observable.box(!1),touched:r.observable.object({})}})).views((function(e){return{get isSubmitting(){return e.submitting.get()},get errors(){var r={},t=d();if(o){var n=function(n){var a=o.validation[n];if("valid"===a)return e[n]&&Array.isArray(e[n])?e[n].forEach((function(e){e.errors&&Object.keys(e.errors).length>0&&(r[n]||(r[n]=JSON.stringify(e.errors)))})):e[n]&&e[n].errors&&Object.keys(e[n].errors).length>0&&(r[n]=JSON.stringify(e[n].errors)),"continue";"string"==typeof a&&(a=[a]);var i="";"function"==typeof a?i=a(e[n]):Array.isArray(a)&&a.forEach((function(r){if(t[r]){var o=t[r](e[n]);o.valid||i||(i=o.message)}})),i&&(r[n]=i)};for(var a in o.validation)n(a)}return r},get isValid(){return 0===Object.keys(e.errors).length},getFormData:function(){return t.getSnapshot(e)}}})).actions((function(e){var r=function(e){JSON.stringify(e.getFormData())};return{onSubmit:function(e){r=e},handleSubmit:function(t){t.preventDefault(),0===Object.keys(e.errors).length?(e.submitting.set(!0),r(e)):e.setAllTouched()},setAllTouched:function(){if(o)for(var r in o.validation)"valid"===o.validation[r]?e[r]&&Array.isArray(e[r])?e[r].forEach((function(e){e.setAllTouched()})):e[r]&&e[r].setAllTouched():e.touched[r]=!0},setSubmitting:function(r){e.submitting.set(r)},handleChange:function(r){e.setValue(r.target.name,r.target.value)},handleBlur:function(r){e.touched[r.target.name]=!0},setValue:function(r,t){e[r]=t}}}))},exports.defineValidators=function(e){f=e},exports.getValidators=d;
//# sourceMappingURL=formst.cjs.production.min.js.map
import { observable } from 'mobx';
import { types, addMiddleware as addMiddleware$1 } from 'mobx-state-tree';
import { types, getSnapshot, addMiddleware as addMiddleware$1 } from 'mobx-state-tree';
import React, { useContext } from 'react';

@@ -100,54 +100,57 @@ import { observer } from 'mobx-react-lite';

var _loop = function _loop(fieldName) {
var fieldValidation = options.validation[fieldName];
if (options) {
var _loop = function _loop(fieldName) {
var fieldValidation = options.validation[fieldName];
if (fieldValidation === 'valid') {
if (self[fieldName] && Array.isArray(self[fieldName])) {
// @ts-ignore
self[fieldName].forEach(function (instance) {
if (fieldValidation === 'valid') {
if (self[fieldName] && Array.isArray(self[fieldName])) {
// @ts-ignore
if (instance.errors && Object.keys(instance.errors).length > 0) if (!errors[fieldName]) {
// @ts-ignore
errors[fieldName] = JSON.stringify(instance.errors);
}
});
} else if (self[fieldName] && // @ts-ignore
self[fieldName].errors && // @ts-ignore
Object.keys(self[fieldName].errors).length > 0) {
// @ts-ignore
errors[fieldName] = JSON.stringify(self[fieldName].errors);
self[fieldName].forEach(function (instance) {
if ( // @ts-ignore
instance.errors && // @ts-ignore
Object.keys(instance.errors).length > 0) if (!errors[fieldName]) {
// @ts-ignore
errors[fieldName] = JSON.stringify(instance.errors);
}
});
} else if (self[fieldName] && // @ts-ignore
self[fieldName].errors && // @ts-ignore
Object.keys(self[fieldName].errors).length > 0) {
// @ts-ignore
errors[fieldName] = JSON.stringify(self[fieldName].errors);
}
return "continue";
}
return "continue";
}
if (typeof fieldValidation === 'string') {
fieldValidation = [fieldValidation];
}
if (typeof fieldValidation === 'string') {
fieldValidation = [fieldValidation];
}
var errorMessage = '';
var errorMessage = '';
if (typeof fieldValidation === 'function') {
errorMessage = fieldValidation(self[fieldName]);
} else if (Array.isArray(fieldValidation)) {
fieldValidation.forEach(function (validatorName) {
if (validators[validatorName]) {
var validation = validators[validatorName](self[fieldName]);
if (typeof fieldValidation === 'function') {
errorMessage = fieldValidation(self[fieldName]);
} else if (Array.isArray(fieldValidation)) {
fieldValidation.forEach(function (validatorName) {
if (validators[validatorName]) {
var validation = validators[validatorName](self[fieldName]);
if (!validation.valid && !errorMessage) {
errorMessage = validation.message;
if (!validation.valid && !errorMessage) {
errorMessage = validation.message;
}
}
}
});
}
});
}
if (errorMessage) {
errors[fieldName] = errorMessage;
}
};
if (errorMessage) {
errors[fieldName] = errorMessage;
}
};
for (var fieldName in options.validation) {
var _ret = _loop(fieldName);
for (var fieldName in options.validation) {
var _ret = _loop(fieldName);
if (_ret === "continue") continue;
if (_ret === "continue") continue;
}
}

@@ -162,7 +165,18 @@

return false;
},
getFormData: function getFormData() {
// @ts-ignore
return getSnapshot(self);
}
};
}).actions(function (self) {
var cb = function cb(formInstance) {
JSON.stringify(formInstance.getFormData());
};
return {
onSubmit: function onSubmit(passedCB) {
cb = passedCB;
},
handleSubmit: function handleSubmit(e) {

@@ -174,3 +188,3 @@ e.preventDefault();

self.onSubmit();
cb(self);
} else {

@@ -182,3 +196,3 @@ // @ts-ignore

setAllTouched: function setAllTouched() {
for (var fieldName in options.validation) {
if (options) for (var fieldName in options.validation) {
if (options.validation[fieldName] === 'valid') {

@@ -185,0 +199,0 @@ if (self[fieldName] && Array.isArray(self[fieldName])) {

{
"version": "1.0.6",
"version": "1.0.7",
"license": "MIT",

@@ -4,0 +4,0 @@ "main": "dist/index.js",

import { observable } from 'mobx';
import {
getSnapshot,
ModelPropertiesDeclaration,

@@ -13,3 +14,5 @@ TypeOfValue,

properties: P,
options: any
options?: {
validation: any;
}
) {

@@ -31,50 +34,59 @@ return types

for (const fieldName in options.validation) {
let fieldValidation = options.validation[fieldName];
if (fieldValidation === 'valid') {
if (self[fieldName] && Array.isArray(self[fieldName])) {
// @ts-ignore
self[fieldName].forEach((instance: TypeOfValue<typeof self>) => {
if (options) {
for (const fieldName in options.validation) {
let fieldValidation = options.validation[fieldName];
if (fieldValidation === 'valid') {
if (self[fieldName] && Array.isArray(self[fieldName])) {
// @ts-ignore
if (instance.errors && Object.keys(instance.errors).length > 0)
if (!errors[fieldName]) {
// @ts-ignore
errors[fieldName] = JSON.stringify(instance.errors);
self[fieldName].forEach(
(instance: TypeOfValue<typeof self>) => {
if (
// @ts-ignore
instance.errors &&
// @ts-ignore
Object.keys(instance.errors).length > 0
)
if (!errors[fieldName]) {
// @ts-ignore
errors[fieldName] = JSON.stringify(instance.errors);
}
}
});
} else if (
self[fieldName] &&
// @ts-ignore
self[fieldName].errors &&
// @ts-ignore
Object.keys(self[fieldName].errors).length > 0
) {
// @ts-ignore
errors[fieldName] = JSON.stringify(self[fieldName].errors);
);
} else if (
self[fieldName] &&
// @ts-ignore
self[fieldName].errors &&
// @ts-ignore
Object.keys(self[fieldName].errors).length > 0
) {
// @ts-ignore
errors[fieldName] = JSON.stringify(self[fieldName].errors);
}
continue;
}
continue;
}
if (typeof fieldValidation === 'string') {
fieldValidation = [fieldValidation];
}
if (typeof fieldValidation === 'string') {
fieldValidation = [fieldValidation];
}
let errorMessage: string = '';
if (typeof fieldValidation === 'function') {
errorMessage = fieldValidation(self[fieldName]);
} else if (Array.isArray(fieldValidation)) {
fieldValidation.forEach((validatorName: string) => {
if (validators[validatorName]) {
const validation = validators[validatorName](self[fieldName]);
if (!validation.valid && !errorMessage) {
errorMessage = validation.message;
let errorMessage: string = '';
if (typeof fieldValidation === 'function') {
errorMessage = fieldValidation(self[fieldName]);
} else if (Array.isArray(fieldValidation)) {
fieldValidation.forEach((validatorName: string) => {
if (validators[validatorName]) {
const validation = validators[validatorName](self[fieldName]);
if (!validation.valid && !errorMessage) {
errorMessage = validation.message;
}
}
}
});
}
});
}
if (errorMessage) {
errors[fieldName] = errorMessage;
if (errorMessage) {
errors[fieldName] = errorMessage;
}
}
}
return errors;

@@ -88,52 +100,68 @@ },

},
getFormData() {
// @ts-ignore
return getSnapshot(self);
},
}))
.actions(self => ({
handleSubmit(e: FormEvent) {
e.preventDefault();
if (Object.keys(self.errors).length === 0) {
self.submitting.set(true);
// @ts-ignore
self.onSubmit();
} else {
// @ts-ignore
self.setAllTouched();
}
},
.actions((self: any) => {
let cb: (formInstance: any) => any = formInstance => {
JSON.stringify(formInstance.getFormData());
};
setAllTouched() {
for (const fieldName in options.validation) {
if (options.validation[fieldName] === 'valid') {
if (self[fieldName] && Array.isArray(self[fieldName])) {
// @ts-ignore
self[fieldName].forEach((instance: any) => {
instance.setAllTouched();
});
} else if (self[fieldName]) {
// @ts-ignore
self[fieldName].setAllTouched();
}
return {
onSubmit(passedCB: (formInstance: any) => any) {
cb = passedCB;
},
handleSubmit(e: FormEvent) {
e.preventDefault();
if (Object.keys(self.errors).length === 0) {
self.submitting.set(true);
// @ts-ignore
cb(self);
} else {
self.touched[fieldName] = true;
// @ts-ignore
self.setAllTouched();
}
}
},
},
setSubmitting(submitting: boolean) {
self.submitting.set(submitting);
},
setAllTouched() {
if (options)
for (const fieldName in options.validation) {
if (options.validation[fieldName] === 'valid') {
if (self[fieldName] && Array.isArray(self[fieldName])) {
// @ts-ignore
self[fieldName].forEach((instance: any) => {
instance.setAllTouched();
});
} else if (self[fieldName]) {
// @ts-ignore
self[fieldName].setAllTouched();
}
} else {
self.touched[fieldName] = true;
}
}
},
handleChange(e: React.ChangeEvent<any>) {
// @ts-ignore
self.setValue(e.target.name, e.target.value);
},
setSubmitting(submitting: boolean) {
self.submitting.set(submitting);
},
handleBlur(e: React.FocusEvent<HTMLInputElement>) {
self.touched[e.target.name] = true;
},
handleChange(e: React.ChangeEvent<any>) {
// @ts-ignore
self.setValue(e.target.name, e.target.value);
},
setValue(name: string, value: any) {
// @ts-ignore
self[name] = value;
},
}));
handleBlur(e: React.FocusEvent<HTMLInputElement>) {
self.touched[e.target.name] = true;
},
setValue(name: string, value: any) {
// @ts-ignore
self[name] = value;
},
};
});
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc