@spothero/ui 13.8.0 → 13.9.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/CHANGELOG.tmp +2 -4
- package/backlog/GooglePlacesSearchInput/GooglePlacesSearchInput.js +12 -3
- package/package.json +1 -1
- package/styles/GooglePlacesSearchInput/GooglePlacesSearchInput.jsx +17 -1
- package/v1/index-bundled-cjs/index.js +1 -1
- package/v1/index-bundled-cjs/index.js.map +1 -1
- package/v1/index-bundled-esm/index.js +1 -1
- package/v1/index-bundled-esm/index.js.map +1 -1
- package/v1/index-unbundled-cjs/index.js +35 -35
- package/v1/index-unbundled-esm/index.js +35 -35
- package/v2/index-bundled-cjs/{ImageCarousel-7339963b.js → ImageCarousel-27b16e10.js} +2 -2
- package/v2/index-bundled-cjs/{ImageCarousel-7339963b.js.map → ImageCarousel-27b16e10.js.map} +1 -1
- package/v2/index-bundled-cjs/{index-8f3087e2.js → index-707d3bd2.js} +2 -2
- package/v2/index-bundled-cjs/{index-8f3087e2.js.map → index-707d3bd2.js.map} +1 -1
- package/v2/index-bundled-cjs/index.js +1 -1
- package/v2/index-bundled-esm/{ImageCarousel-07b9fdd3.js → ImageCarousel-c171c392.js} +2 -2
- package/v2/index-bundled-esm/{ImageCarousel-07b9fdd3.js.map → ImageCarousel-c171c392.js.map} +1 -1
- package/v2/index-bundled-esm/{index-dd1535e4.js → index-403b1b51.js} +4 -4
- package/v2/index-bundled-esm/{index-dd1535e4.js.map → index-403b1b51.js.map} +1 -1
- package/v2/index-bundled-esm/index.js +1 -1
- package/v2/index-unbundled-cjs/{ImageCarousel-92eed52b.js → ImageCarousel-faf73c8f.js} +4 -4
- package/v2/index-unbundled-cjs/{ImageCarousel-92eed52b.js.map → ImageCarousel-faf73c8f.js.map} +1 -1
- package/v2/index-unbundled-cjs/{index-6b1a20e7.js → index-6faea84f.js} +125 -125
- package/v2/index-unbundled-cjs/{index-6b1a20e7.js.map → index-6faea84f.js.map} +1 -1
- package/v2/index-unbundled-cjs/index.js +1 -1
- package/v2/index-unbundled-esm/{ImageCarousel-da9236a9.js → ImageCarousel-98a6f276.js} +4 -4
- package/v2/index-unbundled-esm/{ImageCarousel-da9236a9.js.map → ImageCarousel-98a6f276.js.map} +1 -1
- package/v2/index-unbundled-esm/{index-72e0d186.js → index-0ffe7573.js} +125 -125
- package/v2/index-unbundled-esm/{index-72e0d186.js.map → index-0ffe7573.js.map} +1 -1
- package/v2/index-unbundled-esm/index.js +1 -1
package/CHANGELOG.md
CHANGED
package/CHANGELOG.tmp
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
# 13.
|
|
1
|
+
# 13.9.0-beta.0 - 02/15/2022
|
|
2
2
|
|
|
3
3
|
## New Features
|
|
4
|
-
* [[
|
|
5
|
-
* `feat:` Checkbox component
|
|
6
|
-
* `feat:` Add focus, hover, disabled state
|
|
4
|
+
* [[4193a26](https://github.com/spothero/fe-ui/commit/4193a26)] - Updated Autocomplete to accept biasing options (Nathan)
|
|
7
5
|
|
|
@@ -148,10 +148,13 @@ var GooglePlacesSearchInput = /*#__PURE__*/function (_Component) {
|
|
|
148
148
|
var _this$props = _this.props,
|
|
149
149
|
country = _this$props.country,
|
|
150
150
|
types = _this$props.types,
|
|
151
|
-
bounds = _this$props.bounds
|
|
151
|
+
bounds = _this$props.bounds,
|
|
152
|
+
_this$props$biasOptio = _this$props.biasOptions,
|
|
153
|
+
location = _this$props$biasOptio.location,
|
|
154
|
+
radius = _this$props$biasOptio.radius;
|
|
152
155
|
var autocompleteSessionToken = _this.state.autocompleteSessionToken;
|
|
153
156
|
|
|
154
|
-
var options = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
157
|
+
var options = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
155
158
|
input: value
|
|
156
159
|
}, bounds && {
|
|
157
160
|
bounds: bounds
|
|
@@ -161,6 +164,9 @@ var GooglePlacesSearchInput = /*#__PURE__*/function (_Component) {
|
|
|
161
164
|
}
|
|
162
165
|
}), types && {
|
|
163
166
|
types: types
|
|
167
|
+
}), location && {
|
|
168
|
+
location: location,
|
|
169
|
+
radius: radius
|
|
164
170
|
}), {}, {
|
|
165
171
|
sessionToken: autocompleteSessionToken
|
|
166
172
|
});
|
|
@@ -249,5 +255,8 @@ exports.default = GooglePlacesSearchInput;
|
|
|
249
255
|
(0, _defineProperty2.default)(GooglePlacesSearchInput, "defaultProps", {
|
|
250
256
|
placeholder: 'Search Address or Venue',
|
|
251
257
|
country: 'us',
|
|
252
|
-
icon: /*#__PURE__*/_react.default.createElement(_search.default, null)
|
|
258
|
+
icon: /*#__PURE__*/_react.default.createElement(_search.default, null),
|
|
259
|
+
biasOptions: {
|
|
260
|
+
radius: 8000
|
|
261
|
+
}
|
|
253
262
|
});
|
package/package.json
CHANGED
|
@@ -27,11 +27,26 @@ export default class GooglePlacesSearchInput extends Component {
|
|
|
27
27
|
googleMaps: PropTypes.object,
|
|
28
28
|
/** A custom element (typically a PoweredByGoogle component) to display at the bottom of the suggestion list. */
|
|
29
29
|
poweredByGoogleFooter: PropTypes.element.isRequired,
|
|
30
|
+
/** An object containing the bias options */
|
|
31
|
+
biasOptions: PropTypes.shape({
|
|
32
|
+
/** The location (lat and long), to bias the search results around.
|
|
33
|
+
* * @see https://developers.google.com/maps/documentation/javascript/reference/places-autocomplete-service#AutocompletionRequest.location
|
|
34
|
+
*/
|
|
35
|
+
location: PropTypes.shape({
|
|
36
|
+
latitude: PropTypes.number,
|
|
37
|
+
Longitude: PropTypes.number,
|
|
38
|
+
}),
|
|
39
|
+
/** The radius, in meters, to bias the search results within */
|
|
40
|
+
radius: PropTypes.number,
|
|
41
|
+
})
|
|
30
42
|
};
|
|
31
43
|
static defaultProps = {
|
|
32
44
|
placeholder: 'Search Address or Venue',
|
|
33
45
|
country: 'us',
|
|
34
46
|
icon: <IconSearch />,
|
|
47
|
+
biasOptions: {
|
|
48
|
+
radius: 8000,
|
|
49
|
+
}
|
|
35
50
|
};
|
|
36
51
|
|
|
37
52
|
constructor(props) {
|
|
@@ -114,7 +129,7 @@ export default class GooglePlacesSearchInput extends Component {
|
|
|
114
129
|
};
|
|
115
130
|
|
|
116
131
|
_searchSuggestions = value => {
|
|
117
|
-
const {country, types, bounds} = this.props;
|
|
132
|
+
const {country, types, bounds, biasOptions: {location, radius}} = this.props;
|
|
118
133
|
const {autocompleteSessionToken} = this.state;
|
|
119
134
|
|
|
120
135
|
const options = {
|
|
@@ -126,6 +141,7 @@ export default class GooglePlacesSearchInput extends Component {
|
|
|
126
141
|
},
|
|
127
142
|
}),
|
|
128
143
|
...(types && {types}),
|
|
144
|
+
...(location && {location, radius}),
|
|
129
145
|
sessionToken: autocompleteSessionToken,
|
|
130
146
|
};
|
|
131
147
|
|