@shoper/phoenix_design_system 1.18.38-0 → 1.18.38-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +3 -18
- 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/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 +3 -18
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js.map +1 -1
- package/package.json +1 -1
|
@@ -23,32 +23,17 @@ exports.HSearchProductContent = class HSearchProductContent extends phoenix_ligh
|
|
|
23
23
|
const maxBoundary = score - 0.4;
|
|
24
24
|
const minBoundary = score - 0.81;
|
|
25
25
|
if (productRate >= score || productRate >= maxBoundary) {
|
|
26
|
-
return lit.html ` <h-icon icon-name="icon-star" css-classes=${search_constants.SEARCH_CLASS_NAMES.productIconFilled} noStroke=${true}></h-icon>`;
|
|
26
|
+
return lit.html ` <h-icon icon-name="icon-star" css-classes=${search_constants.SEARCH_CLASS_NAMES.productIconFilled} aria-hidden="true" noStroke=${true}></h-icon>`;
|
|
27
27
|
}
|
|
28
28
|
if (productRate > minBoundary) {
|
|
29
|
-
return
|
|
29
|
+
return lit.html `<h-icon icon-name="icon-half-filled" css-classes="${search_constants.SEARCH_CLASS_NAMES.productIconFilled}" aria-hidden="true" noStroke=${true}></h-icon>`;
|
|
30
30
|
}
|
|
31
|
-
return lit.html ` <h-icon icon-name="icon-star" css-classes=${search_constants.SEARCH_CLASS_NAMES.productIconEmpty} noStroke=${true}></h-icon>`;
|
|
31
|
+
return lit.html ` <h-icon icon-name="icon-star" css-classes=${search_constants.SEARCH_CLASS_NAMES.productIconEmpty} aria-hidden="true" noStroke=${true}></h-icon>`;
|
|
32
32
|
})}
|
|
33
33
|
</div>
|
|
34
34
|
`;
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
_getStarHalfFilled() {
|
|
38
|
-
return lit.html `
|
|
39
|
-
<h-icon>
|
|
40
|
-
<svg slot="content" aria-hidden="true" class="icon icon_no-stroke ${search_constants.SEARCH_CLASS_NAMES.productIconFilled}" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
41
|
-
<path d="M11.1033 3.81663C11.4701 3.07346 12.5299 3.07346 12.8967 3.81663L14.8576 7.78909C15.0031 8.08394 15.2843 8.2884 15.6096 8.33595L19.9962 8.97712C20.8161 9.09696 21.1429 10.1048 20.5493 10.683L17.3768 13.773C17.1409 14.0027 17.0333 14.3339 17.0889 14.6584L17.8374 19.0226C17.9775 19.8396 17.12 20.4626 16.3864 20.0767L12.4655 18.0148C12.1741 17.8615 11.8259 17.8615 11.5345 18.0148L7.61363 20.0767C6.88 20.4626 6.02245 19.8396 6.16257 19.0226L6.91109 14.6584C6.96675 14.3339 6.85908 14.0027 6.62321 13.773L3.45068 10.683C2.85708 10.1048 3.18387 9.09696 4.00378 8.97712L8.39037 8.33595C8.71572 8.2884 8.99691 8.08394 9.14245 7.78909L11.1033 3.81663Z" />
|
|
42
|
-
<mask id="mask0_1656_17170" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24">
|
|
43
|
-
<path d="M11.1033 3.81663C11.4701 3.07346 12.5299 3.07346 12.8967 3.81663L14.8576 7.78909C15.0031 8.08394 15.2843 8.2884 15.6096 8.33595L19.9962 8.97712C20.8161 9.09696 21.1429 10.1048 20.5493 10.683L17.3768 13.773C17.1409 14.0027 17.0333 14.3339 17.0889 14.6584L17.8374 19.0226C17.9775 19.8396 17.12 20.4626 16.3864 20.0767L12.4655 18.0148C12.1741 17.8615 11.8259 17.8615 11.5345 18.0148L7.61363 20.0767C6.88 20.4626 6.02245 19.8396 6.16257 19.0226L6.91109 14.6584C6.96675 14.3339 6.85908 14.0027 6.62321 13.773L3.45068 10.683C2.85708 10.1048 3.18387 9.09696 4.00378 8.97712L8.39037 8.33595C8.71572 8.2884 8.99691 8.08394 9.14245 7.78909L11.1033 3.81663Z" fill="#FFC107"/>
|
|
44
|
-
</mask>
|
|
45
|
-
<g mask="url(#mask0_1656_17170)">
|
|
46
|
-
<rect x="12" y="3" width="9" height="18" fill="#E2E5E9"/>
|
|
47
|
-
</g>
|
|
48
|
-
</svg>
|
|
49
|
-
</h-icon>
|
|
50
|
-
`;
|
|
51
|
-
}
|
|
52
37
|
_getShortenProductName(productName) {
|
|
53
38
|
return productName.length > search_constants.SEARCH_CONFIGURATION.maxCharactersInProductName
|
|
54
39
|
? productName.substring(0, search_constants.SEARCH_CONFIGURATION.maxCharactersInProductName) + '...'
|
|
@@ -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,8DAAkE;AACrF;AACA,qBAAqB,gEAAoE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,8DAAkE;AACrF;AACA,qBAAqB,gEAAoE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -10,7 +10,6 @@ export declare class HSearchProductContent extends PhoenixLightLitElement {
|
|
|
10
10
|
translations: Record<string, string>;
|
|
11
11
|
productAriaLabel?: string;
|
|
12
12
|
getProductRateHtml: (productRate: number) => TemplateResult;
|
|
13
|
-
private _getStarHalfFilled;
|
|
14
13
|
private _getShortenProductName;
|
|
15
14
|
private _getPercentPromotion;
|
|
16
15
|
protected render(): TemplateResult;
|
|
@@ -19,32 +19,17 @@ let HSearchProductContent = class HSearchProductContent extends PhoenixLightLitE
|
|
|
19
19
|
const maxBoundary = score - 0.4;
|
|
20
20
|
const minBoundary = score - 0.81;
|
|
21
21
|
if (productRate >= score || productRate >= maxBoundary) {
|
|
22
|
-
return html ` <h-icon icon-name="icon-star" css-classes=${SEARCH_CLASS_NAMES.productIconFilled} noStroke=${true}></h-icon>`;
|
|
22
|
+
return html ` <h-icon icon-name="icon-star" css-classes=${SEARCH_CLASS_NAMES.productIconFilled} aria-hidden="true" noStroke=${true}></h-icon>`;
|
|
23
23
|
}
|
|
24
24
|
if (productRate > minBoundary) {
|
|
25
|
-
return
|
|
25
|
+
return html `<h-icon icon-name="icon-half-filled" css-classes="${SEARCH_CLASS_NAMES.productIconFilled}" aria-hidden="true" noStroke=${true}></h-icon>`;
|
|
26
26
|
}
|
|
27
|
-
return html ` <h-icon icon-name="icon-star" css-classes=${SEARCH_CLASS_NAMES.productIconEmpty} noStroke=${true}></h-icon>`;
|
|
27
|
+
return html ` <h-icon icon-name="icon-star" css-classes=${SEARCH_CLASS_NAMES.productIconEmpty} aria-hidden="true" noStroke=${true}></h-icon>`;
|
|
28
28
|
})}
|
|
29
29
|
</div>
|
|
30
30
|
`;
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
_getStarHalfFilled() {
|
|
34
|
-
return html `
|
|
35
|
-
<h-icon>
|
|
36
|
-
<svg slot="content" aria-hidden="true" class="icon icon_no-stroke ${SEARCH_CLASS_NAMES.productIconFilled}" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
37
|
-
<path d="M11.1033 3.81663C11.4701 3.07346 12.5299 3.07346 12.8967 3.81663L14.8576 7.78909C15.0031 8.08394 15.2843 8.2884 15.6096 8.33595L19.9962 8.97712C20.8161 9.09696 21.1429 10.1048 20.5493 10.683L17.3768 13.773C17.1409 14.0027 17.0333 14.3339 17.0889 14.6584L17.8374 19.0226C17.9775 19.8396 17.12 20.4626 16.3864 20.0767L12.4655 18.0148C12.1741 17.8615 11.8259 17.8615 11.5345 18.0148L7.61363 20.0767C6.88 20.4626 6.02245 19.8396 6.16257 19.0226L6.91109 14.6584C6.96675 14.3339 6.85908 14.0027 6.62321 13.773L3.45068 10.683C2.85708 10.1048 3.18387 9.09696 4.00378 8.97712L8.39037 8.33595C8.71572 8.2884 8.99691 8.08394 9.14245 7.78909L11.1033 3.81663Z" />
|
|
38
|
-
<mask id="mask0_1656_17170" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24">
|
|
39
|
-
<path d="M11.1033 3.81663C11.4701 3.07346 12.5299 3.07346 12.8967 3.81663L14.8576 7.78909C15.0031 8.08394 15.2843 8.2884 15.6096 8.33595L19.9962 8.97712C20.8161 9.09696 21.1429 10.1048 20.5493 10.683L17.3768 13.773C17.1409 14.0027 17.0333 14.3339 17.0889 14.6584L17.8374 19.0226C17.9775 19.8396 17.12 20.4626 16.3864 20.0767L12.4655 18.0148C12.1741 17.8615 11.8259 17.8615 11.5345 18.0148L7.61363 20.0767C6.88 20.4626 6.02245 19.8396 6.16257 19.0226L6.91109 14.6584C6.96675 14.3339 6.85908 14.0027 6.62321 13.773L3.45068 10.683C2.85708 10.1048 3.18387 9.09696 4.00378 8.97712L8.39037 8.33595C8.71572 8.2884 8.99691 8.08394 9.14245 7.78909L11.1033 3.81663Z" fill="#FFC107"/>
|
|
40
|
-
</mask>
|
|
41
|
-
<g mask="url(#mask0_1656_17170)">
|
|
42
|
-
<rect x="12" y="3" width="9" height="18" fill="#E2E5E9"/>
|
|
43
|
-
</g>
|
|
44
|
-
</svg>
|
|
45
|
-
</h-icon>
|
|
46
|
-
`;
|
|
47
|
-
}
|
|
48
33
|
_getShortenProductName(productName) {
|
|
49
34
|
return productName.length > SEARCH_CONFIGURATION.maxCharactersInProductName
|
|
50
35
|
? productName.substring(0, SEARCH_CONFIGURATION.maxCharactersInProductName) + '...'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA,0BAA0B,8DAAkE;AAC5F;AACA,4BAA4B,gEAAoE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA,0BAA0B,8DAAkE;AAC5F;AACA,4BAA4B,gEAAoE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|