@shoper/phoenix_design_system 1.10.6 → 1.10.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/packages/phoenix/src/components/form/input/input_copy_button.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +1 -10
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input_copy_button.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search_types.d.ts +4 -0
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.d.ts +0 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +1 -10
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js.map +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ exports.HInputCopyButton = class HInputCopyButton extends phoenix_light_lit_elem
|
|
|
16
16
|
this.copyValue = '';
|
|
17
17
|
this._$inputToCopy = null;
|
|
18
18
|
this._handleCopyToClipboard = async () => {
|
|
19
|
-
if (!this._$inputToCopy)
|
|
19
|
+
if (!this._$inputToCopy || this.hasBeenCopied)
|
|
20
20
|
return;
|
|
21
21
|
this._$inputToCopy.select();
|
|
22
22
|
this.copyValue = this._$inputToCopy.value;
|
|
@@ -33,17 +33,8 @@ exports.HSearchProductContent = class HSearchProductContent extends phoenix_ligh
|
|
|
33
33
|
? productName.substring(0, search_constants.SEARCH_CONFIGURATION.maxCharactersInProductName) + '...'
|
|
34
34
|
: productName;
|
|
35
35
|
}
|
|
36
|
-
extractNumber(text) {
|
|
37
|
-
const numberArray = text
|
|
38
|
-
.split(' ')
|
|
39
|
-
.map((word) => parseFloat(word))
|
|
40
|
-
.filter((number) => !isNaN(number));
|
|
41
|
-
return numberArray[0];
|
|
42
|
-
}
|
|
43
36
|
_getPercentPromotion(prices) {
|
|
44
|
-
|
|
45
|
-
const promotionPrice = this.extractNumber(prices.promotion.text);
|
|
46
|
-
return `-${Math.round(((regularPrice - promotionPrice) / regularPrice) * 100)}%`;
|
|
37
|
+
return `-${Math.round(((prices.basic.float - prices.promotion.float) / prices.basic.float) * 100)}%`;
|
|
47
38
|
}
|
|
48
39
|
render() {
|
|
49
40
|
return lit.html `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,qDAAyD;AACjF;AACA;AACA;AACA;AACA,mBAAmB,2EAAmF;AACtG;AACA,qBAAqB,6EAAqF;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,qDAAyD;AACjF;AACA;AACA;AACA;AACA,mBAAmB,2EAAmF;AACtG;AACA,qBAAqB,6EAAqF;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -12,7 +12,7 @@ let HInputCopyButton = class HInputCopyButton extends PhoenixLightLitElement {
|
|
|
12
12
|
this.copyValue = '';
|
|
13
13
|
this._$inputToCopy = null;
|
|
14
14
|
this._handleCopyToClipboard = async () => {
|
|
15
|
-
if (!this._$inputToCopy)
|
|
15
|
+
if (!this._$inputToCopy || this.hasBeenCopied)
|
|
16
16
|
return;
|
|
17
17
|
this._$inputToCopy.select();
|
|
18
18
|
this.copyValue = this._$inputToCopy.value;
|
|
@@ -9,7 +9,6 @@ export declare class HSearchProductContent extends PhoenixLightLitElement {
|
|
|
9
9
|
translations: Record<string, string>;
|
|
10
10
|
getProductRateHtml: (productRate: number) => TemplateResult;
|
|
11
11
|
private _getShortenProductName;
|
|
12
|
-
private extractNumber;
|
|
13
12
|
private _getPercentPromotion;
|
|
14
13
|
protected render(): TemplateResult;
|
|
15
14
|
}
|
|
@@ -29,17 +29,8 @@ let HSearchProductContent = class HSearchProductContent extends PhoenixLightLitE
|
|
|
29
29
|
? productName.substring(0, SEARCH_CONFIGURATION.maxCharactersInProductName) + '...'
|
|
30
30
|
: productName;
|
|
31
31
|
}
|
|
32
|
-
extractNumber(text) {
|
|
33
|
-
const numberArray = text
|
|
34
|
-
.split(' ')
|
|
35
|
-
.map((word) => parseFloat(word))
|
|
36
|
-
.filter((number) => !isNaN(number));
|
|
37
|
-
return numberArray[0];
|
|
38
|
-
}
|
|
39
32
|
_getPercentPromotion(prices) {
|
|
40
|
-
|
|
41
|
-
const promotionPrice = this.extractNumber(prices.promotion.text);
|
|
42
|
-
return `-${Math.round(((regularPrice - promotionPrice) / regularPrice) * 100)}%`;
|
|
33
|
+
return `-${Math.round(((prices.basic.float - prices.promotion.float) / prices.basic.float) * 100)}%`;
|
|
43
34
|
}
|
|
44
35
|
render() {
|
|
45
36
|
return html `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA,0BAA0B,2EAAmF;AAC7G;AACA,4BAA4B,6EAAqF;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA,0BAA0B,2EAAmF;AAC7G;AACA,4BAA4B,6EAAqF;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|