UNPKG

@geoapify/react-geocoder-autocomplete

Version:

React component for the Geoapify Geocoder Autocomplete field

63 lines (62 loc) 5.11 kB
import React from "react"; import { GeocoderAutocomplete, LocationType, SupportedLanguage, GeoPosition, CountyCode, ByCountryCodeOptions, ByCircleOptions, ByRectOptions, ByProximityOptions, Category, ItemType } from '@geoapify/geocoder-autocomplete'; export declare const GeoapifyApiKey: React.Context<string>; export declare const GeoapifyContext: (props: any) => React.JSX.Element; export interface GeoapifyGeocoderAutocompleteOptions { value?: string; type?: LocationType; lang?: SupportedLanguage; limit?: number; placeholder?: string; filterByCountryCode?: ByCountryCodeOptions; filterByPlace?: string; filterByCircle?: ByCircleOptions; filterByRect?: ByRectOptions; biasByCountryCode?: ByCountryCodeOptions; biasByCircle?: ByCircleOptions; biasByRect?: ByRectOptions; biasByProximity?: ByProximityOptions; position?: GeoPosition; countryCodes?: CountyCode[]; debounceDelay?: number; skipIcons?: boolean; addDetails?: boolean; skipSelectionOnArrowKey?: boolean; allowNonVerifiedHouseNumber?: boolean; allowNonVerifiedStreet?: boolean; addCategorySearch?: boolean; showPlacesByCategoryList?: boolean; hidePlacesByCategoryListAfterSelect?: boolean; enablePlacesByCategoryLazyLoading?: boolean; placesByCategoryLimit?: number; placesByCategoryFilter?: { [key: string]: ByCircleOptions | ByRectOptions | string; }; placesByCategoryBias?: { [key: string]: ByCircleOptions | ByRectOptions | ByProximityOptions; }; sendPlacesByCategoryRequestFunc?: (category: string[], offset: number, geocoderAutocomplete: GeocoderAutocomplete) => Promise<any>; placeSelect?: (value: any) => void; suggestionsChange?: (value: any) => void; preprocessHook?: (value: string) => string; postprocessHook?: (feature: any) => string; suggestionsFilter?: (suggestions: any[]) => any[]; sendGeocoderRequestFunc?: (value: string, geocoderAutocomplete: GeocoderAutocomplete) => Promise<any>; sendPlaceDetailsRequestFunc?: (feature: any, geocoderAutocomplete: GeocoderAutocomplete) => Promise<any>; onUserInput?: (input: string) => void; onOpen?: (opened: boolean) => void; onClose?: (opened: boolean) => void; onRequestStart?: (value: string) => void; onRequestEnd?: (success: boolean, data?: any, error?: any) => void; onPlacesByCategoryChange?: (places: any[]) => void; onPlacesByCategoryRequestStart?: (category: Category) => void; onPlacesByCategoryRequestEnd?: (success: boolean, data?: any, error?: any) => void; onPlaceDetailsRequestStart?: (feature: any) => void; onPlaceDetailsRequestEnd?: (success: boolean, data?: any, error?: any) => void; onPlaceByCategorySelect?: (value: { place: any; index: number; }) => void; onClear?: (type: ItemType) => void; } export declare const GeoapifyGeocoderAutocomplete: ({ placeholder: placeholderValue, type: typeValue, lang: langValue, limit: limitValue, value: valueValue, filterByCountryCode: filterByCountryCodeValue, filterByCircle: filterByCircleValue, filterByRect: filterByRectValue, filterByPlace: filterByPlaceValue, biasByCountryCode: biasByCountryCodeValue, biasByCircle: biasByCircleValue, biasByRect: biasByRectValue, biasByProximity: biasByProximityValue, position: positionValue, countryCodes: countryCodesValue, debounceDelay: debounceDelayValue, skipIcons: skipIconsValue, skipSelectionOnArrowKey: skipSelectionOnArrowKeyValue, allowNonVerifiedHouseNumber: allowNonVerifiedHouseNumberValue, allowNonVerifiedStreet: allowNonVerifiedStreetValue, addDetails: addDetailsValue, addCategorySearch: addCategorySearchValue, showPlacesByCategoryList: showPlacesByCategoryListValue, hidePlacesByCategoryListAfterSelect: hidePlacesByCategoryListAfterSelectValue, enablePlacesByCategoryLazyLoading: enablePlacesByCategoryLazyLoadingValue, placesByCategoryLimit: placesByCategoryLimitValue, placesByCategoryFilter: placesByCategoryFilterValue, placesByCategoryBias: placesByCategoryBiasValue, sendPlacesByCategoryRequestFunc: sendPlacesByCategoryRequestFuncValue, preprocessHook: preprocessHookValue, postprocessHook: postprocessHookValue, suggestionsFilter: suggestionsFilterValue, sendGeocoderRequestFunc: sendGeocoderRequestFuncValue, sendPlaceDetailsRequestFunc: sendPlaceDetailsRequestFuncValue, placeSelect: placeSelectCallback, suggestionsChange: suggestionsChangeCallback, onUserInput: userInputCallback, onOpen: openCallback, onClose: closeCallback, onRequestStart: requestStartCallback, onRequestEnd: requestEndCallback, onPlacesByCategoryChange: placesByCategoryChangeCallback, onPlacesByCategoryRequestStart: placesByCategoryRequestStartCallback, onPlacesByCategoryRequestEnd: placesByCategoryRequestEndCallback, onPlaceDetailsRequestStart: placeDetailsRequestStartCallback, onPlaceDetailsRequestEnd: placeDetailsRequestEndCallback, onPlaceByCategorySelect: placeByCategorySelectCallback, onClear: clearCallback, }: GeoapifyGeocoderAutocompleteOptions) => React.JSX.Element;