UNPKG

@fluent-form/core

Version:

An Angular dynamic forms library powered by Fluent API and JSON.

14 lines (13 loc) 686 B
import type { Provider, Type } from '@angular/core'; import type { SafeAny } from '@ngify/core'; import type { SchemaConfig } from '../interfaces'; import { type SchemaPatchFn } from '../patcher'; import type { AbstractSchema } from '../schemas'; import { AbstractWidget } from '../widgets'; export interface FluentFormWidgetConfig<S extends AbstractSchema> extends SchemaConfig<S> { kind: S['kind']; widget?: Type<AbstractWidget<unknown>>; /** Patch the schema, called when normalizing the schema. */ patch?: SchemaPatchFn<S>; } export declare function provideWidgetConfigs(configs: (FluentFormWidgetConfig<SafeAny> | FluentFormWidgetConfig<SafeAny>[])[]): Provider[];