jeawin-astro 3.0.94 → 3.0.95
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
|
@@ -58,7 +58,13 @@ if(num > 1){
|
|
|
58
58
|
}
|
|
59
59
|
---
|
|
60
60
|
|
|
61
|
-
<custom-detail-images
|
|
61
|
+
<custom-detail-images
|
|
62
|
+
data-nodepics={nodepics}
|
|
63
|
+
data-video={video}
|
|
64
|
+
data-view360={view360}
|
|
65
|
+
data-thumbs_position={thumbs_position}
|
|
66
|
+
data-show_thumbs={show_thumbs}
|
|
67
|
+
>
|
|
62
68
|
<div
|
|
63
69
|
x-data={`{
|
|
64
70
|
isVideoPoppedUp:false,
|
|
@@ -84,65 +90,63 @@ if(num > 1){
|
|
|
84
90
|
<div class:list={["flex flex-col", {"lg:flex-row":thumbs_position=='left'}, "gap-4"]}>
|
|
85
91
|
{
|
|
86
92
|
show_thumbs ? (
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}, "px-5"]}>
|
|
91
|
-
<div class="flex justify-center cursor-pointer absolute left-0 top-1/2 thumbSwiper-prev-btn">
|
|
92
|
-
{thumbs_position == 'left'?<Icon name="fa6-solid:angle-up" class="size-4" /> :<Icon name="fa6-solid:angle-left" class="size-4" />}
|
|
93
|
-
</div>
|
|
94
|
-
<swiper-container
|
|
95
|
-
init="false"
|
|
96
|
-
class="thumbSwiper grid"
|
|
97
|
-
watch-slides-progress="true"
|
|
98
|
-
slides-per-view="5"
|
|
99
|
-
free-mode="true"
|
|
100
|
-
>
|
|
93
|
+
<Fragment>
|
|
94
|
+
<div class:list={["order-2", "relative", {
|
|
95
|
+
"flex flex-row items-center md:order-1 md:w-2/12 md:flex md:flex-col":thumbs_position=='left',
|
|
101
96
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
{
|
|
127
|
-
view360 ? (
|
|
128
|
-
<swiper-slide class="swiper-slide">
|
|
129
|
-
<div class="content-wrapper size-full flex items-center justify-center border border-gray-200 cursor-pointer">
|
|
130
|
-
<img src={view360img.src} alt="360° viewer" />
|
|
131
|
-
</div>
|
|
132
|
-
|
|
133
|
-
</swiper-slide>
|
|
134
|
-
) : null
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
</swiper-container>
|
|
138
|
-
<div class="flex justify-center cursor-pointer absolute right-0 top-1/2 thumbSwiper-next-btn">
|
|
139
|
-
{thumbs_position =='left'?<Icon name="fa6-solid:angle-down" class="size-4" />:<Icon name="fa6-solid:angle-right" class="size-4" />}
|
|
140
|
-
</div>
|
|
141
|
-
</div>
|
|
142
|
-
) : null
|
|
143
|
-
}
|
|
97
|
+
}, "px-5"]}>
|
|
98
|
+
<div class="flex justify-center cursor-pointer absolute left-0 top-1/2 thumbSwiper-prev-btn">
|
|
99
|
+
{thumbs_position == 'left'?<Icon name="fa6-solid:angle-up" class="size-4" /> :<Icon name="fa6-solid:angle-left" class="size-4" />}
|
|
100
|
+
</div>
|
|
101
|
+
<swiper-container
|
|
102
|
+
init="false"
|
|
103
|
+
class="thumbSwiper grid"
|
|
104
|
+
watch-slides-progress="true"
|
|
105
|
+
slides-per-view="5"
|
|
106
|
+
free-mode="true"
|
|
107
|
+
>
|
|
108
|
+
|
|
109
|
+
{
|
|
110
|
+
nodepics.map((pic: any, idx: number) => (
|
|
111
|
+
<swiper-slide lazy={true} class:list={[
|
|
112
|
+
"swiper-slide",
|
|
113
|
+
"hidden"
|
|
114
|
+
]}>
|
|
115
|
+
<div class="content-wrapper size-full flex items-center justify-center border border-gray-200 cursor-pointer">
|
|
116
|
+
<JeawinImage img_html={pic} add_classes="lazyload" />
|
|
117
|
+
</div>
|
|
118
|
+
</swiper-slide>
|
|
119
|
+
))
|
|
120
|
+
}
|
|
144
121
|
|
|
145
|
-
|
|
122
|
+
{
|
|
123
|
+
video && video.poster ? (
|
|
124
|
+
<swiper-slide class="swiper-slide">
|
|
125
|
+
<div class="content-wrapper size-full flex items-center justify-center border border-gray-200 cursor-pointer">
|
|
126
|
+
<Icon name="fa6-solid:file-video" class="size-10" />
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
</swiper-slide>
|
|
130
|
+
) : null
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
{
|
|
134
|
+
view360 ? (
|
|
135
|
+
<swiper-slide class="swiper-slide">
|
|
136
|
+
<div class="content-wrapper size-full flex items-center justify-center border border-gray-200 cursor-pointer">
|
|
137
|
+
<img src={view360img.src} alt="360° viewer" />
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
</swiper-slide>
|
|
141
|
+
) : null
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
</swiper-container>
|
|
145
|
+
<div class="flex justify-center cursor-pointer absolute right-0 top-1/2 thumbSwiper-next-btn">
|
|
146
|
+
{thumbs_position =='left'?<Icon name="fa6-solid:angle-down" class="size-4" />:<Icon name="fa6-solid:angle-right" class="size-4" />}
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
<div class:list={["order-1", {"lg:order-2":thumbs_position=='left'}, "w-full", {"lg:w-10/12":thumbs_position=='left'}]}>
|
|
146
150
|
<!-- main swiper, pass thumbs swiper as CSS selector -->
|
|
147
151
|
<swiper-container
|
|
148
152
|
init="false"
|
|
@@ -252,6 +256,18 @@ if(num > 1){
|
|
|
252
256
|
) : null
|
|
253
257
|
}
|
|
254
258
|
</div>
|
|
259
|
+
</Fragment>
|
|
260
|
+
) : (
|
|
261
|
+
<div class="content-wrapper border border-white p-1 h-full cursor-pointer overflow-hidden flex items-center justify-center relative">
|
|
262
|
+
<div class="relative magnifier w-full h-full">
|
|
263
|
+
<JeawinImage img_html={img_change_attrs(nodepics[0], {style:'width:100%;height:100%;'}, {})} add_classes="lazyload w-full h-full" />
|
|
264
|
+
</div>
|
|
265
|
+
|
|
266
|
+
</div>
|
|
267
|
+
)
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
|
|
255
271
|
</div>
|
|
256
272
|
</div>
|
|
257
273
|
</custom-detail-images>
|
|
@@ -367,7 +383,7 @@ src="/js-cloudimage-360-view/build/js-cloudimage-360-view.min.js" async defer
|
|
|
367
383
|
if(!this.glass) return;
|
|
368
384
|
|
|
369
385
|
this.container.style.overflow = 'visible';
|
|
370
|
-
this.container.style.zIndex = 100000;
|
|
386
|
+
// this.container.style.zIndex = 100000;
|
|
371
387
|
this.container.removeChild(this.glass);
|
|
372
388
|
|
|
373
389
|
this.glass = null;
|
|
@@ -387,79 +403,21 @@ src="/js-cloudimage-360-view/build/js-cloudimage-360-view.min.js" async defer
|
|
|
387
403
|
|
|
388
404
|
const view360 = this.dataset.view360;
|
|
389
405
|
|
|
406
|
+
const show_thumbs = this.dataset.show_thumbs;
|
|
407
|
+
if(show_thumbs == 'true'){
|
|
390
408
|
initSwiper(".mainSwiper", {
|
|
391
|
-
pagination:{
|
|
392
|
-
clickable: true
|
|
393
|
-
}
|
|
394
|
-
});
|
|
395
|
-
initSwiper(".thumbSwiper", {
|
|
396
|
-
direction: this.dataset.thumbs_position=='left' ? "vertical" : 'horizontal',
|
|
397
|
-
navigation: {
|
|
398
|
-
prevEl: '.thumbSwiper-prev-btn',
|
|
399
|
-
nextEl: '.thumbSwiper-next-btn'
|
|
400
|
-
},
|
|
401
|
-
breakpoints: {
|
|
402
|
-
768: {
|
|
403
|
-
direction: this.dataset.thumbs_position == 'left' ? "vertical" : 'horizontal',
|
|
404
|
-
},
|
|
405
|
-
},
|
|
406
|
-
on:{
|
|
407
|
-
init: function(swiper: any){
|
|
408
|
-
// console.log('swiper initialized');
|
|
409
|
-
const swiperEl: any = document.querySelector(".thumbSwiper");
|
|
410
|
-
const slides: any[] = swiperEl.querySelectorAll('swiper-slide');
|
|
411
|
-
|
|
412
|
-
slides.forEach((slide, idx: number) => {
|
|
413
|
-
slide.style.display = 'block';
|
|
414
|
-
});
|
|
415
|
-
swiper.update();
|
|
416
|
-
|
|
417
|
-
const mainSwiperEl: any = document.querySelector('.mainSwiper');
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
slides.forEach((slide, idx: number) => {
|
|
421
|
-
slide.addEventListener('mouseover', _.debounce(function(e: any){
|
|
422
|
-
// console.log('mouseover', idx);
|
|
423
|
-
// console.log(mainSwiperEl.swiper);
|
|
424
|
-
// swiper.slideTo(idx, 1000, false);
|
|
425
|
-
mainSwiperEl.swiper.slideTo(idx, 1000, false);
|
|
426
|
-
},300));
|
|
427
|
-
});
|
|
428
|
-
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
});
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
const thisSelf = this;
|
|
435
|
-
|
|
436
|
-
thisSelf
|
|
437
|
-
.querySelector(".mainSwiper")
|
|
438
|
-
?.addEventListener("swiperslidechange", (e: any) => {
|
|
439
|
-
// console.log("slide changed");
|
|
440
|
-
const [swiper] = e.detail;
|
|
441
|
-
// console.log(swiper.isEnd);
|
|
442
|
-
|
|
443
|
-
this.closeMagnifier();
|
|
444
|
-
|
|
445
|
-
if(view360){
|
|
446
|
-
// @ts-ignore
|
|
447
|
-
window.CI360.init();
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
});
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
document.addEventListener("astro:after-swap", () => {
|
|
454
|
-
initSwiper(".mainSwiper", {
|
|
455
409
|
pagination:{
|
|
456
410
|
clickable: true
|
|
457
411
|
}
|
|
458
412
|
});
|
|
459
413
|
initSwiper(".thumbSwiper", {
|
|
460
|
-
direction: "horizontal
|
|
414
|
+
direction: this.dataset.thumbs_position=='left' ? "vertical" : 'horizontal',
|
|
415
|
+
navigation: {
|
|
416
|
+
prevEl: '.thumbSwiper-prev-btn',
|
|
417
|
+
nextEl: '.thumbSwiper-next-btn'
|
|
418
|
+
},
|
|
461
419
|
breakpoints: {
|
|
462
|
-
|
|
420
|
+
768: {
|
|
463
421
|
direction: this.dataset.thumbs_position == 'left' ? "vertical" : 'horizontal',
|
|
464
422
|
},
|
|
465
423
|
},
|
|
@@ -488,21 +446,32 @@ src="/js-cloudimage-360-view/build/js-cloudimage-360-view.min.js" async defer
|
|
|
488
446
|
|
|
489
447
|
}
|
|
490
448
|
}
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
const thisSelf = this;
|
|
452
|
+
|
|
453
|
+
thisSelf
|
|
454
|
+
.querySelector(".mainSwiper")
|
|
455
|
+
?.addEventListener("swiperslidechange", (e: any) => {
|
|
456
|
+
// console.log("slide changed");
|
|
457
|
+
const [swiper] = e.detail;
|
|
458
|
+
// console.log(swiper.isEnd);
|
|
459
|
+
|
|
460
|
+
this.closeMagnifier();
|
|
461
|
+
|
|
462
|
+
if(view360){
|
|
463
|
+
// @ts-ignore
|
|
464
|
+
window.CI360.init();
|
|
465
|
+
}
|
|
466
|
+
|
|
491
467
|
});
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
468
|
+
}else{
|
|
469
|
+
|
|
470
|
+
}
|
|
471
|
+
|
|
496
472
|
|
|
497
|
-
this.closeMagnifier();
|
|
498
473
|
|
|
499
|
-
if(view360){
|
|
500
|
-
// @ts-ignore
|
|
501
|
-
window.CI360.init();
|
|
502
|
-
}
|
|
503
474
|
|
|
504
|
-
});
|
|
505
|
-
});
|
|
506
475
|
}
|
|
507
476
|
}
|
|
508
477
|
|
|
@@ -343,7 +343,7 @@ src="/js-cloudimage-360-view/build/js-cloudimage-360-view.min.js" async defer
|
|
|
343
343
|
if(!this.glass) return;
|
|
344
344
|
|
|
345
345
|
this.container.style.overflow = 'visible';
|
|
346
|
-
this.container.style.zIndex = 100000;
|
|
346
|
+
// this.container.style.zIndex = 100000;
|
|
347
347
|
this.container.removeChild(this.glass);
|
|
348
348
|
|
|
349
349
|
this.glass = null;
|