zz-shopify-components 0.25.1-beta.1 → 0.25.1-beta.3
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/package.json
CHANGED
|
@@ -14,9 +14,16 @@
|
|
|
14
14
|
widths: '3000, 4000, 5000'
|
|
15
15
|
}}
|
|
16
16
|
{% for block in accessories_points %}
|
|
17
|
+
{% assign accessories_point_variant = block.settings.accessories_product.selected_or_first_available_variant %}
|
|
18
|
+
{% for v in block.settings.accessories_product.variants %}
|
|
19
|
+
{% if v.metafields.custom.acc_point.value %}
|
|
20
|
+
{% assign accessories_point_variant = v %}
|
|
21
|
+
{% break %}
|
|
22
|
+
{% endif %}
|
|
23
|
+
{% endfor %}
|
|
17
24
|
{% if block.settings.swiper_index == accessories_points_index %}
|
|
18
25
|
<div
|
|
19
|
-
onclick='window.accessoriesPointClickHandler(event, {{
|
|
26
|
+
onclick='window.accessoriesPointClickHandler(event, {{ accessories_point_variant.id }})'
|
|
20
27
|
data-point-swiper-index='{{ block.settings.swiper_index }}'
|
|
21
28
|
class='product-accessories-point-item tw-absolute tw-rounded-full tw-backdrop-blur-[20px] tw-gap-[12px] tw-flex tw-items-center tw-justify-center tw-bg-[rgba(255,255,255,0.8)] lg:tw-py-[6px] tw-py-[4px] lg:tw-pl-[8px] tw-pl-[4px] tw-pr-[20px] tw-z-50 tw-cursor-pointer'
|
|
22
29
|
style='left: {{ block.settings.point_x }}%; top: {{ block.settings.point_y }}%;'
|
|
@@ -27,7 +34,7 @@
|
|
|
27
34
|
viewBox='0 0 36 36'
|
|
28
35
|
fill='none'
|
|
29
36
|
xmlns='http://www.w3.org/2000/svg'
|
|
30
|
-
class=
|
|
37
|
+
class='tw-block buy-icon tw-w-[36px] tw-h-[36px]'
|
|
31
38
|
>
|
|
32
39
|
<rect width="36" height="36" rx="18" fill="#FC6C0F"/>
|
|
33
40
|
<path d="M8 10H9.51521C10.2098 10 10.8135 10.4769 10.9744 11.1526L11.4143 13M11.4143 13L13.3341 21.0632C13.5486 21.9642 14.3536 22.6 15.2797 22.6H23.786C24.7278 22.6 25.542 21.943 25.7409 21.0225L26.9511 15.4225C27.2204 14.1765 26.2709 13 24.9962 13H11.4143Z" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -43,7 +50,7 @@
|
|
|
43
50
|
viewBox='0 0 30 30'
|
|
44
51
|
fill='none'
|
|
45
52
|
xmlns='http://www.w3.org/2000/svg'
|
|
46
|
-
class=
|
|
53
|
+
class='tw-hidden buy-done-icon tw-w-[36px] tw-h-[36px]'
|
|
47
54
|
>
|
|
48
55
|
<rect width="30" height="30" rx="15" fill="#FC6C0F"/>
|
|
49
56
|
<rect x="1" y="1" width="28" height="28" rx="14" stroke="white" stroke-opacity="0.3" stroke-width="2"/>
|
|
@@ -54,12 +61,12 @@
|
|
|
54
61
|
<div class='lg:tw-text-[16px] tw-text-[12px] tw-leading-[1.2] tw-font-bold'>
|
|
55
62
|
{{
|
|
56
63
|
block.settings.accessories_title
|
|
57
|
-
| default:
|
|
64
|
+
| default: accessories_point_variant.title
|
|
58
65
|
}}
|
|
59
66
|
</div>
|
|
60
67
|
<div class='lg:tw-text-[14px] tw-text-[12px] tw-leading-[1.5] tw-font-medium'>
|
|
61
68
|
{{
|
|
62
|
-
|
|
69
|
+
accessories_point_variant.price
|
|
63
70
|
| money_without_trailing_zeros
|
|
64
71
|
}}
|
|
65
72
|
</div>
|
|
@@ -227,6 +227,9 @@
|
|
|
227
227
|
: '';
|
|
228
228
|
if (!nextValue || nextValue === this.value) return;
|
|
229
229
|
this.value = nextValue;
|
|
230
|
+
if (nextValue === 'video') {
|
|
231
|
+
document.querySelector('product-video-tab').loadVideo();
|
|
232
|
+
}
|
|
230
233
|
}
|
|
231
234
|
_syncActive(value) {
|
|
232
235
|
const normalized = String(value || '');
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<video
|
|
27
27
|
id='product-video-intro-{{ product.id }}'
|
|
28
28
|
data-type='intro'
|
|
29
|
-
src='{{ intro_video.sources[0].url }}'
|
|
29
|
+
data-src='{{ intro_video.sources[0].url }}'
|
|
30
30
|
poster='{{ intro_video.preview_image | image_url: width: 1000 }}'
|
|
31
31
|
controls
|
|
32
32
|
playsinline
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
role='tabpanel'
|
|
45
45
|
aria-labelledby='product-video-tab-livestream-{{ product.id }}'
|
|
46
46
|
>
|
|
47
|
+
<span class='tw-daisy-loading !tw-display-block tw-bg-white tw-absolute tw-top-1/2 tw-left-1/2 tw-translate-x-1/2 tw-translate-y-1/2'></span>
|
|
47
48
|
<fw-storyblock
|
|
48
49
|
channel='firework'
|
|
49
50
|
playlist='{{ livestream_id }}'
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
role='tabpanel'
|
|
60
61
|
aria-labelledby='product-video-tab-livestream-{{ product.id }}'
|
|
61
62
|
data-type='livestream'
|
|
62
|
-
src='{{ livestream_video.sources[0].url }}'
|
|
63
|
+
data-src='{{ livestream_video.sources[0].url }}'
|
|
63
64
|
poster='{{ livestream_video.preview_image | image_url: width: 1000 }}'
|
|
64
65
|
controls
|
|
65
66
|
playsinline
|
|
@@ -197,6 +198,17 @@
|
|
|
197
198
|
return el && (el.tagName === 'VIDEO' || el.tagName === 'AUDIO');
|
|
198
199
|
}
|
|
199
200
|
|
|
201
|
+
loadVideo() {
|
|
202
|
+
this.panels.forEach((panel) => {
|
|
203
|
+
if (this.isMedia(panel)) {
|
|
204
|
+
if (panel.dataset.src) {
|
|
205
|
+
panel.src = panel.dataset.src;
|
|
206
|
+
panel.removeAttribute('data-src');
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
|
|
200
212
|
changeTab(isInitial = false) {
|
|
201
213
|
this.panels.forEach((panel) => {
|
|
202
214
|
const isActive = panel.dataset.type === this.currentTab;
|