instantsearch.js 4.56.7 → 4.56.9

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 (37) hide show
  1. package/README.md +9 -5
  2. package/cjs/components/RefinementList/RefinementList.js +17 -0
  3. package/cjs/components/Slider/Rheostat.js +7 -1
  4. package/cjs/connectors/breadcrumb/connectBreadcrumb.js +1 -1
  5. package/cjs/connectors/configure/connectConfigure.js +4 -0
  6. package/cjs/connectors/hits/connectHitsWithInsights.js +5 -0
  7. package/cjs/connectors/infinite-hits/connectInfiniteHitsWithInsights.js +5 -0
  8. package/cjs/connectors/pagination/connectPagination.js +1 -1
  9. package/cjs/connectors/range/connectRange.js +3 -0
  10. package/cjs/connectors/search-box/connectSearchBox.js +10 -0
  11. package/cjs/lib/InstantSearch.js +10 -9
  12. package/cjs/lib/routers/history.js +34 -42
  13. package/cjs/lib/version.js +1 -1
  14. package/cjs/widgets/configure/configure.js +5 -0
  15. package/cjs/widgets/geo-search/createHTMLMarker.js +1 -1
  16. package/cjs/widgets/geo-search/geo-search.js +2 -1
  17. package/cjs/widgets/places/places.js +0 -2
  18. package/dist/instantsearch.development.js +3847 -3788
  19. package/dist/instantsearch.development.js.map +1 -1
  20. package/dist/instantsearch.production.min.js +2 -2
  21. package/dist/instantsearch.production.min.js.map +1 -1
  22. package/es/components/RefinementList/RefinementList.js +18 -0
  23. package/es/components/Slider/Rheostat.js +2 -0
  24. package/es/connectors/breadcrumb/connectBreadcrumb.js +1 -1
  25. package/es/connectors/configure/connectConfigure.js +5 -0
  26. package/es/connectors/hits/connectHitsWithInsights.js +6 -0
  27. package/es/connectors/infinite-hits/connectInfiniteHitsWithInsights.js +6 -0
  28. package/es/connectors/pagination/connectPagination.js +1 -1
  29. package/es/connectors/range/connectRange.js +3 -0
  30. package/es/connectors/search-box/connectSearchBox.js +10 -0
  31. package/es/lib/InstantSearch.js +10 -9
  32. package/es/lib/routers/history.js +34 -42
  33. package/es/lib/version.d.ts +1 -1
  34. package/es/lib/version.js +1 -1
  35. package/es/widgets/configure/configure.js +6 -0
  36. package/es/widgets/places/places.js +0 -2
  37. package/package.json +6 -6
package/README.md CHANGED
@@ -67,7 +67,11 @@ search.addWidgets([
67
67
  instantsearch.widgets.hits({
68
68
  container: '#products',
69
69
  templates: {
70
- item: '{{#helpers.highlight}}{ "attribute": "name" }{{/helpers.highlight}}',
70
+ item: (hit, { html, components }) =>
71
+ html`
72
+ <h3>${components.Highlight({ attribute: 'name', hit })}</h3>
73
+ <p>${components.Snippet({ attribute: 'description', hit })}</p>
74
+ `,
71
75
  },
72
76
  }),
73
77
 
@@ -102,7 +106,7 @@ yarn add instantsearch.js algoliasearch
102
106
 
103
107
  To use InstantSearch.js in a TypeScript environment, depending on your [`algoliasearch`](https://github.com/algolia/algoliasearch-client-javascript) version, you need to import different types.
104
108
 
105
- >You still need to import these types even if you don't use InstantSearch.js with [`algoliasearch`](https://github.com/algolia/algoliasearch-client-javascript).
109
+ > You still need to import these types even if you don't use InstantSearch.js with [`algoliasearch`](https://github.com/algolia/algoliasearch-client-javascript).
106
110
 
107
111
  #### `algoliasearch` v4.x
108
112
 
@@ -118,7 +122,7 @@ yarn add algoliasearch@4 @algolia/client-search
118
122
  yarn add @types/algoliasearch@3
119
123
  ```
120
124
 
121
- >v3.x is deprecated and will soon no longer be supported.
125
+ > v3.x is deprecated and will soon no longer be supported.
122
126
 
123
127
  ## Documentation
124
128
 
@@ -126,8 +130,8 @@ The documentation is available on the [Algolia website](https://www.algolia.com/
126
130
 
127
131
  ## Demos
128
132
 
129
- | E-commerce | Media | Travel |
130
- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
133
+ | E-commerce | Media | Travel |
134
+ | --- | --- | --- |
131
135
  | <a href="https://instantsearchjs.netlify.com/examples/e-commerce/"><img src="https://www.algolia.com/doc/assets/images/build-search-ui/demos/e-commerce-2c7ed6b6.png" width="250" alt="E-commerce demo preview"></a> | <a href="https://instantsearchjs.netlify.com/examples/media/"><img src="https://www.algolia.com/doc/assets/images/build-search-ui/demos/media-articles-abc153ab.png" width="250" alt="Media demo preview"></a> | <a href="https://instantsearchjs.netlify.com/examples/tourism/"><img src="https://instantsearchjs.netlify.com/examples/tourism/capture.png" width="250" alt="Tourism demo preview"></a> |
132
136
 
133
137
  See more demos [on the website](https://www.algolia.com/doc/guides/building-search-ui/resources/demos/js/).
@@ -31,6 +31,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
31
31
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
32
32
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
33
33
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
34
+ // CSS types
35
+
34
36
  var defaultProps = {
35
37
  cssClasses: {},
36
38
  depth: 0
@@ -92,6 +94,21 @@ var RefinementList = /*#__PURE__*/function (_Component) {
92
94
  templateProps: _this.props.templateProps
93
95
  });
94
96
  });
97
+ // Click events on DOM tree like LABEL > INPUT will result in two click events
98
+ // instead of one.
99
+ // No matter the framework, see https://www.google.com/search?q=click+label+twice
100
+ //
101
+ // Thus making it hard to distinguish activation from deactivation because both click events
102
+ // are very close. Debounce is a solution but hacky.
103
+ //
104
+ // So the code here checks if the click was done on or in a LABEL. If this LABEL
105
+ // has a checkbox inside, we ignore the first click event because we will get another one.
106
+ //
107
+ // We also check if the click was done inside a link and then e.preventDefault() because we already
108
+ // handle the url
109
+ //
110
+ // Finally, we always stop propagation of the event to avoid multiple levels RefinementLists to fail: click
111
+ // on child would click on parent also
95
112
  _defineProperty(_assertThisInitialized(_this), "handleItemClick", function (_ref) {
96
113
  var facetValueToRefine = _ref.facetValueToRefine,
97
114
  isRefined = _ref.isRefined,
@@ -19,7 +19,11 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
19
19
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
20
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
21
21
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
22
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
22
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /**
23
+ * This is a fork of Rheostat for Preact X.
24
+ *
25
+ * @see https://github.com/airbnb/rheostat
26
+ */
23
27
  var KEYS = {
24
28
  DOWN: 40,
25
29
  END: 35,
@@ -394,6 +398,8 @@ var Rheostat = /*#__PURE__*/function (_Component) {
394
398
  }
395
399
  killEvent(ev);
396
400
  });
401
+ // Make sure the proposed position respects the bounds and
402
+ // does not collide with other handles too much.
397
403
  _defineProperty(_assertThisInitialized(_this), "validatePosition", function (idx, proposedPosition) {
398
404
  var _this$state4 = _this.state,
399
405
  handlePos = _this$state4.handlePos,
@@ -81,7 +81,7 @@ var connectBreadcrumb = function connectBreadcrumb(renderFn) {
81
81
  function getItems() {
82
82
  // The hierarchicalFacets condition is required for flavors
83
83
  // that render immediately with empty results, without relying
84
- // on init() (like React InstantSearch Hooks).
84
+ // on init() (like React InstantSearch).
85
85
  if (!results || state.hierarchicalFacets.length === 0) {
86
86
  return [];
87
87
  }
@@ -13,6 +13,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
13
13
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
14
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
15
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
16
+ /**
17
+ * Refine the given search parameters.
18
+ */
19
+
16
20
  var withUsage = (0, _utils.createDocumentationMessageGenerator)({
17
21
  name: 'configure',
18
22
  connector: true
@@ -7,6 +7,11 @@ exports.default = void 0;
7
7
  var _insights = require("../../lib/insights");
8
8
  var _connectHits = _interopRequireDefault(require("./connectHits"));
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ /**
11
+ * Due to https://github.com/microsoft/web-build-tools/issues/1050, we need
12
+ * Connector<...> imported in this file, even though it is only used implicitly.
13
+ * This _uses_ Connector<...> so it is not accidentally removed by someone.
14
+ */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
10
15
  var connectHitsWithInsights = (0, _insights.withInsights)(_connectHits.default);
11
16
  var _default = connectHitsWithInsights;
12
17
  exports.default = _default;
@@ -7,6 +7,11 @@ exports.default = void 0;
7
7
  var _insights = require("../../lib/insights");
8
8
  var _connectInfiniteHits = _interopRequireDefault(require("./connectInfiniteHits"));
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ /**
11
+ * Due to https://github.com/microsoft/web-build-tools/issues/1050, we need
12
+ * Connector<...> imported in this file, even though it is only used implicitly.
13
+ * This _uses_ Connector<...> so it is not accidentally removed by someone.
14
+ */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
10
15
  var connectInfiniteHitsWithInsights = (0, _insights.withInsights)(_connectInfiniteHits.default);
11
16
  var _default = connectInfiniteHitsWithInsights;
12
17
  exports.default = _default;
@@ -91,7 +91,7 @@ var connectPagination = function connectPagination(renderFn) {
91
91
  connectorState.createURL = function (page) {
92
92
  return createURL(function (uiState) {
93
93
  return _objectSpread(_objectSpread({}, uiState), {}, {
94
- page: page
94
+ page: page + 1
95
95
  });
96
96
  });
97
97
  };
@@ -25,6 +25,9 @@ var withUsage = (0, _utils.createDocumentationMessageGenerator)({
25
25
  connector: true
26
26
  });
27
27
  var $$type = 'ais.range';
28
+
29
+ // @MAJOR: potentially we should consolidate these types
30
+
28
31
  function toPrecision(_ref) {
29
32
  var min = _ref.min,
30
33
  max = _ref.max,
@@ -15,6 +15,16 @@ var withUsage = (0, _utils.createDocumentationMessageGenerator)({
15
15
  name: 'search-box',
16
16
  connector: true
17
17
  });
18
+
19
+ /**
20
+ * @typedef {Object} CustomSearchBoxWidgetParams
21
+ * @property {function(string, function(string))} [queryHook = undefined] A function that will be called every time
22
+ * a new value for the query is set. The first parameter is the query and the second is a
23
+ * function to actually trigger the search. The function takes the query as the parameter.
24
+ *
25
+ * This queryHook can be used to debounce the number of searches done from the searchBox.
26
+ */
27
+
18
28
  var defaultQueryHook = function defaultQueryHook(query, hook) {
19
29
  return hook(query);
20
30
  };
@@ -40,6 +40,9 @@ function defaultCreateURL() {
40
40
  // this purposely breaks typescript's type inference to ensure it's not used
41
41
  // as it's used for a default parameter for example
42
42
  // source: https://github.com/Microsoft/TypeScript/issues/14829#issuecomment-504042546
43
+ /**
44
+ * Global options for an InstantSearch instance.
45
+ */
43
46
  /**
44
47
  * The actual implementation of the InstantSearch. This is
45
48
  * created using the `instantsearch` factory function.
@@ -73,7 +76,14 @@ var InstantSearch = /*#__PURE__*/function (_EventEmitter) {
73
76
  _defineProperty(_assertThisInitialized(_this), "_mainHelperSearch", void 0);
74
77
  _defineProperty(_assertThisInitialized(_this), "middleware", []);
75
78
  _defineProperty(_assertThisInitialized(_this), "sendEventToInsights", void 0);
79
+ /**
80
+ * The status of the search. Can be "idle", "loading", "stalled", or "error".
81
+ */
76
82
  _defineProperty(_assertThisInitialized(_this), "status", 'idle');
83
+ /**
84
+ * The last returned error from the Search API.
85
+ * The error gets cleared when the next valid search response is rendered.
86
+ */
77
87
  _defineProperty(_assertThisInitialized(_this), "error", undefined);
78
88
  _defineProperty(_assertThisInitialized(_this), "scheduleSearch", (0, _utils.defer)(function () {
79
89
  if (_this.started) {
@@ -193,15 +203,6 @@ var InstantSearch = /*#__PURE__*/function (_EventEmitter) {
193
203
  _createClass(InstantSearch, [{
194
204
  key: "_isSearchStalled",
195
205
  get:
196
- /**
197
- * The status of the search. Can be "idle", "loading", "stalled", or "error".
198
- */
199
-
200
- /**
201
- * The last returned error from the Search API.
202
- * The error gets cleared when the next valid search response is rendered.
203
- */
204
-
205
206
  /**
206
207
  * @deprecated use `status === 'stalled'` instead
207
208
  */
@@ -22,48 +22,6 @@ var setWindowTitle = function setWindowTitle(title) {
22
22
  }
23
23
  };
24
24
  var BrowserHistory = /*#__PURE__*/function () {
25
- /**
26
- * Transforms a UI state into a title for the page.
27
- */
28
-
29
- /**
30
- * Time in milliseconds before performing a write in the history.
31
- * It prevents from adding too many entries in the history and
32
- * makes the back button more usable.
33
- *
34
- * @default 400
35
- */
36
-
37
- /**
38
- * Creates a full URL based on the route state.
39
- * The storage adaptor maps all syncable keys to the query string of the URL.
40
- */
41
-
42
- /**
43
- * Parses the URL into a route state.
44
- * It should be symmetrical to `createURL`.
45
- */
46
-
47
- /**
48
- * Returns the location to store in the history.
49
- * @default () => window.location
50
- */
51
-
52
- /**
53
- * Indicates if last action was back/forward in the browser.
54
- */
55
-
56
- /**
57
- * Indicates whether the history router is disposed or not.
58
- */
59
-
60
- /**
61
- * Indicates the window.history.length before the last call to
62
- * window.history.pushState (called in `write`).
63
- * It allows to determine if a `pushState` has been triggered elsewhere,
64
- * and thus to prevent the `write` method from calling `pushState`.
65
- */
66
-
67
25
  /**
68
26
  * Initializes a new storage provider that syncs the search state to the URL
69
27
  * using web APIs (`window.location.pushState` and `onpopstate` event).
@@ -81,15 +39,49 @@ var BrowserHistory = /*#__PURE__*/function () {
81
39
  push = _ref.push;
82
40
  _classCallCheck(this, BrowserHistory);
83
41
  _defineProperty(this, "$$type", 'ais.browser');
42
+ /**
43
+ * Transforms a UI state into a title for the page.
44
+ */
84
45
  _defineProperty(this, "windowTitle", void 0);
46
+ /**
47
+ * Time in milliseconds before performing a write in the history.
48
+ * It prevents from adding too many entries in the history and
49
+ * makes the back button more usable.
50
+ *
51
+ * @default 400
52
+ */
85
53
  _defineProperty(this, "writeDelay", void 0);
54
+ /**
55
+ * Creates a full URL based on the route state.
56
+ * The storage adaptor maps all syncable keys to the query string of the URL.
57
+ */
86
58
  _defineProperty(this, "_createURL", void 0);
59
+ /**
60
+ * Parses the URL into a route state.
61
+ * It should be symmetrical to `createURL`.
62
+ */
87
63
  _defineProperty(this, "parseURL", void 0);
64
+ /**
65
+ * Returns the location to store in the history.
66
+ * @default () => window.location
67
+ */
88
68
  _defineProperty(this, "getLocation", void 0);
89
69
  _defineProperty(this, "writeTimer", void 0);
90
70
  _defineProperty(this, "_onPopState", void 0);
71
+ /**
72
+ * Indicates if last action was back/forward in the browser.
73
+ */
91
74
  _defineProperty(this, "inPopState", false);
75
+ /**
76
+ * Indicates whether the history router is disposed or not.
77
+ */
92
78
  _defineProperty(this, "isDisposed", false);
79
+ /**
80
+ * Indicates the window.history.length before the last call to
81
+ * window.history.pushState (called in `write`).
82
+ * It allows to determine if a `pushState` has been triggered elsewhere,
83
+ * and thus to prevent the `write` method from calling `pushState`.
84
+ */
93
85
  _defineProperty(this, "latestAcknowledgedHistory", 0);
94
86
  _defineProperty(this, "_start", void 0);
95
87
  _defineProperty(this, "_dispose", void 0);
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = '4.56.7';
7
+ var _default = '4.56.9';
8
8
  exports.default = _default;
@@ -13,6 +13,11 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
13
13
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
14
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
15
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
16
+ /**
17
+ * A list of [search parameters](https://www.algolia.com/doc/api-reference/search-api-parameters/)
18
+ * to enable when the widget mounts.
19
+ */
20
+
16
21
  var configure = function configure(widgetParams) {
17
22
  // This is a renderless widget that falls back to the connector's
18
23
  // noop render and unmount functions.
@@ -18,7 +18,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
18
18
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
19
19
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
20
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
21
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
21
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* global google EventListener */
22
22
  var createHTMLMarker = function createHTMLMarker(googleReference) {
23
23
  var HTMLMarker = /*#__PURE__*/function (_googleReference$maps) {
24
24
  _inherits(HTMLMarker, _googleReference$maps);
@@ -16,7 +16,8 @@ var _defaultTemplates = _interopRequireDefault(require("./defaultTemplates"));
16
16
  var _GeoSearchRenderer = _interopRequireDefault(require("./GeoSearchRenderer"));
17
17
  var _excluded = ["initialZoom", "initialPosition", "templates", "cssClasses", "builtInMarker", "customHTMLMarker", "enableRefine", "enableClearMapRefinement", "enableRefineControl", "container", "googleReference"],
18
18
  _excluded2 = ["item"],
19
- _excluded3 = ["item"];
19
+ _excluded3 = ["item"]; // global for TypeScript alone
20
+ /* global google */
20
21
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
22
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
22
23
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -16,9 +16,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
16
16
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
17
17
  /* Places.js is an optional dependency, no error should be reported if the package is missing */
18
18
  /** @ts-ignore */
19
-
20
19
  // using the type like this requires only one ts-ignore
21
-
22
20
  /**
23
21
  * This widget sets the geolocation value for the search based on the selected
24
22
  * result in the Algolia Places autocomplete.