@shoper/phoenix_design_system 1.4.3-9 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/packages/phoenix/src/components/backdrop/backdrop.js +16 -8
- package/build/cjs/packages/phoenix/src/components/backdrop/backdrop.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/history/search_history_load_more_btn.js +8 -0
- package/build/cjs/packages/phoenix/src/components/form/search/history/search_history_load_more_btn.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/history/search_history_select_btn.js +0 -1
- package/build/cjs/packages/phoenix/src/components/form/search/history/search_history_select_btn.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/results/search_producer_content.js +3 -3
- package/build/cjs/packages/phoenix/src/components/form/search/results/search_product_content.js +9 -7
- package/build/cjs/packages/phoenix/src/components/form/search/results/search_product_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/results/search_suggestion_content.js +7 -12
- package/build/cjs/packages/phoenix/src/components/form/search/results/search_suggestion_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/search.js +4 -4
- package/build/cjs/packages/phoenix/src/components/form/search/search_constants.js +7 -0
- package/build/cjs/packages/phoenix/src/components/form/search/search_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/search_history.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/search_results.js +3 -12
- package/build/cjs/packages/phoenix/src/components/form/search/search_results.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/icon/icon.js +6 -1
- package/build/cjs/packages/phoenix/src/components/icon/icon.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/modal/modal.js +1 -1
- package/build/cjs/packages/phoenix/src/index.js +8 -7
- package/build/cjs/packages/phoenix/src/index.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/backdrop/backdrop.d.ts +2 -0
- package/build/esm/packages/phoenix/src/components/backdrop/backdrop.js +16 -8
- package/build/esm/packages/phoenix/src/components/backdrop/backdrop.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/history/search_history_load_more_btn.d.ts +3 -0
- package/build/esm/packages/phoenix/src/components/form/search/history/search_history_load_more_btn.js +8 -0
- package/build/esm/packages/phoenix/src/components/form/search/history/search_history_load_more_btn.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/history/search_history_select_btn.js +0 -1
- package/build/esm/packages/phoenix/src/components/form/search/history/search_history_select_btn.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/results/search_producer_content.js +3 -3
- package/build/esm/packages/phoenix/src/components/form/search/results/search_product_content.js +10 -8
- package/build/esm/packages/phoenix/src/components/form/search/results/search_product_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/results/search_suggestion_content.js +7 -12
- package/build/esm/packages/phoenix/src/components/form/search/results/search_suggestion_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search.js +5 -5
- package/build/esm/packages/phoenix/src/components/form/search/search_constants.d.ts +6 -0
- package/build/esm/packages/phoenix/src/components/form/search/search_constants.js +7 -1
- package/build/esm/packages/phoenix/src/components/form/search/search_constants.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search_history.d.ts +2 -1
- package/build/esm/packages/phoenix/src/components/form/search/search_history.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search_results.js +3 -12
- package/build/esm/packages/phoenix/src/components/form/search/search_results.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search_types.d.ts +6 -3
- package/build/esm/packages/phoenix/src/components/form/search/storefront_search_mock.js +77 -129
- package/build/esm/packages/phoenix/src/components/form/search/storefront_search_mock.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/icon/icon.d.ts +1 -0
- package/build/esm/packages/phoenix/src/components/icon/icon.js +6 -1
- package/build/esm/packages/phoenix/src/components/icon/icon.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal.js +1 -1
- package/build/esm/packages/phoenix/src/index.js +2 -2
- package/package.json +1 -1
|
@@ -8,6 +8,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
10
|
var backdrop_constants = require('./backdrop_constants.js');
|
|
11
|
+
var transition_controller = require('../../controllers/transition_controller/transition_controller.js');
|
|
11
12
|
|
|
12
13
|
exports.HBackdrop = class HBackdrop extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
13
14
|
constructor() {
|
|
@@ -22,16 +23,20 @@ exports.HBackdrop = class HBackdrop extends phoenix_light_lit_element.PhoenixLig
|
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
25
|
this._show = () => {
|
|
25
|
-
this.
|
|
26
|
-
|
|
26
|
+
this._transitionController.show(() => {
|
|
27
|
+
this._backdropLayerCounter += 1;
|
|
28
|
+
this.visible = true;
|
|
29
|
+
});
|
|
27
30
|
};
|
|
28
31
|
this._hide = () => {
|
|
29
|
-
this.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
this._backdropLayerCounter
|
|
34
|
-
|
|
32
|
+
this._transitionController.hide(() => {
|
|
33
|
+
this._backdropLayerCounter -= 1;
|
|
34
|
+
if (this._backdropLayerCounter > 0)
|
|
35
|
+
return;
|
|
36
|
+
if (this._backdropLayerCounter < 0)
|
|
37
|
+
this._backdropLayerCounter = 0;
|
|
38
|
+
this.visible = false;
|
|
39
|
+
});
|
|
35
40
|
};
|
|
36
41
|
this._dispatchBackdropClickedEvent = () => {
|
|
37
42
|
const backdropClickedEvent = new CustomEvent(backdrop_constants.BACKDROP_EVENTS.clicked, {
|
|
@@ -43,6 +48,9 @@ exports.HBackdrop = class HBackdrop extends phoenix_light_lit_element.PhoenixLig
|
|
|
43
48
|
document.addEventListener(backdrop_constants.BACKDROP_EVENTS.show, this._show);
|
|
44
49
|
document.addEventListener(backdrop_constants.BACKDROP_EVENTS.hide, this._hide);
|
|
45
50
|
}
|
|
51
|
+
connectedCallback() {
|
|
52
|
+
this._transitionController = new transition_controller.TransitionController(this, 'backdrop-opacity');
|
|
53
|
+
}
|
|
46
54
|
disconnectedCallback() {
|
|
47
55
|
super.disconnectedCallback();
|
|
48
56
|
document.removeEventListener(backdrop_constants.BACKDROP_EVENTS.show, this._show);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -6,6 +6,7 @@ var tslib_es6 = require('../../../../../../../external/tslib/tslib.es6.js');
|
|
|
6
6
|
var phoenix_light_lit_element = require('../../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
7
7
|
var phoenix_custom_element = require('../../../../core/decorators/phoenix_custom_element.js');
|
|
8
8
|
var btn_controller = require('../../../../controllers/btn_controller/btn_controller.js');
|
|
9
|
+
var visibility_controller = require('../../../../controllers/visibility_controller/visibility_controller.js');
|
|
9
10
|
var search_constants = require('../search_constants.js');
|
|
10
11
|
|
|
11
12
|
exports.HSearchHistoryLoadMoreBtn = class HSearchHistoryLoadMoreBtn extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
@@ -17,6 +18,13 @@ exports.HSearchHistoryLoadMoreBtn = class HSearchHistoryLoadMoreBtn extends phoe
|
|
|
17
18
|
}));
|
|
18
19
|
};
|
|
19
20
|
this._btnController = new btn_controller.BtnController(this, this._dispatchHistoryLoadMoreEvent);
|
|
21
|
+
this._visibilityController = new visibility_controller.VisibilityController(this);
|
|
22
|
+
}
|
|
23
|
+
hide() {
|
|
24
|
+
this._visibilityController.hide();
|
|
25
|
+
}
|
|
26
|
+
show() {
|
|
27
|
+
this._visibilityController.show();
|
|
20
28
|
}
|
|
21
29
|
connectedCallback() {
|
|
22
30
|
super.connectedCallback();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,kDAAsD;AAC9E;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,kDAAsD;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;"}
|
package/build/cjs/packages/phoenix/src/components/form/search/history/search_history_select_btn.js
CHANGED
|
@@ -13,7 +13,6 @@ exports.HSearchHistorySelectBtn = class HSearchHistorySelectBtn extends phoenix_
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super();
|
|
15
15
|
this._dispatchHistorySelectEvent = () => {
|
|
16
|
-
console.log(this.historyLabel, 'this.historyLabel');
|
|
17
16
|
this.dispatchEvent(new CustomEvent(search_constants.SEARCH_CUSTOM_EVENT_NAMES.searchPhraseSubmitted, {
|
|
18
17
|
bubbles: true,
|
|
19
18
|
detail: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,kDAAsD;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;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,kDAAsD;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;"}
|
package/build/cjs/packages/phoenix/src/components/form/search/results/search_producer_content.js
CHANGED
|
@@ -15,17 +15,17 @@ exports.HSearchProducerContent = class HSearchProducerContent extends phoenix_li
|
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
17
17
|
this.producerListHtml = () => {
|
|
18
|
-
return lit.html `<div class="search__section"
|
|
18
|
+
return lit.html `<div class="search__section">
|
|
19
19
|
<h3 class="search__section-head search__section-head_sticky search__section-head_line">Producenci</h3>
|
|
20
20
|
<ul class="search__list">
|
|
21
21
|
${repeat.repeat(this.producers, (producer) => lit.html `<li class="search__list-item">
|
|
22
|
-
<a
|
|
22
|
+
<a href="${producer.url}" class="search__result-link">
|
|
23
23
|
<div class="search__result-icon none">${producer.img}</div>
|
|
24
24
|
<div class="search__result-content">
|
|
25
25
|
<div class="search__result-note"></div>
|
|
26
26
|
<div class="search__result-title">
|
|
27
27
|
<h5 class="search__result-title-item search__result_bold">
|
|
28
|
-
|
|
28
|
+
<span class="search__result_match">${producer.name}</span>e
|
|
29
29
|
</h5>
|
|
30
30
|
</div>
|
|
31
31
|
<div class="search__result-note"></div></div
|
package/build/cjs/packages/phoenix/src/components/form/search/results/search_product_content.js
CHANGED
|
@@ -15,17 +15,16 @@ exports.HSearchProductContent = class HSearchProductContent extends phoenix_ligh
|
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
17
17
|
this.getProductListHtml = () => {
|
|
18
|
-
return lit.html `<div class="search__section"
|
|
18
|
+
return lit.html `<div class="search__section">
|
|
19
19
|
<h3 class="search__section-head search__section-head_sticky search__section-head_line">Wyniki dla: teraz</h3>
|
|
20
20
|
|
|
21
21
|
<ul>
|
|
22
22
|
${repeat.repeat(this.products, (product) => lit.html `<li class="search__list-item">
|
|
23
|
-
<a
|
|
23
|
+
<a href="${product.url}" class="search__result-link"
|
|
24
24
|
><div class="search__result-icon ">
|
|
25
25
|
<img src="${product.img}" alt="product image" />
|
|
26
26
|
</div>
|
|
27
27
|
<div class="search__result-content">
|
|
28
|
-
<div class="search__result-note"></div>
|
|
29
28
|
<div class="search__result-title">
|
|
30
29
|
<h5 class="search__result-title-item">${product.name}</h5>
|
|
31
30
|
</div>
|
|
@@ -38,7 +37,7 @@ exports.HSearchProductContent = class HSearchProductContent extends phoenix_ligh
|
|
|
38
37
|
</ul>
|
|
39
38
|
|
|
40
39
|
<div class="search__section-footer">
|
|
41
|
-
<button @click="${this.handleGoToProductsFor}" class="
|
|
40
|
+
<button @click="${this.handleGoToProductsFor}" class="search__section-btn-load-more" type="button">
|
|
42
41
|
Przejdź do produktów dla: teraz
|
|
43
42
|
</button>
|
|
44
43
|
</div>
|
|
@@ -46,11 +45,14 @@ exports.HSearchProductContent = class HSearchProductContent extends phoenix_ligh
|
|
|
46
45
|
};
|
|
47
46
|
}
|
|
48
47
|
handleGoToProductsFor(ev) {
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
this.dispatchEvent(new CustomEvent(search_constants.SEARCH_CUSTOM_EVENT_NAMES.searchPhraseSubmitted, {
|
|
49
|
+
bubbles: true,
|
|
50
|
+
detail: {
|
|
51
|
+
searchPhrase: ev.target.textContent
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
51
54
|
}
|
|
52
55
|
render() {
|
|
53
|
-
console.log(this.products, 'this.products {AWEL');
|
|
54
56
|
return when.when(this.products && this.products.length !== 0, this.getProductListHtml, () => lit.nothing);
|
|
55
57
|
}
|
|
56
58
|
};
|
package/build/cjs/packages/phoenix/src/components/form/search/results/search_product_content.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,kDAAsD;AAC9E;AACA;AACA;AACA;AACA;AACA,mBAAmB,wEAAgF;AACnG,qBAAqB,0EAAkF;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;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,kDAAsD;AAC9E;AACA;AACA;AACA;AACA;AACA,mBAAmB,wEAAgF;AACnG,qBAAqB,0EAAkF;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;"}
|
package/build/cjs/packages/phoenix/src/components/form/search/results/search_suggestion_content.js
CHANGED
|
@@ -16,23 +16,18 @@ exports.HSearchSuggestionContent = class HSearchSuggestionContent extends phoeni
|
|
|
16
16
|
super(...arguments);
|
|
17
17
|
this.suggestions = [];
|
|
18
18
|
this.getSuggestionListHtml = () => {
|
|
19
|
-
return lit.html `<div class="search__section none"
|
|
19
|
+
return lit.html `<div class="search__section none">
|
|
20
20
|
<h3 class="search__section-head search__section-head_sticky search__section-head_line">Sugestie</h3>
|
|
21
21
|
<ul class="search__list">
|
|
22
|
-
${when.when(this.suggestions, () => lit.html `${repeat.repeat(this.suggestions, (suggestion) => lit.html `<li @click=${this.handleSuggestion} class="search__list-item"
|
|
23
|
-
<span
|
|
24
|
-
<span
|
|
25
|
-
role="button"
|
|
26
|
-
aria-label="copy suggestion"
|
|
27
|
-
class="js__search-btn-copy search__list-item-action-btn search__icon_main-color icon icon-arrow-skew"
|
|
22
|
+
${when.when(this.suggestions, () => lit.html `${repeat.repeat(this.suggestions, (suggestion) => lit.html `<li @click=${this.handleSuggestion} class="search__list-item">
|
|
23
|
+
<span>${suggestion}</span>
|
|
24
|
+
<span role="button" aria-label="copy suggestion" class="search__icon_main-color icon icon-arrow-skew"
|
|
28
25
|
>LOOK</span
|
|
29
26
|
>
|
|
30
27
|
</li>`)}`, () => lit.nothing)}
|
|
31
|
-
${when.when(this.categories, () => lit.html `${repeat.repeat(this.categories, (category) => lit.html `<li class="search__list-item search__result_bold"
|
|
32
|
-
<a class="
|
|
33
|
-
><span class="
|
|
34
|
-
><span class="search__result_match">${category.name}</span></span
|
|
35
|
-
>
|
|
28
|
+
${when.when(this.categories, () => lit.html `${repeat.repeat(this.categories, (category) => lit.html `<li class="search__list-item search__result_bold">
|
|
29
|
+
<a class="search__result-link" href="${category.url}"
|
|
30
|
+
><span class="search__result_bold"><span class="search__result_match">${category.name}</span></span>
|
|
36
31
|
<span class="search__result-category-title">kategoria</span></a
|
|
37
32
|
>
|
|
38
33
|
</li>`)}`, () => lit.nothing)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,kDAAsD;AAC9E;AACA;AACA;AACA;AACA;AACA,mBAAmB,wEAAgF;AACnG,qBAAqB,0EAAkF;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;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,kDAAsD;AAC9E;AACA;AACA;AACA;AACA;AACA,mBAAmB,wEAAgF;AACnG,qBAAqB,0EAAkF;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;"}
|
|
@@ -31,7 +31,7 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
31
31
|
}
|
|
32
32
|
return target.value;
|
|
33
33
|
};
|
|
34
|
-
this.
|
|
34
|
+
this._hideSuggesterOnClickOutside = (ev) => {
|
|
35
35
|
const outsideClick = typeof ev.composedPath === 'function' && !ev.composedPath().includes(this);
|
|
36
36
|
if (outsideClick) {
|
|
37
37
|
this._hideHistorySuggestionsAndResults();
|
|
@@ -62,11 +62,11 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
62
62
|
}
|
|
63
63
|
disconnectedCallback() {
|
|
64
64
|
super.disconnectedCallback();
|
|
65
|
-
document.removeEventListener('click', this.
|
|
65
|
+
document.removeEventListener('click', this._hideSuggesterOnClickOutside);
|
|
66
66
|
}
|
|
67
67
|
_setupContext() {
|
|
68
68
|
this._historyContextProvider = new context_provider_controller.ContextProviderController(this);
|
|
69
|
-
this._historyContextProvider.provide(
|
|
69
|
+
this._historyContextProvider.provide(search_constants.SEARCH_CONTEXT_NAMES.historyContext, this._historyContext);
|
|
70
70
|
}
|
|
71
71
|
_setupListeners() {
|
|
72
72
|
const input = this.querySelector('input[type="search"]');
|
|
@@ -111,7 +111,7 @@ exports.HSearch = class HSearch extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
111
111
|
}
|
|
112
112
|
this._historyContext.notify({ showLoadMore: this._historyLimitedContent.length < contentLength });
|
|
113
113
|
});
|
|
114
|
-
document.addEventListener('click', this.
|
|
114
|
+
document.addEventListener('click', this._hideSuggesterOnClickOutside);
|
|
115
115
|
}
|
|
116
116
|
_updateSearchPhrase(searchPhrase) {
|
|
117
117
|
this.dispatchEvent(new CustomEvent(search_constants.SEARCH_CUSTOM_EVENT_NAMES.searchPhraseUpdated, {
|
|
@@ -39,6 +39,9 @@ const SEARCH_CLASS_NAMES = {
|
|
|
39
39
|
resultsListContainer: 'search__results-list-container',
|
|
40
40
|
resultsPortalContainer: 'search__results-portal-container'
|
|
41
41
|
};
|
|
42
|
+
const SEARCH_CONTEXT_NAMES = {
|
|
43
|
+
historyContext: 'historyContext'
|
|
44
|
+
};
|
|
42
45
|
const SEARCH_PORTAL_DESTINATIONS = {
|
|
43
46
|
historyContent: 'search.historyContent',
|
|
44
47
|
resultsContent: 'search.resultsContent'
|
|
@@ -46,6 +49,9 @@ const SEARCH_PORTAL_DESTINATIONS = {
|
|
|
46
49
|
const SEARCH_SLOT_NAMES = {
|
|
47
50
|
clearButton: 'search.clear.button'
|
|
48
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* TODO: Should be moved the config object injected to component
|
|
54
|
+
*/
|
|
49
55
|
const SEARCH_CONFIGURATION = {
|
|
50
56
|
historyContentLimit: 3
|
|
51
57
|
};
|
|
@@ -53,6 +59,7 @@ const SEARCH_CONFIGURATION = {
|
|
|
53
59
|
exports.SEARCH_CLASS_NAMES = SEARCH_CLASS_NAMES;
|
|
54
60
|
exports.SEARCH_COMPONENT_NAMES = SEARCH_COMPONENT_NAMES;
|
|
55
61
|
exports.SEARCH_CONFIGURATION = SEARCH_CONFIGURATION;
|
|
62
|
+
exports.SEARCH_CONTEXT_NAMES = SEARCH_CONTEXT_NAMES;
|
|
56
63
|
exports.SEARCH_CUSTOM_EVENT_NAMES = SEARCH_CUSTOM_EVENT_NAMES;
|
|
57
64
|
exports.SEARCH_NATIVE_EVENT_NAMES = SEARCH_NATIVE_EVENT_NAMES;
|
|
58
65
|
exports.SEARCH_PORTAL_DESTINATIONS = SEARCH_PORTAL_DESTINATIONS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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 @@ exports.HSearchHistory = class HSearchHistory extends phoenix_light_lit_element.
|
|
|
27
27
|
this._historyContextObserver = new observer.Observer((searchData) => {
|
|
28
28
|
this.requestUpdate();
|
|
29
29
|
const button = this.buttonRef.value;
|
|
30
|
-
|
|
30
|
+
searchData.showLoadMore ? button.show() : button.hide();
|
|
31
31
|
});
|
|
32
32
|
this._historyContext$.subscribe(this._historyContextObserver);
|
|
33
33
|
}
|
|
@@ -10,15 +10,6 @@ var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_el
|
|
|
10
10
|
var search_constants = require('./search_constants.js');
|
|
11
11
|
|
|
12
12
|
exports.HSearchResults = class HSearchResults extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this.results = {
|
|
16
|
-
suggestions: [],
|
|
17
|
-
products: [],
|
|
18
|
-
producers: [],
|
|
19
|
-
categories: []
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
13
|
render() {
|
|
23
14
|
if (this.results)
|
|
24
15
|
return lit.html `<div class="${search_constants.SEARCH_CLASS_NAMES.resultsListContainer}">
|
|
@@ -26,12 +17,12 @@ exports.HSearchResults = class HSearchResults extends phoenix_light_lit_element.
|
|
|
26
17
|
<div>
|
|
27
18
|
<h3 class="search__section-head search__section-head_sticky search__section-head_line">Results</h3>
|
|
28
19
|
|
|
29
|
-
<h-search-suggestion-content .suggestions="${this.results.suggestions}" .categories="${this.results.categories}">
|
|
20
|
+
<h-search-suggestion-content .suggestions="${this.results.suggestions}" .categories="${this.results.categories.list}">
|
|
30
21
|
</h-search-suggestion-content>
|
|
31
22
|
|
|
32
|
-
<h-search-product-content .products="${this.results.products}"></h-search-product-content>
|
|
23
|
+
<h-search-product-content .products="${this.results.products.list}"></h-search-product-content>
|
|
33
24
|
|
|
34
|
-
<h-search-producer-content .
|
|
25
|
+
<h-search-producer-content .producers="${this.results.producers.list}"></h-search-producer-content>
|
|
35
26
|
</div>
|
|
36
27
|
</h-portal>
|
|
37
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -20,6 +20,7 @@ exports.HIcon = HIcon_1 = class HIcon extends phoenix_light_lit_element.PhoenixL
|
|
|
20
20
|
this.filled = false;
|
|
21
21
|
this.clickable = false;
|
|
22
22
|
this.noStroke = false;
|
|
23
|
+
this.cssClasses = '';
|
|
23
24
|
this._srcObserverCallback = (src) => {
|
|
24
25
|
if (src)
|
|
25
26
|
this.requestUpdate();
|
|
@@ -45,7 +46,7 @@ exports.HIcon = HIcon_1 = class HIcon extends phoenix_light_lit_element.PhoenixL
|
|
|
45
46
|
if (!HIcon_1.src.getValue())
|
|
46
47
|
return null;
|
|
47
48
|
return lit.html `
|
|
48
|
-
<svg class="${this._cssClasses}">
|
|
49
|
+
<svg class="${this._cssClasses} ${this.cssClasses}">
|
|
49
50
|
<use xlink:href="${namespaced_attribure_directive.namespacedAttribute('http://www.w3.org/1999/xlink', `${HIcon_1.src.getValue()}#${this.iconName}`)}"></use>
|
|
50
51
|
</svg>
|
|
51
52
|
`;
|
|
@@ -72,6 +73,10 @@ tslib_es6.__decorate([
|
|
|
72
73
|
decorators.property({ type: Boolean }),
|
|
73
74
|
tslib_es6.__metadata("design:type", Boolean)
|
|
74
75
|
], exports.HIcon.prototype, "noStroke", void 0);
|
|
76
|
+
tslib_es6.__decorate([
|
|
77
|
+
decorators.property({ type: String, attribute: 'css-classes' }),
|
|
78
|
+
tslib_es6.__metadata("design:type", String)
|
|
79
|
+
], exports.HIcon.prototype, "cssClasses", void 0);
|
|
75
80
|
exports.HIcon = HIcon_1 = tslib_es6.__decorate([
|
|
76
81
|
phoenix_custom_element.phoenixCustomElement('h-icon'),
|
|
77
82
|
tslib_es6.__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA,oBAAoB,uCAA2C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA,oBAAoB,uCAA2C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -125,6 +125,7 @@ exports.HModal = HModal_1 = class HModal extends phoenix_light_lit_element.Phoen
|
|
|
125
125
|
async open() {
|
|
126
126
|
return new Promise((resolve) => {
|
|
127
127
|
var _a;
|
|
128
|
+
this[modal_constants.MODAL_OPENED_PROP] = true;
|
|
128
129
|
(_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.add(`modal_visible`, `modal_show-${this.transition}-start`);
|
|
129
130
|
window.requestAnimationFrame(() => {
|
|
130
131
|
setTimeout(() => {
|
|
@@ -134,7 +135,6 @@ exports.HModal = HModal_1 = class HModal extends phoenix_light_lit_element.Phoen
|
|
|
134
135
|
const transitionDuration = parseFloat(getComputedStyle(this._contentRef.value || this).transitionDuration) * 1000;
|
|
135
136
|
setTimeout(() => {
|
|
136
137
|
var _a;
|
|
137
|
-
this[modal_constants.MODAL_OPENED_PROP] = true;
|
|
138
138
|
(_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.remove(`modal_show-${this.transition}-start`, `modal_show-${this.transition}-end`);
|
|
139
139
|
resolve();
|
|
140
140
|
}, transitionDuration);
|
|
@@ -95,13 +95,13 @@ var button_stepper = require('./components/form/input_stepper/button_stepper.js'
|
|
|
95
95
|
var search_constants = require('./components/form/search/search_constants.js');
|
|
96
96
|
var search = require('./components/form/search/search.js');
|
|
97
97
|
var search_input = require('./components/form/search/search_input.js');
|
|
98
|
+
var search_history_load_more_btn = require('./components/form/search/history/search_history_load_more_btn.js');
|
|
98
99
|
var search_history = require('./components/form/search/search_history.js');
|
|
99
100
|
var search_results = require('./components/form/search/search_results.js');
|
|
100
101
|
var search_submit_btn = require('./components/form/search/buttons/search_submit_btn.js');
|
|
101
102
|
var search_clear_btn = require('./components/form/search/buttons/search_clear_btn.js');
|
|
102
103
|
var search_history_remove_btn = require('./components/form/search/history/search_history_remove_btn.js');
|
|
103
104
|
var search_history_select_btn = require('./components/form/search/history/search_history_select_btn.js');
|
|
104
|
-
var search_history_load_more_btn = require('./components/form/search/history/search_history_load_more_btn.js');
|
|
105
105
|
var search_suggestion_content = require('./components/form/search/results/search_suggestion_content.js');
|
|
106
106
|
var search_product_content = require('./components/form/search/results/search_product_content.js');
|
|
107
107
|
var search_producer_content = require('./components/form/search/results/search_producer_content.js');
|
|
@@ -559,6 +559,7 @@ Object.defineProperty(exports, 'HButtonStepper', {
|
|
|
559
559
|
exports.SEARCH_CLASS_NAMES = search_constants.SEARCH_CLASS_NAMES;
|
|
560
560
|
exports.SEARCH_COMPONENT_NAMES = search_constants.SEARCH_COMPONENT_NAMES;
|
|
561
561
|
exports.SEARCH_CONFIGURATION = search_constants.SEARCH_CONFIGURATION;
|
|
562
|
+
exports.SEARCH_CONTEXT_NAMES = search_constants.SEARCH_CONTEXT_NAMES;
|
|
562
563
|
exports.SEARCH_CUSTOM_EVENT_NAMES = search_constants.SEARCH_CUSTOM_EVENT_NAMES;
|
|
563
564
|
exports.SEARCH_NATIVE_EVENT_NAMES = search_constants.SEARCH_NATIVE_EVENT_NAMES;
|
|
564
565
|
exports.SEARCH_PORTAL_DESTINATIONS = search_constants.SEARCH_PORTAL_DESTINATIONS;
|
|
@@ -575,6 +576,12 @@ Object.defineProperty(exports, 'HSearchInput', {
|
|
|
575
576
|
return search_input.HSearchInput;
|
|
576
577
|
}
|
|
577
578
|
});
|
|
579
|
+
Object.defineProperty(exports, 'HSearchHistoryLoadMoreBtn', {
|
|
580
|
+
enumerable: true,
|
|
581
|
+
get: function () {
|
|
582
|
+
return search_history_load_more_btn.HSearchHistoryLoadMoreBtn;
|
|
583
|
+
}
|
|
584
|
+
});
|
|
578
585
|
Object.defineProperty(exports, 'HSearchHistory', {
|
|
579
586
|
enumerable: true,
|
|
580
587
|
get: function () {
|
|
@@ -611,12 +618,6 @@ Object.defineProperty(exports, 'HSearchHistorySelectBtn', {
|
|
|
611
618
|
return search_history_select_btn.HSearchHistorySelectBtn;
|
|
612
619
|
}
|
|
613
620
|
});
|
|
614
|
-
Object.defineProperty(exports, 'HSearchHistoryLoadMoreBtn', {
|
|
615
|
-
enumerable: true,
|
|
616
|
-
get: function () {
|
|
617
|
-
return search_history_load_more_btn.HSearchHistoryLoadMoreBtn;
|
|
618
|
-
}
|
|
619
|
-
});
|
|
620
621
|
Object.defineProperty(exports, 'HSearchSuggestionContent', {
|
|
621
622
|
enumerable: true,
|
|
622
623
|
get: function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,7 +3,9 @@ import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/pho
|
|
|
3
3
|
export declare class HBackdrop extends PhoenixLightLitElement {
|
|
4
4
|
visible: boolean;
|
|
5
5
|
private _backdropLayerCounter;
|
|
6
|
+
private _transitionController;
|
|
6
7
|
constructor();
|
|
8
|
+
connectedCallback(): void;
|
|
7
9
|
disconnectedCallback(): void;
|
|
8
10
|
private _appendBackdrop;
|
|
9
11
|
private _show;
|
|
@@ -4,6 +4,7 @@ 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
6
|
import { BACKDROP_NAME, BACKDROP_EVENTS, BACKDROP_CSS_CLASS } from './backdrop_constants.js';
|
|
7
|
+
import { TransitionController } from '../../controllers/transition_controller/transition_controller.js';
|
|
7
8
|
|
|
8
9
|
let HBackdrop = class HBackdrop extends PhoenixLightLitElement {
|
|
9
10
|
constructor() {
|
|
@@ -18,16 +19,20 @@ let HBackdrop = class HBackdrop extends PhoenixLightLitElement {
|
|
|
18
19
|
}
|
|
19
20
|
};
|
|
20
21
|
this._show = () => {
|
|
21
|
-
this.
|
|
22
|
-
|
|
22
|
+
this._transitionController.show(() => {
|
|
23
|
+
this._backdropLayerCounter += 1;
|
|
24
|
+
this.visible = true;
|
|
25
|
+
});
|
|
23
26
|
};
|
|
24
27
|
this._hide = () => {
|
|
25
|
-
this.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
this._backdropLayerCounter
|
|
30
|
-
|
|
28
|
+
this._transitionController.hide(() => {
|
|
29
|
+
this._backdropLayerCounter -= 1;
|
|
30
|
+
if (this._backdropLayerCounter > 0)
|
|
31
|
+
return;
|
|
32
|
+
if (this._backdropLayerCounter < 0)
|
|
33
|
+
this._backdropLayerCounter = 0;
|
|
34
|
+
this.visible = false;
|
|
35
|
+
});
|
|
31
36
|
};
|
|
32
37
|
this._dispatchBackdropClickedEvent = () => {
|
|
33
38
|
const backdropClickedEvent = new CustomEvent(BACKDROP_EVENTS.clicked, {
|
|
@@ -39,6 +44,9 @@ let HBackdrop = class HBackdrop extends PhoenixLightLitElement {
|
|
|
39
44
|
document.addEventListener(BACKDROP_EVENTS.show, this._show);
|
|
40
45
|
document.addEventListener(BACKDROP_EVENTS.hide, this._hide);
|
|
41
46
|
}
|
|
47
|
+
connectedCallback() {
|
|
48
|
+
this._transitionController = new TransitionController(this, 'backdrop-opacity');
|
|
49
|
+
}
|
|
42
50
|
disconnectedCallback() {
|
|
43
51
|
super.disconnectedCallback();
|
|
44
52
|
document.removeEventListener(BACKDROP_EVENTS.show, this._show);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,7 +1,10 @@
|
|
|
1
1
|
import { PhoenixLightLitElement } from "../../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
export declare class HSearchHistoryLoadMoreBtn extends PhoenixLightLitElement {
|
|
3
3
|
private _btnController;
|
|
4
|
+
private _visibilityController;
|
|
4
5
|
constructor();
|
|
6
|
+
hide(): void;
|
|
7
|
+
show(): void;
|
|
5
8
|
connectedCallback(): void;
|
|
6
9
|
private _dispatchHistoryLoadMoreEvent;
|
|
7
10
|
}
|
|
@@ -2,6 +2,7 @@ import { __decorate, __metadata } from '../../../../../../../external/tslib/tsli
|
|
|
2
2
|
import { PhoenixLightLitElement } from '../../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
3
3
|
import { phoenixCustomElement } from '../../../../core/decorators/phoenix_custom_element.js';
|
|
4
4
|
import { BtnController } from '../../../../controllers/btn_controller/btn_controller.js';
|
|
5
|
+
import { VisibilityController } from '../../../../controllers/visibility_controller/visibility_controller.js';
|
|
5
6
|
import { SEARCH_CUSTOM_EVENT_NAMES, SEARCH_NATIVE_EVENT_NAMES, SEARCH_COMPONENT_NAMES } from '../search_constants.js';
|
|
6
7
|
|
|
7
8
|
let HSearchHistoryLoadMoreBtn = class HSearchHistoryLoadMoreBtn extends PhoenixLightLitElement {
|
|
@@ -13,6 +14,13 @@ let HSearchHistoryLoadMoreBtn = class HSearchHistoryLoadMoreBtn extends PhoenixL
|
|
|
13
14
|
}));
|
|
14
15
|
};
|
|
15
16
|
this._btnController = new BtnController(this, this._dispatchHistoryLoadMoreEvent);
|
|
17
|
+
this._visibilityController = new VisibilityController(this);
|
|
18
|
+
}
|
|
19
|
+
hide() {
|
|
20
|
+
this._visibilityController.hide();
|
|
21
|
+
}
|
|
22
|
+
show() {
|
|
23
|
+
this._visibilityController.show();
|
|
16
24
|
}
|
|
17
25
|
connectedCallback() {
|
|
18
26
|
super.connectedCallback();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,kDAAsD;AAC7F;AACA;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,kDAAsD;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/history/search_history_select_btn.js
CHANGED
|
@@ -9,7 +9,6 @@ let HSearchHistorySelectBtn = class HSearchHistorySelectBtn extends PhoenixLight
|
|
|
9
9
|
constructor() {
|
|
10
10
|
super();
|
|
11
11
|
this._dispatchHistorySelectEvent = () => {
|
|
12
|
-
console.log(this.historyLabel, 'this.historyLabel');
|
|
13
12
|
this.dispatchEvent(new CustomEvent(SEARCH_CUSTOM_EVENT_NAMES.searchPhraseSubmitted, {
|
|
14
13
|
bubbles: true,
|
|
15
14
|
detail: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,kDAAsD;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,kDAAsD;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/results/search_producer_content.js
CHANGED
|
@@ -11,17 +11,17 @@ let HSearchProducerContent = class HSearchProducerContent extends PhoenixLightLi
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
13
13
|
this.producerListHtml = () => {
|
|
14
|
-
return html `<div class="search__section"
|
|
14
|
+
return html `<div class="search__section">
|
|
15
15
|
<h3 class="search__section-head search__section-head_sticky search__section-head_line">Producenci</h3>
|
|
16
16
|
<ul class="search__list">
|
|
17
17
|
${c(this.producers, (producer) => html `<li class="search__list-item">
|
|
18
|
-
<a
|
|
18
|
+
<a href="${producer.url}" class="search__result-link">
|
|
19
19
|
<div class="search__result-icon none">${producer.img}</div>
|
|
20
20
|
<div class="search__result-content">
|
|
21
21
|
<div class="search__result-note"></div>
|
|
22
22
|
<div class="search__result-title">
|
|
23
23
|
<h5 class="search__result-title-item search__result_bold">
|
|
24
|
-
|
|
24
|
+
<span class="search__result_match">${producer.name}</span>e
|
|
25
25
|
</h5>
|
|
26
26
|
</div>
|
|
27
27
|
<div class="search__result-note"></div></div
|