@shoper/phoenix_design_system 1.11.11-2 → 1.11.11-21
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/color_swatches/color_item/color_item.js +21 -29
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_item/color_item.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_item/color_item_constants.js +0 -4
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_item/color_item_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches.js +121 -11
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches_constants.js +0 -2
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/search.js +89 -267
- 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 -21
- 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 -12
- 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/messages/base_message.js +9 -47
- package/build/cjs/packages/phoenix/src/components/messages/base_message.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/messages/base_message_constants.js +0 -2
- package/build/cjs/packages/phoenix/src/components/messages/base_message_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/index.js +17 -17
- package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.d.ts +3 -6
- package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.js +22 -30
- package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item_constants.js +1 -4
- package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item_constants.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.d.ts +11 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js +124 -14
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js +1 -2
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.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 +90 -268
- 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 -21
- 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 -13
- 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/messages/base_message.d.ts +1 -3
- package/build/esm/packages/phoenix/src/components/messages/base_message.js +11 -49
- package/build/esm/packages/phoenix/src/components/messages/base_message.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/messages/base_message_constants.js +3 -4
- package/build/esm/packages/phoenix/src/components/messages/base_message_constants.js.map +1 -1
- package/build/esm/packages/phoenix/src/index.js +3 -3
- package/package.json +2 -2
|
@@ -11,19 +11,15 @@ import { BehaviorSubject } from '../../../core/classes/behavior_subject/behavior
|
|
|
11
11
|
import { createRef, ref } from 'lit-html/directives/ref.js';
|
|
12
12
|
import { ContextProviderController } from '../../../core/context/context_provider_controller.js';
|
|
13
13
|
import { BREAKPOINTS } from '../../../global_constants.js';
|
|
14
|
-
import v4 from '../../../../../../external/uuid/dist/esm-browser/v4.js';
|
|
15
14
|
import { when as n } from '../../../../../../external/lit/external/lit-html/directives/when.js';
|
|
16
|
-
import { DEFAULT_VIEW, SEARCH_CLASS_NAMES,
|
|
15
|
+
import { DEFAULT_VIEW, SEARCH_CLASS_NAMES, SCROLL_DIRECTIONS, SEARCH_CONFIGURATION, SEARCH_COMPONENT_NAMES, SEARCH_CONTEXT_NAMES, SEARCH_CUSTOM_EVENT_NAMES } from './search_constants.js';
|
|
17
16
|
|
|
18
17
|
let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
19
18
|
constructor() {
|
|
20
19
|
super(...arguments);
|
|
21
20
|
this.view = DEFAULT_VIEW;
|
|
22
|
-
this._id = v4();
|
|
23
|
-
this._searchContentContainerId = v4();
|
|
24
21
|
this._searchResultsRef = createRef();
|
|
25
22
|
this._searchHistoryRef = createRef();
|
|
26
|
-
this._searchMessageRef = createRef();
|
|
27
23
|
this._shouldShowHistory = false;
|
|
28
24
|
this._shouldShowResults = false;
|
|
29
25
|
this._shouldShowMessage = false;
|
|
@@ -33,225 +29,84 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
33
29
|
this._historyContext = new BehaviorSubject({
|
|
34
30
|
showLoadMore: false
|
|
35
31
|
});
|
|
36
|
-
this._activeItemId =
|
|
32
|
+
this._activeItemId = -1;
|
|
37
33
|
this._translations = {};
|
|
38
|
-
this._containerRole = 'grid';
|
|
39
34
|
this._bindKeys = (ev) => {
|
|
35
|
+
var _a;
|
|
40
36
|
switch (ev.key) {
|
|
41
37
|
case 'ArrowDown':
|
|
42
38
|
ev.preventDefault();
|
|
43
|
-
this.
|
|
39
|
+
this._focusOutsideActiveItemsForward();
|
|
40
|
+
this._scroll(SCROLL_DIRECTIONS.down);
|
|
44
41
|
break;
|
|
45
42
|
case 'ArrowUp':
|
|
46
43
|
ev.preventDefault();
|
|
47
|
-
this.
|
|
48
|
-
|
|
49
|
-
case 'ArrowLeft':
|
|
50
|
-
if (this._containerRole === 'grid') {
|
|
51
|
-
ev.preventDefault();
|
|
52
|
-
this._handleBackwardGridFocus();
|
|
53
|
-
}
|
|
54
|
-
if (this._containerRole === 'listbox')
|
|
55
|
-
this._handleMoveToInputField();
|
|
56
|
-
break;
|
|
57
|
-
case 'ArrowRight':
|
|
58
|
-
if (this._containerRole === 'grid') {
|
|
59
|
-
ev.preventDefault();
|
|
60
|
-
this._handleForwardGridFocus();
|
|
61
|
-
}
|
|
62
|
-
if (this._containerRole === 'listbox')
|
|
63
|
-
this._handleMoveToInputField();
|
|
44
|
+
this._focusOutsideActiveItemsBackward();
|
|
45
|
+
this._scroll(SCROLL_DIRECTIONS.up);
|
|
64
46
|
break;
|
|
65
47
|
case 'Enter':
|
|
66
48
|
ev.preventDefault();
|
|
67
|
-
if (this._activeItemId ===
|
|
49
|
+
if (this._activeItemId === -1 || !this._shouldShowResults)
|
|
68
50
|
return;
|
|
69
51
|
this._handleChooseSearchItem();
|
|
70
52
|
break;
|
|
71
53
|
case 'Escape':
|
|
72
54
|
ev.preventDefault();
|
|
73
|
-
|
|
74
|
-
|
|
55
|
+
this._inputField.blur();
|
|
56
|
+
this._resetSearchView();
|
|
57
|
+
break;
|
|
58
|
+
case 'Tab':
|
|
59
|
+
const isFocusedOnSearchInput = !!((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.matches('input[type="search"]'));
|
|
60
|
+
if (!isFocusedOnSearchInput) {
|
|
61
|
+
const searchBar = this.querySelector(`.${SEARCH_CLASS_NAMES.searchBar}`);
|
|
62
|
+
searchBar === null || searchBar === void 0 ? void 0 : searchBar.classList.remove(SEARCH_CLASS_NAMES.outline);
|
|
75
63
|
this._resetSearchView();
|
|
64
|
+
document.removeEventListener('keyup', this._bindKeys);
|
|
76
65
|
}
|
|
77
|
-
else {
|
|
78
|
-
this._inputField.value = '';
|
|
79
|
-
}
|
|
80
|
-
break;
|
|
81
|
-
case 'End':
|
|
82
|
-
ev.preventDefault();
|
|
83
|
-
this._handleFocusOnInputWithCaretEnd();
|
|
84
|
-
break;
|
|
85
|
-
case 'Home':
|
|
86
|
-
ev.preventDefault();
|
|
87
|
-
this._handleFocusOnInputWithCaretStart();
|
|
88
|
-
break;
|
|
89
|
-
case 'Backspace':
|
|
90
|
-
this._handleMoveToInputField();
|
|
91
|
-
break;
|
|
92
|
-
default:
|
|
93
|
-
const isAWriteableCharacter = ev.key.length === 1;
|
|
94
|
-
if (isAWriteableCharacter)
|
|
95
|
-
this._handleWriteableCharacter(ev);
|
|
96
66
|
break;
|
|
97
67
|
}
|
|
98
68
|
};
|
|
99
|
-
this.
|
|
100
|
-
if (ev.key !== 'Tab')
|
|
101
|
-
return;
|
|
102
|
-
const isFocusedOnSearchInput = document.activeElement === this._inputField;
|
|
103
|
-
if (ev.shiftKey && !isFocusedOnSearchInput) {
|
|
104
|
-
this._focusOnPreviousElementBeforeSearchInput(ev);
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
if (!isFocusedOnSearchInput) {
|
|
108
|
-
const searchBar = this.querySelector(`.${SEARCH_CLASS_NAMES.searchBar}`);
|
|
109
|
-
searchBar === null || searchBar === void 0 ? void 0 : searchBar.classList.remove(SEARCH_CLASS_NAMES.outline);
|
|
110
|
-
this._resetSearchView();
|
|
111
|
-
document.removeEventListener('keydown', this._bindKeys);
|
|
112
|
-
document.addEventListener('keyup', this._handleSearchTabNavigation);
|
|
113
|
-
this._focusOnNextElementAfterSearchInput(ev);
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
this._focusOnPreviousElementBeforeSearchInput = async (ev) => {
|
|
117
|
-
ev.preventDefault();
|
|
118
|
-
const searchBar = this.querySelector(`.${SEARCH_CLASS_NAMES.searchBar}`);
|
|
119
|
-
searchBar === null || searchBar === void 0 ? void 0 : searchBar.classList.remove(SEARCH_CLASS_NAMES.outline);
|
|
120
|
-
this._resetSearchView();
|
|
121
|
-
document.removeEventListener('keydown', this._bindKeys);
|
|
122
|
-
document.addEventListener('keyup', this._handleSearchTabNavigation);
|
|
123
|
-
UiDomUtils.getPreviousFocusableElement(this._inputField).focus();
|
|
124
|
-
};
|
|
125
|
-
this._focusOnNextElementAfterSearchInput = async (ev) => {
|
|
126
|
-
ev.preventDefault();
|
|
127
|
-
UiDomUtils.getNextFocusableElement(this._inputField).focus();
|
|
128
|
-
};
|
|
129
|
-
this._preventScrollingOnSearchContentBrowsing = (ev) => {
|
|
69
|
+
this._focusOutsideActiveItemsForward = () => {
|
|
130
70
|
var _a;
|
|
131
|
-
const
|
|
132
|
-
const
|
|
133
|
-
const hasSearchContainerParent = !!((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.closest('.search__container'));
|
|
134
|
-
if ((hasArrowBeenPressed || hasHomeOrEndBeenPressed) && hasSearchContainerParent) {
|
|
135
|
-
ev.preventDefault();
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
this._handleForwardListFocus = () => {
|
|
139
|
-
var _a, _b;
|
|
140
|
-
const containers = [
|
|
141
|
-
this._searchHistoryRef.value,
|
|
142
|
-
this._searchResultsRef.value,
|
|
143
|
-
this._searchMessageRef.value
|
|
144
|
-
];
|
|
145
|
-
const $searchItemsContainer = containers.find(container => container && !UiDomUtils.isElementEmpty(container));
|
|
146
|
-
if (!$searchItemsContainer)
|
|
147
|
-
return;
|
|
148
|
-
const isActiveElementAGridSearchItem = (_b = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.getAttribute('data-search-item-id')) === null || _b === void 0 ? void 0 : _b.includes('grid');
|
|
149
|
-
const $listSearchItems = UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
|
|
150
|
-
const searchItemId = $el.getAttribute('data-search-item-id');
|
|
151
|
-
const isListSearchItem = !!searchItemId && !searchItemId.includes('grid');
|
|
152
|
-
const isGridSearchItem = !!searchItemId && searchItemId.includes('grid');
|
|
153
|
-
return isActiveElementAGridSearchItem ? isGridSearchItem : isListSearchItem;
|
|
154
|
-
});
|
|
155
|
-
this._handleForwardFocus($listSearchItems);
|
|
156
|
-
};
|
|
157
|
-
this._handleForwardGridFocus = () => {
|
|
158
|
-
const containers = [
|
|
159
|
-
this._searchHistoryRef.value,
|
|
160
|
-
this._searchResultsRef.value,
|
|
161
|
-
this._searchMessageRef.value
|
|
162
|
-
];
|
|
163
|
-
const $searchItemsContainer = containers.find(container => container && !UiDomUtils.isElementEmpty(container));
|
|
71
|
+
const $activeElement = document.activeElement;
|
|
72
|
+
const $searchItemsContainer = this._searchHistoryRef.value || this._searchResultsRef.value;
|
|
164
73
|
if (!$searchItemsContainer)
|
|
165
74
|
return;
|
|
166
|
-
const $
|
|
75
|
+
const $searchItems = UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
|
|
167
76
|
return !!$el.getAttribute('data-search-item-id');
|
|
168
77
|
});
|
|
169
|
-
this._handleForwardFocus($gridSearchItems);
|
|
170
|
-
};
|
|
171
|
-
this._handleForwardFocus = ($searchItems) => {
|
|
172
|
-
var _a;
|
|
173
|
-
const $activeElement = document.activeElement;
|
|
174
78
|
const indexOfCurrentElement = $searchItems.indexOf($activeElement);
|
|
175
79
|
const indexOfNextElement = indexOfCurrentElement === $searchItems.length - 1 ? 0 : indexOfCurrentElement + 1;
|
|
176
80
|
const $nextSearchItemElement = $searchItems[indexOfNextElement];
|
|
177
81
|
$nextSearchItemElement.focus();
|
|
178
|
-
this.
|
|
82
|
+
this._activeItemId = (_a = Number($nextSearchItemElement.getAttribute('data-search-item-id'))) !== null && _a !== void 0 ? _a : -1;
|
|
179
83
|
};
|
|
180
|
-
this.
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
this._inputField.focus();
|
|
185
|
-
};
|
|
186
|
-
this._handleBackwardListFocus = () => {
|
|
187
|
-
var _a, _b;
|
|
188
|
-
const containers = [
|
|
189
|
-
this._searchHistoryRef.value,
|
|
190
|
-
this._searchResultsRef.value,
|
|
191
|
-
this._searchMessageRef.value
|
|
192
|
-
];
|
|
193
|
-
const $searchItemsContainer = containers.find(container => container && !UiDomUtils.isElementEmpty(container));
|
|
194
|
-
if (!$searchItemsContainer)
|
|
195
|
-
return;
|
|
196
|
-
const isActiveElementAGridSearchItem = (_b = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.getAttribute('data-search-item-id')) === null || _b === void 0 ? void 0 : _b.includes('grid');
|
|
197
|
-
const $listSearchItems = UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
|
|
198
|
-
const searchItemId = $el.getAttribute('data-search-item-id');
|
|
199
|
-
const isListSearchItem = !!searchItemId && !searchItemId.includes('grid');
|
|
200
|
-
const isGridSearchItem = !!searchItemId && searchItemId.includes('grid');
|
|
201
|
-
return isActiveElementAGridSearchItem ? isGridSearchItem : isListSearchItem;
|
|
202
|
-
});
|
|
203
|
-
this._handleBackwardFocus($listSearchItems);
|
|
204
|
-
};
|
|
205
|
-
this._handleBackwardGridFocus = () => {
|
|
206
|
-
const containers = [
|
|
207
|
-
this._searchHistoryRef.value,
|
|
208
|
-
this._searchResultsRef.value,
|
|
209
|
-
this._searchMessageRef.value
|
|
210
|
-
];
|
|
211
|
-
const $searchItemsContainer = containers.find(container => container && !UiDomUtils.isElementEmpty(container));
|
|
84
|
+
this._focusOutsideActiveItemsBackward = () => {
|
|
85
|
+
var _a;
|
|
86
|
+
const $activeElement = document.activeElement;
|
|
87
|
+
const $searchItemsContainer = this._searchHistoryRef.value || this._searchResultsRef.value;
|
|
212
88
|
if (!$searchItemsContainer)
|
|
213
89
|
return;
|
|
214
|
-
const $
|
|
90
|
+
const $searchItems = UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
|
|
215
91
|
return !!$el.getAttribute('data-search-item-id');
|
|
216
92
|
});
|
|
217
|
-
this._handleBackwardFocus($gridSearchItems);
|
|
218
|
-
};
|
|
219
|
-
this._handleBackwardFocus = ($searchItems) => {
|
|
220
|
-
var _a;
|
|
221
|
-
const $activeElement = document.activeElement;
|
|
222
93
|
const indexOfCurrentElement = $searchItems.indexOf($activeElement);
|
|
223
94
|
const indexOfPreviousElement = indexOfCurrentElement === 0 ? $searchItems.length - 1 : indexOfCurrentElement - 1;
|
|
224
95
|
const $previousSearchItemElement = $searchItems[indexOfPreviousElement];
|
|
225
96
|
$previousSearchItemElement.focus();
|
|
226
|
-
this.
|
|
227
|
-
};
|
|
228
|
-
this._setActiveItemId = (newActiveItemId) => {
|
|
229
|
-
this._activeItemId = newActiveItemId;
|
|
230
|
-
if (document.activeElement !== this._inputField) {
|
|
231
|
-
this._inputField.setAttribute('aria-activedescendant', this._activeItemId);
|
|
232
|
-
}
|
|
97
|
+
this._activeItemId = (_a = Number($previousSearchItemElement.getAttribute('data-search-item-id'))) !== null && _a !== void 0 ? _a : -1;
|
|
233
98
|
};
|
|
234
|
-
this.
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
this._inputField.focus();
|
|
244
|
-
this._inputField.setSelectionRange(0, 0);
|
|
245
|
-
};
|
|
246
|
-
this._handleWriteableCharacter = (ev) => {
|
|
247
|
-
const isFocusedOnSearchInput = document.activeElement === this._inputField;
|
|
248
|
-
if (isFocusedOnSearchInput)
|
|
249
|
-
return;
|
|
250
|
-
this._inputField.focus();
|
|
251
|
-
const isAPrintableCharacter = ev.key.match(/\P{C}/u);
|
|
252
|
-
if (ev.key.length === 1 && isAPrintableCharacter) {
|
|
253
|
-
this._inputField.value = `${this._inputField.value}${ev.key}`;
|
|
99
|
+
this._getSearchItemsCount = () => {
|
|
100
|
+
if (this._shouldShowHistory)
|
|
101
|
+
return this._historyLimitedContent.length;
|
|
102
|
+
let searchItemsCount = this._searchResults.products.length +
|
|
103
|
+
this._searchResults.categories.length +
|
|
104
|
+
this._searchResults.suggestions.length +
|
|
105
|
+
this._searchResults.producers.length;
|
|
106
|
+
if (this._searchResults.products.length && this._searchResults.suggestions.length) {
|
|
107
|
+
searchItemsCount += 1;
|
|
254
108
|
}
|
|
109
|
+
return searchItemsCount;
|
|
255
110
|
};
|
|
256
111
|
this._hideSuggesterOnClickOutside = (ev) => {
|
|
257
112
|
const outsideClick = typeof ev.composedPath === 'function' && !ev.composedPath().includes(this);
|
|
@@ -266,12 +121,6 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
266
121
|
? this.classList.remove(SEARCH_CLASS_NAMES.mobileOpened)
|
|
267
122
|
: this.classList.add(SEARCH_CLASS_NAMES.mobileOpened);
|
|
268
123
|
};
|
|
269
|
-
this._preventSubmitOnSearchClear = (ev) => {
|
|
270
|
-
const $searchClear = this.querySelector(SEARCH_COMPONENT_NAMES.clearButton);
|
|
271
|
-
if (ev.key === 'Enter' && ev.target === $searchClear) {
|
|
272
|
-
ev.preventDefault();
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
124
|
}
|
|
276
125
|
async connectedCallback() {
|
|
277
126
|
super.connectedCallback();
|
|
@@ -310,9 +159,7 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
310
159
|
disconnectedCallback() {
|
|
311
160
|
super.disconnectedCallback();
|
|
312
161
|
document.removeEventListener('click', this._hideSuggesterOnClickOutside);
|
|
313
|
-
document.removeEventListener('keydown', this._preventScrollingOnSearchContentBrowsing);
|
|
314
162
|
window.removeEventListener('resize', this._switchTypeOfSearchView);
|
|
315
|
-
this._searchForm.removeEventListener('keydown', this._preventSubmitOnSearchClear);
|
|
316
163
|
}
|
|
317
164
|
_setupContext() {
|
|
318
165
|
this._historyContextProvider = new ContextProviderController(this);
|
|
@@ -321,11 +168,8 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
321
168
|
_setupInitialSearchPhrase() {
|
|
322
169
|
var _a;
|
|
323
170
|
const searchInput = this.querySelector('input[type="search"]');
|
|
324
|
-
const searchForm = this.closest('form');
|
|
325
171
|
if (searchInput)
|
|
326
172
|
this._inputField = searchInput;
|
|
327
|
-
if (searchForm)
|
|
328
|
-
this._searchForm = searchForm;
|
|
329
173
|
if (!((_a = this._inputField) === null || _a === void 0 ? void 0 : _a.value))
|
|
330
174
|
return;
|
|
331
175
|
this._searchPhrase = this._inputField.value;
|
|
@@ -344,17 +188,11 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
344
188
|
}
|
|
345
189
|
_setupListeners() {
|
|
346
190
|
this.addEventListener(SEARCH_CUSTOM_EVENT_NAMES.focusin, (ev) => {
|
|
347
|
-
var _a, _b, _c;
|
|
348
|
-
const $target = (_a = ev.detail) === null || _a === void 0 ? void 0 : _a.relatedTarget;
|
|
349
|
-
if ($target === null || $target === void 0 ? void 0 : $target.closest(`$${this._searchContentContainerId}`))
|
|
350
|
-
return;
|
|
351
191
|
const searchBar = this.querySelector(`.${SEARCH_CLASS_NAMES.searchBar}`);
|
|
352
192
|
searchBar === null || searchBar === void 0 ? void 0 : searchBar.classList.add(SEARCH_CLASS_NAMES.outline);
|
|
353
|
-
const shouldShowMessage =
|
|
354
|
-
this._updateSearchView(
|
|
355
|
-
document.addEventListener('
|
|
356
|
-
document.addEventListener('keyup', this._handleSearchTabNavigation);
|
|
357
|
-
document.addEventListener('keydown', this._preventScrollingOnSearchContentBrowsing);
|
|
193
|
+
const shouldShowMessage = ev.detail.searchPhrase !== '';
|
|
194
|
+
this._updateSearchView(ev.detail.searchPhrase, shouldShowMessage, false);
|
|
195
|
+
document.addEventListener('keyup', this._bindKeys);
|
|
358
196
|
});
|
|
359
197
|
this.addEventListener(SEARCH_CUSTOM_EVENT_NAMES.keyup, (ev) => {
|
|
360
198
|
const shouldShowMessage = ev.detail.searchPhrase !== '';
|
|
@@ -365,7 +203,7 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
365
203
|
this._updateSearchView('', false);
|
|
366
204
|
});
|
|
367
205
|
this.addEventListener(SEARCH_CUSTOM_EVENT_NAMES.submit, () => {
|
|
368
|
-
if (this._activeItemId !==
|
|
206
|
+
if (this._activeItemId !== -1)
|
|
369
207
|
return;
|
|
370
208
|
if (this._inputField.value === '') {
|
|
371
209
|
this._updateSearchView(this._inputField.value, true);
|
|
@@ -389,12 +227,10 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
389
227
|
});
|
|
390
228
|
document.addEventListener('click', this._hideSuggesterOnClickOutside);
|
|
391
229
|
window.addEventListener('resize', this._switchTypeOfSearchView);
|
|
392
|
-
this._searchForm.addEventListener('keydown', this._preventSubmitOnSearchClear);
|
|
393
230
|
}
|
|
394
231
|
_updateSearchView(searchPhrase, shouldShowMessage, shouldUpdateSearchPhrase = true) {
|
|
395
232
|
this._shouldShowMessage = shouldShowMessage;
|
|
396
|
-
this.
|
|
397
|
-
this._inputField.setAttribute('aria-activedescendant', '');
|
|
233
|
+
this._activeItemId = -1;
|
|
398
234
|
this._displaySuggester(searchPhrase);
|
|
399
235
|
if (!shouldUpdateSearchPhrase)
|
|
400
236
|
return;
|
|
@@ -432,36 +268,42 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
432
268
|
_handleToggleHistoryAndResults({ shouldShowHistory, shouldShowResults }) {
|
|
433
269
|
this._shouldShowHistory = shouldShowHistory;
|
|
434
270
|
this._shouldShowResults = shouldShowResults;
|
|
435
|
-
this.
|
|
436
|
-
this._toggleSearchContainerAttributes(shouldShowHistory, shouldShowResults);
|
|
271
|
+
this._toggleSearchInputAria(shouldShowHistory, shouldShowResults);
|
|
437
272
|
}
|
|
438
|
-
|
|
273
|
+
_toggleSearchInputAria(shouldShowHistory, shouldShowResults) {
|
|
439
274
|
var _a;
|
|
440
275
|
const $input = (_a = this._searchInput) === null || _a === void 0 ? void 0 : _a.input;
|
|
441
276
|
if (!$input)
|
|
442
277
|
return;
|
|
443
278
|
if (!shouldShowHistory && !shouldShowResults) {
|
|
444
279
|
$input.removeAttribute('aria-label');
|
|
445
|
-
$input.setAttribute('aria-activedescendant', '');
|
|
446
280
|
return;
|
|
447
281
|
}
|
|
448
282
|
$input.setAttribute('aria-expanded', 'true');
|
|
449
|
-
if (shouldShowHistory)
|
|
283
|
+
if (shouldShowHistory)
|
|
450
284
|
$input.setAttribute('aria-label', this.settings.historyGuideAriaLabel);
|
|
451
|
-
|
|
452
|
-
}
|
|
453
|
-
if (shouldShowResults) {
|
|
285
|
+
if (shouldShowResults)
|
|
454
286
|
$input.setAttribute('aria-label', this.settings.suggesterGuideAriaLabel);
|
|
455
|
-
this._inputField.removeAttribute('aria-haspopup');
|
|
456
|
-
}
|
|
457
287
|
}
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
288
|
+
_scroll(direction) {
|
|
289
|
+
const searchContainer = this.querySelector(`.${SEARCH_CLASS_NAMES.container}`);
|
|
290
|
+
const maxScrollTop = searchContainer.scrollHeight - searchContainer.clientHeight;
|
|
291
|
+
const activeItem = this.querySelector(`[data-search-item-id="${this._activeItemId}"]`);
|
|
292
|
+
const activeItemHeight = (activeItem === null || activeItem === void 0 ? void 0 : activeItem.getBoundingClientRect().height) || 0;
|
|
293
|
+
let top;
|
|
294
|
+
if (direction === SCROLL_DIRECTIONS.up) {
|
|
295
|
+
top = searchContainer.scrollTop == 0 ? 0 : searchContainer.scrollTop + 30 - activeItemHeight;
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
top = searchContainer.scrollTop == maxScrollTop ? maxScrollTop : activeItemHeight + searchContainer.scrollTop - 30;
|
|
299
|
+
}
|
|
300
|
+
if (this._activeItemId === this._getSearchItemsCount() - 1) {
|
|
301
|
+
top = maxScrollTop;
|
|
461
302
|
}
|
|
462
|
-
if (
|
|
463
|
-
|
|
303
|
+
if (this._activeItemId === 0) {
|
|
304
|
+
top = 0;
|
|
464
305
|
}
|
|
306
|
+
searchContainer === null || searchContainer === void 0 ? void 0 : searchContainer.scrollTo({ top, behavior: 'smooth' });
|
|
465
307
|
}
|
|
466
308
|
_handleChooseSearchItem() {
|
|
467
309
|
const activeSearchItem = this.querySelector(`[data-search-item-id="${this._activeItemId}"]`);
|
|
@@ -472,12 +314,11 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
472
314
|
}
|
|
473
315
|
_resetSearchView() {
|
|
474
316
|
this._shouldShowMessage = false;
|
|
475
|
-
this.
|
|
317
|
+
this._activeItemId = -1;
|
|
476
318
|
const searchBar = this.querySelector(`.${SEARCH_CLASS_NAMES.searchBar}`);
|
|
477
319
|
searchBar === null || searchBar === void 0 ? void 0 : searchBar.classList.remove(SEARCH_CLASS_NAMES.outline);
|
|
478
320
|
this._hideHistorySuggestionsAndResults();
|
|
479
|
-
document.removeEventListener('
|
|
480
|
-
document.addEventListener('keyup', this._handleSearchTabNavigation);
|
|
321
|
+
document.removeEventListener('keyup', this._bindKeys);
|
|
481
322
|
}
|
|
482
323
|
_submitSearchPhrase(searchPhrase) {
|
|
483
324
|
this._dispatchEventWithSearchPhrase(SEARCH_CUSTOM_EVENT_NAMES.searchPhraseSubmitted, searchPhrase);
|
|
@@ -512,48 +353,33 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
512
353
|
<div class="labeled-icon__signature">${this._translations.search}</div>
|
|
513
354
|
</div>
|
|
514
355
|
|
|
515
|
-
${n(this._isSuggesterLayerVisible(), () => html
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
356
|
+
${n(this._isSuggesterLayerVisible(), () => html `<div class="${SEARCH_CLASS_NAMES.container}">
|
|
357
|
+
${n(this._shouldShowMessage, () => html `<h-search-message
|
|
358
|
+
.history="${this._historyLimitedContent}"
|
|
359
|
+
.results="${this._searchResults}"
|
|
360
|
+
.translations="${this._translations}"
|
|
361
|
+
search-phrase="${this._searchPhrase}"
|
|
362
|
+
module-instance-id="${this.moduleInstanceId}"
|
|
363
|
+
></h-search-message>`)}
|
|
364
|
+
${n(this._shouldShowHistory, () => html `<h-search-history
|
|
365
|
+
${ref(this._searchHistoryRef)}
|
|
523
366
|
.history="${this._historyLimitedContent}"
|
|
524
|
-
.results="${this._searchResults}"
|
|
525
367
|
.translations="${this._translations}"
|
|
368
|
+
active-item-id="${this._activeItemId}"
|
|
369
|
+
module-instance-id="${this.moduleInstanceId}"
|
|
370
|
+
></h-search-history>`)}
|
|
371
|
+
${n(this._shouldShowResults, () => html `<h-search-results
|
|
372
|
+
${ref(this._searchResultsRef)}
|
|
373
|
+
.results="${this._searchResults}"
|
|
526
374
|
search-phrase="${this._searchPhrase}"
|
|
375
|
+
.settings="${this.settings}"
|
|
376
|
+
locale="${this.locale}"
|
|
377
|
+
view="${this.view}"
|
|
378
|
+
.translations="${this._translations}"
|
|
379
|
+
active-item-id="${this._activeItemId}"
|
|
527
380
|
module-instance-id="${this.moduleInstanceId}"
|
|
528
|
-
></h-search-
|
|
529
|
-
|
|
530
|
-
${ref(this._searchHistoryRef)}
|
|
531
|
-
.history="${this._historyLimitedContent}"
|
|
532
|
-
.translations="${this._translations}"
|
|
533
|
-
active-item-id="${this._activeItemId}"
|
|
534
|
-
search-id="${this._id}"
|
|
535
|
-
module-instance-id="${this.moduleInstanceId}"
|
|
536
|
-
></h-search-history>`)}
|
|
537
|
-
${n(this._shouldShowResults, () => html `<h-search-results
|
|
538
|
-
${ref(this._searchResultsRef)}
|
|
539
|
-
.results="${this._searchResults}"
|
|
540
|
-
search-phrase="${this._searchPhrase}"
|
|
541
|
-
.settings="${this.settings}"
|
|
542
|
-
locale="${this.locale}"
|
|
543
|
-
view="${this.view}"
|
|
544
|
-
.translations="${this._translations}"
|
|
545
|
-
active-item-id="${this._activeItemId}"
|
|
546
|
-
search-id="${this._id}"
|
|
547
|
-
module-instance-id="${this.moduleInstanceId}"
|
|
548
|
-
></h-search-results>`)}
|
|
549
|
-
</div>
|
|
550
|
-
`, () => html `
|
|
551
|
-
<div
|
|
552
|
-
class="${SEARCH_CLASS_NAMES.container}"
|
|
553
|
-
id="${this._searchContentContainerId}"
|
|
554
|
-
role="${this._containerRole}"
|
|
555
|
-
hidden
|
|
556
|
-
></div>`)}
|
|
381
|
+
></h-search-results>`)}
|
|
382
|
+
</div>`)}
|
|
557
383
|
`;
|
|
558
384
|
}
|
|
559
385
|
};
|
|
@@ -607,16 +433,12 @@ __decorate([
|
|
|
607
433
|
], HSearch.prototype, "_historyContext", void 0);
|
|
608
434
|
__decorate([
|
|
609
435
|
state(),
|
|
610
|
-
__metadata("design:type",
|
|
436
|
+
__metadata("design:type", Number)
|
|
611
437
|
], HSearch.prototype, "_activeItemId", void 0);
|
|
612
438
|
__decorate([
|
|
613
439
|
state(),
|
|
614
440
|
__metadata("design:type", Object)
|
|
615
441
|
], HSearch.prototype, "_translations", void 0);
|
|
616
|
-
__decorate([
|
|
617
|
-
state(),
|
|
618
|
-
__metadata("design:type", String)
|
|
619
|
-
], HSearch.prototype, "_containerRole", void 0);
|
|
620
442
|
HSearch = __decorate([
|
|
621
443
|
phoenixCustomElement(SEARCH_COMPONENT_NAMES.search)
|
|
622
444
|
], HSearch);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qEAA6E;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TemplateResult } from 'lit';
|
|
2
2
|
import { PhoenixLightLitElement } from "../../../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
3
3
|
export declare class HSearchClear extends PhoenixLightLitElement {
|
|
4
4
|
private _btnController;
|
|
@@ -10,7 +10,6 @@ export declare class HSearchClear extends PhoenixLightLitElement {
|
|
|
10
10
|
private _searchContextObserver;
|
|
11
11
|
constructor();
|
|
12
12
|
connectedCallback(): void;
|
|
13
|
-
protected updated(_changedProperties: PropertyValues): void;
|
|
14
13
|
private _dispatchClearEvent;
|
|
15
14
|
private _searchContextSetup;
|
|
16
15
|
protected render(): TemplateResult;
|
package/build/esm/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js
CHANGED
|
@@ -28,11 +28,6 @@ let HSearchClear = class HSearchClear extends PhoenixLightLitElement {
|
|
|
28
28
|
this._searchContextSetup();
|
|
29
29
|
this.addEventListener('click', this._dispatchClearEvent);
|
|
30
30
|
}
|
|
31
|
-
updated(_changedProperties) {
|
|
32
|
-
super.updated(_changedProperties);
|
|
33
|
-
const newTabIndex = this._shouldShow ? '0' : '-1';
|
|
34
|
-
this.setAttribute('tabindex', newTabIndex);
|
|
35
|
-
}
|
|
36
31
|
async _searchContextSetup() {
|
|
37
32
|
try {
|
|
38
33
|
this._searchContextConsumer = new ContextConsumerController(this);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,2EAAmF;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,2EAAmF;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -8,9 +8,9 @@ export declare class HSearchHistory extends PhoenixLightLitElement {
|
|
|
8
8
|
private _historyContext$;
|
|
9
9
|
private _historyContextObserver;
|
|
10
10
|
buttonRef: Ref<HSearchHistoryLoadMore>;
|
|
11
|
+
private _loadMoreButtonId;
|
|
11
12
|
history: TSearchHistoryItem[];
|
|
12
|
-
activeItemId:
|
|
13
|
-
searchId: string;
|
|
13
|
+
activeItemId: number;
|
|
14
14
|
translations: Record<string, string>;
|
|
15
15
|
moduleInstanceId: string;
|
|
16
16
|
connectedCallback(): Promise<void>;
|