{"version":3,"file":"input.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/input/input-errors.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/input/input-value-accessor.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/input/input.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/input/input.module.ts"],"sourcesContent":["/** @docs-private */\nexport function getSbbInputUnsupportedTypeError(type: string): Error {\n  return Error(`Input type \"${type}\" isn't supported by sbbInput.`);\n}\n","import { InjectionToken, WritableSignal } from '@angular/core';\n\n/**\n * This token is used to inject the object whose value should be set into `InputDirective`.\n * If none is provided, the native `HTMLInputElement` is used. Directives can provide\n * themselves for this token, in order to make `InputDirective` delegate the getting and setting of the\n * value to them.\n */\nexport const SBB_INPUT_VALUE_ACCESSOR = new InjectionToken<{ value: any | WritableSignal<any> }>(\n  'SBB_INPUT_VALUE_ACCESSOR',\n);\n","import { _IdGenerator } from '@angular/cdk/a11y';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { getSupportedInputTypes, Platform } from '@angular/cdk/platform';\nimport { AutofillMonitor } from '@angular/cdk/text-field';\nimport {\n  AfterViewInit,\n  Directive,\n  DoCheck,\n  effect,\n  ElementRef,\n  HostListener,\n  inject,\n  Input,\n  isSignal,\n  NgZone,\n  numberAttribute,\n  OnChanges,\n  OnDestroy,\n  WritableSignal,\n} from '@angular/core';\nimport { FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport { SbbErrorStateMatcher, _ErrorStateTracker } from '@sbb-esta/angular/core';\nimport { SbbFormFieldControl } from '@sbb-esta/angular/form-field';\nimport { Subject } from 'rxjs';\n\nimport { getSbbInputUnsupportedTypeError } from './input-errors';\nimport { SBB_INPUT_VALUE_ACCESSOR } from './input-value-accessor';\n\nconst SBB_INPUT_INVALID_TYPES = [\n  'button',\n  'checkbox',\n  'file',\n  'hidden',\n  'image',\n  'radio',\n  'range',\n  'reset',\n  'submit',\n];\n\n/** Directive that allows a native input to work inside a `SbbFormField`. */\n@Directive({\n  selector: 'input[sbbInput], select[sbbInput], textarea[sbbInput]',\n  exportAs: 'sbbInput',\n  host: {\n    class: 'sbb-input-element',\n    // Native input properties that are overwritten by Angular inputs need to be synced with\n    // the native input element. Otherwise property bindings for those don't work.\n    '[attr.id]': 'id',\n    '[disabled]': 'disabled',\n    '[required]': 'required',\n    '[attr.name]': 'name || null',\n    '[attr.readonly]': 'readonly && !_isNativeSelect || null',\n    // Only mark the input as invalid for assistive technology if it has a value since the\n    // state usually overlaps with `aria-required` when the input is empty and can be redundant.\n    '[attr.aria-invalid]': '(empty && required) ? null : errorState',\n    '[attr.aria-required]': 'required',\n    '[attr.placeholder]': `!readonly ? (placeholder || null) : '-'`,\n    '[attr.tabindex]': `empty && readonly ? -1  : tabIndex`,\n  },\n  providers: [{ provide: SbbFormFieldControl, useExisting: SbbInput }],\n})\nexport class SbbInput\n  implements SbbFormFieldControl<any>, AfterViewInit, OnChanges, DoCheck, OnDestroy\n{\n  private _elementRef =\n    inject<ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>>(ElementRef);\n  private _platform = inject(Platform);\n  private _autofillMonitor = inject(AutofillMonitor);\n  private _previousNativeValue: any;\n  private _inputValueAccessor!: { value: any };\n  private _signalBasedValueAccessor?: { value: WritableSignal<any> };\n  private _errorStateTracker: _ErrorStateTracker;\n  ngControl: NgControl = inject(NgControl, { optional: true, self: true })!;\n\n  /** Whether the component is a native html select. */\n  readonly _isNativeSelect: boolean;\n\n  /** Whether the component is a textarea. */\n  readonly _isTextarea: boolean;\n\n  /**\n   * Implemented as part of SbbFormFieldControl.\n   * @docs-private\n   */\n  focused: boolean = false;\n\n  /**\n   * Implemented as part of SbbFormFieldControl.\n   * @docs-private\n   */\n  controlType: string = 'sbb-input';\n\n  /**\n   * Implemented as part of SbbFormFieldControl.\n   * @docs-private\n   */\n  autofilled: boolean = false;\n\n  /**\n   * Implemented as part of SbbFormFieldControl.\n   * @docs-private\n   */\n  stateChanges: Subject<void> = new Subject<void>();\n\n  /**\n   * Implemented as part of SbbFormFieldControl.\n   * @docs-private\n   */\n  @Input()\n  get disabled(): boolean {\n    if (this.ngControl && this.ngControl.disabled !== null) {\n      return this.ngControl.disabled;\n    }\n    return this._disabled;\n  }\n  set disabled(value: BooleanInput) {\n    this._disabled = coerceBooleanProperty(value);\n\n    // Browsers may not fire the blur event if the input is disabled too quickly.\n    // Reset from here to ensure that the element doesn't become stuck.\n    if (this.focused) {\n      this.focused = false;\n      this.stateChanges.next();\n    }\n  }\n  private _disabled = false;\n\n  /**\n   * Implemented as part of SbbFormFieldControl.\n   * @docs-private\n   */\n  @Input() id: string = inject(_IdGenerator).getId('sbb-native-input-');\n\n  /**\n   * Implemented as part of SbbFormFieldControl.\n   * @docs-private\n   */\n  @Input() placeholder!: string;\n\n  /**\n   * Name of the input.\n   * @docs-private\n   */\n  @Input() name!: string;\n\n  /**\n   * Implemented as part of SbbFormFieldControl.\n   * @docs-private\n   */\n  @Input()\n  get required(): boolean {\n    return this._required;\n  }\n  set required(value: BooleanInput) {\n    this._required = coerceBooleanProperty(value);\n  }\n  private _required = false;\n\n  /** Input type of the element. */\n  @Input()\n  get type(): string {\n    return this._type;\n  }\n  set type(value: string) {\n    this._type = value || 'text';\n    this._validateType();\n\n    // When using Angular inputs, developers are no longer able to set the properties on the native\n    // input element. To ensure that bindings for `type` work, we need to sync the setter\n    // with the native property. Textarea elements don't support the type property or attribute.\n    if (!this._isTextarea && getSupportedInputTypes().has(this._type)) {\n      (this._elementRef.nativeElement as HTMLInputElement).type = this._type;\n    }\n  }\n  private _type = 'text';\n\n  /** An object used to control when error messages are shown. */\n  @Input()\n  get errorStateMatcher() {\n    return this._errorStateTracker.matcher;\n  }\n  set errorStateMatcher(value: SbbErrorStateMatcher) {\n    this._errorStateTracker.matcher = value;\n  }\n\n  /**\n   * Implemented as part of SbbFormFieldControl.\n   * @docs-private\n   */\n  @Input('aria-describedby') userAriaDescribedBy!: string;\n\n  /**\n   * Implemented as part of SbbFormFieldControl.\n   * @docs-private\n   */\n  @Input()\n  get value(): string {\n    return this._signalBasedValueAccessor\n      ? this._signalBasedValueAccessor.value()\n      : this._inputValueAccessor.value;\n  }\n  // Accept `any` to avoid conflicts with other directives on `<input>` that may\n  // accept different types.\n  set value(value: any) {\n    if (value !== this.value) {\n      if (this._signalBasedValueAccessor) {\n        this._signalBasedValueAccessor.value.set(value);\n      } else {\n        this._inputValueAccessor.value = value;\n      }\n      this.stateChanges.next();\n    }\n  }\n\n  /** Whether the element is readonly. */\n  @Input()\n  get readonly(): boolean {\n    return this._readonly;\n  }\n  set readonly(value: BooleanInput) {\n    this._readonly = coerceBooleanProperty(value);\n  }\n  private _readonly = false;\n  /** Tab index of the input. */\n  @Input({\n    transform: (value: unknown) => (value == null ? undefined : numberAttribute(value)),\n  })\n  tabIndex!: number;\n\n  /** Whether the input is in an error state. */\n  get errorState() {\n    return this._errorStateTracker.errorState;\n  }\n  set errorState(value: boolean) {\n    this._errorStateTracker.errorState = value;\n  }\n\n  /**\n   * Implemented as part of SbbFormFieldControl.\n   * @docs-private\n   */\n  get empty(): boolean {\n    return (\n      !this._isNeverEmpty() &&\n      !this._elementRef.nativeElement.value &&\n      !this._isBadInput() &&\n      !this.autofilled\n    );\n  }\n\n  private _neverEmptyInputTypes = [\n    'date',\n    'datetime',\n    'datetime-local',\n    'month',\n    'time',\n    'week',\n  ].filter((t) => getSupportedInputTypes().has(t));\n\n  constructor(...args: unknown[]);\n  constructor() {\n    const parentForm = inject(NgForm, { optional: true })!;\n    const parentFormGroup = inject(FormGroupDirective, { optional: true })!;\n    const defaultErrorStateMatcher = inject(SbbErrorStateMatcher);\n    const accessor = inject(SBB_INPUT_VALUE_ACCESSOR, { optional: true, self: true })!;\n    const ngZone = inject(NgZone);\n\n    const element = this._elementRef.nativeElement;\n    const nodeName = element.nodeName.toLowerCase();\n\n    if (accessor) {\n      if (isSignal(accessor.value)) {\n        this._signalBasedValueAccessor = accessor;\n      } else {\n        this._inputValueAccessor = accessor;\n      }\n    } else {\n      // If no input value accessor was explicitly specified, use the element as the input value\n      // accessor.\n      this._inputValueAccessor = element;\n    }\n\n    this._previousNativeValue = this.value;\n\n    // On some versions of iOS the caret gets stuck in the wrong place when holding down the delete\n    // key. In order to get around this we need to \"jiggle\" the caret loose. Since this bug only\n    // exists on iOS, we only bother to install the listener on iOS.\n    if (this._platform.IOS) {\n      ngZone.runOutsideAngular(() => {\n        this._elementRef.nativeElement.addEventListener('keyup', this._iOSKeyupListener);\n      });\n    }\n    this._errorStateTracker = new _ErrorStateTracker(\n      defaultErrorStateMatcher,\n      this.ngControl,\n      parentFormGroup,\n      parentForm,\n      this.stateChanges,\n    );\n    this._isNativeSelect = nodeName === 'select';\n    this._isTextarea = nodeName === 'textarea';\n\n    if (this._isNativeSelect) {\n      this.controlType = (element as HTMLSelectElement).multiple\n        ? 'sbb-native-select-multiple'\n        : 'sbb-native-select';\n    }\n\n    if (this._signalBasedValueAccessor) {\n      effect(() => {\n        // Read the value so the effect can register the dependency.\n        this._signalBasedValueAccessor!.value();\n        this.stateChanges.next();\n      });\n    }\n  }\n\n  ngAfterViewInit() {\n    if (this._platform.isBrowser) {\n      this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe((event) => {\n        this.autofilled = event.isAutofilled;\n        this.stateChanges.next();\n      });\n    }\n\n    if (this._platform.IOS) {\n      this._elementRef.nativeElement.removeEventListener('keyup', this._iOSKeyupListener);\n    }\n  }\n\n  ngOnChanges() {\n    this.stateChanges.next();\n  }\n\n  ngOnDestroy() {\n    this.stateChanges.complete();\n\n    if (this._platform.isBrowser) {\n      this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);\n    }\n  }\n\n  ngDoCheck() {\n    if (this.ngControl) {\n      // We need to re-evaluate this on every change detection cycle, because there are some\n      // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n      // that whatever logic is in here has to be super lean or we risk destroying the performance.\n      this.updateErrorState();\n    }\n\n    // We need to dirty-check the native element's value, because there are some cases where\n    // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n    // updating the value using `emitEvent: false`).\n    this._dirtyCheckNativeValue();\n  }\n\n  /** Focuses the input. */\n  focus(options?: FocusOptions): void {\n    this._elementRef.nativeElement.focus(options);\n  }\n\n  /** Refreshes the error state of the input. */\n  updateErrorState() {\n    this._errorStateTracker.updateErrorState();\n  }\n\n  /** Callback for the cases where the focused state of the input changes. */\n  @HostListener('focus', ['true'])\n  @HostListener('blur', ['false'])\n  _focusChanged(isFocused: boolean) {\n    if (isFocused !== this.focused) {\n      this.focused = isFocused;\n      this.stateChanges.next();\n    }\n  }\n\n  /** Does some manual dirty checking on the native input `value` property. */\n  private _dirtyCheckNativeValue() {\n    const newValue = this._elementRef.nativeElement.value;\n\n    if (this._previousNativeValue !== newValue) {\n      this._previousNativeValue = newValue;\n      this.stateChanges.next();\n    }\n  }\n\n  /** Make sure the input is a supported type. */\n  private _validateType() {\n    if (\n      SBB_INPUT_INVALID_TYPES.indexOf(this._type) > -1 &&\n      (typeof ngDevMode === 'undefined' || ngDevMode)\n    ) {\n      throw getSbbInputUnsupportedTypeError(this._type);\n    }\n  }\n\n  /** Checks whether the input type is one of the types that are never empty. */\n  private _isNeverEmpty() {\n    return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n  }\n\n  /** Checks whether the input is invalid based on the native validation. */\n  private _isBadInput() {\n    // The `validity` property won't be present on platform-server.\n    const validity = (this._elementRef.nativeElement as HTMLInputElement).validity;\n    return validity && validity.badInput;\n  }\n\n  /**\n   * Implemented as part of SbbFormFieldControl.\n   * @docs-private\n   */\n  setDescribedByIds(ids: string[]) {\n    if (ids.length) {\n      this._elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));\n    } else {\n      this._elementRef.nativeElement.removeAttribute('aria-describedby');\n    }\n  }\n\n  /**\n   * Implemented as part of SbbFormFieldControl.\n   * @docs-private\n   */\n  onContainerClick() {\n    // Do not re-focus the input element if the element is already focused. Otherwise it can happen\n    // that someone clicks on a time input and the cursor resets to the \"hours\" field while the\n    // \"minutes\" field was actually clicked. See: https://github.com/angular/components/issues/12849\n    if (!this.focused) {\n      this.focus();\n    }\n  }\n\n  private _iOSKeyupListener = (event: Event): void => {\n    const el = event.target as HTMLInputElement;\n\n    // Note: We specifically check for 0, rather than `!el.selectionStart`, because the two\n    // indicate different things. If the value is 0, it means that the caret is at the start\n    // of the input, whereas a value of `null` means that the input doesn't support\n    // manipulating the selection range. Inputs that don't support setting the selection range\n    // will throw an error so we want to avoid calling `setSelectionRange` on them. See:\n    // https://html.spec.whatwg.org/multipage/input.html#do-not-apply\n    if (!el.value && el.selectionStart === 0 && el.selectionEnd === 0) {\n      // Note: Just setting `0, 0` doesn't fix the issue. Setting\n      // `1, 1` fixes it for the first time that you type text and\n      // then hold delete. Toggling to `1, 1` and then back to\n      // `0, 0` seems to completely fix it.\n      el.setSelectionRange(1, 1);\n      el.setSelectionRange(0, 0);\n    }\n  };\n}\n","import { TextFieldModule } from '@angular/cdk/text-field';\nimport { NgModule } from '@angular/core';\nimport { SbbCommonModule } from '@sbb-esta/angular/core';\nimport { SbbFormFieldModule } from '@sbb-esta/angular/form-field';\n\nimport { SbbInput } from './input';\n\n@NgModule({\n  imports: [TextFieldModule, SbbCommonModule, SbbFormFieldModule, SbbInput],\n  exports: [\n    TextFieldModule,\n    // We re-export the `SbbFormFieldModule` since `SbbInput` will almost always\n    // be used together with `SbbFormField`.\n    SbbFormFieldModule,\n    SbbInput,\n  ],\n})\nexport class SbbInputModule {}\n"],"names":[],"mappings":";;;;;;;;;;;AACM,SAAU,+BAA+B,CAAC,IAAY,EAAA;AAC1D,EAAA,OAAO,KAAK,CAAC,CAAA,YAAA,EAAe,IAAI,gCAAgC,CAAC;AACnE;;MCKa,wBAAwB,GAAG,IAAI,cAAc,CACxD,0BAA0B;;ACmB5B,MAAM,uBAAuB,GAAG,CAC9B,QAAQ,EACR,UAA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