@salla.sa/twilight-components 2.11.24 → 2.11.26
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/dist/cjs/salla-button_37.cjs.entry.js +11 -8
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +1 -0
- package/dist/collection/components/salla-slider/salla-slider.js +12 -10
- package/dist/components/salla-file-upload2.js +1 -0
- package/dist/components/salla-slider2.js +10 -8
- package/dist/esm/salla-button_37.entry.js +11 -8
- package/dist/esm-es5/salla-button_37.entry.js +1 -1
- package/dist/twilight/{p-62695b20.system.entry.js → p-187222ed.system.entry.js} +1 -1
- package/dist/twilight/p-1b87ab66.system.js +1 -1
- package/dist/twilight/{p-3976df0c.entry.js → p-a341ed7a.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-slider/salla-slider.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/package.json +4 -4
|
@@ -20853,6 +20853,7 @@ const SallaFileUpload = class {
|
|
|
20853
20853
|
}
|
|
20854
20854
|
getLabel() {
|
|
20855
20855
|
if (this.labelIdle) {
|
|
20856
|
+
//some times we are passing label before translations is loaded, so here we will make sure that all translations are translated
|
|
20856
20857
|
return this.labelIdle
|
|
20857
20858
|
.replace('common.uploader.drag_and_drop', salla.lang.get('common.uploader.drag_and_drop'))
|
|
20858
20859
|
.replace('common.uploader.browse', salla.lang.get('common.uploader.browse'));
|
|
@@ -24739,7 +24740,7 @@ const SallaSwiper = class {
|
|
|
24739
24740
|
this.displayAllTitle = salla.lang.get('blocks.home.display_all');
|
|
24740
24741
|
});
|
|
24741
24742
|
this.hasThumbSlot = !!this.host.querySelector('[slot="thumbs"]');
|
|
24742
|
-
// if (this.enableCallToSlide) {
|
|
24743
|
+
// if (this.enableCallToSlide) {
|
|
24743
24744
|
// salla.event.on('product-options::goToSlide', data => {
|
|
24744
24745
|
// const slideIndex = this.sliderWrapper.querySelector(`[data-img-id="${data}"]`).getAttribute('data-slid-index');
|
|
24745
24746
|
// this.slideTo(parseInt(slideIndex), 300, false);
|
|
@@ -24787,14 +24788,16 @@ const SallaSwiper = class {
|
|
|
24787
24788
|
lazy: true,
|
|
24788
24789
|
on: {
|
|
24789
24790
|
// todo:: find better way for this workaround to show lazyLoad for duplicated slides, for some reason they are loaded but class not added.
|
|
24790
|
-
afterInit: (slider) =>
|
|
24791
|
+
afterInit: (slider) => {
|
|
24791
24792
|
var _a;
|
|
24792
24793
|
(_a = document.lazyLoadInstance) === null || _a === void 0 ? void 0 : _a.update();
|
|
24793
|
-
|
|
24794
|
-
|
|
24795
|
-
|
|
24796
|
-
|
|
24797
|
-
|
|
24794
|
+
this.loop && slider.slides.map(slide => {
|
|
24795
|
+
if (!slide.classList.contains('swiper-slide-duplicate')) {
|
|
24796
|
+
return;
|
|
24797
|
+
}
|
|
24798
|
+
slide.querySelectorAll('img.lazy:not(.loaded)').forEach(img => img.classList.add('loaded'));
|
|
24799
|
+
});
|
|
24800
|
+
},
|
|
24798
24801
|
},
|
|
24799
24802
|
pagination: this.pagination ? {
|
|
24800
24803
|
el: this.host.id ? `#${this.host.id} .swiper-pagination` : '',
|
|
@@ -24814,7 +24817,7 @@ const SallaSwiper = class {
|
|
|
24814
24817
|
releaseOnEdges: this.host.querySelectorAll('.swiper-slide').length > 1 ? false : true
|
|
24815
24818
|
},
|
|
24816
24819
|
pre_defined_config = Object.assign(Object.assign({}, pre_defined_config), (this.pre_defined_config[this.type] || {}));
|
|
24817
|
-
if (this.type == 'thumbs') {
|
|
24820
|
+
if (this.type == 'thumbs' && this.thumbsSliderWrapper) {
|
|
24818
24821
|
for (const slide of this.thumbsSliderWrapper.children) {
|
|
24819
24822
|
//todo:: use `s-slider-slide`
|
|
24820
24823
|
slide.classList.add('swiper-slide');
|
|
@@ -186,6 +186,7 @@ export class SallaFileUpload {
|
|
|
186
186
|
}
|
|
187
187
|
getLabel() {
|
|
188
188
|
if (this.labelIdle) {
|
|
189
|
+
//some times we are passing label before translations is loaded, so here we will make sure that all translations are translated
|
|
189
190
|
return this.labelIdle
|
|
190
191
|
.replace('common.uploader.drag_and_drop', salla.lang.get('common.uploader.drag_and_drop'))
|
|
191
192
|
.replace('common.uploader.browse', salla.lang.get('common.uploader.browse'));
|
|
@@ -270,7 +270,7 @@ export class SallaSwiper {
|
|
|
270
270
|
this.displayAllTitle = salla.lang.get('blocks.home.display_all');
|
|
271
271
|
});
|
|
272
272
|
this.hasThumbSlot = !!this.host.querySelector('[slot="thumbs"]');
|
|
273
|
-
// if (this.enableCallToSlide) {
|
|
273
|
+
// if (this.enableCallToSlide) {
|
|
274
274
|
// salla.event.on('product-options::goToSlide', data => {
|
|
275
275
|
// const slideIndex = this.sliderWrapper.querySelector(`[data-img-id="${data}"]`).getAttribute('data-slid-index');
|
|
276
276
|
// this.slideTo(parseInt(slideIndex), 300, false);
|
|
@@ -318,14 +318,16 @@ export class SallaSwiper {
|
|
|
318
318
|
lazy: true,
|
|
319
319
|
on: {
|
|
320
320
|
// todo:: find better way for this workaround to show lazyLoad for duplicated slides, for some reason they are loaded but class not added.
|
|
321
|
-
afterInit: (slider) =>
|
|
321
|
+
afterInit: (slider) => {
|
|
322
322
|
var _a;
|
|
323
323
|
(_a = document.lazyLoadInstance) === null || _a === void 0 ? void 0 : _a.update();
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
324
|
+
this.loop && slider.slides.map(slide => {
|
|
325
|
+
if (!slide.classList.contains('swiper-slide-duplicate')) {
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
slide.querySelectorAll('img.lazy:not(.loaded)').forEach(img => img.classList.add('loaded'));
|
|
329
|
+
});
|
|
330
|
+
},
|
|
329
331
|
},
|
|
330
332
|
pagination: this.pagination ? {
|
|
331
333
|
el: this.host.id ? `#${this.host.id} .swiper-pagination` : '',
|
|
@@ -345,7 +347,7 @@ export class SallaSwiper {
|
|
|
345
347
|
releaseOnEdges: this.host.querySelectorAll('.swiper-slide').length > 1 ? false : true
|
|
346
348
|
},
|
|
347
349
|
pre_defined_config = Object.assign(Object.assign({}, pre_defined_config), (this.pre_defined_config[this.type] || {}));
|
|
348
|
-
if (this.type == 'thumbs') {
|
|
350
|
+
if (this.type == 'thumbs' && this.thumbsSliderWrapper) {
|
|
349
351
|
for (const slide of this.thumbsSliderWrapper.children) {
|
|
350
352
|
//todo:: use `s-slider-slide`
|
|
351
353
|
slide.classList.add('swiper-slide');
|
|
@@ -961,7 +963,7 @@ export class SallaSwiper {
|
|
|
961
963
|
"composed": true,
|
|
962
964
|
"docs": {
|
|
963
965
|
"tags": [],
|
|
964
|
-
"text": "Event will be fired when user touch and move finger over Swiper and move it
|
|
966
|
+
"text": "Event will be fired when user touch and move finger over Swiper and move it.\nReceives touchmove event as an arguments."
|
|
965
967
|
},
|
|
966
968
|
"complexType": {
|
|
967
969
|
"original": "any",
|
|
@@ -991,7 +993,7 @@ export class SallaSwiper {
|
|
|
991
993
|
"composed": true,
|
|
992
994
|
"docs": {
|
|
993
995
|
"tags": [],
|
|
994
|
-
"text": "Event will be fired when user touch and move finger over Swiper
|
|
996
|
+
"text": "Event will be fired when user touch and move finger over Swiper.\nReceives touchmove event as an arguments."
|
|
995
997
|
},
|
|
996
998
|
"complexType": {
|
|
997
999
|
"original": "any",
|
|
@@ -15287,6 +15287,7 @@ const SallaFileUpload = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
15287
15287
|
}
|
|
15288
15288
|
getLabel() {
|
|
15289
15289
|
if (this.labelIdle) {
|
|
15290
|
+
//some times we are passing label before translations is loaded, so here we will make sure that all translations are translated
|
|
15290
15291
|
return this.labelIdle
|
|
15291
15292
|
.replace('common.uploader.drag_and_drop', salla.lang.get('common.uploader.drag_and_drop'))
|
|
15292
15293
|
.replace('common.uploader.browse', salla.lang.get('common.uploader.browse'));
|
|
@@ -292,7 +292,7 @@ const SallaSwiper = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
292
292
|
this.displayAllTitle = salla.lang.get('blocks.home.display_all');
|
|
293
293
|
});
|
|
294
294
|
this.hasThumbSlot = !!this.host.querySelector('[slot="thumbs"]');
|
|
295
|
-
// if (this.enableCallToSlide) {
|
|
295
|
+
// if (this.enableCallToSlide) {
|
|
296
296
|
// salla.event.on('product-options::goToSlide', data => {
|
|
297
297
|
// const slideIndex = this.sliderWrapper.querySelector(`[data-img-id="${data}"]`).getAttribute('data-slid-index');
|
|
298
298
|
// this.slideTo(parseInt(slideIndex), 300, false);
|
|
@@ -340,14 +340,16 @@ const SallaSwiper = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
340
340
|
lazy: true,
|
|
341
341
|
on: {
|
|
342
342
|
// todo:: find better way for this workaround to show lazyLoad for duplicated slides, for some reason they are loaded but class not added.
|
|
343
|
-
afterInit: (slider) =>
|
|
343
|
+
afterInit: (slider) => {
|
|
344
344
|
var _a;
|
|
345
345
|
(_a = document.lazyLoadInstance) === null || _a === void 0 ? void 0 : _a.update();
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
346
|
+
this.loop && slider.slides.map(slide => {
|
|
347
|
+
if (!slide.classList.contains('swiper-slide-duplicate')) {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
slide.querySelectorAll('img.lazy:not(.loaded)').forEach(img => img.classList.add('loaded'));
|
|
351
|
+
});
|
|
352
|
+
},
|
|
351
353
|
},
|
|
352
354
|
pagination: this.pagination ? {
|
|
353
355
|
el: this.host.id ? `#${this.host.id} .swiper-pagination` : '',
|
|
@@ -367,7 +369,7 @@ const SallaSwiper = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
367
369
|
releaseOnEdges: this.host.querySelectorAll('.swiper-slide').length > 1 ? false : true
|
|
368
370
|
},
|
|
369
371
|
pre_defined_config = Object.assign(Object.assign({}, pre_defined_config), (this.pre_defined_config[this.type] || {}));
|
|
370
|
-
if (this.type == 'thumbs') {
|
|
372
|
+
if (this.type == 'thumbs' && this.thumbsSliderWrapper) {
|
|
371
373
|
for (const slide of this.thumbsSliderWrapper.children) {
|
|
372
374
|
//todo:: use `s-slider-slide`
|
|
373
375
|
slide.classList.add('swiper-slide');
|
|
@@ -20849,6 +20849,7 @@ const SallaFileUpload = class {
|
|
|
20849
20849
|
}
|
|
20850
20850
|
getLabel() {
|
|
20851
20851
|
if (this.labelIdle) {
|
|
20852
|
+
//some times we are passing label before translations is loaded, so here we will make sure that all translations are translated
|
|
20852
20853
|
return this.labelIdle
|
|
20853
20854
|
.replace('common.uploader.drag_and_drop', salla.lang.get('common.uploader.drag_and_drop'))
|
|
20854
20855
|
.replace('common.uploader.browse', salla.lang.get('common.uploader.browse'));
|
|
@@ -24735,7 +24736,7 @@ const SallaSwiper = class {
|
|
|
24735
24736
|
this.displayAllTitle = salla.lang.get('blocks.home.display_all');
|
|
24736
24737
|
});
|
|
24737
24738
|
this.hasThumbSlot = !!this.host.querySelector('[slot="thumbs"]');
|
|
24738
|
-
// if (this.enableCallToSlide) {
|
|
24739
|
+
// if (this.enableCallToSlide) {
|
|
24739
24740
|
// salla.event.on('product-options::goToSlide', data => {
|
|
24740
24741
|
// const slideIndex = this.sliderWrapper.querySelector(`[data-img-id="${data}"]`).getAttribute('data-slid-index');
|
|
24741
24742
|
// this.slideTo(parseInt(slideIndex), 300, false);
|
|
@@ -24783,14 +24784,16 @@ const SallaSwiper = class {
|
|
|
24783
24784
|
lazy: true,
|
|
24784
24785
|
on: {
|
|
24785
24786
|
// todo:: find better way for this workaround to show lazyLoad for duplicated slides, for some reason they are loaded but class not added.
|
|
24786
|
-
afterInit: (slider) =>
|
|
24787
|
+
afterInit: (slider) => {
|
|
24787
24788
|
var _a;
|
|
24788
24789
|
(_a = document.lazyLoadInstance) === null || _a === void 0 ? void 0 : _a.update();
|
|
24789
|
-
|
|
24790
|
-
|
|
24791
|
-
|
|
24792
|
-
|
|
24793
|
-
|
|
24790
|
+
this.loop && slider.slides.map(slide => {
|
|
24791
|
+
if (!slide.classList.contains('swiper-slide-duplicate')) {
|
|
24792
|
+
return;
|
|
24793
|
+
}
|
|
24794
|
+
slide.querySelectorAll('img.lazy:not(.loaded)').forEach(img => img.classList.add('loaded'));
|
|
24795
|
+
});
|
|
24796
|
+
},
|
|
24794
24797
|
},
|
|
24795
24798
|
pagination: this.pagination ? {
|
|
24796
24799
|
el: this.host.id ? `#${this.host.id} .swiper-pagination` : '',
|
|
@@ -24810,7 +24813,7 @@ const SallaSwiper = class {
|
|
|
24810
24813
|
releaseOnEdges: this.host.querySelectorAll('.swiper-slide').length > 1 ? false : true
|
|
24811
24814
|
},
|
|
24812
24815
|
pre_defined_config = Object.assign(Object.assign({}, pre_defined_config), (this.pre_defined_config[this.type] || {}));
|
|
24813
|
-
if (this.type == 'thumbs') {
|
|
24816
|
+
if (this.type == 'thumbs' && this.thumbsSliderWrapper) {
|
|
24814
24817
|
for (const slide of this.thumbsSliderWrapper.children) {
|
|
24815
24818
|
//todo:: use `s-slider-slide`
|
|
24816
24819
|
slide.classList.add('swiper-slide');
|