{"version":3,"file":"odx-angular-cdk-autocomplete-control.mjs","sources":["../../../../libs/angular/cdk/autocomplete-control/src/lib/autocomplete-control.ts","../../../../libs/angular/cdk/autocomplete-control/src/lib/directives/highlight-search-result.directive.ts","../../../../libs/angular/cdk/autocomplete-control/src/lib/pipes/base-search-filter-pipe.ts","../../../../libs/angular/cdk/autocomplete-control/src/odx-angular-cdk-autocomplete-control.ts"],"sourcesContent":["import { ActiveDescendantKeyManager, Highlightable } from '@angular/cdk/a11y';\nimport {\n  AfterViewInit,\n  booleanAttribute,\n  ChangeDetectorRef,\n  computed,\n  Directive,\n  EventEmitter,\n  HostListener,\n  inject,\n  input,\n  Input,\n  Output,\n  QueryList,\n  Signal,\n  ViewChild,\n} from '@angular/core';\nimport { detectControllerChanges, StringifyFn } from '@odx/angular';\nimport { CustomFormControl, InputControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { OptionControl } from '@odx/angular/cdk/option-control';\nimport { DropdownDirective, DropdownOptions } from '@odx/angular/components/dropdown';\nimport { FormFieldComponent } from '@odx/angular/components/form-field';\nimport { injectElement, isFunction, untilDestroyed } from '@odx/angular/utils';\n\n/**\n * `AutocompleteControl` is a base directive to enhance an input field with autocomplete functionality,\n * providing keyboard navigation and selection for options displayed in a dropdown. It's designed to be extended\n * for specific implementations.\n * Extends `CustomFormControl` to provide form control behavior and state management.\n *\n * @see {CustomFormControl}\n *\n * This directive manages the open/close state of the dropdown, the loading state indication, and the interaction between\n * the autocomplete input and the dropdown options. It utilizes `ActiveDescendantKeyManager` for keyboard navigation among options.\n *\n * Extend this directive to create a fully functional autocomplete control tailored to your data type and UI requirements.\n *\n * @template T - The type of the items displayed in the autocomplete dropdown.\n */\n@Directive({\n  standalone: true,\n  host: {\n    '[class.is-open]': 'isOpen',\n    '[attr.aria-disabled]': 'isDisabled || null',\n  },\n})\nexport abstract class AutocompleteControl<T> extends CustomFormControl<T | null> implements AfterViewInit {\n  protected abstract readonly options?: QueryList<OptionControl<T>>;\n\n  protected readonly changeDetector = inject(ChangeDetectorRef);\n  protected readonly formField = inject(FormFieldComponent, { optional: true });\n  protected readonly takeUntilDestroyed = untilDestroyed();\n\n  protected keyManager?: ActiveDescendantKeyManager<Highlightable>;\n  protected smoothScrollEnabled = false;\n\n  @ViewChild(DropdownDirective)\n  protected readonly dropdown?: DropdownDirective;\n\n  public abstract searchField?: InputControlDirective;\n\n  public readonly element = injectElement();\n\n  public get dropdownReferenceElement(): HTMLElement {\n    return this.formField?.controlElement?.nativeElement ?? this.element?.nativeElement;\n  }\n\n  public get hasOptions(): boolean {\n    return !!this.options?.length;\n  }\n\n  public get isOpen(): boolean {\n    return !!this.dropdown?.isOpen;\n  }\n\n  /**\n   * When set to true, the dropdown will match the width of the host component.\n   *\n   * @type {boolean}\n   * @default false\n   */\n  public matchReferenceWidth = input(false, { transform: booleanAttribute });\n\n  /** Internal */\n  public readonly dropdownOptions: Signal<Partial<DropdownOptions>> = computed(() => ({\n    matchReferenceWidth: this.matchReferenceWidth(),\n    offset: 4,\n    outerPadding: 10,\n    position: 'bottom-start',\n  }));\n\n  /**\n   * Indicates whether the component is in a loading state, used to show a loading spinner.\n   * @type {boolean}\n   * @default false\n   */\n  @Input({ transform: booleanAttribute })\n  public isLoading = false;\n\n  /**\n   * A function that converts an item of type T to a string representation.\n   * Used by the AutocompleteControl component to display the selected item.\n   *\n   * @type {StringifyFn<T>}\n   *\n   * @example\n   * ```ts\n   * // Define a stringify function for a custom type Person\n   * const stringifyPerson: StringifyFn<Person> = (person) => `${person.firstName} ${person.lastName}`;\n   *\n   * // Assign the stringify function to the AutocompleteControl\n   * autocompleteControl.stringify = stringifyPerson;\n   * ```\n   */\n  @Input()\n  public stringify?: StringifyFn<T>;\n\n  /**\n   * Emits the selected option when an option is selected from the dropdown.\n   *\n   * @emits {T} - The selected option.\n   *\n   * @example\n   * ```ts\n   * autocompleteControl.optionSelected.subscribe((selectedOption) => {\n   *   console.log('Selected option:', selectedOption);\n   * });\n   * ```\n   */\n  @Output()\n  public optionSelected = new EventEmitter<T>();\n\n  /**\n   * Event emitted before the dropdown opens.\n   * @emits {void}\n   *\n   * @example\n   * ```html\n   * <odx-select (beforeDropdownOpen)=\"onBeforeDropdownOpen()\">\n   * </odx-select>\n   * ```\n   */\n  @Output()\n  public beforeDropdownOpen = new EventEmitter<void>();\n\n  /**\n   * Event emitted after the dropdown opened.\n   *\n   * @emits {void}\n   *\n   * @example\n   * ```html\n   * <odx-select (afterDropdownOpen)=\"onAfterDropdownOpen()\">\n   * </odx-select>\n   * ```\n   */\n  @Output()\n  public afterDropdownOpen = new EventEmitter<void>();\n\n  /**\n   * Event emitted before the dropdown closes.\n   *\n   * @emits {void}\n   *\n   * @example\n   * ```html\n   * <odx-select (beforeDropdownClose)=\"onBeforeDropdownClose()\">\n   * </odx-select>\n   * ```\n   */\n  @Output()\n  public beforeDropdownClose = new EventEmitter<void>();\n\n  /**\n   * Event emitted after the dropdown closed.\n   *\n   * @emits {void}\n   *\n   * @example\n   * ```html\n   * <odx-select (afterDropdownClose)=\"onAfterDropdownClose()\">\n   * </odx-select>\n   * ```\n   */\n  @Output()\n  public afterDropdownClose = new EventEmitter<void>();\n\n  constructor() {\n    super(null);\n    detectControllerChanges(this).subscribe();\n  }\n\n  public ngAfterViewInit(): void {\n    if (!this.options) return;\n\n    this.initKeyManager(this.options.toArray());\n    this.handleQueryListOption(this.options);\n    this.handleSearchFieldChanges();\n  }\n\n  /**\n   * Scrolls the specified option element into view.\n   * @param {OptionControl<T>} option - The option control containing the element to scroll into view.\n   * @returns {void}\n   *\n   * @example\n   * ```ts\n   * const optionControl: OptionControl<string> = { element: myOptionElement };\n   * scrollOptionIntoView(optionControl);\n   * ```\n   */\n  public scrollOptionIntoView({ element }: OptionControl<T>): void {\n    const behavior = this.smoothScrollEnabled ? 'smooth' : undefined;\n    if (isFunction(element.nativeElement.scrollIntoView)) {\n      element.nativeElement.scrollIntoView({ block: 'center', behavior });\n    }\n  }\n\n  protected abstract handleQueryListOption(options: QueryList<OptionControl<T>>): void;\n\n  protected abstract handleSearchFieldChanges(): void;\n\n  protected abstract activateSelectedOption(): void;\n\n  protected initKeyManager(options: Highlightable[]): void {\n    this.keyManager = new ActiveDescendantKeyManager<Highlightable>(options).withHomeAndEnd();\n  }\n\n  protected disableSmoothScroll(): void {\n    this.smoothScrollEnabled = false;\n  }\n\n  protected enableSmoothScroll(): void {\n    this.smoothScrollEnabled = true;\n  }\n\n  protected openDropdown(): void {\n    this.dropdown?.open();\n  }\n\n  protected closeDropdown(): void {\n    this.dropdown?.close();\n  }\n\n  protected onDropdownOpen(): void {\n    this.beforeDropdownOpen.emit();\n    this.activateSelectedOption();\n  }\n\n  protected onDropdownOpened(): void {\n    this.afterDropdownOpen.emit();\n    this.enableSmoothScroll();\n  }\n\n  protected onDropdownClose(): void {\n    this.beforeDropdownClose.emit();\n    this.disableSmoothScroll();\n  }\n\n  protected onDropdownClosed(): void {\n    this.afterDropdownClose.emit();\n  }\n\n  @HostListener('focusout', ['$event'])\n  protected handleFocusOut(event: FocusEvent): void {\n    if (this.isOpen) {\n      event.stopImmediatePropagation();\n    }\n    this.onTouched();\n  }\n}\n","import { computed, Directive, inject, input, SecurityContext } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n@Directive({\n  selector: 'odx-highlight',\n  standalone: true,\n  host: {\n    '[innerHTML]': 'highlightedText()',\n  },\n})\nexport class HighlightSearchDirective {\n  private readonly sanitizer = inject(DomSanitizer);\n\n  protected highlightedText = computed(() => {\n    const search = this.odxHighlightSearch().trim();\n    const text = this.sanitizer.sanitize(SecurityContext.HTML, this.text()) ?? '';\n\n    if (!search) {\n      return text;\n    }\n\n    const regex = new RegExp(search.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), 'gi');\n    const highlightedText = text.replace(regex, '<mark>$&</mark>');\n\n    return this.sanitizer.bypassSecurityTrustHtml(highlightedText);\n  });\n\n  /**\n   * Search string\n   * @required\n   * @type string\n   */\n  public odxHighlightSearch = input.required<string>();\n\n  /**\n   * Text to highlight\n   * @required\n   * @type string\n   */\n  public text = input.required<string>();\n}\n","import { inject, InjectionToken, PipeTransform } from '@angular/core';\nimport { ODX_STRINGIFY, ODX_STRING_SEARCH_HANDLER, StringifyFn, StringSearchHandler } from '@odx/angular';\nimport { InputControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { isFunction, Pure } from '@odx/angular/utils';\n\ninterface HostController {\n  searchField?: InputControlDirective;\n  stringify?: StringifyFn<unknown>;\n}\n\ninterface SearchFilterPipeOptions<T> {\n  searchHandler?: StringSearchHandler;\n  stringify?: StringifyFn<T>;\n}\n\nexport const ODX_SEARCH_FILTER_HOST = new InjectionToken<HostController>('@odx/angular/cdk/autocomplete-control::SearchFilterHost');\n\nexport abstract class BaseSearchFilterPipe implements PipeTransform {\n  private readonly stringSearchHandler = inject(ODX_STRING_SEARCH_HANDLER);\n  private readonly defaultStringify = inject(ODX_STRINGIFY);\n  protected readonly hostController = inject(ODX_SEARCH_FILTER_HOST, { optional: true });\n\n  protected get searchField(): InputControlDirective | undefined {\n    return this.hostController?.searchField;\n  }\n\n  protected get stringify(): StringifyFn<unknown> {\n    return this.hostController?.stringify ?? this.defaultStringify;\n  }\n\n  public transform<T>(items: T[] | null, optionsOrHandler?: SearchFilterPipeOptions<T> | StringSearchHandler): T[] | null {\n    const searchHandler = this.isStringSearchHandler(optionsOrHandler) ? optionsOrHandler : optionsOrHandler?.searchHandler;\n    const stringify = this.isStringSearchHandler(optionsOrHandler) ? null : optionsOrHandler?.stringify;\n    if (this.searchField) {\n      return this.filter(items, this.searchField.nativeElementValue, stringify ?? (this.stringify as never), searchHandler ?? this.stringSearchHandler);\n    }\n    return items;\n  }\n\n  protected queryHandler(query: string): string {\n    return query?.trim() || '';\n  }\n\n  @Pure\n  private filter<T>(items: T[] | null, query: string, stringify: StringifyFn<T>, searchHandler: StringSearchHandler): T[] | null {\n    if (!items) return null;\n\n    query = this.queryHandler(query);\n\n    if (query === '') return items;\n\n    return items.filter((item) => searchHandler(stringify(item), query));\n  }\n\n  private isStringSearchHandler<T>(optionsOrHandler?: SearchFilterPipeOptions<T> | StringSearchHandler): optionsOrHandler is StringSearchHandler {\n    return isFunction(optionsOrHandler);\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAwBA;;;;;;;;;;;;;;AAcG;AAQG,MAAgB,mBAAuB,SAAQ,iBAA2B,CAAA;AAiB9E,IAAA,IAAW,wBAAwB,GAAA;AACjC,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,cAAc,EAAE,aAAa,IAAI,IAAI,CAAC,OAAO,EAAE,aAAa;IACrF;AAEA,IAAA,IAAW,UAAU,GAAA;AACnB,QAAA,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM;IAC/B;AAEA,IAAA,IAAW,MAAM,GAAA;AACf,QAAA,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM;IAChC;AAkHA,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,IAAI,CAAC;AA3IM,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAC1C,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC1D,IAAA,CAAA,kBAAkB,GAAG,cAAc,EAAE;QAG9C,IAAA,CAAA,mBAAmB,GAAG,KAAK;QAOrB,IAAA,CAAA,OAAO,GAAG,aAAa,EAAE;AAczC;;;;;AAKG;QACI,IAAA,CAAA,mBAAmB,GAAG,KAAK,CAAC,KAAK,2FAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAG1D,QAAA,IAAA,CAAA,eAAe,GAAqC,QAAQ,CAAC,OAAO;AAClF,YAAA,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE;AAC/C,YAAA,MAAM,EAAE,CAAC;AACT,YAAA,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