@salla.sa/twilight-components 2.14.309 → 2.14.311
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-CbCxS_Xg.js → filepond-C1XiGYXI.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-Bm6RlIg5.js → filepond-plugin-file-poster-Buj7uCrK.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-DwIWlXAD.js → filepond-plugin-file-validate-size-DF5yjsD2.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-D-Wx-c53.js → filepond-plugin-file-validate-type-xiEipTfa.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-CyPClzCC.js → filepond-plugin-image-edit-DiWHC4pN.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-C4U6-RZo.js → filepond-plugin-image-exif-orientation-DT-DOub-.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-B_YXrtyC.js → filepond-plugin-image-preview-BnQaLNMf.js} +1 -1
- package/dist/cjs/{index-Cka2So6s.js → index-Bpe38t8n.js} +1 -1
- package/dist/cjs/{index-CuOFx1fG.js → index-CXC9Tj5-.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-accordion_62.cjs.entry.js +31 -34
- 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 +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-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +12 -15
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +10 -10
- package/dist/components/index.js +2 -2
- package/dist/components/salla-multiple-bundle-product-options-modal2.js +12 -15
- package/dist/components/salla-user-menu.js +10 -10
- package/dist/esm/{filepond-CaVxlNWc.js → filepond-RxewwAln.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-BIW3jIii.js → filepond-plugin-file-poster-DA_4sF_w.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-PIbS8S7e.js → filepond-plugin-file-validate-size-DXEZzHxl.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-C9mVUO2J.js → filepond-plugin-file-validate-type-DEXpzCfX.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-1BkcMygU.js → filepond-plugin-image-edit-BZ3QiF7z.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CBLWRhGR.js → filepond-plugin-image-exif-orientation-DNtcleQU.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-BCnXVici.js → filepond-plugin-image-preview-NjmxyWIx.js} +1 -1
- package/dist/esm/{index-DPmcgb48.js → index-ChHsXzQp.js} +1 -1
- package/dist/esm/{index-DXm__2bA.js → index-DPwa4NOx.js} +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-accordion_62.entry.js +31 -34
- 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 +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-ce6dd272.entry.js → p-0ecfdb3a.entry.js} +1 -1
- package/dist/twilight/{p-5564e46b.entry.js → p-14e15e23.entry.js} +1 -1
- package/dist/twilight/{p-e7bba7f2.entry.js → p-174f6141.entry.js} +1 -1
- package/dist/twilight/{p-76587342.entry.js → p-17c2d01a.entry.js} +1 -1
- package/dist/twilight/{p-93788591.entry.js → p-1eb7c65b.entry.js} +1 -1
- package/dist/twilight/{p-83d6dc27.entry.js → p-2804334f.entry.js} +1 -1
- package/dist/twilight/{p-d71d31a8.entry.js → p-2ab7f5a7.entry.js} +1 -1
- package/dist/twilight/{p-6787cc20.entry.js → p-2edcccf2.entry.js} +1 -1
- package/dist/twilight/{p-082ff6e6.entry.js → p-2f7e2c29.entry.js} +1 -1
- package/dist/twilight/{p-c788446c.entry.js → p-334fb235.entry.js} +1 -1
- package/dist/twilight/{p-08817097.entry.js → p-37636816.entry.js} +1 -1
- package/dist/twilight/{p-82f55bdd.entry.js → p-38d8a361.entry.js} +1 -1
- package/dist/twilight/{p-CE2Dec8G.js → p-39vweM4j.js} +1 -1
- package/dist/twilight/{p-8b761204.entry.js → p-3eb18097.entry.js} +1 -1
- package/dist/twilight/{p-7d53611e.entry.js → p-424d2aba.entry.js} +1 -1
- package/dist/twilight/{p-c0d1c921.entry.js → p-451d1c21.entry.js} +1 -1
- package/dist/twilight/{p-6d7aee75.entry.js → p-46363539.entry.js} +1 -1
- package/dist/twilight/{p-bf4adb6b.entry.js → p-4987fa21.entry.js} +1 -1
- package/dist/twilight/{p-1c65c474.entry.js → p-6815d5f3.entry.js} +1 -1
- package/dist/twilight/{p-8bf2190b.entry.js → p-68f69af5.entry.js} +1 -1
- package/dist/twilight/{p-5135d2b8.entry.js → p-702b7a0c.entry.js} +1 -1
- package/dist/twilight/{p-275356ed.entry.js → p-817795b1.entry.js} +1 -1
- package/dist/twilight/{p-96158b1f.entry.js → p-8c297660.entry.js} +1 -1
- package/dist/twilight/p-91c3423f.entry.js +4 -0
- package/dist/twilight/{p-bc08037d.entry.js → p-9490b410.entry.js} +1 -1
- package/dist/twilight/{p-D5bjyFUD.js → p-BD1SYaja.js} +1 -1
- package/dist/twilight/{p-BXbUEqVO.js → p-CZvp_jll.js} +1 -1
- package/dist/twilight/{p-jXXK08Zg.js → p-CeMwSX70.js} +1 -1
- package/dist/twilight/{p-YvIv3eZS.js → p-D4RMmydN.js} +1 -1
- package/dist/twilight/{p-DXm__2bA.js → p-DPwa4NOx.js} +1 -1
- package/dist/twilight/{p-DlmR4M5x.js → p-DVNe0IfA.js} +1 -1
- package/dist/twilight/{p-R0zO-XPr.js → p-Dy4bQAqN.js} +2 -2
- package/dist/twilight/{p-C7IgatTe.js → p-F3EUSeeS.js} +1 -1
- package/dist/twilight/{p-043465b6.entry.js → p-a1a1f0e1.entry.js} +1 -1
- package/dist/twilight/{p-071ab94d.entry.js → p-a4568a88.entry.js} +1 -1
- package/dist/twilight/{p-89bfc972.entry.js → p-ac1e7799.entry.js} +1 -1
- package/dist/twilight/{p-2f78fe5d.entry.js → p-ac520537.entry.js} +1 -1
- package/dist/twilight/{p-5b9206ad.entry.js → p-c6f7fe97.entry.js} +1 -1
- package/dist/twilight/{p-7e72562b.entry.js → p-c85ae4c7.entry.js} +1 -1
- package/dist/twilight/{p-0ec984a2.entry.js → p-d4cf4b47.entry.js} +1 -1
- package/dist/twilight/{p-bcb06c63.entry.js → p-e2677580.entry.js} +1 -1
- package/dist/twilight/{p-a0d7e191.entry.js → p-f394d71c.entry.js} +2 -2
- package/dist/twilight/{p-39260b73.entry.js → p-f7e03ebb.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/package.json +5 -5
- package/dist/twilight/p-b5b6ab94.entry.js +0 -4
|
@@ -104,17 +104,13 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
|
|
|
104
104
|
salla.event.on('multiple-bundle-product-modal::clear-options', this.clearOptionsListener);
|
|
105
105
|
// Create and store the option change listener for proper cleanup
|
|
106
106
|
this.optionChangeListener = (e) => {
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
if (
|
|
113
|
-
|
|
114
|
-
normalizedProductId === normalizedEventProductId &&
|
|
115
|
-
option &&
|
|
116
|
-
detail) {
|
|
117
|
-
this.handleOptionChange(Number(normalizedProductId), option, detail);
|
|
107
|
+
const data = e.detail || e;
|
|
108
|
+
const { option, detail } = data;
|
|
109
|
+
// If data is a detail object (has option_id), find the option from product
|
|
110
|
+
const actualOption = option || (data.option_id && this.product?.options?.find(opt => opt.id === data.option_id || String(opt.id) === String(data.option_id)));
|
|
111
|
+
const actualDetail = detail || (data.id ? data : null);
|
|
112
|
+
if (this.product?.id && actualOption) {
|
|
113
|
+
this.handleOptionChange(Number(this.product.id), actualOption, actualDetail);
|
|
118
114
|
}
|
|
119
115
|
};
|
|
120
116
|
salla.event.on('product-options::change', this.optionChangeListener);
|
|
@@ -479,7 +475,8 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
|
|
|
479
475
|
const optionsWithSelectedState = this.getOptionsWithSelectedState();
|
|
480
476
|
const cacheKey = this.generateCacheKey(this.sectionId, this.productIndex, productId);
|
|
481
477
|
const resetToken = this.optionsResetTokens[cacheKey] || 0;
|
|
482
|
-
|
|
478
|
+
const isDisabled = this.isLoading || optionsWithSelectedState.some(opt => opt.details.some(d => d.is_selected && d.is_out === true));
|
|
479
|
+
return (h(Host, { key: '27c9b7b2698aede358cb8d1a01d774c625b7ead4' }, h("salla-modal", { key: 'c9ae157c9ee8f3b13a19cbfc601b4c8f717d8024', isLoading: this.isLoading, ref: el => (this.modal = el), width: "md", centered: false, id: `s-multiple-bundle-product-options-modal-options-${productId}`, class: "s-multiple-bundle-product-options-modal-wrapper" }, h("div", { key: 'a2bf7d4eed854e89d314454294c84eaf43fef844', slot: "loading" }, h("salla-skeleton", { key: '06bf42347a2c9f6ff5472a856ead808609bd6792', height: "100%", width: "100%" })), this.product?.images && this.product?.images.length > 0 && (h("salla-slider", { key: '2c70545009d063b72b7ac0a20cdc7cc94ab4c43b', id: `details-slider-${this.product?.id}`, type: "thumbs", loop: false, "auto-height": true, "listen-to-thumbnails-option": true, showThumbsControls: false, controlsOuter: false, showControls: false, class: "s-multiple-bundle-product-options-modal-slider", verticalThumbs: true, thumbsConfig: {
|
|
483
480
|
centeredSlides: true,
|
|
484
481
|
centeredSlidesBounds: true,
|
|
485
482
|
slidesPerView: Math.min(5, Math.max(1, this.product?.images.length)),
|
|
@@ -488,13 +485,13 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
|
|
|
488
485
|
watchSlidesProgress: true,
|
|
489
486
|
direction: 'vertical',
|
|
490
487
|
spaceBetween: 10,
|
|
491
|
-
} }, h("div", { key: '
|
|
488
|
+
} }, h("div", { key: '8747d7510657f714da731f49e8b1e174be95bc66', slot: "items" }, this.product?.images &&
|
|
492
489
|
this.product?.images.map((image, index) => (h("div", { key: index, class: "swiper-slide" }, h("img", { src: image.url, alt: image.alt || `${this.product?.name} - Image ${index + 1}`, loading: "lazy", onError: e => {
|
|
493
490
|
e.target.style.display = 'none';
|
|
494
|
-
} }))))), this.product?.images && this.product?.images.length > 1 && (h("div", { key: '
|
|
491
|
+
} }))))), this.product?.images && this.product?.images.length > 1 && (h("div", { key: '61ca305d33f2b0f40e17c6ce3dc4fd571db7308c', slot: "thumbs" }, this.product?.images &&
|
|
495
492
|
this.product?.images.map((image, index) => (h("div", { key: index, "data-caption": `${this.product?.name} - Image ${index + 1}` }, h("img", { src: image.url, loading: "eager", class: "s-multiple-bundle-product-options-modal-slider-thumb", title: `${this.product?.name} - ${index + 1}`, alt: image.alt || `${this.product?.name} - ${index + 1}`, onError: e => {
|
|
496
493
|
e.target.style.display = 'none';
|
|
497
|
-
} })))))))), h("salla-product-options", { options: JSON.stringify(optionsWithSelectedState), key: `${cacheKey}-reset-${resetToken}`, "product-id": productId, "unique-key": `${cacheKey}-reset-${resetToken}` }), h("div", { key: '
|
|
494
|
+
} })))))))), h("salla-product-options", { options: JSON.stringify(optionsWithSelectedState), key: `${cacheKey}-reset-${resetToken}`, "product-id": productId, "unique-key": `${cacheKey}-reset-${resetToken}` }), h("div", { key: 'd79f6e9a2f753de6c9097bb3a8f095ed9bdde081', slot: "footer" }, h("div", { key: '22f78a4c9b8ad8891cbcd9b5318c5a406258cea1', class: "s-multiple-bundle-product-options-modal-footer" }, h("salla-button", { key: 'f17424c72c6e9d1b9cd0ef2602ac8b52002bc39a', onClick: e => this.onSave(e), loading: this.isLoading, disabled: isDisabled }, this.isLoading
|
|
498
495
|
? salla.lang.get('common.elements.saving')
|
|
499
496
|
: salla.lang.get('common.elements.save')))))));
|
|
500
497
|
}
|
|
@@ -101,8 +101,7 @@ const SallaUserMenu$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserMenu ext
|
|
|
101
101
|
wishlist: WishListIcon,
|
|
102
102
|
wallet: WalletIcon,
|
|
103
103
|
loyalty_program: loyaltyProgramIcon,
|
|
104
|
-
profile: UserCircle
|
|
105
|
-
...(this.sallaAccountEnabled ? { settings: SettingstIcon } : {})
|
|
104
|
+
profile: UserCircle
|
|
106
105
|
};
|
|
107
106
|
// salla.auth.event.onLoggedIn(() => {
|
|
108
107
|
// this.is_loggedIn = true
|
|
@@ -120,13 +119,7 @@ const SallaUserMenu$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserMenu ext
|
|
|
120
119
|
this.loyalty_program = salla.lang.get('pages.loyalty_program.loyalty_points');
|
|
121
120
|
this.logout = salla.lang.get('blocks.header.logout');
|
|
122
121
|
});
|
|
123
|
-
|
|
124
|
-
if (this.host.hasAttribute('with-rating')) {
|
|
125
|
-
this.items.rating = Rate;
|
|
126
|
-
}
|
|
127
|
-
//we need it to be the last item
|
|
128
|
-
this.items.logout = LogoutIcon;
|
|
129
|
-
salla.onReady(() => {
|
|
122
|
+
Salla.onReady(() => {
|
|
130
123
|
if (salla.config.isGuest()) {
|
|
131
124
|
return;
|
|
132
125
|
}
|
|
@@ -161,7 +154,14 @@ const SallaUserMenu$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserMenu ext
|
|
|
161
154
|
await salla.onReady();
|
|
162
155
|
await salla.lang.onLoaded();
|
|
163
156
|
this.sallaAccountEnabled = Salla.config.get('store.features')?.includes('salla-account');
|
|
164
|
-
this.
|
|
157
|
+
this.items = this.sallaAccountEnabled ? { ...this.items, settings: SettingstIcon } : this.items;
|
|
158
|
+
//we need it only in theme-y
|
|
159
|
+
if (this.host.hasAttribute('with-rating')) {
|
|
160
|
+
this.items.rating = Rate;
|
|
161
|
+
}
|
|
162
|
+
//we need it to be the last item
|
|
163
|
+
this.items.logout = LogoutIcon;
|
|
164
|
+
this.profileUrl = `${Salla.config.get('account.url', 'https://accounts.salla.com')}/${salla.config.get('user.language_code')}/user?store=${Salla.config.get('store.id')}&info=${encodeURIComponent(Salla.storage.get('token'))}`;
|
|
165
165
|
const trigger = this.host.querySelector('[slot="trigger"]');
|
|
166
166
|
this.triggerSlot =
|
|
167
167
|
'<div class="s-user-menu-trigger"><div class="s-user-menu-avatar-wrap"><img class="s-user-menu-trigger-avatar" src="{avatar}" alt="{first_name}{last_name}" /></div><div class="s-user-menu-trigger-content"><span class="s-user-menu-trigger-hello">{hello}</span><p class="s-user-menu-trigger-name">{first_name} {last_name}</p></div> <i class="s-user-menu-trigger-icon">{icon}</i></div>';
|