{"version":3,"file":"allianz-ng-aquila-code-input.mjs","names":["i2.NxCodeInputIntl"],"sources":["../../../projects/ng-aquila/src/code-input/code-input-intl.ts","../../../projects/ng-aquila/src/code-input/code-input.component.ts","../../../projects/ng-aquila/src/code-input/code-input.component.html","../../../projects/ng-aquila/src/code-input/code-input.module.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class NxCodeInputIntl {\n  /**\n   * Stream that emits whenever the labels here are changed. Use this to notify\n   * components if the labels have changed after initialization.\n   */\n  readonly changes = new Subject<void>();\n\n  /** Label that should replace the 'Enter key' of the aria-label. */\n  inputFieldAriaLabel = 'Enter Key';\n\n  /** Label that should replace the 'of' of the aria-label. */\n  ofLabel?: string = 'of';\n}\n","import { NxErrorComponent } from '@allianz/ng-aquila/base';\nimport { ErrorStateMatcher } from '@allianz/ng-aquila/utils';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n  BACKSPACE,\n  DOWN_ARROW,\n  LEFT_ARROW,\n  RIGHT_ARROW,\n  SPACE,\n  UP_ARROW,\n} from '@angular/cdk/keycodes';\nimport { NgClass } from '@angular/common';\nimport {\n  booleanAttribute,\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  ContentChild,\n  DoCheck,\n  ElementRef,\n  Input,\n  input,\n  Optional,\n  Self,\n} from '@angular/core';\nimport {\n  ControlValueAccessor,\n  FormControl,\n  FormGroupDirective,\n  FormsModule,\n  NgControl,\n  NgForm,\n} from '@angular/forms';\n\nimport { NxCodeInputIntl } from './code-input-intl';\n\nconst DEFAULT_INPUT_LENGTH = 6;\nconst TAG_NAME_INPUT = 'INPUT';\nconst AUTO_UPPERCASE = 'upper';\nconst AUTO_LOWERCASE = 'lower';\nconst INPUT_FIELD_GAP = 'nx-code-input--field-with-gap';\nexport type NxConversionTypes = 'lower' | 'upper';\nexport type NxCodeInputMode = 'text' | 'numeric' | 'decimal' | 'tel';\n\n@Component({\n  selector: 'nx-code-input',\n  templateUrl: 'code-input.component.html',\n  styleUrls: ['code-input.scss'],\n  host: {\n    '[class.nx-code-input]': 'true',\n    '[class.has-error]': 'errorState',\n    '[class.is-negative]': 'negative || inverse()',\n    '[class.is-disabled]': 'disabled',\n    '[attr.tabindex]': '-1',\n    role: 'group',\n    '[attr.aria-describedby]': 'error?.id || null',\n    '[attr.aria-label]': '_intl.inputFieldAriaLabel',\n  },\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [FormsModule, NgClass],\n})\nexport class NxCodeInputComponent implements ControlValueAccessor, DoCheck {\n  @ContentChild(NxErrorComponent) error!: NxErrorComponent;\n\n  /** Whether the current input of the component has an error. */\n  errorState = false;\n\n  /** The length of the code input. Default: 6. */\n  @Input('length') set codeLength(value: number) {\n    this._codeLength = value;\n    this.setInputLength();\n  }\n  get codeLength() {\n    return this._codeLength;\n  }\n  private _codeLength: number = DEFAULT_INPUT_LENGTH;\n\n  /**\n   * The type of HTML input.\n   * @deprecated Use `inputMode` to control the mobile keyboard and `digitsOnly` to restrict the\n   * entry to digits instead, especially instead of `type=\"number\"`, which has several\n   * limitations (e.g. no text selection). Kept for backwards compatibility.\n   */\n  @Input() set type(value: string) {\n    this._type = value;\n  }\n  get type() {\n    return this._type;\n  }\n  private _type = 'text';\n\n  /**\n   * The inputmode of the input elements, controlling e.g. which mobile keyboard is shown.\n   * Unset by default, so the browser derives it from the native `type` attribute instead.\n   */\n  readonly inputMode = input<NxCodeInputMode>();\n\n  /** Whether non-digit characters should be stripped from the entered value. */\n  readonly digitsOnly = input(false, { transform: booleanAttribute });\n\n  /** Sets the tabindex of the contained input elements. */\n  @Input() set tabindex(value: number) {\n    this._tabindex = value;\n  }\n  get tabindex(): number {\n    return this._tabindex;\n  }\n  private _tabindex = 0;\n\n  /** Whether the form should auto capitalize or lowercase (optional). */\n  @Input() set convertTo(value: NxConversionTypes) {\n    this._convertTo = value;\n  }\n  get convertTo() {\n    return this._convertTo!;\n  }\n  private _convertTo?: NxConversionTypes;\n\n  /** The user input in array form */\n  _keyCode: string[] = new Array(DEFAULT_INPUT_LENGTH).fill('');\n  private _focused = false;\n\n  /** Whether the code input should use negative styling. This will be deprecated in favor of `inverse`. */\n  @Input() set negative(value: BooleanInput) {\n    const newValue = coerceBooleanProperty(value);\n    if (this._negative !== newValue) {\n      this._negative = newValue;\n    }\n  }\n  get negative() {\n    return this._negative;\n  }\n  private _negative = false;\n\n  /** Whether the code input should use negative styling. */\n  readonly inverse = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n  /** Whether the code input is disabled. */\n  @Input() set disabled(value: BooleanInput) {\n    const newValue = coerceBooleanProperty(value);\n    if (this._disabled !== newValue) {\n      this._disabled = newValue;\n    }\n  }\n  get disabled() {\n    return this._disabled;\n  }\n  private _disabled = false;\n\n  private _isUpDown = false;\n\n  constructor(\n    private readonly _cdr: ChangeDetectorRef,\n    private readonly _el: ElementRef,\n    @Optional() @Self() readonly _control: NgControl | null,\n    readonly _intl: NxCodeInputIntl,\n    private readonly _errorStateMatcher: ErrorStateMatcher,\n    @Optional() private readonly _parentForm: NgForm | null,\n    @Optional() private readonly _parentFormGroup: FormGroupDirective | null,\n  ) {\n    if (this._control) {\n      // Note: we provide the value accessor through here, instead of\n      // the `providers` to avoid running into a circular import.\n      this._control.valueAccessor = this;\n    }\n  }\n  ngDoCheck(): void {\n    if (this._control) {\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\n  /** Sets the length of the input fields. */\n  setInputLength(): void {\n    if (this.codeLength) {\n      this._keyCode = new Array(this.codeLength);\n    } else {\n      this._keyCode = new Array(DEFAULT_INPUT_LENGTH);\n    }\n    this._keyCode.fill('');\n  }\n\n  /** Converts to upper or lowercase when enabled. */\n  _convertLetterSize(value: any): string {\n    if (value === 'ß') {\n      return value;\n    }\n\n    if (typeof value === 'string') {\n      if (this.convertTo === AUTO_UPPERCASE) {\n        return value.toUpperCase();\n      } else if (this.convertTo === AUTO_LOWERCASE) {\n        return value.toLowerCase();\n      }\n\n      return value;\n    }\n    return '';\n  }\n\n  /** Reacts to keydown event. */\n  _keydownAction(event: KeyboardEvent) {\n    const targetElement: HTMLInputElement = event.target as HTMLInputElement;\n    const previousInputField: HTMLInputElement =\n      targetElement.previousElementSibling as HTMLInputElement;\n    const nextInputField: HTMLInputElement = targetElement.nextElementSibling as HTMLInputElement;\n\n    switch (event.keyCode) {\n      case SPACE:\n        return false;\n\n      case BACKSPACE:\n        if (targetElement.value === '') {\n          if (previousInputField && previousInputField.tagName === TAG_NAME_INPUT) {\n            this.selectInput(previousInputField);\n          }\n        }\n        break;\n\n      case LEFT_ARROW:\n        if (previousInputField && previousInputField.tagName === TAG_NAME_INPUT) {\n          event.preventDefault();\n          this.selectInput(previousInputField);\n        }\n        break;\n\n      case RIGHT_ARROW:\n        if (nextInputField && nextInputField.tagName === TAG_NAME_INPUT) {\n          this.selectInput(nextInputField);\n        }\n        event.preventDefault();\n        break;\n\n      case DOWN_ARROW:\n        this._isUpDown = true;\n        if (\n          this._type === 'number' &&\n          (targetElement.value === '' || targetElement.value === '0')\n        ) {\n          event.preventDefault();\n        }\n        break;\n\n      case UP_ARROW:\n        this._isUpDown = true;\n        if (this._type === 'number' && targetElement.value === '9') {\n          event.preventDefault();\n        }\n        break;\n\n      default:\n        this.selectInput(targetElement);\n        break;\n    }\n    return true;\n  }\n\n  /** Selects the value on click of an input field. */\n  _selectText(event: Event): void {\n    this.selectInput(event.target as HTMLInputElement);\n    event.preventDefault();\n  }\n\n  /** Automatically focuses and selects the next input on key input. */\n  _handleInput(event: Event): void {\n    const eventTarget: HTMLInputElement = event.target as HTMLInputElement;\n\n    // some event types have the data property populated, e.g. \"inputType: insertCompositionText\"\n    // these type of events should be fired e.g. when using the clipboard on an android device\n    // so we can either use the data property or the target value as fallback\n    const eventData = (event as InputEvent).data?.trim() || eventTarget.value.trim();\n    const filterDigits = this.digitsOnly() || this.type === 'number';\n    const filteredData = filterDigits ? this._filterNumbers(eventData) : eventData;\n    const currentIndex = Number(this._getFocusedInputIndex(event));\n\n    this._setKeyCodes(currentIndex, filteredData);\n\n    // needed that we do not end up with multiple characters in one input field as\n    // we had to remove the maxlength=\"1\" attribute\n    eventTarget.value = this._keyCode[currentIndex] ?? '';\n    this.propagateChange(this._keyCode.join(''));\n\n    // don't jump to next input if the user uses UP/DOWN arrow (native behaviour)\n    const shouldMoveFocus = !(this._isUpDown && this.type === 'number');\n\n    if (filteredData && shouldMoveFocus) {\n      this.moveFocus(currentIndex, filteredData.length);\n    }\n\n    this._isUpDown = false;\n  }\n\n  private _setKeyCodes(start: number, value: string) {\n    if (value.length <= 1) {\n      this._keyCode[start] = this._convertLetterSize(value);\n    } else {\n      for (let i = start, valueIndex = 0; i < this.codeLength; i++, valueIndex++) {\n        this._keyCode[i] = this._convertLetterSize(value[valueIndex]?.[0] ?? '');\n        this._el.nativeElement.children[i].value = this._keyCode[i];\n      }\n    }\n  }\n\n  /** Focus the next input depending on the the currently focused index and the length of the value that gets added. */\n  private moveFocus(start: number, valueLength: number) {\n    if (start + valueLength < this.codeLength) {\n      this.selectInput(this._el.nativeElement.children.item(start + valueLength));\n    } else {\n      this._el.nativeElement.children.item(this.codeLength - 1).focus();\n    }\n  }\n\n  /** Returns the index of the code input, which is currently focused. */\n  private _getFocusedInputIndex(event: Event) {\n    let inputIndex;\n    for (let i = 0; i < this._el.nativeElement.children.length; i++) {\n      if (event.target === this._el.nativeElement.children.item(i)) {\n        inputIndex = i;\n      }\n    }\n    return inputIndex;\n  }\n\n  /** Removes all characters from the input except for numbers [0-9]. */\n  private _filterNumbers(value: string) {\n    let formattedInput = '';\n    for (const char of value) {\n      if (char.match(/\\d$/)) {\n        formattedInput += char;\n      }\n    }\n\n    return formattedInput;\n  }\n\n  /** Triggers when an input field is blurred. */\n  _onBlur(): void {\n    this._focused = false;\n    setTimeout(() => {\n      if (!this._focused) {\n        this.propagateTouch(this._keyCode.join(''));\n      }\n      this._cdr.markForCheck();\n    });\n  }\n\n  /** Sets _focused state and makes valid. */\n  _setFocusState(): void {\n    this._focused = true;\n  }\n\n  /**\n   * Disables the code input. Part of the ControlValueAccessor interface required\n   * to integrate with Angular's core forms API.\n   * @param isDisabled Sets whether the component is disabled.\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this.disabled = isDisabled;\n    this._cdr.markForCheck();\n  }\n\n  /** Sets initial value, used by ControlValueAccessor. */\n  writeValue(value: string): void {\n    if (value) {\n      const valueAsArray = value.split('').slice(0, this.codeLength);\n\n      for (let i = 0; i < this.codeLength; i++) {\n        this._keyCode[i] = valueAsArray[i];\n      }\n    } else {\n      this.setInputLength();\n    }\n\n    this._cdr.markForCheck();\n  }\n\n  _trackByKeyCode(index: number, item: string): number {\n    return index;\n  }\n\n  /** Adds a gap to input fields when appropriate. */\n  _inputGap(index: number): string {\n    switch (this.codeLength) {\n      case 4:\n      case 6:\n      case 8:\n        if (index === this.codeLength / 2) {\n          return INPUT_FIELD_GAP;\n        }\n        return '';\n\n      default:\n        return '';\n    }\n  }\n\n  /** @docs-private */\n  propagateChange = (_: any) => {};\n\n  /** @docs-private */\n  propagateTouch = (_: any) => {};\n\n  registerOnChange(fn: any) {\n    this.propagateChange = fn;\n  }\n\n  registerOnTouched(fn: any) {\n    this.propagateTouch = fn;\n  }\n\n  /** @docs-private */\n  updateErrorState() {\n    const oldState = this.errorState;\n    const parent = this._parentFormGroup || this._parentForm;\n    const control = this._control ? (this._control.control as FormControl) : null;\n    const newState = this._errorStateMatcher.isErrorState(control, parent);\n\n    if (newState !== oldState) {\n      this.errorState = newState;\n      this._cdr.markForCheck();\n    }\n  }\n\n  getAriaLabel(keyIndex: number) {\n    return `${keyIndex + 1} ${this._intl.ofLabel} ${this._keyCode.length}`;\n  }\n\n  /**\n   * Workaround preventing the selection error because the `setSelectionRange` is not supported on input['type=number']\n   * @docs-private\n   */\n  selectInput(input: HTMLInputElement) {\n    input.focus();\n    try {\n      input.setSelectionRange(0, input.value.length);\n    } catch (err) {\n      if (err instanceof DOMException && err.name === 'InvalidStateError') {\n        // setSelectionRange does not apply\n      } else {\n        throw err;\n      }\n    }\n  }\n}\n","@for (key of _keyCode; track _trackByKeyCode(i, key); let i = $index, first = $first) {\n  <input\n    class=\"nx-code-input__field\"\n    [ngModel]=\"_keyCode[i]\"\n    [ngModelOptions]=\"{ standalone: true }\"\n    [ngClass]=\"_inputGap(i)\"\n    [attr.aria-label]=\"getAriaLabel(i)\"\n    [attr.type]=\"type\"\n    [attr.inputmode]=\"inputMode()\"\n    (input)=\"_handleInput($event)\"\n    (blur)=\"_onBlur()\"\n    (focus)=\"_setFocusState()\"\n    (mousedown)=\"_selectText($event)\"\n    (keydown)=\"_keydownAction($event)\"\n    [attr.tabindex]=\"tabindex\"\n    [disabled]=\"disabled ? true : false\"\n    [attr.autocomplete]=\"first ? 'one-time-code' : null\"\n  />\n}\n@if (errorState) {\n  <ng-content select=\"nx-error\"></ng-content>\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { NxCodeInputComponent } from './code-input.component';\n\n@NgModule({\n  imports: [CommonModule, FormsModule, ReactiveFormsModule, NxCodeInputComponent],\n  exports: [NxCodeInputComponent],\n  providers: [],\n})\nexport class NxCodeInputModule {}\n"],"mappings":";;;;;;;;;;AAIA,IAAa,kBAAb,MAAa,gBAAe;CAD5B,cAAA;EAMW,KAAA,UAAU,IAAI,QAAO;EAG9B,KAAA,sBAAsB;EAGtB,KAAA,UAAmB;CACpB;CAZY;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAe,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAf;EAAA,KAAA,QAAA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