@what3words/javascript-components
Advanced tools
Comparing version 4.1.0-alpha.14 to 4.1.0-alpha.15
@@ -5,3 +5,3 @@ 'use strict'; | ||
const index = require('./index-4caabef5.js'); | ||
const index = require('./index-d41e3358.js'); | ||
@@ -8,0 +8,0 @@ |
@@ -6,5 +6,5 @@ 'use strict'; | ||
const index = require('./index-1c8042e8.js'); | ||
const appGlobals = require('./app-globals-ac0c644b.js'); | ||
require('./index-4caabef5.js'); | ||
require('./utils-9e92ad78.js'); | ||
const appGlobals = require('./app-globals-9e7f8549.js'); | ||
require('./index-d41e3358.js'); | ||
require('./utils-03bcc71b.js'); | ||
@@ -22,3 +22,3 @@ /* | ||
appGlobals.globalScripts(); | ||
return index.bootstrapLazy([["what3words-autosuggest_3.cjs",[[4,"what3words-autosuggest",{"callback":[1],"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"name":[1],"initial_value":[1025],"variant":[1],"typeahead_delay":[2],"invalid_address_error_message":[1],"strict":[4],"language":[1],"autosuggest_focus":[1],"n_focus_results":[2],"clip_to_country":[1],"clip_to_bounding_box":[1],"clip_to_circle":[1],"clip_to_polygon":[1],"return_coordinates":[4],"options":[16],"rawInput":[32],"value":[32],"input":[32],"latInput":[32],"lngInput":[32],"suggestions":[32],"selectedSuggestion":[32],"showSuggestions":[32],"hasFocus":[32],"latitude":[32],"longitude":[32],"apiRequest":[32],"loading":[32],"hoverIndex":[32],"error":[32],"errorTimeout":[32]},[[3,"value_changed","onValueChanged"],[3,"value_valid","onValueValid"],[0,"value_invalid","onValueInvalid"],[3,"suggestions_changed","onSuggestionsChanged"],[3,"selected_suggestion","onSelectedSuggestion"],[3,"selected_custom_option","_onSelectedCustomOption"],[3,"coordinates_changed","_onCoordinatesChanged"],[3,"__hover","_onHover"],[3,"__focus","_onFocus"],[3,"__blur","_onBlur"],[3,"__error","_onError"],[3,"input","onInput"],[2,"paste","onPaste"],[3,"blur","onBlur"],[3,"focus","onFocus"],[2,"keyup","onKeyUp"]]],[4,"what3words-map",{"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"words":[1],"map_provider":[1],"map_api_key":[1],"version":[1],"libraries":[16],"language":[1],"region":[1],"lat":[2],"lng":[2],"tilt":[2],"disable_default_ui":[4],"zoom":[2],"zoom_control":[4],"zoom_control_position":[2],"map_type_id":[1],"map_type_control":[4],"map_type_control_position":[2],"scale_control":[4],"street_view_control":[4],"street_view_control_position":[2],"rotate_control":[4],"rotate_control_position":[2],"fullscreen_control":[4],"fullscreen_control_position":[2],"search_control_position":[2],"current_location_control_position":[2],"selected_zoom":[2],"current_location":[4],"watch_location":[4],"marker_icon":[1],"default_autosuggest_language":[1],"reset_zoom_on_select":[4],"searchControlSlot":[32],"currentLocationControlSlot":[32],"zoomControlSlot":[32],"mapTypeControlSlot":[32],"mapLoaded":[32],"input":[32],"autosuggest":[32],"placesSuggestions":[32],"request":[32],"watch_id":[32],"provider":[32],"autosuggestLanguage":[32],"setApiKey":[64],"setBaseUrl":[64],"setHeaders":[64],"setApiVersion":[64],"setWords":[64],"clearGrid":[64],"setLat":[64],"getLat":[64],"setLng":[64],"getLng":[64],"setZoom":[64],"getZoom":[64],"getBounds":[64],"panTo":[64],"setMapTypeId":[64]},[[0,"__load","onLoad"],[3,"coordinates_changed","onSelectedCoordinates"]]],[0,"what3words-symbol",{"color":[1],"size":[2]}]]],["what3words-address.cjs",[[0,"what3words-address",{"words":[1],"iconColor":[1,"icon-color"],"textColor":[1,"text-color"],"size":[2],"target":[1],"link":[4],"tooltip":[4],"tooltipLocation":[1,"tooltip-location"],"showTooltip":[4,"show-tooltip"]}]]]], options); | ||
return index.bootstrapLazy([["what3words-autosuggest_3.cjs",[[4,"what3words-autosuggest",{"callback":[1],"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"name":[1],"initial_value":[1025],"variant":[1],"typeahead_delay":[2],"invalid_address_error_message":[1],"strict":[4],"language":[1],"autosuggest_focus":[1],"n_focus_results":[2],"clip_to_country":[1],"clip_to_bounding_box":[1],"clip_to_circle":[1],"clip_to_polygon":[1],"return_coordinates":[4],"options":[16],"rawInput":[32],"value":[32],"input":[32],"latInput":[32],"lngInput":[32],"suggestions":[32],"selectedSuggestion":[32],"showSuggestions":[32],"hasFocus":[32],"latitude":[32],"longitude":[32],"apiRequest":[32],"loading":[32],"hoverIndex":[32],"error":[32],"errorTimeout":[32]},[[3,"value_changed","onValueChanged"],[3,"value_valid","onValueValid"],[0,"value_invalid","onValueInvalid"],[3,"suggestions_changed","onSuggestionsChanged"],[3,"selected_suggestion","onSelectedSuggestion"],[3,"selected_custom_option","_onSelectedCustomOption"],[3,"coordinates_changed","_onCoordinatesChanged"],[3,"__hover","_onHover"],[3,"__focus","_onFocus"],[3,"__blur","_onBlur"],[3,"__error","_onError"],[3,"input","onInput"],[2,"paste","onPaste"],[3,"blur","onBlur"],[3,"focus","onFocus"],[2,"keyup","onKeyUp"]]],[4,"what3words-map",{"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"words":[1],"map_provider":[1],"map_api_key":[1],"version":[1],"libraries":[16],"language":[1],"region":[1],"lat":[2],"lng":[2],"tilt":[2],"disable_default_ui":[4],"zoom":[2],"zoom_control":[4],"zoom_control_position":[2],"map_type_id":[1],"map_type_control":[4],"map_type_control_position":[2],"scale_control":[4],"street_view_control":[4],"street_view_control_position":[2],"rotate_control":[4],"rotate_control_position":[2],"fullscreen_control":[4],"fullscreen_control_position":[2],"search_control_position":[2],"current_location_control_position":[2],"selected_zoom":[2],"current_location":[4],"watch_location":[4],"marker_icon":[1],"searchControlSlot":[32],"currentLocationControlSlot":[32],"zoomControlSlot":[32],"mapTypeControlSlot":[32],"mapLoaded":[32],"input":[32],"autosuggest":[32],"placesSuggestions":[32],"request":[32],"watch_id":[32],"provider":[32],"current_location_coordinates":[32],"setApiKey":[64],"setBaseUrl":[64],"setHeaders":[64],"setApiVersion":[64],"setWords":[64],"clearGrid":[64],"setLat":[64],"getLat":[64],"setLng":[64],"getLng":[64],"setZoom":[64],"getZoom":[64],"getBounds":[64],"panTo":[64],"setMapTypeId":[64]},[[0,"__load","onLoad"],[3,"coordinates_changed","onSelectedCoordinates"]]],[0,"what3words-symbol",{"color":[1],"size":[2]}]]],["what3words-address.cjs",[[0,"what3words-address",{"words":[1],"iconColor":[1,"icon-color"],"textColor":[1,"text-color"],"size":[2],"target":[1],"link":[4],"tooltip":[4],"tooltipLocation":[1,"tooltip-location"],"showTooltip":[4,"show-tooltip"]}]]]], options); | ||
}); | ||
@@ -25,0 +25,0 @@ }; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
const index = require('./index-1c8042e8.js'); | ||
const index$1 = require('./index-4caabef5.js'); | ||
const index$1 = require('./index-d41e3358.js'); | ||
@@ -9,0 +9,0 @@ const addressCss = "what3words-address{display:inline-block;font-family:\"Source Sans Pro\", sans-serif}.what3words-address{color:#333;display:-ms-inline-flexbox;display:inline-flex;text-decoration:none;-ms-flex-direction:column;flex-direction:column}.what3words-address_container{display:-ms-flexbox;display:flex}.what3words-address_text{white-space:nowrap}.what3words-tooltip-container{height:0;width:0;position:relative;-ms-flex-item-align:center;align-self:center}.what3words-tooltip{position:absolute;display:none;width:160px;background-color:#333333;border-radius:3px;bottom:10px;left:-88px;font-size:12px;padding:8px;z-index:1;color:#ffffff;-webkit-box-shadow:0 0 16px rgba(0, 0, 0, 0.5);box-shadow:0 0 16px rgba(0, 0, 0, 0.5)}.what3words-address:hover .what3words-tooltip,.what3words-address_tooltip .what3words-tooltip{display:block}.what3words-tooltip:after{bottom:-13px;left:50%;content:\"\";height:0;width:0;position:absolute;border:7px solid transparent;margin-left:-7px;border-top-color:#333333;z-index:1}.what3words-tooltip:before{content:\"\";position:absolute;width:100%;height:10px;bottom:-10px;left:0}.what3words-tooltip a{color:#ffffff}"; |
'use strict'; | ||
const index = require('./index-1c8042e8.js'); | ||
const appGlobals = require('./app-globals-ac0c644b.js'); | ||
require('./index-4caabef5.js'); | ||
require('./utils-9e92ad78.js'); | ||
const appGlobals = require('./app-globals-9e7f8549.js'); | ||
require('./index-d41e3358.js'); | ||
require('./utils-03bcc71b.js'); | ||
@@ -22,3 +22,3 @@ /* | ||
appGlobals.globalScripts(); | ||
return index.bootstrapLazy([["what3words-autosuggest_3.cjs",[[4,"what3words-autosuggest",{"callback":[1],"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"name":[1],"initial_value":[1025],"variant":[1],"typeahead_delay":[2],"invalid_address_error_message":[1],"strict":[4],"language":[1],"autosuggest_focus":[1],"n_focus_results":[2],"clip_to_country":[1],"clip_to_bounding_box":[1],"clip_to_circle":[1],"clip_to_polygon":[1],"return_coordinates":[4],"options":[16],"rawInput":[32],"value":[32],"input":[32],"latInput":[32],"lngInput":[32],"suggestions":[32],"selectedSuggestion":[32],"showSuggestions":[32],"hasFocus":[32],"latitude":[32],"longitude":[32],"apiRequest":[32],"loading":[32],"hoverIndex":[32],"error":[32],"errorTimeout":[32]},[[3,"value_changed","onValueChanged"],[3,"value_valid","onValueValid"],[0,"value_invalid","onValueInvalid"],[3,"suggestions_changed","onSuggestionsChanged"],[3,"selected_suggestion","onSelectedSuggestion"],[3,"selected_custom_option","_onSelectedCustomOption"],[3,"coordinates_changed","_onCoordinatesChanged"],[3,"__hover","_onHover"],[3,"__focus","_onFocus"],[3,"__blur","_onBlur"],[3,"__error","_onError"],[3,"input","onInput"],[2,"paste","onPaste"],[3,"blur","onBlur"],[3,"focus","onFocus"],[2,"keyup","onKeyUp"]]],[4,"what3words-map",{"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"words":[1],"map_provider":[1],"map_api_key":[1],"version":[1],"libraries":[16],"language":[1],"region":[1],"lat":[2],"lng":[2],"tilt":[2],"disable_default_ui":[4],"zoom":[2],"zoom_control":[4],"zoom_control_position":[2],"map_type_id":[1],"map_type_control":[4],"map_type_control_position":[2],"scale_control":[4],"street_view_control":[4],"street_view_control_position":[2],"rotate_control":[4],"rotate_control_position":[2],"fullscreen_control":[4],"fullscreen_control_position":[2],"search_control_position":[2],"current_location_control_position":[2],"selected_zoom":[2],"current_location":[4],"watch_location":[4],"marker_icon":[1],"default_autosuggest_language":[1],"reset_zoom_on_select":[4],"searchControlSlot":[32],"currentLocationControlSlot":[32],"zoomControlSlot":[32],"mapTypeControlSlot":[32],"mapLoaded":[32],"input":[32],"autosuggest":[32],"placesSuggestions":[32],"request":[32],"watch_id":[32],"provider":[32],"autosuggestLanguage":[32],"setApiKey":[64],"setBaseUrl":[64],"setHeaders":[64],"setApiVersion":[64],"setWords":[64],"clearGrid":[64],"setLat":[64],"getLat":[64],"setLng":[64],"getLng":[64],"setZoom":[64],"getZoom":[64],"getBounds":[64],"panTo":[64],"setMapTypeId":[64]},[[0,"__load","onLoad"],[3,"coordinates_changed","onSelectedCoordinates"]]],[0,"what3words-symbol",{"color":[1],"size":[2]}]]],["what3words-address.cjs",[[0,"what3words-address",{"words":[1],"iconColor":[1,"icon-color"],"textColor":[1,"text-color"],"size":[2],"target":[1],"link":[4],"tooltip":[4],"tooltipLocation":[1,"tooltip-location"],"showTooltip":[4,"show-tooltip"]}]]]], options); | ||
return index.bootstrapLazy([["what3words-autosuggest_3.cjs",[[4,"what3words-autosuggest",{"callback":[1],"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"name":[1],"initial_value":[1025],"variant":[1],"typeahead_delay":[2],"invalid_address_error_message":[1],"strict":[4],"language":[1],"autosuggest_focus":[1],"n_focus_results":[2],"clip_to_country":[1],"clip_to_bounding_box":[1],"clip_to_circle":[1],"clip_to_polygon":[1],"return_coordinates":[4],"options":[16],"rawInput":[32],"value":[32],"input":[32],"latInput":[32],"lngInput":[32],"suggestions":[32],"selectedSuggestion":[32],"showSuggestions":[32],"hasFocus":[32],"latitude":[32],"longitude":[32],"apiRequest":[32],"loading":[32],"hoverIndex":[32],"error":[32],"errorTimeout":[32]},[[3,"value_changed","onValueChanged"],[3,"value_valid","onValueValid"],[0,"value_invalid","onValueInvalid"],[3,"suggestions_changed","onSuggestionsChanged"],[3,"selected_suggestion","onSelectedSuggestion"],[3,"selected_custom_option","_onSelectedCustomOption"],[3,"coordinates_changed","_onCoordinatesChanged"],[3,"__hover","_onHover"],[3,"__focus","_onFocus"],[3,"__blur","_onBlur"],[3,"__error","_onError"],[3,"input","onInput"],[2,"paste","onPaste"],[3,"blur","onBlur"],[3,"focus","onFocus"],[2,"keyup","onKeyUp"]]],[4,"what3words-map",{"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"words":[1],"map_provider":[1],"map_api_key":[1],"version":[1],"libraries":[16],"language":[1],"region":[1],"lat":[2],"lng":[2],"tilt":[2],"disable_default_ui":[4],"zoom":[2],"zoom_control":[4],"zoom_control_position":[2],"map_type_id":[1],"map_type_control":[4],"map_type_control_position":[2],"scale_control":[4],"street_view_control":[4],"street_view_control_position":[2],"rotate_control":[4],"rotate_control_position":[2],"fullscreen_control":[4],"fullscreen_control_position":[2],"search_control_position":[2],"current_location_control_position":[2],"selected_zoom":[2],"current_location":[4],"watch_location":[4],"marker_icon":[1],"searchControlSlot":[32],"currentLocationControlSlot":[32],"zoomControlSlot":[32],"mapTypeControlSlot":[32],"mapLoaded":[32],"input":[32],"autosuggest":[32],"placesSuggestions":[32],"request":[32],"watch_id":[32],"provider":[32],"current_location_coordinates":[32],"setApiKey":[64],"setBaseUrl":[64],"setHeaders":[64],"setApiVersion":[64],"setWords":[64],"clearGrid":[64],"setLat":[64],"getLat":[64],"setLng":[64],"getLng":[64],"setZoom":[64],"getZoom":[64],"getBounds":[64],"panTo":[64],"setMapTypeId":[64]},[[0,"__load","onLoad"],[3,"coordinates_changed","onSelectedCoordinates"]]],[0,"what3words-symbol",{"color":[1],"size":[2]}]]],["what3words-address.cjs",[[0,"what3words-address",{"words":[1],"iconColor":[1,"icon-color"],"textColor":[1,"text-color"],"size":[2],"target":[1],"link":[4],"tooltip":[4],"tooltipLocation":[1,"tooltip-location"],"showTooltip":[4,"show-tooltip"]}]]]], options); | ||
}); |
@@ -32,4 +32,2 @@ import { Component, Element, Event, h, Host, Listen, Method, Prop, State, Watch, } from '@stencil/core'; | ||
this.marker_icon = MARKER_SRC; | ||
/** Language default used when invoking the autosuggest sdk. Useful to maintain parity between 3wa search and site language */ | ||
this.default_autosuggest_language = DEFAULTS.language; | ||
this.mapLoaded = false; | ||
@@ -41,3 +39,2 @@ this.input = DEFAULTS.null; | ||
this.watch_id = DEFAULTS.null; | ||
this.autosuggestLanguage = DEFAULTS.language; | ||
} | ||
@@ -203,13 +200,8 @@ async setApiKey(key) { | ||
coordinates: { lat, lng }, | ||
language: this.autosuggestLanguage, | ||
language: this.autosuggest.language, | ||
})); | ||
const { square, words } = response; | ||
this.setInputValue(words); | ||
// revert threeWordAddressLanguage to autosuggest_default_language | ||
// to maintain user language setting when updated during input change (e.g. onSelectedSuggestion) | ||
if (this.autosuggestLanguage !== this.default_autosuggest_language) { | ||
this.setAutosuggestLanguage(this.default_autosuggest_language); | ||
} | ||
this.provider.plotSquare(square); | ||
this.provider.plotMarker(response, coordinates => this.coordinates_changed.emit(coordinates)); | ||
this.provider.plotMarker(response, coordinates => this.coordinates_changed.emit(coordinates), this.marker_icon); | ||
this.selected_square.emit(response); | ||
@@ -242,5 +234,2 @@ } | ||
} | ||
setAutosuggestLanguage(language) { | ||
this.autosuggestLanguage = language; | ||
} | ||
async onCurrentPositionSuccess(position) { | ||
@@ -256,2 +245,3 @@ const { coords: { latitude: lat, longitude: lng }, } = position; | ||
this.coordinates_changed.emit({ lat, lng }); | ||
this.current_location_coordinates = { lat, lng }; | ||
} | ||
@@ -292,2 +282,5 @@ } | ||
return; | ||
if (!this.autosuggest.hasAttribute('language')) { | ||
this.autosuggest.language = this.language; | ||
} | ||
this.autosuggest.strict = false; | ||
@@ -347,3 +340,5 @@ this.autosuggest.addEventListener('__focus', this.onControlFocus.bind(this)); | ||
this.provider.clearGrid(); | ||
this.provider.plotGrid(grid, coordinates => this.coordinates_changed.emit(coordinates)); | ||
this.provider.plotGrid(grid, coordinates => { | ||
this.coordinates_changed.emit(coordinates); | ||
}); | ||
}, 100); | ||
@@ -363,19 +358,10 @@ } | ||
const { detail: { suggestion: { words }, }, } = event; | ||
// convert coordinates to 3wa | ||
const response = (await sdk.api.convertToCoordinates({ | ||
words, | ||
})); | ||
// pan to the selected coordinates and zoom to selected zoom if changed | ||
await this.panTo(response.coordinates); | ||
const zoom = await this.getZoom(); | ||
if (this.reset_zoom_on_select && zoom !== this.selected_zoom) { | ||
// check and reset zoom level to default (selected_zoom) | ||
// NOTE: larger zoom value = higher resolution / zoom in | ||
if (zoom !== this.selected_zoom) | ||
await this.setZoom(this.selected_zoom); | ||
} | ||
// store detected language if changed | ||
if (response.language !== this.default_autosuggest_language) { | ||
this.setAutosuggestLanguage(response.language); | ||
} | ||
this.coordinates_changed.emit(response.coordinates); | ||
this.coordinates_changed.emit(Object.assign({}, response.coordinates)); | ||
} | ||
@@ -409,3 +395,3 @@ async onCustomSelect(event) { | ||
this.request = setTimeout(async () => { | ||
this.placesSuggestions = await this.provider.getPlacesSuggestions(value); | ||
this.placesSuggestions = await this.provider.getPlacesSuggestions(value, this.current_location_coordinates); | ||
}, this.autosuggest.typeahead_delay); | ||
@@ -1134,37 +1120,2 @@ } | ||
"defaultValue": "MARKER_SRC" | ||
}, | ||
"default_autosuggest_language": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "Language default used when invoking the autosuggest sdk. Useful to maintain parity between 3wa search and site language" | ||
}, | ||
"attribute": "default_autosuggest_language", | ||
"reflect": false, | ||
"defaultValue": "DEFAULTS.language" | ||
}, | ||
"reset_zoom_on_select": { | ||
"type": "boolean", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean", | ||
"resolved": "boolean", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "Reset map level zoom to selected_zoom after panning to user-selected autosuggest suggestion" | ||
}, | ||
"attribute": "reset_zoom_on_select", | ||
"reflect": false | ||
} | ||
@@ -1184,3 +1135,3 @@ }; } | ||
"provider": {}, | ||
"autosuggestLanguage": {} | ||
"current_location_coordinates": {} | ||
}; } | ||
@@ -1187,0 +1138,0 @@ static get events() { return [{ |
@@ -258,11 +258,5 @@ import { Loader } from '@googlemaps/js-api-loader'; | ||
return new Promise((res, rej) => { | ||
const center = this.center; | ||
const query = { | ||
input, | ||
origin: ((origin === null || origin === void 0 ? void 0 : origin.lat) || (center === null || center === void 0 ? void 0 : center.lat)) && ((origin === null || origin === void 0 ? void 0 : origin.lng) || (center === null || center === void 0 ? void 0 : center.lng)) | ||
? { | ||
lat: (origin === null || origin === void 0 ? void 0 : origin.lat) || (center === null || center === void 0 ? void 0 : center.lat), | ||
lng: (origin === null || origin === void 0 ? void 0 : origin.lng) || (center === null || center === void 0 ? void 0 : center.lng), | ||
} | ||
: undefined, | ||
origin: origin || undefined, | ||
}; | ||
@@ -269,0 +263,0 @@ this.autocomplete.getPlacePredictions(query, places => { |
@@ -1,1 +0,1 @@ | ||
export{s as sdk}from"./index-1b25bd2d.js"; | ||
export{s as sdk}from"./index-640c8c74.js"; |
@@ -1,1 +0,1 @@ | ||
import{p as promiseResolve,b as bootstrapLazy}from"./index-76aed8ad.js";import{g as globalScripts}from"./app-globals-8b28ec05.js";import"./index-1b25bd2d.js";import"./utils-c2df3621.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(o,e){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){globalScripts();return bootstrapLazy([["what3words-autosuggest_3",[[4,"what3words-autosuggest",{callback:[1],api_key:[1],headers:[1],base_url:[1],api_version:[1],name:[1],initial_value:[1025],variant:[1],typeahead_delay:[2],invalid_address_error_message:[1],strict:[4],language:[1],autosuggest_focus:[1],n_focus_results:[2],clip_to_country:[1],clip_to_bounding_box:[1],clip_to_circle:[1],clip_to_polygon:[1],return_coordinates:[4],options:[16],rawInput:[32],value:[32],input:[32],latInput:[32],lngInput:[32],suggestions:[32],selectedSuggestion:[32],showSuggestions:[32],hasFocus:[32],latitude:[32],longitude:[32],apiRequest:[32],loading:[32],hoverIndex:[32],error:[32],errorTimeout:[32]},[[3,"value_changed","onValueChanged"],[3,"value_valid","onValueValid"],[0,"value_invalid","onValueInvalid"],[3,"suggestions_changed","onSuggestionsChanged"],[3,"selected_suggestion","onSelectedSuggestion"],[3,"selected_custom_option","_onSelectedCustomOption"],[3,"coordinates_changed","_onCoordinatesChanged"],[3,"__hover","_onHover"],[3,"__focus","_onFocus"],[3,"__blur","_onBlur"],[3,"__error","_onError"],[3,"input","onInput"],[2,"paste","onPaste"],[3,"blur","onBlur"],[3,"focus","onFocus"],[2,"keyup","onKeyUp"]]],[4,"what3words-map",{api_key:[1],headers:[1],base_url:[1],api_version:[1],words:[1],map_provider:[1],map_api_key:[1],version:[1],libraries:[16],language:[1],region:[1],lat:[2],lng:[2],tilt:[2],disable_default_ui:[4],zoom:[2],zoom_control:[4],zoom_control_position:[2],map_type_id:[1],map_type_control:[4],map_type_control_position:[2],scale_control:[4],street_view_control:[4],street_view_control_position:[2],rotate_control:[4],rotate_control_position:[2],fullscreen_control:[4],fullscreen_control_position:[2],search_control_position:[2],current_location_control_position:[2],selected_zoom:[2],current_location:[4],watch_location:[4],marker_icon:[1],default_autosuggest_language:[1],reset_zoom_on_select:[4],searchControlSlot:[32],currentLocationControlSlot:[32],zoomControlSlot:[32],mapTypeControlSlot:[32],mapLoaded:[32],input:[32],autosuggest:[32],placesSuggestions:[32],request:[32],watch_id:[32],provider:[32],autosuggestLanguage:[32],setApiKey:[64],setBaseUrl:[64],setHeaders:[64],setApiVersion:[64],setWords:[64],clearGrid:[64],setLat:[64],getLat:[64],setLng:[64],getLng:[64],setZoom:[64],getZoom:[64],getBounds:[64],panTo:[64],setMapTypeId:[64]},[[0,"__load","onLoad"],[3,"coordinates_changed","onSelectedCoordinates"]]],[0,"what3words-symbol",{color:[1],size:[2]}]]],["what3words-address",[[0,"what3words-address",{words:[1],iconColor:[1,"icon-color"],textColor:[1,"text-color"],size:[2],target:[1],link:[4],tooltip:[4],tooltipLocation:[1,"tooltip-location"],showTooltip:[4,"show-tooltip"]}]]]],e)}))};export{defineCustomElements}; | ||
import{p as promiseResolve,b as bootstrapLazy}from"./index-76aed8ad.js";import{g as globalScripts}from"./app-globals-7ef1705e.js";import"./index-640c8c74.js";import"./utils-a710463a.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(o,e){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){globalScripts();return bootstrapLazy([["what3words-autosuggest_3",[[4,"what3words-autosuggest",{callback:[1],api_key:[1],headers:[1],base_url:[1],api_version:[1],name:[1],initial_value:[1025],variant:[1],typeahead_delay:[2],invalid_address_error_message:[1],strict:[4],language:[1],autosuggest_focus:[1],n_focus_results:[2],clip_to_country:[1],clip_to_bounding_box:[1],clip_to_circle:[1],clip_to_polygon:[1],return_coordinates:[4],options:[16],rawInput:[32],value:[32],input:[32],latInput:[32],lngInput:[32],suggestions:[32],selectedSuggestion:[32],showSuggestions:[32],hasFocus:[32],latitude:[32],longitude:[32],apiRequest:[32],loading:[32],hoverIndex:[32],error:[32],errorTimeout:[32]},[[3,"value_changed","onValueChanged"],[3,"value_valid","onValueValid"],[0,"value_invalid","onValueInvalid"],[3,"suggestions_changed","onSuggestionsChanged"],[3,"selected_suggestion","onSelectedSuggestion"],[3,"selected_custom_option","_onSelectedCustomOption"],[3,"coordinates_changed","_onCoordinatesChanged"],[3,"__hover","_onHover"],[3,"__focus","_onFocus"],[3,"__blur","_onBlur"],[3,"__error","_onError"],[3,"input","onInput"],[2,"paste","onPaste"],[3,"blur","onBlur"],[3,"focus","onFocus"],[2,"keyup","onKeyUp"]]],[4,"what3words-map",{api_key:[1],headers:[1],base_url:[1],api_version:[1],words:[1],map_provider:[1],map_api_key:[1],version:[1],libraries:[16],language:[1],region:[1],lat:[2],lng:[2],tilt:[2],disable_default_ui:[4],zoom:[2],zoom_control:[4],zoom_control_position:[2],map_type_id:[1],map_type_control:[4],map_type_control_position:[2],scale_control:[4],street_view_control:[4],street_view_control_position:[2],rotate_control:[4],rotate_control_position:[2],fullscreen_control:[4],fullscreen_control_position:[2],search_control_position:[2],current_location_control_position:[2],selected_zoom:[2],current_location:[4],watch_location:[4],marker_icon:[1],searchControlSlot:[32],currentLocationControlSlot:[32],zoomControlSlot:[32],mapTypeControlSlot:[32],mapLoaded:[32],input:[32],autosuggest:[32],placesSuggestions:[32],request:[32],watch_id:[32],provider:[32],current_location_coordinates:[32],setApiKey:[64],setBaseUrl:[64],setHeaders:[64],setApiVersion:[64],setWords:[64],clearGrid:[64],setLat:[64],getLat:[64],setLng:[64],getLng:[64],setZoom:[64],getZoom:[64],getBounds:[64],panTo:[64],setMapTypeId:[64]},[[0,"__load","onLoad"],[3,"coordinates_changed","onSelectedCoordinates"]]],[0,"what3words-symbol",{color:[1],size:[2]}]]],["what3words-address",[[0,"what3words-address",{words:[1],iconColor:[1,"icon-color"],textColor:[1,"text-color"],size:[2],target:[1],link:[4],tooltip:[4],tooltipLocation:[1,"tooltip-location"],showTooltip:[4,"show-tooltip"]}]]]],e)}))};export{defineCustomElements}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,h}from"./index-76aed8ad.js";import{D as DEFAULTS}from"./index-1b25bd2d.js";var addressCss='what3words-address{display:inline-block;font-family:"Source Sans Pro", sans-serif}.what3words-address{color:#333;display:-ms-inline-flexbox;display:inline-flex;text-decoration:none;-ms-flex-direction:column;flex-direction:column}.what3words-address_container{display:-ms-flexbox;display:flex}.what3words-address_text{white-space:nowrap}.what3words-tooltip-container{height:0;width:0;position:relative;-ms-flex-item-align:center;align-self:center}.what3words-tooltip{position:absolute;display:none;width:160px;background-color:#333333;border-radius:3px;bottom:10px;left:-88px;font-size:12px;padding:8px;z-index:1;color:#ffffff;-webkit-box-shadow:0 0 16px rgba(0, 0, 0, 0.5);box-shadow:0 0 16px rgba(0, 0, 0, 0.5)}.what3words-address:hover .what3words-tooltip,.what3words-address_tooltip .what3words-tooltip{display:block}.what3words-tooltip:after{bottom:-13px;left:50%;content:"";height:0;width:0;position:absolute;border:7px solid transparent;margin-left:-7px;border-top-color:#333333;z-index:1}.what3words-tooltip:before{content:"";position:absolute;width:100%;height:10px;bottom:-10px;left:0}.what3words-tooltip a{color:#ffffff}';var What3wordsAddress=function(){function t(t){registerInstance(this,t);this.iconColor=DEFAULTS.iconColor;this.textColor=DEFAULTS.textColor;this.size=DEFAULTS.addressSize;this.target=DEFAULTS.target;this.link=DEFAULTS.true;this.tooltip=DEFAULTS.true;this.tooltipLocation=DEFAULTS.tooltipLocation;this.showTooltip=DEFAULTS.false}t.prototype.render=function(){var t="https://map.what3words.com/"+this.words;var o=this.link?{href:t,target:this.target}:{};return h("a",Object.assign({},o,{class:"what3words-address notranslate "+(this.showTooltip?"what3words-address_tooltip":""),style:{fontSize:this.size+"px"}}),this.tooltip&&h("div",{class:"what3words-tooltip-container"},h("div",{class:"what3words-tooltip"},"what3words gives every 3m x 3m in the world a unique 3 word address. This one describes the precise ",this.tooltipLocation,"."," ",h("a",{href:t,target:this.target},"View on map"))),h("div",{class:"what3words-address_container"},h("what3words-symbol",{size:this.size*1.25,color:this.iconColor}),h("span",{class:"what3words-address_text",style:{color:this.textColor}},this.words)))};return t}();What3wordsAddress.style=addressCss;export{What3wordsAddress as what3words_address}; | ||
import{r as registerInstance,h}from"./index-76aed8ad.js";import{D as DEFAULTS}from"./index-640c8c74.js";var addressCss='what3words-address{display:inline-block;font-family:"Source Sans Pro", sans-serif}.what3words-address{color:#333;display:-ms-inline-flexbox;display:inline-flex;text-decoration:none;-ms-flex-direction:column;flex-direction:column}.what3words-address_container{display:-ms-flexbox;display:flex}.what3words-address_text{white-space:nowrap}.what3words-tooltip-container{height:0;width:0;position:relative;-ms-flex-item-align:center;align-self:center}.what3words-tooltip{position:absolute;display:none;width:160px;background-color:#333333;border-radius:3px;bottom:10px;left:-88px;font-size:12px;padding:8px;z-index:1;color:#ffffff;-webkit-box-shadow:0 0 16px rgba(0, 0, 0, 0.5);box-shadow:0 0 16px rgba(0, 0, 0, 0.5)}.what3words-address:hover .what3words-tooltip,.what3words-address_tooltip .what3words-tooltip{display:block}.what3words-tooltip:after{bottom:-13px;left:50%;content:"";height:0;width:0;position:absolute;border:7px solid transparent;margin-left:-7px;border-top-color:#333333;z-index:1}.what3words-tooltip:before{content:"";position:absolute;width:100%;height:10px;bottom:-10px;left:0}.what3words-tooltip a{color:#ffffff}';var What3wordsAddress=function(){function t(t){registerInstance(this,t);this.iconColor=DEFAULTS.iconColor;this.textColor=DEFAULTS.textColor;this.size=DEFAULTS.addressSize;this.target=DEFAULTS.target;this.link=DEFAULTS.true;this.tooltip=DEFAULTS.true;this.tooltipLocation=DEFAULTS.tooltipLocation;this.showTooltip=DEFAULTS.false}t.prototype.render=function(){var t="https://map.what3words.com/"+this.words;var o=this.link?{href:t,target:this.target}:{};return h("a",Object.assign({},o,{class:"what3words-address notranslate "+(this.showTooltip?"what3words-address_tooltip":""),style:{fontSize:this.size+"px"}}),this.tooltip&&h("div",{class:"what3words-tooltip-container"},h("div",{class:"what3words-tooltip"},"what3words gives every 3m x 3m in the world a unique 3 word address. This one describes the precise ",this.tooltipLocation,"."," ",h("a",{href:t,target:this.target},"View on map"))),h("div",{class:"what3words-address_container"},h("what3words-symbol",{size:this.size*1.25,color:this.iconColor}),h("span",{class:"what3words-address_text",style:{color:this.textColor}},this.words)))};return t}();What3wordsAddress.style=addressCss;export{What3wordsAddress as what3words_address}; |
@@ -1,1 +0,1 @@ | ||
import{p as promiseResolve,b as bootstrapLazy}from"./index-76aed8ad.js";import{g as globalScripts}from"./app-globals-8b28ec05.js";import"./index-1b25bd2d.js";import"./utils-c2df3621.js";var patchBrowser=function(){var o=import.meta.url;var e={};if(o!==""){e.resourcesUrl=new URL(".",o).href}return promiseResolve(e)};patchBrowser().then((function(o){globalScripts();return bootstrapLazy([["what3words-autosuggest_3",[[4,"what3words-autosuggest",{callback:[1],api_key:[1],headers:[1],base_url:[1],api_version:[1],name:[1],initial_value:[1025],variant:[1],typeahead_delay:[2],invalid_address_error_message:[1],strict:[4],language:[1],autosuggest_focus:[1],n_focus_results:[2],clip_to_country:[1],clip_to_bounding_box:[1],clip_to_circle:[1],clip_to_polygon:[1],return_coordinates:[4],options:[16],rawInput:[32],value:[32],input:[32],latInput:[32],lngInput:[32],suggestions:[32],selectedSuggestion:[32],showSuggestions:[32],hasFocus:[32],latitude:[32],longitude:[32],apiRequest:[32],loading:[32],hoverIndex:[32],error:[32],errorTimeout:[32]},[[3,"value_changed","onValueChanged"],[3,"value_valid","onValueValid"],[0,"value_invalid","onValueInvalid"],[3,"suggestions_changed","onSuggestionsChanged"],[3,"selected_suggestion","onSelectedSuggestion"],[3,"selected_custom_option","_onSelectedCustomOption"],[3,"coordinates_changed","_onCoordinatesChanged"],[3,"__hover","_onHover"],[3,"__focus","_onFocus"],[3,"__blur","_onBlur"],[3,"__error","_onError"],[3,"input","onInput"],[2,"paste","onPaste"],[3,"blur","onBlur"],[3,"focus","onFocus"],[2,"keyup","onKeyUp"]]],[4,"what3words-map",{api_key:[1],headers:[1],base_url:[1],api_version:[1],words:[1],map_provider:[1],map_api_key:[1],version:[1],libraries:[16],language:[1],region:[1],lat:[2],lng:[2],tilt:[2],disable_default_ui:[4],zoom:[2],zoom_control:[4],zoom_control_position:[2],map_type_id:[1],map_type_control:[4],map_type_control_position:[2],scale_control:[4],street_view_control:[4],street_view_control_position:[2],rotate_control:[4],rotate_control_position:[2],fullscreen_control:[4],fullscreen_control_position:[2],search_control_position:[2],current_location_control_position:[2],selected_zoom:[2],current_location:[4],watch_location:[4],marker_icon:[1],default_autosuggest_language:[1],reset_zoom_on_select:[4],searchControlSlot:[32],currentLocationControlSlot:[32],zoomControlSlot:[32],mapTypeControlSlot:[32],mapLoaded:[32],input:[32],autosuggest:[32],placesSuggestions:[32],request:[32],watch_id:[32],provider:[32],autosuggestLanguage:[32],setApiKey:[64],setBaseUrl:[64],setHeaders:[64],setApiVersion:[64],setWords:[64],clearGrid:[64],setLat:[64],getLat:[64],setLng:[64],getLng:[64],setZoom:[64],getZoom:[64],getBounds:[64],panTo:[64],setMapTypeId:[64]},[[0,"__load","onLoad"],[3,"coordinates_changed","onSelectedCoordinates"]]],[0,"what3words-symbol",{color:[1],size:[2]}]]],["what3words-address",[[0,"what3words-address",{words:[1],iconColor:[1,"icon-color"],textColor:[1,"text-color"],size:[2],target:[1],link:[4],tooltip:[4],tooltipLocation:[1,"tooltip-location"],showTooltip:[4,"show-tooltip"]}]]]],o)})); | ||
import{p as promiseResolve,b as bootstrapLazy}from"./index-76aed8ad.js";import{g as globalScripts}from"./app-globals-7ef1705e.js";import"./index-640c8c74.js";import"./utils-a710463a.js";var patchBrowser=function(){var o=import.meta.url;var e={};if(o!==""){e.resourcesUrl=new URL(".",o).href}return promiseResolve(e)};patchBrowser().then((function(o){globalScripts();return bootstrapLazy([["what3words-autosuggest_3",[[4,"what3words-autosuggest",{callback:[1],api_key:[1],headers:[1],base_url:[1],api_version:[1],name:[1],initial_value:[1025],variant:[1],typeahead_delay:[2],invalid_address_error_message:[1],strict:[4],language:[1],autosuggest_focus:[1],n_focus_results:[2],clip_to_country:[1],clip_to_bounding_box:[1],clip_to_circle:[1],clip_to_polygon:[1],return_coordinates:[4],options:[16],rawInput:[32],value:[32],input:[32],latInput:[32],lngInput:[32],suggestions:[32],selectedSuggestion:[32],showSuggestions:[32],hasFocus:[32],latitude:[32],longitude:[32],apiRequest:[32],loading:[32],hoverIndex:[32],error:[32],errorTimeout:[32]},[[3,"value_changed","onValueChanged"],[3,"value_valid","onValueValid"],[0,"value_invalid","onValueInvalid"],[3,"suggestions_changed","onSuggestionsChanged"],[3,"selected_suggestion","onSelectedSuggestion"],[3,"selected_custom_option","_onSelectedCustomOption"],[3,"coordinates_changed","_onCoordinatesChanged"],[3,"__hover","_onHover"],[3,"__focus","_onFocus"],[3,"__blur","_onBlur"],[3,"__error","_onError"],[3,"input","onInput"],[2,"paste","onPaste"],[3,"blur","onBlur"],[3,"focus","onFocus"],[2,"keyup","onKeyUp"]]],[4,"what3words-map",{api_key:[1],headers:[1],base_url:[1],api_version:[1],words:[1],map_provider:[1],map_api_key:[1],version:[1],libraries:[16],language:[1],region:[1],lat:[2],lng:[2],tilt:[2],disable_default_ui:[4],zoom:[2],zoom_control:[4],zoom_control_position:[2],map_type_id:[1],map_type_control:[4],map_type_control_position:[2],scale_control:[4],street_view_control:[4],street_view_control_position:[2],rotate_control:[4],rotate_control_position:[2],fullscreen_control:[4],fullscreen_control_position:[2],search_control_position:[2],current_location_control_position:[2],selected_zoom:[2],current_location:[4],watch_location:[4],marker_icon:[1],searchControlSlot:[32],currentLocationControlSlot:[32],zoomControlSlot:[32],mapTypeControlSlot:[32],mapLoaded:[32],input:[32],autosuggest:[32],placesSuggestions:[32],request:[32],watch_id:[32],provider:[32],current_location_coordinates:[32],setApiKey:[64],setBaseUrl:[64],setHeaders:[64],setApiVersion:[64],setWords:[64],clearGrid:[64],setLat:[64],getLat:[64],setLng:[64],getLng:[64],setZoom:[64],getZoom:[64],getBounds:[64],panTo:[64],setMapTypeId:[64]},[[0,"__load","onLoad"],[3,"coordinates_changed","onSelectedCoordinates"]]],[0,"what3words-symbol",{color:[1],size:[2]}]]],["what3words-address",[[0,"what3words-address",{words:[1],iconColor:[1,"icon-color"],textColor:[1,"text-color"],size:[2],target:[1],link:[4],tooltip:[4],tooltipLocation:[1,"tooltip-location"],showTooltip:[4,"show-tooltip"]}]]]],o)})); |
@@ -1,1 +0,1 @@ | ||
export { s as sdk } from './index-1b25bd2d.js'; | ||
export { s as sdk } from './index-640c8c74.js'; |
import { p as promiseResolve, b as bootstrapLazy } from './index-76aed8ad.js'; | ||
import { g as globalScripts } from './app-globals-8b28ec05.js'; | ||
import './index-1b25bd2d.js'; | ||
import './utils-c2df3621.js'; | ||
import { g as globalScripts } from './app-globals-7ef1705e.js'; | ||
import './index-640c8c74.js'; | ||
import './utils-a710463a.js'; | ||
@@ -17,3 +17,3 @@ /* | ||
globalScripts(); | ||
return bootstrapLazy([["what3words-autosuggest_3",[[4,"what3words-autosuggest",{"callback":[1],"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"name":[1],"initial_value":[1025],"variant":[1],"typeahead_delay":[2],"invalid_address_error_message":[1],"strict":[4],"language":[1],"autosuggest_focus":[1],"n_focus_results":[2],"clip_to_country":[1],"clip_to_bounding_box":[1],"clip_to_circle":[1],"clip_to_polygon":[1],"return_coordinates":[4],"options":[16],"rawInput":[32],"value":[32],"input":[32],"latInput":[32],"lngInput":[32],"suggestions":[32],"selectedSuggestion":[32],"showSuggestions":[32],"hasFocus":[32],"latitude":[32],"longitude":[32],"apiRequest":[32],"loading":[32],"hoverIndex":[32],"error":[32],"errorTimeout":[32]},[[3,"value_changed","onValueChanged"],[3,"value_valid","onValueValid"],[0,"value_invalid","onValueInvalid"],[3,"suggestions_changed","onSuggestionsChanged"],[3,"selected_suggestion","onSelectedSuggestion"],[3,"selected_custom_option","_onSelectedCustomOption"],[3,"coordinates_changed","_onCoordinatesChanged"],[3,"__hover","_onHover"],[3,"__focus","_onFocus"],[3,"__blur","_onBlur"],[3,"__error","_onError"],[3,"input","onInput"],[2,"paste","onPaste"],[3,"blur","onBlur"],[3,"focus","onFocus"],[2,"keyup","onKeyUp"]]],[4,"what3words-map",{"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"words":[1],"map_provider":[1],"map_api_key":[1],"version":[1],"libraries":[16],"language":[1],"region":[1],"lat":[2],"lng":[2],"tilt":[2],"disable_default_ui":[4],"zoom":[2],"zoom_control":[4],"zoom_control_position":[2],"map_type_id":[1],"map_type_control":[4],"map_type_control_position":[2],"scale_control":[4],"street_view_control":[4],"street_view_control_position":[2],"rotate_control":[4],"rotate_control_position":[2],"fullscreen_control":[4],"fullscreen_control_position":[2],"search_control_position":[2],"current_location_control_position":[2],"selected_zoom":[2],"current_location":[4],"watch_location":[4],"marker_icon":[1],"default_autosuggest_language":[1],"reset_zoom_on_select":[4],"searchControlSlot":[32],"currentLocationControlSlot":[32],"zoomControlSlot":[32],"mapTypeControlSlot":[32],"mapLoaded":[32],"input":[32],"autosuggest":[32],"placesSuggestions":[32],"request":[32],"watch_id":[32],"provider":[32],"autosuggestLanguage":[32],"setApiKey":[64],"setBaseUrl":[64],"setHeaders":[64],"setApiVersion":[64],"setWords":[64],"clearGrid":[64],"setLat":[64],"getLat":[64],"setLng":[64],"getLng":[64],"setZoom":[64],"getZoom":[64],"getBounds":[64],"panTo":[64],"setMapTypeId":[64]},[[0,"__load","onLoad"],[3,"coordinates_changed","onSelectedCoordinates"]]],[0,"what3words-symbol",{"color":[1],"size":[2]}]]],["what3words-address",[[0,"what3words-address",{"words":[1],"iconColor":[1,"icon-color"],"textColor":[1,"text-color"],"size":[2],"target":[1],"link":[4],"tooltip":[4],"tooltipLocation":[1,"tooltip-location"],"showTooltip":[4,"show-tooltip"]}]]]], options); | ||
return bootstrapLazy([["what3words-autosuggest_3",[[4,"what3words-autosuggest",{"callback":[1],"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"name":[1],"initial_value":[1025],"variant":[1],"typeahead_delay":[2],"invalid_address_error_message":[1],"strict":[4],"language":[1],"autosuggest_focus":[1],"n_focus_results":[2],"clip_to_country":[1],"clip_to_bounding_box":[1],"clip_to_circle":[1],"clip_to_polygon":[1],"return_coordinates":[4],"options":[16],"rawInput":[32],"value":[32],"input":[32],"latInput":[32],"lngInput":[32],"suggestions":[32],"selectedSuggestion":[32],"showSuggestions":[32],"hasFocus":[32],"latitude":[32],"longitude":[32],"apiRequest":[32],"loading":[32],"hoverIndex":[32],"error":[32],"errorTimeout":[32]},[[3,"value_changed","onValueChanged"],[3,"value_valid","onValueValid"],[0,"value_invalid","onValueInvalid"],[3,"suggestions_changed","onSuggestionsChanged"],[3,"selected_suggestion","onSelectedSuggestion"],[3,"selected_custom_option","_onSelectedCustomOption"],[3,"coordinates_changed","_onCoordinatesChanged"],[3,"__hover","_onHover"],[3,"__focus","_onFocus"],[3,"__blur","_onBlur"],[3,"__error","_onError"],[3,"input","onInput"],[2,"paste","onPaste"],[3,"blur","onBlur"],[3,"focus","onFocus"],[2,"keyup","onKeyUp"]]],[4,"what3words-map",{"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"words":[1],"map_provider":[1],"map_api_key":[1],"version":[1],"libraries":[16],"language":[1],"region":[1],"lat":[2],"lng":[2],"tilt":[2],"disable_default_ui":[4],"zoom":[2],"zoom_control":[4],"zoom_control_position":[2],"map_type_id":[1],"map_type_control":[4],"map_type_control_position":[2],"scale_control":[4],"street_view_control":[4],"street_view_control_position":[2],"rotate_control":[4],"rotate_control_position":[2],"fullscreen_control":[4],"fullscreen_control_position":[2],"search_control_position":[2],"current_location_control_position":[2],"selected_zoom":[2],"current_location":[4],"watch_location":[4],"marker_icon":[1],"searchControlSlot":[32],"currentLocationControlSlot":[32],"zoomControlSlot":[32],"mapTypeControlSlot":[32],"mapLoaded":[32],"input":[32],"autosuggest":[32],"placesSuggestions":[32],"request":[32],"watch_id":[32],"provider":[32],"current_location_coordinates":[32],"setApiKey":[64],"setBaseUrl":[64],"setHeaders":[64],"setApiVersion":[64],"setWords":[64],"clearGrid":[64],"setLat":[64],"getLat":[64],"setLng":[64],"getLng":[64],"setZoom":[64],"getZoom":[64],"getBounds":[64],"panTo":[64],"setMapTypeId":[64]},[[0,"__load","onLoad"],[3,"coordinates_changed","onSelectedCoordinates"]]],[0,"what3words-symbol",{"color":[1],"size":[2]}]]],["what3words-address",[[0,"what3words-address",{"words":[1],"iconColor":[1,"icon-color"],"textColor":[1,"text-color"],"size":[2],"target":[1],"link":[4],"tooltip":[4],"tooltipLocation":[1,"tooltip-location"],"showTooltip":[4,"show-tooltip"]}]]]], options); | ||
}); | ||
@@ -20,0 +20,0 @@ }; |
import { r as registerInstance, h } from './index-76aed8ad.js'; | ||
import { D as DEFAULTS } from './index-1b25bd2d.js'; | ||
import { D as DEFAULTS } from './index-640c8c74.js'; | ||
@@ -4,0 +4,0 @@ const addressCss = "what3words-address{display:inline-block;font-family:\"Source Sans Pro\", sans-serif}.what3words-address{color:#333;display:-ms-inline-flexbox;display:inline-flex;text-decoration:none;-ms-flex-direction:column;flex-direction:column}.what3words-address_container{display:-ms-flexbox;display:flex}.what3words-address_text{white-space:nowrap}.what3words-tooltip-container{height:0;width:0;position:relative;-ms-flex-item-align:center;align-self:center}.what3words-tooltip{position:absolute;display:none;width:160px;background-color:#333333;border-radius:3px;bottom:10px;left:-88px;font-size:12px;padding:8px;z-index:1;color:#ffffff;-webkit-box-shadow:0 0 16px rgba(0, 0, 0, 0.5);box-shadow:0 0 16px rgba(0, 0, 0, 0.5)}.what3words-address:hover .what3words-tooltip,.what3words-address_tooltip .what3words-tooltip{display:block}.what3words-tooltip:after{bottom:-13px;left:50%;content:\"\";height:0;width:0;position:absolute;border:7px solid transparent;margin-left:-7px;border-top-color:#333333;z-index:1}.what3words-tooltip:before{content:\"\";position:absolute;width:100%;height:10px;bottom:-10px;left:0}.what3words-tooltip a{color:#ffffff}"; |
import { p as promiseResolve, b as bootstrapLazy } from './index-76aed8ad.js'; | ||
import { g as globalScripts } from './app-globals-8b28ec05.js'; | ||
import './index-1b25bd2d.js'; | ||
import './utils-c2df3621.js'; | ||
import { g as globalScripts } from './app-globals-7ef1705e.js'; | ||
import './index-640c8c74.js'; | ||
import './utils-a710463a.js'; | ||
@@ -20,3 +20,3 @@ /* | ||
globalScripts(); | ||
return bootstrapLazy([["what3words-autosuggest_3",[[4,"what3words-autosuggest",{"callback":[1],"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"name":[1],"initial_value":[1025],"variant":[1],"typeahead_delay":[2],"invalid_address_error_message":[1],"strict":[4],"language":[1],"autosuggest_focus":[1],"n_focus_results":[2],"clip_to_country":[1],"clip_to_bounding_box":[1],"clip_to_circle":[1],"clip_to_polygon":[1],"return_coordinates":[4],"options":[16],"rawInput":[32],"value":[32],"input":[32],"latInput":[32],"lngInput":[32],"suggestions":[32],"selectedSuggestion":[32],"showSuggestions":[32],"hasFocus":[32],"latitude":[32],"longitude":[32],"apiRequest":[32],"loading":[32],"hoverIndex":[32],"error":[32],"errorTimeout":[32]},[[3,"value_changed","onValueChanged"],[3,"value_valid","onValueValid"],[0,"value_invalid","onValueInvalid"],[3,"suggestions_changed","onSuggestionsChanged"],[3,"selected_suggestion","onSelectedSuggestion"],[3,"selected_custom_option","_onSelectedCustomOption"],[3,"coordinates_changed","_onCoordinatesChanged"],[3,"__hover","_onHover"],[3,"__focus","_onFocus"],[3,"__blur","_onBlur"],[3,"__error","_onError"],[3,"input","onInput"],[2,"paste","onPaste"],[3,"blur","onBlur"],[3,"focus","onFocus"],[2,"keyup","onKeyUp"]]],[4,"what3words-map",{"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"words":[1],"map_provider":[1],"map_api_key":[1],"version":[1],"libraries":[16],"language":[1],"region":[1],"lat":[2],"lng":[2],"tilt":[2],"disable_default_ui":[4],"zoom":[2],"zoom_control":[4],"zoom_control_position":[2],"map_type_id":[1],"map_type_control":[4],"map_type_control_position":[2],"scale_control":[4],"street_view_control":[4],"street_view_control_position":[2],"rotate_control":[4],"rotate_control_position":[2],"fullscreen_control":[4],"fullscreen_control_position":[2],"search_control_position":[2],"current_location_control_position":[2],"selected_zoom":[2],"current_location":[4],"watch_location":[4],"marker_icon":[1],"default_autosuggest_language":[1],"reset_zoom_on_select":[4],"searchControlSlot":[32],"currentLocationControlSlot":[32],"zoomControlSlot":[32],"mapTypeControlSlot":[32],"mapLoaded":[32],"input":[32],"autosuggest":[32],"placesSuggestions":[32],"request":[32],"watch_id":[32],"provider":[32],"autosuggestLanguage":[32],"setApiKey":[64],"setBaseUrl":[64],"setHeaders":[64],"setApiVersion":[64],"setWords":[64],"clearGrid":[64],"setLat":[64],"getLat":[64],"setLng":[64],"getLng":[64],"setZoom":[64],"getZoom":[64],"getBounds":[64],"panTo":[64],"setMapTypeId":[64]},[[0,"__load","onLoad"],[3,"coordinates_changed","onSelectedCoordinates"]]],[0,"what3words-symbol",{"color":[1],"size":[2]}]]],["what3words-address",[[0,"what3words-address",{"words":[1],"iconColor":[1,"icon-color"],"textColor":[1,"text-color"],"size":[2],"target":[1],"link":[4],"tooltip":[4],"tooltipLocation":[1,"tooltip-location"],"showTooltip":[4,"show-tooltip"]}]]]], options); | ||
return bootstrapLazy([["what3words-autosuggest_3",[[4,"what3words-autosuggest",{"callback":[1],"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"name":[1],"initial_value":[1025],"variant":[1],"typeahead_delay":[2],"invalid_address_error_message":[1],"strict":[4],"language":[1],"autosuggest_focus":[1],"n_focus_results":[2],"clip_to_country":[1],"clip_to_bounding_box":[1],"clip_to_circle":[1],"clip_to_polygon":[1],"return_coordinates":[4],"options":[16],"rawInput":[32],"value":[32],"input":[32],"latInput":[32],"lngInput":[32],"suggestions":[32],"selectedSuggestion":[32],"showSuggestions":[32],"hasFocus":[32],"latitude":[32],"longitude":[32],"apiRequest":[32],"loading":[32],"hoverIndex":[32],"error":[32],"errorTimeout":[32]},[[3,"value_changed","onValueChanged"],[3,"value_valid","onValueValid"],[0,"value_invalid","onValueInvalid"],[3,"suggestions_changed","onSuggestionsChanged"],[3,"selected_suggestion","onSelectedSuggestion"],[3,"selected_custom_option","_onSelectedCustomOption"],[3,"coordinates_changed","_onCoordinatesChanged"],[3,"__hover","_onHover"],[3,"__focus","_onFocus"],[3,"__blur","_onBlur"],[3,"__error","_onError"],[3,"input","onInput"],[2,"paste","onPaste"],[3,"blur","onBlur"],[3,"focus","onFocus"],[2,"keyup","onKeyUp"]]],[4,"what3words-map",{"api_key":[1],"headers":[1],"base_url":[1],"api_version":[1],"words":[1],"map_provider":[1],"map_api_key":[1],"version":[1],"libraries":[16],"language":[1],"region":[1],"lat":[2],"lng":[2],"tilt":[2],"disable_default_ui":[4],"zoom":[2],"zoom_control":[4],"zoom_control_position":[2],"map_type_id":[1],"map_type_control":[4],"map_type_control_position":[2],"scale_control":[4],"street_view_control":[4],"street_view_control_position":[2],"rotate_control":[4],"rotate_control_position":[2],"fullscreen_control":[4],"fullscreen_control_position":[2],"search_control_position":[2],"current_location_control_position":[2],"selected_zoom":[2],"current_location":[4],"watch_location":[4],"marker_icon":[1],"searchControlSlot":[32],"currentLocationControlSlot":[32],"zoomControlSlot":[32],"mapTypeControlSlot":[32],"mapLoaded":[32],"input":[32],"autosuggest":[32],"placesSuggestions":[32],"request":[32],"watch_id":[32],"provider":[32],"current_location_coordinates":[32],"setApiKey":[64],"setBaseUrl":[64],"setHeaders":[64],"setApiVersion":[64],"setWords":[64],"clearGrid":[64],"setLat":[64],"getLat":[64],"setLng":[64],"getLng":[64],"setZoom":[64],"getZoom":[64],"getBounds":[64],"panTo":[64],"setMapTypeId":[64]},[[0,"__load","onLoad"],[3,"coordinates_changed","onSelectedCoordinates"]]],[0,"what3words-symbol",{"color":[1],"size":[2]}]]],["what3words-address",[[0,"what3words-address",{"words":[1],"iconColor":[1,"icon-color"],"textColor":[1,"text-color"],"size":[2],"target":[1],"link":[4],"tooltip":[4],"tooltipLocation":[1,"tooltip-location"],"showTooltip":[4,"show-tooltip"]}]]]], options); | ||
}); |
@@ -54,6 +54,2 @@ /* eslint-disable */ | ||
"current_location_control_position": number; | ||
/** | ||
* Language default used when invoking the autosuggest sdk. Useful to maintain parity between 3wa search and site language | ||
*/ | ||
"default_autosuggest_language": string; | ||
"disable_default_ui": boolean; | ||
@@ -82,6 +78,2 @@ "fullscreen_control": boolean; | ||
"region": string; | ||
/** | ||
* Reset map level zoom to selected_zoom after panning to user-selected autosuggest suggestion | ||
*/ | ||
"reset_zoom_on_select": boolean; | ||
"rotate_control": boolean; | ||
@@ -208,6 +200,2 @@ "rotate_control_position": number; | ||
"current_location_control_position"?: number; | ||
/** | ||
* Language default used when invoking the autosuggest sdk. Useful to maintain parity between 3wa search and site language | ||
*/ | ||
"default_autosuggest_language"?: string; | ||
"disable_default_ui"?: boolean; | ||
@@ -235,6 +223,2 @@ "fullscreen_control"?: boolean; | ||
"region"?: string; | ||
/** | ||
* Reset map level zoom to selected_zoom after panning to user-selected autosuggest suggestion | ||
*/ | ||
"reset_zoom_on_select"?: boolean; | ||
"rotate_control"?: boolean; | ||
@@ -241,0 +225,0 @@ "rotate_control_position"?: number; |
@@ -41,6 +41,2 @@ import { ApiVersion, Coordinates } from '@what3words/api'; | ||
marker_icon: string; | ||
/** Language default used when invoking the autosuggest sdk. Useful to maintain parity between 3wa search and site language */ | ||
default_autosuggest_language: string; | ||
/** Reset map level zoom to selected_zoom after panning to user-selected autosuggest suggestion */ | ||
reset_zoom_on_select: boolean; | ||
private selected_square; | ||
@@ -61,3 +57,3 @@ private coordinates_changed; | ||
private provider; | ||
private autosuggestLanguage; | ||
private current_location_coordinates; | ||
setApiKey(key: string): Promise<void>; | ||
@@ -101,3 +97,2 @@ setBaseUrl(host: string): Promise<void>; | ||
private setMapLoaded; | ||
private setAutosuggestLanguage; | ||
private onCurrentPositionSuccess; | ||
@@ -104,0 +99,0 @@ private onCurrentPositionFailure; |
@@ -1,1 +0,1 @@ | ||
export{s as sdk}from"./p-d24ffe40.js"; | ||
export{s as sdk}from"./p-b8544ce1.js"; |
@@ -1,1 +0,1 @@ | ||
import{p as o,b as e}from"./p-73fa7d3b.js";import{g as t}from"./p-01986118.js";import"./p-d24ffe40.js";import"./p-b2b9ff10.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),o(t)})().then((o=>(t(),e([["p-31868eca",[[4,"what3words-autosuggest",{callback:[1],api_key:[1],headers:[1],base_url:[1],api_version:[1],name:[1],initial_value:[1025],variant:[1],typeahead_delay:[2],invalid_address_error_message:[1],strict:[4],language:[1],autosuggest_focus:[1],n_focus_results:[2],clip_to_country:[1],clip_to_bounding_box:[1],clip_to_circle:[1],clip_to_polygon:[1],return_coordinates:[4],options:[16],rawInput:[32],value:[32],input:[32],latInput:[32],lngInput:[32],suggestions:[32],selectedSuggestion:[32],showSuggestions:[32],hasFocus:[32],latitude:[32],longitude:[32],apiRequest:[32],loading:[32],hoverIndex:[32],error:[32],errorTimeout:[32]},[[3,"value_changed","onValueChanged"],[3,"value_valid","onValueValid"],[0,"value_invalid","onValueInvalid"],[3,"suggestions_changed","onSuggestionsChanged"],[3,"selected_suggestion","onSelectedSuggestion"],[3,"selected_custom_option","_onSelectedCustomOption"],[3,"coordinates_changed","_onCoordinatesChanged"],[3,"__hover","_onHover"],[3,"__focus","_onFocus"],[3,"__blur","_onBlur"],[3,"__error","_onError"],[3,"input","onInput"],[2,"paste","onPaste"],[3,"blur","onBlur"],[3,"focus","onFocus"],[2,"keyup","onKeyUp"]]],[4,"what3words-map",{api_key:[1],headers:[1],base_url:[1],api_version:[1],words:[1],map_provider:[1],map_api_key:[1],version:[1],libraries:[16],language:[1],region:[1],lat:[2],lng:[2],tilt:[2],disable_default_ui:[4],zoom:[2],zoom_control:[4],zoom_control_position:[2],map_type_id:[1],map_type_control:[4],map_type_control_position:[2],scale_control:[4],street_view_control:[4],street_view_control_position:[2],rotate_control:[4],rotate_control_position:[2],fullscreen_control:[4],fullscreen_control_position:[2],search_control_position:[2],current_location_control_position:[2],selected_zoom:[2],current_location:[4],watch_location:[4],marker_icon:[1],default_autosuggest_language:[1],reset_zoom_on_select:[4],searchControlSlot:[32],currentLocationControlSlot:[32],zoomControlSlot:[32],mapTypeControlSlot:[32],mapLoaded:[32],input:[32],autosuggest:[32],placesSuggestions:[32],request:[32],watch_id:[32],provider:[32],autosuggestLanguage:[32],setApiKey:[64],setBaseUrl:[64],setHeaders:[64],setApiVersion:[64],setWords:[64],clearGrid:[64],setLat:[64],getLat:[64],setLng:[64],getLng:[64],setZoom:[64],getZoom:[64],getBounds:[64],panTo:[64],setMapTypeId:[64]},[[0,"__load","onLoad"],[3,"coordinates_changed","onSelectedCoordinates"]]],[0,"what3words-symbol",{color:[1],size:[2]}]]],["p-744a4485",[[0,"what3words-address",{words:[1],iconColor:[1,"icon-color"],textColor:[1,"text-color"],size:[2],target:[1],link:[4],tooltip:[4],tooltipLocation:[1,"tooltip-location"],showTooltip:[4,"show-tooltip"]}]]]],o)))); | ||
import{p as o,b as e}from"./p-73fa7d3b.js";import{g as t}from"./p-05e8a7f7.js";import"./p-b8544ce1.js";import"./p-735add43.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),o(t)})().then((o=>(t(),e([["p-2a0d26f1",[[4,"what3words-autosuggest",{callback:[1],api_key:[1],headers:[1],base_url:[1],api_version:[1],name:[1],initial_value:[1025],variant:[1],typeahead_delay:[2],invalid_address_error_message:[1],strict:[4],language:[1],autosuggest_focus:[1],n_focus_results:[2],clip_to_country:[1],clip_to_bounding_box:[1],clip_to_circle:[1],clip_to_polygon:[1],return_coordinates:[4],options:[16],rawInput:[32],value:[32],input:[32],latInput:[32],lngInput:[32],suggestions:[32],selectedSuggestion:[32],showSuggestions:[32],hasFocus:[32],latitude:[32],longitude:[32],apiRequest:[32],loading:[32],hoverIndex:[32],error:[32],errorTimeout:[32]},[[3,"value_changed","onValueChanged"],[3,"value_valid","onValueValid"],[0,"value_invalid","onValueInvalid"],[3,"suggestions_changed","onSuggestionsChanged"],[3,"selected_suggestion","onSelectedSuggestion"],[3,"selected_custom_option","_onSelectedCustomOption"],[3,"coordinates_changed","_onCoordinatesChanged"],[3,"__hover","_onHover"],[3,"__focus","_onFocus"],[3,"__blur","_onBlur"],[3,"__error","_onError"],[3,"input","onInput"],[2,"paste","onPaste"],[3,"blur","onBlur"],[3,"focus","onFocus"],[2,"keyup","onKeyUp"]]],[4,"what3words-map",{api_key:[1],headers:[1],base_url:[1],api_version:[1],words:[1],map_provider:[1],map_api_key:[1],version:[1],libraries:[16],language:[1],region:[1],lat:[2],lng:[2],tilt:[2],disable_default_ui:[4],zoom:[2],zoom_control:[4],zoom_control_position:[2],map_type_id:[1],map_type_control:[4],map_type_control_position:[2],scale_control:[4],street_view_control:[4],street_view_control_position:[2],rotate_control:[4],rotate_control_position:[2],fullscreen_control:[4],fullscreen_control_position:[2],search_control_position:[2],current_location_control_position:[2],selected_zoom:[2],current_location:[4],watch_location:[4],marker_icon:[1],searchControlSlot:[32],currentLocationControlSlot:[32],zoomControlSlot:[32],mapTypeControlSlot:[32],mapLoaded:[32],input:[32],autosuggest:[32],placesSuggestions:[32],request:[32],watch_id:[32],provider:[32],current_location_coordinates:[32],setApiKey:[64],setBaseUrl:[64],setHeaders:[64],setApiVersion:[64],setWords:[64],clearGrid:[64],setLat:[64],getLat:[64],setLng:[64],getLng:[64],setZoom:[64],getZoom:[64],getBounds:[64],panTo:[64],setMapTypeId:[64]},[[0,"__load","onLoad"],[3,"coordinates_changed","onSelectedCoordinates"]]],[0,"what3words-symbol",{color:[1],size:[2]}]]],["p-339b4d41",[[0,"what3words-address",{words:[1],iconColor:[1,"icon-color"],textColor:[1,"text-color"],size:[2],target:[1],link:[4],tooltip:[4],tooltipLocation:[1,"tooltip-location"],showTooltip:[4,"show-tooltip"]}]]]],o)))); |
{ | ||
"name": "@what3words/javascript-components", | ||
"version": "4.1.0-alpha.14", | ||
"version": "4.1.0-alpha.15", | ||
"description": "what3words javascript sdk and web components", | ||
@@ -46,3 +46,3 @@ "main": "dist/index.cjs.js", | ||
"@stencil/core": "^2.13.0", | ||
"@what3words/api": "^4.0.5", | ||
"@what3words/api": "^4.0.8", | ||
"axios": "^0.21.1", | ||
@@ -49,0 +49,0 @@ "cross-fetch": "^3.1.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
3219191
37881
Updated@what3words/api@^4.0.8