@shoper/phoenix_design_system 1.11.11-6 → 1.11.11-8
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.
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown.js +112 -38
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_content.js +0 -5
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_toggler.js +13 -24
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_toggler.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/search.js +95 -292
- package/build/cjs/packages/phoenix/src/components/form/search/search.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js +0 -5
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js +9 -22
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js +1 -15
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/message/search_message.js +1 -8
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/message/search_message.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js +4 -9
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +4 -9
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js +4 -11
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js +5 -12
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/select/select.js +2 -3
- package/build/cjs/packages/phoenix/src/components/form/select/select.js.map +1 -1
- package/build/cjs/packages/phoenix/src/controllers/keystrokes_controller/keystrokes_controller.js +13 -2
- package/build/cjs/packages/phoenix/src/controllers/keystrokes_controller/keystrokes_controller.js.map +1 -1
- package/build/cjs/packages/phoenix/src/index.js +12 -12
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown.d.ts +12 -4
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown.js +113 -39
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_content.d.ts +0 -2
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_content.js +0 -5
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_toggler.d.ts +1 -2
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_toggler.js +14 -25
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_toggler.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search.d.ts +5 -23
- package/build/esm/packages/phoenix/src/components/form/search/search.js +96 -293
- package/build/esm/packages/phoenix/src/components/form/search/search.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search_types.d.ts +0 -4
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.d.ts +1 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js +0 -5
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/history/search_history.d.ts +2 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js +9 -22
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.d.ts +0 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js +2 -16
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/message/search_message.d.ts +0 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/message/search_message.js +1 -8
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/message/search_message.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.d.ts +1 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js +4 -9
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.d.ts +1 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +4 -9
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_results.d.ts +1 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js +4 -11
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.d.ts +1 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js +5 -12
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/select/select.js +2 -3
- package/build/esm/packages/phoenix/src/components/form/select/select.js.map +1 -1
- package/build/esm/packages/phoenix/src/controllers/keystrokes_controller/keystrokes_controller.d.ts +2 -1
- package/build/esm/packages/phoenix/src/controllers/keystrokes_controller/keystrokes_controller.js +13 -2
- package/build/esm/packages/phoenix/src/controllers/keystrokes_controller/keystrokes_controller.js.map +1 -1
- package/build/esm/packages/phoenix/src/controllers/keystrokes_controller/keystrokes_controller_types.d.ts +1 -0
- package/build/esm/packages/phoenix/src/index.js +2 -2
- package/package.json +2 -2
|
@@ -15,7 +15,6 @@ var behavior_subject = require('../../../core/classes/behavior_subject/behavior_
|
|
|
15
15
|
var ref_js = require('lit-html/directives/ref.js');
|
|
16
16
|
var context_provider_controller = require('../../../core/context/context_provider_controller.js');
|
|
17
17
|
var global_constants = require('../../../global_constants.js');
|
|
18
|
-
var v4 = require('../../../../../../external/uuid/dist/esm-browser/v4.js');
|
|
19
18
|
var when = require('../../../../../../external/lit/external/lit-html/directives/when.js');
|
|
20
19
|
var search_constants = require('./search_constants.js');
|
|
21
20
|
|
|
@@ -23,11 +22,8 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
23
22
|
constructor() {
|
|
24
23
|
super(...arguments);
|
|
25
24
|
this.view = search_constants.DEFAULT_VIEW;
|
|
26
|
-
this._id = v4['default']();
|
|
27
|
-
this._searchContentContainerId = v4['default']();
|
|
28
25
|
this._searchResultsRef = ref_js.createRef();
|
|
29
26
|
this._searchHistoryRef = ref_js.createRef();
|
|
30
|
-
this._searchMessageRef = ref_js.createRef();
|
|
31
27
|
this._shouldShowHistory = false;
|
|
32
28
|
this._shouldShowResults = false;
|
|
33
29
|
this._shouldShowMessage = false;
|
|
@@ -37,237 +33,84 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
37
33
|
this._historyContext = new behavior_subject.BehaviorSubject({
|
|
38
34
|
showLoadMore: false
|
|
39
35
|
});
|
|
40
|
-
this._activeItemId =
|
|
36
|
+
this._activeItemId = -1;
|
|
41
37
|
this._translations = {};
|
|
42
|
-
this._containerRole = 'grid';
|
|
43
38
|
this._bindKeys = (ev) => {
|
|
39
|
+
var _a;
|
|
44
40
|
switch (ev.key) {
|
|
45
41
|
case 'ArrowDown':
|
|
46
42
|
ev.preventDefault();
|
|
47
|
-
this.
|
|
43
|
+
this._focusOutsideActiveItemsForward();
|
|
44
|
+
this._scroll(search_constants.SCROLL_DIRECTIONS.down);
|
|
48
45
|
break;
|
|
49
46
|
case 'ArrowUp':
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (this._containerRole === 'grid') {
|
|
54
|
-
ev.preventDefault();
|
|
55
|
-
this._handleBackwardGridFocus();
|
|
56
|
-
}
|
|
57
|
-
if (this._containerRole === 'listbox')
|
|
58
|
-
this._handleMoveToInputField();
|
|
59
|
-
break;
|
|
60
|
-
case 'ArrowRight':
|
|
61
|
-
if (this._containerRole === 'grid') {
|
|
62
|
-
ev.preventDefault();
|
|
63
|
-
this._handleForwardGridFocus();
|
|
64
|
-
}
|
|
65
|
-
if (this._containerRole === 'listbox')
|
|
66
|
-
this._handleMoveToInputField();
|
|
47
|
+
ev.preventDefault();
|
|
48
|
+
this._focusOutsideActiveItemsBackward();
|
|
49
|
+
this._scroll(search_constants.SCROLL_DIRECTIONS.up);
|
|
67
50
|
break;
|
|
68
51
|
case 'Enter':
|
|
69
52
|
ev.preventDefault();
|
|
70
|
-
if (this._activeItemId ===
|
|
53
|
+
if (this._activeItemId === -1 || !this._shouldShowResults)
|
|
71
54
|
return;
|
|
72
55
|
this._handleChooseSearchItem();
|
|
73
56
|
break;
|
|
74
57
|
case 'Escape':
|
|
75
58
|
ev.preventDefault();
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
this._shouldShowMessage = false;
|
|
79
|
-
this._hideHistorySuggestionsAndResults();
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
this._inputField.value = '';
|
|
83
|
-
}
|
|
84
|
-
break;
|
|
85
|
-
case 'End':
|
|
86
|
-
ev.preventDefault();
|
|
87
|
-
this._handleFocusOnInputWithCaretEnd();
|
|
88
|
-
break;
|
|
89
|
-
case 'Home':
|
|
90
|
-
ev.preventDefault();
|
|
91
|
-
this._handleFocusOnInputWithCaretStart();
|
|
92
|
-
break;
|
|
93
|
-
case 'Backspace':
|
|
94
|
-
this._handleMoveToInputField();
|
|
59
|
+
this._inputField.blur();
|
|
60
|
+
this._resetSearchView();
|
|
95
61
|
break;
|
|
96
62
|
case 'Tab':
|
|
97
|
-
const isFocusedOnSearchInput = document.activeElement ===
|
|
98
|
-
if (!isFocusedOnSearchInput)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
this._handleWriteableCharacter(ev);
|
|
63
|
+
const isFocusedOnSearchInput = !!((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.matches('input[type="search"]'));
|
|
64
|
+
if (!isFocusedOnSearchInput) {
|
|
65
|
+
const searchBar = this.querySelector(`.${search_constants.SEARCH_CLASS_NAMES.searchBar}`);
|
|
66
|
+
searchBar === null || searchBar === void 0 ? void 0 : searchBar.classList.remove(search_constants.SEARCH_CLASS_NAMES.outline);
|
|
67
|
+
this._resetSearchView();
|
|
68
|
+
document.removeEventListener('keyup', this._bindKeys);
|
|
69
|
+
}
|
|
105
70
|
break;
|
|
106
71
|
}
|
|
107
72
|
};
|
|
108
|
-
this.
|
|
109
|
-
if (ev.key !== 'Tab')
|
|
110
|
-
return;
|
|
111
|
-
const isFocusedOnSearchInput = document.activeElement === this._inputField;
|
|
112
|
-
if (ev.shiftKey && !isFocusedOnSearchInput) {
|
|
113
|
-
this._focusOnPreviousElementBeforeSearchInput(ev);
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
if (!isFocusedOnSearchInput) {
|
|
117
|
-
const searchBar = this.querySelector(`.${search_constants.SEARCH_CLASS_NAMES.searchBar}`);
|
|
118
|
-
searchBar === null || searchBar === void 0 ? void 0 : searchBar.classList.remove(search_constants.SEARCH_CLASS_NAMES.outline);
|
|
119
|
-
this._resetSearchView();
|
|
120
|
-
document.removeEventListener('keydown', this._bindKeys);
|
|
121
|
-
document.removeEventListener('keyup', this._handleSearchTabNavigation);
|
|
122
|
-
this._focusOnNextElementAfterSearchInput(ev);
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
this._focusOnPreviousElementBeforeSearchInput = async (ev) => {
|
|
126
|
-
ev.preventDefault();
|
|
127
|
-
const searchBar = this.querySelector(`.${search_constants.SEARCH_CLASS_NAMES.searchBar}`);
|
|
128
|
-
searchBar === null || searchBar === void 0 ? void 0 : searchBar.classList.remove(search_constants.SEARCH_CLASS_NAMES.outline);
|
|
129
|
-
this._resetSearchView();
|
|
130
|
-
document.removeEventListener('keydown', this._bindKeys);
|
|
131
|
-
document.removeEventListener('keyup', this._handleSearchTabNavigation);
|
|
132
|
-
utilities.UiDomUtils.getPreviousFocusableElement(this._inputField).focus();
|
|
133
|
-
};
|
|
134
|
-
this._focusOnNextElementAfterSearchInput = async (ev) => {
|
|
135
|
-
ev.preventDefault();
|
|
136
|
-
utilities.UiDomUtils.getNextFocusableElement(this._inputField).focus();
|
|
137
|
-
};
|
|
138
|
-
this._preventScrollingOnSearchContentBrowsing = (ev) => {
|
|
73
|
+
this._focusOutsideActiveItemsForward = () => {
|
|
139
74
|
var _a;
|
|
140
|
-
const
|
|
141
|
-
const
|
|
142
|
-
const hasSearchContainerParent = !!((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.closest('.search__container'));
|
|
143
|
-
if ((hasArrowBeenPressed || hasHomeOrEndBeenPressed) && hasSearchContainerParent) {
|
|
144
|
-
ev.preventDefault();
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
this._handleForwardListFocus = () => {
|
|
148
|
-
var _a, _b;
|
|
149
|
-
const containers = [
|
|
150
|
-
this._searchHistoryRef.value,
|
|
151
|
-
this._searchResultsRef.value,
|
|
152
|
-
this._searchMessageRef.value
|
|
153
|
-
];
|
|
154
|
-
const $searchItemsContainer = containers.find(container => container && !utilities.UiDomUtils.isElementEmpty(container));
|
|
155
|
-
if (!$searchItemsContainer)
|
|
156
|
-
return;
|
|
157
|
-
const isActiveElementASearchItem = !!((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.getAttribute('data-search-item-id'));
|
|
158
|
-
const isActiveElementAGridSearchItem = isActiveElementASearchItem && !!((_b = document.activeElement) === null || _b === void 0 ? void 0 : _b.getAttribute('data-search-grid-item'));
|
|
159
|
-
const $listSearchItems = utilities.UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
|
|
160
|
-
const searchItemId = $el.getAttribute('data-search-item-id');
|
|
161
|
-
const isListSearchItem = !!searchItemId && !$el.getAttribute('data-search-grid-item');
|
|
162
|
-
const isGridSearchItem = !!searchItemId && $el.getAttribute('data-search-grid-item');
|
|
163
|
-
return isActiveElementAGridSearchItem ? isGridSearchItem : isListSearchItem;
|
|
164
|
-
});
|
|
165
|
-
this._handleForwardFocus($listSearchItems);
|
|
166
|
-
};
|
|
167
|
-
this._handleForwardGridFocus = () => {
|
|
168
|
-
const containers = [
|
|
169
|
-
this._searchHistoryRef.value,
|
|
170
|
-
this._searchResultsRef.value,
|
|
171
|
-
this._searchMessageRef.value
|
|
172
|
-
];
|
|
173
|
-
const $searchItemsContainer = containers.find(container => container && !utilities.UiDomUtils.isElementEmpty(container));
|
|
75
|
+
const $activeElement = document.activeElement;
|
|
76
|
+
const $searchItemsContainer = this._searchHistoryRef.value || this._searchResultsRef.value;
|
|
174
77
|
if (!$searchItemsContainer)
|
|
175
78
|
return;
|
|
176
|
-
const $
|
|
79
|
+
const $searchItems = utilities.UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
|
|
177
80
|
return !!$el.getAttribute('data-search-item-id');
|
|
178
81
|
});
|
|
179
|
-
this._handleForwardFocus($gridSearchItems);
|
|
180
|
-
};
|
|
181
|
-
this._handleForwardFocus = ($searchItems) => {
|
|
182
|
-
var _a;
|
|
183
|
-
const $activeElement = document.activeElement;
|
|
184
82
|
const indexOfCurrentElement = $searchItems.indexOf($activeElement);
|
|
185
83
|
const indexOfNextElement = indexOfCurrentElement === $searchItems.length - 1 ? 0 : indexOfCurrentElement + 1;
|
|
186
84
|
const $nextSearchItemElement = $searchItems[indexOfNextElement];
|
|
187
85
|
$nextSearchItemElement.focus();
|
|
188
|
-
this.
|
|
189
|
-
};
|
|
190
|
-
this._handleMoveToInputField = () => {
|
|
191
|
-
const isFocusedOnSearchInput = document.activeElement === this._inputField;
|
|
192
|
-
if (isFocusedOnSearchInput)
|
|
193
|
-
return;
|
|
194
|
-
this._inputField.focus();
|
|
86
|
+
this._activeItemId = (_a = Number($nextSearchItemElement.getAttribute('data-search-item-id'))) !== null && _a !== void 0 ? _a : -1;
|
|
195
87
|
};
|
|
196
|
-
this.
|
|
197
|
-
var _a
|
|
198
|
-
const
|
|
199
|
-
const
|
|
200
|
-
if (isFocusedOnSearchInput || !hasPopup)
|
|
201
|
-
return;
|
|
202
|
-
ev.preventDefault();
|
|
203
|
-
const containers = [
|
|
204
|
-
this._searchHistoryRef.value,
|
|
205
|
-
this._searchResultsRef.value,
|
|
206
|
-
this._searchMessageRef.value
|
|
207
|
-
];
|
|
208
|
-
const $searchItemsContainer = containers.find(container => container && !utilities.UiDomUtils.isElementEmpty(container));
|
|
209
|
-
if (!$searchItemsContainer)
|
|
210
|
-
return;
|
|
211
|
-
const isActiveElementASearchItem = !!((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.getAttribute('data-search-item-id'));
|
|
212
|
-
const isActiveElementAGridSearchItem = isActiveElementASearchItem && !!((_b = document.activeElement) === null || _b === void 0 ? void 0 : _b.getAttribute('data-search-grid-item'));
|
|
213
|
-
const $listSearchItems = utilities.UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
|
|
214
|
-
const searchItemId = $el.getAttribute('data-search-item-id');
|
|
215
|
-
const isListSearchItem = !!searchItemId && !$el.getAttribute('data-search-grid-item');
|
|
216
|
-
const isGridSearchItem = !!searchItemId && $el.getAttribute('data-search-grid-item');
|
|
217
|
-
return isActiveElementAGridSearchItem ? isGridSearchItem : isListSearchItem;
|
|
218
|
-
});
|
|
219
|
-
this._handleBackwardFocus($listSearchItems);
|
|
220
|
-
};
|
|
221
|
-
this._handleBackwardGridFocus = () => {
|
|
222
|
-
const containers = [
|
|
223
|
-
this._searchHistoryRef.value,
|
|
224
|
-
this._searchResultsRef.value,
|
|
225
|
-
this._searchMessageRef.value
|
|
226
|
-
];
|
|
227
|
-
const $searchItemsContainer = containers.find(container => container && !utilities.UiDomUtils.isElementEmpty(container));
|
|
88
|
+
this._focusOutsideActiveItemsBackward = () => {
|
|
89
|
+
var _a;
|
|
90
|
+
const $activeElement = document.activeElement;
|
|
91
|
+
const $searchItemsContainer = this._searchHistoryRef.value || this._searchResultsRef.value;
|
|
228
92
|
if (!$searchItemsContainer)
|
|
229
93
|
return;
|
|
230
|
-
const $
|
|
94
|
+
const $searchItems = utilities.UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
|
|
231
95
|
return !!$el.getAttribute('data-search-item-id');
|
|
232
96
|
});
|
|
233
|
-
this._handleBackwardFocus($gridSearchItems);
|
|
234
|
-
};
|
|
235
|
-
this._handleBackwardFocus = ($searchItems) => {
|
|
236
|
-
var _a;
|
|
237
|
-
const $activeElement = document.activeElement;
|
|
238
97
|
const indexOfCurrentElement = $searchItems.indexOf($activeElement);
|
|
239
98
|
const indexOfPreviousElement = indexOfCurrentElement === 0 ? $searchItems.length - 1 : indexOfCurrentElement - 1;
|
|
240
99
|
const $previousSearchItemElement = $searchItems[indexOfPreviousElement];
|
|
241
100
|
$previousSearchItemElement.focus();
|
|
242
|
-
this.
|
|
101
|
+
this._activeItemId = (_a = Number($previousSearchItemElement.getAttribute('data-search-item-id'))) !== null && _a !== void 0 ? _a : -1;
|
|
243
102
|
};
|
|
244
|
-
this.
|
|
245
|
-
this.
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
return;
|
|
254
|
-
this._inputField.focus();
|
|
255
|
-
const endPosition = this._inputField.value.length;
|
|
256
|
-
this._inputField.setSelectionRange(endPosition, endPosition);
|
|
257
|
-
};
|
|
258
|
-
this._handleFocusOnInputWithCaretStart = () => {
|
|
259
|
-
this._inputField.focus();
|
|
260
|
-
this._inputField.setSelectionRange(0, 0);
|
|
261
|
-
};
|
|
262
|
-
this._handleWriteableCharacter = (ev) => {
|
|
263
|
-
const isFocusedOnSearchInput = document.activeElement === this._inputField;
|
|
264
|
-
if (isFocusedOnSearchInput)
|
|
265
|
-
return;
|
|
266
|
-
this._inputField.focus();
|
|
267
|
-
const isAPrintableCharacter = ev.key.match(/\P{C}/u);
|
|
268
|
-
if (ev.key.length !== 1 || !isAPrintableCharacter) {
|
|
269
|
-
ev.preventDefault();
|
|
103
|
+
this._getSearchItemsCount = () => {
|
|
104
|
+
if (this._shouldShowHistory)
|
|
105
|
+
return this._historyLimitedContent.length;
|
|
106
|
+
let searchItemsCount = this._searchResults.products.length +
|
|
107
|
+
this._searchResults.categories.length +
|
|
108
|
+
this._searchResults.suggestions.length +
|
|
109
|
+
this._searchResults.producers.length;
|
|
110
|
+
if (this._searchResults.products.length && this._searchResults.suggestions.length) {
|
|
111
|
+
searchItemsCount += 1;
|
|
270
112
|
}
|
|
113
|
+
return searchItemsCount;
|
|
271
114
|
};
|
|
272
115
|
this._hideSuggesterOnClickOutside = (ev) => {
|
|
273
116
|
const outsideClick = typeof ev.composedPath === 'function' && !ev.composedPath().includes(this);
|
|
@@ -282,12 +125,6 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
282
125
|
? this.classList.remove(search_constants.SEARCH_CLASS_NAMES.mobileOpened)
|
|
283
126
|
: this.classList.add(search_constants.SEARCH_CLASS_NAMES.mobileOpened);
|
|
284
127
|
};
|
|
285
|
-
this._preventSubmitOnSearchClear = (ev) => {
|
|
286
|
-
const $searchClear = this.querySelector(search_constants.SEARCH_COMPONENT_NAMES.clearButton);
|
|
287
|
-
if (ev.key === 'Enter' && ev.target === $searchClear) {
|
|
288
|
-
ev.preventDefault();
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
128
|
}
|
|
292
129
|
async connectedCallback() {
|
|
293
130
|
super.connectedCallback();
|
|
@@ -326,9 +163,7 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
326
163
|
disconnectedCallback() {
|
|
327
164
|
super.disconnectedCallback();
|
|
328
165
|
document.removeEventListener('click', this._hideSuggesterOnClickOutside);
|
|
329
|
-
document.removeEventListener('keydown', this._preventScrollingOnSearchContentBrowsing);
|
|
330
166
|
window.removeEventListener('resize', this._switchTypeOfSearchView);
|
|
331
|
-
this._searchForm.removeEventListener('keydown', this._preventSubmitOnSearchClear);
|
|
332
167
|
}
|
|
333
168
|
_setupContext() {
|
|
334
169
|
this._historyContextProvider = new context_provider_controller.ContextProviderController(this);
|
|
@@ -337,11 +172,8 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
337
172
|
_setupInitialSearchPhrase() {
|
|
338
173
|
var _a;
|
|
339
174
|
const searchInput = this.querySelector('input[type="search"]');
|
|
340
|
-
const searchForm = this.closest('form');
|
|
341
175
|
if (searchInput)
|
|
342
176
|
this._inputField = searchInput;
|
|
343
|
-
if (searchForm)
|
|
344
|
-
this._searchForm = searchForm;
|
|
345
177
|
if (!((_a = this._inputField) === null || _a === void 0 ? void 0 : _a.value))
|
|
346
178
|
return;
|
|
347
179
|
this._searchPhrase = this._inputField.value;
|
|
@@ -360,17 +192,11 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
360
192
|
}
|
|
361
193
|
_setupListeners() {
|
|
362
194
|
this.addEventListener(search_constants.SEARCH_CUSTOM_EVENT_NAMES.focusin, (ev) => {
|
|
363
|
-
var _a, _b, _c;
|
|
364
|
-
const $target = (_a = ev.detail) === null || _a === void 0 ? void 0 : _a.relatedTarget;
|
|
365
|
-
if ($target === null || $target === void 0 ? void 0 : $target.closest(`[id="${this._searchContentContainerId}"]`))
|
|
366
|
-
return;
|
|
367
195
|
const searchBar = this.querySelector(`.${search_constants.SEARCH_CLASS_NAMES.searchBar}`);
|
|
368
196
|
searchBar === null || searchBar === void 0 ? void 0 : searchBar.classList.add(search_constants.SEARCH_CLASS_NAMES.outline);
|
|
369
|
-
const shouldShowMessage =
|
|
370
|
-
this._updateSearchView(
|
|
371
|
-
document.addEventListener('
|
|
372
|
-
document.addEventListener('keyup', this._handleSearchTabNavigation);
|
|
373
|
-
document.addEventListener('keydown', this._preventScrollingOnSearchContentBrowsing);
|
|
197
|
+
const shouldShowMessage = ev.detail.searchPhrase !== '';
|
|
198
|
+
this._updateSearchView(ev.detail.searchPhrase, shouldShowMessage, false);
|
|
199
|
+
document.addEventListener('keyup', this._bindKeys);
|
|
374
200
|
});
|
|
375
201
|
this.addEventListener(search_constants.SEARCH_CUSTOM_EVENT_NAMES.keyup, (ev) => {
|
|
376
202
|
const shouldShowMessage = ev.detail.searchPhrase !== '';
|
|
@@ -381,7 +207,7 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
381
207
|
this._updateSearchView('', false);
|
|
382
208
|
});
|
|
383
209
|
this.addEventListener(search_constants.SEARCH_CUSTOM_EVENT_NAMES.submit, () => {
|
|
384
|
-
if (this._activeItemId !==
|
|
210
|
+
if (this._activeItemId !== -1)
|
|
385
211
|
return;
|
|
386
212
|
if (this._inputField.value === '') {
|
|
387
213
|
this._updateSearchView(this._inputField.value, true);
|
|
@@ -405,12 +231,10 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
405
231
|
});
|
|
406
232
|
document.addEventListener('click', this._hideSuggesterOnClickOutside);
|
|
407
233
|
window.addEventListener('resize', this._switchTypeOfSearchView);
|
|
408
|
-
this._searchForm.addEventListener('keydown', this._preventSubmitOnSearchClear);
|
|
409
234
|
}
|
|
410
235
|
_updateSearchView(searchPhrase, shouldShowMessage, shouldUpdateSearchPhrase = true) {
|
|
411
236
|
this._shouldShowMessage = shouldShowMessage;
|
|
412
|
-
this.
|
|
413
|
-
this._inputField.setAttribute('aria-activedescendant', '');
|
|
237
|
+
this._activeItemId = -1;
|
|
414
238
|
this._displaySuggester(searchPhrase);
|
|
415
239
|
if (!shouldUpdateSearchPhrase)
|
|
416
240
|
return;
|
|
@@ -448,59 +272,57 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
448
272
|
_handleToggleHistoryAndResults({ shouldShowHistory, shouldShowResults }) {
|
|
449
273
|
this._shouldShowHistory = shouldShowHistory;
|
|
450
274
|
this._shouldShowResults = shouldShowResults;
|
|
451
|
-
this.
|
|
452
|
-
this._toggleSearchContainerAttributes(shouldShowHistory, shouldShowResults);
|
|
275
|
+
this._toggleSearchInputAria(shouldShowHistory, shouldShowResults);
|
|
453
276
|
}
|
|
454
|
-
|
|
277
|
+
_toggleSearchInputAria(shouldShowHistory, shouldShowResults) {
|
|
455
278
|
var _a;
|
|
456
279
|
const $input = (_a = this._searchInput) === null || _a === void 0 ? void 0 : _a.input;
|
|
457
280
|
if (!$input)
|
|
458
281
|
return;
|
|
459
282
|
if (!shouldShowHistory && !shouldShowResults) {
|
|
460
283
|
$input.removeAttribute('aria-label');
|
|
461
|
-
$input.setAttribute('aria-activedescendant', '');
|
|
462
284
|
return;
|
|
463
285
|
}
|
|
464
286
|
$input.setAttribute('aria-expanded', 'true');
|
|
465
|
-
if (shouldShowHistory)
|
|
287
|
+
if (shouldShowHistory)
|
|
466
288
|
$input.setAttribute('aria-label', this.settings.historyGuideAriaLabel);
|
|
467
|
-
|
|
468
|
-
}
|
|
469
|
-
if (shouldShowResults) {
|
|
289
|
+
if (shouldShowResults)
|
|
470
290
|
$input.setAttribute('aria-label', this.settings.suggesterGuideAriaLabel);
|
|
471
|
-
this._inputField.removeAttribute('aria-haspopup');
|
|
472
|
-
}
|
|
473
291
|
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
292
|
+
_scroll(direction) {
|
|
293
|
+
const searchContainer = this.querySelector(`.${search_constants.SEARCH_CLASS_NAMES.container}`);
|
|
294
|
+
const maxScrollTop = searchContainer.scrollHeight - searchContainer.clientHeight;
|
|
295
|
+
const activeItem = this.querySelector(`[data-search-item-id="${this._activeItemId}"]`);
|
|
296
|
+
const activeItemHeight = (activeItem === null || activeItem === void 0 ? void 0 : activeItem.getBoundingClientRect().height) || 0;
|
|
297
|
+
let top;
|
|
298
|
+
if (direction === search_constants.SCROLL_DIRECTIONS.up) {
|
|
299
|
+
top = searchContainer.scrollTop == 0 ? 0 : searchContainer.scrollTop + 30 - activeItemHeight;
|
|
477
300
|
}
|
|
478
|
-
|
|
479
|
-
|
|
301
|
+
else {
|
|
302
|
+
top = searchContainer.scrollTop == maxScrollTop ? maxScrollTop : activeItemHeight + searchContainer.scrollTop - 30;
|
|
480
303
|
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
const $activeSearchItem = this.querySelector(`[data-search-item-id="${this._activeItemId}"]`);
|
|
484
|
-
if (!$activeSearchItem)
|
|
485
|
-
return;
|
|
486
|
-
const $linkElement = $activeSearchItem.querySelector('a');
|
|
487
|
-
const $suggestedElement = $linkElement || $activeSearchItem;
|
|
488
|
-
const $elementToClick = $activeSearchItem.dataset.suggestedValue ? $suggestedElement : $linkElement;
|
|
489
|
-
if (!$elementToClick) {
|
|
490
|
-
$activeSearchItem.click();
|
|
304
|
+
if (this._activeItemId === this._getSearchItemsCount() - 1) {
|
|
305
|
+
top = maxScrollTop;
|
|
491
306
|
}
|
|
492
|
-
|
|
493
|
-
|
|
307
|
+
if (this._activeItemId === 0) {
|
|
308
|
+
top = 0;
|
|
494
309
|
}
|
|
310
|
+
searchContainer === null || searchContainer === void 0 ? void 0 : searchContainer.scrollTo({ top, behavior: 'smooth' });
|
|
311
|
+
}
|
|
312
|
+
_handleChooseSearchItem() {
|
|
313
|
+
const activeSearchItem = this.querySelector(`[data-search-item-id="${this._activeItemId}"]`);
|
|
314
|
+
const elementToClick = activeSearchItem.dataset.suggestedValue
|
|
315
|
+
? activeSearchItem
|
|
316
|
+
: activeSearchItem.querySelector('a');
|
|
317
|
+
elementToClick.click();
|
|
495
318
|
}
|
|
496
319
|
_resetSearchView() {
|
|
497
320
|
this._shouldShowMessage = false;
|
|
498
|
-
this.
|
|
321
|
+
this._activeItemId = -1;
|
|
499
322
|
const searchBar = this.querySelector(`.${search_constants.SEARCH_CLASS_NAMES.searchBar}`);
|
|
500
323
|
searchBar === null || searchBar === void 0 ? void 0 : searchBar.classList.remove(search_constants.SEARCH_CLASS_NAMES.outline);
|
|
501
324
|
this._hideHistorySuggestionsAndResults();
|
|
502
|
-
document.removeEventListener('
|
|
503
|
-
document.removeEventListener('keyup', this._handleSearchTabNavigation);
|
|
325
|
+
document.removeEventListener('keyup', this._bindKeys);
|
|
504
326
|
}
|
|
505
327
|
_submitSearchPhrase(searchPhrase) {
|
|
506
328
|
this._dispatchEventWithSearchPhrase(search_constants.SEARCH_CUSTOM_EVENT_NAMES.searchPhraseSubmitted, searchPhrase);
|
|
@@ -535,48 +357,33 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
535
357
|
<div class="labeled-icon__signature">${this._translations.search}</div>
|
|
536
358
|
</div>
|
|
537
359
|
|
|
538
|
-
${when.when(this._isSuggesterLayerVisible(), () => lit.html
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
360
|
+
${when.when(this._isSuggesterLayerVisible(), () => lit.html `<div class="${search_constants.SEARCH_CLASS_NAMES.container}">
|
|
361
|
+
${when.when(this._shouldShowMessage, () => lit.html `<h-search-message
|
|
362
|
+
.history="${this._historyLimitedContent}"
|
|
363
|
+
.results="${this._searchResults}"
|
|
364
|
+
.translations="${this._translations}"
|
|
365
|
+
search-phrase="${this._searchPhrase}"
|
|
366
|
+
module-instance-id="${this.moduleInstanceId}"
|
|
367
|
+
></h-search-message>`)}
|
|
368
|
+
${when.when(this._shouldShowHistory, () => lit.html `<h-search-history
|
|
369
|
+
${ref_js.ref(this._searchHistoryRef)}
|
|
546
370
|
.history="${this._historyLimitedContent}"
|
|
547
|
-
.results="${this._searchResults}"
|
|
548
371
|
.translations="${this._translations}"
|
|
372
|
+
active-item-id="${this._activeItemId}"
|
|
373
|
+
module-instance-id="${this.moduleInstanceId}"
|
|
374
|
+
></h-search-history>`)}
|
|
375
|
+
${when.when(this._shouldShowResults, () => lit.html `<h-search-results
|
|
376
|
+
${ref_js.ref(this._searchResultsRef)}
|
|
377
|
+
.results="${this._searchResults}"
|
|
549
378
|
search-phrase="${this._searchPhrase}"
|
|
379
|
+
.settings="${this.settings}"
|
|
380
|
+
locale="${this.locale}"
|
|
381
|
+
view="${this.view}"
|
|
382
|
+
.translations="${this._translations}"
|
|
383
|
+
active-item-id="${this._activeItemId}"
|
|
550
384
|
module-instance-id="${this.moduleInstanceId}"
|
|
551
|
-
></h-search-
|
|
552
|
-
|
|
553
|
-
${ref_js.ref(this._searchHistoryRef)}
|
|
554
|
-
.history="${this._historyLimitedContent}"
|
|
555
|
-
.translations="${this._translations}"
|
|
556
|
-
active-item-id="${this._activeItemId}"
|
|
557
|
-
search-id="${this._id}"
|
|
558
|
-
module-instance-id="${this.moduleInstanceId}"
|
|
559
|
-
></h-search-history>`)}
|
|
560
|
-
${when.when(this._shouldShowResults, () => lit.html `<h-search-results
|
|
561
|
-
${ref_js.ref(this._searchResultsRef)}
|
|
562
|
-
.results="${this._searchResults}"
|
|
563
|
-
search-phrase="${this._searchPhrase}"
|
|
564
|
-
.settings="${this.settings}"
|
|
565
|
-
locale="${this.locale}"
|
|
566
|
-
view="${this.view}"
|
|
567
|
-
.translations="${this._translations}"
|
|
568
|
-
active-item-id="${this._activeItemId}"
|
|
569
|
-
search-id="${this._id}"
|
|
570
|
-
module-instance-id="${this.moduleInstanceId}"
|
|
571
|
-
></h-search-results>`)}
|
|
572
|
-
</div>
|
|
573
|
-
`, () => lit.html `
|
|
574
|
-
<div
|
|
575
|
-
class="${search_constants.SEARCH_CLASS_NAMES.container}"
|
|
576
|
-
id="${this._searchContentContainerId}"
|
|
577
|
-
role="${this._containerRole}"
|
|
578
|
-
hidden
|
|
579
|
-
></div>`)}
|
|
385
|
+
></h-search-results>`)}
|
|
386
|
+
</div>`)}
|
|
580
387
|
`;
|
|
581
388
|
}
|
|
582
389
|
};
|
|
@@ -630,16 +437,12 @@ tslib_es6.__decorate([
|
|
|
630
437
|
], exports.HSearch.prototype, "_historyContext", void 0);
|
|
631
438
|
tslib_es6.__decorate([
|
|
632
439
|
decorators.state(),
|
|
633
|
-
tslib_es6.__metadata("design:type",
|
|
440
|
+
tslib_es6.__metadata("design:type", Number)
|
|
634
441
|
], exports.HSearch.prototype, "_activeItemId", void 0);
|
|
635
442
|
tslib_es6.__decorate([
|
|
636
443
|
decorators.state(),
|
|
637
444
|
tslib_es6.__metadata("design:type", Object)
|
|
638
445
|
], exports.HSearch.prototype, "_translations", void 0);
|
|
639
|
-
tslib_es6.__decorate([
|
|
640
|
-
decorators.state(),
|
|
641
|
-
tslib_es6.__metadata("design:type", String)
|
|
642
|
-
], exports.HSearch.prototype, "_containerRole", void 0);
|
|
643
446
|
exports.HSearch = tslib_es6.__decorate([
|
|
644
447
|
phoenix_custom_element.phoenixCustomElement(search_constants.SEARCH_COMPONENT_NAMES.search)
|
|
645
448
|
], exports.HSearch);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qEAA6E;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js
CHANGED
|
@@ -32,11 +32,6 @@ exports.HSearchClear = class HSearchClear extends phoenix_light_lit_element.Phoe
|
|
|
32
32
|
this._searchContextSetup();
|
|
33
33
|
this.addEventListener('click', this._dispatchClearEvent);
|
|
34
34
|
}
|
|
35
|
-
updated(_changedProperties) {
|
|
36
|
-
super.updated(_changedProperties);
|
|
37
|
-
const newTabIndex = this._shouldShow ? '0' : '-1';
|
|
38
|
-
this.setAttribute('tabindex', newTabIndex);
|
|
39
|
-
}
|
|
40
35
|
async _searchContextSetup() {
|
|
41
36
|
try {
|
|
42
37
|
this._searchContextConsumer = new context_consumer_controller.ContextConsumerController(this);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,qDAAyD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2EAAmF;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,qDAAyD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2EAAmF;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|