UNPKG

geoiq-frontend-ui-kit

Version:

This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.

27 lines (26 loc) 1.32 kB
import { AssetValue, FormField, FormFieldValue, FormStep, FormValues, onToggleImageEditor } from '../../form.types'; interface FormValuesContextType { values: FormValues; errors: Record<string, string>; setValue: (fieldId: string, value: FormFieldValue) => void; setFormValues: (formValues: FormValues) => void; validateField: (field: FormField) => { isValid: boolean; errorMessage: string; }; validateStep: (step: FormStep) => { isStepValid: boolean; errors: Record<string, string>; }; submitForm: () => void; onAssetUpload?: (file: File) => Promise<AssetValue>; onToggleImageEditor?: onToggleImageEditor; /** Returns headers for API requests (e.g. Authorization from cookie). Used by CreatableMultiCombobox */ getRequestHeaders?: () => Record<string, string> | Promise<Record<string, string>>; /** Returns extra body fields for create option API (e.g. { email } from cookie). Used by CreatableMultiCombobox */ getCreateOptionExtraBody?: () => Record<string, unknown> | Promise<Record<string, unknown>>; } export declare const FormValuesContext: import('react').Context<FormValuesContextType | null>; export declare const useFormValues: () => FormValuesContextType; export {}; //# sourceMappingURL=form-values.context.d.ts.map