@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
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DENUwtYT.js');
|
|
7
7
|
var anime_es = require('./anime.es-BqW8JHZi.js');
|
|
8
8
|
var specialDiscount = require('./special-discount-OVG_9Kf9.js');
|
|
9
9
|
var check = require('./check-CLRvuniI.js');
|
|
@@ -3544,13 +3544,13 @@ const SallaFileUpload = class {
|
|
|
3544
3544
|
return;
|
|
3545
3545
|
try {
|
|
3546
3546
|
const [FilePondModule, FilePondPluginFileValidateSize, FilePondPluginImageExifOrientation, FilePondPluginImagePreview, FilePondPluginImageEdit, FilePondPluginFileValidateType, FilePondPluginFilePoster] = await Promise.all([
|
|
3547
|
-
Promise.resolve().then(function () { return require('./filepond-
|
|
3548
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-size-
|
|
3549
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-image-exif-orientation-
|
|
3550
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-image-preview-
|
|
3551
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-image-edit-
|
|
3552
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-type-
|
|
3553
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-file-poster-
|
|
3547
|
+
Promise.resolve().then(function () { return require('./filepond-Dn-jnnWy.js'); }).then(function (n) { return n.filepond; }),
|
|
3548
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-size-B85pytvJ.js'); }).then(function (n) { return n.filepondPluginFileValidateSize; }),
|
|
3549
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-image-exif-orientation-Cbkb7_k1.js'); }).then(function (n) { return n.filepondPluginImageExifOrientation; }),
|
|
3550
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-image-preview-CqcNMHtt.js'); }).then(function (n) { return n.filepondPluginImagePreview; }),
|
|
3551
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-image-edit-B3-_-hIs.js'); }).then(function (n) { return n.filepondPluginImageEdit; }),
|
|
3552
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-type-vWh-hrFq.js'); }).then(function (n) { return n.filepondPluginFileValidateType; }),
|
|
3553
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-file-poster-4K4RC5sx.js'); }).then(function (n) { return n.filepondPluginFilePoster; })
|
|
3554
3554
|
]);
|
|
3555
3555
|
this.FilePond = FilePondModule;
|
|
3556
3556
|
// Register plugins
|
|
@@ -6545,9 +6545,9 @@ const SallaMultipleBundleProductDetails = class {
|
|
|
6545
6545
|
});
|
|
6546
6546
|
}
|
|
6547
6547
|
renderAccordionHeader(section, selectedCount) {
|
|
6548
|
-
return (index.h(index.Fragment, null, index.h("h2", { slot: "title" }, section?.name), section?.obligatory_products
|
|
6548
|
+
return (index.h(index.Fragment, null, index.h("h2", { slot: "title" }, section?.name), section?.obligatory_products ? (index.h("span", { slot: "note" }, salla.lang.get('pages.products.obligatory_products', {
|
|
6549
6549
|
count: section?.obligatory_products || 0,
|
|
6550
|
-
}))), index.h("span", { slot: "progress" }, selectedCount, "/", section?.products?.length || 0)));
|
|
6550
|
+
}))) : '', index.h("span", { slot: "progress" }, selectedCount, "/", section?.products?.length || 0)));
|
|
6551
6551
|
}
|
|
6552
6552
|
componentDidLoad() {
|
|
6553
6553
|
// Listen for product selected event from modal
|
|
@@ -6578,10 +6578,10 @@ const SallaMultipleBundleProductDetails = class {
|
|
|
6578
6578
|
}
|
|
6579
6579
|
}
|
|
6580
6580
|
render() {
|
|
6581
|
-
return (index.h(index.Host, { key: '
|
|
6581
|
+
return (index.h(index.Host, { key: 'faef370736cdde4ad6b8d1bfce7a5ae80a807f3c', class: "s-multiple-bundle-product-wrapper" }, index.h("div", { key: '66bfb5f5f5736cd7ea37b9e620079c0ec3399685', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, index$1) => {
|
|
6582
6582
|
const selectedCount = this.selectedProducts[section.id]?.size || 0;
|
|
6583
6583
|
return (index.h("salla-accordion", { key: section.id, collapsed: index$1 === 0 ? false : true }, index.h("salla-accordion-head", null, this.renderAccordionHeader(section, selectedCount)), index.h("salla-accordion-body", null, index.h("salla-multiple-bundle-product-slider", { section: section, sectionIndex: index$1, selectedProducts: this.selectedProducts, onProductSelected: this.handleBundleSliderProductSelected, onProductOptionsSelected: this.handleBundleSliderProductOptionsSelected }))));
|
|
6584
|
-
})), index.h("salla-multiple-bundle-product-options-modal", { key: '
|
|
6584
|
+
})), index.h("salla-multiple-bundle-product-options-modal", { key: 'ea258265b6cf53de022afcaeddf5f7c407706156' })));
|
|
6585
6585
|
}
|
|
6586
6586
|
get host() { return index.getElement(this); }
|
|
6587
6587
|
};
|
|
@@ -7090,15 +7090,18 @@ const SallaMultipleBundleProductSlider = class {
|
|
|
7090
7090
|
if (!checkbox)
|
|
7091
7091
|
return;
|
|
7092
7092
|
if (checkbox) {
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
// Dispatch a change event to trigger form validation/submission
|
|
7096
|
-
const changeEvent = new window.Event('change', { bubbles: true });
|
|
7097
|
-
checkbox.dispatchEvent(changeEvent);
|
|
7098
|
-
if (!checkbox.checked) {
|
|
7099
|
-
this.clearSavedOptionsState(this.section.id, productIndex);
|
|
7093
|
+
const willBeChecked = !checkbox.checked;
|
|
7094
|
+
if (!willBeChecked) {
|
|
7100
7095
|
this.dispatchClearOptionsEvent(product, productIndex);
|
|
7096
|
+
this.clearSavedOptionsState(this.section.id, productIndex);
|
|
7101
7097
|
}
|
|
7098
|
+
// Toggle the checkbox state
|
|
7099
|
+
checkbox.checked = willBeChecked;
|
|
7100
|
+
// Dispatch a change event to trigger form validation/submission
|
|
7101
|
+
requestAnimationFrame(() => {
|
|
7102
|
+
const changeEvent = new window.Event('change', { bubbles: true });
|
|
7103
|
+
checkbox.dispatchEvent(changeEvent);
|
|
7104
|
+
});
|
|
7102
7105
|
}
|
|
7103
7106
|
this.productSelected.emit({
|
|
7104
7107
|
product,
|
|
@@ -7158,9 +7161,9 @@ const SallaMultipleBundleProductSlider = class {
|
|
|
7158
7161
|
return `bundle[${sectionId}][${productIndex}][id]`;
|
|
7159
7162
|
}
|
|
7160
7163
|
render() {
|
|
7161
|
-
return (index.h(index.Host, { key: '
|
|
7164
|
+
return (index.h(index.Host, { key: '0aeceebde05ad98ab11016dda3bd65f118b656dc' }, index.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: {
|
|
7162
7165
|
spaceBetween: 0,
|
|
7163
|
-
} }, index.h("div", { key: '
|
|
7166
|
+
} }, index.h("div", { key: 'b9983965c9ba86120540d6df6bedaaca22ea0cd1', slot: "items" }, this?.section?.products?.map((product, productIndex) => {
|
|
7164
7167
|
const isChecked = this.selectedProducts[this.section.id]?.has(product.id) || false;
|
|
7165
7168
|
const hasSavedOptions = this.savedOptionsByInstance[this.getProductInstanceKey(this.section.id, productIndex)];
|
|
7166
7169
|
const optionsButtonLabel = hasSavedOptions
|
|
@@ -12527,7 +12530,7 @@ const SallaTelInput = class {
|
|
|
12527
12530
|
if (this.TelInput)
|
|
12528
12531
|
return;
|
|
12529
12532
|
try {
|
|
12530
|
-
const telInputModule = await Promise.resolve().then(function () { return require('./index-
|
|
12533
|
+
const telInputModule = await Promise.resolve().then(function () { return require('./index-Z2nWod3c.js'); }).then(function (n) { return n.index; });
|
|
12531
12534
|
this.TelInput = telInputModule.default;
|
|
12532
12535
|
}
|
|
12533
12536
|
catch (error) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DENUwtYT.js');
|
|
7
7
|
var anime_es = require('./anime.es-BqW8JHZi.js');
|
|
8
8
|
|
|
9
9
|
const sallaAdvertisementCss = ":host{display:block}";
|
|
@@ -27,6 +27,10 @@ const SallaAdvertisement = class {
|
|
|
27
27
|
* @returns True if the advertisement is not visible, false otherwise.
|
|
28
28
|
*/
|
|
29
29
|
isNotVisible(advert) {
|
|
30
|
+
const isPreview = salla.config.isDebug() || salla.helpers.isPreview();
|
|
31
|
+
// ? Show advertisement in preview mode
|
|
32
|
+
if (isPreview)
|
|
33
|
+
return false;
|
|
30
34
|
return !!salla.storage.get(`statusAd-${advert.id}`);
|
|
31
35
|
}
|
|
32
36
|
/**
|
|
@@ -75,11 +79,29 @@ const SallaAdvertisement = class {
|
|
|
75
79
|
* Lifecycle method that fetches advertisements before the component is loaded.
|
|
76
80
|
*/
|
|
77
81
|
componentWillLoad() {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
const getData = async () => {
|
|
83
|
+
const isPreview = salla.config.isDebug() || salla.helpers.isPreview();
|
|
84
|
+
// Wait for salla to be ready
|
|
85
|
+
await new Promise(resolve => salla.onReady(resolve));
|
|
86
|
+
// Fetch advertisements based on the current page
|
|
87
|
+
const pageSlug = !isPreview ? this.currentSlug : null;
|
|
88
|
+
const response = await salla.api.advertisement.fetch(pageSlug);
|
|
89
|
+
if (Array.isArray(response.data)) {
|
|
90
|
+
const advertisements = response.data;
|
|
91
|
+
// Show all active advertisements in preview mode
|
|
92
|
+
if (isPreview) {
|
|
93
|
+
this.advertisements = advertisements;
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
this.advertisements = advertisements.filter(ad => !salla.storage.get(`statusAd-${ad.id}`));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
this.advertisements = [];
|
|
101
|
+
}
|
|
102
|
+
return this.advertisements;
|
|
103
|
+
};
|
|
104
|
+
return getData();
|
|
83
105
|
}
|
|
84
106
|
componentDidRender() {
|
|
85
107
|
if ((Array.isArray(this.advertisements) && !this.advertisements.length) || !this.advertisements) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DENUwtYT.js');
|
|
7
7
|
|
|
8
8
|
const sallaInstallmentCss = "salla-installment:empty{display:none}#tabbyPromoWrapper{background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px;border:unset !important;font-weight:500}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--main-text-color);font-size:var(--font-sm);line-height:1.25;padding:20px 20px 20px 115px !important;background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);border:unset !important;font-family:inherit !important;font-weight:500}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper{margin-bottom:20px}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px !important;top:35px !important;margin:0 !important;height:24px !important}.ltr .tamara-product-widget .tamara-logo{right:20px !important;left:auto !important}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}.s-installment-mispay-wrapper,.s-installment-madfu-wrapper,.s-installment-emkan-wrapper,.s-installment-rajehi-wrapper{font-size:14px;text-align:right;padding:20px;gap:42px;line-height:22px;color:rgb(0, 0, 0);min-width:100%;box-sizing:border-box;position:relative;background-color:white;border-radius:10px;margin:15px 0;display:flex;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.s-installment-mispay-wrapper:hover,.s-installment-madfu-wrapper:hover,.s-installment-emkan-wrapper:hover,.s-installment-rajehi-wrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.s-installment-mispay-content,.s-installment-madfu-content,.s-installment-emkan-content,.s-installment-rajehi-content{display:flex;flex-direction:row-reverse;width:100%;justify-content:space-between;align-items:center;gap:1rem}.s-installment-mispay-content-text,.s-installment-madfu-content-text,.s-installment-emkan-content-text,.s-installment-rajehi-content-text{color:var(--main-text-color);font-size:14px;font-weight:500;margin:0 16px 0 0;width:80%;left:14px;text-align:left}.s-installment-mispay-content img,.s-installment-madfu-content img,.s-installment-emkan-content img,.s-installment-rajehi-content img{height:28px;width:70px;display:inline-block;max-height:100%;vertical-align:middle;fill:none;stroke:unset;width:auto}.rtl .s-installment-mispay-content-text,.rtl .s-installment-madfu-content-text,.rtl .s-installment-emkan-content-text,.rtl .s-installment-rajehi-content-text{right:14px;text-align:right;margin:0 0 0 16px}.rtl .s-installment-mispay-content img,.rtl .s-installment-madfu-content img,.rtl .s-installment-emkan-content img,.rtl .s-installment-rajehi-content img{left:14px !important}.ltr .s-installment-mispay-content img,.ltr .s-installment-madfu-content img,.ltr .s-installment-emkan-content img,.ltr .s-installment-rajehi-content img{right:14px !important}.s-installment-rajehi-content img{width:70px !important;height:40px !important}.s-installment-emkan-content img{height:35px !important}";
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DENUwtYT.js');
|
|
7
7
|
var check = require('./check-CLRvuniI.js');
|
|
8
8
|
|
|
9
9
|
var IconStar2 = ` <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DENUwtYT.js');
|
|
7
7
|
|
|
8
8
|
const sallaTooltipCss = ".s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:\"\";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){transform:translateX(-72%)}";
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DENUwtYT.js');
|
|
7
7
|
|
|
8
8
|
const sallaWalletCss = ".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:flex !important;align-items:center !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:flex;flex-direction:column;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:max-content;display:flex;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}";
|
|
9
9
|
|
package/dist/cjs/twilight.cjs.js
CHANGED
|
@@ -29,6 +29,10 @@ export class SallaAdvertisement {
|
|
|
29
29
|
* @returns True if the advertisement is not visible, false otherwise.
|
|
30
30
|
*/
|
|
31
31
|
isNotVisible(advert) {
|
|
32
|
+
const isPreview = salla.config.isDebug() || salla.helpers.isPreview();
|
|
33
|
+
// ? Show advertisement in preview mode
|
|
34
|
+
if (isPreview)
|
|
35
|
+
return false;
|
|
32
36
|
return !!salla.storage.get(`statusAd-${advert.id}`);
|
|
33
37
|
}
|
|
34
38
|
/**
|
|
@@ -77,11 +81,29 @@ export class SallaAdvertisement {
|
|
|
77
81
|
* Lifecycle method that fetches advertisements before the component is loaded.
|
|
78
82
|
*/
|
|
79
83
|
componentWillLoad() {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
const getData = async () => {
|
|
85
|
+
const isPreview = salla.config.isDebug() || salla.helpers.isPreview();
|
|
86
|
+
// Wait for salla to be ready
|
|
87
|
+
await new Promise(resolve => salla.onReady(resolve));
|
|
88
|
+
// Fetch advertisements based on the current page
|
|
89
|
+
const pageSlug = !isPreview ? this.currentSlug : null;
|
|
90
|
+
const response = await salla.api.advertisement.fetch(pageSlug);
|
|
91
|
+
if (Array.isArray(response.data)) {
|
|
92
|
+
const advertisements = response.data;
|
|
93
|
+
// Show all active advertisements in preview mode
|
|
94
|
+
if (isPreview) {
|
|
95
|
+
this.advertisements = advertisements;
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
this.advertisements = advertisements.filter(ad => !salla.storage.get(`statusAd-${ad.id}`));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
this.advertisements = [];
|
|
103
|
+
}
|
|
104
|
+
return this.advertisements;
|
|
105
|
+
};
|
|
106
|
+
return getData();
|
|
85
107
|
}
|
|
86
108
|
componentDidRender() {
|
|
87
109
|
if ((Array.isArray(this.advertisements) && !this.advertisements.length) || !this.advertisements) {
|
|
@@ -123,9 +123,9 @@ export class SallaMultipleBundleProductDetails {
|
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
renderAccordionHeader(section, selectedCount) {
|
|
126
|
-
return (h(Fragment, null, h("h2", { slot: "title" }, section?.name), section?.obligatory_products
|
|
126
|
+
return (h(Fragment, null, h("h2", { slot: "title" }, section?.name), section?.obligatory_products ? (h("span", { slot: "note" }, salla.lang.get('pages.products.obligatory_products', {
|
|
127
127
|
count: section?.obligatory_products || 0,
|
|
128
|
-
}))), h("span", { slot: "progress" }, selectedCount, "/", section?.products?.length || 0)));
|
|
128
|
+
}))) : '', h("span", { slot: "progress" }, selectedCount, "/", section?.products?.length || 0)));
|
|
129
129
|
}
|
|
130
130
|
componentDidLoad() {
|
|
131
131
|
// Listen for product selected event from modal
|
|
@@ -156,10 +156,10 @@ export class SallaMultipleBundleProductDetails {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
render() {
|
|
159
|
-
return (h(Host, { key: '
|
|
159
|
+
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) => {
|
|
160
160
|
const selectedCount = this.selectedProducts[section.id]?.size || 0;
|
|
161
161
|
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 }))));
|
|
162
|
-
})), h("salla-multiple-bundle-product-options-modal", { key: '
|
|
162
|
+
})), h("salla-multiple-bundle-product-options-modal", { key: 'ea258265b6cf53de022afcaeddf5f7c407706156' })));
|
|
163
163
|
}
|
|
164
164
|
static get is() { return "salla-multiple-bundle-product-details"; }
|
|
165
165
|
static get originalStyleUrls() {
|