From 79ad3c2a516d8647b1d7035be766f34e28d18330 Mon Sep 17 00:00:00 2001 From: Scott Farley Date: Wed, 20 Mar 2019 14:44:39 -0700 Subject: [PATCH 1/6] add getter/setter functions for geocoder options --- lib/index.js | 223 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 199 insertions(+), 24 deletions(-) diff --git a/lib/index.js b/lib/index.js index 7d8c1c96..72d3d550 100644 --- a/lib/index.js +++ b/lib/index.js @@ -71,7 +71,7 @@ MapboxGeocoder.prototype = { onAdd: function(map) { this._map = map; - this.options.language = this.getLanguage(); + this.setLanguage(); geocoderService = mbxGeocoder( MapboxClient({ @@ -96,7 +96,8 @@ MapboxGeocoder.prototype = { this._inputEl = document.createElement('input'); this._inputEl.type = 'text'; - this._inputEl.placeholder = this._getPlaceholderText(); + + this.setPlaceholder(); this._inputEl.addEventListener('keydown', debounce(this._onKeyDown, 200)); this._inputEl.addEventListener('change', this._onChange); @@ -124,6 +125,7 @@ MapboxGeocoder.prototype = { minLength: this.options.minLength, limit: this.options.limit }); + this._typeahead.getItemValue = function(item) { return item.place_name; }; @@ -366,6 +368,27 @@ MapboxGeocoder.prototype = { return this; }, + /** + * Get the text to use as the search bar placeholder + * + * If placeholder is provided in options, then use options.placeholder + * Otherwise, if language is provided in options, then use the localized string of the first language if available + * Otherwise use the default + * + * @returns {String} the value to use as the search bar placeholder + * @private + */ + _getPlaceholderText: function(){ + if (this.options.placeholder) return this.options.placeholder; + if (this.options.language){ + var firstLanguage = this.options.language.split(",")[0]; + var language = subtag.language(firstLanguage); + var localizedValue = localization.placeholder[language]; + if (localizedValue) return localizedValue; + } + return 'Search'; + }, + /** * Set input * @param {string} searchInput location name or other search input @@ -399,36 +422,188 @@ MapboxGeocoder.prototype = { }, /** - * Get the language to use in UI elements and when making search requests + * Set the language to use in UI elements and when making search requests * * Look first at the explicitly set options otherwise use the browser's language settings - * - * @returns {String} The language used by the geocoder + * @param {String} language Specify the language to use for response text and query result weighting. Options are IETF language tags comprised of a mandatory ISO 639-1 language code and optionally one or more IETF subtags for country or script. More than one value can also be specified, separated by commas. + * @returns {MapboxGeocoder} this */ - getLanguage: function(){ + setLanguage: function(language){ var browserLocale = navigator.language || navigator.userLanguage || navigator.browserLanguage; - return this.options.language || browserLocale; + this.options.language = language || this.options.language || browserLocale; + return this; }, /** - * Get the text to use as the search bar placeholder - * - * If placeholder is provided in options, then use options.placeholder - * Otherwise, if language is provided in options, then use the localized string of the first language if available - * Otherwise use the default - * - * @returns {String} the value to use as the search bar placeholder - * @private + * Get the language to use in UI elements and when making search requests + * @returns {String} The language(s) used by the plugin, if any */ - _getPlaceholderText: function(){ - if (this.options.placeholder) return this.options.placeholder; - if (this.options.language){ - var firstLanguage = this.options.language.split(",")[0]; - var language = subtag.language(firstLanguage); - var localizedValue = localization.placeholder[language]; - if (localizedValue) return localizedValue; - } - return 'Search'; + getLanguage: function(){ + return this.options.language; + }, + + /** + * Get the zoom level the map will move to when there is no bounding box on the selected result + * @returns {Number} the map zoom + */ + getZoom: function(){ + return this.options.zoom; + }, + + /** + * Set the zoom level + * @param {Number} zoom On geocoded result what zoom level should the map animate to when a `bbox` isn't found in the response. If a `bbox` is found the map will fit to the `bbox`. + * @returns {MapboxGeocoder} this + */ + setZoom: function(zoom){ + this.options.zoom = zoom; + return this; + }, + + /** + * Get the parameters used to fly to the selected response, if any + * @returns {MapboxGeocoder} this + */ + getFlyTo: function(){ + return this.options.flyTo; + }, + + /** + * Sets the flyTo options + * @param {Object|Boolean} flyTo + */ + setFlyTo: function(flyTo){ + this.options.flyTo = flyTo; + return this; + }, + + /** + * Get the value of the placeholder string + * @returns {String} The input element's placeholder value + */ + getPlaceholder: function(){ + return this.placeholder; + }, + + /** + * Set the value of the input element's placeholder + * @param {String} placeholder the text to use as the input element's placeholder + * @returns {MapboxGeocoder} this + */ + setPlaceholder: function(placeholder){ + this.placeholder = (placeholder) ? placeholder : this._getPlaceholderText(); + this._inputEl.placeholder = this.placeholder; + return this + }, + + /** + * Gets the bounding box used by the plugin + * @returns {Array} the bounding box, if any + */ + getBbox: function(){ + return this.options.bbox; + }, + + /** + * Sets the bounding box to limit search results to + * @param {Array} bbox a bounding box given as an array in the format [minX, minY, maxX, maxY]. + * @returns {MapboxGeocoder} this + */ + setBbox: function(bbox){ + this.options.bbox = bbox; + return this; + }, + + /** + * Get a list of the countries to limit search results to + * @returns {String} a comma separated list of countries to limit to, if any + */ + getCountries: function(){ + return this.options.countries; + }, + + /** + * Set the countries to limit search results to + * @param {String} countries a comma separated list of countries to limit to + * @returns {MapboxGeocoder} this + */ + setCountries: function(countries){ + this.options.countries = countries; + return this; + }, + + /** + * Get a list of the types to limit search results to + * @returns {String} a comma separated list of types to limit to + */ + getTypes: function(){ + return this.options.types; + }, + + /** + * Set the countries to limit search results to + * @param {String} countries a comma separated list of countries to limit to + * @returns {MapboxGeocoder} this + */ + setTypes: function(types){ + this.options.types = types; + return this; + }, + + /** + * Get the minimum length used in the plugin + * @returns {Number} + */ + getMinLength: function(){ + return this.options.minLength; + }, + + /** + * Set the minimum length value used by the plugin + * @param {Number} the minimum length + * @returns {MapboxGeocoder} this + */ + setMinLength: function(minLength){ + this.options.minLength = minLength; + if (this._typeahead) this._typeahead.minLength = minLength; + return this; + }, + + /** + * Get the limit value used by the plugin + * @returns {Number} the limit value + */ + getLimit: function(){ + return this.options.limit; + }, + + /** + * Set the limit value used by the plugin + * @param {Number} limit the number of search results to return + * @returns {MapboxGeocoder} + */ + setLimit: function(limit){ + this.options.limit = limit; + if (this._typeahead) this._typeahead.limit = limit; + return this; + }, + + /** + * Get the filter function used by the plugin + * @returns {Function} the filter function + */ + getFilter: function(){ + return this.options.filter; + }, + + /** + * Set the filter function used by the plugin + * @param {Function} filter the function to use as the filter + * @returns {MapboxGeocoder} this + */ + setFilter: function(filter){ + this.options.filter = filter; + return this; }, /** From 0535b2750ed5c87ebaba222d06b269ae1657a1e4 Mon Sep 17 00:00:00 2001 From: Scott Farley Date: Wed, 20 Mar 2019 16:19:21 -0700 Subject: [PATCH 2/6] tests for get and set functions --- lib/index.js | 2 +- test/test.geocoder.js | 136 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 72d3d550..381cf7bc 100644 --- a/lib/index.js +++ b/lib/index.js @@ -584,7 +584,7 @@ MapboxGeocoder.prototype = { */ setLimit: function(limit){ this.options.limit = limit; - if (this._typeahead) this._typeahead.limit = limit; + if (this._typeahead) this._typeahead.options.limit = limit; return this; }, diff --git a/test/test.geocoder.js b/test/test.geocoder.js index 5e5090b3..f2118f0c 100644 --- a/test/test.geocoder.js +++ b/test/test.geocoder.js @@ -513,5 +513,141 @@ test('geocoder', function(tt) { t.end(); }); + tt.test('geocoder#setLanguage', function(t){ + setup({language: 'de-DE'}); + t.equals(geocoder.options.language, 'de-DE', 'the correct language is set on initialization'); + geocoder.setLanguage('en-US'); + t.equals(geocoder.options.language, 'en-US', 'the language is changed in the geocoder options'); + t.end(); + }); + + tt.test('geocoder#getLanguage', function(t){ + setup({language: 'de-DE'}); + t.equals(geocoder.getLanguage(), 'de-DE', 'getLanguage returns the right language'); + t.end(); + }); + + tt.test('geocoder#getZoom', function(t){ + setup({zoom: 12}); + t.equals(geocoder.getZoom(), 12, 'getZoom returns the right zoom' ); + t.end(); + }); + + tt.test('geocoder#setZoom', function(t){ + setup({zoom: 14}); + t.equals(geocoder.options.zoom, 14, 'the correct zoom is set on initialization'); + geocoder.setZoom(17); + t.equals(geocoder.options.zoom, 17, 'the zoom is changed in the geocoder options'); + t.end(); + }); + + tt.test('geocoder#getFlyTo', function(t){ + setup({flyTo: false}); + t.equals(geocoder.getFlyTo(), false, 'getFlyTo returns the right value'); + t.end(); + }); + + tt.test('geocoder#setFlyTo', function(t){ + setup({flyTo: false}); + t.equals(geocoder.options.flyTo, false, 'the correct flyTo option is set on initialization'); + geocoder.setFlyTo({speed: 25}); + t.deepEqual(geocoder.options.flyTo, {speed: 25}, 'the flyTo option is changed in the geocoder options'); + t.end(); + }); + + tt.test('geocoder#getPlaceholder', function(t){ + setup({placeholder: 'Test'}); + t.equals(geocoder.getPlaceholder(), 'Test', 'getPlaceholder returns the right value'); + t.end(); + }); + + tt.test('geocoder#setPlaceholder', function(t){ + setup({placeholder: 'Test'}); + t.equals(geocoder._inputEl.placeholder, 'Test', 'the right placeholder is set on initialization'); + geocoder.setPlaceholder('Search'); + t.equals(geocoder._inputEl.placeholder, 'Search', 'the placeholder was changed in the UI element'); + t.end(); + }); + + tt.test('geocoder#getBbox', function(t){ + setup({bbox: [-1,-1,1,1]}); + t.deepEqual(geocoder.getBbox(), [-1, -1, 1, 1], 'getBbox returns the right bounding box'); + t.end(); + }); + + tt.test('geocoder#setBbox', function(t){ + setup({bbox: [-1,-1,1,1]}); + t.deepEqual(geocoder.options.bbox, [-1, -1, 1, 1], 'getBbox returns the right bounding box'); + geocoder.setBbox([-2, -2, 2, 2]) + t.deepEqual(geocoder.options.bbox, [-2, -2, 2, 2], 'the bounding box option is changed in the geocoder options'); + t.end() + }); + + tt.test('geocoder#getCountries', function(t){ + setup({countries: 'ca,us'}) + t.equals(geocoder.getCountries(), 'ca,us', 'getCountries returns the right country list'); + t.end(); + }); + + tt.test('geocoder#setCountries', function(t){ + setup({countries:'ca'}); + t.equals(geocoder.options.countries, 'ca', 'the right countries are set on initialization'); + geocoder.setCountries("ca,us"); + t.equals(geocoder.options.countries, 'ca,us', 'the countries option is changed in the geocoder options'); + t.end(); + }); + + tt.test('geocoder#getTypes', function(t){ + setup({types: 'poi'}); + t.equals(geocoder.getTypes(), 'poi', 'getTypes returns the right types list'); + t.end(); + }); + + tt.test('geocoder#setTypes', function(t){ + setup({types: 'poi'}); + t.equals(geocoder.options.types, 'poi', 'the right types are set on initializations'); + geocoder.setTypes("place,poi"); + t.equals(geocoder.options.types, 'place,poi', 'the types list is changed in the geocoder options'); + t.end(); + }); + + tt.test('geocoder#getLimit', function(t){ + setup({limit:4}); + t.equals(geocoder.getLimit(), 4, 'getLimit returns the right limit value'); + t.end(); + }); + + tt.test('geocoder#setLimit', function(t){ + setup({limit: 1}); + t.equals(geocoder.options.limit, 1, 'the correct limit is set on initialization'); + t.equals(geocoder._typeahead.options.limit, 1, 'the correct limit is set on the typeahead'); + geocoder.setLimit(4); + t.equals(geocoder.options.limit, 4, 'the limit is updated in the geocoder options'); + t.equals(geocoder._typeahead.options.limit, 4, 'the limit is updated in the typeahead options'); + t.end(); + }); + + tt.test('geocoder#getFilter', function(t){ + setup({filter: function(){ return false}}); + var filter = geocoder.getFilter(); + t.equals(typeof(filter), 'function', 'the filter is a function'); + t.deepEqual(['a', 'b', 'c'].filter(filter), [], 'the correct filter is applied'); + t.end(); + }); + + tt.test('geocoder#setFilter', function(t){ + setup({filter: function(){return true}}); + var initialFilter = geocoder.getFilter(); + var filtered = ['a', 'b', 'c'].filter(initialFilter); + t.equals(typeof(initialFilter), 'function', 'the initial filter is a function'); + t.deepEqual(filtered, ['a', 'b', 'c'], 'the initial filter is correctly applied'); + geocoder.setFilter(function(){return false}); + var nextFilter = geocoder.options.filter; + var nextFiltered = ['a', 'b', 'c'].filter(nextFilter); + t.equals(typeof(nextFilter), 'function', 'the next filter is a function'); + t.deepEqual(nextFiltered, [], 'the changed filter is correctly applied'); + t.end(); + }); + tt.end(); }); From 5cb9d6ab44e433ad0e062521466012164cb555de Mon Sep 17 00:00:00 2001 From: Scott Farley Date: Wed, 20 Mar 2019 16:48:05 -0700 Subject: [PATCH 3/6] Update documentation for new get/set functions --- API.md | 395 ++++++++++++++++++--- lib/index.js | 6 +- package-lock.json | 885 +++++++++++++++++++++------------------------- package.json | 2 +- 4 files changed, 759 insertions(+), 529 deletions(-) diff --git a/API.md b/API.md index 0db82d5b..f6b519ac 100644 --- a/API.md +++ b/API.md @@ -2,124 +2,421 @@ ### Table of Contents -- [MapboxGeocoder](#mapboxgeocoder) - - [query](#query) - - [setInput](#setinput) - - [setProximity](#setproximity) - - [getProximity](#getproximity) - - [getLanguage](#getlanguage) - - [on](#on) - - [off](#off) +- [MapboxGeocoder][1] + - [Parameters][2] + - [Examples][3] + - [query][4] + - [Parameters][5] + - [setInput][6] + - [Parameters][7] + - [setProximity][8] + - [Parameters][9] + - [getProximity][10] + - [setLanguage][11] + - [Parameters][12] + - [getLanguage][13] + - [getZoom][14] + - [setZoom][15] + - [Parameters][16] + - [getFlyTo][17] + - [setFlyTo][18] + - [Parameters][19] + - [getPlaceholder][20] + - [setPlaceholder][21] + - [Parameters][22] + - [getBbox][23] + - [setBbox][24] + - [Parameters][25] + - [getCountries][26] + - [setCountries][27] + - [Parameters][28] + - [getTypes][29] + - [setTypes][30] + - [Parameters][31] + - [getMinLength][32] + - [setMinLength][33] + - [Parameters][34] + - [getLimit][35] + - [setLimit][36] + - [Parameters][37] + - [getFilter][38] + - [setFilter][39] + - [Parameters][40] + - [on][41] + - [Parameters][42] + - [off][43] + - [Parameters][44] ## MapboxGeocoder A geocoder component using Mapbox Geocoding API -**Parameters** +### Parameters -- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** - - `options.accessToken` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Required. - - `options.origin` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Use to set a custom API origin. Defaults to . - - `options.zoom` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** On geocoded result what zoom level should the map animate to when a `bbox` isn't found in the response. If a `bbox` is found the map will fit to the `bbox`. (optional, default `16`) - - `options.flyTo` **([Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) \| [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object))?** If false, animating the map to a selected result is disabled. If true, animating the map will use the default animation parameters. If an object, the object will be passed to the flyTo map method to specify a custom animation. - - `options.placeholder` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Override the default placeholder attribute value. (optional, default `"Search"`) - - `options.proximity` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** a proximity argument: this is +- `options` **[Object][45]** + - `options.accessToken` **[String][46]** Required. + - `options.origin` **[String][46]** Use to set a custom API origin. Defaults to [https://api.mapbox.com][47]. + - `options.zoom` **[Number][48]** On geocoded result what zoom level should the map animate to when a `bbox` isn't found in the response. If a `bbox` is found the map will fit to the `bbox`. (optional, default `16`) + - `options.flyTo` **([Boolean][49] \| [Object][45])?** If false, animating the map to a selected result is disabled. If true, animating the map will use the default animation parameters. If an object, the object will be passed to the flyTo map method to specify a custom animation. + - `options.placeholder` **[String][46]** Override the default placeholder attribute value. (optional, default `"Search"`) + - `options.proximity` **[Object][45]?** a proximity argument: this is a geographical point given as an object with latitude and longitude properties. Search results closer to this point will be given higher priority. - - `options.trackProximity` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If true, the geocoder proximity will automatically update based on the map view. (optional, default `true`) - - `options.bbox` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** a bounding box argument: this is + - `options.trackProximity` **[Boolean][49]** If true, the geocoder proximity will automatically update based on the map view. (optional, default `true`) + - `options.bbox` **[Array][50]?** a bounding box argument: this is a bounding box given as an array in the format [minX, minY, maxX, maxY]. Search results will be limited to the bounding box. - - `options.countries` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** a comma separated list of country codes to + - `options.countries` **[string][46]?** a comma separated list of country codes to limit results to specified country or countries. - - `options.types` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** a comma seperated list of types that filter - results to match those specified. See + - `options.types` **[string][46]?** a comma seperated list of types that filter + results to match those specified. See [https://docs.mapbox.com/api/search/#data-types][51] for available types. If reverseGeocode is enabled, you should specify one type. If you configure more than one type, the first type will be used. - - `options.minLength` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Minimum number of characters to enter before results are shown. (optional, default `2`) - - `options.limit` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Maximum number of results to show. (optional, default `5`) - - `options.language` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Specify the language to use for response text and query result weighting. Options are IETF language tags comprised of a mandatory ISO 639-1 language code and optionally one or more IETF subtags for country or script. More than one value can also be specified, separated by commas. - - `options.filter` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** A function which accepts a Feature in the [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) format to filter out results from the Geocoding API response before they are included in the suggestions list. Return `true` to keep the item, `false` otherwise. - - `options.localGeocoder` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** A function accepting the query string which performs local geocoding to supplement results from the Mapbox Geocoding API. Expected to return an Array of GeoJSON Features in the [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) format. + - `options.minLength` **[Number][48]** Minimum number of characters to enter before results are shown. (optional, default `2`) + - `options.limit` **[Number][48]** Maximum number of results to show. (optional, default `5`) + - `options.language` **[string][46]?** Specify the language to use for response text and query result weighting. Options are IETF language tags comprised of a mandatory ISO 639-1 language code and optionally one or more IETF subtags for country or script. More than one value can also be specified, separated by commas. + - `options.filter` **[Function][52]?** A function which accepts a Feature in the [Carmen GeoJSON][53] format to filter out results from the Geocoding API response before they are included in the suggestions list. Return `true` to keep the item, `false` otherwise. + - `options.localGeocoder` **[Function][52]?** A function accepting the query string which performs local geocoding to supplement results from the Mapbox Geocoding API. Expected to return an Array of GeoJSON Features in the [Carmen GeoJSON][53] format. - `options.reverseMode` **(`"distance"` \| `"score"`)** Set the factors that are used to sort nearby results. (optional, default `'distance'`) - - `options.reverseGeocode` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Enable reverse geocoding. Defaults to false. Expects coordinates to be lat, lon. + - `options.reverseGeocode` **[boolean][49]?** Enable reverse geocoding. Defaults to false. Expects coordinates to be lat, lon. -**Examples** +### Examples ```javascript var geocoder = new MapboxGeocoder({ accessToken: mapboxgl.accessToken }); map.addControl(geocoder); ``` -Returns **[MapboxGeocoder](#mapboxgeocoder)** `this` +Returns **[MapboxGeocoder][54]** `this` ### query Set & query the input -**Parameters** +#### Parameters -- `searchInput` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** location name or other search input +- `searchInput` **[string][46]** location name or other search input -Returns **[MapboxGeocoder](#mapboxgeocoder)** this +Returns **[MapboxGeocoder][54]** this ### setInput Set input -**Parameters** +#### Parameters -- `searchInput` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** location name or other search input +- `searchInput` **[string][46]** location name or other search input -Returns **[MapboxGeocoder](#mapboxgeocoder)** this +Returns **[MapboxGeocoder][54]** this ### setProximity Set proximity -**Parameters** +#### Parameters -- `proximity` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The new options.proximity value. This is a geographical point given as an object with latitude and longitude properties. +- `proximity` **[Object][45]** The new options.proximity value. This is a geographical point given as an object with latitude and longitude properties. -Returns **[MapboxGeocoder](#mapboxgeocoder)** this +Returns **[MapboxGeocoder][54]** this ### getProximity Get proximity -Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The geocoder proximity +Returns **[Object][45]** The geocoder proximity + +### setLanguage + +Set the language to use in UI elements and when making search requests + +Look first at the explicitly set options otherwise use the browser's language settings + +#### Parameters + +- `language` **[String][46]** Specify the language to use for response text and query result weighting. Options are IETF language tags comprised of a mandatory ISO 639-1 language code and optionally one or more IETF subtags for country or script. More than one value can also be specified, separated by commas. + +Returns **[MapboxGeocoder][54]** this ### getLanguage Get the language to use in UI elements and when making search requests -Look first at the explicitly set options otherwise use the browser's language settings +Returns **[String][46]** The language(s) used by the plugin, if any + +### getZoom + +Get the zoom level the map will move to when there is no bounding box on the selected result + +Returns **[Number][48]** the map zoom + +### setZoom + +Set the zoom level + +#### Parameters + +- `zoom` **[Number][48]** On geocoded result what zoom level should the map animate to when a `bbox` isn't found in the response. If a `bbox` is found the map will fit to the `bbox`. + +Returns **[MapboxGeocoder][54]** this + +### getFlyTo + +Get the parameters used to fly to the selected response, if any + +Returns **[MapboxGeocoder][54]** this + +### setFlyTo + +Sets the flyTo options + +#### Parameters + +- `flyTo` **([Object][45] \| [Boolean][49])** If false, animating the map to a selected result is disabled. If true, animating the map will use the default animation parameters. If an object, the object will be passed to the flyTo map method to specify a custom animation. + +### getPlaceholder + +Get the value of the placeholder string + +Returns **[String][46]** The input element's placeholder value + +### setPlaceholder + +Set the value of the input element's placeholder + +#### Parameters + +- `placeholder` **[String][46]** the text to use as the input element's placeholder + +Returns **[MapboxGeocoder][54]** this + +### getBbox + +Gets the bounding box used by the plugin + +Returns **[Array][50]<[Number][48]>** the bounding box, if any + +### setBbox + +Sets the bounding box to limit search results to + +#### Parameters + +- `bbox` **[Array][50]<[Number][48]>** a bounding box given as an array in the format [minX, minY, maxX, maxY]. + +Returns **[MapboxGeocoder][54]** this + +### getCountries + +Get a list of the countries to limit search results to + +Returns **[String][46]** a comma separated list of countries to limit to, if any + +### setCountries + +Set the countries to limit search results to + +#### Parameters + +- `countries` **[String][46]** a comma separated list of countries to limit to + +Returns **[MapboxGeocoder][54]** this + +### getTypes + +Get a list of the types to limit search results to + +Returns **[String][46]** a comma separated list of types to limit to + +### setTypes + +Set the countries to limit search results to + +#### Parameters + +- `types` +- `countries` **[String][46]** a comma separated list of countries to limit to + +Returns **[MapboxGeocoder][54]** this + +### getMinLength + +Get the minimum length used in the plugin + +Returns **[Number][48]** + +### setMinLength + +Set the minimum length value used by the plugin + +#### Parameters + +- `minLength` **[Number][48]** the minimum length in characters + +Returns **[MapboxGeocoder][54]** this + +### getLimit + +Get the limit value used by the plugin + +Returns **[Number][48]** the limit value -Returns **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The language used by the geocoder +### setLimit + +Set the limit value used by the plugin + +#### Parameters + +- `limit` **[Number][48]** the number of search results to return + +Returns **[MapboxGeocoder][54]** + +### getFilter + +Get the filter function used by the plugin + +Returns **[Function][52]** the filter function + +### setFilter + +Set the filter function used by the plugin + +#### Parameters + +- `filter` **[Function][52]** the function to use as the filter + +Returns **[MapboxGeocoder][54]** this ### on Subscribe to events that happen within the plugin. -**Parameters** +#### Parameters -- `type` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name of event. Available events and the data passed into their respective event objects are:- **clear** `Emitted when the input is cleared` +- `type` **[String][46]** name of event. Available events and the data passed into their respective event objects are:- **clear** `Emitted when the input is cleared` - **loading** `{ query } Emitted when the geocoder is looking up a query` - **results** `{ results } Fired when the geocoder returns a response` - **result** `{ result } Fired when input is set` - **error** `{ error } Error as string` -- `fn` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** function that's called when the event is emitted. +- `fn` **[Function][52]** function that's called when the event is emitted. -Returns **[MapboxGeocoder](#mapboxgeocoder)** this; +Returns **[MapboxGeocoder][54]** this; ### off Remove an event -**Parameters** +#### Parameters + +- `type` **[String][46]** Event name. +- `fn` **[Function][52]** Function that should unsubscribe to the event emitted. + +Returns **[MapboxGeocoder][54]** this + +[1]: #mapboxgeocoder + +[2]: #parameters + +[3]: #examples + +[4]: #query + +[5]: #parameters-1 + +[6]: #setinput + +[7]: #parameters-2 + +[8]: #setproximity + +[9]: #parameters-3 + +[10]: #getproximity + +[11]: #setlanguage + +[12]: #parameters-4 + +[13]: #getlanguage + +[14]: #getzoom + +[15]: #setzoom + +[16]: #parameters-5 + +[17]: #getflyto + +[18]: #setflyto + +[19]: #parameters-6 + +[20]: #getplaceholder + +[21]: #setplaceholder + +[22]: #parameters-7 + +[23]: #getbbox + +[24]: #setbbox + +[25]: #parameters-8 + +[26]: #getcountries + +[27]: #setcountries + +[28]: #parameters-9 + +[29]: #gettypes + +[30]: #settypes + +[31]: #parameters-10 + +[32]: #getminlength + +[33]: #setminlength + +[34]: #parameters-11 + +[35]: #getlimit + +[36]: #setlimit + +[37]: #parameters-12 + +[38]: #getfilter + +[39]: #setfilter + +[40]: #parameters-13 + +[41]: #on + +[42]: #parameters-14 + +[43]: #off + +[44]: #parameters-15 + +[45]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object + +[46]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String + +[47]: https://api.mapbox.com + +[48]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number + +[49]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean + +[50]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array + +[51]: https://docs.mapbox.com/api/search/#data-types + +[52]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function -- `type` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Event name. -- `fn` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Function that should unsubscribe to the event emitted. +[53]: https://github.com/mapbox/carmen/blob/master/carmen-geojson.md -Returns **[MapboxGeocoder](#mapboxgeocoder)** this +[54]: #mapboxgeocoder diff --git a/lib/index.js b/lib/index.js index 381cf7bc..0ebaec0b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -470,7 +470,7 @@ MapboxGeocoder.prototype = { /** * Sets the flyTo options - * @param {Object|Boolean} flyTo + * @param {Object|Boolean} flyTo If false, animating the map to a selected result is disabled. If true, animating the map will use the default animation parameters. If an object, the object will be passed to the flyTo map method to specify a custom animation. */ setFlyTo: function(flyTo){ this.options.flyTo = flyTo; @@ -482,7 +482,7 @@ MapboxGeocoder.prototype = { * @returns {String} The input element's placeholder value */ getPlaceholder: function(){ - return this.placeholder; + return this.options.placeholder; }, /** @@ -560,7 +560,7 @@ MapboxGeocoder.prototype = { /** * Set the minimum length value used by the plugin - * @param {Number} the minimum length + * @param {Number} minLength the minimum length in characters * @returns {MapboxGeocoder} this */ setMinLength: function(minLength){ diff --git a/package-lock.json b/package-lock.json index ed7e4cf4..b2a41efa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,75 +35,12 @@ "source-map": "^0.5.0" }, "dependencies": { - "@babel/generator": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", - "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", - "dev": true, - "requires": { - "@babel/types": "^7.4.0", - "jsesc": "^2.5.1", - "lodash": "^4.17.11", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - } - }, - "@babel/helpers": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.0.tgz", - "integrity": "sha512-2Lfcn74A2WSFUbYJ76ilYE1GnegCKUHTfXxp25EL2zPZHjV7OcDncqNjl295mUH0VnB65mNriXW4J5ROvxsgGg==", - "dev": true, - "requires": { - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.0", - "@babel/types": "^7.4.0" - } - }, "@babel/parser": { "version": "7.4.0", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.0.tgz", "integrity": "sha512-ZmMhJfU/+SXXvy9ALjDZopa3T3EixQtQai89JRC48eM9OUwrxJjYjuM/0wmdl2AekytlzMVhPY8cYdLb13kpKQ==", "dev": true }, - "@babel/template": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz", - "integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.0", - "@babel/types": "^7.4.0" - } - }, - "@babel/traverse": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.0.tgz", - "integrity": "sha512-/DtIHKfyg2bBKnIN+BItaIlEg5pjAnzHOIQe5w+rHAw/rg9g0V7T4rqPX8BJPfW11kt3koyjAnTNwCzb28Y1PA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.0", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.0", - "@babel/parser": "^7.4.0", - "@babel/types": "^7.4.0", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.11" - } - }, - "@babel/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", - "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.11", - "to-fast-properties": "^2.0.0" - } - }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -113,12 +50,6 @@ "ms": "^2.1.1" } }, - "globals": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", - "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", - "dev": true - }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", @@ -134,12 +65,12 @@ } }, "@babel/generator": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.4.tgz", - "integrity": "sha512-8EXhHRFqlVVWXPezBW5keTiQi/rJMQTg/Y9uVCEZ0CAF3PKtCCaVRnp64Ii1ujhkoDhhF1fVsImoN4yJ2uz4Wg==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", + "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", "dev": true, "requires": { - "@babel/types": "^7.3.4", + "@babel/types": "^7.4.0", "jsesc": "^2.5.1", "lodash": "^4.17.11", "source-map": "^0.5.0", @@ -184,39 +115,39 @@ } }, "@babel/helper-call-delegate": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz", - "integrity": "sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.0.tgz", + "integrity": "sha512-SdqDfbVdNQCBp3WhK2mNdDvHd3BD6qbmIc43CAyjnsfCmgHMeqgDcM3BzY2lchi7HBJGJ2CVdynLWbezaE4mmQ==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.0.0", - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/helper-hoist-variables": "^7.4.0", + "@babel/traverse": "^7.4.0", + "@babel/types": "^7.4.0" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.3.4.tgz", - "integrity": "sha512-uFpzw6L2omjibjxa8VGZsJUPL5wJH0zzGKpoz0ccBkzIa6C8kWNUbiBmQ0rgOKWlHJ6qzmfa6lTiGchiV8SC+g==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.0.tgz", + "integrity": "sha512-2K8NohdOT7P6Vyp23QH4w2IleP8yG3UJsbRKwA4YP6H8fErcLkFuuEEqbF2/BYBKSNci/FWJiqm6R3VhM/QHgw==", "dev": true, "requires": { "@babel/helper-function-name": "^7.1.0", "@babel/helper-member-expression-to-functions": "^7.0.0", "@babel/helper-optimise-call-expression": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.3.4", - "@babel/helper-split-export-declaration": "^7.0.0" + "@babel/helper-replace-supers": "^7.4.0", + "@babel/helper-split-export-declaration": "^7.4.0" } }, "@babel/helper-define-map": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz", - "integrity": "sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.0.tgz", + "integrity": "sha512-wAhQ9HdnLIywERVcSvX40CEJwKdAa1ID4neI9NXQPDOHwwA+57DqwLiPEVy2AIyWzAk0CQ8qx4awO0VUURwLtA==", "dev": true, "requires": { "@babel/helper-function-name": "^7.1.0", - "@babel/types": "^7.0.0", - "lodash": "^4.17.10" + "@babel/types": "^7.4.0", + "lodash": "^4.17.11" } }, "@babel/helper-explode-assignable-expression": { @@ -250,12 +181,12 @@ } }, "@babel/helper-hoist-variables": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz", - "integrity": "sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.0.tgz", + "integrity": "sha512-/NErCuoe/et17IlAQFKWM24qtyYYie7sFIrW/tIQXpck6vAu2hhtYYsKLBWQV+BQZMbcIYPU/QMYuTufrY4aQw==", "dev": true, "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.4.0" } }, "@babel/helper-member-expression-to-functions": { @@ -328,15 +259,15 @@ } }, "@babel/helper-replace-supers": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.3.4.tgz", - "integrity": "sha512-pvObL9WVf2ADs+ePg0jrqlhHoxRXlOa+SHRHzAXIz2xkYuOHfGl+fKxPMaS4Fq+uje8JQPobnertBBvyrWnQ1A==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.0.tgz", + "integrity": "sha512-PVwCVnWWAgnal+kJ+ZSAphzyl58XrFeSKSAJRiqg5QToTsjL+Xu1f9+RJ+d+Q0aPhPfBGaYfkox66k86thxNSg==", "dev": true, "requires": { "@babel/helper-member-expression-to-functions": "^7.0.0", "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.3.4", - "@babel/types": "^7.3.4" + "@babel/traverse": "^7.4.0", + "@babel/types": "^7.4.0" } }, "@babel/helper-simple-access": { @@ -356,19 +287,6 @@ "dev": true, "requires": { "@babel/types": "^7.4.0" - }, - "dependencies": { - "@babel/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", - "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.11", - "to-fast-properties": "^2.0.0" - } - } } }, "@babel/helper-wrap-function": { @@ -383,6 +301,17 @@ "@babel/types": "^7.2.0" } }, + "@babel/helpers": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.0.tgz", + "integrity": "sha512-2Lfcn74A2WSFUbYJ76ilYE1GnegCKUHTfXxp25EL2zPZHjV7OcDncqNjl295mUH0VnB65mNriXW4J5ROvxsgGg==", + "dev": true, + "requires": { + "@babel/template": "^7.4.0", + "@babel/traverse": "^7.4.0", + "@babel/types": "^7.4.0" + } + }, "@babel/highlight": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", @@ -456,117 +385,15 @@ "requires": { "@babel/helper-create-class-features-plugin": "^7.4.0", "@babel/helper-plugin-utils": "^7.0.0" - }, - "dependencies": { - "@babel/generator": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", - "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", - "dev": true, - "requires": { - "@babel/types": "^7.4.0", - "jsesc": "^2.5.1", - "lodash": "^4.17.11", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - } - }, - "@babel/helper-create-class-features-plugin": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.0.tgz", - "integrity": "sha512-2K8NohdOT7P6Vyp23QH4w2IleP8yG3UJsbRKwA4YP6H8fErcLkFuuEEqbF2/BYBKSNci/FWJiqm6R3VhM/QHgw==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-member-expression-to-functions": "^7.0.0", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.4.0", - "@babel/helper-split-export-declaration": "^7.4.0" - } - }, - "@babel/helper-replace-supers": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.0.tgz", - "integrity": "sha512-PVwCVnWWAgnal+kJ+ZSAphzyl58XrFeSKSAJRiqg5QToTsjL+Xu1f9+RJ+d+Q0aPhPfBGaYfkox66k86thxNSg==", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.0.0", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.4.0", - "@babel/types": "^7.4.0" - } - }, - "@babel/parser": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.0.tgz", - "integrity": "sha512-ZmMhJfU/+SXXvy9ALjDZopa3T3EixQtQai89JRC48eM9OUwrxJjYjuM/0wmdl2AekytlzMVhPY8cYdLb13kpKQ==", - "dev": true - }, - "@babel/traverse": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.0.tgz", - "integrity": "sha512-/DtIHKfyg2bBKnIN+BItaIlEg5pjAnzHOIQe5w+rHAw/rg9g0V7T4rqPX8BJPfW11kt3koyjAnTNwCzb28Y1PA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.0", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.0", - "@babel/parser": "^7.4.0", - "@babel/types": "^7.4.0", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.11" - } - }, - "@babel/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", - "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.11", - "to-fast-properties": "^2.0.0" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "globals": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", - "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } } }, "@babel/plugin-proposal-decorators": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.3.0.tgz", - "integrity": "sha512-3W/oCUmsO43FmZIqermmq6TKaRSYhmh/vybPfVFwQWdSb8xwki38uAIvknCRzuyHRuYfCYmJzL9or1v0AffPjg==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.4.0.tgz", + "integrity": "sha512-d08TLmXeK/XbgCo7ZeZ+JaeZDtDai/2ctapTRsWWkkmy7G/cqz8DQN/HlWG7RR4YmfXxmExsbU3SuCjlM7AtUg==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.3.0", + "@babel/helper-create-class-features-plugin": "^7.4.0", "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-syntax-decorators": "^7.2.0" } @@ -663,9 +490,9 @@ } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.3.4.tgz", - "integrity": "sha512-j7VQmbbkA+qrzNqbKHrBsW3ddFnOeva6wzSe/zB7T+xaxGc+RCpwo44wCmRixAIGRoIpmVgvzFzNJqQcO3/9RA==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.0.tgz", + "integrity": "sha512-uTNi8pPYyUH2eWHyYWWSYJKwKg34hhgl4/dbejEjL+64OhbHjTX7wEVWMQl82tEmdDsGeu77+s8HHLS627h6OQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -713,14 +540,14 @@ } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz", - "integrity": "sha512-LvRVYb7kikuOtIoUeWTkOxQEV1kYvL5B6U3iWEGCzPNRus1MzJweFqORTj+0jkxozkTSYNJozPOddxmqdqsRpw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.0.tgz", + "integrity": "sha512-h/KjEZ3nK9wv1P1FSNb9G079jXrNYR0Ko+7XkOx85+gM24iZbPn0rh4vCftk+5QKY7y1uByFataBTmX7irEF1w==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/helper-regex": "^7.0.0", - "regexpu-core": "^4.2.0" + "regexpu-core": "^4.5.4" } }, "@babel/plugin-syntax-async-generators": { @@ -913,9 +740,9 @@ } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.3.4.tgz", - "integrity": "sha512-Y7nCzv2fw/jEZ9f678MuKdMo99MFDJMT/PvD9LisrR5JDFcJH6vYeH6RnjVt3p5tceyGRvTtEN0VOlU+rgHZjA==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.0.tgz", + "integrity": "sha512-EeaFdCeUULM+GPFEsf7pFcNSxM7hYjoj5fiYbyuiXobW4JhFnjAv9OWzNwHyHcKoPNpAfeRDuW6VyaXEDUBa7g==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -933,9 +760,9 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.3.4.tgz", - "integrity": "sha512-blRr2O8IOZLAOJklXLV4WhcEzpYafYQKSGT3+R26lWG41u/FODJuBggehtOwilVAcFu393v3OFj+HmaE6tVjhA==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.0.tgz", + "integrity": "sha512-AWyt3k+fBXQqt2qb9r97tn3iBwFpiv9xdAiG+Gr2HpAZpuayvbL55yWrsV3MyHvXk/4vmSiedhDRl1YI2Iy5nQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -943,18 +770,18 @@ } }, "@babel/plugin-transform-classes": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.3.4.tgz", - "integrity": "sha512-J9fAvCFBkXEvBimgYxCjvaVDzL6thk0j0dBvCeZmIUDBwyt+nv6HfbImsSrWsYXfDNDivyANgJlFXDUWRTZBuA==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.0.tgz", + "integrity": "sha512-XGg1Mhbw4LDmrO9rSTNe+uI79tQPdGs0YASlxgweYRLZqo/EQktjaOV4tchL/UZbM0F+/94uOipmdNGoaGOEYg==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-define-map": "^7.1.0", + "@babel/helper-define-map": "^7.4.0", "@babel/helper-function-name": "^7.1.0", "@babel/helper-optimise-call-expression": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.3.4", - "@babel/helper-split-export-declaration": "^7.0.0", + "@babel/helper-replace-supers": "^7.4.0", + "@babel/helper-split-export-declaration": "^7.4.0", "globals": "^11.1.0" }, "dependencies": { @@ -976,9 +803,9 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.3.2.tgz", - "integrity": "sha512-Lrj/u53Ufqxl/sGxyjsJ2XNtNuEjDyjpqdhMNh5aZ+XFOdThL46KBj27Uem4ggoezSYBxKWAil6Hu8HtwqesYw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.0.tgz", + "integrity": "sha512-HySkoatyYTY3ZwLI8GGvkRWCFrjAGXUHur5sMecmCIdIharnlcWWivOqDJI76vvmVZfzwb6G08NREsrY96RhGQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" @@ -1015,9 +842,9 @@ } }, "@babel/plugin-transform-flow-strip-types": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.3.4.tgz", - "integrity": "sha512-PmQC9R7DwpBFA+7ATKMyzViz3zCaMNouzZMPZN2K5PnbBbtL3AXFYTkDk+Hey5crQq2A90UG5Uthz0mel+XZrA==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.4.0.tgz", + "integrity": "sha512-C4ZVNejHnfB22vI2TYN4RUp2oCmq6cSEAg4RygSvYZUECRqUu9O4PMEMNJ4wsemaRGg27BbgYctG4BZh+AgIHw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -1025,9 +852,9 @@ } }, "@babel/plugin-transform-for-of": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz", - "integrity": "sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.0.tgz", + "integrity": "sha512-vWdfCEYLlYSxbsKj5lGtzA49K3KANtb8qCPQ1em07txJzsBwY+cKJzBHizj5fl3CCx7vt+WPdgDLTHmydkbQSQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" @@ -1063,9 +890,9 @@ } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz", - "integrity": "sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.0.tgz", + "integrity": "sha512-iWKAooAkipG7g1IY0eah7SumzfnIT3WNhT4uYB2kIsvHnNSB6MDYVa5qyICSwaTBDBY2c4SnJ3JtEa6ltJd6Jw==", "dev": true, "requires": { "@babel/helper-module-transforms": "^7.1.0", @@ -1074,12 +901,12 @@ } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.3.4.tgz", - "integrity": "sha512-VZ4+jlGOF36S7TjKs8g4ojp4MEI+ebCQZdswWb/T9I4X84j8OtFAyjXjt/M16iIm5RIZn0UMQgg/VgIwo/87vw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.0.tgz", + "integrity": "sha512-gjPdHmqiNhVoBqus5qK60mWPp1CmYWp/tkh11mvb0rrys01HycEGD7NvvSoKXlWEfSM9TcL36CpsK8ElsADptQ==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.0.0", + "@babel/helper-hoist-variables": "^7.4.0", "@babel/helper-plugin-utils": "^7.0.0" } }, @@ -1103,9 +930,9 @@ } }, "@babel/plugin-transform-new-target": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz", - "integrity": "sha512-yin069FYjah+LbqfGeTfzIBODex/e++Yfa0rH0fpfam9uTbuEeEOx5GLGr210ggOV77mVRNoeqSYqeuaqSzVSw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.0.tgz", + "integrity": "sha512-6ZKNgMQmQmrEX/ncuCwnnw1yVGoaOW5KpxNhoWI7pCQdA0uZ0HqHGqenCUIENAnxRjy2WwNQ30gfGdIgqJXXqw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" @@ -1122,12 +949,12 @@ } }, "@babel/plugin-transform-parameters": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.3.3.tgz", - "integrity": "sha512-IrIP25VvXWu/VlBWTpsjGptpomtIkYrN/3aDp4UKm7xK6UxZY88kcJ1UwETbzHAlwN21MnNfwlar0u8y3KpiXw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.0.tgz", + "integrity": "sha512-Xqv6d1X+doyiuCGDoVJFtlZx0onAX0tnc3dY8w71pv/O0dODAbusVv2Ale3cGOwfiyi895ivOBhYa9DhAM8dUA==", "dev": true, "requires": { - "@babel/helper-call-delegate": "^7.1.0", + "@babel/helper-call-delegate": "^7.4.0", "@babel/helper-get-function-arity": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0" } @@ -1173,9 +1000,9 @@ } }, "@babel/plugin-transform-regenerator": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.3.4.tgz", - "integrity": "sha512-hvJg8EReQvXT6G9H2MvNPXkv9zK36Vxa1+csAVTpE1J3j0zlHplw76uudEbJxgvqZzAq9Yh45FLD4pk5mKRFQA==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.0.tgz", + "integrity": "sha512-SZ+CgL4F0wm4npojPU6swo/cK4FcbLgxLd4cWpHaNXY/NJ2dpahODCqBbAwb2rDmVszVb3SSjnk9/vik3AYdBw==", "dev": true, "requires": { "regenerator-transform": "^0.13.4" @@ -1240,51 +1067,53 @@ } }, "@babel/preset-env": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.3.4.tgz", - "integrity": "sha512-2mwqfYMK8weA0g0uBKOt4FE3iEodiHy9/CW0b+nWXcbL+pGzLx8ESYc+j9IIxr6LTDHWKgPm71i9smo02bw+gA==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.4.1.tgz", + "integrity": "sha512-uC2DeVb6ljdjBGhJCyHxNZfSJEVgPdUm2R5cX85GCl1Qreo5sMM5g85ntqtzRF7XRYGgnRmV5we9cdlvo1wJvg==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-proposal-async-generator-functions": "^7.2.0", "@babel/plugin-proposal-json-strings": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.3.4", + "@babel/plugin-proposal-object-rest-spread": "^7.4.0", "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.0", "@babel/plugin-syntax-async-generators": "^7.2.0", "@babel/plugin-syntax-json-strings": "^7.2.0", "@babel/plugin-syntax-object-rest-spread": "^7.2.0", "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", "@babel/plugin-transform-arrow-functions": "^7.2.0", - "@babel/plugin-transform-async-to-generator": "^7.3.4", + "@babel/plugin-transform-async-to-generator": "^7.4.0", "@babel/plugin-transform-block-scoped-functions": "^7.2.0", - "@babel/plugin-transform-block-scoping": "^7.3.4", - "@babel/plugin-transform-classes": "^7.3.4", + "@babel/plugin-transform-block-scoping": "^7.4.0", + "@babel/plugin-transform-classes": "^7.4.0", "@babel/plugin-transform-computed-properties": "^7.2.0", - "@babel/plugin-transform-destructuring": "^7.2.0", + "@babel/plugin-transform-destructuring": "^7.4.0", "@babel/plugin-transform-dotall-regex": "^7.2.0", "@babel/plugin-transform-duplicate-keys": "^7.2.0", "@babel/plugin-transform-exponentiation-operator": "^7.2.0", - "@babel/plugin-transform-for-of": "^7.2.0", + "@babel/plugin-transform-for-of": "^7.4.0", "@babel/plugin-transform-function-name": "^7.2.0", "@babel/plugin-transform-literals": "^7.2.0", "@babel/plugin-transform-modules-amd": "^7.2.0", - "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "@babel/plugin-transform-modules-systemjs": "^7.3.4", + "@babel/plugin-transform-modules-commonjs": "^7.4.0", + "@babel/plugin-transform-modules-systemjs": "^7.4.0", "@babel/plugin-transform-modules-umd": "^7.2.0", "@babel/plugin-transform-named-capturing-groups-regex": "^7.3.0", - "@babel/plugin-transform-new-target": "^7.0.0", + "@babel/plugin-transform-new-target": "^7.4.0", "@babel/plugin-transform-object-super": "^7.2.0", - "@babel/plugin-transform-parameters": "^7.2.0", - "@babel/plugin-transform-regenerator": "^7.3.4", + "@babel/plugin-transform-parameters": "^7.4.0", + "@babel/plugin-transform-regenerator": "^7.4.0", "@babel/plugin-transform-shorthand-properties": "^7.2.0", "@babel/plugin-transform-spread": "^7.2.0", "@babel/plugin-transform-sticky-regex": "^7.2.0", "@babel/plugin-transform-template-literals": "^7.2.0", "@babel/plugin-transform-typeof-symbol": "^7.2.0", "@babel/plugin-transform-unicode-regex": "^7.2.0", - "browserslist": "^4.3.4", + "@babel/types": "^7.4.0", + "browserslist": "^4.4.2", + "core-js-compat": "^3.0.0", "invariant": "^2.2.2", "js-levenshtein": "^1.1.3", "semver": "^5.3.0" @@ -1337,45 +1166,45 @@ } }, "@babel/template": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz", - "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz", + "integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.2.2", - "@babel/types": "^7.2.2" + "@babel/parser": "^7.4.0", + "@babel/types": "^7.4.0" }, "dependencies": { "@babel/parser": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.4.tgz", - "integrity": "sha512-tXZCqWtlOOP4wgCp6RjRvLmfuhnqTLy9VHwRochJBCP2nDm27JnnuFEnXFASVyQNHk36jD1tAammsCEEqgscIQ==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.0.tgz", + "integrity": "sha512-ZmMhJfU/+SXXvy9ALjDZopa3T3EixQtQai89JRC48eM9OUwrxJjYjuM/0wmdl2AekytlzMVhPY8cYdLb13kpKQ==", "dev": true } } }, "@babel/traverse": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.3.4.tgz", - "integrity": "sha512-TvTHKp6471OYEcE/91uWmhR6PrrYywQntCHSaZ8CM8Vmp+pjAusal4nGB2WCCQd0rvI7nOMKn9GnbcvTUz3/ZQ==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.0.tgz", + "integrity": "sha512-/DtIHKfyg2bBKnIN+BItaIlEg5pjAnzHOIQe5w+rHAw/rg9g0V7T4rqPX8BJPfW11kt3koyjAnTNwCzb28Y1PA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.3.4", + "@babel/generator": "^7.4.0", "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.3.4", - "@babel/types": "^7.3.4", + "@babel/helper-split-export-declaration": "^7.4.0", + "@babel/parser": "^7.4.0", + "@babel/types": "^7.4.0", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.11" }, "dependencies": { "@babel/parser": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.4.tgz", - "integrity": "sha512-tXZCqWtlOOP4wgCp6RjRvLmfuhnqTLy9VHwRochJBCP2nDm27JnnuFEnXFASVyQNHk36jD1tAammsCEEqgscIQ==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.0.tgz", + "integrity": "sha512-ZmMhJfU/+SXXvy9ALjDZopa3T3EixQtQai89JRC48eM9OUwrxJjYjuM/0wmdl2AekytlzMVhPY8cYdLb13kpKQ==", "dev": true }, "debug": { @@ -1402,9 +1231,9 @@ } }, "@babel/types": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.4.tgz", - "integrity": "sha512-WEkp8MsLftM7O/ty580wAmZzN1nDmCACc5+jFzUt+GUFNNIi3LdRlueYz0YIlmJhlZx1QYDMZL5vdWCL0fNjFQ==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", + "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -2431,12 +2260,12 @@ } }, "browserslist": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.1.tgz", - "integrity": "sha512-/pPw5IAUyqaQXGuD5vS8tcbudyPZ241jk1W5pQBsGDfcjNQt7p8qxZhgMNuygDShte1PibLFexecWUPgmVLfrg==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.2.tgz", + "integrity": "sha512-zmJVLiKLrzko0iszd/V4SsjTaomFeoVzQGYYOYgRgsbh7WNh95RgDB0CmBdFWYs/3MyFSt69NypjL/h3iaddKQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000949", + "caniuse-lite": "^1.0.30000951", "electron-to-chromium": "^1.3.116", "node-releases": "^1.1.11" } @@ -2724,15 +2553,15 @@ "dev": true }, "camelcase": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz", - "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true }, "caniuse-lite": { - "version": "1.0.30000950", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000950.tgz", - "integrity": "sha512-Cs+4U9T0okW2ftBsCIHuEYXXkki7mjXmjCh4c6PzYShk04qDEr76/iC7KwhLoWoY65wcra1XOsRD+S7BptEb5A==", + "version": "1.0.30000951", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000951.tgz", + "integrity": "sha512-eRhP+nQ6YUkIcNQ6hnvdhMkdc7n3zadog0KXNRxAZTT2kHjUb1yGn71OrPhSn8MOvlX97g5CR97kGVj8fMsXWg==", "dev": true }, "caseless": { @@ -3185,6 +3014,32 @@ "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", "dev": true }, + "core-js-compat": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.0.0.tgz", + "integrity": "sha512-W/Ppz34uUme3LmXWjMgFlYyGnbo1hd9JvA0LNQ4EmieqVjg2GPYbj3H6tcdP2QGPGWdRKUqZVbVKLNIFVs/HiA==", + "dev": true, + "requires": { + "browserslist": "^4.5.1", + "core-js": "3.0.0", + "core-js-pure": "3.0.0", + "semver": "^5.6.0" + }, + "dependencies": { + "core-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.0.tgz", + "integrity": "sha512-WBmxlgH2122EzEJ6GH8o9L/FeoUKxxxZ6q6VUxoTlsE4EvbTWKJb447eyVxTEuq0LpXjlq/kCB2qgBvsYRkLvQ==", + "dev": true + } + } + }, + "core-js-pure": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.0.0.tgz", + "integrity": "sha512-yPiS3fQd842RZDgo/TAKGgS0f3p2nxssF1H65DIZvZv0Od5CygP8puHXn3IQiM/39VAvgCbdaMQpresrbGgt9g==", + "dev": true + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -3605,14 +3460,17 @@ }, "doctrine-temporary-fork": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true + "resolved": "https://registry.npmjs.org/doctrine-temporary-fork/-/doctrine-temporary-fork-2.0.1.tgz", + "integrity": "sha512-+GQh3niRkKtSr7cKDo8po+NHkJZyC2Ebwvjz9fvq0ReQr9kIDS6BY9MDrzx+KbbLxvSj3vD/eUaeIoURHzEAFQ==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } }, "documentation": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/documentation/-/documentation-9.3.1.tgz", - "integrity": "sha512-egP7WcZLCNjYwIo97iArQ51/bCpLTOKEQaqPrvGVM2q0zo+JMy5tc+BpuVDtswW39YvP083L7EHrvyhfjol7ww==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/documentation/-/documentation-9.3.0.tgz", + "integrity": "sha512-HGHuYATpJz2VKI7TjuAnUFrE+xzLWzp2ttz1oRBPVYPTtzGCSZE6RDiYYCyErOW18BtxCA8o7jzt+VpcWv/ZCg==", "dev": true, "requires": { "@babel/core": "^7.1.2", @@ -3679,7 +3537,7 @@ "vinyl": "^2.1.0", "vinyl-fs": "^3.0.2", "vue-template-compiler": "^2.5.16", - "yargs": "^12.0.2" + "yargs": "^9.0.1" }, "dependencies": { "ansi-regex": { @@ -3708,25 +3566,25 @@ "supports-color": "^5.3.0" } }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", "is-stream": "^1.1.0", "npm-run-path": "^2.0.0", "p-finally": "^1.0.0", @@ -3743,36 +3601,12 @@ "locate-path": "^3.0.0" } }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -3799,17 +3633,92 @@ "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==", "dev": true }, + "module-deps-sortable": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/module-deps-sortable/-/module-deps-sortable-5.0.0.tgz", + "integrity": "sha512-bnGGeghQmz/t/6771/KC4FmxpVm126iR6AAzzq4N6hVZQVl4+ZZBv+VF3PJmDyxXtVtgcgTSSP7NL+jq1QAHrg==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "browser-resolve": "^1.7.0", + "cached-path-relative": "^1.0.0", + "concat-stream": "~1.5.0", + "defined": "^1.0.0", + "detective": "^4.0.0", + "duplexer2": "^0.1.2", + "inherits": "^2.0.1", + "readable-stream": "^2.0.2", + "resolve": "^1.1.3", + "stream-combiner2": "^1.1.1", + "subarg": "^1.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "concat-stream": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "~2.0.0", + "typedarray": "~0.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + } + } + } + } + }, "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -3820,6 +3729,12 @@ "json-parse-better-errors": "^1.0.1" } }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "path-type": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", @@ -3843,6 +3758,12 @@ "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, "read-pkg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", @@ -3874,6 +3795,12 @@ "strip-ansi": "^4.0.0" } }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -3905,33 +3832,111 @@ "dev": true }, "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-9.0.1.tgz", + "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", + "camelcase": "^4.1.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", + "os-locale": "^2.0.0", + "read-pkg-up": "^2.0.0", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", "string-width": "^2.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" + "y18n": "^3.2.1", + "yargs-parser": "^7.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + } } }, "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", "dev": true, "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "camelcase": "^4.1.0" } } } @@ -3997,9 +4002,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.116", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.116.tgz", - "integrity": "sha512-NKwKAXzur5vFCZYBHpdWjTMO8QptNLNP80nItkSIgUOapPAo9Uia+RvkCaZJtO7fhQaVElSvBPWEc2ku6cKsPA==", + "version": "1.3.117", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.117.tgz", + "integrity": "sha512-BxNTJ9Zu+WW5hbBg0fnjGfS1X8AOfJEtBmYlVDenPmkmkXmt3WgbPw7y/47mAZomcVB4F2/NZQB/KNz7OdCC2g==", "dev": true }, "elegant-spinner": { @@ -7993,6 +7998,16 @@ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, "magic-string": { "version": "0.22.5", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", @@ -8002,15 +8017,6 @@ "vlq": "^0.2.2" } }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -8294,28 +8300,12 @@ "dev": true }, "mem": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.2.0.tgz", - "integrity": "sha512-5fJxa68urlY0Ir8ijatKa3eRz5lwXnRCTvo9+TbTGAuTFJOwpGcY0X05moBd0nW45965Njt4CDI2GFQoG8DvqA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.0.0.tgz", - "integrity": "sha512-jbex9Yd/3lmICXwYT6gA/j2mNQGU48wCh/VzRd+/Y/PjYQtlg1gLMdZqvu9s/xH7qKvngxRObl56XZR609IMbA==", - "dev": true - }, - "p-is-promise": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", - "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==", - "dev": true - } + "mimic-fn": "^1.0.0" } }, "merge-source-map": { @@ -8525,69 +8515,6 @@ } } }, - "module-deps-sortable": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/module-deps-sortable/-/module-deps-sortable-5.0.0.tgz", - "integrity": "sha512-bnGGeghQmz/t/6771/KC4FmxpVm126iR6AAzzq4N6hVZQVl4+ZZBv+VF3PJmDyxXtVtgcgTSSP7NL+jq1QAHrg==", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "browser-resolve": "^1.7.0", - "cached-path-relative": "^1.0.0", - "concat-stream": "~1.5.0", - "defined": "^1.0.0", - "detective": "^4.0.0", - "duplexer2": "^0.1.2", - "inherits": "^2.0.1", - "readable-stream": "^2.0.2", - "resolve": "^1.1.3", - "stream-combiner2": "^1.1.1", - "subarg": "^1.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "concat-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "~2.0.0", - "typedarray": "~0.0.5" - }, - "dependencies": { - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - } - } - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -9011,12 +8938,6 @@ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==" }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -9591,6 +9512,12 @@ "integrity": "sha512-Fx65lf9/YDn3hUX08XUc0J8rSux36rEsyiv21ZGUC1mOyeM3lTRpZLcrm8aAolzS4itwVfm7TAPyxC2E5zd6xg==", "dev": true }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, "psl": { "version": "1.1.31", "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", @@ -12608,9 +12535,9 @@ } }, "vue-template-compiler": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.9.tgz", - "integrity": "sha512-QgO0LSCdeH6zUMSgtqel+yDWsZWQPXiWBdFg9qzOhWfQL8vZ+ywinAzE04rm1XrWc+3SU0YAdWISlEgs/i8WWA==", + "version": "2.6.10", + "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.10.tgz", + "integrity": "sha512-jVZkw4/I/HT5ZMvRnhv78okGusqe0+qH2A0Em0Cp8aq78+NK9TII263CDVz2QXZsIT+yyV/gZc/j/vlwa+Epyg==", "dev": true, "requires": { "de-indent": "^1.0.2", @@ -12794,6 +12721,12 @@ "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", "dev": true }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, "yargs": { "version": "6.6.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", diff --git a/package.json b/package.json index 84d14055..3df6da19 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "brfs": "^2.0.2", "browserify": "^16.2.3", "budo": "^11.6.1", - "documentation": "^9.3.1", + "documentation": "9.3.0", "envify": "^3.4.1", "eslint": "^3.19.0", "husky": "^1.3.1", From 344775949353dcb0c0f7478e7d2c3a5fef78fcc6 Mon Sep 17 00:00:00 2001 From: Scott Farley Date: Thu, 21 Mar 2019 15:07:44 -0700 Subject: [PATCH 4/6] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43fd3f60..7b891f4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Remove hardcoded IDs in bounding box exception list - Fix duplicate event bug - Fix trapped focus [#220](https://github.com/mapbox/mapbox-gl-geocoder/issues/220) +- Add `get` and `set` methods for constructor options [#226](https://github.com/mapbox/mapbox-gl-geocoder/pull/226) ## v3.1.6 - Resolve npm publish failure From 524f5985d752ffcf056ec17115ce43b220174948 Mon Sep 17 00:00:00 2001 From: Scott Farley Date: Fri, 22 Mar 2019 14:41:06 -0700 Subject: [PATCH 5/6] Documentation updates suggested by @katydecorah --- API.md | 26 +++++++++++++------------- lib/index.js | 26 +++++++++++++------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/API.md b/API.md index f7a83938..582b5bd3 100644 --- a/API.md +++ b/API.md @@ -178,7 +178,7 @@ Set the zoom level #### Parameters -- `zoom` **[Number][51]** On geocoded result what zoom level should the map animate to when a `bbox` isn't found in the response. If a `bbox` is found the map will fit to the `bbox`. +- `zoom` **[Number][51]** The zoom level that the map should animate to when a `bbox` isn't found in the response. If a `bbox` is found the map will fit to the `bbox`. Returns **[MapboxGeocoder][57]** this @@ -190,7 +190,7 @@ Returns **[MapboxGeocoder][57]** this ### setFlyTo -Sets the flyTo options +Set the flyTo options #### Parameters @@ -214,13 +214,13 @@ Returns **[MapboxGeocoder][57]** this ### getBbox -Gets the bounding box used by the plugin +Get the bounding box used by the plugin Returns **[Array][53]<[Number][51]>** the bounding box, if any ### setBbox -Sets the bounding box to limit search results to +Set the bounding box to limit search results to #### Parameters @@ -252,24 +252,24 @@ Returns **[String][49]** a comma separated list of types to limit to ### setTypes -Set the countries to limit search results to +Set the types to limit search results to #### Parameters - `types` -- `countries` **[String][49]** a comma separated list of countries to limit to +- `countries` **[String][49]** a comma separated list of types to limit to Returns **[MapboxGeocoder][57]** this ### getMinLength -Get the minimum length used in the plugin +Get the minimum number of characters typed to trigger results used in the plugin -Returns **[Number][51]** +Returns **[Number][51]** The minimum length in characters before a search is triggered ### setMinLength -Set the minimum length value used by the plugin +Set the minimum number of characters typed to trigger results used by the plugin #### Parameters @@ -281,11 +281,11 @@ Returns **[MapboxGeocoder][57]** this Get the limit value used by the plugin -Returns **[Number][51]** the limit value +Returns **[Number][51]** The limit value for the number of results to display used by the plugin ### setLimit -Set the limit value used by the plugin +Set the limit value for the number of results to display used by the plugin #### Parameters @@ -301,11 +301,11 @@ Returns **[Function][55]** the filter function ### setFilter -Set the filter function used by the plugin +Set the filter function used by the plugin. #### Parameters -- `filter` **[Function][55]** the function to use as the filter +- `filter` **[Function][55]** A function which accepts a Feature in the [Carmen GeoJSON][56] format to filter out results from the Geocoding API response before they are included in the suggestions list. Return `true` to keep the item, `false` otherwise. Returns **[MapboxGeocoder][57]** this diff --git a/lib/index.js b/lib/index.js index 3577e1b4..32de94c3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -496,7 +496,7 @@ MapboxGeocoder.prototype = { /** * Set the zoom level - * @param {Number} zoom On geocoded result what zoom level should the map animate to when a `bbox` isn't found in the response. If a `bbox` is found the map will fit to the `bbox`. + * @param {Number} zoom The zoom level that the map should animate to when a `bbox` isn't found in the response. If a `bbox` is found the map will fit to the `bbox`. * @returns {MapboxGeocoder} this */ setZoom: function(zoom){ @@ -513,7 +513,7 @@ MapboxGeocoder.prototype = { }, /** - * Sets the flyTo options + * Set the flyTo options * @param {Object|Boolean} flyTo If false, animating the map to a selected result is disabled. If true, animating the map will use the default animation parameters. If an object, the object will be passed to the flyTo map method to specify a custom animation. */ setFlyTo: function(flyTo){ @@ -541,7 +541,7 @@ MapboxGeocoder.prototype = { }, /** - * Gets the bounding box used by the plugin + * Get the bounding box used by the plugin * @returns {Array} the bounding box, if any */ getBbox: function(){ @@ -549,7 +549,7 @@ MapboxGeocoder.prototype = { }, /** - * Sets the bounding box to limit search results to + * Set the bounding box to limit search results to * @param {Array} bbox a bounding box given as an array in the format [minX, minY, maxX, maxY]. * @returns {MapboxGeocoder} this */ @@ -585,8 +585,8 @@ MapboxGeocoder.prototype = { }, /** - * Set the countries to limit search results to - * @param {String} countries a comma separated list of countries to limit to + * Set the types to limit search results to + * @param {String} countries a comma separated list of types to limit to * @returns {MapboxGeocoder} this */ setTypes: function(types){ @@ -595,15 +595,15 @@ MapboxGeocoder.prototype = { }, /** - * Get the minimum length used in the plugin - * @returns {Number} + * Get the minimum number of characters typed to trigger results used in the plugin + * @returns {Number} The minimum length in characters before a search is triggered */ getMinLength: function(){ return this.options.minLength; }, /** - * Set the minimum length value used by the plugin + * Set the minimum number of characters typed to trigger results used by the plugin * @param {Number} minLength the minimum length in characters * @returns {MapboxGeocoder} this */ @@ -615,14 +615,14 @@ MapboxGeocoder.prototype = { /** * Get the limit value used by the plugin - * @returns {Number} the limit value + * @returns {Number} The limit value for the number of results to display used by the plugin */ getLimit: function(){ return this.options.limit; }, /** - * Set the limit value used by the plugin + * Set the limit value for the number of results to display used by the plugin * @param {Number} limit the number of search results to return * @returns {MapboxGeocoder} */ @@ -641,8 +641,8 @@ MapboxGeocoder.prototype = { }, /** - * Set the filter function used by the plugin - * @param {Function} filter the function to use as the filter + * Set the filter function used by the plugin. + * @param {Function} filter A function which accepts a Feature in the [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) format to filter out results from the Geocoding API response before they are included in the suggestions list. Return `true` to keep the item, `false` otherwise. * @returns {MapboxGeocoder} this */ setFilter: function(filter){ From 5c6c3398d0e04f7e432d81590cf8920fb8912676 Mon Sep 17 00:00:00 2001 From: Scott Farley Date: Fri, 22 Mar 2019 15:00:10 -0700 Subject: [PATCH 6/6] Fix last outstanding comment --- API.md | 2 +- lib/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index 582b5bd3..d09a644f 100644 --- a/API.md +++ b/API.md @@ -279,7 +279,7 @@ Returns **[MapboxGeocoder][57]** this ### getLimit -Get the limit value used by the plugin +Get the limit value for the number of results to display used by the plugin Returns **[Number][51]** The limit value for the number of results to display used by the plugin diff --git a/lib/index.js b/lib/index.js index 32de94c3..fb68c956 100644 --- a/lib/index.js +++ b/lib/index.js @@ -614,7 +614,7 @@ MapboxGeocoder.prototype = { }, /** - * Get the limit value used by the plugin + * Get the limit value for the number of results to display used by the plugin * @returns {Number} The limit value for the number of results to display used by the plugin */ getLimit: function(){