UNPKG

@open-formulieren/formio-builder

Version:

An opinionated Formio webform builder for Open Forms

28 lines (27 loc) 1.02 kB
import { AnyComponentSchema } from '@open-formulieren/types'; import { ComponentDefinition, ComponentPlaceholder } from './components/designer/types'; interface IterComponentsResult { /** * The index of the current item. */ index: number; /** * The path to the current item. */ dataPath: string; /** * The current item. */ component: ComponentDefinition; /** * The collection of items that the current item belongs to. */ collection: ComponentDefinition[]; } /** * Recursively (and depth-first) iterate over all components in the component definition. */ export declare function iterComponents(componentDefinitions: ComponentDefinition[], parentKeysPrefix?: string): Generator<IterComponentsResult>; export declare const findComponent: (componentDefinitions: AnyComponentSchema[], componentKey: string) => AnyComponentSchema | null; export declare const isPlaceholder: (component: ComponentDefinition) => component is ComponentPlaceholder; export {};