@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-2liYDuhx.js');
|
|
7
7
|
var anime_es = require('./anime.es-BqW8JHZi.js');
|
|
8
8
|
var specialDiscount = require('./special-discount-OVG_9Kf9.js');
|
|
9
9
|
var check = require('./check-CLRvuniI.js');
|
|
@@ -949,7 +949,6 @@ const sallaButtonCss = "";
|
|
|
949
949
|
const SallaButton = class {
|
|
950
950
|
constructor(hostRef) {
|
|
951
951
|
index.registerInstance(this, hostRef);
|
|
952
|
-
this.hostAttributes = {};
|
|
953
952
|
/**
|
|
954
953
|
* Button Type
|
|
955
954
|
*/
|
|
@@ -1037,23 +1036,40 @@ const SallaButton = class {
|
|
|
1037
1036
|
return this.host;
|
|
1038
1037
|
}
|
|
1039
1038
|
getBtnAttributes() {
|
|
1039
|
+
const hostAttributes = {};
|
|
1040
1040
|
for (let i = 0; i < this.host.attributes.length; i++) {
|
|
1041
1041
|
if (!['color', 'fill', 'size', 'width', 'id'].includes(this.host.attributes[i].name)) {
|
|
1042
|
-
|
|
1042
|
+
hostAttributes[this.host.attributes[i].name] = this.host.attributes[i].value;
|
|
1043
1043
|
}
|
|
1044
1044
|
}
|
|
1045
|
-
|
|
1046
|
-
|
|
1045
|
+
hostAttributes.type = hostAttributes.type || this.type;
|
|
1046
|
+
const buttonClass = hostAttributes.class || '';
|
|
1047
|
+
hostAttributes.class = buttonClass +
|
|
1047
1048
|
' s-button-element s-button-' + this.shape
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1049
|
+
+ ' s-button-' + (this.fill == "none" ? 'fill-none' : this.fill)
|
|
1050
|
+
+ (this.size != "medium" ? ' s-button-' + this.size : '')
|
|
1051
|
+
+ (this.width != "normal" ? ' s-button-' + this.width : '')
|
|
1052
|
+
+ (this.shape == "link" ? ' s-button-' + this.color + '-link' : '')
|
|
1053
|
+
+ (this.shape != "link" && this.fill != 'outline' ? ' s-button-' + this.color : '')
|
|
1054
|
+
+ (this.fill == 'outline' ? ' s-button-' + this.color + '-outline' : '')
|
|
1055
|
+
+ (this.disabled ? ' s-button-disabled ' : '')
|
|
1056
|
+
+ (this.shape == 'icon' ? ' s-button-loader-center' : ' s-button-loader-' + this.loaderPosition);
|
|
1057
|
+
if (!hostAttributes['aria-label'] && !hostAttributes['aria-labelledby']) {
|
|
1058
|
+
const buttonText = (this.host.textContent || '').trim();
|
|
1059
|
+
// Only add aria-label for buttons without visible text (icon buttons)
|
|
1060
|
+
// Buttons with visible text don't need aria-label as screen readers already announce the text
|
|
1061
|
+
if (!buttonText) {
|
|
1062
|
+
// Check if it's a wishlist button and add aria-label automatically
|
|
1063
|
+
const isWishlistButton = buttonClass.includes('btn--wishlist') || buttonClass.includes('wishlist');
|
|
1064
|
+
if (isWishlistButton) {
|
|
1065
|
+
hostAttributes['aria-label'] = salla.lang.getWithDefault('pages.products.add_to_wishlist', 'Add or remove to wishlist');
|
|
1066
|
+
}
|
|
1067
|
+
else if (this.shape === 'icon') {
|
|
1068
|
+
console.warn('Icon button is missing aria-label attribute');
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
return hostAttributes;
|
|
1057
1073
|
}
|
|
1058
1074
|
button() {
|
|
1059
1075
|
return (index.h("button", { ...this.getBtnAttributes(), disabled: this.disabled }, index.h("span", { class: "s-button-text", ref: el => this.text = el }, index.h("slot", null)), this.loading ? index.h("span", { class: "s-button-loader" }) : ''));
|
|
@@ -2505,15 +2521,20 @@ const SallaCommentItem = class {
|
|
|
2505
2521
|
}
|
|
2506
2522
|
localStorage.setItem('liked_comments', JSON.stringify(this.likedComments));
|
|
2507
2523
|
}
|
|
2524
|
+
PinnedIcon() {
|
|
2525
|
+
return (index.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" }, index.h("path", { d: "M12 16V21" }), index.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" })));
|
|
2526
|
+
}
|
|
2508
2527
|
render() {
|
|
2509
2528
|
let isAdmin = this.comment.type == 'admin';
|
|
2510
|
-
return (index.h(index.Host, { key: '
|
|
2529
|
+
return (index.h(index.Host, { key: '05979122884df06d634ab4f75f61d12cee93b228', class: isAdmin ? 's-comments-item-admin' : 's-comments-item' }, index.h("div", { key: 'd3be984afb159d8d6a1d4c0daf0bb72c97136a3a', class: { "s-comments-item-wrapper": !isAdmin, "s-comments-item-admin-wrapper": isAdmin }, id: `s-comments-item-${this.comment.id}` }, index.h("div", { key: '29a48174434b634e4afa5a1f2339b04705ea9f90', class: "s-comments-item-inner s-comments-flex-1" }, isAdmin && index.h("span", { key: 'b2536843c0549b2eb24759a09f51a97b68e36654', class: "s-comments-item-reply-icon", innerHTML: Reply }), index.h("div", { key: '553ad8fd8a3ada5cbca3c744f8b80a259ae7d2c2', class: "s-comments-item-avatar" }, index.h("img", { key: '57d429fa1dc545d3fe16c1f4713b960d1d7ef9f8', "data-src": this.comment?.avatar, alt: this.comment?.name, src: this.comment?.avatar, class: "s-comments-item-avatar-img lazy" })), index.h("div", { key: '8b2a3206dfa97c41a731baf18794e44ce096876f', class: "s-comments-flex-1" }, index.h("div", { key: '95ebefb4d82bb66d7cbc567554d0b9da2e4b416a', class: "s-comments-item-user-wrapper" }, index.h("div", { key: '1e6091d08973e5fc2ae8a982e6b09e5d349fede3', class: "s-comments-item-user-info" }, index.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 ?
|
|
2530
|
+
index.h("div", { class: "s-comments-item-pinned-icon-with-margin" }, this.PinnedIcon())
|
|
2531
|
+
: null, (this.comment.has_order || !!this.comment.rating) && !this.comment.is_pending && !this.hideBought ?
|
|
2511
2532
|
index.h("div", { class: "s-comments-flex" }, this.comment.has_order ?
|
|
2512
2533
|
[index.h("span", { class: "s-comments-item-has-order-check-icon", innerHTML: check.IconVerified }), index.h("span", { class: "s-comments-item-has-order-check-text" }, this.has_bought_trans, " ", this.comment.rating ? ', ' : '')] : null, !!this.comment.rating ?
|
|
2513
2534
|
index.h("span", { class: "s-comments-item-rated-widget" }, this.rated_trans) : null)
|
|
2514
|
-
: null), index.h("p", { key: '
|
|
2535
|
+
: null), index.h("p", { key: '80c430d77b6ae3e959db9bc089fd7fe834e56bd2', class: "s-comments-item-timestamp s-ltr" }, this.getDate(this.comment.created_at?.date), index.h("span", { key: '49a1b26309490d6252f0fbd53b50374cbf10071d', class: "s-comments-item-time" }, " - ", this.getTime(this.comment.created_at?.date))), !!this.comment.rating || !!this.comment.stars ?
|
|
2515
2536
|
index.h("salla-rating-stars", { size: "mini", class: "s-comments-item-stars", value: this.comment.rating || this.comment.stars })
|
|
2516
|
-
: null), index.h("div", { key: '
|
|
2537
|
+
: null), index.h("div", { key: '780bee1166000b296e6956921c71cfd4f48e8153', class: "s-comments-item-content" }, index.h("p", { key: '9ff2a32cbd551ff911300ce6cfa1065770117a18', innerHTML: this.comment.content }), this.allowAttachImages && index.h("div", { key: 'f47022f4916c3d4e0641273612b4a5f7c69a4595', class: "s-comments-item-images" }, this.comment.images.map((image, index$1) => (index.h("img", { key: index$1, src: image, alt: "", onClick: () => this.modal.open() }))), index.h("salla-modal", { key: '8e70ec00301d369bbed5c1f11a1887a0498e2b0c', ref: modal => this.modal = modal, width: "sm" }, index.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" }, index.h("div", { key: 'bb0cf465f99ecfe9ee10dfb96949cd7b5793da90', slot: 'items' }, this.comment.images.map((image, index$1) => (index.h("img", { key: index$1, src: image, alt: "" })))), index.h("div", { key: 'e195759f1df5a87b761478ac4a379411f284785c', slot: "thumbs" }, this.comment.images.map((image, index$1) => (index.h("div", { class: "s-comments-item-images-slider-thumb" }, index.h("img", { key: index$1, src: image, alt: "" })))))))), this.allowLikes && !isAdmin && salla.url.is_page('product.single') ? index.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() }, index.h("span", null, this.helpfulLabel, " ", this.likesCount > 0 ? `(${this.likesCount})` : ''), index.h("span", { innerHTML: ThumbsUp })) : '', this.comment.is_pending ?
|
|
2517
2538
|
index.h("span", { class: "s-comments-item-pending-text" }, this.waiting_approval_trans) : null))), !!this.getReplies().length && !isAdmin ?
|
|
2518
2539
|
this.getReplies().map((reply) => {
|
|
2519
2540
|
return index.h("div", null, index.h("salla-comment-item", { comment: reply }));
|
|
@@ -2787,7 +2808,7 @@ const SallaComments = class {
|
|
|
2787
2808
|
return (index.h("div", null, !!this.total && !this.hideTitle ? index.h("h2", { class: "s-comments-title" }, this.blockTitle ? this.blockTitle : this.comment_title) : '', !this.hideForm && !this.testimonials ? index.h("salla-comment-form", { showAvatar: this.showFormAvatar, type: this.type, "item-id": this.itemId }) : '', index.h("div", { class: "s-comments-placeholder" }, index.h("span", { innerHTML: ChatBubbles }), index.h("p", null, this.noComments))));
|
|
2788
2809
|
}
|
|
2789
2810
|
return (index.h("div", { class: `s-comments s-comments-${this.testimonials ? 'testimonials' : this.type}` }, index.h("div", { class: `${this.type === CommentType.PAGE ? "s-comments-page-container" : "s-comments-container"}` }, !!this.total && !this.hideTitle ? index.h("h2", { class: "s-comments-title" }, this.blockTitle ? this.blockTitle : this.comment_title) : '', !this.hideForm && index.h("salla-comment-form", { showAvatar: this.showFormAvatar, type: this.type, "item-id": this.itemId }), salla.url.is_page('product.single') ? index.h("salla-reviews-summary", { itemId: this.itemId }) : '', index.h("div", { class: `s-comments-header ${this.total ? "has-total" : ""}` }, !!this.total && index.h("span", { class: "s-comments-count-label", innerHTML: this.pluralize(this.comment_name, this.total) }), !!this.total && !this.testimonials && this.type !== CommentType.BLOG ?
|
|
2790
|
-
index.h("div", { class: "s-comments-filter-wrapper" }, index.h("label", { class: "s-comments-filter-label", htmlFor: "comments-filter" }, salla.lang.get('pages.categories.sorting')), index.h("select", { id: "comments-filter", class: "s-form-control s-comments-sort-input", onChange: (e) => {
|
|
2811
|
+
index.h("div", { class: "s-comments-filter-wrapper" }, index.h("label", { class: "s-comments-filter-label", htmlFor: "comments-filter" }, salla.lang.get('pages.categories.sorting')), index.h("select", { id: "comments-filter", "aria-label": salla.lang.get('pages.categories.sorting'), class: "s-form-control s-comments-sort-input", onChange: (e) => {
|
|
2791
2812
|
this.sort = e.target.value;
|
|
2792
2813
|
this.reload();
|
|
2793
2814
|
} }, index.h("option", { value: "latest", selected: true }, salla.lang.get("pages.testimonials.sort_by_date_desc")), index.h("option", { value: "oldest" }, salla.lang.get("pages.testimonials.sort_by_date_asc")), this.allowLikes && index.h("option", { value: "most_helpful" }, this.mostHelpfulLabel)))
|
|
@@ -3544,13 +3565,13 @@ const SallaFileUpload = class {
|
|
|
3544
3565
|
return;
|
|
3545
3566
|
try {
|
|
3546
3567
|
const [FilePondModule, FilePondPluginFileValidateSize, FilePondPluginImageExifOrientation, FilePondPluginImagePreview, FilePondPluginImageEdit, FilePondPluginFileValidateType, FilePondPluginFilePoster] = await Promise.all([
|
|
3547
|
-
Promise.resolve().then(function () { return require('./filepond-
|
|
3548
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-size-
|
|
3549
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-image-exif-orientation-
|
|
3550
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-image-preview-
|
|
3551
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-image-edit-
|
|
3552
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-type-
|
|
3553
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-file-poster-
|
|
3568
|
+
Promise.resolve().then(function () { return require('./filepond-hpLROc_m.js'); }).then(function (n) { return n.filepond; }),
|
|
3569
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-size-CaO6qVs6.js'); }).then(function (n) { return n.filepondPluginFileValidateSize; }),
|
|
3570
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-image-exif-orientation-B6L8W0Qe.js'); }).then(function (n) { return n.filepondPluginImageExifOrientation; }),
|
|
3571
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-image-preview-BoqOfOki.js'); }).then(function (n) { return n.filepondPluginImagePreview; }),
|
|
3572
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-image-edit-rptDhPuc.js'); }).then(function (n) { return n.filepondPluginImageEdit; }),
|
|
3573
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-type-mUUtcgCs.js'); }).then(function (n) { return n.filepondPluginFileValidateType; }),
|
|
3574
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-file-poster-C8gskRGl.js'); }).then(function (n) { return n.filepondPluginFilePoster; })
|
|
3554
3575
|
]);
|
|
3555
3576
|
this.FilePond = FilePondModule;
|
|
3556
3577
|
// Register plugins
|
|
@@ -4492,7 +4513,7 @@ const SallaGifting = class {
|
|
|
4492
4513
|
}
|
|
4493
4514
|
render() {
|
|
4494
4515
|
return [
|
|
4495
|
-
index.h("div", { key: '
|
|
4516
|
+
index.h("div", { key: '69f449221a2abf8e4d9264b46ab023eb7baca314' }, index.h("salla-list-tile", { key: '0072bab6171c9b11e54f0c6655c408b12d554e24', class: this.generateClass() }, index.h("div", { key: '38aa5f8decf6d9c97253c3c16b80a478d623985e', slot: "title" }, this.vertical ? index.h("span", { innerHTML: GiftSharing }) : '', index.h("h3", { key: '37fddbe7a80f38b3acca42220028208cab52ba15' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), index.h("div", { key: 'b3bf6bff40b60a3fbace637ed69f6aa72853c04b', slot: "subtitle" }, index.h("div", { key: '46643b7cd897524ca42c41da24e657401f85ab28' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), index.h("div", { key: '5129acfd67425ccfad68b3770843f11c9fa55b18', slot: "action" }, index.h("salla-button", { key: '0e93efc647444a26198e4631614b8590f75f122e', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, index.h("slot", { key: 'b88d95a25308cebc29b796bb2b0c25e4fa230406', name: "widget-btn-content" }, index.h("div", { key: '4cdbaaeb2bc67f056ea348755ffbdfbc831a1a5b', class: "s-gifting-widget-action-content" }, index.h("span", { key: '7dfec389970416df9be46c8ae5f0904dd64e17ad', innerHTML: GiftSharing }), " \u00A0", index.h("span", { key: '768f3621011bc3c984dce13ce83b3fb6cceb0171' }, this.sectionBtnText)))))), index.h("salla-modal", { key: 'b3c94ef80f955b42baecd963f5550f17a80c6fb4', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, index.h("div", { key: 'c09e12eabff63ba1a781c8980b449f854affc164', slot: "loading" }, index.h("div", { key: 'dbafa39345c573eae0d045a7d23e346f7068ec0b', class: "s-gifting-skeleton" }, index.h("div", { key: 'ff247ea5c79b87ca1c76e6035813d7ecb2caeff2', class: "s-gifting-modal-header" }, index.h("salla-skeleton", { key: '1e67bea2f1f957744c4f6f0af83ded347799916e', type: 'circle', height: '5rem', width: '5rem' }), index.h("h2", { key: '6486434a702624358211c22e7a6b48be16d96c42', class: "s-gifting-modal-title" }, index.h("div", { key: '688854d37e5ca46fcaa7957d3e72a52d7c706f8d', class: "s-gifting-modal-badge-wrapper" }, index.h("salla-skeleton", { key: '9fcbb2086aa25b02effdc873bbfd45087e673de6', height: '15px', width: '150px' })))), index.h("div", { key: '1b9bf709a01b20e87d68f92f3cb93600214460cd', class: "s-gifting-skeleton-content" }, index.h("salla-skeleton", { key: 'ba6b0c87442412398c360da1f6e8b5094812900f', height: '10px', width: '150px' }), index.h("salla-skeleton", { key: '6583783ace4e2668705c47c4bcac2a33b346a72b', height: '230px' }), index.h("salla-skeleton", { key: 'c76b038f100072d56a7cedd0438eeacc98bf7b42', height: '10px', width: '150px' }), index.h("salla-skeleton", { key: '1d331e7be7cd88ea5c108f331626dddc74699ed2', height: '30px' }), index.h("salla-skeleton", { key: '5cc3d1b8d67b7bf199219099af909591b8a8a869', height: '40px' })))), index.h("slot", { key: '9dc4c6f3a717e16e3527f9651b05a74ca1a6212c', name: "header" }), !!this.hasError ?
|
|
4496
4517
|
index.h("salla-placeholder", { alignment: "center" }, index.h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), index.h("span", { slot: "description" }, " "))
|
|
4497
4518
|
:
|
|
4498
4519
|
[
|
|
@@ -4506,9 +4527,9 @@ const SallaGifting = class {
|
|
|
4506
4527
|
index.h("span", { class: "s-gifting-error" }, this.errors['receiver.name']) : ''), index.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" }, index.h("label", { class: "s-form-label" }, this.receiverMobileFieldLabel), index.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'] ?
|
|
4507
4528
|
index.h("span", { class: "s-gifting-error" }, this.errors['receiver.mobile']) : ''), this.physicalProducts &&
|
|
4508
4529
|
index.h("div", null, index.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" }, index.h("label", { class: "s-form-label" }, this.receiverCountryFieldLabel), index.h("select", { name: "country", class: "s-form-control", onChange: (event) => this.handleCountryChange(event), required: true }, index.h("option", { value: "" }, this.selectCountry), this.gift?.countries?.map((country) => (index.h("option", { value: country.id }, country.name)))), this.errors && this.errors['receiver.country'] ?
|
|
4509
|
-
index.h("span", { class: "s-gifting-error" }, this.errors['receiver.country']) : ''), index.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" }, index.h("label", { class: "s-form-label" }, this.receiverCityFieldLabel), index.h("select", { name: "city", class: "s-form-control", onChange: (event) => this.handleReceiverCity(event), disabled: this.loadingCities }, index.h("option", { value: "", selected: true }, this.loadingCities ? salla.lang.get('common.elements.loading') : this.selectCity), this.gift?.cities?.map((city) => (index.h("option", { value: city.id }, city.name)))), this.errors && this.errors['receiver.city_id'] ?
|
|
4530
|
+
index.h("span", { class: "s-gifting-error" }, this.errors['receiver.country']) : ''), index.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" }, index.h("label", { class: "s-form-label" }, this.receiverCityFieldLabel), index.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 }, index.h("option", { value: "", selected: true }, this.loadingCities ? salla.lang.get('common.elements.loading') : this.selectCity), this.gift?.cities?.map((city) => (index.h("option", { value: city.id }, city.name)))), this.errors && this.errors['receiver.city_id'] ?
|
|
4510
4531
|
index.h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), index.h("div", { class: "s-gifting-info anime-item opacity-0" }, index.h("span", { innerHTML: Alert }), index.h("span", null, this.selectCityInfo))), !this.physicalProducts && index.h("div", { class: "anime-item opacity-0" }, index.h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, index.h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), index.h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), index.h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, index.h("label", { class: "s-form-label" }, this.selectSendDateAndTime), index.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) }), index.h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), index.h("div", { class: "s-gifting-step-two-footer anime-item opacity-0" }, index.h("a", { href: "#!", innerHTML: arrowLeft.arrowLeft, onClick: (e) => this.goToStep1(e) }), index.h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, index.h("span", null, this.sendGift)))))
|
|
4511
|
-
], index.h("slot", { key: '
|
|
4532
|
+
], index.h("slot", { key: '2ca6746edd5e72c996633b6d0b3ccdc5009198c4', name: "footer" })))
|
|
4512
4533
|
];
|
|
4513
4534
|
}
|
|
4514
4535
|
};
|
|
@@ -4616,7 +4637,7 @@ const SallaListTile = class {
|
|
|
4616
4637
|
};
|
|
4617
4638
|
}
|
|
4618
4639
|
render() {
|
|
4619
|
-
return (index.h(index.Host, { key: '
|
|
4640
|
+
return (index.h(index.Host, { key: '1e84d5e259adbf61502fbe1ee771ce948c87f218' }, index.h("a", { key: '5e28c64a0f1c62e6749a32859180e705f99af27e', class: this.generateClass(), href: this.href || "#", target: this.target, "aria-label": "List Tile Link" }, index.h("div", { key: 'ace3fdaae7332c4c23ab411f0b97cb0699c26ec2', class: "s-list-tile-item-icon" }, index.h("slot", { key: 'f8790cd45f2004691b156ef96d12a0f003d99899', name: 'icon' })), index.h("div", { key: 'a788d022e2afe3cd383c321f4100dafbae84f844', class: "s-list-tile-item-content" }, index.h("div", { key: 'a07afce13d054e11236ffb282901de9db3d23923', class: "s-list-tile-item-title" }, index.h("slot", { key: '43c23495cfb026ddba8739dcc1a619ec25fe98e0', name: 'title' })), index.h("div", { key: 'db5e2767a4220ee5d658b3b9384c28d0e105febb', class: "s-list-tile-item-subtitle" }, index.h("slot", { key: '245f602055419b1f32fa943805a72c6a207eea3f', name: "subtitle" }))), index.h("div", { key: '394a2d1402d3e8346cbc1ebd8d410405ed568c77', class: "s-list-tile-item-action" }, index.h("slot", { key: '6086eb6b1f9894f5a3a77ca484c74dd06f0d468f', name: 'action' })))));
|
|
4620
4641
|
}
|
|
4621
4642
|
};
|
|
4622
4643
|
SallaListTile.style = sallaListTileCss;
|
|
@@ -4644,7 +4665,7 @@ const SallaLoading = class {
|
|
|
4644
4665
|
this.bgColor = "#e5e7eb";
|
|
4645
4666
|
}
|
|
4646
4667
|
render() {
|
|
4647
|
-
return (index.h(index.Host, { key: '
|
|
4668
|
+
return (index.h(index.Host, { key: '2592e9504b03cb78f212d57e51c19075172fadd0', class: "s-loading-container" }, index.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" }, index.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" }), index.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" }))));
|
|
4648
4669
|
}
|
|
4649
4670
|
};
|
|
4650
4671
|
SallaLoading.style = sallaLoadingCss;
|
|
@@ -4750,7 +4771,7 @@ const SallaLocalizationModal = class {
|
|
|
4750
4771
|
});
|
|
4751
4772
|
}
|
|
4752
4773
|
render() {
|
|
4753
|
-
return (index.h("salla-modal", { key: '
|
|
4774
|
+
return (index.h("salla-modal", { key: '8f37a27df315cdc0c28e3294dc91209c852be37f', isLoading: true, class: "s-hidden", ref: modal => this.modal = modal, width: "xs" }, index.h("div", { key: 'f12693b51bd57a866dd5eb40dedfb824262d69c9', slot: 'loading' }, index.h("div", { key: 'cf40e4ae38a9bffe76b63688b59638a534dfbfeb', class: "s-localization-modal-skeleton" }, index.h("salla-skeleton", { key: 'b58668b0c16863b7998832c4be120636b32e4b05', width: '25%', height: '15px' }), index.h("div", { key: '2277672008dd8895791954ad3f8ac0bf090095cd', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => index.h("div", { class: "s-localization-modal-skeleton-item" }, index.h("div", { class: "s-localization-modal-skeleton-item-flex" }, index.h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), index.h("salla-skeleton", { height: '10px', width: '100px' })), index.h("salla-skeleton", { height: '15px', width: '20px' })))), index.h("salla-skeleton", { key: 'e22fe136879a706972c05b2b9ea8ab85be57b82f', width: '25%', height: '15px' }), index.h("div", { key: '8800d040033db851d2903c05fe0ce947072aae2e', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => index.h("div", { class: "s-localization-modal-skeleton-item" }, index.h("div", { class: "s-localization-modal-skeleton-item-flex" }, index.h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), index.h("salla-skeleton", { height: '10px', width: '100px' })), index.h("salla-skeleton", { height: '15px', width: '20px' })))), index.h("salla-skeleton", { key: '3248a10d8023fa2c8b411294da1072d4209e9a87', height: '40px', width: '100%' }))), !!this.hasError ?
|
|
4754
4775
|
index.h("salla-placeholder", { alignment: "center" }, index.h("span", { slot: "description" }, this.errorMessage)) :
|
|
4755
4776
|
index.h("div", { class: "s-localization-modal-inner" }, this.languages.length > 1 ?
|
|
4756
4777
|
index.h("div", { class: "s-localization-modal-section" }, index.h("label", { class: "s-localization-modal-title" }, salla.lang.get('common.titles.language')), index.h("div", { class: "s-localization-modal-section-inner" }, this.languages.length < 6 ?
|
|
@@ -5003,8 +5024,21 @@ const SallaLoginModal = class {
|
|
|
5003
5024
|
Salla.log('Error on assign after handle iframe', err);
|
|
5004
5025
|
}
|
|
5005
5026
|
withCartReset && Salla.cart.reset();
|
|
5006
|
-
|
|
5007
|
-
|
|
5027
|
+
try {
|
|
5028
|
+
!Salla.auth.api.isSessionless() && await Salla.auth.api.request('auth/jwt');
|
|
5029
|
+
if (Salla.auth.api.canRedirect()) {
|
|
5030
|
+
setTimeout(() => window.location.reload(), 100);
|
|
5031
|
+
}
|
|
5032
|
+
else {
|
|
5033
|
+
// Match handlAfterAuthenticatedResponse order: loggedIn (fetches profile + emits) -> afterUserLogin
|
|
5034
|
+
// Note: auth::verified is omitted here since cart.assign() already handles cart sync above
|
|
5035
|
+
await Salla.auth.event.loggedIn({ data: { token } }).then(() => Salla.auth.api.afterUserLogin());
|
|
5036
|
+
}
|
|
5037
|
+
}
|
|
5038
|
+
catch (err) {
|
|
5039
|
+
this.modal.open();
|
|
5040
|
+
Salla.log('Error on request auth/jwt after handle iframe', err);
|
|
5041
|
+
}
|
|
5008
5042
|
return;
|
|
5009
5043
|
}
|
|
5010
5044
|
withCartReset && Salla.cart.reset();
|
|
@@ -5301,7 +5335,7 @@ const SallaMaintenanceAlert = class {
|
|
|
5301
5335
|
this.host.style.display = 'none';
|
|
5302
5336
|
}
|
|
5303
5337
|
render() {
|
|
5304
|
-
return (index.h(index.Host, { key: '
|
|
5338
|
+
return (index.h(index.Host, { key: 'f307529d9fa1a3cfdf33cc48dea142e274eb4f72', class: "s-maintenance-alert-wrapper" }, index.h("button", { key: 'a8a8d3d4c03151f9fe468153d4368ab66de0ba5f', class: "s-maintenance-alert-close", innerHTML: Cancel, onClick: () => this.closeAlert() }), index.h("div", { key: 'f53e7ab72950f72b68eeb5ff6887203e8f6d0dbd', class: "s-maintenance-alert-content" }, index.h("div", { key: 'c3c69c738da0417114c87b03c49f0a8d36663558', class: "s-maintenance-alert-container" }, index.h("div", { key: 'af1ec8ff601873c04de610341f15775e05a5d185', class: "s-maintenance-alert-icon" }, index.h("img", { key: 'a1b6dd0d161749eff7f6e7d4e92fd161896b593b', src: salla.url.cdn('images/alert.png'), alt: "Alert" })), index.h("div", { key: 'f1f81302bbaf4d83d50770ff1f40416624bde583', class: "s-maintenance-alert-text" }, index.h("h2", { key: '79eab40b1cf6cf9d307d1e9bda24fe6dd8c03852' }, this.title), index.h("p", { key: '5bdbe219346851b9aff8c20fd41075853fe6b981' }, this.message))), index.h("div", { key: '8e2cd9ad611a551ee7960310f11a9f7f07668811' }, index.h("a", { key: '9658d9a3e82f9719c35caf362601a12a62475508', class: "s-maintenance-alert-btn", href: salla.config.get('maintenance_details.button_url') }, this.buttonTitle)))));
|
|
5305
5339
|
}
|
|
5306
5340
|
componentDidLoad() {
|
|
5307
5341
|
//auto-hide the alert if close button is clicked before one hour
|
|
@@ -6015,11 +6049,11 @@ const SallaMap = class {
|
|
|
6015
6049
|
}
|
|
6016
6050
|
// render
|
|
6017
6051
|
render() {
|
|
6018
|
-
return (index.h(index.Host, { key: '
|
|
6052
|
+
return (index.h(index.Host, { key: 'f3b0f4e444e266a4f9c60782bea7920a1b4c34b4', class: "s-map-wrapper" }, index.h("salla-modal", { key: '5066a0f19b59509656350bd0a02bc8ff8bb3d9d7', class: "s-map-modal-wrapper", noPadding: true, ref: modal => {
|
|
6019
6053
|
this.locationModal = modal;
|
|
6020
|
-
} }, this.getLocationModal()), index.h("slot", { key: '
|
|
6054
|
+
} }, this.getLocationModal()), index.h("slot", { key: '884266b42b7c5532486c4e8bd1aba8b0e6bf2f89', name: "button" }, index.h("salla-button", { key: '32b96c45aca7589681a3819d165b38e8f9ee036e', onClick: () => {
|
|
6021
6055
|
this.open();
|
|
6022
|
-
}, color: "primary", class: "s-map-location-button" }, index.h("span", { key: '
|
|
6056
|
+
}, color: "primary", class: "s-map-location-button" }, index.h("span", { key: 'd73a9837cb6a6df740300a4f52c35dd7f9499e73', class: "s-map-location-icon", innerHTML: this.formattedAddress ? Edit : Location }), this.formattedAddress ? (index.h("div", null, this.locateButtonEdit, " | ", this.formatAddress(this.formattedAddress))) : (this.locateButtonTitle))), index.h("input", { key: '77a53ca7c0b51268813238d80db56a9b9449c3f9', class: "s-hidden", name: this.name, required: this.required, value: this.getLatLng(), ref: color => this.mapInput = color })));
|
|
6023
6057
|
}
|
|
6024
6058
|
get host() { return index.getElement(this); }
|
|
6025
6059
|
};
|
|
@@ -6377,7 +6411,7 @@ const SallaMultipleBundleProduct = class {
|
|
|
6377
6411
|
this.parseProducts(this.bundleSections);
|
|
6378
6412
|
}
|
|
6379
6413
|
render() {
|
|
6380
|
-
return (index.h(index.Host, { key: '
|
|
6414
|
+
return (index.h(index.Host, { key: '91666a9a9d0302d7f93f001b39d06160f2dc6960', class: "s-multiple-bundle-product-wrapper" }, this.isCartPage() ? this.renderCartPage() : this.renderDetailsPage()));
|
|
6381
6415
|
}
|
|
6382
6416
|
static get watchers() { return {
|
|
6383
6417
|
"bundleSections": ["parseProducts"]
|
|
@@ -6415,7 +6449,7 @@ const SallaMultipleBundleProductCart = class {
|
|
|
6415
6449
|
return (index.h("div", { slot: "html", class: "s-multiple-bundle-product-cart-header-wrapper" }, index.h("div", { class: `s-multiple-bundle-product-cart-header ${hasOptions ? '' : 's-multiple-bundle-product-cart-header-no-options'}` }, index.h("div", { class: "s-multiple-bundle-product-cart-header-content" }, index.h("a", { href: product?.url, class: "s-multiple-bundle-product-cart-header-image-wrapper" }, index.h("img", { src: product?.image?.url, alt: product?.image?.alt || product?.name, class: "s-multiple-bundle-product-cart-header-image" })), index.h("div", { class: "s-multiple-bundle-product-cart-header-content-details" }, index.h("h2", { class: "s-multiple-bundle-product-cart-header-content-details-title" }, index.h("a", { href: product?.url, class: "s-multiple-bundle-product-cart-header-content-details-title-link" }, product?.name)), index.h("div", { class: "s-multiple-bundle-product-cart-header-content-details-price" }, index.h("span", { class: "s-multiple-bundle-product-cart-header-content-details-price-regular" }, index.h("span", { innerHTML: product?.price ? salla.money(product?.price) : '' })), product?.sale_price > 0 && (index.h("span", { class: "s-multiple-bundle-product-cart-header-content-details-price-sale" }, index.h("span", { innerHTML: salla.money(product?.sale_price) })))), product?.quantity_in_group > 0 && product?.quantity !== 0 && (index.h("p", { class: "s-multiple-bundle-product-cart-header-content-details-quantity" }, index.h("span", null, salla.lang.get('pages.products.number_of_pieces')), index.h("span", null, product?.quantity_in_group))))), !hasOptions && (index.h("div", { class: "s-multiple-bundle-product-cart-header-remove-button" }, this.renderRemoveButton(sectionId, product, false))))));
|
|
6416
6450
|
}
|
|
6417
6451
|
render() {
|
|
6418
|
-
return (index.h(index.Host, { key: '
|
|
6452
|
+
return (index.h(index.Host, { key: '34b9ae8c08eccee16d15f5ebff73b1d27f636e79', class: "s-multiple-bundle-product-wrapper" }, index.h("div", { key: '2f8d0bf68e67aa3bc21206d7282113fbfa67560b', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, sectionIndex) => {
|
|
6419
6453
|
return section.products.map(product => {
|
|
6420
6454
|
const bundleContext = {
|
|
6421
6455
|
sectionId: section.id,
|
|
@@ -6587,10 +6621,10 @@ const SallaMultipleBundleProductDetails = class {
|
|
|
6587
6621
|
}
|
|
6588
6622
|
}
|
|
6589
6623
|
render() {
|
|
6590
|
-
return (index.h(index.Host, { key: '
|
|
6624
|
+
return (index.h(index.Host, { key: '2a7a27e8bfc7325575fec782139828333590eb9f', class: "s-multiple-bundle-product-wrapper" }, index.h("div", { key: 'affcb43ee67e329a9a87d6234bb91b5494a69a35', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, index$1) => {
|
|
6591
6625
|
const selectedCount = this.selectedProducts[section.id]?.size || 0;
|
|
6592
6626
|
return (index.h("salla-accordion", { key: section.id, collapsed: index$1 === 0 ? false : true }, index.h("salla-accordion-head", null, this.renderAccordionHeader(section, selectedCount)), index.h("salla-accordion-body", null, index.h("salla-multiple-bundle-product-slider", { section: section, sectionIndex: index$1, selectedProducts: this.selectedProducts, onProductSelected: this.handleBundleSliderProductSelected, onProductOptionsSelected: this.handleBundleSliderProductOptionsSelected }))));
|
|
6593
|
-
})), index.h("salla-multiple-bundle-product-options-modal", { key: '
|
|
6627
|
+
})), index.h("salla-multiple-bundle-product-options-modal", { key: '6b9065e8f7872da72166979fc9ce61efaad21c0a' })));
|
|
6594
6628
|
}
|
|
6595
6629
|
get host() { return index.getElement(this); }
|
|
6596
6630
|
};
|
|
@@ -7054,7 +7088,7 @@ const SallaMultipleBundleProductOptionsModal = class {
|
|
|
7054
7088
|
const cacheKey = this.generateCacheKey(this.sectionId, this.productIndex, productId);
|
|
7055
7089
|
const resetToken = this.optionsResetTokens[cacheKey] || 0;
|
|
7056
7090
|
const isDisabled = this.isLoading || optionsWithSelectedState.some(opt => opt.details.some(d => d.is_selected && d.is_out === true));
|
|
7057
|
-
return (index.h(index.Host, { key: '
|
|
7091
|
+
return (index.h(index.Host, { key: '28786c060499c9bfbacf025b75f21d0e8a2d6ab1' }, index.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" }, index.h("div", { key: '812707c4108b5bdefa97e1ff7537998083e2403b', slot: "loading" }, index.h("salla-skeleton", { key: 'e82b875495873b66414ee4a75d845823373b4914', height: "100%", width: "100%" })), this.product?.images && this.product?.images.length > 0 && (index.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: {
|
|
7058
7092
|
centeredSlides: true,
|
|
7059
7093
|
centeredSlidesBounds: true,
|
|
7060
7094
|
slidesPerView: Math.min(5, Math.max(1, this.product?.images.length)),
|
|
@@ -7063,13 +7097,13 @@ const SallaMultipleBundleProductOptionsModal = class {
|
|
|
7063
7097
|
watchSlidesProgress: true,
|
|
7064
7098
|
direction: 'vertical',
|
|
7065
7099
|
spaceBetween: 10,
|
|
7066
|
-
} }, index.h("div", { key: '
|
|
7100
|
+
} }, index.h("div", { key: 'd585f7a29cb9265c39c471876d3a0cb7d2460359', slot: "items" }, this.product?.images &&
|
|
7067
7101
|
this.product?.images.map((image, index$1) => (index.h("div", { key: index$1, class: "swiper-slide" }, index.h("img", { src: image.url, alt: image.alt || `${this.product?.name} - Image ${index$1 + 1}`, loading: "lazy", onError: e => {
|
|
7068
7102
|
e.target.style.display = 'none';
|
|
7069
|
-
} }))))), this.product?.images && this.product?.images.length > 1 && (index.h("div", { key: '
|
|
7103
|
+
} }))))), this.product?.images && this.product?.images.length > 1 && (index.h("div", { key: '1a6edb417a6715617303634b7d756eef0075a01a', slot: "thumbs" }, this.product?.images &&
|
|
7070
7104
|
this.product?.images.map((image, index$1) => (index.h("div", { key: index$1, "data-caption": `${this.product?.name} - Image ${index$1 + 1}` }, index.h("img", { src: image.url, loading: "eager", class: "s-multiple-bundle-product-options-modal-slider-thumb", title: `${this.product?.name} - ${index$1 + 1}`, alt: image.alt || `${this.product?.name} - ${index$1 + 1}`, onError: e => {
|
|
7071
7105
|
e.target.style.display = 'none';
|
|
7072
|
-
} })))))))), index.h("salla-product-options", { options: JSON.stringify(optionsWithSelectedState), key: `${cacheKey}-reset-${resetToken}`, "product-id": productId, "unique-key": `${cacheKey}-reset-${resetToken}` }), index.h("div", { key: '
|
|
7106
|
+
} })))))))), index.h("salla-product-options", { options: JSON.stringify(optionsWithSelectedState), key: `${cacheKey}-reset-${resetToken}`, "product-id": productId, "unique-key": `${cacheKey}-reset-${resetToken}` }), index.h("div", { key: '22528e7438a30feffe5987ed86974a4eecea76a1', slot: "footer" }, index.h("div", { key: '7a891b1cd51d2f15e08523c2a4096ea4c50eb51b', class: "s-multiple-bundle-product-options-modal-footer" }, index.h("salla-button", { key: '4ed19c8cfdd3f37166a61fdbd452a8f205763469', onClick: e => this.onSave(e), loading: this.isLoading, disabled: isDisabled }, this.isLoading
|
|
7073
7107
|
? salla.lang.get('common.elements.saving')
|
|
7074
7108
|
: salla.lang.get('common.elements.save')))))));
|
|
7075
7109
|
}
|
|
@@ -7167,7 +7201,7 @@ const SallaMultipleBundleProductSlider = class {
|
|
|
7167
7201
|
return `bundle[${sectionId}][${productIndex}][id]`;
|
|
7168
7202
|
}
|
|
7169
7203
|
render() {
|
|
7170
|
-
return (index.h(index.Host, { key: '
|
|
7204
|
+
return (index.h(index.Host, { key: 'a1e7d56d8a50d1c31ba102d3246b0251516e0a73' }, index.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 } }, index.h("div", { key: '3ea742119ab77f129b8c60bbcc0f8c0f7bd3e97d', slot: "items" }, this?.section?.products?.map((product, productIndex) => {
|
|
7171
7205
|
const isChecked = this.selectedProducts[this.section.id]?.has(product.id) || false;
|
|
7172
7206
|
const hasSavedOptions = this.savedOptionsByInstance[this.getProductInstanceKey(this.section.id, productIndex)];
|
|
7173
7207
|
const optionsButtonLabel = hasSavedOptions
|
|
@@ -7178,7 +7212,7 @@ const SallaMultipleBundleProductSlider = class {
|
|
|
7178
7212
|
: ArrowRightIcon;
|
|
7179
7213
|
return (index.h("div", { class: `s-multiple-bundle-product-slide-one-third ${product.quantity == 0
|
|
7180
7214
|
? 's-multiple-bundle-product-slide-one-third-disabled'
|
|
7181
|
-
: ''}`, key: product.id }, index.h("div", { class: "s-multiple-bundle-product-card" }, index.h("div", { class: "s-multiple-bundle-product-image-wrapper", onClick: () => this.handleProductClick(product, productIndex) }, index.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 }), index.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" })), index.h("div", { class: "s-multiple-bundle-product-content-wrapper" }, index.h("div", { class: "s-multiple-bundle-product-content" }, index.h("div", { class: "s-multiple-bundle-product-details" }, index.h("div", { class: "s-multiple-bundle-product-title-wrapper" }, index.h("h2", { class: "s-multiple-bundle-product-title" }, product.name)), index.h("div", { class: "s-multiple-bundle-product-price-wrapper" }, index.h("span", { class: "s-multiple-bundle-product-price" }, index.h("span", { innerHTML: salla.money(product.price) })), product.sale_price > 0 && (index.h("span", { class: "s-multiple-bundle-product-price-discount" }, index.h("span", { innerHTML: salla.money(product.sale_price) }))))), product.quantity_in_group > 0 && product.quantity !== 0 && (index.h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.pieces'), index.h("span", null, product.quantity_in_group))), product.quantity === 0 && (index.h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.quantity_in_group_finished')))), product.options?.length > 0 && (index.h("button", { class: "s-multiple-bundle-product-button", onClick: () => this.handleOptionsClick(product), type: "button" }, optionsButtonLabel, index.h("span", { class: "s-multiple-bundle-product-button-icon", innerHTML: optionsArrowIcon })))))));
|
|
7215
|
+
: ''}`, key: product.id }, index.h("div", { class: "s-multiple-bundle-product-card" }, index.h("div", { class: "s-multiple-bundle-product-image-wrapper", onClick: () => this.handleProductClick(product, productIndex) }, index.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 }), index.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" })), index.h("div", { class: "s-multiple-bundle-product-content-wrapper" }, index.h("div", { class: "s-multiple-bundle-product-content" }, index.h("div", { class: "s-multiple-bundle-product-details" }, index.h("div", { class: "s-multiple-bundle-product-title-wrapper" }, index.h("h2", { class: "s-multiple-bundle-product-title" }, index.h("a", { href: product?.url || '#', target: "_blank", rel: "noopener noreferrer" }, product.name))), index.h("div", { class: "s-multiple-bundle-product-price-wrapper" }, index.h("span", { class: "s-multiple-bundle-product-price" }, index.h("span", { innerHTML: salla.money(product.price) })), product.sale_price > 0 && (index.h("span", { class: "s-multiple-bundle-product-price-discount" }, index.h("span", { innerHTML: salla.money(product.sale_price) }))))), product.quantity_in_group > 0 && product.quantity !== 0 && (index.h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.pieces'), index.h("span", null, product.quantity_in_group))), product.quantity === 0 && (index.h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.quantity_in_group_finished')))), product.options?.length > 0 && (index.h("button", { class: "s-multiple-bundle-product-button", onClick: () => this.handleOptionsClick(product), type: "button" }, optionsButtonLabel, index.h("span", { class: "s-multiple-bundle-product-button-icon", innerHTML: optionsArrowIcon })))))));
|
|
7182
7216
|
})))));
|
|
7183
7217
|
}
|
|
7184
7218
|
get host() { return index.getElement(this); }
|
|
@@ -7371,7 +7405,7 @@ const SallaOfferModal = class {
|
|
|
7371
7405
|
// '</div>';
|
|
7372
7406
|
// }
|
|
7373
7407
|
render() {
|
|
7374
|
-
return index.h("salla-modal", { key: '
|
|
7408
|
+
return index.h("salla-modal", { key: '2c88abbe21015431b7e70f2369284e2f93c6fd3c', "has-skeleton": true, "sub-title": this.offer_message, ref: modal => this.modal = modal, isLoading: true, class: `s-offer-modal-type-${this.offer_type ? this.offer_type : ''}` }, index.h("div", { key: 'f44a915307bdc059c937d60a79a1c22a59957928', slot: 'loading' }, index.h("div", { key: '7b4b6f9572a2893aa5353a5ba2d4d62a2a5d8742', class: "s-offer-modal-skeleton" }, index.h("div", { key: 'a6b2f782cd643dc322e3f3c29a596a44fc9b1ace', class: "s-offer-modal-skeleton-header" }, index.h("salla-skeleton", { key: 'a745dc619995820ac3a3bb9169b8a25cbceed9ea', type: 'circle', height: '80px', width: '80px' }), index.h("salla-skeleton", { key: '7d54b0aaa14742f4dfef0e2b26d48eb24f1661c5', height: '15px', width: '50%' }), index.h("salla-skeleton", { key: '042349f3c34308d070f36c30ac942935da5afebe', height: '10px', width: '30%' })), index.h("div", { key: '691f32282147054b2dd76d1e324ddd172214cbbd', class: "s-offer-modal-skeleton-items" }, [...Array(3)].map(() => index.h("div", { class: "s-offer-modal-skeleton-item" }, index.h("salla-skeleton", { height: '9rem' }), index.h("div", { class: "s-offer-modal-skeleton-item-title" }, index.h("salla-skeleton", { height: '15px', width: '100%' })), index.h("div", { class: "s-offer-modal-skeleton-item-subtitle" }, index.h("salla-skeleton", { height: '9px', width: '50%' }), index.h("div", { innerHTML: Cart2 }))))), index.h("div", { key: '97cbe8b3ca1c8dde39a2c33995116a7a5d088594', class: "s-offer-modal-skeleton-footer" }, index.h("salla-skeleton", { key: 'c2f5d9d2e212e0383f6b4d159f1c9ce52c9064b7', height: '15px', width: '50%' }), index.h("salla-skeleton", { key: 'c64ed16e51a4c9f302f915c025473a42d69d4490', height: '15px', width: '30%' })))), !this.hasError && this.offer !== null
|
|
7375
7409
|
? [index.h("span", { slot: 'icon', class: "s-offer-modal-header-icon", innerHTML: specialDiscount.SpecialDiscountIcon }), this.getOfferContent(), index.h("div", { class: "s-offer-modal-footer", slot: "footer" }, this.offer.formatted_date ?
|
|
7376
7410
|
index.h("p", { class: "s-offer-modal-expiry" }, salla.lang.get('pages.products.offer_expires_in'), " ", this.offer.formatted_date)
|
|
7377
7411
|
: '', index.h("label", { class: "s-offer-modal-remember-label" }, index.h("input", { type: "checkbox", onChange: e => this.rememberMe(e), class: "s-offer-modal-remember-input" }), "\u00A0 ", salla.lang.get('common.elements.remember_my_choice'))),
|
|
@@ -7420,7 +7454,7 @@ const SallaPlaceholder = class {
|
|
|
7420
7454
|
};
|
|
7421
7455
|
}
|
|
7422
7456
|
render() {
|
|
7423
|
-
return (index.h(index.Host, { key: '
|
|
7457
|
+
return (index.h(index.Host, { key: '5f8dc6c1c73a5ed21d571b692eadbf56cac2a133', class: this.alignmentClass() }, index.h("div", { key: '56df7bf4ce025b484943ec504c20bdedbb15604e', class: `s-placeholder-icon s-placeholder-icon-${this.iconSize}`, innerHTML: this.icon }), index.h("div", { key: 'c72a76711d4e915bc24557c7c490c2cf5899db12', class: "s-placeholder-title" }, index.h("slot", { key: 'a77295c121d95dad05657577b56bd4c220bdca03', name: 'title' }, index.h("span", { key: 'de463d3b9d37bd3231dc818dca9d3d37211881ad' }, salla.lang.get('common.elements.no_options')))), index.h("div", { key: '5af30b0673bef28cc61165969138f30638f6bc1a', class: "s-placeholder-description" }, index.h("slot", { key: '18057d95114aa4a074c29dbc60de1b4a707fa8f5', name: 'description' }, index.h("span", { key: '1695227c9a861b78fad5a850b22f8d51e812c0ab' }, salla.lang.get('common.errors.empty_results'))))));
|
|
7424
7458
|
}
|
|
7425
7459
|
};
|
|
7426
7460
|
SallaPlaceholder.style = sallaPlaceholderCss;
|
|
@@ -7562,7 +7596,7 @@ const SallaProductAvailability = class {
|
|
|
7562
7596
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
7563
7597
|
}
|
|
7564
7598
|
render() {
|
|
7565
|
-
return (index.h(index.Host, { key: '
|
|
7599
|
+
return (index.h(index.Host, { key: 'e5b3121a6e352338ff666ba419100150e838e0d2', class: "s-product-availability-wrap" }, this.isSubscribed || this.isVisitorSubscribed
|
|
7566
7600
|
? index.h("div", { class: "s-product-availability-subscribed" }, index.h("span", { innerHTML: BellRing, class: "s-product-availability-subs-icon" }), salla.lang.get('pages.products.notify_availability_success'))
|
|
7567
7601
|
:
|
|
7568
7602
|
index.h("salla-button", { width: "wide", onClick: () => this.isUser ? this.submit() : this.openModel() }, salla.lang.get('pages.products.notify_availability')), this.isUser || this.isSubscribed || this.isVisitorSubscribed ? '' : this.renderModal()));
|
|
@@ -7678,14 +7712,14 @@ const SallaProductCard = class {
|
|
|
7678
7712
|
's-product-card-out-of-stock': this.productData?.is_out_of_stock,
|
|
7679
7713
|
};
|
|
7680
7714
|
const hrefProp = this.productData?.url ? { href: this.productData.url, title: `Learn more about ${this.productData?.name}` } : {};
|
|
7681
|
-
return (index.h(index.Host, { key: '
|
|
7715
|
+
return (index.h(index.Host, { key: '95347f86f3dc0354a057290ce41f74aef0a66282', id: `product-${this.productData?.id}`, class: classes }, index.h("div", { key: '86927cbc56a2ea92a8e18c44c8999ee1d6f82b4d', class: !this.fullImage ? 's-product-card-image' : 's-product-card-image-full' }, index.h("a", { key: '6294925bce0a46287389a9423b16199cf92919fd', ...hrefProp }, index.h("img", { key: '74e0d9fae7c61e0e3e0e20e38166d64618c8ca3d', class: `s-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)
|
|
7682
7716
|
? 'contain'
|
|
7683
7717
|
: this.fitImageHeight
|
|
7684
7718
|
? this.fitImageHeight
|
|
7685
|
-
: 'cover'} lazy`, src: this.placeholder, alt: this.productData?.image?.alt || this.productData?.name, "data-src": this.productData?.image?.url || this.productData?.thumbnail }), !this.fullImage && !this.minimal ? this.getProductBadge() : ''), this.fullImage && index.h("a", { key: '
|
|
7686
|
-
index.h("salla-button", { shape: "icon", fill: "none", color: "light", "aria-label": "Add or remove to wishlist", ref: el => this.wishlistBtn = el, class: "s-product-card-wishlist-btn animated", onClick: () => salla.wishlist.toggle(this.productData.id) }, index.h("span", { innerHTML: Heart })) : ''), index.h("div", { key: '
|
|
7719
|
+
: 'cover'} lazy`, src: this.placeholder, alt: this.productData?.image?.alt || this.productData?.name, "data-src": this.productData?.image?.url || this.productData?.thumbnail }), !this.fullImage && !this.minimal ? this.getProductBadge() : ''), this.fullImage && index.h("a", { key: 'fd2db94c99d91815b13141460a8c4538aae4a53b', ...hrefProp, class: "s-product-card-overlay" }), !this.horizontal && !this.fullImage ?
|
|
7720
|
+
index.h("salla-button", { shape: "icon", fill: "none", color: "light", "aria-label": "Add or remove to wishlist", ref: el => this.wishlistBtn = el, class: "s-product-card-wishlist-btn animated", onClick: () => salla.wishlist.toggle(this.productData.id) }, index.h("span", { innerHTML: Heart })) : ''), index.h("div", { key: '9f4f39db770a394d9719664cd77111aef1c575f4', class: "s-product-card-content" }, this.isSpecial && this.productData?.quantity ?
|
|
7687
7721
|
index.h("div", { class: "s-product-card-content-pie", ref: pie => this.pie = pie }, index.h("span", null, index.h("b", null, salla.helpers.number(this.productData?.quantity)), this.remained), index.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -1 36 34", class: "s-product-card-content-pie-svg" }, index.h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-base" }), index.h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-bar" })))
|
|
7688
|
-
: '', index.h("div", { key: '
|
|
7722
|
+
: '', index.h("div", { key: 'eab2c5f49112dd490733e0b6f1e8c30ad9670690', class: { 's-product-card-content-main': true, 's-product-card-content-extra-padding': this.isSpecial } }, index.h("h3", { key: '5fadc35b2bf704903bf38128c390f71ec0a8b910', class: "s-product-card-content-title" }, index.h("a", { key: '7e0767efef938e20ed4c2592a0abec812a9caf86', ...hrefProp }, this.productData?.name)), this.productData?.subtitle && !this.minimal ?
|
|
7689
7723
|
index.h("p", { class: "s-product-card-content-subtitle" }, this.productData?.subtitle)
|
|
7690
7724
|
: ''), this.productData?.donation && !this.minimal && !this.fullImage ?
|
|
7691
7725
|
[index.h("salla-progress-bar", { donation: this.productData?.donation }), index.h("div", { class: "s-product-card-donation-input" }, this.productData?.donation?.can_donate ?
|
|
@@ -7694,7 +7728,7 @@ const SallaProductCard = class {
|
|
|
7694
7728
|
this.addBtn.donatingAmount = e.target.value;
|
|
7695
7729
|
}, id: "donation-amount", name: "donating_amount", class: "s-form-control", placeholder: this.donationAmount })]
|
|
7696
7730
|
: '')]
|
|
7697
|
-
: '', index.h("div", { key: '
|
|
7731
|
+
: '', index.h("div", { key: 'f29cdbd8b8bb715583ecb6c6bcc571c64341ee39', class: { 's-product-card-content-sub': true, 's-product-card-content-extra-padding': this.isSpecial } }, this.getProductPrice(), this.productData?.rating?.stars && !this.minimal ?
|
|
7698
7732
|
index.h("div", { class: "s-product-card-rating" }, index.h("span", { innerHTML: Rate }), index.h("span", null, this.productData.rating.stars))
|
|
7699
7733
|
: ''), this.isSpecial && this.productData.discount_ends
|
|
7700
7734
|
? index.h("salla-count-down", { date: this.formatDate(this.productData.discount_ends), "end-of-day": true, boxed: true, labeled: true })
|
|
@@ -7774,6 +7808,7 @@ const SallaProductOptions = class {
|
|
|
7774
7808
|
this.selectAmount = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ');
|
|
7775
7809
|
this.isCustomDonation = false;
|
|
7776
7810
|
this.selectedOptions = [];
|
|
7811
|
+
this.canDisabled = false;
|
|
7777
7812
|
this.disableCardValue = true;
|
|
7778
7813
|
this.availableDigitalCardValues = [];
|
|
7779
7814
|
this.userInitiatedValidation = false;
|
|
@@ -7829,7 +7864,6 @@ const SallaProductOptions = class {
|
|
|
7829
7864
|
const completed = option.donation.target_amount <= option.donation.collected_amount;
|
|
7830
7865
|
return index.h("div", { class: { "s-product-options-donation-message": true, "s-product-options-donation-completed": completed, "s-product-options-donation-expired": !completed } }, index.h("p", null, option.donation.target_message), index.h("span", { innerHTML: completed ? salla.money(option.donation.target_amount) : '' }));
|
|
7831
7866
|
};
|
|
7832
|
-
this.canDisabled = !salla.config.get('store.settings.product.notify_options_availability') || salla.url.is_page('cart');
|
|
7833
7867
|
salla.lang.onLoaded(() => {
|
|
7834
7868
|
this.outOfStockText = salla.lang.get("pages.products.out_of_stock");
|
|
7835
7869
|
this.donationAmount = salla.lang.get('pages.products.donation_amount');
|
|
@@ -7929,7 +7963,7 @@ const SallaProductOptions = class {
|
|
|
7929
7963
|
if (!closestProductOption.classList.contains('s-product-options-option-error')) {
|
|
7930
7964
|
closestProductOption.classList.add('s-product-options-option-error');
|
|
7931
7965
|
}
|
|
7932
|
-
if (this.userInitiatedValidation && !salla.url.is_page('cart')) {
|
|
7966
|
+
if ((this.userInitiatedValidation || salla.helpers.isIOSDevice()) && !salla.url.is_page('cart')) {
|
|
7933
7967
|
const firstInvalidElement = this.host.querySelector('.s-product-options-option-error');
|
|
7934
7968
|
if (firstInvalidElement === closestProductOption) {
|
|
7935
7969
|
this.scrollToElement(closestProductOption);
|
|
@@ -7937,9 +7971,9 @@ const SallaProductOptions = class {
|
|
|
7937
7971
|
}
|
|
7938
7972
|
}
|
|
7939
7973
|
scrollToElement(element) {
|
|
7940
|
-
if (element)
|
|
7941
|
-
|
|
7942
|
-
}
|
|
7974
|
+
if (!element)
|
|
7975
|
+
return;
|
|
7976
|
+
element.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
7943
7977
|
}
|
|
7944
7978
|
changedHandler(event, option, fireChangeEvent = true) {
|
|
7945
7979
|
const data = {
|
|
@@ -8134,10 +8168,17 @@ const SallaProductOptions = class {
|
|
|
8134
8168
|
}
|
|
8135
8169
|
this.outOfStockText = salla.lang.get('pages.products.out_of_stock');
|
|
8136
8170
|
await salla.onReady();
|
|
8137
|
-
|
|
8171
|
+
this.canDisabled = !salla.config.get('store.settings.product.notify_options_availability') || salla.url.is_page('cart');
|
|
8172
|
+
this.pasteHandler = this.handlePaste.bind(this);
|
|
8173
|
+
document.addEventListener("paste", this.pasteHandler);
|
|
8138
8174
|
const needsCartId = (!salla.storage.get('cart.id') && this.optionsData.some(option => ['file', 'image'].includes(option.type)));
|
|
8139
8175
|
return needsCartId ? salla.api.cart.getCurrentCartId(false, "salla-product-options") : null;
|
|
8140
8176
|
}
|
|
8177
|
+
disconnectedCallback() {
|
|
8178
|
+
if (this.pasteHandler) {
|
|
8179
|
+
document.removeEventListener("paste", this.pasteHandler);
|
|
8180
|
+
}
|
|
8181
|
+
}
|
|
8141
8182
|
/**
|
|
8142
8183
|
* This is a workaround for a bug in iOS 26 Safari, when pasting English text to RTL inputs, it adds extra text!!
|
|
8143
8184
|
* To avoid any break changes, we will make it only work on these conditions:
|
|
@@ -8151,7 +8192,8 @@ const SallaProductOptions = class {
|
|
|
8151
8192
|
const target = event.target;
|
|
8152
8193
|
if (!Salla.helpers.isAppleDevice()
|
|
8153
8194
|
|| !(target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement)
|
|
8154
|
-
|| !target.classList.contains('s-form-control')
|
|
8195
|
+
|| !target.classList.contains('s-form-control')
|
|
8196
|
+
|| !this.host.contains(target)) {
|
|
8155
8197
|
return;
|
|
8156
8198
|
}
|
|
8157
8199
|
// Prevent default paste (to avoid Safari inserting extra content)
|
|
@@ -8181,7 +8223,7 @@ const SallaProductOptions = class {
|
|
|
8181
8223
|
}
|
|
8182
8224
|
return (index.h(index.Host, { class: "s-product-options-wrapper" }, index.h("salla-conditional-fields", null, this.optionsData.map((option) => index.h("div", { key: option.id, class: `s-product-options-option-container${option.visibility_condition || this.hideDigitalCardsOptions(option) ? ' hidden' : ''}`, "data-option-id": option.id, ...this.getOptionShownWhen(option) }, option.name === 'splitter' ?
|
|
8183
8225
|
this.splitterOption()
|
|
8184
|
-
: index.h("div", { class: { "s-product-options-option": true, "s-product-options-option-booking": option.type === DisplayType.BOOKING && salla.url.is_page("cart") }, "data-option-type": option.type, "data-option-required": `${option.required}` }, index.h("label", { htmlFor: this.
|
|
8226
|
+
: index.h("div", { class: { "s-product-options-option": true, "s-product-options-option-booking": option.type === DisplayType.BOOKING && salla.url.is_page("cart") }, "data-option-type": option.type, "data-option-required": `${option.required}` }, index.h("label", { htmlFor: this.generateInputId(option.id), class: `s-product-options-option-label ${this.hideLabel(option) ? 's-product-options-option-label-hidden' : ''}` }, index.h("b", null, option.name, option.required && index.h("span", null, " * "), " "), index.h("small", null, option.placeholder)), index.h("div", { class: `s-product-options-option-content ${this.hideLabel(option) || (option.type === DisplayType.BOOKING && salla.url.is_page("cart")) ? 's-product-options-option-content-full-width' : ''}` }, this.getDisplayForType(option))))))));
|
|
8185
8227
|
}
|
|
8186
8228
|
generateUniqueKey(defaultValue) {
|
|
8187
8229
|
const contextData = this.bundleContext;
|
|
@@ -8201,6 +8243,14 @@ const SallaProductOptions = class {
|
|
|
8201
8243
|
}
|
|
8202
8244
|
return baseKey;
|
|
8203
8245
|
}
|
|
8246
|
+
/**
|
|
8247
|
+
* Generate a valid HTML id for option inputs.
|
|
8248
|
+
* @param optionId - The option ID
|
|
8249
|
+
* @returns The formatted id string
|
|
8250
|
+
*/
|
|
8251
|
+
generateInputId(optionId) {
|
|
8252
|
+
return this.generateUniqueKey(`option-${optionId}`);
|
|
8253
|
+
}
|
|
8204
8254
|
/**
|
|
8205
8255
|
* Generate the correct input name based on bundle context
|
|
8206
8256
|
* @param optionId - The option ID
|
|
@@ -8208,6 +8258,7 @@ const SallaProductOptions = class {
|
|
|
8208
8258
|
*/
|
|
8209
8259
|
generateInputName(optionId) {
|
|
8210
8260
|
const contextData = this.bundleContext;
|
|
8261
|
+
const baseOptionId = optionId.toString();
|
|
8211
8262
|
if (contextData) {
|
|
8212
8263
|
try {
|
|
8213
8264
|
// Handle both string and object types
|
|
@@ -8215,13 +8266,13 @@ const SallaProductOptions = class {
|
|
|
8215
8266
|
? JSON.parse(contextData)
|
|
8216
8267
|
: contextData;
|
|
8217
8268
|
const { sectionId, productId } = context;
|
|
8218
|
-
return `bundle[${sectionId}][${productId}][options][${
|
|
8269
|
+
return `bundle[${sectionId}][${productId}][options][${baseOptionId}]`;
|
|
8219
8270
|
}
|
|
8220
8271
|
catch (e) {
|
|
8221
|
-
return `options[${
|
|
8272
|
+
return `options[${baseOptionId}]`;
|
|
8222
8273
|
}
|
|
8223
8274
|
}
|
|
8224
|
-
return `options[${
|
|
8275
|
+
return `options[${baseOptionId}]`;
|
|
8225
8276
|
}
|
|
8226
8277
|
fillSelectedOptions() {
|
|
8227
8278
|
this.selectedOptions = this.optionsData.reduce((acc, opt) => {
|
|
@@ -8299,7 +8350,7 @@ const SallaProductOptions = class {
|
|
|
8299
8350
|
// TODO: (ONLY FOR TESTING!) find a better way to make it testable, e.g. wrap it with a unique class like textOption
|
|
8300
8351
|
//@ts-ignore
|
|
8301
8352
|
numberOption(option) {
|
|
8302
|
-
return index.h("input", { type: "text", value: option.value, class: "s-form-control", required: !option.visibility_condition && option.required, name: this.generateInputName(option.id), placeholder: option.placeholder, onBlur: e => this.changedHandler(e, option), onInvalid: (e) => this.invalidHandler(e, option), onInput: e => salla.helpers.inputDigitsOnly(e.target) });
|
|
8353
|
+
return index.h("input", { type: "text", value: option.value, class: "s-form-control", required: !option.visibility_condition && option.required, id: this.generateInputId(option.id), name: this.generateInputName(option.id), placeholder: option.placeholder, onBlur: e => this.changedHandler(e, option), onInvalid: (e) => this.invalidHandler(e, option), onInput: e => salla.helpers.inputDigitsOnly(e.target) });
|
|
8303
8354
|
}
|
|
8304
8355
|
//@ts-ignore
|
|
8305
8356
|
splitterOption() {
|
|
@@ -8307,12 +8358,12 @@ const SallaProductOptions = class {
|
|
|
8307
8358
|
}
|
|
8308
8359
|
//@ts-ignore
|
|
8309
8360
|
textOption(option) {
|
|
8310
|
-
return index.h("div", { class: "s-product-options-text" }, index.h("input", { type: "text", value: option.value, maxLength: option?.length, class: 's-form-control', required: !option.visibility_condition && option.required, name: this.generateInputName(option.id), placeholder: option.placeholder, onInvalid: (e) => this.invalidHandler(e, option), onChange: e => this.changedHandler(e, option) }));
|
|
8361
|
+
return index.h("div", { class: "s-product-options-text" }, index.h("input", { type: "text", value: option.value, maxLength: option?.length, class: 's-form-control', required: !option.visibility_condition && option.required, id: this.generateInputId(option.id), name: this.generateInputName(option.id), placeholder: option.placeholder, onInvalid: (e) => this.invalidHandler(e, option), onChange: e => this.changedHandler(e, option) }));
|
|
8311
8362
|
}
|
|
8312
8363
|
//@ts-ignore
|
|
8313
8364
|
textareaOption(option) {
|
|
8314
8365
|
//todo::remove mt-1 class, and if it's okay to remove the tag itself will be great
|
|
8315
|
-
return index.h("div", { class: "s-product-options-textarea" }, index.h("div", { class: "mt-1" }, index.h("textarea", { rows: 4, value: option.value, maxLength: option?.length, class: "s-form-control", required: !option.visibility_condition && option.required, id: this.
|
|
8366
|
+
return index.h("div", { class: "s-product-options-textarea" }, index.h("div", { class: "mt-1" }, index.h("textarea", { rows: 4, value: option.value, maxLength: option?.length, class: "s-form-control", required: !option.visibility_condition && option.required, id: this.generateInputId(option.id), name: this.generateInputName(option.id), placeholder: option.placeholder, onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option) })));
|
|
8316
8367
|
}
|
|
8317
8368
|
//@ts-ignore
|
|
8318
8369
|
mapOption(option) {
|
|
@@ -8408,7 +8459,7 @@ const SallaProductOptions = class {
|
|
|
8408
8459
|
* @returns HTMLElement - A select dropdown element with all option details.
|
|
8409
8460
|
*/
|
|
8410
8461
|
renderSelect(option) {
|
|
8411
|
-
return (index.h("div", null, index.h("select", { name: this.generateInputName(option.id), required: !option.visibility_condition && option.required, class: "s-form-control", onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option) }, index.h("option", { value: "" }, option.placeholder), option?.details.map((detail) => (index.h("option", { key: detail.id, value: detail.id, disabled: this.canDisabled && this.isOptionDetailOut(detail), selected: detail.is_selected }, this.getOptionDetailName(detail)))))));
|
|
8462
|
+
return (index.h("div", null, index.h("select", { id: this.generateInputId(option.id), name: this.generateInputName(option.id), required: !option.visibility_condition && option.required, class: "s-form-control", onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option) }, index.h("option", { value: "" }, option.placeholder), option?.details.map((detail) => (index.h("option", { key: detail.id, value: detail.id, disabled: this.canDisabled && this.isOptionDetailOut(detail), selected: detail.is_selected }, this.getOptionDetailName(detail)))))));
|
|
8412
8463
|
}
|
|
8413
8464
|
/**
|
|
8414
8465
|
* Renders a grid-based layout for option inputs (radio or checkbox).
|
|
@@ -8484,7 +8535,11 @@ const SallaProductOptions = class {
|
|
|
8484
8535
|
}
|
|
8485
8536
|
countryOption(option) {
|
|
8486
8537
|
return index.h("div", { class: "s-product-options-digital-card-wrapper" }, option.details.map((detail) => {
|
|
8487
|
-
return index.h("label", { htmlFor: this.generateUniqueKey(detail.id.toString()), key: detail.id, class: { "s-product-options-digital-card-option": true, "s-product-options-digital-card-option-stock-out": detail.is_out } }, index.h("input", { id: this.generateUniqueKey(detail.id.toString()), type: "radio", class: "s-form-control s-product-options-digital-card-input", value: detail.id, name: this.generateInputName(option.id), disabled: detail.is_out, required: !option.visibility_condition && option.required, onInvalid: (e) => this.invalidHandler(e, option), onChange: e => this.changedHandler(e, option), onClick: () => { this.disableCardValue = false; }, ...(salla.url.is_page("cart") ? { defaultChecked: this.getSelectedDigitalCardOptions(option)?.id === detail.id } : {}) }), index.h("img", { loading:
|
|
8538
|
+
return index.h("label", { htmlFor: this.generateUniqueKey(detail.id.toString()), key: detail.id, class: { "s-product-options-digital-card-option": true, "s-product-options-digital-card-option-stock-out": detail.is_out } }, index.h("input", { id: this.generateUniqueKey(detail.id.toString()), type: "radio", class: "s-form-control s-product-options-digital-card-input", value: detail.id, name: this.generateInputName(option.id), disabled: detail.is_out, required: !option.visibility_condition && option.required, onInvalid: (e) => this.invalidHandler(e, option), onChange: e => this.changedHandler(e, option), onClick: () => { this.disableCardValue = false; }, ...(salla.url.is_page("cart") ? { defaultChecked: this.getSelectedDigitalCardOptions(option)?.id === detail.id } : {}) }), index.h("img", { loading: "lazy", alt: detail.code, height: 24, width: 24, class: "s-product-options-country-flag", src: `https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/${String(detail.code).toLocaleLowerCase()}.svg`, onError: e => {
|
|
8539
|
+
e.currentTarget.onerror = null;
|
|
8540
|
+
e.currentTarget.src =
|
|
8541
|
+
salla.url.cdn('images/globe.svg');
|
|
8542
|
+
} }), index.h("span", null, detail.name));
|
|
8488
8543
|
}));
|
|
8489
8544
|
}
|
|
8490
8545
|
get host() { return index.getElement(this); }
|
|
@@ -8539,11 +8594,11 @@ const SallaProductSizeGuide = class {
|
|
|
8539
8594
|
return index.h("salla-placeholder", { alignment: "center", iconSize: "xl" }, index.h("div", { slot: "title" }, this.placeholder_title), index.h("div", { slot: "description" }, this.placeholder_description));
|
|
8540
8595
|
}
|
|
8541
8596
|
render() {
|
|
8542
|
-
return (index.h("salla-modal", { key: '
|
|
8597
|
+
return (index.h("salla-modal", { key: '6c952c6cdd01f99332809112fd5921c4b43cd518', class: "s-product-size-guide-wrapper", id: 'salla-product-size-guide-modal', isLoading: true, "has-skeleton": true, width: "md", ref: modal => this.modal = modal }, index.h("span", { key: 'f4260144f981da0081e09895b7a065cad1fa66bc', slot: 'icon', class: "s-product-size-guide-header-icon", innerHTML: PencilRuler }), index.h("div", { key: '80e28a80741f103fdc788a6afa8809dfabfd64f6', slot: "loading" }, index.h("div", { key: 'e190d657a6a03e48a813c2f78321c12cf95eadcb', class: "s-product-size-guide-skeleton" }, index.h("salla-skeleton", { key: '94cb87240b52244a86ba76893261048aa3f356d9', height: '15px', width: '25%' }), index.h("div", { key: 'c8bba70713c78829d0973b845a3ed942cb7fa150', class: "s-product-size-guide-skeleton-header" }, index.h("salla-skeleton", { key: '13b2fe8a4655457567d087e5763e43abb8b2d2a5', height: '40px' }), index.h("salla-skeleton", { key: '4b23015076c7c44794eecf85a4355264f778ef10', height: '40px' }), index.h("salla-skeleton", { key: '3cd58dfafb05cc2bac89ad6973247075d0dd9571', height: '40px' }), index.h("salla-skeleton", { key: '36f28def58893e567e6186d94ec3a84abed159ab', height: '40px' })), index.h("div", { key: '854881c782f372b2ed1b08874dfa4bd5d64edef2', class: "s-product-size-guide-skeleton-content" }, index.h("salla-skeleton", { key: 'a790751c95177a49135859f5810b4cd947fa4314', height: '15px', width: '25%' }), index.h("salla-skeleton", { key: 'a9e4bd9a0bf55bd391da7f68ba85db7893f1eb81', height: '10px', width: '75%' }), index.h("salla-skeleton", { key: 'b0f73c83abd9b6e8521dacb823d65f13f9ba54bb', height: '10px', width: '50%' }), index.h("salla-skeleton", { key: 'fe92879eedf28801c4d267e4595e5f4aa5c7b871', height: '10px', width: '75%' }), index.h("salla-skeleton", { key: '652d460114bc710073adcb2e31a6627c938259c5', height: '10px', width: '100%' }), index.h("salla-skeleton", { key: '71f461d5256a05d4ac407b00daf2e20dccef0cf5', height: '10px', width: '25%' }), index.h("salla-skeleton", { key: 'dbd224caad4233eb0bf8a5012fab7160d067d371', height: '10px', width: '60%' }), index.h("salla-skeleton", { key: 'c87baa836ae0282047ccc8b7fb122a80cdf7256a', height: '10px', width: '45%' }), index.h("salla-skeleton", { key: '2c02db790ed567de556d7fa74f48843d156dedb6', height: '10px', width: '30%' })))), index.h("slot", { key: '155efc69836cfc62382a8b3f7929c7200244f4ba', name: "header" }), !this.hasError && !!this.guides ?
|
|
8543
8598
|
[
|
|
8544
8599
|
index.h("salla-tabs", null, this.guides.map((guide) => index.h("salla-tab-header", { slot: "header", name: guide.name }, index.h("span", null, guide.name))), this.guides.map((guide) => index.h("salla-tab-content", { slot: "content", name: guide.name }, index.h("div", { innerHTML: guide.description }))))
|
|
8545
8600
|
]
|
|
8546
|
-
: this.showPlaceholder(), index.h("slot", { key: '
|
|
8601
|
+
: this.showPlaceholder(), index.h("slot", { key: '6d212a3d48df9363485e77f37f71276a1c3f8ee7', name: "footer" })));
|
|
8547
8602
|
}
|
|
8548
8603
|
get host() { return index.getElement(this); }
|
|
8549
8604
|
};
|
|
@@ -9464,6 +9519,10 @@ const sallaQuantityInputCss = "";
|
|
|
9464
9519
|
const SallaQuantityInput = class {
|
|
9465
9520
|
constructor(hostRef) {
|
|
9466
9521
|
index.registerInstance(this, hostRef);
|
|
9522
|
+
/**
|
|
9523
|
+
* Based on store setting: store.settings.product.manual_quantity
|
|
9524
|
+
*/
|
|
9525
|
+
this.disableInput = false;
|
|
9467
9526
|
this.hostAttributes = {};
|
|
9468
9527
|
this.hasIncrementSlot = false;
|
|
9469
9528
|
this.hasDecrementSlot = false;
|
|
@@ -9489,7 +9548,9 @@ const SallaQuantityInput = class {
|
|
|
9489
9548
|
});
|
|
9490
9549
|
});
|
|
9491
9550
|
}
|
|
9492
|
-
componentWillLoad() {
|
|
9551
|
+
async componentWillLoad() {
|
|
9552
|
+
await salla.onReady();
|
|
9553
|
+
this.disableInput = salla.config.get('store.settings.product.manual_quantity');
|
|
9493
9554
|
this.quantity = parseInt(this.host.getAttribute('value')) || 1;
|
|
9494
9555
|
this.hasIncrementSlot = !!this.host.querySelector('[slot="increment-button"]');
|
|
9495
9556
|
this.hasDecrementSlot = !!this.host.querySelector('[slot="decrement-button"]');
|
|
@@ -9537,7 +9598,11 @@ const SallaQuantityInput = class {
|
|
|
9537
9598
|
return this.host;
|
|
9538
9599
|
}
|
|
9539
9600
|
render() {
|
|
9540
|
-
|
|
9601
|
+
const inputAttributes = this.getInputAttributes();
|
|
9602
|
+
if (!inputAttributes['aria-label'] && !inputAttributes['aria-labelledby']) {
|
|
9603
|
+
inputAttributes['aria-label'] = salla.lang.getWithDefault('common.elements.quantity', 'Quantity');
|
|
9604
|
+
}
|
|
9605
|
+
return (index.h(index.Host, { key: '4dfc6c39c86047493c7b37057c877657fc6206ab', class: "s-quantity-input" }, index.h("div", { key: '246b30299c5b318d9412d7b065e0a219a77ba342', class: "s-quantity-input-container" }, index.h("button", { key: '1e8f61c6014f36e257fbc7958547228481393624', onClick: () => this.increase(), class: "s-quantity-input-increase-button s-quantity-input-button", type: "button", "aria-label": salla.lang.getWithDefault('common.elements.increase_quantity', 'Increase quantity') }, !this.hasIncrementSlot ? index.h("span", { innerHTML: Add }) : '', index.h("slot", { key: '1da4aa703d8f135437e49b35c8bd664a39c207cc', name: "increment-button" })), index.h("input", { key: 'd781816bc3fa9b2fc5d004c5284a583f0dc4f75b', class: "s-quantity-input-input", ...inputAttributes, ref: (el) => this.textInput = el, onInput: (event) => this.setValue(event.target.value), min: "1", readOnly: this.disableInput, value: this.quantity }), index.h("button", { key: 'a52ed57453eeae844e435de4f1d0e9ae66768892', class: "s-quantity-input-decrease-button s-quantity-input-button", onClick: () => this.decrease(), type: "button", "aria-label": salla.lang.getWithDefault('common.elements.decrease_quantity', 'Decrease quantity') }, !this.hasDecrementSlot ? index.h("span", { innerHTML: Minus }) : '', index.h("slot", { key: '9c2b8ef10df5dc976120249dbc5fb6d3e3b68d31', name: "decrement-button" })))));
|
|
9541
9606
|
}
|
|
9542
9607
|
get host() { return index.getElement(this); }
|
|
9543
9608
|
static get watchers() { return {
|
|
@@ -10180,8 +10245,10 @@ window.SallaApplePay = {
|
|
|
10180
10245
|
|
|
10181
10246
|
return Http.requestWithSupportAjax(SallaApplePay.detail.recalculateTotal.url.replace('{id}', SallaApplePay.id), {}, 'get').then((data) => {
|
|
10182
10247
|
let cart = data.data.initial_data?.cart || data.data.cart;
|
|
10248
|
+
let payments = data.data.initial_data?.payments;
|
|
10249
|
+
|
|
10183
10250
|
// todo :: enhance response from backend
|
|
10184
|
-
SallaApplePay.detail.amount = cart.total;
|
|
10251
|
+
SallaApplePay.detail.amount = payments?.gateways?.applePay?.supportedMultiCurrency ? cart.total_in_customer_currency : cart.total;
|
|
10185
10252
|
SallaApplePay.detail.items = (cart.totals || cart.items).map((item) => {
|
|
10186
10253
|
return {
|
|
10187
10254
|
label: item.title,
|
|
@@ -10210,7 +10277,7 @@ window.SallaApplePay = {
|
|
|
10210
10277
|
private_company_id: private_company_id,
|
|
10211
10278
|
payment_method: 'apple_pay'
|
|
10212
10279
|
};
|
|
10213
|
-
const selectedShippingMethod = SallaApplePay.shipping_methods?.find((item)=> item.company
|
|
10280
|
+
const selectedShippingMethod = SallaApplePay.shipping_methods?.find((item)=> item.company == company_id || item.ship_id == company_id);
|
|
10214
10281
|
if (selectedShippingMethod?.route_id){
|
|
10215
10282
|
payload.shipping_route_id = selectedShippingMethod.route_id;
|
|
10216
10283
|
payload.type = selectedShippingMethod.type;
|
|
@@ -10387,7 +10454,7 @@ const SallaQuickBuy = class {
|
|
|
10387
10454
|
return new Promise((resolve, reject) => {
|
|
10388
10455
|
salla.onReady(async () => {
|
|
10389
10456
|
if (!this.currency) {
|
|
10390
|
-
this.currency = salla.config.get('user.currency_code');
|
|
10457
|
+
this.currency = salla.config.get('store.settings.buy_now.multi_currency') ? salla.config.get('user.currency_code') : 'SAR';
|
|
10391
10458
|
}
|
|
10392
10459
|
if (!this.productId && salla.config.get('page.id')) {
|
|
10393
10460
|
this.productId = salla.config.get('page.id');
|
|
@@ -10442,7 +10509,7 @@ const SallaQuickBuy = class {
|
|
|
10442
10509
|
});
|
|
10443
10510
|
}
|
|
10444
10511
|
render() {
|
|
10445
|
-
return index.h(index.Host, { key: '
|
|
10512
|
+
return index.h(index.Host, { key: 'a6093f9df07d58cc290a3376c44847c8b4c345ce' }, this.quickBuyButton());
|
|
10446
10513
|
}
|
|
10447
10514
|
quickBuyButton() {
|
|
10448
10515
|
return index.h("apple-pay-button", { locale: salla.config.get('user.language_code'), onClick: () => this.quickBuyHandler(), "data-quick-purchase": "applepay", class: "s-quick-buy-apple-pay", "data-is-applepay": "1", buttonstyle: "black", type: this.type });
|
|
@@ -11509,7 +11576,7 @@ const SallaScopees = class {
|
|
|
11509
11576
|
return salla.onReady();
|
|
11510
11577
|
}
|
|
11511
11578
|
render() {
|
|
11512
|
-
return (index.h(index.Host, { key: '
|
|
11579
|
+
return (index.h(index.Host, { key: '8cbe5fbbe87bff9b835ae59fc92278725a9d09cf' }, index.h("salla-modal", { key: '82017d18802be5fa8fff95b2cbe32886308bb23e', ref: modal => this.modal = modal, isClosable: !!(this.isOpenedBefore || (this.selection == 'optional')), class: "s-scopes-modal", isLoading: this.loading, "has-skeleton": true }, this.loading ?
|
|
11513
11580
|
index.h("div", { slot: "loading" }, index.h("div", { class: "s-scopes-skeleton" }, index.h("salla-list-tile", { class: "s-scopes-header" }, index.h("div", { slot: "icon", class: "s-scopes-header-icon" }, index.h("salla-skeleton", { type: "circle" })), index.h("div", { slot: "title", class: "s-scopes-header-title mb-5" }, index.h("salla-skeleton", { height: '15px', width: '50%' })), index.h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, index.h("salla-skeleton", { height: '10px' }), index.h("salla-skeleton", { height: '10px', width: '75%' }))), index.h("div", { class: "s-scopes-skeleton-search" }, index.h("salla-skeleton", { height: '10px', width: '50%' }), index.h("salla-skeleton", { height: '30px', width: '100%' })), index.h("div", { class: "s-scopes-skeleton-scopes" }, index.h("salla-skeleton", { height: '10px', width: '30%' }), index.h("salla-skeleton", { height: '10px', width: '25%' }), index.h("salla-skeleton", { height: '10px', width: '30%' }), index.h("salla-skeleton", { height: '10px', width: '25%' }), index.h("salla-skeleton", { height: '10px', width: '30%' }), index.h("salla-skeleton", { height: '10px', width: '25%' }), index.h("salla-skeleton", { height: '10px', width: '30%' }), index.h("salla-skeleton", { height: '10px', width: '25%' })), index.h("div", { class: "s-scopes-skeleton-btn" }, index.h("salla-skeleton", { height: '40px', width: '100%' }))))
|
|
11514
11581
|
:
|
|
11515
11582
|
[index.h("salla-list-tile", { class: this.originalScopesList?.length ? "s-scopes-header block" : "s-hidden" }, index.h("div", { slot: "icon", class: "s-scopes-header-icon", innerHTML: StoreAlt }), index.h("div", { slot: "title", class: "s-scopes-header-title" }, salla.lang.get('blocks.scope.you_are_browse_store_from')), index.h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, !!this.selected_scope ? this.selected_scope.name : "")), index.h("div", { class: "s-scopes-wrap" }, !!this.originalScopesList?.length && index.h("h4", { class: "s-scopes-title" }, this.getFormTitle()), this.originalScopesList?.length > this.searchDisplayLimit ?
|
|
@@ -11643,12 +11710,12 @@ const SallaSearch = class {
|
|
|
11643
11710
|
this.inputValue.length < 3 ? this.container.classList.remove('s-search-no-results') : '';
|
|
11644
11711
|
}
|
|
11645
11712
|
render() {
|
|
11646
|
-
const searchContent = index.h("div", { key: '
|
|
11647
|
-
index.h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && index.h("span", { innerHTML: Search })) : null), index.h("div", { key: '
|
|
11713
|
+
const searchContent = index.h("div", { key: '2e945555af379b5992375336c5b33a1dbb92589b', class: { 's-search-container': true, 's-search-inline': this.inline }, ref: container => this.container = container }, index.h("div", { key: '28c948e49a1d72a3a79e87477f37cc5f26dd4b3a', class: "s-search-input-wrapper" }, index.h("span", { key: 'b053ea1b4e6ed3c4030010dd61923421fcfeb214', class: "s-search-icon-wrap" }, index.h("span", { key: 'e1ecd01ab77d0ddd0b7b2010788fe28deaebd2af', class: "s-search-icon", innerHTML: this.loading ? '<i class="s-search-spinner-loader"/>' : Search })), index.h("input", { key: 'bca441ce72aac9bb85f2862413c77fa853e703c6', type: "search", enterkeyhint: "search", autocomplete: "off", class: "s-search-input", placeholder: salla.lang.get('blocks.header.search_placeholder'), onInput: (e) => this.limitWordsAndSearch(e), onKeyDown: e => this.handleKeyDown(e), ref: input => this.searchInput = input, style: { height: this.height + 'px', borderRadius: this.oval ? this.height / 2 + 'px' : '' } }), this.showAction ?
|
|
11714
|
+
index.h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && index.h("span", { innerHTML: Search })) : null), index.h("div", { key: '07ed4d8828b8343dd05bacb3a6904ad30eacce7a', class: "s-search-results" }, this.results?.data.map((product) => index.h("a", { href: product.url + '?from=search-bar', class: { "s-search-product": true, 's-search-product-not-available': !product.is_available }, innerHTML: this.productSlot
|
|
11648
11715
|
.replace(/\{name\}/g, product.name)
|
|
11649
11716
|
.replace(/\{price\}/g, product.price ? salla.money(product.price) : '')
|
|
11650
11717
|
.replace(/\{regular_price\}/g, product.is_on_sale && product.regular_price ? salla.money(product.regular_price) : '')
|
|
11651
|
-
.replace(/\{image\}/g, product.image.url) })), index.h("p", { key: '
|
|
11718
|
+
.replace(/\{image\}/g, product.image.url) })), index.h("p", { key: '7a3420f60f2172f39c44633176a454f9ae06f0ce', ref: el => this.noResults = el, class: "s-search-no-results-placeholder" }, salla.lang.get('common.elements.no_options'))));
|
|
11652
11719
|
return (this.inline ?
|
|
11653
11720
|
index.h("div", { class: "s-search-modal" }, searchContent)
|
|
11654
11721
|
:
|
|
@@ -11691,7 +11758,7 @@ const SallaSkeleton = class {
|
|
|
11691
11758
|
's-skeleton-item': true,
|
|
11692
11759
|
's-skeleton-item-circular': this.type == 'circle',
|
|
11693
11760
|
};
|
|
11694
|
-
return (index.h(index.Host, { key: '
|
|
11761
|
+
return (index.h(index.Host, { key: 'ad465a77b10e2f1d739c802643076f63985cfda5', class: "s-skeleton-wrapper", style: { width: this.width, height: this.height } }, index.h("div", { key: '0b05bcfc21d3bcb85389a2a0c9b63c3a7aa28d60', class: classes }, "\u00A0")));
|
|
11695
11762
|
}
|
|
11696
11763
|
};
|
|
11697
11764
|
SallaSkeleton.style = sallaSkeletonCss;
|
|
@@ -12214,7 +12281,7 @@ const SallaSlider = class {
|
|
|
12214
12281
|
classes += this.verticalThumbs ? ' s-slider-vertical ' : ' s-slider-horizontal ';
|
|
12215
12282
|
classes += this.arrowsCentered ? ' s-slider-v-centered ' : '';
|
|
12216
12283
|
classes += this.gridThumbs ? ' s-slider-with-grid-thumbs ' : '';
|
|
12217
|
-
return (index.h(index.Host, { key: '
|
|
12284
|
+
return (index.h(index.Host, { key: '1ea8cca50a8069cfa57617a79d84a1d9a9f85d8a', class: 's-slider-wrapper ' + classes }, this.blockTitle || this.showControls ?
|
|
12218
12285
|
index.h("div", { class: "s-slider-block__title" }, this.blockTitle ?
|
|
12219
12286
|
index.h("div", { class: "s-slider-block__title-right" }, index.h("h2", null, this.blockTitle), this.blockSubtitle ? index.h("p", { innerHTML: this.blockSubtitle }) : '')
|
|
12220
12287
|
: '', index.h("div", { class: "s-slider-block__title-left" }, this.displayAllUrl ?
|
|
@@ -12222,7 +12289,7 @@ const SallaSlider = class {
|
|
|
12222
12289
|
: '', this.showControls ?
|
|
12223
12290
|
index.h("div", { class: "s-slider-block__title-nav", dir: "rtl" }, index.h("button", { "aria-label": "Previous Slide", class: "s-slider-prev s-slider-nav-arrow" }, index.h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowRightIcon : ArrowLeftIcon })), index.h("button", { "aria-label": "Next Slide", class: "s-slider-next s-slider-nav-arrow" }, index.h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowLeftIcon : ArrowRightIcon })))
|
|
12224
12291
|
: ''))
|
|
12225
|
-
: '', index.h("div", { key: '
|
|
12292
|
+
: '', index.h("div", { key: 'e782e1a255ef74387e143be5e54ec8212b133f63', class: "swiper s-slider-container", ref: el => this.sliderContainer = el, dir: this.vertical ? "ltr" : this.direction }, index.h("slot", { key: 'e69fb142f47b11d749a0ea2676177118eaa2093a' }), index.h("div", { key: '469f85e0a975a1de25c6c6c47918b85bb640e271', class: "swiper-wrapper s-slider-swiper-wrapper", ref: el => this.sliderWrapper = el }, index.h("slot", { key: '87d7c9b65e2d499bbd716a17ec5ce1f3079cc750', name: 'items' })), this.pagination ? index.h("div", { class: "swiper-pagination" }) : ''), this.type == 'thumbs' && this.hasThumbSlot ? index.h("div", { class: "s-slider-thumbs" }, index.h("div", { class: "swiper s-slider-thumbs-container", dir: this.getThumbsDirection(), ref: el => this.thumbsSliderContainer = el }, index.h("div", { class: { "s-slider-swiper-wrapper swiper-wrapper": true, "s-slider-grid-thumbs": this.gridThumbs }, ref: el => this.thumbsSliderWrapper = el }, index.h("slot", { name: "thumbs" })), this.showThumbsControls ?
|
|
12226
12293
|
index.h("div", { class: "s-slider-thumbs-nav", dir: "rtl" }, index.h("button", { "aria-label": "Previous Slide", class: "s-slider-thumbs-prev s-slider-nav-arrow" }, index.h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowRightIcon : ArrowLeftIcon })), index.h("button", { "aria-label": "Next Slide", class: "s-slider-thumbs-next s-slider-nav-arrow" }, index.h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowLeftIcon : ArrowRightIcon })))
|
|
12227
12294
|
: null))
|
|
12228
12295
|
: null));
|
|
@@ -12306,6 +12373,9 @@ const SallaSocialShare = class {
|
|
|
12306
12373
|
this.platforms = 'facebook,twitter,whatsapp,email,copy_link';
|
|
12307
12374
|
}
|
|
12308
12375
|
componentWillLoad() {
|
|
12376
|
+
if (this.host.hasAttribute('aria-label')) {
|
|
12377
|
+
this.host.removeAttribute('aria-label');
|
|
12378
|
+
}
|
|
12309
12379
|
if (document.getElementById('a2a-script')) {
|
|
12310
12380
|
return;
|
|
12311
12381
|
}
|
|
@@ -12385,7 +12455,7 @@ const SallaSocialShare = class {
|
|
|
12385
12455
|
window.a2a?.init('page');
|
|
12386
12456
|
}
|
|
12387
12457
|
render() {
|
|
12388
|
-
return (index.h("div", { key: '
|
|
12458
|
+
return (index.h("div", { key: 'c4ac8faea4a8ec8aa5ba9f4e744710d508387d78', class: "s-social-share-wrapper" }, index.h("slot", { key: '6c6b54513f67be8818a9a042570286d09b7115f8', name: 'widget' }, index.h("salla-button", { key: '8a57650940dad634cf3576dada4cc35687ed447c', "aria-label": "Share", onClick: () => this.open(), class: "s-social-share-btn", shape: "icon", fill: "outline", color: "light" }, index.h("span", { key: '207f2fb0e2f89e7057775153ffcc68eebb069824', innerHTML: this.opened ? Cancel : ShareAlt }))), index.h("ul", { key: 'fd9b25a483a93efa10994c2a7a876b6741d976c2', ref: el => this.shareMenu = el, class: "s-social-share-list a2a_kit share", "data-a2a-url": this.url ? this.url : window.location.href, "data-a2a-title": this.urlName ? this.urlName : document.title }, this.platforms.split(',').map(platform => {
|
|
12389
12459
|
return (index.h("li", null, index.h("a", { class: `a2a_button_${platform}`, "aria-label": `Share Via ${platform}` }, this.platformIcons.map((icon) => {
|
|
12390
12460
|
if (icon.name === platform) {
|
|
12391
12461
|
return index.h("span", { class: "s-social-share-icon", innerHTML: icon.icon });
|
|
@@ -12393,6 +12463,7 @@ const SallaSocialShare = class {
|
|
|
12393
12463
|
}))));
|
|
12394
12464
|
}))));
|
|
12395
12465
|
}
|
|
12466
|
+
get host() { return index.getElement(this); }
|
|
12396
12467
|
};
|
|
12397
12468
|
SallaSocialShare.style = sallaSocialShareCss;
|
|
12398
12469
|
|
|
@@ -12424,7 +12495,7 @@ const SallaTabContent = class {
|
|
|
12424
12495
|
's-tabs-content': true,
|
|
12425
12496
|
's-tabs-content-selected': this.isSelected
|
|
12426
12497
|
};
|
|
12427
|
-
return (index.h("div", { key: '
|
|
12498
|
+
return (index.h("div", { key: '6b11ec3a839c759e64e1766de55f9ac1be18931e', class: classes }, index.h("slot", { key: '17300d7a52e068428ea956b2c5d5be6d0ab69fca' })));
|
|
12428
12499
|
}
|
|
12429
12500
|
};
|
|
12430
12501
|
SallaTabContent.style = sallaTabContentCss;
|
|
@@ -12483,7 +12554,7 @@ const SallaTabHeader = class {
|
|
|
12483
12554
|
's-tabs-active': this.isSelected,
|
|
12484
12555
|
};
|
|
12485
12556
|
return [
|
|
12486
|
-
index.h("div", { key: '
|
|
12557
|
+
index.h("div", { key: '08c51c1ad15c6b0efbeb165c89fc7d73748467d0', class: classes, onClick: this.onClick.bind(this) }, index.h("slot", { key: 'ba5045dab7c254eb4533dc64630ab0c1f561701b' })),
|
|
12487
12558
|
];
|
|
12488
12559
|
}
|
|
12489
12560
|
};
|
|
@@ -12536,7 +12607,7 @@ const SallaTabs = class {
|
|
|
12536
12607
|
}
|
|
12537
12608
|
render() {
|
|
12538
12609
|
return [
|
|
12539
|
-
index.h("div", { key: '
|
|
12610
|
+
index.h("div", { key: '3195e8954179d52867093b5e861b3c0caa6d7af6', class: "s-tabs" }, index.h("div", { key: 'cf75a77b6cc9b9cd288e963ee56acf19e177029a', class: "s-tabs-header" }, index.h("slot", { key: 'fa345597be2fbb8ff4f1cb420a030c5ec821bc8b', name: "header" })), index.h("div", { key: 'f7fd939608e5341b6d9c1d75e7d9dc909a4d8912', class: "s-tabs-content-wrapper" }, index.h("slot", { key: '86ce2c9bcb3be06264e75369a6be81b2e1361619', name: "content" })))
|
|
12540
12611
|
];
|
|
12541
12612
|
}
|
|
12542
12613
|
get host() { return index.getElement(this); }
|
|
@@ -12554,7 +12625,7 @@ const SallaTelInput = class {
|
|
|
12554
12625
|
if (this.TelInput)
|
|
12555
12626
|
return;
|
|
12556
12627
|
try {
|
|
12557
|
-
const telInputModule = await Promise.resolve().then(function () { return require('./index-
|
|
12628
|
+
const telInputModule = await Promise.resolve().then(function () { return require('./index-ChHHnqio.js'); }).then(function (n) { return n.index; });
|
|
12558
12629
|
this.TelInput = telInputModule.default;
|
|
12559
12630
|
}
|
|
12560
12631
|
catch (error) {
|
|
@@ -12668,7 +12739,7 @@ const SallaTelInput = class {
|
|
|
12668
12739
|
}
|
|
12669
12740
|
}
|
|
12670
12741
|
render() {
|
|
12671
|
-
return (index.h(index.Host, { key: '
|
|
12742
|
+
return (index.h(index.Host, { key: '362e48d1b39b0715c10df0c15c730ca21793a46b', class: "s-tel-input" }, index.h("input", { key: '07dcb2fcf639c2d7b95c250079bd24a80441e0ca', type: "tel", disabled: this.disabled, name: this.name, value: this.phone, onChange: (event) => this.handleCountryInput(event), ref: el => this.phoneInput = el, enterkeyhint: "next", autocomplete: "tel", class: "s-tel-input-control tel-input s-ltr" }), index.h("span", { key: 'c50f81a50debf37dc92f81fc61c3ddd3e622031f', class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), index.h("input", { key: '2217131b313a32c5b62dcce6132a4914f30dc005', type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })));
|
|
12672
12743
|
}
|
|
12673
12744
|
componentDidLoad() {
|
|
12674
12745
|
this.initTelInput();
|
|
@@ -12819,6 +12890,7 @@ const SallaUserMenu = class {
|
|
|
12819
12890
|
async componentWillLoad() {
|
|
12820
12891
|
await salla.onReady();
|
|
12821
12892
|
await salla.lang.onLoaded();
|
|
12893
|
+
Salla.event.on('api::token.injected', (token) => this.profileUrl = this.buildProfileUrl(token));
|
|
12822
12894
|
this.sallaAccountEnabled = Salla.config.get('store.features')?.includes('salla-account');
|
|
12823
12895
|
this.items = this.sallaAccountEnabled ? { ...this.items, settings: SettingstIcon } : this.items;
|
|
12824
12896
|
//we need it only in theme-y
|
|
@@ -12827,7 +12899,11 @@ const SallaUserMenu = class {
|
|
|
12827
12899
|
}
|
|
12828
12900
|
//we need it to be the last item
|
|
12829
12901
|
this.items.logout = LogoutIcon;
|
|
12830
|
-
|
|
12902
|
+
let token = Salla.storage.get('token');
|
|
12903
|
+
if (!token) {
|
|
12904
|
+
token = '';
|
|
12905
|
+
}
|
|
12906
|
+
this.profileUrl = this.buildProfileUrl(token);
|
|
12831
12907
|
const trigger = this.host.querySelector('[slot="trigger"]');
|
|
12832
12908
|
this.triggerSlot =
|
|
12833
12909
|
'<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>';
|
|
@@ -12925,6 +13001,9 @@ const SallaUserMenu = class {
|
|
|
12925
13001
|
componentDidLoad() {
|
|
12926
13002
|
document.lazyLoadInstance?.update(this.host.querySelectorAll('.lazy'));
|
|
12927
13003
|
}
|
|
13004
|
+
buildProfileUrl(token) {
|
|
13005
|
+
return `${Salla.config.get('account.url', 'https://accounts.salla.com')}/${salla.config.get('user.language_code')}/user?store=${Salla.config.get('store.id')}&info=${encodeURIComponent(token)}`;
|
|
13006
|
+
}
|
|
12928
13007
|
get host() { return index.getElement(this); }
|
|
12929
13008
|
};
|
|
12930
13009
|
SallaUserMenu.style = sallaUserMenuCss;
|
|
@@ -13140,7 +13219,7 @@ const SallaUserSettings = class {
|
|
|
13140
13219
|
await salla.profile.delete().finally(() => this.confirmationModal.close());
|
|
13141
13220
|
}
|
|
13142
13221
|
render() {
|
|
13143
|
-
return (index.h(index.Host, { key: '
|
|
13222
|
+
return (index.h(index.Host, { key: 'e47b5c39666443b29de9d54ec8f05cb97950ace1', class: "s-user-settings-wrapper" }, this.canHideName && index.h("div", { key: '54b3098aa736c43d6d3ef53f6a49710dc039a16d', class: "s-user-settings-section" }, index.h("salla-list-tile", { key: 'dd1d06cd2ad3e0696c76cfd3f4c8b342e774b679' }, index.h("div", { key: '2e8b8fb48d36ce6f183698cb60a856ee0b74c639', slot: "icon", class: "s-user-settings-section-icon" }, index.h("span", { key: '0f7158ae21c5a93c5458c38388c79fb7cfa1e88d', innerHTML: UserCancel })), index.h("div", { key: 'f3f648e8f55f5998362107654d3a3c438bec2999', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), index.h("div", { key: 'eddfaf2a9faf242123db36f1aa5a87fc242f6ccc', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), index.h("div", { key: '1112ebcb125325688758d57de115ed36d965752d', slot: 'action', class: "s-user-settings-section-action" }, index.h("label", { key: '4bacd7e71a3f9ccef749d091d70be45b0184d195', class: "s-toggle" }, index.h("input", { key: '64db5795f938f72a5c0710c03c46f84bb0248b68', class: "s-toggle-input", checked: this.isHiddenName, onChange: (e) => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), index.h("div", { key: 'b1e178372d37f63992ba81ee6d5645fb17f5ce33', class: "s-toggle-switcher" }))))), index.h("div", { key: 'a11d585e1b5fe0430ca00757394e5c9a085192f9', class: "s-user-settings-section" }, index.h("salla-list-tile", { key: '61ad291644bc8314b443eec5d3a32abccc9c46ba' }, index.h("div", { key: 'e54526b5f18ce365d68efb9292af2d67ae20b77b', slot: "icon", class: "s-user-settings-section-icon" }, index.h("span", { key: 'e2bb0f2b30ac57d6336785485ef99279acf09617', innerHTML: Bullhorn })), index.h("div", { key: '2f6ec0835993e79b1923778bfe0d6442d71809f0', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), index.h("div", { key: '6ad65576302c12e2298abd3de70fd5edd54aa542', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), index.h("div", { key: '05f00c6ed5511bd6a21b3e01a54a01549c758940', slot: 'action', class: "s-user-settings-section-action" }, index.h("label", { key: '5c3520e04e57205dfe2e7f441e45c46682a56ad4', class: "s-toggle" }, index.h("input", { key: '8f7f59433b3685acbc0d35c6ceca93a9a6a4ebbf', class: "s-toggle-input", checked: this.isNotifiable, onChange: (e) => this.toggleSetting('is_notifiable', e), type: "checkbox" }), index.h("div", { key: 'a92abe23b596360bfb3e516ffb0789b53abaabd0', class: "s-toggle-switcher" }))))), index.h("div", { key: '0996cc090ab85a67e763b5acd19cc87db11c090d', class: "s-user-settings-section s-user-settings-section-deactivate-user" }, index.h("salla-list-tile", { key: 'f6b43aa4a618d75981fed8844ed1f4ebc3947239' }, index.h("div", { key: '3027e7c901c1ec214a9effdbd36e1c25d96cdb75', slot: "icon", class: "s-user-settings-section-icon" }, index.h("span", { key: '11468d7a54fa406e697e07b2ff2fe5c945a28746', innerHTML: UserOff })), index.h("div", { key: 'c2fd73f5d313daaba740c89ad2654144f6f54bb1', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deactivateAccount)), index.h("div", { key: 'e2bad2737f3ca8e30bbb375ad7691d607366551c', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.deactivateDesc)), index.h("div", { key: 'df155e019df0514ed77faaeef107845ce144ca08', slot: 'action', class: "s-user-settings-section-action" }, index.h("salla-button", { key: 'e7bd07fcbc49ba9e991adf52854b35c9ca8d0344', fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeactivateModal() }, this.capitalizeText(this.deactivateAccount))))), index.h("salla-modal", { key: '730df3b04afb89a1eba96651899cf84818d49b6b', width: "sm", subTitle: this.capitalizeText(this.sorryForLeavingText), ref: modal => this.confirmationModal = modal }, index.h("span", { key: '5254b44fac993e1e1454da4eae346afc5ad7211c', slot: 'icon', class: "s-user-settings-confirmation-icon", innerHTML: UserOff }), index.h("div", { key: '9c07be490266024dee72ca4a244c8dd4ffdd9d71', class: "s-user-settings-confirmation" }, index.h("div", { key: 'd42ac2fa9cc0030778b444b21958992677667cc3', class: "s-user-settings-confirmation-warning" }, this.capitalizeText(this.warningText)), index.h("div", { key: 'b3cd6b31255244c469571beaf05a0f266eb431af', class: "s-user-settings-confirmation-actions" }, index.h("salla-button", { key: 'aadfefcd7e2561542adb10c416bac0ff14b25fef', width: "wide", onClick: () => this.confirmationModal.close() }, this.capitalizeText(this.keepAccount)), index.h("salla-button", { key: '12693adf31b54a4ca993632fb527dac91ec810b2', fill: 'outline', loading: this.buttonLoading, width: "wide", onClick: () => this.deleteAccount() }, this.capitalizeText(this.deactivateAccount)))))));
|
|
13144
13223
|
}
|
|
13145
13224
|
};
|
|
13146
13225
|
SallaUserSettings.style = sallaUserSettingsCss;
|