@salla.sa/twilight-components 2.14.313 → 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-Cb19kTbw.js → filepond-hpLROc_m.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DVc66rcg.js → filepond-plugin-file-poster-C8gskRGl.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BC6y9Sv3.js → filepond-plugin-file-validate-size-CaO6qVs6.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-npctEnon.js → filepond-plugin-file-validate-type-mUUtcgCs.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-CJrWzKcr.js → filepond-plugin-image-edit-rptDhPuc.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-CEZiujht.js → filepond-plugin-image-exif-orientation-B6L8W0Qe.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Bk5_ED_I.js → filepond-plugin-image-preview-BoqOfOki.js} +1 -1
- package/dist/cjs/{index-DCJLMRDw.js → index-2liYDuhx.js} +583 -420
- package/dist/cjs/{index-CeCbuoue.js → index-ChHHnqio.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion_62.cjs.entry.js +164 -93
- 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-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-settings.js +1 -1
- package/dist/esm/{filepond-9b3kZc-1.js → filepond-CwjnR_95.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CUQ3777V.js → filepond-plugin-file-poster-DES9KQfe.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-Dfk5mlDB.js → filepond-plugin-file-validate-size-BcloWdhO.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-BPui8oQ-.js → filepond-plugin-file-validate-type-CbjGxksB.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-BHp0JfV4.js → filepond-plugin-image-edit-BtZ6aJg8.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BZ-x6UNo.js → filepond-plugin-image-exif-orientation-BVNb0UTU.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-D_CJzbI7.js → filepond-plugin-image-preview-t1v2q4Jq.js} +1 -1
- package/dist/esm/{index-CtDnNMoY.js → index-CRmtzwUF.js} +583 -420
- package/dist/esm/{index-90xXQpPV.js → index-HmYGeOpS.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion_62.entry.js +164 -93
- 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-10c954ff.entry.js → p-1c31f335.entry.js} +1 -1
- package/dist/twilight/{p-6baecf00.entry.js → p-1f31af27.entry.js} +1 -1
- package/dist/twilight/{p-bcae2015.entry.js → p-21ced14f.entry.js} +1 -1
- package/dist/twilight/{p-edc30e8d.entry.js → p-2bb93ed0.entry.js} +1 -1
- package/dist/twilight/{p-751f8d64.entry.js → p-3862a37f.entry.js} +1 -1
- package/dist/twilight/{p-9006bd13.entry.js → p-3f45a06b.entry.js} +1 -1
- package/dist/twilight/{p-77dbe4d3.entry.js → p-403bef37.entry.js} +1 -1
- package/dist/twilight/{p-6a6ca941.entry.js → p-4317d018.entry.js} +1 -1
- package/dist/twilight/{p-6f1bf015.entry.js → p-45053a9b.entry.js} +1 -1
- package/dist/twilight/{p-90f48bbc.entry.js → p-48d76aa7.entry.js} +1 -1
- package/dist/twilight/{p-abb6acb7.entry.js → p-56d3794f.entry.js} +1 -1
- package/dist/twilight/{p-cfd1bd43.entry.js → p-69600ceb.entry.js} +1 -1
- package/dist/twilight/{p-257c97c7.entry.js → p-817fca09.entry.js} +1 -1
- package/dist/twilight/{p-7da316d9.entry.js → p-877ee446.entry.js} +1 -1
- package/dist/twilight/p-878f405f.entry.js +4 -0
- package/dist/twilight/{p-aad5ea17.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-C99niCgx.js → p-BgkeXrDK.js} +1 -1
- package/dist/twilight/{p-Cu8zDA0W.js → p-BxtqlawD.js} +1 -1
- package/dist/twilight/p-CRmtzwUF.js +5 -0
- package/dist/twilight/{p-VBs0_gXo.js → p-DTy6dAEi.js} +1 -1
- package/dist/twilight/{p-RIImqj-k.js → p-DdMTtNYY.js} +1 -1
- package/dist/twilight/{p-ChN2gm1a.js → p-VCBBJkYb.js} +1 -1
- package/dist/twilight/{p-B3B6KApY.js → p-YYVkPdoE.js} +1 -1
- package/dist/twilight/{p-81cb2ef8.entry.js → p-a3ae644b.entry.js} +1 -1
- package/dist/twilight/{p-a0720857.entry.js → p-a4ad6d0b.entry.js} +1 -1
- package/dist/twilight/{p-66e73a02.entry.js → p-a665ff5d.entry.js} +1 -1
- package/dist/twilight/{p-95e20ce6.entry.js → p-a9bec6cf.entry.js} +1 -1
- package/dist/twilight/{p-b6834fe3.entry.js → p-b7f1e672.entry.js} +1 -1
- package/dist/twilight/p-c0f8d377.entry.js +11 -0
- package/dist/twilight/{p-2f30b7d6.entry.js → p-e98f8bae.entry.js} +1 -1
- package/dist/twilight/{p-23b0afa5.entry.js → p-eb6378eb.entry.js} +1 -1
- package/dist/twilight/{p-4cb3c829.entry.js → p-ef827c32.entry.js} +1 -1
- package/dist/twilight/{p-fdda110d.entry.js → p-f01949b5.entry.js} +1 -1
- package/dist/twilight/{p-9f895d32.entry.js → p-f10087fd.entry.js} +1 -1
- package/dist/twilight/{p-a48db011.entry.js → p-f33a5658.entry.js} +1 -1
- package/dist/twilight/p-f4dc16e8.entry.js +4 -0
- package/dist/twilight/{p-c1f93ef4.entry.js → p-f6a7b2cf.entry.js} +1 -1
- package/dist/twilight/{p-my_auvQd.js → p-sFNa2aTl.js} +1 -1
- package/dist/twilight/{p-CSuYUYU-.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/package.json +5 -5
- package/dist/twilight/p-44c0c27c.entry.js +0 -4
- package/dist/twilight/p-742e5dad.entry.js +0 -4
- package/dist/twilight/p-7b38bcfd.entry.js +0 -4
- package/dist/twilight/p-98dc3c50.entry.js +0 -4
- package/dist/twilight/p-CtDnNMoY.js +0 -5
- package/dist/twilight/p-a93459da.entry.js +0 -4
- package/dist/twilight/p-b3299eeb.entry.js +0 -4
- package/dist/twilight/p-e32ffd30.entry.js +0 -11
- package/dist/twilight/p-e47e36d7.entry.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement, c as createEvent, d as getDefaultExportFromCjs, F as Fragment, j as axios } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement, c as createEvent, d as getDefaultExportFromCjs, F as Fragment, j as axios } from './index-CRmtzwUF.js';
|
|
5
5
|
import { a as anime } from './anime.es-CgtvEd63.js';
|
|
6
6
|
import { A as ArrowDownIcon, S as SpecialDiscountIcon } from './special-discount-yRO-ZESF.js';
|
|
7
7
|
import { I as IconVerified } from './check-uTyAzPSy.js';
|
|
@@ -929,7 +929,6 @@ const sallaButtonCss = "";
|
|
|
929
929
|
const SallaButton = class {
|
|
930
930
|
constructor(hostRef) {
|
|
931
931
|
registerInstance(this, hostRef);
|
|
932
|
-
this.hostAttributes = {};
|
|
933
932
|
/**
|
|
934
933
|
* Button Type
|
|
935
934
|
*/
|
|
@@ -1017,23 +1016,40 @@ const SallaButton = class {
|
|
|
1017
1016
|
return this.host;
|
|
1018
1017
|
}
|
|
1019
1018
|
getBtnAttributes() {
|
|
1019
|
+
const hostAttributes = {};
|
|
1020
1020
|
for (let i = 0; i < this.host.attributes.length; i++) {
|
|
1021
1021
|
if (!['color', 'fill', 'size', 'width', 'id'].includes(this.host.attributes[i].name)) {
|
|
1022
|
-
|
|
1022
|
+
hostAttributes[this.host.attributes[i].name] = this.host.attributes[i].value;
|
|
1023
1023
|
}
|
|
1024
1024
|
}
|
|
1025
|
-
|
|
1026
|
-
|
|
1025
|
+
hostAttributes.type = hostAttributes.type || this.type;
|
|
1026
|
+
const buttonClass = hostAttributes.class || '';
|
|
1027
|
+
hostAttributes.class = buttonClass +
|
|
1027
1028
|
' s-button-element s-button-' + this.shape
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1029
|
+
+ ' s-button-' + (this.fill == "none" ? 'fill-none' : this.fill)
|
|
1030
|
+
+ (this.size != "medium" ? ' s-button-' + this.size : '')
|
|
1031
|
+
+ (this.width != "normal" ? ' s-button-' + this.width : '')
|
|
1032
|
+
+ (this.shape == "link" ? ' s-button-' + this.color + '-link' : '')
|
|
1033
|
+
+ (this.shape != "link" && this.fill != 'outline' ? ' s-button-' + this.color : '')
|
|
1034
|
+
+ (this.fill == 'outline' ? ' s-button-' + this.color + '-outline' : '')
|
|
1035
|
+
+ (this.disabled ? ' s-button-disabled ' : '')
|
|
1036
|
+
+ (this.shape == 'icon' ? ' s-button-loader-center' : ' s-button-loader-' + this.loaderPosition);
|
|
1037
|
+
if (!hostAttributes['aria-label'] && !hostAttributes['aria-labelledby']) {
|
|
1038
|
+
const buttonText = (this.host.textContent || '').trim();
|
|
1039
|
+
// Only add aria-label for buttons without visible text (icon buttons)
|
|
1040
|
+
// Buttons with visible text don't need aria-label as screen readers already announce the text
|
|
1041
|
+
if (!buttonText) {
|
|
1042
|
+
// Check if it's a wishlist button and add aria-label automatically
|
|
1043
|
+
const isWishlistButton = buttonClass.includes('btn--wishlist') || buttonClass.includes('wishlist');
|
|
1044
|
+
if (isWishlistButton) {
|
|
1045
|
+
hostAttributes['aria-label'] = salla.lang.getWithDefault('pages.products.add_to_wishlist', 'Add or remove to wishlist');
|
|
1046
|
+
}
|
|
1047
|
+
else if (this.shape === 'icon') {
|
|
1048
|
+
console.warn('Icon button is missing aria-label attribute');
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
return hostAttributes;
|
|
1037
1053
|
}
|
|
1038
1054
|
button() {
|
|
1039
1055
|
return (h("button", { ...this.getBtnAttributes(), disabled: this.disabled }, h("span", { class: "s-button-text", ref: el => this.text = el }, h("slot", null)), this.loading ? h("span", { class: "s-button-loader" }) : ''));
|
|
@@ -2485,15 +2501,20 @@ const SallaCommentItem = class {
|
|
|
2485
2501
|
}
|
|
2486
2502
|
localStorage.setItem('liked_comments', JSON.stringify(this.likedComments));
|
|
2487
2503
|
}
|
|
2504
|
+
PinnedIcon() {
|
|
2505
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "16", height: "16", color: "#555555", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M12 16V21" }), h("path", { d: "M8 5.2918C8 5.02079 8 4.88529 8.01312 4.77132C8.1194 3.84789 8.84789 3.1194 9.77133 3.01312C9.88529 3 10.0208 3 10.2918 3H13.7082C13.9792 3 14.1147 3 14.2287 3.01312C15.1521 3.1194 15.8806 3.84789 15.9869 4.77132C16 4.88529 16 5.02079 16 5.2918C16 5.37885 16 5.42237 15.9967 5.46264C15.9708 5.78281 15.7927 6.07104 15.5179 6.2374C15.4834 6.25832 15.4444 6.27779 15.3666 6.31672L15.1055 6.44726C14.7021 6.64897 14.5003 6.74983 14.3681 6.90564C14.26 7.03286 14.1856 7.18509 14.1515 7.34846C14.1097 7.54854 14.1539 7.76968 14.2424 8.21197L15 12H15.3333C15.9533 12 16.2633 12 16.5176 12.0681C17.2078 12.2531 17.7469 12.7922 17.9319 13.4824C18 13.7367 18 14.0467 18 14.6667C18 14.9767 18 15.1317 17.9659 15.2588C17.8735 15.6039 17.6039 15.8735 17.2588 15.9659C17.1317 16 16.9767 16 16.6667 16H7.33333C7.02334 16 6.86835 16 6.74118 15.9659C6.39609 15.8735 6.12654 15.6039 6.03407 15.2588C6 15.1317 6 14.9767 6 14.6667C6 14.0467 6 13.7367 6.06815 13.4824C6.25308 12.7922 6.79218 12.2531 7.48236 12.0681C7.73669 12 8.04669 12 8.66667 12H9L9.75761 8.21197C9.84606 7.76968 9.89029 7.54854 9.84852 7.34846C9.81441 7.18509 9.73995 7.03286 9.63194 6.90564C9.49965 6.74983 9.29794 6.64897 8.89452 6.44726L8.63344 6.31672C8.55558 6.27779 8.51665 6.25832 8.48208 6.2374C8.20731 6.07104 8.02917 5.78281 8.00326 5.46264C8 5.42237 8 5.37885 8 5.2918Z" })));
|
|
2506
|
+
}
|
|
2488
2507
|
render() {
|
|
2489
2508
|
let isAdmin = this.comment.type == 'admin';
|
|
2490
|
-
return (h(Host, { key: '
|
|
2509
|
+
return (h(Host, { key: '05979122884df06d634ab4f75f61d12cee93b228', class: isAdmin ? 's-comments-item-admin' : 's-comments-item' }, h("div", { key: 'd3be984afb159d8d6a1d4c0daf0bb72c97136a3a', class: { "s-comments-item-wrapper": !isAdmin, "s-comments-item-admin-wrapper": isAdmin }, id: `s-comments-item-${this.comment.id}` }, h("div", { key: '29a48174434b634e4afa5a1f2339b04705ea9f90', class: "s-comments-item-inner s-comments-flex-1" }, isAdmin && h("span", { key: 'b2536843c0549b2eb24759a09f51a97b68e36654', class: "s-comments-item-reply-icon", innerHTML: Reply }), h("div", { key: '553ad8fd8a3ada5cbca3c744f8b80a259ae7d2c2', class: "s-comments-item-avatar" }, h("img", { key: '57d429fa1dc545d3fe16c1f4713b960d1d7ef9f8', "data-src": this.comment?.avatar, alt: this.comment?.name, src: this.comment?.avatar, class: "s-comments-item-avatar-img lazy" })), h("div", { key: '8b2a3206dfa97c41a731baf18794e44ce096876f', class: "s-comments-flex-1" }, h("div", { key: '95ebefb4d82bb66d7cbc567554d0b9da2e4b416a', class: "s-comments-item-user-wrapper" }, h("div", { key: '1e6091d08973e5fc2ae8a982e6b09e5d349fede3', class: "s-comments-item-user-info" }, h("h3", { key: 'ee5ea0ea457fc43ee49cae033097297ab8358f76', class: this.comment.is_pinned ? "s-comments-item-user-info-name" : "s-comments-item-user-info-name-with-margin" }, this.comment?.name), this.comment.is_pinned ?
|
|
2510
|
+
h("div", { class: "s-comments-item-pinned-icon-with-margin" }, this.PinnedIcon())
|
|
2511
|
+
: null, (this.comment.has_order || !!this.comment.rating) && !this.comment.is_pending && !this.hideBought ?
|
|
2491
2512
|
h("div", { class: "s-comments-flex" }, this.comment.has_order ?
|
|
2492
2513
|
[h("span", { class: "s-comments-item-has-order-check-icon", innerHTML: IconVerified }), h("span", { class: "s-comments-item-has-order-check-text" }, this.has_bought_trans, " ", this.comment.rating ? ', ' : '')] : null, !!this.comment.rating ?
|
|
2493
2514
|
h("span", { class: "s-comments-item-rated-widget" }, this.rated_trans) : null)
|
|
2494
|
-
: null), h("p", { key: '
|
|
2515
|
+
: null), h("p", { key: '80c430d77b6ae3e959db9bc089fd7fe834e56bd2', class: "s-comments-item-timestamp s-ltr" }, this.getDate(this.comment.created_at?.date), h("span", { key: '49a1b26309490d6252f0fbd53b50374cbf10071d', class: "s-comments-item-time" }, " - ", this.getTime(this.comment.created_at?.date))), !!this.comment.rating || !!this.comment.stars ?
|
|
2495
2516
|
h("salla-rating-stars", { size: "mini", class: "s-comments-item-stars", value: this.comment.rating || this.comment.stars })
|
|
2496
|
-
: null), h("div", { key: '
|
|
2517
|
+
: null), h("div", { key: '780bee1166000b296e6956921c71cfd4f48e8153', class: "s-comments-item-content" }, h("p", { key: '9ff2a32cbd551ff911300ce6cfa1065770117a18', innerHTML: this.comment.content }), this.allowAttachImages && h("div", { key: 'f47022f4916c3d4e0641273612b4a5f7c69a4595', class: "s-comments-item-images" }, this.comment.images.map((image, index) => (h("img", { key: index, src: image, alt: "", onClick: () => this.modal.open() }))), h("salla-modal", { key: '8e70ec00301d369bbed5c1f11a1887a0498e2b0c', ref: modal => this.modal = modal, width: "sm" }, h("salla-slider", { key: '65cb35fd60869f64780fbb5bfc61fbc3cddc49c9', id: `s-comments-item-${this.comment.id}-images`, class: "s-comments-item-images-slider", type: "thumbs", "auto-height": true, showControls: this.comment.images.length > 1 ? true : false, "show-thumbs-controls": "false" }, h("div", { key: 'bb0cf465f99ecfe9ee10dfb96949cd7b5793da90', slot: 'items' }, this.comment.images.map((image, index) => (h("img", { key: index, src: image, alt: "" })))), h("div", { key: 'e195759f1df5a87b761478ac4a379411f284785c', slot: "thumbs" }, this.comment.images.map((image, index) => (h("div", { class: "s-comments-item-images-slider-thumb" }, h("img", { key: index, src: image, alt: "" })))))))), this.allowLikes && !isAdmin && salla.url.is_page('product.single') ? h("salla-button", { ref: el => this.likeBtn = el, class: `s-comments-item-like-btn ${this.likedComments.includes(this.comment.id) ? 'liked' : ''}`, loaderPosition: 'center', fill: 'outline', size: 'small', onClick: () => this.toggleLike() }, h("span", null, this.helpfulLabel, " ", this.likesCount > 0 ? `(${this.likesCount})` : ''), h("span", { innerHTML: ThumbsUp })) : '', this.comment.is_pending ?
|
|
2497
2518
|
h("span", { class: "s-comments-item-pending-text" }, this.waiting_approval_trans) : null))), !!this.getReplies().length && !isAdmin ?
|
|
2498
2519
|
this.getReplies().map((reply) => {
|
|
2499
2520
|
return h("div", null, h("salla-comment-item", { comment: reply }));
|
|
@@ -2767,7 +2788,7 @@ const SallaComments = class {
|
|
|
2767
2788
|
return (h("div", null, !!this.total && !this.hideTitle ? h("h2", { class: "s-comments-title" }, this.blockTitle ? this.blockTitle : this.comment_title) : '', !this.hideForm && !this.testimonials ? h("salla-comment-form", { showAvatar: this.showFormAvatar, type: this.type, "item-id": this.itemId }) : '', h("div", { class: "s-comments-placeholder" }, h("span", { innerHTML: ChatBubbles }), h("p", null, this.noComments))));
|
|
2768
2789
|
}
|
|
2769
2790
|
return (h("div", { class: `s-comments s-comments-${this.testimonials ? 'testimonials' : this.type}` }, h("div", { class: `${this.type === CommentType.PAGE ? "s-comments-page-container" : "s-comments-container"}` }, !!this.total && !this.hideTitle ? h("h2", { class: "s-comments-title" }, this.blockTitle ? this.blockTitle : this.comment_title) : '', !this.hideForm && h("salla-comment-form", { showAvatar: this.showFormAvatar, type: this.type, "item-id": this.itemId }), salla.url.is_page('product.single') ? h("salla-reviews-summary", { itemId: this.itemId }) : '', h("div", { class: `s-comments-header ${this.total ? "has-total" : ""}` }, !!this.total && h("span", { class: "s-comments-count-label", innerHTML: this.pluralize(this.comment_name, this.total) }), !!this.total && !this.testimonials && this.type !== CommentType.BLOG ?
|
|
2770
|
-
h("div", { class: "s-comments-filter-wrapper" }, h("label", { class: "s-comments-filter-label", htmlFor: "comments-filter" }, salla.lang.get('pages.categories.sorting')), h("select", { id: "comments-filter", class: "s-form-control s-comments-sort-input", onChange: (e) => {
|
|
2791
|
+
h("div", { class: "s-comments-filter-wrapper" }, h("label", { class: "s-comments-filter-label", htmlFor: "comments-filter" }, salla.lang.get('pages.categories.sorting')), h("select", { id: "comments-filter", "aria-label": salla.lang.get('pages.categories.sorting'), class: "s-form-control s-comments-sort-input", onChange: (e) => {
|
|
2771
2792
|
this.sort = e.target.value;
|
|
2772
2793
|
this.reload();
|
|
2773
2794
|
} }, h("option", { value: "latest", selected: true }, salla.lang.get("pages.testimonials.sort_by_date_desc")), h("option", { value: "oldest" }, salla.lang.get("pages.testimonials.sort_by_date_asc")), this.allowLikes && h("option", { value: "most_helpful" }, this.mostHelpfulLabel)))
|
|
@@ -3524,13 +3545,13 @@ const SallaFileUpload = class {
|
|
|
3524
3545
|
return;
|
|
3525
3546
|
try {
|
|
3526
3547
|
const [FilePondModule, FilePondPluginFileValidateSize, FilePondPluginImageExifOrientation, FilePondPluginImagePreview, FilePondPluginImageEdit, FilePondPluginFileValidateType, FilePondPluginFilePoster] = await Promise.all([
|
|
3527
|
-
import('./filepond-
|
|
3528
|
-
import('./filepond-plugin-file-validate-size-
|
|
3529
|
-
import('./filepond-plugin-image-exif-orientation-
|
|
3530
|
-
import('./filepond-plugin-image-preview-
|
|
3531
|
-
import('./filepond-plugin-image-edit-
|
|
3532
|
-
import('./filepond-plugin-file-validate-type-
|
|
3533
|
-
import('./filepond-plugin-file-poster-
|
|
3548
|
+
import('./filepond-CwjnR_95.js').then(function (n) { return n.f; }),
|
|
3549
|
+
import('./filepond-plugin-file-validate-size-BcloWdhO.js').then(function (n) { return n.f; }),
|
|
3550
|
+
import('./filepond-plugin-image-exif-orientation-BVNb0UTU.js').then(function (n) { return n.f; }),
|
|
3551
|
+
import('./filepond-plugin-image-preview-t1v2q4Jq.js').then(function (n) { return n.f; }),
|
|
3552
|
+
import('./filepond-plugin-image-edit-BtZ6aJg8.js').then(function (n) { return n.f; }),
|
|
3553
|
+
import('./filepond-plugin-file-validate-type-CbjGxksB.js').then(function (n) { return n.f; }),
|
|
3554
|
+
import('./filepond-plugin-file-poster-DES9KQfe.js').then(function (n) { return n.f; })
|
|
3534
3555
|
]);
|
|
3535
3556
|
this.FilePond = FilePondModule;
|
|
3536
3557
|
// Register plugins
|
|
@@ -4472,7 +4493,7 @@ const SallaGifting = class {
|
|
|
4472
4493
|
}
|
|
4473
4494
|
render() {
|
|
4474
4495
|
return [
|
|
4475
|
-
h("div", { key: '
|
|
4496
|
+
h("div", { key: '69f449221a2abf8e4d9264b46ab023eb7baca314' }, h("salla-list-tile", { key: '0072bab6171c9b11e54f0c6655c408b12d554e24', class: this.generateClass() }, h("div", { key: '38aa5f8decf6d9c97253c3c16b80a478d623985e', slot: "title" }, this.vertical ? h("span", { innerHTML: GiftSharing }) : '', h("h3", { key: '37fddbe7a80f38b3acca42220028208cab52ba15' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: 'b3bf6bff40b60a3fbace637ed69f6aa72853c04b', slot: "subtitle" }, h("div", { key: '46643b7cd897524ca42c41da24e657401f85ab28' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: '5129acfd67425ccfad68b3770843f11c9fa55b18', slot: "action" }, h("salla-button", { key: '0e93efc647444a26198e4631614b8590f75f122e', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: 'b88d95a25308cebc29b796bb2b0c25e4fa230406', name: "widget-btn-content" }, h("div", { key: '4cdbaaeb2bc67f056ea348755ffbdfbc831a1a5b', class: "s-gifting-widget-action-content" }, h("span", { key: '7dfec389970416df9be46c8ae5f0904dd64e17ad', innerHTML: GiftSharing }), " \u00A0", h("span", { key: '768f3621011bc3c984dce13ce83b3fb6cceb0171' }, this.sectionBtnText)))))), h("salla-modal", { key: 'b3c94ef80f955b42baecd963f5550f17a80c6fb4', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: 'c09e12eabff63ba1a781c8980b449f854affc164', slot: "loading" }, h("div", { key: 'dbafa39345c573eae0d045a7d23e346f7068ec0b', class: "s-gifting-skeleton" }, h("div", { key: 'ff247ea5c79b87ca1c76e6035813d7ecb2caeff2', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: '1e67bea2f1f957744c4f6f0af83ded347799916e', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '6486434a702624358211c22e7a6b48be16d96c42', class: "s-gifting-modal-title" }, h("div", { key: '688854d37e5ca46fcaa7957d3e72a52d7c706f8d', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: '9fcbb2086aa25b02effdc873bbfd45087e673de6', height: '15px', width: '150px' })))), h("div", { key: '1b9bf709a01b20e87d68f92f3cb93600214460cd', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: 'ba6b0c87442412398c360da1f6e8b5094812900f', height: '10px', width: '150px' }), h("salla-skeleton", { key: '6583783ace4e2668705c47c4bcac2a33b346a72b', height: '230px' }), h("salla-skeleton", { key: 'c76b038f100072d56a7cedd0438eeacc98bf7b42', height: '10px', width: '150px' }), h("salla-skeleton", { key: '1d331e7be7cd88ea5c108f331626dddc74699ed2', height: '30px' }), h("salla-skeleton", { key: '5cc3d1b8d67b7bf199219099af909591b8a8a869', height: '40px' })))), h("slot", { key: '9dc4c6f3a717e16e3527f9651b05a74ca1a6212c', name: "header" }), !!this.hasError ?
|
|
4476
4497
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
|
|
4477
4498
|
:
|
|
4478
4499
|
[
|
|
@@ -4486,9 +4507,9 @@ const SallaGifting = class {
|
|
|
4486
4507
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.name']) : ''), h("div", { class: this.errors && this.errors['receiver.mobile'] ? "s-form-group s-form-has-error anime-item opacity-0" : "s-form-group anime-item opacity-0" }, h("label", { class: "s-form-label" }, this.receiverMobileFieldLabel), h("salla-tel-input", { class: "s-gifting-tel-input", phone: this.receiverMobile, countryCode: this.selectedCountryCode || this.receiverCountryCode, key: `tel-input-${this.selectedCountryCode || this.receiverCountryCode || 'default'}`, onPhoneEntered: (e) => this.handlePhoneInputChange(e) }), this.errors && this.errors['receiver.mobile'] ?
|
|
4487
4508
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.mobile']) : ''), this.physicalProducts &&
|
|
4488
4509
|
h("div", null, h("div", { class: this.errors && this.errors['receiver.country'] ? "s-form-group s-form-has-error anime-item opacity-0" : "s-form-group anime-item opacity-0" }, h("label", { class: "s-form-label" }, this.receiverCountryFieldLabel), h("select", { name: "country", class: "s-form-control", onChange: (event) => this.handleCountryChange(event), required: true }, h("option", { value: "" }, this.selectCountry), this.gift?.countries?.map((country) => (h("option", { value: country.id }, country.name)))), this.errors && this.errors['receiver.country'] ?
|
|
4489
|
-
h("span", { class: "s-gifting-error" }, this.errors['receiver.country']) : ''), h("div", { class: this.errors && this.errors['receiver.city_id'] ? "s-form-group s-form-has-error anime-item opacity-0" : "s-form-group anime-item opacity-0" }, h("label", { class: "s-form-label" }, this.receiverCityFieldLabel), h("select", { name: "city", class: "s-form-control", onChange: (event) => this.handleReceiverCity(event), disabled: this.loadingCities }, h("option", { value: "", selected: true }, this.loadingCities ? salla.lang.get('common.elements.loading') : this.selectCity), this.gift?.cities?.map((city) => (h("option", { value: city.id }, city.name)))), this.errors && this.errors['receiver.city_id'] ?
|
|
4510
|
+
h("span", { class: "s-gifting-error" }, this.errors['receiver.country']) : ''), h("div", { class: this.errors && this.errors['receiver.city_id'] ? "s-form-group s-form-has-error anime-item opacity-0" : "s-form-group anime-item opacity-0" }, h("label", { class: "s-form-label" }, this.receiverCityFieldLabel), h("select", { name: "city", "aria-label": salla.lang.get('blocks.buy_as_gift.select_city'), class: "s-form-control", onChange: (event) => this.handleReceiverCity(event), disabled: this.loadingCities }, h("option", { value: "", selected: true }, this.loadingCities ? salla.lang.get('common.elements.loading') : this.selectCity), this.gift?.cities?.map((city) => (h("option", { value: city.id }, city.name)))), this.errors && this.errors['receiver.city_id'] ?
|
|
4490
4511
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), h("div", { class: "s-gifting-info anime-item opacity-0" }, h("span", { innerHTML: Alert }), h("span", null, this.selectCityInfo))), !this.physicalProducts && h("div", { class: "anime-item opacity-0" }, h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, h("label", { class: "s-form-label" }, this.selectSendDateAndTime), h("salla-datetime-picker", { value: this.deliveryDate, placeholder: this.selectSendDateAndTime, "enable-time": true, "date-format": "Y-m-d h:i K", onPicked: (event) => this.handleDateTimePicker(event) }), h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), h("div", { class: "s-gifting-step-two-footer anime-item opacity-0" }, h("a", { href: "#!", innerHTML: arrowLeft, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
|
|
4491
|
-
], h("slot", { key: '
|
|
4512
|
+
], h("slot", { key: '2ca6746edd5e72c996633b6d0b3ccdc5009198c4', name: "footer" })))
|
|
4492
4513
|
];
|
|
4493
4514
|
}
|
|
4494
4515
|
};
|
|
@@ -4596,7 +4617,7 @@ const SallaListTile = class {
|
|
|
4596
4617
|
};
|
|
4597
4618
|
}
|
|
4598
4619
|
render() {
|
|
4599
|
-
return (h(Host, { key: '
|
|
4620
|
+
return (h(Host, { key: '1e84d5e259adbf61502fbe1ee771ce948c87f218' }, h("a", { key: '5e28c64a0f1c62e6749a32859180e705f99af27e', class: this.generateClass(), href: this.href || "#", target: this.target, "aria-label": "List Tile Link" }, h("div", { key: 'ace3fdaae7332c4c23ab411f0b97cb0699c26ec2', class: "s-list-tile-item-icon" }, h("slot", { key: 'f8790cd45f2004691b156ef96d12a0f003d99899', name: 'icon' })), h("div", { key: 'a788d022e2afe3cd383c321f4100dafbae84f844', class: "s-list-tile-item-content" }, h("div", { key: 'a07afce13d054e11236ffb282901de9db3d23923', class: "s-list-tile-item-title" }, h("slot", { key: '43c23495cfb026ddba8739dcc1a619ec25fe98e0', name: 'title' })), h("div", { key: 'db5e2767a4220ee5d658b3b9384c28d0e105febb', class: "s-list-tile-item-subtitle" }, h("slot", { key: '245f602055419b1f32fa943805a72c6a207eea3f', name: "subtitle" }))), h("div", { key: '394a2d1402d3e8346cbc1ebd8d410405ed568c77', class: "s-list-tile-item-action" }, h("slot", { key: '6086eb6b1f9894f5a3a77ca484c74dd06f0d468f', name: 'action' })))));
|
|
4600
4621
|
}
|
|
4601
4622
|
};
|
|
4602
4623
|
SallaListTile.style = sallaListTileCss;
|
|
@@ -4624,7 +4645,7 @@ const SallaLoading = class {
|
|
|
4624
4645
|
this.bgColor = "#e5e7eb";
|
|
4625
4646
|
}
|
|
4626
4647
|
render() {
|
|
4627
|
-
return (h(Host, { key: '
|
|
4648
|
+
return (h(Host, { key: '2592e9504b03cb78f212d57e51c19075172fadd0', class: "s-loading-container" }, h("svg", { key: '4d495370551559a59423d5b672a3f1b4ed6bd7e3', "aria-hidden": "true", style: { width: `${this.size}px`, height: `${this.size}px`, fill: this.color, color: this.bgColor }, class: "s-loading", viewBox: "0 0 100 101", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'aedf2f6df87ac1dc82c32180cbf11dcf925a2267', d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z", fill: "currentColor" }), h("path", { key: 'db02a829fe6142c41f43f4c6d3d07695b1fa41f9', d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z", fill: "currentFill" }))));
|
|
4628
4649
|
}
|
|
4629
4650
|
};
|
|
4630
4651
|
SallaLoading.style = sallaLoadingCss;
|
|
@@ -4730,7 +4751,7 @@ const SallaLocalizationModal = class {
|
|
|
4730
4751
|
});
|
|
4731
4752
|
}
|
|
4732
4753
|
render() {
|
|
4733
|
-
return (h("salla-modal", { key: '
|
|
4754
|
+
return (h("salla-modal", { key: '8f37a27df315cdc0c28e3294dc91209c852be37f', isLoading: true, class: "s-hidden", ref: modal => this.modal = modal, width: "xs" }, h("div", { key: 'f12693b51bd57a866dd5eb40dedfb824262d69c9', slot: 'loading' }, h("div", { key: 'cf40e4ae38a9bffe76b63688b59638a534dfbfeb', class: "s-localization-modal-skeleton" }, h("salla-skeleton", { key: 'b58668b0c16863b7998832c4be120636b32e4b05', width: '25%', height: '15px' }), h("div", { key: '2277672008dd8895791954ad3f8ac0bf090095cd', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: 'e22fe136879a706972c05b2b9ea8ab85be57b82f', width: '25%', height: '15px' }), h("div", { key: '8800d040033db851d2903c05fe0ce947072aae2e', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: '3248a10d8023fa2c8b411294da1072d4209e9a87', height: '40px', width: '100%' }))), !!this.hasError ?
|
|
4734
4755
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "description" }, this.errorMessage)) :
|
|
4735
4756
|
h("div", { class: "s-localization-modal-inner" }, this.languages.length > 1 ?
|
|
4736
4757
|
h("div", { class: "s-localization-modal-section" }, h("label", { class: "s-localization-modal-title" }, salla.lang.get('common.titles.language')), h("div", { class: "s-localization-modal-section-inner" }, this.languages.length < 6 ?
|
|
@@ -4983,8 +5004,21 @@ const SallaLoginModal = class {
|
|
|
4983
5004
|
Salla.log('Error on assign after handle iframe', err);
|
|
4984
5005
|
}
|
|
4985
5006
|
withCartReset && Salla.cart.reset();
|
|
4986
|
-
|
|
4987
|
-
|
|
5007
|
+
try {
|
|
5008
|
+
!Salla.auth.api.isSessionless() && await Salla.auth.api.request('auth/jwt');
|
|
5009
|
+
if (Salla.auth.api.canRedirect()) {
|
|
5010
|
+
setTimeout(() => window.location.reload(), 100);
|
|
5011
|
+
}
|
|
5012
|
+
else {
|
|
5013
|
+
// Match handlAfterAuthenticatedResponse order: loggedIn (fetches profile + emits) -> afterUserLogin
|
|
5014
|
+
// Note: auth::verified is omitted here since cart.assign() already handles cart sync above
|
|
5015
|
+
await Salla.auth.event.loggedIn({ data: { token } }).then(() => Salla.auth.api.afterUserLogin());
|
|
5016
|
+
}
|
|
5017
|
+
}
|
|
5018
|
+
catch (err) {
|
|
5019
|
+
this.modal.open();
|
|
5020
|
+
Salla.log('Error on request auth/jwt after handle iframe', err);
|
|
5021
|
+
}
|
|
4988
5022
|
return;
|
|
4989
5023
|
}
|
|
4990
5024
|
withCartReset && Salla.cart.reset();
|
|
@@ -5281,7 +5315,7 @@ const SallaMaintenanceAlert = class {
|
|
|
5281
5315
|
this.host.style.display = 'none';
|
|
5282
5316
|
}
|
|
5283
5317
|
render() {
|
|
5284
|
-
return (h(Host, { key: '
|
|
5318
|
+
return (h(Host, { key: 'f307529d9fa1a3cfdf33cc48dea142e274eb4f72', class: "s-maintenance-alert-wrapper" }, h("button", { key: 'a8a8d3d4c03151f9fe468153d4368ab66de0ba5f', class: "s-maintenance-alert-close", innerHTML: Cancel, onClick: () => this.closeAlert() }), h("div", { key: 'f53e7ab72950f72b68eeb5ff6887203e8f6d0dbd', class: "s-maintenance-alert-content" }, h("div", { key: 'c3c69c738da0417114c87b03c49f0a8d36663558', class: "s-maintenance-alert-container" }, h("div", { key: 'af1ec8ff601873c04de610341f15775e05a5d185', class: "s-maintenance-alert-icon" }, h("img", { key: 'a1b6dd0d161749eff7f6e7d4e92fd161896b593b', src: salla.url.cdn('images/alert.png'), alt: "Alert" })), h("div", { key: 'f1f81302bbaf4d83d50770ff1f40416624bde583', class: "s-maintenance-alert-text" }, h("h2", { key: '79eab40b1cf6cf9d307d1e9bda24fe6dd8c03852' }, this.title), h("p", { key: '5bdbe219346851b9aff8c20fd41075853fe6b981' }, this.message))), h("div", { key: '8e2cd9ad611a551ee7960310f11a9f7f07668811' }, h("a", { key: '9658d9a3e82f9719c35caf362601a12a62475508', class: "s-maintenance-alert-btn", href: salla.config.get('maintenance_details.button_url') }, this.buttonTitle)))));
|
|
5285
5319
|
}
|
|
5286
5320
|
componentDidLoad() {
|
|
5287
5321
|
//auto-hide the alert if close button is clicked before one hour
|
|
@@ -5995,11 +6029,11 @@ const SallaMap = class {
|
|
|
5995
6029
|
}
|
|
5996
6030
|
// render
|
|
5997
6031
|
render() {
|
|
5998
|
-
return (h(Host, { key: '
|
|
6032
|
+
return (h(Host, { key: 'f3b0f4e444e266a4f9c60782bea7920a1b4c34b4', class: "s-map-wrapper" }, h("salla-modal", { key: '5066a0f19b59509656350bd0a02bc8ff8bb3d9d7', class: "s-map-modal-wrapper", noPadding: true, ref: modal => {
|
|
5999
6033
|
this.locationModal = modal;
|
|
6000
|
-
} }, this.getLocationModal()), h("slot", { key: '
|
|
6034
|
+
} }, this.getLocationModal()), h("slot", { key: '884266b42b7c5532486c4e8bd1aba8b0e6bf2f89', name: "button" }, h("salla-button", { key: '32b96c45aca7589681a3819d165b38e8f9ee036e', onClick: () => {
|
|
6001
6035
|
this.open();
|
|
6002
|
-
}, color: "primary", class: "s-map-location-button" }, h("span", { key: '
|
|
6036
|
+
}, color: "primary", class: "s-map-location-button" }, h("span", { key: 'd73a9837cb6a6df740300a4f52c35dd7f9499e73', class: "s-map-location-icon", innerHTML: this.formattedAddress ? Edit : Location }), this.formattedAddress ? (h("div", null, this.locateButtonEdit, " | ", this.formatAddress(this.formattedAddress))) : (this.locateButtonTitle))), h("input", { key: '77a53ca7c0b51268813238d80db56a9b9449c3f9', class: "s-hidden", name: this.name, required: this.required, value: this.getLatLng(), ref: color => this.mapInput = color })));
|
|
6003
6037
|
}
|
|
6004
6038
|
get host() { return getElement(this); }
|
|
6005
6039
|
};
|
|
@@ -6357,7 +6391,7 @@ const SallaMultipleBundleProduct = class {
|
|
|
6357
6391
|
this.parseProducts(this.bundleSections);
|
|
6358
6392
|
}
|
|
6359
6393
|
render() {
|
|
6360
|
-
return (h(Host, { key: '
|
|
6394
|
+
return (h(Host, { key: '91666a9a9d0302d7f93f001b39d06160f2dc6960', class: "s-multiple-bundle-product-wrapper" }, this.isCartPage() ? this.renderCartPage() : this.renderDetailsPage()));
|
|
6361
6395
|
}
|
|
6362
6396
|
static get watchers() { return {
|
|
6363
6397
|
"bundleSections": ["parseProducts"]
|
|
@@ -6395,7 +6429,7 @@ const SallaMultipleBundleProductCart = class {
|
|
|
6395
6429
|
return (h("div", { slot: "html", class: "s-multiple-bundle-product-cart-header-wrapper" }, h("div", { class: `s-multiple-bundle-product-cart-header ${hasOptions ? '' : 's-multiple-bundle-product-cart-header-no-options'}` }, h("div", { class: "s-multiple-bundle-product-cart-header-content" }, h("a", { href: product?.url, class: "s-multiple-bundle-product-cart-header-image-wrapper" }, h("img", { src: product?.image?.url, alt: product?.image?.alt || product?.name, class: "s-multiple-bundle-product-cart-header-image" })), h("div", { class: "s-multiple-bundle-product-cart-header-content-details" }, h("h2", { class: "s-multiple-bundle-product-cart-header-content-details-title" }, h("a", { href: product?.url, class: "s-multiple-bundle-product-cart-header-content-details-title-link" }, product?.name)), h("div", { class: "s-multiple-bundle-product-cart-header-content-details-price" }, h("span", { class: "s-multiple-bundle-product-cart-header-content-details-price-regular" }, h("span", { innerHTML: product?.price ? salla.money(product?.price) : '' })), product?.sale_price > 0 && (h("span", { class: "s-multiple-bundle-product-cart-header-content-details-price-sale" }, h("span", { innerHTML: salla.money(product?.sale_price) })))), product?.quantity_in_group > 0 && product?.quantity !== 0 && (h("p", { class: "s-multiple-bundle-product-cart-header-content-details-quantity" }, h("span", null, salla.lang.get('pages.products.number_of_pieces')), h("span", null, product?.quantity_in_group))))), !hasOptions && (h("div", { class: "s-multiple-bundle-product-cart-header-remove-button" }, this.renderRemoveButton(sectionId, product, false))))));
|
|
6396
6430
|
}
|
|
6397
6431
|
render() {
|
|
6398
|
-
return (h(Host, { key: '
|
|
6432
|
+
return (h(Host, { key: '34b9ae8c08eccee16d15f5ebff73b1d27f636e79', class: "s-multiple-bundle-product-wrapper" }, h("div", { key: '2f8d0bf68e67aa3bc21206d7282113fbfa67560b', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, sectionIndex) => {
|
|
6399
6433
|
return section.products.map(product => {
|
|
6400
6434
|
const bundleContext = {
|
|
6401
6435
|
sectionId: section.id,
|
|
@@ -6567,10 +6601,10 @@ const SallaMultipleBundleProductDetails = class {
|
|
|
6567
6601
|
}
|
|
6568
6602
|
}
|
|
6569
6603
|
render() {
|
|
6570
|
-
return (h(Host, { key: '
|
|
6604
|
+
return (h(Host, { key: '2a7a27e8bfc7325575fec782139828333590eb9f', class: "s-multiple-bundle-product-wrapper" }, h("div", { key: 'affcb43ee67e329a9a87d6234bb91b5494a69a35', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, index) => {
|
|
6571
6605
|
const selectedCount = this.selectedProducts[section.id]?.size || 0;
|
|
6572
6606
|
return (h("salla-accordion", { key: section.id, collapsed: index === 0 ? false : true }, h("salla-accordion-head", null, this.renderAccordionHeader(section, selectedCount)), h("salla-accordion-body", null, h("salla-multiple-bundle-product-slider", { section: section, sectionIndex: index, selectedProducts: this.selectedProducts, onProductSelected: this.handleBundleSliderProductSelected, onProductOptionsSelected: this.handleBundleSliderProductOptionsSelected }))));
|
|
6573
|
-
})), h("salla-multiple-bundle-product-options-modal", { key: '
|
|
6607
|
+
})), h("salla-multiple-bundle-product-options-modal", { key: '6b9065e8f7872da72166979fc9ce61efaad21c0a' })));
|
|
6574
6608
|
}
|
|
6575
6609
|
get host() { return getElement(this); }
|
|
6576
6610
|
};
|
|
@@ -7034,7 +7068,7 @@ const SallaMultipleBundleProductOptionsModal = class {
|
|
|
7034
7068
|
const cacheKey = this.generateCacheKey(this.sectionId, this.productIndex, productId);
|
|
7035
7069
|
const resetToken = this.optionsResetTokens[cacheKey] || 0;
|
|
7036
7070
|
const isDisabled = this.isLoading || optionsWithSelectedState.some(opt => opt.details.some(d => d.is_selected && d.is_out === true));
|
|
7037
|
-
return (h(Host, { key: '
|
|
7071
|
+
return (h(Host, { key: '28786c060499c9bfbacf025b75f21d0e8a2d6ab1' }, h("salla-modal", { key: '6322c0542ca2769f50ed6fc616c6d5c72d456c9c', isLoading: this.isLoading, ref: el => (this.modal = el), width: "md", centered: false, id: `s-multiple-bundle-product-options-modal-options-${productId}`, class: "s-multiple-bundle-product-options-modal-wrapper" }, h("div", { key: '812707c4108b5bdefa97e1ff7537998083e2403b', slot: "loading" }, h("salla-skeleton", { key: 'e82b875495873b66414ee4a75d845823373b4914', height: "100%", width: "100%" })), this.product?.images && this.product?.images.length > 0 && (h("salla-slider", { key: 'd3849a91153ede94ea06553cb40af29e06c916ae', id: `details-slider-${this.product?.id}`, type: "thumbs", loop: false, "auto-height": true, "listen-to-thumbnails-option": true, showThumbsControls: false, controlsOuter: false, showControls: false, class: "s-multiple-bundle-product-options-modal-slider", verticalThumbs: true, thumbsConfig: {
|
|
7038
7072
|
centeredSlides: true,
|
|
7039
7073
|
centeredSlidesBounds: true,
|
|
7040
7074
|
slidesPerView: Math.min(5, Math.max(1, this.product?.images.length)),
|
|
@@ -7043,13 +7077,13 @@ const SallaMultipleBundleProductOptionsModal = class {
|
|
|
7043
7077
|
watchSlidesProgress: true,
|
|
7044
7078
|
direction: 'vertical',
|
|
7045
7079
|
spaceBetween: 10,
|
|
7046
|
-
} }, h("div", { key: '
|
|
7080
|
+
} }, h("div", { key: 'd585f7a29cb9265c39c471876d3a0cb7d2460359', slot: "items" }, this.product?.images &&
|
|
7047
7081
|
this.product?.images.map((image, index) => (h("div", { key: index, class: "swiper-slide" }, h("img", { src: image.url, alt: image.alt || `${this.product?.name} - Image ${index + 1}`, loading: "lazy", onError: e => {
|
|
7048
7082
|
e.target.style.display = 'none';
|
|
7049
|
-
} }))))), this.product?.images && this.product?.images.length > 1 && (h("div", { key: '
|
|
7083
|
+
} }))))), this.product?.images && this.product?.images.length > 1 && (h("div", { key: '1a6edb417a6715617303634b7d756eef0075a01a', slot: "thumbs" }, this.product?.images &&
|
|
7050
7084
|
this.product?.images.map((image, index) => (h("div", { key: index, "data-caption": `${this.product?.name} - Image ${index + 1}` }, h("img", { src: image.url, loading: "eager", class: "s-multiple-bundle-product-options-modal-slider-thumb", title: `${this.product?.name} - ${index + 1}`, alt: image.alt || `${this.product?.name} - ${index + 1}`, onError: e => {
|
|
7051
7085
|
e.target.style.display = 'none';
|
|
7052
|
-
} })))))))), h("salla-product-options", { options: JSON.stringify(optionsWithSelectedState), key: `${cacheKey}-reset-${resetToken}`, "product-id": productId, "unique-key": `${cacheKey}-reset-${resetToken}` }), h("div", { key: '
|
|
7086
|
+
} })))))))), h("salla-product-options", { options: JSON.stringify(optionsWithSelectedState), key: `${cacheKey}-reset-${resetToken}`, "product-id": productId, "unique-key": `${cacheKey}-reset-${resetToken}` }), h("div", { key: '22528e7438a30feffe5987ed86974a4eecea76a1', slot: "footer" }, h("div", { key: '7a891b1cd51d2f15e08523c2a4096ea4c50eb51b', class: "s-multiple-bundle-product-options-modal-footer" }, h("salla-button", { key: '4ed19c8cfdd3f37166a61fdbd452a8f205763469', onClick: e => this.onSave(e), loading: this.isLoading, disabled: isDisabled }, this.isLoading
|
|
7053
7087
|
? salla.lang.get('common.elements.saving')
|
|
7054
7088
|
: salla.lang.get('common.elements.save')))))));
|
|
7055
7089
|
}
|
|
@@ -7147,7 +7181,7 @@ const SallaMultipleBundleProductSlider = class {
|
|
|
7147
7181
|
return `bundle[${sectionId}][${productIndex}][id]`;
|
|
7148
7182
|
}
|
|
7149
7183
|
render() {
|
|
7150
|
-
return (h(Host, { key: '
|
|
7184
|
+
return (h(Host, { key: 'a1e7d56d8a50d1c31ba102d3246b0251516e0a73' }, h("salla-slider", { key: '8308576a46ec71f557a3d686d59cd0109d5bef0f', type: "carousel", controlsOuter: false, showControls: false, id: `accordion-multiple-bundle-product-${this.section.id}`, pagination: true, class: "s-multiple-bundle-product-wrapper-slider", sliderConfig: { spaceBetween: 0 } }, h("div", { key: '3ea742119ab77f129b8c60bbcc0f8c0f7bd3e97d', slot: "items" }, this?.section?.products?.map((product, productIndex) => {
|
|
7151
7185
|
const isChecked = this.selectedProducts[this.section.id]?.has(product.id) || false;
|
|
7152
7186
|
const hasSavedOptions = this.savedOptionsByInstance[this.getProductInstanceKey(this.section.id, productIndex)];
|
|
7153
7187
|
const optionsButtonLabel = hasSavedOptions
|
|
@@ -7158,7 +7192,7 @@ const SallaMultipleBundleProductSlider = class {
|
|
|
7158
7192
|
: ArrowRightIcon;
|
|
7159
7193
|
return (h("div", { class: `s-multiple-bundle-product-slide-one-third ${product.quantity == 0
|
|
7160
7194
|
? 's-multiple-bundle-product-slide-one-third-disabled'
|
|
7161
|
-
: ''}`, key: product.id }, h("div", { class: "s-multiple-bundle-product-card" }, h("div", { class: "s-multiple-bundle-product-image-wrapper", onClick: () => this.handleProductClick(product, productIndex) }, h("input", { id: this.generateEventName(this.section.id, productIndex), type: "checkbox", class: "s-multiple-bundle-product-checkbox", checked: isChecked, name: this.generateEventName(this.section.id, productIndex), value: product.id }), h("img", { src: product.image.url || salla.url.cdn('images/s-empty.png'), loading: "lazy", alt: product.image.alt || product.name, class: "s-multiple-bundle-product-image" })), h("div", { class: "s-multiple-bundle-product-content-wrapper" }, h("div", { class: "s-multiple-bundle-product-content" }, h("div", { class: "s-multiple-bundle-product-details" }, h("div", { class: "s-multiple-bundle-product-title-wrapper" }, h("h2", { class: "s-multiple-bundle-product-title" }, product.name)), h("div", { class: "s-multiple-bundle-product-price-wrapper" }, h("span", { class: "s-multiple-bundle-product-price" }, h("span", { innerHTML: salla.money(product.price) })), product.sale_price > 0 && (h("span", { class: "s-multiple-bundle-product-price-discount" }, h("span", { innerHTML: salla.money(product.sale_price) }))))), product.quantity_in_group > 0 && product.quantity !== 0 && (h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.pieces'), h("span", null, product.quantity_in_group))), product.quantity === 0 && (h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.quantity_in_group_finished')))), product.options?.length > 0 && (h("button", { class: "s-multiple-bundle-product-button", onClick: () => this.handleOptionsClick(product), type: "button" }, optionsButtonLabel, h("span", { class: "s-multiple-bundle-product-button-icon", innerHTML: optionsArrowIcon })))))));
|
|
7195
|
+
: ''}`, key: product.id }, h("div", { class: "s-multiple-bundle-product-card" }, h("div", { class: "s-multiple-bundle-product-image-wrapper", onClick: () => this.handleProductClick(product, productIndex) }, h("input", { id: this.generateEventName(this.section.id, productIndex), type: "checkbox", class: "s-multiple-bundle-product-checkbox", checked: isChecked, name: this.generateEventName(this.section.id, productIndex), value: product.id }), h("img", { src: product.image.url || salla.url.cdn('images/s-empty.png'), loading: "lazy", alt: product.image.alt || product.name, class: "s-multiple-bundle-product-image" })), h("div", { class: "s-multiple-bundle-product-content-wrapper" }, h("div", { class: "s-multiple-bundle-product-content" }, h("div", { class: "s-multiple-bundle-product-details" }, h("div", { class: "s-multiple-bundle-product-title-wrapper" }, h("h2", { class: "s-multiple-bundle-product-title" }, h("a", { href: product?.url || '#', target: "_blank", rel: "noopener noreferrer" }, product.name))), h("div", { class: "s-multiple-bundle-product-price-wrapper" }, h("span", { class: "s-multiple-bundle-product-price" }, h("span", { innerHTML: salla.money(product.price) })), product.sale_price > 0 && (h("span", { class: "s-multiple-bundle-product-price-discount" }, h("span", { innerHTML: salla.money(product.sale_price) }))))), product.quantity_in_group > 0 && product.quantity !== 0 && (h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.pieces'), h("span", null, product.quantity_in_group))), product.quantity === 0 && (h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.quantity_in_group_finished')))), product.options?.length > 0 && (h("button", { class: "s-multiple-bundle-product-button", onClick: () => this.handleOptionsClick(product), type: "button" }, optionsButtonLabel, h("span", { class: "s-multiple-bundle-product-button-icon", innerHTML: optionsArrowIcon })))))));
|
|
7162
7196
|
})))));
|
|
7163
7197
|
}
|
|
7164
7198
|
get host() { return getElement(this); }
|
|
@@ -7351,7 +7385,7 @@ const SallaOfferModal = class {
|
|
|
7351
7385
|
// '</div>';
|
|
7352
7386
|
// }
|
|
7353
7387
|
render() {
|
|
7354
|
-
return h("salla-modal", { key: '
|
|
7388
|
+
return 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 : ''}` }, h("div", { key: 'f44a915307bdc059c937d60a79a1c22a59957928', slot: 'loading' }, h("div", { key: '7b4b6f9572a2893aa5353a5ba2d4d62a2a5d8742', class: "s-offer-modal-skeleton" }, h("div", { key: 'a6b2f782cd643dc322e3f3c29a596a44fc9b1ace', class: "s-offer-modal-skeleton-header" }, h("salla-skeleton", { key: 'a745dc619995820ac3a3bb9169b8a25cbceed9ea', type: 'circle', height: '80px', width: '80px' }), h("salla-skeleton", { key: '7d54b0aaa14742f4dfef0e2b26d48eb24f1661c5', height: '15px', width: '50%' }), h("salla-skeleton", { key: '042349f3c34308d070f36c30ac942935da5afebe', height: '10px', width: '30%' })), h("div", { key: '691f32282147054b2dd76d1e324ddd172214cbbd', class: "s-offer-modal-skeleton-items" }, [...Array(3)].map(() => h("div", { class: "s-offer-modal-skeleton-item" }, h("salla-skeleton", { height: '9rem' }), h("div", { class: "s-offer-modal-skeleton-item-title" }, h("salla-skeleton", { height: '15px', width: '100%' })), h("div", { class: "s-offer-modal-skeleton-item-subtitle" }, h("salla-skeleton", { height: '9px', width: '50%' }), h("div", { innerHTML: Cart2 }))))), h("div", { key: '97cbe8b3ca1c8dde39a2c33995116a7a5d088594', class: "s-offer-modal-skeleton-footer" }, h("salla-skeleton", { key: 'c2f5d9d2e212e0383f6b4d159f1c9ce52c9064b7', height: '15px', width: '50%' }), h("salla-skeleton", { key: 'c64ed16e51a4c9f302f915c025473a42d69d4490', height: '15px', width: '30%' })))), !this.hasError && this.offer !== null
|
|
7355
7389
|
? [h("span", { slot: 'icon', class: "s-offer-modal-header-icon", innerHTML: SpecialDiscountIcon }), this.getOfferContent(), h("div", { class: "s-offer-modal-footer", slot: "footer" }, this.offer.formatted_date ?
|
|
7356
7390
|
h("p", { class: "s-offer-modal-expiry" }, salla.lang.get('pages.products.offer_expires_in'), " ", this.offer.formatted_date)
|
|
7357
7391
|
: '', h("label", { class: "s-offer-modal-remember-label" }, h("input", { type: "checkbox", onChange: e => this.rememberMe(e), class: "s-offer-modal-remember-input" }), "\u00A0 ", salla.lang.get('common.elements.remember_my_choice'))),
|
|
@@ -7400,7 +7434,7 @@ const SallaPlaceholder = class {
|
|
|
7400
7434
|
};
|
|
7401
7435
|
}
|
|
7402
7436
|
render() {
|
|
7403
|
-
return (h(Host, { key: '
|
|
7437
|
+
return (h(Host, { key: '5f8dc6c1c73a5ed21d571b692eadbf56cac2a133', class: this.alignmentClass() }, h("div", { key: '56df7bf4ce025b484943ec504c20bdedbb15604e', class: `s-placeholder-icon s-placeholder-icon-${this.iconSize}`, innerHTML: this.icon }), h("div", { key: 'c72a76711d4e915bc24557c7c490c2cf5899db12', class: "s-placeholder-title" }, h("slot", { key: 'a77295c121d95dad05657577b56bd4c220bdca03', name: 'title' }, h("span", { key: 'de463d3b9d37bd3231dc818dca9d3d37211881ad' }, salla.lang.get('common.elements.no_options')))), h("div", { key: '5af30b0673bef28cc61165969138f30638f6bc1a', class: "s-placeholder-description" }, h("slot", { key: '18057d95114aa4a074c29dbc60de1b4a707fa8f5', name: 'description' }, h("span", { key: '1695227c9a861b78fad5a850b22f8d51e812c0ab' }, salla.lang.get('common.errors.empty_results'))))));
|
|
7404
7438
|
}
|
|
7405
7439
|
};
|
|
7406
7440
|
SallaPlaceholder.style = sallaPlaceholderCss;
|
|
@@ -7542,7 +7576,7 @@ const SallaProductAvailability = class {
|
|
|
7542
7576
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
7543
7577
|
}
|
|
7544
7578
|
render() {
|
|
7545
|
-
return (h(Host, { key: '
|
|
7579
|
+
return (h(Host, { key: 'e5b3121a6e352338ff666ba419100150e838e0d2', class: "s-product-availability-wrap" }, this.isSubscribed || this.isVisitorSubscribed
|
|
7546
7580
|
? h("div", { class: "s-product-availability-subscribed" }, h("span", { innerHTML: BellRing, class: "s-product-availability-subs-icon" }), salla.lang.get('pages.products.notify_availability_success'))
|
|
7547
7581
|
:
|
|
7548
7582
|
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()));
|
|
@@ -7658,14 +7692,14 @@ const SallaProductCard = class {
|
|
|
7658
7692
|
's-product-card-out-of-stock': this.productData?.is_out_of_stock,
|
|
7659
7693
|
};
|
|
7660
7694
|
const hrefProp = this.productData?.url ? { href: this.productData.url, title: `Learn more about ${this.productData?.name}` } : {};
|
|
7661
|
-
return (h(Host, { key: '
|
|
7695
|
+
return (h(Host, { key: '95347f86f3dc0354a057290ce41f74aef0a66282', id: `product-${this.productData?.id}`, class: classes }, h("div", { key: '86927cbc56a2ea92a8e18c44c8999ee1d6f82b4d', class: !this.fullImage ? 's-product-card-image' : 's-product-card-image-full' }, h("a", { key: '6294925bce0a46287389a9423b16199cf92919fd', ...hrefProp }, h("img", { key: '74e0d9fae7c61e0e3e0e20e38166d64618c8ca3d', class: `s-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)
|
|
7662
7696
|
? 'contain'
|
|
7663
7697
|
: this.fitImageHeight
|
|
7664
7698
|
? this.fitImageHeight
|
|
7665
|
-
: '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 && h("a", { key: '
|
|
7666
|
-
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) }, h("span", { innerHTML: Heart })) : ''), h("div", { key: '
|
|
7699
|
+
: '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 && h("a", { key: 'fd2db94c99d91815b13141460a8c4538aae4a53b', ...hrefProp, class: "s-product-card-overlay" }), !this.horizontal && !this.fullImage ?
|
|
7700
|
+
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) }, h("span", { innerHTML: Heart })) : ''), h("div", { key: '9f4f39db770a394d9719664cd77111aef1c575f4', class: "s-product-card-content" }, this.isSpecial && this.productData?.quantity ?
|
|
7667
7701
|
h("div", { class: "s-product-card-content-pie", ref: pie => this.pie = pie }, h("span", null, h("b", null, salla.helpers.number(this.productData?.quantity)), this.remained), h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -1 36 34", class: "s-product-card-content-pie-svg" }, h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-base" }), h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-bar" })))
|
|
7668
|
-
: '', h("div", { key: '
|
|
7702
|
+
: '', h("div", { key: 'eab2c5f49112dd490733e0b6f1e8c30ad9670690', class: { 's-product-card-content-main': true, 's-product-card-content-extra-padding': this.isSpecial } }, h("h3", { key: '5fadc35b2bf704903bf38128c390f71ec0a8b910', class: "s-product-card-content-title" }, h("a", { key: '7e0767efef938e20ed4c2592a0abec812a9caf86', ...hrefProp }, this.productData?.name)), this.productData?.subtitle && !this.minimal ?
|
|
7669
7703
|
h("p", { class: "s-product-card-content-subtitle" }, this.productData?.subtitle)
|
|
7670
7704
|
: ''), this.productData?.donation && !this.minimal && !this.fullImage ?
|
|
7671
7705
|
[h("salla-progress-bar", { donation: this.productData?.donation }), h("div", { class: "s-product-card-donation-input" }, this.productData?.donation?.can_donate ?
|
|
@@ -7674,7 +7708,7 @@ const SallaProductCard = class {
|
|
|
7674
7708
|
this.addBtn.donatingAmount = e.target.value;
|
|
7675
7709
|
}, id: "donation-amount", name: "donating_amount", class: "s-form-control", placeholder: this.donationAmount })]
|
|
7676
7710
|
: '')]
|
|
7677
|
-
: '', h("div", { key: '
|
|
7711
|
+
: '', 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 ?
|
|
7678
7712
|
h("div", { class: "s-product-card-rating" }, h("span", { innerHTML: Rate }), h("span", null, this.productData.rating.stars))
|
|
7679
7713
|
: ''), this.isSpecial && this.productData.discount_ends
|
|
7680
7714
|
? h("salla-count-down", { date: this.formatDate(this.productData.discount_ends), "end-of-day": true, boxed: true, labeled: true })
|
|
@@ -7754,6 +7788,7 @@ const SallaProductOptions = class {
|
|
|
7754
7788
|
this.selectAmount = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ');
|
|
7755
7789
|
this.isCustomDonation = false;
|
|
7756
7790
|
this.selectedOptions = [];
|
|
7791
|
+
this.canDisabled = false;
|
|
7757
7792
|
this.disableCardValue = true;
|
|
7758
7793
|
this.availableDigitalCardValues = [];
|
|
7759
7794
|
this.userInitiatedValidation = false;
|
|
@@ -7809,7 +7844,6 @@ const SallaProductOptions = class {
|
|
|
7809
7844
|
const completed = option.donation.target_amount <= option.donation.collected_amount;
|
|
7810
7845
|
return h("div", { class: { "s-product-options-donation-message": true, "s-product-options-donation-completed": completed, "s-product-options-donation-expired": !completed } }, h("p", null, option.donation.target_message), h("span", { innerHTML: completed ? salla.money(option.donation.target_amount) : '' }));
|
|
7811
7846
|
};
|
|
7812
|
-
this.canDisabled = !salla.config.get('store.settings.product.notify_options_availability') || salla.url.is_page('cart');
|
|
7813
7847
|
salla.lang.onLoaded(() => {
|
|
7814
7848
|
this.outOfStockText = salla.lang.get("pages.products.out_of_stock");
|
|
7815
7849
|
this.donationAmount = salla.lang.get('pages.products.donation_amount');
|
|
@@ -7909,7 +7943,7 @@ const SallaProductOptions = class {
|
|
|
7909
7943
|
if (!closestProductOption.classList.contains('s-product-options-option-error')) {
|
|
7910
7944
|
closestProductOption.classList.add('s-product-options-option-error');
|
|
7911
7945
|
}
|
|
7912
|
-
if (this.userInitiatedValidation && !salla.url.is_page('cart')) {
|
|
7946
|
+
if ((this.userInitiatedValidation || salla.helpers.isIOSDevice()) && !salla.url.is_page('cart')) {
|
|
7913
7947
|
const firstInvalidElement = this.host.querySelector('.s-product-options-option-error');
|
|
7914
7948
|
if (firstInvalidElement === closestProductOption) {
|
|
7915
7949
|
this.scrollToElement(closestProductOption);
|
|
@@ -7917,9 +7951,9 @@ const SallaProductOptions = class {
|
|
|
7917
7951
|
}
|
|
7918
7952
|
}
|
|
7919
7953
|
scrollToElement(element) {
|
|
7920
|
-
if (element)
|
|
7921
|
-
|
|
7922
|
-
}
|
|
7954
|
+
if (!element)
|
|
7955
|
+
return;
|
|
7956
|
+
element.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
7923
7957
|
}
|
|
7924
7958
|
changedHandler(event, option, fireChangeEvent = true) {
|
|
7925
7959
|
const data = {
|
|
@@ -8114,10 +8148,17 @@ const SallaProductOptions = class {
|
|
|
8114
8148
|
}
|
|
8115
8149
|
this.outOfStockText = salla.lang.get('pages.products.out_of_stock');
|
|
8116
8150
|
await salla.onReady();
|
|
8117
|
-
|
|
8151
|
+
this.canDisabled = !salla.config.get('store.settings.product.notify_options_availability') || salla.url.is_page('cart');
|
|
8152
|
+
this.pasteHandler = this.handlePaste.bind(this);
|
|
8153
|
+
document.addEventListener("paste", this.pasteHandler);
|
|
8118
8154
|
const needsCartId = (!salla.storage.get('cart.id') && this.optionsData.some(option => ['file', 'image'].includes(option.type)));
|
|
8119
8155
|
return needsCartId ? salla.api.cart.getCurrentCartId(false, "salla-product-options") : null;
|
|
8120
8156
|
}
|
|
8157
|
+
disconnectedCallback() {
|
|
8158
|
+
if (this.pasteHandler) {
|
|
8159
|
+
document.removeEventListener("paste", this.pasteHandler);
|
|
8160
|
+
}
|
|
8161
|
+
}
|
|
8121
8162
|
/**
|
|
8122
8163
|
* This is a workaround for a bug in iOS 26 Safari, when pasting English text to RTL inputs, it adds extra text!!
|
|
8123
8164
|
* To avoid any break changes, we will make it only work on these conditions:
|
|
@@ -8131,7 +8172,8 @@ const SallaProductOptions = class {
|
|
|
8131
8172
|
const target = event.target;
|
|
8132
8173
|
if (!Salla.helpers.isAppleDevice()
|
|
8133
8174
|
|| !(target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement)
|
|
8134
|
-
|| !target.classList.contains('s-form-control')
|
|
8175
|
+
|| !target.classList.contains('s-form-control')
|
|
8176
|
+
|| !this.host.contains(target)) {
|
|
8135
8177
|
return;
|
|
8136
8178
|
}
|
|
8137
8179
|
// Prevent default paste (to avoid Safari inserting extra content)
|
|
@@ -8161,7 +8203,7 @@ const SallaProductOptions = class {
|
|
|
8161
8203
|
}
|
|
8162
8204
|
return (h(Host, { class: "s-product-options-wrapper" }, h("salla-conditional-fields", null, this.optionsData.map((option) => 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' ?
|
|
8163
8205
|
this.splitterOption()
|
|
8164
|
-
: 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}` }, h("label", { htmlFor: this.
|
|
8206
|
+
: 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}` }, h("label", { htmlFor: this.generateInputId(option.id), class: `s-product-options-option-label ${this.hideLabel(option) ? 's-product-options-option-label-hidden' : ''}` }, h("b", null, option.name, option.required && h("span", null, " * "), " "), h("small", null, option.placeholder)), 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))))))));
|
|
8165
8207
|
}
|
|
8166
8208
|
generateUniqueKey(defaultValue) {
|
|
8167
8209
|
const contextData = this.bundleContext;
|
|
@@ -8181,6 +8223,14 @@ const SallaProductOptions = class {
|
|
|
8181
8223
|
}
|
|
8182
8224
|
return baseKey;
|
|
8183
8225
|
}
|
|
8226
|
+
/**
|
|
8227
|
+
* Generate a valid HTML id for option inputs.
|
|
8228
|
+
* @param optionId - The option ID
|
|
8229
|
+
* @returns The formatted id string
|
|
8230
|
+
*/
|
|
8231
|
+
generateInputId(optionId) {
|
|
8232
|
+
return this.generateUniqueKey(`option-${optionId}`);
|
|
8233
|
+
}
|
|
8184
8234
|
/**
|
|
8185
8235
|
* Generate the correct input name based on bundle context
|
|
8186
8236
|
* @param optionId - The option ID
|
|
@@ -8188,6 +8238,7 @@ const SallaProductOptions = class {
|
|
|
8188
8238
|
*/
|
|
8189
8239
|
generateInputName(optionId) {
|
|
8190
8240
|
const contextData = this.bundleContext;
|
|
8241
|
+
const baseOptionId = optionId.toString();
|
|
8191
8242
|
if (contextData) {
|
|
8192
8243
|
try {
|
|
8193
8244
|
// Handle both string and object types
|
|
@@ -8195,13 +8246,13 @@ const SallaProductOptions = class {
|
|
|
8195
8246
|
? JSON.parse(contextData)
|
|
8196
8247
|
: contextData;
|
|
8197
8248
|
const { sectionId, productId } = context;
|
|
8198
|
-
return `bundle[${sectionId}][${productId}][options][${
|
|
8249
|
+
return `bundle[${sectionId}][${productId}][options][${baseOptionId}]`;
|
|
8199
8250
|
}
|
|
8200
8251
|
catch (e) {
|
|
8201
|
-
return `options[${
|
|
8252
|
+
return `options[${baseOptionId}]`;
|
|
8202
8253
|
}
|
|
8203
8254
|
}
|
|
8204
|
-
return `options[${
|
|
8255
|
+
return `options[${baseOptionId}]`;
|
|
8205
8256
|
}
|
|
8206
8257
|
fillSelectedOptions() {
|
|
8207
8258
|
this.selectedOptions = this.optionsData.reduce((acc, opt) => {
|
|
@@ -8279,7 +8330,7 @@ const SallaProductOptions = class {
|
|
|
8279
8330
|
// TODO: (ONLY FOR TESTING!) find a better way to make it testable, e.g. wrap it with a unique class like textOption
|
|
8280
8331
|
//@ts-ignore
|
|
8281
8332
|
numberOption(option) {
|
|
8282
|
-
return 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) });
|
|
8333
|
+
return 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) });
|
|
8283
8334
|
}
|
|
8284
8335
|
//@ts-ignore
|
|
8285
8336
|
splitterOption() {
|
|
@@ -8287,12 +8338,12 @@ const SallaProductOptions = class {
|
|
|
8287
8338
|
}
|
|
8288
8339
|
//@ts-ignore
|
|
8289
8340
|
textOption(option) {
|
|
8290
|
-
return h("div", { class: "s-product-options-text" }, 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) }));
|
|
8341
|
+
return h("div", { class: "s-product-options-text" }, 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) }));
|
|
8291
8342
|
}
|
|
8292
8343
|
//@ts-ignore
|
|
8293
8344
|
textareaOption(option) {
|
|
8294
8345
|
//todo::remove mt-1 class, and if it's okay to remove the tag itself will be great
|
|
8295
|
-
return h("div", { class: "s-product-options-textarea" }, h("div", { class: "mt-1" }, h("textarea", { rows: 4, value: option.value, maxLength: option?.length, class: "s-form-control", required: !option.visibility_condition && option.required, id: this.
|
|
8346
|
+
return h("div", { class: "s-product-options-textarea" }, h("div", { class: "mt-1" }, 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) })));
|
|
8296
8347
|
}
|
|
8297
8348
|
//@ts-ignore
|
|
8298
8349
|
mapOption(option) {
|
|
@@ -8388,7 +8439,7 @@ const SallaProductOptions = class {
|
|
|
8388
8439
|
* @returns HTMLElement - A select dropdown element with all option details.
|
|
8389
8440
|
*/
|
|
8390
8441
|
renderSelect(option) {
|
|
8391
|
-
return (h("div", null, 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) }, h("option", { value: "" }, option.placeholder), option?.details.map((detail) => (h("option", { key: detail.id, value: detail.id, disabled: this.canDisabled && this.isOptionDetailOut(detail), selected: detail.is_selected }, this.getOptionDetailName(detail)))))));
|
|
8442
|
+
return (h("div", null, 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) }, h("option", { value: "" }, option.placeholder), option?.details.map((detail) => (h("option", { key: detail.id, value: detail.id, disabled: this.canDisabled && this.isOptionDetailOut(detail), selected: detail.is_selected }, this.getOptionDetailName(detail)))))));
|
|
8392
8443
|
}
|
|
8393
8444
|
/**
|
|
8394
8445
|
* Renders a grid-based layout for option inputs (radio or checkbox).
|
|
@@ -8464,7 +8515,11 @@ const SallaProductOptions = class {
|
|
|
8464
8515
|
}
|
|
8465
8516
|
countryOption(option) {
|
|
8466
8517
|
return h("div", { class: "s-product-options-digital-card-wrapper" }, option.details.map((detail) => {
|
|
8467
|
-
return 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 } }, 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 } : {}) }), h("img", { loading:
|
|
8518
|
+
return 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 } }, 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 } : {}) }), 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 => {
|
|
8519
|
+
e.currentTarget.onerror = null;
|
|
8520
|
+
e.currentTarget.src =
|
|
8521
|
+
salla.url.cdn('images/globe.svg');
|
|
8522
|
+
} }), h("span", null, detail.name));
|
|
8468
8523
|
}));
|
|
8469
8524
|
}
|
|
8470
8525
|
get host() { return getElement(this); }
|
|
@@ -8519,11 +8574,11 @@ const SallaProductSizeGuide = class {
|
|
|
8519
8574
|
return h("salla-placeholder", { alignment: "center", iconSize: "xl" }, h("div", { slot: "title" }, this.placeholder_title), h("div", { slot: "description" }, this.placeholder_description));
|
|
8520
8575
|
}
|
|
8521
8576
|
render() {
|
|
8522
|
-
return (h("salla-modal", { key: '
|
|
8577
|
+
return (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 }, h("span", { key: 'f4260144f981da0081e09895b7a065cad1fa66bc', slot: 'icon', class: "s-product-size-guide-header-icon", innerHTML: PencilRuler }), h("div", { key: '80e28a80741f103fdc788a6afa8809dfabfd64f6', slot: "loading" }, h("div", { key: 'e190d657a6a03e48a813c2f78321c12cf95eadcb', class: "s-product-size-guide-skeleton" }, h("salla-skeleton", { key: '94cb87240b52244a86ba76893261048aa3f356d9', height: '15px', width: '25%' }), h("div", { key: 'c8bba70713c78829d0973b845a3ed942cb7fa150', class: "s-product-size-guide-skeleton-header" }, h("salla-skeleton", { key: '13b2fe8a4655457567d087e5763e43abb8b2d2a5', height: '40px' }), h("salla-skeleton", { key: '4b23015076c7c44794eecf85a4355264f778ef10', height: '40px' }), h("salla-skeleton", { key: '3cd58dfafb05cc2bac89ad6973247075d0dd9571', height: '40px' }), h("salla-skeleton", { key: '36f28def58893e567e6186d94ec3a84abed159ab', height: '40px' })), h("div", { key: '854881c782f372b2ed1b08874dfa4bd5d64edef2', class: "s-product-size-guide-skeleton-content" }, h("salla-skeleton", { key: 'a790751c95177a49135859f5810b4cd947fa4314', height: '15px', width: '25%' }), h("salla-skeleton", { key: 'a9e4bd9a0bf55bd391da7f68ba85db7893f1eb81', height: '10px', width: '75%' }), h("salla-skeleton", { key: 'b0f73c83abd9b6e8521dacb823d65f13f9ba54bb', height: '10px', width: '50%' }), h("salla-skeleton", { key: 'fe92879eedf28801c4d267e4595e5f4aa5c7b871', height: '10px', width: '75%' }), h("salla-skeleton", { key: '652d460114bc710073adcb2e31a6627c938259c5', height: '10px', width: '100%' }), h("salla-skeleton", { key: '71f461d5256a05d4ac407b00daf2e20dccef0cf5', height: '10px', width: '25%' }), h("salla-skeleton", { key: 'dbd224caad4233eb0bf8a5012fab7160d067d371', height: '10px', width: '60%' }), h("salla-skeleton", { key: 'c87baa836ae0282047ccc8b7fb122a80cdf7256a', height: '10px', width: '45%' }), h("salla-skeleton", { key: '2c02db790ed567de556d7fa74f48843d156dedb6', height: '10px', width: '30%' })))), h("slot", { key: '155efc69836cfc62382a8b3f7929c7200244f4ba', name: "header" }), !this.hasError && !!this.guides ?
|
|
8523
8578
|
[
|
|
8524
8579
|
h("salla-tabs", null, this.guides.map((guide) => h("salla-tab-header", { slot: "header", name: guide.name }, h("span", null, guide.name))), this.guides.map((guide) => h("salla-tab-content", { slot: "content", name: guide.name }, h("div", { innerHTML: guide.description }))))
|
|
8525
8580
|
]
|
|
8526
|
-
: this.showPlaceholder(), h("slot", { key: '
|
|
8581
|
+
: this.showPlaceholder(), h("slot", { key: '6d212a3d48df9363485e77f37f71276a1c3f8ee7', name: "footer" })));
|
|
8527
8582
|
}
|
|
8528
8583
|
get host() { return getElement(this); }
|
|
8529
8584
|
};
|
|
@@ -9444,6 +9499,10 @@ const sallaQuantityInputCss = "";
|
|
|
9444
9499
|
const SallaQuantityInput = class {
|
|
9445
9500
|
constructor(hostRef) {
|
|
9446
9501
|
registerInstance(this, hostRef);
|
|
9502
|
+
/**
|
|
9503
|
+
* Based on store setting: store.settings.product.manual_quantity
|
|
9504
|
+
*/
|
|
9505
|
+
this.disableInput = false;
|
|
9447
9506
|
this.hostAttributes = {};
|
|
9448
9507
|
this.hasIncrementSlot = false;
|
|
9449
9508
|
this.hasDecrementSlot = false;
|
|
@@ -9469,7 +9528,9 @@ const SallaQuantityInput = class {
|
|
|
9469
9528
|
});
|
|
9470
9529
|
});
|
|
9471
9530
|
}
|
|
9472
|
-
componentWillLoad() {
|
|
9531
|
+
async componentWillLoad() {
|
|
9532
|
+
await salla.onReady();
|
|
9533
|
+
this.disableInput = salla.config.get('store.settings.product.manual_quantity');
|
|
9473
9534
|
this.quantity = parseInt(this.host.getAttribute('value')) || 1;
|
|
9474
9535
|
this.hasIncrementSlot = !!this.host.querySelector('[slot="increment-button"]');
|
|
9475
9536
|
this.hasDecrementSlot = !!this.host.querySelector('[slot="decrement-button"]');
|
|
@@ -9517,7 +9578,11 @@ const SallaQuantityInput = class {
|
|
|
9517
9578
|
return this.host;
|
|
9518
9579
|
}
|
|
9519
9580
|
render() {
|
|
9520
|
-
|
|
9581
|
+
const inputAttributes = this.getInputAttributes();
|
|
9582
|
+
if (!inputAttributes['aria-label'] && !inputAttributes['aria-labelledby']) {
|
|
9583
|
+
inputAttributes['aria-label'] = salla.lang.getWithDefault('common.elements.quantity', 'Quantity');
|
|
9584
|
+
}
|
|
9585
|
+
return (h(Host, { key: '4dfc6c39c86047493c7b37057c877657fc6206ab', class: "s-quantity-input" }, h("div", { key: '246b30299c5b318d9412d7b065e0a219a77ba342', class: "s-quantity-input-container" }, 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 ? h("span", { innerHTML: Add }) : '', h("slot", { key: '1da4aa703d8f135437e49b35c8bd664a39c207cc', name: "increment-button" })), 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 }), 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 ? h("span", { innerHTML: Minus }) : '', h("slot", { key: '9c2b8ef10df5dc976120249dbc5fb6d3e3b68d31', name: "decrement-button" })))));
|
|
9521
9586
|
}
|
|
9522
9587
|
get host() { return getElement(this); }
|
|
9523
9588
|
static get watchers() { return {
|
|
@@ -10160,8 +10225,10 @@ window.SallaApplePay = {
|
|
|
10160
10225
|
|
|
10161
10226
|
return Http.requestWithSupportAjax(SallaApplePay.detail.recalculateTotal.url.replace('{id}', SallaApplePay.id), {}, 'get').then((data) => {
|
|
10162
10227
|
let cart = data.data.initial_data?.cart || data.data.cart;
|
|
10228
|
+
let payments = data.data.initial_data?.payments;
|
|
10229
|
+
|
|
10163
10230
|
// todo :: enhance response from backend
|
|
10164
|
-
SallaApplePay.detail.amount = cart.total;
|
|
10231
|
+
SallaApplePay.detail.amount = payments?.gateways?.applePay?.supportedMultiCurrency ? cart.total_in_customer_currency : cart.total;
|
|
10165
10232
|
SallaApplePay.detail.items = (cart.totals || cart.items).map((item) => {
|
|
10166
10233
|
return {
|
|
10167
10234
|
label: item.title,
|
|
@@ -10190,7 +10257,7 @@ window.SallaApplePay = {
|
|
|
10190
10257
|
private_company_id: private_company_id,
|
|
10191
10258
|
payment_method: 'apple_pay'
|
|
10192
10259
|
};
|
|
10193
|
-
const selectedShippingMethod = SallaApplePay.shipping_methods?.find((item)=> item.company
|
|
10260
|
+
const selectedShippingMethod = SallaApplePay.shipping_methods?.find((item)=> item.company == company_id || item.ship_id == company_id);
|
|
10194
10261
|
if (selectedShippingMethod?.route_id){
|
|
10195
10262
|
payload.shipping_route_id = selectedShippingMethod.route_id;
|
|
10196
10263
|
payload.type = selectedShippingMethod.type;
|
|
@@ -10367,7 +10434,7 @@ const SallaQuickBuy = class {
|
|
|
10367
10434
|
return new Promise((resolve, reject) => {
|
|
10368
10435
|
salla.onReady(async () => {
|
|
10369
10436
|
if (!this.currency) {
|
|
10370
|
-
this.currency = salla.config.get('user.currency_code');
|
|
10437
|
+
this.currency = salla.config.get('store.settings.buy_now.multi_currency') ? salla.config.get('user.currency_code') : 'SAR';
|
|
10371
10438
|
}
|
|
10372
10439
|
if (!this.productId && salla.config.get('page.id')) {
|
|
10373
10440
|
this.productId = salla.config.get('page.id');
|
|
@@ -10422,7 +10489,7 @@ const SallaQuickBuy = class {
|
|
|
10422
10489
|
});
|
|
10423
10490
|
}
|
|
10424
10491
|
render() {
|
|
10425
|
-
return h(Host, { key: '
|
|
10492
|
+
return h(Host, { key: 'a6093f9df07d58cc290a3376c44847c8b4c345ce' }, this.quickBuyButton());
|
|
10426
10493
|
}
|
|
10427
10494
|
quickBuyButton() {
|
|
10428
10495
|
return 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 });
|
|
@@ -11489,7 +11556,7 @@ const SallaScopees = class {
|
|
|
11489
11556
|
return salla.onReady();
|
|
11490
11557
|
}
|
|
11491
11558
|
render() {
|
|
11492
|
-
return (h(Host, { key: '
|
|
11559
|
+
return (h(Host, { key: '8cbe5fbbe87bff9b835ae59fc92278725a9d09cf' }, 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 ?
|
|
11493
11560
|
h("div", { slot: "loading" }, h("div", { class: "s-scopes-skeleton" }, h("salla-list-tile", { class: "s-scopes-header" }, h("div", { slot: "icon", class: "s-scopes-header-icon" }, h("salla-skeleton", { type: "circle" })), h("div", { slot: "title", class: "s-scopes-header-title mb-5" }, h("salla-skeleton", { height: '15px', width: '50%' })), h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, h("salla-skeleton", { height: '10px' }), h("salla-skeleton", { height: '10px', width: '75%' }))), h("div", { class: "s-scopes-skeleton-search" }, h("salla-skeleton", { height: '10px', width: '50%' }), h("salla-skeleton", { height: '30px', width: '100%' })), h("div", { class: "s-scopes-skeleton-scopes" }, h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' })), h("div", { class: "s-scopes-skeleton-btn" }, h("salla-skeleton", { height: '40px', width: '100%' }))))
|
|
11494
11561
|
:
|
|
11495
11562
|
[h("salla-list-tile", { class: this.originalScopesList?.length ? "s-scopes-header block" : "s-hidden" }, h("div", { slot: "icon", class: "s-scopes-header-icon", innerHTML: StoreAlt }), h("div", { slot: "title", class: "s-scopes-header-title" }, salla.lang.get('blocks.scope.you_are_browse_store_from')), h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, !!this.selected_scope ? this.selected_scope.name : "")), h("div", { class: "s-scopes-wrap" }, !!this.originalScopesList?.length && h("h4", { class: "s-scopes-title" }, this.getFormTitle()), this.originalScopesList?.length > this.searchDisplayLimit ?
|
|
@@ -11623,12 +11690,12 @@ const SallaSearch = class {
|
|
|
11623
11690
|
this.inputValue.length < 3 ? this.container.classList.remove('s-search-no-results') : '';
|
|
11624
11691
|
}
|
|
11625
11692
|
render() {
|
|
11626
|
-
const searchContent = h("div", { key: '
|
|
11627
|
-
h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && h("span", { innerHTML: Search })) : null), h("div", { key: '
|
|
11693
|
+
const searchContent = h("div", { key: '2e945555af379b5992375336c5b33a1dbb92589b', class: { 's-search-container': true, 's-search-inline': this.inline }, ref: container => this.container = container }, h("div", { key: '28c948e49a1d72a3a79e87477f37cc5f26dd4b3a', class: "s-search-input-wrapper" }, h("span", { key: 'b053ea1b4e6ed3c4030010dd61923421fcfeb214', class: "s-search-icon-wrap" }, h("span", { key: 'e1ecd01ab77d0ddd0b7b2010788fe28deaebd2af', class: "s-search-icon", innerHTML: this.loading ? '<i class="s-search-spinner-loader"/>' : Search })), 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 ?
|
|
11694
|
+
h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && h("span", { innerHTML: Search })) : null), h("div", { key: '07ed4d8828b8343dd05bacb3a6904ad30eacce7a', class: "s-search-results" }, this.results?.data.map((product) => h("a", { href: product.url + '?from=search-bar', class: { "s-search-product": true, 's-search-product-not-available': !product.is_available }, innerHTML: this.productSlot
|
|
11628
11695
|
.replace(/\{name\}/g, product.name)
|
|
11629
11696
|
.replace(/\{price\}/g, product.price ? salla.money(product.price) : '')
|
|
11630
11697
|
.replace(/\{regular_price\}/g, product.is_on_sale && product.regular_price ? salla.money(product.regular_price) : '')
|
|
11631
|
-
.replace(/\{image\}/g, product.image.url) })), h("p", { key: '
|
|
11698
|
+
.replace(/\{image\}/g, product.image.url) })), h("p", { key: '7a3420f60f2172f39c44633176a454f9ae06f0ce', ref: el => this.noResults = el, class: "s-search-no-results-placeholder" }, salla.lang.get('common.elements.no_options'))));
|
|
11632
11699
|
return (this.inline ?
|
|
11633
11700
|
h("div", { class: "s-search-modal" }, searchContent)
|
|
11634
11701
|
:
|
|
@@ -11671,7 +11738,7 @@ const SallaSkeleton = class {
|
|
|
11671
11738
|
's-skeleton-item': true,
|
|
11672
11739
|
's-skeleton-item-circular': this.type == 'circle',
|
|
11673
11740
|
};
|
|
11674
|
-
return (h(Host, { key: '
|
|
11741
|
+
return (h(Host, { key: 'ad465a77b10e2f1d739c802643076f63985cfda5', class: "s-skeleton-wrapper", style: { width: this.width, height: this.height } }, h("div", { key: '0b05bcfc21d3bcb85389a2a0c9b63c3a7aa28d60', class: classes }, "\u00A0")));
|
|
11675
11742
|
}
|
|
11676
11743
|
};
|
|
11677
11744
|
SallaSkeleton.style = sallaSkeletonCss;
|
|
@@ -12194,7 +12261,7 @@ const SallaSlider = class {
|
|
|
12194
12261
|
classes += this.verticalThumbs ? ' s-slider-vertical ' : ' s-slider-horizontal ';
|
|
12195
12262
|
classes += this.arrowsCentered ? ' s-slider-v-centered ' : '';
|
|
12196
12263
|
classes += this.gridThumbs ? ' s-slider-with-grid-thumbs ' : '';
|
|
12197
|
-
return (h(Host, { key: '
|
|
12264
|
+
return (h(Host, { key: '1ea8cca50a8069cfa57617a79d84a1d9a9f85d8a', class: 's-slider-wrapper ' + classes }, this.blockTitle || this.showControls ?
|
|
12198
12265
|
h("div", { class: "s-slider-block__title" }, this.blockTitle ?
|
|
12199
12266
|
h("div", { class: "s-slider-block__title-right" }, h("h2", null, this.blockTitle), this.blockSubtitle ? h("p", { innerHTML: this.blockSubtitle }) : '')
|
|
12200
12267
|
: '', h("div", { class: "s-slider-block__title-left" }, this.displayAllUrl ?
|
|
@@ -12202,7 +12269,7 @@ const SallaSlider = class {
|
|
|
12202
12269
|
: '', this.showControls ?
|
|
12203
12270
|
h("div", { class: "s-slider-block__title-nav", dir: "rtl" }, h("button", { "aria-label": "Previous Slide", class: "s-slider-prev s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowRightIcon : ArrowLeftIcon })), h("button", { "aria-label": "Next Slide", class: "s-slider-next s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowLeftIcon : ArrowRightIcon })))
|
|
12204
12271
|
: ''))
|
|
12205
|
-
: '', h("div", { key: '
|
|
12272
|
+
: '', h("div", { key: 'e782e1a255ef74387e143be5e54ec8212b133f63', class: "swiper s-slider-container", ref: el => this.sliderContainer = el, dir: this.vertical ? "ltr" : this.direction }, h("slot", { key: 'e69fb142f47b11d749a0ea2676177118eaa2093a' }), h("div", { key: '469f85e0a975a1de25c6c6c47918b85bb640e271', class: "swiper-wrapper s-slider-swiper-wrapper", ref: el => this.sliderWrapper = el }, h("slot", { key: '87d7c9b65e2d499bbd716a17ec5ce1f3079cc750', name: 'items' })), this.pagination ? h("div", { class: "swiper-pagination" }) : ''), this.type == 'thumbs' && this.hasThumbSlot ? h("div", { class: "s-slider-thumbs" }, h("div", { class: "swiper s-slider-thumbs-container", dir: this.getThumbsDirection(), ref: el => this.thumbsSliderContainer = el }, h("div", { class: { "s-slider-swiper-wrapper swiper-wrapper": true, "s-slider-grid-thumbs": this.gridThumbs }, ref: el => this.thumbsSliderWrapper = el }, h("slot", { name: "thumbs" })), this.showThumbsControls ?
|
|
12206
12273
|
h("div", { class: "s-slider-thumbs-nav", dir: "rtl" }, h("button", { "aria-label": "Previous Slide", class: "s-slider-thumbs-prev s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowRightIcon : ArrowLeftIcon })), h("button", { "aria-label": "Next Slide", class: "s-slider-thumbs-next s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowLeftIcon : ArrowRightIcon })))
|
|
12207
12274
|
: null))
|
|
12208
12275
|
: null));
|
|
@@ -12286,6 +12353,9 @@ const SallaSocialShare = class {
|
|
|
12286
12353
|
this.platforms = 'facebook,twitter,whatsapp,email,copy_link';
|
|
12287
12354
|
}
|
|
12288
12355
|
componentWillLoad() {
|
|
12356
|
+
if (this.host.hasAttribute('aria-label')) {
|
|
12357
|
+
this.host.removeAttribute('aria-label');
|
|
12358
|
+
}
|
|
12289
12359
|
if (document.getElementById('a2a-script')) {
|
|
12290
12360
|
return;
|
|
12291
12361
|
}
|
|
@@ -12365,7 +12435,7 @@ const SallaSocialShare = class {
|
|
|
12365
12435
|
window.a2a?.init('page');
|
|
12366
12436
|
}
|
|
12367
12437
|
render() {
|
|
12368
|
-
return (h("div", { key: '
|
|
12438
|
+
return (h("div", { key: 'c4ac8faea4a8ec8aa5ba9f4e744710d508387d78', class: "s-social-share-wrapper" }, h("slot", { key: '6c6b54513f67be8818a9a042570286d09b7115f8', name: 'widget' }, h("salla-button", { key: '8a57650940dad634cf3576dada4cc35687ed447c', "aria-label": "Share", onClick: () => this.open(), class: "s-social-share-btn", shape: "icon", fill: "outline", color: "light" }, h("span", { key: '207f2fb0e2f89e7057775153ffcc68eebb069824', innerHTML: this.opened ? Cancel : ShareAlt }))), 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 => {
|
|
12369
12439
|
return (h("li", null, h("a", { class: `a2a_button_${platform}`, "aria-label": `Share Via ${platform}` }, this.platformIcons.map((icon) => {
|
|
12370
12440
|
if (icon.name === platform) {
|
|
12371
12441
|
return h("span", { class: "s-social-share-icon", innerHTML: icon.icon });
|
|
@@ -12373,6 +12443,7 @@ const SallaSocialShare = class {
|
|
|
12373
12443
|
}))));
|
|
12374
12444
|
}))));
|
|
12375
12445
|
}
|
|
12446
|
+
get host() { return getElement(this); }
|
|
12376
12447
|
};
|
|
12377
12448
|
SallaSocialShare.style = sallaSocialShareCss;
|
|
12378
12449
|
|
|
@@ -12404,7 +12475,7 @@ const SallaTabContent = class {
|
|
|
12404
12475
|
's-tabs-content': true,
|
|
12405
12476
|
's-tabs-content-selected': this.isSelected
|
|
12406
12477
|
};
|
|
12407
|
-
return (h("div", { key: '
|
|
12478
|
+
return (h("div", { key: '6b11ec3a839c759e64e1766de55f9ac1be18931e', class: classes }, h("slot", { key: '17300d7a52e068428ea956b2c5d5be6d0ab69fca' })));
|
|
12408
12479
|
}
|
|
12409
12480
|
};
|
|
12410
12481
|
SallaTabContent.style = sallaTabContentCss;
|
|
@@ -12463,7 +12534,7 @@ const SallaTabHeader = class {
|
|
|
12463
12534
|
's-tabs-active': this.isSelected,
|
|
12464
12535
|
};
|
|
12465
12536
|
return [
|
|
12466
|
-
h("div", { key: '
|
|
12537
|
+
h("div", { key: '08c51c1ad15c6b0efbeb165c89fc7d73748467d0', class: classes, onClick: this.onClick.bind(this) }, h("slot", { key: 'ba5045dab7c254eb4533dc64630ab0c1f561701b' })),
|
|
12467
12538
|
];
|
|
12468
12539
|
}
|
|
12469
12540
|
};
|
|
@@ -12516,7 +12587,7 @@ const SallaTabs = class {
|
|
|
12516
12587
|
}
|
|
12517
12588
|
render() {
|
|
12518
12589
|
return [
|
|
12519
|
-
h("div", { key: '
|
|
12590
|
+
h("div", { key: '3195e8954179d52867093b5e861b3c0caa6d7af6', class: "s-tabs" }, h("div", { key: 'cf75a77b6cc9b9cd288e963ee56acf19e177029a', class: "s-tabs-header" }, h("slot", { key: 'fa345597be2fbb8ff4f1cb420a030c5ec821bc8b', name: "header" })), h("div", { key: 'f7fd939608e5341b6d9c1d75e7d9dc909a4d8912', class: "s-tabs-content-wrapper" }, h("slot", { key: '86ce2c9bcb3be06264e75369a6be81b2e1361619', name: "content" })))
|
|
12520
12591
|
];
|
|
12521
12592
|
}
|
|
12522
12593
|
get host() { return getElement(this); }
|
|
@@ -12534,7 +12605,7 @@ const SallaTelInput = class {
|
|
|
12534
12605
|
if (this.TelInput)
|
|
12535
12606
|
return;
|
|
12536
12607
|
try {
|
|
12537
|
-
const telInputModule = await import('./index-
|
|
12608
|
+
const telInputModule = await import('./index-HmYGeOpS.js').then(function (n) { return n.i; });
|
|
12538
12609
|
this.TelInput = telInputModule.default;
|
|
12539
12610
|
}
|
|
12540
12611
|
catch (error) {
|
|
@@ -12648,7 +12719,7 @@ const SallaTelInput = class {
|
|
|
12648
12719
|
}
|
|
12649
12720
|
}
|
|
12650
12721
|
render() {
|
|
12651
|
-
return (h(Host, { key: '
|
|
12722
|
+
return (h(Host, { key: '362e48d1b39b0715c10df0c15c730ca21793a46b', class: "s-tel-input" }, 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" }), h("span", { key: 'c50f81a50debf37dc92f81fc61c3ddd3e622031f', class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), h("input", { key: '2217131b313a32c5b62dcce6132a4914f30dc005', type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })));
|
|
12652
12723
|
}
|
|
12653
12724
|
componentDidLoad() {
|
|
12654
12725
|
this.initTelInput();
|
|
@@ -13128,7 +13199,7 @@ const SallaUserSettings = class {
|
|
|
13128
13199
|
await salla.profile.delete().finally(() => this.confirmationModal.close());
|
|
13129
13200
|
}
|
|
13130
13201
|
render() {
|
|
13131
|
-
return (h(Host, { key: '
|
|
13202
|
+
return (h(Host, { key: 'e47b5c39666443b29de9d54ec8f05cb97950ace1', class: "s-user-settings-wrapper" }, this.canHideName && h("div", { key: '54b3098aa736c43d6d3ef53f6a49710dc039a16d', class: "s-user-settings-section" }, h("salla-list-tile", { key: 'dd1d06cd2ad3e0696c76cfd3f4c8b342e774b679' }, h("div", { key: '2e8b8fb48d36ce6f183698cb60a856ee0b74c639', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '0f7158ae21c5a93c5458c38388c79fb7cfa1e88d', innerHTML: UserCancel })), h("div", { key: 'f3f648e8f55f5998362107654d3a3c438bec2999', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), h("div", { key: 'eddfaf2a9faf242123db36f1aa5a87fc242f6ccc', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), h("div", { key: '1112ebcb125325688758d57de115ed36d965752d', slot: 'action', class: "s-user-settings-section-action" }, h("label", { key: '4bacd7e71a3f9ccef749d091d70be45b0184d195', class: "s-toggle" }, h("input", { key: '64db5795f938f72a5c0710c03c46f84bb0248b68', class: "s-toggle-input", checked: this.isHiddenName, onChange: (e) => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), h("div", { key: 'b1e178372d37f63992ba81ee6d5645fb17f5ce33', class: "s-toggle-switcher" }))))), h("div", { key: 'a11d585e1b5fe0430ca00757394e5c9a085192f9', class: "s-user-settings-section" }, h("salla-list-tile", { key: '61ad291644bc8314b443eec5d3a32abccc9c46ba' }, h("div", { key: 'e54526b5f18ce365d68efb9292af2d67ae20b77b', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: 'e2bb0f2b30ac57d6336785485ef99279acf09617', innerHTML: Bullhorn })), h("div", { key: '2f6ec0835993e79b1923778bfe0d6442d71809f0', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), h("div", { key: '6ad65576302c12e2298abd3de70fd5edd54aa542', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), h("div", { key: '05f00c6ed5511bd6a21b3e01a54a01549c758940', slot: 'action', class: "s-user-settings-section-action" }, h("label", { key: '5c3520e04e57205dfe2e7f441e45c46682a56ad4', class: "s-toggle" }, h("input", { key: '8f7f59433b3685acbc0d35c6ceca93a9a6a4ebbf', class: "s-toggle-input", checked: this.isNotifiable, onChange: (e) => this.toggleSetting('is_notifiable', e), type: "checkbox" }), h("div", { key: 'a92abe23b596360bfb3e516ffb0789b53abaabd0', class: "s-toggle-switcher" }))))), h("div", { key: '0996cc090ab85a67e763b5acd19cc87db11c090d', class: "s-user-settings-section s-user-settings-section-deactivate-user" }, h("salla-list-tile", { key: 'f6b43aa4a618d75981fed8844ed1f4ebc3947239' }, h("div", { key: '3027e7c901c1ec214a9effdbd36e1c25d96cdb75', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '11468d7a54fa406e697e07b2ff2fe5c945a28746', innerHTML: UserOff })), h("div", { key: 'c2fd73f5d313daaba740c89ad2654144f6f54bb1', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deactivateAccount)), h("div", { key: 'e2bad2737f3ca8e30bbb375ad7691d607366551c', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.deactivateDesc)), h("div", { key: 'df155e019df0514ed77faaeef107845ce144ca08', slot: 'action', class: "s-user-settings-section-action" }, h("salla-button", { key: 'e7bd07fcbc49ba9e991adf52854b35c9ca8d0344', fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeactivateModal() }, this.capitalizeText(this.deactivateAccount))))), h("salla-modal", { key: '730df3b04afb89a1eba96651899cf84818d49b6b', width: "sm", subTitle: this.capitalizeText(this.sorryForLeavingText), ref: modal => this.confirmationModal = modal }, h("span", { key: '5254b44fac993e1e1454da4eae346afc5ad7211c', slot: 'icon', class: "s-user-settings-confirmation-icon", innerHTML: UserOff }), h("div", { key: '9c07be490266024dee72ca4a244c8dd4ffdd9d71', class: "s-user-settings-confirmation" }, h("div", { key: 'd42ac2fa9cc0030778b444b21958992677667cc3', class: "s-user-settings-confirmation-warning" }, this.capitalizeText(this.warningText)), h("div", { key: 'b3cd6b31255244c469571beaf05a0f266eb431af', class: "s-user-settings-confirmation-actions" }, h("salla-button", { key: 'aadfefcd7e2561542adb10c416bac0ff14b25fef', width: "wide", onClick: () => this.confirmationModal.close() }, this.capitalizeText(this.keepAccount)), h("salla-button", { key: '12693adf31b54a4ca993632fb527dac91ec810b2', fill: 'outline', loading: this.buttonLoading, width: "wide", onClick: () => this.deleteAccount() }, this.capitalizeText(this.deactivateAccount)))))));
|
|
13132
13203
|
}
|
|
13133
13204
|
};
|
|
13134
13205
|
SallaUserSettings.style = sallaUserSettingsCss;
|