@salla.sa/twilight-components 2.14.297 → 2.14.298
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/{filepond-B40UxVrp.js → filepond-Dn-jnnWy.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-BJ2is-CR.js → filepond-plugin-file-poster-4K4RC5sx.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-jaoaOCNL.js → filepond-plugin-file-validate-size-B85pytvJ.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-CjxCZWaY.js → filepond-plugin-file-validate-type-vWh-hrFq.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-JEKYuBL0.js → filepond-plugin-image-edit-B3-_-hIs.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-DmK-aAfe.js → filepond-plugin-image-exif-orientation-Cbkb7_k1.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-BZxhd7ci.js → filepond-plugin-image-preview-CqcNMHtt.js} +1 -1
- package/dist/cjs/{index-Bc1Blm9E.js → index-DENUwtYT.js} +2 -2
- package/dist/cjs/{index-CYgngxgk.js → index-Z2nWod3c.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-accordion_62.cjs.entry.js +25 -22
- package/dist/cjs/salla-advertisement.cjs.entry.js +28 -6
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/collection/components/salla-advertisement/salla-advertisement.js +27 -5
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +4 -4
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +12 -9
- package/dist/components/index.js +2 -2
- package/dist/components/salla-advertisement.js +27 -5
- package/dist/components/salla-multiple-bundle-product-details2.js +4 -4
- package/dist/components/salla-multiple-bundle-product-slider2.js +12 -9
- package/dist/esm/{filepond-plugin-file-poster-CYvspSki.js → filepond-plugin-file-poster-CAkqJrqM.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-Cf09KKtA.js → filepond-plugin-file-validate-size-lHUJVKW0.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-ByZikBAG.js → filepond-plugin-file-validate-type-FHDAVW2X.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DbT6_H2k.js → filepond-plugin-image-edit-drdbdxxE.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BhEk_QOu.js → filepond-plugin-image-exif-orientation-Kqs0PJBo.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-Bsa9hzKo.js → filepond-plugin-image-preview-BZGs88rC.js} +1 -1
- package/dist/esm/{filepond-DjIxwPi0.js → filepond-q8kfR-qI.js} +1 -1
- package/dist/esm/{index-D8Ikl-5X.js → index-Bh2SK07N.js} +2 -2
- package/dist/esm/{index-CYhDRQ7q.js → index-CPlWMNOm.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-accordion_62.entry.js +25 -22
- package/dist/esm/salla-advertisement.entry.js +28 -6
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-review-card.entry.js +1 -1
- package/dist/esm/salla-reviews-page.entry.js +1 -1
- package/dist/esm/salla-reviews.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/twilight.js +2 -2
- package/dist/twilight/{p-f0267809.entry.js → p-0d04ca56.entry.js} +1 -1
- package/dist/twilight/{p-407a5e84.entry.js → p-11d325ba.entry.js} +1 -1
- package/dist/twilight/{p-87c26055.entry.js → p-1863db37.entry.js} +1 -1
- package/dist/twilight/{p-60a1cceb.entry.js → p-3f62e05b.entry.js} +1 -1
- package/dist/twilight/{p-ade5c1b4.entry.js → p-4c74e526.entry.js} +1 -1
- package/dist/twilight/{p-c0804853.entry.js → p-4df42ff8.entry.js} +1 -1
- package/dist/twilight/{p-e7b610b8.entry.js → p-5460b611.entry.js} +2 -2
- package/dist/twilight/{p-f8beff97.entry.js → p-5789243f.entry.js} +1 -1
- package/dist/twilight/{p-067eafaf.entry.js → p-5981c13b.entry.js} +1 -1
- package/dist/twilight/{p-199025a7.entry.js → p-5f46651c.entry.js} +1 -1
- package/dist/twilight/{p-9bb74d00.entry.js → p-5f815dc4.entry.js} +1 -1
- package/dist/twilight/{p-03907a0b.entry.js → p-62fd72e0.entry.js} +1 -1
- package/dist/twilight/{p-8713ed50.entry.js → p-6891ae55.entry.js} +1 -1
- package/dist/twilight/{p-e82e0803.entry.js → p-7d3b2c8d.entry.js} +1 -1
- package/dist/twilight/{p-3fe694f7.entry.js → p-842debd3.entry.js} +1 -1
- package/dist/twilight/{p-747b3306.entry.js → p-85d168c9.entry.js} +1 -1
- package/dist/twilight/{p-62b33ee4.entry.js → p-8d246fcd.entry.js} +1 -1
- package/dist/twilight/{p-37249106.entry.js → p-8f481f80.entry.js} +1 -1
- package/dist/twilight/{p-243e9c31.entry.js → p-99b49b76.entry.js} +1 -1
- package/dist/twilight/{p-ecdb32fb.entry.js → p-9d46ba91.entry.js} +1 -1
- package/dist/twilight/{p-DQJu53PU.js → p-B0jU8m7y.js} +1 -1
- package/dist/twilight/{p-CYIyfWLw.js → p-BLPRGu3L.js} +1 -1
- package/dist/twilight/{p-CFX5Won9.js → p-BcA-Dpxf.js} +1 -1
- package/dist/twilight/{p-D8Ikl-5X.js → p-Bh2SK07N.js} +1 -1
- package/dist/twilight/{p-BdPzpmIq.js → p-CtJEHiDh.js} +1 -1
- package/dist/twilight/{p-BENXSP8S.js → p-DFYs0E0K.js} +1 -1
- package/dist/twilight/{p-D7xuopBR.js → p-DykGR1vx.js} +1 -1
- package/dist/twilight/{p-CdhBe5Fz.js → p-HMoEZhqa.js} +1 -1
- package/dist/twilight/{p-60aa330e.entry.js → p-af92eed9.entry.js} +1 -1
- package/dist/twilight/{p-5fe10b3f.entry.js → p-b2548a59.entry.js} +1 -1
- package/dist/twilight/{p-66ccff79.entry.js → p-b2ab5fcc.entry.js} +1 -1
- package/dist/twilight/{p-26c2b559.entry.js → p-b4127acc.entry.js} +1 -1
- package/dist/twilight/{p-6781caef.entry.js → p-c31e0731.entry.js} +1 -1
- package/dist/twilight/{p-28eae4bb.entry.js → p-c69d87e4.entry.js} +1 -1
- package/dist/twilight/{p-3f2a0489.entry.js → p-ccfd9c1e.entry.js} +1 -1
- package/dist/twilight/{p-a608994f.entry.js → p-cef92263.entry.js} +1 -1
- package/dist/twilight/p-d6c99665.entry.js +4 -0
- package/dist/twilight/{p-f30f7e03.entry.js → p-dbce8093.entry.js} +1 -1
- package/dist/twilight/{p-00042305.entry.js → p-de903389.entry.js} +1 -1
- package/dist/twilight/{p-3d7b61c6.entry.js → p-e23f38dc.entry.js} +1 -1
- package/dist/twilight/{p-dded0945.entry.js → p-e584c46f.entry.js} +1 -1
- package/dist/twilight/{p-4713b2c5.entry.js → p-ecddf6ff.entry.js} +1 -1
- package/dist/twilight/{p-fl5mSXGV.js → p-sK70mswA.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-advertisement/salla-advertisement.d.ts +1 -1
- package/package.json +5 -5
- package/dist/twilight/p-2a59b701.entry.js +0 -4
|
@@ -26,6 +26,10 @@ const SallaAdvertisement$1 = /*@__PURE__*/ proxyCustomElement(class SallaAdverti
|
|
|
26
26
|
* @returns True if the advertisement is not visible, false otherwise.
|
|
27
27
|
*/
|
|
28
28
|
isNotVisible(advert) {
|
|
29
|
+
const isPreview = salla.config.isDebug() || salla.helpers.isPreview();
|
|
30
|
+
// ? Show advertisement in preview mode
|
|
31
|
+
if (isPreview)
|
|
32
|
+
return false;
|
|
29
33
|
return !!salla.storage.get(`statusAd-${advert.id}`);
|
|
30
34
|
}
|
|
31
35
|
/**
|
|
@@ -74,11 +78,29 @@ const SallaAdvertisement$1 = /*@__PURE__*/ proxyCustomElement(class SallaAdverti
|
|
|
74
78
|
* Lifecycle method that fetches advertisements before the component is loaded.
|
|
75
79
|
*/
|
|
76
80
|
componentWillLoad() {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
const getData = async () => {
|
|
82
|
+
const isPreview = salla.config.isDebug() || salla.helpers.isPreview();
|
|
83
|
+
// Wait for salla to be ready
|
|
84
|
+
await new Promise(resolve => salla.onReady(resolve));
|
|
85
|
+
// Fetch advertisements based on the current page
|
|
86
|
+
const pageSlug = !isPreview ? this.currentSlug : null;
|
|
87
|
+
const response = await salla.api.advertisement.fetch(pageSlug);
|
|
88
|
+
if (Array.isArray(response.data)) {
|
|
89
|
+
const advertisements = response.data;
|
|
90
|
+
// Show all active advertisements in preview mode
|
|
91
|
+
if (isPreview) {
|
|
92
|
+
this.advertisements = advertisements;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
this.advertisements = advertisements.filter(ad => !salla.storage.get(`statusAd-${ad.id}`));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
this.advertisements = [];
|
|
100
|
+
}
|
|
101
|
+
return this.advertisements;
|
|
102
|
+
};
|
|
103
|
+
return getData();
|
|
82
104
|
}
|
|
83
105
|
componentDidRender() {
|
|
84
106
|
if ((Array.isArray(this.advertisements) && !this.advertisements.length) || !this.advertisements) {
|
|
@@ -146,9 +146,9 @@ const SallaMultipleBundleProductDetails = /*@__PURE__*/ proxyCustomElement(class
|
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
renderAccordionHeader(section, selectedCount) {
|
|
149
|
-
return (h(Fragment, null, h("h2", { slot: "title" }, section?.name), section?.obligatory_products
|
|
149
|
+
return (h(Fragment, null, h("h2", { slot: "title" }, section?.name), section?.obligatory_products ? (h("span", { slot: "note" }, salla.lang.get('pages.products.obligatory_products', {
|
|
150
150
|
count: section?.obligatory_products || 0,
|
|
151
|
-
}))), h("span", { slot: "progress" }, selectedCount, "/", section?.products?.length || 0)));
|
|
151
|
+
}))) : '', h("span", { slot: "progress" }, selectedCount, "/", section?.products?.length || 0)));
|
|
152
152
|
}
|
|
153
153
|
componentDidLoad() {
|
|
154
154
|
// Listen for product selected event from modal
|
|
@@ -179,10 +179,10 @@ const SallaMultipleBundleProductDetails = /*@__PURE__*/ proxyCustomElement(class
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
render() {
|
|
182
|
-
return (h(Host, { key: '
|
|
182
|
+
return (h(Host, { key: 'faef370736cdde4ad6b8d1bfce7a5ae80a807f3c', class: "s-multiple-bundle-product-wrapper" }, h("div", { key: '66bfb5f5f5736cd7ea37b9e620079c0ec3399685', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, index) => {
|
|
183
183
|
const selectedCount = this.selectedProducts[section.id]?.size || 0;
|
|
184
184
|
return (h("salla-accordion", { key: section.id, collapsed: index === 0 ? false : true }, h("salla-accordion-head", null, this.renderAccordionHeader(section, selectedCount)), h("salla-accordion-body", null, h("salla-multiple-bundle-product-slider", { section: section, sectionIndex: index, selectedProducts: this.selectedProducts, onProductSelected: this.handleBundleSliderProductSelected, onProductOptionsSelected: this.handleBundleSliderProductOptionsSelected }))));
|
|
185
|
-
})), h("salla-multiple-bundle-product-options-modal", { key: '
|
|
185
|
+
})), h("salla-multiple-bundle-product-options-modal", { key: 'ea258265b6cf53de022afcaeddf5f7c407706156' })));
|
|
186
186
|
}
|
|
187
187
|
get host() { return this; }
|
|
188
188
|
static get style() { return sallaMultipleBundleProductDetailsCss; }
|
|
@@ -22,15 +22,18 @@ const SallaMultipleBundleProductSlider = /*@__PURE__*/ proxyCustomElement(class
|
|
|
22
22
|
if (!checkbox)
|
|
23
23
|
return;
|
|
24
24
|
if (checkbox) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// Dispatch a change event to trigger form validation/submission
|
|
28
|
-
const changeEvent = new window.Event('change', { bubbles: true });
|
|
29
|
-
checkbox.dispatchEvent(changeEvent);
|
|
30
|
-
if (!checkbox.checked) {
|
|
31
|
-
this.clearSavedOptionsState(this.section.id, productIndex);
|
|
25
|
+
const willBeChecked = !checkbox.checked;
|
|
26
|
+
if (!willBeChecked) {
|
|
32
27
|
this.dispatchClearOptionsEvent(product, productIndex);
|
|
28
|
+
this.clearSavedOptionsState(this.section.id, productIndex);
|
|
33
29
|
}
|
|
30
|
+
// Toggle the checkbox state
|
|
31
|
+
checkbox.checked = willBeChecked;
|
|
32
|
+
// Dispatch a change event to trigger form validation/submission
|
|
33
|
+
requestAnimationFrame(() => {
|
|
34
|
+
const changeEvent = new window.Event('change', { bubbles: true });
|
|
35
|
+
checkbox.dispatchEvent(changeEvent);
|
|
36
|
+
});
|
|
34
37
|
}
|
|
35
38
|
this.productSelected.emit({
|
|
36
39
|
product,
|
|
@@ -90,9 +93,9 @@ const SallaMultipleBundleProductSlider = /*@__PURE__*/ proxyCustomElement(class
|
|
|
90
93
|
return `bundle[${sectionId}][${productIndex}][id]`;
|
|
91
94
|
}
|
|
92
95
|
render() {
|
|
93
|
-
return (h(Host, { key: '
|
|
96
|
+
return (h(Host, { key: '0aeceebde05ad98ab11016dda3bd65f118b656dc' }, h("salla-slider", { key: '7def91aaa69d09caf6c5876b5d3221cc1db386f5', type: "carousel", controlsOuter: false, showControls: false, id: "accordion-multiple-bundle-product", pagination: true, class: "s-multiple-bundle-product-wrapper-slider", sliderConfig: {
|
|
94
97
|
spaceBetween: 0,
|
|
95
|
-
} }, h("div", { key: '
|
|
98
|
+
} }, h("div", { key: 'b9983965c9ba86120540d6df6bedaaca22ea0cd1', slot: "items" }, this?.section?.products?.map((product, productIndex) => {
|
|
96
99
|
const isChecked = this.selectedProducts[this.section.id]?.has(product.id) || false;
|
|
97
100
|
const hasSavedOptions = this.savedOptionsByInstance[this.getProductInstanceKey(this.section.id, productIndex)];
|
|
98
101
|
const optionsButtonLabel = hasSavedOptions
|