@shoper/phoenix_design_system 1.11.11-6 → 1.11.11-8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown.js +112 -38
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_content.js +0 -5
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_toggler.js +13 -24
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_toggler.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/search.js +95 -292
- package/build/cjs/packages/phoenix/src/components/form/search/search.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js +0 -5
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js +9 -22
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js +1 -15
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/message/search_message.js +1 -8
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/message/search_message.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js +4 -9
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +4 -9
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js +4 -11
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js +5 -12
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/select/select.js +2 -3
- package/build/cjs/packages/phoenix/src/components/form/select/select.js.map +1 -1
- package/build/cjs/packages/phoenix/src/controllers/keystrokes_controller/keystrokes_controller.js +13 -2
- package/build/cjs/packages/phoenix/src/controllers/keystrokes_controller/keystrokes_controller.js.map +1 -1
- package/build/cjs/packages/phoenix/src/index.js +12 -12
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown.d.ts +12 -4
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown.js +113 -39
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_content.d.ts +0 -2
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_content.js +0 -5
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_toggler.d.ts +1 -2
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_toggler.js +14 -25
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_toggler.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search.d.ts +5 -23
- package/build/esm/packages/phoenix/src/components/form/search/search.js +96 -293
- package/build/esm/packages/phoenix/src/components/form/search/search.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search_types.d.ts +0 -4
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.d.ts +1 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js +0 -5
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/history/search_history.d.ts +2 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js +9 -22
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.d.ts +0 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js +2 -16
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/message/search_message.d.ts +0 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/message/search_message.js +1 -8
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/message/search_message.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.d.ts +1 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js +4 -9
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.d.ts +1 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +4 -9
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_results.d.ts +1 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js +4 -11
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.d.ts +1 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js +5 -12
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/select/select.js +2 -3
- package/build/esm/packages/phoenix/src/components/form/select/select.js.map +1 -1
- package/build/esm/packages/phoenix/src/controllers/keystrokes_controller/keystrokes_controller.d.ts +2 -1
- package/build/esm/packages/phoenix/src/controllers/keystrokes_controller/keystrokes_controller.js +13 -2
- package/build/esm/packages/phoenix/src/controllers/keystrokes_controller/keystrokes_controller.js.map +1 -1
- package/build/esm/packages/phoenix/src/controllers/keystrokes_controller/keystrokes_controller_types.d.ts +1 -0
- package/build/esm/packages/phoenix/src/index.js +2 -2
- package/package.json +2 -2
|
@@ -7,6 +7,7 @@ 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';
|
|
10
11
|
import { when as n } from '../../../../../../../../external/lit/external/lit-html/directives/when.js';
|
|
11
12
|
import { SEARCH_CONTEXT_NAMES, SEARCH_CLASS_NAMES, SEARCH_COMPONENT_NAMES } from '../../search_constants.js';
|
|
12
13
|
import { repeat as c } from '../../../../../../../../external/lit/external/lit-html/directives/repeat.js';
|
|
@@ -15,6 +16,7 @@ let HSearchHistory = class HSearchHistory extends PhoenixLightLitElement {
|
|
|
15
16
|
constructor() {
|
|
16
17
|
super(...arguments);
|
|
17
18
|
this.buttonRef = createRef();
|
|
19
|
+
this._loadMoreButtonId = v4();
|
|
18
20
|
this.history = [];
|
|
19
21
|
this.translations = {};
|
|
20
22
|
}
|
|
@@ -41,34 +43,23 @@ let HSearchHistory = class HSearchHistory extends PhoenixLightLitElement {
|
|
|
41
43
|
return n((_a = this.history) === null || _a === void 0 ? void 0 : _a.length, () => html `<h3 class="${SEARCH_CLASS_NAMES.headline}">${this.translations.searchHistory}</h3>
|
|
42
44
|
|
|
43
45
|
<ul>
|
|
44
|
-
${c(this.history, (historyElement, index) => html `
|
|
45
|
-
|
|
46
|
-
class="
|
|
47
|
-
${SEARCH_CLASS_NAMES.item}
|
|
48
|
-
${`${this.searchId}${index}` === this.activeItemId ? SEARCH_CLASS_NAMES.itemActive : ''}
|
|
49
|
-
"
|
|
50
|
-
role="row"
|
|
46
|
+
${c(this.history, (historyElement, index) => html ` <li
|
|
47
|
+
class="${SEARCH_CLASS_NAMES.item} ${index === this.activeItemId ? SEARCH_CLASS_NAMES.itemActive : ''}"
|
|
51
48
|
>
|
|
52
49
|
<h-search-history-select
|
|
53
50
|
item-label="${historyElement.label}"
|
|
54
51
|
class="${SEARCH_CLASS_NAMES.historySelect}"
|
|
55
52
|
data-suggested-value="${historyElement.label}"
|
|
56
|
-
data-search-item-id="${
|
|
53
|
+
data-search-item-id="${index}"
|
|
57
54
|
module-instance-id="${this.moduleInstanceId}"
|
|
58
55
|
aria-label=${this.translations.historyAriaLabel ? `${this.translations.historyAriaLabel} ${historyElement.label}` : undefined}
|
|
59
|
-
role="gridcell"
|
|
60
56
|
>
|
|
61
57
|
<h-icon icon-name="icon-clock"></h-icon>
|
|
62
58
|
|
|
63
59
|
<span class="${SEARCH_CLASS_NAMES.historyItemValue}">${historyElement.label}</span>
|
|
64
60
|
</h-search-history-select>
|
|
65
61
|
|
|
66
|
-
<h-search-history-remove
|
|
67
|
-
data-search-item-id="${this.searchId}${index}-remove"
|
|
68
|
-
data-search-grid-item
|
|
69
|
-
item-id="${historyElement.id}"
|
|
70
|
-
role="gridcell"
|
|
71
|
-
>
|
|
62
|
+
<h-search-history-remove item-id="${historyElement.id}">
|
|
72
63
|
<h-icon
|
|
73
64
|
icon-name="icon-x"
|
|
74
65
|
clickable=${true}
|
|
@@ -81,7 +72,7 @@ let HSearchHistory = class HSearchHistory extends PhoenixLightLitElement {
|
|
|
81
72
|
|
|
82
73
|
<h-search-history-load-more
|
|
83
74
|
class="${SEARCH_CLASS_NAMES.historyLoadMore}"
|
|
84
|
-
data-search-item-id="${this.
|
|
75
|
+
data-search-item-id="${this._loadMoreButtonId}"
|
|
85
76
|
${ref(this.buttonRef)}
|
|
86
77
|
>
|
|
87
78
|
${this.translations.loadMore}
|
|
@@ -93,13 +84,9 @@ __decorate([
|
|
|
93
84
|
__metadata("design:type", Array)
|
|
94
85
|
], HSearchHistory.prototype, "history", void 0);
|
|
95
86
|
__decorate([
|
|
96
|
-
property({ type:
|
|
97
|
-
__metadata("design:type",
|
|
87
|
+
property({ type: Number, attribute: 'active-item-id' }),
|
|
88
|
+
__metadata("design:type", Number)
|
|
98
89
|
], HSearchHistory.prototype, "activeItemId", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
property({ type: String, attribute: 'search-id' }),
|
|
101
|
-
__metadata("design:type", String)
|
|
102
|
-
], HSearchHistory.prototype, "searchId", void 0);
|
|
103
90
|
__decorate([
|
|
104
91
|
property({ type: Object }),
|
|
105
92
|
__metadata("design:type", Object)
|
|
@@ -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,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;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAAkE;AACjF,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;"}
|
package/build/esm/packages/phoenix/src/components/form/search/subcomponents/input/search_input.js
CHANGED
|
@@ -2,24 +2,12 @@ import { __decorate, __metadata } from '../../../../../../../../external/tslib/t
|
|
|
2
2
|
import { property, state } from 'lit/decorators';
|
|
3
3
|
import { PhoenixLightLitElement } from '../../../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
4
|
import { phoenixCustomElement } from '../../../../../core/decorators/phoenix_custom_element.js';
|
|
5
|
-
import {
|
|
5
|
+
import { SEARCH_CUSTOM_EVENT_NAMES, SEARCH_COMPONENT_NAMES } from '../../search_constants.js';
|
|
6
6
|
|
|
7
7
|
let HSearchInput = class HSearchInput extends PhoenixLightLitElement {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
10
|
this._isSearchPhraseCleared = false;
|
|
11
|
-
this._setupAttributes = () => {
|
|
12
|
-
var _a, _b, _c, _d;
|
|
13
|
-
(_a = this.input) === null || _a === void 0 ? void 0 : _a.setAttribute('role', 'combobox');
|
|
14
|
-
(_b = this.input) === null || _b === void 0 ? void 0 : _b.setAttribute('aria-autocomplete', 'none');
|
|
15
|
-
(_c = this.input) === null || _c === void 0 ? void 0 : _c.setAttribute('aria-haspopup', 'grid');
|
|
16
|
-
(_d = this.input) === null || _d === void 0 ? void 0 : _d.setAttribute('aria-activedescendant', '');
|
|
17
|
-
requestAnimationFrame(() => {
|
|
18
|
-
var _a, _b;
|
|
19
|
-
const $searchContentContainer = (_a = this.closest('h-search')) === null || _a === void 0 ? void 0 : _a.querySelector(`.${SEARCH_CLASS_NAMES.container}`);
|
|
20
|
-
(_b = this.input) === null || _b === void 0 ? void 0 : _b.setAttribute('aria-controls', ($searchContentContainer === null || $searchContentContainer === void 0 ? void 0 : $searchContentContainer.id) || '');
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
11
|
}
|
|
24
12
|
connectedCallback() {
|
|
25
13
|
super.connectedCallback();
|
|
@@ -29,7 +17,6 @@ let HSearchInput = class HSearchInput extends PhoenixLightLitElement {
|
|
|
29
17
|
}
|
|
30
18
|
this._setupInitialValue();
|
|
31
19
|
this._setupListeners();
|
|
32
|
-
this._setupAttributes();
|
|
33
20
|
}
|
|
34
21
|
_setupInitialValue() {
|
|
35
22
|
const searchQueryRegExp = /\/searchquery\/([^/]{1,})/;
|
|
@@ -58,8 +45,7 @@ let HSearchInput = class HSearchInput extends PhoenixLightLitElement {
|
|
|
58
45
|
this.input.addEventListener('focusin', (ev) => {
|
|
59
46
|
this.emitCustomEvent(SEARCH_CUSTOM_EVENT_NAMES.focusin, {
|
|
60
47
|
detail: {
|
|
61
|
-
searchPhrase: ev.target.value
|
|
62
|
-
relatedTarget: ev.relatedTarget
|
|
48
|
+
searchPhrase: ev.target.value
|
|
63
49
|
}
|
|
64
50
|
});
|
|
65
51
|
});
|
|
@@ -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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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 HSearchMessage extends PhoenixLightLitElement {
|
|
|
7
7
|
history: TSearchHistoryItem[];
|
|
8
8
|
translations: Record<string, string>;
|
|
9
9
|
moduleInstanceId: string;
|
|
10
|
-
private _searchButtonId;
|
|
11
10
|
private _createEmptyResults;
|
|
12
11
|
private _isNoResultsForSearchPhrase;
|
|
13
12
|
private _hasHistoryAndEmptyPhrase;
|
|
@@ -3,7 +3,6 @@ import { html } from 'lit';
|
|
|
3
3
|
import { property } 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 } from '../../search_constants.js';
|
|
9
8
|
import isEqual_1 from '../../../../../../../../external/lodash/isEqual.js';
|
|
@@ -14,7 +13,6 @@ let HSearchMessage = class HSearchMessage extends PhoenixLightLitElement {
|
|
|
14
13
|
this.searchPhrase = '';
|
|
15
14
|
this.history = [];
|
|
16
15
|
this.translations = {};
|
|
17
|
-
this._searchButtonId = v4();
|
|
18
16
|
}
|
|
19
17
|
_createEmptyResults() {
|
|
20
18
|
return {
|
|
@@ -47,12 +45,7 @@ let HSearchMessage = class HSearchMessage extends PhoenixLightLitElement {
|
|
|
47
45
|
return html `
|
|
48
46
|
${n(this._isNoResultsForSearchPhrase(), () => html `<p class="${SEARCH_CLASS_NAMES.messageNoResults}">
|
|
49
47
|
${this.searchPhrase} -
|
|
50
|
-
<button
|
|
51
|
-
class="${SEARCH_CLASS_NAMES.messageText}"
|
|
52
|
-
@click="${this.handleGoToResults}"
|
|
53
|
-
type="button"
|
|
54
|
-
data-search-item-id="${this._searchButtonId}"
|
|
55
|
-
>
|
|
48
|
+
<button class="${SEARCH_CLASS_NAMES.messageText}" @click="${this.handleGoToResults}" type="button">
|
|
56
49
|
${this.translations.searchInStore}
|
|
57
50
|
</button>
|
|
58
51
|
</p>`, () => html `${n(this._hasHistoryAndEmptyPhrase(), () => html `<p class="${SEARCH_CLASS_NAMES.message} ${SEARCH_CLASS_NAMES.messageWithHistory}">
|
|
@@ -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;"}
|
|
@@ -3,8 +3,7 @@ import { PhoenixLightLitElement } from "../../../../../core/phoenix_light_lit_el
|
|
|
3
3
|
import { TProducer } from "../../search_types";
|
|
4
4
|
export declare class HSearchProducerContent extends PhoenixLightLitElement {
|
|
5
5
|
producers: TProducer[];
|
|
6
|
-
activeItemId:
|
|
7
|
-
searchId: string;
|
|
6
|
+
activeItemId: number;
|
|
8
7
|
initialItemIds: Record<string, number>;
|
|
9
8
|
translations: Record<string, string>;
|
|
10
9
|
searchPhrase: string;
|
|
@@ -27,14 +27,13 @@ let HSearchProducerContent = class HSearchProducerContent extends PhoenixLightLi
|
|
|
27
27
|
${c(this.producers, (producer, index) => {
|
|
28
28
|
var _a, _b;
|
|
29
29
|
return html `<li
|
|
30
|
-
class="${SEARCH_CLASS_NAMES.item} ${SEARCH_CLASS_NAMES.itemHoverable} ${
|
|
30
|
+
class="${SEARCH_CLASS_NAMES.item} ${SEARCH_CLASS_NAMES.itemHoverable} ${this.initialItemIds.producers + index ===
|
|
31
31
|
this.activeItemId
|
|
32
32
|
? SEARCH_CLASS_NAMES.itemActive
|
|
33
33
|
: ''}"
|
|
34
|
-
data-search-item-id="${this.
|
|
34
|
+
data-search-item-id="${this.initialItemIds.producers + index}"
|
|
35
35
|
aria-label=${this.producerAriaLabel ? `${this.producerAriaLabel} ${producer.name}` : undefined}
|
|
36
36
|
tabindex="0"
|
|
37
|
-
role="option"
|
|
38
37
|
>
|
|
39
38
|
<a
|
|
40
39
|
href="${producer.url}"
|
|
@@ -55,13 +54,9 @@ __decorate([
|
|
|
55
54
|
__metadata("design:type", Array)
|
|
56
55
|
], HSearchProducerContent.prototype, "producers", void 0);
|
|
57
56
|
__decorate([
|
|
58
|
-
property({ type:
|
|
59
|
-
__metadata("design:type",
|
|
57
|
+
property({ type: Number, attribute: 'active-item-id' }),
|
|
58
|
+
__metadata("design:type", Number)
|
|
60
59
|
], HSearchProducerContent.prototype, "activeItemId", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
property({ type: String, attribute: 'search-id' }),
|
|
63
|
-
__metadata("design:type", String)
|
|
64
|
-
], HSearchProducerContent.prototype, "searchId", void 0);
|
|
65
60
|
__decorate([
|
|
66
61
|
property({ type: Object, reflect: true }),
|
|
67
62
|
__metadata("design:type", Object)
|
|
@@ -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;
|
|
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;"}
|
|
@@ -4,8 +4,7 @@ import type { TProduct, TSearchSettings } from "../../search_types";
|
|
|
4
4
|
export declare class HSearchProductContent extends PhoenixLightLitElement {
|
|
5
5
|
products: TProduct[];
|
|
6
6
|
settings: TSearchSettings;
|
|
7
|
-
activeItemId:
|
|
8
|
-
searchId: string;
|
|
7
|
+
activeItemId: number;
|
|
9
8
|
initialItemIds: Record<string, number>;
|
|
10
9
|
translations: Record<string, string>;
|
|
11
10
|
productAriaLabel?: string;
|
|
@@ -40,14 +40,13 @@ let HSearchProductContent = class HSearchProductContent extends PhoenixLightLitE
|
|
|
40
40
|
${c(this.products, (product, index) => {
|
|
41
41
|
var _a, _b;
|
|
42
42
|
return html ` <li
|
|
43
|
-
class="${SEARCH_CLASS_NAMES.item} ${SEARCH_CLASS_NAMES.itemHoverable} ${
|
|
43
|
+
class="${SEARCH_CLASS_NAMES.item} ${SEARCH_CLASS_NAMES.itemHoverable} ${this.initialItemIds.products + index ===
|
|
44
44
|
this.activeItemId
|
|
45
45
|
? SEARCH_CLASS_NAMES.itemActive
|
|
46
46
|
: ''}"
|
|
47
|
-
data-search-item-id="${this.
|
|
47
|
+
data-search-item-id="${this.initialItemIds.products + index}"
|
|
48
48
|
aria-label=${this.productAriaLabel ? `${this.productAriaLabel} ${product.name}` : undefined}
|
|
49
49
|
tabindex="0"
|
|
50
|
-
role="option"
|
|
51
50
|
>
|
|
52
51
|
<a
|
|
53
52
|
href="${product.url}"
|
|
@@ -96,13 +95,9 @@ __decorate([
|
|
|
96
95
|
__metadata("design:type", Object)
|
|
97
96
|
], HSearchProductContent.prototype, "settings", void 0);
|
|
98
97
|
__decorate([
|
|
99
|
-
property({ type:
|
|
100
|
-
__metadata("design:type",
|
|
98
|
+
property({ type: Number, attribute: 'active-item-id' }),
|
|
99
|
+
__metadata("design:type", Number)
|
|
101
100
|
], HSearchProductContent.prototype, "activeItemId", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
property({ type: String, attribute: 'search-id' }),
|
|
104
|
-
__metadata("design:type", String)
|
|
105
|
-
], HSearchProductContent.prototype, "searchId", void 0);
|
|
106
101
|
__decorate([
|
|
107
102
|
property({ type: Object, reflect: true }),
|
|
108
103
|
__metadata("design:type", Object)
|
|
@@ -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;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;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -9,8 +9,7 @@ export declare class HSearchResults extends PhoenixLightLitElement {
|
|
|
9
9
|
settings: TSearchSettings;
|
|
10
10
|
view: string;
|
|
11
11
|
locale: string;
|
|
12
|
-
activeItemId:
|
|
13
|
-
searchId: string;
|
|
12
|
+
activeItemId: number;
|
|
14
13
|
translations: Record<string, string>;
|
|
15
14
|
moduleInstanceId: string;
|
|
16
15
|
private _productPage;
|
|
@@ -66,7 +66,6 @@ let HSearchResults = class HSearchResults extends PhoenixLightLitElement {
|
|
|
66
66
|
${n(((_a = this.results.suggestions) === null || _a === void 0 ? void 0 : _a.length) || ((_b = this.results.categories) === null || _b === void 0 ? void 0 : _b.length), () => html ` <h-search-suggestion-content
|
|
67
67
|
class="${SEARCH_CLASS_NAMES.section}"
|
|
68
68
|
active-item-id="${this.activeItemId}"
|
|
69
|
-
search-id="${this.searchId}"
|
|
70
69
|
.initialItemIds="${this._getInitialItemsIds()}"
|
|
71
70
|
.translations="${this.translations}"
|
|
72
71
|
locale="${this.locale}"
|
|
@@ -81,7 +80,6 @@ let HSearchResults = class HSearchResults extends PhoenixLightLitElement {
|
|
|
81
80
|
.products="${this.results.products}"
|
|
82
81
|
.settings="${this.settings}"
|
|
83
82
|
active-item-id="${this.activeItemId}"
|
|
84
|
-
search-id="${this.searchId}"
|
|
85
83
|
.initialItemIds="${this._getInitialItemsIds()}"
|
|
86
84
|
.translations="${this.translations}"
|
|
87
85
|
.productAriaLabel=${this.settings.suggesterProductItemAriaLabel}
|
|
@@ -91,7 +89,7 @@ let HSearchResults = class HSearchResults extends PhoenixLightLitElement {
|
|
|
91
89
|
class="${SEARCH_CLASS_NAMES.productButton}"
|
|
92
90
|
@click="${this.handleLoadMoreProducts}"
|
|
93
91
|
type="button"
|
|
94
|
-
data-search-item-id="${this.
|
|
92
|
+
data-search-item-id="${this._loadMoreButtonId}"
|
|
95
93
|
>
|
|
96
94
|
${this.translations.loadMore}
|
|
97
95
|
</button>`), () => html `
|
|
@@ -99,7 +97,7 @@ let HSearchResults = class HSearchResults extends PhoenixLightLitElement {
|
|
|
99
97
|
class="${SEARCH_CLASS_NAMES.productButton}"
|
|
100
98
|
@click="${this.handleGoToProductsFor}"
|
|
101
99
|
type="button"
|
|
102
|
-
data-search-item-id="${this.
|
|
100
|
+
data-search-item-id="${this._goToProductsForButtonId}"
|
|
103
101
|
>
|
|
104
102
|
${this.translations.goToProductsFor}: <strong>${this._getSearchPhrase()}</strong>
|
|
105
103
|
</button>
|
|
@@ -110,7 +108,6 @@ let HSearchResults = class HSearchResults extends PhoenixLightLitElement {
|
|
|
110
108
|
class="${SEARCH_CLASS_NAMES.section}"
|
|
111
109
|
.producers="${this.results.producers}"
|
|
112
110
|
active-item-id="${this.activeItemId}"
|
|
113
|
-
search-id="${this.searchId}"
|
|
114
111
|
.initialItemIds="${this._getInitialItemsIds()}"
|
|
115
112
|
.translations="${this.translations}"
|
|
116
113
|
search-phrase="${this.searchPhrase}"
|
|
@@ -141,13 +138,9 @@ __decorate([
|
|
|
141
138
|
__metadata("design:type", String)
|
|
142
139
|
], HSearchResults.prototype, "locale", void 0);
|
|
143
140
|
__decorate([
|
|
144
|
-
property({ type:
|
|
145
|
-
__metadata("design:type",
|
|
141
|
+
property({ type: Number, attribute: 'active-item-id' }),
|
|
142
|
+
__metadata("design:type", Number)
|
|
146
143
|
], HSearchResults.prototype, "activeItemId", void 0);
|
|
147
|
-
__decorate([
|
|
148
|
-
property({ type: String, attribute: 'search-id' }),
|
|
149
|
-
__metadata("design:type", String)
|
|
150
|
-
], HSearchResults.prototype, "searchId", void 0);
|
|
151
144
|
__decorate([
|
|
152
145
|
property({ type: Object }),
|
|
153
146
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA,eAAe,8DAAkE;AACjF,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;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,eAAe,8DAAkE;AACjF,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -4,8 +4,7 @@ export declare class HSearchSuggestionContent extends PhoenixLightLitElement {
|
|
|
4
4
|
private _searchContextConsumer;
|
|
5
5
|
private _searchContext$;
|
|
6
6
|
private _searchContextObserver;
|
|
7
|
-
activeItemId:
|
|
8
|
-
searchId: string;
|
|
7
|
+
activeItemId: number;
|
|
9
8
|
initialItemIds: Record<string, number>;
|
|
10
9
|
translations: Record<string, string>;
|
|
11
10
|
view: string;
|
|
@@ -103,16 +103,13 @@ let HSearchSuggestionContent = class HSearchSuggestionContent extends PhoenixLig
|
|
|
103
103
|
<ul>
|
|
104
104
|
${c(this._suggestionsData, (suggestion, index) => html `<li
|
|
105
105
|
@click=${() => this._handleSuggestion(suggestion.suggestionName, suggestion.type)}
|
|
106
|
-
class="${SEARCH_CLASS_NAMES.item} ${SEARCH_CLASS_NAMES.itemHoverable} ${
|
|
106
|
+
class="${SEARCH_CLASS_NAMES.item} ${SEARCH_CLASS_NAMES.itemHoverable} ${index === this.activeItemId
|
|
107
107
|
? SEARCH_CLASS_NAMES.itemActive
|
|
108
108
|
: ''}"
|
|
109
109
|
data-suggested-value="${suggestion.suggestionName}"
|
|
110
|
-
data-search-item-id="${
|
|
111
|
-
aria-label
|
|
112
|
-
`${this.suggestionAriaLabel} ${suggestion.suggestionName || suggestion.categoryName}` :
|
|
113
|
-
''}"
|
|
110
|
+
data-search-item-id="${index}"
|
|
111
|
+
aria-label=${this.suggestionAriaLabel ? `${this.suggestionAriaLabel} ${suggestion.suggestionName}` : undefined}
|
|
114
112
|
tabindex="0"
|
|
115
|
-
role="option"
|
|
116
113
|
>
|
|
117
114
|
${n(suggestion.type === SUGGESTIONS_TYPE.suggestion, () => html ` <span> ${this._getMatchedPhrase(suggestion.suggestionName)} </span>
|
|
118
115
|
<h-icon
|
|
@@ -135,13 +132,9 @@ let HSearchSuggestionContent = class HSearchSuggestionContent extends PhoenixLig
|
|
|
135
132
|
}
|
|
136
133
|
};
|
|
137
134
|
__decorate([
|
|
138
|
-
property({ type:
|
|
139
|
-
__metadata("design:type",
|
|
135
|
+
property({ type: Number, attribute: 'active-item-id' }),
|
|
136
|
+
__metadata("design:type", Number)
|
|
140
137
|
], HSearchSuggestionContent.prototype, "activeItemId", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
property({ type: String, attribute: 'search-id' }),
|
|
143
|
-
__metadata("design:type", String)
|
|
144
|
-
], HSearchSuggestionContent.prototype, "searchId", void 0);
|
|
145
138
|
__decorate([
|
|
146
139
|
property({ type: Object, reflect: true }),
|
|
147
140
|
__metadata("design:type", Object)
|
|
@@ -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;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;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -229,9 +229,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
229
229
|
SelectControlUtils.appendHTMLOption($option, $list, position);
|
|
230
230
|
}
|
|
231
231
|
updateOptionAriaAttribute($option) {
|
|
232
|
-
|
|
233
|
-
? $option.removeAttribute(this.multiple ? 'aria-checked' : 'aria-selected')
|
|
234
|
-
: $option.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', 'true');
|
|
232
|
+
$option.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', String($option.selected));
|
|
235
233
|
}
|
|
236
234
|
_removeHTMLOptions(optionsValues) {
|
|
237
235
|
this._$options = SelectControlUtils.removeHTMLOptions(Array.from(this._$options.values()), optionsValues);
|
|
@@ -296,6 +294,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
296
294
|
name="${this.controlName}"
|
|
297
295
|
offset=${this.offset}
|
|
298
296
|
content-width="full"
|
|
297
|
+
prevent-focus-trap
|
|
299
298
|
>
|
|
300
299
|
<h-dropdown-toggler name=${this.controlName}> ${this.getSlot(SELECT_SLOT_NAMES.toggler)} </h-dropdown-toggler>
|
|
301
300
|
|
|
@@ -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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/controllers/keystrokes_controller/keystrokes_controller.d.ts
CHANGED
|
@@ -4,8 +4,9 @@ export declare class KeystrokesController implements ReactiveController {
|
|
|
4
4
|
#private;
|
|
5
5
|
private _keys;
|
|
6
6
|
private _callback;
|
|
7
|
+
private _containerSelectors?;
|
|
7
8
|
private _buffer;
|
|
8
|
-
constructor({ host, keys, callback, target }: TKeystrokesControllerProps);
|
|
9
|
+
constructor({ host, keys, callback, target, containerSelectors }: TKeystrokesControllerProps);
|
|
9
10
|
hostConnected(): void;
|
|
10
11
|
hostDisconnected(): void;
|
|
11
12
|
private _clearBuffer;
|
package/build/esm/packages/phoenix/src/controllers/keystrokes_controller/keystrokes_controller.js
CHANGED
|
@@ -3,11 +3,21 @@ import 'lit';
|
|
|
3
3
|
|
|
4
4
|
var _KeystrokesController_host, _KeystrokesController_target;
|
|
5
5
|
class KeystrokesController {
|
|
6
|
-
constructor({ host, keys, callback, target }) {
|
|
6
|
+
constructor({ host, keys, callback, target, containerSelectors }) {
|
|
7
7
|
_KeystrokesController_host.set(this, void 0);
|
|
8
8
|
_KeystrokesController_target.set(this, void 0);
|
|
9
9
|
this._buffer = [];
|
|
10
|
-
this._clearBuffer = () => {
|
|
10
|
+
this._clearBuffer = (ev) => {
|
|
11
|
+
if (!this._containerSelectors) {
|
|
12
|
+
this._buffer = [];
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const $newFocusedElement = ev.relatedTarget;
|
|
16
|
+
if ($newFocusedElement) {
|
|
17
|
+
const isNewFocusedElementAChild = !!this._containerSelectors.find((containerSelector) => !!$newFocusedElement.closest(containerSelector));
|
|
18
|
+
if (isNewFocusedElementAChild)
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
11
21
|
this._buffer = [];
|
|
12
22
|
};
|
|
13
23
|
this._saveKey = (ev) => {
|
|
@@ -75,6 +85,7 @@ class KeystrokesController {
|
|
|
75
85
|
__classPrivateFieldSet(this, _KeystrokesController_target, target, "f");
|
|
76
86
|
this._keys = keys;
|
|
77
87
|
this._callback = callback;
|
|
88
|
+
this._containerSelectors = containerSelectors;
|
|
78
89
|
__classPrivateFieldGet(this, _KeystrokesController_host, "f").addController(this);
|
|
79
90
|
}
|
|
80
91
|
hostConnected() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,+DAA+D,4CAAgD;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+DAA+D,4CAAgD;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -98,11 +98,11 @@ export { HSearchInput } from './components/form/search/subcomponents/input/searc
|
|
|
98
98
|
export { HSearchResults } from './components/form/search/subcomponents/results/search_results.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 { HSearchClear } from './components/form/search/subcomponents/buttons/search_clear.js';
|
|
102
|
-
export { HSearchMessage } from './components/form/search/subcomponents/message/search_message.js';
|
|
103
101
|
export { HSearch } from './components/form/search/search.js';
|
|
104
102
|
export { HSearchSubmit } from './components/form/search/subcomponents/buttons/search_submit.js';
|
|
103
|
+
export { HSearchClear } from './components/form/search/subcomponents/buttons/search_clear.js';
|
|
105
104
|
export { HSearchClose } from './components/form/search/subcomponents/buttons/search_close.js';
|
|
105
|
+
export { HSearchMessage } from './components/form/search/subcomponents/message/search_message.js';
|
|
106
106
|
export { HSearchHistoryRemove } from './components/form/search/subcomponents/history/search_history_remove.js';
|
|
107
107
|
export { HSearchHistorySelect } from './components/form/search/subcomponents/history/search_history_select.js';
|
|
108
108
|
export { HSearchSuggestionContent } from './components/form/search/subcomponents/results/search_suggestion_content.js';
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@shoper/phoenix_design_system",
|
|
3
3
|
"packageManager": "yarn@3.2.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "1.11.11-
|
|
5
|
+
"version": "1.11.11-8",
|
|
6
6
|
"description": "phoenix design system",
|
|
7
7
|
"author": "zefirek",
|
|
8
8
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@splidejs/splide": "^4.0.7"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@dreamcommerce/utilities": "^1.19.0
|
|
33
|
+
"@dreamcommerce/utilities": "^1.19.1-0",
|
|
34
34
|
"@shoper/jest_config": "^0.0.0",
|
|
35
35
|
"@shoper/tsconfig": "^0.0.0",
|
|
36
36
|
"@splidejs/splide": "4.0.7",
|