@algolia/autocomplete-js 1.9.4 → 1.10.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.
|
@@ -44,7 +44,7 @@ export declare function getDefaultOptions<TItem extends BaseItem>(options: Autoc
|
|
|
44
44
|
autoComplete: "on" | "off";
|
|
45
45
|
autoCorrect: "on" | "off";
|
|
46
46
|
autoCapitalize: "on" | "off";
|
|
47
|
-
enterKeyHint: "
|
|
47
|
+
enterKeyHint: import("@algolia/autocomplete-core").AutocompleteEnterKeyHint;
|
|
48
48
|
spellCheck: "false";
|
|
49
49
|
maxLength: number;
|
|
50
50
|
type: "search";
|
|
@@ -69,7 +69,7 @@ export declare function getDefaultOptions<TItem extends BaseItem>(options: Autoc
|
|
|
69
69
|
autoComplete: "on" | "off";
|
|
70
70
|
autoCorrect: "on" | "off";
|
|
71
71
|
autoCapitalize: "on" | "off";
|
|
72
|
-
enterKeyHint: "
|
|
72
|
+
enterKeyHint: import("@algolia/autocomplete-core").AutocompleteEnterKeyHint;
|
|
73
73
|
spellCheck: "false";
|
|
74
74
|
maxLength: number;
|
|
75
75
|
type: "search";
|
|
@@ -186,6 +186,7 @@ export declare function getDefaultOptions<TItem extends BaseItem>(options: Autoc
|
|
|
186
186
|
onStateChange?(props: import("@algolia/autocomplete-shared").OnStateChangeProps<TItem>): void;
|
|
187
187
|
plugins?: import("@algolia/autocomplete-shared").AutocompletePlugin<any, any>[] | undefined;
|
|
188
188
|
debug?: boolean | undefined;
|
|
189
|
+
enterKeyHint?: import("@algolia/autocomplete-core").AutocompleteEnterKeyHint | undefined;
|
|
189
190
|
placeholder?: string | undefined;
|
|
190
191
|
autoFocus?: boolean | undefined;
|
|
191
192
|
defaultActiveItemId?: number | null | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @algolia/autocomplete-js 1.
|
|
1
|
+
/*! @algolia/autocomplete-js 1.10.0 | 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) :
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
return undefined;
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
var version = '1.
|
|
350
|
+
var version = '1.10.0';
|
|
351
351
|
|
|
352
352
|
var userAgents$1 = [{
|
|
353
353
|
segment: 'autocomplete-core',
|
|
@@ -1666,6 +1666,7 @@
|
|
|
1666
1666
|
return _objectSpread$b(_objectSpread$b({
|
|
1667
1667
|
debug: false,
|
|
1668
1668
|
openOnFocus: false,
|
|
1669
|
+
enterKeyHint: undefined,
|
|
1669
1670
|
placeholder: '',
|
|
1670
1671
|
autoFocus: false,
|
|
1671
1672
|
defaultActiveItemId: null,
|
|
@@ -2741,7 +2742,7 @@
|
|
|
2741
2742
|
var activeItem = getActiveItem(store.getState());
|
|
2742
2743
|
var userAgent = ((_props$environment$na = props.environment.navigator) === null || _props$environment$na === void 0 ? void 0 : _props$environment$na.userAgent) || '';
|
|
2743
2744
|
var shouldFallbackKeyHint = isSamsung(userAgent);
|
|
2744
|
-
var enterKeyHint = activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search';
|
|
2745
|
+
var enterKeyHint = props.enterKeyHint || (activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search');
|
|
2745
2746
|
return _objectSpread$6({
|
|
2746
2747
|
'aria-autocomplete': 'both',
|
|
2747
2748
|
'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? "".concat(props.id, "-item-").concat(store.getState().activeItemId) : undefined,
|