{"version":3,"file":"ng-forge-dynamic-forms-bootstrap-shared.mjs","mappings":";;;;;;;;;;AAQW;;AACA;;AACA;;AAEQ;;;;;;;;;AAWf;;;;;;;AAnBO;AACT;AACD;;;;ACKC;AACF","names":[],"ignoreList":[],"sources":["../../../../packages/dynamic-forms-bootstrap/shared/input-constraints.directive.ts","../../../../packages/dynamic-forms-bootstrap/shared/preset-actions.ts"],"sourcesContent":["import { Directive, ElementRef, inject, input } from '@angular/core';\nimport { explicitEffect } from 'ngxtension/explicit-effect';\n\n/** Declaratively reflects min, max, and step signal inputs to a native form control. */\n@Directive({\n  selector: '[dfBsInputConstraints]',\n})\nexport class InputConstraintsDirective {\n  readonly dfMin = input<number | string | null | undefined>();\n  readonly dfMax = input<number | string | null | undefined>();\n  readonly dfStep = input<number | string | null | undefined>();\n\n  private readonly element = inject<ElementRef<HTMLInputElement>>(ElementRef);\n\n  private readonly minEffect = explicitEffect([this.dfMin], ([value]) => this.reflectAttribute('min', value));\n  private readonly maxEffect = explicitEffect([this.dfMax], ([value]) => this.reflectAttribute('max', value));\n  private readonly stepEffect = explicitEffect([this.dfStep], ([value]) => this.reflectAttribute('step', value));\n\n  private reflectAttribute(name: 'min' | 'max' | 'step', value: number | string | null | undefined): void {\n    if (value === null || value === undefined) {\n      this.element.nativeElement.removeAttribute(name);\n      return;\n    }\n    this.element.nativeElement.setAttribute(name, String(value));\n  }\n}\n","import type { AddonActionContext, AddonActionPreset } from '@ng-forge/dynamic-forms';\nimport { runPresetAction, type PresetCollaborators } from '@ng-forge/dynamic-forms/integration';\n\nexport type { PresetCollaborators };\n\n/** Bootstrap adapter binding for the shared preset runner. */\nexport function runBsPresetAction(\n  preset: AddonActionPreset,\n  context: AddonActionContext,\n  collaborators: PresetCollaborators,\n): Promise<void> {\n  return runPresetAction(preset, context, collaborators, 'Bootstrap', 'bs-input');\n}\n"]}