@algolia/autocomplete-core 1.12.0 → 1.12.2

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.
@@ -88,7 +88,7 @@ export function onKeyDown(_ref) {
88
88
  } else if (event.key === 'Tab') {
89
89
  store.dispatch('blur', null);
90
90
 
91
- // Hitting the `Escape` key signals the end of a user interaction with the
91
+ // Hitting the `Tab` key signals the end of a user interaction with the
92
92
  // autocomplete. At this point, we should ignore any requests that are still
93
93
  // pending and could reopen the panel once they resolve, because that would
94
94
  // result in an unsolicited UI behavior.
@@ -103,6 +103,7 @@ export var stateReducer = function stateReducer(state, action) {
103
103
  // we lose track of the highlighted index. (Query-suggestions use-case)
104
104
  action.props.openOnFocus === true ? action.props.defaultActiveItemId : null,
105
105
  status: 'idle',
106
+ completion: null,
106
107
  query: ''
107
108
  });
108
109
  }
@@ -1,4 +1,4 @@
1
- /*! @algolia/autocomplete-core 1.12.0 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
1
+ /*! @algolia/autocomplete-core 1.12.2 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
4
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -291,7 +291,7 @@
291
291
  return undefined;
292
292
  }
293
293
 
294
- var version = '1.12.0';
294
+ var version = '1.12.2';
295
295
 
296
296
  var userAgents = [{
297
297
  segment: 'autocomplete-core',
@@ -853,6 +853,12 @@
853
853
  }
854
854
  });
855
855
  }
856
+
857
+ // We return an empty plugin if `insightsClient` is still undefined at
858
+ // this stage, which can happen in server environments.
859
+ if (!insightsClient) {
860
+ return {};
861
+ }
856
862
  var insights = createSearchInsightsApi(insightsClient);
857
863
  var previousItems = createRef([]);
858
864
  var debouncedOnStateChange = debounce(function (_ref3) {
@@ -1843,7 +1849,7 @@
1843
1849
  } else if (event.key === 'Tab') {
1844
1850
  store.dispatch('blur', null);
1845
1851
 
1846
- // Hitting the `Escape` key signals the end of a user interaction with the
1852
+ // Hitting the `Tab` key signals the end of a user interaction with the
1847
1853
  // autocomplete. At this point, we should ignore any requests that are still
1848
1854
  // pending and could reopen the panel once they resolve, because that would
1849
1855
  // result in an unsolicited UI behavior.
@@ -2395,6 +2401,7 @@
2395
2401
  // we lose track of the highlighted index. (Query-suggestions use-case)
2396
2402
  action.props.openOnFocus === true ? action.props.defaultActiveItemId : null,
2397
2403
  status: 'idle',
2404
+ completion: null,
2398
2405
  query: ''
2399
2406
  });
2400
2407
  }