Function

runPresetAction

@ng-forge/dynamic-forms

Apply a built-in preset action against the addon's host field. Shared across all adapters — each adapter's ADDON_PRESET_HANDLER provider delegates here.

Presets that require adapter-specific UI mechanics (clipboard, type override) are best-effort — they no-op with a warning when the necessary collaborator isn't available (e.g., toggle-password-visibility outside an input field).

Signature

function runPresetAction(
  preset: AddonActionPreset,
  ctx: AddonActionContext,
  collaborators: PresetCollaborators,
  adapterLabel: string,
  fieldLabel: string
): Promise<void>

Parameters

NameTypeDescription
presetAddonActionPreset-
ctxAddonActionContext-
collaboratorsPresetCollaborators-
adapterLabelstringUsed in warnings — 'Material' / 'Bootstrap' / etc.
fieldLabelstringUsed in warnings — 'mat-input' / 'bs-input' / etc.

Returns

Promise<void>