@zalari/ngx-geoautocomplete
Version:
angular 6+ compatible google autocomplete with server side api support and AOT enabled
71 lines (70 loc) • 2.4 kB
TypeScript
import { EventEmitter, OnChanges, OnInit } from '@angular/core';
import { GlobalRef } from './windowRef.service';
import { AutoCompleteSearchService } from './auto-complete.service';
export interface Settings {
geoPredictionServerUrl?: string;
geoLatLangServiceUrl?: string;
geoLocDetailServerUrl?: string;
geoCountryRestriction?: any;
geoTypes?: any;
geoLocation?: any;
geoRadius?: number;
serverResponseListHierarchy?: any;
serverResponseatLangHierarchy?: any;
serverResponseDetailHierarchy?: any;
resOnSearchButtonClickOnly?: boolean;
useGoogleGeoApi?: boolean;
inputPlaceholderText?: string;
inputString?: string;
showSearchButton?: boolean;
showRecentSearch?: boolean;
showCurrentLocation?: boolean;
recentStorageName?: string;
noOfRecentSearchSave?: number;
currentLocIconUrl?: string;
searchIconUrl?: string;
locationIconUrl?: string;
}
export declare class AutoCompleteComponent implements OnInit, OnChanges {
private _global;
private _autoCompleteSearchService;
private _platformId;
userSettings: Settings;
componentCallback: EventEmitter<any>;
locationInput: string;
gettingCurrentLocationFlag: boolean;
dropdownOpen: boolean;
recentDropdownOpen: boolean;
queryItems: any;
isSettingsError: boolean;
settingsErrorMsg: string;
settings: Settings;
private moduleinit;
private selectedDataIndex;
private recentSearchData;
private userSelectedOption;
private defaultSettings;
private _containerRef;
constructor(_global: GlobalRef, _autoCompleteSearchService: AutoCompleteSearchService, _platformId: Object | null);
ngOnInit(): any;
ngOnChanges(): any;
searchinputClickCallback(event: any): any;
searchinputCallback(event: any): any;
activeListNode(index: number): any;
selectedListNode(index: number): any;
closeAutocomplete(event: MouseEvent): void;
userQuerySubmit(selectedOption?: any): any;
currentLocationSelected(): any;
private moduleInit;
private processSearchQuery;
private setUserSettings;
private getListQuery;
private extractServerList;
private updateListItem;
private showRecentSearch;
private navigateInList;
private getCurrentLocationInfo;
private getPlaceLocationInfo;
private setRecentLocation;
private getRecentLocations;
}