/* eslint-disable */ /* tslint:disable */ /** * This is an autogenerated file created by the Stencil compiler. * It contains typing information for all components that exist in this project. */ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime"; import { ApiVersion, Coordinates, LocationJsonResponse } from "@what3words/api"; import { Variant } from "./lib/constants"; import { CoordinatesPayload, CustomOption, InputValuePayload, SuggestionPayload, SuggestionsPayload } from "./components/what3words-autosuggest/domain"; import { GoogleMapsLibraries, MapProviderName, ThreeWordAddress } from "./components/what3words-map/domain"; import { ViewType } from "./components/what3words-map/providers/abstract"; import { W3wAddressFormat } from "./components/what3words-notes/domain"; export { ApiVersion, Coordinates, LocationJsonResponse } from "@what3words/api"; export { Variant } from "./lib/constants"; export { CoordinatesPayload, CustomOption, InputValuePayload, SuggestionPayload, SuggestionsPayload } from "./components/what3words-autosuggest/domain"; export { GoogleMapsLibraries, MapProviderName, ThreeWordAddress } from "./components/what3words-map/domain"; export { ViewType } from "./components/what3words-map/providers/abstract"; export { W3wAddressFormat } from "./components/what3words-notes/domain"; export namespace Components { interface What3wordsAddress { "iconColor": string; "link": boolean; "showTooltip": boolean; "size": number; "target": string; "textColor": string; "tooltip": boolean; "tooltipLocation": string; "words": string; } interface What3wordsAutosuggest { "api_key": string; "api_version": ApiVersion; "autosuggest_focus": string; "base_url": string; "callback": string; "clip_to_bounding_box": string; "clip_to_circle": string; "clip_to_country": string; "clip_to_polygon": string; "headers": string; "initial_value": string; "invalid_address_error_message": string | null; "language"?: string; "n_focus_results"?: number; "name": string; "options": CustomOption[]; "return_coordinates": boolean; "strict": boolean; "typeahead_delay": number; "variant": Variant; } interface What3wordsMap { "api_key": string; "api_version": ApiVersion; "base_url": string; "clearGrid": () => Promise; "current_location"?: boolean; "current_location_control_position": number; "disable_default_ui"?: boolean; "fullscreen_control"?: boolean; "fullscreen_control_position": number; "getBounds": () => Promise; "getLat": () => Promise; "getLng": () => Promise; "getZoom": () => Promise; "headers": string; /** * Passed to the maps provider sdk. Also used as the default w3w language. Cross-compatible language support is not guaranteed between the map provider and w3w sdks. w3w language default behavior can be overridden by setting the what3words-autosuggest language prop to a supported language. See https://developers.google.com/maps/faq#languagesupport See https://developer.what3words.com/public-api/docs#available-languages */ "language": string; /** * Latitude value used on initial map render. Defaults to What3Words HQ latitude. */ "lat": number; "libraries": GoogleMapsLibraries; /** * Longitude value used on initial map render. Defaults to What3Words HQ longitude. */ "lng": number; "map_api_key": string; "map_provider": MapProviderName; "map_type_control"?: boolean; "map_type_control_position": number; "map_type_id"?: ViewType; "marker_icon": string; "panTo": (coordinates: Coordinates) => Promise; "region": string; /** * Reset map level zoom to selected_zoom after panning to user-selected autosuggest suggestion */ "reset_zoom_on_select"?: boolean; "rotate_control"?: boolean; "rotate_control_position": number; "scale_control"?: boolean; "search_control_position": number; "selected_zoom": number; "setApiKey": (key: string) => Promise; "setApiVersion": (api_version: ApiVersion) => Promise; "setBaseUrl": (host: string) => Promise; "setCoordinates": (newCoordinateValue: number, _oldCoordinateValue: number, propName: string) => Promise; "setHeaders": (value: string) => Promise; "setMapTypeId": (map_type_id: ViewType) => Promise; "setWords": (words: string) => Promise; "setZoom": (zoom: number) => Promise; "street_view_control"?: boolean; "street_view_control_position": number; "tilt": number; "version": string; "watch_location"?: boolean; /** * The three word address to load after initial map render. If empty, map will remain at the provided/default lat, lng values */ "words": string; "zoom": number; "zoom_control"?: boolean; "zoom_control_position": number; } interface What3wordsNotes { /** * The format to display the what3words address in - `slashes` - e.g. `///filled.count.soap` (default) - `url` - e.g. `https://w3w.co/filled.count.soap` * @default slashes */ "addressFormat": W3wAddressFormat; /** * The what3words API key to use for the what3words API requests */ "apiKey": string; /** * The API version to use for the what3words API requests * @default "v3" */ "apiVersion": ApiVersion; /** * The base URL for the what3words API requests */ "baseUrl": string; /** * The callback function to execute when the component is loaded */ "callback": string; /** * Clip the results to a specific bounding box * @example "51.521,-0.205,51.576,-0.105" */ "clipToBoundingBox": string; /** * Clip the results to a specific circle * @example "51.521,-0.205,1000" */ "clipToCircle": string; /** * Clip the results to a specific country * @example "GB" */ "clipToCountry": string; /** * Clip the results to a specific polygon * @example "51.521,-0.205,51.576,-0.105,51.576,-0.205" */ "clipToPolygon": string; /** * The headers to include in the what3words API requests */ "headers": string; /** * The language to return the results in * @example "en" */ "language": string; /** * The number of results to return * @default 3 */ "nFocusResults": number; /** * The focus point to prioritize results around. If not provided, the user's current location is used. * @example "51.5412,-0.2477" */ "searchFocus"?: `${number},${number}`; /** * Show the what3words hints tooltip when clicking on the what3words status icon * @default true */ "showHintsTooltip": boolean; /** * The delay in milliseconds to wait after the user has finished typing before making an autosuggest request * @default 300 */ "typeaheadDelay": number; } interface What3wordsSymbol { "color": string; "size": number; } } export interface What3wordsAutosuggestCustomEvent extends CustomEvent { detail: T; target: HTMLWhat3wordsAutosuggestElement; } export interface What3wordsMapCustomEvent extends CustomEvent { detail: T; target: HTMLWhat3wordsMapElement; } export interface What3wordsNotesCustomEvent extends CustomEvent { detail: T; target: HTMLWhat3wordsNotesElement; } declare global { interface HTMLWhat3wordsAddressElement extends Components.What3wordsAddress, HTMLStencilElement { } var HTMLWhat3wordsAddressElement: { prototype: HTMLWhat3wordsAddressElement; new (): HTMLWhat3wordsAddressElement; }; interface HTMLWhat3wordsAutosuggestElementEventMap { "value_changed": InputValuePayload; "value_valid": InputValuePayload; "value_invalid": InputValuePayload; "selected_suggestion": SuggestionPayload; "suggestions_changed": SuggestionsPayload; "suggestions_not_found": void; "coordinates_changed": CoordinatesPayload; "selected_custom_option": CustomOption; "deselected_suggestion": SuggestionPayload; "__hover": SuggestionPayload; "__focus": void; "__blur": void; "__error": { error: Error }; } interface HTMLWhat3wordsAutosuggestElement extends Components.What3wordsAutosuggest, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLWhat3wordsAutosuggestElement, ev: What3wordsAutosuggestCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLWhat3wordsAutosuggestElement, ev: What3wordsAutosuggestCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLWhat3wordsAutosuggestElement: { prototype: HTMLWhat3wordsAutosuggestElement; new (): HTMLWhat3wordsAutosuggestElement; }; interface HTMLWhat3wordsMapElementEventMap { "selected_square": ThreeWordAddress; "coordinates_changed": Coordinates; "__load": void; "__error": { error: ErrorEvent }; } interface HTMLWhat3wordsMapElement extends Components.What3wordsMap, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLWhat3wordsMapElement, ev: What3wordsMapCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLWhat3wordsMapElement, ev: What3wordsMapCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLWhat3wordsMapElement: { prototype: HTMLWhat3wordsMapElement; new (): HTMLWhat3wordsMapElement; }; interface HTMLWhat3wordsNotesElementEventMap { "valueChanged": InputValuePayload; "valueValid": InputValuePayload; "valueInvalid": InputValuePayload; "suggestionSelected": SuggestionPayload; "suggestionsChanged": SuggestionsPayload; "suggestionHover": SuggestionPayload; "apiError": { error: Error | null }; } interface HTMLWhat3wordsNotesElement extends Components.What3wordsNotes, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLWhat3wordsNotesElement, ev: What3wordsNotesCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLWhat3wordsNotesElement, ev: What3wordsNotesCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLWhat3wordsNotesElement: { prototype: HTMLWhat3wordsNotesElement; new (): HTMLWhat3wordsNotesElement; }; interface HTMLWhat3wordsSymbolElement extends Components.What3wordsSymbol, HTMLStencilElement { } var HTMLWhat3wordsSymbolElement: { prototype: HTMLWhat3wordsSymbolElement; new (): HTMLWhat3wordsSymbolElement; }; interface HTMLElementTagNameMap { "what3words-address": HTMLWhat3wordsAddressElement; "what3words-autosuggest": HTMLWhat3wordsAutosuggestElement; "what3words-map": HTMLWhat3wordsMapElement; "what3words-notes": HTMLWhat3wordsNotesElement; "what3words-symbol": HTMLWhat3wordsSymbolElement; } } declare namespace LocalJSX { interface What3wordsAddress { "iconColor"?: string; "link"?: boolean; "showTooltip"?: boolean; "size"?: number; "target"?: string; "textColor"?: string; "tooltip"?: boolean; "tooltipLocation"?: string; "words"?: string; } interface What3wordsAutosuggest { "api_key"?: string; "api_version"?: ApiVersion; "autosuggest_focus"?: string; "base_url"?: string; "callback"?: string; "clip_to_bounding_box"?: string; "clip_to_circle"?: string; "clip_to_country"?: string; "clip_to_polygon"?: string; "headers"?: string; "initial_value"?: string; "invalid_address_error_message"?: string | null; "language"?: string; "n_focus_results"?: number; "name"?: string; "onCoordinates_changed"?: (event: What3wordsAutosuggestCustomEvent) => void; "onDeselected_suggestion"?: (event: What3wordsAutosuggestCustomEvent) => void; "onSelected_custom_option"?: (event: What3wordsAutosuggestCustomEvent) => void; "onSelected_suggestion"?: (event: What3wordsAutosuggestCustomEvent) => void; "onSuggestions_changed"?: (event: What3wordsAutosuggestCustomEvent) => void; "onSuggestions_not_found"?: (event: What3wordsAutosuggestCustomEvent) => void; "onValue_changed"?: (event: What3wordsAutosuggestCustomEvent) => void; "onValue_invalid"?: (event: What3wordsAutosuggestCustomEvent) => void; "onValue_valid"?: (event: What3wordsAutosuggestCustomEvent) => void; "on__blur"?: (event: What3wordsAutosuggestCustomEvent) => void; "on__error"?: (event: What3wordsAutosuggestCustomEvent<{ error: Error }>) => void; "on__focus"?: (event: What3wordsAutosuggestCustomEvent) => void; "on__hover"?: (event: What3wordsAutosuggestCustomEvent) => void; "options"?: CustomOption[]; "return_coordinates"?: boolean; "strict"?: boolean; "typeahead_delay"?: number; "variant"?: Variant; } interface What3wordsMap { "api_key"?: string; "api_version"?: ApiVersion; "base_url"?: string; "current_location"?: boolean; "current_location_control_position"?: number; "disable_default_ui"?: boolean; "fullscreen_control"?: boolean; "fullscreen_control_position"?: number; "headers"?: string; /** * Passed to the maps provider sdk. Also used as the default w3w language. Cross-compatible language support is not guaranteed between the map provider and w3w sdks. w3w language default behavior can be overridden by setting the what3words-autosuggest language prop to a supported language. See https://developers.google.com/maps/faq#languagesupport See https://developer.what3words.com/public-api/docs#available-languages */ "language"?: string; /** * Latitude value used on initial map render. Defaults to What3Words HQ latitude. */ "lat"?: number; "libraries"?: GoogleMapsLibraries; /** * Longitude value used on initial map render. Defaults to What3Words HQ longitude. */ "lng"?: number; "map_api_key"?: string; "map_provider"?: MapProviderName; "map_type_control"?: boolean; "map_type_control_position"?: number; "map_type_id"?: ViewType; "marker_icon"?: string; "onCoordinates_changed"?: (event: What3wordsMapCustomEvent) => void; "onSelected_square"?: (event: What3wordsMapCustomEvent) => void; "on__error"?: (event: What3wordsMapCustomEvent<{ error: ErrorEvent }>) => void; "on__load"?: (event: What3wordsMapCustomEvent) => void; "region"?: string; /** * Reset map level zoom to selected_zoom after panning to user-selected autosuggest suggestion */ "reset_zoom_on_select"?: boolean; "rotate_control"?: boolean; "rotate_control_position"?: number; "scale_control"?: boolean; "search_control_position"?: number; "selected_zoom"?: number; "street_view_control"?: boolean; "street_view_control_position"?: number; "tilt"?: number; "version"?: string; "watch_location"?: boolean; /** * The three word address to load after initial map render. If empty, map will remain at the provided/default lat, lng values */ "words"?: string; "zoom"?: number; "zoom_control"?: boolean; "zoom_control_position"?: number; } interface What3wordsNotes { /** * The format to display the what3words address in - `slashes` - e.g. `///filled.count.soap` (default) - `url` - e.g. `https://w3w.co/filled.count.soap` * @default slashes */ "addressFormat"?: W3wAddressFormat; /** * The what3words API key to use for the what3words API requests */ "apiKey"?: string; /** * The API version to use for the what3words API requests * @default "v3" */ "apiVersion"?: ApiVersion; /** * The base URL for the what3words API requests */ "baseUrl"?: string; /** * The callback function to execute when the component is loaded */ "callback"?: string; /** * Clip the results to a specific bounding box * @example "51.521,-0.205,51.576,-0.105" */ "clipToBoundingBox"?: string; /** * Clip the results to a specific circle * @example "51.521,-0.205,1000" */ "clipToCircle"?: string; /** * Clip the results to a specific country * @example "GB" */ "clipToCountry"?: string; /** * Clip the results to a specific polygon * @example "51.521,-0.205,51.576,-0.105,51.576,-0.205" */ "clipToPolygon"?: string; /** * The headers to include in the what3words API requests */ "headers"?: string; /** * The language to return the results in * @example "en" */ "language"?: string; /** * The number of results to return * @default 3 */ "nFocusResults"?: number; /** * Emitted when a what3words API error occurs */ "onApiError"?: (event: What3wordsNotesCustomEvent<{ error: Error | null }>) => void; /** * Emitted when a suggestion is hovered over */ "onSuggestionHover"?: (event: What3wordsNotesCustomEvent) => void; /** * Emitted when a suggestion is selected * @example { suggestion: { words: "filled.count.soap", [...] } } */ "onSuggestionSelected"?: (event: What3wordsNotesCustomEvent) => void; /** * Emitted when the suggestions change */ "onSuggestionsChanged"?: (event: What3wordsNotesCustomEvent) => void; /** * Emitted when the input value changes * @example { value: "filled.count.s" } */ "onValueChanged"?: (event: What3wordsNotesCustomEvent) => void; /** * Emitted when the input value is not a valid what3words address * @example { value: "filled,count,s" } */ "onValueInvalid"?: (event: What3wordsNotesCustomEvent) => void; /** * Emitted when the input value is a valid what3words address * @example { value: "filled.count.soap" } */ "onValueValid"?: (event: What3wordsNotesCustomEvent) => void; /** * The focus point to prioritize results around. If not provided, the user's current location is used. * @example "51.5412,-0.2477" */ "searchFocus"?: `${number},${number}`; /** * Show the what3words hints tooltip when clicking on the what3words status icon * @default true */ "showHintsTooltip"?: boolean; /** * The delay in milliseconds to wait after the user has finished typing before making an autosuggest request * @default 300 */ "typeaheadDelay"?: number; } interface What3wordsSymbol { "color"?: string; "size"?: number; } interface IntrinsicElements { "what3words-address": What3wordsAddress; "what3words-autosuggest": What3wordsAutosuggest; "what3words-map": What3wordsMap; "what3words-notes": What3wordsNotes; "what3words-symbol": What3wordsSymbol; } } export { LocalJSX as JSX }; declare module "@stencil/core" { export namespace JSX { interface IntrinsicElements { "what3words-address": LocalJSX.What3wordsAddress & JSXBase.HTMLAttributes; "what3words-autosuggest": LocalJSX.What3wordsAutosuggest & JSXBase.HTMLAttributes; "what3words-map": LocalJSX.What3wordsMap & JSXBase.HTMLAttributes; "what3words-notes": LocalJSX.What3wordsNotes & JSXBase.HTMLAttributes; "what3words-symbol": LocalJSX.What3wordsSymbol & JSXBase.HTMLAttributes; } } }