@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.
Files changed (31) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/CHANGELOG.tmp +2 -4
  3. package/backlog/GooglePlacesSearchInput/GooglePlacesSearchInput.js +12 -3
  4. package/package.json +1 -1
  5. package/styles/GooglePlacesSearchInput/GooglePlacesSearchInput.jsx +17 -1
  6. package/v1/index-bundled-cjs/index.js +1 -1
  7. package/v1/index-bundled-cjs/index.js.map +1 -1
  8. package/v1/index-bundled-esm/index.js +1 -1
  9. package/v1/index-bundled-esm/index.js.map +1 -1
  10. package/v1/index-unbundled-cjs/index.js +35 -35
  11. package/v1/index-unbundled-esm/index.js +35 -35
  12. package/v2/index-bundled-cjs/{ImageCarousel-7339963b.js → ImageCarousel-27b16e10.js} +2 -2
  13. package/v2/index-bundled-cjs/{ImageCarousel-7339963b.js.map → ImageCarousel-27b16e10.js.map} +1 -1
  14. package/v2/index-bundled-cjs/{index-8f3087e2.js → index-707d3bd2.js} +2 -2
  15. package/v2/index-bundled-cjs/{index-8f3087e2.js.map → index-707d3bd2.js.map} +1 -1
  16. package/v2/index-bundled-cjs/index.js +1 -1
  17. package/v2/index-bundled-esm/{ImageCarousel-07b9fdd3.js → ImageCarousel-c171c392.js} +2 -2
  18. package/v2/index-bundled-esm/{ImageCarousel-07b9fdd3.js.map → ImageCarousel-c171c392.js.map} +1 -1
  19. package/v2/index-bundled-esm/{index-dd1535e4.js → index-403b1b51.js} +4 -4
  20. package/v2/index-bundled-esm/{index-dd1535e4.js.map → index-403b1b51.js.map} +1 -1
  21. package/v2/index-bundled-esm/index.js +1 -1
  22. package/v2/index-unbundled-cjs/{ImageCarousel-92eed52b.js → ImageCarousel-faf73c8f.js} +4 -4
  23. package/v2/index-unbundled-cjs/{ImageCarousel-92eed52b.js.map → ImageCarousel-faf73c8f.js.map} +1 -1
  24. package/v2/index-unbundled-cjs/{index-6b1a20e7.js → index-6faea84f.js} +125 -125
  25. package/v2/index-unbundled-cjs/{index-6b1a20e7.js.map → index-6faea84f.js.map} +1 -1
  26. package/v2/index-unbundled-cjs/index.js +1 -1
  27. package/v2/index-unbundled-esm/{ImageCarousel-da9236a9.js → ImageCarousel-98a6f276.js} +4 -4
  28. package/v2/index-unbundled-esm/{ImageCarousel-da9236a9.js.map → ImageCarousel-98a6f276.js.map} +1 -1
  29. package/v2/index-unbundled-esm/{index-72e0d186.js → index-0ffe7573.js} +125 -125
  30. package/v2/index-unbundled-esm/{index-72e0d186.js.map → index-0ffe7573.js.map} +1 -1
  31. package/v2/index-unbundled-esm/index.js +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 13.9.0-beta.0 - 02/15/2022
2
+
3
+ ## New Features
4
+ * [[4193a26](https://github.com/spothero/fe-ui/commit/4193a26)] - Updated Autocomplete to accept biasing options (Nathan)
5
+
1
6
  # 13.8.0 - 01/26/2022
2
7
 
3
8
  ## New Features
package/CHANGELOG.tmp CHANGED
@@ -1,7 +1,5 @@
1
- # 13.8.0 - 01/26/2022
1
+ # 13.9.0-beta.0 - 02/15/2022
2
2
 
3
3
  ## New Features
4
- * [[c7de948](https://github.com/spothero/fe-ui/commit/c7de948)] - Checkbox Component ([#266](https://github.com/spothero/fe-ui/pull/266)) (Max Rashes)
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spothero/ui",
3
- "version": "13.8.0",
3
+ "version": "13.9.0-beta.0",
4
4
  "description": "SpotHero's React component UI library.",
5
5
  "main": "v2/index-bundled-cjs/index.js",
6
6
  "module": "v2/index.js",
@@ -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