@shoper/phoenix_design_system 1.11.8-0 → 1.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/form/search/search.js +10 -72
- package/build/cjs/packages/phoenix/src/components/form/search/search.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/search_constants.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js +1 -12
- 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 +10 -10
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js +0 -6
- 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 +0 -6
- 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 +1 -13
- 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 +0 -6
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/index.js +6 -6
- package/build/esm/packages/phoenix/src/components/form/search/search.d.ts +0 -6
- package/build/esm/packages/phoenix/src/components/form/search/search.js +10 -72
- package/build/esm/packages/phoenix/src/components/form/search/search.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search_constants.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search_constants.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search_types.d.ts +0 -10
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/history/search_history.d.ts +0 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js +1 -12
- 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 +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js +10 -10
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.d.ts +0 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js +0 -6
- 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 +0 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +0 -6
- 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 +0 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js +1 -13
- 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 +0 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js +0 -6
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/index.js +2 -2
- package/package.json +1 -1
|
@@ -5,14 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
6
6
|
var lit = require('lit');
|
|
7
7
|
var decorators = require('lit/decorators');
|
|
8
|
-
var utilities = require('@dreamcommerce/utilities');
|
|
9
8
|
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
10
9
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
11
10
|
var icon_constants = require('../../icon/icon_constants.js');
|
|
12
11
|
var observer = require('../../../core/classes/observer/observer.js');
|
|
13
12
|
var context_consumer_controller = require('../../../core/context/context_consumer_controller.js');
|
|
14
13
|
var behavior_subject = require('../../../core/classes/behavior_subject/behavior_subject.js');
|
|
15
|
-
var ref_js = require('lit-html/directives/ref.js');
|
|
16
14
|
var context_provider_controller = require('../../../core/context/context_provider_controller.js');
|
|
17
15
|
var global_constants = require('../../../global_constants.js');
|
|
18
16
|
var when = require('../../../../../../external/lit/external/lit-html/directives/when.js');
|
|
@@ -22,8 +20,6 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
22
20
|
constructor() {
|
|
23
21
|
super(...arguments);
|
|
24
22
|
this.view = search_constants.DEFAULT_VIEW;
|
|
25
|
-
this._searchResultsRef = ref_js.createRef();
|
|
26
|
-
this._searchHistoryRef = ref_js.createRef();
|
|
27
23
|
this._shouldShowHistory = false;
|
|
28
24
|
this._shouldShowResults = false;
|
|
29
25
|
this._shouldShowMessage = false;
|
|
@@ -37,20 +33,21 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
37
33
|
this._translations = {};
|
|
38
34
|
this._bindKeys = (ev) => {
|
|
39
35
|
var _a;
|
|
36
|
+
const searchItemsCount = this._getSearchItemsCount();
|
|
40
37
|
switch (ev.key) {
|
|
41
38
|
case 'ArrowDown':
|
|
42
39
|
ev.preventDefault();
|
|
43
|
-
this.
|
|
40
|
+
this._activeItemId = this._activeItemId === searchItemsCount - 1 ? 0 : this._activeItemId + 1;
|
|
44
41
|
this._scroll(search_constants.SCROLL_DIRECTIONS.down);
|
|
45
42
|
break;
|
|
46
43
|
case 'ArrowUp':
|
|
47
44
|
ev.preventDefault();
|
|
48
|
-
this.
|
|
45
|
+
this._activeItemId = this._activeItemId === 0 || this._activeItemId === -1 ? searchItemsCount - 1 : this._activeItemId - 1;
|
|
49
46
|
this._scroll(search_constants.SCROLL_DIRECTIONS.up);
|
|
50
47
|
break;
|
|
51
48
|
case 'Enter':
|
|
52
49
|
ev.preventDefault();
|
|
53
|
-
if (this._activeItemId === -1
|
|
50
|
+
if (this._activeItemId === -1)
|
|
54
51
|
return;
|
|
55
52
|
this._handleChooseSearchItem();
|
|
56
53
|
break;
|
|
@@ -70,36 +67,6 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
70
67
|
break;
|
|
71
68
|
}
|
|
72
69
|
};
|
|
73
|
-
this._focusOutsideActiveItemsForward = () => {
|
|
74
|
-
var _a;
|
|
75
|
-
const $activeElement = document.activeElement;
|
|
76
|
-
const $searchItemsContainer = this._searchHistoryRef.value || this._searchResultsRef.value;
|
|
77
|
-
if (!$searchItemsContainer)
|
|
78
|
-
return;
|
|
79
|
-
const $searchItems = utilities.UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
|
|
80
|
-
return !!$el.getAttribute('data-search-item-id');
|
|
81
|
-
});
|
|
82
|
-
const indexOfCurrentElement = $searchItems.indexOf($activeElement);
|
|
83
|
-
const indexOfNextElement = indexOfCurrentElement === $searchItems.length - 1 ? 0 : indexOfCurrentElement + 1;
|
|
84
|
-
const $nextSearchItemElement = $searchItems[indexOfNextElement];
|
|
85
|
-
$nextSearchItemElement.focus();
|
|
86
|
-
this._activeItemId = (_a = Number($nextSearchItemElement.getAttribute('data-search-item-id'))) !== null && _a !== void 0 ? _a : -1;
|
|
87
|
-
};
|
|
88
|
-
this._focusOutsideActiveItemsBackward = () => {
|
|
89
|
-
var _a;
|
|
90
|
-
const $activeElement = document.activeElement;
|
|
91
|
-
const $searchItemsContainer = this._searchHistoryRef.value || this._searchResultsRef.value;
|
|
92
|
-
if (!$searchItemsContainer)
|
|
93
|
-
return;
|
|
94
|
-
const $searchItems = utilities.UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
|
|
95
|
-
return !!$el.getAttribute('data-search-item-id');
|
|
96
|
-
});
|
|
97
|
-
const indexOfCurrentElement = $searchItems.indexOf($activeElement);
|
|
98
|
-
const indexOfPreviousElement = indexOfCurrentElement === 0 ? $searchItems.length - 1 : indexOfCurrentElement - 1;
|
|
99
|
-
const $previousSearchItemElement = $searchItems[indexOfPreviousElement];
|
|
100
|
-
$previousSearchItemElement.focus();
|
|
101
|
-
this._activeItemId = (_a = Number($previousSearchItemElement.getAttribute('data-search-item-id'))) !== null && _a !== void 0 ? _a : -1;
|
|
102
|
-
};
|
|
103
70
|
this._getSearchItemsCount = () => {
|
|
104
71
|
if (this._shouldShowHistory)
|
|
105
72
|
return this._historyLimitedContent.length;
|
|
@@ -241,42 +208,16 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
241
208
|
}
|
|
242
209
|
}
|
|
243
210
|
_displayHistorySuggestions() {
|
|
244
|
-
this.
|
|
245
|
-
|
|
246
|
-
shouldShowResults: false
|
|
247
|
-
});
|
|
211
|
+
this._shouldShowHistory = true;
|
|
212
|
+
this._shouldShowResults = false;
|
|
248
213
|
}
|
|
249
214
|
_hideHistorySuggestionsAndResults() {
|
|
250
|
-
this.
|
|
251
|
-
|
|
252
|
-
shouldShowResults: false
|
|
253
|
-
});
|
|
215
|
+
this._shouldShowHistory = false;
|
|
216
|
+
this._shouldShowResults = false;
|
|
254
217
|
}
|
|
255
218
|
_displayResults() {
|
|
256
|
-
this.
|
|
257
|
-
|
|
258
|
-
shouldShowResults: true
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
_handleToggleHistoryAndResults({ shouldShowHistory, shouldShowResults }) {
|
|
262
|
-
this._shouldShowHistory = shouldShowHistory;
|
|
263
|
-
this._shouldShowResults = shouldShowResults;
|
|
264
|
-
this._toggleSearchInputAria(shouldShowHistory, shouldShowResults);
|
|
265
|
-
}
|
|
266
|
-
_toggleSearchInputAria(shouldShowHistory, shouldShowResults) {
|
|
267
|
-
var _a;
|
|
268
|
-
const $input = (_a = this._searchInput) === null || _a === void 0 ? void 0 : _a.input;
|
|
269
|
-
if (!$input)
|
|
270
|
-
return;
|
|
271
|
-
if (!shouldShowHistory && !shouldShowResults) {
|
|
272
|
-
$input.removeAttribute('aria-label');
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
$input.setAttribute('aria-expanded', 'true');
|
|
276
|
-
if (shouldShowHistory)
|
|
277
|
-
$input.setAttribute('aria-label', this.settings.historyGuideAriaLabel);
|
|
278
|
-
if (shouldShowResults)
|
|
279
|
-
$input.setAttribute('aria-label', this.settings.suggesterGuideAriaLabel);
|
|
219
|
+
this._shouldShowHistory = false;
|
|
220
|
+
this._shouldShowResults = true;
|
|
280
221
|
}
|
|
281
222
|
_scroll(direction) {
|
|
282
223
|
const searchContainer = this.querySelector(`.${search_constants.SEARCH_CLASS_NAMES.container}`);
|
|
@@ -355,15 +296,12 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
355
296
|
module-instance-id="${this.moduleInstanceId}"
|
|
356
297
|
></h-search-message>`)}
|
|
357
298
|
${when.when(this._shouldShowHistory, () => lit.html `<h-search-history
|
|
358
|
-
${ref_js.ref(this._searchHistoryRef)}
|
|
359
299
|
.history="${this._historyLimitedContent}"
|
|
360
300
|
.translations="${this._translations}"
|
|
361
301
|
active-item-id="${this._activeItemId}"
|
|
362
302
|
module-instance-id="${this.moduleInstanceId}"
|
|
363
|
-
.historyAriaLabel="${this.settings.historyItemAriaLabel}"
|
|
364
303
|
></h-search-history>`)}
|
|
365
304
|
${when.when(this._shouldShowResults, () => lit.html `<h-search-results
|
|
366
|
-
${ref_js.ref(this._searchResultsRef)}
|
|
367
305
|
.results="${this._searchResults}"
|
|
368
306
|
search-phrase="${this._searchPhrase}"
|
|
369
307
|
.settings="${this.settings}"
|
|
@@ -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
|
|
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,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;"}
|
|
@@ -27,7 +27,7 @@ const SEARCH_CUSTOM_EVENT_NAMES = {
|
|
|
27
27
|
clear: 'clearSearchPhrase',
|
|
28
28
|
submit: 'submitSearchPhrase',
|
|
29
29
|
close: 'close',
|
|
30
|
-
search: '
|
|
30
|
+
search: 'search',
|
|
31
31
|
updateSearchPhrase: 'updateSearchPhrase',
|
|
32
32
|
focusin: 'searchFocusIn',
|
|
33
33
|
keydown: 'searchKeyDown'
|
|
@@ -11,7 +11,6 @@ var icon_constants = require('../../../../icon/icon_constants.js');
|
|
|
11
11
|
var observer = require('../../../../../core/classes/observer/observer.js');
|
|
12
12
|
var context_consumer_controller = require('../../../../../core/context/context_consumer_controller.js');
|
|
13
13
|
var ref_js = require('lit-html/directives/ref.js');
|
|
14
|
-
var v4 = require('../../../../../../../../external/uuid/dist/esm-browser/v4.js');
|
|
15
14
|
var when = require('../../../../../../../../external/lit/external/lit-html/directives/when.js');
|
|
16
15
|
var search_constants = require('../../search_constants.js');
|
|
17
16
|
var repeat = require('../../../../../../../../external/lit/external/lit-html/directives/repeat.js');
|
|
@@ -20,7 +19,6 @@ exports.HSearchHistory = class HSearchHistory extends phoenix_light_lit_element.
|
|
|
20
19
|
constructor() {
|
|
21
20
|
super(...arguments);
|
|
22
21
|
this.buttonRef = ref_js.createRef();
|
|
23
|
-
this._loadMoreButtonId = v4['default']();
|
|
24
22
|
this.history = [];
|
|
25
23
|
this.translations = {};
|
|
26
24
|
}
|
|
@@ -56,7 +54,6 @@ exports.HSearchHistory = class HSearchHistory extends phoenix_light_lit_element.
|
|
|
56
54
|
data-suggested-value="${historyElement.label}"
|
|
57
55
|
data-search-item-id="${index}"
|
|
58
56
|
module-instance-id="${this.moduleInstanceId}"
|
|
59
|
-
aria-label=${this.historyAriaLabel ? `${this.historyAriaLabel} ${historyElement.label}` : undefined}
|
|
60
57
|
>
|
|
61
58
|
<h-icon icon-name="icon-clock"></h-icon>
|
|
62
59
|
|
|
@@ -74,11 +71,7 @@ exports.HSearchHistory = class HSearchHistory extends phoenix_light_lit_element.
|
|
|
74
71
|
</li>`)}
|
|
75
72
|
</ul>
|
|
76
73
|
|
|
77
|
-
<h-search-history-load-more
|
|
78
|
-
class="${search_constants.SEARCH_CLASS_NAMES.historyLoadMore}"
|
|
79
|
-
data-search-item-id="${this._loadMoreButtonId}"
|
|
80
|
-
${ref_js.ref(this.buttonRef)}
|
|
81
|
-
>
|
|
74
|
+
<h-search-history-load-more class="${search_constants.SEARCH_CLASS_NAMES.historyLoadMore}" ${ref_js.ref(this.buttonRef)}>
|
|
82
75
|
${this.translations.loadMore}
|
|
83
76
|
</h-search-history-load-more>`);
|
|
84
77
|
}
|
|
@@ -99,10 +92,6 @@ tslib_es6.__decorate([
|
|
|
99
92
|
decorators.property({ type: String, attribute: 'module-instance-id' }),
|
|
100
93
|
tslib_es6.__metadata("design:type", String)
|
|
101
94
|
], exports.HSearchHistory.prototype, "moduleInstanceId", void 0);
|
|
102
|
-
tslib_es6.__decorate([
|
|
103
|
-
decorators.property({ type: String }),
|
|
104
|
-
tslib_es6.__metadata("design:type", String)
|
|
105
|
-
], exports.HSearchHistory.prototype, "historyAriaLabel", void 0);
|
|
106
95
|
exports.HSearchHistory = tslib_es6.__decorate([
|
|
107
96
|
phoenix_custom_element.phoenixCustomElement(search_constants.SEARCH_COMPONENT_NAMES.searchHistory)
|
|
108
97
|
], exports.HSearchHistory);
|
|
@@ -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;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;AACA,mBAAmB,2EAAmF;AACtG;AACA,qBAAqB,6EAAqF;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/input/search_input.js
CHANGED
|
@@ -15,8 +15,8 @@ exports.HSearchInput = class HSearchInput extends phoenix_light_lit_element.Phoe
|
|
|
15
15
|
}
|
|
16
16
|
connectedCallback() {
|
|
17
17
|
super.connectedCallback();
|
|
18
|
-
this.
|
|
19
|
-
if (!this.
|
|
18
|
+
this._input = this.querySelector('input[type="search"]');
|
|
19
|
+
if (!this._input) {
|
|
20
20
|
throw new Error('Search input not found');
|
|
21
21
|
}
|
|
22
22
|
this._setupInitialValue();
|
|
@@ -28,7 +28,7 @@ exports.HSearchInput = class HSearchInput extends phoenix_light_lit_element.Phoe
|
|
|
28
28
|
if (!searchPhraseRegArray)
|
|
29
29
|
return;
|
|
30
30
|
const searchQuery = searchPhraseRegArray[1].replace(/\+/g, ' ');
|
|
31
|
-
this.
|
|
31
|
+
this._input.value = decodeURIComponent(this._deserializeInputPhrase(searchQuery));
|
|
32
32
|
}
|
|
33
33
|
_deserializeInputPhrase(value) {
|
|
34
34
|
if (value.indexOf('%2f') !== -1) {
|
|
@@ -46,14 +46,14 @@ exports.HSearchInput = class HSearchInput extends phoenix_light_lit_element.Phoe
|
|
|
46
46
|
return value;
|
|
47
47
|
}
|
|
48
48
|
_setupListeners() {
|
|
49
|
-
this.
|
|
49
|
+
this._input.addEventListener('focusin', (ev) => {
|
|
50
50
|
this.emitCustomEvent(search_constants.SEARCH_CUSTOM_EVENT_NAMES.focusin, {
|
|
51
51
|
detail: {
|
|
52
52
|
searchPhrase: ev.target.value
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
55
|
});
|
|
56
|
-
this.
|
|
56
|
+
this._input.addEventListener('keydown', (ev) => {
|
|
57
57
|
if (ev.key === 'ArrowUp' || ev.key === 'ArrowDown' || ev.key === 'Escape')
|
|
58
58
|
return;
|
|
59
59
|
if (ev.key !== 'Enter') {
|
|
@@ -74,8 +74,8 @@ exports.HSearchInput = class HSearchInput extends phoenix_light_lit_element.Phoe
|
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
|
-
this.
|
|
78
|
-
if (this.
|
|
77
|
+
this._input.addEventListener('search', (ev) => {
|
|
78
|
+
if (this._input.value !== '') {
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
this.emitCustomEvent(search_constants.SEARCH_CUSTOM_EVENT_NAMES.search, {
|
|
@@ -88,13 +88,13 @@ exports.HSearchInput = class HSearchInput extends phoenix_light_lit_element.Phoe
|
|
|
88
88
|
if (!ev.detail || ev.detail.moduleInstanceId !== this.moduleInstanceId)
|
|
89
89
|
return;
|
|
90
90
|
this._isSearchPhraseCleared = true;
|
|
91
|
-
this.
|
|
92
|
-
this.
|
|
91
|
+
this._input.value = '';
|
|
92
|
+
this._input.focus();
|
|
93
93
|
});
|
|
94
94
|
document.addEventListener(search_constants.SEARCH_CUSTOM_EVENT_NAMES.updateSearchPhrase, (ev) => {
|
|
95
95
|
if (!ev.detail || ev.detail.moduleInstanceId !== this.moduleInstanceId)
|
|
96
96
|
return;
|
|
97
|
-
this.
|
|
97
|
+
this._input.value = ev.detail.searchPhrase;
|
|
98
98
|
this.emitCustomEvent(search_constants.SEARCH_CUSTOM_EVENT_NAMES.keydown, {
|
|
99
99
|
detail: {
|
|
100
100
|
searchPhrase: ev.detail.searchPhrase
|
|
@@ -36,8 +36,6 @@ exports.HSearchProducerContent = class HSearchProducerContent extends phoenix_li
|
|
|
36
36
|
? search_constants.SEARCH_CLASS_NAMES.itemActive
|
|
37
37
|
: ''}"
|
|
38
38
|
data-search-item-id="${this.initialItemIds.producers + index}"
|
|
39
|
-
aria-label=${this.producerAriaLabel ? `${this.producerAriaLabel} ${producer.name}` : undefined}
|
|
40
|
-
tabindex="0"
|
|
41
39
|
>
|
|
42
40
|
<a
|
|
43
41
|
href="${producer.url}"
|
|
@@ -73,10 +71,6 @@ tslib_es6.__decorate([
|
|
|
73
71
|
decorators.property({ type: String, attribute: 'search-phrase' }),
|
|
74
72
|
tslib_es6.__metadata("design:type", String)
|
|
75
73
|
], exports.HSearchProducerContent.prototype, "searchPhrase", void 0);
|
|
76
|
-
tslib_es6.__decorate([
|
|
77
|
-
decorators.property({ type: String }),
|
|
78
|
-
tslib_es6.__metadata("design:type", String)
|
|
79
|
-
], exports.HSearchProducerContent.prototype, "producerAriaLabel", void 0);
|
|
80
74
|
exports.HSearchProducerContent = tslib_es6.__decorate([
|
|
81
75
|
phoenix_custom_element.phoenixCustomElement(search_constants.SEARCH_COMPONENT_NAMES.searchProducerContent)
|
|
82
76
|
], exports.HSearchProducerContent);
|
|
@@ -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,mBAAmB,2EAAmF;AACtG;AACA,qBAAqB,6EAAqF;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,mBAAmB,2EAAmF;AACtG;AACA,qBAAqB,6EAAqF;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -49,8 +49,6 @@ exports.HSearchProductContent = class HSearchProductContent extends phoenix_ligh
|
|
|
49
49
|
? search_constants.SEARCH_CLASS_NAMES.itemActive
|
|
50
50
|
: ''}"
|
|
51
51
|
data-search-item-id="${this.initialItemIds.products + index}"
|
|
52
|
-
aria-label=${this.productAriaLabel ? `${this.productAriaLabel} ${product.name}` : undefined}
|
|
53
|
-
tabindex="0"
|
|
54
52
|
>
|
|
55
53
|
<a
|
|
56
54
|
href="${product.url}"
|
|
@@ -110,10 +108,6 @@ tslib_es6.__decorate([
|
|
|
110
108
|
decorators.property({ type: Object }),
|
|
111
109
|
tslib_es6.__metadata("design:type", Object)
|
|
112
110
|
], exports.HSearchProductContent.prototype, "translations", void 0);
|
|
113
|
-
tslib_es6.__decorate([
|
|
114
|
-
decorators.property({ type: String }),
|
|
115
|
-
tslib_es6.__metadata("design:type", String)
|
|
116
|
-
], exports.HSearchProductContent.prototype, "productAriaLabel", void 0);
|
|
117
111
|
exports.HSearchProductContent = tslib_es6.__decorate([
|
|
118
112
|
phoenix_custom_element.phoenixCustomElement(search_constants.SEARCH_COMPONENT_NAMES.searchProductContent)
|
|
119
113
|
], exports.HSearchProductContent);
|
|
@@ -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,mBAAmB,2EAAmF;AACtG;AACA,qBAAqB,6EAAqF;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,mBAAmB,2EAAmF;AACtG;AACA,qBAAqB,6EAAqF;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -7,7 +7,6 @@ var lit = require('lit');
|
|
|
7
7
|
var decorators = require('lit/decorators');
|
|
8
8
|
var phoenix_light_lit_element = require('../../../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
9
9
|
var phoenix_custom_element = require('../../../../../core/decorators/phoenix_custom_element.js');
|
|
10
|
-
var v4 = require('../../../../../../../../external/uuid/dist/esm-browser/v4.js');
|
|
11
10
|
var when = require('../../../../../../../../external/lit/external/lit-html/directives/when.js');
|
|
12
11
|
var search_constants = require('../../search_constants.js');
|
|
13
12
|
var isEqual = require('../../../../../../../../external/lodash/isEqual.js');
|
|
@@ -15,8 +14,6 @@ var isEqual = require('../../../../../../../../external/lodash/isEqual.js');
|
|
|
15
14
|
exports.HSearchResults = class HSearchResults extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
16
15
|
constructor() {
|
|
17
16
|
super(...arguments);
|
|
18
|
-
this._loadMoreButtonId = v4['default']();
|
|
19
|
-
this._goToProductsForButtonId = v4['default']();
|
|
20
17
|
this.searchPhrase = '';
|
|
21
18
|
this.translations = {};
|
|
22
19
|
this._productPage = 1;
|
|
@@ -75,7 +72,6 @@ exports.HSearchResults = class HSearchResults extends phoenix_light_lit_element.
|
|
|
75
72
|
locale="${this.locale}"
|
|
76
73
|
view="${this.view}"
|
|
77
74
|
module-instance-id="${this.moduleInstanceId}"
|
|
78
|
-
.suggestionAriaLabel=${this.settings.suggesterItemAriaLabel}
|
|
79
75
|
>
|
|
80
76
|
</h-search-suggestion-content>`)}
|
|
81
77
|
${when.when((_c = this.results.products) === null || _c === void 0 ? void 0 : _c.length, () => lit.html `
|
|
@@ -86,23 +82,16 @@ exports.HSearchResults = class HSearchResults extends phoenix_light_lit_element.
|
|
|
86
82
|
active-item-id="${this.activeItemId}"
|
|
87
83
|
.initialItemIds="${this._getInitialItemsIds()}"
|
|
88
84
|
.translations="${this.translations}"
|
|
89
|
-
.productAriaLabel=${this.settings.suggesterProductItemAriaLabel}
|
|
90
85
|
></h-search-product-content>
|
|
91
86
|
|
|
92
87
|
${when.when(this.settings.isLoadingMoreSearchResultsEnabled, () => when.when(this._areMoreProductsAvailable(), () => lit.html `<button
|
|
93
88
|
class="${search_constants.SEARCH_CLASS_NAMES.productButton}"
|
|
94
89
|
@click="${this.handleLoadMoreProducts}"
|
|
95
90
|
type="button"
|
|
96
|
-
data-search-item-id="${this._loadMoreButtonId}"
|
|
97
91
|
>
|
|
98
92
|
${this.translations.loadMore}
|
|
99
93
|
</button>`), () => lit.html `
|
|
100
|
-
<button
|
|
101
|
-
class="${search_constants.SEARCH_CLASS_NAMES.productButton}"
|
|
102
|
-
@click="${this.handleGoToProductsFor}"
|
|
103
|
-
type="button"
|
|
104
|
-
data-search-item-id="${this._goToProductsForButtonId}"
|
|
105
|
-
>
|
|
94
|
+
<button class="${search_constants.SEARCH_CLASS_NAMES.productButton}" @click="${this.handleGoToProductsFor}" type="button">
|
|
106
95
|
${this.translations.goToProductsFor}: <strong>${this._getSearchPhrase()}</strong>
|
|
107
96
|
</button>
|
|
108
97
|
`)}
|
|
@@ -115,7 +104,6 @@ exports.HSearchResults = class HSearchResults extends phoenix_light_lit_element.
|
|
|
115
104
|
.initialItemIds="${this._getInitialItemsIds()}"
|
|
116
105
|
.translations="${this.translations}"
|
|
117
106
|
search-phrase="${this.searchPhrase}"
|
|
118
|
-
.producerAriaLabel=${this.settings.suggesterProducerItemAriaLabel}
|
|
119
107
|
></h-search-producer-content>`)}
|
|
120
108
|
`;
|
|
121
109
|
});
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,qDAAyD;AACjF;AACA;AACA;AACA;AACA,mBAAmB,2EAAmF;AACtG;AACA,sBAAsB,oDAAwD;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -112,8 +112,6 @@ exports.HSearchSuggestionContent = class HSearchSuggestionContent extends phoeni
|
|
|
112
112
|
: ''}"
|
|
113
113
|
data-suggested-value="${suggestion.suggestionName}"
|
|
114
114
|
data-search-item-id="${index}"
|
|
115
|
-
aria-label=${this.suggestionAriaLabel ? `${this.suggestionAriaLabel} ${suggestion.suggestionName}` : undefined}
|
|
116
|
-
tabindex="0"
|
|
117
115
|
>
|
|
118
116
|
${when.when(suggestion.type === search_constants.SUGGESTIONS_TYPE.suggestion, () => lit.html ` <span> ${this._getMatchedPhrase(suggestion.suggestionName)} </span>
|
|
119
117
|
<h-icon
|
|
@@ -159,10 +157,6 @@ tslib_es6.__decorate([
|
|
|
159
157
|
decorators.property({ type: String, attribute: 'module-instance-id' }),
|
|
160
158
|
tslib_es6.__metadata("design:type", String)
|
|
161
159
|
], exports.HSearchSuggestionContent.prototype, "moduleInstanceId", void 0);
|
|
162
|
-
tslib_es6.__decorate([
|
|
163
|
-
decorators.property({ type: String }),
|
|
164
|
-
tslib_es6.__metadata("design:type", String)
|
|
165
|
-
], exports.HSearchSuggestionContent.prototype, "suggestionAriaLabel", void 0);
|
|
166
160
|
tslib_es6.__decorate([
|
|
167
161
|
decorators.state(),
|
|
168
162
|
tslib_es6.__metadata("design:type", String)
|
|
@@ -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,mBAAmB,2EAAmF;AACtG;AACA,qBAAqB,6EAAqF;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,mBAAmB,2EAAmF;AACtG;AACA,qBAAqB,6EAAqF;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -99,10 +99,10 @@ var display_stepper = require('./components/form/input_stepper/display_stepper.j
|
|
|
99
99
|
var button_stepper = require('./components/form/input_stepper/button_stepper.js');
|
|
100
100
|
var search_constants = require('./components/form/search/search_constants.js');
|
|
101
101
|
var search_input = require('./components/form/search/subcomponents/input/search_input.js');
|
|
102
|
-
var
|
|
102
|
+
var search = require('./components/form/search/search.js');
|
|
103
103
|
var search_history_load_more = require('./components/form/search/subcomponents/history/search_history_load_more.js');
|
|
104
104
|
var search_history = require('./components/form/search/subcomponents/history/search_history.js');
|
|
105
|
-
var
|
|
105
|
+
var search_results = require('./components/form/search/subcomponents/results/search_results.js');
|
|
106
106
|
var search_submit = require('./components/form/search/subcomponents/buttons/search_submit.js');
|
|
107
107
|
var search_clear = require('./components/form/search/subcomponents/buttons/search_clear.js');
|
|
108
108
|
var search_close = require('./components/form/search/subcomponents/buttons/search_close.js');
|
|
@@ -592,10 +592,10 @@ Object.defineProperty(exports, 'HSearchInput', {
|
|
|
592
592
|
return search_input.HSearchInput;
|
|
593
593
|
}
|
|
594
594
|
});
|
|
595
|
-
Object.defineProperty(exports, '
|
|
595
|
+
Object.defineProperty(exports, 'HSearch', {
|
|
596
596
|
enumerable: true,
|
|
597
597
|
get: function () {
|
|
598
|
-
return
|
|
598
|
+
return search.HSearch;
|
|
599
599
|
}
|
|
600
600
|
});
|
|
601
601
|
Object.defineProperty(exports, 'HSearchHistoryLoadMore', {
|
|
@@ -610,10 +610,10 @@ Object.defineProperty(exports, 'HSearchHistory', {
|
|
|
610
610
|
return search_history.HSearchHistory;
|
|
611
611
|
}
|
|
612
612
|
});
|
|
613
|
-
Object.defineProperty(exports, '
|
|
613
|
+
Object.defineProperty(exports, 'HSearchResults', {
|
|
614
614
|
enumerable: true,
|
|
615
615
|
get: function () {
|
|
616
|
-
return
|
|
616
|
+
return search_results.HSearchResults;
|
|
617
617
|
}
|
|
618
618
|
});
|
|
619
619
|
Object.defineProperty(exports, 'HSearchSubmit', {
|
|
@@ -12,8 +12,6 @@ export declare class HSearch extends PhoenixLightLitElement {
|
|
|
12
12
|
private _searchContextObserver;
|
|
13
13
|
private _searchInput;
|
|
14
14
|
private _inputField;
|
|
15
|
-
private _searchResultsRef;
|
|
16
|
-
private _searchHistoryRef;
|
|
17
15
|
private _shouldShowHistory;
|
|
18
16
|
private _shouldShowResults;
|
|
19
17
|
private _shouldShowMessage;
|
|
@@ -36,11 +34,7 @@ export declare class HSearch extends PhoenixLightLitElement {
|
|
|
36
34
|
private _displayHistorySuggestions;
|
|
37
35
|
private _hideHistorySuggestionsAndResults;
|
|
38
36
|
private _displayResults;
|
|
39
|
-
private _handleToggleHistoryAndResults;
|
|
40
|
-
private _toggleSearchInputAria;
|
|
41
37
|
private _bindKeys;
|
|
42
|
-
private _focusOutsideActiveItemsForward;
|
|
43
|
-
private _focusOutsideActiveItemsBackward;
|
|
44
38
|
private _getSearchItemsCount;
|
|
45
39
|
private _scroll;
|
|
46
40
|
private _handleChooseSearchItem;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
import { property, state } from 'lit/decorators';
|
|
4
|
-
import { UiDomUtils } from '@dreamcommerce/utilities';
|
|
5
4
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
6
5
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
7
6
|
import { ICONS_SIZES } from '../../icon/icon_constants.js';
|
|
8
7
|
import { Observer } from '../../../core/classes/observer/observer.js';
|
|
9
8
|
import { ContextConsumerController } from '../../../core/context/context_consumer_controller.js';
|
|
10
9
|
import { BehaviorSubject } from '../../../core/classes/behavior_subject/behavior_subject.js';
|
|
11
|
-
import { createRef, ref } from 'lit-html/directives/ref.js';
|
|
12
10
|
import { ContextProviderController } from '../../../core/context/context_provider_controller.js';
|
|
13
11
|
import { BREAKPOINTS } from '../../../global_constants.js';
|
|
14
12
|
import { when as n } from '../../../../../../external/lit/external/lit-html/directives/when.js';
|
|
@@ -18,8 +16,6 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
18
16
|
constructor() {
|
|
19
17
|
super(...arguments);
|
|
20
18
|
this.view = DEFAULT_VIEW;
|
|
21
|
-
this._searchResultsRef = createRef();
|
|
22
|
-
this._searchHistoryRef = createRef();
|
|
23
19
|
this._shouldShowHistory = false;
|
|
24
20
|
this._shouldShowResults = false;
|
|
25
21
|
this._shouldShowMessage = false;
|
|
@@ -33,20 +29,21 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
33
29
|
this._translations = {};
|
|
34
30
|
this._bindKeys = (ev) => {
|
|
35
31
|
var _a;
|
|
32
|
+
const searchItemsCount = this._getSearchItemsCount();
|
|
36
33
|
switch (ev.key) {
|
|
37
34
|
case 'ArrowDown':
|
|
38
35
|
ev.preventDefault();
|
|
39
|
-
this.
|
|
36
|
+
this._activeItemId = this._activeItemId === searchItemsCount - 1 ? 0 : this._activeItemId + 1;
|
|
40
37
|
this._scroll(SCROLL_DIRECTIONS.down);
|
|
41
38
|
break;
|
|
42
39
|
case 'ArrowUp':
|
|
43
40
|
ev.preventDefault();
|
|
44
|
-
this.
|
|
41
|
+
this._activeItemId = this._activeItemId === 0 || this._activeItemId === -1 ? searchItemsCount - 1 : this._activeItemId - 1;
|
|
45
42
|
this._scroll(SCROLL_DIRECTIONS.up);
|
|
46
43
|
break;
|
|
47
44
|
case 'Enter':
|
|
48
45
|
ev.preventDefault();
|
|
49
|
-
if (this._activeItemId === -1
|
|
46
|
+
if (this._activeItemId === -1)
|
|
50
47
|
return;
|
|
51
48
|
this._handleChooseSearchItem();
|
|
52
49
|
break;
|
|
@@ -66,36 +63,6 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
66
63
|
break;
|
|
67
64
|
}
|
|
68
65
|
};
|
|
69
|
-
this._focusOutsideActiveItemsForward = () => {
|
|
70
|
-
var _a;
|
|
71
|
-
const $activeElement = document.activeElement;
|
|
72
|
-
const $searchItemsContainer = this._searchHistoryRef.value || this._searchResultsRef.value;
|
|
73
|
-
if (!$searchItemsContainer)
|
|
74
|
-
return;
|
|
75
|
-
const $searchItems = UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
|
|
76
|
-
return !!$el.getAttribute('data-search-item-id');
|
|
77
|
-
});
|
|
78
|
-
const indexOfCurrentElement = $searchItems.indexOf($activeElement);
|
|
79
|
-
const indexOfNextElement = indexOfCurrentElement === $searchItems.length - 1 ? 0 : indexOfCurrentElement + 1;
|
|
80
|
-
const $nextSearchItemElement = $searchItems[indexOfNextElement];
|
|
81
|
-
$nextSearchItemElement.focus();
|
|
82
|
-
this._activeItemId = (_a = Number($nextSearchItemElement.getAttribute('data-search-item-id'))) !== null && _a !== void 0 ? _a : -1;
|
|
83
|
-
};
|
|
84
|
-
this._focusOutsideActiveItemsBackward = () => {
|
|
85
|
-
var _a;
|
|
86
|
-
const $activeElement = document.activeElement;
|
|
87
|
-
const $searchItemsContainer = this._searchHistoryRef.value || this._searchResultsRef.value;
|
|
88
|
-
if (!$searchItemsContainer)
|
|
89
|
-
return;
|
|
90
|
-
const $searchItems = UiDomUtils.getFocusableElements($searchItemsContainer).filter(($el) => {
|
|
91
|
-
return !!$el.getAttribute('data-search-item-id');
|
|
92
|
-
});
|
|
93
|
-
const indexOfCurrentElement = $searchItems.indexOf($activeElement);
|
|
94
|
-
const indexOfPreviousElement = indexOfCurrentElement === 0 ? $searchItems.length - 1 : indexOfCurrentElement - 1;
|
|
95
|
-
const $previousSearchItemElement = $searchItems[indexOfPreviousElement];
|
|
96
|
-
$previousSearchItemElement.focus();
|
|
97
|
-
this._activeItemId = (_a = Number($previousSearchItemElement.getAttribute('data-search-item-id'))) !== null && _a !== void 0 ? _a : -1;
|
|
98
|
-
};
|
|
99
66
|
this._getSearchItemsCount = () => {
|
|
100
67
|
if (this._shouldShowHistory)
|
|
101
68
|
return this._historyLimitedContent.length;
|
|
@@ -237,42 +204,16 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
237
204
|
}
|
|
238
205
|
}
|
|
239
206
|
_displayHistorySuggestions() {
|
|
240
|
-
this.
|
|
241
|
-
|
|
242
|
-
shouldShowResults: false
|
|
243
|
-
});
|
|
207
|
+
this._shouldShowHistory = true;
|
|
208
|
+
this._shouldShowResults = false;
|
|
244
209
|
}
|
|
245
210
|
_hideHistorySuggestionsAndResults() {
|
|
246
|
-
this.
|
|
247
|
-
|
|
248
|
-
shouldShowResults: false
|
|
249
|
-
});
|
|
211
|
+
this._shouldShowHistory = false;
|
|
212
|
+
this._shouldShowResults = false;
|
|
250
213
|
}
|
|
251
214
|
_displayResults() {
|
|
252
|
-
this.
|
|
253
|
-
|
|
254
|
-
shouldShowResults: true
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
_handleToggleHistoryAndResults({ shouldShowHistory, shouldShowResults }) {
|
|
258
|
-
this._shouldShowHistory = shouldShowHistory;
|
|
259
|
-
this._shouldShowResults = shouldShowResults;
|
|
260
|
-
this._toggleSearchInputAria(shouldShowHistory, shouldShowResults);
|
|
261
|
-
}
|
|
262
|
-
_toggleSearchInputAria(shouldShowHistory, shouldShowResults) {
|
|
263
|
-
var _a;
|
|
264
|
-
const $input = (_a = this._searchInput) === null || _a === void 0 ? void 0 : _a.input;
|
|
265
|
-
if (!$input)
|
|
266
|
-
return;
|
|
267
|
-
if (!shouldShowHistory && !shouldShowResults) {
|
|
268
|
-
$input.removeAttribute('aria-label');
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
$input.setAttribute('aria-expanded', 'true');
|
|
272
|
-
if (shouldShowHistory)
|
|
273
|
-
$input.setAttribute('aria-label', this.settings.historyGuideAriaLabel);
|
|
274
|
-
if (shouldShowResults)
|
|
275
|
-
$input.setAttribute('aria-label', this.settings.suggesterGuideAriaLabel);
|
|
215
|
+
this._shouldShowHistory = false;
|
|
216
|
+
this._shouldShowResults = true;
|
|
276
217
|
}
|
|
277
218
|
_scroll(direction) {
|
|
278
219
|
const searchContainer = this.querySelector(`.${SEARCH_CLASS_NAMES.container}`);
|
|
@@ -351,15 +292,12 @@ let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
|
351
292
|
module-instance-id="${this.moduleInstanceId}"
|
|
352
293
|
></h-search-message>`)}
|
|
353
294
|
${n(this._shouldShowHistory, () => html `<h-search-history
|
|
354
|
-
${ref(this._searchHistoryRef)}
|
|
355
295
|
.history="${this._historyLimitedContent}"
|
|
356
296
|
.translations="${this._translations}"
|
|
357
297
|
active-item-id="${this._activeItemId}"
|
|
358
298
|
module-instance-id="${this.moduleInstanceId}"
|
|
359
|
-
.historyAriaLabel="${this.settings.historyItemAriaLabel}"
|
|
360
299
|
></h-search-history>`)}
|
|
361
300
|
${n(this._shouldShowResults, () => html `<h-search-results
|
|
362
|
-
${ref(this._searchResultsRef)}
|
|
363
301
|
.results="${this._searchResults}"
|
|
364
302
|
search-phrase="${this._searchPhrase}"
|
|
365
303
|
.settings="${this.settings}"
|
|
@@ -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
|
|
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,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;"}
|
|
@@ -24,7 +24,7 @@ export declare const SEARCH_CUSTOM_EVENT_NAMES: {
|
|
|
24
24
|
readonly clear: "clearSearchPhrase";
|
|
25
25
|
readonly submit: "submitSearchPhrase";
|
|
26
26
|
readonly close: "close";
|
|
27
|
-
readonly search: "
|
|
27
|
+
readonly search: "search";
|
|
28
28
|
readonly updateSearchPhrase: "updateSearchPhrase";
|
|
29
29
|
readonly focusin: "searchFocusIn";
|
|
30
30
|
readonly keydown: "searchKeyDown";
|
|
@@ -23,7 +23,7 @@ const SEARCH_CUSTOM_EVENT_NAMES = {
|
|
|
23
23
|
clear: 'clearSearchPhrase',
|
|
24
24
|
submit: 'submitSearchPhrase',
|
|
25
25
|
close: 'close',
|
|
26
|
-
search: '
|
|
26
|
+
search: 'search',
|
|
27
27
|
updateSearchPhrase: 'updateSearchPhrase',
|
|
28
28
|
focusin: 'searchFocusIn',
|
|
29
29
|
keydown: 'searchKeyDown'
|
|
@@ -68,12 +68,6 @@ export declare type TSearchSettings = {
|
|
|
68
68
|
showProductRate: boolean;
|
|
69
69
|
showProductAvailability: boolean;
|
|
70
70
|
showProductPrice: boolean;
|
|
71
|
-
historyGuideAriaLabel: string;
|
|
72
|
-
suggesterGuideAriaLabel: string;
|
|
73
|
-
historyItemAriaLabel: string;
|
|
74
|
-
suggesterItemAriaLabel: string;
|
|
75
|
-
suggesterProductItemAriaLabel: string;
|
|
76
|
-
suggesterProducerItemAriaLabel: string;
|
|
77
71
|
};
|
|
78
72
|
export declare type TScrollDirection = TEnumLiteralsOf<typeof SCROLL_DIRECTIONS>;
|
|
79
73
|
export declare type TSuggestionType = TEnumLiteralsOf<typeof SUGGESTIONS_TYPE>;
|
|
@@ -83,7 +77,3 @@ export declare type TSuggestion = {
|
|
|
83
77
|
categoryName?: string;
|
|
84
78
|
url?: string;
|
|
85
79
|
};
|
|
86
|
-
export declare type THandleToggleHistoryAndResults = {
|
|
87
|
-
shouldShowHistory: boolean;
|
|
88
|
-
shouldShowResults: boolean;
|
|
89
|
-
};
|
|
@@ -8,12 +8,10 @@ export declare class HSearchHistory extends PhoenixLightLitElement {
|
|
|
8
8
|
private _historyContext$;
|
|
9
9
|
private _historyContextObserver;
|
|
10
10
|
buttonRef: Ref<HSearchHistoryLoadMore>;
|
|
11
|
-
private _loadMoreButtonId;
|
|
12
11
|
history: TSearchHistoryItem[];
|
|
13
12
|
activeItemId: number;
|
|
14
13
|
translations: Record<string, string>;
|
|
15
14
|
moduleInstanceId: string;
|
|
16
|
-
historyAriaLabel?: string;
|
|
17
15
|
connectedCallback(): Promise<void>;
|
|
18
16
|
protected render(): TemplateResult;
|
|
19
17
|
}
|
|
@@ -7,7 +7,6 @@ import { ICONS_SIZES } from '../../../../icon/icon_constants.js';
|
|
|
7
7
|
import { Observer } from '../../../../../core/classes/observer/observer.js';
|
|
8
8
|
import { ContextConsumerController } from '../../../../../core/context/context_consumer_controller.js';
|
|
9
9
|
import { createRef, ref } from 'lit-html/directives/ref.js';
|
|
10
|
-
import v4 from '../../../../../../../../external/uuid/dist/esm-browser/v4.js';
|
|
11
10
|
import { when as n } from '../../../../../../../../external/lit/external/lit-html/directives/when.js';
|
|
12
11
|
import { SEARCH_CONTEXT_NAMES, SEARCH_CLASS_NAMES, SEARCH_COMPONENT_NAMES } from '../../search_constants.js';
|
|
13
12
|
import { repeat as c } from '../../../../../../../../external/lit/external/lit-html/directives/repeat.js';
|
|
@@ -16,7 +15,6 @@ let HSearchHistory = class HSearchHistory extends PhoenixLightLitElement {
|
|
|
16
15
|
constructor() {
|
|
17
16
|
super(...arguments);
|
|
18
17
|
this.buttonRef = createRef();
|
|
19
|
-
this._loadMoreButtonId = v4();
|
|
20
18
|
this.history = [];
|
|
21
19
|
this.translations = {};
|
|
22
20
|
}
|
|
@@ -52,7 +50,6 @@ let HSearchHistory = class HSearchHistory extends PhoenixLightLitElement {
|
|
|
52
50
|
data-suggested-value="${historyElement.label}"
|
|
53
51
|
data-search-item-id="${index}"
|
|
54
52
|
module-instance-id="${this.moduleInstanceId}"
|
|
55
|
-
aria-label=${this.historyAriaLabel ? `${this.historyAriaLabel} ${historyElement.label}` : undefined}
|
|
56
53
|
>
|
|
57
54
|
<h-icon icon-name="icon-clock"></h-icon>
|
|
58
55
|
|
|
@@ -70,11 +67,7 @@ let HSearchHistory = class HSearchHistory extends PhoenixLightLitElement {
|
|
|
70
67
|
</li>`)}
|
|
71
68
|
</ul>
|
|
72
69
|
|
|
73
|
-
<h-search-history-load-more
|
|
74
|
-
class="${SEARCH_CLASS_NAMES.historyLoadMore}"
|
|
75
|
-
data-search-item-id="${this._loadMoreButtonId}"
|
|
76
|
-
${ref(this.buttonRef)}
|
|
77
|
-
>
|
|
70
|
+
<h-search-history-load-more class="${SEARCH_CLASS_NAMES.historyLoadMore}" ${ref(this.buttonRef)}>
|
|
78
71
|
${this.translations.loadMore}
|
|
79
72
|
</h-search-history-load-more>`);
|
|
80
73
|
}
|
|
@@ -95,10 +88,6 @@ __decorate([
|
|
|
95
88
|
property({ type: String, attribute: 'module-instance-id' }),
|
|
96
89
|
__metadata("design:type", String)
|
|
97
90
|
], HSearchHistory.prototype, "moduleInstanceId", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
property({ type: String }),
|
|
100
|
-
__metadata("design:type", String)
|
|
101
|
-
], HSearchHistory.prototype, "historyAriaLabel", void 0);
|
|
102
91
|
HSearchHistory = __decorate([
|
|
103
92
|
phoenixCustomElement(SEARCH_COMPONENT_NAMES.searchHistory)
|
|
104
93
|
], HSearchHistory);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;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;AACA,0BAA0B,2EAAmF;AAC7G;AACA,4BAA4B,6EAAqF;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PhoenixLightLitElement } from "../../../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
export declare class HSearchInput extends PhoenixLightLitElement {
|
|
3
|
-
|
|
3
|
+
private _input;
|
|
4
4
|
moduleInstanceId: string;
|
|
5
5
|
private _isSearchPhraseCleared;
|
|
6
6
|
connectedCallback(): void;
|
package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js
CHANGED
|
@@ -11,8 +11,8 @@ let HSearchInput = class HSearchInput extends PhoenixLightLitElement {
|
|
|
11
11
|
}
|
|
12
12
|
connectedCallback() {
|
|
13
13
|
super.connectedCallback();
|
|
14
|
-
this.
|
|
15
|
-
if (!this.
|
|
14
|
+
this._input = this.querySelector('input[type="search"]');
|
|
15
|
+
if (!this._input) {
|
|
16
16
|
throw new Error('Search input not found');
|
|
17
17
|
}
|
|
18
18
|
this._setupInitialValue();
|
|
@@ -24,7 +24,7 @@ let HSearchInput = class HSearchInput extends PhoenixLightLitElement {
|
|
|
24
24
|
if (!searchPhraseRegArray)
|
|
25
25
|
return;
|
|
26
26
|
const searchQuery = searchPhraseRegArray[1].replace(/\+/g, ' ');
|
|
27
|
-
this.
|
|
27
|
+
this._input.value = decodeURIComponent(this._deserializeInputPhrase(searchQuery));
|
|
28
28
|
}
|
|
29
29
|
_deserializeInputPhrase(value) {
|
|
30
30
|
if (value.indexOf('%2f') !== -1) {
|
|
@@ -42,14 +42,14 @@ let HSearchInput = class HSearchInput extends PhoenixLightLitElement {
|
|
|
42
42
|
return value;
|
|
43
43
|
}
|
|
44
44
|
_setupListeners() {
|
|
45
|
-
this.
|
|
45
|
+
this._input.addEventListener('focusin', (ev) => {
|
|
46
46
|
this.emitCustomEvent(SEARCH_CUSTOM_EVENT_NAMES.focusin, {
|
|
47
47
|
detail: {
|
|
48
48
|
searchPhrase: ev.target.value
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
});
|
|
52
|
-
this.
|
|
52
|
+
this._input.addEventListener('keydown', (ev) => {
|
|
53
53
|
if (ev.key === 'ArrowUp' || ev.key === 'ArrowDown' || ev.key === 'Escape')
|
|
54
54
|
return;
|
|
55
55
|
if (ev.key !== 'Enter') {
|
|
@@ -70,8 +70,8 @@ let HSearchInput = class HSearchInput extends PhoenixLightLitElement {
|
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
});
|
|
73
|
-
this.
|
|
74
|
-
if (this.
|
|
73
|
+
this._input.addEventListener('search', (ev) => {
|
|
74
|
+
if (this._input.value !== '') {
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
this.emitCustomEvent(SEARCH_CUSTOM_EVENT_NAMES.search, {
|
|
@@ -84,13 +84,13 @@ let HSearchInput = class HSearchInput extends PhoenixLightLitElement {
|
|
|
84
84
|
if (!ev.detail || ev.detail.moduleInstanceId !== this.moduleInstanceId)
|
|
85
85
|
return;
|
|
86
86
|
this._isSearchPhraseCleared = true;
|
|
87
|
-
this.
|
|
88
|
-
this.
|
|
87
|
+
this._input.value = '';
|
|
88
|
+
this._input.focus();
|
|
89
89
|
});
|
|
90
90
|
document.addEventListener(SEARCH_CUSTOM_EVENT_NAMES.updateSearchPhrase, (ev) => {
|
|
91
91
|
if (!ev.detail || ev.detail.moduleInstanceId !== this.moduleInstanceId)
|
|
92
92
|
return;
|
|
93
|
-
this.
|
|
93
|
+
this._input.value = ev.detail.searchPhrase;
|
|
94
94
|
this.emitCustomEvent(SEARCH_CUSTOM_EVENT_NAMES.keydown, {
|
|
95
95
|
detail: {
|
|
96
96
|
searchPhrase: ev.detail.searchPhrase
|
|
@@ -7,7 +7,6 @@ export declare class HSearchProducerContent extends PhoenixLightLitElement {
|
|
|
7
7
|
initialItemIds: Record<string, number>;
|
|
8
8
|
translations: Record<string, string>;
|
|
9
9
|
searchPhrase: string;
|
|
10
|
-
producerAriaLabel?: string;
|
|
11
10
|
private _getMatchedPhrase;
|
|
12
11
|
protected render(): TemplateResult;
|
|
13
12
|
}
|
|
@@ -32,8 +32,6 @@ let HSearchProducerContent = class HSearchProducerContent extends PhoenixLightLi
|
|
|
32
32
|
? SEARCH_CLASS_NAMES.itemActive
|
|
33
33
|
: ''}"
|
|
34
34
|
data-search-item-id="${this.initialItemIds.producers + index}"
|
|
35
|
-
aria-label=${this.producerAriaLabel ? `${this.producerAriaLabel} ${producer.name}` : undefined}
|
|
36
|
-
tabindex="0"
|
|
37
35
|
>
|
|
38
36
|
<a
|
|
39
37
|
href="${producer.url}"
|
|
@@ -69,10 +67,6 @@ __decorate([
|
|
|
69
67
|
property({ type: String, attribute: 'search-phrase' }),
|
|
70
68
|
__metadata("design:type", String)
|
|
71
69
|
], HSearchProducerContent.prototype, "searchPhrase", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
property({ type: String }),
|
|
74
|
-
__metadata("design:type", String)
|
|
75
|
-
], HSearchProducerContent.prototype, "producerAriaLabel", void 0);
|
|
76
70
|
HSearchProducerContent = __decorate([
|
|
77
71
|
phoenixCustomElement(SEARCH_COMPONENT_NAMES.searchProducerContent)
|
|
78
72
|
], HSearchProducerContent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA,0BAA0B,2EAAmF;AAC7G;AACA,4BAA4B,6EAAqF;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,0BAA0B,2EAAmF;AAC7G;AACA,4BAA4B,6EAAqF;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -7,7 +7,6 @@ export declare class HSearchProductContent extends PhoenixLightLitElement {
|
|
|
7
7
|
activeItemId: number;
|
|
8
8
|
initialItemIds: Record<string, number>;
|
|
9
9
|
translations: Record<string, string>;
|
|
10
|
-
productAriaLabel?: string;
|
|
11
10
|
getProductRateHtml: (productRate: number) => TemplateResult;
|
|
12
11
|
private _getShortenProductName;
|
|
13
12
|
private _getPercentPromotion;
|
|
@@ -45,8 +45,6 @@ let HSearchProductContent = class HSearchProductContent extends PhoenixLightLitE
|
|
|
45
45
|
? SEARCH_CLASS_NAMES.itemActive
|
|
46
46
|
: ''}"
|
|
47
47
|
data-search-item-id="${this.initialItemIds.products + index}"
|
|
48
|
-
aria-label=${this.productAriaLabel ? `${this.productAriaLabel} ${product.name}` : undefined}
|
|
49
|
-
tabindex="0"
|
|
50
48
|
>
|
|
51
49
|
<a
|
|
52
50
|
href="${product.url}"
|
|
@@ -106,10 +104,6 @@ __decorate([
|
|
|
106
104
|
property({ type: Object }),
|
|
107
105
|
__metadata("design:type", Object)
|
|
108
106
|
], HSearchProductContent.prototype, "translations", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
property({ type: String }),
|
|
111
|
-
__metadata("design:type", String)
|
|
112
|
-
], HSearchProductContent.prototype, "productAriaLabel", void 0);
|
|
113
107
|
HSearchProductContent = __decorate([
|
|
114
108
|
phoenixCustomElement(SEARCH_COMPONENT_NAMES.searchProductContent)
|
|
115
109
|
], HSearchProductContent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA,0BAA0B,2EAAmF;AAC7G;AACA,4BAA4B,6EAAqF;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,0BAA0B,2EAAmF;AAC7G;AACA,4BAA4B,6EAAqF;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -2,8 +2,6 @@ import { TemplateResult } from 'lit';
|
|
|
2
2
|
import { PhoenixLightLitElement } from "../../../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
3
3
|
import type { TSearchResults, TSearchSettings } from "../../search_types";
|
|
4
4
|
export declare class HSearchResults extends PhoenixLightLitElement {
|
|
5
|
-
private _loadMoreButtonId;
|
|
6
|
-
private _goToProductsForButtonId;
|
|
7
5
|
results: TSearchResults;
|
|
8
6
|
searchPhrase: string;
|
|
9
7
|
settings: TSearchSettings;
|
|
@@ -3,7 +3,6 @@ import { html } from 'lit';
|
|
|
3
3
|
import { property, state } from 'lit/decorators';
|
|
4
4
|
import { PhoenixLightLitElement } from '../../../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
5
5
|
import { phoenixCustomElement } from '../../../../../core/decorators/phoenix_custom_element.js';
|
|
6
|
-
import v4 from '../../../../../../../../external/uuid/dist/esm-browser/v4.js';
|
|
7
6
|
import { when as n } from '../../../../../../../../external/lit/external/lit-html/directives/when.js';
|
|
8
7
|
import { SEARCH_CUSTOM_EVENT_NAMES, SEARCH_CLASS_NAMES, SEARCH_COMPONENT_NAMES, EMPTY_SEARCH_RESULTS } from '../../search_constants.js';
|
|
9
8
|
import isEqual_1 from '../../../../../../../../external/lodash/isEqual.js';
|
|
@@ -11,8 +10,6 @@ import isEqual_1 from '../../../../../../../../external/lodash/isEqual.js';
|
|
|
11
10
|
let HSearchResults = class HSearchResults extends PhoenixLightLitElement {
|
|
12
11
|
constructor() {
|
|
13
12
|
super(...arguments);
|
|
14
|
-
this._loadMoreButtonId = v4();
|
|
15
|
-
this._goToProductsForButtonId = v4();
|
|
16
13
|
this.searchPhrase = '';
|
|
17
14
|
this.translations = {};
|
|
18
15
|
this._productPage = 1;
|
|
@@ -71,7 +68,6 @@ let HSearchResults = class HSearchResults extends PhoenixLightLitElement {
|
|
|
71
68
|
locale="${this.locale}"
|
|
72
69
|
view="${this.view}"
|
|
73
70
|
module-instance-id="${this.moduleInstanceId}"
|
|
74
|
-
.suggestionAriaLabel=${this.settings.suggesterItemAriaLabel}
|
|
75
71
|
>
|
|
76
72
|
</h-search-suggestion-content>`)}
|
|
77
73
|
${n((_c = this.results.products) === null || _c === void 0 ? void 0 : _c.length, () => html `
|
|
@@ -82,23 +78,16 @@ let HSearchResults = class HSearchResults extends PhoenixLightLitElement {
|
|
|
82
78
|
active-item-id="${this.activeItemId}"
|
|
83
79
|
.initialItemIds="${this._getInitialItemsIds()}"
|
|
84
80
|
.translations="${this.translations}"
|
|
85
|
-
.productAriaLabel=${this.settings.suggesterProductItemAriaLabel}
|
|
86
81
|
></h-search-product-content>
|
|
87
82
|
|
|
88
83
|
${n(this.settings.isLoadingMoreSearchResultsEnabled, () => n(this._areMoreProductsAvailable(), () => html `<button
|
|
89
84
|
class="${SEARCH_CLASS_NAMES.productButton}"
|
|
90
85
|
@click="${this.handleLoadMoreProducts}"
|
|
91
86
|
type="button"
|
|
92
|
-
data-search-item-id="${this._loadMoreButtonId}"
|
|
93
87
|
>
|
|
94
88
|
${this.translations.loadMore}
|
|
95
89
|
</button>`), () => html `
|
|
96
|
-
<button
|
|
97
|
-
class="${SEARCH_CLASS_NAMES.productButton}"
|
|
98
|
-
@click="${this.handleGoToProductsFor}"
|
|
99
|
-
type="button"
|
|
100
|
-
data-search-item-id="${this._goToProductsForButtonId}"
|
|
101
|
-
>
|
|
90
|
+
<button class="${SEARCH_CLASS_NAMES.productButton}" @click="${this.handleGoToProductsFor}" type="button">
|
|
102
91
|
${this.translations.goToProductsFor}: <strong>${this._getSearchPhrase()}</strong>
|
|
103
92
|
</button>
|
|
104
93
|
`)}
|
|
@@ -111,7 +100,6 @@ let HSearchResults = class HSearchResults extends PhoenixLightLitElement {
|
|
|
111
100
|
.initialItemIds="${this._getInitialItemsIds()}"
|
|
112
101
|
.translations="${this.translations}"
|
|
113
102
|
search-phrase="${this.searchPhrase}"
|
|
114
|
-
.producerAriaLabel=${this.settings.suggesterProducerItemAriaLabel}
|
|
115
103
|
></h-search-producer-content>`)}
|
|
116
104
|
`;
|
|
117
105
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA,0BAA0B,2EAAmF;AAC7G;AACA,sBAAsB,oDAAwD;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -10,7 +10,6 @@ export declare class HSearchSuggestionContent extends PhoenixLightLitElement {
|
|
|
10
10
|
view: string;
|
|
11
11
|
locale: string;
|
|
12
12
|
moduleInstanceId: string;
|
|
13
|
-
suggestionAriaLabel?: string;
|
|
14
13
|
private _searchPhrase;
|
|
15
14
|
private _suggestionsData;
|
|
16
15
|
connectedCallback(): Promise<void>;
|
|
@@ -108,8 +108,6 @@ let HSearchSuggestionContent = class HSearchSuggestionContent extends PhoenixLig
|
|
|
108
108
|
: ''}"
|
|
109
109
|
data-suggested-value="${suggestion.suggestionName}"
|
|
110
110
|
data-search-item-id="${index}"
|
|
111
|
-
aria-label=${this.suggestionAriaLabel ? `${this.suggestionAriaLabel} ${suggestion.suggestionName}` : undefined}
|
|
112
|
-
tabindex="0"
|
|
113
111
|
>
|
|
114
112
|
${n(suggestion.type === SUGGESTIONS_TYPE.suggestion, () => html ` <span> ${this._getMatchedPhrase(suggestion.suggestionName)} </span>
|
|
115
113
|
<h-icon
|
|
@@ -155,10 +153,6 @@ __decorate([
|
|
|
155
153
|
property({ type: String, attribute: 'module-instance-id' }),
|
|
156
154
|
__metadata("design:type", String)
|
|
157
155
|
], HSearchSuggestionContent.prototype, "moduleInstanceId", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
property({ type: String }),
|
|
160
|
-
__metadata("design:type", String)
|
|
161
|
-
], HSearchSuggestionContent.prototype, "suggestionAriaLabel", void 0);
|
|
162
156
|
__decorate([
|
|
163
157
|
state(),
|
|
164
158
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,2EAAmF;AAC7G;AACA,4BAA4B,6EAAqF;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,0BAA0B,2EAAmF;AAC7G;AACA,4BAA4B,6EAAqF;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -95,10 +95,10 @@ export { HDisplayStepper } from './components/form/input_stepper/display_stepper
|
|
|
95
95
|
export { HButtonStepper } from './components/form/input_stepper/button_stepper.js';
|
|
96
96
|
export { DEFAULT_VIEW, EMPTY_SEARCH_RESULTS, SCROLL_DIRECTIONS, SEARCH_CLASS_NAMES, SEARCH_COMPONENT_NAMES, SEARCH_CONFIGURATION, SEARCH_CONTEXT_NAMES, SEARCH_CUSTOM_EVENT_NAMES, SEARCH_PORTAL_DESTINATIONS, SEARCH_SLOT_NAMES, SUGGESTIONS_TYPE } from './components/form/search/search_constants.js';
|
|
97
97
|
export { HSearchInput } from './components/form/search/subcomponents/input/search_input.js';
|
|
98
|
-
export {
|
|
98
|
+
export { HSearch } from './components/form/search/search.js';
|
|
99
99
|
export { HSearchHistoryLoadMore } from './components/form/search/subcomponents/history/search_history_load_more.js';
|
|
100
100
|
export { HSearchHistory } from './components/form/search/subcomponents/history/search_history.js';
|
|
101
|
-
export {
|
|
101
|
+
export { HSearchResults } from './components/form/search/subcomponents/results/search_results.js';
|
|
102
102
|
export { HSearchSubmit } from './components/form/search/subcomponents/buttons/search_submit.js';
|
|
103
103
|
export { HSearchClear } from './components/form/search/subcomponents/buttons/search_clear.js';
|
|
104
104
|
export { HSearchClose } from './components/form/search/subcomponents/buttons/search_close.js';
|