dynamic-forms / Function

mapFieldToInputs

Main field mapper function that uses the field registry to get the appropriate mapper based on the field's type property.

This function must be called within an injection context where FIELD_SIGNAL_CONTEXT is provided, as mappers inject the context to access form state.

Presentation

function mapFieldToInputs(
  fieldDef: FieldDef<unknown>,
  fieldRegistry: Map<string, FieldTypeDefinition<any>>,
): Signal<Record<string, unknown>>;

Returns

Signal<Record<string, unknown>> -

Signal containing Record of input names to values for ngComponentOutlet

Parameters

NameTypeDescription
fieldDef
FieldDef<unknown>

The field definition to map

fieldRegistry
Map<string, FieldTypeDefinition<any>>

The registry of field type definitions