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.58 kB
TypeScript
import { default as React } from 'react';
import { AssetValue, FormStructure, FormValues, onToggleImageEditor, OnNavigate } from './form.types';
export interface FormRendererProps {
structure: FormStructure;
initialValues?: FormValues;
onSubmit?: (values: FormValues) => void;
onAssetUpload?: (file: File) => Promise<AssetValue>;
readOnly?: boolean;
onGoToNextStep?: OnNavigate;
onGoToPreviousStep?: OnNavigate;
onToggleImageEditor?: onToggleImageEditor;
isSubmitting?: boolean;
testMode?: boolean;
/** Returns headers for API requests (e.g. Authorization from cookie). Used by CreatableMultiCombobox */
getRequestHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
/** Cookie name. When provided with authCookieTokenPath, builds getRequestHeaders from cookie. Ignored if getRequestHeaders is set */
authCookieName?: string;
/** Dot-notation path to token in cookie JSON (e.g. "in.token"). Default: "in.token" */
authCookieTokenPath?: string;
/** Dot-notation path to email in cookie JSON (e.g. "in.email"). When set with authCookieName, auto-adds { email } to create option body */
authCookieEmailPath?: string;
/** Returns extra body for create option API (e.g. { email } from cookie). Used by CreatableMultiCombobox. Ignored if authCookieName + authCookieEmailPath set */
getCreateOptionExtraBody?: () => Record<string, unknown> | Promise<Record<string, unknown>>;
}
export declare const FormRenderer: React.FC<FormRendererProps>;
//# sourceMappingURL=form-renderer.d.ts.map