Component

DfAddonSlot

@ng-forge/dynamic-forms

Dispatcher component that renders an addon by looking up its kind in ADDON_KIND_REGISTRY">ADDON_KIND_REGISTRY and instantiating the registered component.

Used by every adapter's field component to render slot content:

\@for (a of addonsAt('prefix'); track $index) {
  <df-addon-slot [addon]="a" />
}

Behaviour: - Resolves and caches the kind's component asynchronously on first render. - Forwards the slot HTML attribute on the host so Ionic shadow-DOM projection works (<ion-input> projects children with slot="start" into its native start slot). - Honours the addon's reactive hidden flag — when true, the host is display: none so it occupies no layout but stays in DOM (cheaper than tearing down the component). - Forwards className to the host element. - ARIA semantics are owned by individual kind components — decorative kinds (icons, text) set aria-hidden="true" on themselves; interactive kinds (buttons) handle their own aria-label.

If the kind cannot be resolved (registry miss, load failure), the dispatcher logs a warning and renders nothing — never throws. The runtime addon validator should have caught unknown kinds at config init, but this provides a defence-in-depth fallback for misconfigured registries.

Signature

class DfAddonSlot

Properties

NameTypeDescription
addon InputSignal<AnyAddon>-
fieldInputs InputSignal<WrapperFieldInputs | undefined>

Optional read-only view of the host field's mapped inputs — same shape wrappers receive (field?: ReadonlyFieldTree, key, props, etc.). Forwarded to kind components so they can read field state without re-injecting FIELD_SIGNAL_CONTEXT">FIELD_SIGNAL_CONTEXT and rebuilding context themselves.

undefined when the addon is rendered outside a field (rare).

hidden InputSignal<Signal<boolean> | undefined>

Pre-resolved hidden signal supplied by the host field. When provided, the dispatcher reads this instead of re-resolving addon.hidden — lets the host (e.g., prime-input) share a single subscription per Observable-typed hidden between its own visibility filter and the slot's [style.display] binding.

slotAttr Signal<AddonSlot>slot HTML attribute forwarded to host — needed for Ionic shadow projection.
className Signal<string | null>-
isHidden Signal<boolean>

hidden resolved from DynamicValue<boolean> to a flat Signal<boolean>. Prefers the host-supplied signal when present (avoids duplicate toSignal subscriptions for Observable-typed hidden); falls back to the locally- resolved signal, which is always populated by the addon-tracking effect.

resolvedComponent Signal<Type<unknown> | undefined>

Resolved kind component — composed declaratively from two sources of truth: the registry's synchronous cache (warm hits, e.g., a second <df-addon-slot> for an already-loaded kind) and the kind-tagged async loader result. Reading addon().kind first makes the computed react to addon swaps and naturally invalidate stale async-load results.

kindInputs Signal<{ addon: AnyAddon; fieldInputs: WrapperFieldInputs | undefined; }>Inputs passed to the kind component — addon plus the wrapper-style host bag.