{"version":3,"file":"ngx-numeric-range-form-field.mjs","sources":["../../../../libs/ngx-numeric-range-form-field/src/lib/numeric-range-form-field.component.ts","../../../../libs/ngx-numeric-range-form-field/src/lib/numeric-range-form-field.component.html","../../../../libs/ngx-numeric-range-form-field/src/lib/validators/numeric-range-order.ts","../../../../libs/ngx-numeric-range-form-field/src/lib/validators/numeric-range-bounds.ts","../../../../libs/ngx-numeric-range-form-field/src/lib/validators/numeric-range-both-filled.ts","../../../../libs/ngx-numeric-range-form-field/src/lib/validators/numeric-range-width.ts","../../../../libs/ngx-numeric-range-form-field/src/lib/error-kinds.ts","../../../../libs/ngx-numeric-range-form-field/src/ngx-numeric-range-form-field.ts"],"sourcesContent":["import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  effect,\n  ElementRef,\n  input,\n  model,\n  untracked,\n  viewChild\n} from '@angular/core'\nimport { FormValueControl, ValidationError } from '@angular/forms/signals'\nimport { INumericRange } from './numeric-range.model'\n\n@Component({\n  selector: 'ngx-numeric-range-form-field',\n  templateUrl: './numeric-range-form-field.component.html',\n  styleUrls: ['./numeric-range-form-field.component.scss'],\n  changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NumericRangeFormFieldComponent implements FormValueControl<INumericRange | null> {\n  readonly label = input('')\n  readonly minPlaceholder = input('From')\n  readonly maxPlaceholder = input('To')\n  // Decoupled from the placeholder so a11y can use a stable description\n  // even when the visible placeholder is empty or localised separately.\n  // Default to the placeholder when not overridden.\n  readonly minLabel = input<string | null>(null)\n  readonly maxLabel = input<string | null>(null)\n  readonly resetLabel = input('Reset range')\n  readonly readonly = input(false)\n  readonly minReadonly = input(false)\n  readonly maxReadonly = input(false)\n  readonly resettable = input(true)\n  readonly required = input(false)\n\n  // Native numeric-input attributes forwarded to both inputs.\n  readonly step = input<number | string | null>(null)\n  readonly autocomplete = input<string | null>(null)\n  // Per-input form-field name (useful inside a <form> with native submit).\n  readonly minName = input<string | null>(null)\n  readonly maxName = input<string | null>(null)\n  // Per-side native HTML `min` / `max` attributes — purely for the browser's\n  // built-in spinner range; validation remains schema-driven.\n  readonly minMin = input<number | string | null>(null)\n  readonly minMax = input<number | string | null>(null)\n  readonly maxMin = input<number | string | null>(null)\n  readonly maxMax = input<number | string | null>(null)\n\n  protected readonly resolvedMinLabel = computed(\n    () => this.minLabel() ?? this.minPlaceholder()\n  )\n  protected readonly resolvedMaxLabel = computed(\n    () => this.maxLabel() ?? this.maxPlaceholder()\n  )\n\n  // Stable per-instance IDs so the visible label can be associated with\n  // the group via aria-labelledby. Each input keeps its own aria-label\n  // composed as \"<group> <side>\" so a screen reader announces the full\n  // descriptor without hidden DOM trickery.\n  protected readonly labelId = `ngx-nrff-label-${++idCounter}`\n  protected readonly minInputId = `${this.labelId}-min`\n  protected readonly maxInputId = `${this.labelId}-max`\n\n  protected readonly composedMinLabel = computed(() => {\n    const group = this.label()\n    const side = this.resolvedMinLabel()\n    return group ? `${group} ${side}` : side\n  })\n  protected readonly composedMaxLabel = computed(() => {\n    const group = this.label()\n    const side = this.resolvedMaxLabel()\n    return group ? `${group} ${side}` : side\n  })\n\n  readonly value = model<INumericRange | null>(null)\n  readonly disabled = input(false)\n  readonly touched = model(false)\n  readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([])\n\n  protected readonly isInvalid = computed(\n    () => this.touched() && this.errors().length > 0\n  )\n\n  protected readonly hasValue = computed(() => {\n    const v = this.value()\n    return v !== null && (v.minimum !== null || v.maximum !== null)\n  })\n\n  protected readonly canReset = computed(\n    () =>\n      this.resettable() &&\n      !this.readonly() &&\n      !this.minReadonly() &&\n      !this.maxReadonly() &&\n      !this.disabled() &&\n      this.hasValue()\n  )\n\n  private readonly minInputRef =\n    viewChild.required<ElementRef<HTMLInputElement>>('minInput')\n  private readonly maxInputRef =\n    viewChild.required<ElementRef<HTMLInputElement>>('maxInput')\n\n  // Tracks the last numeric value each DOM input emitted so we can tell an\n  // external write (reset / patchValue) apart from a keystroke we just\n  // processed. Without this, syncing the signal back into the input would\n  // clobber transient states like \"1.\" or leading zeros while the user types.\n  private lastMinEmitted: number | null = null\n  private lastMaxEmitted: number | null = null\n\n  constructor() {\n    effect(() => {\n      const v = this.value()\n      const nextMin = v?.minimum ?? null\n      const nextMax = v?.maximum ?? null\n\n      untracked(() => {\n        const minEl = this.minInputRef().nativeElement\n        const maxEl = this.maxInputRef().nativeElement\n\n        if (nextMin !== this.lastMinEmitted) {\n          minEl.value = nextMin === null ? '' : String(nextMin)\n          this.lastMinEmitted = nextMin\n        }\n        if (nextMax !== this.lastMaxEmitted) {\n          maxEl.value = nextMax === null ? '' : String(nextMax)\n          this.lastMaxEmitted = nextMax\n        }\n      })\n    })\n  }\n\n  protected onMinInput(event: Event): void {\n    const min = toNumberOrNull((event.target as HTMLInputElement).value)\n    this.lastMinEmitted = min\n    this.patch({ minimum: min })\n  }\n\n  protected onMaxInput(event: Event): void {\n    const max = toNumberOrNull((event.target as HTMLInputElement).value)\n    this.lastMaxEmitted = max\n    this.patch({ maximum: max })\n  }\n\n  protected onBlur(): void {\n    this.touched.set(true)\n  }\n\n  protected reset(): void {\n    this.value.set(null)\n    this.touched.set(false)\n  }\n\n  private patch(partial: Partial<INumericRange>): void {\n    const current: INumericRange = this.value() ?? {\n      minimum: null,\n      maximum: null\n    }\n    const next: INumericRange = { ...current, ...partial }\n\n    if (next.minimum === null && next.maximum === null) {\n      this.value.set(null)\n      return\n    }\n\n    this.value.set(next)\n  }\n}\n\nlet idCounter = 0\n\nfunction toNumberOrNull(raw: string): number | null {\n  if (raw === '') {\n    return null\n  }\n  const parsed = Number(raw)\n  // Reject NaN *and* ±Infinity — `Number.isNaN(Infinity) === false` so the\n  // previous check let `Infinity` through as a real range bound.\n  return Number.isFinite(parsed) ? parsed : null\n}\n","<div\n  class=\"field\"\n  [class.field--invalid]=\"isInvalid()\"\n  [class.field--disabled]=\"disabled()\"\n  [class.field--readonly]=\"readonly()\"\n  role=\"group\"\n  [attr.aria-labelledby]=\"label() ? labelId : null\"\n>\n  @if (label()) {\n    <span class=\"field__label\" [id]=\"labelId\">\n      {{ label() }}\n      @if (required()) {\n        <span class=\"field__required\" aria-hidden=\"true\">*</span>\n      }\n    </span>\n  }\n\n  <div class=\"field__control\">\n    <input\n      #minInput\n      class=\"field__input\"\n      type=\"number\"\n      inputmode=\"numeric\"\n      [id]=\"minInputId\"\n      [placeholder]=\"minPlaceholder()\"\n      [attr.aria-label]=\"composedMinLabel()\"\n      [readonly]=\"readonly() || minReadonly()\"\n      [disabled]=\"disabled()\"\n      [attr.name]=\"minName()\"\n      [attr.autocomplete]=\"autocomplete()\"\n      [attr.step]=\"step()\"\n      [attr.min]=\"minMin()\"\n      [attr.max]=\"minMax()\"\n      (input)=\"onMinInput($event)\"\n      (blur)=\"onBlur()\"\n    />\n    <span class=\"field__separator\" aria-hidden=\"true\">–</span>\n    <input\n      #maxInput\n      class=\"field__input\"\n      type=\"number\"\n      inputmode=\"numeric\"\n      [id]=\"maxInputId\"\n      [placeholder]=\"maxPlaceholder()\"\n      [attr.aria-label]=\"composedMaxLabel()\"\n      [readonly]=\"readonly() || maxReadonly()\"\n      [disabled]=\"disabled()\"\n      [attr.name]=\"maxName()\"\n      [attr.autocomplete]=\"autocomplete()\"\n      [attr.step]=\"step()\"\n      [attr.min]=\"maxMin()\"\n      [attr.max]=\"maxMax()\"\n      (input)=\"onMaxInput($event)\"\n      (blur)=\"onBlur()\"\n    />\n\n    @if (canReset()) {\n      <button\n        type=\"button\"\n        class=\"field__reset\"\n        (click)=\"reset()\"\n        [attr.aria-label]=\"resetLabel()\"\n      >\n        <svg\n          viewBox=\"0 0 24 24\"\n          width=\"16\"\n          height=\"16\"\n          aria-hidden=\"true\"\n          focusable=\"false\"\n        >\n          <path\n            d=\"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n            fill=\"currentColor\"\n          />\n        </svg>\n      </button>\n    }\n  </div>\n</div>\n","import {\n  PathKind,\n  SchemaPath,\n  SchemaPathRules,\n  validate,\n  ValidationError\n} from '@angular/forms/signals'\nimport { INumericRange } from '../numeric-range.model'\n\n/**\n * Signal Forms validator that flags a numeric range whose maximum is less\n * than its minimum. No-op when either side is `null`.\n */\nexport function numericRangeOrderValid<\n  TValue extends INumericRange | null | undefined,\n  TPathKind extends PathKind = PathKind.Root\n>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>): void {\n  validate(path, ({ value }) => {\n    const v = value()\n    if (!v) {\n      return null\n    }\n\n    const { minimum, maximum } = v\n    if (minimum === null || maximum === null) {\n      return null\n    }\n\n    if (maximum < minimum) {\n      return {\n        kind: 'invalidRange',\n        message: 'Maximum must be greater than or equal to minimum'\n      } as ValidationError.WithoutFieldTree\n    }\n\n    return null\n  })\n}\n","import {\n  PathKind,\n  SchemaPath,\n  SchemaPathRules,\n  validate,\n  ValidationError\n} from '@angular/forms/signals'\nimport { INumericRange } from '../numeric-range.model'\n\nexport type NumericRangeBounds = {\n  min?: number\n  max?: number\n}\n\n/**\n * Signal Forms validator that keeps both sides of a numeric range within\n * consumer-supplied bounds. A value on either side below `bounds.min` emits\n * `{ kind: 'min' }`; a value above `bounds.max` emits `{ kind: 'max' }`.\n * `null` on either side is treated as \"not yet set\" and passes.\n */\nexport function numericRangeBounds<\n  TValue extends INumericRange | null | undefined,\n  TPathKind extends PathKind = PathKind.Root\n>(\n  path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n  bounds: NumericRangeBounds\n): void {\n  validate(path, ({ value }) => {\n    const v = value()\n    if (!v) {\n      return null\n    }\n\n    const sides: ReadonlyArray<{\n      label: 'Minimum' | 'Maximum'\n      value: number | null\n    }> = [\n      { label: 'Minimum', value: v.minimum },\n      { label: 'Maximum', value: v.maximum }\n    ]\n    const errors: ValidationError.WithoutFieldTree[] = []\n\n    for (const side of sides) {\n      if (side.value === null) continue\n\n      if (bounds.min !== undefined && side.value < bounds.min) {\n        errors.push({\n          kind: 'min',\n          message: `${side.label} must be at least ${bounds.min}`\n        } as ValidationError.WithoutFieldTree)\n      }\n\n      if (bounds.max !== undefined && side.value > bounds.max) {\n        errors.push({\n          kind: 'max',\n          message: `${side.label} must not exceed ${bounds.max}`\n        } as ValidationError.WithoutFieldTree)\n      }\n    }\n\n    return errors.length ? errors : null\n  })\n}\n","import {\n  PathKind,\n  SchemaPath,\n  SchemaPathRules,\n  validate,\n  ValidationError\n} from '@angular/forms/signals'\nimport { INumericRange } from '../numeric-range.model'\n\n/**\n * Signal Forms validator that fails until BOTH sides of a numeric range are\n * populated. `required(p)` only asserts the composite value is not `null` —\n * pair this helper with it (or use on its own) to guarantee the user filled\n * both the minimum and the maximum inputs.\n *\n * Emits `{ kind: 'incomplete' }` when either side is `null`.\n */\nexport function numericRangeBothFilled<\n  TValue extends INumericRange | null | undefined,\n  TPathKind extends PathKind = PathKind.Root\n>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>): void {\n  validate(path, ({ value }) => {\n    const v = value()\n    if (v && v.minimum !== null && v.maximum !== null) {\n      return null\n    }\n    return {\n      kind: 'incomplete',\n      message: 'Both minimum and maximum are required'\n    } as ValidationError.WithoutFieldTree\n  })\n}\n","import {\n  PathKind,\n  SchemaPath,\n  SchemaPathRules,\n  validate,\n  ValidationError\n} from '@angular/forms/signals'\nimport { INumericRange } from '../numeric-range.model'\n\nexport type NumericRangeWidthBounds = {\n  min?: number\n  max?: number\n}\n\n/**\n * Signal Forms validator that constrains the *span* of a numeric range\n * (i.e. `maximum - minimum`). Pass `min` to require a minimum span and\n * `max` to cap the span.\n *\n * Emits `{ kind: 'minWidth' }` when the span is below `bounds.min`\n * and `{ kind: 'maxWidth' }` when the span exceeds `bounds.max`. Both\n * carry a human-readable `message`. Skips when either side is `null` or\n * the range is mis-ordered (that case is surfaced by\n * `numericRangeOrderValid`).\n */\nexport function numericRangeWidth<\n  TValue extends INumericRange | null | undefined,\n  TPathKind extends PathKind = PathKind.Root\n>(\n  path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n  bounds: NumericRangeWidthBounds\n): void {\n  validate(path, ({ value }) => {\n    const v = value()\n    if (!v || v.minimum === null || v.maximum === null) {\n      return null\n    }\n    if (v.maximum < v.minimum) {\n      return null\n    }\n\n    const span = v.maximum - v.minimum\n    const errors: ValidationError.WithoutFieldTree[] = []\n\n    if (bounds.min !== undefined && span < bounds.min) {\n      errors.push({\n        kind: 'minWidth',\n        message: `Range must span at least ${bounds.min}`\n      } as ValidationError.WithoutFieldTree)\n    }\n\n    if (bounds.max !== undefined && span > bounds.max) {\n      errors.push({\n        kind: 'maxWidth',\n        message: `Range must not span more than ${bounds.max}`\n      } as ValidationError.WithoutFieldTree)\n    }\n\n    return errors.length ? errors : null\n  })\n}\n","/**\n * Error `kind` values emitted by this library's validators. Exporting them\n * as a const-object lets consumers use the typed constants instead of\n * duplicating string literals when filtering `field().errors()`:\n *\n * ```ts\n * import { NumericRangeErrorKind } from 'ngx-numeric-range-form-field'\n *\n * if (field().errors().some(e => e.kind === NumericRangeErrorKind.OutOfOrder)) {\n *   // …\n * }\n * ```\n *\n * The string values are the same as the `kind` strings emitted by the\n * validators today, so existing code that compares against `'invalidRange'`,\n * `'min'`, etc. continues to work.\n */\nexport const NumericRangeErrorKind = {\n  OutOfOrder: 'invalidRange',\n  BoundsMin: 'min',\n  BoundsMax: 'max',\n  Incomplete: 'incomplete',\n  WidthMin: 'minWidth',\n  WidthMax: 'maxWidth'\n} as const\n\nexport type NumericRangeErrorKind =\n  (typeof NumericRangeErrorKind)[keyof typeof NumericRangeErrorKind]\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAoBa,8BAA8B,CAAA;AAChC,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,4EAAC;AACjB,IAAA,cAAc,GAAG,KAAK,CAAC,MAAM,qFAAC;AAC9B,IAAA,cAAc,GAAG,KAAK,CAAC,IAAI,qFAAC;;;;AAI5B,IAAA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