@algolia/autocomplete-core 1.5.6 → 1.6.1

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.
@@ -16,7 +16,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
16
16
 
17
17
  import { onInput } from './onInput';
18
18
  import { onKeyDown as _onKeyDown } from './onKeyDown';
19
- import { getActiveItem, isChrome, isOrContainsNode, isSamsung } from './utils';
19
+ import { getActiveItem, isOrContainsNode, isSamsung } from './utils';
20
20
  export function getPropGetters(_ref) {
21
21
  var props = _ref.props,
22
22
  refresh = _ref.refresh,
@@ -153,7 +153,7 @@ export function getPropGetters(_ref) {
153
153
 
154
154
  var activeItem = getActiveItem(store.getState());
155
155
  var userAgent = (_props$environment$na = props.environment.navigator) === null || _props$environment$na === void 0 ? void 0 : _props$environment$na.userAgent;
156
- var shouldFallbackKeyHint = isSamsung(userAgent) && isChrome(userAgent);
156
+ var shouldFallbackKeyHint = isSamsung(userAgent);
157
157
  var enterKeyHint = activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search';
158
158
  return _objectSpread({
159
159
  'aria-autocomplete': 'both',
@@ -3,7 +3,6 @@ export * from './createCancelablePromiseList';
3
3
  export * from './createConcurrentSafePromise';
4
4
  export * from './getNextActiveItemId';
5
5
  export * from './getNormalizedSources';
6
- export * from './isChrome';
7
6
  export * from './getActiveItem';
8
7
  export * from './isOrContainsNode';
9
8
  export * from './isSamsung';
@@ -3,7 +3,6 @@ export * from './createCancelablePromiseList';
3
3
  export * from './createConcurrentSafePromise';
4
4
  export * from './getNextActiveItemId';
5
5
  export * from './getNormalizedSources';
6
- export * from './isChrome';
7
6
  export * from './getActiveItem';
8
7
  export * from './isOrContainsNode';
9
8
  export * from './isSamsung';
@@ -1,4 +1,4 @@
1
- /*! @algolia/autocomplete-core 1.5.6 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
1
+ /*! @algolia/autocomplete-core 1.6.1 | 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) :
@@ -264,7 +264,7 @@
264
264
 
265
265
  var noop = function noop() {};
266
266
 
267
- var version = '1.5.6';
267
+ var version = '1.6.1';
268
268
 
269
269
  var userAgents = [{
270
270
  segment: 'autocomplete-core',
@@ -487,14 +487,6 @@
487
487
  });
488
488
  }
489
489
 
490
- var chromeRegex = /(crmo|crios|chrome)/i;
491
- var edgeRegex = /edg(e|ios|a)?/i;
492
- var samsungBrowserRegex = /samsungbrowser/i;
493
- var chromiumRegex = /chromium/i;
494
- function isChrome(userAgent) {
495
- return Boolean(userAgent && userAgent.match(chromeRegex) && !userAgent.match(edgeRegex) && !userAgent.match(samsungBrowserRegex) && !userAgent.match(chromiumRegex));
496
- }
497
-
498
490
  // We don't have access to the autocomplete source when we call `onKeyDown`
499
491
  // or `onClick` because those are native browser events.
500
492
  // However, we can get the source from the suggestion index.
@@ -1381,7 +1373,7 @@
1381
1373
 
1382
1374
  var activeItem = getActiveItem(store.getState());
1383
1375
  var userAgent = (_props$environment$na = props.environment.navigator) === null || _props$environment$na === void 0 ? void 0 : _props$environment$na.userAgent;
1384
- var shouldFallbackKeyHint = isSamsung(userAgent) && isChrome(userAgent);
1376
+ var shouldFallbackKeyHint = isSamsung(userAgent);
1385
1377
  var enterKeyHint = activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search';
1386
1378
  return _objectSpread2({
1387
1379
  'aria-autocomplete': 'both',