// Generated by dts-bundle-generator v9.5.1 declare class Awesomplete$1 { constructor(input: Element | HTMLElement | string, o?: Awesomplete$1.Options); static all: any[]; static $$(expr: string | ParentNode, con?: any): NodeList; static ITEM: (text: string, input: string) => HTMLElement; static $: { (expr: string | Element, con?: ParentNode): string | Element; regExpEscape(s: { replace(arg0: RegExp, arg1: string): void; }): any; create(tag: string, o: any): HTMLElement; fire(target: EventTarget, type: string, properties: any): any; siblingIndex(el: Element): number; }; static FILTER_STARTSWITH: (text: string, input: string) => boolean; static FILTER_CONTAINS: (text: string, input: string) => boolean; static SORT_BYLENGTH: (left: number | any[], right: number | any[]) => number; static REPLACE: (text: string) => void; static DATA: (item: Awesomplete$1.Suggestion) => Awesomplete$1.Suggestion; next: () => void; container: HTMLElement; select: (selected?: HTMLElement, originalTarget?: HTMLElement) => void; previous: () => void; index: number; opened: number; list: string | Element | Awesomplete$1.Suggestion[]; input: HTMLElement | string; goto: (i: number) => void; ul: HTMLElement; close: () => void; evaluate: () => void; selected: boolean; open: () => void; status: HTMLElement; destroy: () => void; } declare namespace Awesomplete$1 { type Suggestion = string | { label: string | any; value: string | any; } | [ string, string ]; type SortFunction = (left: number | any[], right: number | any[]) => number; interface Options { list?: string | string[] | Element | Array<{ label: string; value: any; }> | Array<[ string, string ]> | undefined; minChars?: number | undefined; maxItems?: number | undefined; autoFirst?: boolean | undefined; data?(item: Suggestion, input: string): string; filter?(text: string, input: string): boolean; sort?: boolean | SortFunction | undefined; item?(text: string, input: string, item_id: number): HTMLElement; replace?(suggestion: string | Suggestion): void; container?(input: HTMLElement): HTMLElement; } } /** * The value values for the "type" property of GeoJSON Objects. * https://tools.ietf.org/html/rfc7946#section-1.4 */ export type GeoJsonTypes = GeoJSON$1["type"]; /** * Bounding box * https://tools.ietf.org/html/rfc7946#section-5 */ export type BBox = [ number, number, number, number ] | [ number, number, number, number, number, number ]; /** * A Position is an array of coordinates. * https://tools.ietf.org/html/rfc7946#section-3.1.1 * Array should contain between two and three elements. * The previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values), * but the current specification only allows X, Y, and (optionally) Z to be defined. * * Note: the type will not be narrowed down to `[number, number] | [number, number, number]` due to * marginal benefits and the large impact of breaking change. * * See previous discussions on the type narrowing: * - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21590|Nov 2017} * - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/67773|Dec 2023} * - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/71441| Dec 2024} * * One can use a * {@link https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates|user-defined type guard that returns a type predicate} * to determine if a position is a 2D or 3D position. * * @example * import type { Position } from 'geojson'; * * type StrictPosition = [x: number, y: number] | [x: number, y: number, z: number] * * function isStrictPosition(position: Position): position is StrictPosition { * return position.length === 2 || position.length === 3 * }; * * let position: Position = [-116.91, 45.54]; * * let x: number; * let y: number; * let z: number | undefined; * * if (isStrictPosition(position)) { * // `tsc` would throw an error if we tried to destructure a fourth parameter * [x, y, z] = position; * } else { * throw new TypeError("Position is not a 2D or 3D point"); * } */ export type Position = number[]; /** * The base GeoJSON object. * https://tools.ietf.org/html/rfc7946#section-3 * The GeoJSON specification also allows foreign members * (https://tools.ietf.org/html/rfc7946#section-6.1) * Developers should use "&" type in TypeScript or extend the interface * to add these foreign members. */ export interface GeoJsonObject { // Don't include foreign members directly into this type def. // in order to preserve type safety. // [key: string]: any; /** * Specifies the type of GeoJSON object. */ type: GeoJsonTypes; /** * Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. * The value of the bbox member is an array of length 2*n where n is the number of dimensions * represented in the contained geometries, with all axes of the most southwesterly point * followed by all axes of the more northeasterly point. * The axes order of a bbox follows the axes order of geometries. * https://tools.ietf.org/html/rfc7946#section-5 */ bbox?: BBox | undefined; } type GeoJSON$1 = G | Feature | FeatureCollection; /** * Geometry object. * https://tools.ietf.org/html/rfc7946#section-3 */ export type Geometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | GeometryCollection; /** * Point geometry object. * https://tools.ietf.org/html/rfc7946#section-3.1.2 */ export interface Point extends GeoJsonObject { type: "Point"; coordinates: Position; } /** * MultiPoint geometry object. * https://tools.ietf.org/html/rfc7946#section-3.1.3 */ export interface MultiPoint extends GeoJsonObject { type: "MultiPoint"; coordinates: Position[]; } /** * LineString geometry object. * https://tools.ietf.org/html/rfc7946#section-3.1.4 */ export interface LineString extends GeoJsonObject { type: "LineString"; coordinates: Position[]; } /** * MultiLineString geometry object. * https://tools.ietf.org/html/rfc7946#section-3.1.5 */ export interface MultiLineString extends GeoJsonObject { type: "MultiLineString"; coordinates: Position[][]; } /** * Polygon geometry object. * https://tools.ietf.org/html/rfc7946#section-3.1.6 */ export interface Polygon extends GeoJsonObject { type: "Polygon"; coordinates: Position[][]; } /** * MultiPolygon geometry object. * https://tools.ietf.org/html/rfc7946#section-3.1.7 */ export interface MultiPolygon extends GeoJsonObject { type: "MultiPolygon"; coordinates: Position[][][]; } /** * Geometry Collection * https://tools.ietf.org/html/rfc7946#section-3.1.8 */ export interface GeometryCollection extends GeoJsonObject { type: "GeometryCollection"; geometries: G[]; } export type GeoJsonProperties = { [name: string]: any; } | null; /** * A feature object which contains a geometry and associated properties. * https://tools.ietf.org/html/rfc7946#section-3.2 */ export interface Feature extends GeoJsonObject { type: "Feature"; /** * The feature's geometry */ geometry: G; /** * A value that uniquely identifies this feature in a * https://tools.ietf.org/html/rfc7946#section-3.2. */ id?: string | number | undefined; /** * Properties associated with this feature. */ properties: P; } /** * A collection of feature objects. * https://tools.ietf.org/html/rfc7946#section-3.3 */ export interface FeatureCollection extends GeoJsonObject { type: "FeatureCollection"; features: Array>; } declare class LatLng { constructor(latitude: number, longitude: number, altitude?: number); equals(otherLatLng: LatLngExpression, maxMargin?: number): boolean; toString(): string; distanceTo(otherLatLng: LatLngExpression): number; wrap(): LatLng; toBounds(sizeInMeters: number): LatLngBounds; clone(): LatLng; lat: number; lng: number; alt?: number | undefined; } export interface LatLngLiteral { lat: number; lng: number; alt?: number; } export type LatLngTuple = [ number, number, number? ]; export type LatLngExpression = LatLng | LatLngLiteral | LatLngTuple; declare class LatLngBounds { constructor(southWest: LatLngExpression, northEast: LatLngExpression); constructor(latlngs: LatLngBoundsLiteral); extend(latlngOrBounds: LatLngExpression | LatLngBoundsExpression): this; pad(bufferRatio: number): LatLngBounds; // Returns a new LatLngBounds getCenter(): LatLng; getSouthWest(): LatLng; getNorthEast(): LatLng; getNorthWest(): LatLng; getSouthEast(): LatLng; getWest(): number; getSouth(): number; getEast(): number; getNorth(): number; contains(otherBoundsOrLatLng: LatLngBoundsExpression | LatLngExpression): boolean; intersects(otherBounds: LatLngBoundsExpression): boolean; overlaps(otherBounds: LatLngBoundsExpression): boolean; toBBoxString(): string; equals(otherBounds: LatLngBoundsExpression, maxMargin?: number): boolean; isValid(): boolean; } export type LatLngBoundsLiteral = LatLngTuple[]; // Must be [LatLngTuple, LatLngTuple], cant't change because Map.setMaxBounds export type LatLngBoundsExpression = LatLngBounds | LatLngBoundsLiteral; export interface TypedEventTarget extends EventTarget { addEventListener(type: K, callback: (event: EventMap[K] extends Event ? EventMap[K] : never) => EventMap[K] extends Event ? void : never, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void; } declare abstract class EventTargetAdapter implements TypedEventTarget { private eventTarget; constructor(); addEventListener(type: K, callback: (event: TEventMap[K] extends Event ? TEventMap[K] : never) => TEventMap[K] extends Event ? void : never, options?: boolean | AddEventListenerOptions | undefined): void; addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions | undefined): void; dispatchEvent(event: Event): boolean; removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions | undefined): void; } export type ApiSourceUrl = string; export type ApiSourceCallback = (currentLocation?: Location | URL | { hostname?: string; protocol: "http:" | "https:"; }) => ApiSourceUrl; export type ApiSource = ApiSourceUrl | ApiSourceCallback; type LatLngBoundsLiteral$1 = LatLngTuple$1[]; type LatLngBoundsExpression$1 = LatLngBoundsLiteral$1; interface LatLngLiteral$1 { lat: number; lng: number; alt?: number; } type LatLngTuple$1 = [ number, number, number? ]; type LatLngExpression$1 = LatLngLiteral$1 | LatLngTuple$1; export interface SmartmapsGeolocationCoordinates extends Partial> { readonly latitude: number; readonly longitude: number; } export interface SmartmapsGeolocationPosition extends Partial> { readonly coords: SmartmapsGeolocationCoordinates; } export type SmartmapsPointExpression = LatLngExpression$1 | SmartmapsGeolocationCoordinates | SmartmapsGeolocationPosition; export interface SmartmapsBoundsLiteral { southWest: LatLngLiteral$1; northEast: LatLngLiteral$1; } export type SmartmapsBoundsExpression = LatLngBoundsExpression$1 | SmartmapsBoundsLiteral; export interface Settings { rootUrl: string; name?: string; channel?: string; } export interface AutocompleteOptionsBase { className?: string; suggestionItemAlign?: "rows" | "columns" | "auto"; url?: string; radius?: number; isoCountries?: string[]; isoLanguages?: string[]; positionIsFixed?: boolean; iconColor?: string; iconAltColor?: string; searchIconPosition?: "left" | "right" | "none"; enableSearchOnClick?: boolean; debug?: boolean; } export interface AutocompleteBase { options: Options; session: AutocompleteSession; isReady: boolean; center: LatLngLiteral | undefined; radius: number; bounds: SmartmapsBoundsLiteral | undefined; open(): void; close(): void; findAddress(query: RequestQuery, address: RequestQuery, done?: (data: unknown) => void): Promise> | void; whenReady(onReady?: (err?: Error) => void): void; setMap(map: unknown): void; updateMap(): void; removeMap(): void; setCenter(latlng: SmartmapsPointExpression, radius?: number): void; getCenter(): LatLngLiteral | undefined; setBounds(latLngBounds: SmartmapsBoundsExpression): void; getBounds(): LatLngBoundsExpression | undefined; } export type AutocompleteServiceProvider = "smartmaps" | "google"; export interface ApiServiceAddressItems { primaryLine: string; secondaryLine: string; } export interface ApiService { apiKey: string; initialize(session: AutocompleteSession, autocomplete: AutocompleteBase): Promise; fetch(query: RequestQuery): Promise>; createAddressItems(props: Partial): ApiServiceAddressItems; } export interface AutocompleteRequestQueryBase { Locales: string; Query: string; State?: string; District?: string; Zip?: string; City?: string; CityPart?: string; Street?: string; Count: number; AuthToken: string; UpperRightLat?: number; UpperRightLon?: number; LowerLeftLat?: number; LowerLeftLon?: number; } export interface AutocompleteSuggestionProperties { status: "Result" | "Empty" | "Aborted"; } export interface AutocompleteSuggestionCollection extends FeatureCollection { properties: AutocompleteSuggestionProperties; } declare class AutocompleteSession { private delay; private _lastUpdate; private _strategy; private _token; private _ready; currentUpdate: Promise; get token(): string; constructor(apiKey: string, provider: AutocompleteServiceProvider, delay?: number); update(): Promise; interval(): void; } export type SelectEvent = { text: { label: string; value: TValue; }; }; export interface ISelectCompleteStrategy { onSelect(geojson: FeatureCollection, event: SelectEvent, emitter?: EventTarget | EventTargetAdapter): F["properties"] | undefined; } declare class SelectByCoordsStrategy implements ISelectCompleteStrategy { private findByCoords; onSelect(geoJson: FeatureCollection, event: SelectEvent, emitter?: EventTarget | EventTargetAdapter): T["properties"] | undefined; } interface TypedEventTarget$1 extends EventTarget { addEventListener(type: K, callback: (event: EventMap[K] extends Event ? EventMap[K] : never) => EventMap[K] extends Event ? void : never, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void; } declare abstract class EventTargetAdapter$1 implements TypedEventTarget$1 { private eventTarget; constructor(); addEventListener(type: K, callback: (event: TEventMap[K] extends Event ? TEventMap[K] : never) => TEventMap[K] extends Event ? void : never, options?: boolean | AddEventListenerOptions | undefined): void; addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions | undefined): void; dispatchEvent(event: Event): boolean; removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions | undefined): void; } declare abstract class AutoComplete extends EventTargetAdapter$1 implements AutocompleteBase { protected api: ApiService; private selectStrategy?; options: Options; isReady: boolean; center: LatLngLiteral | undefined; radius: number; bounds: SmartmapsBoundsLiteral | undefined; session: AutocompleteSession; protected inputElement: HTMLInputElement; private map; private currentHandler; autocomplete: Awesomplete$1; constructor(element: string | HTMLInputElement, options: Options, api: ApiService, selectStrategy?: SelectByCoordsStrategy>); update(): void; open(): void; close(): void; findAddress(query: RequestQuery, address: RequestQuery, done?: (data: any) => void): Promise> | void; setMap(map: any): void; updateMap(): void; setCenter(latlng: SmartmapsPointExpression, radius?: number): void; setBounds(latLngBounds: SmartmapsBoundsExpression): void; getCenter(): LatLngLiteral | undefined; getBounds(): LatLngBoundsExpression | undefined; removeMap(): void; whenReady(onReady?: (err?: Error) => void): Promise | void; protected abstract fetch(query: RequestQuery): Promise>; protected abstract getSearchIcon(): string; protected abstract getPin(address: ResponseProperties | string): string; protected abstract getBrand(): string; protected abstract getClearIcon(): string; private isIgnoredKey; protected getSuggestionDirection(): string; protected setClassName(brandClassName: string): void; protected extractLatLng(latlng: unknown): void; protected extractBounds(bounds: unknown): void; private fitLongitude; private fitLatitude; private toRadians; private calcDistance; private formatToSuggestionItem; } export interface AutocompleteSettings extends Settings { authToken: string; onlineState?: "STAGING" | "DEV" | "ONLINE"; } declare class CustomClearEvent extends CustomEvent { static EventName: string; constructor(); } export type SearchButtonClickedEventDataOf = { selectedAddress: TProperties | undefined; query: string; }; declare class CustomSearchButtonClickedEvent extends CustomEvent> { static EventName: string; constructor(event: SearchButtonClickedEventDataOf, bubbles?: boolean); } export type SelectedEventDataOf = { geojson: Feature; properties: TResponse; value: string; }; declare class CustomSelectedEvent extends CustomEvent> { static EventName: string; constructor(event: SelectedEventDataOf, bubbles?: boolean); } export type SuggestionEventDataOf = { geojson: AutocompleteSuggestionCollection; propertiesList: TResponse[]; value: string; }; declare class CustomSuggestionEvent extends CustomEvent> { static EventName: string; constructor(event: SuggestionEventDataOf, bubbles?: boolean); static Empty(value: string): CustomSuggestionEvent; } export type EmptyEventData = { value: string; }; declare class CustomEmptyEvent extends CustomEvent { static EventName: string; constructor(event: EmptyEventData, bubbles?: boolean); } export type AutocompleteAddressFeature = Feature; export declare enum GeoEntityTypes { UNDEFINED = "UNDEFINED", AIRPORT = "AIRPORT", CITY = "CITY", CITY_WITH_ZIP = "CITY_WITH_ZIP", CITYPART = "CITYPART", CITYPART_WITH_ZIP = "CITYPART_WITH_ZIP", COUNTY = "COUNTY", COUNTRY = "COUNTRY", DISTRICT = "DISTRICT", NEIGHBOURHOOD = "NEIGHBOURHOOD", PARCEL_LOCKER = "PARCEL_LOCKER", STATE = "STATE", STREET = "STREET", STREET_WITHOUT_CITY = "STREET_WITHOUT_CITY", TRAIN_STATION = "TRAIN_STATION", ZIP = "ZIP", ISLAND = "ISLAND", VILLAGE = "VILLAGE", ATTRACTION = "ATTRACTION" } export interface ResponseProperties { city: string | null; cityPart: string | null; country: string; countryLongName: string; county: string | null; displayValue: string; district: string | null; geoEntityType: GeoEntityTypes; houseNo: string | null; importance: number; poi: string | null; neighbourhood: string | null; parcelLocker: string | null; state: string | null; street: string | null; village: string | null; zip: string | null; geometry?: Point | null; } export type AddressFeature = AutocompleteAddressFeature; export type PinType = "UNDEFINED" | "AIRPORT" | "CITY" | "CITY_WITH_ZIP" | "CITYPART" | "CITYPART_WITH_ZIP" | "COUNTY" | "COUNTRY" | "DISTRICT" | "NEIGHBOURHOOD" | "PARCEL_LOCKER" | "STATE" | "STREET" | "STREET_WITHOUT_CITY" | "TRAIN_STATION" | "ZIP" | "ISLAND" | "VILLAGE" | "ATTRACTION"; export type SearchIconPosition = "left" | "right" | "none"; export interface Pin { html: string; type?: PinType; width?: number; height?: number; color?: string; } export interface Filters { airport?: boolean; attraction?: boolean; city?: boolean; citypart?: boolean; county?: boolean; country?: boolean; district?: boolean; island?: boolean; neighborhood?: boolean; parcelLocker?: boolean; state?: boolean; street?: boolean; streetWithoutCity?: boolean; trainstation?: boolean; village?: boolean; zip?: boolean; zipCity?: boolean; zipCitypart?: boolean; } export interface AutocompleteOptions extends AutocompleteOptionsBase { dataType?: "json" | "msgpack"; showCountry?: boolean; showState?: boolean; showCounty?: boolean; showDistrict?: boolean; showZip?: boolean; showCityPart?: boolean; showVillage?: boolean; showNeighborhood?: boolean; showParcelLocker?: boolean; showStreet?: boolean; showPoi?: boolean; proximityBoost?: { enable: boolean; value?: number; radius?: number; }; boundingBoxBoost?: { enable: boolean; value?: number; }; inBoundingBox?: boolean; searchZip?: boolean; includeFilters?: Filters; excludeFilters?: Filters; pins?: Pin[]; iconColor?: string; textColor?: string; textAltColor?: string; primaryColor?: string; accentColor?: string; top?: number; searchIconPosition?: SearchIconPosition; enableSearchOnClick?: boolean; settingsOverrides?: Partial; } export type RequestQuery = AutocompleteRequestQueryBase; export type SearchButtonClickedEvent = CustomSearchButtonClickedEvent; export type SearchButtonClickedEventData = SearchButtonClickedEventDataOf; export type SelectedEvent = CustomSelectedEvent; export type SelectedEventData = SelectedEventDataOf; export type SuggestionEvent = CustomSuggestionEvent; export type SuggestionEventData = SuggestionEventDataOf; export interface SmartmapsAutocompleteEvents { selected: SelectedEvent; clear: CustomClearEvent; search: SearchButtonClickedEvent; ready: CustomEvent; suggestion: SuggestionEvent; empty: CustomEmptyEvent; } declare class SmartmapsAutocomplete extends AutoComplete { constructor(element: HTMLInputElement | string, apiKey: string, options?: Partial); fetch(query: RequestQuery): Promise>; protected getSearchIcon(): string; protected getBrand(): string; protected getClearIcon(): string; getPin(address: ResponseProperties | string): string; private textReplacement; private replacePinVariables; private formatRequestParams; } export declare function createAutocomplete(element: HTMLInputElement | string, apiKey: string, options?: AutocompleteOptions, apiSource?: ApiSource): Promise; export type SuggestionCollection = AutocompleteSuggestionCollection; export { SmartmapsAutocomplete as Autocomplete, }; export as namespace smartmaps.autocompleteService; export {};