{"version":3,"file":"form-field.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/form-field/error.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/form-field/form-field-control.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/form-field/form-field-errors.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/form-field/label.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/form-field/form-field.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/form-field/form-field.html","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/form-field/form-field.module.ts"],"sourcesContent":["import { _IdGenerator } from '@angular/cdk/a11y';\nimport {\n  Directive,\n  ElementRef,\n  HostAttributeToken,\n  inject,\n  InjectionToken,\n  Input,\n} from '@angular/core';\n\n/**\n * Injection token that can be used to reference instances of `SbbError`. It serves as\n * alternative token to the actual `SbbError` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const SBB_ERROR = new InjectionToken<SbbError>('SbbError');\n\n/** Single error message to be shown underneath the form field. */\n@Directive({\n  selector: 'sbb-error, [sbbError]',\n  host: {\n    class: 'sbb-error',\n    '[attr.id]': 'id',\n    'aria-atomic': 'true',\n  },\n  providers: [{ provide: SBB_ERROR, useExisting: SbbError }],\n})\nexport class SbbError {\n  @Input() id: string = inject(_IdGenerator).getId('sbb-error-');\n\n  constructor(...args: unknown[]);\n  constructor() {\n    const ariaLive = inject(new HostAttributeToken('aria-live'), { optional: true });\n\n    // If no aria-live value is set add 'polite' as a default. This is preferred over setting\n    // role='alert' so that screen readers do not interrupt the current task to read this aloud.\n    if (!ariaLive) {\n      const elementRef = inject(ElementRef);\n      elementRef.nativeElement.setAttribute('aria-live', 'polite');\n    }\n  }\n}\n","import { AbstractControlDirective, NgControl } from '@angular/forms';\nimport { Observable } from 'rxjs';\n\n/** An interface which allows a control to work inside of a `SbbField`. */\nexport abstract class SbbFormFieldControl<TValue> {\n  /** The value of the control. */\n  value: TValue | null;\n  /**\n   * Stream that emits whenever the state of the control changes such that the parent `SbbField`\n   * needs to run change detection.\n   */\n  readonly stateChanges: Observable<void>;\n  /** The id of the form field. */\n  readonly id: string;\n  /** The attached NgControl or AbstractControlDirective, if any exists. */\n  readonly ngControl: NgControl | AbstractControlDirective | undefined;\n  /** Whether the control is focused. */\n  readonly focused: boolean;\n  /** Whether the control is empty. */\n  readonly empty: boolean;\n  /** Whether the control is required. */\n  readonly required: boolean;\n  /** Whether the control is disabled. */\n  readonly disabled: boolean;\n  /** Whether the control is in an error state. */\n  readonly errorState: boolean;\n  /**\n   * An optional name for the control type that can be used to distinguish `sbb-form-field` elements\n   * based on their control type. The form field will add a class,\n   * `sbb-form-field-type-{{controlType}}` to its root element.\n   */\n  readonly controlType?: string;\n  /**\n   * Whether the input is currently in an autofilled state. If property is not present on the\n   * control it is assumed to be false.\n   */\n  readonly autofilled?: boolean;\n  /**\n   * Value of `aria-describedby` that should be merged with the described-by ids\n   * which are set by the form-field.\n   */\n  readonly userAriaDescribedBy?: string;\n\n  /**\n   * Whether to automatically assign the ID of the form field as the `for` attribute\n   * on the `<label>` inside the form field. Set this to true to prevent the form\n   * field from associating the label with non-native elements.\n   */\n  readonly disableAutomaticLabeling?: boolean;\n\n  /** Sets the list of element IDs that currently describe this control. */\n  abstract setDescribedByIds(ids: string[]): void;\n\n  /** Handles a click on the control's container. */\n  abstract onContainerClick(event: MouseEvent): void;\n}\n","/** @docs-private */\nexport function getSbbFormFieldMissingControlError(): Error {\n  return Error('sbb-form-field must contain a SbbFormFieldControl.');\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n  selector: 'sbb-label',\n  host: {\n    class: 'sbb-label',\n  },\n})\nexport class SbbLabel {}\n","import { _IdGenerator } from '@angular/cdk/a11y';\nimport {\n  AfterContentChecked,\n  AfterContentInit,\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  computed,\n  contentChild,\n  ContentChild,\n  ContentChildren,\n  ElementRef,\n  inject,\n  InjectionToken,\n  input,\n  InputSignal,\n  OnDestroy,\n  QueryList,\n  Signal,\n  ViewChild,\n  ViewEncapsulation,\n} from '@angular/core';\nimport { AbstractControlDirective } from '@angular/forms';\nimport { Subject, Subscription } from 'rxjs';\nimport { filter, map, pairwise, startWith, takeUntil } from 'rxjs/operators';\n\nimport { SbbError, SBB_ERROR } from './error';\nimport { SbbFormFieldControl } from './form-field-control';\nimport { getSbbFormFieldMissingControlError } from './form-field-errors';\nimport { SbbLabel } from './label';\n\n/**\n * Injection token that can be used to inject an instances of `SbbFormField`. It serves\n * as alternative token to the actual `SbbFormField` class which would cause unnecessary\n * retention of the `SbbFormField` class and its component metadata.\n */\nexport const SBB_FORM_FIELD = new InjectionToken<SbbFormField>('SBB_FORM_FIELD');\n\n@Component({\n  selector: 'sbb-form-field',\n  exportAs: 'sbbFormField',\n  templateUrl: './form-field.html',\n  styleUrls: ['./form-field.css'],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  providers: [{ provide: SBB_FORM_FIELD, useExisting: SbbFormField }],\n  host: {\n    class: 'sbb-form-field',\n    '[class.sbb-form-field-invalid]': '_control?.errorState',\n    '[class.sbb-form-field-disabled]': '_control?.disabled',\n    '[class.sbb-focused]': '_control?.focused',\n    '[class.ng-untouched]': '_shouldForward(\"untouched\")',\n    '[class.ng-touched]': '_shouldForward(\"touched\")',\n    '[class.ng-pristine]': '_shouldForward(\"pristine\")',\n    '[class.ng-dirty]': '_shouldForward(\"dirty\")',\n    '[class.ng-valid]': '_shouldForward(\"valid\")',\n    '[class.ng-invalid]': '_shouldForward(\"invalid\")',\n    '[class.ng-pending]': '_shouldForward(\"pending\")',\n  },\n})\nexport class SbbFormField implements AfterContentInit, AfterContentChecked, OnDestroy {\n  _elementRef: ElementRef<HTMLElement> = inject<ElementRef<HTMLElement>>(ElementRef);\n  private _changeDetectorRef = inject(ChangeDetectorRef);\n\n  /** The label text for the input. */\n  label: InputSignal<string | undefined> = input<string>();\n\n  private _destroyed = new Subject<void>();\n\n  // Unique id for the label element.\n  readonly _labelId = inject(_IdGenerator).getId('sbb-form-field-label-');\n\n  @ViewChild('connectionContainer', { static: true }) _connectionContainerRef: ElementRef;\n\n  @ContentChild(SbbFormFieldControl) _controlNonStatic: SbbFormFieldControl<any>;\n  @ContentChild(SbbFormFieldControl, { static: true }) _controlStatic: SbbFormFieldControl<any>;\n  get _control() {\n    // TODO(crisbeto): we need this workaround in order to support both Ivy and ViewEngine.\n    //  We should clean this up once Ivy is the default renderer.\n    return this._explicitFormFieldControl || this._controlNonStatic || this._controlStatic;\n  }\n  set _control(value) {\n    this._explicitFormFieldControl = value;\n  }\n  private _explicitFormFieldControl: SbbFormFieldControl<any>;\n\n  @ContentChildren(SBB_ERROR, { descendants: true }) _errorChildren: QueryList<SbbError>;\n  private readonly _labelChild = contentChild(SbbLabel);\n\n  private _previousControl: SbbFormFieldControl<unknown> | null = null;\n  private _stateChanges: Subscription | undefined;\n  private _valueChanges: Subscription | undefined;\n  private _describedByChanges: Subscription | undefined;\n\n  constructor(...args: unknown[]);\n  constructor() {}\n\n  /**\n   * Gets the id of the label element. If no label is present, returns `null`.\n   */\n  getLabelId: Signal<string | null> = computed(() =>\n    this._hasLabel() || this.label() ? this._labelId : null,\n  );\n\n  ngAfterContentInit() {\n    this._validateControlChild();\n  }\n\n  ngAfterContentChecked() {\n    this._validateControlChild();\n\n    if (this._control !== this._previousControl) {\n      this._initializeControl(this._previousControl);\n      this._previousControl = this._control;\n    }\n  }\n\n  ngOnDestroy(): void {\n    this._stateChanges?.unsubscribe();\n    this._valueChanges?.unsubscribe();\n    this._describedByChanges?.unsubscribe();\n    this._destroyed.next();\n    this._destroyed.complete();\n  }\n\n  /**\n   * Determines whether a class from the AbstractControlDirective\n   * should be forwarded to the host element.\n   */\n  _shouldForward(prop: keyof AbstractControlDirective): boolean {\n    const control = this._control ? this._control.ngControl : null;\n    return control && control[prop];\n  }\n\n  _hasLabel: Signal<boolean> = computed(() => !!this._labelChild());\n\n  _hasErrors() {\n    return !!(this._errorChildren && this._errorChildren.length && this._control.errorState);\n  }\n\n  /**\n   * Sets the list of element IDs that describe the child control. This allows the control to update\n   * its `aria-describedby` attribute accordingly.\n   */\n  private _syncDescribedByIds() {\n    if (this._control) {\n      const ids: string[] = [];\n\n      // TODO(wagnermaciel): Remove the type check when we find the root cause of this bug.\n      if (\n        this._control.userAriaDescribedBy &&\n        typeof this._control.userAriaDescribedBy === 'string'\n      ) {\n        ids.push(...this._control.userAriaDescribedBy.split(' '));\n      }\n\n      if (this._errorChildren) {\n        ids.push(...this._errorChildren.map((error) => error.id));\n      }\n\n      this._control.setDescribedByIds(ids);\n    }\n  }\n\n  /** Throws an error if the form field's control is missing. */\n  protected _validateControlChild() {\n    if (!this._control && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      throw getSbbFormFieldMissingControlError();\n    }\n  }\n\n  /**\n   * Gets an ElementRef for the element that a overlay attached to the form-field should be\n   * positioned relative to.\n   */\n  getConnectedOverlayOrigin(): ElementRef {\n    return this._connectionContainerRef || this._elementRef;\n  }\n\n  /** Initializes the registered form field control. */\n  private _initializeControl(previousControl: SbbFormFieldControl<unknown> | null) {\n    const control = this._control;\n    const classPrefix = 'sbb-form-field-type-';\n\n    if (previousControl) {\n      this._elementRef.nativeElement.classList.remove(classPrefix + previousControl.controlType);\n    }\n\n    if (control.controlType) {\n      this._elementRef.nativeElement.classList.add(classPrefix + control.controlType);\n    }\n\n    // Subscribe to changes in the child control state in order to update the form field UI.\n    this._stateChanges?.unsubscribe();\n    this._stateChanges = control.stateChanges.pipe(startWith(null! as any)).subscribe(() => {\n      this._changeDetectorRef.markForCheck();\n    });\n\n    // Updating the `aria-describedby` touches the DOM. Only do it if it actually needs to change.\n    this._describedByChanges?.unsubscribe();\n    this._describedByChanges = control.stateChanges\n      .pipe(\n        startWith([undefined, undefined] as const),\n        map(() => [control.errorState, control.userAriaDescribedBy] as const),\n        pairwise(),\n        filter(([[prevErrorState, prevDescribedBy], [currentErrorState, currentDescribedBy]]) => {\n          return prevErrorState !== currentErrorState || prevDescribedBy !== currentDescribedBy;\n        }),\n      )\n      .subscribe(() => this._syncDescribedByIds());\n\n    this._valueChanges?.unsubscribe();\n\n    // Run change detection if the value changes.\n    if (control.ngControl && control.ngControl.valueChanges) {\n      this._valueChanges = control.ngControl.valueChanges\n        .pipe(takeUntil(this._destroyed))\n        .subscribe(() => this._changeDetectorRef.markForCheck());\n    }\n\n    // Update the aria-described by when the number of errors changes.\n    this._errorChildren.changes.pipe(startWith(null)).subscribe(() => {\n      this._syncDescribedByIds();\n      this._changeDetectorRef.markForCheck();\n    });\n  }\n}\n","<div class=\"sbb-form-field-wrapper\">\n  <div class=\"sbb-form-field-label-wrapper\" (click)=\"_control.onContainerClick($event)\">\n    <label\n      class=\"sbb-label sbb-form-field-label\"\n      [id]=\"_labelId\"\n      [attr.for]=\"_control.disableAutomaticLabeling ? null : _control.id\"\n      [class.sbb-form-field-empty]=\"_control.empty\"\n    >\n      @switch (_hasLabel()) {\n        @case (false) {\n          <span>{{ label() }}</span>\n        }\n        @case (true) {\n          <ng-content select=\"sbb-label\"></ng-content>\n        }\n      }\n    </label>\n  </div>\n  <div class=\"sbb-form-field-input-wrapper\" #connectionContainer>\n    <ng-content></ng-content>\n  </div>\n  <div class=\"sbb-form-field-error-wrapper\">\n    @if (_hasErrors()) {\n      <ng-content select=\"sbb-error,[sbbError]\"></ng-content>\n    }\n  </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { SbbCommonModule } from '@sbb-esta/angular/core';\n\nimport { SbbError } from './error';\nimport { SbbFormField } from './form-field';\nimport { SbbLabel } from './label';\n\n@NgModule({\n  imports: [SbbCommonModule, SbbFormField, SbbError, SbbLabel],\n  exports: [SbbFormField, SbbError, SbbLabel],\n})\nexport class SbbFormFieldModule {}\n"],"names":["SBB_ERROR","InjectionToken","SbbError","id","inject","_IdGenerator","getId","constructor","ariaLive","HostAttributeToken","optional","elementRef","ElementRef","nativeElement","setAttribute","deps","target","i0","ɵɵFactoryTarget","Directive","isStandalone","selector","inputs","host","attributes","properties","classAttribute","providers","provide","useExisting","ngImport","decorators","args","class","Input","SbbFormFieldControl","value","stateChanges","ngControl","focused","empty","required","disabled","errorState","controlType","autofilled","userAriaDescribedBy","disableAutomaticLabeling","getSbbFormFieldMissingControlError","Error","SbbLabel","SBB_FORM_FIELD","SbbFormField","_elementRef","_changeDetectorRef","ChangeDetectorRef","label","input","ngDevMode","undefined","debugName","_destroyed","Subject","_labelId","_connectionContainerRef","_controlNonStatic","_controlStatic","_control","_explicitFormFieldControl","_errorChildren","_labelChild","contentChild","_previousControl","_stateChanges","_valueChanges","_describedByChanges","getLabelId","computed","_hasLabel","ngAfterContentInit","_validateControlChild","ngAfterContentChecked","_initializeControl","ngOnDestroy","unsubscribe","next","complete","_shouldForward","prop","control","_hasErrors","length","_syncDescribedByIds","ids","push","split","map","error","setDescribedByIds","getConnectedOverlayOrigin","previousControl","classPrefix","classList","remove","add","pipe","startWith","subscribe","markForCheck","pairwise","filter","prevErrorState","prevDescribedBy","currentErrorState","currentDescribedBy","valueChanges","takeUntil","changes","Component","classPropertyName","publicName","isSignal","isRequired","transformFunction","queries","propertyName","first","predicate","descendants","static","viewQueries","exportAs","template","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","ViewChild","ContentChild","ContentChildren","SbbFormFieldModule","NgModule","ɵmod","ɵɵngDeclareNgModule","minVersion","version","type","imports","SbbCommonModule","exports","ɵinj","ɵɵngDeclareInjector"],"mappings":";;;;;;;MAeaA,SAAS,GAAG,IAAIC,cAAc,CAAW,UAAU;MAYnDC,QAAQ,CAAA;EACVC,EAAE,GAAWC,MAAM,CAACC,YAAY,CAAC,CAACC,KAAK,CAAC,YAAY,CAAC;AAG9DC,EAAAA,WAAAA,GAAA;IACE,MAAMC,QAAQ,GAAGJ,MAAM,CAAC,IA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