UNPKG

ngx-autocom-place

Version:

Angular GoogleMaps Places Api Autocomplete Directive

34 lines (33 loc) 1.5 kB
/// <reference types="googlemaps" /> import { EventEmitter, ElementRef, OnInit, OnDestroy } from '@angular/core'; import { NgxAutocomPlaceService } from './ngx-autocom-place.service'; import { Subscription } from 'rxjs'; export interface AutocomplaceOptions extends google.maps.places.AutocompleteOptions { input?: string; } export declare class NgxAutocomPlaceDirective implements OnInit, OnDestroy { el: ElementRef; ngxAutocomplaceService: NgxAutocomPlaceService; points: any[]; selectedPlace: EventEmitter<google.maps.places.PlaceResult>; predictions: EventEmitter<google.maps.places.AutocompletePrediction[]>; options: AutocomplaceOptions; handleEnterKeydown: boolean; hideResultDropdown: boolean; debounceTime: number; results: google.maps.places.AutocompletePrediction[]; resultPacContainer: HTMLElement; downArrowIndex: number; inputElement: HTMLInputElement; inputSubscription: Subscription; constructor(el: ElementRef, ngxAutocomplaceService: NgxAutocomPlaceService); ngOnInit(): Promise<void>; createPacContainer(input: any, results: google.maps.places.AutocompletePrediction[]): void; createPacItem(placeId: string, mainText: string, secondaryText: string, matchMainOffset: number): HTMLDivElement; getPlaceDetails(placeId: string): void; blurEvent(): void; inputEvent(_e: any): void; keydownEvent(e: any): void; removePacItems(): void; ngOnDestroy(): void; }