@salla.sa/twilight-components 2.14.350 → 2.14.352
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/{Helper-B5NunIdR.js → Helper-DHRnzcFm.js} +14 -0
- package/dist/cjs/{filepond-qUaAgMcd.js → filepond-XtsZ6xtH.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DUgrMVOZ.js → filepond-plugin-file-poster-Bj84Ypvg.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-C14LEY_l.js → filepond-plugin-file-validate-size-aYfb4yYH.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-AbHwQAHY.js → filepond-plugin-file-validate-type-CJsd6rXl.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-5ydXOhOa.js → filepond-plugin-image-edit-DRlBSg36.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-D0oIUOy-.js → filepond-plugin-image-exif-orientation-SY8c6DzI.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Bf_VUYwr.js → filepond-plugin-image-preview-iqhJmUmU.js} +1 -1
- package/dist/cjs/{index-DKEcPhG9.js → index-C7-280f4.js} +1 -1
- package/dist/cjs/{index-BRdJtc1o.js → index-Z-cyrNSM.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-accordion_62.cjs.entry.js +25 -36
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- 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 +2 -2
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-hook.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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/cjs/salla-reviews.cjs.entry.js +2 -2
- 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/cjs/{vanilla-picker-CYHmsxIw.js → vanilla-picker-Dq7F5bE1.js} +1 -1
- package/dist/collection/Helpers/Helper.js +14 -0
- package/dist/collection/components/salla-products-list/salla-products-list.js +9 -22
- package/dist/collection/components/salla-products-slider/salla-products-slider.js +9 -7
- package/dist/components/Helper.js +14 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-products-list2.js +7 -20
- package/dist/components/salla-products-slider2.js +7 -5
- package/dist/esm/{Helper-Bt5Zv9cl.js → Helper-B5RLi6Xo.js} +14 -0
- package/dist/esm/{filepond-DDOVDszb.js → filepond-Dg4ZKM-u.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DK5QZAmf.js → filepond-plugin-file-poster-BUIjdsnA.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-BoUr1T-f.js → filepond-plugin-file-validate-size-DgZMMqmi.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-USfq-Egq.js → filepond-plugin-file-validate-type-DA9tDSFr.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-BzsOppMe.js → filepond-plugin-image-edit-dotdnN4Z.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-D2x3fkHF.js → filepond-plugin-image-exif-orientation-oSI8aLU-.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-CAbtIGaT.js → filepond-plugin-image-preview-DEefQK61.js} +1 -1
- package/dist/esm/{index-unlRcuKr.js → index-B7E8Tmgi.js} +1 -1
- package/dist/esm/{index-CkAdPgup.js → index-D2-TtAhI.js} +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-accordion_62.entry.js +25 -36
- package/dist/esm/salla-advertisement.entry.js +1 -1
- 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 +2 -2
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-hook.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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/esm/salla-reviews.entry.js +2 -2
- 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/esm/{vanilla-picker-7Rdeecyw.js → vanilla-picker-DkUGzUrx.js} +1 -1
- package/dist/twilight/{p-aa32cabd.entry.js → p-01bccbf2.entry.js} +1 -1
- package/dist/twilight/{p-815175b1.entry.js → p-0effc34b.entry.js} +1 -1
- package/dist/twilight/{p-843a8d82.entry.js → p-22d83528.entry.js} +1 -1
- package/dist/twilight/{p-9b1184eb.entry.js → p-2aa0a4e2.entry.js} +1 -1
- package/dist/twilight/{p-478033b6.entry.js → p-30403778.entry.js} +1 -1
- package/dist/twilight/{p-0eb554c0.entry.js → p-3a74b551.entry.js} +1 -1
- package/dist/twilight/{p-6c0dd774.entry.js → p-4a594c06.entry.js} +1 -1
- package/dist/twilight/p-4e416704.entry.js +4 -0
- package/dist/twilight/{p-57bf3aff.entry.js → p-5dbf4cec.entry.js} +1 -1
- package/dist/twilight/{p-c4f190b2.entry.js → p-67c327a8.entry.js} +1 -1
- package/dist/twilight/{p-b6cddbff.entry.js → p-6b0a03f6.entry.js} +1 -1
- package/dist/twilight/{p-a4b3ddc4.entry.js → p-6c2807c8.entry.js} +1 -1
- package/dist/twilight/{p-c5ac1d40.entry.js → p-6ce3f119.entry.js} +1 -1
- package/dist/twilight/{p-b9648b3c.entry.js → p-6d886b96.entry.js} +1 -1
- package/dist/twilight/{p-b8872e5f.entry.js → p-7b3ca138.entry.js} +1 -1
- package/dist/twilight/{p-bd0fda0b.entry.js → p-81df7a2e.entry.js} +1 -1
- package/dist/twilight/{p-7c33b8f3.entry.js → p-8e7fa4a9.entry.js} +1 -1
- package/dist/twilight/{p-0587a19b.entry.js → p-933881d3.entry.js} +1 -1
- package/dist/twilight/{p-4bb743c7.entry.js → p-9b8f5399.entry.js} +1 -1
- package/dist/twilight/{p-affbe255.entry.js → p-9d35196f.entry.js} +1 -1
- package/dist/twilight/{p-1d2131a2.entry.js → p-9fa5ffcf.entry.js} +1 -1
- package/dist/twilight/{p-BY-pqCWB.js → p-B0ba6Gec.js} +2 -2
- package/dist/twilight/{p-BgVF6sgk.js → p-C2bMx7q5.js} +1 -1
- package/dist/twilight/{p-De1xuTRp.js → p-Cmkcwiop.js} +1 -1
- package/dist/twilight/{p-BHSXg2s-.js → p-Czq4p9Qp.js} +1 -1
- package/dist/twilight/{p-CkAdPgup.js → p-D2-TtAhI.js} +1 -1
- package/dist/twilight/{p-DGD3SzSN.js → p-DJ557xys.js} +1 -1
- package/dist/twilight/{p-Ciq2A6DK.js → p-DPqkW1aD.js} +2 -2
- package/dist/twilight/p-DgNC8L6e.js +4 -0
- package/dist/twilight/{p-BXAV6QCo.js → p-DhcC83-2.js} +1 -1
- package/dist/twilight/{p-BCXFmuAu.js → p-_JhF_Kvb.js} +1 -1
- package/dist/twilight/{p-100f7787.entry.js → p-a42d626d.entry.js} +1 -1
- package/dist/twilight/{p-17618bb7.entry.js → p-a858523c.entry.js} +1 -1
- package/dist/twilight/{p-d72fc67d.entry.js → p-b1af2aca.entry.js} +1 -1
- package/dist/twilight/{p-25e36e28.entry.js → p-b208650b.entry.js} +1 -1
- package/dist/twilight/{p-0162ae20.entry.js → p-b9d0212c.entry.js} +1 -1
- package/dist/twilight/{p-8565cac6.entry.js → p-cf66ab4d.entry.js} +1 -1
- package/dist/twilight/{p-50e1eb99.entry.js → p-d4faa0f6.entry.js} +1 -1
- package/dist/twilight/{p-b5b851dc.entry.js → p-db526796.entry.js} +1 -1
- package/dist/twilight/{p-b8e7613a.entry.js → p-e26cc25b.entry.js} +1 -1
- package/dist/twilight/{p-abcf3b2d.entry.js → p-e5c01983.entry.js} +1 -1
- package/dist/twilight/{p-c18da320.entry.js → p-e73c28a8.entry.js} +1 -1
- package/dist/twilight/{p-a61b0f9c.entry.js → p-ed60a726.entry.js} +1 -1
- package/dist/twilight/{p-50098fb9.entry.js → p-f6ffc708.entry.js} +1 -1
- package/dist/twilight/{p-e5dc45dc.entry.js → p-fea62668.entry.js} +1 -1
- package/dist/twilight/{p-DhexS4-2.js → p-q-O0srMP.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/Helpers/Helper.d.ts +2 -0
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +1 -1
- package/dist/types/components/salla-products-slider/salla-products-slider.d.ts +1 -1
- package/dist/types/components.d.ts +4 -4
- package/package.json +5 -5
- package/dist/twilight/p-82f05641.entry.js +0 -4
- package/dist/twilight/p-Dljb4XCt.js +0 -4
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-Z-cyrNSM.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');
|
|
10
|
-
var Helper = require('./Helper-
|
|
10
|
+
var Helper = require('./Helper-DHRnzcFm.js');
|
|
11
11
|
var arrowLeft = require('./arrow-left-xSEmRpp6.js');
|
|
12
12
|
var interfaces = require('./interfaces-CX9-6aLf.js');
|
|
13
13
|
var shoppingBag = require('./shopping-bag-C1gvTVHr.js');
|
|
@@ -1334,7 +1334,7 @@ const SallaColorPicker = class {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
1336
|
initColorPicker() {
|
|
1337
|
-
this.pickerReady = Promise.resolve().then(function () { return require('./vanilla-picker-
|
|
1337
|
+
this.pickerReady = Promise.resolve().then(function () { return require('./vanilla-picker-Dq7F5bE1.js'); }).then(function (n) { return n.vanillaPicker; }).then((mod) => {
|
|
1338
1338
|
const Picker = mod.default;
|
|
1339
1339
|
const picker = new Picker({
|
|
1340
1340
|
parent: this.host,
|
|
@@ -2589,13 +2589,13 @@ const SallaFileUpload = class {
|
|
|
2589
2589
|
return;
|
|
2590
2590
|
try {
|
|
2591
2591
|
const [FilePondModule, FilePondPluginFileValidateSize, FilePondPluginImageExifOrientation, FilePondPluginImagePreview, FilePondPluginImageEdit, FilePondPluginFileValidateType, FilePondPluginFilePoster] = await Promise.all([
|
|
2592
|
-
Promise.resolve().then(function () { return require('./filepond-
|
|
2593
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-size-
|
|
2594
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-image-exif-orientation-
|
|
2595
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-image-preview-
|
|
2596
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-image-edit-
|
|
2597
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-type-
|
|
2598
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-file-poster-
|
|
2592
|
+
Promise.resolve().then(function () { return require('./filepond-XtsZ6xtH.js'); }).then(function (n) { return n.filepond; }),
|
|
2593
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-size-aYfb4yYH.js'); }).then(function (n) { return n.filepondPluginFileValidateSize; }),
|
|
2594
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-image-exif-orientation-SY8c6DzI.js'); }).then(function (n) { return n.filepondPluginImageExifOrientation; }),
|
|
2595
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-image-preview-iqhJmUmU.js'); }).then(function (n) { return n.filepondPluginImagePreview; }),
|
|
2596
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-image-edit-DRlBSg36.js'); }).then(function (n) { return n.filepondPluginImageEdit; }),
|
|
2597
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-type-CJsd6rXl.js'); }).then(function (n) { return n.filepondPluginFileValidateType; }),
|
|
2598
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-file-poster-Bj84Ypvg.js'); }).then(function (n) { return n.filepondPluginFilePoster; })
|
|
2599
2599
|
]);
|
|
2600
2600
|
this.FilePond = FilePondModule;
|
|
2601
2601
|
// Register plugins
|
|
@@ -7866,19 +7866,6 @@ const SallaProductsList = class {
|
|
|
7866
7866
|
//as a request they don't want to let the user to open the product details
|
|
7867
7867
|
//todo:: find a better way to handle this request
|
|
7868
7868
|
this.getSource() === 'landing-page' && (product.url = '');
|
|
7869
|
-
try {
|
|
7870
|
-
// Add source query param to product URL for tracking in Product Viewed event
|
|
7871
|
-
if (this.source && product.url && !product.url.includes('s-product-source=')) {
|
|
7872
|
-
const [urlWithoutFragment, fragment] = product.url.split('#');
|
|
7873
|
-
const separator = urlWithoutFragment.includes('?') ? '&' : '?';
|
|
7874
|
-
const pageSlug = salla.config?.get('page.slug') || 'unknown';
|
|
7875
|
-
const sourceValue = `${pageSlug}.${this.source}`;
|
|
7876
|
-
product.url = `${urlWithoutFragment}${separator}s-product-source=${sourceValue}${fragment ? '#' + fragment : ''}`;
|
|
7877
|
-
}
|
|
7878
|
-
}
|
|
7879
|
-
catch (error) {
|
|
7880
|
-
Salla.log('Error with source');
|
|
7881
|
-
}
|
|
7882
7869
|
const customComponentTag = this.hasCustomComponent ? this.productCardComponent : 'salla-product-card';
|
|
7883
7870
|
const productCard = document.createElement(customComponentTag);
|
|
7884
7871
|
productCard.product = product;
|
|
@@ -7886,15 +7873,15 @@ const SallaProductsList = class {
|
|
|
7886
7873
|
this.applyHorizontalCardStyles(productCard);
|
|
7887
7874
|
// Attach click event listener to save the current products snapshot
|
|
7888
7875
|
productCard.addEventListener('click', (event) => {
|
|
7889
|
-
if (!this.hasInfiniteScroll) {
|
|
7890
|
-
return;
|
|
7891
|
-
}
|
|
7892
7876
|
const target = event.target;
|
|
7893
7877
|
// Check if the clicked element is an anchor or inside an anchor
|
|
7894
7878
|
const anchor = target.closest('a');
|
|
7895
7879
|
if (anchor) {
|
|
7896
|
-
this.
|
|
7897
|
-
|
|
7880
|
+
Helper.Helper.saveProductSource(this.getSource());
|
|
7881
|
+
if (this.hasInfiniteScroll) {
|
|
7882
|
+
this.takeStateSnapshot();
|
|
7883
|
+
sessionStorage.setItem(this.lastViewedProductKey, product.id);
|
|
7884
|
+
}
|
|
7898
7885
|
}
|
|
7899
7886
|
});
|
|
7900
7887
|
return productCard;
|
|
@@ -8224,7 +8211,7 @@ const SallaProductsList = class {
|
|
|
8224
8211
|
}
|
|
8225
8212
|
getInitialData() {
|
|
8226
8213
|
this.loading();
|
|
8227
|
-
return salla.product.api.fetch({ source: this.getSource(), source_value: this.getSourceValue(), limit: this.limit }).then(async (response) => {
|
|
8214
|
+
return salla.product.api.fetch({ source: Helper.Helper.getApiSource(this.getSource()), source_value: this.getSourceValue(), limit: this.limit }).then(async (response) => {
|
|
8228
8215
|
if (!response.data.length) {
|
|
8229
8216
|
this.showPlaceholder = true;
|
|
8230
8217
|
this.placeholderLoader && this.placeholderLoader.remove();
|
|
@@ -8250,7 +8237,7 @@ const SallaProductsList = class {
|
|
|
8250
8237
|
.then(() => {
|
|
8251
8238
|
this.hasCustomComponent = !!customElements.get(this.productCardComponent);
|
|
8252
8239
|
this.sourceValueIsValid = !!(this.getSourceValue() || this.isSourceWithoutValue());
|
|
8253
|
-
this.hasInfiniteScroll = !['json', 'selected', 'related', 'landing-page'].includes(this.getSource()) && !this.limit;
|
|
8240
|
+
this.hasInfiniteScroll = !['json', 'selected', 'related', 'landing-page', 'recently'].includes(this.getSource()) && !this.limit;
|
|
8254
8241
|
let searchParams = new URLSearchParams(window.location.search);
|
|
8255
8242
|
try {
|
|
8256
8243
|
this.sortBy = this.sortBy || searchParams.get('sort') || searchParams.get('by');
|
|
@@ -8469,7 +8456,7 @@ const SallaProductsSlider = class {
|
|
|
8469
8456
|
this.isReady = false;
|
|
8470
8457
|
return;
|
|
8471
8458
|
}
|
|
8472
|
-
return salla.product.api.fetch({ source: this.getSource(), source_value: this.getSourceValue(), limit: this.limit })
|
|
8459
|
+
return salla.product.api.fetch({ source: Helper.Helper.getApiSource(this.getSource()), source_value: this.getSourceValue(), limit: this.limit })
|
|
8473
8460
|
.then(response => Helper.Helper.injectExtraFieldsToResponse(response))
|
|
8474
8461
|
.then(response => {
|
|
8475
8462
|
this.productsData = response.data;
|
|
@@ -8499,18 +8486,20 @@ const SallaProductsSlider = class {
|
|
|
8499
8486
|
getItemHTML(product) {
|
|
8500
8487
|
//as a request they don't want to let the user to open the product details
|
|
8501
8488
|
//todo:: find a better way to handle this request
|
|
8502
|
-
this.getSource() === 'landing-page'
|
|
8489
|
+
const isLandingPage = this.getSource() === 'landing-page';
|
|
8490
|
+
isLandingPage && (product.url = '');
|
|
8491
|
+
const handleClick = isLandingPage ? undefined : () => Helper.Helper.saveProductSource(this.getSource());
|
|
8503
8492
|
if (this.hasCustomComponent && this.productCardComponent.toLowerCase() == 'custom-salla-product-card') {
|
|
8504
|
-
return index.h("div", { class: "s-products-slider-card" }, index.h("custom-salla-product-card", { product: product, source: this.getSource(), "source-value": this.getSourceValue() }));
|
|
8493
|
+
return index.h("div", { class: "s-products-slider-card", onClick: handleClick }, index.h("custom-salla-product-card", { product: product, source: this.getSource(), "source-value": this.getSourceValue() }));
|
|
8505
8494
|
}
|
|
8506
8495
|
if (this.hasCustomComponent) {
|
|
8507
8496
|
const customElem = document.createElement(this.productCardComponent);
|
|
8508
8497
|
customElem.setAttribute('product', JSON.stringify(product));
|
|
8509
8498
|
customElem.setAttribute('source', this.getSource());
|
|
8510
8499
|
customElem.setAttribute('source-value', this.getSourceValue());
|
|
8511
|
-
return index.h("div", { class: "s-products-slider-card", innerHTML: customElem.outerHTML });
|
|
8500
|
+
return index.h("div", { class: "s-products-slider-card", onClick: handleClick, innerHTML: customElem.outerHTML });
|
|
8512
8501
|
}
|
|
8513
|
-
return index.h("div", { class: "s-products-slider-card" }, index.h("salla-product-card", { "show-quantity":
|
|
8502
|
+
return index.h("div", { class: "s-products-slider-card", onClick: handleClick }, index.h("salla-product-card", { "show-quantity": isLandingPage, "hide-add-btn": isLandingPage, "shadow-on-hover": true, product: product }));
|
|
8514
8503
|
}
|
|
8515
8504
|
canRender() {
|
|
8516
8505
|
return this.sourceValueIsValid && this.isReady;
|
|
@@ -21768,7 +21757,7 @@ const SallaTelInput = class {
|
|
|
21768
21757
|
if (this.TelInput)
|
|
21769
21758
|
return;
|
|
21770
21759
|
try {
|
|
21771
|
-
const telInputModule = await Promise.resolve().then(function () { return require('./index-
|
|
21760
|
+
const telInputModule = await Promise.resolve().then(function () { return require('./index-C7-280f4.js'); }).then(function (n) { return n.index; });
|
|
21772
21761
|
this.TelInput = telInputModule.default;
|
|
21773
21762
|
}
|
|
21774
21763
|
catch (error) {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
7
|
-
var Helper = require('./Helper-
|
|
6
|
+
var index = require('./index-Z-cyrNSM.js');
|
|
7
|
+
var Helper = require('./Helper-DHRnzcFm.js');
|
|
8
8
|
var interfaces = require('./interfaces-DZDQwN6-.js');
|
|
9
9
|
require('./anime.es-BqW8JHZi.js');
|
|
10
10
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-Z-cyrNSM.js');
|
|
7
7
|
var interfaces = require('./interfaces-DZDQwN6-.js');
|
|
8
|
-
var Helper = require('./Helper-
|
|
8
|
+
var Helper = require('./Helper-DHRnzcFm.js');
|
|
9
9
|
require('./anime.es-BqW8JHZi.js');
|
|
10
10
|
|
|
11
11
|
const sallaFiltersCss = ":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-Z-cyrNSM.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,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
7
|
-
var Helper = require('./Helper-
|
|
6
|
+
var index = require('./index-Z-cyrNSM.js');
|
|
7
|
+
var Helper = require('./Helper-DHRnzcFm.js');
|
|
8
8
|
require('./anime.es-BqW8JHZi.js');
|
|
9
9
|
|
|
10
10
|
const sallaNotificationsCss = "";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
7
|
-
var Helper = require('./Helper-
|
|
6
|
+
var index = require('./index-Z-cyrNSM.js');
|
|
7
|
+
var Helper = require('./Helper-DHRnzcFm.js');
|
|
8
8
|
require('./anime.es-BqW8JHZi.js');
|
|
9
9
|
|
|
10
10
|
const sallaOrdersCss = ":host{display:block}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-Z-cyrNSM.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,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-Z-cyrNSM.js');
|
|
7
7
|
var shoppingBag = require('./shopping-bag-C1gvTVHr.js');
|
|
8
|
-
var Helper = require('./Helper-
|
|
8
|
+
var Helper = require('./Helper-DHRnzcFm.js');
|
|
9
9
|
require('./anime.es-BqW8JHZi.js');
|
|
10
10
|
|
|
11
11
|
var now_1;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-Z-cyrNSM.js');
|
|
7
7
|
var arrowLeft = require('./arrow-left-xSEmRpp6.js');
|
|
8
|
-
var Helper = require('./Helper-
|
|
8
|
+
var Helper = require('./Helper-DHRnzcFm.js');
|
|
9
9
|
require('./anime.es-BqW8JHZi.js');
|
|
10
10
|
|
|
11
11
|
var IconQuoteOpen = `<!-- Generated by IcoMoon.io -->
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-Z-cyrNSM.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-Z-cyrNSM.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
|
@@ -50,6 +50,10 @@ class Helper {
|
|
|
50
50
|
'components.most_sales_products': 'sales', //temporary, delete it after two days from now
|
|
51
51
|
}[source || salla.config.get('page.slug')] || source || 'latest';
|
|
52
52
|
}
|
|
53
|
+
getApiSource(source) {
|
|
54
|
+
const apiSourceMap = { 'recently': 'selected' };
|
|
55
|
+
return apiSourceMap[source] || source;
|
|
56
|
+
}
|
|
53
57
|
getPageTitleForSource(source) {
|
|
54
58
|
source = {
|
|
55
59
|
'brands': 'common.titles.brands',
|
|
@@ -176,6 +180,16 @@ class Helper {
|
|
|
176
180
|
productsIncludes() {
|
|
177
181
|
return this.includes?.filter(field => field != 'metadata');
|
|
178
182
|
}
|
|
183
|
+
saveProductSource(source) {
|
|
184
|
+
if (!source)
|
|
185
|
+
return;
|
|
186
|
+
try {
|
|
187
|
+
sessionStorage.setItem('s-viewed-source', source);
|
|
188
|
+
}
|
|
189
|
+
catch (error) {
|
|
190
|
+
salla.logger.warn('Error saving product source to session storage');
|
|
191
|
+
}
|
|
192
|
+
}
|
|
179
193
|
parseJson(includes) {
|
|
180
194
|
if (typeof includes !== 'string') {
|
|
181
195
|
return includes;
|