import type { Form as FormikForm, FormikContextType } from 'formik'; import React from 'react'; import type { InputProps } from '../Input'; import type { PageFooterProps } from '../PageLayout/PageLayout.types'; import type { Props } from '../_utils/types'; import type { BaseFieldProps, ComponentWithFieldProp, FieldCheckboxComponentProps, FieldCheckboxesComponentProps, FieldCheckboxesValueType, FieldConfig, FieldCurrencyComponentProps, FieldDateComponentProps, FieldDateValueType, FieldGroupSelectComponentProps, FieldGroupSelectValueType, FieldMultiSelectComponentProps, FieldMultiSelectValueType, FieldNumberComponentProps, FieldPillSelectComponentProps, FieldRadioButtonsComponentProps, FieldRichTextComponentProps, FieldSelectComponentProps, FieldTextAreaComponentProps, FieldTextComponentProps, FieldTieredSelectComponentProps, FieldTieredSelectValueType, FormCheckboxesProps, FormCheckboxProps, FormContextAPI, FormCurrencyProps, FormDateProps, FormErrorBannerProps, FormFieldAPI, FormFieldProps, FormFieldValueComponentProps, FormGroupSelectProps, FormMultiSelectProps, FormNumberProps, FormPillSelectProps, FormProps, FormRadioButtonsProps, FormRichTextProps, FormSelectProps, FormTextAreaProps, FormTextProps, FormTieredSelectProps, GroupedOptionsConfig, OptionList, TraditionalBaseFieldProps, ViewFieldProps } from './Form.types'; export declare const FormContext: React.Context; export declare function useFormContext(): FormikContextType & FormContextAPI; export declare function getPrimitiveValue(value: any, getId?: (option: any) => string | number): string | number; export declare function useField({ disabled: _disabled, error: _error, getId, required: _required, name, validate, view: _view, }?: FieldConfig): FormFieldAPI; declare function Form_({ initialValues, onSubmit: _onSubmit, disabled, enableConfirmNavigation, variant, validationSchema, view, ...props }: FormProps): React.JSX.Element; declare type FormFormProps = Omit, 'placeholder' | 'onPointerEnterCapture' | 'onPointerLeaveCapture'>; export declare function FormForm({ children, className, onKeyDown, style, ...props }: FormFormProps): React.JSX.Element; export declare function FormErrorBanner({ item, i18nScope, ...rest }: FormErrorBannerProps & React.HTMLAttributes): React.JSX.Element | null; export declare function isFormFieldEmpty(val: any): boolean; export declare function WXPField>({ as: AsComponent, children, colStart, colWidth, disabled, description, error, label, name, required, tooltip, validate, view, inlineLabel: singleCheckboxInlineLabel, inlineDescription: singleCheckboxInlineDescription, ...props }: BaseFieldProps & Pick & { getId?: OptionList['getId']; }): React.JSX.Element; /** @deprecated The traditional field layout is deprecated */ export declare function TraditionalField>({ as: AsComponent, children, colWidth, disabled, error, label, name, required, tooltip, validate, view, ...props }: TraditionalBaseFieldProps & { getId?: OptionList['getId']; }): React.JSX.Element; export declare function Row({ children, ...props }: Props): React.JSX.Element; export declare function BaseField>(props: BaseFieldProps | TraditionalBaseFieldProps): React.JSX.Element; export declare function makeField, ComponentProps extends FormFieldValueComponentProps>(editComponent: ComponentWithFieldProp, showComponent: ComponentWithFieldProp, options?: { emptyState: boolean; }): (({ children, ...props }: FieldTypeProps) => React.JSX.Element) & { Create: (props: ViewFieldProps) => React.JSX.Element | null; Read: (props: ViewFieldProps) => React.JSX.Element | null; Update: (props: ViewFieldProps) => React.JSX.Element | null; }; export declare function withDefaultEmptyState(OutputComponent: ComponentWithFieldProp): React.ForwardRefExoticComponent & React.RefAttributes>; export declare const TextInput: React.ForwardRefExoticComponent & React.RefAttributes>; /** * @deprecated This component was for `Form` internal usage only. * Try using the supported APIs like `Form.Text view="read"` or * `Form.Text.Read` which renders this. Or duplicate the source * `{field.input.value}`. * @deprecatedSince 12.21.0 */ export declare const TextOutput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const NumberInput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const NumberOutput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const CurrencyInput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const CurrencyOutput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const DateInput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const DateOutput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const CheckboxInput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const CheckboxOutput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const TextAreaInput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const TextAreaOutput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const RichTextInput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const RichTextOutput: React.ForwardRefExoticComponent & Props & React.RefAttributes>; export declare const RadioButtonsInput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const RadioButtonsOutput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const CheckboxesInput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const CheckboxesOutput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare function useOptions({ value, optgroups, options, getLabel, getId, groupGetId, getGroup, comparator, }: GroupedOptionsConfig): { list: any[]; selected: OptionItem | undefined; search: (e: React.ChangeEvent) => void; }; export declare const SelectInput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const SelectOutput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const PillSelectInput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const PillSelectOutput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const MultiSelectInput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const MultiSelectOutput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const GroupSelectInput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const GroupSelectOutput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const TieredSelectInput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const TieredSelectOutput: React.ForwardRefExoticComponent & React.RefAttributes>; export declare const Form: typeof Form_ & { Checkboxes: (({ children, ...props }: FormCheckboxesProps) => React.JSX.Element) & { Create: (props: ViewFieldProps, FieldCheckboxesComponentProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps, FieldCheckboxesComponentProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps, FieldCheckboxesComponentProps>) => React.JSX.Element | null; }; Checkbox: (({ children, ...props }: FormCheckboxProps) => React.JSX.Element) & { Create: (props: ViewFieldProps, FieldCheckboxComponentProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps, FieldCheckboxComponentProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps, FieldCheckboxComponentProps>) => React.JSX.Element | null; }; Currency: (({ children, ...props }: FormCurrencyProps) => React.JSX.Element) & { Create: (props: ViewFieldProps, FieldCurrencyComponentProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps, FieldCurrencyComponentProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps, FieldCurrencyComponentProps>) => React.JSX.Element | null; }; DateSelect: (({ children, ...props }: FormDateProps) => React.JSX.Element) & { Create: (props: ViewFieldProps, FieldDateComponentProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps, FieldDateComponentProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps, FieldDateComponentProps>) => React.JSX.Element | null; }; ErrorBanner: typeof FormErrorBanner; Field: (({ children, ...props }: FormFieldProps & { [key: string]: unknown; }) => React.JSX.Element) & { Create: (props: ViewFieldProps & { [key: string]: unknown; }, FormFieldValueComponentProps & InputProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps & { [key: string]: unknown; }, FormFieldValueComponentProps & InputProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps & { [key: string]: unknown; }, FormFieldValueComponentProps & InputProps>) => React.JSX.Element | null; }; /** * `Form.Form` is a small wrapper around an HTML `
` element that automatically hooks into Formik's `handleSubmit` and `handleReset`. * When the `view` is `read`, it renders a `div` tag instead. * @see https://formik.org/docs/api/form */ Form: typeof FormForm; GroupSelect: (({ children, ...props }: FormGroupSelectProps) => React.JSX.Element) & { Create: (props: ViewFieldProps, FieldGroupSelectComponentProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps, FieldGroupSelectComponentProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps, FieldGroupSelectComponentProps>) => React.JSX.Element | null; }; MultiSelect: (({ children, ...props }: FormMultiSelectProps) => React.JSX.Element) & { Create: (props: ViewFieldProps, FieldMultiSelectComponentProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps, FieldMultiSelectComponentProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps, FieldMultiSelectComponentProps>) => React.JSX.Element | null; }; Number: (({ children, ...props }: FormNumberProps) => React.JSX.Element) & { Create: (props: ViewFieldProps, FieldNumberComponentProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps, FieldNumberComponentProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps, FieldNumberComponentProps>) => React.JSX.Element | null; }; PillSelect: (({ children, ...props }: FormPillSelectProps) => React.JSX.Element) & { Create: (props: ViewFieldProps, FieldPillSelectComponentProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps, FieldPillSelectComponentProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps, FieldPillSelectComponentProps>) => React.JSX.Element | null; }; RadioButtons: (({ children, ...props }: FormRadioButtonsProps) => React.JSX.Element) & { Create: (props: ViewFieldProps, FieldRadioButtonsComponentProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps, FieldRadioButtonsComponentProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps, FieldRadioButtonsComponentProps>) => React.JSX.Element | null; }; RichText: (({ children, ...props }: FormRichTextProps) => React.JSX.Element) & { Create: (props: ViewFieldProps, FieldRichTextComponentProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps, FieldRichTextComponentProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps, FieldRichTextComponentProps>) => React.JSX.Element | null; }; Row: typeof Row; Select: (({ children, ...props }: FormSelectProps) => React.JSX.Element) & { Create: (props: ViewFieldProps, FieldSelectComponentProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps, FieldSelectComponentProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps, FieldSelectComponentProps>) => React.JSX.Element | null; }; Text: (({ children, ...props }: FormTextProps) => React.JSX.Element) & { Create: (props: ViewFieldProps, FieldTextComponentProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps, FieldTextComponentProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps, FieldTextComponentProps>) => React.JSX.Element | null; }; TextArea: (({ children, ...props }: FormTextAreaProps) => React.JSX.Element) & { Create: (props: ViewFieldProps, FieldTextAreaComponentProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps, FieldTextAreaComponentProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps, FieldTextAreaComponentProps>) => React.JSX.Element | null; }; TieredSelect: (({ children, ...props }: FormTieredSelectProps) => React.JSX.Element) & { Create: (props: ViewFieldProps, FieldTieredSelectComponentProps>) => React.JSX.Element | null; Read: (props: ViewFieldProps, FieldTieredSelectComponentProps>) => React.JSX.Element | null; Update: (props: ViewFieldProps, FieldTieredSelectComponentProps>) => React.JSX.Element | null; }; SettingsPageFooter: React.ForwardRefExoticComponent>; }; export {};