@salla.sa/twilight-components 2.11.18 → 2.11.20
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/{app-globals-f49969d2.js → app-globals-f18513f9.js} +39 -2232
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-button_37.cjs.entry.js +7 -2
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +3 -0
- package/dist/collection/components/salla-slider/salla-slider.js +4 -2
- package/dist/components/index.js +39 -2232
- package/dist/components/salla-file-upload2.js +3 -0
- package/dist/components/salla-slider2.js +4 -2
- package/dist/esm/{app-globals-fc703675.js → app-globals-9127a6ae.js} +39 -2232
- package/dist/esm/loader.js +1 -1
- package/dist/esm/salla-button_37.entry.js +7 -2
- package/dist/esm/twilight.js +1 -1
- package/dist/esm-es5/app-globals-9127a6ae.js +24 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-button_37.entry.js +4 -4
- package/dist/esm-es5/twilight.js +1 -1
- package/dist/twilight/{p-c71ec183.system.js → p-5fc3f873.system.js} +1 -1
- package/dist/twilight/p-7182281b.entry.js +36 -0
- package/dist/twilight/p-a6b1a735.js +24 -0
- package/dist/twilight/{p-b34f9dfa.system.entry.js → p-c46d9ddb.system.entry.js} +5 -5
- package/dist/twilight/p-dddd2139.system.js +24 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/dist/types/components/salla-slider/salla-slider.d.ts +1 -0
- package/package.json +4 -4
- package/dist/esm-es5/app-globals-fc703675.js +0 -30
- package/dist/twilight/p-20a603e8.entry.js +0 -36
- package/dist/twilight/p-83516eab.js +0 -24
- package/dist/twilight/p-a2bd5187.system.js +0 -30
|
@@ -15219,6 +15219,7 @@ const SallaFileUpload = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
15219
15219
|
this.instantUpload = true;
|
|
15220
15220
|
}
|
|
15221
15221
|
if (!this.url && this.profileImage) {
|
|
15222
|
+
this.accept = 'image/png,image/jpeg,image/jpg';
|
|
15222
15223
|
this.url = salla.url.api('profile/update');
|
|
15223
15224
|
this.instantUpload = true;
|
|
15224
15225
|
this.host.hasAttribute('name') || (this.name = 'avatar');
|
|
@@ -15249,7 +15250,9 @@ const SallaFileUpload = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
15249
15250
|
addedHandler(error, file) {
|
|
15250
15251
|
this.added.emit({ error: error, file: file });
|
|
15251
15252
|
//if the file passed on initiate will not have type
|
|
15253
|
+
this.host.querySelector('.filepond--root').classList.remove('s-file-upload-has-error');
|
|
15252
15254
|
if (error || !file.file.type) {
|
|
15255
|
+
this.host.querySelector('.filepond--root').classList.add('s-file-upload-has-error');
|
|
15253
15256
|
return;
|
|
15254
15257
|
}
|
|
15255
15258
|
let container = new DataTransfer;
|
|
@@ -130,6 +130,7 @@ const SallaSwiper = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
130
130
|
this.isEnd = false;
|
|
131
131
|
this.isBeginning = true;
|
|
132
132
|
this.isRTL = document.documentElement.dir === 'rtl';
|
|
133
|
+
this.hasThumbSlot = false;
|
|
133
134
|
this.pre_defined_config = {
|
|
134
135
|
carousel: {
|
|
135
136
|
speed: 300,
|
|
@@ -290,6 +291,7 @@ const SallaSwiper = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
290
291
|
salla.lang.onLoaded(() => {
|
|
291
292
|
this.displayAllTitle = salla.lang.get('blocks.home.display_all');
|
|
292
293
|
});
|
|
294
|
+
this.hasThumbSlot = !!this.host.querySelector('[slot="thumbs"]');
|
|
293
295
|
// if (this.enableCallToSlide) {
|
|
294
296
|
// salla.event.on('product-options::goToSlide', data => {
|
|
295
297
|
// const slideIndex = this.sliderWrapper.querySelector(`[data-img-id="${data}"]`).getAttribute('data-slid-index');
|
|
@@ -446,14 +448,14 @@ const SallaSwiper = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
446
448
|
: '', this.showControls ?
|
|
447
449
|
h("div", { class: "s-slider-block__title-nav", dir: "rtl" }, h("button", { "aria-label": "Previous Slide", class: "s-slider-prev s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? KeyboardArrowRightIcon : ArrowLeftIcon })), h("button", { "aria-label": "Next Slide", class: "s-slider-next s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? ArrowLeftIcon : KeyboardArrowRightIcon })))
|
|
448
450
|
: ''))
|
|
449
|
-
: '', h("div", { class: "swiper s-slider-container", ref: el => this.sliderContainer = el, dir: this.vertical ? "ltr" : '' }, h("slot", null), h("div", { class: "swiper-wrapper s-slider-swiper-wrapper", ref: el => this.sliderWrapper = el }, h("slot", { name: 'items' })), this.pagination ? h("div", { class: "swiper-pagination" }) : ''), this.type == 'thumbs' ? h("div", { class: "s-slider-thumbs" }, h("div", { class: "swiper s-slider-thumbs-container", dir: this.verticalThumbs ? "ltr" : '', ref: el => this.thumbsSliderContainer = el }, h("div", { class: "s-slider-swiper-wrapper swiper-wrapper", ref: el => this.thumbsSliderWrapper = el }, h("slot", { name: "thumbs" })), this.showThumbsControls ?
|
|
451
|
+
: '', h("div", { class: "swiper s-slider-container", ref: el => this.sliderContainer = el, dir: this.vertical ? "ltr" : '' }, h("slot", null), h("div", { class: "swiper-wrapper s-slider-swiper-wrapper", ref: el => this.sliderWrapper = el }, h("slot", { name: 'items' })), this.pagination ? h("div", { class: "swiper-pagination" }) : ''), this.type == 'thumbs' && this.hasThumbSlot ? h("div", { class: "s-slider-thumbs" }, h("div", { class: "swiper s-slider-thumbs-container", dir: this.verticalThumbs ? "ltr" : '', ref: el => this.thumbsSliderContainer = el }, h("div", { class: "s-slider-swiper-wrapper swiper-wrapper", ref: el => this.thumbsSliderWrapper = el }, h("slot", { name: "thumbs" })), this.showThumbsControls ?
|
|
450
452
|
h("div", { class: "s-slider-thumbs-nav", dir: "rtl" }, h("button", { "aria-label": "Previous Slide", class: "s-slider-thumbs-prev s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? KeyboardArrowRightIcon : ArrowLeftIcon })), h("button", { "aria-label": "Next Slide", class: "s-slider-thumbs-next s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? ArrowLeftIcon : KeyboardArrowRightIcon })))
|
|
451
453
|
: '')) : ''));
|
|
452
454
|
}
|
|
453
455
|
componentDidLoad() {
|
|
454
456
|
let itemsSlot = this.sliderWrapper.querySelector('div[slot="items"]');
|
|
455
457
|
!!itemsSlot ? itemsSlot.replaceWith(...itemsSlot.children) : null;
|
|
456
|
-
if (this.type == 'thumbs') {
|
|
458
|
+
if (this.type == 'thumbs' && this.hasThumbSlot) {
|
|
457
459
|
let thumbsSlot = this.thumbsSliderWrapper.querySelector('div[slot="thumbs"]');
|
|
458
460
|
!!thumbsSlot ? thumbsSlot.replaceWith(...thumbsSlot.children) : null;
|
|
459
461
|
}
|