import React, { ReactNode } from 'react'; import { FormikConfig, FormikHelpers } from 'formik'; import { SelectOption, SelectProps as UiKitSelectProps } from '../Select/Select'; import { MultiSelectOption, MultiSelectProps as UiKitMultiSelectProps } from '../MultiSelect/MultiSelect'; import { IconName } from '@blueprintjs/core'; import { CheckboxProps as UiKitCheckboxProps } from '../Checkbox/Checkbox'; import { ToggleProps as UiKitToggleProps } from '../Toggle/Toggle'; import { TagInputProps as UiKitTagInputProps } from '../TagInput/TagInput'; import { RadioButtonGroupProps } from '../RadioButton/RadioButtonGroup'; import { IFormGroupProps, IInputGroupProps, Intent, ITagInputProps, ITextAreaProps, IFileInputProps, HTMLInputProps } from '@blueprintjs/core'; import { ColorPickerProps } from '../ColorPicker/ColorPicker'; import { InputWithIdentifierProps } from '../InputWithIdentifier/InputWithIdentifier'; import { MultiTypeInputProps, MultiSelectTypeInputProps, MultiTextInputProps, MultiSelectWithSubmenuTypeInputProps, SelectWithSubmenuTypeInputProps, SelectWithSubmenuTypeInputPropsV2 } from '../MultiTypeInput/MultiTypeInput'; import { CategorizedSelectProps, CategorizedSelectOption } from '../CategorizedSelected/CategorizedSelect'; import { SelectWithSubviewProps } from '../SelectWithSubview/SelectWithSubview'; import { MultiSelectWithSubviewProps } from '../MultiSelectWithSubView/MultiSelectWithSubView'; import { ExpressionInputProps as ExpressionInputLocalProps } from '../ExpressionInput/ExpressionInput'; import { DropDownProps } from '../DropDown/DropDown'; import { FormikContextProps, FormikExtended } from './utils'; import { SelectWithSubmenuOption } from '../SelectWithSubmenu/SelectWithSubmenu'; import { SubmenuSelectOption } from '../SelectWithSubmenu/SelectWithSubmenuV2'; import { SelectWithBiLevelOption } from 'components/Select/BiLevelSelect'; export declare const getDefaultAutoCompleteValue: () => string; export interface TagInputProps extends Omit { name: string; items: T[]; labelFor: UiKitTagInputProps['labelFor']; itemFromNewTag: UiKitTagInputProps['itemFromNewTag']; tagInputProps: Omit, 'labelFor' | 'keyOf' | 'itemFromNewTag' | 'items' | 'onChange'>; onChange?: UiKitTagInputProps['onChange']; } export interface KVTagInputProps extends Omit { name: string; tagsProps?: Partial; isArray?: boolean; onChange?: ITagInputProps['onChange']; } export interface MultiInputProps extends Omit { name: string; tagsProps?: Partial; } export interface CustomRenderProps extends Omit { name: string; render: (formik: FormikExtended, intent: Intent, disabled?: boolean, inline?: boolean) => React.ReactNode; } export interface FileInputProps extends Omit { name: string; fileInput?: Omit; inputProps?: Omit; placeholder?: string; buttonText?: string; onChange?: React.FormEventHandler; multiple?: boolean; shouldSetFieldValue?: boolean; } export interface RadioGroupProps extends Omit { name: string; items: RadioButtonGroupProps['options']; radioGroup?: Omit; onChange?: RadioButtonGroupProps['onChange']; } export interface CheckboxProps extends UiKitCheckboxProps, Omit { name: string; label: string; } export interface ToggleProps extends UiKitToggleProps, Omit { name: string; label: string; } export interface MultiSelectProps extends Omit { name: string; items: MultiSelectOption[]; tagInputProps?: ITagInputProps; placeholder?: string; multiSelectProps?: Omit; onChange?: UiKitMultiSelectProps['onChange']; usePortal?: UiKitMultiSelectProps['usePortal']; popoverClassName?: UiKitMultiSelectProps['popoverClassName']; } export interface SelectProps extends Omit { name: string; items: SelectOption[]; placeholder?: string; inputGroup?: Omit; selectProps?: Omit; onChange?: UiKitSelectProps['onChange']; usePortal?: UiKitSelectProps['usePortal']; value?: UiKitSelectProps['value']; onQueryChange?: UiKitSelectProps['onQueryChange']; addClearButton?: boolean; } export interface DropDownFormikProps extends Omit { name: string; onChange?: DropDownProps['onChange']; items: DropDownProps['items']; usePortal?: boolean; addClearBtn?: boolean; placeholder?: string; dropDownProps?: Omit; } export interface TextProps extends Omit { name: string; inputGroup?: Omit; placeholder?: string; onChange?: IInputGroupProps['onChange']; isIdentifier?: boolean; } export interface ExpressionInputProps extends Omit { name: string; placeholder?: string; expressionInputProps?: Omit; onChange?: ExpressionInputLocalProps['onChange']; items?: ExpressionInputLocalProps['items']; } export interface TextAreaProps extends Omit { name: string; placeholder?: string; autoFocus?: boolean; textArea?: Omit; onChange?: ITextAreaProps['onChange']; maxLength?: number; } export interface FormikFormProps extends Omit { className?: string; disabled?: boolean; children: React.ReactNode; formik?: FormikExtended; [Symbol.iterator]?(): IterableIterator; } export interface FormikProps extends Omit, 'onSubmit' | 'render'> { formLoading?: boolean; onSubmit: (values: Values, formikActions: FormikHelpers) => void | Promise | Promise; formName: string; } export declare function Formik>(props: FormikProps): React.ReactElement; export interface FormColorPickerProps extends ColorPickerProps, Omit { name: string; label: string; } export interface FormMultiTypeInputProps extends Omit { name: string; label: string; placeholder?: string; /** *Enable this when we want to use value, instead of label/value */ useValue?: boolean; selectItems: SelectOption[]; multiTypeInputProps?: Omit; disabled?: boolean; } export interface FormMultiTypeBiLevelInputProps extends Omit { name: string; label: string; placeholder?: string; value?: SelectWithBiLevelOption; /** *Enable this when we want to use value, instead of label/value */ useValue?: boolean; selectItems: SelectWithBiLevelOption[]; parentIcon?: IconName; childIcon?: IconName; multiTypeInputProps?: Omit; disabled?: boolean; } export interface FormMultiSelectTypeInputProps extends Omit { name: string; label: string; placeholder?: string; /** *Enable this when we want to use value, instead of label/value */ useValue?: boolean; selectItems: MultiSelectOption[]; multiSelectTypeInputProps?: Omit; disabled?: boolean; } export interface FormSelectWithSubmenuTypeInputProps extends Omit { name: string; label: string; placeholder?: string; value?: SelectWithSubmenuOption; /** *Enable this when we want to use value, instead of label/value */ useValue?: boolean; selectItems: SelectWithSubmenuOption[]; selectWithSubmenuTypeInputProps?: Omit; disabled?: boolean; } export interface FormSelectWithSubmenuTypeInputPropsV2 extends Omit { name: string; label: string; placeholder?: string; value?: SubmenuSelectOption; /** *Enable this when we want to use value, instead of label/value */ useValue?: boolean; selectItems: SubmenuSelectOption[]; selectWithSubmenuTypeInputProps?: Omit; disabled?: boolean; } export interface FormMultiSelectWithSubmenuTypeInputProps extends Omit { name: string; label: string; placeholder?: string; multiSelectWithSubmenuTypeInputProps?: Omit; disabled?: boolean; } export interface FormMultiTextTypeInputProps extends Omit { name: string; label: ReactNode | string; placeholder?: string; onChange?: MultiTextInputProps['onChange']; multiTextInputProps?: Omit; disabled?: boolean; } export interface FormCategorizedSelect extends Omit { name: string; label: string; placeholder?: string; items: CategorizedSelectOption[]; onChange?: UiKitSelectProps['onChange']; categorizedSelectProps?: CategorizedSelectProps; } export interface FormSelectWithSubviewProps extends Omit { name: string; label: string; placeholder?: string; items: SelectOption[]; changeViewButtonLabel: string; subview: SelectWithSubviewProps['subview']; onChange?: UiKitSelectProps['onChange']; selectWithSubviewProps?: Omit; } export interface FormMultiSelectWithSubviewProps extends Omit { name: string; label: string; placeholder?: string; items: MultiSelectOption[]; changeViewButtonLabel: string; subview: MultiSelectWithSubviewProps['subview']; onChange?: MultiSelectProps['onChange']; multiSelectWithSubviewProps?: Omit; disabled?: boolean; } export declare const FormInput: { TagInput: React.ComponentType & FormikContextProps>; KVTagInput: React.ComponentType>; MultiInput: React.ComponentType>; CustomRender: React.ComponentType>; FileInput: React.ComponentType>; RadioGroup: React.ComponentType>; CheckBox: React.ComponentType>; Toggle: React.ComponentType>; MultiSelect: React.ComponentType>; Select: React.ComponentType>; DropDown: React.ComponentType>; Text: React.ComponentType>; ExpressionInput: React.ComponentType>; TextArea: React.ComponentType>; ColorPicker: React.ComponentType>; InputWithIdentifier: React.ComponentType>; MultiTypeInput: React.ComponentType>; MultiTypeBiLevelInput: React.ComponentType>; SelectWithSubmenuTypeInput: React.ComponentType>; SelectWithSubmenuTypeInputV2: React.ComponentType>; MultiSelectWithSubmenuTypeInput: React.ComponentType>; MultiTextInput: React.ComponentType>; MultiSelectTypeInput: React.ComponentType>; CategorizedSelect: React.ComponentType>; SelectWithSubview: React.ComponentType>; MultiSelectWithSubview: React.ComponentType>; DurationInput: React.ComponentType>; }; export declare const FormikForm: React.ComponentType;