@salla.sa/twilight-components 2.14.312 → 2.14.338
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-CiAt5i10.js → filepond-hpLROc_m.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DdEJEgnf.js → filepond-plugin-file-poster-C8gskRGl.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-0E5awx2w.js → filepond-plugin-file-validate-size-CaO6qVs6.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-gT-JewGH.js → filepond-plugin-file-validate-type-mUUtcgCs.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DtBf5E5M.js → filepond-plugin-image-edit-rptDhPuc.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-DlG1UV1W.js → filepond-plugin-image-exif-orientation-B6L8W0Qe.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Dub3Jpec.js → filepond-plugin-image-preview-BoqOfOki.js} +1 -1
- package/dist/cjs/{index-BP5-4y-K.js → index-2liYDuhx.js} +583 -420
- package/dist/cjs/{index-i_mnWz5-.js → index-ChHHnqio.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion_62.cjs.entry.js +173 -94
- 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 +2 -2
- 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 +60 -12
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +2 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +2 -2
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
- 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 +3 -3
- package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
- package/dist/cjs/salla-review-card.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +1 -1
- package/dist/collection/components/salla-button/salla-button.js +29 -13
- package/dist/collection/components/salla-comments/salla-comment-item.js +8 -3
- package/dist/collection/components/salla-comments/salla-comments.js +1 -1
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +62 -12
- package/dist/collection/components/salla-gifting/salla-gifting.js +3 -3
- package/dist/collection/components/salla-hook/salla-hook.js +1 -1
- package/dist/collection/components/salla-list-tile/salla-list-tile.js +1 -1
- package/dist/collection/components/salla-loading/salla-loading.js +1 -1
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +1 -1
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +15 -2
- package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +1 -1
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-program.js +1 -1
- package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.js +1 -1
- package/dist/collection/components/salla-map/salla-map.js +3 -3
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +1 -1
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +2 -2
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +4 -4
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +2 -2
- package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +1 -1
- package/dist/collection/components/salla-notifications/salla-notification-item.js +1 -1
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -1
- package/dist/collection/components/salla-order-details/salla-order-details-multiple-bundle-product.js +1 -1
- package/dist/collection/components/salla-order-details/salla-order-details.js +1 -1
- package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
- package/dist/collection/components/salla-payments/salla-payments.js +2 -2
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
- package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
- package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
- package/dist/collection/components/salla-product-options/salla-product-options.js +37 -16
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +13 -2
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +2 -2
- package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
- package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
- package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
- package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
- package/dist/collection/components/salla-search/salla-search.js +3 -3
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
- package/dist/collection/components/salla-slider/salla-slider.js +2 -2
- package/dist/collection/components/salla-social/salla-social.js +1 -1
- package/dist/collection/components/salla-social-share/salla-social-share.js +5 -1
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +9 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/collection/plugins/commonjs-cache-fix.js +21 -0
- package/dist/components/axios.js +583 -420
- package/dist/components/index.js +2 -2
- package/dist/components/salla-apps-icons.js +1 -1
- package/dist/components/salla-button2.js +29 -13
- package/dist/components/salla-comment-item2.js +8 -3
- package/dist/components/salla-comments.js +1 -1
- package/dist/components/salla-filters-widget2.js +61 -11
- package/dist/components/salla-gifting.js +3 -3
- package/dist/components/salla-hook.js +1 -1
- package/dist/components/salla-list-tile2.js +1 -1
- package/dist/components/salla-loading2.js +1 -1
- package/dist/components/salla-localization-modal.js +1 -1
- package/dist/components/salla-login-modal.js +15 -2
- package/dist/components/salla-loyalty-prize-item.js +1 -1
- package/dist/components/salla-loyalty-program.js +1 -1
- package/dist/components/salla-maintenance-alert.js +1 -1
- package/dist/components/salla-map2.js +3 -3
- package/dist/components/salla-multiple-bundle-product-cart2.js +1 -1
- package/dist/components/salla-multiple-bundle-product-details2.js +2 -2
- package/dist/components/salla-multiple-bundle-product-options-modal2.js +4 -4
- package/dist/components/salla-multiple-bundle-product-slider2.js +2 -2
- package/dist/components/salla-multiple-bundle-product.js +1 -1
- package/dist/components/salla-notification-item2.js +1 -1
- package/dist/components/salla-offer-modal.js +1 -1
- package/dist/components/salla-order-details-multiple-bundle-product2.js +1 -1
- package/dist/components/salla-order-details.js +1 -1
- package/dist/components/salla-order-summary.js +1 -1
- package/dist/components/salla-payments.js +2 -2
- package/dist/components/salla-placeholder2.js +1 -1
- package/dist/components/salla-price-range2.js +2 -2
- package/dist/components/salla-product-availability2.js +1 -1
- package/dist/components/salla-product-card2.js +5 -5
- package/dist/components/salla-product-options2.js +37 -16
- package/dist/components/salla-product-size-guide.js +2 -2
- package/dist/components/salla-quantity-input.js +13 -2
- package/dist/components/salla-quick-buy2.js +6 -4
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-reviews-page.js +1 -1
- package/dist/components/salla-reviews.js +1 -1
- package/dist/components/salla-scopes.js +1 -1
- package/dist/components/salla-search.js +3 -3
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-slider2.js +2 -2
- package/dist/components/salla-social-share.js +5 -1
- package/dist/components/salla-social.js +1 -1
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-menu.js +9 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/esm/{filepond-aj0Vz3hN.js → filepond-CwjnR_95.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-lPOvqQlG.js → filepond-plugin-file-poster-DES9KQfe.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-CV5FbyeW.js → filepond-plugin-file-validate-size-BcloWdhO.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-B7RUT3W_.js → filepond-plugin-file-validate-type-CbjGxksB.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-CXPgbHP6.js → filepond-plugin-image-edit-BtZ6aJg8.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BKxDLyfR.js → filepond-plugin-image-exif-orientation-BVNb0UTU.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-B3b6dOj7.js → filepond-plugin-image-preview-t1v2q4Jq.js} +1 -1
- package/dist/esm/{index-BVJkSSs6.js → index-CRmtzwUF.js} +583 -420
- package/dist/esm/{index-CvvOXX3k.js → index-HmYGeOpS.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion_62.entry.js +173 -94
- 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 +2 -2
- 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 +60 -12
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +2 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +2 -2
- package/dist/esm/salla-loyalty-program.entry.js +2 -2
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +2 -2
- package/dist/esm/salla-order-summary.entry.js +2 -2
- 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 +3 -3
- package/dist/esm/salla-price-range.entry.js +3 -3
- package/dist/esm/salla-review-card.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +2 -2
- 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 +3 -3
- package/dist/twilight/p-057e38a1.entry.js +4 -0
- package/dist/twilight/p-19f40612.entry.js +4 -0
- package/dist/twilight/{p-56e70b23.entry.js → p-1c31f335.entry.js} +1 -1
- package/dist/twilight/{p-3ba6d234.entry.js → p-1f31af27.entry.js} +1 -1
- package/dist/twilight/{p-caac78a8.entry.js → p-21ced14f.entry.js} +1 -1
- package/dist/twilight/{p-e7eeebf1.entry.js → p-2bb93ed0.entry.js} +1 -1
- package/dist/twilight/{p-a5780098.entry.js → p-3862a37f.entry.js} +1 -1
- package/dist/twilight/{p-65ce7926.entry.js → p-3f45a06b.entry.js} +1 -1
- package/dist/twilight/{p-0dcda629.entry.js → p-403bef37.entry.js} +1 -1
- package/dist/twilight/{p-62e50e0c.entry.js → p-4317d018.entry.js} +1 -1
- package/dist/twilight/{p-da2c81c6.entry.js → p-45053a9b.entry.js} +1 -1
- package/dist/twilight/{p-615331d4.entry.js → p-48d76aa7.entry.js} +1 -1
- package/dist/twilight/{p-366c2a7d.entry.js → p-56d3794f.entry.js} +1 -1
- package/dist/twilight/{p-061ec27c.entry.js → p-69600ceb.entry.js} +1 -1
- package/dist/twilight/{p-3c7c63ee.entry.js → p-817fca09.entry.js} +1 -1
- package/dist/twilight/{p-5606e8dd.entry.js → p-877ee446.entry.js} +1 -1
- package/dist/twilight/p-878f405f.entry.js +4 -0
- package/dist/twilight/{p-883a04da.entry.js → p-88c9cdc0.entry.js} +1 -1
- package/dist/twilight/p-8d231ba5.entry.js +4 -0
- package/dist/twilight/p-9108e972.entry.js +4 -0
- package/dist/twilight/p-95f3e7ea.entry.js +4 -0
- package/dist/twilight/{p-Bf2ln7Tf.js → p-BgkeXrDK.js} +1 -1
- package/dist/twilight/{p-CimxEIO_.js → p-BxtqlawD.js} +2 -2
- package/dist/twilight/p-CRmtzwUF.js +5 -0
- package/dist/twilight/{p-Cau1tMDQ.js → p-DTy6dAEi.js} +1 -1
- package/dist/twilight/{p-CtmyX8MN.js → p-DdMTtNYY.js} +1 -1
- package/dist/twilight/{p-CslymsND.js → p-VCBBJkYb.js} +1 -1
- package/dist/twilight/{p-CJWu6tW6.js → p-YYVkPdoE.js} +1 -1
- package/dist/twilight/{p-7d6d19b9.entry.js → p-a3ae644b.entry.js} +1 -1
- package/dist/twilight/{p-b3311168.entry.js → p-a4ad6d0b.entry.js} +1 -1
- package/dist/twilight/{p-3939ed34.entry.js → p-a665ff5d.entry.js} +1 -1
- package/dist/twilight/{p-032b235d.entry.js → p-a9bec6cf.entry.js} +1 -1
- package/dist/twilight/{p-41b68e9a.entry.js → p-b7f1e672.entry.js} +1 -1
- package/dist/twilight/p-c0f8d377.entry.js +11 -0
- package/dist/twilight/{p-0979d5a6.entry.js → p-e98f8bae.entry.js} +1 -1
- package/dist/twilight/{p-b9090ce1.entry.js → p-eb6378eb.entry.js} +1 -1
- package/dist/twilight/{p-0e4a8f9f.entry.js → p-ef827c32.entry.js} +1 -1
- package/dist/twilight/{p-c133896d.entry.js → p-f01949b5.entry.js} +1 -1
- package/dist/twilight/{p-5afe6962.entry.js → p-f10087fd.entry.js} +1 -1
- package/dist/twilight/{p-f586994e.entry.js → p-f33a5658.entry.js} +1 -1
- package/dist/twilight/p-f4dc16e8.entry.js +4 -0
- package/dist/twilight/{p-eb9bf011.entry.js → p-f6a7b2cf.entry.js} +1 -1
- package/dist/twilight/{p-DZVGmyCg.js → p-sFNa2aTl.js} +1 -1
- package/dist/twilight/{p-BQe0WtLQ.js → p-xAxNmkBV.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-button/salla-button.d.ts +0 -1
- package/dist/types/components/salla-comments/interfaces.d.ts +1 -0
- package/dist/types/components/salla-comments/salla-comment-item.d.ts +1 -0
- package/dist/types/components/salla-filters-widget/salla-filters-widget.d.ts +7 -2
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +8 -0
- package/dist/types/components/salla-quantity-input/salla-quantity-input.d.ts +5 -1
- package/dist/types/components/salla-social-share/salla-social-share.d.ts +1 -0
- package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +1 -0
- package/package.json +5 -5
- package/dist/twilight/p-4657145b.entry.js +0 -11
- package/dist/twilight/p-7f03a939.entry.js +0 -4
- package/dist/twilight/p-87fe3f74.entry.js +0 -4
- package/dist/twilight/p-96f53e45.entry.js +0 -4
- package/dist/twilight/p-BVJkSSs6.js +0 -5
- package/dist/twilight/p-b81e66b2.entry.js +0 -4
- package/dist/twilight/p-d46b3cb6.entry.js +0 -4
- package/dist/twilight/p-e0c73f9b.entry.js +0 -4
- package/dist/twilight/p-f4383a51.entry.js +0 -4
|
@@ -10,7 +10,7 @@ const SallaAppsIcons$1 = /*@__PURE__*/ proxyCustomElement(class SallaAppsIcons e
|
|
|
10
10
|
super();
|
|
11
11
|
this.__registerHost();
|
|
12
12
|
this.apps = salla.config.get('store.apps');
|
|
13
|
-
this.appSlot = this.host.querySelector('[slot="app"]')?.innerHTML || `<img alt={name} src={icon} />`;
|
|
13
|
+
this.appSlot = this.host.querySelector('[slot="app"]')?.innerHTML || `<img alt={name} src={icon} width="135" height="40" />`;
|
|
14
14
|
salla.onReady(() => {
|
|
15
15
|
this.apps = salla.config.get('store.apps');
|
|
16
16
|
});
|
|
@@ -9,7 +9,6 @@ const SallaButton = /*@__PURE__*/ proxyCustomElement(class SallaButton extends H
|
|
|
9
9
|
constructor() {
|
|
10
10
|
super();
|
|
11
11
|
this.__registerHost();
|
|
12
|
-
this.hostAttributes = {};
|
|
13
12
|
/**
|
|
14
13
|
* Button Type
|
|
15
14
|
*/
|
|
@@ -97,23 +96,40 @@ const SallaButton = /*@__PURE__*/ proxyCustomElement(class SallaButton extends H
|
|
|
97
96
|
return this.host;
|
|
98
97
|
}
|
|
99
98
|
getBtnAttributes() {
|
|
99
|
+
const hostAttributes = {};
|
|
100
100
|
for (let i = 0; i < this.host.attributes.length; i++) {
|
|
101
101
|
if (!['color', 'fill', 'size', 'width', 'id'].includes(this.host.attributes[i].name)) {
|
|
102
|
-
|
|
102
|
+
hostAttributes[this.host.attributes[i].name] = this.host.attributes[i].value;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
hostAttributes.type = hostAttributes.type || this.type;
|
|
106
|
+
const buttonClass = hostAttributes.class || '';
|
|
107
|
+
hostAttributes.class = buttonClass +
|
|
107
108
|
' s-button-element s-button-' + this.shape
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
109
|
+
+ ' s-button-' + (this.fill == "none" ? 'fill-none' : this.fill)
|
|
110
|
+
+ (this.size != "medium" ? ' s-button-' + this.size : '')
|
|
111
|
+
+ (this.width != "normal" ? ' s-button-' + this.width : '')
|
|
112
|
+
+ (this.shape == "link" ? ' s-button-' + this.color + '-link' : '')
|
|
113
|
+
+ (this.shape != "link" && this.fill != 'outline' ? ' s-button-' + this.color : '')
|
|
114
|
+
+ (this.fill == 'outline' ? ' s-button-' + this.color + '-outline' : '')
|
|
115
|
+
+ (this.disabled ? ' s-button-disabled ' : '')
|
|
116
|
+
+ (this.shape == 'icon' ? ' s-button-loader-center' : ' s-button-loader-' + this.loaderPosition);
|
|
117
|
+
if (!hostAttributes['aria-label'] && !hostAttributes['aria-labelledby']) {
|
|
118
|
+
const buttonText = (this.host.textContent || '').trim();
|
|
119
|
+
// Only add aria-label for buttons without visible text (icon buttons)
|
|
120
|
+
// Buttons with visible text don't need aria-label as screen readers already announce the text
|
|
121
|
+
if (!buttonText) {
|
|
122
|
+
// Check if it's a wishlist button and add aria-label automatically
|
|
123
|
+
const isWishlistButton = buttonClass.includes('btn--wishlist') || buttonClass.includes('wishlist');
|
|
124
|
+
if (isWishlistButton) {
|
|
125
|
+
hostAttributes['aria-label'] = salla.lang.getWithDefault('pages.products.add_to_wishlist', 'Add or remove to wishlist');
|
|
126
|
+
}
|
|
127
|
+
else if (this.shape === 'icon') {
|
|
128
|
+
console.warn('Icon button is missing aria-label attribute');
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return hostAttributes;
|
|
117
133
|
}
|
|
118
134
|
button() {
|
|
119
135
|
return (h("button", { ...this.getBtnAttributes(), disabled: this.disabled }, h("span", { class: "s-button-text", ref: el => this.text = el }, h("slot", null)), this.loading ? h("span", { class: "s-button-loader" }) : ''));
|
|
@@ -138,15 +138,20 @@ const SallaCommentItem = /*@__PURE__*/ proxyCustomElement(class SallaCommentItem
|
|
|
138
138
|
}
|
|
139
139
|
localStorage.setItem('liked_comments', JSON.stringify(this.likedComments));
|
|
140
140
|
}
|
|
141
|
+
PinnedIcon() {
|
|
142
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "16", height: "16", color: "#555555", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M12 16V21" }), h("path", { d: "M8 5.2918C8 5.02079 8 4.88529 8.01312 4.77132C8.1194 3.84789 8.84789 3.1194 9.77133 3.01312C9.88529 3 10.0208 3 10.2918 3H13.7082C13.9792 3 14.1147 3 14.2287 3.01312C15.1521 3.1194 15.8806 3.84789 15.9869 4.77132C16 4.88529 16 5.02079 16 5.2918C16 5.37885 16 5.42237 15.9967 5.46264C15.9708 5.78281 15.7927 6.07104 15.5179 6.2374C15.4834 6.25832 15.4444 6.27779 15.3666 6.31672L15.1055 6.44726C14.7021 6.64897 14.5003 6.74983 14.3681 6.90564C14.26 7.03286 14.1856 7.18509 14.1515 7.34846C14.1097 7.54854 14.1539 7.76968 14.2424 8.21197L15 12H15.3333C15.9533 12 16.2633 12 16.5176 12.0681C17.2078 12.2531 17.7469 12.7922 17.9319 13.4824C18 13.7367 18 14.0467 18 14.6667C18 14.9767 18 15.1317 17.9659 15.2588C17.8735 15.6039 17.6039 15.8735 17.2588 15.9659C17.1317 16 16.9767 16 16.6667 16H7.33333C7.02334 16 6.86835 16 6.74118 15.9659C6.39609 15.8735 6.12654 15.6039 6.03407 15.2588C6 15.1317 6 14.9767 6 14.6667C6 14.0467 6 13.7367 6.06815 13.4824C6.25308 12.7922 6.79218 12.2531 7.48236 12.0681C7.73669 12 8.04669 12 8.66667 12H9L9.75761 8.21197C9.84606 7.76968 9.89029 7.54854 9.84852 7.34846C9.81441 7.18509 9.73995 7.03286 9.63194 6.90564C9.49965 6.74983 9.29794 6.64897 8.89452 6.44726L8.63344 6.31672C8.55558 6.27779 8.51665 6.25832 8.48208 6.2374C8.20731 6.07104 8.02917 5.78281 8.00326 5.46264C8 5.42237 8 5.37885 8 5.2918Z" })));
|
|
143
|
+
}
|
|
141
144
|
render() {
|
|
142
145
|
let isAdmin = this.comment.type == 'admin';
|
|
143
|
-
return (h(Host, { key: '
|
|
146
|
+
return (h(Host, { key: '05979122884df06d634ab4f75f61d12cee93b228', class: isAdmin ? 's-comments-item-admin' : 's-comments-item' }, h("div", { key: 'd3be984afb159d8d6a1d4c0daf0bb72c97136a3a', class: { "s-comments-item-wrapper": !isAdmin, "s-comments-item-admin-wrapper": isAdmin }, id: `s-comments-item-${this.comment.id}` }, h("div", { key: '29a48174434b634e4afa5a1f2339b04705ea9f90', class: "s-comments-item-inner s-comments-flex-1" }, isAdmin && h("span", { key: 'b2536843c0549b2eb24759a09f51a97b68e36654', class: "s-comments-item-reply-icon", innerHTML: Reply }), h("div", { key: '553ad8fd8a3ada5cbca3c744f8b80a259ae7d2c2', class: "s-comments-item-avatar" }, h("img", { key: '57d429fa1dc545d3fe16c1f4713b960d1d7ef9f8', "data-src": this.comment?.avatar, alt: this.comment?.name, src: this.comment?.avatar, class: "s-comments-item-avatar-img lazy" })), h("div", { key: '8b2a3206dfa97c41a731baf18794e44ce096876f', class: "s-comments-flex-1" }, h("div", { key: '95ebefb4d82bb66d7cbc567554d0b9da2e4b416a', class: "s-comments-item-user-wrapper" }, h("div", { key: '1e6091d08973e5fc2ae8a982e6b09e5d349fede3', class: "s-comments-item-user-info" }, h("h3", { key: 'ee5ea0ea457fc43ee49cae033097297ab8358f76', class: this.comment.is_pinned ? "s-comments-item-user-info-name" : "s-comments-item-user-info-name-with-margin" }, this.comment?.name), this.comment.is_pinned ?
|
|
147
|
+
h("div", { class: "s-comments-item-pinned-icon-with-margin" }, this.PinnedIcon())
|
|
148
|
+
: null, (this.comment.has_order || !!this.comment.rating) && !this.comment.is_pending && !this.hideBought ?
|
|
144
149
|
h("div", { class: "s-comments-flex" }, this.comment.has_order ?
|
|
145
150
|
[h("span", { class: "s-comments-item-has-order-check-icon", innerHTML: IconVerified }), h("span", { class: "s-comments-item-has-order-check-text" }, this.has_bought_trans, " ", this.comment.rating ? ', ' : '')] : null, !!this.comment.rating ?
|
|
146
151
|
h("span", { class: "s-comments-item-rated-widget" }, this.rated_trans) : null)
|
|
147
|
-
: null), h("p", { key: '
|
|
152
|
+
: null), h("p", { key: '80c430d77b6ae3e959db9bc089fd7fe834e56bd2', class: "s-comments-item-timestamp s-ltr" }, this.getDate(this.comment.created_at?.date), h("span", { key: '49a1b26309490d6252f0fbd53b50374cbf10071d', class: "s-comments-item-time" }, " - ", this.getTime(this.comment.created_at?.date))), !!this.comment.rating || !!this.comment.stars ?
|
|
148
153
|
h("salla-rating-stars", { size: "mini", class: "s-comments-item-stars", value: this.comment.rating || this.comment.stars })
|
|
149
|
-
: null), h("div", { key: '
|
|
154
|
+
: null), h("div", { key: '780bee1166000b296e6956921c71cfd4f48e8153', class: "s-comments-item-content" }, h("p", { key: '9ff2a32cbd551ff911300ce6cfa1065770117a18', innerHTML: this.comment.content }), this.allowAttachImages && h("div", { key: 'f47022f4916c3d4e0641273612b4a5f7c69a4595', class: "s-comments-item-images" }, this.comment.images.map((image, index) => (h("img", { key: index, src: image, alt: "", onClick: () => this.modal.open() }))), h("salla-modal", { key: '8e70ec00301d369bbed5c1f11a1887a0498e2b0c', ref: modal => this.modal = modal, width: "sm" }, h("salla-slider", { key: '65cb35fd60869f64780fbb5bfc61fbc3cddc49c9', id: `s-comments-item-${this.comment.id}-images`, class: "s-comments-item-images-slider", type: "thumbs", "auto-height": true, showControls: this.comment.images.length > 1 ? true : false, "show-thumbs-controls": "false" }, h("div", { key: 'bb0cf465f99ecfe9ee10dfb96949cd7b5793da90', slot: 'items' }, this.comment.images.map((image, index) => (h("img", { key: index, src: image, alt: "" })))), h("div", { key: 'e195759f1df5a87b761478ac4a379411f284785c', slot: "thumbs" }, this.comment.images.map((image, index) => (h("div", { class: "s-comments-item-images-slider-thumb" }, h("img", { key: index, src: image, alt: "" })))))))), this.allowLikes && !isAdmin && salla.url.is_page('product.single') ? h("salla-button", { ref: el => this.likeBtn = el, class: `s-comments-item-like-btn ${this.likedComments.includes(this.comment.id) ? 'liked' : ''}`, loaderPosition: 'center', fill: 'outline', size: 'small', onClick: () => this.toggleLike() }, h("span", null, this.helpfulLabel, " ", this.likesCount > 0 ? `(${this.likesCount})` : ''), h("span", { innerHTML: ThumbsUp })) : '', this.comment.is_pending ?
|
|
150
155
|
h("span", { class: "s-comments-item-pending-text" }, this.waiting_approval_trans) : null))), !!this.getReplies().length && !isAdmin ?
|
|
151
156
|
this.getReplies().map((reply) => {
|
|
152
157
|
return h("div", null, h("salla-comment-item", { comment: reply }));
|
|
@@ -279,7 +279,7 @@ const SallaComments$1 = /*@__PURE__*/ proxyCustomElement(class SallaComments ext
|
|
|
279
279
|
return (h("div", null, !!this.total && !this.hideTitle ? h("h2", { class: "s-comments-title" }, this.blockTitle ? this.blockTitle : this.comment_title) : '', !this.hideForm && !this.testimonials ? h("salla-comment-form", { showAvatar: this.showFormAvatar, type: this.type, "item-id": this.itemId }) : '', h("div", { class: "s-comments-placeholder" }, h("span", { innerHTML: ChatBubbles }), h("p", null, this.noComments))));
|
|
280
280
|
}
|
|
281
281
|
return (h("div", { class: `s-comments s-comments-${this.testimonials ? 'testimonials' : this.type}` }, h("div", { class: `${this.type === CommentType.PAGE ? "s-comments-page-container" : "s-comments-container"}` }, !!this.total && !this.hideTitle ? h("h2", { class: "s-comments-title" }, this.blockTitle ? this.blockTitle : this.comment_title) : '', !this.hideForm && h("salla-comment-form", { showAvatar: this.showFormAvatar, type: this.type, "item-id": this.itemId }), salla.url.is_page('product.single') ? h("salla-reviews-summary", { itemId: this.itemId }) : '', h("div", { class: `s-comments-header ${this.total ? "has-total" : ""}` }, !!this.total && h("span", { class: "s-comments-count-label", innerHTML: this.pluralize(this.comment_name, this.total) }), !!this.total && !this.testimonials && this.type !== CommentType.BLOG ?
|
|
282
|
-
h("div", { class: "s-comments-filter-wrapper" }, h("label", { class: "s-comments-filter-label", htmlFor: "comments-filter" }, salla.lang.get('pages.categories.sorting')), h("select", { id: "comments-filter", class: "s-form-control s-comments-sort-input", onChange: (e) => {
|
|
282
|
+
h("div", { class: "s-comments-filter-wrapper" }, h("label", { class: "s-comments-filter-label", htmlFor: "comments-filter" }, salla.lang.get('pages.categories.sorting')), h("select", { id: "comments-filter", "aria-label": salla.lang.get('pages.categories.sorting'), class: "s-form-control s-comments-sort-input", onChange: (e) => {
|
|
283
283
|
this.sort = e.target.value;
|
|
284
284
|
this.reload();
|
|
285
285
|
} }, h("option", { value: "latest", selected: true }, salla.lang.get("pages.testimonials.sort_by_date_desc")), h("option", { value: "oldest" }, salla.lang.get("pages.testimonials.sort_by_date_asc")), this.allowLikes && h("option", { value: "most_helpful" }, this.mostHelpfulLabel)))
|
|
@@ -33,16 +33,21 @@ const SallaFiltersWidget = /*@__PURE__*/ proxyCustomElement(class SallaFiltersWi
|
|
|
33
33
|
super();
|
|
34
34
|
this.__registerHost();
|
|
35
35
|
this.changed = createEvent(this, "changed", 7);
|
|
36
|
-
this.
|
|
36
|
+
this.initialItemCount = 10; // Show 10 items initially
|
|
37
|
+
this.expandedItemCount = 15; // Show 15 items when expanded
|
|
38
|
+
this.calculatedInitialHeight = 0; // Calculated based on actual content
|
|
39
|
+
this.calculatedExpandedHeight = 0; // Calculated based on actual content
|
|
37
40
|
this.isOpen = true;
|
|
38
41
|
this.isShowMore = false;
|
|
39
42
|
this.showMoreLabel = "عرض المزيد";
|
|
40
43
|
this.showLessLabel = "عرض أقل";
|
|
41
44
|
this.page = salla.config.get('page');
|
|
45
|
+
this.searchQuery = '';
|
|
46
|
+
this.filteredCount = 0; // Track filtered results count
|
|
42
47
|
}
|
|
43
48
|
connectedCallback() {
|
|
44
|
-
//
|
|
45
|
-
this.withLoadMore = this.option.key != 'price' && Array.isArray(this.option.values) && this.option.values.length >
|
|
49
|
+
// Show "Show More" button if there are more than 10 items
|
|
50
|
+
this.withLoadMore = this.option.key != 'price' && Array.isArray(this.option.values) && this.option.values.length > this.initialItemCount;
|
|
46
51
|
salla.onReady(() => {
|
|
47
52
|
this.page = salla.config.get('page');
|
|
48
53
|
});
|
|
@@ -52,8 +57,25 @@ const SallaFiltersWidget = /*@__PURE__*/ proxyCustomElement(class SallaFiltersWi
|
|
|
52
57
|
});
|
|
53
58
|
}
|
|
54
59
|
componentDidLoad() {
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
// Use fixed height per item for predictable calculations
|
|
61
|
+
// Each item is approximately 20px, so we calculate based on item count
|
|
62
|
+
const itemHeight = 20; // Fixed height per item
|
|
63
|
+
const paddingPerItem = 15; // Additional padding per item for margins/spacing
|
|
64
|
+
const allItems = this.widgetValues.querySelectorAll('.s-filters-label');
|
|
65
|
+
if (allItems.length > 0) {
|
|
66
|
+
const itemsToMeasure = Math.min(this.initialItemCount, allItems.length);
|
|
67
|
+
// Calculate initial height: (items × height) + (items × padding)
|
|
68
|
+
this.calculatedInitialHeight = this.initialItemCount * (itemHeight + paddingPerItem);
|
|
69
|
+
// Calculate expanded height based on first 15 items
|
|
70
|
+
if (allItems.length > this.initialItemCount) {
|
|
71
|
+
this.calculatedExpandedHeight = this.expandedItemCount * (itemHeight + paddingPerItem);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
this.calculatedExpandedHeight = itemsToMeasure * (itemHeight + paddingPerItem);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
this.widgetValues.scrollHeight < this.calculatedInitialHeight && (this.withLoadMore = false);
|
|
78
|
+
(this.withLoadMore && this.widgetValues) && (this.widgetValues.style.maxHeight = `${this.calculatedInitialHeight}px`);
|
|
57
79
|
this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;
|
|
58
80
|
}
|
|
59
81
|
/**
|
|
@@ -95,10 +117,21 @@ const SallaFiltersWidget = /*@__PURE__*/ proxyCustomElement(class SallaFiltersWi
|
|
|
95
117
|
async showMore() {
|
|
96
118
|
this.isShowMore = !this.isShowMore;
|
|
97
119
|
this.widgetContent.style.height = 'auto';
|
|
98
|
-
|
|
120
|
+
// Reset scroll position to top when collapsing to prevent content cutting
|
|
121
|
+
if (!this.isShowMore) {
|
|
122
|
+
this.widgetValues.scrollTop = 0;
|
|
123
|
+
}
|
|
124
|
+
// Use calculated heights based on actual content
|
|
125
|
+
const maxHeight = this.isShowMore ? this.calculatedExpandedHeight : this.calculatedInitialHeight;
|
|
126
|
+
// Calculate actual item count
|
|
127
|
+
const actualCount = this.searchQuery ? this.filteredCount : (Array.isArray(this.option.values) ? this.option.values.length : 0);
|
|
128
|
+
// When showing more: expand to 15 items height with scrollbar for items beyond 15
|
|
129
|
+
// When showing less: collapse to 10 items height
|
|
130
|
+
this.widgetValues.style.maxHeight = `${maxHeight}px`;
|
|
131
|
+
this.widgetValues.style.overflowY = this.isShowMore && actualCount > this.expandedItemCount ? 'auto' : 'hidden';
|
|
99
132
|
setTimeout(() => {
|
|
100
133
|
this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;
|
|
101
|
-
}, 400); // get height after time of collapse
|
|
134
|
+
}, 400); // get height after time of collapse animation (duration-300)
|
|
102
135
|
}
|
|
103
136
|
/**
|
|
104
137
|
* Action to toggle widget open or closed (expand/ collapse).
|
|
@@ -112,7 +145,22 @@ const SallaFiltersWidget = /*@__PURE__*/ proxyCustomElement(class SallaFiltersWi
|
|
|
112
145
|
return '';
|
|
113
146
|
}
|
|
114
147
|
//@ts-ignore
|
|
115
|
-
|
|
148
|
+
const filteredValues = option.values.filter((filterOption) => {
|
|
149
|
+
if (!this.searchQuery)
|
|
150
|
+
return true;
|
|
151
|
+
const label = typeof filterOption === 'number'
|
|
152
|
+
? String(filterOption)
|
|
153
|
+
: (filterOption?.value || filterOption?.key || '');
|
|
154
|
+
return String(label).toLowerCase().includes(this.searchQuery.toLowerCase());
|
|
155
|
+
});
|
|
156
|
+
// Update filtered count for show more button logic
|
|
157
|
+
this.filteredCount = filteredValues.length;
|
|
158
|
+
// Show empty state if no results
|
|
159
|
+
if (filteredValues.length === 0) {
|
|
160
|
+
return (h("div", { class: "s-filters-widget-empty-state" }, salla.lang.get('common.elements.no_options') || 'لا توجد نتائج'));
|
|
161
|
+
}
|
|
162
|
+
//@ts-ignore
|
|
163
|
+
return filteredValues.map((filterOption, index) => {
|
|
116
164
|
let value = typeof filterOption == 'number' ? filterOption : (filterOption.key || filterOption.value);
|
|
117
165
|
return h("label", { class: "s-filters-label", htmlFor: `${option.key}-option-${value}`, key: `${option.key}-option-${value}` }, h("input", { id: `${option.key}-option-${value}`, name: option.key, type: "radio", checked: this.isSelectedOption(option, value), class: `s-filters-radio`, onChange: event => this.changed.emit({ event, option, value }) }), this.getOptionLabel(option, filterOption));
|
|
118
166
|
});
|
|
@@ -142,12 +190,12 @@ const SallaFiltersWidget = /*@__PURE__*/ proxyCustomElement(class SallaFiltersWi
|
|
|
142
190
|
return h("span", { class: "s-filters-option-name" }, label);
|
|
143
191
|
}
|
|
144
192
|
render() {
|
|
145
|
-
return (h(Host, { key: '
|
|
193
|
+
return (h(Host, { key: '077daba99bcd27c940a4e4efaf1bfee325952b9f', class: "s-filters-widget-container" }, h("h3", { key: '2ad33389bea9078357d8feabda3d1d813cc57887', class: "s-filters-widget-title", onClick: () => this.toggleWidget() }, h("span", { key: '8084e6e7032fde8a71c962db8025a17e22a0e017' }, this.option.label), h("span", { key: '56fa918f5391b3cfe6e58ffff2a5178515c49679', class: `s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}` })), h("div", { key: '6935232082047b6147f24c332d48f0b8e6b028ba', class: "s-filters-widget-content", ref: (el) => this.widgetContent = el }, Array.isArray(this.option.values) && this.option.values.length > 5 && (h("div", { key: '1dc3c9aa881bcc2998d6460b296e92fb9dbeccc9', class: "s-filters-widget-search-wrapper", style: { padding: '8px 0', marginBottom: '8px' } }, h("input", { key: '296e9b6356ec5f646ecb7e255e79f9302b73b94a', type: "text", class: "s-filters-widget-search-input", placeholder: salla.lang.get('blocks.header.search_placeholder') || 'بحث...', value: this.searchQuery, onInput: (e) => this.searchQuery = e.target.value }))), h("div", { key: 'de9f573e83242f244a0f700e95913ce5701aba6c', class: "s-filters-widget-values", ref: (el) => this.widgetValues = el }, h("slot", { key: 'af9a5e720b01c69a5da1f9fa0c5e24fd811f7606' }), this.option.type !== FilterOptionTypes.RANGE
|
|
146
194
|
? this.renderFilterOption(this.option)
|
|
147
195
|
: h("salla-price-range", { onChanged: (event) => {
|
|
148
196
|
this.changed.emit(event.detail);
|
|
149
|
-
}, ref: price => this.priceRange = price, filtersData: this.filtersData, option: this.option })), this.withLoadMore &&
|
|
150
|
-
h("a", { key: '
|
|
197
|
+
}, ref: price => this.priceRange = price, filtersData: this.filtersData, option: this.option })), this.withLoadMore && (!this.searchQuery || this.filteredCount > this.initialItemCount) &&
|
|
198
|
+
h("a", { key: '0d849529f9fe7d9543f63cc3a035850ec5578b2c', class: "s-filters-widget-more", onClick: () => this.showMore() }, !this.isShowMore ? this.showMoreLabel : this.showLessLabel))));
|
|
151
199
|
}
|
|
152
200
|
get host() { return this; }
|
|
153
201
|
static get style() { return sallaFiltersWidgetCss; }
|
|
@@ -160,6 +208,8 @@ const SallaFiltersWidget = /*@__PURE__*/ proxyCustomElement(class SallaFiltersWi
|
|
|
160
208
|
"showMoreLabel": [32],
|
|
161
209
|
"showLessLabel": [32],
|
|
162
210
|
"page": [32],
|
|
211
|
+
"searchQuery": [32],
|
|
212
|
+
"filteredCount": [32],
|
|
163
213
|
"setWidgetHeight": [64],
|
|
164
214
|
"reset": [64],
|
|
165
215
|
"showMore": [64],
|
|
@@ -472,7 +472,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
472
472
|
}
|
|
473
473
|
render() {
|
|
474
474
|
return [
|
|
475
|
-
h("div", { key: '
|
|
475
|
+
h("div", { key: '69f449221a2abf8e4d9264b46ab023eb7baca314' }, h("salla-list-tile", { key: '0072bab6171c9b11e54f0c6655c408b12d554e24', class: this.generateClass() }, h("div", { key: '38aa5f8decf6d9c97253c3c16b80a478d623985e', slot: "title" }, this.vertical ? h("span", { innerHTML: GiftSharing }) : '', h("h3", { key: '37fddbe7a80f38b3acca42220028208cab52ba15' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: 'b3bf6bff40b60a3fbace637ed69f6aa72853c04b', slot: "subtitle" }, h("div", { key: '46643b7cd897524ca42c41da24e657401f85ab28' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: '5129acfd67425ccfad68b3770843f11c9fa55b18', slot: "action" }, h("salla-button", { key: '0e93efc647444a26198e4631614b8590f75f122e', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: 'b88d95a25308cebc29b796bb2b0c25e4fa230406', name: "widget-btn-content" }, h("div", { key: '4cdbaaeb2bc67f056ea348755ffbdfbc831a1a5b', class: "s-gifting-widget-action-content" }, h("span", { key: '7dfec389970416df9be46c8ae5f0904dd64e17ad', innerHTML: GiftSharing }), " \u00A0", h("span", { key: '768f3621011bc3c984dce13ce83b3fb6cceb0171' }, this.sectionBtnText)))))), h("salla-modal", { key: 'b3c94ef80f955b42baecd963f5550f17a80c6fb4', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: 'c09e12eabff63ba1a781c8980b449f854affc164', slot: "loading" }, h("div", { key: 'dbafa39345c573eae0d045a7d23e346f7068ec0b', class: "s-gifting-skeleton" }, h("div", { key: 'ff247ea5c79b87ca1c76e6035813d7ecb2caeff2', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: '1e67bea2f1f957744c4f6f0af83ded347799916e', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '6486434a702624358211c22e7a6b48be16d96c42', class: "s-gifting-modal-title" }, h("div", { key: '688854d37e5ca46fcaa7957d3e72a52d7c706f8d', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: '9fcbb2086aa25b02effdc873bbfd45087e673de6', height: '15px', width: '150px' })))), h("div", { key: '1b9bf709a01b20e87d68f92f3cb93600214460cd', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: 'ba6b0c87442412398c360da1f6e8b5094812900f', height: '10px', width: '150px' }), h("salla-skeleton", { key: '6583783ace4e2668705c47c4bcac2a33b346a72b', height: '230px' }), h("salla-skeleton", { key: 'c76b038f100072d56a7cedd0438eeacc98bf7b42', height: '10px', width: '150px' }), h("salla-skeleton", { key: '1d331e7be7cd88ea5c108f331626dddc74699ed2', height: '30px' }), h("salla-skeleton", { key: '5cc3d1b8d67b7bf199219099af909591b8a8a869', height: '40px' })))), h("slot", { key: '9dc4c6f3a717e16e3527f9651b05a74ca1a6212c', name: "header" }), !!this.hasError ?
|
|
476
476
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
|
|
477
477
|
:
|
|
478
478
|
[
|
|
@@ -486,9 +486,9 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
486
486
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.name']) : ''), h("div", { class: this.errors && this.errors['receiver.mobile'] ? "s-form-group s-form-has-error anime-item opacity-0" : "s-form-group anime-item opacity-0" }, h("label", { class: "s-form-label" }, this.receiverMobileFieldLabel), h("salla-tel-input", { class: "s-gifting-tel-input", phone: this.receiverMobile, countryCode: this.selectedCountryCode || this.receiverCountryCode, key: `tel-input-${this.selectedCountryCode || this.receiverCountryCode || 'default'}`, onPhoneEntered: (e) => this.handlePhoneInputChange(e) }), this.errors && this.errors['receiver.mobile'] ?
|
|
487
487
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.mobile']) : ''), this.physicalProducts &&
|
|
488
488
|
h("div", null, h("div", { class: this.errors && this.errors['receiver.country'] ? "s-form-group s-form-has-error anime-item opacity-0" : "s-form-group anime-item opacity-0" }, h("label", { class: "s-form-label" }, this.receiverCountryFieldLabel), h("select", { name: "country", class: "s-form-control", onChange: (event) => this.handleCountryChange(event), required: true }, h("option", { value: "" }, this.selectCountry), this.gift?.countries?.map((country) => (h("option", { value: country.id }, country.name)))), this.errors && this.errors['receiver.country'] ?
|
|
489
|
-
h("span", { class: "s-gifting-error" }, this.errors['receiver.country']) : ''), h("div", { class: this.errors && this.errors['receiver.city_id'] ? "s-form-group s-form-has-error anime-item opacity-0" : "s-form-group anime-item opacity-0" }, h("label", { class: "s-form-label" }, this.receiverCityFieldLabel), h("select", { name: "city", class: "s-form-control", onChange: (event) => this.handleReceiverCity(event), disabled: this.loadingCities }, h("option", { value: "", selected: true }, this.loadingCities ? salla.lang.get('common.elements.loading') : this.selectCity), this.gift?.cities?.map((city) => (h("option", { value: city.id }, city.name)))), this.errors && this.errors['receiver.city_id'] ?
|
|
489
|
+
h("span", { class: "s-gifting-error" }, this.errors['receiver.country']) : ''), h("div", { class: this.errors && this.errors['receiver.city_id'] ? "s-form-group s-form-has-error anime-item opacity-0" : "s-form-group anime-item opacity-0" }, h("label", { class: "s-form-label" }, this.receiverCityFieldLabel), h("select", { name: "city", "aria-label": salla.lang.get('blocks.buy_as_gift.select_city'), class: "s-form-control", onChange: (event) => this.handleReceiverCity(event), disabled: this.loadingCities }, h("option", { value: "", selected: true }, this.loadingCities ? salla.lang.get('common.elements.loading') : this.selectCity), this.gift?.cities?.map((city) => (h("option", { value: city.id }, city.name)))), this.errors && this.errors['receiver.city_id'] ?
|
|
490
490
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), h("div", { class: "s-gifting-info anime-item opacity-0" }, h("span", { innerHTML: Alert }), h("span", null, this.selectCityInfo))), !this.physicalProducts && h("div", { class: "anime-item opacity-0" }, h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, h("label", { class: "s-form-label" }, this.selectSendDateAndTime), h("salla-datetime-picker", { value: this.deliveryDate, placeholder: this.selectSendDateAndTime, "enable-time": true, "date-format": "Y-m-d h:i K", onPicked: (event) => this.handleDateTimePicker(event) }), h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), h("div", { class: "s-gifting-step-two-footer anime-item opacity-0" }, h("a", { href: "#!", innerHTML: IconArrowLeft, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
|
|
491
|
-
], h("slot", { key: '
|
|
491
|
+
], h("slot", { key: '2ca6746edd5e72c996633b6d0b3ccdc5009198c4', name: "footer" })))
|
|
492
492
|
];
|
|
493
493
|
}
|
|
494
494
|
static get style() { return sallaGiftingCss; }
|
|
@@ -13,7 +13,7 @@ const SallaHook$1 = /*@__PURE__*/ proxyCustomElement(class SallaHook extends HTM
|
|
|
13
13
|
this.host.before(element);
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return h(Host, { key: '
|
|
16
|
+
return h(Host, { key: '189812f50392c4713c5d178b7ca17934b6407eac' });
|
|
17
17
|
}
|
|
18
18
|
async componentDidLoad() {
|
|
19
19
|
// Register this component for hooks system, already on it logic to run componentDidLoad trigger
|
|
@@ -25,7 +25,7 @@ const SallaListTile = /*@__PURE__*/ proxyCustomElement(class SallaListTile exten
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: '1e84d5e259adbf61502fbe1ee771ce948c87f218' }, h("a", { key: '5e28c64a0f1c62e6749a32859180e705f99af27e', class: this.generateClass(), href: this.href || "#", target: this.target, "aria-label": "List Tile Link" }, h("div", { key: 'ace3fdaae7332c4c23ab411f0b97cb0699c26ec2', class: "s-list-tile-item-icon" }, h("slot", { key: 'f8790cd45f2004691b156ef96d12a0f003d99899', name: 'icon' })), h("div", { key: 'a788d022e2afe3cd383c321f4100dafbae84f844', class: "s-list-tile-item-content" }, h("div", { key: 'a07afce13d054e11236ffb282901de9db3d23923', class: "s-list-tile-item-title" }, h("slot", { key: '43c23495cfb026ddba8739dcc1a619ec25fe98e0', name: 'title' })), h("div", { key: 'db5e2767a4220ee5d658b3b9384c28d0e105febb', class: "s-list-tile-item-subtitle" }, h("slot", { key: '245f602055419b1f32fa943805a72c6a207eea3f', name: "subtitle" }))), h("div", { key: '394a2d1402d3e8346cbc1ebd8d410405ed568c77', class: "s-list-tile-item-action" }, h("slot", { key: '6086eb6b1f9894f5a3a77ca484c74dd06f0d468f', name: 'action' })))));
|
|
29
29
|
}
|
|
30
30
|
static get style() { return sallaListTileCss; }
|
|
31
31
|
}, [4, "salla-list-tile", {
|
|
@@ -27,7 +27,7 @@ const SallaLoading = /*@__PURE__*/ proxyCustomElement(class SallaLoading extends
|
|
|
27
27
|
this.bgColor = "#e5e7eb";
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '2592e9504b03cb78f212d57e51c19075172fadd0', class: "s-loading-container" }, h("svg", { key: '4d495370551559a59423d5b672a3f1b4ed6bd7e3', "aria-hidden": "true", style: { width: `${this.size}px`, height: `${this.size}px`, fill: this.color, color: this.bgColor }, class: "s-loading", viewBox: "0 0 100 101", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'aedf2f6df87ac1dc82c32180cbf11dcf925a2267', d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z", fill: "currentColor" }), h("path", { key: 'db02a829fe6142c41f43f4c6d3d07695b1fa41f9', d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z", fill: "currentFill" }))));
|
|
31
31
|
}
|
|
32
32
|
static get style() { return sallaLoadingCss; }
|
|
33
33
|
}, [0, "salla-loading", {
|
|
@@ -110,7 +110,7 @@ const SallaLocalizationModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoc
|
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
render() {
|
|
113
|
-
return (h("salla-modal", { key: '
|
|
113
|
+
return (h("salla-modal", { key: '8f37a27df315cdc0c28e3294dc91209c852be37f', isLoading: true, class: "s-hidden", ref: modal => this.modal = modal, width: "xs" }, h("div", { key: 'f12693b51bd57a866dd5eb40dedfb824262d69c9', slot: 'loading' }, h("div", { key: 'cf40e4ae38a9bffe76b63688b59638a534dfbfeb', class: "s-localization-modal-skeleton" }, h("salla-skeleton", { key: 'b58668b0c16863b7998832c4be120636b32e4b05', width: '25%', height: '15px' }), h("div", { key: '2277672008dd8895791954ad3f8ac0bf090095cd', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: 'e22fe136879a706972c05b2b9ea8ab85be57b82f', width: '25%', height: '15px' }), h("div", { key: '8800d040033db851d2903c05fe0ce947072aae2e', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: '3248a10d8023fa2c8b411294da1072d4209e9a87', height: '40px', width: '100%' }))), !!this.hasError ?
|
|
114
114
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "description" }, this.errorMessage)) :
|
|
115
115
|
h("div", { class: "s-localization-modal-inner" }, this.languages.length > 1 ?
|
|
116
116
|
h("div", { class: "s-localization-modal-section" }, h("label", { class: "s-localization-modal-title" }, salla.lang.get('common.titles.language')), h("div", { class: "s-localization-modal-section-inner" }, this.languages.length < 6 ?
|
|
@@ -231,8 +231,21 @@ const SallaLoginModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoginModal
|
|
|
231
231
|
Salla.log('Error on assign after handle iframe', err);
|
|
232
232
|
}
|
|
233
233
|
withCartReset && Salla.cart.reset();
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
try {
|
|
235
|
+
!Salla.auth.api.isSessionless() && await Salla.auth.api.request('auth/jwt');
|
|
236
|
+
if (Salla.auth.api.canRedirect()) {
|
|
237
|
+
setTimeout(() => window.location.reload(), 100);
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
// Match handlAfterAuthenticatedResponse order: loggedIn (fetches profile + emits) -> afterUserLogin
|
|
241
|
+
// Note: auth::verified is omitted here since cart.assign() already handles cart sync above
|
|
242
|
+
await Salla.auth.event.loggedIn({ data: { token } }).then(() => Salla.auth.api.afterUserLogin());
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
catch (err) {
|
|
246
|
+
this.modal.open();
|
|
247
|
+
Salla.log('Error on request auth/jwt after handle iframe', err);
|
|
248
|
+
}
|
|
236
249
|
return;
|
|
237
250
|
}
|
|
238
251
|
withCartReset && Salla.cart.reset();
|
|
@@ -15,7 +15,7 @@ const SallaLoyaltyPrizeItem$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoya
|
|
|
15
15
|
this.prizeItemSelected.emit(this.item);
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (h(Host, { key: '
|
|
18
|
+
return (h(Host, { key: '6aad4c3c2052fc29cb04aafc307831ae92c9caf7' }, h("div", { key: 'aec0459249272685c12b451dce725857d514dcc9', onClick: this.onPrizeItemClick.bind(this) }, h("img", { key: '0bd6790bdb8f8e0c2f630801b370564d2b2f0ee4', class: "s-loyalty-prize-item-image", src: this.item.image, alt: this.item.name }), h("div", { key: '5f96c2b7b091b943044f1765d205dd4315227b56', class: "s-loyalty-prize-item-title" }, this.item.name), h("div", { key: 'd1124db21faf13b3275064b63f54f4119ff62f54', class: "s-loyalty-prize-item-subtitle" }, this.item.description), h("div", { key: 'fb6ca5f5d7994721c3ab36729a1cf07b494ac91a', class: "s-loyalty-prize-item-points" }, this.item.cost_points, " Points"))));
|
|
19
19
|
}
|
|
20
20
|
static get style() { return sallaLoyaltyPrizeItemCss; }
|
|
21
21
|
}, [0, "salla-loyalty-prize-item", {
|
|
@@ -79,7 +79,7 @@ const SallaWalletTable = /*@__PURE__*/ proxyCustomElement(class SallaWalletTable
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
render() {
|
|
82
|
-
return (h(Host, { key: '
|
|
82
|
+
return (h(Host, { key: '9beb3c0146ba1e0d5dc1c60a09c7d38af391bdc6' }, h("div", { key: 'a6ce757cb30de9b2e4d2c7e224b62452b9ce26e9' }, this.isLoadingLoyalty ? (h("salla-loading", null)) : (h("div", null, this.loyaltyPointsArray.length > 0 ? (h("div", null, h("table", { class: "s-loyalty-program-table" }, h("thead", { class: "s-loyalty-program-table-head" }, h("tr", { class: "s-loyalty-program-table-head-tr" }, h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('pages.wallet.points')), h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('pages.wallet.date')), h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('pages.wallet.expiry_date')), h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('common.elements.note')), h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('common.elements.status')))), h("tbody", { class: "s-loyalty-program-table-tbody" }, this.loyaltyPointsArray.map(point => (h("tr", { class: "s-loyalty-program-table-tbody-tr" }, h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, point?.type === 'plus' ? '+' : '', point?.points || '', " ", salla.lang.get('pages.loyalty_program.point')), h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, formatDate(point?.created_at ? Number(point.created_at) * 1000 : undefined)), h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, formatDate(point?.points_expire_date)), h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, translateKey(point?.key)), h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, translateKey(point?.status_key))))))), h("div", { class: "s-infinite-scroll-wrapper" }, !!this.nextPageUrlLoyalty && (h("salla-button", { onClick: this.handleClick, loading: this.isLoadingLoyalty }, salla.lang.get('common.elements.load_more')))))) : (h("div", null, h("div", { class: "s-loyalty-program-table-empty-state" }, h("span", { innerHTML: loyaltyProgramIcon }), h("div", { class: "s-loyalty-program-table-placeholder-title" }, salla.lang.get('pages.loyalty_program.no_loyality_points_title')), h("div", { class: "s-loyalty-program-table-placeholder-sub-title" }, salla.lang.get('pages.loyalty_program.no_loyality_points_sub_title'))))))))));
|
|
83
83
|
}
|
|
84
84
|
static get style() { return sallaLoyaltyProgramCss; }
|
|
85
85
|
}, [0, "salla-loyalty-program", {
|
|
@@ -21,7 +21,7 @@ const SallaMaintenanceAlert$1 = /*@__PURE__*/ proxyCustomElement(class SallaMain
|
|
|
21
21
|
this.host.style.display = 'none';
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: 'f307529d9fa1a3cfdf33cc48dea142e274eb4f72', class: "s-maintenance-alert-wrapper" }, h("button", { key: 'a8a8d3d4c03151f9fe468153d4368ab66de0ba5f', class: "s-maintenance-alert-close", innerHTML: Cancel, onClick: () => this.closeAlert() }), h("div", { key: 'f53e7ab72950f72b68eeb5ff6887203e8f6d0dbd', class: "s-maintenance-alert-content" }, h("div", { key: 'c3c69c738da0417114c87b03c49f0a8d36663558', class: "s-maintenance-alert-container" }, h("div", { key: 'af1ec8ff601873c04de610341f15775e05a5d185', class: "s-maintenance-alert-icon" }, h("img", { key: 'a1b6dd0d161749eff7f6e7d4e92fd161896b593b', src: salla.url.cdn('images/alert.png'), alt: "Alert" })), h("div", { key: 'f1f81302bbaf4d83d50770ff1f40416624bde583', class: "s-maintenance-alert-text" }, h("h2", { key: '79eab40b1cf6cf9d307d1e9bda24fe6dd8c03852' }, this.title), h("p", { key: '5bdbe219346851b9aff8c20fd41075853fe6b981' }, this.message))), h("div", { key: '8e2cd9ad611a551ee7960310f11a9f7f07668811' }, h("a", { key: '9658d9a3e82f9719c35caf362601a12a62475508', class: "s-maintenance-alert-btn", href: salla.config.get('maintenance_details.button_url') }, this.buttonTitle)))));
|
|
25
25
|
}
|
|
26
26
|
componentDidLoad() {
|
|
27
27
|
//auto-hide the alert if close button is clicked before one hour
|
|
@@ -708,11 +708,11 @@ const SallaMap = /*@__PURE__*/ proxyCustomElement(class SallaMap extends HTMLEle
|
|
|
708
708
|
}
|
|
709
709
|
// render
|
|
710
710
|
render() {
|
|
711
|
-
return (h(Host, { key: '
|
|
711
|
+
return (h(Host, { key: 'f3b0f4e444e266a4f9c60782bea7920a1b4c34b4', class: "s-map-wrapper" }, h("salla-modal", { key: '5066a0f19b59509656350bd0a02bc8ff8bb3d9d7', class: "s-map-modal-wrapper", noPadding: true, ref: modal => {
|
|
712
712
|
this.locationModal = modal;
|
|
713
|
-
} }, this.getLocationModal()), h("slot", { key: '
|
|
713
|
+
} }, this.getLocationModal()), h("slot", { key: '884266b42b7c5532486c4e8bd1aba8b0e6bf2f89', name: "button" }, h("salla-button", { key: '32b96c45aca7589681a3819d165b38e8f9ee036e', onClick: () => {
|
|
714
714
|
this.open();
|
|
715
|
-
}, color: "primary", class: "s-map-location-button" }, h("span", { key: '
|
|
715
|
+
}, color: "primary", class: "s-map-location-button" }, h("span", { key: 'd73a9837cb6a6df740300a4f52c35dd7f9499e73', class: "s-map-location-icon", innerHTML: this.formattedAddress ? Edit : Location }), this.formattedAddress ? (h("div", null, this.locateButtonEdit, " | ", this.formatAddress(this.formattedAddress))) : (this.locateButtonTitle))), h("input", { key: '77a53ca7c0b51268813238d80db56a9b9449c3f9', class: "s-hidden", name: this.name, required: this.required, value: this.getLatLng(), ref: color => this.mapInput = color })));
|
|
716
716
|
}
|
|
717
717
|
get host() { return this; }
|
|
718
718
|
static get style() { return sallaMapCss; }
|
|
@@ -48,7 +48,7 @@ const SallaMultipleBundleProductCart = /*@__PURE__*/ proxyCustomElement(class Sa
|
|
|
48
48
|
return (h("div", { slot: "html", class: "s-multiple-bundle-product-cart-header-wrapper" }, h("div", { class: `s-multiple-bundle-product-cart-header ${hasOptions ? '' : 's-multiple-bundle-product-cart-header-no-options'}` }, h("div", { class: "s-multiple-bundle-product-cart-header-content" }, h("a", { href: product?.url, class: "s-multiple-bundle-product-cart-header-image-wrapper" }, h("img", { src: product?.image?.url, alt: product?.image?.alt || product?.name, class: "s-multiple-bundle-product-cart-header-image" })), h("div", { class: "s-multiple-bundle-product-cart-header-content-details" }, h("h2", { class: "s-multiple-bundle-product-cart-header-content-details-title" }, h("a", { href: product?.url, class: "s-multiple-bundle-product-cart-header-content-details-title-link" }, product?.name)), h("div", { class: "s-multiple-bundle-product-cart-header-content-details-price" }, h("span", { class: "s-multiple-bundle-product-cart-header-content-details-price-regular" }, h("span", { innerHTML: product?.price ? salla.money(product?.price) : '' })), product?.sale_price > 0 && (h("span", { class: "s-multiple-bundle-product-cart-header-content-details-price-sale" }, h("span", { innerHTML: salla.money(product?.sale_price) })))), product?.quantity_in_group > 0 && product?.quantity !== 0 && (h("p", { class: "s-multiple-bundle-product-cart-header-content-details-quantity" }, h("span", null, salla.lang.get('pages.products.number_of_pieces')), h("span", null, product?.quantity_in_group))))), !hasOptions && (h("div", { class: "s-multiple-bundle-product-cart-header-remove-button" }, this.renderRemoveButton(sectionId, product, false))))));
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: '34b9ae8c08eccee16d15f5ebff73b1d27f636e79', class: "s-multiple-bundle-product-wrapper" }, h("div", { key: '2f8d0bf68e67aa3bc21206d7282113fbfa67560b', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, sectionIndex) => {
|
|
52
52
|
return section.products.map(product => {
|
|
53
53
|
const bundleContext = {
|
|
54
54
|
sectionId: section.id,
|
|
@@ -179,10 +179,10 @@ const SallaMultipleBundleProductDetails = /*@__PURE__*/ proxyCustomElement(class
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
render() {
|
|
182
|
-
return (h(Host, { key: '
|
|
182
|
+
return (h(Host, { key: '2a7a27e8bfc7325575fec782139828333590eb9f', class: "s-multiple-bundle-product-wrapper" }, h("div", { key: 'affcb43ee67e329a9a87d6234bb91b5494a69a35', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, index) => {
|
|
183
183
|
const selectedCount = this.selectedProducts[section.id]?.size || 0;
|
|
184
184
|
return (h("salla-accordion", { key: section.id, collapsed: index === 0 ? false : true }, h("salla-accordion-head", null, this.renderAccordionHeader(section, selectedCount)), h("salla-accordion-body", null, h("salla-multiple-bundle-product-slider", { section: section, sectionIndex: index, selectedProducts: this.selectedProducts, onProductSelected: this.handleBundleSliderProductSelected, onProductOptionsSelected: this.handleBundleSliderProductOptionsSelected }))));
|
|
185
|
-
})), h("salla-multiple-bundle-product-options-modal", { key: '
|
|
185
|
+
})), h("salla-multiple-bundle-product-options-modal", { key: '6b9065e8f7872da72166979fc9ce61efaad21c0a' })));
|
|
186
186
|
}
|
|
187
187
|
get host() { return this; }
|
|
188
188
|
static get style() { return sallaMultipleBundleProductDetailsCss; }
|
|
@@ -476,7 +476,7 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
|
|
|
476
476
|
const cacheKey = this.generateCacheKey(this.sectionId, this.productIndex, productId);
|
|
477
477
|
const resetToken = this.optionsResetTokens[cacheKey] || 0;
|
|
478
478
|
const isDisabled = this.isLoading || optionsWithSelectedState.some(opt => opt.details.some(d => d.is_selected && d.is_out === true));
|
|
479
|
-
return (h(Host, { key: '
|
|
479
|
+
return (h(Host, { key: '28786c060499c9bfbacf025b75f21d0e8a2d6ab1' }, h("salla-modal", { key: '6322c0542ca2769f50ed6fc616c6d5c72d456c9c', 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: '812707c4108b5bdefa97e1ff7537998083e2403b', slot: "loading" }, h("salla-skeleton", { key: 'e82b875495873b66414ee4a75d845823373b4914', height: "100%", width: "100%" })), this.product?.images && this.product?.images.length > 0 && (h("salla-slider", { key: 'd3849a91153ede94ea06553cb40af29e06c916ae', 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: {
|
|
480
480
|
centeredSlides: true,
|
|
481
481
|
centeredSlidesBounds: true,
|
|
482
482
|
slidesPerView: Math.min(5, Math.max(1, this.product?.images.length)),
|
|
@@ -485,13 +485,13 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
|
|
|
485
485
|
watchSlidesProgress: true,
|
|
486
486
|
direction: 'vertical',
|
|
487
487
|
spaceBetween: 10,
|
|
488
|
-
} }, h("div", { key: '
|
|
488
|
+
} }, h("div", { key: 'd585f7a29cb9265c39c471876d3a0cb7d2460359', slot: "items" }, this.product?.images &&
|
|
489
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 => {
|
|
490
490
|
e.target.style.display = 'none';
|
|
491
|
-
} }))))), this.product?.images && this.product?.images.length > 1 && (h("div", { key: '
|
|
491
|
+
} }))))), this.product?.images && this.product?.images.length > 1 && (h("div", { key: '1a6edb417a6715617303634b7d756eef0075a01a', slot: "thumbs" }, this.product?.images &&
|
|
492
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 => {
|
|
493
493
|
e.target.style.display = 'none';
|
|
494
|
-
} })))))))), 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: '22528e7438a30feffe5987ed86974a4eecea76a1', slot: "footer" }, h("div", { key: '7a891b1cd51d2f15e08523c2a4096ea4c50eb51b', class: "s-multiple-bundle-product-options-modal-footer" }, h("salla-button", { key: '4ed19c8cfdd3f37166a61fdbd452a8f205763469', onClick: e => this.onSave(e), loading: this.isLoading, disabled: isDisabled }, this.isLoading
|
|
495
495
|
? salla.lang.get('common.elements.saving')
|
|
496
496
|
: salla.lang.get('common.elements.save')))))));
|
|
497
497
|
}
|
|
@@ -93,7 +93,7 @@ const SallaMultipleBundleProductSlider = /*@__PURE__*/ proxyCustomElement(class
|
|
|
93
93
|
return `bundle[${sectionId}][${productIndex}][id]`;
|
|
94
94
|
}
|
|
95
95
|
render() {
|
|
96
|
-
return (h(Host, { key: '
|
|
96
|
+
return (h(Host, { key: 'a1e7d56d8a50d1c31ba102d3246b0251516e0a73' }, h("salla-slider", { key: '8308576a46ec71f557a3d686d59cd0109d5bef0f', type: "carousel", controlsOuter: false, showControls: false, id: `accordion-multiple-bundle-product-${this.section.id}`, pagination: true, class: "s-multiple-bundle-product-wrapper-slider", sliderConfig: { spaceBetween: 0 } }, h("div", { key: '3ea742119ab77f129b8c60bbcc0f8c0f7bd3e97d', slot: "items" }, this?.section?.products?.map((product, productIndex) => {
|
|
97
97
|
const isChecked = this.selectedProducts[this.section.id]?.has(product.id) || false;
|
|
98
98
|
const hasSavedOptions = this.savedOptionsByInstance[this.getProductInstanceKey(this.section.id, productIndex)];
|
|
99
99
|
const optionsButtonLabel = hasSavedOptions
|
|
@@ -104,7 +104,7 @@ const SallaMultipleBundleProductSlider = /*@__PURE__*/ proxyCustomElement(class
|
|
|
104
104
|
: KeyBoardArrowRightIcon;
|
|
105
105
|
return (h("div", { class: `s-multiple-bundle-product-slide-one-third ${product.quantity == 0
|
|
106
106
|
? 's-multiple-bundle-product-slide-one-third-disabled'
|
|
107
|
-
: ''}`, key: product.id }, h("div", { class: "s-multiple-bundle-product-card" }, h("div", { class: "s-multiple-bundle-product-image-wrapper", onClick: () => this.handleProductClick(product, productIndex) }, h("input", { id: this.generateEventName(this.section.id, productIndex), type: "checkbox", class: "s-multiple-bundle-product-checkbox", checked: isChecked, name: this.generateEventName(this.section.id, productIndex), value: product.id }), h("img", { src: product.image.url || salla.url.cdn('images/s-empty.png'), loading: "lazy", alt: product.image.alt || product.name, class: "s-multiple-bundle-product-image" })), h("div", { class: "s-multiple-bundle-product-content-wrapper" }, h("div", { class: "s-multiple-bundle-product-content" }, h("div", { class: "s-multiple-bundle-product-details" }, h("div", { class: "s-multiple-bundle-product-title-wrapper" }, h("h2", { class: "s-multiple-bundle-product-title" }, product.name)), h("div", { class: "s-multiple-bundle-product-price-wrapper" }, h("span", { class: "s-multiple-bundle-product-price" }, h("span", { innerHTML: salla.money(product.price) })), product.sale_price > 0 && (h("span", { class: "s-multiple-bundle-product-price-discount" }, h("span", { innerHTML: salla.money(product.sale_price) }))))), product.quantity_in_group > 0 && product.quantity !== 0 && (h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.pieces'), h("span", null, product.quantity_in_group))), product.quantity === 0 && (h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.quantity_in_group_finished')))), product.options?.length > 0 && (h("button", { class: "s-multiple-bundle-product-button", onClick: () => this.handleOptionsClick(product), type: "button" }, optionsButtonLabel, h("span", { class: "s-multiple-bundle-product-button-icon", innerHTML: optionsArrowIcon })))))));
|
|
107
|
+
: ''}`, key: product.id }, h("div", { class: "s-multiple-bundle-product-card" }, h("div", { class: "s-multiple-bundle-product-image-wrapper", onClick: () => this.handleProductClick(product, productIndex) }, h("input", { id: this.generateEventName(this.section.id, productIndex), type: "checkbox", class: "s-multiple-bundle-product-checkbox", checked: isChecked, name: this.generateEventName(this.section.id, productIndex), value: product.id }), h("img", { src: product.image.url || salla.url.cdn('images/s-empty.png'), loading: "lazy", alt: product.image.alt || product.name, class: "s-multiple-bundle-product-image" })), h("div", { class: "s-multiple-bundle-product-content-wrapper" }, h("div", { class: "s-multiple-bundle-product-content" }, h("div", { class: "s-multiple-bundle-product-details" }, h("div", { class: "s-multiple-bundle-product-title-wrapper" }, h("h2", { class: "s-multiple-bundle-product-title" }, h("a", { href: product?.url || '#', target: "_blank", rel: "noopener noreferrer" }, product.name))), h("div", { class: "s-multiple-bundle-product-price-wrapper" }, h("span", { class: "s-multiple-bundle-product-price" }, h("span", { innerHTML: salla.money(product.price) })), product.sale_price > 0 && (h("span", { class: "s-multiple-bundle-product-price-discount" }, h("span", { innerHTML: salla.money(product.sale_price) }))))), product.quantity_in_group > 0 && product.quantity !== 0 && (h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.pieces'), h("span", null, product.quantity_in_group))), product.quantity === 0 && (h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.quantity_in_group_finished')))), product.options?.length > 0 && (h("button", { class: "s-multiple-bundle-product-button", onClick: () => this.handleOptionsClick(product), type: "button" }, optionsButtonLabel, h("span", { class: "s-multiple-bundle-product-button-icon", innerHTML: optionsArrowIcon })))))));
|
|
108
108
|
})))));
|
|
109
109
|
}
|
|
110
110
|
get host() { return this; }
|
|
@@ -77,7 +77,7 @@ const SallaMultipleBundleProduct$1 = /*@__PURE__*/ proxyCustomElement(class Sall
|
|
|
77
77
|
this.parseProducts(this.bundleSections);
|
|
78
78
|
}
|
|
79
79
|
render() {
|
|
80
|
-
return (h(Host, { key: '
|
|
80
|
+
return (h(Host, { key: '91666a9a9d0302d7f93f001b39d06160f2dc6960', class: "s-multiple-bundle-product-wrapper" }, this.isCartPage() ? this.renderCartPage() : this.renderDetailsPage()));
|
|
81
81
|
}
|
|
82
82
|
static get watchers() { return {
|
|
83
83
|
"bundleSections": ["parseProducts"]
|