@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/esm/loader.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { g as globalScripts, b as bootstrapLazy } from './index-
|
|
5
|
-
export { s as setNonce } from './index-
|
|
4
|
+
import { g as globalScripts, b as bootstrapLazy } from './index-D2-TtAhI.js';
|
|
5
|
+
export { s as setNonce } from './index-D2-TtAhI.js';
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = async (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement, c as createEvent, F as Fragment, j as axios } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement, c as createEvent, F as Fragment, j as axios } from './index-D2-TtAhI.js';
|
|
5
5
|
import { a as anime } from './anime.es-CgtvEd63.js';
|
|
6
6
|
import { A as ArrowDownIcon, S as SpecialDiscountIcon } from './special-discount-yRO-ZESF.js';
|
|
7
7
|
import { I as IconVerified } from './check-uTyAzPSy.js';
|
|
8
|
-
import { H as Helper } from './Helper-
|
|
8
|
+
import { H as Helper } from './Helper-B5RLi6Xo.js';
|
|
9
9
|
import { a as arrowLeft } from './arrow-left-BedNk7k1.js';
|
|
10
10
|
import { C as CameraIcon, G as Genders } from './interfaces-CBT_Nxny.js';
|
|
11
11
|
import { S as ShoppingBag } from './shopping-bag-DiKTtDW5.js';
|
|
@@ -1314,7 +1314,7 @@ const SallaColorPicker = class {
|
|
|
1314
1314
|
}
|
|
1315
1315
|
}
|
|
1316
1316
|
initColorPicker() {
|
|
1317
|
-
this.pickerReady = import('./vanilla-picker-
|
|
1317
|
+
this.pickerReady = import('./vanilla-picker-DkUGzUrx.js').then(function (n) { return n.v; }).then((mod) => {
|
|
1318
1318
|
const Picker = mod.default;
|
|
1319
1319
|
const picker = new Picker({
|
|
1320
1320
|
parent: this.host,
|
|
@@ -2569,13 +2569,13 @@ const SallaFileUpload = class {
|
|
|
2569
2569
|
return;
|
|
2570
2570
|
try {
|
|
2571
2571
|
const [FilePondModule, FilePondPluginFileValidateSize, FilePondPluginImageExifOrientation, FilePondPluginImagePreview, FilePondPluginImageEdit, FilePondPluginFileValidateType, FilePondPluginFilePoster] = await Promise.all([
|
|
2572
|
-
import('./filepond-
|
|
2573
|
-
import('./filepond-plugin-file-validate-size-
|
|
2574
|
-
import('./filepond-plugin-image-exif-orientation-
|
|
2575
|
-
import('./filepond-plugin-image-preview-
|
|
2576
|
-
import('./filepond-plugin-image-edit-
|
|
2577
|
-
import('./filepond-plugin-file-validate-type-
|
|
2578
|
-
import('./filepond-plugin-file-poster-
|
|
2572
|
+
import('./filepond-Dg4ZKM-u.js').then(function (n) { return n.f; }),
|
|
2573
|
+
import('./filepond-plugin-file-validate-size-DgZMMqmi.js').then(function (n) { return n.f; }),
|
|
2574
|
+
import('./filepond-plugin-image-exif-orientation-oSI8aLU-.js').then(function (n) { return n.f; }),
|
|
2575
|
+
import('./filepond-plugin-image-preview-DEefQK61.js').then(function (n) { return n.f; }),
|
|
2576
|
+
import('./filepond-plugin-image-edit-dotdnN4Z.js').then(function (n) { return n.f; }),
|
|
2577
|
+
import('./filepond-plugin-file-validate-type-DA9tDSFr.js').then(function (n) { return n.f; }),
|
|
2578
|
+
import('./filepond-plugin-file-poster-BUIjdsnA.js').then(function (n) { return n.f; })
|
|
2579
2579
|
]);
|
|
2580
2580
|
this.FilePond = FilePondModule;
|
|
2581
2581
|
// Register plugins
|
|
@@ -7846,19 +7846,6 @@ const SallaProductsList = class {
|
|
|
7846
7846
|
//as a request they don't want to let the user to open the product details
|
|
7847
7847
|
//todo:: find a better way to handle this request
|
|
7848
7848
|
this.getSource() === 'landing-page' && (product.url = '');
|
|
7849
|
-
try {
|
|
7850
|
-
// Add source query param to product URL for tracking in Product Viewed event
|
|
7851
|
-
if (this.source && product.url && !product.url.includes('s-product-source=')) {
|
|
7852
|
-
const [urlWithoutFragment, fragment] = product.url.split('#');
|
|
7853
|
-
const separator = urlWithoutFragment.includes('?') ? '&' : '?';
|
|
7854
|
-
const pageSlug = salla.config?.get('page.slug') || 'unknown';
|
|
7855
|
-
const sourceValue = `${pageSlug}.${this.source}`;
|
|
7856
|
-
product.url = `${urlWithoutFragment}${separator}s-product-source=${sourceValue}${fragment ? '#' + fragment : ''}`;
|
|
7857
|
-
}
|
|
7858
|
-
}
|
|
7859
|
-
catch (error) {
|
|
7860
|
-
Salla.log('Error with source');
|
|
7861
|
-
}
|
|
7862
7849
|
const customComponentTag = this.hasCustomComponent ? this.productCardComponent : 'salla-product-card';
|
|
7863
7850
|
const productCard = document.createElement(customComponentTag);
|
|
7864
7851
|
productCard.product = product;
|
|
@@ -7866,15 +7853,15 @@ const SallaProductsList = class {
|
|
|
7866
7853
|
this.applyHorizontalCardStyles(productCard);
|
|
7867
7854
|
// Attach click event listener to save the current products snapshot
|
|
7868
7855
|
productCard.addEventListener('click', (event) => {
|
|
7869
|
-
if (!this.hasInfiniteScroll) {
|
|
7870
|
-
return;
|
|
7871
|
-
}
|
|
7872
7856
|
const target = event.target;
|
|
7873
7857
|
// Check if the clicked element is an anchor or inside an anchor
|
|
7874
7858
|
const anchor = target.closest('a');
|
|
7875
7859
|
if (anchor) {
|
|
7876
|
-
this.
|
|
7877
|
-
|
|
7860
|
+
Helper.saveProductSource(this.getSource());
|
|
7861
|
+
if (this.hasInfiniteScroll) {
|
|
7862
|
+
this.takeStateSnapshot();
|
|
7863
|
+
sessionStorage.setItem(this.lastViewedProductKey, product.id);
|
|
7864
|
+
}
|
|
7878
7865
|
}
|
|
7879
7866
|
});
|
|
7880
7867
|
return productCard;
|
|
@@ -8204,7 +8191,7 @@ const SallaProductsList = class {
|
|
|
8204
8191
|
}
|
|
8205
8192
|
getInitialData() {
|
|
8206
8193
|
this.loading();
|
|
8207
|
-
return salla.product.api.fetch({ source: this.getSource(), source_value: this.getSourceValue(), limit: this.limit }).then(async (response) => {
|
|
8194
|
+
return salla.product.api.fetch({ source: Helper.getApiSource(this.getSource()), source_value: this.getSourceValue(), limit: this.limit }).then(async (response) => {
|
|
8208
8195
|
if (!response.data.length) {
|
|
8209
8196
|
this.showPlaceholder = true;
|
|
8210
8197
|
this.placeholderLoader && this.placeholderLoader.remove();
|
|
@@ -8230,7 +8217,7 @@ const SallaProductsList = class {
|
|
|
8230
8217
|
.then(() => {
|
|
8231
8218
|
this.hasCustomComponent = !!customElements.get(this.productCardComponent);
|
|
8232
8219
|
this.sourceValueIsValid = !!(this.getSourceValue() || this.isSourceWithoutValue());
|
|
8233
|
-
this.hasInfiniteScroll = !['json', 'selected', 'related', 'landing-page'].includes(this.getSource()) && !this.limit;
|
|
8220
|
+
this.hasInfiniteScroll = !['json', 'selected', 'related', 'landing-page', 'recently'].includes(this.getSource()) && !this.limit;
|
|
8234
8221
|
let searchParams = new URLSearchParams(window.location.search);
|
|
8235
8222
|
try {
|
|
8236
8223
|
this.sortBy = this.sortBy || searchParams.get('sort') || searchParams.get('by');
|
|
@@ -8449,7 +8436,7 @@ const SallaProductsSlider = class {
|
|
|
8449
8436
|
this.isReady = false;
|
|
8450
8437
|
return;
|
|
8451
8438
|
}
|
|
8452
|
-
return salla.product.api.fetch({ source: this.getSource(), source_value: this.getSourceValue(), limit: this.limit })
|
|
8439
|
+
return salla.product.api.fetch({ source: Helper.getApiSource(this.getSource()), source_value: this.getSourceValue(), limit: this.limit })
|
|
8453
8440
|
.then(response => Helper.injectExtraFieldsToResponse(response))
|
|
8454
8441
|
.then(response => {
|
|
8455
8442
|
this.productsData = response.data;
|
|
@@ -8479,18 +8466,20 @@ const SallaProductsSlider = class {
|
|
|
8479
8466
|
getItemHTML(product) {
|
|
8480
8467
|
//as a request they don't want to let the user to open the product details
|
|
8481
8468
|
//todo:: find a better way to handle this request
|
|
8482
|
-
this.getSource() === 'landing-page'
|
|
8469
|
+
const isLandingPage = this.getSource() === 'landing-page';
|
|
8470
|
+
isLandingPage && (product.url = '');
|
|
8471
|
+
const handleClick = isLandingPage ? undefined : () => Helper.saveProductSource(this.getSource());
|
|
8483
8472
|
if (this.hasCustomComponent && this.productCardComponent.toLowerCase() == 'custom-salla-product-card') {
|
|
8484
|
-
return h("div", { class: "s-products-slider-card" }, h("custom-salla-product-card", { product: product, source: this.getSource(), "source-value": this.getSourceValue() }));
|
|
8473
|
+
return h("div", { class: "s-products-slider-card", onClick: handleClick }, h("custom-salla-product-card", { product: product, source: this.getSource(), "source-value": this.getSourceValue() }));
|
|
8485
8474
|
}
|
|
8486
8475
|
if (this.hasCustomComponent) {
|
|
8487
8476
|
const customElem = document.createElement(this.productCardComponent);
|
|
8488
8477
|
customElem.setAttribute('product', JSON.stringify(product));
|
|
8489
8478
|
customElem.setAttribute('source', this.getSource());
|
|
8490
8479
|
customElem.setAttribute('source-value', this.getSourceValue());
|
|
8491
|
-
return h("div", { class: "s-products-slider-card", innerHTML: customElem.outerHTML });
|
|
8480
|
+
return h("div", { class: "s-products-slider-card", onClick: handleClick, innerHTML: customElem.outerHTML });
|
|
8492
8481
|
}
|
|
8493
|
-
return h("div", { class: "s-products-slider-card" }, h("salla-product-card", { "show-quantity":
|
|
8482
|
+
return h("div", { class: "s-products-slider-card", onClick: handleClick }, h("salla-product-card", { "show-quantity": isLandingPage, "hide-add-btn": isLandingPage, "shadow-on-hover": true, product: product }));
|
|
8494
8483
|
}
|
|
8495
8484
|
canRender() {
|
|
8496
8485
|
return this.sourceValueIsValid && this.isReady;
|
|
@@ -21748,7 +21737,7 @@ const SallaTelInput = class {
|
|
|
21748
21737
|
if (this.TelInput)
|
|
21749
21738
|
return;
|
|
21750
21739
|
try {
|
|
21751
|
-
const telInputModule = await import('./index-
|
|
21740
|
+
const telInputModule = await import('./index-B7E8Tmgi.js').then(function (n) { return n.i; });
|
|
21752
21741
|
this.TelInput = telInputModule.default;
|
|
21753
21742
|
}
|
|
21754
21743
|
catch (error) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, a as getElement } from './index-D2-TtAhI.js';
|
|
5
5
|
import { a as anime } from './anime.es-CgtvEd63.js';
|
|
6
6
|
|
|
7
7
|
const sallaAdvertisementCss = ":host{display:block}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-D2-TtAhI.js';
|
|
5
5
|
|
|
6
6
|
const sallaAppInstallAlertCss = ":host{display:block}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-D2-TtAhI.js';
|
|
5
5
|
|
|
6
6
|
const sallaAppsIconsCss = ":host{display:block}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h } from './index-
|
|
4
|
+
import { r as registerInstance, h } from './index-D2-TtAhI.js';
|
|
5
5
|
import { S as SpecialDiscountIcon, A as ArrowDownIcon } from './special-discount-yRO-ZESF.js';
|
|
6
6
|
import { G as GiftIcon } from './gift-C0JNGIpa.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-D2-TtAhI.js';
|
|
5
5
|
import { w as whatsapp } from './whatsapp2-DWksgowB.js';
|
|
6
6
|
import { M as MailIcon } from './mail-DmgxDvXL.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h } from './index-D2-TtAhI.js';
|
|
5
5
|
import { C as CameraIcon, F as FormFieldTypes } from './interfaces-CBT_Nxny.js';
|
|
6
6
|
|
|
7
7
|
const sallaCustomFieldsCss = ":host{display:block}";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
5
|
-
import { H as Helper } from './Helper-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-D2-TtAhI.js';
|
|
5
|
+
import { H as Helper } from './Helper-B5RLi6Xo.js';
|
|
6
6
|
import { F as FilterOptionTypes } from './interfaces-DL4h2bc3.js';
|
|
7
7
|
import './anime.es-CgtvEd63.js';
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-D2-TtAhI.js';
|
|
5
5
|
import { F as FilterOptionTypes } from './interfaces-DL4h2bc3.js';
|
|
6
|
-
import { H as Helper } from './Helper-
|
|
6
|
+
import { H as Helper } from './Helper-B5RLi6Xo.js';
|
|
7
7
|
import './anime.es-CgtvEd63.js';
|
|
8
8
|
|
|
9
9
|
const sallaFiltersCss = ":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-D2-TtAhI.js';
|
|
5
5
|
|
|
6
6
|
const SallaHook = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-D2-TtAhI.js';
|
|
5
5
|
|
|
6
6
|
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}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-D2-TtAhI.js';
|
|
5
5
|
|
|
6
6
|
const sallaLoyaltyPrizeItemCss = "salla-loyalty-prize-item:hover{box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-D2-TtAhI.js';
|
|
5
5
|
import { G as GiftIcon } from './gift-C0JNGIpa.js';
|
|
6
6
|
|
|
7
7
|
const sallaLoyaltyProgramCss = "";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, a as getElement } from './index-
|
|
5
|
-
import { H as Helper } from './Helper-
|
|
4
|
+
import { r as registerInstance, h, a as getElement } from './index-D2-TtAhI.js';
|
|
5
|
+
import { H as Helper } from './Helper-B5RLi6Xo.js';
|
|
6
6
|
import './anime.es-CgtvEd63.js';
|
|
7
7
|
|
|
8
8
|
const sallaNotificationsCss = "";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-D2-TtAhI.js';
|
|
5
5
|
|
|
6
6
|
var copyIcon = `<!-- Generated by IcoMoon.io -->
|
|
7
7
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h } from './index-
|
|
4
|
+
import { r as registerInstance, h } from './index-D2-TtAhI.js';
|
|
5
5
|
import { I as IconVerified } from './check-uTyAzPSy.js';
|
|
6
6
|
|
|
7
7
|
var iconFileArchive = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, a as getElement } from './index-
|
|
5
|
-
import { H as Helper } from './Helper-
|
|
4
|
+
import { r as registerInstance, h, a as getElement } from './index-D2-TtAhI.js';
|
|
5
|
+
import { H as Helper } from './Helper-B5RLi6Xo.js';
|
|
6
6
|
import './anime.es-CgtvEd63.js';
|
|
7
7
|
|
|
8
8
|
const sallaOrdersCss = ":host{display:block}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-D2-TtAhI.js';
|
|
5
5
|
|
|
6
6
|
const sallaPaymentsCss = ":host{display:block}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-D2-TtAhI.js';
|
|
5
5
|
import { a as arrowLeft } from './arrow-left-BedNk7k1.js';
|
|
6
6
|
|
|
7
7
|
var arrowRight = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, a as getElement } from './index-D2-TtAhI.js';
|
|
5
5
|
import { I as IconVerified } from './check-uTyAzPSy.js';
|
|
6
6
|
|
|
7
7
|
var IconStar2 = ` <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { e as require_root, f as requireIsObject, i as requireIsSymbol, d as getDefaultExportFromCjs, r as registerInstance, h, a as getElement } from './index-
|
|
4
|
+
import { e as require_root, f as requireIsObject, i as requireIsSymbol, d as getDefaultExportFromCjs, r as registerInstance, h, a as getElement } from './index-D2-TtAhI.js';
|
|
5
5
|
import { S as ShoppingBag } from './shopping-bag-DiKTtDW5.js';
|
|
6
|
-
import { H as Helper } from './Helper-
|
|
6
|
+
import { H as Helper } from './Helper-B5RLi6Xo.js';
|
|
7
7
|
import './anime.es-CgtvEd63.js';
|
|
8
8
|
|
|
9
9
|
var now_1;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h } from './index-
|
|
4
|
+
import { r as registerInstance, h } from './index-D2-TtAhI.js';
|
|
5
5
|
import { a as arrowLeft } from './arrow-left-BedNk7k1.js';
|
|
6
|
-
import { H as Helper } from './Helper-
|
|
6
|
+
import { H as Helper } from './Helper-B5RLi6Xo.js';
|
|
7
7
|
import './anime.es-CgtvEd63.js';
|
|
8
8
|
|
|
9
9
|
var IconQuoteOpen = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-D2-TtAhI.js';
|
|
5
5
|
import { f as facebook, t as twitter } from './twitter-Dz7o69vX.js';
|
|
6
6
|
|
|
7
7
|
var instagram = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, a as getElement } from './index-D2-TtAhI.js';
|
|
5
5
|
|
|
6
6
|
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%)}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-D2-TtAhI.js';
|
|
5
5
|
import { M as MailIcon } from './mail-DmgxDvXL.js';
|
|
6
6
|
|
|
7
7
|
var AndroidPhoneIcon = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-D2-TtAhI.js';
|
|
5
5
|
|
|
6
6
|
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}";
|
|
7
7
|
|
package/dist/esm/twilight.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-
|
|
5
|
-
export { s as setNonce } from './index-
|
|
4
|
+
import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-D2-TtAhI.js';
|
|
5
|
+
export { s as setNonce } from './index-D2-TtAhI.js';
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Browser v4.35.1 | MIT Licensed | https://stenciljs.com
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as i,a as t}from"./p-
|
|
4
|
+
import{r as s,h as i,a as t}from"./p-D2-TtAhI.js";import{I as e}from"./p-uTyAzPSy.js";const r=class{constructor(i){s(this,i),this.currentSlide=0,this.showPurchaseCount=!1,this.startPoint={x:0,y:0},this.isSwiping=!1,this.isRTL="rtl",this.handlePointerDown=s=>{s.isPrimary&&(this.sliderElement?.setPointerCapture(s.pointerId),this.startSwipe(s.clientX,s.clientY),s.preventDefault())},this.handlePointerMove=s=>{this.isSwiping&&s.isPrimary&&s.preventDefault()},this.handlePointerUp=s=>{this.isSwiping&&s.isPrimary&&(this.sliderElement?.releasePointerCapture(s.pointerId),this.endSwipe(s.clientX,s.clientY))},this.handlePointerCancel=s=>{this.isSwiping&&s.isPrimary&&(this.sliderElement?.releasePointerCapture(s.pointerId),this.isSwiping=!1)},this.goToSlide=s=>{this.currentSlide=Math.max(0,Math.min(s,this.images.length-1))}}async componentDidLoad(){await salla.onReady(),this.showPurchaseCount=!!salla.config.get("store.settings.product.total_sold_enabled",!1),this.isRTL=salla.config.get("theme.is_rtl",!0),this.purchasedCount=salla.lang.getWithDefault("blocks.home.reviews.purchased_count",this.isRTL?` تم شراءه ${this.review.product?.sold_quantity} مرة`:`Purchased ${this.review.product.sold_quantity} times`,{count:this.review.product?.sold_quantity}),this.initializeSlider()}disconnectedCallback(){this.removeEventListeners()}get images(){const{review:s}=this;return s?.images?.length>1?s.images.map(((s,i)=>({url:s,alt:"",id:i}))):s?.product?.images||[]}get hasMultipleImages(){return this.images.length>1}get slideTransform(){return`translateX(${100*this.currentSlide*(this.isRTL?1:-1)}%)`}initializeSlider(){this.hasMultipleImages&&(this.sliderElement=this.el.querySelector(".s-review-card-slider-container"),this.sliderElement&&(this.sliderElement.style.touchAction="pan-y pinch-zoom",this.addEventListeners()))}addEventListeners(){this.sliderElement&&(this.sliderElement.addEventListener("pointerdown",this.handlePointerDown,{passive:!1}),this.sliderElement.addEventListener("pointermove",this.handlePointerMove,{passive:!1}),this.sliderElement.addEventListener("pointerup",this.handlePointerUp,{passive:!0}),this.sliderElement.addEventListener("pointercancel",this.handlePointerCancel,{passive:!0}))}removeEventListeners(){this.sliderElement&&(this.sliderElement.removeEventListener("pointerdown",this.handlePointerDown),this.sliderElement.removeEventListener("pointermove",this.handlePointerMove),this.sliderElement.removeEventListener("pointerup",this.handlePointerUp),this.sliderElement.removeEventListener("pointercancel",this.handlePointerCancel))}startSwipe(s,i){this.startPoint={x:s,y:i},this.isSwiping=!0}componentDidRender(){this.removeEventListeners(),this.addEventListeners()}endSwipe(s,i){this.isSwiping=!1,this.processSwipe(s-this.startPoint.x,i-this.startPoint.y)}processSwipe(s,i){if(Math.abs(s)<10||Math.abs(i)>Math.abs(s))return;const t=s<0;(this.isRTL?!t:t)?this.goToNextSlide():this.goToPrevSlide()}goToNextSlide(){this.currentSlide<this.images.length-1&&this.currentSlide++}goToPrevSlide(){this.currentSlide>0&&this.currentSlide--}renderStars(){return Array(5).fill(null).map(((s,t)=>i("span",{key:t,innerHTML:this.review.stars>=t+1?' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="currentcolor" />\n</svg>':' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="#DDDDDD" />\n</svg>'})))}renderDots(){return this.images.map((({url:s},t)=>i("button",{key:s||t,type:"button",class:"s-review-card-slider-dot "+(this.currentSlide===t?"active":""),onClick:()=>this.goToSlide(t),"aria-label":`Go to slide ${t+1}`,onPointerDown:()=>this.goToSlide(t)})))}renderSlider(){return this.hasMultipleImages?i("div",{class:"s-review-card-slider-container"},i("div",{class:"s-review-card-slides",style:{transform:this.slideTransform}},this.images.map((s=>i("div",{key:s?.id,class:"s-review-card-slider-slide"},i("img",{src:s.url,alt:s.alt||"Product image",width:275,height:275,loading:"lazy",draggable:!1}))))),i("div",{class:"s-review-card-slider-dots"},this.renderDots())):null}renderSingleImage(){const s=this.review?.product?.image;return!s||this.hasMultipleImages?null:i("img",{src:s.url,alt:s.alt||"Product image",class:"s-review-card-image",width:275,height:275,loading:"lazy",decoding:"async",draggable:!1})}renderHeader(){return i("div",{class:"s-review-card-header"},i("div",{class:"s-review-card-reviewer-name"},i("p",null,this.review?.name),this.review?.has_order&&i("span",{class:"s-review-card-verified-icon",innerHTML:e})),i("div",{class:"s-review-card-stars"},this.renderStars()))}renderProductInfo(){const s=this.review?.product;return s?i("a",{href:this.review?.product?.url,class:"s-review-card-product-container"},i("img",{alt:s.image?.alt||"Product",src:s.image?.url,class:"s-review-card-product-image",width:60,height:60,loading:"lazy",decoding:"async",draggable:!1}),i("div",{class:"s-review-card-product-details"},i("p",{class:"s-review-card-product-details-name"},s.name),this.showPurchaseCount?i("p",{class:"s-review-card-product-details-purchase-count"},i("span",{innerHTML:' <svg width="12" height="17" view-box="0 0 12 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M6 16.2501C9.10658 16.2501 11.625 13.7317 11.625 10.6251C11.625 9.976 11.4523 9.35252 11.25 8.77232C9.99998 10.0075 9.05002 10.6251 8.4 10.6251C11.3966 5.37512 9.75 3.12512 5.25 0.125122C5.625 3.87475 3.15302 5.58043 2.14634 6.52757C1.0559 7.5535 0.375 9.00977 0.375 10.6251C0.375 13.7317 2.89339 16.2501 6 16.2501ZM6.53205 2.92636C8.96333 4.98908 8.97495 6.59185 7.09725 9.88157C6.5265 10.8815 7.2486 12.1251 8.4 12.1251C8.9163 12.1251 9.43807 11.9745 9.98917 11.6789C9.52342 13.4466 7.91393 14.7501 6 14.7501C3.72182 14.7501 1.875 12.9033 1.875 10.6251C1.875 9.47072 2.34959 8.39582 3.17419 7.62002C3.2687 7.53115 3.74812 7.1062 3.76858 7.08782C4.08646 6.8017 4.34835 6.54985 4.60718 6.2727C5.52998 5.28461 6.19283 4.18735 6.53205 2.92636Z" fill="currentcolor" />\n </svg>'}),this.purchasedCount):null)):null}render(){return i("div",{key:"251b76f2f2935ab7be248f589badaebe0f297cb2",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),a(),i("div",{key:"2621097a4115e278b1b99d46b6be22341a7ea064",class:"s-review-card-content"},this.renderHeader(),i("p",{key:"cd641970280867954f431fc3a2812080ebe32bd9",class:"s-review-card-review-content",innerHTML:this.review?.content}),a(),this.renderProductInfo()))}get el(){return t(this)}},a=()=>i("div",{class:"s-review-card-divider "});r.style=":host{display:block}";export{r as salla_review_card}
|